Ruby 3.5.0dev (2025-08-02 revision 30a20bc166bc37acd7dcb3788686df149c7f428a)
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 unsigned int has_trailing_semicolon: 1;
375 BITFIELD(enum rb_parser_shareability, shareable_constant_value, 2);
376 BITFIELD(enum rescue_context, in_rescue, 2);
377 unsigned int cant_return: 1;
378};
379
381
382#if defined(__GNUC__) && !defined(__clang__)
383// Suppress "parameter passing for argument of type 'struct
384// lex_context' changed" notes. `struct lex_context` is file scope,
385// and has no ABI compatibility issue.
389// Not sure why effective even after popped.
390#endif
391
392#include "parse.h"
393
394#define NO_LEX_CTXT (struct lex_context){0}
395
396#ifndef WARN_PAST_SCOPE
397# define WARN_PAST_SCOPE 0
398#endif
399
400#define TAB_WIDTH 8
401
402#define yydebug (p->debug) /* disable the global variable definition */
403
404#define YYFPRINTF(out, ...) rb_parser_printf(p, __VA_ARGS__)
405#define YY_LOCATION_PRINT(File, loc, p) \
406 rb_parser_printf(p, "%d.%d-%d.%d", \
407 (loc).beg_pos.lineno, (loc).beg_pos.column,\
408 (loc).end_pos.lineno, (loc).end_pos.column)
409#define YYLLOC_DEFAULT(Current, Rhs, N) \
410 do \
411 if (N) \
412 { \
413 (Current).beg_pos = YYRHSLOC(Rhs, 1).beg_pos; \
414 (Current).end_pos = YYRHSLOC(Rhs, N).end_pos; \
415 } \
416 else \
417 { \
418 (Current).beg_pos = YYRHSLOC(Rhs, 0).end_pos; \
419 (Current).end_pos = YYRHSLOC(Rhs, 0).end_pos; \
420 } \
421 while (0)
422#define YY_(Msgid) \
423 (((Msgid)[0] == 'm') && (strcmp((Msgid), "memory exhausted") == 0) ? \
424 "nesting too deep" : (Msgid))
425
426#define RUBY_SET_YYLLOC_FROM_STRTERM_HEREDOC(Current) \
427 rb_parser_set_location_from_strterm_heredoc(p, &p->lex.strterm->u.heredoc, &(Current))
428#define RUBY_SET_YYLLOC_OF_DELAYED_TOKEN(Current) \
429 rb_parser_set_location_of_delayed_token(p, &(Current))
430#define RUBY_SET_YYLLOC_OF_HEREDOC_END(Current) \
431 rb_parser_set_location_of_heredoc_end(p, &(Current))
432#define RUBY_SET_YYLLOC_OF_DUMMY_END(Current) \
433 rb_parser_set_location_of_dummy_end(p, &(Current))
434#define RUBY_SET_YYLLOC_OF_NONE(Current) \
435 rb_parser_set_location_of_none(p, &(Current))
436#define RUBY_SET_YYLLOC(Current) \
437 rb_parser_set_location(p, &(Current))
438#define RUBY_INIT_YYLLOC() \
439 { \
440 {p->ruby_sourceline, (int)(p->lex.ptok - p->lex.pbeg)}, \
441 {p->ruby_sourceline, (int)(p->lex.pcur - p->lex.pbeg)}, \
442 }
443
444#define IS_lex_state_for(x, ls) ((x) & (ls))
445#define IS_lex_state_all_for(x, ls) (((x) & (ls)) == (ls))
446#define IS_lex_state(ls) IS_lex_state_for(p->lex.state, (ls))
447#define IS_lex_state_all(ls) IS_lex_state_all_for(p->lex.state, (ls))
448
449# define SET_LEX_STATE(ls) \
450 parser_set_lex_state(p, ls, __LINE__)
451static inline enum lex_state_e parser_set_lex_state(struct parser_params *p, enum lex_state_e ls, int line);
452
453typedef VALUE stack_type;
454
455static const rb_code_location_t NULL_LOC = { {0, -1}, {0, -1} };
456
457# define SHOW_BITSTACK(stack, name) (p->debug ? rb_parser_show_bitstack(p, stack, name, __LINE__) : (void)0)
458# define BITSTACK_PUSH(stack, n) (((p->stack) = ((p->stack)<<1)|((n)&1)), SHOW_BITSTACK(p->stack, #stack"(push)"))
459# define BITSTACK_POP(stack) (((p->stack) = (p->stack) >> 1), SHOW_BITSTACK(p->stack, #stack"(pop)"))
460# define BITSTACK_SET_P(stack) (SHOW_BITSTACK(p->stack, #stack), (p->stack)&1)
461# define BITSTACK_SET(stack, n) ((p->stack)=(n), SHOW_BITSTACK(p->stack, #stack"(set)"))
462
463/* A flag to identify keyword_do_cond, "do" keyword after condition expression.
464 Examples: `while ... do`, `until ... do`, and `for ... in ... do` */
465#define COND_PUSH(n) BITSTACK_PUSH(cond_stack, (n))
466#define COND_POP() BITSTACK_POP(cond_stack)
467#define COND_P() BITSTACK_SET_P(cond_stack)
468#define COND_SET(n) BITSTACK_SET(cond_stack, (n))
469
470/* A flag to identify keyword_do_block; "do" keyword after command_call.
471 Example: `foo 1, 2 do`. */
472#define CMDARG_PUSH(n) BITSTACK_PUSH(cmdarg_stack, (n))
473#define CMDARG_POP() BITSTACK_POP(cmdarg_stack)
474#define CMDARG_P() BITSTACK_SET_P(cmdarg_stack)
475#define CMDARG_SET(n) BITSTACK_SET(cmdarg_stack, (n))
476
477struct vtable {
478 ID *tbl;
479 int pos;
480 int capa;
481 struct vtable *prev;
482};
483
485 struct vtable *args;
486 struct vtable *vars;
487 struct vtable *used;
488# if WARN_PAST_SCOPE
489 struct vtable *past;
490# endif
491 struct local_vars *prev;
492 struct {
493 NODE *outer, *inner, *current;
494 } numparam;
495 NODE *it;
496};
497
499 NODE *node;
500 YYLTYPE opening_loc;
501 YYLTYPE closing_loc;
503
504enum {
505 ORDINAL_PARAM = -1,
506 NO_PARAM = 0,
507 NUMPARAM_MAX = 9,
508};
509
510#define DVARS_INHERIT ((void*)1)
511#define DVARS_TOPSCOPE NULL
512#define DVARS_TERMINAL_P(tbl) ((tbl) == DVARS_INHERIT || (tbl) == DVARS_TOPSCOPE)
513
514typedef struct token_info {
515 const char *token;
517 int indent;
518 int nonspc;
519 struct token_info *next;
520} token_info;
521
526
528 struct parser_string_buffer_elem *next;
529 long len; /* Total length of allocated buf */
530 long used; /* Current usage of buf */
531 rb_parser_string_t *buf[FLEX_ARY_LEN];
533
538
539#define AFTER_HEREDOC_WITHOUT_TERMINATOR ((rb_parser_string_t *)1)
540
541/*
542 Structure of Lexer Buffer:
543
544 lex.pbeg lex.ptok lex.pcur lex.pend
545 | | | |
546 |------------+------------+------------|
547 |<---------->|
548 token
549*/
551 YYSTYPE *lval;
552 YYLTYPE *yylloc;
553
554 struct {
555 rb_strterm_t *strterm;
556 rb_parser_lex_gets_func *gets;
557 rb_parser_input_data input;
558 parser_string_buffer_t string_buffer;
559 rb_parser_string_t *lastline;
560 rb_parser_string_t *nextline;
561 const char *pbeg;
562 const char *pcur;
563 const char *pend;
564 const char *ptok;
565 enum lex_state_e state;
566 /* track the nest level of any parens "()[]{}" */
567 int paren_nest;
568 /* keep p->lex.paren_nest at the beginning of lambda "->" to detect tLAMBEG and keyword_do_LAMBDA */
569 int lpar_beg;
570 /* track the nest level of only braces "{}" */
571 int brace_nest;
572 } lex;
573 stack_type cond_stack;
574 stack_type cmdarg_stack;
575 int tokidx;
576 int toksiz;
577 int heredoc_end;
578 int heredoc_indent;
579 int heredoc_line_indent;
580 char *tokenbuf;
581 struct local_vars *lvtbl;
582 st_table *pvtbl;
583 st_table *pktbl;
584 int line_count;
585 int ruby_sourceline; /* current line no. */
586 const char *ruby_sourcefile; /* current source file */
587 VALUE ruby_sourcefile_string;
588 rb_encoding *enc;
590 st_table *case_labels;
591 rb_node_exits_t *exits;
592
593 VALUE debug_buffer;
594 VALUE debug_output;
595
596 struct {
597 rb_parser_string_t *token;
598 int beg_line;
599 int beg_col;
600 int end_line;
601 int end_col;
602 } delayed;
603
604 rb_ast_t *ast;
605 int node_id;
606
607 st_table *warn_duplicate_keys_table;
608
609 int max_numparam;
610 ID it_id;
611
612 struct lex_context ctxt;
613
614 NODE *eval_tree_begin;
615 NODE *eval_tree;
616 const struct rb_iseq_struct *parent_iseq;
617
618#ifdef UNIVERSAL_PARSER
619 const rb_parser_config_t *config;
620#endif
621 /* compile_option */
622 signed int frozen_string_literal:2; /* -1: not specified, 0: false, 1: true */
623
624 unsigned int command_start:1;
625 unsigned int eofp: 1;
626 unsigned int ruby__end__seen: 1;
627 unsigned int debug: 1;
628 unsigned int has_shebang: 1;
629 unsigned int token_seen: 1;
630 unsigned int token_info_enabled: 1;
631# if WARN_PAST_SCOPE
632 unsigned int past_scope_enabled: 1;
633# endif
634 unsigned int error_p: 1;
635 unsigned int cr_seen: 1;
636
637#ifndef RIPPER
638 /* Ruby core only */
639
640 unsigned int do_print: 1;
641 unsigned int do_loop: 1;
642 unsigned int do_chomp: 1;
643 unsigned int do_split: 1;
644 unsigned int error_tolerant: 1;
645 unsigned int keep_tokens: 1;
646
647 VALUE error_buffer;
648 rb_parser_ary_t *debug_lines;
649 /*
650 * Store specific keyword locations to generate dummy end token.
651 * Refer to the tail of list element.
652 */
654 /* id for terms */
655 int token_id;
656 /* Array for term tokens */
657 rb_parser_ary_t *tokens;
658#else
659 /* Ripper only */
660
661 VALUE value;
662 VALUE result;
663 VALUE parsing_thread;
664 VALUE s_value; /* Token VALUE */
665 VALUE s_lvalue; /* VALUE generated by rule action (reduce) */
666 VALUE s_value_stack;
667#endif
668};
669
670#define NUMPARAM_ID_P(id) numparam_id_p(p, id)
671#define NUMPARAM_ID_TO_IDX(id) (unsigned int)(((id) >> ID_SCOPE_SHIFT) - (tNUMPARAM_1 - 1))
672#define NUMPARAM_IDX_TO_ID(idx) TOKEN2LOCALID((tNUMPARAM_1 - 1 + (idx)))
673static int
674numparam_id_p(struct parser_params *p, ID id)
675{
676 if (!is_local_id(id) || id < (tNUMPARAM_1 << ID_SCOPE_SHIFT)) return 0;
677 unsigned int idx = NUMPARAM_ID_TO_IDX(id);
678 return idx > 0 && idx <= NUMPARAM_MAX;
679}
680static void numparam_name(struct parser_params *p, ID id);
681
682#ifdef RIPPER
683static void
684after_shift(struct parser_params *p)
685{
686 if (p->debug) {
687 rb_parser_printf(p, "after-shift: %+"PRIsVALUE"\n", p->s_value);
688 }
689 rb_ary_push(p->s_value_stack, p->s_value);
690 p->s_value = Qnil;
691}
692
693static void
694before_reduce(int len, struct parser_params *p)
695{
696 // Initialize $$ with $1.
697 if (len) p->s_lvalue = rb_ary_entry(p->s_value_stack, -len);
698}
699
700static void
701after_reduce(int len, struct parser_params *p)
702{
703 for (int i = 0; i < len; i++) {
704 VALUE tos = rb_ary_pop(p->s_value_stack);
705 if (p->debug) {
706 rb_parser_printf(p, "after-reduce pop: %+"PRIsVALUE"\n", tos);
707 }
708 }
709 if (p->debug) {
710 rb_parser_printf(p, "after-reduce push: %+"PRIsVALUE"\n", p->s_lvalue);
711 }
712 rb_ary_push(p->s_value_stack, p->s_lvalue);
713 p->s_lvalue = Qnil;
714}
715
716static void
717after_shift_error_token(struct parser_params *p)
718{
719 if (p->debug) {
720 rb_parser_printf(p, "after-shift-error-token:\n");
721 }
722 rb_ary_push(p->s_value_stack, Qnil);
723}
724
725static void
726after_pop_stack(int len, struct parser_params *p)
727{
728 for (int i = 0; i < len; i++) {
729 VALUE tos = rb_ary_pop(p->s_value_stack);
730 if (p->debug) {
731 rb_parser_printf(p, "after-pop-stack pop: %+"PRIsVALUE"\n", tos);
732 }
733 }
734}
735#else
736static void
737after_shift(struct parser_params *p)
738{
739}
740
741static void
742before_reduce(int len, struct parser_params *p)
743{
744}
745
746static void
747after_reduce(int len, struct parser_params *p)
748{
749}
750
751static void
752after_shift_error_token(struct parser_params *p)
753{
754}
755
756static void
757after_pop_stack(int len, struct parser_params *p)
758{
759}
760#endif
761
762#define intern_cstr(n,l,en) rb_intern3(n,l,en)
763
764#define STRING_NEW0() rb_parser_encoding_string_new(p,0,0,p->enc)
765
766#define STR_NEW(ptr,len) rb_enc_str_new((ptr),(len),p->enc)
767#define STR_NEW0() rb_enc_str_new(0,0,p->enc)
768#define STR_NEW2(ptr) rb_enc_str_new((ptr),strlen(ptr),p->enc)
769#define STR_NEW3(ptr,len,e,func) parser_str_new(p, (ptr),(len),(e),(func),p->enc)
770#define TOK_INTERN() intern_cstr(tok(p), toklen(p), p->enc)
771#define VALID_SYMNAME_P(s, l, enc, type) (rb_enc_symname_type(s, l, enc, (1U<<(type))) == (int)(type))
772
773#ifndef RIPPER
774static inline int
775char_at_end(struct parser_params *p, VALUE str, int when_empty)
776{
777 long len = RSTRING_LEN(str);
778 return len > 0 ? (unsigned char)RSTRING_PTR(str)[len-1] : when_empty;
779}
780#endif
781
782static void
783pop_pvtbl(struct parser_params *p, st_table *tbl)
784{
785 st_free_table(p->pvtbl);
786 p->pvtbl = tbl;
787}
788
789static void
790pop_pktbl(struct parser_params *p, st_table *tbl)
791{
792 if (p->pktbl) st_free_table(p->pktbl);
793 p->pktbl = tbl;
794}
795
796#define STRING_BUF_DEFAULT_LEN 16
797
798static void
799string_buffer_init(struct parser_params *p)
800{
801 parser_string_buffer_t *buf = &p->lex.string_buffer;
802 const size_t size = offsetof(parser_string_buffer_elem_t, buf) + sizeof(rb_parser_string_t *) * STRING_BUF_DEFAULT_LEN;
803
804 buf->head = buf->last = xmalloc(size);
805 buf->head->len = STRING_BUF_DEFAULT_LEN;
806 buf->head->used = 0;
807 buf->head->next = NULL;
808}
809
810static void
811string_buffer_append(struct parser_params *p, rb_parser_string_t *str)
812{
813 parser_string_buffer_t *buf = &p->lex.string_buffer;
814
815 if (buf->head->used >= buf->head->len) {
817 long n = buf->head->len * 2;
818 const size_t size = offsetof(parser_string_buffer_elem_t, buf) + sizeof(rb_parser_string_t *) * n;
819
820 elem = xmalloc(size);
821 elem->len = n;
822 elem->used = 0;
823 elem->next = NULL;
824 buf->last->next = elem;
825 buf->last = elem;
826 }
827 buf->last->buf[buf->last->used++] = str;
828}
829
830static void
831string_buffer_free(struct parser_params *p)
832{
833 parser_string_buffer_elem_t *elem = p->lex.string_buffer.head;
834
835 while (elem) {
836 parser_string_buffer_elem_t *next_elem = elem->next;
837
838 for (long i = 0; i < elem->used; i++) {
839 rb_parser_string_free(p, elem->buf[i]);
840 }
841
842 xfree(elem);
843 elem = next_elem;
844 }
845}
846
847#ifndef RIPPER
848static void flush_debug_buffer(struct parser_params *p, VALUE out, VALUE str);
849
850static void
851debug_end_expect_token_locations(struct parser_params *p, const char *name)
852{
853 if(p->debug) {
854 VALUE mesg = rb_sprintf("%s: [", name);
855 int i = 0;
856 for (end_expect_token_locations_t *loc = p->end_expect_token_locations; loc; loc = loc->prev) {
857 if (i > 0)
858 rb_str_cat_cstr(mesg, ", ");
859 rb_str_catf(mesg, "[%d, %d]", loc->pos->lineno, loc->pos->column);
860 i++;
861 }
862 rb_str_cat_cstr(mesg, "]\n");
863 flush_debug_buffer(p, p->debug_output, mesg);
864 }
865}
866
867static void
868push_end_expect_token_locations(struct parser_params *p, const rb_code_position_t *pos)
869{
870 if(!p->error_tolerant) return;
871
874 locations->pos = pos;
875 locations->prev = p->end_expect_token_locations;
876 p->end_expect_token_locations = locations;
877
878 debug_end_expect_token_locations(p, "push_end_expect_token_locations");
879}
880
881static void
882pop_end_expect_token_locations(struct parser_params *p)
883{
884 if(!p->end_expect_token_locations) return;
885
886 end_expect_token_locations_t *locations = p->end_expect_token_locations->prev;
887 ruby_sized_xfree(p->end_expect_token_locations, sizeof(end_expect_token_locations_t));
888 p->end_expect_token_locations = locations;
889
890 debug_end_expect_token_locations(p, "pop_end_expect_token_locations");
891}
892
894peek_end_expect_token_locations(struct parser_params *p)
895{
896 return p->end_expect_token_locations;
897}
898
899static const char *
900parser_token2char(struct parser_params *p, enum yytokentype tok)
901{
902 switch ((int) tok) {
903#define TOKEN2CHAR(tok) case tok: return (#tok);
904#define TOKEN2CHAR2(tok, name) case tok: return (name);
905 TOKEN2CHAR2(' ', "word_sep");
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('`', "`");
925 TOKEN2CHAR2('\n', "nl");
926 TOKEN2CHAR2('{', "\"{\"");
927 TOKEN2CHAR2('}', "\"}\"");
928 TOKEN2CHAR2('[', "\"[\"");
929 TOKEN2CHAR2(']', "\"]\"");
930 TOKEN2CHAR2('(', "\"(\"");
931 TOKEN2CHAR2(')', "\")\"");
932 TOKEN2CHAR2('\\', "backslash");
933 TOKEN2CHAR(keyword_class);
934 TOKEN2CHAR(keyword_module);
935 TOKEN2CHAR(keyword_def);
936 TOKEN2CHAR(keyword_undef);
937 TOKEN2CHAR(keyword_begin);
938 TOKEN2CHAR(keyword_rescue);
939 TOKEN2CHAR(keyword_ensure);
940 TOKEN2CHAR(keyword_end);
941 TOKEN2CHAR(keyword_if);
942 TOKEN2CHAR(keyword_unless);
943 TOKEN2CHAR(keyword_then);
944 TOKEN2CHAR(keyword_elsif);
945 TOKEN2CHAR(keyword_else);
946 TOKEN2CHAR(keyword_case);
947 TOKEN2CHAR(keyword_when);
948 TOKEN2CHAR(keyword_while);
949 TOKEN2CHAR(keyword_until);
950 TOKEN2CHAR(keyword_for);
951 TOKEN2CHAR(keyword_break);
952 TOKEN2CHAR(keyword_next);
953 TOKEN2CHAR(keyword_redo);
954 TOKEN2CHAR(keyword_retry);
955 TOKEN2CHAR(keyword_in);
956 TOKEN2CHAR(keyword_do);
957 TOKEN2CHAR(keyword_do_cond);
958 TOKEN2CHAR(keyword_do_block);
959 TOKEN2CHAR(keyword_do_LAMBDA);
960 TOKEN2CHAR(keyword_return);
961 TOKEN2CHAR(keyword_yield);
962 TOKEN2CHAR(keyword_super);
963 TOKEN2CHAR(keyword_self);
964 TOKEN2CHAR(keyword_nil);
965 TOKEN2CHAR(keyword_true);
966 TOKEN2CHAR(keyword_false);
967 TOKEN2CHAR(keyword_and);
968 TOKEN2CHAR(keyword_or);
969 TOKEN2CHAR(keyword_not);
970 TOKEN2CHAR(modifier_if);
971 TOKEN2CHAR(modifier_unless);
972 TOKEN2CHAR(modifier_while);
973 TOKEN2CHAR(modifier_until);
974 TOKEN2CHAR(modifier_rescue);
975 TOKEN2CHAR(keyword_alias);
976 TOKEN2CHAR(keyword_defined);
977 TOKEN2CHAR(keyword_BEGIN);
978 TOKEN2CHAR(keyword_END);
979 TOKEN2CHAR(keyword__LINE__);
980 TOKEN2CHAR(keyword__FILE__);
981 TOKEN2CHAR(keyword__ENCODING__);
982 TOKEN2CHAR(tIDENTIFIER);
983 TOKEN2CHAR(tFID);
984 TOKEN2CHAR(tGVAR);
985 TOKEN2CHAR(tIVAR);
986 TOKEN2CHAR(tCONSTANT);
987 TOKEN2CHAR(tCVAR);
988 TOKEN2CHAR(tLABEL);
989 TOKEN2CHAR(tINTEGER);
990 TOKEN2CHAR(tFLOAT);
991 TOKEN2CHAR(tRATIONAL);
992 TOKEN2CHAR(tIMAGINARY);
993 TOKEN2CHAR(tCHAR);
994 TOKEN2CHAR(tNTH_REF);
995 TOKEN2CHAR(tBACK_REF);
996 TOKEN2CHAR(tSTRING_CONTENT);
997 TOKEN2CHAR(tREGEXP_END);
998 TOKEN2CHAR(tDUMNY_END);
999 TOKEN2CHAR(tSP);
1000 TOKEN2CHAR(tUPLUS);
1001 TOKEN2CHAR(tUMINUS);
1002 TOKEN2CHAR(tPOW);
1003 TOKEN2CHAR(tCMP);
1004 TOKEN2CHAR(tEQ);
1005 TOKEN2CHAR(tEQQ);
1006 TOKEN2CHAR(tNEQ);
1007 TOKEN2CHAR(tGEQ);
1008 TOKEN2CHAR(tLEQ);
1009 TOKEN2CHAR(tANDOP);
1010 TOKEN2CHAR(tOROP);
1011 TOKEN2CHAR(tMATCH);
1012 TOKEN2CHAR(tNMATCH);
1013 TOKEN2CHAR(tDOT2);
1014 TOKEN2CHAR(tDOT3);
1015 TOKEN2CHAR(tBDOT2);
1016 TOKEN2CHAR(tBDOT3);
1017 TOKEN2CHAR(tAREF);
1018 TOKEN2CHAR(tASET);
1019 TOKEN2CHAR(tLSHFT);
1020 TOKEN2CHAR(tRSHFT);
1021 TOKEN2CHAR(tANDDOT);
1022 TOKEN2CHAR(tCOLON2);
1023 TOKEN2CHAR(tCOLON3);
1024 TOKEN2CHAR(tOP_ASGN);
1025 TOKEN2CHAR(tASSOC);
1026 TOKEN2CHAR(tLPAREN);
1027 TOKEN2CHAR(tLPAREN_ARG);
1028 TOKEN2CHAR(tLBRACK);
1029 TOKEN2CHAR(tLBRACE);
1030 TOKEN2CHAR(tLBRACE_ARG);
1031 TOKEN2CHAR(tSTAR);
1032 TOKEN2CHAR(tDSTAR);
1033 TOKEN2CHAR(tAMPER);
1034 TOKEN2CHAR(tLAMBDA);
1035 TOKEN2CHAR(tSYMBEG);
1036 TOKEN2CHAR(tSTRING_BEG);
1037 TOKEN2CHAR(tXSTRING_BEG);
1038 TOKEN2CHAR(tREGEXP_BEG);
1039 TOKEN2CHAR(tWORDS_BEG);
1040 TOKEN2CHAR(tQWORDS_BEG);
1041 TOKEN2CHAR(tSYMBOLS_BEG);
1042 TOKEN2CHAR(tQSYMBOLS_BEG);
1043 TOKEN2CHAR(tSTRING_END);
1044 TOKEN2CHAR(tSTRING_DEND);
1045 TOKEN2CHAR(tSTRING_DBEG);
1046 TOKEN2CHAR(tSTRING_DVAR);
1047 TOKEN2CHAR(tLAMBEG);
1048 TOKEN2CHAR(tLABEL_END);
1049 TOKEN2CHAR(tIGNORED_NL);
1050 TOKEN2CHAR(tCOMMENT);
1051 TOKEN2CHAR(tEMBDOC_BEG);
1052 TOKEN2CHAR(tEMBDOC);
1053 TOKEN2CHAR(tEMBDOC_END);
1054 TOKEN2CHAR(tHEREDOC_BEG);
1055 TOKEN2CHAR(tHEREDOC_END);
1056 TOKEN2CHAR(k__END__);
1057 TOKEN2CHAR(tLOWEST);
1058 TOKEN2CHAR(tUMINUS_NUM);
1059 TOKEN2CHAR(tLAST_TOKEN);
1060#undef TOKEN2CHAR
1061#undef TOKEN2CHAR2
1062 }
1063
1064 rb_bug("parser_token2id: unknown token %d", tok);
1065
1066 UNREACHABLE_RETURN(0);
1067}
1068#else
1069static void
1070push_end_expect_token_locations(struct parser_params *p, const rb_code_position_t *pos)
1071{
1072}
1073
1074static void
1075pop_end_expect_token_locations(struct parser_params *p)
1076{
1077}
1078#endif
1079
1080RBIMPL_ATTR_NONNULL((1, 2, 3))
1081static int parser_yyerror(struct parser_params*, const YYLTYPE *yylloc, const char*);
1082RBIMPL_ATTR_NONNULL((1, 2))
1083static int parser_yyerror0(struct parser_params*, const char*);
1084#define yyerror0(msg) parser_yyerror0(p, (msg))
1085#define yyerror1(loc, msg) parser_yyerror(p, (loc), (msg))
1086#define yyerror(yylloc, p, msg) parser_yyerror(p, yylloc, msg)
1087#define token_flush(ptr) ((ptr)->lex.ptok = (ptr)->lex.pcur)
1088#define lex_goto_eol(p) ((p)->lex.pcur = (p)->lex.pend)
1089#define lex_eol_p(p) lex_eol_n_p(p, 0)
1090#define lex_eol_n_p(p,n) lex_eol_ptr_n_p(p, (p)->lex.pcur, n)
1091#define lex_eol_ptr_p(p,ptr) lex_eol_ptr_n_p(p,ptr,0)
1092#define lex_eol_ptr_n_p(p,ptr,n) ((ptr)+(n) >= (p)->lex.pend)
1093
1094static void token_info_setup(token_info *ptinfo, const char *ptr, const rb_code_location_t *loc);
1095static void token_info_push(struct parser_params*, const char *token, const rb_code_location_t *loc);
1096static void token_info_pop(struct parser_params*, const char *token, const rb_code_location_t *loc);
1097static void token_info_warn(struct parser_params *p, const char *token, token_info *ptinfo_beg, int same, const rb_code_location_t *loc);
1098static void token_info_drop(struct parser_params *p, const char *token, rb_code_position_t beg_pos);
1099
1100#ifdef RIPPER
1101#define compile_for_eval (0)
1102#else
1103#define compile_for_eval (p->parent_iseq != 0)
1104#endif
1105
1106#define token_column ((int)(p->lex.ptok - p->lex.pbeg))
1107
1108#define CALL_Q_P(q) ((q) == tANDDOT)
1109#define NEW_QCALL(q,r,m,a,loc) (CALL_Q_P(q) ? NEW_QCALL0(r,m,a,loc) : NEW_CALL(r,m,a,loc))
1110
1111#define lambda_beginning_p() (p->lex.lpar_beg == p->lex.paren_nest)
1112
1113static enum yytokentype yylex(YYSTYPE*, YYLTYPE*, struct parser_params*);
1114
1115static inline void
1116rb_discard_node(struct parser_params *p, NODE *n)
1117{
1118 rb_ast_delete_node(p->ast, n);
1119}
1120
1121static rb_node_scope_t *rb_node_scope_new(struct parser_params *p, rb_node_args_t *nd_args, NODE *nd_body, const YYLTYPE *loc);
1122static 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);
1123static rb_node_block_t *rb_node_block_new(struct parser_params *p, NODE *nd_head, const YYLTYPE *loc);
1124static 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);
1125static 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);
1126static 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);
1127static 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);
1128static 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);
1129static 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);
1130static rb_node_in_t *rb_node_in_new(struct parser_params *p, NODE *nd_head, NODE *nd_body, NODE *nd_next, const YYLTYPE *loc);
1131static 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);
1132static 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);
1133static rb_node_iter_t *rb_node_iter_new(struct parser_params *p, rb_node_args_t *nd_args, NODE *nd_body, const YYLTYPE *loc);
1134static 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);
1135static rb_node_for_masgn_t *rb_node_for_masgn_new(struct parser_params *p, NODE *nd_var, const YYLTYPE *loc);
1136static rb_node_retry_t *rb_node_retry_new(struct parser_params *p, const YYLTYPE *loc);
1137static rb_node_begin_t *rb_node_begin_new(struct parser_params *p, NODE *nd_body, const YYLTYPE *loc);
1138static rb_node_rescue_t *rb_node_rescue_new(struct parser_params *p, NODE *nd_head, NODE *nd_resq, NODE *nd_else, const YYLTYPE *loc);
1139static 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);
1140static rb_node_ensure_t *rb_node_ensure_new(struct parser_params *p, NODE *nd_head, NODE *nd_ensr, const YYLTYPE *loc);
1141static 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);
1142static 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);
1143static rb_node_masgn_t *rb_node_masgn_new(struct parser_params *p, NODE *nd_head, NODE *nd_args, const YYLTYPE *loc);
1144static rb_node_lasgn_t *rb_node_lasgn_new(struct parser_params *p, ID nd_vid, NODE *nd_value, const YYLTYPE *loc);
1145static rb_node_dasgn_t *rb_node_dasgn_new(struct parser_params *p, ID nd_vid, NODE *nd_value, const YYLTYPE *loc);
1146static rb_node_gasgn_t *rb_node_gasgn_new(struct parser_params *p, ID nd_vid, NODE *nd_value, const YYLTYPE *loc);
1147static rb_node_iasgn_t *rb_node_iasgn_new(struct parser_params *p, ID nd_vid, NODE *nd_value, const YYLTYPE *loc);
1148static 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);
1149static rb_node_cvasgn_t *rb_node_cvasgn_new(struct parser_params *p, ID nd_vid, NODE *nd_value, const YYLTYPE *loc);
1150static 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);
1151static 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);
1152static 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);
1153static 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);
1154static 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);
1155static rb_node_call_t *rb_node_call_new(struct parser_params *p, NODE *nd_recv, ID nd_mid, NODE *nd_args, const YYLTYPE *loc);
1156static rb_node_opcall_t *rb_node_opcall_new(struct parser_params *p, NODE *nd_recv, ID nd_mid, NODE *nd_args, const YYLTYPE *loc);
1157static rb_node_fcall_t *rb_node_fcall_new(struct parser_params *p, ID nd_mid, NODE *nd_args, const YYLTYPE *loc);
1158static rb_node_vcall_t *rb_node_vcall_new(struct parser_params *p, ID nd_mid, const YYLTYPE *loc);
1159static rb_node_qcall_t *rb_node_qcall_new(struct parser_params *p, NODE *nd_recv, ID nd_mid, NODE *nd_args, const YYLTYPE *loc);
1160static 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);
1161static rb_node_zsuper_t * rb_node_zsuper_new(struct parser_params *p, const YYLTYPE *loc);
1162static rb_node_list_t *rb_node_list_new(struct parser_params *p, NODE *nd_head, const YYLTYPE *loc);
1163static rb_node_list_t *rb_node_list_new2(struct parser_params *p, NODE *nd_head, long nd_alen, NODE *nd_next, const YYLTYPE *loc);
1164static rb_node_zlist_t *rb_node_zlist_new(struct parser_params *p, const YYLTYPE *loc);
1165static rb_node_hash_t *rb_node_hash_new(struct parser_params *p, NODE *nd_head, const YYLTYPE *loc);
1166static rb_node_return_t *rb_node_return_new(struct parser_params *p, NODE *nd_stts, const YYLTYPE *loc, const YYLTYPE *keyword_loc);
1167static 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);
1168static rb_node_lvar_t *rb_node_lvar_new(struct parser_params *p, ID nd_vid, const YYLTYPE *loc);
1169static rb_node_dvar_t *rb_node_dvar_new(struct parser_params *p, ID nd_vid, const YYLTYPE *loc);
1170static rb_node_gvar_t *rb_node_gvar_new(struct parser_params *p, ID nd_vid, const YYLTYPE *loc);
1171static rb_node_ivar_t *rb_node_ivar_new(struct parser_params *p, ID nd_vid, const YYLTYPE *loc);
1172static rb_node_const_t *rb_node_const_new(struct parser_params *p, ID nd_vid, const YYLTYPE *loc);
1173static rb_node_cvar_t *rb_node_cvar_new(struct parser_params *p, ID nd_vid, const YYLTYPE *loc);
1174static rb_node_nth_ref_t *rb_node_nth_ref_new(struct parser_params *p, long nd_nth, const YYLTYPE *loc);
1175static rb_node_back_ref_t *rb_node_back_ref_new(struct parser_params *p, long nd_nth, const YYLTYPE *loc);
1176static rb_node_match2_t *rb_node_match2_new(struct parser_params *p, NODE *nd_recv, NODE *nd_value, const YYLTYPE *loc);
1177static rb_node_match3_t *rb_node_match3_new(struct parser_params *p, NODE *nd_recv, NODE *nd_value, const YYLTYPE *loc);
1178static rb_node_integer_t * rb_node_integer_new(struct parser_params *p, char* val, int base, const YYLTYPE *loc);
1179static rb_node_float_t * rb_node_float_new(struct parser_params *p, char* val, const YYLTYPE *loc);
1180static rb_node_rational_t * rb_node_rational_new(struct parser_params *p, char* val, int base, int seen_point, const YYLTYPE *loc);
1181static 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);
1182static rb_node_str_t *rb_node_str_new(struct parser_params *p, rb_parser_string_t *string, const YYLTYPE *loc);
1183static 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);
1184static rb_node_dstr_t *rb_node_dstr_new(struct parser_params *p, rb_parser_string_t *string, const YYLTYPE *loc);
1185static rb_node_xstr_t *rb_node_xstr_new(struct parser_params *p, rb_parser_string_t *string, const YYLTYPE *loc);
1186static 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);
1187static 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);
1188static 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);
1189static rb_node_once_t *rb_node_once_new(struct parser_params *p, NODE *nd_body, const YYLTYPE *loc);
1190static rb_node_args_t *rb_node_args_new(struct parser_params *p, const YYLTYPE *loc);
1191static rb_node_args_aux_t *rb_node_args_aux_new(struct parser_params *p, ID nd_pid, int nd_plen, const YYLTYPE *loc);
1192static rb_node_opt_arg_t *rb_node_opt_arg_new(struct parser_params *p, NODE *nd_body, const YYLTYPE *loc);
1193static rb_node_kw_arg_t *rb_node_kw_arg_new(struct parser_params *p, NODE *nd_body, const YYLTYPE *loc);
1194static rb_node_postarg_t *rb_node_postarg_new(struct parser_params *p, NODE *nd_1st, NODE *nd_2nd, const YYLTYPE *loc);
1195static rb_node_argscat_t *rb_node_argscat_new(struct parser_params *p, NODE *nd_head, NODE *nd_body, const YYLTYPE *loc);
1196static rb_node_argspush_t *rb_node_argspush_new(struct parser_params *p, NODE *nd_head, NODE *nd_body, const YYLTYPE *loc);
1197static rb_node_splat_t *rb_node_splat_new(struct parser_params *p, NODE *nd_head, const YYLTYPE *loc, const YYLTYPE *operator_loc);
1198static rb_node_block_pass_t *rb_node_block_pass_new(struct parser_params *p, NODE *nd_body, const YYLTYPE *loc, const YYLTYPE *operator_loc);
1199static rb_node_defn_t *rb_node_defn_new(struct parser_params *p, ID nd_mid, NODE *nd_defn, const YYLTYPE *loc);
1200static rb_node_defs_t *rb_node_defs_new(struct parser_params *p, NODE *nd_recv, ID nd_mid, NODE *nd_defn, const YYLTYPE *loc);
1201static 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);
1202static 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);
1203static rb_node_undef_t *rb_node_undef_new(struct parser_params *p, NODE *nd_undef, const YYLTYPE *loc);
1204static rb_node_class_t *rb_node_class_new(struct parser_params *p, NODE *nd_cpath, NODE *nd_body, NODE *nd_super, const YYLTYPE *loc, const YYLTYPE *class_keyword_loc, const YYLTYPE *inheritance_operator_loc, const YYLTYPE *end_keyword_loc);
1205static rb_node_module_t *rb_node_module_new(struct parser_params *p, NODE *nd_cpath, NODE *nd_body, const YYLTYPE *loc);
1206static rb_node_sclass_t *rb_node_sclass_new(struct parser_params *p, NODE *nd_recv, NODE *nd_body, const YYLTYPE *loc);
1207static rb_node_colon2_t *rb_node_colon2_new(struct parser_params *p, NODE *nd_head, ID nd_mid, const YYLTYPE *loc, const YYLTYPE *delimiter_loc, const YYLTYPE *name_loc);
1208static rb_node_colon3_t *rb_node_colon3_new(struct parser_params *p, ID nd_mid, const YYLTYPE *loc, const YYLTYPE *delimiter_loc, const YYLTYPE *name_loc);
1209static 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);
1210static 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);
1211static rb_node_self_t *rb_node_self_new(struct parser_params *p, const YYLTYPE *loc);
1212static rb_node_nil_t *rb_node_nil_new(struct parser_params *p, const YYLTYPE *loc);
1213static rb_node_true_t *rb_node_true_new(struct parser_params *p, const YYLTYPE *loc);
1214static rb_node_false_t *rb_node_false_new(struct parser_params *p, const YYLTYPE *loc);
1215static rb_node_errinfo_t *rb_node_errinfo_new(struct parser_params *p, const YYLTYPE *loc);
1216static rb_node_defined_t *rb_node_defined_new(struct parser_params *p, NODE *nd_head, const YYLTYPE *loc, const YYLTYPE *keyword_loc);
1217static rb_node_postexe_t *rb_node_postexe_new(struct parser_params *p, NODE *nd_body, const YYLTYPE *loc, const YYLTYPE *keyword_loc, const YYLTYPE *opening_loc, const YYLTYPE *closing_loc);
1218static rb_node_sym_t *rb_node_sym_new(struct parser_params *p, VALUE str, const YYLTYPE *loc);
1219static 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);
1220static rb_node_attrasgn_t *rb_node_attrasgn_new(struct parser_params *p, NODE *nd_recv, ID nd_mid, NODE *nd_args, const YYLTYPE *loc);
1221static 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);
1222static rb_node_aryptn_t *rb_node_aryptn_new(struct parser_params *p, NODE *pre_args, NODE *rest_arg, NODE *post_args, const YYLTYPE *loc);
1223static rb_node_hshptn_t *rb_node_hshptn_new(struct parser_params *p, NODE *nd_pconst, NODE *nd_pkwargs, NODE *nd_pkwrestarg, const YYLTYPE *loc);
1224static 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);
1225static rb_node_line_t *rb_node_line_new(struct parser_params *p, const YYLTYPE *loc);
1226static rb_node_file_t *rb_node_file_new(struct parser_params *p, VALUE str, const YYLTYPE *loc);
1227static rb_node_error_t *rb_node_error_new(struct parser_params *p, const YYLTYPE *loc);
1228
1229#define NEW_SCOPE(a,b,loc) (NODE *)rb_node_scope_new(p,a,b,loc)
1230#define NEW_SCOPE2(t,a,b,loc) (NODE *)rb_node_scope_new2(p,t,a,b,loc)
1231#define NEW_BLOCK(a,loc) (NODE *)rb_node_block_new(p,a,loc)
1232#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)
1233#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)
1234#define NEW_CASE(h,b,loc,ck_loc,ek_loc) (NODE *)rb_node_case_new(p,h,b,loc,ck_loc,ek_loc)
1235#define NEW_CASE2(b,loc,ck_loc,ek_loc) (NODE *)rb_node_case2_new(p,b,loc,ck_loc,ek_loc)
1236#define NEW_CASE3(h,b,loc,ck_loc,ek_loc) (NODE *)rb_node_case3_new(p,h,b,loc,ck_loc,ek_loc)
1237#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)
1238#define NEW_IN(c,t,e,loc) (NODE *)rb_node_in_new(p,c,t,e,loc)
1239#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)
1240#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)
1241#define NEW_ITER(a,b,loc) (NODE *)rb_node_iter_new(p,a,b,loc)
1242#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)
1243#define NEW_FOR_MASGN(v,loc) (NODE *)rb_node_for_masgn_new(p,v,loc)
1244#define NEW_RETRY(loc) (NODE *)rb_node_retry_new(p,loc)
1245#define NEW_BEGIN(b,loc) (NODE *)rb_node_begin_new(p,b,loc)
1246#define NEW_RESCUE(b,res,e,loc) (NODE *)rb_node_rescue_new(p,b,res,e,loc)
1247#define NEW_RESBODY(a,v,ex,n,loc) (NODE *)rb_node_resbody_new(p,a,v,ex,n,loc)
1248#define NEW_ENSURE(b,en,loc) (NODE *)rb_node_ensure_new(p,b,en,loc)
1249#define NEW_AND(f,s,loc,op_loc) (NODE *)rb_node_and_new(p,f,s,loc,op_loc)
1250#define NEW_OR(f,s,loc,op_loc) (NODE *)rb_node_or_new(p,f,s,loc,op_loc)
1251#define NEW_MASGN(l,r,loc) rb_node_masgn_new(p,l,r,loc)
1252#define NEW_LASGN(v,val,loc) (NODE *)rb_node_lasgn_new(p,v,val,loc)
1253#define NEW_DASGN(v,val,loc) (NODE *)rb_node_dasgn_new(p,v,val,loc)
1254#define NEW_GASGN(v,val,loc) (NODE *)rb_node_gasgn_new(p,v,val,loc)
1255#define NEW_IASGN(v,val,loc) (NODE *)rb_node_iasgn_new(p,v,val,loc)
1256#define NEW_CDECL(v,val,path,share,loc) (NODE *)rb_node_cdecl_new(p,v,val,path,share,loc)
1257#define NEW_CVASGN(v,val,loc) (NODE *)rb_node_cvasgn_new(p,v,val,loc)
1258#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)
1259#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)
1260#define NEW_OP_ASGN_OR(i,val,loc) (NODE *)rb_node_op_asgn_or_new(p,i,val,loc)
1261#define NEW_OP_ASGN_AND(i,val,loc) (NODE *)rb_node_op_asgn_and_new(p,i,val,loc)
1262#define NEW_OP_CDECL(v,op,val,share,loc) (NODE *)rb_node_op_cdecl_new(p,v,val,op,share,loc)
1263#define NEW_CALL(r,m,a,loc) (NODE *)rb_node_call_new(p,r,m,a,loc)
1264#define NEW_OPCALL(r,m,a,loc) (NODE *)rb_node_opcall_new(p,r,m,a,loc)
1265#define NEW_FCALL(m,a,loc) rb_node_fcall_new(p,m,a,loc)
1266#define NEW_VCALL(m,loc) (NODE *)rb_node_vcall_new(p,m,loc)
1267#define NEW_QCALL0(r,m,a,loc) (NODE *)rb_node_qcall_new(p,r,m,a,loc)
1268#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)
1269#define NEW_ZSUPER(loc) (NODE *)rb_node_zsuper_new(p,loc)
1270#define NEW_LIST(a,loc) (NODE *)rb_node_list_new(p,a,loc)
1271#define NEW_LIST2(h,l,n,loc) (NODE *)rb_node_list_new2(p,h,l,n,loc)
1272#define NEW_ZLIST(loc) (NODE *)rb_node_zlist_new(p,loc)
1273#define NEW_HASH(a,loc) (NODE *)rb_node_hash_new(p,a,loc)
1274#define NEW_RETURN(s,loc,k_loc) (NODE *)rb_node_return_new(p,s,loc,k_loc)
1275#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)
1276#define NEW_LVAR(v,loc) (NODE *)rb_node_lvar_new(p,v,loc)
1277#define NEW_DVAR(v,loc) (NODE *)rb_node_dvar_new(p,v,loc)
1278#define NEW_GVAR(v,loc) (NODE *)rb_node_gvar_new(p,v,loc)
1279#define NEW_IVAR(v,loc) (NODE *)rb_node_ivar_new(p,v,loc)
1280#define NEW_CONST(v,loc) (NODE *)rb_node_const_new(p,v,loc)
1281#define NEW_CVAR(v,loc) (NODE *)rb_node_cvar_new(p,v,loc)
1282#define NEW_NTH_REF(n,loc) (NODE *)rb_node_nth_ref_new(p,n,loc)
1283#define NEW_BACK_REF(n,loc) (NODE *)rb_node_back_ref_new(p,n,loc)
1284#define NEW_MATCH2(n1,n2,loc) (NODE *)rb_node_match2_new(p,n1,n2,loc)
1285#define NEW_MATCH3(r,n2,loc) (NODE *)rb_node_match3_new(p,r,n2,loc)
1286#define NEW_INTEGER(val, base,loc) (NODE *)rb_node_integer_new(p,val,base,loc)
1287#define NEW_FLOAT(val,loc) (NODE *)rb_node_float_new(p,val,loc)
1288#define NEW_RATIONAL(val,base,seen_point,loc) (NODE *)rb_node_rational_new(p,val,base,seen_point,loc)
1289#define NEW_IMAGINARY(val,base,seen_point,numeric_type,loc) (NODE *)rb_node_imaginary_new(p,val,base,seen_point,numeric_type,loc)
1290#define NEW_STR(s,loc) (NODE *)rb_node_str_new(p,s,loc)
1291#define NEW_DSTR0(s,l,n,loc) (NODE *)rb_node_dstr_new0(p,s,l,n,loc)
1292#define NEW_DSTR(s,loc) (NODE *)rb_node_dstr_new(p,s,loc)
1293#define NEW_XSTR(s,loc) (NODE *)rb_node_xstr_new(p,s,loc)
1294#define NEW_DXSTR(s,l,n,loc) (NODE *)rb_node_dxstr_new(p,s,l,n,loc)
1295#define NEW_EVSTR(n,loc,o_loc,c_loc) (NODE *)rb_node_evstr_new(p,n,loc,o_loc,c_loc)
1296#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)
1297#define NEW_ONCE(b,loc) (NODE *)rb_node_once_new(p,b,loc)
1298#define NEW_ARGS(loc) rb_node_args_new(p,loc)
1299#define NEW_ARGS_AUX(r,b,loc) rb_node_args_aux_new(p,r,b,loc)
1300#define NEW_OPT_ARG(v,loc) rb_node_opt_arg_new(p,v,loc)
1301#define NEW_KW_ARG(v,loc) rb_node_kw_arg_new(p,v,loc)
1302#define NEW_POSTARG(i,v,loc) (NODE *)rb_node_postarg_new(p,i,v,loc)
1303#define NEW_ARGSCAT(a,b,loc) (NODE *)rb_node_argscat_new(p,a,b,loc)
1304#define NEW_ARGSPUSH(a,b,loc) (NODE *)rb_node_argspush_new(p,a,b,loc)
1305#define NEW_SPLAT(a,loc,op_loc) (NODE *)rb_node_splat_new(p,a,loc,op_loc)
1306#define NEW_BLOCK_PASS(b,loc,o_loc) rb_node_block_pass_new(p,b,loc,o_loc)
1307#define NEW_DEFN(i,s,loc) (NODE *)rb_node_defn_new(p,i,s,loc)
1308#define NEW_DEFS(r,i,s,loc) (NODE *)rb_node_defs_new(p,r,i,s,loc)
1309#define NEW_ALIAS(n,o,loc,k_loc) (NODE *)rb_node_alias_new(p,n,o,loc,k_loc)
1310#define NEW_VALIAS(n,o,loc,k_loc) (NODE *)rb_node_valias_new(p,n,o,loc,k_loc)
1311#define NEW_UNDEF(i,loc) (NODE *)rb_node_undef_new(p,i,loc)
1312#define NEW_CLASS(n,b,s,loc,ck_loc,io_loc,ek_loc) (NODE *)rb_node_class_new(p,n,b,s,loc,ck_loc,io_loc,ek_loc)
1313#define NEW_MODULE(n,b,loc) (NODE *)rb_node_module_new(p,n,b,loc)
1314#define NEW_SCLASS(r,b,loc) (NODE *)rb_node_sclass_new(p,r,b,loc)
1315#define NEW_COLON2(c,i,loc,d_loc,n_loc) (NODE *)rb_node_colon2_new(p,c,i,loc,d_loc,n_loc)
1316#define NEW_COLON3(i,loc,d_loc,n_loc) (NODE *)rb_node_colon3_new(p,i,loc,d_loc,n_loc)
1317#define NEW_DOT2(b,e,loc,op_loc) (NODE *)rb_node_dot2_new(p,b,e,loc,op_loc)
1318#define NEW_DOT3(b,e,loc,op_loc) (NODE *)rb_node_dot3_new(p,b,e,loc,op_loc)
1319#define NEW_SELF(loc) (NODE *)rb_node_self_new(p,loc)
1320#define NEW_NIL(loc) (NODE *)rb_node_nil_new(p,loc)
1321#define NEW_TRUE(loc) (NODE *)rb_node_true_new(p,loc)
1322#define NEW_FALSE(loc) (NODE *)rb_node_false_new(p,loc)
1323#define NEW_ERRINFO(loc) (NODE *)rb_node_errinfo_new(p,loc)
1324#define NEW_DEFINED(e,loc,k_loc) (NODE *)rb_node_defined_new(p,e,loc, k_loc)
1325#define NEW_POSTEXE(b,loc,k_loc,o_loc,c_loc) (NODE *)rb_node_postexe_new(p,b,loc,k_loc,o_loc,c_loc)
1326#define NEW_SYM(str,loc) (NODE *)rb_node_sym_new(p,str,loc)
1327#define NEW_DSYM(s,l,n,loc) (NODE *)rb_node_dsym_new(p,s,l,n,loc)
1328#define NEW_ATTRASGN(r,m,a,loc) (NODE *)rb_node_attrasgn_new(p,r,m,a,loc)
1329#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)
1330#define NEW_ARYPTN(pre,r,post,loc) (NODE *)rb_node_aryptn_new(p,pre,r,post,loc)
1331#define NEW_HSHPTN(c,kw,kwrest,loc) (NODE *)rb_node_hshptn_new(p,c,kw,kwrest,loc)
1332#define NEW_FNDPTN(pre,a,post,loc) (NODE *)rb_node_fndptn_new(p,pre,a,post,loc)
1333#define NEW_LINE(loc) (NODE *)rb_node_line_new(p,loc)
1334#define NEW_FILE(str,loc) (NODE *)rb_node_file_new(p,str,loc)
1335#define NEW_ENCODING(loc) (NODE *)rb_node_encoding_new(p,loc)
1336#define NEW_ERROR(loc) (NODE *)rb_node_error_new(p,loc)
1337
1338enum internal_node_type {
1339 NODE_INTERNAL_ONLY = NODE_LAST,
1340 NODE_DEF_TEMP,
1341 NODE_EXITS,
1342 NODE_INTERNAL_LAST
1343};
1344
1345static const char *
1346parser_node_name(int node)
1347{
1348 switch (node) {
1349 case NODE_DEF_TEMP:
1350 return "NODE_DEF_TEMP";
1351 case NODE_EXITS:
1352 return "NODE_EXITS";
1353 default:
1354 return ruby_node_name(node);
1355 }
1356}
1357
1358/* This node is parse.y internal */
1359struct RNode_DEF_TEMP {
1360 NODE node;
1361
1362 /* for NODE_DEFN/NODE_DEFS */
1363
1364 struct RNode *nd_def;
1365 ID nd_mid;
1366
1367 struct {
1368 int max_numparam;
1369 NODE *numparam_save;
1370 struct lex_context ctxt;
1371 } save;
1372};
1373
1374#define RNODE_DEF_TEMP(node) ((struct RNode_DEF_TEMP *)(node))
1375
1376static rb_node_break_t *rb_node_break_new(struct parser_params *p, NODE *nd_stts, const YYLTYPE *loc, const YYLTYPE *keyword_loc);
1377static rb_node_next_t *rb_node_next_new(struct parser_params *p, NODE *nd_stts, const YYLTYPE *loc, const YYLTYPE *keyword_loc);
1378static rb_node_redo_t *rb_node_redo_new(struct parser_params *p, const YYLTYPE *loc, const YYLTYPE *keyword_loc);
1379static rb_node_def_temp_t *rb_node_def_temp_new(struct parser_params *p, const YYLTYPE *loc);
1380static rb_node_def_temp_t *def_head_save(struct parser_params *p, rb_node_def_temp_t *n);
1381
1382#define NEW_BREAK(s,loc,k_loc) (NODE *)rb_node_break_new(p,s,loc,k_loc)
1383#define NEW_NEXT(s,loc,k_loc) (NODE *)rb_node_next_new(p,s,loc,k_loc)
1384#define NEW_REDO(loc,k_loc) (NODE *)rb_node_redo_new(p,loc,k_loc)
1385#define NEW_DEF_TEMP(loc) rb_node_def_temp_new(p,loc)
1386
1387/* Make a new internal node, which should not be appeared in the
1388 * result AST and does not have node_id and location. */
1389static NODE* node_new_internal(struct parser_params *p, enum node_type type, size_t size, size_t alignment);
1390#define NODE_NEW_INTERNAL(ndtype, type) (type *)node_new_internal(p, (enum node_type)(ndtype), sizeof(type), RUBY_ALIGNOF(type))
1391
1392static NODE *nd_set_loc(NODE *nd, const YYLTYPE *loc);
1393
1394static int
1395parser_get_node_id(struct parser_params *p)
1396{
1397 int node_id = p->node_id;
1398 p->node_id++;
1399 return node_id;
1400}
1401
1402static void
1403anddot_multiple_assignment_check(struct parser_params* p, const YYLTYPE *loc, ID id)
1404{
1405 if (id == tANDDOT) {
1406 yyerror1(loc, "&. inside multiple assignment destination");
1407 }
1408}
1409
1410static inline void
1411set_line_body(NODE *body, int line)
1412{
1413 if (!body) return;
1414 switch (nd_type(body)) {
1415 case NODE_RESCUE:
1416 case NODE_ENSURE:
1417 nd_set_line(body, line);
1418 }
1419}
1420
1421static void
1422set_embraced_location(NODE *node, const rb_code_location_t *beg, const rb_code_location_t *end)
1423{
1424 RNODE_ITER(node)->nd_body->nd_loc = code_loc_gen(beg, end);
1425 nd_set_line(node, beg->end_pos.lineno);
1426}
1427
1428static NODE *
1429last_expr_node(NODE *expr)
1430{
1431 while (expr) {
1432 if (nd_type_p(expr, NODE_BLOCK)) {
1433 expr = RNODE_BLOCK(RNODE_BLOCK(expr)->nd_end)->nd_head;
1434 }
1435 else if (nd_type_p(expr, NODE_BEGIN) && RNODE_BEGIN(expr)->nd_body) {
1436 expr = RNODE_BEGIN(expr)->nd_body;
1437 }
1438 else {
1439 break;
1440 }
1441 }
1442 return expr;
1443}
1444
1445#ifndef RIPPER
1446#define yyparse ruby_yyparse
1447#endif
1448
1449static NODE* cond(struct parser_params *p, NODE *node, const YYLTYPE *loc);
1450static NODE* method_cond(struct parser_params *p, NODE *node, const YYLTYPE *loc);
1451#define new_nil(loc) NEW_NIL(loc)
1452static NODE *new_nil_at(struct parser_params *p, const rb_code_position_t *pos);
1453static NODE *new_if(struct parser_params*,NODE*,NODE*,NODE*,const YYLTYPE*,const YYLTYPE*,const YYLTYPE*,const YYLTYPE*);
1454static NODE *new_unless(struct parser_params*,NODE*,NODE*,NODE*,const YYLTYPE*,const YYLTYPE*,const YYLTYPE*,const YYLTYPE*);
1455static NODE *logop(struct parser_params*,ID,NODE*,NODE*,const YYLTYPE*,const YYLTYPE*);
1456
1457static NODE *newline_node(NODE*);
1458static void fixpos(NODE*,NODE*);
1459
1460static int value_expr_gen(struct parser_params*,NODE*);
1461static void void_expr(struct parser_params*,NODE*);
1462static NODE *remove_begin(NODE*);
1463#define value_expr(node) value_expr_gen(p, (node))
1464static NODE *void_stmts(struct parser_params*,NODE*);
1465static void reduce_nodes(struct parser_params*,NODE**);
1466static void block_dup_check(struct parser_params*,NODE*,NODE*);
1467
1468static NODE *block_append(struct parser_params*,NODE*,NODE*);
1469static NODE *list_append(struct parser_params*,NODE*,NODE*);
1470static NODE *list_concat(NODE*,NODE*);
1471static NODE *arg_append(struct parser_params*,NODE*,NODE*,const YYLTYPE*);
1472static NODE *last_arg_append(struct parser_params *p, NODE *args, NODE *last_arg, const YYLTYPE *loc);
1473static NODE *rest_arg_append(struct parser_params *p, NODE *args, NODE *rest_arg, const YYLTYPE *loc);
1474static NODE *literal_concat(struct parser_params*,NODE*,NODE*,const YYLTYPE*);
1475static NODE *new_evstr(struct parser_params*,NODE*,const YYLTYPE*,const YYLTYPE*,const YYLTYPE*);
1476static NODE *new_dstr(struct parser_params*,NODE*,const YYLTYPE*);
1477static NODE *str2dstr(struct parser_params*,NODE*);
1478static NODE *evstr2dstr(struct parser_params*,NODE*);
1479static NODE *splat_array(NODE*);
1480static void mark_lvar_used(struct parser_params *p, NODE *rhs);
1481
1482static NODE *call_bin_op(struct parser_params*,NODE*,ID,NODE*,const YYLTYPE*,const YYLTYPE*);
1483static NODE *call_uni_op(struct parser_params*,NODE*,ID,const YYLTYPE*,const YYLTYPE*);
1484static NODE *new_qcall(struct parser_params* p, ID atype, NODE *recv, ID mid, NODE *args, const YYLTYPE *op_loc, const YYLTYPE *loc);
1485static NODE *new_command_qcall(struct parser_params* p, ID atype, NODE *recv, ID mid, NODE *args, NODE *block, const YYLTYPE *op_loc, const YYLTYPE *loc);
1486static NODE *method_add_block(struct parser_params*p, NODE *m, NODE *b, const YYLTYPE *loc) {RNODE_ITER(b)->nd_iter = m; b->nd_loc = *loc; return b;}
1487
1488static bool args_info_empty_p(struct rb_args_info *args);
1489static rb_node_args_t *new_args(struct parser_params*,rb_node_args_aux_t*,rb_node_opt_arg_t*,ID,rb_node_args_aux_t*,rb_node_args_t*,const YYLTYPE*);
1490static rb_node_args_t *new_args_tail(struct parser_params*,rb_node_kw_arg_t*,ID,ID,const YYLTYPE*);
1491static NODE *new_array_pattern(struct parser_params *p, NODE *constant, NODE *pre_arg, NODE *aryptn, const YYLTYPE *loc);
1492static NODE *new_array_pattern_tail(struct parser_params *p, NODE *pre_args, int has_rest, NODE *rest_arg, NODE *post_args, const YYLTYPE *loc);
1493static NODE *new_find_pattern(struct parser_params *p, NODE *constant, NODE *fndptn, const YYLTYPE *loc);
1494static NODE *new_find_pattern_tail(struct parser_params *p, NODE *pre_rest_arg, NODE *args, NODE *post_rest_arg, const YYLTYPE *loc);
1495static NODE *new_hash_pattern(struct parser_params *p, NODE *constant, NODE *hshptn, const YYLTYPE *loc);
1496static NODE *new_hash_pattern_tail(struct parser_params *p, NODE *kw_args, ID kw_rest_arg, const YYLTYPE *loc);
1497
1498static rb_node_kw_arg_t *new_kw_arg(struct parser_params *p, NODE *k, const YYLTYPE *loc);
1499static rb_node_args_t *args_with_numbered(struct parser_params*,rb_node_args_t*,int,ID);
1500
1501static NODE* negate_lit(struct parser_params*, NODE*);
1502static void no_blockarg(struct parser_params*,NODE*);
1503static NODE *ret_args(struct parser_params*,NODE*);
1504static NODE *arg_blk_pass(NODE*,rb_node_block_pass_t*);
1505static NODE *dsym_node(struct parser_params*,NODE*,const YYLTYPE*);
1506
1507static NODE *gettable(struct parser_params*,ID,const YYLTYPE*);
1508static NODE *assignable(struct parser_params*,ID,NODE*,const YYLTYPE*);
1509
1510static NODE *aryset(struct parser_params*,NODE*,NODE*,const YYLTYPE*);
1511static NODE *attrset(struct parser_params*,NODE*,ID,ID,const YYLTYPE*);
1512
1513static VALUE rb_backref_error(struct parser_params*,NODE*);
1514static NODE *node_assign(struct parser_params*,NODE*,NODE*,struct lex_context,const YYLTYPE*);
1515
1516static NODE *new_op_assign(struct parser_params *p, NODE *lhs, ID op, NODE *rhs, struct lex_context, const YYLTYPE *loc);
1517static NODE *new_ary_op_assign(struct parser_params *p, NODE *ary, NODE *args, ID op, NODE *rhs, const YYLTYPE *args_loc, const YYLTYPE *loc, const YYLTYPE *call_operator_loc, const YYLTYPE *opening_loc, const YYLTYPE *closing_loc, const YYLTYPE *binary_operator_loc);
1518static NODE *new_attr_op_assign(struct parser_params *p, NODE *lhs, ID atype, ID attr, ID op, NODE *rhs, const YYLTYPE *loc, const YYLTYPE *call_operator_loc, const YYLTYPE *message_loc, const YYLTYPE *binary_operator_loc);
1519static NODE *new_const_op_assign(struct parser_params *p, NODE *lhs, ID op, NODE *rhs, struct lex_context, const YYLTYPE *loc);
1520static NODE *new_bodystmt(struct parser_params *p, NODE *head, NODE *rescue, NODE *rescue_else, NODE *ensure, const YYLTYPE *loc);
1521
1522static NODE *const_decl(struct parser_params *p, NODE* path, const YYLTYPE *loc);
1523
1524static rb_node_opt_arg_t *opt_arg_append(rb_node_opt_arg_t*, rb_node_opt_arg_t*);
1525static rb_node_kw_arg_t *kwd_append(rb_node_kw_arg_t*, rb_node_kw_arg_t*);
1526
1527static NODE *new_hash(struct parser_params *p, NODE *hash, const YYLTYPE *loc);
1528static NODE *new_unique_key_hash(struct parser_params *p, NODE *hash, const YYLTYPE *loc);
1529
1530static NODE *new_defined(struct parser_params *p, NODE *expr, const YYLTYPE *loc, const YYLTYPE *keyword_loc);
1531
1532static NODE *new_regexp(struct parser_params *, NODE *, int, const YYLTYPE *, const YYLTYPE *, const YYLTYPE *, const YYLTYPE *);
1533
1534#define make_list(list, loc) ((list) ? (nd_set_loc(list, loc), list) : NEW_ZLIST(loc))
1535
1536static NODE *new_xstring(struct parser_params *, NODE *, const YYLTYPE *loc);
1537
1538static NODE *symbol_append(struct parser_params *p, NODE *symbols, NODE *symbol);
1539
1540static NODE *match_op(struct parser_params*,NODE*,NODE*,const YYLTYPE*,const YYLTYPE*);
1541
1542static rb_ast_id_table_t *local_tbl(struct parser_params*);
1543
1544static VALUE reg_compile(struct parser_params*, rb_parser_string_t*, int);
1545static void reg_fragment_setenc(struct parser_params*, rb_parser_string_t*, int);
1546
1547static int literal_concat0(struct parser_params *p, rb_parser_string_t *head, rb_parser_string_t *tail);
1548static NODE *heredoc_dedent(struct parser_params*,NODE*);
1549
1550static void check_literal_when(struct parser_params *p, NODE *args, const YYLTYPE *loc);
1551
1552static rb_locations_lambda_body_t* new_locations_lambda_body(struct parser_params *p, NODE *node, const YYLTYPE *loc, const YYLTYPE *opening_loc, const YYLTYPE *closing_loc);
1553
1554#ifdef RIPPER
1555#define get_value(idx) (rb_ary_entry(p->s_value_stack, idx))
1556#define set_value(val) (p->s_lvalue = val)
1557static VALUE assign_error(struct parser_params *p, const char *mesg, VALUE a);
1558static int id_is_var(struct parser_params *p, ID id);
1559#endif
1560
1561RUBY_SYMBOL_EXPORT_BEGIN
1562VALUE rb_parser_reg_compile(struct parser_params* p, VALUE str, int options);
1563int rb_reg_fragment_setenc(struct parser_params*, rb_parser_string_t *, int);
1564enum lex_state_e rb_parser_trace_lex_state(struct parser_params *, enum lex_state_e, enum lex_state_e, int);
1565VALUE rb_parser_lex_state_name(struct parser_params *p, enum lex_state_e state);
1566void rb_parser_show_bitstack(struct parser_params *, stack_type, const char *, int);
1567PRINTF_ARGS(void rb_parser_fatal(struct parser_params *p, const char *fmt, ...), 2, 3);
1568YYLTYPE *rb_parser_set_location_from_strterm_heredoc(struct parser_params *p, rb_strterm_heredoc_t *here, YYLTYPE *yylloc);
1569YYLTYPE *rb_parser_set_location_of_delayed_token(struct parser_params *p, YYLTYPE *yylloc);
1570YYLTYPE *rb_parser_set_location_of_heredoc_end(struct parser_params *p, YYLTYPE *yylloc);
1571YYLTYPE *rb_parser_set_location_of_dummy_end(struct parser_params *p, YYLTYPE *yylloc);
1572YYLTYPE *rb_parser_set_location_of_none(struct parser_params *p, YYLTYPE *yylloc);
1573YYLTYPE *rb_parser_set_location(struct parser_params *p, YYLTYPE *yylloc);
1574void ruby_show_error_line(struct parser_params *p, VALUE errbuf, const YYLTYPE *yylloc, int lineno, rb_parser_string_t *str);
1575RUBY_SYMBOL_EXPORT_END
1576
1577static void flush_string_content(struct parser_params *p, rb_encoding *enc, size_t back);
1578static void error_duplicate_pattern_variable(struct parser_params *p, ID id, const YYLTYPE *loc);
1579static void error_duplicate_pattern_key(struct parser_params *p, ID id, const YYLTYPE *loc);
1580static VALUE formal_argument_error(struct parser_params*, ID);
1581static ID shadowing_lvar(struct parser_params*,ID);
1582static void new_bv(struct parser_params*,ID);
1583
1584static void local_push(struct parser_params*,int);
1585static void local_pop(struct parser_params*);
1586static void local_var(struct parser_params*, ID);
1587static void arg_var(struct parser_params*, ID);
1588static int local_id(struct parser_params *p, ID id);
1589static int local_id_ref(struct parser_params*, ID, ID **);
1590#define internal_id rb_parser_internal_id
1591ID internal_id(struct parser_params*);
1592static NODE *new_args_forward_call(struct parser_params*, NODE*, const YYLTYPE*, const YYLTYPE*);
1593static int check_forwarding_args(struct parser_params*);
1594static void add_forwarding_args(struct parser_params *p);
1595static void forwarding_arg_check(struct parser_params *p, ID arg, ID all, const char *var);
1596
1597static const struct vtable *dyna_push(struct parser_params *);
1598static void dyna_pop(struct parser_params*, const struct vtable *);
1599static int dyna_in_block(struct parser_params*);
1600#define dyna_var(p, id) local_var(p, id)
1601static int dvar_defined(struct parser_params*, ID);
1602#define dvar_defined_ref rb_parser_dvar_defined_ref
1603int dvar_defined_ref(struct parser_params*, ID, ID**);
1604static int dvar_curr(struct parser_params*,ID);
1605
1606static int lvar_defined(struct parser_params*, ID);
1607
1608static NODE *numparam_push(struct parser_params *p);
1609static void numparam_pop(struct parser_params *p, NODE *prev_inner);
1610
1611#define METHOD_NOT '!'
1612
1613#define idFWD_REST '*'
1614#define idFWD_KWREST idPow /* Use simple "**", as tDSTAR is "**arg" */
1615#define idFWD_BLOCK '&'
1616#define idFWD_ALL idDot3
1617#define arg_FWD_BLOCK idFWD_BLOCK
1618
1619#define RE_ONIG_OPTION_IGNORECASE 1
1620#define RE_ONIG_OPTION_EXTEND (RE_ONIG_OPTION_IGNORECASE<<1)
1621#define RE_ONIG_OPTION_MULTILINE (RE_ONIG_OPTION_EXTEND<<1)
1622#define RE_OPTION_ONCE (1<<16)
1623#define RE_OPTION_ENCODING_SHIFT 8
1624#define RE_OPTION_ENCODING(e) (((e)&0xff)<<RE_OPTION_ENCODING_SHIFT)
1625#define RE_OPTION_ENCODING_IDX(o) (((o)>>RE_OPTION_ENCODING_SHIFT)&0xff)
1626#define RE_OPTION_ENCODING_NONE(o) ((o)&RE_OPTION_ARG_ENCODING_NONE)
1627#define RE_OPTION_MASK 0xff
1628#define RE_OPTION_ARG_ENCODING_NONE 32
1629
1630#define CHECK_LITERAL_WHEN (st_table *)1
1631#define CASE_LABELS_ENABLED_P(case_labels) (case_labels && case_labels != CHECK_LITERAL_WHEN)
1632
1633#define yytnamerr(yyres, yystr) (YYSIZE_T)rb_yytnamerr(p, yyres, yystr)
1634RUBY_FUNC_EXPORTED size_t rb_yytnamerr(struct parser_params *p, char *yyres, const char *yystr);
1635
1636#define TOKEN2ID(tok) ( \
1637 tTOKEN_LOCAL_BEGIN<(tok)&&(tok)<tTOKEN_LOCAL_END ? TOKEN2LOCALID(tok) : \
1638 tTOKEN_INSTANCE_BEGIN<(tok)&&(tok)<tTOKEN_INSTANCE_END ? TOKEN2INSTANCEID(tok) : \
1639 tTOKEN_GLOBAL_BEGIN<(tok)&&(tok)<tTOKEN_GLOBAL_END ? TOKEN2GLOBALID(tok) : \
1640 tTOKEN_CONST_BEGIN<(tok)&&(tok)<tTOKEN_CONST_END ? TOKEN2CONSTID(tok) : \
1641 tTOKEN_CLASS_BEGIN<(tok)&&(tok)<tTOKEN_CLASS_END ? TOKEN2CLASSID(tok) : \
1642 tTOKEN_ATTRSET_BEGIN<(tok)&&(tok)<tTOKEN_ATTRSET_END ? TOKEN2ATTRSETID(tok) : \
1643 ((tok) / ((tok)<tPRESERVED_ID_END && ((tok)>=128 || rb_ispunct(tok)))))
1644
1645/****** Ripper *******/
1646
1647#ifdef RIPPER
1648
1649#include "eventids1.h"
1650#include "eventids2.h"
1651
1652extern const struct ripper_parser_ids ripper_parser_ids;
1653
1654static VALUE ripper_dispatch0(struct parser_params*,ID);
1655static VALUE ripper_dispatch1(struct parser_params*,ID,VALUE);
1656static VALUE ripper_dispatch2(struct parser_params*,ID,VALUE,VALUE);
1657static VALUE ripper_dispatch3(struct parser_params*,ID,VALUE,VALUE,VALUE);
1658static VALUE ripper_dispatch4(struct parser_params*,ID,VALUE,VALUE,VALUE,VALUE);
1659static VALUE ripper_dispatch5(struct parser_params*,ID,VALUE,VALUE,VALUE,VALUE,VALUE);
1660static VALUE ripper_dispatch7(struct parser_params*,ID,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE);
1661void ripper_error(struct parser_params *p);
1662
1663#define dispatch0(n) ripper_dispatch0(p, RIPPER_ID(n))
1664#define dispatch1(n,a) ripper_dispatch1(p, RIPPER_ID(n), (a))
1665#define dispatch2(n,a,b) ripper_dispatch2(p, RIPPER_ID(n), (a), (b))
1666#define dispatch3(n,a,b,c) ripper_dispatch3(p, RIPPER_ID(n), (a), (b), (c))
1667#define dispatch4(n,a,b,c,d) ripper_dispatch4(p, RIPPER_ID(n), (a), (b), (c), (d))
1668#define dispatch5(n,a,b,c,d,e) ripper_dispatch5(p, RIPPER_ID(n), (a), (b), (c), (d), (e))
1669#define dispatch7(n,a,b,c,d,e,f,g) ripper_dispatch7(p, RIPPER_ID(n), (a), (b), (c), (d), (e), (f), (g))
1670
1671#define yyparse ripper_yyparse
1672
1673static VALUE
1674aryptn_pre_args(struct parser_params *p, VALUE pre_arg, VALUE pre_args)
1675{
1676 if (!NIL_P(pre_arg)) {
1677 if (!NIL_P(pre_args)) {
1678 rb_ary_unshift(pre_args, pre_arg);
1679 }
1680 else {
1681 pre_args = rb_ary_new_from_args(1, pre_arg);
1682 }
1683 }
1684 return pre_args;
1685}
1686
1687#define ID2VAL(id) STATIC_ID2SYM(id)
1688#define TOKEN2VAL(t) ID2VAL(TOKEN2ID(t))
1689#endif /* RIPPER */
1690
1691#define KWD2EID(t, v) keyword_##t
1692
1693static NODE *
1694new_scope_body(struct parser_params *p, rb_node_args_t *args, NODE *body, const YYLTYPE *loc)
1695{
1696 body = remove_begin(body);
1697 reduce_nodes(p, &body);
1698 NODE *n = NEW_SCOPE(args, body, loc);
1699 nd_set_line(n, loc->end_pos.lineno);
1700 set_line_body(body, loc->beg_pos.lineno);
1701 return n;
1702}
1703
1704static NODE *
1705rescued_expr(struct parser_params *p, NODE *arg, NODE *rescue,
1706 const YYLTYPE *arg_loc, const YYLTYPE *mod_loc, const YYLTYPE *res_loc)
1707{
1708 YYLTYPE loc = code_loc_gen(mod_loc, res_loc);
1709 rescue = NEW_RESBODY(0, 0, remove_begin(rescue), 0, &loc);
1710 loc.beg_pos = arg_loc->beg_pos;
1711 return NEW_RESCUE(arg, rescue, 0, &loc);
1712}
1713
1714static NODE *add_block_exit(struct parser_params *p, NODE *node);
1715static rb_node_exits_t *init_block_exit(struct parser_params *p);
1716static rb_node_exits_t *allow_block_exit(struct parser_params *p);
1717static void restore_block_exit(struct parser_params *p, rb_node_exits_t *exits);
1718static void clear_block_exit(struct parser_params *p, bool error);
1719
1720static void
1721next_rescue_context(struct lex_context *next, const struct lex_context *outer, enum rescue_context def)
1722{
1723 next->in_rescue = outer->in_rescue == after_rescue ? after_rescue : def;
1724}
1725
1726static void
1727restore_defun(struct parser_params *p, rb_node_def_temp_t *temp)
1728{
1729 /* See: def_name action */
1730 struct lex_context ctxt = temp->save.ctxt;
1731 p->ctxt.in_def = ctxt.in_def;
1732 p->ctxt.shareable_constant_value = ctxt.shareable_constant_value;
1733 p->ctxt.in_rescue = ctxt.in_rescue;
1734 p->max_numparam = temp->save.max_numparam;
1735 numparam_pop(p, temp->save.numparam_save);
1736 clear_block_exit(p, true);
1737}
1738
1739static void
1740endless_method_name(struct parser_params *p, ID mid, const YYLTYPE *loc)
1741{
1742 if (is_attrset_id(mid)) {
1743 yyerror1(loc, "setter method cannot be defined in an endless method definition");
1744 }
1745 token_info_drop(p, "def", loc->beg_pos);
1746}
1747
1748#define debug_token_line(p, name, line) do { \
1749 if (p->debug) { \
1750 const char *const pcur = p->lex.pcur; \
1751 const char *const ptok = p->lex.ptok; \
1752 rb_parser_printf(p, name ":%d (%d: %"PRIdPTRDIFF"|%"PRIdPTRDIFF"|%"PRIdPTRDIFF")\n", \
1753 line, p->ruby_sourceline, \
1754 ptok - p->lex.pbeg, pcur - ptok, p->lex.pend - pcur); \
1755 } \
1756 } while (0)
1757
1758#define begin_definition(k, loc_beg, loc_end) \
1759 do { \
1760 if (!(p->ctxt.in_class = (k)[0] != 0)) { \
1761 /* singleton class */ \
1762 p->ctxt.cant_return = !p->ctxt.in_def; \
1763 p->ctxt.in_def = 0; \
1764 } \
1765 else if (p->ctxt.in_def) { \
1766 YYLTYPE loc = code_loc_gen(loc_beg, loc_end); \
1767 yyerror1(&loc, k " definition in method body"); \
1768 } \
1769 else { \
1770 p->ctxt.cant_return = 1; \
1771 } \
1772 local_push(p, 0); \
1773 } while (0)
1774
1775#ifndef RIPPER
1776# define ifndef_ripper(x) (x)
1777# define ifdef_ripper(r,x) (x)
1778#else
1779# define ifndef_ripper(x)
1780# define ifdef_ripper(r,x) (r)
1781#endif
1782
1783# define rb_warn0(fmt) WARN_CALL(WARN_ARGS(fmt, 1))
1784# define rb_warn1(fmt,a) WARN_CALL(WARN_ARGS(fmt, 2), (a))
1785# define rb_warn2(fmt,a,b) WARN_CALL(WARN_ARGS(fmt, 3), (a), (b))
1786# define rb_warn3(fmt,a,b,c) WARN_CALL(WARN_ARGS(fmt, 4), (a), (b), (c))
1787# define rb_warn4(fmt,a,b,c,d) WARN_CALL(WARN_ARGS(fmt, 5), (a), (b), (c), (d))
1788# define rb_warning0(fmt) WARNING_CALL(WARNING_ARGS(fmt, 1))
1789# define rb_warning1(fmt,a) WARNING_CALL(WARNING_ARGS(fmt, 2), (a))
1790# define rb_warning2(fmt,a,b) WARNING_CALL(WARNING_ARGS(fmt, 3), (a), (b))
1791# define rb_warning3(fmt,a,b,c) WARNING_CALL(WARNING_ARGS(fmt, 4), (a), (b), (c))
1792# define rb_warning4(fmt,a,b,c,d) WARNING_CALL(WARNING_ARGS(fmt, 5), (a), (b), (c), (d))
1793# define rb_warn0L(l,fmt) WARN_CALL(WARN_ARGS_L(l, fmt, 1))
1794# define rb_warn1L(l,fmt,a) WARN_CALL(WARN_ARGS_L(l, fmt, 2), (a))
1795# define rb_warn2L(l,fmt,a,b) WARN_CALL(WARN_ARGS_L(l, fmt, 3), (a), (b))
1796# define rb_warn3L(l,fmt,a,b,c) WARN_CALL(WARN_ARGS_L(l, fmt, 4), (a), (b), (c))
1797# define rb_warn4L(l,fmt,a,b,c,d) WARN_CALL(WARN_ARGS_L(l, fmt, 5), (a), (b), (c), (d))
1798# define rb_warning0L(l,fmt) WARNING_CALL(WARNING_ARGS_L(l, fmt, 1))
1799# define rb_warning1L(l,fmt,a) WARNING_CALL(WARNING_ARGS_L(l, fmt, 2), (a))
1800# define rb_warning2L(l,fmt,a,b) WARNING_CALL(WARNING_ARGS_L(l, fmt, 3), (a), (b))
1801# define rb_warning3L(l,fmt,a,b,c) WARNING_CALL(WARNING_ARGS_L(l, fmt, 4), (a), (b), (c))
1802# define rb_warning4L(l,fmt,a,b,c,d) WARNING_CALL(WARNING_ARGS_L(l, fmt, 5), (a), (b), (c), (d))
1803#ifdef RIPPER
1804extern const ID id_warn, id_warning, id_gets, id_assoc;
1805# define ERR_MESG() STR_NEW2(mesg) /* to bypass Ripper DSL */
1806# define WARN_S_L(s,l) STR_NEW(s,l)
1807# define WARN_S(s) STR_NEW2(s)
1808# define WARN_I(i) INT2NUM(i)
1809# define WARN_ID(i) rb_id2str(i)
1810# define PRIsWARN PRIsVALUE
1811# define WARN_ARGS(fmt,n) p->value, id_warn, n, rb_usascii_str_new_lit(fmt)
1812# define WARN_ARGS_L(l,fmt,n) WARN_ARGS(fmt,n)
1813# ifdef HAVE_VA_ARGS_MACRO
1814# define WARN_CALL(...) rb_funcall(__VA_ARGS__)
1815# else
1816# define WARN_CALL rb_funcall
1817# endif
1818# define WARNING_ARGS(fmt,n) p->value, id_warning, n, rb_usascii_str_new_lit(fmt)
1819# define WARNING_ARGS_L(l, fmt,n) WARNING_ARGS(fmt,n)
1820# ifdef HAVE_VA_ARGS_MACRO
1821# define WARNING_CALL(...) rb_funcall(__VA_ARGS__)
1822# else
1823# define WARNING_CALL rb_funcall
1824# endif
1825# define compile_error ripper_compile_error
1826#else
1827# define WARN_S_L(s,l) s
1828# define WARN_S(s) s
1829# define WARN_I(i) i
1830# define WARN_ID(i) rb_id2name(i)
1831# define PRIsWARN PRIsVALUE
1832# define WARN_ARGS(fmt,n) WARN_ARGS_L(p->ruby_sourceline,fmt,n)
1833# define WARN_ARGS_L(l,fmt,n) p->ruby_sourcefile, (l), (fmt)
1834# define WARN_CALL rb_compile_warn
1835# define WARNING_ARGS(fmt,n) WARN_ARGS(fmt,n)
1836# define WARNING_ARGS_L(l,fmt,n) WARN_ARGS_L(l,fmt,n)
1837# define WARNING_CALL rb_compile_warning
1838PRINTF_ARGS(static void parser_compile_error(struct parser_params*, const rb_code_location_t *loc, const char *fmt, ...), 3, 4);
1839# define compile_error(p, ...) parser_compile_error(p, NULL, __VA_ARGS__)
1840#endif
1841
1842#define RNODE_EXITS(node) ((rb_node_exits_t*)(node))
1843
1844static NODE *
1845add_block_exit(struct parser_params *p, NODE *node)
1846{
1847 if (!node) {
1848 compile_error(p, "unexpected null node");
1849 return 0;
1850 }
1851 switch (nd_type(node)) {
1852 case NODE_BREAK: case NODE_NEXT: case NODE_REDO: break;
1853 default:
1854 compile_error(p, "add_block_exit: unexpected node: %s", parser_node_name(nd_type(node)));
1855 return node;
1856 }
1857 if (!p->ctxt.in_defined) {
1858 rb_node_exits_t *exits = p->exits;
1859 if (exits) {
1860 RNODE_EXITS(exits->nd_stts)->nd_chain = node;
1861 exits->nd_stts = node;
1862 }
1863 }
1864 return node;
1865}
1866
1867static rb_node_exits_t *
1868init_block_exit(struct parser_params *p)
1869{
1870 rb_node_exits_t *old = p->exits;
1871 rb_node_exits_t *exits = NODE_NEW_INTERNAL(NODE_EXITS, rb_node_exits_t);
1872 exits->nd_chain = 0;
1873 exits->nd_stts = RNODE(exits);
1874 p->exits = exits;
1875 return old;
1876}
1877
1878static rb_node_exits_t *
1879allow_block_exit(struct parser_params *p)
1880{
1881 rb_node_exits_t *exits = p->exits;
1882 p->exits = 0;
1883 return exits;
1884}
1885
1886static void
1887restore_block_exit(struct parser_params *p, rb_node_exits_t *exits)
1888{
1889 p->exits = exits;
1890}
1891
1892static void
1893clear_block_exit(struct parser_params *p, bool error)
1894{
1895 rb_node_exits_t *exits = p->exits;
1896 if (!exits) return;
1897 if (error) {
1898 for (NODE *e = RNODE(exits); (e = RNODE_EXITS(e)->nd_chain) != 0; ) {
1899 switch (nd_type(e)) {
1900 case NODE_BREAK:
1901 yyerror1(&e->nd_loc, "Invalid break");
1902 break;
1903 case NODE_NEXT:
1904 yyerror1(&e->nd_loc, "Invalid next");
1905 break;
1906 case NODE_REDO:
1907 yyerror1(&e->nd_loc, "Invalid redo");
1908 break;
1909 default:
1910 yyerror1(&e->nd_loc, "unexpected node");
1911 goto end_checks; /* no nd_chain */
1912 }
1913 }
1914 end_checks:;
1915 }
1916 exits->nd_stts = RNODE(exits);
1917 exits->nd_chain = 0;
1918}
1919
1920#define WARN_EOL(tok) \
1921 (looking_at_eol_p(p) ? \
1922 (void)rb_warning0("'" tok "' at the end of line without an expression") : \
1923 (void)0)
1924static int looking_at_eol_p(struct parser_params *p);
1925
1926static NODE *
1927get_nd_value(struct parser_params *p, NODE *node)
1928{
1929 switch (nd_type(node)) {
1930 case NODE_GASGN:
1931 return RNODE_GASGN(node)->nd_value;
1932 case NODE_IASGN:
1933 return RNODE_IASGN(node)->nd_value;
1934 case NODE_LASGN:
1935 return RNODE_LASGN(node)->nd_value;
1936 case NODE_DASGN:
1937 return RNODE_DASGN(node)->nd_value;
1938 case NODE_MASGN:
1939 return RNODE_MASGN(node)->nd_value;
1940 case NODE_CVASGN:
1941 return RNODE_CVASGN(node)->nd_value;
1942 case NODE_CDECL:
1943 return RNODE_CDECL(node)->nd_value;
1944 default:
1945 compile_error(p, "get_nd_value: unexpected node: %s", parser_node_name(nd_type(node)));
1946 return 0;
1947 }
1948}
1949
1950static void
1951set_nd_value(struct parser_params *p, NODE *node, NODE *rhs)
1952{
1953 switch (nd_type(node)) {
1954 case NODE_CDECL:
1955 RNODE_CDECL(node)->nd_value = rhs;
1956 break;
1957 case NODE_GASGN:
1958 RNODE_GASGN(node)->nd_value = rhs;
1959 break;
1960 case NODE_IASGN:
1961 RNODE_IASGN(node)->nd_value = rhs;
1962 break;
1963 case NODE_LASGN:
1964 RNODE_LASGN(node)->nd_value = rhs;
1965 break;
1966 case NODE_DASGN:
1967 RNODE_DASGN(node)->nd_value = rhs;
1968 break;
1969 case NODE_MASGN:
1970 RNODE_MASGN(node)->nd_value = rhs;
1971 break;
1972 case NODE_CVASGN:
1973 RNODE_CVASGN(node)->nd_value = rhs;
1974 break;
1975 default:
1976 compile_error(p, "set_nd_value: unexpected node: %s", parser_node_name(nd_type(node)));
1977 break;
1978 }
1979}
1980
1981static ID
1982get_nd_vid(struct parser_params *p, NODE *node)
1983{
1984 switch (nd_type(node)) {
1985 case NODE_CDECL:
1986 return RNODE_CDECL(node)->nd_vid;
1987 case NODE_GASGN:
1988 return RNODE_GASGN(node)->nd_vid;
1989 case NODE_IASGN:
1990 return RNODE_IASGN(node)->nd_vid;
1991 case NODE_LASGN:
1992 return RNODE_LASGN(node)->nd_vid;
1993 case NODE_DASGN:
1994 return RNODE_DASGN(node)->nd_vid;
1995 case NODE_CVASGN:
1996 return RNODE_CVASGN(node)->nd_vid;
1997 default:
1998 compile_error(p, "get_nd_vid: unexpected node: %s", parser_node_name(nd_type(node)));
1999 return 0;
2000 }
2001}
2002
2003static NODE *
2004get_nd_args(struct parser_params *p, NODE *node)
2005{
2006 switch (nd_type(node)) {
2007 case NODE_CALL:
2008 return RNODE_CALL(node)->nd_args;
2009 case NODE_OPCALL:
2010 return RNODE_OPCALL(node)->nd_args;
2011 case NODE_FCALL:
2012 return RNODE_FCALL(node)->nd_args;
2013 case NODE_QCALL:
2014 return RNODE_QCALL(node)->nd_args;
2015 case NODE_SUPER:
2016 return RNODE_SUPER(node)->nd_args;
2017 case NODE_VCALL:
2018 case NODE_ZSUPER:
2019 case NODE_YIELD:
2020 case NODE_RETURN:
2021 case NODE_BREAK:
2022 case NODE_NEXT:
2023 return 0;
2024 default:
2025 compile_error(p, "get_nd_args: unexpected node: %s", parser_node_name(nd_type(node)));
2026 return 0;
2027 }
2028}
2029
2030static st_index_t
2031djb2(const uint8_t *str, size_t len)
2032{
2033 st_index_t hash = 5381;
2034
2035 for (size_t i = 0; i < len; i++) {
2036 hash = ((hash << 5) + hash) + str[i];
2037 }
2038
2039 return hash;
2040}
2041
2042static st_index_t
2043parser_memhash(const void *ptr, long len)
2044{
2045 return djb2(ptr, len);
2046}
2047
2048#define PARSER_STRING_PTR(str) (str->ptr)
2049#define PARSER_STRING_LEN(str) (str->len)
2050#define PARSER_STRING_END(str) (&str->ptr[str->len])
2051#define STRING_SIZE(str) ((size_t)str->len + 1)
2052#define STRING_TERM_LEN(str) (1)
2053#define STRING_TERM_FILL(str) (str->ptr[str->len] = '\0')
2054#define PARSER_STRING_RESIZE_CAPA_TERM(p,str,capacity,termlen) do {\
2055 SIZED_REALLOC_N(str->ptr, char, (size_t)total + termlen, STRING_SIZE(str)); \
2056 str->len = total; \
2057} while (0)
2058#define STRING_SET_LEN(str, n) do { \
2059 (str)->len = (n); \
2060} while (0)
2061#define PARSER_STRING_GETMEM(str, ptrvar, lenvar) \
2062 ((ptrvar) = str->ptr, \
2063 (lenvar) = str->len)
2064
2065static inline int
2066parser_string_char_at_end(struct parser_params *p, rb_parser_string_t *str, int when_empty)
2067{
2068 return PARSER_STRING_LEN(str) > 0 ? (unsigned char)PARSER_STRING_END(str)[-1] : when_empty;
2069}
2070
2071static rb_parser_string_t *
2072rb_parser_string_new(rb_parser_t *p, const char *ptr, long len)
2073{
2074 rb_parser_string_t *str;
2075
2076 if (len < 0) {
2077 rb_bug("negative string size (or size too big): %ld", len);
2078 }
2079
2080 str = xcalloc(1, sizeof(rb_parser_string_t));
2081 str->ptr = xcalloc(len + 1, sizeof(char));
2082
2083 if (ptr) {
2084 memcpy(PARSER_STRING_PTR(str), ptr, len);
2085 }
2086 STRING_SET_LEN(str, len);
2087 STRING_TERM_FILL(str);
2088 return str;
2089}
2090
2091static rb_parser_string_t *
2092rb_parser_encoding_string_new(rb_parser_t *p, const char *ptr, long len, rb_encoding *enc)
2093{
2094 rb_parser_string_t *str = rb_parser_string_new(p, ptr, len);
2095 str->coderange = RB_PARSER_ENC_CODERANGE_UNKNOWN;
2096 str->enc = enc;
2097 return str;
2098}
2099
2100#ifndef RIPPER
2101rb_parser_string_t *
2102rb_str_to_parser_string(rb_parser_t *p, VALUE str)
2103{
2104 /* Type check */
2105 rb_parser_string_t *ret = rb_parser_encoding_string_new(p, RSTRING_PTR(str), RSTRING_LEN(str), rb_enc_get(str));
2106 RB_GC_GUARD(str);
2107 return ret;
2108}
2109
2110void
2111rb_parser_string_free(rb_parser_t *p, rb_parser_string_t *str)
2112{
2113 if (!str) return;
2114 xfree(PARSER_STRING_PTR(str));
2115 xfree(str);
2116}
2117#endif
2118
2119static st_index_t
2120rb_parser_str_hash(rb_parser_string_t *str)
2121{
2122 return parser_memhash((const void *)PARSER_STRING_PTR(str), PARSER_STRING_LEN(str));
2123}
2124
2125static st_index_t
2126rb_char_p_hash(const char *c)
2127{
2128 return parser_memhash((const void *)c, strlen(c));
2129}
2130
2131static size_t
2132rb_parser_str_capacity(rb_parser_string_t *str, const int termlen)
2133{
2134 return PARSER_STRING_LEN(str);
2135}
2136
2137#ifndef RIPPER
2138static char *
2139rb_parser_string_end(rb_parser_string_t *str)
2140{
2141 return &str->ptr[str->len];
2142}
2143#endif
2144
2145static void
2146rb_parser_string_set_encoding(rb_parser_string_t *str, rb_encoding *enc)
2147{
2148 str->enc = enc;
2149}
2150
2151static rb_encoding *
2152rb_parser_str_get_encoding(rb_parser_string_t *str)
2153{
2154 return str->enc;
2155}
2156
2157#ifndef RIPPER
2158static bool
2159PARSER_ENCODING_IS_ASCII8BIT(struct parser_params *p, rb_parser_string_t *str)
2160{
2161 return rb_parser_str_get_encoding(str) == rb_ascii8bit_encoding();
2162}
2163#endif
2164
2165static int
2166PARSER_ENC_CODERANGE(rb_parser_string_t *str)
2167{
2168 return str->coderange;
2169}
2170
2171static void
2172PARSER_ENC_CODERANGE_SET(rb_parser_string_t *str, int coderange)
2173{
2174 str->coderange = coderange;
2175}
2176
2177static void
2178PARSER_ENCODING_CODERANGE_SET(rb_parser_string_t *str, rb_encoding *enc, enum rb_parser_string_coderange_type cr)
2179{
2180 rb_parser_string_set_encoding(str, enc);
2181 PARSER_ENC_CODERANGE_SET(str, cr);
2182}
2183
2184static void
2185PARSER_ENC_CODERANGE_CLEAR(rb_parser_string_t *str)
2186{
2187 str->coderange = RB_PARSER_ENC_CODERANGE_UNKNOWN;
2188}
2189
2190static bool
2191PARSER_ENC_CODERANGE_ASCIIONLY(rb_parser_string_t *str)
2192{
2193 return PARSER_ENC_CODERANGE(str) == RB_PARSER_ENC_CODERANGE_7BIT;
2194}
2195
2196static bool
2197PARSER_ENC_CODERANGE_CLEAN_P(int cr)
2198{
2199 return cr == RB_PARSER_ENC_CODERANGE_7BIT || cr == RB_PARSER_ENC_CODERANGE_VALID;
2200}
2201
2202static const char *
2203rb_parser_search_nonascii(const char *p, const char *e)
2204{
2205 const char *s = p;
2206
2207 for (; s < e; s++) {
2208 if (*s & 0x80) return s;
2209 }
2210
2211 return NULL;
2212}
2213
2214static int
2215rb_parser_coderange_scan(struct parser_params *p, const char *ptr, long len, rb_encoding *enc)
2216{
2217 const char *e = ptr + len;
2218
2219 if (enc == rb_ascii8bit_encoding()) {
2220 /* enc is ASCII-8BIT. ASCII-8BIT string never be broken. */
2221 ptr = rb_parser_search_nonascii(ptr, e);
2222 return ptr ? RB_PARSER_ENC_CODERANGE_VALID : RB_PARSER_ENC_CODERANGE_7BIT;
2223 }
2224
2225 /* parser string encoding is always asciicompat */
2226 ptr = rb_parser_search_nonascii(ptr, e);
2227 if (!ptr) return RB_PARSER_ENC_CODERANGE_7BIT;
2228 for (;;) {
2229 int ret = rb_enc_precise_mbclen(ptr, e, enc);
2230 if (!MBCLEN_CHARFOUND_P(ret)) return RB_PARSER_ENC_CODERANGE_BROKEN;
2231 ptr += MBCLEN_CHARFOUND_LEN(ret);
2232 if (ptr == e) break;
2233 ptr = rb_parser_search_nonascii(ptr, e);
2234 if (!ptr) break;
2235 }
2236
2237 return RB_PARSER_ENC_CODERANGE_VALID;
2238}
2239
2240static int
2241rb_parser_enc_coderange_scan(struct parser_params *p, rb_parser_string_t *str, rb_encoding *enc)
2242{
2243 return rb_parser_coderange_scan(p, PARSER_STRING_PTR(str), PARSER_STRING_LEN(str), enc);
2244}
2245
2246static int
2247rb_parser_enc_str_coderange(struct parser_params *p, rb_parser_string_t *str)
2248{
2249 int cr = PARSER_ENC_CODERANGE(str);
2250
2251 if (cr == RB_PARSER_ENC_CODERANGE_UNKNOWN) {
2252 cr = rb_parser_enc_coderange_scan(p, str, rb_parser_str_get_encoding(str));
2253 PARSER_ENC_CODERANGE_SET(str, cr);
2254 }
2255
2256 return cr;
2257}
2258
2259static rb_parser_string_t *
2260rb_parser_enc_associate(struct parser_params *p, rb_parser_string_t *str, rb_encoding *enc)
2261{
2262 if (rb_parser_str_get_encoding(str) == enc)
2263 return str;
2264 if (!PARSER_ENC_CODERANGE_ASCIIONLY(str)) {
2265 PARSER_ENC_CODERANGE_CLEAR(str);
2266 }
2267 rb_parser_string_set_encoding(str, enc);
2268 return str;
2269}
2270
2271static bool
2272rb_parser_is_ascii_string(struct parser_params *p, rb_parser_string_t *str)
2273{
2274 return rb_parser_enc_str_coderange(p, str) == RB_PARSER_ENC_CODERANGE_7BIT;
2275}
2276
2277static rb_encoding *
2278rb_parser_enc_compatible(struct parser_params *p, rb_parser_string_t *str1, rb_parser_string_t *str2)
2279{
2280 rb_encoding *enc1 = rb_parser_str_get_encoding(str1);
2281 rb_encoding *enc2 = rb_parser_str_get_encoding(str2);
2282
2283 if (enc1 == NULL || enc2 == NULL)
2284 return 0;
2285
2286 if (enc1 == enc2) {
2287 return enc1;
2288 }
2289
2290 if (PARSER_STRING_LEN(str2) == 0)
2291 return enc1;
2292 if (PARSER_STRING_LEN(str1) == 0)
2293 return rb_parser_is_ascii_string(p, str2) ? enc1 : enc2;
2294
2295 int cr1, cr2;
2296
2297 cr1 = rb_parser_enc_str_coderange(p, str1);
2298 cr2 = rb_parser_enc_str_coderange(p, str2);
2299
2300 if (cr1 != cr2) {
2301 if (cr1 == RB_PARSER_ENC_CODERANGE_7BIT) return enc2;
2302 if (cr2 == RB_PARSER_ENC_CODERANGE_7BIT) return enc1;
2303 }
2304
2305 if (cr2 == RB_PARSER_ENC_CODERANGE_7BIT) {
2306 return enc1;
2307 }
2308
2309 if (cr1 == RB_PARSER_ENC_CODERANGE_7BIT) {
2310 return enc2;
2311 }
2312
2313 return 0;
2314}
2315
2316static void
2317rb_parser_str_modify(rb_parser_string_t *str)
2318{
2319 PARSER_ENC_CODERANGE_CLEAR(str);
2320}
2321
2322static void
2323rb_parser_str_set_len(struct parser_params *p, rb_parser_string_t *str, long len)
2324{
2325 long capa;
2326 const int termlen = STRING_TERM_LEN(str);
2327
2328 if (len > (capa = (long)(rb_parser_str_capacity(str, termlen))) || len < 0) {
2329 rb_bug("probable buffer overflow: %ld for %ld", len, capa);
2330 }
2331
2332 int cr = PARSER_ENC_CODERANGE(str);
2333 if (cr == RB_PARSER_ENC_CODERANGE_UNKNOWN) {
2334 /* Leave unknown. */
2335 }
2336 else if (len > PARSER_STRING_LEN(str)) {
2337 PARSER_ENC_CODERANGE_SET(str, RB_PARSER_ENC_CODERANGE_UNKNOWN);
2338 }
2339 else if (len < PARSER_STRING_LEN(str)) {
2340 if (cr != RB_PARSER_ENC_CODERANGE_7BIT) {
2341 /* ASCII-only string is keeping after truncated. Valid
2342 * and broken may be invalid or valid, leave unknown. */
2343 PARSER_ENC_CODERANGE_SET(str, RB_PARSER_ENC_CODERANGE_UNKNOWN);
2344 }
2345 }
2346
2347 STRING_SET_LEN(str, len);
2348 STRING_TERM_FILL(str);
2349}
2350
2351static rb_parser_string_t *
2352rb_parser_str_buf_cat(struct parser_params *p, rb_parser_string_t *str, const char *ptr, long len)
2353{
2354 rb_parser_str_modify(str);
2355 if (len == 0) return 0;
2356
2357 long total, olen, off = -1;
2358 char *sptr;
2359 const int termlen = STRING_TERM_LEN(str);
2360
2361 PARSER_STRING_GETMEM(str, sptr, olen);
2362 if (ptr >= sptr && ptr <= sptr + olen) {
2363 off = ptr - sptr;
2364 }
2365
2366 if (olen > LONG_MAX - len) {
2367 compile_error(p, "string sizes too big");
2368 return 0;
2369 }
2370 total = olen + len;
2371 PARSER_STRING_RESIZE_CAPA_TERM(p, str, total, termlen);
2372 sptr = PARSER_STRING_PTR(str);
2373 if (off != -1) {
2374 ptr = sptr + off;
2375 }
2376 memcpy(sptr + olen, ptr, len);
2377 STRING_SET_LEN(str, total);
2378 STRING_TERM_FILL(str);
2379
2380 return str;
2381}
2382
2383#define parser_str_cat(str, ptr, len) rb_parser_str_buf_cat(p, str, ptr, len)
2384#define parser_str_cat_cstr(str, lit) rb_parser_str_buf_cat(p, str, lit, strlen(lit))
2385
2386static rb_parser_string_t *
2387rb_parser_enc_cr_str_buf_cat(struct parser_params *p, rb_parser_string_t *str, const char *ptr, long len,
2388 rb_encoding *ptr_enc, int ptr_cr, int *ptr_cr_ret)
2389{
2390 int str_cr, res_cr;
2391 rb_encoding *str_enc, *res_enc;
2392
2393 str_enc = rb_parser_str_get_encoding(str);
2394 str_cr = PARSER_STRING_LEN(str) ? PARSER_ENC_CODERANGE(str) : RB_PARSER_ENC_CODERANGE_7BIT;
2395
2396 if (str_enc == ptr_enc) {
2397 if (str_cr != RB_PARSER_ENC_CODERANGE_UNKNOWN && ptr_cr == RB_PARSER_ENC_CODERANGE_UNKNOWN) {
2398 ptr_cr = rb_parser_coderange_scan(p, ptr, len, ptr_enc);
2399 }
2400 }
2401 else {
2402 /* parser string encoding is always asciicompat */
2403 if (ptr_cr == RB_PARSER_ENC_CODERANGE_UNKNOWN) {
2404 ptr_cr = rb_parser_coderange_scan(p, ptr, len, ptr_enc);
2405 }
2406 if (str_cr == RB_PARSER_ENC_CODERANGE_UNKNOWN) {
2407 if (str_enc == rb_ascii8bit_encoding() || ptr_cr != RB_PARSER_ENC_CODERANGE_7BIT) {
2408 str_cr = rb_parser_enc_str_coderange(p, str);
2409 }
2410 }
2411 }
2412 if (ptr_cr_ret)
2413 *ptr_cr_ret = ptr_cr;
2414
2415 if (str_enc != ptr_enc &&
2416 str_cr != RB_PARSER_ENC_CODERANGE_7BIT &&
2417 ptr_cr != RB_PARSER_ENC_CODERANGE_7BIT) {
2418 goto incompatible;
2419 }
2420
2421 if (str_cr == RB_PARSER_ENC_CODERANGE_UNKNOWN) {
2422 res_enc = str_enc;
2423 res_cr = RB_PARSER_ENC_CODERANGE_UNKNOWN;
2424 }
2425 else if (str_cr == RB_PARSER_ENC_CODERANGE_7BIT) {
2426 if (ptr_cr == RB_PARSER_ENC_CODERANGE_7BIT) {
2427 res_enc = str_enc;
2428 res_cr = RB_PARSER_ENC_CODERANGE_7BIT;
2429 }
2430 else {
2431 res_enc = ptr_enc;
2432 res_cr = ptr_cr;
2433 }
2434 }
2435 else if (str_cr == RB_PARSER_ENC_CODERANGE_VALID) {
2436 res_enc = str_enc;
2437 if (PARSER_ENC_CODERANGE_CLEAN_P(ptr_cr))
2438 res_cr = str_cr;
2439 else
2440 res_cr = ptr_cr;
2441 }
2442 else { /* str_cr == RB_PARSER_ENC_CODERANGE_BROKEN */
2443 res_enc = str_enc;
2444 res_cr = str_cr;
2445 if (0 < len) res_cr = RB_PARSER_ENC_CODERANGE_UNKNOWN;
2446 }
2447
2448 if (len < 0) {
2449 compile_error(p, "negative string size (or size too big)");
2450 }
2451 parser_str_cat(str, ptr, len);
2452 PARSER_ENCODING_CODERANGE_SET(str, res_enc, res_cr);
2453 return str;
2454
2455 incompatible:
2456 compile_error(p, "incompatible character encodings: %s and %s",
2457 rb_enc_name(str_enc), rb_enc_name(ptr_enc));
2458 UNREACHABLE_RETURN(0);
2459
2460}
2461
2462static rb_parser_string_t *
2463rb_parser_enc_str_buf_cat(struct parser_params *p, rb_parser_string_t *str, const char *ptr, long len,
2464 rb_encoding *ptr_enc)
2465{
2466 return rb_parser_enc_cr_str_buf_cat(p, str, ptr, len, ptr_enc, RB_PARSER_ENC_CODERANGE_UNKNOWN, NULL);
2467}
2468
2469static rb_parser_string_t *
2470rb_parser_str_buf_append(struct parser_params *p, rb_parser_string_t *str, rb_parser_string_t *str2)
2471{
2472 int str2_cr = rb_parser_enc_str_coderange(p, str2);
2473
2474 rb_parser_enc_cr_str_buf_cat(p, str, PARSER_STRING_PTR(str2), PARSER_STRING_LEN(str2),
2475 rb_parser_str_get_encoding(str2), str2_cr, &str2_cr);
2476
2477 PARSER_ENC_CODERANGE_SET(str2, str2_cr);
2478
2479 return str;
2480}
2481
2482static rb_parser_string_t *
2483rb_parser_str_resize(struct parser_params *p, rb_parser_string_t *str, long len)
2484{
2485 if (len < 0) {
2486 rb_bug("negative string size (or size too big)");
2487 }
2488
2489 long slen = PARSER_STRING_LEN(str);
2490
2491 if (slen > len && PARSER_ENC_CODERANGE(str) != RB_PARSER_ENC_CODERANGE_7BIT) {
2492 PARSER_ENC_CODERANGE_CLEAR(str);
2493 }
2494
2495 {
2496 long capa;
2497 const int termlen = STRING_TERM_LEN(str);
2498
2499 if ((capa = slen) < len) {
2500 SIZED_REALLOC_N(str->ptr, char, (size_t)len + termlen, STRING_SIZE(str));
2501 }
2502 else if (len == slen) return str;
2503 STRING_SET_LEN(str, len);
2504 STRING_TERM_FILL(str);
2505 }
2506 return str;
2507}
2508
2509# define PARSER_ENC_STRING_GETMEM(str, ptrvar, lenvar, encvar) \
2510 ((ptrvar) = str->ptr, \
2511 (lenvar) = str->len, \
2512 (encvar) = str->enc)
2513
2514static int
2515rb_parser_string_hash_cmp(rb_parser_string_t *str1, rb_parser_string_t *str2)
2516{
2517 long len1, len2;
2518 const char *ptr1, *ptr2;
2519 rb_encoding *enc1, *enc2;
2520
2521 PARSER_ENC_STRING_GETMEM(str1, ptr1, len1, enc1);
2522 PARSER_ENC_STRING_GETMEM(str2, ptr2, len2, enc2);
2523
2524 return (len1 != len2 ||
2525 enc1 != enc2 ||
2526 memcmp(ptr1, ptr2, len1) != 0);
2527}
2528
2529static void
2530rb_parser_ary_extend(rb_parser_t *p, rb_parser_ary_t *ary, long len)
2531{
2532 long i;
2533 if (ary->capa < len) {
2534 ary->capa = len;
2535 ary->data = (rb_parser_ary_data *)xrealloc(ary->data, sizeof(rb_parser_ary_data) * len);
2536 for (i = ary->len; i < len; i++) {
2537 ary->data[i] = 0;
2538 }
2539 }
2540}
2541
2542/*
2543 * Do not call this directly.
2544 * Use rb_parser_ary_new_capa_for_XXX() instead.
2545 */
2546static rb_parser_ary_t *
2547parser_ary_new_capa(rb_parser_t *p, long len)
2548{
2549 if (len < 0) {
2550 rb_bug("negative array size (or size too big): %ld", len);
2551 }
2552 rb_parser_ary_t *ary = xcalloc(1, sizeof(rb_parser_ary_t));
2553 ary->data_type = 0;
2554 ary->len = 0;
2555 ary->capa = len;
2556 if (0 < len) {
2557 ary->data = (rb_parser_ary_data *)xcalloc(len, sizeof(rb_parser_ary_data));
2558 }
2559 else {
2560 ary->data = NULL;
2561 }
2562 return ary;
2563}
2564
2565#ifndef RIPPER
2566static rb_parser_ary_t *
2567rb_parser_ary_new_capa_for_script_line(rb_parser_t *p, long len)
2568{
2569 rb_parser_ary_t *ary = parser_ary_new_capa(p, len);
2570 ary->data_type = PARSER_ARY_DATA_SCRIPT_LINE;
2571 return ary;
2572}
2573
2574static rb_parser_ary_t *
2575rb_parser_ary_new_capa_for_ast_token(rb_parser_t *p, long len)
2576{
2577 rb_parser_ary_t *ary = parser_ary_new_capa(p, len);
2578 ary->data_type = PARSER_ARY_DATA_AST_TOKEN;
2579 return ary;
2580}
2581#endif
2582
2583static rb_parser_ary_t *
2584rb_parser_ary_new_capa_for_node(rb_parser_t *p, long len)
2585{
2586 rb_parser_ary_t *ary = parser_ary_new_capa(p, len);
2587 ary->data_type = PARSER_ARY_DATA_NODE;
2588 return ary;
2589}
2590
2591/*
2592 * Do not call this directly.
2593 * Use rb_parser_ary_push_XXX() instead.
2594 */
2595static rb_parser_ary_t *
2596parser_ary_push(rb_parser_t *p, rb_parser_ary_t *ary, rb_parser_ary_data val)
2597{
2598 if (ary->len == ary->capa) {
2599 rb_parser_ary_extend(p, ary, ary->len == 0 ? 1 : ary->len * 2);
2600 }
2601 ary->data[ary->len++] = val;
2602 return ary;
2603}
2604
2605#ifndef RIPPER
2606static rb_parser_ary_t *
2607rb_parser_ary_push_ast_token(rb_parser_t *p, rb_parser_ary_t *ary, rb_parser_ast_token_t *val)
2608{
2609 if (ary->data_type != PARSER_ARY_DATA_AST_TOKEN) {
2610 rb_bug("unexpected rb_parser_ary_data_type: %d", ary->data_type);
2611 }
2612 return parser_ary_push(p, ary, val);
2613}
2614
2615static rb_parser_ary_t *
2616rb_parser_ary_push_script_line(rb_parser_t *p, rb_parser_ary_t *ary, rb_parser_string_t *val)
2617{
2618 if (ary->data_type != PARSER_ARY_DATA_SCRIPT_LINE) {
2619 rb_bug("unexpected rb_parser_ary_data_type: %d", ary->data_type);
2620 }
2621 return parser_ary_push(p, ary, val);
2622}
2623#endif
2624
2625static rb_parser_ary_t *
2626rb_parser_ary_push_node(rb_parser_t *p, rb_parser_ary_t *ary, NODE *val)
2627{
2628 if (ary->data_type != PARSER_ARY_DATA_NODE) {
2629 rb_bug("unexpected rb_parser_ary_data_type: %d", ary->data_type);
2630 }
2631 return parser_ary_push(p, ary, val);
2632}
2633
2634#ifndef RIPPER
2635static void
2636rb_parser_ast_token_free(rb_parser_t *p, rb_parser_ast_token_t *token)
2637{
2638 if (!token) return;
2639 rb_parser_string_free(p, token->str);
2640 xfree(token);
2641}
2642
2643static void
2644rb_parser_ary_free(rb_parser_t *p, rb_parser_ary_t *ary)
2645{
2646# define foreach_ary(ptr) \
2647 for (rb_parser_ary_data *ptr = ary->data, *const end_ary_data = ptr + ary->len; \
2648 ptr < end_ary_data; ptr++)
2649 switch (ary->data_type) {
2650 case PARSER_ARY_DATA_AST_TOKEN:
2651 foreach_ary(data) {rb_parser_ast_token_free(p, *data);}
2652 break;
2653 case PARSER_ARY_DATA_SCRIPT_LINE:
2654 foreach_ary(data) {rb_parser_string_free(p, *data);}
2655 break;
2656 case PARSER_ARY_DATA_NODE:
2657 /* Do nothing because nodes are freed when rb_ast_t is freed */
2658 break;
2659 default:
2660 rb_bug("unexpected rb_parser_ary_data_type: %d", ary->data_type);
2661 break;
2662 }
2663# undef foreach_ary
2664 xfree(ary->data);
2665 xfree(ary);
2666}
2667
2668#endif /* !RIPPER */
2669
2670#line 2671 "parse.c"
2671
2672# ifndef YY_CAST
2673# ifdef __cplusplus
2674# define YY_CAST(Type, Val) static_cast<Type> (Val)
2675# define YY_REINTERPRET_CAST(Type, Val) reinterpret_cast<Type> (Val)
2676# else
2677# define YY_CAST(Type, Val) ((Type) (Val))
2678# define YY_REINTERPRET_CAST(Type, Val) ((Type) (Val))
2679# endif
2680# endif
2681# ifndef YY_NULLPTR
2682# if defined __cplusplus
2683# if 201103L <= __cplusplus
2684# define YY_NULLPTR nullptr
2685# else
2686# define YY_NULLPTR 0
2687# endif
2688# else
2689# define YY_NULLPTR ((void*)0)
2690# endif
2691# endif
2692
2693#include "parse.h"
2694/* Symbol kind. */
2695enum yysymbol_kind_t
2696{
2697 YYSYMBOL_YYEMPTY = -2,
2698 YYSYMBOL_YYEOF = 0, /* "end-of-input" */
2699 YYSYMBOL_YYerror = 1, /* error */
2700 YYSYMBOL_YYUNDEF = 2, /* "invalid token" */
2701 YYSYMBOL_keyword_class = 3, /* "'class'" */
2702 YYSYMBOL_keyword_module = 4, /* "'module'" */
2703 YYSYMBOL_keyword_def = 5, /* "'def'" */
2704 YYSYMBOL_keyword_undef = 6, /* "'undef'" */
2705 YYSYMBOL_keyword_begin = 7, /* "'begin'" */
2706 YYSYMBOL_keyword_rescue = 8, /* "'rescue'" */
2707 YYSYMBOL_keyword_ensure = 9, /* "'ensure'" */
2708 YYSYMBOL_keyword_end = 10, /* "'end'" */
2709 YYSYMBOL_keyword_if = 11, /* "'if'" */
2710 YYSYMBOL_keyword_unless = 12, /* "'unless'" */
2711 YYSYMBOL_keyword_then = 13, /* "'then'" */
2712 YYSYMBOL_keyword_elsif = 14, /* "'elsif'" */
2713 YYSYMBOL_keyword_else = 15, /* "'else'" */
2714 YYSYMBOL_keyword_case = 16, /* "'case'" */
2715 YYSYMBOL_keyword_when = 17, /* "'when'" */
2716 YYSYMBOL_keyword_while = 18, /* "'while'" */
2717 YYSYMBOL_keyword_until = 19, /* "'until'" */
2718 YYSYMBOL_keyword_for = 20, /* "'for'" */
2719 YYSYMBOL_keyword_break = 21, /* "'break'" */
2720 YYSYMBOL_keyword_next = 22, /* "'next'" */
2721 YYSYMBOL_keyword_redo = 23, /* "'redo'" */
2722 YYSYMBOL_keyword_retry = 24, /* "'retry'" */
2723 YYSYMBOL_keyword_in = 25, /* "'in'" */
2724 YYSYMBOL_keyword_do = 26, /* "'do'" */
2725 YYSYMBOL_keyword_do_cond = 27, /* "'do' for condition" */
2726 YYSYMBOL_keyword_do_block = 28, /* "'do' for block" */
2727 YYSYMBOL_keyword_do_LAMBDA = 29, /* "'do' for lambda" */
2728 YYSYMBOL_keyword_return = 30, /* "'return'" */
2729 YYSYMBOL_keyword_yield = 31, /* "'yield'" */
2730 YYSYMBOL_keyword_super = 32, /* "'super'" */
2731 YYSYMBOL_keyword_self = 33, /* "'self'" */
2732 YYSYMBOL_keyword_nil = 34, /* "'nil'" */
2733 YYSYMBOL_keyword_true = 35, /* "'true'" */
2734 YYSYMBOL_keyword_false = 36, /* "'false'" */
2735 YYSYMBOL_keyword_and = 37, /* "'and'" */
2736 YYSYMBOL_keyword_or = 38, /* "'or'" */
2737 YYSYMBOL_keyword_not = 39, /* "'not'" */
2738 YYSYMBOL_modifier_if = 40, /* "'if' modifier" */
2739 YYSYMBOL_modifier_unless = 41, /* "'unless' modifier" */
2740 YYSYMBOL_modifier_while = 42, /* "'while' modifier" */
2741 YYSYMBOL_modifier_until = 43, /* "'until' modifier" */
2742 YYSYMBOL_modifier_rescue = 44, /* "'rescue' modifier" */
2743 YYSYMBOL_keyword_alias = 45, /* "'alias'" */
2744 YYSYMBOL_keyword_defined = 46, /* "'defined?'" */
2745 YYSYMBOL_keyword_BEGIN = 47, /* "'BEGIN'" */
2746 YYSYMBOL_keyword_END = 48, /* "'END'" */
2747 YYSYMBOL_keyword__LINE__ = 49, /* "'__LINE__'" */
2748 YYSYMBOL_keyword__FILE__ = 50, /* "'__FILE__'" */
2749 YYSYMBOL_keyword__ENCODING__ = 51, /* "'__ENCODING__'" */
2750 YYSYMBOL_tIDENTIFIER = 52, /* "local variable or method" */
2751 YYSYMBOL_tFID = 53, /* "method" */
2752 YYSYMBOL_tGVAR = 54, /* "global variable" */
2753 YYSYMBOL_tIVAR = 55, /* "instance variable" */
2754 YYSYMBOL_tCONSTANT = 56, /* "constant" */
2755 YYSYMBOL_tCVAR = 57, /* "class variable" */
2756 YYSYMBOL_tLABEL = 58, /* "label" */
2757 YYSYMBOL_tINTEGER = 59, /* "integer literal" */
2758 YYSYMBOL_tFLOAT = 60, /* "float literal" */
2759 YYSYMBOL_tRATIONAL = 61, /* "rational literal" */
2760 YYSYMBOL_tIMAGINARY = 62, /* "imaginary literal" */
2761 YYSYMBOL_tCHAR = 63, /* "char literal" */
2762 YYSYMBOL_tNTH_REF = 64, /* "numbered reference" */
2763 YYSYMBOL_tBACK_REF = 65, /* "back reference" */
2764 YYSYMBOL_tSTRING_CONTENT = 66, /* "literal content" */
2765 YYSYMBOL_tREGEXP_END = 67, /* tREGEXP_END */
2766 YYSYMBOL_tDUMNY_END = 68, /* "dummy end" */
2767 YYSYMBOL_69_ = 69, /* '.' */
2768 YYSYMBOL_70_backslash_ = 70, /* "backslash" */
2769 YYSYMBOL_tSP = 71, /* "escaped space" */
2770 YYSYMBOL_72_escaped_horizontal_tab_ = 72, /* "escaped horizontal tab" */
2771 YYSYMBOL_73_escaped_form_feed_ = 73, /* "escaped form feed" */
2772 YYSYMBOL_74_escaped_carriage_return_ = 74, /* "escaped carriage return" */
2773 YYSYMBOL_75_escaped_vertical_tab_ = 75, /* "escaped vertical tab" */
2774 YYSYMBOL_tUPLUS = 76, /* "unary+" */
2775 YYSYMBOL_tUMINUS = 77, /* "unary-" */
2776 YYSYMBOL_tPOW = 78, /* "**" */
2777 YYSYMBOL_tCMP = 79, /* "<=>" */
2778 YYSYMBOL_tEQ = 80, /* "==" */
2779 YYSYMBOL_tEQQ = 81, /* "===" */
2780 YYSYMBOL_tNEQ = 82, /* "!=" */
2781 YYSYMBOL_tGEQ = 83, /* ">=" */
2782 YYSYMBOL_tLEQ = 84, /* "<=" */
2783 YYSYMBOL_tANDOP = 85, /* "&&" */
2784 YYSYMBOL_tOROP = 86, /* "||" */
2785 YYSYMBOL_tMATCH = 87, /* "=~" */
2786 YYSYMBOL_tNMATCH = 88, /* "!~" */
2787 YYSYMBOL_tDOT2 = 89, /* ".." */
2788 YYSYMBOL_tDOT3 = 90, /* "..." */
2789 YYSYMBOL_tBDOT2 = 91, /* "(.." */
2790 YYSYMBOL_tBDOT3 = 92, /* "(..." */
2791 YYSYMBOL_tAREF = 93, /* "[]" */
2792 YYSYMBOL_tASET = 94, /* "[]=" */
2793 YYSYMBOL_tLSHFT = 95, /* "<<" */
2794 YYSYMBOL_tRSHFT = 96, /* ">>" */
2795 YYSYMBOL_tANDDOT = 97, /* "&." */
2796 YYSYMBOL_tCOLON2 = 98, /* "::" */
2797 YYSYMBOL_tCOLON3 = 99, /* ":: at EXPR_BEG" */
2798 YYSYMBOL_tOP_ASGN = 100, /* "operator-assignment" */
2799 YYSYMBOL_tASSOC = 101, /* "=>" */
2800 YYSYMBOL_tLPAREN = 102, /* "(" */
2801 YYSYMBOL_tLPAREN_ARG = 103, /* "( arg" */
2802 YYSYMBOL_tLBRACK = 104, /* "[" */
2803 YYSYMBOL_tLBRACE = 105, /* "{" */
2804 YYSYMBOL_tLBRACE_ARG = 106, /* "{ arg" */
2805 YYSYMBOL_tSTAR = 107, /* "*" */
2806 YYSYMBOL_tDSTAR = 108, /* "**arg" */
2807 YYSYMBOL_tAMPER = 109, /* "&" */
2808 YYSYMBOL_tLAMBDA = 110, /* "->" */
2809 YYSYMBOL_tSYMBEG = 111, /* "symbol literal" */
2810 YYSYMBOL_tSTRING_BEG = 112, /* "string literal" */
2811 YYSYMBOL_tXSTRING_BEG = 113, /* "backtick literal" */
2812 YYSYMBOL_tREGEXP_BEG = 114, /* "regexp literal" */
2813 YYSYMBOL_tWORDS_BEG = 115, /* "word list" */
2814 YYSYMBOL_tQWORDS_BEG = 116, /* "verbatim word list" */
2815 YYSYMBOL_tSYMBOLS_BEG = 117, /* "symbol list" */
2816 YYSYMBOL_tQSYMBOLS_BEG = 118, /* "verbatim symbol list" */
2817 YYSYMBOL_tSTRING_END = 119, /* "terminator" */
2818 YYSYMBOL_tSTRING_DEND = 120, /* "'}'" */
2819 YYSYMBOL_tSTRING_DBEG = 121, /* "'#{'" */
2820 YYSYMBOL_tSTRING_DVAR = 122, /* tSTRING_DVAR */
2821 YYSYMBOL_tLAMBEG = 123, /* tLAMBEG */
2822 YYSYMBOL_tLABEL_END = 124, /* tLABEL_END */
2823 YYSYMBOL_tIGNORED_NL = 125, /* tIGNORED_NL */
2824 YYSYMBOL_tCOMMENT = 126, /* tCOMMENT */
2825 YYSYMBOL_tEMBDOC_BEG = 127, /* tEMBDOC_BEG */
2826 YYSYMBOL_tEMBDOC = 128, /* tEMBDOC */
2827 YYSYMBOL_tEMBDOC_END = 129, /* tEMBDOC_END */
2828 YYSYMBOL_tHEREDOC_BEG = 130, /* tHEREDOC_BEG */
2829 YYSYMBOL_tHEREDOC_END = 131, /* tHEREDOC_END */
2830 YYSYMBOL_k__END__ = 132, /* k__END__ */
2831 YYSYMBOL_tLOWEST = 133, /* tLOWEST */
2832 YYSYMBOL_134_ = 134, /* '=' */
2833 YYSYMBOL_135_ = 135, /* '?' */
2834 YYSYMBOL_136_ = 136, /* ':' */
2835 YYSYMBOL_137_ = 137, /* '>' */
2836 YYSYMBOL_138_ = 138, /* '<' */
2837 YYSYMBOL_139_ = 139, /* '|' */
2838 YYSYMBOL_140_ = 140, /* '^' */
2839 YYSYMBOL_141_ = 141, /* '&' */
2840 YYSYMBOL_142_ = 142, /* '+' */
2841 YYSYMBOL_143_ = 143, /* '-' */
2842 YYSYMBOL_144_ = 144, /* '*' */
2843 YYSYMBOL_145_ = 145, /* '/' */
2844 YYSYMBOL_146_ = 146, /* '%' */
2845 YYSYMBOL_tUMINUS_NUM = 147, /* tUMINUS_NUM */
2846 YYSYMBOL_148_ = 148, /* '!' */
2847 YYSYMBOL_149_ = 149, /* '~' */
2848 YYSYMBOL_tLAST_TOKEN = 150, /* tLAST_TOKEN */
2849 YYSYMBOL_151_ = 151, /* '{' */
2850 YYSYMBOL_152_ = 152, /* '}' */
2851 YYSYMBOL_153_ = 153, /* '[' */
2852 YYSYMBOL_154_n_ = 154, /* '\n' */
2853 YYSYMBOL_155_ = 155, /* ',' */
2854 YYSYMBOL_156_ = 156, /* '`' */
2855 YYSYMBOL_157_ = 157, /* '(' */
2856 YYSYMBOL_158_ = 158, /* ')' */
2857 YYSYMBOL_159_ = 159, /* ']' */
2858 YYSYMBOL_160_ = 160, /* ';' */
2859 YYSYMBOL_161_ = 161, /* ' ' */
2860 YYSYMBOL_YYACCEPT = 162, /* $accept */
2861 YYSYMBOL_option_terms = 163, /* option_terms */
2862 YYSYMBOL_compstmt_top_stmts = 164, /* compstmt_top_stmts */
2863 YYSYMBOL_165_1 = 165, /* $@1 */
2864 YYSYMBOL_program = 166, /* program */
2865 YYSYMBOL_top_stmts = 167, /* top_stmts */
2866 YYSYMBOL_top_stmt = 168, /* top_stmt */
2867 YYSYMBOL_block_open = 169, /* block_open */
2868 YYSYMBOL_begin_block = 170, /* begin_block */
2869 YYSYMBOL_compstmt_stmts = 171, /* compstmt_stmts */
2870 YYSYMBOL_172_2 = 172, /* $@2 */
2871 YYSYMBOL_173_3 = 173, /* $@3 */
2872 YYSYMBOL_bodystmt = 174, /* bodystmt */
2873 YYSYMBOL_175_4 = 175, /* $@4 */
2874 YYSYMBOL_stmts = 176, /* stmts */
2875 YYSYMBOL_stmt_or_begin = 177, /* stmt_or_begin */
2876 YYSYMBOL_178_5 = 178, /* $@5 */
2877 YYSYMBOL_allow_exits = 179, /* allow_exits */
2878 YYSYMBOL_k_END = 180, /* k_END */
2879 YYSYMBOL_181_6 = 181, /* $@6 */
2880 YYSYMBOL_stmt = 182, /* stmt */
2881 YYSYMBOL_asgn_mrhs = 183, /* asgn_mrhs */
2882 YYSYMBOL_asgn_command_rhs = 184, /* asgn_command_rhs */
2883 YYSYMBOL_command_asgn = 185, /* command_asgn */
2884 YYSYMBOL_op_asgn_command_rhs = 186, /* op_asgn_command_rhs */
2885 YYSYMBOL_def_endless_method_endless_command = 187, /* def_endless_method_endless_command */
2886 YYSYMBOL_endless_command = 188, /* endless_command */
2887 YYSYMBOL_option__n_ = 189, /* option_'\n' */
2888 YYSYMBOL_command_rhs = 190, /* command_rhs */
2889 YYSYMBOL_expr = 191, /* expr */
2890 YYSYMBOL_192_7 = 192, /* $@7 */
2891 YYSYMBOL_193_8 = 193, /* $@8 */
2892 YYSYMBOL_def_name = 194, /* def_name */
2893 YYSYMBOL_defn_head = 195, /* defn_head */
2894 YYSYMBOL_196_9 = 196, /* $@9 */
2895 YYSYMBOL_defs_head = 197, /* defs_head */
2896 YYSYMBOL_value_expr_expr = 198, /* value_expr_expr */
2897 YYSYMBOL_expr_value = 199, /* expr_value */
2898 YYSYMBOL_200_10 = 200, /* $@10 */
2899 YYSYMBOL_201_11 = 201, /* $@11 */
2900 YYSYMBOL_expr_value_do = 202, /* expr_value_do */
2901 YYSYMBOL_command_call = 203, /* command_call */
2902 YYSYMBOL_value_expr_command_call = 204, /* value_expr_command_call */
2903 YYSYMBOL_command_call_value = 205, /* command_call_value */
2904 YYSYMBOL_block_command = 206, /* block_command */
2905 YYSYMBOL_cmd_brace_block = 207, /* cmd_brace_block */
2906 YYSYMBOL_fcall = 208, /* fcall */
2907 YYSYMBOL_command = 209, /* command */
2908 YYSYMBOL_mlhs = 210, /* mlhs */
2909 YYSYMBOL_mlhs_inner = 211, /* mlhs_inner */
2910 YYSYMBOL_mlhs_basic = 212, /* mlhs_basic */
2911 YYSYMBOL_mlhs_mlhs_item = 213, /* mlhs_mlhs_item */
2912 YYSYMBOL_mlhs_item = 214, /* mlhs_item */
2913 YYSYMBOL_mlhs_head = 215, /* mlhs_head */
2914 YYSYMBOL_mlhs_node = 216, /* mlhs_node */
2915 YYSYMBOL_lhs = 217, /* lhs */
2916 YYSYMBOL_cname = 218, /* cname */
2917 YYSYMBOL_cpath = 219, /* cpath */
2918 YYSYMBOL_fname = 220, /* fname */
2919 YYSYMBOL_fitem = 221, /* fitem */
2920 YYSYMBOL_undef_list = 222, /* undef_list */
2921 YYSYMBOL_223_12 = 223, /* $@12 */
2922 YYSYMBOL_op = 224, /* op */
2923 YYSYMBOL_reswords = 225, /* reswords */
2924 YYSYMBOL_asgn_arg_rhs = 226, /* asgn_arg_rhs */
2925 YYSYMBOL_arg = 227, /* arg */
2926 YYSYMBOL_op_asgn_arg_rhs = 228, /* op_asgn_arg_rhs */
2927 YYSYMBOL_range_expr_arg = 229, /* range_expr_arg */
2928 YYSYMBOL_def_endless_method_endless_arg = 230, /* def_endless_method_endless_arg */
2929 YYSYMBOL_ternary = 231, /* ternary */
2930 YYSYMBOL_endless_arg = 232, /* endless_arg */
2931 YYSYMBOL_relop = 233, /* relop */
2932 YYSYMBOL_rel_expr = 234, /* rel_expr */
2933 YYSYMBOL_lex_ctxt = 235, /* lex_ctxt */
2934 YYSYMBOL_begin_defined = 236, /* begin_defined */
2935 YYSYMBOL_after_rescue = 237, /* after_rescue */
2936 YYSYMBOL_value_expr_arg = 238, /* value_expr_arg */
2937 YYSYMBOL_arg_value = 239, /* arg_value */
2938 YYSYMBOL_aref_args = 240, /* aref_args */
2939 YYSYMBOL_arg_rhs = 241, /* arg_rhs */
2940 YYSYMBOL_paren_args = 242, /* paren_args */
2941 YYSYMBOL_opt_paren_args = 243, /* opt_paren_args */
2942 YYSYMBOL_opt_call_args = 244, /* opt_call_args */
2943 YYSYMBOL_value_expr_command = 245, /* value_expr_command */
2944 YYSYMBOL_call_args = 246, /* call_args */
2945 YYSYMBOL_247_13 = 247, /* $@13 */
2946 YYSYMBOL_command_args = 248, /* command_args */
2947 YYSYMBOL_block_arg = 249, /* block_arg */
2948 YYSYMBOL_opt_block_arg = 250, /* opt_block_arg */
2949 YYSYMBOL_args = 251, /* args */
2950 YYSYMBOL_arg_splat = 252, /* arg_splat */
2951 YYSYMBOL_mrhs_arg = 253, /* mrhs_arg */
2952 YYSYMBOL_mrhs = 254, /* mrhs */
2953 YYSYMBOL_primary = 255, /* primary */
2954 YYSYMBOL_256_14 = 256, /* $@14 */
2955 YYSYMBOL_257_15 = 257, /* $@15 */
2956 YYSYMBOL_258_16 = 258, /* @16 */
2957 YYSYMBOL_259_17 = 259, /* @17 */
2958 YYSYMBOL_260_18 = 260, /* $@18 */
2959 YYSYMBOL_261_19 = 261, /* $@19 */
2960 YYSYMBOL_262_20 = 262, /* $@20 */
2961 YYSYMBOL_263_21 = 263, /* $@21 */
2962 YYSYMBOL_264_22 = 264, /* $@22 */
2963 YYSYMBOL_265_23 = 265, /* $@23 */
2964 YYSYMBOL_266_24 = 266, /* $@24 */
2965 YYSYMBOL_value_expr_primary = 267, /* value_expr_primary */
2966 YYSYMBOL_primary_value = 268, /* primary_value */
2967 YYSYMBOL_k_begin = 269, /* k_begin */
2968 YYSYMBOL_k_if = 270, /* k_if */
2969 YYSYMBOL_k_unless = 271, /* k_unless */
2970 YYSYMBOL_k_while = 272, /* k_while */
2971 YYSYMBOL_k_until = 273, /* k_until */
2972 YYSYMBOL_k_case = 274, /* k_case */
2973 YYSYMBOL_k_for = 275, /* k_for */
2974 YYSYMBOL_k_class = 276, /* k_class */
2975 YYSYMBOL_k_module = 277, /* k_module */
2976 YYSYMBOL_k_def = 278, /* k_def */
2977 YYSYMBOL_k_do = 279, /* k_do */
2978 YYSYMBOL_k_do_block = 280, /* k_do_block */
2979 YYSYMBOL_k_rescue = 281, /* k_rescue */
2980 YYSYMBOL_k_ensure = 282, /* k_ensure */
2981 YYSYMBOL_k_when = 283, /* k_when */
2982 YYSYMBOL_k_else = 284, /* k_else */
2983 YYSYMBOL_k_elsif = 285, /* k_elsif */
2984 YYSYMBOL_k_end = 286, /* k_end */
2985 YYSYMBOL_k_return = 287, /* k_return */
2986 YYSYMBOL_k_yield = 288, /* k_yield */
2987 YYSYMBOL_then = 289, /* then */
2988 YYSYMBOL_do = 290, /* do */
2989 YYSYMBOL_if_tail = 291, /* if_tail */
2990 YYSYMBOL_opt_else = 292, /* opt_else */
2991 YYSYMBOL_for_var = 293, /* for_var */
2992 YYSYMBOL_f_marg = 294, /* f_marg */
2993 YYSYMBOL_mlhs_f_marg = 295, /* mlhs_f_marg */
2994 YYSYMBOL_f_margs = 296, /* f_margs */
2995 YYSYMBOL_f_rest_marg = 297, /* f_rest_marg */
2996 YYSYMBOL_f_any_kwrest = 298, /* f_any_kwrest */
2997 YYSYMBOL_299_25 = 299, /* $@25 */
2998 YYSYMBOL_f_eq = 300, /* f_eq */
2999 YYSYMBOL_f_kw_primary_value = 301, /* f_kw_primary_value */
3000 YYSYMBOL_f_kwarg_primary_value = 302, /* f_kwarg_primary_value */
3001 YYSYMBOL_args_tail_basic_primary_value = 303, /* args_tail_basic_primary_value */
3002 YYSYMBOL_block_args_tail = 304, /* block_args_tail */
3003 YYSYMBOL_excessed_comma = 305, /* excessed_comma */
3004 YYSYMBOL_f_opt_primary_value = 306, /* f_opt_primary_value */
3005 YYSYMBOL_f_opt_arg_primary_value = 307, /* f_opt_arg_primary_value */
3006 YYSYMBOL_opt_args_tail_block_args_tail = 308, /* opt_args_tail_block_args_tail */
3007 YYSYMBOL_block_param = 309, /* block_param */
3008 YYSYMBOL_opt_block_param_def = 310, /* opt_block_param_def */
3009 YYSYMBOL_block_param_def = 311, /* block_param_def */
3010 YYSYMBOL_opt_block_param = 312, /* opt_block_param */
3011 YYSYMBOL_opt_bv_decl = 313, /* opt_bv_decl */
3012 YYSYMBOL_bv_decls = 314, /* bv_decls */
3013 YYSYMBOL_bvar = 315, /* bvar */
3014 YYSYMBOL_max_numparam = 316, /* max_numparam */
3015 YYSYMBOL_numparam = 317, /* numparam */
3016 YYSYMBOL_it_id = 318, /* it_id */
3017 YYSYMBOL_319_26 = 319, /* @26 */
3018 YYSYMBOL_320_27 = 320, /* $@27 */
3019 YYSYMBOL_lambda = 321, /* lambda */
3020 YYSYMBOL_f_larglist = 322, /* f_larglist */
3021 YYSYMBOL_lambda_body = 323, /* lambda_body */
3022 YYSYMBOL_324_28 = 324, /* $@28 */
3023 YYSYMBOL_do_block = 325, /* do_block */
3024 YYSYMBOL_block_call = 326, /* block_call */
3025 YYSYMBOL_method_call = 327, /* method_call */
3026 YYSYMBOL_brace_block = 328, /* brace_block */
3027 YYSYMBOL_329_29 = 329, /* @29 */
3028 YYSYMBOL_brace_body = 330, /* brace_body */
3029 YYSYMBOL_331_30 = 331, /* @30 */
3030 YYSYMBOL_do_body = 332, /* do_body */
3031 YYSYMBOL_case_args = 333, /* case_args */
3032 YYSYMBOL_case_body = 334, /* case_body */
3033 YYSYMBOL_cases = 335, /* cases */
3034 YYSYMBOL_p_pvtbl = 336, /* p_pvtbl */
3035 YYSYMBOL_p_pktbl = 337, /* p_pktbl */
3036 YYSYMBOL_p_in_kwarg = 338, /* p_in_kwarg */
3037 YYSYMBOL_339_31 = 339, /* $@31 */
3038 YYSYMBOL_p_case_body = 340, /* p_case_body */
3039 YYSYMBOL_p_cases = 341, /* p_cases */
3040 YYSYMBOL_p_top_expr = 342, /* p_top_expr */
3041 YYSYMBOL_p_top_expr_body = 343, /* p_top_expr_body */
3042 YYSYMBOL_p_expr = 344, /* p_expr */
3043 YYSYMBOL_p_as = 345, /* p_as */
3044 YYSYMBOL_p_alt = 346, /* p_alt */
3045 YYSYMBOL_p_lparen = 347, /* p_lparen */
3046 YYSYMBOL_p_lbracket = 348, /* p_lbracket */
3047 YYSYMBOL_p_expr_basic = 349, /* p_expr_basic */
3048 YYSYMBOL_350_32 = 350, /* $@32 */
3049 YYSYMBOL_p_args = 351, /* p_args */
3050 YYSYMBOL_p_args_head = 352, /* p_args_head */
3051 YYSYMBOL_p_args_tail = 353, /* p_args_tail */
3052 YYSYMBOL_p_find = 354, /* p_find */
3053 YYSYMBOL_p_rest = 355, /* p_rest */
3054 YYSYMBOL_p_args_post = 356, /* p_args_post */
3055 YYSYMBOL_p_arg = 357, /* p_arg */
3056 YYSYMBOL_p_kwargs = 358, /* p_kwargs */
3057 YYSYMBOL_p_kwarg = 359, /* p_kwarg */
3058 YYSYMBOL_p_kw = 360, /* p_kw */
3059 YYSYMBOL_p_kw_label = 361, /* p_kw_label */
3060 YYSYMBOL_p_kwrest = 362, /* p_kwrest */
3061 YYSYMBOL_p_kwnorest = 363, /* p_kwnorest */
3062 YYSYMBOL_p_any_kwrest = 364, /* p_any_kwrest */
3063 YYSYMBOL_p_value = 365, /* p_value */
3064 YYSYMBOL_range_expr_p_primitive = 366, /* range_expr_p_primitive */
3065 YYSYMBOL_p_primitive = 367, /* p_primitive */
3066 YYSYMBOL_p_variable = 368, /* p_variable */
3067 YYSYMBOL_p_var_ref = 369, /* p_var_ref */
3068 YYSYMBOL_p_expr_ref = 370, /* p_expr_ref */
3069 YYSYMBOL_p_const = 371, /* p_const */
3070 YYSYMBOL_opt_rescue = 372, /* opt_rescue */
3071 YYSYMBOL_exc_list = 373, /* exc_list */
3072 YYSYMBOL_exc_var = 374, /* exc_var */
3073 YYSYMBOL_opt_ensure = 375, /* opt_ensure */
3074 YYSYMBOL_literal = 376, /* literal */
3075 YYSYMBOL_strings = 377, /* strings */
3076 YYSYMBOL_string = 378, /* string */
3077 YYSYMBOL_string1 = 379, /* string1 */
3078 YYSYMBOL_xstring = 380, /* xstring */
3079 YYSYMBOL_regexp = 381, /* regexp */
3080 YYSYMBOL_nonempty_list__ = 382, /* nonempty_list_' ' */
3081 YYSYMBOL_words_tWORDS_BEG_word_list = 383, /* words_tWORDS_BEG_word_list */
3082 YYSYMBOL_words = 384, /* words */
3083 YYSYMBOL_word_list = 385, /* word_list */
3084 YYSYMBOL_word = 386, /* word */
3085 YYSYMBOL_words_tSYMBOLS_BEG_symbol_list = 387, /* words_tSYMBOLS_BEG_symbol_list */
3086 YYSYMBOL_symbols = 388, /* symbols */
3087 YYSYMBOL_symbol_list = 389, /* symbol_list */
3088 YYSYMBOL_words_tQWORDS_BEG_qword_list = 390, /* words_tQWORDS_BEG_qword_list */
3089 YYSYMBOL_qwords = 391, /* qwords */
3090 YYSYMBOL_words_tQSYMBOLS_BEG_qsym_list = 392, /* words_tQSYMBOLS_BEG_qsym_list */
3091 YYSYMBOL_qsymbols = 393, /* qsymbols */
3092 YYSYMBOL_qword_list = 394, /* qword_list */
3093 YYSYMBOL_qsym_list = 395, /* qsym_list */
3094 YYSYMBOL_string_contents = 396, /* string_contents */
3095 YYSYMBOL_xstring_contents = 397, /* xstring_contents */
3096 YYSYMBOL_regexp_contents = 398, /* regexp_contents */
3097 YYSYMBOL_string_content = 399, /* string_content */
3098 YYSYMBOL_400_33 = 400, /* @33 */
3099 YYSYMBOL_401_34 = 401, /* @34 */
3100 YYSYMBOL_402_35 = 402, /* @35 */
3101 YYSYMBOL_403_36 = 403, /* @36 */
3102 YYSYMBOL_string_dend = 404, /* string_dend */
3103 YYSYMBOL_string_dvar = 405, /* string_dvar */
3104 YYSYMBOL_symbol = 406, /* symbol */
3105 YYSYMBOL_ssym = 407, /* ssym */
3106 YYSYMBOL_sym = 408, /* sym */
3107 YYSYMBOL_dsym = 409, /* dsym */
3108 YYSYMBOL_numeric = 410, /* numeric */
3109 YYSYMBOL_simple_numeric = 411, /* simple_numeric */
3110 YYSYMBOL_nonlocal_var = 412, /* nonlocal_var */
3111 YYSYMBOL_user_variable = 413, /* user_variable */
3112 YYSYMBOL_keyword_variable = 414, /* keyword_variable */
3113 YYSYMBOL_var_ref = 415, /* var_ref */
3114 YYSYMBOL_var_lhs = 416, /* var_lhs */
3115 YYSYMBOL_backref = 417, /* backref */
3116 YYSYMBOL_418_37 = 418, /* $@37 */
3117 YYSYMBOL_superclass = 419, /* superclass */
3118 YYSYMBOL_f_opt_paren_args = 420, /* f_opt_paren_args */
3119 YYSYMBOL_f_paren_args = 421, /* f_paren_args */
3120 YYSYMBOL_f_arglist = 422, /* f_arglist */
3121 YYSYMBOL_423_38 = 423, /* @38 */
3122 YYSYMBOL_f_kw_arg_value = 424, /* f_kw_arg_value */
3123 YYSYMBOL_f_kwarg_arg_value = 425, /* f_kwarg_arg_value */
3124 YYSYMBOL_args_tail_basic_arg_value = 426, /* args_tail_basic_arg_value */
3125 YYSYMBOL_args_tail = 427, /* args_tail */
3126 YYSYMBOL_f_opt_arg_value = 428, /* f_opt_arg_value */
3127 YYSYMBOL_f_opt_arg_arg_value = 429, /* f_opt_arg_arg_value */
3128 YYSYMBOL_opt_args_tail_args_tail = 430, /* opt_args_tail_args_tail */
3129 YYSYMBOL_f_args = 431, /* f_args */
3130 YYSYMBOL_args_forward = 432, /* args_forward */
3131 YYSYMBOL_f_bad_arg = 433, /* f_bad_arg */
3132 YYSYMBOL_f_norm_arg = 434, /* f_norm_arg */
3133 YYSYMBOL_f_arg_asgn = 435, /* f_arg_asgn */
3134 YYSYMBOL_f_arg_item = 436, /* f_arg_item */
3135 YYSYMBOL_f_arg = 437, /* f_arg */
3136 YYSYMBOL_f_label = 438, /* f_label */
3137 YYSYMBOL_kwrest_mark = 439, /* kwrest_mark */
3138 YYSYMBOL_f_no_kwarg = 440, /* f_no_kwarg */
3139 YYSYMBOL_f_kwrest = 441, /* f_kwrest */
3140 YYSYMBOL_restarg_mark = 442, /* restarg_mark */
3141 YYSYMBOL_f_rest_arg = 443, /* f_rest_arg */
3142 YYSYMBOL_blkarg_mark = 444, /* blkarg_mark */
3143 YYSYMBOL_f_block_arg = 445, /* f_block_arg */
3144 YYSYMBOL_opt_f_block_arg = 446, /* opt_f_block_arg */
3145 YYSYMBOL_value_expr_singleton_expr = 447, /* value_expr_singleton_expr */
3146 YYSYMBOL_singleton = 448, /* singleton */
3147 YYSYMBOL_singleton_expr = 449, /* singleton_expr */
3148 YYSYMBOL_450_39 = 450, /* $@39 */
3149 YYSYMBOL_assoc_list = 451, /* assoc_list */
3150 YYSYMBOL_assocs = 452, /* assocs */
3151 YYSYMBOL_assoc = 453, /* assoc */
3152 YYSYMBOL_operation2 = 454, /* operation2 */
3153 YYSYMBOL_operation3 = 455, /* operation3 */
3154 YYSYMBOL_dot_or_colon = 456, /* dot_or_colon */
3155 YYSYMBOL_call_op = 457, /* call_op */
3156 YYSYMBOL_call_op2 = 458, /* call_op2 */
3157 YYSYMBOL_rparen = 459, /* rparen */
3158 YYSYMBOL_rbracket = 460, /* rbracket */
3159 YYSYMBOL_rbrace = 461, /* rbrace */
3160 YYSYMBOL_trailer = 462, /* trailer */
3161 YYSYMBOL_term = 463, /* term */
3162 YYSYMBOL_terms = 464, /* terms */
3163 YYSYMBOL_none = 465 /* none */
3164};
3165typedef enum yysymbol_kind_t yysymbol_kind_t;
3166
3167
3168
3169
3170#ifdef short
3171# undef short
3172#endif
3173
3174/* On compilers that do not define __PTRDIFF_MAX__ etc., make sure
3175 <limits.h> and (if available) <stdint.h> are included
3176 so that the code can choose integer types of a good width. */
3177
3178#ifndef __PTRDIFF_MAX__
3179# include <limits.h> /* INFRINGES ON USER NAME SPACE */
3180# if defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__
3181# include <stdint.h> /* INFRINGES ON USER NAME SPACE */
3182# define YY_STDINT_H
3183# endif
3184#endif
3185
3186/* Narrow types that promote to a signed type and that can represent a
3187 signed or unsigned integer of at least N bits. In tables they can
3188 save space and decrease cache pressure. Promoting to a signed type
3189 helps avoid bugs in integer arithmetic. */
3190
3191#ifdef __INT_LEAST8_MAX__
3192typedef __INT_LEAST8_TYPE__ yytype_int8;
3193#elif defined YY_STDINT_H
3194typedef int_least8_t yytype_int8;
3195#else
3196typedef signed char yytype_int8;
3197#endif
3198
3199#ifdef __INT_LEAST16_MAX__
3200typedef __INT_LEAST16_TYPE__ yytype_int16;
3201#elif defined YY_STDINT_H
3202typedef int_least16_t yytype_int16;
3203#else
3204typedef short yytype_int16;
3205#endif
3206
3207/* Work around bug in HP-UX 11.23, which defines these macros
3208 incorrectly for preprocessor constants. This workaround can likely
3209 be removed in 2023, as HPE has promised support for HP-UX 11.23
3210 (aka HP-UX 11i v2) only through the end of 2022; see Table 2 of
3211 <https://h20195.www2.hpe.com/V2/getpdf.aspx/4AA4-7673ENW.pdf>. */
3212#ifdef __hpux
3213# undef UINT_LEAST8_MAX
3214# undef UINT_LEAST16_MAX
3215# define UINT_LEAST8_MAX 255
3216# define UINT_LEAST16_MAX 65535
3217#endif
3218
3219#if defined __UINT_LEAST8_MAX__ && __UINT_LEAST8_MAX__ <= __INT_MAX__
3220typedef __UINT_LEAST8_TYPE__ yytype_uint8;
3221#elif (!defined __UINT_LEAST8_MAX__ && defined YY_STDINT_H \
3222 && UINT_LEAST8_MAX <= INT_MAX)
3223typedef uint_least8_t yytype_uint8;
3224#elif !defined __UINT_LEAST8_MAX__ && UCHAR_MAX <= INT_MAX
3225typedef unsigned char yytype_uint8;
3226#else
3227typedef short yytype_uint8;
3228#endif
3229
3230#if defined __UINT_LEAST16_MAX__ && __UINT_LEAST16_MAX__ <= __INT_MAX__
3231typedef __UINT_LEAST16_TYPE__ yytype_uint16;
3232#elif (!defined __UINT_LEAST16_MAX__ && defined YY_STDINT_H \
3233 && UINT_LEAST16_MAX <= INT_MAX)
3234typedef uint_least16_t yytype_uint16;
3235#elif !defined __UINT_LEAST16_MAX__ && USHRT_MAX <= INT_MAX
3236typedef unsigned short yytype_uint16;
3237#else
3238typedef int yytype_uint16;
3239#endif
3240
3241#ifndef YYPTRDIFF_T
3242# if defined __PTRDIFF_TYPE__ && defined __PTRDIFF_MAX__
3243# define YYPTRDIFF_T __PTRDIFF_TYPE__
3244# define YYPTRDIFF_MAXIMUM __PTRDIFF_MAX__
3245# elif defined PTRDIFF_MAX
3246# ifndef ptrdiff_t
3247# include <stddef.h> /* INFRINGES ON USER NAME SPACE */
3248# endif
3249# define YYPTRDIFF_T ptrdiff_t
3250# define YYPTRDIFF_MAXIMUM PTRDIFF_MAX
3251# else
3252# define YYPTRDIFF_T long
3253# define YYPTRDIFF_MAXIMUM LONG_MAX
3254# endif
3255#endif
3256
3257#ifndef YYSIZE_T
3258# ifdef __SIZE_TYPE__
3259# define YYSIZE_T __SIZE_TYPE__
3260# elif defined size_t
3261# define YYSIZE_T size_t
3262# elif defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__
3263# include <stddef.h> /* INFRINGES ON USER NAME SPACE */
3264# define YYSIZE_T size_t
3265# else
3266# define YYSIZE_T unsigned
3267# endif
3268#endif
3269
3270#define YYSIZE_MAXIMUM \
3271 YY_CAST (YYPTRDIFF_T, \
3272 (YYPTRDIFF_MAXIMUM < YY_CAST (YYSIZE_T, -1) \
3273 ? YYPTRDIFF_MAXIMUM \
3274 : YY_CAST (YYSIZE_T, -1)))
3275
3276#define YYSIZEOF(X) YY_CAST (YYPTRDIFF_T, sizeof (X))
3277
3278
3279/* Stored state numbers (used for stacks). */
3280typedef yytype_int16 yy_state_t;
3281
3282/* State numbers in computations. */
3283typedef int yy_state_fast_t;
3284
3285#ifndef YY_
3286# if defined YYENABLE_NLS && YYENABLE_NLS
3287# if ENABLE_NLS
3288# include <libintl.h> /* INFRINGES ON USER NAME SPACE */
3289# define YY_(Msgid) dgettext ("bison-runtime", Msgid)
3290# endif
3291# endif
3292# ifndef YY_
3293# define YY_(Msgid) Msgid
3294# endif
3295#endif
3296
3297
3298#ifndef YY_ATTRIBUTE_PURE
3299# if defined __GNUC__ && 2 < __GNUC__ + (96 <= __GNUC_MINOR__)
3300# define YY_ATTRIBUTE_PURE __attribute__ ((__pure__))
3301# else
3302# define YY_ATTRIBUTE_PURE
3303# endif
3304#endif
3305
3306#ifndef YY_ATTRIBUTE_UNUSED
3307# if defined __GNUC__ && 2 < __GNUC__ + (7 <= __GNUC_MINOR__)
3308# define YY_ATTRIBUTE_UNUSED __attribute__ ((__unused__))
3309# else
3310# define YY_ATTRIBUTE_UNUSED
3311# endif
3312#endif
3313
3314/* Suppress unused-variable warnings by "using" E. */
3315#if ! defined lint || defined __GNUC__
3316# define YY_USE(E) ((void) (E))
3317#else
3318# define YY_USE(E) /* empty */
3319#endif
3320
3321/* Suppress an incorrect diagnostic about yylval being uninitialized. */
3322#if defined __GNUC__ && ! defined __ICC && 406 <= __GNUC__ * 100 + __GNUC_MINOR__
3323# if __GNUC__ * 100 + __GNUC_MINOR__ < 407
3324# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \
3325 _Pragma ("GCC diagnostic push") \
3326 _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")
3327# else
3328# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \
3329 _Pragma ("GCC diagnostic push") \
3330 _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"") \
3331 _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
3332# endif
3333# define YY_IGNORE_MAYBE_UNINITIALIZED_END \
3334 _Pragma ("GCC diagnostic pop")
3335#else
3336# define YY_INITIAL_VALUE(Value) Value
3337#endif
3338#ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
3339# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
3340# define YY_IGNORE_MAYBE_UNINITIALIZED_END
3341#endif
3342#ifndef YY_INITIAL_VALUE
3343# define YY_INITIAL_VALUE(Value) /* Nothing. */
3344#endif
3345
3346#if defined __cplusplus && defined __GNUC__ && ! defined __ICC && 6 <= __GNUC__
3347# define YY_IGNORE_USELESS_CAST_BEGIN \
3348 _Pragma ("GCC diagnostic push") \
3349 _Pragma ("GCC diagnostic ignored \"-Wuseless-cast\"")
3350# define YY_IGNORE_USELESS_CAST_END \
3351 _Pragma ("GCC diagnostic pop")
3352#endif
3353#ifndef YY_IGNORE_USELESS_CAST_BEGIN
3354# define YY_IGNORE_USELESS_CAST_BEGIN
3355# define YY_IGNORE_USELESS_CAST_END
3356#endif
3357
3358
3359#define YY_ASSERT(E) ((void) (0 && (E)))
3360
3361#if 1
3362
3363/* The parser invokes alloca or malloc; define the necessary symbols. */
3364
3365# ifdef YYSTACK_USE_ALLOCA
3366# if YYSTACK_USE_ALLOCA
3367# ifdef __GNUC__
3368# define YYSTACK_ALLOC __builtin_alloca
3369# elif defined __BUILTIN_VA_ARG_INCR
3370# include <alloca.h> /* INFRINGES ON USER NAME SPACE */
3371# elif defined _AIX
3372# define YYSTACK_ALLOC __alloca
3373# elif defined _MSC_VER
3374# include <malloc.h> /* INFRINGES ON USER NAME SPACE */
3375# define alloca _alloca
3376# else
3377# define YYSTACK_ALLOC alloca
3378# if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS
3379# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
3380 /* Use EXIT_SUCCESS as a witness for stdlib.h. */
3381# ifndef EXIT_SUCCESS
3382# define EXIT_SUCCESS 0
3383# endif
3384# endif
3385# endif
3386# endif
3387# endif
3388
3389# ifdef YYSTACK_ALLOC
3390 /* Pacify GCC's 'empty if-body' warning. */
3391# define YYSTACK_FREE(Ptr) do { /* empty */; } while (0)
3392# ifndef YYSTACK_ALLOC_MAXIMUM
3393 /* The OS might guarantee only one guard page at the bottom of the stack,
3394 and a page size can be as small as 4096 bytes. So we cannot safely
3395 invoke alloca (N) if N exceeds 4096. Use a slightly smaller number
3396 to allow for a few compiler-allocated temporary stack slots. */
3397# define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
3398# endif
3399# else
3400# define YYSTACK_ALLOC YYMALLOC
3401# define YYSTACK_FREE YYFREE
3402# ifndef YYSTACK_ALLOC_MAXIMUM
3403# define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
3404# endif
3405# if (defined __cplusplus && ! defined EXIT_SUCCESS \
3406 && ! ((defined YYMALLOC || defined malloc) \
3407 && (defined YYFREE || defined free)))
3408# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
3409# ifndef EXIT_SUCCESS
3410# define EXIT_SUCCESS 0
3411# endif
3412# endif
3413# ifndef YYMALLOC
3414# define YYMALLOC malloc
3415# if ! defined malloc && ! defined EXIT_SUCCESS
3416void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
3417# endif
3418# endif
3419# ifndef YYFREE
3420# define YYFREE free
3421# if ! defined free && ! defined EXIT_SUCCESS
3422void free (void *); /* INFRINGES ON USER NAME SPACE */
3423# endif
3424# endif
3425# endif
3426#endif /* 1 */
3427
3428#if (! defined yyoverflow \
3429 && (! defined __cplusplus \
3430 || (defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL \
3431 && defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
3432
3433/* A type that is properly aligned for any stack member. */
3434union yyalloc
3435{
3436 yy_state_t yyss_alloc;
3437 YYSTYPE yyvs_alloc;
3438 YYLTYPE yyls_alloc;
3439};
3440
3441/* The size of the maximum gap between one aligned stack and the next. */
3442# define YYSTACK_GAP_MAXIMUM (YYSIZEOF (union yyalloc) - 1)
3443
3444/* The size of an array large to enough to hold all stacks, each with
3445 N elements. */
3446# define YYSTACK_BYTES(N) \
3447 ((N) * (YYSIZEOF (yy_state_t) + YYSIZEOF (YYSTYPE) \
3448 + YYSIZEOF (YYLTYPE)) \
3449 + 2 * YYSTACK_GAP_MAXIMUM)
3450
3451# define YYCOPY_NEEDED 1
3452
3453/* Relocate STACK from its old location to the new one. The
3454 local variables YYSIZE and YYSTACKSIZE give the old and new number of
3455 elements in the stack, and YYPTR gives the new location of the
3456 stack. Advance YYPTR to a properly aligned location for the next
3457 stack. */
3458# define YYSTACK_RELOCATE(Stack_alloc, Stack) \
3459 do \
3460 { \
3461 YYPTRDIFF_T yynewbytes; \
3462 YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
3463 Stack = &yyptr->Stack_alloc; \
3464 yynewbytes = yystacksize * YYSIZEOF (*Stack) + YYSTACK_GAP_MAXIMUM; \
3465 yyptr += yynewbytes / YYSIZEOF (*yyptr); \
3466 } \
3467 while (0)
3468
3469#endif
3470
3471#if defined YYCOPY_NEEDED && YYCOPY_NEEDED
3472/* Copy COUNT objects from SRC to DST. The source and destination do
3473 not overlap. */
3474# ifndef YYCOPY
3475# if defined __GNUC__ && 1 < __GNUC__
3476# define YYCOPY(Dst, Src, Count) \
3477 __builtin_memcpy (Dst, Src, YY_CAST (YYSIZE_T, (Count)) * sizeof (*(Src)))
3478# else
3479# define YYCOPY(Dst, Src, Count) \
3480 do \
3481 { \
3482 YYPTRDIFF_T yyi; \
3483 for (yyi = 0; yyi < (Count); yyi++) \
3484 (Dst)[yyi] = (Src)[yyi]; \
3485 } \
3486 while (0)
3487# endif
3488# endif
3489#endif /* !YYCOPY_NEEDED */
3490
3491/* YYFINAL -- State number of the termination state. */
3492#define YYFINAL 143
3493/* YYLAST -- Last index in YYTABLE. */
3494#define YYLAST 16117
3495
3496/* YYNTOKENS -- Number of terminals. */
3497#define YYNTOKENS 162
3498/* YYNNTS -- Number of nonterminals. */
3499#define YYNNTS 304
3500/* YYNRULES -- Number of rules. */
3501#define YYNRULES 812
3502/* YYNSTATES -- Number of states. */
3503#define YYNSTATES 1375
3504
3505/* YYMAXUTOK -- Last valid token kind. */
3506#define YYMAXUTOK 361
3507
3508
3509/* YYTRANSLATE(TOKEN-NUM) -- Symbol number corresponding to TOKEN-NUM
3510 as returned by yylex, with out-of-bounds checking. */
3511#define YYTRANSLATE(YYX) \
3512 (0 <= (YYX) && (YYX) <= YYMAXUTOK \
3513 ? YY_CAST (yysymbol_kind_t, yytranslate[YYX]) \
3514 : YYSYMBOL_YYUNDEF)
3515
3516/* YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM
3517 as returned by yylex. */
3518static const yytype_uint8 yytranslate[] =
3519{
3520 0, 2, 2, 2, 2, 2, 2, 2, 2, 72,
3521 154, 75, 73, 74, 2, 2, 2, 2, 2, 2,
3522 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
3523 2, 2, 161, 148, 2, 2, 2, 146, 141, 2,
3524 157, 158, 144, 142, 155, 143, 69, 145, 2, 2,
3525 2, 2, 2, 2, 2, 2, 2, 2, 136, 160,
3526 138, 134, 137, 135, 2, 2, 2, 2, 2, 2,
3527 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
3528 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
3529 2, 153, 70, 159, 140, 2, 156, 2, 2, 2,
3530 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
3531 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
3532 2, 2, 2, 151, 139, 152, 149, 2, 89, 90,
3533 91, 92, 76, 77, 78, 79, 95, 96, 84, 83,
3534 80, 81, 82, 87, 88, 93, 94, 98, 85, 86,
3535 97, 2, 2, 2, 2, 2, 2, 2, 2, 2,
3536 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
3537 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
3538 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
3539 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
3540 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
3541 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
3542 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
3543 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
3544 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
3545 2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
3546 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
3547 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
3548 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
3549 35, 36, 37, 38, 39, 40, 41, 42, 43, 44,
3550 45, 46, 47, 48, 49, 50, 51, 52, 53, 54,
3551 55, 56, 57, 58, 59, 60, 61, 62, 63, 64,
3552 65, 66, 67, 68, 71, 99, 100, 101, 102, 103,
3553 104, 105, 106, 107, 108, 109, 110, 111, 112, 113,
3554 114, 115, 116, 117, 118, 119, 120, 121, 122, 123,
3555 124, 125, 126, 127, 128, 129, 130, 131, 132, 133,
3556 147, 150
3557};
3558
3559#if YYDEBUG
3560/* YYRLINE[YYN] -- Source line where rule number YYN was defined. */
3561static const yytype_int16 yyrline[] =
3562{
3563 0, 3165, 3159, 3165, 3165, 3165, 3165, 3185, 3190, 3195,
3564 3202, 3207, 3214, 3216, 3234, 3230, 3235, 3234, 3246, 3243,
3565 3256, 3261, 3266, 3273, 3275, 3274, 3284, 3286, 3293, 3293,
3566 3298, 3303, 3311, 3320, 3327, 3333, 3339, 3350, 3361, 3370,
3567 3383, 3384, 3389, 3389, 3390, 3401, 3406, 3407, 3414, 3414,
3568 3415, 3415, 3415, 3415, 3415, 3415, 3415, 3415, 3415, 3416,
3569 3416, 3416, 3419, 3420, 3426, 3426, 3426, 3433, 3434, 3441,
3570 3444, 3445, 3450, 3455, 3460, 3466, 3465, 3479, 3478, 3491,
3571 3494, 3505, 3515, 3514, 3528, 3528, 3529, 3535, 3535, 3535,
3572 3542, 3543, 3546, 3546, 3549, 3550, 3557, 3565, 3565, 3565,
3573 3572, 3579, 3588, 3593, 3598, 3603, 3608, 3614, 3620, 3626,
3574 3631, 3638, 3647, 3648, 3655, 3656, 3663, 3668, 3673, 3678,
3575 3678, 3678, 3683, 3688, 3693, 3698, 3703, 3708, 3715, 3716,
3576 3723, 3728, 3736, 3736, 3741, 3746, 3746, 3752, 3757, 3762,
3577 3767, 3775, 3775, 3780, 3785, 3785, 3790, 3795, 3800, 3805,
3578 3813, 3821, 3824, 3829, 3834, 3841, 3841, 3841, 3842, 3847,
3579 3850, 3855, 3858, 3863, 3863, 3871, 3872, 3873, 3874, 3875,
3580 3876, 3877, 3878, 3879, 3880, 3881, 3882, 3883, 3884, 3885,
3581 3886, 3887, 3888, 3889, 3890, 3891, 3892, 3893, 3894, 3895,
3582 3896, 3897, 3898, 3899, 3900, 3903, 3903, 3903, 3904, 3904,
3583 3905, 3905, 3905, 3906, 3906, 3906, 3906, 3907, 3907, 3907,
3584 3907, 3908, 3908, 3908, 3909, 3909, 3909, 3909, 3910, 3910,
3585 3910, 3910, 3911, 3911, 3911, 3911, 3912, 3912, 3912, 3912,
3586 3913, 3913, 3913, 3913, 3914, 3914, 3917, 3917, 3918, 3918,
3587 3918, 3918, 3918, 3918, 3918, 3918, 3918, 3919, 3919, 3919,
3588 3919, 3919, 3919, 3919, 3920, 3925, 3930, 3935, 3940, 3945,
3589 3950, 3955, 3960, 3965, 3970, 3975, 3980, 3985, 3986, 3991,
3590 3996, 4001, 4006, 4011, 4016, 4021, 4026, 4031, 4036, 4041,
3591 4048, 4048, 4048, 4049, 4050, 4053, 4062, 4063, 4069, 4076,
3592 4077, 4078, 4079, 4082, 4087, 4095, 4101, 4108, 4115, 4115,
3593 4118, 4119, 4120, 4125, 4132, 4137, 4146, 4151, 4161, 4173,
3594 4174, 4180, 4181, 4182, 4183, 4188, 4195, 4195, 4200, 4205,
3595 4211, 4217, 4221, 4221, 4259, 4264, 4272, 4277, 4285, 4290,
3596 4295, 4300, 4308, 4313, 4322, 4323, 4327, 4332, 4337, 4355,
3597 4355, 4355, 4355, 4355, 4355, 4355, 4355, 4356, 4357, 4358,
3598 4364, 4363, 4376, 4376, 4382, 4388, 4393, 4398, 4403, 4409,
3599 4414, 4419, 4424, 4429, 4436, 4441, 4446, 4451, 4452, 4458,
3600 4460, 4472, 4481, 4490, 4499, 4498, 4513, 4512, 4525, 4533,
3601 4533, 4534, 4577, 4576, 4599, 4598, 4618, 4617, 4636, 4634,
3602 4651, 4649, 4664, 4669, 4674, 4679, 4694, 4694, 4697, 4704,
3603 4722, 4729, 4737, 4745, 4752, 4760, 4769, 4778, 4786, 4793,
3604 4800, 4808, 4815, 4821, 4836, 4843, 4848, 4854, 4861, 4868,
3605 4869, 4870, 4873, 4874, 4877, 4879, 4888, 4889, 4896, 4897,
3606 4900, 4905, 4913, 4913, 4913, 4918, 4923, 4928, 4933, 4940,
3607 4946, 4953, 4954, 4961, 4961, 4963, 4963, 4963, 4963, 4963,
3608 4963, 4963, 4963, 4963, 4966, 4974, 4974, 4974, 4974, 4974,
3609 4974, 4979, 4984, 4989, 4994, 4999, 5005, 5010, 5015, 5020,
3610 5025, 5030, 5035, 5040, 5045, 5052, 5053, 5059, 5069, 5073,
3611 5076, 5081, 5088, 5090, 5094, 5099, 5102, 5108, 5113, 5120,
3612 5126, 5119, 5153, 5160, 5169, 5176, 5175, 5186, 5194, 5206,
3613 5216, 5225, 5232, 5239, 5250, 5256, 5261, 5267, 5277, 5282,
3614 5290, 5296, 5304, 5306, 5321, 5321, 5342, 5348, 5353, 5359,
3615 5367, 5376, 5377, 5380, 5381, 5383, 5394, 5399, 5407, 5408,
3616 5411, 5412, 5418, 5426, 5427, 5433, 5439, 5444, 5449, 5456,
3617 5459, 5466, 5469, 5474, 5477, 5484, 5491, 5492, 5493, 5500,
3618 5507, 5514, 5520, 5527, 5534, 5541, 5547, 5552, 5557, 5564,
3619 5563, 5574, 5580, 5588, 5594, 5599, 5604, 5609, 5614, 5617,
3620 5618, 5625, 5630, 5637, 5645, 5651, 5658, 5659, 5666, 5673,
3621 5678, 5683, 5688, 5695, 5697, 5704, 5710, 5722, 5723, 5738,
3622 5743, 5750, 5756, 5757, 5764, 5765, 5765, 5765, 5765, 5765,
3623 5765, 5765, 5766, 5767, 5768, 5771, 5771, 5771, 5771, 5771,
3624 5771, 5771, 5771, 5772, 5777, 5780, 5788, 5800, 5807, 5814,
3625 5819, 5824, 5832, 5852, 5855, 5860, 5864, 5867, 5872, 5875,
3626 5882, 5885, 5886, 5889, 5900, 5901, 5902, 5909, 5922, 5934,
3627 5941, 5941, 5941, 5941, 5945, 5949, 5956, 5958, 5965, 5965,
3628 5969, 5973, 5980, 5980, 5983, 5983, 5987, 5991, 5999, 6003,
3629 6011, 6015, 6023, 6027, 6035, 6039, 6065, 6068, 6067, 6082,
3630 6090, 6094, 6098, 6113, 6114, 6117, 6122, 6125, 6126, 6129,
3631 6145, 6146, 6149, 6157, 6158, 6166, 6167, 6168, 6169, 6172,
3632 6173, 6174, 6177, 6177, 6178, 6181, 6182, 6183, 6184, 6185,
3633 6186, 6187, 6190, 6200, 6207, 6207, 6214, 6215, 6219, 6218,
3634 6228, 6231, 6232, 6241, 6251, 6252, 6252, 6269, 6269, 6269,
3635 6269, 6269, 6269, 6269, 6269, 6269, 6270, 6287, 6287, 6287,
3636 6287, 6287, 6287, 6292, 6297, 6302, 6307, 6312, 6317, 6322,
3637 6327, 6332, 6337, 6342, 6347, 6352, 6358, 6365, 6376, 6385,
3638 6394, 6403, 6414, 6415, 6425, 6432, 6437, 6456, 6458, 6469,
3639 6489, 6490, 6493, 6499, 6505, 6513, 6514, 6517, 6523, 6531,
3640 6532, 6535, 6541, 6549, 6554, 6558, 6558, 6588, 6590, 6589,
3641 6602, 6603, 6610, 6612, 6637, 6642, 6647, 6654, 6660, 6665,
3642 6678, 6678, 6678, 6679, 6682, 6683, 6684, 6687, 6688, 6691,
3643 6692, 6695, 6696, 6699, 6702, 6705, 6708, 6709, 6712, 6720,
3644 6727, 6728, 6732
3645};
3646#endif
3647
3649#define YY_ACCESSING_SYMBOL(State) YY_CAST (yysymbol_kind_t, yystos[State])
3650
3651#if 1
3652/* The user-facing name of the symbol whose (internal) number is
3653 YYSYMBOL. No bounds checking. */
3654static const char *yysymbol_name (yysymbol_kind_t yysymbol) YY_ATTRIBUTE_UNUSED;
3655
3656/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
3657 First, the terminals, then, starting at YYNTOKENS, nonterminals. */
3658static const char *const yytname[] =
3659{
3660 "\"end-of-input\"", "error", "\"invalid token\"", "\"'class'\"",
3661 "\"'module'\"", "\"'def'\"", "\"'undef'\"", "\"'begin'\"",
3662 "\"'rescue'\"", "\"'ensure'\"", "\"'end'\"", "\"'if'\"", "\"'unless'\"",
3663 "\"'then'\"", "\"'elsif'\"", "\"'else'\"", "\"'case'\"", "\"'when'\"",
3664 "\"'while'\"", "\"'until'\"", "\"'for'\"", "\"'break'\"", "\"'next'\"",
3665 "\"'redo'\"", "\"'retry'\"", "\"'in'\"", "\"'do'\"",
3666 "\"'do' for condition\"", "\"'do' for block\"", "\"'do' for lambda\"",
3667 "\"'return'\"", "\"'yield'\"", "\"'super'\"", "\"'self'\"", "\"'nil'\"",
3668 "\"'true'\"", "\"'false'\"", "\"'and'\"", "\"'or'\"", "\"'not'\"",
3669 "\"'if' modifier\"", "\"'unless' modifier\"", "\"'while' modifier\"",
3670 "\"'until' modifier\"", "\"'rescue' modifier\"", "\"'alias'\"",
3671 "\"'defined?'\"", "\"'BEGIN'\"", "\"'END'\"", "\"'__LINE__'\"",
3672 "\"'__FILE__'\"", "\"'__ENCODING__'\"", "\"local variable or method\"",
3673 "\"method\"", "\"global variable\"", "\"instance variable\"",
3674 "\"constant\"", "\"class variable\"", "\"label\"", "\"integer literal\"",
3675 "\"float literal\"", "\"rational literal\"", "\"imaginary literal\"",
3676 "\"char literal\"", "\"numbered reference\"", "\"back reference\"",
3677 "\"literal content\"", "tREGEXP_END", "\"dummy end\"", "'.'",
3678 "\"backslash\"", "\"escaped space\"", "\"escaped horizontal tab\"",
3679 "\"escaped form feed\"", "\"escaped carriage return\"",
3680 "\"escaped vertical tab\"", "\"unary+\"", "\"unary-\"", "\"**\"",
3681 "\"<=>\"", "\"==\"", "\"===\"", "\"!=\"", "\">=\"", "\"<=\"", "\"&&\"",
3682 "\"||\"", "\"=~\"", "\"!~\"", "\"..\"", "\"...\"", "\"(..\"", "\"(...\"",
3683 "\"[]\"", "\"[]=\"", "\"<<\"", "\">>\"", "\"&.\"", "\"::\"",
3684 "\":: at EXPR_BEG\"", "\"operator-assignment\"", "\"=>\"", "\"(\"",
3685 "\"( arg\"", "\"[\"", "\"{\"", "\"{ arg\"", "\"*\"", "\"**arg\"",
3686 "\"&\"", "\"->\"", "\"symbol literal\"", "\"string literal\"",
3687 "\"backtick literal\"", "\"regexp literal\"", "\"word list\"",
3688 "\"verbatim word list\"", "\"symbol list\"", "\"verbatim symbol list\"",
3689 "\"terminator\"", "\"'}'\"", "\"'#{'\"", "tSTRING_DVAR", "tLAMBEG",
3690 "tLABEL_END", "tIGNORED_NL", "tCOMMENT", "tEMBDOC_BEG", "tEMBDOC",
3691 "tEMBDOC_END", "tHEREDOC_BEG", "tHEREDOC_END", "k__END__", "tLOWEST",
3692 "'='", "'?'", "':'", "'>'", "'<'", "'|'", "'^'", "'&'", "'+'", "'-'",
3693 "'*'", "'/'", "'%'", "tUMINUS_NUM", "'!'", "'~'", "tLAST_TOKEN", "'{'",
3694 "'}'", "'['", "'\\n'", "','", "'`'", "'('", "')'", "']'", "';'", "' '",
3695 "$accept", "option_terms", "compstmt_top_stmts", "$@1", "program",
3696 "top_stmts", "top_stmt", "block_open", "begin_block", "compstmt_stmts",
3697 "$@2", "$@3", "bodystmt", "$@4", "stmts", "stmt_or_begin", "$@5",
3698 "allow_exits", "k_END", "$@6", "stmt", "asgn_mrhs", "asgn_command_rhs",
3699 "command_asgn", "op_asgn_command_rhs",
3700 "def_endless_method_endless_command", "endless_command", "option_'\\n'",
3701 "command_rhs", "expr", "$@7", "$@8", "def_name", "defn_head", "$@9",
3702 "defs_head", "value_expr_expr", "expr_value", "$@10", "$@11",
3703 "expr_value_do", "command_call", "value_expr_command_call",
3704 "command_call_value", "block_command", "cmd_brace_block", "fcall",
3705 "command", "mlhs", "mlhs_inner", "mlhs_basic", "mlhs_mlhs_item",
3706 "mlhs_item", "mlhs_head", "mlhs_node", "lhs", "cname", "cpath", "fname",
3707 "fitem", "undef_list", "$@12", "op", "reswords", "asgn_arg_rhs", "arg",
3708 "op_asgn_arg_rhs", "range_expr_arg", "def_endless_method_endless_arg",
3709 "ternary", "endless_arg", "relop", "rel_expr", "lex_ctxt",
3710 "begin_defined", "after_rescue", "value_expr_arg", "arg_value",
3711 "aref_args", "arg_rhs", "paren_args", "opt_paren_args", "opt_call_args",
3712 "value_expr_command", "call_args", "$@13", "command_args", "block_arg",
3713 "opt_block_arg", "args", "arg_splat", "mrhs_arg", "mrhs", "primary",
3714 "$@14", "$@15", "@16", "@17", "$@18", "$@19", "$@20", "$@21", "$@22",
3715 "$@23", "$@24", "value_expr_primary", "primary_value", "k_begin", "k_if",
3716 "k_unless", "k_while", "k_until", "k_case", "k_for", "k_class",
3717 "k_module", "k_def", "k_do", "k_do_block", "k_rescue", "k_ensure",
3718 "k_when", "k_else", "k_elsif", "k_end", "k_return", "k_yield", "then",
3719 "do", "if_tail", "opt_else", "for_var", "f_marg", "mlhs_f_marg",
3720 "f_margs", "f_rest_marg", "f_any_kwrest", "$@25", "f_eq",
3721 "f_kw_primary_value", "f_kwarg_primary_value",
3722 "args_tail_basic_primary_value", "block_args_tail", "excessed_comma",
3723 "f_opt_primary_value", "f_opt_arg_primary_value",
3724 "opt_args_tail_block_args_tail", "block_param", "opt_block_param_def",
3725 "block_param_def", "opt_block_param", "opt_bv_decl", "bv_decls", "bvar",
3726 "max_numparam", "numparam", "it_id", "@26", "$@27", "lambda",
3727 "f_larglist", "lambda_body", "$@28", "do_block", "block_call",
3728 "method_call", "brace_block", "@29", "brace_body", "@30", "do_body",
3729 "case_args", "case_body", "cases", "p_pvtbl", "p_pktbl", "p_in_kwarg",
3730 "$@31", "p_case_body", "p_cases", "p_top_expr", "p_top_expr_body",
3731 "p_expr", "p_as", "p_alt", "p_lparen", "p_lbracket", "p_expr_basic",
3732 "$@32", "p_args", "p_args_head", "p_args_tail", "p_find", "p_rest",
3733 "p_args_post", "p_arg", "p_kwargs", "p_kwarg", "p_kw", "p_kw_label",
3734 "p_kwrest", "p_kwnorest", "p_any_kwrest", "p_value",
3735 "range_expr_p_primitive", "p_primitive", "p_variable", "p_var_ref",
3736 "p_expr_ref", "p_const", "opt_rescue", "exc_list", "exc_var",
3737 "opt_ensure", "literal", "strings", "string", "string1", "xstring",
3738 "regexp", "nonempty_list_' '", "words_tWORDS_BEG_word_list", "words",
3739 "word_list", "word", "words_tSYMBOLS_BEG_symbol_list", "symbols",
3740 "symbol_list", "words_tQWORDS_BEG_qword_list", "qwords",
3741 "words_tQSYMBOLS_BEG_qsym_list", "qsymbols", "qword_list", "qsym_list",
3742 "string_contents", "xstring_contents", "regexp_contents",
3743 "string_content", "@33", "@34", "@35", "@36", "string_dend",
3744 "string_dvar", "symbol", "ssym", "sym", "dsym", "numeric",
3745 "simple_numeric", "nonlocal_var", "user_variable", "keyword_variable",
3746 "var_ref", "var_lhs", "backref", "$@37", "superclass",
3747 "f_opt_paren_args", "f_paren_args", "f_arglist", "@38", "f_kw_arg_value",
3748 "f_kwarg_arg_value", "args_tail_basic_arg_value", "args_tail",
3749 "f_opt_arg_value", "f_opt_arg_arg_value", "opt_args_tail_args_tail",
3750 "f_args", "args_forward", "f_bad_arg", "f_norm_arg", "f_arg_asgn",
3751 "f_arg_item", "f_arg", "f_label", "kwrest_mark", "f_no_kwarg",
3752 "f_kwrest", "restarg_mark", "f_rest_arg", "blkarg_mark", "f_block_arg",
3753 "opt_f_block_arg", "value_expr_singleton_expr", "singleton",
3754 "singleton_expr", "$@39", "assoc_list", "assocs", "assoc", "operation2",
3755 "operation3", "dot_or_colon", "call_op", "call_op2", "rparen",
3756 "rbracket", "rbrace", "trailer", "term", "terms", "none", YY_NULLPTR
3757};
3758
3759static const char *
3760yysymbol_name (yysymbol_kind_t yysymbol)
3761{
3762 return yytname[yysymbol];
3763}
3764#endif
3765
3766#define YYPACT_NINF (-1157)
3767
3768#define yypact_value_is_default(Yyn) \
3769 ((Yyn) == YYPACT_NINF)
3770
3771#define YYTABLE_NINF (-813)
3772
3773#define yytable_value_is_error(Yyn) \
3774 ((Yyn) == YYTABLE_NINF)
3775
3776/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
3777 STATE-NUM. */
3778static const yytype_int16 yypact[] =
3779{
3780 -1157, 5728, 173, -1157, -1157, -1157, -1157, 10499, -1157, -1157,
3781 -1157, -1157, -1157, -1157, -1157, 11554, 11554, -1157, -1157, -1157,
3782 -1157, 6788, -1157, -1157, -1157, -1157, 565, 10345, 36, 57,
3783 -1157, -1157, -1157, -1157, 6164, 6944, -1157, -1157, 6320, -1157,
3784 -1157, -1157, -1157, -1157, -1157, -1157, -1157, 13114, 13114, 13114,
3785 13114, 179, 9258, 9416, 12034, 12274, 10800, -1157, 10191, -1157,
3786 -1157, -1157, 181, 181, 181, 181, 1367, 13234, 13114, -1157,
3787 311, -1157, -1157, 1444, -1157, -1157, -1157, -1157, -1157, 601,
3788 460, 460, -1157, -1157, 242, 377, 301, -1157, 297, 13834,
3789 -1157, 353, -1157, 2423, -1157, -1157, -1157, -1157, 372, 376,
3790 -1157, 528, -1157, 11434, 11434, -1157, -1157, 9878, 13952, 14070,
3791 14188, 10036, 11554, 7412, -1157, 677, 134, -1157, -1157, 391,
3792 -1157, -1157, -1157, -1157, -1157, -1157, -1157, -1157, -1157, -1157,
3793 -1157, -1157, -1157, -1157, -1157, -1157, -1157, 350, 480, -1157,
3794 413, 512, -1157, -1157, -1157, -1157, -1157, -1157, -1157, -1157,
3795 -1157, -1157, -1157, -1157, -1157, -1157, -1157, -1157, -1157, -1157,
3796 -1157, -1157, -1157, -1157, -1157, -1157, -1157, -1157, -1157, -1157,
3797 -1157, -1157, -1157, -1157, -1157, -1157, -1157, -1157, -1157, -1157,
3798 -1157, -1157, -1157, -1157, -1157, -1157, -1157, -1157, -1157, -1157,
3799 -1157, -1157, -1157, -1157, -1157, -1157, -1157, -1157, -1157, -1157,
3800 -1157, -1157, -1157, -1157, -1157, -1157, -1157, -1157, -1157, -1157,
3801 -1157, -1157, -1157, -1157, -1157, -1157, -1157, -1157, -1157, -1157,
3802 363, -1157, -1157, -1157, -1157, -1157, -1157, 381, 13114, 477,
3803 9416, 13114, 13114, 13114, -1157, 13114, 460, 460, -1157, 415,
3804 4858, -1157, 474, -1157, -1157, -1157, 427, -1157, 632, 45,
3805 51, 499, 59, 458, -1157, -1157, 11674, -1157, 11554, -1157,
3806 -1157, 11175, 13354, 872, -1157, 491, -1157, 9574, -1157, -1157,
3807 -1157, -1157, -1157, 538, 242, -1157, 646, -1157, 553, 681,
3808 5978, 5978, 686, -1157, 9258, 613, 311, -1157, 1444, 36,
3809 662, -1157, -1157, 621, 548, 811, -1157, 474, 651, 811,
3810 -1157, 36, 767, 1367, 14306, 669, 669, 674, -1157, 652,
3811 694, 703, 715, -1157, -1157, 889, -1157, -1157, 1023, 1113,
3812 744, -1157, 678, 678, 678, 678, 801, -1157, -1157, -1157,
3813 -1157, -1157, -1157, -1157, 5880, 761, 11434, 11434, 11434, 11434,
3814 -1157, 13354, 13354, 1652, 782, 787, -1157, 1652, -1157, 791,
3815 -1157, -1157, -1157, -1157, 826, -1157, -1157, -1157, -1157, -1157,
3816 -1157, -1157, 9258, 10918, 793, -1157, -1157, 13114, 13114, 13114,
3817 13114, 13114, -1157, -1157, 13114, 13114, 13114, 13114, 13114, 13114,
3818 13114, 13114, -1157, 13114, -1157, -1157, 13114, 13114, 13114, 13114,
3819 13114, 13114, 13114, 13114, 13114, 13114, -1157, -1157, 4752, 11554,
3820 5125, 538, 8194, -1157, 601, -1157, 119, 119, 11434, 9106,
3821 9106, -1157, 311, 796, 897, -1157, -1157, 721, 937, 102,
3822 110, 122, 710, 965, 11434, 365, -1157, 840, 737, -1157,
3823 -1157, -1157, -1157, 125, 397, 558, 581, 630, 735, 753,
3824 755, 771, -1157, -1157, -1157, -1157, -1157, 835, -1157, -1157,
3825 11036, -1157, -1157, -1157, 14687, -1157, -1157, -1157, -1157, -1157,
3826 -1157, 359, -1157, -1157, -1157, 798, 846, 880, -1157, 13114,
3827 11794, -1157, -1157, 14785, 11554, 14883, -1157, -1157, 12154, -1157,
3828 13114, 36, -1157, 851, 36, 867, -1157, -1157, 865, 167,
3829 -1157, -1157, -1157, -1157, -1157, 10499, -1157, -1157, 13114, 874,
3830 14981, 14883, -1157, 57, 36, -1157, -1157, 5335, 878, 877,
3831 -1157, 12034, -1157, -1157, 12274, -1157, -1157, -1157, 491, 740,
3832 -1157, 888, -1157, -1157, 14306, 15079, 11554, 15177, -1157, -1157,
3833 -1157, -1157, -1157, -1157, -1157, -1157, -1157, -1157, -1157, -1157,
3834 1140, 246, 1230, 315, 13114, -1157, -1157, 9726, -1157, -1157,
3835 -1157, -1157, -1157, 11314, -1157, -1157, -1157, -1157, -1157, -1157,
3836 -1157, -1157, -1157, -1157, 1145, -1157, -1157, -1157, -1157, -1157,
3837 890, -1157, -1157, 893, -1157, -1157, -1157, 895, 36, -1157,
3838 -1157, -1157, 918, -1157, 898, 13114, 112, -1157, -1157, 1003,
3839 902, 1008, -1157, 13474, 8194, 311, 13474, 8194, -1157, 909,
3840 -1157, -1157, -1157, 133, 133, 12394, 36, 14306, 913, -1157,
3841 12514, -1157, 681, 2991, 2991, 2991, 2991, 3190, 2205, 2991,
3842 2991, 5978, 5978, 966, 966, -1157, 3908, 1716, 1716, 1646,
3843 53, 53, 681, 681, 681, 1703, 1703, 7568, 6476, 7880,
3844 6632, 538, -1157, 36, 916, 775, -1157, 805, -1157, 7100,
3845 -1157, -1157, 133, -1157, 8346, 1059, 8802, 206, 133, 133,
3846 1058, 1057, 142, 15275, 11554, 15373, -1157, -1157, -1157, 740,
3847 -1157, -1157, -1157, -1157, 15471, 11554, 14687, 8194, 13354, -1157,
3848 -1157, -1157, 36, -1157, -1157, -1157, 4334, 13594, 13594, 10499,
3849 -1157, 13114, 13714, 13714, 13114, -1157, 474, -1157, -1157, 458,
3850 6008, 7256, 36, 464, 473, 13114, 13114, -1157, -1157, 11914,
3851 -1157, 12154, -1157, -1157, -1157, 13354, 4858, -1157, 50, 538,
3852 538, 13594, -1157, 364, -1157, -1157, 811, 14306, 888, 554,
3853 322, 36, 72, 405, -1157, -1157, 1012, -1157, 420, -1157,
3854 181, -1157, -1157, 420, 181, -1157, 681, 952, -1157, 1145,
3855 1348, -1157, 940, 36, 958, -1157, 335, -1157, -1157, 794,
3856 -1157, 1652, -1157, -1157, 981, 13114, 1652, -1157, -1157, -1157,
3857 -1157, -1157, 1661, -1157, -1157, 565, 1073, -1157, 4858, 1075,
3858 133, -1157, 1073, 1075, 133, -1157, -1157, 971, -1157, -1157,
3859 -1157, -1157, -1157, 13114, -1157, -1157, -1157, 970, 972, 1085,
3860 -1157, -1157, 888, 14306, 1074, -1157, -1157, 1089, 1000, 4329,
3861 -1157, -1157, -1157, 747, 476, -1157, -1157, 1005, -1157, -1157,
3862 -1157, -1157, 826, 980, 824, 11794, -1157, -1157, -1157, -1157,
3863 826, -1157, 1141, -1157, 954, -1157, 1133, -1157, -1157, -1157,
3864 -1157, -1157, -1157, 12634, 133, -1157, 1058, 133, 90, 184,
3865 36, 162, 200, 11434, 311, 11434, 8194, 1179, 322, -1157,
3866 36, 133, 167, 10653, -1157, 134, 377, -1157, 4040, -1157,
3867 -1157, -1157, -1157, 13114, -1157, 565, -1157, -1157, -1157, 502,
3868 -1157, -1157, 36, 998, 167, -1157, -1157, -1157, -1157, 639,
3869 -1157, -1157, -1157, -1157, -1157, 678, -1157, 678, 678, 678,
3870 -1157, 36, -1157, 1145, -1157, 1315, -1157, -1157, 1103, 890,
3871 -1157, -1157, 1001, 1009, -1157, -1157, 1010, -1157, 1013, -1157,
3872 1001, 13474, -1157, -1157, -1157, -1157, -1157, -1157, -1157, 1015,
3873 12754, -1157, 888, 543, -1157, -1157, -1157, 15569, 11554, 15667,
3874 -1157, -1157, 13114, 13594, 13594, 1011, -1157, -1157, -1157, 13594,
3875 13594, -1157, -1157, 12874, 1133, -1157, -1157, -1157, 9106, 11434,
3876 133, -1157, -1157, 133, -1157, 13114, -1157, 199, -1157, -1157,
3877 133, -1157, 203, 206, 8194, 311, 133, -1157, -1157, -1157,
3878 -1157, -1157, -1157, 13714, 13114, 13114, -1157, 13114, 13114, -1157,
3879 12154, -1157, 1543, 5576, -1157, -1157, 1025, 1028, -1157, 1661,
3880 -1157, 1661, -1157, 1652, -1157, 1661, -1157, -1157, 1073, 1075,
3881 13114, 13114, -1157, -1157, 13114, 1030, 11314, 11314, 13594, 13114,
3882 7724, 8036, 36, 549, 618, 4610, 4610, 4858, -1157, -1157,
3883 -1157, -1157, -1157, 13594, -1157, -1157, -1157, -1157, 970, -1157,
3884 1066, -1157, 1183, -1157, -1157, 119, -1157, -1157, -1157, 12994,
3885 8498, -1157, -1157, -1157, 133, -1157, -1157, 13114, 1652, -1157,
3886 -1157, 100, 1315, 1315, 1001, 1001, 1049, 1001, 4858, 4858,
3887 1068, 1068, 1015, -1157, -1157, 4858, 624, -1157, -1157, -1157,
3888 4762, 4762, 498, -1157, 3476, 635, 1159, -1157, 1333, -1157,
3889 -1157, 33, -1157, 1078, -1157, -1157, -1157, 1064, -1157, 1067,
3890 -1157, 14615, -1157, -1157, -1157, -1157, -1157, 885, -1157, -1157,
3891 -1157, 279, -1157, -1157, -1157, -1157, -1157, -1157, -1157, -1157,
3892 -1157, 114, -1157, -1157, -1157, 14424, 119, -1157, -1157, 9106,
3893 -1157, -1157, 8954, 8346, 13114, -1157, 352, 4610, 9106, -1157,
3894 36, 91, -1157, -1157, -1157, 1028, -1157, -1157, 1661, -1157,
3895 -1157, 1323, 9726, -1157, -1157, 8194, -1157, -1157, -1157, -1157,
3896 14615, 55, 36, 5051, -1157, 36, 1070, -1157, 1060, -1157,
3897 -1157, -1157, 1072, -1157, 11434, -1157, 1169, 5051, 14615, 14615,
3898 105, 1125, 4762, 4762, 498, 358, 17, 4610, 4610, -1157,
3899 1174, -1157, 944, 139, 183, 230, 8194, 311, -1157, 954,
3900 -1157, -1157, -1157, -1157, 119, 943, 133, 1071, 1083, -1157,
3901 9726, -1157, 1001, 890, -1157, 1088, -1157, -1157, -1157, 1094,
3902 -1157, 36, 918, 1098, 14542, 1100, -1157, -1157, -1157, 347,
3903 -1157, 1125, 1108, 1109, -1157, -1157, -1157, -1157, -1157, 36,
3904 -1157, -1157, 1110, -1157, 1112, -1157, -1157, -1157, -1157, -1157,
3905 -1157, -1157, -1157, -1157, -1157, -1157, 36, 36, 36, 36,
3906 36, 36, 240, 15765, 11554, 15863, 1141, -1157, 1183, -1157,
3907 -1157, 11434, 11434, -1157, 1457, -1157, 8194, 1081, -1157, -1157,
3908 794, -1157, 1323, -1157, 1105, 14542, 1323, -1157, -1157, 1202,
3909 961, 1763, -1157, -1157, 14615, -1157, 105, -1157, 14615, 5051,
3910 500, -1157, -1157, -1157, -1157, -1157, -1157, 250, 258, 36,
3911 273, 307, -1157, -1157, 8650, -1157, -1157, -1157, 841, -1157,
3912 -1157, 133, -1157, -1157, 890, -1157, -1157, 1114, 1115, -1157,
3913 961, 1116, 1118, -1157, 15961, 1114, 1119, 36, 1119, -1157,
3914 -1157, 393, 196, 1457, -1157, -1157, -1157, 1763, -1157, 1763,
3915 -1157, 1323, -1157, 1763, -1157, 1124, 1126, -1157, 14615, -1157,
3916 -1157, -1157, -1157, -1157, 1114, 1114, 1132, 1114, -1157, -1157,
3917 1763, -1157, -1157, 1114, -1157
3918};
3919
3920/* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM.
3921 Performed when YYTABLE does not specify something else to do. Zero
3922 means the default is an error. */
3923static const yytype_int16 yydefact[] =
3924{
3925 2, 0, 0, 47, 405, 406, 407, 0, 398, 399,
3926 400, 403, 26, 26, 26, 392, 393, 394, 395, 417,
3927 418, 322, 696, 695, 697, 698, 64, 0, 64, 0,
3928 812, 700, 699, 701, 97, 99, 690, 689, 98, 691,
3929 685, 686, 687, 688, 634, 706, 707, 0, 0, 0,
3930 0, 0, 0, 0, 812, 812, 126, 489, 660, 660,
3931 662, 664, 0, 0, 0, 0, 0, 0, 0, 6,
3932 3, 8, 26, 10, 43, 49, 40, 58, 61, 46,
3933 715, 715, 70, 91, 322, 90, 0, 112, 0, 116,
3934 128, 0, 237, 79, 246, 253, 282, 283, 267, 284,
3935 397, 0, 350, 0, 0, 87, 87, 0, 0, 0,
3936 0, 0, 359, 322, 369, 94, 367, 339, 340, 633,
3937 635, 341, 342, 643, 343, 649, 345, 653, 344, 655,
3938 346, 632, 677, 678, 631, 683, 694, 702, 703, 347,
3939 0, 348, 7, 1, 205, 216, 206, 229, 202, 222,
3940 212, 211, 232, 233, 227, 210, 209, 204, 230, 234,
3941 235, 214, 203, 217, 221, 223, 215, 208, 224, 231,
3942 226, 225, 218, 228, 213, 201, 220, 219, 200, 207,
3943 198, 199, 195, 196, 197, 155, 157, 156, 190, 191,
3944 186, 168, 169, 170, 177, 174, 176, 171, 172, 192,
3945 193, 178, 179, 183, 187, 173, 175, 165, 166, 167,
3946 180, 181, 182, 184, 185, 188, 189, 194, 160, 162,
3947 33, 158, 159, 161, 401, 402, 404, 0, 786, 0,
3948 0, 333, 789, 325, 660, 0, 715, 715, 316, 0,
3949 298, 299, 328, 317, 110, 321, 812, 329, 0, 702,
3950 703, 0, 348, 812, 782, 111, 812, 507, 0, 107,
3951 65, 64, 0, 0, 28, 812, 12, 0, 11, 27,
3952 295, 392, 393, 508, 0, 261, 0, 359, 362, 262,
3953 251, 252, 356, 24, 0, 0, 3, 21, 23, 64,
3954 114, 20, 352, 0, 64, 64, 300, 0, 0, 64,
3955 780, 64, 0, 0, 0, 715, 715, 124, 396, 0,
3956 132, 133, 140, 486, 680, 0, 679, 681, 0, 0,
3957 0, 640, 644, 656, 650, 658, 684, 74, 273, 274,
3958 809, 808, 5, 810, 0, 0, 0, 0, 0, 0,
3959 812, 0, 0, 746, 0, 714, 388, 746, 712, 0,
3960 390, 408, 512, 502, 100, 514, 366, 409, 514, 498,
3961 812, 130, 0, 122, 117, 812, 77, 0, 0, 0,
3962 0, 0, 291, 292, 0, 0, 0, 0, 249, 250,
3963 0, 0, 75, 0, 289, 290, 0, 0, 0, 0,
3964 0, 0, 0, 0, 0, 0, 799, 800, 802, 812,
3965 801, 0, 0, 86, 84, 85, 0, 0, 0, 0,
3966 0, 376, 3, 4, 0, 429, 428, 0, 0, 702,
3967 703, 348, 150, 151, 0, 0, 153, 812, 0, 702,
3968 703, 348, 386, 225, 218, 228, 213, 195, 196, 197,
3969 155, 156, 778, 81, 80, 777, 776, 0, 775, 109,
3970 64, 108, 802, 801, 0, 368, 636, 812, 812, 163,
3971 785, 356, 332, 788, 324, 0, 0, 0, 812, 0,
3972 0, 318, 327, 802, 812, 801, 812, 812, 0, 319,
3973 747, 64, 312, 812, 64, 812, 311, 323, 0, 64,
3974 365, 73, 30, 32, 31, 0, 812, 296, 0, 0,
3975 802, 801, 812, 0, 64, 354, 14, 0, 113, 0,
3976 357, 807, 806, 301, 807, 303, 358, 781, 0, 139,
3977 684, 127, 119, 714, 0, 802, 812, 801, 487, 666,
3978 682, 669, 667, 661, 637, 638, 663, 639, 665, 641,
3979 0, 0, 0, 0, 0, 811, 9, 0, 34, 35,
3980 36, 37, 297, 0, 71, 72, 753, 750, 749, 748,
3981 751, 759, 760, 747, 0, 766, 761, 770, 769, 765,
3982 812, 762, 719, 812, 725, 745, 728, 731, 64, 726,
3983 752, 754, 755, 757, 731, 718, 764, 442, 441, 768,
3984 731, 772, 724, 0, 0, 0, 0, 0, 486, 0,
3985 512, 101, 486, 0, 0, 0, 64, 0, 118, 131,
3986 0, 525, 259, 266, 268, 269, 270, 277, 278, 271,
3987 272, 247, 248, 275, 276, 525, 64, 263, 264, 265,
3988 254, 255, 256, 257, 258, 293, 294, 790, 792, 791,
3989 793, 322, 505, 64, 812, 790, 792, 791, 793, 322,
3990 506, 812, 0, 420, 0, 419, 0, 0, 0, 0,
3991 0, 374, 356, 802, 812, 801, 379, 384, 150, 151,
3992 152, 708, 382, 710, 802, 812, 801, 0, 0, 797,
3993 798, 82, 64, 361, 790, 791, 322, 0, 0, 0,
3994 812, 0, 0, 0, 0, 784, 330, 326, 331, 812,
3995 790, 791, 64, 790, 791, 0, 0, 783, 306, 313,
3996 308, 315, 803, 364, 29, 0, 279, 13, 355, 0,
3997 812, 0, 25, 115, 22, 353, 64, 0, 125, 794,
3998 138, 64, 790, 791, 488, 670, 0, 642, 0, 646,
3999 0, 652, 648, 0, 0, 654, 260, 0, 38, 0,
4000 440, 432, 434, 64, 437, 430, 0, 723, 774, 0,
4001 722, 0, 741, 713, 0, 0, 0, 738, 717, 591,
4002 763, 767, 0, 743, 771, 64, 59, 62, 286, 280,
4003 0, 716, 60, 281, 0, 487, 510, 0, 487, 415,
4004 416, 511, 497, 333, 92, 93, 41, 335, 0, 45,
4005 334, 129, 123, 0, 0, 69, 48, 67, 0, 304,
4006 328, 236, 42, 0, 348, 523, 523, 0, 812, 812,
4007 512, 504, 104, 0, 509, 313, 812, 812, 310, 503,
4008 102, 309, 812, 351, 812, 421, 812, 423, 88, 422,
4009 372, 373, 412, 0, 0, 525, 0, 0, 794, 355,
4010 64, 790, 791, 0, 0, 0, 0, 150, 151, 154,
4011 64, 0, 64, 0, 360, 499, 95, 50, 304, 238,
4012 57, 245, 164, 0, 787, 64, 320, 812, 812, 509,
4013 812, 812, 64, 812, 64, 56, 244, 302, 120, 509,
4014 26, 671, 668, 675, 676, 645, 647, 657, 651, 659,
4015 39, 64, 439, 0, 756, 0, 773, 720, 764, 812,
4016 730, 729, 731, 731, 444, 727, 731, 758, 731, 755,
4017 731, 0, 812, 812, 389, 391, 488, 96, 488, 338,
4018 0, 812, 121, 356, 812, 812, 812, 802, 812, 801,
4019 524, 524, 0, 0, 0, 0, 105, 804, 812, 0,
4020 0, 103, 410, 812, 18, 623, 414, 413, 0, 0,
4021 0, 424, 426, 0, 89, 0, 516, 0, 377, 523,
4022 0, 378, 509, 0, 0, 0, 0, 509, 387, 779,
4023 83, 500, 501, 0, 0, 0, 812, 0, 0, 307,
4024 314, 363, 746, 0, 431, 433, 435, 438, 721, 0,
4025 742, 0, 739, 0, 734, 0, 736, 744, 66, 288,
4026 0, 0, 26, 26, 333, 336, 0, 0, 0, 0,
4027 790, 791, 64, 790, 791, 0, 0, 285, 54, 242,
4028 55, 243, 106, 0, 52, 240, 53, 241, 624, 625,
4029 812, 626, 812, 15, 427, 0, 370, 371, 517, 0,
4030 0, 524, 375, 380, 0, 709, 383, 0, 746, 490,
4031 493, 0, 0, 0, 731, 731, 731, 731, 63, 287,
4032 812, 812, 337, 44, 68, 305, 509, 615, 621, 587,
4033 0, 0, 0, 524, 64, 524, 575, 660, 0, 614,
4034 78, 533, 539, 541, 543, 537, 536, 571, 538, 580,
4035 583, 586, 592, 593, 582, 546, 601, 594, 547, 602,
4036 603, 604, 605, 606, 607, 608, 609, 611, 610, 612,
4037 613, 590, 76, 51, 239, 0, 0, 628, 411, 0,
4038 19, 630, 0, 0, 0, 518, 812, 0, 0, 385,
4039 64, 0, 674, 673, 672, 436, 740, 735, 0, 732,
4040 737, 478, 0, 476, 475, 0, 599, 600, 151, 619,
4041 0, 563, 64, 564, 568, 64, 0, 558, 0, 812,
4042 561, 574, 0, 616, 0, 617, 0, 534, 0, 0,
4043 581, 585, 597, 598, 0, 524, 524, 0, 0, 589,
4044 0, 627, 0, 702, 703, 348, 0, 3, 16, 812,
4045 519, 521, 522, 520, 0, 530, 0, 480, 0, 495,
4046 0, 491, 731, 812, 447, 812, 453, 474, 456, 459,
4047 479, 64, 755, 459, 446, 459, 452, 513, 515, 64,
4048 556, 578, 566, 565, 557, 569, 805, 559, 588, 64,
4049 540, 535, 571, 542, 572, 576, 660, 584, 579, 595,
4050 596, 620, 545, 555, 544, 551, 64, 64, 64, 64,
4051 64, 64, 356, 802, 812, 801, 812, 629, 812, 425,
4052 526, 0, 0, 381, 0, 492, 0, 0, 733, 451,
4053 0, 450, 0, 470, 0, 0, 454, 465, 467, 0,
4054 445, 0, 472, 562, 0, 570, 0, 618, 0, 0,
4055 0, 548, 549, 550, 552, 553, 554, 794, 355, 64,
4056 790, 791, 622, 17, 0, 531, 532, 484, 64, 482,
4057 485, 0, 494, 448, 812, 458, 457, 459, 459, 477,
4058 455, 459, 459, 356, 802, 459, 567, 64, 572, 573,
4059 577, 509, 812, 0, 481, 496, 449, 0, 471, 0,
4060 468, 0, 462, 0, 464, 794, 355, 473, 0, 560,
4061 528, 529, 527, 483, 459, 459, 459, 459, 469, 463,
4062 0, 460, 466, 459, 461
4063};
4064
4065/* YYPGOTO[NTERM-NUM]. */
4066static const yytype_int16 yypgoto[] =
4067{
4068 -1157, -94, 1022, -1157, -1157, -1157, 957, -1157, 792, -12,
4069 -1157, -1157, -537, -1157, 165, 797, -1157, 5, -1157, -1157,
4070 15, -1157, -1157, -429, -1157, -1157, -546, 152, -564, -100,
4071 -1157, -1157, 436, 2755, -1157, 3121, -1157, 34, -1157, -1157,
4072 1194, -36, -1157, 696, -1157, -245, 1467, -10, 1195, -162,
4073 30, -425, -52, -1157, 0, 3606, -396, 1197, -48, 9,
4074 -1157, -1157, -5, -1157, -1157, 4536, -1157, -1157, -1157, -1157,
4075 -557, 1210, -1157, 280, 813, 67, -1157, 56, -1157, 551,
4076 21, 625, -373, -1157, 77, -1157, 41, -400, -236, 18,
4077 -394, -1157, -566, -35, -1157, -1157, -1157, -1157, -1157, -1157,
4078 -1157, -1157, -1157, -1157, -1157, -1157, 984, -1157, -1157, -1157,
4079 -1157, -1157, -1157, -1157, -1157, -1157, -1157, -1157, -1157, -1157,
4080 -1157, -1157, 361, -1157, -256, 1929, 2367, -372, 343, 120,
4081 -798, -1157, -832, -807, 575, 424, -406, -1157, 107, 54,
4082 -1157, -1157, 180, -1157, -1156, 47, 87, -1157, 264, -1157,
4083 -1157, 118, -1157, 2, 286, 29, -66, -1157, -1157, 260,
4084 -1157, -1157, -1157, 482, -1157, -1157, -104, -1157, -515, -1157,
4085 985, -1157, -762, -1157, -735, -829, -529, -1157, 11, -1157,
4086 -1157, -897, -183, -1157, -1157, -1157, -1157, 164, -1157, -471,
4087 -1157, -922, -630, -1035, -388, -947, -805, -1157, 174, -1157,
4088 -1157, -857, 175, -1157, -1157, -652, 182, -1157, -1157, -1157,
4089 93, -1157, -1157, 92, 449, 589, -1157, 1243, 868, 906,
4090 26, -1157, 1198, -1157, 822, -1157, 1290, -1157, -1157, 1610,
4091 -1157, 1641, -1157, -1157, -58, -1157, -1157, -206, -1157, -1157,
4092 -1157, -1157, -1157, -1157, 16, -1157, -1157, -1157, -1157, -7,
4093 -49, 3405, -1, 1254, 3833, 2743, -1157, -1157, 89, 714,
4094 38, -1157, 609, -1157, -1157, -298, -703, 608, -435, -333,
4095 -229, -1141, -443, -323, -738, 215, -409, -680, -1157, -729,
4096 -1157, -589, -1157, -455, -541, -1157, -1157, -1157, -1157, -1157,
4097 32, -398, -336, -1157, -1157, -90, 1261, 597, -528, 52,
4098 -234, -24, -62, 14
4099};
4100
4101/* YYDEFGOTO[NTERM-NUM]. */
4102static const yytype_int16 yydefgoto[] =
4103{
4104 0, 332, 69, 1, 2, 70, 71, 267, 268, 651,
4105 1132, 1268, 652, 1042, 286, 287, 503, 224, 72, 495,
4106 288, 74, 75, 76, 77, 78, 776, 488, 806, 79,
4107 625, 611, 443, 236, 863, 237, 405, 406, 408, 964,
4108 409, 82, 795, 807, 83, 601, 274, 85, 86, 289,
4109 87, 521, 88, 89, 90, 239, 426, 427, 218, 219,
4110 220, 689, 640, 222, 92, 93, 94, 95, 96, 97,
4111 779, 394, 98, 552, 498, 553, 241, 242, 293, 811,
4112 828, 829, 481, 243, 482, 258, 259, 245, 471, 644,
4113 247, 799, 800, 99, 402, 509, 846, 660, 853, 1138,
4114 856, 854, 677, 594, 597, 100, 276, 102, 103, 104,
4115 105, 106, 107, 108, 109, 110, 111, 355, 358, 953,
4116 1129, 843, 958, 959, 791, 277, 278, 654, 838, 960,
4117 961, 418, 751, 752, 753, 754, 570, 764, 765, 1214,
4118 1215, 1216, 1325, 1287, 1218, 1219, 1283, 1220, 1152, 1153,
4119 1221, 1208, 1318, 1319, 528, 734, 890, 313, 1141, 114,
4120 1059, 1211, 1276, 359, 115, 116, 356, 598, 599, 602,
4121 603, 967, 844, 1203, 940, 1025, 815, 1314, 847, 1362,
4122 1204, 1090, 1231, 1092, 1093, 1187, 1188, 1094, 1296, 1162,
4123 1163, 1164, 1096, 1097, 1244, 1166, 1098, 1099, 1100, 1101,
4124 1102, 571, 1104, 1105, 1106, 1107, 1108, 1109, 1110, 1111,
4125 954, 1040, 1126, 1130, 117, 118, 119, 120, 121, 122,
4126 322, 123, 124, 540, 738, 125, 126, 542, 127, 128,
4127 129, 130, 541, 543, 315, 319, 320, 533, 736, 735,
4128 891, 993, 1144, 892, 131, 132, 316, 133, 134, 135,
4129 136, 249, 250, 139, 251, 252, 855, 672, 344, 345,
4130 346, 347, 572, 573, 574, 910, 576, 577, 762, 578,
4131 579, 580, 581, 919, 583, 584, 585, 586, 587, 588,
4132 589, 590, 591, 592, 757, 446, 447, 448, 678, 298,
4133 485, 254, 719, 642, 681, 676, 401, 490, 824, 1170,
4134 513, 655, 413, 270
4135};
4136
4137/* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If
4138 positive, shift that token. If negative, reduce the rule whose
4139 number is the opposite. If YYTABLE_NINF, syntax error. */
4140static const yytype_int16 yytable[] =
4141{
4142 138, 318, 221, 404, 404, 238, 238, 404, 334, 317,
4143 314, 400, 455, 411, 595, 142, 73, 479, 225, 226,
4144 582, 308, 221, 223, 582, 453, 643, 484, 917, 670,
4145 909, 327, 760, 246, 246, 656, 264, 364, 963, 783,
4146 285, 292, 257, 223, 812, 575, 333, 253, 253, 575,
4147 782, 138, 138, 221, 308, 311, 307, 780, 911, 326,
4148 784, 515, 641, 444, 649, 517, 291, 291, 296, 300,
4149 697, 995, 294, 308, 308, 308, 698, 335, 697, 908,
4150 707, 941, 290, 333, 970, 787, 295, 299, 311, 323,
4151 324, 325, 244, 255, 348, 348, 816, -135, 997, 728,
4152 1142, 702, 238, 1095, 1095, 353, 221, 420, 430, 430,
4153 430, 297, 1026, 536, 538, -146, 707, 698, 686, 350,
4154 1209, 755, 504, 867, 870, 354, 1326, -141, 1232, 1122,
4155 246, 367, 653, 1320, 1176, -142, 783, 641, 407, 649,
4156 861, 412, 1242, 789, 253, -704, 769, -149, 769, 767,
4157 878, -705, -141, 731, 451, 773, 1176, 885, 475, 477,
4158 351, 489, 491, 1079, 770, 720, 1189, -148, 1103, 1103,
4159 349, 260, 913, 143, 879, -64, 465, 918, 262, -141,
4160 265, 805, 802, 562, -147, -142, 501, -144, 1177, 449,
4161 260, 720, 506, -149, -696, 1326, -142, 391, 392, 393,
4162 606, 790, 1320, 889, 341, 342, -135, -791, 266, -147,
4163 -578, 957, 653, 566, 1210, 1095, 1233, 1246, 285, 527,
4164 1143, 845, 1137, -696, 507, -145, -135, -135, -143, 138,
4165 -135, 995, 1245, 837, 1051, 282, 404, 404, 404, 404,
4166 1205, 554, 555, -149, 291, -137, 238, -790, 238, 479,
4167 348, 348, 522, -148, 1160, 1145, 1169, -132, 805, 805,
4168 472, 917, 333, -146, 1339, -133, 138, 472, 351, 308,
4169 486, -147, 285, 330, 483, 350, 246, -140, 859, 331,
4170 1103, 142, 73, 138, 460, 352, -144, 462, 463, 464,
4171 253, 850, 805, -141, 257, 353, 520, -139, 291, -141,
4172 911, 906, 860, 311, 906, 945, 755, 902, 404, 697,
4173 269, 697, 740, 707, 290, 698, 969, -135, 661, 976,
4174 -145, 260, 972, 1103, 404, 466, 467, 665, 308, 720,
4175 1103, 1103, 977, 138, 739, 487, 739, -142, 1201, -138,
4176 720, -791, 321, -142, 350, 1121, 1121, 1245, 792, 73,
4177 285, 1245, 1340, 330, 1049, -136, 1252, 1254, -134, 331,
4178 330, 138, 311, 608, 1009, 741, 331, 957, 998, 842,
4179 548, 549, 550, 551, 1202, 1008, 291, 1184, 932, 1028,
4180 1030, 744, 1258, 1261, -149, 1034, 1036, 1039, 333, 238,
4181 -149, -355, 290, 352, -148, 648, 833, 658, 659, 256,
4182 -148, 138, 840, 841, -146, 357, -143, -790, 138, 138,
4183 -146, 1340, -147, 486, 1066, -791, 291, 668, -147, -355,
4184 -355, 669, 650, 291, 291, 697, 1009, -144, 1156, 1157,
4185 -136, 698, 1185, -144, 745, 360, 1186, 1054, 582, 1103,
4186 238, 673, 657, 582, 567, -396, 512, 512, 1176, 648,
4187 -704, 512, 361, 518, 1165, 372, 373, 1121, 667, 690,
4188 755, -145, 755, 876, 238, 330, -695, -145, 246, 1123,
4189 648, 331, 522, -396, -396, -355, 568, 1000, 1002, -791,
4190 882, 1004, 253, 1006, -141, 1007, 529, 365, 486, 308,
4191 221, 1337, 887, -148, 1076, -695, 648, 472, -113, 472,
4192 1121, 260, 699, 59, 714, -132, 138, 1121, 1121, 384,
4193 385, 223, 260, 457, 805, 805, 238, -64, 459, -129,
4194 805, 805, 648, 311, 924, 695, 696, 682, 925, -396,
4195 1249, 1250, 896, 461, 297, 747, 698, 896, 261, -136,
4196 486, 531, 532, 726, 1360, 497, 138, -143, 917, 468,
4197 668, 1324, 138, -143, 1158, 522, 1167, 1257, 1260, -136,
4198 -136, 291, 1225, -136, 880, 1022, 529, 696, 748, 794,
4199 297, 781, 308, 881, 794, 469, 458, 946, 862, -137,
4200 -705, 321, 470, 777, 758, 951, 777, 758, 968, 805,
4201 697, 971, 707, 138, -812, 1050, 138, 396, -144, 476,
4202 908, 641, 986, 649, 805, 978, 311, -145, 291, 917,
4203 -149, 291, 458, 478, -142, 884, 1121, 343, 1228, 755,
4204 755, 531, 532, 798, 1238, 397, 398, -697, 798, 1146,
4205 1147, 1149, 1150, 839, 1230, -133, -143, 1234, 341, 342,
4206 605, 768, 834, 502, 836, 610, -149, 876, 496, 826,
4207 -698, 794, 794, 138, 238, 138, -697, 1253, 472, 1060,
4208 648, 797, 821, 831, -134, 238, 810, -140, 291, 582,
4209 291, 648, 1279, 1133, 1281, 888, 138, -148, 486, -698,
4210 582, 399, 822, -144, 221, 794, 1159, 893, -137, 486,
4211 830, 291, 308, 1328, 575, 256, 1226, 1332, 872, -700,
4212 831, 396, 260, 511, 1046, 223, 1241, 1047, -137, -137,
4213 450, -790, -137, 472, 1052, 396, 1256, 1259, 827, 260,
4214 1056, 396, 261, 939, 948, 1140, 311, 866, -700, 397,
4215 473, 1304, 1305, 1306, 831, 582, -97, 687, 688, 1321,
4216 821, 883, 1224, 397, 500, 1213, 396, 874, 694, 397,
4217 525, 522, -145, 404, 1196, 404, 705, 706, -143, 367,
4218 575, 981, 1366, -702, 895, 696, 897, 297, 308, 898,
4219 899, 505, -703, -134, 397, 452, 497, 1278, 817, -692,
4220 510, 1341, 721, 1346, -348, 474, 502, -64, 1251, 260,
4221 396, -702, -702, -134, -134, 823, -112, -134, 1139, 474,
4222 -703, -703, 311, 516, -699, 526, 396, -692, -692, -356,
4223 529, 537, -348, -348, 926, 444, 396, 928, 397, 663,
4224 -148, 915, -701, 519, -692, 906, 343, 1226, 1222, 524,
4225 974, 1226, 1270, -699, 397, 674, 1226, -356, -356, 539,
4226 -693, -139, 1091, 1091, 397, 937, 955, -702, 962, 929,
4227 962, -701, 561, -692, 823, 138, -703, 883, 221, 404,
4228 1012, -97, 1013, -692, 529, 531, 532, -97, -348, -693,
4229 291, 1224, 562, 1224, 664, 826, 1213, 1224, 512, 544,
4230 1213, 696, 1224, 823, 785, 1213, 508, 973, 788, 975,
4231 675, 1309, 1226, -356, 1226, 992, 1226, 472, 1226, 966,
4232 938, 1161, 566, 567, 679, 827, 1336, 794, 794, -144,
4233 1338, 777, 547, 794, 794, 1226, 593, 534, 1181, 531,
4234 532, -711, 691, 758, 948, 596, 492, 921, 238, 720,
4235 -135, 832, 600, 680, 648, 568, 493, 494, 1224, -145,
4236 1224, 1213, 1224, 1213, 1224, 1213, 1044, 1213, 609, 839,
4237 1273, 1055, 486, 662, 1091, 529, 545, 138, -143, 1222,
4238 -136, 1224, 666, 1222, 1213, 260, 514, 1041, 956, 957,
4239 873, 798, 291, 138, 1182, 1183, 912, 1229, 671, -134,
4240 692, 1061, 794, 1271, 1272, 101, 1015, 920, 291, 1010,
4241 1011, -98, 138, 1045, 1161, 260, 1343, 794, 1016, 248,
4242 248, 1017, 823, 1019, 1161, 1161, 709, 291, 530, 1038,
4243 531, 532, 823, 396, 693, 138, 138, 1070, 1071, 523,
4244 523, 1048, 711, 712, 1120, 1120, 717, 983, 1222, 1172,
4245 396, 1073, 1074, -129, -693, 725, 101, 101, 1136, 1175,
4246 309, 397, 1263, 727, 367, 756, 297, 683, 759, 138,
4247 761, 248, -443, 766, 1127, 771, 1131, 772, 397, 1334,
4248 774, 786, -693, -693, 291, 1345, 36, 37, 803, 39,
4249 1072, 825, 835, 309, 404, 842, 45, 46, 708, 1120,
4250 1120, 710, 845, 1120, 1154, 1154, 713, 248, 248, 529,
4251 308, 248, 417, 428, 428, 903, 248, 1264, 943, 944,
4252 1120, 723, 1265, 1267, 900, 1135, 949, 950, 389, 390,
4253 391, 392, 393, 905, 675, 914, -98, 922, -693, 923,
4254 1198, 1199, -98, 927, 1194, -328, 1206, 930, 138, 931,
4255 933, 138, 138, 934, 935, 507, 1120, 138, 529, 947,
4256 1227, 942, 534, 291, 531, 532, 291, 291, 957, 952,
4257 962, 138, 291, 990, 138, 770, 999, 984, 985, 1120,
4258 987, 988, 1120, 1032, 1001, 1003, 291, 1125, 1005, 291,
4259 -332, 404, 404, 333, 823, 763, 1120, 1120, 1120, 529,
4260 1062, 1120, 1120, 1063, 1266, -330, 1120, 1120, 1300, 308,
4261 1200, 534, 1128, 531, 532, 138, 1238, 556, 1277, 557,
4262 558, 559, 560, 801, 1148, -794, 529, 1151, 1239, 138,
4263 291, 1171, 1236, 962, 101, 1018, 1064, 1178, 1065, 1179,
4264 1067, 1077, 1180, 430, 291, 1235, 1176, 758, 1033, 758,
4265 1262, 1274, 535, 1322, 531, 532, 823, 1168, 869, 871,
4266 248, 1275, 248, 1280, 1329, 248, 248, 749, -794, 1282,
4267 308, 101, 750, 1286, 238, 1291, 869, 871, 1333, 737,
4268 648, 531, 532, 1294, 1295, 1298, 1057, 1299, 101, 1347,
4269 1349, 1351, 886, 1353, 1358, 138, -794, -794, 486, 864,
4270 955, -790, 1131, -791, 430, 1089, 1089, 1370, 309, 499,
4271 291, 546, 1207, 1120, 1197, 722, 529, 1120, 1120, 980,
4272 410, 796, 1342, 415, 724, 1315, 1316, 432, 395, 715,
4273 1288, 865, 1292, 138, 823, 1043, 1053, 823, 101, 1269,
4274 248, 248, 248, 248, 901, 248, 248, 996, 291, 1285,
4275 -794, 1217, -794, 1331, 1323, 1155, -790, 823, 758, 1284,
4276 1089, 1089, 1243, 604, 1089, 1363, 101, 309, 982, 742,
4277 904, 531, 532, 1361, 1247, 1248, 962, 1120, 1240, 1312,
4278 1313, 1089, 456, 1212, 743, 445, 1223, 556, 907, 557,
4279 558, 559, 560, 1207, 916, 556, 454, 557, 558, 559,
4280 560, 561, 0, 248, 0, 1173, 101, 36, 37, 1359,
4281 39, 0, 248, 101, 101, 0, 0, 1089, 0, 0,
4282 556, 562, 557, 558, 559, 560, 0, 0, 248, 0,
4283 0, 823, 823, 823, 1348, 1350, 0, 749, 1352, 1354,
4284 1089, 0, 1357, 1089, 886, 564, 40, 41, 42, 43,
4285 565, 566, 567, 0, 248, 1174, 0, 1089, 1089, 1089,
4286 0, 0, 1089, 1089, 0, 0, 0, 1089, 1089, 1237,
4287 0, 1368, 1369, 1371, 1372, 0, 0, 0, 248, 979,
4288 1374, 823, 0, 0, 568, 0, 0, 569, 84, 0,
4289 1344, 0, 0, 0, 1112, 1112, 0, 0, 0, 989,
4290 0, 991, 84, 84, 336, 337, 338, 339, 340, 1168,
4291 0, 101, 0, 0, 1029, 1031, 0, 1327, 994, 0,
4292 1035, 1037, 0, 0, 0, 0, 1335, 0, 309, 1317,
4293 248, 557, 558, 559, 560, 0, 0, 0, 0, 84,
4294 84, 0, 0, 0, 0, 0, 0, 0, 0, 1112,
4295 1112, 101, 0, 1112, 84, 1029, 1031, 101, 1035, 1037,
4296 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4297 1112, 0, 0, 0, 1089, 0, 0, 0, 1089, 1089,
4298 0, 0, 0, 0, 1364, 0, 1365, 0, 1367, 0,
4299 84, 84, 0, 0, 84, 0, 0, 248, 101, 84,
4300 248, 101, 0, 0, 1124, 1373, 1112, 0, 0, 248,
4301 0, 309, 0, 0, 813, 556, 0, 557, 558, 559,
4302 560, 561, 0, 0, 0, 0, 0, 0, 1124, 1112,
4303 0, 0, 1112, 0, 1113, 1113, 0, 0, 1089, 0,
4304 0, 562, 0, 0, 0, 0, 1112, 1112, 1112, 0,
4305 0, 1112, 1112, 0, 0, 563, 1112, 1112, 101, 0,
4306 101, 0, 0, 0, 0, 564, 0, 0, 248, 0,
4307 565, 566, 567, 0, 0, 0, 0, 0, 0, 248,
4308 0, 101, 248, 0, 0, 0, 0, 0, 0, 1113,
4309 1113, 813, 813, 1113, 0, 0, 0, 0, 0, 0,
4310 0, 0, 0, 0, 568, 0, 0, 569, 0, 0,
4311 1113, 0, 0, 0, 0, 0, 0, 84, 0, 248,
4312 1058, 0, 0, 0, 556, 813, 557, 558, 559, 560,
4313 561, 309, 0, 556, 0, 557, 558, 559, 560, 561,
4314 0, 0, 0, 84, 367, 84, 1113, 0, 84, 84,
4315 562, 0, 0, 0, 84, 0, 0, 0, 0, 562,
4316 0, 380, 381, 1112, 563, 0, 0, 1112, 1112, 1113,
4317 0, 84, 1113, 563, 564, 0, 0, 0, 0, 565,
4318 566, 567, 0, 564, 0, 0, 1113, 1113, 1113, 566,
4319 567, 1113, 1113, 0, 0, 0, 1113, 1113, 0, 0,
4320 0, 367, 0, 1255, 0, 0, 0, 309, 389, 390,
4321 391, 392, 393, 568, 367, 0, 569, 0, 380, 381,
4322 0, 84, 568, 84, 84, 84, 84, 1112, 84, 84,
4323 0, 380, 381, 0, 0, 556, 0, 557, 558, 559,
4324 560, 561, 0, 0, 0, 0, 1293, 0, 0, 84,
4325 0, 0, 0, 0, 0, 0, 1297, 248, 0, 248,
4326 101, 562, 386, 387, 388, 389, 390, 391, 392, 393,
4327 0, 0, 0, 1301, 1302, 1303, 0, 388, 389, 390,
4328 391, 392, 393, 0, 0, 564, 84, 0, 0, 84,
4329 0, 566, 567, 0, 0, 84, 84, 84, 0, 0,
4330 0, 0, 0, 1113, 0, 0, 0, 1113, 1113, 0,
4331 0, 84, 0, 1114, 1114, 0, 0, 0, 0, 0,
4332 0, 0, 0, 0, 568, 248, 0, 0, 0, 0,
4333 0, 0, 0, 0, 0, 0, 0, 84, 0, 0,
4334 0, 0, 248, 0, 0, 0, 0, 813, 813, 0,
4335 112, 1115, 1115, 813, 813, 0, 0, 0, 0, 0,
4336 0, 84, 101, 248, 112, 112, 0, 1113, 1114, 1114,
4337 0, 0, 1114, 0, 0, 0, 0, 0, 101, 0,
4338 0, 0, 0, 0, 0, 0, 0, 0, 0, 1114,
4339 0, 0, 0, 0, 84, 0, 0, 101, 0, 0,
4340 0, 112, 112, 0, 0, 0, 1115, 1115, 0, 0,
4341 1115, 0, 0, 84, 0, 0, 112, 0, 0, 0,
4342 101, 101, 813, 0, 0, 1114, 0, 1115, 0, 0,
4343 0, 0, 0, 0, 84, 0, 0, 813, 0, 0,
4344 84, 0, 0, 0, 0, 0, 0, 0, 1114, 0,
4345 0, 1114, 112, 112, 101, 0, 112, 0, 0, 0,
4346 0, 112, 0, 1115, 0, 1114, 1114, 1114, 0, 0,
4347 1114, 1114, 0, 0, 0, 1114, 1114, 0, 0, 0,
4348 84, 84, 0, 84, 84, 0, 1115, 0, 0, 1115,
4349 0, 0, 84, 0, 0, 0, 0, 84, 0, 0,
4350 0, 0, 0, 1115, 1115, 1115, 0, 0, 1115, 1115,
4351 0, 0, 0, 1115, 1115, 0, 0, 0, 0, 0,
4352 0, 0, 0, 0, 0, 0, 0, 0, 0, 1192,
4353 0, 0, 0, 101, 0, 0, 101, 101, 0, 0,
4354 0, 84, 101, 84, 0, 0, 0, 0, 0, 0,
4355 0, 84, 0, 0, 0, 0, 101, 0, 0, 101,
4356 0, 0, 84, 0, 84, 84, 0, 0, 0, 0,
4357 0, 0, 0, 0, 84, 84, 0, 0, 248, 112,
4358 0, 0, 1114, 0, 0, 0, 1114, 1114, 0, 0,
4359 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4360 101, 0, 84, 0, 0, 112, 0, 112, 84, 0,
4361 112, 112, 0, 0, 101, 0, 112, 0, 0, 0,
4362 1115, 0, 0, 0, 1115, 1115, 0, 0, 1290, 0,
4363 0, 0, 0, 112, 0, 0, 0, 0, 0, 0,
4364 0, 0, 0, 1116, 1116, 0, 1114, 0, 0, 0,
4365 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4366 0, 0, 0, 0, 0, 0, 0, 0, 248, 0,
4367 0, 0, 0, 0, 0, 248, 248, 0, 0, 0,
4368 101, 0, 0, 112, 1115, 112, 112, 112, 112, 1330,
4369 112, 112, 0, 0, 0, 0, 0, 0, 1116, 1116,
4370 0, 0, 1116, 367, 368, 369, 370, 371, 372, 373,
4371 374, 112, 376, 377, 0, 0, 0, 0, 101, 1116,
4372 380, 381, 0, 0, 0, 0, 0, 0, 0, 0,
4373 0, 0, 0, 0, 0, 1117, 1117, 0, 0, 0,
4374 84, 0, 84, 84, 0, 0, 0, 0, 112, 0,
4375 0, 112, 0, 0, 0, 1116, 0, 112, 112, 112,
4376 0, 0, 384, 385, 386, 387, 388, 389, 390, 391,
4377 392, 393, 0, 112, 0, 0, 0, 0, 1116, 0,
4378 0, 1116, 0, 0, 0, 0, 0, 0, 113, 0,
4379 1117, 1117, 0, 0, 1117, 1116, 1116, 1116, 0, 112,
4380 1116, 1116, 113, 113, 0, 1116, 1116, 0, 84, 0,
4381 0, 1117, 0, 0, 0, 0, 0, 0, 0, 0,
4382 0, 0, 0, 112, 0, 84, 0, 0, 0, 0,
4383 84, 84, 0, 0, 0, 0, 84, 84, 0, 113,
4384 113, 0, 0, 0, 0, 84, 84, 1117, 0, 0,
4385 0, 0, 0, 0, 113, 0, 112, 0, 0, 0,
4386 0, 84, 0, 0, 0, 0, 0, 0, 366, 0,
4387 1117, 0, 0, 1117, 0, 112, 0, 0, 0, 0,
4388 84, 0, 0, 0, 0, 0, 0, 1117, 1117, 1117,
4389 113, 113, 1117, 1117, 113, 0, 112, 1117, 1117, 113,
4390 0, 0, 112, 84, 84, 84, 0, 0, 0, 0,
4391 0, 0, 1116, 0, 0, 0, 1116, 1116, 0, 0,
4392 84, 367, 368, 369, 370, 371, 372, 373, 374, 375,
4393 376, 377, 378, 379, 0, 0, 0, 84, 380, 381,
4394 0, 0, 112, 112, 382, 112, 112, 0, 0, 0,
4395 0, 0, 0, 0, 112, 0, 0, 0, 0, 112,
4396 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4397 0, 0, 0, 0, 0, 0, 1116, 0, 383, 0,
4398 384, 385, 386, 387, 388, 389, 390, 391, 392, 393,
4399 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4400 0, 0, 0, 112, 1117, 112, 0, 0, 1117, 1117,
4401 0, 0, 0, 112, 0, 0, 84, 113, 0, 84,
4402 84, 0, 0, 0, 112, 84, 112, 112, 0, 0,
4403 0, 0, 0, 0, 0, 0, 112, 112, 0, 84,
4404 0, 0, 84, 113, 0, 113, 0, 0, 113, 113,
4405 0, 0, 0, 0, 113, 1118, 1118, 0, 0, 0,
4406 0, 84, 0, 0, 112, 0, 0, 0, 1117, 0,
4407 112, 113, 0, 0, 0, 0, 0, 0, 0, 0,
4408 0, 0, 0, 84, 0, 0, 1119, 1119, 0, 0,
4409 0, 0, 0, 0, 0, 0, 0, 84, 0, 0,
4410 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4411 1118, 1118, 0, 0, 1118, 0, 0, 0, 0, 0,
4412 0, 113, 0, 113, 113, 113, 113, 0, 113, 113,
4413 0, 1118, 0, 0, 0, 0, 0, 0, 0, 0,
4414 0, 1119, 1119, 0, 0, 1119, 0, 0, 0, 113,
4415 0, 84, 0, 0, 0, 0, 0, 0, 84, 84,
4416 0, 0, 1119, 84, 141, 0, 0, 1118, 0, 0,
4417 0, 0, 0, 0, 0, 0, 80, 0, 0, 0,
4418 0, 0, 0, 0, 0, 0, 113, 0, 0, 113,
4419 1118, 0, 0, 1118, 0, 113, 113, 113, 1119, 0,
4420 0, 84, 112, 0, 112, 112, 0, 1118, 1118, 1118,
4421 0, 113, 1118, 1118, 0, 141, 141, 1118, 1118, 312,
4422 0, 1119, 0, 0, 1119, 0, 0, 80, 80, 0,
4423 0, 305, 0, 0, 0, 0, 0, 113, 1119, 1119,
4424 1119, 0, 0, 1119, 1119, 0, 0, 0, 1119, 1119,
4425 0, 0, 312, 0, 0, 0, 0, 0, 0, 0,
4426 0, 113, 0, 0, 305, 0, 0, 0, 0, 0,
4427 112, 421, 431, 431, 0, 0, 0, 0, 0, 0,
4428 0, 0, 0, 305, 305, 305, 0, 112, 0, 0,
4429 0, 0, 112, 112, 113, 0, 0, 0, 112, 112,
4430 0, 0, 0, 0, 0, 0, 0, 112, 112, 0,
4431 0, 0, 0, 113, 0, 0, 0, 0, 0, 0,
4432 0, 0, 0, 112, 1118, 0, 0, 0, 1118, 1118,
4433 0, 0, 0, 0, 113, 0, 0, 0, 0, 0,
4434 113, 0, 112, 0, 0, 0, 0, 0, 0, 0,
4435 0, 0, 0, 0, 0, 1119, 0, 0, 0, 1119,
4436 1119, 0, 0, 0, 0, 112, 112, 112, 0, 0,
4437 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4438 113, 113, 112, 113, 113, 0, 0, 0, 1118, 0,
4439 0, 0, 113, 141, 0, 0, 0, 113, 0, 112,
4440 0, 0, 0, 0, 0, 80, 0, 0, 0, 0,
4441 0, 0, 0, 0, 0, 0, 0, 0, 0, 1119,
4442 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4443 141, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4444 0, 113, 80, 113, 0, 0, 0, 141, 0, 0,
4445 0, 113, 0, 0, 0, 0, 0, 0, 0, 80,
4446 0, 0, 113, 0, 113, 113, 0, 312, 0, 0,
4447 0, 0, 0, 0, 113, 113, 0, 0, 112, 305,
4448 0, 112, 112, 0, 0, 0, 0, 112, 0, 367,
4449 -813, -813, -813, -813, 372, 373, 0, 141, -813, -813,
4450 0, 112, 113, 0, 112, 0, 380, 381, 113, 80,
4451 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4452 0, 0, 0, 112, 0, 141, 312, 0, 0, 0,
4453 0, 0, 0, 0, 0, 0, 0, 80, 305, 0,
4454 0, 0, 81, 0, 0, 112, 0, 0, 384, 385,
4455 386, 387, 388, 389, 390, 391, 392, 393, 0, 112,
4456 0, 0, 0, 0, 0, 141, 0, 0, 0, 0,
4457 0, 0, 141, 141, 0, 0, 0, 80, 0, 0,
4458 0, 0, 0, 0, 80, 80, 0, 0, 0, 0,
4459 0, 0, 0, 81, 81, 0, 0, 306, 0, 0,
4460 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4461 0, 0, 0, 112, 0, 0, 0, 0, 0, 0,
4462 112, 112, 0, 0, 0, 112, 0, 0, 0, 0,
4463 306, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4464 113, 0, 113, 113, 0, 0, 0, 0, 0, 306,
4465 306, 306, 0, 0, 0, 0, 0, 0, 0, 0,
4466 0, 0, 0, 112, 0, 0, 0, 0, 0, 0,
4467 141, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4468 0, 0, 80, 0, 0, 0, 0, 312, 367, 368,
4469 369, 370, 371, 372, 373, 0, 0, 376, 377, 305,
4470 0, 0, 0, 0, 0, 380, 381, 0, 113, 0,
4471 141, 0, 0, 0, 0, 0, 141, 0, 0, 0,
4472 0, 0, 80, 0, 0, 113, 0, 0, 80, 0,
4473 113, 113, 0, 0, 0, 0, 113, 113, 0, 0,
4474 0, 0, 0, 0, 0, 113, 113, 384, 385, 386,
4475 387, 388, 389, 390, 391, 392, 393, 141, 0, 0,
4476 141, 113, 0, 0, 0, 0, 0, 0, 0, 80,
4477 312, 81, 80, 814, 0, 0, 0, 0, 0, 0,
4478 113, 0, 305, 0, 0, 80, 0, 0, 0, 0,
4479 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4480 0, 0, 0, 113, 113, 113, 0, 0, 81, 0,
4481 0, 0, 0, 0, 0, 0, 0, 141, 0, 141,
4482 113, 0, 0, 0, 0, 81, 137, 0, 0, 80,
4483 0, 80, 0, 0, 0, 0, 0, 113, 0, 0,
4484 141, 0, 0, 0, 0, 306, 0, 0, 0, 0,
4485 814, 814, 80, 0, 0, 0, 0, 0, 0, 0,
4486 0, 0, 80, 80, 0, 0, 0, 0, 0, 0,
4487 0, 0, 0, 0, 0, 81, 0, 137, 137, 0,
4488 0, 310, 0, 0, 814, 0, 0, 0, 0, 0,
4489 312, 0, 0, 0, 0, 0, 80, 0, 0, 894,
4490 0, 0, 305, 81, 306, 0, 0, 0, 0, 0,
4491 0, 0, 0, 0, 310, 0, 113, 0, 0, 113,
4492 113, 0, 0, 0, 0, 113, 0, 0, 0, 22,
4493 23, 24, 25, 419, 429, 429, 429, 0, 0, 113,
4494 0, 0, 113, 81, 0, 31, 32, 33, 1077, 0,
4495 81, 81, 1078, 0, 0, 40, 41, 42, 43, 44,
4496 0, 113, 0, 0, 0, 0, 312, 0, 0, 0,
4497 0, 0, 0, 0, 0, 0, 0, 0, 305, 0,
4498 0, 0, 0, 113, 0, 0, 0, 1080, 1081, 0,
4499 0, 0, 0, 0, 0, 1082, 0, 113, 1083, 0,
4500 1084, 1085, 0, 1086, 0, 0, 57, 58, 59, 60,
4501 61, 62, 63, 64, 65, 0, 0, 0, 0, 141,
4502 0, 0, 0, 0, 0, 0, 0, 91, 0, 0,
4503 0, 80, 0, 0, 0, 0, 1088, 0, 0, 0,
4504 0, 0, 0, 303, 0, 0, 0, 0, 81, 0,
4505 260, 113, 0, 0, 0, 137, 0, 0, 113, 113,
4506 0, 0, 0, 113, 0, 306, 0, 0, 0, 0,
4507 0, 0, 0, 0, 0, 0, 0, 0, 91, 91,
4508 0, 0, 0, 0, 0, 0, 0, 0, 81, 0,
4509 0, 0, 137, 0, 81, 0, 0, 0, 0, 0,
4510 0, 113, 0, 0, 0, 0, 814, 814, 0, 137,
4511 0, 0, 814, 814, 0, 0, 0, 0, 80, 80,
4512 0, 141, 0, 0, 80, 80, 0, 0, 0, 310,
4513 0, 0, 0, 80, 416, 81, 0, 141, 81, 0,
4514 0, 0, 0, 0, 0, 0, 0, 0, 306, 80,
4515 0, 81, 0, 0, 0, 0, 141, 0, 0, 137,
4516 0, 0, 0, 0, 0, 0, 0, 0, 80, 0,
4517 0, 0, 0, 0, 0, 0, 0, 0, 0, 141,
4518 141, 814, 0, 0, 0, 0, 0, 137, 310, 0,
4519 0, 80, 80, 80, 0, 81, 814, 81, 0, 0,
4520 0, 0, 0, 0, 0, 0, 0, 0, 80, 0,
4521 0, 0, 0, 141, 0, 0, 0, 0, 81, 0,
4522 0, 0, 0, 0, 0, 80, 0, 137, 81, 81,
4523 0, 0, 0, 0, 137, 137, 0, 0, 0, 0,
4524 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4525 0, 0, 0, 0, 140, 0, 91, 0, 0, 0,
4526 0, 0, 81, 0, 0, 0, 0, 0, 306, 0,
4527 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4528 0, 0, 0, 0, 0, 0, 0, 0, 1195, 0,
4529 0, 0, 141, 91, 0, 141, 141, 0, 0, 0,
4530 305, 141, 0, 0, 80, 140, 140, 80, 80, 0,
4531 91, 0, 0, 80, 0, 141, 0, 0, 141, 0,
4532 0, 0, 0, 0, 0, 0, 0, 80, 0, 0,
4533 80, 0, 137, 0, 0, 0, 0, 0, 0, 0,
4534 0, 0, 0, 0, 306, 0, 0, 0, 0, 310,
4535 0, 0, 0, 0, 0, 0, 0, 0, 0, 141,
4536 91, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4537 0, 80, 137, 141, 0, 0, 0, 0, 137, 0,
4538 0, 0, 0, 0, 0, 80, 0, 431, 91, 0,
4539 0, 0, 0, 0, 0, 0, 0, 81, 0, 305,
4540 0, 0, 0, 0, 0, 0, 367, 368, 369, 370,
4541 371, 372, 373, 374, 375, 376, 377, 378, 379, 137,
4542 0, 0, 137, 380, 381, 0, 0, 0, 91, 0,
4543 0, 0, 310, 0, 0, 91, 91, 0, 0, 141,
4544 0, 0, 0, 0, 0, 0, 0, 0, 431, 0,
4545 0, 80, 0, 0, 0, 0, 0, 0, 0, 0,
4546 305, 0, 0, 383, 0, 384, 385, 386, 387, 388,
4547 389, 390, 391, 392, 393, 0, 0, 141, 0, 137,
4548 0, 137, 260, 140, 81, 81, 0, 0, 0, 80,
4549 81, 81, 0, 0, 0, 0, 0, 0, 0, 81,
4550 0, 0, 137, 0, 936, 0, 0, 0, 0, 0,
4551 0, 0, 0, 0, 0, 81, 0, 0, 0, 0,
4552 140, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4553 0, 0, 0, 91, 81, 0, 0, 140, 367, 368,
4554 369, 370, 371, 372, 373, 374, 375, 376, 377, 378,
4555 379, 0, 310, 0, 0, 380, 381, 81, 81, 81,
4556 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4557 0, 0, 0, 91, 81, 0, 0, 0, 0, 91,
4558 0, 0, 0, 0, 0, 0, 0, 140, 0, 0,
4559 0, 81, 0, 0, 0, 383, 0, 384, 385, 386,
4560 387, 388, 389, 390, 391, 392, 393, 0, 0, 0,
4561 0, 0, 0, 0, 0, 140, 0, 0, 0, 0,
4562 91, 0, 0, 91, 0, 0, 0, 0, 310, 0,
4563 0, 0, 0, 0, 0, 0, 808, 0, 0, 0,
4564 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4565 0, 0, 0, 0, 0, 140, 0, 0, 0, 0,
4566 0, 0, 140, 140, 0, 0, 306, 0, 0, 0,
4567 81, 0, 0, 81, 81, 0, 0, 0, 0, 81,
4568 91, 137, 91, 0, 0, 0, 0, 0, 0, 0,
4569 0, 0, 0, 81, 0, 0, 81, 0, 0, 0,
4570 0, 0, 0, 91, 0, 0, 0, 0, 0, 0,
4571 0, 0, 0, 808, 808, 0, 0, 0, 0, 0,
4572 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4573 0, 0, 0, 0, 0, 0, 0, 81, 0, 0,
4574 0, 0, 0, 0, 0, 0, 0, 808, 0, 0,
4575 0, 81, 0, 0, -812, 0, 0, 0, 0, 0,
4576 140, 0, -812, -812, -812, 306, 0, -812, -812, -812,
4577 0, -812, 0, 0, 0, 0, 0, 0, 0, -812,
4578 -812, -812, 0, 137, 0, 0, 0, 0, 0, 0,
4579 0, -812, -812, 936, -812, -812, -812, -812, -812, 137,
4580 140, 0, 0, 0, 0, 0, 140, 0, 0, 0,
4581 0, 0, 0, 0, 0, 0, 0, 81, 137, 0,
4582 0, 0, -812, -812, 0, 0, 306, 367, 368, 369,
4583 370, 371, 372, 373, 374, 375, 376, 377, 378, 379,
4584 0, 137, 137, 0, 380, 381, 0, 140, 0, 0,
4585 140, -812, -812, 0, 0, 81, 0, 0, 0, 0,
4586 0, 0, 0, 140, 0, 0, 0, 0, 0, 0,
4587 0, 0, 0, 0, -812, 137, 0, 0, 0, 0,
4588 0, 0, 91, 0, 383, 0, 384, 385, 386, 387,
4589 388, 389, 390, 391, 392, 393, 0, 0, 0, 0,
4590 0, 0, 0, 0, -298, -812, -812, 140, -812, 140,
4591 0, 256, -812, 0, -812, 0, 0, 0, 0, 0,
4592 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4593 140, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4594 140, 140, 0, 0, 0, 0, 0, 0, 0, 0,
4595 1193, 0, 0, 0, 137, 0, 0, 137, 137, 0,
4596 0, 0, 0, 137, 0, 0, 0, 0, 0, 808,
4597 808, 240, 240, 0, 140, 808, 808, 137, 0, 0,
4598 137, 0, 0, 0, 91, 0, 0, 0, 0, 0,
4599 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4600 91, 0, 0, 275, 279, 280, 281, 0, 0, 0,
4601 240, 240, 0, 0, 0, 0, 0, 0, 0, 91,
4602 0, 137, 0, 328, 329, 0, 0, 0, 0, 0,
4603 0, 0, 0, 0, 0, 137, 0, 0, 0, 0,
4604 0, 0, 91, 91, 808, 0, 0, 0, 0, 429,
4605 0, 0, 0, 0, 0, 0, 0, 0, 0, 808,
4606 0, 0, 0, 22, 23, 24, 25, 0, 240, 0,
4607 0, 0, 0, 0, 0, 0, 91, 0, 0, 31,
4608 32, 33, 1077, 0, 0, 0, 1078, 0, 1079, 40,
4609 41, 42, 43, 44, 0, 0, 0, 0, 0, 0,
4610 0, 137, 0, 0, 0, 0, 0, 0, 562, 140,
4611 429, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4612 0, 1080, 1081, 0, 0, 0, 0, 0, 0, 1082,
4613 0, 0, 1083, 0, 1084, 1085, 0, 1086, 566, 137,
4614 57, 58, 1087, 60, 61, 62, 63, 64, 65, 0,
4615 0, 1191, 0, 0, 0, 91, 0, 0, 91, 91,
4616 0, 0, 0, 0, 91, 0, 0, 0, 0, 0,
4617 1088, 0, 0, 0, 0, 0, 0, 303, 91, 0,
4618 0, 91, 0, 0, 240, 0, 0, 240, 240, 240,
4619 0, 328, 0, 0, 0, 0, 140, 140, 0, 0,
4620 0, 0, 140, 140, 0, 0, 0, 0, 0, 0,
4621 0, 140, 240, 0, 240, 22, 23, 24, 25, 0,
4622 0, 0, 91, 0, 637, 638, 0, 140, 639, 0,
4623 0, 31, 32, 33, 0, 0, 91, 0, 0, 0,
4624 0, 40, 41, 42, 43, 44, 140, 0, 188, 189,
4625 190, 191, 192, 193, 194, 195, 196, 0, 0, 197,
4626 198, 0, 0, 0, 0, 199, 200, 201, 202, 140,
4627 140, 140, 0, 0, 0, 0, 0, 0, 0, 203,
4628 204, 0, 0, 0, 0, 0, 140, 0, 0, 0,
4629 0, 0, 57, 58, 59, 60, 61, 62, 63, 64,
4630 65, 0, 91, 140, 0, 0, 0, 0, 0, 205,
4631 206, 207, 208, 209, 210, 211, 212, 213, 214, 0,
4632 215, 216, 0, 612, 613, 614, 615, 616, 217, 303,
4633 617, 618, 619, 620, 621, 622, 623, 624, 0, 626,
4634 91, 0, 627, 628, 629, 630, 631, 632, 633, 634,
4635 635, 636, 0, 0, 0, 240, 367, 368, 369, 370,
4636 371, 372, 373, 374, 375, 376, 377, 378, 379, 0,
4637 0, 0, 0, 380, 381, 0, 0, 0, 0, 0,
4638 0, 0, 140, 0, 0, 140, 140, 0, 0, 0,
4639 0, 140, 0, 0, 0, 0, 0, 0, 0, 0,
4640 0, 0, 0, 0, 0, 140, 240, 0, 140, 0,
4641 0, 0, 0, 383, 0, 384, 385, 386, 387, 388,
4642 389, 390, 391, 392, 393, 240, 240, 0, 0, 0,
4643 240, 0, 0, 0, 240, 0, 281, 0, 0, 0,
4644 0, 0, 0, 0, 0, 0, 0, 0, 0, 140,
4645 0, 0, 0, 0, 716, 0, 0, 0, 0, 0,
4646 0, 0, 0, 140, 0, 0, 0, 240, 0, 0,
4647 240, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4648 0, 0, 240, 0, 0, 0, 0, 0, 0, 0,
4649 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4650 746, 0, 0, 0, 22, 23, 24, 25, 0, 0,
4651 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4652 31, 32, 33, 1077, 0, 0, 0, 1078, 0, 140,
4653 40, 41, 42, 43, 44, 0, 0, 0, 0, 0,
4654 0, 240, 0, 0, 0, 0, 0, 0, 0, 778,
4655 0, 0, 778, 0, 0, 0, 0, 0, 0, 0,
4656 0, 240, 1080, 1081, 0, 0, 809, 140, 0, 0,
4657 1082, 0, 0, 1083, 0, 1084, 1085, 0, 1086, 0,
4658 0, 57, 58, 59, 60, 61, 62, 63, 64, 65,
4659 0, 0, 0, 0, 0, 0, 0, 645, 646, 0,
4660 0, 647, 0, 0, 0, 0, 0, 0, 0, 0,
4661 0, 1088, 0, 0, 0, 0, 0, 0, 303, 0,
4662 240, 188, 189, 190, 191, 192, 193, 194, 195, 196,
4663 0, 240, 197, 198, 0, 0, 0, 0, 199, 200,
4664 201, 202, 0, 868, 868, 0, 0, 240, 778, 778,
4665 868, 0, 203, 204, 0, 0, 0, 0, 0, 0,
4666 0, 868, 868, 0, 0, 240, 0, 240, 0, 0,
4667 0, 0, 0, 0, 0, 0, 0, 868, 0, 0,
4668 0, 0, 205, 206, 207, 208, 209, 210, 211, 212,
4669 213, 214, 0, 215, 216, 0, 0, 0, 0, 0,
4670 0, 217, 0, 0, 0, 0, 0, 0, 0, 0,
4671 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4672 0, 240, 0, 0, 0, 0, 0, 0, 0, 0,
4673 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4674 0, 0, 0, 0, 0, 0, 0, 0, 0, 240,
4675 0, 0, 0, 0, 0, -4, 3, 0, 4, 5,
4676 6, 7, 8, -4, -4, -4, 9, 10, 0, -4,
4677 -4, 11, -4, 12, 13, 14, 15, 16, 17, 18,
4678 -4, 240, 0, 0, 0, 19, 20, 21, 22, 23,
4679 24, 25, 0, 0, 26, 0, 0, 0, 0, 240,
4680 27, 28, 283, 30, 31, 32, 33, 34, 35, 36,
4681 37, 38, 39, 0, 40, 41, 42, 43, 44, 45,
4682 46, 0, 0, -4, 0, 0, 0, 0, 0, 868,
4683 0, 47, 48, 0, 0, 0, 0, 0, 0, 0,
4684 0, 0, 0, 0, 0, 0, 49, 50, 0, 0,
4685 0, 0, 0, 0, 51, 0, 0, 52, 53, 54,
4686 55, 0, 56, 0, 0, 57, 58, 59, 60, 61,
4687 62, 63, 64, 65, 0, -4, 0, 778, 0, 0,
4688 0, 0, 0, 0, 0, 0, 240, 0, 0, 0,
4689 0, 0, 0, 0, 240, 0, 0, 0, 1027, 868,
4690 868, 0, 66, 67, 68, 868, 868, -4, 0, 240,
4691 0, 0, 0, -4, 0, 545, 0, 0, 0, 0,
4692 0, 240, 0, 0, 0, 0, 0, 0, 0, 0,
4693 0, 0, 0, 0, 0, 0, 0, 0, 0, 778,
4694 868, 868, 0, 868, 868, 0, 240, 0, 0, 0,
4695 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4696 0, 0, 0, 0, 0, 0, 1068, 1069, 0, 0,
4697 240, 0, 0, 0, 868, 1075, 0, 0, 0, 0,
4698 0, 0, 0, 0, 0, 0, 0, 0, 0, 868,
4699 0, 0, 0, 0, 0, 0, -812, 3, 0, 4,
4700 5, 6, 7, 8, 0, 240, 0, 9, 10, 0,
4701 0, 0, 11, 868, 12, 13, 14, 15, 16, 17,
4702 18, 0, 0, 0, 0, 0, 19, 20, 21, 22,
4703 23, 24, 25, 0, 0, 26, 0, 0, 0, 0,
4704 0, 27, 28, 283, 30, 31, 32, 33, 34, 35,
4705 36, 37, 38, 39, 0, 40, 41, 42, 43, 44,
4706 45, 46, 0, 0, 0, 0, 0, 0, 0, 0,
4707 0, 0, 47, 48, 0, 0, 0, 0, 0, 0,
4708 0, 0, 0, 0, 0, 0, 0, 49, 50, 0,
4709 240, 0, 0, 0, 0, 51, 0, 0, 52, 53,
4710 54, 55, 0, 56, 0, 0, 57, 58, 59, 60,
4711 61, 62, 63, 64, 65, 0, -812, 0, 0, 0,
4712 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4713 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4714 0, 0, 0, 66, 67, 68, 0, 0, -812, 3,
4715 -812, 4, 5, 6, 7, 8, -812, 0, 0, 9,
4716 10, 0, 0, 0, 11, 0, 12, 13, 14, 15,
4717 16, 17, 18, 0, 0, 0, 0, 0, 19, 20,
4718 21, 22, 23, 24, 25, 0, 0, 26, 0, 0,
4719 0, 0, 0, 27, 28, 29, 30, 31, 32, 33,
4720 34, 35, 36, 37, 38, 39, 0, 40, 41, 42,
4721 43, 44, 45, 46, 0, 0, 0, 0, 0, 0,
4722 240, 0, 0, 0, 47, 48, 0, 0, 0, 0,
4723 0, 0, 0, 0, 0, 0, 0, 0, 0, 49,
4724 50, 0, 0, 0, 0, 0, 0, 51, 0, 0,
4725 52, 53, 54, 55, 0, 56, 0, 0, 57, 58,
4726 59, 60, 61, 62, 63, 64, 65, 0, 0, 0,
4727 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4728 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4729 0, 0, 0, 0, 0, 66, 67, 68, 0, 0,
4730 -4, 3, -812, 4, 5, 6, 7, 8, -812, 0,
4731 0, 9, 10, 0, 0, 0, 11, 0, 12, 13,
4732 14, 15, 16, 17, 18, 0, 0, 0, 0, 0,
4733 19, 20, 21, 22, 23, 24, 25, 0, 0, 26,
4734 0, 0, 0, 0, 0, 27, 28, 29, 30, 31,
4735 32, 33, 34, 35, 36, 37, 38, 39, 0, 40,
4736 41, 42, 43, 44, 45, 46, 0, 0, 0, 0,
4737 0, 0, 0, 0, 0, 0, 47, 48, 0, 0,
4738 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4739 0, 49, 50, 0, 0, 0, 0, 0, 0, 51,
4740 0, 0, 52, 53, 54, 55, 0, 56, 0, 0,
4741 57, 58, 59, 60, 61, 62, 63, 64, 65, 0,
4742 0, 0, 0, 0, 0, 0, 0, 0, -794, 0,
4743 0, 0, 0, 0, 0, 0, -794, -794, -794, 0,
4744 0, -794, -794, -794, 0, -794, 0, 66, 67, 68,
4745 0, 0, -4, -794, -794, -794, -794, -794, 0, 0,
4746 545, 0, 0, 0, 0, -794, -794, 0, -794, -794,
4747 -794, -794, -794, 0, 0, 0, 367, 368, 369, 370,
4748 371, 372, 373, 374, 375, 376, 377, -813, -813, 0,
4749 0, 0, 0, 380, 381, 0, -794, -794, 0, 0,
4750 0, 0, 0, 0, 0, 0, -794, -794, -794, -794,
4751 -794, -794, -794, -794, -794, -794, -794, -794, -794, 0,
4752 0, 0, 0, -794, -794, -794, -794, 0, 877, -794,
4753 0, 0, 0, 0, -794, 384, 385, 386, 387, 388,
4754 389, 390, 391, 392, 393, 0, 0, 0, -794, 0,
4755 0, -794, 0, 0, 0, 0, 0, 0, 0, 0,
4756 0, 0, -146, -794, -794, -794, -794, -794, -794, -794,
4757 -794, -794, -794, -794, -794, 0, 0, 0, 0, -794,
4758 -794, -794, -794, -794, -692, 0, -794, -794, -794, 0,
4759 0, 0, -692, -692, -692, 0, 0, -692, -692, -692,
4760 0, -692, 0, 0, 0, 0, 0, 0, 0, -692,
4761 0, -692, -692, -692, 0, 0, 0, 0, 0, 0,
4762 0, -692, -692, 0, -692, -692, -692, -692, -692, 0,
4763 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4764 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4765 0, 0, -692, -692, 0, 0, 0, 0, 0, 0,
4766 0, 0, -692, -692, -692, -692, -692, -692, -692, -692,
4767 -692, -692, -692, -692, -692, 0, 0, 0, 0, -692,
4768 -692, -692, -692, 0, -692, -692, 0, 0, 0, 0,
4769 -692, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4770 0, 0, 0, 0, -692, 0, 0, -692, 0, 0,
4771 0, 0, 0, 0, 0, 0, 0, 0, -692, -692,
4772 -692, -692, -692, -692, -692, -692, -692, -692, -692, -692,
4773 -692, 0, 0, 0, 0, 0, -692, -692, -692, -692,
4774 -693, 0, -692, -692, -692, 0, 0, 0, -693, -693,
4775 -693, 0, 0, -693, -693, -693, 0, -693, 0, 0,
4776 0, 0, 0, 0, 0, -693, 0, -693, -693, -693,
4777 0, 0, 0, 0, 0, 0, 0, -693, -693, 0,
4778 -693, -693, -693, -693, -693, 0, 0, 0, 0, 0,
4779 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4780 0, 0, 0, 0, 0, 0, 0, 0, -693, -693,
4781 0, 0, 0, 0, 0, 0, 0, 0, -693, -693,
4782 -693, -693, -693, -693, -693, -693, -693, -693, -693, -693,
4783 -693, 0, 0, 0, 0, -693, -693, -693, -693, 0,
4784 -693, -693, 0, 0, 0, 0, -693, 0, 0, 0,
4785 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4786 -693, 0, 0, -693, 0, 0, 0, 0, 0, 0,
4787 0, 0, 0, 0, -693, -693, -693, -693, -693, -693,
4788 -693, -693, -693, -693, -693, -693, -693, 0, 0, 0,
4789 0, 0, -693, -693, -693, -693, -795, 0, -693, -693,
4790 -693, 0, 0, 0, -795, -795, -795, 0, 0, -795,
4791 -795, -795, 0, -795, 0, 0, 0, 0, 0, 0,
4792 0, -795, -795, -795, -795, -795, 0, 0, 0, 0,
4793 0, 0, 0, -795, -795, 0, -795, -795, -795, -795,
4794 -795, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4795 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4796 0, 0, 0, 0, -795, -795, 0, 0, 0, 0,
4797 0, 0, 0, 0, -795, -795, -795, -795, -795, -795,
4798 -795, -795, -795, -795, -795, -795, -795, 0, 0, 0,
4799 0, -795, -795, -795, -795, 0, 0, -795, 0, 0,
4800 0, 0, -795, 0, 0, 0, 0, 0, 0, 0,
4801 0, 0, 0, 0, 0, 0, -795, 0, 0, -795,
4802 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4803 0, -795, -795, -795, -795, -795, -795, -795, -795, -795,
4804 -795, -795, -795, 0, 0, 0, 0, -795, -795, -795,
4805 -795, -795, -796, 0, -795, -795, -795, 0, 0, 0,
4806 -796, -796, -796, 0, 0, -796, -796, -796, 0, -796,
4807 0, 0, 0, 0, 0, 0, 0, -796, -796, -796,
4808 -796, -796, 0, 0, 0, 0, 0, 0, 0, -796,
4809 -796, 0, -796, -796, -796, -796, -796, 0, 0, 0,
4810 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4811 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4812 -796, -796, 0, 0, 0, 0, 0, 0, 0, 0,
4813 -796, -796, -796, -796, -796, -796, -796, -796, -796, -796,
4814 -796, -796, -796, 0, 0, 0, 0, -796, -796, -796,
4815 -796, 0, 0, -796, 0, 0, 0, 0, -796, 0,
4816 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4817 0, 0, -796, 0, 0, -796, 0, 0, 0, 0,
4818 0, 0, 0, 0, 0, 0, 0, -796, -796, -796,
4819 -796, -796, -796, -796, -796, -796, -796, -796, -796, 0,
4820 0, 0, 0, -796, -796, -796, -796, -796, -508, 0,
4821 -796, -796, -796, 0, 0, 0, -508, -508, -508, 0,
4822 0, -508, -508, -508, 0, -508, 0, 0, 0, 0,
4823 0, 0, 0, -508, -508, -508, -508, 0, 0, 0,
4824 0, 0, 0, 0, 0, -508, -508, 0, -508, -508,
4825 -508, -508, -508, 0, 0, 0, 0, 0, 0, 0,
4826 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4827 0, 0, 0, 0, 0, 0, -508, -508, 0, 0,
4828 0, 0, 0, 0, 0, 0, -508, -508, -508, -508,
4829 -508, -508, -508, -508, -508, -508, -508, -508, -508, 0,
4830 0, 0, 0, -508, -508, -508, -508, 0, 0, -508,
4831 0, 0, 0, 0, -508, 0, 0, 0, 0, 0,
4832 0, 0, 0, 0, 0, 0, 0, 0, -508, 0,
4833 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4834 0, 0, 0, -508, 0, -508, -508, -508, -508, -508,
4835 -508, -508, -508, -508, -508, 0, 0, 0, 0, -508,
4836 -508, -508, -508, -508, -349, 256, -508, -508, -508, 0,
4837 0, 0, -349, -349, -349, 0, 0, -349, -349, -349,
4838 0, -349, 0, 0, 0, 0, 0, 0, 0, -349,
4839 0, -349, -349, -349, 0, 0, 0, 0, 0, 0,
4840 0, -349, -349, 0, -349, -349, -349, -349, -349, 0,
4841 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4842 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4843 0, 0, -349, -349, 0, 0, 0, 0, 0, 0,
4844 0, 0, -349, -349, -349, -349, -349, -349, -349, -349,
4845 -349, -349, -349, -349, -349, 0, 0, 0, 0, -349,
4846 -349, -349, -349, 0, 0, -349, 0, 0, 0, 0,
4847 -349, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4848 0, 0, 0, 0, -349, 0, 0, -349, 0, 0,
4849 0, 0, 0, 0, 0, 0, 0, 0, 0, -349,
4850 -349, -349, -349, -349, -349, -349, -349, -349, -349, -349,
4851 -349, 0, 0, 0, 0, 0, -349, -349, -349, -349,
4852 -812, 0, -349, -349, -349, 0, 0, 0, -812, -812,
4853 -812, 0, 0, -812, -812, -812, 0, -812, 0, 0,
4854 0, 0, 0, 0, 0, -812, -812, -812, -812, 0,
4855 0, 0, 0, 0, 0, 0, 0, -812, -812, 0,
4856 -812, -812, -812, -812, -812, 0, 0, 0, 0, 0,
4857 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4858 0, 0, 0, 0, 0, 0, 0, 0, -812, -812,
4859 0, 0, 0, 0, 0, 0, 0, 0, -812, -812,
4860 -812, -812, -812, -812, -812, -812, -812, -812, -812, -812,
4861 -812, 0, 0, 0, 0, -812, -812, -812, -812, 0,
4862 0, -812, 0, 0, 0, 0, -812, 0, 0, 0,
4863 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4864 -812, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4865 0, 0, 0, 0, 0, -812, 0, -812, -812, -812,
4866 -812, -812, -812, -812, -812, -812, -812, 0, 0, 0,
4867 0, -812, -812, -812, -812, -812, -355, 256, -812, -812,
4868 -812, 0, 0, 0, -355, -355, -355, 0, 0, -355,
4869 -355, -355, 0, -355, 0, 0, 0, 0, 0, 0,
4870 0, -355, 0, -355, -355, 0, 0, 0, 0, 0,
4871 0, 0, 0, -355, -355, 0, -355, -355, -355, -355,
4872 -355, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4873 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4874 0, 0, 0, 0, -355, -355, 0, 0, 0, 0,
4875 0, 0, 0, 0, -355, -355, -355, -355, -355, -355,
4876 -355, -355, -355, -355, -355, -355, -355, 0, 0, 0,
4877 0, -355, -355, -355, -355, 0, 878, -355, 0, 0,
4878 0, 0, -355, 0, 0, 0, 0, 0, 0, 0,
4879 0, 0, 0, 0, 0, 0, -355, 0, 0, 0,
4880 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4881 -147, -355, 0, -355, -355, -355, -355, -355, -355, -355,
4882 -355, -355, -355, 0, 0, 0, 0, 820, -355, -355,
4883 -355, -355, -362, 0, -355, -355, -355, 0, 0, 0,
4884 -362, -362, -362, 0, 0, -362, -362, -362, 0, -362,
4885 0, 0, 0, 0, 0, 0, 0, -362, 0, -362,
4886 -362, 0, 0, 0, 0, 0, 0, 0, 0, -362,
4887 -362, 0, -362, -362, -362, -362, -362, 0, 0, 0,
4888 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4889 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4890 -362, -362, 0, 0, 0, 0, 0, 0, 0, 0,
4891 -362, -362, -362, -362, -362, -362, -362, -362, -362, -362,
4892 -362, -362, -362, 0, 0, 0, 0, -362, -362, -362,
4893 -362, 0, 0, -362, 0, 0, 0, 0, -362, 0,
4894 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4895 0, 0, -362, 0, 0, 0, 0, 0, 0, 0,
4896 0, 0, 0, 0, 0, 0, 0, -362, 0, -362,
4897 -362, -362, -362, -362, -362, -362, -362, -362, -362, 0,
4898 0, 0, 0, 0, -362, -362, -362, -362, -794, 450,
4899 -362, -362, -362, 0, 0, 0, -794, -794, -794, 0,
4900 0, 0, -794, -794, 0, -794, 0, 0, 0, 0,
4901 0, 0, 0, -794, -794, 0, 0, 0, 0, 0,
4902 0, 0, 0, 0, 0, -794, -794, 0, -794, -794,
4903 -794, -794, -794, 0, 0, 0, 0, 0, 0, 0,
4904 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4905 0, 0, 0, 0, 0, 0, -794, -794, 0, 0,
4906 0, 0, 0, 0, 0, 0, -794, -794, -794, -794,
4907 -794, -794, -794, -794, -794, -794, -794, -794, -794, 0,
4908 0, 0, 0, -794, -794, -794, -794, 0, 818, -794,
4909 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4910 0, 0, 0, 0, 0, 0, 0, 0, -794, 0,
4911 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4912 0, 0, -146, -794, 0, -794, -794, -794, -794, -794,
4913 -794, -794, -794, -794, -794, 0, 0, 0, 0, -794,
4914 -794, -794, -794, -137, -794, 0, -794, 0, -794, 0,
4915 0, 0, -794, -794, -794, 0, 0, 0, -794, -794,
4916 0, -794, 0, 0, 0, 0, 0, 0, 0, -794,
4917 -794, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4918 0, -794, -794, 0, -794, -794, -794, -794, -794, 0,
4919 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4920 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4921 0, 0, -794, -794, 0, 0, 0, 0, 0, 0,
4922 0, 0, -794, -794, -794, -794, -794, -794, -794, -794,
4923 -794, -794, -794, -794, -794, 0, 0, 0, 0, -794,
4924 -794, -794, -794, 0, 818, -794, 0, 0, 0, 0,
4925 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4926 0, 0, 0, 0, -794, 0, 0, 0, 0, 0,
4927 0, 0, 0, 0, 0, 0, 0, 0, -146, -794,
4928 0, -794, -794, -794, -794, -794, -794, -794, -794, -794,
4929 -794, 0, 0, 0, 0, -794, -794, -794, -794, -794,
4930 -355, 0, -794, 0, -794, 0, 0, 0, -355, -355,
4931 -355, 0, 0, 0, -355, -355, 0, -355, 0, 0,
4932 0, 0, 0, 0, 0, -355, 0, 0, 0, 0,
4933 0, 0, 0, 0, 0, 0, 0, -355, -355, 0,
4934 -355, -355, -355, -355, -355, 0, 0, 0, 0, 0,
4935 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4936 0, 0, 0, 0, 0, 0, 0, 0, -355, -355,
4937 0, 0, 0, 0, 0, 0, 0, 0, -355, -355,
4938 -355, -355, -355, -355, -355, -355, -355, -355, -355, -355,
4939 -355, 0, 0, 0, 0, -355, -355, -355, -355, 0,
4940 819, -355, 0, 0, 0, 0, 0, 0, 0, 0,
4941 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4942 -355, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4943 0, 0, 0, 0, -147, -355, 0, -355, -355, -355,
4944 -355, -355, -355, -355, -355, -355, -355, 0, 0, 0,
4945 0, 820, -355, -355, -355, -138, -355, 0, -355, 0,
4946 -355, 0, 0, 0, -355, -355, -355, 0, 0, 0,
4947 -355, -355, 0, -355, 0, 0, 0, 0, 0, 0,
4948 0, -355, 0, 0, 0, 0, 0, 0, 0, 0,
4949 0, 0, 0, -355, -355, 0, -355, -355, -355, -355,
4950 -355, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4951 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4952 0, 0, 0, 0, -355, -355, 0, 0, 0, 0,
4953 0, 0, 0, 0, -355, -355, -355, -355, -355, -355,
4954 -355, -355, -355, -355, -355, -355, -355, 0, 0, 0,
4955 0, -355, -355, -355, -355, 0, 819, -355, 0, 0,
4956 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4957 0, 0, 0, 0, 0, 0, -355, 0, 0, 0,
4958 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4959 -147, -355, 0, -355, -355, -355, -355, -355, -355, -355,
4960 -355, -355, -355, 0, 0, 0, 0, 820, -355, -355,
4961 -355, -355, 0, 0, -355, 3, -355, 4, 5, 6,
4962 7, 8, -812, -812, -812, 9, 10, 0, 0, -812,
4963 11, 0, 12, 13, 14, 15, 16, 17, 18, 0,
4964 0, 0, 0, 0, 19, 20, 21, 22, 23, 24,
4965 25, 0, 0, 26, 0, 0, 0, 0, 0, 27,
4966 28, 283, 30, 31, 32, 33, 34, 35, 36, 37,
4967 38, 39, 0, 40, 41, 42, 43, 44, 45, 46,
4968 0, 0, -812, 0, 0, 0, 0, 0, 0, 0,
4969 47, 48, 0, 0, 0, 0, 0, 0, 0, 0,
4970 0, 0, 0, 0, 0, 49, 50, 0, 0, 0,
4971 0, 0, 0, 51, 0, 0, 52, 53, 54, 55,
4972 0, 56, 0, 0, 57, 58, 59, 60, 61, 62,
4973 63, 64, 65, 0, 0, 0, 0, 0, 0, 0,
4974 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4975 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4976 0, 66, 67, 68, 0, 0, 0, 3, -812, 4,
4977 5, 6, 7, 8, -812, 0, -812, 9, 10, 0,
4978 -812, -812, 11, 0, 12, 13, 14, 15, 16, 17,
4979 18, 0, 0, 0, 0, 0, 19, 20, 21, 22,
4980 23, 24, 25, 0, 0, 26, 0, 0, 0, 0,
4981 0, 27, 28, 283, 30, 31, 32, 33, 34, 35,
4982 36, 37, 38, 39, 0, 40, 41, 42, 43, 44,
4983 45, 46, 0, 0, -812, 0, 0, 0, 0, 0,
4984 0, 0, 47, 48, 0, 0, 0, 0, 0, 0,
4985 0, 0, 0, 0, 0, 0, 0, 49, 50, 0,
4986 0, 0, 0, 0, 0, 51, 0, 0, 52, 53,
4987 54, 55, 0, 56, 0, 0, 57, 58, 59, 60,
4988 61, 62, 63, 64, 65, 0, 0, 0, 0, 0,
4989 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4990 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4991 0, 0, 0, 66, 67, 68, 0, 0, 0, 3,
4992 -812, 4, 5, 6, 7, 8, -812, 0, -812, 9,
4993 10, 0, 0, -812, 11, -812, 12, 13, 14, 15,
4994 16, 17, 18, 0, 0, 0, 0, 0, 19, 20,
4995 21, 22, 23, 24, 25, 0, 0, 26, 0, 0,
4996 0, 0, 0, 27, 28, 283, 30, 31, 32, 33,
4997 34, 35, 36, 37, 38, 39, 0, 40, 41, 42,
4998 43, 44, 45, 46, 0, 0, -812, 0, 0, 0,
4999 0, 0, 0, 0, 47, 48, 0, 0, 0, 0,
5000 0, 0, 0, 0, 0, 0, 0, 0, 0, 49,
5001 50, 0, 0, 0, 0, 0, 0, 51, 0, 0,
5002 52, 53, 54, 55, 0, 56, 0, 0, 57, 58,
5003 59, 60, 61, 62, 63, 64, 65, 0, 0, 0,
5004 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5005 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5006 0, 0, 0, 0, 0, 66, 67, 68, 0, 0,
5007 0, 3, -812, 4, 5, 6, 7, 8, -812, 0,
5008 -812, 9, 10, 0, 0, -812, 11, 0, 12, 13,
5009 14, 15, 16, 17, 18, -812, 0, 0, 0, 0,
5010 19, 20, 21, 22, 23, 24, 25, 0, 0, 26,
5011 0, 0, 0, 0, 0, 27, 28, 283, 30, 31,
5012 32, 33, 34, 35, 36, 37, 38, 39, 0, 40,
5013 41, 42, 43, 44, 45, 46, 0, 0, -812, 0,
5014 0, 0, 0, 0, 0, 0, 47, 48, 0, 0,
5015 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5016 0, 49, 50, 0, 0, 0, 0, 0, 0, 51,
5017 0, 0, 52, 53, 54, 55, 0, 56, 0, 0,
5018 57, 58, 59, 60, 61, 62, 63, 64, 65, 0,
5019 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5020 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5021 0, 0, 0, 0, 0, 0, 0, 66, 67, 68,
5022 0, 0, 0, 3, -812, 4, 5, 6, 7, 8,
5023 -812, 0, -812, 9, 10, 0, 0, -812, 11, 0,
5024 12, 13, 14, 15, 16, 17, 18, 0, 0, 0,
5025 0, 0, 19, 20, 21, 22, 23, 24, 25, 0,
5026 0, 26, 0, 0, 0, 0, 0, 27, 28, 283,
5027 30, 31, 32, 33, 34, 35, 36, 37, 38, 39,
5028 0, 40, 41, 42, 43, 44, 45, 46, 0, 0,
5029 -812, 0, 0, 0, 0, 0, 0, 0, 47, 48,
5030 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5031 0, 0, 0, 49, 50, 0, 0, 0, 0, 0,
5032 0, 51, 0, 0, 52, 53, 54, 55, 0, 56,
5033 0, 0, 57, 58, 59, 60, 61, 62, 63, 64,
5034 65, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5035 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5036 0, 0, 0, 0, 0, 0, 0, 0, 0, 66,
5037 67, 68, 0, 0, 0, 3, -812, 4, 5, 6,
5038 7, 8, -812, -812, -812, 9, 10, 0, 0, 0,
5039 11, 0, 12, 13, 14, 15, 16, 17, 18, 0,
5040 0, 0, 0, 0, 19, 20, 21, 22, 23, 24,
5041 25, 0, 0, 26, 0, 0, 0, 0, 0, 27,
5042 28, 283, 30, 31, 32, 33, 34, 35, 36, 37,
5043 38, 39, 0, 40, 41, 42, 43, 44, 45, 46,
5044 0, 0, -812, 0, 0, 0, 0, 0, 0, 0,
5045 47, 48, 0, 0, 0, 0, 0, 0, 0, 0,
5046 0, 0, 0, 0, 0, 49, 50, 0, 0, 0,
5047 0, 0, 0, 51, 0, 0, 52, 53, 54, 55,
5048 0, 56, 0, 0, 57, 58, 59, 60, 61, 62,
5049 63, 64, 65, 0, 0, 0, 0, 0, 0, 0,
5050 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5051 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5052 0, 66, 67, 68, 0, 0, 0, 3, -812, 4,
5053 5, 6, 7, 8, -812, 0, -812, 9, 10, 0,
5054 0, 0, 11, 0, 12, 13, 14, 15, 16, 17,
5055 18, 0, 0, 0, 0, 0, 19, 20, 21, 22,
5056 23, 24, 25, 0, 0, 26, 0, 0, 0, 0,
5057 0, 27, 28, 283, 30, 31, 32, 33, 34, 35,
5058 36, 37, 38, 39, 0, 40, 41, 42, 43, 44,
5059 45, 46, 0, 0, -812, 0, 0, 0, 0, 0,
5060 0, 0, 47, 48, 0, 0, 0, 0, 0, 0,
5061 0, 0, 0, 0, 0, 0, 0, 49, 50, 0,
5062 0, 0, 0, 0, 0, 51, 0, 0, 52, 53,
5063 54, 55, 0, 56, 0, 0, 57, 58, 59, 60,
5064 61, 62, 63, 64, 65, 0, 0, 0, 0, 0,
5065 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5066 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5067 0, 0, 0, 66, 67, 68, 0, 0, 0, 3,
5068 -812, 4, 5, 6, 7, 8, -812, 0, 0, 9,
5069 10, 0, 0, 0, 11, 0, 12, 13, 14, 15,
5070 16, 17, 18, 0, 0, 0, 0, 0, 19, 20,
5071 21, 22, 23, 24, 25, 0, 0, 26, 0, 0,
5072 0, 0, 0, 27, 28, 283, 30, 31, 32, 33,
5073 34, 35, 36, 37, 38, 39, 0, 40, 41, 42,
5074 43, 44, 45, 46, 0, 0, 0, 0, 0, 0,
5075 0, 0, 0, 0, 47, 48, 0, 0, 0, 0,
5076 0, 0, 0, 0, 0, 0, 0, 0, 0, 49,
5077 50, 0, 0, 0, 0, 0, 0, 51, 0, 0,
5078 284, 53, 54, 55, 0, 56, 0, 0, 57, 58,
5079 59, 60, 61, 62, 63, 64, 65, 0, 0, 0,
5080 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5081 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5082 0, 0, 0, 0, 0, 66, 67, 68, 0, 0,
5083 0, 0, -812, 0, 0, 0, -812, 3, -812, 4,
5084 5, 6, 7, 8, 0, 0, 0, 9, 10, 0,
5085 0, 0, 11, 0, 12, 13, 14, 15, 16, 17,
5086 18, 0, 0, 0, 0, 0, 19, 20, 21, 22,
5087 23, 24, 25, 0, 0, 26, 0, 0, 0, 0,
5088 0, 27, 28, 283, 30, 31, 32, 33, 34, 35,
5089 36, 37, 38, 39, 0, 40, 41, 42, 43, 44,
5090 45, 46, 0, 0, 0, 0, 0, 0, 0, 0,
5091 0, 0, 47, 48, 0, 0, 0, 0, 0, 0,
5092 0, 0, 0, 0, 0, 0, 0, 49, 50, 0,
5093 0, 0, 0, 0, 0, 51, 0, 0, 52, 53,
5094 54, 55, 0, 56, 0, 0, 57, 58, 59, 60,
5095 61, 62, 63, 64, 65, 0, 0, 0, 0, 0,
5096 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5097 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5098 0, 0, 0, 66, 67, 68, 0, 0, 0, 0,
5099 -812, 0, 0, 0, -812, 3, -812, 4, 5, 6,
5100 7, 8, 0, 0, 0, 9, 10, 0, 0, 0,
5101 11, 0, 12, 13, 14, 15, 16, 17, 18, 0,
5102 0, 0, 0, 0, 19, 20, 21, 22, 23, 24,
5103 25, 0, 0, 26, 0, 0, 0, 0, 0, 27,
5104 28, 29, 30, 31, 32, 33, 34, 35, 36, 37,
5105 38, 39, 0, 40, 41, 42, 43, 44, 45, 46,
5106 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5107 47, 48, 0, 0, 0, 0, 0, 0, 0, 0,
5108 0, 0, 0, 0, 0, 49, 50, 0, 0, 0,
5109 0, 0, 0, 51, 0, 0, 52, 53, 54, 55,
5110 0, 56, 0, 0, 57, 58, 59, 60, 61, 62,
5111 63, 64, 65, 0, 0, 0, 0, 0, 0, 0,
5112 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5113 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5114 0, 66, 67, 68, 0, 0, -812, 3, -812, 4,
5115 5, 6, 7, 8, -812, 0, 0, 9, 10, 0,
5116 0, 0, 11, 0, 12, 13, 14, 15, 16, 17,
5117 18, 0, 0, 0, 0, 0, 19, 20, 21, 22,
5118 23, 24, 25, 0, 0, 26, 0, 0, 0, 0,
5119 0, 27, 28, 283, 30, 31, 32, 33, 34, 35,
5120 36, 37, 38, 39, 0, 40, 41, 42, 43, 44,
5121 45, 46, 0, 0, 0, 0, 0, 0, 0, 0,
5122 0, 0, 47, 48, 0, 0, 0, 0, 0, 0,
5123 0, 0, 0, 0, 0, 0, 0, 49, 50, 0,
5124 0, 0, 0, 0, 0, 51, 0, 0, 52, 53,
5125 54, 55, 0, 56, 0, 0, 57, 58, 59, 60,
5126 61, 62, 63, 64, 65, 0, 0, 0, 0, 0,
5127 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5128 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5129 0, 0, 0, 66, 67, 68, 0, 0, -812, 403,
5130 -812, 4, 5, 6, 0, 8, -812, 0, 0, 9,
5131 10, 0, 0, 0, 11, -3, 12, 13, 14, 15,
5132 16, 17, 18, 0, 0, 0, 0, 0, 19, 20,
5133 21, 22, 23, 24, 25, 0, 0, 26, 0, 0,
5134 0, 0, 0, 0, 28, 0, 0, 31, 32, 33,
5135 34, 35, 36, 37, 38, 39, 0, 40, 41, 42,
5136 43, 44, 45, 46, 0, 0, 0, 0, 0, 0,
5137 0, 0, 0, 0, 47, 48, 0, 0, 0, 0,
5138 0, 0, 0, 0, 0, 0, 0, 0, 0, 49,
5139 50, 0, 0, 0, 0, 0, 0, 229, 0, 0,
5140 230, 53, 54, 55, 0, 0, 0, 0, 57, 58,
5141 59, 60, 61, 62, 63, 64, 65, 0, 0, 0,
5142 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5143 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5144 0, 0, 0, 0, 0, 66, 67, 68, 0, 0,
5145 0, 0, 330, 0, 0, 0, 0, 0, 331, 144,
5146 145, 146, 147, 148, 149, 150, 151, 152, 153, 154,
5147 155, 156, 157, 158, 159, 160, 161, 162, 163, 164,
5148 165, 166, 167, 0, 0, 0, 168, 169, 170, 433,
5149 434, 435, 436, 175, 176, 177, 0, 0, 0, 0,
5150 0, 178, 179, 180, 181, 437, 438, 439, 440, 186,
5151 36, 37, 441, 39, 0, 0, 0, 0, 0, 0,
5152 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5153 0, 0, 188, 189, 190, 191, 192, 193, 194, 195,
5154 196, 0, 0, 197, 198, 0, 0, 0, 0, 199,
5155 200, 201, 202, 0, 0, 0, 0, 0, 0, 0,
5156 0, 0, 0, 203, 204, 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, 205, 206, 207, 208, 209, 210, 211,
5160 212, 213, 214, 0, 215, 216, 0, 0, 0, 0,
5161 0, 0, 217, 442, 144, 145, 146, 147, 148, 149,
5162 150, 151, 152, 153, 154, 155, 156, 157, 158, 159,
5163 160, 161, 162, 163, 164, 165, 166, 167, 0, 0,
5164 0, 168, 169, 170, 171, 172, 173, 174, 175, 176,
5165 177, 0, 0, 0, 0, 0, 178, 179, 180, 181,
5166 182, 183, 184, 185, 186, 36, 37, 187, 39, 0,
5167 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5168 0, 0, 0, 0, 0, 0, 0, 188, 189, 190,
5169 191, 192, 193, 194, 195, 196, 0, 0, 197, 198,
5170 0, 0, 0, 0, 199, 200, 201, 202, 0, 0,
5171 0, 0, 0, 0, 0, 0, 0, 0, 203, 204,
5172 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5173 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5174 0, 0, 0, 0, 0, 0, 0, 0, 205, 206,
5175 207, 208, 209, 210, 211, 212, 213, 214, 0, 215,
5176 216, 0, 0, 0, 0, 0, 0, 217, 144, 145,
5177 146, 147, 148, 149, 150, 151, 152, 153, 154, 155,
5178 156, 157, 158, 159, 160, 161, 162, 163, 164, 165,
5179 166, 167, 0, 0, 0, 168, 169, 170, 171, 172,
5180 173, 174, 175, 176, 177, 0, 0, 0, 0, 0,
5181 178, 179, 180, 181, 182, 183, 184, 185, 186, 263,
5182 0, 187, 0, 0, 0, 0, 0, 0, 0, 0,
5183 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5184 0, 188, 189, 190, 191, 192, 193, 194, 195, 196,
5185 0, 0, 197, 198, 0, 0, 0, 0, 199, 200,
5186 201, 202, 0, 0, 0, 0, 0, 0, 0, 0,
5187 0, 0, 203, 204, 0, 0, 58, 0, 0, 0,
5188 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5189 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5190 0, 0, 205, 206, 207, 208, 209, 210, 211, 212,
5191 213, 214, 0, 215, 216, 0, 0, 0, 0, 0,
5192 0, 217, 144, 145, 146, 147, 148, 149, 150, 151,
5193 152, 153, 154, 155, 156, 157, 158, 159, 160, 161,
5194 162, 163, 164, 165, 166, 167, 0, 0, 0, 168,
5195 169, 170, 171, 172, 173, 174, 175, 176, 177, 0,
5196 0, 0, 0, 0, 178, 179, 180, 181, 182, 183,
5197 184, 185, 186, 0, 0, 187, 0, 0, 0, 0,
5198 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5199 0, 0, 0, 0, 0, 188, 189, 190, 191, 192,
5200 193, 194, 195, 196, 0, 0, 197, 198, 0, 0,
5201 0, 0, 199, 200, 201, 202, 0, 0, 0, 0,
5202 0, 0, 0, 0, 0, 0, 203, 204, 0, 0,
5203 58, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5204 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5205 0, 0, 0, 0, 0, 0, 205, 206, 207, 208,
5206 209, 210, 211, 212, 213, 214, 0, 215, 216, 0,
5207 0, 0, 0, 0, 0, 217, 144, 145, 146, 147,
5208 148, 149, 150, 151, 152, 153, 154, 155, 156, 157,
5209 158, 159, 160, 161, 162, 163, 164, 165, 166, 167,
5210 0, 0, 0, 168, 169, 170, 171, 172, 173, 174,
5211 175, 176, 177, 0, 0, 0, 0, 0, 178, 179,
5212 180, 181, 182, 183, 184, 185, 186, 0, 0, 187,
5213 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5214 0, 0, 0, 0, 0, 0, 0, 0, 0, 188,
5215 189, 190, 191, 192, 193, 194, 195, 196, 0, 0,
5216 197, 198, 0, 0, 0, 0, 199, 200, 201, 202,
5217 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5218 203, 204, 0, 0, 0, 0, 0, 0, 0, 0,
5219 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5220 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5221 205, 206, 207, 208, 209, 210, 211, 212, 213, 214,
5222 0, 215, 216, 4, 5, 6, 0, 8, 0, 217,
5223 0, 9, 10, 0, 0, 0, 11, 0, 12, 13,
5224 14, 271, 272, 17, 18, 0, 0, 0, 0, 0,
5225 19, 20, 273, 22, 23, 24, 25, 0, 0, 227,
5226 0, 0, 0, 0, 0, 0, 301, 0, 0, 31,
5227 32, 33, 34, 35, 36, 37, 38, 39, 0, 40,
5228 41, 42, 43, 44, 45, 46, 0, 0, 0, 0,
5229 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5230 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5231 0, 0, 0, 0, 0, 0, 0, 0, 0, 302,
5232 0, 0, 230, 53, 54, 55, 0, 0, 0, 0,
5233 57, 58, 59, 60, 61, 62, 63, 64, 65, 0,
5234 0, 4, 5, 6, 0, 8, 0, 0, 0, 9,
5235 10, 0, 0, 0, 11, 0, 12, 13, 14, 271,
5236 272, 17, 18, 0, 0, 0, 0, 303, 19, 20,
5237 273, 22, 23, 24, 25, 304, 0, 227, 0, 0,
5238 0, 0, 0, 0, 301, 0, 0, 31, 32, 33,
5239 34, 35, 36, 37, 38, 39, 0, 40, 41, 42,
5240 43, 44, 45, 46, 0, 0, 0, 0, 0, 0,
5241 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5242 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5243 0, 0, 0, 0, 0, 0, 0, 302, 0, 0,
5244 230, 53, 54, 55, 0, 0, 0, 0, 57, 58,
5245 59, 60, 61, 62, 63, 64, 65, 0, 0, 4,
5246 5, 6, 0, 8, 0, 0, 0, 9, 10, 0,
5247 0, 0, 11, 0, 12, 13, 14, 15, 16, 17,
5248 18, 0, 0, 0, 0, 303, 19, 20, 21, 22,
5249 23, 24, 25, 607, 0, 227, 0, 0, 0, 0,
5250 0, 0, 28, 0, 0, 31, 32, 33, 34, 35,
5251 36, 37, 38, 39, 228, 40, 41, 42, 43, 44,
5252 45, 46, 0, 0, 0, 0, 0, 0, 0, 0,
5253 0, 0, 47, 48, 0, 0, 0, 0, 0, 0,
5254 0, 0, 0, 0, 0, 0, 0, 49, 50, 0,
5255 0, 0, 0, 0, 0, 229, 0, 0, 230, 53,
5256 54, 55, 0, 231, 232, 233, 57, 58, 234, 60,
5257 61, 62, 63, 64, 65, 0, 0, 0, 0, 0,
5258 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5259 0, 0, 0, 0, 0, 0, 0, 0, 4, 5,
5260 6, 0, 8, 66, 235, 68, 9, 10, 0, 0,
5261 260, 11, 0, 12, 13, 14, 15, 16, 17, 18,
5262 0, 0, 0, 0, 0, 19, 20, 21, 22, 23,
5263 24, 25, 0, 0, 26, 0, 0, 0, 0, 0,
5264 0, 28, 0, 0, 31, 32, 33, 34, 35, 36,
5265 37, 38, 39, 0, 40, 41, 42, 43, 44, 45,
5266 46, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5267 0, 47, 48, 0, 0, 0, 0, 0, 0, 0,
5268 0, 0, 0, 0, 0, 0, 49, 50, 0, 0,
5269 0, 0, 0, 0, 229, 0, 0, 230, 53, 54,
5270 55, 0, 0, 0, 0, 57, 58, 59, 60, 61,
5271 62, 63, 64, 65, 0, 0, 0, 0, 0, 0,
5272 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5273 0, 0, 0, 0, 0, 3, 0, 4, 5, 6,
5274 7, 8, 66, 67, 68, 9, 10, 0, 0, 260,
5275 11, 0, 12, 13, 14, 15, 16, 17, 18, 0,
5276 0, 0, 0, 0, 19, 20, 21, 22, 23, 24,
5277 25, 0, 0, 26, 0, 0, 0, 0, 0, 27,
5278 28, 0, 30, 31, 32, 33, 34, 35, 36, 37,
5279 38, 39, 0, 40, 41, 42, 43, 44, 45, 46,
5280 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5281 47, 48, 0, 0, 0, 0, 0, 0, 0, 0,
5282 0, 0, 0, 0, 0, 49, 50, 0, 0, 0,
5283 0, 0, 0, 51, 0, 0, 52, 53, 54, 55,
5284 0, 56, 0, 0, 57, 58, 59, 60, 61, 62,
5285 63, 64, 65, 0, 0, 403, 0, 4, 5, 6,
5286 0, 8, 0, 0, 0, 9, 10, 0, 0, 0,
5287 11, 0, 12, 13, 14, 15, 16, 17, 18, 0,
5288 0, 66, 67, 68, 19, 20, 21, 22, 23, 24,
5289 25, 0, 0, 26, 0, 0, 0, 0, 0, 0,
5290 28, 0, 0, 31, 32, 33, 34, 35, 36, 37,
5291 38, 39, 0, 40, 41, 42, 43, 44, 45, 46,
5292 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5293 47, 48, 0, 0, 0, 0, 0, 0, 0, 0,
5294 0, 0, 0, 0, 0, 49, 50, 0, 0, 0,
5295 0, 0, 0, 229, 0, 0, 230, 53, 54, 55,
5296 0, 0, 0, 0, 57, 58, 59, 60, 61, 62,
5297 63, 64, 65, 0, 0, 0, 0, 4, 5, 6,
5298 0, 8, 0, 0, 0, 9, 10, 0, 0, 0,
5299 11, 0, 12, 13, 14, 15, 16, 17, 18, 0,
5300 0, 66, 67, 68, 19, 20, 21, 22, 23, 24,
5301 25, 0, 0, 227, 0, 0, 0, 0, 0, 0,
5302 28, 0, 0, 31, 32, 33, 34, 35, 36, 37,
5303 38, 39, 228, 40, 41, 42, 43, 44, 45, 46,
5304 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5305 47, 48, 0, 0, 0, 0, 0, 0, 0, 0,
5306 0, 0, 0, 0, 0, 49, 50, 0, 0, 0,
5307 0, 0, 0, 229, 0, 0, 230, 53, 54, 55,
5308 0, 231, 232, 233, 57, 58, 234, 60, 61, 62,
5309 63, 64, 65, 0, 0, 0, 0, 4, 5, 6,
5310 0, 8, 0, 0, 0, 9, 10, 0, 0, 0,
5311 11, 0, 12, 13, 14, 15, 16, 17, 18, 0,
5312 0, 66, 235, 68, 19, 20, 21, 22, 23, 24,
5313 25, 0, 0, 227, 0, 0, 0, 0, 0, 0,
5314 28, 0, 0, 31, 32, 33, 34, 35, 36, 37,
5315 38, 39, 228, 40, 41, 42, 43, 44, 45, 46,
5316 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5317 47, 48, 0, 0, 0, 0, 0, 0, 0, 0,
5318 0, 0, 0, 0, 0, 49, 480, 0, 0, 0,
5319 0, 0, 0, 229, 0, 0, 230, 53, 54, 55,
5320 0, 231, 232, 233, 57, 58, 234, 60, 61, 62,
5321 63, 64, 65, 0, 0, 0, 0, 4, 5, 6,
5322 0, 8, 0, 0, 0, 9, 10, 0, 0, 0,
5323 11, 0, 12, 13, 14, 271, 272, 17, 18, 0,
5324 0, 66, 235, 68, 19, 20, 273, 22, 23, 24,
5325 25, 0, 0, 227, 0, 0, 0, 0, 0, 0,
5326 28, 0, 0, 31, 32, 33, 34, 35, 36, 37,
5327 38, 39, 228, 40, 41, 42, 43, 44, 45, 46,
5328 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5329 47, 48, 0, 0, 0, 0, 0, 0, 0, 0,
5330 0, 0, 0, 0, 0, 49, 50, 0, 0, 0,
5331 0, 0, 0, 229, 0, 0, 230, 53, 54, 55,
5332 0, 231, 232, 233, 57, 58, 234, 60, 61, 62,
5333 63, 64, 65, 0, 0, 0, 0, 4, 5, 6,
5334 0, 8, 0, 0, 0, 9, 10, 0, 0, 0,
5335 11, 0, 12, 13, 14, 271, 272, 17, 18, 0,
5336 0, 66, 235, 68, 19, 20, 273, 22, 23, 24,
5337 25, 0, 0, 227, 0, 0, 0, 0, 0, 0,
5338 28, 0, 0, 31, 32, 33, 34, 35, 36, 37,
5339 38, 39, 228, 40, 41, 42, 43, 44, 45, 46,
5340 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5341 47, 48, 0, 0, 0, 0, 0, 0, 0, 0,
5342 0, 0, 0, 0, 0, 49, 480, 0, 0, 0,
5343 0, 0, 0, 229, 0, 0, 230, 53, 54, 55,
5344 0, 231, 232, 233, 57, 58, 234, 60, 61, 62,
5345 63, 64, 65, 0, 0, 0, 0, 4, 5, 6,
5346 0, 8, 0, 0, 0, 9, 10, 0, 0, 0,
5347 11, 0, 12, 13, 14, 271, 272, 17, 18, 0,
5348 0, 66, 235, 68, 19, 20, 273, 22, 23, 24,
5349 25, 0, 0, 227, 0, 0, 0, 0, 0, 0,
5350 28, 0, 0, 31, 32, 33, 34, 35, 36, 37,
5351 38, 39, 228, 40, 41, 42, 43, 44, 45, 46,
5352 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5353 47, 48, 0, 0, 0, 0, 0, 0, 0, 0,
5354 0, 0, 0, 0, 0, 49, 50, 0, 0, 0,
5355 0, 0, 0, 229, 0, 0, 230, 53, 54, 55,
5356 0, 231, 232, 0, 57, 58, 234, 60, 61, 62,
5357 63, 64, 65, 0, 0, 0, 0, 4, 5, 6,
5358 0, 8, 0, 0, 0, 9, 10, 0, 0, 0,
5359 11, 0, 12, 13, 14, 271, 272, 17, 18, 0,
5360 0, 66, 235, 68, 19, 20, 273, 22, 23, 24,
5361 25, 0, 0, 227, 0, 0, 0, 0, 0, 0,
5362 28, 0, 0, 31, 32, 33, 34, 35, 36, 37,
5363 38, 39, 228, 40, 41, 42, 43, 44, 45, 46,
5364 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5365 47, 48, 0, 0, 0, 0, 0, 0, 0, 0,
5366 0, 0, 0, 0, 0, 49, 50, 0, 0, 0,
5367 0, 0, 0, 229, 0, 0, 230, 53, 54, 55,
5368 0, 0, 232, 233, 57, 58, 234, 60, 61, 62,
5369 63, 64, 65, 0, 0, 0, 0, 4, 5, 6,
5370 0, 8, 0, 0, 0, 9, 10, 0, 0, 0,
5371 11, 0, 12, 13, 14, 271, 272, 17, 18, 0,
5372 0, 66, 235, 68, 19, 20, 273, 22, 23, 24,
5373 25, 0, 0, 227, 0, 0, 0, 0, 0, 0,
5374 28, 0, 0, 31, 32, 33, 34, 35, 36, 37,
5375 38, 39, 228, 40, 41, 42, 43, 44, 45, 46,
5376 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5377 47, 48, 0, 0, 0, 0, 0, 0, 0, 0,
5378 0, 0, 0, 0, 0, 49, 50, 0, 0, 0,
5379 0, 0, 0, 229, 0, 0, 230, 53, 54, 55,
5380 0, 0, 232, 0, 57, 58, 234, 60, 61, 62,
5381 63, 64, 65, 0, 0, 0, 0, 4, 5, 6,
5382 0, 8, 0, 0, 0, 9, 10, 0, 0, 0,
5383 11, 0, 12, 13, 14, 15, 16, 17, 18, 0,
5384 0, 66, 235, 68, 19, 20, 21, 22, 23, 24,
5385 25, 0, 0, 227, 0, 0, 0, 0, 0, 0,
5386 28, 0, 0, 31, 32, 33, 34, 35, 36, 37,
5387 38, 39, 0, 40, 41, 42, 43, 44, 45, 46,
5388 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5389 47, 48, 0, 0, 0, 0, 0, 0, 0, 0,
5390 0, 0, 0, 0, 0, 49, 50, 0, 0, 0,
5391 0, 0, 0, 229, 0, 0, 230, 53, 54, 55,
5392 0, 793, 0, 0, 57, 58, 59, 60, 61, 62,
5393 63, 64, 65, 0, 0, 0, 0, 4, 5, 6,
5394 0, 8, 0, 0, 0, 9, 10, 0, 0, 0,
5395 11, 0, 12, 13, 14, 15, 16, 17, 18, 0,
5396 0, 66, 235, 68, 19, 20, 21, 22, 23, 24,
5397 25, 0, 0, 227, 0, 0, 0, 0, 0, 0,
5398 28, 0, 0, 31, 32, 33, 34, 35, 36, 37,
5399 38, 39, 0, 40, 41, 42, 43, 44, 45, 46,
5400 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5401 47, 48, 0, 0, 0, 0, 0, 0, 0, 0,
5402 0, 0, 0, 0, 0, 49, 50, 0, 0, 0,
5403 0, 0, 0, 804, 0, 0, 230, 53, 54, 55,
5404 0, 793, 0, 0, 57, 58, 59, 60, 61, 62,
5405 63, 64, 65, 0, 0, 0, 0, 4, 5, 6,
5406 0, 8, 0, 0, 0, 9, 10, 0, 0, 0,
5407 11, 0, 12, 13, 14, 271, 272, 17, 18, 0,
5408 0, 66, 235, 68, 19, 20, 273, 22, 23, 24,
5409 25, 0, 0, 227, 0, 0, 0, 0, 0, 0,
5410 28, 0, 0, 31, 32, 33, 34, 35, 36, 37,
5411 38, 39, 0, 40, 41, 42, 43, 44, 45, 46,
5412 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5413 47, 48, 0, 0, 0, 0, 0, 0, 0, 0,
5414 0, 0, 0, 0, 0, 49, 50, 0, 0, 0,
5415 0, 0, 0, 229, 0, 0, 230, 53, 54, 55,
5416 0, 965, 0, 0, 57, 58, 59, 60, 61, 62,
5417 63, 64, 65, 0, 0, 0, 0, 4, 5, 6,
5418 0, 8, 0, 0, 0, 9, 10, 0, 0, 0,
5419 11, 0, 12, 13, 14, 271, 272, 17, 18, 0,
5420 0, 66, 235, 68, 19, 20, 273, 22, 23, 24,
5421 25, 0, 0, 227, 0, 0, 0, 0, 0, 0,
5422 28, 0, 0, 31, 32, 33, 34, 35, 36, 37,
5423 38, 39, 0, 40, 41, 42, 43, 44, 45, 46,
5424 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5425 47, 48, 0, 0, 0, 0, 0, 0, 0, 0,
5426 0, 0, 0, 0, 0, 49, 50, 0, 0, 0,
5427 0, 0, 0, 229, 0, 0, 230, 53, 54, 55,
5428 0, 1014, 0, 0, 57, 58, 59, 60, 61, 62,
5429 63, 64, 65, 0, 0, 0, 0, 4, 5, 6,
5430 0, 8, 0, 0, 0, 9, 10, 0, 0, 0,
5431 11, 0, 12, 13, 14, 271, 272, 17, 18, 0,
5432 0, 66, 235, 68, 19, 20, 273, 22, 23, 24,
5433 25, 0, 0, 227, 0, 0, 0, 0, 0, 0,
5434 28, 0, 0, 31, 32, 33, 34, 35, 36, 37,
5435 38, 39, 0, 40, 41, 42, 43, 44, 45, 46,
5436 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5437 47, 48, 0, 0, 0, 0, 0, 0, 0, 0,
5438 0, 0, 0, 0, 0, 49, 50, 0, 0, 0,
5439 0, 0, 0, 229, 0, 0, 230, 53, 54, 55,
5440 0, 793, 0, 0, 57, 58, 59, 60, 61, 62,
5441 63, 64, 65, 0, 0, 0, 0, 4, 5, 6,
5442 0, 8, 0, 0, 0, 9, 10, 0, 0, 0,
5443 11, 0, 12, 13, 14, 271, 272, 17, 18, 0,
5444 0, 66, 235, 68, 19, 20, 273, 22, 23, 24,
5445 25, 0, 0, 227, 0, 0, 0, 0, 0, 0,
5446 28, 0, 0, 31, 32, 33, 34, 35, 36, 37,
5447 38, 39, 0, 40, 41, 42, 43, 44, 45, 46,
5448 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5449 47, 48, 0, 0, 0, 0, 0, 0, 0, 0,
5450 0, 0, 0, 0, 0, 49, 50, 0, 0, 0,
5451 0, 0, 0, 229, 0, 0, 230, 53, 54, 55,
5452 0, 1134, 0, 0, 57, 58, 59, 60, 61, 62,
5453 63, 64, 65, 0, 0, 0, 0, 4, 5, 6,
5454 0, 8, 0, 0, 0, 9, 10, 0, 0, 0,
5455 11, 0, 12, 13, 14, 271, 272, 17, 18, 0,
5456 0, 66, 235, 68, 19, 20, 273, 22, 23, 24,
5457 25, 0, 0, 227, 0, 0, 0, 0, 0, 0,
5458 28, 0, 0, 31, 32, 33, 34, 35, 36, 37,
5459 38, 39, 0, 40, 41, 42, 43, 44, 45, 46,
5460 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5461 47, 48, 0, 0, 0, 0, 0, 0, 0, 0,
5462 0, 0, 0, 0, 0, 49, 50, 0, 0, 0,
5463 0, 0, 0, 229, 0, 0, 230, 53, 54, 55,
5464 0, 0, 0, 0, 57, 58, 59, 60, 61, 62,
5465 63, 64, 65, 0, 0, 0, 0, 4, 5, 6,
5466 0, 8, 0, 0, 0, 9, 10, 0, 0, 0,
5467 11, 0, 12, 13, 14, 15, 16, 17, 18, 0,
5468 0, 66, 235, 68, 19, 20, 21, 22, 23, 24,
5469 25, 0, 0, 227, 0, 0, 0, 0, 0, 0,
5470 28, 0, 0, 31, 32, 33, 34, 35, 36, 37,
5471 38, 39, 0, 40, 41, 42, 43, 44, 45, 46,
5472 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5473 47, 48, 0, 0, 0, 0, 0, 0, 0, 0,
5474 0, 0, 0, 0, 0, 49, 50, 0, 0, 0,
5475 0, 0, 0, 229, 0, 0, 230, 53, 54, 55,
5476 0, 0, 0, 0, 57, 58, 59, 60, 61, 62,
5477 63, 64, 65, 0, 0, 0, 0, 4, 5, 6,
5478 0, 8, 0, 0, 0, 9, 10, 0, 0, 0,
5479 11, 0, 12, 13, 14, 15, 16, 17, 18, 0,
5480 0, 66, 235, 68, 19, 20, 21, 22, 23, 24,
5481 25, 0, 0, 26, 0, 0, 0, 0, 0, 0,
5482 28, 0, 0, 31, 32, 33, 34, 35, 36, 37,
5483 38, 39, 0, 40, 41, 42, 43, 44, 45, 46,
5484 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5485 47, 48, 0, 0, 0, 0, 0, 0, 0, 0,
5486 0, 0, 0, 0, 0, 49, 50, 0, 0, 0,
5487 0, 0, 0, 229, 0, 0, 230, 53, 54, 55,
5488 0, 0, 0, 0, 57, 58, 59, 60, 61, 62,
5489 63, 64, 65, 0, 0, 0, 0, 4, 5, 6,
5490 0, 8, 0, 0, 0, 9, 10, 0, 0, 0,
5491 11, 0, 12, 13, 14, 15, 16, 17, 18, 0,
5492 0, 66, 67, 68, 19, 20, 21, 22, 23, 24,
5493 25, 0, 0, 775, 0, 0, 0, 0, 0, 0,
5494 28, 0, 0, 31, 32, 33, 34, 35, 36, 37,
5495 38, 39, 0, 40, 41, 42, 43, 44, 45, 46,
5496 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5497 47, 48, 0, 0, 0, 0, 0, 0, 0, 0,
5498 0, 0, 0, 0, 0, 49, 50, 0, 0, 0,
5499 0, 0, 0, 229, 0, 0, 230, 53, 54, 55,
5500 0, 0, 0, 0, 57, 58, 59, 60, 61, 62,
5501 63, 64, 65, 0, 0, 0, 0, 4, 5, 6,
5502 0, 8, 0, 0, 0, 9, 10, 0, 0, 0,
5503 11, 0, 12, 13, 14, 15, 16, 17, 18, 0,
5504 0, 66, 235, 68, 19, 20, 21, 22, 23, 24,
5505 25, 0, 0, 227, 0, 0, 0, 0, 0, 0,
5506 28, 0, 0, 31, 32, 33, 34, 35, 36, 37,
5507 38, 39, 0, 40, 41, 42, 43, 44, 45, 46,
5508 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5509 47, 48, 0, 0, 0, 0, 0, 0, 0, 0,
5510 0, 0, 0, 0, 0, 49, 50, 0, 0, 0,
5511 0, 0, 0, 804, 0, 0, 230, 53, 54, 55,
5512 0, 0, 0, 0, 57, 58, 59, 60, 61, 62,
5513 63, 64, 65, 0, 0, 0, 0, 4, 5, 6,
5514 0, 8, 0, 0, 0, 9, 10, 0, 0, 0,
5515 11, 0, 12, 13, 14, 271, 272, 17, 18, 0,
5516 0, 66, 235, 68, 19, 20, 273, 22, 23, 24,
5517 25, 0, 0, 875, 0, 0, 0, 0, 0, 0,
5518 28, 0, 0, 31, 32, 33, 34, 35, 36, 37,
5519 38, 39, 0, 40, 41, 42, 43, 44, 45, 46,
5520 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5521 47, 48, 0, 0, 0, 0, 0, 0, 0, 0,
5522 0, 0, 0, 0, 0, 49, 50, 0, 0, 0,
5523 0, 0, 0, 229, 0, 0, 230, 53, 54, 55,
5524 0, 0, 0, 0, 57, 58, 59, 60, 61, 62,
5525 63, 64, 65, 0, 0, 0, 0, 4, 5, 6,
5526 0, 8, 0, 0, 0, 9, 10, 0, 0, 0,
5527 11, 0, 12, 13, 14, 271, 272, 17, 18, 0,
5528 0, 66, 235, 68, 19, 20, 273, 22, 23, 24,
5529 25, 0, 0, 227, 0, 0, 0, 0, 0, 0,
5530 301, 0, 0, 31, 32, 33, 34, 35, 36, 37,
5531 38, 39, 0, 40, 41, 42, 43, 44, 45, 46,
5532 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5533 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5534 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5535 0, 0, 0, 302, 0, 0, 362, 53, 54, 55,
5536 0, 363, 0, 0, 57, 58, 59, 60, 61, 62,
5537 63, 64, 65, 0, 0, 4, 5, 6, 0, 8,
5538 0, 0, 0, 9, 10, 0, 0, 0, 11, 0,
5539 12, 13, 14, 271, 272, 17, 18, 0, 0, 0,
5540 0, 303, 19, 20, 273, 22, 23, 24, 25, 0,
5541 0, 227, 0, 0, 0, 0, 0, 0, 301, 0,
5542 0, 31, 32, 33, 34, 35, 36, 37, 38, 39,
5543 0, 40, 41, 42, 43, 44, 45, 46, 0, 0,
5544 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5545 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5546 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5547 0, 414, 0, 0, 52, 53, 54, 55, 0, 56,
5548 0, 0, 57, 58, 59, 60, 61, 62, 63, 64,
5549 65, 0, 0, 4, 5, 6, 0, 8, 0, 0,
5550 0, 9, 10, 0, 0, 0, 11, 0, 12, 13,
5551 14, 271, 272, 17, 18, 0, 0, 0, 0, 303,
5552 19, 20, 273, 22, 23, 24, 25, 0, 0, 227,
5553 0, 0, 0, 0, 0, 0, 301, 0, 0, 31,
5554 32, 33, 422, 35, 36, 37, 423, 39, 0, 40,
5555 41, 42, 43, 44, 45, 46, 0, 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, 424, 0, 0, 0, 425,
5559 0, 0, 230, 53, 54, 55, 0, 0, 0, 0,
5560 57, 58, 59, 60, 61, 62, 63, 64, 65, 0,
5561 0, 4, 5, 6, 0, 8, 0, 0, 0, 9,
5562 10, 0, 0, 0, 11, 0, 12, 13, 14, 271,
5563 272, 17, 18, 0, 0, 0, 0, 303, 19, 20,
5564 273, 22, 23, 24, 25, 0, 0, 227, 0, 0,
5565 0, 0, 0, 0, 301, 0, 0, 31, 32, 33,
5566 422, 35, 36, 37, 423, 39, 0, 40, 41, 42,
5567 43, 44, 45, 46, 0, 0, 0, 0, 0, 0,
5568 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5569 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5570 0, 0, 0, 0, 0, 0, 0, 425, 0, 0,
5571 230, 53, 54, 55, 0, 0, 0, 0, 57, 58,
5572 59, 60, 61, 62, 63, 64, 65, 0, 0, 4,
5573 5, 6, 0, 8, 0, 0, 0, 9, 10, 0,
5574 0, 0, 11, 0, 12, 13, 14, 271, 272, 17,
5575 18, 0, 0, 0, 0, 303, 19, 20, 273, 22,
5576 23, 24, 25, 0, 0, 227, 0, 0, 0, 0,
5577 0, 0, 301, 0, 0, 31, 32, 33, 34, 35,
5578 36, 37, 38, 39, 0, 40, 41, 42, 43, 44,
5579 45, 46, 0, 0, 0, 0, 0, 0, 0, 0,
5580 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5581 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5582 0, 0, 0, 0, 0, 302, 0, 0, 362, 53,
5583 54, 55, 0, 0, 0, 0, 57, 58, 59, 60,
5584 61, 62, 63, 64, 65, 0, 0, 4, 5, 6,
5585 0, 8, 0, 0, 0, 9, 10, 0, 0, 0,
5586 11, 0, 12, 13, 14, 271, 272, 17, 18, 0,
5587 0, 0, 0, 303, 19, 20, 273, 22, 23, 24,
5588 25, 0, 0, 227, 0, 0, 0, 0, 0, 0,
5589 301, 0, 0, 31, 32, 33, 34, 35, 36, 37,
5590 38, 39, 0, 40, 41, 42, 43, 44, 45, 46,
5591 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5592 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5593 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5594 0, 0, 0, 1190, 0, 0, 230, 53, 54, 55,
5595 0, 0, 0, 0, 57, 58, 59, 60, 61, 62,
5596 63, 64, 65, 0, 0, 4, 5, 6, 0, 8,
5597 0, 0, 0, 9, 10, 0, 0, 0, 11, 0,
5598 12, 13, 14, 271, 272, 17, 18, 0, 0, 0,
5599 0, 303, 19, 20, 273, 22, 23, 24, 25, 0,
5600 0, 227, 0, 0, 0, 0, 0, 0, 301, 0,
5601 0, 31, 32, 33, 34, 35, 36, 37, 38, 39,
5602 0, 40, 41, 42, 43, 44, 45, 46, 0, 0,
5603 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5604 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5605 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5606 0, 1289, 0, 0, 230, 53, 54, 55, 22, 23,
5607 24, 25, 57, 58, 59, 60, 61, 62, 63, 64,
5608 65, 0, 0, 0, 31, 32, 33, 1077, 0, 0,
5609 0, 1078, 0, 0, 40, 41, 42, 43, 44, 0,
5610 0, 0, 0, 0, 0, 0, 0, 0, 0, 303,
5611 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5612 0, 0, 0, 0, 0, 0, 1080, 1081, 0, 0,
5613 0, 0, 0, 0, 1082, 0, 0, 1083, 0, 1084,
5614 1085, 0, 0, 0, 0, 57, 58, 59, 60, 61,
5615 62, 63, 64, 65, 0, 0, 0, 0, 0, 684,
5616 646, 0, 0, 685, 0, 0, 0, 0, 0, 0,
5617 0, 0, 0, 0, 0, 1088, 0, 0, 0, 0,
5618 0, 0, 303, 188, 189, 190, 191, 192, 193, 194,
5619 195, 196, 0, 0, 197, 198, 0, 0, 0, 0,
5620 199, 200, 201, 202, 0, 0, 0, 0, 0, 0,
5621 0, 0, 0, 0, 203, 204, 0, 0, 0, 0,
5622 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5623 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5624 0, 0, 0, 0, 205, 206, 207, 208, 209, 210,
5625 211, 212, 213, 214, 0, 215, 216, 700, 638, 0,
5626 0, 701, 0, 217, 0, 0, 0, 0, 0, 0,
5627 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5628 0, 188, 189, 190, 191, 192, 193, 194, 195, 196,
5629 0, 0, 197, 198, 0, 0, 0, 0, 199, 200,
5630 201, 202, 0, 0, 0, 0, 0, 0, 0, 0,
5631 0, 0, 203, 204, 0, 0, 0, 0, 0, 0,
5632 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5633 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5634 0, 0, 205, 206, 207, 208, 209, 210, 211, 212,
5635 213, 214, 0, 215, 216, 703, 646, 0, 0, 704,
5636 0, 217, 0, 0, 0, 0, 0, 0, 0, 0,
5637 0, 0, 0, 0, 0, 0, 0, 0, 0, 188,
5638 189, 190, 191, 192, 193, 194, 195, 196, 0, 0,
5639 197, 198, 0, 0, 0, 0, 199, 200, 201, 202,
5640 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5641 203, 204, 0, 0, 0, 0, 0, 0, 0, 0,
5642 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5643 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5644 205, 206, 207, 208, 209, 210, 211, 212, 213, 214,
5645 0, 215, 216, 700, 638, 0, 0, 718, 0, 217,
5646 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5647 0, 0, 0, 0, 0, 0, 0, 188, 189, 190,
5648 191, 192, 193, 194, 195, 196, 0, 0, 197, 198,
5649 0, 0, 0, 0, 199, 200, 201, 202, 0, 0,
5650 0, 0, 0, 0, 0, 0, 0, 0, 203, 204,
5651 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5652 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5653 0, 0, 0, 0, 0, 0, 0, 0, 205, 206,
5654 207, 208, 209, 210, 211, 212, 213, 214, 0, 215,
5655 216, 729, 638, 0, 0, 730, 0, 217, 0, 0,
5656 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5657 0, 0, 0, 0, 0, 188, 189, 190, 191, 192,
5658 193, 194, 195, 196, 0, 0, 197, 198, 0, 0,
5659 0, 0, 199, 200, 201, 202, 0, 0, 0, 0,
5660 0, 0, 0, 0, 0, 0, 203, 204, 0, 0,
5661 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5662 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5663 0, 0, 0, 0, 0, 0, 205, 206, 207, 208,
5664 209, 210, 211, 212, 213, 214, 0, 215, 216, 732,
5665 646, 0, 0, 733, 0, 217, 0, 0, 0, 0,
5666 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5667 0, 0, 0, 188, 189, 190, 191, 192, 193, 194,
5668 195, 196, 0, 0, 197, 198, 0, 0, 0, 0,
5669 199, 200, 201, 202, 0, 0, 0, 0, 0, 0,
5670 0, 0, 0, 0, 203, 204, 0, 0, 0, 0,
5671 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5672 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5673 0, 0, 0, 0, 205, 206, 207, 208, 209, 210,
5674 211, 212, 213, 214, 0, 215, 216, 848, 638, 0,
5675 0, 849, 0, 217, 0, 0, 0, 0, 0, 0,
5676 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5677 0, 188, 189, 190, 191, 192, 193, 194, 195, 196,
5678 0, 0, 197, 198, 0, 0, 0, 0, 199, 200,
5679 201, 202, 0, 0, 0, 0, 0, 0, 0, 0,
5680 0, 0, 203, 204, 0, 0, 0, 0, 0, 0,
5681 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5682 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5683 0, 0, 205, 206, 207, 208, 209, 210, 211, 212,
5684 213, 214, 0, 215, 216, 851, 646, 0, 0, 852,
5685 0, 217, 0, 0, 0, 0, 0, 0, 0, 0,
5686 0, 0, 0, 0, 0, 0, 0, 0, 0, 188,
5687 189, 190, 191, 192, 193, 194, 195, 196, 0, 0,
5688 197, 198, 0, 0, 0, 0, 199, 200, 201, 202,
5689 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5690 203, 204, 0, 0, 0, 0, 0, 0, 0, 0,
5691 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5692 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5693 205, 206, 207, 208, 209, 210, 211, 212, 213, 214,
5694 0, 215, 216, 857, 638, 0, 0, 858, 0, 217,
5695 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5696 0, 0, 0, 0, 0, 0, 0, 188, 189, 190,
5697 191, 192, 193, 194, 195, 196, 0, 0, 197, 198,
5698 0, 0, 0, 0, 199, 200, 201, 202, 0, 0,
5699 0, 0, 0, 0, 0, 0, 0, 0, 203, 204,
5700 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5701 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5702 0, 0, 0, 0, 0, 0, 0, 0, 205, 206,
5703 207, 208, 209, 210, 211, 212, 213, 214, 0, 215,
5704 216, 1020, 638, 0, 0, 1021, 0, 217, 0, 0,
5705 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5706 0, 0, 0, 0, 0, 188, 189, 190, 191, 192,
5707 193, 194, 195, 196, 0, 0, 197, 198, 0, 0,
5708 0, 0, 199, 200, 201, 202, 0, 0, 0, 0,
5709 0, 0, 0, 0, 0, 0, 203, 204, 0, 0,
5710 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5711 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5712 0, 0, 0, 0, 0, 0, 205, 206, 207, 208,
5713 209, 210, 211, 212, 213, 214, 0, 215, 216, 1023,
5714 646, 0, 0, 1024, 0, 217, 0, 0, 0, 0,
5715 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5716 0, 0, 0, 188, 189, 190, 191, 192, 193, 194,
5717 195, 196, 0, 0, 197, 198, 0, 0, 0, 0,
5718 199, 200, 201, 202, 0, 0, 0, 0, 0, 0,
5719 0, 0, 0, 0, 203, 204, 0, 0, 0, 0,
5720 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5721 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5722 0, 0, 0, 0, 205, 206, 207, 208, 209, 210,
5723 211, 212, 213, 214, 0, 215, 216, 1307, 638, 0,
5724 0, 1308, 0, 217, 0, 0, 0, 0, 0, 0,
5725 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5726 0, 188, 189, 190, 191, 192, 193, 194, 195, 196,
5727 0, 0, 197, 198, 0, 0, 0, 0, 199, 200,
5728 201, 202, 0, 0, 0, 0, 0, 0, 0, 0,
5729 0, 0, 203, 204, 0, 0, 0, 0, 0, 0,
5730 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5731 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5732 0, 0, 205, 206, 207, 208, 209, 210, 211, 212,
5733 213, 214, 0, 215, 216, 1310, 646, 0, 0, 1311,
5734 0, 217, 0, 0, 0, 0, 0, 0, 0, 0,
5735 0, 0, 0, 0, 0, 0, 0, 0, 0, 188,
5736 189, 190, 191, 192, 193, 194, 195, 196, 0, 0,
5737 197, 198, 0, 0, 0, 0, 199, 200, 201, 202,
5738 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5739 203, 204, 0, 0, 0, 0, 0, 0, 0, 0,
5740 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5741 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5742 205, 206, 207, 208, 209, 210, 211, 212, 213, 214,
5743 0, 215, 216, 1355, 638, 0, 0, 1356, 0, 217,
5744 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5745 0, 0, 0, 0, 0, 0, 0, 188, 189, 190,
5746 191, 192, 193, 194, 195, 196, 0, 0, 197, 198,
5747 0, 0, 0, 0, 199, 200, 201, 202, 0, 0,
5748 0, 0, 0, 0, 0, 0, 0, 0, 203, 204,
5749 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5750 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5751 0, 0, 0, 0, 0, 0, 0, 0, 205, 206,
5752 207, 208, 209, 210, 211, 212, 213, 214, 0, 215,
5753 216, 0, 0, 0, 0, 0, 0, 217
5754};
5755
5756static const yytype_int16 yycheck[] =
5757{
5758 1, 59, 7, 103, 104, 15, 16, 107, 70, 58,
5759 58, 101, 116, 107, 347, 1, 1, 253, 13, 14,
5760 343, 56, 27, 7, 347, 115, 399, 256, 766, 425,
5761 759, 67, 573, 15, 16, 407, 27, 89, 836, 596,
5762 52, 53, 21, 27, 610, 343, 70, 15, 16, 347,
5763 596, 52, 53, 58, 89, 56, 56, 594, 761, 66,
5764 597, 295, 398, 111, 400, 299, 52, 53, 54, 55,
5765 470, 903, 54, 108, 109, 110, 470, 72, 478, 759,
5766 478, 816, 52, 107, 846, 600, 54, 55, 89, 63,
5767 64, 65, 15, 16, 80, 81, 625, 25, 905, 524,
5768 0, 474, 112, 1025, 1026, 84, 111, 108, 109, 110,
5769 111, 55, 941, 319, 320, 25, 514, 511, 454, 81,
5770 29, 564, 284, 687, 688, 84, 1282, 25, 1163, 1026,
5771 112, 78, 13, 1274, 101, 25, 693, 473, 104, 475,
5772 677, 107, 1177, 10, 112, 100, 34, 25, 34, 584,
5773 100, 100, 13, 526, 113, 590, 101, 721, 248, 100,
5774 26, 261, 262, 58, 52, 501, 52, 25, 1025, 1026,
5775 81, 154, 761, 0, 702, 158, 234, 766, 26, 134,
5776 28, 610, 607, 78, 134, 134, 276, 25, 155, 112,
5777 154, 527, 286, 134, 69, 1351, 13, 144, 145, 146,
5778 362, 68, 1343, 731, 37, 38, 134, 157, 151, 25,
5779 155, 15, 13, 108, 123, 1137, 1163, 112, 230, 309,
5780 120, 25, 1051, 98, 286, 25, 154, 155, 25, 230,
5781 158, 1063, 1179, 27, 969, 56, 336, 337, 338, 339,
5782 1137, 341, 342, 13, 230, 155, 256, 157, 258, 485,
5783 236, 237, 304, 13, 1083, 1062, 1085, 155, 687, 688,
5784 246, 999, 286, 13, 1299, 155, 267, 253, 26, 304,
5785 256, 13, 284, 154, 256, 237, 258, 155, 674, 160,
5786 1137, 267, 267, 284, 228, 151, 13, 231, 232, 233,
5787 258, 664, 721, 154, 273, 274, 303, 155, 284, 160,
5788 1003, 756, 675, 304, 759, 820, 749, 750, 408, 709,
5789 30, 711, 66, 711, 284, 709, 845, 155, 412, 856,
5790 13, 154, 850, 1180, 424, 236, 237, 417, 363, 665,
5791 1187, 1188, 860, 334, 540, 258, 542, 154, 1136, 155,
5792 676, 157, 161, 160, 306, 1025, 1026, 1294, 604, 334,
5793 362, 1298, 1299, 154, 155, 155, 1185, 1186, 155, 160,
5794 154, 362, 363, 363, 921, 119, 160, 15, 909, 17,
5795 336, 337, 338, 339, 1136, 921, 362, 98, 803, 943,
5796 944, 66, 1187, 1188, 154, 949, 950, 953, 412, 399,
5797 160, 69, 362, 151, 154, 400, 652, 409, 410, 157,
5798 160, 402, 658, 659, 154, 28, 13, 157, 409, 410,
5799 160, 1358, 154, 399, 1003, 157, 402, 52, 160, 97,
5800 98, 56, 401, 409, 410, 825, 983, 154, 1080, 1081,
5801 25, 825, 153, 160, 119, 134, 157, 974, 761, 1296,
5802 450, 427, 408, 766, 109, 69, 294, 295, 101, 454,
5803 100, 299, 155, 301, 1084, 83, 84, 1137, 424, 100,
5804 903, 154, 905, 699, 474, 154, 69, 160, 450, 1033,
5805 475, 160, 524, 97, 98, 153, 141, 912, 913, 157,
5806 709, 916, 450, 918, 134, 920, 66, 134, 474, 524,
5807 495, 1296, 726, 134, 1022, 98, 501, 483, 134, 485,
5808 1180, 154, 470, 112, 495, 155, 507, 1187, 1188, 137,
5809 138, 495, 154, 100, 943, 944, 526, 159, 155, 155,
5810 949, 950, 527, 524, 780, 469, 470, 450, 784, 153,
5811 1182, 1183, 738, 56, 478, 547, 930, 743, 157, 134,
5812 526, 121, 122, 511, 1342, 265, 547, 154, 1286, 134,
5813 52, 1280, 553, 160, 56, 607, 1084, 1187, 1188, 154,
5814 155, 547, 1151, 158, 100, 938, 66, 511, 553, 605,
5815 514, 595, 607, 100, 610, 101, 100, 822, 678, 25,
5816 100, 161, 155, 593, 570, 830, 596, 573, 844, 1018,
5817 990, 847, 990, 594, 134, 967, 597, 69, 134, 100,
5818 1280, 937, 100, 939, 1033, 861, 607, 134, 594, 1347,
5819 134, 597, 100, 155, 134, 715, 1296, 157, 1155, 1062,
5820 1063, 121, 122, 605, 124, 97, 98, 69, 610, 1064,
5821 1065, 1066, 1067, 657, 1162, 155, 134, 1165, 37, 38,
5822 360, 585, 654, 100, 656, 365, 134, 883, 157, 100,
5823 69, 687, 688, 654, 664, 656, 98, 1185, 644, 992,
5824 665, 605, 641, 649, 25, 675, 610, 155, 654, 992,
5825 656, 676, 1213, 1045, 1215, 727, 677, 134, 664, 98,
5826 1003, 153, 641, 134, 689, 721, 1082, 736, 134, 675,
5827 649, 677, 727, 1282, 992, 157, 1151, 1286, 689, 69,
5828 686, 69, 154, 155, 960, 689, 1177, 963, 154, 155,
5829 157, 157, 158, 699, 970, 69, 1187, 1188, 100, 154,
5830 976, 69, 157, 813, 100, 1058, 727, 686, 98, 97,
5831 98, 1259, 1260, 1261, 720, 1058, 26, 457, 458, 1276,
5832 719, 709, 1151, 97, 98, 1151, 69, 691, 468, 97,
5833 98, 803, 134, 853, 1126, 855, 476, 477, 134, 78,
5834 1058, 865, 1351, 69, 738, 709, 740, 711, 803, 743,
5835 744, 158, 69, 134, 97, 98, 496, 1212, 626, 69,
5836 159, 1309, 502, 1324, 69, 153, 100, 152, 1184, 154,
5837 69, 97, 98, 154, 155, 643, 134, 158, 1054, 153,
5838 97, 98, 803, 152, 69, 153, 69, 97, 98, 69,
5839 66, 67, 97, 98, 785, 863, 69, 788, 97, 98,
5840 134, 765, 69, 56, 69, 1280, 157, 1282, 1151, 155,
5841 854, 1286, 1204, 98, 97, 98, 1291, 97, 98, 161,
5842 69, 155, 1025, 1026, 97, 98, 832, 153, 834, 793,
5843 836, 98, 58, 98, 702, 856, 153, 825, 863, 959,
5844 926, 151, 928, 153, 66, 121, 122, 157, 153, 98,
5845 856, 1280, 78, 1282, 153, 100, 1282, 1286, 726, 78,
5846 1286, 825, 1291, 731, 598, 1291, 289, 853, 602, 855,
5847 153, 1264, 1347, 153, 1349, 890, 1351, 883, 1353, 843,
5848 153, 1084, 108, 109, 69, 100, 1294, 943, 944, 134,
5849 1298, 921, 151, 949, 950, 1370, 134, 119, 1101, 121,
5850 122, 134, 124, 909, 100, 134, 54, 775, 938, 1265,
5851 155, 651, 106, 98, 939, 141, 64, 65, 1347, 134,
5852 1349, 1347, 1351, 1349, 1353, 1351, 958, 1353, 155, 973,
5853 1206, 975, 938, 56, 1137, 66, 160, 958, 134, 1282,
5854 155, 1370, 25, 1286, 1370, 154, 155, 953, 14, 15,
5855 690, 953, 958, 974, 89, 90, 761, 1160, 138, 155,
5856 134, 993, 1018, 40, 41, 1, 930, 772, 974, 922,
5857 923, 26, 993, 959, 1177, 154, 155, 1033, 931, 15,
5858 16, 934, 850, 936, 1187, 1188, 155, 993, 119, 953,
5859 121, 122, 860, 69, 134, 1016, 1017, 1012, 1013, 305,
5860 306, 965, 155, 158, 1025, 1026, 152, 875, 1351, 1087,
5861 69, 1016, 1017, 155, 69, 158, 52, 53, 1050, 1088,
5862 56, 97, 98, 155, 78, 155, 990, 450, 155, 1050,
5863 155, 67, 134, 155, 1040, 52, 1042, 155, 97, 98,
5864 52, 152, 97, 98, 1050, 1321, 54, 55, 155, 57,
5865 1014, 155, 13, 89, 1174, 17, 64, 65, 481, 1080,
5866 1081, 484, 25, 1084, 1070, 1071, 489, 103, 104, 66,
5867 1125, 107, 108, 109, 110, 155, 112, 153, 818, 819,
5868 1101, 504, 1192, 1197, 152, 1049, 826, 827, 142, 143,
5869 144, 145, 146, 155, 153, 134, 151, 44, 153, 44,
5870 1132, 1133, 157, 152, 1125, 155, 1138, 155, 1129, 44,
5871 56, 1132, 1133, 44, 134, 1197, 1137, 1138, 66, 159,
5872 1152, 136, 119, 1129, 121, 122, 1132, 1133, 15, 8,
5873 1136, 1152, 1138, 155, 1155, 52, 155, 877, 878, 1160,
5874 880, 881, 1163, 152, 155, 155, 1152, 101, 155, 1155,
5875 155, 1271, 1272, 1197, 1022, 578, 1177, 1178, 1179, 66,
5876 155, 1182, 1183, 155, 1196, 155, 1187, 1188, 1246, 1224,
5877 1134, 119, 9, 121, 122, 1196, 124, 52, 1210, 54,
5878 55, 56, 57, 606, 155, 26, 66, 139, 1174, 1210,
5879 1196, 52, 152, 1199, 230, 935, 1001, 139, 1003, 155,
5880 1005, 52, 155, 1224, 1210, 155, 101, 1213, 948, 1215,
5881 56, 160, 119, 152, 121, 122, 1084, 1085, 687, 688,
5882 256, 158, 258, 155, 139, 261, 262, 102, 69, 155,
5883 1285, 267, 107, 155, 1264, 155, 705, 706, 56, 119,
5884 1265, 121, 122, 155, 155, 155, 986, 155, 284, 155,
5885 155, 155, 721, 155, 155, 1276, 97, 98, 1264, 682,
5886 1266, 157, 1268, 157, 1285, 1025, 1026, 155, 304, 267,
5887 1276, 334, 1140, 1294, 1129, 503, 66, 1298, 1299, 863,
5888 106, 605, 1314, 108, 507, 1271, 1272, 110, 98, 496,
5889 1223, 686, 1225, 1314, 1162, 954, 973, 1165, 334, 1199,
5890 336, 337, 338, 339, 749, 341, 342, 903, 1314, 1222,
5891 151, 1151, 153, 1286, 1280, 1071, 157, 1185, 1324, 1221,
5892 1080, 1081, 1178, 358, 1084, 1343, 362, 363, 866, 119,
5893 753, 121, 122, 1342, 1180, 1180, 1342, 1358, 1176, 1266,
5894 1268, 1101, 119, 1148, 542, 111, 1151, 52, 759, 54,
5895 55, 56, 57, 1221, 766, 52, 115, 54, 55, 56,
5896 57, 58, -1, 399, -1, 52, 402, 54, 55, 1337,
5897 57, -1, 408, 409, 410, -1, -1, 1137, -1, -1,
5898 52, 78, 54, 55, 56, 57, -1, -1, 424, -1,
5899 -1, 1259, 1260, 1261, 1327, 1328, -1, 102, 1331, 1332,
5900 1160, -1, 1335, 1163, 873, 102, 59, 60, 61, 62,
5901 107, 108, 109, -1, 450, 102, -1, 1177, 1178, 1179,
5902 -1, -1, 1182, 1183, -1, -1, -1, 1187, 1188, 1169,
5903 -1, 1364, 1365, 1366, 1367, -1, -1, -1, 474, 862,
5904 1373, 1309, -1, -1, 141, -1, -1, 144, 1, -1,
5905 1318, -1, -1, -1, 1025, 1026, -1, -1, -1, 882,
5906 -1, 884, 15, 16, 40, 41, 42, 43, 44, 1337,
5907 -1, 507, -1, -1, 943, 944, -1, 1282, 901, -1,
5908 949, 950, -1, -1, -1, -1, 1291, -1, 524, 52,
5909 526, 54, 55, 56, 57, -1, -1, -1, -1, 52,
5910 53, -1, -1, -1, -1, -1, -1, -1, -1, 1080,
5911 1081, 547, -1, 1084, 67, 984, 985, 553, 987, 988,
5912 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
5913 1101, -1, -1, -1, 1294, -1, -1, -1, 1298, 1299,
5914 -1, -1, -1, -1, 1349, -1, 1351, -1, 1353, -1,
5915 103, 104, -1, -1, 107, -1, -1, 593, 594, 112,
5916 596, 597, -1, -1, 1033, 1370, 1137, -1, -1, 605,
5917 -1, 607, -1, -1, 610, 52, -1, 54, 55, 56,
5918 57, 58, -1, -1, -1, -1, -1, -1, 1057, 1160,
5919 -1, -1, 1163, -1, 1025, 1026, -1, -1, 1358, -1,
5920 -1, 78, -1, -1, -1, -1, 1177, 1178, 1179, -1,
5921 -1, 1182, 1183, -1, -1, 92, 1187, 1188, 654, -1,
5922 656, -1, -1, -1, -1, 102, -1, -1, 664, -1,
5923 107, 108, 109, -1, -1, -1, -1, -1, -1, 675,
5924 -1, 677, 678, -1, -1, -1, -1, -1, -1, 1080,
5925 1081, 687, 688, 1084, -1, -1, -1, -1, -1, -1,
5926 -1, -1, -1, -1, 141, -1, -1, 144, -1, -1,
5927 1101, -1, -1, -1, -1, -1, -1, 230, -1, 715,
5928 157, -1, -1, -1, 52, 721, 54, 55, 56, 57,
5929 58, 727, -1, 52, -1, 54, 55, 56, 57, 58,
5930 -1, -1, -1, 256, 78, 258, 1137, -1, 261, 262,
5931 78, -1, -1, -1, 267, -1, -1, -1, -1, 78,
5932 -1, 95, 96, 1294, 92, -1, -1, 1298, 1299, 1160,
5933 -1, 284, 1163, 92, 102, -1, -1, -1, -1, 107,
5934 108, 109, -1, 102, -1, -1, 1177, 1178, 1179, 108,
5935 109, 1182, 1183, -1, -1, -1, 1187, 1188, -1, -1,
5936 -1, 78, -1, 1186, -1, -1, -1, 803, 142, 143,
5937 144, 145, 146, 141, 78, -1, 144, -1, 95, 96,
5938 -1, 334, 141, 336, 337, 338, 339, 1358, 341, 342,
5939 -1, 95, 96, -1, -1, 52, -1, 54, 55, 56,
5940 57, 58, -1, -1, -1, -1, 1229, -1, -1, 362,
5941 -1, -1, -1, -1, -1, -1, 1239, 853, -1, 855,
5942 856, 78, 139, 140, 141, 142, 143, 144, 145, 146,
5943 -1, -1, -1, 1256, 1257, 1258, -1, 141, 142, 143,
5944 144, 145, 146, -1, -1, 102, 399, -1, -1, 402,
5945 -1, 108, 109, -1, -1, 408, 409, 410, -1, -1,
5946 -1, -1, -1, 1294, -1, -1, -1, 1298, 1299, -1,
5947 -1, 424, -1, 1025, 1026, -1, -1, -1, -1, -1,
5948 -1, -1, -1, -1, 141, 921, -1, -1, -1, -1,
5949 -1, -1, -1, -1, -1, -1, -1, 450, -1, -1,
5950 -1, -1, 938, -1, -1, -1, -1, 943, 944, -1,
5951 1, 1025, 1026, 949, 950, -1, -1, -1, -1, -1,
5952 -1, 474, 958, 959, 15, 16, -1, 1358, 1080, 1081,
5953 -1, -1, 1084, -1, -1, -1, -1, -1, 974, -1,
5954 -1, -1, -1, -1, -1, -1, -1, -1, -1, 1101,
5955 -1, -1, -1, -1, 507, -1, -1, 993, -1, -1,
5956 -1, 52, 53, -1, -1, -1, 1080, 1081, -1, -1,
5957 1084, -1, -1, 526, -1, -1, 67, -1, -1, -1,
5958 1016, 1017, 1018, -1, -1, 1137, -1, 1101, -1, -1,
5959 -1, -1, -1, -1, 547, -1, -1, 1033, -1, -1,
5960 553, -1, -1, -1, -1, -1, -1, -1, 1160, -1,
5961 -1, 1163, 103, 104, 1050, -1, 107, -1, -1, -1,
5962 -1, 112, -1, 1137, -1, 1177, 1178, 1179, -1, -1,
5963 1182, 1183, -1, -1, -1, 1187, 1188, -1, -1, -1,
5964 593, 594, -1, 596, 597, -1, 1160, -1, -1, 1163,
5965 -1, -1, 605, -1, -1, -1, -1, 610, -1, -1,
5966 -1, -1, -1, 1177, 1178, 1179, -1, -1, 1182, 1183,
5967 -1, -1, -1, 1187, 1188, -1, -1, -1, -1, -1,
5968 -1, -1, -1, -1, -1, -1, -1, -1, -1, 1125,
5969 -1, -1, -1, 1129, -1, -1, 1132, 1133, -1, -1,
5970 -1, 654, 1138, 656, -1, -1, -1, -1, -1, -1,
5971 -1, 664, -1, -1, -1, -1, 1152, -1, -1, 1155,
5972 -1, -1, 675, -1, 677, 678, -1, -1, -1, -1,
5973 -1, -1, -1, -1, 687, 688, -1, -1, 1174, 230,
5974 -1, -1, 1294, -1, -1, -1, 1298, 1299, -1, -1,
5975 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
5976 1196, -1, 715, -1, -1, 256, -1, 258, 721, -1,
5977 261, 262, -1, -1, 1210, -1, 267, -1, -1, -1,
5978 1294, -1, -1, -1, 1298, 1299, -1, -1, 1224, -1,
5979 -1, -1, -1, 284, -1, -1, -1, -1, -1, -1,
5980 -1, -1, -1, 1025, 1026, -1, 1358, -1, -1, -1,
5981 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
5982 -1, -1, -1, -1, -1, -1, -1, -1, 1264, -1,
5983 -1, -1, -1, -1, -1, 1271, 1272, -1, -1, -1,
5984 1276, -1, -1, 334, 1358, 336, 337, 338, 339, 1285,
5985 341, 342, -1, -1, -1, -1, -1, -1, 1080, 1081,
5986 -1, -1, 1084, 78, 79, 80, 81, 82, 83, 84,
5987 85, 362, 87, 88, -1, -1, -1, -1, 1314, 1101,
5988 95, 96, -1, -1, -1, -1, -1, -1, -1, -1,
5989 -1, -1, -1, -1, -1, 1025, 1026, -1, -1, -1,
5990 853, -1, 855, 856, -1, -1, -1, -1, 399, -1,
5991 -1, 402, -1, -1, -1, 1137, -1, 408, 409, 410,
5992 -1, -1, 137, 138, 139, 140, 141, 142, 143, 144,
5993 145, 146, -1, 424, -1, -1, -1, -1, 1160, -1,
5994 -1, 1163, -1, -1, -1, -1, -1, -1, 1, -1,
5995 1080, 1081, -1, -1, 1084, 1177, 1178, 1179, -1, 450,
5996 1182, 1183, 15, 16, -1, 1187, 1188, -1, 921, -1,
5997 -1, 1101, -1, -1, -1, -1, -1, -1, -1, -1,
5998 -1, -1, -1, 474, -1, 938, -1, -1, -1, -1,
5999 943, 944, -1, -1, -1, -1, 949, 950, -1, 52,
6000 53, -1, -1, -1, -1, 958, 959, 1137, -1, -1,
6001 -1, -1, -1, -1, 67, -1, 507, -1, -1, -1,
6002 -1, 974, -1, -1, -1, -1, -1, -1, 25, -1,
6003 1160, -1, -1, 1163, -1, 526, -1, -1, -1, -1,
6004 993, -1, -1, -1, -1, -1, -1, 1177, 1178, 1179,
6005 103, 104, 1182, 1183, 107, -1, 547, 1187, 1188, 112,
6006 -1, -1, 553, 1016, 1017, 1018, -1, -1, -1, -1,
6007 -1, -1, 1294, -1, -1, -1, 1298, 1299, -1, -1,
6008 1033, 78, 79, 80, 81, 82, 83, 84, 85, 86,
6009 87, 88, 89, 90, -1, -1, -1, 1050, 95, 96,
6010 -1, -1, 593, 594, 101, 596, 597, -1, -1, -1,
6011 -1, -1, -1, -1, 605, -1, -1, -1, -1, 610,
6012 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6013 -1, -1, -1, -1, -1, -1, 1358, -1, 135, -1,
6014 137, 138, 139, 140, 141, 142, 143, 144, 145, 146,
6015 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6016 -1, -1, -1, 654, 1294, 656, -1, -1, 1298, 1299,
6017 -1, -1, -1, 664, -1, -1, 1129, 230, -1, 1132,
6018 1133, -1, -1, -1, 675, 1138, 677, 678, -1, -1,
6019 -1, -1, -1, -1, -1, -1, 687, 688, -1, 1152,
6020 -1, -1, 1155, 256, -1, 258, -1, -1, 261, 262,
6021 -1, -1, -1, -1, 267, 1025, 1026, -1, -1, -1,
6022 -1, 1174, -1, -1, 715, -1, -1, -1, 1358, -1,
6023 721, 284, -1, -1, -1, -1, -1, -1, -1, -1,
6024 -1, -1, -1, 1196, -1, -1, 1025, 1026, -1, -1,
6025 -1, -1, -1, -1, -1, -1, -1, 1210, -1, -1,
6026 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6027 1080, 1081, -1, -1, 1084, -1, -1, -1, -1, -1,
6028 -1, 334, -1, 336, 337, 338, 339, -1, 341, 342,
6029 -1, 1101, -1, -1, -1, -1, -1, -1, -1, -1,
6030 -1, 1080, 1081, -1, -1, 1084, -1, -1, -1, 362,
6031 -1, 1264, -1, -1, -1, -1, -1, -1, 1271, 1272,
6032 -1, -1, 1101, 1276, 1, -1, -1, 1137, -1, -1,
6033 -1, -1, -1, -1, -1, -1, 1, -1, -1, -1,
6034 -1, -1, -1, -1, -1, -1, 399, -1, -1, 402,
6035 1160, -1, -1, 1163, -1, 408, 409, 410, 1137, -1,
6036 -1, 1314, 853, -1, 855, 856, -1, 1177, 1178, 1179,
6037 -1, 424, 1182, 1183, -1, 52, 53, 1187, 1188, 56,
6038 -1, 1160, -1, -1, 1163, -1, -1, 52, 53, -1,
6039 -1, 56, -1, -1, -1, -1, -1, 450, 1177, 1178,
6040 1179, -1, -1, 1182, 1183, -1, -1, -1, 1187, 1188,
6041 -1, -1, 89, -1, -1, -1, -1, -1, -1, -1,
6042 -1, 474, -1, -1, 89, -1, -1, -1, -1, -1,
6043 921, 108, 109, 110, -1, -1, -1, -1, -1, -1,
6044 -1, -1, -1, 108, 109, 110, -1, 938, -1, -1,
6045 -1, -1, 943, 944, 507, -1, -1, -1, 949, 950,
6046 -1, -1, -1, -1, -1, -1, -1, 958, 959, -1,
6047 -1, -1, -1, 526, -1, -1, -1, -1, -1, -1,
6048 -1, -1, -1, 974, 1294, -1, -1, -1, 1298, 1299,
6049 -1, -1, -1, -1, 547, -1, -1, -1, -1, -1,
6050 553, -1, 993, -1, -1, -1, -1, -1, -1, -1,
6051 -1, -1, -1, -1, -1, 1294, -1, -1, -1, 1298,
6052 1299, -1, -1, -1, -1, 1016, 1017, 1018, -1, -1,
6053 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6054 593, 594, 1033, 596, 597, -1, -1, -1, 1358, -1,
6055 -1, -1, 605, 230, -1, -1, -1, 610, -1, 1050,
6056 -1, -1, -1, -1, -1, 230, -1, -1, -1, -1,
6057 -1, -1, -1, -1, -1, -1, -1, -1, -1, 1358,
6058 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6059 267, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6060 -1, 654, 267, 656, -1, -1, -1, 284, -1, -1,
6061 -1, 664, -1, -1, -1, -1, -1, -1, -1, 284,
6062 -1, -1, 675, -1, 677, 678, -1, 304, -1, -1,
6063 -1, -1, -1, -1, 687, 688, -1, -1, 1129, 304,
6064 -1, 1132, 1133, -1, -1, -1, -1, 1138, -1, 78,
6065 79, 80, 81, 82, 83, 84, -1, 334, 87, 88,
6066 -1, 1152, 715, -1, 1155, -1, 95, 96, 721, 334,
6067 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6068 -1, -1, -1, 1174, -1, 362, 363, -1, -1, -1,
6069 -1, -1, -1, -1, -1, -1, -1, 362, 363, -1,
6070 -1, -1, 1, -1, -1, 1196, -1, -1, 137, 138,
6071 139, 140, 141, 142, 143, 144, 145, 146, -1, 1210,
6072 -1, -1, -1, -1, -1, 402, -1, -1, -1, -1,
6073 -1, -1, 409, 410, -1, -1, -1, 402, -1, -1,
6074 -1, -1, -1, -1, 409, 410, -1, -1, -1, -1,
6075 -1, -1, -1, 52, 53, -1, -1, 56, -1, -1,
6076 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6077 -1, -1, -1, 1264, -1, -1, -1, -1, -1, -1,
6078 1271, 1272, -1, -1, -1, 1276, -1, -1, -1, -1,
6079 89, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6080 853, -1, 855, 856, -1, -1, -1, -1, -1, 108,
6081 109, 110, -1, -1, -1, -1, -1, -1, -1, -1,
6082 -1, -1, -1, 1314, -1, -1, -1, -1, -1, -1,
6083 507, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6084 -1, -1, 507, -1, -1, -1, -1, 524, 78, 79,
6085 80, 81, 82, 83, 84, -1, -1, 87, 88, 524,
6086 -1, -1, -1, -1, -1, 95, 96, -1, 921, -1,
6087 547, -1, -1, -1, -1, -1, 553, -1, -1, -1,
6088 -1, -1, 547, -1, -1, 938, -1, -1, 553, -1,
6089 943, 944, -1, -1, -1, -1, 949, 950, -1, -1,
6090 -1, -1, -1, -1, -1, 958, 959, 137, 138, 139,
6091 140, 141, 142, 143, 144, 145, 146, 594, -1, -1,
6092 597, 974, -1, -1, -1, -1, -1, -1, -1, 594,
6093 607, 230, 597, 610, -1, -1, -1, -1, -1, -1,
6094 993, -1, 607, -1, -1, 610, -1, -1, -1, -1,
6095 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6096 -1, -1, -1, 1016, 1017, 1018, -1, -1, 267, -1,
6097 -1, -1, -1, -1, -1, -1, -1, 654, -1, 656,
6098 1033, -1, -1, -1, -1, 284, 1, -1, -1, 654,
6099 -1, 656, -1, -1, -1, -1, -1, 1050, -1, -1,
6100 677, -1, -1, -1, -1, 304, -1, -1, -1, -1,
6101 687, 688, 677, -1, -1, -1, -1, -1, -1, -1,
6102 -1, -1, 687, 688, -1, -1, -1, -1, -1, -1,
6103 -1, -1, -1, -1, -1, 334, -1, 52, 53, -1,
6104 -1, 56, -1, -1, 721, -1, -1, -1, -1, -1,
6105 727, -1, -1, -1, -1, -1, 721, -1, -1, 736,
6106 -1, -1, 727, 362, 363, -1, -1, -1, -1, -1,
6107 -1, -1, -1, -1, 89, -1, 1129, -1, -1, 1132,
6108 1133, -1, -1, -1, -1, 1138, -1, -1, -1, 33,
6109 34, 35, 36, 108, 109, 110, 111, -1, -1, 1152,
6110 -1, -1, 1155, 402, -1, 49, 50, 51, 52, -1,
6111 409, 410, 56, -1, -1, 59, 60, 61, 62, 63,
6112 -1, 1174, -1, -1, -1, -1, 803, -1, -1, -1,
6113 -1, -1, -1, -1, -1, -1, -1, -1, 803, -1,
6114 -1, -1, -1, 1196, -1, -1, -1, 91, 92, -1,
6115 -1, -1, -1, -1, -1, 99, -1, 1210, 102, -1,
6116 104, 105, -1, 107, -1, -1, 110, 111, 112, 113,
6117 114, 115, 116, 117, 118, -1, -1, -1, -1, 856,
6118 -1, -1, -1, -1, -1, -1, -1, 1, -1, -1,
6119 -1, 856, -1, -1, -1, -1, 140, -1, -1, -1,
6120 -1, -1, -1, 147, -1, -1, -1, -1, 507, -1,
6121 154, 1264, -1, -1, -1, 230, -1, -1, 1271, 1272,
6122 -1, -1, -1, 1276, -1, 524, -1, -1, -1, -1,
6123 -1, -1, -1, -1, -1, -1, -1, -1, 52, 53,
6124 -1, -1, -1, -1, -1, -1, -1, -1, 547, -1,
6125 -1, -1, 267, -1, 553, -1, -1, -1, -1, -1,
6126 -1, 1314, -1, -1, -1, -1, 943, 944, -1, 284,
6127 -1, -1, 949, 950, -1, -1, -1, -1, 943, 944,
6128 -1, 958, -1, -1, 949, 950, -1, -1, -1, 304,
6129 -1, -1, -1, 958, 108, 594, -1, 974, 597, -1,
6130 -1, -1, -1, -1, -1, -1, -1, -1, 607, 974,
6131 -1, 610, -1, -1, -1, -1, 993, -1, -1, 334,
6132 -1, -1, -1, -1, -1, -1, -1, -1, 993, -1,
6133 -1, -1, -1, -1, -1, -1, -1, -1, -1, 1016,
6134 1017, 1018, -1, -1, -1, -1, -1, 362, 363, -1,
6135 -1, 1016, 1017, 1018, -1, 654, 1033, 656, -1, -1,
6136 -1, -1, -1, -1, -1, -1, -1, -1, 1033, -1,
6137 -1, -1, -1, 1050, -1, -1, -1, -1, 677, -1,
6138 -1, -1, -1, -1, -1, 1050, -1, 402, 687, 688,
6139 -1, -1, -1, -1, 409, 410, -1, -1, -1, -1,
6140 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6141 -1, -1, -1, -1, 1, -1, 230, -1, -1, -1,
6142 -1, -1, 721, -1, -1, -1, -1, -1, 727, -1,
6143 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6144 -1, -1, -1, -1, -1, -1, -1, -1, 1125, -1,
6145 -1, -1, 1129, 267, -1, 1132, 1133, -1, -1, -1,
6146 1125, 1138, -1, -1, 1129, 52, 53, 1132, 1133, -1,
6147 284, -1, -1, 1138, -1, 1152, -1, -1, 1155, -1,
6148 -1, -1, -1, -1, -1, -1, -1, 1152, -1, -1,
6149 1155, -1, 507, -1, -1, -1, -1, -1, -1, -1,
6150 -1, -1, -1, -1, 803, -1, -1, -1, -1, 524,
6151 -1, -1, -1, -1, -1, -1, -1, -1, -1, 1196,
6152 334, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6153 -1, 1196, 547, 1210, -1, -1, -1, -1, 553, -1,
6154 -1, -1, -1, -1, -1, 1210, -1, 1224, 362, -1,
6155 -1, -1, -1, -1, -1, -1, -1, 856, -1, 1224,
6156 -1, -1, -1, -1, -1, -1, 78, 79, 80, 81,
6157 82, 83, 84, 85, 86, 87, 88, 89, 90, 594,
6158 -1, -1, 597, 95, 96, -1, -1, -1, 402, -1,
6159 -1, -1, 607, -1, -1, 409, 410, -1, -1, 1276,
6160 -1, -1, -1, -1, -1, -1, -1, -1, 1285, -1,
6161 -1, 1276, -1, -1, -1, -1, -1, -1, -1, -1,
6162 1285, -1, -1, 135, -1, 137, 138, 139, 140, 141,
6163 142, 143, 144, 145, 146, -1, -1, 1314, -1, 654,
6164 -1, 656, 154, 230, 943, 944, -1, -1, -1, 1314,
6165 949, 950, -1, -1, -1, -1, -1, -1, -1, 958,
6166 -1, -1, 677, -1, 44, -1, -1, -1, -1, -1,
6167 -1, -1, -1, -1, -1, 974, -1, -1, -1, -1,
6168 267, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6169 -1, -1, -1, 507, 993, -1, -1, 284, 78, 79,
6170 80, 81, 82, 83, 84, 85, 86, 87, 88, 89,
6171 90, -1, 727, -1, -1, 95, 96, 1016, 1017, 1018,
6172 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6173 -1, -1, -1, 547, 1033, -1, -1, -1, -1, 553,
6174 -1, -1, -1, -1, -1, -1, -1, 334, -1, -1,
6175 -1, 1050, -1, -1, -1, 135, -1, 137, 138, 139,
6176 140, 141, 142, 143, 144, 145, 146, -1, -1, -1,
6177 -1, -1, -1, -1, -1, 362, -1, -1, -1, -1,
6178 594, -1, -1, 597, -1, -1, -1, -1, 803, -1,
6179 -1, -1, -1, -1, -1, -1, 610, -1, -1, -1,
6180 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6181 -1, -1, -1, -1, -1, 402, -1, -1, -1, -1,
6182 -1, -1, 409, 410, -1, -1, 1125, -1, -1, -1,
6183 1129, -1, -1, 1132, 1133, -1, -1, -1, -1, 1138,
6184 654, 856, 656, -1, -1, -1, -1, -1, -1, -1,
6185 -1, -1, -1, 1152, -1, -1, 1155, -1, -1, -1,
6186 -1, -1, -1, 677, -1, -1, -1, -1, -1, -1,
6187 -1, -1, -1, 687, 688, -1, -1, -1, -1, -1,
6188 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6189 -1, -1, -1, -1, -1, -1, -1, 1196, -1, -1,
6190 -1, -1, -1, -1, -1, -1, -1, 721, -1, -1,
6191 -1, 1210, -1, -1, 0, -1, -1, -1, -1, -1,
6192 507, -1, 8, 9, 10, 1224, -1, 13, 14, 15,
6193 -1, 17, -1, -1, -1, -1, -1, -1, -1, 25,
6194 26, 27, -1, 958, -1, -1, -1, -1, -1, -1,
6195 -1, 37, 38, 44, 40, 41, 42, 43, 44, 974,
6196 547, -1, -1, -1, -1, -1, 553, -1, -1, -1,
6197 -1, -1, -1, -1, -1, -1, -1, 1276, 993, -1,
6198 -1, -1, 68, 69, -1, -1, 1285, 78, 79, 80,
6199 81, 82, 83, 84, 85, 86, 87, 88, 89, 90,
6200 -1, 1016, 1017, -1, 95, 96, -1, 594, -1, -1,
6201 597, 97, 98, -1, -1, 1314, -1, -1, -1, -1,
6202 -1, -1, -1, 610, -1, -1, -1, -1, -1, -1,
6203 -1, -1, -1, -1, 120, 1050, -1, -1, -1, -1,
6204 -1, -1, 856, -1, 135, -1, 137, 138, 139, 140,
6205 141, 142, 143, 144, 145, 146, -1, -1, -1, -1,
6206 -1, -1, -1, -1, 155, 151, 152, 654, 154, 656,
6207 -1, 157, 158, -1, 160, -1, -1, -1, -1, -1,
6208 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6209 677, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6210 687, 688, -1, -1, -1, -1, -1, -1, -1, -1,
6211 1125, -1, -1, -1, 1129, -1, -1, 1132, 1133, -1,
6212 -1, -1, -1, 1138, -1, -1, -1, -1, -1, 943,
6213 944, 15, 16, -1, 721, 949, 950, 1152, -1, -1,
6214 1155, -1, -1, -1, 958, -1, -1, -1, -1, -1,
6215 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6216 974, -1, -1, 47, 48, 49, 50, -1, -1, -1,
6217 54, 55, -1, -1, -1, -1, -1, -1, -1, 993,
6218 -1, 1196, -1, 67, 68, -1, -1, -1, -1, -1,
6219 -1, -1, -1, -1, -1, 1210, -1, -1, -1, -1,
6220 -1, -1, 1016, 1017, 1018, -1, -1, -1, -1, 1224,
6221 -1, -1, -1, -1, -1, -1, -1, -1, -1, 1033,
6222 -1, -1, -1, 33, 34, 35, 36, -1, 112, -1,
6223 -1, -1, -1, -1, -1, -1, 1050, -1, -1, 49,
6224 50, 51, 52, -1, -1, -1, 56, -1, 58, 59,
6225 60, 61, 62, 63, -1, -1, -1, -1, -1, -1,
6226 -1, 1276, -1, -1, -1, -1, -1, -1, 78, 856,
6227 1285, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6228 -1, 91, 92, -1, -1, -1, -1, -1, -1, 99,
6229 -1, -1, 102, -1, 104, 105, -1, 107, 108, 1314,
6230 110, 111, 112, 113, 114, 115, 116, 117, 118, -1,
6231 -1, 1125, -1, -1, -1, 1129, -1, -1, 1132, 1133,
6232 -1, -1, -1, -1, 1138, -1, -1, -1, -1, -1,
6233 140, -1, -1, -1, -1, -1, -1, 147, 1152, -1,
6234 -1, 1155, -1, -1, 228, -1, -1, 231, 232, 233,
6235 -1, 235, -1, -1, -1, -1, 943, 944, -1, -1,
6236 -1, -1, 949, 950, -1, -1, -1, -1, -1, -1,
6237 -1, 958, 256, -1, 258, 33, 34, 35, 36, -1,
6238 -1, -1, 1196, -1, 52, 53, -1, 974, 56, -1,
6239 -1, 49, 50, 51, -1, -1, 1210, -1, -1, -1,
6240 -1, 59, 60, 61, 62, 63, 993, -1, 76, 77,
6241 78, 79, 80, 81, 82, 83, 84, -1, -1, 87,
6242 88, -1, -1, -1, -1, 93, 94, 95, 96, 1016,
6243 1017, 1018, -1, -1, -1, -1, -1, -1, -1, 107,
6244 108, -1, -1, -1, -1, -1, 1033, -1, -1, -1,
6245 -1, -1, 110, 111, 112, 113, 114, 115, 116, 117,
6246 118, -1, 1276, 1050, -1, -1, -1, -1, -1, 137,
6247 138, 139, 140, 141, 142, 143, 144, 145, 146, -1,
6248 148, 149, -1, 367, 368, 369, 370, 371, 156, 147,
6249 374, 375, 376, 377, 378, 379, 380, 381, -1, 383,
6250 1314, -1, 386, 387, 388, 389, 390, 391, 392, 393,
6251 394, 395, -1, -1, -1, 399, 78, 79, 80, 81,
6252 82, 83, 84, 85, 86, 87, 88, 89, 90, -1,
6253 -1, -1, -1, 95, 96, -1, -1, -1, -1, -1,
6254 -1, -1, 1129, -1, -1, 1132, 1133, -1, -1, -1,
6255 -1, 1138, -1, -1, -1, -1, -1, -1, -1, -1,
6256 -1, -1, -1, -1, -1, 1152, 450, -1, 1155, -1,
6257 -1, -1, -1, 135, -1, 137, 138, 139, 140, 141,
6258 142, 143, 144, 145, 146, 469, 470, -1, -1, -1,
6259 474, -1, -1, -1, 478, -1, 480, -1, -1, -1,
6260 -1, -1, -1, -1, -1, -1, -1, -1, -1, 1196,
6261 -1, -1, -1, -1, 498, -1, -1, -1, -1, -1,
6262 -1, -1, -1, 1210, -1, -1, -1, 511, -1, -1,
6263 514, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6264 -1, -1, 526, -1, -1, -1, -1, -1, -1, -1,
6265 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6266 544, -1, -1, -1, 33, 34, 35, 36, -1, -1,
6267 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6268 49, 50, 51, 52, -1, -1, -1, 56, -1, 1276,
6269 59, 60, 61, 62, 63, -1, -1, -1, -1, -1,
6270 -1, 585, -1, -1, -1, -1, -1, -1, -1, 593,
6271 -1, -1, 596, -1, -1, -1, -1, -1, -1, -1,
6272 -1, 605, 91, 92, -1, -1, 610, 1314, -1, -1,
6273 99, -1, -1, 102, -1, 104, 105, -1, 107, -1,
6274 -1, 110, 111, 112, 113, 114, 115, 116, 117, 118,
6275 -1, -1, -1, -1, -1, -1, -1, 52, 53, -1,
6276 -1, 56, -1, -1, -1, -1, -1, -1, -1, -1,
6277 -1, 140, -1, -1, -1, -1, -1, -1, 147, -1,
6278 664, 76, 77, 78, 79, 80, 81, 82, 83, 84,
6279 -1, 675, 87, 88, -1, -1, -1, -1, 93, 94,
6280 95, 96, -1, 687, 688, -1, -1, 691, 692, 693,
6281 694, -1, 107, 108, -1, -1, -1, -1, -1, -1,
6282 -1, 705, 706, -1, -1, 709, -1, 711, -1, -1,
6283 -1, -1, -1, -1, -1, -1, -1, 721, -1, -1,
6284 -1, -1, 137, 138, 139, 140, 141, 142, 143, 144,
6285 145, 146, -1, 148, 149, -1, -1, -1, -1, -1,
6286 -1, 156, -1, -1, -1, -1, -1, -1, -1, -1,
6287 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6288 -1, 765, -1, -1, -1, -1, -1, -1, -1, -1,
6289 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6290 -1, -1, -1, -1, -1, -1, -1, -1, -1, 793,
6291 -1, -1, -1, -1, -1, 0, 1, -1, 3, 4,
6292 5, 6, 7, 8, 9, 10, 11, 12, -1, 14,
6293 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
6294 25, 825, -1, -1, -1, 30, 31, 32, 33, 34,
6295 35, 36, -1, -1, 39, -1, -1, -1, -1, 843,
6296 45, 46, 47, 48, 49, 50, 51, 52, 53, 54,
6297 55, 56, 57, -1, 59, 60, 61, 62, 63, 64,
6298 65, -1, -1, 68, -1, -1, -1, -1, -1, 873,
6299 -1, 76, 77, -1, -1, -1, -1, -1, -1, -1,
6300 -1, -1, -1, -1, -1, -1, 91, 92, -1, -1,
6301 -1, -1, -1, -1, 99, -1, -1, 102, 103, 104,
6302 105, -1, 107, -1, -1, 110, 111, 112, 113, 114,
6303 115, 116, 117, 118, -1, 120, -1, 921, -1, -1,
6304 -1, -1, -1, -1, -1, -1, 930, -1, -1, -1,
6305 -1, -1, -1, -1, 938, -1, -1, -1, 942, 943,
6306 944, -1, 147, 148, 149, 949, 950, 152, -1, 953,
6307 -1, -1, -1, 158, -1, 160, -1, -1, -1, -1,
6308 -1, 965, -1, -1, -1, -1, -1, -1, -1, -1,
6309 -1, -1, -1, -1, -1, -1, -1, -1, -1, 983,
6310 984, 985, -1, 987, 988, -1, 990, -1, -1, -1,
6311 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6312 -1, -1, -1, -1, -1, -1, 1010, 1011, -1, -1,
6313 1014, -1, -1, -1, 1018, 1019, -1, -1, -1, -1,
6314 -1, -1, -1, -1, -1, -1, -1, -1, -1, 1033,
6315 -1, -1, -1, -1, -1, -1, 0, 1, -1, 3,
6316 4, 5, 6, 7, -1, 1049, -1, 11, 12, -1,
6317 -1, -1, 16, 1057, 18, 19, 20, 21, 22, 23,
6318 24, -1, -1, -1, -1, -1, 30, 31, 32, 33,
6319 34, 35, 36, -1, -1, 39, -1, -1, -1, -1,
6320 -1, 45, 46, 47, 48, 49, 50, 51, 52, 53,
6321 54, 55, 56, 57, -1, 59, 60, 61, 62, 63,
6322 64, 65, -1, -1, -1, -1, -1, -1, -1, -1,
6323 -1, -1, 76, 77, -1, -1, -1, -1, -1, -1,
6324 -1, -1, -1, -1, -1, -1, -1, 91, 92, -1,
6325 1134, -1, -1, -1, -1, 99, -1, -1, 102, 103,
6326 104, 105, -1, 107, -1, -1, 110, 111, 112, 113,
6327 114, 115, 116, 117, 118, -1, 120, -1, -1, -1,
6328 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6329 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6330 -1, -1, -1, 147, 148, 149, -1, -1, 0, 1,
6331 154, 3, 4, 5, 6, 7, 160, -1, -1, 11,
6332 12, -1, -1, -1, 16, -1, 18, 19, 20, 21,
6333 22, 23, 24, -1, -1, -1, -1, -1, 30, 31,
6334 32, 33, 34, 35, 36, -1, -1, 39, -1, -1,
6335 -1, -1, -1, 45, 46, 47, 48, 49, 50, 51,
6336 52, 53, 54, 55, 56, 57, -1, 59, 60, 61,
6337 62, 63, 64, 65, -1, -1, -1, -1, -1, -1,
6338 1264, -1, -1, -1, 76, 77, -1, -1, -1, -1,
6339 -1, -1, -1, -1, -1, -1, -1, -1, -1, 91,
6340 92, -1, -1, -1, -1, -1, -1, 99, -1, -1,
6341 102, 103, 104, 105, -1, 107, -1, -1, 110, 111,
6342 112, 113, 114, 115, 116, 117, 118, -1, -1, -1,
6343 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6344 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6345 -1, -1, -1, -1, -1, 147, 148, 149, -1, -1,
6346 0, 1, 154, 3, 4, 5, 6, 7, 160, -1,
6347 -1, 11, 12, -1, -1, -1, 16, -1, 18, 19,
6348 20, 21, 22, 23, 24, -1, -1, -1, -1, -1,
6349 30, 31, 32, 33, 34, 35, 36, -1, -1, 39,
6350 -1, -1, -1, -1, -1, 45, 46, 47, 48, 49,
6351 50, 51, 52, 53, 54, 55, 56, 57, -1, 59,
6352 60, 61, 62, 63, 64, 65, -1, -1, -1, -1,
6353 -1, -1, -1, -1, -1, -1, 76, 77, -1, -1,
6354 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6355 -1, 91, 92, -1, -1, -1, -1, -1, -1, 99,
6356 -1, -1, 102, 103, 104, 105, -1, 107, -1, -1,
6357 110, 111, 112, 113, 114, 115, 116, 117, 118, -1,
6358 -1, -1, -1, -1, -1, -1, -1, -1, 0, -1,
6359 -1, -1, -1, -1, -1, -1, 8, 9, 10, -1,
6360 -1, 13, 14, 15, -1, 17, -1, 147, 148, 149,
6361 -1, -1, 152, 25, 26, 27, 28, 29, -1, -1,
6362 160, -1, -1, -1, -1, 37, 38, -1, 40, 41,
6363 42, 43, 44, -1, -1, -1, 78, 79, 80, 81,
6364 82, 83, 84, 85, 86, 87, 88, 89, 90, -1,
6365 -1, -1, -1, 95, 96, -1, 68, 69, -1, -1,
6366 -1, -1, -1, -1, -1, -1, 78, 79, 80, 81,
6367 82, 83, 84, 85, 86, 87, 88, 89, 90, -1,
6368 -1, -1, -1, 95, 96, 97, 98, -1, 100, 101,
6369 -1, -1, -1, -1, 106, 137, 138, 139, 140, 141,
6370 142, 143, 144, 145, 146, -1, -1, -1, 120, -1,
6371 -1, 123, -1, -1, -1, -1, -1, -1, -1, -1,
6372 -1, -1, 134, 135, 136, 137, 138, 139, 140, 141,
6373 142, 143, 144, 145, 146, -1, -1, -1, -1, 151,
6374 152, 153, 154, 155, 0, -1, 158, 159, 160, -1,
6375 -1, -1, 8, 9, 10, -1, -1, 13, 14, 15,
6376 -1, 17, -1, -1, -1, -1, -1, -1, -1, 25,
6377 -1, 27, 28, 29, -1, -1, -1, -1, -1, -1,
6378 -1, 37, 38, -1, 40, 41, 42, 43, 44, -1,
6379 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6380 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6381 -1, -1, 68, 69, -1, -1, -1, -1, -1, -1,
6382 -1, -1, 78, 79, 80, 81, 82, 83, 84, 85,
6383 86, 87, 88, 89, 90, -1, -1, -1, -1, 95,
6384 96, 97, 98, -1, 100, 101, -1, -1, -1, -1,
6385 106, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6386 -1, -1, -1, -1, 120, -1, -1, 123, -1, -1,
6387 -1, -1, -1, -1, -1, -1, -1, -1, 134, 135,
6388 136, 137, 138, 139, 140, 141, 142, 143, 144, 145,
6389 146, -1, -1, -1, -1, -1, 152, 153, 154, 155,
6390 0, -1, 158, 159, 160, -1, -1, -1, 8, 9,
6391 10, -1, -1, 13, 14, 15, -1, 17, -1, -1,
6392 -1, -1, -1, -1, -1, 25, -1, 27, 28, 29,
6393 -1, -1, -1, -1, -1, -1, -1, 37, 38, -1,
6394 40, 41, 42, 43, 44, -1, -1, -1, -1, -1,
6395 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6396 -1, -1, -1, -1, -1, -1, -1, -1, 68, 69,
6397 -1, -1, -1, -1, -1, -1, -1, -1, 78, 79,
6398 80, 81, 82, 83, 84, 85, 86, 87, 88, 89,
6399 90, -1, -1, -1, -1, 95, 96, 97, 98, -1,
6400 100, 101, -1, -1, -1, -1, 106, -1, -1, -1,
6401 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6402 120, -1, -1, 123, -1, -1, -1, -1, -1, -1,
6403 -1, -1, -1, -1, 134, 135, 136, 137, 138, 139,
6404 140, 141, 142, 143, 144, 145, 146, -1, -1, -1,
6405 -1, -1, 152, 153, 154, 155, 0, -1, 158, 159,
6406 160, -1, -1, -1, 8, 9, 10, -1, -1, 13,
6407 14, 15, -1, 17, -1, -1, -1, -1, -1, -1,
6408 -1, 25, 26, 27, 28, 29, -1, -1, -1, -1,
6409 -1, -1, -1, 37, 38, -1, 40, 41, 42, 43,
6410 44, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6411 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6412 -1, -1, -1, -1, 68, 69, -1, -1, -1, -1,
6413 -1, -1, -1, -1, 78, 79, 80, 81, 82, 83,
6414 84, 85, 86, 87, 88, 89, 90, -1, -1, -1,
6415 -1, 95, 96, 97, 98, -1, -1, 101, -1, -1,
6416 -1, -1, 106, -1, -1, -1, -1, -1, -1, -1,
6417 -1, -1, -1, -1, -1, -1, 120, -1, -1, 123,
6418 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6419 -1, 135, 136, 137, 138, 139, 140, 141, 142, 143,
6420 144, 145, 146, -1, -1, -1, -1, 151, 152, 153,
6421 154, 155, 0, -1, 158, 159, 160, -1, -1, -1,
6422 8, 9, 10, -1, -1, 13, 14, 15, -1, 17,
6423 -1, -1, -1, -1, -1, -1, -1, 25, 26, 27,
6424 28, 29, -1, -1, -1, -1, -1, -1, -1, 37,
6425 38, -1, 40, 41, 42, 43, 44, -1, -1, -1,
6426 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6427 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6428 68, 69, -1, -1, -1, -1, -1, -1, -1, -1,
6429 78, 79, 80, 81, 82, 83, 84, 85, 86, 87,
6430 88, 89, 90, -1, -1, -1, -1, 95, 96, 97,
6431 98, -1, -1, 101, -1, -1, -1, -1, 106, -1,
6432 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6433 -1, -1, 120, -1, -1, 123, -1, -1, -1, -1,
6434 -1, -1, -1, -1, -1, -1, -1, 135, 136, 137,
6435 138, 139, 140, 141, 142, 143, 144, 145, 146, -1,
6436 -1, -1, -1, 151, 152, 153, 154, 155, 0, -1,
6437 158, 159, 160, -1, -1, -1, 8, 9, 10, -1,
6438 -1, 13, 14, 15, -1, 17, -1, -1, -1, -1,
6439 -1, -1, -1, 25, 26, 27, 28, -1, -1, -1,
6440 -1, -1, -1, -1, -1, 37, 38, -1, 40, 41,
6441 42, 43, 44, -1, -1, -1, -1, -1, -1, -1,
6442 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6443 -1, -1, -1, -1, -1, -1, 68, 69, -1, -1,
6444 -1, -1, -1, -1, -1, -1, 78, 79, 80, 81,
6445 82, 83, 84, 85, 86, 87, 88, 89, 90, -1,
6446 -1, -1, -1, 95, 96, 97, 98, -1, -1, 101,
6447 -1, -1, -1, -1, 106, -1, -1, -1, -1, -1,
6448 -1, -1, -1, -1, -1, -1, -1, -1, 120, -1,
6449 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6450 -1, -1, -1, 135, -1, 137, 138, 139, 140, 141,
6451 142, 143, 144, 145, 146, -1, -1, -1, -1, 151,
6452 152, 153, 154, 155, 0, 157, 158, 159, 160, -1,
6453 -1, -1, 8, 9, 10, -1, -1, 13, 14, 15,
6454 -1, 17, -1, -1, -1, -1, -1, -1, -1, 25,
6455 -1, 27, 28, 29, -1, -1, -1, -1, -1, -1,
6456 -1, 37, 38, -1, 40, 41, 42, 43, 44, -1,
6457 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6458 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6459 -1, -1, 68, 69, -1, -1, -1, -1, -1, -1,
6460 -1, -1, 78, 79, 80, 81, 82, 83, 84, 85,
6461 86, 87, 88, 89, 90, -1, -1, -1, -1, 95,
6462 96, 97, 98, -1, -1, 101, -1, -1, -1, -1,
6463 106, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6464 -1, -1, -1, -1, 120, -1, -1, 123, -1, -1,
6465 -1, -1, -1, -1, -1, -1, -1, -1, -1, 135,
6466 136, 137, 138, 139, 140, 141, 142, 143, 144, 145,
6467 146, -1, -1, -1, -1, -1, 152, 153, 154, 155,
6468 0, -1, 158, 159, 160, -1, -1, -1, 8, 9,
6469 10, -1, -1, 13, 14, 15, -1, 17, -1, -1,
6470 -1, -1, -1, -1, -1, 25, 26, 27, 28, -1,
6471 -1, -1, -1, -1, -1, -1, -1, 37, 38, -1,
6472 40, 41, 42, 43, 44, -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, 68, 69,
6475 -1, -1, -1, -1, -1, -1, -1, -1, 78, 79,
6476 80, 81, 82, 83, 84, 85, 86, 87, 88, 89,
6477 90, -1, -1, -1, -1, 95, 96, 97, 98, -1,
6478 -1, 101, -1, -1, -1, -1, 106, -1, -1, -1,
6479 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6480 120, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6481 -1, -1, -1, -1, -1, 135, -1, 137, 138, 139,
6482 140, 141, 142, 143, 144, 145, 146, -1, -1, -1,
6483 -1, 151, 152, 153, 154, 155, 0, 157, 158, 159,
6484 160, -1, -1, -1, 8, 9, 10, -1, -1, 13,
6485 14, 15, -1, 17, -1, -1, -1, -1, -1, -1,
6486 -1, 25, -1, 27, 28, -1, -1, -1, -1, -1,
6487 -1, -1, -1, 37, 38, -1, 40, 41, 42, 43,
6488 44, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6489 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6490 -1, -1, -1, -1, 68, 69, -1, -1, -1, -1,
6491 -1, -1, -1, -1, 78, 79, 80, 81, 82, 83,
6492 84, 85, 86, 87, 88, 89, 90, -1, -1, -1,
6493 -1, 95, 96, 97, 98, -1, 100, 101, -1, -1,
6494 -1, -1, 106, -1, -1, -1, -1, -1, -1, -1,
6495 -1, -1, -1, -1, -1, -1, 120, -1, -1, -1,
6496 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6497 134, 135, -1, 137, 138, 139, 140, 141, 142, 143,
6498 144, 145, 146, -1, -1, -1, -1, 151, 152, 153,
6499 154, 155, 0, -1, 158, 159, 160, -1, -1, -1,
6500 8, 9, 10, -1, -1, 13, 14, 15, -1, 17,
6501 -1, -1, -1, -1, -1, -1, -1, 25, -1, 27,
6502 28, -1, -1, -1, -1, -1, -1, -1, -1, 37,
6503 38, -1, 40, 41, 42, 43, 44, -1, -1, -1,
6504 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6505 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6506 68, 69, -1, -1, -1, -1, -1, -1, -1, -1,
6507 78, 79, 80, 81, 82, 83, 84, 85, 86, 87,
6508 88, 89, 90, -1, -1, -1, -1, 95, 96, 97,
6509 98, -1, -1, 101, -1, -1, -1, -1, 106, -1,
6510 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6511 -1, -1, 120, -1, -1, -1, -1, -1, -1, -1,
6512 -1, -1, -1, -1, -1, -1, -1, 135, -1, 137,
6513 138, 139, 140, 141, 142, 143, 144, 145, 146, -1,
6514 -1, -1, -1, -1, 152, 153, 154, 155, 0, 157,
6515 158, 159, 160, -1, -1, -1, 8, 9, 10, -1,
6516 -1, -1, 14, 15, -1, 17, -1, -1, -1, -1,
6517 -1, -1, -1, 25, 26, -1, -1, -1, -1, -1,
6518 -1, -1, -1, -1, -1, 37, 38, -1, 40, 41,
6519 42, 43, 44, -1, -1, -1, -1, -1, -1, -1,
6520 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6521 -1, -1, -1, -1, -1, -1, 68, 69, -1, -1,
6522 -1, -1, -1, -1, -1, -1, 78, 79, 80, 81,
6523 82, 83, 84, 85, 86, 87, 88, 89, 90, -1,
6524 -1, -1, -1, 95, 96, 97, 98, -1, 100, 101,
6525 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6526 -1, -1, -1, -1, -1, -1, -1, -1, 120, -1,
6527 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6528 -1, -1, 134, 135, -1, 137, 138, 139, 140, 141,
6529 142, 143, 144, 145, 146, -1, -1, -1, -1, 151,
6530 152, 153, 154, 155, 0, -1, 158, -1, 160, -1,
6531 -1, -1, 8, 9, 10, -1, -1, -1, 14, 15,
6532 -1, 17, -1, -1, -1, -1, -1, -1, -1, 25,
6533 26, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6534 -1, 37, 38, -1, 40, 41, 42, 43, 44, -1,
6535 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6536 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6537 -1, -1, 68, 69, -1, -1, -1, -1, -1, -1,
6538 -1, -1, 78, 79, 80, 81, 82, 83, 84, 85,
6539 86, 87, 88, 89, 90, -1, -1, -1, -1, 95,
6540 96, 97, 98, -1, 100, 101, -1, -1, -1, -1,
6541 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6542 -1, -1, -1, -1, 120, -1, -1, -1, -1, -1,
6543 -1, -1, -1, -1, -1, -1, -1, -1, 134, 135,
6544 -1, 137, 138, 139, 140, 141, 142, 143, 144, 145,
6545 146, -1, -1, -1, -1, 151, 152, 153, 154, 155,
6546 0, -1, 158, -1, 160, -1, -1, -1, 8, 9,
6547 10, -1, -1, -1, 14, 15, -1, 17, -1, -1,
6548 -1, -1, -1, -1, -1, 25, -1, -1, -1, -1,
6549 -1, -1, -1, -1, -1, -1, -1, 37, 38, -1,
6550 40, 41, 42, 43, 44, -1, -1, -1, -1, -1,
6551 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6552 -1, -1, -1, -1, -1, -1, -1, -1, 68, 69,
6553 -1, -1, -1, -1, -1, -1, -1, -1, 78, 79,
6554 80, 81, 82, 83, 84, 85, 86, 87, 88, 89,
6555 90, -1, -1, -1, -1, 95, 96, 97, 98, -1,
6556 100, 101, -1, -1, -1, -1, -1, -1, -1, -1,
6557 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6558 120, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6559 -1, -1, -1, -1, 134, 135, -1, 137, 138, 139,
6560 140, 141, 142, 143, 144, 145, 146, -1, -1, -1,
6561 -1, 151, 152, 153, 154, 155, 0, -1, 158, -1,
6562 160, -1, -1, -1, 8, 9, 10, -1, -1, -1,
6563 14, 15, -1, 17, -1, -1, -1, -1, -1, -1,
6564 -1, 25, -1, -1, -1, -1, -1, -1, -1, -1,
6565 -1, -1, -1, 37, 38, -1, 40, 41, 42, 43,
6566 44, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6567 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6568 -1, -1, -1, -1, 68, 69, -1, -1, -1, -1,
6569 -1, -1, -1, -1, 78, 79, 80, 81, 82, 83,
6570 84, 85, 86, 87, 88, 89, 90, -1, -1, -1,
6571 -1, 95, 96, 97, 98, -1, 100, 101, -1, -1,
6572 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6573 -1, -1, -1, -1, -1, -1, 120, -1, -1, -1,
6574 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6575 134, 135, -1, 137, 138, 139, 140, 141, 142, 143,
6576 144, 145, 146, -1, -1, -1, -1, 151, 152, 153,
6577 154, 155, -1, -1, 158, 1, 160, 3, 4, 5,
6578 6, 7, 8, 9, 10, 11, 12, -1, -1, 15,
6579 16, -1, 18, 19, 20, 21, 22, 23, 24, -1,
6580 -1, -1, -1, -1, 30, 31, 32, 33, 34, 35,
6581 36, -1, -1, 39, -1, -1, -1, -1, -1, 45,
6582 46, 47, 48, 49, 50, 51, 52, 53, 54, 55,
6583 56, 57, -1, 59, 60, 61, 62, 63, 64, 65,
6584 -1, -1, 68, -1, -1, -1, -1, -1, -1, -1,
6585 76, 77, -1, -1, -1, -1, -1, -1, -1, -1,
6586 -1, -1, -1, -1, -1, 91, 92, -1, -1, -1,
6587 -1, -1, -1, 99, -1, -1, 102, 103, 104, 105,
6588 -1, 107, -1, -1, 110, 111, 112, 113, 114, 115,
6589 116, 117, 118, -1, -1, -1, -1, -1, -1, -1,
6590 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6591 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6592 -1, 147, 148, 149, -1, -1, -1, 1, 154, 3,
6593 4, 5, 6, 7, 160, -1, 10, 11, 12, -1,
6594 14, 15, 16, -1, 18, 19, 20, 21, 22, 23,
6595 24, -1, -1, -1, -1, -1, 30, 31, 32, 33,
6596 34, 35, 36, -1, -1, 39, -1, -1, -1, -1,
6597 -1, 45, 46, 47, 48, 49, 50, 51, 52, 53,
6598 54, 55, 56, 57, -1, 59, 60, 61, 62, 63,
6599 64, 65, -1, -1, 68, -1, -1, -1, -1, -1,
6600 -1, -1, 76, 77, -1, -1, -1, -1, -1, -1,
6601 -1, -1, -1, -1, -1, -1, -1, 91, 92, -1,
6602 -1, -1, -1, -1, -1, 99, -1, -1, 102, 103,
6603 104, 105, -1, 107, -1, -1, 110, 111, 112, 113,
6604 114, 115, 116, 117, 118, -1, -1, -1, -1, -1,
6605 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6606 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6607 -1, -1, -1, 147, 148, 149, -1, -1, -1, 1,
6608 154, 3, 4, 5, 6, 7, 160, -1, 10, 11,
6609 12, -1, -1, 15, 16, 17, 18, 19, 20, 21,
6610 22, 23, 24, -1, -1, -1, -1, -1, 30, 31,
6611 32, 33, 34, 35, 36, -1, -1, 39, -1, -1,
6612 -1, -1, -1, 45, 46, 47, 48, 49, 50, 51,
6613 52, 53, 54, 55, 56, 57, -1, 59, 60, 61,
6614 62, 63, 64, 65, -1, -1, 68, -1, -1, -1,
6615 -1, -1, -1, -1, 76, 77, -1, -1, -1, -1,
6616 -1, -1, -1, -1, -1, -1, -1, -1, -1, 91,
6617 92, -1, -1, -1, -1, -1, -1, 99, -1, -1,
6618 102, 103, 104, 105, -1, 107, -1, -1, 110, 111,
6619 112, 113, 114, 115, 116, 117, 118, -1, -1, -1,
6620 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6621 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6622 -1, -1, -1, -1, -1, 147, 148, 149, -1, -1,
6623 -1, 1, 154, 3, 4, 5, 6, 7, 160, -1,
6624 10, 11, 12, -1, -1, 15, 16, -1, 18, 19,
6625 20, 21, 22, 23, 24, 25, -1, -1, -1, -1,
6626 30, 31, 32, 33, 34, 35, 36, -1, -1, 39,
6627 -1, -1, -1, -1, -1, 45, 46, 47, 48, 49,
6628 50, 51, 52, 53, 54, 55, 56, 57, -1, 59,
6629 60, 61, 62, 63, 64, 65, -1, -1, 68, -1,
6630 -1, -1, -1, -1, -1, -1, 76, 77, -1, -1,
6631 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6632 -1, 91, 92, -1, -1, -1, -1, -1, -1, 99,
6633 -1, -1, 102, 103, 104, 105, -1, 107, -1, -1,
6634 110, 111, 112, 113, 114, 115, 116, 117, 118, -1,
6635 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6636 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6637 -1, -1, -1, -1, -1, -1, -1, 147, 148, 149,
6638 -1, -1, -1, 1, 154, 3, 4, 5, 6, 7,
6639 160, -1, 10, 11, 12, -1, -1, 15, 16, -1,
6640 18, 19, 20, 21, 22, 23, 24, -1, -1, -1,
6641 -1, -1, 30, 31, 32, 33, 34, 35, 36, -1,
6642 -1, 39, -1, -1, -1, -1, -1, 45, 46, 47,
6643 48, 49, 50, 51, 52, 53, 54, 55, 56, 57,
6644 -1, 59, 60, 61, 62, 63, 64, 65, -1, -1,
6645 68, -1, -1, -1, -1, -1, -1, -1, 76, 77,
6646 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6647 -1, -1, -1, 91, 92, -1, -1, -1, -1, -1,
6648 -1, 99, -1, -1, 102, 103, 104, 105, -1, 107,
6649 -1, -1, 110, 111, 112, 113, 114, 115, 116, 117,
6650 118, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6651 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6652 -1, -1, -1, -1, -1, -1, -1, -1, -1, 147,
6653 148, 149, -1, -1, -1, 1, 154, 3, 4, 5,
6654 6, 7, 160, 9, 10, 11, 12, -1, -1, -1,
6655 16, -1, 18, 19, 20, 21, 22, 23, 24, -1,
6656 -1, -1, -1, -1, 30, 31, 32, 33, 34, 35,
6657 36, -1, -1, 39, -1, -1, -1, -1, -1, 45,
6658 46, 47, 48, 49, 50, 51, 52, 53, 54, 55,
6659 56, 57, -1, 59, 60, 61, 62, 63, 64, 65,
6660 -1, -1, 68, -1, -1, -1, -1, -1, -1, -1,
6661 76, 77, -1, -1, -1, -1, -1, -1, -1, -1,
6662 -1, -1, -1, -1, -1, 91, 92, -1, -1, -1,
6663 -1, -1, -1, 99, -1, -1, 102, 103, 104, 105,
6664 -1, 107, -1, -1, 110, 111, 112, 113, 114, 115,
6665 116, 117, 118, -1, -1, -1, -1, -1, -1, -1,
6666 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6667 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6668 -1, 147, 148, 149, -1, -1, -1, 1, 154, 3,
6669 4, 5, 6, 7, 160, -1, 10, 11, 12, -1,
6670 -1, -1, 16, -1, 18, 19, 20, 21, 22, 23,
6671 24, -1, -1, -1, -1, -1, 30, 31, 32, 33,
6672 34, 35, 36, -1, -1, 39, -1, -1, -1, -1,
6673 -1, 45, 46, 47, 48, 49, 50, 51, 52, 53,
6674 54, 55, 56, 57, -1, 59, 60, 61, 62, 63,
6675 64, 65, -1, -1, 68, -1, -1, -1, -1, -1,
6676 -1, -1, 76, 77, -1, -1, -1, -1, -1, -1,
6677 -1, -1, -1, -1, -1, -1, -1, 91, 92, -1,
6678 -1, -1, -1, -1, -1, 99, -1, -1, 102, 103,
6679 104, 105, -1, 107, -1, -1, 110, 111, 112, 113,
6680 114, 115, 116, 117, 118, -1, -1, -1, -1, -1,
6681 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6682 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6683 -1, -1, -1, 147, 148, 149, -1, -1, -1, 1,
6684 154, 3, 4, 5, 6, 7, 160, -1, -1, 11,
6685 12, -1, -1, -1, 16, -1, 18, 19, 20, 21,
6686 22, 23, 24, -1, -1, -1, -1, -1, 30, 31,
6687 32, 33, 34, 35, 36, -1, -1, 39, -1, -1,
6688 -1, -1, -1, 45, 46, 47, 48, 49, 50, 51,
6689 52, 53, 54, 55, 56, 57, -1, 59, 60, 61,
6690 62, 63, 64, 65, -1, -1, -1, -1, -1, -1,
6691 -1, -1, -1, -1, 76, 77, -1, -1, -1, -1,
6692 -1, -1, -1, -1, -1, -1, -1, -1, -1, 91,
6693 92, -1, -1, -1, -1, -1, -1, 99, -1, -1,
6694 102, 103, 104, 105, -1, 107, -1, -1, 110, 111,
6695 112, 113, 114, 115, 116, 117, 118, -1, -1, -1,
6696 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6697 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6698 -1, -1, -1, -1, -1, 147, 148, 149, -1, -1,
6699 -1, -1, 154, -1, -1, -1, 158, 1, 160, 3,
6700 4, 5, 6, 7, -1, -1, -1, 11, 12, -1,
6701 -1, -1, 16, -1, 18, 19, 20, 21, 22, 23,
6702 24, -1, -1, -1, -1, -1, 30, 31, 32, 33,
6703 34, 35, 36, -1, -1, 39, -1, -1, -1, -1,
6704 -1, 45, 46, 47, 48, 49, 50, 51, 52, 53,
6705 54, 55, 56, 57, -1, 59, 60, 61, 62, 63,
6706 64, 65, -1, -1, -1, -1, -1, -1, -1, -1,
6707 -1, -1, 76, 77, -1, -1, -1, -1, -1, -1,
6708 -1, -1, -1, -1, -1, -1, -1, 91, 92, -1,
6709 -1, -1, -1, -1, -1, 99, -1, -1, 102, 103,
6710 104, 105, -1, 107, -1, -1, 110, 111, 112, 113,
6711 114, 115, 116, 117, 118, -1, -1, -1, -1, -1,
6712 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6713 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6714 -1, -1, -1, 147, 148, 149, -1, -1, -1, -1,
6715 154, -1, -1, -1, 158, 1, 160, 3, 4, 5,
6716 6, 7, -1, -1, -1, 11, 12, -1, -1, -1,
6717 16, -1, 18, 19, 20, 21, 22, 23, 24, -1,
6718 -1, -1, -1, -1, 30, 31, 32, 33, 34, 35,
6719 36, -1, -1, 39, -1, -1, -1, -1, -1, 45,
6720 46, 47, 48, 49, 50, 51, 52, 53, 54, 55,
6721 56, 57, -1, 59, 60, 61, 62, 63, 64, 65,
6722 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6723 76, 77, -1, -1, -1, -1, -1, -1, -1, -1,
6724 -1, -1, -1, -1, -1, 91, 92, -1, -1, -1,
6725 -1, -1, -1, 99, -1, -1, 102, 103, 104, 105,
6726 -1, 107, -1, -1, 110, 111, 112, 113, 114, 115,
6727 116, 117, 118, -1, -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, 147, 148, 149, -1, -1, 152, 1, 154, 3,
6731 4, 5, 6, 7, 160, -1, -1, 11, 12, -1,
6732 -1, -1, 16, -1, 18, 19, 20, 21, 22, 23,
6733 24, -1, -1, -1, -1, -1, 30, 31, 32, 33,
6734 34, 35, 36, -1, -1, 39, -1, -1, -1, -1,
6735 -1, 45, 46, 47, 48, 49, 50, 51, 52, 53,
6736 54, 55, 56, 57, -1, 59, 60, 61, 62, 63,
6737 64, 65, -1, -1, -1, -1, -1, -1, -1, -1,
6738 -1, -1, 76, 77, -1, -1, -1, -1, -1, -1,
6739 -1, -1, -1, -1, -1, -1, -1, 91, 92, -1,
6740 -1, -1, -1, -1, -1, 99, -1, -1, 102, 103,
6741 104, 105, -1, 107, -1, -1, 110, 111, 112, 113,
6742 114, 115, 116, 117, 118, -1, -1, -1, -1, -1,
6743 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6744 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6745 -1, -1, -1, 147, 148, 149, -1, -1, 152, 1,
6746 154, 3, 4, 5, -1, 7, 160, -1, -1, 11,
6747 12, -1, -1, -1, 16, 17, 18, 19, 20, 21,
6748 22, 23, 24, -1, -1, -1, -1, -1, 30, 31,
6749 32, 33, 34, 35, 36, -1, -1, 39, -1, -1,
6750 -1, -1, -1, -1, 46, -1, -1, 49, 50, 51,
6751 52, 53, 54, 55, 56, 57, -1, 59, 60, 61,
6752 62, 63, 64, 65, -1, -1, -1, -1, -1, -1,
6753 -1, -1, -1, -1, 76, 77, -1, -1, -1, -1,
6754 -1, -1, -1, -1, -1, -1, -1, -1, -1, 91,
6755 92, -1, -1, -1, -1, -1, -1, 99, -1, -1,
6756 102, 103, 104, 105, -1, -1, -1, -1, 110, 111,
6757 112, 113, 114, 115, 116, 117, 118, -1, -1, -1,
6758 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6759 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6760 -1, -1, -1, -1, -1, 147, 148, 149, -1, -1,
6761 -1, -1, 154, -1, -1, -1, -1, -1, 160, 3,
6762 4, 5, 6, 7, 8, 9, 10, 11, 12, 13,
6763 14, 15, 16, 17, 18, 19, 20, 21, 22, 23,
6764 24, 25, 26, -1, -1, -1, 30, 31, 32, 33,
6765 34, 35, 36, 37, 38, 39, -1, -1, -1, -1,
6766 -1, 45, 46, 47, 48, 49, 50, 51, 52, 53,
6767 54, 55, 56, 57, -1, -1, -1, -1, -1, -1,
6768 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6769 -1, -1, 76, 77, 78, 79, 80, 81, 82, 83,
6770 84, -1, -1, 87, 88, -1, -1, -1, -1, 93,
6771 94, 95, 96, -1, -1, -1, -1, -1, -1, -1,
6772 -1, -1, -1, 107, 108, -1, -1, -1, -1, -1,
6773 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6774 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6775 -1, -1, -1, 137, 138, 139, 140, 141, 142, 143,
6776 144, 145, 146, -1, 148, 149, -1, -1, -1, -1,
6777 -1, -1, 156, 157, 3, 4, 5, 6, 7, 8,
6778 9, 10, 11, 12, 13, 14, 15, 16, 17, 18,
6779 19, 20, 21, 22, 23, 24, 25, 26, -1, -1,
6780 -1, 30, 31, 32, 33, 34, 35, 36, 37, 38,
6781 39, -1, -1, -1, -1, -1, 45, 46, 47, 48,
6782 49, 50, 51, 52, 53, 54, 55, 56, 57, -1,
6783 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6784 -1, -1, -1, -1, -1, -1, -1, 76, 77, 78,
6785 79, 80, 81, 82, 83, 84, -1, -1, 87, 88,
6786 -1, -1, -1, -1, 93, 94, 95, 96, -1, -1,
6787 -1, -1, -1, -1, -1, -1, -1, -1, 107, 108,
6788 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6789 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6790 -1, -1, -1, -1, -1, -1, -1, -1, 137, 138,
6791 139, 140, 141, 142, 143, 144, 145, 146, -1, 148,
6792 149, -1, -1, -1, -1, -1, -1, 156, 3, 4,
6793 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
6794 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
6795 25, 26, -1, -1, -1, 30, 31, 32, 33, 34,
6796 35, 36, 37, 38, 39, -1, -1, -1, -1, -1,
6797 45, 46, 47, 48, 49, 50, 51, 52, 53, 54,
6798 -1, 56, -1, -1, -1, -1, -1, -1, -1, -1,
6799 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6800 -1, 76, 77, 78, 79, 80, 81, 82, 83, 84,
6801 -1, -1, 87, 88, -1, -1, -1, -1, 93, 94,
6802 95, 96, -1, -1, -1, -1, -1, -1, -1, -1,
6803 -1, -1, 107, 108, -1, -1, 111, -1, -1, -1,
6804 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6805 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6806 -1, -1, 137, 138, 139, 140, 141, 142, 143, 144,
6807 145, 146, -1, 148, 149, -1, -1, -1, -1, -1,
6808 -1, 156, 3, 4, 5, 6, 7, 8, 9, 10,
6809 11, 12, 13, 14, 15, 16, 17, 18, 19, 20,
6810 21, 22, 23, 24, 25, 26, -1, -1, -1, 30,
6811 31, 32, 33, 34, 35, 36, 37, 38, 39, -1,
6812 -1, -1, -1, -1, 45, 46, 47, 48, 49, 50,
6813 51, 52, 53, -1, -1, 56, -1, -1, -1, -1,
6814 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6815 -1, -1, -1, -1, -1, 76, 77, 78, 79, 80,
6816 81, 82, 83, 84, -1, -1, 87, 88, -1, -1,
6817 -1, -1, 93, 94, 95, 96, -1, -1, -1, -1,
6818 -1, -1, -1, -1, -1, -1, 107, 108, -1, -1,
6819 111, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6820 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6821 -1, -1, -1, -1, -1, -1, 137, 138, 139, 140,
6822 141, 142, 143, 144, 145, 146, -1, 148, 149, -1,
6823 -1, -1, -1, -1, -1, 156, 3, 4, 5, 6,
6824 7, 8, 9, 10, 11, 12, 13, 14, 15, 16,
6825 17, 18, 19, 20, 21, 22, 23, 24, 25, 26,
6826 -1, -1, -1, 30, 31, 32, 33, 34, 35, 36,
6827 37, 38, 39, -1, -1, -1, -1, -1, 45, 46,
6828 47, 48, 49, 50, 51, 52, 53, -1, -1, 56,
6829 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6830 -1, -1, -1, -1, -1, -1, -1, -1, -1, 76,
6831 77, 78, 79, 80, 81, 82, 83, 84, -1, -1,
6832 87, 88, -1, -1, -1, -1, 93, 94, 95, 96,
6833 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6834 107, 108, -1, -1, -1, -1, -1, -1, -1, -1,
6835 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6836 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6837 137, 138, 139, 140, 141, 142, 143, 144, 145, 146,
6838 -1, 148, 149, 3, 4, 5, -1, 7, -1, 156,
6839 -1, 11, 12, -1, -1, -1, 16, -1, 18, 19,
6840 20, 21, 22, 23, 24, -1, -1, -1, -1, -1,
6841 30, 31, 32, 33, 34, 35, 36, -1, -1, 39,
6842 -1, -1, -1, -1, -1, -1, 46, -1, -1, 49,
6843 50, 51, 52, 53, 54, 55, 56, 57, -1, 59,
6844 60, 61, 62, 63, 64, 65, -1, -1, -1, -1,
6845 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6846 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6847 -1, -1, -1, -1, -1, -1, -1, -1, -1, 99,
6848 -1, -1, 102, 103, 104, 105, -1, -1, -1, -1,
6849 110, 111, 112, 113, 114, 115, 116, 117, 118, -1,
6850 -1, 3, 4, 5, -1, 7, -1, -1, -1, 11,
6851 12, -1, -1, -1, 16, -1, 18, 19, 20, 21,
6852 22, 23, 24, -1, -1, -1, -1, 147, 30, 31,
6853 32, 33, 34, 35, 36, 155, -1, 39, -1, -1,
6854 -1, -1, -1, -1, 46, -1, -1, 49, 50, 51,
6855 52, 53, 54, 55, 56, 57, -1, 59, 60, 61,
6856 62, 63, 64, 65, -1, -1, -1, -1, -1, -1,
6857 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6858 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6859 -1, -1, -1, -1, -1, -1, -1, 99, -1, -1,
6860 102, 103, 104, 105, -1, -1, -1, -1, 110, 111,
6861 112, 113, 114, 115, 116, 117, 118, -1, -1, 3,
6862 4, 5, -1, 7, -1, -1, -1, 11, 12, -1,
6863 -1, -1, 16, -1, 18, 19, 20, 21, 22, 23,
6864 24, -1, -1, -1, -1, 147, 30, 31, 32, 33,
6865 34, 35, 36, 155, -1, 39, -1, -1, -1, -1,
6866 -1, -1, 46, -1, -1, 49, 50, 51, 52, 53,
6867 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
6868 64, 65, -1, -1, -1, -1, -1, -1, -1, -1,
6869 -1, -1, 76, 77, -1, -1, -1, -1, -1, -1,
6870 -1, -1, -1, -1, -1, -1, -1, 91, 92, -1,
6871 -1, -1, -1, -1, -1, 99, -1, -1, 102, 103,
6872 104, 105, -1, 107, 108, 109, 110, 111, 112, 113,
6873 114, 115, 116, 117, 118, -1, -1, -1, -1, -1,
6874 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6875 -1, -1, -1, -1, -1, -1, -1, -1, 3, 4,
6876 5, -1, 7, 147, 148, 149, 11, 12, -1, -1,
6877 154, 16, -1, 18, 19, 20, 21, 22, 23, 24,
6878 -1, -1, -1, -1, -1, 30, 31, 32, 33, 34,
6879 35, 36, -1, -1, 39, -1, -1, -1, -1, -1,
6880 -1, 46, -1, -1, 49, 50, 51, 52, 53, 54,
6881 55, 56, 57, -1, 59, 60, 61, 62, 63, 64,
6882 65, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6883 -1, 76, 77, -1, -1, -1, -1, -1, -1, -1,
6884 -1, -1, -1, -1, -1, -1, 91, 92, -1, -1,
6885 -1, -1, -1, -1, 99, -1, -1, 102, 103, 104,
6886 105, -1, -1, -1, -1, 110, 111, 112, 113, 114,
6887 115, 116, 117, 118, -1, -1, -1, -1, -1, -1,
6888 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6889 -1, -1, -1, -1, -1, 1, -1, 3, 4, 5,
6890 6, 7, 147, 148, 149, 11, 12, -1, -1, 154,
6891 16, -1, 18, 19, 20, 21, 22, 23, 24, -1,
6892 -1, -1, -1, -1, 30, 31, 32, 33, 34, 35,
6893 36, -1, -1, 39, -1, -1, -1, -1, -1, 45,
6894 46, -1, 48, 49, 50, 51, 52, 53, 54, 55,
6895 56, 57, -1, 59, 60, 61, 62, 63, 64, 65,
6896 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6897 76, 77, -1, -1, -1, -1, -1, -1, -1, -1,
6898 -1, -1, -1, -1, -1, 91, 92, -1, -1, -1,
6899 -1, -1, -1, 99, -1, -1, 102, 103, 104, 105,
6900 -1, 107, -1, -1, 110, 111, 112, 113, 114, 115,
6901 116, 117, 118, -1, -1, 1, -1, 3, 4, 5,
6902 -1, 7, -1, -1, -1, 11, 12, -1, -1, -1,
6903 16, -1, 18, 19, 20, 21, 22, 23, 24, -1,
6904 -1, 147, 148, 149, 30, 31, 32, 33, 34, 35,
6905 36, -1, -1, 39, -1, -1, -1, -1, -1, -1,
6906 46, -1, -1, 49, 50, 51, 52, 53, 54, 55,
6907 56, 57, -1, 59, 60, 61, 62, 63, 64, 65,
6908 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6909 76, 77, -1, -1, -1, -1, -1, -1, -1, -1,
6910 -1, -1, -1, -1, -1, 91, 92, -1, -1, -1,
6911 -1, -1, -1, 99, -1, -1, 102, 103, 104, 105,
6912 -1, -1, -1, -1, 110, 111, 112, 113, 114, 115,
6913 116, 117, 118, -1, -1, -1, -1, 3, 4, 5,
6914 -1, 7, -1, -1, -1, 11, 12, -1, -1, -1,
6915 16, -1, 18, 19, 20, 21, 22, 23, 24, -1,
6916 -1, 147, 148, 149, 30, 31, 32, 33, 34, 35,
6917 36, -1, -1, 39, -1, -1, -1, -1, -1, -1,
6918 46, -1, -1, 49, 50, 51, 52, 53, 54, 55,
6919 56, 57, 58, 59, 60, 61, 62, 63, 64, 65,
6920 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6921 76, 77, -1, -1, -1, -1, -1, -1, -1, -1,
6922 -1, -1, -1, -1, -1, 91, 92, -1, -1, -1,
6923 -1, -1, -1, 99, -1, -1, 102, 103, 104, 105,
6924 -1, 107, 108, 109, 110, 111, 112, 113, 114, 115,
6925 116, 117, 118, -1, -1, -1, -1, 3, 4, 5,
6926 -1, 7, -1, -1, -1, 11, 12, -1, -1, -1,
6927 16, -1, 18, 19, 20, 21, 22, 23, 24, -1,
6928 -1, 147, 148, 149, 30, 31, 32, 33, 34, 35,
6929 36, -1, -1, 39, -1, -1, -1, -1, -1, -1,
6930 46, -1, -1, 49, 50, 51, 52, 53, 54, 55,
6931 56, 57, 58, 59, 60, 61, 62, 63, 64, 65,
6932 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6933 76, 77, -1, -1, -1, -1, -1, -1, -1, -1,
6934 -1, -1, -1, -1, -1, 91, 92, -1, -1, -1,
6935 -1, -1, -1, 99, -1, -1, 102, 103, 104, 105,
6936 -1, 107, 108, 109, 110, 111, 112, 113, 114, 115,
6937 116, 117, 118, -1, -1, -1, -1, 3, 4, 5,
6938 -1, 7, -1, -1, -1, 11, 12, -1, -1, -1,
6939 16, -1, 18, 19, 20, 21, 22, 23, 24, -1,
6940 -1, 147, 148, 149, 30, 31, 32, 33, 34, 35,
6941 36, -1, -1, 39, -1, -1, -1, -1, -1, -1,
6942 46, -1, -1, 49, 50, 51, 52, 53, 54, 55,
6943 56, 57, 58, 59, 60, 61, 62, 63, 64, 65,
6944 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6945 76, 77, -1, -1, -1, -1, -1, -1, -1, -1,
6946 -1, -1, -1, -1, -1, 91, 92, -1, -1, -1,
6947 -1, -1, -1, 99, -1, -1, 102, 103, 104, 105,
6948 -1, 107, 108, 109, 110, 111, 112, 113, 114, 115,
6949 116, 117, 118, -1, -1, -1, -1, 3, 4, 5,
6950 -1, 7, -1, -1, -1, 11, 12, -1, -1, -1,
6951 16, -1, 18, 19, 20, 21, 22, 23, 24, -1,
6952 -1, 147, 148, 149, 30, 31, 32, 33, 34, 35,
6953 36, -1, -1, 39, -1, -1, -1, -1, -1, -1,
6954 46, -1, -1, 49, 50, 51, 52, 53, 54, 55,
6955 56, 57, 58, 59, 60, 61, 62, 63, 64, 65,
6956 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6957 76, 77, -1, -1, -1, -1, -1, -1, -1, -1,
6958 -1, -1, -1, -1, -1, 91, 92, -1, -1, -1,
6959 -1, -1, -1, 99, -1, -1, 102, 103, 104, 105,
6960 -1, 107, 108, 109, 110, 111, 112, 113, 114, 115,
6961 116, 117, 118, -1, -1, -1, -1, 3, 4, 5,
6962 -1, 7, -1, -1, -1, 11, 12, -1, -1, -1,
6963 16, -1, 18, 19, 20, 21, 22, 23, 24, -1,
6964 -1, 147, 148, 149, 30, 31, 32, 33, 34, 35,
6965 36, -1, -1, 39, -1, -1, -1, -1, -1, -1,
6966 46, -1, -1, 49, 50, 51, 52, 53, 54, 55,
6967 56, 57, 58, 59, 60, 61, 62, 63, 64, 65,
6968 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6969 76, 77, -1, -1, -1, -1, -1, -1, -1, -1,
6970 -1, -1, -1, -1, -1, 91, 92, -1, -1, -1,
6971 -1, -1, -1, 99, -1, -1, 102, 103, 104, 105,
6972 -1, 107, 108, -1, 110, 111, 112, 113, 114, 115,
6973 116, 117, 118, -1, -1, -1, -1, 3, 4, 5,
6974 -1, 7, -1, -1, -1, 11, 12, -1, -1, -1,
6975 16, -1, 18, 19, 20, 21, 22, 23, 24, -1,
6976 -1, 147, 148, 149, 30, 31, 32, 33, 34, 35,
6977 36, -1, -1, 39, -1, -1, -1, -1, -1, -1,
6978 46, -1, -1, 49, 50, 51, 52, 53, 54, 55,
6979 56, 57, 58, 59, 60, 61, 62, 63, 64, 65,
6980 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6981 76, 77, -1, -1, -1, -1, -1, -1, -1, -1,
6982 -1, -1, -1, -1, -1, 91, 92, -1, -1, -1,
6983 -1, -1, -1, 99, -1, -1, 102, 103, 104, 105,
6984 -1, -1, 108, 109, 110, 111, 112, 113, 114, 115,
6985 116, 117, 118, -1, -1, -1, -1, 3, 4, 5,
6986 -1, 7, -1, -1, -1, 11, 12, -1, -1, -1,
6987 16, -1, 18, 19, 20, 21, 22, 23, 24, -1,
6988 -1, 147, 148, 149, 30, 31, 32, 33, 34, 35,
6989 36, -1, -1, 39, -1, -1, -1, -1, -1, -1,
6990 46, -1, -1, 49, 50, 51, 52, 53, 54, 55,
6991 56, 57, 58, 59, 60, 61, 62, 63, 64, 65,
6992 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6993 76, 77, -1, -1, -1, -1, -1, -1, -1, -1,
6994 -1, -1, -1, -1, -1, 91, 92, -1, -1, -1,
6995 -1, -1, -1, 99, -1, -1, 102, 103, 104, 105,
6996 -1, -1, 108, -1, 110, 111, 112, 113, 114, 115,
6997 116, 117, 118, -1, -1, -1, -1, 3, 4, 5,
6998 -1, 7, -1, -1, -1, 11, 12, -1, -1, -1,
6999 16, -1, 18, 19, 20, 21, 22, 23, 24, -1,
7000 -1, 147, 148, 149, 30, 31, 32, 33, 34, 35,
7001 36, -1, -1, 39, -1, -1, -1, -1, -1, -1,
7002 46, -1, -1, 49, 50, 51, 52, 53, 54, 55,
7003 56, 57, -1, 59, 60, 61, 62, 63, 64, 65,
7004 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7005 76, 77, -1, -1, -1, -1, -1, -1, -1, -1,
7006 -1, -1, -1, -1, -1, 91, 92, -1, -1, -1,
7007 -1, -1, -1, 99, -1, -1, 102, 103, 104, 105,
7008 -1, 107, -1, -1, 110, 111, 112, 113, 114, 115,
7009 116, 117, 118, -1, -1, -1, -1, 3, 4, 5,
7010 -1, 7, -1, -1, -1, 11, 12, -1, -1, -1,
7011 16, -1, 18, 19, 20, 21, 22, 23, 24, -1,
7012 -1, 147, 148, 149, 30, 31, 32, 33, 34, 35,
7013 36, -1, -1, 39, -1, -1, -1, -1, -1, -1,
7014 46, -1, -1, 49, 50, 51, 52, 53, 54, 55,
7015 56, 57, -1, 59, 60, 61, 62, 63, 64, 65,
7016 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7017 76, 77, -1, -1, -1, -1, -1, -1, -1, -1,
7018 -1, -1, -1, -1, -1, 91, 92, -1, -1, -1,
7019 -1, -1, -1, 99, -1, -1, 102, 103, 104, 105,
7020 -1, 107, -1, -1, 110, 111, 112, 113, 114, 115,
7021 116, 117, 118, -1, -1, -1, -1, 3, 4, 5,
7022 -1, 7, -1, -1, -1, 11, 12, -1, -1, -1,
7023 16, -1, 18, 19, 20, 21, 22, 23, 24, -1,
7024 -1, 147, 148, 149, 30, 31, 32, 33, 34, 35,
7025 36, -1, -1, 39, -1, -1, -1, -1, -1, -1,
7026 46, -1, -1, 49, 50, 51, 52, 53, 54, 55,
7027 56, 57, -1, 59, 60, 61, 62, 63, 64, 65,
7028 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7029 76, 77, -1, -1, -1, -1, -1, -1, -1, -1,
7030 -1, -1, -1, -1, -1, 91, 92, -1, -1, -1,
7031 -1, -1, -1, 99, -1, -1, 102, 103, 104, 105,
7032 -1, 107, -1, -1, 110, 111, 112, 113, 114, 115,
7033 116, 117, 118, -1, -1, -1, -1, 3, 4, 5,
7034 -1, 7, -1, -1, -1, 11, 12, -1, -1, -1,
7035 16, -1, 18, 19, 20, 21, 22, 23, 24, -1,
7036 -1, 147, 148, 149, 30, 31, 32, 33, 34, 35,
7037 36, -1, -1, 39, -1, -1, -1, -1, -1, -1,
7038 46, -1, -1, 49, 50, 51, 52, 53, 54, 55,
7039 56, 57, -1, 59, 60, 61, 62, 63, 64, 65,
7040 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7041 76, 77, -1, -1, -1, -1, -1, -1, -1, -1,
7042 -1, -1, -1, -1, -1, 91, 92, -1, -1, -1,
7043 -1, -1, -1, 99, -1, -1, 102, 103, 104, 105,
7044 -1, 107, -1, -1, 110, 111, 112, 113, 114, 115,
7045 116, 117, 118, -1, -1, -1, -1, 3, 4, 5,
7046 -1, 7, -1, -1, -1, 11, 12, -1, -1, -1,
7047 16, -1, 18, 19, 20, 21, 22, 23, 24, -1,
7048 -1, 147, 148, 149, 30, 31, 32, 33, 34, 35,
7049 36, -1, -1, 39, -1, -1, -1, -1, -1, -1,
7050 46, -1, -1, 49, 50, 51, 52, 53, 54, 55,
7051 56, 57, -1, 59, 60, 61, 62, 63, 64, 65,
7052 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7053 76, 77, -1, -1, -1, -1, -1, -1, -1, -1,
7054 -1, -1, -1, -1, -1, 91, 92, -1, -1, -1,
7055 -1, -1, -1, 99, -1, -1, 102, 103, 104, 105,
7056 -1, 107, -1, -1, 110, 111, 112, 113, 114, 115,
7057 116, 117, 118, -1, -1, -1, -1, 3, 4, 5,
7058 -1, 7, -1, -1, -1, 11, 12, -1, -1, -1,
7059 16, -1, 18, 19, 20, 21, 22, 23, 24, -1,
7060 -1, 147, 148, 149, 30, 31, 32, 33, 34, 35,
7061 36, -1, -1, 39, -1, -1, -1, -1, -1, -1,
7062 46, -1, -1, 49, 50, 51, 52, 53, 54, 55,
7063 56, 57, -1, 59, 60, 61, 62, 63, 64, 65,
7064 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7065 76, 77, -1, -1, -1, -1, -1, -1, -1, -1,
7066 -1, -1, -1, -1, -1, 91, 92, -1, -1, -1,
7067 -1, -1, -1, 99, -1, -1, 102, 103, 104, 105,
7068 -1, 107, -1, -1, 110, 111, 112, 113, 114, 115,
7069 116, 117, 118, -1, -1, -1, -1, 3, 4, 5,
7070 -1, 7, -1, -1, -1, 11, 12, -1, -1, -1,
7071 16, -1, 18, 19, 20, 21, 22, 23, 24, -1,
7072 -1, 147, 148, 149, 30, 31, 32, 33, 34, 35,
7073 36, -1, -1, 39, -1, -1, -1, -1, -1, -1,
7074 46, -1, -1, 49, 50, 51, 52, 53, 54, 55,
7075 56, 57, -1, 59, 60, 61, 62, 63, 64, 65,
7076 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7077 76, 77, -1, -1, -1, -1, -1, -1, -1, -1,
7078 -1, -1, -1, -1, -1, 91, 92, -1, -1, -1,
7079 -1, -1, -1, 99, -1, -1, 102, 103, 104, 105,
7080 -1, -1, -1, -1, 110, 111, 112, 113, 114, 115,
7081 116, 117, 118, -1, -1, -1, -1, 3, 4, 5,
7082 -1, 7, -1, -1, -1, 11, 12, -1, -1, -1,
7083 16, -1, 18, 19, 20, 21, 22, 23, 24, -1,
7084 -1, 147, 148, 149, 30, 31, 32, 33, 34, 35,
7085 36, -1, -1, 39, -1, -1, -1, -1, -1, -1,
7086 46, -1, -1, 49, 50, 51, 52, 53, 54, 55,
7087 56, 57, -1, 59, 60, 61, 62, 63, 64, 65,
7088 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7089 76, 77, -1, -1, -1, -1, -1, -1, -1, -1,
7090 -1, -1, -1, -1, -1, 91, 92, -1, -1, -1,
7091 -1, -1, -1, 99, -1, -1, 102, 103, 104, 105,
7092 -1, -1, -1, -1, 110, 111, 112, 113, 114, 115,
7093 116, 117, 118, -1, -1, -1, -1, 3, 4, 5,
7094 -1, 7, -1, -1, -1, 11, 12, -1, -1, -1,
7095 16, -1, 18, 19, 20, 21, 22, 23, 24, -1,
7096 -1, 147, 148, 149, 30, 31, 32, 33, 34, 35,
7097 36, -1, -1, 39, -1, -1, -1, -1, -1, -1,
7098 46, -1, -1, 49, 50, 51, 52, 53, 54, 55,
7099 56, 57, -1, 59, 60, 61, 62, 63, 64, 65,
7100 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7101 76, 77, -1, -1, -1, -1, -1, -1, -1, -1,
7102 -1, -1, -1, -1, -1, 91, 92, -1, -1, -1,
7103 -1, -1, -1, 99, -1, -1, 102, 103, 104, 105,
7104 -1, -1, -1, -1, 110, 111, 112, 113, 114, 115,
7105 116, 117, 118, -1, -1, -1, -1, 3, 4, 5,
7106 -1, 7, -1, -1, -1, 11, 12, -1, -1, -1,
7107 16, -1, 18, 19, 20, 21, 22, 23, 24, -1,
7108 -1, 147, 148, 149, 30, 31, 32, 33, 34, 35,
7109 36, -1, -1, 39, -1, -1, -1, -1, -1, -1,
7110 46, -1, -1, 49, 50, 51, 52, 53, 54, 55,
7111 56, 57, -1, 59, 60, 61, 62, 63, 64, 65,
7112 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7113 76, 77, -1, -1, -1, -1, -1, -1, -1, -1,
7114 -1, -1, -1, -1, -1, 91, 92, -1, -1, -1,
7115 -1, -1, -1, 99, -1, -1, 102, 103, 104, 105,
7116 -1, -1, -1, -1, 110, 111, 112, 113, 114, 115,
7117 116, 117, 118, -1, -1, -1, -1, 3, 4, 5,
7118 -1, 7, -1, -1, -1, 11, 12, -1, -1, -1,
7119 16, -1, 18, 19, 20, 21, 22, 23, 24, -1,
7120 -1, 147, 148, 149, 30, 31, 32, 33, 34, 35,
7121 36, -1, -1, 39, -1, -1, -1, -1, -1, -1,
7122 46, -1, -1, 49, 50, 51, 52, 53, 54, 55,
7123 56, 57, -1, 59, 60, 61, 62, 63, 64, 65,
7124 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7125 76, 77, -1, -1, -1, -1, -1, -1, -1, -1,
7126 -1, -1, -1, -1, -1, 91, 92, -1, -1, -1,
7127 -1, -1, -1, 99, -1, -1, 102, 103, 104, 105,
7128 -1, -1, -1, -1, 110, 111, 112, 113, 114, 115,
7129 116, 117, 118, -1, -1, -1, -1, 3, 4, 5,
7130 -1, 7, -1, -1, -1, 11, 12, -1, -1, -1,
7131 16, -1, 18, 19, 20, 21, 22, 23, 24, -1,
7132 -1, 147, 148, 149, 30, 31, 32, 33, 34, 35,
7133 36, -1, -1, 39, -1, -1, -1, -1, -1, -1,
7134 46, -1, -1, 49, 50, 51, 52, 53, 54, 55,
7135 56, 57, -1, 59, 60, 61, 62, 63, 64, 65,
7136 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7137 76, 77, -1, -1, -1, -1, -1, -1, -1, -1,
7138 -1, -1, -1, -1, -1, 91, 92, -1, -1, -1,
7139 -1, -1, -1, 99, -1, -1, 102, 103, 104, 105,
7140 -1, -1, -1, -1, 110, 111, 112, 113, 114, 115,
7141 116, 117, 118, -1, -1, -1, -1, 3, 4, 5,
7142 -1, 7, -1, -1, -1, 11, 12, -1, -1, -1,
7143 16, -1, 18, 19, 20, 21, 22, 23, 24, -1,
7144 -1, 147, 148, 149, 30, 31, 32, 33, 34, 35,
7145 36, -1, -1, 39, -1, -1, -1, -1, -1, -1,
7146 46, -1, -1, 49, 50, 51, 52, 53, 54, 55,
7147 56, 57, -1, 59, 60, 61, 62, 63, 64, 65,
7148 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7149 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7150 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7151 -1, -1, -1, 99, -1, -1, 102, 103, 104, 105,
7152 -1, 107, -1, -1, 110, 111, 112, 113, 114, 115,
7153 116, 117, 118, -1, -1, 3, 4, 5, -1, 7,
7154 -1, -1, -1, 11, 12, -1, -1, -1, 16, -1,
7155 18, 19, 20, 21, 22, 23, 24, -1, -1, -1,
7156 -1, 147, 30, 31, 32, 33, 34, 35, 36, -1,
7157 -1, 39, -1, -1, -1, -1, -1, -1, 46, -1,
7158 -1, 49, 50, 51, 52, 53, 54, 55, 56, 57,
7159 -1, 59, 60, 61, 62, 63, 64, 65, -1, -1,
7160 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7161 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7162 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7163 -1, 99, -1, -1, 102, 103, 104, 105, -1, 107,
7164 -1, -1, 110, 111, 112, 113, 114, 115, 116, 117,
7165 118, -1, -1, 3, 4, 5, -1, 7, -1, -1,
7166 -1, 11, 12, -1, -1, -1, 16, -1, 18, 19,
7167 20, 21, 22, 23, 24, -1, -1, -1, -1, 147,
7168 30, 31, 32, 33, 34, 35, 36, -1, -1, 39,
7169 -1, -1, -1, -1, -1, -1, 46, -1, -1, 49,
7170 50, 51, 52, 53, 54, 55, 56, 57, -1, 59,
7171 60, 61, 62, 63, 64, 65, -1, -1, -1, -1,
7172 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7173 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7174 -1, -1, -1, -1, -1, 95, -1, -1, -1, 99,
7175 -1, -1, 102, 103, 104, 105, -1, -1, -1, -1,
7176 110, 111, 112, 113, 114, 115, 116, 117, 118, -1,
7177 -1, 3, 4, 5, -1, 7, -1, -1, -1, 11,
7178 12, -1, -1, -1, 16, -1, 18, 19, 20, 21,
7179 22, 23, 24, -1, -1, -1, -1, 147, 30, 31,
7180 32, 33, 34, 35, 36, -1, -1, 39, -1, -1,
7181 -1, -1, -1, -1, 46, -1, -1, 49, 50, 51,
7182 52, 53, 54, 55, 56, 57, -1, 59, 60, 61,
7183 62, 63, 64, 65, -1, -1, -1, -1, -1, -1,
7184 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7185 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7186 -1, -1, -1, -1, -1, -1, -1, 99, -1, -1,
7187 102, 103, 104, 105, -1, -1, -1, -1, 110, 111,
7188 112, 113, 114, 115, 116, 117, 118, -1, -1, 3,
7189 4, 5, -1, 7, -1, -1, -1, 11, 12, -1,
7190 -1, -1, 16, -1, 18, 19, 20, 21, 22, 23,
7191 24, -1, -1, -1, -1, 147, 30, 31, 32, 33,
7192 34, 35, 36, -1, -1, 39, -1, -1, -1, -1,
7193 -1, -1, 46, -1, -1, 49, 50, 51, 52, 53,
7194 54, 55, 56, 57, -1, 59, 60, 61, 62, 63,
7195 64, 65, -1, -1, -1, -1, -1, -1, -1, -1,
7196 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7197 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7198 -1, -1, -1, -1, -1, 99, -1, -1, 102, 103,
7199 104, 105, -1, -1, -1, -1, 110, 111, 112, 113,
7200 114, 115, 116, 117, 118, -1, -1, 3, 4, 5,
7201 -1, 7, -1, -1, -1, 11, 12, -1, -1, -1,
7202 16, -1, 18, 19, 20, 21, 22, 23, 24, -1,
7203 -1, -1, -1, 147, 30, 31, 32, 33, 34, 35,
7204 36, -1, -1, 39, -1, -1, -1, -1, -1, -1,
7205 46, -1, -1, 49, 50, 51, 52, 53, 54, 55,
7206 56, 57, -1, 59, 60, 61, 62, 63, 64, 65,
7207 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7208 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7209 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7210 -1, -1, -1, 99, -1, -1, 102, 103, 104, 105,
7211 -1, -1, -1, -1, 110, 111, 112, 113, 114, 115,
7212 116, 117, 118, -1, -1, 3, 4, 5, -1, 7,
7213 -1, -1, -1, 11, 12, -1, -1, -1, 16, -1,
7214 18, 19, 20, 21, 22, 23, 24, -1, -1, -1,
7215 -1, 147, 30, 31, 32, 33, 34, 35, 36, -1,
7216 -1, 39, -1, -1, -1, -1, -1, -1, 46, -1,
7217 -1, 49, 50, 51, 52, 53, 54, 55, 56, 57,
7218 -1, 59, 60, 61, 62, 63, 64, 65, -1, -1,
7219 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7220 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7221 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7222 -1, 99, -1, -1, 102, 103, 104, 105, 33, 34,
7223 35, 36, 110, 111, 112, 113, 114, 115, 116, 117,
7224 118, -1, -1, -1, 49, 50, 51, 52, -1, -1,
7225 -1, 56, -1, -1, 59, 60, 61, 62, 63, -1,
7226 -1, -1, -1, -1, -1, -1, -1, -1, -1, 147,
7227 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7228 -1, -1, -1, -1, -1, -1, 91, 92, -1, -1,
7229 -1, -1, -1, -1, 99, -1, -1, 102, -1, 104,
7230 105, -1, -1, -1, -1, 110, 111, 112, 113, 114,
7231 115, 116, 117, 118, -1, -1, -1, -1, -1, 52,
7232 53, -1, -1, 56, -1, -1, -1, -1, -1, -1,
7233 -1, -1, -1, -1, -1, 140, -1, -1, -1, -1,
7234 -1, -1, 147, 76, 77, 78, 79, 80, 81, 82,
7235 83, 84, -1, -1, 87, 88, -1, -1, -1, -1,
7236 93, 94, 95, 96, -1, -1, -1, -1, -1, -1,
7237 -1, -1, -1, -1, 107, 108, -1, -1, -1, -1,
7238 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7239 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7240 -1, -1, -1, -1, 137, 138, 139, 140, 141, 142,
7241 143, 144, 145, 146, -1, 148, 149, 52, 53, -1,
7242 -1, 56, -1, 156, -1, -1, -1, -1, -1, -1,
7243 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7244 -1, 76, 77, 78, 79, 80, 81, 82, 83, 84,
7245 -1, -1, 87, 88, -1, -1, -1, -1, 93, 94,
7246 95, 96, -1, -1, -1, -1, -1, -1, -1, -1,
7247 -1, -1, 107, 108, -1, -1, -1, -1, -1, -1,
7248 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7249 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7250 -1, -1, 137, 138, 139, 140, 141, 142, 143, 144,
7251 145, 146, -1, 148, 149, 52, 53, -1, -1, 56,
7252 -1, 156, -1, -1, -1, -1, -1, -1, -1, -1,
7253 -1, -1, -1, -1, -1, -1, -1, -1, -1, 76,
7254 77, 78, 79, 80, 81, 82, 83, 84, -1, -1,
7255 87, 88, -1, -1, -1, -1, 93, 94, 95, 96,
7256 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7257 107, 108, -1, -1, -1, -1, -1, -1, -1, -1,
7258 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7259 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7260 137, 138, 139, 140, 141, 142, 143, 144, 145, 146,
7261 -1, 148, 149, 52, 53, -1, -1, 56, -1, 156,
7262 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7263 -1, -1, -1, -1, -1, -1, -1, 76, 77, 78,
7264 79, 80, 81, 82, 83, 84, -1, -1, 87, 88,
7265 -1, -1, -1, -1, 93, 94, 95, 96, -1, -1,
7266 -1, -1, -1, -1, -1, -1, -1, -1, 107, 108,
7267 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7268 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7269 -1, -1, -1, -1, -1, -1, -1, -1, 137, 138,
7270 139, 140, 141, 142, 143, 144, 145, 146, -1, 148,
7271 149, 52, 53, -1, -1, 56, -1, 156, -1, -1,
7272 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7273 -1, -1, -1, -1, -1, 76, 77, 78, 79, 80,
7274 81, 82, 83, 84, -1, -1, 87, 88, -1, -1,
7275 -1, -1, 93, 94, 95, 96, -1, -1, -1, -1,
7276 -1, -1, -1, -1, -1, -1, 107, 108, -1, -1,
7277 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7278 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7279 -1, -1, -1, -1, -1, -1, 137, 138, 139, 140,
7280 141, 142, 143, 144, 145, 146, -1, 148, 149, 52,
7281 53, -1, -1, 56, -1, 156, -1, -1, -1, -1,
7282 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7283 -1, -1, -1, 76, 77, 78, 79, 80, 81, 82,
7284 83, 84, -1, -1, 87, 88, -1, -1, -1, -1,
7285 93, 94, 95, 96, -1, -1, -1, -1, -1, -1,
7286 -1, -1, -1, -1, 107, 108, -1, -1, -1, -1,
7287 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7288 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7289 -1, -1, -1, -1, 137, 138, 139, 140, 141, 142,
7290 143, 144, 145, 146, -1, 148, 149, 52, 53, -1,
7291 -1, 56, -1, 156, -1, -1, -1, -1, -1, -1,
7292 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7293 -1, 76, 77, 78, 79, 80, 81, 82, 83, 84,
7294 -1, -1, 87, 88, -1, -1, -1, -1, 93, 94,
7295 95, 96, -1, -1, -1, -1, -1, -1, -1, -1,
7296 -1, -1, 107, 108, -1, -1, -1, -1, -1, -1,
7297 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7298 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7299 -1, -1, 137, 138, 139, 140, 141, 142, 143, 144,
7300 145, 146, -1, 148, 149, 52, 53, -1, -1, 56,
7301 -1, 156, -1, -1, -1, -1, -1, -1, -1, -1,
7302 -1, -1, -1, -1, -1, -1, -1, -1, -1, 76,
7303 77, 78, 79, 80, 81, 82, 83, 84, -1, -1,
7304 87, 88, -1, -1, -1, -1, 93, 94, 95, 96,
7305 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7306 107, 108, -1, -1, -1, -1, -1, -1, -1, -1,
7307 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7308 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7309 137, 138, 139, 140, 141, 142, 143, 144, 145, 146,
7310 -1, 148, 149, 52, 53, -1, -1, 56, -1, 156,
7311 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7312 -1, -1, -1, -1, -1, -1, -1, 76, 77, 78,
7313 79, 80, 81, 82, 83, 84, -1, -1, 87, 88,
7314 -1, -1, -1, -1, 93, 94, 95, 96, -1, -1,
7315 -1, -1, -1, -1, -1, -1, -1, -1, 107, 108,
7316 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7317 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7318 -1, -1, -1, -1, -1, -1, -1, -1, 137, 138,
7319 139, 140, 141, 142, 143, 144, 145, 146, -1, 148,
7320 149, 52, 53, -1, -1, 56, -1, 156, -1, -1,
7321 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7322 -1, -1, -1, -1, -1, 76, 77, 78, 79, 80,
7323 81, 82, 83, 84, -1, -1, 87, 88, -1, -1,
7324 -1, -1, 93, 94, 95, 96, -1, -1, -1, -1,
7325 -1, -1, -1, -1, -1, -1, 107, 108, -1, -1,
7326 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7327 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7328 -1, -1, -1, -1, -1, -1, 137, 138, 139, 140,
7329 141, 142, 143, 144, 145, 146, -1, 148, 149, 52,
7330 53, -1, -1, 56, -1, 156, -1, -1, -1, -1,
7331 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7332 -1, -1, -1, 76, 77, 78, 79, 80, 81, 82,
7333 83, 84, -1, -1, 87, 88, -1, -1, -1, -1,
7334 93, 94, 95, 96, -1, -1, -1, -1, -1, -1,
7335 -1, -1, -1, -1, 107, 108, -1, -1, -1, -1,
7336 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7337 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7338 -1, -1, -1, -1, 137, 138, 139, 140, 141, 142,
7339 143, 144, 145, 146, -1, 148, 149, 52, 53, -1,
7340 -1, 56, -1, 156, -1, -1, -1, -1, -1, -1,
7341 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7342 -1, 76, 77, 78, 79, 80, 81, 82, 83, 84,
7343 -1, -1, 87, 88, -1, -1, -1, -1, 93, 94,
7344 95, 96, -1, -1, -1, -1, -1, -1, -1, -1,
7345 -1, -1, 107, 108, -1, -1, -1, -1, -1, -1,
7346 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7347 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7348 -1, -1, 137, 138, 139, 140, 141, 142, 143, 144,
7349 145, 146, -1, 148, 149, 52, 53, -1, -1, 56,
7350 -1, 156, -1, -1, -1, -1, -1, -1, -1, -1,
7351 -1, -1, -1, -1, -1, -1, -1, -1, -1, 76,
7352 77, 78, 79, 80, 81, 82, 83, 84, -1, -1,
7353 87, 88, -1, -1, -1, -1, 93, 94, 95, 96,
7354 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7355 107, 108, -1, -1, -1, -1, -1, -1, -1, -1,
7356 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7357 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7358 137, 138, 139, 140, 141, 142, 143, 144, 145, 146,
7359 -1, 148, 149, 52, 53, -1, -1, 56, -1, 156,
7360 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7361 -1, -1, -1, -1, -1, -1, -1, 76, 77, 78,
7362 79, 80, 81, 82, 83, 84, -1, -1, 87, 88,
7363 -1, -1, -1, -1, 93, 94, 95, 96, -1, -1,
7364 -1, -1, -1, -1, -1, -1, -1, -1, 107, 108,
7365 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7366 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7367 -1, -1, -1, -1, -1, -1, -1, -1, 137, 138,
7368 139, 140, 141, 142, 143, 144, 145, 146, -1, 148,
7369 149, -1, -1, -1, -1, -1, -1, 156
7370};
7371
7372/* YYSTOS[STATE-NUM] -- The symbol kind of the accessing symbol of
7373 state STATE-NUM. */
7374static const yytype_int16 yystos[] =
7375{
7376 0, 165, 166, 1, 3, 4, 5, 6, 7, 11,
7377 12, 16, 18, 19, 20, 21, 22, 23, 24, 30,
7378 31, 32, 33, 34, 35, 36, 39, 45, 46, 47,
7379 48, 49, 50, 51, 52, 53, 54, 55, 56, 57,
7380 59, 60, 61, 62, 63, 64, 65, 76, 77, 91,
7381 92, 99, 102, 103, 104, 105, 107, 110, 111, 112,
7382 113, 114, 115, 116, 117, 118, 147, 148, 149, 164,
7383 167, 168, 180, 182, 183, 184, 185, 186, 187, 191,
7384 195, 197, 203, 206, 208, 209, 210, 212, 214, 215,
7385 216, 217, 226, 227, 228, 229, 230, 231, 234, 255,
7386 267, 268, 269, 270, 271, 272, 273, 274, 275, 276,
7387 277, 278, 287, 288, 321, 326, 327, 376, 377, 378,
7388 379, 380, 381, 383, 384, 387, 388, 390, 391, 392,
7389 393, 406, 407, 409, 410, 411, 412, 413, 414, 415,
7390 416, 417, 465, 0, 3, 4, 5, 6, 7, 8,
7391 9, 10, 11, 12, 13, 14, 15, 16, 17, 18,
7392 19, 20, 21, 22, 23, 24, 25, 26, 30, 31,
7393 32, 33, 34, 35, 36, 37, 38, 39, 45, 46,
7394 47, 48, 49, 50, 51, 52, 53, 56, 76, 77,
7395 78, 79, 80, 81, 82, 83, 84, 87, 88, 93,
7396 94, 95, 96, 107, 108, 137, 138, 139, 140, 141,
7397 142, 143, 144, 145, 146, 148, 149, 156, 220, 221,
7398 222, 224, 225, 406, 179, 179, 179, 39, 58, 99,
7399 102, 107, 108, 109, 112, 148, 195, 197, 209, 217,
7400 227, 238, 239, 245, 246, 249, 251, 252, 268, 413,
7401 414, 416, 417, 452, 453, 246, 157, 242, 247, 248,
7402 154, 157, 189, 54, 221, 189, 151, 169, 170, 235,
7403 465, 21, 22, 32, 208, 227, 268, 287, 288, 227,
7404 227, 227, 56, 47, 102, 171, 176, 177, 182, 211,
7405 212, 465, 171, 240, 251, 452, 465, 239, 451, 452,
7406 465, 46, 99, 147, 155, 195, 197, 216, 255, 268,
7407 413, 414, 417, 319, 220, 396, 408, 412, 396, 397,
7408 398, 161, 382, 382, 382, 382, 411, 203, 227, 227,
7409 154, 160, 163, 463, 464, 179, 40, 41, 42, 43,
7410 44, 37, 38, 157, 420, 421, 422, 423, 465, 420,
7411 422, 26, 151, 242, 248, 279, 328, 28, 280, 325,
7412 134, 155, 102, 107, 214, 134, 25, 78, 79, 80,
7413 81, 82, 83, 84, 85, 86, 87, 88, 89, 90,
7414 95, 96, 101, 135, 137, 138, 139, 140, 141, 142,
7415 143, 144, 145, 146, 233, 233, 69, 97, 98, 153,
7416 457, 458, 256, 1, 191, 198, 199, 199, 200, 202,
7417 202, 163, 199, 464, 99, 210, 217, 268, 293, 413,
7418 414, 417, 52, 56, 95, 99, 218, 219, 268, 413,
7419 414, 417, 219, 33, 34, 35, 36, 49, 50, 51,
7420 52, 56, 157, 194, 220, 415, 447, 448, 449, 246,
7421 157, 248, 98, 457, 458, 328, 379, 100, 100, 155,
7422 239, 56, 239, 239, 239, 396, 420, 420, 134, 101,
7423 155, 250, 465, 98, 153, 457, 100, 100, 155, 250,
7424 92, 244, 246, 251, 432, 452, 465, 246, 189, 191,
7425 459, 191, 54, 64, 65, 181, 157, 235, 236, 164,
7426 98, 457, 100, 178, 211, 158, 163, 464, 459, 257,
7427 159, 155, 189, 462, 155, 462, 152, 462, 189, 56,
7428 411, 213, 214, 421, 155, 98, 153, 457, 316, 66,
7429 119, 121, 122, 399, 119, 119, 399, 67, 399, 161,
7430 385, 394, 389, 395, 78, 160, 168, 151, 199, 199,
7431 199, 199, 235, 237, 191, 191, 52, 54, 55, 56,
7432 57, 58, 78, 92, 102, 107, 108, 109, 141, 144,
7433 298, 363, 424, 425, 426, 427, 428, 429, 431, 432,
7434 433, 434, 435, 436, 437, 438, 439, 440, 441, 442,
7435 443, 444, 445, 134, 265, 431, 134, 266, 329, 330,
7436 106, 207, 331, 332, 332, 235, 211, 155, 216, 155,
7437 235, 193, 227, 227, 227, 227, 227, 227, 227, 227,
7438 227, 227, 227, 227, 227, 192, 227, 227, 227, 227,
7439 227, 227, 227, 227, 227, 227, 227, 52, 53, 56,
7440 224, 454, 455, 244, 251, 52, 53, 56, 224, 454,
7441 242, 171, 174, 13, 289, 463, 289, 199, 171, 171,
7442 259, 163, 56, 98, 153, 457, 25, 199, 52, 56,
7443 218, 138, 419, 465, 98, 153, 457, 264, 450, 69,
7444 98, 456, 246, 459, 52, 56, 454, 235, 235, 223,
7445 100, 124, 134, 134, 235, 239, 239, 249, 252, 452,
7446 52, 56, 244, 52, 56, 235, 235, 453, 459, 155,
7447 459, 155, 158, 459, 221, 236, 227, 152, 56, 454,
7448 454, 235, 170, 459, 177, 158, 452, 155, 213, 52,
7449 56, 244, 52, 56, 317, 401, 400, 119, 386, 399,
7450 66, 119, 119, 386, 66, 119, 227, 171, 182, 102,
7451 107, 294, 295, 296, 297, 434, 155, 446, 465, 155,
7452 446, 155, 430, 459, 299, 300, 155, 430, 239, 34,
7453 52, 52, 155, 430, 52, 39, 188, 209, 227, 232,
7454 174, 463, 188, 232, 174, 316, 152, 330, 316, 10,
7455 68, 286, 286, 107, 203, 204, 205, 239, 251, 253,
7456 254, 459, 213, 155, 99, 185, 190, 205, 217, 227,
7457 239, 241, 254, 268, 417, 338, 338, 189, 100, 100,
7458 151, 242, 248, 189, 460, 155, 100, 100, 242, 243,
7459 248, 465, 235, 286, 171, 13, 171, 27, 290, 463,
7460 286, 286, 17, 283, 334, 25, 258, 340, 52, 56,
7461 244, 52, 56, 260, 263, 418, 262, 52, 56, 218,
7462 244, 174, 191, 196, 459, 243, 248, 190, 227, 241,
7463 190, 241, 221, 235, 239, 39, 250, 100, 100, 460,
7464 100, 100, 432, 452, 191, 190, 241, 462, 214, 460,
7465 318, 402, 405, 412, 417, 382, 399, 382, 382, 382,
7466 152, 296, 434, 155, 459, 155, 445, 424, 439, 441,
7467 427, 428, 437, 443, 134, 239, 429, 436, 443, 435,
7468 437, 189, 44, 44, 286, 286, 317, 152, 317, 239,
7469 155, 44, 213, 56, 44, 134, 44, 98, 153, 457,
7470 336, 336, 136, 235, 235, 330, 207, 159, 100, 235,
7471 235, 207, 8, 281, 372, 465, 14, 15, 284, 285,
7472 291, 292, 465, 292, 201, 107, 239, 333, 286, 338,
7473 334, 286, 460, 199, 463, 199, 174, 460, 286, 459,
7474 194, 328, 325, 189, 235, 235, 100, 235, 235, 459,
7475 155, 459, 179, 403, 459, 294, 297, 295, 446, 155,
7476 430, 155, 430, 155, 430, 155, 430, 430, 188, 232,
7477 237, 237, 318, 318, 107, 239, 237, 237, 235, 237,
7478 52, 56, 244, 52, 56, 337, 337, 227, 190, 241,
7479 190, 241, 152, 235, 190, 241, 190, 241, 239, 254,
7480 373, 465, 175, 284, 171, 199, 286, 286, 239, 155,
7481 289, 336, 286, 290, 174, 463, 286, 235, 157, 322,
7482 431, 171, 155, 155, 437, 437, 443, 437, 227, 227,
7483 179, 179, 239, 182, 182, 227, 460, 52, 56, 58,
7484 91, 92, 99, 102, 104, 105, 107, 112, 140, 321,
7485 343, 344, 345, 346, 349, 353, 354, 355, 358, 359,
7486 360, 361, 362, 363, 364, 365, 366, 367, 368, 369,
7487 370, 371, 376, 377, 380, 381, 384, 388, 391, 393,
7488 414, 439, 343, 190, 241, 101, 374, 465, 9, 282,
7489 375, 465, 172, 289, 107, 239, 171, 337, 261, 286,
7490 431, 320, 0, 120, 404, 295, 430, 430, 155, 430,
7491 430, 139, 310, 311, 465, 310, 367, 367, 56, 218,
7492 337, 344, 351, 352, 353, 354, 357, 460, 189, 337,
7493 461, 52, 396, 52, 102, 412, 101, 155, 139, 155,
7494 155, 344, 89, 90, 98, 153, 157, 347, 348, 52,
7495 99, 217, 268, 413, 414, 417, 289, 176, 171, 171,
7496 239, 292, 334, 335, 342, 343, 171, 189, 313, 29,
7497 123, 323, 437, 298, 301, 302, 303, 304, 306, 307,
7498 309, 312, 435, 437, 438, 443, 445, 171, 174, 344,
7499 460, 344, 355, 357, 460, 155, 152, 235, 124, 199,
7500 368, 351, 355, 349, 356, 357, 112, 360, 364, 367,
7501 367, 218, 337, 460, 337, 459, 351, 354, 358, 351,
7502 354, 358, 56, 98, 153, 457, 171, 163, 173, 291,
7503 289, 40, 41, 286, 160, 158, 324, 171, 430, 446,
7504 155, 446, 155, 308, 313, 300, 155, 305, 308, 99,
7505 268, 155, 308, 459, 155, 155, 350, 459, 155, 155,
7506 396, 459, 459, 459, 460, 460, 460, 52, 56, 244,
7507 52, 56, 372, 375, 339, 199, 199, 52, 314, 315,
7508 433, 174, 152, 301, 441, 304, 306, 437, 443, 139,
7509 268, 307, 443, 56, 98, 437, 356, 358, 356, 355,
7510 357, 460, 171, 155, 189, 286, 446, 155, 308, 155,
7511 308, 155, 308, 155, 308, 52, 56, 308, 155, 461,
7512 292, 340, 341, 315, 437, 437, 443, 437, 308, 308,
7513 155, 308, 308, 437, 308
7514};
7515
7516/* YYR1[RULE-NUM] -- Symbol kind of the left-hand side of rule RULE-NUM. */
7517static const yytype_int16 yyr1[] =
7518{
7519 0, 162, 165, 163, 163, 164, 166, 167, 167, 167,
7520 168, 168, 169, 170, 171, 172, 173, 174, 175, 174,
7521 176, 176, 176, 177, 178, 177, 179, 180, 181, 182,
7522 182, 182, 182, 182, 182, 182, 182, 182, 182, 182,
7523 182, 182, 183, 182, 182, 182, 182, 182, 184, 185,
7524 186, 186, 186, 186, 186, 186, 186, 186, 185, 187,
7525 187, 185, 188, 188, 189, 189, 188, 190, 190, 190,
7526 191, 191, 191, 191, 191, 192, 191, 193, 191, 191,
7527 194, 195, 196, 197, 198, 199, 199, 200, 201, 202,
7528 203, 203, 204, 205, 206, 206, 207, 208, 208, 208,
7529 209, 209, 209, 209, 209, 209, 209, 209, 209, 209,
7530 209, 209, 210, 210, 211, 211, 212, 212, 212, 213,
7531 213, 212, 212, 212, 212, 212, 212, 212, 214, 214,
7532 215, 215, 216, 216, 216, 216, 216, 216, 216, 216,
7533 216, 217, 217, 217, 217, 217, 217, 217, 217, 217,
7534 218, 218, 219, 219, 219, 220, 220, 220, 220, 220,
7535 221, 221, 222, 223, 222, 224, 224, 224, 224, 224,
7536 224, 224, 224, 224, 224, 224, 224, 224, 224, 224,
7537 224, 224, 224, 224, 224, 224, 224, 224, 224, 224,
7538 224, 224, 224, 224, 224, 225, 225, 225, 225, 225,
7539 225, 225, 225, 225, 225, 225, 225, 225, 225, 225,
7540 225, 225, 225, 225, 225, 225, 225, 225, 225, 225,
7541 225, 225, 225, 225, 225, 225, 225, 225, 225, 225,
7542 225, 225, 225, 225, 225, 225, 226, 227, 228, 228,
7543 228, 228, 228, 228, 228, 228, 227, 229, 229, 229,
7544 229, 229, 229, 227, 227, 227, 227, 227, 227, 227,
7545 227, 227, 227, 227, 227, 227, 227, 227, 227, 227,
7546 227, 227, 227, 227, 227, 227, 227, 227, 227, 227,
7547 230, 230, 227, 227, 227, 231, 232, 232, 232, 233,
7548 233, 233, 233, 234, 234, 235, 236, 237, 238, 239,
7549 240, 240, 240, 240, 241, 241, 242, 242, 242, 243,
7550 243, 244, 244, 244, 244, 244, 245, 246, 246, 246,
7551 246, 246, 247, 248, 249, 249, 250, 250, 251, 251,
7552 251, 251, 252, 252, 253, 253, 254, 254, 254, 255,
7553 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
7554 256, 255, 257, 255, 255, 255, 255, 255, 255, 255,
7555 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
7556 255, 255, 255, 255, 258, 255, 259, 255, 255, 260,
7557 261, 255, 262, 255, 263, 255, 264, 255, 265, 255,
7558 266, 255, 255, 255, 255, 255, 267, 268, 269, 270,
7559 271, 272, 273, 274, 275, 276, 277, 278, 279, 280,
7560 281, 282, 283, 284, 285, 286, 286, 287, 288, 289,
7561 289, 289, 290, 290, 291, 291, 292, 292, 293, 293,
7562 294, 294, 295, 295, 296, 296, 296, 296, 296, 297,
7563 297, 298, 298, 299, 300, 301, 301, 302, 302, 303,
7564 303, 303, 303, 304, 305, 306, 307, 307, 308, 308,
7565 309, 309, 309, 309, 309, 309, 309, 309, 309, 309,
7566 309, 309, 309, 309, 309, 310, 310, 311, 312, 312,
7567 313, 313, 314, 314, 315, 315, 316, 317, 318, 319,
7568 320, 321, 322, 322, 323, 324, 323, 325, 326, 326,
7569 326, 326, 327, 327, 327, 327, 327, 327, 327, 327,
7570 328, 328, 329, 330, 331, 332, 333, 333, 333, 333,
7571 334, 335, 335, 336, 337, 338, 339, 340, 341, 341,
7572 342, 342, 342, 343, 343, 343, 343, 343, 343, 344,
7573 345, 345, 346, 346, 347, 348, 349, 349, 349, 349,
7574 349, 349, 349, 349, 349, 349, 349, 349, 349, 350,
7575 349, 349, 349, 351, 351, 351, 351, 351, 351, 352,
7576 352, 353, 353, 354, 355, 355, 356, 356, 357, 358,
7577 358, 358, 358, 359, 359, 360, 360, 361, 361, 362,
7578 362, 363, 364, 364, 365, 366, 366, 366, 366, 366,
7579 366, 365, 365, 365, 365, 367, 367, 367, 367, 367,
7580 367, 367, 367, 367, 367, 368, 369, 369, 370, 371,
7581 371, 371, 372, 372, 373, 373, 373, 374, 374, 375,
7582 375, 376, 376, 377, 378, 378, 378, 379, 380, 381,
7583 382, 382, 383, 384, 385, 385, 386, 386, 387, 388,
7584 389, 389, 390, 391, 392, 393, 394, 394, 395, 395,
7585 396, 396, 397, 397, 398, 398, 399, 400, 399, 401,
7586 402, 403, 399, 404, 404, 405, 405, 406, 406, 407,
7587 408, 408, 409, 410, 410, 411, 411, 411, 411, 412,
7588 412, 412, 413, 413, 413, 414, 414, 414, 414, 414,
7589 414, 414, 415, 415, 416, 416, 417, 417, 418, 419,
7590 419, 420, 420, 421, 422, 423, 422, 424, 424, 425,
7591 425, 426, 426, 426, 426, 427, 427, 428, 429, 429,
7592 430, 430, 431, 431, 431, 431, 431, 431, 431, 431,
7593 431, 431, 431, 431, 431, 431, 431, 432, 433, 433,
7594 433, 433, 434, 434, 435, 436, 436, 437, 437, 438,
7595 439, 439, 440, 441, 441, 442, 442, 443, 443, 444,
7596 444, 445, 445, 446, 446, 447, 448, 449, 450, 449,
7597 451, 451, 452, 452, 453, 453, 453, 453, 453, 453,
7598 454, 454, 454, 454, 455, 455, 455, 456, 456, 457,
7599 457, 458, 458, 459, 460, 461, 462, 462, 463, 463,
7600 464, 464, 465
7601};
7602
7603/* YYR2[RULE-NUM] -- Number of symbols on the right-hand side of rule RULE-NUM. */
7604static const yytype_int8 yyr2[] =
7605{
7606 0, 2, 0, 0, 1, 2, 2, 1, 1, 3,
7607 1, 2, 1, 3, 2, 0, 0, 8, 0, 5,
7608 1, 1, 3, 1, 0, 3, 0, 2, 0, 4,
7609 3, 3, 3, 2, 3, 3, 3, 3, 4, 5,
7610 1, 4, 4, 1, 7, 4, 1, 1, 4, 1,
7611 4, 7, 6, 6, 6, 6, 5, 4, 1, 4,
7612 4, 1, 1, 4, 0, 1, 3, 1, 4, 1,
7613 1, 3, 3, 3, 2, 0, 7, 0, 7, 1,
7614 1, 2, 0, 5, 1, 1, 1, 0, 0, 4,
7615 1, 1, 1, 1, 1, 4, 3, 1, 1, 1,
7616 2, 3, 4, 5, 4, 5, 6, 2, 2, 2,
7617 2, 2, 1, 3, 1, 3, 1, 2, 3, 1,
7618 3, 5, 2, 4, 2, 4, 1, 3, 1, 3,
7619 2, 3, 1, 1, 4, 3, 3, 3, 3, 2,
7620 1, 1, 1, 4, 3, 3, 3, 3, 2, 1,
7621 1, 1, 2, 1, 3, 1, 1, 1, 1, 1,
7622 1, 1, 1, 0, 4, 1, 1, 1, 1, 1,
7623 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
7624 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
7625 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
7626 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
7627 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
7628 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
7629 1, 1, 1, 1, 1, 1, 4, 1, 4, 7,
7630 6, 6, 6, 6, 5, 4, 1, 3, 3, 2,
7631 2, 2, 2, 1, 3, 3, 3, 3, 3, 3,
7632 4, 2, 2, 3, 3, 3, 3, 1, 3, 3,
7633 3, 3, 3, 2, 2, 3, 3, 3, 3, 4,
7634 4, 4, 1, 1, 1, 6, 1, 4, 3, 1,
7635 1, 1, 1, 3, 3, 1, 1, 1, 1, 1,
7636 1, 2, 4, 2, 1, 4, 3, 5, 3, 1,
7637 1, 1, 1, 2, 4, 2, 1, 1, 2, 2,
7638 4, 1, 0, 2, 2, 1, 2, 1, 1, 1,
7639 3, 3, 2, 1, 1, 1, 3, 4, 2, 1,
7640 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
7641 0, 4, 0, 4, 3, 3, 2, 3, 3, 1,
7642 4, 3, 1, 6, 4, 3, 2, 1, 2, 1,
7643 6, 6, 4, 4, 0, 6, 0, 5, 5, 0,
7644 0, 9, 0, 6, 0, 7, 0, 5, 0, 5,
7645 0, 5, 1, 1, 1, 1, 1, 1, 1, 1,
7646 1, 2, 2, 1, 2, 1, 1, 1, 1, 1,
7647 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
7648 1, 2, 1, 1, 1, 5, 1, 2, 1, 1,
7649 1, 3, 1, 3, 1, 3, 5, 1, 3, 2,
7650 1, 1, 1, 0, 2, 2, 1, 1, 3, 4,
7651 2, 2, 1, 1, 1, 3, 1, 3, 2, 0,
7652 6, 8, 4, 6, 4, 2, 6, 2, 4, 6,
7653 2, 4, 2, 4, 1, 1, 1, 4, 0, 1,
7654 1, 4, 1, 3, 1, 1, 0, 0, 0, 0,
7655 0, 9, 4, 1, 3, 0, 4, 3, 2, 4,
7656 5, 5, 2, 4, 4, 3, 3, 2, 1, 4,
7657 3, 3, 0, 7, 0, 7, 1, 2, 3, 4,
7658 5, 1, 1, 0, 0, 0, 0, 9, 1, 1,
7659 1, 3, 3, 1, 2, 3, 1, 1, 1, 1,
7660 3, 1, 3, 1, 2, 2, 1, 1, 4, 4,
7661 4, 3, 4, 4, 4, 3, 3, 3, 2, 0,
7662 6, 2, 4, 1, 1, 2, 2, 4, 1, 2,
7663 3, 1, 3, 5, 2, 1, 1, 3, 1, 3,
7664 1, 2, 1, 1, 3, 2, 1, 1, 3, 2,
7665 1, 2, 1, 1, 1, 3, 3, 2, 2, 2,
7666 2, 1, 1, 1, 1, 1, 1, 1, 1, 1,
7667 1, 1, 1, 1, 1, 1, 2, 2, 4, 2,
7668 3, 1, 6, 1, 1, 1, 1, 2, 1, 3,
7669 1, 1, 1, 1, 1, 1, 2, 3, 3, 3,
7670 1, 2, 4, 1, 0, 3, 1, 2, 4, 1,
7671 0, 3, 4, 1, 4, 1, 0, 3, 0, 3,
7672 0, 2, 0, 2, 0, 2, 1, 0, 3, 0,
7673 0, 0, 6, 1, 1, 1, 1, 1, 1, 2,
7674 1, 1, 3, 1, 2, 1, 1, 1, 1, 1,
7675 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
7676 1, 1, 1, 1, 1, 1, 1, 1, 0, 4,
7677 1, 1, 1, 3, 1, 0, 3, 2, 1, 1,
7678 3, 4, 2, 2, 1, 1, 1, 3, 1, 3,
7679 2, 0, 6, 8, 4, 6, 4, 6, 2, 4,
7680 6, 2, 4, 2, 4, 1, 0, 1, 1, 1,
7681 1, 1, 1, 1, 1, 1, 3, 1, 3, 1,
7682 1, 1, 1, 2, 1, 1, 1, 2, 1, 1,
7683 1, 2, 1, 2, 1, 1, 1, 1, 0, 4,
7684 1, 2, 1, 3, 3, 2, 1, 4, 2, 1,
7685 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
7686 1, 1, 1, 2, 2, 2, 1, 1, 1, 1,
7687 1, 2, 0
7688};
7689
7690
7691enum { YYENOMEM = -2 };
7692
7693#define yyerrok (yyerrstatus = 0)
7694#define yyclearin (yychar = YYEMPTY)
7695
7696#define YYACCEPT goto yyacceptlab
7697#define YYABORT goto yyabortlab
7698#define YYERROR goto yyerrorlab
7699#define YYNOMEM goto yyexhaustedlab
7700
7701
7702#define YYRECOVERING() (!!yyerrstatus)
7703
7704#define YYBACKUP(Token, Value) \
7705 do \
7706 if (yychar == YYEMPTY) \
7707 { \
7708 yychar = (Token); \
7709 yylval = (Value); \
7710 YYPOPSTACK (yylen); \
7711 yystate = *yyssp; \
7712 goto yybackup; \
7713 } \
7714 else \
7715 { \
7716 yyerror (&yylloc, p, YY_("syntax error: cannot back up")); \
7717 YYERROR; \
7718 } \
7719 while (0)
7720
7721/* Backward compatibility with an undocumented macro.
7722 Use YYerror or YYUNDEF. */
7723#define YYERRCODE YYUNDEF
7724
7725/* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
7726 If N is 0, then set CURRENT to the empty location which ends
7727 the previous symbol: RHS[0] (always defined). */
7728
7729#ifndef YYLLOC_DEFAULT
7730# define YYLLOC_DEFAULT(Current, Rhs, N) \
7731 do \
7732 if (N) \
7733 { \
7734 (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \
7735 (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \
7736 (Current).last_line = YYRHSLOC (Rhs, N).last_line; \
7737 (Current).last_column = YYRHSLOC (Rhs, N).last_column; \
7738 } \
7739 else \
7740 { \
7741 (Current).first_line = (Current).last_line = \
7742 YYRHSLOC (Rhs, 0).last_line; \
7743 (Current).first_column = (Current).last_column = \
7744 YYRHSLOC (Rhs, 0).last_column; \
7745 } \
7746 while (0)
7747#endif
7748
7749#define YYRHSLOC(Rhs, K) ((Rhs)[K])
7750
7751
7752/* Enable debugging if requested. */
7753#if YYDEBUG
7754
7755# ifndef YYFPRINTF
7756# include <stdio.h> /* INFRINGES ON USER NAME SPACE */
7757# define YYFPRINTF fprintf
7758# endif
7759
7760# define YYDPRINTF(Args) \
7761do { \
7762 if (yydebug) \
7763 YYFPRINTF Args; \
7764} while (0)
7765
7766
7767/* YYLOCATION_PRINT -- Print the location on the stream.
7768 This macro was not mandated originally: define only if we know
7769 we won't break user code: when these are the locations we know. */
7770
7771# ifndef YYLOCATION_PRINT
7772
7773# if defined YY_LOCATION_PRINT
7774
7775 /* Temporary convenience wrapper in case some people defined the
7776 undocumented and private YY_LOCATION_PRINT macros. */
7777# define YYLOCATION_PRINT(File, Loc, p) YY_LOCATION_PRINT(File, *(Loc), p)
7778
7779# elif defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL
7780
7781/* Print *YYLOCP on YYO. Private, do not rely on its existence. */
7782
7783YY_ATTRIBUTE_UNUSED
7784static int
7785yy_location_print_ (FILE *yyo, YYLTYPE const * const yylocp)
7786{
7787 int res = 0;
7788 int end_col = 0 != yylocp->last_column ? yylocp->last_column - 1 : 0;
7789 if (0 <= yylocp->first_line)
7790 {
7791 res += YYFPRINTF (yyo, "%d", yylocp->first_line);
7792 if (0 <= yylocp->first_column)
7793 res += YYFPRINTF (yyo, ".%d", yylocp->first_column);
7794 }
7795 if (0 <= yylocp->last_line)
7796 {
7797 if (yylocp->first_line < yylocp->last_line)
7798 {
7799 res += YYFPRINTF (yyo, "-%d", yylocp->last_line);
7800 if (0 <= end_col)
7801 res += YYFPRINTF (yyo, ".%d", end_col);
7802 }
7803 else if (0 <= end_col && yylocp->first_column < end_col)
7804 res += YYFPRINTF (yyo, "-%d", end_col);
7805 }
7806 return res;
7807}
7808
7809# define YYLOCATION_PRINT yy_location_print_
7810
7811 /* Temporary convenience wrapper in case some people defined the
7812 undocumented and private YY_LOCATION_PRINT macros. */
7813# define YY_LOCATION_PRINT(File, Loc, p) YYLOCATION_PRINT(File, &(Loc), p)
7814
7815# else
7816
7817# define YYLOCATION_PRINT(File, Loc, p) ((void) 0)
7818 /* Temporary convenience wrapper in case some people defined the
7819 undocumented and private YY_LOCATION_PRINT macros. */
7820# define YY_LOCATION_PRINT YYLOCATION_PRINT
7821
7822# endif
7823# endif /* !defined YYLOCATION_PRINT */
7824
7825
7826# define YY_SYMBOL_PRINT(Title, Kind, Value, Location, p) \
7827do { \
7828 if (yydebug) \
7829 { \
7830 YYFPRINTF (stderr, "%s ", Title); \
7831 yy_symbol_print (stderr, \
7832 Kind, Value, Location, p); \
7833 YYFPRINTF (stderr, "\n"); \
7834 } \
7835} while (0)
7836
7837
7838/*-----------------------------------.
7839| Print this symbol's value on YYO. |
7840`-----------------------------------*/
7841
7842static void
7843yy_symbol_value_print (FILE *yyo,
7844 yysymbol_kind_t yykind, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp, struct parser_params *p)
7845{
7846 FILE *yyoutput = yyo;
7847 YY_USE (yyoutput);
7848 YY_USE (yylocationp);
7849 YY_USE (p);
7850 if (!yyvaluep)
7851 return;
7852 YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
7853switch (yykind)
7854 {
7855 case YYSYMBOL_keyword_class: /* "'class'" */
7856#line 2626 "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_module: /* "'module'" */
7864#line 2626 "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_def: /* "'def'" */
7872#line 2626 "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_undef: /* "'undef'" */
7880#line 2626 "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_begin: /* "'begin'" */
7888#line 2626 "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_rescue: /* "'rescue'" */
7896#line 2626 "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_ensure: /* "'ensure'" */
7904#line 2626 "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_end: /* "'end'" */
7912#line 2626 "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_if: /* "'if'" */
7920#line 2626 "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_unless: /* "'unless'" */
7928#line 2626 "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_then: /* "'then'" */
7936#line 2626 "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_elsif: /* "'elsif'" */
7944#line 2626 "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_else: /* "'else'" */
7952#line 2626 "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_case: /* "'case'" */
7960#line 2626 "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_when: /* "'when'" */
7968#line 2626 "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_while: /* "'while'" */
7976#line 2626 "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_until: /* "'until'" */
7984#line 2626 "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_for: /* "'for'" */
7992#line 2626 "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_break: /* "'break'" */
8000#line 2626 "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_next: /* "'next'" */
8008#line 2626 "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_redo: /* "'redo'" */
8016#line 2626 "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_retry: /* "'retry'" */
8024#line 2626 "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_in: /* "'in'" */
8032#line 2626 "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_do: /* "'do'" */
8040#line 2626 "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_keyword_do_cond: /* "'do' for condition" */
8048#line 2626 "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_keyword_do_block: /* "'do' for block" */
8056#line 2626 "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_keyword_do_LAMBDA: /* "'do' for lambda" */
8064#line 2626 "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_keyword_return: /* "'return'" */
8072#line 2626 "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_keyword_yield: /* "'yield'" */
8080#line 2626 "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_super: /* "'super'" */
8088#line 2626 "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_self: /* "'self'" */
8096#line 2626 "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_nil: /* "'nil'" */
8104#line 2626 "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_true: /* "'true'" */
8112#line 2626 "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_false: /* "'false'" */
8120#line 2626 "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_and: /* "'and'" */
8128#line 2626 "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_or: /* "'or'" */
8136#line 2626 "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_keyword_not: /* "'not'" */
8144#line 2626 "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_modifier_if: /* "'if' modifier" */
8152#line 2626 "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_modifier_unless: /* "'unless' modifier" */
8160#line 2626 "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_modifier_while: /* "'while' modifier" */
8168#line 2626 "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_modifier_until: /* "'until' modifier" */
8176#line 2626 "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_modifier_rescue: /* "'rescue' modifier" */
8184#line 2626 "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_keyword_alias: /* "'alias'" */
8192#line 2626 "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_keyword_defined: /* "'defined?'" */
8200#line 2626 "parse.y"
8201 {
8202 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8203}
8204#line 8205 "parse.c"
8205 break;
8206
8207 case YYSYMBOL_keyword_BEGIN: /* "'BEGIN'" */
8208#line 2626 "parse.y"
8209 {
8210 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8211}
8212#line 8213 "parse.c"
8213 break;
8214
8215 case YYSYMBOL_keyword_END: /* "'END'" */
8216#line 2626 "parse.y"
8217 {
8218 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8219}
8220#line 8221 "parse.c"
8221 break;
8222
8223 case YYSYMBOL_keyword__LINE__: /* "'__LINE__'" */
8224#line 2626 "parse.y"
8225 {
8226 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8227}
8228#line 8229 "parse.c"
8229 break;
8230
8231 case YYSYMBOL_keyword__FILE__: /* "'__FILE__'" */
8232#line 2626 "parse.y"
8233 {
8234 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8235}
8236#line 8237 "parse.c"
8237 break;
8238
8239 case YYSYMBOL_keyword__ENCODING__: /* "'__ENCODING__'" */
8240#line 2626 "parse.y"
8241 {
8242 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8243}
8244#line 8245 "parse.c"
8245 break;
8246
8247 case YYSYMBOL_tIDENTIFIER: /* "local variable or method" */
8248#line 2626 "parse.y"
8249 {
8250 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8251}
8252#line 8253 "parse.c"
8253 break;
8254
8255 case YYSYMBOL_tFID: /* "method" */
8256#line 2626 "parse.y"
8257 {
8258 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8259}
8260#line 8261 "parse.c"
8261 break;
8262
8263 case YYSYMBOL_tGVAR: /* "global variable" */
8264#line 2626 "parse.y"
8265 {
8266 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8267}
8268#line 8269 "parse.c"
8269 break;
8270
8271 case YYSYMBOL_tIVAR: /* "instance variable" */
8272#line 2626 "parse.y"
8273 {
8274 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8275}
8276#line 8277 "parse.c"
8277 break;
8278
8279 case YYSYMBOL_tCONSTANT: /* "constant" */
8280#line 2626 "parse.y"
8281 {
8282 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8283}
8284#line 8285 "parse.c"
8285 break;
8286
8287 case YYSYMBOL_tCVAR: /* "class variable" */
8288#line 2626 "parse.y"
8289 {
8290 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8291}
8292#line 8293 "parse.c"
8293 break;
8294
8295 case YYSYMBOL_tLABEL: /* "label" */
8296#line 2626 "parse.y"
8297 {
8298 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8299}
8300#line 8301 "parse.c"
8301 break;
8302
8303 case YYSYMBOL_tINTEGER: /* "integer literal" */
8304#line 2629 "parse.y"
8305 {
8306 switch (nd_type(RNODE(((*yyvaluep).node)))) {
8307 case NODE_INTEGER:
8308 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_integer_literal_val(((*yyvaluep).node)));
8309 break;
8310 case NODE_FLOAT:
8311 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_float_literal_val(((*yyvaluep).node)));
8312 break;
8313 case NODE_RATIONAL:
8314 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_rational_literal_val(((*yyvaluep).node)));
8315 break;
8316 case NODE_IMAGINARY:
8317 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_imaginary_literal_val(((*yyvaluep).node)));
8318 break;
8319 default:
8320 break;
8321 }
8322}
8323#line 8324 "parse.c"
8324 break;
8325
8326 case YYSYMBOL_tFLOAT: /* "float literal" */
8327#line 2629 "parse.y"
8328 {
8329 switch (nd_type(RNODE(((*yyvaluep).node)))) {
8330 case NODE_INTEGER:
8331 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_integer_literal_val(((*yyvaluep).node)));
8332 break;
8333 case NODE_FLOAT:
8334 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_float_literal_val(((*yyvaluep).node)));
8335 break;
8336 case NODE_RATIONAL:
8337 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_rational_literal_val(((*yyvaluep).node)));
8338 break;
8339 case NODE_IMAGINARY:
8340 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_imaginary_literal_val(((*yyvaluep).node)));
8341 break;
8342 default:
8343 break;
8344 }
8345}
8346#line 8347 "parse.c"
8347 break;
8348
8349 case YYSYMBOL_tRATIONAL: /* "rational literal" */
8350#line 2629 "parse.y"
8351 {
8352 switch (nd_type(RNODE(((*yyvaluep).node)))) {
8353 case NODE_INTEGER:
8354 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_integer_literal_val(((*yyvaluep).node)));
8355 break;
8356 case NODE_FLOAT:
8357 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_float_literal_val(((*yyvaluep).node)));
8358 break;
8359 case NODE_RATIONAL:
8360 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_rational_literal_val(((*yyvaluep).node)));
8361 break;
8362 case NODE_IMAGINARY:
8363 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_imaginary_literal_val(((*yyvaluep).node)));
8364 break;
8365 default:
8366 break;
8367 }
8368}
8369#line 8370 "parse.c"
8370 break;
8371
8372 case YYSYMBOL_tIMAGINARY: /* "imaginary literal" */
8373#line 2629 "parse.y"
8374 {
8375 switch (nd_type(RNODE(((*yyvaluep).node)))) {
8376 case NODE_INTEGER:
8377 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_integer_literal_val(((*yyvaluep).node)));
8378 break;
8379 case NODE_FLOAT:
8380 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_float_literal_val(((*yyvaluep).node)));
8381 break;
8382 case NODE_RATIONAL:
8383 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_rational_literal_val(((*yyvaluep).node)));
8384 break;
8385 case NODE_IMAGINARY:
8386 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_imaginary_literal_val(((*yyvaluep).node)));
8387 break;
8388 default:
8389 break;
8390 }
8391}
8392#line 8393 "parse.c"
8393 break;
8394
8395 case YYSYMBOL_tCHAR: /* "char literal" */
8396#line 2629 "parse.y"
8397 {
8398 switch (nd_type(RNODE(((*yyvaluep).node)))) {
8399 case NODE_INTEGER:
8400 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_integer_literal_val(((*yyvaluep).node)));
8401 break;
8402 case NODE_FLOAT:
8403 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_float_literal_val(((*yyvaluep).node)));
8404 break;
8405 case NODE_RATIONAL:
8406 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_rational_literal_val(((*yyvaluep).node)));
8407 break;
8408 case NODE_IMAGINARY:
8409 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_imaginary_literal_val(((*yyvaluep).node)));
8410 break;
8411 default:
8412 break;
8413 }
8414}
8415#line 8416 "parse.c"
8416 break;
8417
8418 case YYSYMBOL_tNTH_REF: /* "numbered reference" */
8419#line 2647 "parse.y"
8420 {
8421 rb_parser_printf(p, "$%ld", RNODE_NTH_REF(((*yyvaluep).node))->nd_nth);
8422}
8423#line 8424 "parse.c"
8424 break;
8425
8426 case YYSYMBOL_tBACK_REF: /* "back reference" */
8427#line 2650 "parse.y"
8428 {
8429 rb_parser_printf(p, "$%c", (int)RNODE_BACK_REF(((*yyvaluep).node))->nd_nth);
8430}
8431#line 8432 "parse.c"
8432 break;
8433
8434 case YYSYMBOL_tSTRING_CONTENT: /* "literal content" */
8435#line 2629 "parse.y"
8436 {
8437 switch (nd_type(RNODE(((*yyvaluep).node)))) {
8438 case NODE_INTEGER:
8439 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_integer_literal_val(((*yyvaluep).node)));
8440 break;
8441 case NODE_FLOAT:
8442 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_float_literal_val(((*yyvaluep).node)));
8443 break;
8444 case NODE_RATIONAL:
8445 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_rational_literal_val(((*yyvaluep).node)));
8446 break;
8447 case NODE_IMAGINARY:
8448 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_imaginary_literal_val(((*yyvaluep).node)));
8449 break;
8450 default:
8451 break;
8452 }
8453}
8454#line 8455 "parse.c"
8455 break;
8456
8457 case YYSYMBOL_69_: /* '.' */
8458#line 2626 "parse.y"
8459 {
8460 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8461}
8462#line 8463 "parse.c"
8463 break;
8464
8465 case YYSYMBOL_70_backslash_: /* "backslash" */
8466#line 2626 "parse.y"
8467 {
8468 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8469}
8470#line 8471 "parse.c"
8471 break;
8472
8473 case YYSYMBOL_72_escaped_horizontal_tab_: /* "escaped horizontal tab" */
8474#line 2626 "parse.y"
8475 {
8476 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8477}
8478#line 8479 "parse.c"
8479 break;
8480
8481 case YYSYMBOL_73_escaped_form_feed_: /* "escaped form feed" */
8482#line 2626 "parse.y"
8483 {
8484 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8485}
8486#line 8487 "parse.c"
8487 break;
8488
8489 case YYSYMBOL_74_escaped_carriage_return_: /* "escaped carriage return" */
8490#line 2626 "parse.y"
8491 {
8492 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8493}
8494#line 8495 "parse.c"
8495 break;
8496
8497 case YYSYMBOL_75_escaped_vertical_tab_: /* "escaped vertical tab" */
8498#line 2626 "parse.y"
8499 {
8500 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8501}
8502#line 8503 "parse.c"
8503 break;
8504
8505 case YYSYMBOL_tANDDOT: /* "&." */
8506#line 2626 "parse.y"
8507 {
8508 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8509}
8510#line 8511 "parse.c"
8511 break;
8512
8513 case YYSYMBOL_tCOLON2: /* "::" */
8514#line 2626 "parse.y"
8515 {
8516 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8517}
8518#line 8519 "parse.c"
8519 break;
8520
8521 case YYSYMBOL_tOP_ASGN: /* "operator-assignment" */
8522#line 2626 "parse.y"
8523 {
8524 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8525}
8526#line 8527 "parse.c"
8527 break;
8528
8529 case YYSYMBOL_compstmt_top_stmts: /* compstmt_top_stmts */
8530#line 2617 "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_top_stmts: /* top_stmts */
8543#line 2617 "parse.y"
8544 {
8545 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8546 rb_parser_printf(p, "NODE_SPECIAL");
8547 }
8548 else if (((*yyvaluep).node)) {
8549 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8550 }
8551}
8552#line 8553 "parse.c"
8553 break;
8554
8555 case YYSYMBOL_top_stmt: /* top_stmt */
8556#line 2617 "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_block_open: /* block_open */
8569#line 2617 "parse.y"
8570 {
8571 if ((NODE *)((*yyvaluep).node_exits) == (NODE *)-1) {
8572 rb_parser_printf(p, "NODE_SPECIAL");
8573 }
8574 else if (((*yyvaluep).node_exits)) {
8575 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_exits)))));
8576 }
8577}
8578#line 8579 "parse.c"
8579 break;
8580
8581 case YYSYMBOL_begin_block: /* begin_block */
8582#line 2617 "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_compstmt_stmts: /* compstmt_stmts */
8595#line 2617 "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_bodystmt: /* bodystmt */
8608#line 2617 "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_stmts: /* stmts */
8621#line 2617 "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_stmt_or_begin: /* stmt_or_begin */
8634#line 2617 "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_allow_exits: /* allow_exits */
8647#line 2617 "parse.y"
8648 {
8649 if ((NODE *)((*yyvaluep).node_exits) == (NODE *)-1) {
8650 rb_parser_printf(p, "NODE_SPECIAL");
8651 }
8652 else if (((*yyvaluep).node_exits)) {
8653 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_exits)))));
8654 }
8655}
8656#line 8657 "parse.c"
8657 break;
8658
8659 case YYSYMBOL_stmt: /* stmt */
8660#line 2617 "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_asgn_mrhs: /* asgn_mrhs */
8673#line 2617 "parse.y"
8674 {
8675 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8676 rb_parser_printf(p, "NODE_SPECIAL");
8677 }
8678 else if (((*yyvaluep).node)) {
8679 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8680 }
8681}
8682#line 8683 "parse.c"
8683 break;
8684
8685 case YYSYMBOL_asgn_command_rhs: /* asgn_command_rhs */
8686#line 2617 "parse.y"
8687 {
8688 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8689 rb_parser_printf(p, "NODE_SPECIAL");
8690 }
8691 else if (((*yyvaluep).node)) {
8692 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8693 }
8694}
8695#line 8696 "parse.c"
8696 break;
8697
8698 case YYSYMBOL_command_asgn: /* command_asgn */
8699#line 2617 "parse.y"
8700 {
8701 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8702 rb_parser_printf(p, "NODE_SPECIAL");
8703 }
8704 else if (((*yyvaluep).node)) {
8705 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8706 }
8707}
8708#line 8709 "parse.c"
8709 break;
8710
8711 case YYSYMBOL_op_asgn_command_rhs: /* op_asgn_command_rhs */
8712#line 2617 "parse.y"
8713 {
8714 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8715 rb_parser_printf(p, "NODE_SPECIAL");
8716 }
8717 else if (((*yyvaluep).node)) {
8718 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8719 }
8720}
8721#line 8722 "parse.c"
8722 break;
8723
8724 case YYSYMBOL_def_endless_method_endless_command: /* def_endless_method_endless_command */
8725#line 2617 "parse.y"
8726 {
8727 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8728 rb_parser_printf(p, "NODE_SPECIAL");
8729 }
8730 else if (((*yyvaluep).node)) {
8731 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8732 }
8733}
8734#line 8735 "parse.c"
8735 break;
8736
8737 case YYSYMBOL_endless_command: /* endless_command */
8738#line 2617 "parse.y"
8739 {
8740 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8741 rb_parser_printf(p, "NODE_SPECIAL");
8742 }
8743 else if (((*yyvaluep).node)) {
8744 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8745 }
8746}
8747#line 8748 "parse.c"
8748 break;
8749
8750 case YYSYMBOL_command_rhs: /* command_rhs */
8751#line 2617 "parse.y"
8752 {
8753 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8754 rb_parser_printf(p, "NODE_SPECIAL");
8755 }
8756 else if (((*yyvaluep).node)) {
8757 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8758 }
8759}
8760#line 8761 "parse.c"
8761 break;
8762
8763 case YYSYMBOL_expr: /* expr */
8764#line 2617 "parse.y"
8765 {
8766 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8767 rb_parser_printf(p, "NODE_SPECIAL");
8768 }
8769 else if (((*yyvaluep).node)) {
8770 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8771 }
8772}
8773#line 8774 "parse.c"
8774 break;
8775
8776 case YYSYMBOL_def_name: /* def_name */
8777#line 2626 "parse.y"
8778 {
8779 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8780}
8781#line 8782 "parse.c"
8782 break;
8783
8784 case YYSYMBOL_defn_head: /* defn_head */
8785#line 2617 "parse.y"
8786 {
8787 if ((NODE *)((*yyvaluep).node_def_temp) == (NODE *)-1) {
8788 rb_parser_printf(p, "NODE_SPECIAL");
8789 }
8790 else if (((*yyvaluep).node_def_temp)) {
8791 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_def_temp)))));
8792 }
8793}
8794#line 8795 "parse.c"
8795 break;
8796
8797 case YYSYMBOL_defs_head: /* defs_head */
8798#line 2617 "parse.y"
8799 {
8800 if ((NODE *)((*yyvaluep).node_def_temp) == (NODE *)-1) {
8801 rb_parser_printf(p, "NODE_SPECIAL");
8802 }
8803 else if (((*yyvaluep).node_def_temp)) {
8804 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_def_temp)))));
8805 }
8806}
8807#line 8808 "parse.c"
8808 break;
8809
8810 case YYSYMBOL_value_expr_expr: /* value_expr_expr */
8811#line 2617 "parse.y"
8812 {
8813 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8814 rb_parser_printf(p, "NODE_SPECIAL");
8815 }
8816 else if (((*yyvaluep).node)) {
8817 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8818 }
8819}
8820#line 8821 "parse.c"
8821 break;
8822
8823 case YYSYMBOL_expr_value: /* expr_value */
8824#line 2617 "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_expr_value_do: /* expr_value_do */
8837#line 2617 "parse.y"
8838 {
8839 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8840 rb_parser_printf(p, "NODE_SPECIAL");
8841 }
8842 else if (((*yyvaluep).node)) {
8843 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8844 }
8845}
8846#line 8847 "parse.c"
8847 break;
8848
8849 case YYSYMBOL_command_call: /* command_call */
8850#line 2617 "parse.y"
8851 {
8852 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8853 rb_parser_printf(p, "NODE_SPECIAL");
8854 }
8855 else if (((*yyvaluep).node)) {
8856 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8857 }
8858}
8859#line 8860 "parse.c"
8860 break;
8861
8862 case YYSYMBOL_value_expr_command_call: /* value_expr_command_call */
8863#line 2617 "parse.y"
8864 {
8865 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8866 rb_parser_printf(p, "NODE_SPECIAL");
8867 }
8868 else if (((*yyvaluep).node)) {
8869 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8870 }
8871}
8872#line 8873 "parse.c"
8873 break;
8874
8875 case YYSYMBOL_command_call_value: /* command_call_value */
8876#line 2617 "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_block_command: /* block_command */
8889#line 2617 "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_cmd_brace_block: /* cmd_brace_block */
8902#line 2617 "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_fcall: /* fcall */
8915#line 2617 "parse.y"
8916 {
8917 if ((NODE *)((*yyvaluep).node_fcall) == (NODE *)-1) {
8918 rb_parser_printf(p, "NODE_SPECIAL");
8919 }
8920 else if (((*yyvaluep).node_fcall)) {
8921 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_fcall)))));
8922 }
8923}
8924#line 8925 "parse.c"
8925 break;
8926
8927 case YYSYMBOL_command: /* command */
8928#line 2617 "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_mlhs: /* mlhs */
8941#line 2617 "parse.y"
8942 {
8943 if ((NODE *)((*yyvaluep).node_masgn) == (NODE *)-1) {
8944 rb_parser_printf(p, "NODE_SPECIAL");
8945 }
8946 else if (((*yyvaluep).node_masgn)) {
8947 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_masgn)))));
8948 }
8949}
8950#line 8951 "parse.c"
8951 break;
8952
8953 case YYSYMBOL_mlhs_inner: /* mlhs_inner */
8954#line 2617 "parse.y"
8955 {
8956 if ((NODE *)((*yyvaluep).node_masgn) == (NODE *)-1) {
8957 rb_parser_printf(p, "NODE_SPECIAL");
8958 }
8959 else if (((*yyvaluep).node_masgn)) {
8960 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_masgn)))));
8961 }
8962}
8963#line 8964 "parse.c"
8964 break;
8965
8966 case YYSYMBOL_mlhs_basic: /* mlhs_basic */
8967#line 2617 "parse.y"
8968 {
8969 if ((NODE *)((*yyvaluep).node_masgn) == (NODE *)-1) {
8970 rb_parser_printf(p, "NODE_SPECIAL");
8971 }
8972 else if (((*yyvaluep).node_masgn)) {
8973 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_masgn)))));
8974 }
8975}
8976#line 8977 "parse.c"
8977 break;
8978
8979 case YYSYMBOL_mlhs_mlhs_item: /* mlhs_mlhs_item */
8980#line 2617 "parse.y"
8981 {
8982 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8983 rb_parser_printf(p, "NODE_SPECIAL");
8984 }
8985 else if (((*yyvaluep).node)) {
8986 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8987 }
8988}
8989#line 8990 "parse.c"
8990 break;
8991
8992 case YYSYMBOL_mlhs_item: /* mlhs_item */
8993#line 2617 "parse.y"
8994 {
8995 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8996 rb_parser_printf(p, "NODE_SPECIAL");
8997 }
8998 else if (((*yyvaluep).node)) {
8999 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9000 }
9001}
9002#line 9003 "parse.c"
9003 break;
9004
9005 case YYSYMBOL_mlhs_head: /* mlhs_head */
9006#line 2617 "parse.y"
9007 {
9008 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9009 rb_parser_printf(p, "NODE_SPECIAL");
9010 }
9011 else if (((*yyvaluep).node)) {
9012 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9013 }
9014}
9015#line 9016 "parse.c"
9016 break;
9017
9018 case YYSYMBOL_mlhs_node: /* mlhs_node */
9019#line 2617 "parse.y"
9020 {
9021 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9022 rb_parser_printf(p, "NODE_SPECIAL");
9023 }
9024 else if (((*yyvaluep).node)) {
9025 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9026 }
9027}
9028#line 9029 "parse.c"
9029 break;
9030
9031 case YYSYMBOL_lhs: /* lhs */
9032#line 2617 "parse.y"
9033 {
9034 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9035 rb_parser_printf(p, "NODE_SPECIAL");
9036 }
9037 else if (((*yyvaluep).node)) {
9038 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9039 }
9040}
9041#line 9042 "parse.c"
9042 break;
9043
9044 case YYSYMBOL_cname: /* cname */
9045#line 2626 "parse.y"
9046 {
9047 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
9048}
9049#line 9050 "parse.c"
9050 break;
9051
9052 case YYSYMBOL_cpath: /* cpath */
9053#line 2617 "parse.y"
9054 {
9055 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9056 rb_parser_printf(p, "NODE_SPECIAL");
9057 }
9058 else if (((*yyvaluep).node)) {
9059 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9060 }
9061}
9062#line 9063 "parse.c"
9063 break;
9064
9065 case YYSYMBOL_fname: /* fname */
9066#line 2626 "parse.y"
9067 {
9068 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
9069}
9070#line 9071 "parse.c"
9071 break;
9072
9073 case YYSYMBOL_fitem: /* fitem */
9074#line 2617 "parse.y"
9075 {
9076 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9077 rb_parser_printf(p, "NODE_SPECIAL");
9078 }
9079 else if (((*yyvaluep).node)) {
9080 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9081 }
9082}
9083#line 9084 "parse.c"
9084 break;
9085
9086 case YYSYMBOL_undef_list: /* undef_list */
9087#line 2617 "parse.y"
9088 {
9089 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9090 rb_parser_printf(p, "NODE_SPECIAL");
9091 }
9092 else if (((*yyvaluep).node)) {
9093 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9094 }
9095}
9096#line 9097 "parse.c"
9097 break;
9098
9099 case YYSYMBOL_op: /* op */
9100#line 2626 "parse.y"
9101 {
9102 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
9103}
9104#line 9105 "parse.c"
9105 break;
9106
9107 case YYSYMBOL_reswords: /* reswords */
9108#line 2626 "parse.y"
9109 {
9110 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
9111}
9112#line 9113 "parse.c"
9113 break;
9114
9115 case YYSYMBOL_asgn_arg_rhs: /* asgn_arg_rhs */
9116#line 2617 "parse.y"
9117 {
9118 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9119 rb_parser_printf(p, "NODE_SPECIAL");
9120 }
9121 else if (((*yyvaluep).node)) {
9122 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9123 }
9124}
9125#line 9126 "parse.c"
9126 break;
9127
9128 case YYSYMBOL_arg: /* arg */
9129#line 2617 "parse.y"
9130 {
9131 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9132 rb_parser_printf(p, "NODE_SPECIAL");
9133 }
9134 else if (((*yyvaluep).node)) {
9135 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9136 }
9137}
9138#line 9139 "parse.c"
9139 break;
9140
9141 case YYSYMBOL_op_asgn_arg_rhs: /* op_asgn_arg_rhs */
9142#line 2617 "parse.y"
9143 {
9144 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9145 rb_parser_printf(p, "NODE_SPECIAL");
9146 }
9147 else if (((*yyvaluep).node)) {
9148 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9149 }
9150}
9151#line 9152 "parse.c"
9152 break;
9153
9154 case YYSYMBOL_range_expr_arg: /* range_expr_arg */
9155#line 2617 "parse.y"
9156 {
9157 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9158 rb_parser_printf(p, "NODE_SPECIAL");
9159 }
9160 else if (((*yyvaluep).node)) {
9161 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9162 }
9163}
9164#line 9165 "parse.c"
9165 break;
9166
9167 case YYSYMBOL_def_endless_method_endless_arg: /* def_endless_method_endless_arg */
9168#line 2617 "parse.y"
9169 {
9170 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9171 rb_parser_printf(p, "NODE_SPECIAL");
9172 }
9173 else if (((*yyvaluep).node)) {
9174 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9175 }
9176}
9177#line 9178 "parse.c"
9178 break;
9179
9180 case YYSYMBOL_ternary: /* ternary */
9181#line 2617 "parse.y"
9182 {
9183 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9184 rb_parser_printf(p, "NODE_SPECIAL");
9185 }
9186 else if (((*yyvaluep).node)) {
9187 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9188 }
9189}
9190#line 9191 "parse.c"
9191 break;
9192
9193 case YYSYMBOL_endless_arg: /* endless_arg */
9194#line 2617 "parse.y"
9195 {
9196 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9197 rb_parser_printf(p, "NODE_SPECIAL");
9198 }
9199 else if (((*yyvaluep).node)) {
9200 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9201 }
9202}
9203#line 9204 "parse.c"
9204 break;
9205
9206 case YYSYMBOL_relop: /* relop */
9207#line 2626 "parse.y"
9208 {
9209 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
9210}
9211#line 9212 "parse.c"
9212 break;
9213
9214 case YYSYMBOL_rel_expr: /* rel_expr */
9215#line 2617 "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_value_expr_arg: /* value_expr_arg */
9228#line 2617 "parse.y"
9229 {
9230 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9231 rb_parser_printf(p, "NODE_SPECIAL");
9232 }
9233 else if (((*yyvaluep).node)) {
9234 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9235 }
9236}
9237#line 9238 "parse.c"
9238 break;
9239
9240 case YYSYMBOL_arg_value: /* arg_value */
9241#line 2617 "parse.y"
9242 {
9243 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9244 rb_parser_printf(p, "NODE_SPECIAL");
9245 }
9246 else if (((*yyvaluep).node)) {
9247 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9248 }
9249}
9250#line 9251 "parse.c"
9251 break;
9252
9253 case YYSYMBOL_aref_args: /* aref_args */
9254#line 2617 "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_rhs: /* arg_rhs */
9267#line 2617 "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_paren_args: /* paren_args */
9280#line 2617 "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_opt_paren_args: /* opt_paren_args */
9293#line 2617 "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_opt_call_args: /* opt_call_args */
9306#line 2617 "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_command: /* value_expr_command */
9319#line 2617 "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_call_args: /* call_args */
9332#line 2617 "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_command_args: /* command_args */
9345#line 2617 "parse.y"
9346 {
9347 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9348 rb_parser_printf(p, "NODE_SPECIAL");
9349 }
9350 else if (((*yyvaluep).node)) {
9351 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9352 }
9353}
9354#line 9355 "parse.c"
9355 break;
9356
9357 case YYSYMBOL_block_arg: /* block_arg */
9358#line 2617 "parse.y"
9359 {
9360 if ((NODE *)((*yyvaluep).node_block_pass) == (NODE *)-1) {
9361 rb_parser_printf(p, "NODE_SPECIAL");
9362 }
9363 else if (((*yyvaluep).node_block_pass)) {
9364 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_block_pass)))));
9365 }
9366}
9367#line 9368 "parse.c"
9368 break;
9369
9370 case YYSYMBOL_opt_block_arg: /* opt_block_arg */
9371#line 2617 "parse.y"
9372 {
9373 if ((NODE *)((*yyvaluep).node_block_pass) == (NODE *)-1) {
9374 rb_parser_printf(p, "NODE_SPECIAL");
9375 }
9376 else if (((*yyvaluep).node_block_pass)) {
9377 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_block_pass)))));
9378 }
9379}
9380#line 9381 "parse.c"
9381 break;
9382
9383 case YYSYMBOL_args: /* args */
9384#line 2617 "parse.y"
9385 {
9386 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9387 rb_parser_printf(p, "NODE_SPECIAL");
9388 }
9389 else if (((*yyvaluep).node)) {
9390 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9391 }
9392}
9393#line 9394 "parse.c"
9394 break;
9395
9396 case YYSYMBOL_arg_splat: /* arg_splat */
9397#line 2617 "parse.y"
9398 {
9399 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9400 rb_parser_printf(p, "NODE_SPECIAL");
9401 }
9402 else if (((*yyvaluep).node)) {
9403 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9404 }
9405}
9406#line 9407 "parse.c"
9407 break;
9408
9409 case YYSYMBOL_mrhs_arg: /* mrhs_arg */
9410#line 2617 "parse.y"
9411 {
9412 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9413 rb_parser_printf(p, "NODE_SPECIAL");
9414 }
9415 else if (((*yyvaluep).node)) {
9416 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9417 }
9418}
9419#line 9420 "parse.c"
9420 break;
9421
9422 case YYSYMBOL_mrhs: /* mrhs */
9423#line 2617 "parse.y"
9424 {
9425 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9426 rb_parser_printf(p, "NODE_SPECIAL");
9427 }
9428 else if (((*yyvaluep).node)) {
9429 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9430 }
9431}
9432#line 9433 "parse.c"
9433 break;
9434
9435 case YYSYMBOL_primary: /* primary */
9436#line 2617 "parse.y"
9437 {
9438 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9439 rb_parser_printf(p, "NODE_SPECIAL");
9440 }
9441 else if (((*yyvaluep).node)) {
9442 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9443 }
9444}
9445#line 9446 "parse.c"
9446 break;
9447
9448 case YYSYMBOL_value_expr_primary: /* value_expr_primary */
9449#line 2617 "parse.y"
9450 {
9451 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9452 rb_parser_printf(p, "NODE_SPECIAL");
9453 }
9454 else if (((*yyvaluep).node)) {
9455 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9456 }
9457}
9458#line 9459 "parse.c"
9459 break;
9460
9461 case YYSYMBOL_primary_value: /* primary_value */
9462#line 2617 "parse.y"
9463 {
9464 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9465 rb_parser_printf(p, "NODE_SPECIAL");
9466 }
9467 else if (((*yyvaluep).node)) {
9468 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9469 }
9470}
9471#line 9472 "parse.c"
9472 break;
9473
9474 case YYSYMBOL_k_while: /* k_while */
9475#line 2617 "parse.y"
9476 {
9477 if ((NODE *)((*yyvaluep).node_exits) == (NODE *)-1) {
9478 rb_parser_printf(p, "NODE_SPECIAL");
9479 }
9480 else if (((*yyvaluep).node_exits)) {
9481 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_exits)))));
9482 }
9483}
9484#line 9485 "parse.c"
9485 break;
9486
9487 case YYSYMBOL_k_until: /* k_until */
9488#line 2617 "parse.y"
9489 {
9490 if ((NODE *)((*yyvaluep).node_exits) == (NODE *)-1) {
9491 rb_parser_printf(p, "NODE_SPECIAL");
9492 }
9493 else if (((*yyvaluep).node_exits)) {
9494 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_exits)))));
9495 }
9496}
9497#line 9498 "parse.c"
9498 break;
9499
9500 case YYSYMBOL_k_for: /* k_for */
9501#line 2617 "parse.y"
9502 {
9503 if ((NODE *)((*yyvaluep).node_exits) == (NODE *)-1) {
9504 rb_parser_printf(p, "NODE_SPECIAL");
9505 }
9506 else if (((*yyvaluep).node_exits)) {
9507 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_exits)))));
9508 }
9509}
9510#line 9511 "parse.c"
9511 break;
9512
9513 case YYSYMBOL_k_def: /* k_def */
9514#line 2617 "parse.y"
9515 {
9516 if ((NODE *)((*yyvaluep).node_def_temp) == (NODE *)-1) {
9517 rb_parser_printf(p, "NODE_SPECIAL");
9518 }
9519 else if (((*yyvaluep).node_def_temp)) {
9520 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_def_temp)))));
9521 }
9522}
9523#line 9524 "parse.c"
9524 break;
9525
9526 case YYSYMBOL_do: /* do */
9527#line 2626 "parse.y"
9528 {
9529 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
9530}
9531#line 9532 "parse.c"
9532 break;
9533
9534 case YYSYMBOL_if_tail: /* if_tail */
9535#line 2617 "parse.y"
9536 {
9537 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9538 rb_parser_printf(p, "NODE_SPECIAL");
9539 }
9540 else if (((*yyvaluep).node)) {
9541 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9542 }
9543}
9544#line 9545 "parse.c"
9545 break;
9546
9547 case YYSYMBOL_opt_else: /* opt_else */
9548#line 2617 "parse.y"
9549 {
9550 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9551 rb_parser_printf(p, "NODE_SPECIAL");
9552 }
9553 else if (((*yyvaluep).node)) {
9554 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9555 }
9556}
9557#line 9558 "parse.c"
9558 break;
9559
9560 case YYSYMBOL_for_var: /* for_var */
9561#line 2617 "parse.y"
9562 {
9563 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9564 rb_parser_printf(p, "NODE_SPECIAL");
9565 }
9566 else if (((*yyvaluep).node)) {
9567 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9568 }
9569}
9570#line 9571 "parse.c"
9571 break;
9572
9573 case YYSYMBOL_f_marg: /* f_marg */
9574#line 2617 "parse.y"
9575 {
9576 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9577 rb_parser_printf(p, "NODE_SPECIAL");
9578 }
9579 else if (((*yyvaluep).node)) {
9580 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9581 }
9582}
9583#line 9584 "parse.c"
9584 break;
9585
9586 case YYSYMBOL_mlhs_f_marg: /* mlhs_f_marg */
9587#line 2617 "parse.y"
9588 {
9589 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9590 rb_parser_printf(p, "NODE_SPECIAL");
9591 }
9592 else if (((*yyvaluep).node)) {
9593 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9594 }
9595}
9596#line 9597 "parse.c"
9597 break;
9598
9599 case YYSYMBOL_f_margs: /* f_margs */
9600#line 2617 "parse.y"
9601 {
9602 if ((NODE *)((*yyvaluep).node_masgn) == (NODE *)-1) {
9603 rb_parser_printf(p, "NODE_SPECIAL");
9604 }
9605 else if (((*yyvaluep).node_masgn)) {
9606 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_masgn)))));
9607 }
9608}
9609#line 9610 "parse.c"
9610 break;
9611
9612 case YYSYMBOL_f_rest_marg: /* f_rest_marg */
9613#line 2617 "parse.y"
9614 {
9615 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9616 rb_parser_printf(p, "NODE_SPECIAL");
9617 }
9618 else if (((*yyvaluep).node)) {
9619 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9620 }
9621}
9622#line 9623 "parse.c"
9623 break;
9624
9625 case YYSYMBOL_f_any_kwrest: /* f_any_kwrest */
9626#line 2626 "parse.y"
9627 {
9628 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
9629}
9630#line 9631 "parse.c"
9631 break;
9632
9633 case YYSYMBOL_f_kw_primary_value: /* f_kw_primary_value */
9634#line 2617 "parse.y"
9635 {
9636 if ((NODE *)((*yyvaluep).node_kw_arg) == (NODE *)-1) {
9637 rb_parser_printf(p, "NODE_SPECIAL");
9638 }
9639 else if (((*yyvaluep).node_kw_arg)) {
9640 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_kw_arg)))));
9641 }
9642}
9643#line 9644 "parse.c"
9644 break;
9645
9646 case YYSYMBOL_f_kwarg_primary_value: /* f_kwarg_primary_value */
9647#line 2617 "parse.y"
9648 {
9649 if ((NODE *)((*yyvaluep).node_kw_arg) == (NODE *)-1) {
9650 rb_parser_printf(p, "NODE_SPECIAL");
9651 }
9652 else if (((*yyvaluep).node_kw_arg)) {
9653 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_kw_arg)))));
9654 }
9655}
9656#line 9657 "parse.c"
9657 break;
9658
9659 case YYSYMBOL_args_tail_basic_primary_value: /* args_tail_basic_primary_value */
9660#line 2617 "parse.y"
9661 {
9662 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
9663 rb_parser_printf(p, "NODE_SPECIAL");
9664 }
9665 else if (((*yyvaluep).node_args)) {
9666 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
9667 }
9668}
9669#line 9670 "parse.c"
9670 break;
9671
9672 case YYSYMBOL_block_args_tail: /* block_args_tail */
9673#line 2617 "parse.y"
9674 {
9675 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
9676 rb_parser_printf(p, "NODE_SPECIAL");
9677 }
9678 else if (((*yyvaluep).node_args)) {
9679 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
9680 }
9681}
9682#line 9683 "parse.c"
9683 break;
9684
9685 case YYSYMBOL_excessed_comma: /* excessed_comma */
9686#line 2626 "parse.y"
9687 {
9688 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
9689}
9690#line 9691 "parse.c"
9691 break;
9692
9693 case YYSYMBOL_f_opt_primary_value: /* f_opt_primary_value */
9694#line 2617 "parse.y"
9695 {
9696 if ((NODE *)((*yyvaluep).node_opt_arg) == (NODE *)-1) {
9697 rb_parser_printf(p, "NODE_SPECIAL");
9698 }
9699 else if (((*yyvaluep).node_opt_arg)) {
9700 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_opt_arg)))));
9701 }
9702}
9703#line 9704 "parse.c"
9704 break;
9705
9706 case YYSYMBOL_f_opt_arg_primary_value: /* f_opt_arg_primary_value */
9707#line 2617 "parse.y"
9708 {
9709 if ((NODE *)((*yyvaluep).node_opt_arg) == (NODE *)-1) {
9710 rb_parser_printf(p, "NODE_SPECIAL");
9711 }
9712 else if (((*yyvaluep).node_opt_arg)) {
9713 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_opt_arg)))));
9714 }
9715}
9716#line 9717 "parse.c"
9717 break;
9718
9719 case YYSYMBOL_opt_args_tail_block_args_tail: /* opt_args_tail_block_args_tail */
9720#line 2617 "parse.y"
9721 {
9722 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
9723 rb_parser_printf(p, "NODE_SPECIAL");
9724 }
9725 else if (((*yyvaluep).node_args)) {
9726 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
9727 }
9728}
9729#line 9730 "parse.c"
9730 break;
9731
9732 case YYSYMBOL_block_param: /* block_param */
9733#line 2617 "parse.y"
9734 {
9735 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
9736 rb_parser_printf(p, "NODE_SPECIAL");
9737 }
9738 else if (((*yyvaluep).node_args)) {
9739 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
9740 }
9741}
9742#line 9743 "parse.c"
9743 break;
9744
9745 case YYSYMBOL_opt_block_param_def: /* opt_block_param_def */
9746#line 2617 "parse.y"
9747 {
9748 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
9749 rb_parser_printf(p, "NODE_SPECIAL");
9750 }
9751 else if (((*yyvaluep).node_args)) {
9752 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
9753 }
9754}
9755#line 9756 "parse.c"
9756 break;
9757
9758 case YYSYMBOL_block_param_def: /* block_param_def */
9759#line 2617 "parse.y"
9760 {
9761 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
9762 rb_parser_printf(p, "NODE_SPECIAL");
9763 }
9764 else if (((*yyvaluep).node_args)) {
9765 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
9766 }
9767}
9768#line 9769 "parse.c"
9769 break;
9770
9771 case YYSYMBOL_opt_block_param: /* opt_block_param */
9772#line 2617 "parse.y"
9773 {
9774 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
9775 rb_parser_printf(p, "NODE_SPECIAL");
9776 }
9777 else if (((*yyvaluep).node_args)) {
9778 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
9779 }
9780}
9781#line 9782 "parse.c"
9782 break;
9783
9784 case YYSYMBOL_opt_bv_decl: /* opt_bv_decl */
9785#line 2626 "parse.y"
9786 {
9787 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
9788}
9789#line 9790 "parse.c"
9790 break;
9791
9792 case YYSYMBOL_bv_decls: /* bv_decls */
9793#line 2626 "parse.y"
9794 {
9795 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
9796}
9797#line 9798 "parse.c"
9798 break;
9799
9800 case YYSYMBOL_bvar: /* bvar */
9801#line 2626 "parse.y"
9802 {
9803 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
9804}
9805#line 9806 "parse.c"
9806 break;
9807
9808 case YYSYMBOL_numparam: /* numparam */
9809#line 2617 "parse.y"
9810 {
9811 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9812 rb_parser_printf(p, "NODE_SPECIAL");
9813 }
9814 else if (((*yyvaluep).node)) {
9815 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9816 }
9817}
9818#line 9819 "parse.c"
9819 break;
9820
9821 case YYSYMBOL_it_id: /* it_id */
9822#line 2626 "parse.y"
9823 {
9824 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
9825}
9826#line 9827 "parse.c"
9827 break;
9828
9829 case YYSYMBOL_lambda: /* lambda */
9830#line 2617 "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_f_larglist: /* f_larglist */
9843#line 2617 "parse.y"
9844 {
9845 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
9846 rb_parser_printf(p, "NODE_SPECIAL");
9847 }
9848 else if (((*yyvaluep).node_args)) {
9849 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
9850 }
9851}
9852#line 9853 "parse.c"
9853 break;
9854
9855 case YYSYMBOL_do_block: /* do_block */
9856#line 2617 "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_block_call: /* block_call */
9869#line 2617 "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_method_call: /* method_call */
9882#line 2617 "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_brace_block: /* brace_block */
9895#line 2617 "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_brace_body: /* brace_body */
9908#line 2617 "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_do_body: /* do_body */
9921#line 2617 "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_case_args: /* case_args */
9934#line 2617 "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_case_body: /* case_body */
9947#line 2617 "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_cases: /* cases */
9960#line 2617 "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_case_body: /* p_case_body */
9973#line 2617 "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_cases: /* p_cases */
9986#line 2617 "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_top_expr: /* p_top_expr */
9999#line 2617 "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_top_expr_body: /* p_top_expr_body */
10012#line 2617 "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_expr: /* p_expr */
10025#line 2617 "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_as: /* p_as */
10038#line 2617 "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_alt: /* p_alt */
10051#line 2617 "parse.y"
10052 {
10053 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10054 rb_parser_printf(p, "NODE_SPECIAL");
10055 }
10056 else if (((*yyvaluep).node)) {
10057 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10058 }
10059}
10060#line 10061 "parse.c"
10061 break;
10062
10063 case YYSYMBOL_p_expr_basic: /* p_expr_basic */
10064#line 2617 "parse.y"
10065 {
10066 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10067 rb_parser_printf(p, "NODE_SPECIAL");
10068 }
10069 else if (((*yyvaluep).node)) {
10070 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10071 }
10072}
10073#line 10074 "parse.c"
10074 break;
10075
10076 case YYSYMBOL_p_args: /* p_args */
10077#line 2617 "parse.y"
10078 {
10079 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10080 rb_parser_printf(p, "NODE_SPECIAL");
10081 }
10082 else if (((*yyvaluep).node)) {
10083 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10084 }
10085}
10086#line 10087 "parse.c"
10087 break;
10088
10089 case YYSYMBOL_p_args_head: /* p_args_head */
10090#line 2617 "parse.y"
10091 {
10092 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10093 rb_parser_printf(p, "NODE_SPECIAL");
10094 }
10095 else if (((*yyvaluep).node)) {
10096 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10097 }
10098}
10099#line 10100 "parse.c"
10100 break;
10101
10102 case YYSYMBOL_p_args_tail: /* p_args_tail */
10103#line 2617 "parse.y"
10104 {
10105 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10106 rb_parser_printf(p, "NODE_SPECIAL");
10107 }
10108 else if (((*yyvaluep).node)) {
10109 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10110 }
10111}
10112#line 10113 "parse.c"
10113 break;
10114
10115 case YYSYMBOL_p_find: /* p_find */
10116#line 2617 "parse.y"
10117 {
10118 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10119 rb_parser_printf(p, "NODE_SPECIAL");
10120 }
10121 else if (((*yyvaluep).node)) {
10122 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10123 }
10124}
10125#line 10126 "parse.c"
10126 break;
10127
10128 case YYSYMBOL_p_rest: /* p_rest */
10129#line 2617 "parse.y"
10130 {
10131 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10132 rb_parser_printf(p, "NODE_SPECIAL");
10133 }
10134 else if (((*yyvaluep).node)) {
10135 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10136 }
10137}
10138#line 10139 "parse.c"
10139 break;
10140
10141 case YYSYMBOL_p_args_post: /* p_args_post */
10142#line 2617 "parse.y"
10143 {
10144 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10145 rb_parser_printf(p, "NODE_SPECIAL");
10146 }
10147 else if (((*yyvaluep).node)) {
10148 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10149 }
10150}
10151#line 10152 "parse.c"
10152 break;
10153
10154 case YYSYMBOL_p_arg: /* p_arg */
10155#line 2617 "parse.y"
10156 {
10157 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10158 rb_parser_printf(p, "NODE_SPECIAL");
10159 }
10160 else if (((*yyvaluep).node)) {
10161 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10162 }
10163}
10164#line 10165 "parse.c"
10165 break;
10166
10167 case YYSYMBOL_p_kwargs: /* p_kwargs */
10168#line 2617 "parse.y"
10169 {
10170 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10171 rb_parser_printf(p, "NODE_SPECIAL");
10172 }
10173 else if (((*yyvaluep).node)) {
10174 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10175 }
10176}
10177#line 10178 "parse.c"
10178 break;
10179
10180 case YYSYMBOL_p_kwarg: /* p_kwarg */
10181#line 2617 "parse.y"
10182 {
10183 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10184 rb_parser_printf(p, "NODE_SPECIAL");
10185 }
10186 else if (((*yyvaluep).node)) {
10187 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10188 }
10189}
10190#line 10191 "parse.c"
10191 break;
10192
10193 case YYSYMBOL_p_kw: /* p_kw */
10194#line 2617 "parse.y"
10195 {
10196 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10197 rb_parser_printf(p, "NODE_SPECIAL");
10198 }
10199 else if (((*yyvaluep).node)) {
10200 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10201 }
10202}
10203#line 10204 "parse.c"
10204 break;
10205
10206 case YYSYMBOL_p_kw_label: /* p_kw_label */
10207#line 2626 "parse.y"
10208 {
10209 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
10210}
10211#line 10212 "parse.c"
10212 break;
10213
10214 case YYSYMBOL_p_kwrest: /* p_kwrest */
10215#line 2626 "parse.y"
10216 {
10217 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
10218}
10219#line 10220 "parse.c"
10220 break;
10221
10222 case YYSYMBOL_p_kwnorest: /* p_kwnorest */
10223#line 2626 "parse.y"
10224 {
10225 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
10226}
10227#line 10228 "parse.c"
10228 break;
10229
10230 case YYSYMBOL_p_any_kwrest: /* p_any_kwrest */
10231#line 2626 "parse.y"
10232 {
10233 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
10234}
10235#line 10236 "parse.c"
10236 break;
10237
10238 case YYSYMBOL_p_value: /* p_value */
10239#line 2617 "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_range_expr_p_primitive: /* range_expr_p_primitive */
10252#line 2617 "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_p_primitive: /* p_primitive */
10265#line 2617 "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_p_variable: /* p_variable */
10278#line 2617 "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_p_var_ref: /* p_var_ref */
10291#line 2617 "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_p_expr_ref: /* p_expr_ref */
10304#line 2617 "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_p_const: /* p_const */
10317#line 2617 "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_opt_rescue: /* opt_rescue */
10330#line 2617 "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_exc_list: /* exc_list */
10343#line 2617 "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_exc_var: /* exc_var */
10356#line 2617 "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_opt_ensure: /* opt_ensure */
10369#line 2617 "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_literal: /* literal */
10382#line 2617 "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_strings: /* strings */
10395#line 2617 "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_string: /* string */
10408#line 2617 "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_string1: /* string1 */
10421#line 2617 "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_xstring: /* xstring */
10434#line 2617 "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_regexp: /* regexp */
10447#line 2617 "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_words_tWORDS_BEG_word_list: /* words_tWORDS_BEG_word_list */
10460#line 2617 "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_words: /* words */
10473#line 2617 "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_word_list: /* word_list */
10486#line 2617 "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_word: /* word */
10499#line 2617 "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_words_tSYMBOLS_BEG_symbol_list: /* words_tSYMBOLS_BEG_symbol_list */
10512#line 2617 "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_symbols: /* symbols */
10525#line 2617 "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_symbol_list: /* symbol_list */
10538#line 2617 "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_words_tQWORDS_BEG_qword_list: /* words_tQWORDS_BEG_qword_list */
10551#line 2617 "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_qwords: /* qwords */
10564#line 2617 "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_words_tQSYMBOLS_BEG_qsym_list: /* words_tQSYMBOLS_BEG_qsym_list */
10577#line 2617 "parse.y"
10578 {
10579 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10580 rb_parser_printf(p, "NODE_SPECIAL");
10581 }
10582 else if (((*yyvaluep).node)) {
10583 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10584 }
10585}
10586#line 10587 "parse.c"
10587 break;
10588
10589 case YYSYMBOL_qsymbols: /* qsymbols */
10590#line 2617 "parse.y"
10591 {
10592 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10593 rb_parser_printf(p, "NODE_SPECIAL");
10594 }
10595 else if (((*yyvaluep).node)) {
10596 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10597 }
10598}
10599#line 10600 "parse.c"
10600 break;
10601
10602 case YYSYMBOL_qword_list: /* qword_list */
10603#line 2617 "parse.y"
10604 {
10605 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10606 rb_parser_printf(p, "NODE_SPECIAL");
10607 }
10608 else if (((*yyvaluep).node)) {
10609 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10610 }
10611}
10612#line 10613 "parse.c"
10613 break;
10614
10615 case YYSYMBOL_qsym_list: /* qsym_list */
10616#line 2617 "parse.y"
10617 {
10618 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10619 rb_parser_printf(p, "NODE_SPECIAL");
10620 }
10621 else if (((*yyvaluep).node)) {
10622 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10623 }
10624}
10625#line 10626 "parse.c"
10626 break;
10627
10628 case YYSYMBOL_string_contents: /* string_contents */
10629#line 2617 "parse.y"
10630 {
10631 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10632 rb_parser_printf(p, "NODE_SPECIAL");
10633 }
10634 else if (((*yyvaluep).node)) {
10635 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10636 }
10637}
10638#line 10639 "parse.c"
10639 break;
10640
10641 case YYSYMBOL_xstring_contents: /* xstring_contents */
10642#line 2617 "parse.y"
10643 {
10644 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10645 rb_parser_printf(p, "NODE_SPECIAL");
10646 }
10647 else if (((*yyvaluep).node)) {
10648 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10649 }
10650}
10651#line 10652 "parse.c"
10652 break;
10653
10654 case YYSYMBOL_regexp_contents: /* regexp_contents */
10655#line 2617 "parse.y"
10656 {
10657 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10658 rb_parser_printf(p, "NODE_SPECIAL");
10659 }
10660 else if (((*yyvaluep).node)) {
10661 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10662 }
10663}
10664#line 10665 "parse.c"
10665 break;
10666
10667 case YYSYMBOL_string_content: /* string_content */
10668#line 2617 "parse.y"
10669 {
10670 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10671 rb_parser_printf(p, "NODE_SPECIAL");
10672 }
10673 else if (((*yyvaluep).node)) {
10674 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10675 }
10676}
10677#line 10678 "parse.c"
10678 break;
10679
10680 case YYSYMBOL_string_dvar: /* string_dvar */
10681#line 2617 "parse.y"
10682 {
10683 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10684 rb_parser_printf(p, "NODE_SPECIAL");
10685 }
10686 else if (((*yyvaluep).node)) {
10687 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10688 }
10689}
10690#line 10691 "parse.c"
10691 break;
10692
10693 case YYSYMBOL_symbol: /* symbol */
10694#line 2617 "parse.y"
10695 {
10696 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10697 rb_parser_printf(p, "NODE_SPECIAL");
10698 }
10699 else if (((*yyvaluep).node)) {
10700 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10701 }
10702}
10703#line 10704 "parse.c"
10704 break;
10705
10706 case YYSYMBOL_ssym: /* ssym */
10707#line 2617 "parse.y"
10708 {
10709 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10710 rb_parser_printf(p, "NODE_SPECIAL");
10711 }
10712 else if (((*yyvaluep).node)) {
10713 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10714 }
10715}
10716#line 10717 "parse.c"
10717 break;
10718
10719 case YYSYMBOL_sym: /* sym */
10720#line 2626 "parse.y"
10721 {
10722 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
10723}
10724#line 10725 "parse.c"
10725 break;
10726
10727 case YYSYMBOL_dsym: /* dsym */
10728#line 2617 "parse.y"
10729 {
10730 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10731 rb_parser_printf(p, "NODE_SPECIAL");
10732 }
10733 else if (((*yyvaluep).node)) {
10734 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10735 }
10736}
10737#line 10738 "parse.c"
10738 break;
10739
10740 case YYSYMBOL_numeric: /* numeric */
10741#line 2617 "parse.y"
10742 {
10743 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10744 rb_parser_printf(p, "NODE_SPECIAL");
10745 }
10746 else if (((*yyvaluep).node)) {
10747 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10748 }
10749}
10750#line 10751 "parse.c"
10751 break;
10752
10753 case YYSYMBOL_simple_numeric: /* simple_numeric */
10754#line 2617 "parse.y"
10755 {
10756 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10757 rb_parser_printf(p, "NODE_SPECIAL");
10758 }
10759 else if (((*yyvaluep).node)) {
10760 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10761 }
10762}
10763#line 10764 "parse.c"
10764 break;
10765
10766 case YYSYMBOL_nonlocal_var: /* nonlocal_var */
10767#line 2626 "parse.y"
10768 {
10769 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
10770}
10771#line 10772 "parse.c"
10772 break;
10773
10774 case YYSYMBOL_user_variable: /* user_variable */
10775#line 2626 "parse.y"
10776 {
10777 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
10778}
10779#line 10780 "parse.c"
10780 break;
10781
10782 case YYSYMBOL_keyword_variable: /* keyword_variable */
10783#line 2626 "parse.y"
10784 {
10785 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
10786}
10787#line 10788 "parse.c"
10788 break;
10789
10790 case YYSYMBOL_var_ref: /* var_ref */
10791#line 2617 "parse.y"
10792 {
10793 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10794 rb_parser_printf(p, "NODE_SPECIAL");
10795 }
10796 else if (((*yyvaluep).node)) {
10797 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10798 }
10799}
10800#line 10801 "parse.c"
10801 break;
10802
10803 case YYSYMBOL_var_lhs: /* var_lhs */
10804#line 2617 "parse.y"
10805 {
10806 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10807 rb_parser_printf(p, "NODE_SPECIAL");
10808 }
10809 else if (((*yyvaluep).node)) {
10810 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10811 }
10812}
10813#line 10814 "parse.c"
10814 break;
10815
10816 case YYSYMBOL_backref: /* backref */
10817#line 2617 "parse.y"
10818 {
10819 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10820 rb_parser_printf(p, "NODE_SPECIAL");
10821 }
10822 else if (((*yyvaluep).node)) {
10823 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10824 }
10825}
10826#line 10827 "parse.c"
10827 break;
10828
10829 case YYSYMBOL_superclass: /* superclass */
10830#line 2617 "parse.y"
10831 {
10832 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10833 rb_parser_printf(p, "NODE_SPECIAL");
10834 }
10835 else if (((*yyvaluep).node)) {
10836 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10837 }
10838}
10839#line 10840 "parse.c"
10840 break;
10841
10842 case YYSYMBOL_f_opt_paren_args: /* f_opt_paren_args */
10843#line 2617 "parse.y"
10844 {
10845 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
10846 rb_parser_printf(p, "NODE_SPECIAL");
10847 }
10848 else if (((*yyvaluep).node_args)) {
10849 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
10850 }
10851}
10852#line 10853 "parse.c"
10853 break;
10854
10855 case YYSYMBOL_f_paren_args: /* f_paren_args */
10856#line 2617 "parse.y"
10857 {
10858 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
10859 rb_parser_printf(p, "NODE_SPECIAL");
10860 }
10861 else if (((*yyvaluep).node_args)) {
10862 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
10863 }
10864}
10865#line 10866 "parse.c"
10866 break;
10867
10868 case YYSYMBOL_f_arglist: /* f_arglist */
10869#line 2617 "parse.y"
10870 {
10871 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
10872 rb_parser_printf(p, "NODE_SPECIAL");
10873 }
10874 else if (((*yyvaluep).node_args)) {
10875 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
10876 }
10877}
10878#line 10879 "parse.c"
10879 break;
10880
10881 case YYSYMBOL_f_kw_arg_value: /* f_kw_arg_value */
10882#line 2617 "parse.y"
10883 {
10884 if ((NODE *)((*yyvaluep).node_kw_arg) == (NODE *)-1) {
10885 rb_parser_printf(p, "NODE_SPECIAL");
10886 }
10887 else if (((*yyvaluep).node_kw_arg)) {
10888 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_kw_arg)))));
10889 }
10890}
10891#line 10892 "parse.c"
10892 break;
10893
10894 case YYSYMBOL_f_kwarg_arg_value: /* f_kwarg_arg_value */
10895#line 2617 "parse.y"
10896 {
10897 if ((NODE *)((*yyvaluep).node_kw_arg) == (NODE *)-1) {
10898 rb_parser_printf(p, "NODE_SPECIAL");
10899 }
10900 else if (((*yyvaluep).node_kw_arg)) {
10901 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_kw_arg)))));
10902 }
10903}
10904#line 10905 "parse.c"
10905 break;
10906
10907 case YYSYMBOL_args_tail_basic_arg_value: /* args_tail_basic_arg_value */
10908#line 2617 "parse.y"
10909 {
10910 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
10911 rb_parser_printf(p, "NODE_SPECIAL");
10912 }
10913 else if (((*yyvaluep).node_args)) {
10914 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
10915 }
10916}
10917#line 10918 "parse.c"
10918 break;
10919
10920 case YYSYMBOL_args_tail: /* args_tail */
10921#line 2617 "parse.y"
10922 {
10923 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
10924 rb_parser_printf(p, "NODE_SPECIAL");
10925 }
10926 else if (((*yyvaluep).node_args)) {
10927 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
10928 }
10929}
10930#line 10931 "parse.c"
10931 break;
10932
10933 case YYSYMBOL_f_opt_arg_value: /* f_opt_arg_value */
10934#line 2617 "parse.y"
10935 {
10936 if ((NODE *)((*yyvaluep).node_opt_arg) == (NODE *)-1) {
10937 rb_parser_printf(p, "NODE_SPECIAL");
10938 }
10939 else if (((*yyvaluep).node_opt_arg)) {
10940 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_opt_arg)))));
10941 }
10942}
10943#line 10944 "parse.c"
10944 break;
10945
10946 case YYSYMBOL_f_opt_arg_arg_value: /* f_opt_arg_arg_value */
10947#line 2617 "parse.y"
10948 {
10949 if ((NODE *)((*yyvaluep).node_opt_arg) == (NODE *)-1) {
10950 rb_parser_printf(p, "NODE_SPECIAL");
10951 }
10952 else if (((*yyvaluep).node_opt_arg)) {
10953 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_opt_arg)))));
10954 }
10955}
10956#line 10957 "parse.c"
10957 break;
10958
10959 case YYSYMBOL_opt_args_tail_args_tail: /* opt_args_tail_args_tail */
10960#line 2617 "parse.y"
10961 {
10962 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
10963 rb_parser_printf(p, "NODE_SPECIAL");
10964 }
10965 else if (((*yyvaluep).node_args)) {
10966 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
10967 }
10968}
10969#line 10970 "parse.c"
10970 break;
10971
10972 case YYSYMBOL_f_args: /* f_args */
10973#line 2617 "parse.y"
10974 {
10975 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
10976 rb_parser_printf(p, "NODE_SPECIAL");
10977 }
10978 else if (((*yyvaluep).node_args)) {
10979 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
10980 }
10981}
10982#line 10983 "parse.c"
10983 break;
10984
10985 case YYSYMBOL_args_forward: /* args_forward */
10986#line 2626 "parse.y"
10987 {
10988 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
10989}
10990#line 10991 "parse.c"
10991 break;
10992
10993 case YYSYMBOL_f_bad_arg: /* f_bad_arg */
10994#line 2626 "parse.y"
10995 {
10996 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
10997}
10998#line 10999 "parse.c"
10999 break;
11000
11001 case YYSYMBOL_f_norm_arg: /* f_norm_arg */
11002#line 2626 "parse.y"
11003 {
11004 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
11005}
11006#line 11007 "parse.c"
11007 break;
11008
11009 case YYSYMBOL_f_arg_asgn: /* f_arg_asgn */
11010#line 2626 "parse.y"
11011 {
11012 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
11013}
11014#line 11015 "parse.c"
11015 break;
11016
11017 case YYSYMBOL_f_arg_item: /* f_arg_item */
11018#line 2617 "parse.y"
11019 {
11020 if ((NODE *)((*yyvaluep).node_args_aux) == (NODE *)-1) {
11021 rb_parser_printf(p, "NODE_SPECIAL");
11022 }
11023 else if (((*yyvaluep).node_args_aux)) {
11024 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args_aux)))));
11025 }
11026}
11027#line 11028 "parse.c"
11028 break;
11029
11030 case YYSYMBOL_f_arg: /* f_arg */
11031#line 2617 "parse.y"
11032 {
11033 if ((NODE *)((*yyvaluep).node_args_aux) == (NODE *)-1) {
11034 rb_parser_printf(p, "NODE_SPECIAL");
11035 }
11036 else if (((*yyvaluep).node_args_aux)) {
11037 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args_aux)))));
11038 }
11039}
11040#line 11041 "parse.c"
11041 break;
11042
11043 case YYSYMBOL_f_label: /* f_label */
11044#line 2626 "parse.y"
11045 {
11046 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
11047}
11048#line 11049 "parse.c"
11049 break;
11050
11051 case YYSYMBOL_f_no_kwarg: /* f_no_kwarg */
11052#line 2626 "parse.y"
11053 {
11054 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
11055}
11056#line 11057 "parse.c"
11057 break;
11058
11059 case YYSYMBOL_f_kwrest: /* f_kwrest */
11060#line 2626 "parse.y"
11061 {
11062 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
11063}
11064#line 11065 "parse.c"
11065 break;
11066
11067 case YYSYMBOL_f_rest_arg: /* f_rest_arg */
11068#line 2626 "parse.y"
11069 {
11070 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
11071}
11072#line 11073 "parse.c"
11073 break;
11074
11075 case YYSYMBOL_f_block_arg: /* f_block_arg */
11076#line 2626 "parse.y"
11077 {
11078 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
11079}
11080#line 11081 "parse.c"
11081 break;
11082
11083 case YYSYMBOL_opt_f_block_arg: /* opt_f_block_arg */
11084#line 2626 "parse.y"
11085 {
11086 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
11087}
11088#line 11089 "parse.c"
11089 break;
11090
11091 case YYSYMBOL_value_expr_singleton_expr: /* value_expr_singleton_expr */
11092#line 2617 "parse.y"
11093 {
11094 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
11095 rb_parser_printf(p, "NODE_SPECIAL");
11096 }
11097 else if (((*yyvaluep).node)) {
11098 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
11099 }
11100}
11101#line 11102 "parse.c"
11102 break;
11103
11104 case YYSYMBOL_singleton: /* singleton */
11105#line 2617 "parse.y"
11106 {
11107 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
11108 rb_parser_printf(p, "NODE_SPECIAL");
11109 }
11110 else if (((*yyvaluep).node)) {
11111 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
11112 }
11113}
11114#line 11115 "parse.c"
11115 break;
11116
11117 case YYSYMBOL_singleton_expr: /* singleton_expr */
11118#line 2617 "parse.y"
11119 {
11120 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
11121 rb_parser_printf(p, "NODE_SPECIAL");
11122 }
11123 else if (((*yyvaluep).node)) {
11124 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
11125 }
11126}
11127#line 11128 "parse.c"
11128 break;
11129
11130 case YYSYMBOL_assoc_list: /* assoc_list */
11131#line 2617 "parse.y"
11132 {
11133 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
11134 rb_parser_printf(p, "NODE_SPECIAL");
11135 }
11136 else if (((*yyvaluep).node)) {
11137 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
11138 }
11139}
11140#line 11141 "parse.c"
11141 break;
11142
11143 case YYSYMBOL_assocs: /* assocs */
11144#line 2617 "parse.y"
11145 {
11146 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
11147 rb_parser_printf(p, "NODE_SPECIAL");
11148 }
11149 else if (((*yyvaluep).node)) {
11150 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
11151 }
11152}
11153#line 11154 "parse.c"
11154 break;
11155
11156 case YYSYMBOL_assoc: /* assoc */
11157#line 2617 "parse.y"
11158 {
11159 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
11160 rb_parser_printf(p, "NODE_SPECIAL");
11161 }
11162 else if (((*yyvaluep).node)) {
11163 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
11164 }
11165}
11166#line 11167 "parse.c"
11167 break;
11168
11169 case YYSYMBOL_operation2: /* operation2 */
11170#line 2626 "parse.y"
11171 {
11172 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
11173}
11174#line 11175 "parse.c"
11175 break;
11176
11177 case YYSYMBOL_operation3: /* operation3 */
11178#line 2626 "parse.y"
11179 {
11180 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
11181}
11182#line 11183 "parse.c"
11183 break;
11184
11185 case YYSYMBOL_dot_or_colon: /* dot_or_colon */
11186#line 2626 "parse.y"
11187 {
11188 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
11189}
11190#line 11191 "parse.c"
11191 break;
11192
11193 case YYSYMBOL_call_op: /* call_op */
11194#line 2626 "parse.y"
11195 {
11196 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
11197}
11198#line 11199 "parse.c"
11199 break;
11200
11201 case YYSYMBOL_call_op2: /* call_op2 */
11202#line 2626 "parse.y"
11203 {
11204 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
11205}
11206#line 11207 "parse.c"
11207 break;
11208
11209 case YYSYMBOL_none: /* none */
11210#line 2617 "parse.y"
11211 {
11212 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
11213 rb_parser_printf(p, "NODE_SPECIAL");
11214 }
11215 else if (((*yyvaluep).node)) {
11216 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
11217 }
11218}
11219#line 11220 "parse.c"
11220 break;
11221
11222 default:
11223 break;
11224 }
11225 YY_IGNORE_MAYBE_UNINITIALIZED_END
11226}
11227
11228
11229/*---------------------------.
11230| Print this symbol on YYO. |
11231`---------------------------*/
11232
11233static void
11234yy_symbol_print (FILE *yyo,
11235 yysymbol_kind_t yykind, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp, struct parser_params *p)
11236{
11237 YYFPRINTF (yyo, "%s %s (",
11238 yykind < YYNTOKENS ? "token" : "nterm", yysymbol_name (yykind));
11239
11240 YYLOCATION_PRINT (yyo, yylocationp, p);
11241 YYFPRINTF (yyo, ": ");
11242 yy_symbol_value_print (yyo, yykind, yyvaluep, yylocationp, p);
11243 YYFPRINTF (yyo, ")");
11244}
11245
11246/*------------------------------------------------------------------.
11247| yy_stack_print -- Print the state stack from its BOTTOM up to its |
11248| TOP (included). |
11249`------------------------------------------------------------------*/
11250
11251static void
11252yy_stack_print (yy_state_t *yybottom, yy_state_t *yytop, struct parser_params *p)
11253{
11254 YYFPRINTF (stderr, "Stack now");
11255 for (; yybottom <= yytop; yybottom++)
11256 {
11257 int yybot = *yybottom;
11258 YYFPRINTF (stderr, " %d", yybot);
11259 }
11260 YYFPRINTF (stderr, "\n");
11261}
11262
11263# define YY_STACK_PRINT(Bottom, Top, p) \
11264do { \
11265 if (yydebug) \
11266 yy_stack_print ((Bottom), (Top), p); \
11267} while (0)
11268
11269
11270/*------------------------------------------------.
11271| Report that the YYRULE is going to be reduced. |
11272`------------------------------------------------*/
11273
11274static void
11275yy_reduce_print (yy_state_t *yyssp, YYSTYPE *yyvsp, YYLTYPE *yylsp,
11276 int yyrule, struct parser_params *p)
11277{
11278 int yylno = yyrline[yyrule];
11279 int yynrhs = yyr2[yyrule];
11280 int yyi;
11281 YYFPRINTF (stderr, "Reducing stack by rule %d (line %d):\n",
11282 yyrule - 1, yylno);
11283 /* The symbols being reduced. */
11284 for (yyi = 0; yyi < yynrhs; yyi++)
11285 {
11286 YYFPRINTF (stderr, " $%d = ", yyi + 1);
11287 yy_symbol_print (stderr,
11288 YY_ACCESSING_SYMBOL (+yyssp[yyi + 1 - yynrhs]),
11289 &yyvsp[(yyi + 1) - (yynrhs)],
11290 &(yylsp[(yyi + 1) - (yynrhs)]), p);
11291 YYFPRINTF (stderr, "\n");
11292 }
11293}
11294
11295# define YY_REDUCE_PRINT(Rule, p) \
11296do { \
11297 if (yydebug) \
11298 yy_reduce_print (yyssp, yyvsp, yylsp, Rule, p); \
11299} while (0)
11300
11301/* Nonzero means print parse trace. It is left uninitialized so that
11302 multiple parsers can coexist. */
11303#ifndef yydebug
11304int yydebug;
11305#endif
11306#else /* !YYDEBUG */
11307# define YYDPRINTF(Args) ((void) 0)
11308# define YY_SYMBOL_PRINT(Title, Kind, Value, Location, p)
11309# define YY_STACK_PRINT(Bottom, Top, p)
11310# define YY_REDUCE_PRINT(Rule, p)
11311#endif /* !YYDEBUG */
11312
11313
11314/* YYINITDEPTH -- initial size of the parser's stacks. */
11315#ifndef YYINITDEPTH
11316# define YYINITDEPTH 200
11317#endif
11318
11319/* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
11320 if the built-in stack extension method is used).
11321
11322 Do not make this value too large; the results are undefined if
11323 YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
11324 evaluated with infinite-precision integer arithmetic. */
11325
11326#ifndef YYMAXDEPTH
11327# define YYMAXDEPTH 10000
11328#endif
11329
11330
11331/* Context of a parse error. */
11332typedef struct
11333{
11334 yy_state_t *yyssp;
11335 yysymbol_kind_t yytoken;
11336 YYLTYPE *yylloc;
11337} yypcontext_t;
11338
11339/* Put in YYARG at most YYARGN of the expected tokens given the
11340 current YYCTX, and return the number of tokens stored in YYARG. If
11341 YYARG is null, return the number of expected tokens (guaranteed to
11342 be less than YYNTOKENS). Return YYENOMEM on memory exhaustion.
11343 Return 0 if there are more than YYARGN expected tokens, yet fill
11344 YYARG up to YYARGN. */
11345static int
11346yypcontext_expected_tokens (const yypcontext_t *yyctx,
11347 yysymbol_kind_t yyarg[], int yyargn)
11348{
11349 /* Actual size of YYARG. */
11350 int yycount = 0;
11351 int yyn = yypact[+*yyctx->yyssp];
11352 if (!yypact_value_is_default (yyn))
11353 {
11354 /* Start YYX at -YYN if negative to avoid negative indexes in
11355 YYCHECK. In other words, skip the first -YYN actions for
11356 this state because they are default actions. */
11357 int yyxbegin = yyn < 0 ? -yyn : 0;
11358 /* Stay within bounds of both yycheck and yytname. */
11359 int yychecklim = YYLAST - yyn + 1;
11360 int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
11361 int yyx;
11362 for (yyx = yyxbegin; yyx < yyxend; ++yyx)
11363 if (yycheck[yyx + yyn] == yyx && yyx != YYSYMBOL_YYerror
11364 && !yytable_value_is_error (yytable[yyx + yyn]))
11365 {
11366 if (!yyarg)
11367 ++yycount;
11368 else if (yycount == yyargn)
11369 return 0;
11370 else
11371 yyarg[yycount++] = YY_CAST (yysymbol_kind_t, yyx);
11372 }
11373 }
11374 if (yyarg && yycount == 0 && 0 < yyargn)
11375 yyarg[0] = YYSYMBOL_YYEMPTY;
11376 return yycount;
11377}
11378
11379
11380
11381
11382#ifndef yystrlen
11383# if defined __GLIBC__ && defined _STRING_H
11384# define yystrlen(S) (YY_CAST (YYPTRDIFF_T, strlen (S)))
11385# else
11386/* Return the length of YYSTR. */
11387static YYPTRDIFF_T
11388yystrlen (const char *yystr)
11389{
11390 YYPTRDIFF_T yylen;
11391 for (yylen = 0; yystr[yylen]; yylen++)
11392 continue;
11393 return yylen;
11394}
11395# endif
11396#endif
11397
11398#ifndef yystpcpy
11399# if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
11400# define yystpcpy stpcpy
11401# else
11402/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
11403 YYDEST. */
11404static char *
11405yystpcpy (char *yydest, const char *yysrc)
11406{
11407 char *yyd = yydest;
11408 const char *yys = yysrc;
11409
11410 while ((*yyd++ = *yys++) != '\0')
11411 continue;
11412
11413 return yyd - 1;
11414}
11415# endif
11416#endif
11417
11418#ifndef yytnamerr
11419/* Copy to YYRES the contents of YYSTR after stripping away unnecessary
11420 quotes and backslashes, so that it's suitable for yyerror. The
11421 heuristic is that double-quoting is unnecessary unless the string
11422 contains an apostrophe, a comma, or backslash (other than
11423 backslash-backslash). YYSTR is taken from yytname. If YYRES is
11424 null, do not copy; instead, return the length of what the result
11425 would have been. */
11426static YYPTRDIFF_T
11427yytnamerr (char *yyres, const char *yystr)
11428{
11429 if (*yystr == '"')
11430 {
11431 YYPTRDIFF_T yyn = 0;
11432 char const *yyp = yystr;
11433 for (;;)
11434 switch (*++yyp)
11435 {
11436 case '\'':
11437 case ',':
11438 goto do_not_strip_quotes;
11439
11440 case '\\':
11441 if (*++yyp != '\\')
11442 goto do_not_strip_quotes;
11443 else
11444 goto append;
11445
11446 append:
11447 default:
11448 if (yyres)
11449 yyres[yyn] = *yyp;
11450 yyn++;
11451 break;
11452
11453 case '"':
11454 if (yyres)
11455 yyres[yyn] = '\0';
11456 return yyn;
11457 }
11458 do_not_strip_quotes: ;
11459 }
11460
11461 if (yyres)
11462 return yystpcpy (yyres, yystr) - yyres;
11463 else
11464 return yystrlen (yystr);
11465}
11466#endif
11467
11468
11469static int
11470yy_syntax_error_arguments (const yypcontext_t *yyctx,
11471 yysymbol_kind_t yyarg[], int yyargn)
11472{
11473 /* Actual size of YYARG. */
11474 int yycount = 0;
11475 /* There are many possibilities here to consider:
11476 - If this state is a consistent state with a default action, then
11477 the only way this function was invoked is if the default action
11478 is an error action. In that case, don't check for expected
11479 tokens because there are none.
11480 - The only way there can be no lookahead present (in yychar) is if
11481 this state is a consistent state with a default action. Thus,
11482 detecting the absence of a lookahead is sufficient to determine
11483 that there is no unexpected or expected token to report. In that
11484 case, just report a simple "syntax error".
11485 - Don't assume there isn't a lookahead just because this state is a
11486 consistent state with a default action. There might have been a
11487 previous inconsistent state, consistent state with a non-default
11488 action, or user semantic action that manipulated yychar.
11489 - Of course, the expected token list depends on states to have
11490 correct lookahead information, and it depends on the parser not
11491 to perform extra reductions after fetching a lookahead from the
11492 scanner and before detecting a syntax error. Thus, state merging
11493 (from LALR or IELR) and default reductions corrupt the expected
11494 token list. However, the list is correct for canonical LR with
11495 one exception: it will still contain any token that will not be
11496 accepted due to an error action in a later state.
11497 */
11498 if (yyctx->yytoken != YYSYMBOL_YYEMPTY)
11499 {
11500 int yyn;
11501 if (yyarg)
11502 yyarg[yycount] = yyctx->yytoken;
11503 ++yycount;
11504 yyn = yypcontext_expected_tokens (yyctx,
11505 yyarg ? yyarg + 1 : yyarg, yyargn - 1);
11506 if (yyn == YYENOMEM)
11507 return YYENOMEM;
11508 else
11509 yycount += yyn;
11510 }
11511 return yycount;
11512}
11513
11514/* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message
11515 about the unexpected token YYTOKEN for the state stack whose top is
11516 YYSSP.
11517
11518 Return 0 if *YYMSG was successfully written. Return -1 if *YYMSG is
11519 not large enough to hold the message. In that case, also set
11520 *YYMSG_ALLOC to the required number of bytes. Return YYENOMEM if the
11521 required number of bytes is too large to store. */
11522static int
11523yysyntax_error (YYPTRDIFF_T *yymsg_alloc, char **yymsg,
11524 const yypcontext_t *yyctx, struct parser_params *p)
11525{
11526 enum { YYARGS_MAX = 5 };
11527 /* Internationalized format string. */
11528 const char *yyformat = YY_NULLPTR;
11529 /* Arguments of yyformat: reported tokens (one for the "unexpected",
11530 one per "expected"). */
11531 yysymbol_kind_t yyarg[YYARGS_MAX];
11532 /* Cumulated lengths of YYARG. */
11533 YYPTRDIFF_T yysize = 0;
11534
11535 /* Actual size of YYARG. */
11536 int yycount = yy_syntax_error_arguments (yyctx, yyarg, YYARGS_MAX);
11537 if (yycount == YYENOMEM)
11538 return YYENOMEM;
11539
11540 switch (yycount)
11541 {
11542#define YYCASE_(N, S) \
11543 case N: \
11544 yyformat = S; \
11545 break
11546 default: /* Avoid compiler warnings. */
11547 YYCASE_(0, YY_("syntax error"));
11548 YYCASE_(1, YY_("syntax error, unexpected %s"));
11549 YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s"));
11550 YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s"));
11551 YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s"));
11552 YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"));
11553#undef YYCASE_
11554 }
11555
11556 /* Compute error message size. Don't count the "%s"s, but reserve
11557 room for the terminator. */
11558 yysize = yystrlen (yyformat) - 2 * yycount + 1;
11559 {
11560 int yyi;
11561 for (yyi = 0; yyi < yycount; ++yyi)
11562 {
11563 YYPTRDIFF_T yysize1
11564 = yysize + yytnamerr (YY_NULLPTR, yytname[yyarg[yyi]]);
11565 if (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM)
11566 yysize = yysize1;
11567 else
11568 return YYENOMEM;
11569 }
11570 }
11571
11572 if (*yymsg_alloc < yysize)
11573 {
11574 *yymsg_alloc = 2 * yysize;
11575 if (! (yysize <= *yymsg_alloc
11576 && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM))
11577 *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM;
11578 return -1;
11579 }
11580
11581 /* Avoid sprintf, as that infringes on the user's name space.
11582 Don't have undefined behavior even if the translation
11583 produced a string with the wrong number of "%s"s. */
11584 {
11585 char *yyp = *yymsg;
11586 int yyi = 0;
11587 while ((*yyp = *yyformat) != '\0')
11588 if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount)
11589 {
11590 yyp += yytnamerr (yyp, yytname[yyarg[yyi++]]);
11591 yyformat += 2;
11592 }
11593 else
11594 {
11595 ++yyp;
11596 ++yyformat;
11597 }
11598 }
11599 return 0;
11600}
11601
11602
11603/*-----------------------------------------------.
11604| Release the memory associated to this symbol. |
11605`-----------------------------------------------*/
11606
11607static void
11608yydestruct (const char *yymsg,
11609 yysymbol_kind_t yykind, YYSTYPE *yyvaluep, YYLTYPE *yylocationp, struct parser_params *p)
11610{
11611 YY_USE (yyvaluep);
11612 YY_USE (yylocationp);
11613 YY_USE (p);
11614 if (!yymsg)
11615 yymsg = "Deleting";
11616 YY_SYMBOL_PRINT (yymsg, yykind, yyvaluep, yylocationp, p);
11617
11618 YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
11619 switch (yykind)
11620 {
11621 case YYSYMBOL_258_16: /* @16 */
11622#line 2654 "parse.y"
11623 {
11624 if (CASE_LABELS_ENABLED_P(((*yyvaluep).labels))) st_free_table(((*yyvaluep).labels));
11625}
11626#line 11627 "parse.c"
11627 break;
11628
11629 case YYSYMBOL_259_17: /* @17 */
11630#line 2654 "parse.y"
11631 {
11632 if (CASE_LABELS_ENABLED_P(((*yyvaluep).labels))) st_free_table(((*yyvaluep).labels));
11633}
11634#line 11635 "parse.c"
11635 break;
11636
11637 default:
11638 break;
11639 }
11640 YY_IGNORE_MAYBE_UNINITIALIZED_END
11641}
11642
11643
11644
11645
11646
11647
11648/*----------.
11649| yyparse. |
11650`----------*/
11651
11652int
11653yyparse (struct parser_params *p)
11654{
11655/* Lookahead token kind. */
11656int yychar;
11657
11658
11659/* The semantic value of the lookahead symbol. */
11660/* Default value used for initialization, for pacifying older GCCs
11661 or non-GCC compilers. */
11662#ifdef __cplusplus
11663static const YYSTYPE yyval_default = {};
11664(void) yyval_default;
11665#else
11666YY_INITIAL_VALUE (static const YYSTYPE yyval_default;)
11667#endif
11668YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default);
11669
11670/* Location data for the lookahead symbol. */
11671static const YYLTYPE yyloc_default
11672# if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL
11673 = { 1, 1, 1, 1 }
11674# endif
11675;
11676YYLTYPE yylloc = yyloc_default;
11677
11678 /* Number of syntax errors so far. */
11679 int yynerrs = 0;
11680 YY_USE (yynerrs); /* Silence compiler warning. */
11681
11682 yy_state_fast_t yystate = 0;
11683 /* Number of tokens to shift before error messages enabled. */
11684 int yyerrstatus = 0;
11685
11686 /* Refer to the stacks through separate pointers, to allow yyoverflow
11687 to reallocate them elsewhere. */
11688
11689 /* Their size. */
11690 YYPTRDIFF_T yystacksize = YYINITDEPTH;
11691
11692 /* The state stack: array, bottom, top. */
11693 yy_state_t yyssa[YYINITDEPTH];
11694 yy_state_t *yyss = yyssa;
11695 yy_state_t *yyssp = yyss;
11696
11697 /* The semantic value stack: array, bottom, top. */
11698 YYSTYPE yyvsa[YYINITDEPTH];
11699 YYSTYPE *yyvs = yyvsa;
11700 YYSTYPE *yyvsp = yyvs;
11701
11702 /* The location stack: array, bottom, top. */
11703 YYLTYPE yylsa[YYINITDEPTH];
11704 YYLTYPE *yyls = yylsa;
11705 YYLTYPE *yylsp = yyls;
11706
11707 int yyn;
11708 /* The return value of yyparse. */
11709 int yyresult;
11710 /* Lookahead symbol kind. */
11711 yysymbol_kind_t yytoken = YYSYMBOL_YYEMPTY;
11712 /* The variables used to return semantic value and location from the
11713 action routines. */
11714 YYSTYPE yyval;
11715 YYLTYPE yyloc;
11716
11717 /* The locations where the error started and ended. */
11718 YYLTYPE yyerror_range[3];
11719
11720 /* Buffer for error messages, and its allocated size. */
11721 char yymsgbuf[128];
11722 char *yymsg = yymsgbuf;
11723 YYPTRDIFF_T yymsg_alloc = sizeof yymsgbuf;
11724
11725#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N), yylsp -= (N))
11726
11727 /* The number of symbols on the RHS of the reduced rule.
11728 Keep to zero when no symbol should be popped. */
11729 int yylen = 0;
11730
11731 YYDPRINTF ((stderr, "Starting parse\n"));
11732
11733 yychar = YYEMPTY; /* Cause a token to be read. */
11734
11735
11736 /* User initialization code. */
11737#line 2661 "parse.y"
11738 {
11739 RUBY_SET_YYLLOC_OF_NONE(yylloc);
11740}
11741
11742#line 11743 "parse.c"
11743
11744 yylsp[0] = yylloc;
11745 goto yysetstate;
11746
11747
11748/*------------------------------------------------------------.
11749| yynewstate -- push a new state, which is found in yystate. |
11750`------------------------------------------------------------*/
11751yynewstate:
11752 /* In all cases, when you get here, the value and location stacks
11753 have just been pushed. So pushing a state here evens the stacks. */
11754 yyssp++;
11755
11756
11757/*--------------------------------------------------------------------.
11758| yysetstate -- set current state (the top of the stack) to yystate. |
11759`--------------------------------------------------------------------*/
11760yysetstate:
11761 YYDPRINTF ((stderr, "Entering state %d\n", yystate));
11762 YY_ASSERT (0 <= yystate && yystate < YYNSTATES);
11763 YY_IGNORE_USELESS_CAST_BEGIN
11764 *yyssp = YY_CAST (yy_state_t, yystate);
11765 YY_IGNORE_USELESS_CAST_END
11766 YY_STACK_PRINT (yyss, yyssp, p);
11767
11768 if (yyss + yystacksize - 1 <= yyssp)
11769#if !defined yyoverflow && !defined YYSTACK_RELOCATE
11770 YYNOMEM;
11771#else
11772 {
11773 /* Get the current used size of the three stacks, in elements. */
11774 YYPTRDIFF_T yysize = yyssp - yyss + 1;
11775
11776# if defined yyoverflow
11777 {
11778 /* Give user a chance to reallocate the stack. Use copies of
11779 these so that the &'s don't force the real ones into
11780 memory. */
11781 yy_state_t *yyss1 = yyss;
11782 YYSTYPE *yyvs1 = yyvs;
11783 YYLTYPE *yyls1 = yyls;
11784
11785 /* Each stack pointer address is followed by the size of the
11786 data in use in that stack, in bytes. This used to be a
11787 conditional around just the two extra args, but that might
11788 be undefined if yyoverflow is a macro. */
11789 yyoverflow (YY_("memory exhausted"),
11790 &yyss1, yysize * YYSIZEOF (*yyssp),
11791 &yyvs1, yysize * YYSIZEOF (*yyvsp),
11792 &yyls1, yysize * YYSIZEOF (*yylsp),
11793 &yystacksize);
11794 yyss = yyss1;
11795 yyvs = yyvs1;
11796 yyls = yyls1;
11797 }
11798# else /* defined YYSTACK_RELOCATE */
11799 /* Extend the stack our own way. */
11800 if (YYMAXDEPTH <= yystacksize)
11801 YYNOMEM;
11802 yystacksize *= 2;
11803 if (YYMAXDEPTH < yystacksize)
11804 yystacksize = YYMAXDEPTH;
11805
11806 {
11807 yy_state_t *yyss1 = yyss;
11808 union yyalloc *yyptr =
11809 YY_CAST (union yyalloc *,
11810 YYSTACK_ALLOC (YY_CAST (YYSIZE_T, YYSTACK_BYTES (yystacksize))));
11811 if (! yyptr)
11812 YYNOMEM;
11813 YYSTACK_RELOCATE (yyss_alloc, yyss);
11814 YYSTACK_RELOCATE (yyvs_alloc, yyvs);
11815 YYSTACK_RELOCATE (yyls_alloc, yyls);
11816# undef YYSTACK_RELOCATE
11817 if (yyss1 != yyssa)
11818 YYSTACK_FREE (yyss1);
11819 }
11820# endif
11821
11822 yyssp = yyss + yysize - 1;
11823 yyvsp = yyvs + yysize - 1;
11824 yylsp = yyls + yysize - 1;
11825
11826 YY_IGNORE_USELESS_CAST_BEGIN
11827 YYDPRINTF ((stderr, "Stack size increased to %ld\n",
11828 YY_CAST (long, yystacksize)));
11829 YY_IGNORE_USELESS_CAST_END
11830
11831 if (yyss + yystacksize - 1 <= yyssp)
11832 YYABORT;
11833 }
11834#endif /* !defined yyoverflow && !defined YYSTACK_RELOCATE */
11835
11836
11837 if (yystate == YYFINAL)
11838 YYACCEPT;
11839
11840 goto yybackup;
11841
11842
11843/*-----------.
11844| yybackup. |
11845`-----------*/
11846yybackup:
11847 /* Do appropriate processing given the current state. Read a
11848 lookahead token if we need one and don't already have one. */
11849
11850 /* First try to decide what to do without reference to lookahead token. */
11851 yyn = yypact[yystate];
11852 if (yypact_value_is_default (yyn))
11853 goto yydefault;
11854
11855 /* Not known => get a lookahead token if don't already have one. */
11856
11857 /* YYCHAR is either empty, or end-of-input, or a valid lookahead. */
11858 if (yychar == YYEMPTY)
11859 {
11860 YYDPRINTF ((stderr, "Reading a token\n"));
11861 yychar = yylex (&yylval, &yylloc, p);
11862 }
11863
11864 if (yychar <= END_OF_INPUT)
11865 {
11866 yychar = END_OF_INPUT;
11867 yytoken = YYSYMBOL_YYEOF;
11868 YYDPRINTF ((stderr, "Now at end of input.\n"));
11869 }
11870 else if (yychar == YYerror)
11871 {
11872 /* The scanner already issued an error message, process directly
11873 to error recovery. But do not keep the error token as
11874 lookahead, it is too special and may lead us to an endless
11875 loop in error recovery. */
11876 yychar = YYUNDEF;
11877 yytoken = YYSYMBOL_YYerror;
11878 yyerror_range[1] = yylloc;
11879 goto yyerrlab1;
11880 }
11881 else
11882 {
11883 yytoken = YYTRANSLATE (yychar);
11884 YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc, p);
11885 }
11886
11887 /* If the proper action on seeing token YYTOKEN is to reduce or to
11888 detect an error, take that action. */
11889 yyn += yytoken;
11890 if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
11891 goto yydefault;
11892 yyn = yytable[yyn];
11893 if (yyn <= 0)
11894 {
11895 if (yytable_value_is_error (yyn))
11896 goto yyerrlab;
11897 yyn = -yyn;
11898 goto yyreduce;
11899 }
11900
11901 /* Count tokens shifted since error; after three, turn off error
11902 status. */
11903 if (yyerrstatus)
11904 yyerrstatus--;
11905
11906 /* Shift the lookahead token. */
11907 YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc, p);
11908 yystate = yyn;
11909 YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
11910 *++yyvsp = yylval;
11911 YY_IGNORE_MAYBE_UNINITIALIZED_END
11912 *++yylsp = yylloc;
11913 /* %after-shift code. */
11914#line 2664 "parse.y"
11915 {after_shift(p);}
11916#line 11917 "parse.c"
11917
11918
11919 /* Discard the shifted token. */
11920 yychar = YYEMPTY;
11921 goto yynewstate;
11922
11923
11924/*-----------------------------------------------------------.
11925| yydefault -- do the default action for the current state. |
11926`-----------------------------------------------------------*/
11927yydefault:
11928 yyn = yydefact[yystate];
11929 if (yyn == 0)
11930 goto yyerrlab;
11931 goto yyreduce;
11932
11933
11934/*-----------------------------.
11935| yyreduce -- do a reduction. |
11936`-----------------------------*/
11937yyreduce:
11938 /* yyn is the number of a rule to reduce with. */
11939 yylen = yyr2[yyn];
11940
11941 /* If YYLEN is nonzero, implement the default value of the action:
11942 '$$ = $1'.
11943
11944 Otherwise, the following line sets YYVAL to garbage.
11945 This behavior is undocumented and Bison
11946 users should not rely upon it. Assigning to YYVAL
11947 unconditionally makes the parser a bit smaller, and it avoids a
11948 GCC warning that YYVAL may be used uninitialized. */
11949 yyval = yyvsp[1-yylen];
11950 /* %before-reduce function. */
11951#line 2665 "parse.y"
11952 {before_reduce(yylen, p);}
11953#line 11954 "parse.c"
11954
11955
11956 /* Default location. */
11957 YYLLOC_DEFAULT (yyloc, (yylsp - yylen), yylen);
11958 yyerror_range[1] = yyloc;
11959 YY_REDUCE_PRINT (yyn, p);
11960 switch (yyn)
11961 {
11962 case 2: /* $@1: %empty */
11963#line 3159 "parse.y"
11964 {
11965 SET_LEX_STATE(EXPR_BEG);
11966 local_push(p, ifndef_ripper(1)+0);
11967 /* jumps are possible in the top-level loop. */
11968 if (!ifndef_ripper(p->do_loop) + 0) init_block_exit(p);
11969 }
11970#line 11971 "parse.c"
11971 break;
11972
11973 case 5: /* compstmt_top_stmts: top_stmts option_terms */
11974#line 2974 "parse.y"
11975 {
11976 void_stmts(p, (yyval.node) = (yyvsp[-1].node));
11977 }
11978#line 11979 "parse.c"
11979 break;
11980
11981 case 6: /* program: $@1 compstmt_top_stmts */
11982#line 3166 "parse.y"
11983 {
11984 if ((yyvsp[0].node) && !compile_for_eval) {
11985 NODE *node = (yyvsp[0].node);
11986 /* last expression should not be void */
11987 if (nd_type_p(node, NODE_BLOCK)) {
11988 while (RNODE_BLOCK(node)->nd_next) {
11989 node = RNODE_BLOCK(node)->nd_next;
11990 }
11991 node = RNODE_BLOCK(node)->nd_head;
11992 }
11993 node = remove_begin(node);
11994 void_expr(p, node);
11995 }
11996 p->eval_tree = NEW_SCOPE(0, block_append(p, p->eval_tree, (yyvsp[0].node)), &(yyloc));
11997 /*% ripper[final]: program!($:2) %*/
11998 local_pop(p);
11999 }
12000#line 12001 "parse.c"
12001 break;
12002
12003 case 7: /* top_stmts: none */
12004#line 3186 "parse.y"
12005 {
12006 (yyval.node) = NEW_BEGIN(0, &(yyloc));
12007 /*% ripper: stmts_add!(stmts_new!, void_stmt!) %*/
12008 }
12009#line 12010 "parse.c"
12010 break;
12011
12012 case 8: /* top_stmts: top_stmt */
12013#line 3191 "parse.y"
12014 {
12015 (yyval.node) = newline_node((yyvsp[0].node));
12016 /*% ripper: stmts_add!(stmts_new!, $:1) %*/
12017 }
12018#line 12019 "parse.c"
12019 break;
12020
12021 case 9: /* top_stmts: top_stmts terms top_stmt */
12022#line 3196 "parse.y"
12023 {
12024 (yyval.node) = block_append(p, (yyvsp[-2].node), newline_node((yyvsp[0].node)));
12025 /*% ripper: stmts_add!($:1, $:3) %*/
12026 }
12027#line 12028 "parse.c"
12028 break;
12029
12030 case 10: /* top_stmt: stmt */
12031#line 3203 "parse.y"
12032 {
12033 clear_block_exit(p, true);
12034 (yyval.node) = (yyvsp[0].node);
12035 }
12036#line 12037 "parse.c"
12037 break;
12038
12039 case 11: /* top_stmt: "'BEGIN'" begin_block */
12040#line 3208 "parse.y"
12041 {
12042 (yyval.node) = (yyvsp[0].node);
12043 /*% ripper: $:2 %*/
12044 }
12045#line 12046 "parse.c"
12046 break;
12047
12048 case 12: /* block_open: '{' */
12049#line 3214 "parse.y"
12050 {(yyval.node_exits) = init_block_exit(p);}
12051#line 12052 "parse.c"
12052 break;
12053
12054 case 13: /* begin_block: block_open compstmt_top_stmts '}' */
12055#line 3217 "parse.y"
12056 {
12057 restore_block_exit(p, (yyvsp[-2].node_exits));
12058 p->eval_tree_begin = block_append(p, p->eval_tree_begin,
12059 NEW_BEGIN((yyvsp[-1].node), &(yyloc)));
12060 (yyval.node) = NEW_BEGIN(0, &(yyloc));
12061 /*% ripper: BEGIN!($:2) %*/
12062 }
12063#line 12064 "parse.c"
12064 break;
12065
12066 case 14: /* compstmt_stmts: stmts option_terms */
12067#line 2974 "parse.y"
12068 {
12069 void_stmts(p, (yyval.node) = (yyvsp[-1].node));
12070 }
12071#line 12072 "parse.c"
12072 break;
12073
12074 case 15: /* $@2: %empty */
12075#line 3230 "parse.y"
12076 {
12077 if (!(yyvsp[-1].node)) yyerror1(&(yylsp[0]), "else without rescue is useless");
12078 next_rescue_context(&p->ctxt, &(yyvsp[-2].ctxt), after_else);
12079 }
12080#line 12081 "parse.c"
12081 break;
12082
12083 case 16: /* $@3: %empty */
12084#line 3235 "parse.y"
12085 {
12086 next_rescue_context(&p->ctxt, &(yyvsp[-4].ctxt), after_ensure);
12087 }
12088#line 12089 "parse.c"
12089 break;
12090
12091 case 17: /* bodystmt: compstmt_stmts lex_ctxt opt_rescue k_else $@2 compstmt_stmts $@3 opt_ensure */
12092#line 3239 "parse.y"
12093 {
12094 (yyval.node) = new_bodystmt(p, (yyvsp[-7].node), (yyvsp[-5].node), (yyvsp[-2].node), (yyvsp[0].node), &(yyloc));
12095 /*% ripper: bodystmt!($:body, $:opt_rescue, $:elsebody, $:opt_ensure) %*/
12096 }
12097#line 12098 "parse.c"
12098 break;
12099
12100 case 18: /* $@4: %empty */
12101#line 3246 "parse.y"
12102 {
12103 next_rescue_context(&p->ctxt, &(yyvsp[-1].ctxt), after_ensure);
12104 }
12105#line 12106 "parse.c"
12106 break;
12107
12108 case 19: /* bodystmt: compstmt_stmts lex_ctxt opt_rescue $@4 opt_ensure */
12109#line 3250 "parse.y"
12110 {
12111 (yyval.node) = new_bodystmt(p, (yyvsp[-4].node), (yyvsp[-2].node), 0, (yyvsp[0].node), &(yyloc));
12112 /*% ripper: bodystmt!($:body, $:opt_rescue, Qnil, $:opt_ensure) %*/
12113 }
12114#line 12115 "parse.c"
12115 break;
12116
12117 case 20: /* stmts: none */
12118#line 3257 "parse.y"
12119 {
12120 (yyval.node) = NEW_BEGIN(0, &(yyloc));
12121 /*% ripper: stmts_add!(stmts_new!, void_stmt!) %*/
12122 }
12123#line 12124 "parse.c"
12124 break;
12125
12126 case 21: /* stmts: stmt_or_begin */
12127#line 3262 "parse.y"
12128 {
12129 (yyval.node) = newline_node((yyvsp[0].node));
12130 /*% ripper: stmts_add!(stmts_new!, $:1) %*/
12131 }
12132#line 12133 "parse.c"
12133 break;
12134
12135 case 22: /* stmts: stmts terms stmt_or_begin */
12136#line 3267 "parse.y"
12137 {
12138 (yyval.node) = block_append(p, (yyvsp[-2].node), newline_node((yyvsp[0].node)));
12139 /*% ripper: stmts_add!($:1, $:3) %*/
12140 }
12141#line 12142 "parse.c"
12142 break;
12143
12144 case 24: /* $@5: %empty */
12145#line 3275 "parse.y"
12146 {
12147 yyerror1(&(yylsp[0]), "BEGIN is permitted only at toplevel");
12148 }
12149#line 12150 "parse.c"
12150 break;
12151
12152 case 25: /* stmt_or_begin: "'BEGIN'" $@5 begin_block */
12153#line 3279 "parse.y"
12154 {
12155 (yyval.node) = (yyvsp[0].node);
12156 }
12157#line 12158 "parse.c"
12158 break;
12159
12160 case 26: /* allow_exits: %empty */
12161#line 3284 "parse.y"
12162 {(yyval.node_exits) = allow_block_exit(p);}
12163#line 12164 "parse.c"
12164 break;
12165
12166 case 27: /* k_END: "'END'" lex_ctxt */
12167#line 3287 "parse.y"
12168 {
12169 (yyval.ctxt) = (yyvsp[0].ctxt);
12170 p->ctxt.in_rescue = before_rescue;
12171 /*% ripper: $:2 %*/
12172 }
12173#line 12174 "parse.c"
12174 break;
12175
12176 case 28: /* $@6: %empty */
12177#line 3293 "parse.y"
12178 {SET_LEX_STATE(EXPR_FNAME|EXPR_FITEM);}
12179#line 12180 "parse.c"
12180 break;
12181
12182 case 29: /* stmt: "'alias'" fitem $@6 fitem */
12183#line 3294 "parse.y"
12184 {
12185 (yyval.node) = NEW_ALIAS((yyvsp[-2].node), (yyvsp[0].node), &(yyloc), &(yylsp[-3]));
12186 /*% ripper: alias!($:2, $:4) %*/
12187 }
12188#line 12189 "parse.c"
12189 break;
12190
12191 case 30: /* stmt: "'alias'" "global variable" "global variable" */
12192#line 3299 "parse.y"
12193 {
12194 (yyval.node) = NEW_VALIAS((yyvsp[-1].id), (yyvsp[0].id), &(yyloc), &(yylsp[-2]));
12195 /*% ripper: var_alias!($:2, $:3) %*/
12196 }
12197#line 12198 "parse.c"
12198 break;
12199
12200 case 31: /* stmt: "'alias'" "global variable" "back reference" */
12201#line 3304 "parse.y"
12202 {
12203 char buf[2];
12204 buf[0] = '$';
12205 buf[1] = (char)RNODE_BACK_REF((yyvsp[0].node))->nd_nth;
12206 (yyval.node) = NEW_VALIAS((yyvsp[-1].id), rb_intern2(buf, 2), &(yyloc), &(yylsp[-2]));
12207 /*% ripper: var_alias!($:2, $:3) %*/
12208 }
12209#line 12210 "parse.c"
12210 break;
12211
12212 case 32: /* stmt: "'alias'" "global variable" "numbered reference" */
12213#line 3312 "parse.y"
12214 {
12215 static const char mesg[] = "can't make alias for the number variables";
12216 /*%%%*/
12217 yyerror1(&(yylsp[0]), mesg);
12218 /*% %*/
12219 (yyval.node) = NEW_ERROR(&(yyloc));
12220 /*% ripper[error]: alias_error!(ERR_MESG(), $:3) %*/
12221 }
12222#line 12223 "parse.c"
12223 break;
12224
12225 case 33: /* stmt: "'undef'" undef_list */
12226#line 3321 "parse.y"
12227 {
12228 nd_set_first_loc((yyvsp[0].node), (yylsp[-1]).beg_pos);
12229 RNODE_UNDEF((yyvsp[0].node))->keyword_loc = (yylsp[-1]);
12230 (yyval.node) = (yyvsp[0].node);
12231 /*% ripper: undef!($:2) %*/
12232 }
12233#line 12234 "parse.c"
12234 break;
12235
12236 case 34: /* stmt: stmt "'if' modifier" expr_value */
12237#line 3328 "parse.y"
12238 {
12239 (yyval.node) = new_if(p, (yyvsp[0].node), remove_begin((yyvsp[-2].node)), 0, &(yyloc), &(yylsp[-1]), &NULL_LOC, &NULL_LOC);
12240 fixpos((yyval.node), (yyvsp[0].node));
12241 /*% ripper: if_mod!($:3, $:1) %*/
12242 }
12243#line 12244 "parse.c"
12244 break;
12245
12246 case 35: /* stmt: stmt "'unless' modifier" expr_value */
12247#line 3334 "parse.y"
12248 {
12249 (yyval.node) = new_unless(p, (yyvsp[0].node), remove_begin((yyvsp[-2].node)), 0, &(yyloc), &(yylsp[-1]), &NULL_LOC, &NULL_LOC);
12250 fixpos((yyval.node), (yyvsp[0].node));
12251 /*% ripper: unless_mod!($:3, $:1) %*/
12252 }
12253#line 12254 "parse.c"
12254 break;
12255
12256 case 36: /* stmt: stmt "'while' modifier" expr_value */
12257#line 3340 "parse.y"
12258 {
12259 clear_block_exit(p, false);
12260 if ((yyvsp[-2].node) && nd_type_p((yyvsp[-2].node), NODE_BEGIN)) {
12261 (yyval.node) = NEW_WHILE(cond(p, (yyvsp[0].node), &(yylsp[0])), RNODE_BEGIN((yyvsp[-2].node))->nd_body, 0, &(yyloc), &(yylsp[-1]), &NULL_LOC);
12262 }
12263 else {
12264 (yyval.node) = NEW_WHILE(cond(p, (yyvsp[0].node), &(yylsp[0])), (yyvsp[-2].node), 1, &(yyloc), &(yylsp[-1]), &NULL_LOC);
12265 }
12266 /*% ripper: while_mod!($:3, $:1) %*/
12267 }
12268#line 12269 "parse.c"
12269 break;
12270
12271 case 37: /* stmt: stmt "'until' modifier" expr_value */
12272#line 3351 "parse.y"
12273 {
12274 clear_block_exit(p, false);
12275 if ((yyvsp[-2].node) && nd_type_p((yyvsp[-2].node), NODE_BEGIN)) {
12276 (yyval.node) = NEW_UNTIL(cond(p, (yyvsp[0].node), &(yylsp[0])), RNODE_BEGIN((yyvsp[-2].node))->nd_body, 0, &(yyloc), &(yylsp[-1]), &NULL_LOC);
12277 }
12278 else {
12279 (yyval.node) = NEW_UNTIL(cond(p, (yyvsp[0].node), &(yylsp[0])), (yyvsp[-2].node), 1, &(yyloc), &(yylsp[-1]), &NULL_LOC);
12280 }
12281 /*% ripper: until_mod!($:3, $:1) %*/
12282 }
12283#line 12284 "parse.c"
12284 break;
12285
12286 case 38: /* stmt: stmt "'rescue' modifier" after_rescue stmt */
12287#line 3362 "parse.y"
12288 {
12289 p->ctxt.in_rescue = (yyvsp[-1].ctxt).in_rescue;
12290 NODE *resq;
12291 YYLTYPE loc = code_loc_gen(&(yylsp[-2]), &(yylsp[0]));
12292 resq = NEW_RESBODY(0, 0, remove_begin((yyvsp[0].node)), 0, &loc);
12293 (yyval.node) = NEW_RESCUE(remove_begin((yyvsp[-3].node)), resq, 0, &(yyloc));
12294 /*% ripper: rescue_mod!($:1, $:4) %*/
12295 }
12296#line 12297 "parse.c"
12297 break;
12298
12299 case 39: /* stmt: k_END allow_exits '{' compstmt_stmts '}' */
12300#line 3371 "parse.y"
12301 {
12302 if (p->ctxt.in_def) {
12303 rb_warn0("END in method; use at_exit");
12304 }
12305 restore_block_exit(p, (yyvsp[-3].node_exits));
12306 p->ctxt = (yyvsp[-4].ctxt);
12307 {
12308 NODE *scope = NEW_SCOPE2(0 /* tbl */, 0 /* args */, (yyvsp[-1].node) /* body */, &(yyloc));
12309 (yyval.node) = NEW_POSTEXE(scope, &(yyloc), &(yylsp[-4]), &(yylsp[-2]), &(yylsp[0]));
12310 }
12311 /*% ripper: END!($:compstmt) %*/
12312 }
12313#line 12314 "parse.c"
12314 break;
12315
12316 case 41: /* stmt: mlhs '=' lex_ctxt command_call_value */
12317#line 3385 "parse.y"
12318 {
12319 (yyval.node) = node_assign(p, (NODE *)(yyvsp[-3].node_masgn), (yyvsp[0].node), (yyvsp[-1].ctxt), &(yyloc));
12320 /*% ripper: massign!($:1, $:4) %*/
12321 }
12322#line 12323 "parse.c"
12323 break;
12324
12325 case 42: /* asgn_mrhs: lhs '=' lex_ctxt mrhs */
12326#line 2919 "parse.y"
12327 {
12328 (yyval.node) = node_assign(p, (NODE *)(yyvsp[-3].node), (yyvsp[0].node), (yyvsp[-1].ctxt), &(yyloc));
12329 /*% ripper: assign!($:1, $:4) %*/
12330 }
12331#line 12332 "parse.c"
12332 break;
12333
12334 case 44: /* stmt: mlhs '=' lex_ctxt mrhs_arg "'rescue' modifier" after_rescue stmt */
12335#line 3392 "parse.y"
12336 {
12337 p->ctxt.in_rescue = (yyvsp[-4].ctxt).in_rescue;
12338 YYLTYPE loc = code_loc_gen(&(yylsp[-2]), &(yylsp[0]));
12339 (yyvsp[0].node) = NEW_RESBODY(0, 0, remove_begin((yyvsp[0].node)), 0, &loc);
12340 loc.beg_pos = (yylsp[-3]).beg_pos;
12341 (yyvsp[-3].node) = NEW_RESCUE((yyvsp[-3].node), (yyvsp[0].node), 0, &loc);
12342 (yyval.node) = node_assign(p, (NODE *)(yyvsp[-6].node_masgn), (yyvsp[-3].node), (yyvsp[-4].ctxt), &(yyloc));
12343 /*% ripper: massign!($:1, rescue_mod!($:4, $:7)) %*/
12344 }
12345#line 12346 "parse.c"
12346 break;
12347
12348 case 45: /* stmt: mlhs '=' lex_ctxt mrhs_arg */
12349#line 3402 "parse.y"
12350 {
12351 (yyval.node) = node_assign(p, (NODE *)(yyvsp[-3].node_masgn), (yyvsp[0].node), (yyvsp[-1].ctxt), &(yyloc));
12352 /*% ripper: massign!($:1, $:4) %*/
12353 }
12354#line 12355 "parse.c"
12355 break;
12356
12357 case 47: /* stmt: error */
12358#line 3408 "parse.y"
12359 {
12360 (void)yynerrs;
12361 (yyval.node) = NEW_ERROR(&(yyloc));
12362 }
12363#line 12364 "parse.c"
12364 break;
12365
12366 case 48: /* asgn_command_rhs: lhs '=' lex_ctxt command_rhs */
12367#line 2919 "parse.y"
12368 {
12369 (yyval.node) = node_assign(p, (NODE *)(yyvsp[-3].node), (yyvsp[0].node), (yyvsp[-1].ctxt), &(yyloc));
12370 /*% ripper: assign!($:1, $:4) %*/
12371 }
12372#line 12373 "parse.c"
12373 break;
12374
12375 case 50: /* op_asgn_command_rhs: var_lhs "operator-assignment" lex_ctxt command_rhs */
12376#line 3044 "parse.y"
12377 {
12378 (yyval.node) = new_op_assign(p, (yyvsp[-3].node), (yyvsp[-2].id), (yyvsp[0].node), (yyvsp[-1].ctxt), &(yyloc));
12379 /*% ripper: opassign!($:1, $:2, $:4) %*/
12380 }
12381#line 12382 "parse.c"
12382 break;
12383
12384 case 51: /* op_asgn_command_rhs: primary_value '[' opt_call_args rbracket "operator-assignment" lex_ctxt command_rhs */
12385#line 3049 "parse.y"
12386 {
12387 (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]));
12388 /*% ripper: opassign!(aref_field!($:1, $:3), $:5, $:7) %*/
12389 }
12390#line 12391 "parse.c"
12391 break;
12392
12393 case 52: /* op_asgn_command_rhs: primary_value call_op "local variable or method" "operator-assignment" lex_ctxt command_rhs */
12394#line 3054 "parse.y"
12395 {
12396 (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]));
12397 /*% ripper: opassign!(field!($:1, $:2, $:3), $:4, $:6) %*/
12398 }
12399#line 12400 "parse.c"
12400 break;
12401
12402 case 53: /* op_asgn_command_rhs: primary_value call_op "constant" "operator-assignment" lex_ctxt command_rhs */
12403#line 3059 "parse.y"
12404 {
12405 (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]));
12406 /*% ripper: opassign!(field!($:1, $:2, $:3), $:4, $:6) %*/
12407 }
12408#line 12409 "parse.c"
12409 break;
12410
12411 case 54: /* op_asgn_command_rhs: primary_value "::" "local variable or method" "operator-assignment" lex_ctxt command_rhs */
12412#line 3064 "parse.y"
12413 {
12414 (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]));
12415 /*% ripper: opassign!(field!($:1, $:2, $:3), $:4, $:6) %*/
12416 }
12417#line 12418 "parse.c"
12418 break;
12419
12420 case 55: /* op_asgn_command_rhs: primary_value "::" "constant" "operator-assignment" lex_ctxt command_rhs */
12421#line 3069 "parse.y"
12422 {
12423 YYLTYPE loc = code_loc_gen(&(yylsp[-5]), &(yylsp[-3]));
12424 (yyval.node) = new_const_op_assign(p, NEW_COLON2((yyvsp[-5].node), (yyvsp[-3].id), &loc, &(yylsp[-4]), &(yylsp[-3])), (yyvsp[-2].id), (yyvsp[0].node), (yyvsp[-1].ctxt), &(yyloc));
12425 /*% ripper: opassign!(const_path_field!($:1, $:3), $:4, $:6) %*/
12426 }
12427#line 12428 "parse.c"
12428 break;
12429
12430 case 56: /* op_asgn_command_rhs: ":: at EXPR_BEG" "constant" "operator-assignment" lex_ctxt command_rhs */
12431#line 3075 "parse.y"
12432 {
12433 YYLTYPE loc = code_loc_gen(&(yylsp[-4]), &(yylsp[-3]));
12434 (yyval.node) = new_const_op_assign(p, NEW_COLON3((yyvsp[-3].id), &loc, &(yylsp[-4]), &(yylsp[-3])), (yyvsp[-2].id), (yyvsp[0].node), (yyvsp[-1].ctxt), &(yyloc));
12435 /*% ripper: opassign!(top_const_field!($:2), $:3, $:5) %*/
12436 }
12437#line 12438 "parse.c"
12438 break;
12439
12440 case 57: /* op_asgn_command_rhs: backref "operator-assignment" lex_ctxt command_rhs */
12441#line 3081 "parse.y"
12442 {
12443 VALUE MAYBE_UNUSED(e) = rb_backref_error(p, (yyvsp[-3].node));
12444 (yyval.node) = NEW_ERROR(&(yyloc));
12445 /*% ripper[error]: assign_error!(?e, opassign!(var_field!($:1), $:2, $:4)) %*/
12446 }
12447#line 12448 "parse.c"
12448 break;
12449
12450 case 59: /* def_endless_method_endless_command: defn_head f_opt_paren_args '=' endless_command */
12451#line 2949 "parse.y"
12452 {
12453 endless_method_name(p, (yyvsp[-3].node_def_temp)->nd_mid, &(yylsp[-3]));
12454 restore_defun(p, (yyvsp[-3].node_def_temp));
12455 (yyvsp[0].node) = new_scope_body(p, (yyvsp[-2].node_args), (yyvsp[0].node), &(yyloc));
12456 ((yyval.node) = (yyvsp[-3].node_def_temp)->nd_def)->nd_loc = (yyloc);
12457 RNODE_DEFN((yyval.node))->nd_defn = (yyvsp[0].node);
12458 /*% ripper: bodystmt!($:bodystmt, Qnil, Qnil, Qnil) %*/
12459 /*% ripper: def!($:head, $:args, $:$) %*/
12460 local_pop(p);
12461 }
12462#line 12463 "parse.c"
12463 break;
12464
12465 case 60: /* def_endless_method_endless_command: defs_head f_opt_paren_args '=' endless_command */
12466#line 2960 "parse.y"
12467 {
12468 endless_method_name(p, (yyvsp[-3].node_def_temp)->nd_mid, &(yylsp[-3]));
12469 restore_defun(p, (yyvsp[-3].node_def_temp));
12470 (yyvsp[0].node) = new_scope_body(p, (yyvsp[-2].node_args), (yyvsp[0].node), &(yyloc));
12471 ((yyval.node) = (yyvsp[-3].node_def_temp)->nd_def)->nd_loc = (yyloc);
12472 RNODE_DEFS((yyval.node))->nd_defn = (yyvsp[0].node);
12473 /*% ripper: bodystmt!($:bodystmt, Qnil, Qnil, Qnil) %*/
12474 /*% ripper: defs!(*$:head[0..2], $:args, $:$) %*/
12475 local_pop(p);
12476 }
12477#line 12478 "parse.c"
12478 break;
12479
12480 case 63: /* endless_command: endless_command "'rescue' modifier" after_rescue arg */
12481#line 3421 "parse.y"
12482 {
12483 p->ctxt.in_rescue = (yyvsp[-1].ctxt).in_rescue;
12484 (yyval.node) = rescued_expr(p, (yyvsp[-3].node), (yyvsp[0].node), &(yylsp[-3]), &(yylsp[-2]), &(yylsp[0]));
12485 /*% ripper: rescue_mod!($:1, $:4) %*/
12486 }
12487#line 12488 "parse.c"
12488 break;
12489
12490 case 66: /* endless_command: "'not'" option_'\n' endless_command */
12491#line 3427 "parse.y"
12492 {
12493 (yyval.node) = call_uni_op(p, method_cond(p, (yyvsp[0].node), &(yylsp[0])), METHOD_NOT, &(yylsp[-2]), &(yyloc));
12494 /*% ripper: unary!(ID2VAL(idNOT), $:3) %*/
12495 }
12496#line 12497 "parse.c"
12497 break;
12498
12499 case 68: /* command_rhs: command_call_value "'rescue' modifier" after_rescue stmt */
12500#line 3435 "parse.y"
12501 {
12502 p->ctxt.in_rescue = (yyvsp[-1].ctxt).in_rescue;
12503 YYLTYPE loc = code_loc_gen(&(yylsp[-2]), &(yylsp[0]));
12504 (yyval.node) = NEW_RESCUE((yyvsp[-3].node), NEW_RESBODY(0, 0, remove_begin((yyvsp[0].node)), 0, &loc), 0, &(yyloc));
12505 /*% ripper: rescue_mod!($:1, $:4) %*/
12506 }
12507#line 12508 "parse.c"
12508 break;
12509
12510 case 71: /* expr: expr "'and'" expr */
12511#line 3446 "parse.y"
12512 {
12513 (yyval.node) = logop(p, idAND, (yyvsp[-2].node), (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
12514 /*% ripper: binary!($:1, ID2VAL(idAND), $:3) %*/
12515 }
12516#line 12517 "parse.c"
12517 break;
12518
12519 case 72: /* expr: expr "'or'" expr */
12520#line 3451 "parse.y"
12521 {
12522 (yyval.node) = logop(p, idOR, (yyvsp[-2].node), (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
12523 /*% ripper: binary!($:1, ID2VAL(idOR), $:3) %*/
12524 }
12525#line 12526 "parse.c"
12526 break;
12527
12528 case 73: /* expr: "'not'" option_'\n' expr */
12529#line 3456 "parse.y"
12530 {
12531 (yyval.node) = call_uni_op(p, method_cond(p, (yyvsp[0].node), &(yylsp[0])), METHOD_NOT, &(yylsp[-2]), &(yyloc));
12532 /*% ripper: unary!(ID2VAL(idNOT), $:3) %*/
12533 }
12534#line 12535 "parse.c"
12535 break;
12536
12537 case 74: /* expr: '!' command_call */
12538#line 3461 "parse.y"
12539 {
12540 (yyval.node) = call_uni_op(p, method_cond(p, (yyvsp[0].node), &(yylsp[0])), '!', &(yylsp[-1]), &(yyloc));
12541 /*% ripper: unary!(ID2VAL('\'!\''), $:2) %*/
12542 }
12543#line 12544 "parse.c"
12544 break;
12545
12546 case 75: /* $@7: %empty */
12547#line 3466 "parse.y"
12548 {
12549 value_expr((yyvsp[-1].node));
12550 }
12551#line 12552 "parse.c"
12552 break;
12553
12554 case 76: /* expr: arg "=>" $@7 p_in_kwarg p_pvtbl p_pktbl p_top_expr_body */
12555#line 3471 "parse.y"
12556 {
12557 pop_pktbl(p, (yyvsp[-1].tbl));
12558 pop_pvtbl(p, (yyvsp[-2].tbl));
12559 p->ctxt.in_kwarg = (yyvsp[-3].ctxt).in_kwarg;
12560 (yyval.node) = NEW_CASE3((yyvsp[-6].node), NEW_IN((yyvsp[0].node), 0, 0, &(yylsp[0])), &(yyloc), &NULL_LOC, &NULL_LOC);
12561 /*% ripper: case!($:arg, in!($:body, Qnil, Qnil)) %*/
12562 }
12563#line 12564 "parse.c"
12564 break;
12565
12566 case 77: /* $@8: %empty */
12567#line 3479 "parse.y"
12568 {
12569 value_expr((yyvsp[-1].node));
12570 }
12571#line 12572 "parse.c"
12572 break;
12573
12574 case 78: /* expr: arg "'in'" $@8 p_in_kwarg p_pvtbl p_pktbl p_top_expr_body */
12575#line 3484 "parse.y"
12576 {
12577 pop_pktbl(p, (yyvsp[-1].tbl));
12578 pop_pvtbl(p, (yyvsp[-2].tbl));
12579 p->ctxt.in_kwarg = (yyvsp[-3].ctxt).in_kwarg;
12580 (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);
12581 /*% ripper: case!($:arg, in!($:body, Qnil, Qnil)) %*/
12582 }
12583#line 12584 "parse.c"
12584 break;
12585
12586 case 80: /* def_name: fname */
12587#line 3495 "parse.y"
12588 {
12589 numparam_name(p, (yyvsp[0].id));
12590 local_push(p, 0);
12591 p->ctxt.in_def = 1;
12592 p->ctxt.in_rescue = before_rescue;
12593 p->ctxt.cant_return = 0;
12594 (yyval.id) = (yyvsp[0].id);
12595 }
12596#line 12597 "parse.c"
12597 break;
12598
12599 case 81: /* defn_head: k_def def_name */
12600#line 3506 "parse.y"
12601 {
12602 (yyval.node_def_temp) = def_head_save(p, (yyvsp[-1].node_def_temp));
12603 (yyval.node_def_temp)->nd_mid = (yyvsp[0].id);
12604 (yyval.node_def_temp)->nd_def = NEW_DEFN((yyvsp[0].id), 0, &(yyloc));
12605 /*% ripper: $:def_name %*/
12606 }
12607#line 12608 "parse.c"
12608 break;
12609
12610 case 82: /* $@9: %empty */
12611#line 3515 "parse.y"
12612 {
12613 SET_LEX_STATE(EXPR_FNAME);
12614 }
12615#line 12616 "parse.c"
12616 break;
12617
12618 case 83: /* defs_head: k_def singleton dot_or_colon $@9 def_name */
12619#line 3519 "parse.y"
12620 {
12621 SET_LEX_STATE(EXPR_ENDFN|EXPR_LABEL); /* force for args */
12622 (yyval.node_def_temp) = def_head_save(p, (yyvsp[-4].node_def_temp));
12623 (yyval.node_def_temp)->nd_mid = (yyvsp[0].id);
12624 (yyval.node_def_temp)->nd_def = NEW_DEFS((yyvsp[-3].node), (yyvsp[0].id), 0, &(yyloc));
12625 /*% ripper: [$:singleton, $:dot_or_colon, $:def_name] %*/
12626 }
12627#line 12628 "parse.c"
12628 break;
12629
12630 case 84: /* value_expr_expr: expr */
12631#line 3144 "parse.y"
12632 {
12633 value_expr((yyvsp[0].node));
12634 (yyval.node) = (yyvsp[0].node);
12635 }
12636#line 12637 "parse.c"
12637 break;
12638
12639 case 86: /* expr_value: error */
12640#line 3530 "parse.y"
12641 {
12642 (yyval.node) = NEW_ERROR(&(yyloc));
12643 }
12644#line 12645 "parse.c"
12645 break;
12646
12647 case 87: /* $@10: %empty */
12648#line 3535 "parse.y"
12649 {COND_PUSH(1);}
12650#line 12651 "parse.c"
12651 break;
12652
12653 case 88: /* $@11: %empty */
12654#line 3535 "parse.y"
12655 {COND_POP();}
12656#line 12657 "parse.c"
12657 break;
12658
12659 case 89: /* expr_value_do: $@10 expr_value do $@11 */
12660#line 3536 "parse.y"
12661 {
12662 (yyval.node) = (yyvsp[-2].node);
12663 /*% ripper: $:2 %*/
12664 }
12665#line 12666 "parse.c"
12666 break;
12667
12668 case 92: /* value_expr_command_call: command_call */
12669#line 3144 "parse.y"
12670 {
12671 value_expr((yyvsp[0].node));
12672 (yyval.node) = (yyvsp[0].node);
12673 }
12674#line 12675 "parse.c"
12675 break;
12676
12677 case 95: /* block_command: block_call call_op2 operation2 command_args */
12678#line 3551 "parse.y"
12679 {
12680 (yyval.node) = new_qcall(p, (yyvsp[-2].id), (yyvsp[-3].node), (yyvsp[-1].id), (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
12681 /*% ripper: method_add_arg!(call!($:1, $:2, $:3), $:4) %*/
12682 }
12683#line 12684 "parse.c"
12684 break;
12685
12686 case 96: /* cmd_brace_block: "{ arg" brace_body '}' */
12687#line 3558 "parse.y"
12688 {
12689 (yyval.node) = (yyvsp[-1].node);
12690 set_embraced_location((yyval.node), &(yylsp[-2]), &(yylsp[0]));
12691 /*% ripper: $:2 %*/
12692 }
12693#line 12694 "parse.c"
12694 break;
12695
12696 case 97: /* fcall: "local variable or method" */
12697#line 3566 "parse.y"
12698 {
12699 (yyval.node_fcall) = NEW_FCALL((yyvsp[0].id), 0, &(yyloc));
12700 /*% ripper: $:1 %*/
12701 }
12702#line 12703 "parse.c"
12703 break;
12704
12705 case 98: /* fcall: "constant" */
12706#line 3566 "parse.y"
12707 {
12708 (yyval.node_fcall) = NEW_FCALL((yyvsp[0].id), 0, &(yyloc));
12709 /*% ripper: $:1 %*/
12710 }
12711#line 12712 "parse.c"
12712 break;
12713
12714 case 99: /* fcall: "method" */
12715#line 3566 "parse.y"
12716 {
12717 (yyval.node_fcall) = NEW_FCALL((yyvsp[0].id), 0, &(yyloc));
12718 /*% ripper: $:1 %*/
12719 }
12720#line 12721 "parse.c"
12721 break;
12722
12723 case 100: /* command: fcall command_args */
12724#line 3573 "parse.y"
12725 {
12726 (yyvsp[-1].node_fcall)->nd_args = (yyvsp[0].node);
12727 nd_set_last_loc((yyvsp[-1].node_fcall), (yylsp[0]).end_pos);
12728 (yyval.node) = (NODE *)(yyvsp[-1].node_fcall);
12729 /*% ripper: command!($:1, $:2) %*/
12730 }
12731#line 12732 "parse.c"
12732 break;
12733
12734 case 101: /* command: fcall command_args cmd_brace_block */
12735#line 3580 "parse.y"
12736 {
12737 block_dup_check(p, (yyvsp[-1].node), (yyvsp[0].node));
12738 (yyvsp[-2].node_fcall)->nd_args = (yyvsp[-1].node);
12739 (yyval.node) = method_add_block(p, (NODE *)(yyvsp[-2].node_fcall), (yyvsp[0].node), &(yyloc));
12740 fixpos((yyval.node), RNODE((yyvsp[-2].node_fcall)));
12741 nd_set_last_loc((yyvsp[-2].node_fcall), (yylsp[-1]).end_pos);
12742 /*% ripper: method_add_block!(command!($:1, $:2), $:3) %*/
12743 }
12744#line 12745 "parse.c"
12745 break;
12746
12747 case 102: /* command: primary_value call_op operation2 command_args */
12748#line 3589 "parse.y"
12749 {
12750 (yyval.node) = new_command_qcall(p, (yyvsp[-2].id), (yyvsp[-3].node), (yyvsp[-1].id), (yyvsp[0].node), 0, &(yylsp[-1]), &(yyloc));
12751 /*% ripper: command_call!($:1, $:2, $:3, $:4) %*/
12752 }
12753#line 12754 "parse.c"
12754 break;
12755
12756 case 103: /* command: primary_value call_op operation2 command_args cmd_brace_block */
12757#line 3594 "parse.y"
12758 {
12759 (yyval.node) = new_command_qcall(p, (yyvsp[-3].id), (yyvsp[-4].node), (yyvsp[-2].id), (yyvsp[-1].node), (yyvsp[0].node), &(yylsp[-2]), &(yyloc));
12760 /*% ripper: method_add_block!(command_call!($:1, $:2, $:3, $:4), $:5) %*/
12761 }
12762#line 12763 "parse.c"
12763 break;
12764
12765 case 104: /* command: primary_value "::" operation2 command_args */
12766#line 3599 "parse.y"
12767 {
12768 (yyval.node) = new_command_qcall(p, idCOLON2, (yyvsp[-3].node), (yyvsp[-1].id), (yyvsp[0].node), 0, &(yylsp[-1]), &(yyloc));
12769 /*% ripper: command_call!($:1, $:2, $:3, $:4) %*/
12770 }
12771#line 12772 "parse.c"
12772 break;
12773
12774 case 105: /* command: primary_value "::" operation2 command_args cmd_brace_block */
12775#line 3604 "parse.y"
12776 {
12777 (yyval.node) = new_command_qcall(p, idCOLON2, (yyvsp[-4].node), (yyvsp[-2].id), (yyvsp[-1].node), (yyvsp[0].node), &(yylsp[-2]), &(yyloc));
12778 /*% ripper: method_add_block!(command_call!($:1, $:2, $:3, $:4), $:5) %*/
12779 }
12780#line 12781 "parse.c"
12781 break;
12782
12783 case 106: /* command: primary_value "::" "constant" '{' brace_body '}' */
12784#line 3609 "parse.y"
12785 {
12786 set_embraced_location((yyvsp[-1].node), &(yylsp[-2]), &(yylsp[0]));
12787 (yyval.node) = new_command_qcall(p, idCOLON2, (yyvsp[-5].node), (yyvsp[-3].id), 0, (yyvsp[-1].node), &(yylsp[-3]), &(yyloc));
12788 /*% ripper: method_add_block!(command_call!($:1, $:2, $:3, Qnil), $:5) %*/
12789 }
12790#line 12791 "parse.c"
12791 break;
12792
12793 case 107: /* command: "'super'" command_args */
12794#line 3615 "parse.y"
12795 {
12796 (yyval.node) = NEW_SUPER((yyvsp[0].node), &(yyloc), &(yylsp[-1]), &NULL_LOC, &NULL_LOC);
12797 fixpos((yyval.node), (yyvsp[0].node));
12798 /*% ripper: super!($:2) %*/
12799 }
12800#line 12801 "parse.c"
12801 break;
12802
12803 case 108: /* command: k_yield command_args */
12804#line 3621 "parse.y"
12805 {
12806 (yyval.node) = NEW_YIELD((yyvsp[0].node), &(yyloc), &(yylsp[-1]), &NULL_LOC, &NULL_LOC);
12807 fixpos((yyval.node), (yyvsp[0].node));
12808 /*% ripper: yield!($:2) %*/
12809 }
12810#line 12811 "parse.c"
12811 break;
12812
12813 case 109: /* command: k_return call_args */
12814#line 3627 "parse.y"
12815 {
12816 (yyval.node) = NEW_RETURN(ret_args(p, (yyvsp[0].node)), &(yyloc), &(yylsp[-1]));
12817 /*% ripper: return!($:2) %*/
12818 }
12819#line 12820 "parse.c"
12820 break;
12821
12822 case 110: /* command: "'break'" call_args */
12823#line 3632 "parse.y"
12824 {
12825 NODE *args = 0;
12826 args = ret_args(p, (yyvsp[0].node));
12827 (yyval.node) = add_block_exit(p, NEW_BREAK(args, &(yyloc), &(yylsp[-1])));
12828 /*% ripper: break!($:2) %*/
12829 }
12830#line 12831 "parse.c"
12831 break;
12832
12833 case 111: /* command: "'next'" call_args */
12834#line 3639 "parse.y"
12835 {
12836 NODE *args = 0;
12837 args = ret_args(p, (yyvsp[0].node));
12838 (yyval.node) = add_block_exit(p, NEW_NEXT(args, &(yyloc), &(yylsp[-1])));
12839 /*% ripper: next!($:2) %*/
12840 }
12841#line 12842 "parse.c"
12842 break;
12843
12844 case 113: /* mlhs: "(" mlhs_inner rparen */
12845#line 3649 "parse.y"
12846 {
12847 (yyval.node_masgn) = (yyvsp[-1].node_masgn);
12848 /*% ripper: mlhs_paren!($:2) %*/
12849 }
12850#line 12851 "parse.c"
12851 break;
12852
12853 case 115: /* mlhs_inner: "(" mlhs_inner rparen */
12854#line 3657 "parse.y"
12855 {
12856 (yyval.node_masgn) = NEW_MASGN(NEW_LIST((NODE *)(yyvsp[-1].node_masgn), &(yyloc)), 0, &(yyloc));
12857 /*% ripper: mlhs_paren!($:2) %*/
12858 }
12859#line 12860 "parse.c"
12860 break;
12861
12862 case 116: /* mlhs_basic: mlhs_head */
12863#line 3664 "parse.y"
12864 {
12865 (yyval.node_masgn) = NEW_MASGN((yyvsp[0].node), 0, &(yyloc));
12866 /*% ripper: $:1 %*/
12867 }
12868#line 12869 "parse.c"
12869 break;
12870
12871 case 117: /* mlhs_basic: mlhs_head mlhs_item */
12872#line 3669 "parse.y"
12873 {
12874 (yyval.node_masgn) = NEW_MASGN(list_append(p, (yyvsp[-1].node), (yyvsp[0].node)), 0, &(yyloc));
12875 /*% ripper: mlhs_add!($:1, $:2) %*/
12876 }
12877#line 12878 "parse.c"
12878 break;
12879
12880 case 118: /* mlhs_basic: mlhs_head "*" mlhs_node */
12881#line 3674 "parse.y"
12882 {
12883 (yyval.node_masgn) = NEW_MASGN((yyvsp[-2].node), (yyvsp[0].node), &(yyloc));
12884 /*% ripper: mlhs_add_star!($:1, $:3) %*/
12885 }
12886#line 12887 "parse.c"
12887 break;
12888
12889 case 119: /* mlhs_mlhs_item: mlhs_item */
12890#line 3031 "parse.y"
12891 {
12892 (yyval.node) = NEW_LIST((yyvsp[0].node), &(yyloc));
12893 /*% ripper: mlhs_add!(mlhs_new!, $:1) %*/
12894 }
12895#line 12896 "parse.c"
12896 break;
12897
12898 case 120: /* mlhs_mlhs_item: mlhs_mlhs_item ',' mlhs_item */
12899#line 3036 "parse.y"
12900 {
12901 (yyval.node) = list_append(p, (yyvsp[-2].node), (yyvsp[0].node));
12902 /*% ripper: mlhs_add!($:1, $:3) %*/
12903 }
12904#line 12905 "parse.c"
12905 break;
12906
12907 case 121: /* mlhs_basic: mlhs_head "*" mlhs_node ',' mlhs_mlhs_item */
12908#line 3679 "parse.y"
12909 {
12910 (yyval.node_masgn) = NEW_MASGN((yyvsp[-4].node), NEW_POSTARG((yyvsp[-2].node),(yyvsp[0].node),&(yyloc)), &(yyloc));
12911 /*% ripper: mlhs_add_post!(mlhs_add_star!($:1, $:3), $:5) %*/
12912 }
12913#line 12914 "parse.c"
12914 break;
12915
12916 case 122: /* mlhs_basic: mlhs_head "*" */
12917#line 3684 "parse.y"
12918 {
12919 (yyval.node_masgn) = NEW_MASGN((yyvsp[-1].node), NODE_SPECIAL_NO_NAME_REST, &(yyloc));
12920 /*% ripper: mlhs_add_star!($:1, Qnil) %*/
12921 }
12922#line 12923 "parse.c"
12923 break;
12924
12925 case 123: /* mlhs_basic: mlhs_head "*" ',' mlhs_mlhs_item */
12926#line 3689 "parse.y"
12927 {
12928 (yyval.node_masgn) = NEW_MASGN((yyvsp[-3].node), NEW_POSTARG(NODE_SPECIAL_NO_NAME_REST, (yyvsp[0].node), &(yyloc)), &(yyloc));
12929 /*% ripper: mlhs_add_post!(mlhs_add_star!($:1, Qnil), $:4) %*/
12930 }
12931#line 12932 "parse.c"
12932 break;
12933
12934 case 124: /* mlhs_basic: "*" mlhs_node */
12935#line 3694 "parse.y"
12936 {
12937 (yyval.node_masgn) = NEW_MASGN(0, (yyvsp[0].node), &(yyloc));
12938 /*% ripper: mlhs_add_star!(mlhs_new!, $:2) %*/
12939 }
12940#line 12941 "parse.c"
12941 break;
12942
12943 case 125: /* mlhs_basic: "*" mlhs_node ',' mlhs_mlhs_item */
12944#line 3699 "parse.y"
12945 {
12946 (yyval.node_masgn) = NEW_MASGN(0, NEW_POSTARG((yyvsp[-2].node),(yyvsp[0].node),&(yyloc)), &(yyloc));
12947 /*% ripper: mlhs_add_post!(mlhs_add_star!(mlhs_new!, $:2), $:4) %*/
12948 }
12949#line 12950 "parse.c"
12950 break;
12951
12952 case 126: /* mlhs_basic: "*" */
12953#line 3704 "parse.y"
12954 {
12955 (yyval.node_masgn) = NEW_MASGN(0, NODE_SPECIAL_NO_NAME_REST, &(yyloc));
12956 /*% ripper: mlhs_add_star!(mlhs_new!, Qnil) %*/
12957 }
12958#line 12959 "parse.c"
12959 break;
12960
12961 case 127: /* mlhs_basic: "*" ',' mlhs_mlhs_item */
12962#line 3709 "parse.y"
12963 {
12964 (yyval.node_masgn) = NEW_MASGN(0, NEW_POSTARG(NODE_SPECIAL_NO_NAME_REST, (yyvsp[0].node), &(yyloc)), &(yyloc));
12965 /*% ripper: mlhs_add_post!(mlhs_add_star!(mlhs_new!, Qnil), $:3) %*/
12966 }
12967#line 12968 "parse.c"
12968 break;
12969
12970 case 129: /* mlhs_item: "(" mlhs_inner rparen */
12971#line 3717 "parse.y"
12972 {
12973 (yyval.node) = (NODE *)(yyvsp[-1].node_masgn);
12974 /*% ripper: mlhs_paren!($:2) %*/
12975 }
12976#line 12977 "parse.c"
12977 break;
12978
12979 case 130: /* mlhs_head: mlhs_item ',' */
12980#line 3724 "parse.y"
12981 {
12982 (yyval.node) = NEW_LIST((yyvsp[-1].node), &(yylsp[-1]));
12983 /*% ripper: mlhs_add!(mlhs_new!, $:1) %*/
12984 }
12985#line 12986 "parse.c"
12986 break;
12987
12988 case 131: /* mlhs_head: mlhs_head mlhs_item ',' */
12989#line 3729 "parse.y"
12990 {
12991 (yyval.node) = list_append(p, (yyvsp[-2].node), (yyvsp[-1].node));
12992 /*% ripper: mlhs_add!($:1, $:2) %*/
12993 }
12994#line 12995 "parse.c"
12995 break;
12996
12997 case 132: /* mlhs_node: user_variable */
12998#line 3737 "parse.y"
12999 {
13000 /*% ripper: var_field!($:1) %*/
13001 (yyval.node) = assignable(p, (yyvsp[0].id), 0, &(yyloc));
13002 }
13003#line 13004 "parse.c"
13004 break;
13005
13006 case 133: /* mlhs_node: keyword_variable */
13007#line 3737 "parse.y"
13008 {
13009 /*% ripper: var_field!($:1) %*/
13010 (yyval.node) = assignable(p, (yyvsp[0].id), 0, &(yyloc));
13011 }
13012#line 13013 "parse.c"
13013 break;
13014
13015 case 134: /* mlhs_node: primary_value '[' opt_call_args rbracket */
13016#line 3742 "parse.y"
13017 {
13018 (yyval.node) = aryset(p, (yyvsp[-3].node), (yyvsp[-1].node), &(yyloc));
13019 /*% ripper: aref_field!($:1, $:3) %*/
13020 }
13021#line 13022 "parse.c"
13022 break;
13023
13024 case 135: /* mlhs_node: primary_value call_op "local variable or method" */
13025#line 3747 "parse.y"
13026 {
13027 anddot_multiple_assignment_check(p, &(yylsp[-1]), (yyvsp[-1].id));
13028 (yyval.node) = attrset(p, (yyvsp[-2].node), (yyvsp[-1].id), (yyvsp[0].id), &(yyloc));
13029 /*% ripper: field!($:1, $:2, $:3) %*/
13030 }
13031#line 13032 "parse.c"
13032 break;
13033
13034 case 136: /* mlhs_node: primary_value call_op "constant" */
13035#line 3747 "parse.y"
13036 {
13037 anddot_multiple_assignment_check(p, &(yylsp[-1]), (yyvsp[-1].id));
13038 (yyval.node) = attrset(p, (yyvsp[-2].node), (yyvsp[-1].id), (yyvsp[0].id), &(yyloc));
13039 /*% ripper: field!($:1, $:2, $:3) %*/
13040 }
13041#line 13042 "parse.c"
13042 break;
13043
13044 case 137: /* mlhs_node: primary_value "::" "local variable or method" */
13045#line 3753 "parse.y"
13046 {
13047 (yyval.node) = attrset(p, (yyvsp[-2].node), idCOLON2, (yyvsp[0].id), &(yyloc));
13048 /*% ripper: const_path_field!($:1, $:3) %*/
13049 }
13050#line 13051 "parse.c"
13051 break;
13052
13053 case 138: /* mlhs_node: primary_value "::" "constant" */
13054#line 3758 "parse.y"
13055 {
13056 /*% ripper: const_path_field!($:1, $:3) %*/
13057 (yyval.node) = const_decl(p, NEW_COLON2((yyvsp[-2].node), (yyvsp[0].id), &(yyloc), &(yylsp[-1]), &(yylsp[0])), &(yyloc));
13058 }
13059#line 13060 "parse.c"
13060 break;
13061
13062 case 139: /* mlhs_node: ":: at EXPR_BEG" "constant" */
13063#line 3763 "parse.y"
13064 {
13065 /*% ripper: top_const_field!($:2) %*/
13066 (yyval.node) = const_decl(p, NEW_COLON3((yyvsp[0].id), &(yyloc), &(yylsp[-1]), &(yylsp[0])), &(yyloc));
13067 }
13068#line 13069 "parse.c"
13069 break;
13070
13071 case 140: /* mlhs_node: backref */
13072#line 3768 "parse.y"
13073 {
13074 VALUE MAYBE_UNUSED(e) = rb_backref_error(p, (yyvsp[0].node));
13075 (yyval.node) = NEW_ERROR(&(yyloc));
13076 /*% ripper[error]: assign_error!(?e, var_field!($:1)) %*/
13077 }
13078#line 13079 "parse.c"
13079 break;
13080
13081 case 141: /* lhs: user_variable */
13082#line 3776 "parse.y"
13083 {
13084 /*% ripper: var_field!($:1) %*/
13085 (yyval.node) = assignable(p, (yyvsp[0].id), 0, &(yyloc));
13086 }
13087#line 13088 "parse.c"
13088 break;
13089
13090 case 142: /* lhs: keyword_variable */
13091#line 3776 "parse.y"
13092 {
13093 /*% ripper: var_field!($:1) %*/
13094 (yyval.node) = assignable(p, (yyvsp[0].id), 0, &(yyloc));
13095 }
13096#line 13097 "parse.c"
13097 break;
13098
13099 case 143: /* lhs: primary_value '[' opt_call_args rbracket */
13100#line 3781 "parse.y"
13101 {
13102 (yyval.node) = aryset(p, (yyvsp[-3].node), (yyvsp[-1].node), &(yyloc));
13103 /*% ripper: aref_field!($:1, $:3) %*/
13104 }
13105#line 13106 "parse.c"
13106 break;
13107
13108 case 144: /* lhs: primary_value call_op "local variable or method" */
13109#line 3786 "parse.y"
13110 {
13111 (yyval.node) = attrset(p, (yyvsp[-2].node), (yyvsp[-1].id), (yyvsp[0].id), &(yyloc));
13112 /*% ripper: field!($:1, $:2, $:3) %*/
13113 }
13114#line 13115 "parse.c"
13115 break;
13116
13117 case 145: /* lhs: primary_value call_op "constant" */
13118#line 3786 "parse.y"
13119 {
13120 (yyval.node) = attrset(p, (yyvsp[-2].node), (yyvsp[-1].id), (yyvsp[0].id), &(yyloc));
13121 /*% ripper: field!($:1, $:2, $:3) %*/
13122 }
13123#line 13124 "parse.c"
13124 break;
13125
13126 case 146: /* lhs: primary_value "::" "local variable or method" */
13127#line 3791 "parse.y"
13128 {
13129 (yyval.node) = attrset(p, (yyvsp[-2].node), idCOLON2, (yyvsp[0].id), &(yyloc));
13130 /*% ripper: field!($:1, $:2, $:3) %*/
13131 }
13132#line 13133 "parse.c"
13133 break;
13134
13135 case 147: /* lhs: primary_value "::" "constant" */
13136#line 3796 "parse.y"
13137 {
13138 /*% ripper: const_path_field!($:1, $:3) %*/
13139 (yyval.node) = const_decl(p, NEW_COLON2((yyvsp[-2].node), (yyvsp[0].id), &(yyloc), &(yylsp[-1]), &(yylsp[0])), &(yyloc));
13140 }
13141#line 13142 "parse.c"
13142 break;
13143
13144 case 148: /* lhs: ":: at EXPR_BEG" "constant" */
13145#line 3801 "parse.y"
13146 {
13147 /*% ripper: top_const_field!($:2) %*/
13148 (yyval.node) = const_decl(p, NEW_COLON3((yyvsp[0].id), &(yyloc), &(yylsp[-1]), &(yylsp[0])), &(yyloc));
13149 }
13150#line 13151 "parse.c"
13151 break;
13152
13153 case 149: /* lhs: backref */
13154#line 3806 "parse.y"
13155 {
13156 VALUE MAYBE_UNUSED(e) = rb_backref_error(p, (yyvsp[0].node));
13157 (yyval.node) = NEW_ERROR(&(yyloc));
13158 /*% ripper[error]: assign_error!(?e, var_field!($:1)) %*/
13159 }
13160#line 13161 "parse.c"
13161 break;
13162
13163 case 150: /* cname: "local variable or method" */
13164#line 3814 "parse.y"
13165 {
13166 static const char mesg[] = "class/module name must be CONSTANT";
13167 /*%%%*/
13168 yyerror1(&(yylsp[0]), mesg);
13169 /*% %*/
13170 /*% ripper[error]: class_name_error!(ERR_MESG(), $:1) %*/
13171 }
13172#line 13173 "parse.c"
13173 break;
13174
13175 case 152: /* cpath: ":: at EXPR_BEG" cname */
13176#line 3825 "parse.y"
13177 {
13178 (yyval.node) = NEW_COLON3((yyvsp[0].id), &(yyloc), &(yylsp[-1]), &(yylsp[0]));
13179 /*% ripper: top_const_ref!($:2) %*/
13180 }
13181#line 13182 "parse.c"
13182 break;
13183
13184 case 153: /* cpath: cname */
13185#line 3830 "parse.y"
13186 {
13187 (yyval.node) = NEW_COLON2(0, (yyvsp[0].id), &(yyloc), &NULL_LOC, &(yylsp[0]));
13188 /*% ripper: const_ref!($:1) %*/
13189 }
13190#line 13191 "parse.c"
13191 break;
13192
13193 case 154: /* cpath: primary_value "::" cname */
13194#line 3835 "parse.y"
13195 {
13196 (yyval.node) = NEW_COLON2((yyvsp[-2].node), (yyvsp[0].id), &(yyloc), &(yylsp[-1]), &(yylsp[0]));
13197 /*% ripper: const_path_ref!($:1, $:3) %*/
13198 }
13199#line 13200 "parse.c"
13200 break;
13201
13202 case 158: /* fname: op */
13203#line 3843 "parse.y"
13204 {
13205 SET_LEX_STATE(EXPR_ENDFN);
13206 (yyval.id) = (yyvsp[0].id);
13207 }
13208#line 13209 "parse.c"
13209 break;
13210
13211 case 160: /* fitem: fname */
13212#line 3851 "parse.y"
13213 {
13214 (yyval.node) = NEW_SYM(rb_id2str((yyvsp[0].id)), &(yyloc));
13215 /*% ripper: symbol_literal!($:1) %*/
13216 }
13217#line 13218 "parse.c"
13218 break;
13219
13220 case 162: /* undef_list: fitem */
13221#line 3859 "parse.y"
13222 {
13223 (yyval.node) = NEW_UNDEF((yyvsp[0].node), &(yyloc));
13224 /*% ripper: rb_ary_new3(1, $:1) %*/
13225 }
13226#line 13227 "parse.c"
13227 break;
13228
13229 case 163: /* $@12: %empty */
13230#line 3863 "parse.y"
13231 {SET_LEX_STATE(EXPR_FNAME|EXPR_FITEM);}
13232#line 13233 "parse.c"
13233 break;
13234
13235 case 164: /* undef_list: undef_list ',' $@12 fitem */
13236#line 3864 "parse.y"
13237 {
13238 nd_set_last_loc((yyvsp[-3].node), (yylsp[0]).end_pos);
13239 rb_parser_ary_push_node(p, RNODE_UNDEF((yyvsp[-3].node))->nd_undefs, (yyvsp[0].node));
13240 /*% ripper: rb_ary_push($:1, $:4) %*/
13241 }
13242#line 13243 "parse.c"
13243 break;
13244
13245 case 165: /* op: '|' */
13246#line 3871 "parse.y"
13247 { (yyval.id) = '|'; }
13248#line 13249 "parse.c"
13249 break;
13250
13251 case 166: /* op: '^' */
13252#line 3872 "parse.y"
13253 { (yyval.id) = '^'; }
13254#line 13255 "parse.c"
13255 break;
13256
13257 case 167: /* op: '&' */
13258#line 3873 "parse.y"
13259 { (yyval.id) = '&'; }
13260#line 13261 "parse.c"
13261 break;
13262
13263 case 168: /* op: "<=>" */
13264#line 3874 "parse.y"
13265 { (yyval.id) = tCMP; }
13266#line 13267 "parse.c"
13267 break;
13268
13269 case 169: /* op: "==" */
13270#line 3875 "parse.y"
13271 { (yyval.id) = tEQ; }
13272#line 13273 "parse.c"
13273 break;
13274
13275 case 170: /* op: "===" */
13276#line 3876 "parse.y"
13277 { (yyval.id) = tEQQ; }
13278#line 13279 "parse.c"
13279 break;
13280
13281 case 171: /* op: "=~" */
13282#line 3877 "parse.y"
13283 { (yyval.id) = tMATCH; }
13284#line 13285 "parse.c"
13285 break;
13286
13287 case 172: /* op: "!~" */
13288#line 3878 "parse.y"
13289 { (yyval.id) = tNMATCH; }
13290#line 13291 "parse.c"
13291 break;
13292
13293 case 173: /* op: '>' */
13294#line 3879 "parse.y"
13295 { (yyval.id) = '>'; }
13296#line 13297 "parse.c"
13297 break;
13298
13299 case 174: /* op: ">=" */
13300#line 3880 "parse.y"
13301 { (yyval.id) = tGEQ; }
13302#line 13303 "parse.c"
13303 break;
13304
13305 case 175: /* op: '<' */
13306#line 3881 "parse.y"
13307 { (yyval.id) = '<'; }
13308#line 13309 "parse.c"
13309 break;
13310
13311 case 176: /* op: "<=" */
13312#line 3882 "parse.y"
13313 { (yyval.id) = tLEQ; }
13314#line 13315 "parse.c"
13315 break;
13316
13317 case 177: /* op: "!=" */
13318#line 3883 "parse.y"
13319 { (yyval.id) = tNEQ; }
13320#line 13321 "parse.c"
13321 break;
13322
13323 case 178: /* op: "<<" */
13324#line 3884 "parse.y"
13325 { (yyval.id) = tLSHFT; }
13326#line 13327 "parse.c"
13327 break;
13328
13329 case 179: /* op: ">>" */
13330#line 3885 "parse.y"
13331 { (yyval.id) = tRSHFT; }
13332#line 13333 "parse.c"
13333 break;
13334
13335 case 180: /* op: '+' */
13336#line 3886 "parse.y"
13337 { (yyval.id) = '+'; }
13338#line 13339 "parse.c"
13339 break;
13340
13341 case 181: /* op: '-' */
13342#line 3887 "parse.y"
13343 { (yyval.id) = '-'; }
13344#line 13345 "parse.c"
13345 break;
13346
13347 case 182: /* op: '*' */
13348#line 3888 "parse.y"
13349 { (yyval.id) = '*'; }
13350#line 13351 "parse.c"
13351 break;
13352
13353 case 183: /* op: "*" */
13354#line 3889 "parse.y"
13355 { (yyval.id) = '*'; }
13356#line 13357 "parse.c"
13357 break;
13358
13359 case 184: /* op: '/' */
13360#line 3890 "parse.y"
13361 { (yyval.id) = '/'; }
13362#line 13363 "parse.c"
13363 break;
13364
13365 case 185: /* op: '%' */
13366#line 3891 "parse.y"
13367 { (yyval.id) = '%'; }
13368#line 13369 "parse.c"
13369 break;
13370
13371 case 186: /* op: "**" */
13372#line 3892 "parse.y"
13373 { (yyval.id) = tPOW; }
13374#line 13375 "parse.c"
13375 break;
13376
13377 case 187: /* op: "**arg" */
13378#line 3893 "parse.y"
13379 { (yyval.id) = tDSTAR; }
13380#line 13381 "parse.c"
13381 break;
13382
13383 case 188: /* op: '!' */
13384#line 3894 "parse.y"
13385 { (yyval.id) = '!'; }
13386#line 13387 "parse.c"
13387 break;
13388
13389 case 189: /* op: '~' */
13390#line 3895 "parse.y"
13391 { (yyval.id) = '~'; }
13392#line 13393 "parse.c"
13393 break;
13394
13395 case 190: /* op: "unary+" */
13396#line 3896 "parse.y"
13397 { (yyval.id) = tUPLUS; }
13398#line 13399 "parse.c"
13399 break;
13400
13401 case 191: /* op: "unary-" */
13402#line 3897 "parse.y"
13403 { (yyval.id) = tUMINUS; }
13404#line 13405 "parse.c"
13405 break;
13406
13407 case 192: /* op: "[]" */
13408#line 3898 "parse.y"
13409 { (yyval.id) = tAREF; }
13410#line 13411 "parse.c"
13411 break;
13412
13413 case 193: /* op: "[]=" */
13414#line 3899 "parse.y"
13415 { (yyval.id) = tASET; }
13416#line 13417 "parse.c"
13417 break;
13418
13419 case 194: /* op: '`' */
13420#line 3900 "parse.y"
13421 { (yyval.id) = '`'; }
13422#line 13423 "parse.c"
13423 break;
13424
13425 case 236: /* asgn_arg_rhs: lhs '=' lex_ctxt arg_rhs */
13426#line 2919 "parse.y"
13427 {
13428 (yyval.node) = node_assign(p, (NODE *)(yyvsp[-3].node), (yyvsp[0].node), (yyvsp[-1].ctxt), &(yyloc));
13429 /*% ripper: assign!($:1, $:4) %*/
13430 }
13431#line 13432 "parse.c"
13432 break;
13433
13434 case 238: /* op_asgn_arg_rhs: var_lhs "operator-assignment" lex_ctxt arg_rhs */
13435#line 3044 "parse.y"
13436 {
13437 (yyval.node) = new_op_assign(p, (yyvsp[-3].node), (yyvsp[-2].id), (yyvsp[0].node), (yyvsp[-1].ctxt), &(yyloc));
13438 /*% ripper: opassign!($:1, $:2, $:4) %*/
13439 }
13440#line 13441 "parse.c"
13441 break;
13442
13443 case 239: /* op_asgn_arg_rhs: primary_value '[' opt_call_args rbracket "operator-assignment" lex_ctxt arg_rhs */
13444#line 3049 "parse.y"
13445 {
13446 (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]));
13447 /*% ripper: opassign!(aref_field!($:1, $:3), $:5, $:7) %*/
13448 }
13449#line 13450 "parse.c"
13450 break;
13451
13452 case 240: /* op_asgn_arg_rhs: primary_value call_op "local variable or method" "operator-assignment" lex_ctxt arg_rhs */
13453#line 3054 "parse.y"
13454 {
13455 (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]));
13456 /*% ripper: opassign!(field!($:1, $:2, $:3), $:4, $:6) %*/
13457 }
13458#line 13459 "parse.c"
13459 break;
13460
13461 case 241: /* op_asgn_arg_rhs: primary_value call_op "constant" "operator-assignment" lex_ctxt arg_rhs */
13462#line 3059 "parse.y"
13463 {
13464 (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]));
13465 /*% ripper: opassign!(field!($:1, $:2, $:3), $:4, $:6) %*/
13466 }
13467#line 13468 "parse.c"
13468 break;
13469
13470 case 242: /* op_asgn_arg_rhs: primary_value "::" "local variable or method" "operator-assignment" lex_ctxt arg_rhs */
13471#line 3064 "parse.y"
13472 {
13473 (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]));
13474 /*% ripper: opassign!(field!($:1, $:2, $:3), $:4, $:6) %*/
13475 }
13476#line 13477 "parse.c"
13477 break;
13478
13479 case 243: /* op_asgn_arg_rhs: primary_value "::" "constant" "operator-assignment" lex_ctxt arg_rhs */
13480#line 3069 "parse.y"
13481 {
13482 YYLTYPE loc = code_loc_gen(&(yylsp[-5]), &(yylsp[-3]));
13483 (yyval.node) = new_const_op_assign(p, NEW_COLON2((yyvsp[-5].node), (yyvsp[-3].id), &loc, &(yylsp[-4]), &(yylsp[-3])), (yyvsp[-2].id), (yyvsp[0].node), (yyvsp[-1].ctxt), &(yyloc));
13484 /*% ripper: opassign!(const_path_field!($:1, $:3), $:4, $:6) %*/
13485 }
13486#line 13487 "parse.c"
13487 break;
13488
13489 case 244: /* op_asgn_arg_rhs: ":: at EXPR_BEG" "constant" "operator-assignment" lex_ctxt arg_rhs */
13490#line 3075 "parse.y"
13491 {
13492 YYLTYPE loc = code_loc_gen(&(yylsp[-4]), &(yylsp[-3]));
13493 (yyval.node) = new_const_op_assign(p, NEW_COLON3((yyvsp[-3].id), &loc, &(yylsp[-4]), &(yylsp[-3])), (yyvsp[-2].id), (yyvsp[0].node), (yyvsp[-1].ctxt), &(yyloc));
13494 /*% ripper: opassign!(top_const_field!($:2), $:3, $:5) %*/
13495 }
13496#line 13497 "parse.c"
13497 break;
13498
13499 case 245: /* op_asgn_arg_rhs: backref "operator-assignment" lex_ctxt arg_rhs */
13500#line 3081 "parse.y"
13501 {
13502 VALUE MAYBE_UNUSED(e) = rb_backref_error(p, (yyvsp[-3].node));
13503 (yyval.node) = NEW_ERROR(&(yyloc));
13504 /*% ripper[error]: assign_error!(?e, opassign!(var_field!($:1), $:2, $:4)) %*/
13505 }
13506#line 13507 "parse.c"
13507 break;
13508
13509 case 247: /* range_expr_arg: arg ".." arg */
13510#line 3103 "parse.y"
13511 {
13512 value_expr((yyvsp[-2].node));
13513 value_expr((yyvsp[0].node));
13514 (yyval.node) = NEW_DOT2((yyvsp[-2].node), (yyvsp[0].node), &(yyloc), &(yylsp[-1]));
13515 /*% ripper: dot2!($:1, $:3) %*/
13516 }
13517#line 13518 "parse.c"
13518 break;
13519
13520 case 248: /* range_expr_arg: arg "..." arg */
13521#line 3110 "parse.y"
13522 {
13523 value_expr((yyvsp[-2].node));
13524 value_expr((yyvsp[0].node));
13525 (yyval.node) = NEW_DOT3((yyvsp[-2].node), (yyvsp[0].node), &(yyloc), &(yylsp[-1]));
13526 /*% ripper: dot3!($:1, $:3) %*/
13527 }
13528#line 13529 "parse.c"
13529 break;
13530
13531 case 249: /* range_expr_arg: arg ".." */
13532#line 3117 "parse.y"
13533 {
13534 value_expr((yyvsp[-1].node));
13535 (yyval.node) = NEW_DOT2((yyvsp[-1].node), new_nil_at(p, &(yylsp[0]).end_pos), &(yyloc), &(yylsp[0]));
13536 /*% ripper: dot2!($:1, Qnil) %*/
13537 }
13538#line 13539 "parse.c"
13539 break;
13540
13541 case 250: /* range_expr_arg: arg "..." */
13542#line 3123 "parse.y"
13543 {
13544 value_expr((yyvsp[-1].node));
13545 (yyval.node) = NEW_DOT3((yyvsp[-1].node), new_nil_at(p, &(yylsp[0]).end_pos), &(yyloc), &(yylsp[0]));
13546 /*% ripper: dot3!($:1, Qnil) %*/
13547 }
13548#line 13549 "parse.c"
13549 break;
13550
13551 case 251: /* range_expr_arg: "(.." arg */
13552#line 3129 "parse.y"
13553 {
13554 value_expr((yyvsp[0].node));
13555 (yyval.node) = NEW_DOT2(new_nil_at(p, &(yylsp[-1]).beg_pos), (yyvsp[0].node), &(yyloc), &(yylsp[-1]));
13556 /*% ripper: dot2!(Qnil, $:2) %*/
13557 }
13558#line 13559 "parse.c"
13559 break;
13560
13561 case 252: /* range_expr_arg: "(..." arg */
13562#line 3135 "parse.y"
13563 {
13564 value_expr((yyvsp[0].node));
13565 (yyval.node) = NEW_DOT3(new_nil_at(p, &(yylsp[-1]).beg_pos), (yyvsp[0].node), &(yyloc), &(yylsp[-1]));
13566 /*% ripper: dot3!(Qnil, $:2) %*/
13567 }
13568#line 13569 "parse.c"
13569 break;
13570
13571 case 254: /* arg: arg '+' arg */
13572#line 3921 "parse.y"
13573 {
13574 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), '+', (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
13575 /*% ripper: binary!($:1, ID2VAL('\'+\''), $:3) %*/
13576 }
13577#line 13578 "parse.c"
13578 break;
13579
13580 case 255: /* arg: arg '-' arg */
13581#line 3926 "parse.y"
13582 {
13583 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), '-', (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
13584 /*% ripper: binary!($:1, ID2VAL('\'-\''), $:3) %*/
13585 }
13586#line 13587 "parse.c"
13587 break;
13588
13589 case 256: /* arg: arg '*' arg */
13590#line 3931 "parse.y"
13591 {
13592 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), '*', (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
13593 /*% ripper: binary!($:1, ID2VAL('\'*\''), $:3) %*/
13594 }
13595#line 13596 "parse.c"
13596 break;
13597
13598 case 257: /* arg: arg '/' arg */
13599#line 3936 "parse.y"
13600 {
13601 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), '/', (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
13602 /*% ripper: binary!($:1, ID2VAL('\'/\''), $:3) %*/
13603 }
13604#line 13605 "parse.c"
13605 break;
13606
13607 case 258: /* arg: arg '%' arg */
13608#line 3941 "parse.y"
13609 {
13610 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), '%', (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
13611 /*% ripper: binary!($:1, ID2VAL('\'%\''), $:3) %*/
13612 }
13613#line 13614 "parse.c"
13614 break;
13615
13616 case 259: /* arg: arg "**" arg */
13617#line 3946 "parse.y"
13618 {
13619 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), idPow, (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
13620 /*% ripper: binary!($:1, ID2VAL(idPow), $:3) %*/
13621 }
13622#line 13623 "parse.c"
13623 break;
13624
13625 case 260: /* arg: tUMINUS_NUM simple_numeric "**" arg */
13626#line 3951 "parse.y"
13627 {
13628 (yyval.node) = call_uni_op(p, call_bin_op(p, (yyvsp[-2].node), idPow, (yyvsp[0].node), &(yylsp[-2]), &(yyloc)), idUMinus, &(yylsp[-3]), &(yyloc));
13629 /*% ripper: unary!(ID2VAL(idUMinus), binary!($:2, ID2VAL(idPow), $:4)) %*/
13630 }
13631#line 13632 "parse.c"
13632 break;
13633
13634 case 261: /* arg: "unary+" arg */
13635#line 3956 "parse.y"
13636 {
13637 (yyval.node) = call_uni_op(p, (yyvsp[0].node), idUPlus, &(yylsp[-1]), &(yyloc));
13638 /*% ripper: unary!(ID2VAL(idUPlus), $:2) %*/
13639 }
13640#line 13641 "parse.c"
13641 break;
13642
13643 case 262: /* arg: "unary-" arg */
13644#line 3961 "parse.y"
13645 {
13646 (yyval.node) = call_uni_op(p, (yyvsp[0].node), idUMinus, &(yylsp[-1]), &(yyloc));
13647 /*% ripper: unary!(ID2VAL(idUMinus), $:2) %*/
13648 }
13649#line 13650 "parse.c"
13650 break;
13651
13652 case 263: /* arg: arg '|' arg */
13653#line 3966 "parse.y"
13654 {
13655 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), '|', (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
13656 /*% ripper: binary!($:1, ID2VAL('\'|\''), $:3) %*/
13657 }
13658#line 13659 "parse.c"
13659 break;
13660
13661 case 264: /* arg: arg '^' arg */
13662#line 3971 "parse.y"
13663 {
13664 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), '^', (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
13665 /*% ripper: binary!($:1, ID2VAL('\'^\''), $:3) %*/
13666 }
13667#line 13668 "parse.c"
13668 break;
13669
13670 case 265: /* arg: arg '&' arg */
13671#line 3976 "parse.y"
13672 {
13673 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), '&', (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
13674 /*% ripper: binary!($:1, ID2VAL('\'&\''), $:3) %*/
13675 }
13676#line 13677 "parse.c"
13677 break;
13678
13679 case 266: /* arg: arg "<=>" arg */
13680#line 3981 "parse.y"
13681 {
13682 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), idCmp, (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
13683 /*% ripper: binary!($:1, ID2VAL(idCmp), $:3) %*/
13684 }
13685#line 13686 "parse.c"
13686 break;
13687
13688 case 268: /* arg: arg "==" arg */
13689#line 3987 "parse.y"
13690 {
13691 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), idEq, (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
13692 /*% ripper: binary!($:1, ID2VAL(idEq), $:3) %*/
13693 }
13694#line 13695 "parse.c"
13695 break;
13696
13697 case 269: /* arg: arg "===" arg */
13698#line 3992 "parse.y"
13699 {
13700 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), idEqq, (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
13701 /*% ripper: binary!($:1, ID2VAL(idEqq), $:3) %*/
13702 }
13703#line 13704 "parse.c"
13704 break;
13705
13706 case 270: /* arg: arg "!=" arg */
13707#line 3997 "parse.y"
13708 {
13709 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), idNeq, (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
13710 /*% ripper: binary!($:1, ID2VAL(idNeq), $:3) %*/
13711 }
13712#line 13713 "parse.c"
13713 break;
13714
13715 case 271: /* arg: arg "=~" arg */
13716#line 4002 "parse.y"
13717 {
13718 (yyval.node) = match_op(p, (yyvsp[-2].node), (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
13719 /*% ripper: binary!($:1, ID2VAL(idEqTilde), $:3) %*/
13720 }
13721#line 13722 "parse.c"
13722 break;
13723
13724 case 272: /* arg: arg "!~" arg */
13725#line 4007 "parse.y"
13726 {
13727 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), idNeqTilde, (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
13728 /*% ripper: binary!($:1, ID2VAL(idNeqTilde), $:3) %*/
13729 }
13730#line 13731 "parse.c"
13731 break;
13732
13733 case 273: /* arg: '!' arg */
13734#line 4012 "parse.y"
13735 {
13736 (yyval.node) = call_uni_op(p, method_cond(p, (yyvsp[0].node), &(yylsp[0])), '!', &(yylsp[-1]), &(yyloc));
13737 /*% ripper: unary!(ID2VAL('\'!\''), $:2) %*/
13738 }
13739#line 13740 "parse.c"
13740 break;
13741
13742 case 274: /* arg: '~' arg */
13743#line 4017 "parse.y"
13744 {
13745 (yyval.node) = call_uni_op(p, (yyvsp[0].node), '~', &(yylsp[-1]), &(yyloc));
13746 /*% ripper: unary!(ID2VAL('\'~\''), $:2) %*/
13747 }
13748#line 13749 "parse.c"
13749 break;
13750
13751 case 275: /* arg: arg "<<" arg */
13752#line 4022 "parse.y"
13753 {
13754 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), idLTLT, (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
13755 /*% ripper: binary!($:1, ID2VAL(idLTLT), $:3) %*/
13756 }
13757#line 13758 "parse.c"
13758 break;
13759
13760 case 276: /* arg: arg ">>" arg */
13761#line 4027 "parse.y"
13762 {
13763 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), idGTGT, (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
13764 /*% ripper: binary!($:1, ID2VAL(idGTGT), $:3) %*/
13765 }
13766#line 13767 "parse.c"
13767 break;
13768
13769 case 277: /* arg: arg "&&" arg */
13770#line 4032 "parse.y"
13771 {
13772 (yyval.node) = logop(p, idANDOP, (yyvsp[-2].node), (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
13773 /*% ripper: binary!($:1, ID2VAL(idANDOP), $:3) %*/
13774 }
13775#line 13776 "parse.c"
13776 break;
13777
13778 case 278: /* arg: arg "||" arg */
13779#line 4037 "parse.y"
13780 {
13781 (yyval.node) = logop(p, idOROP, (yyvsp[-2].node), (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
13782 /*% ripper: binary!($:1, ID2VAL(idOROP), $:3) %*/
13783 }
13784#line 13785 "parse.c"
13785 break;
13786
13787 case 279: /* arg: "'defined?'" option_'\n' begin_defined arg */
13788#line 4042 "parse.y"
13789 {
13790 p->ctxt.in_defined = (yyvsp[-1].ctxt).in_defined;
13791 (yyval.node) = new_defined(p, (yyvsp[0].node), &(yyloc), &(yylsp[-3]));
13792 p->ctxt.has_trailing_semicolon = (yyvsp[-1].ctxt).has_trailing_semicolon;
13793 /*% ripper: defined!($:4) %*/
13794 }
13795#line 13796 "parse.c"
13796 break;
13797
13798 case 280: /* def_endless_method_endless_arg: defn_head f_opt_paren_args '=' endless_arg */
13799#line 2949 "parse.y"
13800 {
13801 endless_method_name(p, (yyvsp[-3].node_def_temp)->nd_mid, &(yylsp[-3]));
13802 restore_defun(p, (yyvsp[-3].node_def_temp));
13803 (yyvsp[0].node) = new_scope_body(p, (yyvsp[-2].node_args), (yyvsp[0].node), &(yyloc));
13804 ((yyval.node) = (yyvsp[-3].node_def_temp)->nd_def)->nd_loc = (yyloc);
13805 RNODE_DEFN((yyval.node))->nd_defn = (yyvsp[0].node);
13806 /*% ripper: bodystmt!($:bodystmt, Qnil, Qnil, Qnil) %*/
13807 /*% ripper: def!($:head, $:args, $:$) %*/
13808 local_pop(p);
13809 }
13810#line 13811 "parse.c"
13811 break;
13812
13813 case 281: /* def_endless_method_endless_arg: defs_head f_opt_paren_args '=' endless_arg */
13814#line 2960 "parse.y"
13815 {
13816 endless_method_name(p, (yyvsp[-3].node_def_temp)->nd_mid, &(yylsp[-3]));
13817 restore_defun(p, (yyvsp[-3].node_def_temp));
13818 (yyvsp[0].node) = new_scope_body(p, (yyvsp[-2].node_args), (yyvsp[0].node), &(yyloc));
13819 ((yyval.node) = (yyvsp[-3].node_def_temp)->nd_def)->nd_loc = (yyloc);
13820 RNODE_DEFS((yyval.node))->nd_defn = (yyvsp[0].node);
13821 /*% ripper: bodystmt!($:bodystmt, Qnil, Qnil, Qnil) %*/
13822 /*% ripper: defs!(*$:head[0..2], $:args, $:$) %*/
13823 local_pop(p);
13824 }
13825#line 13826 "parse.c"
13826 break;
13827
13828 case 285: /* ternary: arg '?' arg option_'\n' ':' arg */
13829#line 4054 "parse.y"
13830 {
13831 value_expr((yyvsp[-5].node));
13832 (yyval.node) = new_if(p, (yyvsp[-5].node), (yyvsp[-3].node), (yyvsp[0].node), &(yyloc), &NULL_LOC, &(yylsp[-1]), &NULL_LOC);
13833 fixpos((yyval.node), (yyvsp[-5].node));
13834 /*% ripper: ifop!($:1, $:3, $:6) %*/
13835 }
13836#line 13837 "parse.c"
13837 break;
13838
13839 case 287: /* endless_arg: endless_arg "'rescue' modifier" after_rescue arg */
13840#line 4064 "parse.y"
13841 {
13842 p->ctxt.in_rescue = (yyvsp[-1].ctxt).in_rescue;
13843 (yyval.node) = rescued_expr(p, (yyvsp[-3].node), (yyvsp[0].node), &(yylsp[-3]), &(yylsp[-2]), &(yylsp[0]));
13844 /*% ripper: rescue_mod!($:1, $:4) %*/
13845 }
13846#line 13847 "parse.c"
13847 break;
13848
13849 case 288: /* endless_arg: "'not'" option_'\n' endless_arg */
13850#line 4070 "parse.y"
13851 {
13852 (yyval.node) = call_uni_op(p, method_cond(p, (yyvsp[0].node), &(yylsp[0])), METHOD_NOT, &(yylsp[-2]), &(yyloc));
13853 /*% ripper: unary!(ID2VAL(idNOT), $:3) %*/
13854 }
13855#line 13856 "parse.c"
13856 break;
13857
13858 case 289: /* relop: '>' */
13859#line 4076 "parse.y"
13860 {(yyval.id) = '>';}
13861#line 13862 "parse.c"
13862 break;
13863
13864 case 290: /* relop: '<' */
13865#line 4077 "parse.y"
13866 {(yyval.id) = '<';}
13867#line 13868 "parse.c"
13868 break;
13869
13870 case 291: /* relop: ">=" */
13871#line 4078 "parse.y"
13872 {(yyval.id) = idGE;}
13873#line 13874 "parse.c"
13874 break;
13875
13876 case 292: /* relop: "<=" */
13877#line 4079 "parse.y"
13878 {(yyval.id) = idLE;}
13879#line 13880 "parse.c"
13880 break;
13881
13882 case 293: /* rel_expr: arg relop arg */
13883#line 4083 "parse.y"
13884 {
13885 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), (yyvsp[-1].id), (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
13886 /*% ripper: binary!($:1, ID2VAL($2), $:3) %*/
13887 }
13888#line 13889 "parse.c"
13889 break;
13890
13891 case 294: /* rel_expr: rel_expr relop arg */
13892#line 4088 "parse.y"
13893 {
13894 rb_warning1("comparison '%s' after comparison", WARN_ID((yyvsp[-1].id)));
13895 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), (yyvsp[-1].id), (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
13896 /*% ripper: binary!($:1, ID2VAL($2), $:3) %*/
13897 }
13898#line 13899 "parse.c"
13899 break;
13900
13901 case 295: /* lex_ctxt: none */
13902#line 4096 "parse.y"
13903 {
13904 (yyval.ctxt) = p->ctxt;
13905 }
13906#line 13907 "parse.c"
13907 break;
13908
13909 case 296: /* begin_defined: lex_ctxt */
13910#line 4102 "parse.y"
13911 {
13912 p->ctxt.in_defined = 1;
13913 (yyval.ctxt) = (yyvsp[0].ctxt);
13914 }
13915#line 13916 "parse.c"
13916 break;
13917
13918 case 297: /* after_rescue: lex_ctxt */
13919#line 4109 "parse.y"
13920 {
13921 p->ctxt.in_rescue = after_rescue;
13922 (yyval.ctxt) = (yyvsp[0].ctxt);
13923 }
13924#line 13925 "parse.c"
13925 break;
13926
13927 case 298: /* value_expr_arg: arg */
13928#line 3144 "parse.y"
13929 {
13930 value_expr((yyvsp[0].node));
13931 (yyval.node) = (yyvsp[0].node);
13932 }
13933#line 13934 "parse.c"
13934 break;
13935
13936 case 302: /* aref_args: args ',' assocs trailer */
13937#line 4121 "parse.y"
13938 {
13939 (yyval.node) = (yyvsp[-1].node) ? arg_append(p, (yyvsp[-3].node), new_hash(p, (yyvsp[-1].node), &(yylsp[-1])), &(yyloc)) : (yyvsp[-3].node);
13940 /*% ripper: args_add!($:1, bare_assoc_hash!($:3)) %*/
13941 }
13942#line 13943 "parse.c"
13943 break;
13944
13945 case 303: /* aref_args: assocs trailer */
13946#line 4126 "parse.y"
13947 {
13948 (yyval.node) = (yyvsp[-1].node) ? NEW_LIST(new_hash(p, (yyvsp[-1].node), &(yylsp[-1])), &(yyloc)) : 0;
13949 /*% ripper: args_add!(args_new!, bare_assoc_hash!($:1)) %*/
13950 }
13951#line 13952 "parse.c"
13952 break;
13953
13954 case 304: /* arg_rhs: arg */
13955#line 4133 "parse.y"
13956 {
13957 value_expr((yyvsp[0].node));
13958 (yyval.node) = (yyvsp[0].node);
13959 }
13960#line 13961 "parse.c"
13961 break;
13962
13963 case 305: /* arg_rhs: arg "'rescue' modifier" after_rescue arg */
13964#line 4138 "parse.y"
13965 {
13966 p->ctxt.in_rescue = (yyvsp[-1].ctxt).in_rescue;
13967 value_expr((yyvsp[-3].node));
13968 (yyval.node) = rescued_expr(p, (yyvsp[-3].node), (yyvsp[0].node), &(yylsp[-3]), &(yylsp[-2]), &(yylsp[0]));
13969 /*% ripper: rescue_mod!($:1, $:4) %*/
13970 }
13971#line 13972 "parse.c"
13972 break;
13973
13974 case 306: /* paren_args: '(' opt_call_args rparen */
13975#line 4147 "parse.y"
13976 {
13977 (yyval.node) = (yyvsp[-1].node);
13978 /*% ripper: arg_paren!($:2) %*/
13979 }
13980#line 13981 "parse.c"
13981 break;
13982
13983 case 307: /* paren_args: '(' args ',' args_forward rparen */
13984#line 4152 "parse.y"
13985 {
13986 if (!check_forwarding_args(p)) {
13987 (yyval.node) = 0;
13988 }
13989 else {
13990 (yyval.node) = new_args_forward_call(p, (yyvsp[-3].node), &(yylsp[-1]), &(yyloc));
13991 /*% ripper: arg_paren!(args_add!($:2, $:4)) %*/
13992 }
13993 }
13994#line 13995 "parse.c"
13995 break;
13996
13997 case 308: /* paren_args: '(' args_forward rparen */
13998#line 4162 "parse.y"
13999 {
14000 if (!check_forwarding_args(p)) {
14001 (yyval.node) = 0;
14002 }
14003 else {
14004 (yyval.node) = new_args_forward_call(p, 0, &(yylsp[-1]), &(yyloc));
14005 /*% ripper: arg_paren!($:2) %*/
14006 }
14007 }
14008#line 14009 "parse.c"
14009 break;
14010
14011 case 310: /* opt_paren_args: paren_args */
14012#line 4175 "parse.y"
14013 {
14014 (yyval.node) = (yyvsp[0].node) ? (yyvsp[0].node) : NODE_SPECIAL_EMPTY_ARGS;
14015 }
14016#line 14017 "parse.c"
14017 break;
14018
14019 case 314: /* opt_call_args: args ',' assocs ',' */
14020#line 4184 "parse.y"
14021 {
14022 (yyval.node) = (yyvsp[-1].node) ? arg_append(p, (yyvsp[-3].node), new_hash(p, (yyvsp[-1].node), &(yylsp[-1])), &(yyloc)) : (yyvsp[-3].node);
14023 /*% ripper: args_add!($:1, bare_assoc_hash!($:3)) %*/
14024 }
14025#line 14026 "parse.c"
14026 break;
14027
14028 case 315: /* opt_call_args: assocs ',' */
14029#line 4189 "parse.y"
14030 {
14031 (yyval.node) = (yyvsp[-1].node) ? NEW_LIST(new_hash(p, (yyvsp[-1].node), &(yylsp[-1])), &(yylsp[-1])) : 0;
14032 /*% ripper: args_add!(args_new!, bare_assoc_hash!($:1)) %*/
14033 }
14034#line 14035 "parse.c"
14035 break;
14036
14037 case 316: /* value_expr_command: command */
14038#line 3144 "parse.y"
14039 {
14040 value_expr((yyvsp[0].node));
14041 (yyval.node) = (yyvsp[0].node);
14042 }
14043#line 14044 "parse.c"
14044 break;
14045
14046 case 317: /* call_args: value_expr_command */
14047#line 4196 "parse.y"
14048 {
14049 (yyval.node) = NEW_LIST((yyvsp[0].node), &(yyloc));
14050 /*% ripper: args_add!(args_new!, $:1) %*/
14051 }
14052#line 14053 "parse.c"
14053 break;
14054
14055 case 318: /* call_args: args opt_block_arg */
14056#line 4201 "parse.y"
14057 {
14058 (yyval.node) = arg_blk_pass((yyvsp[-1].node), (yyvsp[0].node_block_pass));
14059 /*% ripper: args_add_block!($:1, $:2) %*/
14060 }
14061#line 14062 "parse.c"
14062 break;
14063
14064 case 319: /* call_args: assocs opt_block_arg */
14065#line 4206 "parse.y"
14066 {
14067 (yyval.node) = (yyvsp[-1].node) ? NEW_LIST(new_hash(p, (yyvsp[-1].node), &(yylsp[-1])), &(yylsp[-1])) : 0;
14068 (yyval.node) = arg_blk_pass((yyval.node), (yyvsp[0].node_block_pass));
14069 /*% ripper: args_add_block!(args_add!(args_new!, bare_assoc_hash!($:1)), $:2) %*/
14070 }
14071#line 14072 "parse.c"
14072 break;
14073
14074 case 320: /* call_args: args ',' assocs opt_block_arg */
14075#line 4212 "parse.y"
14076 {
14077 (yyval.node) = (yyvsp[-1].node) ? arg_append(p, (yyvsp[-3].node), new_hash(p, (yyvsp[-1].node), &(yylsp[-1])), &(yyloc)) : (yyvsp[-3].node);
14078 (yyval.node) = arg_blk_pass((yyval.node), (yyvsp[0].node_block_pass));
14079 /*% ripper: args_add_block!(args_add!($:1, bare_assoc_hash!($:3)), $:4) %*/
14080 }
14081#line 14082 "parse.c"
14082 break;
14083
14084 case 322: /* $@13: %empty */
14085#line 4221 "parse.y"
14086 {
14087 /* If call_args starts with a open paren '(' or '[',
14088 * look-ahead reading of the letters calls CMDARG_PUSH(0),
14089 * but the push must be done after CMDARG_PUSH(1).
14090 * So this code makes them consistent by first cancelling
14091 * the premature CMDARG_PUSH(0), doing CMDARG_PUSH(1),
14092 * and finally redoing CMDARG_PUSH(0).
14093 */
14094 int lookahead = 0;
14095 switch (yychar) {
14096 case '(': case tLPAREN: case tLPAREN_ARG: case '[': case tLBRACK:
14097 lookahead = 1;
14098 }
14099 if (lookahead) CMDARG_POP();
14100 CMDARG_PUSH(1);
14101 if (lookahead) CMDARG_PUSH(0);
14102 }
14103#line 14104 "parse.c"
14104 break;
14105
14106 case 323: /* command_args: $@13 call_args */
14107#line 4239 "parse.y"
14108 {
14109 /* call_args can be followed by tLBRACE_ARG (that does CMDARG_PUSH(0) in the lexer)
14110 * but the push must be done after CMDARG_POP() in the parser.
14111 * So this code does CMDARG_POP() to pop 0 pushed by tLBRACE_ARG,
14112 * CMDARG_POP() to pop 1 pushed by command_args,
14113 * and CMDARG_PUSH(0) to restore back the flag set by tLBRACE_ARG.
14114 */
14115 int lookahead = 0;
14116 switch (yychar) {
14117 case tLBRACE_ARG:
14118 lookahead = 1;
14119 }
14120 if (lookahead) CMDARG_POP();
14121 CMDARG_POP();
14122 if (lookahead) CMDARG_PUSH(0);
14123 (yyval.node) = (yyvsp[0].node);
14124 /*% ripper: $:2 %*/
14125 }
14126#line 14127 "parse.c"
14127 break;
14128
14129 case 324: /* block_arg: "&" arg_value */
14130#line 4260 "parse.y"
14131 {
14132 (yyval.node_block_pass) = NEW_BLOCK_PASS((yyvsp[0].node), &(yyloc), &(yylsp[-1]));
14133 /*% ripper: $:2 %*/
14134 }
14135#line 14136 "parse.c"
14136 break;
14137
14138 case 325: /* block_arg: "&" */
14139#line 4265 "parse.y"
14140 {
14141 forwarding_arg_check(p, idFWD_BLOCK, idFWD_ALL, "block");
14142 (yyval.node_block_pass) = NEW_BLOCK_PASS(NEW_LVAR(idFWD_BLOCK, &(yylsp[0])), &(yyloc), &(yylsp[0]));
14143 /*% ripper: Qnil %*/
14144 }
14145#line 14146 "parse.c"
14146 break;
14147
14148 case 326: /* opt_block_arg: ',' block_arg */
14149#line 4273 "parse.y"
14150 {
14151 (yyval.node_block_pass) = (yyvsp[0].node_block_pass);
14152 /*% ripper: $:2 %*/
14153 }
14154#line 14155 "parse.c"
14155 break;
14156
14157 case 327: /* opt_block_arg: none */
14158#line 4278 "parse.y"
14159 {
14160 (yyval.node_block_pass) = 0;
14161 /*% ripper: Qfalse %*/
14162 }
14163#line 14164 "parse.c"
14164 break;
14165
14166 case 328: /* args: arg_value */
14167#line 4286 "parse.y"
14168 {
14169 (yyval.node) = NEW_LIST((yyvsp[0].node), &(yyloc));
14170 /*% ripper: args_add!(args_new!, $:arg_value) %*/
14171 }
14172#line 14173 "parse.c"
14173 break;
14174
14175 case 329: /* args: arg_splat */
14176#line 4291 "parse.y"
14177 {
14178 (yyval.node) = (yyvsp[0].node);
14179 /*% ripper: args_add_star!(args_new!, $:arg_splat) %*/
14180 }
14181#line 14182 "parse.c"
14182 break;
14183
14184 case 330: /* args: args ',' arg_value */
14185#line 4296 "parse.y"
14186 {
14187 (yyval.node) = last_arg_append(p, (yyvsp[-2].node), (yyvsp[0].node), &(yyloc));
14188 /*% ripper: args_add!($:non_last_args, $:arg_value) %*/
14189 }
14190#line 14191 "parse.c"
14191 break;
14192
14193 case 331: /* args: args ',' arg_splat */
14194#line 4301 "parse.y"
14195 {
14196 (yyval.node) = rest_arg_append(p, (yyvsp[-2].node), RNODE_SPLAT((yyvsp[0].node))->nd_head, &(yyloc));
14197 /*% ripper: args_add_star!($:non_last_args, $:arg_splat) %*/
14198 }
14199#line 14200 "parse.c"
14200 break;
14201
14202 case 332: /* arg_splat: "*" arg_value */
14203#line 4309 "parse.y"
14204 {
14205 (yyval.node) = NEW_SPLAT((yyvsp[0].node), &(yyloc), &(yylsp[-1]));
14206 /*% ripper: $:arg_value %*/
14207 }
14208#line 14209 "parse.c"
14209 break;
14210
14211 case 333: /* arg_splat: "*" */
14212#line 4314 "parse.y"
14213 {
14214 forwarding_arg_check(p, idFWD_REST, idFWD_ALL, "rest");
14215 (yyval.node) = NEW_SPLAT(NEW_LVAR(idFWD_REST, &(yylsp[0])), &(yyloc), &(yylsp[0]));
14216 /*% ripper: Qnil %*/
14217 }
14218#line 14219 "parse.c"
14219 break;
14220
14221 case 336: /* mrhs: args ',' arg_value */
14222#line 4328 "parse.y"
14223 {
14224 (yyval.node) = last_arg_append(p, (yyvsp[-2].node), (yyvsp[0].node), &(yyloc));
14225 /*% ripper: mrhs_add!(mrhs_new_from_args!($:args), $:arg_value) %*/
14226 }
14227#line 14228 "parse.c"
14228 break;
14229
14230 case 337: /* mrhs: args ',' "*" arg_value */
14231#line 4333 "parse.y"
14232 {
14233 (yyval.node) = rest_arg_append(p, (yyvsp[-3].node), (yyvsp[0].node), &(yyloc));
14234 /*% ripper: mrhs_add_star!(mrhs_new_from_args!($:args), $:arg_value) %*/
14235 }
14236#line 14237 "parse.c"
14237 break;
14238
14239 case 338: /* mrhs: "*" arg_value */
14240#line 4338 "parse.y"
14241 {
14242 (yyval.node) = NEW_SPLAT((yyvsp[0].node), &(yyloc), &(yylsp[-1]));
14243 /*% ripper: mrhs_add_star!(mrhs_new!, $:arg_value) %*/
14244 }
14245#line 14246 "parse.c"
14246 break;
14247
14248 case 349: /* primary: "method" */
14249#line 4359 "parse.y"
14250 {
14251 (yyval.node) = (NODE *)NEW_FCALL((yyvsp[0].id), 0, &(yyloc));
14252 /*% ripper: method_add_arg!(fcall!($:1), args_new!) %*/
14253 }
14254#line 14255 "parse.c"
14255 break;
14256
14257 case 350: /* $@14: %empty */
14258#line 4364 "parse.y"
14259 {
14260 CMDARG_PUSH(0);
14261 }
14262#line 14263 "parse.c"
14263 break;
14264
14265 case 351: /* primary: k_begin $@14 bodystmt k_end */
14266#line 4369 "parse.y"
14267 {
14268 CMDARG_POP();
14269 set_line_body((yyvsp[-1].node), (yylsp[-3]).end_pos.lineno);
14270 (yyval.node) = NEW_BEGIN((yyvsp[-1].node), &(yyloc));
14271 nd_set_line((yyval.node), (yylsp[-3]).end_pos.lineno);
14272 /*% ripper: begin!($:3) %*/
14273 }
14274#line 14275 "parse.c"
14275 break;
14276
14277 case 352: /* $@15: %empty */
14278#line 4376 "parse.y"
14279 {SET_LEX_STATE(EXPR_ENDARG);}
14280#line 14281 "parse.c"
14281 break;
14282
14283 case 353: /* primary: "( arg" compstmt_stmts $@15 ')' */
14284#line 4377 "parse.y"
14285 {
14286 if (nd_type_p((yyvsp[-2].node), NODE_SELF)) RNODE_SELF((yyvsp[-2].node))->nd_state = 0;
14287 (yyval.node) = (yyvsp[-2].node);
14288 /*% ripper: paren!($:2) %*/
14289 }
14290#line 14291 "parse.c"
14291 break;
14292
14293 case 354: /* primary: "(" compstmt_stmts ')' */
14294#line 4383 "parse.y"
14295 {
14296 if (nd_type_p((yyvsp[-1].node), NODE_SELF)) RNODE_SELF((yyvsp[-1].node))->nd_state = 0;
14297 (yyval.node) = NEW_BLOCK((yyvsp[-1].node), &(yyloc));
14298 /*% ripper: paren!($:2) %*/
14299 }
14300#line 14301 "parse.c"
14301 break;
14302
14303 case 355: /* primary: primary_value "::" "constant" */
14304#line 4389 "parse.y"
14305 {
14306 (yyval.node) = NEW_COLON2((yyvsp[-2].node), (yyvsp[0].id), &(yyloc), &(yylsp[-1]), &(yylsp[0]));
14307 /*% ripper: const_path_ref!($:1, $:3) %*/
14308 }
14309#line 14310 "parse.c"
14310 break;
14311
14312 case 356: /* primary: ":: at EXPR_BEG" "constant" */
14313#line 4394 "parse.y"
14314 {
14315 (yyval.node) = NEW_COLON3((yyvsp[0].id), &(yyloc), &(yylsp[-1]), &(yylsp[0]));
14316 /*% ripper: top_const_ref!($:2) %*/
14317 }
14318#line 14319 "parse.c"
14319 break;
14320
14321 case 357: /* primary: "[" aref_args ']' */
14322#line 4399 "parse.y"
14323 {
14324 (yyval.node) = make_list((yyvsp[-1].node), &(yyloc));
14325 /*% ripper: array!($:2) %*/
14326 }
14327#line 14328 "parse.c"
14328 break;
14329
14330 case 358: /* primary: "{" assoc_list '}' */
14331#line 4404 "parse.y"
14332 {
14333 (yyval.node) = new_hash(p, (yyvsp[-1].node), &(yyloc));
14334 RNODE_HASH((yyval.node))->nd_brace = TRUE;
14335 /*% ripper: hash!($:2) %*/
14336 }
14337#line 14338 "parse.c"
14338 break;
14339
14340 case 359: /* primary: k_return */
14341#line 4410 "parse.y"
14342 {
14343 (yyval.node) = NEW_RETURN(0, &(yyloc), &(yylsp[0]));
14344 /*% ripper: return0! %*/
14345 }
14346#line 14347 "parse.c"
14347 break;
14348
14349 case 360: /* primary: k_yield '(' call_args rparen */
14350#line 4415 "parse.y"
14351 {
14352 (yyval.node) = NEW_YIELD((yyvsp[-1].node), &(yyloc), &(yylsp[-3]), &(yylsp[-2]), &(yylsp[0]));
14353 /*% ripper: yield!(paren!($:3)) %*/
14354 }
14355#line 14356 "parse.c"
14356 break;
14357
14358 case 361: /* primary: k_yield '(' rparen */
14359#line 4420 "parse.y"
14360 {
14361 (yyval.node) = NEW_YIELD(0, &(yyloc), &(yylsp[-2]), &(yylsp[-1]), &(yylsp[0]));
14362 /*% ripper: yield!(paren!(args_new!)) %*/
14363 }
14364#line 14365 "parse.c"
14365 break;
14366
14367 case 362: /* primary: k_yield */
14368#line 4425 "parse.y"
14369 {
14370 (yyval.node) = NEW_YIELD(0, &(yyloc), &(yylsp[0]), &NULL_LOC, &NULL_LOC);
14371 /*% ripper: yield0! %*/
14372 }
14373#line 14374 "parse.c"
14374 break;
14375
14376 case 363: /* primary: "'defined?'" option_'\n' '(' begin_defined expr rparen */
14377#line 4430 "parse.y"
14378 {
14379 p->ctxt.in_defined = (yyvsp[-2].ctxt).in_defined;
14380 (yyval.node) = new_defined(p, (yyvsp[-1].node), &(yyloc), &(yylsp[-5]));
14381 p->ctxt.has_trailing_semicolon = (yyvsp[-2].ctxt).has_trailing_semicolon;
14382 /*% ripper: defined!($:5) %*/
14383 }
14384#line 14385 "parse.c"
14385 break;
14386
14387 case 364: /* primary: "'not'" '(' expr rparen */
14388#line 4437 "parse.y"
14389 {
14390 (yyval.node) = call_uni_op(p, method_cond(p, (yyvsp[-1].node), &(yylsp[-1])), METHOD_NOT, &(yylsp[-3]), &(yyloc));
14391 /*% ripper: unary!(ID2VAL(idNOT), $:3) %*/
14392 }
14393#line 14394 "parse.c"
14394 break;
14395
14396 case 365: /* primary: "'not'" '(' rparen */
14397#line 4442 "parse.y"
14398 {
14399 (yyval.node) = call_uni_op(p, method_cond(p, new_nil(&(yylsp[-1])), &(yylsp[-1])), METHOD_NOT, &(yylsp[-2]), &(yyloc));
14400 /*% ripper: unary!(ID2VAL(idNOT), Qnil) %*/
14401 }
14402#line 14403 "parse.c"
14403 break;
14404
14405 case 366: /* primary: fcall brace_block */
14406#line 4447 "parse.y"
14407 {
14408 (yyval.node) = method_add_block(p, (NODE *)(yyvsp[-1].node_fcall), (yyvsp[0].node), &(yyloc));
14409 /*% ripper: method_add_block!(method_add_arg!(fcall!($:1), args_new!), $:2) %*/
14410 }
14411#line 14412 "parse.c"
14412 break;
14413
14414 case 368: /* primary: method_call brace_block */
14415#line 4453 "parse.y"
14416 {
14417 block_dup_check(p, get_nd_args(p, (yyvsp[-1].node)), (yyvsp[0].node));
14418 (yyval.node) = method_add_block(p, (yyvsp[-1].node), (yyvsp[0].node), &(yyloc));
14419 /*% ripper: method_add_block!($:1, $:2) %*/
14420 }
14421#line 14422 "parse.c"
14422 break;
14423
14424 case 370: /* primary: k_if expr_value then compstmt_stmts if_tail k_end */
14425#line 4463 "parse.y"
14426 {
14427 if ((yyvsp[-1].node) && nd_type_p((yyvsp[-1].node), NODE_IF))
14428 RNODE_IF((yyvsp[-1].node))->end_keyword_loc = (yylsp[0]);
14429
14430 (yyval.node) = new_if(p, (yyvsp[-4].node), (yyvsp[-2].node), (yyvsp[-1].node), &(yyloc), &(yylsp[-5]), &(yylsp[-3]), &(yylsp[0]));
14431 fixpos((yyval.node), (yyvsp[-4].node));
14432 /*% ripper: if!($:2, $:4, $:5) %*/
14433 }
14434#line 14435 "parse.c"
14435 break;
14436
14437 case 371: /* primary: k_unless expr_value then compstmt_stmts opt_else k_end */
14438#line 4475 "parse.y"
14439 {
14440 (yyval.node) = new_unless(p, (yyvsp[-4].node), (yyvsp[-2].node), (yyvsp[-1].node), &(yyloc), &(yylsp[-5]), &(yylsp[-3]), &(yylsp[0]));
14441 fixpos((yyval.node), (yyvsp[-4].node));
14442 /*% ripper: unless!($:2, $:4, $:5) %*/
14443 }
14444#line 14445 "parse.c"
14445 break;
14446
14447 case 372: /* primary: k_while expr_value_do compstmt_stmts k_end */
14448#line 4483 "parse.y"
14449 {
14450 restore_block_exit(p, (yyvsp[-3].node_exits));
14451 (yyval.node) = NEW_WHILE(cond(p, (yyvsp[-2].node), &(yylsp[-2])), (yyvsp[-1].node), 1, &(yyloc), &(yylsp[-3]), &(yylsp[0]));
14452 fixpos((yyval.node), (yyvsp[-2].node));
14453 /*% ripper: while!($:2, $:3) %*/
14454 }
14455#line 14456 "parse.c"
14456 break;
14457
14458 case 373: /* primary: k_until expr_value_do compstmt_stmts k_end */
14459#line 4492 "parse.y"
14460 {
14461 restore_block_exit(p, (yyvsp[-3].node_exits));
14462 (yyval.node) = NEW_UNTIL(cond(p, (yyvsp[-2].node), &(yylsp[-2])), (yyvsp[-1].node), 1, &(yyloc), &(yylsp[-3]), &(yylsp[0]));
14463 fixpos((yyval.node), (yyvsp[-2].node));
14464 /*% ripper: until!($:2, $:3) %*/
14465 }
14466#line 14467 "parse.c"
14467 break;
14468
14469 case 374: /* @16: %empty */
14470#line 4499 "parse.y"
14471 {
14472 (yyval.labels) = p->case_labels;
14473 p->case_labels = CHECK_LITERAL_WHEN;
14474 }
14475#line 14476 "parse.c"
14476 break;
14477
14478 case 375: /* primary: k_case expr_value option_terms @16 case_body k_end */
14479#line 4505 "parse.y"
14480 {
14481 if (CASE_LABELS_ENABLED_P(p->case_labels)) st_free_table(p->case_labels);
14482 p->case_labels = (yyvsp[-2].labels);
14483 (yyval.node) = NEW_CASE((yyvsp[-4].node), (yyvsp[-1].node), &(yyloc), &(yylsp[-5]), &(yylsp[0]));
14484 fixpos((yyval.node), (yyvsp[-4].node));
14485 /*% ripper: case!($:2, $:5) %*/
14486 }
14487#line 14488 "parse.c"
14488 break;
14489
14490 case 376: /* @17: %empty */
14491#line 4513 "parse.y"
14492 {
14493 (yyval.labels) = p->case_labels;
14494 p->case_labels = 0;
14495 }
14496#line 14497 "parse.c"
14497 break;
14498
14499 case 377: /* primary: k_case option_terms @17 case_body k_end */
14500#line 4519 "parse.y"
14501 {
14502 if (p->case_labels) st_free_table(p->case_labels);
14503 p->case_labels = (yyvsp[-2].labels);
14504 (yyval.node) = NEW_CASE2((yyvsp[-1].node), &(yyloc), &(yylsp[-4]), &(yylsp[0]));
14505 /*% ripper: case!(Qnil, $:4) %*/
14506 }
14507#line 14508 "parse.c"
14508 break;
14509
14510 case 378: /* primary: k_case expr_value option_terms p_case_body k_end */
14511#line 4528 "parse.y"
14512 {
14513 (yyval.node) = NEW_CASE3((yyvsp[-3].node), (yyvsp[-1].node), &(yyloc), &(yylsp[-4]), &(yylsp[0]));
14514 /*% ripper: case!($:2, $:4) %*/
14515 }
14516#line 14517 "parse.c"
14517 break;
14518
14519 case 379: /* $@18: %empty */
14520#line 4533 "parse.y"
14521 {COND_PUSH(1);}
14522#line 14523 "parse.c"
14523 break;
14524
14525 case 380: /* $@19: %empty */
14526#line 4533 "parse.y"
14527 {COND_POP();}
14528#line 14529 "parse.c"
14529 break;
14530
14531 case 381: /* primary: k_for for_var "'in'" $@18 expr_value do $@19 compstmt_stmts k_end */
14532#line 4536 "parse.y"
14533 {
14534 restore_block_exit(p, (yyvsp[-8].node_exits));
14535 /*
14536 * for a, b, c in e
14537 * #=>
14538 * e.each{|*x| a, b, c = x}
14539 *
14540 * for a in e
14541 * #=>
14542 * e.each{|x| a, = x}
14543 */
14544 ID id = internal_id(p);
14545 rb_node_args_aux_t *m = NEW_ARGS_AUX(0, 0, &NULL_LOC);
14546 rb_node_args_t *args;
14547 NODE *scope, *internal_var = NEW_DVAR(id, &(yylsp[-7]));
14548 rb_ast_id_table_t *tbl = rb_ast_new_local_table(p->ast, 1);
14549 tbl->ids[0] = id; /* internal id */
14550
14551 switch (nd_type((yyvsp[-7].node))) {
14552 case NODE_LASGN:
14553 case NODE_DASGN: /* e.each {|internal_var| a = internal_var; ... } */
14554 set_nd_value(p, (yyvsp[-7].node), internal_var);
14555 id = 0;
14556 m->nd_plen = 1;
14557 m->nd_next = (yyvsp[-7].node);
14558 break;
14559 case NODE_MASGN: /* e.each {|*internal_var| a, b, c = (internal_var.length == 1 && Array === (tmp = internal_var[0]) ? tmp : internal_var); ... } */
14560 m->nd_next = node_assign(p, (yyvsp[-7].node), NEW_FOR_MASGN(internal_var, &(yylsp[-7])), NO_LEX_CTXT, &(yylsp[-7]));
14561 break;
14562 default: /* e.each {|*internal_var| @a, B, c[1], d.attr = internal_val; ... } */
14563 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]));
14564 }
14565 /* {|*internal_id| <m> = internal_id; ... } */
14566 args = new_args(p, m, 0, id, 0, new_args_tail(p, 0, 0, 0, &(yylsp[-7])), &(yylsp[-7]));
14567 scope = NEW_SCOPE2(tbl, args, (yyvsp[-1].node), &(yyloc));
14568 YYLTYPE do_keyword_loc = (yyvsp[-3].id) == keyword_do_cond ? (yylsp[-3]) : NULL_LOC;
14569 (yyval.node) = NEW_FOR((yyvsp[-4].node), scope, &(yyloc), &(yylsp[-8]), &(yylsp[-6]), &do_keyword_loc, &(yylsp[0]));
14570 fixpos((yyval.node), (yyvsp[-7].node));
14571 /*% ripper: for!($:for_var, $:expr_value, $:compstmt) %*/
14572 }
14573#line 14574 "parse.c"
14574 break;
14575
14576 case 382: /* $@20: %empty */
14577#line 4577 "parse.y"
14578 {
14579 begin_definition("class", &(yylsp[-2]), &(yylsp[-1]));
14580 }
14581#line 14582 "parse.c"
14582 break;
14583
14584 case 383: /* primary: k_class cpath superclass $@20 bodystmt k_end */
14585#line 4582 "parse.y"
14586 {
14587 YYLTYPE inheritance_operator_loc = NULL_LOC;
14588 if ((yyvsp[-3].node)) {
14589 inheritance_operator_loc = (yylsp[-3]);
14590 inheritance_operator_loc.end_pos.column = inheritance_operator_loc.beg_pos.column + 1;
14591 }
14592 (yyval.node) = NEW_CLASS((yyvsp[-4].node), (yyvsp[-1].node), (yyvsp[-3].node), &(yyloc), &(yylsp[-5]), &inheritance_operator_loc, &(yylsp[0]));
14593 nd_set_line(RNODE_CLASS((yyval.node))->nd_body, (yylsp[0]).end_pos.lineno);
14594 set_line_body((yyvsp[-1].node), (yylsp[-3]).end_pos.lineno);
14595 nd_set_line((yyval.node), (yylsp[-3]).end_pos.lineno);
14596 /*% ripper: class!($:cpath, $:superclass, $:bodystmt) %*/
14597 local_pop(p);
14598 p->ctxt.in_class = (yyvsp[-5].ctxt).in_class;
14599 p->ctxt.cant_return = (yyvsp[-5].ctxt).cant_return;
14600 p->ctxt.shareable_constant_value = (yyvsp[-5].ctxt).shareable_constant_value;
14601 }
14602#line 14603 "parse.c"
14603 break;
14604
14605 case 384: /* $@21: %empty */
14606#line 4599 "parse.y"
14607 {
14608 begin_definition("", &(yylsp[-2]), &(yylsp[-1]));
14609 }
14610#line 14611 "parse.c"
14611 break;
14612
14613 case 385: /* primary: k_class "<<" expr_value $@21 term bodystmt k_end */
14614#line 4605 "parse.y"
14615 {
14616 (yyval.node) = NEW_SCLASS((yyvsp[-4].node), (yyvsp[-1].node), &(yyloc));
14617 nd_set_line(RNODE_SCLASS((yyval.node))->nd_body, (yylsp[0]).end_pos.lineno);
14618 set_line_body((yyvsp[-1].node), nd_line((yyvsp[-4].node)));
14619 fixpos((yyval.node), (yyvsp[-4].node));
14620 /*% ripper: sclass!($:expr_value, $:bodystmt) %*/
14621 local_pop(p);
14622 p->ctxt.in_def = (yyvsp[-6].ctxt).in_def;
14623 p->ctxt.in_class = (yyvsp[-6].ctxt).in_class;
14624 p->ctxt.cant_return = (yyvsp[-6].ctxt).cant_return;
14625 p->ctxt.shareable_constant_value = (yyvsp[-6].ctxt).shareable_constant_value;
14626 }
14627#line 14628 "parse.c"
14628 break;
14629
14630 case 386: /* $@22: %empty */
14631#line 4618 "parse.y"
14632 {
14633 begin_definition("module", &(yylsp[-1]), &(yylsp[0]));
14634 }
14635#line 14636 "parse.c"
14636 break;
14637
14638 case 387: /* primary: k_module cpath $@22 bodystmt k_end */
14639#line 4623 "parse.y"
14640 {
14641 (yyval.node) = NEW_MODULE((yyvsp[-3].node), (yyvsp[-1].node), &(yyloc));
14642 nd_set_line(RNODE_MODULE((yyval.node))->nd_body, (yylsp[0]).end_pos.lineno);
14643 set_line_body((yyvsp[-1].node), (yylsp[-3]).end_pos.lineno);
14644 nd_set_line((yyval.node), (yylsp[-3]).end_pos.lineno);
14645 /*% ripper: module!($:cpath, $:bodystmt) %*/
14646 local_pop(p);
14647 p->ctxt.in_class = (yyvsp[-4].ctxt).in_class;
14648 p->ctxt.cant_return = (yyvsp[-4].ctxt).cant_return;
14649 p->ctxt.shareable_constant_value = (yyvsp[-4].ctxt).shareable_constant_value;
14650 }
14651#line 14652 "parse.c"
14652 break;
14653
14654 case 388: /* $@23: %empty */
14655#line 4636 "parse.y"
14656 {
14657 push_end_expect_token_locations(p, &(yylsp[-1]).beg_pos);
14658 }
14659#line 14660 "parse.c"
14660 break;
14661
14662 case 389: /* primary: defn_head f_arglist $@23 bodystmt k_end */
14663#line 4641 "parse.y"
14664 {
14665 restore_defun(p, (yyvsp[-4].node_def_temp));
14666 (yyvsp[-1].node) = new_scope_body(p, (yyvsp[-3].node_args), (yyvsp[-1].node), &(yyloc));
14667 ((yyval.node) = (yyvsp[-4].node_def_temp)->nd_def)->nd_loc = (yyloc);
14668 RNODE_DEFN((yyval.node))->nd_defn = (yyvsp[-1].node);
14669 /*% ripper: def!($:head, $:args, $:bodystmt) %*/
14670 local_pop(p);
14671 }
14672#line 14673 "parse.c"
14673 break;
14674
14675 case 390: /* $@24: %empty */
14676#line 4651 "parse.y"
14677 {
14678 push_end_expect_token_locations(p, &(yylsp[-1]).beg_pos);
14679 }
14680#line 14681 "parse.c"
14681 break;
14682
14683 case 391: /* primary: defs_head f_arglist $@24 bodystmt k_end */
14684#line 4656 "parse.y"
14685 {
14686 restore_defun(p, (yyvsp[-4].node_def_temp));
14687 (yyvsp[-1].node) = new_scope_body(p, (yyvsp[-3].node_args), (yyvsp[-1].node), &(yyloc));
14688 ((yyval.node) = (yyvsp[-4].node_def_temp)->nd_def)->nd_loc = (yyloc);
14689 RNODE_DEFS((yyval.node))->nd_defn = (yyvsp[-1].node);
14690 /*% ripper: defs!(*$:head[0..2], $:args, $:bodystmt) %*/
14691 local_pop(p);
14692 }
14693#line 14694 "parse.c"
14694 break;
14695
14696 case 392: /* primary: "'break'" */
14697#line 4665 "parse.y"
14698 {
14699 (yyval.node) = add_block_exit(p, NEW_BREAK(0, &(yyloc), &(yylsp[0])));
14700 /*% ripper: break!(args_new!) %*/
14701 }
14702#line 14703 "parse.c"
14703 break;
14704
14705 case 393: /* primary: "'next'" */
14706#line 4670 "parse.y"
14707 {
14708 (yyval.node) = add_block_exit(p, NEW_NEXT(0, &(yyloc), &(yylsp[0])));
14709 /*% ripper: next!(args_new!) %*/
14710 }
14711#line 14712 "parse.c"
14712 break;
14713
14714 case 394: /* primary: "'redo'" */
14715#line 4675 "parse.y"
14716 {
14717 (yyval.node) = add_block_exit(p, NEW_REDO(&(yyloc), &(yylsp[0])));
14718 /*% ripper: redo! %*/
14719 }
14720#line 14721 "parse.c"
14721 break;
14722
14723 case 395: /* primary: "'retry'" */
14724#line 4680 "parse.y"
14725 {
14726 if (!p->ctxt.in_defined) {
14727 switch (p->ctxt.in_rescue) {
14728 case before_rescue: yyerror1(&(yylsp[0]), "Invalid retry without rescue"); break;
14729 case after_rescue: /* ok */ break;
14730 case after_else: yyerror1(&(yylsp[0]), "Invalid retry after else"); break;
14731 case after_ensure: yyerror1(&(yylsp[0]), "Invalid retry after ensure"); break;
14732 }
14733 }
14734 (yyval.node) = NEW_RETRY(&(yyloc));
14735 /*% ripper: retry! %*/
14736 }
14737#line 14738 "parse.c"
14738 break;
14739
14740 case 396: /* value_expr_primary: primary */
14741#line 3144 "parse.y"
14742 {
14743 value_expr((yyvsp[0].node));
14744 (yyval.node) = (yyvsp[0].node);
14745 }
14746#line 14747 "parse.c"
14747 break;
14748
14749 case 398: /* k_begin: "'begin'" */
14750#line 4698 "parse.y"
14751 {
14752 token_info_push(p, "begin", &(yyloc));
14753 push_end_expect_token_locations(p, &(yylsp[0]).beg_pos);
14754 }
14755#line 14756 "parse.c"
14756 break;
14757
14758 case 399: /* k_if: "'if'" */
14759#line 4705 "parse.y"
14760 {
14761 WARN_EOL("if");
14762 token_info_push(p, "if", &(yyloc));
14763 if (p->token_info && p->token_info->nonspc &&
14764 p->token_info->next && !strcmp(p->token_info->next->token, "else")) {
14765 const char *tok = p->lex.ptok - rb_strlen_lit("if");
14766 const char *beg = p->lex.pbeg + p->token_info->next->beg.column;
14767 beg += rb_strlen_lit("else");
14768 while (beg < tok && ISSPACE(*beg)) beg++;
14769 if (beg == tok) {
14770 p->token_info->nonspc = 0;
14771 }
14772 }
14773 push_end_expect_token_locations(p, &(yylsp[0]).beg_pos);
14774 }
14775#line 14776 "parse.c"
14776 break;
14777
14778 case 400: /* k_unless: "'unless'" */
14779#line 4723 "parse.y"
14780 {
14781 token_info_push(p, "unless", &(yyloc));
14782 push_end_expect_token_locations(p, &(yylsp[0]).beg_pos);
14783 }
14784#line 14785 "parse.c"
14785 break;
14786
14787 case 401: /* k_while: "'while'" allow_exits */
14788#line 4730 "parse.y"
14789 {
14790 (yyval.node_exits) = (yyvsp[0].node_exits);
14791 token_info_push(p, "while", &(yyloc));
14792 push_end_expect_token_locations(p, &(yylsp[-1]).beg_pos);
14793 }
14794#line 14795 "parse.c"
14795 break;
14796
14797 case 402: /* k_until: "'until'" allow_exits */
14798#line 4738 "parse.y"
14799 {
14800 (yyval.node_exits) = (yyvsp[0].node_exits);
14801 token_info_push(p, "until", &(yyloc));
14802 push_end_expect_token_locations(p, &(yylsp[-1]).beg_pos);
14803 }
14804#line 14805 "parse.c"
14805 break;
14806
14807 case 403: /* k_case: "'case'" */
14808#line 4746 "parse.y"
14809 {
14810 token_info_push(p, "case", &(yyloc));
14811 push_end_expect_token_locations(p, &(yylsp[0]).beg_pos);
14812 }
14813#line 14814 "parse.c"
14814 break;
14815
14816 case 404: /* k_for: "'for'" allow_exits */
14817#line 4753 "parse.y"
14818 {
14819 (yyval.node_exits) = (yyvsp[0].node_exits);
14820 token_info_push(p, "for", &(yyloc));
14821 push_end_expect_token_locations(p, &(yylsp[-1]).beg_pos);
14822 }
14823#line 14824 "parse.c"
14824 break;
14825
14826 case 405: /* k_class: "'class'" */
14827#line 4761 "parse.y"
14828 {
14829 token_info_push(p, "class", &(yyloc));
14830 (yyval.ctxt) = p->ctxt;
14831 p->ctxt.in_rescue = before_rescue;
14832 push_end_expect_token_locations(p, &(yylsp[0]).beg_pos);
14833 }
14834#line 14835 "parse.c"
14835 break;
14836
14837 case 406: /* k_module: "'module'" */
14838#line 4770 "parse.y"
14839 {
14840 token_info_push(p, "module", &(yyloc));
14841 (yyval.ctxt) = p->ctxt;
14842 p->ctxt.in_rescue = before_rescue;
14843 push_end_expect_token_locations(p, &(yylsp[0]).beg_pos);
14844 }
14845#line 14846 "parse.c"
14846 break;
14847
14848 case 407: /* k_def: "'def'" */
14849#line 4779 "parse.y"
14850 {
14851 token_info_push(p, "def", &(yyloc));
14852 (yyval.node_def_temp) = NEW_DEF_TEMP(&(yyloc));
14853 p->ctxt.in_argdef = 1;
14854 }
14855#line 14856 "parse.c"
14856 break;
14857
14858 case 408: /* k_do: "'do'" */
14859#line 4787 "parse.y"
14860 {
14861 token_info_push(p, "do", &(yyloc));
14862 push_end_expect_token_locations(p, &(yylsp[0]).beg_pos);
14863 }
14864#line 14865 "parse.c"
14865 break;
14866
14867 case 409: /* k_do_block: "'do' for block" */
14868#line 4794 "parse.y"
14869 {
14870 token_info_push(p, "do", &(yyloc));
14871 push_end_expect_token_locations(p, &(yylsp[0]).beg_pos);
14872 }
14873#line 14874 "parse.c"
14874 break;
14875
14876 case 410: /* k_rescue: "'rescue'" */
14877#line 4801 "parse.y"
14878 {
14879 token_info_warn(p, "rescue", p->token_info, 1, &(yyloc));
14880 (yyval.ctxt) = p->ctxt;
14881 p->ctxt.in_rescue = after_rescue;
14882 }
14883#line 14884 "parse.c"
14884 break;
14885
14886 case 411: /* k_ensure: "'ensure'" */
14887#line 4809 "parse.y"
14888 {
14889 token_info_warn(p, "ensure", p->token_info, 1, &(yyloc));
14890 (yyval.ctxt) = p->ctxt;
14891 }
14892#line 14893 "parse.c"
14893 break;
14894
14895 case 412: /* k_when: "'when'" */
14896#line 4816 "parse.y"
14897 {
14898 token_info_warn(p, "when", p->token_info, 0, &(yyloc));
14899 }
14900#line 14901 "parse.c"
14901 break;
14902
14903 case 413: /* k_else: "'else'" */
14904#line 4822 "parse.y"
14905 {
14906 token_info *ptinfo_beg = p->token_info;
14907 int same = ptinfo_beg && strcmp(ptinfo_beg->token, "case") != 0;
14908 token_info_warn(p, "else", p->token_info, same, &(yyloc));
14909 if (same) {
14910 token_info e;
14911 e.next = ptinfo_beg->next;
14912 e.token = "else";
14913 token_info_setup(&e, p->lex.pbeg, &(yyloc));
14914 if (!e.nonspc) *ptinfo_beg = e;
14915 }
14916 }
14917#line 14918 "parse.c"
14918 break;
14919
14920 case 414: /* k_elsif: "'elsif'" */
14921#line 4837 "parse.y"
14922 {
14923 WARN_EOL("elsif");
14924 token_info_warn(p, "elsif", p->token_info, 1, &(yyloc));
14925 }
14926#line 14927 "parse.c"
14927 break;
14928
14929 case 415: /* k_end: "'end'" */
14930#line 4844 "parse.y"
14931 {
14932 token_info_pop(p, "end", &(yyloc));
14933 pop_end_expect_token_locations(p);
14934 }
14935#line 14936 "parse.c"
14936 break;
14937
14938 case 416: /* k_end: "dummy end" */
14939#line 4849 "parse.y"
14940 {
14941 compile_error(p, "syntax error, unexpected end-of-input");
14942 }
14943#line 14944 "parse.c"
14944 break;
14945
14946 case 417: /* k_return: "'return'" */
14947#line 4855 "parse.y"
14948 {
14949 if (p->ctxt.cant_return && !dyna_in_block(p))
14950 yyerror1(&(yylsp[0]), "Invalid return in class/module body");
14951 }
14952#line 14953 "parse.c"
14953 break;
14954
14955 case 418: /* k_yield: "'yield'" */
14956#line 4862 "parse.y"
14957 {
14958 if (!p->ctxt.in_defined && !p->ctxt.in_def && !compile_for_eval)
14959 yyerror1(&(yylsp[0]), "Invalid yield");
14960 }
14961#line 14962 "parse.c"
14962 break;
14963
14964 case 423: /* do: "'do' for condition" */
14965#line 4874 "parse.y"
14966 { (yyval.id) = keyword_do_cond; }
14967#line 14968 "parse.c"
14968 break;
14969
14970 case 425: /* if_tail: k_elsif expr_value then compstmt_stmts if_tail */
14971#line 4881 "parse.y"
14972 {
14973 (yyval.node) = new_if(p, (yyvsp[-3].node), (yyvsp[-1].node), (yyvsp[0].node), &(yyloc), &(yylsp[-4]), &(yylsp[-2]), &NULL_LOC);
14974 fixpos((yyval.node), (yyvsp[-3].node));
14975 /*% ripper: elsif!($:2, $:4, $:5) %*/
14976 }
14977#line 14978 "parse.c"
14978 break;
14979
14980 case 427: /* opt_else: k_else compstmt_stmts */
14981#line 4890 "parse.y"
14982 {
14983 (yyval.node) = (yyvsp[0].node);
14984 /*% ripper: else!($:2) %*/
14985 }
14986#line 14987 "parse.c"
14987 break;
14988
14989 case 430: /* f_marg: f_norm_arg */
14990#line 4901 "parse.y"
14991 {
14992 (yyval.node) = assignable(p, (yyvsp[0].id), 0, &(yyloc));
14993 mark_lvar_used(p, (yyval.node));
14994 }
14995#line 14996 "parse.c"
14996 break;
14997
14998 case 431: /* f_marg: "(" f_margs rparen */
14999#line 4906 "parse.y"
15000 {
15001 (yyval.node) = (NODE *)(yyvsp[-1].node_masgn);
15002 /*% ripper: mlhs_paren!($:2) %*/
15003 }
15004#line 15005 "parse.c"
15005 break;
15006
15007 case 432: /* mlhs_f_marg: f_marg */
15008#line 3031 "parse.y"
15009 {
15010 (yyval.node) = NEW_LIST((yyvsp[0].node), &(yyloc));
15011 /*% ripper: mlhs_add!(mlhs_new!, $:1) %*/
15012 }
15013#line 15014 "parse.c"
15014 break;
15015
15016 case 433: /* mlhs_f_marg: mlhs_f_marg ',' f_marg */
15017#line 3036 "parse.y"
15018 {
15019 (yyval.node) = list_append(p, (yyvsp[-2].node), (yyvsp[0].node));
15020 /*% ripper: mlhs_add!($:1, $:3) %*/
15021 }
15022#line 15023 "parse.c"
15023 break;
15024
15025 case 434: /* f_margs: mlhs_f_marg */
15026#line 4914 "parse.y"
15027 {
15028 (yyval.node_masgn) = NEW_MASGN((yyvsp[0].node), 0, &(yyloc));
15029 /*% ripper: $:1 %*/
15030 }
15031#line 15032 "parse.c"
15032 break;
15033
15034 case 435: /* f_margs: mlhs_f_marg ',' f_rest_marg */
15035#line 4919 "parse.y"
15036 {
15037 (yyval.node_masgn) = NEW_MASGN((yyvsp[-2].node), (yyvsp[0].node), &(yyloc));
15038 /*% ripper: mlhs_add_star!($:1, $:3) %*/
15039 }
15040#line 15041 "parse.c"
15041 break;
15042
15043 case 436: /* f_margs: mlhs_f_marg ',' f_rest_marg ',' mlhs_f_marg */
15044#line 4924 "parse.y"
15045 {
15046 (yyval.node_masgn) = NEW_MASGN((yyvsp[-4].node), NEW_POSTARG((yyvsp[-2].node), (yyvsp[0].node), &(yyloc)), &(yyloc));
15047 /*% ripper: mlhs_add_post!(mlhs_add_star!($:1, $:3), $:5) %*/
15048 }
15049#line 15050 "parse.c"
15050 break;
15051
15052 case 437: /* f_margs: f_rest_marg */
15053#line 4929 "parse.y"
15054 {
15055 (yyval.node_masgn) = NEW_MASGN(0, (yyvsp[0].node), &(yyloc));
15056 /*% ripper: mlhs_add_star!(mlhs_new!, $:1) %*/
15057 }
15058#line 15059 "parse.c"
15059 break;
15060
15061 case 438: /* f_margs: f_rest_marg ',' mlhs_f_marg */
15062#line 4934 "parse.y"
15063 {
15064 (yyval.node_masgn) = NEW_MASGN(0, NEW_POSTARG((yyvsp[-2].node), (yyvsp[0].node), &(yyloc)), &(yyloc));
15065 /*% ripper: mlhs_add_post!(mlhs_add_star!(mlhs_new!, $:1), $:3) %*/
15066 }
15067#line 15068 "parse.c"
15068 break;
15069
15070 case 439: /* f_rest_marg: "*" f_norm_arg */
15071#line 4941 "parse.y"
15072 {
15073 /*% ripper: $:2 %*/
15074 (yyval.node) = assignable(p, (yyvsp[0].id), 0, &(yyloc));
15075 mark_lvar_used(p, (yyval.node));
15076 }
15077#line 15078 "parse.c"
15078 break;
15079
15080 case 440: /* f_rest_marg: "*" */
15081#line 4947 "parse.y"
15082 {
15083 (yyval.node) = NODE_SPECIAL_NO_NAME_REST;
15084 /*% ripper: Qnil %*/
15085 }
15086#line 15087 "parse.c"
15087 break;
15088
15089 case 442: /* f_any_kwrest: f_no_kwarg */
15090#line 4955 "parse.y"
15091 {
15092 (yyval.id) = idNil;
15093 /*% ripper: ID2VAL(idNil) %*/
15094 }
15095#line 15096 "parse.c"
15096 break;
15097
15098 case 443: /* $@25: %empty */
15099#line 4961 "parse.y"
15100 {p->ctxt.in_argdef = 0;}
15101#line 15102 "parse.c"
15102 break;
15103
15104 case 445: /* f_kw_primary_value: f_label primary_value */
15105#line 3003 "parse.y"
15106 {
15107 p->ctxt.in_argdef = 1;
15108 (yyval.node_kw_arg) = new_kw_arg(p, assignable(p, (yyvsp[-1].id), (yyvsp[0].node), &(yyloc)), &(yyloc));
15109 /*% ripper: [$:$, $:value] %*/
15110 }
15111#line 15112 "parse.c"
15112 break;
15113
15114 case 446: /* f_kw_primary_value: f_label */
15115#line 3009 "parse.y"
15116 {
15117 p->ctxt.in_argdef = 1;
15118 (yyval.node_kw_arg) = new_kw_arg(p, assignable(p, (yyvsp[0].id), NODE_SPECIAL_REQUIRED_KEYWORD, &(yyloc)), &(yyloc));
15119 /*% ripper: [$:$, 0] %*/
15120 }
15121#line 15122 "parse.c"
15122 break;
15123
15124 case 447: /* f_kwarg_primary_value: f_kw_primary_value */
15125#line 3018 "parse.y"
15126 {
15127 (yyval.node_kw_arg) = (yyvsp[0].node_kw_arg);
15128 /*% ripper: rb_ary_new3(1, $:1) %*/
15129 }
15130#line 15131 "parse.c"
15131 break;
15132
15133 case 448: /* f_kwarg_primary_value: f_kwarg_primary_value ',' f_kw_primary_value */
15134#line 3023 "parse.y"
15135 {
15136 (yyval.node_kw_arg) = kwd_append((yyvsp[-2].node_kw_arg), (yyvsp[0].node_kw_arg));
15137 /*% ripper: rb_ary_push($:1, $:3) %*/
15138 }
15139#line 15140 "parse.c"
15140 break;
15141
15142 case 449: /* args_tail_basic_primary_value: f_kwarg_primary_value ',' f_kwrest opt_f_block_arg */
15143#line 2927 "parse.y"
15144 {
15145 (yyval.node_args) = new_args_tail(p, (yyvsp[-3].node_kw_arg), (yyvsp[-1].id), (yyvsp[0].id), &(yylsp[-1]));
15146 /*% ripper: [$:1, $:3, $:4] %*/
15147 }
15148#line 15149 "parse.c"
15149 break;
15150
15151 case 450: /* args_tail_basic_primary_value: f_kwarg_primary_value opt_f_block_arg */
15152#line 2932 "parse.y"
15153 {
15154 (yyval.node_args) = new_args_tail(p, (yyvsp[-1].node_kw_arg), 0, (yyvsp[0].id), &(yylsp[-1]));
15155 /*% ripper: [$:1, Qnil, $:2] %*/
15156 }
15157#line 15158 "parse.c"
15158 break;
15159
15160 case 451: /* args_tail_basic_primary_value: f_any_kwrest opt_f_block_arg */
15161#line 2937 "parse.y"
15162 {
15163 (yyval.node_args) = new_args_tail(p, 0, (yyvsp[-1].id), (yyvsp[0].id), &(yylsp[-1]));
15164 /*% ripper: [Qnil, $:1, $:2] %*/
15165 }
15166#line 15167 "parse.c"
15167 break;
15168
15169 case 452: /* args_tail_basic_primary_value: f_block_arg */
15170#line 2942 "parse.y"
15171 {
15172 (yyval.node_args) = new_args_tail(p, 0, 0, (yyvsp[0].id), &(yylsp[0]));
15173 /*% ripper: [Qnil, Qnil, $:1] %*/
15174 }
15175#line 15176 "parse.c"
15176 break;
15177
15178 case 454: /* excessed_comma: ',' */
15179#line 4967 "parse.y"
15180 {
15181 /* magic number for rest_id in iseq_set_arguments() */
15182 (yyval.id) = NODE_SPECIAL_EXCESSIVE_COMMA;
15183 /*% ripper: excessed_comma! %*/
15184 }
15185#line 15186 "parse.c"
15186 break;
15187
15188 case 455: /* f_opt_primary_value: f_arg_asgn f_eq primary_value */
15189#line 2981 "parse.y"
15190 {
15191 p->ctxt.in_argdef = 1;
15192 (yyval.node_opt_arg) = NEW_OPT_ARG(assignable(p, (yyvsp[-2].id), (yyvsp[0].node), &(yyloc)), &(yyloc));
15193 /*% ripper: [$:$, $:3] %*/
15194 }
15195#line 15196 "parse.c"
15196 break;
15197
15198 case 456: /* f_opt_arg_primary_value: f_opt_primary_value */
15199#line 2990 "parse.y"
15200 {
15201 (yyval.node_opt_arg) = (yyvsp[0].node_opt_arg);
15202 /*% ripper: rb_ary_new3(1, $:1) %*/
15203 }
15204#line 15205 "parse.c"
15205 break;
15206
15207 case 457: /* f_opt_arg_primary_value: f_opt_arg_primary_value ',' f_opt_primary_value */
15208#line 2995 "parse.y"
15209 {
15210 (yyval.node_opt_arg) = opt_arg_append((yyvsp[-2].node_opt_arg), (yyvsp[0].node_opt_arg));
15211 /*% ripper: rb_ary_push($:1, $:3) %*/
15212 }
15213#line 15214 "parse.c"
15214 break;
15215
15216 case 458: /* opt_args_tail_block_args_tail: ',' block_args_tail */
15217#line 3090 "parse.y"
15218 {
15219 (yyval.node_args) = (yyvsp[0].node_args);
15220 /*% ripper: $:2 %*/
15221 }
15222#line 15223 "parse.c"
15223 break;
15224
15225 case 459: /* opt_args_tail_block_args_tail: %empty */
15226#line 3095 "parse.y"
15227 {
15228 (yyval.node_args) = new_args_tail(p, 0, 0, 0, &(yylsp[0]));
15229 /*% ripper: [Qnil, Qnil, Qnil] %*/
15230 }
15231#line 15232 "parse.c"
15232 break;
15233
15234 case 460: /* block_param: f_arg ',' f_opt_arg_primary_value ',' f_rest_arg opt_args_tail_block_args_tail */
15235#line 4975 "parse.y"
15236 {
15237 (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));
15238 /*% ripper: params!($:1, $:3, $:5, Qnil, *$:6[0..2]) %*/
15239 }
15240#line 15241 "parse.c"
15241 break;
15242
15243 case 461: /* block_param: f_arg ',' f_opt_arg_primary_value ',' f_rest_arg ',' f_arg opt_args_tail_block_args_tail */
15244#line 4980 "parse.y"
15245 {
15246 (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));
15247 /*% ripper: params!($:1, $:3, $:5, $:7, *$:8[0..2]) %*/
15248 }
15249#line 15250 "parse.c"
15250 break;
15251
15252 case 462: /* block_param: f_arg ',' f_opt_arg_primary_value opt_args_tail_block_args_tail */
15253#line 4985 "parse.y"
15254 {
15255 (yyval.node_args) = new_args(p, (yyvsp[-3].node_args_aux), (yyvsp[-1].node_opt_arg), 0, 0, (yyvsp[0].node_args), &(yyloc));
15256 /*% ripper: params!($:1, $:3, Qnil, Qnil, *$:4[0..2]) %*/
15257 }
15258#line 15259 "parse.c"
15259 break;
15260
15261 case 463: /* block_param: f_arg ',' f_opt_arg_primary_value ',' f_arg opt_args_tail_block_args_tail */
15262#line 4990 "parse.y"
15263 {
15264 (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));
15265 /*% ripper: params!($:1, $:3, Qnil, $:5, *$:6[0..2]) %*/
15266 }
15267#line 15268 "parse.c"
15268 break;
15269
15270 case 464: /* block_param: f_arg ',' f_rest_arg opt_args_tail_block_args_tail */
15271#line 4995 "parse.y"
15272 {
15273 (yyval.node_args) = new_args(p, (yyvsp[-3].node_args_aux), 0, (yyvsp[-1].id), 0, (yyvsp[0].node_args), &(yyloc));
15274 /*% ripper: params!($:1, Qnil, $:3, Qnil, *$:4[0..2]) %*/
15275 }
15276#line 15277 "parse.c"
15277 break;
15278
15279 case 465: /* block_param: f_arg excessed_comma */
15280#line 5000 "parse.y"
15281 {
15282 (yyval.node_args) = new_args_tail(p, 0, 0, 0, &(yylsp[0]));
15283 (yyval.node_args) = new_args(p, (yyvsp[-1].node_args_aux), 0, (yyvsp[0].id), 0, (yyval.node_args), &(yyloc));
15284 /*% ripper: params!($:1, Qnil, $:2, Qnil, Qnil, Qnil, Qnil) %*/
15285 }
15286#line 15287 "parse.c"
15287 break;
15288
15289 case 466: /* block_param: f_arg ',' f_rest_arg ',' f_arg opt_args_tail_block_args_tail */
15290#line 5006 "parse.y"
15291 {
15292 (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));
15293 /*% ripper: params!($:1, Qnil, $:3, $:5, *$:6[0..2]) %*/
15294 }
15295#line 15296 "parse.c"
15296 break;
15297
15298 case 467: /* block_param: f_arg opt_args_tail_block_args_tail */
15299#line 5011 "parse.y"
15300 {
15301 (yyval.node_args) = new_args(p, (yyvsp[-1].node_args_aux), 0, 0, 0, (yyvsp[0].node_args), &(yyloc));
15302 /*% ripper: params!($:1, Qnil, Qnil, Qnil, *$:2[0..2]) %*/
15303 }
15304#line 15305 "parse.c"
15305 break;
15306
15307 case 468: /* block_param: f_opt_arg_primary_value ',' f_rest_arg opt_args_tail_block_args_tail */
15308#line 5016 "parse.y"
15309 {
15310 (yyval.node_args) = new_args(p, 0, (yyvsp[-3].node_opt_arg), (yyvsp[-1].id), 0, (yyvsp[0].node_args), &(yyloc));
15311 /*% ripper: params!(Qnil, $:1, $:3, Qnil, *$:4[0..2]) %*/
15312 }
15313#line 15314 "parse.c"
15314 break;
15315
15316 case 469: /* block_param: f_opt_arg_primary_value ',' f_rest_arg ',' f_arg opt_args_tail_block_args_tail */
15317#line 5021 "parse.y"
15318 {
15319 (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));
15320 /*% ripper: params!(Qnil, $:1, $:3, $:5, *$:6[0..2]) %*/
15321 }
15322#line 15323 "parse.c"
15323 break;
15324
15325 case 470: /* block_param: f_opt_arg_primary_value opt_args_tail_block_args_tail */
15326#line 5026 "parse.y"
15327 {
15328 (yyval.node_args) = new_args(p, 0, (yyvsp[-1].node_opt_arg), 0, 0, (yyvsp[0].node_args), &(yyloc));
15329 /*% ripper: params!(Qnil, $:1, Qnil, Qnil, *$:2[0..2]) %*/
15330 }
15331#line 15332 "parse.c"
15332 break;
15333
15334 case 471: /* block_param: f_opt_arg_primary_value ',' f_arg opt_args_tail_block_args_tail */
15335#line 5031 "parse.y"
15336 {
15337 (yyval.node_args) = new_args(p, 0, (yyvsp[-3].node_opt_arg), 0, (yyvsp[-1].node_args_aux), (yyvsp[0].node_args), &(yyloc));
15338 /*% ripper: params!(Qnil, $:1, Qnil, $:3, *$:4[0..2]) %*/
15339 }
15340#line 15341 "parse.c"
15341 break;
15342
15343 case 472: /* block_param: f_rest_arg opt_args_tail_block_args_tail */
15344#line 5036 "parse.y"
15345 {
15346 (yyval.node_args) = new_args(p, 0, 0, (yyvsp[-1].id), 0, (yyvsp[0].node_args), &(yyloc));
15347 /*% ripper: params!(Qnil, Qnil, $:1, Qnil, *$:2[0..2]) %*/
15348 }
15349#line 15350 "parse.c"
15350 break;
15351
15352 case 473: /* block_param: f_rest_arg ',' f_arg opt_args_tail_block_args_tail */
15353#line 5041 "parse.y"
15354 {
15355 (yyval.node_args) = new_args(p, 0, 0, (yyvsp[-3].id), (yyvsp[-1].node_args_aux), (yyvsp[0].node_args), &(yyloc));
15356 /*% ripper: params!(Qnil, Qnil, $:1, $:3, *$:4[0..2]) %*/
15357 }
15358#line 15359 "parse.c"
15359 break;
15360
15361 case 474: /* block_param: block_args_tail */
15362#line 5046 "parse.y"
15363 {
15364 (yyval.node_args) = new_args(p, 0, 0, 0, 0, (yyvsp[0].node_args), &(yyloc));
15365 /*% ripper: params!(Qnil, Qnil, Qnil, Qnil, *$:1[0..2]) %*/
15366 }
15367#line 15368 "parse.c"
15368 break;
15369
15370 case 476: /* opt_block_param_def: block_param_def */
15371#line 5054 "parse.y"
15372 {
15373 p->command_start = TRUE;
15374 }
15375#line 15376 "parse.c"
15376 break;
15377
15378 case 477: /* block_param_def: '|' opt_block_param opt_bv_decl '|' */
15379#line 5060 "parse.y"
15380 {
15381 p->max_numparam = ORDINAL_PARAM;
15382 p->ctxt.in_argdef = 0;
15383 (yyval.node_args) = (yyvsp[-2].node_args);
15384 /*% ripper: block_var!($:2, $:3) %*/
15385 }
15386#line 15387 "parse.c"
15387 break;
15388
15389 case 478: /* opt_block_param: %empty */
15390#line 5069 "parse.y"
15391 {
15392 (yyval.node_args) = 0;
15393 /*% ripper: params!(Qnil,Qnil,Qnil,Qnil,Qnil,Qnil,Qnil) %*/
15394 }
15395#line 15396 "parse.c"
15396 break;
15397
15398 case 480: /* opt_bv_decl: option_'\n' */
15399#line 5077 "parse.y"
15400 {
15401 (yyval.id) = 0;
15402 /*% ripper: Qfalse %*/
15403 }
15404#line 15405 "parse.c"
15405 break;
15406
15407 case 481: /* opt_bv_decl: option_'\n' ';' bv_decls option_'\n' */
15408#line 5082 "parse.y"
15409 {
15410 (yyval.id) = 0;
15411 /*% ripper: $:3 %*/
15412 }
15413#line 15414 "parse.c"
15414 break;
15415
15416 case 484: /* bvar: "local variable or method" */
15417#line 5095 "parse.y"
15418 {
15419 new_bv(p, (yyvsp[0].id));
15420 /*% ripper: $:1 %*/
15421 }
15422#line 15423 "parse.c"
15423 break;
15424
15425 case 486: /* max_numparam: %empty */
15426#line 5102 "parse.y"
15427 {
15428 (yyval.num) = p->max_numparam;
15429 p->max_numparam = 0;
15430 }
15431#line 15432 "parse.c"
15432 break;
15433
15434 case 487: /* numparam: %empty */
15435#line 5108 "parse.y"
15436 {
15437 (yyval.node) = numparam_push(p);
15438 }
15439#line 15440 "parse.c"
15440 break;
15441
15442 case 488: /* it_id: %empty */
15443#line 5113 "parse.y"
15444 {
15445 (yyval.id) = p->it_id;
15446 p->it_id = 0;
15447 }
15448#line 15449 "parse.c"
15449 break;
15450
15451 case 489: /* @26: %empty */
15452#line 5120 "parse.y"
15453 {
15454 token_info_push(p, "->", &(yylsp[0]));
15455 (yyval.vars) = dyna_push(p);
15456 }
15457#line 15458 "parse.c"
15458 break;
15459
15460 case 490: /* $@27: %empty */
15461#line 5126 "parse.y"
15462 {
15463 CMDARG_PUSH(0);
15464 }
15465#line 15466 "parse.c"
15466 break;
15467
15468 case 491: /* lambda: "->" @26 max_numparam numparam it_id allow_exits f_larglist $@27 lambda_body */
15469#line 5130 "parse.y"
15470 {
15471 int max_numparam = p->max_numparam;
15472 ID it_id = p->it_id;
15473 p->lex.lpar_beg = (yyvsp[-8].num);
15474 p->max_numparam = (yyvsp[-6].num);
15475 p->it_id = (yyvsp[-4].id);
15476 restore_block_exit(p, (yyvsp[-3].node_exits));
15477 CMDARG_POP();
15478 (yyvsp[-2].node_args) = args_with_numbered(p, (yyvsp[-2].node_args), max_numparam, it_id);
15479 {
15480 YYLTYPE loc = code_loc_gen(&(yylsp[-2]), &(yylsp[0]));
15481 (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);
15482 nd_set_line(RNODE_LAMBDA((yyval.node))->nd_body, (yylsp[0]).end_pos.lineno);
15483 nd_set_line((yyval.node), (yylsp[-2]).end_pos.lineno);
15484 nd_set_first_loc((yyval.node), (yylsp[-8]).beg_pos);
15485 xfree((yyvsp[0].locations_lambda_body));
15486 }
15487 /*% ripper: lambda!($:args, $:body) %*/
15488 numparam_pop(p, (yyvsp[-5].node));
15489 dyna_pop(p, (yyvsp[-7].vars));
15490 }
15491#line 15492 "parse.c"
15492 break;
15493
15494 case 492: /* f_larglist: '(' f_args opt_bv_decl ')' */
15495#line 5154 "parse.y"
15496 {
15497 p->ctxt.in_argdef = 0;
15498 (yyval.node_args) = (yyvsp[-2].node_args);
15499 p->max_numparam = ORDINAL_PARAM;
15500 /*% ripper: paren!($:2) %*/
15501 }
15502#line 15503 "parse.c"
15503 break;
15504
15505 case 493: /* f_larglist: f_args */
15506#line 5161 "parse.y"
15507 {
15508 p->ctxt.in_argdef = 0;
15509 if (!args_info_empty_p(&(yyvsp[0].node_args)->nd_ainfo))
15510 p->max_numparam = ORDINAL_PARAM;
15511 (yyval.node_args) = (yyvsp[0].node_args);
15512 }
15513#line 15514 "parse.c"
15514 break;
15515
15516 case 494: /* lambda_body: tLAMBEG compstmt_stmts '}' */
15517#line 5170 "parse.y"
15518 {
15519 token_info_pop(p, "}", &(yylsp[0]));
15520 (yyval.locations_lambda_body) = new_locations_lambda_body(p, (yyvsp[-1].node), &(yylsp[-1]), &(yylsp[-2]), &(yylsp[0]));
15521 /*% ripper: $:2 %*/
15522 }
15523#line 15524 "parse.c"
15524 break;
15525
15526 case 495: /* $@28: %empty */
15527#line 5176 "parse.y"
15528 {
15529 push_end_expect_token_locations(p, &(yylsp[0]).beg_pos);
15530 }
15531#line 15532 "parse.c"
15532 break;
15533
15534 case 496: /* lambda_body: "'do' for lambda" $@28 bodystmt k_end */
15535#line 5180 "parse.y"
15536 {
15537 (yyval.locations_lambda_body) = new_locations_lambda_body(p, (yyvsp[-1].node), &(yylsp[-1]), &(yylsp[-3]), &(yylsp[0]));
15538 /*% ripper: $:3 %*/
15539 }
15540#line 15541 "parse.c"
15541 break;
15542
15543 case 497: /* do_block: k_do_block do_body k_end */
15544#line 5187 "parse.y"
15545 {
15546 (yyval.node) = (yyvsp[-1].node);
15547 set_embraced_location((yyval.node), &(yylsp[-2]), &(yylsp[0]));
15548 /*% ripper: $:2 %*/
15549 }
15550#line 15551 "parse.c"
15551 break;
15552
15553 case 498: /* block_call: command do_block */
15554#line 5195 "parse.y"
15555 {
15556 if (nd_type_p((yyvsp[-1].node), NODE_YIELD)) {
15557 compile_error(p, "block given to yield");
15558 }
15559 else {
15560 block_dup_check(p, get_nd_args(p, (yyvsp[-1].node)), (yyvsp[0].node));
15561 }
15562 (yyval.node) = method_add_block(p, (yyvsp[-1].node), (yyvsp[0].node), &(yyloc));
15563 fixpos((yyval.node), (yyvsp[-1].node));
15564 /*% ripper: method_add_block!($:1, $:2) %*/
15565 }
15566#line 15567 "parse.c"
15567 break;
15568
15569 case 499: /* block_call: block_call call_op2 operation2 opt_paren_args */
15570#line 5207 "parse.y"
15571 {
15572 bool has_args = (yyvsp[0].node) != 0;
15573 if (NODE_EMPTY_ARGS_P((yyvsp[0].node))) (yyvsp[0].node) = 0;
15574 (yyval.node) = new_qcall(p, (yyvsp[-2].id), (yyvsp[-3].node), (yyvsp[-1].id), (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
15575 /*% ripper: call!($:1, $:2, $:3) %*/
15576 if (has_args) {
15577 /*% ripper: method_add_arg!($:$, $:4) %*/
15578 }
15579 }
15580#line 15581 "parse.c"
15581 break;
15582
15583 case 500: /* block_call: block_call call_op2 operation2 opt_paren_args brace_block */
15584#line 5217 "parse.y"
15585 {
15586 if (NODE_EMPTY_ARGS_P((yyvsp[-1].node))) (yyvsp[-1].node) = 0;
15587 (yyval.node) = new_command_qcall(p, (yyvsp[-3].id), (yyvsp[-4].node), (yyvsp[-2].id), (yyvsp[-1].node), (yyvsp[0].node), &(yylsp[-2]), &(yyloc));
15588 /*% ripper: command_call!($:1, $:2, $:3, $:4) %*/
15589 if ((yyvsp[0].node)) {
15590 /*% ripper: method_add_block!($:$, $:5) %*/
15591 }
15592 }
15593#line 15594 "parse.c"
15594 break;
15595
15596 case 501: /* block_call: block_call call_op2 operation2 command_args do_block */
15597#line 5226 "parse.y"
15598 {
15599 (yyval.node) = new_command_qcall(p, (yyvsp[-3].id), (yyvsp[-4].node), (yyvsp[-2].id), (yyvsp[-1].node), (yyvsp[0].node), &(yylsp[-2]), &(yyloc));
15600 /*% ripper: method_add_block!(command_call!($:1, $:2, $:3, $:4), $:5) %*/
15601 }
15602#line 15603 "parse.c"
15603 break;
15604
15605 case 502: /* method_call: fcall paren_args */
15606#line 5233 "parse.y"
15607 {
15608 (yyvsp[-1].node_fcall)->nd_args = (yyvsp[0].node);
15609 (yyval.node) = (NODE *)(yyvsp[-1].node_fcall);
15610 nd_set_last_loc((yyvsp[-1].node_fcall), (yylsp[0]).end_pos);
15611 /*% ripper: method_add_arg!(fcall!($:1), $:2) %*/
15612 }
15613#line 15614 "parse.c"
15614 break;
15615
15616 case 503: /* method_call: primary_value call_op operation2 opt_paren_args */
15617#line 5240 "parse.y"
15618 {
15619 bool has_args = (yyvsp[0].node) != 0;
15620 if (NODE_EMPTY_ARGS_P((yyvsp[0].node))) (yyvsp[0].node) = 0;
15621 (yyval.node) = new_qcall(p, (yyvsp[-2].id), (yyvsp[-3].node), (yyvsp[-1].id), (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
15622 nd_set_line((yyval.node), (yylsp[-1]).end_pos.lineno);
15623 /*% ripper: call!($:1, $:2, $:3) %*/
15624 if (has_args) {
15625 /*% ripper: method_add_arg!($:$, $:4) %*/
15626 }
15627 }
15628#line 15629 "parse.c"
15629 break;
15630
15631 case 504: /* method_call: primary_value "::" operation2 paren_args */
15632#line 5251 "parse.y"
15633 {
15634 (yyval.node) = new_qcall(p, idCOLON2, (yyvsp[-3].node), (yyvsp[-1].id), (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
15635 nd_set_line((yyval.node), (yylsp[-1]).end_pos.lineno);
15636 /*% ripper: method_add_arg!(call!($:1, $:2, $:3), $:4) %*/
15637 }
15638#line 15639 "parse.c"
15639 break;
15640
15641 case 505: /* method_call: primary_value "::" operation3 */
15642#line 5257 "parse.y"
15643 {
15644 (yyval.node) = new_qcall(p, idCOLON2, (yyvsp[-2].node), (yyvsp[0].id), 0, &(yylsp[0]), &(yyloc));
15645 /*% ripper: call!($:1, $:2, $:3) %*/
15646 }
15647#line 15648 "parse.c"
15648 break;
15649
15650 case 506: /* method_call: primary_value call_op2 paren_args */
15651#line 5262 "parse.y"
15652 {
15653 (yyval.node) = new_qcall(p, (yyvsp[-1].id), (yyvsp[-2].node), idCall, (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
15654 nd_set_line((yyval.node), (yylsp[-1]).end_pos.lineno);
15655 /*% ripper: method_add_arg!(call!($:1, $:2, ID2VAL(idCall)), $:3) %*/
15656 }
15657#line 15658 "parse.c"
15658 break;
15659
15660 case 507: /* method_call: "'super'" paren_args */
15661#line 5268 "parse.y"
15662 {
15663 rb_code_location_t lparen_loc = (yylsp[0]);
15664 rb_code_location_t rparen_loc = (yylsp[0]);
15665 lparen_loc.end_pos.column = lparen_loc.beg_pos.column + 1;
15666 rparen_loc.beg_pos.column = rparen_loc.end_pos.column - 1;
15667
15668 (yyval.node) = NEW_SUPER((yyvsp[0].node), &(yyloc), &(yylsp[-1]), &lparen_loc, &rparen_loc);
15669 /*% ripper: super!($:2) %*/
15670 }
15671#line 15672 "parse.c"
15672 break;
15673
15674 case 508: /* method_call: "'super'" */
15675#line 5278 "parse.y"
15676 {
15677 (yyval.node) = NEW_ZSUPER(&(yyloc));
15678 /*% ripper: zsuper! %*/
15679 }
15680#line 15681 "parse.c"
15681 break;
15682
15683 case 509: /* method_call: primary_value '[' opt_call_args rbracket */
15684#line 5283 "parse.y"
15685 {
15686 (yyval.node) = NEW_CALL((yyvsp[-3].node), tAREF, (yyvsp[-1].node), &(yyloc));
15687 fixpos((yyval.node), (yyvsp[-3].node));
15688 /*% ripper: aref!($:1, $:3) %*/
15689 }
15690#line 15691 "parse.c"
15691 break;
15692
15693 case 510: /* brace_block: '{' brace_body '}' */
15694#line 5291 "parse.y"
15695 {
15696 (yyval.node) = (yyvsp[-1].node);
15697 set_embraced_location((yyval.node), &(yylsp[-2]), &(yylsp[0]));
15698 /*% ripper: $:2 %*/
15699 }
15700#line 15701 "parse.c"
15701 break;
15702
15703 case 511: /* brace_block: k_do do_body k_end */
15704#line 5297 "parse.y"
15705 {
15706 (yyval.node) = (yyvsp[-1].node);
15707 set_embraced_location((yyval.node), &(yylsp[-2]), &(yylsp[0]));
15708 /*% ripper: $:2 %*/
15709 }
15710#line 15711 "parse.c"
15711 break;
15712
15713 case 512: /* @29: %empty */
15714#line 5304 "parse.y"
15715 {(yyval.vars) = dyna_push(p);}
15716#line 15717 "parse.c"
15717 break;
15718
15719 case 513: /* brace_body: @29 max_numparam numparam it_id allow_exits opt_block_param_def compstmt_stmts */
15720#line 5307 "parse.y"
15721 {
15722 int max_numparam = p->max_numparam;
15723 ID it_id = p->it_id;
15724 p->max_numparam = (yyvsp[-5].num);
15725 p->it_id = (yyvsp[-3].id);
15726 (yyvsp[-1].node_args) = args_with_numbered(p, (yyvsp[-1].node_args), max_numparam, it_id);
15727 (yyval.node) = NEW_ITER((yyvsp[-1].node_args), (yyvsp[0].node), &(yyloc));
15728 /*% ripper: brace_block!($:args, $:compstmt) %*/
15729 restore_block_exit(p, (yyvsp[-2].node_exits));
15730 numparam_pop(p, (yyvsp[-4].node));
15731 dyna_pop(p, (yyvsp[-6].vars));
15732 }
15733#line 15734 "parse.c"
15734 break;
15735
15736 case 514: /* @30: %empty */
15737#line 5321 "parse.y"
15738 {
15739 (yyval.vars) = dyna_push(p);
15740 CMDARG_PUSH(0);
15741 }
15742#line 15743 "parse.c"
15743 break;
15744
15745 case 515: /* do_body: @30 max_numparam numparam it_id allow_exits opt_block_param_def bodystmt */
15746#line 5327 "parse.y"
15747 {
15748 int max_numparam = p->max_numparam;
15749 ID it_id = p->it_id;
15750 p->max_numparam = (yyvsp[-5].num);
15751 p->it_id = (yyvsp[-3].id);
15752 (yyvsp[-1].node_args) = args_with_numbered(p, (yyvsp[-1].node_args), max_numparam, it_id);
15753 (yyval.node) = NEW_ITER((yyvsp[-1].node_args), (yyvsp[0].node), &(yyloc));
15754 /*% ripper: do_block!($:args, $:bodystmt) %*/
15755 CMDARG_POP();
15756 restore_block_exit(p, (yyvsp[-2].node_exits));
15757 numparam_pop(p, (yyvsp[-4].node));
15758 dyna_pop(p, (yyvsp[-6].vars));
15759 }
15760#line 15761 "parse.c"
15761 break;
15762
15763 case 516: /* case_args: arg_value */
15764#line 5343 "parse.y"
15765 {
15766 check_literal_when(p, (yyvsp[0].node), &(yylsp[0]));
15767 (yyval.node) = NEW_LIST((yyvsp[0].node), &(yyloc));
15768 /*% ripper: args_add!(args_new!, $:arg_value) %*/
15769 }
15770#line 15771 "parse.c"
15771 break;
15772
15773 case 517: /* case_args: "*" arg_value */
15774#line 5349 "parse.y"
15775 {
15776 (yyval.node) = NEW_SPLAT((yyvsp[0].node), &(yyloc), &(yylsp[-1]));
15777 /*% ripper: args_add_star!(args_new!, $:arg_value) %*/
15778 }
15779#line 15780 "parse.c"
15780 break;
15781
15782 case 518: /* case_args: case_args ',' arg_value */
15783#line 5354 "parse.y"
15784 {
15785 check_literal_when(p, (yyvsp[0].node), &(yylsp[0]));
15786 (yyval.node) = last_arg_append(p, (yyvsp[-2].node), (yyvsp[0].node), &(yyloc));
15787 /*% ripper: args_add!($:non_last_args, $:arg_value) %*/
15788 }
15789#line 15790 "parse.c"
15790 break;
15791
15792 case 519: /* case_args: case_args ',' "*" arg_value */
15793#line 5360 "parse.y"
15794 {
15795 (yyval.node) = rest_arg_append(p, (yyvsp[-3].node), (yyvsp[0].node), &(yyloc));
15796 /*% ripper: args_add_star!($:non_last_args, $:arg_value) %*/
15797 }
15798#line 15799 "parse.c"
15799 break;
15800
15801 case 520: /* case_body: k_when case_args then compstmt_stmts cases */
15802#line 5369 "parse.y"
15803 {
15804 (yyval.node) = NEW_WHEN((yyvsp[-3].node), (yyvsp[-1].node), (yyvsp[0].node), &(yyloc), &(yylsp[-4]), &(yylsp[-2]));
15805 fixpos((yyval.node), (yyvsp[-3].node));
15806 /*% ripper: when!($:2, $:4, $:5) %*/
15807 }
15808#line 15809 "parse.c"
15809 break;
15810
15811 case 523: /* p_pvtbl: %empty */
15812#line 5380 "parse.y"
15813 {(yyval.tbl) = p->pvtbl; p->pvtbl = st_init_numtable();}
15814#line 15815 "parse.c"
15815 break;
15816
15817 case 524: /* p_pktbl: %empty */
15818#line 5381 "parse.y"
15819 {(yyval.tbl) = p->pktbl; p->pktbl = 0;}
15820#line 15821 "parse.c"
15821 break;
15822
15823 case 525: /* p_in_kwarg: %empty */
15824#line 5383 "parse.y"
15825 {
15826 (yyval.ctxt) = p->ctxt;
15827 SET_LEX_STATE(EXPR_BEG|EXPR_LABEL);
15828 p->command_start = FALSE;
15829 p->ctxt.in_kwarg = 1;
15830 }
15831#line 15832 "parse.c"
15832 break;
15833
15834 case 526: /* $@31: %empty */
15835#line 5394 "parse.y"
15836 {
15837 pop_pktbl(p, (yyvsp[-2].tbl));
15838 pop_pvtbl(p, (yyvsp[-3].tbl));
15839 p->ctxt.in_kwarg = (yyvsp[-4].ctxt).in_kwarg;
15840 }
15841#line 15842 "parse.c"
15842 break;
15843
15844 case 527: /* p_case_body: "'in'" p_in_kwarg p_pvtbl p_pktbl p_top_expr then $@31 compstmt_stmts p_cases */
15845#line 5401 "parse.y"
15846 {
15847 (yyval.node) = NEW_IN((yyvsp[-4].node), (yyvsp[-1].node), (yyvsp[0].node), &(yyloc));
15848 /*% ripper: in!($:expr, $:compstmt, $:cases) %*/
15849 }
15850#line 15851 "parse.c"
15851 break;
15852
15853 case 531: /* p_top_expr: p_top_expr_body "'if' modifier" expr_value */
15854#line 5413 "parse.y"
15855 {
15856 (yyval.node) = new_if(p, (yyvsp[0].node), (yyvsp[-2].node), 0, &(yyloc), &(yylsp[-1]), &NULL_LOC, &NULL_LOC);
15857 fixpos((yyval.node), (yyvsp[0].node));
15858 /*% ripper: if_mod!($:3, $:1) %*/
15859 }
15860#line 15861 "parse.c"
15861 break;
15862
15863 case 532: /* p_top_expr: p_top_expr_body "'unless' modifier" expr_value */
15864#line 5419 "parse.y"
15865 {
15866 (yyval.node) = new_unless(p, (yyvsp[0].node), (yyvsp[-2].node), 0, &(yyloc), &(yylsp[-1]), &NULL_LOC, &NULL_LOC);
15867 fixpos((yyval.node), (yyvsp[0].node));
15868 /*% ripper: unless_mod!($:3, $:1) %*/
15869 }
15870#line 15871 "parse.c"
15871 break;
15872
15873 case 534: /* p_top_expr_body: p_expr ',' */
15874#line 5428 "parse.y"
15875 {
15876 (yyval.node) = new_array_pattern_tail(p, 0, 1, 0, 0, &(yyloc));
15877 (yyval.node) = new_array_pattern(p, 0, (yyvsp[-1].node), (yyval.node), &(yyloc));
15878 /*% ripper: aryptn!(Qnil, [$:1], Qnil, Qnil) %*/
15879 }
15880#line 15881 "parse.c"
15881 break;
15882
15883 case 535: /* p_top_expr_body: p_expr ',' p_args */
15884#line 5434 "parse.y"
15885 {
15886 (yyval.node) = new_array_pattern(p, 0, (yyvsp[-2].node), (yyvsp[0].node), &(yyloc));
15887 nd_set_first_loc((yyval.node), (yylsp[-2]).beg_pos);
15888 /*% ripper: aryptn!(Qnil, aryptn_pre_args(p, $:1, $:3[0]), *$:3[1..2]) %*/
15889 }
15890#line 15891 "parse.c"
15891 break;
15892
15893 case 536: /* p_top_expr_body: p_find */
15894#line 5440 "parse.y"
15895 {
15896 (yyval.node) = new_find_pattern(p, 0, (yyvsp[0].node), &(yyloc));
15897 /*% ripper: fndptn!(Qnil, *$:1[0..2]) %*/
15898 }
15899#line 15900 "parse.c"
15900 break;
15901
15902 case 537: /* p_top_expr_body: p_args_tail */
15903#line 5445 "parse.y"
15904 {
15905 (yyval.node) = new_array_pattern(p, 0, 0, (yyvsp[0].node), &(yyloc));
15906 /*% ripper: aryptn!(Qnil, *$:1[0..2]) %*/
15907 }
15908#line 15909 "parse.c"
15909 break;
15910
15911 case 538: /* p_top_expr_body: p_kwargs */
15912#line 5450 "parse.y"
15913 {
15914 (yyval.node) = new_hash_pattern(p, 0, (yyvsp[0].node), &(yyloc));
15915 /*% ripper: hshptn!(Qnil, *$:1[0..1]) %*/
15916 }
15917#line 15918 "parse.c"
15918 break;
15919
15920 case 540: /* p_as: p_expr "=>" p_variable */
15921#line 5460 "parse.y"
15922 {
15923 NODE *n = NEW_LIST((yyvsp[-2].node), &(yyloc));
15924 n = list_append(p, n, (yyvsp[0].node));
15925 (yyval.node) = new_hash(p, n, &(yyloc));
15926 /*% ripper: binary!($:1, ID2VAL((id_assoc)), $:3) %*/
15927 }
15928#line 15929 "parse.c"
15929 break;
15930
15931 case 542: /* p_alt: p_alt '|' p_expr_basic */
15932#line 5470 "parse.y"
15933 {
15934 (yyval.node) = NEW_OR((yyvsp[-2].node), (yyvsp[0].node), &(yyloc), &(yylsp[-1]));
15935 /*% ripper: binary!($:1, ID2VAL(idOr), $:3) %*/
15936 }
15937#line 15938 "parse.c"
15938 break;
15939
15940 case 544: /* p_lparen: '(' p_pktbl */
15941#line 5478 "parse.y"
15942 {
15943 (yyval.tbl) = (yyvsp[0].tbl);
15944 /*% ripper: $:2 %*/
15945 }
15946#line 15947 "parse.c"
15947 break;
15948
15949 case 545: /* p_lbracket: '[' p_pktbl */
15950#line 5485 "parse.y"
15951 {
15952 (yyval.tbl) = (yyvsp[0].tbl);
15953 /*% ripper: $:2 %*/
15954 }
15955#line 15956 "parse.c"
15956 break;
15957
15958 case 548: /* p_expr_basic: p_const p_lparen p_args rparen */
15959#line 5494 "parse.y"
15960 {
15961 pop_pktbl(p, (yyvsp[-2].tbl));
15962 (yyval.node) = new_array_pattern(p, (yyvsp[-3].node), 0, (yyvsp[-1].node), &(yyloc));
15963 nd_set_first_loc((yyval.node), (yylsp[-3]).beg_pos);
15964 /*% ripper: aryptn!($:p_const, *$:p_args[0..2]) %*/
15965 }
15966#line 15967 "parse.c"
15967 break;
15968
15969 case 549: /* p_expr_basic: p_const p_lparen p_find rparen */
15970#line 5501 "parse.y"
15971 {
15972 pop_pktbl(p, (yyvsp[-2].tbl));
15973 (yyval.node) = new_find_pattern(p, (yyvsp[-3].node), (yyvsp[-1].node), &(yyloc));
15974 nd_set_first_loc((yyval.node), (yylsp[-3]).beg_pos);
15975 /*% ripper: fndptn!($:p_const, *$:p_find[0..2]) %*/
15976 }
15977#line 15978 "parse.c"
15978 break;
15979
15980 case 550: /* p_expr_basic: p_const p_lparen p_kwargs rparen */
15981#line 5508 "parse.y"
15982 {
15983 pop_pktbl(p, (yyvsp[-2].tbl));
15984 (yyval.node) = new_hash_pattern(p, (yyvsp[-3].node), (yyvsp[-1].node), &(yyloc));
15985 nd_set_first_loc((yyval.node), (yylsp[-3]).beg_pos);
15986 /*% ripper: hshptn!($:p_const, *$:p_kwargs[0..1]) %*/
15987 }
15988#line 15989 "parse.c"
15989 break;
15990
15991 case 551: /* p_expr_basic: p_const '(' rparen */
15992#line 5515 "parse.y"
15993 {
15994 (yyval.node) = new_array_pattern_tail(p, 0, 0, 0, 0, &(yyloc));
15995 (yyval.node) = new_array_pattern(p, (yyvsp[-2].node), 0, (yyval.node), &(yyloc));
15996 /*% ripper: aryptn!($:p_const, Qnil, Qnil, Qnil) %*/
15997 }
15998#line 15999 "parse.c"
15999 break;
16000
16001 case 552: /* p_expr_basic: p_const p_lbracket p_args rbracket */
16002#line 5521 "parse.y"
16003 {
16004 pop_pktbl(p, (yyvsp[-2].tbl));
16005 (yyval.node) = new_array_pattern(p, (yyvsp[-3].node), 0, (yyvsp[-1].node), &(yyloc));
16006 nd_set_first_loc((yyval.node), (yylsp[-3]).beg_pos);
16007 /*% ripper: aryptn!($:p_const, *$:p_args[0..2]) %*/
16008 }
16009#line 16010 "parse.c"
16010 break;
16011
16012 case 553: /* p_expr_basic: p_const p_lbracket p_find rbracket */
16013#line 5528 "parse.y"
16014 {
16015 pop_pktbl(p, (yyvsp[-2].tbl));
16016 (yyval.node) = new_find_pattern(p, (yyvsp[-3].node), (yyvsp[-1].node), &(yyloc));
16017 nd_set_first_loc((yyval.node), (yylsp[-3]).beg_pos);
16018 /*% ripper: fndptn!($:p_const, *$:p_find[0..2]) %*/
16019 }
16020#line 16021 "parse.c"
16021 break;
16022
16023 case 554: /* p_expr_basic: p_const p_lbracket p_kwargs rbracket */
16024#line 5535 "parse.y"
16025 {
16026 pop_pktbl(p, (yyvsp[-2].tbl));
16027 (yyval.node) = new_hash_pattern(p, (yyvsp[-3].node), (yyvsp[-1].node), &(yyloc));
16028 nd_set_first_loc((yyval.node), (yylsp[-3]).beg_pos);
16029 /*% ripper: hshptn!($:p_const, *$:p_kwargs[0..1]) %*/
16030 }
16031#line 16032 "parse.c"
16032 break;
16033
16034 case 555: /* p_expr_basic: p_const '[' rbracket */
16035#line 5542 "parse.y"
16036 {
16037 (yyval.node) = new_array_pattern_tail(p, 0, 0, 0, 0, &(yyloc));
16038 (yyval.node) = new_array_pattern(p, (yyvsp[-2].node), 0, (yyval.node), &(yyloc));
16039 /*% ripper: aryptn!($:1, Qnil, Qnil, Qnil) %*/
16040 }
16041#line 16042 "parse.c"
16042 break;
16043
16044 case 556: /* p_expr_basic: "[" p_args rbracket */
16045#line 5548 "parse.y"
16046 {
16047 (yyval.node) = new_array_pattern(p, 0, 0, (yyvsp[-1].node), &(yyloc));
16048 /*% ripper: aryptn!(Qnil, *$:p_args[0..2]) %*/
16049 }
16050#line 16051 "parse.c"
16051 break;
16052
16053 case 557: /* p_expr_basic: "[" p_find rbracket */
16054#line 5553 "parse.y"
16055 {
16056 (yyval.node) = new_find_pattern(p, 0, (yyvsp[-1].node), &(yyloc));
16057 /*% ripper: fndptn!(Qnil, *$:p_find[0..2]) %*/
16058 }
16059#line 16060 "parse.c"
16060 break;
16061
16062 case 558: /* p_expr_basic: "[" rbracket */
16063#line 5558 "parse.y"
16064 {
16065 (yyval.node) = new_array_pattern_tail(p, 0, 0, 0, 0, &(yyloc));
16066 (yyval.node) = new_array_pattern(p, 0, 0, (yyval.node), &(yyloc));
16067 /*% ripper: aryptn!(Qnil, Qnil, Qnil, Qnil) %*/
16068 }
16069#line 16070 "parse.c"
16070 break;
16071
16072 case 559: /* $@32: %empty */
16073#line 5564 "parse.y"
16074 {
16075 p->ctxt.in_kwarg = 0;
16076 }
16077#line 16078 "parse.c"
16078 break;
16079
16080 case 560: /* p_expr_basic: "{" p_pktbl lex_ctxt $@32 p_kwargs rbrace */
16081#line 5568 "parse.y"
16082 {
16083 pop_pktbl(p, (yyvsp[-4].tbl));
16084 p->ctxt.in_kwarg = (yyvsp[-3].ctxt).in_kwarg;
16085 (yyval.node) = new_hash_pattern(p, 0, (yyvsp[-1].node), &(yyloc));
16086 /*% ripper: hshptn!(Qnil, *$:p_kwargs[0..1]) %*/
16087 }
16088#line 16089 "parse.c"
16089 break;
16090
16091 case 561: /* p_expr_basic: "{" rbrace */
16092#line 5575 "parse.y"
16093 {
16094 (yyval.node) = new_hash_pattern_tail(p, 0, 0, &(yyloc));
16095 (yyval.node) = new_hash_pattern(p, 0, (yyval.node), &(yyloc));
16096 /*% ripper: hshptn!(Qnil, Qnil, Qnil) %*/
16097 }
16098#line 16099 "parse.c"
16099 break;
16100
16101 case 562: /* p_expr_basic: "(" p_pktbl p_expr rparen */
16102#line 5581 "parse.y"
16103 {
16104 pop_pktbl(p, (yyvsp[-2].tbl));
16105 (yyval.node) = (yyvsp[-1].node);
16106 /*% ripper: $:p_expr %*/
16107 }
16108#line 16109 "parse.c"
16109 break;
16110
16111 case 563: /* p_args: p_expr */
16112#line 5589 "parse.y"
16113 {
16114 NODE *pre_args = NEW_LIST((yyvsp[0].node), &(yyloc));
16115 (yyval.node) = new_array_pattern_tail(p, pre_args, 0, 0, 0, &(yyloc));
16116 /*% ripper: [[$:1], Qnil, Qnil] %*/
16117 }
16118#line 16119 "parse.c"
16119 break;
16120
16121 case 564: /* p_args: p_args_head */
16122#line 5595 "parse.y"
16123 {
16124 (yyval.node) = new_array_pattern_tail(p, (yyvsp[0].node), 1, 0, 0, &(yyloc));
16125 /*% ripper: [$:1, Qnil, Qnil] %*/
16126 }
16127#line 16128 "parse.c"
16128 break;
16129
16130 case 565: /* p_args: p_args_head p_arg */
16131#line 5600 "parse.y"
16132 {
16133 (yyval.node) = new_array_pattern_tail(p, list_concat((yyvsp[-1].node), (yyvsp[0].node)), 0, 0, 0, &(yyloc));
16134 /*% ripper: [rb_ary_concat($:1, $:2), Qnil, Qnil] %*/
16135 }
16136#line 16137 "parse.c"
16137 break;
16138
16139 case 566: /* p_args: p_args_head p_rest */
16140#line 5605 "parse.y"
16141 {
16142 (yyval.node) = new_array_pattern_tail(p, (yyvsp[-1].node), 1, (yyvsp[0].node), 0, &(yyloc));
16143 /*% ripper: [$:1, $:2, Qnil] %*/
16144 }
16145#line 16146 "parse.c"
16146 break;
16147
16148 case 567: /* p_args: p_args_head p_rest ',' p_args_post */
16149#line 5610 "parse.y"
16150 {
16151 (yyval.node) = new_array_pattern_tail(p, (yyvsp[-3].node), 1, (yyvsp[-2].node), (yyvsp[0].node), &(yyloc));
16152 /*% ripper: [$:1, $:2, $:4] %*/
16153 }
16154#line 16155 "parse.c"
16155 break;
16156
16157 case 570: /* p_args_head: p_args_head p_arg ',' */
16158#line 5619 "parse.y"
16159 {
16160 (yyval.node) = list_concat((yyvsp[-2].node), (yyvsp[-1].node));
16161 /*% ripper: rb_ary_concat($:1, $:2) %*/
16162 }
16163#line 16164 "parse.c"
16164 break;
16165
16166 case 571: /* p_args_tail: p_rest */
16167#line 5626 "parse.y"
16168 {
16169 (yyval.node) = new_array_pattern_tail(p, 0, 1, (yyvsp[0].node), 0, &(yyloc));
16170 /*% ripper: [Qnil, $:1, Qnil] %*/
16171 }
16172#line 16173 "parse.c"
16173 break;
16174
16175 case 572: /* p_args_tail: p_rest ',' p_args_post */
16176#line 5631 "parse.y"
16177 {
16178 (yyval.node) = new_array_pattern_tail(p, 0, 1, (yyvsp[-2].node), (yyvsp[0].node), &(yyloc));
16179 /*% ripper: [Qnil, $:1, $:3] %*/
16180 }
16181#line 16182 "parse.c"
16182 break;
16183
16184 case 573: /* p_find: p_rest ',' p_args_post ',' p_rest */
16185#line 5638 "parse.y"
16186 {
16187 (yyval.node) = new_find_pattern_tail(p, (yyvsp[-4].node), (yyvsp[-2].node), (yyvsp[0].node), &(yyloc));
16188 /*% ripper: [$:1, $:3, $:5] %*/
16189 }
16190#line 16191 "parse.c"
16191 break;
16192
16193 case 574: /* p_rest: "*" "local variable or method" */
16194#line 5646 "parse.y"
16195 {
16196 error_duplicate_pattern_variable(p, (yyvsp[0].id), &(yylsp[0]));
16197 /*% ripper: var_field!($:2) %*/
16198 (yyval.node) = assignable(p, (yyvsp[0].id), 0, &(yyloc));
16199 }
16200#line 16201 "parse.c"
16201 break;
16202
16203 case 575: /* p_rest: "*" */
16204#line 5652 "parse.y"
16205 {
16206 (yyval.node) = 0;
16207 /*% ripper: var_field!(Qnil) %*/
16208 }
16209#line 16210 "parse.c"
16210 break;
16211
16212 case 577: /* p_args_post: p_args_post ',' p_arg */
16213#line 5660 "parse.y"
16214 {
16215 (yyval.node) = list_concat((yyvsp[-2].node), (yyvsp[0].node));
16216 /*% ripper: rb_ary_concat($:1, $:3) %*/
16217 }
16218#line 16219 "parse.c"
16219 break;
16220
16221 case 578: /* p_arg: p_expr */
16222#line 5667 "parse.y"
16223 {
16224 (yyval.node) = NEW_LIST((yyvsp[0].node), &(yyloc));
16225 /*% ripper: [$:1] %*/
16226 }
16227#line 16228 "parse.c"
16228 break;
16229
16230 case 579: /* p_kwargs: p_kwarg ',' p_any_kwrest */
16231#line 5674 "parse.y"
16232 {
16233 (yyval.node) = new_hash_pattern_tail(p, new_unique_key_hash(p, (yyvsp[-2].node), &(yyloc)), (yyvsp[0].id), &(yyloc));
16234 /*% ripper: [$:1, $:3] %*/
16235 }
16236#line 16237 "parse.c"
16237 break;
16238
16239 case 580: /* p_kwargs: p_kwarg */
16240#line 5679 "parse.y"
16241 {
16242 (yyval.node) = new_hash_pattern_tail(p, new_unique_key_hash(p, (yyvsp[0].node), &(yyloc)), 0, &(yyloc));
16243 /*% ripper: [$:1, Qnil] %*/
16244 }
16245#line 16246 "parse.c"
16246 break;
16247
16248 case 581: /* p_kwargs: p_kwarg ',' */
16249#line 5684 "parse.y"
16250 {
16251 (yyval.node) = new_hash_pattern_tail(p, new_unique_key_hash(p, (yyvsp[-1].node), &(yyloc)), 0, &(yyloc));
16252 /*% ripper: [$:1, Qnil] %*/
16253 }
16254#line 16255 "parse.c"
16255 break;
16256
16257 case 582: /* p_kwargs: p_any_kwrest */
16258#line 5689 "parse.y"
16259 {
16260 (yyval.node) = new_hash_pattern_tail(p, new_hash(p, 0, &(yyloc)), (yyvsp[0].id), &(yyloc));
16261 /*% ripper: [[], $:1] %*/
16262 }
16263#line 16264 "parse.c"
16264 break;
16265
16266 case 584: /* p_kwarg: p_kwarg ',' p_kw */
16267#line 5698 "parse.y"
16268 {
16269 (yyval.node) = list_concat((yyvsp[-2].node), (yyvsp[0].node));
16270 /*% ripper: rb_ary_push($:1, $:3) %*/
16271 }
16272#line 16273 "parse.c"
16273 break;
16274
16275 case 585: /* p_kw: p_kw_label p_expr */
16276#line 5705 "parse.y"
16277 {
16278 error_duplicate_pattern_key(p, (yyvsp[-1].id), &(yylsp[-1]));
16279 (yyval.node) = list_append(p, NEW_LIST(NEW_SYM(rb_id2str((yyvsp[-1].id)), &(yylsp[-1])), &(yyloc)), (yyvsp[0].node));
16280 /*% ripper: [$:1, $:2] %*/
16281 }
16282#line 16283 "parse.c"
16283 break;
16284
16285 case 586: /* p_kw: p_kw_label */
16286#line 5711 "parse.y"
16287 {
16288 error_duplicate_pattern_key(p, (yyvsp[0].id), &(yylsp[0]));
16289 if ((yyvsp[0].id) && !is_local_id((yyvsp[0].id))) {
16290 yyerror1(&(yylsp[0]), "key must be valid as local variables");
16291 }
16292 error_duplicate_pattern_variable(p, (yyvsp[0].id), &(yylsp[0]));
16293 (yyval.node) = list_append(p, NEW_LIST(NEW_SYM(rb_id2str((yyvsp[0].id)), &(yyloc)), &(yyloc)), assignable(p, (yyvsp[0].id), 0, &(yyloc)));
16294 /*% ripper: [$:1, Qnil] %*/
16295 }
16296#line 16297 "parse.c"
16297 break;
16298
16299 case 588: /* p_kw_label: "string literal" string_contents tLABEL_END */
16300#line 5724 "parse.y"
16301 {
16302 YYLTYPE loc = code_loc_gen(&(yylsp[-2]), &(yylsp[0]));
16303 if (!(yyvsp[-1].node) || nd_type_p((yyvsp[-1].node), NODE_STR)) {
16304 NODE *node = dsym_node(p, (yyvsp[-1].node), &loc);
16305 (yyval.id) = rb_sym2id(rb_node_sym_string_val(node));
16306 }
16307 else {
16308 yyerror1(&loc, "symbol literal with interpolation is not allowed");
16309 (yyval.id) = rb_intern_str(STR_NEW0());
16310 }
16311 /*% ripper: $:2 %*/
16312 }
16313#line 16314 "parse.c"
16314 break;
16315
16316 case 589: /* p_kwrest: kwrest_mark "local variable or method" */
16317#line 5739 "parse.y"
16318 {
16319 (yyval.id) = (yyvsp[0].id);
16320 /*% ripper: var_field!($:2) %*/
16321 }
16322#line 16323 "parse.c"
16323 break;
16324
16325 case 590: /* p_kwrest: kwrest_mark */
16326#line 5744 "parse.y"
16327 {
16328 (yyval.id) = 0;
16329 /*% ripper: Qnil %*/
16330 }
16331#line 16332 "parse.c"
16332 break;
16333
16334 case 591: /* p_kwnorest: kwrest_mark "'nil'" */
16335#line 5751 "parse.y"
16336 {
16337 (yyval.id) = 0;
16338 }
16339#line 16340 "parse.c"
16340 break;
16341
16342 case 593: /* p_any_kwrest: p_kwnorest */
16343#line 5758 "parse.y"
16344 {
16345 (yyval.id) = idNil;
16346 /*% ripper: var_field!(ID2VAL(idNil)) %*/
16347 }
16348#line 16349 "parse.c"
16349 break;
16350
16351 case 595: /* range_expr_p_primitive: p_primitive ".." p_primitive */
16352#line 3103 "parse.y"
16353 {
16354 value_expr((yyvsp[-2].node));
16355 value_expr((yyvsp[0].node));
16356 (yyval.node) = NEW_DOT2((yyvsp[-2].node), (yyvsp[0].node), &(yyloc), &(yylsp[-1]));
16357 /*% ripper: dot2!($:1, $:3) %*/
16358 }
16359#line 16360 "parse.c"
16360 break;
16361
16362 case 596: /* range_expr_p_primitive: p_primitive "..." p_primitive */
16363#line 3110 "parse.y"
16364 {
16365 value_expr((yyvsp[-2].node));
16366 value_expr((yyvsp[0].node));
16367 (yyval.node) = NEW_DOT3((yyvsp[-2].node), (yyvsp[0].node), &(yyloc), &(yylsp[-1]));
16368 /*% ripper: dot3!($:1, $:3) %*/
16369 }
16370#line 16371 "parse.c"
16371 break;
16372
16373 case 597: /* range_expr_p_primitive: p_primitive ".." */
16374#line 3117 "parse.y"
16375 {
16376 value_expr((yyvsp[-1].node));
16377 (yyval.node) = NEW_DOT2((yyvsp[-1].node), new_nil_at(p, &(yylsp[0]).end_pos), &(yyloc), &(yylsp[0]));
16378 /*% ripper: dot2!($:1, Qnil) %*/
16379 }
16380#line 16381 "parse.c"
16381 break;
16382
16383 case 598: /* range_expr_p_primitive: p_primitive "..." */
16384#line 3123 "parse.y"
16385 {
16386 value_expr((yyvsp[-1].node));
16387 (yyval.node) = NEW_DOT3((yyvsp[-1].node), new_nil_at(p, &(yylsp[0]).end_pos), &(yyloc), &(yylsp[0]));
16388 /*% ripper: dot3!($:1, Qnil) %*/
16389 }
16390#line 16391 "parse.c"
16391 break;
16392
16393 case 599: /* range_expr_p_primitive: "(.." p_primitive */
16394#line 3129 "parse.y"
16395 {
16396 value_expr((yyvsp[0].node));
16397 (yyval.node) = NEW_DOT2(new_nil_at(p, &(yylsp[-1]).beg_pos), (yyvsp[0].node), &(yyloc), &(yylsp[-1]));
16398 /*% ripper: dot2!(Qnil, $:2) %*/
16399 }
16400#line 16401 "parse.c"
16401 break;
16402
16403 case 600: /* range_expr_p_primitive: "(..." p_primitive */
16404#line 3135 "parse.y"
16405 {
16406 value_expr((yyvsp[0].node));
16407 (yyval.node) = NEW_DOT3(new_nil_at(p, &(yylsp[-1]).beg_pos), (yyvsp[0].node), &(yyloc), &(yylsp[-1]));
16408 /*% ripper: dot3!(Qnil, $:2) %*/
16409 }
16410#line 16411 "parse.c"
16411 break;
16412
16413 case 613: /* p_primitive: keyword_variable */
16414#line 5773 "parse.y"
16415 {
16416 if (!((yyval.node) = gettable(p, (yyvsp[0].id), &(yyloc)))) (yyval.node) = NEW_ERROR(&(yyloc));
16417 /*% ripper: var_ref!($:1) %*/
16418 }
16419#line 16420 "parse.c"
16420 break;
16421
16422 case 615: /* p_variable: "local variable or method" */
16423#line 5781 "parse.y"
16424 {
16425 error_duplicate_pattern_variable(p, (yyvsp[0].id), &(yylsp[0]));
16426 /*% ripper: var_field!($:1) %*/
16427 (yyval.node) = assignable(p, (yyvsp[0].id), 0, &(yyloc));
16428 }
16429#line 16430 "parse.c"
16430 break;
16431
16432 case 616: /* p_var_ref: '^' "local variable or method" */
16433#line 5789 "parse.y"
16434 {
16435 NODE *n = gettable(p, (yyvsp[0].id), &(yyloc));
16436 if (!n) {
16437 n = NEW_ERROR(&(yyloc));
16438 }
16439 else if (!(nd_type_p(n, NODE_LVAR) || nd_type_p(n, NODE_DVAR))) {
16440 compile_error(p, "%"PRIsVALUE": no such local variable", rb_id2str((yyvsp[0].id)));
16441 }
16442 (yyval.node) = n;
16443 /*% ripper: var_ref!($:2) %*/
16444 }
16445#line 16446 "parse.c"
16446 break;
16447
16448 case 617: /* p_var_ref: '^' nonlocal_var */
16449#line 5801 "parse.y"
16450 {
16451 if (!((yyval.node) = gettable(p, (yyvsp[0].id), &(yyloc)))) (yyval.node) = NEW_ERROR(&(yyloc));
16452 /*% ripper: var_ref!($:2) %*/
16453 }
16454#line 16455 "parse.c"
16455 break;
16456
16457 case 618: /* p_expr_ref: '^' "(" expr_value rparen */
16458#line 5808 "parse.y"
16459 {
16460 (yyval.node) = NEW_BLOCK((yyvsp[-1].node), &(yyloc));
16461 /*% ripper: begin!($:3) %*/
16462 }
16463#line 16464 "parse.c"
16464 break;
16465
16466 case 619: /* p_const: ":: at EXPR_BEG" cname */
16467#line 5815 "parse.y"
16468 {
16469 (yyval.node) = NEW_COLON3((yyvsp[0].id), &(yyloc), &(yylsp[-1]), &(yylsp[0]));
16470 /*% ripper: top_const_ref!($:2) %*/
16471 }
16472#line 16473 "parse.c"
16473 break;
16474
16475 case 620: /* p_const: p_const "::" cname */
16476#line 5820 "parse.y"
16477 {
16478 (yyval.node) = NEW_COLON2((yyvsp[-2].node), (yyvsp[0].id), &(yyloc), &(yylsp[-1]), &(yylsp[0]));
16479 /*% ripper: const_path_ref!($:1, $:3) %*/
16480 }
16481#line 16482 "parse.c"
16482 break;
16483
16484 case 621: /* p_const: "constant" */
16485#line 5825 "parse.y"
16486 {
16487 (yyval.node) = gettable(p, (yyvsp[0].id), &(yyloc));
16488 /*% ripper: var_ref!($:1) %*/
16489 }
16490#line 16491 "parse.c"
16491 break;
16492
16493 case 622: /* opt_rescue: k_rescue exc_list exc_var then compstmt_stmts opt_rescue */
16494#line 5834 "parse.y"
16495 {
16496 NODE *err = (yyvsp[-3].node);
16497 if ((yyvsp[-3].node)) {
16498 err = NEW_ERRINFO(&(yylsp[-3]));
16499 err = node_assign(p, (yyvsp[-3].node), err, NO_LEX_CTXT, &(yylsp[-3]));
16500 }
16501 (yyval.node) = NEW_RESBODY((yyvsp[-4].node), (yyvsp[-3].node), (yyvsp[-1].node), (yyvsp[0].node), &(yyloc));
16502 if ((yyvsp[-4].node)) {
16503 fixpos((yyval.node), (yyvsp[-4].node));
16504 }
16505 else if ((yyvsp[-3].node)) {
16506 fixpos((yyval.node), (yyvsp[-3].node));
16507 }
16508 else {
16509 fixpos((yyval.node), (yyvsp[-1].node));
16510 }
16511 /*% ripper: rescue!($:2, $:3, $:5, $:6) %*/
16512 }
16513#line 16514 "parse.c"
16514 break;
16515
16516 case 624: /* exc_list: arg_value */
16517#line 5856 "parse.y"
16518 {
16519 (yyval.node) = NEW_LIST((yyvsp[0].node), &(yyloc));
16520 /*% ripper: rb_ary_new3(1, $:1) %*/
16521 }
16522#line 16523 "parse.c"
16523 break;
16524
16525 case 625: /* exc_list: mrhs */
16526#line 5861 "parse.y"
16527 {
16528 if (!((yyval.node) = splat_array((yyvsp[0].node)))) (yyval.node) = (yyvsp[0].node);
16529 }
16530#line 16531 "parse.c"
16531 break;
16532
16533 case 627: /* exc_var: "=>" lhs */
16534#line 5868 "parse.y"
16535 {
16536 (yyval.node) = (yyvsp[0].node);
16537 /*% ripper: $:2 %*/
16538 }
16539#line 16540 "parse.c"
16540 break;
16541
16542 case 629: /* opt_ensure: k_ensure stmts option_terms */
16543#line 5876 "parse.y"
16544 {
16545 p->ctxt.in_rescue = (yyvsp[-2].ctxt).in_rescue;
16546 (yyval.node) = (yyvsp[-1].node);
16547 void_expr(p, void_stmts(p, (yyval.node)));
16548 /*% ripper: ensure!($:2) %*/
16549 }
16550#line 16551 "parse.c"
16551 break;
16552
16553 case 633: /* strings: string */
16554#line 5890 "parse.y"
16555 {
16556 if (!(yyvsp[0].node)) {
16557 (yyval.node) = NEW_STR(STRING_NEW0(), &(yyloc));
16558 } else {
16559 (yyval.node) = evstr2dstr(p, (yyvsp[0].node));
16560 }
16561 /*% ripper: $:1 %*/
16562 }
16563#line 16564 "parse.c"
16564 break;
16565
16566 case 636: /* string: string string1 */
16567#line 5903 "parse.y"
16568 {
16569 (yyval.node) = literal_concat(p, (yyvsp[-1].node), (yyvsp[0].node), &(yyloc));
16570 /*% ripper: string_concat!($:1, $:2) %*/
16571 }
16572#line 16573 "parse.c"
16573 break;
16574
16575 case 637: /* string1: "string literal" string_contents "terminator" */
16576#line 5910 "parse.y"
16577 {
16578 (yyval.node) = heredoc_dedent(p, (yyvsp[-1].node));
16579 if ((yyval.node)) nd_set_loc((yyval.node), &(yyloc));
16580 /*% ripper: $:2 %*/
16581 if (p->heredoc_indent > 0) {
16582 /*% ripper: heredoc_dedent!($:$, INT2NUM(%{p->heredoc_indent})) %*/
16583 p->heredoc_indent = 0;
16584 }
16585 /*% ripper: string_literal!($:$) %*/
16586 }
16587#line 16588 "parse.c"
16588 break;
16589
16590 case 638: /* xstring: "backtick literal" xstring_contents "terminator" */
16591#line 5923 "parse.y"
16592 {
16593 (yyval.node) = new_xstring(p, heredoc_dedent(p, (yyvsp[-1].node)), &(yyloc));
16594 /*% ripper: $:2 %*/
16595 if (p->heredoc_indent > 0) {
16596 /*% ripper: heredoc_dedent!($:$, INT2NUM(%{p->heredoc_indent})) %*/
16597 p->heredoc_indent = 0;
16598 }
16599 /*% ripper: xstring_literal!($:$) %*/
16600 }
16601#line 16602 "parse.c"
16602 break;
16603
16604 case 639: /* regexp: "regexp literal" regexp_contents tREGEXP_END */
16605#line 5935 "parse.y"
16606 {
16607 (yyval.node) = new_regexp(p, (yyvsp[-1].node), (yyvsp[0].num), &(yyloc), &(yylsp[-2]), &(yylsp[-1]), &(yylsp[0]));
16608 /*% ripper: regexp_literal!($:2, $:3) %*/
16609 }
16610#line 16611 "parse.c"
16611 break;
16612
16613 case 642: /* words_tWORDS_BEG_word_list: "word list" nonempty_list_' ' word_list "terminator" */
16614#line 3152 "parse.y"
16615 {
16616 (yyval.node) = make_list((yyvsp[-1].node), &(yyloc));
16617 /*% ripper: array!($:3) %*/
16618 }
16619#line 16620 "parse.c"
16620 break;
16621
16622 case 644: /* word_list: %empty */
16623#line 5945 "parse.y"
16624 {
16625 (yyval.node) = 0;
16626 /*% ripper: words_new! %*/
16627 }
16628#line 16629 "parse.c"
16629 break;
16630
16631 case 645: /* word_list: word_list word nonempty_list_' ' */
16632#line 5950 "parse.y"
16633 {
16634 (yyval.node) = list_append(p, (yyvsp[-2].node), evstr2dstr(p, (yyvsp[-1].node)));
16635 /*% ripper: words_add!($:1, $:2) %*/
16636 }
16637#line 16638 "parse.c"
16638 break;
16639
16640 case 647: /* word: word string_content */
16641#line 5959 "parse.y"
16642 {
16643 (yyval.node) = literal_concat(p, (yyvsp[-1].node), (yyvsp[0].node), &(yyloc));
16644 /*% ripper: word_add!($:1, $:2) %*/
16645 }
16646#line 16647 "parse.c"
16647 break;
16648
16649 case 648: /* words_tSYMBOLS_BEG_symbol_list: "symbol list" nonempty_list_' ' symbol_list "terminator" */
16650#line 3152 "parse.y"
16651 {
16652 (yyval.node) = make_list((yyvsp[-1].node), &(yyloc));
16653 /*% ripper: array!($:3) %*/
16654 }
16655#line 16656 "parse.c"
16656 break;
16657
16658 case 650: /* symbol_list: %empty */
16659#line 5969 "parse.y"
16660 {
16661 (yyval.node) = 0;
16662 /*% ripper: symbols_new! %*/
16663 }
16664#line 16665 "parse.c"
16665 break;
16666
16667 case 651: /* symbol_list: symbol_list word nonempty_list_' ' */
16668#line 5974 "parse.y"
16669 {
16670 (yyval.node) = symbol_append(p, (yyvsp[-2].node), evstr2dstr(p, (yyvsp[-1].node)));
16671 /*% ripper: symbols_add!($:1, $:2) %*/
16672 }
16673#line 16674 "parse.c"
16674 break;
16675
16676 case 652: /* words_tQWORDS_BEG_qword_list: "verbatim word list" nonempty_list_' ' qword_list "terminator" */
16677#line 3152 "parse.y"
16678 {
16679 (yyval.node) = make_list((yyvsp[-1].node), &(yyloc));
16680 /*% ripper: array!($:3) %*/
16681 }
16682#line 16683 "parse.c"
16683 break;
16684
16685 case 654: /* words_tQSYMBOLS_BEG_qsym_list: "verbatim symbol list" nonempty_list_' ' qsym_list "terminator" */
16686#line 3152 "parse.y"
16687 {
16688 (yyval.node) = make_list((yyvsp[-1].node), &(yyloc));
16689 /*% ripper: array!($:3) %*/
16690 }
16691#line 16692 "parse.c"
16692 break;
16693
16694 case 656: /* qword_list: %empty */
16695#line 5987 "parse.y"
16696 {
16697 (yyval.node) = 0;
16698 /*% ripper: qwords_new! %*/
16699 }
16700#line 16701 "parse.c"
16701 break;
16702
16703 case 657: /* qword_list: qword_list "literal content" nonempty_list_' ' */
16704#line 5992 "parse.y"
16705 {
16706 (yyval.node) = list_append(p, (yyvsp[-2].node), (yyvsp[-1].node));
16707 /*% ripper: qwords_add!($:1, $:2) %*/
16708 }
16709#line 16710 "parse.c"
16710 break;
16711
16712 case 658: /* qsym_list: %empty */
16713#line 5999 "parse.y"
16714 {
16715 (yyval.node) = 0;
16716 /*% ripper: qsymbols_new! %*/
16717 }
16718#line 16719 "parse.c"
16719 break;
16720
16721 case 659: /* qsym_list: qsym_list "literal content" nonempty_list_' ' */
16722#line 6004 "parse.y"
16723 {
16724 (yyval.node) = symbol_append(p, (yyvsp[-2].node), (yyvsp[-1].node));
16725 /*% ripper: qsymbols_add!($:1, $:2) %*/
16726 }
16727#line 16728 "parse.c"
16728 break;
16729
16730 case 660: /* string_contents: %empty */
16731#line 6011 "parse.y"
16732 {
16733 (yyval.node) = 0;
16734 /*% ripper: string_content! %*/
16735 }
16736#line 16737 "parse.c"
16737 break;
16738
16739 case 661: /* string_contents: string_contents string_content */
16740#line 6016 "parse.y"
16741 {
16742 (yyval.node) = literal_concat(p, (yyvsp[-1].node), (yyvsp[0].node), &(yyloc));
16743 /*% ripper: string_add!($:1, $:2) %*/
16744 }
16745#line 16746 "parse.c"
16746 break;
16747
16748 case 662: /* xstring_contents: %empty */
16749#line 6023 "parse.y"
16750 {
16751 (yyval.node) = 0;
16752 /*% ripper: xstring_new! %*/
16753 }
16754#line 16755 "parse.c"
16755 break;
16756
16757 case 663: /* xstring_contents: xstring_contents string_content */
16758#line 6028 "parse.y"
16759 {
16760 (yyval.node) = literal_concat(p, (yyvsp[-1].node), (yyvsp[0].node), &(yyloc));
16761 /*% ripper: xstring_add!($:1, $:2) %*/
16762 }
16763#line 16764 "parse.c"
16764 break;
16765
16766 case 664: /* regexp_contents: %empty */
16767#line 6035 "parse.y"
16768 {
16769 (yyval.node) = 0;
16770 /*% ripper: regexp_new! %*/
16771 }
16772#line 16773 "parse.c"
16773 break;
16774
16775 case 665: /* regexp_contents: regexp_contents string_content */
16776#line 6040 "parse.y"
16777 {
16778 NODE *head = (yyvsp[-1].node), *tail = (yyvsp[0].node);
16779 if (!head) {
16780 (yyval.node) = tail;
16781 }
16782 else if (!tail) {
16783 (yyval.node) = head;
16784 }
16785 else {
16786 switch (nd_type(head)) {
16787 case NODE_STR:
16788 head = str2dstr(p, head);
16789 break;
16790 case NODE_DSTR:
16791 break;
16792 default:
16793 head = list_append(p, NEW_DSTR(0, &(yyloc)), head);
16794 break;
16795 }
16796 (yyval.node) = list_append(p, head, tail);
16797 }
16798 /*% ripper: regexp_add!($:1, $:2) %*/
16799 }
16800#line 16801 "parse.c"
16801 break;
16802
16803 case 667: /* @33: %empty */
16804#line 6068 "parse.y"
16805 {
16806 /* need to backup p->lex.strterm so that a string literal `%&foo,#$&,bar&` can be parsed */
16807 (yyval.strterm) = p->lex.strterm;
16808 p->lex.strterm = 0;
16809 SET_LEX_STATE(EXPR_BEG);
16810 }
16811#line 16812 "parse.c"
16812 break;
16813
16814 case 668: /* string_content: tSTRING_DVAR @33 string_dvar */
16815#line 6075 "parse.y"
16816 {
16817 p->lex.strterm = (yyvsp[-1].strterm);
16818 (yyval.node) = NEW_EVSTR((yyvsp[0].node), &(yyloc), &(yylsp[-2]), &NULL_LOC);
16819 nd_set_line((yyval.node), (yylsp[0]).end_pos.lineno);
16820 /*% ripper: string_dvar!($:3) %*/
16821 }
16822#line 16823 "parse.c"
16823 break;
16824
16825 case 669: /* @34: %empty */
16826#line 6082 "parse.y"
16827 {
16828 CMDARG_PUSH(0);
16829 COND_PUSH(0);
16830 /* need to backup p->lex.strterm so that a string literal `%!foo,#{ !0 },bar!` can be parsed */
16831 (yyval.strterm) = p->lex.strterm;
16832 p->lex.strterm = 0;
16833 SET_LEX_STATE(EXPR_BEG);
16834 }
16835#line 16836 "parse.c"
16836 break;
16837
16838 case 670: /* @35: %empty */
16839#line 6090 "parse.y"
16840 {
16841 (yyval.num) = p->lex.brace_nest;
16842 p->lex.brace_nest = 0;
16843 }
16844#line 16845 "parse.c"
16845 break;
16846
16847 case 671: /* @36: %empty */
16848#line 6094 "parse.y"
16849 {
16850 (yyval.num) = p->heredoc_indent;
16851 p->heredoc_indent = 0;
16852 }
16853#line 16854 "parse.c"
16854 break;
16855
16856 case 672: /* string_content: "'#{'" @34 @35 @36 compstmt_stmts string_dend */
16857#line 6099 "parse.y"
16858 {
16859 COND_POP();
16860 CMDARG_POP();
16861 p->lex.strterm = (yyvsp[-4].strterm);
16862 SET_LEX_STATE((yyvsp[-5].state));
16863 p->lex.brace_nest = (yyvsp[-3].num);
16864 p->heredoc_indent = (yyvsp[-2].num);
16865 p->heredoc_line_indent = -1;
16866 if ((yyvsp[-1].node)) nd_unset_fl_newline((yyvsp[-1].node));
16867 (yyval.node) = new_evstr(p, (yyvsp[-1].node), &(yyloc), &(yylsp[-5]), &(yylsp[0]));
16868 /*% ripper: string_embexpr!($:compstmt) %*/
16869 }
16870#line 16871 "parse.c"
16871 break;
16872
16873 case 675: /* string_dvar: nonlocal_var */
16874#line 6118 "parse.y"
16875 {
16876 if (!((yyval.node) = gettable(p, (yyvsp[0].id), &(yyloc)))) (yyval.node) = NEW_ERROR(&(yyloc));
16877 /*% ripper: var_ref!($:1) %*/
16878 }
16879#line 16880 "parse.c"
16880 break;
16881
16882 case 679: /* ssym: "symbol literal" sym */
16883#line 6130 "parse.y"
16884 {
16885 SET_LEX_STATE(EXPR_END);
16886 VALUE str = rb_id2str((yyvsp[0].id));
16887 /*
16888 * TODO:
16889 * set_yylval_noname sets invalid id to yylval.
16890 * This branch can be removed once yylval is changed to
16891 * hold lexed string.
16892 */
16893 if (!str) str = STR_NEW0();
16894 (yyval.node) = NEW_SYM(str, &(yyloc));
16895 /*% ripper: symbol_literal!(symbol!($:2)) %*/
16896 }
16897#line 16898 "parse.c"
16898 break;
16899
16900 case 682: /* dsym: "symbol literal" string_contents "terminator" */
16901#line 6150 "parse.y"
16902 {
16903 SET_LEX_STATE(EXPR_END);
16904 (yyval.node) = dsym_node(p, (yyvsp[-1].node), &(yyloc));
16905 /*% ripper: dyna_symbol!($:2) %*/
16906 }
16907#line 16908 "parse.c"
16908 break;
16909
16910 case 684: /* numeric: tUMINUS_NUM simple_numeric */
16911#line 6159 "parse.y"
16912 {
16913 (yyval.node) = (yyvsp[0].node);
16914 negate_lit(p, (yyval.node));
16915 /*% ripper: unary!(ID2VAL(idUMinus), $:2) %*/
16916 }
16917#line 16918 "parse.c"
16918 break;
16919
16920 case 695: /* keyword_variable: "'nil'" */
16921#line 6181 "parse.y"
16922 {(yyval.id) = KWD2EID(nil, (yyvsp[0].id));}
16923#line 16924 "parse.c"
16924 break;
16925
16926 case 696: /* keyword_variable: "'self'" */
16927#line 6182 "parse.y"
16928 {(yyval.id) = KWD2EID(self, (yyvsp[0].id));}
16929#line 16930 "parse.c"
16930 break;
16931
16932 case 697: /* keyword_variable: "'true'" */
16933#line 6183 "parse.y"
16934 {(yyval.id) = KWD2EID(true, (yyvsp[0].id));}
16935#line 16936 "parse.c"
16936 break;
16937
16938 case 698: /* keyword_variable: "'false'" */
16939#line 6184 "parse.y"
16940 {(yyval.id) = KWD2EID(false, (yyvsp[0].id));}
16941#line 16942 "parse.c"
16942 break;
16943
16944 case 699: /* keyword_variable: "'__FILE__'" */
16945#line 6185 "parse.y"
16946 {(yyval.id) = KWD2EID(_FILE__, (yyvsp[0].id));}
16947#line 16948 "parse.c"
16948 break;
16949
16950 case 700: /* keyword_variable: "'__LINE__'" */
16951#line 6186 "parse.y"
16952 {(yyval.id) = KWD2EID(_LINE__, (yyvsp[0].id));}
16953#line 16954 "parse.c"
16954 break;
16955
16956 case 701: /* keyword_variable: "'__ENCODING__'" */
16957#line 6187 "parse.y"
16958 {(yyval.id) = KWD2EID(_ENCODING__, (yyvsp[0].id));}
16959#line 16960 "parse.c"
16960 break;
16961
16962 case 702: /* var_ref: user_variable */
16963#line 6191 "parse.y"
16964 {
16965 if (!((yyval.node) = gettable(p, (yyvsp[0].id), &(yyloc)))) (yyval.node) = NEW_ERROR(&(yyloc));
16966 if (ifdef_ripper(id_is_var(p, (yyvsp[0].id)), false)) {
16967 /*% ripper: var_ref!($:1) %*/
16968 }
16969 else {
16970 /*% ripper: vcall!($:1) %*/
16971 }
16972 }
16973#line 16974 "parse.c"
16974 break;
16975
16976 case 703: /* var_ref: keyword_variable */
16977#line 6201 "parse.y"
16978 {
16979 if (!((yyval.node) = gettable(p, (yyvsp[0].id), &(yyloc)))) (yyval.node) = NEW_ERROR(&(yyloc));
16980 /*% ripper: var_ref!($:1) %*/
16981 }
16982#line 16983 "parse.c"
16983 break;
16984
16985 case 704: /* var_lhs: user_variable */
16986#line 6208 "parse.y"
16987 {
16988 /*% ripper: var_field!($:1) %*/
16989 (yyval.node) = assignable(p, (yyvsp[0].id), 0, &(yyloc));
16990 }
16991#line 16992 "parse.c"
16992 break;
16993
16994 case 705: /* var_lhs: keyword_variable */
16995#line 6208 "parse.y"
16996 {
16997 /*% ripper: var_field!($:1) %*/
16998 (yyval.node) = assignable(p, (yyvsp[0].id), 0, &(yyloc));
16999 }
17000#line 17001 "parse.c"
17001 break;
17002
17003 case 708: /* $@37: %empty */
17004#line 6219 "parse.y"
17005 {
17006 SET_LEX_STATE(EXPR_BEG);
17007 p->command_start = TRUE;
17008 }
17009#line 17010 "parse.c"
17010 break;
17011
17012 case 709: /* superclass: '<' $@37 expr_value term */
17013#line 6224 "parse.y"
17014 {
17015 (yyval.node) = (yyvsp[-1].node);
17016 /*% ripper: $:3 %*/
17017 }
17018#line 17019 "parse.c"
17019 break;
17020
17021 case 712: /* f_opt_paren_args: none */
17022#line 6233 "parse.y"
17023 {
17024 p->ctxt.in_argdef = 0;
17025 (yyval.node_args) = new_args_tail(p, 0, 0, 0, &(yylsp[-1]));
17026 (yyval.node_args) = new_args(p, 0, 0, 0, 0, (yyval.node_args), &(yylsp[-1]));
17027 /*% ripper: params!(Qnil, Qnil, Qnil, Qnil, Qnil, Qnil, Qnil) %*/
17028 }
17029#line 17030 "parse.c"
17030 break;
17031
17032 case 713: /* f_paren_args: '(' f_args rparen */
17033#line 6242 "parse.y"
17034 {
17035 (yyval.node_args) = (yyvsp[-1].node_args);
17036 /*% ripper: paren!($:2) %*/
17037 SET_LEX_STATE(EXPR_BEG);
17038 p->command_start = TRUE;
17039 p->ctxt.in_argdef = 0;
17040 }
17041#line 17042 "parse.c"
17042 break;
17043
17044 case 715: /* @38: %empty */
17045#line 6252 "parse.y"
17046 {
17047 (yyval.ctxt) = p->ctxt;
17048 p->ctxt.in_kwarg = 1;
17049 p->ctxt.in_argdef = 1;
17050 SET_LEX_STATE(p->lex.state|EXPR_LABEL); /* force for args */
17051 }
17052#line 17053 "parse.c"
17053 break;
17054
17055 case 716: /* f_arglist: @38 f_args term */
17056#line 6259 "parse.y"
17057 {
17058 p->ctxt.in_kwarg = (yyvsp[-2].ctxt).in_kwarg;
17059 p->ctxt.in_argdef = 0;
17060 (yyval.node_args) = (yyvsp[-1].node_args);
17061 SET_LEX_STATE(EXPR_BEG);
17062 p->command_start = TRUE;
17063 /*% ripper: $:2 %*/
17064 }
17065#line 17066 "parse.c"
17066 break;
17067
17068 case 717: /* f_kw_arg_value: f_label arg_value */
17069#line 3003 "parse.y"
17070 {
17071 p->ctxt.in_argdef = 1;
17072 (yyval.node_kw_arg) = new_kw_arg(p, assignable(p, (yyvsp[-1].id), (yyvsp[0].node), &(yyloc)), &(yyloc));
17073 /*% ripper: [$:$, $:value] %*/
17074 }
17075#line 17076 "parse.c"
17076 break;
17077
17078 case 718: /* f_kw_arg_value: f_label */
17079#line 3009 "parse.y"
17080 {
17081 p->ctxt.in_argdef = 1;
17082 (yyval.node_kw_arg) = new_kw_arg(p, assignable(p, (yyvsp[0].id), NODE_SPECIAL_REQUIRED_KEYWORD, &(yyloc)), &(yyloc));
17083 /*% ripper: [$:$, 0] %*/
17084 }
17085#line 17086 "parse.c"
17086 break;
17087
17088 case 719: /* f_kwarg_arg_value: f_kw_arg_value */
17089#line 3018 "parse.y"
17090 {
17091 (yyval.node_kw_arg) = (yyvsp[0].node_kw_arg);
17092 /*% ripper: rb_ary_new3(1, $:1) %*/
17093 }
17094#line 17095 "parse.c"
17095 break;
17096
17097 case 720: /* f_kwarg_arg_value: f_kwarg_arg_value ',' f_kw_arg_value */
17098#line 3023 "parse.y"
17099 {
17100 (yyval.node_kw_arg) = kwd_append((yyvsp[-2].node_kw_arg), (yyvsp[0].node_kw_arg));
17101 /*% ripper: rb_ary_push($:1, $:3) %*/
17102 }
17103#line 17104 "parse.c"
17104 break;
17105
17106 case 721: /* args_tail_basic_arg_value: f_kwarg_arg_value ',' f_kwrest opt_f_block_arg */
17107#line 2927 "parse.y"
17108 {
17109 (yyval.node_args) = new_args_tail(p, (yyvsp[-3].node_kw_arg), (yyvsp[-1].id), (yyvsp[0].id), &(yylsp[-1]));
17110 /*% ripper: [$:1, $:3, $:4] %*/
17111 }
17112#line 17113 "parse.c"
17113 break;
17114
17115 case 722: /* args_tail_basic_arg_value: f_kwarg_arg_value opt_f_block_arg */
17116#line 2932 "parse.y"
17117 {
17118 (yyval.node_args) = new_args_tail(p, (yyvsp[-1].node_kw_arg), 0, (yyvsp[0].id), &(yylsp[-1]));
17119 /*% ripper: [$:1, Qnil, $:2] %*/
17120 }
17121#line 17122 "parse.c"
17122 break;
17123
17124 case 723: /* args_tail_basic_arg_value: f_any_kwrest opt_f_block_arg */
17125#line 2937 "parse.y"
17126 {
17127 (yyval.node_args) = new_args_tail(p, 0, (yyvsp[-1].id), (yyvsp[0].id), &(yylsp[-1]));
17128 /*% ripper: [Qnil, $:1, $:2] %*/
17129 }
17130#line 17131 "parse.c"
17131 break;
17132
17133 case 724: /* args_tail_basic_arg_value: f_block_arg */
17134#line 2942 "parse.y"
17135 {
17136 (yyval.node_args) = new_args_tail(p, 0, 0, (yyvsp[0].id), &(yylsp[0]));
17137 /*% ripper: [Qnil, Qnil, $:1] %*/
17138 }
17139#line 17140 "parse.c"
17140 break;
17141
17142 case 726: /* args_tail: args_forward */
17143#line 6271 "parse.y"
17144 {
17145 ID fwd = (yyvsp[0].id);
17146 if (lambda_beginning_p() ||
17147 (p->lex.lpar_beg >= 0 && p->lex.lpar_beg+1 == p->lex.paren_nest)) {
17148 yyerror0("unexpected ... in lambda argument");
17149 fwd = 0;
17150 }
17151 else {
17152 add_forwarding_args(p);
17153 }
17154 (yyval.node_args) = new_args_tail(p, 0, fwd, arg_FWD_BLOCK, &(yylsp[0]));
17155 (yyval.node_args)->nd_ainfo.forwarding = 1;
17156 /*% ripper: [Qnil, $:1, Qnil] %*/
17157 }
17158#line 17159 "parse.c"
17159 break;
17160
17161 case 727: /* f_opt_arg_value: f_arg_asgn f_eq arg_value */
17162#line 2981 "parse.y"
17163 {
17164 p->ctxt.in_argdef = 1;
17165 (yyval.node_opt_arg) = NEW_OPT_ARG(assignable(p, (yyvsp[-2].id), (yyvsp[0].node), &(yyloc)), &(yyloc));
17166 /*% ripper: [$:$, $:3] %*/
17167 }
17168#line 17169 "parse.c"
17169 break;
17170
17171 case 728: /* f_opt_arg_arg_value: f_opt_arg_value */
17172#line 2990 "parse.y"
17173 {
17174 (yyval.node_opt_arg) = (yyvsp[0].node_opt_arg);
17175 /*% ripper: rb_ary_new3(1, $:1) %*/
17176 }
17177#line 17178 "parse.c"
17178 break;
17179
17180 case 729: /* f_opt_arg_arg_value: f_opt_arg_arg_value ',' f_opt_arg_value */
17181#line 2995 "parse.y"
17182 {
17183 (yyval.node_opt_arg) = opt_arg_append((yyvsp[-2].node_opt_arg), (yyvsp[0].node_opt_arg));
17184 /*% ripper: rb_ary_push($:1, $:3) %*/
17185 }
17186#line 17187 "parse.c"
17187 break;
17188
17189 case 730: /* opt_args_tail_args_tail: ',' args_tail */
17190#line 3090 "parse.y"
17191 {
17192 (yyval.node_args) = (yyvsp[0].node_args);
17193 /*% ripper: $:2 %*/
17194 }
17195#line 17196 "parse.c"
17196 break;
17197
17198 case 731: /* opt_args_tail_args_tail: %empty */
17199#line 3095 "parse.y"
17200 {
17201 (yyval.node_args) = new_args_tail(p, 0, 0, 0, &(yylsp[0]));
17202 /*% ripper: [Qnil, Qnil, Qnil] %*/
17203 }
17204#line 17205 "parse.c"
17205 break;
17206
17207 case 732: /* f_args: f_arg ',' f_opt_arg_arg_value ',' f_rest_arg opt_args_tail_args_tail */
17208#line 6288 "parse.y"
17209 {
17210 (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));
17211 /*% ripper: params!($:1, $:3, $:5, Qnil, *$:6[0..2]) %*/
17212 }
17213#line 17214 "parse.c"
17214 break;
17215
17216 case 733: /* f_args: f_arg ',' f_opt_arg_arg_value ',' f_rest_arg ',' f_arg opt_args_tail_args_tail */
17217#line 6293 "parse.y"
17218 {
17219 (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));
17220 /*% ripper: params!($:1, $:3, $:5, $:7, *$:8[0..2]) %*/
17221 }
17222#line 17223 "parse.c"
17223 break;
17224
17225 case 734: /* f_args: f_arg ',' f_opt_arg_arg_value opt_args_tail_args_tail */
17226#line 6298 "parse.y"
17227 {
17228 (yyval.node_args) = new_args(p, (yyvsp[-3].node_args_aux), (yyvsp[-1].node_opt_arg), 0, 0, (yyvsp[0].node_args), &(yyloc));
17229 /*% ripper: params!($:1, $:3, Qnil, Qnil, *$:4[0..2]) %*/
17230 }
17231#line 17232 "parse.c"
17232 break;
17233
17234 case 735: /* f_args: f_arg ',' f_opt_arg_arg_value ',' f_arg opt_args_tail_args_tail */
17235#line 6303 "parse.y"
17236 {
17237 (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));
17238 /*% ripper: params!($:1, $:3, Qnil, $:5, *$:6[0..2]) %*/
17239 }
17240#line 17241 "parse.c"
17241 break;
17242
17243 case 736: /* f_args: f_arg ',' f_rest_arg opt_args_tail_args_tail */
17244#line 6308 "parse.y"
17245 {
17246 (yyval.node_args) = new_args(p, (yyvsp[-3].node_args_aux), 0, (yyvsp[-1].id), 0, (yyvsp[0].node_args), &(yyloc));
17247 /*% ripper: params!($:1, Qnil, $:3, Qnil, *$:4[0..2]) %*/
17248 }
17249#line 17250 "parse.c"
17250 break;
17251
17252 case 737: /* f_args: f_arg ',' f_rest_arg ',' f_arg opt_args_tail_args_tail */
17253#line 6313 "parse.y"
17254 {
17255 (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));
17256 /*% ripper: params!($:1, Qnil, $:3, $:5, *$:6[0..2]) %*/
17257 }
17258#line 17259 "parse.c"
17259 break;
17260
17261 case 738: /* f_args: f_arg opt_args_tail_args_tail */
17262#line 6318 "parse.y"
17263 {
17264 (yyval.node_args) = new_args(p, (yyvsp[-1].node_args_aux), 0, 0, 0, (yyvsp[0].node_args), &(yyloc));
17265 /*% ripper: params!($:1, Qnil, Qnil, Qnil, *$:2[0..2]) %*/
17266 }
17267#line 17268 "parse.c"
17268 break;
17269
17270 case 739: /* f_args: f_opt_arg_arg_value ',' f_rest_arg opt_args_tail_args_tail */
17271#line 6323 "parse.y"
17272 {
17273 (yyval.node_args) = new_args(p, 0, (yyvsp[-3].node_opt_arg), (yyvsp[-1].id), 0, (yyvsp[0].node_args), &(yyloc));
17274 /*% ripper: params!(Qnil, $:1, $:3, Qnil, *$:4[0..2]) %*/
17275 }
17276#line 17277 "parse.c"
17277 break;
17278
17279 case 740: /* f_args: f_opt_arg_arg_value ',' f_rest_arg ',' f_arg opt_args_tail_args_tail */
17280#line 6328 "parse.y"
17281 {
17282 (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));
17283 /*% ripper: params!(Qnil, $:1, $:3, $:5, *$:6[0..2]) %*/
17284 }
17285#line 17286 "parse.c"
17286 break;
17287
17288 case 741: /* f_args: f_opt_arg_arg_value opt_args_tail_args_tail */
17289#line 6333 "parse.y"
17290 {
17291 (yyval.node_args) = new_args(p, 0, (yyvsp[-1].node_opt_arg), 0, 0, (yyvsp[0].node_args), &(yyloc));
17292 /*% ripper: params!(Qnil, $:1, Qnil, Qnil, *$:2[0..2]) %*/
17293 }
17294#line 17295 "parse.c"
17295 break;
17296
17297 case 742: /* f_args: f_opt_arg_arg_value ',' f_arg opt_args_tail_args_tail */
17298#line 6338 "parse.y"
17299 {
17300 (yyval.node_args) = new_args(p, 0, (yyvsp[-3].node_opt_arg), 0, (yyvsp[-1].node_args_aux), (yyvsp[0].node_args), &(yyloc));
17301 /*% ripper: params!(Qnil, $:1, Qnil, $:3, *$:4[0..2]) %*/
17302 }
17303#line 17304 "parse.c"
17304 break;
17305
17306 case 743: /* f_args: f_rest_arg opt_args_tail_args_tail */
17307#line 6343 "parse.y"
17308 {
17309 (yyval.node_args) = new_args(p, 0, 0, (yyvsp[-1].id), 0, (yyvsp[0].node_args), &(yyloc));
17310 /*% ripper: params!(Qnil, Qnil, $:1, Qnil, *$:2[0..2]) %*/
17311 }
17312#line 17313 "parse.c"
17313 break;
17314
17315 case 744: /* f_args: f_rest_arg ',' f_arg opt_args_tail_args_tail */
17316#line 6348 "parse.y"
17317 {
17318 (yyval.node_args) = new_args(p, 0, 0, (yyvsp[-3].id), (yyvsp[-1].node_args_aux), (yyvsp[0].node_args), &(yyloc));
17319 /*% ripper: params!(Qnil, Qnil, $:1, $:3, *$:4[0..2]) %*/
17320 }
17321#line 17322 "parse.c"
17322 break;
17323
17324 case 745: /* f_args: args_tail */
17325#line 6353 "parse.y"
17326 {
17327 (yyval.node_args) = new_args(p, 0, 0, 0, 0, (yyvsp[0].node_args), &(yyloc));
17328 /*% ripper: params!(Qnil, Qnil, Qnil, Qnil, *$:1[0..2]) %*/
17329 }
17330#line 17331 "parse.c"
17331 break;
17332
17333 case 746: /* f_args: %empty */
17334#line 6358 "parse.y"
17335 {
17336 (yyval.node_args) = new_args_tail(p, 0, 0, 0, &(yylsp[0]));
17337 (yyval.node_args) = new_args(p, 0, 0, 0, 0, (yyval.node_args), &(yylsp[0]));
17338 /*% ripper: params!(Qnil, Qnil, Qnil, Qnil, Qnil, Qnil, Qnil) %*/
17339 }
17340#line 17341 "parse.c"
17341 break;
17342
17343 case 747: /* args_forward: "(..." */
17344#line 6366 "parse.y"
17345 {
17346#ifdef FORWARD_ARGS_WITH_RUBY2_KEYWORDS
17347 (yyval.id) = 0;
17348#else
17349 (yyval.id) = idFWD_KWREST;
17350#endif
17351 /*% ripper: args_forward! %*/
17352 }
17353#line 17354 "parse.c"
17354 break;
17355
17356 case 748: /* f_bad_arg: "constant" */
17357#line 6377 "parse.y"
17358 {
17359 static const char mesg[] = "formal argument cannot be a constant";
17360 /*%%%*/
17361 yyerror1(&(yylsp[0]), mesg);
17362 /*% %*/
17363 (yyval.id) = 0;
17364 /*% ripper[error]: param_error!(ERR_MESG(), $:1) %*/
17365 }
17366#line 17367 "parse.c"
17367 break;
17368
17369 case 749: /* f_bad_arg: "instance variable" */
17370#line 6386 "parse.y"
17371 {
17372 static const char mesg[] = "formal argument cannot be an instance variable";
17373 /*%%%*/
17374 yyerror1(&(yylsp[0]), mesg);
17375 /*% %*/
17376 (yyval.id) = 0;
17377 /*% ripper[error]: param_error!(ERR_MESG(), $:1) %*/
17378 }
17379#line 17380 "parse.c"
17380 break;
17381
17382 case 750: /* f_bad_arg: "global variable" */
17383#line 6395 "parse.y"
17384 {
17385 static const char mesg[] = "formal argument cannot be a global variable";
17386 /*%%%*/
17387 yyerror1(&(yylsp[0]), mesg);
17388 /*% %*/
17389 (yyval.id) = 0;
17390 /*% ripper[error]: param_error!(ERR_MESG(), $:1) %*/
17391 }
17392#line 17393 "parse.c"
17393 break;
17394
17395 case 751: /* f_bad_arg: "class variable" */
17396#line 6404 "parse.y"
17397 {
17398 static const char mesg[] = "formal argument cannot be a class variable";
17399 /*%%%*/
17400 yyerror1(&(yylsp[0]), mesg);
17401 /*% %*/
17402 (yyval.id) = 0;
17403 /*% ripper[error]: param_error!(ERR_MESG(), $:1) %*/
17404 }
17405#line 17406 "parse.c"
17406 break;
17407
17408 case 753: /* f_norm_arg: "local variable or method" */
17409#line 6416 "parse.y"
17410 {
17411 VALUE e = formal_argument_error(p, (yyval.id) = (yyvsp[0].id));
17412 if (e) {
17413 /*% ripper[error]: param_error!(?e, $:1) %*/
17414 }
17415 p->max_numparam = ORDINAL_PARAM;
17416 }
17417#line 17418 "parse.c"
17418 break;
17419
17420 case 754: /* f_arg_asgn: f_norm_arg */
17421#line 6426 "parse.y"
17422 {
17423 arg_var(p, (yyvsp[0].id));
17424 (yyval.id) = (yyvsp[0].id);
17425 }
17426#line 17427 "parse.c"
17427 break;
17428
17429 case 755: /* f_arg_item: f_arg_asgn */
17430#line 6433 "parse.y"
17431 {
17432 (yyval.node_args_aux) = NEW_ARGS_AUX((yyvsp[0].id), 1, &NULL_LOC);
17433 /*% ripper: $:1 %*/
17434 }
17435#line 17436 "parse.c"
17436 break;
17437
17438 case 756: /* f_arg_item: "(" f_margs rparen */
17439#line 6438 "parse.y"
17440 {
17441 ID tid = internal_id(p);
17442 YYLTYPE loc;
17443 loc.beg_pos = (yylsp[-1]).beg_pos;
17444 loc.end_pos = (yylsp[-1]).beg_pos;
17445 arg_var(p, tid);
17446 if (dyna_in_block(p)) {
17447 (yyvsp[-1].node_masgn)->nd_value = NEW_DVAR(tid, &loc);
17448 }
17449 else {
17450 (yyvsp[-1].node_masgn)->nd_value = NEW_LVAR(tid, &loc);
17451 }
17452 (yyval.node_args_aux) = NEW_ARGS_AUX(tid, 1, &NULL_LOC);
17453 (yyval.node_args_aux)->nd_next = (NODE *)(yyvsp[-1].node_masgn);
17454 /*% ripper: mlhs_paren!($:2) %*/
17455 }
17456#line 17457 "parse.c"
17457 break;
17458
17459 case 758: /* f_arg: f_arg ',' f_arg_item */
17460#line 6459 "parse.y"
17461 {
17462 (yyval.node_args_aux) = (yyvsp[-2].node_args_aux);
17463 (yyval.node_args_aux)->nd_plen++;
17464 (yyval.node_args_aux)->nd_next = block_append(p, (yyval.node_args_aux)->nd_next, (yyvsp[0].node_args_aux)->nd_next);
17465 rb_discard_node(p, (NODE *)(yyvsp[0].node_args_aux));
17466 /*% ripper: rb_ary_push($:1, $:3) %*/
17467 }
17468#line 17469 "parse.c"
17469 break;
17470
17471 case 759: /* f_label: "label" */
17472#line 6470 "parse.y"
17473 {
17474 VALUE e = formal_argument_error(p, (yyval.id) = (yyvsp[0].id));
17475 if (e) {
17476 (yyval.id) = 0;
17477 /*% ripper[error]: param_error!(?e, $:1) %*/
17478 }
17479 /*
17480 * Workaround for Prism::ParseTest#test_filepath for
17481 * "unparser/corpus/literal/def.txt"
17482 *
17483 * See the discussion on https://github.com/ruby/ruby/pull/9923
17484 */
17485 arg_var(p, ifdef_ripper(0, (yyvsp[0].id)));
17486 /*% ripper: $:1 %*/
17487 p->max_numparam = ORDINAL_PARAM;
17488 p->ctxt.in_argdef = 0;
17489 }
17490#line 17491 "parse.c"
17491 break;
17492
17493 case 762: /* f_no_kwarg: p_kwnorest */
17494#line 6494 "parse.y"
17495 {
17496 /*% ripper: nokw_param!(Qnil) %*/
17497 }
17498#line 17499 "parse.c"
17499 break;
17500
17501 case 763: /* f_kwrest: kwrest_mark "local variable or method" */
17502#line 6500 "parse.y"
17503 {
17504 arg_var(p, shadowing_lvar(p, (yyvsp[0].id)));
17505 (yyval.id) = (yyvsp[0].id);
17506 /*% ripper: kwrest_param!($:2) %*/
17507 }
17508#line 17509 "parse.c"
17509 break;
17510
17511 case 764: /* f_kwrest: kwrest_mark */
17512#line 6506 "parse.y"
17513 {
17514 arg_var(p, idFWD_KWREST);
17515 (yyval.id) = idFWD_KWREST;
17516 /*% ripper: kwrest_param!(Qnil) %*/
17517 }
17518#line 17519 "parse.c"
17519 break;
17520
17521 case 767: /* f_rest_arg: restarg_mark "local variable or method" */
17522#line 6518 "parse.y"
17523 {
17524 arg_var(p, shadowing_lvar(p, (yyvsp[0].id)));
17525 (yyval.id) = (yyvsp[0].id);
17526 /*% ripper: rest_param!($:2) %*/
17527 }
17528#line 17529 "parse.c"
17529 break;
17530
17531 case 768: /* f_rest_arg: restarg_mark */
17532#line 6524 "parse.y"
17533 {
17534 arg_var(p, idFWD_REST);
17535 (yyval.id) = idFWD_REST;
17536 /*% ripper: rest_param!(Qnil) %*/
17537 }
17538#line 17539 "parse.c"
17539 break;
17540
17541 case 771: /* f_block_arg: blkarg_mark "local variable or method" */
17542#line 6536 "parse.y"
17543 {
17544 arg_var(p, shadowing_lvar(p, (yyvsp[0].id)));
17545 (yyval.id) = (yyvsp[0].id);
17546 /*% ripper: blockarg!($:2) %*/
17547 }
17548#line 17549 "parse.c"
17549 break;
17550
17551 case 772: /* f_block_arg: blkarg_mark */
17552#line 6542 "parse.y"
17553 {
17554 arg_var(p, idFWD_BLOCK);
17555 (yyval.id) = idFWD_BLOCK;
17556 /*% ripper: blockarg!(Qnil) %*/
17557 }
17558#line 17559 "parse.c"
17559 break;
17560
17561 case 773: /* opt_f_block_arg: ',' f_block_arg */
17562#line 6550 "parse.y"
17563 {
17564 (yyval.id) = (yyvsp[0].id);
17565 /*% ripper: $:2 %*/
17566 }
17567#line 17568 "parse.c"
17568 break;
17569
17570 case 775: /* value_expr_singleton_expr: singleton_expr */
17571#line 3144 "parse.y"
17572 {
17573 value_expr((yyvsp[0].node));
17574 (yyval.node) = (yyvsp[0].node);
17575 }
17576#line 17577 "parse.c"
17577 break;
17578
17579 case 776: /* singleton: value_expr_singleton_expr */
17580#line 6559 "parse.y"
17581 {
17582 NODE *expr = last_expr_node((yyvsp[0].node));
17583 switch (nd_type(expr)) {
17584 case NODE_STR:
17585 case NODE_DSTR:
17586 case NODE_XSTR:
17587 case NODE_DXSTR:
17588 case NODE_REGX:
17589 case NODE_DREGX:
17590 case NODE_SYM:
17591 case NODE_LINE:
17592 case NODE_FILE:
17593 case NODE_ENCODING:
17594 case NODE_INTEGER:
17595 case NODE_FLOAT:
17596 case NODE_RATIONAL:
17597 case NODE_IMAGINARY:
17598 case NODE_DSYM:
17599 case NODE_LIST:
17600 case NODE_ZLIST:
17601 yyerror1(&expr->nd_loc, "can't define singleton method for literals");
17602 break;
17603 default:
17604 break;
17605 }
17606 (yyval.node) = (yyvsp[0].node);
17607 }
17608#line 17609 "parse.c"
17609 break;
17610
17611 case 778: /* $@39: %empty */
17612#line 6590 "parse.y"
17613 {
17614 SET_LEX_STATE(EXPR_BEG);
17615 p->ctxt.in_argdef = 0;
17616 }
17617#line 17618 "parse.c"
17618 break;
17619
17620 case 779: /* singleton_expr: '(' $@39 expr rparen */
17621#line 6595 "parse.y"
17622 {
17623 p->ctxt.in_argdef = 1;
17624 (yyval.node) = (yyvsp[-1].node);
17625 /*% ripper: paren!($:3) %*/
17626 }
17627#line 17628 "parse.c"
17628 break;
17629
17630 case 781: /* assoc_list: assocs trailer */
17631#line 6604 "parse.y"
17632 {
17633 (yyval.node) = (yyvsp[-1].node);
17634 /*% ripper: assoclist_from_args!($:1) %*/
17635 }
17636#line 17637 "parse.c"
17637 break;
17638
17639 case 783: /* assocs: assocs ',' assoc */
17640#line 6613 "parse.y"
17641 {
17642 NODE *assocs = (yyvsp[-2].node);
17643 NODE *tail = (yyvsp[0].node);
17644 if (!assocs) {
17645 assocs = tail;
17646 }
17647 else if (tail) {
17648 if (RNODE_LIST(assocs)->nd_head) {
17649 NODE *n = RNODE_LIST(tail)->nd_next;
17650 if (!RNODE_LIST(tail)->nd_head && nd_type_p(n, NODE_LIST) &&
17651 nd_type_p((n = RNODE_LIST(n)->nd_head), NODE_HASH)) {
17652 /* DSTAR */
17653 tail = RNODE_HASH(n)->nd_head;
17654 }
17655 }
17656 if (tail) {
17657 assocs = list_concat(assocs, tail);
17658 }
17659 }
17660 (yyval.node) = assocs;
17661 /*% ripper: rb_ary_push($:1, $:3) %*/
17662 }
17663#line 17664 "parse.c"
17664 break;
17665
17666 case 784: /* assoc: arg_value "=>" arg_value */
17667#line 6638 "parse.y"
17668 {
17669 (yyval.node) = list_append(p, NEW_LIST((yyvsp[-2].node), &(yyloc)), (yyvsp[0].node));
17670 /*% ripper: assoc_new!($:1, $:3) %*/
17671 }
17672#line 17673 "parse.c"
17673 break;
17674
17675 case 785: /* assoc: "label" arg_value */
17676#line 6643 "parse.y"
17677 {
17678 (yyval.node) = list_append(p, NEW_LIST(NEW_SYM(rb_id2str((yyvsp[-1].id)), &(yylsp[-1])), &(yyloc)), (yyvsp[0].node));
17679 /*% ripper: assoc_new!($:1, $:2) %*/
17680 }
17681#line 17682 "parse.c"
17682 break;
17683
17684 case 786: /* assoc: "label" */
17685#line 6648 "parse.y"
17686 {
17687 NODE *val = gettable(p, (yyvsp[0].id), &(yyloc));
17688 if (!val) val = NEW_ERROR(&(yyloc));
17689 (yyval.node) = list_append(p, NEW_LIST(NEW_SYM(rb_id2str((yyvsp[0].id)), &(yylsp[0])), &(yyloc)), val);
17690 /*% ripper: assoc_new!($:1, Qnil) %*/
17691 }
17692#line 17693 "parse.c"
17693 break;
17694
17695 case 787: /* assoc: "string literal" string_contents tLABEL_END arg_value */
17696#line 6655 "parse.y"
17697 {
17698 YYLTYPE loc = code_loc_gen(&(yylsp[-3]), &(yylsp[-1]));
17699 (yyval.node) = list_append(p, NEW_LIST(dsym_node(p, (yyvsp[-2].node), &loc), &loc), (yyvsp[0].node));
17700 /*% ripper: assoc_new!(dyna_symbol!($:2), $:4) %*/
17701 }
17702#line 17703 "parse.c"
17703 break;
17704
17705 case 788: /* assoc: "**arg" arg_value */
17706#line 6661 "parse.y"
17707 {
17708 (yyval.node) = list_append(p, NEW_LIST(0, &(yyloc)), (yyvsp[0].node));
17709 /*% ripper: assoc_splat!($:2) %*/
17710 }
17711#line 17712 "parse.c"
17712 break;
17713
17714 case 789: /* assoc: "**arg" */
17715#line 6666 "parse.y"
17716 {
17717 forwarding_arg_check(p, idFWD_KWREST, idFWD_ALL, "keyword rest");
17718 (yyval.node) = list_append(p, NEW_LIST(0, &(yyloc)),
17719 NEW_LVAR(idFWD_KWREST, &(yyloc)));
17720 /*% ripper: assoc_splat!(Qnil) %*/
17721 }
17722#line 17723 "parse.c"
17723 break;
17724
17725 case 808: /* term: ';' */
17726#line 6713 "parse.y"
17727 {
17728 yyerrok;
17729 token_flush(p);
17730 if (p->ctxt.in_defined) {
17731 p->ctxt.has_trailing_semicolon = 1;
17732 }
17733 }
17734#line 17735 "parse.c"
17735 break;
17736
17737 case 809: /* term: '\n' */
17738#line 6721 "parse.y"
17739 {
17740 (yyloc).end_pos = (yyloc).beg_pos;
17741 token_flush(p);
17742 }
17743#line 17744 "parse.c"
17744 break;
17745
17746 case 811: /* terms: terms ';' */
17747#line 6728 "parse.y"
17748 {yyerrok;}
17749#line 17750 "parse.c"
17750 break;
17751
17752 case 812: /* none: %empty */
17753#line 6732 "parse.y"
17754 {
17755 (yyval.node) = 0;
17756 /*% ripper: Qnil %*/
17757 }
17758#line 17759 "parse.c"
17759 break;
17760
17761
17762#line 17763 "parse.c"
17763
17764 default: break;
17765 }
17766 /* User semantic actions sometimes alter yychar, and that requires
17767 that yytoken be updated with the new translation. We take the
17768 approach of translating immediately before every use of yytoken.
17769 One alternative is translating here after every semantic action,
17770 but that translation would be missed if the semantic action invokes
17771 YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or
17772 if it invokes YYBACKUP. In the case of YYABORT or YYACCEPT, an
17773 incorrect destructor might then be invoked immediately. In the
17774 case of YYERROR or YYBACKUP, subsequent parser actions might lead
17775 to an incorrect destructor call or verbose syntax error message
17776 before the lookahead is translated. */
17777 YY_SYMBOL_PRINT ("-> $$ =", YY_CAST (yysymbol_kind_t, yyr1[yyn]), &yyval, &yyloc, p);
17778
17779 YYPOPSTACK (yylen);
17780 /* %after-reduce function. */
17781#line 2666 "parse.y"
17782 {after_reduce(yylen, p);}
17783#line 17784 "parse.c"
17784
17785 yylen = 0;
17786
17787 *++yyvsp = yyval;
17788 *++yylsp = yyloc;
17789
17790 /* Now 'shift' the result of the reduction. Determine what state
17791 that goes to, based on the state we popped back to and the rule
17792 number reduced by. */
17793 {
17794 const int yylhs = yyr1[yyn] - YYNTOKENS;
17795 const int yyi = yypgoto[yylhs] + *yyssp;
17796 yystate = (0 <= yyi && yyi <= YYLAST && yycheck[yyi] == *yyssp
17797 ? yytable[yyi]
17798 : yydefgoto[yylhs]);
17799 }
17800
17801 goto yynewstate;
17802
17803
17804/*--------------------------------------.
17805| yyerrlab -- here on detecting error. |
17806`--------------------------------------*/
17807yyerrlab:
17808 /* Make sure we have latest lookahead translation. See comments at
17809 user semantic actions for why this is necessary. */
17810 yytoken = yychar == YYEMPTY ? YYSYMBOL_YYEMPTY : YYTRANSLATE (yychar);
17811 /* If not already recovering from an error, report this error. */
17812 if (!yyerrstatus)
17813 {
17814 ++yynerrs;
17815 {
17816 yypcontext_t yyctx
17817 = {yyssp, yytoken, &yylloc};
17818 char const *yymsgp = YY_("syntax error");
17819 int yysyntax_error_status;
17820 yysyntax_error_status = yysyntax_error (&yymsg_alloc, &yymsg, &yyctx, p);
17821 if (yysyntax_error_status == 0)
17822 yymsgp = yymsg;
17823 else if (yysyntax_error_status == -1)
17824 {
17825 if (yymsg != yymsgbuf)
17826 YYSTACK_FREE (yymsg);
17827 yymsg = YY_CAST (char *,
17828 YYSTACK_ALLOC (YY_CAST (YYSIZE_T, yymsg_alloc)));
17829 if (yymsg)
17830 {
17831 yysyntax_error_status
17832 = yysyntax_error (&yymsg_alloc, &yymsg, &yyctx, p);
17833 yymsgp = yymsg;
17834 }
17835 else
17836 {
17837 yymsg = yymsgbuf;
17838 yymsg_alloc = sizeof yymsgbuf;
17839 yysyntax_error_status = YYENOMEM;
17840 }
17841 }
17842 yyerror (&yylloc, p, yymsgp);
17843 if (yysyntax_error_status == YYENOMEM)
17844 YYNOMEM;
17845 }
17846 }
17847
17848 yyerror_range[1] = yylloc;
17849 if (yyerrstatus == 3)
17850 {
17851 /* If just tried and failed to reuse lookahead token after an
17852 error, discard it. */
17853
17854 if (yychar <= END_OF_INPUT)
17855 {
17856 /* Return failure if at end of input. */
17857 if (yychar == END_OF_INPUT)
17858 YYABORT;
17859 }
17860 else
17861 {
17862 yydestruct ("Error: discarding",
17863 yytoken, &yylval, &yylloc, p);
17864 yychar = YYEMPTY;
17865 }
17866 }
17867
17868 /* Else will try to reuse lookahead token after shifting the error
17869 token. */
17870 goto yyerrlab1;
17871
17872
17873/*---------------------------------------------------.
17874| yyerrorlab -- error raised explicitly by YYERROR. |
17875`---------------------------------------------------*/
17876yyerrorlab:
17877 /* Pacify compilers when the user code never invokes YYERROR and the
17878 label yyerrorlab therefore never appears in user code. */
17879 if (0)
17880 YYERROR;
17881 ++yynerrs;
17882
17883 /* Do not reclaim the symbols of the rule whose action triggered
17884 this YYERROR. */
17885 YYPOPSTACK (yylen);
17886 /* %after-pop-stack function. */
17887#line 2668 "parse.y"
17888 {after_pop_stack(yylen, p);}
17889#line 17890 "parse.c"
17890
17891 yylen = 0;
17892 YY_STACK_PRINT (yyss, yyssp, p);
17893 yystate = *yyssp;
17894 goto yyerrlab1;
17895
17896
17897/*-------------------------------------------------------------.
17898| yyerrlab1 -- common code for both syntax error and YYERROR. |
17899`-------------------------------------------------------------*/
17900yyerrlab1:
17901 yyerrstatus = 3; /* Each real token shifted decrements this. */
17902
17903 /* Pop stack until we find a state that shifts the error token. */
17904 for (;;)
17905 {
17906 yyn = yypact[yystate];
17907 if (!yypact_value_is_default (yyn))
17908 {
17909 yyn += YYSYMBOL_YYerror;
17910 if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror)
17911 {
17912 yyn = yytable[yyn];
17913 if (0 < yyn)
17914 break;
17915 }
17916 }
17917
17918 /* Pop the current state because it cannot handle the error token. */
17919 if (yyssp == yyss)
17920 YYABORT;
17921
17922 yyerror_range[1] = *yylsp;
17923 yydestruct ("Error: popping",
17924 YY_ACCESSING_SYMBOL (yystate), yyvsp, yylsp, p);
17925 YYPOPSTACK (1);
17926 /* %after-pop-stack function. */
17927#line 2668 "parse.y"
17928 {after_pop_stack(1, p);}
17929#line 17930 "parse.c"
17930
17931 yystate = *yyssp;
17932 YY_STACK_PRINT (yyss, yyssp, p);
17933 }
17934
17935 YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
17936 *++yyvsp = yylval;
17937 YY_IGNORE_MAYBE_UNINITIALIZED_END
17938
17939 yyerror_range[2] = yylloc;
17940 ++yylsp;
17941 YYLLOC_DEFAULT (*yylsp, yyerror_range, 2);
17942
17943 /* Shift the error token. */
17944 YY_SYMBOL_PRINT ("Shifting", YY_ACCESSING_SYMBOL (yyn), yyvsp, yylsp, p);
17945 /* %after-shift-error-token code. */
17946#line 2667 "parse.y"
17947 {after_shift_error_token(p);}
17948#line 17949 "parse.c"
17949
17950
17951 yystate = yyn;
17952 goto yynewstate;
17953
17954
17955/*-------------------------------------.
17956| yyacceptlab -- YYACCEPT comes here. |
17957`-------------------------------------*/
17958yyacceptlab:
17959 yyresult = 0;
17960 goto yyreturnlab;
17961
17962
17963/*-----------------------------------.
17964| yyabortlab -- YYABORT comes here. |
17965`-----------------------------------*/
17966yyabortlab:
17967 yyresult = 1;
17968 goto yyreturnlab;
17969
17970
17971/*-----------------------------------------------------------.
17972| yyexhaustedlab -- YYNOMEM (memory exhaustion) comes here. |
17973`-----------------------------------------------------------*/
17974yyexhaustedlab:
17975 yyerror (&yylloc, p, YY_("memory exhausted"));
17976 yyresult = 2;
17977 goto yyreturnlab;
17978
17979
17980/*----------------------------------------------------------.
17981| yyreturnlab -- parsing is finished, clean up and return. |
17982`----------------------------------------------------------*/
17983yyreturnlab:
17984 if (yychar != YYEMPTY)
17985 {
17986 /* Make sure we have latest lookahead translation. See comments at
17987 user semantic actions for why this is necessary. */
17988 yytoken = YYTRANSLATE (yychar);
17989 yydestruct ("Cleanup: discarding lookahead",
17990 yytoken, &yylval, &yylloc, p);
17991 }
17992 /* Do not reclaim the symbols of the rule whose action triggered
17993 this YYABORT or YYACCEPT. */
17994 YYPOPSTACK (yylen);
17995 YY_STACK_PRINT (yyss, yyssp, p);
17996 while (yyssp != yyss)
17997 {
17998 yydestruct ("Cleanup: popping",
17999 YY_ACCESSING_SYMBOL (+*yyssp), yyvsp, yylsp, p);
18000 YYPOPSTACK (1);
18001 }
18002#ifndef yyoverflow
18003 if (yyss != yyssa)
18004 YYSTACK_FREE (yyss);
18005#endif
18006 if (yymsg != yymsgbuf)
18007 YYSTACK_FREE (yymsg);
18008 return yyresult;
18009}
18010
18011#line 6737 "parse.y"
18012
18013# undef p
18014# undef yylex
18015# undef yylval
18016# define yylval (*p->lval)
18017
18018static int regx_options(struct parser_params*);
18019static int tokadd_string(struct parser_params*,int,int,int,long*,rb_encoding**,rb_encoding**);
18020static void tokaddmbc(struct parser_params *p, int c, rb_encoding *enc);
18021static enum yytokentype parse_string(struct parser_params*,rb_strterm_literal_t*);
18022static enum yytokentype here_document(struct parser_params*,rb_strterm_heredoc_t*);
18023
18024#define set_parser_s_value(x) (ifdef_ripper(p->s_value = (x), (void)0))
18025
18026# define set_yylval_node(x) { \
18027 YYLTYPE _cur_loc; \
18028 rb_parser_set_location(p, &_cur_loc); \
18029 yylval.node = (x); \
18030 set_parser_s_value(STR_NEW(p->lex.ptok, p->lex.pcur-p->lex.ptok)); \
18031}
18032# define set_yylval_str(x) \
18033do { \
18034 set_yylval_node(NEW_STR(x, &_cur_loc)); \
18035 set_parser_s_value(rb_str_new_mutable_parser_string(x)); \
18036} while(0)
18037# define set_yylval_num(x) { \
18038 yylval.num = (x); \
18039 set_parser_s_value(x); \
18040}
18041# define set_yylval_id(x) (yylval.id = (x))
18042# define set_yylval_name(x) { \
18043 (yylval.id = (x)); \
18044 set_parser_s_value(ID2SYM(x)); \
18045}
18046# define yylval_id() (yylval.id)
18047
18048#define set_yylval_noname() set_yylval_id(keyword_nil)
18049#define has_delayed_token(p) (p->delayed.token != NULL)
18050
18051#ifndef RIPPER
18052#define literal_flush(p, ptr) ((p)->lex.ptok = (ptr))
18053#define dispatch_scan_event(p, t) parser_dispatch_scan_event(p, t, __LINE__)
18054
18055static bool
18056parser_has_token(struct parser_params *p)
18057{
18058 const char *const pcur = p->lex.pcur;
18059 const char *const ptok = p->lex.ptok;
18060 if (p->keep_tokens && (pcur < ptok)) {
18061 rb_bug("lex.pcur < lex.ptok. (line: %d) %"PRIdPTRDIFF"|%"PRIdPTRDIFF"|%"PRIdPTRDIFF"",
18062 p->ruby_sourceline, ptok - p->lex.pbeg, pcur - ptok, p->lex.pend - pcur);
18063 }
18064 return pcur > ptok;
18065}
18066
18067static const char *
18068escaped_char(int c)
18069{
18070 switch (c) {
18071 case '"': return "\\\"";
18072 case '\\': return "\\\\";
18073 case '\0': return "\\0";
18074 case '\n': return "\\n";
18075 case '\r': return "\\r";
18076 case '\t': return "\\t";
18077 case '\f': return "\\f";
18078 case '\013': return "\\v";
18079 case '\010': return "\\b";
18080 case '\007': return "\\a";
18081 case '\033': return "\\e";
18082 case '\x7f': return "\\c?";
18083 }
18084 return NULL;
18085}
18086
18087static rb_parser_string_t *
18088rb_parser_str_escape(struct parser_params *p, rb_parser_string_t *str)
18089{
18090 rb_encoding *enc = p->enc;
18091 const char *ptr = str->ptr;
18092 const char *pend = ptr + str->len;
18093 const char *prev = ptr;
18094 char charbuf[5] = {'\\', 'x', 0, 0, 0};
18095 rb_parser_string_t * result = rb_parser_string_new(p, 0, 0);
18096
18097 while (ptr < pend) {
18098 unsigned int c;
18099 const char *cc;
18100 int n = rb_enc_precise_mbclen(ptr, pend, enc);
18101 if (!MBCLEN_CHARFOUND_P(n)) {
18102 if (ptr > prev) parser_str_cat(result, prev, ptr - prev);
18103 n = rb_enc_mbminlen(enc);
18104 if (pend < ptr + n)
18105 n = (int)(pend - ptr);
18106 while (n--) {
18107 c = *ptr & 0xf0 >> 4;
18108 charbuf[2] = (c < 10) ? '0' + c : 'A' + c - 10;
18109 c = *ptr & 0x0f;
18110 charbuf[3] = (c < 10) ? '0' + c : 'A' + c - 10;
18111 parser_str_cat(result, charbuf, 4);
18112 prev = ++ptr;
18113 }
18114 continue;
18115 }
18116 n = MBCLEN_CHARFOUND_LEN(n);
18117 c = rb_enc_mbc_to_codepoint(ptr, pend, enc);
18118 ptr += n;
18119 cc = escaped_char(c);
18120 if (cc) {
18121 if (ptr - n > prev) parser_str_cat(result, prev, ptr - n - prev);
18122 parser_str_cat_cstr(result, cc);
18123 prev = ptr;
18124 }
18125 else if (rb_enc_isascii(c, enc) && ISPRINT(c)) {
18126 }
18127 else {
18128 if (ptr - n > prev) {
18129 parser_str_cat(result, prev, ptr - n - prev);
18130 prev = ptr - n;
18131 }
18132 parser_str_cat(result, prev, ptr - prev);
18133 prev = ptr;
18134 }
18135 }
18136 if (ptr > prev) parser_str_cat(result, prev, ptr - prev);
18137
18138 return result;
18139}
18140
18141static void
18142parser_append_tokens(struct parser_params *p, rb_parser_string_t *str, enum yytokentype t, int line)
18143{
18145 token->id = p->token_id;
18146 token->type_name = parser_token2char(p, t);
18147 token->str = str;
18148 token->loc.beg_pos = p->yylloc->beg_pos;
18149 token->loc.end_pos = p->yylloc->end_pos;
18150 rb_parser_ary_push_ast_token(p, p->tokens, token);
18151 p->token_id++;
18152
18153 if (p->debug) {
18154 rb_parser_string_t *str_escaped = rb_parser_str_escape(p, str);
18155 rb_parser_printf(p, "Append tokens (line: %d) [%d, :%s, \"%s\", [%d, %d, %d, %d]]\n",
18156 line, token->id, token->type_name, str_escaped->ptr,
18157 token->loc.beg_pos.lineno, token->loc.beg_pos.column,
18158 token->loc.end_pos.lineno, token->loc.end_pos.column);
18159 rb_parser_string_free(p, str_escaped);
18160 }
18161}
18162
18163static void
18164parser_dispatch_scan_event(struct parser_params *p, enum yytokentype t, int line)
18165{
18166 debug_token_line(p, "parser_dispatch_scan_event", line);
18167
18168 if (!parser_has_token(p)) return;
18169
18170 RUBY_SET_YYLLOC(*p->yylloc);
18171
18172 if (p->keep_tokens) {
18173 rb_parser_string_t *str = rb_parser_encoding_string_new(p, p->lex.ptok, p->lex.pcur - p->lex.ptok, p->enc);
18174 parser_append_tokens(p, str, t, line);
18175 }
18176
18177 token_flush(p);
18178}
18179
18180#define dispatch_delayed_token(p, t) parser_dispatch_delayed_token(p, t, __LINE__)
18181static void
18182parser_dispatch_delayed_token(struct parser_params *p, enum yytokentype t, int line)
18183{
18184 debug_token_line(p, "parser_dispatch_delayed_token", line);
18185
18186 if (!has_delayed_token(p)) return;
18187
18188 RUBY_SET_YYLLOC_OF_DELAYED_TOKEN(*p->yylloc);
18189
18190 if (p->keep_tokens) {
18191 /* p->delayed.token is freed by rb_parser_tokens_free */
18192 parser_append_tokens(p, p->delayed.token, t, line);
18193 } else {
18194 rb_parser_string_free(p, p->delayed.token);
18195 }
18196
18197 p->delayed.token = NULL;
18198}
18199#else
18200#define literal_flush(p, ptr) ((void)(ptr))
18201
18202static int
18203ripper_has_scan_event(struct parser_params *p)
18204{
18205 if (p->lex.pcur < p->lex.ptok) rb_raise(rb_eRuntimeError, "lex.pcur < lex.ptok");
18206 return p->lex.pcur > p->lex.ptok;
18207}
18208
18209static VALUE
18210ripper_scan_event_val(struct parser_params *p, enum yytokentype t)
18211{
18212 VALUE str = STR_NEW(p->lex.ptok, p->lex.pcur - p->lex.ptok);
18213 VALUE rval = ripper_dispatch1(p, ripper_token2eventid(t), str);
18214 RUBY_SET_YYLLOC(*p->yylloc);
18215 token_flush(p);
18216 return rval;
18217}
18218
18219static void
18220ripper_dispatch_scan_event(struct parser_params *p, enum yytokentype t)
18221{
18222 if (!ripper_has_scan_event(p)) return;
18223
18224 set_parser_s_value(ripper_scan_event_val(p, t));
18225}
18226#define dispatch_scan_event(p, t) ripper_dispatch_scan_event(p, t)
18227
18228static void
18229ripper_dispatch_delayed_token(struct parser_params *p, enum yytokentype t)
18230{
18231 /* save and adjust the location to delayed token for callbacks */
18232 int saved_line = p->ruby_sourceline;
18233 const char *saved_tokp = p->lex.ptok;
18234 VALUE s_value, str;
18235
18236 if (!has_delayed_token(p)) return;
18237 p->ruby_sourceline = p->delayed.beg_line;
18238 p->lex.ptok = p->lex.pbeg + p->delayed.beg_col;
18239 str = rb_str_new_mutable_parser_string(p->delayed.token);
18240 rb_parser_string_free(p, p->delayed.token);
18241 s_value = ripper_dispatch1(p, ripper_token2eventid(t), str);
18242 set_parser_s_value(s_value);
18243 p->delayed.token = NULL;
18244 p->ruby_sourceline = saved_line;
18245 p->lex.ptok = saved_tokp;
18246}
18247#define dispatch_delayed_token(p, t) ripper_dispatch_delayed_token(p, t)
18248#endif /* RIPPER */
18249
18250static inline int
18251is_identchar(struct parser_params *p, const char *ptr, const char *MAYBE_UNUSED(ptr_end), rb_encoding *enc)
18252{
18253 return rb_enc_isalnum((unsigned char)*ptr, enc) || *ptr == '_' || !ISASCII(*ptr);
18254}
18255
18256static inline int
18257parser_is_identchar(struct parser_params *p)
18258{
18259 return !(p)->eofp && is_identchar(p, p->lex.pcur-1, p->lex.pend, p->enc);
18260}
18261
18262static inline int
18263parser_isascii(struct parser_params *p)
18264{
18265 return ISASCII(*(p->lex.pcur-1));
18266}
18267
18268static void
18269token_info_setup(token_info *ptinfo, const char *ptr, const rb_code_location_t *loc)
18270{
18271 int column = 1, nonspc = 0, i;
18272 for (i = 0; i < loc->beg_pos.column; i++, ptr++) {
18273 if (*ptr == '\t') {
18274 column = (((column - 1) / TAB_WIDTH) + 1) * TAB_WIDTH;
18275 }
18276 column++;
18277 if (*ptr != ' ' && *ptr != '\t') {
18278 nonspc = 1;
18279 }
18280 }
18281
18282 ptinfo->beg = loc->beg_pos;
18283 ptinfo->indent = column;
18284 ptinfo->nonspc = nonspc;
18285}
18286
18287static void
18288token_info_push(struct parser_params *p, const char *token, const rb_code_location_t *loc)
18289{
18290 token_info *ptinfo;
18291
18292 if (!p->token_info_enabled) return;
18293 ptinfo = ALLOC(token_info);
18294 ptinfo->token = token;
18295 ptinfo->next = p->token_info;
18296 token_info_setup(ptinfo, p->lex.pbeg, loc);
18297
18298 p->token_info = ptinfo;
18299}
18300
18301static void
18302token_info_pop(struct parser_params *p, const char *token, const rb_code_location_t *loc)
18303{
18304 token_info *ptinfo_beg = p->token_info;
18305
18306 if (!ptinfo_beg) return;
18307
18308 /* indentation check of matched keywords (begin..end, if..end, etc.) */
18309 token_info_warn(p, token, ptinfo_beg, 1, loc);
18310
18311 p->token_info = ptinfo_beg->next;
18312 ruby_sized_xfree(ptinfo_beg, sizeof(*ptinfo_beg));
18313}
18314
18315static void
18316token_info_drop(struct parser_params *p, const char *token, rb_code_position_t beg_pos)
18317{
18318 token_info *ptinfo_beg = p->token_info;
18319
18320 if (!ptinfo_beg) return;
18321 p->token_info = ptinfo_beg->next;
18322
18323 if (ptinfo_beg->beg.lineno != beg_pos.lineno ||
18324 ptinfo_beg->beg.column != beg_pos.column ||
18325 strcmp(ptinfo_beg->token, token)) {
18326 compile_error(p, "token position mismatch: %d:%d:%s expected but %d:%d:%s",
18327 beg_pos.lineno, beg_pos.column, token,
18328 ptinfo_beg->beg.lineno, ptinfo_beg->beg.column,
18329 ptinfo_beg->token);
18330 }
18331
18332 ruby_sized_xfree(ptinfo_beg, sizeof(*ptinfo_beg));
18333}
18334
18335static void
18336token_info_warn(struct parser_params *p, const char *token, token_info *ptinfo_beg, int same, const rb_code_location_t *loc)
18337{
18338 token_info ptinfo_end_body, *ptinfo_end = &ptinfo_end_body;
18339 if (!p->token_info_enabled) return;
18340 if (!ptinfo_beg) return;
18341 token_info_setup(ptinfo_end, p->lex.pbeg, loc);
18342 if (ptinfo_beg->beg.lineno == ptinfo_end->beg.lineno) return; /* ignore one-line block */
18343 if (ptinfo_beg->nonspc || ptinfo_end->nonspc) return; /* ignore keyword in the middle of a line */
18344 if (ptinfo_beg->indent == ptinfo_end->indent) return; /* the indents are matched */
18345 if (!same && ptinfo_beg->indent < ptinfo_end->indent) return;
18346 rb_warn3L(ptinfo_end->beg.lineno,
18347 "mismatched indentations at '%s' with '%s' at %d",
18348 WARN_S(token), WARN_S(ptinfo_beg->token), WARN_I(ptinfo_beg->beg.lineno));
18349}
18350
18351static int
18352parser_precise_mbclen(struct parser_params *p, const char *ptr)
18353{
18354 int len = rb_enc_precise_mbclen(ptr, p->lex.pend, p->enc);
18355 if (!MBCLEN_CHARFOUND_P(len)) {
18356 compile_error(p, "invalid multibyte char (%s)", rb_enc_name(p->enc));
18357 return -1;
18358 }
18359 return len;
18360}
18361
18362#ifndef RIPPER
18363static inline void
18364parser_show_error_line(struct parser_params *p, const YYLTYPE *yylloc)
18365{
18366 rb_parser_string_t *str;
18367 int lineno = p->ruby_sourceline;
18368 if (!yylloc) {
18369 return;
18370 }
18371 else if (yylloc->beg_pos.lineno == lineno) {
18372 str = p->lex.lastline;
18373 }
18374 else {
18375 return;
18376 }
18377 ruby_show_error_line(p, p->error_buffer, yylloc, lineno, str);
18378}
18379
18380static int
18381parser_yyerror(struct parser_params *p, const rb_code_location_t *yylloc, const char *msg)
18382{
18383#if 0
18384 YYLTYPE current;
18385
18386 if (!yylloc) {
18387 yylloc = RUBY_SET_YYLLOC(current);
18388 }
18389 else if ((p->ruby_sourceline != yylloc->beg_pos.lineno &&
18390 p->ruby_sourceline != yylloc->end_pos.lineno)) {
18391 yylloc = 0;
18392 }
18393#endif
18394 parser_compile_error(p, yylloc, "%s", msg);
18395 parser_show_error_line(p, yylloc);
18396 return 0;
18397}
18398
18399static int
18400parser_yyerror0(struct parser_params *p, const char *msg)
18401{
18402 YYLTYPE current;
18403 return parser_yyerror(p, RUBY_SET_YYLLOC(current), msg);
18404}
18405
18406void
18407ruby_show_error_line(struct parser_params *p, VALUE errbuf, const YYLTYPE *yylloc, int lineno, rb_parser_string_t *str)
18408{
18409 VALUE mesg;
18410 const int max_line_margin = 30;
18411 const char *ptr, *ptr_end, *pt, *pb;
18412 const char *pre = "", *post = "", *pend;
18413 const char *code = "", *caret = "";
18414 const char *lim;
18415 const char *const pbeg = PARSER_STRING_PTR(str);
18416 char *buf;
18417 long len;
18418 int i;
18419
18420 if (!yylloc) return;
18421 pend = rb_parser_string_end(str);
18422 if (pend > pbeg && pend[-1] == '\n') {
18423 if (--pend > pbeg && pend[-1] == '\r') --pend;
18424 }
18425
18426 pt = pend;
18427 if (lineno == yylloc->end_pos.lineno &&
18428 (pend - pbeg) > yylloc->end_pos.column) {
18429 pt = pbeg + yylloc->end_pos.column;
18430 }
18431
18432 ptr = ptr_end = pt;
18433 lim = ptr - pbeg > max_line_margin ? ptr - max_line_margin : pbeg;
18434 while ((lim < ptr) && (*(ptr-1) != '\n')) ptr--;
18435
18436 lim = pend - ptr_end > max_line_margin ? ptr_end + max_line_margin : pend;
18437 while ((ptr_end < lim) && (*ptr_end != '\n') && (*ptr_end != '\r')) ptr_end++;
18438
18439 len = ptr_end - ptr;
18440 if (len > 4) {
18441 if (ptr > pbeg) {
18442 ptr = rb_enc_prev_char(pbeg, ptr, pt, rb_parser_str_get_encoding(str));
18443 if (ptr > pbeg) pre = "...";
18444 }
18445 if (ptr_end < pend) {
18446 ptr_end = rb_enc_prev_char(pt, ptr_end, pend, rb_parser_str_get_encoding(str));
18447 if (ptr_end < pend) post = "...";
18448 }
18449 }
18450 pb = pbeg;
18451 if (lineno == yylloc->beg_pos.lineno) {
18452 pb += yylloc->beg_pos.column;
18453 if (pb > pt) pb = pt;
18454 }
18455 if (pb < ptr) pb = ptr;
18456 if (len <= 4 && yylloc->beg_pos.lineno == yylloc->end_pos.lineno) {
18457 return;
18458 }
18459 if (RTEST(errbuf)) {
18460 mesg = rb_attr_get(errbuf, idMesg);
18461 if (char_at_end(p, mesg, '\n') != '\n')
18462 rb_str_cat_cstr(mesg, "\n");
18463 }
18464 else {
18465 mesg = rb_enc_str_new(0, 0, rb_parser_str_get_encoding(str));
18466 }
18467 if (!errbuf && rb_stderr_tty_p()) {
18468#define CSI_BEGIN "\033["
18469#define CSI_SGR "m"
18470 rb_str_catf(mesg,
18471 CSI_BEGIN""CSI_SGR"%s" /* pre */
18472 CSI_BEGIN"1"CSI_SGR"%.*s"
18473 CSI_BEGIN"1;4"CSI_SGR"%.*s"
18474 CSI_BEGIN";1"CSI_SGR"%.*s"
18475 CSI_BEGIN""CSI_SGR"%s" /* post */
18476 "\n",
18477 pre,
18478 (int)(pb - ptr), ptr,
18479 (int)(pt - pb), pb,
18480 (int)(ptr_end - pt), pt,
18481 post);
18482 }
18483 else {
18484 char *p2;
18485
18486 len = ptr_end - ptr;
18487 lim = pt < pend ? pt : pend;
18488 i = (int)(lim - ptr);
18489 buf = ALLOCA_N(char, i+2);
18490 code = ptr;
18491 caret = p2 = buf;
18492 if (ptr <= pb) {
18493 while (ptr < pb) {
18494 *p2++ = *ptr++ == '\t' ? '\t' : ' ';
18495 }
18496 *p2++ = '^';
18497 ptr++;
18498 }
18499 if (lim > ptr) {
18500 memset(p2, '~', (lim - ptr));
18501 p2 += (lim - ptr);
18502 }
18503 *p2 = '\0';
18504 rb_str_catf(mesg, "%s%.*s%s\n""%s%s\n",
18505 pre, (int)len, code, post,
18506 pre, caret);
18507 }
18508 if (!errbuf) rb_write_error_str(mesg);
18509}
18510#else
18511
18512static int
18513parser_yyerror(struct parser_params *p, const YYLTYPE *yylloc, const char *msg)
18514{
18515 const char *pcur = 0, *ptok = 0;
18516 if (p->ruby_sourceline == yylloc->beg_pos.lineno &&
18517 p->ruby_sourceline == yylloc->end_pos.lineno) {
18518 pcur = p->lex.pcur;
18519 ptok = p->lex.ptok;
18520 p->lex.ptok = p->lex.pbeg + yylloc->beg_pos.column;
18521 p->lex.pcur = p->lex.pbeg + yylloc->end_pos.column;
18522 }
18523 parser_yyerror0(p, msg);
18524 if (pcur) {
18525 p->lex.ptok = ptok;
18526 p->lex.pcur = pcur;
18527 }
18528 return 0;
18529}
18530
18531static int
18532parser_yyerror0(struct parser_params *p, const char *msg)
18533{
18534 dispatch1(parse_error, STR_NEW2(msg));
18535 ripper_error(p);
18536 return 0;
18537}
18538
18539static inline void
18540parser_show_error_line(struct parser_params *p, const YYLTYPE *yylloc)
18541{
18542}
18543#endif /* !RIPPER */
18544
18545static int
18546vtable_size(const struct vtable *tbl)
18547{
18548 if (!DVARS_TERMINAL_P(tbl)) {
18549 return tbl->pos;
18550 }
18551 else {
18552 return 0;
18553 }
18554}
18555
18556static struct vtable *
18557vtable_alloc_gen(struct parser_params *p, int line, struct vtable *prev)
18558{
18559 struct vtable *tbl = ALLOC(struct vtable);
18560 tbl->pos = 0;
18561 tbl->capa = 8;
18562 tbl->tbl = ALLOC_N(ID, tbl->capa);
18563 tbl->prev = prev;
18564#ifndef RIPPER
18565 if (p->debug) {
18566 rb_parser_printf(p, "vtable_alloc:%d: %p\n", line, (void *)tbl);
18567 }
18568#endif
18569 return tbl;
18570}
18571#define vtable_alloc(prev) vtable_alloc_gen(p, __LINE__, prev)
18572
18573static void
18574vtable_free_gen(struct parser_params *p, int line, const char *name,
18575 struct vtable *tbl)
18576{
18577#ifndef RIPPER
18578 if (p->debug) {
18579 rb_parser_printf(p, "vtable_free:%d: %s(%p)\n", line, name, (void *)tbl);
18580 }
18581#endif
18582 if (!DVARS_TERMINAL_P(tbl)) {
18583 if (tbl->tbl) {
18584 ruby_sized_xfree(tbl->tbl, tbl->capa * sizeof(ID));
18585 }
18586 ruby_sized_xfree(tbl, sizeof(*tbl));
18587 }
18588}
18589#define vtable_free(tbl) vtable_free_gen(p, __LINE__, #tbl, tbl)
18590
18591static void
18592vtable_add_gen(struct parser_params *p, int line, const char *name,
18593 struct vtable *tbl, ID id)
18594{
18595#ifndef RIPPER
18596 if (p->debug) {
18597 rb_parser_printf(p, "vtable_add:%d: %s(%p), %s\n",
18598 line, name, (void *)tbl, rb_id2name(id));
18599 }
18600#endif
18601 if (DVARS_TERMINAL_P(tbl)) {
18602 rb_parser_fatal(p, "vtable_add: vtable is not allocated (%p)", (void *)tbl);
18603 return;
18604 }
18605 if (tbl->pos == tbl->capa) {
18606 tbl->capa = tbl->capa * 2;
18607 SIZED_REALLOC_N(tbl->tbl, ID, tbl->capa, tbl->pos);
18608 }
18609 tbl->tbl[tbl->pos++] = id;
18610}
18611#define vtable_add(tbl, id) vtable_add_gen(p, __LINE__, #tbl, tbl, id)
18612
18613static void
18614vtable_pop_gen(struct parser_params *p, int line, const char *name,
18615 struct vtable *tbl, int n)
18616{
18617 if (p->debug) {
18618 rb_parser_printf(p, "vtable_pop:%d: %s(%p), %d\n",
18619 line, name, (void *)tbl, n);
18620 }
18621 if (tbl->pos < n) {
18622 rb_parser_fatal(p, "vtable_pop: unreachable (%d < %d)", tbl->pos, n);
18623 return;
18624 }
18625 tbl->pos -= n;
18626}
18627#define vtable_pop(tbl, n) vtable_pop_gen(p, __LINE__, #tbl, tbl, n)
18628
18629static int
18630vtable_included(const struct vtable * tbl, ID id)
18631{
18632 int i;
18633
18634 if (!DVARS_TERMINAL_P(tbl)) {
18635 for (i = 0; i < tbl->pos; i++) {
18636 if (tbl->tbl[i] == id) {
18637 return i+1;
18638 }
18639 }
18640 }
18641 return 0;
18642}
18643
18644static void parser_prepare(struct parser_params *p);
18645
18646static int
18647e_option_supplied(struct parser_params *p)
18648{
18649 return strcmp(p->ruby_sourcefile, "-e") == 0;
18650}
18651
18652#ifndef RIPPER
18653static NODE *parser_append_options(struct parser_params *p, NODE *node);
18654
18655static VALUE
18656yycompile0(VALUE arg)
18657{
18658 int n;
18659 NODE *tree;
18660 struct parser_params *p = (struct parser_params *)arg;
18661 int cov = FALSE;
18662
18663 if (!compile_for_eval && !NIL_P(p->ruby_sourcefile_string) && !e_option_supplied(p)) {
18664 cov = TRUE;
18665 }
18666
18667 if (p->debug_lines) {
18668 p->ast->body.script_lines = p->debug_lines;
18669 }
18670
18671 parser_prepare(p);
18672#define RUBY_DTRACE_PARSE_HOOK(name) \
18673 if (RUBY_DTRACE_PARSE_##name##_ENABLED()) { \
18674 RUBY_DTRACE_PARSE_##name(p->ruby_sourcefile, p->ruby_sourceline); \
18675 }
18676 RUBY_DTRACE_PARSE_HOOK(BEGIN);
18677 n = yyparse(p);
18678 RUBY_DTRACE_PARSE_HOOK(END);
18679
18680 p->debug_lines = 0;
18681
18682 xfree(p->lex.strterm);
18683 p->lex.strterm = 0;
18684 p->lex.pcur = p->lex.pbeg = p->lex.pend = 0;
18685 if (n || p->error_p) {
18686 VALUE mesg = p->error_buffer;
18687 if (!mesg) {
18688 mesg = syntax_error_new();
18689 }
18690 if (!p->error_tolerant) {
18691 rb_set_errinfo(mesg);
18692 return FALSE;
18693 }
18694 }
18695 tree = p->eval_tree;
18696 if (!tree) {
18697 tree = NEW_NIL(&NULL_LOC);
18698 }
18699 else {
18700 rb_parser_ary_t *tokens = p->tokens;
18701 NODE *prelude;
18702 NODE *body = parser_append_options(p, RNODE_SCOPE(tree)->nd_body);
18703 prelude = block_append(p, p->eval_tree_begin, body);
18704 RNODE_SCOPE(tree)->nd_body = prelude;
18705 p->ast->body.frozen_string_literal = p->frozen_string_literal;
18706 p->ast->body.coverage_enabled = cov;
18707 if (p->keep_tokens) {
18708 p->ast->node_buffer->tokens = tokens;
18709 p->tokens = NULL;
18710 }
18711 }
18712 p->ast->body.root = tree;
18713 p->ast->body.line_count = p->line_count;
18714 return TRUE;
18715}
18716
18717static rb_ast_t *
18718yycompile(struct parser_params *p, VALUE fname, int line)
18719{
18720 rb_ast_t *ast;
18721 if (NIL_P(fname)) {
18722 p->ruby_sourcefile_string = Qnil;
18723 p->ruby_sourcefile = "(none)";
18724 }
18725 else {
18726 p->ruby_sourcefile_string = rb_str_to_interned_str(fname);
18727 p->ruby_sourcefile = StringValueCStr(fname);
18728 }
18729 p->ruby_sourceline = line - 1;
18730
18731 p->lvtbl = NULL;
18732
18733 p->ast = ast = rb_ast_new();
18734 compile_callback(yycompile0, (VALUE)p);
18735 p->ast = 0;
18736
18737 while (p->lvtbl) {
18738 local_pop(p);
18739 }
18740
18741 return ast;
18742}
18743#endif /* !RIPPER */
18744
18745static rb_encoding *
18746must_be_ascii_compatible(struct parser_params *p, rb_parser_string_t *s)
18747{
18748 rb_encoding *enc = rb_parser_str_get_encoding(s);
18749 if (!rb_enc_asciicompat(enc)) {
18750 rb_raise(rb_eArgError, "invalid source encoding");
18751 }
18752 return enc;
18753}
18754
18755static rb_parser_string_t *
18756lex_getline(struct parser_params *p)
18757{
18758 rb_parser_string_t *line = (*p->lex.gets)(p, p->lex.input, p->line_count);
18759 if (!line) return 0;
18760 p->line_count++;
18761 string_buffer_append(p, line);
18762 must_be_ascii_compatible(p, line);
18763 return line;
18764}
18765
18766#ifndef RIPPER
18767rb_ast_t*
18768rb_parser_compile(rb_parser_t *p, rb_parser_lex_gets_func *gets, VALUE fname, rb_parser_input_data input, int line)
18769{
18770 p->lex.gets = gets;
18771 p->lex.input = input;
18772 p->lex.pbeg = p->lex.pcur = p->lex.pend = 0;
18773
18774 return yycompile(p, fname, line);
18775}
18776#endif /* !RIPPER */
18777
18778#define STR_FUNC_ESCAPE 0x01
18779#define STR_FUNC_EXPAND 0x02
18780#define STR_FUNC_REGEXP 0x04
18781#define STR_FUNC_QWORDS 0x08
18782#define STR_FUNC_SYMBOL 0x10
18783#define STR_FUNC_INDENT 0x20
18784#define STR_FUNC_LABEL 0x40
18785#define STR_FUNC_LIST 0x4000
18786#define STR_FUNC_TERM 0x8000
18787
18788enum string_type {
18789 str_label = STR_FUNC_LABEL,
18790 str_squote = (0),
18791 str_dquote = (STR_FUNC_EXPAND),
18792 str_xquote = (STR_FUNC_EXPAND),
18793 str_regexp = (STR_FUNC_REGEXP|STR_FUNC_ESCAPE|STR_FUNC_EXPAND),
18794 str_sword = (STR_FUNC_QWORDS|STR_FUNC_LIST),
18795 str_dword = (STR_FUNC_QWORDS|STR_FUNC_EXPAND|STR_FUNC_LIST),
18796 str_ssym = (STR_FUNC_SYMBOL),
18797 str_dsym = (STR_FUNC_SYMBOL|STR_FUNC_EXPAND)
18798};
18799
18800static rb_parser_string_t *
18801parser_str_new(struct parser_params *p, const char *ptr, long len, rb_encoding *enc, int func, rb_encoding *enc0)
18802{
18803 rb_parser_string_t *pstr;
18804
18805 pstr = rb_parser_encoding_string_new(p, ptr, len, enc);
18806
18807 if (!(func & STR_FUNC_REGEXP)) {
18808 if (rb_parser_is_ascii_string(p, pstr)) {
18809 }
18810 else if (rb_is_usascii_enc((void *)enc0) && enc != rb_utf8_encoding()) {
18811 /* everything is valid in ASCII-8BIT */
18812 enc = rb_ascii8bit_encoding();
18813 PARSER_ENCODING_CODERANGE_SET(pstr, enc, RB_PARSER_ENC_CODERANGE_VALID);
18814 }
18815 }
18816
18817 return pstr;
18818}
18819
18820static int
18821strterm_is_heredoc(rb_strterm_t *strterm)
18822{
18823 return strterm->heredoc;
18824}
18825
18826static rb_strterm_t *
18827new_strterm(struct parser_params *p, int func, int term, int paren)
18828{
18829 rb_strterm_t *strterm = ZALLOC(rb_strterm_t);
18830 strterm->u.literal.func = func;
18831 strterm->u.literal.term = term;
18832 strterm->u.literal.paren = paren;
18833 return strterm;
18834}
18835
18836static rb_strterm_t *
18837new_heredoc(struct parser_params *p)
18838{
18839 rb_strterm_t *strterm = ZALLOC(rb_strterm_t);
18840 strterm->heredoc = true;
18841 return strterm;
18842}
18843
18844#define peek(p,c) peek_n(p, (c), 0)
18845#define peek_n(p,c,n) (!lex_eol_n_p(p, n) && (c) == (unsigned char)(p)->lex.pcur[n])
18846#define peekc(p) peekc_n(p, 0)
18847#define peekc_n(p,n) (lex_eol_n_p(p, n) ? -1 : (unsigned char)(p)->lex.pcur[n])
18848
18849#define add_delayed_token(p, tok, end) parser_add_delayed_token(p, tok, end, __LINE__)
18850static void
18851parser_add_delayed_token(struct parser_params *p, const char *tok, const char *end, int line)
18852{
18853 debug_token_line(p, "add_delayed_token", line);
18854
18855 if (tok < end) {
18856 if (has_delayed_token(p)) {
18857 bool next_line = parser_string_char_at_end(p, p->delayed.token, 0) == '\n';
18858 int end_line = (next_line ? 1 : 0) + p->delayed.end_line;
18859 int end_col = (next_line ? 0 : p->delayed.end_col);
18860 if (end_line != p->ruby_sourceline || end_col != tok - p->lex.pbeg) {
18861 dispatch_delayed_token(p, tSTRING_CONTENT);
18862 }
18863 }
18864 if (!has_delayed_token(p)) {
18865 p->delayed.token = rb_parser_string_new(p, 0, 0);
18866 rb_parser_enc_associate(p, p->delayed.token, p->enc);
18867 p->delayed.beg_line = p->ruby_sourceline;
18868 p->delayed.beg_col = rb_long2int(tok - p->lex.pbeg);
18869 }
18870 parser_str_cat(p->delayed.token, tok, end - tok);
18871 p->delayed.end_line = p->ruby_sourceline;
18872 p->delayed.end_col = rb_long2int(end - p->lex.pbeg);
18873 p->lex.ptok = end;
18874 }
18875}
18876
18877static void
18878set_lastline(struct parser_params *p, rb_parser_string_t *str)
18879{
18880 p->lex.pbeg = p->lex.pcur = PARSER_STRING_PTR(str);
18881 p->lex.pend = p->lex.pcur + PARSER_STRING_LEN(str);
18882 p->lex.lastline = str;
18883}
18884
18885static int
18886nextline(struct parser_params *p, int set_encoding)
18887{
18888 rb_parser_string_t *str = p->lex.nextline;
18889 p->lex.nextline = 0;
18890 if (!str) {
18891 if (p->eofp)
18892 return -1;
18893
18894 if (!lex_eol_ptr_p(p, p->lex.pbeg) && *(p->lex.pend-1) != '\n') {
18895 goto end_of_input;
18896 }
18897
18898 if (!p->lex.input || !(str = lex_getline(p))) {
18899 end_of_input:
18900 p->eofp = 1;
18901 lex_goto_eol(p);
18902 return -1;
18903 }
18904#ifndef RIPPER
18905 if (p->debug_lines) {
18906 if (set_encoding) rb_parser_enc_associate(p, str, p->enc);
18907 rb_parser_string_t *copy = rb_parser_string_deep_copy(p, str);
18908 rb_parser_ary_push_script_line(p, p->debug_lines, copy);
18909 }
18910#endif
18911 p->cr_seen = FALSE;
18912 }
18913 else if (str == AFTER_HEREDOC_WITHOUT_TERMINATOR) {
18914 /* after here-document without terminator */
18915 goto end_of_input;
18916 }
18917 add_delayed_token(p, p->lex.ptok, p->lex.pend);
18918 if (p->heredoc_end > 0) {
18919 p->ruby_sourceline = p->heredoc_end;
18920 p->heredoc_end = 0;
18921 }
18922 p->ruby_sourceline++;
18923 set_lastline(p, str);
18924 token_flush(p);
18925 return 0;
18926}
18927
18928static int
18929parser_cr(struct parser_params *p, int c)
18930{
18931 if (peek(p, '\n')) {
18932 p->lex.pcur++;
18933 c = '\n';
18934 }
18935 return c;
18936}
18937
18938static inline int
18939nextc0(struct parser_params *p, int set_encoding)
18940{
18941 int c;
18942
18943 if (UNLIKELY(lex_eol_p(p) || p->eofp || p->lex.nextline > AFTER_HEREDOC_WITHOUT_TERMINATOR)) {
18944 if (nextline(p, set_encoding)) return -1;
18945 }
18946 c = (unsigned char)*p->lex.pcur++;
18947 if (UNLIKELY(c == '\r')) {
18948 c = parser_cr(p, c);
18949 }
18950
18951 return c;
18952}
18953#define nextc(p) nextc0(p, TRUE)
18954
18955static void
18956pushback(struct parser_params *p, int c)
18957{
18958 if (c == -1) return;
18959 p->eofp = 0;
18960 p->lex.pcur--;
18961 if (p->lex.pcur > p->lex.pbeg && p->lex.pcur[0] == '\n' && p->lex.pcur[-1] == '\r') {
18962 p->lex.pcur--;
18963 }
18964}
18965
18966#define was_bol(p) ((p)->lex.pcur == (p)->lex.pbeg + 1)
18967
18968#define tokfix(p) ((p)->tokenbuf[(p)->tokidx]='\0')
18969#define tok(p) (p)->tokenbuf
18970#define toklen(p) (p)->tokidx
18971
18972static int
18973looking_at_eol_p(struct parser_params *p)
18974{
18975 const char *ptr = p->lex.pcur;
18976 while (!lex_eol_ptr_p(p, ptr)) {
18977 int c = (unsigned char)*ptr++;
18978 int eol = (c == '\n' || c == '#');
18979 if (eol || !ISSPACE(c)) {
18980 return eol;
18981 }
18982 }
18983 return TRUE;
18984}
18985
18986static char*
18987newtok(struct parser_params *p)
18988{
18989 p->tokidx = 0;
18990 if (!p->tokenbuf) {
18991 p->toksiz = 60;
18992 p->tokenbuf = ALLOC_N(char, 60);
18993 }
18994 if (p->toksiz > 4096) {
18995 p->toksiz = 60;
18996 REALLOC_N(p->tokenbuf, char, 60);
18997 }
18998 return p->tokenbuf;
18999}
19000
19001static char *
19002tokspace(struct parser_params *p, int n)
19003{
19004 p->tokidx += n;
19005
19006 if (p->tokidx >= p->toksiz) {
19007 do {p->toksiz *= 2;} while (p->toksiz < p->tokidx);
19008 REALLOC_N(p->tokenbuf, char, p->toksiz);
19009 }
19010 return &p->tokenbuf[p->tokidx-n];
19011}
19012
19013static void
19014tokadd(struct parser_params *p, int c)
19015{
19016 p->tokenbuf[p->tokidx++] = (char)c;
19017 if (p->tokidx >= p->toksiz) {
19018 p->toksiz *= 2;
19019 REALLOC_N(p->tokenbuf, char, p->toksiz);
19020 }
19021}
19022
19023static int
19024tok_hex(struct parser_params *p, size_t *numlen)
19025{
19026 int c;
19027
19028 c = (int)ruby_scan_hex(p->lex.pcur, 2, numlen);
19029 if (!*numlen) {
19030 flush_string_content(p, p->enc, rb_strlen_lit("\\x"));
19031 yyerror0("invalid hex escape");
19032 dispatch_scan_event(p, tSTRING_CONTENT);
19033 return 0;
19034 }
19035 p->lex.pcur += *numlen;
19036 return c;
19037}
19038
19039#define tokcopy(p, n) memcpy(tokspace(p, n), (p)->lex.pcur - (n), (n))
19040
19041static int
19042escaped_control_code(int c)
19043{
19044 int c2 = 0;
19045 switch (c) {
19046 case ' ':
19047 c2 = 's';
19048 break;
19049 case '\n':
19050 c2 = 'n';
19051 break;
19052 case '\t':
19053 c2 = 't';
19054 break;
19055 case '\v':
19056 c2 = 'v';
19057 break;
19058 case '\r':
19059 c2 = 'r';
19060 break;
19061 case '\f':
19062 c2 = 'f';
19063 break;
19064 }
19065 return c2;
19066}
19067
19068#define WARN_SPACE_CHAR(c, prefix) \
19069 rb_warn1("invalid character syntax; use "prefix"\\%c", WARN_I(c))
19070
19071static int
19072tokadd_codepoint(struct parser_params *p, rb_encoding **encp,
19073 int regexp_literal, const char *begin)
19074{
19075 const int wide = !begin;
19076 size_t numlen;
19077 int codepoint = (int)ruby_scan_hex(p->lex.pcur, wide ? p->lex.pend - p->lex.pcur : 4, &numlen);
19078
19079 p->lex.pcur += numlen;
19080 if (p->lex.strterm == NULL ||
19081 strterm_is_heredoc(p->lex.strterm) ||
19082 (p->lex.strterm->u.literal.func != str_regexp)) {
19083 if (!begin) begin = p->lex.pcur;
19084 if (wide ? (numlen == 0 || numlen > 6) : (numlen < 4)) {
19085 flush_string_content(p, rb_utf8_encoding(), p->lex.pcur - begin);
19086 yyerror0("invalid Unicode escape");
19087 dispatch_scan_event(p, tSTRING_CONTENT);
19088 return wide && numlen > 0;
19089 }
19090 if (codepoint > 0x10ffff) {
19091 flush_string_content(p, rb_utf8_encoding(), p->lex.pcur - begin);
19092 yyerror0("invalid Unicode codepoint (too large)");
19093 dispatch_scan_event(p, tSTRING_CONTENT);
19094 return wide;
19095 }
19096 if ((codepoint & 0xfffff800) == 0xd800) {
19097 flush_string_content(p, rb_utf8_encoding(), p->lex.pcur - begin);
19098 yyerror0("invalid Unicode codepoint");
19099 dispatch_scan_event(p, tSTRING_CONTENT);
19100 return wide;
19101 }
19102 }
19103 if (regexp_literal) {
19104 tokcopy(p, (int)numlen);
19105 }
19106 else if (codepoint >= 0x80) {
19107 rb_encoding *utf8 = rb_utf8_encoding();
19108 if (*encp && utf8 != *encp) {
19109 YYLTYPE loc = RUBY_INIT_YYLLOC();
19110 compile_error(p, "UTF-8 mixed within %s source", rb_enc_name(*encp));
19111 parser_show_error_line(p, &loc);
19112 return wide;
19113 }
19114 *encp = utf8;
19115 tokaddmbc(p, codepoint, *encp);
19116 }
19117 else {
19118 tokadd(p, codepoint);
19119 }
19120 return TRUE;
19121}
19122
19123static int tokadd_mbchar(struct parser_params *p, int c);
19124
19125static int
19126tokskip_mbchar(struct parser_params *p)
19127{
19128 int len = parser_precise_mbclen(p, p->lex.pcur-1);
19129 if (len > 0) {
19130 p->lex.pcur += len - 1;
19131 }
19132 return len;
19133}
19134
19135/* return value is for ?\u3042 */
19136static void
19137tokadd_utf8(struct parser_params *p, rb_encoding **encp,
19138 int term, int symbol_literal, int regexp_literal)
19139{
19140 /*
19141 * If `term` is not -1, then we allow multiple codepoints in \u{}
19142 * upto `term` byte, otherwise we're parsing a character literal.
19143 * And then add the codepoints to the current token.
19144 */
19145 static const char multiple_codepoints[] = "Multiple codepoints at single character literal";
19146
19147 const int open_brace = '{', close_brace = '}';
19148
19149 if (regexp_literal) { tokadd(p, '\\'); tokadd(p, 'u'); }
19150
19151 if (peek(p, open_brace)) { /* handle \u{...} form */
19152 if (regexp_literal && p->lex.strterm->u.literal.func == str_regexp) {
19153 /*
19154 * Skip parsing validation code and copy bytes as-is until term or
19155 * closing brace, in order to correctly handle extended regexps where
19156 * invalid unicode escapes are allowed in comments. The regexp parser
19157 * does its own validation and will catch any issues.
19158 */
19159 tokadd(p, open_brace);
19160 while (!lex_eol_ptr_p(p, ++p->lex.pcur)) {
19161 int c = peekc(p);
19162 if (c == close_brace) {
19163 tokadd(p, c);
19164 ++p->lex.pcur;
19165 break;
19166 }
19167 else if (c == term) {
19168 break;
19169 }
19170 if (c == '\\' && !lex_eol_n_p(p, 1)) {
19171 tokadd(p, c);
19172 c = *++p->lex.pcur;
19173 }
19174 tokadd_mbchar(p, c);
19175 }
19176 }
19177 else {
19178 const char *second = NULL;
19179 int c, last = nextc(p);
19180 if (lex_eol_p(p)) goto unterminated;
19181 while (ISSPACE(c = peekc(p)) && !lex_eol_ptr_p(p, ++p->lex.pcur));
19182 while (c != close_brace) {
19183 if (c == term) goto unterminated;
19184 if (second == multiple_codepoints)
19185 second = p->lex.pcur;
19186 if (regexp_literal) tokadd(p, last);
19187 if (!tokadd_codepoint(p, encp, regexp_literal, NULL)) {
19188 break;
19189 }
19190 while (ISSPACE(c = peekc(p))) {
19191 if (lex_eol_ptr_p(p, ++p->lex.pcur)) goto unterminated;
19192 last = c;
19193 }
19194 if (term == -1 && !second)
19195 second = multiple_codepoints;
19196 }
19197
19198 if (c != close_brace) {
19199 unterminated:
19200 flush_string_content(p, rb_utf8_encoding(), 0);
19201 yyerror0("unterminated Unicode escape");
19202 dispatch_scan_event(p, tSTRING_CONTENT);
19203 return;
19204 }
19205 if (second && second != multiple_codepoints) {
19206 const char *pcur = p->lex.pcur;
19207 p->lex.pcur = second;
19208 dispatch_scan_event(p, tSTRING_CONTENT);
19209 token_flush(p);
19210 p->lex.pcur = pcur;
19211 yyerror0(multiple_codepoints);
19212 token_flush(p);
19213 }
19214
19215 if (regexp_literal) tokadd(p, close_brace);
19216 nextc(p);
19217 }
19218 }
19219 else { /* handle \uxxxx form */
19220 if (!tokadd_codepoint(p, encp, regexp_literal, p->lex.pcur - rb_strlen_lit("\\u"))) {
19221 token_flush(p);
19222 return;
19223 }
19224 }
19225}
19226
19227#define ESCAPE_CONTROL 1
19228#define ESCAPE_META 2
19229
19230static int
19231read_escape(struct parser_params *p, int flags, const char *begin)
19232{
19233 int c;
19234 size_t numlen;
19235
19236 switch (c = nextc(p)) {
19237 case '\\': /* Backslash */
19238 return c;
19239
19240 case 'n': /* newline */
19241 return '\n';
19242
19243 case 't': /* horizontal tab */
19244 return '\t';
19245
19246 case 'r': /* carriage-return */
19247 return '\r';
19248
19249 case 'f': /* form-feed */
19250 return '\f';
19251
19252 case 'v': /* vertical tab */
19253 return '\13';
19254
19255 case 'a': /* alarm(bell) */
19256 return '\007';
19257
19258 case 'e': /* escape */
19259 return 033;
19260
19261 case '0': case '1': case '2': case '3': /* octal constant */
19262 case '4': case '5': case '6': case '7':
19263 pushback(p, c);
19264 c = (int)ruby_scan_oct(p->lex.pcur, 3, &numlen);
19265 p->lex.pcur += numlen;
19266 return c;
19267
19268 case 'x': /* hex constant */
19269 c = tok_hex(p, &numlen);
19270 if (numlen == 0) return 0;
19271 return c;
19272
19273 case 'b': /* backspace */
19274 return '\010';
19275
19276 case 's': /* space */
19277 return ' ';
19278
19279 case 'M':
19280 if (flags & ESCAPE_META) goto eof;
19281 if ((c = nextc(p)) != '-') {
19282 goto eof;
19283 }
19284 if ((c = nextc(p)) == '\\') {
19285 switch (peekc(p)) {
19286 case 'u': case 'U':
19287 nextc(p);
19288 goto eof;
19289 }
19290 return read_escape(p, flags|ESCAPE_META, begin) | 0x80;
19291 }
19292 else if (c == -1) goto eof;
19293 else if (!ISASCII(c)) {
19294 tokskip_mbchar(p);
19295 goto eof;
19296 }
19297 else {
19298 int c2 = escaped_control_code(c);
19299 if (c2) {
19300 if (ISCNTRL(c) || !(flags & ESCAPE_CONTROL)) {
19301 WARN_SPACE_CHAR(c2, "\\M-");
19302 }
19303 else {
19304 WARN_SPACE_CHAR(c2, "\\C-\\M-");
19305 }
19306 }
19307 else if (ISCNTRL(c)) goto eof;
19308 return ((c & 0xff) | 0x80);
19309 }
19310
19311 case 'C':
19312 if ((c = nextc(p)) != '-') {
19313 goto eof;
19314 }
19315 case 'c':
19316 if (flags & ESCAPE_CONTROL) goto eof;
19317 if ((c = nextc(p))== '\\') {
19318 switch (peekc(p)) {
19319 case 'u': case 'U':
19320 nextc(p);
19321 goto eof;
19322 }
19323 c = read_escape(p, flags|ESCAPE_CONTROL, begin);
19324 }
19325 else if (c == '?')
19326 return 0177;
19327 else if (c == -1) goto eof;
19328 else if (!ISASCII(c)) {
19329 tokskip_mbchar(p);
19330 goto eof;
19331 }
19332 else {
19333 int c2 = escaped_control_code(c);
19334 if (c2) {
19335 if (ISCNTRL(c)) {
19336 if (flags & ESCAPE_META) {
19337 WARN_SPACE_CHAR(c2, "\\M-");
19338 }
19339 else {
19340 WARN_SPACE_CHAR(c2, "");
19341 }
19342 }
19343 else {
19344 if (flags & ESCAPE_META) {
19345 WARN_SPACE_CHAR(c2, "\\M-\\C-");
19346 }
19347 else {
19348 WARN_SPACE_CHAR(c2, "\\C-");
19349 }
19350 }
19351 }
19352 else if (ISCNTRL(c)) goto eof;
19353 }
19354 return c & 0x9f;
19355
19356 eof:
19357 case -1:
19358 flush_string_content(p, p->enc, p->lex.pcur - begin);
19359 yyerror0("Invalid escape character syntax");
19360 dispatch_scan_event(p, tSTRING_CONTENT);
19361 return '\0';
19362
19363 default:
19364 if (!ISASCII(c)) {
19365 tokskip_mbchar(p);
19366 goto eof;
19367 }
19368 return c;
19369 }
19370}
19371
19372static void
19373tokaddmbc(struct parser_params *p, int c, rb_encoding *enc)
19374{
19375 int len = rb_enc_codelen(c, enc);
19376 rb_enc_mbcput(c, tokspace(p, len), enc);
19377}
19378
19379static int
19380tokadd_escape(struct parser_params *p)
19381{
19382 int c;
19383 size_t numlen;
19384 const char *begin = p->lex.pcur;
19385
19386 switch (c = nextc(p)) {
19387 case '\n':
19388 return 0; /* just ignore */
19389
19390 case '0': case '1': case '2': case '3': /* octal constant */
19391 case '4': case '5': case '6': case '7':
19392 {
19393 ruby_scan_oct(--p->lex.pcur, 3, &numlen);
19394 if (numlen == 0) goto eof;
19395 p->lex.pcur += numlen;
19396 tokcopy(p, (int)numlen + 1);
19397 }
19398 return 0;
19399
19400 case 'x': /* hex constant */
19401 {
19402 tok_hex(p, &numlen);
19403 if (numlen == 0) return -1;
19404 tokcopy(p, (int)numlen + 2);
19405 }
19406 return 0;
19407
19408 eof:
19409 case -1:
19410 flush_string_content(p, p->enc, p->lex.pcur - begin);
19411 yyerror0("Invalid escape character syntax");
19412 token_flush(p);
19413 return -1;
19414
19415 default:
19416 tokadd(p, '\\');
19417 tokadd(p, c);
19418 }
19419 return 0;
19420}
19421
19422static int
19423char_to_option(int c)
19424{
19425 int val;
19426
19427 switch (c) {
19428 case 'i':
19429 val = RE_ONIG_OPTION_IGNORECASE;
19430 break;
19431 case 'x':
19432 val = RE_ONIG_OPTION_EXTEND;
19433 break;
19434 case 'm':
19435 val = RE_ONIG_OPTION_MULTILINE;
19436 break;
19437 default:
19438 val = 0;
19439 break;
19440 }
19441 return val;
19442}
19443
19444#define ARG_ENCODING_FIXED 16
19445#define ARG_ENCODING_NONE 32
19446#define ENC_ASCII8BIT 1
19447#define ENC_EUC_JP 2
19448#define ENC_Windows_31J 3
19449#define ENC_UTF8 4
19450
19451static int
19452char_to_option_kcode(int c, int *option, int *kcode)
19453{
19454 *option = 0;
19455
19456 switch (c) {
19457 case 'n':
19458 *kcode = ENC_ASCII8BIT;
19459 return (*option = ARG_ENCODING_NONE);
19460 case 'e':
19461 *kcode = ENC_EUC_JP;
19462 break;
19463 case 's':
19464 *kcode = ENC_Windows_31J;
19465 break;
19466 case 'u':
19467 *kcode = ENC_UTF8;
19468 break;
19469 default:
19470 *kcode = -1;
19471 return (*option = char_to_option(c));
19472 }
19473 *option = ARG_ENCODING_FIXED;
19474 return 1;
19475}
19476
19477static int
19478regx_options(struct parser_params *p)
19479{
19480 int kcode = 0;
19481 int kopt = 0;
19482 int options = 0;
19483 int c, opt, kc;
19484
19485 newtok(p);
19486 while (c = nextc(p), ISALPHA(c)) {
19487 if (c == 'o') {
19488 options |= RE_OPTION_ONCE;
19489 }
19490 else if (char_to_option_kcode(c, &opt, &kc)) {
19491 if (kc >= 0) {
19492 if (kc != ENC_ASCII8BIT) kcode = c;
19493 kopt = opt;
19494 }
19495 else {
19496 options |= opt;
19497 }
19498 }
19499 else {
19500 tokadd(p, c);
19501 }
19502 }
19503 options |= kopt;
19504 pushback(p, c);
19505 if (toklen(p)) {
19506 YYLTYPE loc = RUBY_INIT_YYLLOC();
19507 tokfix(p);
19508 compile_error(p, "unknown regexp option%s - %*s",
19509 toklen(p) > 1 ? "s" : "", toklen(p), tok(p));
19510 parser_show_error_line(p, &loc);
19511 }
19512 return options | RE_OPTION_ENCODING(kcode);
19513}
19514
19515static int
19516tokadd_mbchar(struct parser_params *p, int c)
19517{
19518 int len = parser_precise_mbclen(p, p->lex.pcur-1);
19519 if (len < 0) return -1;
19520 tokadd(p, c);
19521 p->lex.pcur += --len;
19522 if (len > 0) tokcopy(p, len);
19523 return c;
19524}
19525
19526static inline int
19527simple_re_meta(int c)
19528{
19529 switch (c) {
19530 case '$': case '*': case '+': case '.':
19531 case '?': case '^': case '|':
19532 case ')': case ']': case '}': case '>':
19533 return TRUE;
19534 default:
19535 return FALSE;
19536 }
19537}
19538
19539static int
19540parser_update_heredoc_indent(struct parser_params *p, int c)
19541{
19542 if (p->heredoc_line_indent == -1) {
19543 if (c == '\n') p->heredoc_line_indent = 0;
19544 }
19545 else {
19546 if (c == ' ') {
19547 p->heredoc_line_indent++;
19548 return TRUE;
19549 }
19550 else if (c == '\t') {
19551 int w = (p->heredoc_line_indent / TAB_WIDTH) + 1;
19552 p->heredoc_line_indent = w * TAB_WIDTH;
19553 return TRUE;
19554 }
19555 else if (c != '\n') {
19556 if (p->heredoc_indent > p->heredoc_line_indent) {
19557 p->heredoc_indent = p->heredoc_line_indent;
19558 }
19559 p->heredoc_line_indent = -1;
19560 }
19561 else {
19562 /* Whitespace only line has no indentation */
19563 p->heredoc_line_indent = 0;
19564 }
19565 }
19566 return FALSE;
19567}
19568
19569static void
19570parser_mixed_error(struct parser_params *p, rb_encoding *enc1, rb_encoding *enc2)
19571{
19572 YYLTYPE loc = RUBY_INIT_YYLLOC();
19573 const char *n1 = rb_enc_name(enc1), *n2 = rb_enc_name(enc2);
19574 compile_error(p, "%s mixed within %s source", n1, n2);
19575 parser_show_error_line(p, &loc);
19576}
19577
19578static void
19579parser_mixed_escape(struct parser_params *p, const char *beg, rb_encoding *enc1, rb_encoding *enc2)
19580{
19581 const char *pos = p->lex.pcur;
19582 p->lex.pcur = beg;
19583 parser_mixed_error(p, enc1, enc2);
19584 p->lex.pcur = pos;
19585}
19586
19587static inline char
19588nibble_char_upper(unsigned int c)
19589{
19590 c &= 0xf;
19591 return c + (c < 10 ? '0' : 'A' - 10);
19592}
19593
19594static int
19595tokadd_string(struct parser_params *p,
19596 int func, int term, int paren, long *nest,
19597 rb_encoding **encp, rb_encoding **enc)
19598{
19599 int c;
19600 bool erred = false;
19601#ifdef RIPPER
19602 const int heredoc_end = (p->heredoc_end ? p->heredoc_end + 1 : 0);
19603 int top_of_line = FALSE;
19604#endif
19605
19606#define mixed_error(enc1, enc2) \
19607 (void)(erred || (parser_mixed_error(p, enc1, enc2), erred = true))
19608#define mixed_escape(beg, enc1, enc2) \
19609 (void)(erred || (parser_mixed_escape(p, beg, enc1, enc2), erred = true))
19610
19611 while ((c = nextc(p)) != -1) {
19612 if (p->heredoc_indent > 0) {
19613 parser_update_heredoc_indent(p, c);
19614 }
19615#ifdef RIPPER
19616 if (top_of_line && heredoc_end == p->ruby_sourceline) {
19617 pushback(p, c);
19618 break;
19619 }
19620#endif
19621
19622 if (paren && c == paren) {
19623 ++*nest;
19624 }
19625 else if (c == term) {
19626 if (!nest || !*nest) {
19627 pushback(p, c);
19628 break;
19629 }
19630 --*nest;
19631 }
19632 else if ((func & STR_FUNC_EXPAND) && c == '#' && !lex_eol_p(p)) {
19633 unsigned char c2 = *p->lex.pcur;
19634 if (c2 == '$' || c2 == '@' || c2 == '{') {
19635 pushback(p, c);
19636 break;
19637 }
19638 }
19639 else if (c == '\\') {
19640 c = nextc(p);
19641 switch (c) {
19642 case '\n':
19643 if (func & STR_FUNC_QWORDS) break;
19644 if (func & STR_FUNC_EXPAND) {
19645 if (!(func & STR_FUNC_INDENT) || (p->heredoc_indent < 0))
19646 continue;
19647 if (c == term) {
19648 c = '\\';
19649 goto terminate;
19650 }
19651 }
19652 tokadd(p, '\\');
19653 break;
19654
19655 case '\\':
19656 if (func & STR_FUNC_ESCAPE) tokadd(p, c);
19657 break;
19658
19659 case 'u':
19660 if ((func & STR_FUNC_EXPAND) == 0) {
19661 tokadd(p, '\\');
19662 break;
19663 }
19664 tokadd_utf8(p, enc, term,
19665 func & STR_FUNC_SYMBOL,
19666 func & STR_FUNC_REGEXP);
19667 continue;
19668
19669 default:
19670 if (c == -1) return -1;
19671 if (!ISASCII(c)) {
19672 if ((func & STR_FUNC_EXPAND) == 0) tokadd(p, '\\');
19673 goto non_ascii;
19674 }
19675 if (func & STR_FUNC_REGEXP) {
19676 switch (c) {
19677 case 'c':
19678 case 'C':
19679 case 'M': {
19680 pushback(p, c);
19681 c = read_escape(p, 0, p->lex.pcur - 1);
19682
19683 char *t = tokspace(p, rb_strlen_lit("\\x00"));
19684 *t++ = '\\';
19685 *t++ = 'x';
19686 *t++ = nibble_char_upper(c >> 4);
19687 *t++ = nibble_char_upper(c);
19688 continue;
19689 }
19690 }
19691
19692 if (c == term && !simple_re_meta(c)) {
19693 tokadd(p, c);
19694 continue;
19695 }
19696 pushback(p, c);
19697 if ((c = tokadd_escape(p)) < 0)
19698 return -1;
19699 if (*enc && *enc != *encp) {
19700 mixed_escape(p->lex.ptok+2, *enc, *encp);
19701 }
19702 continue;
19703 }
19704 else if (func & STR_FUNC_EXPAND) {
19705 pushback(p, c);
19706 if (func & STR_FUNC_ESCAPE) tokadd(p, '\\');
19707 c = read_escape(p, 0, p->lex.pcur - 1);
19708 }
19709 else if ((func & STR_FUNC_QWORDS) && ISSPACE(c)) {
19710 /* ignore backslashed spaces in %w */
19711 }
19712 else if (c != term && !(paren && c == paren)) {
19713 tokadd(p, '\\');
19714 pushback(p, c);
19715 continue;
19716 }
19717 }
19718 }
19719 else if (!parser_isascii(p)) {
19720 non_ascii:
19721 if (!*enc) {
19722 *enc = *encp;
19723 }
19724 else if (*enc != *encp) {
19725 mixed_error(*enc, *encp);
19726 continue;
19727 }
19728 if (tokadd_mbchar(p, c) == -1) return -1;
19729 continue;
19730 }
19731 else if ((func & STR_FUNC_QWORDS) && ISSPACE(c)) {
19732 pushback(p, c);
19733 break;
19734 }
19735 if (c & 0x80) {
19736 if (!*enc) {
19737 *enc = *encp;
19738 }
19739 else if (*enc != *encp) {
19740 mixed_error(*enc, *encp);
19741 continue;
19742 }
19743 }
19744 tokadd(p, c);
19745#ifdef RIPPER
19746 top_of_line = (c == '\n');
19747#endif
19748 }
19749 terminate:
19750 if (*enc) *encp = *enc;
19751 return c;
19752}
19753
19754#define NEW_STRTERM(func, term, paren) new_strterm(p, func, term, paren)
19755
19756static void
19757flush_string_content(struct parser_params *p, rb_encoding *enc, size_t back)
19758{
19759 p->lex.pcur -= back;
19760 if (has_delayed_token(p)) {
19761 ptrdiff_t len = p->lex.pcur - p->lex.ptok;
19762 if (len > 0) {
19763 rb_parser_enc_str_buf_cat(p, p->delayed.token, p->lex.ptok, len, enc);
19764 p->delayed.end_line = p->ruby_sourceline;
19765 p->delayed.end_col = rb_long2int(p->lex.pcur - p->lex.pbeg);
19766 }
19767 dispatch_delayed_token(p, tSTRING_CONTENT);
19768 p->lex.ptok = p->lex.pcur;
19769 }
19770 dispatch_scan_event(p, tSTRING_CONTENT);
19771 p->lex.pcur += back;
19772}
19773
19774/* this can be shared with ripper, since it's independent from struct
19775 * parser_params. */
19776#ifndef RIPPER
19777#define BIT(c, idx) (((c) / 32 - 1 == idx) ? (1U << ((c) % 32)) : 0)
19778#define SPECIAL_PUNCT(idx) ( \
19779 BIT('~', idx) | BIT('*', idx) | BIT('$', idx) | BIT('?', idx) | \
19780 BIT('!', idx) | BIT('@', idx) | BIT('/', idx) | BIT('\\', idx) | \
19781 BIT(';', idx) | BIT(',', idx) | BIT('.', idx) | BIT('=', idx) | \
19782 BIT(':', idx) | BIT('<', idx) | BIT('>', idx) | BIT('\"', idx) | \
19783 BIT('&', idx) | BIT('`', idx) | BIT('\'', idx) | BIT('+', idx) | \
19784 BIT('0', idx))
19785const uint_least32_t ruby_global_name_punct_bits[] = {
19786 SPECIAL_PUNCT(0),
19787 SPECIAL_PUNCT(1),
19788 SPECIAL_PUNCT(2),
19789};
19790#undef BIT
19791#undef SPECIAL_PUNCT
19792#endif
19793
19794static enum yytokentype
19795parser_peek_variable_name(struct parser_params *p)
19796{
19797 int c;
19798 const char *ptr = p->lex.pcur;
19799
19800 if (lex_eol_ptr_n_p(p, ptr, 1)) return 0;
19801 c = *ptr++;
19802 switch (c) {
19803 case '$':
19804 if ((c = *ptr) == '-') {
19805 if (lex_eol_ptr_p(p, ++ptr)) return 0;
19806 c = *ptr;
19807 }
19808 else if (is_global_name_punct(c) || ISDIGIT(c)) {
19809 return tSTRING_DVAR;
19810 }
19811 break;
19812 case '@':
19813 if ((c = *ptr) == '@') {
19814 if (lex_eol_ptr_p(p, ++ptr)) return 0;
19815 c = *ptr;
19816 }
19817 break;
19818 case '{':
19819 p->lex.pcur = ptr;
19820 p->command_start = TRUE;
19821 yylval.state = p->lex.state;
19822 return tSTRING_DBEG;
19823 default:
19824 return 0;
19825 }
19826 if (!ISASCII(c) || c == '_' || ISALPHA(c))
19827 return tSTRING_DVAR;
19828 return 0;
19829}
19830
19831#define IS_ARG() IS_lex_state(EXPR_ARG_ANY)
19832#define IS_END() IS_lex_state(EXPR_END_ANY)
19833#define IS_BEG() (IS_lex_state(EXPR_BEG_ANY) || IS_lex_state_all(EXPR_ARG|EXPR_LABELED))
19834#define IS_SPCARG(c) (IS_ARG() && space_seen && !ISSPACE(c))
19835#define IS_LABEL_POSSIBLE() (\
19836 (IS_lex_state(EXPR_LABEL|EXPR_ENDFN) && !cmd_state) || \
19837 IS_ARG())
19838#define IS_LABEL_SUFFIX(n) (peek_n(p, ':',(n)) && !peek_n(p, ':', (n)+1))
19839#define IS_AFTER_OPERATOR() IS_lex_state(EXPR_FNAME | EXPR_DOT)
19840
19841static inline enum yytokentype
19842parser_string_term(struct parser_params *p, int func)
19843{
19844 xfree(p->lex.strterm);
19845 p->lex.strterm = 0;
19846 if (func & STR_FUNC_REGEXP) {
19847 set_yylval_num(regx_options(p));
19848 dispatch_scan_event(p, tREGEXP_END);
19849 SET_LEX_STATE(EXPR_END);
19850 return tREGEXP_END;
19851 }
19852 if ((func & STR_FUNC_LABEL) && IS_LABEL_SUFFIX(0)) {
19853 nextc(p);
19854 SET_LEX_STATE(EXPR_ARG|EXPR_LABELED);
19855 return tLABEL_END;
19856 }
19857 SET_LEX_STATE(EXPR_END);
19858 return tSTRING_END;
19859}
19860
19861static enum yytokentype
19862parse_string(struct parser_params *p, rb_strterm_literal_t *quote)
19863{
19864 int func = quote->func;
19865 int term = quote->term;
19866 int paren = quote->paren;
19867 int c, space = 0;
19868 rb_encoding *enc = p->enc;
19869 rb_encoding *base_enc = 0;
19870 rb_parser_string_t *lit;
19871
19872 if (func & STR_FUNC_TERM) {
19873 if (func & STR_FUNC_QWORDS) nextc(p); /* delayed term */
19874 SET_LEX_STATE(EXPR_END);
19875 xfree(p->lex.strterm);
19876 p->lex.strterm = 0;
19877 return func & STR_FUNC_REGEXP ? tREGEXP_END : tSTRING_END;
19878 }
19879 c = nextc(p);
19880 if ((func & STR_FUNC_QWORDS) && ISSPACE(c)) {
19881 while (c != '\n' && ISSPACE(c = nextc(p)));
19882 space = 1;
19883 }
19884 if (func & STR_FUNC_LIST) {
19885 quote->func &= ~STR_FUNC_LIST;
19886 space = 1;
19887 }
19888 if (c == term && !quote->nest) {
19889 if (func & STR_FUNC_QWORDS) {
19890 quote->func |= STR_FUNC_TERM;
19891 pushback(p, c); /* dispatch the term at tSTRING_END */
19892 add_delayed_token(p, p->lex.ptok, p->lex.pcur);
19893 return ' ';
19894 }
19895 return parser_string_term(p, func);
19896 }
19897 if (space) {
19898 if (!ISSPACE(c)) pushback(p, c);
19899 add_delayed_token(p, p->lex.ptok, p->lex.pcur);
19900 return ' ';
19901 }
19902 newtok(p);
19903 if ((func & STR_FUNC_EXPAND) && c == '#') {
19904 enum yytokentype t = parser_peek_variable_name(p);
19905 if (t) return t;
19906 tokadd(p, '#');
19907 c = nextc(p);
19908 }
19909 pushback(p, c);
19910 if (tokadd_string(p, func, term, paren, &quote->nest,
19911 &enc, &base_enc) == -1) {
19912 if (p->eofp) {
19913#ifndef RIPPER
19914# define unterminated_literal(mesg) yyerror0(mesg)
19915#else
19916# define unterminated_literal(mesg) compile_error(p, mesg)
19917#endif
19918 literal_flush(p, p->lex.pcur);
19919 if (func & STR_FUNC_QWORDS) {
19920 /* no content to add, bailing out here */
19921 unterminated_literal("unterminated list meets end of file");
19922 xfree(p->lex.strterm);
19923 p->lex.strterm = 0;
19924 return tSTRING_END;
19925 }
19926 if (func & STR_FUNC_REGEXP) {
19927 unterminated_literal("unterminated regexp meets end of file");
19928 }
19929 else {
19930 unterminated_literal("unterminated string meets end of file");
19931 }
19932 quote->func |= STR_FUNC_TERM;
19933 }
19934 }
19935
19936 tokfix(p);
19937 lit = STR_NEW3(tok(p), toklen(p), enc, func);
19938 set_yylval_str(lit);
19939 flush_string_content(p, enc, 0);
19940
19941 return tSTRING_CONTENT;
19942}
19943
19944static enum yytokentype
19945heredoc_identifier(struct parser_params *p)
19946{
19947 /*
19948 * term_len is length of `<<"END"` except `END`,
19949 * in this case term_len is 4 (<, <, " and ").
19950 */
19951 long len, offset = p->lex.pcur - p->lex.pbeg;
19952 int c = nextc(p), term, func = 0, quote = 0;
19953 enum yytokentype token = tSTRING_BEG;
19954 int indent = 0;
19955
19956 if (c == '-') {
19957 c = nextc(p);
19958 func = STR_FUNC_INDENT;
19959 offset++;
19960 }
19961 else if (c == '~') {
19962 c = nextc(p);
19963 func = STR_FUNC_INDENT;
19964 offset++;
19965 indent = INT_MAX;
19966 }
19967 switch (c) {
19968 case '\'':
19969 func |= str_squote; goto quoted;
19970 case '"':
19971 func |= str_dquote; goto quoted;
19972 case '`':
19973 token = tXSTRING_BEG;
19974 func |= str_xquote; goto quoted;
19975
19976 quoted:
19977 quote++;
19978 offset++;
19979 term = c;
19980 len = 0;
19981 while ((c = nextc(p)) != term) {
19982 if (c == -1 || c == '\r' || c == '\n') {
19983 yyerror0("unterminated here document identifier");
19984 return -1;
19985 }
19986 }
19987 break;
19988
19989 default:
19990 if (!parser_is_identchar(p)) {
19991 pushback(p, c);
19992 if (func & STR_FUNC_INDENT) {
19993 pushback(p, indent > 0 ? '~' : '-');
19994 }
19995 return 0;
19996 }
19997 func |= str_dquote;
19998 do {
19999 int n = parser_precise_mbclen(p, p->lex.pcur-1);
20000 if (n < 0) return 0;
20001 p->lex.pcur += --n;
20002 } while ((c = nextc(p)) != -1 && parser_is_identchar(p));
20003 pushback(p, c);
20004 break;
20005 }
20006
20007 len = p->lex.pcur - (p->lex.pbeg + offset) - quote;
20008 if ((unsigned long)len >= HERETERM_LENGTH_MAX)
20009 yyerror0("too long here document identifier");
20010 dispatch_scan_event(p, tHEREDOC_BEG);
20011 lex_goto_eol(p);
20012
20013 p->lex.strterm = new_heredoc(p);
20014 rb_strterm_heredoc_t *here = &p->lex.strterm->u.heredoc;
20015 here->offset = offset;
20016 here->sourceline = p->ruby_sourceline;
20017 here->length = (unsigned)len;
20018 here->quote = quote;
20019 here->func = func;
20020 here->lastline = p->lex.lastline;
20021
20022 token_flush(p);
20023 p->heredoc_indent = indent;
20024 p->heredoc_line_indent = 0;
20025 return token;
20026}
20027
20028static void
20029heredoc_restore(struct parser_params *p, rb_strterm_heredoc_t *here)
20030{
20031 rb_parser_string_t *line;
20032 rb_strterm_t *term = p->lex.strterm;
20033
20034 p->lex.strterm = 0;
20035 line = here->lastline;
20036 p->lex.lastline = line;
20037 p->lex.pbeg = PARSER_STRING_PTR(line);
20038 p->lex.pend = p->lex.pbeg + PARSER_STRING_LEN(line);
20039 p->lex.pcur = p->lex.pbeg + here->offset + here->length + here->quote;
20040 p->lex.ptok = p->lex.pbeg + here->offset - here->quote;
20041 p->heredoc_end = p->ruby_sourceline;
20042 p->ruby_sourceline = (int)here->sourceline;
20043 if (p->eofp) p->lex.nextline = AFTER_HEREDOC_WITHOUT_TERMINATOR;
20044 p->eofp = 0;
20045 xfree(term);
20046}
20047
20048static int
20049dedent_string_column(const char *str, long len, int width)
20050{
20051 int i, col = 0;
20052
20053 for (i = 0; i < len && col < width; i++) {
20054 if (str[i] == ' ') {
20055 col++;
20056 }
20057 else if (str[i] == '\t') {
20058 int n = TAB_WIDTH * (col / TAB_WIDTH + 1);
20059 if (n > width) break;
20060 col = n;
20061 }
20062 else {
20063 break;
20064 }
20065 }
20066
20067 return i;
20068}
20069
20070static int
20071dedent_string(struct parser_params *p, rb_parser_string_t *string, int width)
20072{
20073 char *str;
20074 long len;
20075 int i;
20076
20077 len = PARSER_STRING_LEN(string);
20078 str = PARSER_STRING_PTR(string);
20079
20080 i = dedent_string_column(str, len, width);
20081 if (!i) return 0;
20082
20083 rb_parser_str_modify(string);
20084 str = PARSER_STRING_PTR(string);
20085 if (PARSER_STRING_LEN(string) != len)
20086 rb_fatal("literal string changed: %s", PARSER_STRING_PTR(string));
20087 MEMMOVE(str, str + i, char, len - i);
20088 rb_parser_str_set_len(p, string, len - i);
20089 return i;
20090}
20091
20092static NODE *
20093heredoc_dedent(struct parser_params *p, NODE *root)
20094{
20095 NODE *node, *str_node, *prev_node;
20096 int indent = p->heredoc_indent;
20097 rb_parser_string_t *prev_lit = 0;
20098
20099 if (indent <= 0) return root;
20100 if (!root) return root;
20101
20102 prev_node = node = str_node = root;
20103 if (nd_type_p(root, NODE_LIST)) str_node = RNODE_LIST(root)->nd_head;
20104
20105 while (str_node) {
20106 rb_parser_string_t *lit = RNODE_STR(str_node)->string;
20107 if (nd_fl_newline(str_node)) {
20108 dedent_string(p, lit, indent);
20109 }
20110 if (!prev_lit) {
20111 prev_lit = lit;
20112 }
20113 else if (!literal_concat0(p, prev_lit, lit)) {
20114 return 0;
20115 }
20116 else {
20117 NODE *end = RNODE_LIST(node)->as.nd_end;
20118 node = RNODE_LIST(prev_node)->nd_next = RNODE_LIST(node)->nd_next;
20119 if (!node) {
20120 if (nd_type_p(prev_node, NODE_DSTR))
20121 nd_set_type(prev_node, NODE_STR);
20122 break;
20123 }
20124 RNODE_LIST(node)->as.nd_end = end;
20125 goto next_str;
20126 }
20127
20128 str_node = 0;
20129 while ((nd_type_p(node, NODE_LIST) || nd_type_p(node, NODE_DSTR)) && (node = RNODE_LIST(prev_node = node)->nd_next) != 0) {
20130 next_str:
20131 if (!nd_type_p(node, NODE_LIST)) break;
20132 if ((str_node = RNODE_LIST(node)->nd_head) != 0) {
20133 enum node_type type = nd_type(str_node);
20134 if (type == NODE_STR || type == NODE_DSTR) break;
20135 prev_lit = 0;
20136 str_node = 0;
20137 }
20138 }
20139 }
20140 return root;
20141}
20142
20143static int
20144whole_match_p(struct parser_params *p, const char *eos, long len, int indent)
20145{
20146 const char *beg = p->lex.pbeg;
20147 const char *ptr = p->lex.pend;
20148
20149 if (ptr - beg < len) return FALSE;
20150 if (ptr > beg && ptr[-1] == '\n') {
20151 if (--ptr > beg && ptr[-1] == '\r') --ptr;
20152 if (ptr - beg < len) return FALSE;
20153 }
20154 if (strncmp(eos, ptr -= len, len)) return FALSE;
20155 if (indent) {
20156 while (beg < ptr && ISSPACE(*beg)) beg++;
20157 }
20158 return beg == ptr;
20159}
20160
20161static int
20162word_match_p(struct parser_params *p, const char *word, long len)
20163{
20164 if (strncmp(p->lex.pcur, word, len)) return 0;
20165 if (lex_eol_n_p(p, len)) return 1;
20166 int c = (unsigned char)p->lex.pcur[len];
20167 if (ISSPACE(c)) return 1;
20168 switch (c) {
20169 case '\0': case '\004': case '\032': return 1;
20170 }
20171 return 0;
20172}
20173
20174#define NUM_SUFFIX_R (1<<0)
20175#define NUM_SUFFIX_I (1<<1)
20176#define NUM_SUFFIX_ALL 3
20177
20178static int
20179number_literal_suffix(struct parser_params *p, int mask)
20180{
20181 int c, result = 0;
20182 const char *lastp = p->lex.pcur;
20183
20184 while ((c = nextc(p)) != -1) {
20185 if ((mask & NUM_SUFFIX_I) && c == 'i') {
20186 result |= (mask & NUM_SUFFIX_I);
20187 mask &= ~NUM_SUFFIX_I;
20188 /* r after i, rational of complex is disallowed */
20189 mask &= ~NUM_SUFFIX_R;
20190 continue;
20191 }
20192 if ((mask & NUM_SUFFIX_R) && c == 'r') {
20193 result |= (mask & NUM_SUFFIX_R);
20194 mask &= ~NUM_SUFFIX_R;
20195 continue;
20196 }
20197 if (!ISASCII(c) || ISALPHA(c) || c == '_') {
20198 p->lex.pcur = lastp;
20199 literal_flush(p, p->lex.pcur);
20200 return 0;
20201 }
20202 pushback(p, c);
20203 break;
20204 }
20205 return result;
20206}
20207
20208static enum yytokentype
20209set_number_literal(struct parser_params *p, enum yytokentype type, int suffix, int base, int seen_point)
20210{
20211 enum rb_numeric_type numeric_type = integer_literal;
20212
20213 if (type == tFLOAT) {
20214 numeric_type = float_literal;
20215 }
20216
20217 if (suffix & NUM_SUFFIX_R) {
20218 type = tRATIONAL;
20219 numeric_type = rational_literal;
20220 }
20221 if (suffix & NUM_SUFFIX_I) {
20222 type = tIMAGINARY;
20223 }
20224
20225 switch (type) {
20226 case tINTEGER:
20227 set_yylval_node(NEW_INTEGER(strdup(tok(p)), base, &_cur_loc));
20228 break;
20229 case tFLOAT:
20230 set_yylval_node(NEW_FLOAT(strdup(tok(p)), &_cur_loc));
20231 break;
20232 case tRATIONAL:
20233 set_yylval_node(NEW_RATIONAL(strdup(tok(p)), base, seen_point, &_cur_loc));
20234 break;
20235 case tIMAGINARY:
20236 set_yylval_node(NEW_IMAGINARY(strdup(tok(p)), base, seen_point, numeric_type, &_cur_loc));
20237 (void)numeric_type; /* for ripper */
20238 break;
20239 default:
20240 rb_bug("unexpected token: %d", type);
20241 }
20242 SET_LEX_STATE(EXPR_END);
20243 return type;
20244}
20245
20246#define dispatch_heredoc_end(p) parser_dispatch_heredoc_end(p, __LINE__)
20247static void
20248parser_dispatch_heredoc_end(struct parser_params *p, int line)
20249{
20250 if (has_delayed_token(p))
20251 dispatch_delayed_token(p, tSTRING_CONTENT);
20252
20253#ifdef RIPPER
20254 VALUE str = STR_NEW(p->lex.ptok, p->lex.pend - p->lex.ptok);
20255 ripper_dispatch1(p, ripper_token2eventid(tHEREDOC_END), str);
20256#else
20257 if (p->keep_tokens) {
20258 rb_parser_string_t *str = rb_parser_encoding_string_new(p, p->lex.ptok, p->lex.pend - p->lex.ptok, p->enc);
20259 RUBY_SET_YYLLOC_OF_HEREDOC_END(*p->yylloc);
20260 parser_append_tokens(p, str, tHEREDOC_END, line);
20261 }
20262#endif
20263
20264 RUBY_SET_YYLLOC_FROM_STRTERM_HEREDOC(*p->yylloc);
20265 lex_goto_eol(p);
20266 token_flush(p);
20267}
20268
20269static enum yytokentype
20270here_document(struct parser_params *p, rb_strterm_heredoc_t *here)
20271{
20272 int c, func, indent = 0;
20273 const char *eos, *ptr, *ptr_end;
20274 long len;
20275 rb_parser_string_t *str = 0;
20276 rb_encoding *enc = p->enc;
20277 rb_encoding *base_enc = 0;
20278 int bol;
20279#ifdef RIPPER
20280 VALUE s_value;
20281#endif
20282
20283 eos = PARSER_STRING_PTR(here->lastline) + here->offset;
20284 len = here->length;
20285 indent = (func = here->func) & STR_FUNC_INDENT;
20286
20287 if ((c = nextc(p)) == -1) {
20288 error:
20289#ifdef RIPPER
20290 if (!has_delayed_token(p)) {
20291 dispatch_scan_event(p, tSTRING_CONTENT);
20292 }
20293 else if (p->delayed.end_line + 1 == p->ruby_sourceline) {
20294 if ((len = p->lex.pcur - p->lex.ptok) > 0) {
20295 if (!(func & STR_FUNC_REGEXP)) {
20296 int cr = ENC_CODERANGE_UNKNOWN;
20297 rb_str_coderange_scan_restartable(p->lex.ptok, p->lex.pcur, enc, &cr);
20298 if (cr != ENC_CODERANGE_7BIT &&
20299 rb_is_usascii_enc(p->enc) &&
20300 enc != rb_utf8_encoding()) {
20301 enc = rb_ascii8bit_encoding();
20302 }
20303 }
20304 rb_parser_enc_str_buf_cat(p, p->delayed.token, p->lex.ptok, len, enc);
20305 }
20306 dispatch_delayed_token(p, tSTRING_CONTENT);
20307 }
20308 else {
20309 dispatch_delayed_token(p, tSTRING_CONTENT);
20310 dispatch_scan_event(p, tSTRING_CONTENT);
20311 }
20312 lex_goto_eol(p);
20313#endif
20314 heredoc_restore(p, &p->lex.strterm->u.heredoc);
20315 compile_error(p, "can't find string \"%.*s\" anywhere before EOF",
20316 (int)len, eos);
20317 token_flush(p);
20318 SET_LEX_STATE(EXPR_END);
20319 return tSTRING_END;
20320 }
20321 bol = was_bol(p);
20322 if (!bol) {
20323 /* not beginning of line, cannot be the terminator */
20324 }
20325 else if (p->heredoc_line_indent == -1) {
20326 /* `heredoc_line_indent == -1` means
20327 * - "after an interpolation in the same line", or
20328 * - "in a continuing line"
20329 */
20330 p->heredoc_line_indent = 0;
20331 }
20332 else if (whole_match_p(p, eos, len, indent)) {
20333 dispatch_heredoc_end(p);
20334 restore:
20335 heredoc_restore(p, &p->lex.strterm->u.heredoc);
20336 token_flush(p);
20337 SET_LEX_STATE(EXPR_END);
20338 return tSTRING_END;
20339 }
20340
20341 if (!(func & STR_FUNC_EXPAND)) {
20342 do {
20343 ptr = PARSER_STRING_PTR(p->lex.lastline);
20344 ptr_end = p->lex.pend;
20345 if (ptr_end > ptr) {
20346 switch (ptr_end[-1]) {
20347 case '\n':
20348 if (--ptr_end == ptr || ptr_end[-1] != '\r') {
20349 ptr_end++;
20350 break;
20351 }
20352 case '\r':
20353 --ptr_end;
20354 }
20355 }
20356
20357 if (p->heredoc_indent > 0) {
20358 long i = 0;
20359 while (ptr + i < ptr_end && parser_update_heredoc_indent(p, ptr[i]))
20360 i++;
20361 p->heredoc_line_indent = 0;
20362 }
20363
20364 if (str)
20365 parser_str_cat(str, ptr, ptr_end - ptr);
20366 else
20367 str = rb_parser_encoding_string_new(p, ptr, ptr_end - ptr, enc);
20368 if (!lex_eol_ptr_p(p, ptr_end)) parser_str_cat_cstr(str, "\n");
20369 lex_goto_eol(p);
20370 if (p->heredoc_indent > 0) {
20371 goto flush_str;
20372 }
20373 if (nextc(p) == -1) {
20374 if (str) {
20375 rb_parser_string_free(p, str);
20376 str = 0;
20377 }
20378 goto error;
20379 }
20380 } while (!whole_match_p(p, eos, len, indent));
20381 }
20382 else {
20383 /* int mb = ENC_CODERANGE_7BIT, *mbp = &mb;*/
20384 newtok(p);
20385 if (c == '#') {
20386 enum yytokentype t = parser_peek_variable_name(p);
20387 if (p->heredoc_line_indent != -1) {
20388 if (p->heredoc_indent > p->heredoc_line_indent) {
20389 p->heredoc_indent = p->heredoc_line_indent;
20390 }
20391 p->heredoc_line_indent = -1;
20392 }
20393 if (t) return t;
20394 tokadd(p, '#');
20395 c = nextc(p);
20396 }
20397 do {
20398 pushback(p, c);
20399 enc = p->enc;
20400 if ((c = tokadd_string(p, func, '\n', 0, NULL, &enc, &base_enc)) == -1) {
20401 if (p->eofp) goto error;
20402 goto restore;
20403 }
20404 if (c != '\n') {
20405 if (c == '\\') p->heredoc_line_indent = -1;
20406 flush:
20407 str = STR_NEW3(tok(p), toklen(p), enc, func);
20408 flush_str:
20409 set_yylval_str(str);
20410#ifndef RIPPER
20411 if (bol) nd_set_fl_newline(yylval.node);
20412#endif
20413 flush_string_content(p, enc, 0);
20414 return tSTRING_CONTENT;
20415 }
20416 tokadd(p, nextc(p));
20417 if (p->heredoc_indent > 0) {
20418 lex_goto_eol(p);
20419 goto flush;
20420 }
20421 /* if (mbp && mb == ENC_CODERANGE_UNKNOWN) mbp = 0;*/
20422 if ((c = nextc(p)) == -1) goto error;
20423 } while (!whole_match_p(p, eos, len, indent));
20424 str = STR_NEW3(tok(p), toklen(p), enc, func);
20425 }
20426 dispatch_heredoc_end(p);
20427 heredoc_restore(p, &p->lex.strterm->u.heredoc);
20428 token_flush(p);
20429 p->lex.strterm = NEW_STRTERM(func | STR_FUNC_TERM, 0, 0);
20430#ifdef RIPPER
20431 /* Preserve s_value for set_yylval_str */
20432 s_value = p->s_value;
20433#endif
20434 set_yylval_str(str);
20435#ifdef RIPPER
20436 set_parser_s_value(s_value);
20437#endif
20438
20439#ifndef RIPPER
20440 if (bol) nd_set_fl_newline(yylval.node);
20441#endif
20442 return tSTRING_CONTENT;
20443}
20444
20445#include "lex.c"
20446
20447static int
20448arg_ambiguous(struct parser_params *p, char c)
20449{
20450#ifndef RIPPER
20451 if (c == '/') {
20452 rb_warning1("ambiguity between regexp and two divisions: wrap regexp in parentheses or add a space after '%c' operator", WARN_I(c));
20453 }
20454 else {
20455 rb_warning1("ambiguous first argument; put parentheses or a space even after '%c' operator", WARN_I(c));
20456 }
20457#else
20458 dispatch1(arg_ambiguous, rb_usascii_str_new(&c, 1));
20459#endif
20460 return TRUE;
20461}
20462
20463/* returns true value if formal argument error;
20464 * Qtrue, or error message if ripper */
20465static VALUE
20466formal_argument_error(struct parser_params *p, ID id)
20467{
20468 switch (id_type(id)) {
20469 case ID_LOCAL:
20470 break;
20471#ifndef RIPPER
20472# define ERR(mesg) (yyerror0(mesg), Qtrue)
20473#else
20474# define ERR(mesg) WARN_S(mesg)
20475#endif
20476 case ID_CONST:
20477 return ERR("formal argument cannot be a constant");
20478 case ID_INSTANCE:
20479 return ERR("formal argument cannot be an instance variable");
20480 case ID_GLOBAL:
20481 return ERR("formal argument cannot be a global variable");
20482 case ID_CLASS:
20483 return ERR("formal argument cannot be a class variable");
20484 default:
20485 return ERR("formal argument must be local variable");
20486#undef ERR
20487 }
20488 shadowing_lvar(p, id);
20489
20490 return Qfalse;
20491}
20492
20493static int
20494lvar_defined(struct parser_params *p, ID id)
20495{
20496 return (dyna_in_block(p) && dvar_defined(p, id)) || local_id(p, id);
20497}
20498
20499/* emacsen -*- hack */
20500static long
20501parser_encode_length(struct parser_params *p, const char *name, long len)
20502{
20503 long nlen;
20504
20505 if (len > 5 && name[nlen = len - 5] == '-') {
20506 if (rb_memcicmp(name + nlen + 1, "unix", 4) == 0)
20507 return nlen;
20508 }
20509 if (len > 4 && name[nlen = len - 4] == '-') {
20510 if (rb_memcicmp(name + nlen + 1, "dos", 3) == 0)
20511 return nlen;
20512 if (rb_memcicmp(name + nlen + 1, "mac", 3) == 0 &&
20513 !(len == 8 && rb_memcicmp(name, "utf8-mac", len) == 0))
20514 /* exclude UTF8-MAC because the encoding named "UTF8" doesn't exist in Ruby */
20515 return nlen;
20516 }
20517 return len;
20518}
20519
20520static void
20521parser_set_encode(struct parser_params *p, const char *name)
20522{
20523 rb_encoding *enc;
20524 VALUE excargs[3];
20525 int idx = 0;
20526
20527 const char *wrong = 0;
20528 switch (*name) {
20529 case 'e': case 'E': wrong = "external"; break;
20530 case 'i': case 'I': wrong = "internal"; break;
20531 case 'f': case 'F': wrong = "filesystem"; break;
20532 case 'l': case 'L': wrong = "locale"; break;
20533 }
20534 if (wrong && STRCASECMP(name, wrong) == 0) goto unknown;
20535 idx = rb_enc_find_index(name);
20536 if (idx < 0) {
20537 unknown:
20538 excargs[1] = rb_sprintf("unknown encoding name: %s", name);
20539 error:
20540 excargs[0] = rb_eArgError;
20541 excargs[2] = rb_make_backtrace();
20542 rb_ary_unshift(excargs[2], rb_sprintf("%"PRIsVALUE":%d", p->ruby_sourcefile_string, p->ruby_sourceline));
20543 VALUE exc = rb_make_exception(3, excargs);
20544 ruby_show_error_line(p, exc, &(YYLTYPE)RUBY_INIT_YYLLOC(), p->ruby_sourceline, p->lex.lastline);
20545
20546 rb_ast_free(p->ast);
20547 p->ast = NULL;
20548
20549 rb_exc_raise(exc);
20550 }
20551 enc = rb_enc_from_index(idx);
20552 if (!rb_enc_asciicompat(enc)) {
20553 excargs[1] = rb_sprintf("%s is not ASCII compatible", rb_enc_name(enc));
20554 goto error;
20555 }
20556 p->enc = enc;
20557#ifndef RIPPER
20558 if (p->debug_lines) {
20559 long i;
20560 for (i = 0; i < p->debug_lines->len; i++) {
20561 rb_parser_enc_associate(p, p->debug_lines->data[i], enc);
20562 }
20563 }
20564#endif
20565}
20566
20567static bool
20568comment_at_top(struct parser_params *p)
20569{
20570 if (p->token_seen) return false;
20571 return (p->line_count == (p->has_shebang ? 2 : 1));
20572}
20573
20574typedef long (*rb_magic_comment_length_t)(struct parser_params *p, const char *name, long len);
20575typedef void (*rb_magic_comment_setter_t)(struct parser_params *p, const char *name, const char *val);
20576
20577static int parser_invalid_pragma_value(struct parser_params *p, const char *name, const char *val);
20578
20579static void
20580magic_comment_encoding(struct parser_params *p, const char *name, const char *val)
20581{
20582 if (!comment_at_top(p)) {
20583 return;
20584 }
20585 parser_set_encode(p, val);
20586}
20587
20588static int
20589parser_get_bool(struct parser_params *p, const char *name, const char *val)
20590{
20591 switch (*val) {
20592 case 't': case 'T':
20593 if (STRCASECMP(val, "true") == 0) {
20594 return TRUE;
20595 }
20596 break;
20597 case 'f': case 'F':
20598 if (STRCASECMP(val, "false") == 0) {
20599 return FALSE;
20600 }
20601 break;
20602 }
20603 return parser_invalid_pragma_value(p, name, val);
20604}
20605
20606static int
20607parser_invalid_pragma_value(struct parser_params *p, const char *name, const char *val)
20608{
20609 rb_warning2("invalid value for %s: %s", WARN_S(name), WARN_S(val));
20610 return -1;
20611}
20612
20613static void
20614parser_set_token_info(struct parser_params *p, const char *name, const char *val)
20615{
20616 int b = parser_get_bool(p, name, val);
20617 if (b >= 0) p->token_info_enabled = b;
20618}
20619
20620static void
20621parser_set_frozen_string_literal(struct parser_params *p, const char *name, const char *val)
20622{
20623 int b;
20624
20625 if (p->token_seen) {
20626 rb_warning1("'%s' is ignored after any tokens", WARN_S(name));
20627 return;
20628 }
20629
20630 b = parser_get_bool(p, name, val);
20631 if (b < 0) return;
20632
20633 p->frozen_string_literal = b;
20634}
20635
20636static void
20637parser_set_shareable_constant_value(struct parser_params *p, const char *name, const char *val)
20638{
20639 for (const char *s = p->lex.pbeg, *e = p->lex.pcur; s < e; ++s) {
20640 if (*s == ' ' || *s == '\t') continue;
20641 if (*s == '#') break;
20642 rb_warning1("'%s' is ignored unless in comment-only line", WARN_S(name));
20643 return;
20644 }
20645
20646 switch (*val) {
20647 case 'n': case 'N':
20648 if (STRCASECMP(val, "none") == 0) {
20649 p->ctxt.shareable_constant_value = rb_parser_shareable_none;
20650 return;
20651 }
20652 break;
20653 case 'l': case 'L':
20654 if (STRCASECMP(val, "literal") == 0) {
20655 p->ctxt.shareable_constant_value = rb_parser_shareable_literal;
20656 return;
20657 }
20658 break;
20659 case 'e': case 'E':
20660 if (STRCASECMP(val, "experimental_copy") == 0) {
20661 p->ctxt.shareable_constant_value = rb_parser_shareable_copy;
20662 return;
20663 }
20664 if (STRCASECMP(val, "experimental_everything") == 0) {
20665 p->ctxt.shareable_constant_value = rb_parser_shareable_everything;
20666 return;
20667 }
20668 break;
20669 }
20670 parser_invalid_pragma_value(p, name, val);
20671}
20672
20673# if WARN_PAST_SCOPE
20674static void
20675parser_set_past_scope(struct parser_params *p, const char *name, const char *val)
20676{
20677 int b = parser_get_bool(p, name, val);
20678 if (b >= 0) p->past_scope_enabled = b;
20679}
20680# endif
20681
20683 const char *name;
20684 rb_magic_comment_setter_t func;
20685 rb_magic_comment_length_t length;
20686};
20687
20688static const struct magic_comment magic_comments[] = {
20689 {"coding", magic_comment_encoding, parser_encode_length},
20690 {"encoding", magic_comment_encoding, parser_encode_length},
20691 {"frozen_string_literal", parser_set_frozen_string_literal},
20692 {"shareable_constant_value", parser_set_shareable_constant_value},
20693 {"warn_indent", parser_set_token_info},
20694# if WARN_PAST_SCOPE
20695 {"warn_past_scope", parser_set_past_scope},
20696# endif
20697};
20698
20699static const char *
20700magic_comment_marker(const char *str, long len)
20701{
20702 long i = 2;
20703
20704 while (i < len) {
20705 switch (str[i]) {
20706 case '-':
20707 if (str[i-1] == '*' && str[i-2] == '-') {
20708 return str + i + 1;
20709 }
20710 i += 2;
20711 break;
20712 case '*':
20713 if (i + 1 >= len) return 0;
20714 if (str[i+1] != '-') {
20715 i += 4;
20716 }
20717 else if (str[i-1] != '-') {
20718 i += 2;
20719 }
20720 else {
20721 return str + i + 2;
20722 }
20723 break;
20724 default:
20725 i += 3;
20726 break;
20727 }
20728 }
20729 return 0;
20730}
20731
20732static int
20733parser_magic_comment(struct parser_params *p, const char *str, long len)
20734{
20735 int indicator = 0;
20736 VALUE name = 0, val = 0;
20737 const char *beg, *end, *vbeg, *vend;
20738#define str_copy(_s, _p, _n) ((_s) \
20739 ? (void)(rb_str_resize((_s), (_n)), \
20740 MEMCPY(RSTRING_PTR(_s), (_p), char, (_n)), (_s)) \
20741 : (void)((_s) = STR_NEW((_p), (_n))))
20742
20743 if (len <= 7) return FALSE;
20744 if (!!(beg = magic_comment_marker(str, len))) {
20745 if (!(end = magic_comment_marker(beg, str + len - beg)))
20746 return FALSE;
20747 indicator = TRUE;
20748 str = beg;
20749 len = end - beg - 3;
20750 }
20751
20752 /* %r"([^\\s\'\":;]+)\\s*:\\s*(\"(?:\\\\.|[^\"])*\"|[^\"\\s;]+)[\\s;]*" */
20753 while (len > 0) {
20754 const struct magic_comment *mc = magic_comments;
20755 char *s;
20756 int i;
20757 long n = 0;
20758
20759 for (; len > 0 && *str; str++, --len) {
20760 switch (*str) {
20761 case '\'': case '"': case ':': case ';':
20762 continue;
20763 }
20764 if (!ISSPACE(*str)) break;
20765 }
20766 for (beg = str; len > 0; str++, --len) {
20767 switch (*str) {
20768 case '\'': case '"': case ':': case ';':
20769 break;
20770 default:
20771 if (ISSPACE(*str)) break;
20772 continue;
20773 }
20774 break;
20775 }
20776 for (end = str; len > 0 && ISSPACE(*str); str++, --len);
20777 if (!len) break;
20778 if (*str != ':') {
20779 if (!indicator) return FALSE;
20780 continue;
20781 }
20782
20783 do str++; while (--len > 0 && ISSPACE(*str));
20784 if (!len) break;
20785 const char *tok_beg = str;
20786 if (*str == '"') {
20787 for (vbeg = ++str; --len > 0 && *str != '"'; str++) {
20788 if (*str == '\\') {
20789 --len;
20790 ++str;
20791 }
20792 }
20793 vend = str;
20794 if (len) {
20795 --len;
20796 ++str;
20797 }
20798 }
20799 else {
20800 for (vbeg = str; len > 0 && *str != '"' && *str != ';' && !ISSPACE(*str); --len, str++);
20801 vend = str;
20802 }
20803 const char *tok_end = str;
20804 if (indicator) {
20805 while (len > 0 && (*str == ';' || ISSPACE(*str))) --len, str++;
20806 }
20807 else {
20808 while (len > 0 && (ISSPACE(*str))) --len, str++;
20809 if (len) return FALSE;
20810 }
20811
20812 n = end - beg;
20813 str_copy(name, beg, n);
20814 s = RSTRING_PTR(name);
20815 for (i = 0; i < n; ++i) {
20816 if (s[i] == '-') s[i] = '_';
20817 }
20818 do {
20819 if (STRNCASECMP(mc->name, s, n) == 0 && !mc->name[n]) {
20820 n = vend - vbeg;
20821 if (mc->length) {
20822 n = (*mc->length)(p, vbeg, n);
20823 }
20824 str_copy(val, vbeg, n);
20825 p->lex.ptok = tok_beg;
20826 p->lex.pcur = tok_end;
20827 (*mc->func)(p, mc->name, RSTRING_PTR(val));
20828 break;
20829 }
20830 } while (++mc < magic_comments + numberof(magic_comments));
20831#ifdef RIPPER
20832 str_copy(val, vbeg, vend - vbeg);
20833 dispatch2(magic_comment, name, val);
20834#endif
20835 }
20836
20837 return TRUE;
20838}
20839
20840static void
20841set_file_encoding(struct parser_params *p, const char *str, const char *send)
20842{
20843 int sep = 0;
20844 const char *beg = str;
20845 VALUE s;
20846
20847 for (;;) {
20848 if (send - str <= 6) return;
20849 switch (str[6]) {
20850 case 'C': case 'c': str += 6; continue;
20851 case 'O': case 'o': str += 5; continue;
20852 case 'D': case 'd': str += 4; continue;
20853 case 'I': case 'i': str += 3; continue;
20854 case 'N': case 'n': str += 2; continue;
20855 case 'G': case 'g': str += 1; continue;
20856 case '=': case ':':
20857 sep = 1;
20858 str += 6;
20859 break;
20860 default:
20861 str += 6;
20862 if (ISSPACE(*str)) break;
20863 continue;
20864 }
20865 if (STRNCASECMP(str-6, "coding", 6) == 0) break;
20866 sep = 0;
20867 }
20868 for (;;) {
20869 do {
20870 if (++str >= send) return;
20871 } while (ISSPACE(*str));
20872 if (sep) break;
20873 if (*str != '=' && *str != ':') return;
20874 sep = 1;
20875 str++;
20876 }
20877 beg = str;
20878 while ((*str == '-' || *str == '_' || ISALNUM(*str)) && ++str < send);
20879 s = rb_str_new(beg, parser_encode_length(p, beg, str - beg));
20880 p->lex.ptok = beg;
20881 p->lex.pcur = str;
20882 parser_set_encode(p, RSTRING_PTR(s));
20883 rb_str_resize(s, 0);
20884}
20885
20886static void
20887parser_prepare(struct parser_params *p)
20888{
20889 int c = nextc0(p, FALSE);
20890 p->token_info_enabled = !compile_for_eval && RTEST(ruby_verbose);
20891 switch (c) {
20892 case '#':
20893 if (peek(p, '!')) p->has_shebang = 1;
20894 break;
20895 case 0xef: /* UTF-8 BOM marker */
20896 if (!lex_eol_n_p(p, 2) &&
20897 (unsigned char)p->lex.pcur[0] == 0xbb &&
20898 (unsigned char)p->lex.pcur[1] == 0xbf) {
20899 p->enc = rb_utf8_encoding();
20900 p->lex.pcur += 2;
20901#ifndef RIPPER
20902 if (p->debug_lines) {
20903 rb_parser_string_set_encoding(p->lex.lastline, p->enc);
20904 }
20905#endif
20906 p->lex.pbeg = p->lex.pcur;
20907 token_flush(p);
20908 return;
20909 }
20910 break;
20911 case -1: /* end of script. */
20912 return;
20913 }
20914 pushback(p, c);
20915 p->enc = rb_parser_str_get_encoding(p->lex.lastline);
20916}
20917
20918#ifndef RIPPER
20919#define ambiguous_operator(tok, op, syn) ( \
20920 rb_warning0("'"op"' after local variable or literal is interpreted as binary operator"), \
20921 rb_warning0("even though it seems like "syn""))
20922#else
20923#define ambiguous_operator(tok, op, syn) \
20924 dispatch2(operator_ambiguous, TOKEN2VAL(tok), rb_str_new_cstr(syn))
20925#endif
20926#define warn_balanced(tok, op, syn) ((void) \
20927 (!IS_lex_state_for(last_state, EXPR_CLASS|EXPR_DOT|EXPR_FNAME|EXPR_ENDFN) && \
20928 space_seen && !ISSPACE(c) && \
20929 (ambiguous_operator(tok, op, syn), 0)), \
20930 (enum yytokentype)(tok))
20931
20932static enum yytokentype
20933no_digits(struct parser_params *p)
20934{
20935 yyerror0("numeric literal without digits");
20936 if (peek(p, '_')) nextc(p);
20937 /* dummy 0, for tUMINUS_NUM at numeric */
20938 return set_number_literal(p, tINTEGER, 0, 10, 0);
20939}
20940
20941static enum yytokentype
20942parse_numeric(struct parser_params *p, int c)
20943{
20944 int is_float, seen_point, seen_e, nondigit;
20945 int suffix;
20946
20947 is_float = seen_point = seen_e = nondigit = 0;
20948 SET_LEX_STATE(EXPR_END);
20949 newtok(p);
20950 if (c == '-' || c == '+') {
20951 tokadd(p, c);
20952 c = nextc(p);
20953 }
20954 if (c == '0') {
20955 int start = toklen(p);
20956 c = nextc(p);
20957 if (c == 'x' || c == 'X') {
20958 /* hexadecimal */
20959 c = nextc(p);
20960 if (c != -1 && ISXDIGIT(c)) {
20961 do {
20962 if (c == '_') {
20963 if (nondigit) break;
20964 nondigit = c;
20965 continue;
20966 }
20967 if (!ISXDIGIT(c)) break;
20968 nondigit = 0;
20969 tokadd(p, c);
20970 } while ((c = nextc(p)) != -1);
20971 }
20972 pushback(p, c);
20973 tokfix(p);
20974 if (toklen(p) == start) {
20975 return no_digits(p);
20976 }
20977 else if (nondigit) goto trailing_uc;
20978 suffix = number_literal_suffix(p, NUM_SUFFIX_ALL);
20979 return set_number_literal(p, tINTEGER, suffix, 16, 0);
20980 }
20981 if (c == 'b' || c == 'B') {
20982 /* binary */
20983 c = nextc(p);
20984 if (c == '0' || c == '1') {
20985 do {
20986 if (c == '_') {
20987 if (nondigit) break;
20988 nondigit = c;
20989 continue;
20990 }
20991 if (c != '0' && c != '1') break;
20992 nondigit = 0;
20993 tokadd(p, c);
20994 } while ((c = nextc(p)) != -1);
20995 }
20996 pushback(p, c);
20997 tokfix(p);
20998 if (toklen(p) == start) {
20999 return no_digits(p);
21000 }
21001 else if (nondigit) goto trailing_uc;
21002 suffix = number_literal_suffix(p, NUM_SUFFIX_ALL);
21003 return set_number_literal(p, tINTEGER, suffix, 2, 0);
21004 }
21005 if (c == 'd' || c == 'D') {
21006 /* decimal */
21007 c = nextc(p);
21008 if (c != -1 && ISDIGIT(c)) {
21009 do {
21010 if (c == '_') {
21011 if (nondigit) break;
21012 nondigit = c;
21013 continue;
21014 }
21015 if (!ISDIGIT(c)) break;
21016 nondigit = 0;
21017 tokadd(p, c);
21018 } while ((c = nextc(p)) != -1);
21019 }
21020 pushback(p, c);
21021 tokfix(p);
21022 if (toklen(p) == start) {
21023 return no_digits(p);
21024 }
21025 else if (nondigit) goto trailing_uc;
21026 suffix = number_literal_suffix(p, NUM_SUFFIX_ALL);
21027 return set_number_literal(p, tINTEGER, suffix, 10, 0);
21028 }
21029 if (c == '_') {
21030 /* 0_0 */
21031 goto octal_number;
21032 }
21033 if (c == 'o' || c == 'O') {
21034 /* prefixed octal */
21035 c = nextc(p);
21036 if (c == -1 || c == '_' || !ISDIGIT(c)) {
21037 tokfix(p);
21038 return no_digits(p);
21039 }
21040 }
21041 if (c >= '0' && c <= '7') {
21042 /* octal */
21043 octal_number:
21044 do {
21045 if (c == '_') {
21046 if (nondigit) break;
21047 nondigit = c;
21048 continue;
21049 }
21050 if (c < '0' || c > '9') break;
21051 if (c > '7') goto invalid_octal;
21052 nondigit = 0;
21053 tokadd(p, c);
21054 } while ((c = nextc(p)) != -1);
21055 if (toklen(p) > start) {
21056 pushback(p, c);
21057 tokfix(p);
21058 if (nondigit) goto trailing_uc;
21059 suffix = number_literal_suffix(p, NUM_SUFFIX_ALL);
21060 return set_number_literal(p, tINTEGER, suffix, 8, 0);
21061 }
21062 if (nondigit) {
21063 pushback(p, c);
21064 goto trailing_uc;
21065 }
21066 }
21067 if (c > '7' && c <= '9') {
21068 invalid_octal:
21069 yyerror0("Invalid octal digit");
21070 }
21071 else if (c == '.' || c == 'e' || c == 'E') {
21072 tokadd(p, '0');
21073 }
21074 else {
21075 pushback(p, c);
21076 tokfix(p);
21077 suffix = number_literal_suffix(p, NUM_SUFFIX_ALL);
21078 return set_number_literal(p, tINTEGER, suffix, 10, 0);
21079 }
21080 }
21081
21082 for (;;) {
21083 switch (c) {
21084 case '0': case '1': case '2': case '3': case '4':
21085 case '5': case '6': case '7': case '8': case '9':
21086 nondigit = 0;
21087 tokadd(p, c);
21088 break;
21089
21090 case '.':
21091 if (nondigit) goto trailing_uc;
21092 if (seen_point || seen_e) {
21093 goto decode_num;
21094 }
21095 else {
21096 int c0 = nextc(p);
21097 if (c0 == -1 || !ISDIGIT(c0)) {
21098 pushback(p, c0);
21099 goto decode_num;
21100 }
21101 c = c0;
21102 }
21103 seen_point = toklen(p);
21104 tokadd(p, '.');
21105 tokadd(p, c);
21106 is_float++;
21107 nondigit = 0;
21108 break;
21109
21110 case 'e':
21111 case 'E':
21112 if (nondigit) {
21113 pushback(p, c);
21114 c = nondigit;
21115 goto decode_num;
21116 }
21117 if (seen_e) {
21118 goto decode_num;
21119 }
21120 nondigit = c;
21121 c = nextc(p);
21122 if (c != '-' && c != '+' && !ISDIGIT(c)) {
21123 pushback(p, c);
21124 c = nondigit;
21125 nondigit = 0;
21126 goto decode_num;
21127 }
21128 tokadd(p, nondigit);
21129 seen_e++;
21130 is_float++;
21131 tokadd(p, c);
21132 nondigit = (c == '-' || c == '+') ? c : 0;
21133 break;
21134
21135 case '_': /* `_' in number just ignored */
21136 if (nondigit) goto decode_num;
21137 nondigit = c;
21138 break;
21139
21140 default:
21141 goto decode_num;
21142 }
21143 c = nextc(p);
21144 }
21145
21146 decode_num:
21147 pushback(p, c);
21148 if (nondigit) {
21149 trailing_uc:
21150 literal_flush(p, p->lex.pcur - 1);
21151 YYLTYPE loc = RUBY_INIT_YYLLOC();
21152 compile_error(p, "trailing '%c' in number", nondigit);
21153 parser_show_error_line(p, &loc);
21154 }
21155 tokfix(p);
21156 if (is_float) {
21157 enum yytokentype type = tFLOAT;
21158
21159 suffix = number_literal_suffix(p, seen_e ? NUM_SUFFIX_I : NUM_SUFFIX_ALL);
21160 if (suffix & NUM_SUFFIX_R) {
21161 type = tRATIONAL;
21162 }
21163 else {
21164 strtod(tok(p), 0);
21165 if (errno == ERANGE) {
21166 rb_warning1("Float %s out of range", WARN_S(tok(p)));
21167 errno = 0;
21168 }
21169 }
21170 return set_number_literal(p, type, suffix, 0, seen_point);
21171 }
21172 suffix = number_literal_suffix(p, NUM_SUFFIX_ALL);
21173 return set_number_literal(p, tINTEGER, suffix, 10, 0);
21174}
21175
21176static enum yytokentype
21177parse_qmark(struct parser_params *p, int space_seen)
21178{
21179 rb_encoding *enc;
21180 register int c;
21181 rb_parser_string_t *lit;
21182 const char *start = p->lex.pcur;
21183
21184 if (IS_END()) {
21185 SET_LEX_STATE(EXPR_VALUE);
21186 return '?';
21187 }
21188 c = nextc(p);
21189 if (c == -1) {
21190 compile_error(p, "incomplete character syntax");
21191 return 0;
21192 }
21193 if (rb_enc_isspace(c, p->enc)) {
21194 if (!IS_ARG()) {
21195 int c2 = escaped_control_code(c);
21196 if (c2) {
21197 WARN_SPACE_CHAR(c2, "?");
21198 }
21199 }
21200 ternary:
21201 pushback(p, c);
21202 SET_LEX_STATE(EXPR_VALUE);
21203 return '?';
21204 }
21205 newtok(p);
21206 enc = p->enc;
21207 int w = parser_precise_mbclen(p, start);
21208 if (is_identchar(p, start, p->lex.pend, p->enc) &&
21209 !(lex_eol_ptr_n_p(p, start, w) || !is_identchar(p, start + w, p->lex.pend, p->enc))) {
21210 if (space_seen) {
21211 const char *ptr = start;
21212 do {
21213 int n = parser_precise_mbclen(p, ptr);
21214 if (n < 0) return -1;
21215 ptr += n;
21216 } while (!lex_eol_ptr_p(p, ptr) && is_identchar(p, ptr, p->lex.pend, p->enc));
21217 rb_warn2("'?' just followed by '%.*s' is interpreted as" \
21218 " a conditional operator, put a space after '?'",
21219 WARN_I((int)(ptr - start)), WARN_S_L(start, (ptr - start)));
21220 }
21221 goto ternary;
21222 }
21223 else if (c == '\\') {
21224 if (peek(p, 'u')) {
21225 nextc(p);
21226 enc = rb_utf8_encoding();
21227 tokadd_utf8(p, &enc, -1, 0, 0);
21228 }
21229 else if (!ISASCII(c = peekc(p)) && c != -1) {
21230 nextc(p);
21231 if (tokadd_mbchar(p, c) == -1) return 0;
21232 }
21233 else {
21234 c = read_escape(p, 0, p->lex.pcur - rb_strlen_lit("?\\"));
21235 tokadd(p, c);
21236 }
21237 }
21238 else {
21239 if (tokadd_mbchar(p, c) == -1) return 0;
21240 }
21241 tokfix(p);
21242 lit = STR_NEW3(tok(p), toklen(p), enc, 0);
21243 set_yylval_str(lit);
21244 SET_LEX_STATE(EXPR_END);
21245 return tCHAR;
21246}
21247
21248static enum yytokentype
21249parse_percent(struct parser_params *p, const int space_seen, const enum lex_state_e last_state)
21250{
21251 register int c;
21252 const char *ptok = p->lex.pcur;
21253
21254 if (IS_BEG()) {
21255 int term;
21256 int paren;
21257
21258 c = nextc(p);
21259 quotation:
21260 if (c == -1) goto unterminated;
21261 if (!ISALNUM(c)) {
21262 term = c;
21263 if (!ISASCII(c)) goto unknown;
21264 c = 'Q';
21265 }
21266 else {
21267 term = nextc(p);
21268 if (rb_enc_isalnum(term, p->enc) || !parser_isascii(p)) {
21269 unknown:
21270 pushback(p, term);
21271 c = parser_precise_mbclen(p, p->lex.pcur);
21272 if (c < 0) return 0;
21273 p->lex.pcur += c;
21274 yyerror0("unknown type of %string");
21275 return 0;
21276 }
21277 }
21278 if (term == -1) {
21279 unterminated:
21280 compile_error(p, "unterminated quoted string meets end of file");
21281 return 0;
21282 }
21283 paren = term;
21284 if (term == '(') term = ')';
21285 else if (term == '[') term = ']';
21286 else if (term == '{') term = '}';
21287 else if (term == '<') term = '>';
21288 else paren = 0;
21289
21290 p->lex.ptok = ptok-1;
21291 switch (c) {
21292 case 'Q':
21293 p->lex.strterm = NEW_STRTERM(str_dquote, term, paren);
21294 return tSTRING_BEG;
21295
21296 case 'q':
21297 p->lex.strterm = NEW_STRTERM(str_squote, term, paren);
21298 return tSTRING_BEG;
21299
21300 case 'W':
21301 p->lex.strterm = NEW_STRTERM(str_dword, term, paren);
21302 return tWORDS_BEG;
21303
21304 case 'w':
21305 p->lex.strterm = NEW_STRTERM(str_sword, term, paren);
21306 return tQWORDS_BEG;
21307
21308 case 'I':
21309 p->lex.strterm = NEW_STRTERM(str_dword, term, paren);
21310 return tSYMBOLS_BEG;
21311
21312 case 'i':
21313 p->lex.strterm = NEW_STRTERM(str_sword, term, paren);
21314 return tQSYMBOLS_BEG;
21315
21316 case 'x':
21317 p->lex.strterm = NEW_STRTERM(str_xquote, term, paren);
21318 return tXSTRING_BEG;
21319
21320 case 'r':
21321 p->lex.strterm = NEW_STRTERM(str_regexp, term, paren);
21322 return tREGEXP_BEG;
21323
21324 case 's':
21325 p->lex.strterm = NEW_STRTERM(str_ssym, term, paren);
21326 SET_LEX_STATE(EXPR_FNAME|EXPR_FITEM);
21327 return tSYMBEG;
21328
21329 default:
21330 yyerror0("unknown type of %string");
21331 return 0;
21332 }
21333 }
21334 if ((c = nextc(p)) == '=') {
21335 set_yylval_id('%');
21336 SET_LEX_STATE(EXPR_BEG);
21337 return tOP_ASGN;
21338 }
21339 if (IS_SPCARG(c) || (IS_lex_state(EXPR_FITEM) && c == 's')) {
21340 goto quotation;
21341 }
21342 SET_LEX_STATE(IS_AFTER_OPERATOR() ? EXPR_ARG : EXPR_BEG);
21343 pushback(p, c);
21344 return warn_balanced('%', "%%", "string literal");
21345}
21346
21347static int
21348tokadd_ident(struct parser_params *p, int c)
21349{
21350 do {
21351 if (tokadd_mbchar(p, c) == -1) return -1;
21352 c = nextc(p);
21353 } while (parser_is_identchar(p));
21354 pushback(p, c);
21355 return 0;
21356}
21357
21358static ID
21359tokenize_ident(struct parser_params *p)
21360{
21361 ID ident = TOK_INTERN();
21362
21363 set_yylval_name(ident);
21364
21365 return ident;
21366}
21367
21368static int
21369parse_numvar(struct parser_params *p)
21370{
21371 size_t len;
21372 int overflow;
21373 unsigned long n = ruby_scan_digits(tok(p)+1, toklen(p)-1, 10, &len, &overflow);
21374 const unsigned long nth_ref_max =
21375 ((FIXNUM_MAX < INT_MAX) ? FIXNUM_MAX : INT_MAX) >> 1;
21376 /* NTH_REF is left-shifted to be ORed with back-ref flag and
21377 * turned into a Fixnum, in compile.c */
21378
21379 if (overflow || n > nth_ref_max) {
21380 /* compile_error()? */
21381 rb_warn1("'%s' is too big for a number variable, always nil", WARN_S(tok(p)));
21382 return 0; /* $0 is $PROGRAM_NAME, not NTH_REF */
21383 }
21384 else {
21385 return (int)n;
21386 }
21387}
21388
21389static enum yytokentype
21390parse_gvar(struct parser_params *p, const enum lex_state_e last_state)
21391{
21392 const char *ptr = p->lex.pcur;
21393 register int c;
21394
21395 SET_LEX_STATE(EXPR_END);
21396 p->lex.ptok = ptr - 1; /* from '$' */
21397 newtok(p);
21398 c = nextc(p);
21399 switch (c) {
21400 case '_': /* $_: last read line string */
21401 c = nextc(p);
21402 if (parser_is_identchar(p)) {
21403 tokadd(p, '$');
21404 tokadd(p, '_');
21405 break;
21406 }
21407 pushback(p, c);
21408 c = '_';
21409 /* fall through */
21410 case '~': /* $~: match-data */
21411 case '*': /* $*: argv */
21412 case '$': /* $$: pid */
21413 case '?': /* $?: last status */
21414 case '!': /* $!: error string */
21415 case '@': /* $@: error position */
21416 case '/': /* $/: input record separator */
21417 case '\\': /* $\: output record separator */
21418 case ';': /* $;: field separator */
21419 case ',': /* $,: output field separator */
21420 case '.': /* $.: last read line number */
21421 case '=': /* $=: ignorecase */
21422 case ':': /* $:: load path */
21423 case '<': /* $<: default input handle */
21424 case '>': /* $>: default output handle */
21425 case '\"': /* $": already loaded files */
21426 tokadd(p, '$');
21427 tokadd(p, c);
21428 goto gvar;
21429
21430 case '-':
21431 tokadd(p, '$');
21432 tokadd(p, c);
21433 c = nextc(p);
21434 if (parser_is_identchar(p)) {
21435 if (tokadd_mbchar(p, c) == -1) return 0;
21436 }
21437 else {
21438 pushback(p, c);
21439 pushback(p, '-');
21440 return '$';
21441 }
21442 gvar:
21443 tokenize_ident(p);
21444 return tGVAR;
21445
21446 case '&': /* $&: last match */
21447 case '`': /* $`: string before last match */
21448 case '\'': /* $': string after last match */
21449 case '+': /* $+: string matches last paren. */
21450 if (IS_lex_state_for(last_state, EXPR_FNAME)) {
21451 tokadd(p, '$');
21452 tokadd(p, c);
21453 goto gvar;
21454 }
21455 set_yylval_node(NEW_BACK_REF(c, &_cur_loc));
21456 return tBACK_REF;
21457
21458 case '1': case '2': case '3':
21459 case '4': case '5': case '6':
21460 case '7': case '8': case '9':
21461 tokadd(p, '$');
21462 do {
21463 tokadd(p, c);
21464 c = nextc(p);
21465 } while (c != -1 && ISDIGIT(c));
21466 pushback(p, c);
21467 if (IS_lex_state_for(last_state, EXPR_FNAME)) goto gvar;
21468 tokfix(p);
21469 c = parse_numvar(p);
21470 set_yylval_node(NEW_NTH_REF(c, &_cur_loc));
21471 return tNTH_REF;
21472
21473 default:
21474 if (!parser_is_identchar(p)) {
21475 YYLTYPE loc = RUBY_INIT_YYLLOC();
21476 if (c == -1 || ISSPACE(c)) {
21477 compile_error(p, "'$' without identifiers is not allowed as a global variable name");
21478 }
21479 else {
21480 pushback(p, c);
21481 compile_error(p, "'$%c' is not allowed as a global variable name", c);
21482 }
21483 parser_show_error_line(p, &loc);
21484 set_yylval_noname();
21485 return tGVAR;
21486 }
21487 /* fall through */
21488 case '0':
21489 tokadd(p, '$');
21490 }
21491
21492 if (tokadd_ident(p, c)) return 0;
21493 SET_LEX_STATE(EXPR_END);
21494 if (VALID_SYMNAME_P(tok(p), toklen(p), p->enc, ID_GLOBAL)) {
21495 tokenize_ident(p);
21496 }
21497 else {
21498 compile_error(p, "'%.*s' is not allowed as a global variable name", toklen(p), tok(p));
21499 set_yylval_noname();
21500 }
21501 return tGVAR;
21502}
21503
21504static bool
21505parser_numbered_param(struct parser_params *p, int n)
21506{
21507 if (n < 0) return false;
21508
21509 if (DVARS_TERMINAL_P(p->lvtbl->args) || DVARS_TERMINAL_P(p->lvtbl->args->prev)) {
21510 return false;
21511 }
21512 if (p->max_numparam == ORDINAL_PARAM) {
21513 compile_error(p, "ordinary parameter is defined");
21514 return false;
21515 }
21516 struct vtable *args = p->lvtbl->args;
21517 if (p->max_numparam < n) {
21518 p->max_numparam = n;
21519 }
21520 while (n > args->pos) {
21521 vtable_add(args, NUMPARAM_IDX_TO_ID(args->pos+1));
21522 }
21523 return true;
21524}
21525
21526static enum yytokentype
21527parse_atmark(struct parser_params *p, const enum lex_state_e last_state)
21528{
21529 const char *ptr = p->lex.pcur;
21530 enum yytokentype result = tIVAR;
21531 register int c = nextc(p);
21532 YYLTYPE loc;
21533
21534 p->lex.ptok = ptr - 1; /* from '@' */
21535 newtok(p);
21536 tokadd(p, '@');
21537 if (c == '@') {
21538 result = tCVAR;
21539 tokadd(p, '@');
21540 c = nextc(p);
21541 }
21542 SET_LEX_STATE(IS_lex_state_for(last_state, EXPR_FNAME) ? EXPR_ENDFN : EXPR_END);
21543 if (c == -1 || !parser_is_identchar(p)) {
21544 pushback(p, c);
21545 RUBY_SET_YYLLOC(loc);
21546 if (result == tIVAR) {
21547 compile_error(p, "'@' without identifiers is not allowed as an instance variable name");
21548 }
21549 else {
21550 compile_error(p, "'@@' without identifiers is not allowed as a class variable name");
21551 }
21552 parser_show_error_line(p, &loc);
21553 set_yylval_noname();
21554 SET_LEX_STATE(EXPR_END);
21555 return result;
21556 }
21557 else if (ISDIGIT(c)) {
21558 pushback(p, c);
21559 RUBY_SET_YYLLOC(loc);
21560 if (result == tIVAR) {
21561 compile_error(p, "'@%c' is not allowed as an instance variable name", c);
21562 }
21563 else {
21564 compile_error(p, "'@@%c' is not allowed as a class variable name", c);
21565 }
21566 parser_show_error_line(p, &loc);
21567 set_yylval_noname();
21568 SET_LEX_STATE(EXPR_END);
21569 return result;
21570 }
21571
21572 if (tokadd_ident(p, c)) return 0;
21573 tokenize_ident(p);
21574 return result;
21575}
21576
21577static enum yytokentype
21578parse_ident(struct parser_params *p, int c, int cmd_state)
21579{
21580 enum yytokentype result;
21581 bool is_ascii = true;
21582 const enum lex_state_e last_state = p->lex.state;
21583 ID ident;
21584 int enforce_keyword_end = 0;
21585
21586 do {
21587 if (!ISASCII(c)) is_ascii = false;
21588 if (tokadd_mbchar(p, c) == -1) return 0;
21589 c = nextc(p);
21590 } while (parser_is_identchar(p));
21591 if ((c == '!' || c == '?') && !peek(p, '=')) {
21592 result = tFID;
21593 tokadd(p, c);
21594 }
21595 else if (c == '=' && IS_lex_state(EXPR_FNAME) &&
21596 (!peek(p, '~') && !peek(p, '>') && (!peek(p, '=') || (peek_n(p, '>', 1))))) {
21597 result = tIDENTIFIER;
21598 tokadd(p, c);
21599 }
21600 else {
21601 result = tCONSTANT; /* assume provisionally */
21602 pushback(p, c);
21603 }
21604 tokfix(p);
21605
21606 if (IS_LABEL_POSSIBLE()) {
21607 if (IS_LABEL_SUFFIX(0)) {
21608 SET_LEX_STATE(EXPR_ARG|EXPR_LABELED);
21609 nextc(p);
21610 tokenize_ident(p);
21611 return tLABEL;
21612 }
21613 }
21614
21615#ifndef RIPPER
21616 if (peek_end_expect_token_locations(p)) {
21617 const rb_code_position_t *end_pos;
21618 int lineno, column;
21619 int beg_pos = (int)(p->lex.ptok - p->lex.pbeg);
21620
21621 end_pos = peek_end_expect_token_locations(p)->pos;
21622 lineno = end_pos->lineno;
21623 column = end_pos->column;
21624
21625 if (p->debug) {
21626 rb_parser_printf(p, "enforce_keyword_end check. current: (%d, %d), peek: (%d, %d)\n",
21627 p->ruby_sourceline, beg_pos, lineno, column);
21628 }
21629
21630 if ((p->ruby_sourceline > lineno) && (beg_pos <= column)) {
21631 const struct kwtable *kw;
21632
21633 if ((IS_lex_state(EXPR_DOT)) && (kw = rb_reserved_word(tok(p), toklen(p))) && (kw && kw->id[0] == keyword_end)) {
21634 if (p->debug) rb_parser_printf(p, "enforce_keyword_end is enabled\n");
21635 enforce_keyword_end = 1;
21636 }
21637 }
21638 }
21639#endif
21640
21641 if (is_ascii && (!IS_lex_state(EXPR_DOT) || enforce_keyword_end)) {
21642 const struct kwtable *kw;
21643
21644 /* See if it is a reserved word. */
21645 kw = rb_reserved_word(tok(p), toklen(p));
21646 if (kw) {
21647 enum lex_state_e state = p->lex.state;
21648 if (IS_lex_state_for(state, EXPR_FNAME)) {
21649 SET_LEX_STATE(EXPR_ENDFN);
21650 set_yylval_name(rb_intern2(tok(p), toklen(p)));
21651 return kw->id[0];
21652 }
21653 SET_LEX_STATE(kw->state);
21654 if (IS_lex_state(EXPR_BEG)) {
21655 p->command_start = TRUE;
21656 }
21657 if (kw->id[0] == keyword_do) {
21658 if (lambda_beginning_p()) {
21659 p->lex.lpar_beg = -1; /* make lambda_beginning_p() == FALSE in the body of "-> do ... end" */
21660 return keyword_do_LAMBDA;
21661 }
21662 if (COND_P()) return keyword_do_cond;
21663 if (CMDARG_P() && !IS_lex_state_for(state, EXPR_CMDARG))
21664 return keyword_do_block;
21665 return keyword_do;
21666 }
21667 if (IS_lex_state_for(state, (EXPR_BEG | EXPR_LABELED | EXPR_CLASS)))
21668 return kw->id[0];
21669 else {
21670 if (kw->id[0] != kw->id[1])
21671 SET_LEX_STATE(EXPR_BEG | EXPR_LABEL);
21672 return kw->id[1];
21673 }
21674 }
21675 }
21676
21677 if (IS_lex_state(EXPR_BEG_ANY | EXPR_ARG_ANY | EXPR_DOT)) {
21678 if (cmd_state) {
21679 SET_LEX_STATE(EXPR_CMDARG);
21680 }
21681 else {
21682 SET_LEX_STATE(EXPR_ARG);
21683 }
21684 }
21685 else if (p->lex.state == EXPR_FNAME) {
21686 SET_LEX_STATE(EXPR_ENDFN);
21687 }
21688 else {
21689 SET_LEX_STATE(EXPR_END);
21690 }
21691
21692 ident = tokenize_ident(p);
21693 if (result == tCONSTANT && is_local_id(ident)) result = tIDENTIFIER;
21694 if (!IS_lex_state_for(last_state, EXPR_DOT|EXPR_FNAME) &&
21695 (result == tIDENTIFIER) && /* not EXPR_FNAME, not attrasgn */
21696 (lvar_defined(p, ident) || NUMPARAM_ID_P(ident))) {
21697 SET_LEX_STATE(EXPR_END|EXPR_LABEL);
21698 }
21699 return result;
21700}
21701
21702static void
21703warn_cr(struct parser_params *p)
21704{
21705 if (!p->cr_seen) {
21706 p->cr_seen = TRUE;
21707 /* carried over with p->lex.nextline for nextc() */
21708 rb_warn0("encountered \\r in middle of line, treated as a mere space");
21709 }
21710}
21711
21712static enum yytokentype
21713parser_yylex(struct parser_params *p)
21714{
21715 register int c;
21716 int space_seen = 0;
21717 int cmd_state;
21718 int label;
21719 enum lex_state_e last_state;
21720 int fallthru = FALSE;
21721 int token_seen = p->token_seen;
21722
21723 if (p->lex.strterm) {
21724 if (strterm_is_heredoc(p->lex.strterm)) {
21725 token_flush(p);
21726 return here_document(p, &p->lex.strterm->u.heredoc);
21727 }
21728 else {
21729 token_flush(p);
21730 return parse_string(p, &p->lex.strterm->u.literal);
21731 }
21732 }
21733 cmd_state = p->command_start;
21734 p->command_start = FALSE;
21735 p->token_seen = TRUE;
21736#ifndef RIPPER
21737 token_flush(p);
21738#endif
21739 retry:
21740 last_state = p->lex.state;
21741 switch (c = nextc(p)) {
21742 case '\0': /* NUL */
21743 case '\004': /* ^D */
21744 case '\032': /* ^Z */
21745 case -1: /* end of script. */
21746 p->eofp = 1;
21747#ifndef RIPPER
21748 if (p->end_expect_token_locations) {
21749 pop_end_expect_token_locations(p);
21750 RUBY_SET_YYLLOC_OF_DUMMY_END(*p->yylloc);
21751 return tDUMNY_END;
21752 }
21753#endif
21754 /* Set location for end-of-input because dispatch_scan_event is not called. */
21755 RUBY_SET_YYLLOC(*p->yylloc);
21756 return END_OF_INPUT;
21757
21758 /* white spaces */
21759 case '\r':
21760 warn_cr(p);
21761 /* fall through */
21762 case ' ': case '\t': case '\f':
21763 case '\13': /* '\v' */
21764 space_seen = 1;
21765 while ((c = nextc(p))) {
21766 switch (c) {
21767 case '\r':
21768 warn_cr(p);
21769 /* fall through */
21770 case ' ': case '\t': case '\f':
21771 case '\13': /* '\v' */
21772 break;
21773 default:
21774 goto outofloop;
21775 }
21776 }
21777 outofloop:
21778 pushback(p, c);
21779 dispatch_scan_event(p, tSP);
21780#ifndef RIPPER
21781 token_flush(p);
21782#endif
21783 goto retry;
21784
21785 case '#': /* it's a comment */
21786 p->token_seen = token_seen;
21787 const char *const pcur = p->lex.pcur, *const ptok = p->lex.ptok;
21788 /* no magic_comment in shebang line */
21789 if (!parser_magic_comment(p, p->lex.pcur, p->lex.pend - p->lex.pcur)) {
21790 if (comment_at_top(p)) {
21791 set_file_encoding(p, p->lex.pcur, p->lex.pend);
21792 }
21793 }
21794 p->lex.pcur = pcur, p->lex.ptok = ptok;
21795 lex_goto_eol(p);
21796 dispatch_scan_event(p, tCOMMENT);
21797 fallthru = TRUE;
21798 /* fall through */
21799 case '\n':
21800 p->token_seen = token_seen;
21801 rb_parser_string_t *prevline = p->lex.lastline;
21802 c = (IS_lex_state(EXPR_BEG|EXPR_CLASS|EXPR_FNAME|EXPR_DOT) &&
21803 !IS_lex_state(EXPR_LABELED));
21804 if (c || IS_lex_state_all(EXPR_ARG|EXPR_LABELED)) {
21805 if (!fallthru) {
21806 dispatch_scan_event(p, tIGNORED_NL);
21807 }
21808 fallthru = FALSE;
21809 if (!c && p->ctxt.in_kwarg) {
21810 goto normal_newline;
21811 }
21812 goto retry;
21813 }
21814 while (1) {
21815 switch (c = nextc(p)) {
21816 case ' ': case '\t': case '\f': case '\r':
21817 case '\13': /* '\v' */
21818 space_seen = 1;
21819 break;
21820 case '#':
21821 pushback(p, c);
21822 if (space_seen) {
21823 dispatch_scan_event(p, tSP);
21824 token_flush(p);
21825 }
21826 goto retry;
21827 case '&':
21828 case '.': {
21829 dispatch_delayed_token(p, tIGNORED_NL);
21830 if (peek(p, '.') == (c == '&')) {
21831 pushback(p, c);
21832 dispatch_scan_event(p, tSP);
21833 goto retry;
21834 }
21835 }
21836 default:
21837 p->ruby_sourceline--;
21838 p->lex.nextline = p->lex.lastline;
21839 set_lastline(p, prevline);
21840 case -1: /* EOF no decrement*/
21841 if (c == -1 && space_seen) {
21842 dispatch_scan_event(p, tSP);
21843 }
21844 lex_goto_eol(p);
21845 if (c != -1) {
21846 token_flush(p);
21847 RUBY_SET_YYLLOC(*p->yylloc);
21848 }
21849 goto normal_newline;
21850 }
21851 }
21852 normal_newline:
21853 p->command_start = TRUE;
21854 SET_LEX_STATE(EXPR_BEG);
21855 return '\n';
21856
21857 case '*':
21858 if ((c = nextc(p)) == '*') {
21859 if ((c = nextc(p)) == '=') {
21860 set_yylval_id(idPow);
21861 SET_LEX_STATE(EXPR_BEG);
21862 return tOP_ASGN;
21863 }
21864 pushback(p, c);
21865 if (IS_SPCARG(c)) {
21866 rb_warning0("'**' interpreted as argument prefix");
21867 c = tDSTAR;
21868 }
21869 else if (IS_BEG()) {
21870 c = tDSTAR;
21871 }
21872 else {
21873 c = warn_balanced((enum ruby_method_ids)tPOW, "**", "argument prefix");
21874 }
21875 }
21876 else {
21877 if (c == '=') {
21878 set_yylval_id('*');
21879 SET_LEX_STATE(EXPR_BEG);
21880 return tOP_ASGN;
21881 }
21882 pushback(p, c);
21883 if (IS_SPCARG(c)) {
21884 rb_warning0("'*' interpreted as argument prefix");
21885 c = tSTAR;
21886 }
21887 else if (IS_BEG()) {
21888 c = tSTAR;
21889 }
21890 else {
21891 c = warn_balanced('*', "*", "argument prefix");
21892 }
21893 }
21894 SET_LEX_STATE(IS_AFTER_OPERATOR() ? EXPR_ARG : EXPR_BEG);
21895 return c;
21896
21897 case '!':
21898 c = nextc(p);
21899 if (IS_AFTER_OPERATOR()) {
21900 SET_LEX_STATE(EXPR_ARG);
21901 if (c == '@') {
21902 return '!';
21903 }
21904 }
21905 else {
21906 SET_LEX_STATE(EXPR_BEG);
21907 }
21908 if (c == '=') {
21909 return tNEQ;
21910 }
21911 if (c == '~') {
21912 return tNMATCH;
21913 }
21914 pushback(p, c);
21915 return '!';
21916
21917 case '=':
21918 if (was_bol(p)) {
21919 /* skip embedded rd document */
21920 if (word_match_p(p, "begin", 5)) {
21921 int first_p = TRUE;
21922
21923 lex_goto_eol(p);
21924 dispatch_scan_event(p, tEMBDOC_BEG);
21925 for (;;) {
21926 lex_goto_eol(p);
21927 if (!first_p) {
21928 dispatch_scan_event(p, tEMBDOC);
21929 }
21930 first_p = FALSE;
21931 c = nextc(p);
21932 if (c == -1) {
21933 compile_error(p, "embedded document meets end of file");
21934 return END_OF_INPUT;
21935 }
21936 if (c == '=' && word_match_p(p, "end", 3)) {
21937 break;
21938 }
21939 pushback(p, c);
21940 }
21941 lex_goto_eol(p);
21942 dispatch_scan_event(p, tEMBDOC_END);
21943 goto retry;
21944 }
21945 }
21946
21947 SET_LEX_STATE(IS_AFTER_OPERATOR() ? EXPR_ARG : EXPR_BEG);
21948 if ((c = nextc(p)) == '=') {
21949 if ((c = nextc(p)) == '=') {
21950 return tEQQ;
21951 }
21952 pushback(p, c);
21953 return tEQ;
21954 }
21955 if (c == '~') {
21956 return tMATCH;
21957 }
21958 else if (c == '>') {
21959 return tASSOC;
21960 }
21961 pushback(p, c);
21962 return '=';
21963
21964 case '<':
21965 c = nextc(p);
21966 if (c == '<' &&
21967 !IS_lex_state(EXPR_DOT | EXPR_CLASS) &&
21968 !IS_END() &&
21969 (!IS_ARG() || IS_lex_state(EXPR_LABELED) || space_seen)) {
21970 enum yytokentype token = heredoc_identifier(p);
21971 if (token) return token < 0 ? 0 : token;
21972 }
21973 if (IS_AFTER_OPERATOR()) {
21974 SET_LEX_STATE(EXPR_ARG);
21975 }
21976 else {
21977 if (IS_lex_state(EXPR_CLASS))
21978 p->command_start = TRUE;
21979 SET_LEX_STATE(EXPR_BEG);
21980 }
21981 if (c == '=') {
21982 if ((c = nextc(p)) == '>') {
21983 return tCMP;
21984 }
21985 pushback(p, c);
21986 return tLEQ;
21987 }
21988 if (c == '<') {
21989 if ((c = nextc(p)) == '=') {
21990 set_yylval_id(idLTLT);
21991 SET_LEX_STATE(EXPR_BEG);
21992 return tOP_ASGN;
21993 }
21994 pushback(p, c);
21995 return warn_balanced((enum ruby_method_ids)tLSHFT, "<<", "here document");
21996 }
21997 pushback(p, c);
21998 return '<';
21999
22000 case '>':
22001 SET_LEX_STATE(IS_AFTER_OPERATOR() ? EXPR_ARG : EXPR_BEG);
22002 if ((c = nextc(p)) == '=') {
22003 return tGEQ;
22004 }
22005 if (c == '>') {
22006 if ((c = nextc(p)) == '=') {
22007 set_yylval_id(idGTGT);
22008 SET_LEX_STATE(EXPR_BEG);
22009 return tOP_ASGN;
22010 }
22011 pushback(p, c);
22012 return tRSHFT;
22013 }
22014 pushback(p, c);
22015 return '>';
22016
22017 case '"':
22018 label = (IS_LABEL_POSSIBLE() ? str_label : 0);
22019 p->lex.strterm = NEW_STRTERM(str_dquote | label, '"', 0);
22020 p->lex.ptok = p->lex.pcur-1;
22021 return tSTRING_BEG;
22022
22023 case '`':
22024 if (IS_lex_state(EXPR_FNAME)) {
22025 SET_LEX_STATE(EXPR_ENDFN);
22026 return c;
22027 }
22028 if (IS_lex_state(EXPR_DOT)) {
22029 if (cmd_state)
22030 SET_LEX_STATE(EXPR_CMDARG);
22031 else
22032 SET_LEX_STATE(EXPR_ARG);
22033 return c;
22034 }
22035 p->lex.strterm = NEW_STRTERM(str_xquote, '`', 0);
22036 return tXSTRING_BEG;
22037
22038 case '\'':
22039 label = (IS_LABEL_POSSIBLE() ? str_label : 0);
22040 p->lex.strterm = NEW_STRTERM(str_squote | label, '\'', 0);
22041 p->lex.ptok = p->lex.pcur-1;
22042 return tSTRING_BEG;
22043
22044 case '?':
22045 return parse_qmark(p, space_seen);
22046
22047 case '&':
22048 if ((c = nextc(p)) == '&') {
22049 SET_LEX_STATE(EXPR_BEG);
22050 if ((c = nextc(p)) == '=') {
22051 set_yylval_id(idANDOP);
22052 SET_LEX_STATE(EXPR_BEG);
22053 return tOP_ASGN;
22054 }
22055 pushback(p, c);
22056 return tANDOP;
22057 }
22058 else if (c == '=') {
22059 set_yylval_id('&');
22060 SET_LEX_STATE(EXPR_BEG);
22061 return tOP_ASGN;
22062 }
22063 else if (c == '.') {
22064 set_yylval_id(idANDDOT);
22065 SET_LEX_STATE(EXPR_DOT);
22066 return tANDDOT;
22067 }
22068 pushback(p, c);
22069 if (IS_SPCARG(c)) {
22070 if ((c != ':') ||
22071 (c = peekc_n(p, 1)) == -1 ||
22072 !(c == '\'' || c == '"' ||
22073 is_identchar(p, (p->lex.pcur+1), p->lex.pend, p->enc))) {
22074 rb_warning0("'&' interpreted as argument prefix");
22075 }
22076 c = tAMPER;
22077 }
22078 else if (IS_BEG()) {
22079 c = tAMPER;
22080 }
22081 else {
22082 c = warn_balanced('&', "&", "argument prefix");
22083 }
22084 SET_LEX_STATE(IS_AFTER_OPERATOR() ? EXPR_ARG : EXPR_BEG);
22085 return c;
22086
22087 case '|':
22088 if ((c = nextc(p)) == '|') {
22089 SET_LEX_STATE(EXPR_BEG);
22090 if ((c = nextc(p)) == '=') {
22091 set_yylval_id(idOROP);
22092 SET_LEX_STATE(EXPR_BEG);
22093 return tOP_ASGN;
22094 }
22095 pushback(p, c);
22096 if (IS_lex_state_for(last_state, EXPR_BEG)) {
22097 c = '|';
22098 pushback(p, '|');
22099 return c;
22100 }
22101 return tOROP;
22102 }
22103 if (c == '=') {
22104 set_yylval_id('|');
22105 SET_LEX_STATE(EXPR_BEG);
22106 return tOP_ASGN;
22107 }
22108 SET_LEX_STATE(IS_AFTER_OPERATOR() ? EXPR_ARG : EXPR_BEG|EXPR_LABEL);
22109 pushback(p, c);
22110 return '|';
22111
22112 case '+':
22113 c = nextc(p);
22114 if (IS_AFTER_OPERATOR()) {
22115 SET_LEX_STATE(EXPR_ARG);
22116 if (c == '@') {
22117 return tUPLUS;
22118 }
22119 pushback(p, c);
22120 return '+';
22121 }
22122 if (c == '=') {
22123 set_yylval_id('+');
22124 SET_LEX_STATE(EXPR_BEG);
22125 return tOP_ASGN;
22126 }
22127 if (IS_BEG() || (IS_SPCARG(c) && arg_ambiguous(p, '+'))) {
22128 SET_LEX_STATE(EXPR_BEG);
22129 pushback(p, c);
22130 if (c != -1 && ISDIGIT(c)) {
22131 return parse_numeric(p, '+');
22132 }
22133 return tUPLUS;
22134 }
22135 SET_LEX_STATE(EXPR_BEG);
22136 pushback(p, c);
22137 return warn_balanced('+', "+", "unary operator");
22138
22139 case '-':
22140 c = nextc(p);
22141 if (IS_AFTER_OPERATOR()) {
22142 SET_LEX_STATE(EXPR_ARG);
22143 if (c == '@') {
22144 return tUMINUS;
22145 }
22146 pushback(p, c);
22147 return '-';
22148 }
22149 if (c == '=') {
22150 set_yylval_id('-');
22151 SET_LEX_STATE(EXPR_BEG);
22152 return tOP_ASGN;
22153 }
22154 if (c == '>') {
22155 SET_LEX_STATE(EXPR_ENDFN);
22156 yylval.num = p->lex.lpar_beg;
22157 p->lex.lpar_beg = p->lex.paren_nest;
22158 return tLAMBDA;
22159 }
22160 if (IS_BEG() || (IS_SPCARG(c) && arg_ambiguous(p, '-'))) {
22161 SET_LEX_STATE(EXPR_BEG);
22162 pushback(p, c);
22163 if (c != -1 && ISDIGIT(c)) {
22164 return tUMINUS_NUM;
22165 }
22166 return tUMINUS;
22167 }
22168 SET_LEX_STATE(EXPR_BEG);
22169 pushback(p, c);
22170 return warn_balanced('-', "-", "unary operator");
22171
22172 case '.': {
22173 int is_beg = IS_BEG();
22174 SET_LEX_STATE(EXPR_BEG);
22175 if ((c = nextc(p)) == '.') {
22176 if ((c = nextc(p)) == '.') {
22177 if (p->ctxt.in_argdef || IS_LABEL_POSSIBLE()) {
22178 SET_LEX_STATE(EXPR_ENDARG);
22179 return tBDOT3;
22180 }
22181 if (p->lex.paren_nest == 0 && looking_at_eol_p(p)) {
22182 rb_warn0("... at EOL, should be parenthesized?");
22183 }
22184 return is_beg ? tBDOT3 : tDOT3;
22185 }
22186 pushback(p, c);
22187 return is_beg ? tBDOT2 : tDOT2;
22188 }
22189 pushback(p, c);
22190 if (c != -1 && ISDIGIT(c)) {
22191 char prev = p->lex.pcur-1 > p->lex.pbeg ? *(p->lex.pcur-2) : 0;
22192 parse_numeric(p, '.');
22193 if (ISDIGIT(prev)) {
22194 yyerror0("unexpected fraction part after numeric literal");
22195 }
22196 else {
22197 yyerror0("no .<digit> floating literal anymore; put 0 before dot");
22198 }
22199 SET_LEX_STATE(EXPR_END);
22200 p->lex.ptok = p->lex.pcur;
22201 goto retry;
22202 }
22203 set_yylval_id('.');
22204 SET_LEX_STATE(EXPR_DOT);
22205 return '.';
22206 }
22207
22208 case '0': case '1': case '2': case '3': case '4':
22209 case '5': case '6': case '7': case '8': case '9':
22210 return parse_numeric(p, c);
22211
22212 case ')':
22213 COND_POP();
22214 CMDARG_POP();
22215 SET_LEX_STATE(EXPR_ENDFN);
22216 p->lex.paren_nest--;
22217 return c;
22218
22219 case ']':
22220 COND_POP();
22221 CMDARG_POP();
22222 SET_LEX_STATE(EXPR_END);
22223 p->lex.paren_nest--;
22224 return c;
22225
22226 case '}':
22227 /* tSTRING_DEND does COND_POP and CMDARG_POP in the yacc's rule */
22228 if (!p->lex.brace_nest--) return tSTRING_DEND;
22229 COND_POP();
22230 CMDARG_POP();
22231 SET_LEX_STATE(EXPR_END);
22232 p->lex.paren_nest--;
22233 return c;
22234
22235 case ':':
22236 c = nextc(p);
22237 if (c == ':') {
22238 if (IS_BEG() || IS_lex_state(EXPR_CLASS) || IS_SPCARG(-1)) {
22239 SET_LEX_STATE(EXPR_BEG);
22240 return tCOLON3;
22241 }
22242 set_yylval_id(idCOLON2);
22243 SET_LEX_STATE(EXPR_DOT);
22244 return tCOLON2;
22245 }
22246 if (IS_END() || ISSPACE(c) || c == '#') {
22247 pushback(p, c);
22248 c = warn_balanced(':', ":", "symbol literal");
22249 SET_LEX_STATE(EXPR_BEG);
22250 return c;
22251 }
22252 switch (c) {
22253 case '\'':
22254 p->lex.strterm = NEW_STRTERM(str_ssym, c, 0);
22255 break;
22256 case '"':
22257 p->lex.strterm = NEW_STRTERM(str_dsym, c, 0);
22258 break;
22259 default:
22260 pushback(p, c);
22261 break;
22262 }
22263 SET_LEX_STATE(EXPR_FNAME);
22264 return tSYMBEG;
22265
22266 case '/':
22267 if (IS_BEG()) {
22268 p->lex.strterm = NEW_STRTERM(str_regexp, '/', 0);
22269 return tREGEXP_BEG;
22270 }
22271 if ((c = nextc(p)) == '=') {
22272 set_yylval_id('/');
22273 SET_LEX_STATE(EXPR_BEG);
22274 return tOP_ASGN;
22275 }
22276 pushback(p, c);
22277 if (IS_SPCARG(c)) {
22278 arg_ambiguous(p, '/');
22279 p->lex.strterm = NEW_STRTERM(str_regexp, '/', 0);
22280 return tREGEXP_BEG;
22281 }
22282 SET_LEX_STATE(IS_AFTER_OPERATOR() ? EXPR_ARG : EXPR_BEG);
22283 return warn_balanced('/', "/", "regexp literal");
22284
22285 case '^':
22286 if ((c = nextc(p)) == '=') {
22287 set_yylval_id('^');
22288 SET_LEX_STATE(EXPR_BEG);
22289 return tOP_ASGN;
22290 }
22291 SET_LEX_STATE(IS_AFTER_OPERATOR() ? EXPR_ARG : EXPR_BEG);
22292 pushback(p, c);
22293 return '^';
22294
22295 case ';':
22296 SET_LEX_STATE(EXPR_BEG);
22297 p->command_start = TRUE;
22298 return ';';
22299
22300 case ',':
22301 SET_LEX_STATE(EXPR_BEG|EXPR_LABEL);
22302 return ',';
22303
22304 case '~':
22305 if (IS_AFTER_OPERATOR()) {
22306 if ((c = nextc(p)) != '@') {
22307 pushback(p, c);
22308 }
22309 SET_LEX_STATE(EXPR_ARG);
22310 }
22311 else {
22312 SET_LEX_STATE(EXPR_BEG);
22313 }
22314 return '~';
22315
22316 case '(':
22317 if (IS_BEG()) {
22318 c = tLPAREN;
22319 }
22320 else if (!space_seen) {
22321 /* foo( ... ) => method call, no ambiguity */
22322 }
22323 else if (IS_ARG() || IS_lex_state_all(EXPR_END|EXPR_LABEL)) {
22324 c = tLPAREN_ARG;
22325 }
22326 else if (IS_lex_state(EXPR_ENDFN) && !lambda_beginning_p()) {
22327 rb_warning0("parentheses after method name is interpreted as "
22328 "an argument list, not a decomposed argument");
22329 }
22330 p->lex.paren_nest++;
22331 COND_PUSH(0);
22332 CMDARG_PUSH(0);
22333 SET_LEX_STATE(EXPR_BEG|EXPR_LABEL);
22334 return c;
22335
22336 case '[':
22337 p->lex.paren_nest++;
22338 if (IS_AFTER_OPERATOR()) {
22339 if ((c = nextc(p)) == ']') {
22340 p->lex.paren_nest--;
22341 SET_LEX_STATE(EXPR_ARG);
22342 if ((c = nextc(p)) == '=') {
22343 return tASET;
22344 }
22345 pushback(p, c);
22346 return tAREF;
22347 }
22348 pushback(p, c);
22349 SET_LEX_STATE(EXPR_ARG|EXPR_LABEL);
22350 return '[';
22351 }
22352 else if (IS_BEG()) {
22353 c = tLBRACK;
22354 }
22355 else if (IS_ARG() && (space_seen || IS_lex_state(EXPR_LABELED))) {
22356 c = tLBRACK;
22357 }
22358 SET_LEX_STATE(EXPR_BEG|EXPR_LABEL);
22359 COND_PUSH(0);
22360 CMDARG_PUSH(0);
22361 return c;
22362
22363 case '{':
22364 ++p->lex.brace_nest;
22365 if (lambda_beginning_p())
22366 c = tLAMBEG;
22367 else if (IS_lex_state(EXPR_LABELED))
22368 c = tLBRACE; /* hash */
22369 else if (IS_lex_state(EXPR_ARG_ANY | EXPR_END | EXPR_ENDFN))
22370 c = '{'; /* block (primary) */
22371 else if (IS_lex_state(EXPR_ENDARG))
22372 c = tLBRACE_ARG; /* block (expr) */
22373 else
22374 c = tLBRACE; /* hash */
22375 if (c != tLBRACE) {
22376 p->command_start = TRUE;
22377 SET_LEX_STATE(EXPR_BEG);
22378 }
22379 else {
22380 SET_LEX_STATE(EXPR_BEG|EXPR_LABEL);
22381 }
22382 ++p->lex.paren_nest; /* after lambda_beginning_p() */
22383 COND_PUSH(0);
22384 CMDARG_PUSH(0);
22385 return c;
22386
22387 case '\\':
22388 c = nextc(p);
22389 if (c == '\n') {
22390 space_seen = 1;
22391 dispatch_scan_event(p, tSP);
22392 goto retry; /* skip \\n */
22393 }
22394 if (c == ' ') return tSP;
22395 if (ISSPACE(c)) return c;
22396 pushback(p, c);
22397 return '\\';
22398
22399 case '%':
22400 return parse_percent(p, space_seen, last_state);
22401
22402 case '$':
22403 return parse_gvar(p, last_state);
22404
22405 case '@':
22406 return parse_atmark(p, last_state);
22407
22408 case '_':
22409 if (was_bol(p) && whole_match_p(p, "__END__", 7, 0)) {
22410 p->ruby__end__seen = 1;
22411 p->eofp = 1;
22412#ifdef RIPPER
22413 lex_goto_eol(p);
22414 dispatch_scan_event(p, k__END__);
22415#endif
22416 return END_OF_INPUT;
22417 }
22418 newtok(p);
22419 break;
22420
22421 default:
22422 if (!parser_is_identchar(p)) {
22423 compile_error(p, "Invalid char '\\x%02X' in expression", c);
22424 token_flush(p);
22425 goto retry;
22426 }
22427
22428 newtok(p);
22429 break;
22430 }
22431
22432 return parse_ident(p, c, cmd_state);
22433}
22434
22435static enum yytokentype
22436yylex(YYSTYPE *lval, YYLTYPE *yylloc, struct parser_params *p)
22437{
22438 enum yytokentype t;
22439
22440 p->lval = lval;
22441 lval->node = 0;
22442 p->yylloc = yylloc;
22443
22444 t = parser_yylex(p);
22445
22446 if (has_delayed_token(p))
22447 dispatch_delayed_token(p, t);
22448 else if (t != END_OF_INPUT)
22449 dispatch_scan_event(p, t);
22450
22451 return t;
22452}
22453
22454#define LVAR_USED ((ID)1 << (sizeof(ID) * CHAR_BIT - 1))
22455
22456static NODE*
22457node_new_internal(struct parser_params *p, enum node_type type, size_t size, size_t alignment)
22458{
22459 NODE *n = rb_ast_newnode(p->ast, type, size, alignment);
22460
22461 rb_node_init(n, type);
22462 return n;
22463}
22464
22465static NODE *
22466nd_set_loc(NODE *nd, const YYLTYPE *loc)
22467{
22468 nd->nd_loc = *loc;
22469 nd_set_line(nd, loc->beg_pos.lineno);
22470 return nd;
22471}
22472
22473static NODE*
22474node_newnode(struct parser_params *p, enum node_type type, size_t size, size_t alignment, const rb_code_location_t *loc)
22475{
22476 NODE *n = node_new_internal(p, type, size, alignment);
22477
22478 nd_set_loc(n, loc);
22479 nd_set_node_id(n, parser_get_node_id(p));
22480 return n;
22481}
22482
22483#define NODE_NEWNODE(node_type, type, loc) (type *)(node_newnode(p, node_type, sizeof(type), RUBY_ALIGNOF(type), loc))
22484
22485static rb_node_scope_t *
22486rb_node_scope_new(struct parser_params *p, rb_node_args_t *nd_args, NODE *nd_body, const YYLTYPE *loc)
22487{
22488 rb_ast_id_table_t *nd_tbl;
22489 nd_tbl = local_tbl(p);
22490 rb_node_scope_t *n = NODE_NEWNODE(NODE_SCOPE, rb_node_scope_t, loc);
22491 n->nd_tbl = nd_tbl;
22492 n->nd_body = nd_body;
22493 n->nd_args = nd_args;
22494
22495 return n;
22496}
22497
22498static rb_node_scope_t *
22499rb_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)
22500{
22501 rb_node_scope_t *n = NODE_NEWNODE(NODE_SCOPE, rb_node_scope_t, loc);
22502 n->nd_tbl = nd_tbl;
22503 n->nd_body = nd_body;
22504 n->nd_args = nd_args;
22505
22506 return n;
22507}
22508
22509static rb_node_defn_t *
22510rb_node_defn_new(struct parser_params *p, ID nd_mid, NODE *nd_defn, const YYLTYPE *loc)
22511{
22512 rb_node_defn_t *n = NODE_NEWNODE(NODE_DEFN, rb_node_defn_t, loc);
22513 n->nd_mid = nd_mid;
22514 n->nd_defn = nd_defn;
22515
22516 return n;
22517}
22518
22519static rb_node_defs_t *
22520rb_node_defs_new(struct parser_params *p, NODE *nd_recv, ID nd_mid, NODE *nd_defn, const YYLTYPE *loc)
22521{
22522 rb_node_defs_t *n = NODE_NEWNODE(NODE_DEFS, rb_node_defs_t, loc);
22523 n->nd_recv = nd_recv;
22524 n->nd_mid = nd_mid;
22525 n->nd_defn = nd_defn;
22526
22527 return n;
22528}
22529
22530static rb_node_block_t *
22531rb_node_block_new(struct parser_params *p, NODE *nd_head, const YYLTYPE *loc)
22532{
22533 rb_node_block_t *n = NODE_NEWNODE(NODE_BLOCK, rb_node_block_t, loc);
22534 n->nd_head = nd_head;
22535 n->nd_end = (NODE *)n;
22536 n->nd_next = 0;
22537
22538 return n;
22539}
22540
22541static rb_node_for_t *
22542rb_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)
22543{
22544 rb_node_for_t *n = NODE_NEWNODE(NODE_FOR, rb_node_for_t, loc);
22545 n->nd_body = nd_body;
22546 n->nd_iter = nd_iter;
22547 n->for_keyword_loc = *for_keyword_loc;
22548 n->in_keyword_loc = *in_keyword_loc;
22549 n->do_keyword_loc = *do_keyword_loc;
22550 n->end_keyword_loc = *end_keyword_loc;
22551
22552 return n;
22553}
22554
22555static rb_node_for_masgn_t *
22556rb_node_for_masgn_new(struct parser_params *p, NODE *nd_var, const YYLTYPE *loc)
22557{
22558 rb_node_for_masgn_t *n = NODE_NEWNODE(NODE_FOR_MASGN, rb_node_for_masgn_t, loc);
22559 n->nd_var = nd_var;
22560
22561 return n;
22562}
22563
22564static rb_node_retry_t *
22565rb_node_retry_new(struct parser_params *p, const YYLTYPE *loc)
22566{
22567 rb_node_retry_t *n = NODE_NEWNODE(NODE_RETRY, rb_node_retry_t, loc);
22568
22569 return n;
22570}
22571
22572static rb_node_begin_t *
22573rb_node_begin_new(struct parser_params *p, NODE *nd_body, const YYLTYPE *loc)
22574{
22575 rb_node_begin_t *n = NODE_NEWNODE(NODE_BEGIN, rb_node_begin_t, loc);
22576 n->nd_body = nd_body;
22577
22578 return n;
22579}
22580
22581static rb_node_rescue_t *
22582rb_node_rescue_new(struct parser_params *p, NODE *nd_head, NODE *nd_resq, NODE *nd_else, const YYLTYPE *loc)
22583{
22584 rb_node_rescue_t *n = NODE_NEWNODE(NODE_RESCUE, rb_node_rescue_t, loc);
22585 n->nd_head = nd_head;
22586 n->nd_resq = nd_resq;
22587 n->nd_else = nd_else;
22588
22589 return n;
22590}
22591
22592static rb_node_resbody_t *
22593rb_node_resbody_new(struct parser_params *p, NODE *nd_args, NODE *nd_exc_var, NODE *nd_body, NODE *nd_next, const YYLTYPE *loc)
22594{
22595 rb_node_resbody_t *n = NODE_NEWNODE(NODE_RESBODY, rb_node_resbody_t, loc);
22596 n->nd_args = nd_args;
22597 n->nd_exc_var = nd_exc_var;
22598 n->nd_body = nd_body;
22599 n->nd_next = nd_next;
22600
22601 return n;
22602}
22603
22604static rb_node_ensure_t *
22605rb_node_ensure_new(struct parser_params *p, NODE *nd_head, NODE *nd_ensr, const YYLTYPE *loc)
22606{
22607 rb_node_ensure_t *n = NODE_NEWNODE(NODE_ENSURE, rb_node_ensure_t, loc);
22608 n->nd_head = nd_head;
22609 n->nd_ensr = nd_ensr;
22610
22611 return n;
22612}
22613
22614static rb_node_and_t *
22615rb_node_and_new(struct parser_params *p, NODE *nd_1st, NODE *nd_2nd, const YYLTYPE *loc, const YYLTYPE *operator_loc)
22616{
22617 rb_node_and_t *n = NODE_NEWNODE(NODE_AND, rb_node_and_t, loc);
22618 n->nd_1st = nd_1st;
22619 n->nd_2nd = nd_2nd;
22620 n->operator_loc = *operator_loc;
22621
22622 return n;
22623}
22624
22625static rb_node_or_t *
22626rb_node_or_new(struct parser_params *p, NODE *nd_1st, NODE *nd_2nd, const YYLTYPE *loc, const YYLTYPE *operator_loc)
22627{
22628 rb_node_or_t *n = NODE_NEWNODE(NODE_OR, rb_node_or_t, loc);
22629 n->nd_1st = nd_1st;
22630 n->nd_2nd = nd_2nd;
22631 n->operator_loc = *operator_loc;
22632
22633 return n;
22634}
22635
22636static rb_node_return_t *
22637rb_node_return_new(struct parser_params *p, NODE *nd_stts, const YYLTYPE *loc, const YYLTYPE *keyword_loc)
22638{
22639 rb_node_return_t *n = NODE_NEWNODE(NODE_RETURN, rb_node_return_t, loc);
22640 n->nd_stts = nd_stts;
22641 n->keyword_loc = *keyword_loc;
22642 return n;
22643}
22644
22645static rb_node_yield_t *
22646rb_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)
22647{
22648 if (nd_head) no_blockarg(p, nd_head);
22649
22650 rb_node_yield_t *n = NODE_NEWNODE(NODE_YIELD, rb_node_yield_t, loc);
22651 n->nd_head = nd_head;
22652 n->keyword_loc = *keyword_loc;
22653 n->lparen_loc = *lparen_loc;
22654 n->rparen_loc = *rparen_loc;
22655
22656 return n;
22657}
22658
22659static rb_node_if_t *
22660rb_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)
22661{
22662 rb_node_if_t *n = NODE_NEWNODE(NODE_IF, rb_node_if_t, loc);
22663 n->nd_cond = nd_cond;
22664 n->nd_body = nd_body;
22665 n->nd_else = nd_else;
22666 n->if_keyword_loc = *if_keyword_loc;
22667 n->then_keyword_loc = *then_keyword_loc;
22668 n->end_keyword_loc = *end_keyword_loc;
22669
22670 return n;
22671}
22672
22673static rb_node_unless_t *
22674rb_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)
22675{
22676 rb_node_unless_t *n = NODE_NEWNODE(NODE_UNLESS, rb_node_unless_t, loc);
22677 n->nd_cond = nd_cond;
22678 n->nd_body = nd_body;
22679 n->nd_else = nd_else;
22680 n->keyword_loc = *keyword_loc;
22681 n->then_keyword_loc = *then_keyword_loc;
22682 n->end_keyword_loc = *end_keyword_loc;
22683
22684 return n;
22685}
22686
22687static rb_node_class_t *
22688rb_node_class_new(struct parser_params *p, NODE *nd_cpath, NODE *nd_body, NODE *nd_super, const YYLTYPE *loc, const YYLTYPE *class_keyword_loc, const YYLTYPE *inheritance_operator_loc, const YYLTYPE *end_keyword_loc)
22689{
22690 /* Keep the order of node creation */
22691 NODE *scope = NEW_SCOPE(0, nd_body, loc);
22692 rb_node_class_t *n = NODE_NEWNODE(NODE_CLASS, rb_node_class_t, loc);
22693 n->nd_cpath = nd_cpath;
22694 n->nd_body = scope;
22695 n->nd_super = nd_super;
22696 n->class_keyword_loc = *class_keyword_loc;
22697 n->inheritance_operator_loc = *inheritance_operator_loc;
22698 n->end_keyword_loc = *end_keyword_loc;
22699
22700 return n;
22701}
22702
22703static rb_node_sclass_t *
22704rb_node_sclass_new(struct parser_params *p, NODE *nd_recv, NODE *nd_body, const YYLTYPE *loc)
22705{
22706 /* Keep the order of node creation */
22707 NODE *scope = NEW_SCOPE(0, nd_body, loc);
22708 rb_node_sclass_t *n = NODE_NEWNODE(NODE_SCLASS, rb_node_sclass_t, loc);
22709 n->nd_recv = nd_recv;
22710 n->nd_body = scope;
22711
22712 return n;
22713}
22714
22715static rb_node_module_t *
22716rb_node_module_new(struct parser_params *p, NODE *nd_cpath, NODE *nd_body, const YYLTYPE *loc)
22717{
22718 /* Keep the order of node creation */
22719 NODE *scope = NEW_SCOPE(0, nd_body, loc);
22720 rb_node_module_t *n = NODE_NEWNODE(NODE_MODULE, rb_node_module_t, loc);
22721 n->nd_cpath = nd_cpath;
22722 n->nd_body = scope;
22723
22724 return n;
22725}
22726
22727static rb_node_iter_t *
22728rb_node_iter_new(struct parser_params *p, rb_node_args_t *nd_args, NODE *nd_body, const YYLTYPE *loc)
22729{
22730 /* Keep the order of node creation */
22731 NODE *scope = NEW_SCOPE(nd_args, nd_body, loc);
22732 rb_node_iter_t *n = NODE_NEWNODE(NODE_ITER, rb_node_iter_t, loc);
22733 n->nd_body = scope;
22734 n->nd_iter = 0;
22735
22736 return n;
22737}
22738
22739static rb_node_lambda_t *
22740rb_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)
22741{
22742 /* Keep the order of node creation */
22743 NODE *scope = NEW_SCOPE(nd_args, nd_body, loc);
22744 YYLTYPE lambda_loc = code_loc_gen(operator_loc, closing_loc);
22745 rb_node_lambda_t *n = NODE_NEWNODE(NODE_LAMBDA, rb_node_lambda_t, &lambda_loc);
22746 n->nd_body = scope;
22747 n->operator_loc = *operator_loc;
22748 n->opening_loc = *opening_loc;
22749 n->closing_loc = *closing_loc;
22750
22751 return n;
22752}
22753
22754static rb_node_case_t *
22755rb_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)
22756{
22757 rb_node_case_t *n = NODE_NEWNODE(NODE_CASE, rb_node_case_t, loc);
22758 n->nd_head = nd_head;
22759 n->nd_body = nd_body;
22760 n->case_keyword_loc = *case_keyword_loc;
22761 n->end_keyword_loc = *end_keyword_loc;
22762
22763 return n;
22764}
22765
22766static rb_node_case2_t *
22767rb_node_case2_new(struct parser_params *p, NODE *nd_body, const YYLTYPE *loc, const YYLTYPE *case_keyword_loc, const YYLTYPE *end_keyword_loc)
22768{
22769 rb_node_case2_t *n = NODE_NEWNODE(NODE_CASE2, rb_node_case2_t, loc);
22770 n->nd_head = 0;
22771 n->nd_body = nd_body;
22772 n->case_keyword_loc = *case_keyword_loc;
22773 n->end_keyword_loc = *end_keyword_loc;
22774
22775 return n;
22776}
22777
22778static rb_node_case3_t *
22779rb_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)
22780{
22781 rb_node_case3_t *n = NODE_NEWNODE(NODE_CASE3, rb_node_case3_t, loc);
22782 n->nd_head = nd_head;
22783 n->nd_body = nd_body;
22784 n->case_keyword_loc = *case_keyword_loc;
22785 n->end_keyword_loc = *end_keyword_loc;
22786
22787 return n;
22788}
22789
22790static rb_node_when_t *
22791rb_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)
22792{
22793 rb_node_when_t *n = NODE_NEWNODE(NODE_WHEN, rb_node_when_t, loc);
22794 n->nd_head = nd_head;
22795 n->nd_body = nd_body;
22796 n->nd_next = nd_next;
22797 n->keyword_loc = *keyword_loc;
22798 n->then_keyword_loc = *then_keyword_loc;
22799
22800 return n;
22801}
22802
22803static rb_node_in_t *
22804rb_node_in_new(struct parser_params *p, NODE *nd_head, NODE *nd_body, NODE *nd_next, const YYLTYPE *loc)
22805{
22806 rb_node_in_t *n = NODE_NEWNODE(NODE_IN, rb_node_in_t, loc);
22807 n->nd_head = nd_head;
22808 n->nd_body = nd_body;
22809 n->nd_next = nd_next;
22810
22811 return n;
22812}
22813
22814static rb_node_while_t *
22815rb_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)
22816{
22817 rb_node_while_t *n = NODE_NEWNODE(NODE_WHILE, rb_node_while_t, loc);
22818 n->nd_cond = nd_cond;
22819 n->nd_body = nd_body;
22820 n->nd_state = nd_state;
22821 n->keyword_loc = *keyword_loc;
22822 n->closing_loc = *closing_loc;
22823
22824 return n;
22825}
22826
22827static rb_node_until_t *
22828rb_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)
22829{
22830 rb_node_until_t *n = NODE_NEWNODE(NODE_UNTIL, rb_node_until_t, loc);
22831 n->nd_cond = nd_cond;
22832 n->nd_body = nd_body;
22833 n->nd_state = nd_state;
22834 n->keyword_loc = *keyword_loc;
22835 n->closing_loc = *closing_loc;
22836
22837 return n;
22838}
22839
22840static rb_node_colon2_t *
22841rb_node_colon2_new(struct parser_params *p, NODE *nd_head, ID nd_mid, const YYLTYPE *loc, const YYLTYPE *delimiter_loc, const YYLTYPE *name_loc)
22842{
22843 rb_node_colon2_t *n = NODE_NEWNODE(NODE_COLON2, rb_node_colon2_t, loc);
22844 n->nd_head = nd_head;
22845 n->nd_mid = nd_mid;
22846 n->delimiter_loc = *delimiter_loc;
22847 n->name_loc = *name_loc;
22848
22849 return n;
22850}
22851
22852static rb_node_colon3_t *
22853rb_node_colon3_new(struct parser_params *p, ID nd_mid, const YYLTYPE *loc, const YYLTYPE *delimiter_loc, const YYLTYPE *name_loc)
22854{
22855 rb_node_colon3_t *n = NODE_NEWNODE(NODE_COLON3, rb_node_colon3_t, loc);
22856 n->nd_mid = nd_mid;
22857 n->delimiter_loc = *delimiter_loc;
22858 n->name_loc = *name_loc;
22859
22860 return n;
22861}
22862
22863static rb_node_dot2_t *
22864rb_node_dot2_new(struct parser_params *p, NODE *nd_beg, NODE *nd_end, const YYLTYPE *loc, const YYLTYPE *operator_loc)
22865{
22866 rb_node_dot2_t *n = NODE_NEWNODE(NODE_DOT2, rb_node_dot2_t, loc);
22867 n->nd_beg = nd_beg;
22868 n->nd_end = nd_end;
22869 n->operator_loc = *operator_loc;
22870
22871 return n;
22872}
22873
22874static rb_node_dot3_t *
22875rb_node_dot3_new(struct parser_params *p, NODE *nd_beg, NODE *nd_end, const YYLTYPE *loc, const YYLTYPE *operator_loc)
22876{
22877 rb_node_dot3_t *n = NODE_NEWNODE(NODE_DOT3, rb_node_dot3_t, loc);
22878 n->nd_beg = nd_beg;
22879 n->nd_end = nd_end;
22880 n->operator_loc = *operator_loc;
22881
22882 return n;
22883}
22884
22885static rb_node_self_t *
22886rb_node_self_new(struct parser_params *p, const YYLTYPE *loc)
22887{
22888 rb_node_self_t *n = NODE_NEWNODE(NODE_SELF, rb_node_self_t, loc);
22889 n->nd_state = 1;
22890
22891 return n;
22892}
22893
22894static rb_node_nil_t *
22895rb_node_nil_new(struct parser_params *p, const YYLTYPE *loc)
22896{
22897 rb_node_nil_t *n = NODE_NEWNODE(NODE_NIL, rb_node_nil_t, loc);
22898
22899 return n;
22900}
22901
22902static rb_node_true_t *
22903rb_node_true_new(struct parser_params *p, const YYLTYPE *loc)
22904{
22905 rb_node_true_t *n = NODE_NEWNODE(NODE_TRUE, rb_node_true_t, loc);
22906
22907 return n;
22908}
22909
22910static rb_node_false_t *
22911rb_node_false_new(struct parser_params *p, const YYLTYPE *loc)
22912{
22913 rb_node_false_t *n = NODE_NEWNODE(NODE_FALSE, rb_node_false_t, loc);
22914
22915 return n;
22916}
22917
22918static rb_node_super_t *
22919rb_node_super_new(struct parser_params *p, NODE *nd_args, const YYLTYPE *loc,
22920 const YYLTYPE *keyword_loc, const YYLTYPE *lparen_loc, const YYLTYPE *rparen_loc)
22921{
22922 rb_node_super_t *n = NODE_NEWNODE(NODE_SUPER, rb_node_super_t, loc);
22923 n->nd_args = nd_args;
22924 n->keyword_loc = *keyword_loc;
22925 n->lparen_loc = *lparen_loc;
22926 n->rparen_loc = *rparen_loc;
22927
22928 return n;
22929}
22930
22931static rb_node_zsuper_t *
22932rb_node_zsuper_new(struct parser_params *p, const YYLTYPE *loc)
22933{
22934 rb_node_zsuper_t *n = NODE_NEWNODE(NODE_ZSUPER, rb_node_zsuper_t, loc);
22935
22936 return n;
22937}
22938
22939static rb_node_match2_t *
22940rb_node_match2_new(struct parser_params *p, NODE *nd_recv, NODE *nd_value, const YYLTYPE *loc)
22941{
22942 rb_node_match2_t *n = NODE_NEWNODE(NODE_MATCH2, rb_node_match2_t, loc);
22943 n->nd_recv = nd_recv;
22944 n->nd_value = nd_value;
22945 n->nd_args = 0;
22946
22947 return n;
22948}
22949
22950static rb_node_match3_t *
22951rb_node_match3_new(struct parser_params *p, NODE *nd_recv, NODE *nd_value, const YYLTYPE *loc)
22952{
22953 rb_node_match3_t *n = NODE_NEWNODE(NODE_MATCH3, rb_node_match3_t, loc);
22954 n->nd_recv = nd_recv;
22955 n->nd_value = nd_value;
22956
22957 return n;
22958}
22959
22960/* TODO: Use union for NODE_LIST2 */
22961static rb_node_list_t *
22962rb_node_list_new(struct parser_params *p, NODE *nd_head, const YYLTYPE *loc)
22963{
22964 rb_node_list_t *n = NODE_NEWNODE(NODE_LIST, rb_node_list_t, loc);
22965 n->nd_head = nd_head;
22966 n->as.nd_alen = 1;
22967 n->nd_next = 0;
22968
22969 return n;
22970}
22971
22972static rb_node_list_t *
22973rb_node_list_new2(struct parser_params *p, NODE *nd_head, long nd_alen, NODE *nd_next, const YYLTYPE *loc)
22974{
22975 rb_node_list_t *n = NODE_NEWNODE(NODE_LIST, rb_node_list_t, loc);
22976 n->nd_head = nd_head;
22977 n->as.nd_alen = nd_alen;
22978 n->nd_next = nd_next;
22979
22980 return n;
22981}
22982
22983static rb_node_zlist_t *
22984rb_node_zlist_new(struct parser_params *p, const YYLTYPE *loc)
22985{
22986 rb_node_zlist_t *n = NODE_NEWNODE(NODE_ZLIST, rb_node_zlist_t, loc);
22987
22988 return n;
22989}
22990
22991static rb_node_hash_t *
22992rb_node_hash_new(struct parser_params *p, NODE *nd_head, const YYLTYPE *loc)
22993{
22994 rb_node_hash_t *n = NODE_NEWNODE(NODE_HASH, rb_node_hash_t, loc);
22995 n->nd_head = nd_head;
22996 n->nd_brace = 0;
22997
22998 return n;
22999}
23000
23001static rb_node_masgn_t *
23002rb_node_masgn_new(struct parser_params *p, NODE *nd_head, NODE *nd_args, const YYLTYPE *loc)
23003{
23004 rb_node_masgn_t *n = NODE_NEWNODE(NODE_MASGN, rb_node_masgn_t, loc);
23005 n->nd_head = nd_head;
23006 n->nd_value = 0;
23007 n->nd_args = nd_args;
23008
23009 return n;
23010}
23011
23012static rb_node_gasgn_t *
23013rb_node_gasgn_new(struct parser_params *p, ID nd_vid, NODE *nd_value, const YYLTYPE *loc)
23014{
23015 rb_node_gasgn_t *n = NODE_NEWNODE(NODE_GASGN, rb_node_gasgn_t, loc);
23016 n->nd_vid = nd_vid;
23017 n->nd_value = nd_value;
23018
23019 return n;
23020}
23021
23022static rb_node_lasgn_t *
23023rb_node_lasgn_new(struct parser_params *p, ID nd_vid, NODE *nd_value, const YYLTYPE *loc)
23024{
23025 rb_node_lasgn_t *n = NODE_NEWNODE(NODE_LASGN, rb_node_lasgn_t, loc);
23026 n->nd_vid = nd_vid;
23027 n->nd_value = nd_value;
23028
23029 return n;
23030}
23031
23032static rb_node_dasgn_t *
23033rb_node_dasgn_new(struct parser_params *p, ID nd_vid, NODE *nd_value, const YYLTYPE *loc)
23034{
23035 rb_node_dasgn_t *n = NODE_NEWNODE(NODE_DASGN, rb_node_dasgn_t, loc);
23036 n->nd_vid = nd_vid;
23037 n->nd_value = nd_value;
23038
23039 return n;
23040}
23041
23042static rb_node_iasgn_t *
23043rb_node_iasgn_new(struct parser_params *p, ID nd_vid, NODE *nd_value, const YYLTYPE *loc)
23044{
23045 rb_node_iasgn_t *n = NODE_NEWNODE(NODE_IASGN, rb_node_iasgn_t, loc);
23046 n->nd_vid = nd_vid;
23047 n->nd_value = nd_value;
23048
23049 return n;
23050}
23051
23052static rb_node_cvasgn_t *
23053rb_node_cvasgn_new(struct parser_params *p, ID nd_vid, NODE *nd_value, const YYLTYPE *loc)
23054{
23055 rb_node_cvasgn_t *n = NODE_NEWNODE(NODE_CVASGN, rb_node_cvasgn_t, loc);
23056 n->nd_vid = nd_vid;
23057 n->nd_value = nd_value;
23058
23059 return n;
23060}
23061
23062static rb_node_op_asgn1_t *
23063rb_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)
23064{
23065 rb_node_op_asgn1_t *n = NODE_NEWNODE(NODE_OP_ASGN1, rb_node_op_asgn1_t, loc);
23066 n->nd_recv = nd_recv;
23067 n->nd_mid = nd_mid;
23068 n->nd_index = index;
23069 n->nd_rvalue = rvalue;
23070 n->call_operator_loc = *call_operator_loc;
23071 n->opening_loc = *opening_loc;
23072 n->closing_loc = *closing_loc;
23073 n->binary_operator_loc = *binary_operator_loc;
23074
23075 return n;
23076}
23077
23078static rb_node_op_asgn2_t *
23079rb_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)
23080{
23081 rb_node_op_asgn2_t *n = NODE_NEWNODE(NODE_OP_ASGN2, rb_node_op_asgn2_t, loc);
23082 n->nd_recv = nd_recv;
23083 n->nd_value = nd_value;
23084 n->nd_vid = nd_vid;
23085 n->nd_mid = nd_mid;
23086 n->nd_aid = nd_aid;
23087 n->call_operator_loc = *call_operator_loc;
23088 n->message_loc = *message_loc;
23089 n->binary_operator_loc = *binary_operator_loc;
23090
23091 return n;
23092}
23093
23094static rb_node_op_asgn_or_t *
23095rb_node_op_asgn_or_new(struct parser_params *p, NODE *nd_head, NODE *nd_value, const YYLTYPE *loc)
23096{
23097 rb_node_op_asgn_or_t *n = NODE_NEWNODE(NODE_OP_ASGN_OR, rb_node_op_asgn_or_t, loc);
23098 n->nd_head = nd_head;
23099 n->nd_value = nd_value;
23100
23101 return n;
23102}
23103
23104static rb_node_op_asgn_and_t *
23105rb_node_op_asgn_and_new(struct parser_params *p, NODE *nd_head, NODE *nd_value, const YYLTYPE *loc)
23106{
23107 rb_node_op_asgn_and_t *n = NODE_NEWNODE(NODE_OP_ASGN_AND, rb_node_op_asgn_and_t, loc);
23108 n->nd_head = nd_head;
23109 n->nd_value = nd_value;
23110
23111 return n;
23112}
23113
23114static rb_node_gvar_t *
23115rb_node_gvar_new(struct parser_params *p, ID nd_vid, const YYLTYPE *loc)
23116{
23117 rb_node_gvar_t *n = NODE_NEWNODE(NODE_GVAR, rb_node_gvar_t, loc);
23118 n->nd_vid = nd_vid;
23119
23120 return n;
23121}
23122
23123static rb_node_lvar_t *
23124rb_node_lvar_new(struct parser_params *p, ID nd_vid, const YYLTYPE *loc)
23125{
23126 rb_node_lvar_t *n = NODE_NEWNODE(NODE_LVAR, rb_node_lvar_t, loc);
23127 n->nd_vid = nd_vid;
23128
23129 return n;
23130}
23131
23132static rb_node_dvar_t *
23133rb_node_dvar_new(struct parser_params *p, ID nd_vid, const YYLTYPE *loc)
23134{
23135 rb_node_dvar_t *n = NODE_NEWNODE(NODE_DVAR, rb_node_dvar_t, loc);
23136 n->nd_vid = nd_vid;
23137
23138 return n;
23139}
23140
23141static rb_node_ivar_t *
23142rb_node_ivar_new(struct parser_params *p, ID nd_vid, const YYLTYPE *loc)
23143{
23144 rb_node_ivar_t *n = NODE_NEWNODE(NODE_IVAR, rb_node_ivar_t, loc);
23145 n->nd_vid = nd_vid;
23146
23147 return n;
23148}
23149
23150static rb_node_const_t *
23151rb_node_const_new(struct parser_params *p, ID nd_vid, const YYLTYPE *loc)
23152{
23153 rb_node_const_t *n = NODE_NEWNODE(NODE_CONST, rb_node_const_t, loc);
23154 n->nd_vid = nd_vid;
23155
23156 return n;
23157}
23158
23159static rb_node_cvar_t *
23160rb_node_cvar_new(struct parser_params *p, ID nd_vid, const YYLTYPE *loc)
23161{
23162 rb_node_cvar_t *n = NODE_NEWNODE(NODE_CVAR, rb_node_cvar_t, loc);
23163 n->nd_vid = nd_vid;
23164
23165 return n;
23166}
23167
23168static rb_node_nth_ref_t *
23169rb_node_nth_ref_new(struct parser_params *p, long nd_nth, const YYLTYPE *loc)
23170{
23171 rb_node_nth_ref_t *n = NODE_NEWNODE(NODE_NTH_REF, rb_node_nth_ref_t, loc);
23172 n->nd_nth = nd_nth;
23173
23174 return n;
23175}
23176
23177static rb_node_back_ref_t *
23178rb_node_back_ref_new(struct parser_params *p, long nd_nth, const YYLTYPE *loc)
23179{
23180 rb_node_back_ref_t *n = NODE_NEWNODE(NODE_BACK_REF, rb_node_back_ref_t, loc);
23181 n->nd_nth = nd_nth;
23182
23183 return n;
23184}
23185
23186static rb_node_integer_t *
23187rb_node_integer_new(struct parser_params *p, char* val, int base, const YYLTYPE *loc)
23188{
23189 rb_node_integer_t *n = NODE_NEWNODE(NODE_INTEGER, rb_node_integer_t, loc);
23190 n->val = val;
23191 n->minus = FALSE;
23192 n->base = base;
23193
23194 return n;
23195}
23196
23197static rb_node_float_t *
23198rb_node_float_new(struct parser_params *p, char* val, const YYLTYPE *loc)
23199{
23200 rb_node_float_t *n = NODE_NEWNODE(NODE_FLOAT, rb_node_float_t, loc);
23201 n->val = val;
23202 n->minus = FALSE;
23203
23204 return n;
23205}
23206
23207static rb_node_rational_t *
23208rb_node_rational_new(struct parser_params *p, char* val, int base, int seen_point, const YYLTYPE *loc)
23209{
23210 rb_node_rational_t *n = NODE_NEWNODE(NODE_RATIONAL, rb_node_rational_t, loc);
23211 n->val = val;
23212 n->minus = FALSE;
23213 n->base = base;
23214 n->seen_point = seen_point;
23215
23216 return n;
23217}
23218
23219static rb_node_imaginary_t *
23220rb_node_imaginary_new(struct parser_params *p, char* val, int base, int seen_point, enum rb_numeric_type numeric_type, const YYLTYPE *loc)
23221{
23222 rb_node_imaginary_t *n = NODE_NEWNODE(NODE_IMAGINARY, rb_node_imaginary_t, loc);
23223 n->val = val;
23224 n->minus = FALSE;
23225 n->base = base;
23226 n->seen_point = seen_point;
23227 n->type = numeric_type;
23228
23229 return n;
23230}
23231
23232static rb_node_str_t *
23233rb_node_str_new(struct parser_params *p, rb_parser_string_t *string, const YYLTYPE *loc)
23234{
23235 rb_node_str_t *n = NODE_NEWNODE(NODE_STR, rb_node_str_t, loc);
23236 n->string = string;
23237
23238 return n;
23239}
23240
23241/* TODO; Use union for NODE_DSTR2 */
23242static rb_node_dstr_t *
23243rb_node_dstr_new0(struct parser_params *p, rb_parser_string_t *string, long nd_alen, NODE *nd_next, const YYLTYPE *loc)
23244{
23245 rb_node_dstr_t *n = NODE_NEWNODE(NODE_DSTR, rb_node_dstr_t, loc);
23246 n->string = string;
23247 n->as.nd_alen = nd_alen;
23248 n->nd_next = (rb_node_list_t *)nd_next;
23249
23250 return n;
23251}
23252
23253static rb_node_dstr_t *
23254rb_node_dstr_new(struct parser_params *p, rb_parser_string_t *string, const YYLTYPE *loc)
23255{
23256 return rb_node_dstr_new0(p, string, 1, 0, loc);
23257}
23258
23259static rb_node_xstr_t *
23260rb_node_xstr_new(struct parser_params *p, rb_parser_string_t *string, const YYLTYPE *loc)
23261{
23262 rb_node_xstr_t *n = NODE_NEWNODE(NODE_XSTR, rb_node_xstr_t, loc);
23263 n->string = string;
23264
23265 return n;
23266}
23267
23268static rb_node_dxstr_t *
23269rb_node_dxstr_new(struct parser_params *p, rb_parser_string_t *string, long nd_alen, NODE *nd_next, const YYLTYPE *loc)
23270{
23271 rb_node_dxstr_t *n = NODE_NEWNODE(NODE_DXSTR, rb_node_dxstr_t, loc);
23272 n->string = string;
23273 n->as.nd_alen = nd_alen;
23274 n->nd_next = (rb_node_list_t *)nd_next;
23275
23276 return n;
23277}
23278
23279static rb_node_sym_t *
23280rb_node_sym_new(struct parser_params *p, VALUE str, const YYLTYPE *loc)
23281{
23282 rb_node_sym_t *n = NODE_NEWNODE(NODE_SYM, rb_node_sym_t, loc);
23283 n->string = rb_str_to_parser_string(p, str);
23284
23285 return n;
23286}
23287
23288static rb_node_dsym_t *
23289rb_node_dsym_new(struct parser_params *p, rb_parser_string_t *string, long nd_alen, NODE *nd_next, const YYLTYPE *loc)
23290{
23291 rb_node_dsym_t *n = NODE_NEWNODE(NODE_DSYM, rb_node_dsym_t, loc);
23292 n->string = string;
23293 n->as.nd_alen = nd_alen;
23294 n->nd_next = (rb_node_list_t *)nd_next;
23295
23296 return n;
23297}
23298
23299static rb_node_evstr_t *
23300rb_node_evstr_new(struct parser_params *p, NODE *nd_body, const YYLTYPE *loc, const YYLTYPE *opening_loc, const YYLTYPE *closing_loc)
23301{
23302 rb_node_evstr_t *n = NODE_NEWNODE(NODE_EVSTR, rb_node_evstr_t, loc);
23303 n->nd_body = nd_body;
23304 n->opening_loc = *opening_loc;
23305 n->closing_loc = *closing_loc;
23306
23307 return n;
23308}
23309
23310static rb_node_regx_t *
23311rb_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)
23312{
23313 rb_node_regx_t *n = NODE_NEWNODE(NODE_REGX, rb_node_regx_t, loc);
23314 n->string = string;
23315 n->options = options & RE_OPTION_MASK;
23316 n->opening_loc = *opening_loc;
23317 n->content_loc = *content_loc;
23318 n->closing_loc = *closing_loc;
23319
23320 return n;
23321}
23322
23323static rb_node_call_t *
23324rb_node_call_new(struct parser_params *p, NODE *nd_recv, ID nd_mid, NODE *nd_args, const YYLTYPE *loc)
23325{
23326 rb_node_call_t *n = NODE_NEWNODE(NODE_CALL, rb_node_call_t, loc);
23327 n->nd_recv = nd_recv;
23328 n->nd_mid = nd_mid;
23329 n->nd_args = nd_args;
23330
23331 return n;
23332}
23333
23334static rb_node_opcall_t *
23335rb_node_opcall_new(struct parser_params *p, NODE *nd_recv, ID nd_mid, NODE *nd_args, const YYLTYPE *loc)
23336{
23337 rb_node_opcall_t *n = NODE_NEWNODE(NODE_OPCALL, rb_node_opcall_t, loc);
23338 n->nd_recv = nd_recv;
23339 n->nd_mid = nd_mid;
23340 n->nd_args = nd_args;
23341
23342 return n;
23343}
23344
23345static rb_node_fcall_t *
23346rb_node_fcall_new(struct parser_params *p, ID nd_mid, NODE *nd_args, const YYLTYPE *loc)
23347{
23348 rb_node_fcall_t *n = NODE_NEWNODE(NODE_FCALL, rb_node_fcall_t, loc);
23349 n->nd_mid = nd_mid;
23350 n->nd_args = nd_args;
23351
23352 return n;
23353}
23354
23355static rb_node_qcall_t *
23356rb_node_qcall_new(struct parser_params *p, NODE *nd_recv, ID nd_mid, NODE *nd_args, const YYLTYPE *loc)
23357{
23358 rb_node_qcall_t *n = NODE_NEWNODE(NODE_QCALL, rb_node_qcall_t, loc);
23359 n->nd_recv = nd_recv;
23360 n->nd_mid = nd_mid;
23361 n->nd_args = nd_args;
23362
23363 return n;
23364}
23365
23366static rb_node_vcall_t *
23367rb_node_vcall_new(struct parser_params *p, ID nd_mid, const YYLTYPE *loc)
23368{
23369 rb_node_vcall_t *n = NODE_NEWNODE(NODE_VCALL, rb_node_vcall_t, loc);
23370 n->nd_mid = nd_mid;
23371
23372 return n;
23373}
23374
23375static rb_node_once_t *
23376rb_node_once_new(struct parser_params *p, NODE *nd_body, const YYLTYPE *loc)
23377{
23378 rb_node_once_t *n = NODE_NEWNODE(NODE_ONCE, rb_node_once_t, loc);
23379 n->nd_body = nd_body;
23380
23381 return n;
23382}
23383
23384static rb_node_args_t *
23385rb_node_args_new(struct parser_params *p, const YYLTYPE *loc)
23386{
23387 rb_node_args_t *n = NODE_NEWNODE(NODE_ARGS, rb_node_args_t, loc);
23388 MEMZERO(&n->nd_ainfo, struct rb_args_info, 1);
23389
23390 return n;
23391}
23392
23393static rb_node_args_aux_t *
23394rb_node_args_aux_new(struct parser_params *p, ID nd_pid, int nd_plen, const YYLTYPE *loc)
23395{
23396 rb_node_args_aux_t *n = NODE_NEWNODE(NODE_ARGS_AUX, rb_node_args_aux_t, loc);
23397 n->nd_pid = nd_pid;
23398 n->nd_plen = nd_plen;
23399 n->nd_next = 0;
23400
23401 return n;
23402}
23403
23404static rb_node_opt_arg_t *
23405rb_node_opt_arg_new(struct parser_params *p, NODE *nd_body, const YYLTYPE *loc)
23406{
23407 rb_node_opt_arg_t *n = NODE_NEWNODE(NODE_OPT_ARG, rb_node_opt_arg_t, loc);
23408 n->nd_body = nd_body;
23409 n->nd_next = 0;
23410
23411 return n;
23412}
23413
23414static rb_node_kw_arg_t *
23415rb_node_kw_arg_new(struct parser_params *p, NODE *nd_body, const YYLTYPE *loc)
23416{
23417 rb_node_kw_arg_t *n = NODE_NEWNODE(NODE_KW_ARG, rb_node_kw_arg_t, loc);
23418 n->nd_body = nd_body;
23419 n->nd_next = 0;
23420
23421 return n;
23422}
23423
23424static rb_node_postarg_t *
23425rb_node_postarg_new(struct parser_params *p, NODE *nd_1st, NODE *nd_2nd, const YYLTYPE *loc)
23426{
23427 rb_node_postarg_t *n = NODE_NEWNODE(NODE_POSTARG, rb_node_postarg_t, loc);
23428 n->nd_1st = nd_1st;
23429 n->nd_2nd = nd_2nd;
23430
23431 return n;
23432}
23433
23434static rb_node_argscat_t *
23435rb_node_argscat_new(struct parser_params *p, NODE *nd_head, NODE *nd_body, const YYLTYPE *loc)
23436{
23437 rb_node_argscat_t *n = NODE_NEWNODE(NODE_ARGSCAT, rb_node_argscat_t, loc);
23438 n->nd_head = nd_head;
23439 n->nd_body = nd_body;
23440
23441 return n;
23442}
23443
23444static rb_node_argspush_t *
23445rb_node_argspush_new(struct parser_params *p, NODE *nd_head, NODE *nd_body, const YYLTYPE *loc)
23446{
23447 rb_node_argspush_t *n = NODE_NEWNODE(NODE_ARGSPUSH, rb_node_argspush_t, loc);
23448 n->nd_head = nd_head;
23449 n->nd_body = nd_body;
23450
23451 return n;
23452}
23453
23454static rb_node_splat_t *
23455rb_node_splat_new(struct parser_params *p, NODE *nd_head, const YYLTYPE *loc, const YYLTYPE *operator_loc)
23456{
23457 rb_node_splat_t *n = NODE_NEWNODE(NODE_SPLAT, rb_node_splat_t, loc);
23458 n->nd_head = nd_head;
23459 n->operator_loc = *operator_loc;
23460
23461 return n;
23462}
23463
23464static rb_node_block_pass_t *
23465rb_node_block_pass_new(struct parser_params *p, NODE *nd_body, const YYLTYPE *loc, const YYLTYPE *operator_loc)
23466{
23467 rb_node_block_pass_t *n = NODE_NEWNODE(NODE_BLOCK_PASS, rb_node_block_pass_t, loc);
23468 n->forwarding = 0;
23469 n->nd_head = 0;
23470 n->nd_body = nd_body;
23471 n->operator_loc = *operator_loc;
23472
23473 return n;
23474}
23475
23476static rb_node_alias_t *
23477rb_node_alias_new(struct parser_params *p, NODE *nd_1st, NODE *nd_2nd, const YYLTYPE *loc, const YYLTYPE *keyword_loc)
23478{
23479 rb_node_alias_t *n = NODE_NEWNODE(NODE_ALIAS, rb_node_alias_t, loc);
23480 n->nd_1st = nd_1st;
23481 n->nd_2nd = nd_2nd;
23482 n->keyword_loc = *keyword_loc;
23483
23484 return n;
23485}
23486
23487static rb_node_valias_t *
23488rb_node_valias_new(struct parser_params *p, ID nd_alias, ID nd_orig, const YYLTYPE *loc, const YYLTYPE *keyword_loc)
23489{
23490 rb_node_valias_t *n = NODE_NEWNODE(NODE_VALIAS, rb_node_valias_t, loc);
23491 n->nd_alias = nd_alias;
23492 n->nd_orig = nd_orig;
23493 n->keyword_loc = *keyword_loc;
23494
23495 return n;
23496}
23497
23498static rb_node_undef_t *
23499rb_node_undef_new(struct parser_params *p, NODE *nd_undef, const YYLTYPE *loc)
23500{
23501 rb_node_undef_t *n = NODE_NEWNODE(NODE_UNDEF, rb_node_undef_t, loc);
23502 n->nd_undefs = rb_parser_ary_new_capa_for_node(p, 1);
23503 n->keyword_loc = NULL_LOC;
23504 rb_parser_ary_push_node(p, n->nd_undefs, nd_undef);
23505
23506 return n;
23507}
23508
23509static rb_node_errinfo_t *
23510rb_node_errinfo_new(struct parser_params *p, const YYLTYPE *loc)
23511{
23512 rb_node_errinfo_t *n = NODE_NEWNODE(NODE_ERRINFO, rb_node_errinfo_t, loc);
23513
23514 return n;
23515}
23516
23517static rb_node_defined_t *
23518rb_node_defined_new(struct parser_params *p, NODE *nd_head, const YYLTYPE *loc, const YYLTYPE *keyword_loc)
23519{
23520 rb_node_defined_t *n = NODE_NEWNODE(NODE_DEFINED, rb_node_defined_t, loc);
23521 n->nd_head = nd_head;
23522 n->keyword_loc = *keyword_loc;
23523
23524 return n;
23525}
23526
23527static rb_node_postexe_t *
23528rb_node_postexe_new(struct parser_params *p, NODE *nd_body, const YYLTYPE *loc, const YYLTYPE *keyword_loc, const YYLTYPE *opening_loc, const YYLTYPE *closing_loc)
23529{
23530 rb_node_postexe_t *n = NODE_NEWNODE(NODE_POSTEXE, rb_node_postexe_t, loc);
23531 n->nd_body = nd_body;
23532 n->keyword_loc = *keyword_loc;
23533 n->opening_loc = *opening_loc;
23534 n->closing_loc = *closing_loc;
23535
23536 return n;
23537}
23538
23539static rb_node_attrasgn_t *
23540rb_node_attrasgn_new(struct parser_params *p, NODE *nd_recv, ID nd_mid, NODE *nd_args, const YYLTYPE *loc)
23541{
23542 rb_node_attrasgn_t *n = NODE_NEWNODE(NODE_ATTRASGN, rb_node_attrasgn_t, loc);
23543 n->nd_recv = nd_recv;
23544 n->nd_mid = nd_mid;
23545 n->nd_args = nd_args;
23546
23547 return n;
23548}
23549
23550static rb_node_aryptn_t *
23551rb_node_aryptn_new(struct parser_params *p, NODE *pre_args, NODE *rest_arg, NODE *post_args, const YYLTYPE *loc)
23552{
23553 rb_node_aryptn_t *n = NODE_NEWNODE(NODE_ARYPTN, rb_node_aryptn_t, loc);
23554 n->nd_pconst = 0;
23555 n->pre_args = pre_args;
23556 n->rest_arg = rest_arg;
23557 n->post_args = post_args;
23558
23559 return n;
23560}
23561
23562static rb_node_hshptn_t *
23563rb_node_hshptn_new(struct parser_params *p, NODE *nd_pconst, NODE *nd_pkwargs, NODE *nd_pkwrestarg, const YYLTYPE *loc)
23564{
23565 rb_node_hshptn_t *n = NODE_NEWNODE(NODE_HSHPTN, rb_node_hshptn_t, loc);
23566 n->nd_pconst = nd_pconst;
23567 n->nd_pkwargs = nd_pkwargs;
23568 n->nd_pkwrestarg = nd_pkwrestarg;
23569
23570 return n;
23571}
23572
23573static rb_node_fndptn_t *
23574rb_node_fndptn_new(struct parser_params *p, NODE *pre_rest_arg, NODE *args, NODE *post_rest_arg, const YYLTYPE *loc)
23575{
23576 rb_node_fndptn_t *n = NODE_NEWNODE(NODE_FNDPTN, rb_node_fndptn_t, loc);
23577 n->nd_pconst = 0;
23578 n->pre_rest_arg = pre_rest_arg;
23579 n->args = args;
23580 n->post_rest_arg = post_rest_arg;
23581
23582 return n;
23583}
23584
23585static rb_node_line_t *
23586rb_node_line_new(struct parser_params *p, const YYLTYPE *loc)
23587{
23588 rb_node_line_t *n = NODE_NEWNODE(NODE_LINE, rb_node_line_t, loc);
23589
23590 return n;
23591}
23592
23593static rb_node_file_t *
23594rb_node_file_new(struct parser_params *p, VALUE str, const YYLTYPE *loc)
23595{
23596 rb_node_file_t *n = NODE_NEWNODE(NODE_FILE, rb_node_file_t, loc);
23597 n->path = rb_str_to_parser_string(p, str);
23598
23599 return n;
23600}
23601
23602static rb_node_encoding_t *
23603rb_node_encoding_new(struct parser_params *p, const YYLTYPE *loc)
23604{
23605 rb_node_encoding_t *n = NODE_NEWNODE(NODE_ENCODING, rb_node_encoding_t, loc);
23606 n->enc = p->enc;
23607
23608 return n;
23609}
23610
23611static rb_node_cdecl_t *
23612rb_node_cdecl_new(struct parser_params *p, ID nd_vid, NODE *nd_value, NODE *nd_else, enum rb_parser_shareability shareability, const YYLTYPE *loc)
23613{
23614 rb_node_cdecl_t *n = NODE_NEWNODE(NODE_CDECL, rb_node_cdecl_t, loc);
23615 n->nd_vid = nd_vid;
23616 n->nd_value = nd_value;
23617 n->nd_else = nd_else;
23618 n->shareability = shareability;
23619
23620 return n;
23621}
23622
23623static rb_node_op_cdecl_t *
23624rb_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)
23625{
23626 rb_node_op_cdecl_t *n = NODE_NEWNODE(NODE_OP_CDECL, rb_node_op_cdecl_t, loc);
23627 n->nd_head = nd_head;
23628 n->nd_value = nd_value;
23629 n->nd_aid = nd_aid;
23630 n->shareability = shareability;
23631
23632 return n;
23633}
23634
23635static rb_node_error_t *
23636rb_node_error_new(struct parser_params *p, const YYLTYPE *loc)
23637{
23638 rb_node_error_t *n = NODE_NEWNODE(NODE_ERROR, rb_node_error_t, loc);
23639
23640 return n;
23641}
23642
23643static rb_node_break_t *
23644rb_node_break_new(struct parser_params *p, NODE *nd_stts, const YYLTYPE *loc, const YYLTYPE *keyword_loc)
23645{
23646 rb_node_break_t *n = NODE_NEWNODE(NODE_BREAK, rb_node_break_t, loc);
23647 n->nd_stts = nd_stts;
23648 n->nd_chain = 0;
23649 n->keyword_loc = *keyword_loc;
23650
23651 return n;
23652}
23653
23654static rb_node_next_t *
23655rb_node_next_new(struct parser_params *p, NODE *nd_stts, const YYLTYPE *loc, const YYLTYPE *keyword_loc)
23656{
23657 rb_node_next_t *n = NODE_NEWNODE(NODE_NEXT, rb_node_next_t, loc);
23658 n->nd_stts = nd_stts;
23659 n->nd_chain = 0;
23660 n->keyword_loc = *keyword_loc;
23661
23662 return n;
23663}
23664
23665static rb_node_redo_t *
23666rb_node_redo_new(struct parser_params *p, const YYLTYPE *loc, const YYLTYPE *keyword_loc)
23667{
23668 rb_node_redo_t *n = NODE_NEWNODE(NODE_REDO, rb_node_redo_t, loc);
23669 n->nd_chain = 0;
23670 n->keyword_loc = *keyword_loc;
23671
23672 return n;
23673}
23674
23675static rb_node_def_temp_t *
23676rb_node_def_temp_new(struct parser_params *p, const YYLTYPE *loc)
23677{
23678 rb_node_def_temp_t *n = NODE_NEWNODE((enum node_type)NODE_DEF_TEMP, rb_node_def_temp_t, loc);
23679 n->save.numparam_save = 0;
23680 n->save.max_numparam = 0;
23681 n->save.ctxt = p->ctxt;
23682 n->nd_def = 0;
23683 n->nd_mid = 0;
23684
23685 return n;
23686}
23687
23688static rb_node_def_temp_t *
23689def_head_save(struct parser_params *p, rb_node_def_temp_t *n)
23690{
23691 n->save.numparam_save = numparam_push(p);
23692 n->save.max_numparam = p->max_numparam;
23693 return n;
23694}
23695
23696#ifndef RIPPER
23697static enum node_type
23698nodetype(NODE *node) /* for debug */
23699{
23700 return (enum node_type)nd_type(node);
23701}
23702
23703static int
23704nodeline(NODE *node)
23705{
23706 return nd_line(node);
23707}
23708#endif
23709
23710static NODE*
23711newline_node(NODE *node)
23712{
23713 if (node) {
23714 node = remove_begin(node);
23715 nd_set_fl_newline(node);
23716 }
23717 return node;
23718}
23719
23720static void
23721fixpos(NODE *node, NODE *orig)
23722{
23723 if (!node) return;
23724 if (!orig) return;
23725 nd_set_line(node, nd_line(orig));
23726}
23727
23728static NODE*
23729block_append(struct parser_params *p, NODE *head, NODE *tail)
23730{
23731 NODE *end, *h = head, *nd;
23732
23733 if (tail == 0) return head;
23734
23735 if (h == 0) return tail;
23736 switch (nd_type(h)) {
23737 default:
23738 h = end = NEW_BLOCK(head, &head->nd_loc);
23739 head = end;
23740 break;
23741 case NODE_BLOCK:
23742 end = RNODE_BLOCK(h)->nd_end;
23743 break;
23744 }
23745
23746 nd = RNODE_BLOCK(end)->nd_head;
23747 switch (nd_type(nd)) {
23748 case NODE_RETURN:
23749 case NODE_BREAK:
23750 case NODE_NEXT:
23751 case NODE_REDO:
23752 case NODE_RETRY:
23753 rb_warning0L(nd_line(tail), "statement not reached");
23754 break;
23755
23756 default:
23757 break;
23758 }
23759
23760 if (!nd_type_p(tail, NODE_BLOCK)) {
23761 tail = NEW_BLOCK(tail, &tail->nd_loc);
23762 }
23763 RNODE_BLOCK(end)->nd_next = tail;
23764 RNODE_BLOCK(h)->nd_end = RNODE_BLOCK(tail)->nd_end;
23765 nd_set_last_loc(head, nd_last_loc(tail));
23766 return head;
23767}
23768
23769/* append item to the list */
23770static NODE*
23771list_append(struct parser_params *p, NODE *list, NODE *item)
23772{
23773 NODE *last;
23774
23775 if (list == 0) return NEW_LIST(item, &item->nd_loc);
23776 if (RNODE_LIST(list)->nd_next) {
23777 last = RNODE_LIST(RNODE_LIST(list)->nd_next)->as.nd_end;
23778 }
23779 else {
23780 last = list;
23781 }
23782
23783 RNODE_LIST(list)->as.nd_alen += 1;
23784 RNODE_LIST(last)->nd_next = NEW_LIST(item, &item->nd_loc);
23785 RNODE_LIST(RNODE_LIST(list)->nd_next)->as.nd_end = RNODE_LIST(last)->nd_next;
23786
23787 nd_set_last_loc(list, nd_last_loc(item));
23788
23789 return list;
23790}
23791
23792/* concat two lists */
23793static NODE*
23794list_concat(NODE *head, NODE *tail)
23795{
23796 NODE *last;
23797
23798 if (RNODE_LIST(head)->nd_next) {
23799 last = RNODE_LIST(RNODE_LIST(head)->nd_next)->as.nd_end;
23800 }
23801 else {
23802 last = head;
23803 }
23804
23805 RNODE_LIST(head)->as.nd_alen += RNODE_LIST(tail)->as.nd_alen;
23806 RNODE_LIST(last)->nd_next = tail;
23807 if (RNODE_LIST(tail)->nd_next) {
23808 RNODE_LIST(RNODE_LIST(head)->nd_next)->as.nd_end = RNODE_LIST(RNODE_LIST(tail)->nd_next)->as.nd_end;
23809 }
23810 else {
23811 RNODE_LIST(RNODE_LIST(head)->nd_next)->as.nd_end = tail;
23812 }
23813
23814 nd_set_last_loc(head, nd_last_loc(tail));
23815
23816 return head;
23817}
23818
23819static int
23820literal_concat0(struct parser_params *p, rb_parser_string_t *head, rb_parser_string_t *tail)
23821{
23822 if (!tail) return 1;
23823 if (!rb_parser_enc_compatible(p, head, tail)) {
23824 compile_error(p, "string literal encodings differ (%s / %s)",
23825 rb_enc_name(rb_parser_str_get_encoding(head)),
23826 rb_enc_name(rb_parser_str_get_encoding(tail)));
23827 rb_parser_str_resize(p, head, 0);
23828 rb_parser_str_resize(p, tail, 0);
23829 return 0;
23830 }
23831 rb_parser_str_buf_append(p, head, tail);
23832 return 1;
23833}
23834
23835static rb_parser_string_t *
23836string_literal_head(struct parser_params *p, enum node_type htype, NODE *head)
23837{
23838 if (htype != NODE_DSTR) return NULL;
23839 if (RNODE_DSTR(head)->nd_next) {
23840 head = RNODE_LIST(RNODE_LIST(RNODE_DSTR(head)->nd_next)->as.nd_end)->nd_head;
23841 if (!head || !nd_type_p(head, NODE_STR)) return NULL;
23842 }
23843 rb_parser_string_t *lit = RNODE_DSTR(head)->string;
23844 ASSUME(lit);
23845 return lit;
23846}
23847
23848#ifndef RIPPER
23849static rb_parser_string_t *
23850rb_parser_string_deep_copy(struct parser_params *p, const rb_parser_string_t *orig)
23851{
23852 rb_parser_string_t *copy;
23853 if (!orig) return NULL;
23854 copy = rb_parser_string_new(p, PARSER_STRING_PTR(orig), PARSER_STRING_LEN(orig));
23855 copy->coderange = orig->coderange;
23856 copy->enc = orig->enc;
23857 return copy;
23858}
23859#endif
23860
23861/* concat two string literals */
23862static NODE *
23863literal_concat(struct parser_params *p, NODE *head, NODE *tail, const YYLTYPE *loc)
23864{
23865 enum node_type htype;
23866 rb_parser_string_t *lit;
23867
23868 if (!head) return tail;
23869 if (!tail) return head;
23870
23871 htype = nd_type(head);
23872 if (htype == NODE_EVSTR) {
23873 head = new_dstr(p, head, loc);
23874 htype = NODE_DSTR;
23875 }
23876 if (p->heredoc_indent > 0) {
23877 switch (htype) {
23878 case NODE_STR:
23879 head = str2dstr(p, head);
23880 case NODE_DSTR:
23881 return list_append(p, head, tail);
23882 default:
23883 break;
23884 }
23885 }
23886 switch (nd_type(tail)) {
23887 case NODE_STR:
23888 if ((lit = string_literal_head(p, htype, head)) != false) {
23889 htype = NODE_STR;
23890 }
23891 else {
23892 lit = RNODE_DSTR(head)->string;
23893 }
23894 if (htype == NODE_STR) {
23895 if (!literal_concat0(p, lit, RNODE_STR(tail)->string)) {
23896 error:
23897 rb_discard_node(p, head);
23898 rb_discard_node(p, tail);
23899 return 0;
23900 }
23901 rb_discard_node(p, tail);
23902 }
23903 else {
23904 list_append(p, head, tail);
23905 }
23906 break;
23907
23908 case NODE_DSTR:
23909 if (htype == NODE_STR) {
23910 if (!literal_concat0(p, RNODE_STR(head)->string, RNODE_DSTR(tail)->string))
23911 goto error;
23912 rb_parser_string_free(p, RNODE_DSTR(tail)->string);
23913 RNODE_DSTR(tail)->string = RNODE_STR(head)->string;
23914 RNODE_STR(head)->string = NULL;
23915 rb_discard_node(p, head);
23916 head = tail;
23917 }
23918 else if (!RNODE_DSTR(tail)->string) {
23919 append:
23920 RNODE_DSTR(head)->as.nd_alen += RNODE_DSTR(tail)->as.nd_alen - 1;
23921 if (!RNODE_DSTR(head)->nd_next) {
23922 RNODE_DSTR(head)->nd_next = RNODE_DSTR(tail)->nd_next;
23923 }
23924 else if (RNODE_DSTR(tail)->nd_next) {
23925 RNODE_DSTR(RNODE_DSTR(RNODE_DSTR(head)->nd_next)->as.nd_end)->nd_next = RNODE_DSTR(tail)->nd_next;
23926 RNODE_DSTR(RNODE_DSTR(head)->nd_next)->as.nd_end = RNODE_DSTR(RNODE_DSTR(tail)->nd_next)->as.nd_end;
23927 }
23928 rb_discard_node(p, tail);
23929 }
23930 else if ((lit = string_literal_head(p, htype, head)) != false) {
23931 if (!literal_concat0(p, lit, RNODE_DSTR(tail)->string))
23932 goto error;
23933 rb_parser_string_free(p, RNODE_DSTR(tail)->string);
23934 RNODE_DSTR(tail)->string = 0;
23935 goto append;
23936 }
23937 else {
23938 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));
23939 RNODE_DSTR(tail)->string = 0;
23940 }
23941 break;
23942
23943 case NODE_EVSTR:
23944 if (htype == NODE_STR) {
23945 head = str2dstr(p, head);
23946 RNODE_DSTR(head)->as.nd_alen = 1;
23947 }
23948 list_append(p, head, tail);
23949 break;
23950 }
23951 return head;
23952}
23953
23954static void
23955nd_copy_flag(NODE *new_node, NODE *old_node)
23956{
23957 if (nd_fl_newline(old_node)) nd_set_fl_newline(new_node);
23958 nd_set_line(new_node, nd_line(old_node));
23959 new_node->nd_loc = old_node->nd_loc;
23960 new_node->node_id = old_node->node_id;
23961}
23962
23963static NODE *
23964str2dstr(struct parser_params *p, NODE *node)
23965{
23966 NODE *new_node = (NODE *)NODE_NEW_INTERNAL(NODE_DSTR, rb_node_dstr_t);
23967 nd_copy_flag(new_node, node);
23968 RNODE_DSTR(new_node)->string = RNODE_STR(node)->string;
23969 RNODE_DSTR(new_node)->as.nd_alen = 0;
23970 RNODE_DSTR(new_node)->nd_next = 0;
23971 RNODE_STR(node)->string = 0;
23972
23973 return new_node;
23974}
23975
23976static NODE *
23977str2regx(struct parser_params *p, NODE *node, int options, const YYLTYPE *loc, const YYLTYPE *opening_loc, const YYLTYPE *content_loc, const YYLTYPE *closing_loc)
23978{
23979 NODE *new_node = (NODE *)NODE_NEW_INTERNAL(NODE_REGX, rb_node_regx_t);
23980 nd_copy_flag(new_node, node);
23981 RNODE_REGX(new_node)->string = RNODE_STR(node)->string;
23982 RNODE_REGX(new_node)->options = options;
23983 nd_set_loc(new_node, loc);
23984 RNODE_REGX(new_node)->opening_loc = *opening_loc;
23985 RNODE_REGX(new_node)->content_loc = *content_loc;
23986 RNODE_REGX(new_node)->closing_loc = *closing_loc;
23987 RNODE_STR(node)->string = 0;
23988
23989 return new_node;
23990}
23991
23992static NODE *
23993evstr2dstr(struct parser_params *p, NODE *node)
23994{
23995 if (nd_type_p(node, NODE_EVSTR)) {
23996 node = new_dstr(p, node, &node->nd_loc);
23997 }
23998 return node;
23999}
24000
24001static NODE *
24002new_evstr(struct parser_params *p, NODE *node, const YYLTYPE *loc, const YYLTYPE *opening_loc, const YYLTYPE *closing_loc)
24003{
24004 NODE *head = node;
24005
24006 if (node) {
24007 switch (nd_type(node)) {
24008 case NODE_STR:
24009 return str2dstr(p, node);
24010 case NODE_DSTR:
24011 break;
24012 case NODE_EVSTR:
24013 return node;
24014 }
24015 }
24016 return NEW_EVSTR(head, loc, opening_loc, closing_loc);
24017}
24018
24019static NODE *
24020new_dstr(struct parser_params *p, NODE *node, const YYLTYPE *loc)
24021{
24022 NODE *dstr = NEW_DSTR(STRING_NEW0(), loc);
24023 return list_append(p, dstr, node);
24024}
24025
24026static NODE *
24027call_bin_op(struct parser_params *p, NODE *recv, ID id, NODE *arg1,
24028 const YYLTYPE *op_loc, const YYLTYPE *loc)
24029{
24030 NODE *expr;
24031 value_expr(recv);
24032 value_expr(arg1);
24033 expr = NEW_OPCALL(recv, id, NEW_LIST(arg1, &arg1->nd_loc), loc);
24034 nd_set_line(expr, op_loc->beg_pos.lineno);
24035 return expr;
24036}
24037
24038static NODE *
24039call_uni_op(struct parser_params *p, NODE *recv, ID id, const YYLTYPE *op_loc, const YYLTYPE *loc)
24040{
24041 NODE *opcall;
24042 value_expr(recv);
24043 opcall = NEW_OPCALL(recv, id, 0, loc);
24044 nd_set_line(opcall, op_loc->beg_pos.lineno);
24045 return opcall;
24046}
24047
24048static NODE *
24049new_qcall(struct parser_params* p, ID atype, NODE *recv, ID mid, NODE *args, const YYLTYPE *op_loc, const YYLTYPE *loc)
24050{
24051 NODE *qcall = NEW_QCALL(atype, recv, mid, args, loc);
24052 nd_set_line(qcall, op_loc->beg_pos.lineno);
24053 return qcall;
24054}
24055
24056static NODE*
24057new_command_qcall(struct parser_params* p, ID atype, NODE *recv, ID mid, NODE *args, NODE *block, const YYLTYPE *op_loc, const YYLTYPE *loc)
24058{
24059 NODE *ret;
24060 if (block) block_dup_check(p, args, block);
24061 ret = new_qcall(p, atype, recv, mid, args, op_loc, loc);
24062 if (block) ret = method_add_block(p, ret, block, loc);
24063 fixpos(ret, recv);
24064 return ret;
24065}
24066
24068new_locations_lambda_body(struct parser_params* p, NODE *node, const YYLTYPE *loc, const YYLTYPE *opening_loc, const YYLTYPE *closing_loc)
24069{
24071 body->node = node;
24072 body->opening_loc = *opening_loc;
24073 body->closing_loc = *closing_loc;
24074 return body;
24075}
24076
24077#define nd_once_body(node) (nd_type_p((node), NODE_ONCE) ? RNODE_ONCE(node)->nd_body : node)
24078
24079static NODE*
24080last_expr_once_body(NODE *node)
24081{
24082 if (!node) return 0;
24083 return nd_once_body(node);
24084}
24085
24086static NODE*
24087match_op(struct parser_params *p, NODE *node1, NODE *node2, const YYLTYPE *op_loc, const YYLTYPE *loc)
24088{
24089 NODE *n;
24090 int line = op_loc->beg_pos.lineno;
24091
24092 value_expr(node1);
24093 value_expr(node2);
24094
24095 if ((n = last_expr_once_body(node1)) != 0) {
24096 switch (nd_type(n)) {
24097 case NODE_DREGX:
24098 {
24099 NODE *match = NEW_MATCH2(node1, node2, loc);
24100 nd_set_line(match, line);
24101 return match;
24102 }
24103
24104 case NODE_REGX:
24105 {
24106 const VALUE lit = rb_node_regx_string_val(n);
24107 if (!NIL_P(lit)) {
24108 NODE *match = NEW_MATCH2(node1, node2, loc);
24109 RNODE_MATCH2(match)->nd_args = reg_named_capture_assign(p, lit, loc, assignable);
24110 nd_set_line(match, line);
24111 return match;
24112 }
24113 }
24114 }
24115 }
24116
24117 if ((n = last_expr_once_body(node2)) != 0) {
24118 NODE *match3;
24119
24120 switch (nd_type(n)) {
24121 case NODE_DREGX:
24122 match3 = NEW_MATCH3(node2, node1, loc);
24123 return match3;
24124 }
24125 }
24126
24127 n = NEW_CALL(node1, tMATCH, NEW_LIST(node2, &node2->nd_loc), loc);
24128 nd_set_line(n, line);
24129 return n;
24130}
24131
24132# if WARN_PAST_SCOPE
24133static int
24134past_dvar_p(struct parser_params *p, ID id)
24135{
24136 struct vtable *past = p->lvtbl->past;
24137 while (past) {
24138 if (vtable_included(past, id)) return 1;
24139 past = past->prev;
24140 }
24141 return 0;
24142}
24143# endif
24144
24145static int
24146numparam_nested_p(struct parser_params *p)
24147{
24148 struct local_vars *local = p->lvtbl;
24149 NODE *outer = local->numparam.outer;
24150 NODE *inner = local->numparam.inner;
24151 if (outer || inner) {
24152 NODE *used = outer ? outer : inner;
24153 compile_error(p, "numbered parameter is already used in %s block\n"
24154 "%s:%d: numbered parameter is already used here",
24155 outer ? "outer" : "inner",
24156 p->ruby_sourcefile, nd_line(used));
24157 parser_show_error_line(p, &used->nd_loc);
24158 return 1;
24159 }
24160 return 0;
24161}
24162
24163static int
24164numparam_used_p(struct parser_params *p)
24165{
24166 NODE *numparam = p->lvtbl->numparam.current;
24167 if (numparam) {
24168 compile_error(p, "'it' is not allowed when a numbered parameter is already used\n"
24169 "%s:%d: numbered parameter is already used here",
24170 p->ruby_sourcefile, nd_line(numparam));
24171 parser_show_error_line(p, &numparam->nd_loc);
24172 return 1;
24173 }
24174 return 0;
24175}
24176
24177static int
24178it_used_p(struct parser_params *p)
24179{
24180 NODE *it = p->lvtbl->it;
24181 if (it) {
24182 compile_error(p, "numbered parameters are not allowed when 'it' is already used\n"
24183 "%s:%d: 'it' is already used here",
24184 p->ruby_sourcefile, nd_line(it));
24185 parser_show_error_line(p, &it->nd_loc);
24186 return 1;
24187 }
24188 return 0;
24189}
24190
24191static NODE*
24192gettable(struct parser_params *p, ID id, const YYLTYPE *loc)
24193{
24194 ID *vidp = NULL;
24195 NODE *node;
24196 switch (id) {
24197 case keyword_self:
24198 return NEW_SELF(loc);
24199 case keyword_nil:
24200 return NEW_NIL(loc);
24201 case keyword_true:
24202 return NEW_TRUE(loc);
24203 case keyword_false:
24204 return NEW_FALSE(loc);
24205 case keyword__FILE__:
24206 {
24207 VALUE file = p->ruby_sourcefile_string;
24208 if (NIL_P(file))
24209 file = rb_str_new(0, 0);
24210 node = NEW_FILE(file, loc);
24211 }
24212 return node;
24213 case keyword__LINE__:
24214 return NEW_LINE(loc);
24215 case keyword__ENCODING__:
24216 return NEW_ENCODING(loc);
24217
24218 }
24219 switch (id_type(id)) {
24220 case ID_LOCAL:
24221 if (dyna_in_block(p) && dvar_defined_ref(p, id, &vidp)) {
24222 if (NUMPARAM_ID_P(id) && (numparam_nested_p(p) || it_used_p(p))) return 0;
24223 if (vidp) *vidp |= LVAR_USED;
24224 node = NEW_DVAR(id, loc);
24225 return node;
24226 }
24227 if (local_id_ref(p, id, &vidp)) {
24228 if (vidp) *vidp |= LVAR_USED;
24229 node = NEW_LVAR(id, loc);
24230 return node;
24231 }
24232 if (dyna_in_block(p) && NUMPARAM_ID_P(id) &&
24233 parser_numbered_param(p, NUMPARAM_ID_TO_IDX(id))) {
24234 if (numparam_nested_p(p) || it_used_p(p)) return 0;
24235 node = NEW_DVAR(id, loc);
24236 struct local_vars *local = p->lvtbl;
24237 if (!local->numparam.current) local->numparam.current = node;
24238 return node;
24239 }
24240# if WARN_PAST_SCOPE
24241 if (!p->ctxt.in_defined && RTEST(ruby_verbose) && past_dvar_p(p, id)) {
24242 rb_warning1("possible reference to past scope - %"PRIsWARN, rb_id2str(id));
24243 }
24244# endif
24245 /* method call without arguments */
24246 if (dyna_in_block(p) && id == rb_intern("it") && !(DVARS_TERMINAL_P(p->lvtbl->args) || DVARS_TERMINAL_P(p->lvtbl->args->prev))) {
24247 if (numparam_used_p(p)) return 0;
24248 if (p->max_numparam == ORDINAL_PARAM) {
24249 compile_error(p, "ordinary parameter is defined");
24250 return 0;
24251 }
24252 if (!p->it_id) {
24253 p->it_id = internal_id(p);
24254 vtable_add(p->lvtbl->args, p->it_id);
24255 }
24256 NODE *node = NEW_DVAR(p->it_id, loc);
24257 if (!p->lvtbl->it) p->lvtbl->it = node;
24258 return node;
24259 }
24260 return NEW_VCALL(id, loc);
24261 case ID_GLOBAL:
24262 return NEW_GVAR(id, loc);
24263 case ID_INSTANCE:
24264 return NEW_IVAR(id, loc);
24265 case ID_CONST:
24266 return NEW_CONST(id, loc);
24267 case ID_CLASS:
24268 return NEW_CVAR(id, loc);
24269 }
24270 compile_error(p, "identifier %"PRIsVALUE" is not valid to get", rb_id2str(id));
24271 return 0;
24272}
24273
24274static rb_node_opt_arg_t *
24275opt_arg_append(rb_node_opt_arg_t *opt_list, rb_node_opt_arg_t *opt)
24276{
24277 rb_node_opt_arg_t *opts = opt_list;
24278 RNODE(opts)->nd_loc.end_pos = RNODE(opt)->nd_loc.end_pos;
24279
24280 while (opts->nd_next) {
24281 opts = opts->nd_next;
24282 RNODE(opts)->nd_loc.end_pos = RNODE(opt)->nd_loc.end_pos;
24283 }
24284 opts->nd_next = opt;
24285
24286 return opt_list;
24287}
24288
24289static rb_node_kw_arg_t *
24290kwd_append(rb_node_kw_arg_t *kwlist, rb_node_kw_arg_t *kw)
24291{
24292 if (kwlist) {
24293 /* Assume rb_node_kw_arg_t and rb_node_opt_arg_t has same structure */
24294 opt_arg_append(RNODE_OPT_ARG(kwlist), RNODE_OPT_ARG(kw));
24295 }
24296 return kwlist;
24297}
24298
24299static NODE *
24300new_defined(struct parser_params *p, NODE *expr, const YYLTYPE *loc, const YYLTYPE *keyword_loc)
24301{
24302 int had_trailing_semicolon = p->ctxt.has_trailing_semicolon;
24303 p->ctxt.has_trailing_semicolon = 0;
24304
24305 NODE *n = expr;
24306 while (n) {
24307 if (nd_type_p(n, NODE_BEGIN)) {
24308 n = RNODE_BEGIN(n)->nd_body;
24309 }
24310 else if (nd_type_p(n, NODE_BLOCK) && RNODE_BLOCK(n)->nd_end == n) {
24311 n = RNODE_BLOCK(n)->nd_head;
24312 }
24313 else {
24314 break;
24315 }
24316 }
24317
24318 if (had_trailing_semicolon && !nd_type_p(expr, NODE_BLOCK)) {
24319 NODE *block = NEW_BLOCK(expr, loc);
24320 return NEW_DEFINED(block, loc, keyword_loc);
24321 }
24322
24323 return NEW_DEFINED(n, loc, keyword_loc);
24324}
24325
24326static NODE*
24327str_to_sym_node(struct parser_params *p, NODE *node, const YYLTYPE *loc)
24328{
24329 VALUE lit;
24330 rb_parser_string_t *str = RNODE_STR(node)->string;
24331 if (rb_parser_enc_str_coderange(p, str) == RB_PARSER_ENC_CODERANGE_BROKEN) {
24332 yyerror1(loc, "invalid symbol");
24333 lit = STR_NEW0();
24334 }
24335 else {
24336 lit = rb_str_new_parser_string(str);
24337 }
24338 return NEW_SYM(lit, loc);
24339}
24340
24341static NODE*
24342symbol_append(struct parser_params *p, NODE *symbols, NODE *symbol)
24343{
24344 enum node_type type = nd_type(symbol);
24345 switch (type) {
24346 case NODE_DSTR:
24347 nd_set_type(symbol, NODE_DSYM);
24348 break;
24349 case NODE_STR:
24350 symbol = str_to_sym_node(p, symbol, &RNODE(symbol)->nd_loc);
24351 break;
24352 default:
24353 compile_error(p, "unexpected node as symbol: %s", parser_node_name(type));
24354 }
24355 return list_append(p, symbols, symbol);
24356}
24357
24358static void
24359dregex_fragment_setenc(struct parser_params *p, rb_node_dregx_t *const dreg, int options)
24360{
24361 if (dreg->string) {
24362 reg_fragment_setenc(p, dreg->string, options);
24363 }
24364 for (struct RNode_LIST *list = dreg->nd_next; list; list = RNODE_LIST(list->nd_next)) {
24365 NODE *frag = list->nd_head;
24366 if (nd_type_p(frag, NODE_STR)) {
24367 reg_fragment_setenc(p, RNODE_STR(frag)->string, options);
24368 }
24369 else if (nd_type_p(frag, NODE_DSTR)) {
24370 dregex_fragment_setenc(p, RNODE_DSTR(frag), options);
24371 }
24372 }
24373}
24374
24375static NODE *
24376new_regexp(struct parser_params *p, NODE *node, int options, const YYLTYPE *loc, const YYLTYPE *opening_loc, const YYLTYPE *content_loc, const YYLTYPE *closing_loc)
24377{
24378 if (!node) {
24379 /* Check string is valid regex */
24380 rb_parser_string_t *str = STRING_NEW0();
24381 reg_compile(p, str, options);
24382 node = NEW_REGX(str, options, loc, opening_loc, content_loc, closing_loc);
24383 return node;
24384 }
24385 switch (nd_type(node)) {
24386 case NODE_STR:
24387 {
24388 /* Check string is valid regex */
24389 reg_compile(p, RNODE_STR(node)->string, options);
24390 node = str2regx(p, node, options, loc, opening_loc, content_loc, closing_loc);
24391 }
24392 break;
24393 default:
24394 node = NEW_DSTR0(STRING_NEW0(), 1, NEW_LIST(node, loc), loc);
24395 /* fall through */
24396 case NODE_DSTR:
24397 nd_set_type(node, NODE_DREGX);
24398 nd_set_loc(node, loc);
24399 rb_node_dregx_t *const dreg = RNODE_DREGX(node);
24400 dreg->as.nd_cflag = options & RE_OPTION_MASK;
24401 if (dreg->nd_next) {
24402 dregex_fragment_setenc(p, dreg, options);
24403 }
24404 if (options & RE_OPTION_ONCE) {
24405 node = NEW_ONCE(node, loc);
24406 }
24407 break;
24408 }
24409 return node;
24410}
24411
24412static rb_node_kw_arg_t *
24413new_kw_arg(struct parser_params *p, NODE *k, const YYLTYPE *loc)
24414{
24415 if (!k) return 0;
24416 return NEW_KW_ARG((k), loc);
24417}
24418
24419static NODE *
24420new_xstring(struct parser_params *p, NODE *node, const YYLTYPE *loc)
24421{
24422 if (!node) {
24423 NODE *xstr = NEW_XSTR(STRING_NEW0(), loc);
24424 return xstr;
24425 }
24426 switch (nd_type(node)) {
24427 case NODE_STR:
24428 nd_set_type(node, NODE_XSTR);
24429 nd_set_loc(node, loc);
24430 break;
24431 case NODE_DSTR:
24432 nd_set_type(node, NODE_DXSTR);
24433 nd_set_loc(node, loc);
24434 break;
24435 default:
24436 node = NEW_DXSTR(0, 1, NEW_LIST(node, loc), loc);
24437 break;
24438 }
24439 return node;
24440}
24441
24442static const
24443struct st_hash_type literal_type = {
24444 literal_cmp,
24445 literal_hash,
24446};
24447
24448static int nd_type_st_key_enable_p(NODE *node);
24449
24450static void
24451check_literal_when(struct parser_params *p, NODE *arg, const YYLTYPE *loc)
24452{
24453 /* See https://bugs.ruby-lang.org/issues/20331 for discussion about what is warned. */
24454 if (!arg || !p->case_labels) return;
24455 if (!nd_type_st_key_enable_p(arg)) return;
24456
24457 if (p->case_labels == CHECK_LITERAL_WHEN) {
24458 p->case_labels = st_init_table(&literal_type);
24459 }
24460 else {
24461 st_data_t line;
24462 if (st_lookup(p->case_labels, (st_data_t)arg, &line)) {
24463 rb_warning2("'when' clause on line %d duplicates 'when' clause on line %d and is ignored",
24464 WARN_I((int)nd_line(arg)), WARN_I((int)line));
24465 return;
24466 }
24467 }
24468 st_insert(p->case_labels, (st_data_t)arg, (st_data_t)p->ruby_sourceline);
24469}
24470
24471#ifdef RIPPER
24472static int
24473id_is_var(struct parser_params *p, ID id)
24474{
24475 if (is_notop_id(id)) {
24476 switch (id & ID_SCOPE_MASK) {
24477 case ID_GLOBAL: case ID_INSTANCE: case ID_CONST: case ID_CLASS:
24478 return 1;
24479 case ID_LOCAL:
24480 if (dyna_in_block(p)) {
24481 if (NUMPARAM_ID_P(id) || dvar_defined(p, id)) return 1;
24482 }
24483 if (local_id(p, id)) return 1;
24484 /* method call without arguments */
24485 return 0;
24486 }
24487 }
24488 compile_error(p, "identifier %"PRIsVALUE" is not valid to get", rb_id2str(id));
24489 return 0;
24490}
24491#endif
24492
24493static inline enum lex_state_e
24494parser_set_lex_state(struct parser_params *p, enum lex_state_e ls, int line)
24495{
24496 if (p->debug) {
24497 ls = rb_parser_trace_lex_state(p, p->lex.state, ls, line);
24498 }
24499 return p->lex.state = ls;
24500}
24501
24502#ifndef RIPPER
24503static void
24504flush_debug_buffer(struct parser_params *p, VALUE out, VALUE str)
24505{
24506 VALUE mesg = p->debug_buffer;
24507
24508 if (!NIL_P(mesg) && RSTRING_LEN(mesg)) {
24509 p->debug_buffer = Qnil;
24510 rb_io_puts(1, &mesg, out);
24511 }
24512 if (!NIL_P(str) && RSTRING_LEN(str)) {
24513 rb_io_write(p->debug_output, str);
24514 }
24515}
24516
24517static const char rb_parser_lex_state_names[][8] = {
24518 "BEG", "END", "ENDARG", "ENDFN", "ARG",
24519 "CMDARG", "MID", "FNAME", "DOT", "CLASS",
24520 "LABEL", "LABELED","FITEM",
24521};
24522
24523static VALUE
24524append_lex_state_name(struct parser_params *p, enum lex_state_e state, VALUE buf)
24525{
24526 int i, sep = 0;
24527 unsigned int mask = 1;
24528 static const char none[] = "NONE";
24529
24530 for (i = 0; i < EXPR_MAX_STATE; ++i, mask <<= 1) {
24531 if ((unsigned)state & mask) {
24532 if (sep) {
24533 rb_str_cat(buf, "|", 1);
24534 }
24535 sep = 1;
24536 rb_str_cat_cstr(buf, rb_parser_lex_state_names[i]);
24537 }
24538 }
24539 if (!sep) {
24540 rb_str_cat(buf, none, sizeof(none)-1);
24541 }
24542 return buf;
24543}
24544
24545enum lex_state_e
24546rb_parser_trace_lex_state(struct parser_params *p, enum lex_state_e from,
24547 enum lex_state_e to, int line)
24548{
24549 VALUE mesg;
24550 mesg = rb_str_new_cstr("lex_state: ");
24551 append_lex_state_name(p, from, mesg);
24552 rb_str_cat_cstr(mesg, " -> ");
24553 append_lex_state_name(p, to, mesg);
24554 rb_str_catf(mesg, " at line %d\n", line);
24555 flush_debug_buffer(p, p->debug_output, mesg);
24556 return to;
24557}
24558
24559VALUE
24560rb_parser_lex_state_name(struct parser_params *p, enum lex_state_e state)
24561{
24562 return rb_str_to_interned_str(append_lex_state_name(p, state, rb_str_new(0, 0)));
24563}
24564
24565static void
24566append_bitstack_value(struct parser_params *p, stack_type stack, VALUE mesg)
24567{
24568 if (stack == 0) {
24569 rb_str_cat_cstr(mesg, "0");
24570 }
24571 else {
24572 stack_type mask = (stack_type)1U << (CHAR_BIT * sizeof(stack_type) - 1);
24573 for (; mask && !(stack & mask); mask >>= 1) continue;
24574 for (; mask; mask >>= 1) rb_str_cat(mesg, stack & mask ? "1" : "0", 1);
24575 }
24576}
24577
24578void
24579rb_parser_show_bitstack(struct parser_params *p, stack_type stack,
24580 const char *name, int line)
24581{
24582 VALUE mesg = rb_sprintf("%s: ", name);
24583 append_bitstack_value(p, stack, mesg);
24584 rb_str_catf(mesg, " at line %d\n", line);
24585 flush_debug_buffer(p, p->debug_output, mesg);
24586}
24587
24588void
24589rb_parser_fatal(struct parser_params *p, const char *fmt, ...)
24590{
24591 va_list ap;
24592 VALUE mesg = rb_str_new_cstr("internal parser error: ");
24593
24594 va_start(ap, fmt);
24595 rb_str_vcatf(mesg, fmt, ap);
24596 va_end(ap);
24597 yyerror0(RSTRING_PTR(mesg));
24598 RB_GC_GUARD(mesg);
24599
24600 mesg = rb_str_new(0, 0);
24601 append_lex_state_name(p, p->lex.state, mesg);
24602 compile_error(p, "lex.state: %"PRIsVALUE, mesg);
24603 rb_str_resize(mesg, 0);
24604 append_bitstack_value(p, p->cond_stack, mesg);
24605 compile_error(p, "cond_stack: %"PRIsVALUE, mesg);
24606 rb_str_resize(mesg, 0);
24607 append_bitstack_value(p, p->cmdarg_stack, mesg);
24608 compile_error(p, "cmdarg_stack: %"PRIsVALUE, mesg);
24609 if (p->debug_output == rb_ractor_stdout())
24610 p->debug_output = rb_ractor_stderr();
24611 p->debug = TRUE;
24612}
24613
24614static YYLTYPE *
24615rb_parser_set_pos(YYLTYPE *yylloc, int sourceline, int beg_pos, int end_pos)
24616{
24617 yylloc->beg_pos.lineno = sourceline;
24618 yylloc->beg_pos.column = beg_pos;
24619 yylloc->end_pos.lineno = sourceline;
24620 yylloc->end_pos.column = end_pos;
24621 return yylloc;
24622}
24623
24624YYLTYPE *
24625rb_parser_set_location_from_strterm_heredoc(struct parser_params *p, rb_strterm_heredoc_t *here, YYLTYPE *yylloc)
24626{
24627 int sourceline = here->sourceline;
24628 int beg_pos = (int)here->offset - here->quote
24629 - (rb_strlen_lit("<<-") - !(here->func & STR_FUNC_INDENT));
24630 int end_pos = (int)here->offset + here->length + here->quote;
24631
24632 return rb_parser_set_pos(yylloc, sourceline, beg_pos, end_pos);
24633}
24634
24635YYLTYPE *
24636rb_parser_set_location_of_delayed_token(struct parser_params *p, YYLTYPE *yylloc)
24637{
24638 yylloc->beg_pos.lineno = p->delayed.beg_line;
24639 yylloc->beg_pos.column = p->delayed.beg_col;
24640 yylloc->end_pos.lineno = p->delayed.end_line;
24641 yylloc->end_pos.column = p->delayed.end_col;
24642
24643 return yylloc;
24644}
24645
24646YYLTYPE *
24647rb_parser_set_location_of_heredoc_end(struct parser_params *p, YYLTYPE *yylloc)
24648{
24649 int sourceline = p->ruby_sourceline;
24650 int beg_pos = (int)(p->lex.ptok - p->lex.pbeg);
24651 int end_pos = (int)(p->lex.pend - p->lex.pbeg);
24652 return rb_parser_set_pos(yylloc, sourceline, beg_pos, end_pos);
24653}
24654
24655YYLTYPE *
24656rb_parser_set_location_of_dummy_end(struct parser_params *p, YYLTYPE *yylloc)
24657{
24658 yylloc->end_pos = yylloc->beg_pos;
24659
24660 return yylloc;
24661}
24662
24663YYLTYPE *
24664rb_parser_set_location_of_none(struct parser_params *p, YYLTYPE *yylloc)
24665{
24666 int sourceline = p->ruby_sourceline;
24667 int beg_pos = (int)(p->lex.ptok - p->lex.pbeg);
24668 int end_pos = (int)(p->lex.ptok - p->lex.pbeg);
24669 return rb_parser_set_pos(yylloc, sourceline, beg_pos, end_pos);
24670}
24671
24672YYLTYPE *
24673rb_parser_set_location(struct parser_params *p, YYLTYPE *yylloc)
24674{
24675 int sourceline = p->ruby_sourceline;
24676 int beg_pos = (int)(p->lex.ptok - p->lex.pbeg);
24677 int end_pos = (int)(p->lex.pcur - p->lex.pbeg);
24678 return rb_parser_set_pos(yylloc, sourceline, beg_pos, end_pos);
24679}
24680#endif /* !RIPPER */
24681
24682static int
24683assignable0(struct parser_params *p, ID id, const char **err)
24684{
24685 if (!id) return -1;
24686 switch (id) {
24687 case keyword_self:
24688 *err = "Can't change the value of self";
24689 return -1;
24690 case keyword_nil:
24691 *err = "Can't assign to nil";
24692 return -1;
24693 case keyword_true:
24694 *err = "Can't assign to true";
24695 return -1;
24696 case keyword_false:
24697 *err = "Can't assign to false";
24698 return -1;
24699 case keyword__FILE__:
24700 *err = "Can't assign to __FILE__";
24701 return -1;
24702 case keyword__LINE__:
24703 *err = "Can't assign to __LINE__";
24704 return -1;
24705 case keyword__ENCODING__:
24706 *err = "Can't assign to __ENCODING__";
24707 return -1;
24708 }
24709 switch (id_type(id)) {
24710 case ID_LOCAL:
24711 if (dyna_in_block(p)) {
24712 if (p->max_numparam > NO_PARAM && NUMPARAM_ID_P(id)) {
24713 compile_error(p, "Can't assign to numbered parameter _%d",
24714 NUMPARAM_ID_TO_IDX(id));
24715 return -1;
24716 }
24717 if (dvar_curr(p, id)) return NODE_DASGN;
24718 if (dvar_defined(p, id)) return NODE_DASGN;
24719 if (local_id(p, id)) return NODE_LASGN;
24720 dyna_var(p, id);
24721 return NODE_DASGN;
24722 }
24723 else {
24724 if (!local_id(p, id)) local_var(p, id);
24725 return NODE_LASGN;
24726 }
24727 break;
24728 case ID_GLOBAL: return NODE_GASGN;
24729 case ID_INSTANCE: return NODE_IASGN;
24730 case ID_CONST:
24731 if (!p->ctxt.in_def) return NODE_CDECL;
24732 *err = "dynamic constant assignment";
24733 return -1;
24734 case ID_CLASS: return NODE_CVASGN;
24735 default:
24736 compile_error(p, "identifier %"PRIsVALUE" is not valid to set", rb_id2str(id));
24737 }
24738 return -1;
24739}
24740
24741static NODE*
24742assignable(struct parser_params *p, ID id, NODE *val, const YYLTYPE *loc)
24743{
24744 const char *err = 0;
24745 int node_type = assignable0(p, id, &err);
24746 switch (node_type) {
24747 case NODE_DASGN: return NEW_DASGN(id, val, loc);
24748 case NODE_LASGN: return NEW_LASGN(id, val, loc);
24749 case NODE_GASGN: return NEW_GASGN(id, val, loc);
24750 case NODE_IASGN: return NEW_IASGN(id, val, loc);
24751 case NODE_CDECL: return NEW_CDECL(id, val, 0, p->ctxt.shareable_constant_value, loc);
24752 case NODE_CVASGN: return NEW_CVASGN(id, val, loc);
24753 }
24754/* TODO: FIXME */
24755#ifndef RIPPER
24756 if (err) yyerror1(loc, err);
24757#else
24758 if (err) set_value(assign_error(p, err, p->s_lvalue));
24759#endif
24760 return NEW_ERROR(loc);
24761}
24762
24763static int
24764is_private_local_id(struct parser_params *p, ID name)
24765{
24766 VALUE s;
24767 if (name == idUScore) return 1;
24768 if (!is_local_id(name)) return 0;
24769 s = rb_id2str(name);
24770 if (!s) return 0;
24771 return RSTRING_PTR(s)[0] == '_';
24772}
24773
24774static int
24775shadowing_lvar_0(struct parser_params *p, ID name)
24776{
24777 if (dyna_in_block(p)) {
24778 if (dvar_curr(p, name)) {
24779 if (is_private_local_id(p, name)) return 1;
24780 yyerror0("duplicated argument name");
24781 }
24782 else if (dvar_defined(p, name) || local_id(p, name)) {
24783 vtable_add(p->lvtbl->vars, name);
24784 if (p->lvtbl->used) {
24785 vtable_add(p->lvtbl->used, (ID)p->ruby_sourceline | LVAR_USED);
24786 }
24787 return 0;
24788 }
24789 }
24790 else {
24791 if (local_id(p, name)) {
24792 if (is_private_local_id(p, name)) return 1;
24793 yyerror0("duplicated argument name");
24794 }
24795 }
24796 return 1;
24797}
24798
24799static ID
24800shadowing_lvar(struct parser_params *p, ID name)
24801{
24802 shadowing_lvar_0(p, name);
24803 return name;
24804}
24805
24806static void
24807new_bv(struct parser_params *p, ID name)
24808{
24809 if (!name) return;
24810 if (!is_local_id(name)) {
24811 compile_error(p, "invalid local variable - %"PRIsVALUE,
24812 rb_id2str(name));
24813 return;
24814 }
24815 if (!shadowing_lvar_0(p, name)) return;
24816 dyna_var(p, name);
24817 ID *vidp = 0;
24818 if (dvar_defined_ref(p, name, &vidp)) {
24819 if (vidp) *vidp |= LVAR_USED;
24820 }
24821}
24822
24823static void
24824aryset_check(struct parser_params *p, NODE *args)
24825{
24826 NODE *block = 0, *kwds = 0;
24827 if (args && nd_type_p(args, NODE_BLOCK_PASS)) {
24828 block = RNODE_BLOCK_PASS(args)->nd_body;
24829 args = RNODE_BLOCK_PASS(args)->nd_head;
24830 }
24831 if (args && nd_type_p(args, NODE_ARGSCAT)) {
24832 args = RNODE_ARGSCAT(args)->nd_body;
24833 }
24834 if (args && nd_type_p(args, NODE_ARGSPUSH)) {
24835 kwds = RNODE_ARGSPUSH(args)->nd_body;
24836 }
24837 else {
24838 for (NODE *next = args; next && nd_type_p(next, NODE_LIST);
24839 next = RNODE_LIST(next)->nd_next) {
24840 kwds = RNODE_LIST(next)->nd_head;
24841 }
24842 }
24843 if (kwds && nd_type_p(kwds, NODE_HASH) && !RNODE_HASH(kwds)->nd_brace) {
24844 yyerror1(&kwds->nd_loc, "keyword arg given in index assignment");
24845 }
24846 if (block) {
24847 yyerror1(&block->nd_loc, "block arg given in index assignment");
24848 }
24849}
24850
24851static NODE *
24852aryset(struct parser_params *p, NODE *recv, NODE *idx, const YYLTYPE *loc)
24853{
24854 aryset_check(p, idx);
24855 return NEW_ATTRASGN(recv, tASET, idx, loc);
24856}
24857
24858static void
24859block_dup_check(struct parser_params *p, NODE *node1, NODE *node2)
24860{
24861 if (node2 && node1 && nd_type_p(node1, NODE_BLOCK_PASS)) {
24862 compile_error(p, "both block arg and actual block given");
24863 }
24864}
24865
24866static NODE *
24867attrset(struct parser_params *p, NODE *recv, ID atype, ID id, const YYLTYPE *loc)
24868{
24869 if (!CALL_Q_P(atype)) id = rb_id_attrset(id);
24870 return NEW_ATTRASGN(recv, id, 0, loc);
24871}
24872
24873static VALUE
24874rb_backref_error(struct parser_params *p, NODE *node)
24875{
24876#ifndef RIPPER
24877# define ERR(...) (compile_error(p, __VA_ARGS__), Qtrue)
24878#else
24879# define ERR(...) rb_sprintf(__VA_ARGS__)
24880#endif
24881 switch (nd_type(node)) {
24882 case NODE_NTH_REF:
24883 return ERR("Can't set variable $%ld", RNODE_NTH_REF(node)->nd_nth);
24884 case NODE_BACK_REF:
24885 return ERR("Can't set variable $%c", (int)RNODE_BACK_REF(node)->nd_nth);
24886 }
24887#undef ERR
24888 UNREACHABLE_RETURN(Qfalse); /* only called on syntax error */
24889}
24890
24891static NODE *
24892arg_append(struct parser_params *p, NODE *node1, NODE *node2, const YYLTYPE *loc)
24893{
24894 if (!node1) return NEW_LIST(node2, &node2->nd_loc);
24895 switch (nd_type(node1)) {
24896 case NODE_LIST:
24897 return list_append(p, node1, node2);
24898 case NODE_BLOCK_PASS:
24899 RNODE_BLOCK_PASS(node1)->nd_head = arg_append(p, RNODE_BLOCK_PASS(node1)->nd_head, node2, loc);
24900 node1->nd_loc.end_pos = RNODE_BLOCK_PASS(node1)->nd_head->nd_loc.end_pos;
24901 return node1;
24902 case NODE_ARGSPUSH:
24903 RNODE_ARGSPUSH(node1)->nd_body = list_append(p, NEW_LIST(RNODE_ARGSPUSH(node1)->nd_body, &RNODE_ARGSPUSH(node1)->nd_body->nd_loc), node2);
24904 node1->nd_loc.end_pos = RNODE_ARGSPUSH(node1)->nd_body->nd_loc.end_pos;
24905 nd_set_type(node1, NODE_ARGSCAT);
24906 return node1;
24907 case NODE_ARGSCAT:
24908 if (!nd_type_p(RNODE_ARGSCAT(node1)->nd_body, NODE_LIST)) break;
24909 RNODE_ARGSCAT(node1)->nd_body = list_append(p, RNODE_ARGSCAT(node1)->nd_body, node2);
24910 node1->nd_loc.end_pos = RNODE_ARGSCAT(node1)->nd_body->nd_loc.end_pos;
24911 return node1;
24912 }
24913 return NEW_ARGSPUSH(node1, node2, loc);
24914}
24915
24916static NODE *
24917arg_concat(struct parser_params *p, NODE *node1, NODE *node2, const YYLTYPE *loc)
24918{
24919 if (!node2) return node1;
24920 switch (nd_type(node1)) {
24921 case NODE_BLOCK_PASS:
24922 if (RNODE_BLOCK_PASS(node1)->nd_head)
24923 RNODE_BLOCK_PASS(node1)->nd_head = arg_concat(p, RNODE_BLOCK_PASS(node1)->nd_head, node2, loc);
24924 else
24925 RNODE_LIST(node1)->nd_head = NEW_LIST(node2, loc);
24926 return node1;
24927 case NODE_ARGSPUSH:
24928 if (!nd_type_p(node2, NODE_LIST)) break;
24929 RNODE_ARGSPUSH(node1)->nd_body = list_concat(NEW_LIST(RNODE_ARGSPUSH(node1)->nd_body, loc), node2);
24930 nd_set_type(node1, NODE_ARGSCAT);
24931 return node1;
24932 case NODE_ARGSCAT:
24933 if (!nd_type_p(node2, NODE_LIST) ||
24934 !nd_type_p(RNODE_ARGSCAT(node1)->nd_body, NODE_LIST)) break;
24935 RNODE_ARGSCAT(node1)->nd_body = list_concat(RNODE_ARGSCAT(node1)->nd_body, node2);
24936 return node1;
24937 }
24938 return NEW_ARGSCAT(node1, node2, loc);
24939}
24940
24941static NODE *
24942last_arg_append(struct parser_params *p, NODE *args, NODE *last_arg, const YYLTYPE *loc)
24943{
24944 NODE *n1;
24945 if ((n1 = splat_array(args)) != 0) {
24946 return list_append(p, n1, last_arg);
24947 }
24948 return arg_append(p, args, last_arg, loc);
24949}
24950
24951static NODE *
24952rest_arg_append(struct parser_params *p, NODE *args, NODE *rest_arg, const YYLTYPE *loc)
24953{
24954 NODE *n1;
24955 if ((nd_type_p(rest_arg, NODE_LIST)) && (n1 = splat_array(args)) != 0) {
24956 return list_concat(n1, rest_arg);
24957 }
24958 return arg_concat(p, args, rest_arg, loc);
24959}
24960
24961static NODE *
24962splat_array(NODE* node)
24963{
24964 if (nd_type_p(node, NODE_SPLAT)) node = RNODE_SPLAT(node)->nd_head;
24965 if (nd_type_p(node, NODE_LIST)) return node;
24966 return 0;
24967}
24968
24969static void
24970mark_lvar_used(struct parser_params *p, NODE *rhs)
24971{
24972 ID *vidp = NULL;
24973 if (!rhs) return;
24974 switch (nd_type(rhs)) {
24975 case NODE_LASGN:
24976 if (local_id_ref(p, RNODE_LASGN(rhs)->nd_vid, &vidp)) {
24977 if (vidp) *vidp |= LVAR_USED;
24978 }
24979 break;
24980 case NODE_DASGN:
24981 if (dvar_defined_ref(p, RNODE_DASGN(rhs)->nd_vid, &vidp)) {
24982 if (vidp) *vidp |= LVAR_USED;
24983 }
24984 break;
24985#if 0
24986 case NODE_MASGN:
24987 for (rhs = rhs->nd_head; rhs; rhs = rhs->nd_next) {
24988 mark_lvar_used(p, rhs->nd_head);
24989 }
24990 break;
24991#endif
24992 }
24993}
24994
24995static int is_static_content(NODE *node);
24996
24997static NODE *
24998node_assign(struct parser_params *p, NODE *lhs, NODE *rhs, struct lex_context ctxt, const YYLTYPE *loc)
24999{
25000 if (!lhs) return 0;
25001
25002 switch (nd_type(lhs)) {
25003 case NODE_CDECL:
25004 case NODE_GASGN:
25005 case NODE_IASGN:
25006 case NODE_LASGN:
25007 case NODE_DASGN:
25008 case NODE_MASGN:
25009 case NODE_CVASGN:
25010 set_nd_value(p, lhs, rhs);
25011 nd_set_loc(lhs, loc);
25012 break;
25013
25014 case NODE_ATTRASGN:
25015 RNODE_ATTRASGN(lhs)->nd_args = arg_append(p, RNODE_ATTRASGN(lhs)->nd_args, rhs, loc);
25016 nd_set_loc(lhs, loc);
25017 break;
25018
25019 default:
25020 /* should not happen */
25021 break;
25022 }
25023
25024 return lhs;
25025}
25026
25027static NODE *
25028value_expr_check(struct parser_params *p, NODE *node)
25029{
25030 NODE *void_node = 0, *vn;
25031
25032 if (!node) {
25033 rb_warning0("empty expression");
25034 }
25035 while (node) {
25036 switch (nd_type(node)) {
25037 case NODE_ENSURE:
25038 vn = RNODE_ENSURE(node)->nd_head;
25039 node = RNODE_ENSURE(node)->nd_ensr;
25040 /* nd_ensr should not be NULL, check it out next */
25041 if (vn && (vn = value_expr_check(p, vn))) {
25042 goto found;
25043 }
25044 break;
25045
25046 case NODE_RESCUE:
25047 /* void only if all children are void */
25048 vn = RNODE_RESCUE(node)->nd_head;
25049 if (!vn || !(vn = value_expr_check(p, vn))) return NULL;
25050 if (!void_node) void_node = vn;
25051 for (NODE *r = RNODE_RESCUE(node)->nd_resq; r; r = RNODE_RESBODY(r)->nd_next) {
25052 if (!nd_type_p(r, NODE_RESBODY)) {
25053 compile_error(p, "unexpected node");
25054 return NULL;
25055 }
25056 if (!(vn = value_expr_check(p, RNODE_RESBODY(r)->nd_body))) {
25057 void_node = 0;
25058 break;
25059 }
25060 if (!void_node) void_node = vn;
25061 }
25062 node = RNODE_RESCUE(node)->nd_else;
25063 if (!node) return void_node;
25064 break;
25065
25066 case NODE_RETURN:
25067 case NODE_BREAK:
25068 case NODE_NEXT:
25069 case NODE_REDO:
25070 case NODE_RETRY:
25071 goto found;
25072
25073 case NODE_CASE3:
25074 if (!RNODE_CASE3(node)->nd_body || !nd_type_p(RNODE_CASE3(node)->nd_body, NODE_IN)) {
25075 compile_error(p, "unexpected node");
25076 return NULL;
25077 }
25078 if (RNODE_IN(RNODE_CASE3(node)->nd_body)->nd_body) {
25079 return NULL;
25080 }
25081 /* single line pattern matching with "=>" operator */
25082 goto found;
25083
25084 case NODE_BLOCK:
25085 while (RNODE_BLOCK(node)->nd_next) {
25086 node = RNODE_BLOCK(node)->nd_next;
25087 }
25088 node = RNODE_BLOCK(node)->nd_head;
25089 break;
25090
25091 case NODE_BEGIN:
25092 node = RNODE_BEGIN(node)->nd_body;
25093 break;
25094
25095 case NODE_IF:
25096 case NODE_UNLESS:
25097 if (!RNODE_IF(node)->nd_body) {
25098 return NULL;
25099 }
25100 else if (!RNODE_IF(node)->nd_else) {
25101 return NULL;
25102 }
25103 vn = value_expr_check(p, RNODE_IF(node)->nd_body);
25104 if (!vn) return NULL;
25105 if (!void_node) void_node = vn;
25106 node = RNODE_IF(node)->nd_else;
25107 break;
25108
25109 case NODE_AND:
25110 case NODE_OR:
25111 node = RNODE_AND(node)->nd_1st;
25112 break;
25113
25114 case NODE_LASGN:
25115 case NODE_DASGN:
25116 case NODE_MASGN:
25117 mark_lvar_used(p, node);
25118 return NULL;
25119
25120 default:
25121 return NULL;
25122 }
25123 }
25124
25125 return NULL;
25126
25127 found:
25128 /* return the first found node */
25129 return void_node ? void_node : node;
25130}
25131
25132static int
25133value_expr_gen(struct parser_params *p, NODE *node)
25134{
25135 NODE *void_node = value_expr_check(p, node);
25136 if (void_node) {
25137 yyerror1(&void_node->nd_loc, "void value expression");
25138 /* or "control never reach"? */
25139 return FALSE;
25140 }
25141 return TRUE;
25142}
25143
25144static void
25145void_expr(struct parser_params *p, NODE *node)
25146{
25147 const char *useless = 0;
25148
25149 if (!RTEST(ruby_verbose)) return;
25150
25151 if (!node || !(node = nd_once_body(node))) return;
25152 switch (nd_type(node)) {
25153 case NODE_OPCALL:
25154 switch (RNODE_OPCALL(node)->nd_mid) {
25155 case '+':
25156 case '-':
25157 case '*':
25158 case '/':
25159 case '%':
25160 case tPOW:
25161 case tUPLUS:
25162 case tUMINUS:
25163 case '|':
25164 case '^':
25165 case '&':
25166 case tCMP:
25167 case '>':
25168 case tGEQ:
25169 case '<':
25170 case tLEQ:
25171 case tEQ:
25172 case tNEQ:
25173 useless = rb_id2name(RNODE_OPCALL(node)->nd_mid);
25174 break;
25175 }
25176 break;
25177
25178 case NODE_LVAR:
25179 case NODE_DVAR:
25180 case NODE_GVAR:
25181 case NODE_IVAR:
25182 case NODE_CVAR:
25183 case NODE_NTH_REF:
25184 case NODE_BACK_REF:
25185 useless = "a variable";
25186 break;
25187 case NODE_CONST:
25188 useless = "a constant";
25189 break;
25190 case NODE_SYM:
25191 case NODE_LINE:
25192 case NODE_FILE:
25193 case NODE_ENCODING:
25194 case NODE_INTEGER:
25195 case NODE_FLOAT:
25196 case NODE_RATIONAL:
25197 case NODE_IMAGINARY:
25198 case NODE_STR:
25199 case NODE_DSTR:
25200 case NODE_REGX:
25201 case NODE_DREGX:
25202 useless = "a literal";
25203 break;
25204 case NODE_COLON2:
25205 case NODE_COLON3:
25206 useless = "::";
25207 break;
25208 case NODE_DOT2:
25209 useless = "..";
25210 break;
25211 case NODE_DOT3:
25212 useless = "...";
25213 break;
25214 case NODE_SELF:
25215 useless = "self";
25216 break;
25217 case NODE_NIL:
25218 useless = "nil";
25219 break;
25220 case NODE_TRUE:
25221 useless = "true";
25222 break;
25223 case NODE_FALSE:
25224 useless = "false";
25225 break;
25226 case NODE_DEFINED:
25227 useless = "defined?";
25228 break;
25229 }
25230
25231 if (useless) {
25232 rb_warn1L(nd_line(node), "possibly useless use of %s in void context", WARN_S(useless));
25233 }
25234}
25235
25236/* warns useless use of block and returns the last statement node */
25237static NODE *
25238void_stmts(struct parser_params *p, NODE *node)
25239{
25240 NODE *const n = node;
25241 if (!RTEST(ruby_verbose)) return n;
25242 if (!node) return n;
25243 if (!nd_type_p(node, NODE_BLOCK)) return n;
25244
25245 while (RNODE_BLOCK(node)->nd_next) {
25246 void_expr(p, RNODE_BLOCK(node)->nd_head);
25247 node = RNODE_BLOCK(node)->nd_next;
25248 }
25249 return RNODE_BLOCK(node)->nd_head;
25250}
25251
25252static NODE *
25253remove_begin(NODE *node)
25254{
25255 NODE **n = &node, *n1 = node;
25256 while (n1 && nd_type_p(n1, NODE_BEGIN) && RNODE_BEGIN(n1)->nd_body) {
25257 *n = n1 = RNODE_BEGIN(n1)->nd_body;
25258 }
25259 return node;
25260}
25261
25262static void
25263reduce_nodes(struct parser_params *p, NODE **body)
25264{
25265 NODE *node = *body;
25266
25267 if (!node) {
25268 *body = NEW_NIL(&NULL_LOC);
25269 return;
25270 }
25271#define subnodes(type, n1, n2) \
25272 ((!type(node)->n1) ? (type(node)->n2 ? (body = &type(node)->n2, 1) : 0) : \
25273 (!type(node)->n2) ? (body = &type(node)->n1, 1) : \
25274 (reduce_nodes(p, &type(node)->n1), body = &type(node)->n2, 1))
25275
25276 while (node) {
25277 int newline = (int)nd_fl_newline(node);
25278 switch (nd_type(node)) {
25279 end:
25280 case NODE_NIL:
25281 *body = 0;
25282 return;
25283 case NODE_BEGIN:
25284 *body = node = RNODE_BEGIN(node)->nd_body;
25285 if (newline && node) nd_set_fl_newline(node);
25286 continue;
25287 case NODE_BLOCK:
25288 body = &RNODE_BLOCK(RNODE_BLOCK(node)->nd_end)->nd_head;
25289 break;
25290 case NODE_IF:
25291 case NODE_UNLESS:
25292 if (subnodes(RNODE_IF, nd_body, nd_else)) break;
25293 return;
25294 case NODE_CASE:
25295 body = &RNODE_CASE(node)->nd_body;
25296 break;
25297 case NODE_WHEN:
25298 if (!subnodes(RNODE_WHEN, nd_body, nd_next)) goto end;
25299 break;
25300 case NODE_ENSURE:
25301 body = &RNODE_ENSURE(node)->nd_head;
25302 break;
25303 case NODE_RESCUE:
25304 newline = 0; // RESBODY should not be a NEWLINE
25305 if (RNODE_RESCUE(node)->nd_else) {
25306 body = &RNODE_RESCUE(node)->nd_resq;
25307 break;
25308 }
25309 if (!subnodes(RNODE_RESCUE, nd_head, nd_resq)) goto end;
25310 break;
25311 default:
25312 return;
25313 }
25314 node = *body;
25315 if (newline && node) nd_set_fl_newline(node);
25316 }
25317
25318#undef subnodes
25319}
25320
25321static int
25322is_static_content(NODE *node)
25323{
25324 if (!node) return 1;
25325 switch (nd_type(node)) {
25326 case NODE_HASH:
25327 if (!(node = RNODE_HASH(node)->nd_head)) break;
25328 case NODE_LIST:
25329 do {
25330 if (!is_static_content(RNODE_LIST(node)->nd_head)) return 0;
25331 } while ((node = RNODE_LIST(node)->nd_next) != 0);
25332 case NODE_SYM:
25333 case NODE_REGX:
25334 case NODE_LINE:
25335 case NODE_FILE:
25336 case NODE_ENCODING:
25337 case NODE_INTEGER:
25338 case NODE_FLOAT:
25339 case NODE_RATIONAL:
25340 case NODE_IMAGINARY:
25341 case NODE_STR:
25342 case NODE_NIL:
25343 case NODE_TRUE:
25344 case NODE_FALSE:
25345 case NODE_ZLIST:
25346 break;
25347 default:
25348 return 0;
25349 }
25350 return 1;
25351}
25352
25353static int
25354assign_in_cond(struct parser_params *p, NODE *node)
25355{
25356 switch (nd_type(node)) {
25357 case NODE_MASGN:
25358 case NODE_LASGN:
25359 case NODE_DASGN:
25360 case NODE_GASGN:
25361 case NODE_IASGN:
25362 case NODE_CVASGN:
25363 case NODE_CDECL:
25364 break;
25365
25366 default:
25367 return 0;
25368 }
25369
25370 if (!get_nd_value(p, node)) return 1;
25371 if (is_static_content(get_nd_value(p, node))) {
25372 /* reports always */
25373 rb_warn0L(nd_line(get_nd_value(p, node)), "found '= literal' in conditional, should be ==");
25374 }
25375 return 1;
25376}
25377
25378enum cond_type {
25379 COND_IN_OP,
25380 COND_IN_COND,
25381 COND_IN_FF
25382};
25383
25384#define SWITCH_BY_COND_TYPE(t, w, arg) do { \
25385 switch (t) { \
25386 case COND_IN_OP: break; \
25387 case COND_IN_COND: rb_##w##0(arg "literal in condition"); break; \
25388 case COND_IN_FF: rb_##w##0(arg "literal in flip-flop"); break; \
25389 } \
25390} while (0)
25391
25392static NODE *cond0(struct parser_params*,NODE*,enum cond_type,const YYLTYPE*,bool);
25393
25394static NODE*
25395range_op(struct parser_params *p, NODE *node, const YYLTYPE *loc)
25396{
25397 enum node_type type;
25398
25399 if (node == 0) return 0;
25400
25401 type = nd_type(node);
25402 value_expr(node);
25403 if (type == NODE_INTEGER) {
25404 if (!e_option_supplied(p)) rb_warn0L(nd_line(node), "integer literal in flip-flop");
25405 ID lineno = rb_intern("$.");
25406 return NEW_CALL(node, tEQ, NEW_LIST(NEW_GVAR(lineno, loc), loc), loc);
25407 }
25408 return cond0(p, node, COND_IN_FF, loc, true);
25409}
25410
25411static NODE*
25412cond0(struct parser_params *p, NODE *node, enum cond_type type, const YYLTYPE *loc, bool top)
25413{
25414 if (node == 0) return 0;
25415 if (!(node = nd_once_body(node))) return 0;
25416 assign_in_cond(p, node);
25417
25418 switch (nd_type(node)) {
25419 case NODE_BEGIN:
25420 RNODE_BEGIN(node)->nd_body = cond0(p, RNODE_BEGIN(node)->nd_body, type, loc, top);
25421 break;
25422
25423 case NODE_DSTR:
25424 case NODE_EVSTR:
25425 case NODE_STR:
25426 case NODE_FILE:
25427 SWITCH_BY_COND_TYPE(type, warn, "string ");
25428 break;
25429
25430 case NODE_REGX:
25431 if (!e_option_supplied(p)) SWITCH_BY_COND_TYPE(type, warn, "regex ");
25432 nd_set_type(node, NODE_MATCH);
25433 break;
25434
25435 case NODE_DREGX:
25436 if (!e_option_supplied(p)) SWITCH_BY_COND_TYPE(type, warning, "regex ");
25437
25438 return NEW_MATCH2(node, NEW_GVAR(idLASTLINE, loc), loc);
25439
25440 case NODE_BLOCK:
25441 {
25442 NODE *end = RNODE_BLOCK(node)->nd_end;
25443 NODE **expr = &RNODE_BLOCK(end)->nd_head;
25444 if (top) top = node == end;
25445 *expr = cond0(p, *expr, type, loc, top);
25446 }
25447 break;
25448
25449 case NODE_AND:
25450 case NODE_OR:
25451 RNODE_AND(node)->nd_1st = cond0(p, RNODE_AND(node)->nd_1st, COND_IN_COND, loc, true);
25452 RNODE_AND(node)->nd_2nd = cond0(p, RNODE_AND(node)->nd_2nd, COND_IN_COND, loc, true);
25453 break;
25454
25455 case NODE_DOT2:
25456 case NODE_DOT3:
25457 if (!top) break;
25458 RNODE_DOT2(node)->nd_beg = range_op(p, RNODE_DOT2(node)->nd_beg, loc);
25459 RNODE_DOT2(node)->nd_end = range_op(p, RNODE_DOT2(node)->nd_end, loc);
25460 switch (nd_type(node)) {
25461 case NODE_DOT2:
25462 nd_set_type(node,NODE_FLIP2);
25463 rb_node_flip2_t *flip2 = RNODE_FLIP2(node); /* for debug info */
25464 (void)flip2;
25465 break;
25466 case NODE_DOT3:
25467 nd_set_type(node, NODE_FLIP3);
25468 rb_node_flip3_t *flip3 = RNODE_FLIP3(node); /* for debug info */
25469 (void)flip3;
25470 break;
25471 }
25472 break;
25473
25474 case NODE_SYM:
25475 case NODE_DSYM:
25476 SWITCH_BY_COND_TYPE(type, warning, "symbol ");
25477 break;
25478
25479 case NODE_LINE:
25480 case NODE_ENCODING:
25481 case NODE_INTEGER:
25482 case NODE_FLOAT:
25483 case NODE_RATIONAL:
25484 case NODE_IMAGINARY:
25485 SWITCH_BY_COND_TYPE(type, warning, "");
25486 break;
25487
25488 default:
25489 break;
25490 }
25491 return node;
25492}
25493
25494static NODE*
25495cond(struct parser_params *p, NODE *node, const YYLTYPE *loc)
25496{
25497 if (node == 0) return 0;
25498 return cond0(p, node, COND_IN_COND, loc, true);
25499}
25500
25501static NODE*
25502method_cond(struct parser_params *p, NODE *node, const YYLTYPE *loc)
25503{
25504 if (node == 0) return 0;
25505 return cond0(p, node, COND_IN_OP, loc, true);
25506}
25507
25508static NODE*
25509new_nil_at(struct parser_params *p, const rb_code_position_t *pos)
25510{
25511 YYLTYPE loc = {*pos, *pos};
25512 return NEW_NIL(&loc);
25513}
25514
25515static NODE*
25516new_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)
25517{
25518 if (!cc) return right;
25519 cc = cond0(p, cc, COND_IN_COND, loc, true);
25520 return newline_node(NEW_IF(cc, left, right, loc, if_keyword_loc, then_keyword_loc, end_keyword_loc));
25521}
25522
25523static NODE*
25524new_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)
25525{
25526 if (!cc) return right;
25527 cc = cond0(p, cc, COND_IN_COND, loc, true);
25528 return newline_node(NEW_UNLESS(cc, left, right, loc, keyword_loc, then_keyword_loc, end_keyword_loc));
25529}
25530
25531#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))
25532
25533static NODE*
25534logop(struct parser_params *p, ID id, NODE *left, NODE *right,
25535 const YYLTYPE *op_loc, const YYLTYPE *loc)
25536{
25537 enum node_type type = id == idAND || id == idANDOP ? NODE_AND : NODE_OR;
25538 NODE *op;
25539 value_expr(left);
25540 if (left && nd_type_p(left, type)) {
25541 NODE *node = left, *second;
25542 while ((second = RNODE_AND(node)->nd_2nd) != 0 && nd_type_p(second, type)) {
25543 node = second;
25544 }
25545 RNODE_AND(node)->nd_2nd = NEW_AND_OR(type, second, right, loc, op_loc);
25546 nd_set_line(RNODE_AND(node)->nd_2nd, op_loc->beg_pos.lineno);
25547 left->nd_loc.end_pos = loc->end_pos;
25548 return left;
25549 }
25550 op = NEW_AND_OR(type, left, right, loc, op_loc);
25551 nd_set_line(op, op_loc->beg_pos.lineno);
25552 return op;
25553}
25554
25555#undef NEW_AND_OR
25556
25557static void
25558no_blockarg(struct parser_params *p, NODE *node)
25559{
25560 if (nd_type_p(node, NODE_BLOCK_PASS)) {
25561 compile_error(p, "block argument should not be given");
25562 }
25563}
25564
25565static NODE *
25566ret_args(struct parser_params *p, NODE *node)
25567{
25568 if (node) {
25569 no_blockarg(p, node);
25570 if (nd_type_p(node, NODE_LIST) && !RNODE_LIST(node)->nd_next) {
25571 node = RNODE_LIST(node)->nd_head;
25572 }
25573 }
25574 return node;
25575}
25576
25577static NODE*
25578negate_lit(struct parser_params *p, NODE* node)
25579{
25580 switch (nd_type(node)) {
25581 case NODE_INTEGER:
25582 RNODE_INTEGER(node)->minus = TRUE;
25583 break;
25584 case NODE_FLOAT:
25585 RNODE_FLOAT(node)->minus = TRUE;
25586 break;
25587 case NODE_RATIONAL:
25588 RNODE_RATIONAL(node)->minus = TRUE;
25589 break;
25590 case NODE_IMAGINARY:
25591 RNODE_IMAGINARY(node)->minus = TRUE;
25592 break;
25593 }
25594 return node;
25595}
25596
25597static NODE *
25598arg_blk_pass(NODE *node1, rb_node_block_pass_t *node2)
25599{
25600 if (node2) {
25601 if (!node1) return (NODE *)node2;
25602 node2->nd_head = node1;
25603 nd_set_first_lineno(node2, nd_first_lineno(node1));
25604 nd_set_first_column(node2, nd_first_column(node1));
25605 return (NODE *)node2;
25606 }
25607 return node1;
25608}
25609
25610static bool
25611args_info_empty_p(struct rb_args_info *args)
25612{
25613 if (args->pre_args_num) return false;
25614 if (args->post_args_num) return false;
25615 if (args->rest_arg) return false;
25616 if (args->opt_args) return false;
25617 if (args->block_arg) return false;
25618 if (args->kw_args) return false;
25619 if (args->kw_rest_arg) return false;
25620 return true;
25621}
25622
25623static rb_node_args_t *
25624new_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)
25625{
25626 struct rb_args_info *args = &tail->nd_ainfo;
25627
25628 if (args->forwarding) {
25629 if (rest_arg) {
25630 yyerror1(&RNODE(tail)->nd_loc, "... after rest argument");
25631 return tail;
25632 }
25633 rest_arg = idFWD_REST;
25634 }
25635
25636 args->pre_args_num = pre_args ? pre_args->nd_plen : 0;
25637 args->pre_init = pre_args ? pre_args->nd_next : 0;
25638
25639 args->post_args_num = post_args ? post_args->nd_plen : 0;
25640 args->post_init = post_args ? post_args->nd_next : 0;
25641 args->first_post_arg = post_args ? post_args->nd_pid : 0;
25642
25643 args->rest_arg = rest_arg;
25644
25645 args->opt_args = opt_args;
25646
25647#ifdef FORWARD_ARGS_WITH_RUBY2_KEYWORDS
25648 args->ruby2_keywords = args->forwarding;
25649#else
25650 args->ruby2_keywords = 0;
25651#endif
25652
25653 nd_set_loc(RNODE(tail), loc);
25654
25655 return tail;
25656}
25657
25658static rb_node_args_t *
25659new_args_tail(struct parser_params *p, rb_node_kw_arg_t *kw_args, ID kw_rest_arg, ID block, const YYLTYPE *kw_rest_loc)
25660{
25661 rb_node_args_t *node = NEW_ARGS(&NULL_LOC);
25662 struct rb_args_info *args = &node->nd_ainfo;
25663 if (p->error_p) return node;
25664
25665 args->block_arg = block;
25666 args->kw_args = kw_args;
25667
25668 if (kw_args) {
25669 /*
25670 * def foo(k1: 1, kr1:, k2: 2, **krest, &b)
25671 * variable order: k1, kr1, k2, &b, internal_id, krest
25672 * #=> <reorder>
25673 * variable order: kr1, k1, k2, internal_id, krest, &b
25674 */
25675 ID kw_bits = internal_id(p), *required_kw_vars, *kw_vars;
25676 struct vtable *vtargs = p->lvtbl->args;
25677 rb_node_kw_arg_t *kwn = kw_args;
25678
25679 if (block) block = vtargs->tbl[vtargs->pos-1];
25680 vtable_pop(vtargs, !!block + !!kw_rest_arg);
25681 required_kw_vars = kw_vars = &vtargs->tbl[vtargs->pos];
25682 while (kwn) {
25683 if (!NODE_REQUIRED_KEYWORD_P(get_nd_value(p, kwn->nd_body)))
25684 --kw_vars;
25685 --required_kw_vars;
25686 kwn = kwn->nd_next;
25687 }
25688
25689 for (kwn = kw_args; kwn; kwn = kwn->nd_next) {
25690 ID vid = get_nd_vid(p, kwn->nd_body);
25691 if (NODE_REQUIRED_KEYWORD_P(get_nd_value(p, kwn->nd_body))) {
25692 *required_kw_vars++ = vid;
25693 }
25694 else {
25695 *kw_vars++ = vid;
25696 }
25697 }
25698
25699 arg_var(p, kw_bits);
25700 if (kw_rest_arg) arg_var(p, kw_rest_arg);
25701 if (block) arg_var(p, block);
25702
25703 args->kw_rest_arg = NEW_DVAR(kw_rest_arg, kw_rest_loc);
25704 }
25705 else if (kw_rest_arg == idNil) {
25706 args->no_kwarg = 1;
25707 }
25708 else if (kw_rest_arg) {
25709 args->kw_rest_arg = NEW_DVAR(kw_rest_arg, kw_rest_loc);
25710 }
25711
25712 return node;
25713}
25714
25715static rb_node_args_t *
25716args_with_numbered(struct parser_params *p, rb_node_args_t *args, int max_numparam, ID it_id)
25717{
25718 if (max_numparam > NO_PARAM || it_id) {
25719 if (!args) {
25720 YYLTYPE loc = RUBY_INIT_YYLLOC();
25721 args = new_args_tail(p, 0, 0, 0, 0);
25722 nd_set_loc(RNODE(args), &loc);
25723 }
25724 args->nd_ainfo.pre_args_num = it_id ? 1 : max_numparam;
25725 }
25726 return args;
25727}
25728
25729static NODE*
25730new_array_pattern(struct parser_params *p, NODE *constant, NODE *pre_arg, NODE *aryptn, const YYLTYPE *loc)
25731{
25732 RNODE_ARYPTN(aryptn)->nd_pconst = constant;
25733
25734 if (pre_arg) {
25735 NODE *pre_args = NEW_LIST(pre_arg, loc);
25736 if (RNODE_ARYPTN(aryptn)->pre_args) {
25737 RNODE_ARYPTN(aryptn)->pre_args = list_concat(pre_args, RNODE_ARYPTN(aryptn)->pre_args);
25738 }
25739 else {
25740 RNODE_ARYPTN(aryptn)->pre_args = pre_args;
25741 }
25742 }
25743 return aryptn;
25744}
25745
25746static NODE*
25747new_array_pattern_tail(struct parser_params *p, NODE *pre_args, int has_rest, NODE *rest_arg, NODE *post_args, const YYLTYPE *loc)
25748{
25749 if (has_rest) {
25750 rest_arg = rest_arg ? rest_arg : NODE_SPECIAL_NO_NAME_REST;
25751 }
25752 else {
25753 rest_arg = NULL;
25754 }
25755 NODE *node = NEW_ARYPTN(pre_args, rest_arg, post_args, loc);
25756
25757 return node;
25758}
25759
25760static NODE*
25761new_find_pattern(struct parser_params *p, NODE *constant, NODE *fndptn, const YYLTYPE *loc)
25762{
25763 RNODE_FNDPTN(fndptn)->nd_pconst = constant;
25764
25765 return fndptn;
25766}
25767
25768static NODE*
25769new_find_pattern_tail(struct parser_params *p, NODE *pre_rest_arg, NODE *args, NODE *post_rest_arg, const YYLTYPE *loc)
25770{
25771 pre_rest_arg = pre_rest_arg ? pre_rest_arg : NODE_SPECIAL_NO_NAME_REST;
25772 post_rest_arg = post_rest_arg ? post_rest_arg : NODE_SPECIAL_NO_NAME_REST;
25773 NODE *node = NEW_FNDPTN(pre_rest_arg, args, post_rest_arg, loc);
25774
25775 return node;
25776}
25777
25778static NODE*
25779new_hash_pattern(struct parser_params *p, NODE *constant, NODE *hshptn, const YYLTYPE *loc)
25780{
25781 RNODE_HSHPTN(hshptn)->nd_pconst = constant;
25782 return hshptn;
25783}
25784
25785static NODE*
25786new_hash_pattern_tail(struct parser_params *p, NODE *kw_args, ID kw_rest_arg, const YYLTYPE *loc)
25787{
25788 NODE *node, *kw_rest_arg_node;
25789
25790 if (kw_rest_arg == idNil) {
25791 kw_rest_arg_node = NODE_SPECIAL_NO_REST_KEYWORD;
25792 }
25793 else if (kw_rest_arg) {
25794 kw_rest_arg_node = assignable(p, kw_rest_arg, 0, loc);
25795 }
25796 else {
25797 kw_rest_arg_node = NULL;
25798 }
25799
25800 node = NEW_HSHPTN(0, kw_args, kw_rest_arg_node, loc);
25801
25802 return node;
25803}
25804
25805static NODE*
25806dsym_node(struct parser_params *p, NODE *node, const YYLTYPE *loc)
25807{
25808 if (!node) {
25809 return NEW_SYM(STR_NEW0(), loc);
25810 }
25811
25812 switch (nd_type(node)) {
25813 case NODE_DSTR:
25814 nd_set_type(node, NODE_DSYM);
25815 nd_set_loc(node, loc);
25816 break;
25817 case NODE_STR:
25818 node = str_to_sym_node(p, node, loc);
25819 break;
25820 default:
25821 node = NEW_DSYM(0, 1, NEW_LIST(node, loc), loc);
25822 break;
25823 }
25824 return node;
25825}
25826
25827static int
25828nd_type_st_key_enable_p(NODE *node)
25829{
25830 switch (nd_type(node)) {
25831 case NODE_INTEGER:
25832 case NODE_FLOAT:
25833 case NODE_RATIONAL:
25834 case NODE_IMAGINARY:
25835 case NODE_STR:
25836 case NODE_SYM:
25837 case NODE_REGX:
25838 case NODE_LINE:
25839 case NODE_FILE:
25840 case NODE_ENCODING:
25841 return true;
25842 default:
25843 return false;
25844 }
25845}
25846
25847static VALUE
25848nd_value(struct parser_params *p, NODE *node)
25849{
25850 switch (nd_type(node)) {
25851 case NODE_STR:
25852 return rb_node_str_string_val(node);
25853 case NODE_INTEGER:
25854 return rb_node_integer_literal_val(node);
25855 case NODE_FLOAT:
25856 return rb_node_float_literal_val(node);
25857 case NODE_RATIONAL:
25858 return rb_node_rational_literal_val(node);
25859 case NODE_IMAGINARY:
25860 return rb_node_imaginary_literal_val(node);
25861 case NODE_SYM:
25862 return rb_node_sym_string_val(node);
25863 case NODE_REGX:
25864 return rb_node_regx_string_val(node);
25865 case NODE_LINE:
25866 return rb_node_line_lineno_val(node);
25867 case NODE_ENCODING:
25868 return rb_node_encoding_val(node);
25869 case NODE_FILE:
25870 return rb_node_file_path_val(node);
25871 default:
25872 rb_bug("unexpected node: %s", ruby_node_name(nd_type(node)));
25874 }
25875}
25876
25877static void
25878warn_duplicate_keys(struct parser_params *p, NODE *hash)
25879{
25880 /* See https://bugs.ruby-lang.org/issues/20331 for discussion about what is warned. */
25881 p->warn_duplicate_keys_table = st_init_table_with_size(&literal_type, RNODE_LIST(hash)->as.nd_alen / 2);
25882 while (hash && RNODE_LIST(hash)->nd_next) {
25883 NODE *head = RNODE_LIST(hash)->nd_head;
25884 NODE *value = RNODE_LIST(hash)->nd_next;
25885 NODE *next = RNODE_LIST(value)->nd_next;
25886 st_data_t key;
25887 st_data_t data;
25888
25889 /* keyword splat, e.g. {k: 1, **z, k: 2} */
25890 if (!head) {
25891 head = value;
25892 }
25893
25894 if (nd_type_st_key_enable_p(head)) {
25895 key = (st_data_t)head;
25896
25897 if (st_delete(p->warn_duplicate_keys_table, &key, &data)) {
25898 rb_warn2L(nd_line((NODE *)data),
25899 "key %+"PRIsWARN" is duplicated and overwritten on line %d",
25900 nd_value(p, head), WARN_I(nd_line(head)));
25901 }
25902 st_insert(p->warn_duplicate_keys_table, (st_data_t)key, (st_data_t)hash);
25903 }
25904 hash = next;
25905 }
25906 st_free_table(p->warn_duplicate_keys_table);
25907 p->warn_duplicate_keys_table = NULL;
25908}
25909
25910static NODE *
25911new_hash(struct parser_params *p, NODE *hash, const YYLTYPE *loc)
25912{
25913 if (hash) warn_duplicate_keys(p, hash);
25914 return NEW_HASH(hash, loc);
25915}
25916
25917static void
25918error_duplicate_pattern_variable(struct parser_params *p, ID id, const YYLTYPE *loc)
25919{
25920 if (is_private_local_id(p, id)) {
25921 return;
25922 }
25923 if (st_is_member(p->pvtbl, id)) {
25924 yyerror1(loc, "duplicated variable name");
25925 }
25926 else {
25927 st_insert(p->pvtbl, (st_data_t)id, 0);
25928 }
25929}
25930
25931static void
25932error_duplicate_pattern_key(struct parser_params *p, VALUE key, const YYLTYPE *loc)
25933{
25934 if (!p->pktbl) {
25935 p->pktbl = st_init_numtable();
25936 }
25937 else if (st_is_member(p->pktbl, key)) {
25938 yyerror1(loc, "duplicated key name");
25939 return;
25940 }
25941 st_insert(p->pktbl, (st_data_t)key, 0);
25942}
25943
25944static NODE *
25945new_unique_key_hash(struct parser_params *p, NODE *hash, const YYLTYPE *loc)
25946{
25947 return NEW_HASH(hash, loc);
25948}
25949
25950static NODE *
25951new_op_assign(struct parser_params *p, NODE *lhs, ID op, NODE *rhs, struct lex_context ctxt, const YYLTYPE *loc)
25952{
25953 NODE *asgn;
25954
25955 if (lhs) {
25956 ID vid = get_nd_vid(p, lhs);
25957 YYLTYPE lhs_loc = lhs->nd_loc;
25958 if (op == tOROP) {
25959 set_nd_value(p, lhs, rhs);
25960 nd_set_loc(lhs, loc);
25961 asgn = NEW_OP_ASGN_OR(gettable(p, vid, &lhs_loc), lhs, loc);
25962 }
25963 else if (op == tANDOP) {
25964 set_nd_value(p, lhs, rhs);
25965 nd_set_loc(lhs, loc);
25966 asgn = NEW_OP_ASGN_AND(gettable(p, vid, &lhs_loc), lhs, loc);
25967 }
25968 else {
25969 asgn = lhs;
25970 rhs = NEW_CALL(gettable(p, vid, &lhs_loc), op, NEW_LIST(rhs, &rhs->nd_loc), loc);
25971 set_nd_value(p, asgn, rhs);
25972 nd_set_loc(asgn, loc);
25973 }
25974 }
25975 else {
25976 asgn = NEW_ERROR(loc);
25977 }
25978 return asgn;
25979}
25980
25981static NODE *
25982new_ary_op_assign(struct parser_params *p, NODE *ary,
25983 NODE *args, ID op, NODE *rhs, const YYLTYPE *args_loc, const YYLTYPE *loc,
25984 const YYLTYPE *call_operator_loc, const YYLTYPE *opening_loc, const YYLTYPE *closing_loc, const YYLTYPE *binary_operator_loc)
25985{
25986 NODE *asgn;
25987
25988 aryset_check(p, args);
25989 args = make_list(args, args_loc);
25990 asgn = NEW_OP_ASGN1(ary, op, args, rhs, loc, call_operator_loc, opening_loc, closing_loc, binary_operator_loc);
25991 fixpos(asgn, ary);
25992 return asgn;
25993}
25994
25995static NODE *
25996new_attr_op_assign(struct parser_params *p, NODE *lhs,
25997 ID atype, ID attr, ID op, NODE *rhs, const YYLTYPE *loc,
25998 const YYLTYPE *call_operator_loc, const YYLTYPE *message_loc, const YYLTYPE *binary_operator_loc)
25999{
26000 NODE *asgn;
26001
26002 asgn = NEW_OP_ASGN2(lhs, CALL_Q_P(atype), attr, op, rhs, loc, call_operator_loc, message_loc, binary_operator_loc);
26003 fixpos(asgn, lhs);
26004 return asgn;
26005}
26006
26007static NODE *
26008new_const_op_assign(struct parser_params *p, NODE *lhs, ID op, NODE *rhs, struct lex_context ctxt, const YYLTYPE *loc)
26009{
26010 NODE *asgn;
26011
26012 if (lhs) {
26013 asgn = NEW_OP_CDECL(lhs, op, rhs, ctxt.shareable_constant_value, loc);
26014 }
26015 else {
26016 asgn = NEW_ERROR(loc);
26017 }
26018 fixpos(asgn, lhs);
26019 return asgn;
26020}
26021
26022static NODE *
26023const_decl(struct parser_params *p, NODE *path, const YYLTYPE *loc)
26024{
26025 if (p->ctxt.in_def) {
26026#ifndef RIPPER
26027 yyerror1(loc, "dynamic constant assignment");
26028#else
26029 set_value(assign_error(p, "dynamic constant assignment", p->s_lvalue));
26030#endif
26031 }
26032 return NEW_CDECL(0, 0, (path), p->ctxt.shareable_constant_value, loc);
26033}
26034
26035#ifdef RIPPER
26036static VALUE
26037assign_error(struct parser_params *p, const char *mesg, VALUE a)
26038{
26039 a = dispatch2(assign_error, ERR_MESG(), a);
26040 ripper_error(p);
26041 return a;
26042}
26043#endif
26044
26045static NODE *
26046new_bodystmt(struct parser_params *p, NODE *head, NODE *rescue, NODE *rescue_else, NODE *ensure, const YYLTYPE *loc)
26047{
26048 NODE *result = head;
26049 if (rescue) {
26050 NODE *tmp = rescue_else ? rescue_else : rescue;
26051 YYLTYPE rescue_loc = code_loc_gen(&head->nd_loc, &tmp->nd_loc);
26052
26053 result = NEW_RESCUE(head, rescue, rescue_else, &rescue_loc);
26054 nd_set_line(result, rescue->nd_loc.beg_pos.lineno);
26055 }
26056 if (ensure) {
26057 result = NEW_ENSURE(result, ensure, loc);
26058 }
26059 fixpos(result, head);
26060 return result;
26061}
26062
26063static void
26064warn_unused_var(struct parser_params *p, struct local_vars *local)
26065{
26066 int cnt;
26067
26068 if (!local->used) return;
26069 cnt = local->used->pos;
26070 if (cnt != local->vars->pos) {
26071 rb_parser_fatal(p, "local->used->pos != local->vars->pos");
26072 }
26073#ifndef RIPPER
26074 ID *v = local->vars->tbl;
26075 ID *u = local->used->tbl;
26076 for (int i = 0; i < cnt; ++i) {
26077 if (!v[i] || (u[i] & LVAR_USED)) continue;
26078 if (is_private_local_id(p, v[i])) continue;
26079 rb_warn1L((int)u[i], "assigned but unused variable - %"PRIsWARN, rb_id2str(v[i]));
26080 }
26081#endif
26082}
26083
26084static void
26085local_push(struct parser_params *p, int toplevel_scope)
26086{
26087 struct local_vars *local;
26088 int inherits_dvars = toplevel_scope && compile_for_eval;
26089 int warn_unused_vars = RTEST(ruby_verbose);
26090
26091 local = ALLOC(struct local_vars);
26092 local->prev = p->lvtbl;
26093 local->args = vtable_alloc(0);
26094 local->vars = vtable_alloc(inherits_dvars ? DVARS_INHERIT : DVARS_TOPSCOPE);
26095#ifndef RIPPER
26096 if (toplevel_scope && compile_for_eval) warn_unused_vars = 0;
26097 if (toplevel_scope && e_option_supplied(p)) warn_unused_vars = 0;
26098#endif
26099 local->numparam.outer = 0;
26100 local->numparam.inner = 0;
26101 local->numparam.current = 0;
26102 local->it = 0;
26103 local->used = warn_unused_vars ? vtable_alloc(0) : 0;
26104
26105# if WARN_PAST_SCOPE
26106 local->past = 0;
26107# endif
26108 CMDARG_PUSH(0);
26109 COND_PUSH(0);
26110 p->lvtbl = local;
26111}
26112
26113static void
26114vtable_chain_free(struct parser_params *p, struct vtable *table)
26115{
26116 while (!DVARS_TERMINAL_P(table)) {
26117 struct vtable *cur_table = table;
26118 table = cur_table->prev;
26119 vtable_free(cur_table);
26120 }
26121}
26122
26123static void
26124local_free(struct parser_params *p, struct local_vars *local)
26125{
26126 vtable_chain_free(p, local->used);
26127
26128# if WARN_PAST_SCOPE
26129 vtable_chain_free(p, local->past);
26130# endif
26131
26132 vtable_chain_free(p, local->args);
26133 vtable_chain_free(p, local->vars);
26134
26135 ruby_sized_xfree(local, sizeof(struct local_vars));
26136}
26137
26138static void
26139local_pop(struct parser_params *p)
26140{
26141 struct local_vars *local = p->lvtbl->prev;
26142 if (p->lvtbl->used) {
26143 warn_unused_var(p, p->lvtbl);
26144 }
26145
26146 local_free(p, p->lvtbl);
26147 p->lvtbl = local;
26148
26149 CMDARG_POP();
26150 COND_POP();
26151}
26152
26153static rb_ast_id_table_t *
26154local_tbl(struct parser_params *p)
26155{
26156 int cnt_args = vtable_size(p->lvtbl->args);
26157 int cnt_vars = vtable_size(p->lvtbl->vars);
26158 int cnt = cnt_args + cnt_vars;
26159 int i, j;
26160 rb_ast_id_table_t *tbl;
26161
26162 if (cnt <= 0) return 0;
26163 tbl = rb_ast_new_local_table(p->ast, cnt);
26164 MEMCPY(tbl->ids, p->lvtbl->args->tbl, ID, cnt_args);
26165 /* remove IDs duplicated to warn shadowing */
26166 for (i = 0, j = cnt_args; i < cnt_vars; ++i) {
26167 ID id = p->lvtbl->vars->tbl[i];
26168 if (!vtable_included(p->lvtbl->args, id)) {
26169 tbl->ids[j++] = id;
26170 }
26171 }
26172 if (j < cnt) {
26173 tbl = rb_ast_resize_latest_local_table(p->ast, j);
26174 }
26175
26176 return tbl;
26177}
26178
26179static void
26180numparam_name(struct parser_params *p, ID id)
26181{
26182 if (!NUMPARAM_ID_P(id)) return;
26183 compile_error(p, "_%d is reserved for numbered parameter",
26184 NUMPARAM_ID_TO_IDX(id));
26185}
26186
26187static void
26188arg_var(struct parser_params *p, ID id)
26189{
26190 numparam_name(p, id);
26191 vtable_add(p->lvtbl->args, id);
26192}
26193
26194static void
26195local_var(struct parser_params *p, ID id)
26196{
26197 numparam_name(p, id);
26198 vtable_add(p->lvtbl->vars, id);
26199 if (p->lvtbl->used) {
26200 vtable_add(p->lvtbl->used, (ID)p->ruby_sourceline);
26201 }
26202}
26203
26204#ifndef RIPPER
26205int
26206rb_parser_local_defined(struct parser_params *p, ID id, const struct rb_iseq_struct *iseq)
26207{
26208 return rb_local_defined(id, iseq);
26209}
26210#endif
26211
26212static int
26213local_id_ref(struct parser_params *p, ID id, ID **vidrefp)
26214{
26215 struct vtable *vars, *args, *used;
26216
26217 vars = p->lvtbl->vars;
26218 args = p->lvtbl->args;
26219 used = p->lvtbl->used;
26220
26221 while (vars && !DVARS_TERMINAL_P(vars->prev)) {
26222 vars = vars->prev;
26223 args = args->prev;
26224 if (used) used = used->prev;
26225 }
26226
26227 if (vars && vars->prev == DVARS_INHERIT) {
26228 return rb_parser_local_defined(p, id, p->parent_iseq);
26229 }
26230 else if (vtable_included(args, id)) {
26231 return 1;
26232 }
26233 else {
26234 int i = vtable_included(vars, id);
26235 if (i && used && vidrefp) *vidrefp = &used->tbl[i-1];
26236 return i != 0;
26237 }
26238}
26239
26240static int
26241local_id(struct parser_params *p, ID id)
26242{
26243 return local_id_ref(p, id, NULL);
26244}
26245
26246static int
26247check_forwarding_args(struct parser_params *p)
26248{
26249 if (local_id(p, idFWD_ALL)) return TRUE;
26250 compile_error(p, "unexpected ...");
26251 return FALSE;
26252}
26253
26254static void
26255add_forwarding_args(struct parser_params *p)
26256{
26257 arg_var(p, idFWD_REST);
26258#ifndef FORWARD_ARGS_WITH_RUBY2_KEYWORDS
26259 arg_var(p, idFWD_KWREST);
26260#endif
26261 arg_var(p, idFWD_BLOCK);
26262 arg_var(p, idFWD_ALL);
26263}
26264
26265static void
26266forwarding_arg_check(struct parser_params *p, ID arg, ID all, const char *var)
26267{
26268 bool conflict = false;
26269
26270 struct vtable *vars, *args;
26271
26272 vars = p->lvtbl->vars;
26273 args = p->lvtbl->args;
26274
26275 while (vars && !DVARS_TERMINAL_P(vars->prev)) {
26276 conflict |= (vtable_included(args, arg) && !(all && vtable_included(args, all)));
26277 vars = vars->prev;
26278 args = args->prev;
26279 }
26280
26281 bool found = false;
26282 if (vars && vars->prev == DVARS_INHERIT && !found) {
26283 found = (rb_parser_local_defined(p, arg, p->parent_iseq) &&
26284 !(all && rb_parser_local_defined(p, all, p->parent_iseq)));
26285 }
26286 else {
26287 found = (vtable_included(args, arg) &&
26288 !(all && vtable_included(args, all)));
26289 }
26290
26291 if (!found) {
26292 compile_error(p, "no anonymous %s parameter", var);
26293 }
26294 else if (conflict) {
26295 compile_error(p, "anonymous %s parameter is also used within block", var);
26296 }
26297}
26298
26299static NODE *
26300new_args_forward_call(struct parser_params *p, NODE *leading, const YYLTYPE *loc, const YYLTYPE *argsloc)
26301{
26302 NODE *rest = NEW_LVAR(idFWD_REST, loc);
26303#ifndef FORWARD_ARGS_WITH_RUBY2_KEYWORDS
26304 NODE *kwrest = list_append(p, NEW_LIST(0, loc), NEW_LVAR(idFWD_KWREST, loc));
26305#endif
26306 rb_node_block_pass_t *block = NEW_BLOCK_PASS(NEW_LVAR(idFWD_BLOCK, loc), argsloc, &NULL_LOC);
26307 NODE *args = leading ? rest_arg_append(p, leading, rest, argsloc) : NEW_SPLAT(rest, loc, &NULL_LOC);
26308 block->forwarding = TRUE;
26309#ifndef FORWARD_ARGS_WITH_RUBY2_KEYWORDS
26310 args = arg_append(p, args, new_hash(p, kwrest, loc), argsloc);
26311#endif
26312 return arg_blk_pass(args, block);
26313}
26314
26315static NODE *
26316numparam_push(struct parser_params *p)
26317{
26318 struct local_vars *local = p->lvtbl;
26319 NODE *inner = local->numparam.inner;
26320 if (!local->numparam.outer) {
26321 local->numparam.outer = local->numparam.current;
26322 }
26323 local->numparam.inner = 0;
26324 local->numparam.current = 0;
26325 local->it = 0;
26326 return inner;
26327}
26328
26329static void
26330numparam_pop(struct parser_params *p, NODE *prev_inner)
26331{
26332 struct local_vars *local = p->lvtbl;
26333 if (prev_inner) {
26334 /* prefer first one */
26335 local->numparam.inner = prev_inner;
26336 }
26337 else if (local->numparam.current) {
26338 /* current and inner are exclusive */
26339 local->numparam.inner = local->numparam.current;
26340 }
26341 if (p->max_numparam > NO_PARAM) {
26342 /* current and outer are exclusive */
26343 local->numparam.current = local->numparam.outer;
26344 local->numparam.outer = 0;
26345 }
26346 else {
26347 /* no numbered parameter */
26348 local->numparam.current = 0;
26349 }
26350 local->it = 0;
26351}
26352
26353static const struct vtable *
26354dyna_push(struct parser_params *p)
26355{
26356 p->lvtbl->args = vtable_alloc(p->lvtbl->args);
26357 p->lvtbl->vars = vtable_alloc(p->lvtbl->vars);
26358 if (p->lvtbl->used) {
26359 p->lvtbl->used = vtable_alloc(p->lvtbl->used);
26360 }
26361 return p->lvtbl->args;
26362}
26363
26364static void
26365dyna_pop_vtable(struct parser_params *p, struct vtable **vtblp)
26366{
26367 struct vtable *tmp = *vtblp;
26368 *vtblp = tmp->prev;
26369# if WARN_PAST_SCOPE
26370 if (p->past_scope_enabled) {
26371 tmp->prev = p->lvtbl->past;
26372 p->lvtbl->past = tmp;
26373 return;
26374 }
26375# endif
26376 vtable_free(tmp);
26377}
26378
26379static void
26380dyna_pop_1(struct parser_params *p)
26381{
26382 struct vtable *tmp;
26383
26384 if ((tmp = p->lvtbl->used) != 0) {
26385 warn_unused_var(p, p->lvtbl);
26386 p->lvtbl->used = p->lvtbl->used->prev;
26387 vtable_free(tmp);
26388 }
26389 dyna_pop_vtable(p, &p->lvtbl->args);
26390 dyna_pop_vtable(p, &p->lvtbl->vars);
26391}
26392
26393static void
26394dyna_pop(struct parser_params *p, const struct vtable *lvargs)
26395{
26396 while (p->lvtbl->args != lvargs) {
26397 dyna_pop_1(p);
26398 if (!p->lvtbl->args) {
26399 struct local_vars *local = p->lvtbl->prev;
26400 ruby_sized_xfree(p->lvtbl, sizeof(*p->lvtbl));
26401 p->lvtbl = local;
26402 }
26403 }
26404 dyna_pop_1(p);
26405}
26406
26407static int
26408dyna_in_block(struct parser_params *p)
26409{
26410 return !DVARS_TERMINAL_P(p->lvtbl->vars) && p->lvtbl->vars->prev != DVARS_TOPSCOPE;
26411}
26412
26413#ifndef RIPPER
26414int
26415dvar_defined_ref(struct parser_params *p, ID id, ID **vidrefp)
26416{
26417 struct vtable *vars, *args, *used;
26418 int i;
26419
26420 args = p->lvtbl->args;
26421 vars = p->lvtbl->vars;
26422 used = p->lvtbl->used;
26423
26424 while (!DVARS_TERMINAL_P(vars)) {
26425 if (vtable_included(args, id)) {
26426 return 1;
26427 }
26428 if ((i = vtable_included(vars, id)) != 0) {
26429 if (used && vidrefp) *vidrefp = &used->tbl[i-1];
26430 return 1;
26431 }
26432 args = args->prev;
26433 vars = vars->prev;
26434 if (!vidrefp) used = 0;
26435 if (used) used = used->prev;
26436 }
26437
26438 if (vars == DVARS_INHERIT && !NUMPARAM_ID_P(id)) {
26439 return rb_dvar_defined(id, p->parent_iseq);
26440 }
26441
26442 return 0;
26443}
26444#endif
26445
26446static int
26447dvar_defined(struct parser_params *p, ID id)
26448{
26449 return dvar_defined_ref(p, id, NULL);
26450}
26451
26452static int
26453dvar_curr(struct parser_params *p, ID id)
26454{
26455 return (vtable_included(p->lvtbl->args, id) ||
26456 vtable_included(p->lvtbl->vars, id));
26457}
26458
26459static void
26460reg_fragment_enc_error(struct parser_params* p, rb_parser_string_t *str, int c)
26461{
26462 compile_error(p,
26463 "regexp encoding option '%c' differs from source encoding '%s'",
26464 c, rb_enc_name(rb_parser_str_get_encoding(str)));
26465}
26466
26467#ifndef RIPPER
26468static rb_encoding *
26469find_enc(struct parser_params* p, const char *name)
26470{
26471 int idx = rb_enc_find_index(name);
26472 if (idx < 0) {
26473 rb_bug("unknown encoding name: %s", name);
26474 }
26475
26476 return rb_enc_from_index(idx);
26477}
26478
26479static rb_encoding *
26480kcode_to_enc(struct parser_params* p, int kcode)
26481{
26482 rb_encoding *enc;
26483
26484 switch (kcode) {
26485 case ENC_ASCII8BIT:
26486 enc = rb_ascii8bit_encoding();
26487 break;
26488 case ENC_EUC_JP:
26489 enc = find_enc(p, "EUC-JP");
26490 break;
26491 case ENC_Windows_31J:
26492 enc = find_enc(p, "Windows-31J");
26493 break;
26494 case ENC_UTF8:
26495 enc = rb_utf8_encoding();
26496 break;
26497 default:
26498 enc = NULL;
26499 break;
26500 }
26501
26502 return enc;
26503}
26504
26505int
26506rb_reg_fragment_setenc(struct parser_params* p, rb_parser_string_t *str, int options)
26507{
26508 int c = RE_OPTION_ENCODING_IDX(options);
26509
26510 if (c) {
26511 int opt, idx;
26512 rb_encoding *enc;
26513
26514 char_to_option_kcode(c, &opt, &idx);
26515 enc = kcode_to_enc(p, idx);
26516 if (enc != rb_parser_str_get_encoding(str) &&
26517 !rb_parser_is_ascii_string(p, str)) {
26518 goto error;
26519 }
26520 rb_parser_string_set_encoding(str, enc);
26521 }
26522 else if (RE_OPTION_ENCODING_NONE(options)) {
26523 if (!PARSER_ENCODING_IS_ASCII8BIT(p, str) &&
26524 !rb_parser_is_ascii_string(p, str)) {
26525 c = 'n';
26526 goto error;
26527 }
26528 rb_parser_enc_associate(p, str, rb_ascii8bit_encoding());
26529 }
26530 else if (rb_is_usascii_enc(p->enc)) {
26531 rb_parser_enc_associate(p, str, rb_ascii8bit_encoding());
26532 }
26533 return 0;
26534
26535 error:
26536 return c;
26537}
26538#endif
26539
26540static void
26541reg_fragment_setenc(struct parser_params* p, rb_parser_string_t *str, int options)
26542{
26543 int c = rb_reg_fragment_setenc(p, str, options);
26544 if (c) reg_fragment_enc_error(p, str, c);
26545}
26546
26547#ifndef UNIVERSAL_PARSER
26548typedef struct {
26549 struct parser_params* parser;
26550 rb_encoding *enc;
26551 NODE *succ_block;
26552 const YYLTYPE *loc;
26553 rb_parser_assignable_func assignable;
26555
26556static int
26557reg_named_capture_assign_iter(const OnigUChar *name, const OnigUChar *name_end,
26558 int back_num, int *back_refs, OnigRegex regex, void *arg0)
26559{
26561 struct parser_params* p = arg->parser;
26562 rb_encoding *enc = arg->enc;
26563 long len = name_end - name;
26564 const char *s = (const char *)name;
26565
26566 return rb_reg_named_capture_assign_iter_impl(p, s, len, enc, &arg->succ_block, arg->loc, arg->assignable);
26567}
26568
26569static NODE *
26570reg_named_capture_assign(struct parser_params* p, VALUE regexp, const YYLTYPE *loc, rb_parser_assignable_func assignable)
26571{
26573
26574 arg.parser = p;
26575 arg.enc = rb_enc_get(regexp);
26576 arg.succ_block = 0;
26577 arg.loc = loc;
26578 arg.assignable = assignable;
26579 onig_foreach_name(RREGEXP_PTR(regexp), reg_named_capture_assign_iter, &arg);
26580
26581 if (!arg.succ_block) return 0;
26582 return RNODE_BLOCK(arg.succ_block)->nd_next;
26583}
26584#endif
26585
26586#ifndef RIPPER
26587NODE *
26588rb_parser_assignable(struct parser_params *p, ID id, NODE *val, const YYLTYPE *loc)
26589{
26590 return assignable(p, id, val, loc);
26591}
26592
26593int
26594rb_reg_named_capture_assign_iter_impl(struct parser_params *p, const char *s, long len,
26595 rb_encoding *enc, NODE **succ_block, const rb_code_location_t *loc, rb_parser_assignable_func assignable)
26596{
26597 ID var;
26598 NODE *node, *succ;
26599
26600 if (!len) return ST_CONTINUE;
26601 if (!VALID_SYMNAME_P(s, len, enc, ID_LOCAL))
26602 return ST_CONTINUE;
26603
26604 var = intern_cstr(s, len, enc);
26605 if (len < MAX_WORD_LENGTH && rb_reserved_word(s, (int)len)) {
26606 if (!lvar_defined(p, var)) return ST_CONTINUE;
26607 }
26608 node = node_assign(p, assignable(p, var, 0, loc), NEW_SYM(rb_id2str(var), loc), NO_LEX_CTXT, loc);
26609 succ = *succ_block;
26610 if (!succ) succ = NEW_ERROR(loc);
26611 succ = block_append(p, succ, node);
26612 *succ_block = succ;
26613 return ST_CONTINUE;
26614}
26615#endif
26616
26617static VALUE
26618parser_reg_compile(struct parser_params* p, rb_parser_string_t *str, int options)
26619{
26620 VALUE str2;
26621 reg_fragment_setenc(p, str, options);
26622 str2 = rb_str_new_parser_string(str);
26623 return rb_parser_reg_compile(p, str2, options);
26624}
26625
26626#ifndef RIPPER
26627VALUE
26628rb_parser_reg_compile(struct parser_params* p, VALUE str, int options)
26629{
26630 return rb_reg_compile(str, options & RE_OPTION_MASK, p->ruby_sourcefile, p->ruby_sourceline);
26631}
26632#endif
26633
26634static VALUE
26635reg_compile(struct parser_params* p, rb_parser_string_t *str, int options)
26636{
26637 VALUE re;
26638 VALUE err;
26639
26640 err = rb_errinfo();
26641 re = parser_reg_compile(p, str, options);
26642 if (NIL_P(re)) {
26643 VALUE m = rb_attr_get(rb_errinfo(), idMesg);
26644 rb_set_errinfo(err);
26645 compile_error(p, "%"PRIsVALUE, m);
26646 return Qnil;
26647 }
26648 return re;
26649}
26650
26651#ifndef RIPPER
26652void
26653rb_ruby_parser_set_options(struct parser_params *p, int print, int loop, int chomp, int split)
26654{
26655 p->do_print = print;
26656 p->do_loop = loop;
26657 p->do_chomp = chomp;
26658 p->do_split = split;
26659}
26660
26661static NODE *
26662parser_append_options(struct parser_params *p, NODE *node)
26663{
26664 static const YYLTYPE default_location = {{1, 0}, {1, 0}};
26665 const YYLTYPE *const LOC = &default_location;
26666
26667 if (p->do_print) {
26668 NODE *print = (NODE *)NEW_FCALL(rb_intern("print"),
26669 NEW_LIST(NEW_GVAR(idLASTLINE, LOC), LOC),
26670 LOC);
26671 node = block_append(p, node, print);
26672 }
26673
26674 if (p->do_loop) {
26675 NODE *irs = NEW_LIST(NEW_GVAR(rb_intern("$/"), LOC), LOC);
26676
26677 if (p->do_split) {
26678 ID ifs = rb_intern("$;");
26679 ID fields = rb_intern("$F");
26680 NODE *args = NEW_LIST(NEW_GVAR(ifs, LOC), LOC);
26681 NODE *split = NEW_GASGN(fields,
26682 NEW_CALL(NEW_GVAR(idLASTLINE, LOC),
26683 rb_intern("split"), args, LOC),
26684 LOC);
26685 node = block_append(p, split, node);
26686 }
26687 if (p->do_chomp) {
26688 NODE *chomp = NEW_SYM(rb_str_new_cstr("chomp"), LOC);
26689 chomp = list_append(p, NEW_LIST(chomp, LOC), NEW_TRUE(LOC));
26690 irs = list_append(p, irs, NEW_HASH(chomp, LOC));
26691 }
26692
26693 node = NEW_WHILE((NODE *)NEW_FCALL(idGets, irs, LOC), node, 1, LOC, &NULL_LOC, &NULL_LOC);
26694 }
26695
26696 return node;
26697}
26698
26699void
26700rb_init_parse(void)
26701{
26702 /* just to suppress unused-function warnings */
26703 (void)nodetype;
26704 (void)nodeline;
26705}
26706
26707ID
26708internal_id(struct parser_params *p)
26709{
26710 return rb_make_temporary_id(vtable_size(p->lvtbl->args) + vtable_size(p->lvtbl->vars));
26711}
26712#endif /* !RIPPER */
26713
26714static void
26715parser_initialize(struct parser_params *p)
26716{
26717 /* note: we rely on TypedData_Make_Struct to set most fields to 0 */
26718 p->command_start = TRUE;
26719 p->ruby_sourcefile_string = Qnil;
26720 p->lex.lpar_beg = -1; /* make lambda_beginning_p() == FALSE at first */
26721 string_buffer_init(p);
26722 p->node_id = 0;
26723 p->delayed.token = NULL;
26724 p->frozen_string_literal = -1; /* not specified */
26725#ifndef RIPPER
26726 p->error_buffer = Qfalse;
26727 p->end_expect_token_locations = NULL;
26728 p->token_id = 0;
26729 p->tokens = NULL;
26730#else
26731 p->result = Qnil;
26732 p->parsing_thread = Qnil;
26733 p->s_value = Qnil;
26734 p->s_lvalue = Qnil;
26735 p->s_value_stack = rb_ary_new();
26736#endif
26737 p->debug_buffer = Qnil;
26738 p->debug_output = rb_ractor_stdout();
26739 p->enc = rb_utf8_encoding();
26740 p->exits = 0;
26741}
26742
26743#ifdef RIPPER
26744#define rb_ruby_parser_mark ripper_parser_mark
26745#define rb_ruby_parser_free ripper_parser_free
26746#define rb_ruby_parser_memsize ripper_parser_memsize
26747#endif
26748
26749void
26750rb_ruby_parser_mark(void *ptr)
26751{
26752 struct parser_params *p = (struct parser_params*)ptr;
26753
26754 rb_gc_mark(p->ruby_sourcefile_string);
26755#ifndef RIPPER
26756 rb_gc_mark(p->error_buffer);
26757#else
26758 rb_gc_mark(p->value);
26759 rb_gc_mark(p->result);
26760 rb_gc_mark(p->parsing_thread);
26761 rb_gc_mark(p->s_value);
26762 rb_gc_mark(p->s_lvalue);
26763 rb_gc_mark(p->s_value_stack);
26764#endif
26765 rb_gc_mark(p->debug_buffer);
26766 rb_gc_mark(p->debug_output);
26767}
26768
26769void
26770rb_ruby_parser_free(void *ptr)
26771{
26772 struct parser_params *p = (struct parser_params*)ptr;
26773 struct local_vars *local, *prev;
26774
26775 if (p->ast) {
26776 rb_ast_free(p->ast);
26777 }
26778
26779 if (p->warn_duplicate_keys_table) {
26780 st_free_table(p->warn_duplicate_keys_table);
26781 }
26782
26783#ifndef RIPPER
26784 if (p->tokens) {
26785 rb_parser_ary_free(p, p->tokens);
26786 }
26787#endif
26788
26789 if (p->tokenbuf) {
26790 ruby_sized_xfree(p->tokenbuf, p->toksiz);
26791 }
26792
26793 for (local = p->lvtbl; local; local = prev) {
26794 prev = local->prev;
26795 local_free(p, local);
26796 }
26797
26798 {
26799 token_info *ptinfo;
26800 while ((ptinfo = p->token_info) != 0) {
26801 p->token_info = ptinfo->next;
26802 xfree(ptinfo);
26803 }
26804 }
26805 string_buffer_free(p);
26806
26807 if (p->pvtbl) {
26808 st_free_table(p->pvtbl);
26809 }
26810
26811 if (CASE_LABELS_ENABLED_P(p->case_labels)) {
26812 st_free_table(p->case_labels);
26813 }
26814
26815 xfree(p->lex.strterm);
26816 p->lex.strterm = 0;
26817
26818 xfree(ptr);
26819}
26820
26821size_t
26822rb_ruby_parser_memsize(const void *ptr)
26823{
26824 struct parser_params *p = (struct parser_params*)ptr;
26825 struct local_vars *local;
26826 size_t size = sizeof(*p);
26827
26828 size += p->toksiz;
26829 for (local = p->lvtbl; local; local = local->prev) {
26830 size += sizeof(*local);
26831 if (local->vars) size += local->vars->capa * sizeof(ID);
26832 }
26833 return size;
26834}
26835
26836#ifndef RIPPER
26837#undef rb_reserved_word
26838
26839const struct kwtable *
26840rb_reserved_word(const char *str, unsigned int len)
26841{
26842 return reserved_word(str, len);
26843}
26844
26845#ifdef UNIVERSAL_PARSER
26847rb_ruby_parser_allocate(const rb_parser_config_t *config)
26848{
26849 /* parser_initialize expects fields to be set to 0 */
26850 rb_parser_t *p = (rb_parser_t *)config->calloc(1, sizeof(rb_parser_t));
26851 p->config = config;
26852 return p;
26853}
26854
26856rb_ruby_parser_new(const rb_parser_config_t *config)
26857{
26858 /* parser_initialize expects fields to be set to 0 */
26859 rb_parser_t *p = rb_ruby_parser_allocate(config);
26860 parser_initialize(p);
26861 return p;
26862}
26863#else
26865rb_ruby_parser_allocate(void)
26866{
26867 /* parser_initialize expects fields to be set to 0 */
26868 rb_parser_t *p = (rb_parser_t *)ruby_xcalloc(1, sizeof(rb_parser_t));
26869 return p;
26870}
26871
26873rb_ruby_parser_new(void)
26874{
26875 /* parser_initialize expects fields to be set to 0 */
26876 rb_parser_t *p = rb_ruby_parser_allocate();
26877 parser_initialize(p);
26878 return p;
26879}
26880#endif
26881
26883rb_ruby_parser_set_context(rb_parser_t *p, const struct rb_iseq_struct *base, int main)
26884{
26885 p->error_buffer = main ? Qfalse : Qnil;
26886 p->parent_iseq = base;
26887 return p;
26888}
26889
26890void
26891rb_ruby_parser_set_script_lines(rb_parser_t *p)
26892{
26893 p->debug_lines = rb_parser_ary_new_capa_for_script_line(p, 10);
26894}
26895
26896void
26897rb_ruby_parser_error_tolerant(rb_parser_t *p)
26898{
26899 p->error_tolerant = 1;
26900}
26901
26902void
26903rb_ruby_parser_keep_tokens(rb_parser_t *p)
26904{
26905 p->keep_tokens = 1;
26906 p->tokens = rb_parser_ary_new_capa_for_ast_token(p, 10);
26907}
26908
26910rb_ruby_parser_encoding(rb_parser_t *p)
26911{
26912 return p->enc;
26913}
26914
26915int
26916rb_ruby_parser_end_seen_p(rb_parser_t *p)
26917{
26918 return p->ruby__end__seen;
26919}
26920
26921int
26922rb_ruby_parser_set_yydebug(rb_parser_t *p, int flag)
26923{
26924 p->debug = flag;
26925 return flag;
26926}
26927#endif /* !RIPPER */
26928
26929#ifdef RIPPER
26930int
26931rb_ruby_parser_get_yydebug(rb_parser_t *p)
26932{
26933 return p->debug;
26934}
26935
26936void
26937rb_ruby_parser_set_value(rb_parser_t *p, VALUE value)
26938{
26939 p->value = value;
26940}
26941
26942int
26943rb_ruby_parser_error_p(rb_parser_t *p)
26944{
26945 return p->error_p;
26946}
26947
26948VALUE
26949rb_ruby_parser_debug_output(rb_parser_t *p)
26950{
26951 return p->debug_output;
26952}
26953
26954void
26955rb_ruby_parser_set_debug_output(rb_parser_t *p, VALUE output)
26956{
26957 p->debug_output = output;
26958}
26959
26960VALUE
26961rb_ruby_parser_parsing_thread(rb_parser_t *p)
26962{
26963 return p->parsing_thread;
26964}
26965
26966void
26967rb_ruby_parser_set_parsing_thread(rb_parser_t *p, VALUE parsing_thread)
26968{
26969 p->parsing_thread = parsing_thread;
26970}
26971
26972void
26973rb_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)
26974{
26975 p->lex.gets = gets;
26976 p->lex.input = input;
26977 p->eofp = 0;
26978 p->ruby_sourcefile_string = sourcefile_string;
26979 p->ruby_sourcefile = sourcefile;
26980 p->ruby_sourceline = sourceline;
26981}
26982
26983VALUE
26984rb_ruby_parser_result(rb_parser_t *p)
26985{
26986 return p->result;
26987}
26988
26990rb_ruby_parser_enc(rb_parser_t *p)
26991{
26992 return p->enc;
26993}
26994
26995VALUE
26996rb_ruby_parser_ruby_sourcefile_string(rb_parser_t *p)
26997{
26998 return p->ruby_sourcefile_string;
26999}
27000
27001int
27002rb_ruby_parser_ruby_sourceline(rb_parser_t *p)
27003{
27004 return p->ruby_sourceline;
27005}
27006
27007int
27008rb_ruby_parser_lex_state(rb_parser_t *p)
27009{
27010 return p->lex.state;
27011}
27012
27013void
27014rb_ruby_ripper_parse0(rb_parser_t *p)
27015{
27016 parser_prepare(p);
27017 p->ast = rb_ast_new();
27018 ripper_yyparse((void*)p);
27019 rb_ast_free(p->ast);
27020 p->ast = 0;
27021 p->eval_tree = 0;
27022 p->eval_tree_begin = 0;
27023}
27024
27025int
27026rb_ruby_ripper_dedent_string(rb_parser_t *p, rb_parser_string_t *string, int width)
27027{
27028 return dedent_string(p, string, width);
27029}
27030
27031int
27032rb_ruby_ripper_initialized_p(rb_parser_t *p)
27033{
27034 return p->lex.input != 0;
27035}
27036
27037void
27038rb_ruby_ripper_parser_initialize(rb_parser_t *p)
27039{
27040 parser_initialize(p);
27041}
27042
27043long
27044rb_ruby_ripper_column(rb_parser_t *p)
27045{
27046 return p->lex.ptok - p->lex.pbeg;
27047}
27048
27049long
27050rb_ruby_ripper_token_len(rb_parser_t *p)
27051{
27052 return p->lex.pcur - p->lex.ptok;
27053}
27054
27056rb_ruby_ripper_lex_lastline(rb_parser_t *p)
27057{
27058 return p->lex.lastline;
27059}
27060
27061VALUE
27062rb_ruby_ripper_lex_state_name(struct parser_params *p, int state)
27063{
27064 return rb_parser_lex_state_name(p, (enum lex_state_e)state);
27065}
27066
27067#ifdef UNIVERSAL_PARSER
27069rb_ripper_parser_params_allocate(const rb_parser_config_t *config)
27070{
27071 rb_parser_t *p = (rb_parser_t *)config->calloc(1, sizeof(rb_parser_t));
27072 p->config = config;
27073 return p;
27074}
27075#endif
27076
27077struct parser_params*
27078rb_ruby_ripper_parser_allocate(void)
27079{
27080 return (struct parser_params *)ruby_xcalloc(1, sizeof(struct parser_params));
27081}
27082#endif /* RIPPER */
27083
27084#ifndef RIPPER
27085void
27086rb_parser_printf(struct parser_params *p, const char *fmt, ...)
27087{
27088 va_list ap;
27089 VALUE mesg = p->debug_buffer;
27090
27091 if (NIL_P(mesg)) p->debug_buffer = mesg = rb_str_new(0, 0);
27092 va_start(ap, fmt);
27093 rb_str_vcatf(mesg, fmt, ap);
27094 va_end(ap);
27095 if (char_at_end(p, mesg, 0) == '\n') {
27096 rb_io_write(p->debug_output, mesg);
27097 p->debug_buffer = Qnil;
27098 }
27099}
27100
27101static void
27102parser_compile_error(struct parser_params *p, const rb_code_location_t *loc, const char *fmt, ...)
27103{
27104 va_list ap;
27105 int lineno, column;
27106
27107 if (loc) {
27108 lineno = loc->end_pos.lineno;
27109 column = loc->end_pos.column;
27110 }
27111 else {
27112 lineno = p->ruby_sourceline;
27113 column = rb_long2int(p->lex.pcur - p->lex.pbeg);
27114 }
27115
27116 rb_io_flush(p->debug_output);
27117 p->error_p = 1;
27118 va_start(ap, fmt);
27119 p->error_buffer =
27120 rb_syntax_error_append(p->error_buffer,
27121 p->ruby_sourcefile_string,
27122 lineno, column,
27123 p->enc, fmt, ap);
27124 va_end(ap);
27125}
27126
27127static size_t
27128count_char(const char *str, int c)
27129{
27130 int n = 0;
27131 while (str[n] == c) ++n;
27132 return n;
27133}
27134
27135/*
27136 * strip enclosing double-quotes, same as the default yytnamerr except
27137 * for that single-quotes matching back-quotes do not stop stripping.
27138 *
27139 * "\"`class' keyword\"" => "`class' keyword"
27140 */
27141size_t
27142rb_yytnamerr(struct parser_params *p, char *yyres, const char *yystr)
27143{
27144 if (*yystr == '"') {
27145 size_t yyn = 0, bquote = 0;
27146 const char *yyp = yystr;
27147
27148 while (*++yyp) {
27149 switch (*yyp) {
27150 case '\'':
27151 if (!bquote) {
27152 bquote = count_char(yyp+1, '\'') + 1;
27153 if (yyres) memcpy(&yyres[yyn], yyp, bquote);
27154 yyn += bquote;
27155 yyp += bquote - 1;
27156 break;
27157 }
27158 else {
27159 if (bquote && count_char(yyp+1, '\'') + 1 == bquote) {
27160 if (yyres) memcpy(yyres + yyn, yyp, bquote);
27161 yyn += bquote;
27162 yyp += bquote - 1;
27163 bquote = 0;
27164 break;
27165 }
27166 if (yyp[1] && yyp[1] != '\'' && yyp[2] == '\'') {
27167 if (yyres) memcpy(yyres + yyn, yyp, 3);
27168 yyn += 3;
27169 yyp += 2;
27170 break;
27171 }
27172 goto do_not_strip_quotes;
27173 }
27174
27175 case ',':
27176 goto do_not_strip_quotes;
27177
27178 case '\\':
27179 if (*++yyp != '\\')
27180 goto do_not_strip_quotes;
27181 /* Fall through. */
27182 default:
27183 if (yyres)
27184 yyres[yyn] = *yyp;
27185 yyn++;
27186 break;
27187
27188 case '"':
27189 case '\0':
27190 if (yyres)
27191 yyres[yyn] = '\0';
27192 return yyn;
27193 }
27194 }
27195 do_not_strip_quotes: ;
27196 }
27197
27198 if (!yyres) return strlen(yystr);
27199
27200 return (YYSIZE_T)(yystpcpy(yyres, yystr) - yyres);
27201}
27202#endif
27203
27204#ifdef RIPPER
27205#define validate(x) (void)(x)
27206
27207static VALUE
27208ripper_dispatch0(struct parser_params *p, ID mid)
27209{
27210 return rb_funcall(p->value, mid, 0);
27211}
27212
27213static VALUE
27214ripper_dispatch1(struct parser_params *p, ID mid, VALUE a)
27215{
27216 validate(a);
27217 return rb_funcall(p->value, mid, 1, a);
27218}
27219
27220static VALUE
27221ripper_dispatch2(struct parser_params *p, ID mid, VALUE a, VALUE b)
27222{
27223 validate(a);
27224 validate(b);
27225 return rb_funcall(p->value, mid, 2, a, b);
27226}
27227
27228static VALUE
27229ripper_dispatch3(struct parser_params *p, ID mid, VALUE a, VALUE b, VALUE c)
27230{
27231 validate(a);
27232 validate(b);
27233 validate(c);
27234 return rb_funcall(p->value, mid, 3, a, b, c);
27235}
27236
27237static VALUE
27238ripper_dispatch4(struct parser_params *p, ID mid, VALUE a, VALUE b, VALUE c, VALUE d)
27239{
27240 validate(a);
27241 validate(b);
27242 validate(c);
27243 validate(d);
27244 return rb_funcall(p->value, mid, 4, a, b, c, d);
27245}
27246
27247static VALUE
27248ripper_dispatch5(struct parser_params *p, ID mid, VALUE a, VALUE b, VALUE c, VALUE d, VALUE e)
27249{
27250 validate(a);
27251 validate(b);
27252 validate(c);
27253 validate(d);
27254 validate(e);
27255 return rb_funcall(p->value, mid, 5, a, b, c, d, e);
27256}
27257
27258static VALUE
27259ripper_dispatch7(struct parser_params *p, ID mid, VALUE a, VALUE b, VALUE c, VALUE d, VALUE e, VALUE f, VALUE g)
27260{
27261 validate(a);
27262 validate(b);
27263 validate(c);
27264 validate(d);
27265 validate(e);
27266 validate(f);
27267 validate(g);
27268 return rb_funcall(p->value, mid, 7, a, b, c, d, e, f, g);
27269}
27270
27271void
27272ripper_error(struct parser_params *p)
27273{
27274 p->error_p = TRUE;
27275}
27276
27277VALUE
27278ripper_value(struct parser_params *p)
27279{
27280 (void)yystpcpy; /* may not used in newer bison */
27281
27282 return p->value;
27283}
27284
27285#endif /* RIPPER */
27286/*
27287 * Local variables:
27288 * mode: c
27289 * c-file-style: "ruby"
27290 * End:
27291 */
#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:682
#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:2164
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:816
VALUE rb_funcall(VALUE recv, ID mid, int n,...)
Calls a method.
Definition vm_eval.c:1117
VALUE rb_ary_new(void)
Allocates a new, empty array.
VALUE rb_ary_pop(VALUE ary)
Destructively deletes an element from the end of the passed array and returns what was deleted.
VALUE rb_ary_push(VALUE ary, VALUE elem)
Special case of rb_ary_cat() that it adds only one element.
VALUE rb_ary_entry(VALUE ary, long off)
Queries an element of an array.
#define rb_str_new(str, len)
Allocates an instance of rb_cString.
Definition string.h: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:3525
#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:948
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.