Ruby 4.1.0dev (2026-04-17 revision cf91f2025c7235b4ddffacb0b5b4db281e0feb20)
parse.c
1/* A Bison parser, made by Lrama 0.8.0. */
2
3/* Bison implementation for Yacc-like parsers in C
4
5 Copyright (C) 1984, 1989-1990, 2000-2015, 2018-2021 Free Software Foundation,
6 Inc.
7
8 This program is free software: you can redistribute it and/or modify
9 it under the terms of the GNU General Public License as published by
10 the Free Software Foundation, either version 3 of the License, or
11 (at your option) any later version.
12
13 This program is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU General Public License for more details.
17
18 You should have received a copy of the GNU General Public License
19 along with this program. If not, see <https://www.gnu.org/licenses/>. */
20
21/* As a special exception, you may create a larger work that contains
22 part or all of the Bison parser skeleton and distribute that work
23 under terms of your choice, so long as that work isn't itself a
24 parser generator using the skeleton or a modified version thereof
25 as a parser skeleton. Alternatively, if you modify or redistribute
26 the parser skeleton itself, you may (at your option) remove this
27 special exception, which will cause the skeleton and the resulting
28 Bison output files to be licensed under the GNU General Public
29 License without this special exception.
30
31 This special exception was added by the Free Software Foundation in
32 version 2.2 of Bison. */
33
34/* C LALR(1) parser skeleton written by Richard Stallman, by
35 simplifying the original so-called "semantic" parser. */
36
37/* DO NOT RELY ON FEATURES THAT ARE NOT DOCUMENTED in the manual,
38 especially those whose name start with YY_ or yy_. They are
39 private implementation details that can be changed or removed. */
40
41/* All symbols defined below should begin with yy or YY, to avoid
42 infringing on user name space. This should be done even for local
43 variables, as they might otherwise be expanded by user macros.
44 There are some unavoidable exceptions within include files to
45 define necessary library symbols; they are noted "INFRINGES ON
46 USER NAME SPACE" below. */
47
48/* Identify Bison output, and Bison version. */
49#define YYBISON 30802
50
51/* Bison version string. */
52#define YYBISON_VERSION "3.8.2"
53
54/* Skeleton name. */
55#define YYSKELETON_NAME "yacc.c"
56
57/* Pure parsers. */
58#define YYPURE 1
59
60/* Push parsers. */
61#define YYPUSH 0
62
63/* Pull parsers. */
64#define YYPULL 1
65
66
67/* First part of user prologue. */
68#line 12 "parse.y"
69
70
71#if !YYPURE
72# error needs pure parser
73#endif
74#define YYDEBUG 1
75#define YYERROR_VERBOSE 1
76#define YYSTACK_USE_ALLOCA 0
77
78/* For Ripper */
79#ifdef RUBY_EXTCONF_H
80# include RUBY_EXTCONF_H
81#endif
82
83#include "ruby/internal/config.h"
84
85#include <errno.h>
86
87#ifdef UNIVERSAL_PARSER
88
89#include "internal/ruby_parser.h"
90#include "parser_node.h"
91#include "universal_parser.c"
92
93#ifdef RIPPER
94#define STATIC_ID2SYM p->config->static_id2sym
95#define rb_str_coderange_scan_restartable p->config->str_coderange_scan_restartable
96#endif
97
98#else
99
100#include "internal.h"
101#include "internal/compile.h"
102#include "internal/compilers.h"
103#include "internal/complex.h"
104#include "internal/encoding.h"
105#include "internal/error.h"
106#include "internal/hash.h"
107#include "internal/io.h"
108#include "internal/numeric.h"
109#include "internal/parse.h"
110#include "internal/rational.h"
111#include "internal/re.h"
112#include "internal/ruby_parser.h"
113#include "internal/symbol.h"
114#include "internal/thread.h"
115#include "internal/variable.h"
116#include "node.h"
117#include "parser_node.h"
118#include "probes.h"
119#include "regenc.h"
120#include "ruby/encoding.h"
121#include "ruby/regex.h"
122#include "ruby/ruby.h"
123#include "ruby/st.h"
124#include "ruby/util.h"
125#include "ruby/ractor.h"
126#include "symbol.h"
127
128#ifndef RIPPER
129static VALUE
130syntax_error_new(void)
131{
133}
134#endif
135
136static NODE *reg_named_capture_assign(struct parser_params* p, VALUE regexp, const YYLTYPE *loc, rb_parser_assignable_func assignable);
137
138#define compile_callback rb_suppress_tracing
139#endif /* !UNIVERSAL_PARSER */
140
141#define NODE_SPECIAL_EMPTY_ARGS ((NODE *)-1)
142#define NODE_EMPTY_ARGS_P(node) ((node) == NODE_SPECIAL_EMPTY_ARGS)
143
144static int rb_parser_string_hash_cmp(rb_parser_string_t *str1, rb_parser_string_t *str2);
145
146#ifndef RIPPER
147static rb_parser_string_t *rb_parser_string_deep_copy(struct parser_params *p, const rb_parser_string_t *original);
148#endif
149
150static int
151node_integer_cmp(rb_node_integer_t *n1, rb_node_integer_t *n2)
152{
153 return (n1->minus != n2->minus ||
154 n1->base != n2->base ||
155 strcmp(n1->val, n2->val));
156}
157
158static int
159node_float_cmp(rb_node_float_t *n1, rb_node_float_t *n2)
160{
161 return (n1->minus != n2->minus ||
162 strcmp(n1->val, n2->val));
163}
164
165static int
166node_rational_cmp(rb_node_rational_t *n1, rb_node_rational_t *n2)
167{
168 return (n1->minus != n2->minus ||
169 n1->base != n2->base ||
170 n1->seen_point != n2->seen_point ||
171 strcmp(n1->val, n2->val));
172}
173
174static int
175node_imaginary_cmp(rb_node_imaginary_t *n1, rb_node_imaginary_t *n2)
176{
177 return (n1->minus != n2->minus ||
178 n1->base != n2->base ||
179 n1->seen_point != n2->seen_point ||
180 n1->type != n2->type ||
181 strcmp(n1->val, n2->val));
182}
183
184static int
185rb_parser_regx_hash_cmp(rb_node_regx_t *n1, rb_node_regx_t *n2)
186{
187 return (n1->options != n2->options ||
188 rb_parser_string_hash_cmp(n1->string, n2->string));
189}
190
191static st_index_t rb_parser_str_hash(rb_parser_string_t *str);
192static st_index_t rb_char_p_hash(const char *c);
193
194static int
195literal_cmp(st_data_t val, st_data_t lit)
196{
197 if (val == lit) return 0;
198
199 NODE *node_val = RNODE(val);
200 NODE *node_lit = RNODE(lit);
201 enum node_type type_val = nd_type(node_val);
202 enum node_type type_lit = nd_type(node_lit);
203
204 if (type_val != type_lit) {
205 return -1;
206 }
207
208 switch (type_lit) {
209 case NODE_INTEGER:
210 return node_integer_cmp(RNODE_INTEGER(node_val), RNODE_INTEGER(node_lit));
211 case NODE_FLOAT:
212 return node_float_cmp(RNODE_FLOAT(node_val), RNODE_FLOAT(node_lit));
213 case NODE_RATIONAL:
214 return node_rational_cmp(RNODE_RATIONAL(node_val), RNODE_RATIONAL(node_lit));
215 case NODE_IMAGINARY:
216 return node_imaginary_cmp(RNODE_IMAGINARY(node_val), RNODE_IMAGINARY(node_lit));
217 case NODE_STR:
218 return rb_parser_string_hash_cmp(RNODE_STR(node_val)->string, RNODE_STR(node_lit)->string);
219 case NODE_SYM:
220 return rb_parser_string_hash_cmp(RNODE_SYM(node_val)->string, RNODE_SYM(node_lit)->string);
221 case NODE_REGX:
222 return rb_parser_regx_hash_cmp(RNODE_REGX(node_val), RNODE_REGX(node_lit));
223 case NODE_LINE:
224 return node_val->nd_loc.beg_pos.lineno != node_lit->nd_loc.beg_pos.lineno;
225 case NODE_FILE:
226 return rb_parser_string_hash_cmp(RNODE_FILE(node_val)->path, RNODE_FILE(node_lit)->path);
227 case NODE_ENCODING:
228 return RNODE_ENCODING(node_val)->enc != RNODE_ENCODING(node_lit)->enc;
229 default:
230#ifdef UNIVERSAL_PARSER
231 abort();
232#else
233 rb_bug("unexpected node: %s, %s", ruby_node_name(type_val), ruby_node_name(type_lit));
234#endif
235 }
236}
237
238static st_index_t
239literal_hash(st_data_t a)
240{
241 NODE *node = (NODE *)a;
242 enum node_type type = nd_type(node);
243
244 switch (type) {
245 case NODE_INTEGER:
246 return rb_char_p_hash(RNODE_INTEGER(node)->val);
247 case NODE_FLOAT:
248 return rb_char_p_hash(RNODE_FLOAT(node)->val);
249 case NODE_RATIONAL:
250 return rb_char_p_hash(RNODE_RATIONAL(node)->val);
251 case NODE_IMAGINARY:
252 return rb_char_p_hash(RNODE_IMAGINARY(node)->val);
253 case NODE_STR:
254 return rb_parser_str_hash(RNODE_STR(node)->string);
255 case NODE_SYM:
256 return rb_parser_str_hash(RNODE_SYM(node)->string);
257 case NODE_REGX:
258 return rb_parser_str_hash(RNODE_REGX(node)->string);
259 case NODE_LINE:
260 return (st_index_t)node->nd_loc.beg_pos.lineno;
261 case NODE_FILE:
262 return rb_parser_str_hash(RNODE_FILE(node)->path);
263 case NODE_ENCODING:
264 return (st_index_t)RNODE_ENCODING(node)->enc;
265 default:
266#ifdef UNIVERSAL_PARSER
267 abort();
268#else
269 rb_bug("unexpected node: %s", ruby_node_name(type));
270#endif
271 }
272}
273
274static inline int
275parse_isascii(int c)
276{
277 return '\0' <= c && c <= '\x7f';
278}
279
280#undef ISASCII
281#define ISASCII parse_isascii
282
283static inline int
284parse_isspace(int c)
285{
286 return c == ' ' || ('\t' <= c && c <= '\r');
287}
288
289#undef ISSPACE
290#define ISSPACE parse_isspace
291
292static inline int
293parse_iscntrl(int c)
294{
295 return ('\0' <= c && c < ' ') || c == '\x7f';
296}
297
298#undef ISCNTRL
299#define ISCNTRL(c) parse_iscntrl(c)
300
301static inline int
302parse_isupper(int c)
303{
304 return 'A' <= c && c <= 'Z';
305}
306
307static inline int
308parse_islower(int c)
309{
310 return 'a' <= c && c <= 'z';
311}
312
313static inline int
314parse_isalpha(int c)
315{
316 return parse_isupper(c) || parse_islower(c);
317}
318
319#undef ISALPHA
320#define ISALPHA(c) parse_isalpha(c)
321
322static inline int
323parse_isdigit(int c)
324{
325 return '0' <= c && c <= '9';
326}
327
328#undef ISDIGIT
329#define ISDIGIT(c) parse_isdigit(c)
330
331static inline int
332parse_isalnum(int c)
333{
334 return ISALPHA(c) || ISDIGIT(c);
335}
336
337#undef ISALNUM
338#define ISALNUM(c) parse_isalnum(c)
339
340static inline int
341parse_isxdigit(int c)
342{
343 return ISDIGIT(c) || ('A' <= c && c <= 'F') || ('a' <= c && c <= 'f');
344}
345
346#undef ISXDIGIT
347#define ISXDIGIT(c) parse_isxdigit(c)
348
349#include "parser_st.h"
350
351#undef STRCASECMP
352#define STRCASECMP rb_parser_st_locale_insensitive_strcasecmp
353
354#undef STRNCASECMP
355#define STRNCASECMP rb_parser_st_locale_insensitive_strncasecmp
356
357#ifdef RIPPER
358#include "ripper_init.h"
359#endif
360
361enum rescue_context {
362 before_rescue,
363 after_rescue,
364 after_else,
365 after_ensure,
366};
367
369 unsigned int in_defined: 1;
370 unsigned int in_kwarg: 1;
371 unsigned int in_argdef: 1;
372 unsigned int in_def: 1;
373 unsigned int in_class: 1;
374 unsigned int has_trailing_semicolon: 1;
375 BITFIELD(enum rb_parser_shareability, shareable_constant_value, 2);
376 BITFIELD(enum rescue_context, in_rescue, 2);
377 unsigned int cant_return: 1;
378 unsigned int in_alt_pattern: 1;
379 unsigned int capture_in_pattern: 1;
380};
381
383
384#if defined(__GNUC__) && !defined(__clang__)
385// Suppress "parameter passing for argument of type 'struct
386// lex_context' changed" notes. `struct lex_context` is file scope,
387// and has no ABI compatibility issue.
391// Not sure why effective even after popped.
392#endif
393
394#include "parse.h"
395
396#define NO_LEX_CTXT (struct lex_context){0}
397
398#ifndef WARN_PAST_SCOPE
399# define WARN_PAST_SCOPE 0
400#endif
401
402#define TAB_WIDTH 8
403
404#define yydebug (p->debug) /* disable the global variable definition */
405
406#define YYFPRINTF(out, ...) rb_parser_printf(p, __VA_ARGS__)
407#define YY_LOCATION_PRINT(File, loc, p) \
408 rb_parser_printf(p, "%d.%d-%d.%d", \
409 (loc).beg_pos.lineno, (loc).beg_pos.column,\
410 (loc).end_pos.lineno, (loc).end_pos.column)
411#define YYLLOC_DEFAULT(Current, Rhs, N) \
412 do \
413 if (N) \
414 { \
415 (Current).beg_pos = YYRHSLOC(Rhs, 1).beg_pos; \
416 (Current).end_pos = YYRHSLOC(Rhs, N).end_pos; \
417 } \
418 else \
419 { \
420 (Current).beg_pos = YYRHSLOC(Rhs, 0).end_pos; \
421 (Current).end_pos = YYRHSLOC(Rhs, 0).end_pos; \
422 } \
423 while (0)
424#define YY_(Msgid) \
425 (((Msgid)[0] == 'm') && (strcmp((Msgid), "memory exhausted") == 0) ? \
426 "nesting too deep" : (Msgid))
427
428#define RUBY_SET_YYLLOC_FROM_STRTERM_HEREDOC(Current) \
429 rb_parser_set_location_from_strterm_heredoc(p, &p->lex.strterm->u.heredoc, &(Current))
430#define RUBY_SET_YYLLOC_OF_DELAYED_TOKEN(Current) \
431 rb_parser_set_location_of_delayed_token(p, &(Current))
432#define RUBY_SET_YYLLOC_OF_HEREDOC_END(Current) \
433 rb_parser_set_location_of_heredoc_end(p, &(Current))
434#define RUBY_SET_YYLLOC_OF_DUMMY_END(Current) \
435 rb_parser_set_location_of_dummy_end(p, &(Current))
436#define RUBY_SET_YYLLOC_OF_NONE(Current) \
437 rb_parser_set_location_of_none(p, &(Current))
438#define RUBY_SET_YYLLOC(Current) \
439 rb_parser_set_location(p, &(Current))
440#define RUBY_INIT_YYLLOC() \
441 { \
442 {p->ruby_sourceline, (int)(p->lex.ptok - p->lex.pbeg)}, \
443 {p->ruby_sourceline, (int)(p->lex.pcur - p->lex.pbeg)}, \
444 }
445
446#define IS_lex_state_for(x, ls) ((x) & (ls))
447#define IS_lex_state_all_for(x, ls) (((x) & (ls)) == (ls))
448#define IS_lex_state(ls) IS_lex_state_for(p->lex.state, (ls))
449#define IS_lex_state_all(ls) IS_lex_state_all_for(p->lex.state, (ls))
450
451# define SET_LEX_STATE(ls) \
452 parser_set_lex_state(p, ls, __LINE__)
453static inline enum lex_state_e parser_set_lex_state(struct parser_params *p, enum lex_state_e ls, int line);
454
455typedef VALUE stack_type;
456
457static const rb_code_location_t NULL_LOC = { {0, -1}, {0, -1} };
458
459# define SHOW_BITSTACK(stack, name) (p->debug ? rb_parser_show_bitstack(p, stack, name, __LINE__) : (void)0)
460# define BITSTACK_PUSH(stack, n) (((p->stack) = ((p->stack)<<1)|((n)&1)), SHOW_BITSTACK(p->stack, #stack"(push)"))
461# define BITSTACK_POP(stack) (((p->stack) = (p->stack) >> 1), SHOW_BITSTACK(p->stack, #stack"(pop)"))
462# define BITSTACK_SET_P(stack) (SHOW_BITSTACK(p->stack, #stack), (p->stack)&1)
463# define BITSTACK_SET(stack, n) ((p->stack)=(n), SHOW_BITSTACK(p->stack, #stack"(set)"))
464
465/* A flag to identify keyword_do_cond, "do" keyword after condition expression.
466 Examples: `while ... do`, `until ... do`, and `for ... in ... do` */
467#define COND_PUSH(n) BITSTACK_PUSH(cond_stack, (n))
468#define COND_POP() BITSTACK_POP(cond_stack)
469#define COND_P() BITSTACK_SET_P(cond_stack)
470#define COND_SET(n) BITSTACK_SET(cond_stack, (n))
471
472/* A flag to identify keyword_do_block; "do" keyword after command_call.
473 Example: `foo 1, 2 do`. */
474#define CMDARG_PUSH(n) BITSTACK_PUSH(cmdarg_stack, (n))
475#define CMDARG_POP() BITSTACK_POP(cmdarg_stack)
476#define CMDARG_P() BITSTACK_SET_P(cmdarg_stack)
477#define CMDARG_SET(n) BITSTACK_SET(cmdarg_stack, (n))
478
479struct vtable {
480 ID *tbl;
481 int pos;
482 int capa;
483 struct vtable *prev;
484};
485
487 struct vtable *args;
488 struct vtable *vars;
489 struct vtable *used;
490# if WARN_PAST_SCOPE
491 struct vtable *past;
492# endif
493 struct local_vars *prev;
494 struct {
495 NODE *outer, *inner, *current;
496 } numparam;
497 NODE *it;
498};
499
501 NODE *node;
502 YYLTYPE opening_loc;
503 YYLTYPE closing_loc;
505
506enum {
507 ORDINAL_PARAM = -1,
508 NO_PARAM = 0,
509 NUMPARAM_MAX = 9,
510};
511
512#define DVARS_INHERIT ((void*)1)
513#define DVARS_TOPSCOPE NULL
514#define DVARS_TERMINAL_P(tbl) ((tbl) == DVARS_INHERIT || (tbl) == DVARS_TOPSCOPE)
515
516typedef struct token_info {
517 const char *token;
519 int indent;
520 int nonspc;
521 struct token_info *next;
522} token_info;
523
528
530 struct parser_string_buffer_elem *next;
531 long len; /* Total length of allocated buf */
532 long used; /* Current usage of buf */
533 rb_parser_string_t *buf[FLEX_ARY_LEN];
535
540
541#define AFTER_HEREDOC_WITHOUT_TERMINATOR ((rb_parser_string_t *)1)
542
543/*
544 Structure of Lexer Buffer:
545
546 lex.pbeg lex.ptok lex.pcur lex.pend
547 | | | |
548 |------------+------------+------------|
549 |<---------->|
550 token
551*/
553 YYSTYPE *lval;
554 YYLTYPE *yylloc;
555
556 struct {
557 rb_strterm_t *strterm;
558 rb_parser_lex_gets_func *gets;
559 rb_parser_input_data input;
560 parser_string_buffer_t string_buffer;
561 rb_parser_string_t *lastline;
562 rb_parser_string_t *nextline;
563 const char *pbeg;
564 const char *pcur;
565 const char *pend;
566 const char *ptok;
567 enum lex_state_e state;
568 /* track the nest level of any parens "()[]{}" */
569 int paren_nest;
570 /* keep p->lex.paren_nest at the beginning of lambda "->" to detect tLAMBEG and keyword_do_LAMBDA */
571 int lpar_beg;
572 /* track the nest level of only braces "{}" */
573 int brace_nest;
574 } lex;
575 stack_type cond_stack;
576 stack_type cmdarg_stack;
577 int tokidx;
578 int toksiz;
579 int heredoc_end;
580 int heredoc_indent;
581 int heredoc_line_indent;
582 char *tokenbuf;
583 struct local_vars *lvtbl;
584 st_table *pvtbl;
585 st_table *pktbl;
586 int line_count;
587 int ruby_sourceline; /* current line no. */
588 const char *ruby_sourcefile; /* current source file */
589 VALUE ruby_sourcefile_string;
590 rb_encoding *enc;
592 st_table *case_labels;
593 rb_node_exits_t *exits;
594
595 VALUE debug_buffer;
596 VALUE debug_output;
597
598 struct {
599 rb_parser_string_t *token;
600 int beg_line;
601 int beg_col;
602 int end_line;
603 int end_col;
604 } delayed;
605
606 rb_ast_t *ast;
607 int node_id;
608
609 st_table *warn_duplicate_keys_table;
610
611 int max_numparam;
612 ID it_id;
613
614 struct lex_context ctxt;
615
616 NODE *eval_tree_begin;
617 NODE *eval_tree;
618 const struct rb_iseq_struct *parent_iseq;
619
620#ifdef UNIVERSAL_PARSER
621 const rb_parser_config_t *config;
622#endif
623 /* compile_option */
624 signed int frozen_string_literal:2; /* -1: not specified, 0: false, 1: true */
625
626 unsigned int command_start:1;
627 unsigned int eofp: 1;
628 unsigned int ruby__end__seen: 1;
629 unsigned int debug: 1;
630 unsigned int has_shebang: 1;
631 unsigned int token_seen: 1;
632 unsigned int token_info_enabled: 1;
633# if WARN_PAST_SCOPE
634 unsigned int past_scope_enabled: 1;
635# endif
636 unsigned int error_p: 1;
637 unsigned int cr_seen: 1;
638
639#ifndef RIPPER
640 /* Ruby core only */
641
642 unsigned int do_print: 1;
643 unsigned int do_loop: 1;
644 unsigned int do_chomp: 1;
645 unsigned int do_split: 1;
646 unsigned int error_tolerant: 1;
647 unsigned int keep_tokens: 1;
648
649 VALUE error_buffer;
650 rb_parser_ary_t *debug_lines;
651 /*
652 * Store specific keyword locations to generate dummy end token.
653 * Refer to the tail of list element.
654 */
656 /* id for terms */
657 int token_id;
658 /* Array for term tokens */
659 rb_parser_ary_t *tokens;
660#else
661 /* Ripper only */
662
663 VALUE value;
664 VALUE result;
665 VALUE parsing_thread;
666 VALUE s_value; /* Token VALUE */
667 VALUE s_lvalue; /* VALUE generated by rule action (reduce) */
668 VALUE s_value_stack;
669#endif
670};
671
672#define NUMPARAM_ID_P(id) numparam_id_p(p, id)
673#define NUMPARAM_ID_TO_IDX(id) (unsigned int)(((id) >> ID_SCOPE_SHIFT) - (tNUMPARAM_1 - 1))
674#define NUMPARAM_IDX_TO_ID(idx) TOKEN2LOCALID((tNUMPARAM_1 - 1 + (idx)))
675static int
676numparam_id_p(struct parser_params *p, ID id)
677{
678 if (!is_local_id(id) || id < (tNUMPARAM_1 << ID_SCOPE_SHIFT)) return 0;
679 unsigned int idx = NUMPARAM_ID_TO_IDX(id);
680 return idx > 0 && idx <= NUMPARAM_MAX;
681}
682static void numparam_name(struct parser_params *p, ID id);
683
684#ifdef RIPPER
685static void
686after_shift(struct parser_params *p)
687{
688 if (p->debug) {
689 rb_parser_printf(p, "after-shift: %+"PRIsVALUE"\n", p->s_value);
690 }
691 rb_ary_push(p->s_value_stack, p->s_value);
692 p->s_value = Qnil;
693}
694
695static void
696before_reduce(int len, struct parser_params *p)
697{
698 // Initialize $$ with $1.
699 if (len) p->s_lvalue = rb_ary_entry(p->s_value_stack, -len);
700}
701
702static void
703after_reduce(int len, struct parser_params *p)
704{
705 for (int i = 0; i < len; i++) {
706 VALUE tos = rb_ary_pop(p->s_value_stack);
707 if (p->debug) {
708 rb_parser_printf(p, "after-reduce pop: %+"PRIsVALUE"\n", tos);
709 }
710 }
711 if (p->debug) {
712 rb_parser_printf(p, "after-reduce push: %+"PRIsVALUE"\n", p->s_lvalue);
713 }
714 rb_ary_push(p->s_value_stack, p->s_lvalue);
715 p->s_lvalue = Qnil;
716}
717
718static void
719after_shift_error_token(struct parser_params *p)
720{
721 if (p->debug) {
722 rb_parser_printf(p, "after-shift-error-token:\n");
723 }
724 rb_ary_push(p->s_value_stack, Qnil);
725}
726
727static void
728after_pop_stack(int len, struct parser_params *p)
729{
730 for (int i = 0; i < len; i++) {
731 VALUE tos = rb_ary_pop(p->s_value_stack);
732 if (p->debug) {
733 rb_parser_printf(p, "after-pop-stack pop: %+"PRIsVALUE"\n", tos);
734 }
735 }
736}
737#else
738static void
739after_shift(struct parser_params *p)
740{
741}
742
743static void
744before_reduce(int len, struct parser_params *p)
745{
746}
747
748static void
749after_reduce(int len, struct parser_params *p)
750{
751}
752
753static void
754after_shift_error_token(struct parser_params *p)
755{
756}
757
758static void
759after_pop_stack(int len, struct parser_params *p)
760{
761}
762#endif
763
764#define intern_cstr(n,l,en) rb_intern3(n,l,en)
765
766#define STRING_NEW0() rb_parser_encoding_string_new(p,0,0,p->enc)
767
768#define STR_NEW(ptr,len) rb_enc_str_new((ptr),(len),p->enc)
769#define STR_NEW0() rb_enc_str_new(0,0,p->enc)
770#define STR_NEW2(ptr) rb_enc_str_new((ptr),strlen(ptr),p->enc)
771#define STR_NEW3(ptr,len,e,func) parser_str_new(p, (ptr),(len),(e),(func),p->enc)
772#define TOK_INTERN() intern_cstr(tok(p), toklen(p), p->enc)
773#define VALID_SYMNAME_P(s, l, enc, type) (rb_enc_symname_type(s, l, enc, (1U<<(type))) == (int)(type))
774
775#ifndef RIPPER
776static inline int
777char_at_end(struct parser_params *p, VALUE str, int when_empty)
778{
779 long len = RSTRING_LEN(str);
780 return len > 0 ? (unsigned char)RSTRING_PTR(str)[len-1] : when_empty;
781}
782#endif
783
784static void
785pop_pvtbl(struct parser_params *p, st_table *tbl)
786{
787 st_free_table(p->pvtbl);
788 p->pvtbl = tbl;
789}
790
791static void
792pop_pktbl(struct parser_params *p, st_table *tbl)
793{
794 if (p->pktbl) st_free_table(p->pktbl);
795 p->pktbl = tbl;
796}
797
798#define STRING_BUF_DEFAULT_LEN 16
799
800static void
801string_buffer_init(struct parser_params *p)
802{
803 parser_string_buffer_t *buf = &p->lex.string_buffer;
804 const size_t size = offsetof(parser_string_buffer_elem_t, buf) + sizeof(rb_parser_string_t *) * STRING_BUF_DEFAULT_LEN;
805
806 buf->head = buf->last = xmalloc(size);
807 buf->head->len = STRING_BUF_DEFAULT_LEN;
808 buf->head->used = 0;
809 buf->head->next = NULL;
810}
811
812static void
813string_buffer_append(struct parser_params *p, rb_parser_string_t *str)
814{
815 parser_string_buffer_t *buf = &p->lex.string_buffer;
816
817 if (buf->head->used >= buf->head->len) {
819 long n = buf->head->len * 2;
820 const size_t size = offsetof(parser_string_buffer_elem_t, buf) + sizeof(rb_parser_string_t *) * n;
821
822 elem = xmalloc(size);
823 elem->len = n;
824 elem->used = 0;
825 elem->next = NULL;
826 buf->last->next = elem;
827 buf->last = elem;
828 }
829 buf->last->buf[buf->last->used++] = str;
830}
831
832static void
833string_buffer_free(struct parser_params *p)
834{
835 parser_string_buffer_elem_t *elem = p->lex.string_buffer.head;
836
837 while (elem) {
838 parser_string_buffer_elem_t *next_elem = elem->next;
839
840 for (long i = 0; i < elem->used; i++) {
841 rb_parser_string_free(p, elem->buf[i]);
842 }
843
844 xfree(elem);
845 elem = next_elem;
846 }
847}
848
849#ifndef RIPPER
850static void flush_debug_buffer(struct parser_params *p, VALUE out, VALUE str);
851
852static void
853debug_end_expect_token_locations(struct parser_params *p, const char *name)
854{
855 if(p->debug) {
856 VALUE mesg = rb_sprintf("%s: [", name);
857 int i = 0;
858 for (end_expect_token_locations_t *loc = p->end_expect_token_locations; loc; loc = loc->prev) {
859 if (i > 0)
860 rb_str_cat_cstr(mesg, ", ");
861 rb_str_catf(mesg, "[%d, %d]", loc->pos->lineno, loc->pos->column);
862 i++;
863 }
864 rb_str_cat_cstr(mesg, "]\n");
865 flush_debug_buffer(p, p->debug_output, mesg);
866 }
867}
868
869static void
870push_end_expect_token_locations(struct parser_params *p, const rb_code_position_t *pos)
871{
872 if(!p->error_tolerant) return;
873
876 locations->pos = pos;
877 locations->prev = p->end_expect_token_locations;
878 p->end_expect_token_locations = locations;
879
880 debug_end_expect_token_locations(p, "push_end_expect_token_locations");
881}
882
883static void
884pop_end_expect_token_locations(struct parser_params *p)
885{
886 if(!p->end_expect_token_locations) return;
887
888 end_expect_token_locations_t *locations = p->end_expect_token_locations->prev;
889 ruby_xfree_sized(p->end_expect_token_locations, sizeof(end_expect_token_locations_t));
890 p->end_expect_token_locations = locations;
891
892 debug_end_expect_token_locations(p, "pop_end_expect_token_locations");
893}
894
896peek_end_expect_token_locations(struct parser_params *p)
897{
898 return p->end_expect_token_locations;
899}
900
901static const char *
902parser_token2char(struct parser_params *p, enum yytokentype tok)
903{
904 switch ((int) tok) {
905#define TOKEN2CHAR(tok) case tok: return (#tok);
906#define TOKEN2CHAR2(tok, name) case tok: return (name);
907 TOKEN2CHAR2(' ', "word_sep");
908 TOKEN2CHAR2('!', "!")
909 TOKEN2CHAR2('%', "%");
910 TOKEN2CHAR2('&', "&");
911 TOKEN2CHAR2('*', "*");
912 TOKEN2CHAR2('+', "+");
913 TOKEN2CHAR2('-', "-");
914 TOKEN2CHAR2('/', "/");
915 TOKEN2CHAR2('<', "<");
916 TOKEN2CHAR2('=', "=");
917 TOKEN2CHAR2('>', ">");
918 TOKEN2CHAR2('?', "?");
919 TOKEN2CHAR2('^', "^");
920 TOKEN2CHAR2('|', "|");
921 TOKEN2CHAR2('~', "~");
922 TOKEN2CHAR2(':', ":");
923 TOKEN2CHAR2(',', ",");
924 TOKEN2CHAR2('.', ".");
925 TOKEN2CHAR2(';', ";");
926 TOKEN2CHAR2('`', "`");
927 TOKEN2CHAR2('\n', "nl");
928 TOKEN2CHAR2('{', "\"{\"");
929 TOKEN2CHAR2('}', "\"}\"");
930 TOKEN2CHAR2('[', "\"[\"");
931 TOKEN2CHAR2(']', "\"]\"");
932 TOKEN2CHAR2('(', "\"(\"");
933 TOKEN2CHAR2(')', "\")\"");
934 TOKEN2CHAR2('\\', "backslash");
935 TOKEN2CHAR(keyword_class);
936 TOKEN2CHAR(keyword_module);
937 TOKEN2CHAR(keyword_def);
938 TOKEN2CHAR(keyword_undef);
939 TOKEN2CHAR(keyword_begin);
940 TOKEN2CHAR(keyword_rescue);
941 TOKEN2CHAR(keyword_ensure);
942 TOKEN2CHAR(keyword_end);
943 TOKEN2CHAR(keyword_if);
944 TOKEN2CHAR(keyword_unless);
945 TOKEN2CHAR(keyword_then);
946 TOKEN2CHAR(keyword_elsif);
947 TOKEN2CHAR(keyword_else);
948 TOKEN2CHAR(keyword_case);
949 TOKEN2CHAR(keyword_when);
950 TOKEN2CHAR(keyword_while);
951 TOKEN2CHAR(keyword_until);
952 TOKEN2CHAR(keyword_for);
953 TOKEN2CHAR(keyword_break);
954 TOKEN2CHAR(keyword_next);
955 TOKEN2CHAR(keyword_redo);
956 TOKEN2CHAR(keyword_retry);
957 TOKEN2CHAR(keyword_in);
958 TOKEN2CHAR(keyword_do);
959 TOKEN2CHAR(keyword_do_cond);
960 TOKEN2CHAR(keyword_do_block);
961 TOKEN2CHAR(keyword_do_LAMBDA);
962 TOKEN2CHAR(keyword_return);
963 TOKEN2CHAR(keyword_yield);
964 TOKEN2CHAR(keyword_super);
965 TOKEN2CHAR(keyword_self);
966 TOKEN2CHAR(keyword_nil);
967 TOKEN2CHAR(keyword_true);
968 TOKEN2CHAR(keyword_false);
969 TOKEN2CHAR(keyword_and);
970 TOKEN2CHAR(keyword_or);
971 TOKEN2CHAR(keyword_not);
972 TOKEN2CHAR(modifier_if);
973 TOKEN2CHAR(modifier_unless);
974 TOKEN2CHAR(modifier_while);
975 TOKEN2CHAR(modifier_until);
976 TOKEN2CHAR(modifier_rescue);
977 TOKEN2CHAR(keyword_alias);
978 TOKEN2CHAR(keyword_defined);
979 TOKEN2CHAR(keyword_BEGIN);
980 TOKEN2CHAR(keyword_END);
981 TOKEN2CHAR(keyword__LINE__);
982 TOKEN2CHAR(keyword__FILE__);
983 TOKEN2CHAR(keyword__ENCODING__);
984 TOKEN2CHAR(tIDENTIFIER);
985 TOKEN2CHAR(tFID);
986 TOKEN2CHAR(tGVAR);
987 TOKEN2CHAR(tIVAR);
988 TOKEN2CHAR(tCONSTANT);
989 TOKEN2CHAR(tCVAR);
990 TOKEN2CHAR(tLABEL);
991 TOKEN2CHAR(tINTEGER);
992 TOKEN2CHAR(tFLOAT);
993 TOKEN2CHAR(tRATIONAL);
994 TOKEN2CHAR(tIMAGINARY);
995 TOKEN2CHAR(tCHAR);
996 TOKEN2CHAR(tNTH_REF);
997 TOKEN2CHAR(tBACK_REF);
998 TOKEN2CHAR(tSTRING_CONTENT);
999 TOKEN2CHAR(tREGEXP_END);
1000 TOKEN2CHAR(tDUMNY_END);
1001 TOKEN2CHAR(tSP);
1002 TOKEN2CHAR(tUPLUS);
1003 TOKEN2CHAR(tUMINUS);
1004 TOKEN2CHAR(tPOW);
1005 TOKEN2CHAR(tCMP);
1006 TOKEN2CHAR(tEQ);
1007 TOKEN2CHAR(tEQQ);
1008 TOKEN2CHAR(tNEQ);
1009 TOKEN2CHAR(tGEQ);
1010 TOKEN2CHAR(tLEQ);
1011 TOKEN2CHAR(tANDOP);
1012 TOKEN2CHAR(tOROP);
1013 TOKEN2CHAR(tMATCH);
1014 TOKEN2CHAR(tNMATCH);
1015 TOKEN2CHAR(tDOT2);
1016 TOKEN2CHAR(tDOT3);
1017 TOKEN2CHAR(tBDOT2);
1018 TOKEN2CHAR(tBDOT3);
1019 TOKEN2CHAR(tAREF);
1020 TOKEN2CHAR(tASET);
1021 TOKEN2CHAR(tLSHFT);
1022 TOKEN2CHAR(tRSHFT);
1023 TOKEN2CHAR(tANDDOT);
1024 TOKEN2CHAR(tCOLON2);
1025 TOKEN2CHAR(tCOLON3);
1026 TOKEN2CHAR(tOP_ASGN);
1027 TOKEN2CHAR(tASSOC);
1028 TOKEN2CHAR(tLPAREN);
1029 TOKEN2CHAR(tLPAREN_ARG);
1030 TOKEN2CHAR(tLBRACK);
1031 TOKEN2CHAR(tLBRACE);
1032 TOKEN2CHAR(tLBRACE_ARG);
1033 TOKEN2CHAR(tSTAR);
1034 TOKEN2CHAR(tDSTAR);
1035 TOKEN2CHAR(tAMPER);
1036 TOKEN2CHAR(tLAMBDA);
1037 TOKEN2CHAR(tSYMBEG);
1038 TOKEN2CHAR(tSTRING_BEG);
1039 TOKEN2CHAR(tXSTRING_BEG);
1040 TOKEN2CHAR(tREGEXP_BEG);
1041 TOKEN2CHAR(tWORDS_BEG);
1042 TOKEN2CHAR(tQWORDS_BEG);
1043 TOKEN2CHAR(tSYMBOLS_BEG);
1044 TOKEN2CHAR(tQSYMBOLS_BEG);
1045 TOKEN2CHAR(tSTRING_END);
1046 TOKEN2CHAR(tSTRING_DEND);
1047 TOKEN2CHAR(tSTRING_DBEG);
1048 TOKEN2CHAR(tSTRING_DVAR);
1049 TOKEN2CHAR(tLAMBEG);
1050 TOKEN2CHAR(tLABEL_END);
1051 TOKEN2CHAR(tIGNORED_NL);
1052 TOKEN2CHAR(tCOMMENT);
1053 TOKEN2CHAR(tEMBDOC_BEG);
1054 TOKEN2CHAR(tEMBDOC);
1055 TOKEN2CHAR(tEMBDOC_END);
1056 TOKEN2CHAR(tHEREDOC_BEG);
1057 TOKEN2CHAR(tHEREDOC_END);
1058 TOKEN2CHAR(k__END__);
1059 TOKEN2CHAR(tLOWEST);
1060 TOKEN2CHAR(tUMINUS_NUM);
1061 TOKEN2CHAR(tLAST_TOKEN);
1062#undef TOKEN2CHAR
1063#undef TOKEN2CHAR2
1064 }
1065
1066 rb_bug("parser_token2id: unknown token %d", tok);
1067
1068 UNREACHABLE_RETURN(0);
1069}
1070#else
1071static void
1072push_end_expect_token_locations(struct parser_params *p, const rb_code_position_t *pos)
1073{
1074}
1075
1076static void
1077pop_end_expect_token_locations(struct parser_params *p)
1078{
1079}
1080#endif
1081
1082RBIMPL_ATTR_NONNULL((1, 2, 3))
1083static int parser_yyerror(struct parser_params*, const YYLTYPE *yylloc, const char*);
1084RBIMPL_ATTR_NONNULL((1, 2))
1085static int parser_yyerror0(struct parser_params*, const char*);
1086#define yyerror0(msg) parser_yyerror0(p, (msg))
1087#define yyerror1(loc, msg) parser_yyerror(p, (loc), (msg))
1088#define yyerror(yylloc, p, msg) parser_yyerror(p, yylloc, msg)
1089#define token_flush(ptr) ((ptr)->lex.ptok = (ptr)->lex.pcur)
1090#define lex_goto_eol(p) ((p)->lex.pcur = (p)->lex.pend)
1091#define lex_eol_p(p) lex_eol_n_p(p, 0)
1092#define lex_eol_n_p(p,n) lex_eol_ptr_n_p(p, (p)->lex.pcur, n)
1093#define lex_eol_ptr_p(p,ptr) lex_eol_ptr_n_p(p,ptr,0)
1094#define lex_eol_ptr_n_p(p,ptr,n) ((ptr)+(n) >= (p)->lex.pend)
1095
1096static void token_info_setup(token_info *ptinfo, const char *ptr, const rb_code_location_t *loc);
1097static void token_info_push(struct parser_params*, const char *token, const rb_code_location_t *loc);
1098static void token_info_pop(struct parser_params*, const char *token, const rb_code_location_t *loc);
1099static void token_info_warn(struct parser_params *p, const char *token, token_info *ptinfo_beg, int same, const rb_code_location_t *loc);
1100static void token_info_drop(struct parser_params *p, const char *token, rb_code_position_t beg_pos);
1101
1102#ifdef RIPPER
1103#define compile_for_eval (0)
1104#else
1105#define compile_for_eval (p->parent_iseq != 0)
1106#endif
1107
1108#define token_column ((int)(p->lex.ptok - p->lex.pbeg))
1109
1110#define CALL_Q_P(q) ((q) == tANDDOT)
1111#define NEW_QCALL(q,r,m,a,loc) (CALL_Q_P(q) ? NEW_QCALL0(r,m,a,loc) : NEW_CALL(r,m,a,loc))
1112
1113#define lambda_beginning_p() (p->lex.lpar_beg == p->lex.paren_nest)
1114
1115static enum yytokentype yylex(YYSTYPE*, YYLTYPE*, struct parser_params*);
1116
1117static inline void
1118rb_discard_node(struct parser_params *p, NODE *n)
1119{
1120 rb_ast_delete_node(p->ast, n);
1121}
1122
1123static rb_node_scope_t *rb_node_scope_new(struct parser_params *p, rb_node_args_t *nd_args, NODE *nd_body, NODE *nd_parent, const YYLTYPE *loc);
1124static rb_node_scope_t *rb_node_scope_new2(struct parser_params *p, rb_ast_id_table_t *nd_tbl, rb_node_args_t *nd_args, NODE *nd_body, NODE *nd_parent, const YYLTYPE *loc);
1125static rb_node_block_t *rb_node_block_new(struct parser_params *p, NODE *nd_head, const YYLTYPE *loc);
1126static rb_node_if_t *rb_node_if_new(struct parser_params *p, NODE *nd_cond, NODE *nd_body, NODE *nd_else, const YYLTYPE *loc, const YYLTYPE* if_keyword_loc, const YYLTYPE* then_keyword_loc, const YYLTYPE* end_keyword_loc);
1127static rb_node_unless_t *rb_node_unless_new(struct parser_params *p, NODE *nd_cond, NODE *nd_body, NODE *nd_else, const YYLTYPE *loc, const YYLTYPE *keyword_loc, const YYLTYPE *then_keyword_loc, const YYLTYPE *end_keyword_loc);
1128static rb_node_case_t *rb_node_case_new(struct parser_params *p, NODE *nd_head, NODE *nd_body, const YYLTYPE *loc, const YYLTYPE *case_keyword_loc, const YYLTYPE *end_keyword_loc);
1129static rb_node_case2_t *rb_node_case2_new(struct parser_params *p, NODE *nd_body, const YYLTYPE *loc, const YYLTYPE *case_keyword_loc, const YYLTYPE *end_keyword_loc);
1130static rb_node_case3_t *rb_node_case3_new(struct parser_params *p, NODE *nd_head, NODE *nd_body, const YYLTYPE *loc, const YYLTYPE *case_keyword_loc, const YYLTYPE *end_keyword_loc);
1131static rb_node_when_t *rb_node_when_new(struct parser_params *p, NODE *nd_head, NODE *nd_body, NODE *nd_next, const YYLTYPE *loc, const YYLTYPE *keyword_loc, const YYLTYPE *then_keyword_loc);
1132static rb_node_in_t *rb_node_in_new(struct parser_params *p, NODE *nd_head, NODE *nd_body, NODE *nd_next, const YYLTYPE *loc, const YYLTYPE *in_keyword_loc, const YYLTYPE *then_keyword_loc, const YYLTYPE *operator_loc);
1133static rb_node_while_t *rb_node_while_new(struct parser_params *p, NODE *nd_cond, NODE *nd_body, long nd_state, const YYLTYPE *loc, const YYLTYPE *keyword_loc, const YYLTYPE *closing_loc);
1134static rb_node_until_t *rb_node_until_new(struct parser_params *p, NODE *nd_cond, NODE *nd_body, long nd_state, const YYLTYPE *loc, const YYLTYPE *keyword_loc, const YYLTYPE *closing_loc);
1135static rb_node_iter_t *rb_node_iter_new(struct parser_params *p, rb_node_args_t *nd_args, NODE *nd_body, const YYLTYPE *loc);
1136static rb_node_for_t *rb_node_for_new(struct parser_params *p, NODE *nd_iter, NODE *nd_body, const YYLTYPE *loc, const YYLTYPE *for_keyword_loc, const YYLTYPE *in_keyword_loc, const YYLTYPE *do_keyword_loc, const YYLTYPE *end_keyword_loc);
1137static rb_node_for_masgn_t *rb_node_for_masgn_new(struct parser_params *p, NODE *nd_var, const YYLTYPE *loc);
1138static rb_node_retry_t *rb_node_retry_new(struct parser_params *p, const YYLTYPE *loc);
1139static rb_node_begin_t *rb_node_begin_new(struct parser_params *p, NODE *nd_body, const YYLTYPE *loc);
1140static rb_node_rescue_t *rb_node_rescue_new(struct parser_params *p, NODE *nd_head, NODE *nd_resq, NODE *nd_else, const YYLTYPE *loc);
1141static rb_node_resbody_t *rb_node_resbody_new(struct parser_params *p, NODE *nd_args, NODE *nd_exc_var, NODE *nd_body, NODE *nd_next, const YYLTYPE *loc);
1142static rb_node_ensure_t *rb_node_ensure_new(struct parser_params *p, NODE *nd_head, NODE *nd_ensr, const YYLTYPE *loc);
1143static rb_node_and_t *rb_node_and_new(struct parser_params *p, NODE *nd_1st, NODE *nd_2nd, const YYLTYPE *loc, const YYLTYPE *operator_loc);
1144static rb_node_or_t *rb_node_or_new(struct parser_params *p, NODE *nd_1st, NODE *nd_2nd, const YYLTYPE *loc, const YYLTYPE *operator_loc);
1145static rb_node_masgn_t *rb_node_masgn_new(struct parser_params *p, NODE *nd_head, NODE *nd_args, const YYLTYPE *loc);
1146static rb_node_lasgn_t *rb_node_lasgn_new(struct parser_params *p, ID nd_vid, NODE *nd_value, const YYLTYPE *loc);
1147static rb_node_dasgn_t *rb_node_dasgn_new(struct parser_params *p, ID nd_vid, NODE *nd_value, const YYLTYPE *loc);
1148static rb_node_gasgn_t *rb_node_gasgn_new(struct parser_params *p, ID nd_vid, NODE *nd_value, const YYLTYPE *loc);
1149static rb_node_iasgn_t *rb_node_iasgn_new(struct parser_params *p, ID nd_vid, NODE *nd_value, const YYLTYPE *loc);
1150static rb_node_cdecl_t *rb_node_cdecl_new(struct parser_params *p, ID nd_vid, NODE *nd_value, NODE *nd_else, enum rb_parser_shareability shareability, const YYLTYPE *loc);
1151static rb_node_cvasgn_t *rb_node_cvasgn_new(struct parser_params *p, ID nd_vid, NODE *nd_value, const YYLTYPE *loc);
1152static rb_node_op_asgn1_t *rb_node_op_asgn1_new(struct parser_params *p, NODE *nd_recv, ID nd_mid, NODE *index, NODE *rvalue, const YYLTYPE *loc, const YYLTYPE *call_operator_loc, const YYLTYPE *opening_loc, const YYLTYPE *closing_loc, const YYLTYPE *binary_operator_loc);
1153static rb_node_op_asgn2_t *rb_node_op_asgn2_new(struct parser_params *p, NODE *nd_recv, NODE *nd_value, ID nd_vid, ID nd_mid, bool nd_aid, const YYLTYPE *loc, const YYLTYPE *call_operator_loc, const YYLTYPE *message_loc, const YYLTYPE *binary_operator_loc);
1154static rb_node_op_asgn_or_t *rb_node_op_asgn_or_new(struct parser_params *p, NODE *nd_head, NODE *nd_value, const YYLTYPE *loc);
1155static rb_node_op_asgn_and_t *rb_node_op_asgn_and_new(struct parser_params *p, NODE *nd_head, NODE *nd_value, const YYLTYPE *loc);
1156static rb_node_op_cdecl_t *rb_node_op_cdecl_new(struct parser_params *p, NODE *nd_head, NODE *nd_value, ID nd_aid, enum rb_parser_shareability shareability, const YYLTYPE *loc);
1157static rb_node_call_t *rb_node_call_new(struct parser_params *p, NODE *nd_recv, ID nd_mid, NODE *nd_args, const YYLTYPE *loc);
1158static rb_node_opcall_t *rb_node_opcall_new(struct parser_params *p, NODE *nd_recv, ID nd_mid, NODE *nd_args, const YYLTYPE *loc);
1159static rb_node_fcall_t *rb_node_fcall_new(struct parser_params *p, ID nd_mid, NODE *nd_args, const YYLTYPE *loc);
1160static rb_node_vcall_t *rb_node_vcall_new(struct parser_params *p, ID nd_mid, const YYLTYPE *loc);
1161static rb_node_qcall_t *rb_node_qcall_new(struct parser_params *p, NODE *nd_recv, ID nd_mid, NODE *nd_args, const YYLTYPE *loc);
1162static rb_node_super_t *rb_node_super_new(struct parser_params *p, NODE *nd_args, const YYLTYPE *loc, const YYLTYPE *keyword_loc, const YYLTYPE *lparen_loc, const YYLTYPE *rparen_loc);
1163static rb_node_zsuper_t * rb_node_zsuper_new(struct parser_params *p, const YYLTYPE *loc);
1164static rb_node_list_t *rb_node_list_new(struct parser_params *p, NODE *nd_head, const YYLTYPE *loc);
1165static rb_node_list_t *rb_node_list_new2(struct parser_params *p, NODE *nd_head, long nd_alen, NODE *nd_next, const YYLTYPE *loc);
1166static rb_node_zlist_t *rb_node_zlist_new(struct parser_params *p, const YYLTYPE *loc);
1167static rb_node_hash_t *rb_node_hash_new(struct parser_params *p, NODE *nd_head, const YYLTYPE *loc);
1168static rb_node_return_t *rb_node_return_new(struct parser_params *p, NODE *nd_stts, const YYLTYPE *loc, const YYLTYPE *keyword_loc);
1169static rb_node_yield_t *rb_node_yield_new(struct parser_params *p, NODE *nd_head, const YYLTYPE *loc, const YYLTYPE *keyword_loc, const YYLTYPE *lparen_loc, const YYLTYPE *rparen_loc);
1170static rb_node_lvar_t *rb_node_lvar_new(struct parser_params *p, ID nd_vid, const YYLTYPE *loc);
1171static rb_node_dvar_t *rb_node_dvar_new(struct parser_params *p, ID nd_vid, const YYLTYPE *loc);
1172static rb_node_gvar_t *rb_node_gvar_new(struct parser_params *p, ID nd_vid, const YYLTYPE *loc);
1173static rb_node_ivar_t *rb_node_ivar_new(struct parser_params *p, ID nd_vid, const YYLTYPE *loc);
1174static rb_node_const_t *rb_node_const_new(struct parser_params *p, ID nd_vid, const YYLTYPE *loc);
1175static rb_node_cvar_t *rb_node_cvar_new(struct parser_params *p, ID nd_vid, const YYLTYPE *loc);
1176static rb_node_nth_ref_t *rb_node_nth_ref_new(struct parser_params *p, long nd_nth, const YYLTYPE *loc);
1177static rb_node_back_ref_t *rb_node_back_ref_new(struct parser_params *p, long nd_nth, const YYLTYPE *loc);
1178static rb_node_match2_t *rb_node_match2_new(struct parser_params *p, NODE *nd_recv, NODE *nd_value, const YYLTYPE *loc);
1179static rb_node_match3_t *rb_node_match3_new(struct parser_params *p, NODE *nd_recv, NODE *nd_value, const YYLTYPE *loc);
1180static rb_node_integer_t * rb_node_integer_new(struct parser_params *p, char* val, int base, const YYLTYPE *loc);
1181static rb_node_float_t * rb_node_float_new(struct parser_params *p, char* val, const YYLTYPE *loc);
1182static rb_node_rational_t * rb_node_rational_new(struct parser_params *p, char* val, int base, int seen_point, const YYLTYPE *loc);
1183static rb_node_imaginary_t * rb_node_imaginary_new(struct parser_params *p, char* val, int base, int seen_point, enum rb_numeric_type, const YYLTYPE *loc);
1184static rb_node_str_t *rb_node_str_new(struct parser_params *p, rb_parser_string_t *string, const YYLTYPE *loc);
1185static rb_node_dstr_t *rb_node_dstr_new0(struct parser_params *p, rb_parser_string_t *string, long nd_alen, NODE *nd_next, const YYLTYPE *loc);
1186static rb_node_dstr_t *rb_node_dstr_new(struct parser_params *p, rb_parser_string_t *string, const YYLTYPE *loc);
1187static rb_node_xstr_t *rb_node_xstr_new(struct parser_params *p, rb_parser_string_t *string, const YYLTYPE *loc);
1188static rb_node_dxstr_t *rb_node_dxstr_new(struct parser_params *p, rb_parser_string_t *string, long nd_alen, NODE *nd_next, const YYLTYPE *loc);
1189static rb_node_evstr_t *rb_node_evstr_new(struct parser_params *p, NODE *nd_body, const YYLTYPE *loc, const YYLTYPE *opening_loc, const YYLTYPE *closing_loc);
1190static rb_node_regx_t *rb_node_regx_new(struct parser_params *p, rb_parser_string_t *string, int options, const YYLTYPE *loc, const YYLTYPE *opening_loc, const YYLTYPE *content_loc, const YYLTYPE *closing_loc);
1191static rb_node_once_t *rb_node_once_new(struct parser_params *p, NODE *nd_body, const YYLTYPE *loc);
1192static rb_node_args_t *rb_node_args_new(struct parser_params *p, const YYLTYPE *loc);
1193static rb_node_args_aux_t *rb_node_args_aux_new(struct parser_params *p, ID nd_pid, int nd_plen, const YYLTYPE *loc);
1194static rb_node_opt_arg_t *rb_node_opt_arg_new(struct parser_params *p, NODE *nd_body, const YYLTYPE *loc);
1195static rb_node_kw_arg_t *rb_node_kw_arg_new(struct parser_params *p, NODE *nd_body, const YYLTYPE *loc);
1196static rb_node_postarg_t *rb_node_postarg_new(struct parser_params *p, NODE *nd_1st, NODE *nd_2nd, const YYLTYPE *loc);
1197static rb_node_argscat_t *rb_node_argscat_new(struct parser_params *p, NODE *nd_head, NODE *nd_body, const YYLTYPE *loc);
1198static rb_node_argspush_t *rb_node_argspush_new(struct parser_params *p, NODE *nd_head, NODE *nd_body, const YYLTYPE *loc);
1199static rb_node_splat_t *rb_node_splat_new(struct parser_params *p, NODE *nd_head, const YYLTYPE *loc, const YYLTYPE *operator_loc);
1200static rb_node_block_pass_t *rb_node_block_pass_new(struct parser_params *p, NODE *nd_body, const YYLTYPE *loc, const YYLTYPE *operator_loc);
1201static rb_node_defn_t *rb_node_defn_new(struct parser_params *p, ID nd_mid, NODE *nd_defn, const YYLTYPE *loc);
1202static rb_node_defs_t *rb_node_defs_new(struct parser_params *p, NODE *nd_recv, ID nd_mid, NODE *nd_defn, const YYLTYPE *loc);
1203static rb_node_alias_t *rb_node_alias_new(struct parser_params *p, NODE *nd_1st, NODE *nd_2nd, const YYLTYPE *loc, const YYLTYPE *keyword_loc);
1204static rb_node_valias_t *rb_node_valias_new(struct parser_params *p, ID nd_alias, ID nd_orig, const YYLTYPE *loc, const YYLTYPE *keyword_loc);
1205static rb_node_undef_t *rb_node_undef_new(struct parser_params *p, NODE *nd_undef, const YYLTYPE *loc);
1206static rb_node_class_t *rb_node_class_new(struct parser_params *p, NODE *nd_cpath, NODE *nd_body, NODE *nd_super, const YYLTYPE *loc, const YYLTYPE *class_keyword_loc, const YYLTYPE *inheritance_operator_loc, const YYLTYPE *end_keyword_loc);
1207static rb_node_module_t *rb_node_module_new(struct parser_params *p, NODE *nd_cpath, NODE *nd_body, const YYLTYPE *loc, const YYLTYPE *module_keyword_loc, const YYLTYPE *end_keyword_loc);
1208static rb_node_sclass_t *rb_node_sclass_new(struct parser_params *p, NODE *nd_recv, NODE *nd_body, const YYLTYPE *loc, const YYLTYPE *class_keyword_loc, const YYLTYPE *operator_loc, const YYLTYPE *end_keyword_loc);
1209static rb_node_colon2_t *rb_node_colon2_new(struct parser_params *p, NODE *nd_head, ID nd_mid, const YYLTYPE *loc, const YYLTYPE *delimiter_loc, const YYLTYPE *name_loc);
1210static rb_node_colon3_t *rb_node_colon3_new(struct parser_params *p, ID nd_mid, const YYLTYPE *loc, const YYLTYPE *delimiter_loc, const YYLTYPE *name_loc);
1211static rb_node_dot2_t *rb_node_dot2_new(struct parser_params *p, NODE *nd_beg, NODE *nd_end, const YYLTYPE *loc, const YYLTYPE *operator_loc);
1212static rb_node_dot3_t *rb_node_dot3_new(struct parser_params *p, NODE *nd_beg, NODE *nd_end, const YYLTYPE *loc, const YYLTYPE *operator_loc);
1213static rb_node_self_t *rb_node_self_new(struct parser_params *p, const YYLTYPE *loc);
1214static rb_node_nil_t *rb_node_nil_new(struct parser_params *p, const YYLTYPE *loc);
1215static rb_node_true_t *rb_node_true_new(struct parser_params *p, const YYLTYPE *loc);
1216static rb_node_false_t *rb_node_false_new(struct parser_params *p, const YYLTYPE *loc);
1217static rb_node_errinfo_t *rb_node_errinfo_new(struct parser_params *p, const YYLTYPE *loc);
1218static rb_node_defined_t *rb_node_defined_new(struct parser_params *p, NODE *nd_head, const YYLTYPE *loc, const YYLTYPE *keyword_loc);
1219static rb_node_postexe_t *rb_node_postexe_new(struct parser_params *p, NODE *nd_body, const YYLTYPE *loc, const YYLTYPE *keyword_loc, const YYLTYPE *opening_loc, const YYLTYPE *closing_loc);
1220static rb_node_sym_t *rb_node_sym_new(struct parser_params *p, VALUE str, const YYLTYPE *loc);
1221static rb_node_dsym_t *rb_node_dsym_new(struct parser_params *p, rb_parser_string_t *string, long nd_alen, NODE *nd_next, const YYLTYPE *loc);
1222static rb_node_attrasgn_t *rb_node_attrasgn_new(struct parser_params *p, NODE *nd_recv, ID nd_mid, NODE *nd_args, const YYLTYPE *loc);
1223static rb_node_lambda_t *rb_node_lambda_new(struct parser_params *p, rb_node_args_t *nd_args, NODE *nd_body, const YYLTYPE *loc, const YYLTYPE *operator_loc, const YYLTYPE *opening_loc, const YYLTYPE *closing_loc);
1224static rb_node_aryptn_t *rb_node_aryptn_new(struct parser_params *p, NODE *pre_args, NODE *rest_arg, NODE *post_args, const YYLTYPE *loc);
1225static rb_node_hshptn_t *rb_node_hshptn_new(struct parser_params *p, NODE *nd_pconst, NODE *nd_pkwargs, NODE *nd_pkwrestarg, const YYLTYPE *loc);
1226static rb_node_fndptn_t *rb_node_fndptn_new(struct parser_params *p, NODE *pre_rest_arg, NODE *args, NODE *post_rest_arg, const YYLTYPE *loc);
1227static rb_node_line_t *rb_node_line_new(struct parser_params *p, const YYLTYPE *loc);
1228static rb_node_file_t *rb_node_file_new(struct parser_params *p, VALUE str, const YYLTYPE *loc);
1229static rb_node_error_t *rb_node_error_new(struct parser_params *p, const YYLTYPE *loc);
1230
1231#define NEW_SCOPE(a,b,c,loc) (NODE *)rb_node_scope_new(p,a,b,c,loc)
1232#define NEW_SCOPE2(t,a,b,c,loc) (NODE *)rb_node_scope_new2(p,t,a,b,c,loc)
1233#define NEW_BLOCK(a,loc) (NODE *)rb_node_block_new(p,a,loc)
1234#define NEW_IF(c,t,e,loc,ik_loc,tk_loc,ek_loc) (NODE *)rb_node_if_new(p,c,t,e,loc,ik_loc,tk_loc,ek_loc)
1235#define NEW_UNLESS(c,t,e,loc,k_loc,t_loc,e_loc) (NODE *)rb_node_unless_new(p,c,t,e,loc,k_loc,t_loc,e_loc)
1236#define NEW_CASE(h,b,loc,ck_loc,ek_loc) (NODE *)rb_node_case_new(p,h,b,loc,ck_loc,ek_loc)
1237#define NEW_CASE2(b,loc,ck_loc,ek_loc) (NODE *)rb_node_case2_new(p,b,loc,ck_loc,ek_loc)
1238#define NEW_CASE3(h,b,loc,ck_loc,ek_loc) (NODE *)rb_node_case3_new(p,h,b,loc,ck_loc,ek_loc)
1239#define NEW_WHEN(c,t,e,loc,k_loc,t_loc) (NODE *)rb_node_when_new(p,c,t,e,loc,k_loc,t_loc)
1240#define NEW_IN(c,t,e,loc,ik_loc,tk_loc,o_loc) (NODE *)rb_node_in_new(p,c,t,e,loc,ik_loc,tk_loc,o_loc)
1241#define NEW_WHILE(c,b,n,loc,k_loc,c_loc) (NODE *)rb_node_while_new(p,c,b,n,loc,k_loc,c_loc)
1242#define NEW_UNTIL(c,b,n,loc,k_loc,c_loc) (NODE *)rb_node_until_new(p,c,b,n,loc,k_loc,c_loc)
1243#define NEW_ITER(a,b,loc) (NODE *)rb_node_iter_new(p,a,b,loc)
1244#define NEW_FOR(i,b,loc,f_loc,i_loc,d_loc,e_loc) (NODE *)rb_node_for_new(p,i,b,loc,f_loc,i_loc,d_loc,e_loc)
1245#define NEW_FOR_MASGN(v,loc) (NODE *)rb_node_for_masgn_new(p,v,loc)
1246#define NEW_RETRY(loc) (NODE *)rb_node_retry_new(p,loc)
1247#define NEW_BEGIN(b,loc) (NODE *)rb_node_begin_new(p,b,loc)
1248#define NEW_RESCUE(b,res,e,loc) (NODE *)rb_node_rescue_new(p,b,res,e,loc)
1249#define NEW_RESBODY(a,v,ex,n,loc) (NODE *)rb_node_resbody_new(p,a,v,ex,n,loc)
1250#define NEW_ENSURE(b,en,loc) (NODE *)rb_node_ensure_new(p,b,en,loc)
1251#define NEW_AND(f,s,loc,op_loc) (NODE *)rb_node_and_new(p,f,s,loc,op_loc)
1252#define NEW_OR(f,s,loc,op_loc) (NODE *)rb_node_or_new(p,f,s,loc,op_loc)
1253#define NEW_MASGN(l,r,loc) rb_node_masgn_new(p,l,r,loc)
1254#define NEW_LASGN(v,val,loc) (NODE *)rb_node_lasgn_new(p,v,val,loc)
1255#define NEW_DASGN(v,val,loc) (NODE *)rb_node_dasgn_new(p,v,val,loc)
1256#define NEW_GASGN(v,val,loc) (NODE *)rb_node_gasgn_new(p,v,val,loc)
1257#define NEW_IASGN(v,val,loc) (NODE *)rb_node_iasgn_new(p,v,val,loc)
1258#define NEW_CDECL(v,val,path,share,loc) (NODE *)rb_node_cdecl_new(p,v,val,path,share,loc)
1259#define NEW_CVASGN(v,val,loc) (NODE *)rb_node_cvasgn_new(p,v,val,loc)
1260#define NEW_OP_ASGN1(r,id,idx,rval,loc,c_op_loc,o_loc,c_loc,b_op_loc) (NODE *)rb_node_op_asgn1_new(p,r,id,idx,rval,loc,c_op_loc,o_loc,c_loc,b_op_loc)
1261#define NEW_OP_ASGN2(r,t,i,o,val,loc,c_op_loc,m_loc,b_op_loc) (NODE *)rb_node_op_asgn2_new(p,r,val,i,o,t,loc,c_op_loc,m_loc,b_op_loc)
1262#define NEW_OP_ASGN_OR(i,val,loc) (NODE *)rb_node_op_asgn_or_new(p,i,val,loc)
1263#define NEW_OP_ASGN_AND(i,val,loc) (NODE *)rb_node_op_asgn_and_new(p,i,val,loc)
1264#define NEW_OP_CDECL(v,op,val,share,loc) (NODE *)rb_node_op_cdecl_new(p,v,val,op,share,loc)
1265#define NEW_CALL(r,m,a,loc) (NODE *)rb_node_call_new(p,r,m,a,loc)
1266#define NEW_OPCALL(r,m,a,loc) (NODE *)rb_node_opcall_new(p,r,m,a,loc)
1267#define NEW_FCALL(m,a,loc) rb_node_fcall_new(p,m,a,loc)
1268#define NEW_VCALL(m,loc) (NODE *)rb_node_vcall_new(p,m,loc)
1269#define NEW_QCALL0(r,m,a,loc) (NODE *)rb_node_qcall_new(p,r,m,a,loc)
1270#define NEW_SUPER(a,loc,k_loc,l_loc,r_loc) (NODE *)rb_node_super_new(p,a,loc,k_loc,l_loc,r_loc)
1271#define NEW_ZSUPER(loc) (NODE *)rb_node_zsuper_new(p,loc)
1272#define NEW_LIST(a,loc) (NODE *)rb_node_list_new(p,a,loc)
1273#define NEW_LIST2(h,l,n,loc) (NODE *)rb_node_list_new2(p,h,l,n,loc)
1274#define NEW_ZLIST(loc) (NODE *)rb_node_zlist_new(p,loc)
1275#define NEW_HASH(a,loc) (NODE *)rb_node_hash_new(p,a,loc)
1276#define NEW_RETURN(s,loc,k_loc) (NODE *)rb_node_return_new(p,s,loc,k_loc)
1277#define NEW_YIELD(a,loc,k_loc,l_loc,r_loc) (NODE *)rb_node_yield_new(p,a,loc,k_loc,l_loc,r_loc)
1278#define NEW_LVAR(v,loc) (NODE *)rb_node_lvar_new(p,v,loc)
1279#define NEW_DVAR(v,loc) (NODE *)rb_node_dvar_new(p,v,loc)
1280#define NEW_GVAR(v,loc) (NODE *)rb_node_gvar_new(p,v,loc)
1281#define NEW_IVAR(v,loc) (NODE *)rb_node_ivar_new(p,v,loc)
1282#define NEW_CONST(v,loc) (NODE *)rb_node_const_new(p,v,loc)
1283#define NEW_CVAR(v,loc) (NODE *)rb_node_cvar_new(p,v,loc)
1284#define NEW_NTH_REF(n,loc) (NODE *)rb_node_nth_ref_new(p,n,loc)
1285#define NEW_BACK_REF(n,loc) (NODE *)rb_node_back_ref_new(p,n,loc)
1286#define NEW_MATCH2(n1,n2,loc) (NODE *)rb_node_match2_new(p,n1,n2,loc)
1287#define NEW_MATCH3(r,n2,loc) (NODE *)rb_node_match3_new(p,r,n2,loc)
1288#define NEW_INTEGER(val, base,loc) (NODE *)rb_node_integer_new(p,val,base,loc)
1289#define NEW_FLOAT(val,loc) (NODE *)rb_node_float_new(p,val,loc)
1290#define NEW_RATIONAL(val,base,seen_point,loc) (NODE *)rb_node_rational_new(p,val,base,seen_point,loc)
1291#define NEW_IMAGINARY(val,base,seen_point,numeric_type,loc) (NODE *)rb_node_imaginary_new(p,val,base,seen_point,numeric_type,loc)
1292#define NEW_STR(s,loc) (NODE *)rb_node_str_new(p,s,loc)
1293#define NEW_DSTR0(s,l,n,loc) (NODE *)rb_node_dstr_new0(p,s,l,n,loc)
1294#define NEW_DSTR(s,loc) (NODE *)rb_node_dstr_new(p,s,loc)
1295#define NEW_XSTR(s,loc) (NODE *)rb_node_xstr_new(p,s,loc)
1296#define NEW_DXSTR(s,l,n,loc) (NODE *)rb_node_dxstr_new(p,s,l,n,loc)
1297#define NEW_EVSTR(n,loc,o_loc,c_loc) (NODE *)rb_node_evstr_new(p,n,loc,o_loc,c_loc)
1298#define NEW_REGX(str,opts,loc,o_loc,ct_loc,c_loc) (NODE *)rb_node_regx_new(p,str,opts,loc,o_loc,ct_loc,c_loc)
1299#define NEW_ONCE(b,loc) (NODE *)rb_node_once_new(p,b,loc)
1300#define NEW_ARGS(loc) rb_node_args_new(p,loc)
1301#define NEW_ARGS_AUX(r,b,loc) rb_node_args_aux_new(p,r,b,loc)
1302#define NEW_OPT_ARG(v,loc) rb_node_opt_arg_new(p,v,loc)
1303#define NEW_KW_ARG(v,loc) rb_node_kw_arg_new(p,v,loc)
1304#define NEW_POSTARG(i,v,loc) (NODE *)rb_node_postarg_new(p,i,v,loc)
1305#define NEW_ARGSCAT(a,b,loc) (NODE *)rb_node_argscat_new(p,a,b,loc)
1306#define NEW_ARGSPUSH(a,b,loc) (NODE *)rb_node_argspush_new(p,a,b,loc)
1307#define NEW_SPLAT(a,loc,op_loc) (NODE *)rb_node_splat_new(p,a,loc,op_loc)
1308#define NEW_BLOCK_PASS(b,loc,o_loc) rb_node_block_pass_new(p,b,loc,o_loc)
1309#define NEW_DEFN(i,s,loc) (NODE *)rb_node_defn_new(p,i,s,loc)
1310#define NEW_DEFS(r,i,s,loc) (NODE *)rb_node_defs_new(p,r,i,s,loc)
1311#define NEW_ALIAS(n,o,loc,k_loc) (NODE *)rb_node_alias_new(p,n,o,loc,k_loc)
1312#define NEW_VALIAS(n,o,loc,k_loc) (NODE *)rb_node_valias_new(p,n,o,loc,k_loc)
1313#define NEW_UNDEF(i,loc) (NODE *)rb_node_undef_new(p,i,loc)
1314#define NEW_CLASS(n,b,s,loc,ck_loc,io_loc,ek_loc) (NODE *)rb_node_class_new(p,n,b,s,loc,ck_loc,io_loc,ek_loc)
1315#define NEW_MODULE(n,b,loc,mk_loc,ek_loc) (NODE *)rb_node_module_new(p,n,b,loc,mk_loc,ek_loc)
1316#define NEW_SCLASS(r,b,loc,ck_loc,op_loc,ek_loc) (NODE *)rb_node_sclass_new(p,r,b,loc,ck_loc,op_loc,ek_loc)
1317#define NEW_COLON2(c,i,loc,d_loc,n_loc) (NODE *)rb_node_colon2_new(p,c,i,loc,d_loc,n_loc)
1318#define NEW_COLON3(i,loc,d_loc,n_loc) (NODE *)rb_node_colon3_new(p,i,loc,d_loc,n_loc)
1319#define NEW_DOT2(b,e,loc,op_loc) (NODE *)rb_node_dot2_new(p,b,e,loc,op_loc)
1320#define NEW_DOT3(b,e,loc,op_loc) (NODE *)rb_node_dot3_new(p,b,e,loc,op_loc)
1321#define NEW_SELF(loc) (NODE *)rb_node_self_new(p,loc)
1322#define NEW_NIL(loc) (NODE *)rb_node_nil_new(p,loc)
1323#define NEW_TRUE(loc) (NODE *)rb_node_true_new(p,loc)
1324#define NEW_FALSE(loc) (NODE *)rb_node_false_new(p,loc)
1325#define NEW_ERRINFO(loc) (NODE *)rb_node_errinfo_new(p,loc)
1326#define NEW_DEFINED(e,loc,k_loc) (NODE *)rb_node_defined_new(p,e,loc, k_loc)
1327#define NEW_POSTEXE(b,loc,k_loc,o_loc,c_loc) (NODE *)rb_node_postexe_new(p,b,loc,k_loc,o_loc,c_loc)
1328#define NEW_SYM(str,loc) (NODE *)rb_node_sym_new(p,str,loc)
1329#define NEW_DSYM(s,l,n,loc) (NODE *)rb_node_dsym_new(p,s,l,n,loc)
1330#define NEW_ATTRASGN(r,m,a,loc) (NODE *)rb_node_attrasgn_new(p,r,m,a,loc)
1331#define NEW_LAMBDA(a,b,loc,op_loc,o_loc,c_loc) (NODE *)rb_node_lambda_new(p,a,b,loc,op_loc,o_loc,c_loc)
1332#define NEW_ARYPTN(pre,r,post,loc) (NODE *)rb_node_aryptn_new(p,pre,r,post,loc)
1333#define NEW_HSHPTN(c,kw,kwrest,loc) (NODE *)rb_node_hshptn_new(p,c,kw,kwrest,loc)
1334#define NEW_FNDPTN(pre,a,post,loc) (NODE *)rb_node_fndptn_new(p,pre,a,post,loc)
1335#define NEW_LINE(loc) (NODE *)rb_node_line_new(p,loc)
1336#define NEW_FILE(str,loc) (NODE *)rb_node_file_new(p,str,loc)
1337#define NEW_ENCODING(loc) (NODE *)rb_node_encoding_new(p,loc)
1338#define NEW_ERROR(loc) (NODE *)rb_node_error_new(p,loc)
1339
1340enum internal_node_type {
1341 NODE_INTERNAL_ONLY = NODE_LAST,
1342 NODE_DEF_TEMP,
1343 NODE_EXITS,
1344 NODE_INTERNAL_LAST
1345};
1346
1347static const char *
1348parser_node_name(int node)
1349{
1350 switch (node) {
1351 case NODE_DEF_TEMP:
1352 return "NODE_DEF_TEMP";
1353 case NODE_EXITS:
1354 return "NODE_EXITS";
1355 default:
1356 return ruby_node_name(node);
1357 }
1358}
1359
1360/* This node is parse.y internal */
1361struct RNode_DEF_TEMP {
1362 NODE node;
1363
1364 /* for NODE_DEFN/NODE_DEFS */
1365
1366 struct RNode *nd_def;
1367 ID nd_mid;
1368
1369 struct {
1370 int max_numparam;
1371 NODE *numparam_save;
1372 struct lex_context ctxt;
1373 } save;
1374};
1375
1376#define RNODE_DEF_TEMP(node) ((struct RNode_DEF_TEMP *)(node))
1377
1378static rb_node_break_t *rb_node_break_new(struct parser_params *p, NODE *nd_stts, const YYLTYPE *loc, const YYLTYPE *keyword_loc);
1379static rb_node_next_t *rb_node_next_new(struct parser_params *p, NODE *nd_stts, const YYLTYPE *loc, const YYLTYPE *keyword_loc);
1380static rb_node_redo_t *rb_node_redo_new(struct parser_params *p, const YYLTYPE *loc, const YYLTYPE *keyword_loc);
1381static rb_node_def_temp_t *rb_node_def_temp_new(struct parser_params *p, const YYLTYPE *loc);
1382static rb_node_def_temp_t *def_head_save(struct parser_params *p, rb_node_def_temp_t *n);
1383
1384#define NEW_BREAK(s,loc,k_loc) (NODE *)rb_node_break_new(p,s,loc,k_loc)
1385#define NEW_NEXT(s,loc,k_loc) (NODE *)rb_node_next_new(p,s,loc,k_loc)
1386#define NEW_REDO(loc,k_loc) (NODE *)rb_node_redo_new(p,loc,k_loc)
1387#define NEW_DEF_TEMP(loc) rb_node_def_temp_new(p,loc)
1388
1389/* Make a new internal node, which should not be appeared in the
1390 * result AST and does not have node_id and location. */
1391static NODE* node_new_internal(struct parser_params *p, enum node_type type, size_t size, size_t alignment);
1392#define NODE_NEW_INTERNAL(ndtype, type) (type *)node_new_internal(p, (enum node_type)(ndtype), sizeof(type), RUBY_ALIGNOF(type))
1393
1394static NODE *nd_set_loc(NODE *nd, const YYLTYPE *loc);
1395
1396static int
1397parser_get_node_id(struct parser_params *p)
1398{
1399 int node_id = p->node_id;
1400 p->node_id++;
1401 return node_id;
1402}
1403
1404static void
1405anddot_multiple_assignment_check(struct parser_params* p, const YYLTYPE *loc, ID id)
1406{
1407 if (id == tANDDOT) {
1408 yyerror1(loc, "&. inside multiple assignment destination");
1409 }
1410}
1411
1412static inline void
1413set_line_body(NODE *body, int line)
1414{
1415 if (!body) return;
1416 switch (nd_type(body)) {
1417 case NODE_RESCUE:
1418 case NODE_ENSURE:
1419 nd_set_line(body, line);
1420 }
1421}
1422
1423static void
1424set_embraced_location(NODE *node, const rb_code_location_t *beg, const rb_code_location_t *end)
1425{
1426 RNODE_ITER(node)->nd_body->nd_loc = code_loc_gen(beg, end);
1427 nd_set_line(node, beg->end_pos.lineno);
1428}
1429
1430static NODE *
1431last_expr_node(NODE *expr)
1432{
1433 while (expr) {
1434 if (nd_type_p(expr, NODE_BLOCK)) {
1435 expr = RNODE_BLOCK(RNODE_BLOCK(expr)->nd_end)->nd_head;
1436 }
1437 else if (nd_type_p(expr, NODE_BEGIN) && RNODE_BEGIN(expr)->nd_body) {
1438 expr = RNODE_BEGIN(expr)->nd_body;
1439 }
1440 else {
1441 break;
1442 }
1443 }
1444 return expr;
1445}
1446
1447#ifndef RIPPER
1448#define yyparse ruby_yyparse
1449#endif
1450
1451static NODE* cond(struct parser_params *p, NODE *node, const YYLTYPE *loc);
1452static NODE* method_cond(struct parser_params *p, NODE *node, const YYLTYPE *loc);
1453static NODE *new_nil_at(struct parser_params *p, const rb_code_position_t *pos);
1454static NODE *new_if(struct parser_params*,NODE*,NODE*,NODE*,const YYLTYPE*,const YYLTYPE*,const YYLTYPE*,const YYLTYPE*);
1455static NODE *new_unless(struct parser_params*,NODE*,NODE*,NODE*,const YYLTYPE*,const YYLTYPE*,const YYLTYPE*,const YYLTYPE*);
1456static NODE *logop(struct parser_params*,ID,NODE*,NODE*,const YYLTYPE*,const YYLTYPE*);
1457
1458static NODE *newline_node(NODE*);
1459static void fixpos(NODE*,NODE*);
1460
1461static int value_expr(struct parser_params*,NODE*);
1462static void void_expr(struct parser_params*,NODE*);
1463static NODE *remove_begin(NODE*);
1464static NODE *void_stmts(struct parser_params*,NODE*);
1465static void reduce_nodes(struct parser_params*,NODE**);
1466static void block_dup_check(struct parser_params*,NODE*,NODE*);
1467
1468static NODE *block_append(struct parser_params*,NODE*,NODE*);
1469static NODE *list_append(struct parser_params*,NODE*,NODE*);
1470static NODE *list_concat(NODE*,NODE*);
1471static NODE *arg_append(struct parser_params*,NODE*,NODE*,const YYLTYPE*);
1472static NODE *last_arg_append(struct parser_params *p, NODE *args, NODE *last_arg, const YYLTYPE *loc);
1473static NODE *rest_arg_append(struct parser_params *p, NODE *args, NODE *rest_arg, const YYLTYPE *loc);
1474static NODE *literal_concat(struct parser_params*,NODE*,NODE*,const YYLTYPE*);
1475static NODE *new_evstr(struct parser_params*,NODE*,const YYLTYPE*,const YYLTYPE*,const YYLTYPE*);
1476static NODE *new_dstr(struct parser_params*,NODE*,const YYLTYPE*);
1477static NODE *str2dstr(struct parser_params*,NODE*);
1478static NODE *evstr2dstr(struct parser_params*,NODE*);
1479static NODE *splat_array(NODE*);
1480static void mark_lvar_used(struct parser_params *p, NODE *rhs);
1481
1482static NODE *call_bin_op(struct parser_params*,NODE*,ID,NODE*,const YYLTYPE*,const YYLTYPE*);
1483static NODE *call_uni_op(struct parser_params*,NODE*,ID,const YYLTYPE*,const YYLTYPE*);
1484static NODE *new_qcall(struct parser_params* p, ID atype, NODE *recv, ID mid, NODE *args, const YYLTYPE *op_loc, const YYLTYPE *loc);
1485static NODE *new_command_qcall(struct parser_params* p, ID atype, NODE *recv, ID mid, NODE *args, NODE *block, const YYLTYPE *op_loc, const YYLTYPE *loc);
1486static NODE *method_add_block(struct parser_params*p, NODE *m, NODE *b, const YYLTYPE *loc) {RNODE_ITER(b)->nd_iter = m; b->nd_loc = *loc; return b;}
1487
1488static bool args_info_empty_p(struct rb_args_info *args);
1489static rb_node_args_t *new_args(struct parser_params*,rb_node_args_aux_t*,rb_node_opt_arg_t*,ID,rb_node_args_aux_t*,rb_node_args_t*,const YYLTYPE*);
1490static rb_node_args_t *new_args_tail(struct parser_params*,rb_node_kw_arg_t*,ID,ID,const YYLTYPE*);
1491#define new_empty_args_tail(p, loc) new_args_tail(p, 0, 0, 0, loc)
1492static NODE *new_array_pattern(struct parser_params *p, NODE *constant, NODE *pre_arg, NODE *aryptn, const YYLTYPE *loc);
1493static NODE *new_array_pattern_tail(struct parser_params *p, NODE *pre_args, int has_rest, NODE *rest_arg, NODE *post_args, const YYLTYPE *loc);
1494static NODE *new_find_pattern(struct parser_params *p, NODE *constant, NODE *fndptn, const YYLTYPE *loc);
1495static NODE *new_find_pattern_tail(struct parser_params *p, NODE *pre_rest_arg, NODE *args, NODE *post_rest_arg, const YYLTYPE *loc);
1496static NODE *new_hash_pattern(struct parser_params *p, NODE *constant, NODE *hshptn, const YYLTYPE *loc);
1497static NODE *new_hash_pattern_tail(struct parser_params *p, NODE *kw_args, ID kw_rest_arg, const YYLTYPE *loc);
1498
1499static rb_node_kw_arg_t *new_kw_arg(struct parser_params *p, NODE *k, const YYLTYPE *loc);
1500static rb_node_args_t *args_with_numbered(struct parser_params*,rb_node_args_t*,int,ID);
1501
1502static NODE* negate_lit(struct parser_params*, NODE*,const YYLTYPE*);
1503static void no_blockarg(struct parser_params*,NODE*);
1504static NODE *ret_args(struct parser_params*,NODE*);
1505static NODE *arg_blk_pass(NODE*,rb_node_block_pass_t*);
1506static NODE *dsym_node(struct parser_params*,NODE*,const YYLTYPE*);
1507
1508static NODE *gettable(struct parser_params*,ID,const YYLTYPE*);
1509static NODE *assignable(struct parser_params*,ID,NODE*,const YYLTYPE*);
1510
1511static NODE *aryset(struct parser_params*,NODE*,NODE*,const YYLTYPE*);
1512static NODE *attrset(struct parser_params*,NODE*,ID,ID,const YYLTYPE*);
1513
1514static VALUE rb_backref_error(struct parser_params*,NODE*);
1515static NODE *node_assign(struct parser_params*,NODE*,NODE*,struct lex_context,const YYLTYPE*);
1516
1517static NODE *new_op_assign(struct parser_params *p, NODE *lhs, ID op, NODE *rhs, struct lex_context, const YYLTYPE *loc);
1518static 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);
1519static 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);
1520static NODE *new_const_op_assign(struct parser_params *p, NODE *lhs, ID op, NODE *rhs, struct lex_context, const YYLTYPE *loc);
1521static NODE *new_bodystmt(struct parser_params *p, NODE *head, NODE *rescue, NODE *rescue_else, NODE *ensure, const YYLTYPE *loc);
1522
1523static NODE *const_decl(struct parser_params *p, NODE* path, const YYLTYPE *loc);
1524
1525static rb_node_opt_arg_t *opt_arg_append(rb_node_opt_arg_t*, rb_node_opt_arg_t*);
1526static rb_node_kw_arg_t *kwd_append(rb_node_kw_arg_t*, rb_node_kw_arg_t*);
1527
1528static NODE *new_hash(struct parser_params *p, NODE *hash, const YYLTYPE *loc);
1529static NODE *new_unique_key_hash(struct parser_params *p, NODE *hash, const YYLTYPE *loc);
1530
1531static NODE *new_defined(struct parser_params *p, NODE *expr, const YYLTYPE *loc, const YYLTYPE *keyword_loc);
1532
1533static NODE *new_regexp(struct parser_params *, NODE *, int, const YYLTYPE *, const YYLTYPE *, const YYLTYPE *, const YYLTYPE *);
1534
1535#define make_list(list, loc) ((list) ? (nd_set_loc(list, loc), list) : NEW_ZLIST(loc))
1536
1537static NODE *new_xstring(struct parser_params *, NODE *, const YYLTYPE *loc);
1538
1539static NODE *symbol_append(struct parser_params *p, NODE *symbols, NODE *symbol);
1540
1541static NODE *match_op(struct parser_params*,NODE*,NODE*,const YYLTYPE*,const YYLTYPE*);
1542
1543static rb_ast_id_table_t *local_tbl(struct parser_params*);
1544
1545static VALUE reg_compile(struct parser_params*, rb_parser_string_t*, int);
1546static void reg_fragment_setenc(struct parser_params*, rb_parser_string_t*, int);
1547
1548static int literal_concat0(struct parser_params *p, rb_parser_string_t *head, rb_parser_string_t *tail);
1549static NODE *heredoc_dedent(struct parser_params*,NODE*);
1550
1551static void check_literal_when(struct parser_params *p, NODE *args, const YYLTYPE *loc);
1552
1553static 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);
1554
1555#ifdef RIPPER
1556#define get_value(idx) (rb_ary_entry(p->s_value_stack, idx))
1557#define set_value(val) (p->s_lvalue = val)
1558static VALUE assign_error(struct parser_params *p, const char *mesg, VALUE a);
1559static int id_is_var(struct parser_params *p, ID id);
1560#endif
1561
1562RUBY_SYMBOL_EXPORT_BEGIN
1563VALUE rb_parser_reg_compile(struct parser_params* p, VALUE str, int options);
1564int rb_reg_fragment_setenc(struct parser_params*, rb_parser_string_t *, int);
1565enum lex_state_e rb_parser_trace_lex_state(struct parser_params *, enum lex_state_e, enum lex_state_e, int);
1566VALUE rb_parser_lex_state_name(struct parser_params *p, enum lex_state_e state);
1567void rb_parser_show_bitstack(struct parser_params *, stack_type, const char *, int);
1568PRINTF_ARGS(void rb_parser_fatal(struct parser_params *p, const char *fmt, ...), 2, 3);
1569YYLTYPE *rb_parser_set_location_from_strterm_heredoc(struct parser_params *p, rb_strterm_heredoc_t *here, YYLTYPE *yylloc);
1570YYLTYPE *rb_parser_set_location_of_delayed_token(struct parser_params *p, YYLTYPE *yylloc);
1571YYLTYPE *rb_parser_set_location_of_heredoc_end(struct parser_params *p, YYLTYPE *yylloc);
1572YYLTYPE *rb_parser_set_location_of_dummy_end(struct parser_params *p, YYLTYPE *yylloc);
1573YYLTYPE *rb_parser_set_location_of_none(struct parser_params *p, YYLTYPE *yylloc);
1574YYLTYPE *rb_parser_set_location(struct parser_params *p, YYLTYPE *yylloc);
1575void ruby_show_error_line(struct parser_params *p, VALUE errbuf, const YYLTYPE *yylloc, int lineno, rb_parser_string_t *str);
1576RUBY_SYMBOL_EXPORT_END
1577
1578static void flush_string_content(struct parser_params *p, rb_encoding *enc, size_t back);
1579static void error_duplicate_pattern_variable(struct parser_params *p, ID id, const YYLTYPE *loc);
1580static void error_duplicate_pattern_key(struct parser_params *p, ID id, const YYLTYPE *loc);
1581static VALUE formal_argument_error(struct parser_params*, ID);
1582static ID shadowing_lvar(struct parser_params*,ID);
1583static void new_bv(struct parser_params*,ID);
1584
1585static void local_push(struct parser_params*,int);
1586static void local_pop(struct parser_params*);
1587static void local_var(struct parser_params*, ID);
1588static void arg_var(struct parser_params*, ID);
1589static int local_id(struct parser_params *p, ID id);
1590static int local_id_ref(struct parser_params*, ID, ID **);
1591#define internal_id rb_parser_internal_id
1592ID internal_id(struct parser_params*);
1593static NODE *new_args_forward_call(struct parser_params*, NODE*, const YYLTYPE*, const YYLTYPE*);
1594static int check_forwarding_args(struct parser_params*);
1595static void add_forwarding_args(struct parser_params *p);
1596static void forwarding_arg_check(struct parser_params *p, ID arg, ID all, const char *var);
1597
1598static const struct vtable *dyna_push(struct parser_params *);
1599static void dyna_pop(struct parser_params*, const struct vtable *);
1600static int dyna_in_block(struct parser_params*);
1601#define dyna_var(p, id) local_var(p, id)
1602static int dvar_defined(struct parser_params*, ID);
1603#define dvar_defined_ref rb_parser_dvar_defined_ref
1604int dvar_defined_ref(struct parser_params*, ID, ID**);
1605static int dvar_curr(struct parser_params*,ID);
1606
1607static int lvar_defined(struct parser_params*, ID);
1608
1609static NODE *numparam_push(struct parser_params *p);
1610static void numparam_pop(struct parser_params *p, NODE *prev_inner);
1611
1612#define METHOD_NOT '!'
1613
1614#define idFWD_REST '*'
1615#define idFWD_KWREST idPow /* Use simple "**", as tDSTAR is "**arg" */
1616#define idFWD_BLOCK '&'
1617#define idFWD_ALL idDot3
1618#define arg_FWD_BLOCK idFWD_BLOCK
1619
1620#define RE_ONIG_OPTION_IGNORECASE 1
1621#define RE_ONIG_OPTION_EXTEND (RE_ONIG_OPTION_IGNORECASE<<1)
1622#define RE_ONIG_OPTION_MULTILINE (RE_ONIG_OPTION_EXTEND<<1)
1623#define RE_OPTION_ONCE (1<<16)
1624#define RE_OPTION_ENCODING_SHIFT 8
1625#define RE_OPTION_ENCODING(e) (((e)&0xff)<<RE_OPTION_ENCODING_SHIFT)
1626#define RE_OPTION_ENCODING_IDX(o) (((o)>>RE_OPTION_ENCODING_SHIFT)&0xff)
1627#define RE_OPTION_ENCODING_NONE(o) ((o)&RE_OPTION_ARG_ENCODING_NONE)
1628#define RE_OPTION_MASK 0xff
1629#define RE_OPTION_ARG_ENCODING_NONE 32
1630
1631#define CHECK_LITERAL_WHEN (st_table *)1
1632#define CASE_LABELS_ENABLED_P(case_labels) (case_labels && case_labels != CHECK_LITERAL_WHEN)
1633
1634#define yytnamerr(yyres, yystr) (YYSIZE_T)rb_yytnamerr(p, yyres, yystr)
1635RUBY_FUNC_EXPORTED size_t rb_yytnamerr(struct parser_params *p, char *yyres, const char *yystr);
1636
1637#define TOKEN2ID(tok) ( \
1638 tTOKEN_LOCAL_BEGIN<(tok)&&(tok)<tTOKEN_LOCAL_END ? TOKEN2LOCALID(tok) : \
1639 tTOKEN_INSTANCE_BEGIN<(tok)&&(tok)<tTOKEN_INSTANCE_END ? TOKEN2INSTANCEID(tok) : \
1640 tTOKEN_GLOBAL_BEGIN<(tok)&&(tok)<tTOKEN_GLOBAL_END ? TOKEN2GLOBALID(tok) : \
1641 tTOKEN_CONST_BEGIN<(tok)&&(tok)<tTOKEN_CONST_END ? TOKEN2CONSTID(tok) : \
1642 tTOKEN_CLASS_BEGIN<(tok)&&(tok)<tTOKEN_CLASS_END ? TOKEN2CLASSID(tok) : \
1643 tTOKEN_ATTRSET_BEGIN<(tok)&&(tok)<tTOKEN_ATTRSET_END ? TOKEN2ATTRSETID(tok) : \
1644 ((tok) / ((tok)<tPRESERVED_ID_END && ((tok)>=128 || rb_ispunct(tok)))))
1645
1646/****** Ripper *******/
1647
1648#ifdef RIPPER
1649
1650#include "eventids1.h"
1651#include "eventids2.h"
1652
1653extern const struct ripper_parser_ids ripper_parser_ids;
1654
1655static VALUE ripper_dispatch0(struct parser_params*,ID);
1656static VALUE ripper_dispatch1(struct parser_params*,ID,VALUE);
1657static VALUE ripper_dispatch2(struct parser_params*,ID,VALUE,VALUE);
1658static VALUE ripper_dispatch3(struct parser_params*,ID,VALUE,VALUE,VALUE);
1659static VALUE ripper_dispatch4(struct parser_params*,ID,VALUE,VALUE,VALUE,VALUE);
1660static VALUE ripper_dispatch5(struct parser_params*,ID,VALUE,VALUE,VALUE,VALUE,VALUE);
1661static VALUE ripper_dispatch7(struct parser_params*,ID,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE);
1662void ripper_error(struct parser_params *p);
1663
1664#define dispatch0(n) ripper_dispatch0(p, RIPPER_ID(n))
1665#define dispatch1(n,a) ripper_dispatch1(p, RIPPER_ID(n), (a))
1666#define dispatch2(n,a,b) ripper_dispatch2(p, RIPPER_ID(n), (a), (b))
1667#define dispatch3(n,a,b,c) ripper_dispatch3(p, RIPPER_ID(n), (a), (b), (c))
1668#define dispatch4(n,a,b,c,d) ripper_dispatch4(p, RIPPER_ID(n), (a), (b), (c), (d))
1669#define dispatch5(n,a,b,c,d,e) ripper_dispatch5(p, RIPPER_ID(n), (a), (b), (c), (d), (e))
1670#define dispatch7(n,a,b,c,d,e,f,g) ripper_dispatch7(p, RIPPER_ID(n), (a), (b), (c), (d), (e), (f), (g))
1671
1672#define yyparse ripper_yyparse
1673
1674static VALUE
1675aryptn_pre_args(struct parser_params *p, VALUE pre_arg, VALUE pre_args)
1676{
1677 if (!NIL_P(pre_arg)) {
1678 if (!NIL_P(pre_args)) {
1679 rb_ary_unshift(pre_args, pre_arg);
1680 }
1681 else {
1682 pre_args = rb_ary_new_from_args(1, pre_arg);
1683 }
1684 }
1685 return pre_args;
1686}
1687
1688#define ID2VAL(id) STATIC_ID2SYM(id)
1689#define TOKEN2VAL(t) ID2VAL(TOKEN2ID(t))
1690#endif /* RIPPER */
1691
1692#define KWD2EID(t, v) keyword_##t
1693
1694static NODE *
1695new_scope_body(struct parser_params *p, rb_node_args_t *args, NODE *body, NODE *parent, const YYLTYPE *loc)
1696{
1697 body = remove_begin(body);
1698 reduce_nodes(p, &body);
1699 NODE *n = NEW_SCOPE(args, body, parent, loc);
1700 nd_set_line(n, loc->end_pos.lineno);
1701 set_line_body(body, loc->beg_pos.lineno);
1702 return n;
1703}
1704
1705static NODE *
1706rescued_expr(struct parser_params *p, NODE *arg, NODE *rescue,
1707 const YYLTYPE *arg_loc, const YYLTYPE *mod_loc, const YYLTYPE *res_loc)
1708{
1709 YYLTYPE loc = code_loc_gen(mod_loc, res_loc);
1710 rescue = NEW_RESBODY(0, 0, remove_begin(rescue), 0, &loc);
1711 loc.beg_pos = arg_loc->beg_pos;
1712 return NEW_RESCUE(arg, rescue, 0, &loc);
1713}
1714
1715static NODE *add_block_exit(struct parser_params *p, NODE *node);
1716static rb_node_exits_t *init_block_exit(struct parser_params *p);
1717static rb_node_exits_t *allow_block_exit(struct parser_params *p);
1718static void restore_block_exit(struct parser_params *p, rb_node_exits_t *exits);
1719static void clear_block_exit(struct parser_params *p, bool error);
1720
1721static void
1722next_rescue_context(struct lex_context *next, const struct lex_context *outer, enum rescue_context def)
1723{
1724 next->in_rescue = outer->in_rescue == after_rescue ? after_rescue : def;
1725}
1726
1727static void
1728restore_defun(struct parser_params *p, rb_node_def_temp_t *temp)
1729{
1730 /* See: def_name action */
1731 struct lex_context ctxt = temp->save.ctxt;
1732 p->ctxt.in_def = ctxt.in_def;
1733 p->ctxt.shareable_constant_value = ctxt.shareable_constant_value;
1734 p->ctxt.in_rescue = ctxt.in_rescue;
1735 p->max_numparam = temp->save.max_numparam;
1736 numparam_pop(p, temp->save.numparam_save);
1737 clear_block_exit(p, true);
1738}
1739
1740static void
1741endless_method_name(struct parser_params *p, ID mid, const YYLTYPE *loc)
1742{
1743 if (is_attrset_id(mid)) {
1744 yyerror1(loc, "setter method cannot be defined in an endless method definition");
1745 }
1746 token_info_drop(p, "def", loc->beg_pos);
1747}
1748
1749#define debug_token_line(p, name, line) do { \
1750 if (p->debug) { \
1751 const char *const pcur = p->lex.pcur; \
1752 const char *const ptok = p->lex.ptok; \
1753 rb_parser_printf(p, name ":%d (%d: %"PRIdPTRDIFF"|%"PRIdPTRDIFF"|%"PRIdPTRDIFF")\n", \
1754 line, p->ruby_sourceline, \
1755 ptok - p->lex.pbeg, pcur - ptok, p->lex.pend - pcur); \
1756 } \
1757 } while (0)
1758
1759#define begin_definition(k, loc_beg, loc_end) \
1760 do { \
1761 if (!(p->ctxt.in_class = (k)[0] != 0)) { \
1762 /* singleton class */ \
1763 p->ctxt.cant_return = !p->ctxt.in_def; \
1764 p->ctxt.in_def = 0; \
1765 } \
1766 else if (p->ctxt.in_def) { \
1767 YYLTYPE loc = code_loc_gen(loc_beg, loc_end); \
1768 yyerror1(&loc, k " definition in method body"); \
1769 } \
1770 else { \
1771 p->ctxt.cant_return = 1; \
1772 } \
1773 local_push(p, 0); \
1774 } while (0)
1775
1776#ifndef RIPPER
1777# define ifndef_ripper(x) (x)
1778# define ifdef_ripper(r,x) (x)
1779#else
1780# define ifndef_ripper(x)
1781# define ifdef_ripper(r,x) (r)
1782#endif
1783
1784# define rb_warn0(fmt) WARN_CALL(WARN_ARGS(fmt, 1))
1785# define rb_warn1(fmt,a) WARN_CALL(WARN_ARGS(fmt, 2), (a))
1786# define rb_warn2(fmt,a,b) WARN_CALL(WARN_ARGS(fmt, 3), (a), (b))
1787# define rb_warn3(fmt,a,b,c) WARN_CALL(WARN_ARGS(fmt, 4), (a), (b), (c))
1788# define rb_warn4(fmt,a,b,c,d) WARN_CALL(WARN_ARGS(fmt, 5), (a), (b), (c), (d))
1789# define rb_warning0(fmt) WARNING_CALL(WARNING_ARGS(fmt, 1))
1790# define rb_warning1(fmt,a) WARNING_CALL(WARNING_ARGS(fmt, 2), (a))
1791# define rb_warning2(fmt,a,b) WARNING_CALL(WARNING_ARGS(fmt, 3), (a), (b))
1792# define rb_warning3(fmt,a,b,c) WARNING_CALL(WARNING_ARGS(fmt, 4), (a), (b), (c))
1793# define rb_warning4(fmt,a,b,c,d) WARNING_CALL(WARNING_ARGS(fmt, 5), (a), (b), (c), (d))
1794# define rb_warn0L(l,fmt) WARN_CALL(WARN_ARGS_L(l, fmt, 1))
1795# define rb_warn1L(l,fmt,a) WARN_CALL(WARN_ARGS_L(l, fmt, 2), (a))
1796# define rb_warn2L(l,fmt,a,b) WARN_CALL(WARN_ARGS_L(l, fmt, 3), (a), (b))
1797# define rb_warn3L(l,fmt,a,b,c) WARN_CALL(WARN_ARGS_L(l, fmt, 4), (a), (b), (c))
1798# define rb_warn4L(l,fmt,a,b,c,d) WARN_CALL(WARN_ARGS_L(l, fmt, 5), (a), (b), (c), (d))
1799# define rb_warning0L(l,fmt) WARNING_CALL(WARNING_ARGS_L(l, fmt, 1))
1800# define rb_warning1L(l,fmt,a) WARNING_CALL(WARNING_ARGS_L(l, fmt, 2), (a))
1801# define rb_warning2L(l,fmt,a,b) WARNING_CALL(WARNING_ARGS_L(l, fmt, 3), (a), (b))
1802# define rb_warning3L(l,fmt,a,b,c) WARNING_CALL(WARNING_ARGS_L(l, fmt, 4), (a), (b), (c))
1803# define rb_warning4L(l,fmt,a,b,c,d) WARNING_CALL(WARNING_ARGS_L(l, fmt, 5), (a), (b), (c), (d))
1804#ifdef RIPPER
1805extern const ID id_warn, id_warning, id_gets, id_assoc;
1806# define ERR_MESG() STR_NEW2(mesg) /* to bypass Ripper DSL */
1807# define WARN_S_L(s,l) STR_NEW(s,l)
1808# define WARN_S(s) STR_NEW2(s)
1809# define WARN_I(i) INT2NUM(i)
1810# define WARN_ID(i) rb_id2str(i)
1811# define PRIsWARN PRIsVALUE
1812# define WARN_ARGS(fmt,n) p->value, id_warn, n, rb_usascii_str_new_lit(fmt)
1813# define WARN_ARGS_L(l,fmt,n) WARN_ARGS(fmt,n)
1814# ifdef HAVE_VA_ARGS_MACRO
1815# define WARN_CALL(...) rb_funcall(__VA_ARGS__)
1816# else
1817# define WARN_CALL rb_funcall
1818# endif
1819# define WARNING_ARGS(fmt,n) p->value, id_warning, n, rb_usascii_str_new_lit(fmt)
1820# define WARNING_ARGS_L(l, fmt,n) WARNING_ARGS(fmt,n)
1821# ifdef HAVE_VA_ARGS_MACRO
1822# define WARNING_CALL(...) rb_funcall(__VA_ARGS__)
1823# else
1824# define WARNING_CALL rb_funcall
1825# endif
1826# define compile_error ripper_compile_error
1827#else
1828# define WARN_S_L(s,l) s
1829# define WARN_S(s) s
1830# define WARN_I(i) i
1831# define WARN_ID(i) rb_id2name(i)
1832# define PRIsWARN PRIsVALUE
1833# define WARN_ARGS(fmt,n) WARN_ARGS_L(p->ruby_sourceline,fmt,n)
1834# define WARN_ARGS_L(l,fmt,n) p->ruby_sourcefile, (l), (fmt)
1835# define WARN_CALL rb_compile_warn
1836# define WARNING_ARGS(fmt,n) WARN_ARGS(fmt,n)
1837# define WARNING_ARGS_L(l,fmt,n) WARN_ARGS_L(l,fmt,n)
1838# define WARNING_CALL rb_compile_warning
1839PRINTF_ARGS(static void parser_compile_error(struct parser_params*, const rb_code_location_t *loc, const char *fmt, ...), 3, 4);
1840# define compile_error(p, ...) parser_compile_error(p, NULL, __VA_ARGS__)
1841#endif
1842
1843#define RNODE_EXITS(node) ((rb_node_exits_t*)(node))
1844
1845static NODE *
1846add_block_exit(struct parser_params *p, NODE *node)
1847{
1848 if (!node) {
1849 compile_error(p, "unexpected null node");
1850 return 0;
1851 }
1852 switch (nd_type(node)) {
1853 case NODE_BREAK: case NODE_NEXT: case NODE_REDO: break;
1854 default:
1855 compile_error(p, "add_block_exit: unexpected node: %s", parser_node_name(nd_type(node)));
1856 return node;
1857 }
1858 if (!p->ctxt.in_defined) {
1859 rb_node_exits_t *exits = p->exits;
1860 if (exits) {
1861 RNODE_EXITS(exits->nd_stts)->nd_chain = node;
1862 exits->nd_stts = node;
1863 }
1864 }
1865 return node;
1866}
1867
1868static rb_node_exits_t *
1869init_block_exit(struct parser_params *p)
1870{
1871 rb_node_exits_t *old = p->exits;
1872 rb_node_exits_t *exits = NODE_NEW_INTERNAL(NODE_EXITS, rb_node_exits_t);
1873 exits->nd_chain = 0;
1874 exits->nd_stts = RNODE(exits);
1875 p->exits = exits;
1876 return old;
1877}
1878
1879static rb_node_exits_t *
1880allow_block_exit(struct parser_params *p)
1881{
1882 rb_node_exits_t *exits = p->exits;
1883 p->exits = 0;
1884 return exits;
1885}
1886
1887static void
1888restore_block_exit(struct parser_params *p, rb_node_exits_t *exits)
1889{
1890 p->exits = exits;
1891}
1892
1893static void
1894clear_block_exit(struct parser_params *p, bool error)
1895{
1896 rb_node_exits_t *exits = p->exits;
1897 if (!exits) return;
1898 if (error) {
1899 for (NODE *e = RNODE(exits); (e = RNODE_EXITS(e)->nd_chain) != 0; ) {
1900 switch (nd_type(e)) {
1901 case NODE_BREAK:
1902 yyerror1(&e->nd_loc, "Invalid break");
1903 break;
1904 case NODE_NEXT:
1905 yyerror1(&e->nd_loc, "Invalid next");
1906 break;
1907 case NODE_REDO:
1908 yyerror1(&e->nd_loc, "Invalid redo");
1909 break;
1910 default:
1911 yyerror1(&e->nd_loc, "unexpected node");
1912 goto end_checks; /* no nd_chain */
1913 }
1914 }
1915 end_checks:;
1916 }
1917 exits->nd_stts = RNODE(exits);
1918 exits->nd_chain = 0;
1919}
1920
1921#define WARN_EOL(tok) \
1922 (looking_at_eol_p(p) ? \
1923 (void)rb_warning0("'" tok "' at the end of line without an expression") : \
1924 (void)0)
1925static int looking_at_eol_p(struct parser_params *p);
1926
1927static NODE *
1928get_nd_value(struct parser_params *p, NODE *node)
1929{
1930 switch (nd_type(node)) {
1931 case NODE_GASGN:
1932 return RNODE_GASGN(node)->nd_value;
1933 case NODE_IASGN:
1934 return RNODE_IASGN(node)->nd_value;
1935 case NODE_LASGN:
1936 return RNODE_LASGN(node)->nd_value;
1937 case NODE_DASGN:
1938 return RNODE_DASGN(node)->nd_value;
1939 case NODE_MASGN:
1940 return RNODE_MASGN(node)->nd_value;
1941 case NODE_CVASGN:
1942 return RNODE_CVASGN(node)->nd_value;
1943 case NODE_CDECL:
1944 return RNODE_CDECL(node)->nd_value;
1945 default:
1946 compile_error(p, "get_nd_value: unexpected node: %s", parser_node_name(nd_type(node)));
1947 return 0;
1948 }
1949}
1950
1951static void
1952set_nd_value(struct parser_params *p, NODE *node, NODE *rhs)
1953{
1954 switch (nd_type(node)) {
1955 case NODE_CDECL:
1956 RNODE_CDECL(node)->nd_value = rhs;
1957 break;
1958 case NODE_GASGN:
1959 RNODE_GASGN(node)->nd_value = rhs;
1960 break;
1961 case NODE_IASGN:
1962 RNODE_IASGN(node)->nd_value = rhs;
1963 break;
1964 case NODE_LASGN:
1965 RNODE_LASGN(node)->nd_value = rhs;
1966 break;
1967 case NODE_DASGN:
1968 RNODE_DASGN(node)->nd_value = rhs;
1969 break;
1970 case NODE_MASGN:
1971 RNODE_MASGN(node)->nd_value = rhs;
1972 break;
1973 case NODE_CVASGN:
1974 RNODE_CVASGN(node)->nd_value = rhs;
1975 break;
1976 default:
1977 compile_error(p, "set_nd_value: unexpected node: %s", parser_node_name(nd_type(node)));
1978 break;
1979 }
1980}
1981
1982static ID
1983get_nd_vid(struct parser_params *p, NODE *node)
1984{
1985 switch (nd_type(node)) {
1986 case NODE_CDECL:
1987 return RNODE_CDECL(node)->nd_vid;
1988 case NODE_GASGN:
1989 return RNODE_GASGN(node)->nd_vid;
1990 case NODE_IASGN:
1991 return RNODE_IASGN(node)->nd_vid;
1992 case NODE_LASGN:
1993 return RNODE_LASGN(node)->nd_vid;
1994 case NODE_DASGN:
1995 return RNODE_DASGN(node)->nd_vid;
1996 case NODE_CVASGN:
1997 return RNODE_CVASGN(node)->nd_vid;
1998 default:
1999 compile_error(p, "get_nd_vid: unexpected node: %s", parser_node_name(nd_type(node)));
2000 return 0;
2001 }
2002}
2003
2004static NODE *
2005get_nd_args(struct parser_params *p, NODE *node)
2006{
2007 switch (nd_type(node)) {
2008 case NODE_CALL:
2009 return RNODE_CALL(node)->nd_args;
2010 case NODE_OPCALL:
2011 return RNODE_OPCALL(node)->nd_args;
2012 case NODE_FCALL:
2013 return RNODE_FCALL(node)->nd_args;
2014 case NODE_QCALL:
2015 return RNODE_QCALL(node)->nd_args;
2016 case NODE_SUPER:
2017 return RNODE_SUPER(node)->nd_args;
2018 case NODE_VCALL:
2019 case NODE_ZSUPER:
2020 case NODE_YIELD:
2021 case NODE_RETURN:
2022 case NODE_BREAK:
2023 case NODE_NEXT:
2024 return 0;
2025 default:
2026 compile_error(p, "get_nd_args: unexpected node: %s", parser_node_name(nd_type(node)));
2027 return 0;
2028 }
2029}
2030
2031static st_index_t
2032djb2(const uint8_t *str, size_t len)
2033{
2034 st_index_t hash = 5381;
2035
2036 for (size_t i = 0; i < len; i++) {
2037 hash = ((hash << 5) + hash) + str[i];
2038 }
2039
2040 return hash;
2041}
2042
2043static st_index_t
2044parser_memhash(const void *ptr, long len)
2045{
2046 return djb2(ptr, len);
2047}
2048
2049#define PARSER_STRING_PTR(str) (str->ptr)
2050#define PARSER_STRING_LEN(str) (str->len)
2051#define PARSER_STRING_END(str) (&str->ptr[str->len])
2052#define STRING_SIZE(str) ((size_t)str->len + 1)
2053#define STRING_TERM_LEN(str) (1)
2054#define STRING_TERM_FILL(str) (str->ptr[str->len] = '\0')
2055#define PARSER_STRING_RESIZE_CAPA_TERM(p,str,capacity,termlen) do {\
2056 REALLOC_N(str->ptr, char, (size_t)total + termlen); \
2057 str->len = total; \
2058} while (0)
2059#define STRING_SET_LEN(str, n) do { \
2060 (str)->len = (n); \
2061} while (0)
2062#define PARSER_STRING_GETMEM(str, ptrvar, lenvar) \
2063 ((ptrvar) = str->ptr, \
2064 (lenvar) = str->len)
2065
2066static inline int
2067parser_string_char_at_end(struct parser_params *p, rb_parser_string_t *str, int when_empty)
2068{
2069 return PARSER_STRING_LEN(str) > 0 ? (unsigned char)PARSER_STRING_END(str)[-1] : when_empty;
2070}
2071
2072static rb_parser_string_t *
2073rb_parser_string_new(rb_parser_t *p, const char *ptr, long len)
2074{
2075 rb_parser_string_t *str;
2076
2077 if (len < 0) {
2078 rb_bug("negative string size (or size too big): %ld", len);
2079 }
2080
2081 str = xcalloc(1, sizeof(rb_parser_string_t));
2082 str->ptr = xcalloc(len + 1, sizeof(char));
2083
2084 if (ptr) {
2085 memcpy(PARSER_STRING_PTR(str), ptr, len);
2086 }
2087 STRING_SET_LEN(str, len);
2088 STRING_TERM_FILL(str);
2089 return str;
2090}
2091
2092static rb_parser_string_t *
2093rb_parser_encoding_string_new(rb_parser_t *p, const char *ptr, long len, rb_encoding *enc)
2094{
2095 rb_parser_string_t *str = rb_parser_string_new(p, ptr, len);
2096 str->coderange = RB_PARSER_ENC_CODERANGE_UNKNOWN;
2097 str->enc = enc;
2098 return str;
2099}
2100
2101#ifndef RIPPER
2102rb_parser_string_t *
2103rb_str_to_parser_string(rb_parser_t *p, VALUE str)
2104{
2105 /* Type check */
2106 rb_parser_string_t *ret = rb_parser_encoding_string_new(p, RSTRING_PTR(str), RSTRING_LEN(str), rb_enc_get(str));
2107 RB_GC_GUARD(str);
2108 return ret;
2109}
2110
2111void
2112rb_parser_string_free(rb_parser_t *p, rb_parser_string_t *str)
2113{
2114 if (!str) return;
2115 xfree(PARSER_STRING_PTR(str));
2116 xfree(str);
2117}
2118#endif
2119
2120static st_index_t
2121rb_parser_str_hash(rb_parser_string_t *str)
2122{
2123 return parser_memhash((const void *)PARSER_STRING_PTR(str), PARSER_STRING_LEN(str));
2124}
2125
2126static st_index_t
2127rb_char_p_hash(const char *c)
2128{
2129 return parser_memhash((const void *)c, strlen(c));
2130}
2131
2132static size_t
2133rb_parser_str_capacity(rb_parser_string_t *str, const int termlen)
2134{
2135 return PARSER_STRING_LEN(str);
2136}
2137
2138#ifndef RIPPER
2139static char *
2140rb_parser_string_end(rb_parser_string_t *str)
2141{
2142 return &str->ptr[str->len];
2143}
2144#endif
2145
2146static void
2147rb_parser_string_set_encoding(rb_parser_string_t *str, rb_encoding *enc)
2148{
2149 str->enc = enc;
2150}
2151
2152static rb_encoding *
2153rb_parser_str_get_encoding(rb_parser_string_t *str)
2154{
2155 return str->enc;
2156}
2157
2158#ifndef RIPPER
2159static bool
2160PARSER_ENCODING_IS_ASCII8BIT(struct parser_params *p, rb_parser_string_t *str)
2161{
2162 return rb_parser_str_get_encoding(str) == rb_ascii8bit_encoding();
2163}
2164#endif
2165
2166static int
2167PARSER_ENC_CODERANGE(rb_parser_string_t *str)
2168{
2169 return str->coderange;
2170}
2171
2172static void
2173PARSER_ENC_CODERANGE_SET(rb_parser_string_t *str, int coderange)
2174{
2175 str->coderange = coderange;
2176}
2177
2178static void
2179PARSER_ENCODING_CODERANGE_SET(rb_parser_string_t *str, rb_encoding *enc, enum rb_parser_string_coderange_type cr)
2180{
2181 rb_parser_string_set_encoding(str, enc);
2182 PARSER_ENC_CODERANGE_SET(str, cr);
2183}
2184
2185static void
2186PARSER_ENC_CODERANGE_CLEAR(rb_parser_string_t *str)
2187{
2188 str->coderange = RB_PARSER_ENC_CODERANGE_UNKNOWN;
2189}
2190
2191static bool
2192PARSER_ENC_CODERANGE_ASCIIONLY(rb_parser_string_t *str)
2193{
2194 return PARSER_ENC_CODERANGE(str) == RB_PARSER_ENC_CODERANGE_7BIT;
2195}
2196
2197static bool
2198PARSER_ENC_CODERANGE_CLEAN_P(int cr)
2199{
2200 return cr == RB_PARSER_ENC_CODERANGE_7BIT || cr == RB_PARSER_ENC_CODERANGE_VALID;
2201}
2202
2203static const char *
2204rb_parser_search_nonascii(const char *p, const char *e)
2205{
2206 const char *s = p;
2207
2208 for (; s < e; s++) {
2209 if (*s & 0x80) return s;
2210 }
2211
2212 return NULL;
2213}
2214
2215static int
2216rb_parser_coderange_scan(struct parser_params *p, const char *ptr, long len, rb_encoding *enc)
2217{
2218 const char *e = ptr + len;
2219
2220 if (enc == rb_ascii8bit_encoding()) {
2221 /* enc is ASCII-8BIT. ASCII-8BIT string never be broken. */
2222 ptr = rb_parser_search_nonascii(ptr, e);
2223 return ptr ? RB_PARSER_ENC_CODERANGE_VALID : RB_PARSER_ENC_CODERANGE_7BIT;
2224 }
2225
2226 /* parser string encoding is always asciicompat */
2227 ptr = rb_parser_search_nonascii(ptr, e);
2228 if (!ptr) return RB_PARSER_ENC_CODERANGE_7BIT;
2229 for (;;) {
2230 int ret = rb_enc_precise_mbclen(ptr, e, enc);
2231 if (!MBCLEN_CHARFOUND_P(ret)) return RB_PARSER_ENC_CODERANGE_BROKEN;
2232 ptr += MBCLEN_CHARFOUND_LEN(ret);
2233 if (ptr == e) break;
2234 ptr = rb_parser_search_nonascii(ptr, e);
2235 if (!ptr) break;
2236 }
2237
2238 return RB_PARSER_ENC_CODERANGE_VALID;
2239}
2240
2241static int
2242rb_parser_enc_coderange_scan(struct parser_params *p, rb_parser_string_t *str, rb_encoding *enc)
2243{
2244 return rb_parser_coderange_scan(p, PARSER_STRING_PTR(str), PARSER_STRING_LEN(str), enc);
2245}
2246
2247static int
2248rb_parser_enc_str_coderange(struct parser_params *p, rb_parser_string_t *str)
2249{
2250 int cr = PARSER_ENC_CODERANGE(str);
2251
2252 if (cr == RB_PARSER_ENC_CODERANGE_UNKNOWN) {
2253 cr = rb_parser_enc_coderange_scan(p, str, rb_parser_str_get_encoding(str));
2254 PARSER_ENC_CODERANGE_SET(str, cr);
2255 }
2256
2257 return cr;
2258}
2259
2260static rb_parser_string_t *
2261rb_parser_enc_associate(struct parser_params *p, rb_parser_string_t *str, rb_encoding *enc)
2262{
2263 if (rb_parser_str_get_encoding(str) == enc)
2264 return str;
2265 if (!PARSER_ENC_CODERANGE_ASCIIONLY(str)) {
2266 PARSER_ENC_CODERANGE_CLEAR(str);
2267 }
2268 rb_parser_string_set_encoding(str, enc);
2269 return str;
2270}
2271
2272static bool
2273rb_parser_is_ascii_string(struct parser_params *p, rb_parser_string_t *str)
2274{
2275 return rb_parser_enc_str_coderange(p, str) == RB_PARSER_ENC_CODERANGE_7BIT;
2276}
2277
2278static rb_encoding *
2279rb_parser_enc_compatible(struct parser_params *p, rb_parser_string_t *str1, rb_parser_string_t *str2)
2280{
2281 rb_encoding *enc1 = rb_parser_str_get_encoding(str1);
2282 rb_encoding *enc2 = rb_parser_str_get_encoding(str2);
2283
2284 if (enc1 == NULL || enc2 == NULL)
2285 return 0;
2286
2287 if (enc1 == enc2) {
2288 return enc1;
2289 }
2290
2291 if (PARSER_STRING_LEN(str2) == 0)
2292 return enc1;
2293 if (PARSER_STRING_LEN(str1) == 0)
2294 return rb_parser_is_ascii_string(p, str2) ? enc1 : enc2;
2295
2296 int cr1, cr2;
2297
2298 cr1 = rb_parser_enc_str_coderange(p, str1);
2299 cr2 = rb_parser_enc_str_coderange(p, str2);
2300
2301 if (cr1 != cr2) {
2302 if (cr1 == RB_PARSER_ENC_CODERANGE_7BIT) return enc2;
2303 if (cr2 == RB_PARSER_ENC_CODERANGE_7BIT) return enc1;
2304 }
2305
2306 if (cr2 == RB_PARSER_ENC_CODERANGE_7BIT) {
2307 return enc1;
2308 }
2309
2310 if (cr1 == RB_PARSER_ENC_CODERANGE_7BIT) {
2311 return enc2;
2312 }
2313
2314 return 0;
2315}
2316
2317static void
2318rb_parser_str_modify(rb_parser_string_t *str)
2319{
2320 PARSER_ENC_CODERANGE_CLEAR(str);
2321}
2322
2323static void
2324rb_parser_str_set_len(struct parser_params *p, rb_parser_string_t *str, long len)
2325{
2326 long capa;
2327 const int termlen = STRING_TERM_LEN(str);
2328
2329 if (len > (capa = (long)(rb_parser_str_capacity(str, termlen))) || len < 0) {
2330 rb_bug("probable buffer overflow: %ld for %ld", len, capa);
2331 }
2332
2333 int cr = PARSER_ENC_CODERANGE(str);
2334 if (cr == RB_PARSER_ENC_CODERANGE_UNKNOWN) {
2335 /* Leave unknown. */
2336 }
2337 else if (len > PARSER_STRING_LEN(str)) {
2338 PARSER_ENC_CODERANGE_SET(str, RB_PARSER_ENC_CODERANGE_UNKNOWN);
2339 }
2340 else if (len < PARSER_STRING_LEN(str)) {
2341 if (cr != RB_PARSER_ENC_CODERANGE_7BIT) {
2342 /* ASCII-only string is keeping after truncated. Valid
2343 * and broken may be invalid or valid, leave unknown. */
2344 PARSER_ENC_CODERANGE_SET(str, RB_PARSER_ENC_CODERANGE_UNKNOWN);
2345 }
2346 }
2347
2348 STRING_SET_LEN(str, len);
2349 STRING_TERM_FILL(str);
2350}
2351
2352static rb_parser_string_t *
2353rb_parser_str_buf_cat(struct parser_params *p, rb_parser_string_t *str, const char *ptr, long len)
2354{
2355 rb_parser_str_modify(str);
2356 if (len == 0) return 0;
2357
2358 long total, olen, off = -1;
2359 char *sptr;
2360 const int termlen = STRING_TERM_LEN(str);
2361
2362 PARSER_STRING_GETMEM(str, sptr, olen);
2363 if (ptr >= sptr && ptr <= sptr + olen) {
2364 off = ptr - sptr;
2365 }
2366
2367 if (olen > LONG_MAX - len) {
2368 compile_error(p, "string sizes too big");
2369 return 0;
2370 }
2371 total = olen + len;
2372 PARSER_STRING_RESIZE_CAPA_TERM(p, str, total, termlen);
2373 sptr = PARSER_STRING_PTR(str);
2374 if (off != -1) {
2375 ptr = sptr + off;
2376 }
2377 memcpy(sptr + olen, ptr, len);
2378 STRING_SET_LEN(str, total);
2379 STRING_TERM_FILL(str);
2380
2381 return str;
2382}
2383
2384#define parser_str_cat(str, ptr, len) rb_parser_str_buf_cat(p, str, ptr, len)
2385#define parser_str_cat_cstr(str, lit) rb_parser_str_buf_cat(p, str, lit, strlen(lit))
2386
2387static rb_parser_string_t *
2388rb_parser_enc_cr_str_buf_cat(struct parser_params *p, rb_parser_string_t *str, const char *ptr, long len,
2389 rb_encoding *ptr_enc, int ptr_cr, int *ptr_cr_ret)
2390{
2391 int str_cr, res_cr;
2392 rb_encoding *str_enc, *res_enc;
2393
2394 str_enc = rb_parser_str_get_encoding(str);
2395 str_cr = PARSER_STRING_LEN(str) ? PARSER_ENC_CODERANGE(str) : RB_PARSER_ENC_CODERANGE_7BIT;
2396
2397 if (str_enc == ptr_enc) {
2398 if (str_cr != RB_PARSER_ENC_CODERANGE_UNKNOWN && ptr_cr == RB_PARSER_ENC_CODERANGE_UNKNOWN) {
2399 ptr_cr = rb_parser_coderange_scan(p, ptr, len, ptr_enc);
2400 }
2401 }
2402 else {
2403 /* parser string encoding is always asciicompat */
2404 if (ptr_cr == RB_PARSER_ENC_CODERANGE_UNKNOWN) {
2405 ptr_cr = rb_parser_coderange_scan(p, ptr, len, ptr_enc);
2406 }
2407 if (str_cr == RB_PARSER_ENC_CODERANGE_UNKNOWN) {
2408 if (str_enc == rb_ascii8bit_encoding() || ptr_cr != RB_PARSER_ENC_CODERANGE_7BIT) {
2409 str_cr = rb_parser_enc_str_coderange(p, str);
2410 }
2411 }
2412 }
2413 if (ptr_cr_ret)
2414 *ptr_cr_ret = ptr_cr;
2415
2416 if (str_enc != ptr_enc &&
2417 str_cr != RB_PARSER_ENC_CODERANGE_7BIT &&
2418 ptr_cr != RB_PARSER_ENC_CODERANGE_7BIT) {
2419 goto incompatible;
2420 }
2421
2422 if (str_cr == RB_PARSER_ENC_CODERANGE_UNKNOWN) {
2423 res_enc = str_enc;
2424 res_cr = RB_PARSER_ENC_CODERANGE_UNKNOWN;
2425 }
2426 else if (str_cr == RB_PARSER_ENC_CODERANGE_7BIT) {
2427 if (ptr_cr == RB_PARSER_ENC_CODERANGE_7BIT) {
2428 res_enc = str_enc;
2429 res_cr = RB_PARSER_ENC_CODERANGE_7BIT;
2430 }
2431 else {
2432 res_enc = ptr_enc;
2433 res_cr = ptr_cr;
2434 }
2435 }
2436 else if (str_cr == RB_PARSER_ENC_CODERANGE_VALID) {
2437 res_enc = str_enc;
2438 if (PARSER_ENC_CODERANGE_CLEAN_P(ptr_cr))
2439 res_cr = str_cr;
2440 else
2441 res_cr = ptr_cr;
2442 }
2443 else { /* str_cr == RB_PARSER_ENC_CODERANGE_BROKEN */
2444 res_enc = str_enc;
2445 res_cr = str_cr;
2446 if (0 < len) res_cr = RB_PARSER_ENC_CODERANGE_UNKNOWN;
2447 }
2448
2449 if (len < 0) {
2450 compile_error(p, "negative string size (or size too big)");
2451 }
2452 parser_str_cat(str, ptr, len);
2453 PARSER_ENCODING_CODERANGE_SET(str, res_enc, res_cr);
2454 return str;
2455
2456 incompatible:
2457 compile_error(p, "incompatible character encodings: %s and %s",
2458 rb_enc_name(str_enc), rb_enc_name(ptr_enc));
2459 UNREACHABLE_RETURN(0);
2460
2461}
2462
2463static rb_parser_string_t *
2464rb_parser_enc_str_buf_cat(struct parser_params *p, rb_parser_string_t *str, const char *ptr, long len,
2465 rb_encoding *ptr_enc)
2466{
2467 return rb_parser_enc_cr_str_buf_cat(p, str, ptr, len, ptr_enc, RB_PARSER_ENC_CODERANGE_UNKNOWN, NULL);
2468}
2469
2470static rb_parser_string_t *
2471rb_parser_str_buf_append(struct parser_params *p, rb_parser_string_t *str, rb_parser_string_t *str2)
2472{
2473 int str2_cr = rb_parser_enc_str_coderange(p, str2);
2474
2475 rb_parser_enc_cr_str_buf_cat(p, str, PARSER_STRING_PTR(str2), PARSER_STRING_LEN(str2),
2476 rb_parser_str_get_encoding(str2), str2_cr, &str2_cr);
2477
2478 PARSER_ENC_CODERANGE_SET(str2, str2_cr);
2479
2480 return str;
2481}
2482
2483static rb_parser_string_t *
2484rb_parser_str_resize(struct parser_params *p, rb_parser_string_t *str, long len)
2485{
2486 if (len < 0) {
2487 rb_bug("negative string size (or size too big)");
2488 }
2489
2490 long slen = PARSER_STRING_LEN(str);
2491
2492 if (slen > len && PARSER_ENC_CODERANGE(str) != RB_PARSER_ENC_CODERANGE_7BIT) {
2493 PARSER_ENC_CODERANGE_CLEAR(str);
2494 }
2495
2496 {
2497 long capa;
2498 const int termlen = STRING_TERM_LEN(str);
2499
2500 if ((capa = slen) < len) {
2501 SIZED_REALLOC_N(str->ptr, char, (size_t)len + termlen, STRING_SIZE(str));
2502 }
2503 else if (len == slen) return str;
2504 STRING_SET_LEN(str, len);
2505 STRING_TERM_FILL(str);
2506 }
2507 return str;
2508}
2509
2510# define PARSER_ENC_STRING_GETMEM(str, ptrvar, lenvar, encvar) \
2511 ((ptrvar) = str->ptr, \
2512 (lenvar) = str->len, \
2513 (encvar) = str->enc)
2514
2515static int
2516rb_parser_string_hash_cmp(rb_parser_string_t *str1, rb_parser_string_t *str2)
2517{
2518 long len1, len2;
2519 const char *ptr1, *ptr2;
2520 rb_encoding *enc1, *enc2;
2521
2522 PARSER_ENC_STRING_GETMEM(str1, ptr1, len1, enc1);
2523 PARSER_ENC_STRING_GETMEM(str2, ptr2, len2, enc2);
2524
2525 return (len1 != len2 ||
2526 enc1 != enc2 ||
2527 memcmp(ptr1, ptr2, len1) != 0);
2528}
2529
2530static void
2531rb_parser_ary_extend(rb_parser_t *p, rb_parser_ary_t *ary, long len)
2532{
2533 long i;
2534 if (ary->capa < len) {
2535 ary->capa = len;
2536 ary->data = (rb_parser_ary_data *)xrealloc(ary->data, sizeof(rb_parser_ary_data) * len);
2537 for (i = ary->len; i < len; i++) {
2538 ary->data[i] = 0;
2539 }
2540 }
2541}
2542
2543/*
2544 * Do not call this directly.
2545 * Use rb_parser_ary_new_capa_for_XXX() instead.
2546 */
2547static rb_parser_ary_t *
2548parser_ary_new_capa(rb_parser_t *p, long len)
2549{
2550 if (len < 0) {
2551 rb_bug("negative array size (or size too big): %ld", len);
2552 }
2553 rb_parser_ary_t *ary = xcalloc(1, sizeof(rb_parser_ary_t));
2554 ary->data_type = 0;
2555 ary->len = 0;
2556 ary->capa = len;
2557 if (0 < len) {
2558 ary->data = (rb_parser_ary_data *)xcalloc(len, sizeof(rb_parser_ary_data));
2559 }
2560 else {
2561 ary->data = NULL;
2562 }
2563 return ary;
2564}
2565
2566#ifndef RIPPER
2567static rb_parser_ary_t *
2568rb_parser_ary_new_capa_for_script_line(rb_parser_t *p, long len)
2569{
2570 rb_parser_ary_t *ary = parser_ary_new_capa(p, len);
2571 ary->data_type = PARSER_ARY_DATA_SCRIPT_LINE;
2572 return ary;
2573}
2574
2575static rb_parser_ary_t *
2576rb_parser_ary_new_capa_for_ast_token(rb_parser_t *p, long len)
2577{
2578 rb_parser_ary_t *ary = parser_ary_new_capa(p, len);
2579 ary->data_type = PARSER_ARY_DATA_AST_TOKEN;
2580 return ary;
2581}
2582#endif
2583
2584static rb_parser_ary_t *
2585rb_parser_ary_new_capa_for_node(rb_parser_t *p, long len)
2586{
2587 rb_parser_ary_t *ary = parser_ary_new_capa(p, len);
2588 ary->data_type = PARSER_ARY_DATA_NODE;
2589 return ary;
2590}
2591
2592/*
2593 * Do not call this directly.
2594 * Use rb_parser_ary_push_XXX() instead.
2595 */
2596static rb_parser_ary_t *
2597parser_ary_push(rb_parser_t *p, rb_parser_ary_t *ary, rb_parser_ary_data val)
2598{
2599 if (ary->len == ary->capa) {
2600 rb_parser_ary_extend(p, ary, ary->len == 0 ? 1 : ary->len * 2);
2601 }
2602 ary->data[ary->len++] = val;
2603 return ary;
2604}
2605
2606#ifndef RIPPER
2607static rb_parser_ary_t *
2608rb_parser_ary_push_ast_token(rb_parser_t *p, rb_parser_ary_t *ary, rb_parser_ast_token_t *val)
2609{
2610 if (ary->data_type != PARSER_ARY_DATA_AST_TOKEN) {
2611 rb_bug("unexpected rb_parser_ary_data_type: %d", ary->data_type);
2612 }
2613 return parser_ary_push(p, ary, val);
2614}
2615
2616static rb_parser_ary_t *
2617rb_parser_ary_push_script_line(rb_parser_t *p, rb_parser_ary_t *ary, rb_parser_string_t *val)
2618{
2619 if (ary->data_type != PARSER_ARY_DATA_SCRIPT_LINE) {
2620 rb_bug("unexpected rb_parser_ary_data_type: %d", ary->data_type);
2621 }
2622 return parser_ary_push(p, ary, val);
2623}
2624#endif
2625
2626static rb_parser_ary_t *
2627rb_parser_ary_push_node(rb_parser_t *p, rb_parser_ary_t *ary, NODE *val)
2628{
2629 if (ary->data_type != PARSER_ARY_DATA_NODE) {
2630 rb_bug("unexpected rb_parser_ary_data_type: %d", ary->data_type);
2631 }
2632 return parser_ary_push(p, ary, val);
2633}
2634
2635#ifndef RIPPER
2636static void
2637rb_parser_ast_token_free(rb_parser_t *p, rb_parser_ast_token_t *token)
2638{
2639 if (!token) return;
2640 rb_parser_string_free(p, token->str);
2641 xfree(token);
2642}
2643
2644static void
2645rb_parser_ary_free(rb_parser_t *p, rb_parser_ary_t *ary)
2646{
2647# define foreach_ary(ptr) \
2648 for (rb_parser_ary_data *ptr = ary->data, *const end_ary_data = ptr + ary->len; \
2649 ptr < end_ary_data; ptr++)
2650 switch (ary->data_type) {
2651 case PARSER_ARY_DATA_AST_TOKEN:
2652 foreach_ary(data) {rb_parser_ast_token_free(p, *data);}
2653 break;
2654 case PARSER_ARY_DATA_SCRIPT_LINE:
2655 foreach_ary(data) {rb_parser_string_free(p, *data);}
2656 break;
2657 case PARSER_ARY_DATA_NODE:
2658 /* Do nothing because nodes are freed when rb_ast_t is freed */
2659 break;
2660 default:
2661 rb_bug("unexpected rb_parser_ary_data_type: %d", ary->data_type);
2662 break;
2663 }
2664# undef foreach_ary
2665 xfree(ary->data);
2666 xfree(ary);
2667}
2668
2669#endif /* !RIPPER */
2670
2671#line 2672 "parse.c"
2672
2673# ifndef YY_CAST
2674# ifdef __cplusplus
2675# define YY_CAST(Type, Val) static_cast<Type> (Val)
2676# define YY_REINTERPRET_CAST(Type, Val) reinterpret_cast<Type> (Val)
2677# else
2678# define YY_CAST(Type, Val) ((Type) (Val))
2679# define YY_REINTERPRET_CAST(Type, Val) ((Type) (Val))
2680# endif
2681# endif
2682# ifndef YY_NULLPTR
2683# if defined __cplusplus
2684# if 201103L <= __cplusplus
2685# define YY_NULLPTR nullptr
2686# else
2687# define YY_NULLPTR 0
2688# endif
2689# else
2690# define YY_NULLPTR ((void*)0)
2691# endif
2692# endif
2693
2694#include "parse.h"
2695/* Symbol kind. */
2696enum yysymbol_kind_t
2697{
2698 YYSYMBOL_YYEMPTY = -2,
2699 YYSYMBOL_YYEOF = 0, /* "end-of-input" */
2700 YYSYMBOL_YYerror = 1, /* error */
2701 YYSYMBOL_YYUNDEF = 2, /* "invalid token" */
2702 YYSYMBOL_keyword_class = 3, /* "'class'" */
2703 YYSYMBOL_keyword_module = 4, /* "'module'" */
2704 YYSYMBOL_keyword_def = 5, /* "'def'" */
2705 YYSYMBOL_keyword_undef = 6, /* "'undef'" */
2706 YYSYMBOL_keyword_begin = 7, /* "'begin'" */
2707 YYSYMBOL_keyword_rescue = 8, /* "'rescue'" */
2708 YYSYMBOL_keyword_ensure = 9, /* "'ensure'" */
2709 YYSYMBOL_keyword_end = 10, /* "'end'" */
2710 YYSYMBOL_keyword_if = 11, /* "'if'" */
2711 YYSYMBOL_keyword_unless = 12, /* "'unless'" */
2712 YYSYMBOL_keyword_then = 13, /* "'then'" */
2713 YYSYMBOL_keyword_elsif = 14, /* "'elsif'" */
2714 YYSYMBOL_keyword_else = 15, /* "'else'" */
2715 YYSYMBOL_keyword_case = 16, /* "'case'" */
2716 YYSYMBOL_keyword_when = 17, /* "'when'" */
2717 YYSYMBOL_keyword_while = 18, /* "'while'" */
2718 YYSYMBOL_keyword_until = 19, /* "'until'" */
2719 YYSYMBOL_keyword_for = 20, /* "'for'" */
2720 YYSYMBOL_keyword_break = 21, /* "'break'" */
2721 YYSYMBOL_keyword_next = 22, /* "'next'" */
2722 YYSYMBOL_keyword_redo = 23, /* "'redo'" */
2723 YYSYMBOL_keyword_retry = 24, /* "'retry'" */
2724 YYSYMBOL_keyword_in = 25, /* "'in'" */
2725 YYSYMBOL_keyword_do = 26, /* "'do'" */
2726 YYSYMBOL_keyword_do_cond = 27, /* "'do' for condition" */
2727 YYSYMBOL_keyword_do_block = 28, /* "'do' for block" */
2728 YYSYMBOL_keyword_do_LAMBDA = 29, /* "'do' for lambda" */
2729 YYSYMBOL_keyword_return = 30, /* "'return'" */
2730 YYSYMBOL_keyword_yield = 31, /* "'yield'" */
2731 YYSYMBOL_keyword_super = 32, /* "'super'" */
2732 YYSYMBOL_keyword_self = 33, /* "'self'" */
2733 YYSYMBOL_keyword_nil = 34, /* "'nil'" */
2734 YYSYMBOL_keyword_true = 35, /* "'true'" */
2735 YYSYMBOL_keyword_false = 36, /* "'false'" */
2736 YYSYMBOL_keyword_and = 37, /* "'and'" */
2737 YYSYMBOL_keyword_or = 38, /* "'or'" */
2738 YYSYMBOL_keyword_not = 39, /* "'not'" */
2739 YYSYMBOL_modifier_if = 40, /* "'if' modifier" */
2740 YYSYMBOL_modifier_unless = 41, /* "'unless' modifier" */
2741 YYSYMBOL_modifier_while = 42, /* "'while' modifier" */
2742 YYSYMBOL_modifier_until = 43, /* "'until' modifier" */
2743 YYSYMBOL_modifier_rescue = 44, /* "'rescue' modifier" */
2744 YYSYMBOL_keyword_alias = 45, /* "'alias'" */
2745 YYSYMBOL_keyword_defined = 46, /* "'defined?'" */
2746 YYSYMBOL_keyword_BEGIN = 47, /* "'BEGIN'" */
2747 YYSYMBOL_keyword_END = 48, /* "'END'" */
2748 YYSYMBOL_keyword__LINE__ = 49, /* "'__LINE__'" */
2749 YYSYMBOL_keyword__FILE__ = 50, /* "'__FILE__'" */
2750 YYSYMBOL_keyword__ENCODING__ = 51, /* "'__ENCODING__'" */
2751 YYSYMBOL_tIDENTIFIER = 52, /* "local variable or method" */
2752 YYSYMBOL_tFID = 53, /* "method" */
2753 YYSYMBOL_tGVAR = 54, /* "global variable" */
2754 YYSYMBOL_tIVAR = 55, /* "instance variable" */
2755 YYSYMBOL_tCONSTANT = 56, /* "constant" */
2756 YYSYMBOL_tCVAR = 57, /* "class variable" */
2757 YYSYMBOL_tLABEL = 58, /* "label" */
2758 YYSYMBOL_tINTEGER = 59, /* "integer literal" */
2759 YYSYMBOL_tFLOAT = 60, /* "float literal" */
2760 YYSYMBOL_tRATIONAL = 61, /* "rational literal" */
2761 YYSYMBOL_tIMAGINARY = 62, /* "imaginary literal" */
2762 YYSYMBOL_tCHAR = 63, /* "char literal" */
2763 YYSYMBOL_tNTH_REF = 64, /* "numbered reference" */
2764 YYSYMBOL_tBACK_REF = 65, /* "back reference" */
2765 YYSYMBOL_tSTRING_CONTENT = 66, /* "literal content" */
2766 YYSYMBOL_tREGEXP_END = 67, /* tREGEXP_END */
2767 YYSYMBOL_tDUMNY_END = 68, /* "dummy end" */
2768 YYSYMBOL_69_ = 69, /* '.' */
2769 YYSYMBOL_70_backslash_ = 70, /* "backslash" */
2770 YYSYMBOL_tSP = 71, /* "escaped space" */
2771 YYSYMBOL_72_escaped_horizontal_tab_ = 72, /* "escaped horizontal tab" */
2772 YYSYMBOL_73_escaped_form_feed_ = 73, /* "escaped form feed" */
2773 YYSYMBOL_74_escaped_carriage_return_ = 74, /* "escaped carriage return" */
2774 YYSYMBOL_75_escaped_vertical_tab_ = 75, /* "escaped vertical tab" */
2775 YYSYMBOL_tUPLUS = 76, /* "unary+" */
2776 YYSYMBOL_tUMINUS = 77, /* "unary-" */
2777 YYSYMBOL_tPOW = 78, /* "**" */
2778 YYSYMBOL_tCMP = 79, /* "<=>" */
2779 YYSYMBOL_tEQ = 80, /* "==" */
2780 YYSYMBOL_tEQQ = 81, /* "===" */
2781 YYSYMBOL_tNEQ = 82, /* "!=" */
2782 YYSYMBOL_tGEQ = 83, /* ">=" */
2783 YYSYMBOL_tLEQ = 84, /* "<=" */
2784 YYSYMBOL_tANDOP = 85, /* "&&" */
2785 YYSYMBOL_tOROP = 86, /* "||" */
2786 YYSYMBOL_tMATCH = 87, /* "=~" */
2787 YYSYMBOL_tNMATCH = 88, /* "!~" */
2788 YYSYMBOL_tDOT2 = 89, /* ".." */
2789 YYSYMBOL_tDOT3 = 90, /* "..." */
2790 YYSYMBOL_tBDOT2 = 91, /* "(.." */
2791 YYSYMBOL_tBDOT3 = 92, /* "(..." */
2792 YYSYMBOL_tAREF = 93, /* "[]" */
2793 YYSYMBOL_tASET = 94, /* "[]=" */
2794 YYSYMBOL_tLSHFT = 95, /* "<<" */
2795 YYSYMBOL_tRSHFT = 96, /* ">>" */
2796 YYSYMBOL_tANDDOT = 97, /* "&." */
2797 YYSYMBOL_tCOLON2 = 98, /* "::" */
2798 YYSYMBOL_tCOLON3 = 99, /* ":: at EXPR_BEG" */
2799 YYSYMBOL_tOP_ASGN = 100, /* "operator-assignment" */
2800 YYSYMBOL_tASSOC = 101, /* "=>" */
2801 YYSYMBOL_tLPAREN = 102, /* "(" */
2802 YYSYMBOL_tLPAREN_ARG = 103, /* "( arg" */
2803 YYSYMBOL_tLBRACK = 104, /* "[" */
2804 YYSYMBOL_tLBRACE = 105, /* "{" */
2805 YYSYMBOL_tLBRACE_ARG = 106, /* "{ arg" */
2806 YYSYMBOL_tSTAR = 107, /* "*" */
2807 YYSYMBOL_tDSTAR = 108, /* "**arg" */
2808 YYSYMBOL_tAMPER = 109, /* "&" */
2809 YYSYMBOL_tLAMBDA = 110, /* "->" */
2810 YYSYMBOL_tSYMBEG = 111, /* "symbol literal" */
2811 YYSYMBOL_tSTRING_BEG = 112, /* "string literal" */
2812 YYSYMBOL_tXSTRING_BEG = 113, /* "backtick literal" */
2813 YYSYMBOL_tREGEXP_BEG = 114, /* "regexp literal" */
2814 YYSYMBOL_tWORDS_BEG = 115, /* "word list" */
2815 YYSYMBOL_tQWORDS_BEG = 116, /* "verbatim word list" */
2816 YYSYMBOL_tSYMBOLS_BEG = 117, /* "symbol list" */
2817 YYSYMBOL_tQSYMBOLS_BEG = 118, /* "verbatim symbol list" */
2818 YYSYMBOL_tSTRING_END = 119, /* "terminator" */
2819 YYSYMBOL_tSTRING_DEND = 120, /* "'}'" */
2820 YYSYMBOL_tSTRING_DBEG = 121, /* "'#{'" */
2821 YYSYMBOL_tSTRING_DVAR = 122, /* tSTRING_DVAR */
2822 YYSYMBOL_tLAMBEG = 123, /* tLAMBEG */
2823 YYSYMBOL_tLABEL_END = 124, /* tLABEL_END */
2824 YYSYMBOL_tIGNORED_NL = 125, /* tIGNORED_NL */
2825 YYSYMBOL_tCOMMENT = 126, /* tCOMMENT */
2826 YYSYMBOL_tEMBDOC_BEG = 127, /* tEMBDOC_BEG */
2827 YYSYMBOL_tEMBDOC = 128, /* tEMBDOC */
2828 YYSYMBOL_tEMBDOC_END = 129, /* tEMBDOC_END */
2829 YYSYMBOL_tHEREDOC_BEG = 130, /* tHEREDOC_BEG */
2830 YYSYMBOL_tHEREDOC_END = 131, /* tHEREDOC_END */
2831 YYSYMBOL_k__END__ = 132, /* k__END__ */
2832 YYSYMBOL_tLOWEST = 133, /* tLOWEST */
2833 YYSYMBOL_134_ = 134, /* '=' */
2834 YYSYMBOL_135_ = 135, /* '?' */
2835 YYSYMBOL_136_ = 136, /* ':' */
2836 YYSYMBOL_137_ = 137, /* '>' */
2837 YYSYMBOL_138_ = 138, /* '<' */
2838 YYSYMBOL_139_ = 139, /* '|' */
2839 YYSYMBOL_140_ = 140, /* '^' */
2840 YYSYMBOL_141_ = 141, /* '&' */
2841 YYSYMBOL_142_ = 142, /* '+' */
2842 YYSYMBOL_143_ = 143, /* '-' */
2843 YYSYMBOL_144_ = 144, /* '*' */
2844 YYSYMBOL_145_ = 145, /* '/' */
2845 YYSYMBOL_146_ = 146, /* '%' */
2846 YYSYMBOL_tUMINUS_NUM = 147, /* tUMINUS_NUM */
2847 YYSYMBOL_148_ = 148, /* '!' */
2848 YYSYMBOL_149_ = 149, /* '~' */
2849 YYSYMBOL_tLAST_TOKEN = 150, /* tLAST_TOKEN */
2850 YYSYMBOL_151_ = 151, /* '{' */
2851 YYSYMBOL_152_ = 152, /* '}' */
2852 YYSYMBOL_153_ = 153, /* '[' */
2853 YYSYMBOL_154_n_ = 154, /* '\n' */
2854 YYSYMBOL_155_ = 155, /* ',' */
2855 YYSYMBOL_156_ = 156, /* '`' */
2856 YYSYMBOL_157_ = 157, /* '(' */
2857 YYSYMBOL_158_ = 158, /* ')' */
2858 YYSYMBOL_159_ = 159, /* ']' */
2859 YYSYMBOL_160_ = 160, /* ';' */
2860 YYSYMBOL_161_ = 161, /* ' ' */
2861 YYSYMBOL_YYACCEPT = 162, /* $accept */
2862 YYSYMBOL_option_terms = 163, /* option_terms */
2863 YYSYMBOL_compstmt_top_stmts = 164, /* compstmt_top_stmts */
2864 YYSYMBOL_165_1 = 165, /* $@1 */
2865 YYSYMBOL_program = 166, /* program */
2866 YYSYMBOL_top_stmts = 167, /* top_stmts */
2867 YYSYMBOL_top_stmt = 168, /* top_stmt */
2868 YYSYMBOL_block_open = 169, /* block_open */
2869 YYSYMBOL_begin_block = 170, /* begin_block */
2870 YYSYMBOL_compstmt_stmts = 171, /* compstmt_stmts */
2871 YYSYMBOL_172_2 = 172, /* $@2 */
2872 YYSYMBOL_173_3 = 173, /* $@3 */
2873 YYSYMBOL_bodystmt = 174, /* bodystmt */
2874 YYSYMBOL_175_4 = 175, /* $@4 */
2875 YYSYMBOL_stmts = 176, /* stmts */
2876 YYSYMBOL_stmt_or_begin = 177, /* stmt_or_begin */
2877 YYSYMBOL_178_5 = 178, /* $@5 */
2878 YYSYMBOL_allow_exits = 179, /* allow_exits */
2879 YYSYMBOL_k_END = 180, /* k_END */
2880 YYSYMBOL_181_6 = 181, /* $@6 */
2881 YYSYMBOL_stmt = 182, /* stmt */
2882 YYSYMBOL_asgn_mrhs = 183, /* asgn_mrhs */
2883 YYSYMBOL_asgn_command_rhs = 184, /* asgn_command_rhs */
2884 YYSYMBOL_command_asgn = 185, /* command_asgn */
2885 YYSYMBOL_op_asgn_command_rhs = 186, /* op_asgn_command_rhs */
2886 YYSYMBOL_def_endless_method_endless_command = 187, /* def_endless_method_endless_command */
2887 YYSYMBOL_endless_command = 188, /* endless_command */
2888 YYSYMBOL_option__n_ = 189, /* option_'\n' */
2889 YYSYMBOL_command_rhs = 190, /* command_rhs */
2890 YYSYMBOL_expr = 191, /* expr */
2891 YYSYMBOL_192_7 = 192, /* $@7 */
2892 YYSYMBOL_193_8 = 193, /* $@8 */
2893 YYSYMBOL_def_name = 194, /* def_name */
2894 YYSYMBOL_defn_head = 195, /* defn_head */
2895 YYSYMBOL_196_9 = 196, /* $@9 */
2896 YYSYMBOL_defs_head = 197, /* defs_head */
2897 YYSYMBOL_value_expr_expr = 198, /* value_expr_expr */
2898 YYSYMBOL_expr_value = 199, /* expr_value */
2899 YYSYMBOL_200_10 = 200, /* $@10 */
2900 YYSYMBOL_201_11 = 201, /* $@11 */
2901 YYSYMBOL_expr_value_do = 202, /* expr_value_do */
2902 YYSYMBOL_command_call = 203, /* command_call */
2903 YYSYMBOL_value_expr_command_call = 204, /* value_expr_command_call */
2904 YYSYMBOL_command_call_value = 205, /* command_call_value */
2905 YYSYMBOL_block_command = 206, /* block_command */
2906 YYSYMBOL_cmd_brace_block = 207, /* cmd_brace_block */
2907 YYSYMBOL_fcall = 208, /* fcall */
2908 YYSYMBOL_command = 209, /* command */
2909 YYSYMBOL_mlhs = 210, /* mlhs */
2910 YYSYMBOL_mlhs_inner = 211, /* mlhs_inner */
2911 YYSYMBOL_mlhs_basic = 212, /* mlhs_basic */
2912 YYSYMBOL_mlhs_items_mlhs_item = 213, /* mlhs_items_mlhs_item */
2913 YYSYMBOL_mlhs_item = 214, /* mlhs_item */
2914 YYSYMBOL_mlhs_head = 215, /* mlhs_head */
2915 YYSYMBOL_mlhs_node = 216, /* mlhs_node */
2916 YYSYMBOL_lhs = 217, /* lhs */
2917 YYSYMBOL_cname = 218, /* cname */
2918 YYSYMBOL_cpath = 219, /* cpath */
2919 YYSYMBOL_fname = 220, /* fname */
2920 YYSYMBOL_fitem = 221, /* fitem */
2921 YYSYMBOL_undef_list = 222, /* undef_list */
2922 YYSYMBOL_223_12 = 223, /* $@12 */
2923 YYSYMBOL_op = 224, /* op */
2924 YYSYMBOL_reswords = 225, /* reswords */
2925 YYSYMBOL_asgn_arg_rhs = 226, /* asgn_arg_rhs */
2926 YYSYMBOL_arg = 227, /* arg */
2927 YYSYMBOL_op_asgn_arg_rhs = 228, /* op_asgn_arg_rhs */
2928 YYSYMBOL_range_expr_arg = 229, /* range_expr_arg */
2929 YYSYMBOL_def_endless_method_endless_arg = 230, /* def_endless_method_endless_arg */
2930 YYSYMBOL_ternary = 231, /* ternary */
2931 YYSYMBOL_endless_arg = 232, /* endless_arg */
2932 YYSYMBOL_relop = 233, /* relop */
2933 YYSYMBOL_rel_expr = 234, /* rel_expr */
2934 YYSYMBOL_lex_ctxt = 235, /* lex_ctxt */
2935 YYSYMBOL_begin_defined = 236, /* begin_defined */
2936 YYSYMBOL_after_rescue = 237, /* after_rescue */
2937 YYSYMBOL_value_expr_arg = 238, /* value_expr_arg */
2938 YYSYMBOL_arg_value = 239, /* arg_value */
2939 YYSYMBOL_aref_args = 240, /* aref_args */
2940 YYSYMBOL_arg_rhs = 241, /* arg_rhs */
2941 YYSYMBOL_paren_args = 242, /* paren_args */
2942 YYSYMBOL_opt_paren_args = 243, /* opt_paren_args */
2943 YYSYMBOL_opt_call_args = 244, /* opt_call_args */
2944 YYSYMBOL_value_expr_command = 245, /* value_expr_command */
2945 YYSYMBOL_call_args = 246, /* call_args */
2946 YYSYMBOL_247_13 = 247, /* $@13 */
2947 YYSYMBOL_command_args = 248, /* command_args */
2948 YYSYMBOL_block_arg = 249, /* block_arg */
2949 YYSYMBOL_opt_block_arg = 250, /* opt_block_arg */
2950 YYSYMBOL_args = 251, /* args */
2951 YYSYMBOL_arg_splat = 252, /* arg_splat */
2952 YYSYMBOL_mrhs_arg = 253, /* mrhs_arg */
2953 YYSYMBOL_mrhs = 254, /* mrhs */
2954 YYSYMBOL_primary = 255, /* primary */
2955 YYSYMBOL_256_14 = 256, /* $@14 */
2956 YYSYMBOL_257_15 = 257, /* $@15 */
2957 YYSYMBOL_258_16 = 258, /* @16 */
2958 YYSYMBOL_259_17 = 259, /* @17 */
2959 YYSYMBOL_260_18 = 260, /* $@18 */
2960 YYSYMBOL_261_19 = 261, /* $@19 */
2961 YYSYMBOL_262_20 = 262, /* $@20 */
2962 YYSYMBOL_263_21 = 263, /* $@21 */
2963 YYSYMBOL_264_22 = 264, /* $@22 */
2964 YYSYMBOL_265_23 = 265, /* $@23 */
2965 YYSYMBOL_266_24 = 266, /* $@24 */
2966 YYSYMBOL_value_expr_primary = 267, /* value_expr_primary */
2967 YYSYMBOL_primary_value = 268, /* primary_value */
2968 YYSYMBOL_k_begin = 269, /* k_begin */
2969 YYSYMBOL_k_if = 270, /* k_if */
2970 YYSYMBOL_k_unless = 271, /* k_unless */
2971 YYSYMBOL_k_while = 272, /* k_while */
2972 YYSYMBOL_k_until = 273, /* k_until */
2973 YYSYMBOL_k_case = 274, /* k_case */
2974 YYSYMBOL_k_for = 275, /* k_for */
2975 YYSYMBOL_k_class = 276, /* k_class */
2976 YYSYMBOL_k_module = 277, /* k_module */
2977 YYSYMBOL_k_def = 278, /* k_def */
2978 YYSYMBOL_k_do = 279, /* k_do */
2979 YYSYMBOL_k_do_block = 280, /* k_do_block */
2980 YYSYMBOL_k_rescue = 281, /* k_rescue */
2981 YYSYMBOL_k_ensure = 282, /* k_ensure */
2982 YYSYMBOL_k_when = 283, /* k_when */
2983 YYSYMBOL_k_else = 284, /* k_else */
2984 YYSYMBOL_k_elsif = 285, /* k_elsif */
2985 YYSYMBOL_k_end = 286, /* k_end */
2986 YYSYMBOL_k_return = 287, /* k_return */
2987 YYSYMBOL_k_yield = 288, /* k_yield */
2988 YYSYMBOL_then = 289, /* then */
2989 YYSYMBOL_do = 290, /* do */
2990 YYSYMBOL_if_tail = 291, /* if_tail */
2991 YYSYMBOL_opt_else = 292, /* opt_else */
2992 YYSYMBOL_for_var = 293, /* for_var */
2993 YYSYMBOL_f_marg = 294, /* f_marg */
2994 YYSYMBOL_mlhs_items_f_marg = 295, /* mlhs_items_f_marg */
2995 YYSYMBOL_f_margs = 296, /* f_margs */
2996 YYSYMBOL_f_rest_marg = 297, /* f_rest_marg */
2997 YYSYMBOL_f_any_kwrest = 298, /* f_any_kwrest */
2998 YYSYMBOL_299_25 = 299, /* $@25 */
2999 YYSYMBOL_f_eq = 300, /* f_eq */
3000 YYSYMBOL_f_kw_primary_value = 301, /* f_kw_primary_value */
3001 YYSYMBOL_f_kwarg_primary_value = 302, /* f_kwarg_primary_value */
3002 YYSYMBOL_opt_f_block_arg_none = 303, /* opt_f_block_arg_none */
3003 YYSYMBOL_args_tail_basic_primary_value_none = 304, /* args_tail_basic_primary_value_none */
3004 YYSYMBOL_block_args_tail = 305, /* block_args_tail */
3005 YYSYMBOL_excessed_comma = 306, /* excessed_comma */
3006 YYSYMBOL_f_opt_primary_value = 307, /* f_opt_primary_value */
3007 YYSYMBOL_f_opt_arg_primary_value = 308, /* f_opt_arg_primary_value */
3008 YYSYMBOL_opt_args_tail_block_args_tail_none = 309, /* opt_args_tail_block_args_tail_none */
3009 YYSYMBOL_args_list_primary_value_opt_args_tail_block_args_tail_none = 310, /* args-list_primary_value_opt_args_tail_block_args_tail_none */
3010 YYSYMBOL_block_param = 311, /* block_param */
3011 YYSYMBOL_tail_only_args_block_args_tail = 312, /* tail-only-args_block_args_tail */
3012 YYSYMBOL_opt_block_param_def = 313, /* opt_block_param_def */
3013 YYSYMBOL_block_param_def = 314, /* block_param_def */
3014 YYSYMBOL_opt_block_param = 315, /* opt_block_param */
3015 YYSYMBOL_opt_bv_decl = 316, /* opt_bv_decl */
3016 YYSYMBOL_bv_decls = 317, /* bv_decls */
3017 YYSYMBOL_bvar = 318, /* bvar */
3018 YYSYMBOL_max_numparam = 319, /* max_numparam */
3019 YYSYMBOL_numparam = 320, /* numparam */
3020 YYSYMBOL_it_id = 321, /* it_id */
3021 YYSYMBOL_322_26 = 322, /* @26 */
3022 YYSYMBOL_323_27 = 323, /* $@27 */
3023 YYSYMBOL_lambda = 324, /* lambda */
3024 YYSYMBOL_f_larglist = 325, /* f_larglist */
3025 YYSYMBOL_lambda_body = 326, /* lambda_body */
3026 YYSYMBOL_327_28 = 327, /* $@28 */
3027 YYSYMBOL_do_block = 328, /* do_block */
3028 YYSYMBOL_block_call = 329, /* block_call */
3029 YYSYMBOL_method_call = 330, /* method_call */
3030 YYSYMBOL_brace_block = 331, /* brace_block */
3031 YYSYMBOL_332_29 = 332, /* @29 */
3032 YYSYMBOL_brace_body = 333, /* brace_body */
3033 YYSYMBOL_334_30 = 334, /* @30 */
3034 YYSYMBOL_do_body = 335, /* do_body */
3035 YYSYMBOL_case_args = 336, /* case_args */
3036 YYSYMBOL_case_body = 337, /* case_body */
3037 YYSYMBOL_cases = 338, /* cases */
3038 YYSYMBOL_p_pvtbl = 339, /* p_pvtbl */
3039 YYSYMBOL_p_pktbl = 340, /* p_pktbl */
3040 YYSYMBOL_p_in_kwarg = 341, /* p_in_kwarg */
3041 YYSYMBOL_342_31 = 342, /* $@31 */
3042 YYSYMBOL_p_case_body = 343, /* p_case_body */
3043 YYSYMBOL_p_cases = 344, /* p_cases */
3044 YYSYMBOL_p_top_expr = 345, /* p_top_expr */
3045 YYSYMBOL_p_top_expr_body = 346, /* p_top_expr_body */
3046 YYSYMBOL_p_expr = 347, /* p_expr */
3047 YYSYMBOL_p_as = 348, /* p_as */
3048 YYSYMBOL_349_32 = 349, /* $@32 */
3049 YYSYMBOL_p_alt = 350, /* p_alt */
3050 YYSYMBOL_p_lparen = 351, /* p_lparen */
3051 YYSYMBOL_p_lbracket = 352, /* p_lbracket */
3052 YYSYMBOL_p_expr_basic = 353, /* p_expr_basic */
3053 YYSYMBOL_354_33 = 354, /* $@33 */
3054 YYSYMBOL_p_args = 355, /* p_args */
3055 YYSYMBOL_p_args_head = 356, /* p_args_head */
3056 YYSYMBOL_p_args_tail = 357, /* p_args_tail */
3057 YYSYMBOL_p_find = 358, /* p_find */
3058 YYSYMBOL_p_rest = 359, /* p_rest */
3059 YYSYMBOL_p_args_post = 360, /* p_args_post */
3060 YYSYMBOL_p_arg = 361, /* p_arg */
3061 YYSYMBOL_p_kwargs = 362, /* p_kwargs */
3062 YYSYMBOL_p_kwarg = 363, /* p_kwarg */
3063 YYSYMBOL_p_kw = 364, /* p_kw */
3064 YYSYMBOL_p_kw_label = 365, /* p_kw_label */
3065 YYSYMBOL_p_kwrest = 366, /* p_kwrest */
3066 YYSYMBOL_p_kwnorest = 367, /* p_kwnorest */
3067 YYSYMBOL_p_any_kwrest = 368, /* p_any_kwrest */
3068 YYSYMBOL_p_value = 369, /* p_value */
3069 YYSYMBOL_range_expr_p_primitive = 370, /* range_expr_p_primitive */
3070 YYSYMBOL_p_primitive = 371, /* p_primitive */
3071 YYSYMBOL_p_variable = 372, /* p_variable */
3072 YYSYMBOL_p_var_ref = 373, /* p_var_ref */
3073 YYSYMBOL_p_expr_ref = 374, /* p_expr_ref */
3074 YYSYMBOL_p_const = 375, /* p_const */
3075 YYSYMBOL_opt_rescue = 376, /* opt_rescue */
3076 YYSYMBOL_exc_list = 377, /* exc_list */
3077 YYSYMBOL_exc_var = 378, /* exc_var */
3078 YYSYMBOL_opt_ensure = 379, /* opt_ensure */
3079 YYSYMBOL_literal = 380, /* literal */
3080 YYSYMBOL_strings = 381, /* strings */
3081 YYSYMBOL_string = 382, /* string */
3082 YYSYMBOL_string1 = 383, /* string1 */
3083 YYSYMBOL_xstring = 384, /* xstring */
3084 YYSYMBOL_regexp = 385, /* regexp */
3085 YYSYMBOL_nonempty_list__ = 386, /* nonempty_list_' ' */
3086 YYSYMBOL_words_tWORDS_BEG_word_list = 387, /* words_tWORDS_BEG_word_list */
3087 YYSYMBOL_words = 388, /* words */
3088 YYSYMBOL_word_list = 389, /* word_list */
3089 YYSYMBOL_word = 390, /* word */
3090 YYSYMBOL_words_tSYMBOLS_BEG_symbol_list = 391, /* words_tSYMBOLS_BEG_symbol_list */
3091 YYSYMBOL_symbols = 392, /* symbols */
3092 YYSYMBOL_symbol_list = 393, /* symbol_list */
3093 YYSYMBOL_words_tQWORDS_BEG_qword_list = 394, /* words_tQWORDS_BEG_qword_list */
3094 YYSYMBOL_qwords = 395, /* qwords */
3095 YYSYMBOL_words_tQSYMBOLS_BEG_qsym_list = 396, /* words_tQSYMBOLS_BEG_qsym_list */
3096 YYSYMBOL_qsymbols = 397, /* qsymbols */
3097 YYSYMBOL_qword_list = 398, /* qword_list */
3098 YYSYMBOL_qsym_list = 399, /* qsym_list */
3099 YYSYMBOL_string_contents = 400, /* string_contents */
3100 YYSYMBOL_xstring_contents = 401, /* xstring_contents */
3101 YYSYMBOL_regexp_contents = 402, /* regexp_contents */
3102 YYSYMBOL_string_content = 403, /* string_content */
3103 YYSYMBOL_404_34 = 404, /* @34 */
3104 YYSYMBOL_405_35 = 405, /* @35 */
3105 YYSYMBOL_406_36 = 406, /* @36 */
3106 YYSYMBOL_407_37 = 407, /* @37 */
3107 YYSYMBOL_string_dend = 408, /* string_dend */
3108 YYSYMBOL_string_dvar = 409, /* string_dvar */
3109 YYSYMBOL_symbol = 410, /* symbol */
3110 YYSYMBOL_ssym = 411, /* ssym */
3111 YYSYMBOL_sym = 412, /* sym */
3112 YYSYMBOL_dsym = 413, /* dsym */
3113 YYSYMBOL_numeric = 414, /* numeric */
3114 YYSYMBOL_simple_numeric = 415, /* simple_numeric */
3115 YYSYMBOL_nonlocal_var = 416, /* nonlocal_var */
3116 YYSYMBOL_user_variable = 417, /* user_variable */
3117 YYSYMBOL_keyword_variable = 418, /* keyword_variable */
3118 YYSYMBOL_var_ref = 419, /* var_ref */
3119 YYSYMBOL_var_lhs = 420, /* var_lhs */
3120 YYSYMBOL_backref = 421, /* backref */
3121 YYSYMBOL_422_38 = 422, /* $@38 */
3122 YYSYMBOL_superclass = 423, /* superclass */
3123 YYSYMBOL_f_opt_paren_args = 424, /* f_opt_paren_args */
3124 YYSYMBOL_f_empty_arg = 425, /* f_empty_arg */
3125 YYSYMBOL_f_paren_args = 426, /* f_paren_args */
3126 YYSYMBOL_f_arglist = 427, /* f_arglist */
3127 YYSYMBOL_428_39 = 428, /* @39 */
3128 YYSYMBOL_f_kw_arg_value = 429, /* f_kw_arg_value */
3129 YYSYMBOL_f_kwarg_arg_value = 430, /* f_kwarg_arg_value */
3130 YYSYMBOL_opt_f_block_arg_opt_comma = 431, /* opt_f_block_arg_opt_comma */
3131 YYSYMBOL_args_tail_basic_arg_value_opt_comma = 432, /* args_tail_basic_arg_value_opt_comma */
3132 YYSYMBOL_args_tail = 433, /* args_tail */
3133 YYSYMBOL_args_tail_basic_arg_value_none = 434, /* args_tail_basic_arg_value_none */
3134 YYSYMBOL_largs_tail = 435, /* largs_tail */
3135 YYSYMBOL_f_opt_arg_value = 436, /* f_opt_arg_value */
3136 YYSYMBOL_f_opt_arg_arg_value = 437, /* f_opt_arg_arg_value */
3137 YYSYMBOL_opt_args_tail_args_tail_opt_comma = 438, /* opt_args_tail_args_tail_opt_comma */
3138 YYSYMBOL_args_list_arg_value_opt_args_tail_args_tail_opt_comma = 439, /* args-list_arg_value_opt_args_tail_args_tail_opt_comma */
3139 YYSYMBOL_f_args_list_args_tail_opt_comma = 440, /* f_args-list_args_tail_opt_comma */
3140 YYSYMBOL_tail_only_args_args_tail = 441, /* tail-only-args_args_tail */
3141 YYSYMBOL_f_args = 442, /* f_args */
3142 YYSYMBOL_opt_args_tail_largs_tail_none = 443, /* opt_args_tail_largs_tail_none */
3143 YYSYMBOL_args_list_arg_value_opt_args_tail_largs_tail_none = 444, /* args-list_arg_value_opt_args_tail_largs_tail_none */
3144 YYSYMBOL_f_args_list_largs_tail_none = 445, /* f_args-list_largs_tail_none */
3145 YYSYMBOL_tail_only_args_largs_tail = 446, /* tail-only-args_largs_tail */
3146 YYSYMBOL_f_largs = 447, /* f_largs */
3147 YYSYMBOL_args_forward = 448, /* args_forward */
3148 YYSYMBOL_f_bad_arg = 449, /* f_bad_arg */
3149 YYSYMBOL_f_norm_arg = 450, /* f_norm_arg */
3150 YYSYMBOL_f_arg_asgn = 451, /* f_arg_asgn */
3151 YYSYMBOL_f_arg_item = 452, /* f_arg_item */
3152 YYSYMBOL_f_arg = 453, /* f_arg */
3153 YYSYMBOL_f_label = 454, /* f_label */
3154 YYSYMBOL_kwrest_mark = 455, /* kwrest_mark */
3155 YYSYMBOL_f_no_kwarg = 456, /* f_no_kwarg */
3156 YYSYMBOL_f_kwrest = 457, /* f_kwrest */
3157 YYSYMBOL_restarg_mark = 458, /* restarg_mark */
3158 YYSYMBOL_f_rest_arg = 459, /* f_rest_arg */
3159 YYSYMBOL_blkarg_mark = 460, /* blkarg_mark */
3160 YYSYMBOL_f_block_arg = 461, /* f_block_arg */
3161 YYSYMBOL_option__ = 462, /* option_',' */
3162 YYSYMBOL_opt_comma = 463, /* opt_comma */
3163 YYSYMBOL_value_expr_singleton_expr = 464, /* value_expr_singleton_expr */
3164 YYSYMBOL_singleton = 465, /* singleton */
3165 YYSYMBOL_singleton_expr = 466, /* singleton_expr */
3166 YYSYMBOL_467_40 = 467, /* $@40 */
3167 YYSYMBOL_assoc_list = 468, /* assoc_list */
3168 YYSYMBOL_assocs = 469, /* assocs */
3169 YYSYMBOL_assoc = 470, /* assoc */
3170 YYSYMBOL_operation2 = 471, /* operation2 */
3171 YYSYMBOL_operation3 = 472, /* operation3 */
3172 YYSYMBOL_dot_or_colon = 473, /* dot_or_colon */
3173 YYSYMBOL_call_op = 474, /* call_op */
3174 YYSYMBOL_call_op2 = 475, /* call_op2 */
3175 YYSYMBOL_rparen = 476, /* rparen */
3176 YYSYMBOL_rbracket = 477, /* rbracket */
3177 YYSYMBOL_rbrace = 478, /* rbrace */
3178 YYSYMBOL_trailer = 479, /* trailer */
3179 YYSYMBOL_term = 480, /* term */
3180 YYSYMBOL_terms = 481, /* terms */
3181 YYSYMBOL_none = 482 /* none */
3182};
3183typedef enum yysymbol_kind_t yysymbol_kind_t;
3184
3185
3186
3187
3188#ifdef short
3189# undef short
3190#endif
3191
3192/* On compilers that do not define __PTRDIFF_MAX__ etc., make sure
3193 <limits.h> and (if available) <stdint.h> are included
3194 so that the code can choose integer types of a good width. */
3195
3196#ifndef __PTRDIFF_MAX__
3197# include <limits.h> /* INFRINGES ON USER NAME SPACE */
3198# if defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__
3199# include <stdint.h> /* INFRINGES ON USER NAME SPACE */
3200# define YY_STDINT_H
3201# endif
3202#endif
3203
3204/* Narrow types that promote to a signed type and that can represent a
3205 signed or unsigned integer of at least N bits. In tables they can
3206 save space and decrease cache pressure. Promoting to a signed type
3207 helps avoid bugs in integer arithmetic. */
3208
3209#ifdef __INT_LEAST8_MAX__
3210typedef __INT_LEAST8_TYPE__ yytype_int8;
3211#elif defined YY_STDINT_H
3212typedef int_least8_t yytype_int8;
3213#else
3214typedef signed char yytype_int8;
3215#endif
3216
3217#ifdef __INT_LEAST16_MAX__
3218typedef __INT_LEAST16_TYPE__ yytype_int16;
3219#elif defined YY_STDINT_H
3220typedef int_least16_t yytype_int16;
3221#else
3222typedef short yytype_int16;
3223#endif
3224
3225/* Work around bug in HP-UX 11.23, which defines these macros
3226 incorrectly for preprocessor constants. This workaround can likely
3227 be removed in 2023, as HPE has promised support for HP-UX 11.23
3228 (aka HP-UX 11i v2) only through the end of 2022; see Table 2 of
3229 <https://h20195.www2.hpe.com/V2/getpdf.aspx/4AA4-7673ENW.pdf>. */
3230#ifdef __hpux
3231# undef UINT_LEAST8_MAX
3232# undef UINT_LEAST16_MAX
3233# define UINT_LEAST8_MAX 255
3234# define UINT_LEAST16_MAX 65535
3235#endif
3236
3237#if defined __UINT_LEAST8_MAX__ && __UINT_LEAST8_MAX__ <= __INT_MAX__
3238typedef __UINT_LEAST8_TYPE__ yytype_uint8;
3239#elif (!defined __UINT_LEAST8_MAX__ && defined YY_STDINT_H \
3240 && UINT_LEAST8_MAX <= INT_MAX)
3241typedef uint_least8_t yytype_uint8;
3242#elif !defined __UINT_LEAST8_MAX__ && UCHAR_MAX <= INT_MAX
3243typedef unsigned char yytype_uint8;
3244#else
3245typedef short yytype_uint8;
3246#endif
3247
3248#if defined __UINT_LEAST16_MAX__ && __UINT_LEAST16_MAX__ <= __INT_MAX__
3249typedef __UINT_LEAST16_TYPE__ yytype_uint16;
3250#elif (!defined __UINT_LEAST16_MAX__ && defined YY_STDINT_H \
3251 && UINT_LEAST16_MAX <= INT_MAX)
3252typedef uint_least16_t yytype_uint16;
3253#elif !defined __UINT_LEAST16_MAX__ && USHRT_MAX <= INT_MAX
3254typedef unsigned short yytype_uint16;
3255#else
3256typedef int yytype_uint16;
3257#endif
3258
3259#ifndef YYPTRDIFF_T
3260# if defined __PTRDIFF_TYPE__ && defined __PTRDIFF_MAX__
3261# define YYPTRDIFF_T __PTRDIFF_TYPE__
3262# define YYPTRDIFF_MAXIMUM __PTRDIFF_MAX__
3263# elif defined PTRDIFF_MAX
3264# ifndef ptrdiff_t
3265# include <stddef.h> /* INFRINGES ON USER NAME SPACE */
3266# endif
3267# define YYPTRDIFF_T ptrdiff_t
3268# define YYPTRDIFF_MAXIMUM PTRDIFF_MAX
3269# else
3270# define YYPTRDIFF_T long
3271# define YYPTRDIFF_MAXIMUM LONG_MAX
3272# endif
3273#endif
3274
3275#ifndef YYSIZE_T
3276# ifdef __SIZE_TYPE__
3277# define YYSIZE_T __SIZE_TYPE__
3278# elif defined size_t
3279# define YYSIZE_T size_t
3280# elif defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__
3281# include <stddef.h> /* INFRINGES ON USER NAME SPACE */
3282# define YYSIZE_T size_t
3283# else
3284# define YYSIZE_T unsigned
3285# endif
3286#endif
3287
3288#define YYSIZE_MAXIMUM \
3289 YY_CAST (YYPTRDIFF_T, \
3290 (YYPTRDIFF_MAXIMUM < YY_CAST (YYSIZE_T, -1) \
3291 ? YYPTRDIFF_MAXIMUM \
3292 : YY_CAST (YYSIZE_T, -1)))
3293
3294#define YYSIZEOF(X) YY_CAST (YYPTRDIFF_T, sizeof (X))
3295
3296
3297/* Stored state numbers (used for stacks). */
3298typedef yytype_int16 yy_state_t;
3299
3300/* State numbers in computations. */
3301typedef int yy_state_fast_t;
3302
3303#ifndef YY_
3304# if defined YYENABLE_NLS && YYENABLE_NLS
3305# if ENABLE_NLS
3306# include <libintl.h> /* INFRINGES ON USER NAME SPACE */
3307# define YY_(Msgid) dgettext ("bison-runtime", Msgid)
3308# endif
3309# endif
3310# ifndef YY_
3311# define YY_(Msgid) Msgid
3312# endif
3313#endif
3314
3315
3316#ifndef YY_ATTRIBUTE_PURE
3317# if defined __GNUC__ && 2 < __GNUC__ + (96 <= __GNUC_MINOR__)
3318# define YY_ATTRIBUTE_PURE __attribute__ ((__pure__))
3319# else
3320# define YY_ATTRIBUTE_PURE
3321# endif
3322#endif
3323
3324#ifndef YY_ATTRIBUTE_UNUSED
3325# if defined __GNUC__ && 2 < __GNUC__ + (7 <= __GNUC_MINOR__)
3326# define YY_ATTRIBUTE_UNUSED __attribute__ ((__unused__))
3327# else
3328# define YY_ATTRIBUTE_UNUSED
3329# endif
3330#endif
3331
3332/* Suppress unused-variable warnings by "using" E. */
3333#if ! defined lint || defined __GNUC__
3334# define YY_USE(E) ((void) (E))
3335#else
3336# define YY_USE(E) /* empty */
3337#endif
3338
3339/* Suppress an incorrect diagnostic about yylval being uninitialized. */
3340#if defined __GNUC__ && ! defined __ICC && 406 <= __GNUC__ * 100 + __GNUC_MINOR__
3341# if __GNUC__ * 100 + __GNUC_MINOR__ < 407
3342# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \
3343 _Pragma ("GCC diagnostic push") \
3344 _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")
3345# else
3346# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \
3347 _Pragma ("GCC diagnostic push") \
3348 _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"") \
3349 _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
3350# endif
3351# define YY_IGNORE_MAYBE_UNINITIALIZED_END \
3352 _Pragma ("GCC diagnostic pop")
3353#else
3354# define YY_INITIAL_VALUE(Value) Value
3355#endif
3356#ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
3357# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
3358# define YY_IGNORE_MAYBE_UNINITIALIZED_END
3359#endif
3360#ifndef YY_INITIAL_VALUE
3361# define YY_INITIAL_VALUE(Value) /* Nothing. */
3362#endif
3363
3364#if defined __cplusplus && defined __GNUC__ && ! defined __ICC && 6 <= __GNUC__
3365# define YY_IGNORE_USELESS_CAST_BEGIN \
3366 _Pragma ("GCC diagnostic push") \
3367 _Pragma ("GCC diagnostic ignored \"-Wuseless-cast\"")
3368# define YY_IGNORE_USELESS_CAST_END \
3369 _Pragma ("GCC diagnostic pop")
3370#endif
3371#ifndef YY_IGNORE_USELESS_CAST_BEGIN
3372# define YY_IGNORE_USELESS_CAST_BEGIN
3373# define YY_IGNORE_USELESS_CAST_END
3374#endif
3375
3376
3377#define YY_ASSERT(E) ((void) (0 && (E)))
3378
3379#if 1
3380
3381/* The parser invokes alloca or malloc; define the necessary symbols. */
3382
3383# ifdef YYSTACK_USE_ALLOCA
3384# if YYSTACK_USE_ALLOCA
3385# ifdef __GNUC__
3386# define YYSTACK_ALLOC __builtin_alloca
3387# elif defined __BUILTIN_VA_ARG_INCR
3388# include <alloca.h> /* INFRINGES ON USER NAME SPACE */
3389# elif defined _AIX
3390# define YYSTACK_ALLOC __alloca
3391# elif defined _MSC_VER
3392# include <malloc.h> /* INFRINGES ON USER NAME SPACE */
3393# define alloca _alloca
3394# else
3395# define YYSTACK_ALLOC alloca
3396# if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS
3397# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
3398 /* Use EXIT_SUCCESS as a witness for stdlib.h. */
3399# ifndef EXIT_SUCCESS
3400# define EXIT_SUCCESS 0
3401# endif
3402# endif
3403# endif
3404# endif
3405# endif
3406
3407# ifdef YYSTACK_ALLOC
3408 /* Pacify GCC's 'empty if-body' warning. */
3409# define YYSTACK_FREE(Ptr) do { /* empty */; } while (0)
3410# ifndef YYSTACK_ALLOC_MAXIMUM
3411 /* The OS might guarantee only one guard page at the bottom of the stack,
3412 and a page size can be as small as 4096 bytes. So we cannot safely
3413 invoke alloca (N) if N exceeds 4096. Use a slightly smaller number
3414 to allow for a few compiler-allocated temporary stack slots. */
3415# define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
3416# endif
3417# else
3418# define YYSTACK_ALLOC YYMALLOC
3419# define YYSTACK_FREE YYFREE
3420# ifndef YYSTACK_ALLOC_MAXIMUM
3421# define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
3422# endif
3423# if (defined __cplusplus && ! defined EXIT_SUCCESS \
3424 && ! ((defined YYMALLOC || defined malloc) \
3425 && (defined YYFREE || defined free)))
3426# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
3427# ifndef EXIT_SUCCESS
3428# define EXIT_SUCCESS 0
3429# endif
3430# endif
3431# ifndef YYMALLOC
3432# define YYMALLOC malloc
3433# if ! defined malloc && ! defined EXIT_SUCCESS
3434void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
3435# endif
3436# endif
3437# ifndef YYFREE
3438# define YYFREE free
3439# if ! defined free && ! defined EXIT_SUCCESS
3440void free (void *); /* INFRINGES ON USER NAME SPACE */
3441# endif
3442# endif
3443# endif
3444#endif /* 1 */
3445
3446#if (! defined yyoverflow \
3447 && (! defined __cplusplus \
3448 || (defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL \
3449 && defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
3450
3451/* A type that is properly aligned for any stack member. */
3452union yyalloc
3453{
3454 yy_state_t yyss_alloc;
3455 YYSTYPE yyvs_alloc;
3456 YYLTYPE yyls_alloc;
3457};
3458
3459/* The size of the maximum gap between one aligned stack and the next. */
3460# define YYSTACK_GAP_MAXIMUM (YYSIZEOF (union yyalloc) - 1)
3461
3462/* The size of an array large to enough to hold all stacks, each with
3463 N elements. */
3464# define YYSTACK_BYTES(N) \
3465 ((N) * (YYSIZEOF (yy_state_t) + YYSIZEOF (YYSTYPE) \
3466 + YYSIZEOF (YYLTYPE)) \
3467 + 2 * YYSTACK_GAP_MAXIMUM)
3468
3469# define YYCOPY_NEEDED 1
3470
3471/* Relocate STACK from its old location to the new one. The
3472 local variables YYSIZE and YYSTACKSIZE give the old and new number of
3473 elements in the stack, and YYPTR gives the new location of the
3474 stack. Advance YYPTR to a properly aligned location for the next
3475 stack. */
3476# define YYSTACK_RELOCATE(Stack_alloc, Stack) \
3477 do \
3478 { \
3479 YYPTRDIFF_T yynewbytes; \
3480 YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
3481 Stack = &yyptr->Stack_alloc; \
3482 yynewbytes = yystacksize * YYSIZEOF (*Stack) + YYSTACK_GAP_MAXIMUM; \
3483 yyptr += yynewbytes / YYSIZEOF (*yyptr); \
3484 } \
3485 while (0)
3486
3487#endif
3488
3489#if defined YYCOPY_NEEDED && YYCOPY_NEEDED
3490/* Copy COUNT objects from SRC to DST. The source and destination do
3491 not overlap. */
3492# ifndef YYCOPY
3493# if defined __GNUC__ && 1 < __GNUC__
3494# define YYCOPY(Dst, Src, Count) \
3495 __builtin_memcpy (Dst, Src, YY_CAST (YYSIZE_T, (Count)) * sizeof (*(Src)))
3496# else
3497# define YYCOPY(Dst, Src, Count) \
3498 do \
3499 { \
3500 YYPTRDIFF_T yyi; \
3501 for (yyi = 0; yyi < (Count); yyi++) \
3502 (Dst)[yyi] = (Src)[yyi]; \
3503 } \
3504 while (0)
3505# endif
3506# endif
3507#endif /* !YYCOPY_NEEDED */
3508
3509/* YYFINAL -- State number of the termination state. */
3510#define YYFINAL 143
3511/* YYLAST -- Last index in YYTABLE. */
3512#define YYLAST 16671
3513
3514/* YYNTOKENS -- Number of terminals. */
3515#define YYNTOKENS 162
3516/* YYNNTS -- Number of nonterminals. */
3517#define YYNNTS 321
3518/* YYNRULES -- Number of rules. */
3519#define YYNRULES 853
3520/* YYNSTATES -- Number of states. */
3521#define YYNSTATES 1442
3522
3523/* YYMAXUTOK -- Last valid token kind. */
3524#define YYMAXUTOK 361
3525
3526
3527/* YYTRANSLATE(TOKEN-NUM) -- Symbol number corresponding to TOKEN-NUM
3528 as returned by yylex, with out-of-bounds checking. */
3529#define YYTRANSLATE(YYX) \
3530 (0 <= (YYX) && (YYX) <= YYMAXUTOK \
3531 ? YY_CAST (yysymbol_kind_t, yytranslate[YYX]) \
3532 : YYSYMBOL_YYUNDEF)
3533
3534/* YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM
3535 as returned by yylex. */
3536static const yytype_uint8 yytranslate[] =
3537{
3538 0, 2, 2, 2, 2, 2, 2, 2, 2, 72,
3539 154, 75, 73, 74, 2, 2, 2, 2, 2, 2,
3540 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
3541 2, 2, 161, 148, 2, 2, 2, 146, 141, 2,
3542 157, 158, 144, 142, 155, 143, 69, 145, 2, 2,
3543 2, 2, 2, 2, 2, 2, 2, 2, 136, 160,
3544 138, 134, 137, 135, 2, 2, 2, 2, 2, 2,
3545 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
3546 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
3547 2, 153, 70, 159, 140, 2, 156, 2, 2, 2,
3548 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
3549 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
3550 2, 2, 2, 151, 139, 152, 149, 2, 89, 90,
3551 91, 92, 76, 77, 78, 79, 95, 96, 84, 83,
3552 80, 81, 82, 87, 88, 93, 94, 98, 85, 86,
3553 97, 2, 2, 2, 2, 2, 2, 2, 2, 2,
3554 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
3555 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
3556 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
3557 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
3558 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
3559 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
3560 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
3561 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
3562 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
3563 2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
3564 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
3565 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
3566 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
3567 35, 36, 37, 38, 39, 40, 41, 42, 43, 44,
3568 45, 46, 47, 48, 49, 50, 51, 52, 53, 54,
3569 55, 56, 57, 58, 59, 60, 61, 62, 63, 64,
3570 65, 66, 67, 68, 71, 99, 100, 101, 102, 103,
3571 104, 105, 106, 107, 108, 109, 110, 111, 112, 113,
3572 114, 115, 116, 117, 118, 119, 120, 121, 122, 123,
3573 124, 125, 126, 127, 128, 129, 130, 131, 132, 133,
3574 147, 150
3575};
3576
3577#if YYDEBUG
3578/* YYRLINE[YYN] -- Source line where rule number YYN was defined. */
3579static const yytype_int16 yyrline[] =
3580{
3581 0, 3176, 3170, 3176, 3176, 3176, 3176, 3196, 3201, 3206,
3582 3213, 3218, 3225, 3227, 3245, 3241, 3246, 3245, 3257, 3254,
3583 3267, 3272, 3277, 3284, 3286, 3285, 3295, 3297, 3304, 3304,
3584 3309, 3314, 3322, 3331, 3338, 3344, 3350, 3361, 3372, 3381,
3585 3395, 3396, 3401, 3401, 3402, 3413, 3418, 3419, 3426, 3426,
3586 3427, 3427, 3427, 3427, 3427, 3427, 3427, 3427, 3427, 3428,
3587 3428, 3428, 3431, 3432, 3438, 3438, 3438, 3445, 3446, 3453,
3588 3456, 3457, 3462, 3467, 3472, 3478, 3477, 3493, 3492, 3507,
3589 3510, 3521, 3531, 3530, 3544, 3544, 3545, 3551, 3551, 3551,
3590 3558, 3559, 3562, 3562, 3565, 3566, 3573, 3581, 3581, 3581,
3591 3588, 3595, 3604, 3609, 3614, 3619, 3624, 3630, 3636, 3642,
3592 3647, 3654, 3663, 3664, 3671, 3672, 3679, 3684, 3689, 3694,
3593 3694, 3694, 3699, 3704, 3709, 3714, 3719, 3724, 3731, 3732,
3594 3739, 3744, 3752, 3752, 3757, 3762, 3762, 3768, 3773, 3778,
3595 3783, 3791, 3791, 3796, 3801, 3801, 3806, 3811, 3816, 3821,
3596 3829, 3837, 3840, 3845, 3850, 3857, 3857, 3857, 3858, 3863,
3597 3866, 3871, 3874, 3879, 3879, 3887, 3888, 3889, 3890, 3891,
3598 3892, 3893, 3894, 3895, 3896, 3897, 3898, 3899, 3900, 3901,
3599 3902, 3903, 3904, 3905, 3906, 3907, 3908, 3909, 3910, 3911,
3600 3912, 3913, 3914, 3915, 3916, 3919, 3919, 3919, 3920, 3920,
3601 3921, 3921, 3921, 3922, 3922, 3922, 3922, 3923, 3923, 3923,
3602 3923, 3924, 3924, 3924, 3925, 3925, 3925, 3925, 3926, 3926,
3603 3926, 3926, 3927, 3927, 3927, 3927, 3928, 3928, 3928, 3928,
3604 3929, 3929, 3929, 3929, 3930, 3930, 3933, 3933, 3934, 3934,
3605 3934, 3934, 3934, 3934, 3934, 3934, 3934, 3935, 3935, 3935,
3606 3935, 3935, 3935, 3935, 3936, 3941, 3946, 3951, 3956, 3961,
3607 3966, 3971, 3976, 3981, 3986, 3991, 3996, 4001, 4002, 4007,
3608 4012, 4017, 4022, 4027, 4032, 4037, 4042, 4047, 4052, 4057,
3609 4064, 4064, 4064, 4065, 4066, 4069, 4078, 4079, 4085, 4092,
3610 4093, 4094, 4095, 4098, 4103, 4111, 4117, 4124, 4131, 4131,
3611 4134, 4135, 4136, 4141, 4148, 4153, 4162, 4167, 4177, 4189,
3612 4190, 4196, 4197, 4198, 4199, 4204, 4211, 4211, 4216, 4221,
3613 4226, 4232, 4238, 4242, 4242, 4280, 4285, 4293, 4298, 4306,
3614 4311, 4316, 4321, 4329, 4334, 4343, 4344, 4348, 4353, 4358,
3615 4376, 4376, 4376, 4376, 4376, 4376, 4376, 4376, 4377, 4378,
3616 4379, 4385, 4384, 4397, 4397, 4403, 4409, 4414, 4419, 4424,
3617 4430, 4435, 4440, 4445, 4450, 4457, 4462, 4467, 4472, 4473,
3618 4479, 4481, 4493, 4502, 4511, 4520, 4519, 4534, 4533, 4546,
3619 4554, 4554, 4555, 4599, 4598, 4621, 4620, 4640, 4639, 4658,
3620 4656, 4673, 4671, 4686, 4691, 4696, 4701, 4716, 4716, 4719,
3621 4726, 4744, 4751, 4759, 4767, 4774, 4782, 4791, 4800, 4808,
3622 4815, 4822, 4830, 4837, 4843, 4858, 4865, 4870, 4876, 4883,
3623 4890, 4891, 4892, 4895, 4896, 4899, 4901, 4910, 4911, 4918,
3624 4919, 4922, 4927, 4935, 4935, 4935, 4940, 4945, 4950, 4955,
3625 4962, 4968, 4975, 4976, 4983, 4983, 4985, 4985, 4985, 4985,
3626 4985, 4985, 4985, 4985, 4985, 4985, 4985, 4988, 4996, 4996,
3627 4996, 4996, 4996, 4996, 4996, 4996, 4996, 4996, 4996, 4996,
3628 4996, 4996, 4996, 4996, 4996, 4996, 4997, 5003, 5008, 5008,
3629 5011, 5012, 5018, 5028, 5032, 5035, 5040, 5047, 5049, 5053,
3630 5058, 5061, 5067, 5072, 5079, 5085, 5078, 5112, 5119, 5128,
3631 5135, 5134, 5145, 5153, 5165, 5175, 5181, 5186, 5194, 5201,
3632 5212, 5218, 5223, 5229, 5239, 5244, 5252, 5258, 5266, 5268,
3633 5283, 5283, 5304, 5310, 5315, 5321, 5329, 5338, 5339, 5342,
3634 5343, 5345, 5358, 5365, 5373, 5374, 5377, 5378, 5384, 5392,
3635 5393, 5399, 5405, 5410, 5415, 5422, 5425, 5432, 5436, 5435,
3636 5448, 5451, 5458, 5465, 5466, 5467, 5474, 5481, 5488, 5494,
3637 5501, 5508, 5515, 5521, 5526, 5531, 5538, 5537, 5548, 5554,
3638 5562, 5568, 5573, 5578, 5583, 5588, 5591, 5592, 5599, 5604,
3639 5611, 5619, 5625, 5632, 5633, 5640, 5647, 5652, 5657, 5662,
3640 5669, 5671, 5678, 5684, 5696, 5697, 5712, 5717, 5724, 5730,
3641 5731, 5738, 5739, 5739, 5739, 5739, 5739, 5739, 5739, 5740,
3642 5741, 5742, 5745, 5745, 5745, 5745, 5745, 5745, 5745, 5745,
3643 5746, 5751, 5754, 5762, 5774, 5781, 5788, 5793, 5798, 5806,
3644 5826, 5829, 5834, 5838, 5841, 5846, 5849, 5856, 5859, 5860,
3645 5863, 5875, 5876, 5877, 5884, 5897, 5909, 5916, 5916, 5916,
3646 5916, 5920, 5924, 5931, 5933, 5940, 5940, 5944, 5948, 5955,
3647 5955, 5958, 5958, 5962, 5966, 5974, 5978, 5986, 5990, 5998,
3648 6002, 6010, 6014, 6040, 6043, 6042, 6057, 6065, 6069, 6073,
3649 6088, 6089, 6092, 6097, 6100, 6101, 6104, 6120, 6121, 6124,
3650 6132, 6133, 6141, 6142, 6143, 6144, 6147, 6148, 6149, 6152,
3651 6152, 6153, 6156, 6157, 6158, 6159, 6160, 6161, 6162, 6165,
3652 6175, 6182, 6182, 6189, 6190, 6194, 6193, 6203, 6206, 6207,
3653 6214, 6221, 6231, 6232, 6232, 6249, 6249, 6249, 6249, 6249,
3654 6249, 6249, 6249, 6249, 6249, 6249, 6250, 6259, 6259, 6259,
3655 6259, 6259, 6260, 6351, 6351, 6351, 6351, 6351, 6351, 6351,
3656 6351, 6351, 6351, 6351, 6351, 6351, 6351, 6351, 6351, 6351,
3657 6351, 6351, 6351, 6351, 6351, 6351, 6354, 6354, 6354, 6354,
3658 6354, 6354, 6354, 6354, 6354, 6354, 6354, 6354, 6354, 6354,
3659 6354, 6354, 6354, 6354, 6354, 6354, 6357, 6364, 6373, 6382,
3660 6391, 6402, 6403, 6413, 6420, 6425, 6444, 6446, 6457, 6477,
3661 6478, 6481, 6487, 6493, 6501, 6502, 6505, 6511, 6519, 6520,
3662 6523, 6529, 6534, 6542, 6542, 6542, 6550, 6550, 6580, 6582,
3663 6581, 6594, 6595, 6602, 6604, 6629, 6634, 6639, 6646, 6652,
3664 6657, 6670, 6670, 6670, 6671, 6674, 6675, 6676, 6679, 6680,
3665 6683, 6684, 6687, 6688, 6691, 6694, 6697, 6700, 6701, 6704,
3666 6712, 6719, 6720, 6724
3667};
3668#endif
3669
3671#define YY_ACCESSING_SYMBOL(State) YY_CAST (yysymbol_kind_t, yystos[State])
3672
3673#if 1
3674/* The user-facing name of the symbol whose (internal) number is
3675 YYSYMBOL. No bounds checking. */
3676static const char *yysymbol_name (yysymbol_kind_t yysymbol) YY_ATTRIBUTE_UNUSED;
3677
3678/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
3679 First, the terminals, then, starting at YYNTOKENS, nonterminals. */
3680static const char *const yytname[] =
3681{
3682 "\"end-of-input\"", "error", "\"invalid token\"", "\"'class'\"",
3683 "\"'module'\"", "\"'def'\"", "\"'undef'\"", "\"'begin'\"",
3684 "\"'rescue'\"", "\"'ensure'\"", "\"'end'\"", "\"'if'\"", "\"'unless'\"",
3685 "\"'then'\"", "\"'elsif'\"", "\"'else'\"", "\"'case'\"", "\"'when'\"",
3686 "\"'while'\"", "\"'until'\"", "\"'for'\"", "\"'break'\"", "\"'next'\"",
3687 "\"'redo'\"", "\"'retry'\"", "\"'in'\"", "\"'do'\"",
3688 "\"'do' for condition\"", "\"'do' for block\"", "\"'do' for lambda\"",
3689 "\"'return'\"", "\"'yield'\"", "\"'super'\"", "\"'self'\"", "\"'nil'\"",
3690 "\"'true'\"", "\"'false'\"", "\"'and'\"", "\"'or'\"", "\"'not'\"",
3691 "\"'if' modifier\"", "\"'unless' modifier\"", "\"'while' modifier\"",
3692 "\"'until' modifier\"", "\"'rescue' modifier\"", "\"'alias'\"",
3693 "\"'defined?'\"", "\"'BEGIN'\"", "\"'END'\"", "\"'__LINE__'\"",
3694 "\"'__FILE__'\"", "\"'__ENCODING__'\"", "\"local variable or method\"",
3695 "\"method\"", "\"global variable\"", "\"instance variable\"",
3696 "\"constant\"", "\"class variable\"", "\"label\"", "\"integer literal\"",
3697 "\"float literal\"", "\"rational literal\"", "\"imaginary literal\"",
3698 "\"char literal\"", "\"numbered reference\"", "\"back reference\"",
3699 "\"literal content\"", "tREGEXP_END", "\"dummy end\"", "'.'",
3700 "\"backslash\"", "\"escaped space\"", "\"escaped horizontal tab\"",
3701 "\"escaped form feed\"", "\"escaped carriage return\"",
3702 "\"escaped vertical tab\"", "\"unary+\"", "\"unary-\"", "\"**\"",
3703 "\"<=>\"", "\"==\"", "\"===\"", "\"!=\"", "\">=\"", "\"<=\"", "\"&&\"",
3704 "\"||\"", "\"=~\"", "\"!~\"", "\"..\"", "\"...\"", "\"(..\"", "\"(...\"",
3705 "\"[]\"", "\"[]=\"", "\"<<\"", "\">>\"", "\"&.\"", "\"::\"",
3706 "\":: at EXPR_BEG\"", "\"operator-assignment\"", "\"=>\"", "\"(\"",
3707 "\"( arg\"", "\"[\"", "\"{\"", "\"{ arg\"", "\"*\"", "\"**arg\"",
3708 "\"&\"", "\"->\"", "\"symbol literal\"", "\"string literal\"",
3709 "\"backtick literal\"", "\"regexp literal\"", "\"word list\"",
3710 "\"verbatim word list\"", "\"symbol list\"", "\"verbatim symbol list\"",
3711 "\"terminator\"", "\"'}'\"", "\"'#{'\"", "tSTRING_DVAR", "tLAMBEG",
3712 "tLABEL_END", "tIGNORED_NL", "tCOMMENT", "tEMBDOC_BEG", "tEMBDOC",
3713 "tEMBDOC_END", "tHEREDOC_BEG", "tHEREDOC_END", "k__END__", "tLOWEST",
3714 "'='", "'?'", "':'", "'>'", "'<'", "'|'", "'^'", "'&'", "'+'", "'-'",
3715 "'*'", "'/'", "'%'", "tUMINUS_NUM", "'!'", "'~'", "tLAST_TOKEN", "'{'",
3716 "'}'", "'['", "'\\n'", "','", "'`'", "'('", "')'", "']'", "';'", "' '",
3717 "$accept", "option_terms", "compstmt_top_stmts", "$@1", "program",
3718 "top_stmts", "top_stmt", "block_open", "begin_block", "compstmt_stmts",
3719 "$@2", "$@3", "bodystmt", "$@4", "stmts", "stmt_or_begin", "$@5",
3720 "allow_exits", "k_END", "$@6", "stmt", "asgn_mrhs", "asgn_command_rhs",
3721 "command_asgn", "op_asgn_command_rhs",
3722 "def_endless_method_endless_command", "endless_command", "option_'\\n'",
3723 "command_rhs", "expr", "$@7", "$@8", "def_name", "defn_head", "$@9",
3724 "defs_head", "value_expr_expr", "expr_value", "$@10", "$@11",
3725 "expr_value_do", "command_call", "value_expr_command_call",
3726 "command_call_value", "block_command", "cmd_brace_block", "fcall",
3727 "command", "mlhs", "mlhs_inner", "mlhs_basic", "mlhs_items_mlhs_item",
3728 "mlhs_item", "mlhs_head", "mlhs_node", "lhs", "cname", "cpath", "fname",
3729 "fitem", "undef_list", "$@12", "op", "reswords", "asgn_arg_rhs", "arg",
3730 "op_asgn_arg_rhs", "range_expr_arg", "def_endless_method_endless_arg",
3731 "ternary", "endless_arg", "relop", "rel_expr", "lex_ctxt",
3732 "begin_defined", "after_rescue", "value_expr_arg", "arg_value",
3733 "aref_args", "arg_rhs", "paren_args", "opt_paren_args", "opt_call_args",
3734 "value_expr_command", "call_args", "$@13", "command_args", "block_arg",
3735 "opt_block_arg", "args", "arg_splat", "mrhs_arg", "mrhs", "primary",
3736 "$@14", "$@15", "@16", "@17", "$@18", "$@19", "$@20", "$@21", "$@22",
3737 "$@23", "$@24", "value_expr_primary", "primary_value", "k_begin", "k_if",
3738 "k_unless", "k_while", "k_until", "k_case", "k_for", "k_class",
3739 "k_module", "k_def", "k_do", "k_do_block", "k_rescue", "k_ensure",
3740 "k_when", "k_else", "k_elsif", "k_end", "k_return", "k_yield", "then",
3741 "do", "if_tail", "opt_else", "for_var", "f_marg", "mlhs_items_f_marg",
3742 "f_margs", "f_rest_marg", "f_any_kwrest", "$@25", "f_eq",
3743 "f_kw_primary_value", "f_kwarg_primary_value", "opt_f_block_arg_none",
3744 "args_tail_basic_primary_value_none", "block_args_tail",
3745 "excessed_comma", "f_opt_primary_value", "f_opt_arg_primary_value",
3746 "opt_args_tail_block_args_tail_none",
3747 "args-list_primary_value_opt_args_tail_block_args_tail_none",
3748 "block_param", "tail-only-args_block_args_tail", "opt_block_param_def",
3749 "block_param_def", "opt_block_param", "opt_bv_decl", "bv_decls", "bvar",
3750 "max_numparam", "numparam", "it_id", "@26", "$@27", "lambda",
3751 "f_larglist", "lambda_body", "$@28", "do_block", "block_call",
3752 "method_call", "brace_block", "@29", "brace_body", "@30", "do_body",
3753 "case_args", "case_body", "cases", "p_pvtbl", "p_pktbl", "p_in_kwarg",
3754 "$@31", "p_case_body", "p_cases", "p_top_expr", "p_top_expr_body",
3755 "p_expr", "p_as", "$@32", "p_alt", "p_lparen", "p_lbracket",
3756 "p_expr_basic", "$@33", "p_args", "p_args_head", "p_args_tail", "p_find",
3757 "p_rest", "p_args_post", "p_arg", "p_kwargs", "p_kwarg", "p_kw",
3758 "p_kw_label", "p_kwrest", "p_kwnorest", "p_any_kwrest", "p_value",
3759 "range_expr_p_primitive", "p_primitive", "p_variable", "p_var_ref",
3760 "p_expr_ref", "p_const", "opt_rescue", "exc_list", "exc_var",
3761 "opt_ensure", "literal", "strings", "string", "string1", "xstring",
3762 "regexp", "nonempty_list_' '", "words_tWORDS_BEG_word_list", "words",
3763 "word_list", "word", "words_tSYMBOLS_BEG_symbol_list", "symbols",
3764 "symbol_list", "words_tQWORDS_BEG_qword_list", "qwords",
3765 "words_tQSYMBOLS_BEG_qsym_list", "qsymbols", "qword_list", "qsym_list",
3766 "string_contents", "xstring_contents", "regexp_contents",
3767 "string_content", "@34", "@35", "@36", "@37", "string_dend",
3768 "string_dvar", "symbol", "ssym", "sym", "dsym", "numeric",
3769 "simple_numeric", "nonlocal_var", "user_variable", "keyword_variable",
3770 "var_ref", "var_lhs", "backref", "$@38", "superclass",
3771 "f_opt_paren_args", "f_empty_arg", "f_paren_args", "f_arglist", "@39",
3772 "f_kw_arg_value", "f_kwarg_arg_value", "opt_f_block_arg_opt_comma",
3773 "args_tail_basic_arg_value_opt_comma", "args_tail",
3774 "args_tail_basic_arg_value_none", "largs_tail", "f_opt_arg_value",
3775 "f_opt_arg_arg_value", "opt_args_tail_args_tail_opt_comma",
3776 "args-list_arg_value_opt_args_tail_args_tail_opt_comma",
3777 "f_args-list_args_tail_opt_comma", "tail-only-args_args_tail", "f_args",
3778 "opt_args_tail_largs_tail_none",
3779 "args-list_arg_value_opt_args_tail_largs_tail_none",
3780 "f_args-list_largs_tail_none", "tail-only-args_largs_tail", "f_largs",
3781 "args_forward", "f_bad_arg", "f_norm_arg", "f_arg_asgn", "f_arg_item",
3782 "f_arg", "f_label", "kwrest_mark", "f_no_kwarg", "f_kwrest",
3783 "restarg_mark", "f_rest_arg", "blkarg_mark", "f_block_arg", "option_','",
3784 "opt_comma", "value_expr_singleton_expr", "singleton", "singleton_expr",
3785 "$@40", "assoc_list", "assocs", "assoc", "operation2", "operation3",
3786 "dot_or_colon", "call_op", "call_op2", "rparen", "rbracket", "rbrace",
3787 "trailer", "term", "terms", "none", YY_NULLPTR
3788};
3789
3790static const char *
3791yysymbol_name (yysymbol_kind_t yysymbol)
3792{
3793 return yytname[yysymbol];
3794}
3795#endif
3796
3797#define YYPACT_NINF (-1205)
3798
3799#define yypact_value_is_default(Yyn) \
3800 ((Yyn) == YYPACT_NINF)
3801
3802#define YYTABLE_NINF (-854)
3803
3804#define yytable_value_is_error(Yyn) \
3805 ((Yyn) == YYTABLE_NINF)
3806
3807/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
3808 STATE-NUM. */
3809static const yytype_int16 yypact[] =
3810{
3811 -1205, 6086, 176, -1205, -1205, -1205, -1205, 10857, -1205, -1205,
3812 -1205, -1205, -1205, -1205, -1205, 11912, 11912, -1205, -1205, -1205,
3813 -1205, 7146, -1205, -1205, -1205, -1205, 590, 10703, 112, 91,
3814 -1205, -1205, -1205, -1205, 6522, 7302, -1205, -1205, 6678, -1205,
3815 -1205, -1205, -1205, -1205, -1205, -1205, -1205, 13472, 13472, 13472,
3816 13472, 257, 9616, 9774, 12392, 12632, 11158, -1205, 10549, -1205,
3817 -1205, -1205, 175, 175, 175, 175, 1157, 13592, 13472, -1205,
3818 678, -1205, -1205, 1296, -1205, -1205, -1205, -1205, -1205, 859,
3819 41, 41, -1205, -1205, 98, 372, 302, -1205, 292, 14192,
3820 -1205, 339, -1205, 3555, -1205, -1205, -1205, -1205, 627, 111,
3821 -1205, 574, -1205, 11792, 11792, -1205, -1205, 10236, 14310, 14428,
3822 14546, 10394, 11912, 7770, -1205, 88, 168, -1205, -1205, 368,
3823 -1205, -1205, -1205, -1205, -1205, -1205, -1205, -1205, -1205, -1205,
3824 -1205, -1205, -1205, -1205, -1205, -1205, -1205, 67, 344, -1205,
3825 413, 398, -1205, -1205, -1205, -1205, -1205, -1205, -1205, -1205,
3826 -1205, -1205, -1205, -1205, -1205, -1205, -1205, -1205, -1205, -1205,
3827 -1205, -1205, -1205, -1205, -1205, -1205, -1205, -1205, -1205, -1205,
3828 -1205, -1205, -1205, -1205, -1205, -1205, -1205, -1205, -1205, -1205,
3829 -1205, -1205, -1205, -1205, -1205, -1205, -1205, -1205, -1205, -1205,
3830 -1205, -1205, -1205, -1205, -1205, -1205, -1205, -1205, -1205, -1205,
3831 -1205, -1205, -1205, -1205, -1205, -1205, -1205, -1205, -1205, -1205,
3832 -1205, -1205, -1205, -1205, -1205, -1205, -1205, -1205, -1205, -1205,
3833 470, -1205, -1205, -1205, -1205, -1205, -1205, 498, 13472, 358,
3834 9774, 13472, 13472, 13472, -1205, 13472, -1205, -1205, 553, 6336,
3835 -1205, 629, -1205, -1205, -1205, 577, -1205, 712, 56, 59,
3836 645, 62, 615, -1205, -1205, 12032, -1205, 11912, -1205, -1205,
3837 11533, 13712, 106, -1205, 618, -1205, 9932, -1205, -1205, -1205,
3838 -1205, -1205, 620, 41, 41, 98, -1205, 739, -1205, 630,
3839 727, 6492, 6492, 415, -1205, 9616, 654, 678, -1205, 1296,
3840 112, 689, -1205, -1205, 680, 759, 779, -1205, 629, 679,
3841 779, -1205, 112, 801, 1157, 14664, 692, 692, 708, -1205,
3842 749, 755, 825, 841, -1205, -1205, 1059, -1205, -1205, 1081,
3843 1086, 705, -1205, 715, 715, 715, 715, 805, -1205, -1205,
3844 -1205, -1205, -1205, -1205, -1205, 6238, 734, 11792, 11792, 11792,
3845 11792, -1205, 13712, 13712, 1820, 764, -1205, 769, -1205, 1820,
3846 775, -1205, -1205, -1205, -1205, 818, -1205, -1205, -1205, -1205,
3847 -1205, -1205, -1205, 9616, 11276, 781, -1205, -1205, 13472, 13472,
3848 13472, 13472, 13472, -1205, -1205, 13472, 13472, 13472, 13472, 13472,
3849 13472, 13472, 13472, -1205, 13472, -1205, -1205, 13472, 13472, 13472,
3850 13472, 13472, 13472, 13472, 13472, 13472, 13472, -1205, -1205, 15045,
3851 11912, 15143, 620, 8552, -1205, 859, -1205, 150, 150, 11792,
3852 9464, 9464, -1205, 678, 780, 873, -1205, -1205, 862, 917,
3853 133, 174, 188, 717, 874, 11792, 369, -1205, 847, 876,
3854 -1205, -1205, -1205, -1205, 136, 324, 328, 539, 543, 567,
3855 635, 648, 774, -1205, -1205, -1205, -1205, -1205, 793, -1205,
3856 -1205, 11394, -1205, -1205, -1205, 3994, -1205, -1205, -1205, -1205,
3857 -1205, -1205, 403, -1205, -1205, -1205, 1024, -1205, 13472, 12152,
3858 -1205, -1205, 15241, 11912, 15339, -1205, -1205, 12512, -1205, 13472,
3859 112, -1205, 824, 112, 833, -1205, -1205, 832, 89, -1205,
3860 -1205, -1205, -1205, -1205, 10857, -1205, -1205, 13472, 811, 868,
3861 870, 15437, 15339, -1205, 91, 112, -1205, -1205, 5713, 851,
3862 850, -1205, 12392, -1205, -1205, 12632, -1205, -1205, -1205, 618,
3863 879, -1205, 857, -1205, -1205, 14664, 15535, 11912, 15633, -1205,
3864 -1205, -1205, -1205, -1205, -1205, -1205, -1205, -1205, -1205, -1205,
3865 -1205, 1117, 113, 1177, 134, 13472, -1205, -1205, 10084, -1205,
3866 -1205, -1205, -1205, -1205, 11672, -1205, -1205, -1205, -1205, -1205,
3867 -1205, -1205, -1205, -1205, -1205, 1526, -1205, -1205, -1205, -1205,
3868 -1205, 861, -1205, -1205, -1205, 871, -1205, -1205, -1205, 875,
3869 -1205, -1205, -1205, 112, -1205, -1205, -1205, 880, -1205, 883,
3870 13472, 143, -1205, -1205, 976, 891, 381, -1205, 13832, 8552,
3871 678, 13832, 8552, -1205, 882, -1205, -1205, -1205, 142, 142,
3872 12752, 112, 14664, 894, -1205, 12872, -1205, 727, 3345, 3345,
3873 3345, 3345, 5063, 3746, 3345, 3345, 6492, 6492, 1184, 1184,
3874 -1205, 5555, 1132, 1132, 1387, 346, 346, 727, 727, 727,
3875 1614, 1614, 7926, 6834, 8238, 6990, 620, -1205, 112, 896,
3876 497, -1205, 504, -1205, 7458, -1205, -1205, 142, -1205, 8704,
3877 1041, 9160, 77, 142, 142, 1040, 1037, 211, 15731, 11912,
3878 15829, -1205, -1205, -1205, 879, -1205, -1205, -1205, -1205, 15927,
3879 11912, 16025, 8552, 13712, -1205, -1205, -1205, 112, -1205, -1205,
3880 -1205, -1205, 3311, 13952, 13952, 10857, -1205, 13472, 13472, -1205,
3881 629, -1205, -1205, 615, 6366, 7614, 112, 480, 520, 13472,
3882 13472, -1205, -1205, 12272, -1205, 12512, -1205, -1205, -1205, 13712,
3883 6336, -1205, 14072, 14072, 359, 620, 620, 13952, -1205, 48,
3884 -1205, -1205, 779, 14664, 857, 581, 68, 112, 72, 608,
3885 -1205, -1205, 1031, -1205, 631, -1205, 175, -1205, -1205, 631,
3886 175, -1205, 727, 904, -1205, 1526, 1303, -1205, 908, 112,
3887 913, -1205, 46, -1205, -1205, -1205, 808, -1205, 1820, -1205,
3888 -1205, -1205, 930, 13472, 1820, -1205, -1205, -1205, -1205, -1205,
3889 1112, -1205, -1205, -1205, 590, 1025, -1205, 6336, 1028, 142,
3890 -1205, 1025, 1028, 142, -1205, -1205, 922, -1205, -1205, -1205,
3891 -1205, -1205, 13472, -1205, -1205, -1205, 921, 923, 1045, -1205,
3892 -1205, 857, 14664, 1050, -1205, -1205, 1049, 947, 4500, -1205,
3893 -1205, -1205, 886, 540, -1205, -1205, 958, -1205, -1205, -1205,
3894 -1205, 818, 938, 544, 12152, -1205, -1205, -1205, -1205, 818,
3895 -1205, 1093, -1205, 943, -1205, 1092, -1205, -1205, -1205, -1205,
3896 -1205, -1205, 12992, 142, -1205, 1040, 142, 319, 438, 112,
3897 234, 280, 11792, 678, 11792, 8552, 1058, 68, -1205, 112,
3898 142, 89, 11011, -1205, 168, 372, -1205, 4787, -1205, -1205,
3899 -1205, -1205, 13472, -1205, -1205, -1205, -1205, 585, -1205, -1205,
3900 112, 955, 89, 590, -1205, -1205, -1205, -1205, 625, -1205,
3901 -1205, -1205, -1205, -1205, 715, -1205, 715, 715, 715, -1205,
3902 112, -1205, 1526, -1205, 1451, -1205, -1205, 1060, 861, -1205,
3903 -1205, 964, 966, -1205, -1205, 968, -1205, 979, -1205, 964,
3904 13832, -1205, -1205, -1205, -1205, -1205, -1205, -1205, 984, 13112,
3905 -1205, 857, 655, -1205, -1205, -1205, 16123, 11912, 16221, -1205,
3906 -1205, 13472, 13952, 13952, 1013, -1205, -1205, -1205, 13952, 13952,
3907 -1205, -1205, 13232, 1092, -1205, -1205, -1205, 9464, 11792, 142,
3908 -1205, -1205, 142, -1205, 13472, -1205, 120, -1205, -1205, 142,
3909 -1205, 353, 77, 8552, 678, 142, -1205, -1205, -1205, -1205,
3910 -1205, -1205, 13472, 13472, -1205, 13472, 13472, -1205, 12512, -1205,
3911 14072, 1518, 5934, -1205, -1205, 1016, 1019, -1205, 1112, -1205,
3912 1112, -1205, 1820, -1205, 1112, -1205, -1205, 1025, 1028, 13472,
3913 13472, -1205, -1205, 13472, 1027, 11672, 11672, 13952, 13472, 8082,
3914 8394, 112, 668, 685, 5121, 5121, 6336, -1205, -1205, -1205,
3915 -1205, -1205, 13952, -1205, -1205, -1205, -1205, 921, -1205, 1085,
3916 -1205, 1180, -1205, -1205, 150, -1205, -1205, -1205, 13352, 8856,
3917 -1205, -1205, -1205, 142, -1205, -1205, 13472, 1820, 1036, -1205,
3918 -1205, 1042, -1205, -1205, 1043, -1205, -1205, -1205, -1205, -1205,
3919 1051, 1057, -1205, 125, 1451, 1451, 964, 964, 1067, 964,
3920 6336, 6336, 1053, 1053, 984, -1205, -1205, 6336, 722, -1205,
3921 -1205, -1205, 1791, 1791, 515, -1205, 4950, 424, 1141, -1205,
3922 1074, -1205, -1205, 52, -1205, 1091, -1205, -1205, -1205, 1076,
3923 -1205, 1100, -1205, 14973, -1205, -1205, -1205, -1205, -1205, 909,
3924 -1205, -1205, -1205, 314, -1205, -1205, -1205, -1205, -1205, -1205,
3925 -1205, -1205, -1205, 672, -1205, -1205, -1205, 14782, 150, -1205,
3926 -1205, 9464, -1205, -1205, 9312, 8704, 13472, -1205, 573, 5121,
3927 9464, -1205, 112, 46, -1205, -1205, 74, 808, -1205, 1820,
3928 -1205, -1205, 1820, -1205, 1112, -1205, -1205, -1205, -1205, 1019,
3929 -1205, -1205, 1112, -1205, -1205, 2117, 10084, -1205, -1205, 8552,
3930 -1205, -1205, -1205, -1205, 14973, 73, 112, 5437, -1205, 112,
3931 1102, -1205, 1061, -1205, -1205, -1205, 1039, -1205, 11792, -1205,
3932 1188, 5437, -1205, 14973, 670, 1146, 1791, 1791, 515, 382,
3933 701, 5121, 5121, -1205, 1202, -1205, 899, 198, 227, 289,
3934 8552, 678, -1205, 943, -1205, -1205, -1205, -1205, 150, 970,
3935 142, 1099, 1105, -1205, -1205, 10084, -1205, 1036, -1205, 1109,
3936 1110, 1114, 1115, 1109, 964, 1036, -1205, 1127, -1205, -1205,
3937 -1205, 1128, -1205, -1205, -1205, 112, 880, 1131, 14900, 1133,
3938 -1205, -1205, -1205, 408, -1205, 1146, 1134, 1136, -1205, -1205,
3939 -1205, -1205, -1205, 112, -1205, -1205, 1137, 14973, 1140, -1205,
3940 -1205, -1205, -1205, -1205, -1205, -1205, -1205, -1205, -1205, -1205,
3941 112, 112, 112, 112, 112, 112, 350, 16319, 11912, 16417,
3942 1093, -1205, 1180, -1205, -1205, 11792, 11792, -1205, 1412, -1205,
3943 8552, 1120, -1205, 1112, -1205, 1112, -1205, 1820, -1205, 1112,
3944 -1205, -1205, -1205, -1205, 808, -1205, 2117, -1205, -1205, 1148,
3945 14900, 2117, -1205, -1205, 1244, 924, 1893, -1205, -1205, 14973,
3946 -1205, 670, -1205, 14973, -1205, 5437, 95, -1205, -1205, -1205,
3947 -1205, -1205, -1205, 360, 432, 112, 406, 442, -1205, -1205,
3948 9008, -1205, -1205, -1205, 865, -1205, -1205, 142, -1205, 1109,
3949 1109, 1149, 1109, -1205, 1036, -1205, -1205, 1150, 1151, -1205,
3950 924, 1153, 1155, -1205, 16515, 1150, 1158, 112, 1158, -1205,
3951 -1205, 451, 177, 1412, -1205, -1205, -1205, -1205, 1112, -1205,
3952 -1205, -1205, 1893, -1205, 1893, -1205, 2117, -1205, 1893, -1205,
3953 1159, 1166, -1205, 14973, -1205, -1205, -1205, -1205, -1205, 1109,
3954 1150, 1150, 1160, 1150, -1205, -1205, -1205, 1893, -1205, -1205,
3955 1150, -1205
3956};
3957
3958/* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM.
3959 Performed when YYTABLE does not specify something else to do. Zero
3960 means the default is an error. */
3961static const yytype_int16 yydefact[] =
3962{
3963 2, 0, 0, 47, 406, 407, 408, 0, 399, 400,
3964 401, 404, 26, 26, 26, 393, 394, 395, 396, 418,
3965 419, 323, 703, 702, 704, 705, 64, 0, 64, 0,
3966 853, 707, 706, 708, 97, 99, 697, 696, 98, 698,
3967 692, 693, 694, 695, 641, 713, 714, 0, 0, 0,
3968 0, 0, 0, 0, 853, 853, 126, 494, 667, 667,
3969 669, 671, 0, 0, 0, 0, 0, 0, 0, 6,
3970 3, 8, 26, 10, 43, 49, 40, 58, 61, 46,
3971 723, 723, 70, 91, 323, 90, 0, 112, 0, 116,
3972 128, 0, 237, 79, 246, 253, 282, 283, 267, 284,
3973 398, 0, 351, 0, 0, 87, 87, 0, 0, 0,
3974 0, 0, 360, 323, 370, 94, 368, 340, 341, 640,
3975 642, 342, 343, 650, 344, 656, 346, 660, 345, 662,
3976 347, 639, 684, 685, 638, 690, 701, 709, 710, 348,
3977 0, 349, 7, 1, 205, 216, 206, 229, 202, 222,
3978 212, 211, 232, 233, 227, 210, 209, 204, 230, 234,
3979 235, 214, 203, 217, 221, 223, 215, 208, 224, 231,
3980 226, 225, 218, 228, 213, 201, 220, 219, 200, 207,
3981 198, 199, 195, 196, 197, 155, 157, 156, 190, 191,
3982 186, 168, 169, 170, 177, 174, 176, 171, 172, 192,
3983 193, 178, 179, 183, 187, 173, 175, 165, 166, 167,
3984 180, 181, 182, 184, 185, 188, 189, 194, 160, 162,
3985 33, 158, 159, 161, 402, 403, 405, 0, 827, 0,
3986 0, 334, 830, 326, 667, 0, 318, 316, 0, 298,
3987 299, 329, 317, 110, 322, 853, 330, 0, 709, 710,
3988 0, 349, 853, 823, 111, 853, 513, 0, 107, 65,
3989 64, 0, 0, 28, 853, 12, 0, 11, 27, 295,
3990 393, 394, 514, 723, 723, 0, 261, 0, 360, 363,
3991 262, 251, 252, 357, 24, 0, 0, 3, 21, 23,
3992 64, 114, 20, 353, 0, 64, 64, 300, 0, 0,
3993 64, 821, 64, 0, 0, 0, 723, 723, 124, 397,
3994 0, 132, 133, 140, 491, 687, 0, 686, 688, 0,
3995 0, 0, 647, 651, 663, 657, 665, 691, 74, 273,
3996 274, 850, 849, 5, 851, 0, 0, 0, 0, 0,
3997 0, 853, 0, 0, 720, 0, 719, 722, 389, 720,
3998 0, 391, 409, 518, 508, 100, 520, 367, 410, 520,
3999 503, 853, 130, 0, 122, 117, 853, 77, 0, 0,
4000 0, 0, 0, 291, 292, 0, 0, 0, 0, 249,
4001 250, 0, 0, 75, 0, 289, 290, 0, 0, 0,
4002 0, 0, 0, 0, 0, 0, 0, 840, 841, 843,
4003 853, 842, 0, 0, 86, 84, 85, 0, 0, 0,
4004 0, 0, 377, 3, 4, 0, 430, 429, 0, 0,
4005 709, 710, 349, 150, 151, 0, 0, 153, 853, 0,
4006 709, 710, 349, 387, 225, 218, 228, 213, 195, 196,
4007 197, 155, 156, 819, 81, 80, 818, 817, 0, 816,
4008 109, 64, 108, 843, 842, 0, 369, 643, 853, 853,
4009 163, 826, 357, 333, 829, 325, 0, 853, 0, 0,
4010 319, 328, 843, 853, 842, 853, 853, 0, 320, 786,
4011 64, 312, 853, 64, 853, 311, 324, 0, 64, 366,
4012 73, 30, 32, 31, 0, 853, 296, 0, 0, 0,
4013 0, 843, 842, 853, 0, 64, 355, 14, 0, 113,
4014 0, 358, 848, 847, 301, 848, 303, 359, 822, 0,
4015 139, 691, 127, 119, 722, 0, 843, 853, 842, 492,
4016 673, 689, 676, 674, 668, 644, 645, 670, 646, 672,
4017 648, 0, 0, 0, 0, 0, 852, 9, 0, 34,
4018 35, 36, 37, 297, 0, 71, 72, 792, 789, 788,
4019 787, 790, 798, 799, 786, 0, 805, 800, 809, 808,
4020 804, 813, 801, 764, 727, 813, 735, 762, 744, 813,
4021 760, 765, 763, 64, 736, 791, 793, 794, 796, 813,
4022 726, 803, 443, 442, 807, 813, 812, 734, 0, 0,
4023 0, 0, 0, 491, 0, 518, 101, 491, 0, 0,
4024 0, 64, 0, 118, 131, 0, 531, 259, 266, 268,
4025 269, 270, 277, 278, 271, 272, 247, 248, 275, 276,
4026 531, 64, 263, 264, 265, 254, 255, 256, 257, 258,
4027 293, 294, 831, 833, 832, 834, 323, 511, 64, 853,
4028 831, 833, 832, 834, 323, 512, 853, 0, 421, 0,
4029 420, 0, 0, 0, 0, 0, 375, 357, 843, 853,
4030 842, 380, 385, 150, 151, 152, 715, 383, 717, 843,
4031 853, 842, 0, 0, 838, 839, 82, 64, 362, 831,
4032 832, 507, 323, 0, 0, 0, 853, 0, 0, 825,
4033 331, 327, 332, 853, 831, 832, 64, 831, 832, 0,
4034 0, 824, 306, 313, 308, 315, 844, 365, 29, 0,
4035 279, 13, 0, 0, 356, 0, 853, 0, 25, 115,
4036 22, 354, 64, 0, 125, 835, 138, 64, 831, 832,
4037 493, 677, 0, 649, 0, 653, 0, 659, 655, 0,
4038 0, 661, 260, 0, 38, 0, 441, 433, 435, 64,
4039 438, 431, 814, 733, 815, 730, 814, 732, 814, 756,
4040 747, 721, 0, 0, 814, 761, 725, 598, 802, 806,
4041 814, 758, 811, 810, 64, 59, 62, 286, 280, 0,
4042 724, 60, 281, 0, 492, 516, 0, 492, 416, 417,
4043 517, 502, 334, 92, 93, 41, 336, 0, 45, 335,
4044 129, 123, 0, 0, 69, 48, 67, 0, 304, 329,
4045 236, 42, 0, 349, 529, 529, 0, 853, 853, 518,
4046 510, 104, 0, 515, 313, 853, 853, 310, 509, 102,
4047 309, 853, 352, 853, 422, 853, 424, 88, 423, 373,
4048 374, 413, 0, 0, 531, 0, 0, 835, 356, 64,
4049 831, 832, 0, 0, 0, 0, 150, 151, 154, 64,
4050 0, 64, 0, 361, 504, 95, 50, 304, 238, 57,
4051 245, 164, 0, 828, 321, 853, 853, 515, 853, 853,
4052 64, 853, 64, 64, 56, 244, 302, 120, 515, 26,
4053 678, 675, 682, 683, 652, 654, 664, 658, 666, 39,
4054 64, 440, 0, 795, 0, 729, 728, 803, 813, 746,
4055 745, 813, 813, 445, 743, 813, 797, 813, 794, 813,
4056 0, 853, 853, 390, 392, 493, 96, 493, 339, 0,
4057 853, 121, 357, 853, 853, 853, 843, 853, 842, 530,
4058 530, 0, 0, 0, 0, 105, 845, 853, 0, 0,
4059 103, 411, 853, 18, 630, 415, 414, 0, 0, 0,
4060 425, 427, 0, 89, 0, 522, 0, 378, 529, 0,
4061 379, 515, 0, 0, 0, 0, 515, 388, 820, 83,
4062 505, 506, 0, 0, 853, 0, 0, 307, 314, 364,
4063 0, 720, 0, 432, 434, 436, 439, 731, 814, 757,
4064 814, 754, 814, 750, 814, 752, 759, 66, 288, 0,
4065 0, 26, 26, 334, 337, 0, 0, 0, 0, 831,
4066 832, 64, 831, 832, 0, 0, 285, 54, 242, 55,
4067 243, 106, 0, 52, 240, 53, 241, 631, 632, 853,
4068 633, 853, 15, 428, 0, 371, 372, 523, 0, 0,
4069 530, 376, 381, 0, 716, 384, 0, 720, 853, 495,
4070 784, 853, 741, 782, 853, 780, 785, 783, 498, 742,
4071 853, 853, 740, 0, 0, 0, 813, 813, 813, 813,
4072 63, 287, 853, 853, 338, 44, 68, 305, 515, 622,
4073 628, 594, 0, 0, 0, 530, 64, 530, 582, 667,
4074 0, 621, 78, 539, 545, 547, 550, 543, 542, 578,
4075 544, 587, 590, 593, 599, 600, 589, 553, 608, 601,
4076 554, 609, 610, 611, 612, 613, 614, 615, 616, 618,
4077 617, 619, 620, 597, 76, 51, 239, 0, 0, 635,
4078 412, 0, 19, 637, 0, 0, 0, 524, 853, 0,
4079 0, 386, 64, 0, 739, 451, 0, 0, 738, 0,
4080 776, 767, 0, 781, 0, 778, 681, 680, 679, 437,
4081 755, 751, 814, 748, 753, 483, 0, 481, 480, 0,
4082 606, 607, 151, 626, 0, 570, 64, 571, 575, 64,
4083 0, 565, 0, 853, 568, 581, 0, 623, 0, 624,
4084 0, 540, 548, 0, 588, 592, 604, 605, 0, 530,
4085 530, 0, 0, 596, 0, 634, 0, 709, 710, 349,
4086 0, 3, 16, 853, 525, 527, 528, 526, 0, 536,
4087 0, 485, 0, 450, 500, 0, 496, 853, 766, 853,
4088 853, 853, 853, 853, 813, 853, 448, 853, 456, 478,
4089 459, 853, 475, 484, 479, 64, 794, 853, 447, 853,
4090 455, 519, 521, 64, 563, 585, 573, 572, 564, 576,
4091 846, 566, 595, 64, 546, 541, 578, 0, 579, 583,
4092 667, 591, 586, 602, 603, 627, 552, 562, 551, 558,
4093 64, 64, 64, 64, 64, 64, 357, 843, 853, 842,
4094 853, 636, 853, 426, 532, 0, 0, 382, 0, 497,
4095 0, 0, 737, 0, 777, 0, 774, 0, 770, 0,
4096 772, 779, 749, 454, 0, 453, 0, 471, 462, 0,
4097 0, 457, 476, 477, 0, 446, 0, 473, 569, 0,
4098 577, 0, 625, 0, 549, 0, 0, 555, 556, 557,
4099 559, 560, 561, 835, 356, 64, 831, 832, 629, 17,
4100 0, 537, 538, 489, 64, 487, 490, 0, 499, 853,
4101 853, 853, 853, 449, 853, 461, 460, 853, 853, 482,
4102 458, 853, 853, 357, 843, 853, 574, 64, 579, 580,
4103 584, 515, 853, 0, 486, 501, 775, 771, 0, 768,
4104 773, 452, 0, 472, 0, 469, 0, 465, 0, 467,
4105 835, 356, 474, 0, 567, 534, 535, 533, 488, 853,
4106 853, 853, 853, 853, 769, 470, 466, 0, 463, 468,
4107 853, 464
4108};
4109
4110/* YYPGOTO[NTERM-NUM]. */
4111static const yytype_int16 yypgoto[] =
4112{
4113 -1205, -99, 1066, -1205, -1205, -1205, 990, -1205, 799, -46,
4114 -1205, -1205, -570, -1205, 182, 835, -1205, 20, -1205, -1205,
4115 11, -1205, -1205, -424, -1205, 6, -544, -24, -619, 37,
4116 -1205, -1205, 472, 2994, -1205, 3515, -1205, -14, -1205, -1205,
4117 1239, -47, -1205, 736, -1205, -102, 1406, 34, 1243, -143,
4118 21, -440, -72, -1205, 7, 3651, -412, 1237, -42, 1,
4119 -1205, -1205, 3, -1205, -1205, 4905, -1205, -1205, -1205, -1205,
4120 -499, 1265, -1205, -7, 869, 453, -1205, 1089, -1205, 107,
4121 63, 674, -338, -1205, 71, -1205, -25, -368, -184, 24,
4122 -364, -1205, -545, -43, -1205, -1205, -1205, -1205, -1205, -1205,
4123 -1205, -1205, -1205, -1205, -1205, -1205, 1388, -1205, -1205, -1205,
4124 -1205, -1205, -1205, -1205, -1205, -1205, -1205, -1205, -1205, -1205,
4125 -1205, -1205, 404, -1205, 478, 2212, 2587, -397, 386, 137,
4126 -803, -1205, -802, -843, 616, 463, 714, -1205, 122, 42,
4127 -1205, -999, -1205, 192, -1205, -1204, 54, -849, -1205, -1205,
4128 -1205, 306, -1205, -1205, 135, -1205, 8, 270, 110, -271,
4129 -1205, -1205, 761, -1205, -1205, -1205, 527, -1205, -1205, -101,
4130 -1205, -492, -1205, 1056, -1205, -775, -1205, -705, -668, -513,
4131 -1205, 10, -1205, -1205, -936, -418, -1205, -1205, -1205, -1205,
4132 -1205, 129, -1205, -781, -1205, -866, -698, -1068, -460, -1063,
4133 -1083, -1205, 195, -1205, -1205, -913, 203, -1205, -1205, -426,
4134 210, -1205, -1205, -1205, 115, -1205, -1205, 114, 995, 1038,
4135 -1205, 1304, 1277, 1476, -28, -1205, 1667, -1205, 884, -1205,
4136 1696, -1205, -1205, 1933, -1205, 2081, -1205, -1205, -56, -1205,
4137 -1205, -190, -1205, -1205, -1205, -1205, -1205, -1205, 17, -1205,
4138 -1205, -1205, -1205, 16, -49, 4165, 259, 1322, 4288, 3759,
4139 -1205, -1205, 83, -306, 737, 25, -1205, -719, -922, -530,
4140 -1205, 201, -1205, -852, -727, -651, -531, -1205, -1205, -1205,
4141 1087, -454, -1205, -1205, -1205, 367, -207, -1199, -327, -318,
4142 -678, 223, -301, -334, -1205, -706, -1205, -685, -1205, 371,
4143 -1205, -464, -1205, -1205, -1205, -1205, -1205, 61, -421, -374,
4144 -1205, -1205, -96, 1320, 464, 318, 40, -205, -52, -69,
4145 -1
4146};
4147
4148/* YYDEFGOTO[NTERM-NUM]. */
4149static const yytype_int16 yydefgoto[] =
4150{
4151 0, 333, 69, 1, 2, 70, 71, 266, 267, 656,
4152 1154, 1312, 657, 1051, 287, 288, 504, 224, 72, 494,
4153 289, 74, 75, 76, 77, 78, 785, 487, 815, 79,
4154 630, 616, 444, 273, 872, 274, 406, 407, 409, 973,
4155 410, 82, 804, 816, 83, 606, 275, 85, 86, 290,
4156 87, 522, 88, 89, 90, 238, 427, 428, 218, 219,
4157 220, 695, 645, 222, 92, 93, 94, 95, 96, 97,
4158 788, 395, 98, 553, 497, 554, 240, 241, 294, 820,
4159 837, 838, 480, 242, 481, 257, 258, 244, 470, 649,
4160 246, 808, 809, 99, 403, 510, 855, 665, 862, 1160,
4161 865, 863, 682, 599, 602, 100, 277, 102, 103, 104,
4162 105, 106, 107, 108, 109, 110, 111, 356, 359, 962,
4163 1151, 852, 967, 968, 800, 278, 279, 659, 847, 969,
4164 970, 419, 757, 758, 759, 760, 571, 772, 773, 1256,
4165 1257, 1164, 1258, 1385, 1342, 1260, 1261, 1337, 1262, 1263,
4166 1264, 1186, 1187, 1265, 1242, 1374, 1375, 529, 740, 899,
4167 314, 1166, 114, 1069, 1246, 1320, 360, 115, 116, 357,
4168 603, 604, 607, 608, 976, 853, 1237, 949, 1034, 824,
4169 1370, 856, 1427, 1238, 1112, 1275, 1114, 1287, 1115, 1221,
4170 1222, 1116, 1351, 1196, 1197, 1198, 1118, 1119, 1288, 1200,
4171 1120, 1121, 1122, 1123, 1124, 572, 1126, 1127, 1128, 1129,
4172 1130, 1131, 1132, 1133, 963, 1049, 1148, 1152, 117, 118,
4173 119, 120, 121, 122, 323, 123, 124, 541, 744, 125,
4174 126, 543, 127, 128, 129, 130, 542, 544, 316, 320,
4175 321, 534, 742, 741, 900, 1002, 1178, 901, 131, 132,
4176 317, 133, 134, 135, 136, 248, 249, 139, 250, 251,
4177 864, 677, 345, 346, 347, 348, 349, 574, 575, 763,
4178 576, 919, 1072, 1248, 578, 579, 769, 580, 581, 582,
4179 583, 1170, 1075, 1076, 1077, 1078, 584, 585, 586, 928,
4180 588, 589, 590, 591, 592, 593, 594, 595, 596, 597,
4181 764, 770, 447, 448, 449, 683, 299, 484, 253, 725,
4182 647, 686, 681, 402, 489, 833, 1204, 514, 660, 414,
4183 269
4184};
4185
4186/* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If
4187 positive, shift that token. If negative, reduce the rule whose
4188 number is the opposite. If YYTABLE_NINF, syntax error. */
4189static const yytype_int16 yytable[] =
4190{
4191 142, 335, 261, 319, 264, 401, 286, 293, 412, 318,
4192 221, 661, 73, 309, 675, 456, 315, 365, 334, 454,
4193 328, 236, 236, 268, 223, 646, 587, 654, 263, 789,
4194 221, 587, 793, 225, 226, 324, 325, 326, 573, 245,
4195 245, 920, 972, 573, 223, 767, 309, 916, 483, 237,
4196 237, 292, 292, 297, 301, 334, 711, 791, 775, 355,
4197 918, 221, 648, 308, 781, 309, 309, 309, 478, 445,
4198 821, 1006, 1168, 291, 876, 879, 252, 252, 295, 1071,
4199 979, 692, 327, 922, 256, 734, 243, 254, 452, 927,
4200 408, 516, 336, 413, 711, 518, 926, -135, 646, 1144,
4201 654, 701, 792, 1244, 846, 702, 351, 765, 894, 701,
4202 1004, 765, 870, 796, 221, 296, 300, 825, 236, 1376,
4203 950, 1125, 1125, 925, 352, 1176, 342, 343, 726, 1276,
4204 537, 539, 1386, 658, 1277, 706, 245, -356, 1302, 1305,
4205 405, 405, 505, 1286, 405, 1071, 237, 354, 702, 1073,
4206 1289, 474, 798, 1210, 726, 568, -711, 397, -141, -712,
4207 491, 530, 476, 658, 350, -356, -356, -711, 1117, 1117,
4208 492, 493, 811, 252, 1210, -720, 143, 777, 466, 746,
4209 -397, 502, -113, 450, 286, 398, 453, 569, 507, 737,
4210 -141, 814, 966, -142, 352, 778, -149, 1245, 344, -142,
4211 750, -141, 854, -129, 1376, -703, -135, 1211, -397, -397,
4212 799, -141, 1386, -149, 528, 1073, 532, 533, 508, 1282,
4213 611, -356, -132, 1239, 792, -832, -135, -135, -585, 292,
4214 -135, 331, 747, 523, -703, 334, -148, 332, 761, 286,
4215 -142, 1179, 265, 259, 471, 1177, 1125, 1071, 1322, 353,
4216 1071, 471, 1071, 751, 485, 255, 1333, 496, 1335, -144,
4217 138, 236, 309, 236, -397, 142, 259, 868, 1397, 814,
4218 814, 513, 513, 1060, 331, 1058, 513, 73, 519, 482,
4219 332, 245, 1035, 1004, 292, 920, 1289, 1399, -132, 237,
4220 1289, 237, 1400, 1117, 711, 985, 726, 488, 490, 351,
4221 478, 1125, -149, 814, 331, -145, 291, 726, 1125, 1125,
4222 332, 138, 138, 283, 666, 312, 1081, 286, 252, 353,
4223 521, 309, 670, 549, 550, 551, 552, 1088, 486, -133,
4224 926, 859, 351, 1037, 1039, 256, 322, 954, 354, 1043,
4225 1045, 978, 869, -140, -146, 701, 73, 701, 312, 702,
4226 1074, 745, -141, 745, 610, 1235, 499, 500, -141, 615,
4227 1400, 334, 292, -148, 663, 664, -139, 421, 431, 431,
4228 431, 613, 941, -146, 405, 405, 405, 405, -143, 555,
4229 556, -142, 1081, 1236, 291, 1411, 1017, -142, 1007, -135,
4230 1009, 1011, 1159, -702, 1013, 662, 1015, -704, 1016, 485,
4231 358, 1071, 292, 1071, 653, 1071, 236, 1071, 1199, 292,
4232 292, 672, 1218, 1063, 462, 782, 1074, 1048, 1343, -144,
4233 1347, 673, -702, 1145, 368, 674, -704, 678, 761, 911,
4234 1285, 1018, 917, 783, 237, -136, 361, 1194, 1125, 1203,
4235 1300, 1303, 920, -149, -712, -147, 405, 362, 916, -149,
4236 587, 693, 694, 523, 765, -145, 587, 236, 653, 886,
4237 698, 1247, 405, -147, -143, 655, 701, 1219, 709, 710,
4238 702, 1220, 485, 366, -137, 245, -831, 653, -142, 236,
4239 59, 471, 309, 471, 1250, 237, 1071, 1252, 496, 138,
4240 392, 393, 394, -147, 926, 718, 727, 221, 459, -133,
4241 1269, 1018, 753, 696, -148, 653, 890, 237, -134, 1210,
4242 -148, 223, 252, 458, -146, 503, -832, -831, 691, 884,
4243 -146, 1251, 687, 1301, 1304, 138, 485, 896, 814, 814,
4244 703, 653, -149, 236, 814, 814, 259, -148, 1413, 1415,
4245 523, -64, 1417, 1419, 138, 577, 1422, 292, 790, -148,
4246 577, 1296, 1298, -140, 905, 1180, 1181, 1183, 1184, 905,
4247 -144, 237, 259, 803, 312, 754, -144, 673, 803, 309,
4248 -139, 1192, 646, 732, 654, 702, -64, 711, 259, 1059,
4249 888, 1435, 1436, 1438, 1439, 761, -147, 761, 966, -832,
4250 851, 1441, -147, -138, 138, -832, -145, 835, 292, 1425,
4251 920, 292, -145, 814, 836, -143, -137, 826, -705, 1031,
4252 848, -143, -707, 843, -144, 845, 1113, 1113, 814, 1272,
4253 889, 831, 138, 312, 832, 460, 1173, 1175, 1384, 839,
4254 701, -144, 786, -136, 807, 786, -706, -705, -145, 807,
4255 459, -707, 1381, 397, 957, 926, 803, 803, 471, 841,
4256 -134, 1388, -135, 840, -145, 260, 1392, 1155, 292, -136,
4257 292, 897, 138, 926, 1021, -706, 1022, 875, 485, 138,
4258 138, 398, 399, 653, -149, 236, 1190, 1191, -143, 485,
4259 803, 292, 832, 587, 653, 994, 236, 467, 1195, 882,
4260 309, 840, 1193, 902, 587, 1070, 881, 530, 221, -134,
4261 1143, 1143, 471, 237, -708, 1215, 777, 884, 513, 830,
4262 373, 374, 223, 832, 237, -137, 904, -699, 906, -143,
4263 871, 907, 908, 1332, 1223, 840, 948, 400, 1101, 955,
4264 468, 1432, 469, -708, 926, -137, -137, 960, -831, -137,
4265 523, 1113, -136, -97, 259, 475, -699, 260, 563, 587,
4266 1377, 1230, 532, 533, 509, 503, 892, 761, 761, -134,
4267 930, 1070, -136, -136, 385, 386, -136, 138, 835, 309,
4268 477, 530, 538, 990, 891, 495, 1273, 255, 567, -134,
4269 -134, 397, 1290, -134, 312, 836, -699, 451, 830, -148,
4270 1293, 1294, 322, 1195, 1079, 1324, 1326, 1328, 1330, 1331,
4271 878, 880, -144, 1195, 1195, 368, 1295, 138, 397, 398,
4272 472, 983, 506, 138, -699, -699, 878, 880, 397, -145,
4273 952, 953, 957, -112, -709, 1143, 532, 533, 958, 959,
4274 445, 517, 331, 917, 895, 832, 398, 501, 332, 511,
4275 964, 1314, 971, -700, 971, 832, 398, 526, 982, 344,
4276 984, 587, -709, -709, 587, 259, -143, 520, 138, -64,
4277 1079, 138, 684, 525, 292, 473, 562, 1266, -97, 1000,
4278 -699, 312, -700, 794, -97, 221, 540, 797, 992, 993,
4279 1143, 995, 996, 545, 1268, 548, 563, 1143, 1143, 1396,
4280 471, 685, 473, 1398, -710, 891, 342, 343, 598, 405,
4281 -98, 405, 527, -718, 935, 803, 803, 937, -709, 601,
4282 -349, 803, 803, 259, 512, 688, 567, 568, 138, 1001,
4283 138, 1053, -710, -710, 605, 1406, 1407, 1409, 1410, 667,
4284 848, 397, 1064, 259, 515, 726, 614, 1027, -349, -349,
4285 546, 138, 671, -700, 712, 397, 485, 714, -357, 569,
4286 1042, 653, 717, 236, 1054, 397, 1083, 965, 966, 398,
4287 668, 1050, 1079, 721, 786, 1079, 292, 1079, 397, 729,
4288 1365, -700, -700, 398, 679, 1434, -357, -357, -710, 713,
4289 803, 237, 292, 398, 946, 676, 807, 1066, 715, 895,
4290 716, 921, 312, 397, -349, 803, 398, 1307, 1216, 1217,
4291 917, 292, 722, 929, 723, 405, -129, 832, 731, 587,
4292 1315, 1316, 733, 1158, -444, 669, 762, 1143, 1266, 259,
4293 1403, 398, 1394, 1266, 887, -98, 766, -700, 779, 680,
4294 768, -98, -357, 1268, 795, 1268, 1095, 1096, 774, 947,
4295 1268, 1092, 1093, 524, 524, 1268, 780, 771, 1149, 812,
4296 1153, 834, 1308, 1206, 844, 898, 909, 851, 292, 1038,
4297 1040, 1209, 854, 912, 923, 1044, 1046, 1165, 914, 931,
4298 1165, 312, 932, 1171, 936, 810, -329, 680, 939, 1171,
4299 1171, 944, 832, 1202, -835, 36, 37, 801, 39, 940,
4300 530, 1188, 1188, 943, 951, 45, 46, 956, 1266, 1038,
4301 1040, 961, 1044, 1046, 309, 530, 942, 966, 1232, 1233,
4302 998, 1268, 778, 1268, 1240, 1268, 1079, 1268, 1079, 1008,
4303 1079, 1010, 1079, 1012, 138, 530, 1207, -835, 36, 37,
4304 1309, 39, 1311, 915, 1014, 842, 1268, 915, 1241, -333,
4305 1271, 849, 850, 535, 298, 532, 533, 530, 697, 1146,
4306 292, 873, 530, 292, 292, -835, -835, 971, 535, 292,
4307 532, 533, 508, 1282, 557, 1041, 558, 559, 560, 561,
4308 562, 1084, 832, 1146, 1085, 832, 1208, 981, 531, 334,
4309 532, 533, -331, 530, 1310, 292, 1147, 986, 292, 1150,
4310 563, 1163, 1185, 1205, 1283, 832, 1281, 1167, 1169, 1321,
4311 535, 1079, 532, 533, 564, 536, 1172, 532, 533, -835,
4312 368, -835, 1174, 1280, 565, -831, 40, 41, 42, 43,
4313 567, 568, 1182, 913, 1080, 309, 138, 381, 382, 292,
4314 1212, 1213, 971, 1086, 1356, 1087, 743, 1089, 532, 533,
4315 1099, 1241, 138, 530, 292, 405, 1165, 1210, 1171, 1171,
4316 1171, 1171, 1171, 569, 1165, 1214, 1165, 1279, 1306, 1318,
4317 1338, 138, 368, 1319, 1323, 1325, 1338, 933, 1338, 1327,
4318 1329, 934, 1378, 389, 390, 391, 392, 393, 394, 832,
4319 832, 832, 1334, 1336, 138, 138, 1341, 1389, 1346, 1349,
4320 1080, 1350, 1353, 1142, 1142, 1355, 748, 309, 532, 533,
4321 1393, 1371, 1372, 728, 1408, 1412, 1414, 485, 1416, 964,
4322 1418, 1153, 653, 1423, 236, 1437, -831, 461, 138, 292,
4323 463, 464, 465, -832, 1402, 547, 390, 391, 392, 393,
4324 394, 977, 498, 1231, 980, 988, 337, 338, 339, 340,
4325 341, 832, 237, 730, 989, 411, 805, 433, 987, 1098,
4326 1404, 416, 405, 405, 997, 557, 999, 558, 559, 560,
4327 561, 1142, 1142, 396, 719, 1142, 874, 1052, 1062, 292,
4328 1313, 910, 1082, 1202, 1003, 1005, 1383, 1259, 1171, 1171,
4329 1171, 1171, 1142, 1165, 1019, 1020, 1338, 1338, 1340, 101,
4330 1338, 1338, 1249, 1025, 1338, 1391, 1026, 1253, 1028, 1189,
4331 1339, 971, 991, 247, 247, 1254, 1228, 84, 1267, 1291,
4332 138, 1428, 1426, 138, 138, 609, 1354, 1292, 1142, 138,
4333 1284, 84, 84, 457, 1201, 1368, 1369, 749, 1171, 1338,
4334 1338, 1338, 1338, 446, 1162, 455, 600, 1424, 1082, 1338,
4335 101, 101, 0, 0, 310, 138, 0, 1055, 138, 0,
4336 1056, 0, 0, 1142, 0, 247, 1142, 1061, 84, 84,
4337 0, 0, 0, 1065, 1373, 368, 558, 559, 560, 561,
4338 1142, 0, 1142, 84, 0, 1142, 1142, 310, 0, 0,
4339 1142, 1142, 381, 382, 0, 0, 0, 0, 0, 138,
4340 0, 247, 247, 0, 0, 247, 418, 429, 429, 0,
4341 247, 0, 0, 557, 138, 558, 559, 560, 561, 84,
4342 84, 0, 0, 84, 1274, 0, 0, 1278, 84, 0,
4343 0, 0, 0, 0, 0, 0, 0, 431, 0, 390,
4344 391, 392, 393, 394, 1243, 0, 0, 1297, 1243, 0,
4345 1082, 1161, 0, 1082, 0, 1082, 1142, 0, 1379, 0,
4346 1380, 0, 1382, 755, 0, 0, 1270, 699, 700, 1387,
4347 0, 0, 0, 0, 0, 0, 298, 0, 0, 1395,
4348 557, 0, 558, 559, 560, 561, 562, 0, 557, 138,
4349 558, 559, 560, 561, 0, 0, 0, 0, 0, 0,
4350 0, 0, 0, 0, 0, 0, 563, 0, 0, 431,
4351 0, 700, 0, 0, 298, 0, 0, 0, 1142, 0,
4352 564, 0, 1142, 0, 1142, 0, 0, 0, 101, 0,
4353 565, 1360, 1361, 1362, 0, 566, 567, 568, 755, 138,
4354 0, 1429, 0, 756, 0, 0, 84, 1430, 0, 1431,
4355 0, 1433, 0, 247, 0, 247, 0, 0, 247, 247,
4356 0, 0, 0, 0, 101, 0, 0, 0, 0, 569,
4357 1440, 84, 570, 84, 0, 0, 84, 84, 0, 0,
4358 0, 0, 84, 101, 0, 1067, 0, 0, 0, 776,
4359 0, 0, 1142, 1401, 1299, 0, 0, 0, 0, 0,
4360 0, 84, 368, 310, 1082, 0, 1082, 0, 1082, 806,
4361 1082, 0, 0, 0, 819, 1243, 0, 1270, 0, 381,
4362 382, 0, 1270, 0, 0, 1068, 0, 1270, 1317, 0,
4363 0, 0, 0, 101, 0, 247, 247, 247, 247, 0,
4364 247, 247, 0, 0, 0, 0, 0, 1348, 0, 0,
4365 0, 84, 0, 84, 84, 84, 84, 1352, 84, 84,
4366 0, 101, 310, 387, 388, 389, 390, 391, 392, 393,
4367 394, 0, 0, 0, 1357, 1358, 1359, 0, 0, 84,
4368 0, 0, 0, 0, 0, 0, 0, 0, 0, 1082,
4369 0, 1068, 0, 1270, 0, 1270, 883, 1270, 247, 1270,
4370 0, 101, 0, 0, 0, 1111, 1111, 247, 101, 101,
4371 0, 0, 700, 0, 298, 0, 84, 0, 1270, 84,
4372 0, 0, 0, 247, 0, 84, 84, 84, 0, 0,
4373 0, 0, 0, 0, 22, 23, 24, 25, 0, 0,
4374 0, 84, 0, 0, 0, 0, 0, 0, 0, 247,
4375 31, 32, 33, 0, 0, 0, 0, 0, 0, 0,
4376 40, 41, 42, 43, 44, 1405, 0, 84, 0, 0,
4377 0, 247, 924, 1111, 1111, 0, 0, 1111, 0, 0,
4378 0, 0, 557, 0, 558, 559, 560, 561, 562, 84,
4379 0, 0, 0, 1068, 1111, 0, 1068, 0, 1068, 0,
4380 0, 938, 0, 0, 0, 0, 101, 0, 563, 1255,
4381 0, 57, 58, 59, 60, 61, 62, 63, 64, 65,
4382 0, 0, 564, 310, 84, 247, 0, 0, 0, 0,
4383 1111, 0, 565, 700, 0, 0, 0, 566, 567, 568,
4384 0, 0, 0, 84, 0, 0, 101, 0, 304, 0,
4385 0, 975, 101, 0, 0, 557, 0, 558, 559, 560,
4386 561, 562, 0, 0, 84, 1111, 0, 0, 1111, 0,
4387 84, 569, 0, 0, 570, 0, 0, 0, 0, 0,
4388 0, 563, 1111, 0, 1111, 0, 0, 1111, 1111, 0,
4389 0, 0, 1111, 1111, 0, 0, 247, 101, 0, 247,
4390 101, 0, 0, 0, 0, 565, 0, 0, 247, 0,
4391 310, 567, 568, 822, 84, 84, 0, 84, 84, 0,
4392 0, 0, 0, 0, 0, 0, 84, 0, 0, 0,
4393 0, 84, 0, 0, 0, 0, 0, 0, 1024, 1134,
4394 1134, 0, 0, 0, 569, 0, 0, 1068, 0, 1068,
4395 0, 1068, 0, 1068, 0, 0, 0, 101, 1111, 101,
4396 1255, 1047, 0, 0, 0, 1255, 0, 247, 0, 0,
4397 1255, 0, 0, 1057, 0, 84, 0, 84, 247, 0,
4398 101, 247, 1135, 1135, 0, 84, 0, 0, 0, 0,
4399 0, 822, 822, 0, 0, 0, 84, 298, 84, 84,
4400 0, 0, 0, 0, 0, 0, 0, 1134, 1134, 84,
4401 84, 1134, 0, 0, 0, 0, 0, 247, 0, 0,
4402 1111, 0, 1094, 0, 1111, 822, 1111, 0, 1134, 0,
4403 0, 310, 1068, 0, 0, 84, 1255, 0, 1255, 0,
4404 1255, 0, 1255, 84, 0, 0, 0, 0, 0, 0,
4405 1135, 1135, 0, 0, 1135, 0, 0, 1157, 0, 0,
4406 0, 1255, 0, 0, 1134, 0, 0, 0, 0, 0,
4407 0, 1135, 0, 0, 0, 0, 0, 0, 0, 557,
4408 0, 558, 559, 560, 561, 562, 0, 0, 0, 0,
4409 0, 0, 0, 0, 1111, 0, 0, 0, 0, 1134,
4410 0, 0, 1134, 0, 0, 563, 0, 1135, 0, 0,
4411 310, 0, 0, 0, 0, 0, 1134, 0, 1134, 0,
4412 0, 1134, 1134, 112, 0, 0, 1134, 1134, 0, 565,
4413 0, 0, 0, 0, 566, 567, 568, 112, 112, 0,
4414 0, 0, 1135, 0, 0, 1135, 0, 0, 0, 0,
4415 0, 0, 0, 0, 0, 1234, 0, 0, 0, 1135,
4416 247, 1135, 247, 101, 1135, 1135, 0, 0, 569, 1135,
4417 1135, 570, 0, 0, 112, 112, 0, 0, 84, 0,
4418 84, 84, 0, 0, 0, 0, 0, 0, 0, 112,
4419 0, 0, 1134, 0, 0, 0, 0, 0, 0, 0,
4420 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4421 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4422 0, 1136, 1136, 0, 0, 112, 112, 0, 247, 112,
4423 0, 0, 0, 0, 112, 1135, 0, 0, 0, 0,
4424 0, 0, 0, 0, 0, 247, 84, 0, 0, 0,
4425 822, 822, 0, 0, 1134, 0, 822, 822, 1134, 0,
4426 1134, 0, 0, 84, 0, 101, 247, 0, 84, 84,
4427 0, 0, 0, 0, 84, 84, 0, 0, 0, 0,
4428 0, 101, 0, 84, 84, 0, 0, 0, 0, 1136,
4429 1136, 0, 0, 1136, 0, 0, 0, 1135, 0, 84,
4430 101, 1135, 0, 1135, 0, 0, 0, 0, 0, 0,
4431 1136, 0, 0, 0, 0, 0, 0, 0, 84, 0,
4432 0, 0, 0, 101, 101, 822, 0, 0, 1134, 0,
4433 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4434 822, 84, 84, 84, 0, 0, 1136, 0, 0, 0,
4435 0, 0, 112, 0, 0, 0, 0, 101, 84, 0,
4436 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4437 0, 1135, 0, 0, 0, 84, 0, 112, 0, 112,
4438 0, 1136, 112, 112, 1136, 0, 0, 0, 112, 0,
4439 0, 0, 0, 0, 0, 0, 0, 0, 1136, 0,
4440 1136, 0, 0, 1136, 1136, 0, 0, 112, 1136, 1136,
4441 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4442 1137, 1137, 0, 0, 0, 0, 0, 0, 0, 0,
4443 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4444 0, 0, 0, 0, 0, 1226, 0, 0, 0, 101,
4445 0, 0, 101, 101, 0, 0, 0, 112, 101, 112,
4446 112, 112, 112, 0, 112, 112, 0, 84, 0, 0,
4447 84, 84, 0, 0, 1136, 0, 84, 0, 0, 0,
4448 0, 0, 0, 0, 101, 112, 0, 101, 1137, 1137,
4449 0, 0, 1137, 0, 0, 0, 0, 0, 113, 0,
4450 0, 0, 84, 0, 0, 84, 247, 0, 0, 1137,
4451 0, 0, 113, 113, 0, 0, 0, 0, 0, 0,
4452 0, 0, 112, 0, 84, 112, 0, 0, 101, 0,
4453 0, 112, 112, 112, 0, 0, 1136, 0, 0, 0,
4454 1136, 0, 1136, 101, 0, 1137, 84, 112, 0, 113,
4455 113, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4456 0, 84, 0, 0, 113, 0, 1345, 0, 0, 0,
4457 0, 0, 0, 112, 0, 0, 0, 0, 0, 0,
4458 1137, 0, 0, 1137, 0, 0, 0, 0, 0, 0,
4459 0, 0, 0, 0, 0, 112, 0, 1137, 0, 1137,
4460 113, 113, 1137, 1137, 113, 0, 247, 1137, 1137, 113,
4461 1136, 1138, 1138, 247, 247, 0, 0, 0, 101, 0,
4462 0, 0, 0, 0, 84, 0, 0, 0, 0, 0,
4463 112, 84, 84, 0, 0, 0, 84, 0, 1390, 0,
4464 1139, 1139, 0, 0, 0, 0, 0, 0, 0, 112,
4465 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4466 0, 0, 0, 0, 0, 0, 0, 0, 101, 0,
4467 112, 0, 0, 1137, 0, 0, 112, 0, 0, 1138,
4468 1138, 0, 0, 1138, 0, 0, 84, 0, 0, 0,
4469 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4470 1138, 0, 0, 0, 0, 0, 0, 0, 1139, 1139,
4471 0, 0, 1139, 0, 0, 0, 0, 0, 0, 0,
4472 112, 112, 0, 112, 112, 0, 0, 113, 0, 1139,
4473 0, 0, 112, 0, 0, 1137, 1138, 112, 0, 1137,
4474 0, 1137, 0, 0, 0, 0, 0, 0, 0, 0,
4475 0, 0, 113, 0, 113, 0, 0, 113, 113, 0,
4476 0, 0, 0, 113, 0, 1139, 0, 0, 0, 0,
4477 0, 1138, 0, 0, 1138, 0, 0, 0, 0, 0,
4478 0, 112, 113, 112, 0, 0, 0, 0, 1138, 0,
4479 1138, 112, 0, 1138, 1138, 0, 0, 0, 1138, 1138,
4480 1139, 0, 112, 1139, 112, 112, 0, 0, 0, 1137,
4481 0, 0, 0, 0, 0, 112, 112, 1139, 0, 1139,
4482 0, 0, 1139, 1139, 0, 0, 0, 1139, 1139, 0,
4483 0, 0, 113, 0, 113, 113, 113, 113, 0, 113,
4484 113, 112, 0, 0, 0, 0, 0, 0, 0, 112,
4485 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4486 113, 0, 0, 0, 1138, 0, 0, 0, 0, 0,
4487 0, 0, 0, 0, 0, 0, 0, 1140, 1140, 0,
4488 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4489 0, 0, 0, 1139, 0, 0, 0, 113, 0, 0,
4490 113, 0, 0, 0, 0, 80, 113, 113, 113, 0,
4491 0, 0, 0, 0, 0, 0, 0, 0, 0, 80,
4492 80, 0, 113, 0, 0, 0, 1138, 0, 0, 0,
4493 1138, 0, 1138, 0, 0, 0, 0, 0, 0, 0,
4494 0, 0, 0, 0, 0, 1140, 1140, 0, 113, 1140,
4495 0, 0, 0, 0, 0, 1139, 80, 80, 0, 1139,
4496 306, 1139, 0, 0, 0, 0, 1140, 0, 0, 0,
4497 113, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4498 0, 0, 0, 0, 112, 0, 112, 112, 0, 0,
4499 0, 0, 0, 306, 0, 0, 0, 0, 0, 0,
4500 1138, 0, 1140, 0, 0, 113, 0, 0, 0, 0,
4501 0, 0, 306, 306, 306, 0, 80, 0, 0, 0,
4502 0, 0, 0, 0, 113, 1141, 1141, 0, 0, 1139,
4503 0, 0, 0, 0, 0, 0, 0, 1140, 0, 0,
4504 1140, 0, 0, 0, 0, 113, 0, 0, 0, 0,
4505 0, 113, 112, 0, 1140, 0, 1140, 0, 0, 1140,
4506 1140, 0, 0, 0, 1140, 1140, 0, 0, 0, 112,
4507 0, 0, 0, 0, 112, 112, 0, 0, 0, 0,
4508 112, 112, 0, 0, 0, 0, 0, 0, 0, 112,
4509 112, 0, 0, 1141, 1141, 113, 113, 1141, 113, 113,
4510 0, 0, 0, 0, 0, 112, 0, 113, 0, 0,
4511 0, 0, 113, 0, 1141, 0, 0, 0, 0, 0,
4512 0, 0, 0, 0, 112, 0, 0, 0, 0, 0,
4513 1140, 0, 0, 0, 80, 0, 0, 0, 0, 0,
4514 0, 0, 0, 0, 0, 0, 0, 112, 112, 112,
4515 1141, 0, 0, 0, 0, 0, 113, 0, 113, 80,
4516 0, 80, 0, 0, 112, 0, 113, 0, 0, 0,
4517 80, 0, 0, 0, 0, 0, 0, 113, 0, 113,
4518 113, 112, 0, 0, 0, 1141, 0, 0, 1141, 80,
4519 113, 113, 1140, 0, 0, 0, 1140, 0, 1140, 0,
4520 0, 0, 1141, 0, 1141, 0, 0, 1141, 1141, 306,
4521 0, 0, 1141, 1141, 0, 0, 113, 0, 0, 0,
4522 0, -853, 0, 0, 113, 0, 0, 0, 0, -853,
4523 -853, -853, 0, 0, -853, -853, -853, 0, -853, 80,
4524 0, 0, 0, 0, 0, 0, -853, -853, -853, 0,
4525 0, 0, 0, 0, 0, 0, 0, 0, -853, -853,
4526 0, -853, -853, -853, -853, -853, 1140, 80, 306, 0,
4527 0, 0, 0, 112, 0, 0, 112, 112, 1141, 0,
4528 0, 0, 112, 0, 0, 0, 0, 0, 0, -853,
4529 -853, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4530 0, 0, 0, 0, 80, 0, 0, 80, 112, 0,
4531 0, 112, 0, 0, 80, 80, 0, 0, -853, -853,
4532 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4533 112, 0, 0, 368, -854, -854, -854, -854, 373, 374,
4534 1141, -853, -854, -854, 1141, 0, 1141, 0, 0, 0,
4535 381, 382, 112, 0, 0, 80, 0, 0, 0, 113,
4536 0, 113, 113, 0, 0, 0, 0, 112, 0, 0,
4537 0, 0, -853, -853, 0, -853, 0, 80, 255, -853,
4538 0, -853, 0, 0, 0, 0, 0, 0, 0, 0,
4539 0, 0, 385, 386, 387, 388, 389, 390, 391, 392,
4540 393, 394, 0, 0, 0, 0, 0, 0, 0, 0,
4541 0, 0, 80, 0, 1141, 0, 0, 0, 0, 0,
4542 0, 0, 0, 0, 0, 0, 81, 113, 0, 306,
4543 112, 80, 0, 0, 0, 0, 0, 112, 112, 0,
4544 81, 81, 112, 0, 113, 0, 0, 0, 0, 113,
4545 113, 0, 80, 0, 0, 113, 113, 0, 80, 0,
4546 0, 0, 0, 0, 113, 113, 0, 0, 0, 0,
4547 0, 0, 0, 0, 0, 0, 0, 81, 81, 0,
4548 113, 307, 0, 0, 0, 0, 0, 0, 0, 0,
4549 367, 0, 112, 0, 0, 0, 0, 0, 0, 113,
4550 0, 0, 0, 80, 0, 0, 80, 0, 0, 0,
4551 0, 0, 0, 0, 307, 0, 306, 0, 0, 80,
4552 0, 0, 113, 113, 113, 0, 0, 0, 0, 0,
4553 0, 0, 0, 307, 307, 307, 0, 81, 0, 113,
4554 0, 0, 0, 368, 369, 370, 371, 372, 373, 374,
4555 375, 376, 377, 378, 379, 380, 113, 0, 0, 0,
4556 381, 382, 91, 80, 0, 80, 383, 0, 0, 0,
4557 0, 0, 0, 80, 0, 0, 0, 0, 0, 0,
4558 0, 0, 0, 0, 80, 0, 80, 0, 0, 0,
4559 0, 0, 0, 0, 0, 0, 0, 80, 80, 0,
4560 384, 0, 385, 386, 387, 388, 389, 390, 391, 392,
4561 393, 394, 0, 91, 91, 0, 0, 0, 0, 0,
4562 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4563 0, 80, 0, 0, 0, 0, 0, 306, 0, 0,
4564 0, 0, 0, 0, 0, 0, 0, 0, 113, 0,
4565 0, 113, 113, 0, 0, 81, 0, 113, 0, 0,
4566 0, 0, 0, 0, 0, 0, 0, 0, 0, 417,
4567 141, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4568 81, 0, 81, 113, 0, 0, 113, 0, 0, 0,
4569 0, 81, 0, 0, 0, 0, 0, 0, 0, 0,
4570 0, 0, 0, 0, 0, 113, 0, 0, 0, 0,
4571 81, 0, 0, 0, 0, 0, 306, 0, 0, 0,
4572 0, 141, 141, 0, 0, 313, 0, 113, 0, 0,
4573 307, 0, 0, 0, 368, 369, 370, 371, 372, 373,
4574 374, 375, 113, 377, 378, 0, 0, 0, 0, 0,
4575 0, 381, 382, 0, 0, 0, 0, 0, 313, 0,
4576 81, 0, 0, 0, 0, 0, 0, 0, 0, 80,
4577 0, 0, 0, 0, 0, 0, 0, 422, 432, 432,
4578 0, 0, 0, 0, 0, 0, 0, 0, 81, 307,
4579 0, 91, 0, 385, 386, 387, 388, 389, 390, 391,
4580 392, 393, 394, 0, 0, 113, 0, 0, 0, 0,
4581 0, 0, 113, 113, 0, 0, 0, 113, 0, 0,
4582 0, 0, 0, 0, 0, 81, 0, 91, 81, 0,
4583 0, 0, 0, 0, 0, 81, 81, 0, 0, 0,
4584 0, 0, 0, 0, 0, 0, 91, 0, 0, 0,
4585 0, 80, 0, 0, 0, 0, 80, 80, 0, 0,
4586 0, 0, 80, 80, 0, 0, 0, 113, 0, 0,
4587 0, 80, 0, 0, 0, 0, 81, 0, 0, 0,
4588 0, 0, 0, 0, 0, 0, 0, 80, 0, 0,
4589 0, 0, 0, 0, 0, 0, 91, 0, 81, 141,
4590 0, 0, 0, 0, 0, 0, 80, 0, 0, 0,
4591 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4592 0, 0, 0, 0, 91, 0, 0, 0, 0, 80,
4593 80, 80, 0, 81, 0, 141, 0, 0, 0, 0,
4594 0, 0, 0, 0, 0, 0, 80, 0, 0, 0,
4595 307, 0, 81, 0, 141, 0, 689, 651, 0, 0,
4596 690, 0, 0, 80, 91, 0, 0, 0, 0, 0,
4597 0, 91, 91, 81, 313, 0, 0, 0, 0, 81,
4598 188, 189, 190, 191, 192, 193, 194, 195, 196, 0,
4599 0, 197, 198, 0, 0, 0, 0, 199, 200, 201,
4600 202, 0, 0, 0, 141, 0, 0, 0, 0, 0,
4601 0, 203, 204, 0, 0, 0, 0, 0, 0, 0,
4602 0, 0, 0, 0, 81, 0, 0, 81, 0, 0,
4603 0, 0, 141, 313, 0, 0, 0, 307, 0, 0,
4604 81, 205, 206, 207, 208, 209, 210, 211, 212, 213,
4605 214, 306, 215, 216, 0, 80, 0, 0, 80, 80,
4606 217, 255, 0, 0, 80, 0, 0, 0, 0, 91,
4607 0, 0, 141, 0, 0, 0, 137, 0, 0, 141,
4608 141, 0, 0, 0, 81, 0, 81, 0, 0, 0,
4609 80, 0, 0, 80, 81, 0, 0, 0, 0, 0,
4610 0, 0, 0, 0, 0, 81, 0, 81, 0, 91,
4611 0, 0, 0, 0, 0, 91, 0, 0, 81, 81,
4612 0, 0, 0, 0, 0, 0, 0, 137, 137, 0,
4613 0, 311, 0, 0, 80, 0, 0, 0, 0, 0,
4614 0, 0, 0, 0, 0, 0, 0, 0, 0, 80,
4615 0, 0, 81, 0, 0, 0, 0, 0, 307, 0,
4616 91, 0, 0, 91, 311, 0, 0, 0, 0, 0,
4617 0, 0, 306, 0, 0, 0, 817, 141, 0, 0,
4618 0, 0, 0, 420, 430, 430, 430, 0, 0, 0,
4619 0, 0, 0, 0, 313, 0, 0, 0, 0, 140,
4620 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4621 0, 0, 80, 0, 0, 0, 0, 141, 0, 0,
4622 91, 0, 91, 141, 80, 0, 0, 0, 0, 0,
4623 0, 0, 0, 0, 0, 0, 0, 307, 0, 0,
4624 0, 0, 0, 91, 306, 0, 0, 0, 0, 0,
4625 140, 140, 0, 0, 817, 817, 0, 0, 0, 0,
4626 0, 0, 0, 0, 0, 0, 0, 0, 141, 0,
4627 0, 141, 0, 0, 80, 0, 0, 0, 0, 0,
4628 0, 313, 0, 0, 823, 0, 0, 0, 817, 0,
4629 81, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4630 0, 0, 0, 0, 0, 137, 0, 0, 0, 0,
4631 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4632 0, 0, 0, 0, 0, 0, 0, 0, 141, 0,
4633 141, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4634 0, 137, 0, 0, 0, 0, 0, 0, 0, 0,
4635 0, 141, 0, 0, 0, 0, 0, 0, 0, 0,
4636 137, 0, 823, 823, 0, 0, 0, 0, 0, 0,
4637 0, 0, 81, 0, 0, 0, 0, 81, 81, 0,
4638 311, 0, 0, 81, 81, 0, 0, 0, 0, 0,
4639 0, 0, 81, 0, 0, 0, 823, 0, 0, 0,
4640 0, 0, 313, 0, 0, 0, 0, 0, 81, 0,
4641 137, 903, 0, 0, 0, 0, 0, 0, 0, 0,
4642 0, 0, 0, 0, 0, 0, 91, 81, 140, 0,
4643 0, 0, 0, 0, 0, 0, 0, 0, 137, 311,
4644 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4645 81, 81, 81, 0, 945, 0, 0, 0, 0, 0,
4646 0, 0, 0, 0, 140, 0, 0, 81, 0, 0,
4647 0, 0, 0, 0, 0, 0, 0, 0, 137, 0,
4648 0, 313, 0, 140, 81, 137, 137, 0, 368, 369,
4649 370, 371, 372, 373, 374, 375, 376, 377, 378, 379,
4650 380, 0, 0, 0, 0, 381, 382, 0, 0, 0,
4651 0, 0, 0, 817, 817, 0, 0, 0, 0, 817,
4652 817, 0, 0, 0, 0, 0, 0, 0, 91, 0,
4653 0, 0, 0, 140, 141, 0, 0, 0, 0, 0,
4654 0, 0, 0, 0, 91, 384, 0, 385, 386, 387,
4655 388, 389, 390, 391, 392, 393, 394, 0, 0, 0,
4656 0, 140, 0, 91, 0, -298, 0, 0, 0, 0,
4657 0, 0, 307, 0, 0, 0, 81, 0, 0, 81,
4658 81, 0, 0, 137, 0, 81, 91, 91, 817, 0,
4659 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4660 311, 140, 0, 817, 0, 0, 0, 0, 140, 140,
4661 0, 81, 0, 0, 81, 0, 0, 0, 0, 0,
4662 91, 823, 823, 137, 0, 0, 0, 823, 823, 137,
4663 0, 0, 0, 0, 0, 0, 141, 0, 0, 0,
4664 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4665 0, 0, 141, 0, 0, 81, 0, 0, 0, 0,
4666 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4667 81, 141, 0, 0, 137, 0, 0, 137, 0, 0,
4668 0, 0, 0, 0, 0, 0, 0, 311, 0, 0,
4669 0, 0, 0, 307, 141, 141, 823, 0, 0, 0,
4670 0, 0, 0, 0, 0, 0, 140, 0, 1225, 0,
4671 0, 823, 91, 0, 0, 91, 91, 0, 0, 0,
4672 0, 91, 0, 0, 0, 0, 0, 0, 141, 0,
4673 0, 0, 0, 81, 137, 0, 137, 0, 0, 0,
4674 0, 945, 0, 0, 0, 81, 140, 91, 0, 0,
4675 91, 0, 140, 0, 0, 0, 0, 137, 0, 0,
4676 0, 0, 0, 0, 0, 307, 0, 0, 0, 0,
4677 0, 0, 0, 0, 0, 368, 369, 370, 371, 372,
4678 373, 374, 375, 376, 377, 378, 379, 380, 0, 0,
4679 0, 91, 381, 382, 0, 81, 0, 140, 0, 0,
4680 140, 0, 0, 0, 0, 0, 91, 0, 311, 0,
4681 0, 0, 0, 140, 0, 0, 1229, 0, 0, 0,
4682 141, 0, 0, 141, 141, 0, 0, 0, 0, 141,
4683 239, 239, 384, 0, 385, 386, 387, 388, 389, 390,
4684 391, 392, 393, 394, 0, 0, 0, 0, 0, 0,
4685 0, 0, 0, 0, 0, 141, 0, 140, 141, 140,
4686 0, 0, 276, 280, 281, 282, 0, 0, 0, 239,
4687 239, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4688 140, 91, 329, 330, 0, 0, 0, 311, 0, 0,
4689 0, 140, 140, 22, 23, 24, 25, 0, 0, 141,
4690 0, 0, 0, 0, 0, 0, 0, 0, 0, 31,
4691 32, 33, 1099, 0, 141, 0, 1100, 0, 0, 40,
4692 41, 42, 43, 44, 0, 140, 0, 239, 0, 0,
4693 0, 91, 0, 0, 0, 0, 0, 432, 0, 0,
4694 137, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4695 0, 1102, 1103, 0, 0, 0, 0, 0, 0, 1104,
4696 0, 0, 1105, 0, 1106, 1107, 0, 1108, 0, 0,
4697 57, 58, 59, 60, 61, 62, 63, 64, 65, 0,
4698 0, 0, 0, 0, 0, 0, 0, 0, 0, 141,
4699 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4700 1110, 0, 0, 0, 0, 0, 0, 304, 0, 432,
4701 0, 0, 0, 0, 259, 0, 0, 0, 0, 0,
4702 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4703 0, 0, 0, 0, 0, 0, 0, 0, 0, 141,
4704 0, 0, 137, 239, 0, 0, 239, 239, 239, 0,
4705 329, 368, 369, 370, 371, 372, 373, 374, 137, 0,
4706 377, 378, 0, 140, 22, 23, 24, 25, 381, 382,
4707 239, 0, 239, 0, 0, 0, 0, 137, 0, 0,
4708 31, 32, 33, 1099, 0, 0, 0, 1100, 0, 1101,
4709 40, 41, 42, 43, 44, 0, 0, 0, 0, 0,
4710 137, 137, 0, 0, 0, 0, 0, 0, 0, 563,
4711 385, 386, 387, 388, 389, 390, 391, 392, 393, 394,
4712 0, 0, 1102, 1103, 0, 0, 0, 0, 0, 0,
4713 1104, 0, 0, 1105, 137, 1106, 1107, 0, 1108, 567,
4714 0, 57, 58, 1109, 60, 61, 62, 63, 64, 65,
4715 140, 140, 0, 0, 0, 0, 140, 140, 0, 0,
4716 0, 0, 0, 0, 0, 140, 0, 0, 0, 0,
4717 0, 1110, 0, 0, 0, 0, 0, 0, 304, 0,
4718 0, 140, 0, 617, 618, 619, 620, 621, 0, 0,
4719 622, 623, 624, 625, 626, 627, 628, 629, 0, 631,
4720 140, 0, 632, 633, 634, 635, 636, 637, 638, 639,
4721 640, 641, 0, 0, 0, 239, 0, 0, 0, 0,
4722 0, 0, 1227, 140, 140, 140, 137, 0, 0, 137,
4723 137, 0, 0, 0, 0, 137, 0, 0, 0, 0,
4724 140, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4725 0, 0, 0, 0, 0, 0, 0, 140, 0, 0,
4726 0, 137, 0, 0, 137, 0, 239, 0, 0, 0,
4727 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4728 0, 0, 0, 239, 239, 0, 0, 0, 239, 0,
4729 0, 0, 239, 0, 282, 0, 0, 0, 0, 0,
4730 0, 0, 0, 0, 0, 137, 0, 0, 0, 0,
4731 0, 0, 720, 0, 0, 0, 0, 0, 0, 0,
4732 137, 0, 0, 0, 0, 0, 0, 239, 0, 0,
4733 239, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4734 0, 0, 239, 430, 0, 0, 0, 0, 0, 140,
4735 0, 0, 140, 140, 0, 0, 0, 0, 140, 0,
4736 752, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4737 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4738 22, 23, 24, 25, 140, 0, 0, 140, 0, 0,
4739 0, 0, 0, 0, 0, 137, 31, 32, 33, 1099,
4740 0, 0, 0, 1100, 0, 239, 40, 41, 42, 43,
4741 44, 0, 0, 787, 0, 430, 787, 0, 0, 0,
4742 0, 0, 0, 0, 0, 239, 0, 0, 140, 0,
4743 818, 0, 0, 0, 0, 0, 0, 0, 1102, 1103,
4744 0, 0, 0, 140, 0, 137, 1104, 0, 0, 1105,
4745 0, 1106, 1107, 0, 1108, 0, 0, 57, 58, 59,
4746 60, 61, 62, 63, 64, 65, 0, 0, 0, 0,
4747 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4748 0, 0, 0, 0, 239, 0, 0, 1110, 0, 0,
4749 0, 0, 0, 0, 304, 239, 0, 0, 0, 0,
4750 0, 0, 0, 0, 0, 0, 0, 0, 877, 877,
4751 0, 0, 239, 877, 0, 0, 0, 0, 140, 0,
4752 0, 0, 0, 0, 877, 877, 0, 0, 239, 0,
4753 239, 0, 0, 0, 0, 0, 0, 787, 787, 0,
4754 0, 0, 877, 368, 369, 370, 371, 372, 373, 374,
4755 375, 376, 377, 378, 379, 380, 0, 0, 0, 0,
4756 381, 382, 0, 0, 0, 0, 0, 0, 140, 0,
4757 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4758 0, 0, 0, 0, 0, 0, 0, 0, 239, 0,
4759 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4760 384, 0, 385, 386, 387, 388, 389, 390, 391, 392,
4761 393, 394, 0, 0, 0, 0, 0, 239, 0, 259,
4762 0, 0, 0, -4, 3, 0, 4, 5, 6, 7,
4763 8, -4, -4, -4, 9, 10, 0, -4, -4, 11,
4764 -4, 12, 13, 14, 15, 16, 17, 18, -4, 239,
4765 0, 0, 0, 19, 20, 21, 22, 23, 24, 25,
4766 0, 0, 26, 0, 0, 0, 0, 239, 27, 28,
4767 284, 30, 31, 32, 33, 34, 35, 36, 37, 38,
4768 39, 0, 40, 41, 42, 43, 44, 45, 46, 0,
4769 0, -4, 0, 0, 0, 0, 0, 877, 0, 47,
4770 48, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4771 0, 0, 0, 0, 49, 50, 0, 0, 0, 0,
4772 0, 0, 51, 0, 0, 52, 53, 54, 55, 0,
4773 56, 0, 0, 57, 58, 59, 60, 61, 62, 63,
4774 64, 65, 0, -4, 0, 787, 0, 0, 0, 0,
4775 0, 0, 0, 0, 239, 0, 0, 0, 0, 0,
4776 0, 0, 239, 0, 0, 0, 1036, 877, 877, 0,
4777 66, 67, 68, 877, 877, -4, 0, 239, 0, 0,
4778 0, -4, 0, 546, 0, 0, 0, 0, 0, 239,
4779 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4780 0, 0, 0, 0, 0, 0, 0, 877, 877, 0,
4781 877, 877, 0, 239, 0, 787, 0, 0, 0, 0,
4782 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4783 0, 0, 0, 0, 1090, 1091, 0, 0, 239, 0,
4784 0, 0, 877, 1097, -853, 3, 0, 4, 5, 6,
4785 7, 8, 0, 0, 0, 9, 10, 877, 0, 0,
4786 11, 0, 12, 13, 14, 15, 16, 17, 18, 0,
4787 0, 0, 0, 239, 19, 20, 21, 22, 23, 24,
4788 25, 877, 0, 26, 0, 0, 0, 0, 0, 27,
4789 28, 284, 30, 31, 32, 33, 34, 35, 36, 37,
4790 38, 39, 0, 40, 41, 42, 43, 44, 45, 46,
4791 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4792 47, 48, 0, 0, 0, 0, 0, 0, 0, 0,
4793 0, 0, 0, 0, 0, 49, 50, 0, 0, 0,
4794 0, 0, 0, 51, 0, 0, 52, 53, 54, 55,
4795 0, 56, 0, 0, 57, 58, 59, 60, 61, 62,
4796 63, 64, 65, 0, -853, 0, 0, 0, 0, 0,
4797 0, 239, 0, 0, 0, 0, 0, 0, 0, 0,
4798 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4799 0, 66, 67, 68, 0, 0, -853, 3, -853, 4,
4800 5, 6, 7, 8, -853, 0, 0, 9, 10, 0,
4801 0, 0, 11, 0, 12, 13, 14, 15, 16, 17,
4802 18, 0, 0, 0, 0, 0, 19, 20, 21, 22,
4803 23, 24, 25, 0, 0, 26, 0, 0, 0, 0,
4804 0, 27, 28, 29, 30, 31, 32, 33, 34, 35,
4805 36, 37, 38, 39, 0, 40, 41, 42, 43, 44,
4806 45, 46, 0, 0, 0, 0, 0, 0, 0, 0,
4807 0, 0, 47, 48, 0, 0, 0, 0, 0, 0,
4808 0, 0, 0, 0, 0, 0, 0, 49, 50, 0,
4809 0, 0, 0, 0, 0, 51, 0, 0, 52, 53,
4810 54, 55, 0, 56, 0, 0, 57, 58, 59, 60,
4811 61, 62, 63, 64, 65, 0, 0, 0, 0, 0,
4812 0, 0, 0, 239, 0, 0, 0, 0, 0, 0,
4813 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4814 0, 0, 0, 66, 67, 68, 0, 0, -4, 3,
4815 -853, 4, 5, 6, 7, 8, -853, 0, 0, 9,
4816 10, 0, 0, 0, 11, 0, 12, 13, 14, 15,
4817 16, 17, 18, 0, 0, 0, 0, 0, 19, 20,
4818 21, 22, 23, 24, 25, 0, 0, 26, 0, 0,
4819 0, 0, 0, 27, 28, 29, 30, 31, 32, 33,
4820 34, 35, 36, 37, 38, 39, 0, 40, 41, 42,
4821 43, 44, 45, 46, 0, 0, 0, 0, 0, 0,
4822 0, 0, 0, 0, 47, 48, 0, 0, 0, 0,
4823 0, 0, 0, 0, 0, 0, 0, 0, 0, 49,
4824 50, 0, 0, 0, 0, 0, 0, 51, 0, 0,
4825 52, 53, 54, 55, 0, 56, 0, 0, 57, 58,
4826 59, 60, 61, 62, 63, 64, 65, 0, 0, 0,
4827 0, 0, 0, 0, 0, 0, -835, 0, 0, 0,
4828 0, 0, 0, 0, -835, -835, -835, 0, 0, -835,
4829 -835, -835, 0, -835, 0, 66, 67, 68, 0, 0,
4830 -4, -835, -835, -835, -835, -835, 0, 0, 546, 0,
4831 0, 0, 0, -835, -835, 0, -835, -835, -835, -835,
4832 -835, 0, 0, 0, 368, 369, 370, 371, 372, 373,
4833 374, 375, 376, 377, 378, 379, 380, 0, 0, 0,
4834 0, 381, 382, 0, -835, -835, 0, 0, 0, 0,
4835 0, 0, 0, 0, -835, -835, -835, -835, -835, -835,
4836 -835, -835, -835, -835, -835, -835, -835, 0, 0, 0,
4837 0, -835, -835, -835, -835, 0, 885, -835, 0, 0,
4838 0, 384, -835, 385, 386, 387, 388, 389, 390, 391,
4839 392, 393, 394, 0, 0, 0, -835, 0, 0, -835,
4840 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4841 -146, -835, -835, -835, -835, -835, -835, -835, -835, -835,
4842 -835, -835, -835, 0, 0, 0, 0, -835, -835, -835,
4843 -835, -835, -699, 0, -835, -835, -835, 0, 0, 0,
4844 -699, -699, -699, 0, 0, -699, -699, -699, 0, -699,
4845 0, 0, 0, 0, 0, 0, 0, -699, 0, -699,
4846 -699, -699, 0, 0, 0, 0, 0, 0, 0, -699,
4847 -699, 0, -699, -699, -699, -699, -699, 0, 0, 0,
4848 368, 369, 370, 371, 372, 373, 374, 375, 376, 377,
4849 378, -854, -854, 0, 0, 0, 0, 381, 382, 0,
4850 -699, -699, 0, 0, 0, 0, 0, 0, 0, 0,
4851 -699, -699, -699, -699, -699, -699, -699, -699, -699, -699,
4852 -699, -699, -699, 0, 0, 0, 0, -699, -699, -699,
4853 -699, 0, -699, -699, 0, 0, 0, 0, -699, 385,
4854 386, 387, 388, 389, 390, 391, 392, 393, 394, 0,
4855 0, 0, -699, 0, 0, -699, 0, 0, 0, 0,
4856 0, 0, 0, 0, 0, 0, -699, -699, -699, -699,
4857 -699, -699, -699, -699, -699, -699, -699, -699, -699, 0,
4858 0, 0, 0, 0, -699, -699, -699, -699, -700, 0,
4859 -699, -699, -699, 0, 0, 0, -700, -700, -700, 0,
4860 0, -700, -700, -700, 0, -700, 0, 0, 0, 0,
4861 0, 0, 0, -700, 0, -700, -700, -700, 0, 0,
4862 0, 0, 0, 0, 0, -700, -700, 0, -700, -700,
4863 -700, -700, -700, 0, 0, 0, 0, 0, 0, 0,
4864 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4865 0, 0, 0, 0, 0, 0, -700, -700, 0, 0,
4866 0, 0, 0, 0, 0, 0, -700, -700, -700, -700,
4867 -700, -700, -700, -700, -700, -700, -700, -700, -700, 0,
4868 0, 0, 0, -700, -700, -700, -700, 0, -700, -700,
4869 0, 0, 0, 0, -700, 0, 0, 0, 0, 0,
4870 0, 0, 0, 0, 0, 0, 0, 0, -700, 0,
4871 0, -700, 0, 0, 0, 0, 0, 0, 0, 0,
4872 0, 0, -700, -700, -700, -700, -700, -700, -700, -700,
4873 -700, -700, -700, -700, -700, 0, 0, 0, 0, 0,
4874 -700, -700, -700, -700, -836, 0, -700, -700, -700, 0,
4875 0, 0, -836, -836, -836, 0, 0, -836, -836, -836,
4876 0, -836, 0, 0, 0, 0, 0, 0, 0, -836,
4877 -836, -836, -836, -836, 0, 0, 0, 0, 0, 0,
4878 0, -836, -836, 0, -836, -836, -836, -836, -836, 0,
4879 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4880 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4881 0, 0, -836, -836, 0, 0, 0, 0, 0, 0,
4882 0, 0, -836, -836, -836, -836, -836, -836, -836, -836,
4883 -836, -836, -836, -836, -836, 0, 0, 0, 0, -836,
4884 -836, -836, -836, 0, 0, -836, 0, 0, 0, 0,
4885 -836, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4886 0, 0, 0, 0, -836, 0, 0, -836, 0, 0,
4887 0, 0, 0, 0, 0, 0, 0, 0, 0, -836,
4888 -836, -836, -836, -836, -836, -836, -836, -836, -836, -836,
4889 -836, 0, 0, 0, 0, -836, -836, -836, -836, -836,
4890 -837, 0, -836, -836, -836, 0, 0, 0, -837, -837,
4891 -837, 0, 0, -837, -837, -837, 0, -837, 0, 0,
4892 0, 0, 0, 0, 0, -837, -837, -837, -837, -837,
4893 0, 0, 0, 0, 0, 0, 0, -837, -837, 0,
4894 -837, -837, -837, -837, -837, 0, 0, 0, 0, 0,
4895 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4896 0, 0, 0, 0, 0, 0, 0, 0, -837, -837,
4897 0, 0, 0, 0, 0, 0, 0, 0, -837, -837,
4898 -837, -837, -837, -837, -837, -837, -837, -837, -837, -837,
4899 -837, 0, 0, 0, 0, -837, -837, -837, -837, 0,
4900 0, -837, 0, 0, 0, 0, -837, 0, 0, 0,
4901 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4902 -837, 0, 0, -837, 0, 0, 0, 0, 0, 0,
4903 0, 0, 0, 0, 0, -837, -837, -837, -837, -837,
4904 -837, -837, -837, -837, -837, -837, -837, 0, 0, 0,
4905 0, -837, -837, -837, -837, -837, -514, 0, -837, -837,
4906 -837, 0, 0, 0, -514, -514, -514, 0, 0, -514,
4907 -514, -514, 0, -514, 0, 0, 0, 0, 0, 0,
4908 0, -514, -514, -514, -514, 0, 0, 0, 0, 0,
4909 0, 0, 0, -514, -514, 0, -514, -514, -514, -514,
4910 -514, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4911 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4912 0, 0, 0, 0, -514, -514, 0, 0, 0, 0,
4913 0, 0, 0, 0, -514, -514, -514, -514, -514, -514,
4914 -514, -514, -514, -514, -514, -514, -514, 0, 0, 0,
4915 0, -514, -514, -514, -514, 0, 0, -514, 0, 0,
4916 0, 0, -514, 0, 0, 0, 0, 0, 0, 0,
4917 0, 0, 0, 0, 0, 0, -514, 0, 0, 0,
4918 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4919 0, -514, 0, -514, -514, -514, -514, -514, -514, -514,
4920 -514, -514, -514, 0, 0, 0, 0, -514, -514, -514,
4921 -514, -514, -350, 255, -514, -514, -514, 0, 0, 0,
4922 -350, -350, -350, 0, 0, -350, -350, -350, 0, -350,
4923 0, 0, 0, 0, 0, 0, 0, -350, 0, -350,
4924 -350, -350, 0, 0, 0, 0, 0, 0, 0, -350,
4925 -350, 0, -350, -350, -350, -350, -350, 0, 0, 0,
4926 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4927 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4928 -350, -350, 0, 0, 0, 0, 0, 0, 0, 0,
4929 -350, -350, -350, -350, -350, -350, -350, -350, -350, -350,
4930 -350, -350, -350, 0, 0, 0, 0, -350, -350, -350,
4931 -350, 0, 0, -350, 0, 0, 0, 0, -350, 0,
4932 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4933 0, 0, -350, 0, 0, -350, 0, 0, 0, 0,
4934 0, 0, 0, 0, 0, 0, 0, -350, -350, -350,
4935 -350, -350, -350, -350, -350, -350, -350, -350, -350, 0,
4936 0, 0, 0, 0, -350, -350, -350, -350, -853, 0,
4937 -350, -350, -350, 0, 0, 0, -853, -853, -853, 0,
4938 0, -853, -853, -853, 0, -853, 0, 0, 0, 0,
4939 0, 0, 0, -853, -853, -853, -853, 0, 0, 0,
4940 0, 0, 0, 0, 0, -853, -853, 0, -853, -853,
4941 -853, -853, -853, 0, 0, 0, 0, 0, 0, 0,
4942 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4943 0, 0, 0, 0, 0, 0, -853, -853, 0, 0,
4944 0, 0, 0, 0, 0, 0, -853, -853, -853, -853,
4945 -853, -853, -853, -853, -853, -853, -853, -853, -853, 0,
4946 0, 0, 0, -853, -853, -853, -853, 0, 0, -853,
4947 0, 0, 0, 0, -853, 0, 0, 0, 0, 0,
4948 0, 0, 0, 0, 0, 0, 0, 0, -853, 0,
4949 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4950 0, 0, 0, -853, 0, -853, -853, -853, -853, -853,
4951 -853, -853, -853, -853, -853, 0, 0, 0, 0, -853,
4952 -853, -853, -853, -853, -356, 255, -853, -853, -853, 0,
4953 0, 0, -356, -356, -356, 0, 0, -356, -356, -356,
4954 0, -356, 0, 0, 0, 0, 0, 0, 0, -356,
4955 0, -356, -356, 0, 0, 0, 0, 0, 0, 0,
4956 0, -356, -356, 0, -356, -356, -356, -356, -356, 0,
4957 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4958 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4959 0, 0, -356, -356, 0, 0, 0, 0, 0, 0,
4960 0, 0, -356, -356, -356, -356, -356, -356, -356, -356,
4961 -356, -356, -356, -356, -356, 0, 0, 0, 0, -356,
4962 -356, -356, -356, 0, 886, -356, 0, 0, 0, 0,
4963 -356, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4964 0, 0, 0, 0, -356, 0, 0, 0, 0, 0,
4965 0, 0, 0, 0, 0, 0, 0, 0, -147, -356,
4966 0, -356, -356, -356, -356, -356, -356, -356, -356, -356,
4967 -356, 0, 0, 0, 0, 829, -356, -356, -356, -356,
4968 -363, 0, -356, -356, -356, 0, 0, 0, -363, -363,
4969 -363, 0, 0, -363, -363, -363, 0, -363, 0, 0,
4970 0, 0, 0, 0, 0, -363, 0, -363, -363, 0,
4971 0, 0, 0, 0, 0, 0, 0, -363, -363, 0,
4972 -363, -363, -363, -363, -363, 0, 0, 0, 0, 0,
4973 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4974 0, 0, 0, 0, 0, 0, 0, 0, -363, -363,
4975 0, 0, 0, 0, 0, 0, 0, 0, -363, -363,
4976 -363, -363, -363, -363, -363, -363, -363, -363, -363, -363,
4977 -363, 0, 0, 0, 0, -363, -363, -363, -363, 0,
4978 0, -363, 0, 0, 0, 0, -363, 0, 0, 0,
4979 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4980 -363, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4981 0, 0, 0, 0, 0, -363, 0, -363, -363, -363,
4982 -363, -363, -363, -363, -363, -363, -363, 0, 0, 0,
4983 0, 0, -363, -363, -363, -363, -835, 451, -363, -363,
4984 -363, 0, 0, 0, -835, -835, -835, 0, 0, 0,
4985 -835, -835, 0, -835, 0, 0, 0, 0, 0, 0,
4986 0, -835, -835, 0, 0, 0, 0, 0, 0, 0,
4987 0, 0, 0, -835, -835, 0, -835, -835, -835, -835,
4988 -835, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4989 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4990 0, 0, 0, 0, -835, -835, 0, 0, 0, 0,
4991 0, 0, 0, 0, -835, -835, -835, -835, -835, -835,
4992 -835, -835, -835, -835, -835, -835, -835, 0, 0, 0,
4993 0, -835, -835, -835, -835, 0, 827, -835, 0, 0,
4994 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4995 0, 0, 0, 0, 0, 0, -835, 0, 0, 0,
4996 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4997 -146, -835, 0, -835, -835, -835, -835, -835, -835, -835,
4998 -835, -835, -835, 0, 0, 0, 0, -835, -835, -835,
4999 -835, -137, -835, 0, -835, 0, -835, 0, 0, 0,
5000 -835, -835, -835, 0, 0, 0, -835, -835, 0, -835,
5001 0, 0, 0, 0, 0, 0, 0, -835, -835, 0,
5002 0, 0, 0, 0, 0, 0, 0, 0, 0, -835,
5003 -835, 0, -835, -835, -835, -835, -835, 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 -835, -835, 0, 0, 0, 0, 0, 0, 0, 0,
5007 -835, -835, -835, -835, -835, -835, -835, -835, -835, -835,
5008 -835, -835, -835, 0, 0, 0, 0, -835, -835, -835,
5009 -835, 0, 827, -835, 0, 0, 0, 0, 0, 0,
5010 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5011 0, 0, -835, 0, 0, 0, 0, 0, 0, 0,
5012 0, 0, 0, 0, 0, 0, -146, -835, 0, -835,
5013 -835, -835, -835, -835, -835, -835, -835, -835, -835, 0,
5014 0, 0, 0, -835, -835, -835, -835, -835, -356, 0,
5015 -835, 0, -835, 0, 0, 0, -356, -356, -356, 0,
5016 0, 0, -356, -356, 0, -356, 0, 0, 0, 0,
5017 0, 0, 0, -356, 0, 0, 0, 0, 0, 0,
5018 0, 0, 0, 0, 0, -356, -356, 0, -356, -356,
5019 -356, -356, -356, 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, -356, -356, 0, 0,
5022 0, 0, 0, 0, 0, 0, -356, -356, -356, -356,
5023 -356, -356, -356, -356, -356, -356, -356, -356, -356, 0,
5024 0, 0, 0, -356, -356, -356, -356, 0, 828, -356,
5025 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5026 0, 0, 0, 0, 0, 0, 0, 0, -356, 0,
5027 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5028 0, 0, -147, -356, 0, -356, -356, -356, -356, -356,
5029 -356, -356, -356, -356, -356, 0, 0, 0, 0, 829,
5030 -356, -356, -356, -138, -356, 0, -356, 0, -356, 0,
5031 0, 0, -356, -356, -356, 0, 0, 0, -356, -356,
5032 0, -356, 0, 0, 0, 0, 0, 0, 0, -356,
5033 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5034 0, -356, -356, 0, -356, -356, -356, -356, -356, 0,
5035 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5036 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5037 0, 0, -356, -356, 0, 0, 0, 0, 0, 0,
5038 0, 0, -356, -356, -356, -356, -356, -356, -356, -356,
5039 -356, -356, -356, -356, -356, 0, 0, 0, 0, -356,
5040 -356, -356, -356, 0, 828, -356, 0, 0, 0, 0,
5041 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5042 0, 0, 0, 0, -356, 0, 0, 0, 0, 0,
5043 0, 0, 0, 0, 0, 0, 0, 0, -147, -356,
5044 0, -356, -356, -356, -356, -356, -356, -356, -356, -356,
5045 -356, 0, 0, 0, 0, 829, -356, -356, -356, -356,
5046 0, 0, -356, 3, -356, 4, 5, 6, 7, 8,
5047 -853, -853, -853, 9, 10, 0, 0, -853, 11, 0,
5048 12, 13, 14, 15, 16, 17, 18, 0, 0, 0,
5049 0, 0, 19, 20, 21, 22, 23, 24, 25, 0,
5050 0, 26, 0, 0, 0, 0, 0, 27, 28, 284,
5051 30, 31, 32, 33, 34, 35, 36, 37, 38, 39,
5052 0, 40, 41, 42, 43, 44, 45, 46, 0, 0,
5053 -853, 0, 0, 0, 0, 0, 0, 0, 47, 48,
5054 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5055 0, 0, 0, 49, 50, 0, 0, 0, 0, 0,
5056 0, 51, 0, 0, 52, 53, 54, 55, 0, 56,
5057 0, 0, 57, 58, 59, 60, 61, 62, 63, 64,
5058 65, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5059 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5060 0, 0, 0, 0, 0, 0, 0, 0, 0, 66,
5061 67, 68, 0, 0, 0, 3, -853, 4, 5, 6,
5062 7, 8, -853, 0, -853, 9, 10, 0, -853, -853,
5063 11, 0, 12, 13, 14, 15, 16, 17, 18, 0,
5064 0, 0, 0, 0, 19, 20, 21, 22, 23, 24,
5065 25, 0, 0, 26, 0, 0, 0, 0, 0, 27,
5066 28, 284, 30, 31, 32, 33, 34, 35, 36, 37,
5067 38, 39, 0, 40, 41, 42, 43, 44, 45, 46,
5068 0, 0, -853, 0, 0, 0, 0, 0, 0, 0,
5069 47, 48, 0, 0, 0, 0, 0, 0, 0, 0,
5070 0, 0, 0, 0, 0, 49, 50, 0, 0, 0,
5071 0, 0, 0, 51, 0, 0, 52, 53, 54, 55,
5072 0, 56, 0, 0, 57, 58, 59, 60, 61, 62,
5073 63, 64, 65, 0, 0, 0, 0, 0, 0, 0,
5074 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5075 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5076 0, 66, 67, 68, 0, 0, 0, 3, -853, 4,
5077 5, 6, 7, 8, -853, 0, -853, 9, 10, 0,
5078 0, -853, 11, -853, 12, 13, 14, 15, 16, 17,
5079 18, 0, 0, 0, 0, 0, 19, 20, 21, 22,
5080 23, 24, 25, 0, 0, 26, 0, 0, 0, 0,
5081 0, 27, 28, 284, 30, 31, 32, 33, 34, 35,
5082 36, 37, 38, 39, 0, 40, 41, 42, 43, 44,
5083 45, 46, 0, 0, -853, 0, 0, 0, 0, 0,
5084 0, 0, 47, 48, 0, 0, 0, 0, 0, 0,
5085 0, 0, 0, 0, 0, 0, 0, 49, 50, 0,
5086 0, 0, 0, 0, 0, 51, 0, 0, 52, 53,
5087 54, 55, 0, 56, 0, 0, 57, 58, 59, 60,
5088 61, 62, 63, 64, 65, 0, 0, 0, 0, 0,
5089 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5090 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5091 0, 0, 0, 66, 67, 68, 0, 0, 0, 3,
5092 -853, 4, 5, 6, 7, 8, -853, 0, -853, 9,
5093 10, 0, 0, -853, 11, 0, 12, 13, 14, 15,
5094 16, 17, 18, -853, 0, 0, 0, 0, 19, 20,
5095 21, 22, 23, 24, 25, 0, 0, 26, 0, 0,
5096 0, 0, 0, 27, 28, 284, 30, 31, 32, 33,
5097 34, 35, 36, 37, 38, 39, 0, 40, 41, 42,
5098 43, 44, 45, 46, 0, 0, -853, 0, 0, 0,
5099 0, 0, 0, 0, 47, 48, 0, 0, 0, 0,
5100 0, 0, 0, 0, 0, 0, 0, 0, 0, 49,
5101 50, 0, 0, 0, 0, 0, 0, 51, 0, 0,
5102 52, 53, 54, 55, 0, 56, 0, 0, 57, 58,
5103 59, 60, 61, 62, 63, 64, 65, 0, 0, 0,
5104 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5105 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5106 0, 0, 0, 0, 0, 66, 67, 68, 0, 0,
5107 0, 3, -853, 4, 5, 6, 7, 8, -853, 0,
5108 -853, 9, 10, 0, 0, -853, 11, 0, 12, 13,
5109 14, 15, 16, 17, 18, 0, 0, 0, 0, 0,
5110 19, 20, 21, 22, 23, 24, 25, 0, 0, 26,
5111 0, 0, 0, 0, 0, 27, 28, 284, 30, 31,
5112 32, 33, 34, 35, 36, 37, 38, 39, 0, 40,
5113 41, 42, 43, 44, 45, 46, 0, 0, -853, 0,
5114 0, 0, 0, 0, 0, 0, 47, 48, 0, 0,
5115 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5116 0, 49, 50, 0, 0, 0, 0, 0, 0, 51,
5117 0, 0, 52, 53, 54, 55, 0, 56, 0, 0,
5118 57, 58, 59, 60, 61, 62, 63, 64, 65, 0,
5119 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5120 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5121 0, 0, 0, 0, 0, 0, 0, 66, 67, 68,
5122 0, 0, 0, 3, -853, 4, 5, 6, 7, 8,
5123 -853, -853, -853, 9, 10, 0, 0, 0, 11, 0,
5124 12, 13, 14, 15, 16, 17, 18, 0, 0, 0,
5125 0, 0, 19, 20, 21, 22, 23, 24, 25, 0,
5126 0, 26, 0, 0, 0, 0, 0, 27, 28, 284,
5127 30, 31, 32, 33, 34, 35, 36, 37, 38, 39,
5128 0, 40, 41, 42, 43, 44, 45, 46, 0, 0,
5129 -853, 0, 0, 0, 0, 0, 0, 0, 47, 48,
5130 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5131 0, 0, 0, 49, 50, 0, 0, 0, 0, 0,
5132 0, 51, 0, 0, 52, 53, 54, 55, 0, 56,
5133 0, 0, 57, 58, 59, 60, 61, 62, 63, 64,
5134 65, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5135 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5136 0, 0, 0, 0, 0, 0, 0, 0, 0, 66,
5137 67, 68, 0, 0, 0, 3, -853, 4, 5, 6,
5138 7, 8, -853, 0, -853, 9, 10, 0, 0, 0,
5139 11, 0, 12, 13, 14, 15, 16, 17, 18, 0,
5140 0, 0, 0, 0, 19, 20, 21, 22, 23, 24,
5141 25, 0, 0, 26, 0, 0, 0, 0, 0, 27,
5142 28, 284, 30, 31, 32, 33, 34, 35, 36, 37,
5143 38, 39, 0, 40, 41, 42, 43, 44, 45, 46,
5144 0, 0, -853, 0, 0, 0, 0, 0, 0, 0,
5145 47, 48, 0, 0, 0, 0, 0, 0, 0, 0,
5146 0, 0, 0, 0, 0, 49, 50, 0, 0, 0,
5147 0, 0, 0, 51, 0, 0, 52, 53, 54, 55,
5148 0, 56, 0, 0, 57, 58, 59, 60, 61, 62,
5149 63, 64, 65, 0, 0, 0, 0, 0, 0, 0,
5150 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5151 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5152 0, 66, 67, 68, 0, 0, 0, 3, -853, 4,
5153 5, 6, 7, 8, -853, 0, 0, 9, 10, 0,
5154 0, 0, 11, 0, 12, 13, 14, 15, 16, 17,
5155 18, 0, 0, 0, 0, 0, 19, 20, 21, 22,
5156 23, 24, 25, 0, 0, 26, 0, 0, 0, 0,
5157 0, 27, 28, 284, 30, 31, 32, 33, 34, 35,
5158 36, 37, 38, 39, 0, 40, 41, 42, 43, 44,
5159 45, 46, 0, 0, 0, 0, 0, 0, 0, 0,
5160 0, 0, 47, 48, 0, 0, 0, 0, 0, 0,
5161 0, 0, 0, 0, 0, 0, 0, 49, 50, 0,
5162 0, 0, 0, 0, 0, 51, 0, 0, 285, 53,
5163 54, 55, 0, 56, 0, 0, 57, 58, 59, 60,
5164 61, 62, 63, 64, 65, 0, 0, 0, 0, 0,
5165 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5166 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5167 0, 0, 0, 66, 67, 68, 0, 0, 0, 0,
5168 -853, 0, 0, 0, -853, 3, -853, 4, 5, 6,
5169 7, 8, 0, 0, 0, 9, 10, 0, 0, 0,
5170 11, 0, 12, 13, 14, 15, 16, 17, 18, 0,
5171 0, 0, 0, 0, 19, 20, 21, 22, 23, 24,
5172 25, 0, 0, 26, 0, 0, 0, 0, 0, 27,
5173 28, 284, 30, 31, 32, 33, 34, 35, 36, 37,
5174 38, 39, 0, 40, 41, 42, 43, 44, 45, 46,
5175 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5176 47, 48, 0, 0, 0, 0, 0, 0, 0, 0,
5177 0, 0, 0, 0, 0, 49, 50, 0, 0, 0,
5178 0, 0, 0, 51, 0, 0, 52, 53, 54, 55,
5179 0, 56, 0, 0, 57, 58, 59, 60, 61, 62,
5180 63, 64, 65, 0, 0, 0, 0, 0, 0, 0,
5181 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5182 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5183 0, 66, 67, 68, 0, 0, 0, 0, -853, 0,
5184 0, 0, -853, 3, -853, 4, 5, 6, 7, 8,
5185 0, 0, 0, 9, 10, 0, 0, 0, 11, 0,
5186 12, 13, 14, 15, 16, 17, 18, 0, 0, 0,
5187 0, 0, 19, 20, 21, 22, 23, 24, 25, 0,
5188 0, 26, 0, 0, 0, 0, 0, 27, 28, 29,
5189 30, 31, 32, 33, 34, 35, 36, 37, 38, 39,
5190 0, 40, 41, 42, 43, 44, 45, 46, 0, 0,
5191 0, 0, 0, 0, 0, 0, 0, 0, 47, 48,
5192 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5193 0, 0, 0, 49, 50, 0, 0, 0, 0, 0,
5194 0, 51, 0, 0, 52, 53, 54, 55, 0, 56,
5195 0, 0, 57, 58, 59, 60, 61, 62, 63, 64,
5196 65, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5197 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5198 0, 0, 0, 0, 0, 0, 0, 0, 0, 66,
5199 67, 68, 0, 0, -853, 3, -853, 4, 5, 6,
5200 7, 8, -853, 0, 0, 9, 10, 0, 0, 0,
5201 11, 0, 12, 13, 14, 15, 16, 17, 18, 0,
5202 0, 0, 0, 0, 19, 20, 21, 22, 23, 24,
5203 25, 0, 0, 26, 0, 0, 0, 0, 0, 27,
5204 28, 284, 30, 31, 32, 33, 34, 35, 36, 37,
5205 38, 39, 0, 40, 41, 42, 43, 44, 45, 46,
5206 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5207 47, 48, 0, 0, 0, 0, 0, 0, 0, 0,
5208 0, 0, 0, 0, 0, 49, 50, 0, 0, 0,
5209 0, 0, 0, 51, 0, 0, 52, 53, 54, 55,
5210 0, 56, 0, 0, 57, 58, 59, 60, 61, 62,
5211 63, 64, 65, 0, 0, 0, 0, 0, 0, 0,
5212 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5213 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5214 0, 66, 67, 68, 0, 0, -853, 404, -853, 4,
5215 5, 6, 0, 8, -853, 0, 0, 9, 10, 0,
5216 0, 0, 11, -3, 12, 13, 14, 15, 16, 17,
5217 18, 0, 0, 0, 0, 0, 19, 20, 21, 22,
5218 23, 24, 25, 0, 0, 26, 0, 0, 0, 0,
5219 0, 0, 28, 0, 0, 31, 32, 33, 34, 35,
5220 36, 37, 38, 39, 0, 40, 41, 42, 43, 44,
5221 45, 46, 0, 0, 0, 0, 0, 0, 0, 0,
5222 0, 0, 47, 48, 0, 0, 0, 0, 0, 0,
5223 0, 0, 0, 0, 0, 0, 0, 49, 50, 0,
5224 0, 0, 0, 0, 0, 229, 0, 0, 230, 53,
5225 54, 55, 0, 0, 0, 0, 57, 58, 59, 60,
5226 61, 62, 63, 64, 65, 0, 0, 0, 0, 0,
5227 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5228 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5229 0, 0, 0, 66, 67, 68, 0, 0, 0, 0,
5230 331, 0, 0, 0, 0, 0, 332, 144, 145, 146,
5231 147, 148, 149, 150, 151, 152, 153, 154, 155, 156,
5232 157, 158, 159, 160, 161, 162, 163, 164, 165, 166,
5233 167, 0, 0, 0, 168, 169, 170, 434, 435, 436,
5234 437, 175, 176, 177, 0, 0, 0, 0, 0, 178,
5235 179, 180, 181, 438, 439, 440, 441, 186, 36, 37,
5236 442, 39, 0, 0, 0, 0, 0, 0, 0, 0,
5237 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5238 188, 189, 190, 191, 192, 193, 194, 195, 196, 0,
5239 0, 197, 198, 0, 0, 0, 0, 199, 200, 201,
5240 202, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5241 0, 203, 204, 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, 0, 0, 0,
5244 0, 205, 206, 207, 208, 209, 210, 211, 212, 213,
5245 214, 0, 215, 216, 0, 0, 0, 0, 0, 0,
5246 217, 443, 144, 145, 146, 147, 148, 149, 150, 151,
5247 152, 153, 154, 155, 156, 157, 158, 159, 160, 161,
5248 162, 163, 164, 165, 166, 167, 0, 0, 0, 168,
5249 169, 170, 171, 172, 173, 174, 175, 176, 177, 0,
5250 0, 0, 0, 0, 178, 179, 180, 181, 182, 183,
5251 184, 185, 186, 36, 37, 187, 39, 0, 0, 0,
5252 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5253 0, 0, 0, 0, 0, 188, 189, 190, 191, 192,
5254 193, 194, 195, 196, 0, 0, 197, 198, 0, 0,
5255 0, 0, 199, 200, 201, 202, 0, 0, 0, 0,
5256 0, 0, 0, 0, 0, 0, 203, 204, 0, 0,
5257 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5258 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5259 0, 0, 0, 0, 0, 0, 205, 206, 207, 208,
5260 209, 210, 211, 212, 213, 214, 0, 215, 216, 0,
5261 0, 0, 0, 0, 0, 217, 144, 145, 146, 147,
5262 148, 149, 150, 151, 152, 153, 154, 155, 156, 157,
5263 158, 159, 160, 161, 162, 163, 164, 165, 166, 167,
5264 0, 0, 0, 168, 169, 170, 171, 172, 173, 174,
5265 175, 176, 177, 0, 0, 0, 0, 0, 178, 179,
5266 180, 181, 182, 183, 184, 185, 186, 262, 0, 187,
5267 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5268 0, 0, 0, 0, 0, 0, 0, 0, 0, 188,
5269 189, 190, 191, 192, 193, 194, 195, 196, 0, 0,
5270 197, 198, 0, 0, 0, 0, 199, 200, 201, 202,
5271 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5272 203, 204, 0, 0, 58, 0, 0, 0, 0, 0,
5273 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5274 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5275 205, 206, 207, 208, 209, 210, 211, 212, 213, 214,
5276 0, 215, 216, 0, 0, 0, 0, 0, 0, 217,
5277 144, 145, 146, 147, 148, 149, 150, 151, 152, 153,
5278 154, 155, 156, 157, 158, 159, 160, 161, 162, 163,
5279 164, 165, 166, 167, 0, 0, 0, 168, 169, 170,
5280 171, 172, 173, 174, 175, 176, 177, 0, 0, 0,
5281 0, 0, 178, 179, 180, 181, 182, 183, 184, 185,
5282 186, 0, 0, 187, 0, 0, 0, 0, 0, 0,
5283 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5284 0, 0, 0, 188, 189, 190, 191, 192, 193, 194,
5285 195, 196, 0, 0, 197, 198, 0, 0, 0, 0,
5286 199, 200, 201, 202, 0, 0, 0, 0, 0, 0,
5287 0, 0, 0, 0, 203, 204, 0, 0, 58, 0,
5288 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5289 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5290 0, 0, 0, 0, 205, 206, 207, 208, 209, 210,
5291 211, 212, 213, 214, 0, 215, 216, 0, 0, 0,
5292 0, 0, 0, 217, 144, 145, 146, 147, 148, 149,
5293 150, 151, 152, 153, 154, 155, 156, 157, 158, 159,
5294 160, 161, 162, 163, 164, 165, 166, 167, 0, 0,
5295 0, 168, 169, 170, 171, 172, 173, 174, 175, 176,
5296 177, 0, 0, 0, 0, 0, 178, 179, 180, 181,
5297 182, 183, 184, 185, 186, 0, 0, 187, 0, 0,
5298 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5299 0, 0, 0, 0, 0, 0, 0, 188, 189, 190,
5300 191, 192, 193, 194, 195, 196, 0, 0, 197, 198,
5301 0, 0, 0, 0, 199, 200, 201, 202, 0, 0,
5302 0, 0, 0, 0, 0, 0, 0, 0, 203, 204,
5303 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5304 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5305 0, 0, 0, 0, 0, 0, 0, 0, 205, 206,
5306 207, 208, 209, 210, 211, 212, 213, 214, 0, 215,
5307 216, 4, 5, 6, 0, 8, 0, 217, 0, 9,
5308 10, 0, 0, 0, 11, 0, 12, 13, 14, 270,
5309 271, 17, 18, 0, 0, 0, 0, 0, 19, 20,
5310 272, 22, 23, 24, 25, 0, 0, 227, 0, 0,
5311 0, 0, 0, 0, 302, 0, 0, 31, 32, 33,
5312 34, 35, 36, 37, 38, 39, 0, 40, 41, 42,
5313 43, 44, 45, 46, 0, 0, 0, 0, 0, 0,
5314 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5315 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5316 0, 0, 0, 0, 0, 0, 0, 303, 0, 0,
5317 230, 53, 54, 55, 0, 0, 0, 0, 57, 58,
5318 59, 60, 61, 62, 63, 64, 65, 0, 0, 4,
5319 5, 6, 0, 8, 0, 0, 0, 9, 10, 0,
5320 0, 0, 11, 0, 12, 13, 14, 270, 271, 17,
5321 18, 0, 0, 0, 0, 304, 19, 20, 272, 22,
5322 23, 24, 25, 305, 0, 227, 0, 0, 0, 0,
5323 0, 0, 302, 0, 0, 31, 32, 33, 34, 35,
5324 36, 37, 38, 39, 0, 40, 41, 42, 43, 44,
5325 45, 46, 0, 0, 0, 0, 0, 0, 0, 0,
5326 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5327 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5328 0, 0, 0, 0, 0, 303, 0, 0, 230, 53,
5329 54, 55, 0, 0, 0, 0, 57, 58, 59, 60,
5330 61, 62, 63, 64, 65, 0, 0, 4, 5, 6,
5331 0, 8, 0, 0, 0, 9, 10, 0, 0, 0,
5332 11, 0, 12, 13, 14, 15, 16, 17, 18, 0,
5333 0, 0, 0, 304, 19, 20, 21, 22, 23, 24,
5334 25, 612, 0, 227, 0, 0, 0, 0, 0, 0,
5335 28, 0, 0, 31, 32, 33, 34, 35, 36, 37,
5336 38, 39, 228, 40, 41, 42, 43, 44, 45, 46,
5337 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5338 47, 48, 0, 0, 0, 0, 0, 0, 0, 0,
5339 0, 0, 0, 0, 0, 49, 50, 0, 0, 0,
5340 0, 0, 0, 229, 0, 0, 230, 53, 54, 55,
5341 0, 231, 232, 233, 57, 58, 234, 60, 61, 62,
5342 63, 64, 65, 0, 0, 0, 0, 0, 0, 0,
5343 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5344 0, 0, 0, 0, 0, 0, 4, 5, 6, 0,
5345 8, 66, 235, 68, 9, 10, 0, 0, 259, 11,
5346 0, 12, 13, 14, 15, 16, 17, 18, 0, 0,
5347 0, 0, 0, 19, 20, 21, 22, 23, 24, 25,
5348 0, 0, 26, 0, 0, 0, 0, 0, 0, 28,
5349 0, 0, 31, 32, 33, 34, 35, 36, 37, 38,
5350 39, 0, 40, 41, 42, 43, 44, 45, 46, 0,
5351 0, 0, 0, 0, 0, 0, 0, 0, 0, 47,
5352 48, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5353 0, 0, 0, 0, 49, 50, 0, 0, 0, 0,
5354 0, 0, 229, 0, 0, 230, 53, 54, 55, 0,
5355 0, 0, 0, 57, 58, 59, 60, 61, 62, 63,
5356 64, 65, 0, 0, 0, 0, 0, 0, 0, 0,
5357 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5358 0, 0, 0, 3, 0, 4, 5, 6, 7, 8,
5359 66, 67, 68, 9, 10, 0, 0, 259, 11, 0,
5360 12, 13, 14, 15, 16, 17, 18, 0, 0, 0,
5361 0, 0, 19, 20, 21, 22, 23, 24, 25, 0,
5362 0, 26, 0, 0, 0, 0, 0, 27, 28, 0,
5363 30, 31, 32, 33, 34, 35, 36, 37, 38, 39,
5364 0, 40, 41, 42, 43, 44, 45, 46, 0, 0,
5365 0, 0, 0, 0, 0, 0, 0, 0, 47, 48,
5366 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5367 0, 0, 0, 49, 50, 0, 0, 0, 0, 0,
5368 0, 51, 0, 0, 52, 53, 54, 55, 0, 56,
5369 0, 0, 57, 58, 59, 60, 61, 62, 63, 64,
5370 65, 0, 0, 404, 0, 4, 5, 6, 0, 8,
5371 0, 0, 0, 9, 10, 0, 0, 0, 11, 0,
5372 12, 13, 14, 15, 16, 17, 18, 0, 0, 66,
5373 67, 68, 19, 20, 21, 22, 23, 24, 25, 0,
5374 0, 26, 0, 0, 0, 0, 0, 0, 28, 0,
5375 0, 31, 32, 33, 34, 35, 36, 37, 38, 39,
5376 0, 40, 41, 42, 43, 44, 45, 46, 0, 0,
5377 0, 0, 0, 0, 0, 0, 0, 0, 47, 48,
5378 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5379 0, 0, 0, 49, 50, 0, 0, 0, 0, 0,
5380 0, 229, 0, 0, 230, 53, 54, 55, 0, 0,
5381 0, 0, 57, 58, 59, 60, 61, 62, 63, 64,
5382 65, 0, 0, 0, 0, 4, 5, 6, 0, 8,
5383 0, 0, 0, 9, 10, 0, 0, 0, 11, 0,
5384 12, 13, 14, 15, 16, 17, 18, 0, 0, 66,
5385 67, 68, 19, 20, 21, 22, 23, 24, 25, 0,
5386 0, 227, 0, 0, 0, 0, 0, 0, 28, 0,
5387 0, 31, 32, 33, 34, 35, 36, 37, 38, 39,
5388 228, 40, 41, 42, 43, 44, 45, 46, 0, 0,
5389 0, 0, 0, 0, 0, 0, 0, 0, 47, 48,
5390 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5391 0, 0, 0, 49, 50, 0, 0, 0, 0, 0,
5392 0, 229, 0, 0, 230, 53, 54, 55, 0, 231,
5393 232, 233, 57, 58, 234, 60, 61, 62, 63, 64,
5394 65, 0, 0, 0, 0, 4, 5, 6, 0, 8,
5395 0, 0, 0, 9, 10, 0, 0, 0, 11, 0,
5396 12, 13, 14, 15, 16, 17, 18, 0, 0, 66,
5397 235, 68, 19, 20, 21, 22, 23, 24, 25, 0,
5398 0, 227, 0, 0, 0, 0, 0, 0, 28, 0,
5399 0, 31, 32, 33, 34, 35, 36, 37, 38, 39,
5400 228, 40, 41, 42, 43, 44, 45, 46, 0, 0,
5401 0, 0, 0, 0, 0, 0, 0, 0, 47, 48,
5402 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5403 0, 0, 0, 49, 479, 0, 0, 0, 0, 0,
5404 0, 229, 0, 0, 230, 53, 54, 55, 0, 231,
5405 232, 233, 57, 58, 234, 60, 61, 62, 63, 64,
5406 65, 0, 0, 0, 0, 4, 5, 6, 0, 8,
5407 0, 0, 0, 9, 10, 0, 0, 0, 11, 0,
5408 12, 13, 14, 270, 271, 17, 18, 0, 0, 66,
5409 235, 68, 19, 20, 272, 22, 23, 24, 25, 0,
5410 0, 227, 0, 0, 0, 0, 0, 0, 28, 0,
5411 0, 31, 32, 33, 34, 35, 36, 37, 38, 39,
5412 228, 40, 41, 42, 43, 44, 45, 46, 0, 0,
5413 0, 0, 0, 0, 0, 0, 0, 0, 47, 48,
5414 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5415 0, 0, 0, 49, 50, 0, 0, 0, 0, 0,
5416 0, 229, 0, 0, 230, 53, 54, 55, 0, 231,
5417 232, 233, 57, 58, 234, 60, 61, 62, 63, 64,
5418 65, 0, 0, 0, 0, 4, 5, 6, 0, 8,
5419 0, 0, 0, 9, 10, 0, 0, 0, 11, 0,
5420 12, 13, 14, 270, 271, 17, 18, 0, 0, 66,
5421 235, 68, 19, 20, 272, 22, 23, 24, 25, 0,
5422 0, 227, 0, 0, 0, 0, 0, 0, 28, 0,
5423 0, 31, 32, 33, 34, 35, 36, 37, 38, 39,
5424 228, 40, 41, 42, 43, 44, 45, 46, 0, 0,
5425 0, 0, 0, 0, 0, 0, 0, 0, 47, 48,
5426 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5427 0, 0, 0, 49, 479, 0, 0, 0, 0, 0,
5428 0, 229, 0, 0, 230, 53, 54, 55, 0, 231,
5429 232, 233, 57, 58, 234, 60, 61, 62, 63, 64,
5430 65, 0, 0, 0, 0, 4, 5, 6, 0, 8,
5431 0, 0, 0, 9, 10, 0, 0, 0, 11, 0,
5432 12, 13, 14, 270, 271, 17, 18, 0, 0, 66,
5433 235, 68, 19, 20, 272, 22, 23, 24, 25, 0,
5434 0, 227, 0, 0, 0, 0, 0, 0, 28, 0,
5435 0, 31, 32, 33, 34, 35, 36, 37, 38, 39,
5436 228, 40, 41, 42, 43, 44, 45, 46, 0, 0,
5437 0, 0, 0, 0, 0, 0, 0, 0, 47, 48,
5438 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5439 0, 0, 0, 49, 50, 0, 0, 0, 0, 0,
5440 0, 229, 0, 0, 230, 53, 54, 55, 0, 231,
5441 232, 0, 57, 58, 234, 60, 61, 62, 63, 64,
5442 65, 0, 0, 0, 0, 4, 5, 6, 0, 8,
5443 0, 0, 0, 9, 10, 0, 0, 0, 11, 0,
5444 12, 13, 14, 270, 271, 17, 18, 0, 0, 66,
5445 235, 68, 19, 20, 272, 22, 23, 24, 25, 0,
5446 0, 227, 0, 0, 0, 0, 0, 0, 28, 0,
5447 0, 31, 32, 33, 34, 35, 36, 37, 38, 39,
5448 228, 40, 41, 42, 43, 44, 45, 46, 0, 0,
5449 0, 0, 0, 0, 0, 0, 0, 0, 47, 48,
5450 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5451 0, 0, 0, 49, 50, 0, 0, 0, 0, 0,
5452 0, 229, 0, 0, 230, 53, 54, 55, 0, 0,
5453 232, 233, 57, 58, 234, 60, 61, 62, 63, 64,
5454 65, 0, 0, 0, 0, 4, 5, 6, 0, 8,
5455 0, 0, 0, 9, 10, 0, 0, 0, 11, 0,
5456 12, 13, 14, 270, 271, 17, 18, 0, 0, 66,
5457 235, 68, 19, 20, 272, 22, 23, 24, 25, 0,
5458 0, 227, 0, 0, 0, 0, 0, 0, 28, 0,
5459 0, 31, 32, 33, 34, 35, 36, 37, 38, 39,
5460 228, 40, 41, 42, 43, 44, 45, 46, 0, 0,
5461 0, 0, 0, 0, 0, 0, 0, 0, 47, 48,
5462 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5463 0, 0, 0, 49, 50, 0, 0, 0, 0, 0,
5464 0, 229, 0, 0, 230, 53, 54, 55, 0, 0,
5465 232, 0, 57, 58, 234, 60, 61, 62, 63, 64,
5466 65, 0, 0, 0, 0, 4, 5, 6, 0, 8,
5467 0, 0, 0, 9, 10, 0, 0, 0, 11, 0,
5468 12, 13, 14, 15, 16, 17, 18, 0, 0, 66,
5469 235, 68, 19, 20, 21, 22, 23, 24, 25, 0,
5470 0, 227, 0, 0, 0, 0, 0, 0, 28, 0,
5471 0, 31, 32, 33, 34, 35, 36, 37, 38, 39,
5472 0, 40, 41, 42, 43, 44, 45, 46, 0, 0,
5473 0, 0, 0, 0, 0, 0, 0, 0, 47, 48,
5474 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5475 0, 0, 0, 49, 50, 0, 0, 0, 0, 0,
5476 0, 229, 0, 0, 230, 53, 54, 55, 0, 802,
5477 0, 0, 57, 58, 59, 60, 61, 62, 63, 64,
5478 65, 0, 0, 0, 0, 4, 5, 6, 0, 8,
5479 0, 0, 0, 9, 10, 0, 0, 0, 11, 0,
5480 12, 13, 14, 15, 16, 17, 18, 0, 0, 66,
5481 235, 68, 19, 20, 21, 22, 23, 24, 25, 0,
5482 0, 227, 0, 0, 0, 0, 0, 0, 28, 0,
5483 0, 31, 32, 33, 34, 35, 36, 37, 38, 39,
5484 0, 40, 41, 42, 43, 44, 45, 46, 0, 0,
5485 0, 0, 0, 0, 0, 0, 0, 0, 47, 48,
5486 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5487 0, 0, 0, 49, 50, 0, 0, 0, 0, 0,
5488 0, 813, 0, 0, 230, 53, 54, 55, 0, 802,
5489 0, 0, 57, 58, 59, 60, 61, 62, 63, 64,
5490 65, 0, 0, 0, 0, 4, 5, 6, 0, 8,
5491 0, 0, 0, 9, 10, 0, 0, 0, 11, 0,
5492 12, 13, 14, 270, 271, 17, 18, 0, 0, 66,
5493 235, 68, 19, 20, 272, 22, 23, 24, 25, 0,
5494 0, 227, 0, 0, 0, 0, 0, 0, 28, 0,
5495 0, 31, 32, 33, 34, 35, 36, 37, 38, 39,
5496 0, 40, 41, 42, 43, 44, 45, 46, 0, 0,
5497 0, 0, 0, 0, 0, 0, 0, 0, 47, 48,
5498 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5499 0, 0, 0, 49, 50, 0, 0, 0, 0, 0,
5500 0, 229, 0, 0, 230, 53, 54, 55, 0, 974,
5501 0, 0, 57, 58, 59, 60, 61, 62, 63, 64,
5502 65, 0, 0, 0, 0, 4, 5, 6, 0, 8,
5503 0, 0, 0, 9, 10, 0, 0, 0, 11, 0,
5504 12, 13, 14, 270, 271, 17, 18, 0, 0, 66,
5505 235, 68, 19, 20, 272, 22, 23, 24, 25, 0,
5506 0, 227, 0, 0, 0, 0, 0, 0, 28, 0,
5507 0, 31, 32, 33, 34, 35, 36, 37, 38, 39,
5508 0, 40, 41, 42, 43, 44, 45, 46, 0, 0,
5509 0, 0, 0, 0, 0, 0, 0, 0, 47, 48,
5510 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5511 0, 0, 0, 49, 50, 0, 0, 0, 0, 0,
5512 0, 229, 0, 0, 230, 53, 54, 55, 0, 1023,
5513 0, 0, 57, 58, 59, 60, 61, 62, 63, 64,
5514 65, 0, 0, 0, 0, 4, 5, 6, 0, 8,
5515 0, 0, 0, 9, 10, 0, 0, 0, 11, 0,
5516 12, 13, 14, 270, 271, 17, 18, 0, 0, 66,
5517 235, 68, 19, 20, 272, 22, 23, 24, 25, 0,
5518 0, 227, 0, 0, 0, 0, 0, 0, 28, 0,
5519 0, 31, 32, 33, 34, 35, 36, 37, 38, 39,
5520 0, 40, 41, 42, 43, 44, 45, 46, 0, 0,
5521 0, 0, 0, 0, 0, 0, 0, 0, 47, 48,
5522 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5523 0, 0, 0, 49, 50, 0, 0, 0, 0, 0,
5524 0, 229, 0, 0, 230, 53, 54, 55, 0, 802,
5525 0, 0, 57, 58, 59, 60, 61, 62, 63, 64,
5526 65, 0, 0, 0, 0, 4, 5, 6, 0, 8,
5527 0, 0, 0, 9, 10, 0, 0, 0, 11, 0,
5528 12, 13, 14, 270, 271, 17, 18, 0, 0, 66,
5529 235, 68, 19, 20, 272, 22, 23, 24, 25, 0,
5530 0, 227, 0, 0, 0, 0, 0, 0, 28, 0,
5531 0, 31, 32, 33, 34, 35, 36, 37, 38, 39,
5532 0, 40, 41, 42, 43, 44, 45, 46, 0, 0,
5533 0, 0, 0, 0, 0, 0, 0, 0, 47, 48,
5534 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5535 0, 0, 0, 49, 50, 0, 0, 0, 0, 0,
5536 0, 229, 0, 0, 230, 53, 54, 55, 0, 1156,
5537 0, 0, 57, 58, 59, 60, 61, 62, 63, 64,
5538 65, 0, 0, 0, 0, 4, 5, 6, 0, 8,
5539 0, 0, 0, 9, 10, 0, 0, 0, 11, 0,
5540 12, 13, 14, 270, 271, 17, 18, 0, 0, 66,
5541 235, 68, 19, 20, 272, 22, 23, 24, 25, 0,
5542 0, 227, 0, 0, 0, 0, 0, 0, 28, 0,
5543 0, 31, 32, 33, 34, 35, 36, 37, 38, 39,
5544 0, 40, 41, 42, 43, 44, 45, 46, 0, 0,
5545 0, 0, 0, 0, 0, 0, 0, 0, 47, 48,
5546 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5547 0, 0, 0, 49, 50, 0, 0, 0, 0, 0,
5548 0, 229, 0, 0, 230, 53, 54, 55, 0, 0,
5549 0, 0, 57, 58, 59, 60, 61, 62, 63, 64,
5550 65, 0, 0, 0, 0, 4, 5, 6, 0, 8,
5551 0, 0, 0, 9, 10, 0, 0, 0, 11, 0,
5552 12, 13, 14, 15, 16, 17, 18, 0, 0, 66,
5553 235, 68, 19, 20, 21, 22, 23, 24, 25, 0,
5554 0, 227, 0, 0, 0, 0, 0, 0, 28, 0,
5555 0, 31, 32, 33, 34, 35, 36, 37, 38, 39,
5556 0, 40, 41, 42, 43, 44, 45, 46, 0, 0,
5557 0, 0, 0, 0, 0, 0, 0, 0, 47, 48,
5558 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5559 0, 0, 0, 49, 50, 0, 0, 0, 0, 0,
5560 0, 229, 0, 0, 230, 53, 54, 55, 0, 0,
5561 0, 0, 57, 58, 59, 60, 61, 62, 63, 64,
5562 65, 0, 0, 0, 0, 4, 5, 6, 0, 8,
5563 0, 0, 0, 9, 10, 0, 0, 0, 11, 0,
5564 12, 13, 14, 15, 16, 17, 18, 0, 0, 66,
5565 235, 68, 19, 20, 21, 22, 23, 24, 25, 0,
5566 0, 26, 0, 0, 0, 0, 0, 0, 28, 0,
5567 0, 31, 32, 33, 34, 35, 36, 37, 38, 39,
5568 0, 40, 41, 42, 43, 44, 45, 46, 0, 0,
5569 0, 0, 0, 0, 0, 0, 0, 0, 47, 48,
5570 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5571 0, 0, 0, 49, 50, 0, 0, 0, 0, 0,
5572 0, 229, 0, 0, 230, 53, 54, 55, 0, 0,
5573 0, 0, 57, 58, 59, 60, 61, 62, 63, 64,
5574 65, 0, 0, 0, 0, 4, 5, 6, 0, 8,
5575 0, 0, 0, 9, 10, 0, 0, 0, 11, 0,
5576 12, 13, 14, 15, 16, 17, 18, 0, 0, 66,
5577 67, 68, 19, 20, 21, 22, 23, 24, 25, 0,
5578 0, 784, 0, 0, 0, 0, 0, 0, 28, 0,
5579 0, 31, 32, 33, 34, 35, 36, 37, 38, 39,
5580 0, 40, 41, 42, 43, 44, 45, 46, 0, 0,
5581 0, 0, 0, 0, 0, 0, 0, 0, 47, 48,
5582 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5583 0, 0, 0, 49, 50, 0, 0, 0, 0, 0,
5584 0, 229, 0, 0, 230, 53, 54, 55, 0, 0,
5585 0, 0, 57, 58, 59, 60, 61, 62, 63, 64,
5586 65, 0, 0, 0, 0, 4, 5, 6, 0, 8,
5587 0, 0, 0, 9, 10, 0, 0, 0, 11, 0,
5588 12, 13, 14, 15, 16, 17, 18, 0, 0, 66,
5589 235, 68, 19, 20, 21, 22, 23, 24, 25, 0,
5590 0, 227, 0, 0, 0, 0, 0, 0, 28, 0,
5591 0, 31, 32, 33, 34, 35, 36, 37, 38, 39,
5592 0, 40, 41, 42, 43, 44, 45, 46, 0, 0,
5593 0, 0, 0, 0, 0, 0, 0, 0, 47, 48,
5594 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5595 0, 0, 0, 49, 50, 0, 0, 0, 0, 0,
5596 0, 813, 0, 0, 230, 53, 54, 55, 0, 0,
5597 0, 0, 57, 58, 59, 60, 61, 62, 63, 64,
5598 65, 0, 0, 0, 0, 4, 5, 6, 0, 8,
5599 0, 0, 0, 9, 10, 0, 0, 0, 11, 0,
5600 12, 13, 14, 270, 271, 17, 18, 0, 0, 66,
5601 235, 68, 19, 20, 272, 22, 23, 24, 25, 0,
5602 0, 893, 0, 0, 0, 0, 0, 0, 28, 0,
5603 0, 31, 32, 33, 34, 35, 36, 37, 38, 39,
5604 0, 40, 41, 42, 43, 44, 45, 46, 0, 0,
5605 0, 0, 0, 0, 0, 0, 0, 0, 47, 48,
5606 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5607 0, 0, 0, 49, 50, 0, 0, 0, 0, 0,
5608 0, 229, 0, 0, 230, 53, 54, 55, 0, 0,
5609 0, 0, 57, 58, 59, 60, 61, 62, 63, 64,
5610 65, 0, 0, 0, 0, 4, 5, 6, 0, 8,
5611 0, 0, 0, 9, 10, 0, 0, 0, 11, 0,
5612 12, 13, 14, 270, 271, 17, 18, 0, 0, 66,
5613 235, 68, 19, 20, 272, 22, 23, 24, 25, 0,
5614 0, 227, 0, 0, 0, 0, 0, 0, 302, 0,
5615 0, 31, 32, 33, 34, 35, 36, 37, 38, 39,
5616 0, 40, 41, 42, 43, 44, 45, 46, 0, 0,
5617 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5618 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5619 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5620 0, 303, 0, 0, 363, 53, 54, 55, 0, 364,
5621 0, 0, 57, 58, 59, 60, 61, 62, 63, 64,
5622 65, 0, 0, 4, 5, 6, 0, 8, 0, 0,
5623 0, 9, 10, 0, 0, 0, 11, 0, 12, 13,
5624 14, 270, 271, 17, 18, 0, 0, 0, 0, 304,
5625 19, 20, 272, 22, 23, 24, 25, 0, 0, 227,
5626 0, 0, 0, 0, 0, 0, 302, 0, 0, 31,
5627 32, 33, 34, 35, 36, 37, 38, 39, 0, 40,
5628 41, 42, 43, 44, 45, 46, 0, 0, 0, 0,
5629 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5630 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5631 0, 0, 0, 0, 0, 0, 0, 0, 0, 415,
5632 0, 0, 52, 53, 54, 55, 0, 56, 0, 0,
5633 57, 58, 59, 60, 61, 62, 63, 64, 65, 0,
5634 0, 4, 5, 6, 0, 8, 0, 0, 0, 9,
5635 10, 0, 0, 0, 11, 0, 12, 13, 14, 270,
5636 271, 17, 18, 0, 0, 0, 0, 304, 19, 20,
5637 272, 22, 23, 24, 25, 0, 0, 227, 0, 0,
5638 0, 0, 0, 0, 302, 0, 0, 31, 32, 33,
5639 423, 35, 36, 37, 424, 39, 0, 40, 41, 42,
5640 43, 44, 45, 46, 0, 0, 0, 0, 0, 0,
5641 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5642 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5643 0, 0, 0, 425, 0, 0, 0, 426, 0, 0,
5644 230, 53, 54, 55, 0, 0, 0, 0, 57, 58,
5645 59, 60, 61, 62, 63, 64, 65, 0, 0, 4,
5646 5, 6, 0, 8, 0, 0, 0, 9, 10, 0,
5647 0, 0, 11, 0, 12, 13, 14, 270, 271, 17,
5648 18, 0, 0, 0, 0, 304, 19, 20, 272, 22,
5649 23, 24, 25, 0, 0, 227, 0, 0, 0, 0,
5650 0, 0, 302, 0, 0, 31, 32, 33, 423, 35,
5651 36, 37, 424, 39, 0, 40, 41, 42, 43, 44,
5652 45, 46, 0, 0, 0, 0, 0, 0, 0, 0,
5653 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5654 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5655 0, 0, 0, 0, 0, 426, 0, 0, 230, 53,
5656 54, 55, 0, 0, 0, 0, 57, 58, 59, 60,
5657 61, 62, 63, 64, 65, 0, 0, 4, 5, 6,
5658 0, 8, 0, 0, 0, 9, 10, 0, 0, 0,
5659 11, 0, 12, 13, 14, 270, 271, 17, 18, 0,
5660 0, 0, 0, 304, 19, 20, 272, 22, 23, 24,
5661 25, 0, 0, 227, 0, 0, 0, 0, 0, 0,
5662 302, 0, 0, 31, 32, 33, 34, 35, 36, 37,
5663 38, 39, 0, 40, 41, 42, 43, 44, 45, 46,
5664 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5665 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5666 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5667 0, 0, 0, 303, 0, 0, 363, 53, 54, 55,
5668 0, 0, 0, 0, 57, 58, 59, 60, 61, 62,
5669 63, 64, 65, 0, 0, 4, 5, 6, 0, 8,
5670 0, 0, 0, 9, 10, 0, 0, 0, 11, 0,
5671 12, 13, 14, 270, 271, 17, 18, 0, 0, 0,
5672 0, 304, 19, 20, 272, 22, 23, 24, 25, 0,
5673 0, 227, 0, 0, 0, 0, 0, 0, 302, 0,
5674 0, 31, 32, 33, 34, 35, 36, 37, 38, 39,
5675 0, 40, 41, 42, 43, 44, 45, 46, 0, 0,
5676 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5677 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5678 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5679 0, 1224, 0, 0, 230, 53, 54, 55, 0, 0,
5680 0, 0, 57, 58, 59, 60, 61, 62, 63, 64,
5681 65, 0, 0, 4, 5, 6, 0, 8, 0, 0,
5682 0, 9, 10, 0, 0, 0, 11, 0, 12, 13,
5683 14, 270, 271, 17, 18, 0, 0, 0, 0, 304,
5684 19, 20, 272, 22, 23, 24, 25, 0, 0, 227,
5685 0, 0, 0, 0, 0, 0, 302, 0, 0, 31,
5686 32, 33, 34, 35, 36, 37, 38, 39, 0, 40,
5687 41, 42, 43, 44, 45, 46, 0, 0, 0, 0,
5688 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5689 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5690 0, 0, 0, 0, 0, 0, 0, 0, 0, 1344,
5691 0, 0, 230, 53, 54, 55, 22, 23, 24, 25,
5692 57, 58, 59, 60, 61, 62, 63, 64, 65, 0,
5693 0, 0, 31, 32, 33, 1099, 0, 0, 0, 1100,
5694 0, 0, 40, 41, 42, 43, 44, 0, 0, 0,
5695 0, 0, 0, 0, 0, 0, 0, 304, 0, 0,
5696 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5697 0, 0, 0, 0, 1102, 1103, 0, 0, 0, 0,
5698 0, 0, 1104, 0, 0, 1105, 0, 1106, 1107, 0,
5699 0, 0, 0, 57, 58, 59, 60, 61, 62, 63,
5700 64, 65, 0, 0, 0, 0, 0, 642, 643, 0,
5701 0, 644, 0, 0, 0, 0, 0, 0, 0, 0,
5702 0, 0, 0, 1110, 0, 0, 0, 0, 0, 0,
5703 304, 188, 189, 190, 191, 192, 193, 194, 195, 196,
5704 0, 0, 197, 198, 0, 0, 0, 0, 199, 200,
5705 201, 202, 0, 0, 0, 0, 0, 0, 0, 0,
5706 0, 0, 203, 204, 0, 0, 0, 0, 0, 0,
5707 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5708 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5709 0, 0, 205, 206, 207, 208, 209, 210, 211, 212,
5710 213, 214, 0, 215, 216, 650, 651, 0, 0, 652,
5711 0, 217, 0, 0, 0, 0, 0, 0, 0, 0,
5712 0, 0, 0, 0, 0, 0, 0, 0, 0, 188,
5713 189, 190, 191, 192, 193, 194, 195, 196, 0, 0,
5714 197, 198, 0, 0, 0, 0, 199, 200, 201, 202,
5715 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5716 203, 204, 0, 0, 0, 0, 0, 0, 0, 0,
5717 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5718 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5719 205, 206, 207, 208, 209, 210, 211, 212, 213, 214,
5720 0, 215, 216, 704, 643, 0, 0, 705, 0, 217,
5721 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5722 0, 0, 0, 0, 0, 0, 0, 188, 189, 190,
5723 191, 192, 193, 194, 195, 196, 0, 0, 197, 198,
5724 0, 0, 0, 0, 199, 200, 201, 202, 0, 0,
5725 0, 0, 0, 0, 0, 0, 0, 0, 203, 204,
5726 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5727 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5728 0, 0, 0, 0, 0, 0, 0, 0, 205, 206,
5729 207, 208, 209, 210, 211, 212, 213, 214, 0, 215,
5730 216, 707, 651, 0, 0, 708, 0, 217, 0, 0,
5731 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5732 0, 0, 0, 0, 0, 188, 189, 190, 191, 192,
5733 193, 194, 195, 196, 0, 0, 197, 198, 0, 0,
5734 0, 0, 199, 200, 201, 202, 0, 0, 0, 0,
5735 0, 0, 0, 0, 0, 0, 203, 204, 0, 0,
5736 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5737 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5738 0, 0, 0, 0, 0, 0, 205, 206, 207, 208,
5739 209, 210, 211, 212, 213, 214, 0, 215, 216, 704,
5740 643, 0, 0, 724, 0, 217, 0, 0, 0, 0,
5741 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5742 0, 0, 0, 188, 189, 190, 191, 192, 193, 194,
5743 195, 196, 0, 0, 197, 198, 0, 0, 0, 0,
5744 199, 200, 201, 202, 0, 0, 0, 0, 0, 0,
5745 0, 0, 0, 0, 203, 204, 0, 0, 0, 0,
5746 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5747 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5748 0, 0, 0, 0, 205, 206, 207, 208, 209, 210,
5749 211, 212, 213, 214, 0, 215, 216, 735, 643, 0,
5750 0, 736, 0, 217, 0, 0, 0, 0, 0, 0,
5751 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5752 0, 188, 189, 190, 191, 192, 193, 194, 195, 196,
5753 0, 0, 197, 198, 0, 0, 0, 0, 199, 200,
5754 201, 202, 0, 0, 0, 0, 0, 0, 0, 0,
5755 0, 0, 203, 204, 0, 0, 0, 0, 0, 0,
5756 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5757 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5758 0, 0, 205, 206, 207, 208, 209, 210, 211, 212,
5759 213, 214, 0, 215, 216, 738, 651, 0, 0, 739,
5760 0, 217, 0, 0, 0, 0, 0, 0, 0, 0,
5761 0, 0, 0, 0, 0, 0, 0, 0, 0, 188,
5762 189, 190, 191, 192, 193, 194, 195, 196, 0, 0,
5763 197, 198, 0, 0, 0, 0, 199, 200, 201, 202,
5764 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5765 203, 204, 0, 0, 0, 0, 0, 0, 0, 0,
5766 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5767 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5768 205, 206, 207, 208, 209, 210, 211, 212, 213, 214,
5769 0, 215, 216, 857, 643, 0, 0, 858, 0, 217,
5770 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5771 0, 0, 0, 0, 0, 0, 0, 188, 189, 190,
5772 191, 192, 193, 194, 195, 196, 0, 0, 197, 198,
5773 0, 0, 0, 0, 199, 200, 201, 202, 0, 0,
5774 0, 0, 0, 0, 0, 0, 0, 0, 203, 204,
5775 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5776 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5777 0, 0, 0, 0, 0, 0, 0, 0, 205, 206,
5778 207, 208, 209, 210, 211, 212, 213, 214, 0, 215,
5779 216, 860, 651, 0, 0, 861, 0, 217, 0, 0,
5780 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5781 0, 0, 0, 0, 0, 188, 189, 190, 191, 192,
5782 193, 194, 195, 196, 0, 0, 197, 198, 0, 0,
5783 0, 0, 199, 200, 201, 202, 0, 0, 0, 0,
5784 0, 0, 0, 0, 0, 0, 203, 204, 0, 0,
5785 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5786 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5787 0, 0, 0, 0, 0, 0, 205, 206, 207, 208,
5788 209, 210, 211, 212, 213, 214, 0, 215, 216, 866,
5789 643, 0, 0, 867, 0, 217, 0, 0, 0, 0,
5790 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5791 0, 0, 0, 188, 189, 190, 191, 192, 193, 194,
5792 195, 196, 0, 0, 197, 198, 0, 0, 0, 0,
5793 199, 200, 201, 202, 0, 0, 0, 0, 0, 0,
5794 0, 0, 0, 0, 203, 204, 0, 0, 0, 0,
5795 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5796 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5797 0, 0, 0, 0, 205, 206, 207, 208, 209, 210,
5798 211, 212, 213, 214, 0, 215, 216, 689, 651, 0,
5799 0, 690, 0, 217, 0, 0, 0, 0, 0, 0,
5800 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5801 0, 188, 189, 190, 191, 192, 193, 194, 195, 196,
5802 0, 0, 197, 198, 0, 0, 0, 0, 199, 200,
5803 201, 202, 0, 0, 0, 0, 0, 0, 0, 0,
5804 0, 0, 203, 204, 0, 0, 0, 0, 0, 0,
5805 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5806 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5807 0, 0, 205, 206, 207, 208, 209, 210, 211, 212,
5808 213, 214, 0, 215, 216, 1029, 643, 0, 0, 1030,
5809 0, 217, 0, 0, 0, 0, 0, 0, 0, 0,
5810 0, 0, 0, 0, 0, 0, 0, 0, 0, 188,
5811 189, 190, 191, 192, 193, 194, 195, 196, 0, 0,
5812 197, 198, 0, 0, 0, 0, 199, 200, 201, 202,
5813 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5814 203, 204, 0, 0, 0, 0, 0, 0, 0, 0,
5815 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5816 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5817 205, 206, 207, 208, 209, 210, 211, 212, 213, 214,
5818 0, 215, 216, 1032, 651, 0, 0, 1033, 0, 217,
5819 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5820 0, 0, 0, 0, 0, 0, 0, 188, 189, 190,
5821 191, 192, 193, 194, 195, 196, 0, 0, 197, 198,
5822 0, 0, 0, 0, 199, 200, 201, 202, 0, 0,
5823 0, 0, 0, 0, 0, 0, 0, 0, 203, 204,
5824 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5825 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5826 0, 0, 0, 0, 0, 0, 0, 0, 205, 206,
5827 207, 208, 209, 210, 211, 212, 213, 214, 0, 215,
5828 216, 1363, 643, 0, 0, 1364, 0, 217, 0, 0,
5829 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5830 0, 0, 0, 0, 0, 188, 189, 190, 191, 192,
5831 193, 194, 195, 196, 0, 0, 197, 198, 0, 0,
5832 0, 0, 199, 200, 201, 202, 0, 0, 0, 0,
5833 0, 0, 0, 0, 0, 0, 203, 204, 0, 0,
5834 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5835 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5836 0, 0, 0, 0, 0, 0, 205, 206, 207, 208,
5837 209, 210, 211, 212, 213, 214, 0, 215, 216, 1366,
5838 651, 0, 0, 1367, 0, 217, 0, 0, 0, 0,
5839 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5840 0, 0, 0, 188, 189, 190, 191, 192, 193, 194,
5841 195, 196, 0, 0, 197, 198, 0, 0, 0, 0,
5842 199, 200, 201, 202, 0, 0, 0, 0, 0, 0,
5843 0, 0, 0, 0, 203, 204, 0, 0, 0, 0,
5844 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5845 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5846 0, 0, 0, 0, 205, 206, 207, 208, 209, 210,
5847 211, 212, 213, 214, 0, 215, 216, 1420, 643, 0,
5848 0, 1421, 0, 217, 0, 0, 0, 0, 0, 0,
5849 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5850 0, 188, 189, 190, 191, 192, 193, 194, 195, 196,
5851 0, 0, 197, 198, 0, 0, 0, 0, 199, 200,
5852 201, 202, 0, 0, 0, 0, 0, 0, 0, 0,
5853 0, 0, 203, 204, 0, 0, 0, 0, 0, 0,
5854 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5855 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5856 0, 0, 205, 206, 207, 208, 209, 210, 211, 212,
5857 213, 214, 0, 215, 216, 0, 0, 0, 0, 0,
5858 0, 217
5859};
5860
5861static const yytype_int16 yycheck[] =
5862{
5863 1, 70, 26, 59, 28, 101, 52, 53, 107, 58,
5864 7, 408, 1, 56, 426, 116, 58, 89, 70, 115,
5865 67, 15, 16, 30, 7, 399, 344, 401, 27, 599,
5866 27, 349, 602, 13, 14, 63, 64, 65, 344, 15,
5867 16, 768, 845, 349, 27, 575, 89, 766, 255, 15,
5868 16, 52, 53, 54, 55, 107, 477, 601, 589, 84,
5869 766, 58, 400, 56, 595, 108, 109, 110, 252, 111,
5870 615, 914, 1071, 52, 693, 694, 15, 16, 54, 1001,
5871 855, 455, 66, 768, 21, 525, 15, 16, 113, 774,
5872 104, 296, 72, 107, 515, 300, 774, 25, 472, 1035,
5873 474, 469, 601, 29, 27, 469, 81, 571, 727, 477,
5874 912, 575, 682, 605, 111, 54, 55, 630, 112, 1318,
5875 825, 1034, 1035, 774, 26, 0, 37, 38, 502, 1197,
5876 320, 321, 1336, 13, 1197, 473, 112, 69, 1221, 1222,
5877 103, 104, 285, 1211, 107, 1067, 112, 84, 512, 1001,
5878 1213, 247, 10, 101, 528, 109, 100, 69, 25, 100,
5879 54, 66, 100, 13, 81, 97, 98, 100, 1034, 1035,
5880 64, 65, 612, 112, 101, 134, 0, 34, 234, 66,
5881 69, 277, 134, 112, 230, 97, 98, 141, 287, 527,
5882 134, 615, 15, 134, 26, 52, 134, 123, 157, 25,
5883 66, 134, 25, 155, 1403, 69, 134, 155, 97, 98,
5884 68, 13, 1416, 25, 310, 1067, 121, 122, 287, 124,
5885 363, 153, 155, 1159, 723, 157, 154, 155, 155, 230,
5886 158, 154, 119, 305, 98, 287, 25, 160, 565, 285,
5887 13, 1084, 151, 154, 245, 120, 1159, 1169, 1247, 151,
5888 1172, 252, 1174, 119, 255, 157, 1255, 264, 1257, 25,
5889 1, 255, 305, 257, 153, 266, 154, 679, 1351, 693,
5890 694, 295, 296, 978, 154, 155, 300, 266, 302, 255,
5891 160, 257, 950, 1085, 285, 1012, 1349, 1355, 155, 255,
5892 1353, 257, 1355, 1159, 715, 865, 670, 260, 261, 274,
5893 484, 1214, 13, 727, 154, 25, 285, 681, 1221, 1222,
5894 160, 52, 53, 56, 413, 56, 1001, 363, 257, 151,
5895 304, 364, 418, 337, 338, 339, 340, 1012, 257, 155,
5896 1008, 669, 307, 952, 953, 272, 161, 829, 275, 958,
5897 959, 854, 680, 155, 25, 713, 335, 715, 89, 713,
5898 1001, 541, 154, 543, 361, 1158, 273, 274, 160, 366,
5899 1423, 413, 363, 13, 410, 411, 155, 108, 109, 110,
5900 111, 364, 812, 13, 337, 338, 339, 340, 25, 342,
5901 343, 154, 1067, 1158, 363, 1384, 930, 160, 918, 155,
5902 921, 922, 1060, 69, 925, 409, 927, 69, 929, 400,
5903 28, 1323, 403, 1325, 401, 1327, 400, 1329, 1106, 410,
5904 411, 425, 98, 983, 56, 34, 1067, 962, 1267, 13,
5905 1269, 52, 98, 1042, 78, 56, 98, 428, 755, 756,
5906 1211, 930, 766, 52, 400, 155, 134, 1105, 1351, 1107,
5907 1221, 1222, 1169, 154, 100, 13, 409, 155, 1167, 160,
5908 768, 458, 459, 525, 918, 13, 774, 451, 455, 100,
5909 467, 1167, 425, 25, 13, 402, 834, 153, 475, 476,
5910 834, 157, 473, 134, 155, 451, 157, 474, 134, 473,
5911 112, 482, 525, 484, 1169, 451, 1408, 1172, 495, 230,
5912 144, 145, 146, 134, 1172, 494, 503, 494, 100, 155,
5913 1185, 1000, 548, 100, 154, 502, 713, 473, 155, 101,
5914 160, 494, 451, 100, 154, 100, 157, 157, 455, 703,
5915 160, 1172, 451, 1221, 1222, 266, 527, 732, 952, 953,
5916 469, 528, 134, 527, 958, 959, 154, 134, 1387, 1388,
5917 612, 159, 1391, 1392, 285, 344, 1395, 548, 600, 134,
5918 349, 1219, 1220, 155, 744, 1086, 1087, 1088, 1089, 749,
5919 154, 527, 154, 610, 305, 554, 160, 52, 615, 612,
5920 155, 56, 946, 512, 948, 939, 152, 998, 154, 976,
5921 100, 1430, 1431, 1432, 1433, 912, 154, 914, 15, 157,
5922 17, 1440, 160, 155, 335, 157, 154, 100, 599, 1402,
5923 1327, 602, 160, 1027, 100, 154, 25, 631, 69, 947,
5924 662, 160, 69, 659, 134, 661, 1034, 1035, 1042, 1189,
5925 100, 646, 363, 364, 648, 155, 1080, 1081, 1334, 654,
5926 998, 134, 598, 25, 610, 601, 69, 98, 134, 615,
5927 100, 98, 1327, 69, 100, 1323, 693, 694, 649, 656,
5928 25, 1336, 155, 654, 134, 157, 1341, 1054, 659, 155,
5929 661, 733, 403, 1341, 935, 98, 937, 692, 669, 410,
5930 411, 97, 98, 670, 134, 669, 1102, 1103, 134, 680,
5931 727, 682, 706, 1001, 681, 100, 680, 134, 1106, 696,
5932 733, 692, 1104, 742, 1012, 1001, 695, 66, 695, 155,
5933 1034, 1035, 703, 669, 69, 1123, 34, 891, 732, 646,
5934 83, 84, 695, 737, 680, 134, 744, 69, 746, 134,
5935 683, 749, 750, 1254, 52, 726, 822, 153, 58, 831,
5936 101, 1416, 155, 98, 1412, 154, 155, 839, 157, 158,
5937 812, 1159, 134, 26, 154, 100, 98, 157, 78, 1067,
5938 1320, 1148, 121, 122, 290, 100, 719, 1084, 1085, 134,
5939 784, 1067, 154, 155, 137, 138, 158, 508, 100, 812,
5940 155, 66, 67, 874, 713, 157, 1194, 157, 108, 154,
5941 155, 69, 112, 158, 525, 100, 69, 157, 725, 134,
5942 1216, 1217, 161, 1211, 1001, 1249, 1250, 1251, 1252, 1253,
5943 693, 694, 134, 1221, 1222, 78, 1218, 548, 69, 97,
5944 98, 863, 158, 554, 97, 98, 709, 710, 69, 134,
5945 827, 828, 100, 134, 69, 1159, 121, 122, 835, 836,
5946 872, 152, 154, 1167, 727, 859, 97, 98, 160, 159,
5947 841, 1238, 843, 69, 845, 869, 97, 98, 862, 157,
5948 864, 1169, 97, 98, 1172, 154, 134, 56, 599, 158,
5949 1067, 602, 69, 155, 865, 153, 58, 1185, 151, 893,
5950 153, 612, 98, 603, 157, 872, 161, 607, 885, 886,
5951 1214, 888, 889, 78, 1185, 151, 78, 1221, 1222, 1349,
5952 891, 98, 153, 1353, 69, 834, 37, 38, 134, 862,
5953 26, 864, 153, 134, 794, 952, 953, 797, 153, 134,
5954 69, 958, 959, 154, 155, 451, 108, 109, 659, 899,
5955 661, 967, 97, 98, 106, 1379, 1380, 1381, 1382, 56,
5956 982, 69, 984, 154, 155, 1309, 155, 944, 97, 98,
5957 160, 682, 25, 69, 480, 69, 947, 483, 69, 141,
5958 957, 948, 488, 947, 968, 69, 1002, 14, 15, 97,
5959 98, 962, 1169, 152, 930, 1172, 967, 1174, 69, 505,
5960 1308, 97, 98, 97, 98, 1429, 97, 98, 153, 155,
5961 1027, 947, 983, 97, 98, 138, 962, 994, 155, 882,
5962 158, 768, 733, 69, 153, 1042, 97, 98, 89, 90,
5963 1334, 1002, 134, 780, 134, 968, 155, 1031, 158, 1327,
5964 40, 41, 155, 1059, 134, 153, 155, 1351, 1336, 154,
5965 155, 97, 98, 1341, 706, 151, 155, 153, 52, 153,
5966 155, 157, 153, 1334, 152, 1336, 1025, 1026, 155, 153,
5967 1341, 1021, 1022, 306, 307, 1346, 155, 583, 1049, 155,
5968 1051, 155, 153, 1109, 13, 737, 152, 17, 1059, 952,
5969 953, 1110, 25, 155, 134, 958, 959, 1068, 155, 44,
5970 1071, 812, 44, 1074, 152, 611, 155, 153, 155, 1080,
5971 1081, 134, 1106, 1107, 26, 54, 55, 609, 57, 44,
5972 66, 1092, 1093, 44, 136, 64, 65, 159, 1416, 992,
5973 993, 8, 995, 996, 1147, 66, 56, 15, 1154, 1155,
5974 155, 1412, 52, 1414, 1160, 1416, 1323, 1418, 1325, 155,
5975 1327, 155, 1329, 155, 865, 66, 52, 69, 54, 55,
5976 1226, 57, 1231, 762, 155, 657, 1437, 766, 1162, 155,
5977 1186, 663, 664, 119, 55, 121, 122, 66, 124, 1042,
5978 1151, 687, 66, 1154, 1155, 97, 98, 1158, 119, 1160,
5979 121, 122, 1231, 124, 52, 152, 54, 55, 56, 57,
5980 58, 155, 1196, 1066, 155, 1199, 102, 859, 119, 1231,
5981 121, 122, 155, 66, 1230, 1186, 101, 869, 1189, 9,
5982 78, 155, 139, 52, 1208, 1219, 1203, 155, 155, 1245,
5983 119, 1408, 121, 122, 92, 119, 155, 121, 122, 151,
5984 78, 153, 155, 152, 102, 157, 59, 60, 61, 62,
5985 108, 109, 155, 759, 1001, 1268, 967, 95, 96, 1230,
5986 139, 155, 1233, 1010, 1290, 1012, 119, 1014, 121, 122,
5987 52, 1265, 983, 66, 1245, 1208, 1247, 101, 1249, 1250,
5988 1251, 1252, 1253, 141, 1255, 155, 1257, 155, 56, 160,
5989 1261, 1002, 78, 158, 155, 155, 1267, 789, 1269, 155,
5990 155, 793, 152, 141, 142, 143, 144, 145, 146, 1303,
5991 1304, 1305, 155, 155, 1025, 1026, 155, 139, 155, 155,
5992 1067, 155, 155, 1034, 1035, 155, 119, 1340, 121, 122,
5993 56, 1315, 1316, 504, 155, 155, 155, 1308, 155, 1310,
5994 155, 1312, 1309, 155, 1308, 155, 157, 228, 1059, 1320,
5995 231, 232, 233, 157, 1370, 335, 142, 143, 144, 145,
5996 146, 853, 266, 1151, 856, 871, 40, 41, 42, 43,
5997 44, 1365, 1308, 508, 872, 106, 610, 110, 870, 1031,
5998 1374, 108, 1315, 1316, 890, 52, 892, 54, 55, 56,
5999 57, 1102, 1103, 98, 495, 1106, 692, 963, 982, 1370,
6000 1233, 755, 1001, 1397, 910, 912, 1334, 1185, 1379, 1380,
6001 1381, 1382, 1123, 1384, 931, 932, 1387, 1388, 1266, 1,
6002 1391, 1392, 1169, 940, 1395, 1341, 943, 1174, 945, 1093,
6003 1265, 1402, 875, 15, 16, 1182, 1147, 1, 1185, 1214,
6004 1151, 1403, 1402, 1154, 1155, 359, 1287, 1214, 1159, 1160,
6005 1210, 15, 16, 119, 1106, 1310, 1312, 543, 1429, 1430,
6006 1431, 1432, 1433, 111, 1067, 115, 349, 1397, 1067, 1440,
6007 52, 53, -1, -1, 56, 1186, -1, 969, 1189, -1,
6008 972, -1, -1, 1194, -1, 67, 1197, 979, 52, 53,
6009 -1, -1, -1, 985, 52, 78, 54, 55, 56, 57,
6010 1211, -1, 1213, 67, -1, 1216, 1217, 89, -1, -1,
6011 1221, 1222, 95, 96, -1, -1, -1, -1, -1, 1230,
6012 -1, 103, 104, -1, -1, 107, 108, 109, 110, -1,
6013 112, -1, -1, 52, 1245, 54, 55, 56, 57, 103,
6014 104, -1, -1, 107, 1196, -1, -1, 1199, 112, -1,
6015 -1, -1, -1, -1, -1, -1, -1, 1268, -1, 142,
6016 143, 144, 145, 146, 1163, -1, -1, 1219, 1167, -1,
6017 1169, 1063, -1, 1172, -1, 1174, 1287, -1, 1325, -1,
6018 1327, -1, 1329, 102, -1, -1, 1185, 468, 469, 1336,
6019 -1, -1, -1, -1, -1, -1, 477, -1, -1, 1346,
6020 52, -1, 54, 55, 56, 57, 58, -1, 52, 1320,
6021 54, 55, 56, 57, -1, -1, -1, -1, -1, -1,
6022 -1, -1, -1, -1, -1, -1, 78, -1, -1, 1340,
6023 -1, 512, -1, -1, 515, -1, -1, -1, 1349, -1,
6024 92, -1, 1353, -1, 1355, -1, -1, -1, 230, -1,
6025 102, 1303, 1304, 1305, -1, 107, 108, 109, 102, 1370,
6026 -1, 1408, -1, 107, -1, -1, 230, 1414, -1, 1416,
6027 -1, 1418, -1, 255, -1, 257, -1, -1, 260, 261,
6028 -1, -1, -1, -1, 266, -1, -1, -1, -1, 141,
6029 1437, 255, 144, 257, -1, -1, 260, 261, -1, -1,
6030 -1, -1, 266, 285, -1, 157, -1, -1, -1, 590,
6031 -1, -1, 1423, 1365, 1220, -1, -1, -1, -1, -1,
6032 -1, 285, 78, 305, 1323, -1, 1325, -1, 1327, 610,
6033 1329, -1, -1, -1, 615, 1334, -1, 1336, -1, 95,
6034 96, -1, 1341, -1, -1, 1001, -1, 1346, 1240, -1,
6035 -1, -1, -1, 335, -1, 337, 338, 339, 340, -1,
6036 342, 343, -1, -1, -1, -1, -1, 1273, -1, -1,
6037 -1, 335, -1, 337, 338, 339, 340, 1283, 342, 343,
6038 -1, 363, 364, 139, 140, 141, 142, 143, 144, 145,
6039 146, -1, -1, -1, 1300, 1301, 1302, -1, -1, 363,
6040 -1, -1, -1, -1, -1, -1, -1, -1, -1, 1408,
6041 -1, 1067, -1, 1412, -1, 1414, 697, 1416, 400, 1418,
6042 -1, 403, -1, -1, -1, 1034, 1035, 409, 410, 411,
6043 -1, -1, 713, -1, 715, -1, 400, -1, 1437, 403,
6044 -1, -1, -1, 425, -1, 409, 410, 411, -1, -1,
6045 -1, -1, -1, -1, 33, 34, 35, 36, -1, -1,
6046 -1, 425, -1, -1, -1, -1, -1, -1, -1, 451,
6047 49, 50, 51, -1, -1, -1, -1, -1, -1, -1,
6048 59, 60, 61, 62, 63, 1377, -1, 451, -1, -1,
6049 -1, 473, 773, 1102, 1103, -1, -1, 1106, -1, -1,
6050 -1, -1, 52, -1, 54, 55, 56, 57, 58, 473,
6051 -1, -1, -1, 1169, 1123, -1, 1172, -1, 1174, -1,
6052 -1, 802, -1, -1, -1, -1, 508, -1, 78, 1185,
6053 -1, 110, 111, 112, 113, 114, 115, 116, 117, 118,
6054 -1, -1, 92, 525, 508, 527, -1, -1, -1, -1,
6055 1159, -1, 102, 834, -1, -1, -1, 107, 108, 109,
6056 -1, -1, -1, 527, -1, -1, 548, -1, 147, -1,
6057 -1, 852, 554, -1, -1, 52, -1, 54, 55, 56,
6058 57, 58, -1, -1, 548, 1194, -1, -1, 1197, -1,
6059 554, 141, -1, -1, 144, -1, -1, -1, -1, -1,
6060 -1, 78, 1211, -1, 1213, -1, -1, 1216, 1217, -1,
6061 -1, -1, 1221, 1222, -1, -1, 598, 599, -1, 601,
6062 602, -1, -1, -1, -1, 102, -1, -1, 610, -1,
6063 612, 108, 109, 615, 598, 599, -1, 601, 602, -1,
6064 -1, -1, -1, -1, -1, -1, 610, -1, -1, -1,
6065 -1, 615, -1, -1, -1, -1, -1, -1, 939, 1034,
6066 1035, -1, -1, -1, 141, -1, -1, 1323, -1, 1325,
6067 -1, 1327, -1, 1329, -1, -1, -1, 659, 1287, 661,
6068 1336, 962, -1, -1, -1, 1341, -1, 669, -1, -1,
6069 1346, -1, -1, 974, -1, 659, -1, 661, 680, -1,
6070 682, 683, 1034, 1035, -1, 669, -1, -1, -1, -1,
6071 -1, 693, 694, -1, -1, -1, 680, 998, 682, 683,
6072 -1, -1, -1, -1, -1, -1, -1, 1102, 1103, 693,
6073 694, 1106, -1, -1, -1, -1, -1, 719, -1, -1,
6074 1349, -1, 1023, -1, 1353, 727, 1355, -1, 1123, -1,
6075 -1, 733, 1408, -1, -1, 719, 1412, -1, 1414, -1,
6076 1416, -1, 1418, 727, -1, -1, -1, -1, -1, -1,
6077 1102, 1103, -1, -1, 1106, -1, -1, 1058, -1, -1,
6078 -1, 1437, -1, -1, 1159, -1, -1, -1, -1, -1,
6079 -1, 1123, -1, -1, -1, -1, -1, -1, -1, 52,
6080 -1, 54, 55, 56, 57, 58, -1, -1, -1, -1,
6081 -1, -1, -1, -1, 1423, -1, -1, -1, -1, 1194,
6082 -1, -1, 1197, -1, -1, 78, -1, 1159, -1, -1,
6083 812, -1, -1, -1, -1, -1, 1211, -1, 1213, -1,
6084 -1, 1216, 1217, 1, -1, -1, 1221, 1222, -1, 102,
6085 -1, -1, -1, -1, 107, 108, 109, 15, 16, -1,
6086 -1, -1, 1194, -1, -1, 1197, -1, -1, -1, -1,
6087 -1, -1, -1, -1, -1, 1156, -1, -1, -1, 1211,
6088 862, 1213, 864, 865, 1216, 1217, -1, -1, 141, 1221,
6089 1222, 144, -1, -1, 52, 53, -1, -1, 862, -1,
6090 864, 865, -1, -1, -1, -1, -1, -1, -1, 67,
6091 -1, -1, 1287, -1, -1, -1, -1, -1, -1, -1,
6092 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6093 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6094 -1, 1034, 1035, -1, -1, 103, 104, -1, 930, 107,
6095 -1, -1, -1, -1, 112, 1287, -1, -1, -1, -1,
6096 -1, -1, -1, -1, -1, 947, 930, -1, -1, -1,
6097 952, 953, -1, -1, 1349, -1, 958, 959, 1353, -1,
6098 1355, -1, -1, 947, -1, 967, 968, -1, 952, 953,
6099 -1, -1, -1, -1, 958, 959, -1, -1, -1, -1,
6100 -1, 983, -1, 967, 968, -1, -1, -1, -1, 1102,
6101 1103, -1, -1, 1106, -1, -1, -1, 1349, -1, 983,
6102 1002, 1353, -1, 1355, -1, -1, -1, -1, -1, -1,
6103 1123, -1, -1, -1, -1, -1, -1, -1, 1002, -1,
6104 -1, -1, -1, 1025, 1026, 1027, -1, -1, 1423, -1,
6105 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6106 1042, 1025, 1026, 1027, -1, -1, 1159, -1, -1, -1,
6107 -1, -1, 230, -1, -1, -1, -1, 1059, 1042, -1,
6108 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6109 -1, 1423, -1, -1, -1, 1059, -1, 255, -1, 257,
6110 -1, 1194, 260, 261, 1197, -1, -1, -1, 266, -1,
6111 -1, -1, -1, -1, -1, -1, -1, -1, 1211, -1,
6112 1213, -1, -1, 1216, 1217, -1, -1, 285, 1221, 1222,
6113 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6114 1034, 1035, -1, -1, -1, -1, -1, -1, -1, -1,
6115 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6116 -1, -1, -1, -1, -1, 1147, -1, -1, -1, 1151,
6117 -1, -1, 1154, 1155, -1, -1, -1, 335, 1160, 337,
6118 338, 339, 340, -1, 342, 343, -1, 1151, -1, -1,
6119 1154, 1155, -1, -1, 1287, -1, 1160, -1, -1, -1,
6120 -1, -1, -1, -1, 1186, 363, -1, 1189, 1102, 1103,
6121 -1, -1, 1106, -1, -1, -1, -1, -1, 1, -1,
6122 -1, -1, 1186, -1, -1, 1189, 1208, -1, -1, 1123,
6123 -1, -1, 15, 16, -1, -1, -1, -1, -1, -1,
6124 -1, -1, 400, -1, 1208, 403, -1, -1, 1230, -1,
6125 -1, 409, 410, 411, -1, -1, 1349, -1, -1, -1,
6126 1353, -1, 1355, 1245, -1, 1159, 1230, 425, -1, 52,
6127 53, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6128 -1, 1245, -1, -1, 67, -1, 1268, -1, -1, -1,
6129 -1, -1, -1, 451, -1, -1, -1, -1, -1, -1,
6130 1194, -1, -1, 1197, -1, -1, -1, -1, -1, -1,
6131 -1, -1, -1, -1, -1, 473, -1, 1211, -1, 1213,
6132 103, 104, 1216, 1217, 107, -1, 1308, 1221, 1222, 112,
6133 1423, 1034, 1035, 1315, 1316, -1, -1, -1, 1320, -1,
6134 -1, -1, -1, -1, 1308, -1, -1, -1, -1, -1,
6135 508, 1315, 1316, -1, -1, -1, 1320, -1, 1340, -1,
6136 1034, 1035, -1, -1, -1, -1, -1, -1, -1, 527,
6137 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6138 -1, -1, -1, -1, -1, -1, -1, -1, 1370, -1,
6139 548, -1, -1, 1287, -1, -1, 554, -1, -1, 1102,
6140 1103, -1, -1, 1106, -1, -1, 1370, -1, -1, -1,
6141 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6142 1123, -1, -1, -1, -1, -1, -1, -1, 1102, 1103,
6143 -1, -1, 1106, -1, -1, -1, -1, -1, -1, -1,
6144 598, 599, -1, 601, 602, -1, -1, 230, -1, 1123,
6145 -1, -1, 610, -1, -1, 1349, 1159, 615, -1, 1353,
6146 -1, 1355, -1, -1, -1, -1, -1, -1, -1, -1,
6147 -1, -1, 255, -1, 257, -1, -1, 260, 261, -1,
6148 -1, -1, -1, 266, -1, 1159, -1, -1, -1, -1,
6149 -1, 1194, -1, -1, 1197, -1, -1, -1, -1, -1,
6150 -1, 659, 285, 661, -1, -1, -1, -1, 1211, -1,
6151 1213, 669, -1, 1216, 1217, -1, -1, -1, 1221, 1222,
6152 1194, -1, 680, 1197, 682, 683, -1, -1, -1, 1423,
6153 -1, -1, -1, -1, -1, 693, 694, 1211, -1, 1213,
6154 -1, -1, 1216, 1217, -1, -1, -1, 1221, 1222, -1,
6155 -1, -1, 335, -1, 337, 338, 339, 340, -1, 342,
6156 343, 719, -1, -1, -1, -1, -1, -1, -1, 727,
6157 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6158 363, -1, -1, -1, 1287, -1, -1, -1, -1, -1,
6159 -1, -1, -1, -1, -1, -1, -1, 1034, 1035, -1,
6160 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6161 -1, -1, -1, 1287, -1, -1, -1, 400, -1, -1,
6162 403, -1, -1, -1, -1, 1, 409, 410, 411, -1,
6163 -1, -1, -1, -1, -1, -1, -1, -1, -1, 15,
6164 16, -1, 425, -1, -1, -1, 1349, -1, -1, -1,
6165 1353, -1, 1355, -1, -1, -1, -1, -1, -1, -1,
6166 -1, -1, -1, -1, -1, 1102, 1103, -1, 451, 1106,
6167 -1, -1, -1, -1, -1, 1349, 52, 53, -1, 1353,
6168 56, 1355, -1, -1, -1, -1, 1123, -1, -1, -1,
6169 473, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6170 -1, -1, -1, -1, 862, -1, 864, 865, -1, -1,
6171 -1, -1, -1, 89, -1, -1, -1, -1, -1, -1,
6172 1423, -1, 1159, -1, -1, 508, -1, -1, -1, -1,
6173 -1, -1, 108, 109, 110, -1, 112, -1, -1, -1,
6174 -1, -1, -1, -1, 527, 1034, 1035, -1, -1, 1423,
6175 -1, -1, -1, -1, -1, -1, -1, 1194, -1, -1,
6176 1197, -1, -1, -1, -1, 548, -1, -1, -1, -1,
6177 -1, 554, 930, -1, 1211, -1, 1213, -1, -1, 1216,
6178 1217, -1, -1, -1, 1221, 1222, -1, -1, -1, 947,
6179 -1, -1, -1, -1, 952, 953, -1, -1, -1, -1,
6180 958, 959, -1, -1, -1, -1, -1, -1, -1, 967,
6181 968, -1, -1, 1102, 1103, 598, 599, 1106, 601, 602,
6182 -1, -1, -1, -1, -1, 983, -1, 610, -1, -1,
6183 -1, -1, 615, -1, 1123, -1, -1, -1, -1, -1,
6184 -1, -1, -1, -1, 1002, -1, -1, -1, -1, -1,
6185 1287, -1, -1, -1, 230, -1, -1, -1, -1, -1,
6186 -1, -1, -1, -1, -1, -1, -1, 1025, 1026, 1027,
6187 1159, -1, -1, -1, -1, -1, 659, -1, 661, 255,
6188 -1, 257, -1, -1, 1042, -1, 669, -1, -1, -1,
6189 266, -1, -1, -1, -1, -1, -1, 680, -1, 682,
6190 683, 1059, -1, -1, -1, 1194, -1, -1, 1197, 285,
6191 693, 694, 1349, -1, -1, -1, 1353, -1, 1355, -1,
6192 -1, -1, 1211, -1, 1213, -1, -1, 1216, 1217, 305,
6193 -1, -1, 1221, 1222, -1, -1, 719, -1, -1, -1,
6194 -1, 0, -1, -1, 727, -1, -1, -1, -1, 8,
6195 9, 10, -1, -1, 13, 14, 15, -1, 17, 335,
6196 -1, -1, -1, -1, -1, -1, 25, 26, 27, -1,
6197 -1, -1, -1, -1, -1, -1, -1, -1, 37, 38,
6198 -1, 40, 41, 42, 43, 44, 1423, 363, 364, -1,
6199 -1, -1, -1, 1151, -1, -1, 1154, 1155, 1287, -1,
6200 -1, -1, 1160, -1, -1, -1, -1, -1, -1, 68,
6201 69, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6202 -1, -1, -1, -1, 400, -1, -1, 403, 1186, -1,
6203 -1, 1189, -1, -1, 410, 411, -1, -1, 97, 98,
6204 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6205 1208, -1, -1, 78, 79, 80, 81, 82, 83, 84,
6206 1349, 120, 87, 88, 1353, -1, 1355, -1, -1, -1,
6207 95, 96, 1230, -1, -1, 451, -1, -1, -1, 862,
6208 -1, 864, 865, -1, -1, -1, -1, 1245, -1, -1,
6209 -1, -1, 151, 152, -1, 154, -1, 473, 157, 158,
6210 -1, 160, -1, -1, -1, -1, -1, -1, -1, -1,
6211 -1, -1, 137, 138, 139, 140, 141, 142, 143, 144,
6212 145, 146, -1, -1, -1, -1, -1, -1, -1, -1,
6213 -1, -1, 508, -1, 1423, -1, -1, -1, -1, -1,
6214 -1, -1, -1, -1, -1, -1, 1, 930, -1, 525,
6215 1308, 527, -1, -1, -1, -1, -1, 1315, 1316, -1,
6216 15, 16, 1320, -1, 947, -1, -1, -1, -1, 952,
6217 953, -1, 548, -1, -1, 958, 959, -1, 554, -1,
6218 -1, -1, -1, -1, 967, 968, -1, -1, -1, -1,
6219 -1, -1, -1, -1, -1, -1, -1, 52, 53, -1,
6220 983, 56, -1, -1, -1, -1, -1, -1, -1, -1,
6221 25, -1, 1370, -1, -1, -1, -1, -1, -1, 1002,
6222 -1, -1, -1, 599, -1, -1, 602, -1, -1, -1,
6223 -1, -1, -1, -1, 89, -1, 612, -1, -1, 615,
6224 -1, -1, 1025, 1026, 1027, -1, -1, -1, -1, -1,
6225 -1, -1, -1, 108, 109, 110, -1, 112, -1, 1042,
6226 -1, -1, -1, 78, 79, 80, 81, 82, 83, 84,
6227 85, 86, 87, 88, 89, 90, 1059, -1, -1, -1,
6228 95, 96, 1, 659, -1, 661, 101, -1, -1, -1,
6229 -1, -1, -1, 669, -1, -1, -1, -1, -1, -1,
6230 -1, -1, -1, -1, 680, -1, 682, -1, -1, -1,
6231 -1, -1, -1, -1, -1, -1, -1, 693, 694, -1,
6232 135, -1, 137, 138, 139, 140, 141, 142, 143, 144,
6233 145, 146, -1, 52, 53, -1, -1, -1, -1, -1,
6234 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6235 -1, 727, -1, -1, -1, -1, -1, 733, -1, -1,
6236 -1, -1, -1, -1, -1, -1, -1, -1, 1151, -1,
6237 -1, 1154, 1155, -1, -1, 230, -1, 1160, -1, -1,
6238 -1, -1, -1, -1, -1, -1, -1, -1, -1, 108,
6239 1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6240 255, -1, 257, 1186, -1, -1, 1189, -1, -1, -1,
6241 -1, 266, -1, -1, -1, -1, -1, -1, -1, -1,
6242 -1, -1, -1, -1, -1, 1208, -1, -1, -1, -1,
6243 285, -1, -1, -1, -1, -1, 812, -1, -1, -1,
6244 -1, 52, 53, -1, -1, 56, -1, 1230, -1, -1,
6245 305, -1, -1, -1, 78, 79, 80, 81, 82, 83,
6246 84, 85, 1245, 87, 88, -1, -1, -1, -1, -1,
6247 -1, 95, 96, -1, -1, -1, -1, -1, 89, -1,
6248 335, -1, -1, -1, -1, -1, -1, -1, -1, 865,
6249 -1, -1, -1, -1, -1, -1, -1, 108, 109, 110,
6250 -1, -1, -1, -1, -1, -1, -1, -1, 363, 364,
6251 -1, 230, -1, 137, 138, 139, 140, 141, 142, 143,
6252 144, 145, 146, -1, -1, 1308, -1, -1, -1, -1,
6253 -1, -1, 1315, 1316, -1, -1, -1, 1320, -1, -1,
6254 -1, -1, -1, -1, -1, 400, -1, 266, 403, -1,
6255 -1, -1, -1, -1, -1, 410, 411, -1, -1, -1,
6256 -1, -1, -1, -1, -1, -1, 285, -1, -1, -1,
6257 -1, 947, -1, -1, -1, -1, 952, 953, -1, -1,
6258 -1, -1, 958, 959, -1, -1, -1, 1370, -1, -1,
6259 -1, 967, -1, -1, -1, -1, 451, -1, -1, -1,
6260 -1, -1, -1, -1, -1, -1, -1, 983, -1, -1,
6261 -1, -1, -1, -1, -1, -1, 335, -1, 473, 230,
6262 -1, -1, -1, -1, -1, -1, 1002, -1, -1, -1,
6263 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6264 -1, -1, -1, -1, 363, -1, -1, -1, -1, 1025,
6265 1026, 1027, -1, 508, -1, 266, -1, -1, -1, -1,
6266 -1, -1, -1, -1, -1, -1, 1042, -1, -1, -1,
6267 525, -1, 527, -1, 285, -1, 52, 53, -1, -1,
6268 56, -1, -1, 1059, 403, -1, -1, -1, -1, -1,
6269 -1, 410, 411, 548, 305, -1, -1, -1, -1, 554,
6270 76, 77, 78, 79, 80, 81, 82, 83, 84, -1,
6271 -1, 87, 88, -1, -1, -1, -1, 93, 94, 95,
6272 96, -1, -1, -1, 335, -1, -1, -1, -1, -1,
6273 -1, 107, 108, -1, -1, -1, -1, -1, -1, -1,
6274 -1, -1, -1, -1, 599, -1, -1, 602, -1, -1,
6275 -1, -1, 363, 364, -1, -1, -1, 612, -1, -1,
6276 615, 137, 138, 139, 140, 141, 142, 143, 144, 145,
6277 146, 1147, 148, 149, -1, 1151, -1, -1, 1154, 1155,
6278 156, 157, -1, -1, 1160, -1, -1, -1, -1, 508,
6279 -1, -1, 403, -1, -1, -1, 1, -1, -1, 410,
6280 411, -1, -1, -1, 659, -1, 661, -1, -1, -1,
6281 1186, -1, -1, 1189, 669, -1, -1, -1, -1, -1,
6282 -1, -1, -1, -1, -1, 680, -1, 682, -1, 548,
6283 -1, -1, -1, -1, -1, 554, -1, -1, 693, 694,
6284 -1, -1, -1, -1, -1, -1, -1, 52, 53, -1,
6285 -1, 56, -1, -1, 1230, -1, -1, -1, -1, -1,
6286 -1, -1, -1, -1, -1, -1, -1, -1, -1, 1245,
6287 -1, -1, 727, -1, -1, -1, -1, -1, 733, -1,
6288 599, -1, -1, 602, 89, -1, -1, -1, -1, -1,
6289 -1, -1, 1268, -1, -1, -1, 615, 508, -1, -1,
6290 -1, -1, -1, 108, 109, 110, 111, -1, -1, -1,
6291 -1, -1, -1, -1, 525, -1, -1, -1, -1, 1,
6292 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6293 -1, -1, 1308, -1, -1, -1, -1, 548, -1, -1,
6294 659, -1, 661, 554, 1320, -1, -1, -1, -1, -1,
6295 -1, -1, -1, -1, -1, -1, -1, 812, -1, -1,
6296 -1, -1, -1, 682, 1340, -1, -1, -1, -1, -1,
6297 52, 53, -1, -1, 693, 694, -1, -1, -1, -1,
6298 -1, -1, -1, -1, -1, -1, -1, -1, 599, -1,
6299 -1, 602, -1, -1, 1370, -1, -1, -1, -1, -1,
6300 -1, 612, -1, -1, 615, -1, -1, -1, 727, -1,
6301 865, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6302 -1, -1, -1, -1, -1, 230, -1, -1, -1, -1,
6303 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6304 -1, -1, -1, -1, -1, -1, -1, -1, 659, -1,
6305 661, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6306 -1, 266, -1, -1, -1, -1, -1, -1, -1, -1,
6307 -1, 682, -1, -1, -1, -1, -1, -1, -1, -1,
6308 285, -1, 693, 694, -1, -1, -1, -1, -1, -1,
6309 -1, -1, 947, -1, -1, -1, -1, 952, 953, -1,
6310 305, -1, -1, 958, 959, -1, -1, -1, -1, -1,
6311 -1, -1, 967, -1, -1, -1, 727, -1, -1, -1,
6312 -1, -1, 733, -1, -1, -1, -1, -1, 983, -1,
6313 335, 742, -1, -1, -1, -1, -1, -1, -1, -1,
6314 -1, -1, -1, -1, -1, -1, 865, 1002, 230, -1,
6315 -1, -1, -1, -1, -1, -1, -1, -1, 363, 364,
6316 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6317 1025, 1026, 1027, -1, 44, -1, -1, -1, -1, -1,
6318 -1, -1, -1, -1, 266, -1, -1, 1042, -1, -1,
6319 -1, -1, -1, -1, -1, -1, -1, -1, 403, -1,
6320 -1, 812, -1, 285, 1059, 410, 411, -1, 78, 79,
6321 80, 81, 82, 83, 84, 85, 86, 87, 88, 89,
6322 90, -1, -1, -1, -1, 95, 96, -1, -1, -1,
6323 -1, -1, -1, 952, 953, -1, -1, -1, -1, 958,
6324 959, -1, -1, -1, -1, -1, -1, -1, 967, -1,
6325 -1, -1, -1, 335, 865, -1, -1, -1, -1, -1,
6326 -1, -1, -1, -1, 983, 135, -1, 137, 138, 139,
6327 140, 141, 142, 143, 144, 145, 146, -1, -1, -1,
6328 -1, 363, -1, 1002, -1, 155, -1, -1, -1, -1,
6329 -1, -1, 1147, -1, -1, -1, 1151, -1, -1, 1154,
6330 1155, -1, -1, 508, -1, 1160, 1025, 1026, 1027, -1,
6331 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6332 525, 403, -1, 1042, -1, -1, -1, -1, 410, 411,
6333 -1, 1186, -1, -1, 1189, -1, -1, -1, -1, -1,
6334 1059, 952, 953, 548, -1, -1, -1, 958, 959, 554,
6335 -1, -1, -1, -1, -1, -1, 967, -1, -1, -1,
6336 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6337 -1, -1, 983, -1, -1, 1230, -1, -1, -1, -1,
6338 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6339 1245, 1002, -1, -1, 599, -1, -1, 602, -1, -1,
6340 -1, -1, -1, -1, -1, -1, -1, 612, -1, -1,
6341 -1, -1, -1, 1268, 1025, 1026, 1027, -1, -1, -1,
6342 -1, -1, -1, -1, -1, -1, 508, -1, 1147, -1,
6343 -1, 1042, 1151, -1, -1, 1154, 1155, -1, -1, -1,
6344 -1, 1160, -1, -1, -1, -1, -1, -1, 1059, -1,
6345 -1, -1, -1, 1308, 659, -1, 661, -1, -1, -1,
6346 -1, 44, -1, -1, -1, 1320, 548, 1186, -1, -1,
6347 1189, -1, 554, -1, -1, -1, -1, 682, -1, -1,
6348 -1, -1, -1, -1, -1, 1340, -1, -1, -1, -1,
6349 -1, -1, -1, -1, -1, 78, 79, 80, 81, 82,
6350 83, 84, 85, 86, 87, 88, 89, 90, -1, -1,
6351 -1, 1230, 95, 96, -1, 1370, -1, 599, -1, -1,
6352 602, -1, -1, -1, -1, -1, 1245, -1, 733, -1,
6353 -1, -1, -1, 615, -1, -1, 1147, -1, -1, -1,
6354 1151, -1, -1, 1154, 1155, -1, -1, -1, -1, 1160,
6355 15, 16, 135, -1, 137, 138, 139, 140, 141, 142,
6356 143, 144, 145, 146, -1, -1, -1, -1, -1, -1,
6357 -1, -1, -1, -1, -1, 1186, -1, 659, 1189, 661,
6358 -1, -1, 47, 48, 49, 50, -1, -1, -1, 54,
6359 55, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6360 682, 1320, 67, 68, -1, -1, -1, 812, -1, -1,
6361 -1, 693, 694, 33, 34, 35, 36, -1, -1, 1230,
6362 -1, -1, -1, -1, -1, -1, -1, -1, -1, 49,
6363 50, 51, 52, -1, 1245, -1, 56, -1, -1, 59,
6364 60, 61, 62, 63, -1, 727, -1, 112, -1, -1,
6365 -1, 1370, -1, -1, -1, -1, -1, 1268, -1, -1,
6366 865, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6367 -1, 91, 92, -1, -1, -1, -1, -1, -1, 99,
6368 -1, -1, 102, -1, 104, 105, -1, 107, -1, -1,
6369 110, 111, 112, 113, 114, 115, 116, 117, 118, -1,
6370 -1, -1, -1, -1, -1, -1, -1, -1, -1, 1320,
6371 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6372 140, -1, -1, -1, -1, -1, -1, 147, -1, 1340,
6373 -1, -1, -1, -1, 154, -1, -1, -1, -1, -1,
6374 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6375 -1, -1, -1, -1, -1, -1, -1, -1, -1, 1370,
6376 -1, -1, 967, 228, -1, -1, 231, 232, 233, -1,
6377 235, 78, 79, 80, 81, 82, 83, 84, 983, -1,
6378 87, 88, -1, 865, 33, 34, 35, 36, 95, 96,
6379 255, -1, 257, -1, -1, -1, -1, 1002, -1, -1,
6380 49, 50, 51, 52, -1, -1, -1, 56, -1, 58,
6381 59, 60, 61, 62, 63, -1, -1, -1, -1, -1,
6382 1025, 1026, -1, -1, -1, -1, -1, -1, -1, 78,
6383 137, 138, 139, 140, 141, 142, 143, 144, 145, 146,
6384 -1, -1, 91, 92, -1, -1, -1, -1, -1, -1,
6385 99, -1, -1, 102, 1059, 104, 105, -1, 107, 108,
6386 -1, 110, 111, 112, 113, 114, 115, 116, 117, 118,
6387 952, 953, -1, -1, -1, -1, 958, 959, -1, -1,
6388 -1, -1, -1, -1, -1, 967, -1, -1, -1, -1,
6389 -1, 140, -1, -1, -1, -1, -1, -1, 147, -1,
6390 -1, 983, -1, 368, 369, 370, 371, 372, -1, -1,
6391 375, 376, 377, 378, 379, 380, 381, 382, -1, 384,
6392 1002, -1, 387, 388, 389, 390, 391, 392, 393, 394,
6393 395, 396, -1, -1, -1, 400, -1, -1, -1, -1,
6394 -1, -1, 1147, 1025, 1026, 1027, 1151, -1, -1, 1154,
6395 1155, -1, -1, -1, -1, 1160, -1, -1, -1, -1,
6396 1042, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6397 -1, -1, -1, -1, -1, -1, -1, 1059, -1, -1,
6398 -1, 1186, -1, -1, 1189, -1, 451, -1, -1, -1,
6399 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6400 -1, -1, -1, 468, 469, -1, -1, -1, 473, -1,
6401 -1, -1, 477, -1, 479, -1, -1, -1, -1, -1,
6402 -1, -1, -1, -1, -1, 1230, -1, -1, -1, -1,
6403 -1, -1, 497, -1, -1, -1, -1, -1, -1, -1,
6404 1245, -1, -1, -1, -1, -1, -1, 512, -1, -1,
6405 515, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6406 -1, -1, 527, 1268, -1, -1, -1, -1, -1, 1151,
6407 -1, -1, 1154, 1155, -1, -1, -1, -1, 1160, -1,
6408 545, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6409 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6410 33, 34, 35, 36, 1186, -1, -1, 1189, -1, -1,
6411 -1, -1, -1, -1, -1, 1320, 49, 50, 51, 52,
6412 -1, -1, -1, 56, -1, 590, 59, 60, 61, 62,
6413 63, -1, -1, 598, -1, 1340, 601, -1, -1, -1,
6414 -1, -1, -1, -1, -1, 610, -1, -1, 1230, -1,
6415 615, -1, -1, -1, -1, -1, -1, -1, 91, 92,
6416 -1, -1, -1, 1245, -1, 1370, 99, -1, -1, 102,
6417 -1, 104, 105, -1, 107, -1, -1, 110, 111, 112,
6418 113, 114, 115, 116, 117, 118, -1, -1, -1, -1,
6419 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6420 -1, -1, -1, -1, 669, -1, -1, 140, -1, -1,
6421 -1, -1, -1, -1, 147, 680, -1, -1, -1, -1,
6422 -1, -1, -1, -1, -1, -1, -1, -1, 693, 694,
6423 -1, -1, 697, 698, -1, -1, -1, -1, 1320, -1,
6424 -1, -1, -1, -1, 709, 710, -1, -1, 713, -1,
6425 715, -1, -1, -1, -1, -1, -1, 722, 723, -1,
6426 -1, -1, 727, 78, 79, 80, 81, 82, 83, 84,
6427 85, 86, 87, 88, 89, 90, -1, -1, -1, -1,
6428 95, 96, -1, -1, -1, -1, -1, -1, 1370, -1,
6429 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6430 -1, -1, -1, -1, -1, -1, -1, -1, 773, -1,
6431 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6432 135, -1, 137, 138, 139, 140, 141, 142, 143, 144,
6433 145, 146, -1, -1, -1, -1, -1, 802, -1, 154,
6434 -1, -1, -1, 0, 1, -1, 3, 4, 5, 6,
6435 7, 8, 9, 10, 11, 12, -1, 14, 15, 16,
6436 17, 18, 19, 20, 21, 22, 23, 24, 25, 834,
6437 -1, -1, -1, 30, 31, 32, 33, 34, 35, 36,
6438 -1, -1, 39, -1, -1, -1, -1, 852, 45, 46,
6439 47, 48, 49, 50, 51, 52, 53, 54, 55, 56,
6440 57, -1, 59, 60, 61, 62, 63, 64, 65, -1,
6441 -1, 68, -1, -1, -1, -1, -1, 882, -1, 76,
6442 77, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6443 -1, -1, -1, -1, 91, 92, -1, -1, -1, -1,
6444 -1, -1, 99, -1, -1, 102, 103, 104, 105, -1,
6445 107, -1, -1, 110, 111, 112, 113, 114, 115, 116,
6446 117, 118, -1, 120, -1, 930, -1, -1, -1, -1,
6447 -1, -1, -1, -1, 939, -1, -1, -1, -1, -1,
6448 -1, -1, 947, -1, -1, -1, 951, 952, 953, -1,
6449 147, 148, 149, 958, 959, 152, -1, 962, -1, -1,
6450 -1, 158, -1, 160, -1, -1, -1, -1, -1, 974,
6451 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6452 -1, -1, -1, -1, -1, -1, -1, 992, 993, -1,
6453 995, 996, -1, 998, -1, 1000, -1, -1, -1, -1,
6454 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6455 -1, -1, -1, -1, 1019, 1020, -1, -1, 1023, -1,
6456 -1, -1, 1027, 1028, 0, 1, -1, 3, 4, 5,
6457 6, 7, -1, -1, -1, 11, 12, 1042, -1, -1,
6458 16, -1, 18, 19, 20, 21, 22, 23, 24, -1,
6459 -1, -1, -1, 1058, 30, 31, 32, 33, 34, 35,
6460 36, 1066, -1, 39, -1, -1, -1, -1, -1, 45,
6461 46, 47, 48, 49, 50, 51, 52, 53, 54, 55,
6462 56, 57, -1, 59, 60, 61, 62, 63, 64, 65,
6463 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6464 76, 77, -1, -1, -1, -1, -1, -1, -1, -1,
6465 -1, -1, -1, -1, -1, 91, 92, -1, -1, -1,
6466 -1, -1, -1, 99, -1, -1, 102, 103, 104, 105,
6467 -1, 107, -1, -1, 110, 111, 112, 113, 114, 115,
6468 116, 117, 118, -1, 120, -1, -1, -1, -1, -1,
6469 -1, 1156, -1, -1, -1, -1, -1, -1, -1, -1,
6470 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6471 -1, 147, 148, 149, -1, -1, 0, 1, 154, 3,
6472 4, 5, 6, 7, 160, -1, -1, 11, 12, -1,
6473 -1, -1, 16, -1, 18, 19, 20, 21, 22, 23,
6474 24, -1, -1, -1, -1, -1, 30, 31, 32, 33,
6475 34, 35, 36, -1, -1, 39, -1, -1, -1, -1,
6476 -1, 45, 46, 47, 48, 49, 50, 51, 52, 53,
6477 54, 55, 56, 57, -1, 59, 60, 61, 62, 63,
6478 64, 65, -1, -1, -1, -1, -1, -1, -1, -1,
6479 -1, -1, 76, 77, -1, -1, -1, -1, -1, -1,
6480 -1, -1, -1, -1, -1, -1, -1, 91, 92, -1,
6481 -1, -1, -1, -1, -1, 99, -1, -1, 102, 103,
6482 104, 105, -1, 107, -1, -1, 110, 111, 112, 113,
6483 114, 115, 116, 117, 118, -1, -1, -1, -1, -1,
6484 -1, -1, -1, 1308, -1, -1, -1, -1, -1, -1,
6485 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6486 -1, -1, -1, 147, 148, 149, -1, -1, 0, 1,
6487 154, 3, 4, 5, 6, 7, 160, -1, -1, 11,
6488 12, -1, -1, -1, 16, -1, 18, 19, 20, 21,
6489 22, 23, 24, -1, -1, -1, -1, -1, 30, 31,
6490 32, 33, 34, 35, 36, -1, -1, 39, -1, -1,
6491 -1, -1, -1, 45, 46, 47, 48, 49, 50, 51,
6492 52, 53, 54, 55, 56, 57, -1, 59, 60, 61,
6493 62, 63, 64, 65, -1, -1, -1, -1, -1, -1,
6494 -1, -1, -1, -1, 76, 77, -1, -1, -1, -1,
6495 -1, -1, -1, -1, -1, -1, -1, -1, -1, 91,
6496 92, -1, -1, -1, -1, -1, -1, 99, -1, -1,
6497 102, 103, 104, 105, -1, 107, -1, -1, 110, 111,
6498 112, 113, 114, 115, 116, 117, 118, -1, -1, -1,
6499 -1, -1, -1, -1, -1, -1, 0, -1, -1, -1,
6500 -1, -1, -1, -1, 8, 9, 10, -1, -1, 13,
6501 14, 15, -1, 17, -1, 147, 148, 149, -1, -1,
6502 152, 25, 26, 27, 28, 29, -1, -1, 160, -1,
6503 -1, -1, -1, 37, 38, -1, 40, 41, 42, 43,
6504 44, -1, -1, -1, 78, 79, 80, 81, 82, 83,
6505 84, 85, 86, 87, 88, 89, 90, -1, -1, -1,
6506 -1, 95, 96, -1, 68, 69, -1, -1, -1, -1,
6507 -1, -1, -1, -1, 78, 79, 80, 81, 82, 83,
6508 84, 85, 86, 87, 88, 89, 90, -1, -1, -1,
6509 -1, 95, 96, 97, 98, -1, 100, 101, -1, -1,
6510 -1, 135, 106, 137, 138, 139, 140, 141, 142, 143,
6511 144, 145, 146, -1, -1, -1, 120, -1, -1, 123,
6512 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6513 134, 135, 136, 137, 138, 139, 140, 141, 142, 143,
6514 144, 145, 146, -1, -1, -1, -1, 151, 152, 153,
6515 154, 155, 0, -1, 158, 159, 160, -1, -1, -1,
6516 8, 9, 10, -1, -1, 13, 14, 15, -1, 17,
6517 -1, -1, -1, -1, -1, -1, -1, 25, -1, 27,
6518 28, 29, -1, -1, -1, -1, -1, -1, -1, 37,
6519 38, -1, 40, 41, 42, 43, 44, -1, -1, -1,
6520 78, 79, 80, 81, 82, 83, 84, 85, 86, 87,
6521 88, 89, 90, -1, -1, -1, -1, 95, 96, -1,
6522 68, 69, -1, -1, -1, -1, -1, -1, -1, -1,
6523 78, 79, 80, 81, 82, 83, 84, 85, 86, 87,
6524 88, 89, 90, -1, -1, -1, -1, 95, 96, 97,
6525 98, -1, 100, 101, -1, -1, -1, -1, 106, 137,
6526 138, 139, 140, 141, 142, 143, 144, 145, 146, -1,
6527 -1, -1, 120, -1, -1, 123, -1, -1, -1, -1,
6528 -1, -1, -1, -1, -1, -1, 134, 135, 136, 137,
6529 138, 139, 140, 141, 142, 143, 144, 145, 146, -1,
6530 -1, -1, -1, -1, 152, 153, 154, 155, 0, -1,
6531 158, 159, 160, -1, -1, -1, 8, 9, 10, -1,
6532 -1, 13, 14, 15, -1, 17, -1, -1, -1, -1,
6533 -1, -1, -1, 25, -1, 27, 28, 29, -1, -1,
6534 -1, -1, -1, -1, -1, 37, 38, -1, 40, 41,
6535 42, 43, 44, -1, -1, -1, -1, -1, -1, -1,
6536 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6537 -1, -1, -1, -1, -1, -1, 68, 69, -1, -1,
6538 -1, -1, -1, -1, -1, -1, 78, 79, 80, 81,
6539 82, 83, 84, 85, 86, 87, 88, 89, 90, -1,
6540 -1, -1, -1, 95, 96, 97, 98, -1, 100, 101,
6541 -1, -1, -1, -1, 106, -1, -1, -1, -1, -1,
6542 -1, -1, -1, -1, -1, -1, -1, -1, 120, -1,
6543 -1, 123, -1, -1, -1, -1, -1, -1, -1, -1,
6544 -1, -1, 134, 135, 136, 137, 138, 139, 140, 141,
6545 142, 143, 144, 145, 146, -1, -1, -1, -1, -1,
6546 152, 153, 154, 155, 0, -1, 158, 159, 160, -1,
6547 -1, -1, 8, 9, 10, -1, -1, 13, 14, 15,
6548 -1, 17, -1, -1, -1, -1, -1, -1, -1, 25,
6549 26, 27, 28, 29, -1, -1, -1, -1, -1, -1,
6550 -1, 37, 38, -1, 40, 41, 42, 43, 44, -1,
6551 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6552 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6553 -1, -1, 68, 69, -1, -1, -1, -1, -1, -1,
6554 -1, -1, 78, 79, 80, 81, 82, 83, 84, 85,
6555 86, 87, 88, 89, 90, -1, -1, -1, -1, 95,
6556 96, 97, 98, -1, -1, 101, -1, -1, -1, -1,
6557 106, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6558 -1, -1, -1, -1, 120, -1, -1, 123, -1, -1,
6559 -1, -1, -1, -1, -1, -1, -1, -1, -1, 135,
6560 136, 137, 138, 139, 140, 141, 142, 143, 144, 145,
6561 146, -1, -1, -1, -1, 151, 152, 153, 154, 155,
6562 0, -1, 158, 159, 160, -1, -1, -1, 8, 9,
6563 10, -1, -1, 13, 14, 15, -1, 17, -1, -1,
6564 -1, -1, -1, -1, -1, 25, 26, 27, 28, 29,
6565 -1, -1, -1, -1, -1, -1, -1, 37, 38, -1,
6566 40, 41, 42, 43, 44, -1, -1, -1, -1, -1,
6567 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6568 -1, -1, -1, -1, -1, -1, -1, -1, 68, 69,
6569 -1, -1, -1, -1, -1, -1, -1, -1, 78, 79,
6570 80, 81, 82, 83, 84, 85, 86, 87, 88, 89,
6571 90, -1, -1, -1, -1, 95, 96, 97, 98, -1,
6572 -1, 101, -1, -1, -1, -1, 106, -1, -1, -1,
6573 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6574 120, -1, -1, 123, -1, -1, -1, -1, -1, -1,
6575 -1, -1, -1, -1, -1, 135, 136, 137, 138, 139,
6576 140, 141, 142, 143, 144, 145, 146, -1, -1, -1,
6577 -1, 151, 152, 153, 154, 155, 0, -1, 158, 159,
6578 160, -1, -1, -1, 8, 9, 10, -1, -1, 13,
6579 14, 15, -1, 17, -1, -1, -1, -1, -1, -1,
6580 -1, 25, 26, 27, 28, -1, -1, -1, -1, -1,
6581 -1, -1, -1, 37, 38, -1, 40, 41, 42, 43,
6582 44, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6583 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6584 -1, -1, -1, -1, 68, 69, -1, -1, -1, -1,
6585 -1, -1, -1, -1, 78, 79, 80, 81, 82, 83,
6586 84, 85, 86, 87, 88, 89, 90, -1, -1, -1,
6587 -1, 95, 96, 97, 98, -1, -1, 101, -1, -1,
6588 -1, -1, 106, -1, -1, -1, -1, -1, -1, -1,
6589 -1, -1, -1, -1, -1, -1, 120, -1, -1, -1,
6590 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6591 -1, 135, -1, 137, 138, 139, 140, 141, 142, 143,
6592 144, 145, 146, -1, -1, -1, -1, 151, 152, 153,
6593 154, 155, 0, 157, 158, 159, 160, -1, -1, -1,
6594 8, 9, 10, -1, -1, 13, 14, 15, -1, 17,
6595 -1, -1, -1, -1, -1, -1, -1, 25, -1, 27,
6596 28, 29, -1, -1, -1, -1, -1, -1, -1, 37,
6597 38, -1, 40, 41, 42, 43, 44, -1, -1, -1,
6598 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6599 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6600 68, 69, -1, -1, -1, -1, -1, -1, -1, -1,
6601 78, 79, 80, 81, 82, 83, 84, 85, 86, 87,
6602 88, 89, 90, -1, -1, -1, -1, 95, 96, 97,
6603 98, -1, -1, 101, -1, -1, -1, -1, 106, -1,
6604 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6605 -1, -1, 120, -1, -1, 123, -1, -1, -1, -1,
6606 -1, -1, -1, -1, -1, -1, -1, 135, 136, 137,
6607 138, 139, 140, 141, 142, 143, 144, 145, 146, -1,
6608 -1, -1, -1, -1, 152, 153, 154, 155, 0, -1,
6609 158, 159, 160, -1, -1, -1, 8, 9, 10, -1,
6610 -1, 13, 14, 15, -1, 17, -1, -1, -1, -1,
6611 -1, -1, -1, 25, 26, 27, 28, -1, -1, -1,
6612 -1, -1, -1, -1, -1, 37, 38, -1, 40, 41,
6613 42, 43, 44, -1, -1, -1, -1, -1, -1, -1,
6614 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6615 -1, -1, -1, -1, -1, -1, 68, 69, -1, -1,
6616 -1, -1, -1, -1, -1, -1, 78, 79, 80, 81,
6617 82, 83, 84, 85, 86, 87, 88, 89, 90, -1,
6618 -1, -1, -1, 95, 96, 97, 98, -1, -1, 101,
6619 -1, -1, -1, -1, 106, -1, -1, -1, -1, -1,
6620 -1, -1, -1, -1, -1, -1, -1, -1, 120, -1,
6621 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6622 -1, -1, -1, 135, -1, 137, 138, 139, 140, 141,
6623 142, 143, 144, 145, 146, -1, -1, -1, -1, 151,
6624 152, 153, 154, 155, 0, 157, 158, 159, 160, -1,
6625 -1, -1, 8, 9, 10, -1, -1, 13, 14, 15,
6626 -1, 17, -1, -1, -1, -1, -1, -1, -1, 25,
6627 -1, 27, 28, -1, -1, -1, -1, -1, -1, -1,
6628 -1, 37, 38, -1, 40, 41, 42, 43, 44, -1,
6629 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6630 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6631 -1, -1, 68, 69, -1, -1, -1, -1, -1, -1,
6632 -1, -1, 78, 79, 80, 81, 82, 83, 84, 85,
6633 86, 87, 88, 89, 90, -1, -1, -1, -1, 95,
6634 96, 97, 98, -1, 100, 101, -1, -1, -1, -1,
6635 106, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6636 -1, -1, -1, -1, 120, -1, -1, -1, -1, -1,
6637 -1, -1, -1, -1, -1, -1, -1, -1, 134, 135,
6638 -1, 137, 138, 139, 140, 141, 142, 143, 144, 145,
6639 146, -1, -1, -1, -1, 151, 152, 153, 154, 155,
6640 0, -1, 158, 159, 160, -1, -1, -1, 8, 9,
6641 10, -1, -1, 13, 14, 15, -1, 17, -1, -1,
6642 -1, -1, -1, -1, -1, 25, -1, 27, 28, -1,
6643 -1, -1, -1, -1, -1, -1, -1, 37, 38, -1,
6644 40, 41, 42, 43, 44, -1, -1, -1, -1, -1,
6645 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6646 -1, -1, -1, -1, -1, -1, -1, -1, 68, 69,
6647 -1, -1, -1, -1, -1, -1, -1, -1, 78, 79,
6648 80, 81, 82, 83, 84, 85, 86, 87, 88, 89,
6649 90, -1, -1, -1, -1, 95, 96, 97, 98, -1,
6650 -1, 101, -1, -1, -1, -1, 106, -1, -1, -1,
6651 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6652 120, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6653 -1, -1, -1, -1, -1, 135, -1, 137, 138, 139,
6654 140, 141, 142, 143, 144, 145, 146, -1, -1, -1,
6655 -1, -1, 152, 153, 154, 155, 0, 157, 158, 159,
6656 160, -1, -1, -1, 8, 9, 10, -1, -1, -1,
6657 14, 15, -1, 17, -1, -1, -1, -1, -1, -1,
6658 -1, 25, 26, -1, -1, -1, -1, -1, -1, -1,
6659 -1, -1, -1, 37, 38, -1, 40, 41, 42, 43,
6660 44, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6661 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6662 -1, -1, -1, -1, 68, 69, -1, -1, -1, -1,
6663 -1, -1, -1, -1, 78, 79, 80, 81, 82, 83,
6664 84, 85, 86, 87, 88, 89, 90, -1, -1, -1,
6665 -1, 95, 96, 97, 98, -1, 100, 101, -1, -1,
6666 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6667 -1, -1, -1, -1, -1, -1, 120, -1, -1, -1,
6668 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6669 134, 135, -1, 137, 138, 139, 140, 141, 142, 143,
6670 144, 145, 146, -1, -1, -1, -1, 151, 152, 153,
6671 154, 155, 0, -1, 158, -1, 160, -1, -1, -1,
6672 8, 9, 10, -1, -1, -1, 14, 15, -1, 17,
6673 -1, -1, -1, -1, -1, -1, -1, 25, 26, -1,
6674 -1, -1, -1, -1, -1, -1, -1, -1, -1, 37,
6675 38, -1, 40, 41, 42, 43, 44, -1, -1, -1,
6676 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6677 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6678 68, 69, -1, -1, -1, -1, -1, -1, -1, -1,
6679 78, 79, 80, 81, 82, 83, 84, 85, 86, 87,
6680 88, 89, 90, -1, -1, -1, -1, 95, 96, 97,
6681 98, -1, 100, 101, -1, -1, -1, -1, -1, -1,
6682 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6683 -1, -1, 120, -1, -1, -1, -1, -1, -1, -1,
6684 -1, -1, -1, -1, -1, -1, 134, 135, -1, 137,
6685 138, 139, 140, 141, 142, 143, 144, 145, 146, -1,
6686 -1, -1, -1, 151, 152, 153, 154, 155, 0, -1,
6687 158, -1, 160, -1, -1, -1, 8, 9, 10, -1,
6688 -1, -1, 14, 15, -1, 17, -1, -1, -1, -1,
6689 -1, -1, -1, 25, -1, -1, -1, -1, -1, -1,
6690 -1, -1, -1, -1, -1, 37, 38, -1, 40, 41,
6691 42, 43, 44, -1, -1, -1, -1, -1, -1, -1,
6692 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6693 -1, -1, -1, -1, -1, -1, 68, 69, -1, -1,
6694 -1, -1, -1, -1, -1, -1, 78, 79, 80, 81,
6695 82, 83, 84, 85, 86, 87, 88, 89, 90, -1,
6696 -1, -1, -1, 95, 96, 97, 98, -1, 100, 101,
6697 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6698 -1, -1, -1, -1, -1, -1, -1, -1, 120, -1,
6699 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6700 -1, -1, 134, 135, -1, 137, 138, 139, 140, 141,
6701 142, 143, 144, 145, 146, -1, -1, -1, -1, 151,
6702 152, 153, 154, 155, 0, -1, 158, -1, 160, -1,
6703 -1, -1, 8, 9, 10, -1, -1, -1, 14, 15,
6704 -1, 17, -1, -1, -1, -1, -1, -1, -1, 25,
6705 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6706 -1, 37, 38, -1, 40, 41, 42, 43, 44, -1,
6707 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6708 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6709 -1, -1, 68, 69, -1, -1, -1, -1, -1, -1,
6710 -1, -1, 78, 79, 80, 81, 82, 83, 84, 85,
6711 86, 87, 88, 89, 90, -1, -1, -1, -1, 95,
6712 96, 97, 98, -1, 100, 101, -1, -1, -1, -1,
6713 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6714 -1, -1, -1, -1, 120, -1, -1, -1, -1, -1,
6715 -1, -1, -1, -1, -1, -1, -1, -1, 134, 135,
6716 -1, 137, 138, 139, 140, 141, 142, 143, 144, 145,
6717 146, -1, -1, -1, -1, 151, 152, 153, 154, 155,
6718 -1, -1, 158, 1, 160, 3, 4, 5, 6, 7,
6719 8, 9, 10, 11, 12, -1, -1, 15, 16, -1,
6720 18, 19, 20, 21, 22, 23, 24, -1, -1, -1,
6721 -1, -1, 30, 31, 32, 33, 34, 35, 36, -1,
6722 -1, 39, -1, -1, -1, -1, -1, 45, 46, 47,
6723 48, 49, 50, 51, 52, 53, 54, 55, 56, 57,
6724 -1, 59, 60, 61, 62, 63, 64, 65, -1, -1,
6725 68, -1, -1, -1, -1, -1, -1, -1, 76, 77,
6726 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6727 -1, -1, -1, 91, 92, -1, -1, -1, -1, -1,
6728 -1, 99, -1, -1, 102, 103, 104, 105, -1, 107,
6729 -1, -1, 110, 111, 112, 113, 114, 115, 116, 117,
6730 118, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6731 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6732 -1, -1, -1, -1, -1, -1, -1, -1, -1, 147,
6733 148, 149, -1, -1, -1, 1, 154, 3, 4, 5,
6734 6, 7, 160, -1, 10, 11, 12, -1, 14, 15,
6735 16, -1, 18, 19, 20, 21, 22, 23, 24, -1,
6736 -1, -1, -1, -1, 30, 31, 32, 33, 34, 35,
6737 36, -1, -1, 39, -1, -1, -1, -1, -1, 45,
6738 46, 47, 48, 49, 50, 51, 52, 53, 54, 55,
6739 56, 57, -1, 59, 60, 61, 62, 63, 64, 65,
6740 -1, -1, 68, -1, -1, -1, -1, -1, -1, -1,
6741 76, 77, -1, -1, -1, -1, -1, -1, -1, -1,
6742 -1, -1, -1, -1, -1, 91, 92, -1, -1, -1,
6743 -1, -1, -1, 99, -1, -1, 102, 103, 104, 105,
6744 -1, 107, -1, -1, 110, 111, 112, 113, 114, 115,
6745 116, 117, 118, -1, -1, -1, -1, -1, -1, -1,
6746 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6747 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6748 -1, 147, 148, 149, -1, -1, -1, 1, 154, 3,
6749 4, 5, 6, 7, 160, -1, 10, 11, 12, -1,
6750 -1, 15, 16, 17, 18, 19, 20, 21, 22, 23,
6751 24, -1, -1, -1, -1, -1, 30, 31, 32, 33,
6752 34, 35, 36, -1, -1, 39, -1, -1, -1, -1,
6753 -1, 45, 46, 47, 48, 49, 50, 51, 52, 53,
6754 54, 55, 56, 57, -1, 59, 60, 61, 62, 63,
6755 64, 65, -1, -1, 68, -1, -1, -1, -1, -1,
6756 -1, -1, 76, 77, -1, -1, -1, -1, -1, -1,
6757 -1, -1, -1, -1, -1, -1, -1, 91, 92, -1,
6758 -1, -1, -1, -1, -1, 99, -1, -1, 102, 103,
6759 104, 105, -1, 107, -1, -1, 110, 111, 112, 113,
6760 114, 115, 116, 117, 118, -1, -1, -1, -1, -1,
6761 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6762 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6763 -1, -1, -1, 147, 148, 149, -1, -1, -1, 1,
6764 154, 3, 4, 5, 6, 7, 160, -1, 10, 11,
6765 12, -1, -1, 15, 16, -1, 18, 19, 20, 21,
6766 22, 23, 24, 25, -1, -1, -1, -1, 30, 31,
6767 32, 33, 34, 35, 36, -1, -1, 39, -1, -1,
6768 -1, -1, -1, 45, 46, 47, 48, 49, 50, 51,
6769 52, 53, 54, 55, 56, 57, -1, 59, 60, 61,
6770 62, 63, 64, 65, -1, -1, 68, -1, -1, -1,
6771 -1, -1, -1, -1, 76, 77, -1, -1, -1, -1,
6772 -1, -1, -1, -1, -1, -1, -1, -1, -1, 91,
6773 92, -1, -1, -1, -1, -1, -1, 99, -1, -1,
6774 102, 103, 104, 105, -1, 107, -1, -1, 110, 111,
6775 112, 113, 114, 115, 116, 117, 118, -1, -1, -1,
6776 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6777 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6778 -1, -1, -1, -1, -1, 147, 148, 149, -1, -1,
6779 -1, 1, 154, 3, 4, 5, 6, 7, 160, -1,
6780 10, 11, 12, -1, -1, 15, 16, -1, 18, 19,
6781 20, 21, 22, 23, 24, -1, -1, -1, -1, -1,
6782 30, 31, 32, 33, 34, 35, 36, -1, -1, 39,
6783 -1, -1, -1, -1, -1, 45, 46, 47, 48, 49,
6784 50, 51, 52, 53, 54, 55, 56, 57, -1, 59,
6785 60, 61, 62, 63, 64, 65, -1, -1, 68, -1,
6786 -1, -1, -1, -1, -1, -1, 76, 77, -1, -1,
6787 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6788 -1, 91, 92, -1, -1, -1, -1, -1, -1, 99,
6789 -1, -1, 102, 103, 104, 105, -1, 107, -1, -1,
6790 110, 111, 112, 113, 114, 115, 116, 117, 118, -1,
6791 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6792 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6793 -1, -1, -1, -1, -1, -1, -1, 147, 148, 149,
6794 -1, -1, -1, 1, 154, 3, 4, 5, 6, 7,
6795 160, 9, 10, 11, 12, -1, -1, -1, 16, -1,
6796 18, 19, 20, 21, 22, 23, 24, -1, -1, -1,
6797 -1, -1, 30, 31, 32, 33, 34, 35, 36, -1,
6798 -1, 39, -1, -1, -1, -1, -1, 45, 46, 47,
6799 48, 49, 50, 51, 52, 53, 54, 55, 56, 57,
6800 -1, 59, 60, 61, 62, 63, 64, 65, -1, -1,
6801 68, -1, -1, -1, -1, -1, -1, -1, 76, 77,
6802 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6803 -1, -1, -1, 91, 92, -1, -1, -1, -1, -1,
6804 -1, 99, -1, -1, 102, 103, 104, 105, -1, 107,
6805 -1, -1, 110, 111, 112, 113, 114, 115, 116, 117,
6806 118, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6807 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6808 -1, -1, -1, -1, -1, -1, -1, -1, -1, 147,
6809 148, 149, -1, -1, -1, 1, 154, 3, 4, 5,
6810 6, 7, 160, -1, 10, 11, 12, -1, -1, -1,
6811 16, -1, 18, 19, 20, 21, 22, 23, 24, -1,
6812 -1, -1, -1, -1, 30, 31, 32, 33, 34, 35,
6813 36, -1, -1, 39, -1, -1, -1, -1, -1, 45,
6814 46, 47, 48, 49, 50, 51, 52, 53, 54, 55,
6815 56, 57, -1, 59, 60, 61, 62, 63, 64, 65,
6816 -1, -1, 68, -1, -1, -1, -1, -1, -1, -1,
6817 76, 77, -1, -1, -1, -1, -1, -1, -1, -1,
6818 -1, -1, -1, -1, -1, 91, 92, -1, -1, -1,
6819 -1, -1, -1, 99, -1, -1, 102, 103, 104, 105,
6820 -1, 107, -1, -1, 110, 111, 112, 113, 114, 115,
6821 116, 117, 118, -1, -1, -1, -1, -1, -1, -1,
6822 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6823 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6824 -1, 147, 148, 149, -1, -1, -1, 1, 154, 3,
6825 4, 5, 6, 7, 160, -1, -1, 11, 12, -1,
6826 -1, -1, 16, -1, 18, 19, 20, 21, 22, 23,
6827 24, -1, -1, -1, -1, -1, 30, 31, 32, 33,
6828 34, 35, 36, -1, -1, 39, -1, -1, -1, -1,
6829 -1, 45, 46, 47, 48, 49, 50, 51, 52, 53,
6830 54, 55, 56, 57, -1, 59, 60, 61, 62, 63,
6831 64, 65, -1, -1, -1, -1, -1, -1, -1, -1,
6832 -1, -1, 76, 77, -1, -1, -1, -1, -1, -1,
6833 -1, -1, -1, -1, -1, -1, -1, 91, 92, -1,
6834 -1, -1, -1, -1, -1, 99, -1, -1, 102, 103,
6835 104, 105, -1, 107, -1, -1, 110, 111, 112, 113,
6836 114, 115, 116, 117, 118, -1, -1, -1, -1, -1,
6837 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6838 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6839 -1, -1, -1, 147, 148, 149, -1, -1, -1, -1,
6840 154, -1, -1, -1, 158, 1, 160, 3, 4, 5,
6841 6, 7, -1, -1, -1, 11, 12, -1, -1, -1,
6842 16, -1, 18, 19, 20, 21, 22, 23, 24, -1,
6843 -1, -1, -1, -1, 30, 31, 32, 33, 34, 35,
6844 36, -1, -1, 39, -1, -1, -1, -1, -1, 45,
6845 46, 47, 48, 49, 50, 51, 52, 53, 54, 55,
6846 56, 57, -1, 59, 60, 61, 62, 63, 64, 65,
6847 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6848 76, 77, -1, -1, -1, -1, -1, -1, -1, -1,
6849 -1, -1, -1, -1, -1, 91, 92, -1, -1, -1,
6850 -1, -1, -1, 99, -1, -1, 102, 103, 104, 105,
6851 -1, 107, -1, -1, 110, 111, 112, 113, 114, 115,
6852 116, 117, 118, -1, -1, -1, -1, -1, -1, -1,
6853 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6854 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6855 -1, 147, 148, 149, -1, -1, -1, -1, 154, -1,
6856 -1, -1, 158, 1, 160, 3, 4, 5, 6, 7,
6857 -1, -1, -1, 11, 12, -1, -1, -1, 16, -1,
6858 18, 19, 20, 21, 22, 23, 24, -1, -1, -1,
6859 -1, -1, 30, 31, 32, 33, 34, 35, 36, -1,
6860 -1, 39, -1, -1, -1, -1, -1, 45, 46, 47,
6861 48, 49, 50, 51, 52, 53, 54, 55, 56, 57,
6862 -1, 59, 60, 61, 62, 63, 64, 65, -1, -1,
6863 -1, -1, -1, -1, -1, -1, -1, -1, 76, 77,
6864 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6865 -1, -1, -1, 91, 92, -1, -1, -1, -1, -1,
6866 -1, 99, -1, -1, 102, 103, 104, 105, -1, 107,
6867 -1, -1, 110, 111, 112, 113, 114, 115, 116, 117,
6868 118, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6869 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6870 -1, -1, -1, -1, -1, -1, -1, -1, -1, 147,
6871 148, 149, -1, -1, 152, 1, 154, 3, 4, 5,
6872 6, 7, 160, -1, -1, 11, 12, -1, -1, -1,
6873 16, -1, 18, 19, 20, 21, 22, 23, 24, -1,
6874 -1, -1, -1, -1, 30, 31, 32, 33, 34, 35,
6875 36, -1, -1, 39, -1, -1, -1, -1, -1, 45,
6876 46, 47, 48, 49, 50, 51, 52, 53, 54, 55,
6877 56, 57, -1, 59, 60, 61, 62, 63, 64, 65,
6878 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6879 76, 77, -1, -1, -1, -1, -1, -1, -1, -1,
6880 -1, -1, -1, -1, -1, 91, 92, -1, -1, -1,
6881 -1, -1, -1, 99, -1, -1, 102, 103, 104, 105,
6882 -1, 107, -1, -1, 110, 111, 112, 113, 114, 115,
6883 116, 117, 118, -1, -1, -1, -1, -1, -1, -1,
6884 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6885 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6886 -1, 147, 148, 149, -1, -1, 152, 1, 154, 3,
6887 4, 5, -1, 7, 160, -1, -1, 11, 12, -1,
6888 -1, -1, 16, 17, 18, 19, 20, 21, 22, 23,
6889 24, -1, -1, -1, -1, -1, 30, 31, 32, 33,
6890 34, 35, 36, -1, -1, 39, -1, -1, -1, -1,
6891 -1, -1, 46, -1, -1, 49, 50, 51, 52, 53,
6892 54, 55, 56, 57, -1, 59, 60, 61, 62, 63,
6893 64, 65, -1, -1, -1, -1, -1, -1, -1, -1,
6894 -1, -1, 76, 77, -1, -1, -1, -1, -1, -1,
6895 -1, -1, -1, -1, -1, -1, -1, 91, 92, -1,
6896 -1, -1, -1, -1, -1, 99, -1, -1, 102, 103,
6897 104, 105, -1, -1, -1, -1, 110, 111, 112, 113,
6898 114, 115, 116, 117, 118, -1, -1, -1, -1, -1,
6899 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6900 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6901 -1, -1, -1, 147, 148, 149, -1, -1, -1, -1,
6902 154, -1, -1, -1, -1, -1, 160, 3, 4, 5,
6903 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
6904 16, 17, 18, 19, 20, 21, 22, 23, 24, 25,
6905 26, -1, -1, -1, 30, 31, 32, 33, 34, 35,
6906 36, 37, 38, 39, -1, -1, -1, -1, -1, 45,
6907 46, 47, 48, 49, 50, 51, 52, 53, 54, 55,
6908 56, 57, -1, -1, -1, -1, -1, -1, -1, -1,
6909 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6910 76, 77, 78, 79, 80, 81, 82, 83, 84, -1,
6911 -1, 87, 88, -1, -1, -1, -1, 93, 94, 95,
6912 96, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6913 -1, 107, 108, -1, -1, -1, -1, -1, -1, -1,
6914 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6915 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6916 -1, 137, 138, 139, 140, 141, 142, 143, 144, 145,
6917 146, -1, 148, 149, -1, -1, -1, -1, -1, -1,
6918 156, 157, 3, 4, 5, 6, 7, 8, 9, 10,
6919 11, 12, 13, 14, 15, 16, 17, 18, 19, 20,
6920 21, 22, 23, 24, 25, 26, -1, -1, -1, 30,
6921 31, 32, 33, 34, 35, 36, 37, 38, 39, -1,
6922 -1, -1, -1, -1, 45, 46, 47, 48, 49, 50,
6923 51, 52, 53, 54, 55, 56, 57, -1, -1, -1,
6924 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6925 -1, -1, -1, -1, -1, 76, 77, 78, 79, 80,
6926 81, 82, 83, 84, -1, -1, 87, 88, -1, -1,
6927 -1, -1, 93, 94, 95, 96, -1, -1, -1, -1,
6928 -1, -1, -1, -1, -1, -1, 107, 108, -1, -1,
6929 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6930 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6931 -1, -1, -1, -1, -1, -1, 137, 138, 139, 140,
6932 141, 142, 143, 144, 145, 146, -1, 148, 149, -1,
6933 -1, -1, -1, -1, -1, 156, 3, 4, 5, 6,
6934 7, 8, 9, 10, 11, 12, 13, 14, 15, 16,
6935 17, 18, 19, 20, 21, 22, 23, 24, 25, 26,
6936 -1, -1, -1, 30, 31, 32, 33, 34, 35, 36,
6937 37, 38, 39, -1, -1, -1, -1, -1, 45, 46,
6938 47, 48, 49, 50, 51, 52, 53, 54, -1, 56,
6939 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6940 -1, -1, -1, -1, -1, -1, -1, -1, -1, 76,
6941 77, 78, 79, 80, 81, 82, 83, 84, -1, -1,
6942 87, 88, -1, -1, -1, -1, 93, 94, 95, 96,
6943 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6944 107, 108, -1, -1, 111, -1, -1, -1, -1, -1,
6945 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6946 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6947 137, 138, 139, 140, 141, 142, 143, 144, 145, 146,
6948 -1, 148, 149, -1, -1, -1, -1, -1, -1, 156,
6949 3, 4, 5, 6, 7, 8, 9, 10, 11, 12,
6950 13, 14, 15, 16, 17, 18, 19, 20, 21, 22,
6951 23, 24, 25, 26, -1, -1, -1, 30, 31, 32,
6952 33, 34, 35, 36, 37, 38, 39, -1, -1, -1,
6953 -1, -1, 45, 46, 47, 48, 49, 50, 51, 52,
6954 53, -1, -1, 56, -1, -1, -1, -1, -1, -1,
6955 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6956 -1, -1, -1, 76, 77, 78, 79, 80, 81, 82,
6957 83, 84, -1, -1, 87, 88, -1, -1, -1, -1,
6958 93, 94, 95, 96, -1, -1, -1, -1, -1, -1,
6959 -1, -1, -1, -1, 107, 108, -1, -1, 111, -1,
6960 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6961 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6962 -1, -1, -1, -1, 137, 138, 139, 140, 141, 142,
6963 143, 144, 145, 146, -1, 148, 149, -1, -1, -1,
6964 -1, -1, -1, 156, 3, 4, 5, 6, 7, 8,
6965 9, 10, 11, 12, 13, 14, 15, 16, 17, 18,
6966 19, 20, 21, 22, 23, 24, 25, 26, -1, -1,
6967 -1, 30, 31, 32, 33, 34, 35, 36, 37, 38,
6968 39, -1, -1, -1, -1, -1, 45, 46, 47, 48,
6969 49, 50, 51, 52, 53, -1, -1, 56, -1, -1,
6970 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6971 -1, -1, -1, -1, -1, -1, -1, 76, 77, 78,
6972 79, 80, 81, 82, 83, 84, -1, -1, 87, 88,
6973 -1, -1, -1, -1, 93, 94, 95, 96, -1, -1,
6974 -1, -1, -1, -1, -1, -1, -1, -1, 107, 108,
6975 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6976 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6977 -1, -1, -1, -1, -1, -1, -1, -1, 137, 138,
6978 139, 140, 141, 142, 143, 144, 145, 146, -1, 148,
6979 149, 3, 4, 5, -1, 7, -1, 156, -1, 11,
6980 12, -1, -1, -1, 16, -1, 18, 19, 20, 21,
6981 22, 23, 24, -1, -1, -1, -1, -1, 30, 31,
6982 32, 33, 34, 35, 36, -1, -1, 39, -1, -1,
6983 -1, -1, -1, -1, 46, -1, -1, 49, 50, 51,
6984 52, 53, 54, 55, 56, 57, -1, 59, 60, 61,
6985 62, 63, 64, 65, -1, -1, -1, -1, -1, -1,
6986 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6987 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6988 -1, -1, -1, -1, -1, -1, -1, 99, -1, -1,
6989 102, 103, 104, 105, -1, -1, -1, -1, 110, 111,
6990 112, 113, 114, 115, 116, 117, 118, -1, -1, 3,
6991 4, 5, -1, 7, -1, -1, -1, 11, 12, -1,
6992 -1, -1, 16, -1, 18, 19, 20, 21, 22, 23,
6993 24, -1, -1, -1, -1, 147, 30, 31, 32, 33,
6994 34, 35, 36, 155, -1, 39, -1, -1, -1, -1,
6995 -1, -1, 46, -1, -1, 49, 50, 51, 52, 53,
6996 54, 55, 56, 57, -1, 59, 60, 61, 62, 63,
6997 64, 65, -1, -1, -1, -1, -1, -1, -1, -1,
6998 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6999 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7000 -1, -1, -1, -1, -1, 99, -1, -1, 102, 103,
7001 104, 105, -1, -1, -1, -1, 110, 111, 112, 113,
7002 114, 115, 116, 117, 118, -1, -1, 3, 4, 5,
7003 -1, 7, -1, -1, -1, 11, 12, -1, -1, -1,
7004 16, -1, 18, 19, 20, 21, 22, 23, 24, -1,
7005 -1, -1, -1, 147, 30, 31, 32, 33, 34, 35,
7006 36, 155, -1, 39, -1, -1, -1, -1, -1, -1,
7007 46, -1, -1, 49, 50, 51, 52, 53, 54, 55,
7008 56, 57, 58, 59, 60, 61, 62, 63, 64, 65,
7009 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7010 76, 77, -1, -1, -1, -1, -1, -1, -1, -1,
7011 -1, -1, -1, -1, -1, 91, 92, -1, -1, -1,
7012 -1, -1, -1, 99, -1, -1, 102, 103, 104, 105,
7013 -1, 107, 108, 109, 110, 111, 112, 113, 114, 115,
7014 116, 117, 118, -1, -1, -1, -1, -1, -1, -1,
7015 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7016 -1, -1, -1, -1, -1, -1, 3, 4, 5, -1,
7017 7, 147, 148, 149, 11, 12, -1, -1, 154, 16,
7018 -1, 18, 19, 20, 21, 22, 23, 24, -1, -1,
7019 -1, -1, -1, 30, 31, 32, 33, 34, 35, 36,
7020 -1, -1, 39, -1, -1, -1, -1, -1, -1, 46,
7021 -1, -1, 49, 50, 51, 52, 53, 54, 55, 56,
7022 57, -1, 59, 60, 61, 62, 63, 64, 65, -1,
7023 -1, -1, -1, -1, -1, -1, -1, -1, -1, 76,
7024 77, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7025 -1, -1, -1, -1, 91, 92, -1, -1, -1, -1,
7026 -1, -1, 99, -1, -1, 102, 103, 104, 105, -1,
7027 -1, -1, -1, 110, 111, 112, 113, 114, 115, 116,
7028 117, 118, -1, -1, -1, -1, -1, -1, -1, -1,
7029 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7030 -1, -1, -1, 1, -1, 3, 4, 5, 6, 7,
7031 147, 148, 149, 11, 12, -1, -1, 154, 16, -1,
7032 18, 19, 20, 21, 22, 23, 24, -1, -1, -1,
7033 -1, -1, 30, 31, 32, 33, 34, 35, 36, -1,
7034 -1, 39, -1, -1, -1, -1, -1, 45, 46, -1,
7035 48, 49, 50, 51, 52, 53, 54, 55, 56, 57,
7036 -1, 59, 60, 61, 62, 63, 64, 65, -1, -1,
7037 -1, -1, -1, -1, -1, -1, -1, -1, 76, 77,
7038 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7039 -1, -1, -1, 91, 92, -1, -1, -1, -1, -1,
7040 -1, 99, -1, -1, 102, 103, 104, 105, -1, 107,
7041 -1, -1, 110, 111, 112, 113, 114, 115, 116, 117,
7042 118, -1, -1, 1, -1, 3, 4, 5, -1, 7,
7043 -1, -1, -1, 11, 12, -1, -1, -1, 16, -1,
7044 18, 19, 20, 21, 22, 23, 24, -1, -1, 147,
7045 148, 149, 30, 31, 32, 33, 34, 35, 36, -1,
7046 -1, 39, -1, -1, -1, -1, -1, -1, 46, -1,
7047 -1, 49, 50, 51, 52, 53, 54, 55, 56, 57,
7048 -1, 59, 60, 61, 62, 63, 64, 65, -1, -1,
7049 -1, -1, -1, -1, -1, -1, -1, -1, 76, 77,
7050 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7051 -1, -1, -1, 91, 92, -1, -1, -1, -1, -1,
7052 -1, 99, -1, -1, 102, 103, 104, 105, -1, -1,
7053 -1, -1, 110, 111, 112, 113, 114, 115, 116, 117,
7054 118, -1, -1, -1, -1, 3, 4, 5, -1, 7,
7055 -1, -1, -1, 11, 12, -1, -1, -1, 16, -1,
7056 18, 19, 20, 21, 22, 23, 24, -1, -1, 147,
7057 148, 149, 30, 31, 32, 33, 34, 35, 36, -1,
7058 -1, 39, -1, -1, -1, -1, -1, -1, 46, -1,
7059 -1, 49, 50, 51, 52, 53, 54, 55, 56, 57,
7060 58, 59, 60, 61, 62, 63, 64, 65, -1, -1,
7061 -1, -1, -1, -1, -1, -1, -1, -1, 76, 77,
7062 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7063 -1, -1, -1, 91, 92, -1, -1, -1, -1, -1,
7064 -1, 99, -1, -1, 102, 103, 104, 105, -1, 107,
7065 108, 109, 110, 111, 112, 113, 114, 115, 116, 117,
7066 118, -1, -1, -1, -1, 3, 4, 5, -1, 7,
7067 -1, -1, -1, 11, 12, -1, -1, -1, 16, -1,
7068 18, 19, 20, 21, 22, 23, 24, -1, -1, 147,
7069 148, 149, 30, 31, 32, 33, 34, 35, 36, -1,
7070 -1, 39, -1, -1, -1, -1, -1, -1, 46, -1,
7071 -1, 49, 50, 51, 52, 53, 54, 55, 56, 57,
7072 58, 59, 60, 61, 62, 63, 64, 65, -1, -1,
7073 -1, -1, -1, -1, -1, -1, -1, -1, 76, 77,
7074 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7075 -1, -1, -1, 91, 92, -1, -1, -1, -1, -1,
7076 -1, 99, -1, -1, 102, 103, 104, 105, -1, 107,
7077 108, 109, 110, 111, 112, 113, 114, 115, 116, 117,
7078 118, -1, -1, -1, -1, 3, 4, 5, -1, 7,
7079 -1, -1, -1, 11, 12, -1, -1, -1, 16, -1,
7080 18, 19, 20, 21, 22, 23, 24, -1, -1, 147,
7081 148, 149, 30, 31, 32, 33, 34, 35, 36, -1,
7082 -1, 39, -1, -1, -1, -1, -1, -1, 46, -1,
7083 -1, 49, 50, 51, 52, 53, 54, 55, 56, 57,
7084 58, 59, 60, 61, 62, 63, 64, 65, -1, -1,
7085 -1, -1, -1, -1, -1, -1, -1, -1, 76, 77,
7086 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7087 -1, -1, -1, 91, 92, -1, -1, -1, -1, -1,
7088 -1, 99, -1, -1, 102, 103, 104, 105, -1, 107,
7089 108, 109, 110, 111, 112, 113, 114, 115, 116, 117,
7090 118, -1, -1, -1, -1, 3, 4, 5, -1, 7,
7091 -1, -1, -1, 11, 12, -1, -1, -1, 16, -1,
7092 18, 19, 20, 21, 22, 23, 24, -1, -1, 147,
7093 148, 149, 30, 31, 32, 33, 34, 35, 36, -1,
7094 -1, 39, -1, -1, -1, -1, -1, -1, 46, -1,
7095 -1, 49, 50, 51, 52, 53, 54, 55, 56, 57,
7096 58, 59, 60, 61, 62, 63, 64, 65, -1, -1,
7097 -1, -1, -1, -1, -1, -1, -1, -1, 76, 77,
7098 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7099 -1, -1, -1, 91, 92, -1, -1, -1, -1, -1,
7100 -1, 99, -1, -1, 102, 103, 104, 105, -1, 107,
7101 108, 109, 110, 111, 112, 113, 114, 115, 116, 117,
7102 118, -1, -1, -1, -1, 3, 4, 5, -1, 7,
7103 -1, -1, -1, 11, 12, -1, -1, -1, 16, -1,
7104 18, 19, 20, 21, 22, 23, 24, -1, -1, 147,
7105 148, 149, 30, 31, 32, 33, 34, 35, 36, -1,
7106 -1, 39, -1, -1, -1, -1, -1, -1, 46, -1,
7107 -1, 49, 50, 51, 52, 53, 54, 55, 56, 57,
7108 58, 59, 60, 61, 62, 63, 64, 65, -1, -1,
7109 -1, -1, -1, -1, -1, -1, -1, -1, 76, 77,
7110 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7111 -1, -1, -1, 91, 92, -1, -1, -1, -1, -1,
7112 -1, 99, -1, -1, 102, 103, 104, 105, -1, 107,
7113 108, -1, 110, 111, 112, 113, 114, 115, 116, 117,
7114 118, -1, -1, -1, -1, 3, 4, 5, -1, 7,
7115 -1, -1, -1, 11, 12, -1, -1, -1, 16, -1,
7116 18, 19, 20, 21, 22, 23, 24, -1, -1, 147,
7117 148, 149, 30, 31, 32, 33, 34, 35, 36, -1,
7118 -1, 39, -1, -1, -1, -1, -1, -1, 46, -1,
7119 -1, 49, 50, 51, 52, 53, 54, 55, 56, 57,
7120 58, 59, 60, 61, 62, 63, 64, 65, -1, -1,
7121 -1, -1, -1, -1, -1, -1, -1, -1, 76, 77,
7122 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7123 -1, -1, -1, 91, 92, -1, -1, -1, -1, -1,
7124 -1, 99, -1, -1, 102, 103, 104, 105, -1, -1,
7125 108, 109, 110, 111, 112, 113, 114, 115, 116, 117,
7126 118, -1, -1, -1, -1, 3, 4, 5, -1, 7,
7127 -1, -1, -1, 11, 12, -1, -1, -1, 16, -1,
7128 18, 19, 20, 21, 22, 23, 24, -1, -1, 147,
7129 148, 149, 30, 31, 32, 33, 34, 35, 36, -1,
7130 -1, 39, -1, -1, -1, -1, -1, -1, 46, -1,
7131 -1, 49, 50, 51, 52, 53, 54, 55, 56, 57,
7132 58, 59, 60, 61, 62, 63, 64, 65, -1, -1,
7133 -1, -1, -1, -1, -1, -1, -1, -1, 76, 77,
7134 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7135 -1, -1, -1, 91, 92, -1, -1, -1, -1, -1,
7136 -1, 99, -1, -1, 102, 103, 104, 105, -1, -1,
7137 108, -1, 110, 111, 112, 113, 114, 115, 116, 117,
7138 118, -1, -1, -1, -1, 3, 4, 5, -1, 7,
7139 -1, -1, -1, 11, 12, -1, -1, -1, 16, -1,
7140 18, 19, 20, 21, 22, 23, 24, -1, -1, 147,
7141 148, 149, 30, 31, 32, 33, 34, 35, 36, -1,
7142 -1, 39, -1, -1, -1, -1, -1, -1, 46, -1,
7143 -1, 49, 50, 51, 52, 53, 54, 55, 56, 57,
7144 -1, 59, 60, 61, 62, 63, 64, 65, -1, -1,
7145 -1, -1, -1, -1, -1, -1, -1, -1, 76, 77,
7146 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7147 -1, -1, -1, 91, 92, -1, -1, -1, -1, -1,
7148 -1, 99, -1, -1, 102, 103, 104, 105, -1, 107,
7149 -1, -1, 110, 111, 112, 113, 114, 115, 116, 117,
7150 118, -1, -1, -1, -1, 3, 4, 5, -1, 7,
7151 -1, -1, -1, 11, 12, -1, -1, -1, 16, -1,
7152 18, 19, 20, 21, 22, 23, 24, -1, -1, 147,
7153 148, 149, 30, 31, 32, 33, 34, 35, 36, -1,
7154 -1, 39, -1, -1, -1, -1, -1, -1, 46, -1,
7155 -1, 49, 50, 51, 52, 53, 54, 55, 56, 57,
7156 -1, 59, 60, 61, 62, 63, 64, 65, -1, -1,
7157 -1, -1, -1, -1, -1, -1, -1, -1, 76, 77,
7158 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7159 -1, -1, -1, 91, 92, -1, -1, -1, -1, -1,
7160 -1, 99, -1, -1, 102, 103, 104, 105, -1, 107,
7161 -1, -1, 110, 111, 112, 113, 114, 115, 116, 117,
7162 118, -1, -1, -1, -1, 3, 4, 5, -1, 7,
7163 -1, -1, -1, 11, 12, -1, -1, -1, 16, -1,
7164 18, 19, 20, 21, 22, 23, 24, -1, -1, 147,
7165 148, 149, 30, 31, 32, 33, 34, 35, 36, -1,
7166 -1, 39, -1, -1, -1, -1, -1, -1, 46, -1,
7167 -1, 49, 50, 51, 52, 53, 54, 55, 56, 57,
7168 -1, 59, 60, 61, 62, 63, 64, 65, -1, -1,
7169 -1, -1, -1, -1, -1, -1, -1, -1, 76, 77,
7170 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7171 -1, -1, -1, 91, 92, -1, -1, -1, -1, -1,
7172 -1, 99, -1, -1, 102, 103, 104, 105, -1, 107,
7173 -1, -1, 110, 111, 112, 113, 114, 115, 116, 117,
7174 118, -1, -1, -1, -1, 3, 4, 5, -1, 7,
7175 -1, -1, -1, 11, 12, -1, -1, -1, 16, -1,
7176 18, 19, 20, 21, 22, 23, 24, -1, -1, 147,
7177 148, 149, 30, 31, 32, 33, 34, 35, 36, -1,
7178 -1, 39, -1, -1, -1, -1, -1, -1, 46, -1,
7179 -1, 49, 50, 51, 52, 53, 54, 55, 56, 57,
7180 -1, 59, 60, 61, 62, 63, 64, 65, -1, -1,
7181 -1, -1, -1, -1, -1, -1, -1, -1, 76, 77,
7182 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7183 -1, -1, -1, 91, 92, -1, -1, -1, -1, -1,
7184 -1, 99, -1, -1, 102, 103, 104, 105, -1, 107,
7185 -1, -1, 110, 111, 112, 113, 114, 115, 116, 117,
7186 118, -1, -1, -1, -1, 3, 4, 5, -1, 7,
7187 -1, -1, -1, 11, 12, -1, -1, -1, 16, -1,
7188 18, 19, 20, 21, 22, 23, 24, -1, -1, 147,
7189 148, 149, 30, 31, 32, 33, 34, 35, 36, -1,
7190 -1, 39, -1, -1, -1, -1, -1, -1, 46, -1,
7191 -1, 49, 50, 51, 52, 53, 54, 55, 56, 57,
7192 -1, 59, 60, 61, 62, 63, 64, 65, -1, -1,
7193 -1, -1, -1, -1, -1, -1, -1, -1, 76, 77,
7194 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7195 -1, -1, -1, 91, 92, -1, -1, -1, -1, -1,
7196 -1, 99, -1, -1, 102, 103, 104, 105, -1, 107,
7197 -1, -1, 110, 111, 112, 113, 114, 115, 116, 117,
7198 118, -1, -1, -1, -1, 3, 4, 5, -1, 7,
7199 -1, -1, -1, 11, 12, -1, -1, -1, 16, -1,
7200 18, 19, 20, 21, 22, 23, 24, -1, -1, 147,
7201 148, 149, 30, 31, 32, 33, 34, 35, 36, -1,
7202 -1, 39, -1, -1, -1, -1, -1, -1, 46, -1,
7203 -1, 49, 50, 51, 52, 53, 54, 55, 56, 57,
7204 -1, 59, 60, 61, 62, 63, 64, 65, -1, -1,
7205 -1, -1, -1, -1, -1, -1, -1, -1, 76, 77,
7206 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7207 -1, -1, -1, 91, 92, -1, -1, -1, -1, -1,
7208 -1, 99, -1, -1, 102, 103, 104, 105, -1, 107,
7209 -1, -1, 110, 111, 112, 113, 114, 115, 116, 117,
7210 118, -1, -1, -1, -1, 3, 4, 5, -1, 7,
7211 -1, -1, -1, 11, 12, -1, -1, -1, 16, -1,
7212 18, 19, 20, 21, 22, 23, 24, -1, -1, 147,
7213 148, 149, 30, 31, 32, 33, 34, 35, 36, -1,
7214 -1, 39, -1, -1, -1, -1, -1, -1, 46, -1,
7215 -1, 49, 50, 51, 52, 53, 54, 55, 56, 57,
7216 -1, 59, 60, 61, 62, 63, 64, 65, -1, -1,
7217 -1, -1, -1, -1, -1, -1, -1, -1, 76, 77,
7218 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7219 -1, -1, -1, 91, 92, -1, -1, -1, -1, -1,
7220 -1, 99, -1, -1, 102, 103, 104, 105, -1, -1,
7221 -1, -1, 110, 111, 112, 113, 114, 115, 116, 117,
7222 118, -1, -1, -1, -1, 3, 4, 5, -1, 7,
7223 -1, -1, -1, 11, 12, -1, -1, -1, 16, -1,
7224 18, 19, 20, 21, 22, 23, 24, -1, -1, 147,
7225 148, 149, 30, 31, 32, 33, 34, 35, 36, -1,
7226 -1, 39, -1, -1, -1, -1, -1, -1, 46, -1,
7227 -1, 49, 50, 51, 52, 53, 54, 55, 56, 57,
7228 -1, 59, 60, 61, 62, 63, 64, 65, -1, -1,
7229 -1, -1, -1, -1, -1, -1, -1, -1, 76, 77,
7230 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7231 -1, -1, -1, 91, 92, -1, -1, -1, -1, -1,
7232 -1, 99, -1, -1, 102, 103, 104, 105, -1, -1,
7233 -1, -1, 110, 111, 112, 113, 114, 115, 116, 117,
7234 118, -1, -1, -1, -1, 3, 4, 5, -1, 7,
7235 -1, -1, -1, 11, 12, -1, -1, -1, 16, -1,
7236 18, 19, 20, 21, 22, 23, 24, -1, -1, 147,
7237 148, 149, 30, 31, 32, 33, 34, 35, 36, -1,
7238 -1, 39, -1, -1, -1, -1, -1, -1, 46, -1,
7239 -1, 49, 50, 51, 52, 53, 54, 55, 56, 57,
7240 -1, 59, 60, 61, 62, 63, 64, 65, -1, -1,
7241 -1, -1, -1, -1, -1, -1, -1, -1, 76, 77,
7242 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7243 -1, -1, -1, 91, 92, -1, -1, -1, -1, -1,
7244 -1, 99, -1, -1, 102, 103, 104, 105, -1, -1,
7245 -1, -1, 110, 111, 112, 113, 114, 115, 116, 117,
7246 118, -1, -1, -1, -1, 3, 4, 5, -1, 7,
7247 -1, -1, -1, 11, 12, -1, -1, -1, 16, -1,
7248 18, 19, 20, 21, 22, 23, 24, -1, -1, 147,
7249 148, 149, 30, 31, 32, 33, 34, 35, 36, -1,
7250 -1, 39, -1, -1, -1, -1, -1, -1, 46, -1,
7251 -1, 49, 50, 51, 52, 53, 54, 55, 56, 57,
7252 -1, 59, 60, 61, 62, 63, 64, 65, -1, -1,
7253 -1, -1, -1, -1, -1, -1, -1, -1, 76, 77,
7254 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7255 -1, -1, -1, 91, 92, -1, -1, -1, -1, -1,
7256 -1, 99, -1, -1, 102, 103, 104, 105, -1, -1,
7257 -1, -1, 110, 111, 112, 113, 114, 115, 116, 117,
7258 118, -1, -1, -1, -1, 3, 4, 5, -1, 7,
7259 -1, -1, -1, 11, 12, -1, -1, -1, 16, -1,
7260 18, 19, 20, 21, 22, 23, 24, -1, -1, 147,
7261 148, 149, 30, 31, 32, 33, 34, 35, 36, -1,
7262 -1, 39, -1, -1, -1, -1, -1, -1, 46, -1,
7263 -1, 49, 50, 51, 52, 53, 54, 55, 56, 57,
7264 -1, 59, 60, 61, 62, 63, 64, 65, -1, -1,
7265 -1, -1, -1, -1, -1, -1, -1, -1, 76, 77,
7266 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7267 -1, -1, -1, 91, 92, -1, -1, -1, -1, -1,
7268 -1, 99, -1, -1, 102, 103, 104, 105, -1, -1,
7269 -1, -1, 110, 111, 112, 113, 114, 115, 116, 117,
7270 118, -1, -1, -1, -1, 3, 4, 5, -1, 7,
7271 -1, -1, -1, 11, 12, -1, -1, -1, 16, -1,
7272 18, 19, 20, 21, 22, 23, 24, -1, -1, 147,
7273 148, 149, 30, 31, 32, 33, 34, 35, 36, -1,
7274 -1, 39, -1, -1, -1, -1, -1, -1, 46, -1,
7275 -1, 49, 50, 51, 52, 53, 54, 55, 56, 57,
7276 -1, 59, 60, 61, 62, 63, 64, 65, -1, -1,
7277 -1, -1, -1, -1, -1, -1, -1, -1, 76, 77,
7278 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7279 -1, -1, -1, 91, 92, -1, -1, -1, -1, -1,
7280 -1, 99, -1, -1, 102, 103, 104, 105, -1, -1,
7281 -1, -1, 110, 111, 112, 113, 114, 115, 116, 117,
7282 118, -1, -1, -1, -1, 3, 4, 5, -1, 7,
7283 -1, -1, -1, 11, 12, -1, -1, -1, 16, -1,
7284 18, 19, 20, 21, 22, 23, 24, -1, -1, 147,
7285 148, 149, 30, 31, 32, 33, 34, 35, 36, -1,
7286 -1, 39, -1, -1, -1, -1, -1, -1, 46, -1,
7287 -1, 49, 50, 51, 52, 53, 54, 55, 56, 57,
7288 -1, 59, 60, 61, 62, 63, 64, 65, -1, -1,
7289 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7290 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7291 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7292 -1, 99, -1, -1, 102, 103, 104, 105, -1, 107,
7293 -1, -1, 110, 111, 112, 113, 114, 115, 116, 117,
7294 118, -1, -1, 3, 4, 5, -1, 7, -1, -1,
7295 -1, 11, 12, -1, -1, -1, 16, -1, 18, 19,
7296 20, 21, 22, 23, 24, -1, -1, -1, -1, 147,
7297 30, 31, 32, 33, 34, 35, 36, -1, -1, 39,
7298 -1, -1, -1, -1, -1, -1, 46, -1, -1, 49,
7299 50, 51, 52, 53, 54, 55, 56, 57, -1, 59,
7300 60, 61, 62, 63, 64, 65, -1, -1, -1, -1,
7301 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7302 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7303 -1, -1, -1, -1, -1, -1, -1, -1, -1, 99,
7304 -1, -1, 102, 103, 104, 105, -1, 107, -1, -1,
7305 110, 111, 112, 113, 114, 115, 116, 117, 118, -1,
7306 -1, 3, 4, 5, -1, 7, -1, -1, -1, 11,
7307 12, -1, -1, -1, 16, -1, 18, 19, 20, 21,
7308 22, 23, 24, -1, -1, -1, -1, 147, 30, 31,
7309 32, 33, 34, 35, 36, -1, -1, 39, -1, -1,
7310 -1, -1, -1, -1, 46, -1, -1, 49, 50, 51,
7311 52, 53, 54, 55, 56, 57, -1, 59, 60, 61,
7312 62, 63, 64, 65, -1, -1, -1, -1, -1, -1,
7313 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7314 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7315 -1, -1, -1, 95, -1, -1, -1, 99, -1, -1,
7316 102, 103, 104, 105, -1, -1, -1, -1, 110, 111,
7317 112, 113, 114, 115, 116, 117, 118, -1, -1, 3,
7318 4, 5, -1, 7, -1, -1, -1, 11, 12, -1,
7319 -1, -1, 16, -1, 18, 19, 20, 21, 22, 23,
7320 24, -1, -1, -1, -1, 147, 30, 31, 32, 33,
7321 34, 35, 36, -1, -1, 39, -1, -1, -1, -1,
7322 -1, -1, 46, -1, -1, 49, 50, 51, 52, 53,
7323 54, 55, 56, 57, -1, 59, 60, 61, 62, 63,
7324 64, 65, -1, -1, -1, -1, -1, -1, -1, -1,
7325 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7326 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7327 -1, -1, -1, -1, -1, 99, -1, -1, 102, 103,
7328 104, 105, -1, -1, -1, -1, 110, 111, 112, 113,
7329 114, 115, 116, 117, 118, -1, -1, 3, 4, 5,
7330 -1, 7, -1, -1, -1, 11, 12, -1, -1, -1,
7331 16, -1, 18, 19, 20, 21, 22, 23, 24, -1,
7332 -1, -1, -1, 147, 30, 31, 32, 33, 34, 35,
7333 36, -1, -1, 39, -1, -1, -1, -1, -1, -1,
7334 46, -1, -1, 49, 50, 51, 52, 53, 54, 55,
7335 56, 57, -1, 59, 60, 61, 62, 63, 64, 65,
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, -1, -1, -1, -1, -1, -1,
7339 -1, -1, -1, 99, -1, -1, 102, 103, 104, 105,
7340 -1, -1, -1, -1, 110, 111, 112, 113, 114, 115,
7341 116, 117, 118, -1, -1, 3, 4, 5, -1, 7,
7342 -1, -1, -1, 11, 12, -1, -1, -1, 16, -1,
7343 18, 19, 20, 21, 22, 23, 24, -1, -1, -1,
7344 -1, 147, 30, 31, 32, 33, 34, 35, 36, -1,
7345 -1, 39, -1, -1, -1, -1, -1, -1, 46, -1,
7346 -1, 49, 50, 51, 52, 53, 54, 55, 56, 57,
7347 -1, 59, 60, 61, 62, 63, 64, 65, -1, -1,
7348 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7349 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7350 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7351 -1, 99, -1, -1, 102, 103, 104, 105, -1, -1,
7352 -1, -1, 110, 111, 112, 113, 114, 115, 116, 117,
7353 118, -1, -1, 3, 4, 5, -1, 7, -1, -1,
7354 -1, 11, 12, -1, -1, -1, 16, -1, 18, 19,
7355 20, 21, 22, 23, 24, -1, -1, -1, -1, 147,
7356 30, 31, 32, 33, 34, 35, 36, -1, -1, 39,
7357 -1, -1, -1, -1, -1, -1, 46, -1, -1, 49,
7358 50, 51, 52, 53, 54, 55, 56, 57, -1, 59,
7359 60, 61, 62, 63, 64, 65, -1, -1, -1, -1,
7360 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7361 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7362 -1, -1, -1, -1, -1, -1, -1, -1, -1, 99,
7363 -1, -1, 102, 103, 104, 105, 33, 34, 35, 36,
7364 110, 111, 112, 113, 114, 115, 116, 117, 118, -1,
7365 -1, -1, 49, 50, 51, 52, -1, -1, -1, 56,
7366 -1, -1, 59, 60, 61, 62, 63, -1, -1, -1,
7367 -1, -1, -1, -1, -1, -1, -1, 147, -1, -1,
7368 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7369 -1, -1, -1, -1, 91, 92, -1, -1, -1, -1,
7370 -1, -1, 99, -1, -1, 102, -1, 104, 105, -1,
7371 -1, -1, -1, 110, 111, 112, 113, 114, 115, 116,
7372 117, 118, -1, -1, -1, -1, -1, 52, 53, -1,
7373 -1, 56, -1, -1, -1, -1, -1, -1, -1, -1,
7374 -1, -1, -1, 140, -1, -1, -1, -1, -1, -1,
7375 147, 76, 77, 78, 79, 80, 81, 82, 83, 84,
7376 -1, -1, 87, 88, -1, -1, -1, -1, 93, 94,
7377 95, 96, -1, -1, -1, -1, -1, -1, -1, -1,
7378 -1, -1, 107, 108, -1, -1, -1, -1, -1, -1,
7379 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7380 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7381 -1, -1, 137, 138, 139, 140, 141, 142, 143, 144,
7382 145, 146, -1, 148, 149, 52, 53, -1, -1, 56,
7383 -1, 156, -1, -1, -1, -1, -1, -1, -1, -1,
7384 -1, -1, -1, -1, -1, -1, -1, -1, -1, 76,
7385 77, 78, 79, 80, 81, 82, 83, 84, -1, -1,
7386 87, 88, -1, -1, -1, -1, 93, 94, 95, 96,
7387 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7388 107, 108, -1, -1, -1, -1, -1, -1, -1, -1,
7389 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7390 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7391 137, 138, 139, 140, 141, 142, 143, 144, 145, 146,
7392 -1, 148, 149, 52, 53, -1, -1, 56, -1, 156,
7393 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7394 -1, -1, -1, -1, -1, -1, -1, 76, 77, 78,
7395 79, 80, 81, 82, 83, 84, -1, -1, 87, 88,
7396 -1, -1, -1, -1, 93, 94, 95, 96, -1, -1,
7397 -1, -1, -1, -1, -1, -1, -1, -1, 107, 108,
7398 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7399 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7400 -1, -1, -1, -1, -1, -1, -1, -1, 137, 138,
7401 139, 140, 141, 142, 143, 144, 145, 146, -1, 148,
7402 149, 52, 53, -1, -1, 56, -1, 156, -1, -1,
7403 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7404 -1, -1, -1, -1, -1, 76, 77, 78, 79, 80,
7405 81, 82, 83, 84, -1, -1, 87, 88, -1, -1,
7406 -1, -1, 93, 94, 95, 96, -1, -1, -1, -1,
7407 -1, -1, -1, -1, -1, -1, 107, 108, -1, -1,
7408 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7409 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7410 -1, -1, -1, -1, -1, -1, 137, 138, 139, 140,
7411 141, 142, 143, 144, 145, 146, -1, 148, 149, 52,
7412 53, -1, -1, 56, -1, 156, -1, -1, -1, -1,
7413 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7414 -1, -1, -1, 76, 77, 78, 79, 80, 81, 82,
7415 83, 84, -1, -1, 87, 88, -1, -1, -1, -1,
7416 93, 94, 95, 96, -1, -1, -1, -1, -1, -1,
7417 -1, -1, -1, -1, 107, 108, -1, -1, -1, -1,
7418 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7419 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7420 -1, -1, -1, -1, 137, 138, 139, 140, 141, 142,
7421 143, 144, 145, 146, -1, 148, 149, 52, 53, -1,
7422 -1, 56, -1, 156, -1, -1, -1, -1, -1, -1,
7423 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7424 -1, 76, 77, 78, 79, 80, 81, 82, 83, 84,
7425 -1, -1, 87, 88, -1, -1, -1, -1, 93, 94,
7426 95, 96, -1, -1, -1, -1, -1, -1, -1, -1,
7427 -1, -1, 107, 108, -1, -1, -1, -1, -1, -1,
7428 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7429 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7430 -1, -1, 137, 138, 139, 140, 141, 142, 143, 144,
7431 145, 146, -1, 148, 149, 52, 53, -1, -1, 56,
7432 -1, 156, -1, -1, -1, -1, -1, -1, -1, -1,
7433 -1, -1, -1, -1, -1, -1, -1, -1, -1, 76,
7434 77, 78, 79, 80, 81, 82, 83, 84, -1, -1,
7435 87, 88, -1, -1, -1, -1, 93, 94, 95, 96,
7436 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7437 107, 108, -1, -1, -1, -1, -1, -1, -1, -1,
7438 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7439 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7440 137, 138, 139, 140, 141, 142, 143, 144, 145, 146,
7441 -1, 148, 149, 52, 53, -1, -1, 56, -1, 156,
7442 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7443 -1, -1, -1, -1, -1, -1, -1, 76, 77, 78,
7444 79, 80, 81, 82, 83, 84, -1, -1, 87, 88,
7445 -1, -1, -1, -1, 93, 94, 95, 96, -1, -1,
7446 -1, -1, -1, -1, -1, -1, -1, -1, 107, 108,
7447 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7448 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7449 -1, -1, -1, -1, -1, -1, -1, -1, 137, 138,
7450 139, 140, 141, 142, 143, 144, 145, 146, -1, 148,
7451 149, 52, 53, -1, -1, 56, -1, 156, -1, -1,
7452 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7453 -1, -1, -1, -1, -1, 76, 77, 78, 79, 80,
7454 81, 82, 83, 84, -1, -1, 87, 88, -1, -1,
7455 -1, -1, 93, 94, 95, 96, -1, -1, -1, -1,
7456 -1, -1, -1, -1, -1, -1, 107, 108, -1, -1,
7457 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7458 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7459 -1, -1, -1, -1, -1, -1, 137, 138, 139, 140,
7460 141, 142, 143, 144, 145, 146, -1, 148, 149, 52,
7461 53, -1, -1, 56, -1, 156, -1, -1, -1, -1,
7462 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7463 -1, -1, -1, 76, 77, 78, 79, 80, 81, 82,
7464 83, 84, -1, -1, 87, 88, -1, -1, -1, -1,
7465 93, 94, 95, 96, -1, -1, -1, -1, -1, -1,
7466 -1, -1, -1, -1, 107, 108, -1, -1, -1, -1,
7467 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7468 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7469 -1, -1, -1, -1, 137, 138, 139, 140, 141, 142,
7470 143, 144, 145, 146, -1, 148, 149, 52, 53, -1,
7471 -1, 56, -1, 156, -1, -1, -1, -1, -1, -1,
7472 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7473 -1, 76, 77, 78, 79, 80, 81, 82, 83, 84,
7474 -1, -1, 87, 88, -1, -1, -1, -1, 93, 94,
7475 95, 96, -1, -1, -1, -1, -1, -1, -1, -1,
7476 -1, -1, 107, 108, -1, -1, -1, -1, -1, -1,
7477 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7478 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7479 -1, -1, 137, 138, 139, 140, 141, 142, 143, 144,
7480 145, 146, -1, 148, 149, 52, 53, -1, -1, 56,
7481 -1, 156, -1, -1, -1, -1, -1, -1, -1, -1,
7482 -1, -1, -1, -1, -1, -1, -1, -1, -1, 76,
7483 77, 78, 79, 80, 81, 82, 83, 84, -1, -1,
7484 87, 88, -1, -1, -1, -1, 93, 94, 95, 96,
7485 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7486 107, 108, -1, -1, -1, -1, -1, -1, -1, -1,
7487 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7488 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7489 137, 138, 139, 140, 141, 142, 143, 144, 145, 146,
7490 -1, 148, 149, 52, 53, -1, -1, 56, -1, 156,
7491 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7492 -1, -1, -1, -1, -1, -1, -1, 76, 77, 78,
7493 79, 80, 81, 82, 83, 84, -1, -1, 87, 88,
7494 -1, -1, -1, -1, 93, 94, 95, 96, -1, -1,
7495 -1, -1, -1, -1, -1, -1, -1, -1, 107, 108,
7496 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7497 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7498 -1, -1, -1, -1, -1, -1, -1, -1, 137, 138,
7499 139, 140, 141, 142, 143, 144, 145, 146, -1, 148,
7500 149, 52, 53, -1, -1, 56, -1, 156, -1, -1,
7501 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7502 -1, -1, -1, -1, -1, 76, 77, 78, 79, 80,
7503 81, 82, 83, 84, -1, -1, 87, 88, -1, -1,
7504 -1, -1, 93, 94, 95, 96, -1, -1, -1, -1,
7505 -1, -1, -1, -1, -1, -1, 107, 108, -1, -1,
7506 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7507 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7508 -1, -1, -1, -1, -1, -1, 137, 138, 139, 140,
7509 141, 142, 143, 144, 145, 146, -1, 148, 149, 52,
7510 53, -1, -1, 56, -1, 156, -1, -1, -1, -1,
7511 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7512 -1, -1, -1, 76, 77, 78, 79, 80, 81, 82,
7513 83, 84, -1, -1, 87, 88, -1, -1, -1, -1,
7514 93, 94, 95, 96, -1, -1, -1, -1, -1, -1,
7515 -1, -1, -1, -1, 107, 108, -1, -1, -1, -1,
7516 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7517 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7518 -1, -1, -1, -1, 137, 138, 139, 140, 141, 142,
7519 143, 144, 145, 146, -1, 148, 149, 52, 53, -1,
7520 -1, 56, -1, 156, -1, -1, -1, -1, -1, -1,
7521 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7522 -1, 76, 77, 78, 79, 80, 81, 82, 83, 84,
7523 -1, -1, 87, 88, -1, -1, -1, -1, 93, 94,
7524 95, 96, -1, -1, -1, -1, -1, -1, -1, -1,
7525 -1, -1, 107, 108, -1, -1, -1, -1, -1, -1,
7526 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7527 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7528 -1, -1, 137, 138, 139, 140, 141, 142, 143, 144,
7529 145, 146, -1, 148, 149, -1, -1, -1, -1, -1,
7530 -1, 156
7531};
7532
7533/* YYSTOS[STATE-NUM] -- The symbol kind of the accessing symbol of
7534 state STATE-NUM. */
7535static const yytype_int16 yystos[] =
7536{
7537 0, 165, 166, 1, 3, 4, 5, 6, 7, 11,
7538 12, 16, 18, 19, 20, 21, 22, 23, 24, 30,
7539 31, 32, 33, 34, 35, 36, 39, 45, 46, 47,
7540 48, 49, 50, 51, 52, 53, 54, 55, 56, 57,
7541 59, 60, 61, 62, 63, 64, 65, 76, 77, 91,
7542 92, 99, 102, 103, 104, 105, 107, 110, 111, 112,
7543 113, 114, 115, 116, 117, 118, 147, 148, 149, 164,
7544 167, 168, 180, 182, 183, 184, 185, 186, 187, 191,
7545 195, 197, 203, 206, 208, 209, 210, 212, 214, 215,
7546 216, 217, 226, 227, 228, 229, 230, 231, 234, 255,
7547 267, 268, 269, 270, 271, 272, 273, 274, 275, 276,
7548 277, 278, 287, 288, 324, 329, 330, 380, 381, 382,
7549 383, 384, 385, 387, 388, 391, 392, 394, 395, 396,
7550 397, 410, 411, 413, 414, 415, 416, 417, 418, 419,
7551 420, 421, 482, 0, 3, 4, 5, 6, 7, 8,
7552 9, 10, 11, 12, 13, 14, 15, 16, 17, 18,
7553 19, 20, 21, 22, 23, 24, 25, 26, 30, 31,
7554 32, 33, 34, 35, 36, 37, 38, 39, 45, 46,
7555 47, 48, 49, 50, 51, 52, 53, 56, 76, 77,
7556 78, 79, 80, 81, 82, 83, 84, 87, 88, 93,
7557 94, 95, 96, 107, 108, 137, 138, 139, 140, 141,
7558 142, 143, 144, 145, 146, 148, 149, 156, 220, 221,
7559 222, 224, 225, 410, 179, 179, 179, 39, 58, 99,
7560 102, 107, 108, 109, 112, 148, 187, 209, 217, 227,
7561 238, 239, 245, 246, 249, 251, 252, 268, 417, 418,
7562 420, 421, 469, 470, 246, 157, 242, 247, 248, 154,
7563 157, 189, 54, 221, 189, 151, 169, 170, 235, 482,
7564 21, 22, 32, 195, 197, 208, 227, 268, 287, 288,
7565 227, 227, 227, 56, 47, 102, 171, 176, 177, 182,
7566 211, 212, 482, 171, 240, 251, 469, 482, 239, 468,
7567 469, 482, 46, 99, 147, 155, 195, 197, 216, 255,
7568 268, 417, 418, 421, 322, 220, 400, 412, 416, 400,
7569 401, 402, 161, 386, 386, 386, 386, 415, 203, 227,
7570 227, 154, 160, 163, 480, 481, 179, 40, 41, 42,
7571 43, 44, 37, 38, 157, 424, 425, 426, 427, 428,
7572 424, 427, 26, 151, 242, 248, 279, 331, 28, 280,
7573 328, 134, 155, 102, 107, 214, 134, 25, 78, 79,
7574 80, 81, 82, 83, 84, 85, 86, 87, 88, 89,
7575 90, 95, 96, 101, 135, 137, 138, 139, 140, 141,
7576 142, 143, 144, 145, 146, 233, 233, 69, 97, 98,
7577 153, 474, 475, 256, 1, 191, 198, 199, 199, 200,
7578 202, 202, 163, 199, 481, 99, 210, 217, 268, 293,
7579 417, 418, 421, 52, 56, 95, 99, 218, 219, 268,
7580 417, 418, 421, 219, 33, 34, 35, 36, 49, 50,
7581 51, 52, 56, 157, 194, 220, 419, 464, 465, 466,
7582 246, 157, 248, 98, 474, 475, 331, 383, 100, 100,
7583 155, 239, 56, 239, 239, 239, 400, 134, 101, 155,
7584 250, 482, 98, 153, 474, 100, 100, 155, 250, 92,
7585 244, 246, 251, 448, 469, 482, 246, 189, 191, 476,
7586 191, 54, 64, 65, 181, 157, 235, 236, 164, 424,
7587 424, 98, 474, 100, 178, 211, 158, 163, 481, 476,
7588 257, 159, 155, 189, 479, 155, 479, 152, 479, 189,
7589 56, 415, 213, 214, 426, 155, 98, 153, 474, 319,
7590 66, 119, 121, 122, 403, 119, 119, 403, 67, 403,
7591 161, 389, 398, 393, 399, 78, 160, 168, 151, 199,
7592 199, 199, 199, 235, 237, 191, 191, 52, 54, 55,
7593 56, 57, 58, 78, 92, 102, 107, 108, 109, 141,
7594 144, 298, 367, 425, 429, 430, 432, 433, 436, 437,
7595 439, 440, 441, 442, 448, 449, 450, 451, 452, 453,
7596 454, 455, 456, 457, 458, 459, 460, 461, 134, 265,
7597 442, 134, 266, 332, 333, 106, 207, 334, 335, 335,
7598 235, 211, 155, 216, 155, 235, 193, 227, 227, 227,
7599 227, 227, 227, 227, 227, 227, 227, 227, 227, 227,
7600 192, 227, 227, 227, 227, 227, 227, 227, 227, 227,
7601 227, 227, 52, 53, 56, 224, 471, 472, 244, 251,
7602 52, 53, 56, 224, 471, 242, 171, 174, 13, 289,
7603 480, 289, 199, 171, 171, 259, 163, 56, 98, 153,
7604 474, 25, 199, 52, 56, 218, 138, 423, 482, 98,
7605 153, 474, 264, 467, 69, 98, 473, 246, 476, 52,
7606 56, 242, 471, 235, 235, 223, 100, 124, 235, 239,
7607 239, 249, 252, 469, 52, 56, 244, 52, 56, 235,
7608 235, 470, 476, 155, 476, 155, 158, 476, 221, 236,
7609 227, 152, 134, 134, 56, 471, 471, 235, 170, 476,
7610 177, 158, 469, 155, 213, 52, 56, 244, 52, 56,
7611 320, 405, 404, 119, 390, 403, 66, 119, 119, 390,
7612 66, 119, 227, 171, 182, 102, 107, 294, 295, 296,
7613 297, 450, 155, 431, 462, 463, 155, 431, 155, 438,
7614 463, 476, 299, 300, 155, 438, 239, 34, 52, 52,
7615 155, 438, 34, 52, 39, 188, 209, 227, 232, 174,
7616 480, 188, 232, 174, 319, 152, 333, 319, 10, 68,
7617 286, 286, 107, 203, 204, 205, 239, 251, 253, 254,
7618 476, 213, 155, 99, 185, 190, 205, 217, 227, 239,
7619 241, 254, 268, 421, 341, 341, 189, 100, 100, 151,
7620 242, 248, 189, 477, 155, 100, 100, 242, 243, 248,
7621 482, 235, 286, 171, 13, 171, 27, 290, 480, 286,
7622 286, 17, 283, 337, 25, 258, 343, 52, 56, 244,
7623 52, 56, 260, 263, 422, 262, 52, 56, 218, 244,
7624 174, 191, 196, 476, 243, 248, 190, 227, 241, 190,
7625 241, 221, 235, 239, 250, 100, 100, 477, 100, 100,
7626 448, 469, 191, 39, 190, 241, 479, 214, 477, 321,
7627 406, 409, 416, 421, 386, 403, 386, 386, 386, 152,
7628 296, 450, 155, 476, 155, 461, 429, 455, 457, 433,
7629 436, 453, 459, 134, 239, 437, 452, 459, 451, 453,
7630 189, 44, 44, 286, 286, 320, 152, 320, 239, 155,
7631 44, 213, 56, 44, 134, 44, 98, 153, 474, 339,
7632 339, 136, 235, 235, 333, 207, 159, 100, 235, 235,
7633 207, 8, 281, 376, 482, 14, 15, 284, 285, 291,
7634 292, 482, 292, 201, 107, 239, 336, 286, 341, 337,
7635 286, 477, 199, 480, 199, 174, 477, 286, 476, 194,
7636 331, 328, 235, 235, 100, 235, 235, 476, 155, 476,
7637 189, 179, 407, 476, 294, 297, 295, 431, 155, 438,
7638 155, 438, 155, 438, 155, 438, 438, 188, 232, 237,
7639 237, 321, 321, 107, 239, 237, 237, 235, 237, 52,
7640 56, 244, 52, 56, 340, 340, 227, 190, 241, 190,
7641 241, 152, 235, 190, 241, 190, 241, 239, 254, 377,
7642 482, 175, 284, 171, 199, 286, 286, 239, 155, 289,
7643 339, 286, 290, 174, 480, 286, 235, 157, 298, 325,
7644 425, 430, 434, 435, 437, 444, 445, 446, 447, 448,
7645 453, 459, 461, 171, 155, 155, 453, 453, 459, 453,
7646 227, 227, 179, 179, 239, 182, 182, 227, 477, 52,
7647 56, 58, 91, 92, 99, 102, 104, 105, 107, 112,
7648 140, 324, 346, 347, 348, 350, 353, 357, 358, 359,
7649 362, 363, 364, 365, 366, 367, 368, 369, 370, 371,
7650 372, 373, 374, 375, 380, 381, 384, 385, 388, 392,
7651 395, 397, 418, 455, 346, 190, 241, 101, 378, 482,
7652 9, 282, 379, 482, 172, 289, 107, 239, 171, 340,
7653 261, 286, 447, 155, 303, 482, 323, 155, 303, 155,
7654 443, 482, 155, 443, 155, 443, 0, 120, 408, 295,
7655 438, 438, 155, 438, 438, 139, 313, 314, 482, 313,
7656 371, 371, 56, 218, 340, 347, 355, 356, 357, 358,
7657 361, 477, 189, 340, 478, 52, 400, 52, 102, 416,
7658 101, 155, 139, 155, 155, 347, 89, 90, 98, 153,
7659 157, 351, 352, 52, 99, 217, 268, 417, 418, 421,
7660 289, 176, 171, 171, 239, 292, 337, 338, 345, 346,
7661 171, 189, 316, 461, 29, 123, 326, 457, 435, 453,
7662 459, 437, 459, 453, 453, 298, 301, 302, 304, 305,
7663 307, 308, 310, 311, 312, 315, 451, 453, 454, 459,
7664 461, 171, 174, 347, 477, 347, 359, 361, 477, 155,
7665 152, 235, 124, 199, 372, 355, 359, 349, 360, 361,
7666 112, 364, 368, 371, 371, 218, 340, 477, 340, 476,
7667 355, 358, 362, 355, 358, 362, 56, 98, 153, 474,
7668 171, 163, 173, 291, 289, 40, 41, 286, 160, 158,
7669 327, 171, 303, 155, 443, 155, 443, 155, 443, 155,
7670 443, 443, 438, 303, 155, 303, 155, 309, 482, 316,
7671 300, 155, 306, 309, 99, 268, 155, 309, 476, 155,
7672 155, 354, 476, 155, 353, 155, 400, 476, 476, 476,
7673 477, 477, 477, 52, 56, 244, 52, 56, 376, 379,
7674 342, 199, 199, 52, 317, 318, 449, 174, 152, 453,
7675 453, 459, 453, 301, 457, 305, 307, 453, 459, 139,
7676 268, 308, 459, 56, 98, 453, 360, 362, 360, 359,
7677 361, 477, 171, 155, 189, 286, 443, 443, 155, 443,
7678 443, 303, 155, 309, 155, 309, 155, 309, 155, 309,
7679 52, 56, 309, 155, 478, 292, 343, 344, 318, 453,
7680 453, 453, 459, 453, 443, 309, 309, 155, 309, 309,
7681 453, 309
7682};
7683
7684/* YYR1[RULE-NUM] -- Symbol kind of the left-hand side of rule RULE-NUM. */
7685static const yytype_int16 yyr1[] =
7686{
7687 0, 162, 165, 163, 163, 164, 166, 167, 167, 167,
7688 168, 168, 169, 170, 171, 172, 173, 174, 175, 174,
7689 176, 176, 176, 177, 178, 177, 179, 180, 181, 182,
7690 182, 182, 182, 182, 182, 182, 182, 182, 182, 182,
7691 182, 182, 183, 182, 182, 182, 182, 182, 184, 185,
7692 186, 186, 186, 186, 186, 186, 186, 186, 185, 187,
7693 187, 185, 188, 188, 189, 189, 188, 190, 190, 190,
7694 191, 191, 191, 191, 191, 192, 191, 193, 191, 191,
7695 194, 195, 196, 197, 198, 199, 199, 200, 201, 202,
7696 203, 203, 204, 205, 206, 206, 207, 208, 208, 208,
7697 209, 209, 209, 209, 209, 209, 209, 209, 209, 209,
7698 209, 209, 210, 210, 211, 211, 212, 212, 212, 213,
7699 213, 212, 212, 212, 212, 212, 212, 212, 214, 214,
7700 215, 215, 216, 216, 216, 216, 216, 216, 216, 216,
7701 216, 217, 217, 217, 217, 217, 217, 217, 217, 217,
7702 218, 218, 219, 219, 219, 220, 220, 220, 220, 220,
7703 221, 221, 222, 223, 222, 224, 224, 224, 224, 224,
7704 224, 224, 224, 224, 224, 224, 224, 224, 224, 224,
7705 224, 224, 224, 224, 224, 224, 224, 224, 224, 224,
7706 224, 224, 224, 224, 224, 225, 225, 225, 225, 225,
7707 225, 225, 225, 225, 225, 225, 225, 225, 225, 225,
7708 225, 225, 225, 225, 225, 225, 225, 225, 225, 225,
7709 225, 225, 225, 225, 225, 225, 225, 225, 225, 225,
7710 225, 225, 225, 225, 225, 225, 226, 227, 228, 228,
7711 228, 228, 228, 228, 228, 228, 227, 229, 229, 229,
7712 229, 229, 229, 227, 227, 227, 227, 227, 227, 227,
7713 227, 227, 227, 227, 227, 227, 227, 227, 227, 227,
7714 227, 227, 227, 227, 227, 227, 227, 227, 227, 227,
7715 230, 230, 227, 227, 227, 231, 232, 232, 232, 233,
7716 233, 233, 233, 234, 234, 235, 236, 237, 238, 239,
7717 240, 240, 240, 240, 241, 241, 242, 242, 242, 243,
7718 243, 244, 244, 244, 244, 244, 245, 246, 246, 246,
7719 246, 246, 246, 247, 248, 249, 249, 250, 250, 251,
7720 251, 251, 251, 252, 252, 253, 253, 254, 254, 254,
7721 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
7722 255, 256, 255, 257, 255, 255, 255, 255, 255, 255,
7723 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
7724 255, 255, 255, 255, 255, 258, 255, 259, 255, 255,
7725 260, 261, 255, 262, 255, 263, 255, 264, 255, 265,
7726 255, 266, 255, 255, 255, 255, 255, 267, 268, 269,
7727 270, 271, 272, 273, 274, 275, 276, 277, 278, 279,
7728 280, 281, 282, 283, 284, 285, 286, 286, 287, 288,
7729 289, 289, 289, 290, 290, 291, 291, 292, 292, 293,
7730 293, 294, 294, 295, 295, 296, 296, 296, 296, 296,
7731 297, 297, 298, 298, 299, 300, 301, 301, 302, 302,
7732 303, 303, 304, 304, 304, 304, 305, 306, 307, 308,
7733 308, 309, 309, 310, 310, 310, 310, 310, 310, 310,
7734 310, 310, 310, 310, 310, 311, 311, 311, 312, 311,
7735 313, 313, 314, 315, 315, 316, 316, 317, 317, 318,
7736 318, 319, 320, 321, 322, 323, 324, 325, 325, 326,
7737 327, 326, 328, 329, 329, 329, 329, 329, 330, 330,
7738 330, 330, 330, 330, 330, 330, 331, 331, 332, 333,
7739 334, 335, 336, 336, 336, 336, 337, 338, 338, 339,
7740 340, 341, 342, 343, 344, 344, 345, 345, 345, 346,
7741 346, 346, 346, 346, 346, 347, 348, 348, 349, 350,
7742 350, 351, 352, 353, 353, 353, 353, 353, 353, 353,
7743 353, 353, 353, 353, 353, 353, 354, 353, 353, 353,
7744 355, 355, 355, 355, 355, 355, 356, 356, 357, 357,
7745 358, 359, 359, 360, 360, 361, 362, 362, 362, 362,
7746 363, 363, 364, 364, 365, 365, 366, 366, 367, 368,
7747 368, 369, 370, 370, 370, 370, 370, 370, 369, 369,
7748 369, 369, 371, 371, 371, 371, 371, 371, 371, 371,
7749 371, 371, 372, 373, 373, 374, 375, 375, 375, 376,
7750 376, 377, 377, 377, 378, 378, 379, 379, 380, 380,
7751 381, 382, 382, 382, 383, 384, 385, 386, 386, 387,
7752 388, 389, 389, 390, 390, 391, 392, 393, 393, 394,
7753 395, 396, 397, 398, 398, 399, 399, 400, 400, 401,
7754 401, 402, 402, 403, 404, 403, 405, 406, 407, 403,
7755 408, 408, 409, 409, 410, 410, 411, 412, 412, 413,
7756 414, 414, 415, 415, 415, 415, 416, 416, 416, 417,
7757 417, 417, 418, 418, 418, 418, 418, 418, 418, 419,
7758 419, 420, 420, 421, 421, 422, 423, 423, 424, 424,
7759 425, 426, 427, 428, 427, 429, 429, 430, 430, 431,
7760 431, 432, 432, 432, 432, 433, 433, 434, 434, 434,
7761 434, 435, 435, 436, 437, 437, 438, 438, 439, 439,
7762 439, 439, 439, 439, 439, 439, 439, 439, 439, 439,
7763 440, 440, 441, 440, 440, 442, 443, 443, 444, 444,
7764 444, 444, 444, 444, 444, 444, 444, 444, 444, 444,
7765 445, 445, 446, 445, 445, 447, 448, 449, 449, 449,
7766 449, 450, 450, 451, 452, 452, 453, 453, 454, 455,
7767 455, 456, 457, 457, 458, 458, 459, 459, 460, 460,
7768 461, 461, 461, 462, 462, 463, 464, 465, 466, 467,
7769 466, 468, 468, 469, 469, 470, 470, 470, 470, 470,
7770 470, 471, 471, 471, 471, 472, 472, 472, 473, 473,
7771 474, 474, 475, 475, 476, 477, 478, 479, 479, 480,
7772 480, 481, 481, 482
7773};
7774
7775/* YYR2[RULE-NUM] -- Number of symbols on the right-hand side of rule RULE-NUM. */
7776static const yytype_int8 yyr2[] =
7777{
7778 0, 2, 0, 0, 1, 2, 2, 1, 1, 3,
7779 1, 2, 1, 3, 2, 0, 0, 8, 0, 5,
7780 1, 1, 3, 1, 0, 3, 0, 2, 0, 4,
7781 3, 3, 3, 2, 3, 3, 3, 3, 4, 5,
7782 1, 4, 4, 1, 7, 4, 1, 1, 4, 1,
7783 4, 7, 6, 6, 6, 6, 5, 4, 1, 4,
7784 4, 1, 1, 4, 0, 1, 3, 1, 4, 1,
7785 1, 3, 3, 3, 2, 0, 7, 0, 7, 1,
7786 1, 2, 0, 5, 1, 1, 1, 0, 0, 4,
7787 1, 1, 1, 1, 1, 4, 3, 1, 1, 1,
7788 2, 3, 4, 5, 4, 5, 6, 2, 2, 2,
7789 2, 2, 1, 3, 1, 3, 1, 2, 3, 1,
7790 3, 5, 2, 4, 2, 4, 1, 3, 1, 3,
7791 2, 3, 1, 1, 4, 3, 3, 3, 3, 2,
7792 1, 1, 1, 4, 3, 3, 3, 3, 2, 1,
7793 1, 1, 2, 1, 3, 1, 1, 1, 1, 1,
7794 1, 1, 1, 0, 4, 1, 1, 1, 1, 1,
7795 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
7796 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
7797 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
7798 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
7799 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
7800 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
7801 1, 1, 1, 1, 1, 1, 4, 1, 4, 7,
7802 6, 6, 6, 6, 5, 4, 1, 3, 3, 2,
7803 2, 2, 2, 1, 3, 3, 3, 3, 3, 3,
7804 4, 2, 2, 3, 3, 3, 3, 1, 3, 3,
7805 3, 3, 3, 2, 2, 3, 3, 3, 3, 4,
7806 4, 4, 1, 1, 1, 6, 1, 4, 3, 1,
7807 1, 1, 1, 3, 3, 1, 1, 1, 1, 1,
7808 1, 2, 4, 2, 1, 4, 3, 5, 3, 1,
7809 1, 1, 1, 2, 4, 2, 1, 1, 1, 2,
7810 2, 4, 1, 0, 2, 2, 1, 2, 1, 1,
7811 1, 3, 3, 2, 1, 1, 1, 3, 4, 2,
7812 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
7813 1, 0, 4, 0, 4, 3, 3, 2, 3, 3,
7814 1, 4, 3, 1, 6, 4, 3, 2, 1, 2,
7815 1, 6, 6, 4, 4, 0, 6, 0, 5, 5,
7816 0, 0, 9, 0, 6, 0, 7, 0, 5, 0,
7817 5, 0, 5, 1, 1, 1, 1, 1, 1, 1,
7818 1, 1, 2, 2, 1, 2, 1, 1, 1, 1,
7819 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
7820 1, 1, 2, 1, 1, 1, 5, 1, 2, 1,
7821 1, 1, 3, 1, 3, 1, 3, 5, 1, 3,
7822 2, 1, 1, 1, 0, 2, 2, 1, 1, 3,
7823 2, 1, 4, 2, 2, 1, 1, 1, 3, 1,
7824 3, 2, 1, 6, 8, 4, 6, 4, 6, 4,
7825 6, 2, 4, 2, 4, 1, 2, 2, 1, 1,
7826 1, 1, 4, 0, 1, 1, 4, 1, 3, 1,
7827 1, 0, 0, 0, 0, 0, 9, 4, 1, 3,
7828 0, 4, 3, 2, 4, 5, 5, 3, 2, 4,
7829 4, 3, 3, 2, 1, 4, 3, 3, 0, 7,
7830 0, 7, 1, 2, 3, 4, 5, 1, 1, 0,
7831 0, 0, 0, 9, 1, 1, 1, 3, 3, 1,
7832 2, 3, 1, 1, 1, 1, 3, 1, 0, 4,
7833 1, 2, 2, 1, 1, 4, 4, 4, 3, 4,
7834 4, 4, 3, 3, 3, 2, 0, 6, 2, 4,
7835 1, 1, 2, 2, 4, 1, 2, 3, 1, 3,
7836 5, 2, 1, 1, 3, 1, 3, 1, 2, 1,
7837 1, 3, 2, 1, 1, 3, 2, 1, 2, 1,
7838 1, 1, 3, 3, 2, 2, 2, 2, 1, 1,
7839 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
7840 1, 1, 1, 2, 2, 4, 2, 3, 1, 6,
7841 1, 1, 1, 1, 2, 1, 3, 1, 1, 1,
7842 1, 1, 1, 2, 3, 3, 3, 1, 2, 4,
7843 1, 0, 3, 1, 2, 4, 1, 0, 3, 4,
7844 1, 4, 1, 0, 3, 0, 3, 0, 2, 0,
7845 2, 0, 2, 1, 0, 3, 0, 0, 0, 6,
7846 1, 1, 1, 1, 1, 1, 2, 1, 1, 3,
7847 1, 2, 1, 1, 1, 1, 1, 1, 1, 1,
7848 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
7849 1, 1, 1, 1, 1, 0, 4, 1, 1, 1,
7850 0, 3, 1, 0, 3, 2, 1, 1, 3, 2,
7851 1, 4, 2, 2, 1, 1, 1, 4, 2, 2,
7852 1, 1, 1, 3, 1, 3, 2, 1, 6, 8,
7853 4, 6, 4, 6, 4, 6, 2, 4, 2, 4,
7854 1, 2, 1, 1, 1, 1, 2, 1, 6, 8,
7855 4, 6, 4, 6, 4, 6, 2, 4, 2, 4,
7856 1, 2, 1, 1, 1, 1, 1, 1, 1, 1,
7857 1, 1, 1, 1, 1, 3, 1, 3, 1, 1,
7858 1, 1, 2, 1, 1, 1, 2, 1, 1, 1,
7859 2, 2, 1, 0, 1, 1, 1, 1, 1, 0,
7860 4, 1, 2, 1, 3, 3, 2, 1, 4, 2,
7861 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
7862 1, 1, 1, 1, 2, 2, 2, 1, 1, 1,
7863 1, 1, 2, 0
7864};
7865
7866
7867enum { YYENOMEM = -2 };
7868
7869#define yyerrok (yyerrstatus = 0)
7870#define yyclearin (yychar = YYEMPTY)
7871
7872#define YYACCEPT goto yyacceptlab
7873#define YYABORT goto yyabortlab
7874#define YYERROR goto yyerrorlab
7875#define YYNOMEM goto yyexhaustedlab
7876
7877
7878#define YYRECOVERING() (!!yyerrstatus)
7879
7880#define YYBACKUP(Token, Value) \
7881 do \
7882 if (yychar == YYEMPTY) \
7883 { \
7884 yychar = (Token); \
7885 yylval = (Value); \
7886 YYPOPSTACK (yylen); \
7887 yystate = *yyssp; \
7888 goto yybackup; \
7889 } \
7890 else \
7891 { \
7892 yyerror (&yylloc, p, YY_("syntax error: cannot back up")); \
7893 YYERROR; \
7894 } \
7895 while (0)
7896
7897/* Backward compatibility with an undocumented macro.
7898 Use YYerror or YYUNDEF. */
7899#define YYERRCODE YYUNDEF
7900
7901/* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
7902 If N is 0, then set CURRENT to the empty location which ends
7903 the previous symbol: RHS[0] (always defined). */
7904
7905#ifndef YYLLOC_DEFAULT
7906# define YYLLOC_DEFAULT(Current, Rhs, N) \
7907 do \
7908 if (N) \
7909 { \
7910 (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \
7911 (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \
7912 (Current).last_line = YYRHSLOC (Rhs, N).last_line; \
7913 (Current).last_column = YYRHSLOC (Rhs, N).last_column; \
7914 } \
7915 else \
7916 { \
7917 (Current).first_line = (Current).last_line = \
7918 YYRHSLOC (Rhs, 0).last_line; \
7919 (Current).first_column = (Current).last_column = \
7920 YYRHSLOC (Rhs, 0).last_column; \
7921 } \
7922 while (0)
7923#endif
7924
7925#define YYRHSLOC(Rhs, K) ((Rhs)[K])
7926
7927
7928/* Enable debugging if requested. */
7929#if YYDEBUG
7930
7931# ifndef YYFPRINTF
7932# include <stdio.h> /* INFRINGES ON USER NAME SPACE */
7933# define YYFPRINTF fprintf
7934# endif
7935
7936# define YYDPRINTF(Args) \
7937do { \
7938 if (yydebug) \
7939 YYFPRINTF Args; \
7940} while (0)
7941
7942
7943/* YYLOCATION_PRINT -- Print the location on the stream.
7944 This macro was not mandated originally: define only if we know
7945 we won't break user code: when these are the locations we know. */
7946
7947# ifndef YYLOCATION_PRINT
7948
7949# if defined YY_LOCATION_PRINT
7950
7951 /* Temporary convenience wrapper in case some people defined the
7952 undocumented and private YY_LOCATION_PRINT macros. */
7953# define YYLOCATION_PRINT(File, Loc, p) YY_LOCATION_PRINT(File, *(Loc), p)
7954
7955# elif defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL
7956
7957/* Print *YYLOCP on YYO. Private, do not rely on its existence. */
7958
7959YY_ATTRIBUTE_UNUSED
7960static int
7961yy_location_print_ (FILE *yyo, YYLTYPE const * const yylocp)
7962{
7963 int res = 0;
7964 int end_col = 0 != yylocp->last_column ? yylocp->last_column - 1 : 0;
7965 if (0 <= yylocp->first_line)
7966 {
7967 res += YYFPRINTF (yyo, "%d", yylocp->first_line);
7968 if (0 <= yylocp->first_column)
7969 res += YYFPRINTF (yyo, ".%d", yylocp->first_column);
7970 }
7971 if (0 <= yylocp->last_line)
7972 {
7973 if (yylocp->first_line < yylocp->last_line)
7974 {
7975 res += YYFPRINTF (yyo, "-%d", yylocp->last_line);
7976 if (0 <= end_col)
7977 res += YYFPRINTF (yyo, ".%d", end_col);
7978 }
7979 else if (0 <= end_col && yylocp->first_column < end_col)
7980 res += YYFPRINTF (yyo, "-%d", end_col);
7981 }
7982 return res;
7983}
7984
7985# define YYLOCATION_PRINT yy_location_print_
7986
7987 /* Temporary convenience wrapper in case some people defined the
7988 undocumented and private YY_LOCATION_PRINT macros. */
7989# define YY_LOCATION_PRINT(File, Loc, p) YYLOCATION_PRINT(File, &(Loc), p)
7990
7991# else
7992
7993# define YYLOCATION_PRINT(File, Loc, p) ((void) 0)
7994 /* Temporary convenience wrapper in case some people defined the
7995 undocumented and private YY_LOCATION_PRINT macros. */
7996# define YY_LOCATION_PRINT YYLOCATION_PRINT
7997
7998# endif
7999# endif /* !defined YYLOCATION_PRINT */
8000
8001
8002# define YY_SYMBOL_PRINT(Title, Kind, Value, Location, p) \
8003do { \
8004 if (yydebug) \
8005 { \
8006 YYFPRINTF (stderr, "%s ", Title); \
8007 yy_symbol_print (stderr, \
8008 Kind, Value, Location, p); \
8009 YYFPRINTF (stderr, "\n"); \
8010 } \
8011} while (0)
8012
8013
8014/*-----------------------------------.
8015| Print this symbol's value on YYO. |
8016`-----------------------------------*/
8017
8018static void
8019yy_symbol_value_print (FILE *yyo,
8020 yysymbol_kind_t yykind, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp, struct parser_params *p)
8021{
8022 FILE *yyoutput = yyo;
8023 YY_USE (yyoutput);
8024 YY_USE (yylocationp);
8025 YY_USE (p);
8026 if (!yyvaluep)
8027 return;
8028 YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
8029switch (yykind)
8030 {
8031 case YYSYMBOL_keyword_class: /* "'class'" */
8032#line 2627 "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_module: /* "'module'" */
8040#line 2627 "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_def: /* "'def'" */
8048#line 2627 "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_undef: /* "'undef'" */
8056#line 2627 "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_begin: /* "'begin'" */
8064#line 2627 "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_rescue: /* "'rescue'" */
8072#line 2627 "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_ensure: /* "'ensure'" */
8080#line 2627 "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_end: /* "'end'" */
8088#line 2627 "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_if: /* "'if'" */
8096#line 2627 "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_unless: /* "'unless'" */
8104#line 2627 "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_then: /* "'then'" */
8112#line 2627 "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_elsif: /* "'elsif'" */
8120#line 2627 "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_else: /* "'else'" */
8128#line 2627 "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_case: /* "'case'" */
8136#line 2627 "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_when: /* "'when'" */
8144#line 2627 "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_keyword_while: /* "'while'" */
8152#line 2627 "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_keyword_until: /* "'until'" */
8160#line 2627 "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_keyword_for: /* "'for'" */
8168#line 2627 "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_keyword_break: /* "'break'" */
8176#line 2627 "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_keyword_next: /* "'next'" */
8184#line 2627 "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_redo: /* "'redo'" */
8192#line 2627 "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_retry: /* "'retry'" */
8200#line 2627 "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_in: /* "'in'" */
8208#line 2627 "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_do: /* "'do'" */
8216#line 2627 "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_do_cond: /* "'do' for condition" */
8224#line 2627 "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_do_block: /* "'do' for block" */
8232#line 2627 "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_do_LAMBDA: /* "'do' for lambda" */
8240#line 2627 "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_keyword_return: /* "'return'" */
8248#line 2627 "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_keyword_yield: /* "'yield'" */
8256#line 2627 "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_keyword_super: /* "'super'" */
8264#line 2627 "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_keyword_self: /* "'self'" */
8272#line 2627 "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_keyword_nil: /* "'nil'" */
8280#line 2627 "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_keyword_true: /* "'true'" */
8288#line 2627 "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_keyword_false: /* "'false'" */
8296#line 2627 "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_keyword_and: /* "'and'" */
8304#line 2627 "parse.y"
8305 {
8306 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8307}
8308#line 8309 "parse.c"
8309 break;
8310
8311 case YYSYMBOL_keyword_or: /* "'or'" */
8312#line 2627 "parse.y"
8313 {
8314 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8315}
8316#line 8317 "parse.c"
8317 break;
8318
8319 case YYSYMBOL_keyword_not: /* "'not'" */
8320#line 2627 "parse.y"
8321 {
8322 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8323}
8324#line 8325 "parse.c"
8325 break;
8326
8327 case YYSYMBOL_modifier_if: /* "'if' modifier" */
8328#line 2627 "parse.y"
8329 {
8330 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8331}
8332#line 8333 "parse.c"
8333 break;
8334
8335 case YYSYMBOL_modifier_unless: /* "'unless' modifier" */
8336#line 2627 "parse.y"
8337 {
8338 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8339}
8340#line 8341 "parse.c"
8341 break;
8342
8343 case YYSYMBOL_modifier_while: /* "'while' modifier" */
8344#line 2627 "parse.y"
8345 {
8346 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8347}
8348#line 8349 "parse.c"
8349 break;
8350
8351 case YYSYMBOL_modifier_until: /* "'until' modifier" */
8352#line 2627 "parse.y"
8353 {
8354 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8355}
8356#line 8357 "parse.c"
8357 break;
8358
8359 case YYSYMBOL_modifier_rescue: /* "'rescue' modifier" */
8360#line 2627 "parse.y"
8361 {
8362 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8363}
8364#line 8365 "parse.c"
8365 break;
8366
8367 case YYSYMBOL_keyword_alias: /* "'alias'" */
8368#line 2627 "parse.y"
8369 {
8370 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8371}
8372#line 8373 "parse.c"
8373 break;
8374
8375 case YYSYMBOL_keyword_defined: /* "'defined?'" */
8376#line 2627 "parse.y"
8377 {
8378 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8379}
8380#line 8381 "parse.c"
8381 break;
8382
8383 case YYSYMBOL_keyword_BEGIN: /* "'BEGIN'" */
8384#line 2627 "parse.y"
8385 {
8386 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8387}
8388#line 8389 "parse.c"
8389 break;
8390
8391 case YYSYMBOL_keyword_END: /* "'END'" */
8392#line 2627 "parse.y"
8393 {
8394 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8395}
8396#line 8397 "parse.c"
8397 break;
8398
8399 case YYSYMBOL_keyword__LINE__: /* "'__LINE__'" */
8400#line 2627 "parse.y"
8401 {
8402 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8403}
8404#line 8405 "parse.c"
8405 break;
8406
8407 case YYSYMBOL_keyword__FILE__: /* "'__FILE__'" */
8408#line 2627 "parse.y"
8409 {
8410 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8411}
8412#line 8413 "parse.c"
8413 break;
8414
8415 case YYSYMBOL_keyword__ENCODING__: /* "'__ENCODING__'" */
8416#line 2627 "parse.y"
8417 {
8418 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8419}
8420#line 8421 "parse.c"
8421 break;
8422
8423 case YYSYMBOL_tIDENTIFIER: /* "local variable or method" */
8424#line 2627 "parse.y"
8425 {
8426 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8427}
8428#line 8429 "parse.c"
8429 break;
8430
8431 case YYSYMBOL_tFID: /* "method" */
8432#line 2627 "parse.y"
8433 {
8434 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8435}
8436#line 8437 "parse.c"
8437 break;
8438
8439 case YYSYMBOL_tGVAR: /* "global variable" */
8440#line 2627 "parse.y"
8441 {
8442 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8443}
8444#line 8445 "parse.c"
8445 break;
8446
8447 case YYSYMBOL_tIVAR: /* "instance variable" */
8448#line 2627 "parse.y"
8449 {
8450 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8451}
8452#line 8453 "parse.c"
8453 break;
8454
8455 case YYSYMBOL_tCONSTANT: /* "constant" */
8456#line 2627 "parse.y"
8457 {
8458 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8459}
8460#line 8461 "parse.c"
8461 break;
8462
8463 case YYSYMBOL_tCVAR: /* "class variable" */
8464#line 2627 "parse.y"
8465 {
8466 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8467}
8468#line 8469 "parse.c"
8469 break;
8470
8471 case YYSYMBOL_tLABEL: /* "label" */
8472#line 2627 "parse.y"
8473 {
8474 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8475}
8476#line 8477 "parse.c"
8477 break;
8478
8479 case YYSYMBOL_tINTEGER: /* "integer literal" */
8480#line 2630 "parse.y"
8481 {
8482 switch (nd_type(RNODE(((*yyvaluep).node)))) {
8483 case NODE_INTEGER:
8484 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_integer_literal_val(((*yyvaluep).node)));
8485 break;
8486 case NODE_FLOAT:
8487 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_float_literal_val(((*yyvaluep).node)));
8488 break;
8489 case NODE_RATIONAL:
8490 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_rational_literal_val(((*yyvaluep).node)));
8491 break;
8492 case NODE_IMAGINARY:
8493 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_imaginary_literal_val(((*yyvaluep).node)));
8494 break;
8495 default:
8496 break;
8497 }
8498}
8499#line 8500 "parse.c"
8500 break;
8501
8502 case YYSYMBOL_tFLOAT: /* "float literal" */
8503#line 2630 "parse.y"
8504 {
8505 switch (nd_type(RNODE(((*yyvaluep).node)))) {
8506 case NODE_INTEGER:
8507 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_integer_literal_val(((*yyvaluep).node)));
8508 break;
8509 case NODE_FLOAT:
8510 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_float_literal_val(((*yyvaluep).node)));
8511 break;
8512 case NODE_RATIONAL:
8513 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_rational_literal_val(((*yyvaluep).node)));
8514 break;
8515 case NODE_IMAGINARY:
8516 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_imaginary_literal_val(((*yyvaluep).node)));
8517 break;
8518 default:
8519 break;
8520 }
8521}
8522#line 8523 "parse.c"
8523 break;
8524
8525 case YYSYMBOL_tRATIONAL: /* "rational literal" */
8526#line 2630 "parse.y"
8527 {
8528 switch (nd_type(RNODE(((*yyvaluep).node)))) {
8529 case NODE_INTEGER:
8530 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_integer_literal_val(((*yyvaluep).node)));
8531 break;
8532 case NODE_FLOAT:
8533 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_float_literal_val(((*yyvaluep).node)));
8534 break;
8535 case NODE_RATIONAL:
8536 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_rational_literal_val(((*yyvaluep).node)));
8537 break;
8538 case NODE_IMAGINARY:
8539 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_imaginary_literal_val(((*yyvaluep).node)));
8540 break;
8541 default:
8542 break;
8543 }
8544}
8545#line 8546 "parse.c"
8546 break;
8547
8548 case YYSYMBOL_tIMAGINARY: /* "imaginary literal" */
8549#line 2630 "parse.y"
8550 {
8551 switch (nd_type(RNODE(((*yyvaluep).node)))) {
8552 case NODE_INTEGER:
8553 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_integer_literal_val(((*yyvaluep).node)));
8554 break;
8555 case NODE_FLOAT:
8556 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_float_literal_val(((*yyvaluep).node)));
8557 break;
8558 case NODE_RATIONAL:
8559 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_rational_literal_val(((*yyvaluep).node)));
8560 break;
8561 case NODE_IMAGINARY:
8562 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_imaginary_literal_val(((*yyvaluep).node)));
8563 break;
8564 default:
8565 break;
8566 }
8567}
8568#line 8569 "parse.c"
8569 break;
8570
8571 case YYSYMBOL_tCHAR: /* "char literal" */
8572#line 2630 "parse.y"
8573 {
8574 switch (nd_type(RNODE(((*yyvaluep).node)))) {
8575 case NODE_INTEGER:
8576 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_integer_literal_val(((*yyvaluep).node)));
8577 break;
8578 case NODE_FLOAT:
8579 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_float_literal_val(((*yyvaluep).node)));
8580 break;
8581 case NODE_RATIONAL:
8582 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_rational_literal_val(((*yyvaluep).node)));
8583 break;
8584 case NODE_IMAGINARY:
8585 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_imaginary_literal_val(((*yyvaluep).node)));
8586 break;
8587 default:
8588 break;
8589 }
8590}
8591#line 8592 "parse.c"
8592 break;
8593
8594 case YYSYMBOL_tNTH_REF: /* "numbered reference" */
8595#line 2648 "parse.y"
8596 {
8597 rb_parser_printf(p, "$%ld", RNODE_NTH_REF(((*yyvaluep).node))->nd_nth);
8598}
8599#line 8600 "parse.c"
8600 break;
8601
8602 case YYSYMBOL_tBACK_REF: /* "back reference" */
8603#line 2651 "parse.y"
8604 {
8605 rb_parser_printf(p, "$%c", (int)RNODE_BACK_REF(((*yyvaluep).node))->nd_nth);
8606}
8607#line 8608 "parse.c"
8608 break;
8609
8610 case YYSYMBOL_tSTRING_CONTENT: /* "literal content" */
8611#line 2630 "parse.y"
8612 {
8613 switch (nd_type(RNODE(((*yyvaluep).node)))) {
8614 case NODE_INTEGER:
8615 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_integer_literal_val(((*yyvaluep).node)));
8616 break;
8617 case NODE_FLOAT:
8618 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_float_literal_val(((*yyvaluep).node)));
8619 break;
8620 case NODE_RATIONAL:
8621 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_rational_literal_val(((*yyvaluep).node)));
8622 break;
8623 case NODE_IMAGINARY:
8624 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_imaginary_literal_val(((*yyvaluep).node)));
8625 break;
8626 default:
8627 break;
8628 }
8629}
8630#line 8631 "parse.c"
8631 break;
8632
8633 case YYSYMBOL_69_: /* '.' */
8634#line 2627 "parse.y"
8635 {
8636 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8637}
8638#line 8639 "parse.c"
8639 break;
8640
8641 case YYSYMBOL_70_backslash_: /* "backslash" */
8642#line 2627 "parse.y"
8643 {
8644 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8645}
8646#line 8647 "parse.c"
8647 break;
8648
8649 case YYSYMBOL_72_escaped_horizontal_tab_: /* "escaped horizontal tab" */
8650#line 2627 "parse.y"
8651 {
8652 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8653}
8654#line 8655 "parse.c"
8655 break;
8656
8657 case YYSYMBOL_73_escaped_form_feed_: /* "escaped form feed" */
8658#line 2627 "parse.y"
8659 {
8660 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8661}
8662#line 8663 "parse.c"
8663 break;
8664
8665 case YYSYMBOL_74_escaped_carriage_return_: /* "escaped carriage return" */
8666#line 2627 "parse.y"
8667 {
8668 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8669}
8670#line 8671 "parse.c"
8671 break;
8672
8673 case YYSYMBOL_75_escaped_vertical_tab_: /* "escaped vertical tab" */
8674#line 2627 "parse.y"
8675 {
8676 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8677}
8678#line 8679 "parse.c"
8679 break;
8680
8681 case YYSYMBOL_tANDDOT: /* "&." */
8682#line 2627 "parse.y"
8683 {
8684 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8685}
8686#line 8687 "parse.c"
8687 break;
8688
8689 case YYSYMBOL_tCOLON2: /* "::" */
8690#line 2627 "parse.y"
8691 {
8692 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8693}
8694#line 8695 "parse.c"
8695 break;
8696
8697 case YYSYMBOL_tOP_ASGN: /* "operator-assignment" */
8698#line 2627 "parse.y"
8699 {
8700 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8701}
8702#line 8703 "parse.c"
8703 break;
8704
8705 case YYSYMBOL_compstmt_top_stmts: /* compstmt_top_stmts */
8706#line 2618 "parse.y"
8707 {
8708 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8709 rb_parser_printf(p, "NODE_SPECIAL");
8710 }
8711 else if (((*yyvaluep).node)) {
8712 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8713 }
8714}
8715#line 8716 "parse.c"
8716 break;
8717
8718 case YYSYMBOL_top_stmts: /* top_stmts */
8719#line 2618 "parse.y"
8720 {
8721 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8722 rb_parser_printf(p, "NODE_SPECIAL");
8723 }
8724 else if (((*yyvaluep).node)) {
8725 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8726 }
8727}
8728#line 8729 "parse.c"
8729 break;
8730
8731 case YYSYMBOL_top_stmt: /* top_stmt */
8732#line 2618 "parse.y"
8733 {
8734 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8735 rb_parser_printf(p, "NODE_SPECIAL");
8736 }
8737 else if (((*yyvaluep).node)) {
8738 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8739 }
8740}
8741#line 8742 "parse.c"
8742 break;
8743
8744 case YYSYMBOL_block_open: /* block_open */
8745#line 2618 "parse.y"
8746 {
8747 if ((NODE *)((*yyvaluep).node_exits) == (NODE *)-1) {
8748 rb_parser_printf(p, "NODE_SPECIAL");
8749 }
8750 else if (((*yyvaluep).node_exits)) {
8751 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_exits)))));
8752 }
8753}
8754#line 8755 "parse.c"
8755 break;
8756
8757 case YYSYMBOL_begin_block: /* begin_block */
8758#line 2618 "parse.y"
8759 {
8760 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8761 rb_parser_printf(p, "NODE_SPECIAL");
8762 }
8763 else if (((*yyvaluep).node)) {
8764 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8765 }
8766}
8767#line 8768 "parse.c"
8768 break;
8769
8770 case YYSYMBOL_compstmt_stmts: /* compstmt_stmts */
8771#line 2618 "parse.y"
8772 {
8773 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8774 rb_parser_printf(p, "NODE_SPECIAL");
8775 }
8776 else if (((*yyvaluep).node)) {
8777 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8778 }
8779}
8780#line 8781 "parse.c"
8781 break;
8782
8783 case YYSYMBOL_bodystmt: /* bodystmt */
8784#line 2618 "parse.y"
8785 {
8786 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8787 rb_parser_printf(p, "NODE_SPECIAL");
8788 }
8789 else if (((*yyvaluep).node)) {
8790 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8791 }
8792}
8793#line 8794 "parse.c"
8794 break;
8795
8796 case YYSYMBOL_stmts: /* stmts */
8797#line 2618 "parse.y"
8798 {
8799 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8800 rb_parser_printf(p, "NODE_SPECIAL");
8801 }
8802 else if (((*yyvaluep).node)) {
8803 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8804 }
8805}
8806#line 8807 "parse.c"
8807 break;
8808
8809 case YYSYMBOL_stmt_or_begin: /* stmt_or_begin */
8810#line 2618 "parse.y"
8811 {
8812 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8813 rb_parser_printf(p, "NODE_SPECIAL");
8814 }
8815 else if (((*yyvaluep).node)) {
8816 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8817 }
8818}
8819#line 8820 "parse.c"
8820 break;
8821
8822 case YYSYMBOL_allow_exits: /* allow_exits */
8823#line 2618 "parse.y"
8824 {
8825 if ((NODE *)((*yyvaluep).node_exits) == (NODE *)-1) {
8826 rb_parser_printf(p, "NODE_SPECIAL");
8827 }
8828 else if (((*yyvaluep).node_exits)) {
8829 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_exits)))));
8830 }
8831}
8832#line 8833 "parse.c"
8833 break;
8834
8835 case YYSYMBOL_stmt: /* stmt */
8836#line 2618 "parse.y"
8837 {
8838 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8839 rb_parser_printf(p, "NODE_SPECIAL");
8840 }
8841 else if (((*yyvaluep).node)) {
8842 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8843 }
8844}
8845#line 8846 "parse.c"
8846 break;
8847
8848 case YYSYMBOL_asgn_mrhs: /* asgn_mrhs */
8849#line 2618 "parse.y"
8850 {
8851 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8852 rb_parser_printf(p, "NODE_SPECIAL");
8853 }
8854 else if (((*yyvaluep).node)) {
8855 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8856 }
8857}
8858#line 8859 "parse.c"
8859 break;
8860
8861 case YYSYMBOL_asgn_command_rhs: /* asgn_command_rhs */
8862#line 2618 "parse.y"
8863 {
8864 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8865 rb_parser_printf(p, "NODE_SPECIAL");
8866 }
8867 else if (((*yyvaluep).node)) {
8868 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8869 }
8870}
8871#line 8872 "parse.c"
8872 break;
8873
8874 case YYSYMBOL_command_asgn: /* command_asgn */
8875#line 2618 "parse.y"
8876 {
8877 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8878 rb_parser_printf(p, "NODE_SPECIAL");
8879 }
8880 else if (((*yyvaluep).node)) {
8881 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8882 }
8883}
8884#line 8885 "parse.c"
8885 break;
8886
8887 case YYSYMBOL_op_asgn_command_rhs: /* op_asgn_command_rhs */
8888#line 2618 "parse.y"
8889 {
8890 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8891 rb_parser_printf(p, "NODE_SPECIAL");
8892 }
8893 else if (((*yyvaluep).node)) {
8894 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8895 }
8896}
8897#line 8898 "parse.c"
8898 break;
8899
8900 case YYSYMBOL_def_endless_method_endless_command: /* def_endless_method_endless_command */
8901#line 2618 "parse.y"
8902 {
8903 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8904 rb_parser_printf(p, "NODE_SPECIAL");
8905 }
8906 else if (((*yyvaluep).node)) {
8907 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8908 }
8909}
8910#line 8911 "parse.c"
8911 break;
8912
8913 case YYSYMBOL_endless_command: /* endless_command */
8914#line 2618 "parse.y"
8915 {
8916 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8917 rb_parser_printf(p, "NODE_SPECIAL");
8918 }
8919 else if (((*yyvaluep).node)) {
8920 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8921 }
8922}
8923#line 8924 "parse.c"
8924 break;
8925
8926 case YYSYMBOL_command_rhs: /* command_rhs */
8927#line 2618 "parse.y"
8928 {
8929 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8930 rb_parser_printf(p, "NODE_SPECIAL");
8931 }
8932 else if (((*yyvaluep).node)) {
8933 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8934 }
8935}
8936#line 8937 "parse.c"
8937 break;
8938
8939 case YYSYMBOL_expr: /* expr */
8940#line 2618 "parse.y"
8941 {
8942 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8943 rb_parser_printf(p, "NODE_SPECIAL");
8944 }
8945 else if (((*yyvaluep).node)) {
8946 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8947 }
8948}
8949#line 8950 "parse.c"
8950 break;
8951
8952 case YYSYMBOL_def_name: /* def_name */
8953#line 2627 "parse.y"
8954 {
8955 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8956}
8957#line 8958 "parse.c"
8958 break;
8959
8960 case YYSYMBOL_defn_head: /* defn_head */
8961#line 2618 "parse.y"
8962 {
8963 if ((NODE *)((*yyvaluep).node_def_temp) == (NODE *)-1) {
8964 rb_parser_printf(p, "NODE_SPECIAL");
8965 }
8966 else if (((*yyvaluep).node_def_temp)) {
8967 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_def_temp)))));
8968 }
8969}
8970#line 8971 "parse.c"
8971 break;
8972
8973 case YYSYMBOL_defs_head: /* defs_head */
8974#line 2618 "parse.y"
8975 {
8976 if ((NODE *)((*yyvaluep).node_def_temp) == (NODE *)-1) {
8977 rb_parser_printf(p, "NODE_SPECIAL");
8978 }
8979 else if (((*yyvaluep).node_def_temp)) {
8980 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_def_temp)))));
8981 }
8982}
8983#line 8984 "parse.c"
8984 break;
8985
8986 case YYSYMBOL_value_expr_expr: /* value_expr_expr */
8987#line 2618 "parse.y"
8988 {
8989 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8990 rb_parser_printf(p, "NODE_SPECIAL");
8991 }
8992 else if (((*yyvaluep).node)) {
8993 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8994 }
8995}
8996#line 8997 "parse.c"
8997 break;
8998
8999 case YYSYMBOL_expr_value: /* expr_value */
9000#line 2618 "parse.y"
9001 {
9002 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9003 rb_parser_printf(p, "NODE_SPECIAL");
9004 }
9005 else if (((*yyvaluep).node)) {
9006 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9007 }
9008}
9009#line 9010 "parse.c"
9010 break;
9011
9012 case YYSYMBOL_expr_value_do: /* expr_value_do */
9013#line 2618 "parse.y"
9014 {
9015 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9016 rb_parser_printf(p, "NODE_SPECIAL");
9017 }
9018 else if (((*yyvaluep).node)) {
9019 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9020 }
9021}
9022#line 9023 "parse.c"
9023 break;
9024
9025 case YYSYMBOL_command_call: /* command_call */
9026#line 2618 "parse.y"
9027 {
9028 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9029 rb_parser_printf(p, "NODE_SPECIAL");
9030 }
9031 else if (((*yyvaluep).node)) {
9032 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9033 }
9034}
9035#line 9036 "parse.c"
9036 break;
9037
9038 case YYSYMBOL_value_expr_command_call: /* value_expr_command_call */
9039#line 2618 "parse.y"
9040 {
9041 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9042 rb_parser_printf(p, "NODE_SPECIAL");
9043 }
9044 else if (((*yyvaluep).node)) {
9045 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9046 }
9047}
9048#line 9049 "parse.c"
9049 break;
9050
9051 case YYSYMBOL_command_call_value: /* command_call_value */
9052#line 2618 "parse.y"
9053 {
9054 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9055 rb_parser_printf(p, "NODE_SPECIAL");
9056 }
9057 else if (((*yyvaluep).node)) {
9058 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9059 }
9060}
9061#line 9062 "parse.c"
9062 break;
9063
9064 case YYSYMBOL_block_command: /* block_command */
9065#line 2618 "parse.y"
9066 {
9067 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9068 rb_parser_printf(p, "NODE_SPECIAL");
9069 }
9070 else if (((*yyvaluep).node)) {
9071 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9072 }
9073}
9074#line 9075 "parse.c"
9075 break;
9076
9077 case YYSYMBOL_cmd_brace_block: /* cmd_brace_block */
9078#line 2618 "parse.y"
9079 {
9080 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9081 rb_parser_printf(p, "NODE_SPECIAL");
9082 }
9083 else if (((*yyvaluep).node)) {
9084 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9085 }
9086}
9087#line 9088 "parse.c"
9088 break;
9089
9090 case YYSYMBOL_fcall: /* fcall */
9091#line 2618 "parse.y"
9092 {
9093 if ((NODE *)((*yyvaluep).node_fcall) == (NODE *)-1) {
9094 rb_parser_printf(p, "NODE_SPECIAL");
9095 }
9096 else if (((*yyvaluep).node_fcall)) {
9097 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_fcall)))));
9098 }
9099}
9100#line 9101 "parse.c"
9101 break;
9102
9103 case YYSYMBOL_command: /* command */
9104#line 2618 "parse.y"
9105 {
9106 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9107 rb_parser_printf(p, "NODE_SPECIAL");
9108 }
9109 else if (((*yyvaluep).node)) {
9110 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9111 }
9112}
9113#line 9114 "parse.c"
9114 break;
9115
9116 case YYSYMBOL_mlhs: /* mlhs */
9117#line 2618 "parse.y"
9118 {
9119 if ((NODE *)((*yyvaluep).node_masgn) == (NODE *)-1) {
9120 rb_parser_printf(p, "NODE_SPECIAL");
9121 }
9122 else if (((*yyvaluep).node_masgn)) {
9123 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_masgn)))));
9124 }
9125}
9126#line 9127 "parse.c"
9127 break;
9128
9129 case YYSYMBOL_mlhs_inner: /* mlhs_inner */
9130#line 2618 "parse.y"
9131 {
9132 if ((NODE *)((*yyvaluep).node_masgn) == (NODE *)-1) {
9133 rb_parser_printf(p, "NODE_SPECIAL");
9134 }
9135 else if (((*yyvaluep).node_masgn)) {
9136 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_masgn)))));
9137 }
9138}
9139#line 9140 "parse.c"
9140 break;
9141
9142 case YYSYMBOL_mlhs_basic: /* mlhs_basic */
9143#line 2618 "parse.y"
9144 {
9145 if ((NODE *)((*yyvaluep).node_masgn) == (NODE *)-1) {
9146 rb_parser_printf(p, "NODE_SPECIAL");
9147 }
9148 else if (((*yyvaluep).node_masgn)) {
9149 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_masgn)))));
9150 }
9151}
9152#line 9153 "parse.c"
9153 break;
9154
9155 case YYSYMBOL_mlhs_items_mlhs_item: /* mlhs_items_mlhs_item */
9156#line 2618 "parse.y"
9157 {
9158 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9159 rb_parser_printf(p, "NODE_SPECIAL");
9160 }
9161 else if (((*yyvaluep).node)) {
9162 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9163 }
9164}
9165#line 9166 "parse.c"
9166 break;
9167
9168 case YYSYMBOL_mlhs_item: /* mlhs_item */
9169#line 2618 "parse.y"
9170 {
9171 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9172 rb_parser_printf(p, "NODE_SPECIAL");
9173 }
9174 else if (((*yyvaluep).node)) {
9175 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9176 }
9177}
9178#line 9179 "parse.c"
9179 break;
9180
9181 case YYSYMBOL_mlhs_head: /* mlhs_head */
9182#line 2618 "parse.y"
9183 {
9184 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9185 rb_parser_printf(p, "NODE_SPECIAL");
9186 }
9187 else if (((*yyvaluep).node)) {
9188 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9189 }
9190}
9191#line 9192 "parse.c"
9192 break;
9193
9194 case YYSYMBOL_mlhs_node: /* mlhs_node */
9195#line 2618 "parse.y"
9196 {
9197 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9198 rb_parser_printf(p, "NODE_SPECIAL");
9199 }
9200 else if (((*yyvaluep).node)) {
9201 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9202 }
9203}
9204#line 9205 "parse.c"
9205 break;
9206
9207 case YYSYMBOL_lhs: /* lhs */
9208#line 2618 "parse.y"
9209 {
9210 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9211 rb_parser_printf(p, "NODE_SPECIAL");
9212 }
9213 else if (((*yyvaluep).node)) {
9214 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9215 }
9216}
9217#line 9218 "parse.c"
9218 break;
9219
9220 case YYSYMBOL_cname: /* cname */
9221#line 2627 "parse.y"
9222 {
9223 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
9224}
9225#line 9226 "parse.c"
9226 break;
9227
9228 case YYSYMBOL_cpath: /* cpath */
9229#line 2618 "parse.y"
9230 {
9231 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9232 rb_parser_printf(p, "NODE_SPECIAL");
9233 }
9234 else if (((*yyvaluep).node)) {
9235 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9236 }
9237}
9238#line 9239 "parse.c"
9239 break;
9240
9241 case YYSYMBOL_fname: /* fname */
9242#line 2627 "parse.y"
9243 {
9244 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
9245}
9246#line 9247 "parse.c"
9247 break;
9248
9249 case YYSYMBOL_fitem: /* fitem */
9250#line 2618 "parse.y"
9251 {
9252 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9253 rb_parser_printf(p, "NODE_SPECIAL");
9254 }
9255 else if (((*yyvaluep).node)) {
9256 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9257 }
9258}
9259#line 9260 "parse.c"
9260 break;
9261
9262 case YYSYMBOL_undef_list: /* undef_list */
9263#line 2618 "parse.y"
9264 {
9265 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9266 rb_parser_printf(p, "NODE_SPECIAL");
9267 }
9268 else if (((*yyvaluep).node)) {
9269 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9270 }
9271}
9272#line 9273 "parse.c"
9273 break;
9274
9275 case YYSYMBOL_op: /* op */
9276#line 2627 "parse.y"
9277 {
9278 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
9279}
9280#line 9281 "parse.c"
9281 break;
9282
9283 case YYSYMBOL_reswords: /* reswords */
9284#line 2627 "parse.y"
9285 {
9286 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
9287}
9288#line 9289 "parse.c"
9289 break;
9290
9291 case YYSYMBOL_asgn_arg_rhs: /* asgn_arg_rhs */
9292#line 2618 "parse.y"
9293 {
9294 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9295 rb_parser_printf(p, "NODE_SPECIAL");
9296 }
9297 else if (((*yyvaluep).node)) {
9298 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9299 }
9300}
9301#line 9302 "parse.c"
9302 break;
9303
9304 case YYSYMBOL_arg: /* arg */
9305#line 2618 "parse.y"
9306 {
9307 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9308 rb_parser_printf(p, "NODE_SPECIAL");
9309 }
9310 else if (((*yyvaluep).node)) {
9311 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9312 }
9313}
9314#line 9315 "parse.c"
9315 break;
9316
9317 case YYSYMBOL_op_asgn_arg_rhs: /* op_asgn_arg_rhs */
9318#line 2618 "parse.y"
9319 {
9320 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9321 rb_parser_printf(p, "NODE_SPECIAL");
9322 }
9323 else if (((*yyvaluep).node)) {
9324 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9325 }
9326}
9327#line 9328 "parse.c"
9328 break;
9329
9330 case YYSYMBOL_range_expr_arg: /* range_expr_arg */
9331#line 2618 "parse.y"
9332 {
9333 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9334 rb_parser_printf(p, "NODE_SPECIAL");
9335 }
9336 else if (((*yyvaluep).node)) {
9337 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9338 }
9339}
9340#line 9341 "parse.c"
9341 break;
9342
9343 case YYSYMBOL_def_endless_method_endless_arg: /* def_endless_method_endless_arg */
9344#line 2618 "parse.y"
9345 {
9346 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9347 rb_parser_printf(p, "NODE_SPECIAL");
9348 }
9349 else if (((*yyvaluep).node)) {
9350 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9351 }
9352}
9353#line 9354 "parse.c"
9354 break;
9355
9356 case YYSYMBOL_ternary: /* ternary */
9357#line 2618 "parse.y"
9358 {
9359 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9360 rb_parser_printf(p, "NODE_SPECIAL");
9361 }
9362 else if (((*yyvaluep).node)) {
9363 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9364 }
9365}
9366#line 9367 "parse.c"
9367 break;
9368
9369 case YYSYMBOL_endless_arg: /* endless_arg */
9370#line 2618 "parse.y"
9371 {
9372 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9373 rb_parser_printf(p, "NODE_SPECIAL");
9374 }
9375 else if (((*yyvaluep).node)) {
9376 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9377 }
9378}
9379#line 9380 "parse.c"
9380 break;
9381
9382 case YYSYMBOL_relop: /* relop */
9383#line 2627 "parse.y"
9384 {
9385 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
9386}
9387#line 9388 "parse.c"
9388 break;
9389
9390 case YYSYMBOL_rel_expr: /* rel_expr */
9391#line 2618 "parse.y"
9392 {
9393 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9394 rb_parser_printf(p, "NODE_SPECIAL");
9395 }
9396 else if (((*yyvaluep).node)) {
9397 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9398 }
9399}
9400#line 9401 "parse.c"
9401 break;
9402
9403 case YYSYMBOL_value_expr_arg: /* value_expr_arg */
9404#line 2618 "parse.y"
9405 {
9406 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9407 rb_parser_printf(p, "NODE_SPECIAL");
9408 }
9409 else if (((*yyvaluep).node)) {
9410 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9411 }
9412}
9413#line 9414 "parse.c"
9414 break;
9415
9416 case YYSYMBOL_arg_value: /* arg_value */
9417#line 2618 "parse.y"
9418 {
9419 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9420 rb_parser_printf(p, "NODE_SPECIAL");
9421 }
9422 else if (((*yyvaluep).node)) {
9423 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9424 }
9425}
9426#line 9427 "parse.c"
9427 break;
9428
9429 case YYSYMBOL_aref_args: /* aref_args */
9430#line 2618 "parse.y"
9431 {
9432 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9433 rb_parser_printf(p, "NODE_SPECIAL");
9434 }
9435 else if (((*yyvaluep).node)) {
9436 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9437 }
9438}
9439#line 9440 "parse.c"
9440 break;
9441
9442 case YYSYMBOL_arg_rhs: /* arg_rhs */
9443#line 2618 "parse.y"
9444 {
9445 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9446 rb_parser_printf(p, "NODE_SPECIAL");
9447 }
9448 else if (((*yyvaluep).node)) {
9449 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9450 }
9451}
9452#line 9453 "parse.c"
9453 break;
9454
9455 case YYSYMBOL_paren_args: /* paren_args */
9456#line 2618 "parse.y"
9457 {
9458 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9459 rb_parser_printf(p, "NODE_SPECIAL");
9460 }
9461 else if (((*yyvaluep).node)) {
9462 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9463 }
9464}
9465#line 9466 "parse.c"
9466 break;
9467
9468 case YYSYMBOL_opt_paren_args: /* opt_paren_args */
9469#line 2618 "parse.y"
9470 {
9471 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9472 rb_parser_printf(p, "NODE_SPECIAL");
9473 }
9474 else if (((*yyvaluep).node)) {
9475 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9476 }
9477}
9478#line 9479 "parse.c"
9479 break;
9480
9481 case YYSYMBOL_opt_call_args: /* opt_call_args */
9482#line 2618 "parse.y"
9483 {
9484 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9485 rb_parser_printf(p, "NODE_SPECIAL");
9486 }
9487 else if (((*yyvaluep).node)) {
9488 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9489 }
9490}
9491#line 9492 "parse.c"
9492 break;
9493
9494 case YYSYMBOL_value_expr_command: /* value_expr_command */
9495#line 2618 "parse.y"
9496 {
9497 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9498 rb_parser_printf(p, "NODE_SPECIAL");
9499 }
9500 else if (((*yyvaluep).node)) {
9501 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9502 }
9503}
9504#line 9505 "parse.c"
9505 break;
9506
9507 case YYSYMBOL_call_args: /* call_args */
9508#line 2618 "parse.y"
9509 {
9510 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9511 rb_parser_printf(p, "NODE_SPECIAL");
9512 }
9513 else if (((*yyvaluep).node)) {
9514 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9515 }
9516}
9517#line 9518 "parse.c"
9518 break;
9519
9520 case YYSYMBOL_command_args: /* command_args */
9521#line 2618 "parse.y"
9522 {
9523 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9524 rb_parser_printf(p, "NODE_SPECIAL");
9525 }
9526 else if (((*yyvaluep).node)) {
9527 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9528 }
9529}
9530#line 9531 "parse.c"
9531 break;
9532
9533 case YYSYMBOL_block_arg: /* block_arg */
9534#line 2618 "parse.y"
9535 {
9536 if ((NODE *)((*yyvaluep).node_block_pass) == (NODE *)-1) {
9537 rb_parser_printf(p, "NODE_SPECIAL");
9538 }
9539 else if (((*yyvaluep).node_block_pass)) {
9540 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_block_pass)))));
9541 }
9542}
9543#line 9544 "parse.c"
9544 break;
9545
9546 case YYSYMBOL_opt_block_arg: /* opt_block_arg */
9547#line 2618 "parse.y"
9548 {
9549 if ((NODE *)((*yyvaluep).node_block_pass) == (NODE *)-1) {
9550 rb_parser_printf(p, "NODE_SPECIAL");
9551 }
9552 else if (((*yyvaluep).node_block_pass)) {
9553 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_block_pass)))));
9554 }
9555}
9556#line 9557 "parse.c"
9557 break;
9558
9559 case YYSYMBOL_args: /* args */
9560#line 2618 "parse.y"
9561 {
9562 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9563 rb_parser_printf(p, "NODE_SPECIAL");
9564 }
9565 else if (((*yyvaluep).node)) {
9566 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9567 }
9568}
9569#line 9570 "parse.c"
9570 break;
9571
9572 case YYSYMBOL_arg_splat: /* arg_splat */
9573#line 2618 "parse.y"
9574 {
9575 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9576 rb_parser_printf(p, "NODE_SPECIAL");
9577 }
9578 else if (((*yyvaluep).node)) {
9579 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9580 }
9581}
9582#line 9583 "parse.c"
9583 break;
9584
9585 case YYSYMBOL_mrhs_arg: /* mrhs_arg */
9586#line 2618 "parse.y"
9587 {
9588 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9589 rb_parser_printf(p, "NODE_SPECIAL");
9590 }
9591 else if (((*yyvaluep).node)) {
9592 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9593 }
9594}
9595#line 9596 "parse.c"
9596 break;
9597
9598 case YYSYMBOL_mrhs: /* mrhs */
9599#line 2618 "parse.y"
9600 {
9601 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9602 rb_parser_printf(p, "NODE_SPECIAL");
9603 }
9604 else if (((*yyvaluep).node)) {
9605 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9606 }
9607}
9608#line 9609 "parse.c"
9609 break;
9610
9611 case YYSYMBOL_primary: /* primary */
9612#line 2618 "parse.y"
9613 {
9614 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9615 rb_parser_printf(p, "NODE_SPECIAL");
9616 }
9617 else if (((*yyvaluep).node)) {
9618 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9619 }
9620}
9621#line 9622 "parse.c"
9622 break;
9623
9624 case YYSYMBOL_value_expr_primary: /* value_expr_primary */
9625#line 2618 "parse.y"
9626 {
9627 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9628 rb_parser_printf(p, "NODE_SPECIAL");
9629 }
9630 else if (((*yyvaluep).node)) {
9631 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9632 }
9633}
9634#line 9635 "parse.c"
9635 break;
9636
9637 case YYSYMBOL_primary_value: /* primary_value */
9638#line 2618 "parse.y"
9639 {
9640 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9641 rb_parser_printf(p, "NODE_SPECIAL");
9642 }
9643 else if (((*yyvaluep).node)) {
9644 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9645 }
9646}
9647#line 9648 "parse.c"
9648 break;
9649
9650 case YYSYMBOL_k_while: /* k_while */
9651#line 2618 "parse.y"
9652 {
9653 if ((NODE *)((*yyvaluep).node_exits) == (NODE *)-1) {
9654 rb_parser_printf(p, "NODE_SPECIAL");
9655 }
9656 else if (((*yyvaluep).node_exits)) {
9657 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_exits)))));
9658 }
9659}
9660#line 9661 "parse.c"
9661 break;
9662
9663 case YYSYMBOL_k_until: /* k_until */
9664#line 2618 "parse.y"
9665 {
9666 if ((NODE *)((*yyvaluep).node_exits) == (NODE *)-1) {
9667 rb_parser_printf(p, "NODE_SPECIAL");
9668 }
9669 else if (((*yyvaluep).node_exits)) {
9670 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_exits)))));
9671 }
9672}
9673#line 9674 "parse.c"
9674 break;
9675
9676 case YYSYMBOL_k_for: /* k_for */
9677#line 2618 "parse.y"
9678 {
9679 if ((NODE *)((*yyvaluep).node_exits) == (NODE *)-1) {
9680 rb_parser_printf(p, "NODE_SPECIAL");
9681 }
9682 else if (((*yyvaluep).node_exits)) {
9683 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_exits)))));
9684 }
9685}
9686#line 9687 "parse.c"
9687 break;
9688
9689 case YYSYMBOL_k_def: /* k_def */
9690#line 2618 "parse.y"
9691 {
9692 if ((NODE *)((*yyvaluep).node_def_temp) == (NODE *)-1) {
9693 rb_parser_printf(p, "NODE_SPECIAL");
9694 }
9695 else if (((*yyvaluep).node_def_temp)) {
9696 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_def_temp)))));
9697 }
9698}
9699#line 9700 "parse.c"
9700 break;
9701
9702 case YYSYMBOL_do: /* do */
9703#line 2627 "parse.y"
9704 {
9705 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
9706}
9707#line 9708 "parse.c"
9708 break;
9709
9710 case YYSYMBOL_if_tail: /* if_tail */
9711#line 2618 "parse.y"
9712 {
9713 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9714 rb_parser_printf(p, "NODE_SPECIAL");
9715 }
9716 else if (((*yyvaluep).node)) {
9717 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9718 }
9719}
9720#line 9721 "parse.c"
9721 break;
9722
9723 case YYSYMBOL_opt_else: /* opt_else */
9724#line 2618 "parse.y"
9725 {
9726 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9727 rb_parser_printf(p, "NODE_SPECIAL");
9728 }
9729 else if (((*yyvaluep).node)) {
9730 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9731 }
9732}
9733#line 9734 "parse.c"
9734 break;
9735
9736 case YYSYMBOL_for_var: /* for_var */
9737#line 2618 "parse.y"
9738 {
9739 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9740 rb_parser_printf(p, "NODE_SPECIAL");
9741 }
9742 else if (((*yyvaluep).node)) {
9743 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9744 }
9745}
9746#line 9747 "parse.c"
9747 break;
9748
9749 case YYSYMBOL_f_marg: /* f_marg */
9750#line 2618 "parse.y"
9751 {
9752 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9753 rb_parser_printf(p, "NODE_SPECIAL");
9754 }
9755 else if (((*yyvaluep).node)) {
9756 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9757 }
9758}
9759#line 9760 "parse.c"
9760 break;
9761
9762 case YYSYMBOL_mlhs_items_f_marg: /* mlhs_items_f_marg */
9763#line 2618 "parse.y"
9764 {
9765 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9766 rb_parser_printf(p, "NODE_SPECIAL");
9767 }
9768 else if (((*yyvaluep).node)) {
9769 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9770 }
9771}
9772#line 9773 "parse.c"
9773 break;
9774
9775 case YYSYMBOL_f_margs: /* f_margs */
9776#line 2618 "parse.y"
9777 {
9778 if ((NODE *)((*yyvaluep).node_masgn) == (NODE *)-1) {
9779 rb_parser_printf(p, "NODE_SPECIAL");
9780 }
9781 else if (((*yyvaluep).node_masgn)) {
9782 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_masgn)))));
9783 }
9784}
9785#line 9786 "parse.c"
9786 break;
9787
9788 case YYSYMBOL_f_rest_marg: /* f_rest_marg */
9789#line 2618 "parse.y"
9790 {
9791 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9792 rb_parser_printf(p, "NODE_SPECIAL");
9793 }
9794 else if (((*yyvaluep).node)) {
9795 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9796 }
9797}
9798#line 9799 "parse.c"
9799 break;
9800
9801 case YYSYMBOL_f_any_kwrest: /* f_any_kwrest */
9802#line 2627 "parse.y"
9803 {
9804 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
9805}
9806#line 9807 "parse.c"
9807 break;
9808
9809 case YYSYMBOL_f_kw_primary_value: /* f_kw_primary_value */
9810#line 2618 "parse.y"
9811 {
9812 if ((NODE *)((*yyvaluep).node_kw_arg) == (NODE *)-1) {
9813 rb_parser_printf(p, "NODE_SPECIAL");
9814 }
9815 else if (((*yyvaluep).node_kw_arg)) {
9816 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_kw_arg)))));
9817 }
9818}
9819#line 9820 "parse.c"
9820 break;
9821
9822 case YYSYMBOL_f_kwarg_primary_value: /* f_kwarg_primary_value */
9823#line 2618 "parse.y"
9824 {
9825 if ((NODE *)((*yyvaluep).node_kw_arg) == (NODE *)-1) {
9826 rb_parser_printf(p, "NODE_SPECIAL");
9827 }
9828 else if (((*yyvaluep).node_kw_arg)) {
9829 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_kw_arg)))));
9830 }
9831}
9832#line 9833 "parse.c"
9833 break;
9834
9835 case YYSYMBOL_opt_f_block_arg_none: /* opt_f_block_arg_none */
9836#line 2627 "parse.y"
9837 {
9838 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
9839}
9840#line 9841 "parse.c"
9841 break;
9842
9843 case YYSYMBOL_args_tail_basic_primary_value_none: /* args_tail_basic_primary_value_none */
9844#line 2618 "parse.y"
9845 {
9846 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
9847 rb_parser_printf(p, "NODE_SPECIAL");
9848 }
9849 else if (((*yyvaluep).node_args)) {
9850 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
9851 }
9852}
9853#line 9854 "parse.c"
9854 break;
9855
9856 case YYSYMBOL_block_args_tail: /* block_args_tail */
9857#line 2618 "parse.y"
9858 {
9859 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
9860 rb_parser_printf(p, "NODE_SPECIAL");
9861 }
9862 else if (((*yyvaluep).node_args)) {
9863 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
9864 }
9865}
9866#line 9867 "parse.c"
9867 break;
9868
9869 case YYSYMBOL_excessed_comma: /* excessed_comma */
9870#line 2627 "parse.y"
9871 {
9872 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
9873}
9874#line 9875 "parse.c"
9875 break;
9876
9877 case YYSYMBOL_f_opt_primary_value: /* f_opt_primary_value */
9878#line 2618 "parse.y"
9879 {
9880 if ((NODE *)((*yyvaluep).node_opt_arg) == (NODE *)-1) {
9881 rb_parser_printf(p, "NODE_SPECIAL");
9882 }
9883 else if (((*yyvaluep).node_opt_arg)) {
9884 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_opt_arg)))));
9885 }
9886}
9887#line 9888 "parse.c"
9888 break;
9889
9890 case YYSYMBOL_f_opt_arg_primary_value: /* f_opt_arg_primary_value */
9891#line 2618 "parse.y"
9892 {
9893 if ((NODE *)((*yyvaluep).node_opt_arg) == (NODE *)-1) {
9894 rb_parser_printf(p, "NODE_SPECIAL");
9895 }
9896 else if (((*yyvaluep).node_opt_arg)) {
9897 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_opt_arg)))));
9898 }
9899}
9900#line 9901 "parse.c"
9901 break;
9902
9903 case YYSYMBOL_opt_args_tail_block_args_tail_none: /* opt_args_tail_block_args_tail_none */
9904#line 2618 "parse.y"
9905 {
9906 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
9907 rb_parser_printf(p, "NODE_SPECIAL");
9908 }
9909 else if (((*yyvaluep).node_args)) {
9910 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
9911 }
9912}
9913#line 9914 "parse.c"
9914 break;
9915
9916 case YYSYMBOL_args_list_primary_value_opt_args_tail_block_args_tail_none: /* args-list_primary_value_opt_args_tail_block_args_tail_none */
9917#line 2618 "parse.y"
9918 {
9919 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
9920 rb_parser_printf(p, "NODE_SPECIAL");
9921 }
9922 else if (((*yyvaluep).node_args)) {
9923 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
9924 }
9925}
9926#line 9927 "parse.c"
9927 break;
9928
9929 case YYSYMBOL_block_param: /* block_param */
9930#line 2618 "parse.y"
9931 {
9932 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
9933 rb_parser_printf(p, "NODE_SPECIAL");
9934 }
9935 else if (((*yyvaluep).node_args)) {
9936 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
9937 }
9938}
9939#line 9940 "parse.c"
9940 break;
9941
9942 case YYSYMBOL_tail_only_args_block_args_tail: /* tail-only-args_block_args_tail */
9943#line 2618 "parse.y"
9944 {
9945 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
9946 rb_parser_printf(p, "NODE_SPECIAL");
9947 }
9948 else if (((*yyvaluep).node_args)) {
9949 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
9950 }
9951}
9952#line 9953 "parse.c"
9953 break;
9954
9955 case YYSYMBOL_opt_block_param_def: /* opt_block_param_def */
9956#line 2618 "parse.y"
9957 {
9958 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
9959 rb_parser_printf(p, "NODE_SPECIAL");
9960 }
9961 else if (((*yyvaluep).node_args)) {
9962 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
9963 }
9964}
9965#line 9966 "parse.c"
9966 break;
9967
9968 case YYSYMBOL_block_param_def: /* block_param_def */
9969#line 2618 "parse.y"
9970 {
9971 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
9972 rb_parser_printf(p, "NODE_SPECIAL");
9973 }
9974 else if (((*yyvaluep).node_args)) {
9975 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
9976 }
9977}
9978#line 9979 "parse.c"
9979 break;
9980
9981 case YYSYMBOL_opt_block_param: /* opt_block_param */
9982#line 2618 "parse.y"
9983 {
9984 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
9985 rb_parser_printf(p, "NODE_SPECIAL");
9986 }
9987 else if (((*yyvaluep).node_args)) {
9988 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
9989 }
9990}
9991#line 9992 "parse.c"
9992 break;
9993
9994 case YYSYMBOL_opt_bv_decl: /* opt_bv_decl */
9995#line 2627 "parse.y"
9996 {
9997 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
9998}
9999#line 10000 "parse.c"
10000 break;
10001
10002 case YYSYMBOL_bv_decls: /* bv_decls */
10003#line 2627 "parse.y"
10004 {
10005 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
10006}
10007#line 10008 "parse.c"
10008 break;
10009
10010 case YYSYMBOL_bvar: /* bvar */
10011#line 2627 "parse.y"
10012 {
10013 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
10014}
10015#line 10016 "parse.c"
10016 break;
10017
10018 case YYSYMBOL_numparam: /* numparam */
10019#line 2618 "parse.y"
10020 {
10021 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10022 rb_parser_printf(p, "NODE_SPECIAL");
10023 }
10024 else if (((*yyvaluep).node)) {
10025 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10026 }
10027}
10028#line 10029 "parse.c"
10029 break;
10030
10031 case YYSYMBOL_it_id: /* it_id */
10032#line 2627 "parse.y"
10033 {
10034 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
10035}
10036#line 10037 "parse.c"
10037 break;
10038
10039 case YYSYMBOL_lambda: /* lambda */
10040#line 2618 "parse.y"
10041 {
10042 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10043 rb_parser_printf(p, "NODE_SPECIAL");
10044 }
10045 else if (((*yyvaluep).node)) {
10046 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10047 }
10048}
10049#line 10050 "parse.c"
10050 break;
10051
10052 case YYSYMBOL_f_larglist: /* f_larglist */
10053#line 2618 "parse.y"
10054 {
10055 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
10056 rb_parser_printf(p, "NODE_SPECIAL");
10057 }
10058 else if (((*yyvaluep).node_args)) {
10059 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
10060 }
10061}
10062#line 10063 "parse.c"
10063 break;
10064
10065 case YYSYMBOL_do_block: /* do_block */
10066#line 2618 "parse.y"
10067 {
10068 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10069 rb_parser_printf(p, "NODE_SPECIAL");
10070 }
10071 else if (((*yyvaluep).node)) {
10072 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10073 }
10074}
10075#line 10076 "parse.c"
10076 break;
10077
10078 case YYSYMBOL_block_call: /* block_call */
10079#line 2618 "parse.y"
10080 {
10081 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10082 rb_parser_printf(p, "NODE_SPECIAL");
10083 }
10084 else if (((*yyvaluep).node)) {
10085 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10086 }
10087}
10088#line 10089 "parse.c"
10089 break;
10090
10091 case YYSYMBOL_method_call: /* method_call */
10092#line 2618 "parse.y"
10093 {
10094 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10095 rb_parser_printf(p, "NODE_SPECIAL");
10096 }
10097 else if (((*yyvaluep).node)) {
10098 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10099 }
10100}
10101#line 10102 "parse.c"
10102 break;
10103
10104 case YYSYMBOL_brace_block: /* brace_block */
10105#line 2618 "parse.y"
10106 {
10107 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10108 rb_parser_printf(p, "NODE_SPECIAL");
10109 }
10110 else if (((*yyvaluep).node)) {
10111 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10112 }
10113}
10114#line 10115 "parse.c"
10115 break;
10116
10117 case YYSYMBOL_brace_body: /* brace_body */
10118#line 2618 "parse.y"
10119 {
10120 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10121 rb_parser_printf(p, "NODE_SPECIAL");
10122 }
10123 else if (((*yyvaluep).node)) {
10124 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10125 }
10126}
10127#line 10128 "parse.c"
10128 break;
10129
10130 case YYSYMBOL_do_body: /* do_body */
10131#line 2618 "parse.y"
10132 {
10133 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10134 rb_parser_printf(p, "NODE_SPECIAL");
10135 }
10136 else if (((*yyvaluep).node)) {
10137 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10138 }
10139}
10140#line 10141 "parse.c"
10141 break;
10142
10143 case YYSYMBOL_case_args: /* case_args */
10144#line 2618 "parse.y"
10145 {
10146 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10147 rb_parser_printf(p, "NODE_SPECIAL");
10148 }
10149 else if (((*yyvaluep).node)) {
10150 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10151 }
10152}
10153#line 10154 "parse.c"
10154 break;
10155
10156 case YYSYMBOL_case_body: /* case_body */
10157#line 2618 "parse.y"
10158 {
10159 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10160 rb_parser_printf(p, "NODE_SPECIAL");
10161 }
10162 else if (((*yyvaluep).node)) {
10163 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10164 }
10165}
10166#line 10167 "parse.c"
10167 break;
10168
10169 case YYSYMBOL_cases: /* cases */
10170#line 2618 "parse.y"
10171 {
10172 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10173 rb_parser_printf(p, "NODE_SPECIAL");
10174 }
10175 else if (((*yyvaluep).node)) {
10176 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10177 }
10178}
10179#line 10180 "parse.c"
10180 break;
10181
10182 case YYSYMBOL_p_case_body: /* p_case_body */
10183#line 2618 "parse.y"
10184 {
10185 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10186 rb_parser_printf(p, "NODE_SPECIAL");
10187 }
10188 else if (((*yyvaluep).node)) {
10189 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10190 }
10191}
10192#line 10193 "parse.c"
10193 break;
10194
10195 case YYSYMBOL_p_cases: /* p_cases */
10196#line 2618 "parse.y"
10197 {
10198 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10199 rb_parser_printf(p, "NODE_SPECIAL");
10200 }
10201 else if (((*yyvaluep).node)) {
10202 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10203 }
10204}
10205#line 10206 "parse.c"
10206 break;
10207
10208 case YYSYMBOL_p_top_expr: /* p_top_expr */
10209#line 2618 "parse.y"
10210 {
10211 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10212 rb_parser_printf(p, "NODE_SPECIAL");
10213 }
10214 else if (((*yyvaluep).node)) {
10215 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10216 }
10217}
10218#line 10219 "parse.c"
10219 break;
10220
10221 case YYSYMBOL_p_top_expr_body: /* p_top_expr_body */
10222#line 2618 "parse.y"
10223 {
10224 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10225 rb_parser_printf(p, "NODE_SPECIAL");
10226 }
10227 else if (((*yyvaluep).node)) {
10228 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10229 }
10230}
10231#line 10232 "parse.c"
10232 break;
10233
10234 case YYSYMBOL_p_expr: /* p_expr */
10235#line 2618 "parse.y"
10236 {
10237 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10238 rb_parser_printf(p, "NODE_SPECIAL");
10239 }
10240 else if (((*yyvaluep).node)) {
10241 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10242 }
10243}
10244#line 10245 "parse.c"
10245 break;
10246
10247 case YYSYMBOL_p_as: /* p_as */
10248#line 2618 "parse.y"
10249 {
10250 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10251 rb_parser_printf(p, "NODE_SPECIAL");
10252 }
10253 else if (((*yyvaluep).node)) {
10254 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10255 }
10256}
10257#line 10258 "parse.c"
10258 break;
10259
10260 case YYSYMBOL_p_alt: /* p_alt */
10261#line 2618 "parse.y"
10262 {
10263 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10264 rb_parser_printf(p, "NODE_SPECIAL");
10265 }
10266 else if (((*yyvaluep).node)) {
10267 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10268 }
10269}
10270#line 10271 "parse.c"
10271 break;
10272
10273 case YYSYMBOL_p_expr_basic: /* p_expr_basic */
10274#line 2618 "parse.y"
10275 {
10276 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10277 rb_parser_printf(p, "NODE_SPECIAL");
10278 }
10279 else if (((*yyvaluep).node)) {
10280 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10281 }
10282}
10283#line 10284 "parse.c"
10284 break;
10285
10286 case YYSYMBOL_p_args: /* p_args */
10287#line 2618 "parse.y"
10288 {
10289 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10290 rb_parser_printf(p, "NODE_SPECIAL");
10291 }
10292 else if (((*yyvaluep).node)) {
10293 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10294 }
10295}
10296#line 10297 "parse.c"
10297 break;
10298
10299 case YYSYMBOL_p_args_head: /* p_args_head */
10300#line 2618 "parse.y"
10301 {
10302 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10303 rb_parser_printf(p, "NODE_SPECIAL");
10304 }
10305 else if (((*yyvaluep).node)) {
10306 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10307 }
10308}
10309#line 10310 "parse.c"
10310 break;
10311
10312 case YYSYMBOL_p_args_tail: /* p_args_tail */
10313#line 2618 "parse.y"
10314 {
10315 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10316 rb_parser_printf(p, "NODE_SPECIAL");
10317 }
10318 else if (((*yyvaluep).node)) {
10319 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10320 }
10321}
10322#line 10323 "parse.c"
10323 break;
10324
10325 case YYSYMBOL_p_find: /* p_find */
10326#line 2618 "parse.y"
10327 {
10328 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10329 rb_parser_printf(p, "NODE_SPECIAL");
10330 }
10331 else if (((*yyvaluep).node)) {
10332 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10333 }
10334}
10335#line 10336 "parse.c"
10336 break;
10337
10338 case YYSYMBOL_p_rest: /* p_rest */
10339#line 2618 "parse.y"
10340 {
10341 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10342 rb_parser_printf(p, "NODE_SPECIAL");
10343 }
10344 else if (((*yyvaluep).node)) {
10345 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10346 }
10347}
10348#line 10349 "parse.c"
10349 break;
10350
10351 case YYSYMBOL_p_args_post: /* p_args_post */
10352#line 2618 "parse.y"
10353 {
10354 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10355 rb_parser_printf(p, "NODE_SPECIAL");
10356 }
10357 else if (((*yyvaluep).node)) {
10358 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10359 }
10360}
10361#line 10362 "parse.c"
10362 break;
10363
10364 case YYSYMBOL_p_arg: /* p_arg */
10365#line 2618 "parse.y"
10366 {
10367 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10368 rb_parser_printf(p, "NODE_SPECIAL");
10369 }
10370 else if (((*yyvaluep).node)) {
10371 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10372 }
10373}
10374#line 10375 "parse.c"
10375 break;
10376
10377 case YYSYMBOL_p_kwargs: /* p_kwargs */
10378#line 2618 "parse.y"
10379 {
10380 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10381 rb_parser_printf(p, "NODE_SPECIAL");
10382 }
10383 else if (((*yyvaluep).node)) {
10384 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10385 }
10386}
10387#line 10388 "parse.c"
10388 break;
10389
10390 case YYSYMBOL_p_kwarg: /* p_kwarg */
10391#line 2618 "parse.y"
10392 {
10393 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10394 rb_parser_printf(p, "NODE_SPECIAL");
10395 }
10396 else if (((*yyvaluep).node)) {
10397 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10398 }
10399}
10400#line 10401 "parse.c"
10401 break;
10402
10403 case YYSYMBOL_p_kw: /* p_kw */
10404#line 2618 "parse.y"
10405 {
10406 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10407 rb_parser_printf(p, "NODE_SPECIAL");
10408 }
10409 else if (((*yyvaluep).node)) {
10410 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10411 }
10412}
10413#line 10414 "parse.c"
10414 break;
10415
10416 case YYSYMBOL_p_kw_label: /* p_kw_label */
10417#line 2627 "parse.y"
10418 {
10419 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
10420}
10421#line 10422 "parse.c"
10422 break;
10423
10424 case YYSYMBOL_p_kwrest: /* p_kwrest */
10425#line 2627 "parse.y"
10426 {
10427 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
10428}
10429#line 10430 "parse.c"
10430 break;
10431
10432 case YYSYMBOL_p_kwnorest: /* p_kwnorest */
10433#line 2627 "parse.y"
10434 {
10435 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
10436}
10437#line 10438 "parse.c"
10438 break;
10439
10440 case YYSYMBOL_p_any_kwrest: /* p_any_kwrest */
10441#line 2627 "parse.y"
10442 {
10443 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
10444}
10445#line 10446 "parse.c"
10446 break;
10447
10448 case YYSYMBOL_p_value: /* p_value */
10449#line 2618 "parse.y"
10450 {
10451 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10452 rb_parser_printf(p, "NODE_SPECIAL");
10453 }
10454 else if (((*yyvaluep).node)) {
10455 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10456 }
10457}
10458#line 10459 "parse.c"
10459 break;
10460
10461 case YYSYMBOL_range_expr_p_primitive: /* range_expr_p_primitive */
10462#line 2618 "parse.y"
10463 {
10464 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10465 rb_parser_printf(p, "NODE_SPECIAL");
10466 }
10467 else if (((*yyvaluep).node)) {
10468 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10469 }
10470}
10471#line 10472 "parse.c"
10472 break;
10473
10474 case YYSYMBOL_p_primitive: /* p_primitive */
10475#line 2618 "parse.y"
10476 {
10477 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10478 rb_parser_printf(p, "NODE_SPECIAL");
10479 }
10480 else if (((*yyvaluep).node)) {
10481 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10482 }
10483}
10484#line 10485 "parse.c"
10485 break;
10486
10487 case YYSYMBOL_p_variable: /* p_variable */
10488#line 2618 "parse.y"
10489 {
10490 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10491 rb_parser_printf(p, "NODE_SPECIAL");
10492 }
10493 else if (((*yyvaluep).node)) {
10494 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10495 }
10496}
10497#line 10498 "parse.c"
10498 break;
10499
10500 case YYSYMBOL_p_var_ref: /* p_var_ref */
10501#line 2618 "parse.y"
10502 {
10503 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10504 rb_parser_printf(p, "NODE_SPECIAL");
10505 }
10506 else if (((*yyvaluep).node)) {
10507 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10508 }
10509}
10510#line 10511 "parse.c"
10511 break;
10512
10513 case YYSYMBOL_p_expr_ref: /* p_expr_ref */
10514#line 2618 "parse.y"
10515 {
10516 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10517 rb_parser_printf(p, "NODE_SPECIAL");
10518 }
10519 else if (((*yyvaluep).node)) {
10520 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10521 }
10522}
10523#line 10524 "parse.c"
10524 break;
10525
10526 case YYSYMBOL_p_const: /* p_const */
10527#line 2618 "parse.y"
10528 {
10529 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10530 rb_parser_printf(p, "NODE_SPECIAL");
10531 }
10532 else if (((*yyvaluep).node)) {
10533 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10534 }
10535}
10536#line 10537 "parse.c"
10537 break;
10538
10539 case YYSYMBOL_opt_rescue: /* opt_rescue */
10540#line 2618 "parse.y"
10541 {
10542 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10543 rb_parser_printf(p, "NODE_SPECIAL");
10544 }
10545 else if (((*yyvaluep).node)) {
10546 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10547 }
10548}
10549#line 10550 "parse.c"
10550 break;
10551
10552 case YYSYMBOL_exc_list: /* exc_list */
10553#line 2618 "parse.y"
10554 {
10555 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10556 rb_parser_printf(p, "NODE_SPECIAL");
10557 }
10558 else if (((*yyvaluep).node)) {
10559 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10560 }
10561}
10562#line 10563 "parse.c"
10563 break;
10564
10565 case YYSYMBOL_exc_var: /* exc_var */
10566#line 2618 "parse.y"
10567 {
10568 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10569 rb_parser_printf(p, "NODE_SPECIAL");
10570 }
10571 else if (((*yyvaluep).node)) {
10572 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10573 }
10574}
10575#line 10576 "parse.c"
10576 break;
10577
10578 case YYSYMBOL_opt_ensure: /* opt_ensure */
10579#line 2618 "parse.y"
10580 {
10581 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10582 rb_parser_printf(p, "NODE_SPECIAL");
10583 }
10584 else if (((*yyvaluep).node)) {
10585 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10586 }
10587}
10588#line 10589 "parse.c"
10589 break;
10590
10591 case YYSYMBOL_literal: /* literal */
10592#line 2618 "parse.y"
10593 {
10594 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10595 rb_parser_printf(p, "NODE_SPECIAL");
10596 }
10597 else if (((*yyvaluep).node)) {
10598 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10599 }
10600}
10601#line 10602 "parse.c"
10602 break;
10603
10604 case YYSYMBOL_strings: /* strings */
10605#line 2618 "parse.y"
10606 {
10607 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10608 rb_parser_printf(p, "NODE_SPECIAL");
10609 }
10610 else if (((*yyvaluep).node)) {
10611 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10612 }
10613}
10614#line 10615 "parse.c"
10615 break;
10616
10617 case YYSYMBOL_string: /* string */
10618#line 2618 "parse.y"
10619 {
10620 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10621 rb_parser_printf(p, "NODE_SPECIAL");
10622 }
10623 else if (((*yyvaluep).node)) {
10624 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10625 }
10626}
10627#line 10628 "parse.c"
10628 break;
10629
10630 case YYSYMBOL_string1: /* string1 */
10631#line 2618 "parse.y"
10632 {
10633 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10634 rb_parser_printf(p, "NODE_SPECIAL");
10635 }
10636 else if (((*yyvaluep).node)) {
10637 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10638 }
10639}
10640#line 10641 "parse.c"
10641 break;
10642
10643 case YYSYMBOL_xstring: /* xstring */
10644#line 2618 "parse.y"
10645 {
10646 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10647 rb_parser_printf(p, "NODE_SPECIAL");
10648 }
10649 else if (((*yyvaluep).node)) {
10650 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10651 }
10652}
10653#line 10654 "parse.c"
10654 break;
10655
10656 case YYSYMBOL_regexp: /* regexp */
10657#line 2618 "parse.y"
10658 {
10659 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10660 rb_parser_printf(p, "NODE_SPECIAL");
10661 }
10662 else if (((*yyvaluep).node)) {
10663 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10664 }
10665}
10666#line 10667 "parse.c"
10667 break;
10668
10669 case YYSYMBOL_words_tWORDS_BEG_word_list: /* words_tWORDS_BEG_word_list */
10670#line 2618 "parse.y"
10671 {
10672 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10673 rb_parser_printf(p, "NODE_SPECIAL");
10674 }
10675 else if (((*yyvaluep).node)) {
10676 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10677 }
10678}
10679#line 10680 "parse.c"
10680 break;
10681
10682 case YYSYMBOL_words: /* words */
10683#line 2618 "parse.y"
10684 {
10685 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10686 rb_parser_printf(p, "NODE_SPECIAL");
10687 }
10688 else if (((*yyvaluep).node)) {
10689 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10690 }
10691}
10692#line 10693 "parse.c"
10693 break;
10694
10695 case YYSYMBOL_word_list: /* word_list */
10696#line 2618 "parse.y"
10697 {
10698 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10699 rb_parser_printf(p, "NODE_SPECIAL");
10700 }
10701 else if (((*yyvaluep).node)) {
10702 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10703 }
10704}
10705#line 10706 "parse.c"
10706 break;
10707
10708 case YYSYMBOL_word: /* word */
10709#line 2618 "parse.y"
10710 {
10711 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10712 rb_parser_printf(p, "NODE_SPECIAL");
10713 }
10714 else if (((*yyvaluep).node)) {
10715 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10716 }
10717}
10718#line 10719 "parse.c"
10719 break;
10720
10721 case YYSYMBOL_words_tSYMBOLS_BEG_symbol_list: /* words_tSYMBOLS_BEG_symbol_list */
10722#line 2618 "parse.y"
10723 {
10724 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10725 rb_parser_printf(p, "NODE_SPECIAL");
10726 }
10727 else if (((*yyvaluep).node)) {
10728 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10729 }
10730}
10731#line 10732 "parse.c"
10732 break;
10733
10734 case YYSYMBOL_symbols: /* symbols */
10735#line 2618 "parse.y"
10736 {
10737 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10738 rb_parser_printf(p, "NODE_SPECIAL");
10739 }
10740 else if (((*yyvaluep).node)) {
10741 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10742 }
10743}
10744#line 10745 "parse.c"
10745 break;
10746
10747 case YYSYMBOL_symbol_list: /* symbol_list */
10748#line 2618 "parse.y"
10749 {
10750 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10751 rb_parser_printf(p, "NODE_SPECIAL");
10752 }
10753 else if (((*yyvaluep).node)) {
10754 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10755 }
10756}
10757#line 10758 "parse.c"
10758 break;
10759
10760 case YYSYMBOL_words_tQWORDS_BEG_qword_list: /* words_tQWORDS_BEG_qword_list */
10761#line 2618 "parse.y"
10762 {
10763 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10764 rb_parser_printf(p, "NODE_SPECIAL");
10765 }
10766 else if (((*yyvaluep).node)) {
10767 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10768 }
10769}
10770#line 10771 "parse.c"
10771 break;
10772
10773 case YYSYMBOL_qwords: /* qwords */
10774#line 2618 "parse.y"
10775 {
10776 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10777 rb_parser_printf(p, "NODE_SPECIAL");
10778 }
10779 else if (((*yyvaluep).node)) {
10780 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10781 }
10782}
10783#line 10784 "parse.c"
10784 break;
10785
10786 case YYSYMBOL_words_tQSYMBOLS_BEG_qsym_list: /* words_tQSYMBOLS_BEG_qsym_list */
10787#line 2618 "parse.y"
10788 {
10789 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10790 rb_parser_printf(p, "NODE_SPECIAL");
10791 }
10792 else if (((*yyvaluep).node)) {
10793 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10794 }
10795}
10796#line 10797 "parse.c"
10797 break;
10798
10799 case YYSYMBOL_qsymbols: /* qsymbols */
10800#line 2618 "parse.y"
10801 {
10802 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10803 rb_parser_printf(p, "NODE_SPECIAL");
10804 }
10805 else if (((*yyvaluep).node)) {
10806 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10807 }
10808}
10809#line 10810 "parse.c"
10810 break;
10811
10812 case YYSYMBOL_qword_list: /* qword_list */
10813#line 2618 "parse.y"
10814 {
10815 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10816 rb_parser_printf(p, "NODE_SPECIAL");
10817 }
10818 else if (((*yyvaluep).node)) {
10819 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10820 }
10821}
10822#line 10823 "parse.c"
10823 break;
10824
10825 case YYSYMBOL_qsym_list: /* qsym_list */
10826#line 2618 "parse.y"
10827 {
10828 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10829 rb_parser_printf(p, "NODE_SPECIAL");
10830 }
10831 else if (((*yyvaluep).node)) {
10832 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10833 }
10834}
10835#line 10836 "parse.c"
10836 break;
10837
10838 case YYSYMBOL_string_contents: /* string_contents */
10839#line 2618 "parse.y"
10840 {
10841 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10842 rb_parser_printf(p, "NODE_SPECIAL");
10843 }
10844 else if (((*yyvaluep).node)) {
10845 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10846 }
10847}
10848#line 10849 "parse.c"
10849 break;
10850
10851 case YYSYMBOL_xstring_contents: /* xstring_contents */
10852#line 2618 "parse.y"
10853 {
10854 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10855 rb_parser_printf(p, "NODE_SPECIAL");
10856 }
10857 else if (((*yyvaluep).node)) {
10858 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10859 }
10860}
10861#line 10862 "parse.c"
10862 break;
10863
10864 case YYSYMBOL_regexp_contents: /* regexp_contents */
10865#line 2618 "parse.y"
10866 {
10867 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10868 rb_parser_printf(p, "NODE_SPECIAL");
10869 }
10870 else if (((*yyvaluep).node)) {
10871 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10872 }
10873}
10874#line 10875 "parse.c"
10875 break;
10876
10877 case YYSYMBOL_string_content: /* string_content */
10878#line 2618 "parse.y"
10879 {
10880 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10881 rb_parser_printf(p, "NODE_SPECIAL");
10882 }
10883 else if (((*yyvaluep).node)) {
10884 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10885 }
10886}
10887#line 10888 "parse.c"
10888 break;
10889
10890 case YYSYMBOL_string_dvar: /* string_dvar */
10891#line 2618 "parse.y"
10892 {
10893 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10894 rb_parser_printf(p, "NODE_SPECIAL");
10895 }
10896 else if (((*yyvaluep).node)) {
10897 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10898 }
10899}
10900#line 10901 "parse.c"
10901 break;
10902
10903 case YYSYMBOL_symbol: /* symbol */
10904#line 2618 "parse.y"
10905 {
10906 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10907 rb_parser_printf(p, "NODE_SPECIAL");
10908 }
10909 else if (((*yyvaluep).node)) {
10910 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10911 }
10912}
10913#line 10914 "parse.c"
10914 break;
10915
10916 case YYSYMBOL_ssym: /* ssym */
10917#line 2618 "parse.y"
10918 {
10919 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10920 rb_parser_printf(p, "NODE_SPECIAL");
10921 }
10922 else if (((*yyvaluep).node)) {
10923 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10924 }
10925}
10926#line 10927 "parse.c"
10927 break;
10928
10929 case YYSYMBOL_sym: /* sym */
10930#line 2627 "parse.y"
10931 {
10932 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
10933}
10934#line 10935 "parse.c"
10935 break;
10936
10937 case YYSYMBOL_dsym: /* dsym */
10938#line 2618 "parse.y"
10939 {
10940 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10941 rb_parser_printf(p, "NODE_SPECIAL");
10942 }
10943 else if (((*yyvaluep).node)) {
10944 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10945 }
10946}
10947#line 10948 "parse.c"
10948 break;
10949
10950 case YYSYMBOL_numeric: /* numeric */
10951#line 2618 "parse.y"
10952 {
10953 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10954 rb_parser_printf(p, "NODE_SPECIAL");
10955 }
10956 else if (((*yyvaluep).node)) {
10957 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10958 }
10959}
10960#line 10961 "parse.c"
10961 break;
10962
10963 case YYSYMBOL_simple_numeric: /* simple_numeric */
10964#line 2618 "parse.y"
10965 {
10966 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10967 rb_parser_printf(p, "NODE_SPECIAL");
10968 }
10969 else if (((*yyvaluep).node)) {
10970 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10971 }
10972}
10973#line 10974 "parse.c"
10974 break;
10975
10976 case YYSYMBOL_nonlocal_var: /* nonlocal_var */
10977#line 2627 "parse.y"
10978 {
10979 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
10980}
10981#line 10982 "parse.c"
10982 break;
10983
10984 case YYSYMBOL_user_variable: /* user_variable */
10985#line 2627 "parse.y"
10986 {
10987 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
10988}
10989#line 10990 "parse.c"
10990 break;
10991
10992 case YYSYMBOL_keyword_variable: /* keyword_variable */
10993#line 2627 "parse.y"
10994 {
10995 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
10996}
10997#line 10998 "parse.c"
10998 break;
10999
11000 case YYSYMBOL_var_ref: /* var_ref */
11001#line 2618 "parse.y"
11002 {
11003 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
11004 rb_parser_printf(p, "NODE_SPECIAL");
11005 }
11006 else if (((*yyvaluep).node)) {
11007 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
11008 }
11009}
11010#line 11011 "parse.c"
11011 break;
11012
11013 case YYSYMBOL_var_lhs: /* var_lhs */
11014#line 2618 "parse.y"
11015 {
11016 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
11017 rb_parser_printf(p, "NODE_SPECIAL");
11018 }
11019 else if (((*yyvaluep).node)) {
11020 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
11021 }
11022}
11023#line 11024 "parse.c"
11024 break;
11025
11026 case YYSYMBOL_backref: /* backref */
11027#line 2618 "parse.y"
11028 {
11029 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
11030 rb_parser_printf(p, "NODE_SPECIAL");
11031 }
11032 else if (((*yyvaluep).node)) {
11033 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
11034 }
11035}
11036#line 11037 "parse.c"
11037 break;
11038
11039 case YYSYMBOL_superclass: /* superclass */
11040#line 2618 "parse.y"
11041 {
11042 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
11043 rb_parser_printf(p, "NODE_SPECIAL");
11044 }
11045 else if (((*yyvaluep).node)) {
11046 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
11047 }
11048}
11049#line 11050 "parse.c"
11050 break;
11051
11052 case YYSYMBOL_f_opt_paren_args: /* f_opt_paren_args */
11053#line 2618 "parse.y"
11054 {
11055 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
11056 rb_parser_printf(p, "NODE_SPECIAL");
11057 }
11058 else if (((*yyvaluep).node_args)) {
11059 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
11060 }
11061}
11062#line 11063 "parse.c"
11063 break;
11064
11065 case YYSYMBOL_f_empty_arg: /* f_empty_arg */
11066#line 2618 "parse.y"
11067 {
11068 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
11069 rb_parser_printf(p, "NODE_SPECIAL");
11070 }
11071 else if (((*yyvaluep).node_args)) {
11072 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
11073 }
11074}
11075#line 11076 "parse.c"
11076 break;
11077
11078 case YYSYMBOL_f_paren_args: /* f_paren_args */
11079#line 2618 "parse.y"
11080 {
11081 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
11082 rb_parser_printf(p, "NODE_SPECIAL");
11083 }
11084 else if (((*yyvaluep).node_args)) {
11085 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
11086 }
11087}
11088#line 11089 "parse.c"
11089 break;
11090
11091 case YYSYMBOL_f_arglist: /* f_arglist */
11092#line 2618 "parse.y"
11093 {
11094 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
11095 rb_parser_printf(p, "NODE_SPECIAL");
11096 }
11097 else if (((*yyvaluep).node_args)) {
11098 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
11099 }
11100}
11101#line 11102 "parse.c"
11102 break;
11103
11104 case YYSYMBOL_f_kw_arg_value: /* f_kw_arg_value */
11105#line 2618 "parse.y"
11106 {
11107 if ((NODE *)((*yyvaluep).node_kw_arg) == (NODE *)-1) {
11108 rb_parser_printf(p, "NODE_SPECIAL");
11109 }
11110 else if (((*yyvaluep).node_kw_arg)) {
11111 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_kw_arg)))));
11112 }
11113}
11114#line 11115 "parse.c"
11115 break;
11116
11117 case YYSYMBOL_f_kwarg_arg_value: /* f_kwarg_arg_value */
11118#line 2618 "parse.y"
11119 {
11120 if ((NODE *)((*yyvaluep).node_kw_arg) == (NODE *)-1) {
11121 rb_parser_printf(p, "NODE_SPECIAL");
11122 }
11123 else if (((*yyvaluep).node_kw_arg)) {
11124 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_kw_arg)))));
11125 }
11126}
11127#line 11128 "parse.c"
11128 break;
11129
11130 case YYSYMBOL_opt_f_block_arg_opt_comma: /* opt_f_block_arg_opt_comma */
11131#line 2627 "parse.y"
11132 {
11133 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
11134}
11135#line 11136 "parse.c"
11136 break;
11137
11138 case YYSYMBOL_args_tail_basic_arg_value_opt_comma: /* args_tail_basic_arg_value_opt_comma */
11139#line 2618 "parse.y"
11140 {
11141 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
11142 rb_parser_printf(p, "NODE_SPECIAL");
11143 }
11144 else if (((*yyvaluep).node_args)) {
11145 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
11146 }
11147}
11148#line 11149 "parse.c"
11149 break;
11150
11151 case YYSYMBOL_args_tail: /* args_tail */
11152#line 2618 "parse.y"
11153 {
11154 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
11155 rb_parser_printf(p, "NODE_SPECIAL");
11156 }
11157 else if (((*yyvaluep).node_args)) {
11158 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
11159 }
11160}
11161#line 11162 "parse.c"
11162 break;
11163
11164 case YYSYMBOL_args_tail_basic_arg_value_none: /* args_tail_basic_arg_value_none */
11165#line 2618 "parse.y"
11166 {
11167 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
11168 rb_parser_printf(p, "NODE_SPECIAL");
11169 }
11170 else if (((*yyvaluep).node_args)) {
11171 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
11172 }
11173}
11174#line 11175 "parse.c"
11175 break;
11176
11177 case YYSYMBOL_largs_tail: /* largs_tail */
11178#line 2618 "parse.y"
11179 {
11180 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
11181 rb_parser_printf(p, "NODE_SPECIAL");
11182 }
11183 else if (((*yyvaluep).node_args)) {
11184 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
11185 }
11186}
11187#line 11188 "parse.c"
11188 break;
11189
11190 case YYSYMBOL_f_opt_arg_value: /* f_opt_arg_value */
11191#line 2618 "parse.y"
11192 {
11193 if ((NODE *)((*yyvaluep).node_opt_arg) == (NODE *)-1) {
11194 rb_parser_printf(p, "NODE_SPECIAL");
11195 }
11196 else if (((*yyvaluep).node_opt_arg)) {
11197 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_opt_arg)))));
11198 }
11199}
11200#line 11201 "parse.c"
11201 break;
11202
11203 case YYSYMBOL_f_opt_arg_arg_value: /* f_opt_arg_arg_value */
11204#line 2618 "parse.y"
11205 {
11206 if ((NODE *)((*yyvaluep).node_opt_arg) == (NODE *)-1) {
11207 rb_parser_printf(p, "NODE_SPECIAL");
11208 }
11209 else if (((*yyvaluep).node_opt_arg)) {
11210 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_opt_arg)))));
11211 }
11212}
11213#line 11214 "parse.c"
11214 break;
11215
11216 case YYSYMBOL_opt_args_tail_args_tail_opt_comma: /* opt_args_tail_args_tail_opt_comma */
11217#line 2618 "parse.y"
11218 {
11219 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
11220 rb_parser_printf(p, "NODE_SPECIAL");
11221 }
11222 else if (((*yyvaluep).node_args)) {
11223 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
11224 }
11225}
11226#line 11227 "parse.c"
11227 break;
11228
11229 case YYSYMBOL_args_list_arg_value_opt_args_tail_args_tail_opt_comma: /* args-list_arg_value_opt_args_tail_args_tail_opt_comma */
11230#line 2618 "parse.y"
11231 {
11232 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
11233 rb_parser_printf(p, "NODE_SPECIAL");
11234 }
11235 else if (((*yyvaluep).node_args)) {
11236 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
11237 }
11238}
11239#line 11240 "parse.c"
11240 break;
11241
11242 case YYSYMBOL_f_args_list_args_tail_opt_comma: /* f_args-list_args_tail_opt_comma */
11243#line 2618 "parse.y"
11244 {
11245 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
11246 rb_parser_printf(p, "NODE_SPECIAL");
11247 }
11248 else if (((*yyvaluep).node_args)) {
11249 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
11250 }
11251}
11252#line 11253 "parse.c"
11253 break;
11254
11255 case YYSYMBOL_tail_only_args_args_tail: /* tail-only-args_args_tail */
11256#line 2618 "parse.y"
11257 {
11258 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
11259 rb_parser_printf(p, "NODE_SPECIAL");
11260 }
11261 else if (((*yyvaluep).node_args)) {
11262 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
11263 }
11264}
11265#line 11266 "parse.c"
11266 break;
11267
11268 case YYSYMBOL_f_args: /* f_args */
11269#line 2618 "parse.y"
11270 {
11271 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
11272 rb_parser_printf(p, "NODE_SPECIAL");
11273 }
11274 else if (((*yyvaluep).node_args)) {
11275 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
11276 }
11277}
11278#line 11279 "parse.c"
11279 break;
11280
11281 case YYSYMBOL_opt_args_tail_largs_tail_none: /* opt_args_tail_largs_tail_none */
11282#line 2618 "parse.y"
11283 {
11284 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
11285 rb_parser_printf(p, "NODE_SPECIAL");
11286 }
11287 else if (((*yyvaluep).node_args)) {
11288 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
11289 }
11290}
11291#line 11292 "parse.c"
11292 break;
11293
11294 case YYSYMBOL_args_list_arg_value_opt_args_tail_largs_tail_none: /* args-list_arg_value_opt_args_tail_largs_tail_none */
11295#line 2618 "parse.y"
11296 {
11297 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
11298 rb_parser_printf(p, "NODE_SPECIAL");
11299 }
11300 else if (((*yyvaluep).node_args)) {
11301 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
11302 }
11303}
11304#line 11305 "parse.c"
11305 break;
11306
11307 case YYSYMBOL_f_args_list_largs_tail_none: /* f_args-list_largs_tail_none */
11308#line 2618 "parse.y"
11309 {
11310 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
11311 rb_parser_printf(p, "NODE_SPECIAL");
11312 }
11313 else if (((*yyvaluep).node_args)) {
11314 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
11315 }
11316}
11317#line 11318 "parse.c"
11318 break;
11319
11320 case YYSYMBOL_tail_only_args_largs_tail: /* tail-only-args_largs_tail */
11321#line 2618 "parse.y"
11322 {
11323 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
11324 rb_parser_printf(p, "NODE_SPECIAL");
11325 }
11326 else if (((*yyvaluep).node_args)) {
11327 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
11328 }
11329}
11330#line 11331 "parse.c"
11331 break;
11332
11333 case YYSYMBOL_f_largs: /* f_largs */
11334#line 2618 "parse.y"
11335 {
11336 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
11337 rb_parser_printf(p, "NODE_SPECIAL");
11338 }
11339 else if (((*yyvaluep).node_args)) {
11340 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
11341 }
11342}
11343#line 11344 "parse.c"
11344 break;
11345
11346 case YYSYMBOL_args_forward: /* args_forward */
11347#line 2627 "parse.y"
11348 {
11349 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
11350}
11351#line 11352 "parse.c"
11352 break;
11353
11354 case YYSYMBOL_f_bad_arg: /* f_bad_arg */
11355#line 2627 "parse.y"
11356 {
11357 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
11358}
11359#line 11360 "parse.c"
11360 break;
11361
11362 case YYSYMBOL_f_norm_arg: /* f_norm_arg */
11363#line 2627 "parse.y"
11364 {
11365 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
11366}
11367#line 11368 "parse.c"
11368 break;
11369
11370 case YYSYMBOL_f_arg_asgn: /* f_arg_asgn */
11371#line 2627 "parse.y"
11372 {
11373 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
11374}
11375#line 11376 "parse.c"
11376 break;
11377
11378 case YYSYMBOL_f_arg_item: /* f_arg_item */
11379#line 2618 "parse.y"
11380 {
11381 if ((NODE *)((*yyvaluep).node_args_aux) == (NODE *)-1) {
11382 rb_parser_printf(p, "NODE_SPECIAL");
11383 }
11384 else if (((*yyvaluep).node_args_aux)) {
11385 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args_aux)))));
11386 }
11387}
11388#line 11389 "parse.c"
11389 break;
11390
11391 case YYSYMBOL_f_arg: /* f_arg */
11392#line 2618 "parse.y"
11393 {
11394 if ((NODE *)((*yyvaluep).node_args_aux) == (NODE *)-1) {
11395 rb_parser_printf(p, "NODE_SPECIAL");
11396 }
11397 else if (((*yyvaluep).node_args_aux)) {
11398 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args_aux)))));
11399 }
11400}
11401#line 11402 "parse.c"
11402 break;
11403
11404 case YYSYMBOL_f_label: /* f_label */
11405#line 2627 "parse.y"
11406 {
11407 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
11408}
11409#line 11410 "parse.c"
11410 break;
11411
11412 case YYSYMBOL_f_no_kwarg: /* f_no_kwarg */
11413#line 2627 "parse.y"
11414 {
11415 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
11416}
11417#line 11418 "parse.c"
11418 break;
11419
11420 case YYSYMBOL_f_kwrest: /* f_kwrest */
11421#line 2627 "parse.y"
11422 {
11423 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
11424}
11425#line 11426 "parse.c"
11426 break;
11427
11428 case YYSYMBOL_f_rest_arg: /* f_rest_arg */
11429#line 2627 "parse.y"
11430 {
11431 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
11432}
11433#line 11434 "parse.c"
11434 break;
11435
11436 case YYSYMBOL_f_block_arg: /* f_block_arg */
11437#line 2627 "parse.y"
11438 {
11439 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
11440}
11441#line 11442 "parse.c"
11442 break;
11443
11444 case YYSYMBOL_opt_comma: /* opt_comma */
11445#line 2627 "parse.y"
11446 {
11447 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
11448}
11449#line 11450 "parse.c"
11450 break;
11451
11452 case YYSYMBOL_value_expr_singleton_expr: /* value_expr_singleton_expr */
11453#line 2618 "parse.y"
11454 {
11455 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
11456 rb_parser_printf(p, "NODE_SPECIAL");
11457 }
11458 else if (((*yyvaluep).node)) {
11459 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
11460 }
11461}
11462#line 11463 "parse.c"
11463 break;
11464
11465 case YYSYMBOL_singleton: /* singleton */
11466#line 2618 "parse.y"
11467 {
11468 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
11469 rb_parser_printf(p, "NODE_SPECIAL");
11470 }
11471 else if (((*yyvaluep).node)) {
11472 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
11473 }
11474}
11475#line 11476 "parse.c"
11476 break;
11477
11478 case YYSYMBOL_singleton_expr: /* singleton_expr */
11479#line 2618 "parse.y"
11480 {
11481 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
11482 rb_parser_printf(p, "NODE_SPECIAL");
11483 }
11484 else if (((*yyvaluep).node)) {
11485 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
11486 }
11487}
11488#line 11489 "parse.c"
11489 break;
11490
11491 case YYSYMBOL_assoc_list: /* assoc_list */
11492#line 2618 "parse.y"
11493 {
11494 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
11495 rb_parser_printf(p, "NODE_SPECIAL");
11496 }
11497 else if (((*yyvaluep).node)) {
11498 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
11499 }
11500}
11501#line 11502 "parse.c"
11502 break;
11503
11504 case YYSYMBOL_assocs: /* assocs */
11505#line 2618 "parse.y"
11506 {
11507 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
11508 rb_parser_printf(p, "NODE_SPECIAL");
11509 }
11510 else if (((*yyvaluep).node)) {
11511 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
11512 }
11513}
11514#line 11515 "parse.c"
11515 break;
11516
11517 case YYSYMBOL_assoc: /* assoc */
11518#line 2618 "parse.y"
11519 {
11520 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
11521 rb_parser_printf(p, "NODE_SPECIAL");
11522 }
11523 else if (((*yyvaluep).node)) {
11524 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
11525 }
11526}
11527#line 11528 "parse.c"
11528 break;
11529
11530 case YYSYMBOL_operation2: /* operation2 */
11531#line 2627 "parse.y"
11532 {
11533 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
11534}
11535#line 11536 "parse.c"
11536 break;
11537
11538 case YYSYMBOL_operation3: /* operation3 */
11539#line 2627 "parse.y"
11540 {
11541 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
11542}
11543#line 11544 "parse.c"
11544 break;
11545
11546 case YYSYMBOL_dot_or_colon: /* dot_or_colon */
11547#line 2627 "parse.y"
11548 {
11549 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
11550}
11551#line 11552 "parse.c"
11552 break;
11553
11554 case YYSYMBOL_call_op: /* call_op */
11555#line 2627 "parse.y"
11556 {
11557 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
11558}
11559#line 11560 "parse.c"
11560 break;
11561
11562 case YYSYMBOL_call_op2: /* call_op2 */
11563#line 2627 "parse.y"
11564 {
11565 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
11566}
11567#line 11568 "parse.c"
11568 break;
11569
11570 case YYSYMBOL_none: /* none */
11571#line 2618 "parse.y"
11572 {
11573 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
11574 rb_parser_printf(p, "NODE_SPECIAL");
11575 }
11576 else if (((*yyvaluep).node)) {
11577 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
11578 }
11579}
11580#line 11581 "parse.c"
11581 break;
11582
11583 default:
11584 break;
11585 }
11586 YY_IGNORE_MAYBE_UNINITIALIZED_END
11587}
11588
11589
11590/*---------------------------.
11591| Print this symbol on YYO. |
11592`---------------------------*/
11593
11594static void
11595yy_symbol_print (FILE *yyo,
11596 yysymbol_kind_t yykind, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp, struct parser_params *p)
11597{
11598 YYFPRINTF (yyo, "%s %s (",
11599 yykind < YYNTOKENS ? "token" : "nterm", yysymbol_name (yykind));
11600
11601 YYLOCATION_PRINT (yyo, yylocationp, p);
11602 YYFPRINTF (yyo, ": ");
11603 yy_symbol_value_print (yyo, yykind, yyvaluep, yylocationp, p);
11604 YYFPRINTF (yyo, ")");
11605}
11606
11607/*------------------------------------------------------------------.
11608| yy_stack_print -- Print the state stack from its BOTTOM up to its |
11609| TOP (included). |
11610`------------------------------------------------------------------*/
11611
11612static void
11613yy_stack_print (yy_state_t *yybottom, yy_state_t *yytop, struct parser_params *p)
11614{
11615 YYFPRINTF (stderr, "Stack now");
11616 for (; yybottom <= yytop; yybottom++)
11617 {
11618 int yybot = *yybottom;
11619 YYFPRINTF (stderr, " %d", yybot);
11620 }
11621 YYFPRINTF (stderr, "\n");
11622}
11623
11624# define YY_STACK_PRINT(Bottom, Top, p) \
11625do { \
11626 if (yydebug) \
11627 yy_stack_print ((Bottom), (Top), p); \
11628} while (0)
11629
11630
11631/*------------------------------------------------.
11632| Report that the YYRULE is going to be reduced. |
11633`------------------------------------------------*/
11634
11635static void
11636yy_reduce_print (yy_state_t *yyssp, YYSTYPE *yyvsp, YYLTYPE *yylsp,
11637 int yyrule, struct parser_params *p)
11638{
11639 int yylno = yyrline[yyrule];
11640 int yynrhs = yyr2[yyrule];
11641 int yyi;
11642 YYFPRINTF (stderr, "Reducing stack by rule %d (line %d):\n",
11643 yyrule - 1, yylno);
11644 /* The symbols being reduced. */
11645 for (yyi = 0; yyi < yynrhs; yyi++)
11646 {
11647 YYFPRINTF (stderr, " $%d = ", yyi + 1);
11648 yy_symbol_print (stderr,
11649 YY_ACCESSING_SYMBOL (+yyssp[yyi + 1 - yynrhs]),
11650 &yyvsp[(yyi + 1) - (yynrhs)],
11651 &(yylsp[(yyi + 1) - (yynrhs)]), p);
11652 YYFPRINTF (stderr, "\n");
11653 }
11654}
11655
11656# define YY_REDUCE_PRINT(Rule, p) \
11657do { \
11658 if (yydebug) \
11659 yy_reduce_print (yyssp, yyvsp, yylsp, Rule, p); \
11660} while (0)
11661
11662/* Nonzero means print parse trace. It is left uninitialized so that
11663 multiple parsers can coexist. */
11664#ifndef yydebug
11665int yydebug;
11666#endif
11667#else /* !YYDEBUG */
11668# define YYDPRINTF(Args) ((void) 0)
11669# define YY_SYMBOL_PRINT(Title, Kind, Value, Location, p)
11670# define YY_STACK_PRINT(Bottom, Top, p)
11671# define YY_REDUCE_PRINT(Rule, p)
11672#endif /* !YYDEBUG */
11673
11674
11675/* YYINITDEPTH -- initial size of the parser's stacks. */
11676#ifndef YYINITDEPTH
11677# define YYINITDEPTH 200
11678#endif
11679
11680/* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
11681 if the built-in stack extension method is used).
11682
11683 Do not make this value too large; the results are undefined if
11684 YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
11685 evaluated with infinite-precision integer arithmetic. */
11686
11687#ifndef YYMAXDEPTH
11688# define YYMAXDEPTH 10000
11689#endif
11690
11691
11692/* Context of a parse error. */
11693typedef struct
11694{
11695 yy_state_t *yyssp;
11696 yysymbol_kind_t yytoken;
11697 YYLTYPE *yylloc;
11698} yypcontext_t;
11699
11700/* Put in YYARG at most YYARGN of the expected tokens given the
11701 current YYCTX, and return the number of tokens stored in YYARG. If
11702 YYARG is null, return the number of expected tokens (guaranteed to
11703 be less than YYNTOKENS). Return YYENOMEM on memory exhaustion.
11704 Return 0 if there are more than YYARGN expected tokens, yet fill
11705 YYARG up to YYARGN. */
11706static int
11707yypcontext_expected_tokens (const yypcontext_t *yyctx,
11708 yysymbol_kind_t yyarg[], int yyargn)
11709{
11710 /* Actual size of YYARG. */
11711 int yycount = 0;
11712 int yyn = yypact[+*yyctx->yyssp];
11713 if (!yypact_value_is_default (yyn))
11714 {
11715 /* Start YYX at -YYN if negative to avoid negative indexes in
11716 YYCHECK. In other words, skip the first -YYN actions for
11717 this state because they are default actions. */
11718 int yyxbegin = yyn < 0 ? -yyn : 0;
11719 /* Stay within bounds of both yycheck and yytname. */
11720 int yychecklim = YYLAST - yyn + 1;
11721 int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
11722 int yyx;
11723 for (yyx = yyxbegin; yyx < yyxend; ++yyx)
11724 if (yycheck[yyx + yyn] == yyx && yyx != YYSYMBOL_YYerror
11725 && !yytable_value_is_error (yytable[yyx + yyn]))
11726 {
11727 if (!yyarg)
11728 ++yycount;
11729 else if (yycount == yyargn)
11730 return 0;
11731 else
11732 yyarg[yycount++] = YY_CAST (yysymbol_kind_t, yyx);
11733 }
11734 }
11735 if (yyarg && yycount == 0 && 0 < yyargn)
11736 yyarg[0] = YYSYMBOL_YYEMPTY;
11737 return yycount;
11738}
11739
11740
11741
11742
11743#ifndef yystrlen
11744# if defined __GLIBC__ && defined _STRING_H
11745# define yystrlen(S) (YY_CAST (YYPTRDIFF_T, strlen (S)))
11746# else
11747/* Return the length of YYSTR. */
11748static YYPTRDIFF_T
11749yystrlen (const char *yystr)
11750{
11751 YYPTRDIFF_T yylen;
11752 for (yylen = 0; yystr[yylen]; yylen++)
11753 continue;
11754 return yylen;
11755}
11756# endif
11757#endif
11758
11759#ifndef yystpcpy
11760# if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
11761# define yystpcpy stpcpy
11762# else
11763/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
11764 YYDEST. */
11765static char *
11766yystpcpy (char *yydest, const char *yysrc)
11767{
11768 char *yyd = yydest;
11769 const char *yys = yysrc;
11770
11771 while ((*yyd++ = *yys++) != '\0')
11772 continue;
11773
11774 return yyd - 1;
11775}
11776# endif
11777#endif
11778
11779#ifndef yytnamerr
11780/* Copy to YYRES the contents of YYSTR after stripping away unnecessary
11781 quotes and backslashes, so that it's suitable for yyerror. The
11782 heuristic is that double-quoting is unnecessary unless the string
11783 contains an apostrophe, a comma, or backslash (other than
11784 backslash-backslash). YYSTR is taken from yytname. If YYRES is
11785 null, do not copy; instead, return the length of what the result
11786 would have been. */
11787static YYPTRDIFF_T
11788yytnamerr (char *yyres, const char *yystr)
11789{
11790 if (*yystr == '"')
11791 {
11792 YYPTRDIFF_T yyn = 0;
11793 char const *yyp = yystr;
11794 for (;;)
11795 switch (*++yyp)
11796 {
11797 case '\'':
11798 case ',':
11799 goto do_not_strip_quotes;
11800
11801 case '\\':
11802 if (*++yyp != '\\')
11803 goto do_not_strip_quotes;
11804 else
11805 goto append;
11806
11807 append:
11808 default:
11809 if (yyres)
11810 yyres[yyn] = *yyp;
11811 yyn++;
11812 break;
11813
11814 case '"':
11815 if (yyres)
11816 yyres[yyn] = '\0';
11817 return yyn;
11818 }
11819 do_not_strip_quotes: ;
11820 }
11821
11822 if (yyres)
11823 return yystpcpy (yyres, yystr) - yyres;
11824 else
11825 return yystrlen (yystr);
11826}
11827#endif
11828
11829
11830static int
11831yy_syntax_error_arguments (const yypcontext_t *yyctx,
11832 yysymbol_kind_t yyarg[], int yyargn)
11833{
11834 /* Actual size of YYARG. */
11835 int yycount = 0;
11836 /* There are many possibilities here to consider:
11837 - If this state is a consistent state with a default action, then
11838 the only way this function was invoked is if the default action
11839 is an error action. In that case, don't check for expected
11840 tokens because there are none.
11841 - The only way there can be no lookahead present (in yychar) is if
11842 this state is a consistent state with a default action. Thus,
11843 detecting the absence of a lookahead is sufficient to determine
11844 that there is no unexpected or expected token to report. In that
11845 case, just report a simple "syntax error".
11846 - Don't assume there isn't a lookahead just because this state is a
11847 consistent state with a default action. There might have been a
11848 previous inconsistent state, consistent state with a non-default
11849 action, or user semantic action that manipulated yychar.
11850 - Of course, the expected token list depends on states to have
11851 correct lookahead information, and it depends on the parser not
11852 to perform extra reductions after fetching a lookahead from the
11853 scanner and before detecting a syntax error. Thus, state merging
11854 (from LALR or IELR) and default reductions corrupt the expected
11855 token list. However, the list is correct for canonical LR with
11856 one exception: it will still contain any token that will not be
11857 accepted due to an error action in a later state.
11858 */
11859 if (yyctx->yytoken != YYSYMBOL_YYEMPTY)
11860 {
11861 int yyn;
11862 if (yyarg)
11863 yyarg[yycount] = yyctx->yytoken;
11864 ++yycount;
11865 yyn = yypcontext_expected_tokens (yyctx,
11866 yyarg ? yyarg + 1 : yyarg, yyargn - 1);
11867 if (yyn == YYENOMEM)
11868 return YYENOMEM;
11869 else
11870 yycount += yyn;
11871 }
11872 return yycount;
11873}
11874
11875/* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message
11876 about the unexpected token YYTOKEN for the state stack whose top is
11877 YYSSP.
11878
11879 Return 0 if *YYMSG was successfully written. Return -1 if *YYMSG is
11880 not large enough to hold the message. In that case, also set
11881 *YYMSG_ALLOC to the required number of bytes. Return YYENOMEM if the
11882 required number of bytes is too large to store. */
11883static int
11884yysyntax_error (YYPTRDIFF_T *yymsg_alloc, char **yymsg,
11885 const yypcontext_t *yyctx, struct parser_params *p)
11886{
11887 enum { YYARGS_MAX = 5 };
11888 /* Internationalized format string. */
11889 const char *yyformat = YY_NULLPTR;
11890 /* Arguments of yyformat: reported tokens (one for the "unexpected",
11891 one per "expected"). */
11892 yysymbol_kind_t yyarg[YYARGS_MAX];
11893 /* Cumulated lengths of YYARG. */
11894 YYPTRDIFF_T yysize = 0;
11895
11896 /* Actual size of YYARG. */
11897 int yycount = yy_syntax_error_arguments (yyctx, yyarg, YYARGS_MAX);
11898 if (yycount == YYENOMEM)
11899 return YYENOMEM;
11900
11901 switch (yycount)
11902 {
11903#define YYCASE_(N, S) \
11904 case N: \
11905 yyformat = S; \
11906 break
11907 default: /* Avoid compiler warnings. */
11908 YYCASE_(0, YY_("syntax error"));
11909 YYCASE_(1, YY_("syntax error, unexpected %s"));
11910 YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s"));
11911 YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s"));
11912 YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s"));
11913 YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"));
11914#undef YYCASE_
11915 }
11916
11917 /* Compute error message size. Don't count the "%s"s, but reserve
11918 room for the terminator. */
11919 yysize = yystrlen (yyformat) - 2 * yycount + 1;
11920 {
11921 int yyi;
11922 for (yyi = 0; yyi < yycount; ++yyi)
11923 {
11924 YYPTRDIFF_T yysize1
11925 = yysize + yytnamerr (YY_NULLPTR, yytname[yyarg[yyi]]);
11926 if (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM)
11927 yysize = yysize1;
11928 else
11929 return YYENOMEM;
11930 }
11931 }
11932
11933 if (*yymsg_alloc < yysize)
11934 {
11935 *yymsg_alloc = 2 * yysize;
11936 if (! (yysize <= *yymsg_alloc
11937 && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM))
11938 *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM;
11939 return -1;
11940 }
11941
11942 /* Avoid sprintf, as that infringes on the user's name space.
11943 Don't have undefined behavior even if the translation
11944 produced a string with the wrong number of "%s"s. */
11945 {
11946 char *yyp = *yymsg;
11947 int yyi = 0;
11948 while ((*yyp = *yyformat) != '\0')
11949 if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount)
11950 {
11951 yyp += yytnamerr (yyp, yytname[yyarg[yyi++]]);
11952 yyformat += 2;
11953 }
11954 else
11955 {
11956 ++yyp;
11957 ++yyformat;
11958 }
11959 }
11960 return 0;
11961}
11962
11963
11964/*-----------------------------------------------.
11965| Release the memory associated to this symbol. |
11966`-----------------------------------------------*/
11967
11968static void
11969yydestruct (const char *yymsg,
11970 yysymbol_kind_t yykind, YYSTYPE *yyvaluep, YYLTYPE *yylocationp, struct parser_params *p)
11971{
11972 YY_USE (yyvaluep);
11973 YY_USE (yylocationp);
11974 YY_USE (p);
11975 if (!yymsg)
11976 yymsg = "Deleting";
11977 YY_SYMBOL_PRINT (yymsg, yykind, yyvaluep, yylocationp, p);
11978
11979 YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
11980 switch (yykind)
11981 {
11982 case YYSYMBOL_258_16: /* @16 */
11983#line 2655 "parse.y"
11984 {
11985 if (CASE_LABELS_ENABLED_P(((*yyvaluep).labels))) st_free_table(((*yyvaluep).labels));
11986}
11987#line 11988 "parse.c"
11988 break;
11989
11990 case YYSYMBOL_259_17: /* @17 */
11991#line 2655 "parse.y"
11992 {
11993 if (CASE_LABELS_ENABLED_P(((*yyvaluep).labels))) st_free_table(((*yyvaluep).labels));
11994}
11995#line 11996 "parse.c"
11996 break;
11997
11998 default:
11999 break;
12000 }
12001 YY_IGNORE_MAYBE_UNINITIALIZED_END
12002}
12003
12004
12005
12006
12007
12008
12009/*----------.
12010| yyparse. |
12011`----------*/
12012
12013int
12014yyparse (struct parser_params *p)
12015{
12016/* Lookahead token kind. */
12017int yychar;
12018
12019
12020/* The semantic value of the lookahead symbol. */
12021/* Default value used for initialization, for pacifying older GCCs
12022 or non-GCC compilers. */
12023#ifdef __cplusplus
12024static const YYSTYPE yyval_default = {};
12025(void) yyval_default;
12026#else
12027YY_INITIAL_VALUE (static const YYSTYPE yyval_default;)
12028#endif
12029YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default);
12030
12031/* Location data for the lookahead symbol. */
12032static const YYLTYPE yyloc_default
12033# if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL
12034 = { 1, 1, 1, 1 }
12035# endif
12036;
12037YYLTYPE yylloc = yyloc_default;
12038
12039 /* Number of syntax errors so far. */
12040 int yynerrs = 0;
12041 YY_USE (yynerrs); /* Silence compiler warning. */
12042
12043 yy_state_fast_t yystate = 0;
12044 /* Number of tokens to shift before error messages enabled. */
12045 int yyerrstatus = 0;
12046
12047 /* Refer to the stacks through separate pointers, to allow yyoverflow
12048 to reallocate them elsewhere. */
12049
12050 /* Their size. */
12051 YYPTRDIFF_T yystacksize = YYINITDEPTH;
12052
12053 /* The state stack: array, bottom, top. */
12054 yy_state_t yyssa[YYINITDEPTH];
12055 yy_state_t *yyss = yyssa;
12056 yy_state_t *yyssp = yyss;
12057
12058 /* The semantic value stack: array, bottom, top. */
12059 YYSTYPE yyvsa[YYINITDEPTH];
12060 YYSTYPE *yyvs = yyvsa;
12061 YYSTYPE *yyvsp = yyvs;
12062
12063 /* The location stack: array, bottom, top. */
12064 YYLTYPE yylsa[YYINITDEPTH];
12065 YYLTYPE *yyls = yylsa;
12066 YYLTYPE *yylsp = yyls;
12067
12068 int yyn;
12069 /* The return value of yyparse. */
12070 int yyresult;
12071 /* Lookahead symbol kind. */
12072 yysymbol_kind_t yytoken = YYSYMBOL_YYEMPTY;
12073 /* The variables used to return semantic value and location from the
12074 action routines. */
12075 YYSTYPE yyval;
12076 YYLTYPE yyloc;
12077
12078 /* The locations where the error started and ended. */
12079 YYLTYPE yyerror_range[3];
12080
12081 /* Buffer for error messages, and its allocated size. */
12082 char yymsgbuf[128];
12083 char *yymsg = yymsgbuf;
12084 YYPTRDIFF_T yymsg_alloc = sizeof yymsgbuf;
12085
12086#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N), yylsp -= (N))
12087
12088 /* The number of symbols on the RHS of the reduced rule.
12089 Keep to zero when no symbol should be popped. */
12090 int yylen = 0;
12091
12092 YYDPRINTF ((stderr, "Starting parse\n"));
12093
12094 yychar = YYEMPTY; /* Cause a token to be read. */
12095
12096
12097 /* User initialization code. */
12098#line 2662 "parse.y"
12099 {
12100 RUBY_SET_YYLLOC_OF_NONE(yylloc);
12101}
12102
12103#line 12104 "parse.c"
12104
12105 yylsp[0] = yylloc;
12106 goto yysetstate;
12107
12108
12109/*------------------------------------------------------------.
12110| yynewstate -- push a new state, which is found in yystate. |
12111`------------------------------------------------------------*/
12112yynewstate:
12113 /* In all cases, when you get here, the value and location stacks
12114 have just been pushed. So pushing a state here evens the stacks. */
12115 yyssp++;
12116
12117
12118/*--------------------------------------------------------------------.
12119| yysetstate -- set current state (the top of the stack) to yystate. |
12120`--------------------------------------------------------------------*/
12121yysetstate:
12122 YYDPRINTF ((stderr, "Entering state %d\n", yystate));
12123 YY_ASSERT (0 <= yystate && yystate < YYNSTATES);
12124 YY_IGNORE_USELESS_CAST_BEGIN
12125 *yyssp = YY_CAST (yy_state_t, yystate);
12126 YY_IGNORE_USELESS_CAST_END
12127 YY_STACK_PRINT (yyss, yyssp, p);
12128
12129 if (yyss + yystacksize - 1 <= yyssp)
12130#if !defined yyoverflow && !defined YYSTACK_RELOCATE
12131 YYNOMEM;
12132#else
12133 {
12134 /* Get the current used size of the three stacks, in elements. */
12135 YYPTRDIFF_T yysize = yyssp - yyss + 1;
12136
12137# if defined yyoverflow
12138 {
12139 /* Give user a chance to reallocate the stack. Use copies of
12140 these so that the &'s don't force the real ones into
12141 memory. */
12142 yy_state_t *yyss1 = yyss;
12143 YYSTYPE *yyvs1 = yyvs;
12144 YYLTYPE *yyls1 = yyls;
12145
12146 /* Each stack pointer address is followed by the size of the
12147 data in use in that stack, in bytes. This used to be a
12148 conditional around just the two extra args, but that might
12149 be undefined if yyoverflow is a macro. */
12150 yyoverflow (YY_("memory exhausted"),
12151 &yyss1, yysize * YYSIZEOF (*yyssp),
12152 &yyvs1, yysize * YYSIZEOF (*yyvsp),
12153 &yyls1, yysize * YYSIZEOF (*yylsp),
12154 &yystacksize);
12155 yyss = yyss1;
12156 yyvs = yyvs1;
12157 yyls = yyls1;
12158 }
12159# else /* defined YYSTACK_RELOCATE */
12160 /* Extend the stack our own way. */
12161 if (YYMAXDEPTH <= yystacksize)
12162 YYNOMEM;
12163 yystacksize *= 2;
12164 if (YYMAXDEPTH < yystacksize)
12165 yystacksize = YYMAXDEPTH;
12166
12167 {
12168 yy_state_t *yyss1 = yyss;
12169 union yyalloc *yyptr =
12170 YY_CAST (union yyalloc *,
12171 YYSTACK_ALLOC (YY_CAST (YYSIZE_T, YYSTACK_BYTES (yystacksize))));
12172 if (! yyptr)
12173 YYNOMEM;
12174 YYSTACK_RELOCATE (yyss_alloc, yyss);
12175 YYSTACK_RELOCATE (yyvs_alloc, yyvs);
12176 YYSTACK_RELOCATE (yyls_alloc, yyls);
12177# undef YYSTACK_RELOCATE
12178 if (yyss1 != yyssa)
12179 YYSTACK_FREE (yyss1);
12180 }
12181# endif
12182
12183 yyssp = yyss + yysize - 1;
12184 yyvsp = yyvs + yysize - 1;
12185 yylsp = yyls + yysize - 1;
12186
12187 YY_IGNORE_USELESS_CAST_BEGIN
12188 YYDPRINTF ((stderr, "Stack size increased to %ld\n",
12189 YY_CAST (long, yystacksize)));
12190 YY_IGNORE_USELESS_CAST_END
12191
12192 if (yyss + yystacksize - 1 <= yyssp)
12193 YYABORT;
12194 }
12195#endif /* !defined yyoverflow && !defined YYSTACK_RELOCATE */
12196
12197
12198 if (yystate == YYFINAL)
12199 YYACCEPT;
12200
12201 goto yybackup;
12202
12203
12204/*-----------.
12205| yybackup. |
12206`-----------*/
12207yybackup:
12208 /* Do appropriate processing given the current state. Read a
12209 lookahead token if we need one and don't already have one. */
12210
12211 /* First try to decide what to do without reference to lookahead token. */
12212 yyn = yypact[yystate];
12213 if (yypact_value_is_default (yyn))
12214 goto yydefault;
12215
12216 /* Not known => get a lookahead token if don't already have one. */
12217
12218 /* YYCHAR is either empty, or end-of-input, or a valid lookahead. */
12219 if (yychar == YYEMPTY)
12220 {
12221 YYDPRINTF ((stderr, "Reading a token\n"));
12222 yychar = yylex (&yylval, &yylloc, p);
12223 }
12224
12225 if (yychar <= END_OF_INPUT)
12226 {
12227 yychar = END_OF_INPUT;
12228 yytoken = YYSYMBOL_YYEOF;
12229 YYDPRINTF ((stderr, "Now at end of input.\n"));
12230 }
12231 else if (yychar == YYerror)
12232 {
12233 /* The scanner already issued an error message, process directly
12234 to error recovery. But do not keep the error token as
12235 lookahead, it is too special and may lead us to an endless
12236 loop in error recovery. */
12237 yychar = YYUNDEF;
12238 yytoken = YYSYMBOL_YYerror;
12239 yyerror_range[1] = yylloc;
12240 goto yyerrlab1;
12241 }
12242 else
12243 {
12244 yytoken = YYTRANSLATE (yychar);
12245 YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc, p);
12246 }
12247
12248 /* If the proper action on seeing token YYTOKEN is to reduce or to
12249 detect an error, take that action. */
12250 yyn += yytoken;
12251 if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
12252 goto yydefault;
12253 yyn = yytable[yyn];
12254 if (yyn <= 0)
12255 {
12256 if (yytable_value_is_error (yyn))
12257 goto yyerrlab;
12258 yyn = -yyn;
12259 goto yyreduce;
12260 }
12261
12262 /* Count tokens shifted since error; after three, turn off error
12263 status. */
12264 if (yyerrstatus)
12265 yyerrstatus--;
12266
12267 /* Shift the lookahead token. */
12268 YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc, p);
12269 yystate = yyn;
12270 YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
12271 *++yyvsp = yylval;
12272 YY_IGNORE_MAYBE_UNINITIALIZED_END
12273 *++yylsp = yylloc;
12274 /* %after-shift code. */
12275#line 2665 "parse.y"
12276 {after_shift(p);}
12277#line 12278 "parse.c"
12278
12279
12280 /* Discard the shifted token. */
12281 yychar = YYEMPTY;
12282 goto yynewstate;
12283
12284
12285/*-----------------------------------------------------------.
12286| yydefault -- do the default action for the current state. |
12287`-----------------------------------------------------------*/
12288yydefault:
12289 yyn = yydefact[yystate];
12290 if (yyn == 0)
12291 goto yyerrlab;
12292 goto yyreduce;
12293
12294
12295/*-----------------------------.
12296| yyreduce -- do a reduction. |
12297`-----------------------------*/
12298yyreduce:
12299 /* yyn is the number of a rule to reduce with. */
12300 yylen = yyr2[yyn];
12301
12302 /* If YYLEN is nonzero, implement the default value of the action:
12303 '$$ = $1'.
12304
12305 Otherwise, the following line sets YYVAL to garbage.
12306 This behavior is undocumented and Bison
12307 users should not rely upon it. Assigning to YYVAL
12308 unconditionally makes the parser a bit smaller, and it avoids a
12309 GCC warning that YYVAL may be used uninitialized. */
12310 yyval = yyvsp[1-yylen];
12311 /* %before-reduce function. */
12312#line 2666 "parse.y"
12313 {before_reduce(yylen, p);}
12314#line 12315 "parse.c"
12315
12316
12317 /* Default location. */
12318 YYLLOC_DEFAULT (yyloc, (yylsp - yylen), yylen);
12319 yyerror_range[1] = yyloc;
12320 YY_REDUCE_PRINT (yyn, p);
12321 switch (yyn)
12322 {
12323 case 2: /* $@1: %empty */
12324#line 3170 "parse.y"
12325 {
12326 SET_LEX_STATE(EXPR_BEG);
12327 local_push(p, ifndef_ripper(1)+0);
12328 /* jumps are possible in the top-level loop. */
12329 if (!ifndef_ripper(p->do_loop) + 0) init_block_exit(p);
12330 }
12331#line 12332 "parse.c"
12332 break;
12333
12334 case 5: /* compstmt_top_stmts: top_stmts option_terms */
12335#line 2985 "parse.y"
12336 {
12337 void_stmts(p, (yyval.node) = (yyvsp[-1].node));
12338 }
12339#line 12340 "parse.c"
12340 break;
12341
12342 case 6: /* program: $@1 compstmt_top_stmts */
12343#line 3177 "parse.y"
12344 {
12345 if ((yyvsp[0].node) && !compile_for_eval) {
12346 NODE *node = (yyvsp[0].node);
12347 /* last expression should not be void */
12348 if (nd_type_p(node, NODE_BLOCK)) {
12349 while (RNODE_BLOCK(node)->nd_next) {
12350 node = RNODE_BLOCK(node)->nd_next;
12351 }
12352 node = RNODE_BLOCK(node)->nd_head;
12353 }
12354 node = remove_begin(node);
12355 void_expr(p, node);
12356 }
12357 p->eval_tree = NEW_SCOPE(0, block_append(p, p->eval_tree, (yyvsp[0].node)), NULL, &(yyloc));
12358 /*% ripper[final]: program!($:2) %*/
12359 local_pop(p);
12360 }
12361#line 12362 "parse.c"
12362 break;
12363
12364 case 7: /* top_stmts: none */
12365#line 3197 "parse.y"
12366 {
12367 (yyval.node) = NEW_BEGIN(0, &(yyloc));
12368 /*% ripper: stmts_add!(stmts_new!, void_stmt!) %*/
12369 }
12370#line 12371 "parse.c"
12371 break;
12372
12373 case 8: /* top_stmts: top_stmt */
12374#line 3202 "parse.y"
12375 {
12376 (yyval.node) = newline_node((yyvsp[0].node));
12377 /*% ripper: stmts_add!(stmts_new!, $:1) %*/
12378 }
12379#line 12380 "parse.c"
12380 break;
12381
12382 case 9: /* top_stmts: top_stmts terms top_stmt */
12383#line 3207 "parse.y"
12384 {
12385 (yyval.node) = block_append(p, (yyvsp[-2].node), newline_node((yyvsp[0].node)));
12386 /*% ripper: stmts_add!($:1, $:3) %*/
12387 }
12388#line 12389 "parse.c"
12389 break;
12390
12391 case 10: /* top_stmt: stmt */
12392#line 3214 "parse.y"
12393 {
12394 clear_block_exit(p, true);
12395 (yyval.node) = (yyvsp[0].node);
12396 }
12397#line 12398 "parse.c"
12398 break;
12399
12400 case 11: /* top_stmt: "'BEGIN'" begin_block */
12401#line 3219 "parse.y"
12402 {
12403 (yyval.node) = (yyvsp[0].node);
12404 /*% ripper: $:2 %*/
12405 }
12406#line 12407 "parse.c"
12407 break;
12408
12409 case 12: /* block_open: '{' */
12410#line 3225 "parse.y"
12411 {(yyval.node_exits) = init_block_exit(p);}
12412#line 12413 "parse.c"
12413 break;
12414
12415 case 13: /* begin_block: block_open compstmt_top_stmts '}' */
12416#line 3228 "parse.y"
12417 {
12418 restore_block_exit(p, (yyvsp[-2].node_exits));
12419 p->eval_tree_begin = block_append(p, p->eval_tree_begin,
12420 NEW_BEGIN((yyvsp[-1].node), &(yyloc)));
12421 (yyval.node) = NEW_BEGIN(0, &(yyloc));
12422 /*% ripper: BEGIN!($:compstmt) %*/
12423 }
12424#line 12425 "parse.c"
12425 break;
12426
12427 case 14: /* compstmt_stmts: stmts option_terms */
12428#line 2985 "parse.y"
12429 {
12430 void_stmts(p, (yyval.node) = (yyvsp[-1].node));
12431 }
12432#line 12433 "parse.c"
12433 break;
12434
12435 case 15: /* $@2: %empty */
12436#line 3241 "parse.y"
12437 {
12438 if (!(yyvsp[-1].node)) yyerror1(&(yylsp[0]), "else without rescue is useless");
12439 next_rescue_context(&p->ctxt, &(yyvsp[-2].ctxt), after_else);
12440 }
12441#line 12442 "parse.c"
12442 break;
12443
12444 case 16: /* $@3: %empty */
12445#line 3246 "parse.y"
12446 {
12447 next_rescue_context(&p->ctxt, &(yyvsp[-4].ctxt), after_ensure);
12448 }
12449#line 12450 "parse.c"
12450 break;
12451
12452 case 17: /* bodystmt: compstmt_stmts lex_ctxt opt_rescue k_else $@2 compstmt_stmts $@3 opt_ensure */
12453#line 3250 "parse.y"
12454 {
12455 (yyval.node) = new_bodystmt(p, (yyvsp[-7].node), (yyvsp[-5].node), (yyvsp[-2].node), (yyvsp[0].node), &(yyloc));
12456 /*% ripper: bodystmt!($:body, $:opt_rescue, $:elsebody, $:opt_ensure) %*/
12457 }
12458#line 12459 "parse.c"
12459 break;
12460
12461 case 18: /* $@4: %empty */
12462#line 3257 "parse.y"
12463 {
12464 next_rescue_context(&p->ctxt, &(yyvsp[-1].ctxt), after_ensure);
12465 }
12466#line 12467 "parse.c"
12467 break;
12468
12469 case 19: /* bodystmt: compstmt_stmts lex_ctxt opt_rescue $@4 opt_ensure */
12470#line 3261 "parse.y"
12471 {
12472 (yyval.node) = new_bodystmt(p, (yyvsp[-4].node), (yyvsp[-2].node), 0, (yyvsp[0].node), &(yyloc));
12473 /*% ripper: bodystmt!($:body, $:opt_rescue, Qnil, $:opt_ensure) %*/
12474 }
12475#line 12476 "parse.c"
12476 break;
12477
12478 case 20: /* stmts: none */
12479#line 3268 "parse.y"
12480 {
12481 (yyval.node) = NEW_BEGIN(0, &(yyloc));
12482 /*% ripper: stmts_add!(stmts_new!, void_stmt!) %*/
12483 }
12484#line 12485 "parse.c"
12485 break;
12486
12487 case 21: /* stmts: stmt_or_begin */
12488#line 3273 "parse.y"
12489 {
12490 (yyval.node) = newline_node((yyvsp[0].node));
12491 /*% ripper: stmts_add!(stmts_new!, $:1) %*/
12492 }
12493#line 12494 "parse.c"
12494 break;
12495
12496 case 22: /* stmts: stmts terms stmt_or_begin */
12497#line 3278 "parse.y"
12498 {
12499 (yyval.node) = block_append(p, (yyvsp[-2].node), newline_node((yyvsp[0].node)));
12500 /*% ripper: stmts_add!($:1, $:3) %*/
12501 }
12502#line 12503 "parse.c"
12503 break;
12504
12505 case 24: /* $@5: %empty */
12506#line 3286 "parse.y"
12507 {
12508 yyerror1(&(yylsp[0]), "BEGIN is permitted only at toplevel");
12509 }
12510#line 12511 "parse.c"
12511 break;
12512
12513 case 25: /* stmt_or_begin: "'BEGIN'" $@5 begin_block */
12514#line 3290 "parse.y"
12515 {
12516 (yyval.node) = (yyvsp[0].node);
12517 }
12518#line 12519 "parse.c"
12519 break;
12520
12521 case 26: /* allow_exits: %empty */
12522#line 3295 "parse.y"
12523 {(yyval.node_exits) = allow_block_exit(p);}
12524#line 12525 "parse.c"
12525 break;
12526
12527 case 27: /* k_END: "'END'" lex_ctxt */
12528#line 3298 "parse.y"
12529 {
12530 (yyval.ctxt) = (yyvsp[0].ctxt);
12531 p->ctxt.in_rescue = before_rescue;
12532 /*% ripper: $:2 %*/
12533 }
12534#line 12535 "parse.c"
12535 break;
12536
12537 case 28: /* $@6: %empty */
12538#line 3304 "parse.y"
12539 {SET_LEX_STATE(EXPR_FNAME|EXPR_FITEM);}
12540#line 12541 "parse.c"
12541 break;
12542
12543 case 29: /* stmt: "'alias'" fitem $@6 fitem */
12544#line 3305 "parse.y"
12545 {
12546 (yyval.node) = NEW_ALIAS((yyvsp[-2].node), (yyvsp[0].node), &(yyloc), &(yylsp[-3]));
12547 /*% ripper: alias!($:new, $:old) %*/
12548 }
12549#line 12550 "parse.c"
12550 break;
12551
12552 case 30: /* stmt: "'alias'" "global variable" "global variable" */
12553#line 3310 "parse.y"
12554 {
12555 (yyval.node) = NEW_VALIAS((yyvsp[-1].id), (yyvsp[0].id), &(yyloc), &(yylsp[-2]));
12556 /*% ripper: var_alias!($:new, $:old) %*/
12557 }
12558#line 12559 "parse.c"
12559 break;
12560
12561 case 31: /* stmt: "'alias'" "global variable" "back reference" */
12562#line 3315 "parse.y"
12563 {
12564 char buf[2];
12565 buf[0] = '$';
12566 buf[1] = (char)RNODE_BACK_REF((yyvsp[0].node))->nd_nth;
12567 (yyval.node) = NEW_VALIAS((yyvsp[-1].id), rb_intern2(buf, 2), &(yyloc), &(yylsp[-2]));
12568 /*% ripper: var_alias!($:new, $:old) %*/
12569 }
12570#line 12571 "parse.c"
12571 break;
12572
12573 case 32: /* stmt: "'alias'" "global variable" "numbered reference" */
12574#line 3323 "parse.y"
12575 {
12576 static const char mesg[] = "can't make alias for the number variables";
12577 /*%%%*/
12578 yyerror1(&(yylsp[0]), mesg);
12579 /*% %*/
12580 (yyval.node) = NEW_ERROR(&(yyloc));
12581 /*% ripper[error]: alias_error!(ERR_MESG(), $:nth) %*/
12582 }
12583#line 12584 "parse.c"
12584 break;
12585
12586 case 33: /* stmt: "'undef'" undef_list */
12587#line 3332 "parse.y"
12588 {
12589 nd_set_first_loc((yyvsp[0].node), (yylsp[-1]).beg_pos);
12590 RNODE_UNDEF((yyvsp[0].node))->keyword_loc = (yylsp[-1]);
12591 (yyval.node) = (yyvsp[0].node);
12592 /*% ripper: undef!($:list) %*/
12593 }
12594#line 12595 "parse.c"
12595 break;
12596
12597 case 34: /* stmt: stmt "'if' modifier" expr_value */
12598#line 3339 "parse.y"
12599 {
12600 (yyval.node) = new_if(p, (yyvsp[0].node), remove_begin((yyvsp[-2].node)), 0, &(yyloc), &(yylsp[-1]), &NULL_LOC, &NULL_LOC);
12601 fixpos((yyval.node), (yyvsp[0].node));
12602 /*% ripper: if_mod!($:cond, $:body) %*/
12603 }
12604#line 12605 "parse.c"
12605 break;
12606
12607 case 35: /* stmt: stmt "'unless' modifier" expr_value */
12608#line 3345 "parse.y"
12609 {
12610 (yyval.node) = new_unless(p, (yyvsp[0].node), remove_begin((yyvsp[-2].node)), 0, &(yyloc), &(yylsp[-1]), &NULL_LOC, &NULL_LOC);
12611 fixpos((yyval.node), (yyvsp[0].node));
12612 /*% ripper: unless_mod!($:cond, $:body) %*/
12613 }
12614#line 12615 "parse.c"
12615 break;
12616
12617 case 36: /* stmt: stmt "'while' modifier" expr_value */
12618#line 3351 "parse.y"
12619 {
12620 clear_block_exit(p, false);
12621 if ((yyvsp[-2].node) && nd_type_p((yyvsp[-2].node), NODE_BEGIN)) {
12622 (yyval.node) = NEW_WHILE(cond(p, (yyvsp[0].node), &(yylsp[0])), RNODE_BEGIN((yyvsp[-2].node))->nd_body, 0, &(yyloc), &(yylsp[-1]), &NULL_LOC);
12623 }
12624 else {
12625 (yyval.node) = NEW_WHILE(cond(p, (yyvsp[0].node), &(yylsp[0])), (yyvsp[-2].node), 1, &(yyloc), &(yylsp[-1]), &NULL_LOC);
12626 }
12627 /*% ripper: while_mod!($:cond_expr, $:body) %*/
12628 }
12629#line 12630 "parse.c"
12630 break;
12631
12632 case 37: /* stmt: stmt "'until' modifier" expr_value */
12633#line 3362 "parse.y"
12634 {
12635 clear_block_exit(p, false);
12636 if ((yyvsp[-2].node) && nd_type_p((yyvsp[-2].node), NODE_BEGIN)) {
12637 (yyval.node) = NEW_UNTIL(cond(p, (yyvsp[0].node), &(yylsp[0])), RNODE_BEGIN((yyvsp[-2].node))->nd_body, 0, &(yyloc), &(yylsp[-1]), &NULL_LOC);
12638 }
12639 else {
12640 (yyval.node) = NEW_UNTIL(cond(p, (yyvsp[0].node), &(yylsp[0])), (yyvsp[-2].node), 1, &(yyloc), &(yylsp[-1]), &NULL_LOC);
12641 }
12642 /*% ripper: until_mod!($:cond_expr, $:body) %*/
12643 }
12644#line 12645 "parse.c"
12645 break;
12646
12647 case 38: /* stmt: stmt "'rescue' modifier" after_rescue stmt */
12648#line 3373 "parse.y"
12649 {
12650 p->ctxt.in_rescue = (yyvsp[-1].ctxt).in_rescue;
12651 NODE *resq;
12652 YYLTYPE loc = code_loc_gen(&(yylsp[-2]), &(yylsp[0]));
12653 resq = NEW_RESBODY(0, 0, remove_begin((yyvsp[0].node)), 0, &loc);
12654 (yyval.node) = NEW_RESCUE(remove_begin((yyvsp[-3].node)), resq, 0, &(yyloc));
12655 /*% ripper: rescue_mod!($:body, $:resbody) %*/
12656 }
12657#line 12658 "parse.c"
12658 break;
12659
12660 case 39: /* stmt: k_END allow_exits '{' compstmt_stmts '}' */
12661#line 3382 "parse.y"
12662 {
12663 if (p->ctxt.in_def) {
12664 rb_warn0("END in method; use at_exit");
12665 }
12666 restore_block_exit(p, (yyvsp[-3].node_exits));
12667 p->ctxt = (yyvsp[-4].ctxt);
12668 {
12669 NODE *scope = NEW_SCOPE2(0 /* tbl */, 0 /* args */, (yyvsp[-1].node) /* body */, NULL /* parent */, &(yyloc));
12670 (yyval.node) = NEW_POSTEXE(scope, &(yyloc), &(yylsp[-4]), &(yylsp[-2]), &(yylsp[0]));
12671 RNODE_SCOPE(scope)->nd_parent = (yyval.node);
12672 }
12673 /*% ripper: END!($:body) %*/
12674 }
12675#line 12676 "parse.c"
12676 break;
12677
12678 case 41: /* stmt: mlhs '=' lex_ctxt command_call_value */
12679#line 3397 "parse.y"
12680 {
12681 (yyval.node) = node_assign(p, (NODE *)(yyvsp[-3].node_masgn), (yyvsp[0].node), (yyvsp[-1].ctxt), &(yyloc));
12682 /*% ripper: massign!($:lhs, $:rhs) %*/
12683 }
12684#line 12685 "parse.c"
12685 break;
12686
12687 case 42: /* asgn_mrhs: lhs '=' lex_ctxt mrhs */
12688#line 2920 "parse.y"
12689 {
12690 (yyval.node) = node_assign(p, (NODE *)(yyvsp[-3].node), (yyvsp[0].node), (yyvsp[-1].ctxt), &(yyloc));
12691 /*% ripper: assign!($:1, $:4) %*/
12692 }
12693#line 12694 "parse.c"
12694 break;
12695
12696 case 44: /* stmt: mlhs '=' lex_ctxt mrhs_arg "'rescue' modifier" after_rescue stmt */
12697#line 3404 "parse.y"
12698 {
12699 p->ctxt.in_rescue = (yyvsp[-1].ctxt).in_rescue;
12700 YYLTYPE loc = code_loc_gen(&(yylsp[-2]), &(yylsp[0]));
12701 (yyvsp[0].node) = NEW_RESBODY(0, 0, remove_begin((yyvsp[0].node)), 0, &loc);
12702 loc.beg_pos = (yylsp[-3]).beg_pos;
12703 (yyvsp[-3].node) = NEW_RESCUE((yyvsp[-3].node), (yyvsp[0].node), 0, &loc);
12704 (yyval.node) = node_assign(p, (NODE *)(yyvsp[-6].node_masgn), (yyvsp[-3].node), (yyvsp[-4].ctxt), &(yyloc));
12705 /*% ripper: massign!($:lhs, rescue_mod!($:mrhs_arg, $:resbody)) %*/
12706 }
12707#line 12708 "parse.c"
12708 break;
12709
12710 case 45: /* stmt: mlhs '=' lex_ctxt mrhs_arg */
12711#line 3414 "parse.y"
12712 {
12713 (yyval.node) = node_assign(p, (NODE *)(yyvsp[-3].node_masgn), (yyvsp[0].node), (yyvsp[-1].ctxt), &(yyloc));
12714 /*% ripper: massign!($:lhs, $:rhs) %*/
12715 }
12716#line 12717 "parse.c"
12717 break;
12718
12719 case 47: /* stmt: error */
12720#line 3420 "parse.y"
12721 {
12722 (void)yynerrs;
12723 (yyval.node) = NEW_ERROR(&(yyloc));
12724 }
12725#line 12726 "parse.c"
12726 break;
12727
12728 case 48: /* asgn_command_rhs: lhs '=' lex_ctxt command_rhs */
12729#line 2920 "parse.y"
12730 {
12731 (yyval.node) = node_assign(p, (NODE *)(yyvsp[-3].node), (yyvsp[0].node), (yyvsp[-1].ctxt), &(yyloc));
12732 /*% ripper: assign!($:1, $:4) %*/
12733 }
12734#line 12735 "parse.c"
12735 break;
12736
12737 case 50: /* op_asgn_command_rhs: var_lhs "operator-assignment" lex_ctxt command_rhs */
12738#line 3055 "parse.y"
12739 {
12740 (yyval.node) = new_op_assign(p, (yyvsp[-3].node), (yyvsp[-2].id), (yyvsp[0].node), (yyvsp[-1].ctxt), &(yyloc));
12741 /*% ripper: opassign!($:var_lhs, $:tOP_ASGN, $:rhs) %*/
12742 }
12743#line 12744 "parse.c"
12744 break;
12745
12746 case 51: /* op_asgn_command_rhs: primary_value '[' opt_call_args rbracket "operator-assignment" lex_ctxt command_rhs */
12747#line 3060 "parse.y"
12748 {
12749 (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]));
12750 /*% ripper: opassign!(aref_field!($:primary_value, $:opt_call_args), $:tOP_ASGN, $:rhs) %*/
12751 }
12752#line 12753 "parse.c"
12753 break;
12754
12755 case 52: /* op_asgn_command_rhs: primary_value call_op "local variable or method" "operator-assignment" lex_ctxt command_rhs */
12756#line 3065 "parse.y"
12757 {
12758 (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]));
12759 /*% ripper: opassign!(field!($:primary_value, $:call_op, $:tIDENTIFIER), $:tOP_ASGN, $:rhs) %*/
12760 }
12761#line 12762 "parse.c"
12762 break;
12763
12764 case 53: /* op_asgn_command_rhs: primary_value call_op "constant" "operator-assignment" lex_ctxt command_rhs */
12765#line 3070 "parse.y"
12766 {
12767 (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]));
12768 /*% ripper: opassign!(field!($:primary_value, $:call_op, $:tCONSTANT), $:tOP_ASGN, $:rhs) %*/
12769 }
12770#line 12771 "parse.c"
12771 break;
12772
12773 case 54: /* op_asgn_command_rhs: primary_value "::" "local variable or method" "operator-assignment" lex_ctxt command_rhs */
12774#line 3075 "parse.y"
12775 {
12776 (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]));
12777 /*% ripper: opassign!(field!($:primary_value, $:tCOLON2, $:tIDENTIFIER), $:tOP_ASGN, $:rhs) %*/
12778 }
12779#line 12780 "parse.c"
12780 break;
12781
12782 case 55: /* op_asgn_command_rhs: primary_value "::" "constant" "operator-assignment" lex_ctxt command_rhs */
12783#line 3080 "parse.y"
12784 {
12785 YYLTYPE loc = code_loc_gen(&(yylsp[-5]), &(yylsp[-3]));
12786 (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));
12787 /*% ripper: opassign!(const_path_field!($:primary_value, $:tCONSTANT), $:tOP_ASGN, $:rhs) %*/
12788 }
12789#line 12790 "parse.c"
12790 break;
12791
12792 case 56: /* op_asgn_command_rhs: ":: at EXPR_BEG" "constant" "operator-assignment" lex_ctxt command_rhs */
12793#line 3086 "parse.y"
12794 {
12795 YYLTYPE loc = code_loc_gen(&(yylsp[-4]), &(yylsp[-3]));
12796 (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));
12797 /*% ripper: opassign!(top_const_field!($:tCONSTANT), $:tOP_ASGN, $:rhs) %*/
12798 }
12799#line 12800 "parse.c"
12800 break;
12801
12802 case 57: /* op_asgn_command_rhs: backref "operator-assignment" lex_ctxt command_rhs */
12803#line 3092 "parse.y"
12804 {
12805 VALUE MAYBE_UNUSED(e) = rb_backref_error(p, (yyvsp[-3].node));
12806 (yyval.node) = NEW_ERROR(&(yyloc));
12807 /*% ripper[error]: assign_error!(?e, opassign!(var_field!($:backref), $:tOP_ASGN, $:rhs)) %*/
12808 }
12809#line 12810 "parse.c"
12810 break;
12811
12812 case 59: /* def_endless_method_endless_command: defn_head f_opt_paren_args '=' endless_command */
12813#line 2960 "parse.y"
12814 {
12815 endless_method_name(p, (yyvsp[-3].node_def_temp)->nd_mid, &(yylsp[-3]));
12816 restore_defun(p, (yyvsp[-3].node_def_temp));
12817 ((yyval.node) = (yyvsp[-3].node_def_temp)->nd_def)->nd_loc = (yyloc);
12818 (yyvsp[0].node) = new_scope_body(p, (yyvsp[-2].node_args), (yyvsp[0].node), (yyval.node), &(yyloc));
12819 RNODE_DEFN((yyval.node))->nd_defn = (yyvsp[0].node);
12820 /*% ripper: bodystmt!($:bodystmt, Qnil, Qnil, Qnil) %*/
12821 /*% ripper: def!($:head, $:args, $:$) %*/
12822 local_pop(p);
12823 }
12824#line 12825 "parse.c"
12825 break;
12826
12827 case 60: /* def_endless_method_endless_command: defs_head f_opt_paren_args '=' endless_command */
12828#line 2971 "parse.y"
12829 {
12830 endless_method_name(p, (yyvsp[-3].node_def_temp)->nd_mid, &(yylsp[-3]));
12831 restore_defun(p, (yyvsp[-3].node_def_temp));
12832 ((yyval.node) = (yyvsp[-3].node_def_temp)->nd_def)->nd_loc = (yyloc);
12833 (yyvsp[0].node) = new_scope_body(p, (yyvsp[-2].node_args), (yyvsp[0].node), (yyval.node), &(yyloc));
12834 RNODE_DEFS((yyval.node))->nd_defn = (yyvsp[0].node);
12835 /*% ripper: bodystmt!($:bodystmt, Qnil, Qnil, Qnil) %*/
12836 /*% ripper: defs!(*$:head[0..2], $:args, $:$) %*/
12837 local_pop(p);
12838 }
12839#line 12840 "parse.c"
12840 break;
12841
12842 case 63: /* endless_command: endless_command "'rescue' modifier" after_rescue arg */
12843#line 3433 "parse.y"
12844 {
12845 p->ctxt.in_rescue = (yyvsp[-1].ctxt).in_rescue;
12846 (yyval.node) = rescued_expr(p, (yyvsp[-3].node), (yyvsp[0].node), &(yylsp[-3]), &(yylsp[-2]), &(yylsp[0]));
12847 /*% ripper: rescue_mod!($:1, $:4) %*/
12848 }
12849#line 12850 "parse.c"
12850 break;
12851
12852 case 66: /* endless_command: "'not'" option_'\n' endless_command */
12853#line 3439 "parse.y"
12854 {
12855 (yyval.node) = call_uni_op(p, method_cond(p, (yyvsp[0].node), &(yylsp[0])), METHOD_NOT, &(yylsp[-2]), &(yyloc));
12856 /*% ripper: unary!(ID2VAL(idNOT), $:3) %*/
12857 }
12858#line 12859 "parse.c"
12859 break;
12860
12861 case 68: /* command_rhs: command_call_value "'rescue' modifier" after_rescue stmt */
12862#line 3447 "parse.y"
12863 {
12864 p->ctxt.in_rescue = (yyvsp[-1].ctxt).in_rescue;
12865 YYLTYPE loc = code_loc_gen(&(yylsp[-2]), &(yylsp[0]));
12866 (yyval.node) = NEW_RESCUE((yyvsp[-3].node), NEW_RESBODY(0, 0, remove_begin((yyvsp[0].node)), 0, &loc), 0, &(yyloc));
12867 /*% ripper: rescue_mod!($:1, $:4) %*/
12868 }
12869#line 12870 "parse.c"
12870 break;
12871
12872 case 71: /* expr: expr "'and'" expr */
12873#line 3458 "parse.y"
12874 {
12875 (yyval.node) = logop(p, idAND, (yyvsp[-2].node), (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
12876 /*% ripper: binary!($:left, ID2VAL(idAND), $:right) %*/
12877 }
12878#line 12879 "parse.c"
12879 break;
12880
12881 case 72: /* expr: expr "'or'" expr */
12882#line 3463 "parse.y"
12883 {
12884 (yyval.node) = logop(p, idOR, (yyvsp[-2].node), (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
12885 /*% ripper: binary!($:left, ID2VAL(idOR), $:right) %*/
12886 }
12887#line 12888 "parse.c"
12888 break;
12889
12890 case 73: /* expr: "'not'" option_'\n' expr */
12891#line 3468 "parse.y"
12892 {
12893 (yyval.node) = call_uni_op(p, method_cond(p, (yyvsp[0].node), &(yylsp[0])), METHOD_NOT, &(yylsp[-2]), &(yyloc));
12894 /*% ripper: unary!(ID2VAL(idNOT), $:arg) %*/
12895 }
12896#line 12897 "parse.c"
12897 break;
12898
12899 case 74: /* expr: '!' command_call */
12900#line 3473 "parse.y"
12901 {
12902 (yyval.node) = call_uni_op(p, method_cond(p, (yyvsp[0].node), &(yylsp[0])), '!', &(yylsp[-1]), &(yyloc));
12903 /*% ripper: unary!(ID2VAL('\'!\''), $:arg) %*/
12904 }
12905#line 12906 "parse.c"
12906 break;
12907
12908 case 75: /* $@7: %empty */
12909#line 3478 "parse.y"
12910 {
12911 value_expr(p, (yyvsp[-1].node));
12912 }
12913#line 12914 "parse.c"
12914 break;
12915
12916 case 76: /* expr: arg "=>" $@7 p_in_kwarg p_pvtbl p_pktbl p_top_expr_body */
12917#line 3483 "parse.y"
12918 {
12919 pop_pktbl(p, (yyvsp[-1].tbl));
12920 pop_pvtbl(p, (yyvsp[-2].tbl));
12921 p->ctxt.in_kwarg = (yyvsp[-3].ctxt).in_kwarg;
12922 p->ctxt.in_alt_pattern = (yyvsp[-3].ctxt).in_alt_pattern;
12923 p->ctxt.capture_in_pattern = (yyvsp[-3].ctxt).capture_in_pattern;
12924 (yyval.node) = NEW_CASE3((yyvsp[-6].node), NEW_IN((yyvsp[0].node), 0, 0, &(yylsp[0]), &NULL_LOC, &NULL_LOC, &(yylsp[-5])), &(yyloc), &NULL_LOC, &NULL_LOC);
12925 /*% ripper: case!($:arg, in!($:body, Qnil, Qnil)) %*/
12926 }
12927#line 12928 "parse.c"
12928 break;
12929
12930 case 77: /* $@8: %empty */
12931#line 3493 "parse.y"
12932 {
12933 value_expr(p, (yyvsp[-1].node));
12934 }
12935#line 12936 "parse.c"
12936 break;
12937
12938 case 78: /* expr: arg "'in'" $@8 p_in_kwarg p_pvtbl p_pktbl p_top_expr_body */
12939#line 3498 "parse.y"
12940 {
12941 pop_pktbl(p, (yyvsp[-1].tbl));
12942 pop_pvtbl(p, (yyvsp[-2].tbl));
12943 p->ctxt.in_kwarg = (yyvsp[-3].ctxt).in_kwarg;
12944 p->ctxt.in_alt_pattern = (yyvsp[-3].ctxt).in_alt_pattern;
12945 p->ctxt.capture_in_pattern = (yyvsp[-3].ctxt).capture_in_pattern;
12946 (yyval.node) = NEW_CASE3((yyvsp[-6].node), NEW_IN((yyvsp[0].node), NEW_TRUE(&(yylsp[0])), NEW_FALSE(&(yylsp[0])), &(yylsp[0]), &(yylsp[-5]), &NULL_LOC, &NULL_LOC), &(yyloc), &NULL_LOC, &NULL_LOC);
12947 /*% ripper: case!($:arg, in!($:body, Qnil, Qnil)) %*/
12948 }
12949#line 12950 "parse.c"
12950 break;
12951
12952 case 80: /* def_name: fname */
12953#line 3511 "parse.y"
12954 {
12955 numparam_name(p, (yyvsp[0].id));
12956 local_push(p, 0);
12957 p->ctxt.in_def = 1;
12958 p->ctxt.in_rescue = before_rescue;
12959 p->ctxt.cant_return = 0;
12960 (yyval.id) = (yyvsp[0].id);
12961 }
12962#line 12963 "parse.c"
12963 break;
12964
12965 case 81: /* defn_head: k_def def_name */
12966#line 3522 "parse.y"
12967 {
12968 (yyval.node_def_temp) = def_head_save(p, (yyvsp[-1].node_def_temp));
12969 (yyval.node_def_temp)->nd_mid = (yyvsp[0].id);
12970 (yyval.node_def_temp)->nd_def = NEW_DEFN((yyvsp[0].id), 0, &(yyloc));
12971 /*% ripper: $:def_name %*/
12972 }
12973#line 12974 "parse.c"
12974 break;
12975
12976 case 82: /* $@9: %empty */
12977#line 3531 "parse.y"
12978 {
12979 SET_LEX_STATE(EXPR_FNAME);
12980 }
12981#line 12982 "parse.c"
12982 break;
12983
12984 case 83: /* defs_head: k_def singleton dot_or_colon $@9 def_name */
12985#line 3535 "parse.y"
12986 {
12987 SET_LEX_STATE(EXPR_ENDFN|EXPR_LABEL); /* force for args */
12988 (yyval.node_def_temp) = def_head_save(p, (yyvsp[-4].node_def_temp));
12989 (yyval.node_def_temp)->nd_mid = (yyvsp[0].id);
12990 (yyval.node_def_temp)->nd_def = NEW_DEFS((yyvsp[-3].node), (yyvsp[0].id), 0, &(yyloc));
12991 /*% ripper: [$:singleton, $:dot_or_colon, $:def_name] %*/
12992 }
12993#line 12994 "parse.c"
12994 break;
12995
12996 case 84: /* value_expr_expr: expr */
12997#line 3155 "parse.y"
12998 {
12999 value_expr(p, (yyvsp[0].node));
13000 (yyval.node) = (yyvsp[0].node);
13001 }
13002#line 13003 "parse.c"
13003 break;
13004
13005 case 86: /* expr_value: error */
13006#line 3546 "parse.y"
13007 {
13008 (yyval.node) = NEW_ERROR(&(yyloc));
13009 }
13010#line 13011 "parse.c"
13011 break;
13012
13013 case 87: /* $@10: %empty */
13014#line 3551 "parse.y"
13015 {COND_PUSH(1);}
13016#line 13017 "parse.c"
13017 break;
13018
13019 case 88: /* $@11: %empty */
13020#line 3551 "parse.y"
13021 {COND_POP();}
13022#line 13023 "parse.c"
13023 break;
13024
13025 case 89: /* expr_value_do: $@10 expr_value do $@11 */
13026#line 3552 "parse.y"
13027 {
13028 (yyval.node) = (yyvsp[-2].node);
13029 /*% ripper: $:2 %*/
13030 }
13031#line 13032 "parse.c"
13032 break;
13033
13034 case 92: /* value_expr_command_call: command_call */
13035#line 3155 "parse.y"
13036 {
13037 value_expr(p, (yyvsp[0].node));
13038 (yyval.node) = (yyvsp[0].node);
13039 }
13040#line 13041 "parse.c"
13041 break;
13042
13043 case 95: /* block_command: block_call call_op2 operation2 command_args */
13044#line 3567 "parse.y"
13045 {
13046 (yyval.node) = new_qcall(p, (yyvsp[-2].id), (yyvsp[-3].node), (yyvsp[-1].id), (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
13047 /*% ripper: method_add_arg!(call!($:1, $:2, $:3), $:4) %*/
13048 }
13049#line 13050 "parse.c"
13050 break;
13051
13052 case 96: /* cmd_brace_block: "{ arg" brace_body '}' */
13053#line 3574 "parse.y"
13054 {
13055 (yyval.node) = (yyvsp[-1].node);
13056 set_embraced_location((yyval.node), &(yylsp[-2]), &(yylsp[0]));
13057 /*% ripper: $:2 %*/
13058 }
13059#line 13060 "parse.c"
13060 break;
13061
13062 case 97: /* fcall: "local variable or method" */
13063#line 3582 "parse.y"
13064 {
13065 (yyval.node_fcall) = NEW_FCALL((yyvsp[0].id), 0, &(yyloc));
13066 /*% ripper: $:1 %*/
13067 }
13068#line 13069 "parse.c"
13069 break;
13070
13071 case 98: /* fcall: "constant" */
13072#line 3582 "parse.y"
13073 {
13074 (yyval.node_fcall) = NEW_FCALL((yyvsp[0].id), 0, &(yyloc));
13075 /*% ripper: $:1 %*/
13076 }
13077#line 13078 "parse.c"
13078 break;
13079
13080 case 99: /* fcall: "method" */
13081#line 3582 "parse.y"
13082 {
13083 (yyval.node_fcall) = NEW_FCALL((yyvsp[0].id), 0, &(yyloc));
13084 /*% ripper: $:1 %*/
13085 }
13086#line 13087 "parse.c"
13087 break;
13088
13089 case 100: /* command: fcall command_args */
13090#line 3589 "parse.y"
13091 {
13092 (yyvsp[-1].node_fcall)->nd_args = (yyvsp[0].node);
13093 nd_set_last_loc((yyvsp[-1].node_fcall), (yylsp[0]).end_pos);
13094 (yyval.node) = (NODE *)(yyvsp[-1].node_fcall);
13095 /*% ripper: command!($:1, $:2) %*/
13096 }
13097#line 13098 "parse.c"
13098 break;
13099
13100 case 101: /* command: fcall command_args cmd_brace_block */
13101#line 3596 "parse.y"
13102 {
13103 block_dup_check(p, (yyvsp[-1].node), (yyvsp[0].node));
13104 (yyvsp[-2].node_fcall)->nd_args = (yyvsp[-1].node);
13105 (yyval.node) = method_add_block(p, (NODE *)(yyvsp[-2].node_fcall), (yyvsp[0].node), &(yyloc));
13106 fixpos((yyval.node), RNODE((yyvsp[-2].node_fcall)));
13107 nd_set_last_loc((yyvsp[-2].node_fcall), (yylsp[-1]).end_pos);
13108 /*% ripper: method_add_block!(command!($:1, $:2), $:3) %*/
13109 }
13110#line 13111 "parse.c"
13111 break;
13112
13113 case 102: /* command: primary_value call_op operation2 command_args */
13114#line 3605 "parse.y"
13115 {
13116 (yyval.node) = new_command_qcall(p, (yyvsp[-2].id), (yyvsp[-3].node), (yyvsp[-1].id), (yyvsp[0].node), 0, &(yylsp[-1]), &(yyloc));
13117 /*% ripper: command_call!($:1, $:2, $:3, $:4) %*/
13118 }
13119#line 13120 "parse.c"
13120 break;
13121
13122 case 103: /* command: primary_value call_op operation2 command_args cmd_brace_block */
13123#line 3610 "parse.y"
13124 {
13125 (yyval.node) = new_command_qcall(p, (yyvsp[-3].id), (yyvsp[-4].node), (yyvsp[-2].id), (yyvsp[-1].node), (yyvsp[0].node), &(yylsp[-2]), &(yyloc));
13126 /*% ripper: method_add_block!(command_call!($:1, $:2, $:3, $:4), $:5) %*/
13127 }
13128#line 13129 "parse.c"
13129 break;
13130
13131 case 104: /* command: primary_value "::" operation2 command_args */
13132#line 3615 "parse.y"
13133 {
13134 (yyval.node) = new_command_qcall(p, idCOLON2, (yyvsp[-3].node), (yyvsp[-1].id), (yyvsp[0].node), 0, &(yylsp[-1]), &(yyloc));
13135 /*% ripper: command_call!($:1, $:2, $:3, $:4) %*/
13136 }
13137#line 13138 "parse.c"
13138 break;
13139
13140 case 105: /* command: primary_value "::" operation2 command_args cmd_brace_block */
13141#line 3620 "parse.y"
13142 {
13143 (yyval.node) = new_command_qcall(p, idCOLON2, (yyvsp[-4].node), (yyvsp[-2].id), (yyvsp[-1].node), (yyvsp[0].node), &(yylsp[-2]), &(yyloc));
13144 /*% ripper: method_add_block!(command_call!($:1, $:2, $:3, $:4), $:5) %*/
13145 }
13146#line 13147 "parse.c"
13147 break;
13148
13149 case 106: /* command: primary_value "::" "constant" '{' brace_body '}' */
13150#line 3625 "parse.y"
13151 {
13152 set_embraced_location((yyvsp[-1].node), &(yylsp[-2]), &(yylsp[0]));
13153 (yyval.node) = new_command_qcall(p, idCOLON2, (yyvsp[-5].node), (yyvsp[-3].id), 0, (yyvsp[-1].node), &(yylsp[-3]), &(yyloc));
13154 /*% ripper: method_add_block!(command_call!($:1, $:2, $:3, Qnil), $:5) %*/
13155 }
13156#line 13157 "parse.c"
13157 break;
13158
13159 case 107: /* command: "'super'" command_args */
13160#line 3631 "parse.y"
13161 {
13162 (yyval.node) = NEW_SUPER((yyvsp[0].node), &(yyloc), &(yylsp[-1]), &NULL_LOC, &NULL_LOC);
13163 fixpos((yyval.node), (yyvsp[0].node));
13164 /*% ripper: super!($:2) %*/
13165 }
13166#line 13167 "parse.c"
13167 break;
13168
13169 case 108: /* command: k_yield command_args */
13170#line 3637 "parse.y"
13171 {
13172 (yyval.node) = NEW_YIELD((yyvsp[0].node), &(yyloc), &(yylsp[-1]), &NULL_LOC, &NULL_LOC);
13173 fixpos((yyval.node), (yyvsp[0].node));
13174 /*% ripper: yield!($:2) %*/
13175 }
13176#line 13177 "parse.c"
13177 break;
13178
13179 case 109: /* command: k_return call_args */
13180#line 3643 "parse.y"
13181 {
13182 (yyval.node) = NEW_RETURN(ret_args(p, (yyvsp[0].node)), &(yyloc), &(yylsp[-1]));
13183 /*% ripper: return!($:2) %*/
13184 }
13185#line 13186 "parse.c"
13186 break;
13187
13188 case 110: /* command: "'break'" call_args */
13189#line 3648 "parse.y"
13190 {
13191 NODE *args = 0;
13192 args = ret_args(p, (yyvsp[0].node));
13193 (yyval.node) = add_block_exit(p, NEW_BREAK(args, &(yyloc), &(yylsp[-1])));
13194 /*% ripper: break!($:2) %*/
13195 }
13196#line 13197 "parse.c"
13197 break;
13198
13199 case 111: /* command: "'next'" call_args */
13200#line 3655 "parse.y"
13201 {
13202 NODE *args = 0;
13203 args = ret_args(p, (yyvsp[0].node));
13204 (yyval.node) = add_block_exit(p, NEW_NEXT(args, &(yyloc), &(yylsp[-1])));
13205 /*% ripper: next!($:2) %*/
13206 }
13207#line 13208 "parse.c"
13208 break;
13209
13210 case 113: /* mlhs: "(" mlhs_inner rparen */
13211#line 3665 "parse.y"
13212 {
13213 (yyval.node_masgn) = (yyvsp[-1].node_masgn);
13214 /*% ripper: mlhs_paren!($:2) %*/
13215 }
13216#line 13217 "parse.c"
13217 break;
13218
13219 case 115: /* mlhs_inner: "(" mlhs_inner rparen */
13220#line 3673 "parse.y"
13221 {
13222 (yyval.node_masgn) = NEW_MASGN(NEW_LIST((NODE *)(yyvsp[-1].node_masgn), &(yyloc)), 0, &(yyloc));
13223 /*% ripper: mlhs_paren!($:2) %*/
13224 }
13225#line 13226 "parse.c"
13226 break;
13227
13228 case 116: /* mlhs_basic: mlhs_head */
13229#line 3680 "parse.y"
13230 {
13231 (yyval.node_masgn) = NEW_MASGN((yyvsp[0].node), 0, &(yyloc));
13232 /*% ripper: $:1 %*/
13233 }
13234#line 13235 "parse.c"
13235 break;
13236
13237 case 117: /* mlhs_basic: mlhs_head mlhs_item */
13238#line 3685 "parse.y"
13239 {
13240 (yyval.node_masgn) = NEW_MASGN(list_append(p, (yyvsp[-1].node), (yyvsp[0].node)), 0, &(yyloc));
13241 /*% ripper: mlhs_add!($:1, $:2) %*/
13242 }
13243#line 13244 "parse.c"
13244 break;
13245
13246 case 118: /* mlhs_basic: mlhs_head "*" mlhs_node */
13247#line 3690 "parse.y"
13248 {
13249 (yyval.node_masgn) = NEW_MASGN((yyvsp[-2].node), (yyvsp[0].node), &(yyloc));
13250 /*% ripper: mlhs_add_star!($:1, $:3) %*/
13251 }
13252#line 13253 "parse.c"
13253 break;
13254
13255 case 119: /* mlhs_items_mlhs_item: mlhs_item */
13256#line 3042 "parse.y"
13257 {
13258 (yyval.node) = NEW_LIST((yyvsp[0].node), &(yyloc));
13259 /*% ripper: mlhs_add!(mlhs_new!, $:1) %*/
13260 }
13261#line 13262 "parse.c"
13262 break;
13263
13264 case 120: /* mlhs_items_mlhs_item: mlhs_items_mlhs_item ',' mlhs_item */
13265#line 3047 "parse.y"
13266 {
13267 (yyval.node) = list_append(p, (yyvsp[-2].node), (yyvsp[0].node));
13268 /*% ripper: mlhs_add!($:1, $:3) %*/
13269 }
13270#line 13271 "parse.c"
13271 break;
13272
13273 case 121: /* mlhs_basic: mlhs_head "*" mlhs_node ',' mlhs_items_mlhs_item */
13274#line 3695 "parse.y"
13275 {
13276 (yyval.node_masgn) = NEW_MASGN((yyvsp[-4].node), NEW_POSTARG((yyvsp[-2].node),(yyvsp[0].node),&(yyloc)), &(yyloc));
13277 /*% ripper: mlhs_add_post!(mlhs_add_star!($:1, $:3), $:5) %*/
13278 }
13279#line 13280 "parse.c"
13280 break;
13281
13282 case 122: /* mlhs_basic: mlhs_head "*" */
13283#line 3700 "parse.y"
13284 {
13285 (yyval.node_masgn) = NEW_MASGN((yyvsp[-1].node), NODE_SPECIAL_NO_NAME_REST, &(yyloc));
13286 /*% ripper: mlhs_add_star!($:1, Qnil) %*/
13287 }
13288#line 13289 "parse.c"
13289 break;
13290
13291 case 123: /* mlhs_basic: mlhs_head "*" ',' mlhs_items_mlhs_item */
13292#line 3705 "parse.y"
13293 {
13294 (yyval.node_masgn) = NEW_MASGN((yyvsp[-3].node), NEW_POSTARG(NODE_SPECIAL_NO_NAME_REST, (yyvsp[0].node), &(yyloc)), &(yyloc));
13295 /*% ripper: mlhs_add_post!(mlhs_add_star!($:1, Qnil), $:4) %*/
13296 }
13297#line 13298 "parse.c"
13298 break;
13299
13300 case 124: /* mlhs_basic: "*" mlhs_node */
13301#line 3710 "parse.y"
13302 {
13303 (yyval.node_masgn) = NEW_MASGN(0, (yyvsp[0].node), &(yyloc));
13304 /*% ripper: mlhs_add_star!(mlhs_new!, $:2) %*/
13305 }
13306#line 13307 "parse.c"
13307 break;
13308
13309 case 125: /* mlhs_basic: "*" mlhs_node ',' mlhs_items_mlhs_item */
13310#line 3715 "parse.y"
13311 {
13312 (yyval.node_masgn) = NEW_MASGN(0, NEW_POSTARG((yyvsp[-2].node),(yyvsp[0].node),&(yyloc)), &(yyloc));
13313 /*% ripper: mlhs_add_post!(mlhs_add_star!(mlhs_new!, $:2), $:4) %*/
13314 }
13315#line 13316 "parse.c"
13316 break;
13317
13318 case 126: /* mlhs_basic: "*" */
13319#line 3720 "parse.y"
13320 {
13321 (yyval.node_masgn) = NEW_MASGN(0, NODE_SPECIAL_NO_NAME_REST, &(yyloc));
13322 /*% ripper: mlhs_add_star!(mlhs_new!, Qnil) %*/
13323 }
13324#line 13325 "parse.c"
13325 break;
13326
13327 case 127: /* mlhs_basic: "*" ',' mlhs_items_mlhs_item */
13328#line 3725 "parse.y"
13329 {
13330 (yyval.node_masgn) = NEW_MASGN(0, NEW_POSTARG(NODE_SPECIAL_NO_NAME_REST, (yyvsp[0].node), &(yyloc)), &(yyloc));
13331 /*% ripper: mlhs_add_post!(mlhs_add_star!(mlhs_new!, Qnil), $:3) %*/
13332 }
13333#line 13334 "parse.c"
13334 break;
13335
13336 case 129: /* mlhs_item: "(" mlhs_inner rparen */
13337#line 3733 "parse.y"
13338 {
13339 (yyval.node) = (NODE *)(yyvsp[-1].node_masgn);
13340 /*% ripper: mlhs_paren!($:2) %*/
13341 }
13342#line 13343 "parse.c"
13343 break;
13344
13345 case 130: /* mlhs_head: mlhs_item ',' */
13346#line 3740 "parse.y"
13347 {
13348 (yyval.node) = NEW_LIST((yyvsp[-1].node), &(yylsp[-1]));
13349 /*% ripper: mlhs_add!(mlhs_new!, $:1) %*/
13350 }
13351#line 13352 "parse.c"
13352 break;
13353
13354 case 131: /* mlhs_head: mlhs_head mlhs_item ',' */
13355#line 3745 "parse.y"
13356 {
13357 (yyval.node) = list_append(p, (yyvsp[-2].node), (yyvsp[-1].node));
13358 /*% ripper: mlhs_add!($:1, $:2) %*/
13359 }
13360#line 13361 "parse.c"
13361 break;
13362
13363 case 132: /* mlhs_node: user_variable */
13364#line 3753 "parse.y"
13365 {
13366 /*% ripper: var_field!($:1) %*/
13367 (yyval.node) = assignable(p, (yyvsp[0].id), 0, &(yyloc));
13368 }
13369#line 13370 "parse.c"
13370 break;
13371
13372 case 133: /* mlhs_node: keyword_variable */
13373#line 3753 "parse.y"
13374 {
13375 /*% ripper: var_field!($:1) %*/
13376 (yyval.node) = assignable(p, (yyvsp[0].id), 0, &(yyloc));
13377 }
13378#line 13379 "parse.c"
13379 break;
13380
13381 case 134: /* mlhs_node: primary_value '[' opt_call_args rbracket */
13382#line 3758 "parse.y"
13383 {
13384 (yyval.node) = aryset(p, (yyvsp[-3].node), (yyvsp[-1].node), &(yyloc));
13385 /*% ripper: aref_field!($:1, $:3) %*/
13386 }
13387#line 13388 "parse.c"
13388 break;
13389
13390 case 135: /* mlhs_node: primary_value call_op "local variable or method" */
13391#line 3763 "parse.y"
13392 {
13393 anddot_multiple_assignment_check(p, &(yylsp[-1]), (yyvsp[-1].id));
13394 (yyval.node) = attrset(p, (yyvsp[-2].node), (yyvsp[-1].id), (yyvsp[0].id), &(yyloc));
13395 /*% ripper: field!($:1, $:2, $:3) %*/
13396 }
13397#line 13398 "parse.c"
13398 break;
13399
13400 case 136: /* mlhs_node: primary_value call_op "constant" */
13401#line 3763 "parse.y"
13402 {
13403 anddot_multiple_assignment_check(p, &(yylsp[-1]), (yyvsp[-1].id));
13404 (yyval.node) = attrset(p, (yyvsp[-2].node), (yyvsp[-1].id), (yyvsp[0].id), &(yyloc));
13405 /*% ripper: field!($:1, $:2, $:3) %*/
13406 }
13407#line 13408 "parse.c"
13408 break;
13409
13410 case 137: /* mlhs_node: primary_value "::" "local variable or method" */
13411#line 3769 "parse.y"
13412 {
13413 (yyval.node) = attrset(p, (yyvsp[-2].node), idCOLON2, (yyvsp[0].id), &(yyloc));
13414 /*% ripper: const_path_field!($:1, $:3) %*/
13415 }
13416#line 13417 "parse.c"
13417 break;
13418
13419 case 138: /* mlhs_node: primary_value "::" "constant" */
13420#line 3774 "parse.y"
13421 {
13422 /*% ripper: const_path_field!($:1, $:3) %*/
13423 (yyval.node) = const_decl(p, NEW_COLON2((yyvsp[-2].node), (yyvsp[0].id), &(yyloc), &(yylsp[-1]), &(yylsp[0])), &(yyloc));
13424 }
13425#line 13426 "parse.c"
13426 break;
13427
13428 case 139: /* mlhs_node: ":: at EXPR_BEG" "constant" */
13429#line 3779 "parse.y"
13430 {
13431 /*% ripper: top_const_field!($:2) %*/
13432 (yyval.node) = const_decl(p, NEW_COLON3((yyvsp[0].id), &(yyloc), &(yylsp[-1]), &(yylsp[0])), &(yyloc));
13433 }
13434#line 13435 "parse.c"
13435 break;
13436
13437 case 140: /* mlhs_node: backref */
13438#line 3784 "parse.y"
13439 {
13440 VALUE MAYBE_UNUSED(e) = rb_backref_error(p, (yyvsp[0].node));
13441 (yyval.node) = NEW_ERROR(&(yyloc));
13442 /*% ripper[error]: assign_error!(?e, var_field!($:1)) %*/
13443 }
13444#line 13445 "parse.c"
13445 break;
13446
13447 case 141: /* lhs: user_variable */
13448#line 3792 "parse.y"
13449 {
13450 /*% ripper: var_field!($:1) %*/
13451 (yyval.node) = assignable(p, (yyvsp[0].id), 0, &(yyloc));
13452 }
13453#line 13454 "parse.c"
13454 break;
13455
13456 case 142: /* lhs: keyword_variable */
13457#line 3792 "parse.y"
13458 {
13459 /*% ripper: var_field!($:1) %*/
13460 (yyval.node) = assignable(p, (yyvsp[0].id), 0, &(yyloc));
13461 }
13462#line 13463 "parse.c"
13463 break;
13464
13465 case 143: /* lhs: primary_value '[' opt_call_args rbracket */
13466#line 3797 "parse.y"
13467 {
13468 (yyval.node) = aryset(p, (yyvsp[-3].node), (yyvsp[-1].node), &(yyloc));
13469 /*% ripper: aref_field!($:1, $:3) %*/
13470 }
13471#line 13472 "parse.c"
13472 break;
13473
13474 case 144: /* lhs: primary_value call_op "local variable or method" */
13475#line 3802 "parse.y"
13476 {
13477 (yyval.node) = attrset(p, (yyvsp[-2].node), (yyvsp[-1].id), (yyvsp[0].id), &(yyloc));
13478 /*% ripper: field!($:1, $:2, $:3) %*/
13479 }
13480#line 13481 "parse.c"
13481 break;
13482
13483 case 145: /* lhs: primary_value call_op "constant" */
13484#line 3802 "parse.y"
13485 {
13486 (yyval.node) = attrset(p, (yyvsp[-2].node), (yyvsp[-1].id), (yyvsp[0].id), &(yyloc));
13487 /*% ripper: field!($:1, $:2, $:3) %*/
13488 }
13489#line 13490 "parse.c"
13490 break;
13491
13492 case 146: /* lhs: primary_value "::" "local variable or method" */
13493#line 3807 "parse.y"
13494 {
13495 (yyval.node) = attrset(p, (yyvsp[-2].node), idCOLON2, (yyvsp[0].id), &(yyloc));
13496 /*% ripper: field!($:1, $:2, $:3) %*/
13497 }
13498#line 13499 "parse.c"
13499 break;
13500
13501 case 147: /* lhs: primary_value "::" "constant" */
13502#line 3812 "parse.y"
13503 {
13504 /*% ripper: const_path_field!($:1, $:3) %*/
13505 (yyval.node) = const_decl(p, NEW_COLON2((yyvsp[-2].node), (yyvsp[0].id), &(yyloc), &(yylsp[-1]), &(yylsp[0])), &(yyloc));
13506 }
13507#line 13508 "parse.c"
13508 break;
13509
13510 case 148: /* lhs: ":: at EXPR_BEG" "constant" */
13511#line 3817 "parse.y"
13512 {
13513 /*% ripper: top_const_field!($:2) %*/
13514 (yyval.node) = const_decl(p, NEW_COLON3((yyvsp[0].id), &(yyloc), &(yylsp[-1]), &(yylsp[0])), &(yyloc));
13515 }
13516#line 13517 "parse.c"
13517 break;
13518
13519 case 149: /* lhs: backref */
13520#line 3822 "parse.y"
13521 {
13522 VALUE MAYBE_UNUSED(e) = rb_backref_error(p, (yyvsp[0].node));
13523 (yyval.node) = NEW_ERROR(&(yyloc));
13524 /*% ripper[error]: assign_error!(?e, var_field!($:1)) %*/
13525 }
13526#line 13527 "parse.c"
13527 break;
13528
13529 case 150: /* cname: "local variable or method" */
13530#line 3830 "parse.y"
13531 {
13532 static const char mesg[] = "class/module name must be CONSTANT";
13533 /*%%%*/
13534 yyerror1(&(yylsp[0]), mesg);
13535 /*% %*/
13536 /*% ripper[error]: class_name_error!(ERR_MESG(), $:1) %*/
13537 }
13538#line 13539 "parse.c"
13539 break;
13540
13541 case 152: /* cpath: ":: at EXPR_BEG" cname */
13542#line 3841 "parse.y"
13543 {
13544 (yyval.node) = NEW_COLON3((yyvsp[0].id), &(yyloc), &(yylsp[-1]), &(yylsp[0]));
13545 /*% ripper: top_const_ref!($:2) %*/
13546 }
13547#line 13548 "parse.c"
13548 break;
13549
13550 case 153: /* cpath: cname */
13551#line 3846 "parse.y"
13552 {
13553 (yyval.node) = NEW_COLON2(0, (yyvsp[0].id), &(yyloc), &NULL_LOC, &(yylsp[0]));
13554 /*% ripper: const_ref!($:1) %*/
13555 }
13556#line 13557 "parse.c"
13557 break;
13558
13559 case 154: /* cpath: primary_value "::" cname */
13560#line 3851 "parse.y"
13561 {
13562 (yyval.node) = NEW_COLON2((yyvsp[-2].node), (yyvsp[0].id), &(yyloc), &(yylsp[-1]), &(yylsp[0]));
13563 /*% ripper: const_path_ref!($:1, $:3) %*/
13564 }
13565#line 13566 "parse.c"
13566 break;
13567
13568 case 158: /* fname: op */
13569#line 3859 "parse.y"
13570 {
13571 SET_LEX_STATE(EXPR_ENDFN);
13572 (yyval.id) = (yyvsp[0].id);
13573 }
13574#line 13575 "parse.c"
13575 break;
13576
13577 case 160: /* fitem: fname */
13578#line 3867 "parse.y"
13579 {
13580 (yyval.node) = NEW_SYM(rb_id2str((yyvsp[0].id)), &(yyloc));
13581 /*% ripper: symbol_literal!($:1) %*/
13582 }
13583#line 13584 "parse.c"
13584 break;
13585
13586 case 162: /* undef_list: fitem */
13587#line 3875 "parse.y"
13588 {
13589 (yyval.node) = NEW_UNDEF((yyvsp[0].node), &(yyloc));
13590 /*% ripper: rb_ary_new3(1, $:1) %*/
13591 }
13592#line 13593 "parse.c"
13593 break;
13594
13595 case 163: /* $@12: %empty */
13596#line 3879 "parse.y"
13597 {SET_LEX_STATE(EXPR_FNAME|EXPR_FITEM);}
13598#line 13599 "parse.c"
13599 break;
13600
13601 case 164: /* undef_list: undef_list ',' $@12 fitem */
13602#line 3880 "parse.y"
13603 {
13604 nd_set_last_loc((yyvsp[-3].node), (yylsp[0]).end_pos);
13605 rb_parser_ary_push_node(p, RNODE_UNDEF((yyvsp[-3].node))->nd_undefs, (yyvsp[0].node));
13606 /*% ripper: rb_ary_push($:1, $:4) %*/
13607 }
13608#line 13609 "parse.c"
13609 break;
13610
13611 case 165: /* op: '|' */
13612#line 3887 "parse.y"
13613 { (yyval.id) = '|'; }
13614#line 13615 "parse.c"
13615 break;
13616
13617 case 166: /* op: '^' */
13618#line 3888 "parse.y"
13619 { (yyval.id) = '^'; }
13620#line 13621 "parse.c"
13621 break;
13622
13623 case 167: /* op: '&' */
13624#line 3889 "parse.y"
13625 { (yyval.id) = '&'; }
13626#line 13627 "parse.c"
13627 break;
13628
13629 case 168: /* op: "<=>" */
13630#line 3890 "parse.y"
13631 { (yyval.id) = tCMP; }
13632#line 13633 "parse.c"
13633 break;
13634
13635 case 169: /* op: "==" */
13636#line 3891 "parse.y"
13637 { (yyval.id) = tEQ; }
13638#line 13639 "parse.c"
13639 break;
13640
13641 case 170: /* op: "===" */
13642#line 3892 "parse.y"
13643 { (yyval.id) = tEQQ; }
13644#line 13645 "parse.c"
13645 break;
13646
13647 case 171: /* op: "=~" */
13648#line 3893 "parse.y"
13649 { (yyval.id) = tMATCH; }
13650#line 13651 "parse.c"
13651 break;
13652
13653 case 172: /* op: "!~" */
13654#line 3894 "parse.y"
13655 { (yyval.id) = tNMATCH; }
13656#line 13657 "parse.c"
13657 break;
13658
13659 case 173: /* op: '>' */
13660#line 3895 "parse.y"
13661 { (yyval.id) = '>'; }
13662#line 13663 "parse.c"
13663 break;
13664
13665 case 174: /* op: ">=" */
13666#line 3896 "parse.y"
13667 { (yyval.id) = tGEQ; }
13668#line 13669 "parse.c"
13669 break;
13670
13671 case 175: /* op: '<' */
13672#line 3897 "parse.y"
13673 { (yyval.id) = '<'; }
13674#line 13675 "parse.c"
13675 break;
13676
13677 case 176: /* op: "<=" */
13678#line 3898 "parse.y"
13679 { (yyval.id) = tLEQ; }
13680#line 13681 "parse.c"
13681 break;
13682
13683 case 177: /* op: "!=" */
13684#line 3899 "parse.y"
13685 { (yyval.id) = tNEQ; }
13686#line 13687 "parse.c"
13687 break;
13688
13689 case 178: /* op: "<<" */
13690#line 3900 "parse.y"
13691 { (yyval.id) = tLSHFT; }
13692#line 13693 "parse.c"
13693 break;
13694
13695 case 179: /* op: ">>" */
13696#line 3901 "parse.y"
13697 { (yyval.id) = tRSHFT; }
13698#line 13699 "parse.c"
13699 break;
13700
13701 case 180: /* op: '+' */
13702#line 3902 "parse.y"
13703 { (yyval.id) = '+'; }
13704#line 13705 "parse.c"
13705 break;
13706
13707 case 181: /* op: '-' */
13708#line 3903 "parse.y"
13709 { (yyval.id) = '-'; }
13710#line 13711 "parse.c"
13711 break;
13712
13713 case 182: /* op: '*' */
13714#line 3904 "parse.y"
13715 { (yyval.id) = '*'; }
13716#line 13717 "parse.c"
13717 break;
13718
13719 case 183: /* op: "*" */
13720#line 3905 "parse.y"
13721 { (yyval.id) = '*'; }
13722#line 13723 "parse.c"
13723 break;
13724
13725 case 184: /* op: '/' */
13726#line 3906 "parse.y"
13727 { (yyval.id) = '/'; }
13728#line 13729 "parse.c"
13729 break;
13730
13731 case 185: /* op: '%' */
13732#line 3907 "parse.y"
13733 { (yyval.id) = '%'; }
13734#line 13735 "parse.c"
13735 break;
13736
13737 case 186: /* op: "**" */
13738#line 3908 "parse.y"
13739 { (yyval.id) = tPOW; }
13740#line 13741 "parse.c"
13741 break;
13742
13743 case 187: /* op: "**arg" */
13744#line 3909 "parse.y"
13745 { (yyval.id) = tDSTAR; }
13746#line 13747 "parse.c"
13747 break;
13748
13749 case 188: /* op: '!' */
13750#line 3910 "parse.y"
13751 { (yyval.id) = '!'; }
13752#line 13753 "parse.c"
13753 break;
13754
13755 case 189: /* op: '~' */
13756#line 3911 "parse.y"
13757 { (yyval.id) = '~'; }
13758#line 13759 "parse.c"
13759 break;
13760
13761 case 190: /* op: "unary+" */
13762#line 3912 "parse.y"
13763 { (yyval.id) = tUPLUS; }
13764#line 13765 "parse.c"
13765 break;
13766
13767 case 191: /* op: "unary-" */
13768#line 3913 "parse.y"
13769 { (yyval.id) = tUMINUS; }
13770#line 13771 "parse.c"
13771 break;
13772
13773 case 192: /* op: "[]" */
13774#line 3914 "parse.y"
13775 { (yyval.id) = tAREF; }
13776#line 13777 "parse.c"
13777 break;
13778
13779 case 193: /* op: "[]=" */
13780#line 3915 "parse.y"
13781 { (yyval.id) = tASET; }
13782#line 13783 "parse.c"
13783 break;
13784
13785 case 194: /* op: '`' */
13786#line 3916 "parse.y"
13787 { (yyval.id) = '`'; }
13788#line 13789 "parse.c"
13789 break;
13790
13791 case 236: /* asgn_arg_rhs: lhs '=' lex_ctxt arg_rhs */
13792#line 2920 "parse.y"
13793 {
13794 (yyval.node) = node_assign(p, (NODE *)(yyvsp[-3].node), (yyvsp[0].node), (yyvsp[-1].ctxt), &(yyloc));
13795 /*% ripper: assign!($:1, $:4) %*/
13796 }
13797#line 13798 "parse.c"
13798 break;
13799
13800 case 238: /* op_asgn_arg_rhs: var_lhs "operator-assignment" lex_ctxt arg_rhs */
13801#line 3055 "parse.y"
13802 {
13803 (yyval.node) = new_op_assign(p, (yyvsp[-3].node), (yyvsp[-2].id), (yyvsp[0].node), (yyvsp[-1].ctxt), &(yyloc));
13804 /*% ripper: opassign!($:var_lhs, $:tOP_ASGN, $:rhs) %*/
13805 }
13806#line 13807 "parse.c"
13807 break;
13808
13809 case 239: /* op_asgn_arg_rhs: primary_value '[' opt_call_args rbracket "operator-assignment" lex_ctxt arg_rhs */
13810#line 3060 "parse.y"
13811 {
13812 (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]));
13813 /*% ripper: opassign!(aref_field!($:primary_value, $:opt_call_args), $:tOP_ASGN, $:rhs) %*/
13814 }
13815#line 13816 "parse.c"
13816 break;
13817
13818 case 240: /* op_asgn_arg_rhs: primary_value call_op "local variable or method" "operator-assignment" lex_ctxt arg_rhs */
13819#line 3065 "parse.y"
13820 {
13821 (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]));
13822 /*% ripper: opassign!(field!($:primary_value, $:call_op, $:tIDENTIFIER), $:tOP_ASGN, $:rhs) %*/
13823 }
13824#line 13825 "parse.c"
13825 break;
13826
13827 case 241: /* op_asgn_arg_rhs: primary_value call_op "constant" "operator-assignment" lex_ctxt arg_rhs */
13828#line 3070 "parse.y"
13829 {
13830 (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]));
13831 /*% ripper: opassign!(field!($:primary_value, $:call_op, $:tCONSTANT), $:tOP_ASGN, $:rhs) %*/
13832 }
13833#line 13834 "parse.c"
13834 break;
13835
13836 case 242: /* op_asgn_arg_rhs: primary_value "::" "local variable or method" "operator-assignment" lex_ctxt arg_rhs */
13837#line 3075 "parse.y"
13838 {
13839 (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]));
13840 /*% ripper: opassign!(field!($:primary_value, $:tCOLON2, $:tIDENTIFIER), $:tOP_ASGN, $:rhs) %*/
13841 }
13842#line 13843 "parse.c"
13843 break;
13844
13845 case 243: /* op_asgn_arg_rhs: primary_value "::" "constant" "operator-assignment" lex_ctxt arg_rhs */
13846#line 3080 "parse.y"
13847 {
13848 YYLTYPE loc = code_loc_gen(&(yylsp[-5]), &(yylsp[-3]));
13849 (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));
13850 /*% ripper: opassign!(const_path_field!($:primary_value, $:tCONSTANT), $:tOP_ASGN, $:rhs) %*/
13851 }
13852#line 13853 "parse.c"
13853 break;
13854
13855 case 244: /* op_asgn_arg_rhs: ":: at EXPR_BEG" "constant" "operator-assignment" lex_ctxt arg_rhs */
13856#line 3086 "parse.y"
13857 {
13858 YYLTYPE loc = code_loc_gen(&(yylsp[-4]), &(yylsp[-3]));
13859 (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));
13860 /*% ripper: opassign!(top_const_field!($:tCONSTANT), $:tOP_ASGN, $:rhs) %*/
13861 }
13862#line 13863 "parse.c"
13863 break;
13864
13865 case 245: /* op_asgn_arg_rhs: backref "operator-assignment" lex_ctxt arg_rhs */
13866#line 3092 "parse.y"
13867 {
13868 VALUE MAYBE_UNUSED(e) = rb_backref_error(p, (yyvsp[-3].node));
13869 (yyval.node) = NEW_ERROR(&(yyloc));
13870 /*% ripper[error]: assign_error!(?e, opassign!(var_field!($:backref), $:tOP_ASGN, $:rhs)) %*/
13871 }
13872#line 13873 "parse.c"
13873 break;
13874
13875 case 247: /* range_expr_arg: arg ".." arg */
13876#line 3114 "parse.y"
13877 {
13878 value_expr(p, (yyvsp[-2].node));
13879 value_expr(p, (yyvsp[0].node));
13880 (yyval.node) = NEW_DOT2((yyvsp[-2].node), (yyvsp[0].node), &(yyloc), &(yylsp[-1]));
13881 /*% ripper: dot2!($:1, $:3) %*/
13882 }
13883#line 13884 "parse.c"
13884 break;
13885
13886 case 248: /* range_expr_arg: arg "..." arg */
13887#line 3121 "parse.y"
13888 {
13889 value_expr(p, (yyvsp[-2].node));
13890 value_expr(p, (yyvsp[0].node));
13891 (yyval.node) = NEW_DOT3((yyvsp[-2].node), (yyvsp[0].node), &(yyloc), &(yylsp[-1]));
13892 /*% ripper: dot3!($:1, $:3) %*/
13893 }
13894#line 13895 "parse.c"
13895 break;
13896
13897 case 249: /* range_expr_arg: arg ".." */
13898#line 3128 "parse.y"
13899 {
13900 value_expr(p, (yyvsp[-1].node));
13901 (yyval.node) = NEW_DOT2((yyvsp[-1].node), new_nil_at(p, &(yylsp[0]).end_pos), &(yyloc), &(yylsp[0]));
13902 /*% ripper: dot2!($:1, Qnil) %*/
13903 }
13904#line 13905 "parse.c"
13905 break;
13906
13907 case 250: /* range_expr_arg: arg "..." */
13908#line 3134 "parse.y"
13909 {
13910 value_expr(p, (yyvsp[-1].node));
13911 (yyval.node) = NEW_DOT3((yyvsp[-1].node), new_nil_at(p, &(yylsp[0]).end_pos), &(yyloc), &(yylsp[0]));
13912 /*% ripper: dot3!($:1, Qnil) %*/
13913 }
13914#line 13915 "parse.c"
13915 break;
13916
13917 case 251: /* range_expr_arg: "(.." arg */
13918#line 3140 "parse.y"
13919 {
13920 value_expr(p, (yyvsp[0].node));
13921 (yyval.node) = NEW_DOT2(new_nil_at(p, &(yylsp[-1]).beg_pos), (yyvsp[0].node), &(yyloc), &(yylsp[-1]));
13922 /*% ripper: dot2!(Qnil, $:2) %*/
13923 }
13924#line 13925 "parse.c"
13925 break;
13926
13927 case 252: /* range_expr_arg: "(..." arg */
13928#line 3146 "parse.y"
13929 {
13930 value_expr(p, (yyvsp[0].node));
13931 (yyval.node) = NEW_DOT3(new_nil_at(p, &(yylsp[-1]).beg_pos), (yyvsp[0].node), &(yyloc), &(yylsp[-1]));
13932 /*% ripper: dot3!(Qnil, $:2) %*/
13933 }
13934#line 13935 "parse.c"
13935 break;
13936
13937 case 254: /* arg: arg '+' arg */
13938#line 3937 "parse.y"
13939 {
13940 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), '+', (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
13941 /*% ripper: binary!($:1, ID2VAL('\'+\''), $:3) %*/
13942 }
13943#line 13944 "parse.c"
13944 break;
13945
13946 case 255: /* arg: arg '-' arg */
13947#line 3942 "parse.y"
13948 {
13949 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), '-', (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
13950 /*% ripper: binary!($:1, ID2VAL('\'-\''), $:3) %*/
13951 }
13952#line 13953 "parse.c"
13953 break;
13954
13955 case 256: /* arg: arg '*' arg */
13956#line 3947 "parse.y"
13957 {
13958 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), '*', (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
13959 /*% ripper: binary!($:1, ID2VAL('\'*\''), $:3) %*/
13960 }
13961#line 13962 "parse.c"
13962 break;
13963
13964 case 257: /* arg: arg '/' arg */
13965#line 3952 "parse.y"
13966 {
13967 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), '/', (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
13968 /*% ripper: binary!($:1, ID2VAL('\'/\''), $:3) %*/
13969 }
13970#line 13971 "parse.c"
13971 break;
13972
13973 case 258: /* arg: arg '%' arg */
13974#line 3957 "parse.y"
13975 {
13976 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), '%', (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
13977 /*% ripper: binary!($:1, ID2VAL('\'%\''), $:3) %*/
13978 }
13979#line 13980 "parse.c"
13980 break;
13981
13982 case 259: /* arg: arg "**" arg */
13983#line 3962 "parse.y"
13984 {
13985 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), idPow, (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
13986 /*% ripper: binary!($:1, ID2VAL(idPow), $:3) %*/
13987 }
13988#line 13989 "parse.c"
13989 break;
13990
13991 case 260: /* arg: tUMINUS_NUM simple_numeric "**" arg */
13992#line 3967 "parse.y"
13993 {
13994 (yyval.node) = call_uni_op(p, call_bin_op(p, (yyvsp[-2].node), idPow, (yyvsp[0].node), &(yylsp[-2]), &(yyloc)), idUMinus, &(yylsp[-3]), &(yyloc));
13995 /*% ripper: unary!(ID2VAL(idUMinus), binary!($:2, ID2VAL(idPow), $:4)) %*/
13996 }
13997#line 13998 "parse.c"
13998 break;
13999
14000 case 261: /* arg: "unary+" arg */
14001#line 3972 "parse.y"
14002 {
14003 (yyval.node) = call_uni_op(p, (yyvsp[0].node), idUPlus, &(yylsp[-1]), &(yyloc));
14004 /*% ripper: unary!(ID2VAL(idUPlus), $:2) %*/
14005 }
14006#line 14007 "parse.c"
14007 break;
14008
14009 case 262: /* arg: "unary-" arg */
14010#line 3977 "parse.y"
14011 {
14012 (yyval.node) = call_uni_op(p, (yyvsp[0].node), idUMinus, &(yylsp[-1]), &(yyloc));
14013 /*% ripper: unary!(ID2VAL(idUMinus), $:2) %*/
14014 }
14015#line 14016 "parse.c"
14016 break;
14017
14018 case 263: /* arg: arg '|' arg */
14019#line 3982 "parse.y"
14020 {
14021 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), '|', (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
14022 /*% ripper: binary!($:1, ID2VAL('\'|\''), $:3) %*/
14023 }
14024#line 14025 "parse.c"
14025 break;
14026
14027 case 264: /* arg: arg '^' arg */
14028#line 3987 "parse.y"
14029 {
14030 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), '^', (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
14031 /*% ripper: binary!($:1, ID2VAL('\'^\''), $:3) %*/
14032 }
14033#line 14034 "parse.c"
14034 break;
14035
14036 case 265: /* arg: arg '&' arg */
14037#line 3992 "parse.y"
14038 {
14039 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), '&', (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
14040 /*% ripper: binary!($:1, ID2VAL('\'&\''), $:3) %*/
14041 }
14042#line 14043 "parse.c"
14043 break;
14044
14045 case 266: /* arg: arg "<=>" arg */
14046#line 3997 "parse.y"
14047 {
14048 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), idCmp, (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
14049 /*% ripper: binary!($:1, ID2VAL(idCmp), $:3) %*/
14050 }
14051#line 14052 "parse.c"
14052 break;
14053
14054 case 268: /* arg: arg "==" arg */
14055#line 4003 "parse.y"
14056 {
14057 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), idEq, (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
14058 /*% ripper: binary!($:1, ID2VAL(idEq), $:3) %*/
14059 }
14060#line 14061 "parse.c"
14061 break;
14062
14063 case 269: /* arg: arg "===" arg */
14064#line 4008 "parse.y"
14065 {
14066 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), idEqq, (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
14067 /*% ripper: binary!($:1, ID2VAL(idEqq), $:3) %*/
14068 }
14069#line 14070 "parse.c"
14070 break;
14071
14072 case 270: /* arg: arg "!=" arg */
14073#line 4013 "parse.y"
14074 {
14075 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), idNeq, (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
14076 /*% ripper: binary!($:1, ID2VAL(idNeq), $:3) %*/
14077 }
14078#line 14079 "parse.c"
14079 break;
14080
14081 case 271: /* arg: arg "=~" arg */
14082#line 4018 "parse.y"
14083 {
14084 (yyval.node) = match_op(p, (yyvsp[-2].node), (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
14085 /*% ripper: binary!($:1, ID2VAL(idEqTilde), $:3) %*/
14086 }
14087#line 14088 "parse.c"
14088 break;
14089
14090 case 272: /* arg: arg "!~" arg */
14091#line 4023 "parse.y"
14092 {
14093 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), idNeqTilde, (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
14094 /*% ripper: binary!($:1, ID2VAL(idNeqTilde), $:3) %*/
14095 }
14096#line 14097 "parse.c"
14097 break;
14098
14099 case 273: /* arg: '!' arg */
14100#line 4028 "parse.y"
14101 {
14102 (yyval.node) = call_uni_op(p, method_cond(p, (yyvsp[0].node), &(yylsp[0])), '!', &(yylsp[-1]), &(yyloc));
14103 /*% ripper: unary!(ID2VAL('\'!\''), $:2) %*/
14104 }
14105#line 14106 "parse.c"
14106 break;
14107
14108 case 274: /* arg: '~' arg */
14109#line 4033 "parse.y"
14110 {
14111 (yyval.node) = call_uni_op(p, (yyvsp[0].node), '~', &(yylsp[-1]), &(yyloc));
14112 /*% ripper: unary!(ID2VAL('\'~\''), $:2) %*/
14113 }
14114#line 14115 "parse.c"
14115 break;
14116
14117 case 275: /* arg: arg "<<" arg */
14118#line 4038 "parse.y"
14119 {
14120 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), idLTLT, (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
14121 /*% ripper: binary!($:1, ID2VAL(idLTLT), $:3) %*/
14122 }
14123#line 14124 "parse.c"
14124 break;
14125
14126 case 276: /* arg: arg ">>" arg */
14127#line 4043 "parse.y"
14128 {
14129 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), idGTGT, (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
14130 /*% ripper: binary!($:1, ID2VAL(idGTGT), $:3) %*/
14131 }
14132#line 14133 "parse.c"
14133 break;
14134
14135 case 277: /* arg: arg "&&" arg */
14136#line 4048 "parse.y"
14137 {
14138 (yyval.node) = logop(p, idANDOP, (yyvsp[-2].node), (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
14139 /*% ripper: binary!($:1, ID2VAL(idANDOP), $:3) %*/
14140 }
14141#line 14142 "parse.c"
14142 break;
14143
14144 case 278: /* arg: arg "||" arg */
14145#line 4053 "parse.y"
14146 {
14147 (yyval.node) = logop(p, idOROP, (yyvsp[-2].node), (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
14148 /*% ripper: binary!($:1, ID2VAL(idOROP), $:3) %*/
14149 }
14150#line 14151 "parse.c"
14151 break;
14152
14153 case 279: /* arg: "'defined?'" option_'\n' begin_defined arg */
14154#line 4058 "parse.y"
14155 {
14156 p->ctxt.in_defined = (yyvsp[-1].ctxt).in_defined;
14157 (yyval.node) = new_defined(p, (yyvsp[0].node), &(yyloc), &(yylsp[-3]));
14158 p->ctxt.has_trailing_semicolon = (yyvsp[-1].ctxt).has_trailing_semicolon;
14159 /*% ripper: defined!($:4) %*/
14160 }
14161#line 14162 "parse.c"
14162 break;
14163
14164 case 280: /* def_endless_method_endless_arg: defn_head f_opt_paren_args '=' endless_arg */
14165#line 2960 "parse.y"
14166 {
14167 endless_method_name(p, (yyvsp[-3].node_def_temp)->nd_mid, &(yylsp[-3]));
14168 restore_defun(p, (yyvsp[-3].node_def_temp));
14169 ((yyval.node) = (yyvsp[-3].node_def_temp)->nd_def)->nd_loc = (yyloc);
14170 (yyvsp[0].node) = new_scope_body(p, (yyvsp[-2].node_args), (yyvsp[0].node), (yyval.node), &(yyloc));
14171 RNODE_DEFN((yyval.node))->nd_defn = (yyvsp[0].node);
14172 /*% ripper: bodystmt!($:bodystmt, Qnil, Qnil, Qnil) %*/
14173 /*% ripper: def!($:head, $:args, $:$) %*/
14174 local_pop(p);
14175 }
14176#line 14177 "parse.c"
14177 break;
14178
14179 case 281: /* def_endless_method_endless_arg: defs_head f_opt_paren_args '=' endless_arg */
14180#line 2971 "parse.y"
14181 {
14182 endless_method_name(p, (yyvsp[-3].node_def_temp)->nd_mid, &(yylsp[-3]));
14183 restore_defun(p, (yyvsp[-3].node_def_temp));
14184 ((yyval.node) = (yyvsp[-3].node_def_temp)->nd_def)->nd_loc = (yyloc);
14185 (yyvsp[0].node) = new_scope_body(p, (yyvsp[-2].node_args), (yyvsp[0].node), (yyval.node), &(yyloc));
14186 RNODE_DEFS((yyval.node))->nd_defn = (yyvsp[0].node);
14187 /*% ripper: bodystmt!($:bodystmt, Qnil, Qnil, Qnil) %*/
14188 /*% ripper: defs!(*$:head[0..2], $:args, $:$) %*/
14189 local_pop(p);
14190 }
14191#line 14192 "parse.c"
14192 break;
14193
14194 case 285: /* ternary: arg '?' arg option_'\n' ':' arg */
14195#line 4070 "parse.y"
14196 {
14197 value_expr(p, (yyvsp[-5].node));
14198 (yyval.node) = new_if(p, (yyvsp[-5].node), (yyvsp[-3].node), (yyvsp[0].node), &(yyloc), &NULL_LOC, &(yylsp[-1]), &NULL_LOC);
14199 fixpos((yyval.node), (yyvsp[-5].node));
14200 /*% ripper: ifop!($:1, $:3, $:6) %*/
14201 }
14202#line 14203 "parse.c"
14203 break;
14204
14205 case 287: /* endless_arg: endless_arg "'rescue' modifier" after_rescue arg */
14206#line 4080 "parse.y"
14207 {
14208 p->ctxt.in_rescue = (yyvsp[-1].ctxt).in_rescue;
14209 (yyval.node) = rescued_expr(p, (yyvsp[-3].node), (yyvsp[0].node), &(yylsp[-3]), &(yylsp[-2]), &(yylsp[0]));
14210 /*% ripper: rescue_mod!($:1, $:4) %*/
14211 }
14212#line 14213 "parse.c"
14213 break;
14214
14215 case 288: /* endless_arg: "'not'" option_'\n' endless_arg */
14216#line 4086 "parse.y"
14217 {
14218 (yyval.node) = call_uni_op(p, method_cond(p, (yyvsp[0].node), &(yylsp[0])), METHOD_NOT, &(yylsp[-2]), &(yyloc));
14219 /*% ripper: unary!(ID2VAL(idNOT), $:3) %*/
14220 }
14221#line 14222 "parse.c"
14222 break;
14223
14224 case 289: /* relop: '>' */
14225#line 4092 "parse.y"
14226 {(yyval.id) = '>';}
14227#line 14228 "parse.c"
14228 break;
14229
14230 case 290: /* relop: '<' */
14231#line 4093 "parse.y"
14232 {(yyval.id) = '<';}
14233#line 14234 "parse.c"
14234 break;
14235
14236 case 291: /* relop: ">=" */
14237#line 4094 "parse.y"
14238 {(yyval.id) = idGE;}
14239#line 14240 "parse.c"
14240 break;
14241
14242 case 292: /* relop: "<=" */
14243#line 4095 "parse.y"
14244 {(yyval.id) = idLE;}
14245#line 14246 "parse.c"
14246 break;
14247
14248 case 293: /* rel_expr: arg relop arg */
14249#line 4099 "parse.y"
14250 {
14251 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), (yyvsp[-1].id), (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
14252 /*% ripper: binary!($:1, ID2VAL($2), $:3) %*/
14253 }
14254#line 14255 "parse.c"
14255 break;
14256
14257 case 294: /* rel_expr: rel_expr relop arg */
14258#line 4104 "parse.y"
14259 {
14260 rb_warning1("comparison '%s' after comparison", WARN_ID((yyvsp[-1].id)));
14261 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), (yyvsp[-1].id), (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
14262 /*% ripper: binary!($:1, ID2VAL($2), $:3) %*/
14263 }
14264#line 14265 "parse.c"
14265 break;
14266
14267 case 295: /* lex_ctxt: none */
14268#line 4112 "parse.y"
14269 {
14270 (yyval.ctxt) = p->ctxt;
14271 }
14272#line 14273 "parse.c"
14273 break;
14274
14275 case 296: /* begin_defined: lex_ctxt */
14276#line 4118 "parse.y"
14277 {
14278 p->ctxt.in_defined = 1;
14279 (yyval.ctxt) = (yyvsp[0].ctxt);
14280 }
14281#line 14282 "parse.c"
14282 break;
14283
14284 case 297: /* after_rescue: lex_ctxt */
14285#line 4125 "parse.y"
14286 {
14287 p->ctxt.in_rescue = after_rescue;
14288 (yyval.ctxt) = (yyvsp[0].ctxt);
14289 }
14290#line 14291 "parse.c"
14291 break;
14292
14293 case 298: /* value_expr_arg: arg */
14294#line 3155 "parse.y"
14295 {
14296 value_expr(p, (yyvsp[0].node));
14297 (yyval.node) = (yyvsp[0].node);
14298 }
14299#line 14300 "parse.c"
14300 break;
14301
14302 case 302: /* aref_args: args ',' assocs trailer */
14303#line 4137 "parse.y"
14304 {
14305 (yyval.node) = (yyvsp[-1].node) ? arg_append(p, (yyvsp[-3].node), new_hash(p, (yyvsp[-1].node), &(yylsp[-1])), &(yyloc)) : (yyvsp[-3].node);
14306 /*% ripper: args_add!($:1, bare_assoc_hash!($:3)) %*/
14307 }
14308#line 14309 "parse.c"
14309 break;
14310
14311 case 303: /* aref_args: assocs trailer */
14312#line 4142 "parse.y"
14313 {
14314 (yyval.node) = (yyvsp[-1].node) ? NEW_LIST(new_hash(p, (yyvsp[-1].node), &(yylsp[-1])), &(yyloc)) : 0;
14315 /*% ripper: args_add!(args_new!, bare_assoc_hash!($:1)) %*/
14316 }
14317#line 14318 "parse.c"
14318 break;
14319
14320 case 304: /* arg_rhs: arg */
14321#line 4149 "parse.y"
14322 {
14323 value_expr(p, (yyvsp[0].node));
14324 (yyval.node) = (yyvsp[0].node);
14325 }
14326#line 14327 "parse.c"
14327 break;
14328
14329 case 305: /* arg_rhs: arg "'rescue' modifier" after_rescue arg */
14330#line 4154 "parse.y"
14331 {
14332 p->ctxt.in_rescue = (yyvsp[-1].ctxt).in_rescue;
14333 value_expr(p, (yyvsp[-3].node));
14334 (yyval.node) = rescued_expr(p, (yyvsp[-3].node), (yyvsp[0].node), &(yylsp[-3]), &(yylsp[-2]), &(yylsp[0]));
14335 /*% ripper: rescue_mod!($:1, $:4) %*/
14336 }
14337#line 14338 "parse.c"
14338 break;
14339
14340 case 306: /* paren_args: '(' opt_call_args rparen */
14341#line 4163 "parse.y"
14342 {
14343 (yyval.node) = (yyvsp[-1].node);
14344 /*% ripper: arg_paren!($:2) %*/
14345 }
14346#line 14347 "parse.c"
14347 break;
14348
14349 case 307: /* paren_args: '(' args ',' args_forward rparen */
14350#line 4168 "parse.y"
14351 {
14352 if (!check_forwarding_args(p)) {
14353 (yyval.node) = 0;
14354 }
14355 else {
14356 (yyval.node) = new_args_forward_call(p, (yyvsp[-3].node), &(yylsp[-1]), &(yyloc));
14357 /*% ripper: arg_paren!(args_add!($:2, $:4)) %*/
14358 }
14359 }
14360#line 14361 "parse.c"
14361 break;
14362
14363 case 308: /* paren_args: '(' args_forward rparen */
14364#line 4178 "parse.y"
14365 {
14366 if (!check_forwarding_args(p)) {
14367 (yyval.node) = 0;
14368 }
14369 else {
14370 (yyval.node) = new_args_forward_call(p, 0, &(yylsp[-1]), &(yyloc));
14371 /*% ripper: arg_paren!($:2) %*/
14372 }
14373 }
14374#line 14375 "parse.c"
14375 break;
14376
14377 case 310: /* opt_paren_args: paren_args */
14378#line 4191 "parse.y"
14379 {
14380 (yyval.node) = (yyvsp[0].node) ? (yyvsp[0].node) : NODE_SPECIAL_EMPTY_ARGS;
14381 }
14382#line 14383 "parse.c"
14383 break;
14384
14385 case 314: /* opt_call_args: args ',' assocs ',' */
14386#line 4200 "parse.y"
14387 {
14388 (yyval.node) = (yyvsp[-1].node) ? arg_append(p, (yyvsp[-3].node), new_hash(p, (yyvsp[-1].node), &(yylsp[-1])), &(yyloc)) : (yyvsp[-3].node);
14389 /*% ripper: args_add!($:1, bare_assoc_hash!($:3)) %*/
14390 }
14391#line 14392 "parse.c"
14392 break;
14393
14394 case 315: /* opt_call_args: assocs ',' */
14395#line 4205 "parse.y"
14396 {
14397 (yyval.node) = (yyvsp[-1].node) ? NEW_LIST(new_hash(p, (yyvsp[-1].node), &(yylsp[-1])), &(yylsp[-1])) : 0;
14398 /*% ripper: args_add!(args_new!, bare_assoc_hash!($:1)) %*/
14399 }
14400#line 14401 "parse.c"
14401 break;
14402
14403 case 316: /* value_expr_command: command */
14404#line 3155 "parse.y"
14405 {
14406 value_expr(p, (yyvsp[0].node));
14407 (yyval.node) = (yyvsp[0].node);
14408 }
14409#line 14410 "parse.c"
14410 break;
14411
14412 case 317: /* call_args: value_expr_command */
14413#line 4212 "parse.y"
14414 {
14415 (yyval.node) = NEW_LIST((yyvsp[0].node), &(yyloc));
14416 /*% ripper: args_add!(args_new!, $:1) %*/
14417 }
14418#line 14419 "parse.c"
14419 break;
14420
14421 case 318: /* call_args: def_endless_method_endless_command */
14422#line 4217 "parse.y"
14423 {
14424 (yyval.node) = NEW_LIST((yyvsp[0].node), &(yyloc));
14425 /*% ripper: args_add!(args_new!, $:1) %*/
14426 }
14427#line 14428 "parse.c"
14428 break;
14429
14430 case 319: /* call_args: args opt_block_arg */
14431#line 4222 "parse.y"
14432 {
14433 (yyval.node) = arg_blk_pass((yyvsp[-1].node), (yyvsp[0].node_block_pass));
14434 /*% ripper: args_add_block!($:1, $:2) %*/
14435 }
14436#line 14437 "parse.c"
14437 break;
14438
14439 case 320: /* call_args: assocs opt_block_arg */
14440#line 4227 "parse.y"
14441 {
14442 (yyval.node) = (yyvsp[-1].node) ? NEW_LIST(new_hash(p, (yyvsp[-1].node), &(yylsp[-1])), &(yylsp[-1])) : 0;
14443 (yyval.node) = arg_blk_pass((yyval.node), (yyvsp[0].node_block_pass));
14444 /*% ripper: args_add_block!(args_add!(args_new!, bare_assoc_hash!($:1)), $:2) %*/
14445 }
14446#line 14447 "parse.c"
14447 break;
14448
14449 case 321: /* call_args: args ',' assocs opt_block_arg */
14450#line 4233 "parse.y"
14451 {
14452 (yyval.node) = (yyvsp[-1].node) ? arg_append(p, (yyvsp[-3].node), new_hash(p, (yyvsp[-1].node), &(yylsp[-1])), &(yyloc)) : (yyvsp[-3].node);
14453 (yyval.node) = arg_blk_pass((yyval.node), (yyvsp[0].node_block_pass));
14454 /*% ripper: args_add_block!(args_add!($:1, bare_assoc_hash!($:3)), $:4) %*/
14455 }
14456#line 14457 "parse.c"
14457 break;
14458
14459 case 323: /* $@13: %empty */
14460#line 4242 "parse.y"
14461 {
14462 /* If call_args starts with a open paren '(' or '[',
14463 * look-ahead reading of the letters calls CMDARG_PUSH(0),
14464 * but the push must be done after CMDARG_PUSH(1).
14465 * So this code makes them consistent by first cancelling
14466 * the premature CMDARG_PUSH(0), doing CMDARG_PUSH(1),
14467 * and finally redoing CMDARG_PUSH(0).
14468 */
14469 int lookahead = 0;
14470 switch (yychar) {
14471 case '(': case tLPAREN: case tLPAREN_ARG: case '[': case tLBRACK:
14472 lookahead = 1;
14473 }
14474 if (lookahead) CMDARG_POP();
14475 CMDARG_PUSH(1);
14476 if (lookahead) CMDARG_PUSH(0);
14477 }
14478#line 14479 "parse.c"
14479 break;
14480
14481 case 324: /* command_args: $@13 call_args */
14482#line 4260 "parse.y"
14483 {
14484 /* call_args can be followed by tLBRACE_ARG (that does CMDARG_PUSH(0) in the lexer)
14485 * but the push must be done after CMDARG_POP() in the parser.
14486 * So this code does CMDARG_POP() to pop 0 pushed by tLBRACE_ARG,
14487 * CMDARG_POP() to pop 1 pushed by command_args,
14488 * and CMDARG_PUSH(0) to restore back the flag set by tLBRACE_ARG.
14489 */
14490 int lookahead = 0;
14491 switch (yychar) {
14492 case tLBRACE_ARG:
14493 lookahead = 1;
14494 }
14495 if (lookahead) CMDARG_POP();
14496 CMDARG_POP();
14497 if (lookahead) CMDARG_PUSH(0);
14498 (yyval.node) = (yyvsp[0].node);
14499 /*% ripper: $:2 %*/
14500 }
14501#line 14502 "parse.c"
14502 break;
14503
14504 case 325: /* block_arg: "&" arg_value */
14505#line 4281 "parse.y"
14506 {
14507 (yyval.node_block_pass) = NEW_BLOCK_PASS((yyvsp[0].node), &(yyloc), &(yylsp[-1]));
14508 /*% ripper: $:2 %*/
14509 }
14510#line 14511 "parse.c"
14511 break;
14512
14513 case 326: /* block_arg: "&" */
14514#line 4286 "parse.y"
14515 {
14516 forwarding_arg_check(p, idFWD_BLOCK, idFWD_ALL, "block");
14517 (yyval.node_block_pass) = NEW_BLOCK_PASS(NEW_LVAR(idFWD_BLOCK, &(yylsp[0])), &(yyloc), &(yylsp[0]));
14518 /*% ripper: Qnil %*/
14519 }
14520#line 14521 "parse.c"
14521 break;
14522
14523 case 327: /* opt_block_arg: ',' block_arg */
14524#line 4294 "parse.y"
14525 {
14526 (yyval.node_block_pass) = (yyvsp[0].node_block_pass);
14527 /*% ripper: $:2 %*/
14528 }
14529#line 14530 "parse.c"
14530 break;
14531
14532 case 328: /* opt_block_arg: none */
14533#line 4299 "parse.y"
14534 {
14535 (yyval.node_block_pass) = 0;
14536 /*% ripper: Qfalse %*/
14537 }
14538#line 14539 "parse.c"
14539 break;
14540
14541 case 329: /* args: arg_value */
14542#line 4307 "parse.y"
14543 {
14544 (yyval.node) = NEW_LIST((yyvsp[0].node), &(yyloc));
14545 /*% ripper: args_add!(args_new!, $:arg_value) %*/
14546 }
14547#line 14548 "parse.c"
14548 break;
14549
14550 case 330: /* args: arg_splat */
14551#line 4312 "parse.y"
14552 {
14553 (yyval.node) = (yyvsp[0].node);
14554 /*% ripper: args_add_star!(args_new!, $:arg_splat) %*/
14555 }
14556#line 14557 "parse.c"
14557 break;
14558
14559 case 331: /* args: args ',' arg_value */
14560#line 4317 "parse.y"
14561 {
14562 (yyval.node) = last_arg_append(p, (yyvsp[-2].node), (yyvsp[0].node), &(yyloc));
14563 /*% ripper: args_add!($:non_last_args, $:arg_value) %*/
14564 }
14565#line 14566 "parse.c"
14566 break;
14567
14568 case 332: /* args: args ',' arg_splat */
14569#line 4322 "parse.y"
14570 {
14571 (yyval.node) = rest_arg_append(p, (yyvsp[-2].node), RNODE_SPLAT((yyvsp[0].node))->nd_head, &(yyloc));
14572 /*% ripper: args_add_star!($:non_last_args, $:arg_splat) %*/
14573 }
14574#line 14575 "parse.c"
14575 break;
14576
14577 case 333: /* arg_splat: "*" arg_value */
14578#line 4330 "parse.y"
14579 {
14580 (yyval.node) = NEW_SPLAT((yyvsp[0].node), &(yyloc), &(yylsp[-1]));
14581 /*% ripper: $:arg_value %*/
14582 }
14583#line 14584 "parse.c"
14584 break;
14585
14586 case 334: /* arg_splat: "*" */
14587#line 4335 "parse.y"
14588 {
14589 forwarding_arg_check(p, idFWD_REST, idFWD_ALL, "rest");
14590 (yyval.node) = NEW_SPLAT(NEW_LVAR(idFWD_REST, &(yylsp[0])), &(yyloc), &(yylsp[0]));
14591 /*% ripper: Qnil %*/
14592 }
14593#line 14594 "parse.c"
14594 break;
14595
14596 case 337: /* mrhs: args ',' arg_value */
14597#line 4349 "parse.y"
14598 {
14599 (yyval.node) = last_arg_append(p, (yyvsp[-2].node), (yyvsp[0].node), &(yyloc));
14600 /*% ripper: mrhs_add!(mrhs_new_from_args!($:args), $:arg_value) %*/
14601 }
14602#line 14603 "parse.c"
14603 break;
14604
14605 case 338: /* mrhs: args ',' "*" arg_value */
14606#line 4354 "parse.y"
14607 {
14608 (yyval.node) = rest_arg_append(p, (yyvsp[-3].node), (yyvsp[0].node), &(yyloc));
14609 /*% ripper: mrhs_add_star!(mrhs_new_from_args!($:args), $:arg_value) %*/
14610 }
14611#line 14612 "parse.c"
14612 break;
14613
14614 case 339: /* mrhs: "*" arg_value */
14615#line 4359 "parse.y"
14616 {
14617 (yyval.node) = NEW_SPLAT((yyvsp[0].node), &(yyloc), &(yylsp[-1]));
14618 /*% ripper: mrhs_add_star!(mrhs_new!, $:arg_value) %*/
14619 }
14620#line 14621 "parse.c"
14621 break;
14622
14623 case 350: /* primary: "method" */
14624#line 4380 "parse.y"
14625 {
14626 (yyval.node) = (NODE *)NEW_FCALL((yyvsp[0].id), 0, &(yyloc));
14627 /*% ripper: method_add_arg!(fcall!($:fid), args_new!) %*/
14628 }
14629#line 14630 "parse.c"
14630 break;
14631
14632 case 351: /* $@14: %empty */
14633#line 4385 "parse.y"
14634 {
14635 CMDARG_PUSH(0);
14636 }
14637#line 14638 "parse.c"
14638 break;
14639
14640 case 352: /* primary: k_begin $@14 bodystmt k_end */
14641#line 4390 "parse.y"
14642 {
14643 CMDARG_POP();
14644 set_line_body((yyvsp[-1].node), (yylsp[-3]).end_pos.lineno);
14645 (yyval.node) = NEW_BEGIN((yyvsp[-1].node), &(yyloc));
14646 nd_set_line((yyval.node), (yylsp[-3]).end_pos.lineno);
14647 /*% ripper: begin!($:body) %*/
14648 }
14649#line 14650 "parse.c"
14650 break;
14651
14652 case 353: /* $@15: %empty */
14653#line 4397 "parse.y"
14654 {SET_LEX_STATE(EXPR_ENDARG);}
14655#line 14656 "parse.c"
14656 break;
14657
14658 case 354: /* primary: "( arg" compstmt_stmts $@15 ')' */
14659#line 4398 "parse.y"
14660 {
14661 if (nd_type_p((yyvsp[-2].node), NODE_SELF)) RNODE_SELF((yyvsp[-2].node))->nd_state = 0;
14662 (yyval.node) = (yyvsp[-2].node);
14663 /*% ripper: paren!($:body) %*/
14664 }
14665#line 14666 "parse.c"
14666 break;
14667
14668 case 355: /* primary: "(" compstmt_stmts ')' */
14669#line 4404 "parse.y"
14670 {
14671 if (nd_type_p((yyvsp[-1].node), NODE_SELF)) RNODE_SELF((yyvsp[-1].node))->nd_state = 0;
14672 (yyval.node) = NEW_BLOCK((yyvsp[-1].node), &(yyloc));
14673 /*% ripper: paren!($:body) %*/
14674 }
14675#line 14676 "parse.c"
14676 break;
14677
14678 case 356: /* primary: primary_value "::" "constant" */
14679#line 4410 "parse.y"
14680 {
14681 (yyval.node) = NEW_COLON2((yyvsp[-2].node), (yyvsp[0].id), &(yyloc), &(yylsp[-1]), &(yylsp[0]));
14682 /*% ripper: const_path_ref!($:recv, $:name) %*/
14683 }
14684#line 14685 "parse.c"
14685 break;
14686
14687 case 357: /* primary: ":: at EXPR_BEG" "constant" */
14688#line 4415 "parse.y"
14689 {
14690 (yyval.node) = NEW_COLON3((yyvsp[0].id), &(yyloc), &(yylsp[-1]), &(yylsp[0]));
14691 /*% ripper: top_const_ref!($:name) %*/
14692 }
14693#line 14694 "parse.c"
14694 break;
14695
14696 case 358: /* primary: "[" aref_args ']' */
14697#line 4420 "parse.y"
14698 {
14699 (yyval.node) = make_list((yyvsp[-1].node), &(yyloc));
14700 /*% ripper: array!($:args) %*/
14701 }
14702#line 14703 "parse.c"
14703 break;
14704
14705 case 359: /* primary: "{" assoc_list '}' */
14706#line 4425 "parse.y"
14707 {
14708 (yyval.node) = new_hash(p, (yyvsp[-1].node), &(yyloc));
14709 RNODE_HASH((yyval.node))->nd_brace = TRUE;
14710 /*% ripper: hash!($:list) %*/
14711 }
14712#line 14713 "parse.c"
14713 break;
14714
14715 case 360: /* primary: k_return */
14716#line 4431 "parse.y"
14717 {
14718 (yyval.node) = NEW_RETURN(0, &(yyloc), &(yylsp[0]));
14719 /*% ripper: return0! %*/
14720 }
14721#line 14722 "parse.c"
14722 break;
14723
14724 case 361: /* primary: k_yield '(' call_args rparen */
14725#line 4436 "parse.y"
14726 {
14727 (yyval.node) = NEW_YIELD((yyvsp[-1].node), &(yyloc), &(yylsp[-3]), &(yylsp[-2]), &(yylsp[0]));
14728 /*% ripper: yield!(paren!($:args)) %*/
14729 }
14730#line 14731 "parse.c"
14731 break;
14732
14733 case 362: /* primary: k_yield '(' rparen */
14734#line 4441 "parse.y"
14735 {
14736 (yyval.node) = NEW_YIELD(0, &(yyloc), &(yylsp[-2]), &(yylsp[-1]), &(yylsp[0]));
14737 /*% ripper: yield!(paren!(args_new!)) %*/
14738 }
14739#line 14740 "parse.c"
14740 break;
14741
14742 case 363: /* primary: k_yield */
14743#line 4446 "parse.y"
14744 {
14745 (yyval.node) = NEW_YIELD(0, &(yyloc), &(yylsp[0]), &NULL_LOC, &NULL_LOC);
14746 /*% ripper: yield0! %*/
14747 }
14748#line 14749 "parse.c"
14749 break;
14750
14751 case 364: /* primary: "'defined?'" option_'\n' '(' begin_defined expr rparen */
14752#line 4451 "parse.y"
14753 {
14754 p->ctxt.in_defined = (yyvsp[-2].ctxt).in_defined;
14755 (yyval.node) = new_defined(p, (yyvsp[-1].node), &(yyloc), &(yylsp[-5]));
14756 p->ctxt.has_trailing_semicolon = (yyvsp[-2].ctxt).has_trailing_semicolon;
14757 /*% ripper: defined!($:arg) %*/
14758 }
14759#line 14760 "parse.c"
14760 break;
14761
14762 case 365: /* primary: "'not'" '(' expr rparen */
14763#line 4458 "parse.y"
14764 {
14765 (yyval.node) = call_uni_op(p, method_cond(p, (yyvsp[-1].node), &(yylsp[-1])), METHOD_NOT, &(yylsp[-3]), &(yyloc));
14766 /*% ripper: unary!(ID2VAL(idNOT), $:arg) %*/
14767 }
14768#line 14769 "parse.c"
14769 break;
14770
14771 case 366: /* primary: "'not'" '(' rparen */
14772#line 4463 "parse.y"
14773 {
14774 (yyval.node) = call_uni_op(p, method_cond(p, NEW_NIL(&(yylsp[-1])), &(yylsp[-1])), METHOD_NOT, &(yylsp[-2]), &(yyloc));
14775 /*% ripper: unary!(ID2VAL(idNOT), Qnil) %*/
14776 }
14777#line 14778 "parse.c"
14778 break;
14779
14780 case 367: /* primary: fcall brace_block */
14781#line 4468 "parse.y"
14782 {
14783 (yyval.node) = method_add_block(p, (NODE *)(yyvsp[-1].node_fcall), (yyvsp[0].node), &(yyloc));
14784 /*% ripper: method_add_block!(method_add_arg!(fcall!($:call), args_new!), $:block) %*/
14785 }
14786#line 14787 "parse.c"
14787 break;
14788
14789 case 369: /* primary: method_call brace_block */
14790#line 4474 "parse.y"
14791 {
14792 block_dup_check(p, get_nd_args(p, (yyvsp[-1].node)), (yyvsp[0].node));
14793 (yyval.node) = method_add_block(p, (yyvsp[-1].node), (yyvsp[0].node), &(yyloc));
14794 /*% ripper: method_add_block!($:call, $:block) %*/
14795 }
14796#line 14797 "parse.c"
14797 break;
14798
14799 case 371: /* primary: k_if expr_value then compstmt_stmts if_tail k_end */
14800#line 4484 "parse.y"
14801 {
14802 if ((yyvsp[-1].node) && nd_type_p((yyvsp[-1].node), NODE_IF))
14803 RNODE_IF((yyvsp[-1].node))->end_keyword_loc = (yylsp[0]);
14804
14805 (yyval.node) = new_if(p, (yyvsp[-4].node), (yyvsp[-2].node), (yyvsp[-1].node), &(yyloc), &(yylsp[-5]), &(yylsp[-3]), &(yylsp[0]));
14806 fixpos((yyval.node), (yyvsp[-4].node));
14807 /*% ripper: if!($:cond, $:body, $:tail) %*/
14808 }
14809#line 14810 "parse.c"
14810 break;
14811
14812 case 372: /* primary: k_unless expr_value then compstmt_stmts opt_else k_end */
14813#line 4496 "parse.y"
14814 {
14815 (yyval.node) = new_unless(p, (yyvsp[-4].node), (yyvsp[-2].node), (yyvsp[-1].node), &(yyloc), &(yylsp[-5]), &(yylsp[-3]), &(yylsp[0]));
14816 fixpos((yyval.node), (yyvsp[-4].node));
14817 /*% ripper: unless!($:cond, $:body, $:tail) %*/
14818 }
14819#line 14820 "parse.c"
14820 break;
14821
14822 case 373: /* primary: k_while expr_value_do compstmt_stmts k_end */
14823#line 4504 "parse.y"
14824 {
14825 restore_block_exit(p, (yyvsp[-3].node_exits));
14826 (yyval.node) = NEW_WHILE(cond(p, (yyvsp[-2].node), &(yylsp[-2])), (yyvsp[-1].node), 1, &(yyloc), &(yylsp[-3]), &(yylsp[0]));
14827 fixpos((yyval.node), (yyvsp[-2].node));
14828 /*% ripper: while!($:cond, $:body) %*/
14829 }
14830#line 14831 "parse.c"
14831 break;
14832
14833 case 374: /* primary: k_until expr_value_do compstmt_stmts k_end */
14834#line 4513 "parse.y"
14835 {
14836 restore_block_exit(p, (yyvsp[-3].node_exits));
14837 (yyval.node) = NEW_UNTIL(cond(p, (yyvsp[-2].node), &(yylsp[-2])), (yyvsp[-1].node), 1, &(yyloc), &(yylsp[-3]), &(yylsp[0]));
14838 fixpos((yyval.node), (yyvsp[-2].node));
14839 /*% ripper: until!($:cond, $:body) %*/
14840 }
14841#line 14842 "parse.c"
14842 break;
14843
14844 case 375: /* @16: %empty */
14845#line 4520 "parse.y"
14846 {
14847 (yyval.labels) = p->case_labels;
14848 p->case_labels = CHECK_LITERAL_WHEN;
14849 }
14850#line 14851 "parse.c"
14851 break;
14852
14853 case 376: /* primary: k_case expr_value option_terms @16 case_body k_end */
14854#line 4526 "parse.y"
14855 {
14856 if (CASE_LABELS_ENABLED_P(p->case_labels)) st_free_table(p->case_labels);
14857 p->case_labels = (yyvsp[-2].labels);
14858 (yyval.node) = NEW_CASE((yyvsp[-4].node), (yyvsp[-1].node), &(yyloc), &(yylsp[-5]), &(yylsp[0]));
14859 fixpos((yyval.node), (yyvsp[-4].node));
14860 /*% ripper: case!($:expr, $:body) %*/
14861 }
14862#line 14863 "parse.c"
14863 break;
14864
14865 case 377: /* @17: %empty */
14866#line 4534 "parse.y"
14867 {
14868 (yyval.labels) = p->case_labels;
14869 p->case_labels = 0;
14870 }
14871#line 14872 "parse.c"
14872 break;
14873
14874 case 378: /* primary: k_case option_terms @17 case_body k_end */
14875#line 4540 "parse.y"
14876 {
14877 if (p->case_labels) st_free_table(p->case_labels);
14878 p->case_labels = (yyvsp[-2].labels);
14879 (yyval.node) = NEW_CASE2((yyvsp[-1].node), &(yyloc), &(yylsp[-4]), &(yylsp[0]));
14880 /*% ripper: case!(Qnil, $:body) %*/
14881 }
14882#line 14883 "parse.c"
14883 break;
14884
14885 case 379: /* primary: k_case expr_value option_terms p_case_body k_end */
14886#line 4549 "parse.y"
14887 {
14888 (yyval.node) = NEW_CASE3((yyvsp[-3].node), (yyvsp[-1].node), &(yyloc), &(yylsp[-4]), &(yylsp[0]));
14889 /*% ripper: case!($:expr, $:body) %*/
14890 }
14891#line 14892 "parse.c"
14892 break;
14893
14894 case 380: /* $@18: %empty */
14895#line 4554 "parse.y"
14896 {COND_PUSH(1);}
14897#line 14898 "parse.c"
14898 break;
14899
14900 case 381: /* $@19: %empty */
14901#line 4554 "parse.y"
14902 {COND_POP();}
14903#line 14904 "parse.c"
14904 break;
14905
14906 case 382: /* primary: k_for for_var "'in'" $@18 expr_value do $@19 compstmt_stmts k_end */
14907#line 4557 "parse.y"
14908 {
14909 restore_block_exit(p, (yyvsp[-8].node_exits));
14910 /*
14911 * for a, b, c in e
14912 * #=>
14913 * e.each{|*x| a, b, c = x}
14914 *
14915 * for a in e
14916 * #=>
14917 * e.each{|x| a, = x}
14918 */
14919 ID id = internal_id(p);
14920 rb_node_args_aux_t *m = NEW_ARGS_AUX(0, 0, &NULL_LOC);
14921 rb_node_args_t *args;
14922 NODE *scope, *internal_var = NEW_DVAR(id, &(yylsp[-7]));
14923 rb_ast_id_table_t *tbl = rb_ast_new_local_table(p->ast, 1);
14924 tbl->ids[0] = id; /* internal id */
14925
14926 switch (nd_type((yyvsp[-7].node))) {
14927 case NODE_LASGN:
14928 case NODE_DASGN: /* e.each {|internal_var| a = internal_var; ... } */
14929 set_nd_value(p, (yyvsp[-7].node), internal_var);
14930 id = 0;
14931 m->nd_plen = 1;
14932 m->nd_next = (yyvsp[-7].node);
14933 break;
14934 case NODE_MASGN: /* e.each {|*internal_var| a, b, c = (internal_var.length == 1 && Array === (tmp = internal_var[0]) ? tmp : internal_var); ... } */
14935 m->nd_next = node_assign(p, (yyvsp[-7].node), NEW_FOR_MASGN(internal_var, &(yylsp[-7])), NO_LEX_CTXT, &(yylsp[-7]));
14936 break;
14937 default: /* e.each {|*internal_var| @a, B, c[1], d.attr = internal_val; ... } */
14938 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]));
14939 }
14940 /* {|*internal_id| <m> = internal_id; ... } */
14941 args = new_args(p, m, 0, id, 0, new_empty_args_tail(p, &(yylsp[-7])), &(yylsp[-7]));
14942 scope = NEW_SCOPE2(tbl, args, (yyvsp[-1].node), NULL, &(yyloc));
14943 YYLTYPE do_keyword_loc = (yyvsp[-3].id) == keyword_do_cond ? (yylsp[-3]) : NULL_LOC;
14944 (yyval.node) = NEW_FOR((yyvsp[-4].node), scope, &(yyloc), &(yylsp[-8]), &(yylsp[-6]), &do_keyword_loc, &(yylsp[0]));
14945 RNODE_SCOPE(scope)->nd_parent = (yyval.node);
14946 fixpos((yyval.node), (yyvsp[-7].node));
14947 /*% ripper: for!($:for_var, $:expr_value, $:compstmt) %*/
14948 }
14949#line 14950 "parse.c"
14950 break;
14951
14952 case 383: /* $@20: %empty */
14953#line 4599 "parse.y"
14954 {
14955 begin_definition("class", &(yylsp[-2]), &(yylsp[-1]));
14956 }
14957#line 14958 "parse.c"
14958 break;
14959
14960 case 384: /* primary: k_class cpath superclass $@20 bodystmt k_end */
14961#line 4604 "parse.y"
14962 {
14963 YYLTYPE inheritance_operator_loc = NULL_LOC;
14964 if ((yyvsp[-3].node)) {
14965 inheritance_operator_loc = (yylsp[-3]);
14966 inheritance_operator_loc.end_pos.column = inheritance_operator_loc.beg_pos.column + 1;
14967 }
14968 (yyval.node) = NEW_CLASS((yyvsp[-4].node), (yyvsp[-1].node), (yyvsp[-3].node), &(yyloc), &(yylsp[-5]), &inheritance_operator_loc, &(yylsp[0]));
14969 nd_set_line(RNODE_CLASS((yyval.node))->nd_body, (yylsp[0]).end_pos.lineno);
14970 set_line_body((yyvsp[-1].node), (yylsp[-3]).end_pos.lineno);
14971 nd_set_line((yyval.node), (yylsp[-3]).end_pos.lineno);
14972 /*% ripper: class!($:cpath, $:superclass, $:bodystmt) %*/
14973 local_pop(p);
14974 p->ctxt.in_class = (yyvsp[-5].ctxt).in_class;
14975 p->ctxt.cant_return = (yyvsp[-5].ctxt).cant_return;
14976 p->ctxt.shareable_constant_value = (yyvsp[-5].ctxt).shareable_constant_value;
14977 }
14978#line 14979 "parse.c"
14979 break;
14980
14981 case 385: /* $@21: %empty */
14982#line 4621 "parse.y"
14983 {
14984 begin_definition("", &(yylsp[-2]), &(yylsp[-1]));
14985 }
14986#line 14987 "parse.c"
14987 break;
14988
14989 case 386: /* primary: k_class "<<" expr_value $@21 term bodystmt k_end */
14990#line 4627 "parse.y"
14991 {
14992 (yyval.node) = NEW_SCLASS((yyvsp[-4].node), (yyvsp[-1].node), &(yyloc), &(yylsp[-6]), &(yylsp[-5]), &(yylsp[0]));
14993 nd_set_line(RNODE_SCLASS((yyval.node))->nd_body, (yylsp[0]).end_pos.lineno);
14994 set_line_body((yyvsp[-1].node), nd_line((yyvsp[-4].node)));
14995 fixpos((yyval.node), (yyvsp[-4].node));
14996 /*% ripper: sclass!($:expr_value, $:bodystmt) %*/
14997 local_pop(p);
14998 p->ctxt.in_def = (yyvsp[-6].ctxt).in_def;
14999 p->ctxt.in_class = (yyvsp[-6].ctxt).in_class;
15000 p->ctxt.cant_return = (yyvsp[-6].ctxt).cant_return;
15001 p->ctxt.shareable_constant_value = (yyvsp[-6].ctxt).shareable_constant_value;
15002 }
15003#line 15004 "parse.c"
15004 break;
15005
15006 case 387: /* $@22: %empty */
15007#line 4640 "parse.y"
15008 {
15009 begin_definition("module", &(yylsp[-1]), &(yylsp[0]));
15010 }
15011#line 15012 "parse.c"
15012 break;
15013
15014 case 388: /* primary: k_module cpath $@22 bodystmt k_end */
15015#line 4645 "parse.y"
15016 {
15017 (yyval.node) = NEW_MODULE((yyvsp[-3].node), (yyvsp[-1].node), &(yyloc), &(yylsp[-4]), &(yylsp[0]));
15018 nd_set_line(RNODE_MODULE((yyval.node))->nd_body, (yylsp[0]).end_pos.lineno);
15019 set_line_body((yyvsp[-1].node), (yylsp[-3]).end_pos.lineno);
15020 nd_set_line((yyval.node), (yylsp[-3]).end_pos.lineno);
15021 /*% ripper: module!($:cpath, $:bodystmt) %*/
15022 local_pop(p);
15023 p->ctxt.in_class = (yyvsp[-4].ctxt).in_class;
15024 p->ctxt.cant_return = (yyvsp[-4].ctxt).cant_return;
15025 p->ctxt.shareable_constant_value = (yyvsp[-4].ctxt).shareable_constant_value;
15026 }
15027#line 15028 "parse.c"
15028 break;
15029
15030 case 389: /* $@23: %empty */
15031#line 4658 "parse.y"
15032 {
15033 push_end_expect_token_locations(p, &(yylsp[-1]).beg_pos);
15034 }
15035#line 15036 "parse.c"
15036 break;
15037
15038 case 390: /* primary: defn_head f_arglist $@23 bodystmt k_end */
15039#line 4663 "parse.y"
15040 {
15041 restore_defun(p, (yyvsp[-4].node_def_temp));
15042 ((yyval.node) = (yyvsp[-4].node_def_temp)->nd_def)->nd_loc = (yyloc);
15043 (yyvsp[-1].node) = new_scope_body(p, (yyvsp[-3].node_args), (yyvsp[-1].node), (yyval.node), &(yyloc));
15044 RNODE_DEFN((yyval.node))->nd_defn = (yyvsp[-1].node);
15045 /*% ripper: def!($:head, $:args, $:bodystmt) %*/
15046 local_pop(p);
15047 }
15048#line 15049 "parse.c"
15049 break;
15050
15051 case 391: /* $@24: %empty */
15052#line 4673 "parse.y"
15053 {
15054 push_end_expect_token_locations(p, &(yylsp[-1]).beg_pos);
15055 }
15056#line 15057 "parse.c"
15057 break;
15058
15059 case 392: /* primary: defs_head f_arglist $@24 bodystmt k_end */
15060#line 4678 "parse.y"
15061 {
15062 restore_defun(p, (yyvsp[-4].node_def_temp));
15063 ((yyval.node) = (yyvsp[-4].node_def_temp)->nd_def)->nd_loc = (yyloc);
15064 (yyvsp[-1].node) = new_scope_body(p, (yyvsp[-3].node_args), (yyvsp[-1].node), (yyval.node), &(yyloc));
15065 RNODE_DEFS((yyval.node))->nd_defn = (yyvsp[-1].node);
15066 /*% ripper: defs!(*$:head[0..2], $:args, $:bodystmt) %*/
15067 local_pop(p);
15068 }
15069#line 15070 "parse.c"
15070 break;
15071
15072 case 393: /* primary: "'break'" */
15073#line 4687 "parse.y"
15074 {
15075 (yyval.node) = add_block_exit(p, NEW_BREAK(0, &(yyloc), &(yylsp[0])));
15076 /*% ripper: break!(args_new!) %*/
15077 }
15078#line 15079 "parse.c"
15079 break;
15080
15081 case 394: /* primary: "'next'" */
15082#line 4692 "parse.y"
15083 {
15084 (yyval.node) = add_block_exit(p, NEW_NEXT(0, &(yyloc), &(yylsp[0])));
15085 /*% ripper: next!(args_new!) %*/
15086 }
15087#line 15088 "parse.c"
15088 break;
15089
15090 case 395: /* primary: "'redo'" */
15091#line 4697 "parse.y"
15092 {
15093 (yyval.node) = add_block_exit(p, NEW_REDO(&(yyloc), &(yylsp[0])));
15094 /*% ripper: redo! %*/
15095 }
15096#line 15097 "parse.c"
15097 break;
15098
15099 case 396: /* primary: "'retry'" */
15100#line 4702 "parse.y"
15101 {
15102 if (!p->ctxt.in_defined) {
15103 switch (p->ctxt.in_rescue) {
15104 case before_rescue: yyerror1(&(yylsp[0]), "Invalid retry without rescue"); break;
15105 case after_rescue: /* ok */ break;
15106 case after_else: yyerror1(&(yylsp[0]), "Invalid retry after else"); break;
15107 case after_ensure: yyerror1(&(yylsp[0]), "Invalid retry after ensure"); break;
15108 }
15109 }
15110 (yyval.node) = NEW_RETRY(&(yyloc));
15111 /*% ripper: retry! %*/
15112 }
15113#line 15114 "parse.c"
15114 break;
15115
15116 case 397: /* value_expr_primary: primary */
15117#line 3155 "parse.y"
15118 {
15119 value_expr(p, (yyvsp[0].node));
15120 (yyval.node) = (yyvsp[0].node);
15121 }
15122#line 15123 "parse.c"
15123 break;
15124
15125 case 399: /* k_begin: "'begin'" */
15126#line 4720 "parse.y"
15127 {
15128 token_info_push(p, "begin", &(yyloc));
15129 push_end_expect_token_locations(p, &(yylsp[0]).beg_pos);
15130 }
15131#line 15132 "parse.c"
15132 break;
15133
15134 case 400: /* k_if: "'if'" */
15135#line 4727 "parse.y"
15136 {
15137 WARN_EOL("if");
15138 token_info_push(p, "if", &(yyloc));
15139 if (p->token_info && p->token_info->nonspc &&
15140 p->token_info->next && !strcmp(p->token_info->next->token, "else")) {
15141 const char *tok = p->lex.ptok - rb_strlen_lit("if");
15142 const char *beg = p->lex.pbeg + p->token_info->next->beg.column;
15143 beg += rb_strlen_lit("else");
15144 while (beg < tok && ISSPACE(*beg)) beg++;
15145 if (beg == tok) {
15146 p->token_info->nonspc = 0;
15147 }
15148 }
15149 push_end_expect_token_locations(p, &(yylsp[0]).beg_pos);
15150 }
15151#line 15152 "parse.c"
15152 break;
15153
15154 case 401: /* k_unless: "'unless'" */
15155#line 4745 "parse.y"
15156 {
15157 token_info_push(p, "unless", &(yyloc));
15158 push_end_expect_token_locations(p, &(yylsp[0]).beg_pos);
15159 }
15160#line 15161 "parse.c"
15161 break;
15162
15163 case 402: /* k_while: "'while'" allow_exits */
15164#line 4752 "parse.y"
15165 {
15166 (yyval.node_exits) = (yyvsp[0].node_exits);
15167 token_info_push(p, "while", &(yyloc));
15168 push_end_expect_token_locations(p, &(yylsp[-1]).beg_pos);
15169 }
15170#line 15171 "parse.c"
15171 break;
15172
15173 case 403: /* k_until: "'until'" allow_exits */
15174#line 4760 "parse.y"
15175 {
15176 (yyval.node_exits) = (yyvsp[0].node_exits);
15177 token_info_push(p, "until", &(yyloc));
15178 push_end_expect_token_locations(p, &(yylsp[-1]).beg_pos);
15179 }
15180#line 15181 "parse.c"
15181 break;
15182
15183 case 404: /* k_case: "'case'" */
15184#line 4768 "parse.y"
15185 {
15186 token_info_push(p, "case", &(yyloc));
15187 push_end_expect_token_locations(p, &(yylsp[0]).beg_pos);
15188 }
15189#line 15190 "parse.c"
15190 break;
15191
15192 case 405: /* k_for: "'for'" allow_exits */
15193#line 4775 "parse.y"
15194 {
15195 (yyval.node_exits) = (yyvsp[0].node_exits);
15196 token_info_push(p, "for", &(yyloc));
15197 push_end_expect_token_locations(p, &(yylsp[-1]).beg_pos);
15198 }
15199#line 15200 "parse.c"
15200 break;
15201
15202 case 406: /* k_class: "'class'" */
15203#line 4783 "parse.y"
15204 {
15205 token_info_push(p, "class", &(yyloc));
15206 (yyval.ctxt) = p->ctxt;
15207 p->ctxt.in_rescue = before_rescue;
15208 push_end_expect_token_locations(p, &(yylsp[0]).beg_pos);
15209 }
15210#line 15211 "parse.c"
15211 break;
15212
15213 case 407: /* k_module: "'module'" */
15214#line 4792 "parse.y"
15215 {
15216 token_info_push(p, "module", &(yyloc));
15217 (yyval.ctxt) = p->ctxt;
15218 p->ctxt.in_rescue = before_rescue;
15219 push_end_expect_token_locations(p, &(yylsp[0]).beg_pos);
15220 }
15221#line 15222 "parse.c"
15222 break;
15223
15224 case 408: /* k_def: "'def'" */
15225#line 4801 "parse.y"
15226 {
15227 token_info_push(p, "def", &(yyloc));
15228 (yyval.node_def_temp) = NEW_DEF_TEMP(&(yyloc));
15229 p->ctxt.in_argdef = 1;
15230 }
15231#line 15232 "parse.c"
15232 break;
15233
15234 case 409: /* k_do: "'do'" */
15235#line 4809 "parse.y"
15236 {
15237 token_info_push(p, "do", &(yyloc));
15238 push_end_expect_token_locations(p, &(yylsp[0]).beg_pos);
15239 }
15240#line 15241 "parse.c"
15241 break;
15242
15243 case 410: /* k_do_block: "'do' for block" */
15244#line 4816 "parse.y"
15245 {
15246 token_info_push(p, "do", &(yyloc));
15247 push_end_expect_token_locations(p, &(yylsp[0]).beg_pos);
15248 }
15249#line 15250 "parse.c"
15250 break;
15251
15252 case 411: /* k_rescue: "'rescue'" */
15253#line 4823 "parse.y"
15254 {
15255 token_info_warn(p, "rescue", p->token_info, 1, &(yyloc));
15256 (yyval.ctxt) = p->ctxt;
15257 p->ctxt.in_rescue = after_rescue;
15258 }
15259#line 15260 "parse.c"
15260 break;
15261
15262 case 412: /* k_ensure: "'ensure'" */
15263#line 4831 "parse.y"
15264 {
15265 token_info_warn(p, "ensure", p->token_info, 1, &(yyloc));
15266 (yyval.ctxt) = p->ctxt;
15267 }
15268#line 15269 "parse.c"
15269 break;
15270
15271 case 413: /* k_when: "'when'" */
15272#line 4838 "parse.y"
15273 {
15274 token_info_warn(p, "when", p->token_info, 0, &(yyloc));
15275 }
15276#line 15277 "parse.c"
15277 break;
15278
15279 case 414: /* k_else: "'else'" */
15280#line 4844 "parse.y"
15281 {
15282 token_info *ptinfo_beg = p->token_info;
15283 int same = ptinfo_beg && strcmp(ptinfo_beg->token, "case") != 0;
15284 token_info_warn(p, "else", p->token_info, same, &(yyloc));
15285 if (same) {
15286 token_info e;
15287 e.next = ptinfo_beg->next;
15288 e.token = "else";
15289 token_info_setup(&e, p->lex.pbeg, &(yyloc));
15290 if (!e.nonspc) *ptinfo_beg = e;
15291 }
15292 }
15293#line 15294 "parse.c"
15294 break;
15295
15296 case 415: /* k_elsif: "'elsif'" */
15297#line 4859 "parse.y"
15298 {
15299 WARN_EOL("elsif");
15300 token_info_warn(p, "elsif", p->token_info, 1, &(yyloc));
15301 }
15302#line 15303 "parse.c"
15303 break;
15304
15305 case 416: /* k_end: "'end'" */
15306#line 4866 "parse.y"
15307 {
15308 token_info_pop(p, "end", &(yyloc));
15309 pop_end_expect_token_locations(p);
15310 }
15311#line 15312 "parse.c"
15312 break;
15313
15314 case 417: /* k_end: "dummy end" */
15315#line 4871 "parse.y"
15316 {
15317 compile_error(p, "syntax error, unexpected end-of-input");
15318 }
15319#line 15320 "parse.c"
15320 break;
15321
15322 case 418: /* k_return: "'return'" */
15323#line 4877 "parse.y"
15324 {
15325 if (p->ctxt.cant_return && !dyna_in_block(p))
15326 yyerror1(&(yylsp[0]), "Invalid return in class/module body");
15327 }
15328#line 15329 "parse.c"
15329 break;
15330
15331 case 419: /* k_yield: "'yield'" */
15332#line 4884 "parse.y"
15333 {
15334 if (!p->ctxt.in_defined && !p->ctxt.in_def && !compile_for_eval)
15335 yyerror1(&(yylsp[0]), "Invalid yield");
15336 }
15337#line 15338 "parse.c"
15338 break;
15339
15340 case 424: /* do: "'do' for condition" */
15341#line 4896 "parse.y"
15342 { (yyval.id) = keyword_do_cond; }
15343#line 15344 "parse.c"
15344 break;
15345
15346 case 426: /* if_tail: k_elsif expr_value then compstmt_stmts if_tail */
15347#line 4903 "parse.y"
15348 {
15349 (yyval.node) = new_if(p, (yyvsp[-3].node), (yyvsp[-1].node), (yyvsp[0].node), &(yyloc), &(yylsp[-4]), &(yylsp[-2]), &NULL_LOC);
15350 fixpos((yyval.node), (yyvsp[-3].node));
15351 /*% ripper: elsif!($:2, $:4, $:5) %*/
15352 }
15353#line 15354 "parse.c"
15354 break;
15355
15356 case 428: /* opt_else: k_else compstmt_stmts */
15357#line 4912 "parse.y"
15358 {
15359 (yyval.node) = (yyvsp[0].node);
15360 /*% ripper: else!($:2) %*/
15361 }
15362#line 15363 "parse.c"
15363 break;
15364
15365 case 431: /* f_marg: f_norm_arg */
15366#line 4923 "parse.y"
15367 {
15368 (yyval.node) = assignable(p, (yyvsp[0].id), 0, &(yyloc));
15369 mark_lvar_used(p, (yyval.node));
15370 }
15371#line 15372 "parse.c"
15372 break;
15373
15374 case 432: /* f_marg: "(" f_margs rparen */
15375#line 4928 "parse.y"
15376 {
15377 (yyval.node) = (NODE *)(yyvsp[-1].node_masgn);
15378 /*% ripper: mlhs_paren!($:2) %*/
15379 }
15380#line 15381 "parse.c"
15381 break;
15382
15383 case 433: /* mlhs_items_f_marg: f_marg */
15384#line 3042 "parse.y"
15385 {
15386 (yyval.node) = NEW_LIST((yyvsp[0].node), &(yyloc));
15387 /*% ripper: mlhs_add!(mlhs_new!, $:1) %*/
15388 }
15389#line 15390 "parse.c"
15390 break;
15391
15392 case 434: /* mlhs_items_f_marg: mlhs_items_f_marg ',' f_marg */
15393#line 3047 "parse.y"
15394 {
15395 (yyval.node) = list_append(p, (yyvsp[-2].node), (yyvsp[0].node));
15396 /*% ripper: mlhs_add!($:1, $:3) %*/
15397 }
15398#line 15399 "parse.c"
15399 break;
15400
15401 case 435: /* f_margs: mlhs_items_f_marg */
15402#line 4936 "parse.y"
15403 {
15404 (yyval.node_masgn) = NEW_MASGN((yyvsp[0].node), 0, &(yyloc));
15405 /*% ripper: $:1 %*/
15406 }
15407#line 15408 "parse.c"
15408 break;
15409
15410 case 436: /* f_margs: mlhs_items_f_marg ',' f_rest_marg */
15411#line 4941 "parse.y"
15412 {
15413 (yyval.node_masgn) = NEW_MASGN((yyvsp[-2].node), (yyvsp[0].node), &(yyloc));
15414 /*% ripper: mlhs_add_star!($:1, $:3) %*/
15415 }
15416#line 15417 "parse.c"
15417 break;
15418
15419 case 437: /* f_margs: mlhs_items_f_marg ',' f_rest_marg ',' mlhs_items_f_marg */
15420#line 4946 "parse.y"
15421 {
15422 (yyval.node_masgn) = NEW_MASGN((yyvsp[-4].node), NEW_POSTARG((yyvsp[-2].node), (yyvsp[0].node), &(yyloc)), &(yyloc));
15423 /*% ripper: mlhs_add_post!(mlhs_add_star!($:1, $:3), $:5) %*/
15424 }
15425#line 15426 "parse.c"
15426 break;
15427
15428 case 438: /* f_margs: f_rest_marg */
15429#line 4951 "parse.y"
15430 {
15431 (yyval.node_masgn) = NEW_MASGN(0, (yyvsp[0].node), &(yyloc));
15432 /*% ripper: mlhs_add_star!(mlhs_new!, $:1) %*/
15433 }
15434#line 15435 "parse.c"
15435 break;
15436
15437 case 439: /* f_margs: f_rest_marg ',' mlhs_items_f_marg */
15438#line 4956 "parse.y"
15439 {
15440 (yyval.node_masgn) = NEW_MASGN(0, NEW_POSTARG((yyvsp[-2].node), (yyvsp[0].node), &(yyloc)), &(yyloc));
15441 /*% ripper: mlhs_add_post!(mlhs_add_star!(mlhs_new!, $:1), $:3) %*/
15442 }
15443#line 15444 "parse.c"
15444 break;
15445
15446 case 440: /* f_rest_marg: "*" f_norm_arg */
15447#line 4963 "parse.y"
15448 {
15449 /*% ripper: $:2 %*/
15450 (yyval.node) = assignable(p, (yyvsp[0].id), 0, &(yyloc));
15451 mark_lvar_used(p, (yyval.node));
15452 }
15453#line 15454 "parse.c"
15454 break;
15455
15456 case 441: /* f_rest_marg: "*" */
15457#line 4969 "parse.y"
15458 {
15459 (yyval.node) = NODE_SPECIAL_NO_NAME_REST;
15460 /*% ripper: Qnil %*/
15461 }
15462#line 15463 "parse.c"
15463 break;
15464
15465 case 443: /* f_any_kwrest: f_no_kwarg */
15466#line 4977 "parse.y"
15467 {
15468 (yyval.id) = idNil;
15469 /*% ripper: ID2VAL(idNil) %*/
15470 }
15471#line 15472 "parse.c"
15472 break;
15473
15474 case 444: /* $@25: %empty */
15475#line 4983 "parse.y"
15476 {p->ctxt.in_argdef = 0;}
15477#line 15478 "parse.c"
15478 break;
15479
15480 case 446: /* f_kw_primary_value: f_label primary_value */
15481#line 3014 "parse.y"
15482 {
15483 p->ctxt.in_argdef = 1;
15484 (yyval.node_kw_arg) = new_kw_arg(p, assignable(p, (yyvsp[-1].id), (yyvsp[0].node), &(yyloc)), &(yyloc));
15485 /*% ripper: [$:$, $:value] %*/
15486 }
15487#line 15488 "parse.c"
15488 break;
15489
15490 case 447: /* f_kw_primary_value: f_label */
15491#line 3020 "parse.y"
15492 {
15493 p->ctxt.in_argdef = 1;
15494 (yyval.node_kw_arg) = new_kw_arg(p, assignable(p, (yyvsp[0].id), NODE_SPECIAL_REQUIRED_KEYWORD, &(yyloc)), &(yyloc));
15495 /*% ripper: [$:$, 0] %*/
15496 }
15497#line 15498 "parse.c"
15498 break;
15499
15500 case 448: /* f_kwarg_primary_value: f_kw_primary_value */
15501#line 3029 "parse.y"
15502 {
15503 (yyval.node_kw_arg) = (yyvsp[0].node_kw_arg);
15504 /*% ripper: rb_ary_new3(1, $:1) %*/
15505 }
15506#line 15507 "parse.c"
15507 break;
15508
15509 case 449: /* f_kwarg_primary_value: f_kwarg_primary_value ',' f_kw_primary_value */
15510#line 3034 "parse.y"
15511 {
15512 (yyval.node_kw_arg) = kwd_append((yyvsp[-2].node_kw_arg), (yyvsp[0].node_kw_arg));
15513 /*% ripper: rb_ary_push($:1, $:3) %*/
15514 }
15515#line 15516 "parse.c"
15516 break;
15517
15518 case 450: /* opt_f_block_arg_none: ',' f_block_arg */
15519#line 2951 "parse.y"
15520 {
15521 (yyval.id) = (yyvsp[0].id);
15522 /*% ripper: $:2 %*/
15523 }
15524#line 15525 "parse.c"
15525 break;
15526
15527 case 452: /* args_tail_basic_primary_value_none: f_kwarg_primary_value ',' f_kwrest opt_f_block_arg_none */
15528#line 2928 "parse.y"
15529 {
15530 (yyval.node_args) = new_args_tail(p, (yyvsp[-3].node_kw_arg), (yyvsp[-1].id), (yyvsp[0].id), &(yylsp[-1]));
15531 /*% ripper: [$:1, $:3, $:4] %*/
15532 }
15533#line 15534 "parse.c"
15534 break;
15535
15536 case 453: /* args_tail_basic_primary_value_none: f_kwarg_primary_value opt_f_block_arg_none */
15537#line 2933 "parse.y"
15538 {
15539 (yyval.node_args) = new_args_tail(p, (yyvsp[-1].node_kw_arg), 0, (yyvsp[0].id), &(yylsp[-1]));
15540 /*% ripper: [$:1, Qnil, $:2] %*/
15541 }
15542#line 15543 "parse.c"
15543 break;
15544
15545 case 454: /* args_tail_basic_primary_value_none: f_any_kwrest opt_f_block_arg_none */
15546#line 2938 "parse.y"
15547 {
15548 (yyval.node_args) = new_args_tail(p, 0, (yyvsp[-1].id), (yyvsp[0].id), &(yylsp[-1]));
15549 /*% ripper: [Qnil, $:1, $:2] %*/
15550 }
15551#line 15552 "parse.c"
15552 break;
15553
15554 case 455: /* args_tail_basic_primary_value_none: f_block_arg */
15555#line 2943 "parse.y"
15556 {
15557 (yyval.node_args) = new_args_tail(p, 0, 0, (yyvsp[0].id), &(yylsp[0]));
15558 /*% ripper: [Qnil, Qnil, $:1] %*/
15559 }
15560#line 15561 "parse.c"
15561 break;
15562
15563 case 457: /* excessed_comma: ',' */
15564#line 4989 "parse.y"
15565 {
15566 /* magic number for rest_id in iseq_set_arguments() */
15567 (yyval.id) = NODE_SPECIAL_EXCESSIVE_COMMA;
15568 /*% ripper: excessed_comma! %*/
15569 }
15570#line 15571 "parse.c"
15571 break;
15572
15573 case 458: /* f_opt_primary_value: f_arg_asgn f_eq primary_value */
15574#line 2992 "parse.y"
15575 {
15576 p->ctxt.in_argdef = 1;
15577 (yyval.node_opt_arg) = NEW_OPT_ARG(assignable(p, (yyvsp[-2].id), (yyvsp[0].node), &(yyloc)), &(yyloc));
15578 /*% ripper: [$:$, $:3] %*/
15579 }
15580#line 15581 "parse.c"
15581 break;
15582
15583 case 459: /* f_opt_arg_primary_value: f_opt_primary_value */
15584#line 3001 "parse.y"
15585 {
15586 (yyval.node_opt_arg) = (yyvsp[0].node_opt_arg);
15587 /*% ripper: rb_ary_new3(1, $:1) %*/
15588 }
15589#line 15590 "parse.c"
15590 break;
15591
15592 case 460: /* f_opt_arg_primary_value: f_opt_arg_primary_value ',' f_opt_primary_value */
15593#line 3006 "parse.y"
15594 {
15595 (yyval.node_opt_arg) = opt_arg_append((yyvsp[-2].node_opt_arg), (yyvsp[0].node_opt_arg));
15596 /*% ripper: rb_ary_push($:1, $:3) %*/
15597 }
15598#line 15599 "parse.c"
15599 break;
15600
15601 case 461: /* opt_args_tail_block_args_tail_none: ',' block_args_tail */
15602#line 3101 "parse.y"
15603 {
15604 (yyval.node_args) = (yyvsp[0].node_args);
15605 /*% ripper: $:tail %*/
15606 }
15607#line 15608 "parse.c"
15608 break;
15609
15610 case 462: /* opt_args_tail_block_args_tail_none: none */
15611#line 3106 "parse.y"
15612 {
15613 (yyval.node_args) = new_empty_args_tail(p, &(yyloc));
15614 /*% ripper: [Qnil, Qnil, Qnil] %*/
15615 }
15616#line 15617 "parse.c"
15617 break;
15618
15619 case 463: /* args-list_primary_value_opt_args_tail_block_args_tail_none: f_arg ',' f_opt_arg_primary_value ',' f_rest_arg opt_args_tail_block_args_tail_none */
15620#line 6271 "parse.y"
15621 {
15622 (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));
15623 /*% ripper: params!($:pre, $:opt, $:rest, Qnil, *$:tail[0..2]) %*/
15624 }
15625#line 15626 "parse.c"
15626 break;
15627
15628 case 464: /* args-list_primary_value_opt_args_tail_block_args_tail_none: f_arg ',' f_opt_arg_primary_value ',' f_rest_arg ',' f_arg opt_args_tail_block_args_tail_none */
15629#line 6276 "parse.y"
15630 {
15631 (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));
15632 /*% ripper: params!($:pre, $:opt, $:rest, $:post, *$:tail[0..2]) %*/
15633 }
15634#line 15635 "parse.c"
15635 break;
15636
15637 case 465: /* args-list_primary_value_opt_args_tail_block_args_tail_none: f_arg ',' f_opt_arg_primary_value opt_args_tail_block_args_tail_none */
15638#line 6281 "parse.y"
15639 {
15640 (yyval.node_args) = new_args(p, (yyvsp[-3].node_args_aux), (yyvsp[-1].node_opt_arg), 0, 0, (yyvsp[0].node_args), &(yyloc));
15641 /*% ripper: params!($:pre, $:opt, Qnil, Qnil, *$:tail[0..2]) %*/
15642 }
15643#line 15644 "parse.c"
15644 break;
15645
15646 case 466: /* args-list_primary_value_opt_args_tail_block_args_tail_none: f_arg ',' f_opt_arg_primary_value ',' f_arg opt_args_tail_block_args_tail_none */
15647#line 6286 "parse.y"
15648 {
15649 (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));
15650 /*% ripper: params!($:pre, $:opt, Qnil, $:post, *$:tail[0..2]) %*/
15651 }
15652#line 15653 "parse.c"
15653 break;
15654
15655 case 467: /* args-list_primary_value_opt_args_tail_block_args_tail_none: f_arg ',' f_rest_arg opt_args_tail_block_args_tail_none */
15656#line 6291 "parse.y"
15657 {
15658 (yyval.node_args) = new_args(p, (yyvsp[-3].node_args_aux), 0, (yyvsp[-1].id), 0, (yyvsp[0].node_args), &(yyloc));
15659 /*% ripper: params!($:pre, Qnil, $:rest, Qnil, *$:tail[0..2]) %*/
15660 }
15661#line 15662 "parse.c"
15662 break;
15663
15664 case 468: /* args-list_primary_value_opt_args_tail_block_args_tail_none: f_arg ',' f_rest_arg ',' f_arg opt_args_tail_block_args_tail_none */
15665#line 6296 "parse.y"
15666 {
15667 (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));
15668 /*% ripper: params!($:pre, Qnil, $:rest, $:post, *$:tail[0..2]) %*/
15669 }
15670#line 15671 "parse.c"
15671 break;
15672
15673 case 469: /* args-list_primary_value_opt_args_tail_block_args_tail_none: f_opt_arg_primary_value ',' f_rest_arg opt_args_tail_block_args_tail_none */
15674#line 6301 "parse.y"
15675 {
15676 (yyval.node_args) = new_args(p, 0, (yyvsp[-3].node_opt_arg), (yyvsp[-1].id), 0, (yyvsp[0].node_args), &(yyloc));
15677 /*% ripper: params!(Qnil, $:opt, $:rest, Qnil, *$:tail[0..2]) %*/
15678 }
15679#line 15680 "parse.c"
15680 break;
15681
15682 case 470: /* args-list_primary_value_opt_args_tail_block_args_tail_none: f_opt_arg_primary_value ',' f_rest_arg ',' f_arg opt_args_tail_block_args_tail_none */
15683#line 6306 "parse.y"
15684 {
15685 (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));
15686 /*% ripper: params!(Qnil, $:opt, $:rest, $:post, *$:tail[0..2]) %*/
15687 }
15688#line 15689 "parse.c"
15689 break;
15690
15691 case 471: /* args-list_primary_value_opt_args_tail_block_args_tail_none: f_opt_arg_primary_value opt_args_tail_block_args_tail_none */
15692#line 6311 "parse.y"
15693 {
15694 (yyval.node_args) = new_args(p, 0, (yyvsp[-1].node_opt_arg), 0, 0, (yyvsp[0].node_args), &(yyloc));
15695 /*% ripper: params!(Qnil, $:opt, Qnil, Qnil, *$:tail[0..2]) %*/
15696 }
15697#line 15698 "parse.c"
15698 break;
15699
15700 case 472: /* args-list_primary_value_opt_args_tail_block_args_tail_none: f_opt_arg_primary_value ',' f_arg opt_args_tail_block_args_tail_none */
15701#line 6316 "parse.y"
15702 {
15703 (yyval.node_args) = new_args(p, 0, (yyvsp[-3].node_opt_arg), 0, (yyvsp[-1].node_args_aux), (yyvsp[0].node_args), &(yyloc));
15704 /*% ripper: params!(Qnil, $:opt, Qnil, $:post, *$:tail[0..2]) %*/
15705 }
15706#line 15707 "parse.c"
15707 break;
15708
15709 case 473: /* args-list_primary_value_opt_args_tail_block_args_tail_none: f_rest_arg opt_args_tail_block_args_tail_none */
15710#line 6321 "parse.y"
15711 {
15712 (yyval.node_args) = new_args(p, 0, 0, (yyvsp[-1].id), 0, (yyvsp[0].node_args), &(yyloc));
15713 /*% ripper: params!(Qnil, Qnil, $:rest, Qnil, *$:tail[0..2]) %*/
15714 }
15715#line 15716 "parse.c"
15716 break;
15717
15718 case 474: /* args-list_primary_value_opt_args_tail_block_args_tail_none: f_rest_arg ',' f_arg opt_args_tail_block_args_tail_none */
15719#line 6326 "parse.y"
15720 {
15721 (yyval.node_args) = new_args(p, 0, 0, (yyvsp[-3].id), (yyvsp[-1].node_args_aux), (yyvsp[0].node_args), &(yyloc));
15722 /*% ripper: params!(Qnil, Qnil, $:rest, $:post, *$:tail[0..2]) %*/
15723 }
15724#line 15725 "parse.c"
15725 break;
15726
15727 case 476: /* block_param: f_arg excessed_comma */
15728#line 4998 "parse.y"
15729 {
15730 (yyval.node_args) = new_empty_args_tail(p, &(yylsp[0]));
15731 (yyval.node_args) = new_args(p, (yyvsp[-1].node_args_aux), 0, (yyvsp[0].id), 0, (yyval.node_args), &(yyloc));
15732 /*% ripper: params!($:pre, Qnil, $:excessed_comma, Qnil, Qnil, Qnil, Qnil) %*/
15733 }
15734#line 15735 "parse.c"
15735 break;
15736
15737 case 477: /* block_param: f_arg opt_args_tail_block_args_tail_none */
15738#line 5004 "parse.y"
15739 {
15740 (yyval.node_args) = new_args(p, (yyvsp[-1].node_args_aux), 0, 0, 0, (yyvsp[0].node_args), &(yyloc));
15741 /*% ripper: params!($:pre, Qnil, Qnil, Qnil, *$:tail[0..2]) %*/
15742 }
15743#line 15744 "parse.c"
15744 break;
15745
15746 case 478: /* tail-only-args_block_args_tail: block_args_tail */
15747#line 6334 "parse.y"
15748 {
15749 (yyval.node_args) = new_args(p, 0, 0, 0, 0, (yyvsp[0].node_args), &(yyloc));
15750 /*% ripper: params!(Qnil, Qnil, Qnil, Qnil, *$:tail[0..2]) %*/
15751 }
15752#line 15753 "parse.c"
15753 break;
15754
15755 case 481: /* opt_block_param_def: block_param_def */
15756#line 5013 "parse.y"
15757 {
15758 p->command_start = TRUE;
15759 }
15760#line 15761 "parse.c"
15761 break;
15762
15763 case 482: /* block_param_def: '|' opt_block_param opt_bv_decl '|' */
15764#line 5019 "parse.y"
15765 {
15766 p->max_numparam = ORDINAL_PARAM;
15767 p->ctxt.in_argdef = 0;
15768 (yyval.node_args) = (yyvsp[-2].node_args);
15769 /*% ripper: block_var!($:2, $:3) %*/
15770 }
15771#line 15772 "parse.c"
15772 break;
15773
15774 case 483: /* opt_block_param: %empty */
15775#line 5028 "parse.y"
15776 {
15777 (yyval.node_args) = 0;
15778 /*% ripper: params!(Qnil,Qnil,Qnil,Qnil,Qnil,Qnil,Qnil) %*/
15779 }
15780#line 15781 "parse.c"
15781 break;
15782
15783 case 485: /* opt_bv_decl: option_'\n' */
15784#line 5036 "parse.y"
15785 {
15786 (yyval.id) = 0;
15787 /*% ripper: Qfalse %*/
15788 }
15789#line 15790 "parse.c"
15790 break;
15791
15792 case 486: /* opt_bv_decl: option_'\n' ';' bv_decls option_'\n' */
15793#line 5041 "parse.y"
15794 {
15795 (yyval.id) = 0;
15796 /*% ripper: $:3 %*/
15797 }
15798#line 15799 "parse.c"
15799 break;
15800
15801 case 489: /* bvar: "local variable or method" */
15802#line 5054 "parse.y"
15803 {
15804 new_bv(p, (yyvsp[0].id));
15805 /*% ripper: $:1 %*/
15806 }
15807#line 15808 "parse.c"
15808 break;
15809
15810 case 491: /* max_numparam: %empty */
15811#line 5061 "parse.y"
15812 {
15813 (yyval.num) = p->max_numparam;
15814 p->max_numparam = 0;
15815 }
15816#line 15817 "parse.c"
15817 break;
15818
15819 case 492: /* numparam: %empty */
15820#line 5067 "parse.y"
15821 {
15822 (yyval.node) = numparam_push(p);
15823 }
15824#line 15825 "parse.c"
15825 break;
15826
15827 case 493: /* it_id: %empty */
15828#line 5072 "parse.y"
15829 {
15830 (yyval.id) = p->it_id;
15831 p->it_id = 0;
15832 }
15833#line 15834 "parse.c"
15834 break;
15835
15836 case 494: /* @26: %empty */
15837#line 5079 "parse.y"
15838 {
15839 token_info_push(p, "->", &(yylsp[0]));
15840 (yyval.vars) = dyna_push(p);
15841 }
15842#line 15843 "parse.c"
15843 break;
15844
15845 case 495: /* $@27: %empty */
15846#line 5085 "parse.y"
15847 {
15848 CMDARG_PUSH(0);
15849 }
15850#line 15851 "parse.c"
15851 break;
15852
15853 case 496: /* lambda: "->" @26 max_numparam numparam it_id allow_exits f_larglist $@27 lambda_body */
15854#line 5089 "parse.y"
15855 {
15856 int max_numparam = p->max_numparam;
15857 ID it_id = p->it_id;
15858 p->lex.lpar_beg = (yyvsp[-8].num);
15859 p->max_numparam = (yyvsp[-6].num);
15860 p->it_id = (yyvsp[-4].id);
15861 restore_block_exit(p, (yyvsp[-3].node_exits));
15862 CMDARG_POP();
15863 (yyvsp[-2].node_args) = args_with_numbered(p, (yyvsp[-2].node_args), max_numparam, it_id);
15864 {
15865 YYLTYPE loc = code_loc_gen(&(yylsp[-8]), &(yylsp[0]));
15866 (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);
15867 nd_set_line(RNODE_LAMBDA((yyval.node))->nd_body, (yylsp[0]).end_pos.lineno);
15868 nd_set_line((yyval.node), (yylsp[-2]).end_pos.lineno);
15869 nd_set_first_loc((yyval.node), (yylsp[-8]).beg_pos);
15870 xfree((yyvsp[0].locations_lambda_body));
15871 }
15872 /*% ripper: lambda!($:args, $:body) %*/
15873 numparam_pop(p, (yyvsp[-5].node));
15874 dyna_pop(p, (yyvsp[-7].vars));
15875 }
15876#line 15877 "parse.c"
15877 break;
15878
15879 case 497: /* f_larglist: '(' f_largs opt_bv_decl ')' */
15880#line 5113 "parse.y"
15881 {
15882 p->ctxt.in_argdef = 0;
15883 (yyval.node_args) = (yyvsp[-2].node_args);
15884 p->max_numparam = ORDINAL_PARAM;
15885 /*% ripper: paren!($:args) %*/
15886 }
15887#line 15888 "parse.c"
15888 break;
15889
15890 case 498: /* f_larglist: f_largs */
15891#line 5120 "parse.y"
15892 {
15893 p->ctxt.in_argdef = 0;
15894 if (!args_info_empty_p(&(yyvsp[0].node_args)->nd_ainfo))
15895 p->max_numparam = ORDINAL_PARAM;
15896 (yyval.node_args) = (yyvsp[0].node_args);
15897 }
15898#line 15899 "parse.c"
15899 break;
15900
15901 case 499: /* lambda_body: tLAMBEG compstmt_stmts '}' */
15902#line 5129 "parse.y"
15903 {
15904 token_info_pop(p, "}", &(yylsp[0]));
15905 (yyval.locations_lambda_body) = new_locations_lambda_body(p, (yyvsp[-1].node), &(yylsp[-1]), &(yylsp[-2]), &(yylsp[0]));
15906 /*% ripper: $:2 %*/
15907 }
15908#line 15909 "parse.c"
15909 break;
15910
15911 case 500: /* $@28: %empty */
15912#line 5135 "parse.y"
15913 {
15914 push_end_expect_token_locations(p, &(yylsp[0]).beg_pos);
15915 }
15916#line 15917 "parse.c"
15917 break;
15918
15919 case 501: /* lambda_body: "'do' for lambda" $@28 bodystmt k_end */
15920#line 5139 "parse.y"
15921 {
15922 (yyval.locations_lambda_body) = new_locations_lambda_body(p, (yyvsp[-1].node), &(yylsp[-1]), &(yylsp[-3]), &(yylsp[0]));
15923 /*% ripper: $:3 %*/
15924 }
15925#line 15926 "parse.c"
15926 break;
15927
15928 case 502: /* do_block: k_do_block do_body k_end */
15929#line 5146 "parse.y"
15930 {
15931 (yyval.node) = (yyvsp[-1].node);
15932 set_embraced_location((yyval.node), &(yylsp[-2]), &(yylsp[0]));
15933 /*% ripper: $:2 %*/
15934 }
15935#line 15936 "parse.c"
15936 break;
15937
15938 case 503: /* block_call: command do_block */
15939#line 5154 "parse.y"
15940 {
15941 if (nd_type_p((yyvsp[-1].node), NODE_YIELD)) {
15942 compile_error(p, "block given to yield");
15943 }
15944 else {
15945 block_dup_check(p, get_nd_args(p, (yyvsp[-1].node)), (yyvsp[0].node));
15946 }
15947 (yyval.node) = method_add_block(p, (yyvsp[-1].node), (yyvsp[0].node), &(yyloc));
15948 fixpos((yyval.node), (yyvsp[-1].node));
15949 /*% ripper: method_add_block!($:1, $:2) %*/
15950 }
15951#line 15952 "parse.c"
15952 break;
15953
15954 case 504: /* block_call: block_call call_op2 operation2 opt_paren_args */
15955#line 5166 "parse.y"
15956 {
15957 bool has_args = (yyvsp[0].node) != 0;
15958 if (NODE_EMPTY_ARGS_P((yyvsp[0].node))) (yyvsp[0].node) = 0;
15959 (yyval.node) = new_qcall(p, (yyvsp[-2].id), (yyvsp[-3].node), (yyvsp[-1].id), (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
15960 /*% ripper: call!($:1, $:2, $:3) %*/
15961 if (has_args) {
15962 /*% ripper: method_add_arg!($:$, $:4) %*/
15963 }
15964 }
15965#line 15966 "parse.c"
15966 break;
15967
15968 case 505: /* block_call: block_call call_op2 operation2 opt_paren_args brace_block */
15969#line 5176 "parse.y"
15970 {
15971 if (NODE_EMPTY_ARGS_P((yyvsp[-1].node))) (yyvsp[-1].node) = 0;
15972 (yyval.node) = new_command_qcall(p, (yyvsp[-3].id), (yyvsp[-4].node), (yyvsp[-2].id), (yyvsp[-1].node), (yyvsp[0].node), &(yylsp[-2]), &(yyloc));
15973 /*% ripper: method_add_block!(command_call!($:1, $:2, $:3, $:4), $:5) %*/
15974 }
15975#line 15976 "parse.c"
15976 break;
15977
15978 case 506: /* block_call: block_call call_op2 operation2 command_args do_block */
15979#line 5182 "parse.y"
15980 {
15981 (yyval.node) = new_command_qcall(p, (yyvsp[-3].id), (yyvsp[-4].node), (yyvsp[-2].id), (yyvsp[-1].node), (yyvsp[0].node), &(yylsp[-2]), &(yyloc));
15982 /*% ripper: method_add_block!(command_call!($:1, $:2, $:3, $:4), $:5) %*/
15983 }
15984#line 15985 "parse.c"
15985 break;
15986
15987 case 507: /* block_call: block_call call_op2 paren_args */
15988#line 5187 "parse.y"
15989 {
15990 (yyval.node) = new_qcall(p, (yyvsp[-1].id), (yyvsp[-2].node), idCall, (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
15991 nd_set_line((yyval.node), (yylsp[-1]).end_pos.lineno);
15992 /*% ripper: method_add_arg!(call!($:1, $:2, ID2VAL(idCall)), $:3) %*/
15993 }
15994#line 15995 "parse.c"
15995 break;
15996
15997 case 508: /* method_call: fcall paren_args */
15998#line 5195 "parse.y"
15999 {
16000 (yyvsp[-1].node_fcall)->nd_args = (yyvsp[0].node);
16001 (yyval.node) = (NODE *)(yyvsp[-1].node_fcall);
16002 nd_set_last_loc((yyvsp[-1].node_fcall), (yylsp[0]).end_pos);
16003 /*% ripper: method_add_arg!(fcall!($:1), $:2) %*/
16004 }
16005#line 16006 "parse.c"
16006 break;
16007
16008 case 509: /* method_call: primary_value call_op operation2 opt_paren_args */
16009#line 5202 "parse.y"
16010 {
16011 bool has_args = (yyvsp[0].node) != 0;
16012 if (NODE_EMPTY_ARGS_P((yyvsp[0].node))) (yyvsp[0].node) = 0;
16013 (yyval.node) = new_qcall(p, (yyvsp[-2].id), (yyvsp[-3].node), (yyvsp[-1].id), (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
16014 nd_set_line((yyval.node), (yylsp[-1]).end_pos.lineno);
16015 /*% ripper: call!($:1, $:2, $:3) %*/
16016 if (has_args) {
16017 /*% ripper: method_add_arg!($:$, $:4) %*/
16018 }
16019 }
16020#line 16021 "parse.c"
16021 break;
16022
16023 case 510: /* method_call: primary_value "::" operation2 paren_args */
16024#line 5213 "parse.y"
16025 {
16026 (yyval.node) = new_qcall(p, idCOLON2, (yyvsp[-3].node), (yyvsp[-1].id), (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
16027 nd_set_line((yyval.node), (yylsp[-1]).end_pos.lineno);
16028 /*% ripper: method_add_arg!(call!($:1, $:2, $:3), $:4) %*/
16029 }
16030#line 16031 "parse.c"
16031 break;
16032
16033 case 511: /* method_call: primary_value "::" operation3 */
16034#line 5219 "parse.y"
16035 {
16036 (yyval.node) = new_qcall(p, idCOLON2, (yyvsp[-2].node), (yyvsp[0].id), 0, &(yylsp[0]), &(yyloc));
16037 /*% ripper: call!($:1, $:2, $:3) %*/
16038 }
16039#line 16040 "parse.c"
16040 break;
16041
16042 case 512: /* method_call: primary_value call_op2 paren_args */
16043#line 5224 "parse.y"
16044 {
16045 (yyval.node) = new_qcall(p, (yyvsp[-1].id), (yyvsp[-2].node), idCall, (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
16046 nd_set_line((yyval.node), (yylsp[-1]).end_pos.lineno);
16047 /*% ripper: method_add_arg!(call!($:1, $:2, ID2VAL(idCall)), $:3) %*/
16048 }
16049#line 16050 "parse.c"
16050 break;
16051
16052 case 513: /* method_call: "'super'" paren_args */
16053#line 5230 "parse.y"
16054 {
16055 rb_code_location_t lparen_loc = (yylsp[0]);
16056 rb_code_location_t rparen_loc = (yylsp[0]);
16057 lparen_loc.end_pos.column = lparen_loc.beg_pos.column + 1;
16058 rparen_loc.beg_pos.column = rparen_loc.end_pos.column - 1;
16059
16060 (yyval.node) = NEW_SUPER((yyvsp[0].node), &(yyloc), &(yylsp[-1]), &lparen_loc, &rparen_loc);
16061 /*% ripper: super!($:2) %*/
16062 }
16063#line 16064 "parse.c"
16064 break;
16065
16066 case 514: /* method_call: "'super'" */
16067#line 5240 "parse.y"
16068 {
16069 (yyval.node) = NEW_ZSUPER(&(yyloc));
16070 /*% ripper: zsuper! %*/
16071 }
16072#line 16073 "parse.c"
16073 break;
16074
16075 case 515: /* method_call: primary_value '[' opt_call_args rbracket */
16076#line 5245 "parse.y"
16077 {
16078 (yyval.node) = NEW_CALL((yyvsp[-3].node), tAREF, (yyvsp[-1].node), &(yyloc));
16079 fixpos((yyval.node), (yyvsp[-3].node));
16080 /*% ripper: aref!($:1, $:3) %*/
16081 }
16082#line 16083 "parse.c"
16083 break;
16084
16085 case 516: /* brace_block: '{' brace_body '}' */
16086#line 5253 "parse.y"
16087 {
16088 (yyval.node) = (yyvsp[-1].node);
16089 set_embraced_location((yyval.node), &(yylsp[-2]), &(yylsp[0]));
16090 /*% ripper: $:2 %*/
16091 }
16092#line 16093 "parse.c"
16093 break;
16094
16095 case 517: /* brace_block: k_do do_body k_end */
16096#line 5259 "parse.y"
16097 {
16098 (yyval.node) = (yyvsp[-1].node);
16099 set_embraced_location((yyval.node), &(yylsp[-2]), &(yylsp[0]));
16100 /*% ripper: $:2 %*/
16101 }
16102#line 16103 "parse.c"
16103 break;
16104
16105 case 518: /* @29: %empty */
16106#line 5266 "parse.y"
16107 {(yyval.vars) = dyna_push(p);}
16108#line 16109 "parse.c"
16109 break;
16110
16111 case 519: /* brace_body: @29 max_numparam numparam it_id allow_exits opt_block_param_def compstmt_stmts */
16112#line 5269 "parse.y"
16113 {
16114 int max_numparam = p->max_numparam;
16115 ID it_id = p->it_id;
16116 p->max_numparam = (yyvsp[-5].num);
16117 p->it_id = (yyvsp[-3].id);
16118 (yyvsp[-1].node_args) = args_with_numbered(p, (yyvsp[-1].node_args), max_numparam, it_id);
16119 (yyval.node) = NEW_ITER((yyvsp[-1].node_args), (yyvsp[0].node), &(yyloc));
16120 /*% ripper: brace_block!($:args, $:compstmt) %*/
16121 restore_block_exit(p, (yyvsp[-2].node_exits));
16122 numparam_pop(p, (yyvsp[-4].node));
16123 dyna_pop(p, (yyvsp[-6].vars));
16124 }
16125#line 16126 "parse.c"
16126 break;
16127
16128 case 520: /* @30: %empty */
16129#line 5283 "parse.y"
16130 {
16131 (yyval.vars) = dyna_push(p);
16132 CMDARG_PUSH(0);
16133 }
16134#line 16135 "parse.c"
16135 break;
16136
16137 case 521: /* do_body: @30 max_numparam numparam it_id allow_exits opt_block_param_def bodystmt */
16138#line 5289 "parse.y"
16139 {
16140 int max_numparam = p->max_numparam;
16141 ID it_id = p->it_id;
16142 p->max_numparam = (yyvsp[-5].num);
16143 p->it_id = (yyvsp[-3].id);
16144 (yyvsp[-1].node_args) = args_with_numbered(p, (yyvsp[-1].node_args), max_numparam, it_id);
16145 (yyval.node) = NEW_ITER((yyvsp[-1].node_args), (yyvsp[0].node), &(yyloc));
16146 /*% ripper: do_block!($:args, $:bodystmt) %*/
16147 CMDARG_POP();
16148 restore_block_exit(p, (yyvsp[-2].node_exits));
16149 numparam_pop(p, (yyvsp[-4].node));
16150 dyna_pop(p, (yyvsp[-6].vars));
16151 }
16152#line 16153 "parse.c"
16153 break;
16154
16155 case 522: /* case_args: arg_value */
16156#line 5305 "parse.y"
16157 {
16158 check_literal_when(p, (yyvsp[0].node), &(yylsp[0]));
16159 (yyval.node) = NEW_LIST((yyvsp[0].node), &(yyloc));
16160 /*% ripper: args_add!(args_new!, $:arg_value) %*/
16161 }
16162#line 16163 "parse.c"
16163 break;
16164
16165 case 523: /* case_args: "*" arg_value */
16166#line 5311 "parse.y"
16167 {
16168 (yyval.node) = NEW_SPLAT((yyvsp[0].node), &(yyloc), &(yylsp[-1]));
16169 /*% ripper: args_add_star!(args_new!, $:arg_value) %*/
16170 }
16171#line 16172 "parse.c"
16172 break;
16173
16174 case 524: /* case_args: case_args ',' arg_value */
16175#line 5316 "parse.y"
16176 {
16177 check_literal_when(p, (yyvsp[0].node), &(yylsp[0]));
16178 (yyval.node) = last_arg_append(p, (yyvsp[-2].node), (yyvsp[0].node), &(yyloc));
16179 /*% ripper: args_add!($:non_last_args, $:arg_value) %*/
16180 }
16181#line 16182 "parse.c"
16182 break;
16183
16184 case 525: /* case_args: case_args ',' "*" arg_value */
16185#line 5322 "parse.y"
16186 {
16187 (yyval.node) = rest_arg_append(p, (yyvsp[-3].node), (yyvsp[0].node), &(yyloc));
16188 /*% ripper: args_add_star!($:non_last_args, $:arg_value) %*/
16189 }
16190#line 16191 "parse.c"
16191 break;
16192
16193 case 526: /* case_body: k_when case_args then compstmt_stmts cases */
16194#line 5331 "parse.y"
16195 {
16196 (yyval.node) = NEW_WHEN((yyvsp[-3].node), (yyvsp[-1].node), (yyvsp[0].node), &(yyloc), &(yylsp[-4]), &(yylsp[-2]));
16197 fixpos((yyval.node), (yyvsp[-3].node));
16198 /*% ripper: when!($:2, $:4, $:5) %*/
16199 }
16200#line 16201 "parse.c"
16201 break;
16202
16203 case 529: /* p_pvtbl: %empty */
16204#line 5342 "parse.y"
16205 {(yyval.tbl) = p->pvtbl; p->pvtbl = st_init_numtable();}
16206#line 16207 "parse.c"
16207 break;
16208
16209 case 530: /* p_pktbl: %empty */
16210#line 5343 "parse.y"
16211 {(yyval.tbl) = p->pktbl; p->pktbl = 0;}
16212#line 16213 "parse.c"
16213 break;
16214
16215 case 531: /* p_in_kwarg: %empty */
16216#line 5345 "parse.y"
16217 {
16218 (yyval.ctxt) = p->ctxt;
16219 SET_LEX_STATE(EXPR_BEG|EXPR_LABEL);
16220 p->command_start = FALSE;
16221 p->ctxt.in_kwarg = 1;
16222 p->ctxt.in_alt_pattern = 0;
16223 p->ctxt.capture_in_pattern = 0;
16224 }
16225#line 16226 "parse.c"
16226 break;
16227
16228 case 532: /* $@31: %empty */
16229#line 5358 "parse.y"
16230 {
16231 pop_pktbl(p, (yyvsp[-2].tbl));
16232 pop_pvtbl(p, (yyvsp[-3].tbl));
16233 p->ctxt.in_kwarg = (yyvsp[-4].ctxt).in_kwarg;
16234 p->ctxt.in_alt_pattern = (yyvsp[-4].ctxt).in_alt_pattern;
16235 p->ctxt.capture_in_pattern = (yyvsp[-4].ctxt).capture_in_pattern;
16236 }
16237#line 16238 "parse.c"
16238 break;
16239
16240 case 533: /* p_case_body: "'in'" p_in_kwarg p_pvtbl p_pktbl p_top_expr then $@31 compstmt_stmts p_cases */
16241#line 5367 "parse.y"
16242 {
16243 (yyval.node) = NEW_IN((yyvsp[-4].node), (yyvsp[-1].node), (yyvsp[0].node), &(yyloc), &(yylsp[-8]), &(yylsp[-3]), &NULL_LOC);
16244 /*% ripper: in!($:expr, $:compstmt, $:cases) %*/
16245 }
16246#line 16247 "parse.c"
16247 break;
16248
16249 case 537: /* p_top_expr: p_top_expr_body "'if' modifier" expr_value */
16250#line 5379 "parse.y"
16251 {
16252 (yyval.node) = new_if(p, (yyvsp[0].node), (yyvsp[-2].node), 0, &(yyloc), &(yylsp[-1]), &NULL_LOC, &NULL_LOC);
16253 fixpos((yyval.node), (yyvsp[0].node));
16254 /*% ripper: if_mod!($:3, $:1) %*/
16255 }
16256#line 16257 "parse.c"
16257 break;
16258
16259 case 538: /* p_top_expr: p_top_expr_body "'unless' modifier" expr_value */
16260#line 5385 "parse.y"
16261 {
16262 (yyval.node) = new_unless(p, (yyvsp[0].node), (yyvsp[-2].node), 0, &(yyloc), &(yylsp[-1]), &NULL_LOC, &NULL_LOC);
16263 fixpos((yyval.node), (yyvsp[0].node));
16264 /*% ripper: unless_mod!($:3, $:1) %*/
16265 }
16266#line 16267 "parse.c"
16267 break;
16268
16269 case 540: /* p_top_expr_body: p_expr ',' */
16270#line 5394 "parse.y"
16271 {
16272 (yyval.node) = new_array_pattern_tail(p, 0, 1, 0, 0, &(yyloc));
16273 (yyval.node) = new_array_pattern(p, 0, (yyvsp[-1].node), (yyval.node), &(yyloc));
16274 /*% ripper: aryptn!(Qnil, [$:1], Qnil, Qnil) %*/
16275 }
16276#line 16277 "parse.c"
16277 break;
16278
16279 case 541: /* p_top_expr_body: p_expr ',' p_args */
16280#line 5400 "parse.y"
16281 {
16282 (yyval.node) = new_array_pattern(p, 0, (yyvsp[-2].node), (yyvsp[0].node), &(yyloc));
16283 nd_set_first_loc((yyval.node), (yylsp[-2]).beg_pos);
16284 /*% ripper: aryptn!(Qnil, aryptn_pre_args(p, $:1, $:3[0]), *$:3[1..2]) %*/
16285 }
16286#line 16287 "parse.c"
16287 break;
16288
16289 case 542: /* p_top_expr_body: p_find */
16290#line 5406 "parse.y"
16291 {
16292 (yyval.node) = new_find_pattern(p, 0, (yyvsp[0].node), &(yyloc));
16293 /*% ripper: fndptn!(Qnil, *$:1[0..2]) %*/
16294 }
16295#line 16296 "parse.c"
16296 break;
16297
16298 case 543: /* p_top_expr_body: p_args_tail */
16299#line 5411 "parse.y"
16300 {
16301 (yyval.node) = new_array_pattern(p, 0, 0, (yyvsp[0].node), &(yyloc));
16302 /*% ripper: aryptn!(Qnil, *$:1[0..2]) %*/
16303 }
16304#line 16305 "parse.c"
16305 break;
16306
16307 case 544: /* p_top_expr_body: p_kwargs */
16308#line 5416 "parse.y"
16309 {
16310 (yyval.node) = new_hash_pattern(p, 0, (yyvsp[0].node), &(yyloc));
16311 /*% ripper: hshptn!(Qnil, *$:1[0..1]) %*/
16312 }
16313#line 16314 "parse.c"
16314 break;
16315
16316 case 546: /* p_as: p_expr "=>" p_variable */
16317#line 5426 "parse.y"
16318 {
16319 NODE *n = NEW_LIST((yyvsp[-2].node), &(yyloc));
16320 n = list_append(p, n, (yyvsp[0].node));
16321 (yyval.node) = new_hash(p, n, &(yyloc));
16322 /*% ripper: binary!($:1, ID2VAL((id_assoc)), $:3) %*/
16323 }
16324#line 16325 "parse.c"
16325 break;
16326
16327 case 548: /* $@32: %empty */
16328#line 5436 "parse.y"
16329 {
16330 p->ctxt.in_alt_pattern = 1;
16331 }
16332#line 16333 "parse.c"
16333 break;
16334
16335 case 549: /* p_alt: p_alt '|' $@32 p_expr_basic */
16336#line 5440 "parse.y"
16337 {
16338 if (p->ctxt.capture_in_pattern) {
16339 yyerror1(&(yylsp[-2]), "alternative pattern after variable capture");
16340 }
16341 p->ctxt.in_alt_pattern = 0;
16342 (yyval.node) = NEW_OR((yyvsp[-3].node), (yyvsp[0].node), &(yyloc), &(yylsp[-2]));
16343 /*% ripper: binary!($:left, ID2VAL(idOr), $:right) %*/
16344 }
16345#line 16346 "parse.c"
16346 break;
16347
16348 case 551: /* p_lparen: '(' p_pktbl */
16349#line 5452 "parse.y"
16350 {
16351 (yyval.tbl) = (yyvsp[0].tbl);
16352 /*% ripper: $:2 %*/
16353 }
16354#line 16355 "parse.c"
16355 break;
16356
16357 case 552: /* p_lbracket: '[' p_pktbl */
16358#line 5459 "parse.y"
16359 {
16360 (yyval.tbl) = (yyvsp[0].tbl);
16361 /*% ripper: $:2 %*/
16362 }
16363#line 16364 "parse.c"
16364 break;
16365
16366 case 555: /* p_expr_basic: p_const p_lparen p_args rparen */
16367#line 5468 "parse.y"
16368 {
16369 pop_pktbl(p, (yyvsp[-2].tbl));
16370 (yyval.node) = new_array_pattern(p, (yyvsp[-3].node), 0, (yyvsp[-1].node), &(yyloc));
16371 nd_set_first_loc((yyval.node), (yylsp[-3]).beg_pos);
16372 /*% ripper: aryptn!($:p_const, *$:p_args[0..2]) %*/
16373 }
16374#line 16375 "parse.c"
16375 break;
16376
16377 case 556: /* p_expr_basic: p_const p_lparen p_find rparen */
16378#line 5475 "parse.y"
16379 {
16380 pop_pktbl(p, (yyvsp[-2].tbl));
16381 (yyval.node) = new_find_pattern(p, (yyvsp[-3].node), (yyvsp[-1].node), &(yyloc));
16382 nd_set_first_loc((yyval.node), (yylsp[-3]).beg_pos);
16383 /*% ripper: fndptn!($:p_const, *$:p_find[0..2]) %*/
16384 }
16385#line 16386 "parse.c"
16386 break;
16387
16388 case 557: /* p_expr_basic: p_const p_lparen p_kwargs rparen */
16389#line 5482 "parse.y"
16390 {
16391 pop_pktbl(p, (yyvsp[-2].tbl));
16392 (yyval.node) = new_hash_pattern(p, (yyvsp[-3].node), (yyvsp[-1].node), &(yyloc));
16393 nd_set_first_loc((yyval.node), (yylsp[-3]).beg_pos);
16394 /*% ripper: hshptn!($:p_const, *$:p_kwargs[0..1]) %*/
16395 }
16396#line 16397 "parse.c"
16397 break;
16398
16399 case 558: /* p_expr_basic: p_const '(' rparen */
16400#line 5489 "parse.y"
16401 {
16402 (yyval.node) = new_array_pattern_tail(p, 0, 0, 0, 0, &(yyloc));
16403 (yyval.node) = new_array_pattern(p, (yyvsp[-2].node), 0, (yyval.node), &(yyloc));
16404 /*% ripper: aryptn!($:p_const, Qnil, Qnil, Qnil) %*/
16405 }
16406#line 16407 "parse.c"
16407 break;
16408
16409 case 559: /* p_expr_basic: p_const p_lbracket p_args rbracket */
16410#line 5495 "parse.y"
16411 {
16412 pop_pktbl(p, (yyvsp[-2].tbl));
16413 (yyval.node) = new_array_pattern(p, (yyvsp[-3].node), 0, (yyvsp[-1].node), &(yyloc));
16414 nd_set_first_loc((yyval.node), (yylsp[-3]).beg_pos);
16415 /*% ripper: aryptn!($:p_const, *$:p_args[0..2]) %*/
16416 }
16417#line 16418 "parse.c"
16418 break;
16419
16420 case 560: /* p_expr_basic: p_const p_lbracket p_find rbracket */
16421#line 5502 "parse.y"
16422 {
16423 pop_pktbl(p, (yyvsp[-2].tbl));
16424 (yyval.node) = new_find_pattern(p, (yyvsp[-3].node), (yyvsp[-1].node), &(yyloc));
16425 nd_set_first_loc((yyval.node), (yylsp[-3]).beg_pos);
16426 /*% ripper: fndptn!($:p_const, *$:p_find[0..2]) %*/
16427 }
16428#line 16429 "parse.c"
16429 break;
16430
16431 case 561: /* p_expr_basic: p_const p_lbracket p_kwargs rbracket */
16432#line 5509 "parse.y"
16433 {
16434 pop_pktbl(p, (yyvsp[-2].tbl));
16435 (yyval.node) = new_hash_pattern(p, (yyvsp[-3].node), (yyvsp[-1].node), &(yyloc));
16436 nd_set_first_loc((yyval.node), (yylsp[-3]).beg_pos);
16437 /*% ripper: hshptn!($:p_const, *$:p_kwargs[0..1]) %*/
16438 }
16439#line 16440 "parse.c"
16440 break;
16441
16442 case 562: /* p_expr_basic: p_const '[' rbracket */
16443#line 5516 "parse.y"
16444 {
16445 (yyval.node) = new_array_pattern_tail(p, 0, 0, 0, 0, &(yyloc));
16446 (yyval.node) = new_array_pattern(p, (yyvsp[-2].node), 0, (yyval.node), &(yyloc));
16447 /*% ripper: aryptn!($:p_const, Qnil, Qnil, Qnil) %*/
16448 }
16449#line 16450 "parse.c"
16450 break;
16451
16452 case 563: /* p_expr_basic: "[" p_args rbracket */
16453#line 5522 "parse.y"
16454 {
16455 (yyval.node) = new_array_pattern(p, 0, 0, (yyvsp[-1].node), &(yyloc));
16456 /*% ripper: aryptn!(Qnil, *$:p_args[0..2]) %*/
16457 }
16458#line 16459 "parse.c"
16459 break;
16460
16461 case 564: /* p_expr_basic: "[" p_find rbracket */
16462#line 5527 "parse.y"
16463 {
16464 (yyval.node) = new_find_pattern(p, 0, (yyvsp[-1].node), &(yyloc));
16465 /*% ripper: fndptn!(Qnil, *$:p_find[0..2]) %*/
16466 }
16467#line 16468 "parse.c"
16468 break;
16469
16470 case 565: /* p_expr_basic: "[" rbracket */
16471#line 5532 "parse.y"
16472 {
16473 (yyval.node) = new_array_pattern_tail(p, 0, 0, 0, 0, &(yyloc));
16474 (yyval.node) = new_array_pattern(p, 0, 0, (yyval.node), &(yyloc));
16475 /*% ripper: aryptn!(Qnil, Qnil, Qnil, Qnil) %*/
16476 }
16477#line 16478 "parse.c"
16478 break;
16479
16480 case 566: /* $@33: %empty */
16481#line 5538 "parse.y"
16482 {
16483 p->ctxt.in_kwarg = 0;
16484 }
16485#line 16486 "parse.c"
16486 break;
16487
16488 case 567: /* p_expr_basic: "{" p_pktbl lex_ctxt $@33 p_kwargs rbrace */
16489#line 5542 "parse.y"
16490 {
16491 pop_pktbl(p, (yyvsp[-4].tbl));
16492 p->ctxt.in_kwarg = (yyvsp[-3].ctxt).in_kwarg;
16493 (yyval.node) = new_hash_pattern(p, 0, (yyvsp[-1].node), &(yyloc));
16494 /*% ripper: hshptn!(Qnil, *$:p_kwargs[0..1]) %*/
16495 }
16496#line 16497 "parse.c"
16497 break;
16498
16499 case 568: /* p_expr_basic: "{" rbrace */
16500#line 5549 "parse.y"
16501 {
16502 (yyval.node) = new_hash_pattern_tail(p, 0, 0, &(yyloc));
16503 (yyval.node) = new_hash_pattern(p, 0, (yyval.node), &(yyloc));
16504 /*% ripper: hshptn!(Qnil, Qnil, Qnil) %*/
16505 }
16506#line 16507 "parse.c"
16507 break;
16508
16509 case 569: /* p_expr_basic: "(" p_pktbl p_expr rparen */
16510#line 5555 "parse.y"
16511 {
16512 pop_pktbl(p, (yyvsp[-2].tbl));
16513 (yyval.node) = (yyvsp[-1].node);
16514 /*% ripper: $:p_expr %*/
16515 }
16516#line 16517 "parse.c"
16517 break;
16518
16519 case 570: /* p_args: p_expr */
16520#line 5563 "parse.y"
16521 {
16522 NODE *pre_args = NEW_LIST((yyvsp[0].node), &(yyloc));
16523 (yyval.node) = new_array_pattern_tail(p, pre_args, 0, 0, 0, &(yyloc));
16524 /*% ripper: [[$:1], Qnil, Qnil] %*/
16525 }
16526#line 16527 "parse.c"
16527 break;
16528
16529 case 571: /* p_args: p_args_head */
16530#line 5569 "parse.y"
16531 {
16532 (yyval.node) = new_array_pattern_tail(p, (yyvsp[0].node), 1, 0, 0, &(yyloc));
16533 /*% ripper: [$:1, Qnil, Qnil] %*/
16534 }
16535#line 16536 "parse.c"
16536 break;
16537
16538 case 572: /* p_args: p_args_head p_arg */
16539#line 5574 "parse.y"
16540 {
16541 (yyval.node) = new_array_pattern_tail(p, list_concat((yyvsp[-1].node), (yyvsp[0].node)), 0, 0, 0, &(yyloc));
16542 /*% ripper: [rb_ary_concat($:1, $:2), Qnil, Qnil] %*/
16543 }
16544#line 16545 "parse.c"
16545 break;
16546
16547 case 573: /* p_args: p_args_head p_rest */
16548#line 5579 "parse.y"
16549 {
16550 (yyval.node) = new_array_pattern_tail(p, (yyvsp[-1].node), 1, (yyvsp[0].node), 0, &(yyloc));
16551 /*% ripper: [$:1, $:2, Qnil] %*/
16552 }
16553#line 16554 "parse.c"
16554 break;
16555
16556 case 574: /* p_args: p_args_head p_rest ',' p_args_post */
16557#line 5584 "parse.y"
16558 {
16559 (yyval.node) = new_array_pattern_tail(p, (yyvsp[-3].node), 1, (yyvsp[-2].node), (yyvsp[0].node), &(yyloc));
16560 /*% ripper: [$:1, $:2, $:4] %*/
16561 }
16562#line 16563 "parse.c"
16563 break;
16564
16565 case 577: /* p_args_head: p_args_head p_arg ',' */
16566#line 5593 "parse.y"
16567 {
16568 (yyval.node) = list_concat((yyvsp[-2].node), (yyvsp[-1].node));
16569 /*% ripper: rb_ary_concat($:1, $:2) %*/
16570 }
16571#line 16572 "parse.c"
16572 break;
16573
16574 case 578: /* p_args_tail: p_rest */
16575#line 5600 "parse.y"
16576 {
16577 (yyval.node) = new_array_pattern_tail(p, 0, 1, (yyvsp[0].node), 0, &(yyloc));
16578 /*% ripper: [Qnil, $:1, Qnil] %*/
16579 }
16580#line 16581 "parse.c"
16581 break;
16582
16583 case 579: /* p_args_tail: p_rest ',' p_args_post */
16584#line 5605 "parse.y"
16585 {
16586 (yyval.node) = new_array_pattern_tail(p, 0, 1, (yyvsp[-2].node), (yyvsp[0].node), &(yyloc));
16587 /*% ripper: [Qnil, $:1, $:3] %*/
16588 }
16589#line 16590 "parse.c"
16590 break;
16591
16592 case 580: /* p_find: p_rest ',' p_args_post ',' p_rest */
16593#line 5612 "parse.y"
16594 {
16595 (yyval.node) = new_find_pattern_tail(p, (yyvsp[-4].node), (yyvsp[-2].node), (yyvsp[0].node), &(yyloc));
16596 /*% ripper: [$:1, $:3, $:5] %*/
16597 }
16598#line 16599 "parse.c"
16599 break;
16600
16601 case 581: /* p_rest: "*" "local variable or method" */
16602#line 5620 "parse.y"
16603 {
16604 error_duplicate_pattern_variable(p, (yyvsp[0].id), &(yylsp[0]));
16605 /*% ripper: var_field!($:2) %*/
16606 (yyval.node) = assignable(p, (yyvsp[0].id), 0, &(yyloc));
16607 }
16608#line 16609 "parse.c"
16609 break;
16610
16611 case 582: /* p_rest: "*" */
16612#line 5626 "parse.y"
16613 {
16614 (yyval.node) = 0;
16615 /*% ripper: var_field!(Qnil) %*/
16616 }
16617#line 16618 "parse.c"
16618 break;
16619
16620 case 584: /* p_args_post: p_args_post ',' p_arg */
16621#line 5634 "parse.y"
16622 {
16623 (yyval.node) = list_concat((yyvsp[-2].node), (yyvsp[0].node));
16624 /*% ripper: rb_ary_concat($:1, $:3) %*/
16625 }
16626#line 16627 "parse.c"
16627 break;
16628
16629 case 585: /* p_arg: p_expr */
16630#line 5641 "parse.y"
16631 {
16632 (yyval.node) = NEW_LIST((yyvsp[0].node), &(yyloc));
16633 /*% ripper: [$:1] %*/
16634 }
16635#line 16636 "parse.c"
16636 break;
16637
16638 case 586: /* p_kwargs: p_kwarg ',' p_any_kwrest */
16639#line 5648 "parse.y"
16640 {
16641 (yyval.node) = new_hash_pattern_tail(p, new_unique_key_hash(p, (yyvsp[-2].node), &(yyloc)), (yyvsp[0].id), &(yyloc));
16642 /*% ripper: [$:1, $:3] %*/
16643 }
16644#line 16645 "parse.c"
16645 break;
16646
16647 case 587: /* p_kwargs: p_kwarg */
16648#line 5653 "parse.y"
16649 {
16650 (yyval.node) = new_hash_pattern_tail(p, new_unique_key_hash(p, (yyvsp[0].node), &(yyloc)), 0, &(yyloc));
16651 /*% ripper: [$:1, Qnil] %*/
16652 }
16653#line 16654 "parse.c"
16654 break;
16655
16656 case 588: /* p_kwargs: p_kwarg ',' */
16657#line 5658 "parse.y"
16658 {
16659 (yyval.node) = new_hash_pattern_tail(p, new_unique_key_hash(p, (yyvsp[-1].node), &(yyloc)), 0, &(yyloc));
16660 /*% ripper: [$:1, Qnil] %*/
16661 }
16662#line 16663 "parse.c"
16663 break;
16664
16665 case 589: /* p_kwargs: p_any_kwrest */
16666#line 5663 "parse.y"
16667 {
16668 (yyval.node) = new_hash_pattern_tail(p, new_hash(p, 0, &(yyloc)), (yyvsp[0].id), &(yyloc));
16669 /*% ripper: [[], $:1] %*/
16670 }
16671#line 16672 "parse.c"
16672 break;
16673
16674 case 591: /* p_kwarg: p_kwarg ',' p_kw */
16675#line 5672 "parse.y"
16676 {
16677 (yyval.node) = list_concat((yyvsp[-2].node), (yyvsp[0].node));
16678 /*% ripper: rb_ary_push($:1, $:3) %*/
16679 }
16680#line 16681 "parse.c"
16681 break;
16682
16683 case 592: /* p_kw: p_kw_label p_expr */
16684#line 5679 "parse.y"
16685 {
16686 error_duplicate_pattern_key(p, (yyvsp[-1].id), &(yylsp[-1]));
16687 (yyval.node) = list_append(p, NEW_LIST(NEW_SYM(rb_id2str((yyvsp[-1].id)), &(yylsp[-1])), &(yyloc)), (yyvsp[0].node));
16688 /*% ripper: [$:1, $:2] %*/
16689 }
16690#line 16691 "parse.c"
16691 break;
16692
16693 case 593: /* p_kw: p_kw_label */
16694#line 5685 "parse.y"
16695 {
16696 error_duplicate_pattern_key(p, (yyvsp[0].id), &(yylsp[0]));
16697 if ((yyvsp[0].id) && !is_local_id((yyvsp[0].id))) {
16698 yyerror1(&(yylsp[0]), "key must be valid as local variables");
16699 }
16700 error_duplicate_pattern_variable(p, (yyvsp[0].id), &(yylsp[0]));
16701 (yyval.node) = list_append(p, NEW_LIST(NEW_SYM(rb_id2str((yyvsp[0].id)), &(yyloc)), &(yyloc)), assignable(p, (yyvsp[0].id), 0, &(yyloc)));
16702 /*% ripper: [$:1, Qnil] %*/
16703 }
16704#line 16705 "parse.c"
16705 break;
16706
16707 case 595: /* p_kw_label: "string literal" string_contents tLABEL_END */
16708#line 5698 "parse.y"
16709 {
16710 YYLTYPE loc = code_loc_gen(&(yylsp[-2]), &(yylsp[0]));
16711 if (!(yyvsp[-1].node) || nd_type_p((yyvsp[-1].node), NODE_STR)) {
16712 NODE *node = dsym_node(p, (yyvsp[-1].node), &loc);
16713 (yyval.id) = rb_sym2id(rb_node_sym_string_val(node));
16714 }
16715 else {
16716 yyerror1(&loc, "symbol literal with interpolation is not allowed");
16717 (yyval.id) = rb_intern_str(STR_NEW0());
16718 }
16719 /*% ripper: $:2 %*/
16720 }
16721#line 16722 "parse.c"
16722 break;
16723
16724 case 596: /* p_kwrest: kwrest_mark "local variable or method" */
16725#line 5713 "parse.y"
16726 {
16727 (yyval.id) = (yyvsp[0].id);
16728 /*% ripper: var_field!($:2) %*/
16729 }
16730#line 16731 "parse.c"
16731 break;
16732
16733 case 597: /* p_kwrest: kwrest_mark */
16734#line 5718 "parse.y"
16735 {
16736 (yyval.id) = 0;
16737 /*% ripper: Qnil %*/
16738 }
16739#line 16740 "parse.c"
16740 break;
16741
16742 case 598: /* p_kwnorest: kwrest_mark "'nil'" */
16743#line 5725 "parse.y"
16744 {
16745 (yyval.id) = 0;
16746 }
16747#line 16748 "parse.c"
16748 break;
16749
16750 case 600: /* p_any_kwrest: p_kwnorest */
16751#line 5732 "parse.y"
16752 {
16753 (yyval.id) = idNil;
16754 /*% ripper: var_field!(ID2VAL(idNil)) %*/
16755 }
16756#line 16757 "parse.c"
16757 break;
16758
16759 case 602: /* range_expr_p_primitive: p_primitive ".." p_primitive */
16760#line 3114 "parse.y"
16761 {
16762 value_expr(p, (yyvsp[-2].node));
16763 value_expr(p, (yyvsp[0].node));
16764 (yyval.node) = NEW_DOT2((yyvsp[-2].node), (yyvsp[0].node), &(yyloc), &(yylsp[-1]));
16765 /*% ripper: dot2!($:1, $:3) %*/
16766 }
16767#line 16768 "parse.c"
16768 break;
16769
16770 case 603: /* range_expr_p_primitive: p_primitive "..." p_primitive */
16771#line 3121 "parse.y"
16772 {
16773 value_expr(p, (yyvsp[-2].node));
16774 value_expr(p, (yyvsp[0].node));
16775 (yyval.node) = NEW_DOT3((yyvsp[-2].node), (yyvsp[0].node), &(yyloc), &(yylsp[-1]));
16776 /*% ripper: dot3!($:1, $:3) %*/
16777 }
16778#line 16779 "parse.c"
16779 break;
16780
16781 case 604: /* range_expr_p_primitive: p_primitive ".." */
16782#line 3128 "parse.y"
16783 {
16784 value_expr(p, (yyvsp[-1].node));
16785 (yyval.node) = NEW_DOT2((yyvsp[-1].node), new_nil_at(p, &(yylsp[0]).end_pos), &(yyloc), &(yylsp[0]));
16786 /*% ripper: dot2!($:1, Qnil) %*/
16787 }
16788#line 16789 "parse.c"
16789 break;
16790
16791 case 605: /* range_expr_p_primitive: p_primitive "..." */
16792#line 3134 "parse.y"
16793 {
16794 value_expr(p, (yyvsp[-1].node));
16795 (yyval.node) = NEW_DOT3((yyvsp[-1].node), new_nil_at(p, &(yylsp[0]).end_pos), &(yyloc), &(yylsp[0]));
16796 /*% ripper: dot3!($:1, Qnil) %*/
16797 }
16798#line 16799 "parse.c"
16799 break;
16800
16801 case 606: /* range_expr_p_primitive: "(.." p_primitive */
16802#line 3140 "parse.y"
16803 {
16804 value_expr(p, (yyvsp[0].node));
16805 (yyval.node) = NEW_DOT2(new_nil_at(p, &(yylsp[-1]).beg_pos), (yyvsp[0].node), &(yyloc), &(yylsp[-1]));
16806 /*% ripper: dot2!(Qnil, $:2) %*/
16807 }
16808#line 16809 "parse.c"
16809 break;
16810
16811 case 607: /* range_expr_p_primitive: "(..." p_primitive */
16812#line 3146 "parse.y"
16813 {
16814 value_expr(p, (yyvsp[0].node));
16815 (yyval.node) = NEW_DOT3(new_nil_at(p, &(yylsp[-1]).beg_pos), (yyvsp[0].node), &(yyloc), &(yylsp[-1]));
16816 /*% ripper: dot3!(Qnil, $:2) %*/
16817 }
16818#line 16819 "parse.c"
16819 break;
16820
16821 case 620: /* p_primitive: keyword_variable */
16822#line 5747 "parse.y"
16823 {
16824 if (!((yyval.node) = gettable(p, (yyvsp[0].id), &(yyloc)))) (yyval.node) = NEW_ERROR(&(yyloc));
16825 /*% ripper: var_ref!($:1) %*/
16826 }
16827#line 16828 "parse.c"
16828 break;
16829
16830 case 622: /* p_variable: "local variable or method" */
16831#line 5755 "parse.y"
16832 {
16833 error_duplicate_pattern_variable(p, (yyvsp[0].id), &(yylsp[0]));
16834 /*% ripper: var_field!($:1) %*/
16835 (yyval.node) = assignable(p, (yyvsp[0].id), 0, &(yyloc));
16836 }
16837#line 16838 "parse.c"
16838 break;
16839
16840 case 623: /* p_var_ref: '^' "local variable or method" */
16841#line 5763 "parse.y"
16842 {
16843 NODE *n = gettable(p, (yyvsp[0].id), &(yyloc));
16844 if (!n) {
16845 n = NEW_ERROR(&(yyloc));
16846 }
16847 else if (!(nd_type_p(n, NODE_LVAR) || nd_type_p(n, NODE_DVAR))) {
16848 compile_error(p, "%"PRIsVALUE": no such local variable", rb_id2str((yyvsp[0].id)));
16849 }
16850 (yyval.node) = n;
16851 /*% ripper: var_ref!($:2) %*/
16852 }
16853#line 16854 "parse.c"
16854 break;
16855
16856 case 624: /* p_var_ref: '^' nonlocal_var */
16857#line 5775 "parse.y"
16858 {
16859 if (!((yyval.node) = gettable(p, (yyvsp[0].id), &(yyloc)))) (yyval.node) = NEW_ERROR(&(yyloc));
16860 /*% ripper: var_ref!($:2) %*/
16861 }
16862#line 16863 "parse.c"
16863 break;
16864
16865 case 625: /* p_expr_ref: '^' "(" expr_value rparen */
16866#line 5782 "parse.y"
16867 {
16868 (yyval.node) = NEW_BLOCK((yyvsp[-1].node), &(yyloc));
16869 /*% ripper: begin!($:3) %*/
16870 }
16871#line 16872 "parse.c"
16872 break;
16873
16874 case 626: /* p_const: ":: at EXPR_BEG" cname */
16875#line 5789 "parse.y"
16876 {
16877 (yyval.node) = NEW_COLON3((yyvsp[0].id), &(yyloc), &(yylsp[-1]), &(yylsp[0]));
16878 /*% ripper: top_const_ref!($:2) %*/
16879 }
16880#line 16881 "parse.c"
16881 break;
16882
16883 case 627: /* p_const: p_const "::" cname */
16884#line 5794 "parse.y"
16885 {
16886 (yyval.node) = NEW_COLON2((yyvsp[-2].node), (yyvsp[0].id), &(yyloc), &(yylsp[-1]), &(yylsp[0]));
16887 /*% ripper: const_path_ref!($:1, $:3) %*/
16888 }
16889#line 16890 "parse.c"
16890 break;
16891
16892 case 628: /* p_const: "constant" */
16893#line 5799 "parse.y"
16894 {
16895 (yyval.node) = gettable(p, (yyvsp[0].id), &(yyloc));
16896 /*% ripper: var_ref!($:1) %*/
16897 }
16898#line 16899 "parse.c"
16899 break;
16900
16901 case 629: /* opt_rescue: k_rescue exc_list exc_var then compstmt_stmts opt_rescue */
16902#line 5808 "parse.y"
16903 {
16904 NODE *err = (yyvsp[-3].node);
16905 if ((yyvsp[-3].node)) {
16906 err = NEW_ERRINFO(&(yylsp[-3]));
16907 err = node_assign(p, (yyvsp[-3].node), err, NO_LEX_CTXT, &(yylsp[-3]));
16908 }
16909 (yyval.node) = NEW_RESBODY((yyvsp[-4].node), (yyvsp[-3].node), (yyvsp[-1].node), (yyvsp[0].node), &(yyloc));
16910 if ((yyvsp[-4].node)) {
16911 fixpos((yyval.node), (yyvsp[-4].node));
16912 }
16913 else if ((yyvsp[-3].node)) {
16914 fixpos((yyval.node), (yyvsp[-3].node));
16915 }
16916 else {
16917 fixpos((yyval.node), (yyvsp[-1].node));
16918 }
16919 /*% ripper: rescue!($:2, $:3, $:5, $:6) %*/
16920 }
16921#line 16922 "parse.c"
16922 break;
16923
16924 case 631: /* exc_list: arg_value */
16925#line 5830 "parse.y"
16926 {
16927 (yyval.node) = NEW_LIST((yyvsp[0].node), &(yyloc));
16928 /*% ripper: rb_ary_new3(1, $:1) %*/
16929 }
16930#line 16931 "parse.c"
16931 break;
16932
16933 case 632: /* exc_list: mrhs */
16934#line 5835 "parse.y"
16935 {
16936 if (!((yyval.node) = splat_array((yyvsp[0].node)))) (yyval.node) = (yyvsp[0].node);
16937 }
16938#line 16939 "parse.c"
16939 break;
16940
16941 case 634: /* exc_var: "=>" lhs */
16942#line 5842 "parse.y"
16943 {
16944 (yyval.node) = (yyvsp[0].node);
16945 /*% ripper: $:2 %*/
16946 }
16947#line 16948 "parse.c"
16948 break;
16949
16950 case 636: /* opt_ensure: k_ensure stmts option_terms */
16951#line 5850 "parse.y"
16952 {
16953 p->ctxt.in_rescue = (yyvsp[-2].ctxt).in_rescue;
16954 (yyval.node) = (yyvsp[-1].node);
16955 void_expr(p, void_stmts(p, (yyval.node)));
16956 /*% ripper: ensure!($:2) %*/
16957 }
16958#line 16959 "parse.c"
16959 break;
16960
16961 case 640: /* strings: string */
16962#line 5864 "parse.y"
16963 {
16964 if (!(yyvsp[0].node)) {
16965 (yyval.node) = NEW_STR(STRING_NEW0(), &(yyloc));
16966 }
16967 else {
16968 (yyval.node) = evstr2dstr(p, (yyvsp[0].node));
16969 }
16970 /*% ripper: $:1 %*/
16971 }
16972#line 16973 "parse.c"
16973 break;
16974
16975 case 643: /* string: string string1 */
16976#line 5878 "parse.y"
16977 {
16978 (yyval.node) = literal_concat(p, (yyvsp[-1].node), (yyvsp[0].node), &(yyloc));
16979 /*% ripper: string_concat!($:1, $:2) %*/
16980 }
16981#line 16982 "parse.c"
16982 break;
16983
16984 case 644: /* string1: "string literal" string_contents "terminator" */
16985#line 5885 "parse.y"
16986 {
16987 (yyval.node) = heredoc_dedent(p, (yyvsp[-1].node));
16988 if ((yyval.node)) nd_set_loc((yyval.node), &(yyloc));
16989 /*% ripper: $:2 %*/
16990 if (p->heredoc_indent > 0) {
16991 /*% ripper: heredoc_dedent!($:$, INT2NUM(%{p->heredoc_indent})) %*/
16992 p->heredoc_indent = 0;
16993 }
16994 /*% ripper: string_literal!($:$) %*/
16995 }
16996#line 16997 "parse.c"
16997 break;
16998
16999 case 645: /* xstring: "backtick literal" xstring_contents "terminator" */
17000#line 5898 "parse.y"
17001 {
17002 (yyval.node) = new_xstring(p, heredoc_dedent(p, (yyvsp[-1].node)), &(yyloc));
17003 /*% ripper: $:2 %*/
17004 if (p->heredoc_indent > 0) {
17005 /*% ripper: heredoc_dedent!($:$, INT2NUM(%{p->heredoc_indent})) %*/
17006 p->heredoc_indent = 0;
17007 }
17008 /*% ripper: xstring_literal!($:$) %*/
17009 }
17010#line 17011 "parse.c"
17011 break;
17012
17013 case 646: /* regexp: "regexp literal" regexp_contents tREGEXP_END */
17014#line 5910 "parse.y"
17015 {
17016 (yyval.node) = new_regexp(p, (yyvsp[-1].node), (yyvsp[0].num), &(yyloc), &(yylsp[-2]), &(yylsp[-1]), &(yylsp[0]));
17017 /*% ripper: regexp_literal!($:2, $:3) %*/
17018 }
17019#line 17020 "parse.c"
17020 break;
17021
17022 case 649: /* words_tWORDS_BEG_word_list: "word list" nonempty_list_' ' word_list "terminator" */
17023#line 3163 "parse.y"
17024 {
17025 (yyval.node) = make_list((yyvsp[-1].node), &(yyloc));
17026 /*% ripper: array!($:word_list) %*/
17027 }
17028#line 17029 "parse.c"
17029 break;
17030
17031 case 651: /* word_list: %empty */
17032#line 5920 "parse.y"
17033 {
17034 (yyval.node) = 0;
17035 /*% ripper: words_new! %*/
17036 }
17037#line 17038 "parse.c"
17038 break;
17039
17040 case 652: /* word_list: word_list word nonempty_list_' ' */
17041#line 5925 "parse.y"
17042 {
17043 (yyval.node) = list_append(p, (yyvsp[-2].node), evstr2dstr(p, (yyvsp[-1].node)));
17044 /*% ripper: words_add!($:1, $:2) %*/
17045 }
17046#line 17047 "parse.c"
17047 break;
17048
17049 case 654: /* word: word string_content */
17050#line 5934 "parse.y"
17051 {
17052 (yyval.node) = literal_concat(p, (yyvsp[-1].node), (yyvsp[0].node), &(yyloc));
17053 /*% ripper: word_add!($:1, $:2) %*/
17054 }
17055#line 17056 "parse.c"
17056 break;
17057
17058 case 655: /* words_tSYMBOLS_BEG_symbol_list: "symbol list" nonempty_list_' ' symbol_list "terminator" */
17059#line 3163 "parse.y"
17060 {
17061 (yyval.node) = make_list((yyvsp[-1].node), &(yyloc));
17062 /*% ripper: array!($:word_list) %*/
17063 }
17064#line 17065 "parse.c"
17065 break;
17066
17067 case 657: /* symbol_list: %empty */
17068#line 5944 "parse.y"
17069 {
17070 (yyval.node) = 0;
17071 /*% ripper: symbols_new! %*/
17072 }
17073#line 17074 "parse.c"
17074 break;
17075
17076 case 658: /* symbol_list: symbol_list word nonempty_list_' ' */
17077#line 5949 "parse.y"
17078 {
17079 (yyval.node) = symbol_append(p, (yyvsp[-2].node), evstr2dstr(p, (yyvsp[-1].node)));
17080 /*% ripper: symbols_add!($:1, $:2) %*/
17081 }
17082#line 17083 "parse.c"
17083 break;
17084
17085 case 659: /* words_tQWORDS_BEG_qword_list: "verbatim word list" nonempty_list_' ' qword_list "terminator" */
17086#line 3163 "parse.y"
17087 {
17088 (yyval.node) = make_list((yyvsp[-1].node), &(yyloc));
17089 /*% ripper: array!($:word_list) %*/
17090 }
17091#line 17092 "parse.c"
17092 break;
17093
17094 case 661: /* words_tQSYMBOLS_BEG_qsym_list: "verbatim symbol list" nonempty_list_' ' qsym_list "terminator" */
17095#line 3163 "parse.y"
17096 {
17097 (yyval.node) = make_list((yyvsp[-1].node), &(yyloc));
17098 /*% ripper: array!($:word_list) %*/
17099 }
17100#line 17101 "parse.c"
17101 break;
17102
17103 case 663: /* qword_list: %empty */
17104#line 5962 "parse.y"
17105 {
17106 (yyval.node) = 0;
17107 /*% ripper: qwords_new! %*/
17108 }
17109#line 17110 "parse.c"
17110 break;
17111
17112 case 664: /* qword_list: qword_list "literal content" nonempty_list_' ' */
17113#line 5967 "parse.y"
17114 {
17115 (yyval.node) = list_append(p, (yyvsp[-2].node), (yyvsp[-1].node));
17116 /*% ripper: qwords_add!($:1, $:2) %*/
17117 }
17118#line 17119 "parse.c"
17119 break;
17120
17121 case 665: /* qsym_list: %empty */
17122#line 5974 "parse.y"
17123 {
17124 (yyval.node) = 0;
17125 /*% ripper: qsymbols_new! %*/
17126 }
17127#line 17128 "parse.c"
17128 break;
17129
17130 case 666: /* qsym_list: qsym_list "literal content" nonempty_list_' ' */
17131#line 5979 "parse.y"
17132 {
17133 (yyval.node) = symbol_append(p, (yyvsp[-2].node), (yyvsp[-1].node));
17134 /*% ripper: qsymbols_add!($:1, $:2) %*/
17135 }
17136#line 17137 "parse.c"
17137 break;
17138
17139 case 667: /* string_contents: %empty */
17140#line 5986 "parse.y"
17141 {
17142 (yyval.node) = 0;
17143 /*% ripper: string_content! %*/
17144 }
17145#line 17146 "parse.c"
17146 break;
17147
17148 case 668: /* string_contents: string_contents string_content */
17149#line 5991 "parse.y"
17150 {
17151 (yyval.node) = literal_concat(p, (yyvsp[-1].node), (yyvsp[0].node), &(yyloc));
17152 /*% ripper: string_add!($:1, $:2) %*/
17153 }
17154#line 17155 "parse.c"
17155 break;
17156
17157 case 669: /* xstring_contents: %empty */
17158#line 5998 "parse.y"
17159 {
17160 (yyval.node) = 0;
17161 /*% ripper: xstring_new! %*/
17162 }
17163#line 17164 "parse.c"
17164 break;
17165
17166 case 670: /* xstring_contents: xstring_contents string_content */
17167#line 6003 "parse.y"
17168 {
17169 (yyval.node) = literal_concat(p, (yyvsp[-1].node), (yyvsp[0].node), &(yyloc));
17170 /*% ripper: xstring_add!($:1, $:2) %*/
17171 }
17172#line 17173 "parse.c"
17173 break;
17174
17175 case 671: /* regexp_contents: %empty */
17176#line 6010 "parse.y"
17177 {
17178 (yyval.node) = 0;
17179 /*% ripper: regexp_new! %*/
17180 }
17181#line 17182 "parse.c"
17182 break;
17183
17184 case 672: /* regexp_contents: regexp_contents string_content */
17185#line 6015 "parse.y"
17186 {
17187 NODE *head = (yyvsp[-1].node), *tail = (yyvsp[0].node);
17188 if (!head) {
17189 (yyval.node) = tail;
17190 }
17191 else if (!tail) {
17192 (yyval.node) = head;
17193 }
17194 else {
17195 switch (nd_type(head)) {
17196 case NODE_STR:
17197 head = str2dstr(p, head);
17198 break;
17199 case NODE_DSTR:
17200 break;
17201 default:
17202 head = list_append(p, NEW_DSTR(0, &(yyloc)), head);
17203 break;
17204 }
17205 (yyval.node) = list_append(p, head, tail);
17206 }
17207 /*% ripper: regexp_add!($:1, $:2) %*/
17208 }
17209#line 17210 "parse.c"
17210 break;
17211
17212 case 674: /* @34: %empty */
17213#line 6043 "parse.y"
17214 {
17215 /* need to backup p->lex.strterm so that a string literal `%&foo,#$&,bar&` can be parsed */
17216 (yyval.strterm) = p->lex.strterm;
17217 p->lex.strterm = 0;
17218 SET_LEX_STATE(EXPR_BEG);
17219 }
17220#line 17221 "parse.c"
17221 break;
17222
17223 case 675: /* string_content: tSTRING_DVAR @34 string_dvar */
17224#line 6050 "parse.y"
17225 {
17226 p->lex.strterm = (yyvsp[-1].strterm);
17227 (yyval.node) = NEW_EVSTR((yyvsp[0].node), &(yyloc), &(yylsp[-2]), &NULL_LOC);
17228 nd_set_line((yyval.node), (yylsp[0]).end_pos.lineno);
17229 /*% ripper: string_dvar!($:dvar) %*/
17230 }
17231#line 17232 "parse.c"
17232 break;
17233
17234 case 676: /* @35: %empty */
17235#line 6057 "parse.y"
17236 {
17237 CMDARG_PUSH(0);
17238 COND_PUSH(0);
17239 /* need to backup p->lex.strterm so that a string literal `%!foo,#{ !0 },bar!` can be parsed */
17240 (yyval.strterm) = p->lex.strterm;
17241 p->lex.strterm = 0;
17242 SET_LEX_STATE(EXPR_BEG);
17243 }
17244#line 17245 "parse.c"
17245 break;
17246
17247 case 677: /* @36: %empty */
17248#line 6065 "parse.y"
17249 {
17250 (yyval.num) = p->lex.brace_nest;
17251 p->lex.brace_nest = 0;
17252 }
17253#line 17254 "parse.c"
17254 break;
17255
17256 case 678: /* @37: %empty */
17257#line 6069 "parse.y"
17258 {
17259 (yyval.num) = p->heredoc_indent;
17260 p->heredoc_indent = 0;
17261 }
17262#line 17263 "parse.c"
17263 break;
17264
17265 case 679: /* string_content: "'#{'" @35 @36 @37 compstmt_stmts string_dend */
17266#line 6074 "parse.y"
17267 {
17268 COND_POP();
17269 CMDARG_POP();
17270 p->lex.strterm = (yyvsp[-4].strterm);
17271 SET_LEX_STATE((yyvsp[-5].state));
17272 p->lex.brace_nest = (yyvsp[-3].num);
17273 p->heredoc_indent = (yyvsp[-2].num);
17274 p->heredoc_line_indent = -1;
17275 if ((yyvsp[-1].node)) nd_unset_fl_newline((yyvsp[-1].node));
17276 (yyval.node) = new_evstr(p, (yyvsp[-1].node), &(yyloc), &(yylsp[-5]), &(yylsp[0]));
17277 /*% ripper: string_embexpr!($:compstmt) %*/
17278 }
17279#line 17280 "parse.c"
17280 break;
17281
17282 case 682: /* string_dvar: nonlocal_var */
17283#line 6093 "parse.y"
17284 {
17285 if (!((yyval.node) = gettable(p, (yyvsp[0].id), &(yyloc)))) (yyval.node) = NEW_ERROR(&(yyloc));
17286 /*% ripper: var_ref!($:1) %*/
17287 }
17288#line 17289 "parse.c"
17289 break;
17290
17291 case 686: /* ssym: "symbol literal" sym */
17292#line 6105 "parse.y"
17293 {
17294 SET_LEX_STATE(EXPR_END);
17295 VALUE str = rb_id2str((yyvsp[0].id));
17296 /*
17297 * TODO:
17298 * set_yylval_noname sets invalid id to yylval.
17299 * This branch can be removed once yylval is changed to
17300 * hold lexed string.
17301 */
17302 if (!str) str = STR_NEW0();
17303 (yyval.node) = NEW_SYM(str, &(yyloc));
17304 /*% ripper: symbol_literal!(symbol!($:2)) %*/
17305 }
17306#line 17307 "parse.c"
17307 break;
17308
17309 case 689: /* dsym: "symbol literal" string_contents "terminator" */
17310#line 6125 "parse.y"
17311 {
17312 SET_LEX_STATE(EXPR_END);
17313 (yyval.node) = dsym_node(p, (yyvsp[-1].node), &(yyloc));
17314 /*% ripper: dyna_symbol!($:2) %*/
17315 }
17316#line 17317 "parse.c"
17317 break;
17318
17319 case 691: /* numeric: tUMINUS_NUM simple_numeric */
17320#line 6134 "parse.y"
17321 {
17322 (yyval.node) = (yyvsp[0].node);
17323 negate_lit(p, (yyval.node), &(yyloc));
17324 /*% ripper: unary!(ID2VAL(idUMinus), $:2) %*/
17325 }
17326#line 17327 "parse.c"
17327 break;
17328
17329 case 702: /* keyword_variable: "'nil'" */
17330#line 6156 "parse.y"
17331 {(yyval.id) = KWD2EID(nil, (yyvsp[0].id));}
17332#line 17333 "parse.c"
17333 break;
17334
17335 case 703: /* keyword_variable: "'self'" */
17336#line 6157 "parse.y"
17337 {(yyval.id) = KWD2EID(self, (yyvsp[0].id));}
17338#line 17339 "parse.c"
17339 break;
17340
17341 case 704: /* keyword_variable: "'true'" */
17342#line 6158 "parse.y"
17343 {(yyval.id) = KWD2EID(true, (yyvsp[0].id));}
17344#line 17345 "parse.c"
17345 break;
17346
17347 case 705: /* keyword_variable: "'false'" */
17348#line 6159 "parse.y"
17349 {(yyval.id) = KWD2EID(false, (yyvsp[0].id));}
17350#line 17351 "parse.c"
17351 break;
17352
17353 case 706: /* keyword_variable: "'__FILE__'" */
17354#line 6160 "parse.y"
17355 {(yyval.id) = KWD2EID(_FILE__, (yyvsp[0].id));}
17356#line 17357 "parse.c"
17357 break;
17358
17359 case 707: /* keyword_variable: "'__LINE__'" */
17360#line 6161 "parse.y"
17361 {(yyval.id) = KWD2EID(_LINE__, (yyvsp[0].id));}
17362#line 17363 "parse.c"
17363 break;
17364
17365 case 708: /* keyword_variable: "'__ENCODING__'" */
17366#line 6162 "parse.y"
17367 {(yyval.id) = KWD2EID(_ENCODING__, (yyvsp[0].id));}
17368#line 17369 "parse.c"
17369 break;
17370
17371 case 709: /* var_ref: user_variable */
17372#line 6166 "parse.y"
17373 {
17374 if (!((yyval.node) = gettable(p, (yyvsp[0].id), &(yyloc)))) (yyval.node) = NEW_ERROR(&(yyloc));
17375 if (ifdef_ripper(id_is_var(p, (yyvsp[0].id)), false)) {
17376 /*% ripper: var_ref!($:1) %*/
17377 }
17378 else {
17379 /*% ripper: vcall!($:1) %*/
17380 }
17381 }
17382#line 17383 "parse.c"
17383 break;
17384
17385 case 710: /* var_ref: keyword_variable */
17386#line 6176 "parse.y"
17387 {
17388 if (!((yyval.node) = gettable(p, (yyvsp[0].id), &(yyloc)))) (yyval.node) = NEW_ERROR(&(yyloc));
17389 /*% ripper: var_ref!($:1) %*/
17390 }
17391#line 17392 "parse.c"
17392 break;
17393
17394 case 711: /* var_lhs: user_variable */
17395#line 6183 "parse.y"
17396 {
17397 /*% ripper: var_field!($:1) %*/
17398 (yyval.node) = assignable(p, (yyvsp[0].id), 0, &(yyloc));
17399 }
17400#line 17401 "parse.c"
17401 break;
17402
17403 case 712: /* var_lhs: keyword_variable */
17404#line 6183 "parse.y"
17405 {
17406 /*% ripper: var_field!($:1) %*/
17407 (yyval.node) = assignable(p, (yyvsp[0].id), 0, &(yyloc));
17408 }
17409#line 17410 "parse.c"
17410 break;
17411
17412 case 715: /* $@38: %empty */
17413#line 6194 "parse.y"
17414 {
17415 SET_LEX_STATE(EXPR_BEG);
17416 p->command_start = TRUE;
17417 }
17418#line 17419 "parse.c"
17419 break;
17420
17421 case 716: /* superclass: '<' $@38 expr_value term */
17422#line 6199 "parse.y"
17423 {
17424 (yyval.node) = (yyvsp[-1].node);
17425 /*% ripper: $:3 %*/
17426 }
17427#line 17428 "parse.c"
17428 break;
17429
17430 case 719: /* f_opt_paren_args: f_empty_arg */
17431#line 6208 "parse.y"
17432 {
17433 p->ctxt.in_argdef = 0;
17434 }
17435#line 17436 "parse.c"
17436 break;
17437
17438 case 720: /* f_empty_arg: %empty */
17439#line 6214 "parse.y"
17440 {
17441 (yyval.node_args) = new_empty_args_tail(p, &(yyloc));
17442 (yyval.node_args) = new_args(p, 0, 0, 0, 0, (yyval.node_args), &(yyloc));
17443 /*% ripper: params!(Qnil, Qnil, Qnil, Qnil, Qnil, Qnil, Qnil) %*/
17444 }
17445#line 17446 "parse.c"
17446 break;
17447
17448 case 721: /* f_paren_args: '(' f_args rparen */
17449#line 6222 "parse.y"
17450 {
17451 (yyval.node_args) = (yyvsp[-1].node_args);
17452 /*% ripper: paren!($:2) %*/
17453 SET_LEX_STATE(EXPR_BEG);
17454 p->command_start = TRUE;
17455 p->ctxt.in_argdef = 0;
17456 }
17457#line 17458 "parse.c"
17458 break;
17459
17460 case 723: /* @39: %empty */
17461#line 6232 "parse.y"
17462 {
17463 (yyval.ctxt) = p->ctxt;
17464 p->ctxt.in_kwarg = 1;
17465 p->ctxt.in_argdef = 1;
17466 SET_LEX_STATE(p->lex.state|EXPR_LABEL); /* force for args */
17467 }
17468#line 17469 "parse.c"
17469 break;
17470
17471 case 724: /* f_arglist: @39 f_args term */
17472#line 6239 "parse.y"
17473 {
17474 p->ctxt.in_kwarg = (yyvsp[-2].ctxt).in_kwarg;
17475 p->ctxt.in_argdef = 0;
17476 (yyval.node_args) = (yyvsp[-1].node_args);
17477 SET_LEX_STATE(EXPR_BEG);
17478 p->command_start = TRUE;
17479 /*% ripper: $:2 %*/
17480 }
17481#line 17482 "parse.c"
17482 break;
17483
17484 case 725: /* f_kw_arg_value: f_label arg_value */
17485#line 3014 "parse.y"
17486 {
17487 p->ctxt.in_argdef = 1;
17488 (yyval.node_kw_arg) = new_kw_arg(p, assignable(p, (yyvsp[-1].id), (yyvsp[0].node), &(yyloc)), &(yyloc));
17489 /*% ripper: [$:$, $:value] %*/
17490 }
17491#line 17492 "parse.c"
17492 break;
17493
17494 case 726: /* f_kw_arg_value: f_label */
17495#line 3020 "parse.y"
17496 {
17497 p->ctxt.in_argdef = 1;
17498 (yyval.node_kw_arg) = new_kw_arg(p, assignable(p, (yyvsp[0].id), NODE_SPECIAL_REQUIRED_KEYWORD, &(yyloc)), &(yyloc));
17499 /*% ripper: [$:$, 0] %*/
17500 }
17501#line 17502 "parse.c"
17502 break;
17503
17504 case 727: /* f_kwarg_arg_value: f_kw_arg_value */
17505#line 3029 "parse.y"
17506 {
17507 (yyval.node_kw_arg) = (yyvsp[0].node_kw_arg);
17508 /*% ripper: rb_ary_new3(1, $:1) %*/
17509 }
17510#line 17511 "parse.c"
17511 break;
17512
17513 case 728: /* f_kwarg_arg_value: f_kwarg_arg_value ',' f_kw_arg_value */
17514#line 3034 "parse.y"
17515 {
17516 (yyval.node_kw_arg) = kwd_append((yyvsp[-2].node_kw_arg), (yyvsp[0].node_kw_arg));
17517 /*% ripper: rb_ary_push($:1, $:3) %*/
17518 }
17519#line 17520 "parse.c"
17520 break;
17521
17522 case 729: /* opt_f_block_arg_opt_comma: ',' f_block_arg */
17523#line 2951 "parse.y"
17524 {
17525 (yyval.id) = (yyvsp[0].id);
17526 /*% ripper: $:2 %*/
17527 }
17528#line 17529 "parse.c"
17529 break;
17530
17531 case 731: /* args_tail_basic_arg_value_opt_comma: f_kwarg_arg_value ',' f_kwrest opt_f_block_arg_opt_comma */
17532#line 2928 "parse.y"
17533 {
17534 (yyval.node_args) = new_args_tail(p, (yyvsp[-3].node_kw_arg), (yyvsp[-1].id), (yyvsp[0].id), &(yylsp[-1]));
17535 /*% ripper: [$:1, $:3, $:4] %*/
17536 }
17537#line 17538 "parse.c"
17538 break;
17539
17540 case 732: /* args_tail_basic_arg_value_opt_comma: f_kwarg_arg_value opt_f_block_arg_opt_comma */
17541#line 2933 "parse.y"
17542 {
17543 (yyval.node_args) = new_args_tail(p, (yyvsp[-1].node_kw_arg), 0, (yyvsp[0].id), &(yylsp[-1]));
17544 /*% ripper: [$:1, Qnil, $:2] %*/
17545 }
17546#line 17547 "parse.c"
17547 break;
17548
17549 case 733: /* args_tail_basic_arg_value_opt_comma: f_any_kwrest opt_f_block_arg_opt_comma */
17550#line 2938 "parse.y"
17551 {
17552 (yyval.node_args) = new_args_tail(p, 0, (yyvsp[-1].id), (yyvsp[0].id), &(yylsp[-1]));
17553 /*% ripper: [Qnil, $:1, $:2] %*/
17554 }
17555#line 17556 "parse.c"
17556 break;
17557
17558 case 734: /* args_tail_basic_arg_value_opt_comma: f_block_arg */
17559#line 2943 "parse.y"
17560 {
17561 (yyval.node_args) = new_args_tail(p, 0, 0, (yyvsp[0].id), &(yylsp[0]));
17562 /*% ripper: [Qnil, Qnil, $:1] %*/
17563 }
17564#line 17565 "parse.c"
17565 break;
17566
17567 case 736: /* args_tail: args_forward */
17568#line 6251 "parse.y"
17569 {
17570 add_forwarding_args(p);
17571 (yyval.node_args) = new_args_tail(p, 0, (yyvsp[0].id), arg_FWD_BLOCK, &(yylsp[0]));
17572 (yyval.node_args)->nd_ainfo.forwarding = 1;
17573 /*% ripper: [Qnil, $:args_forward, Qnil] %*/
17574 }
17575#line 17576 "parse.c"
17576 break;
17577
17578 case 737: /* args_tail_basic_arg_value_none: f_kwarg_arg_value ',' f_kwrest opt_f_block_arg_none */
17579#line 2928 "parse.y"
17580 {
17581 (yyval.node_args) = new_args_tail(p, (yyvsp[-3].node_kw_arg), (yyvsp[-1].id), (yyvsp[0].id), &(yylsp[-1]));
17582 /*% ripper: [$:1, $:3, $:4] %*/
17583 }
17584#line 17585 "parse.c"
17585 break;
17586
17587 case 738: /* args_tail_basic_arg_value_none: f_kwarg_arg_value opt_f_block_arg_none */
17588#line 2933 "parse.y"
17589 {
17590 (yyval.node_args) = new_args_tail(p, (yyvsp[-1].node_kw_arg), 0, (yyvsp[0].id), &(yylsp[-1]));
17591 /*% ripper: [$:1, Qnil, $:2] %*/
17592 }
17593#line 17594 "parse.c"
17594 break;
17595
17596 case 739: /* args_tail_basic_arg_value_none: f_any_kwrest opt_f_block_arg_none */
17597#line 2938 "parse.y"
17598 {
17599 (yyval.node_args) = new_args_tail(p, 0, (yyvsp[-1].id), (yyvsp[0].id), &(yylsp[-1]));
17600 /*% ripper: [Qnil, $:1, $:2] %*/
17601 }
17602#line 17603 "parse.c"
17603 break;
17604
17605 case 740: /* args_tail_basic_arg_value_none: f_block_arg */
17606#line 2943 "parse.y"
17607 {
17608 (yyval.node_args) = new_args_tail(p, 0, 0, (yyvsp[0].id), &(yylsp[0]));
17609 /*% ripper: [Qnil, Qnil, $:1] %*/
17610 }
17611#line 17612 "parse.c"
17612 break;
17613
17614 case 742: /* largs_tail: args_forward */
17615#line 6261 "parse.y"
17616 {
17617 yyerror1(&(yylsp[0]), "unexpected ... in lambda argument");
17618 (yyval.node_args) = new_args_tail(p, 0, 0, 0, &(yylsp[0]));
17619 (yyval.node_args)->nd_ainfo.forwarding = 1;
17620 /*% ripper: [Qnil, $:args_forward, Qnil] %*/
17621 }
17622#line 17623 "parse.c"
17623 break;
17624
17625 case 743: /* f_opt_arg_value: f_arg_asgn f_eq arg_value */
17626#line 2992 "parse.y"
17627 {
17628 p->ctxt.in_argdef = 1;
17629 (yyval.node_opt_arg) = NEW_OPT_ARG(assignable(p, (yyvsp[-2].id), (yyvsp[0].node), &(yyloc)), &(yyloc));
17630 /*% ripper: [$:$, $:3] %*/
17631 }
17632#line 17633 "parse.c"
17633 break;
17634
17635 case 744: /* f_opt_arg_arg_value: f_opt_arg_value */
17636#line 3001 "parse.y"
17637 {
17638 (yyval.node_opt_arg) = (yyvsp[0].node_opt_arg);
17639 /*% ripper: rb_ary_new3(1, $:1) %*/
17640 }
17641#line 17642 "parse.c"
17642 break;
17643
17644 case 745: /* f_opt_arg_arg_value: f_opt_arg_arg_value ',' f_opt_arg_value */
17645#line 3006 "parse.y"
17646 {
17647 (yyval.node_opt_arg) = opt_arg_append((yyvsp[-2].node_opt_arg), (yyvsp[0].node_opt_arg));
17648 /*% ripper: rb_ary_push($:1, $:3) %*/
17649 }
17650#line 17651 "parse.c"
17651 break;
17652
17653 case 746: /* opt_args_tail_args_tail_opt_comma: ',' args_tail */
17654#line 3101 "parse.y"
17655 {
17656 (yyval.node_args) = (yyvsp[0].node_args);
17657 /*% ripper: $:tail %*/
17658 }
17659#line 17660 "parse.c"
17660 break;
17661
17662 case 747: /* opt_args_tail_args_tail_opt_comma: opt_comma */
17663#line 3106 "parse.y"
17664 {
17665 (yyval.node_args) = new_empty_args_tail(p, &(yyloc));
17666 /*% ripper: [Qnil, Qnil, Qnil] %*/
17667 }
17668#line 17669 "parse.c"
17669 break;
17670
17671 case 748: /* args-list_arg_value_opt_args_tail_args_tail_opt_comma: f_arg ',' f_opt_arg_arg_value ',' f_rest_arg opt_args_tail_args_tail_opt_comma */
17672#line 6271 "parse.y"
17673 {
17674 (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));
17675 /*% ripper: params!($:pre, $:opt, $:rest, Qnil, *$:tail[0..2]) %*/
17676 }
17677#line 17678 "parse.c"
17678 break;
17679
17680 case 749: /* args-list_arg_value_opt_args_tail_args_tail_opt_comma: f_arg ',' f_opt_arg_arg_value ',' f_rest_arg ',' f_arg opt_args_tail_args_tail_opt_comma */
17681#line 6276 "parse.y"
17682 {
17683 (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));
17684 /*% ripper: params!($:pre, $:opt, $:rest, $:post, *$:tail[0..2]) %*/
17685 }
17686#line 17687 "parse.c"
17687 break;
17688
17689 case 750: /* args-list_arg_value_opt_args_tail_args_tail_opt_comma: f_arg ',' f_opt_arg_arg_value opt_args_tail_args_tail_opt_comma */
17690#line 6281 "parse.y"
17691 {
17692 (yyval.node_args) = new_args(p, (yyvsp[-3].node_args_aux), (yyvsp[-1].node_opt_arg), 0, 0, (yyvsp[0].node_args), &(yyloc));
17693 /*% ripper: params!($:pre, $:opt, Qnil, Qnil, *$:tail[0..2]) %*/
17694 }
17695#line 17696 "parse.c"
17696 break;
17697
17698 case 751: /* args-list_arg_value_opt_args_tail_args_tail_opt_comma: f_arg ',' f_opt_arg_arg_value ',' f_arg opt_args_tail_args_tail_opt_comma */
17699#line 6286 "parse.y"
17700 {
17701 (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));
17702 /*% ripper: params!($:pre, $:opt, Qnil, $:post, *$:tail[0..2]) %*/
17703 }
17704#line 17705 "parse.c"
17705 break;
17706
17707 case 752: /* args-list_arg_value_opt_args_tail_args_tail_opt_comma: f_arg ',' f_rest_arg opt_args_tail_args_tail_opt_comma */
17708#line 6291 "parse.y"
17709 {
17710 (yyval.node_args) = new_args(p, (yyvsp[-3].node_args_aux), 0, (yyvsp[-1].id), 0, (yyvsp[0].node_args), &(yyloc));
17711 /*% ripper: params!($:pre, Qnil, $:rest, Qnil, *$:tail[0..2]) %*/
17712 }
17713#line 17714 "parse.c"
17714 break;
17715
17716 case 753: /* args-list_arg_value_opt_args_tail_args_tail_opt_comma: f_arg ',' f_rest_arg ',' f_arg opt_args_tail_args_tail_opt_comma */
17717#line 6296 "parse.y"
17718 {
17719 (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));
17720 /*% ripper: params!($:pre, Qnil, $:rest, $:post, *$:tail[0..2]) %*/
17721 }
17722#line 17723 "parse.c"
17723 break;
17724
17725 case 754: /* args-list_arg_value_opt_args_tail_args_tail_opt_comma: f_opt_arg_arg_value ',' f_rest_arg opt_args_tail_args_tail_opt_comma */
17726#line 6301 "parse.y"
17727 {
17728 (yyval.node_args) = new_args(p, 0, (yyvsp[-3].node_opt_arg), (yyvsp[-1].id), 0, (yyvsp[0].node_args), &(yyloc));
17729 /*% ripper: params!(Qnil, $:opt, $:rest, Qnil, *$:tail[0..2]) %*/
17730 }
17731#line 17732 "parse.c"
17732 break;
17733
17734 case 755: /* args-list_arg_value_opt_args_tail_args_tail_opt_comma: f_opt_arg_arg_value ',' f_rest_arg ',' f_arg opt_args_tail_args_tail_opt_comma */
17735#line 6306 "parse.y"
17736 {
17737 (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));
17738 /*% ripper: params!(Qnil, $:opt, $:rest, $:post, *$:tail[0..2]) %*/
17739 }
17740#line 17741 "parse.c"
17741 break;
17742
17743 case 756: /* args-list_arg_value_opt_args_tail_args_tail_opt_comma: f_opt_arg_arg_value opt_args_tail_args_tail_opt_comma */
17744#line 6311 "parse.y"
17745 {
17746 (yyval.node_args) = new_args(p, 0, (yyvsp[-1].node_opt_arg), 0, 0, (yyvsp[0].node_args), &(yyloc));
17747 /*% ripper: params!(Qnil, $:opt, Qnil, Qnil, *$:tail[0..2]) %*/
17748 }
17749#line 17750 "parse.c"
17750 break;
17751
17752 case 757: /* args-list_arg_value_opt_args_tail_args_tail_opt_comma: f_opt_arg_arg_value ',' f_arg opt_args_tail_args_tail_opt_comma */
17753#line 6316 "parse.y"
17754 {
17755 (yyval.node_args) = new_args(p, 0, (yyvsp[-3].node_opt_arg), 0, (yyvsp[-1].node_args_aux), (yyvsp[0].node_args), &(yyloc));
17756 /*% ripper: params!(Qnil, $:opt, Qnil, $:post, *$:tail[0..2]) %*/
17757 }
17758#line 17759 "parse.c"
17759 break;
17760
17761 case 758: /* args-list_arg_value_opt_args_tail_args_tail_opt_comma: f_rest_arg opt_args_tail_args_tail_opt_comma */
17762#line 6321 "parse.y"
17763 {
17764 (yyval.node_args) = new_args(p, 0, 0, (yyvsp[-1].id), 0, (yyvsp[0].node_args), &(yyloc));
17765 /*% ripper: params!(Qnil, Qnil, $:rest, Qnil, *$:tail[0..2]) %*/
17766 }
17767#line 17768 "parse.c"
17768 break;
17769
17770 case 759: /* args-list_arg_value_opt_args_tail_args_tail_opt_comma: f_rest_arg ',' f_arg opt_args_tail_args_tail_opt_comma */
17771#line 6326 "parse.y"
17772 {
17773 (yyval.node_args) = new_args(p, 0, 0, (yyvsp[-3].id), (yyvsp[-1].node_args_aux), (yyvsp[0].node_args), &(yyloc));
17774 /*% ripper: params!(Qnil, Qnil, $:rest, $:post, *$:tail[0..2]) %*/
17775 }
17776#line 17777 "parse.c"
17777 break;
17778
17779 case 761: /* f_args-list_args_tail_opt_comma: f_arg opt_args_tail_args_tail_opt_comma */
17780#line 6343 "parse.y"
17781 {
17782 (yyval.node_args) = new_args(p, (yyvsp[-1].node_args_aux), 0, 0, 0, (yyvsp[0].node_args), &(yyloc));
17783 /*% ripper: params!($:pre, Qnil, Qnil, Qnil, *$:tail[0..2]) %*/
17784 }
17785#line 17786 "parse.c"
17786 break;
17787
17788 case 762: /* tail-only-args_args_tail: args_tail */
17789#line 6334 "parse.y"
17790 {
17791 (yyval.node_args) = new_args(p, 0, 0, 0, 0, (yyvsp[0].node_args), &(yyloc));
17792 /*% ripper: params!(Qnil, Qnil, Qnil, Qnil, *$:tail[0..2]) %*/
17793 }
17794#line 17795 "parse.c"
17795 break;
17796
17797 case 766: /* opt_args_tail_largs_tail_none: ',' largs_tail */
17798#line 3101 "parse.y"
17799 {
17800 (yyval.node_args) = (yyvsp[0].node_args);
17801 /*% ripper: $:tail %*/
17802 }
17803#line 17804 "parse.c"
17804 break;
17805
17806 case 767: /* opt_args_tail_largs_tail_none: none */
17807#line 3106 "parse.y"
17808 {
17809 (yyval.node_args) = new_empty_args_tail(p, &(yyloc));
17810 /*% ripper: [Qnil, Qnil, Qnil] %*/
17811 }
17812#line 17813 "parse.c"
17813 break;
17814
17815 case 768: /* args-list_arg_value_opt_args_tail_largs_tail_none: f_arg ',' f_opt_arg_arg_value ',' f_rest_arg opt_args_tail_largs_tail_none */
17816#line 6271 "parse.y"
17817 {
17818 (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));
17819 /*% ripper: params!($:pre, $:opt, $:rest, Qnil, *$:tail[0..2]) %*/
17820 }
17821#line 17822 "parse.c"
17822 break;
17823
17824 case 769: /* args-list_arg_value_opt_args_tail_largs_tail_none: f_arg ',' f_opt_arg_arg_value ',' f_rest_arg ',' f_arg opt_args_tail_largs_tail_none */
17825#line 6276 "parse.y"
17826 {
17827 (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));
17828 /*% ripper: params!($:pre, $:opt, $:rest, $:post, *$:tail[0..2]) %*/
17829 }
17830#line 17831 "parse.c"
17831 break;
17832
17833 case 770: /* args-list_arg_value_opt_args_tail_largs_tail_none: f_arg ',' f_opt_arg_arg_value opt_args_tail_largs_tail_none */
17834#line 6281 "parse.y"
17835 {
17836 (yyval.node_args) = new_args(p, (yyvsp[-3].node_args_aux), (yyvsp[-1].node_opt_arg), 0, 0, (yyvsp[0].node_args), &(yyloc));
17837 /*% ripper: params!($:pre, $:opt, Qnil, Qnil, *$:tail[0..2]) %*/
17838 }
17839#line 17840 "parse.c"
17840 break;
17841
17842 case 771: /* args-list_arg_value_opt_args_tail_largs_tail_none: f_arg ',' f_opt_arg_arg_value ',' f_arg opt_args_tail_largs_tail_none */
17843#line 6286 "parse.y"
17844 {
17845 (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));
17846 /*% ripper: params!($:pre, $:opt, Qnil, $:post, *$:tail[0..2]) %*/
17847 }
17848#line 17849 "parse.c"
17849 break;
17850
17851 case 772: /* args-list_arg_value_opt_args_tail_largs_tail_none: f_arg ',' f_rest_arg opt_args_tail_largs_tail_none */
17852#line 6291 "parse.y"
17853 {
17854 (yyval.node_args) = new_args(p, (yyvsp[-3].node_args_aux), 0, (yyvsp[-1].id), 0, (yyvsp[0].node_args), &(yyloc));
17855 /*% ripper: params!($:pre, Qnil, $:rest, Qnil, *$:tail[0..2]) %*/
17856 }
17857#line 17858 "parse.c"
17858 break;
17859
17860 case 773: /* args-list_arg_value_opt_args_tail_largs_tail_none: f_arg ',' f_rest_arg ',' f_arg opt_args_tail_largs_tail_none */
17861#line 6296 "parse.y"
17862 {
17863 (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));
17864 /*% ripper: params!($:pre, Qnil, $:rest, $:post, *$:tail[0..2]) %*/
17865 }
17866#line 17867 "parse.c"
17867 break;
17868
17869 case 774: /* args-list_arg_value_opt_args_tail_largs_tail_none: f_opt_arg_arg_value ',' f_rest_arg opt_args_tail_largs_tail_none */
17870#line 6301 "parse.y"
17871 {
17872 (yyval.node_args) = new_args(p, 0, (yyvsp[-3].node_opt_arg), (yyvsp[-1].id), 0, (yyvsp[0].node_args), &(yyloc));
17873 /*% ripper: params!(Qnil, $:opt, $:rest, Qnil, *$:tail[0..2]) %*/
17874 }
17875#line 17876 "parse.c"
17876 break;
17877
17878 case 775: /* args-list_arg_value_opt_args_tail_largs_tail_none: f_opt_arg_arg_value ',' f_rest_arg ',' f_arg opt_args_tail_largs_tail_none */
17879#line 6306 "parse.y"
17880 {
17881 (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));
17882 /*% ripper: params!(Qnil, $:opt, $:rest, $:post, *$:tail[0..2]) %*/
17883 }
17884#line 17885 "parse.c"
17885 break;
17886
17887 case 776: /* args-list_arg_value_opt_args_tail_largs_tail_none: f_opt_arg_arg_value opt_args_tail_largs_tail_none */
17888#line 6311 "parse.y"
17889 {
17890 (yyval.node_args) = new_args(p, 0, (yyvsp[-1].node_opt_arg), 0, 0, (yyvsp[0].node_args), &(yyloc));
17891 /*% ripper: params!(Qnil, $:opt, Qnil, Qnil, *$:tail[0..2]) %*/
17892 }
17893#line 17894 "parse.c"
17894 break;
17895
17896 case 777: /* args-list_arg_value_opt_args_tail_largs_tail_none: f_opt_arg_arg_value ',' f_arg opt_args_tail_largs_tail_none */
17897#line 6316 "parse.y"
17898 {
17899 (yyval.node_args) = new_args(p, 0, (yyvsp[-3].node_opt_arg), 0, (yyvsp[-1].node_args_aux), (yyvsp[0].node_args), &(yyloc));
17900 /*% ripper: params!(Qnil, $:opt, Qnil, $:post, *$:tail[0..2]) %*/
17901 }
17902#line 17903 "parse.c"
17903 break;
17904
17905 case 778: /* args-list_arg_value_opt_args_tail_largs_tail_none: f_rest_arg opt_args_tail_largs_tail_none */
17906#line 6321 "parse.y"
17907 {
17908 (yyval.node_args) = new_args(p, 0, 0, (yyvsp[-1].id), 0, (yyvsp[0].node_args), &(yyloc));
17909 /*% ripper: params!(Qnil, Qnil, $:rest, Qnil, *$:tail[0..2]) %*/
17910 }
17911#line 17912 "parse.c"
17912 break;
17913
17914 case 779: /* args-list_arg_value_opt_args_tail_largs_tail_none: f_rest_arg ',' f_arg opt_args_tail_largs_tail_none */
17915#line 6326 "parse.y"
17916 {
17917 (yyval.node_args) = new_args(p, 0, 0, (yyvsp[-3].id), (yyvsp[-1].node_args_aux), (yyvsp[0].node_args), &(yyloc));
17918 /*% ripper: params!(Qnil, Qnil, $:rest, $:post, *$:tail[0..2]) %*/
17919 }
17920#line 17921 "parse.c"
17921 break;
17922
17923 case 781: /* f_args-list_largs_tail_none: f_arg opt_args_tail_largs_tail_none */
17924#line 6343 "parse.y"
17925 {
17926 (yyval.node_args) = new_args(p, (yyvsp[-1].node_args_aux), 0, 0, 0, (yyvsp[0].node_args), &(yyloc));
17927 /*% ripper: params!($:pre, Qnil, Qnil, Qnil, *$:tail[0..2]) %*/
17928 }
17929#line 17930 "parse.c"
17930 break;
17931
17932 case 782: /* tail-only-args_largs_tail: largs_tail */
17933#line 6334 "parse.y"
17934 {
17935 (yyval.node_args) = new_args(p, 0, 0, 0, 0, (yyvsp[0].node_args), &(yyloc));
17936 /*% ripper: params!(Qnil, Qnil, Qnil, Qnil, *$:tail[0..2]) %*/
17937 }
17938#line 17939 "parse.c"
17939 break;
17940
17941 case 786: /* args_forward: "(..." */
17942#line 6358 "parse.y"
17943 {
17944 (yyval.id) = idFWD_KWREST;
17945 /*% ripper: args_forward! %*/
17946 }
17947#line 17948 "parse.c"
17948 break;
17949
17950 case 787: /* f_bad_arg: "constant" */
17951#line 6365 "parse.y"
17952 {
17953 static const char mesg[] = "formal argument cannot be a constant";
17954 /*%%%*/
17955 yyerror1(&(yylsp[0]), mesg);
17956 /*% %*/
17957 (yyval.id) = 0;
17958 /*% ripper[error]: param_error!(ERR_MESG(), $:1) %*/
17959 }
17960#line 17961 "parse.c"
17961 break;
17962
17963 case 788: /* f_bad_arg: "instance variable" */
17964#line 6374 "parse.y"
17965 {
17966 static const char mesg[] = "formal argument cannot be an instance variable";
17967 /*%%%*/
17968 yyerror1(&(yylsp[0]), mesg);
17969 /*% %*/
17970 (yyval.id) = 0;
17971 /*% ripper[error]: param_error!(ERR_MESG(), $:1) %*/
17972 }
17973#line 17974 "parse.c"
17974 break;
17975
17976 case 789: /* f_bad_arg: "global variable" */
17977#line 6383 "parse.y"
17978 {
17979 static const char mesg[] = "formal argument cannot be a global variable";
17980 /*%%%*/
17981 yyerror1(&(yylsp[0]), mesg);
17982 /*% %*/
17983 (yyval.id) = 0;
17984 /*% ripper[error]: param_error!(ERR_MESG(), $:1) %*/
17985 }
17986#line 17987 "parse.c"
17987 break;
17988
17989 case 790: /* f_bad_arg: "class variable" */
17990#line 6392 "parse.y"
17991 {
17992 static const char mesg[] = "formal argument cannot be a class variable";
17993 /*%%%*/
17994 yyerror1(&(yylsp[0]), mesg);
17995 /*% %*/
17996 (yyval.id) = 0;
17997 /*% ripper[error]: param_error!(ERR_MESG(), $:1) %*/
17998 }
17999#line 18000 "parse.c"
18000 break;
18001
18002 case 792: /* f_norm_arg: "local variable or method" */
18003#line 6404 "parse.y"
18004 {
18005 VALUE e = formal_argument_error(p, (yyval.id) = (yyvsp[0].id));
18006 if (e) {
18007 /*% ripper[error]: param_error!(?e, $:1) %*/
18008 }
18009 p->max_numparam = ORDINAL_PARAM;
18010 }
18011#line 18012 "parse.c"
18012 break;
18013
18014 case 793: /* f_arg_asgn: f_norm_arg */
18015#line 6414 "parse.y"
18016 {
18017 arg_var(p, (yyvsp[0].id));
18018 (yyval.id) = (yyvsp[0].id);
18019 }
18020#line 18021 "parse.c"
18021 break;
18022
18023 case 794: /* f_arg_item: f_arg_asgn */
18024#line 6421 "parse.y"
18025 {
18026 (yyval.node_args_aux) = NEW_ARGS_AUX((yyvsp[0].id), 1, &NULL_LOC);
18027 /*% ripper: $:1 %*/
18028 }
18029#line 18030 "parse.c"
18030 break;
18031
18032 case 795: /* f_arg_item: "(" f_margs rparen */
18033#line 6426 "parse.y"
18034 {
18035 ID tid = internal_id(p);
18036 YYLTYPE loc;
18037 loc.beg_pos = (yylsp[-1]).beg_pos;
18038 loc.end_pos = (yylsp[-1]).beg_pos;
18039 arg_var(p, tid);
18040 if (dyna_in_block(p)) {
18041 (yyvsp[-1].node_masgn)->nd_value = NEW_DVAR(tid, &loc);
18042 }
18043 else {
18044 (yyvsp[-1].node_masgn)->nd_value = NEW_LVAR(tid, &loc);
18045 }
18046 (yyval.node_args_aux) = NEW_ARGS_AUX(tid, 1, &NULL_LOC);
18047 (yyval.node_args_aux)->nd_next = (NODE *)(yyvsp[-1].node_masgn);
18048 /*% ripper: mlhs_paren!($:2) %*/
18049 }
18050#line 18051 "parse.c"
18051 break;
18052
18053 case 797: /* f_arg: f_arg ',' f_arg_item */
18054#line 6447 "parse.y"
18055 {
18056 (yyval.node_args_aux) = (yyvsp[-2].node_args_aux);
18057 (yyval.node_args_aux)->nd_plen++;
18058 (yyval.node_args_aux)->nd_next = block_append(p, (yyval.node_args_aux)->nd_next, (yyvsp[0].node_args_aux)->nd_next);
18059 rb_discard_node(p, (NODE *)(yyvsp[0].node_args_aux));
18060 /*% ripper: rb_ary_push($:1, $:3) %*/
18061 }
18062#line 18063 "parse.c"
18063 break;
18064
18065 case 798: /* f_label: "label" */
18066#line 6458 "parse.y"
18067 {
18068 VALUE e = formal_argument_error(p, (yyval.id) = (yyvsp[0].id));
18069 if (e) {
18070 (yyval.id) = 0;
18071 /*% ripper[error]: param_error!(?e, $:1) %*/
18072 }
18073 /*
18074 * Workaround for Prism::ParseTest#test_filepath for
18075 * "unparser/corpus/literal/def.txt"
18076 *
18077 * See the discussion on https://github.com/ruby/ruby/pull/9923
18078 */
18079 arg_var(p, ifdef_ripper(0, (yyvsp[0].id)));
18080 /*% ripper: $:1 %*/
18081 p->max_numparam = ORDINAL_PARAM;
18082 p->ctxt.in_argdef = 0;
18083 }
18084#line 18085 "parse.c"
18085 break;
18086
18087 case 801: /* f_no_kwarg: p_kwnorest */
18088#line 6482 "parse.y"
18089 {
18090 /*% ripper: nokw_param!(Qnil) %*/
18091 }
18092#line 18093 "parse.c"
18093 break;
18094
18095 case 802: /* f_kwrest: kwrest_mark "local variable or method" */
18096#line 6488 "parse.y"
18097 {
18098 arg_var(p, shadowing_lvar(p, (yyvsp[0].id)));
18099 (yyval.id) = (yyvsp[0].id);
18100 /*% ripper: kwrest_param!($:2) %*/
18101 }
18102#line 18103 "parse.c"
18103 break;
18104
18105 case 803: /* f_kwrest: kwrest_mark */
18106#line 6494 "parse.y"
18107 {
18108 arg_var(p, idFWD_KWREST);
18109 (yyval.id) = idFWD_KWREST;
18110 /*% ripper: kwrest_param!(Qnil) %*/
18111 }
18112#line 18113 "parse.c"
18113 break;
18114
18115 case 806: /* f_rest_arg: restarg_mark "local variable or method" */
18116#line 6506 "parse.y"
18117 {
18118 arg_var(p, shadowing_lvar(p, (yyvsp[0].id)));
18119 (yyval.id) = (yyvsp[0].id);
18120 /*% ripper: rest_param!($:2) %*/
18121 }
18122#line 18123 "parse.c"
18123 break;
18124
18125 case 807: /* f_rest_arg: restarg_mark */
18126#line 6512 "parse.y"
18127 {
18128 arg_var(p, idFWD_REST);
18129 (yyval.id) = idFWD_REST;
18130 /*% ripper: rest_param!(Qnil) %*/
18131 }
18132#line 18133 "parse.c"
18133 break;
18134
18135 case 810: /* f_block_arg: blkarg_mark "local variable or method" */
18136#line 6524 "parse.y"
18137 {
18138 arg_var(p, shadowing_lvar(p, (yyvsp[0].id)));
18139 (yyval.id) = (yyvsp[0].id);
18140 /*% ripper: blockarg!($:2) %*/
18141 }
18142#line 18143 "parse.c"
18143 break;
18144
18145 case 811: /* f_block_arg: blkarg_mark "'nil'" */
18146#line 6530 "parse.y"
18147 {
18148 (yyval.id) = idNil;
18149 /*% ripper: blockarg!(ID2VAL(idNil)) %*/
18150 }
18151#line 18152 "parse.c"
18152 break;
18153
18154 case 812: /* f_block_arg: blkarg_mark */
18155#line 6535 "parse.y"
18156 {
18157 arg_var(p, idFWD_BLOCK);
18158 (yyval.id) = idFWD_BLOCK;
18159 /*% ripper: blockarg!(Qnil) %*/
18160 }
18161#line 18162 "parse.c"
18162 break;
18163
18164 case 815: /* opt_comma: option_',' */
18165#line 6543 "parse.y"
18166 {
18167 (yyval.id) = 0;
18168 /*% ripper: Qnil %*/
18169 }
18170#line 18171 "parse.c"
18171 break;
18172
18173 case 816: /* value_expr_singleton_expr: singleton_expr */
18174#line 3155 "parse.y"
18175 {
18176 value_expr(p, (yyvsp[0].node));
18177 (yyval.node) = (yyvsp[0].node);
18178 }
18179#line 18180 "parse.c"
18180 break;
18181
18182 case 817: /* singleton: value_expr_singleton_expr */
18183#line 6551 "parse.y"
18184 {
18185 NODE *expr = last_expr_node((yyvsp[0].node));
18186 switch (nd_type(expr)) {
18187 case NODE_STR:
18188 case NODE_DSTR:
18189 case NODE_XSTR:
18190 case NODE_DXSTR:
18191 case NODE_REGX:
18192 case NODE_DREGX:
18193 case NODE_SYM:
18194 case NODE_LINE:
18195 case NODE_FILE:
18196 case NODE_ENCODING:
18197 case NODE_INTEGER:
18198 case NODE_FLOAT:
18199 case NODE_RATIONAL:
18200 case NODE_IMAGINARY:
18201 case NODE_DSYM:
18202 case NODE_LIST:
18203 case NODE_ZLIST:
18204 yyerror1(&expr->nd_loc, "can't define singleton method for literals");
18205 break;
18206 default:
18207 break;
18208 }
18209 (yyval.node) = (yyvsp[0].node);
18210 }
18211#line 18212 "parse.c"
18212 break;
18213
18214 case 819: /* $@40: %empty */
18215#line 6582 "parse.y"
18216 {
18217 SET_LEX_STATE(EXPR_BEG);
18218 p->ctxt.in_argdef = 0;
18219 }
18220#line 18221 "parse.c"
18221 break;
18222
18223 case 820: /* singleton_expr: '(' $@40 expr rparen */
18224#line 6587 "parse.y"
18225 {
18226 p->ctxt.in_argdef = 1;
18227 (yyval.node) = (yyvsp[-1].node);
18228 /*% ripper: paren!($:3) %*/
18229 }
18230#line 18231 "parse.c"
18231 break;
18232
18233 case 822: /* assoc_list: assocs trailer */
18234#line 6596 "parse.y"
18235 {
18236 (yyval.node) = (yyvsp[-1].node);
18237 /*% ripper: assoclist_from_args!($:1) %*/
18238 }
18239#line 18240 "parse.c"
18240 break;
18241
18242 case 824: /* assocs: assocs ',' assoc */
18243#line 6605 "parse.y"
18244 {
18245 NODE *assocs = (yyvsp[-2].node);
18246 NODE *tail = (yyvsp[0].node);
18247 if (!assocs) {
18248 assocs = tail;
18249 }
18250 else if (tail) {
18251 if (RNODE_LIST(assocs)->nd_head) {
18252 NODE *n = RNODE_LIST(tail)->nd_next;
18253 if (!RNODE_LIST(tail)->nd_head && nd_type_p(n, NODE_LIST) &&
18254 nd_type_p((n = RNODE_LIST(n)->nd_head), NODE_HASH)) {
18255 /* DSTAR */
18256 tail = RNODE_HASH(n)->nd_head;
18257 }
18258 }
18259 if (tail) {
18260 assocs = list_concat(assocs, tail);
18261 }
18262 }
18263 (yyval.node) = assocs;
18264 /*% ripper: rb_ary_push($:1, $:3) %*/
18265 }
18266#line 18267 "parse.c"
18267 break;
18268
18269 case 825: /* assoc: arg_value "=>" arg_value */
18270#line 6630 "parse.y"
18271 {
18272 (yyval.node) = list_append(p, NEW_LIST((yyvsp[-2].node), &(yyloc)), (yyvsp[0].node));
18273 /*% ripper: assoc_new!($:1, $:3) %*/
18274 }
18275#line 18276 "parse.c"
18276 break;
18277
18278 case 826: /* assoc: "label" arg_value */
18279#line 6635 "parse.y"
18280 {
18281 (yyval.node) = list_append(p, NEW_LIST(NEW_SYM(rb_id2str((yyvsp[-1].id)), &(yylsp[-1])), &(yyloc)), (yyvsp[0].node));
18282 /*% ripper: assoc_new!($:1, $:2) %*/
18283 }
18284#line 18285 "parse.c"
18285 break;
18286
18287 case 827: /* assoc: "label" */
18288#line 6640 "parse.y"
18289 {
18290 NODE *val = gettable(p, (yyvsp[0].id), &(yyloc));
18291 if (!val) val = NEW_ERROR(&(yyloc));
18292 (yyval.node) = list_append(p, NEW_LIST(NEW_SYM(rb_id2str((yyvsp[0].id)), &(yylsp[0])), &(yyloc)), val);
18293 /*% ripper: assoc_new!($:1, Qnil) %*/
18294 }
18295#line 18296 "parse.c"
18296 break;
18297
18298 case 828: /* assoc: "string literal" string_contents tLABEL_END arg_value */
18299#line 6647 "parse.y"
18300 {
18301 YYLTYPE loc = code_loc_gen(&(yylsp[-3]), &(yylsp[-1]));
18302 (yyval.node) = list_append(p, NEW_LIST(dsym_node(p, (yyvsp[-2].node), &loc), &loc), (yyvsp[0].node));
18303 /*% ripper: assoc_new!(dyna_symbol!($:2), $:4) %*/
18304 }
18305#line 18306 "parse.c"
18306 break;
18307
18308 case 829: /* assoc: "**arg" arg_value */
18309#line 6653 "parse.y"
18310 {
18311 (yyval.node) = list_append(p, NEW_LIST(0, &(yyloc)), (yyvsp[0].node));
18312 /*% ripper: assoc_splat!($:2) %*/
18313 }
18314#line 18315 "parse.c"
18315 break;
18316
18317 case 830: /* assoc: "**arg" */
18318#line 6658 "parse.y"
18319 {
18320 forwarding_arg_check(p, idFWD_KWREST, idFWD_ALL, "keyword rest");
18321 (yyval.node) = list_append(p, NEW_LIST(0, &(yyloc)),
18322 NEW_LVAR(idFWD_KWREST, &(yyloc)));
18323 /*% ripper: assoc_splat!(Qnil) %*/
18324 }
18325#line 18326 "parse.c"
18326 break;
18327
18328 case 849: /* term: ';' */
18329#line 6705 "parse.y"
18330 {
18331 yyerrok;
18332 token_flush(p);
18333 if (p->ctxt.in_defined) {
18334 p->ctxt.has_trailing_semicolon = 1;
18335 }
18336 }
18337#line 18338 "parse.c"
18338 break;
18339
18340 case 850: /* term: '\n' */
18341#line 6713 "parse.y"
18342 {
18343 (yyloc).end_pos = (yyloc).beg_pos;
18344 token_flush(p);
18345 }
18346#line 18347 "parse.c"
18347 break;
18348
18349 case 852: /* terms: terms ';' */
18350#line 6720 "parse.y"
18351 {yyerrok;}
18352#line 18353 "parse.c"
18353 break;
18354
18355 case 853: /* none: %empty */
18356#line 6724 "parse.y"
18357 {
18358 (yyval.node) = 0;
18359 /*% ripper: Qnil %*/
18360 }
18361#line 18362 "parse.c"
18362 break;
18363
18364
18365#line 18366 "parse.c"
18366
18367 default: break;
18368 }
18369 /* User semantic actions sometimes alter yychar, and that requires
18370 that yytoken be updated with the new translation. We take the
18371 approach of translating immediately before every use of yytoken.
18372 One alternative is translating here after every semantic action,
18373 but that translation would be missed if the semantic action invokes
18374 YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or
18375 if it invokes YYBACKUP. In the case of YYABORT or YYACCEPT, an
18376 incorrect destructor might then be invoked immediately. In the
18377 case of YYERROR or YYBACKUP, subsequent parser actions might lead
18378 to an incorrect destructor call or verbose syntax error message
18379 before the lookahead is translated. */
18380 YY_SYMBOL_PRINT ("-> $$ =", YY_CAST (yysymbol_kind_t, yyr1[yyn]), &yyval, &yyloc, p);
18381
18382 YYPOPSTACK (yylen);
18383 /* %after-reduce function. */
18384#line 2667 "parse.y"
18385 {after_reduce(yylen, p);}
18386#line 18387 "parse.c"
18387
18388 yylen = 0;
18389
18390 *++yyvsp = yyval;
18391 *++yylsp = yyloc;
18392
18393 /* Now 'shift' the result of the reduction. Determine what state
18394 that goes to, based on the state we popped back to and the rule
18395 number reduced by. */
18396 {
18397 const int yylhs = yyr1[yyn] - YYNTOKENS;
18398 const int yyi = yypgoto[yylhs] + *yyssp;
18399 yystate = (0 <= yyi && yyi <= YYLAST && yycheck[yyi] == *yyssp
18400 ? yytable[yyi]
18401 : yydefgoto[yylhs]);
18402 }
18403
18404 goto yynewstate;
18405
18406
18407/*--------------------------------------.
18408| yyerrlab -- here on detecting error. |
18409`--------------------------------------*/
18410yyerrlab:
18411 /* Make sure we have latest lookahead translation. See comments at
18412 user semantic actions for why this is necessary. */
18413 yytoken = yychar == YYEMPTY ? YYSYMBOL_YYEMPTY : YYTRANSLATE (yychar);
18414 /* If not already recovering from an error, report this error. */
18415 if (!yyerrstatus)
18416 {
18417 ++yynerrs;
18418 {
18419 yypcontext_t yyctx
18420 = {yyssp, yytoken, &yylloc};
18421 char const *yymsgp = YY_("syntax error");
18422 int yysyntax_error_status;
18423 yysyntax_error_status = yysyntax_error (&yymsg_alloc, &yymsg, &yyctx, p);
18424 if (yysyntax_error_status == 0)
18425 yymsgp = yymsg;
18426 else if (yysyntax_error_status == -1)
18427 {
18428 if (yymsg != yymsgbuf)
18429 YYSTACK_FREE (yymsg);
18430 yymsg = YY_CAST (char *,
18431 YYSTACK_ALLOC (YY_CAST (YYSIZE_T, yymsg_alloc)));
18432 if (yymsg)
18433 {
18434 yysyntax_error_status
18435 = yysyntax_error (&yymsg_alloc, &yymsg, &yyctx, p);
18436 yymsgp = yymsg;
18437 }
18438 else
18439 {
18440 yymsg = yymsgbuf;
18441 yymsg_alloc = sizeof yymsgbuf;
18442 yysyntax_error_status = YYENOMEM;
18443 }
18444 }
18445 yyerror (&yylloc, p, yymsgp);
18446 if (yysyntax_error_status == YYENOMEM)
18447 YYNOMEM;
18448 }
18449 }
18450
18451 yyerror_range[1] = yylloc;
18452 if (yyerrstatus == 3)
18453 {
18454 /* If just tried and failed to reuse lookahead token after an
18455 error, discard it. */
18456
18457 if (yychar <= END_OF_INPUT)
18458 {
18459 /* Return failure if at end of input. */
18460 if (yychar == END_OF_INPUT)
18461 YYABORT;
18462 }
18463 else
18464 {
18465 yydestruct ("Error: discarding",
18466 yytoken, &yylval, &yylloc, p);
18467 yychar = YYEMPTY;
18468 }
18469 }
18470
18471 /* Else will try to reuse lookahead token after shifting the error
18472 token. */
18473 goto yyerrlab1;
18474
18475
18476/*---------------------------------------------------.
18477| yyerrorlab -- error raised explicitly by YYERROR. |
18478`---------------------------------------------------*/
18479yyerrorlab:
18480 /* Pacify compilers when the user code never invokes YYERROR and the
18481 label yyerrorlab therefore never appears in user code. */
18482 if (0)
18483 YYERROR;
18484 ++yynerrs;
18485
18486 /* Do not reclaim the symbols of the rule whose action triggered
18487 this YYERROR. */
18488 YYPOPSTACK (yylen);
18489 /* %after-pop-stack function. */
18490#line 2669 "parse.y"
18491 {after_pop_stack(yylen, p);}
18492#line 18493 "parse.c"
18493
18494 yylen = 0;
18495 YY_STACK_PRINT (yyss, yyssp, p);
18496 yystate = *yyssp;
18497 goto yyerrlab1;
18498
18499
18500/*-------------------------------------------------------------.
18501| yyerrlab1 -- common code for both syntax error and YYERROR. |
18502`-------------------------------------------------------------*/
18503yyerrlab1:
18504 yyerrstatus = 3; /* Each real token shifted decrements this. */
18505
18506 /* Pop stack until we find a state that shifts the error token. */
18507 for (;;)
18508 {
18509 yyn = yypact[yystate];
18510 if (!yypact_value_is_default (yyn))
18511 {
18512 yyn += YYSYMBOL_YYerror;
18513 if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror)
18514 {
18515 yyn = yytable[yyn];
18516 if (0 < yyn)
18517 break;
18518 }
18519 }
18520
18521 /* Pop the current state because it cannot handle the error token. */
18522 if (yyssp == yyss)
18523 YYABORT;
18524
18525 yyerror_range[1] = *yylsp;
18526 yydestruct ("Error: popping",
18527 YY_ACCESSING_SYMBOL (yystate), yyvsp, yylsp, p);
18528 YYPOPSTACK (1);
18529 /* %after-pop-stack function. */
18530#line 2669 "parse.y"
18531 {after_pop_stack(1, p);}
18532#line 18533 "parse.c"
18533
18534 yystate = *yyssp;
18535 YY_STACK_PRINT (yyss, yyssp, p);
18536 }
18537
18538 YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
18539 *++yyvsp = yylval;
18540 YY_IGNORE_MAYBE_UNINITIALIZED_END
18541
18542 yyerror_range[2] = yylloc;
18543 ++yylsp;
18544 YYLLOC_DEFAULT (*yylsp, yyerror_range, 2);
18545
18546 /* Shift the error token. */
18547 YY_SYMBOL_PRINT ("Shifting", YY_ACCESSING_SYMBOL (yyn), yyvsp, yylsp, p);
18548 /* %after-shift-error-token code. */
18549#line 2668 "parse.y"
18550 {after_shift_error_token(p);}
18551#line 18552 "parse.c"
18552
18553
18554 yystate = yyn;
18555 goto yynewstate;
18556
18557
18558/*-------------------------------------.
18559| yyacceptlab -- YYACCEPT comes here. |
18560`-------------------------------------*/
18561yyacceptlab:
18562 yyresult = 0;
18563 goto yyreturnlab;
18564
18565
18566/*-----------------------------------.
18567| yyabortlab -- YYABORT comes here. |
18568`-----------------------------------*/
18569yyabortlab:
18570 yyresult = 1;
18571 goto yyreturnlab;
18572
18573
18574/*-----------------------------------------------------------.
18575| yyexhaustedlab -- YYNOMEM (memory exhaustion) comes here. |
18576`-----------------------------------------------------------*/
18577yyexhaustedlab:
18578 yyerror (&yylloc, p, YY_("memory exhausted"));
18579 yyresult = 2;
18580 goto yyreturnlab;
18581
18582
18583/*----------------------------------------------------------.
18584| yyreturnlab -- parsing is finished, clean up and return. |
18585`----------------------------------------------------------*/
18586yyreturnlab:
18587 if (yychar != YYEMPTY)
18588 {
18589 /* Make sure we have latest lookahead translation. See comments at
18590 user semantic actions for why this is necessary. */
18591 yytoken = YYTRANSLATE (yychar);
18592 yydestruct ("Cleanup: discarding lookahead",
18593 yytoken, &yylval, &yylloc, p);
18594 }
18595 /* Do not reclaim the symbols of the rule whose action triggered
18596 this YYABORT or YYACCEPT. */
18597 YYPOPSTACK (yylen);
18598 YY_STACK_PRINT (yyss, yyssp, p);
18599 while (yyssp != yyss)
18600 {
18601 yydestruct ("Cleanup: popping",
18602 YY_ACCESSING_SYMBOL (+*yyssp), yyvsp, yylsp, p);
18603 YYPOPSTACK (1);
18604 }
18605#ifndef yyoverflow
18606 if (yyss != yyssa)
18607 YYSTACK_FREE (yyss);
18608#endif
18609 if (yymsg != yymsgbuf)
18610 YYSTACK_FREE (yymsg);
18611 return yyresult;
18612}
18613
18614#line 6729 "parse.y"
18615
18616# undef p
18617# undef yylex
18618# undef yylval
18619# define yylval (*p->lval)
18620
18621static int regx_options(struct parser_params*);
18622static int tokadd_string(struct parser_params*,int,int,int,long*,rb_encoding**,rb_encoding**);
18623static void tokaddmbc(struct parser_params *p, int c, rb_encoding *enc);
18624static enum yytokentype parse_string(struct parser_params*,rb_strterm_literal_t*);
18625static enum yytokentype here_document(struct parser_params*,rb_strterm_heredoc_t*);
18626
18627#define set_parser_s_value(x) (ifdef_ripper(p->s_value = (x), (void)0))
18628
18629# define set_yylval_node(x) { \
18630 YYLTYPE _cur_loc; \
18631 rb_parser_set_location(p, &_cur_loc); \
18632 yylval.node = (x); \
18633 set_parser_s_value(STR_NEW(p->lex.ptok, p->lex.pcur-p->lex.ptok)); \
18634}
18635# define set_yylval_str(x) \
18636do { \
18637 set_yylval_node(NEW_STR(x, &_cur_loc)); \
18638 set_parser_s_value(rb_str_new_mutable_parser_string(x)); \
18639} while(0)
18640# define set_yylval_num(x) { \
18641 yylval.num = (x); \
18642 set_parser_s_value(x); \
18643}
18644# define set_yylval_id(x) (yylval.id = (x))
18645# define set_yylval_name(x) { \
18646 (yylval.id = (x)); \
18647 set_parser_s_value(ID2SYM(x)); \
18648}
18649# define yylval_id() (yylval.id)
18650
18651#define set_yylval_noname() set_yylval_id(keyword_nil)
18652#define has_delayed_token(p) (p->delayed.token != NULL)
18653
18654#ifndef RIPPER
18655#define literal_flush(p, ptr) ((p)->lex.ptok = (ptr))
18656#define dispatch_scan_event(p, t) parser_dispatch_scan_event(p, t, __LINE__)
18657
18658static bool
18659parser_has_token(struct parser_params *p)
18660{
18661 const char *const pcur = p->lex.pcur;
18662 const char *const ptok = p->lex.ptok;
18663 if (p->keep_tokens && (pcur < ptok)) {
18664 rb_bug("lex.pcur < lex.ptok. (line: %d) %"PRIdPTRDIFF"|%"PRIdPTRDIFF"|%"PRIdPTRDIFF"",
18665 p->ruby_sourceline, ptok - p->lex.pbeg, pcur - ptok, p->lex.pend - pcur);
18666 }
18667 return pcur > ptok;
18668}
18669
18670static const char *
18671escaped_char(int c)
18672{
18673 switch (c) {
18674 case '"': return "\\\"";
18675 case '\\': return "\\\\";
18676 case '\0': return "\\0";
18677 case '\n': return "\\n";
18678 case '\r': return "\\r";
18679 case '\t': return "\\t";
18680 case '\f': return "\\f";
18681 case '\013': return "\\v";
18682 case '\010': return "\\b";
18683 case '\007': return "\\a";
18684 case '\033': return "\\e";
18685 case '\x7f': return "\\c?";
18686 }
18687 return NULL;
18688}
18689
18690static rb_parser_string_t *
18691rb_parser_str_escape(struct parser_params *p, rb_parser_string_t *str)
18692{
18693 rb_encoding *enc = p->enc;
18694 const char *ptr = str->ptr;
18695 const char *pend = ptr + str->len;
18696 const char *prev = ptr;
18697 char charbuf[5] = {'\\', 'x', 0, 0, 0};
18698 rb_parser_string_t * result = rb_parser_string_new(p, 0, 0);
18699
18700 while (ptr < pend) {
18701 unsigned int c;
18702 const char *cc;
18703 int n = rb_enc_precise_mbclen(ptr, pend, enc);
18704 if (!MBCLEN_CHARFOUND_P(n)) {
18705 if (ptr > prev) parser_str_cat(result, prev, ptr - prev);
18706 n = rb_enc_mbminlen(enc);
18707 if (pend < ptr + n)
18708 n = (int)(pend - ptr);
18709 while (n--) {
18710 c = *ptr & 0xf0 >> 4;
18711 charbuf[2] = (c < 10) ? '0' + c : 'A' + c - 10;
18712 c = *ptr & 0x0f;
18713 charbuf[3] = (c < 10) ? '0' + c : 'A' + c - 10;
18714 parser_str_cat(result, charbuf, 4);
18715 prev = ++ptr;
18716 }
18717 continue;
18718 }
18719 n = MBCLEN_CHARFOUND_LEN(n);
18720 c = rb_enc_mbc_to_codepoint(ptr, pend, enc);
18721 ptr += n;
18722 cc = escaped_char(c);
18723 if (cc) {
18724 if (ptr - n > prev) parser_str_cat(result, prev, ptr - n - prev);
18725 parser_str_cat_cstr(result, cc);
18726 prev = ptr;
18727 }
18728 else if (rb_enc_isascii(c, enc) && ISPRINT(c)) {
18729 }
18730 else {
18731 if (ptr - n > prev) {
18732 parser_str_cat(result, prev, ptr - n - prev);
18733 prev = ptr - n;
18734 }
18735 parser_str_cat(result, prev, ptr - prev);
18736 prev = ptr;
18737 }
18738 }
18739 if (ptr > prev) parser_str_cat(result, prev, ptr - prev);
18740
18741 return result;
18742}
18743
18744static void
18745parser_append_tokens(struct parser_params *p, rb_parser_string_t *str, enum yytokentype t, int line)
18746{
18748 token->id = p->token_id;
18749 token->type_name = parser_token2char(p, t);
18750 token->str = str;
18751 token->loc.beg_pos = p->yylloc->beg_pos;
18752 token->loc.end_pos = p->yylloc->end_pos;
18753 rb_parser_ary_push_ast_token(p, p->tokens, token);
18754 p->token_id++;
18755
18756 if (p->debug) {
18757 rb_parser_string_t *str_escaped = rb_parser_str_escape(p, str);
18758 rb_parser_printf(p, "Append tokens (line: %d) [%d, :%s, \"%s\", [%d, %d, %d, %d]]\n",
18759 line, token->id, token->type_name, str_escaped->ptr,
18760 token->loc.beg_pos.lineno, token->loc.beg_pos.column,
18761 token->loc.end_pos.lineno, token->loc.end_pos.column);
18762 rb_parser_string_free(p, str_escaped);
18763 }
18764}
18765
18766static void
18767parser_dispatch_scan_event(struct parser_params *p, enum yytokentype t, int line)
18768{
18769 debug_token_line(p, "parser_dispatch_scan_event", line);
18770
18771 if (!parser_has_token(p)) return;
18772
18773 RUBY_SET_YYLLOC(*p->yylloc);
18774
18775 if (p->keep_tokens) {
18776 rb_parser_string_t *str = rb_parser_encoding_string_new(p, p->lex.ptok, p->lex.pcur - p->lex.ptok, p->enc);
18777 parser_append_tokens(p, str, t, line);
18778 }
18779
18780 token_flush(p);
18781}
18782
18783#define dispatch_delayed_token(p, t) parser_dispatch_delayed_token(p, t, __LINE__)
18784static void
18785parser_dispatch_delayed_token(struct parser_params *p, enum yytokentype t, int line)
18786{
18787 debug_token_line(p, "parser_dispatch_delayed_token", line);
18788
18789 if (!has_delayed_token(p)) return;
18790
18791 RUBY_SET_YYLLOC_OF_DELAYED_TOKEN(*p->yylloc);
18792
18793 if (p->keep_tokens) {
18794 /* p->delayed.token is freed by rb_parser_tokens_free */
18795 parser_append_tokens(p, p->delayed.token, t, line);
18796 }
18797 else {
18798 rb_parser_string_free(p, p->delayed.token);
18799 }
18800
18801 p->delayed.token = NULL;
18802}
18803#else
18804#define literal_flush(p, ptr) ((void)(ptr))
18805
18806static int
18807ripper_has_scan_event(struct parser_params *p)
18808{
18809 if (p->lex.pcur < p->lex.ptok) rb_raise(rb_eRuntimeError, "lex.pcur < lex.ptok");
18810 return p->lex.pcur > p->lex.ptok;
18811}
18812
18813static VALUE
18814ripper_scan_event_val(struct parser_params *p, enum yytokentype t)
18815{
18816 VALUE str = STR_NEW(p->lex.ptok, p->lex.pcur - p->lex.ptok);
18817 VALUE rval = ripper_dispatch1(p, ripper_token2eventid(t), str);
18818 RUBY_SET_YYLLOC(*p->yylloc);
18819 token_flush(p);
18820 return rval;
18821}
18822
18823static void
18824ripper_dispatch_scan_event(struct parser_params *p, enum yytokentype t)
18825{
18826 if (!ripper_has_scan_event(p)) return;
18827
18828 set_parser_s_value(ripper_scan_event_val(p, t));
18829}
18830#define dispatch_scan_event(p, t) ripper_dispatch_scan_event(p, t)
18831
18832static void
18833ripper_dispatch_delayed_token(struct parser_params *p, enum yytokentype t)
18834{
18835 /* save and adjust the location to delayed token for callbacks */
18836 int saved_line = p->ruby_sourceline;
18837 const char *saved_tokp = p->lex.ptok;
18838 VALUE s_value, str;
18839
18840 if (!has_delayed_token(p)) return;
18841 p->ruby_sourceline = p->delayed.beg_line;
18842 p->lex.ptok = p->lex.pbeg + p->delayed.beg_col;
18843 str = rb_str_new_mutable_parser_string(p->delayed.token);
18844 rb_parser_string_free(p, p->delayed.token);
18845 s_value = ripper_dispatch1(p, ripper_token2eventid(t), str);
18846 set_parser_s_value(s_value);
18847 p->delayed.token = NULL;
18848 p->ruby_sourceline = saved_line;
18849 p->lex.ptok = saved_tokp;
18850}
18851#define dispatch_delayed_token(p, t) ripper_dispatch_delayed_token(p, t)
18852#endif /* RIPPER */
18853
18854static inline int
18855is_identchar(struct parser_params *p, const char *ptr, const char *MAYBE_UNUSED(ptr_end), rb_encoding *enc)
18856{
18857 return rb_enc_isalnum((unsigned char)*ptr, enc) || *ptr == '_' || !ISASCII(*ptr);
18858}
18859
18860static inline bool
18861peek_word_at(struct parser_params *p, const char *str, size_t len, int at)
18862{
18863 const char *ptr = p->lex.pcur + at;
18864 if (lex_eol_ptr_n_p(p, ptr, len-1)) return false;
18865 if (memcmp(ptr, str, len)) return false;
18866 if (lex_eol_ptr_n_p(p, ptr, len)) return true;
18867 switch (ptr[len]) {
18868 case '!': case '?': return false;
18869 }
18870 return !is_identchar(p, ptr+len, p->lex.pend, p->enc);
18871}
18872
18873static inline int
18874parser_is_identchar(struct parser_params *p)
18875{
18876 return !(p)->eofp && is_identchar(p, p->lex.pcur-1, p->lex.pend, p->enc);
18877}
18878
18879static inline int
18880parser_isascii(struct parser_params *p)
18881{
18882 return ISASCII(*(p->lex.pcur-1));
18883}
18884
18885static void
18886token_info_setup(token_info *ptinfo, const char *ptr, const rb_code_location_t *loc)
18887{
18888 int column = 1, nonspc = 0, i;
18889 for (i = 0; i < loc->beg_pos.column; i++, ptr++) {
18890 if (*ptr == '\t') {
18891 column = (((column - 1) / TAB_WIDTH) + 1) * TAB_WIDTH;
18892 }
18893 column++;
18894 if (*ptr != ' ' && *ptr != '\t') {
18895 nonspc = 1;
18896 }
18897 }
18898
18899 ptinfo->beg = loc->beg_pos;
18900 ptinfo->indent = column;
18901 ptinfo->nonspc = nonspc;
18902}
18903
18904static void
18905token_info_push(struct parser_params *p, const char *token, const rb_code_location_t *loc)
18906{
18907 token_info *ptinfo;
18908
18909 if (!p->token_info_enabled) return;
18910 ptinfo = ALLOC(token_info);
18911 ptinfo->token = token;
18912 ptinfo->next = p->token_info;
18913 token_info_setup(ptinfo, p->lex.pbeg, loc);
18914
18915 p->token_info = ptinfo;
18916}
18917
18918static void
18919token_info_pop(struct parser_params *p, const char *token, const rb_code_location_t *loc)
18920{
18921 token_info *ptinfo_beg = p->token_info;
18922
18923 if (!ptinfo_beg) return;
18924
18925 /* indentation check of matched keywords (begin..end, if..end, etc.) */
18926 token_info_warn(p, token, ptinfo_beg, 1, loc);
18927
18928 p->token_info = ptinfo_beg->next;
18929 ruby_xfree_sized(ptinfo_beg, sizeof(*ptinfo_beg));
18930}
18931
18932static void
18933token_info_drop(struct parser_params *p, const char *token, rb_code_position_t beg_pos)
18934{
18935 token_info *ptinfo_beg = p->token_info;
18936
18937 if (!ptinfo_beg) return;
18938 p->token_info = ptinfo_beg->next;
18939
18940 if (ptinfo_beg->beg.lineno != beg_pos.lineno ||
18941 ptinfo_beg->beg.column != beg_pos.column ||
18942 strcmp(ptinfo_beg->token, token)) {
18943 compile_error(p, "token position mismatch: %d:%d:%s expected but %d:%d:%s",
18944 beg_pos.lineno, beg_pos.column, token,
18945 ptinfo_beg->beg.lineno, ptinfo_beg->beg.column,
18946 ptinfo_beg->token);
18947 }
18948
18949 ruby_xfree_sized(ptinfo_beg, sizeof(*ptinfo_beg));
18950}
18951
18952static void
18953token_info_warn(struct parser_params *p, const char *token, token_info *ptinfo_beg, int same, const rb_code_location_t *loc)
18954{
18955 token_info ptinfo_end_body, *ptinfo_end = &ptinfo_end_body;
18956 if (!p->token_info_enabled) return;
18957 if (!ptinfo_beg) return;
18958 token_info_setup(ptinfo_end, p->lex.pbeg, loc);
18959 if (ptinfo_beg->beg.lineno == ptinfo_end->beg.lineno) return; /* ignore one-line block */
18960 if (ptinfo_beg->nonspc || ptinfo_end->nonspc) return; /* ignore keyword in the middle of a line */
18961 if (ptinfo_beg->indent == ptinfo_end->indent) return; /* the indents are matched */
18962 if (!same && ptinfo_beg->indent < ptinfo_end->indent) return;
18963 rb_warn3L(ptinfo_end->beg.lineno,
18964 "mismatched indentations at '%s' with '%s' at %d",
18965 WARN_S(token), WARN_S(ptinfo_beg->token), WARN_I(ptinfo_beg->beg.lineno));
18966}
18967
18968static int
18969parser_precise_mbclen(struct parser_params *p, const char *ptr)
18970{
18971 int len = rb_enc_precise_mbclen(ptr, p->lex.pend, p->enc);
18972 if (!MBCLEN_CHARFOUND_P(len)) {
18973 compile_error(p, "invalid multibyte char (%s)", rb_enc_name(p->enc));
18974 return -1;
18975 }
18976 return len;
18977}
18978
18979#ifndef RIPPER
18980static inline void
18981parser_show_error_line(struct parser_params *p, const YYLTYPE *yylloc)
18982{
18983 rb_parser_string_t *str;
18984 int lineno = p->ruby_sourceline;
18985 if (!yylloc) {
18986 return;
18987 }
18988 else if (yylloc->beg_pos.lineno == lineno) {
18989 str = p->lex.lastline;
18990 }
18991 else {
18992 return;
18993 }
18994 ruby_show_error_line(p, p->error_buffer, yylloc, lineno, str);
18995}
18996
18997static int
18998parser_yyerror(struct parser_params *p, const rb_code_location_t *yylloc, const char *msg)
18999{
19000#if 0
19001 YYLTYPE current;
19002
19003 if (!yylloc) {
19004 yylloc = RUBY_SET_YYLLOC(current);
19005 }
19006 else if ((p->ruby_sourceline != yylloc->beg_pos.lineno &&
19007 p->ruby_sourceline != yylloc->end_pos.lineno)) {
19008 yylloc = 0;
19009 }
19010#endif
19011 parser_compile_error(p, yylloc, "%s", msg);
19012 parser_show_error_line(p, yylloc);
19013 return 0;
19014}
19015
19016static int
19017parser_yyerror0(struct parser_params *p, const char *msg)
19018{
19019 YYLTYPE current;
19020 return parser_yyerror(p, RUBY_SET_YYLLOC(current), msg);
19021}
19022
19023void
19024ruby_show_error_line(struct parser_params *p, VALUE errbuf, const YYLTYPE *yylloc, int lineno, rb_parser_string_t *str)
19025{
19026 VALUE mesg;
19027 const int max_line_margin = 30;
19028 const char *ptr, *ptr_end, *pt, *pb;
19029 const char *pre = "", *post = "", *pend;
19030 const char *code = "", *caret = "";
19031 const char *lim;
19032 const char *const pbeg = PARSER_STRING_PTR(str);
19033 char *buf;
19034 long len;
19035 int i;
19036
19037 if (!yylloc) return;
19038 pend = rb_parser_string_end(str);
19039 if (pend > pbeg && pend[-1] == '\n') {
19040 if (--pend > pbeg && pend[-1] == '\r') --pend;
19041 }
19042
19043 pt = pend;
19044 if (lineno == yylloc->end_pos.lineno &&
19045 (pend - pbeg) > yylloc->end_pos.column) {
19046 pt = pbeg + yylloc->end_pos.column;
19047 }
19048
19049 ptr = ptr_end = pt;
19050 lim = ptr - pbeg > max_line_margin ? ptr - max_line_margin : pbeg;
19051 while ((lim < ptr) && (*(ptr-1) != '\n')) ptr--;
19052
19053 lim = pend - ptr_end > max_line_margin ? ptr_end + max_line_margin : pend;
19054 while ((ptr_end < lim) && (*ptr_end != '\n') && (*ptr_end != '\r')) ptr_end++;
19055
19056 len = ptr_end - ptr;
19057 if (len > 4) {
19058 if (ptr > pbeg) {
19059 ptr = rb_enc_prev_char(pbeg, ptr, pt, rb_parser_str_get_encoding(str));
19060 if (ptr > pbeg) pre = "...";
19061 }
19062 if (ptr_end < pend) {
19063 ptr_end = rb_enc_prev_char(pt, ptr_end, pend, rb_parser_str_get_encoding(str));
19064 if (ptr_end < pend) post = "...";
19065 }
19066 }
19067 pb = pbeg;
19068 if (lineno == yylloc->beg_pos.lineno) {
19069 pb += yylloc->beg_pos.column;
19070 if (pb > pt) pb = pt;
19071 }
19072 if (pb < ptr) pb = ptr;
19073 if (len <= 4 && yylloc->beg_pos.lineno == yylloc->end_pos.lineno) {
19074 return;
19075 }
19076 if (RTEST(errbuf)) {
19077 mesg = rb_attr_get(errbuf, idMesg);
19078 if (char_at_end(p, mesg, '\n') != '\n')
19079 rb_str_cat_cstr(mesg, "\n");
19080 }
19081 else {
19082 mesg = rb_enc_str_new(0, 0, rb_parser_str_get_encoding(str));
19083 }
19084 if (!errbuf && rb_stderr_tty_p()) {
19085#define CSI_BEGIN "\033["
19086#define CSI_SGR "m"
19087 rb_str_catf(mesg,
19088 CSI_BEGIN""CSI_SGR"%s" /* pre */
19089 CSI_BEGIN"1"CSI_SGR"%.*s"
19090 CSI_BEGIN"1;4"CSI_SGR"%.*s"
19091 CSI_BEGIN";1"CSI_SGR"%.*s"
19092 CSI_BEGIN""CSI_SGR"%s" /* post */
19093 "\n",
19094 pre,
19095 (int)(pb - ptr), ptr,
19096 (int)(pt - pb), pb,
19097 (int)(ptr_end - pt), pt,
19098 post);
19099 }
19100 else {
19101 char *p2;
19102
19103 len = ptr_end - ptr;
19104 lim = pt < pend ? pt : pend;
19105 i = (int)(lim - ptr);
19106 buf = ALLOCA_N(char, i+2);
19107 code = ptr;
19108 caret = p2 = buf;
19109 if (ptr <= pb) {
19110 while (ptr < pb) {
19111 *p2++ = *ptr++ == '\t' ? '\t' : ' ';
19112 }
19113 *p2++ = '^';
19114 ptr++;
19115 }
19116 if (lim > ptr) {
19117 memset(p2, '~', (lim - ptr));
19118 p2 += (lim - ptr);
19119 }
19120 *p2 = '\0';
19121 rb_str_catf(mesg, "%s%.*s%s\n""%s%s\n",
19122 pre, (int)len, code, post,
19123 pre, caret);
19124 }
19125 if (!errbuf) rb_write_error_str(mesg);
19126}
19127#else
19128
19129static int
19130parser_yyerror(struct parser_params *p, const YYLTYPE *yylloc, const char *msg)
19131{
19132 const char *pcur = 0, *ptok = 0;
19133 if (p->ruby_sourceline == yylloc->beg_pos.lineno &&
19134 p->ruby_sourceline == yylloc->end_pos.lineno) {
19135 pcur = p->lex.pcur;
19136 ptok = p->lex.ptok;
19137 p->lex.ptok = p->lex.pbeg + yylloc->beg_pos.column;
19138 p->lex.pcur = p->lex.pbeg + yylloc->end_pos.column;
19139 }
19140 parser_yyerror0(p, msg);
19141 if (pcur) {
19142 p->lex.ptok = ptok;
19143 p->lex.pcur = pcur;
19144 }
19145 return 0;
19146}
19147
19148static int
19149parser_yyerror0(struct parser_params *p, const char *msg)
19150{
19151 dispatch1(parse_error, STR_NEW2(msg));
19152 ripper_error(p);
19153 return 0;
19154}
19155
19156static inline void
19157parser_show_error_line(struct parser_params *p, const YYLTYPE *yylloc)
19158{
19159}
19160#endif /* !RIPPER */
19161
19162static int
19163vtable_size(const struct vtable *tbl)
19164{
19165 if (!DVARS_TERMINAL_P(tbl)) {
19166 return tbl->pos;
19167 }
19168 else {
19169 return 0;
19170 }
19171}
19172
19173static struct vtable *
19174vtable_alloc_gen(struct parser_params *p, int line, struct vtable *prev)
19175{
19176 struct vtable *tbl = ALLOC(struct vtable);
19177 tbl->pos = 0;
19178 tbl->capa = 8;
19179 tbl->tbl = ALLOC_N(ID, tbl->capa);
19180 tbl->prev = prev;
19181#ifndef RIPPER
19182 if (p->debug) {
19183 rb_parser_printf(p, "vtable_alloc:%d: %p\n", line, (void *)tbl);
19184 }
19185#endif
19186 return tbl;
19187}
19188#define vtable_alloc(prev) vtable_alloc_gen(p, __LINE__, prev)
19189
19190static void
19191vtable_free_gen(struct parser_params *p, int line, const char *name,
19192 struct vtable *tbl)
19193{
19194#ifndef RIPPER
19195 if (p->debug) {
19196 rb_parser_printf(p, "vtable_free:%d: %s(%p)\n", line, name, (void *)tbl);
19197 }
19198#endif
19199 if (!DVARS_TERMINAL_P(tbl)) {
19200 if (tbl->tbl) {
19201 ruby_xfree_sized(tbl->tbl, tbl->capa * sizeof(ID));
19202 }
19203 ruby_xfree_sized(tbl, sizeof(*tbl));
19204 }
19205}
19206#define vtable_free(tbl) vtable_free_gen(p, __LINE__, #tbl, tbl)
19207
19208static void
19209vtable_add_gen(struct parser_params *p, int line, const char *name,
19210 struct vtable *tbl, ID id)
19211{
19212#ifndef RIPPER
19213 if (p->debug) {
19214 rb_parser_printf(p, "vtable_add:%d: %s(%p), %s\n",
19215 line, name, (void *)tbl, rb_id2name(id));
19216 }
19217#endif
19218 if (DVARS_TERMINAL_P(tbl)) {
19219 rb_parser_fatal(p, "vtable_add: vtable is not allocated (%p)", (void *)tbl);
19220 return;
19221 }
19222 if (tbl->pos == tbl->capa) {
19223 tbl->capa = tbl->capa * 2;
19224 SIZED_REALLOC_N(tbl->tbl, ID, tbl->capa, tbl->pos);
19225 }
19226 tbl->tbl[tbl->pos++] = id;
19227}
19228#define vtable_add(tbl, id) vtable_add_gen(p, __LINE__, #tbl, tbl, id)
19229
19230static void
19231vtable_pop_gen(struct parser_params *p, int line, const char *name,
19232 struct vtable *tbl, int n)
19233{
19234 if (p->debug) {
19235 rb_parser_printf(p, "vtable_pop:%d: %s(%p), %d\n",
19236 line, name, (void *)tbl, n);
19237 }
19238 if (tbl->pos < n) {
19239 rb_parser_fatal(p, "vtable_pop: unreachable (%d < %d)", tbl->pos, n);
19240 return;
19241 }
19242 tbl->pos -= n;
19243}
19244#define vtable_pop(tbl, n) vtable_pop_gen(p, __LINE__, #tbl, tbl, n)
19245
19246static int
19247vtable_included(const struct vtable * tbl, ID id)
19248{
19249 int i;
19250
19251 if (!DVARS_TERMINAL_P(tbl)) {
19252 for (i = 0; i < tbl->pos; i++) {
19253 if (tbl->tbl[i] == id) {
19254 return i+1;
19255 }
19256 }
19257 }
19258 return 0;
19259}
19260
19261static void parser_prepare(struct parser_params *p);
19262
19263static int
19264e_option_supplied(struct parser_params *p)
19265{
19266 return strcmp(p->ruby_sourcefile, "-e") == 0;
19267}
19268
19269#ifndef RIPPER
19270static NODE *parser_append_options(struct parser_params *p, NODE *node);
19271
19272static VALUE
19273yycompile0(VALUE arg)
19274{
19275 int n;
19276 NODE *tree;
19277 struct parser_params *p = (struct parser_params *)arg;
19278 int cov = FALSE;
19279
19280 if (!compile_for_eval && !NIL_P(p->ruby_sourcefile_string) && !e_option_supplied(p)) {
19281 cov = TRUE;
19282 }
19283
19284 if (p->debug_lines) {
19285 p->ast->body.script_lines = p->debug_lines;
19286 }
19287
19288 parser_prepare(p);
19289#define RUBY_DTRACE_PARSE_HOOK(name) \
19290 if (RUBY_DTRACE_PARSE_##name##_ENABLED()) { \
19291 RUBY_DTRACE_PARSE_##name(p->ruby_sourcefile, p->ruby_sourceline); \
19292 }
19293 RUBY_DTRACE_PARSE_HOOK(BEGIN);
19294 n = yyparse(p);
19295 RUBY_DTRACE_PARSE_HOOK(END);
19296
19297 p->debug_lines = 0;
19298
19299 xfree(p->lex.strterm);
19300 p->lex.strterm = 0;
19301 p->lex.pcur = p->lex.pbeg = p->lex.pend = 0;
19302 if (n || p->error_p) {
19303 VALUE mesg = p->error_buffer;
19304 if (!mesg) {
19305 mesg = syntax_error_new();
19306 }
19307 if (!p->error_tolerant) {
19308 rb_set_errinfo(mesg);
19309 return FALSE;
19310 }
19311 }
19312 tree = p->eval_tree;
19313 if (!tree) {
19314 tree = NEW_NIL(&NULL_LOC);
19315 }
19316 else {
19317 rb_parser_ary_t *tokens = p->tokens;
19318 NODE *prelude;
19319 NODE *body = parser_append_options(p, RNODE_SCOPE(tree)->nd_body);
19320 prelude = block_append(p, p->eval_tree_begin, body);
19321 RNODE_SCOPE(tree)->nd_body = prelude;
19322 p->ast->body.frozen_string_literal = p->frozen_string_literal;
19323 p->ast->body.coverage_enabled = cov;
19324 if (p->keep_tokens) {
19325 p->ast->node_buffer->tokens = tokens;
19326 p->tokens = NULL;
19327 }
19328 }
19329 p->ast->body.root = tree;
19330 p->ast->body.line_count = p->line_count;
19331 return TRUE;
19332}
19333
19334static rb_ast_t *
19335yycompile(struct parser_params *p, VALUE fname, int line)
19336{
19337 rb_ast_t *ast;
19338 if (NIL_P(fname)) {
19339 p->ruby_sourcefile_string = Qnil;
19340 p->ruby_sourcefile = "(none)";
19341 }
19342 else {
19343 p->ruby_sourcefile_string = rb_str_to_interned_str(fname);
19344 p->ruby_sourcefile = StringValueCStr(fname);
19345 }
19346 p->ruby_sourceline = line - 1;
19347
19348 p->lvtbl = NULL;
19349
19350 p->ast = ast = rb_ast_new();
19351 compile_callback(yycompile0, (VALUE)p);
19352 p->ast = 0;
19353
19354 while (p->lvtbl) {
19355 local_pop(p);
19356 }
19357
19358 return ast;
19359}
19360#endif /* !RIPPER */
19361
19362static rb_encoding *
19363must_be_ascii_compatible(struct parser_params *p, rb_parser_string_t *s)
19364{
19365 rb_encoding *enc = rb_parser_str_get_encoding(s);
19366 if (!rb_enc_asciicompat(enc)) {
19367 rb_raise(rb_eArgError, "invalid source encoding");
19368 }
19369 return enc;
19370}
19371
19372static rb_parser_string_t *
19373lex_getline(struct parser_params *p)
19374{
19375 rb_parser_string_t *line = (*p->lex.gets)(p, p->lex.input, p->line_count);
19376 if (!line) return 0;
19377 p->line_count++;
19378 string_buffer_append(p, line);
19379 must_be_ascii_compatible(p, line);
19380 return line;
19381}
19382
19383#ifndef RIPPER
19384rb_ast_t*
19385rb_parser_compile(rb_parser_t *p, rb_parser_lex_gets_func *gets, VALUE fname, rb_parser_input_data input, int line)
19386{
19387 p->lex.gets = gets;
19388 p->lex.input = input;
19389 p->lex.pbeg = p->lex.pcur = p->lex.pend = 0;
19390
19391 return yycompile(p, fname, line);
19392}
19393#endif /* !RIPPER */
19394
19395#define STR_FUNC_ESCAPE 0x01
19396#define STR_FUNC_EXPAND 0x02
19397#define STR_FUNC_REGEXP 0x04
19398#define STR_FUNC_QWORDS 0x08
19399#define STR_FUNC_SYMBOL 0x10
19400#define STR_FUNC_INDENT 0x20
19401#define STR_FUNC_LABEL 0x40
19402#define STR_FUNC_LIST 0x4000
19403#define STR_FUNC_TERM 0x8000
19404
19405enum string_type {
19406 str_label = STR_FUNC_LABEL,
19407 str_squote = (0),
19408 str_dquote = (STR_FUNC_EXPAND),
19409 str_xquote = (STR_FUNC_EXPAND),
19410 str_regexp = (STR_FUNC_REGEXP|STR_FUNC_ESCAPE|STR_FUNC_EXPAND),
19411 str_sword = (STR_FUNC_QWORDS|STR_FUNC_LIST),
19412 str_dword = (STR_FUNC_QWORDS|STR_FUNC_EXPAND|STR_FUNC_LIST),
19413 str_ssym = (STR_FUNC_SYMBOL),
19414 str_dsym = (STR_FUNC_SYMBOL|STR_FUNC_EXPAND)
19415};
19416
19417static rb_parser_string_t *
19418parser_str_new(struct parser_params *p, const char *ptr, long len, rb_encoding *enc, int func, rb_encoding *enc0)
19419{
19420 rb_parser_string_t *pstr;
19421
19422 pstr = rb_parser_encoding_string_new(p, ptr, len, enc);
19423
19424 if (!(func & STR_FUNC_REGEXP)) {
19425 if (rb_parser_is_ascii_string(p, pstr)) {
19426 }
19427 else if (rb_is_usascii_enc((void *)enc0) && enc != rb_utf8_encoding()) {
19428 /* everything is valid in ASCII-8BIT */
19429 enc = rb_ascii8bit_encoding();
19430 PARSER_ENCODING_CODERANGE_SET(pstr, enc, RB_PARSER_ENC_CODERANGE_VALID);
19431 }
19432 }
19433
19434 return pstr;
19435}
19436
19437static int
19438strterm_is_heredoc(rb_strterm_t *strterm)
19439{
19440 return strterm->heredoc;
19441}
19442
19443static rb_strterm_t *
19444new_strterm(struct parser_params *p, int func, int term, int paren)
19445{
19446 rb_strterm_t *strterm = ZALLOC(rb_strterm_t);
19447 strterm->u.literal.func = func;
19448 strterm->u.literal.term = term;
19449 strterm->u.literal.paren = paren;
19450 return strterm;
19451}
19452
19453static rb_strterm_t *
19454new_heredoc(struct parser_params *p)
19455{
19456 rb_strterm_t *strterm = ZALLOC(rb_strterm_t);
19457 strterm->heredoc = true;
19458 return strterm;
19459}
19460
19461#define peek(p,c) peek_n(p, (c), 0)
19462#define peek_n(p,c,n) (!lex_eol_n_p(p, n) && (c) == (unsigned char)(p)->lex.pcur[n])
19463#define peekc(p) peekc_n(p, 0)
19464#define peekc_n(p,n) (lex_eol_n_p(p, n) ? -1 : (unsigned char)(p)->lex.pcur[n])
19465
19466#define add_delayed_token(p, tok, end) parser_add_delayed_token(p, tok, end, __LINE__)
19467static void
19468parser_add_delayed_token(struct parser_params *p, const char *tok, const char *end, int line)
19469{
19470 debug_token_line(p, "add_delayed_token", line);
19471
19472 if (tok < end) {
19473 if (has_delayed_token(p)) {
19474 bool next_line = parser_string_char_at_end(p, p->delayed.token, 0) == '\n';
19475 int end_line = (next_line ? 1 : 0) + p->delayed.end_line;
19476 int end_col = (next_line ? 0 : p->delayed.end_col);
19477 if (end_line != p->ruby_sourceline || end_col != tok - p->lex.pbeg) {
19478 dispatch_delayed_token(p, tSTRING_CONTENT);
19479 }
19480 }
19481 if (!has_delayed_token(p)) {
19482 p->delayed.token = rb_parser_string_new(p, 0, 0);
19483 rb_parser_enc_associate(p, p->delayed.token, p->enc);
19484 p->delayed.beg_line = p->ruby_sourceline;
19485 p->delayed.beg_col = rb_long2int(tok - p->lex.pbeg);
19486 }
19487 parser_str_cat(p->delayed.token, tok, end - tok);
19488 p->delayed.end_line = p->ruby_sourceline;
19489 p->delayed.end_col = rb_long2int(end - p->lex.pbeg);
19490 p->lex.ptok = end;
19491 }
19492}
19493
19494static void
19495set_lastline(struct parser_params *p, rb_parser_string_t *str)
19496{
19497 p->lex.pbeg = p->lex.pcur = PARSER_STRING_PTR(str);
19498 p->lex.pend = p->lex.pcur + PARSER_STRING_LEN(str);
19499 p->lex.lastline = str;
19500}
19501
19502static int
19503nextline(struct parser_params *p, int set_encoding)
19504{
19505 rb_parser_string_t *str = p->lex.nextline;
19506 p->lex.nextline = 0;
19507 if (!str) {
19508 if (p->eofp)
19509 return -1;
19510
19511 if (!lex_eol_ptr_p(p, p->lex.pbeg) && *(p->lex.pend-1) != '\n') {
19512 goto end_of_input;
19513 }
19514
19515 if (!p->lex.input || !(str = lex_getline(p))) {
19516 end_of_input:
19517 p->eofp = 1;
19518 lex_goto_eol(p);
19519 return -1;
19520 }
19521#ifndef RIPPER
19522 if (p->debug_lines) {
19523 if (set_encoding) rb_parser_enc_associate(p, str, p->enc);
19524 rb_parser_string_t *copy = rb_parser_string_deep_copy(p, str);
19525 rb_parser_ary_push_script_line(p, p->debug_lines, copy);
19526 }
19527#endif
19528 p->cr_seen = FALSE;
19529 }
19530 else if (str == AFTER_HEREDOC_WITHOUT_TERMINATOR) {
19531 /* after here-document without terminator */
19532 goto end_of_input;
19533 }
19534 add_delayed_token(p, p->lex.ptok, p->lex.pend);
19535 if (p->heredoc_end > 0) {
19536 p->ruby_sourceline = p->heredoc_end;
19537 p->heredoc_end = 0;
19538 }
19539 p->ruby_sourceline++;
19540 set_lastline(p, str);
19541 token_flush(p);
19542 return 0;
19543}
19544
19545static int
19546parser_cr(struct parser_params *p, int c)
19547{
19548 if (peek(p, '\n')) {
19549 p->lex.pcur++;
19550 c = '\n';
19551 }
19552 return c;
19553}
19554
19555static inline int
19556nextc0(struct parser_params *p, int set_encoding)
19557{
19558 int c;
19559
19560 if (UNLIKELY(lex_eol_p(p) || p->eofp || p->lex.nextline > AFTER_HEREDOC_WITHOUT_TERMINATOR)) {
19561 if (nextline(p, set_encoding)) return -1;
19562 }
19563 c = (unsigned char)*p->lex.pcur++;
19564 if (UNLIKELY(c == '\r')) {
19565 c = parser_cr(p, c);
19566 }
19567
19568 return c;
19569}
19570#define nextc(p) nextc0(p, TRUE)
19571
19572static void
19573pushback(struct parser_params *p, int c)
19574{
19575 if (c == -1) return;
19576 p->eofp = 0;
19577 p->lex.pcur--;
19578 if (p->lex.pcur > p->lex.pbeg && p->lex.pcur[0] == '\n' && p->lex.pcur[-1] == '\r') {
19579 p->lex.pcur--;
19580 }
19581}
19582
19583#define was_bol(p) ((p)->lex.pcur == (p)->lex.pbeg + 1)
19584
19585#define tokfix(p) ((p)->tokenbuf[(p)->tokidx]='\0')
19586#define tok(p) (p)->tokenbuf
19587#define toklen(p) (p)->tokidx
19588
19589static int
19590looking_at_eol_p(struct parser_params *p)
19591{
19592 const char *ptr = p->lex.pcur;
19593 while (!lex_eol_ptr_p(p, ptr)) {
19594 int c = (unsigned char)*ptr++;
19595 int eol = (c == '\n' || c == '#');
19596 if (eol || !ISSPACE(c)) {
19597 return eol;
19598 }
19599 }
19600 return TRUE;
19601}
19602
19603static char*
19604newtok(struct parser_params *p)
19605{
19606 p->tokidx = 0;
19607 if (!p->tokenbuf) {
19608 p->toksiz = 60;
19609 p->tokenbuf = ALLOC_N(char, 60);
19610 }
19611 if (p->toksiz > 4096) {
19612 p->toksiz = 60;
19613 REALLOC_N(p->tokenbuf, char, 60);
19614 }
19615 return p->tokenbuf;
19616}
19617
19618static char *
19619tokspace(struct parser_params *p, int n)
19620{
19621 p->tokidx += n;
19622
19623 if (p->tokidx >= p->toksiz) {
19624 do {p->toksiz *= 2;} while (p->toksiz < p->tokidx);
19625 REALLOC_N(p->tokenbuf, char, p->toksiz);
19626 }
19627 return &p->tokenbuf[p->tokidx-n];
19628}
19629
19630static void
19631tokadd(struct parser_params *p, int c)
19632{
19633 p->tokenbuf[p->tokidx++] = (char)c;
19634 if (p->tokidx >= p->toksiz) {
19635 p->toksiz *= 2;
19636 REALLOC_N(p->tokenbuf, char, p->toksiz);
19637 }
19638}
19639
19640static int
19641tok_hex(struct parser_params *p, size_t *numlen)
19642{
19643 int c;
19644
19645 c = (int)ruby_scan_hex(p->lex.pcur, 2, numlen);
19646 if (!*numlen) {
19647 flush_string_content(p, p->enc, rb_strlen_lit("\\x"));
19648 yyerror0("invalid hex escape");
19649 dispatch_scan_event(p, tSTRING_CONTENT);
19650 return 0;
19651 }
19652 p->lex.pcur += *numlen;
19653 return c;
19654}
19655
19656#define tokcopy(p, n) memcpy(tokspace(p, n), (p)->lex.pcur - (n), (n))
19657
19658static int
19659escaped_control_code(int c)
19660{
19661 int c2 = 0;
19662 switch (c) {
19663 case ' ':
19664 c2 = 's';
19665 break;
19666 case '\n':
19667 c2 = 'n';
19668 break;
19669 case '\t':
19670 c2 = 't';
19671 break;
19672 case '\v':
19673 c2 = 'v';
19674 break;
19675 case '\r':
19676 c2 = 'r';
19677 break;
19678 case '\f':
19679 c2 = 'f';
19680 break;
19681 }
19682 return c2;
19683}
19684
19685#define WARN_SPACE_CHAR(c, prefix) \
19686 rb_warn1("invalid character syntax; use "prefix"\\%c", WARN_I(c))
19687
19688static int
19689tokadd_codepoint(struct parser_params *p, rb_encoding **encp,
19690 int regexp_literal, const char *begin)
19691{
19692 const int wide = !begin;
19693 size_t numlen;
19694 int codepoint = (int)ruby_scan_hex(p->lex.pcur, wide ? p->lex.pend - p->lex.pcur : 4, &numlen);
19695
19696 p->lex.pcur += numlen;
19697 if (p->lex.strterm == NULL ||
19698 strterm_is_heredoc(p->lex.strterm) ||
19699 (p->lex.strterm->u.literal.func != str_regexp)) {
19700 if (!begin) begin = p->lex.pcur;
19701 if (wide ? (numlen == 0 || numlen > 6) : (numlen < 4)) {
19702 flush_string_content(p, rb_utf8_encoding(), p->lex.pcur - begin);
19703 yyerror0("invalid Unicode escape");
19704 dispatch_scan_event(p, tSTRING_CONTENT);
19705 return wide && numlen > 0;
19706 }
19707 if (codepoint > 0x10ffff) {
19708 flush_string_content(p, rb_utf8_encoding(), p->lex.pcur - begin);
19709 yyerror0("invalid Unicode codepoint (too large)");
19710 dispatch_scan_event(p, tSTRING_CONTENT);
19711 return wide;
19712 }
19713 if ((codepoint & 0xfffff800) == 0xd800) {
19714 flush_string_content(p, rb_utf8_encoding(), p->lex.pcur - begin);
19715 yyerror0("invalid Unicode codepoint");
19716 dispatch_scan_event(p, tSTRING_CONTENT);
19717 return wide;
19718 }
19719 }
19720 if (regexp_literal) {
19721 tokcopy(p, (int)numlen);
19722 }
19723 else if (codepoint >= 0x80) {
19724 rb_encoding *utf8 = rb_utf8_encoding();
19725 if (*encp && utf8 != *encp) {
19726 YYLTYPE loc = RUBY_INIT_YYLLOC();
19727 compile_error(p, "UTF-8 mixed within %s source", rb_enc_name(*encp));
19728 parser_show_error_line(p, &loc);
19729 return wide;
19730 }
19731 *encp = utf8;
19732 tokaddmbc(p, codepoint, *encp);
19733 }
19734 else {
19735 tokadd(p, codepoint);
19736 }
19737 return TRUE;
19738}
19739
19740static int tokadd_mbchar(struct parser_params *p, int c);
19741
19742static int
19743tokskip_mbchar(struct parser_params *p)
19744{
19745 int len = parser_precise_mbclen(p, p->lex.pcur-1);
19746 if (len > 0) {
19747 p->lex.pcur += len - 1;
19748 }
19749 return len;
19750}
19751
19752/* return value is for ?\u3042 */
19753static void
19754tokadd_utf8(struct parser_params *p, rb_encoding **encp,
19755 int term, int symbol_literal, int regexp_literal)
19756{
19757 /*
19758 * If `term` is not -1, then we allow multiple codepoints in \u{}
19759 * upto `term` byte, otherwise we're parsing a character literal.
19760 * And then add the codepoints to the current token.
19761 */
19762 static const char multiple_codepoints[] = "Multiple codepoints at single character literal";
19763
19764 const int open_brace = '{', close_brace = '}';
19765
19766 if (regexp_literal) { tokadd(p, '\\'); tokadd(p, 'u'); }
19767
19768 if (peek(p, open_brace)) { /* handle \u{...} form */
19769 if (regexp_literal && p->lex.strterm->u.literal.func == str_regexp) {
19770 /*
19771 * Skip parsing validation code and copy bytes as-is until term or
19772 * closing brace, in order to correctly handle extended regexps where
19773 * invalid unicode escapes are allowed in comments. The regexp parser
19774 * does its own validation and will catch any issues.
19775 */
19776 tokadd(p, open_brace);
19777 while (!lex_eol_ptr_p(p, ++p->lex.pcur)) {
19778 int c = peekc(p);
19779 if (c == close_brace) {
19780 tokadd(p, c);
19781 ++p->lex.pcur;
19782 break;
19783 }
19784 else if (c == term) {
19785 break;
19786 }
19787 if (c == '\\' && !lex_eol_n_p(p, 1)) {
19788 tokadd(p, c);
19789 c = *++p->lex.pcur;
19790 }
19791 tokadd_mbchar(p, c);
19792 }
19793 }
19794 else {
19795 const char *second = NULL;
19796 int c, last = nextc(p);
19797 if (lex_eol_p(p)) goto unterminated;
19798 while (ISSPACE(c = peekc(p)) && !lex_eol_ptr_p(p, ++p->lex.pcur));
19799 while (c != close_brace) {
19800 if (c == term) goto unterminated;
19801 if (second == multiple_codepoints)
19802 second = p->lex.pcur;
19803 if (regexp_literal) tokadd(p, last);
19804 if (!tokadd_codepoint(p, encp, regexp_literal, NULL)) {
19805 break;
19806 }
19807 while (ISSPACE(c = peekc(p))) {
19808 if (lex_eol_ptr_p(p, ++p->lex.pcur)) goto unterminated;
19809 last = c;
19810 }
19811 if (term == -1 && !second)
19812 second = multiple_codepoints;
19813 }
19814
19815 if (c != close_brace) {
19816 unterminated:
19817 flush_string_content(p, rb_utf8_encoding(), 0);
19818 yyerror0("unterminated Unicode escape");
19819 dispatch_scan_event(p, tSTRING_CONTENT);
19820 return;
19821 }
19822 if (second && second != multiple_codepoints) {
19823 const char *pcur = p->lex.pcur;
19824 p->lex.pcur = second;
19825 dispatch_scan_event(p, tSTRING_CONTENT);
19826 token_flush(p);
19827 p->lex.pcur = pcur;
19828 yyerror0(multiple_codepoints);
19829 token_flush(p);
19830 }
19831
19832 if (regexp_literal) tokadd(p, close_brace);
19833 nextc(p);
19834 }
19835 }
19836 else { /* handle \uxxxx form */
19837 if (!tokadd_codepoint(p, encp, regexp_literal, p->lex.pcur - rb_strlen_lit("\\u"))) {
19838 token_flush(p);
19839 return;
19840 }
19841 }
19842}
19843
19844#define ESCAPE_CONTROL 1
19845#define ESCAPE_META 2
19846
19847static int
19848read_escape(struct parser_params *p, int flags, const char *begin)
19849{
19850 int c;
19851 size_t numlen;
19852
19853 switch (c = nextc(p)) {
19854 case '\\': /* Backslash */
19855 return c;
19856
19857 case 'n': /* newline */
19858 return '\n';
19859
19860 case 't': /* horizontal tab */
19861 return '\t';
19862
19863 case 'r': /* carriage-return */
19864 return '\r';
19865
19866 case 'f': /* form-feed */
19867 return '\f';
19868
19869 case 'v': /* vertical tab */
19870 return '\13';
19871
19872 case 'a': /* alarm(bell) */
19873 return '\007';
19874
19875 case 'e': /* escape */
19876 return 033;
19877
19878 case '0': case '1': case '2': case '3': /* octal constant */
19879 case '4': case '5': case '6': case '7':
19880 pushback(p, c);
19881 c = (int)ruby_scan_oct(p->lex.pcur, 3, &numlen);
19882 p->lex.pcur += numlen;
19883 return c;
19884
19885 case 'x': /* hex constant */
19886 c = tok_hex(p, &numlen);
19887 if (numlen == 0) return 0;
19888 return c;
19889
19890 case 'b': /* backspace */
19891 return '\010';
19892
19893 case 's': /* space */
19894 return ' ';
19895
19896 case 'M':
19897 if (flags & ESCAPE_META) goto eof;
19898 if ((c = nextc(p)) != '-') {
19899 goto eof;
19900 }
19901 if ((c = nextc(p)) == '\\') {
19902 switch (peekc(p)) {
19903 case 'u': case 'U':
19904 nextc(p);
19905 goto eof;
19906 }
19907 return read_escape(p, flags|ESCAPE_META, begin) | 0x80;
19908 }
19909 else if (c == -1) goto eof;
19910 else if (!ISASCII(c)) {
19911 tokskip_mbchar(p);
19912 goto eof;
19913 }
19914 else {
19915 int c2 = escaped_control_code(c);
19916 if (c2) {
19917 if (ISCNTRL(c) || !(flags & ESCAPE_CONTROL)) {
19918 WARN_SPACE_CHAR(c2, "\\M-");
19919 }
19920 else {
19921 WARN_SPACE_CHAR(c2, "\\C-\\M-");
19922 }
19923 }
19924 else if (ISCNTRL(c)) goto eof;
19925 return ((c & 0xff) | 0x80);
19926 }
19927
19928 case 'C':
19929 if ((c = nextc(p)) != '-') {
19930 goto eof;
19931 }
19932 case 'c':
19933 if (flags & ESCAPE_CONTROL) goto eof;
19934 if ((c = nextc(p))== '\\') {
19935 switch (peekc(p)) {
19936 case 'u': case 'U':
19937 nextc(p);
19938 goto eof;
19939 }
19940 c = read_escape(p, flags|ESCAPE_CONTROL, begin);
19941 }
19942 else if (c == '?')
19943 return 0177;
19944 else if (c == -1) goto eof;
19945 else if (!ISASCII(c)) {
19946 tokskip_mbchar(p);
19947 goto eof;
19948 }
19949 else {
19950 int c2 = escaped_control_code(c);
19951 if (c2) {
19952 if (ISCNTRL(c)) {
19953 if (flags & ESCAPE_META) {
19954 WARN_SPACE_CHAR(c2, "\\M-");
19955 }
19956 else {
19957 WARN_SPACE_CHAR(c2, "");
19958 }
19959 }
19960 else {
19961 if (flags & ESCAPE_META) {
19962 WARN_SPACE_CHAR(c2, "\\M-\\C-");
19963 }
19964 else {
19965 WARN_SPACE_CHAR(c2, "\\C-");
19966 }
19967 }
19968 }
19969 else if (ISCNTRL(c)) goto eof;
19970 }
19971 return c & 0x9f;
19972
19973 eof:
19974 case -1:
19975 flush_string_content(p, p->enc, p->lex.pcur - begin);
19976 yyerror0("Invalid escape character syntax");
19977 dispatch_scan_event(p, tSTRING_CONTENT);
19978 return '\0';
19979
19980 default:
19981 if (!ISASCII(c)) {
19982 tokskip_mbchar(p);
19983 goto eof;
19984 }
19985 return c;
19986 }
19987}
19988
19989static void
19990tokaddmbc(struct parser_params *p, int c, rb_encoding *enc)
19991{
19992 int len = rb_enc_codelen(c, enc);
19993 rb_enc_mbcput(c, tokspace(p, len), enc);
19994}
19995
19996static int
19997tokadd_escape(struct parser_params *p)
19998{
19999 int c;
20000 size_t numlen;
20001 const char *begin = p->lex.pcur;
20002
20003 switch (c = nextc(p)) {
20004 case '\n':
20005 return 0; /* just ignore */
20006
20007 case '0': case '1': case '2': case '3': /* octal constant */
20008 case '4': case '5': case '6': case '7':
20009 {
20010 ruby_scan_oct(--p->lex.pcur, 3, &numlen);
20011 if (numlen == 0) goto eof;
20012 p->lex.pcur += numlen;
20013 tokcopy(p, (int)numlen + 1);
20014 }
20015 return 0;
20016
20017 case 'x': /* hex constant */
20018 {
20019 tok_hex(p, &numlen);
20020 if (numlen == 0) return -1;
20021 tokcopy(p, (int)numlen + 2);
20022 }
20023 return 0;
20024
20025 eof:
20026 case -1:
20027 flush_string_content(p, p->enc, p->lex.pcur - begin);
20028 yyerror0("Invalid escape character syntax");
20029 token_flush(p);
20030 return -1;
20031
20032 default:
20033 tokadd(p, '\\');
20034 tokadd(p, c);
20035 }
20036 return 0;
20037}
20038
20039static int
20040char_to_option(int c)
20041{
20042 int val;
20043
20044 switch (c) {
20045 case 'i':
20046 val = RE_ONIG_OPTION_IGNORECASE;
20047 break;
20048 case 'x':
20049 val = RE_ONIG_OPTION_EXTEND;
20050 break;
20051 case 'm':
20052 val = RE_ONIG_OPTION_MULTILINE;
20053 break;
20054 default:
20055 val = 0;
20056 break;
20057 }
20058 return val;
20059}
20060
20061#define ARG_ENCODING_FIXED 16
20062#define ARG_ENCODING_NONE 32
20063#define ENC_ASCII8BIT 1
20064#define ENC_EUC_JP 2
20065#define ENC_Windows_31J 3
20066#define ENC_UTF8 4
20067
20068static int
20069char_to_option_kcode(int c, int *option, int *kcode)
20070{
20071 *option = 0;
20072
20073 switch (c) {
20074 case 'n':
20075 *kcode = ENC_ASCII8BIT;
20076 return (*option = ARG_ENCODING_NONE);
20077 case 'e':
20078 *kcode = ENC_EUC_JP;
20079 break;
20080 case 's':
20081 *kcode = ENC_Windows_31J;
20082 break;
20083 case 'u':
20084 *kcode = ENC_UTF8;
20085 break;
20086 default:
20087 *kcode = -1;
20088 return (*option = char_to_option(c));
20089 }
20090 *option = ARG_ENCODING_FIXED;
20091 return 1;
20092}
20093
20094static int
20095regx_options(struct parser_params *p)
20096{
20097 int kcode = 0;
20098 int kopt = 0;
20099 int options = 0;
20100 int c, opt, kc;
20101
20102 newtok(p);
20103 while (c = nextc(p), ISALPHA(c)) {
20104 if (c == 'o') {
20105 options |= RE_OPTION_ONCE;
20106 }
20107 else if (char_to_option_kcode(c, &opt, &kc)) {
20108 if (kc >= 0) {
20109 if (kc != ENC_ASCII8BIT) kcode = c;
20110 kopt = opt;
20111 }
20112 else {
20113 options |= opt;
20114 }
20115 }
20116 else {
20117 tokadd(p, c);
20118 }
20119 }
20120 options |= kopt;
20121 pushback(p, c);
20122 if (toklen(p)) {
20123 YYLTYPE loc = RUBY_INIT_YYLLOC();
20124 tokfix(p);
20125 compile_error(p, "unknown regexp option%s - %*s",
20126 toklen(p) > 1 ? "s" : "", toklen(p), tok(p));
20127 parser_show_error_line(p, &loc);
20128 }
20129 return options | RE_OPTION_ENCODING(kcode);
20130}
20131
20132static int
20133tokadd_mbchar(struct parser_params *p, int c)
20134{
20135 int len = parser_precise_mbclen(p, p->lex.pcur-1);
20136 if (len < 0) return -1;
20137 tokadd(p, c);
20138 p->lex.pcur += --len;
20139 if (len > 0) tokcopy(p, len);
20140 return c;
20141}
20142
20143static inline int
20144simple_re_meta(int c)
20145{
20146 switch (c) {
20147 case '$': case '*': case '+': case '.':
20148 case '?': case '^': case '|':
20149 case ')': case ']': case '}': case '>':
20150 return TRUE;
20151 default:
20152 return FALSE;
20153 }
20154}
20155
20156static int
20157parser_update_heredoc_indent(struct parser_params *p, int c)
20158{
20159 if (p->heredoc_line_indent == -1) {
20160 if (c == '\n') p->heredoc_line_indent = 0;
20161 }
20162 else {
20163 if (c == ' ') {
20164 p->heredoc_line_indent++;
20165 return TRUE;
20166 }
20167 else if (c == '\t') {
20168 int w = (p->heredoc_line_indent / TAB_WIDTH) + 1;
20169 p->heredoc_line_indent = w * TAB_WIDTH;
20170 return TRUE;
20171 }
20172 else if (c != '\n') {
20173 if (p->heredoc_indent > p->heredoc_line_indent) {
20174 p->heredoc_indent = p->heredoc_line_indent;
20175 }
20176 p->heredoc_line_indent = -1;
20177 }
20178 else {
20179 /* Whitespace only line has no indentation */
20180 p->heredoc_line_indent = 0;
20181 }
20182 }
20183 return FALSE;
20184}
20185
20186static void
20187parser_mixed_error(struct parser_params *p, rb_encoding *enc1, rb_encoding *enc2)
20188{
20189 YYLTYPE loc = RUBY_INIT_YYLLOC();
20190 const char *n1 = rb_enc_name(enc1), *n2 = rb_enc_name(enc2);
20191 compile_error(p, "%s mixed within %s source", n1, n2);
20192 parser_show_error_line(p, &loc);
20193}
20194
20195static void
20196parser_mixed_escape(struct parser_params *p, const char *beg, rb_encoding *enc1, rb_encoding *enc2)
20197{
20198 const char *pos = p->lex.pcur;
20199 p->lex.pcur = beg;
20200 parser_mixed_error(p, enc1, enc2);
20201 p->lex.pcur = pos;
20202}
20203
20204static inline char
20205nibble_char_upper(unsigned int c)
20206{
20207 c &= 0xf;
20208 return c + (c < 10 ? '0' : 'A' - 10);
20209}
20210
20211static int
20212tokadd_string(struct parser_params *p,
20213 int func, int term, int paren, long *nest,
20214 rb_encoding **encp, rb_encoding **enc)
20215{
20216 int c;
20217 bool erred = false;
20218#ifdef RIPPER
20219 const int heredoc_end = (p->heredoc_end ? p->heredoc_end + 1 : 0);
20220 int top_of_line = FALSE;
20221#endif
20222
20223#define mixed_error(enc1, enc2) \
20224 (void)(erred || (parser_mixed_error(p, enc1, enc2), erred = true))
20225#define mixed_escape(beg, enc1, enc2) \
20226 (void)(erred || (parser_mixed_escape(p, beg, enc1, enc2), erred = true))
20227
20228 while ((c = nextc(p)) != -1) {
20229 if (p->heredoc_indent > 0) {
20230 parser_update_heredoc_indent(p, c);
20231 }
20232#ifdef RIPPER
20233 if (top_of_line && heredoc_end == p->ruby_sourceline) {
20234 pushback(p, c);
20235 break;
20236 }
20237#endif
20238
20239 if (paren && c == paren) {
20240 ++*nest;
20241 }
20242 else if (c == term) {
20243 if (!nest || !*nest) {
20244 pushback(p, c);
20245 break;
20246 }
20247 --*nest;
20248 }
20249 else if ((func & STR_FUNC_EXPAND) && c == '#' && !lex_eol_p(p)) {
20250 unsigned char c2 = *p->lex.pcur;
20251 if (c2 == '$' || c2 == '@' || c2 == '{') {
20252 pushback(p, c);
20253 break;
20254 }
20255 }
20256 else if (c == '\\') {
20257 c = nextc(p);
20258 switch (c) {
20259 case '\n':
20260 if (func & STR_FUNC_QWORDS) break;
20261 if (func & STR_FUNC_EXPAND) {
20262 if (!(func & STR_FUNC_INDENT) || (p->heredoc_indent < 0))
20263 continue;
20264 if (c == term) {
20265 c = '\\';
20266 goto terminate;
20267 }
20268 }
20269 tokadd(p, '\\');
20270 break;
20271
20272 case '\\':
20273 if (func & STR_FUNC_ESCAPE) tokadd(p, c);
20274 break;
20275
20276 case 'u':
20277 if ((func & STR_FUNC_EXPAND) == 0) {
20278 tokadd(p, '\\');
20279 break;
20280 }
20281 tokadd_utf8(p, enc, term,
20282 func & STR_FUNC_SYMBOL,
20283 func & STR_FUNC_REGEXP);
20284 continue;
20285
20286 default:
20287 if (c == -1) return -1;
20288 if (!ISASCII(c)) {
20289 if ((func & STR_FUNC_EXPAND) == 0) tokadd(p, '\\');
20290 goto non_ascii;
20291 }
20292 if (func & STR_FUNC_REGEXP) {
20293 switch (c) {
20294 case 'c':
20295 case 'C':
20296 case 'M': {
20297 pushback(p, c);
20298 c = read_escape(p, 0, p->lex.pcur - 1);
20299
20300 char *t = tokspace(p, rb_strlen_lit("\\x00"));
20301 *t++ = '\\';
20302 *t++ = 'x';
20303 *t++ = nibble_char_upper(c >> 4);
20304 *t++ = nibble_char_upper(c);
20305 continue;
20306 }
20307 }
20308
20309 if (c == term && !simple_re_meta(c)) {
20310 tokadd(p, c);
20311 continue;
20312 }
20313 pushback(p, c);
20314 if ((c = tokadd_escape(p)) < 0)
20315 return -1;
20316 if (*enc && *enc != *encp) {
20317 mixed_escape(p->lex.ptok+2, *enc, *encp);
20318 }
20319 continue;
20320 }
20321 else if (func & STR_FUNC_EXPAND) {
20322 pushback(p, c);
20323 if (func & STR_FUNC_ESCAPE) tokadd(p, '\\');
20324 c = read_escape(p, 0, p->lex.pcur - 1);
20325 }
20326 else if ((func & STR_FUNC_QWORDS) && ISSPACE(c)) {
20327 /* ignore backslashed spaces in %w */
20328 }
20329 else if (c != term && !(paren && c == paren)) {
20330 tokadd(p, '\\');
20331 pushback(p, c);
20332 continue;
20333 }
20334 }
20335 }
20336 else if (!parser_isascii(p)) {
20337 non_ascii:
20338 if (!*enc) {
20339 *enc = *encp;
20340 }
20341 else if (*enc != *encp) {
20342 mixed_error(*enc, *encp);
20343 continue;
20344 }
20345 if (tokadd_mbchar(p, c) == -1) return -1;
20346 continue;
20347 }
20348 else if ((func & STR_FUNC_QWORDS) && ISSPACE(c)) {
20349 pushback(p, c);
20350 break;
20351 }
20352 if (c & 0x80) {
20353 if (!*enc) {
20354 *enc = *encp;
20355 }
20356 else if (*enc != *encp) {
20357 mixed_error(*enc, *encp);
20358 continue;
20359 }
20360 }
20361 tokadd(p, c);
20362#ifdef RIPPER
20363 top_of_line = (c == '\n');
20364#endif
20365 }
20366 terminate:
20367 if (*enc) *encp = *enc;
20368 return c;
20369}
20370
20371#define NEW_STRTERM(func, term, paren) new_strterm(p, func, term, paren)
20372
20373static void
20374flush_string_content(struct parser_params *p, rb_encoding *enc, size_t back)
20375{
20376 p->lex.pcur -= back;
20377 if (has_delayed_token(p)) {
20378 ptrdiff_t len = p->lex.pcur - p->lex.ptok;
20379 if (len > 0) {
20380 rb_parser_enc_str_buf_cat(p, p->delayed.token, p->lex.ptok, len, enc);
20381 p->delayed.end_line = p->ruby_sourceline;
20382 p->delayed.end_col = rb_long2int(p->lex.pcur - p->lex.pbeg);
20383 }
20384 dispatch_delayed_token(p, tSTRING_CONTENT);
20385 p->lex.ptok = p->lex.pcur;
20386 }
20387 dispatch_scan_event(p, tSTRING_CONTENT);
20388 p->lex.pcur += back;
20389}
20390
20391/* this can be shared with ripper, since it's independent from struct
20392 * parser_params. */
20393#ifndef RIPPER
20394#define BIT(c, idx) (((c) / 32 - 1 == idx) ? (1U << ((c) % 32)) : 0)
20395#define SPECIAL_PUNCT(idx) ( \
20396 BIT('~', idx) | BIT('*', idx) | BIT('$', idx) | BIT('?', idx) | \
20397 BIT('!', idx) | BIT('@', idx) | BIT('/', idx) | BIT('\\', idx) | \
20398 BIT(';', idx) | BIT(',', idx) | BIT('.', idx) | BIT('=', idx) | \
20399 BIT(':', idx) | BIT('<', idx) | BIT('>', idx) | BIT('\"', idx) | \
20400 BIT('&', idx) | BIT('`', idx) | BIT('\'', idx) | BIT('+', idx) | \
20401 BIT('0', idx))
20402const uint_least32_t ruby_global_name_punct_bits[] = {
20403 SPECIAL_PUNCT(0),
20404 SPECIAL_PUNCT(1),
20405 SPECIAL_PUNCT(2),
20406};
20407#undef BIT
20408#undef SPECIAL_PUNCT
20409#endif
20410
20411static enum yytokentype
20412parser_peek_variable_name(struct parser_params *p)
20413{
20414 int c;
20415 const char *ptr = p->lex.pcur;
20416
20417 if (lex_eol_ptr_n_p(p, ptr, 1)) return 0;
20418 c = *ptr++;
20419 switch (c) {
20420 case '$':
20421 if ((c = *ptr) == '-') {
20422 if (lex_eol_ptr_p(p, ++ptr)) return 0;
20423 c = *ptr;
20424 }
20425 else if (is_global_name_punct(c) || ISDIGIT(c)) {
20426 return tSTRING_DVAR;
20427 }
20428 break;
20429 case '@':
20430 if ((c = *ptr) == '@') {
20431 if (lex_eol_ptr_p(p, ++ptr)) return 0;
20432 c = *ptr;
20433 }
20434 break;
20435 case '{':
20436 p->lex.pcur = ptr;
20437 p->command_start = TRUE;
20438 yylval.state = p->lex.state;
20439 return tSTRING_DBEG;
20440 default:
20441 return 0;
20442 }
20443 if (!ISASCII(c) || c == '_' || ISALPHA(c))
20444 return tSTRING_DVAR;
20445 return 0;
20446}
20447
20448#define IS_ARG() IS_lex_state(EXPR_ARG_ANY)
20449#define IS_END() IS_lex_state(EXPR_END_ANY)
20450#define IS_BEG() (IS_lex_state(EXPR_BEG_ANY) || IS_lex_state_all(EXPR_ARG|EXPR_LABELED))
20451#define IS_SPCARG(c) (IS_ARG() && space_seen && !ISSPACE(c))
20452#define IS_LABEL_POSSIBLE() (\
20453 (IS_lex_state(EXPR_LABEL|EXPR_ENDFN) && !cmd_state) || \
20454 IS_ARG())
20455#define IS_LABEL_SUFFIX(n) (peek_n(p, ':',(n)) && !peek_n(p, ':', (n)+1))
20456#define IS_AFTER_OPERATOR() IS_lex_state(EXPR_FNAME | EXPR_DOT)
20457
20458static inline enum yytokentype
20459parser_string_term(struct parser_params *p, int func)
20460{
20461 xfree(p->lex.strterm);
20462 p->lex.strterm = 0;
20463 if (func & STR_FUNC_REGEXP) {
20464 set_yylval_num(regx_options(p));
20465 dispatch_scan_event(p, tREGEXP_END);
20466 SET_LEX_STATE(EXPR_END);
20467 return tREGEXP_END;
20468 }
20469 if ((func & STR_FUNC_LABEL) && IS_LABEL_SUFFIX(0)) {
20470 nextc(p);
20471 SET_LEX_STATE(EXPR_ARG|EXPR_LABELED);
20472 return tLABEL_END;
20473 }
20474 SET_LEX_STATE(EXPR_END);
20475 return tSTRING_END;
20476}
20477
20478static enum yytokentype
20479parse_string(struct parser_params *p, rb_strterm_literal_t *quote)
20480{
20481 int func = quote->func;
20482 int term = quote->term;
20483 int paren = quote->paren;
20484 int c, space = 0;
20485 rb_encoding *enc = p->enc;
20486 rb_encoding *base_enc = 0;
20487 rb_parser_string_t *lit;
20488
20489 if (func & STR_FUNC_TERM) {
20490 if (func & STR_FUNC_QWORDS) nextc(p); /* delayed term */
20491 SET_LEX_STATE(EXPR_END);
20492 xfree(p->lex.strterm);
20493 p->lex.strterm = 0;
20494 return func & STR_FUNC_REGEXP ? tREGEXP_END : tSTRING_END;
20495 }
20496 c = nextc(p);
20497 if ((func & STR_FUNC_QWORDS) && ISSPACE(c)) {
20498 while (c != '\n' && ISSPACE(c = nextc(p)));
20499 space = 1;
20500 }
20501 if (func & STR_FUNC_LIST) {
20502 quote->func &= ~STR_FUNC_LIST;
20503 space = 1;
20504 }
20505 if (c == term && !quote->nest) {
20506 if (func & STR_FUNC_QWORDS) {
20507 quote->func |= STR_FUNC_TERM;
20508 pushback(p, c); /* dispatch the term at tSTRING_END */
20509 add_delayed_token(p, p->lex.ptok, p->lex.pcur);
20510 return ' ';
20511 }
20512 return parser_string_term(p, func);
20513 }
20514 if (space) {
20515 if (!ISSPACE(c)) pushback(p, c);
20516 add_delayed_token(p, p->lex.ptok, p->lex.pcur);
20517 return ' ';
20518 }
20519 newtok(p);
20520 if ((func & STR_FUNC_EXPAND) && c == '#') {
20521 enum yytokentype t = parser_peek_variable_name(p);
20522 if (t) return t;
20523 tokadd(p, '#');
20524 c = nextc(p);
20525 }
20526 pushback(p, c);
20527 if (tokadd_string(p, func, term, paren, &quote->nest,
20528 &enc, &base_enc) == -1) {
20529 if (p->eofp) {
20530#ifndef RIPPER
20531# define unterminated_literal(mesg) yyerror0(mesg)
20532#else
20533# define unterminated_literal(mesg) compile_error(p, mesg)
20534#endif
20535 literal_flush(p, p->lex.pcur);
20536 if (func & STR_FUNC_QWORDS) {
20537 /* no content to add, bailing out here */
20538 unterminated_literal("unterminated list meets end of file");
20539 xfree(p->lex.strterm);
20540 p->lex.strterm = 0;
20541 return tSTRING_END;
20542 }
20543 if (func & STR_FUNC_REGEXP) {
20544 unterminated_literal("unterminated regexp meets end of file");
20545 }
20546 else {
20547 unterminated_literal("unterminated string meets end of file");
20548 }
20549 quote->func |= STR_FUNC_TERM;
20550 }
20551 }
20552
20553 tokfix(p);
20554 lit = STR_NEW3(tok(p), toklen(p), enc, func);
20555 set_yylval_str(lit);
20556 flush_string_content(p, enc, 0);
20557
20558 return tSTRING_CONTENT;
20559}
20560
20561static enum yytokentype
20562heredoc_identifier(struct parser_params *p)
20563{
20564 /*
20565 * term_len is length of `<<"END"` except `END`,
20566 * in this case term_len is 4 (<, <, " and ").
20567 */
20568 long len, offset = p->lex.pcur - p->lex.pbeg;
20569 int c = nextc(p), term, func = 0, quote = 0;
20570 enum yytokentype token = tSTRING_BEG;
20571 int indent = 0;
20572
20573 if (c == '-') {
20574 c = nextc(p);
20575 func = STR_FUNC_INDENT;
20576 offset++;
20577 }
20578 else if (c == '~') {
20579 c = nextc(p);
20580 func = STR_FUNC_INDENT;
20581 offset++;
20582 indent = INT_MAX;
20583 }
20584 switch (c) {
20585 case '\'':
20586 func |= str_squote; goto quoted;
20587 case '"':
20588 func |= str_dquote; goto quoted;
20589 case '`':
20590 token = tXSTRING_BEG;
20591 func |= str_xquote; goto quoted;
20592
20593 quoted:
20594 quote++;
20595 offset++;
20596 term = c;
20597 len = 0;
20598 while ((c = nextc(p)) != term) {
20599 if (c == -1 || c == '\r' || c == '\n') {
20600 yyerror0("unterminated here document identifier");
20601 return -1;
20602 }
20603 }
20604 break;
20605
20606 default:
20607 if (!parser_is_identchar(p)) {
20608 pushback(p, c);
20609 if (func & STR_FUNC_INDENT) {
20610 pushback(p, indent > 0 ? '~' : '-');
20611 }
20612 return 0;
20613 }
20614 func |= str_dquote;
20615 do {
20616 int n = parser_precise_mbclen(p, p->lex.pcur-1);
20617 if (n < 0) return 0;
20618 p->lex.pcur += --n;
20619 } while ((c = nextc(p)) != -1 && parser_is_identchar(p));
20620 pushback(p, c);
20621 break;
20622 }
20623
20624 len = p->lex.pcur - (p->lex.pbeg + offset) - quote;
20625 if ((unsigned long)len >= HERETERM_LENGTH_MAX)
20626 yyerror0("too long here document identifier");
20627 dispatch_scan_event(p, tHEREDOC_BEG);
20628 lex_goto_eol(p);
20629
20630 p->lex.strterm = new_heredoc(p);
20631 rb_strterm_heredoc_t *here = &p->lex.strterm->u.heredoc;
20632 here->offset = offset;
20633 here->sourceline = p->ruby_sourceline;
20634 here->length = (unsigned)len;
20635 here->quote = quote;
20636 here->func = func;
20637 here->lastline = p->lex.lastline;
20638
20639 token_flush(p);
20640 p->heredoc_indent = indent;
20641 p->heredoc_line_indent = 0;
20642 return token;
20643}
20644
20645static void
20646heredoc_restore(struct parser_params *p, rb_strterm_heredoc_t *here)
20647{
20648 rb_parser_string_t *line;
20649 rb_strterm_t *term = p->lex.strterm;
20650
20651 p->lex.strterm = 0;
20652 line = here->lastline;
20653 p->lex.lastline = line;
20654 p->lex.pbeg = PARSER_STRING_PTR(line);
20655 p->lex.pend = p->lex.pbeg + PARSER_STRING_LEN(line);
20656 p->lex.pcur = p->lex.pbeg + here->offset + here->length + here->quote;
20657 p->lex.ptok = p->lex.pbeg + here->offset - here->quote;
20658 p->heredoc_end = p->ruby_sourceline;
20659 p->ruby_sourceline = (int)here->sourceline;
20660 if (p->eofp) p->lex.nextline = AFTER_HEREDOC_WITHOUT_TERMINATOR;
20661 p->eofp = 0;
20662 xfree(term);
20663}
20664
20665static int
20666dedent_string_column(const char *str, long len, int width)
20667{
20668 int i, col = 0;
20669
20670 for (i = 0; i < len && col < width; i++) {
20671 if (str[i] == ' ') {
20672 col++;
20673 }
20674 else if (str[i] == '\t') {
20675 int n = TAB_WIDTH * (col / TAB_WIDTH + 1);
20676 if (n > width) break;
20677 col = n;
20678 }
20679 else {
20680 break;
20681 }
20682 }
20683
20684 return i;
20685}
20686
20687static int
20688dedent_string(struct parser_params *p, rb_parser_string_t *string, int width)
20689{
20690 char *str;
20691 long len;
20692 int i;
20693
20694 len = PARSER_STRING_LEN(string);
20695 str = PARSER_STRING_PTR(string);
20696
20697 i = dedent_string_column(str, len, width);
20698 if (!i) return 0;
20699
20700 rb_parser_str_modify(string);
20701 str = PARSER_STRING_PTR(string);
20702 if (PARSER_STRING_LEN(string) != len)
20703 rb_fatal("literal string changed: %s", PARSER_STRING_PTR(string));
20704 MEMMOVE(str, str + i, char, len - i);
20705 rb_parser_str_set_len(p, string, len - i);
20706 return i;
20707}
20708
20709static NODE *
20710heredoc_dedent(struct parser_params *p, NODE *root)
20711{
20712 NODE *node, *str_node, *prev_node;
20713 int indent = p->heredoc_indent;
20714 rb_parser_string_t *prev_lit = 0;
20715
20716 if (indent <= 0) return root;
20717 if (!root) return root;
20718
20719 prev_node = node = str_node = root;
20720 if (nd_type_p(root, NODE_LIST)) str_node = RNODE_LIST(root)->nd_head;
20721
20722 while (str_node) {
20723 rb_parser_string_t *lit = RNODE_STR(str_node)->string;
20724 if (nd_fl_newline(str_node)) {
20725 dedent_string(p, lit, indent);
20726 }
20727 if (!prev_lit) {
20728 prev_lit = lit;
20729 }
20730 else if (!literal_concat0(p, prev_lit, lit)) {
20731 return 0;
20732 }
20733 else {
20734 NODE *end = RNODE_LIST(node)->as.nd_end;
20735 node = RNODE_LIST(prev_node)->nd_next = RNODE_LIST(node)->nd_next;
20736 if (!node) {
20737 if (nd_type_p(prev_node, NODE_DSTR))
20738 nd_set_type(prev_node, NODE_STR);
20739 break;
20740 }
20741 RNODE_LIST(node)->as.nd_end = end;
20742 goto next_str;
20743 }
20744
20745 str_node = 0;
20746 while ((nd_type_p(node, NODE_LIST) || nd_type_p(node, NODE_DSTR)) && (node = RNODE_LIST(prev_node = node)->nd_next) != 0) {
20747 next_str:
20748 if (!nd_type_p(node, NODE_LIST)) break;
20749 if ((str_node = RNODE_LIST(node)->nd_head) != 0) {
20750 enum node_type type = nd_type(str_node);
20751 if (type == NODE_STR || type == NODE_DSTR) break;
20752 prev_lit = 0;
20753 str_node = 0;
20754 }
20755 }
20756 }
20757 return root;
20758}
20759
20760static int
20761whole_match_p(struct parser_params *p, const char *eos, long len, int indent)
20762{
20763 const char *beg = p->lex.pbeg;
20764 const char *ptr = p->lex.pend;
20765
20766 if (ptr - beg < len) return FALSE;
20767 if (ptr > beg && ptr[-1] == '\n') {
20768 if (--ptr > beg && ptr[-1] == '\r') --ptr;
20769 if (ptr - beg < len) return FALSE;
20770 }
20771 if (strncmp(eos, ptr -= len, len)) return FALSE;
20772 if (indent) {
20773 while (beg < ptr && ISSPACE(*beg)) beg++;
20774 }
20775 return beg == ptr;
20776}
20777
20778static int
20779word_match_p(struct parser_params *p, const char *word, long len)
20780{
20781 if (strncmp(p->lex.pcur, word, len)) return 0;
20782 if (lex_eol_n_p(p, len)) return 1;
20783 int c = (unsigned char)p->lex.pcur[len];
20784 if (ISSPACE(c)) return 1;
20785 switch (c) {
20786 case '\0': case '\004': case '\032': return 1;
20787 }
20788 return 0;
20789}
20790
20791#define NUM_SUFFIX_R (1<<0)
20792#define NUM_SUFFIX_I (1<<1)
20793#define NUM_SUFFIX_ALL 3
20794
20795static int
20796number_literal_suffix(struct parser_params *p, int mask)
20797{
20798 int c, result = 0;
20799 const char *lastp = p->lex.pcur;
20800
20801 while ((c = nextc(p)) != -1) {
20802 if ((mask & NUM_SUFFIX_I) && c == 'i') {
20803 result |= (mask & NUM_SUFFIX_I);
20804 mask &= ~NUM_SUFFIX_I;
20805 /* r after i, rational of complex is disallowed */
20806 mask &= ~NUM_SUFFIX_R;
20807 continue;
20808 }
20809 if ((mask & NUM_SUFFIX_R) && c == 'r') {
20810 result |= (mask & NUM_SUFFIX_R);
20811 mask &= ~NUM_SUFFIX_R;
20812 continue;
20813 }
20814 if (!ISASCII(c) || ISALPHA(c) || c == '_') {
20815 p->lex.pcur = lastp;
20816 return 0;
20817 }
20818 pushback(p, c);
20819 break;
20820 }
20821 return result;
20822}
20823
20824static enum yytokentype
20825set_number_literal(struct parser_params *p, enum yytokentype type, int suffix, int base, int seen_point)
20826{
20827 enum rb_numeric_type numeric_type = integer_literal;
20828
20829 if (type == tFLOAT) {
20830 numeric_type = float_literal;
20831 }
20832
20833 if (suffix & NUM_SUFFIX_R) {
20834 type = tRATIONAL;
20835 numeric_type = rational_literal;
20836 }
20837 if (suffix & NUM_SUFFIX_I) {
20838 type = tIMAGINARY;
20839 }
20840
20841 switch (type) {
20842 case tINTEGER:
20843 set_yylval_node(NEW_INTEGER(strdup(tok(p)), base, &_cur_loc));
20844 break;
20845 case tFLOAT:
20846 set_yylval_node(NEW_FLOAT(strdup(tok(p)), &_cur_loc));
20847 break;
20848 case tRATIONAL:
20849 set_yylval_node(NEW_RATIONAL(strdup(tok(p)), base, seen_point, &_cur_loc));
20850 break;
20851 case tIMAGINARY:
20852 set_yylval_node(NEW_IMAGINARY(strdup(tok(p)), base, seen_point, numeric_type, &_cur_loc));
20853 (void)numeric_type; /* for ripper */
20854 break;
20855 default:
20856 rb_bug("unexpected token: %d", type);
20857 }
20858 SET_LEX_STATE(EXPR_END);
20859 return type;
20860}
20861
20862#define dispatch_heredoc_end(p) parser_dispatch_heredoc_end(p, __LINE__)
20863static void
20864parser_dispatch_heredoc_end(struct parser_params *p, int line)
20865{
20866 if (has_delayed_token(p))
20867 dispatch_delayed_token(p, tSTRING_CONTENT);
20868
20869#ifdef RIPPER
20870 VALUE str = STR_NEW(p->lex.ptok, p->lex.pend - p->lex.ptok);
20871 ripper_dispatch1(p, ripper_token2eventid(tHEREDOC_END), str);
20872#else
20873 if (p->keep_tokens) {
20874 rb_parser_string_t *str = rb_parser_encoding_string_new(p, p->lex.ptok, p->lex.pend - p->lex.ptok, p->enc);
20875 RUBY_SET_YYLLOC_OF_HEREDOC_END(*p->yylloc);
20876 parser_append_tokens(p, str, tHEREDOC_END, line);
20877 }
20878#endif
20879
20880 RUBY_SET_YYLLOC_FROM_STRTERM_HEREDOC(*p->yylloc);
20881 lex_goto_eol(p);
20882 token_flush(p);
20883}
20884
20885static enum yytokentype
20886here_document(struct parser_params *p, rb_strterm_heredoc_t *here)
20887{
20888 int c, func, indent = 0;
20889 const char *eos, *ptr, *ptr_end;
20890 long len;
20891 rb_parser_string_t *str = 0;
20892 rb_encoding *enc = p->enc;
20893 rb_encoding *base_enc = 0;
20894 int bol;
20895#ifdef RIPPER
20896 VALUE s_value;
20897#endif
20898
20899 eos = PARSER_STRING_PTR(here->lastline) + here->offset;
20900 len = here->length;
20901 indent = (func = here->func) & STR_FUNC_INDENT;
20902
20903 if ((c = nextc(p)) == -1) {
20904 error:
20905#ifdef RIPPER
20906 if (!has_delayed_token(p)) {
20907 dispatch_scan_event(p, tSTRING_CONTENT);
20908 }
20909 else if (p->delayed.end_line + 1 == p->ruby_sourceline) {
20910 if ((len = p->lex.pcur - p->lex.ptok) > 0) {
20911 if (!(func & STR_FUNC_REGEXP)) {
20912 int cr = ENC_CODERANGE_UNKNOWN;
20913 rb_str_coderange_scan_restartable(p->lex.ptok, p->lex.pcur, enc, &cr);
20914 if (cr != ENC_CODERANGE_7BIT &&
20915 rb_is_usascii_enc(p->enc) &&
20916 enc != rb_utf8_encoding()) {
20917 enc = rb_ascii8bit_encoding();
20918 }
20919 }
20920 rb_parser_enc_str_buf_cat(p, p->delayed.token, p->lex.ptok, len, enc);
20921 }
20922 dispatch_delayed_token(p, tSTRING_CONTENT);
20923 }
20924 else {
20925 dispatch_delayed_token(p, tSTRING_CONTENT);
20926 dispatch_scan_event(p, tSTRING_CONTENT);
20927 }
20928 lex_goto_eol(p);
20929#endif
20930 heredoc_restore(p, &p->lex.strterm->u.heredoc);
20931 compile_error(p, "can't find string \"%.*s\" anywhere before EOF",
20932 (int)len, eos);
20933 token_flush(p);
20934 SET_LEX_STATE(EXPR_END);
20935 return tSTRING_END;
20936 }
20937 bol = was_bol(p);
20938 if (!bol) {
20939 /* not beginning of line, cannot be the terminator */
20940 }
20941 else if (p->heredoc_line_indent == -1) {
20942 /* `heredoc_line_indent == -1` means
20943 * - "after an interpolation in the same line", or
20944 * - "in a continuing line"
20945 */
20946 p->heredoc_line_indent = 0;
20947 }
20948 else if (whole_match_p(p, eos, len, indent)) {
20949 dispatch_heredoc_end(p);
20950 restore:
20951 heredoc_restore(p, &p->lex.strterm->u.heredoc);
20952 token_flush(p);
20953 SET_LEX_STATE(EXPR_END);
20954 return tSTRING_END;
20955 }
20956
20957 if (!(func & STR_FUNC_EXPAND)) {
20958 do {
20959 ptr = PARSER_STRING_PTR(p->lex.lastline);
20960 ptr_end = p->lex.pend;
20961 if (ptr_end > ptr) {
20962 switch (ptr_end[-1]) {
20963 case '\n':
20964 if (--ptr_end == ptr || ptr_end[-1] != '\r') {
20965 ptr_end++;
20966 break;
20967 }
20968 case '\r':
20969 --ptr_end;
20970 }
20971 }
20972
20973 if (p->heredoc_indent > 0) {
20974 long i = 0;
20975 while (ptr + i < ptr_end && parser_update_heredoc_indent(p, ptr[i]))
20976 i++;
20977 p->heredoc_line_indent = 0;
20978 }
20979
20980 if (str)
20981 parser_str_cat(str, ptr, ptr_end - ptr);
20982 else
20983 str = rb_parser_encoding_string_new(p, ptr, ptr_end - ptr, enc);
20984 if (!lex_eol_ptr_p(p, ptr_end)) parser_str_cat_cstr(str, "\n");
20985 lex_goto_eol(p);
20986 if (p->heredoc_indent > 0) {
20987 goto flush_str;
20988 }
20989 if (nextc(p) == -1) {
20990 if (str) {
20991 rb_parser_string_free(p, str);
20992 str = 0;
20993 }
20994 goto error;
20995 }
20996 } while (!whole_match_p(p, eos, len, indent));
20997 }
20998 else {
20999 /* int mb = ENC_CODERANGE_7BIT, *mbp = &mb;*/
21000 newtok(p);
21001 if (c == '#') {
21002 enum yytokentype t = parser_peek_variable_name(p);
21003 if (p->heredoc_line_indent != -1) {
21004 if (p->heredoc_indent > p->heredoc_line_indent) {
21005 p->heredoc_indent = p->heredoc_line_indent;
21006 }
21007 p->heredoc_line_indent = -1;
21008 }
21009 if (t) return t;
21010 tokadd(p, '#');
21011 c = nextc(p);
21012 }
21013 do {
21014 pushback(p, c);
21015 enc = p->enc;
21016 if ((c = tokadd_string(p, func, '\n', 0, NULL, &enc, &base_enc)) == -1) {
21017 if (p->eofp) goto error;
21018 goto restore;
21019 }
21020 if (c != '\n') {
21021 if (c == '\\') p->heredoc_line_indent = -1;
21022 flush:
21023 str = STR_NEW3(tok(p), toklen(p), enc, func);
21024 flush_str:
21025 set_yylval_str(str);
21026#ifndef RIPPER
21027 if (bol) nd_set_fl_newline(yylval.node);
21028#endif
21029 flush_string_content(p, enc, 0);
21030 return tSTRING_CONTENT;
21031 }
21032 tokadd(p, nextc(p));
21033 if (p->heredoc_indent > 0) {
21034 lex_goto_eol(p);
21035 goto flush;
21036 }
21037 /* if (mbp && mb == ENC_CODERANGE_UNKNOWN) mbp = 0;*/
21038 if ((c = nextc(p)) == -1) goto error;
21039 } while (!whole_match_p(p, eos, len, indent));
21040 str = STR_NEW3(tok(p), toklen(p), enc, func);
21041 }
21042 dispatch_heredoc_end(p);
21043 heredoc_restore(p, &p->lex.strterm->u.heredoc);
21044 token_flush(p);
21045 p->lex.strterm = NEW_STRTERM(func | STR_FUNC_TERM, 0, 0);
21046#ifdef RIPPER
21047 /* Preserve s_value for set_yylval_str */
21048 s_value = p->s_value;
21049#endif
21050 set_yylval_str(str);
21051#ifdef RIPPER
21052 set_parser_s_value(s_value);
21053#endif
21054
21055#ifndef RIPPER
21056 if (bol) nd_set_fl_newline(yylval.node);
21057#endif
21058 return tSTRING_CONTENT;
21059}
21060
21061#include "lex.c"
21062
21063static int
21064arg_ambiguous(struct parser_params *p, char c)
21065{
21066#ifndef RIPPER
21067 if (c == '/') {
21068 rb_warning1("ambiguity between regexp and two divisions: wrap regexp in parentheses or add a space after '%c' operator", WARN_I(c));
21069 }
21070 else {
21071 rb_warning1("ambiguous first argument; put parentheses or a space even after '%c' operator", WARN_I(c));
21072 }
21073#else
21074 dispatch1(arg_ambiguous, rb_usascii_str_new(&c, 1));
21075#endif
21076 return TRUE;
21077}
21078
21079/* returns true value if formal argument error;
21080 * Qtrue, or error message if ripper */
21081static VALUE
21082formal_argument_error(struct parser_params *p, ID id)
21083{
21084 switch (id_type(id)) {
21085 case ID_LOCAL:
21086 break;
21087#ifndef RIPPER
21088# define ERR(mesg) (yyerror0(mesg), Qtrue)
21089#else
21090# define ERR(mesg) WARN_S(mesg)
21091#endif
21092 case ID_CONST:
21093 return ERR("formal argument cannot be a constant");
21094 case ID_INSTANCE:
21095 return ERR("formal argument cannot be an instance variable");
21096 case ID_GLOBAL:
21097 return ERR("formal argument cannot be a global variable");
21098 case ID_CLASS:
21099 return ERR("formal argument cannot be a class variable");
21100 default:
21101 return ERR("formal argument must be local variable");
21102#undef ERR
21103 }
21104 shadowing_lvar(p, id);
21105
21106 return Qfalse;
21107}
21108
21109static int
21110lvar_defined(struct parser_params *p, ID id)
21111{
21112 return (dyna_in_block(p) && dvar_defined(p, id)) || local_id(p, id);
21113}
21114
21115/* emacsen -*- hack */
21116static long
21117parser_encode_length(struct parser_params *p, const char *name, long len)
21118{
21119 long nlen;
21120
21121 if (len > 5 && name[nlen = len - 5] == '-') {
21122 if (rb_memcicmp(name + nlen + 1, "unix", 4) == 0)
21123 return nlen;
21124 }
21125 if (len > 4 && name[nlen = len - 4] == '-') {
21126 if (rb_memcicmp(name + nlen + 1, "dos", 3) == 0)
21127 return nlen;
21128 if (rb_memcicmp(name + nlen + 1, "mac", 3) == 0 &&
21129 !(len == 8 && rb_memcicmp(name, "utf8-mac", len) == 0))
21130 /* exclude UTF8-MAC because the encoding named "UTF8" doesn't exist in Ruby */
21131 return nlen;
21132 }
21133 return len;
21134}
21135
21136static void
21137parser_set_encode(struct parser_params *p, const char *name)
21138{
21139 rb_encoding *enc;
21140 VALUE excargs[3];
21141 int idx = 0;
21142
21143 const char *wrong = 0;
21144 switch (*name) {
21145 case 'e': case 'E': wrong = "external"; break;
21146 case 'i': case 'I': wrong = "internal"; break;
21147 case 'f': case 'F': wrong = "filesystem"; break;
21148 case 'l': case 'L': wrong = "locale"; break;
21149 }
21150 if (wrong && STRCASECMP(name, wrong) == 0) goto unknown;
21151 idx = rb_enc_find_index(name);
21152 if (idx < 0) {
21153 unknown:
21154 excargs[1] = rb_sprintf("unknown encoding name: %s", name);
21155 error:
21156 excargs[0] = rb_eArgError;
21157 excargs[2] = rb_make_backtrace();
21158 rb_ary_unshift(excargs[2], rb_sprintf("%"PRIsVALUE":%d", p->ruby_sourcefile_string, p->ruby_sourceline));
21159 VALUE exc = rb_make_exception(3, excargs);
21160 ruby_show_error_line(p, exc, &(YYLTYPE)RUBY_INIT_YYLLOC(), p->ruby_sourceline, p->lex.lastline);
21161
21162 rb_ast_free(p->ast);
21163 p->ast = NULL;
21164
21165 rb_exc_raise(exc);
21166 }
21167 enc = rb_enc_from_index(idx);
21168 if (!rb_enc_asciicompat(enc)) {
21169 excargs[1] = rb_sprintf("%s is not ASCII compatible", rb_enc_name(enc));
21170 goto error;
21171 }
21172 p->enc = enc;
21173#ifndef RIPPER
21174 if (p->debug_lines) {
21175 long i;
21176 for (i = 0; i < p->debug_lines->len; i++) {
21177 rb_parser_enc_associate(p, p->debug_lines->data[i], enc);
21178 }
21179 }
21180#endif
21181}
21182
21183static bool
21184comment_at_top(struct parser_params *p)
21185{
21186 if (p->token_seen) return false;
21187 return (p->line_count == (p->has_shebang ? 2 : 1));
21188}
21189
21190typedef long (*rb_magic_comment_length_t)(struct parser_params *p, const char *name, long len);
21191typedef void (*rb_magic_comment_setter_t)(struct parser_params *p, const char *name, const char *val);
21192
21193static int parser_invalid_pragma_value(struct parser_params *p, const char *name, const char *val);
21194
21195static void
21196magic_comment_encoding(struct parser_params *p, const char *name, const char *val)
21197{
21198 if (!comment_at_top(p)) {
21199 return;
21200 }
21201 parser_set_encode(p, val);
21202}
21203
21204static int
21205parser_get_bool(struct parser_params *p, const char *name, const char *val)
21206{
21207 switch (*val) {
21208 case 't': case 'T':
21209 if (STRCASECMP(val, "true") == 0) {
21210 return TRUE;
21211 }
21212 break;
21213 case 'f': case 'F':
21214 if (STRCASECMP(val, "false") == 0) {
21215 return FALSE;
21216 }
21217 break;
21218 }
21219 return parser_invalid_pragma_value(p, name, val);
21220}
21221
21222static int
21223parser_invalid_pragma_value(struct parser_params *p, const char *name, const char *val)
21224{
21225 rb_warning2("invalid value for %s: %s", WARN_S(name), WARN_S(val));
21226 return -1;
21227}
21228
21229static void
21230parser_set_token_info(struct parser_params *p, const char *name, const char *val)
21231{
21232 int b = parser_get_bool(p, name, val);
21233 if (b >= 0) p->token_info_enabled = b;
21234}
21235
21236static void
21237parser_set_frozen_string_literal(struct parser_params *p, const char *name, const char *val)
21238{
21239 int b;
21240
21241 if (p->token_seen) {
21242 rb_warning1("'%s' is ignored after any tokens", WARN_S(name));
21243 return;
21244 }
21245
21246 b = parser_get_bool(p, name, val);
21247 if (b < 0) return;
21248
21249 p->frozen_string_literal = b;
21250}
21251
21252static void
21253parser_set_shareable_constant_value(struct parser_params *p, const char *name, const char *val)
21254{
21255 for (const char *s = p->lex.pbeg, *e = p->lex.pcur; s < e; ++s) {
21256 if (*s == ' ' || *s == '\t') continue;
21257 if (*s == '#') break;
21258 rb_warning1("'%s' is ignored unless in comment-only line", WARN_S(name));
21259 return;
21260 }
21261
21262 switch (*val) {
21263 case 'n': case 'N':
21264 if (STRCASECMP(val, "none") == 0) {
21265 p->ctxt.shareable_constant_value = rb_parser_shareable_none;
21266 return;
21267 }
21268 break;
21269 case 'l': case 'L':
21270 if (STRCASECMP(val, "literal") == 0) {
21271 p->ctxt.shareable_constant_value = rb_parser_shareable_literal;
21272 return;
21273 }
21274 break;
21275 case 'e': case 'E':
21276 if (STRCASECMP(val, "experimental_copy") == 0) {
21277 p->ctxt.shareable_constant_value = rb_parser_shareable_copy;
21278 return;
21279 }
21280 if (STRCASECMP(val, "experimental_everything") == 0) {
21281 p->ctxt.shareable_constant_value = rb_parser_shareable_everything;
21282 return;
21283 }
21284 break;
21285 }
21286 parser_invalid_pragma_value(p, name, val);
21287}
21288
21289# if WARN_PAST_SCOPE
21290static void
21291parser_set_past_scope(struct parser_params *p, const char *name, const char *val)
21292{
21293 int b = parser_get_bool(p, name, val);
21294 if (b >= 0) p->past_scope_enabled = b;
21295}
21296# endif
21297
21299 const char *name;
21300 rb_magic_comment_setter_t func;
21301 rb_magic_comment_length_t length;
21302};
21303
21304static const struct magic_comment magic_comments[] = {
21305 {"coding", magic_comment_encoding, parser_encode_length},
21306 {"encoding", magic_comment_encoding, parser_encode_length},
21307 {"frozen_string_literal", parser_set_frozen_string_literal},
21308 {"shareable_constant_value", parser_set_shareable_constant_value},
21309 {"warn_indent", parser_set_token_info},
21310# if WARN_PAST_SCOPE
21311 {"warn_past_scope", parser_set_past_scope},
21312# endif
21313};
21314
21315static const char *
21316magic_comment_marker(const char *str, long len)
21317{
21318 long i = 2;
21319
21320 while (i < len) {
21321 switch (str[i]) {
21322 case '-':
21323 if (str[i-1] == '*' && str[i-2] == '-') {
21324 return str + i + 1;
21325 }
21326 i += 2;
21327 break;
21328 case '*':
21329 if (i + 1 >= len) return 0;
21330 if (str[i+1] != '-') {
21331 i += 4;
21332 }
21333 else if (str[i-1] != '-') {
21334 i += 2;
21335 }
21336 else {
21337 return str + i + 2;
21338 }
21339 break;
21340 default:
21341 i += 3;
21342 break;
21343 }
21344 }
21345 return 0;
21346}
21347
21348static int
21349parser_magic_comment(struct parser_params *p, const char *str, long len)
21350{
21351 int indicator = 0;
21352 VALUE name = 0, val = 0;
21353 const char *beg, *end, *vbeg, *vend;
21354#define str_copy(_s, _p, _n) ((_s) \
21355 ? (void)(rb_str_resize((_s), (_n)), \
21356 MEMCPY(RSTRING_PTR(_s), (_p), char, (_n)), (_s)) \
21357 : (void)((_s) = STR_NEW((_p), (_n))))
21358
21359 if (len <= 7) return FALSE;
21360 if (!!(beg = magic_comment_marker(str, len))) {
21361 if (!(end = magic_comment_marker(beg, str + len - beg)))
21362 return FALSE;
21363 indicator = TRUE;
21364 str = beg;
21365 len = end - beg - 3;
21366 }
21367
21368 /* %r"([^\\s\'\":;]+)\\s*:\\s*(\"(?:\\\\.|[^\"])*\"|[^\"\\s;]+)[\\s;]*" */
21369 while (len > 0) {
21370 const struct magic_comment *mc = magic_comments;
21371 char *s;
21372 int i;
21373 long n = 0;
21374
21375 for (; len > 0 && *str; str++, --len) {
21376 switch (*str) {
21377 case '\'': case '"': case ':': case ';':
21378 continue;
21379 }
21380 if (!ISSPACE(*str)) break;
21381 }
21382 for (beg = str; len > 0; str++, --len) {
21383 switch (*str) {
21384 case '\'': case '"': case ':': case ';':
21385 break;
21386 default:
21387 if (ISSPACE(*str)) break;
21388 continue;
21389 }
21390 break;
21391 }
21392 for (end = str; len > 0 && ISSPACE(*str); str++, --len);
21393 if (!len) break;
21394 if (*str != ':') {
21395 if (!indicator) return FALSE;
21396 continue;
21397 }
21398
21399 do str++; while (--len > 0 && ISSPACE(*str));
21400 if (!len) break;
21401 const char *tok_beg = str;
21402 if (*str == '"') {
21403 for (vbeg = ++str; --len > 0 && *str != '"'; str++) {
21404 if (*str == '\\') {
21405 --len;
21406 ++str;
21407 }
21408 }
21409 vend = str;
21410 if (len) {
21411 --len;
21412 ++str;
21413 }
21414 }
21415 else {
21416 for (vbeg = str; len > 0 && *str != '"' && *str != ';' && !ISSPACE(*str); --len, str++);
21417 vend = str;
21418 }
21419 const char *tok_end = str;
21420 if (indicator) {
21421 while (len > 0 && (*str == ';' || ISSPACE(*str))) --len, str++;
21422 }
21423 else {
21424 while (len > 0 && (ISSPACE(*str))) --len, str++;
21425 if (len) return FALSE;
21426 }
21427
21428 n = end - beg;
21429 str_copy(name, beg, n);
21430 s = RSTRING_PTR(name);
21431 for (i = 0; i < n; ++i) {
21432 if (s[i] == '-') s[i] = '_';
21433 }
21434 do {
21435 if (STRNCASECMP(mc->name, s, n) == 0 && !mc->name[n]) {
21436 n = vend - vbeg;
21437 if (mc->length) {
21438 n = (*mc->length)(p, vbeg, n);
21439 }
21440 str_copy(val, vbeg, n);
21441 p->lex.ptok = tok_beg;
21442 p->lex.pcur = tok_end;
21443 (*mc->func)(p, mc->name, RSTRING_PTR(val));
21444 break;
21445 }
21446 } while (++mc < magic_comments + numberof(magic_comments));
21447#ifdef RIPPER
21448 str_copy(val, vbeg, vend - vbeg);
21449 dispatch2(magic_comment, name, val);
21450#endif
21451 }
21452
21453 return TRUE;
21454}
21455
21456static void
21457set_file_encoding(struct parser_params *p, const char *str, const char *send)
21458{
21459 int sep = 0;
21460 const char *beg = str;
21461 VALUE s;
21462
21463 for (;;) {
21464 if (send - str <= 6) return;
21465 switch (str[6]) {
21466 case 'C': case 'c': str += 6; continue;
21467 case 'O': case 'o': str += 5; continue;
21468 case 'D': case 'd': str += 4; continue;
21469 case 'I': case 'i': str += 3; continue;
21470 case 'N': case 'n': str += 2; continue;
21471 case 'G': case 'g': str += 1; continue;
21472 case '=': case ':':
21473 sep = 1;
21474 str += 6;
21475 break;
21476 default:
21477 str += 6;
21478 if (ISSPACE(*str)) break;
21479 continue;
21480 }
21481 if (STRNCASECMP(str-6, "coding", 6) == 0) break;
21482 sep = 0;
21483 }
21484 for (;;) {
21485 do {
21486 if (++str >= send) return;
21487 } while (ISSPACE(*str));
21488 if (sep) break;
21489 if (*str != '=' && *str != ':') return;
21490 sep = 1;
21491 str++;
21492 }
21493 beg = str;
21494 while ((*str == '-' || *str == '_' || ISALNUM(*str)) && ++str < send);
21495 s = rb_str_new(beg, parser_encode_length(p, beg, str - beg));
21496 p->lex.ptok = beg;
21497 p->lex.pcur = str;
21498 parser_set_encode(p, RSTRING_PTR(s));
21499 rb_str_resize(s, 0);
21500}
21501
21502static void
21503parser_prepare(struct parser_params *p)
21504{
21505 int c = nextc0(p, FALSE);
21506 p->token_info_enabled = !compile_for_eval && RTEST(ruby_verbose);
21507 switch (c) {
21508 case '#':
21509 if (peek(p, '!')) p->has_shebang = 1;
21510 break;
21511 case 0xef: /* UTF-8 BOM marker */
21512 if (!lex_eol_n_p(p, 2) &&
21513 (unsigned char)p->lex.pcur[0] == 0xbb &&
21514 (unsigned char)p->lex.pcur[1] == 0xbf) {
21515 p->enc = rb_utf8_encoding();
21516 p->lex.pcur += 2;
21517#ifndef RIPPER
21518 if (p->debug_lines) {
21519 rb_parser_string_set_encoding(p->lex.lastline, p->enc);
21520 }
21521#endif
21522 p->lex.pbeg = p->lex.pcur;
21523 token_flush(p);
21524 return;
21525 }
21526 break;
21527 case -1: /* end of script. */
21528 return;
21529 }
21530 pushback(p, c);
21531 p->enc = rb_parser_str_get_encoding(p->lex.lastline);
21532}
21533
21534#ifndef RIPPER
21535#define ambiguous_operator(tok, op, syn) ( \
21536 rb_warning0("'"op"' after local variable or literal is interpreted as binary operator"), \
21537 rb_warning0("even though it seems like "syn""))
21538#else
21539#define ambiguous_operator(tok, op, syn) \
21540 dispatch2(operator_ambiguous, TOKEN2VAL(tok), rb_str_new_cstr(syn))
21541#endif
21542#define warn_balanced(tok, op, syn) ((void) \
21543 (!IS_lex_state_for(last_state, EXPR_CLASS|EXPR_DOT|EXPR_FNAME|EXPR_ENDFN) && \
21544 space_seen && !ISSPACE(c) && \
21545 (ambiguous_operator(tok, op, syn), 0)), \
21546 (enum yytokentype)(tok))
21547
21548static enum yytokentype
21549no_digits(struct parser_params *p)
21550{
21551 yyerror0("numeric literal without digits");
21552 if (peek(p, '_')) nextc(p);
21553 /* dummy 0, for tUMINUS_NUM at numeric */
21554 return set_number_literal(p, tINTEGER, 0, 10, 0);
21555}
21556
21557static enum yytokentype
21558parse_numeric(struct parser_params *p, int c)
21559{
21560 int is_float, seen_point, seen_e, nondigit;
21561 int suffix;
21562
21563 is_float = seen_point = seen_e = nondigit = 0;
21564 SET_LEX_STATE(EXPR_END);
21565 newtok(p);
21566 if (c == '-' || c == '+') {
21567 tokadd(p, c);
21568 c = nextc(p);
21569 }
21570 if (c == '0') {
21571 int start = toklen(p);
21572 c = nextc(p);
21573 if (c == 'x' || c == 'X') {
21574 /* hexadecimal */
21575 c = nextc(p);
21576 if (c != -1 && ISXDIGIT(c)) {
21577 do {
21578 if (c == '_') {
21579 if (nondigit) break;
21580 nondigit = c;
21581 continue;
21582 }
21583 if (!ISXDIGIT(c)) break;
21584 nondigit = 0;
21585 tokadd(p, c);
21586 } while ((c = nextc(p)) != -1);
21587 }
21588 pushback(p, c);
21589 tokfix(p);
21590 if (toklen(p) == start) {
21591 return no_digits(p);
21592 }
21593 else if (nondigit) goto trailing_uc;
21594 suffix = number_literal_suffix(p, NUM_SUFFIX_ALL);
21595 return set_number_literal(p, tINTEGER, suffix, 16, 0);
21596 }
21597 if (c == 'b' || c == 'B') {
21598 /* binary */
21599 c = nextc(p);
21600 if (c == '0' || c == '1') {
21601 do {
21602 if (c == '_') {
21603 if (nondigit) break;
21604 nondigit = c;
21605 continue;
21606 }
21607 if (c != '0' && c != '1') break;
21608 nondigit = 0;
21609 tokadd(p, c);
21610 } while ((c = nextc(p)) != -1);
21611 }
21612 pushback(p, c);
21613 tokfix(p);
21614 if (toklen(p) == start) {
21615 return no_digits(p);
21616 }
21617 else if (nondigit) goto trailing_uc;
21618 suffix = number_literal_suffix(p, NUM_SUFFIX_ALL);
21619 return set_number_literal(p, tINTEGER, suffix, 2, 0);
21620 }
21621 if (c == 'd' || c == 'D') {
21622 /* decimal */
21623 c = nextc(p);
21624 if (c != -1 && ISDIGIT(c)) {
21625 do {
21626 if (c == '_') {
21627 if (nondigit) break;
21628 nondigit = c;
21629 continue;
21630 }
21631 if (!ISDIGIT(c)) break;
21632 nondigit = 0;
21633 tokadd(p, c);
21634 } while ((c = nextc(p)) != -1);
21635 }
21636 pushback(p, c);
21637 tokfix(p);
21638 if (toklen(p) == start) {
21639 return no_digits(p);
21640 }
21641 else if (nondigit) goto trailing_uc;
21642 suffix = number_literal_suffix(p, NUM_SUFFIX_ALL);
21643 return set_number_literal(p, tINTEGER, suffix, 10, 0);
21644 }
21645 if (c == '_') {
21646 /* 0_0 */
21647 goto octal_number;
21648 }
21649 if (c == 'o' || c == 'O') {
21650 /* prefixed octal */
21651 c = nextc(p);
21652 if (c == -1 || c == '_' || !ISDIGIT(c)) {
21653 tokfix(p);
21654 return no_digits(p);
21655 }
21656 }
21657 if (c >= '0' && c <= '7') {
21658 /* octal */
21659 octal_number:
21660 do {
21661 if (c == '_') {
21662 if (nondigit) break;
21663 nondigit = c;
21664 continue;
21665 }
21666 if (c < '0' || c > '9') break;
21667 if (c > '7') goto invalid_octal;
21668 nondigit = 0;
21669 tokadd(p, c);
21670 } while ((c = nextc(p)) != -1);
21671 if (toklen(p) > start) {
21672 pushback(p, c);
21673 tokfix(p);
21674 if (nondigit) goto trailing_uc;
21675 suffix = number_literal_suffix(p, NUM_SUFFIX_ALL);
21676 return set_number_literal(p, tINTEGER, suffix, 8, 0);
21677 }
21678 if (nondigit) {
21679 pushback(p, c);
21680 goto trailing_uc;
21681 }
21682 }
21683 if (c > '7' && c <= '9') {
21684 invalid_octal:
21685 yyerror0("Invalid octal digit");
21686 }
21687 else if (c == '.' || c == 'e' || c == 'E') {
21688 tokadd(p, '0');
21689 }
21690 else {
21691 pushback(p, c);
21692 tokfix(p);
21693 suffix = number_literal_suffix(p, NUM_SUFFIX_ALL);
21694 return set_number_literal(p, tINTEGER, suffix, 10, 0);
21695 }
21696 }
21697
21698 for (;;) {
21699 switch (c) {
21700 case '0': case '1': case '2': case '3': case '4':
21701 case '5': case '6': case '7': case '8': case '9':
21702 nondigit = 0;
21703 tokadd(p, c);
21704 break;
21705
21706 case '.':
21707 if (nondigit) goto trailing_uc;
21708 if (seen_point || seen_e) {
21709 goto decode_num;
21710 }
21711 else {
21712 int c0 = nextc(p);
21713 if (c0 == -1 || !ISDIGIT(c0)) {
21714 pushback(p, c0);
21715 goto decode_num;
21716 }
21717 c = c0;
21718 }
21719 seen_point = toklen(p);
21720 tokadd(p, '.');
21721 tokadd(p, c);
21722 is_float++;
21723 nondigit = 0;
21724 break;
21725
21726 case 'e':
21727 case 'E':
21728 if (nondigit) {
21729 pushback(p, c);
21730 c = nondigit;
21731 goto decode_num;
21732 }
21733 if (seen_e) {
21734 goto decode_num;
21735 }
21736 nondigit = c;
21737 c = nextc(p);
21738 if (c != '-' && c != '+' && !ISDIGIT(c)) {
21739 pushback(p, c);
21740 c = nondigit;
21741 nondigit = 0;
21742 goto decode_num;
21743 }
21744 tokadd(p, nondigit);
21745 seen_e++;
21746 is_float++;
21747 tokadd(p, c);
21748 nondigit = (c == '-' || c == '+') ? c : 0;
21749 break;
21750
21751 case '_': /* `_' in number just ignored */
21752 if (nondigit) goto decode_num;
21753 nondigit = c;
21754 break;
21755
21756 default:
21757 goto decode_num;
21758 }
21759 c = nextc(p);
21760 }
21761
21762 decode_num:
21763 pushback(p, c);
21764 if (nondigit) {
21765 trailing_uc:
21766 literal_flush(p, p->lex.pcur - 1);
21767 YYLTYPE loc = RUBY_INIT_YYLLOC();
21768 compile_error(p, "trailing '%c' in number", nondigit);
21769 parser_show_error_line(p, &loc);
21770 }
21771 tokfix(p);
21772 if (is_float) {
21773 enum yytokentype type = tFLOAT;
21774
21775 suffix = number_literal_suffix(p, seen_e ? NUM_SUFFIX_I : NUM_SUFFIX_ALL);
21776 if (suffix & NUM_SUFFIX_R) {
21777 type = tRATIONAL;
21778 }
21779 else {
21780 strtod(tok(p), 0);
21781 if (errno == ERANGE) {
21782 rb_warning1("Float %s out of range", WARN_S(tok(p)));
21783 errno = 0;
21784 }
21785 }
21786 return set_number_literal(p, type, suffix, 0, seen_point);
21787 }
21788 suffix = number_literal_suffix(p, NUM_SUFFIX_ALL);
21789 return set_number_literal(p, tINTEGER, suffix, 10, 0);
21790}
21791
21792static enum yytokentype
21793parse_qmark(struct parser_params *p, int space_seen)
21794{
21795 rb_encoding *enc;
21796 register int c;
21797 rb_parser_string_t *lit;
21798 const char *start = p->lex.pcur;
21799
21800 if (IS_END()) {
21801 SET_LEX_STATE(EXPR_VALUE);
21802 return '?';
21803 }
21804 c = nextc(p);
21805 if (c == -1) {
21806 compile_error(p, "incomplete character syntax");
21807 return 0;
21808 }
21809 if (rb_enc_isspace(c, p->enc)) {
21810 if (!IS_ARG()) {
21811 int c2 = escaped_control_code(c);
21812 if (c2) {
21813 WARN_SPACE_CHAR(c2, "?");
21814 }
21815 }
21816 ternary:
21817 pushback(p, c);
21818 SET_LEX_STATE(EXPR_VALUE);
21819 return '?';
21820 }
21821 newtok(p);
21822 enc = p->enc;
21823 int w = parser_precise_mbclen(p, start);
21824 if (is_identchar(p, start, p->lex.pend, p->enc) &&
21825 !(lex_eol_ptr_n_p(p, start, w) || !is_identchar(p, start + w, p->lex.pend, p->enc))) {
21826 if (space_seen) {
21827 const char *ptr = start;
21828 do {
21829 int n = parser_precise_mbclen(p, ptr);
21830 if (n < 0) return -1;
21831 ptr += n;
21832 } while (!lex_eol_ptr_p(p, ptr) && is_identchar(p, ptr, p->lex.pend, p->enc));
21833 rb_warn2("'?' just followed by '%.*s' is interpreted as" \
21834 " a conditional operator, put a space after '?'",
21835 WARN_I((int)(ptr - start)), WARN_S_L(start, (ptr - start)));
21836 }
21837 goto ternary;
21838 }
21839 else if (c == '\\') {
21840 if (peek(p, 'u')) {
21841 nextc(p);
21842 enc = rb_utf8_encoding();
21843 tokadd_utf8(p, &enc, -1, 0, 0);
21844 }
21845 else if (!ISASCII(c = peekc(p)) && c != -1) {
21846 nextc(p);
21847 if (tokadd_mbchar(p, c) == -1) return 0;
21848 }
21849 else {
21850 c = read_escape(p, 0, p->lex.pcur - rb_strlen_lit("?\\"));
21851 tokadd(p, c);
21852 }
21853 }
21854 else {
21855 if (tokadd_mbchar(p, c) == -1) return 0;
21856 }
21857 tokfix(p);
21858 lit = STR_NEW3(tok(p), toklen(p), enc, 0);
21859 set_yylval_str(lit);
21860 SET_LEX_STATE(EXPR_END);
21861 return tCHAR;
21862}
21863
21864static enum yytokentype
21865parse_percent(struct parser_params *p, const int space_seen, const enum lex_state_e last_state)
21866{
21867 register int c;
21868 const char *ptok = p->lex.pcur;
21869
21870 if (IS_BEG()) {
21871 int term;
21872 int paren;
21873
21874 c = nextc(p);
21875 quotation:
21876 if (c == -1) goto unterminated;
21877 if (!ISALNUM(c)) {
21878 term = c;
21879 if (!ISASCII(c)) goto unknown;
21880 c = 'Q';
21881 }
21882 else {
21883 term = nextc(p);
21884 if (rb_enc_isalnum(term, p->enc) || !parser_isascii(p)) {
21885 unknown:
21886 pushback(p, term);
21887 c = parser_precise_mbclen(p, p->lex.pcur);
21888 if (c < 0) return 0;
21889 p->lex.pcur += c;
21890 yyerror0("unknown type of %string");
21891 return 0;
21892 }
21893 }
21894 if (term == -1) {
21895 unterminated:
21896 compile_error(p, "unterminated quoted string meets end of file");
21897 return 0;
21898 }
21899 paren = term;
21900 if (term == '(') term = ')';
21901 else if (term == '[') term = ']';
21902 else if (term == '{') term = '}';
21903 else if (term == '<') term = '>';
21904 else paren = 0;
21905
21906 p->lex.ptok = ptok-1;
21907 switch (c) {
21908 case 'Q':
21909 p->lex.strterm = NEW_STRTERM(str_dquote, term, paren);
21910 return tSTRING_BEG;
21911
21912 case 'q':
21913 p->lex.strterm = NEW_STRTERM(str_squote, term, paren);
21914 return tSTRING_BEG;
21915
21916 case 'W':
21917 p->lex.strterm = NEW_STRTERM(str_dword, term, paren);
21918 return tWORDS_BEG;
21919
21920 case 'w':
21921 p->lex.strterm = NEW_STRTERM(str_sword, term, paren);
21922 return tQWORDS_BEG;
21923
21924 case 'I':
21925 p->lex.strterm = NEW_STRTERM(str_dword, term, paren);
21926 return tSYMBOLS_BEG;
21927
21928 case 'i':
21929 p->lex.strterm = NEW_STRTERM(str_sword, term, paren);
21930 return tQSYMBOLS_BEG;
21931
21932 case 'x':
21933 p->lex.strterm = NEW_STRTERM(str_xquote, term, paren);
21934 return tXSTRING_BEG;
21935
21936 case 'r':
21937 p->lex.strterm = NEW_STRTERM(str_regexp, term, paren);
21938 return tREGEXP_BEG;
21939
21940 case 's':
21941 p->lex.strterm = NEW_STRTERM(str_ssym, term, paren);
21942 SET_LEX_STATE(EXPR_FNAME|EXPR_FITEM);
21943 return tSYMBEG;
21944
21945 default:
21946 yyerror0("unknown type of %string");
21947 return 0;
21948 }
21949 }
21950 if ((c = nextc(p)) == '=') {
21951 set_yylval_id('%');
21952 SET_LEX_STATE(EXPR_BEG);
21953 return tOP_ASGN;
21954 }
21955 if (IS_SPCARG(c) || (IS_lex_state(EXPR_FITEM) && c == 's')) {
21956 goto quotation;
21957 }
21958 SET_LEX_STATE(IS_AFTER_OPERATOR() ? EXPR_ARG : EXPR_BEG);
21959 pushback(p, c);
21960 return warn_balanced('%', "%%", "string literal");
21961}
21962
21963static int
21964tokadd_ident(struct parser_params *p, int c)
21965{
21966 do {
21967 if (tokadd_mbchar(p, c) == -1) return -1;
21968 c = nextc(p);
21969 } while (parser_is_identchar(p));
21970 pushback(p, c);
21971 return 0;
21972}
21973
21974static ID
21975tokenize_ident(struct parser_params *p)
21976{
21977 ID ident = TOK_INTERN();
21978
21979 set_yylval_name(ident);
21980
21981 return ident;
21982}
21983
21984static int
21985parse_numvar(struct parser_params *p)
21986{
21987 size_t len;
21988 int overflow;
21989 unsigned long n = ruby_scan_digits(tok(p)+1, toklen(p)-1, 10, &len, &overflow);
21990 const unsigned long nth_ref_max =
21991 ((FIXNUM_MAX < INT_MAX) ? FIXNUM_MAX : INT_MAX) >> 1;
21992 /* NTH_REF is left-shifted to be ORed with back-ref flag and
21993 * turned into a Fixnum, in compile.c */
21994
21995 if (overflow || n > nth_ref_max) {
21996 /* compile_error()? */
21997 rb_warn1("'%s' is too big for a number variable, always nil", WARN_S(tok(p)));
21998 return 0; /* $0 is $PROGRAM_NAME, not NTH_REF */
21999 }
22000 else {
22001 return (int)n;
22002 }
22003}
22004
22005static enum yytokentype
22006parse_gvar(struct parser_params *p, const enum lex_state_e last_state)
22007{
22008 const char *ptr = p->lex.pcur;
22009 register int c;
22010
22011 SET_LEX_STATE(EXPR_END);
22012 p->lex.ptok = ptr - 1; /* from '$' */
22013 newtok(p);
22014 c = nextc(p);
22015 switch (c) {
22016 case '_': /* $_: last read line string */
22017 c = nextc(p);
22018 if (parser_is_identchar(p)) {
22019 tokadd(p, '$');
22020 tokadd(p, '_');
22021 break;
22022 }
22023 pushback(p, c);
22024 c = '_';
22025 /* fall through */
22026 case '~': /* $~: match-data */
22027 case '*': /* $*: argv */
22028 case '$': /* $$: pid */
22029 case '?': /* $?: last status */
22030 case '!': /* $!: error string */
22031 case '@': /* $@: error position */
22032 case '/': /* $/: input record separator */
22033 case '\\': /* $\: output record separator */
22034 case ';': /* $;: field separator */
22035 case ',': /* $,: output field separator */
22036 case '.': /* $.: last read line number */
22037 case '=': /* $=: ignorecase */
22038 case ':': /* $:: load path */
22039 case '<': /* $<: default input handle */
22040 case '>': /* $>: default output handle */
22041 case '\"': /* $": already loaded files */
22042 tokadd(p, '$');
22043 tokadd(p, c);
22044 goto gvar;
22045
22046 case '-':
22047 tokadd(p, '$');
22048 tokadd(p, c);
22049 c = nextc(p);
22050 if (parser_is_identchar(p)) {
22051 if (tokadd_mbchar(p, c) == -1) return 0;
22052 }
22053 else {
22054 pushback(p, c);
22055 pushback(p, '-');
22056 return '$';
22057 }
22058 gvar:
22059 tokenize_ident(p);
22060 return tGVAR;
22061
22062 case '&': /* $&: last match */
22063 case '`': /* $`: string before last match */
22064 case '\'': /* $': string after last match */
22065 case '+': /* $+: string matches last paren. */
22066 if (IS_lex_state_for(last_state, EXPR_FNAME)) {
22067 tokadd(p, '$');
22068 tokadd(p, c);
22069 goto gvar;
22070 }
22071 set_yylval_node(NEW_BACK_REF(c, &_cur_loc));
22072 return tBACK_REF;
22073
22074 case '1': case '2': case '3':
22075 case '4': case '5': case '6':
22076 case '7': case '8': case '9':
22077 tokadd(p, '$');
22078 do {
22079 tokadd(p, c);
22080 c = nextc(p);
22081 } while (c != -1 && ISDIGIT(c));
22082 pushback(p, c);
22083 if (IS_lex_state_for(last_state, EXPR_FNAME)) goto gvar;
22084 tokfix(p);
22085 c = parse_numvar(p);
22086 set_yylval_node(NEW_NTH_REF(c, &_cur_loc));
22087 return tNTH_REF;
22088
22089 default:
22090 if (!parser_is_identchar(p)) {
22091 YYLTYPE loc = RUBY_INIT_YYLLOC();
22092 if (c == -1 || ISSPACE(c)) {
22093 compile_error(p, "'$' without identifiers is not allowed as a global variable name");
22094 }
22095 else {
22096 pushback(p, c);
22097 compile_error(p, "'$%c' is not allowed as a global variable name", c);
22098 }
22099 parser_show_error_line(p, &loc);
22100 set_yylval_noname();
22101 return tGVAR;
22102 }
22103 /* fall through */
22104 case '0':
22105 tokadd(p, '$');
22106 }
22107
22108 if (tokadd_ident(p, c)) return 0;
22109 SET_LEX_STATE(EXPR_END);
22110 if (VALID_SYMNAME_P(tok(p), toklen(p), p->enc, ID_GLOBAL)) {
22111 tokenize_ident(p);
22112 }
22113 else {
22114 compile_error(p, "'%.*s' is not allowed as a global variable name", toklen(p), tok(p));
22115 set_yylval_noname();
22116 }
22117 return tGVAR;
22118}
22119
22120static bool
22121parser_numbered_param(struct parser_params *p, int n)
22122{
22123 if (n < 0) return false;
22124
22125 if (DVARS_TERMINAL_P(p->lvtbl->args) || DVARS_TERMINAL_P(p->lvtbl->args->prev)) {
22126 return false;
22127 }
22128 if (p->max_numparam == ORDINAL_PARAM) {
22129 compile_error(p, "ordinary parameter is defined");
22130 return false;
22131 }
22132 struct vtable *args = p->lvtbl->args;
22133 if (p->max_numparam < n) {
22134 p->max_numparam = n;
22135 }
22136 while (n > args->pos) {
22137 vtable_add(args, NUMPARAM_IDX_TO_ID(args->pos+1));
22138 }
22139 return true;
22140}
22141
22142static enum yytokentype
22143parse_atmark(struct parser_params *p, const enum lex_state_e last_state)
22144{
22145 const char *ptr = p->lex.pcur;
22146 enum yytokentype result = tIVAR;
22147 register int c = nextc(p);
22148 YYLTYPE loc;
22149
22150 p->lex.ptok = ptr - 1; /* from '@' */
22151 newtok(p);
22152 tokadd(p, '@');
22153 if (c == '@') {
22154 result = tCVAR;
22155 tokadd(p, '@');
22156 c = nextc(p);
22157 }
22158 SET_LEX_STATE(IS_lex_state_for(last_state, EXPR_FNAME) ? EXPR_ENDFN : EXPR_END);
22159 if (c == -1 || !parser_is_identchar(p)) {
22160 pushback(p, c);
22161 RUBY_SET_YYLLOC(loc);
22162 if (result == tIVAR) {
22163 compile_error(p, "'@' without identifiers is not allowed as an instance variable name");
22164 }
22165 else {
22166 compile_error(p, "'@@' without identifiers is not allowed as a class variable name");
22167 }
22168 parser_show_error_line(p, &loc);
22169 set_yylval_noname();
22170 SET_LEX_STATE(EXPR_END);
22171 return result;
22172 }
22173 else if (ISDIGIT(c)) {
22174 pushback(p, c);
22175 RUBY_SET_YYLLOC(loc);
22176 if (result == tIVAR) {
22177 compile_error(p, "'@%c' is not allowed as an instance variable name", c);
22178 }
22179 else {
22180 compile_error(p, "'@@%c' is not allowed as a class variable name", c);
22181 }
22182 parser_show_error_line(p, &loc);
22183 set_yylval_noname();
22184 SET_LEX_STATE(EXPR_END);
22185 return result;
22186 }
22187
22188 if (tokadd_ident(p, c)) return 0;
22189 tokenize_ident(p);
22190 return result;
22191}
22192
22193static enum yytokentype
22194parse_ident(struct parser_params *p, int c, int cmd_state)
22195{
22196 enum yytokentype result;
22197 bool is_ascii = true;
22198 const enum lex_state_e last_state = p->lex.state;
22199 ID ident;
22200 int enforce_keyword_end = 0;
22201
22202 do {
22203 if (!ISASCII(c)) is_ascii = false;
22204 if (tokadd_mbchar(p, c) == -1) return 0;
22205 c = nextc(p);
22206 } while (parser_is_identchar(p));
22207 if ((c == '!' || c == '?') && !peek(p, '=')) {
22208 result = tFID;
22209 tokadd(p, c);
22210 }
22211 else if (c == '=' && IS_lex_state(EXPR_FNAME) &&
22212 (!peek(p, '~') && !peek(p, '>') && (!peek(p, '=') || (peek_n(p, '>', 1))))) {
22213 result = tIDENTIFIER;
22214 tokadd(p, c);
22215 }
22216 else {
22217 result = tCONSTANT; /* assume provisionally */
22218 pushback(p, c);
22219 }
22220 tokfix(p);
22221
22222 if (IS_LABEL_POSSIBLE()) {
22223 if (IS_LABEL_SUFFIX(0)) {
22224 SET_LEX_STATE(EXPR_ARG|EXPR_LABELED);
22225 nextc(p);
22226 tokenize_ident(p);
22227 return tLABEL;
22228 }
22229 }
22230
22231#ifndef RIPPER
22232 if (peek_end_expect_token_locations(p)) {
22233 const rb_code_position_t *end_pos;
22234 int lineno, column;
22235 int beg_pos = (int)(p->lex.ptok - p->lex.pbeg);
22236
22237 end_pos = peek_end_expect_token_locations(p)->pos;
22238 lineno = end_pos->lineno;
22239 column = end_pos->column;
22240
22241 if (p->debug) {
22242 rb_parser_printf(p, "enforce_keyword_end check. current: (%d, %d), peek: (%d, %d)\n",
22243 p->ruby_sourceline, beg_pos, lineno, column);
22244 }
22245
22246 if ((p->ruby_sourceline > lineno) && (beg_pos <= column)) {
22247 const struct kwtable *kw;
22248
22249 if ((IS_lex_state(EXPR_DOT)) && (kw = rb_reserved_word(tok(p), toklen(p))) && (kw && kw->id[0] == keyword_end)) {
22250 if (p->debug) rb_parser_printf(p, "enforce_keyword_end is enabled\n");
22251 enforce_keyword_end = 1;
22252 }
22253 }
22254 }
22255#endif
22256
22257 if (is_ascii && (!IS_lex_state(EXPR_DOT) || enforce_keyword_end)) {
22258 const struct kwtable *kw;
22259
22260 /* See if it is a reserved word. */
22261 kw = rb_reserved_word(tok(p), toklen(p));
22262 if (kw) {
22263 enum lex_state_e state = p->lex.state;
22264 if (IS_lex_state_for(state, EXPR_FNAME)) {
22265 SET_LEX_STATE(EXPR_ENDFN);
22266 set_yylval_name(rb_intern2(tok(p), toklen(p)));
22267 return kw->id[0];
22268 }
22269 SET_LEX_STATE(kw->state);
22270 if (IS_lex_state(EXPR_BEG)) {
22271 p->command_start = TRUE;
22272 }
22273 if (kw->id[0] == keyword_do) {
22274 if (lambda_beginning_p()) {
22275 p->lex.lpar_beg = -1; /* make lambda_beginning_p() == FALSE in the body of "-> do ... end" */
22276 return keyword_do_LAMBDA;
22277 }
22278 if (COND_P()) return keyword_do_cond;
22279 if (CMDARG_P() && !IS_lex_state_for(state, EXPR_CMDARG))
22280 return keyword_do_block;
22281 return keyword_do;
22282 }
22283 if (IS_lex_state_for(state, (EXPR_BEG | EXPR_LABELED | EXPR_CLASS)))
22284 return kw->id[0];
22285 else {
22286 if (kw->id[0] != kw->id[1])
22287 SET_LEX_STATE(EXPR_BEG | EXPR_LABEL);
22288 return kw->id[1];
22289 }
22290 }
22291 }
22292
22293 if (IS_lex_state(EXPR_BEG_ANY | EXPR_ARG_ANY | EXPR_DOT)) {
22294 if (cmd_state) {
22295 SET_LEX_STATE(EXPR_CMDARG);
22296 }
22297 else {
22298 SET_LEX_STATE(EXPR_ARG);
22299 }
22300 }
22301 else if (p->lex.state == EXPR_FNAME) {
22302 SET_LEX_STATE(EXPR_ENDFN);
22303 }
22304 else {
22305 SET_LEX_STATE(EXPR_END);
22306 }
22307
22308 ident = tokenize_ident(p);
22309 if (result == tCONSTANT && is_local_id(ident)) result = tIDENTIFIER;
22310 if (!IS_lex_state_for(last_state, EXPR_DOT|EXPR_FNAME) &&
22311 (result == tIDENTIFIER) && /* not EXPR_FNAME, not attrasgn */
22312 (lvar_defined(p, ident) || NUMPARAM_ID_P(ident))) {
22313 SET_LEX_STATE(EXPR_END|EXPR_LABEL);
22314 }
22315 return result;
22316}
22317
22318static void
22319warn_cr(struct parser_params *p)
22320{
22321 if (!p->cr_seen) {
22322 p->cr_seen = TRUE;
22323 /* carried over with p->lex.nextline for nextc() */
22324 rb_warn0("encountered \\r in middle of line, treated as a mere space");
22325 }
22326}
22327
22328static enum yytokentype
22329parser_yylex(struct parser_params *p)
22330{
22331 register int c;
22332 int space_seen = 0;
22333 int cmd_state;
22334 int label;
22335 enum lex_state_e last_state;
22336 int fallthru = FALSE;
22337 int token_seen = p->token_seen;
22338
22339 if (p->lex.strterm) {
22340 if (strterm_is_heredoc(p->lex.strterm)) {
22341 token_flush(p);
22342 return here_document(p, &p->lex.strterm->u.heredoc);
22343 }
22344 else {
22345 token_flush(p);
22346 return parse_string(p, &p->lex.strterm->u.literal);
22347 }
22348 }
22349 cmd_state = p->command_start;
22350 p->command_start = FALSE;
22351 p->token_seen = TRUE;
22352#ifndef RIPPER
22353 token_flush(p);
22354#endif
22355 retry:
22356 last_state = p->lex.state;
22357 switch (c = nextc(p)) {
22358 case '\0': /* NUL */
22359 case '\004': /* ^D */
22360 case '\032': /* ^Z */
22361 case -1: /* end of script. */
22362 p->eofp = 1;
22363#ifndef RIPPER
22364 if (p->end_expect_token_locations) {
22365 pop_end_expect_token_locations(p);
22366 RUBY_SET_YYLLOC_OF_DUMMY_END(*p->yylloc);
22367 return tDUMNY_END;
22368 }
22369#endif
22370 /* Set location for end-of-input because dispatch_scan_event is not called. */
22371 RUBY_SET_YYLLOC(*p->yylloc);
22372 return END_OF_INPUT;
22373
22374 /* white spaces */
22375 case '\r':
22376 warn_cr(p);
22377 /* fall through */
22378 case ' ': case '\t': case '\f':
22379 case '\13': /* '\v' */
22380 space_seen = 1;
22381 while ((c = nextc(p))) {
22382 switch (c) {
22383 case '\r':
22384 warn_cr(p);
22385 /* fall through */
22386 case ' ': case '\t': case '\f':
22387 case '\13': /* '\v' */
22388 break;
22389 default:
22390 goto outofloop;
22391 }
22392 }
22393 outofloop:
22394 pushback(p, c);
22395 dispatch_scan_event(p, tSP);
22396#ifndef RIPPER
22397 token_flush(p);
22398#endif
22399 goto retry;
22400
22401 case '#': /* it's a comment */
22402 p->token_seen = token_seen;
22403 const char *const pcur = p->lex.pcur, *const ptok = p->lex.ptok;
22404 /* no magic_comment in shebang line */
22405 if (!parser_magic_comment(p, p->lex.pcur, p->lex.pend - p->lex.pcur)) {
22406 if (comment_at_top(p)) {
22407 set_file_encoding(p, p->lex.pcur, p->lex.pend);
22408 }
22409 }
22410 p->lex.pcur = pcur, p->lex.ptok = ptok;
22411 lex_goto_eol(p);
22412 dispatch_scan_event(p, tCOMMENT);
22413 fallthru = TRUE;
22414 /* fall through */
22415 case '\n':
22416 p->token_seen = token_seen;
22417 rb_parser_string_t *prevline = p->lex.lastline;
22418 c = (IS_lex_state(EXPR_BEG|EXPR_CLASS|EXPR_FNAME|EXPR_DOT) &&
22419 !IS_lex_state(EXPR_LABELED));
22420 if (c || IS_lex_state_all(EXPR_ARG|EXPR_LABELED)) {
22421 if (!fallthru) {
22422 dispatch_scan_event(p, tIGNORED_NL);
22423 }
22424 fallthru = FALSE;
22425 if (!c && p->ctxt.in_kwarg) {
22426 goto normal_newline;
22427 }
22428 goto retry;
22429 }
22430 while (1) {
22431 switch (c = nextc(p)) {
22432 case ' ': case '\t': case '\f': case '\r':
22433 case '\13': /* '\v' */
22434 space_seen = 1;
22435 break;
22436 case '#':
22437 pushback(p, c);
22438 if (space_seen) {
22439 dispatch_scan_event(p, tSP);
22440 token_flush(p);
22441 }
22442 goto retry;
22443 case 'a':
22444 if (peek_word_at(p, "nd", 2, 0)) goto leading_logical;
22445 goto bol;
22446 case 'o':
22447 if (peek_word_at(p, "r", 1, 0)) goto leading_logical;
22448 goto bol;
22449 case '|':
22450 if (peek(p, '|')) goto leading_logical;
22451 goto bol;
22452 case '&':
22453 if (peek(p, '&')) {
22454 leading_logical:
22455 pushback(p, c);
22456 dispatch_delayed_token(p, tIGNORED_NL);
22457 cmd_state = FALSE;
22458 goto retry;
22459 }
22460 /* fall through */
22461 case '.': {
22462 dispatch_delayed_token(p, tIGNORED_NL);
22463 if (peek(p, '.') == (c == '&')) {
22464 pushback(p, c);
22465 dispatch_scan_event(p, tSP);
22466 goto retry;
22467 }
22468 }
22469 bol:
22470 default:
22471 p->ruby_sourceline--;
22472 p->lex.nextline = p->lex.lastline;
22473 set_lastline(p, prevline);
22474 case -1: /* EOF no decrement*/
22475 if (c == -1 && space_seen) {
22476 dispatch_scan_event(p, tSP);
22477 }
22478 lex_goto_eol(p);
22479 if (c != -1) {
22480 token_flush(p);
22481 RUBY_SET_YYLLOC(*p->yylloc);
22482 }
22483 goto normal_newline;
22484 }
22485 }
22486 normal_newline:
22487 p->command_start = TRUE;
22488 SET_LEX_STATE(EXPR_BEG);
22489 return '\n';
22490
22491 case '*':
22492 if ((c = nextc(p)) == '*') {
22493 if ((c = nextc(p)) == '=') {
22494 set_yylval_id(idPow);
22495 SET_LEX_STATE(EXPR_BEG);
22496 return tOP_ASGN;
22497 }
22498 pushback(p, c);
22499 if (IS_SPCARG(c)) {
22500 rb_warning0("'**' interpreted as argument prefix");
22501 c = tDSTAR;
22502 }
22503 else if (IS_BEG()) {
22504 c = tDSTAR;
22505 }
22506 else {
22507 c = warn_balanced((enum ruby_method_ids)tPOW, "**", "argument prefix");
22508 }
22509 }
22510 else {
22511 if (c == '=') {
22512 set_yylval_id('*');
22513 SET_LEX_STATE(EXPR_BEG);
22514 return tOP_ASGN;
22515 }
22516 pushback(p, c);
22517 if (IS_SPCARG(c)) {
22518 rb_warning0("'*' interpreted as argument prefix");
22519 c = tSTAR;
22520 }
22521 else if (IS_BEG()) {
22522 c = tSTAR;
22523 }
22524 else {
22525 c = warn_balanced('*', "*", "argument prefix");
22526 }
22527 }
22528 SET_LEX_STATE(IS_AFTER_OPERATOR() ? EXPR_ARG : EXPR_BEG);
22529 return c;
22530
22531 case '!':
22532 c = nextc(p);
22533 if (IS_AFTER_OPERATOR()) {
22534 SET_LEX_STATE(EXPR_ARG);
22535 if (c == '@') {
22536 return '!';
22537 }
22538 }
22539 else {
22540 SET_LEX_STATE(EXPR_BEG);
22541 }
22542 if (c == '=') {
22543 return tNEQ;
22544 }
22545 if (c == '~') {
22546 return tNMATCH;
22547 }
22548 pushback(p, c);
22549 return '!';
22550
22551 case '=':
22552 if (was_bol(p)) {
22553 /* skip embedded rd document */
22554 if (word_match_p(p, "begin", 5)) {
22555 int first_p = TRUE;
22556
22557 lex_goto_eol(p);
22558 dispatch_scan_event(p, tEMBDOC_BEG);
22559 for (;;) {
22560 lex_goto_eol(p);
22561 if (!first_p) {
22562 dispatch_scan_event(p, tEMBDOC);
22563 }
22564 first_p = FALSE;
22565 c = nextc(p);
22566 if (c == -1) {
22567 compile_error(p, "embedded document meets end of file");
22568 return END_OF_INPUT;
22569 }
22570 if (c == '=' && word_match_p(p, "end", 3)) {
22571 break;
22572 }
22573 pushback(p, c);
22574 }
22575 lex_goto_eol(p);
22576 dispatch_scan_event(p, tEMBDOC_END);
22577 goto retry;
22578 }
22579 }
22580
22581 SET_LEX_STATE(IS_AFTER_OPERATOR() ? EXPR_ARG : EXPR_BEG);
22582 if ((c = nextc(p)) == '=') {
22583 if ((c = nextc(p)) == '=') {
22584 return tEQQ;
22585 }
22586 pushback(p, c);
22587 return tEQ;
22588 }
22589 if (c == '~') {
22590 return tMATCH;
22591 }
22592 else if (c == '>') {
22593 return tASSOC;
22594 }
22595 pushback(p, c);
22596 return '=';
22597
22598 case '<':
22599 c = nextc(p);
22600 if (c == '<' &&
22601 !IS_lex_state(EXPR_DOT | EXPR_CLASS) &&
22602 !IS_END() &&
22603 (!IS_ARG() || IS_lex_state(EXPR_LABELED) || space_seen)) {
22604 enum yytokentype token = heredoc_identifier(p);
22605 if (token) return token < 0 ? 0 : token;
22606 }
22607 if (IS_AFTER_OPERATOR()) {
22608 SET_LEX_STATE(EXPR_ARG);
22609 }
22610 else {
22611 if (IS_lex_state(EXPR_CLASS))
22612 p->command_start = TRUE;
22613 SET_LEX_STATE(EXPR_BEG);
22614 }
22615 if (c == '=') {
22616 if ((c = nextc(p)) == '>') {
22617 return tCMP;
22618 }
22619 pushback(p, c);
22620 return tLEQ;
22621 }
22622 if (c == '<') {
22623 if ((c = nextc(p)) == '=') {
22624 set_yylval_id(idLTLT);
22625 SET_LEX_STATE(EXPR_BEG);
22626 return tOP_ASGN;
22627 }
22628 pushback(p, c);
22629 return warn_balanced((enum ruby_method_ids)tLSHFT, "<<", "here document");
22630 }
22631 pushback(p, c);
22632 return '<';
22633
22634 case '>':
22635 SET_LEX_STATE(IS_AFTER_OPERATOR() ? EXPR_ARG : EXPR_BEG);
22636 if ((c = nextc(p)) == '=') {
22637 return tGEQ;
22638 }
22639 if (c == '>') {
22640 if ((c = nextc(p)) == '=') {
22641 set_yylval_id(idGTGT);
22642 SET_LEX_STATE(EXPR_BEG);
22643 return tOP_ASGN;
22644 }
22645 pushback(p, c);
22646 return tRSHFT;
22647 }
22648 pushback(p, c);
22649 return '>';
22650
22651 case '"':
22652 label = (IS_LABEL_POSSIBLE() ? str_label : 0);
22653 p->lex.strterm = NEW_STRTERM(str_dquote | label, '"', 0);
22654 p->lex.ptok = p->lex.pcur-1;
22655 return tSTRING_BEG;
22656
22657 case '`':
22658 if (IS_lex_state(EXPR_FNAME)) {
22659 SET_LEX_STATE(EXPR_ENDFN);
22660 return c;
22661 }
22662 if (IS_lex_state(EXPR_DOT)) {
22663 if (cmd_state)
22664 SET_LEX_STATE(EXPR_CMDARG);
22665 else
22666 SET_LEX_STATE(EXPR_ARG);
22667 return c;
22668 }
22669 p->lex.strterm = NEW_STRTERM(str_xquote, '`', 0);
22670 return tXSTRING_BEG;
22671
22672 case '\'':
22673 label = (IS_LABEL_POSSIBLE() ? str_label : 0);
22674 p->lex.strterm = NEW_STRTERM(str_squote | label, '\'', 0);
22675 p->lex.ptok = p->lex.pcur-1;
22676 return tSTRING_BEG;
22677
22678 case '?':
22679 return parse_qmark(p, space_seen);
22680
22681 case '&':
22682 if ((c = nextc(p)) == '&') {
22683 SET_LEX_STATE(EXPR_BEG);
22684 if ((c = nextc(p)) == '=') {
22685 set_yylval_id(idANDOP);
22686 SET_LEX_STATE(EXPR_BEG);
22687 return tOP_ASGN;
22688 }
22689 pushback(p, c);
22690 return tANDOP;
22691 }
22692 else if (c == '=') {
22693 set_yylval_id('&');
22694 SET_LEX_STATE(EXPR_BEG);
22695 return tOP_ASGN;
22696 }
22697 else if (c == '.') {
22698 set_yylval_id(idANDDOT);
22699 SET_LEX_STATE(EXPR_DOT);
22700 return tANDDOT;
22701 }
22702 pushback(p, c);
22703 if (IS_SPCARG(c)) {
22704 if ((c != ':') ||
22705 (c = peekc_n(p, 1)) == -1 ||
22706 !(c == '\'' || c == '"' ||
22707 is_identchar(p, (p->lex.pcur+1), p->lex.pend, p->enc))) {
22708 rb_warning0("'&' interpreted as argument prefix");
22709 }
22710 c = tAMPER;
22711 }
22712 else if (IS_BEG()) {
22713 c = tAMPER;
22714 }
22715 else {
22716 c = warn_balanced('&', "&", "argument prefix");
22717 }
22718 SET_LEX_STATE(IS_AFTER_OPERATOR() ? EXPR_ARG : EXPR_BEG);
22719 return c;
22720
22721 case '|':
22722 if ((c = nextc(p)) == '|') {
22723 SET_LEX_STATE(EXPR_BEG);
22724 if ((c = nextc(p)) == '=') {
22725 set_yylval_id(idOROP);
22726 SET_LEX_STATE(EXPR_BEG);
22727 return tOP_ASGN;
22728 }
22729 pushback(p, c);
22730 if (IS_lex_state_for(last_state, EXPR_BEG)) {
22731 c = '|';
22732 pushback(p, '|');
22733 return c;
22734 }
22735 return tOROP;
22736 }
22737 if (c == '=') {
22738 set_yylval_id('|');
22739 SET_LEX_STATE(EXPR_BEG);
22740 return tOP_ASGN;
22741 }
22742 SET_LEX_STATE(IS_AFTER_OPERATOR() ? EXPR_ARG : EXPR_BEG|EXPR_LABEL);
22743 pushback(p, c);
22744 return '|';
22745
22746 case '+':
22747 c = nextc(p);
22748 if (IS_AFTER_OPERATOR()) {
22749 SET_LEX_STATE(EXPR_ARG);
22750 if (c == '@') {
22751 return tUPLUS;
22752 }
22753 pushback(p, c);
22754 return '+';
22755 }
22756 if (c == '=') {
22757 set_yylval_id('+');
22758 SET_LEX_STATE(EXPR_BEG);
22759 return tOP_ASGN;
22760 }
22761 if (IS_BEG() || (IS_SPCARG(c) && arg_ambiguous(p, '+'))) {
22762 SET_LEX_STATE(EXPR_BEG);
22763 pushback(p, c);
22764 if (c != -1 && ISDIGIT(c)) {
22765 return parse_numeric(p, '+');
22766 }
22767 return tUPLUS;
22768 }
22769 SET_LEX_STATE(EXPR_BEG);
22770 pushback(p, c);
22771 return warn_balanced('+', "+", "unary operator");
22772
22773 case '-':
22774 c = nextc(p);
22775 if (IS_AFTER_OPERATOR()) {
22776 SET_LEX_STATE(EXPR_ARG);
22777 if (c == '@') {
22778 return tUMINUS;
22779 }
22780 pushback(p, c);
22781 return '-';
22782 }
22783 if (c == '=') {
22784 set_yylval_id('-');
22785 SET_LEX_STATE(EXPR_BEG);
22786 return tOP_ASGN;
22787 }
22788 if (c == '>') {
22789 SET_LEX_STATE(EXPR_ENDFN);
22790 yylval.num = p->lex.lpar_beg;
22791 p->lex.lpar_beg = p->lex.paren_nest;
22792 return tLAMBDA;
22793 }
22794 if (IS_BEG() || (IS_SPCARG(c) && arg_ambiguous(p, '-'))) {
22795 SET_LEX_STATE(EXPR_BEG);
22796 pushback(p, c);
22797 if (c != -1 && ISDIGIT(c)) {
22798 return tUMINUS_NUM;
22799 }
22800 return tUMINUS;
22801 }
22802 SET_LEX_STATE(EXPR_BEG);
22803 pushback(p, c);
22804 return warn_balanced('-', "-", "unary operator");
22805
22806 case '.': {
22807 int is_beg = IS_BEG();
22808 SET_LEX_STATE(EXPR_BEG);
22809 if ((c = nextc(p)) == '.') {
22810 if ((c = nextc(p)) == '.') {
22811 if (p->ctxt.in_argdef || IS_LABEL_POSSIBLE()) {
22812 SET_LEX_STATE(EXPR_ENDARG);
22813 return tBDOT3;
22814 }
22815 if (p->lex.paren_nest == 0 && looking_at_eol_p(p)) {
22816 rb_warn0("... at EOL, should be parenthesized?");
22817 }
22818 return is_beg ? tBDOT3 : tDOT3;
22819 }
22820 pushback(p, c);
22821 return is_beg ? tBDOT2 : tDOT2;
22822 }
22823 pushback(p, c);
22824 if (c != -1 && ISDIGIT(c)) {
22825 char prev = p->lex.pcur-1 > p->lex.pbeg ? *(p->lex.pcur-2) : 0;
22826 parse_numeric(p, '.');
22827 if (ISDIGIT(prev)) {
22828 yyerror0("unexpected fraction part after numeric literal");
22829 }
22830 else {
22831 yyerror0("no .<digit> floating literal anymore; put 0 before dot");
22832 }
22833 SET_LEX_STATE(EXPR_END);
22834 p->lex.ptok = p->lex.pcur;
22835 goto retry;
22836 }
22837 set_yylval_id('.');
22838 SET_LEX_STATE(EXPR_DOT);
22839 return '.';
22840 }
22841
22842 case '0': case '1': case '2': case '3': case '4':
22843 case '5': case '6': case '7': case '8': case '9':
22844 return parse_numeric(p, c);
22845
22846 case ')':
22847 COND_POP();
22848 CMDARG_POP();
22849 SET_LEX_STATE(EXPR_ENDFN);
22850 p->lex.paren_nest--;
22851 return c;
22852
22853 case ']':
22854 COND_POP();
22855 CMDARG_POP();
22856 SET_LEX_STATE(EXPR_END);
22857 p->lex.paren_nest--;
22858 return c;
22859
22860 case '}':
22861 /* tSTRING_DEND does COND_POP and CMDARG_POP in the yacc's rule */
22862 if (!p->lex.brace_nest--) return tSTRING_DEND;
22863 COND_POP();
22864 CMDARG_POP();
22865 SET_LEX_STATE(EXPR_END);
22866 p->lex.paren_nest--;
22867 return c;
22868
22869 case ':':
22870 c = nextc(p);
22871 if (c == ':') {
22872 if (IS_BEG() || IS_lex_state(EXPR_CLASS) || IS_SPCARG(-1)) {
22873 SET_LEX_STATE(EXPR_BEG);
22874 return tCOLON3;
22875 }
22876 set_yylval_id(idCOLON2);
22877 SET_LEX_STATE(EXPR_DOT);
22878 return tCOLON2;
22879 }
22880 if (IS_END() || ISSPACE(c) || c == '#') {
22881 pushback(p, c);
22882 c = warn_balanced(':', ":", "symbol literal");
22883 SET_LEX_STATE(EXPR_BEG);
22884 return c;
22885 }
22886 switch (c) {
22887 case '\'':
22888 p->lex.strterm = NEW_STRTERM(str_ssym, c, 0);
22889 break;
22890 case '"':
22891 p->lex.strterm = NEW_STRTERM(str_dsym, c, 0);
22892 break;
22893 default:
22894 pushback(p, c);
22895 break;
22896 }
22897 SET_LEX_STATE(EXPR_FNAME);
22898 return tSYMBEG;
22899
22900 case '/':
22901 if (IS_BEG()) {
22902 p->lex.strterm = NEW_STRTERM(str_regexp, '/', 0);
22903 return tREGEXP_BEG;
22904 }
22905 if ((c = nextc(p)) == '=') {
22906 set_yylval_id('/');
22907 SET_LEX_STATE(EXPR_BEG);
22908 return tOP_ASGN;
22909 }
22910 pushback(p, c);
22911 if (IS_SPCARG(c)) {
22912 arg_ambiguous(p, '/');
22913 p->lex.strterm = NEW_STRTERM(str_regexp, '/', 0);
22914 return tREGEXP_BEG;
22915 }
22916 SET_LEX_STATE(IS_AFTER_OPERATOR() ? EXPR_ARG : EXPR_BEG);
22917 return warn_balanced('/', "/", "regexp literal");
22918
22919 case '^':
22920 if ((c = nextc(p)) == '=') {
22921 set_yylval_id('^');
22922 SET_LEX_STATE(EXPR_BEG);
22923 return tOP_ASGN;
22924 }
22925 SET_LEX_STATE(IS_AFTER_OPERATOR() ? EXPR_ARG : EXPR_BEG);
22926 pushback(p, c);
22927 return '^';
22928
22929 case ';':
22930 SET_LEX_STATE(EXPR_BEG);
22931 p->command_start = TRUE;
22932 return ';';
22933
22934 case ',':
22935 SET_LEX_STATE(EXPR_BEG|EXPR_LABEL);
22936 return ',';
22937
22938 case '~':
22939 if (IS_AFTER_OPERATOR()) {
22940 if ((c = nextc(p)) != '@') {
22941 pushback(p, c);
22942 }
22943 SET_LEX_STATE(EXPR_ARG);
22944 }
22945 else {
22946 SET_LEX_STATE(EXPR_BEG);
22947 }
22948 return '~';
22949
22950 case '(':
22951 if (IS_BEG()) {
22952 c = tLPAREN;
22953 }
22954 else if (!space_seen) {
22955 /* foo( ... ) => method call, no ambiguity */
22956 }
22957 else if (IS_ARG() || IS_lex_state_all(EXPR_END|EXPR_LABEL)) {
22958 c = tLPAREN_ARG;
22959 }
22960 else if (IS_lex_state(EXPR_ENDFN) && !lambda_beginning_p()) {
22961 rb_warning0("parentheses after method name is interpreted as "
22962 "an argument list, not a decomposed argument");
22963 }
22964 p->lex.paren_nest++;
22965 COND_PUSH(0);
22966 CMDARG_PUSH(0);
22967 SET_LEX_STATE(EXPR_BEG|EXPR_LABEL);
22968 return c;
22969
22970 case '[':
22971 p->lex.paren_nest++;
22972 if (IS_AFTER_OPERATOR()) {
22973 if ((c = nextc(p)) == ']') {
22974 p->lex.paren_nest--;
22975 SET_LEX_STATE(EXPR_ARG);
22976 if ((c = nextc(p)) == '=') {
22977 return tASET;
22978 }
22979 pushback(p, c);
22980 return tAREF;
22981 }
22982 pushback(p, c);
22983 SET_LEX_STATE(EXPR_ARG|EXPR_LABEL);
22984 return '[';
22985 }
22986 else if (IS_BEG()) {
22987 c = tLBRACK;
22988 }
22989 else if (IS_ARG() && (space_seen || IS_lex_state(EXPR_LABELED))) {
22990 c = tLBRACK;
22991 }
22992 SET_LEX_STATE(EXPR_BEG|EXPR_LABEL);
22993 COND_PUSH(0);
22994 CMDARG_PUSH(0);
22995 return c;
22996
22997 case '{':
22998 ++p->lex.brace_nest;
22999 if (lambda_beginning_p())
23000 c = tLAMBEG;
23001 else if (IS_lex_state(EXPR_LABELED))
23002 c = tLBRACE; /* hash */
23003 else if (IS_lex_state(EXPR_ARG_ANY | EXPR_END | EXPR_ENDFN))
23004 c = '{'; /* block (primary) */
23005 else if (IS_lex_state(EXPR_ENDARG))
23006 c = tLBRACE_ARG; /* block (expr) */
23007 else
23008 c = tLBRACE; /* hash */
23009 if (c != tLBRACE) {
23010 p->command_start = TRUE;
23011 SET_LEX_STATE(EXPR_BEG);
23012 }
23013 else {
23014 SET_LEX_STATE(EXPR_BEG|EXPR_LABEL);
23015 }
23016 ++p->lex.paren_nest; /* after lambda_beginning_p() */
23017 COND_PUSH(0);
23018 CMDARG_PUSH(0);
23019 return c;
23020
23021 case '\\':
23022 c = nextc(p);
23023 if (c == '\n') {
23024 space_seen = 1;
23025 dispatch_scan_event(p, tSP);
23026 goto retry; /* skip \\n */
23027 }
23028 if (c == ' ') return tSP;
23029 if (ISSPACE(c)) return c;
23030 pushback(p, c);
23031 return '\\';
23032
23033 case '%':
23034 return parse_percent(p, space_seen, last_state);
23035
23036 case '$':
23037 return parse_gvar(p, last_state);
23038
23039 case '@':
23040 return parse_atmark(p, last_state);
23041
23042 case '_':
23043 if (was_bol(p) && whole_match_p(p, "__END__", 7, 0)) {
23044 p->ruby__end__seen = 1;
23045 p->eofp = 1;
23046#ifdef RIPPER
23047 lex_goto_eol(p);
23048 dispatch_scan_event(p, k__END__);
23049#endif
23050 return END_OF_INPUT;
23051 }
23052 newtok(p);
23053 break;
23054
23055 default:
23056 if (!parser_is_identchar(p)) {
23057 compile_error(p, "Invalid char '\\x%02X' in expression", c);
23058 token_flush(p);
23059 goto retry;
23060 }
23061
23062 newtok(p);
23063 break;
23064 }
23065
23066 return parse_ident(p, c, cmd_state);
23067}
23068
23069static enum yytokentype
23070yylex(YYSTYPE *lval, YYLTYPE *yylloc, struct parser_params *p)
23071{
23072 enum yytokentype t;
23073
23074 p->lval = lval;
23075 lval->node = 0;
23076 p->yylloc = yylloc;
23077
23078 t = parser_yylex(p);
23079
23080 if (has_delayed_token(p))
23081 dispatch_delayed_token(p, t);
23082 else if (t != END_OF_INPUT)
23083 dispatch_scan_event(p, t);
23084
23085 return t;
23086}
23087
23088#define LVAR_USED ((ID)1 << (sizeof(ID) * CHAR_BIT - 1))
23089
23090static NODE*
23091node_new_internal(struct parser_params *p, enum node_type type, size_t size, size_t alignment)
23092{
23093 NODE *n = rb_ast_newnode(p->ast, type, size, alignment);
23094
23095 rb_node_init(n, type);
23096 return n;
23097}
23098
23099static NODE *
23100nd_set_loc(NODE *nd, const YYLTYPE *loc)
23101{
23102 nd->nd_loc = *loc;
23103 nd_set_line(nd, loc->beg_pos.lineno);
23104 return nd;
23105}
23106
23107static NODE*
23108node_newnode(struct parser_params *p, enum node_type type, size_t size, size_t alignment, const rb_code_location_t *loc)
23109{
23110 NODE *n = node_new_internal(p, type, size, alignment);
23111
23112 nd_set_loc(n, loc);
23113 nd_set_node_id(n, parser_get_node_id(p));
23114 return n;
23115}
23116
23117#define NODE_NEWNODE(node_type, type, loc) (type *)(node_newnode(p, node_type, sizeof(type), RUBY_ALIGNOF(type), loc))
23118
23119static rb_node_scope_t *
23120rb_node_scope_new(struct parser_params *p, rb_node_args_t *nd_args, NODE *nd_body, NODE *nd_parent, const YYLTYPE *loc)
23121{
23122 rb_ast_id_table_t *nd_tbl;
23123 nd_tbl = local_tbl(p);
23124 rb_node_scope_t *n = NODE_NEWNODE(NODE_SCOPE, rb_node_scope_t, loc);
23125 n->nd_tbl = nd_tbl;
23126 n->nd_body = nd_body;
23127 n->nd_parent = nd_parent;
23128 n->nd_args = nd_args;
23129
23130 return n;
23131}
23132
23133static rb_node_scope_t *
23134rb_node_scope_new2(struct parser_params *p, rb_ast_id_table_t *nd_tbl, rb_node_args_t *nd_args, NODE *nd_body, NODE *nd_parent, const YYLTYPE *loc)
23135{
23136 rb_node_scope_t *n = NODE_NEWNODE(NODE_SCOPE, rb_node_scope_t, loc);
23137 n->nd_tbl = nd_tbl;
23138 n->nd_body = nd_body;
23139 n->nd_parent = nd_parent;
23140 n->nd_args = nd_args;
23141
23142 return n;
23143}
23144
23145static rb_node_defn_t *
23146rb_node_defn_new(struct parser_params *p, ID nd_mid, NODE *nd_defn, const YYLTYPE *loc)
23147{
23148 rb_node_defn_t *n = NODE_NEWNODE(NODE_DEFN, rb_node_defn_t, loc);
23149 n->nd_mid = nd_mid;
23150 n->nd_defn = nd_defn;
23151
23152 return n;
23153}
23154
23155static rb_node_defs_t *
23156rb_node_defs_new(struct parser_params *p, NODE *nd_recv, ID nd_mid, NODE *nd_defn, const YYLTYPE *loc)
23157{
23158 rb_node_defs_t *n = NODE_NEWNODE(NODE_DEFS, rb_node_defs_t, loc);
23159 n->nd_recv = nd_recv;
23160 n->nd_mid = nd_mid;
23161 n->nd_defn = nd_defn;
23162
23163 return n;
23164}
23165
23166static rb_node_block_t *
23167rb_node_block_new(struct parser_params *p, NODE *nd_head, const YYLTYPE *loc)
23168{
23169 rb_node_block_t *n = NODE_NEWNODE(NODE_BLOCK, rb_node_block_t, loc);
23170 n->nd_head = nd_head;
23171 n->nd_end = (NODE *)n;
23172 n->nd_next = 0;
23173
23174 return n;
23175}
23176
23177static rb_node_for_t *
23178rb_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)
23179{
23180 rb_node_for_t *n = NODE_NEWNODE(NODE_FOR, rb_node_for_t, loc);
23181 n->nd_body = nd_body;
23182 n->nd_iter = nd_iter;
23183 n->for_keyword_loc = *for_keyword_loc;
23184 n->in_keyword_loc = *in_keyword_loc;
23185 n->do_keyword_loc = *do_keyword_loc;
23186 n->end_keyword_loc = *end_keyword_loc;
23187
23188 return n;
23189}
23190
23191static rb_node_for_masgn_t *
23192rb_node_for_masgn_new(struct parser_params *p, NODE *nd_var, const YYLTYPE *loc)
23193{
23194 rb_node_for_masgn_t *n = NODE_NEWNODE(NODE_FOR_MASGN, rb_node_for_masgn_t, loc);
23195 n->nd_var = nd_var;
23196
23197 return n;
23198}
23199
23200static rb_node_retry_t *
23201rb_node_retry_new(struct parser_params *p, const YYLTYPE *loc)
23202{
23203 rb_node_retry_t *n = NODE_NEWNODE(NODE_RETRY, rb_node_retry_t, loc);
23204
23205 return n;
23206}
23207
23208static rb_node_begin_t *
23209rb_node_begin_new(struct parser_params *p, NODE *nd_body, const YYLTYPE *loc)
23210{
23211 rb_node_begin_t *n = NODE_NEWNODE(NODE_BEGIN, rb_node_begin_t, loc);
23212 n->nd_body = nd_body;
23213
23214 return n;
23215}
23216
23217static rb_node_rescue_t *
23218rb_node_rescue_new(struct parser_params *p, NODE *nd_head, NODE *nd_resq, NODE *nd_else, const YYLTYPE *loc)
23219{
23220 rb_node_rescue_t *n = NODE_NEWNODE(NODE_RESCUE, rb_node_rescue_t, loc);
23221 n->nd_head = nd_head;
23222 n->nd_resq = nd_resq;
23223 n->nd_else = nd_else;
23224
23225 return n;
23226}
23227
23228static rb_node_resbody_t *
23229rb_node_resbody_new(struct parser_params *p, NODE *nd_args, NODE *nd_exc_var, NODE *nd_body, NODE *nd_next, const YYLTYPE *loc)
23230{
23231 rb_node_resbody_t *n = NODE_NEWNODE(NODE_RESBODY, rb_node_resbody_t, loc);
23232 n->nd_args = nd_args;
23233 n->nd_exc_var = nd_exc_var;
23234 n->nd_body = nd_body;
23235 n->nd_next = nd_next;
23236
23237 return n;
23238}
23239
23240static rb_node_ensure_t *
23241rb_node_ensure_new(struct parser_params *p, NODE *nd_head, NODE *nd_ensr, const YYLTYPE *loc)
23242{
23243 rb_node_ensure_t *n = NODE_NEWNODE(NODE_ENSURE, rb_node_ensure_t, loc);
23244 n->nd_head = nd_head;
23245 n->nd_ensr = nd_ensr;
23246
23247 return n;
23248}
23249
23250static rb_node_and_t *
23251rb_node_and_new(struct parser_params *p, NODE *nd_1st, NODE *nd_2nd, const YYLTYPE *loc, const YYLTYPE *operator_loc)
23252{
23253 rb_node_and_t *n = NODE_NEWNODE(NODE_AND, rb_node_and_t, loc);
23254 n->nd_1st = nd_1st;
23255 n->nd_2nd = nd_2nd;
23256 n->operator_loc = *operator_loc;
23257
23258 return n;
23259}
23260
23261static rb_node_or_t *
23262rb_node_or_new(struct parser_params *p, NODE *nd_1st, NODE *nd_2nd, const YYLTYPE *loc, const YYLTYPE *operator_loc)
23263{
23264 rb_node_or_t *n = NODE_NEWNODE(NODE_OR, rb_node_or_t, loc);
23265 n->nd_1st = nd_1st;
23266 n->nd_2nd = nd_2nd;
23267 n->operator_loc = *operator_loc;
23268
23269 return n;
23270}
23271
23272static rb_node_return_t *
23273rb_node_return_new(struct parser_params *p, NODE *nd_stts, const YYLTYPE *loc, const YYLTYPE *keyword_loc)
23274{
23275 rb_node_return_t *n = NODE_NEWNODE(NODE_RETURN, rb_node_return_t, loc);
23276 n->nd_stts = nd_stts;
23277 n->keyword_loc = *keyword_loc;
23278 return n;
23279}
23280
23281static rb_node_yield_t *
23282rb_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)
23283{
23284 if (nd_head) no_blockarg(p, nd_head);
23285
23286 rb_node_yield_t *n = NODE_NEWNODE(NODE_YIELD, rb_node_yield_t, loc);
23287 n->nd_head = nd_head;
23288 n->keyword_loc = *keyword_loc;
23289 n->lparen_loc = *lparen_loc;
23290 n->rparen_loc = *rparen_loc;
23291
23292 return n;
23293}
23294
23295static rb_node_if_t *
23296rb_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)
23297{
23298 rb_node_if_t *n = NODE_NEWNODE(NODE_IF, rb_node_if_t, loc);
23299 n->nd_cond = nd_cond;
23300 n->nd_body = nd_body;
23301 n->nd_else = nd_else;
23302 n->if_keyword_loc = *if_keyword_loc;
23303 n->then_keyword_loc = *then_keyword_loc;
23304 n->end_keyword_loc = *end_keyword_loc;
23305
23306 return n;
23307}
23308
23309static rb_node_unless_t *
23310rb_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)
23311{
23312 rb_node_unless_t *n = NODE_NEWNODE(NODE_UNLESS, rb_node_unless_t, loc);
23313 n->nd_cond = nd_cond;
23314 n->nd_body = nd_body;
23315 n->nd_else = nd_else;
23316 n->keyword_loc = *keyword_loc;
23317 n->then_keyword_loc = *then_keyword_loc;
23318 n->end_keyword_loc = *end_keyword_loc;
23319
23320 return n;
23321}
23322
23323static rb_node_class_t *
23324rb_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)
23325{
23326 /* Keep the order of node creation */
23327 NODE *scope = NEW_SCOPE(0, nd_body, NULL, loc);
23328 rb_node_class_t *n = NODE_NEWNODE(NODE_CLASS, rb_node_class_t, loc);
23329 RNODE_SCOPE(scope)->nd_parent = &n->node;
23330 n->nd_cpath = nd_cpath;
23331 n->nd_body = scope;
23332 n->nd_super = nd_super;
23333 n->class_keyword_loc = *class_keyword_loc;
23334 n->inheritance_operator_loc = *inheritance_operator_loc;
23335 n->end_keyword_loc = *end_keyword_loc;
23336
23337 return n;
23338}
23339
23340static rb_node_sclass_t *
23341rb_node_sclass_new(struct parser_params *p, NODE *nd_recv, NODE *nd_body, const YYLTYPE *loc, const YYLTYPE *class_keyword_loc, const YYLTYPE *operator_loc, const YYLTYPE *end_keyword_loc)
23342{
23343 /* Keep the order of node creation */
23344 NODE *scope = NEW_SCOPE(0, nd_body, NULL, loc);
23345 rb_node_sclass_t *n = NODE_NEWNODE(NODE_SCLASS, rb_node_sclass_t, loc);
23346 RNODE_SCOPE(scope)->nd_parent = &n->node;
23347 n->nd_recv = nd_recv;
23348 n->nd_body = scope;
23349 n->class_keyword_loc = *class_keyword_loc;
23350 n->operator_loc = *operator_loc;
23351 n->end_keyword_loc = *end_keyword_loc;
23352
23353 return n;
23354}
23355
23356static rb_node_module_t *
23357rb_node_module_new(struct parser_params *p, NODE *nd_cpath, NODE *nd_body, const YYLTYPE *loc, const YYLTYPE *module_keyword_loc, const YYLTYPE *end_keyword_loc)
23358{
23359 /* Keep the order of node creation */
23360 NODE *scope = NEW_SCOPE(0, nd_body, NULL, loc);
23361 rb_node_module_t *n = NODE_NEWNODE(NODE_MODULE, rb_node_module_t, loc);
23362 RNODE_SCOPE(scope)->nd_parent = &n->node;
23363 n->nd_cpath = nd_cpath;
23364 n->nd_body = scope;
23365 n->module_keyword_loc = *module_keyword_loc;
23366 n->end_keyword_loc = *end_keyword_loc;
23367
23368 return n;
23369}
23370
23371static rb_node_iter_t *
23372rb_node_iter_new(struct parser_params *p, rb_node_args_t *nd_args, NODE *nd_body, const YYLTYPE *loc)
23373{
23374 /* Keep the order of node creation */
23375 NODE *scope = NEW_SCOPE(nd_args, nd_body, NULL, loc);
23376 rb_node_iter_t *n = NODE_NEWNODE(NODE_ITER, rb_node_iter_t, loc);
23377 RNODE_SCOPE(scope)->nd_parent = &n->node;
23378 n->nd_body = scope;
23379 n->nd_iter = 0;
23380
23381 return n;
23382}
23383
23384static rb_node_lambda_t *
23385rb_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)
23386{
23387 /* Keep the order of node creation */
23388 NODE *scope = NEW_SCOPE(nd_args, nd_body, NULL, loc);
23389 YYLTYPE lambda_loc = code_loc_gen(operator_loc, closing_loc);
23390 rb_node_lambda_t *n = NODE_NEWNODE(NODE_LAMBDA, rb_node_lambda_t, &lambda_loc);
23391 RNODE_SCOPE(scope)->nd_parent = &n->node;
23392 n->nd_body = scope;
23393 n->operator_loc = *operator_loc;
23394 n->opening_loc = *opening_loc;
23395 n->closing_loc = *closing_loc;
23396
23397 return n;
23398}
23399
23400static rb_node_case_t *
23401rb_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)
23402{
23403 rb_node_case_t *n = NODE_NEWNODE(NODE_CASE, rb_node_case_t, loc);
23404 n->nd_head = nd_head;
23405 n->nd_body = nd_body;
23406 n->case_keyword_loc = *case_keyword_loc;
23407 n->end_keyword_loc = *end_keyword_loc;
23408
23409 return n;
23410}
23411
23412static rb_node_case2_t *
23413rb_node_case2_new(struct parser_params *p, NODE *nd_body, const YYLTYPE *loc, const YYLTYPE *case_keyword_loc, const YYLTYPE *end_keyword_loc)
23414{
23415 rb_node_case2_t *n = NODE_NEWNODE(NODE_CASE2, rb_node_case2_t, loc);
23416 n->nd_head = 0;
23417 n->nd_body = nd_body;
23418 n->case_keyword_loc = *case_keyword_loc;
23419 n->end_keyword_loc = *end_keyword_loc;
23420
23421 return n;
23422}
23423
23424static rb_node_case3_t *
23425rb_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)
23426{
23427 rb_node_case3_t *n = NODE_NEWNODE(NODE_CASE3, rb_node_case3_t, loc);
23428 n->nd_head = nd_head;
23429 n->nd_body = nd_body;
23430 n->case_keyword_loc = *case_keyword_loc;
23431 n->end_keyword_loc = *end_keyword_loc;
23432
23433 return n;
23434}
23435
23436static rb_node_when_t *
23437rb_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)
23438{
23439 rb_node_when_t *n = NODE_NEWNODE(NODE_WHEN, rb_node_when_t, loc);
23440 n->nd_head = nd_head;
23441 n->nd_body = nd_body;
23442 n->nd_next = nd_next;
23443 n->keyword_loc = *keyword_loc;
23444 n->then_keyword_loc = *then_keyword_loc;
23445
23446 return n;
23447}
23448
23449static rb_node_in_t *
23450rb_node_in_new(struct parser_params *p, NODE *nd_head, NODE *nd_body, NODE *nd_next, const YYLTYPE *loc, const YYLTYPE *in_keyword_loc, const YYLTYPE *then_keyword_loc, const YYLTYPE *operator_loc)
23451{
23452 rb_node_in_t *n = NODE_NEWNODE(NODE_IN, rb_node_in_t, loc);
23453 n->nd_head = nd_head;
23454 n->nd_body = nd_body;
23455 n->nd_next = nd_next;
23456 n->in_keyword_loc = *in_keyword_loc;
23457 n->then_keyword_loc = *then_keyword_loc;
23458 n->operator_loc = *operator_loc;
23459
23460 return n;
23461}
23462
23463static rb_node_while_t *
23464rb_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)
23465{
23466 rb_node_while_t *n = NODE_NEWNODE(NODE_WHILE, rb_node_while_t, loc);
23467 n->nd_cond = nd_cond;
23468 n->nd_body = nd_body;
23469 n->nd_state = nd_state;
23470 n->keyword_loc = *keyword_loc;
23471 n->closing_loc = *closing_loc;
23472
23473 return n;
23474}
23475
23476static rb_node_until_t *
23477rb_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)
23478{
23479 rb_node_until_t *n = NODE_NEWNODE(NODE_UNTIL, rb_node_until_t, loc);
23480 n->nd_cond = nd_cond;
23481 n->nd_body = nd_body;
23482 n->nd_state = nd_state;
23483 n->keyword_loc = *keyword_loc;
23484 n->closing_loc = *closing_loc;
23485
23486 return n;
23487}
23488
23489static rb_node_colon2_t *
23490rb_node_colon2_new(struct parser_params *p, NODE *nd_head, ID nd_mid, const YYLTYPE *loc, const YYLTYPE *delimiter_loc, const YYLTYPE *name_loc)
23491{
23492 rb_node_colon2_t *n = NODE_NEWNODE(NODE_COLON2, rb_node_colon2_t, loc);
23493 n->nd_head = nd_head;
23494 n->nd_mid = nd_mid;
23495 n->delimiter_loc = *delimiter_loc;
23496 n->name_loc = *name_loc;
23497
23498 return n;
23499}
23500
23501static rb_node_colon3_t *
23502rb_node_colon3_new(struct parser_params *p, ID nd_mid, const YYLTYPE *loc, const YYLTYPE *delimiter_loc, const YYLTYPE *name_loc)
23503{
23504 rb_node_colon3_t *n = NODE_NEWNODE(NODE_COLON3, rb_node_colon3_t, loc);
23505 n->nd_mid = nd_mid;
23506 n->delimiter_loc = *delimiter_loc;
23507 n->name_loc = *name_loc;
23508
23509 return n;
23510}
23511
23512static rb_node_dot2_t *
23513rb_node_dot2_new(struct parser_params *p, NODE *nd_beg, NODE *nd_end, const YYLTYPE *loc, const YYLTYPE *operator_loc)
23514{
23515 rb_node_dot2_t *n = NODE_NEWNODE(NODE_DOT2, rb_node_dot2_t, loc);
23516 n->nd_beg = nd_beg;
23517 n->nd_end = nd_end;
23518 n->operator_loc = *operator_loc;
23519
23520 return n;
23521}
23522
23523static rb_node_dot3_t *
23524rb_node_dot3_new(struct parser_params *p, NODE *nd_beg, NODE *nd_end, const YYLTYPE *loc, const YYLTYPE *operator_loc)
23525{
23526 rb_node_dot3_t *n = NODE_NEWNODE(NODE_DOT3, rb_node_dot3_t, loc);
23527 n->nd_beg = nd_beg;
23528 n->nd_end = nd_end;
23529 n->operator_loc = *operator_loc;
23530
23531 return n;
23532}
23533
23534static rb_node_self_t *
23535rb_node_self_new(struct parser_params *p, const YYLTYPE *loc)
23536{
23537 rb_node_self_t *n = NODE_NEWNODE(NODE_SELF, rb_node_self_t, loc);
23538 n->nd_state = 1;
23539
23540 return n;
23541}
23542
23543static rb_node_nil_t *
23544rb_node_nil_new(struct parser_params *p, const YYLTYPE *loc)
23545{
23546 rb_node_nil_t *n = NODE_NEWNODE(NODE_NIL, rb_node_nil_t, loc);
23547
23548 return n;
23549}
23550
23551static rb_node_true_t *
23552rb_node_true_new(struct parser_params *p, const YYLTYPE *loc)
23553{
23554 rb_node_true_t *n = NODE_NEWNODE(NODE_TRUE, rb_node_true_t, loc);
23555
23556 return n;
23557}
23558
23559static rb_node_false_t *
23560rb_node_false_new(struct parser_params *p, const YYLTYPE *loc)
23561{
23562 rb_node_false_t *n = NODE_NEWNODE(NODE_FALSE, rb_node_false_t, loc);
23563
23564 return n;
23565}
23566
23567static rb_node_super_t *
23568rb_node_super_new(struct parser_params *p, NODE *nd_args, const YYLTYPE *loc,
23569 const YYLTYPE *keyword_loc, const YYLTYPE *lparen_loc, const YYLTYPE *rparen_loc)
23570{
23571 rb_node_super_t *n = NODE_NEWNODE(NODE_SUPER, rb_node_super_t, loc);
23572 n->nd_args = nd_args;
23573 n->keyword_loc = *keyword_loc;
23574 n->lparen_loc = *lparen_loc;
23575 n->rparen_loc = *rparen_loc;
23576
23577 return n;
23578}
23579
23580static rb_node_zsuper_t *
23581rb_node_zsuper_new(struct parser_params *p, const YYLTYPE *loc)
23582{
23583 rb_node_zsuper_t *n = NODE_NEWNODE(NODE_ZSUPER, rb_node_zsuper_t, loc);
23584
23585 return n;
23586}
23587
23588static rb_node_match2_t *
23589rb_node_match2_new(struct parser_params *p, NODE *nd_recv, NODE *nd_value, const YYLTYPE *loc)
23590{
23591 rb_node_match2_t *n = NODE_NEWNODE(NODE_MATCH2, rb_node_match2_t, loc);
23592 n->nd_recv = nd_recv;
23593 n->nd_value = nd_value;
23594 n->nd_args = 0;
23595
23596 return n;
23597}
23598
23599static rb_node_match3_t *
23600rb_node_match3_new(struct parser_params *p, NODE *nd_recv, NODE *nd_value, const YYLTYPE *loc)
23601{
23602 rb_node_match3_t *n = NODE_NEWNODE(NODE_MATCH3, rb_node_match3_t, loc);
23603 n->nd_recv = nd_recv;
23604 n->nd_value = nd_value;
23605
23606 return n;
23607}
23608
23609static rb_node_list_t *
23610rb_node_list_new(struct parser_params *p, NODE *nd_head, const YYLTYPE *loc)
23611{
23612 return rb_node_list_new2(p, nd_head, 1, 0, loc);
23613}
23614
23615static rb_node_list_t *
23616rb_node_list_new2(struct parser_params *p, NODE *nd_head, long nd_alen, NODE *nd_next, const YYLTYPE *loc)
23617{
23618 rb_node_list_t *n = NODE_NEWNODE(NODE_LIST, rb_node_list_t, loc);
23619 n->nd_head = nd_head;
23620 n->as.nd_alen = nd_alen;
23621 n->nd_next = nd_next;
23622
23623 return n;
23624}
23625
23626static rb_node_zlist_t *
23627rb_node_zlist_new(struct parser_params *p, const YYLTYPE *loc)
23628{
23629 rb_node_zlist_t *n = NODE_NEWNODE(NODE_ZLIST, rb_node_zlist_t, loc);
23630
23631 return n;
23632}
23633
23634static rb_node_hash_t *
23635rb_node_hash_new(struct parser_params *p, NODE *nd_head, const YYLTYPE *loc)
23636{
23637 rb_node_hash_t *n = NODE_NEWNODE(NODE_HASH, rb_node_hash_t, loc);
23638 n->nd_head = nd_head;
23639 n->nd_brace = 0;
23640
23641 return n;
23642}
23643
23644static rb_node_masgn_t *
23645rb_node_masgn_new(struct parser_params *p, NODE *nd_head, NODE *nd_args, const YYLTYPE *loc)
23646{
23647 rb_node_masgn_t *n = NODE_NEWNODE(NODE_MASGN, rb_node_masgn_t, loc);
23648 n->nd_head = nd_head;
23649 n->nd_value = 0;
23650 n->nd_args = nd_args;
23651
23652 return n;
23653}
23654
23655static rb_node_gasgn_t *
23656rb_node_gasgn_new(struct parser_params *p, ID nd_vid, NODE *nd_value, const YYLTYPE *loc)
23657{
23658 rb_node_gasgn_t *n = NODE_NEWNODE(NODE_GASGN, rb_node_gasgn_t, loc);
23659 n->nd_vid = nd_vid;
23660 n->nd_value = nd_value;
23661
23662 return n;
23663}
23664
23665static rb_node_lasgn_t *
23666rb_node_lasgn_new(struct parser_params *p, ID nd_vid, NODE *nd_value, const YYLTYPE *loc)
23667{
23668 rb_node_lasgn_t *n = NODE_NEWNODE(NODE_LASGN, rb_node_lasgn_t, loc);
23669 n->nd_vid = nd_vid;
23670 n->nd_value = nd_value;
23671
23672 return n;
23673}
23674
23675static rb_node_dasgn_t *
23676rb_node_dasgn_new(struct parser_params *p, ID nd_vid, NODE *nd_value, const YYLTYPE *loc)
23677{
23678 rb_node_dasgn_t *n = NODE_NEWNODE(NODE_DASGN, rb_node_dasgn_t, loc);
23679 n->nd_vid = nd_vid;
23680 n->nd_value = nd_value;
23681
23682 return n;
23683}
23684
23685static rb_node_iasgn_t *
23686rb_node_iasgn_new(struct parser_params *p, ID nd_vid, NODE *nd_value, const YYLTYPE *loc)
23687{
23688 rb_node_iasgn_t *n = NODE_NEWNODE(NODE_IASGN, rb_node_iasgn_t, loc);
23689 n->nd_vid = nd_vid;
23690 n->nd_value = nd_value;
23691
23692 return n;
23693}
23694
23695static rb_node_cvasgn_t *
23696rb_node_cvasgn_new(struct parser_params *p, ID nd_vid, NODE *nd_value, const YYLTYPE *loc)
23697{
23698 rb_node_cvasgn_t *n = NODE_NEWNODE(NODE_CVASGN, rb_node_cvasgn_t, loc);
23699 n->nd_vid = nd_vid;
23700 n->nd_value = nd_value;
23701
23702 return n;
23703}
23704
23705static rb_node_op_asgn1_t *
23706rb_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)
23707{
23708 rb_node_op_asgn1_t *n = NODE_NEWNODE(NODE_OP_ASGN1, rb_node_op_asgn1_t, loc);
23709 n->nd_recv = nd_recv;
23710 n->nd_mid = nd_mid;
23711 n->nd_index = index;
23712 n->nd_rvalue = rvalue;
23713 n->call_operator_loc = *call_operator_loc;
23714 n->opening_loc = *opening_loc;
23715 n->closing_loc = *closing_loc;
23716 n->binary_operator_loc = *binary_operator_loc;
23717
23718 return n;
23719}
23720
23721static rb_node_op_asgn2_t *
23722rb_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)
23723{
23724 rb_node_op_asgn2_t *n = NODE_NEWNODE(NODE_OP_ASGN2, rb_node_op_asgn2_t, loc);
23725 n->nd_recv = nd_recv;
23726 n->nd_value = nd_value;
23727 n->nd_vid = nd_vid;
23728 n->nd_mid = nd_mid;
23729 n->nd_aid = nd_aid;
23730 n->call_operator_loc = *call_operator_loc;
23731 n->message_loc = *message_loc;
23732 n->binary_operator_loc = *binary_operator_loc;
23733
23734 return n;
23735}
23736
23737static rb_node_op_asgn_or_t *
23738rb_node_op_asgn_or_new(struct parser_params *p, NODE *nd_head, NODE *nd_value, const YYLTYPE *loc)
23739{
23740 rb_node_op_asgn_or_t *n = NODE_NEWNODE(NODE_OP_ASGN_OR, rb_node_op_asgn_or_t, loc);
23741 n->nd_head = nd_head;
23742 n->nd_value = nd_value;
23743
23744 return n;
23745}
23746
23747static rb_node_op_asgn_and_t *
23748rb_node_op_asgn_and_new(struct parser_params *p, NODE *nd_head, NODE *nd_value, const YYLTYPE *loc)
23749{
23750 rb_node_op_asgn_and_t *n = NODE_NEWNODE(NODE_OP_ASGN_AND, rb_node_op_asgn_and_t, loc);
23751 n->nd_head = nd_head;
23752 n->nd_value = nd_value;
23753
23754 return n;
23755}
23756
23757static rb_node_gvar_t *
23758rb_node_gvar_new(struct parser_params *p, ID nd_vid, const YYLTYPE *loc)
23759{
23760 rb_node_gvar_t *n = NODE_NEWNODE(NODE_GVAR, rb_node_gvar_t, loc);
23761 n->nd_vid = nd_vid;
23762
23763 return n;
23764}
23765
23766static rb_node_lvar_t *
23767rb_node_lvar_new(struct parser_params *p, ID nd_vid, const YYLTYPE *loc)
23768{
23769 rb_node_lvar_t *n = NODE_NEWNODE(NODE_LVAR, rb_node_lvar_t, loc);
23770 n->nd_vid = nd_vid;
23771
23772 return n;
23773}
23774
23775static rb_node_dvar_t *
23776rb_node_dvar_new(struct parser_params *p, ID nd_vid, const YYLTYPE *loc)
23777{
23778 rb_node_dvar_t *n = NODE_NEWNODE(NODE_DVAR, rb_node_dvar_t, loc);
23779 n->nd_vid = nd_vid;
23780
23781 return n;
23782}
23783
23784static rb_node_ivar_t *
23785rb_node_ivar_new(struct parser_params *p, ID nd_vid, const YYLTYPE *loc)
23786{
23787 rb_node_ivar_t *n = NODE_NEWNODE(NODE_IVAR, rb_node_ivar_t, loc);
23788 n->nd_vid = nd_vid;
23789
23790 return n;
23791}
23792
23793static rb_node_const_t *
23794rb_node_const_new(struct parser_params *p, ID nd_vid, const YYLTYPE *loc)
23795{
23796 rb_node_const_t *n = NODE_NEWNODE(NODE_CONST, rb_node_const_t, loc);
23797 n->nd_vid = nd_vid;
23798
23799 return n;
23800}
23801
23802static rb_node_cvar_t *
23803rb_node_cvar_new(struct parser_params *p, ID nd_vid, const YYLTYPE *loc)
23804{
23805 rb_node_cvar_t *n = NODE_NEWNODE(NODE_CVAR, rb_node_cvar_t, loc);
23806 n->nd_vid = nd_vid;
23807
23808 return n;
23809}
23810
23811static rb_node_nth_ref_t *
23812rb_node_nth_ref_new(struct parser_params *p, long nd_nth, const YYLTYPE *loc)
23813{
23814 rb_node_nth_ref_t *n = NODE_NEWNODE(NODE_NTH_REF, rb_node_nth_ref_t, loc);
23815 n->nd_nth = nd_nth;
23816
23817 return n;
23818}
23819
23820static rb_node_back_ref_t *
23821rb_node_back_ref_new(struct parser_params *p, long nd_nth, const YYLTYPE *loc)
23822{
23823 rb_node_back_ref_t *n = NODE_NEWNODE(NODE_BACK_REF, rb_node_back_ref_t, loc);
23824 n->nd_nth = nd_nth;
23825
23826 return n;
23827}
23828
23829static rb_node_integer_t *
23830rb_node_integer_new(struct parser_params *p, char* val, int base, const YYLTYPE *loc)
23831{
23832 rb_node_integer_t *n = NODE_NEWNODE(NODE_INTEGER, rb_node_integer_t, loc);
23833 n->val = val;
23834 n->minus = FALSE;
23835 n->base = base;
23836
23837 return n;
23838}
23839
23840static rb_node_float_t *
23841rb_node_float_new(struct parser_params *p, char* val, const YYLTYPE *loc)
23842{
23843 rb_node_float_t *n = NODE_NEWNODE(NODE_FLOAT, rb_node_float_t, loc);
23844 n->val = val;
23845 n->minus = FALSE;
23846
23847 return n;
23848}
23849
23850static rb_node_rational_t *
23851rb_node_rational_new(struct parser_params *p, char* val, int base, int seen_point, const YYLTYPE *loc)
23852{
23853 rb_node_rational_t *n = NODE_NEWNODE(NODE_RATIONAL, rb_node_rational_t, loc);
23854 n->val = val;
23855 n->minus = FALSE;
23856 n->base = base;
23857 n->seen_point = seen_point;
23858
23859 return n;
23860}
23861
23862static rb_node_imaginary_t *
23863rb_node_imaginary_new(struct parser_params *p, char* val, int base, int seen_point, enum rb_numeric_type numeric_type, const YYLTYPE *loc)
23864{
23865 rb_node_imaginary_t *n = NODE_NEWNODE(NODE_IMAGINARY, rb_node_imaginary_t, loc);
23866 n->val = val;
23867 n->minus = FALSE;
23868 n->base = base;
23869 n->seen_point = seen_point;
23870 n->type = numeric_type;
23871
23872 return n;
23873}
23874
23875static rb_node_str_t *
23876rb_node_str_new(struct parser_params *p, rb_parser_string_t *string, const YYLTYPE *loc)
23877{
23878 rb_node_str_t *n = NODE_NEWNODE(NODE_STR, rb_node_str_t, loc);
23879 n->string = string;
23880
23881 return n;
23882}
23883
23884/* TODO; Use union for NODE_DSTR2 */
23885static rb_node_dstr_t *
23886rb_node_dstr_new0(struct parser_params *p, rb_parser_string_t *string, long nd_alen, NODE *nd_next, const YYLTYPE *loc)
23887{
23888 rb_node_dstr_t *n = NODE_NEWNODE(NODE_DSTR, rb_node_dstr_t, loc);
23889 n->string = string;
23890 n->as.nd_alen = nd_alen;
23891 n->nd_next = (rb_node_list_t *)nd_next;
23892
23893 return n;
23894}
23895
23896static rb_node_dstr_t *
23897rb_node_dstr_new(struct parser_params *p, rb_parser_string_t *string, const YYLTYPE *loc)
23898{
23899 return rb_node_dstr_new0(p, string, 1, 0, loc);
23900}
23901
23902static rb_node_xstr_t *
23903rb_node_xstr_new(struct parser_params *p, rb_parser_string_t *string, const YYLTYPE *loc)
23904{
23905 rb_node_xstr_t *n = NODE_NEWNODE(NODE_XSTR, rb_node_xstr_t, loc);
23906 n->string = string;
23907
23908 return n;
23909}
23910
23911static rb_node_dxstr_t *
23912rb_node_dxstr_new(struct parser_params *p, rb_parser_string_t *string, long nd_alen, NODE *nd_next, const YYLTYPE *loc)
23913{
23914 rb_node_dxstr_t *n = NODE_NEWNODE(NODE_DXSTR, rb_node_dxstr_t, loc);
23915 n->string = string;
23916 n->as.nd_alen = nd_alen;
23917 n->nd_next = (rb_node_list_t *)nd_next;
23918
23919 return n;
23920}
23921
23922static rb_node_sym_t *
23923rb_node_sym_new(struct parser_params *p, VALUE str, const YYLTYPE *loc)
23924{
23925 rb_node_sym_t *n = NODE_NEWNODE(NODE_SYM, rb_node_sym_t, loc);
23926 n->string = rb_str_to_parser_string(p, str);
23927
23928 return n;
23929}
23930
23931static rb_node_dsym_t *
23932rb_node_dsym_new(struct parser_params *p, rb_parser_string_t *string, long nd_alen, NODE *nd_next, const YYLTYPE *loc)
23933{
23934 rb_node_dsym_t *n = NODE_NEWNODE(NODE_DSYM, rb_node_dsym_t, loc);
23935 n->string = string;
23936 n->as.nd_alen = nd_alen;
23937 n->nd_next = (rb_node_list_t *)nd_next;
23938
23939 return n;
23940}
23941
23942static rb_node_evstr_t *
23943rb_node_evstr_new(struct parser_params *p, NODE *nd_body, const YYLTYPE *loc, const YYLTYPE *opening_loc, const YYLTYPE *closing_loc)
23944{
23945 rb_node_evstr_t *n = NODE_NEWNODE(NODE_EVSTR, rb_node_evstr_t, loc);
23946 n->nd_body = nd_body;
23947 n->opening_loc = *opening_loc;
23948 n->closing_loc = *closing_loc;
23949
23950 return n;
23951}
23952
23953static rb_node_regx_t *
23954rb_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)
23955{
23956 rb_node_regx_t *n = NODE_NEWNODE(NODE_REGX, rb_node_regx_t, loc);
23957 n->string = string;
23958 n->options = options & RE_OPTION_MASK;
23959 n->opening_loc = *opening_loc;
23960 n->content_loc = *content_loc;
23961 n->closing_loc = *closing_loc;
23962
23963 return n;
23964}
23965
23966static rb_node_call_t *
23967rb_node_call_new(struct parser_params *p, NODE *nd_recv, ID nd_mid, NODE *nd_args, const YYLTYPE *loc)
23968{
23969 rb_node_call_t *n = NODE_NEWNODE(NODE_CALL, rb_node_call_t, loc);
23970 n->nd_recv = nd_recv;
23971 n->nd_mid = nd_mid;
23972 n->nd_args = nd_args;
23973
23974 return n;
23975}
23976
23977static rb_node_opcall_t *
23978rb_node_opcall_new(struct parser_params *p, NODE *nd_recv, ID nd_mid, NODE *nd_args, const YYLTYPE *loc)
23979{
23980 rb_node_opcall_t *n = NODE_NEWNODE(NODE_OPCALL, rb_node_opcall_t, loc);
23981 n->nd_recv = nd_recv;
23982 n->nd_mid = nd_mid;
23983 n->nd_args = nd_args;
23984
23985 return n;
23986}
23987
23988static rb_node_fcall_t *
23989rb_node_fcall_new(struct parser_params *p, ID nd_mid, NODE *nd_args, const YYLTYPE *loc)
23990{
23991 rb_node_fcall_t *n = NODE_NEWNODE(NODE_FCALL, rb_node_fcall_t, loc);
23992 n->nd_mid = nd_mid;
23993 n->nd_args = nd_args;
23994
23995 return n;
23996}
23997
23998static rb_node_qcall_t *
23999rb_node_qcall_new(struct parser_params *p, NODE *nd_recv, ID nd_mid, NODE *nd_args, const YYLTYPE *loc)
24000{
24001 rb_node_qcall_t *n = NODE_NEWNODE(NODE_QCALL, rb_node_qcall_t, loc);
24002 n->nd_recv = nd_recv;
24003 n->nd_mid = nd_mid;
24004 n->nd_args = nd_args;
24005
24006 return n;
24007}
24008
24009static rb_node_vcall_t *
24010rb_node_vcall_new(struct parser_params *p, ID nd_mid, const YYLTYPE *loc)
24011{
24012 rb_node_vcall_t *n = NODE_NEWNODE(NODE_VCALL, rb_node_vcall_t, loc);
24013 n->nd_mid = nd_mid;
24014
24015 return n;
24016}
24017
24018static rb_node_once_t *
24019rb_node_once_new(struct parser_params *p, NODE *nd_body, const YYLTYPE *loc)
24020{
24021 rb_node_once_t *n = NODE_NEWNODE(NODE_ONCE, rb_node_once_t, loc);
24022 n->nd_body = nd_body;
24023
24024 return n;
24025}
24026
24027static rb_node_args_t *
24028rb_node_args_new(struct parser_params *p, const YYLTYPE *loc)
24029{
24030 rb_node_args_t *n = NODE_NEWNODE(NODE_ARGS, rb_node_args_t, loc);
24031 MEMZERO(&n->nd_ainfo, struct rb_args_info, 1);
24032
24033 return n;
24034}
24035
24036static rb_node_args_aux_t *
24037rb_node_args_aux_new(struct parser_params *p, ID nd_pid, int nd_plen, const YYLTYPE *loc)
24038{
24039 rb_node_args_aux_t *n = NODE_NEWNODE(NODE_ARGS_AUX, rb_node_args_aux_t, loc);
24040 n->nd_pid = nd_pid;
24041 n->nd_plen = nd_plen;
24042 n->nd_next = 0;
24043
24044 return n;
24045}
24046
24047static rb_node_opt_arg_t *
24048rb_node_opt_arg_new(struct parser_params *p, NODE *nd_body, const YYLTYPE *loc)
24049{
24050 rb_node_opt_arg_t *n = NODE_NEWNODE(NODE_OPT_ARG, rb_node_opt_arg_t, loc);
24051 n->nd_body = nd_body;
24052 n->nd_next = 0;
24053
24054 return n;
24055}
24056
24057static rb_node_kw_arg_t *
24058rb_node_kw_arg_new(struct parser_params *p, NODE *nd_body, const YYLTYPE *loc)
24059{
24060 rb_node_kw_arg_t *n = NODE_NEWNODE(NODE_KW_ARG, rb_node_kw_arg_t, loc);
24061 n->nd_body = nd_body;
24062 n->nd_next = 0;
24063
24064 return n;
24065}
24066
24067static rb_node_postarg_t *
24068rb_node_postarg_new(struct parser_params *p, NODE *nd_1st, NODE *nd_2nd, const YYLTYPE *loc)
24069{
24070 rb_node_postarg_t *n = NODE_NEWNODE(NODE_POSTARG, rb_node_postarg_t, loc);
24071 n->nd_1st = nd_1st;
24072 n->nd_2nd = nd_2nd;
24073
24074 return n;
24075}
24076
24077static rb_node_argscat_t *
24078rb_node_argscat_new(struct parser_params *p, NODE *nd_head, NODE *nd_body, const YYLTYPE *loc)
24079{
24080 rb_node_argscat_t *n = NODE_NEWNODE(NODE_ARGSCAT, rb_node_argscat_t, loc);
24081 n->nd_head = nd_head;
24082 n->nd_body = nd_body;
24083
24084 return n;
24085}
24086
24087static rb_node_argspush_t *
24088rb_node_argspush_new(struct parser_params *p, NODE *nd_head, NODE *nd_body, const YYLTYPE *loc)
24089{
24090 rb_node_argspush_t *n = NODE_NEWNODE(NODE_ARGSPUSH, rb_node_argspush_t, loc);
24091 n->nd_head = nd_head;
24092 n->nd_body = nd_body;
24093
24094 return n;
24095}
24096
24097static rb_node_splat_t *
24098rb_node_splat_new(struct parser_params *p, NODE *nd_head, const YYLTYPE *loc, const YYLTYPE *operator_loc)
24099{
24100 rb_node_splat_t *n = NODE_NEWNODE(NODE_SPLAT, rb_node_splat_t, loc);
24101 n->nd_head = nd_head;
24102 n->operator_loc = *operator_loc;
24103
24104 return n;
24105}
24106
24107static rb_node_block_pass_t *
24108rb_node_block_pass_new(struct parser_params *p, NODE *nd_body, const YYLTYPE *loc, const YYLTYPE *operator_loc)
24109{
24110 rb_node_block_pass_t *n = NODE_NEWNODE(NODE_BLOCK_PASS, rb_node_block_pass_t, loc);
24111 n->forwarding = 0;
24112 n->nd_head = 0;
24113 n->nd_body = nd_body;
24114 n->operator_loc = *operator_loc;
24115
24116 return n;
24117}
24118
24119static rb_node_alias_t *
24120rb_node_alias_new(struct parser_params *p, NODE *nd_1st, NODE *nd_2nd, const YYLTYPE *loc, const YYLTYPE *keyword_loc)
24121{
24122 rb_node_alias_t *n = NODE_NEWNODE(NODE_ALIAS, rb_node_alias_t, loc);
24123 n->nd_1st = nd_1st;
24124 n->nd_2nd = nd_2nd;
24125 n->keyword_loc = *keyword_loc;
24126
24127 return n;
24128}
24129
24130static rb_node_valias_t *
24131rb_node_valias_new(struct parser_params *p, ID nd_alias, ID nd_orig, const YYLTYPE *loc, const YYLTYPE *keyword_loc)
24132{
24133 rb_node_valias_t *n = NODE_NEWNODE(NODE_VALIAS, rb_node_valias_t, loc);
24134 n->nd_alias = nd_alias;
24135 n->nd_orig = nd_orig;
24136 n->keyword_loc = *keyword_loc;
24137
24138 return n;
24139}
24140
24141static rb_node_undef_t *
24142rb_node_undef_new(struct parser_params *p, NODE *nd_undef, const YYLTYPE *loc)
24143{
24144 rb_node_undef_t *n = NODE_NEWNODE(NODE_UNDEF, rb_node_undef_t, loc);
24145 n->nd_undefs = rb_parser_ary_new_capa_for_node(p, 1);
24146 n->keyword_loc = NULL_LOC;
24147 rb_parser_ary_push_node(p, n->nd_undefs, nd_undef);
24148
24149 return n;
24150}
24151
24152static rb_node_errinfo_t *
24153rb_node_errinfo_new(struct parser_params *p, const YYLTYPE *loc)
24154{
24155 rb_node_errinfo_t *n = NODE_NEWNODE(NODE_ERRINFO, rb_node_errinfo_t, loc);
24156
24157 return n;
24158}
24159
24160static rb_node_defined_t *
24161rb_node_defined_new(struct parser_params *p, NODE *nd_head, const YYLTYPE *loc, const YYLTYPE *keyword_loc)
24162{
24163 rb_node_defined_t *n = NODE_NEWNODE(NODE_DEFINED, rb_node_defined_t, loc);
24164 n->nd_head = nd_head;
24165 n->keyword_loc = *keyword_loc;
24166
24167 return n;
24168}
24169
24170static rb_node_postexe_t *
24171rb_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)
24172{
24173 rb_node_postexe_t *n = NODE_NEWNODE(NODE_POSTEXE, rb_node_postexe_t, loc);
24174 n->nd_body = nd_body;
24175 n->keyword_loc = *keyword_loc;
24176 n->opening_loc = *opening_loc;
24177 n->closing_loc = *closing_loc;
24178
24179 return n;
24180}
24181
24182static rb_node_attrasgn_t *
24183rb_node_attrasgn_new(struct parser_params *p, NODE *nd_recv, ID nd_mid, NODE *nd_args, const YYLTYPE *loc)
24184{
24185 rb_node_attrasgn_t *n = NODE_NEWNODE(NODE_ATTRASGN, rb_node_attrasgn_t, loc);
24186 n->nd_recv = nd_recv;
24187 n->nd_mid = nd_mid;
24188 n->nd_args = nd_args;
24189
24190 return n;
24191}
24192
24193static rb_node_aryptn_t *
24194rb_node_aryptn_new(struct parser_params *p, NODE *pre_args, NODE *rest_arg, NODE *post_args, const YYLTYPE *loc)
24195{
24196 rb_node_aryptn_t *n = NODE_NEWNODE(NODE_ARYPTN, rb_node_aryptn_t, loc);
24197 n->nd_pconst = 0;
24198 n->pre_args = pre_args;
24199 n->rest_arg = rest_arg;
24200 n->post_args = post_args;
24201
24202 return n;
24203}
24204
24205static rb_node_hshptn_t *
24206rb_node_hshptn_new(struct parser_params *p, NODE *nd_pconst, NODE *nd_pkwargs, NODE *nd_pkwrestarg, const YYLTYPE *loc)
24207{
24208 rb_node_hshptn_t *n = NODE_NEWNODE(NODE_HSHPTN, rb_node_hshptn_t, loc);
24209 n->nd_pconst = nd_pconst;
24210 n->nd_pkwargs = nd_pkwargs;
24211 n->nd_pkwrestarg = nd_pkwrestarg;
24212
24213 return n;
24214}
24215
24216static rb_node_fndptn_t *
24217rb_node_fndptn_new(struct parser_params *p, NODE *pre_rest_arg, NODE *args, NODE *post_rest_arg, const YYLTYPE *loc)
24218{
24219 rb_node_fndptn_t *n = NODE_NEWNODE(NODE_FNDPTN, rb_node_fndptn_t, loc);
24220 n->nd_pconst = 0;
24221 n->pre_rest_arg = pre_rest_arg;
24222 n->args = args;
24223 n->post_rest_arg = post_rest_arg;
24224
24225 return n;
24226}
24227
24228static rb_node_line_t *
24229rb_node_line_new(struct parser_params *p, const YYLTYPE *loc)
24230{
24231 rb_node_line_t *n = NODE_NEWNODE(NODE_LINE, rb_node_line_t, loc);
24232
24233 return n;
24234}
24235
24236static rb_node_file_t *
24237rb_node_file_new(struct parser_params *p, VALUE str, const YYLTYPE *loc)
24238{
24239 rb_node_file_t *n = NODE_NEWNODE(NODE_FILE, rb_node_file_t, loc);
24240 n->path = rb_str_to_parser_string(p, str);
24241
24242 return n;
24243}
24244
24245static rb_node_encoding_t *
24246rb_node_encoding_new(struct parser_params *p, const YYLTYPE *loc)
24247{
24248 rb_node_encoding_t *n = NODE_NEWNODE(NODE_ENCODING, rb_node_encoding_t, loc);
24249 n->enc = p->enc;
24250
24251 return n;
24252}
24253
24254static rb_node_cdecl_t *
24255rb_node_cdecl_new(struct parser_params *p, ID nd_vid, NODE *nd_value, NODE *nd_else, enum rb_parser_shareability shareability, const YYLTYPE *loc)
24256{
24257 rb_node_cdecl_t *n = NODE_NEWNODE(NODE_CDECL, rb_node_cdecl_t, loc);
24258 n->nd_vid = nd_vid;
24259 n->nd_value = nd_value;
24260 n->nd_else = nd_else;
24261 n->shareability = shareability;
24262
24263 return n;
24264}
24265
24266static rb_node_op_cdecl_t *
24267rb_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)
24268{
24269 rb_node_op_cdecl_t *n = NODE_NEWNODE(NODE_OP_CDECL, rb_node_op_cdecl_t, loc);
24270 n->nd_head = nd_head;
24271 n->nd_value = nd_value;
24272 n->nd_aid = nd_aid;
24273 n->shareability = shareability;
24274
24275 return n;
24276}
24277
24278static rb_node_error_t *
24279rb_node_error_new(struct parser_params *p, const YYLTYPE *loc)
24280{
24281 rb_node_error_t *n = NODE_NEWNODE(NODE_ERROR, rb_node_error_t, loc);
24282
24283 return n;
24284}
24285
24286static rb_node_break_t *
24287rb_node_break_new(struct parser_params *p, NODE *nd_stts, const YYLTYPE *loc, const YYLTYPE *keyword_loc)
24288{
24289 rb_node_break_t *n = NODE_NEWNODE(NODE_BREAK, rb_node_break_t, loc);
24290 n->nd_stts = nd_stts;
24291 n->nd_chain = 0;
24292 n->keyword_loc = *keyword_loc;
24293
24294 return n;
24295}
24296
24297static rb_node_next_t *
24298rb_node_next_new(struct parser_params *p, NODE *nd_stts, const YYLTYPE *loc, const YYLTYPE *keyword_loc)
24299{
24300 rb_node_next_t *n = NODE_NEWNODE(NODE_NEXT, rb_node_next_t, loc);
24301 n->nd_stts = nd_stts;
24302 n->nd_chain = 0;
24303 n->keyword_loc = *keyword_loc;
24304
24305 return n;
24306}
24307
24308static rb_node_redo_t *
24309rb_node_redo_new(struct parser_params *p, const YYLTYPE *loc, const YYLTYPE *keyword_loc)
24310{
24311 rb_node_redo_t *n = NODE_NEWNODE(NODE_REDO, rb_node_redo_t, loc);
24312 n->nd_chain = 0;
24313 n->keyword_loc = *keyword_loc;
24314
24315 return n;
24316}
24317
24318static rb_node_def_temp_t *
24319rb_node_def_temp_new(struct parser_params *p, const YYLTYPE *loc)
24320{
24321 rb_node_def_temp_t *n = NODE_NEWNODE((enum node_type)NODE_DEF_TEMP, rb_node_def_temp_t, loc);
24322 n->save.numparam_save = 0;
24323 n->save.max_numparam = 0;
24324 n->save.ctxt = p->ctxt;
24325 n->nd_def = 0;
24326 n->nd_mid = 0;
24327
24328 return n;
24329}
24330
24331static rb_node_def_temp_t *
24332def_head_save(struct parser_params *p, rb_node_def_temp_t *n)
24333{
24334 n->save.numparam_save = numparam_push(p);
24335 n->save.max_numparam = p->max_numparam;
24336 return n;
24337}
24338
24339#ifndef RIPPER
24340static enum node_type
24341nodetype(NODE *node) /* for debug */
24342{
24343 return (enum node_type)nd_type(node);
24344}
24345
24346static int
24347nodeline(NODE *node)
24348{
24349 return nd_line(node);
24350}
24351#endif
24352
24353static NODE*
24354newline_node(NODE *node)
24355{
24356 if (node) {
24357 node = remove_begin(node);
24358 nd_set_fl_newline(node);
24359 }
24360 return node;
24361}
24362
24363static void
24364fixpos(NODE *node, NODE *orig)
24365{
24366 if (!node) return;
24367 if (!orig) return;
24368 nd_set_line(node, nd_line(orig));
24369}
24370
24371static NODE*
24372block_append(struct parser_params *p, NODE *head, NODE *tail)
24373{
24374 NODE *end, *h = head, *nd;
24375
24376 if (tail == 0) return head;
24377
24378 if (h == 0) return tail;
24379 switch (nd_type(h)) {
24380 default:
24381 h = end = NEW_BLOCK(head, &head->nd_loc);
24382 head = end;
24383 break;
24384 case NODE_BLOCK:
24385 end = RNODE_BLOCK(h)->nd_end;
24386 break;
24387 }
24388
24389 nd = RNODE_BLOCK(end)->nd_head;
24390 switch (nd_type(nd)) {
24391 case NODE_RETURN:
24392 case NODE_BREAK:
24393 case NODE_NEXT:
24394 case NODE_REDO:
24395 case NODE_RETRY:
24396 rb_warning0L(nd_line(tail), "statement not reached");
24397 break;
24398
24399 default:
24400 break;
24401 }
24402
24403 if (!nd_type_p(tail, NODE_BLOCK)) {
24404 tail = NEW_BLOCK(tail, &tail->nd_loc);
24405 }
24406 RNODE_BLOCK(end)->nd_next = tail;
24407 RNODE_BLOCK(h)->nd_end = RNODE_BLOCK(tail)->nd_end;
24408 nd_set_last_loc(head, nd_last_loc(tail));
24409 return head;
24410}
24411
24412/* append item to the list */
24413static NODE*
24414list_append(struct parser_params *p, NODE *list, NODE *item)
24415{
24416 NODE *last;
24417
24418 if (list == 0) return NEW_LIST(item, &item->nd_loc);
24419 if (RNODE_LIST(list)->nd_next) {
24420 last = RNODE_LIST(RNODE_LIST(list)->nd_next)->as.nd_end;
24421 }
24422 else {
24423 last = list;
24424 }
24425
24426 RNODE_LIST(list)->as.nd_alen += 1;
24427 RNODE_LIST(last)->nd_next = NEW_LIST(item, &item->nd_loc);
24428 RNODE_LIST(RNODE_LIST(list)->nd_next)->as.nd_end = RNODE_LIST(last)->nd_next;
24429
24430 nd_set_last_loc(list, nd_last_loc(item));
24431
24432 return list;
24433}
24434
24435/* concat two lists */
24436static NODE*
24437list_concat(NODE *head, NODE *tail)
24438{
24439 NODE *last;
24440
24441 if (RNODE_LIST(head)->nd_next) {
24442 last = RNODE_LIST(RNODE_LIST(head)->nd_next)->as.nd_end;
24443 }
24444 else {
24445 last = head;
24446 }
24447
24448 RNODE_LIST(head)->as.nd_alen += RNODE_LIST(tail)->as.nd_alen;
24449 RNODE_LIST(last)->nd_next = tail;
24450 if (RNODE_LIST(tail)->nd_next) {
24451 RNODE_LIST(RNODE_LIST(head)->nd_next)->as.nd_end = RNODE_LIST(RNODE_LIST(tail)->nd_next)->as.nd_end;
24452 }
24453 else {
24454 RNODE_LIST(RNODE_LIST(head)->nd_next)->as.nd_end = tail;
24455 }
24456
24457 nd_set_last_loc(head, nd_last_loc(tail));
24458
24459 return head;
24460}
24461
24462static int
24463literal_concat0(struct parser_params *p, rb_parser_string_t *head, rb_parser_string_t *tail)
24464{
24465 if (!tail) return 1;
24466 if (!rb_parser_enc_compatible(p, head, tail)) {
24467 compile_error(p, "string literal encodings differ (%s / %s)",
24468 rb_enc_name(rb_parser_str_get_encoding(head)),
24469 rb_enc_name(rb_parser_str_get_encoding(tail)));
24470 rb_parser_str_resize(p, head, 0);
24471 rb_parser_str_resize(p, tail, 0);
24472 return 0;
24473 }
24474 rb_parser_str_buf_append(p, head, tail);
24475 return 1;
24476}
24477
24478static rb_parser_string_t *
24479string_literal_head(struct parser_params *p, enum node_type htype, NODE *head)
24480{
24481 if (htype != NODE_DSTR) return NULL;
24482 if (RNODE_DSTR(head)->nd_next) {
24483 head = RNODE_LIST(RNODE_LIST(RNODE_DSTR(head)->nd_next)->as.nd_end)->nd_head;
24484 if (!head || !nd_type_p(head, NODE_STR)) return NULL;
24485 }
24486 rb_parser_string_t *lit = RNODE_DSTR(head)->string;
24487 ASSUME(lit);
24488 return lit;
24489}
24490
24491#ifndef RIPPER
24492static rb_parser_string_t *
24493rb_parser_string_deep_copy(struct parser_params *p, const rb_parser_string_t *orig)
24494{
24495 rb_parser_string_t *copy;
24496 if (!orig) return NULL;
24497 copy = rb_parser_string_new(p, PARSER_STRING_PTR(orig), PARSER_STRING_LEN(orig));
24498 copy->coderange = orig->coderange;
24499 copy->enc = orig->enc;
24500 return copy;
24501}
24502#endif
24503
24504/* concat two string literals */
24505static NODE *
24506literal_concat(struct parser_params *p, NODE *head, NODE *tail, const YYLTYPE *loc)
24507{
24508 enum node_type htype;
24509 rb_parser_string_t *lit;
24510
24511 if (!head) return tail;
24512 if (!tail) return head;
24513
24514 htype = nd_type(head);
24515 if (htype == NODE_EVSTR) {
24516 head = new_dstr(p, head, loc);
24517 htype = NODE_DSTR;
24518 }
24519 if (p->heredoc_indent > 0) {
24520 switch (htype) {
24521 case NODE_STR:
24522 head = str2dstr(p, head);
24523 case NODE_DSTR:
24524 return list_append(p, head, tail);
24525 default:
24526 break;
24527 }
24528 }
24529 switch (nd_type(tail)) {
24530 case NODE_STR:
24531 if ((lit = string_literal_head(p, htype, head)) != false) {
24532 htype = NODE_STR;
24533 }
24534 else {
24535 lit = RNODE_DSTR(head)->string;
24536 }
24537 if (htype == NODE_STR) {
24538 if (!literal_concat0(p, lit, RNODE_STR(tail)->string)) {
24539 error:
24540 rb_discard_node(p, head);
24541 rb_discard_node(p, tail);
24542 return 0;
24543 }
24544 rb_discard_node(p, tail);
24545 }
24546 else {
24547 list_append(p, head, tail);
24548 }
24549 break;
24550
24551 case NODE_DSTR:
24552 if (htype == NODE_STR) {
24553 if (!literal_concat0(p, RNODE_STR(head)->string, RNODE_DSTR(tail)->string))
24554 goto error;
24555 rb_parser_string_free(p, RNODE_DSTR(tail)->string);
24556 RNODE_DSTR(tail)->string = RNODE_STR(head)->string;
24557 RNODE_STR(head)->string = NULL;
24558 rb_discard_node(p, head);
24559 head = tail;
24560 }
24561 else if (!RNODE_DSTR(tail)->string) {
24562 append:
24563 RNODE_DSTR(head)->as.nd_alen += RNODE_DSTR(tail)->as.nd_alen - 1;
24564 if (!RNODE_DSTR(head)->nd_next) {
24565 RNODE_DSTR(head)->nd_next = RNODE_DSTR(tail)->nd_next;
24566 }
24567 else if (RNODE_DSTR(tail)->nd_next) {
24568 RNODE_DSTR(RNODE_DSTR(RNODE_DSTR(head)->nd_next)->as.nd_end)->nd_next = RNODE_DSTR(tail)->nd_next;
24569 RNODE_DSTR(RNODE_DSTR(head)->nd_next)->as.nd_end = RNODE_DSTR(RNODE_DSTR(tail)->nd_next)->as.nd_end;
24570 }
24571 rb_discard_node(p, tail);
24572 }
24573 else if ((lit = string_literal_head(p, htype, head)) != false) {
24574 if (!literal_concat0(p, lit, RNODE_DSTR(tail)->string))
24575 goto error;
24576 rb_parser_string_free(p, RNODE_DSTR(tail)->string);
24577 RNODE_DSTR(tail)->string = 0;
24578 goto append;
24579 }
24580 else {
24581 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));
24582 RNODE_DSTR(tail)->string = 0;
24583 }
24584 break;
24585
24586 case NODE_EVSTR:
24587 if (htype == NODE_STR) {
24588 head = str2dstr(p, head);
24589 RNODE_DSTR(head)->as.nd_alen = 1;
24590 }
24591 list_append(p, head, tail);
24592 break;
24593 }
24594 return head;
24595}
24596
24597static void
24598nd_copy_flag(NODE *new_node, NODE *old_node)
24599{
24600 if (nd_fl_newline(old_node)) nd_set_fl_newline(new_node);
24601 nd_set_line(new_node, nd_line(old_node));
24602 new_node->nd_loc = old_node->nd_loc;
24603 new_node->node_id = old_node->node_id;
24604}
24605
24606static NODE *
24607str2dstr(struct parser_params *p, NODE *node)
24608{
24609 NODE *new_node = (NODE *)NODE_NEW_INTERNAL(NODE_DSTR, rb_node_dstr_t);
24610 nd_copy_flag(new_node, node);
24611 RNODE_DSTR(new_node)->string = RNODE_STR(node)->string;
24612 RNODE_DSTR(new_node)->as.nd_alen = 0;
24613 RNODE_DSTR(new_node)->nd_next = 0;
24614 RNODE_STR(node)->string = 0;
24615
24616 return new_node;
24617}
24618
24619static NODE *
24620str2regx(struct parser_params *p, NODE *node, int options, const YYLTYPE *loc, const YYLTYPE *opening_loc, const YYLTYPE *content_loc, const YYLTYPE *closing_loc)
24621{
24622 NODE *new_node = (NODE *)NODE_NEW_INTERNAL(NODE_REGX, rb_node_regx_t);
24623 nd_copy_flag(new_node, node);
24624 RNODE_REGX(new_node)->string = RNODE_STR(node)->string;
24625 RNODE_REGX(new_node)->options = options;
24626 nd_set_loc(new_node, loc);
24627 RNODE_REGX(new_node)->opening_loc = *opening_loc;
24628 RNODE_REGX(new_node)->content_loc = *content_loc;
24629 RNODE_REGX(new_node)->closing_loc = *closing_loc;
24630 RNODE_STR(node)->string = 0;
24631
24632 return new_node;
24633}
24634
24635static NODE *
24636evstr2dstr(struct parser_params *p, NODE *node)
24637{
24638 if (nd_type_p(node, NODE_EVSTR)) {
24639 node = new_dstr(p, node, &node->nd_loc);
24640 }
24641 return node;
24642}
24643
24644static NODE *
24645new_evstr(struct parser_params *p, NODE *node, const YYLTYPE *loc, const YYLTYPE *opening_loc, const YYLTYPE *closing_loc)
24646{
24647 NODE *head = node;
24648
24649 if (node) {
24650 switch (nd_type(node)) {
24651 case NODE_STR:
24652 return str2dstr(p, node);
24653 case NODE_DSTR:
24654 break;
24655 case NODE_EVSTR:
24656 return node;
24657 }
24658 }
24659 return NEW_EVSTR(head, loc, opening_loc, closing_loc);
24660}
24661
24662static NODE *
24663new_dstr(struct parser_params *p, NODE *node, const YYLTYPE *loc)
24664{
24665 NODE *dstr = NEW_DSTR(STRING_NEW0(), loc);
24666 return list_append(p, dstr, node);
24667}
24668
24669static NODE *
24670call_bin_op(struct parser_params *p, NODE *recv, ID id, NODE *arg1,
24671 const YYLTYPE *op_loc, const YYLTYPE *loc)
24672{
24673 NODE *expr;
24674 value_expr(p, recv);
24675 value_expr(p, arg1);
24676 expr = NEW_OPCALL(recv, id, NEW_LIST(arg1, &arg1->nd_loc), loc);
24677 nd_set_line(expr, op_loc->beg_pos.lineno);
24678 return expr;
24679}
24680
24681static NODE *
24682call_uni_op(struct parser_params *p, NODE *recv, ID id, const YYLTYPE *op_loc, const YYLTYPE *loc)
24683{
24684 NODE *opcall;
24685 value_expr(p, recv);
24686 opcall = NEW_OPCALL(recv, id, 0, loc);
24687 nd_set_line(opcall, op_loc->beg_pos.lineno);
24688 return opcall;
24689}
24690
24691static NODE *
24692new_qcall(struct parser_params* p, ID atype, NODE *recv, ID mid, NODE *args, const YYLTYPE *op_loc, const YYLTYPE *loc)
24693{
24694 NODE *qcall = NEW_QCALL(atype, recv, mid, args, loc);
24695 nd_set_line(qcall, op_loc->beg_pos.lineno);
24696 return qcall;
24697}
24698
24699static NODE*
24700new_command_qcall(struct parser_params* p, ID atype, NODE *recv, ID mid, NODE *args, NODE *block, const YYLTYPE *op_loc, const YYLTYPE *loc)
24701{
24702 NODE *ret;
24703 if (block) block_dup_check(p, args, block);
24704 ret = new_qcall(p, atype, recv, mid, args, op_loc, loc);
24705 if (block) ret = method_add_block(p, ret, block, loc);
24706 fixpos(ret, recv);
24707 return ret;
24708}
24709
24711new_locations_lambda_body(struct parser_params* p, NODE *node, const YYLTYPE *loc, const YYLTYPE *opening_loc, const YYLTYPE *closing_loc)
24712{
24714 body->node = node;
24715 body->opening_loc = *opening_loc;
24716 body->closing_loc = *closing_loc;
24717 return body;
24718}
24719
24720#define nd_once_body(node) (nd_type_p((node), NODE_ONCE) ? RNODE_ONCE(node)->nd_body : node)
24721
24722static NODE*
24723last_expr_once_body(NODE *node)
24724{
24725 if (!node) return 0;
24726 return nd_once_body(node);
24727}
24728
24729static NODE*
24730match_op(struct parser_params *p, NODE *node1, NODE *node2, const YYLTYPE *op_loc, const YYLTYPE *loc)
24731{
24732 NODE *n;
24733 int line = op_loc->beg_pos.lineno;
24734
24735 value_expr(p, node1);
24736 value_expr(p, node2);
24737
24738 if ((n = last_expr_once_body(node1)) != 0) {
24739 switch (nd_type(n)) {
24740 case NODE_DREGX:
24741 {
24742 NODE *match = NEW_MATCH2(node1, node2, loc);
24743 nd_set_line(match, line);
24744 return match;
24745 }
24746
24747 case NODE_REGX:
24748 {
24749 const VALUE lit = rb_node_regx_string_val(n);
24750 if (!NIL_P(lit)) {
24751 NODE *match = NEW_MATCH2(node1, node2, loc);
24752 RNODE_MATCH2(match)->nd_args = reg_named_capture_assign(p, lit, loc, assignable);
24753 nd_set_line(match, line);
24754 return match;
24755 }
24756 }
24757 }
24758 }
24759
24760 if ((n = last_expr_once_body(node2)) != 0) {
24761 NODE *match3;
24762
24763 switch (nd_type(n)) {
24764 case NODE_DREGX:
24765 match3 = NEW_MATCH3(node2, node1, loc);
24766 return match3;
24767 }
24768 }
24769
24770 n = NEW_CALL(node1, tMATCH, NEW_LIST(node2, &node2->nd_loc), loc);
24771 nd_set_line(n, line);
24772 return n;
24773}
24774
24775# if WARN_PAST_SCOPE
24776static int
24777past_dvar_p(struct parser_params *p, ID id)
24778{
24779 struct vtable *past = p->lvtbl->past;
24780 while (past) {
24781 if (vtable_included(past, id)) return 1;
24782 past = past->prev;
24783 }
24784 return 0;
24785}
24786# endif
24787
24788static int
24789numparam_nested_p(struct parser_params *p)
24790{
24791 struct local_vars *local = p->lvtbl;
24792 NODE *outer = local->numparam.outer;
24793 NODE *inner = local->numparam.inner;
24794 if (outer || inner) {
24795 NODE *used = outer ? outer : inner;
24796 compile_error(p, "numbered parameter is already used in %s block\n"
24797 "%s:%d: numbered parameter is already used here",
24798 outer ? "outer" : "inner",
24799 p->ruby_sourcefile, nd_line(used));
24800 parser_show_error_line(p, &used->nd_loc);
24801 return 1;
24802 }
24803 return 0;
24804}
24805
24806static int
24807numparam_used_p(struct parser_params *p)
24808{
24809 NODE *numparam = p->lvtbl->numparam.current;
24810 if (numparam) {
24811 compile_error(p, "'it' is not allowed when a numbered parameter is already used\n"
24812 "%s:%d: numbered parameter is already used here",
24813 p->ruby_sourcefile, nd_line(numparam));
24814 parser_show_error_line(p, &numparam->nd_loc);
24815 return 1;
24816 }
24817 return 0;
24818}
24819
24820static int
24821it_used_p(struct parser_params *p)
24822{
24823 NODE *it = p->lvtbl->it;
24824 if (it) {
24825 compile_error(p, "numbered parameters are not allowed when 'it' is already used\n"
24826 "%s:%d: 'it' is already used here",
24827 p->ruby_sourcefile, nd_line(it));
24828 parser_show_error_line(p, &it->nd_loc);
24829 return 1;
24830 }
24831 return 0;
24832}
24833
24834static NODE*
24835gettable(struct parser_params *p, ID id, const YYLTYPE *loc)
24836{
24837 ID *vidp = NULL;
24838 NODE *node;
24839 switch (id) {
24840 case keyword_self:
24841 return NEW_SELF(loc);
24842 case keyword_nil:
24843 return NEW_NIL(loc);
24844 case keyword_true:
24845 return NEW_TRUE(loc);
24846 case keyword_false:
24847 return NEW_FALSE(loc);
24848 case keyword__FILE__:
24849 {
24850 VALUE file = p->ruby_sourcefile_string;
24851 if (NIL_P(file))
24852 file = rb_str_new(0, 0);
24853 node = NEW_FILE(file, loc);
24854 }
24855 return node;
24856 case keyword__LINE__:
24857 return NEW_LINE(loc);
24858 case keyword__ENCODING__:
24859 return NEW_ENCODING(loc);
24860
24861 }
24862 switch (id_type(id)) {
24863 case ID_LOCAL:
24864 if (dyna_in_block(p) && dvar_defined_ref(p, id, &vidp)) {
24865 if (NUMPARAM_ID_P(id) && (numparam_nested_p(p) || it_used_p(p))) return 0;
24866 if (vidp) *vidp |= LVAR_USED;
24867 node = NEW_DVAR(id, loc);
24868 return node;
24869 }
24870 if (local_id_ref(p, id, &vidp)) {
24871 if (vidp) *vidp |= LVAR_USED;
24872 node = NEW_LVAR(id, loc);
24873 return node;
24874 }
24875 if (dyna_in_block(p) && NUMPARAM_ID_P(id) &&
24876 parser_numbered_param(p, NUMPARAM_ID_TO_IDX(id))) {
24877 if (numparam_nested_p(p) || it_used_p(p)) return 0;
24878 node = NEW_DVAR(id, loc);
24879 struct local_vars *local = p->lvtbl;
24880 if (!local->numparam.current) local->numparam.current = node;
24881 return node;
24882 }
24883# if WARN_PAST_SCOPE
24884 if (!p->ctxt.in_defined && RTEST(ruby_verbose) && past_dvar_p(p, id)) {
24885 rb_warning1("possible reference to past scope - %"PRIsWARN, rb_id2str(id));
24886 }
24887# endif
24888 /* method call without arguments */
24889 if (dyna_in_block(p) && id == idIt && !(DVARS_TERMINAL_P(p->lvtbl->args) || DVARS_TERMINAL_P(p->lvtbl->args->prev))) {
24890 if (numparam_used_p(p)) return 0;
24891 if (p->max_numparam == ORDINAL_PARAM) {
24892 compile_error(p, "ordinary parameter is defined");
24893 return 0;
24894 }
24895 if (!p->it_id) {
24896 p->it_id = idItImplicit;
24897 vtable_add(p->lvtbl->args, p->it_id);
24898 }
24899 NODE *node = NEW_DVAR(p->it_id, loc);
24900 if (!p->lvtbl->it) p->lvtbl->it = node;
24901 return node;
24902 }
24903 return NEW_VCALL(id, loc);
24904 case ID_GLOBAL:
24905 return NEW_GVAR(id, loc);
24906 case ID_INSTANCE:
24907 return NEW_IVAR(id, loc);
24908 case ID_CONST:
24909 return NEW_CONST(id, loc);
24910 case ID_CLASS:
24911 return NEW_CVAR(id, loc);
24912 }
24913 compile_error(p, "identifier %"PRIsVALUE" is not valid to get", rb_id2str(id));
24914 return 0;
24915}
24916
24917static rb_node_opt_arg_t *
24918opt_arg_append(rb_node_opt_arg_t *opt_list, rb_node_opt_arg_t *opt)
24919{
24920 rb_node_opt_arg_t *opts = opt_list;
24921 RNODE(opts)->nd_loc.end_pos = RNODE(opt)->nd_loc.end_pos;
24922
24923 while (opts->nd_next) {
24924 opts = opts->nd_next;
24925 RNODE(opts)->nd_loc.end_pos = RNODE(opt)->nd_loc.end_pos;
24926 }
24927 opts->nd_next = opt;
24928
24929 return opt_list;
24930}
24931
24932static rb_node_kw_arg_t *
24933kwd_append(rb_node_kw_arg_t *kwlist, rb_node_kw_arg_t *kw)
24934{
24935 if (kwlist) {
24936 /* Assume rb_node_kw_arg_t and rb_node_opt_arg_t has same structure */
24937 opt_arg_append(RNODE_OPT_ARG(kwlist), RNODE_OPT_ARG(kw));
24938 }
24939 return kwlist;
24940}
24941
24942static NODE *
24943new_defined(struct parser_params *p, NODE *expr, const YYLTYPE *loc, const YYLTYPE *keyword_loc)
24944{
24945 int had_trailing_semicolon = p->ctxt.has_trailing_semicolon;
24946 p->ctxt.has_trailing_semicolon = 0;
24947
24948 NODE *n = expr;
24949 while (n) {
24950 if (nd_type_p(n, NODE_BEGIN)) {
24951 n = RNODE_BEGIN(n)->nd_body;
24952 }
24953 else if (nd_type_p(n, NODE_BLOCK) && RNODE_BLOCK(n)->nd_end == n) {
24954 n = RNODE_BLOCK(n)->nd_head;
24955 }
24956 else {
24957 break;
24958 }
24959 }
24960
24961 if (had_trailing_semicolon && !nd_type_p(expr, NODE_BLOCK)) {
24962 NODE *block = NEW_BLOCK(expr, loc);
24963 return NEW_DEFINED(block, loc, keyword_loc);
24964 }
24965
24966 return NEW_DEFINED(n, loc, keyword_loc);
24967}
24968
24969static NODE*
24970str_to_sym_node(struct parser_params *p, NODE *node, const YYLTYPE *loc)
24971{
24972 VALUE lit;
24973 rb_parser_string_t *str = RNODE_STR(node)->string;
24974 if (rb_parser_enc_str_coderange(p, str) == RB_PARSER_ENC_CODERANGE_BROKEN) {
24975 yyerror1(loc, "invalid symbol");
24976 lit = STR_NEW0();
24977 }
24978 else {
24979 lit = rb_str_new_parser_string(str);
24980 }
24981 return NEW_SYM(lit, loc);
24982}
24983
24984static NODE*
24985symbol_append(struct parser_params *p, NODE *symbols, NODE *symbol)
24986{
24987 enum node_type type = nd_type(symbol);
24988 switch (type) {
24989 case NODE_DSTR:
24990 nd_set_type(symbol, NODE_DSYM);
24991 break;
24992 case NODE_STR:
24993 symbol = str_to_sym_node(p, symbol, &RNODE(symbol)->nd_loc);
24994 break;
24995 default:
24996 compile_error(p, "unexpected node as symbol: %s", parser_node_name(type));
24997 }
24998 return list_append(p, symbols, symbol);
24999}
25000
25001static void
25002dregex_fragment_setenc(struct parser_params *p, rb_node_dregx_t *const dreg, int options)
25003{
25004 if (dreg->string) {
25005 reg_fragment_setenc(p, dreg->string, options);
25006 }
25007 for (struct RNode_LIST *list = dreg->nd_next; list; list = RNODE_LIST(list->nd_next)) {
25008 NODE *frag = list->nd_head;
25009 if (nd_type_p(frag, NODE_STR)) {
25010 reg_fragment_setenc(p, RNODE_STR(frag)->string, options);
25011 }
25012 else if (nd_type_p(frag, NODE_DSTR)) {
25013 dregex_fragment_setenc(p, RNODE_DSTR(frag), options);
25014 }
25015 }
25016}
25017
25018static NODE *
25019new_regexp(struct parser_params *p, NODE *node, int options, const YYLTYPE *loc, const YYLTYPE *opening_loc, const YYLTYPE *content_loc, const YYLTYPE *closing_loc)
25020{
25021 if (!node) {
25022 /* Check string is valid regex */
25023 rb_parser_string_t *str = STRING_NEW0();
25024 reg_compile(p, str, options);
25025 node = NEW_REGX(str, options, loc, opening_loc, content_loc, closing_loc);
25026 return node;
25027 }
25028 switch (nd_type(node)) {
25029 case NODE_STR:
25030 {
25031 /* Check string is valid regex */
25032 reg_compile(p, RNODE_STR(node)->string, options);
25033 node = str2regx(p, node, options, loc, opening_loc, content_loc, closing_loc);
25034 }
25035 break;
25036 default:
25037 node = NEW_DSTR0(STRING_NEW0(), 1, NEW_LIST(node, loc), loc);
25038 /* fall through */
25039 case NODE_DSTR:
25040 nd_set_type(node, NODE_DREGX);
25041 nd_set_loc(node, loc);
25042 rb_node_dregx_t *const dreg = RNODE_DREGX(node);
25043 dreg->as.nd_cflag = options & RE_OPTION_MASK;
25044 if (dreg->nd_next) {
25045 dregex_fragment_setenc(p, dreg, options);
25046 }
25047 if (options & RE_OPTION_ONCE) {
25048 node = NEW_ONCE(node, loc);
25049 }
25050 break;
25051 }
25052 return node;
25053}
25054
25055static rb_node_kw_arg_t *
25056new_kw_arg(struct parser_params *p, NODE *k, const YYLTYPE *loc)
25057{
25058 if (!k) return 0;
25059 return NEW_KW_ARG((k), loc);
25060}
25061
25062static NODE *
25063new_xstring(struct parser_params *p, NODE *node, const YYLTYPE *loc)
25064{
25065 if (!node) {
25066 NODE *xstr = NEW_XSTR(STRING_NEW0(), loc);
25067 return xstr;
25068 }
25069 switch (nd_type(node)) {
25070 case NODE_STR:
25071 nd_set_type(node, NODE_XSTR);
25072 nd_set_loc(node, loc);
25073 break;
25074 case NODE_DSTR:
25075 nd_set_type(node, NODE_DXSTR);
25076 nd_set_loc(node, loc);
25077 break;
25078 default:
25079 node = NEW_DXSTR(0, 1, NEW_LIST(node, loc), loc);
25080 break;
25081 }
25082 return node;
25083}
25084
25085static const
25086struct st_hash_type literal_type = {
25087 literal_cmp,
25088 literal_hash,
25089};
25090
25091static int nd_type_st_key_enable_p(NODE *node);
25092
25093static void
25094check_literal_when(struct parser_params *p, NODE *arg, const YYLTYPE *loc)
25095{
25096 /* See https://bugs.ruby-lang.org/issues/20331 for discussion about what is warned. */
25097 if (!arg || !p->case_labels) return;
25098 if (!nd_type_st_key_enable_p(arg)) return;
25099
25100 if (p->case_labels == CHECK_LITERAL_WHEN) {
25101 p->case_labels = st_init_table(&literal_type);
25102 }
25103 else {
25104 st_data_t line;
25105 if (st_lookup(p->case_labels, (st_data_t)arg, &line)) {
25106 rb_warning2("'when' clause on line %d duplicates 'when' clause on line %d and is ignored",
25107 WARN_I((int)nd_line(arg)), WARN_I((int)line));
25108 return;
25109 }
25110 }
25111 st_insert(p->case_labels, (st_data_t)arg, (st_data_t)p->ruby_sourceline);
25112}
25113
25114#ifdef RIPPER
25115static int
25116id_is_var(struct parser_params *p, ID id)
25117{
25118 if (is_notop_id(id)) {
25119 switch (id & ID_SCOPE_MASK) {
25120 case ID_GLOBAL: case ID_INSTANCE: case ID_CONST: case ID_CLASS:
25121 return 1;
25122 case ID_LOCAL:
25123 if (dyna_in_block(p)) {
25124 if (NUMPARAM_ID_P(id) || dvar_defined(p, id)) return 1;
25125 }
25126 if (local_id(p, id)) return 1;
25127 /* method call without arguments */
25128 return 0;
25129 }
25130 }
25131 compile_error(p, "identifier %"PRIsVALUE" is not valid to get", rb_id2str(id));
25132 return 0;
25133}
25134#endif
25135
25136static inline enum lex_state_e
25137parser_set_lex_state(struct parser_params *p, enum lex_state_e ls, int line)
25138{
25139 if (p->debug) {
25140 ls = rb_parser_trace_lex_state(p, p->lex.state, ls, line);
25141 }
25142 return p->lex.state = ls;
25143}
25144
25145#ifndef RIPPER
25146static void
25147flush_debug_buffer(struct parser_params *p, VALUE out, VALUE str)
25148{
25149 VALUE mesg = p->debug_buffer;
25150
25151 if (!NIL_P(mesg) && RSTRING_LEN(mesg)) {
25152 p->debug_buffer = Qnil;
25153 rb_io_puts(1, &mesg, out);
25154 }
25155 if (!NIL_P(str) && RSTRING_LEN(str)) {
25156 rb_io_write(p->debug_output, str);
25157 }
25158}
25159
25160static const char rb_parser_lex_state_names[][8] = {
25161 "BEG", "END", "ENDARG", "ENDFN", "ARG",
25162 "CMDARG", "MID", "FNAME", "DOT", "CLASS",
25163 "LABEL", "LABELED","FITEM",
25164};
25165
25166static VALUE
25167append_lex_state_name(struct parser_params *p, enum lex_state_e state, VALUE buf)
25168{
25169 int i, sep = 0;
25170 unsigned int mask = 1;
25171 static const char none[] = "NONE";
25172
25173 for (i = 0; i < EXPR_MAX_STATE; ++i, mask <<= 1) {
25174 if ((unsigned)state & mask) {
25175 if (sep) {
25176 rb_str_cat(buf, "|", 1);
25177 }
25178 sep = 1;
25179 rb_str_cat_cstr(buf, rb_parser_lex_state_names[i]);
25180 }
25181 }
25182 if (!sep) {
25183 rb_str_cat(buf, none, sizeof(none)-1);
25184 }
25185 return buf;
25186}
25187
25188enum lex_state_e
25189rb_parser_trace_lex_state(struct parser_params *p, enum lex_state_e from,
25190 enum lex_state_e to, int line)
25191{
25192 VALUE mesg;
25193 mesg = rb_str_new_cstr("lex_state: ");
25194 append_lex_state_name(p, from, mesg);
25195 rb_str_cat_cstr(mesg, " -> ");
25196 append_lex_state_name(p, to, mesg);
25197 rb_str_catf(mesg, " at line %d\n", line);
25198 flush_debug_buffer(p, p->debug_output, mesg);
25199 return to;
25200}
25201
25202VALUE
25203rb_parser_lex_state_name(struct parser_params *p, enum lex_state_e state)
25204{
25205 return rb_str_to_interned_str(append_lex_state_name(p, state, rb_str_new(0, 0)));
25206}
25207
25208static void
25209append_bitstack_value(struct parser_params *p, stack_type stack, VALUE mesg)
25210{
25211 if (stack == 0) {
25212 rb_str_cat_cstr(mesg, "0");
25213 }
25214 else {
25215 stack_type mask = (stack_type)1U << (CHAR_BIT * sizeof(stack_type) - 1);
25216 for (; mask && !(stack & mask); mask >>= 1) continue;
25217 for (; mask; mask >>= 1) rb_str_cat(mesg, stack & mask ? "1" : "0", 1);
25218 }
25219}
25220
25221void
25222rb_parser_show_bitstack(struct parser_params *p, stack_type stack,
25223 const char *name, int line)
25224{
25225 VALUE mesg = rb_sprintf("%s: ", name);
25226 append_bitstack_value(p, stack, mesg);
25227 rb_str_catf(mesg, " at line %d\n", line);
25228 flush_debug_buffer(p, p->debug_output, mesg);
25229}
25230
25231void
25232rb_parser_fatal(struct parser_params *p, const char *fmt, ...)
25233{
25234 va_list ap;
25235 VALUE mesg = rb_str_new_cstr("internal parser error: ");
25236
25237 va_start(ap, fmt);
25238 rb_str_vcatf(mesg, fmt, ap);
25239 va_end(ap);
25240 yyerror0(RSTRING_PTR(mesg));
25241 RB_GC_GUARD(mesg);
25242
25243 mesg = rb_str_new(0, 0);
25244 append_lex_state_name(p, p->lex.state, mesg);
25245 compile_error(p, "lex.state: %"PRIsVALUE, mesg);
25246 rb_str_resize(mesg, 0);
25247 append_bitstack_value(p, p->cond_stack, mesg);
25248 compile_error(p, "cond_stack: %"PRIsVALUE, mesg);
25249 rb_str_resize(mesg, 0);
25250 append_bitstack_value(p, p->cmdarg_stack, mesg);
25251 compile_error(p, "cmdarg_stack: %"PRIsVALUE, mesg);
25252 if (p->debug_output == rb_ractor_stdout())
25253 p->debug_output = rb_ractor_stderr();
25254 p->debug = TRUE;
25255}
25256
25257static YYLTYPE *
25258rb_parser_set_pos(YYLTYPE *yylloc, int sourceline, int beg_pos, int end_pos)
25259{
25260 yylloc->beg_pos.lineno = sourceline;
25261 yylloc->beg_pos.column = beg_pos;
25262 yylloc->end_pos.lineno = sourceline;
25263 yylloc->end_pos.column = end_pos;
25264 return yylloc;
25265}
25266
25267YYLTYPE *
25268rb_parser_set_location_from_strterm_heredoc(struct parser_params *p, rb_strterm_heredoc_t *here, YYLTYPE *yylloc)
25269{
25270 int sourceline = here->sourceline;
25271 int beg_pos = (int)here->offset - here->quote
25272 - (rb_strlen_lit("<<-") - !(here->func & STR_FUNC_INDENT));
25273 int end_pos = (int)here->offset + here->length + here->quote;
25274
25275 return rb_parser_set_pos(yylloc, sourceline, beg_pos, end_pos);
25276}
25277
25278YYLTYPE *
25279rb_parser_set_location_of_delayed_token(struct parser_params *p, YYLTYPE *yylloc)
25280{
25281 yylloc->beg_pos.lineno = p->delayed.beg_line;
25282 yylloc->beg_pos.column = p->delayed.beg_col;
25283 yylloc->end_pos.lineno = p->delayed.end_line;
25284 yylloc->end_pos.column = p->delayed.end_col;
25285
25286 return yylloc;
25287}
25288
25289YYLTYPE *
25290rb_parser_set_location_of_heredoc_end(struct parser_params *p, YYLTYPE *yylloc)
25291{
25292 int sourceline = p->ruby_sourceline;
25293 int beg_pos = (int)(p->lex.ptok - p->lex.pbeg);
25294 int end_pos = (int)(p->lex.pend - p->lex.pbeg);
25295 return rb_parser_set_pos(yylloc, sourceline, beg_pos, end_pos);
25296}
25297
25298YYLTYPE *
25299rb_parser_set_location_of_dummy_end(struct parser_params *p, YYLTYPE *yylloc)
25300{
25301 yylloc->end_pos = yylloc->beg_pos;
25302
25303 return yylloc;
25304}
25305
25306YYLTYPE *
25307rb_parser_set_location_of_none(struct parser_params *p, YYLTYPE *yylloc)
25308{
25309 int sourceline = p->ruby_sourceline;
25310 int beg_pos = (int)(p->lex.ptok - p->lex.pbeg);
25311 int end_pos = (int)(p->lex.ptok - p->lex.pbeg);
25312 return rb_parser_set_pos(yylloc, sourceline, beg_pos, end_pos);
25313}
25314
25315YYLTYPE *
25316rb_parser_set_location(struct parser_params *p, YYLTYPE *yylloc)
25317{
25318 int sourceline = p->ruby_sourceline;
25319 int beg_pos = (int)(p->lex.ptok - p->lex.pbeg);
25320 int end_pos = (int)(p->lex.pcur - p->lex.pbeg);
25321 return rb_parser_set_pos(yylloc, sourceline, beg_pos, end_pos);
25322}
25323#endif /* !RIPPER */
25324
25325static int
25326assignable0(struct parser_params *p, ID id, const char **err)
25327{
25328 if (!id) return -1;
25329 switch (id) {
25330 case keyword_self:
25331 *err = "Can't change the value of self";
25332 return -1;
25333 case keyword_nil:
25334 *err = "Can't assign to nil";
25335 return -1;
25336 case keyword_true:
25337 *err = "Can't assign to true";
25338 return -1;
25339 case keyword_false:
25340 *err = "Can't assign to false";
25341 return -1;
25342 case keyword__FILE__:
25343 *err = "Can't assign to __FILE__";
25344 return -1;
25345 case keyword__LINE__:
25346 *err = "Can't assign to __LINE__";
25347 return -1;
25348 case keyword__ENCODING__:
25349 *err = "Can't assign to __ENCODING__";
25350 return -1;
25351 }
25352 switch (id_type(id)) {
25353 case ID_LOCAL:
25354 if (dyna_in_block(p)) {
25355 if (p->max_numparam > NO_PARAM && NUMPARAM_ID_P(id)) {
25356 compile_error(p, "Can't assign to numbered parameter _%d",
25357 NUMPARAM_ID_TO_IDX(id));
25358 return -1;
25359 }
25360 if (dvar_curr(p, id)) return NODE_DASGN;
25361 if (dvar_defined(p, id)) return NODE_DASGN;
25362 if (local_id(p, id)) return NODE_LASGN;
25363 dyna_var(p, id);
25364 return NODE_DASGN;
25365 }
25366 else {
25367 if (!local_id(p, id)) local_var(p, id);
25368 return NODE_LASGN;
25369 }
25370 break;
25371 case ID_GLOBAL: return NODE_GASGN;
25372 case ID_INSTANCE: return NODE_IASGN;
25373 case ID_CONST:
25374 if (!p->ctxt.in_def) return NODE_CDECL;
25375 *err = "dynamic constant assignment";
25376 return -1;
25377 case ID_CLASS: return NODE_CVASGN;
25378 default:
25379 compile_error(p, "identifier %"PRIsVALUE" is not valid to set", rb_id2str(id));
25380 }
25381 return -1;
25382}
25383
25384static NODE*
25385assignable(struct parser_params *p, ID id, NODE *val, const YYLTYPE *loc)
25386{
25387 const char *err = 0;
25388 int node_type = assignable0(p, id, &err);
25389 switch (node_type) {
25390 case NODE_DASGN: return NEW_DASGN(id, val, loc);
25391 case NODE_LASGN: return NEW_LASGN(id, val, loc);
25392 case NODE_GASGN: return NEW_GASGN(id, val, loc);
25393 case NODE_IASGN: return NEW_IASGN(id, val, loc);
25394 case NODE_CDECL: return NEW_CDECL(id, val, 0, p->ctxt.shareable_constant_value, loc);
25395 case NODE_CVASGN: return NEW_CVASGN(id, val, loc);
25396 }
25397/* TODO: FIXME */
25398#ifndef RIPPER
25399 if (err) yyerror1(loc, err);
25400#else
25401 if (err) set_value(assign_error(p, err, p->s_lvalue));
25402#endif
25403 return NEW_ERROR(loc);
25404}
25405
25406static int
25407is_private_local_id(struct parser_params *p, ID name)
25408{
25409 VALUE s;
25410 if (name == idUScore) return 1;
25411 if (!is_local_id(name)) return 0;
25412 s = rb_id2str(name);
25413 if (!s) return 0;
25414 return RSTRING_PTR(s)[0] == '_';
25415}
25416
25417static int
25418shadowing_lvar_0(struct parser_params *p, ID name)
25419{
25420 if (dyna_in_block(p)) {
25421 if (dvar_curr(p, name)) {
25422 if (is_private_local_id(p, name)) return 1;
25423 yyerror0("duplicated argument name");
25424 }
25425 else if (dvar_defined(p, name) || local_id(p, name)) {
25426 vtable_add(p->lvtbl->vars, name);
25427 if (p->lvtbl->used) {
25428 vtable_add(p->lvtbl->used, (ID)p->ruby_sourceline | LVAR_USED);
25429 }
25430 return 0;
25431 }
25432 }
25433 else {
25434 if (local_id(p, name)) {
25435 if (is_private_local_id(p, name)) return 1;
25436 yyerror0("duplicated argument name");
25437 }
25438 }
25439 return 1;
25440}
25441
25442static ID
25443shadowing_lvar(struct parser_params *p, ID name)
25444{
25445 shadowing_lvar_0(p, name);
25446 return name;
25447}
25448
25449static void
25450new_bv(struct parser_params *p, ID name)
25451{
25452 if (!name) return;
25453 if (!is_local_id(name)) {
25454 compile_error(p, "invalid local variable - %"PRIsVALUE,
25455 rb_id2str(name));
25456 return;
25457 }
25458 if (!shadowing_lvar_0(p, name)) return;
25459 dyna_var(p, name);
25460 ID *vidp = 0;
25461 if (dvar_defined_ref(p, name, &vidp)) {
25462 if (vidp) *vidp |= LVAR_USED;
25463 }
25464}
25465
25466static void
25467aryset_check(struct parser_params *p, NODE *args)
25468{
25469 NODE *block = 0, *kwds = 0;
25470 if (args && nd_type_p(args, NODE_BLOCK_PASS)) {
25471 block = RNODE_BLOCK_PASS(args)->nd_body;
25472 args = RNODE_BLOCK_PASS(args)->nd_head;
25473 }
25474 if (args && nd_type_p(args, NODE_ARGSCAT)) {
25475 args = RNODE_ARGSCAT(args)->nd_body;
25476 }
25477 if (args && nd_type_p(args, NODE_ARGSPUSH)) {
25478 kwds = RNODE_ARGSPUSH(args)->nd_body;
25479 }
25480 else {
25481 for (NODE *next = args; next && nd_type_p(next, NODE_LIST);
25482 next = RNODE_LIST(next)->nd_next) {
25483 kwds = RNODE_LIST(next)->nd_head;
25484 }
25485 }
25486 if (kwds && nd_type_p(kwds, NODE_HASH) && !RNODE_HASH(kwds)->nd_brace) {
25487 yyerror1(&kwds->nd_loc, "keyword arg given in index assignment");
25488 }
25489 if (block) {
25490 yyerror1(&block->nd_loc, "block arg given in index assignment");
25491 }
25492}
25493
25494static NODE *
25495aryset(struct parser_params *p, NODE *recv, NODE *idx, const YYLTYPE *loc)
25496{
25497 aryset_check(p, idx);
25498 return NEW_ATTRASGN(recv, tASET, idx, loc);
25499}
25500
25501static void
25502block_dup_check(struct parser_params *p, NODE *node1, NODE *node2)
25503{
25504 if (node2 && node1 && nd_type_p(node1, NODE_BLOCK_PASS)) {
25505 compile_error(p, "both block arg and actual block given");
25506 }
25507}
25508
25509static NODE *
25510attrset(struct parser_params *p, NODE *recv, ID atype, ID id, const YYLTYPE *loc)
25511{
25512 if (!CALL_Q_P(atype)) id = rb_id_attrset(id);
25513 return NEW_ATTRASGN(recv, id, 0, loc);
25514}
25515
25516static VALUE
25517rb_backref_error(struct parser_params *p, NODE *node)
25518{
25519#ifndef RIPPER
25520# define ERR(...) (compile_error(p, __VA_ARGS__), Qtrue)
25521#else
25522# define ERR(...) rb_sprintf(__VA_ARGS__)
25523#endif
25524 switch (nd_type(node)) {
25525 case NODE_NTH_REF:
25526 return ERR("Can't set variable $%ld", RNODE_NTH_REF(node)->nd_nth);
25527 case NODE_BACK_REF:
25528 return ERR("Can't set variable $%c", (int)RNODE_BACK_REF(node)->nd_nth);
25529 }
25530#undef ERR
25531 UNREACHABLE_RETURN(Qfalse); /* only called on syntax error */
25532}
25533
25534static NODE *
25535arg_append(struct parser_params *p, NODE *node1, NODE *node2, const YYLTYPE *loc)
25536{
25537 if (!node1) return NEW_LIST(node2, &node2->nd_loc);
25538 switch (nd_type(node1)) {
25539 case NODE_LIST:
25540 return list_append(p, node1, node2);
25541 case NODE_BLOCK_PASS:
25542 RNODE_BLOCK_PASS(node1)->nd_head = arg_append(p, RNODE_BLOCK_PASS(node1)->nd_head, node2, loc);
25543 node1->nd_loc.end_pos = RNODE_BLOCK_PASS(node1)->nd_head->nd_loc.end_pos;
25544 return node1;
25545 case NODE_ARGSPUSH:
25546 RNODE_ARGSPUSH(node1)->nd_body = list_append(p, NEW_LIST(RNODE_ARGSPUSH(node1)->nd_body, &RNODE_ARGSPUSH(node1)->nd_body->nd_loc), node2);
25547 node1->nd_loc.end_pos = RNODE_ARGSPUSH(node1)->nd_body->nd_loc.end_pos;
25548 nd_set_type(node1, NODE_ARGSCAT);
25549 return node1;
25550 case NODE_ARGSCAT:
25551 if (!nd_type_p(RNODE_ARGSCAT(node1)->nd_body, NODE_LIST)) break;
25552 RNODE_ARGSCAT(node1)->nd_body = list_append(p, RNODE_ARGSCAT(node1)->nd_body, node2);
25553 node1->nd_loc.end_pos = RNODE_ARGSCAT(node1)->nd_body->nd_loc.end_pos;
25554 return node1;
25555 }
25556 return NEW_ARGSPUSH(node1, node2, loc);
25557}
25558
25559static NODE *
25560arg_concat(struct parser_params *p, NODE *node1, NODE *node2, const YYLTYPE *loc)
25561{
25562 if (!node2) return node1;
25563 switch (nd_type(node1)) {
25564 case NODE_BLOCK_PASS:
25565 if (RNODE_BLOCK_PASS(node1)->nd_head)
25566 RNODE_BLOCK_PASS(node1)->nd_head = arg_concat(p, RNODE_BLOCK_PASS(node1)->nd_head, node2, loc);
25567 else
25568 RNODE_LIST(node1)->nd_head = NEW_LIST(node2, loc);
25569 return node1;
25570 case NODE_ARGSPUSH:
25571 if (!nd_type_p(node2, NODE_LIST)) break;
25572 RNODE_ARGSPUSH(node1)->nd_body = list_concat(NEW_LIST(RNODE_ARGSPUSH(node1)->nd_body, loc), node2);
25573 nd_set_type(node1, NODE_ARGSCAT);
25574 return node1;
25575 case NODE_ARGSCAT:
25576 if (!nd_type_p(node2, NODE_LIST) ||
25577 !nd_type_p(RNODE_ARGSCAT(node1)->nd_body, NODE_LIST)) break;
25578 RNODE_ARGSCAT(node1)->nd_body = list_concat(RNODE_ARGSCAT(node1)->nd_body, node2);
25579 return node1;
25580 }
25581 return NEW_ARGSCAT(node1, node2, loc);
25582}
25583
25584static NODE *
25585last_arg_append(struct parser_params *p, NODE *args, NODE *last_arg, const YYLTYPE *loc)
25586{
25587 NODE *n1;
25588 if ((n1 = splat_array(args)) != 0) {
25589 return list_append(p, n1, last_arg);
25590 }
25591 return arg_append(p, args, last_arg, loc);
25592}
25593
25594static NODE *
25595rest_arg_append(struct parser_params *p, NODE *args, NODE *rest_arg, const YYLTYPE *loc)
25596{
25597 NODE *n1;
25598 if ((nd_type_p(rest_arg, NODE_LIST)) && (n1 = splat_array(args)) != 0) {
25599 return list_concat(n1, rest_arg);
25600 }
25601 return arg_concat(p, args, rest_arg, loc);
25602}
25603
25604static NODE *
25605splat_array(NODE* node)
25606{
25607 if (nd_type_p(node, NODE_SPLAT)) node = RNODE_SPLAT(node)->nd_head;
25608 if (nd_type_p(node, NODE_LIST)) return node;
25609 return 0;
25610}
25611
25612static void
25613mark_lvar_used(struct parser_params *p, NODE *rhs)
25614{
25615 ID *vidp = NULL;
25616 if (!rhs) return;
25617 switch (nd_type(rhs)) {
25618 case NODE_LASGN:
25619 if (local_id_ref(p, RNODE_LASGN(rhs)->nd_vid, &vidp)) {
25620 if (vidp) *vidp |= LVAR_USED;
25621 }
25622 break;
25623 case NODE_DASGN:
25624 if (dvar_defined_ref(p, RNODE_DASGN(rhs)->nd_vid, &vidp)) {
25625 if (vidp) *vidp |= LVAR_USED;
25626 }
25627 break;
25628#if 0
25629 case NODE_MASGN:
25630 for (rhs = rhs->nd_head; rhs; rhs = rhs->nd_next) {
25631 mark_lvar_used(p, rhs->nd_head);
25632 }
25633 break;
25634#endif
25635 }
25636}
25637
25638static int is_static_content(NODE *node);
25639
25640static NODE *
25641node_assign(struct parser_params *p, NODE *lhs, NODE *rhs, struct lex_context ctxt, const YYLTYPE *loc)
25642{
25643 if (!lhs) return 0;
25644
25645 switch (nd_type(lhs)) {
25646 case NODE_CDECL:
25647 case NODE_GASGN:
25648 case NODE_IASGN:
25649 case NODE_LASGN:
25650 case NODE_DASGN:
25651 case NODE_MASGN:
25652 case NODE_CVASGN:
25653 set_nd_value(p, lhs, rhs);
25654 nd_set_loc(lhs, loc);
25655 break;
25656
25657 case NODE_ATTRASGN:
25658 RNODE_ATTRASGN(lhs)->nd_args = arg_append(p, RNODE_ATTRASGN(lhs)->nd_args, rhs, loc);
25659 nd_set_loc(lhs, loc);
25660 break;
25661
25662 default:
25663 /* should not happen */
25664 break;
25665 }
25666
25667 return lhs;
25668}
25669
25670static NODE *
25671value_expr_check(struct parser_params *p, NODE *node)
25672{
25673 NODE *void_node = 0, *vn;
25674
25675 if (!node) {
25676 rb_warning0("empty expression");
25677 }
25678 while (node) {
25679 switch (nd_type(node)) {
25680 case NODE_ENSURE:
25681 vn = RNODE_ENSURE(node)->nd_head;
25682 node = RNODE_ENSURE(node)->nd_ensr;
25683 /* nd_ensr should not be NULL, check it out next */
25684 if (vn && (vn = value_expr_check(p, vn))) {
25685 goto found;
25686 }
25687 break;
25688
25689 case NODE_RESCUE:
25690 /* void only if all children are void */
25691 vn = RNODE_RESCUE(node)->nd_head;
25692 if (!vn || !(vn = value_expr_check(p, vn))) {
25693 if (!RNODE_RESCUE(node)->nd_else) return NULL;
25694 }
25695 if (!void_node) void_node = vn;
25696 for (NODE *r = RNODE_RESCUE(node)->nd_resq; r; r = RNODE_RESBODY(r)->nd_next) {
25697 if (!nd_type_p(r, NODE_RESBODY)) {
25698 compile_error(p, "unexpected node");
25699 return NULL;
25700 }
25701 if (!(vn = value_expr_check(p, RNODE_RESBODY(r)->nd_body))) {
25702 return NULL;
25703 }
25704 if (!void_node) void_node = vn;
25705 }
25706 node = RNODE_RESCUE(node)->nd_else;
25707 if (!node) return void_node;
25708 break;
25709
25710 case NODE_RETURN:
25711 case NODE_BREAK:
25712 case NODE_NEXT:
25713 case NODE_REDO:
25714 case NODE_RETRY:
25715 goto found;
25716
25717 case NODE_CASE:
25718 case NODE_CASE2:
25719 for (node = RNODE_CASE(node)->nd_body;
25720 node && nd_type_p(node, NODE_WHEN);
25721 node = RNODE_WHEN(node)->nd_next) {
25722 if (!(vn = value_expr_check(p, RNODE_WHEN(node)->nd_body))) {
25723 return NULL;
25724 }
25725 if (!void_node) void_node = vn;
25726 }
25727 break;
25728
25729 case NODE_CASE3:
25730 {
25731 NODE *in = RNODE_CASE3(node)->nd_body;
25732 if (!in || !nd_type_p(in, NODE_IN)) {
25733 compile_error(p, "unexpected node");
25734 return NULL;
25735 }
25736 if (!RNODE_IN(in)->nd_body) {
25737 /* single line pattern matching with "=>" operator */
25738 goto found;
25739 }
25740 do {
25741 vn = value_expr_check(p, RNODE_IN(in)->nd_body);
25742 if (!vn) return NULL;
25743 if (!void_node) void_node = vn;
25744 in = RNODE_IN(in)->nd_next;
25745 } while (in && nd_type_p(in, NODE_IN));
25746 node = in; /* else */
25747 }
25748 break;
25749
25750 case NODE_BLOCK:
25751 while (RNODE_BLOCK(node)->nd_next) {
25752 vn = value_expr_check(p, RNODE_BLOCK(node)->nd_head);
25753 if (vn) return vn;
25754 node = RNODE_BLOCK(node)->nd_next;
25755 }
25756 node = RNODE_BLOCK(node)->nd_head;
25757 break;
25758
25759 case NODE_BEGIN:
25760 node = RNODE_BEGIN(node)->nd_body;
25761 break;
25762
25763 case NODE_IF:
25764 case NODE_UNLESS:
25765 if (!RNODE_IF(node)->nd_body) {
25766 return NULL;
25767 }
25768 else if (!RNODE_IF(node)->nd_else) {
25769 return NULL;
25770 }
25771 vn = value_expr_check(p, RNODE_IF(node)->nd_body);
25772 if (!vn) return NULL;
25773 if (!void_node) void_node = vn;
25774 node = RNODE_IF(node)->nd_else;
25775 break;
25776
25777 case NODE_AND:
25778 case NODE_OR:
25779 node = RNODE_AND(node)->nd_1st;
25780 break;
25781
25782 case NODE_LASGN:
25783 case NODE_DASGN:
25784 case NODE_MASGN:
25785 mark_lvar_used(p, node);
25786 return NULL;
25787
25788 default:
25789 return NULL;
25790 }
25791 }
25792
25793 return NULL;
25794
25795 found:
25796 /* return the first found node */
25797 return void_node ? void_node : node;
25798}
25799
25800static int
25801value_expr(struct parser_params *p, NODE *node)
25802{
25803 NODE *void_node = value_expr_check(p, node);
25804 if (void_node) {
25805 yyerror1(&void_node->nd_loc, "void value expression");
25806 /* or "control never reach"? */
25807 return FALSE;
25808 }
25809 return TRUE;
25810}
25811
25812static void
25813void_expr(struct parser_params *p, NODE *node)
25814{
25815 const char *useless = 0;
25816
25817 if (!RTEST(ruby_verbose)) return;
25818
25819 if (!node || !(node = nd_once_body(node))) return;
25820 switch (nd_type(node)) {
25821 case NODE_OPCALL:
25822 switch (RNODE_OPCALL(node)->nd_mid) {
25823 case '+':
25824 case '-':
25825 case '*':
25826 case '/':
25827 case '%':
25828 case tPOW:
25829 case tUPLUS:
25830 case tUMINUS:
25831 case '|':
25832 case '^':
25833 case '&':
25834 case tCMP:
25835 case '>':
25836 case tGEQ:
25837 case '<':
25838 case tLEQ:
25839 case tEQ:
25840 case tNEQ:
25841 useless = rb_id2name(RNODE_OPCALL(node)->nd_mid);
25842 break;
25843 }
25844 break;
25845
25846 case NODE_LVAR:
25847 case NODE_DVAR:
25848 case NODE_GVAR:
25849 case NODE_IVAR:
25850 case NODE_CVAR:
25851 case NODE_NTH_REF:
25852 case NODE_BACK_REF:
25853 useless = "a variable";
25854 break;
25855 case NODE_CONST:
25856 useless = "a constant";
25857 break;
25858 case NODE_SYM:
25859 case NODE_LINE:
25860 case NODE_FILE:
25861 case NODE_ENCODING:
25862 case NODE_INTEGER:
25863 case NODE_FLOAT:
25864 case NODE_RATIONAL:
25865 case NODE_IMAGINARY:
25866 case NODE_STR:
25867 case NODE_DSTR:
25868 case NODE_REGX:
25869 case NODE_DREGX:
25870 useless = "a literal";
25871 break;
25872 case NODE_COLON2:
25873 case NODE_COLON3:
25874 useless = "::";
25875 break;
25876 case NODE_DOT2:
25877 useless = "..";
25878 break;
25879 case NODE_DOT3:
25880 useless = "...";
25881 break;
25882 case NODE_SELF:
25883 useless = "self";
25884 break;
25885 case NODE_NIL:
25886 useless = "nil";
25887 break;
25888 case NODE_TRUE:
25889 useless = "true";
25890 break;
25891 case NODE_FALSE:
25892 useless = "false";
25893 break;
25894 case NODE_DEFINED:
25895 useless = "defined?";
25896 break;
25897 }
25898
25899 if (useless) {
25900 rb_warn1L(nd_line(node), "possibly useless use of %s in void context", WARN_S(useless));
25901 }
25902}
25903
25904/* warns useless use of block and returns the last statement node */
25905static NODE *
25906void_stmts(struct parser_params *p, NODE *node)
25907{
25908 NODE *const n = node;
25909 if (!RTEST(ruby_verbose)) return n;
25910 if (!node) return n;
25911 if (!nd_type_p(node, NODE_BLOCK)) return n;
25912
25913 while (RNODE_BLOCK(node)->nd_next) {
25914 void_expr(p, RNODE_BLOCK(node)->nd_head);
25915 node = RNODE_BLOCK(node)->nd_next;
25916 }
25917 return RNODE_BLOCK(node)->nd_head;
25918}
25919
25920static NODE *
25921remove_begin(NODE *node)
25922{
25923 NODE **n = &node, *n1 = node;
25924 while (n1 && nd_type_p(n1, NODE_BEGIN) && RNODE_BEGIN(n1)->nd_body) {
25925 *n = n1 = RNODE_BEGIN(n1)->nd_body;
25926 }
25927 return node;
25928}
25929
25930static void
25931reduce_nodes(struct parser_params *p, NODE **body)
25932{
25933 NODE *node = *body;
25934
25935 if (!node) {
25936 *body = NEW_NIL(&NULL_LOC);
25937 return;
25938 }
25939#define subnodes(type, n1, n2) \
25940 ((!type(node)->n1) ? (type(node)->n2 ? (body = &type(node)->n2, 1) : 0) : \
25941 (!type(node)->n2) ? (body = &type(node)->n1, 1) : \
25942 (reduce_nodes(p, &type(node)->n1), body = &type(node)->n2, 1))
25943
25944 while (node) {
25945 int newline = (int)nd_fl_newline(node);
25946 switch (nd_type(node)) {
25947 end:
25948 case NODE_NIL:
25949 *body = 0;
25950 return;
25951 case NODE_BEGIN:
25952 *body = node = RNODE_BEGIN(node)->nd_body;
25953 if (newline && node) nd_set_fl_newline(node);
25954 continue;
25955 case NODE_BLOCK:
25956 body = &RNODE_BLOCK(RNODE_BLOCK(node)->nd_end)->nd_head;
25957 break;
25958 case NODE_IF:
25959 case NODE_UNLESS:
25960 if (subnodes(RNODE_IF, nd_body, nd_else)) break;
25961 return;
25962 case NODE_CASE:
25963 body = &RNODE_CASE(node)->nd_body;
25964 break;
25965 case NODE_WHEN:
25966 if (!subnodes(RNODE_WHEN, nd_body, nd_next)) goto end;
25967 break;
25968 case NODE_ENSURE:
25969 body = &RNODE_ENSURE(node)->nd_head;
25970 break;
25971 case NODE_RESCUE:
25972 newline = 0; // RESBODY should not be a NEWLINE
25973 if (RNODE_RESCUE(node)->nd_else) {
25974 body = &RNODE_RESCUE(node)->nd_resq;
25975 break;
25976 }
25977 if (!subnodes(RNODE_RESCUE, nd_head, nd_resq)) goto end;
25978 break;
25979 default:
25980 return;
25981 }
25982 node = *body;
25983 if (newline && node) nd_set_fl_newline(node);
25984 }
25985
25986#undef subnodes
25987}
25988
25989static int
25990is_static_content(NODE *node)
25991{
25992 if (!node) return 1;
25993 switch (nd_type(node)) {
25994 case NODE_HASH:
25995 if (!(node = RNODE_HASH(node)->nd_head)) break;
25996 case NODE_LIST:
25997 do {
25998 if (!is_static_content(RNODE_LIST(node)->nd_head)) return 0;
25999 } while ((node = RNODE_LIST(node)->nd_next) != 0);
26000 case NODE_SYM:
26001 case NODE_REGX:
26002 case NODE_LINE:
26003 case NODE_FILE:
26004 case NODE_ENCODING:
26005 case NODE_INTEGER:
26006 case NODE_FLOAT:
26007 case NODE_RATIONAL:
26008 case NODE_IMAGINARY:
26009 case NODE_STR:
26010 case NODE_NIL:
26011 case NODE_TRUE:
26012 case NODE_FALSE:
26013 case NODE_ZLIST:
26014 break;
26015 default:
26016 return 0;
26017 }
26018 return 1;
26019}
26020
26021static int
26022assign_in_cond(struct parser_params *p, NODE *node)
26023{
26024 switch (nd_type(node)) {
26025 case NODE_MASGN:
26026 case NODE_LASGN:
26027 case NODE_DASGN:
26028 case NODE_GASGN:
26029 case NODE_IASGN:
26030 case NODE_CVASGN:
26031 case NODE_CDECL:
26032 break;
26033
26034 default:
26035 return 0;
26036 }
26037
26038 if (!get_nd_value(p, node)) return 1;
26039 if (is_static_content(get_nd_value(p, node))) {
26040 /* reports always */
26041 rb_warn0L(nd_line(get_nd_value(p, node)), "found '= literal' in conditional, should be ==");
26042 }
26043 return 1;
26044}
26045
26046enum cond_type {
26047 COND_IN_OP,
26048 COND_IN_COND,
26049 COND_IN_FF
26050};
26051
26052#define SWITCH_BY_COND_TYPE(t, w, arg) do { \
26053 switch (t) { \
26054 case COND_IN_OP: break; \
26055 case COND_IN_COND: rb_##w##0(arg "literal in condition"); break; \
26056 case COND_IN_FF: rb_##w##0(arg "literal in flip-flop"); break; \
26057 } \
26058} while (0)
26059
26060static NODE *cond0(struct parser_params*,NODE*,enum cond_type,const YYLTYPE*,bool);
26061
26062static NODE*
26063range_op(struct parser_params *p, NODE *node, const YYLTYPE *loc)
26064{
26065 enum node_type type;
26066
26067 if (node == 0) return 0;
26068
26069 type = nd_type(node);
26070 value_expr(p, node);
26071 if (type == NODE_INTEGER) {
26072 if (!e_option_supplied(p)) rb_warn0L(nd_line(node), "integer literal in flip-flop");
26073 ID lineno = rb_intern("$.");
26074 return NEW_CALL(node, tEQ, NEW_LIST(NEW_GVAR(lineno, loc), loc), loc);
26075 }
26076 return cond0(p, node, COND_IN_FF, loc, true);
26077}
26078
26079static NODE*
26080cond0(struct parser_params *p, NODE *node, enum cond_type type, const YYLTYPE *loc, bool top)
26081{
26082 if (node == 0) return 0;
26083 if (!(node = nd_once_body(node))) return 0;
26084 assign_in_cond(p, node);
26085
26086 switch (nd_type(node)) {
26087 case NODE_BEGIN:
26088 RNODE_BEGIN(node)->nd_body = cond0(p, RNODE_BEGIN(node)->nd_body, type, loc, top);
26089 break;
26090
26091 case NODE_DSTR:
26092 case NODE_EVSTR:
26093 case NODE_STR:
26094 case NODE_FILE:
26095 SWITCH_BY_COND_TYPE(type, warn, "string ");
26096 break;
26097
26098 case NODE_REGX:
26099 if (!e_option_supplied(p)) SWITCH_BY_COND_TYPE(type, warn, "regex ");
26100 nd_set_type(node, NODE_MATCH);
26101 break;
26102
26103 case NODE_DREGX:
26104 if (!e_option_supplied(p)) SWITCH_BY_COND_TYPE(type, warning, "regex ");
26105
26106 return NEW_MATCH2(node, NEW_GVAR(idLASTLINE, loc), loc);
26107
26108 case NODE_BLOCK:
26109 {
26110 NODE *end = RNODE_BLOCK(node)->nd_end;
26111 NODE **expr = &RNODE_BLOCK(end)->nd_head;
26112 if (top) top = node == end;
26113 *expr = cond0(p, *expr, type, loc, top);
26114 }
26115 break;
26116
26117 case NODE_AND:
26118 case NODE_OR:
26119 RNODE_AND(node)->nd_1st = cond0(p, RNODE_AND(node)->nd_1st, COND_IN_COND, loc, true);
26120 RNODE_AND(node)->nd_2nd = cond0(p, RNODE_AND(node)->nd_2nd, COND_IN_COND, loc, true);
26121 break;
26122
26123 case NODE_DOT2:
26124 case NODE_DOT3:
26125 if (!top) break;
26126 RNODE_DOT2(node)->nd_beg = range_op(p, RNODE_DOT2(node)->nd_beg, loc);
26127 RNODE_DOT2(node)->nd_end = range_op(p, RNODE_DOT2(node)->nd_end, loc);
26128 switch (nd_type(node)) {
26129 case NODE_DOT2:
26130 nd_set_type(node,NODE_FLIP2);
26131 rb_node_flip2_t *flip2 = RNODE_FLIP2(node); /* for debug info */
26132 (void)flip2;
26133 break;
26134 case NODE_DOT3:
26135 nd_set_type(node, NODE_FLIP3);
26136 rb_node_flip3_t *flip3 = RNODE_FLIP3(node); /* for debug info */
26137 (void)flip3;
26138 break;
26139 }
26140 break;
26141
26142 case NODE_SYM:
26143 case NODE_DSYM:
26144 SWITCH_BY_COND_TYPE(type, warning, "symbol ");
26145 break;
26146
26147 case NODE_LINE:
26148 case NODE_ENCODING:
26149 case NODE_INTEGER:
26150 case NODE_FLOAT:
26151 case NODE_RATIONAL:
26152 case NODE_IMAGINARY:
26153 SWITCH_BY_COND_TYPE(type, warning, "");
26154 break;
26155
26156 default:
26157 break;
26158 }
26159 return node;
26160}
26161
26162static NODE*
26163cond(struct parser_params *p, NODE *node, const YYLTYPE *loc)
26164{
26165 if (node == 0) return 0;
26166 return cond0(p, node, COND_IN_COND, loc, true);
26167}
26168
26169static NODE*
26170method_cond(struct parser_params *p, NODE *node, const YYLTYPE *loc)
26171{
26172 if (node == 0) return 0;
26173 return cond0(p, node, COND_IN_OP, loc, true);
26174}
26175
26176static NODE*
26177new_nil_at(struct parser_params *p, const rb_code_position_t *pos)
26178{
26179 YYLTYPE loc = {*pos, *pos};
26180 return NEW_NIL(&loc);
26181}
26182
26183static NODE*
26184new_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)
26185{
26186 if (!cc) return right;
26187 cc = cond0(p, cc, COND_IN_COND, loc, true);
26188 return newline_node(NEW_IF(cc, left, right, loc, if_keyword_loc, then_keyword_loc, end_keyword_loc));
26189}
26190
26191static NODE*
26192new_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)
26193{
26194 if (!cc) return right;
26195 cc = cond0(p, cc, COND_IN_COND, loc, true);
26196 return newline_node(NEW_UNLESS(cc, left, right, loc, keyword_loc, then_keyword_loc, end_keyword_loc));
26197}
26198
26199#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))
26200
26201static NODE*
26202logop(struct parser_params *p, ID id, NODE *left, NODE *right,
26203 const YYLTYPE *op_loc, const YYLTYPE *loc)
26204{
26205 enum node_type type = id == idAND || id == idANDOP ? NODE_AND : NODE_OR;
26206 NODE *op;
26207 value_expr(p, left);
26208 if (left && nd_type_p(left, type)) {
26209 NODE *node = left, *second;
26210 while ((second = RNODE_AND(node)->nd_2nd) != 0 && nd_type_p(second, type)) {
26211 node = second;
26212 }
26213 RNODE_AND(node)->nd_2nd = NEW_AND_OR(type, second, right, loc, op_loc);
26214 nd_set_line(RNODE_AND(node)->nd_2nd, op_loc->beg_pos.lineno);
26215 left->nd_loc.end_pos = loc->end_pos;
26216 return left;
26217 }
26218 op = NEW_AND_OR(type, left, right, loc, op_loc);
26219 nd_set_line(op, op_loc->beg_pos.lineno);
26220 return op;
26221}
26222
26223#undef NEW_AND_OR
26224
26225static void
26226no_blockarg(struct parser_params *p, NODE *node)
26227{
26228 if (nd_type_p(node, NODE_BLOCK_PASS)) {
26229 compile_error(p, "block argument should not be given");
26230 }
26231}
26232
26233static NODE *
26234ret_args(struct parser_params *p, NODE *node)
26235{
26236 if (node) {
26237 no_blockarg(p, node);
26238 if (nd_type_p(node, NODE_LIST) && !RNODE_LIST(node)->nd_next) {
26239 node = RNODE_LIST(node)->nd_head;
26240 }
26241 }
26242 return node;
26243}
26244
26245static NODE*
26246negate_lit(struct parser_params *p, NODE* node, const YYLTYPE *loc)
26247{
26248 switch (nd_type(node)) {
26249 case NODE_INTEGER:
26250 RNODE_INTEGER(node)->minus = TRUE;
26251 break;
26252 case NODE_FLOAT:
26253 RNODE_FLOAT(node)->minus = TRUE;
26254 break;
26255 case NODE_RATIONAL:
26256 RNODE_RATIONAL(node)->minus = TRUE;
26257 break;
26258 case NODE_IMAGINARY:
26259 RNODE_IMAGINARY(node)->minus = TRUE;
26260 break;
26261 }
26262 node->nd_loc = *loc;
26263 return node;
26264}
26265
26266static NODE *
26267arg_blk_pass(NODE *node1, rb_node_block_pass_t *node2)
26268{
26269 if (node2) {
26270 if (!node1) return (NODE *)node2;
26271 node2->nd_head = node1;
26272 nd_set_first_lineno(node2, nd_first_lineno(node1));
26273 nd_set_first_column(node2, nd_first_column(node1));
26274 return (NODE *)node2;
26275 }
26276 return node1;
26277}
26278
26279static bool
26280args_info_empty_p(struct rb_args_info *args)
26281{
26282 if (args->pre_args_num) return false;
26283 if (args->post_args_num) return false;
26284 if (args->rest_arg) return false;
26285 if (args->opt_args) return false;
26286 if (args->block_arg) return false;
26287 if (args->kw_args) return false;
26288 if (args->kw_rest_arg) return false;
26289 return true;
26290}
26291
26292static rb_node_args_t *
26293new_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)
26294{
26295 struct rb_args_info *args = &tail->nd_ainfo;
26296
26297 if (args->forwarding) {
26298 if (rest_arg) {
26299 yyerror1(&RNODE(tail)->nd_loc, "... after rest argument");
26300 return tail;
26301 }
26302 rest_arg = idFWD_REST;
26303 }
26304
26305 args->pre_args_num = pre_args ? pre_args->nd_plen : 0;
26306 args->pre_init = pre_args ? pre_args->nd_next : 0;
26307
26308 args->post_args_num = post_args ? post_args->nd_plen : 0;
26309 args->post_init = post_args ? post_args->nd_next : 0;
26310 args->first_post_arg = post_args ? post_args->nd_pid : 0;
26311
26312 args->rest_arg = rest_arg;
26313
26314 args->opt_args = opt_args;
26315
26316 nd_set_loc(RNODE(tail), loc);
26317
26318 return tail;
26319}
26320
26321static rb_node_args_t *
26322new_args_tail(struct parser_params *p, rb_node_kw_arg_t *kw_args, ID kw_rest_arg, ID block, const YYLTYPE *kw_rest_loc)
26323{
26324 rb_node_args_t *node = NEW_ARGS(&NULL_LOC);
26325 struct rb_args_info *args = &node->nd_ainfo;
26326 if (p->error_p) return node;
26327
26328 if (block == idNil) {
26329 block = 0;
26330 args->no_blockarg = TRUE;
26331 }
26332 args->block_arg = block;
26333 args->kw_args = kw_args;
26334
26335 if (kw_args) {
26336 /*
26337 * def foo(k1: 1, kr1:, k2: 2, **krest, &b)
26338 * variable order: k1, kr1, k2, &b, internal_id, krest
26339 * #=> <reorder>
26340 * variable order: kr1, k1, k2, internal_id, krest, &b
26341 */
26342 ID kw_bits = internal_id(p), *required_kw_vars, *kw_vars;
26343 struct vtable *vtargs = p->lvtbl->args;
26344 rb_node_kw_arg_t *kwn = kw_args;
26345
26346 if (block) block = vtargs->tbl[vtargs->pos-1];
26347 vtable_pop(vtargs, !!block + !!kw_rest_arg);
26348 required_kw_vars = kw_vars = &vtargs->tbl[vtargs->pos];
26349 while (kwn) {
26350 if (!NODE_REQUIRED_KEYWORD_P(get_nd_value(p, kwn->nd_body)))
26351 --kw_vars;
26352 --required_kw_vars;
26353 kwn = kwn->nd_next;
26354 }
26355
26356 for (kwn = kw_args; kwn; kwn = kwn->nd_next) {
26357 ID vid = get_nd_vid(p, kwn->nd_body);
26358 if (NODE_REQUIRED_KEYWORD_P(get_nd_value(p, kwn->nd_body))) {
26359 *required_kw_vars++ = vid;
26360 }
26361 else {
26362 *kw_vars++ = vid;
26363 }
26364 }
26365
26366 arg_var(p, kw_bits);
26367 if (kw_rest_arg) arg_var(p, kw_rest_arg);
26368 if (block) arg_var(p, block);
26369
26370 args->kw_rest_arg = NEW_DVAR(kw_rest_arg, kw_rest_loc);
26371 }
26372 else if (kw_rest_arg == idNil) {
26373 args->no_kwarg = 1;
26374 }
26375 else if (kw_rest_arg) {
26376 args->kw_rest_arg = NEW_DVAR(kw_rest_arg, kw_rest_loc);
26377 }
26378
26379 return node;
26380}
26381
26382static rb_node_args_t *
26383args_with_numbered(struct parser_params *p, rb_node_args_t *args, int max_numparam, ID it_id)
26384{
26385 if (max_numparam > NO_PARAM || it_id) {
26386 if (!args) {
26387 YYLTYPE loc = RUBY_INIT_YYLLOC();
26388 args = new_empty_args_tail(p, 0);
26389 nd_set_loc(RNODE(args), &loc);
26390 }
26391 args->nd_ainfo.pre_args_num = it_id ? 1 : max_numparam;
26392 }
26393 return args;
26394}
26395
26396static NODE*
26397new_array_pattern(struct parser_params *p, NODE *constant, NODE *pre_arg, NODE *aryptn, const YYLTYPE *loc)
26398{
26399 RNODE_ARYPTN(aryptn)->nd_pconst = constant;
26400
26401 if (pre_arg) {
26402 NODE *pre_args = NEW_LIST(pre_arg, loc);
26403 if (RNODE_ARYPTN(aryptn)->pre_args) {
26404 RNODE_ARYPTN(aryptn)->pre_args = list_concat(pre_args, RNODE_ARYPTN(aryptn)->pre_args);
26405 }
26406 else {
26407 RNODE_ARYPTN(aryptn)->pre_args = pre_args;
26408 }
26409 }
26410 return aryptn;
26411}
26412
26413static NODE*
26414new_array_pattern_tail(struct parser_params *p, NODE *pre_args, int has_rest, NODE *rest_arg, NODE *post_args, const YYLTYPE *loc)
26415{
26416 if (has_rest) {
26417 rest_arg = rest_arg ? rest_arg : NODE_SPECIAL_NO_NAME_REST;
26418 }
26419 else {
26420 rest_arg = NULL;
26421 }
26422 NODE *node = NEW_ARYPTN(pre_args, rest_arg, post_args, loc);
26423
26424 return node;
26425}
26426
26427static NODE*
26428new_find_pattern(struct parser_params *p, NODE *constant, NODE *fndptn, const YYLTYPE *loc)
26429{
26430 RNODE_FNDPTN(fndptn)->nd_pconst = constant;
26431
26432 return fndptn;
26433}
26434
26435static NODE*
26436new_find_pattern_tail(struct parser_params *p, NODE *pre_rest_arg, NODE *args, NODE *post_rest_arg, const YYLTYPE *loc)
26437{
26438 pre_rest_arg = pre_rest_arg ? pre_rest_arg : NODE_SPECIAL_NO_NAME_REST;
26439 post_rest_arg = post_rest_arg ? post_rest_arg : NODE_SPECIAL_NO_NAME_REST;
26440 NODE *node = NEW_FNDPTN(pre_rest_arg, args, post_rest_arg, loc);
26441
26442 return node;
26443}
26444
26445static NODE*
26446new_hash_pattern(struct parser_params *p, NODE *constant, NODE *hshptn, const YYLTYPE *loc)
26447{
26448 RNODE_HSHPTN(hshptn)->nd_pconst = constant;
26449 return hshptn;
26450}
26451
26452static NODE*
26453new_hash_pattern_tail(struct parser_params *p, NODE *kw_args, ID kw_rest_arg, const YYLTYPE *loc)
26454{
26455 NODE *node, *kw_rest_arg_node;
26456
26457 if (kw_rest_arg == idNil) {
26458 kw_rest_arg_node = NODE_SPECIAL_NO_REST_KEYWORD;
26459 }
26460 else if (kw_rest_arg) {
26461 kw_rest_arg_node = assignable(p, kw_rest_arg, 0, loc);
26462 }
26463 else {
26464 kw_rest_arg_node = NULL;
26465 }
26466
26467 node = NEW_HSHPTN(0, kw_args, kw_rest_arg_node, loc);
26468
26469 return node;
26470}
26471
26472static NODE*
26473dsym_node(struct parser_params *p, NODE *node, const YYLTYPE *loc)
26474{
26475 if (!node) {
26476 return NEW_SYM(STR_NEW0(), loc);
26477 }
26478
26479 switch (nd_type(node)) {
26480 case NODE_DSTR:
26481 nd_set_type(node, NODE_DSYM);
26482 nd_set_loc(node, loc);
26483 break;
26484 case NODE_STR:
26485 node = str_to_sym_node(p, node, loc);
26486 break;
26487 default:
26488 node = NEW_DSYM(0, 1, NEW_LIST(node, loc), loc);
26489 break;
26490 }
26491 return node;
26492}
26493
26494static int
26495nd_type_st_key_enable_p(NODE *node)
26496{
26497 switch (nd_type(node)) {
26498 case NODE_INTEGER:
26499 case NODE_FLOAT:
26500 case NODE_RATIONAL:
26501 case NODE_IMAGINARY:
26502 case NODE_STR:
26503 case NODE_SYM:
26504 case NODE_REGX:
26505 case NODE_LINE:
26506 case NODE_FILE:
26507 case NODE_ENCODING:
26508 return true;
26509 default:
26510 return false;
26511 }
26512}
26513
26514static VALUE
26515nd_value(struct parser_params *p, NODE *node)
26516{
26517 switch (nd_type(node)) {
26518 case NODE_STR:
26519 return rb_node_str_string_val(node);
26520 case NODE_INTEGER:
26521 return rb_node_integer_literal_val(node);
26522 case NODE_FLOAT:
26523 return rb_node_float_literal_val(node);
26524 case NODE_RATIONAL:
26525 return rb_node_rational_literal_val(node);
26526 case NODE_IMAGINARY:
26527 return rb_node_imaginary_literal_val(node);
26528 case NODE_SYM:
26529 return rb_node_sym_string_val(node);
26530 case NODE_REGX:
26531 return rb_node_regx_string_val(node);
26532 case NODE_LINE:
26533 return rb_node_line_lineno_val(node);
26534 case NODE_ENCODING:
26535 return rb_node_encoding_val(node);
26536 case NODE_FILE:
26537 return rb_node_file_path_val(node);
26538 default:
26539 rb_bug("unexpected node: %s", ruby_node_name(nd_type(node)));
26541 }
26542}
26543
26544static void
26545warn_duplicate_keys(struct parser_params *p, NODE *hash)
26546{
26547 /* See https://bugs.ruby-lang.org/issues/20331 for discussion about what is warned. */
26548 p->warn_duplicate_keys_table = st_init_table_with_size(&literal_type, RNODE_LIST(hash)->as.nd_alen / 2);
26549 while (hash && RNODE_LIST(hash)->nd_next) {
26550 NODE *head = RNODE_LIST(hash)->nd_head;
26551 NODE *value = RNODE_LIST(hash)->nd_next;
26552 NODE *next = RNODE_LIST(value)->nd_next;
26553 st_data_t key;
26554 st_data_t data;
26555
26556 /* keyword splat, e.g. {k: 1, **z, k: 2} */
26557 if (!head) {
26558 head = value;
26559 }
26560
26561 if (nd_type_st_key_enable_p(head)) {
26562 key = (st_data_t)head;
26563
26564 if (st_delete(p->warn_duplicate_keys_table, &key, &data)) {
26565 rb_warn2L(nd_line((NODE *)data),
26566 "key %+"PRIsWARN" is duplicated and overwritten on line %d",
26567 nd_value(p, head), WARN_I(nd_line(head)));
26568 }
26569 st_insert(p->warn_duplicate_keys_table, (st_data_t)key, (st_data_t)hash);
26570 }
26571 hash = next;
26572 }
26573 st_free_table(p->warn_duplicate_keys_table);
26574 p->warn_duplicate_keys_table = NULL;
26575}
26576
26577static NODE *
26578new_hash(struct parser_params *p, NODE *hash, const YYLTYPE *loc)
26579{
26580 if (hash) warn_duplicate_keys(p, hash);
26581 return NEW_HASH(hash, loc);
26582}
26583
26584static void
26585error_duplicate_pattern_variable(struct parser_params *p, ID id, const YYLTYPE *loc)
26586{
26587 if (is_private_local_id(p, id)) {
26588 return;
26589 }
26590 if (st_is_member(p->pvtbl, id)) {
26591 yyerror1(loc, "duplicated variable name");
26592 }
26593 else if (p->ctxt.in_alt_pattern && id) {
26594 yyerror1(loc, "variable capture in alternative pattern");
26595 }
26596 else {
26597 p->ctxt.capture_in_pattern = 1;
26598 st_insert(p->pvtbl, (st_data_t)id, 0);
26599 }
26600}
26601
26602static void
26603error_duplicate_pattern_key(struct parser_params *p, VALUE key, const YYLTYPE *loc)
26604{
26605 if (!p->pktbl) {
26606 p->pktbl = st_init_numtable();
26607 }
26608 else if (st_is_member(p->pktbl, key)) {
26609 yyerror1(loc, "duplicated key name");
26610 return;
26611 }
26612 st_insert(p->pktbl, (st_data_t)key, 0);
26613}
26614
26615static NODE *
26616new_unique_key_hash(struct parser_params *p, NODE *hash, const YYLTYPE *loc)
26617{
26618 return NEW_HASH(hash, loc);
26619}
26620
26621static NODE *
26622new_op_assign(struct parser_params *p, NODE *lhs, ID op, NODE *rhs, struct lex_context ctxt, const YYLTYPE *loc)
26623{
26624 NODE *asgn;
26625
26626 if (lhs) {
26627 ID vid = get_nd_vid(p, lhs);
26628 YYLTYPE lhs_loc = lhs->nd_loc;
26629 if (op == tOROP) {
26630 set_nd_value(p, lhs, rhs);
26631 nd_set_loc(lhs, loc);
26632 asgn = NEW_OP_ASGN_OR(gettable(p, vid, &lhs_loc), lhs, loc);
26633 }
26634 else if (op == tANDOP) {
26635 set_nd_value(p, lhs, rhs);
26636 nd_set_loc(lhs, loc);
26637 asgn = NEW_OP_ASGN_AND(gettable(p, vid, &lhs_loc), lhs, loc);
26638 }
26639 else {
26640 asgn = lhs;
26641 rhs = NEW_CALL(gettable(p, vid, &lhs_loc), op, NEW_LIST(rhs, &rhs->nd_loc), loc);
26642 set_nd_value(p, asgn, rhs);
26643 nd_set_loc(asgn, loc);
26644 }
26645 }
26646 else {
26647 asgn = NEW_ERROR(loc);
26648 }
26649 return asgn;
26650}
26651
26652static NODE *
26653new_ary_op_assign(struct parser_params *p, NODE *ary,
26654 NODE *args, ID op, NODE *rhs, const YYLTYPE *args_loc, const YYLTYPE *loc,
26655 const YYLTYPE *call_operator_loc, const YYLTYPE *opening_loc, const YYLTYPE *closing_loc, const YYLTYPE *binary_operator_loc)
26656{
26657 NODE *asgn;
26658
26659 aryset_check(p, args);
26660 args = make_list(args, args_loc);
26661 asgn = NEW_OP_ASGN1(ary, op, args, rhs, loc, call_operator_loc, opening_loc, closing_loc, binary_operator_loc);
26662 fixpos(asgn, ary);
26663 return asgn;
26664}
26665
26666static NODE *
26667new_attr_op_assign(struct parser_params *p, NODE *lhs,
26668 ID atype, ID attr, ID op, NODE *rhs, const YYLTYPE *loc,
26669 const YYLTYPE *call_operator_loc, const YYLTYPE *message_loc, const YYLTYPE *binary_operator_loc)
26670{
26671 NODE *asgn;
26672
26673 asgn = NEW_OP_ASGN2(lhs, CALL_Q_P(atype), attr, op, rhs, loc, call_operator_loc, message_loc, binary_operator_loc);
26674 fixpos(asgn, lhs);
26675 return asgn;
26676}
26677
26678static NODE *
26679new_const_op_assign(struct parser_params *p, NODE *lhs, ID op, NODE *rhs, struct lex_context ctxt, const YYLTYPE *loc)
26680{
26681 NODE *asgn;
26682
26683 if (lhs) {
26684 asgn = NEW_OP_CDECL(lhs, op, rhs, ctxt.shareable_constant_value, loc);
26685 }
26686 else {
26687 asgn = NEW_ERROR(loc);
26688 }
26689 fixpos(asgn, lhs);
26690 return asgn;
26691}
26692
26693static NODE *
26694const_decl(struct parser_params *p, NODE *path, const YYLTYPE *loc)
26695{
26696 if (p->ctxt.in_def) {
26697#ifndef RIPPER
26698 yyerror1(loc, "dynamic constant assignment");
26699#else
26700 set_value(assign_error(p, "dynamic constant assignment", p->s_lvalue));
26701#endif
26702 }
26703 return NEW_CDECL(0, 0, (path), p->ctxt.shareable_constant_value, loc);
26704}
26705
26706#ifdef RIPPER
26707static VALUE
26708assign_error(struct parser_params *p, const char *mesg, VALUE a)
26709{
26710 a = dispatch2(assign_error, ERR_MESG(), a);
26711 ripper_error(p);
26712 return a;
26713}
26714#endif
26715
26716static NODE *
26717new_bodystmt(struct parser_params *p, NODE *head, NODE *rescue, NODE *rescue_else, NODE *ensure, const YYLTYPE *loc)
26718{
26719 NODE *result = head;
26720 if (rescue) {
26721 NODE *tmp = rescue_else ? rescue_else : rescue;
26722 YYLTYPE rescue_loc = code_loc_gen(&head->nd_loc, &tmp->nd_loc);
26723
26724 result = NEW_RESCUE(head, rescue, rescue_else, &rescue_loc);
26725 nd_set_line(result, rescue->nd_loc.beg_pos.lineno);
26726 }
26727 if (ensure) {
26728 result = NEW_ENSURE(result, ensure, loc);
26729 }
26730 fixpos(result, head);
26731 return result;
26732}
26733
26734static void
26735warn_unused_var(struct parser_params *p, struct local_vars *local)
26736{
26737 int cnt;
26738
26739 if (!local->used) return;
26740 cnt = local->used->pos;
26741 if (cnt != local->vars->pos) {
26742 rb_parser_fatal(p, "local->used->pos != local->vars->pos");
26743 }
26744#ifndef RIPPER
26745 ID *v = local->vars->tbl;
26746 ID *u = local->used->tbl;
26747 for (int i = 0; i < cnt; ++i) {
26748 if (!v[i] || (u[i] & LVAR_USED)) continue;
26749 if (is_private_local_id(p, v[i])) continue;
26750 rb_warn1L((int)u[i], "assigned but unused variable - %"PRIsWARN, rb_id2str(v[i]));
26751 }
26752#endif
26753}
26754
26755static void
26756local_push(struct parser_params *p, int toplevel_scope)
26757{
26758 struct local_vars *local;
26759 int inherits_dvars = toplevel_scope && compile_for_eval;
26760 int warn_unused_vars = RTEST(ruby_verbose);
26761
26762 local = ALLOC(struct local_vars);
26763 local->prev = p->lvtbl;
26764 local->args = vtable_alloc(0);
26765 local->vars = vtable_alloc(inherits_dvars ? DVARS_INHERIT : DVARS_TOPSCOPE);
26766#ifndef RIPPER
26767 if (toplevel_scope && compile_for_eval) warn_unused_vars = 0;
26768 if (toplevel_scope && e_option_supplied(p)) warn_unused_vars = 0;
26769#endif
26770 local->numparam.outer = 0;
26771 local->numparam.inner = 0;
26772 local->numparam.current = 0;
26773 local->it = 0;
26774 local->used = warn_unused_vars ? vtable_alloc(0) : 0;
26775
26776# if WARN_PAST_SCOPE
26777 local->past = 0;
26778# endif
26779 CMDARG_PUSH(0);
26780 COND_PUSH(0);
26781 p->lvtbl = local;
26782}
26783
26784static void
26785vtable_chain_free(struct parser_params *p, struct vtable *table)
26786{
26787 while (!DVARS_TERMINAL_P(table)) {
26788 struct vtable *cur_table = table;
26789 table = cur_table->prev;
26790 vtable_free(cur_table);
26791 }
26792}
26793
26794static void
26795local_free(struct parser_params *p, struct local_vars *local)
26796{
26797 vtable_chain_free(p, local->used);
26798
26799# if WARN_PAST_SCOPE
26800 vtable_chain_free(p, local->past);
26801# endif
26802
26803 vtable_chain_free(p, local->args);
26804 vtable_chain_free(p, local->vars);
26805
26806 ruby_xfree_sized(local, sizeof(struct local_vars));
26807}
26808
26809static void
26810local_pop(struct parser_params *p)
26811{
26812 struct local_vars *local = p->lvtbl->prev;
26813 if (p->lvtbl->used) {
26814 warn_unused_var(p, p->lvtbl);
26815 }
26816
26817 local_free(p, p->lvtbl);
26818 p->lvtbl = local;
26819
26820 CMDARG_POP();
26821 COND_POP();
26822}
26823
26824static rb_ast_id_table_t *
26825local_tbl(struct parser_params *p)
26826{
26827 int cnt_args = vtable_size(p->lvtbl->args);
26828 int cnt_vars = vtable_size(p->lvtbl->vars);
26829 int cnt = cnt_args + cnt_vars;
26830 int i, j;
26831 rb_ast_id_table_t *tbl;
26832
26833 if (cnt <= 0) return 0;
26834 tbl = rb_ast_new_local_table(p->ast, cnt);
26835 MEMCPY(tbl->ids, p->lvtbl->args->tbl, ID, cnt_args);
26836 /* remove IDs duplicated to warn shadowing */
26837 for (i = 0, j = cnt_args; i < cnt_vars; ++i) {
26838 ID id = p->lvtbl->vars->tbl[i];
26839 if (!vtable_included(p->lvtbl->args, id)) {
26840 tbl->ids[j++] = id;
26841 }
26842 }
26843 if (j < cnt) {
26844 tbl = rb_ast_resize_latest_local_table(p->ast, j);
26845 }
26846
26847 return tbl;
26848}
26849
26850static void
26851numparam_name(struct parser_params *p, ID id)
26852{
26853 if (!NUMPARAM_ID_P(id)) return;
26854 compile_error(p, "_%d is reserved for numbered parameter",
26855 NUMPARAM_ID_TO_IDX(id));
26856}
26857
26858static void
26859arg_var(struct parser_params *p, ID id)
26860{
26861 numparam_name(p, id);
26862 vtable_add(p->lvtbl->args, id);
26863}
26864
26865static void
26866local_var(struct parser_params *p, ID id)
26867{
26868 numparam_name(p, id);
26869 vtable_add(p->lvtbl->vars, id);
26870 if (p->lvtbl->used) {
26871 vtable_add(p->lvtbl->used, (ID)p->ruby_sourceline);
26872 }
26873}
26874
26875#ifndef RIPPER
26876int
26877rb_parser_local_defined(struct parser_params *p, ID id, const struct rb_iseq_struct *iseq)
26878{
26879 return rb_local_defined(id, iseq);
26880}
26881#endif
26882
26883static int
26884local_id_ref(struct parser_params *p, ID id, ID **vidrefp)
26885{
26886 struct vtable *vars, *args, *used;
26887
26888 vars = p->lvtbl->vars;
26889 args = p->lvtbl->args;
26890 used = p->lvtbl->used;
26891
26892 while (vars && !DVARS_TERMINAL_P(vars->prev)) {
26893 vars = vars->prev;
26894 args = args->prev;
26895 if (used) used = used->prev;
26896 }
26897
26898 if (vars && vars->prev == DVARS_INHERIT) {
26899 return rb_parser_local_defined(p, id, p->parent_iseq);
26900 }
26901 else if (vtable_included(args, id)) {
26902 return 1;
26903 }
26904 else {
26905 int i = vtable_included(vars, id);
26906 if (i && used && vidrefp) *vidrefp = &used->tbl[i-1];
26907 return i != 0;
26908 }
26909}
26910
26911static int
26912local_id(struct parser_params *p, ID id)
26913{
26914 return local_id_ref(p, id, NULL);
26915}
26916
26917static int
26918check_forwarding_args(struct parser_params *p)
26919{
26920 if (local_id(p, idFWD_ALL)) return TRUE;
26921 compile_error(p, "unexpected ...");
26922 return FALSE;
26923}
26924
26925static void
26926add_forwarding_args(struct parser_params *p)
26927{
26928 arg_var(p, idFWD_REST);
26929 arg_var(p, idFWD_KWREST);
26930 arg_var(p, idFWD_BLOCK);
26931 arg_var(p, idFWD_ALL);
26932}
26933
26934static void
26935forwarding_arg_check(struct parser_params *p, ID arg, ID all, const char *var)
26936{
26937 bool conflict = false;
26938
26939 struct vtable *vars, *args;
26940
26941 vars = p->lvtbl->vars;
26942 args = p->lvtbl->args;
26943
26944 while (vars && !DVARS_TERMINAL_P(vars->prev)) {
26945 conflict |= (vtable_included(args, arg) && !(all && vtable_included(args, all)));
26946 vars = vars->prev;
26947 args = args->prev;
26948 }
26949
26950 bool found = false;
26951 if (vars && vars->prev == DVARS_INHERIT && !found) {
26952 found = (rb_parser_local_defined(p, arg, p->parent_iseq) &&
26953 !(all && rb_parser_local_defined(p, all, p->parent_iseq)));
26954 }
26955 else {
26956 found = (vtable_included(args, arg) &&
26957 !(all && vtable_included(args, all)));
26958 }
26959
26960 if (!found) {
26961 compile_error(p, "no anonymous %s parameter", var);
26962 }
26963 else if (conflict) {
26964 compile_error(p, "anonymous %s parameter is also used within block", var);
26965 }
26966}
26967
26968static NODE *
26969new_args_forward_call(struct parser_params *p, NODE *leading, const YYLTYPE *loc, const YYLTYPE *argsloc)
26970{
26971 NODE *rest = NEW_LVAR(idFWD_REST, loc);
26972 NODE *kwrest = list_append(p, NEW_LIST(0, loc), NEW_LVAR(idFWD_KWREST, loc));
26973 rb_node_block_pass_t *block = NEW_BLOCK_PASS(NEW_LVAR(idFWD_BLOCK, loc), argsloc, &NULL_LOC);
26974 NODE *args = leading ? rest_arg_append(p, leading, rest, argsloc) : NEW_SPLAT(rest, loc, &NULL_LOC);
26975 block->forwarding = TRUE;
26976 args = arg_append(p, args, new_hash(p, kwrest, loc), argsloc);
26977 return arg_blk_pass(args, block);
26978}
26979
26980static NODE *
26981numparam_push(struct parser_params *p)
26982{
26983 struct local_vars *local = p->lvtbl;
26984 NODE *inner = local->numparam.inner;
26985 if (!local->numparam.outer) {
26986 local->numparam.outer = local->numparam.current;
26987 }
26988 local->numparam.inner = 0;
26989 local->numparam.current = 0;
26990 local->it = 0;
26991 return inner;
26992}
26993
26994static void
26995numparam_pop(struct parser_params *p, NODE *prev_inner)
26996{
26997 struct local_vars *local = p->lvtbl;
26998 if (prev_inner) {
26999 /* prefer first one */
27000 local->numparam.inner = prev_inner;
27001 }
27002 else if (local->numparam.current) {
27003 /* current and inner are exclusive */
27004 local->numparam.inner = local->numparam.current;
27005 }
27006 if (p->max_numparam > NO_PARAM) {
27007 /* current and outer are exclusive */
27008 local->numparam.current = local->numparam.outer;
27009 local->numparam.outer = 0;
27010 }
27011 else {
27012 /* no numbered parameter */
27013 local->numparam.current = 0;
27014 }
27015 local->it = 0;
27016}
27017
27018static const struct vtable *
27019dyna_push(struct parser_params *p)
27020{
27021 p->lvtbl->args = vtable_alloc(p->lvtbl->args);
27022 p->lvtbl->vars = vtable_alloc(p->lvtbl->vars);
27023 if (p->lvtbl->used) {
27024 p->lvtbl->used = vtable_alloc(p->lvtbl->used);
27025 }
27026 return p->lvtbl->args;
27027}
27028
27029static void
27030dyna_pop_vtable(struct parser_params *p, struct vtable **vtblp)
27031{
27032 struct vtable *tmp = *vtblp;
27033 *vtblp = tmp->prev;
27034# if WARN_PAST_SCOPE
27035 if (p->past_scope_enabled) {
27036 tmp->prev = p->lvtbl->past;
27037 p->lvtbl->past = tmp;
27038 return;
27039 }
27040# endif
27041 vtable_free(tmp);
27042}
27043
27044static void
27045dyna_pop_1(struct parser_params *p)
27046{
27047 struct vtable *tmp;
27048
27049 if ((tmp = p->lvtbl->used) != 0) {
27050 warn_unused_var(p, p->lvtbl);
27051 p->lvtbl->used = p->lvtbl->used->prev;
27052 vtable_free(tmp);
27053 }
27054 dyna_pop_vtable(p, &p->lvtbl->args);
27055 dyna_pop_vtable(p, &p->lvtbl->vars);
27056}
27057
27058static void
27059dyna_pop(struct parser_params *p, const struct vtable *lvargs)
27060{
27061 while (p->lvtbl->args != lvargs) {
27062 dyna_pop_1(p);
27063 if (!p->lvtbl->args) {
27064 struct local_vars *local = p->lvtbl->prev;
27065 ruby_xfree_sized(p->lvtbl, sizeof(*p->lvtbl));
27066 p->lvtbl = local;
27067 }
27068 }
27069 dyna_pop_1(p);
27070}
27071
27072static int
27073dyna_in_block(struct parser_params *p)
27074{
27075 return !DVARS_TERMINAL_P(p->lvtbl->vars) && p->lvtbl->vars->prev != DVARS_TOPSCOPE;
27076}
27077
27078#ifndef RIPPER
27079int
27080dvar_defined_ref(struct parser_params *p, ID id, ID **vidrefp)
27081{
27082 struct vtable *vars, *args, *used;
27083 int i;
27084
27085 args = p->lvtbl->args;
27086 vars = p->lvtbl->vars;
27087 used = p->lvtbl->used;
27088
27089 while (!DVARS_TERMINAL_P(vars)) {
27090 if (vtable_included(args, id)) {
27091 return 1;
27092 }
27093 if ((i = vtable_included(vars, id)) != 0) {
27094 if (used && vidrefp) *vidrefp = &used->tbl[i-1];
27095 return 1;
27096 }
27097 args = args->prev;
27098 vars = vars->prev;
27099 if (!vidrefp) used = 0;
27100 if (used) used = used->prev;
27101 }
27102
27103 if (vars == DVARS_INHERIT && !NUMPARAM_ID_P(id)) {
27104 return rb_dvar_defined(id, p->parent_iseq);
27105 }
27106
27107 return 0;
27108}
27109#endif
27110
27111static int
27112dvar_defined(struct parser_params *p, ID id)
27113{
27114 return dvar_defined_ref(p, id, NULL);
27115}
27116
27117static int
27118dvar_curr(struct parser_params *p, ID id)
27119{
27120 return (vtable_included(p->lvtbl->args, id) ||
27121 vtable_included(p->lvtbl->vars, id));
27122}
27123
27124static void
27125reg_fragment_enc_error(struct parser_params* p, rb_parser_string_t *str, int c)
27126{
27127 compile_error(p,
27128 "regexp encoding option '%c' differs from source encoding '%s'",
27129 c, rb_enc_name(rb_parser_str_get_encoding(str)));
27130}
27131
27132#ifndef RIPPER
27133static rb_encoding *
27134find_enc(struct parser_params* p, const char *name)
27135{
27136 int idx = rb_enc_find_index(name);
27137 if (idx < 0) {
27138 rb_bug("unknown encoding name: %s", name);
27139 }
27140
27141 return rb_enc_from_index(idx);
27142}
27143
27144static rb_encoding *
27145kcode_to_enc(struct parser_params* p, int kcode)
27146{
27147 rb_encoding *enc;
27148
27149 switch (kcode) {
27150 case ENC_ASCII8BIT:
27151 enc = rb_ascii8bit_encoding();
27152 break;
27153 case ENC_EUC_JP:
27154 enc = find_enc(p, "EUC-JP");
27155 break;
27156 case ENC_Windows_31J:
27157 enc = find_enc(p, "Windows-31J");
27158 break;
27159 case ENC_UTF8:
27160 enc = rb_utf8_encoding();
27161 break;
27162 default:
27163 enc = NULL;
27164 break;
27165 }
27166
27167 return enc;
27168}
27169
27170int
27171rb_reg_fragment_setenc(struct parser_params* p, rb_parser_string_t *str, int options)
27172{
27173 int c = RE_OPTION_ENCODING_IDX(options);
27174
27175 if (c) {
27176 int opt, idx;
27177 rb_encoding *enc;
27178
27179 char_to_option_kcode(c, &opt, &idx);
27180 enc = kcode_to_enc(p, idx);
27181 if (enc != rb_parser_str_get_encoding(str) &&
27182 !rb_parser_is_ascii_string(p, str)) {
27183 goto error;
27184 }
27185 rb_parser_string_set_encoding(str, enc);
27186 }
27187 else if (RE_OPTION_ENCODING_NONE(options)) {
27188 if (!PARSER_ENCODING_IS_ASCII8BIT(p, str) &&
27189 !rb_parser_is_ascii_string(p, str)) {
27190 c = 'n';
27191 goto error;
27192 }
27193 rb_parser_enc_associate(p, str, rb_ascii8bit_encoding());
27194 }
27195 else if (rb_is_usascii_enc(p->enc)) {
27196 rb_parser_enc_associate(p, str, rb_ascii8bit_encoding());
27197 }
27198 return 0;
27199
27200 error:
27201 return c;
27202}
27203#endif
27204
27205static void
27206reg_fragment_setenc(struct parser_params* p, rb_parser_string_t *str, int options)
27207{
27208 int c = rb_reg_fragment_setenc(p, str, options);
27209 if (c) reg_fragment_enc_error(p, str, c);
27210}
27211
27212#ifndef UNIVERSAL_PARSER
27213typedef struct {
27214 struct parser_params* parser;
27215 rb_encoding *enc;
27216 NODE *succ_block;
27217 const YYLTYPE *loc;
27218 rb_parser_assignable_func assignable;
27220
27221static int
27222reg_named_capture_assign_iter(const OnigUChar *name, const OnigUChar *name_end,
27223 int back_num, int *back_refs, OnigRegex regex, void *arg0)
27224{
27226 struct parser_params* p = arg->parser;
27227 rb_encoding *enc = arg->enc;
27228 long len = name_end - name;
27229 const char *s = (const char *)name;
27230
27231 return rb_reg_named_capture_assign_iter_impl(p, s, len, enc, &arg->succ_block, arg->loc, arg->assignable);
27232}
27233
27234static NODE *
27235reg_named_capture_assign(struct parser_params* p, VALUE regexp, const YYLTYPE *loc, rb_parser_assignable_func assignable)
27236{
27238
27239 arg.parser = p;
27240 arg.enc = rb_enc_get(regexp);
27241 arg.succ_block = 0;
27242 arg.loc = loc;
27243 arg.assignable = assignable;
27244 onig_foreach_name(RREGEXP_PTR(regexp), reg_named_capture_assign_iter, &arg);
27245
27246 if (!arg.succ_block) return 0;
27247 return RNODE_BLOCK(arg.succ_block)->nd_next;
27248}
27249#endif
27250
27251#ifndef RIPPER
27252NODE *
27253rb_parser_assignable(struct parser_params *p, ID id, NODE *val, const YYLTYPE *loc)
27254{
27255 return assignable(p, id, val, loc);
27256}
27257
27258int
27259rb_reg_named_capture_assign_iter_impl(struct parser_params *p, const char *s, long len,
27260 rb_encoding *enc, NODE **succ_block, const rb_code_location_t *loc, rb_parser_assignable_func assignable)
27261{
27262 ID var;
27263 NODE *node, *succ;
27264
27265 if (!len) return ST_CONTINUE;
27266 if (!VALID_SYMNAME_P(s, len, enc, ID_LOCAL))
27267 return ST_CONTINUE;
27268
27269 var = intern_cstr(s, len, enc);
27270 if (len < MAX_WORD_LENGTH && rb_reserved_word(s, (int)len)) {
27271 if (!lvar_defined(p, var)) return ST_CONTINUE;
27272 }
27273 node = node_assign(p, assignable(p, var, 0, loc), NEW_SYM(rb_id2str(var), loc), NO_LEX_CTXT, loc);
27274 succ = *succ_block;
27275 if (!succ) succ = NEW_ERROR(loc);
27276 succ = block_append(p, succ, node);
27277 *succ_block = succ;
27278 return ST_CONTINUE;
27279}
27280#endif
27281
27282static VALUE
27283parser_reg_compile(struct parser_params* p, rb_parser_string_t *str, int options)
27284{
27285 VALUE str2;
27286 reg_fragment_setenc(p, str, options);
27287 str2 = rb_str_new_parser_string(str);
27288 return rb_parser_reg_compile(p, str2, options);
27289}
27290
27291#ifndef RIPPER
27292VALUE
27293rb_parser_reg_compile(struct parser_params* p, VALUE str, int options)
27294{
27295 return rb_reg_compile(str, options & RE_OPTION_MASK, p->ruby_sourcefile, p->ruby_sourceline);
27296}
27297#endif
27298
27299static VALUE
27300reg_compile(struct parser_params* p, rb_parser_string_t *str, int options)
27301{
27302 VALUE re;
27303 VALUE err;
27304
27305 err = rb_errinfo();
27306 re = parser_reg_compile(p, str, options);
27307 if (NIL_P(re)) {
27308 VALUE m = rb_attr_get(rb_errinfo(), idMesg);
27309 rb_set_errinfo(err);
27310 compile_error(p, "%"PRIsVALUE, m);
27311 return Qnil;
27312 }
27313 return re;
27314}
27315
27316#ifndef RIPPER
27317void
27318rb_ruby_parser_set_options(struct parser_params *p, int print, int loop, int chomp, int split)
27319{
27320 p->do_print = print;
27321 p->do_loop = loop;
27322 p->do_chomp = chomp;
27323 p->do_split = split;
27324}
27325
27326static NODE *
27327parser_append_options(struct parser_params *p, NODE *node)
27328{
27329 static const YYLTYPE default_location = {{1, 0}, {1, 0}};
27330 const YYLTYPE *const LOC = &default_location;
27331
27332 if (p->do_print) {
27333 NODE *print = (NODE *)NEW_FCALL(rb_intern("print"),
27334 NEW_LIST(NEW_GVAR(idLASTLINE, LOC), LOC),
27335 LOC);
27336 node = block_append(p, node, print);
27337 }
27338
27339 if (p->do_loop) {
27340 NODE *irs = NEW_LIST(NEW_GVAR(rb_intern("$/"), LOC), LOC);
27341
27342 if (p->do_split) {
27343 ID ifs = rb_intern("$;");
27344 ID fields = rb_intern("$F");
27345 NODE *args = NEW_LIST(NEW_GVAR(ifs, LOC), LOC);
27346 NODE *split = NEW_GASGN(fields,
27347 NEW_CALL(NEW_GVAR(idLASTLINE, LOC),
27348 rb_intern("split"), args, LOC),
27349 LOC);
27350 node = block_append(p, split, node);
27351 }
27352 if (p->do_chomp) {
27353 NODE *chomp = NEW_SYM(rb_str_new_cstr("chomp"), LOC);
27354 chomp = list_append(p, NEW_LIST(chomp, LOC), NEW_TRUE(LOC));
27355 irs = list_append(p, irs, NEW_HASH(chomp, LOC));
27356 }
27357
27358 node = NEW_WHILE((NODE *)NEW_FCALL(idGets, irs, LOC), node, 1, LOC, &NULL_LOC, &NULL_LOC);
27359 }
27360
27361 return node;
27362}
27363
27364void
27365rb_init_parse(void)
27366{
27367 /* just to suppress unused-function warnings */
27368 (void)nodetype;
27369 (void)nodeline;
27370}
27371
27372ID
27373internal_id(struct parser_params *p)
27374{
27375 return rb_make_temporary_id(vtable_size(p->lvtbl->args) + vtable_size(p->lvtbl->vars));
27376}
27377#endif /* !RIPPER */
27378
27379static void
27380parser_initialize(struct parser_params *p)
27381{
27382 /* note: we rely on TypedData_Make_Struct to set most fields to 0 */
27383 p->command_start = TRUE;
27384 p->ruby_sourcefile_string = Qnil;
27385 p->lex.lpar_beg = -1; /* make lambda_beginning_p() == FALSE at first */
27386 string_buffer_init(p);
27387 p->node_id = 0;
27388 p->delayed.token = NULL;
27389 p->frozen_string_literal = -1; /* not specified */
27390#ifndef RIPPER
27391 p->error_buffer = Qfalse;
27392 p->end_expect_token_locations = NULL;
27393 p->token_id = 0;
27394 p->tokens = NULL;
27395#else
27396 p->result = Qnil;
27397 p->parsing_thread = Qnil;
27398 p->s_value = Qnil;
27399 p->s_lvalue = Qnil;
27400 p->s_value_stack = rb_ary_new();
27401#endif
27402 p->debug_buffer = Qnil;
27403 p->debug_output = rb_ractor_stdout();
27404 p->enc = rb_utf8_encoding();
27405 p->exits = 0;
27406}
27407
27408#ifdef RIPPER
27409#define rb_ruby_parser_mark ripper_parser_mark
27410#define rb_ruby_parser_free ripper_parser_free
27411#define rb_ruby_parser_memsize ripper_parser_memsize
27412#endif
27413
27414void
27415rb_ruby_parser_mark(void *ptr)
27416{
27417 struct parser_params *p = (struct parser_params*)ptr;
27418
27419 rb_gc_mark(p->ruby_sourcefile_string);
27420#ifndef RIPPER
27421 rb_gc_mark(p->error_buffer);
27422#else
27423 rb_gc_mark(p->value);
27424 rb_gc_mark(p->result);
27425 rb_gc_mark(p->parsing_thread);
27426 rb_gc_mark(p->s_value);
27427 rb_gc_mark(p->s_lvalue);
27428 rb_gc_mark(p->s_value_stack);
27429#endif
27430 rb_gc_mark(p->debug_buffer);
27431 rb_gc_mark(p->debug_output);
27432}
27433
27434void
27435rb_ruby_parser_free(void *ptr)
27436{
27437 struct parser_params *p = (struct parser_params*)ptr;
27438 struct local_vars *local, *prev;
27439
27440 if (p->ast) {
27441 rb_ast_free(p->ast);
27442 }
27443
27444 if (p->warn_duplicate_keys_table) {
27445 st_free_table(p->warn_duplicate_keys_table);
27446 }
27447
27448#ifndef RIPPER
27449 if (p->tokens) {
27450 rb_parser_ary_free(p, p->tokens);
27451 }
27452#endif
27453
27454 if (p->tokenbuf) {
27455 ruby_xfree_sized(p->tokenbuf, p->toksiz);
27456 }
27457
27458 for (local = p->lvtbl; local; local = prev) {
27459 prev = local->prev;
27460 local_free(p, local);
27461 }
27462
27463 {
27464 token_info *ptinfo;
27465 while ((ptinfo = p->token_info) != 0) {
27466 p->token_info = ptinfo->next;
27467 xfree(ptinfo);
27468 }
27469 }
27470 string_buffer_free(p);
27471
27472 if (p->pvtbl) {
27473 st_free_table(p->pvtbl);
27474 }
27475
27476 if (CASE_LABELS_ENABLED_P(p->case_labels)) {
27477 st_free_table(p->case_labels);
27478 }
27479
27480 xfree(p->lex.strterm);
27481 p->lex.strterm = 0;
27482
27483 xfree(ptr);
27484}
27485
27486size_t
27487rb_ruby_parser_memsize(const void *ptr)
27488{
27489 struct parser_params *p = (struct parser_params*)ptr;
27490 struct local_vars *local;
27491 size_t size = sizeof(*p);
27492
27493 size += p->toksiz;
27494 for (local = p->lvtbl; local; local = local->prev) {
27495 size += sizeof(*local);
27496 if (local->vars) size += local->vars->capa * sizeof(ID);
27497 }
27498 return size;
27499}
27500
27501#ifndef RIPPER
27502#undef rb_reserved_word
27503
27504const struct kwtable *
27505rb_reserved_word(const char *str, unsigned int len)
27506{
27507 return reserved_word(str, len);
27508}
27509
27510#ifdef UNIVERSAL_PARSER
27512rb_ruby_parser_allocate(const rb_parser_config_t *config)
27513{
27514 /* parser_initialize expects fields to be set to 0 */
27515 rb_parser_t *p = (rb_parser_t *)config->calloc(1, sizeof(rb_parser_t));
27516 p->config = config;
27517 return p;
27518}
27519
27521rb_ruby_parser_new(const rb_parser_config_t *config)
27522{
27523 /* parser_initialize expects fields to be set to 0 */
27524 rb_parser_t *p = rb_ruby_parser_allocate(config);
27525 parser_initialize(p);
27526 return p;
27527}
27528#else
27530rb_ruby_parser_allocate(void)
27531{
27532 /* parser_initialize expects fields to be set to 0 */
27533 rb_parser_t *p = (rb_parser_t *)ruby_xcalloc(1, sizeof(rb_parser_t));
27534 return p;
27535}
27536
27538rb_ruby_parser_new(void)
27539{
27540 /* parser_initialize expects fields to be set to 0 */
27541 rb_parser_t *p = rb_ruby_parser_allocate();
27542 parser_initialize(p);
27543 return p;
27544}
27545#endif
27546
27548rb_ruby_parser_set_context(rb_parser_t *p, const struct rb_iseq_struct *base, int main)
27549{
27550 p->error_buffer = main ? Qfalse : Qnil;
27551 p->parent_iseq = base;
27552 return p;
27553}
27554
27555void
27556rb_ruby_parser_set_script_lines(rb_parser_t *p)
27557{
27558 p->debug_lines = rb_parser_ary_new_capa_for_script_line(p, 10);
27559}
27560
27561void
27562rb_ruby_parser_error_tolerant(rb_parser_t *p)
27563{
27564 p->error_tolerant = 1;
27565}
27566
27567void
27568rb_ruby_parser_keep_tokens(rb_parser_t *p)
27569{
27570 p->keep_tokens = 1;
27571 p->tokens = rb_parser_ary_new_capa_for_ast_token(p, 10);
27572}
27573
27575rb_ruby_parser_encoding(rb_parser_t *p)
27576{
27577 return p->enc;
27578}
27579
27580int
27581rb_ruby_parser_end_seen_p(rb_parser_t *p)
27582{
27583 return p->ruby__end__seen;
27584}
27585
27586int
27587rb_ruby_parser_set_yydebug(rb_parser_t *p, int flag)
27588{
27589 p->debug = flag;
27590 return flag;
27591}
27592#endif /* !RIPPER */
27593
27594#ifdef RIPPER
27595int
27596rb_ruby_parser_get_yydebug(rb_parser_t *p)
27597{
27598 return p->debug;
27599}
27600
27601void
27602rb_ruby_parser_set_value(rb_parser_t *p, VALUE value)
27603{
27604 p->value = value;
27605}
27606
27607int
27608rb_ruby_parser_error_p(rb_parser_t *p)
27609{
27610 return p->error_p;
27611}
27612
27613VALUE
27614rb_ruby_parser_debug_output(rb_parser_t *p)
27615{
27616 return p->debug_output;
27617}
27618
27619void
27620rb_ruby_parser_set_debug_output(rb_parser_t *p, VALUE output)
27621{
27622 p->debug_output = output;
27623}
27624
27625VALUE
27626rb_ruby_parser_parsing_thread(rb_parser_t *p)
27627{
27628 return p->parsing_thread;
27629}
27630
27631void
27632rb_ruby_parser_set_parsing_thread(rb_parser_t *p, VALUE parsing_thread)
27633{
27634 p->parsing_thread = parsing_thread;
27635}
27636
27637void
27638rb_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)
27639{
27640 p->lex.gets = gets;
27641 p->lex.input = input;
27642 p->eofp = 0;
27643 p->ruby_sourcefile_string = sourcefile_string;
27644 p->ruby_sourcefile = sourcefile;
27645 p->ruby_sourceline = sourceline;
27646}
27647
27648VALUE
27649rb_ruby_parser_result(rb_parser_t *p)
27650{
27651 return p->result;
27652}
27653
27655rb_ruby_parser_enc(rb_parser_t *p)
27656{
27657 return p->enc;
27658}
27659
27660VALUE
27661rb_ruby_parser_ruby_sourcefile_string(rb_parser_t *p)
27662{
27663 return p->ruby_sourcefile_string;
27664}
27665
27666int
27667rb_ruby_parser_ruby_sourceline(rb_parser_t *p)
27668{
27669 return p->ruby_sourceline;
27670}
27671
27672int
27673rb_ruby_parser_lex_state(rb_parser_t *p)
27674{
27675 return p->lex.state;
27676}
27677
27678void
27679rb_ruby_ripper_parse0(rb_parser_t *p)
27680{
27681 parser_prepare(p);
27682 p->ast = rb_ast_new();
27683 ripper_yyparse((void*)p);
27684 rb_ast_free(p->ast);
27685 p->ast = 0;
27686 p->eval_tree = 0;
27687 p->eval_tree_begin = 0;
27688}
27689
27690int
27691rb_ruby_ripper_dedent_string(rb_parser_t *p, rb_parser_string_t *string, int width)
27692{
27693 return dedent_string(p, string, width);
27694}
27695
27696int
27697rb_ruby_ripper_initialized_p(rb_parser_t *p)
27698{
27699 return p->lex.input != 0;
27700}
27701
27702void
27703rb_ruby_ripper_parser_initialize(rb_parser_t *p)
27704{
27705 parser_initialize(p);
27706}
27707
27708long
27709rb_ruby_ripper_column(rb_parser_t *p)
27710{
27711 return p->lex.ptok - p->lex.pbeg;
27712}
27713
27714long
27715rb_ruby_ripper_token_len(rb_parser_t *p)
27716{
27717 return p->lex.pcur - p->lex.ptok;
27718}
27719
27721rb_ruby_ripper_lex_lastline(rb_parser_t *p)
27722{
27723 return p->lex.lastline;
27724}
27725
27726VALUE
27727rb_ruby_ripper_lex_state_name(struct parser_params *p, int state)
27728{
27729 return rb_parser_lex_state_name(p, (enum lex_state_e)state);
27730}
27731
27732#ifdef UNIVERSAL_PARSER
27734rb_ripper_parser_params_allocate(const rb_parser_config_t *config)
27735{
27736 rb_parser_t *p = (rb_parser_t *)config->calloc(1, sizeof(rb_parser_t));
27737 p->config = config;
27738 return p;
27739}
27740#endif
27741
27742struct parser_params*
27743rb_ruby_ripper_parser_allocate(void)
27744{
27745 return (struct parser_params *)ruby_xcalloc(1, sizeof(struct parser_params));
27746}
27747#endif /* RIPPER */
27748
27749#ifndef RIPPER
27750void
27751rb_parser_printf(struct parser_params *p, const char *fmt, ...)
27752{
27753 va_list ap;
27754 VALUE mesg = p->debug_buffer;
27755
27756 if (NIL_P(mesg)) p->debug_buffer = mesg = rb_str_new(0, 0);
27757 va_start(ap, fmt);
27758 rb_str_vcatf(mesg, fmt, ap);
27759 va_end(ap);
27760 if (char_at_end(p, mesg, 0) == '\n') {
27761 rb_io_write(p->debug_output, mesg);
27762 p->debug_buffer = Qnil;
27763 }
27764}
27765
27766static void
27767parser_compile_error(struct parser_params *p, const rb_code_location_t *loc, const char *fmt, ...)
27768{
27769 va_list ap;
27770 int lineno, column;
27771
27772 if (loc) {
27773 lineno = loc->end_pos.lineno;
27774 column = loc->end_pos.column;
27775 }
27776 else {
27777 lineno = p->ruby_sourceline;
27778 column = rb_long2int(p->lex.pcur - p->lex.pbeg);
27779 }
27780
27781 rb_io_flush(p->debug_output);
27782 p->error_p = 1;
27783 va_start(ap, fmt);
27784 p->error_buffer =
27785 rb_syntax_error_append(p->error_buffer,
27786 p->ruby_sourcefile_string,
27787 lineno, column,
27788 p->enc, fmt, ap);
27789 va_end(ap);
27790}
27791
27792static size_t
27793count_char(const char *str, int c)
27794{
27795 int n = 0;
27796 while (str[n] == c) ++n;
27797 return n;
27798}
27799
27800/*
27801 * strip enclosing double-quotes, same as the default yytnamerr except
27802 * for that single-quotes matching back-quotes do not stop stripping.
27803 *
27804 * "\"`class' keyword\"" => "`class' keyword"
27805 */
27806size_t
27807rb_yytnamerr(struct parser_params *p, char *yyres, const char *yystr)
27808{
27809 if (*yystr == '"') {
27810 size_t yyn = 0, bquote = 0;
27811 const char *yyp = yystr;
27812
27813 while (*++yyp) {
27814 switch (*yyp) {
27815 case '\'':
27816 if (!bquote) {
27817 bquote = count_char(yyp+1, '\'') + 1;
27818 if (yyres) memcpy(&yyres[yyn], yyp, bquote);
27819 yyn += bquote;
27820 yyp += bquote - 1;
27821 break;
27822 }
27823 else {
27824 if (bquote && count_char(yyp+1, '\'') + 1 == bquote) {
27825 if (yyres) memcpy(yyres + yyn, yyp, bquote);
27826 yyn += bquote;
27827 yyp += bquote - 1;
27828 bquote = 0;
27829 break;
27830 }
27831 if (yyp[1] && yyp[1] != '\'' && yyp[2] == '\'') {
27832 if (yyres) memcpy(yyres + yyn, yyp, 3);
27833 yyn += 3;
27834 yyp += 2;
27835 break;
27836 }
27837 goto do_not_strip_quotes;
27838 }
27839
27840 case ',':
27841 goto do_not_strip_quotes;
27842
27843 case '\\':
27844 if (*++yyp != '\\')
27845 goto do_not_strip_quotes;
27846 /* Fall through. */
27847 default:
27848 if (yyres)
27849 yyres[yyn] = *yyp;
27850 yyn++;
27851 break;
27852
27853 case '"':
27854 case '\0':
27855 if (yyres)
27856 yyres[yyn] = '\0';
27857 return yyn;
27858 }
27859 }
27860 do_not_strip_quotes: ;
27861 }
27862
27863 if (!yyres) return strlen(yystr);
27864
27865 return (YYSIZE_T)(yystpcpy(yyres, yystr) - yyres);
27866}
27867#endif
27868
27869#ifdef RIPPER
27870#define validate(x) (void)(x)
27871
27872static VALUE
27873ripper_dispatch0(struct parser_params *p, ID mid)
27874{
27875 return rb_funcall(p->value, mid, 0);
27876}
27877
27878static VALUE
27879ripper_dispatch1(struct parser_params *p, ID mid, VALUE a)
27880{
27881 validate(a);
27882 return rb_funcall(p->value, mid, 1, a);
27883}
27884
27885static VALUE
27886ripper_dispatch2(struct parser_params *p, ID mid, VALUE a, VALUE b)
27887{
27888 validate(a);
27889 validate(b);
27890 return rb_funcall(p->value, mid, 2, a, b);
27891}
27892
27893static VALUE
27894ripper_dispatch3(struct parser_params *p, ID mid, VALUE a, VALUE b, VALUE c)
27895{
27896 validate(a);
27897 validate(b);
27898 validate(c);
27899 return rb_funcall(p->value, mid, 3, a, b, c);
27900}
27901
27902static VALUE
27903ripper_dispatch4(struct parser_params *p, ID mid, VALUE a, VALUE b, VALUE c, VALUE d)
27904{
27905 validate(a);
27906 validate(b);
27907 validate(c);
27908 validate(d);
27909 return rb_funcall(p->value, mid, 4, a, b, c, d);
27910}
27911
27912static VALUE
27913ripper_dispatch5(struct parser_params *p, ID mid, VALUE a, VALUE b, VALUE c, VALUE d, VALUE e)
27914{
27915 validate(a);
27916 validate(b);
27917 validate(c);
27918 validate(d);
27919 validate(e);
27920 return rb_funcall(p->value, mid, 5, a, b, c, d, e);
27921}
27922
27923static VALUE
27924ripper_dispatch7(struct parser_params *p, ID mid, VALUE a, VALUE b, VALUE c, VALUE d, VALUE e, VALUE f, VALUE g)
27925{
27926 validate(a);
27927 validate(b);
27928 validate(c);
27929 validate(d);
27930 validate(e);
27931 validate(f);
27932 validate(g);
27933 return rb_funcall(p->value, mid, 7, a, b, c, d, e, f, g);
27934}
27935
27936void
27937ripper_error(struct parser_params *p)
27938{
27939 p->error_p = TRUE;
27940}
27941
27942VALUE
27943ripper_value(struct parser_params *p)
27944{
27945 (void)yystpcpy; /* may not used in newer bison */
27946
27947 return p->value;
27948}
27949
27950#endif /* RIPPER */
27951/*
27952 * Local variables:
27953 * mode: c
27954 * c-file-style: "ruby"
27955 * End:
27956 */
#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:661
#define ruby_verbose
This variable controls whether the interpreter is in debug mode.
Definition error.h:476
VALUE rb_eRuntimeError
RuntimeError exception.
Definition error.c:1425
VALUE rb_eSyntaxError
SyntaxError exception.
Definition error.c:1444
VALUE rb_class_new_instance(int argc, const VALUE *argv, VALUE klass)
Allocates, then initialises an instance of the given class.
Definition object.c:2295
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:829
VALUE rb_funcall(VALUE recv, ID mid, int n,...)
Calls a method.
Definition vm_eval.c:1120
VALUE rb_ary_new(void)
Allocates a new, empty array.
VALUE rb_ary_pop(VALUE ary)
Destructively deletes an element from the end of the passed array and returns what was deleted.
VALUE rb_ary_push(VALUE ary, VALUE elem)
Special case of rb_ary_cat() that it adds only one element.
VALUE rb_ary_entry(VALUE ary, long off)
Queries an element of an array.
#define rb_str_new(str, len)
Allocates an instance of rb_cString.
Definition string.h:1499
#define rb_usascii_str_new(str, len)
Identical to rb_str_new, except it generates a string of "US ASCII" encoding.
Definition string.h:1533
VALUE rb_str_cat(VALUE dst, const char *src, long srclen)
Destructively appends the passed contents to the string.
Definition string.c:3602
#define rb_strlen_lit(str)
Length of a string literal.
Definition string.h:1693
#define rb_str_cat_cstr(buf, str)
Identical to rb_str_cat(), except it assumes the passed pointer is a pointer to a C string.
Definition string.h:1657
#define rb_str_new_cstr(str)
Identical to rb_str_new, except it assumes the passed pointer is a pointer to a C string.
Definition string.h:1515
ID rb_sym2id(VALUE obj)
Converts an instance of rb_cSymbol into an ID.
Definition symbol.c:974
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.