Ruby 4.1.0dev (2026-05-22 revision 3903ef6407b0ecb49da6258b8bc9f80f0ac5b531)
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 16643
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 1441
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, 3307, 3307,
3584 3312, 3317, 3325, 3334, 3341, 3347, 3353, 3364, 3375, 3384,
3585 3396, 3397, 3402, 3402, 3403, 3414, 3419, 3420, 3427, 3427,
3586 3428, 3428, 3428, 3428, 3428, 3428, 3428, 3428, 3428, 3429,
3587 3429, 3429, 3432, 3433, 3439, 3439, 3439, 3446, 3447, 3454,
3588 3457, 3458, 3463, 3468, 3473, 3479, 3478, 3494, 3493, 3508,
3589 3511, 3522, 3532, 3531, 3545, 3545, 3546, 3552, 3552, 3552,
3590 3559, 3560, 3563, 3563, 3566, 3567, 3574, 3582, 3582, 3582,
3591 3589, 3596, 3605, 3610, 3615, 3620, 3625, 3631, 3637, 3643,
3592 3648, 3655, 3664, 3665, 3672, 3673, 3680, 3685, 3690, 3695,
3593 3695, 3695, 3700, 3705, 3710, 3715, 3720, 3725, 3732, 3733,
3594 3740, 3745, 3753, 3753, 3758, 3763, 3763, 3769, 3774, 3779,
3595 3784, 3792, 3792, 3797, 3802, 3802, 3807, 3812, 3817, 3822,
3596 3830, 3838, 3841, 3846, 3851, 3858, 3858, 3858, 3859, 3864,
3597 3867, 3872, 3875, 3880, 3880, 3888, 3889, 3890, 3891, 3892,
3598 3893, 3894, 3895, 3896, 3897, 3898, 3899, 3900, 3901, 3902,
3599 3903, 3904, 3905, 3906, 3907, 3908, 3909, 3910, 3911, 3912,
3600 3913, 3914, 3915, 3916, 3917, 3920, 3920, 3920, 3921, 3921,
3601 3922, 3922, 3922, 3923, 3923, 3923, 3923, 3924, 3924, 3924,
3602 3924, 3925, 3925, 3925, 3926, 3926, 3926, 3926, 3927, 3927,
3603 3927, 3927, 3928, 3928, 3928, 3928, 3929, 3929, 3929, 3929,
3604 3930, 3930, 3930, 3930, 3931, 3931, 3934, 3934, 3935, 3935,
3605 3935, 3935, 3935, 3935, 3935, 3935, 3935, 3936, 3936, 3936,
3606 3936, 3936, 3936, 3936, 3937, 3942, 3947, 3952, 3957, 3962,
3607 3967, 3972, 3977, 3982, 3987, 3992, 3997, 4002, 4003, 4008,
3608 4013, 4018, 4023, 4028, 4033, 4038, 4043, 4048, 4053, 4058,
3609 4065, 4065, 4065, 4066, 4067, 4070, 4079, 4080, 4086, 4093,
3610 4094, 4095, 4096, 4099, 4104, 4112, 4118, 4125, 4132, 4132,
3611 4135, 4136, 4137, 4142, 4149, 4154, 4163, 4168, 4178, 4190,
3612 4191, 4197, 4198, 4199, 4200, 4205, 4212, 4212, 4217, 4222,
3613 4227, 4233, 4239, 4243, 4243, 4281, 4286, 4294, 4299, 4307,
3614 4312, 4317, 4322, 4330, 4335, 4344, 4345, 4349, 4354, 4359,
3615 4377, 4377, 4377, 4377, 4377, 4377, 4377, 4377, 4378, 4379,
3616 4380, 4386, 4385, 4398, 4398, 4404, 4410, 4415, 4420, 4425,
3617 4431, 4436, 4441, 4446, 4451, 4458, 4463, 4468, 4473, 4474,
3618 4480, 4482, 4494, 4503, 4512, 4521, 4520, 4535, 4534, 4547,
3619 4555, 4555, 4556, 4600, 4599, 4622, 4621, 4641, 4640, 4659,
3620 4657, 4674, 4672, 4687, 4692, 4697, 4702, 4717, 4717, 4720,
3621 4727, 4745, 4752, 4760, 4768, 4775, 4783, 4792, 4801, 4809,
3622 4816, 4823, 4831, 4838, 4844, 4859, 4866, 4871, 4877, 4884,
3623 4891, 4892, 4893, 4896, 4897, 4900, 4902, 4911, 4912, 4919,
3624 4920, 4923, 4928, 4936, 4936, 4936, 4941, 4946, 4951, 4956,
3625 4963, 4969, 4976, 4977, 4984, 4984, 4986, 4986, 4986, 4986,
3626 4986, 4986, 4986, 4986, 4986, 4986, 4986, 4989, 4997, 4997,
3627 4997, 4997, 4997, 4997, 4997, 4997, 4997, 4997, 4997, 4997,
3628 4997, 4997, 4997, 4997, 4997, 4997, 4998, 5004, 5009, 5009,
3629 5012, 5013, 5019, 5029, 5033, 5036, 5041, 5048, 5050, 5054,
3630 5059, 5062, 5068, 5073, 5080, 5086, 5079, 5113, 5120, 5129,
3631 5136, 5135, 5146, 5154, 5166, 5176, 5182, 5187, 5195, 5202,
3632 5213, 5219, 5224, 5230, 5240, 5245, 5253, 5259, 5267, 5269,
3633 5284, 5284, 5305, 5311, 5316, 5322, 5330, 5339, 5340, 5343,
3634 5344, 5346, 5359, 5366, 5374, 5375, 5378, 5379, 5385, 5393,
3635 5394, 5400, 5406, 5411, 5416, 5423, 5426, 5433, 5437, 5436,
3636 5449, 5452, 5459, 5466, 5467, 5468, 5475, 5482, 5489, 5495,
3637 5502, 5509, 5516, 5522, 5527, 5532, 5539, 5538, 5549, 5555,
3638 5563, 5569, 5574, 5579, 5584, 5589, 5592, 5593, 5600, 5605,
3639 5612, 5620, 5626, 5633, 5634, 5641, 5648, 5653, 5658, 5663,
3640 5670, 5672, 5679, 5685, 5697, 5698, 5713, 5718, 5725, 5731,
3641 5732, 5739, 5740, 5740, 5740, 5740, 5740, 5740, 5740, 5741,
3642 5742, 5743, 5746, 5746, 5746, 5746, 5746, 5746, 5746, 5746,
3643 5747, 5752, 5755, 5763, 5775, 5782, 5789, 5794, 5799, 5807,
3644 5827, 5830, 5835, 5839, 5842, 5847, 5850, 5857, 5860, 5861,
3645 5864, 5876, 5877, 5878, 5885, 5898, 5910, 5917, 5917, 5917,
3646 5917, 5921, 5925, 5932, 5934, 5941, 5941, 5945, 5949, 5956,
3647 5956, 5959, 5959, 5963, 5967, 5975, 5979, 5987, 5991, 5999,
3648 6003, 6011, 6015, 6041, 6044, 6043, 6058, 6066, 6070, 6074,
3649 6089, 6090, 6093, 6098, 6101, 6102, 6105, 6121, 6122, 6125,
3650 6133, 6134, 6142, 6143, 6144, 6145, 6148, 6149, 6150, 6153,
3651 6153, 6154, 6157, 6158, 6159, 6160, 6161, 6162, 6163, 6166,
3652 6176, 6183, 6183, 6190, 6191, 6195, 6194, 6204, 6207, 6208,
3653 6215, 6222, 6232, 6233, 6233, 6250, 6250, 6250, 6250, 6250,
3654 6250, 6250, 6250, 6250, 6250, 6250, 6251, 6260, 6260, 6260,
3655 6260, 6260, 6261, 6352, 6352, 6352, 6352, 6352, 6352, 6352,
3656 6352, 6352, 6352, 6352, 6352, 6352, 6352, 6352, 6352, 6352,
3657 6352, 6352, 6352, 6352, 6352, 6352, 6355, 6355, 6355, 6355,
3658 6355, 6355, 6355, 6355, 6355, 6355, 6355, 6355, 6355, 6355,
3659 6355, 6355, 6355, 6355, 6355, 6355, 6358, 6365, 6374, 6383,
3660 6392, 6403, 6404, 6414, 6421, 6426, 6445, 6447, 6458, 6478,
3661 6479, 6482, 6488, 6494, 6502, 6503, 6506, 6512, 6520, 6521,
3662 6524, 6530, 6535, 6543, 6543, 6543, 6551, 6551, 6581, 6583,
3663 6582, 6595, 6596, 6603, 6605, 6630, 6635, 6640, 6647, 6653,
3664 6658, 6671, 6671, 6671, 6672, 6675, 6676, 6677, 6680, 6681,
3665 6684, 6685, 6688, 6689, 6692, 6695, 6698, 6701, 6702, 6705,
3666 6713, 6720, 6721, 6725
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 (-1208)
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 -1208, 6355, 149, -1208, -1208, -1208, -1208, 11126, -1208, -1208,
3812 -1208, -1208, -1208, -1208, -1208, 12181, 12181, -1208, -1208, -1208,
3813 -1208, 7415, -1208, -1208, -1208, -1208, 570, 10972, 203, 115,
3814 -1208, -1208, -1208, -1208, 6791, 7571, -1208, -1208, 6947, -1208,
3815 -1208, -1208, -1208, -1208, -1208, -1208, -1208, 13741, 13741, 13741,
3816 13741, 315, 9885, 10043, 12661, 12901, 11427, -1208, 10818, -1208,
3817 -1208, -1208, 237, 237, 237, 237, 1314, 13861, 13741, -1208,
3818 492, -1208, 115, 1126, -1208, -1208, -1208, -1208, -1208, 477,
3819 31, 31, -1208, -1208, 129, 397, 316, -1208, 377, 14461,
3820 -1208, 401, -1208, 3423, -1208, -1208, -1208, -1208, 671, 419,
3821 -1208, 444, -1208, 12061, 12061, -1208, -1208, 10505, 14579, 14697,
3822 14815, 10663, 12181, 8039, -1208, 717, 91, -1208, -1208, 458,
3823 -1208, -1208, -1208, -1208, -1208, -1208, -1208, -1208, -1208, -1208,
3824 -1208, -1208, -1208, -1208, -1208, -1208, -1208, 454, 511, -1208,
3825 491, 585, -1208, -1208, -1208, -1208, -1208, -1208, -1208, -1208,
3826 -1208, -1208, -1208, -1208, -1208, -1208, -1208, -1208, -1208, -1208,
3827 -1208, -1208, -1208, -1208, -1208, -1208, -1208, -1208, -1208, -1208,
3828 -1208, -1208, -1208, -1208, -1208, -1208, -1208, -1208, -1208, -1208,
3829 -1208, -1208, -1208, -1208, -1208, -1208, -1208, -1208, -1208, -1208,
3830 -1208, -1208, -1208, -1208, -1208, -1208, -1208, -1208, -1208, -1208,
3831 -1208, -1208, -1208, -1208, -1208, -1208, -1208, -1208, -1208, -1208,
3832 -1208, -1208, -1208, -1208, -1208, -1208, -1208, -1208, -1208, -1208,
3833 445, -1208, -1208, -1208, -1208, -1208, -1208, 459, 13741, 575,
3834 10043, 13741, 13741, 13741, -1208, 13741, -1208, -1208, 513, 5458,
3835 -1208, 573, -1208, -1208, -1208, 532, -1208, 544, 47, 97,
3836 615, 239, 592, -1208, -1208, 12301, -1208, 12181, -1208, -1208,
3837 11802, 13981, 908, -1208, 633, -1208, 10201, -1208, -1208, -1208,
3838 -1208, -1208, 642, 31, 31, 129, -1208, 683, -1208, 649,
3839 688, 5889, 5889, 791, -1208, 9885, 658, 492, -1208, 1126,
3840 203, 691, -1208, -1208, 701, -29, 500, -1208, 573, 680,
3841 500, -1208, 203, 816, 1314, 14933, 708, 708, 737, -1208,
3842 725, 752, 779, 783, -1208, -1208, 88, -1208, -1208, 483,
3843 989, 378, -1208, 749, 749, 749, 749, 844, -1208, -1208,
3844 -1208, -1208, -1208, -1208, -1208, 6507, 10353, 12061, 12061, 12061,
3845 12061, -1208, 13981, 13981, 1154, 846, -1208, 853, -1208, 1154,
3846 871, -1208, -1208, -1208, -1208, 870, -1208, -1208, -1208, -1208,
3847 -1208, -1208, -1208, 9885, 11545, 804, -1208, -1208, 13741, 13741,
3848 13741, 13741, 13741, -1208, -1208, 13741, 13741, 13741, 13741, 13741,
3849 13741, 13741, 13741, -1208, 13741, -1208, -1208, 13741, 13741, 13741,
3850 13741, 13741, 13741, 13741, 13741, 13741, 13741, -1208, -1208, 5536,
3851 12181, 5672, 642, 8821, -1208, 477, -1208, 146, 146, 12061,
3852 9733, 9733, -1208, 492, 849, 960, -1208, -1208, 798, 993,
3853 72, 95, 102, 673, 731, 12061, 100, -1208, 885, 810,
3854 -1208, -1208, -1208, -1208, 73, 580, 635, 638, 647, 699,
3855 748, 770, 788, -1208, -1208, -1208, -1208, -1208, 855, -1208,
3856 -1208, 11663, -1208, -1208, -1208, 5348, -1208, -1208, -1208, -1208,
3857 -1208, -1208, 330, -1208, -1208, -1208, 869, -1208, 13741, 12421,
3858 -1208, -1208, 15213, 12181, 15311, -1208, -1208, 12781, -1208, 13741,
3859 203, -1208, 874, 203, 877, -1208, -1208, 876, 382, -1208,
3860 -1208, -1208, -1208, -1208, 11126, -1208, -1208, 13741, 890, 903,
3861 922, 15409, 15311, -1208, 115, 203, -1208, -1208, 6071, 904,
3862 906, -1208, 12661, -1208, -1208, 12901, -1208, -1208, -1208, 633,
3863 829, -1208, 912, -1208, -1208, 14933, 15507, 12181, 15605, -1208,
3864 -1208, -1208, -1208, -1208, -1208, -1208, -1208, -1208, -1208, -1208,
3865 -1208, 1009, 198, 1043, 292, 13741, -1208, -1208, 918, -1208,
3866 -1208, -1208, -1208, -1208, 11941, -1208, -1208, -1208, -1208, -1208,
3867 -1208, -1208, -1208, -1208, -1208, 1248, -1208, -1208, -1208, -1208,
3868 -1208, 925, -1208, -1208, -1208, 928, -1208, -1208, -1208, 939,
3869 -1208, -1208, -1208, 203, -1208, -1208, -1208, 962, -1208, 949,
3870 13741, 98, -1208, -1208, 1021, 950, 164, -1208, 14101, 8821,
3871 492, 14101, 8821, -1208, 964, -1208, -1208, -1208, 123, 123,
3872 13021, 203, 14933, 959, -1208, 13141, -1208, 688, 4134, 4134,
3873 4134, 4134, 5077, 3664, 4134, 4134, 5889, 5889, 998, 998,
3874 -1208, 4476, 943, 943, 1077, 628, 628, 688, 688, 688,
3875 1320, 1320, 8195, 7103, 8507, 7259, 642, -1208, 203, 965,
3876 899, -1208, 910, -1208, 7727, -1208, -1208, 123, -1208, 8973,
3877 1064, 9429, 79, 123, 123, 1108, 1107, 112, 15703, 12181,
3878 15801, -1208, -1208, -1208, 829, -1208, -1208, -1208, -1208, 15899,
3879 12181, 15997, 8821, 13981, -1208, -1208, -1208, 203, -1208, -1208,
3880 -1208, -1208, 3174, 14221, 14221, 11126, -1208, 13741, 13741, -1208,
3881 573, -1208, -1208, 592, 6635, 7883, 203, 334, 341, 13741,
3882 13741, -1208, -1208, 12541, -1208, 12781, -1208, -1208, -1208, 13981,
3883 5458, -1208, 14341, 14341, 77, 642, 642, 14221, -1208, 38,
3884 -1208, -1208, 500, 14933, 912, 422, 694, 203, 485, 522,
3885 -1208, -1208, 1266, -1208, 63, -1208, 237, -1208, -1208, 63,
3886 237, -1208, 688, -1208, -1208, 1248, 1272, -1208, 979, 203,
3887 981, -1208, 399, -1208, -1208, -1208, 65, -1208, 1154, -1208,
3888 -1208, -1208, 1012, 13741, 1154, -1208, -1208, -1208, -1208, -1208,
3889 1777, -1208, -1208, -1208, 570, 1110, -1208, 5458, 1113, 123,
3890 -1208, 1110, 1113, 123, -1208, -1208, 999, -1208, -1208, -1208,
3891 -1208, -1208, 13741, -1208, -1208, -1208, 1005, 1020, 1133, -1208,
3892 -1208, 912, 14933, 1124, -1208, -1208, 1137, 1049, 3921, -1208,
3893 -1208, -1208, 842, 361, -1208, -1208, 1057, -1208, -1208, -1208,
3894 -1208, 870, 1036, 968, 12421, -1208, -1208, -1208, -1208, 870,
3895 -1208, 1177, -1208, 934, -1208, 1181, -1208, -1208, -1208, -1208,
3896 -1208, -1208, 13261, 123, -1208, 1108, 123, 187, 298, 203,
3897 128, 144, 12061, 492, 12061, 8821, 736, 694, -1208, 203,
3898 123, 382, 11280, -1208, 91, 397, -1208, 4215, -1208, -1208,
3899 -1208, -1208, 13741, -1208, -1208, -1208, -1208, 393, -1208, -1208,
3900 203, 1044, 382, 570, -1208, -1208, -1208, -1208, 583, -1208,
3901 -1208, -1208, -1208, -1208, 749, -1208, 749, 749, 749, 203,
3902 -1208, 1248, -1208, 1134, -1208, -1208, 1146, 925, -1208, -1208,
3903 1046, 1048, -1208, -1208, 1050, -1208, 1052, -1208, 1046, 14101,
3904 -1208, -1208, -1208, -1208, -1208, -1208, -1208, 1058, 13381, -1208,
3905 912, 487, -1208, -1208, -1208, 16095, 12181, 16193, -1208, -1208,
3906 13741, 14221, 14221, 1074, -1208, -1208, -1208, 14221, 14221, -1208,
3907 -1208, 13501, 1181, -1208, -1208, -1208, 9733, 12061, 123, -1208,
3908 -1208, 123, -1208, 13741, -1208, 86, -1208, -1208, 123, -1208,
3909 155, 79, 8821, 492, 123, -1208, -1208, -1208, -1208, -1208,
3910 -1208, 13741, 13741, -1208, 13741, 13741, -1208, 12781, -1208, 14341,
3911 1795, 5844, -1208, -1208, 1072, 1075, -1208, 1777, -1208, 1777,
3912 -1208, 1154, -1208, 1777, -1208, -1208, 1110, 1113, 13741, 13741,
3913 -1208, -1208, 13741, 1079, 11941, 11941, 14221, 13741, 8351, 8663,
3914 203, 609, 614, 4801, 4801, 5458, -1208, -1208, -1208, -1208,
3915 -1208, 14221, -1208, -1208, -1208, -1208, 1005, -1208, 1103, -1208,
3916 1226, -1208, -1208, 146, -1208, -1208, -1208, 13621, 9125, -1208,
3917 -1208, -1208, 123, -1208, -1208, 13741, 1154, 1082, -1208, -1208,
3918 1083, -1208, -1208, 1087, -1208, -1208, -1208, -1208, -1208, 1097,
3919 1099, -1208, 170, 1134, 1134, 1046, 1046, 1109, 1046, 5458,
3920 5458, 1100, 1100, 1058, -1208, -1208, 5458, 707, -1208, -1208,
3921 -1208, 3764, 3764, 396, -1208, 4365, 542, 1214, -1208, 996,
3922 -1208, -1208, 34, -1208, 1129, -1208, -1208, -1208, 1114, -1208,
3923 1117, -1208, 5007, -1208, -1208, -1208, -1208, -1208, 924, -1208,
3924 -1208, -1208, 64, -1208, -1208, -1208, -1208, -1208, -1208, -1208,
3925 -1208, -1208, 415, -1208, -1208, -1208, 15051, 146, -1208, -1208,
3926 9733, -1208, -1208, 9581, 8973, 13741, -1208, 969, 4801, 9733,
3927 -1208, 203, 399, -1208, -1208, 76, 65, -1208, 1154, -1208,
3928 -1208, 1154, -1208, 1777, -1208, -1208, -1208, -1208, 1075, -1208,
3929 -1208, 1777, -1208, -1208, 1513, 10353, -1208, -1208, 8821, -1208,
3930 -1208, -1208, -1208, 5007, 113, 203, 5142, -1208, 203, 1120,
3931 -1208, 1130, -1208, -1208, -1208, 1026, -1208, 12061, -1208, 1229,
3932 5142, -1208, 5007, 825, 1185, 3764, 3764, 396, 572, 353,
3933 4801, 4801, -1208, 1231, -1208, 845, 206, 224, 240, 8821,
3934 492, -1208, 934, -1208, -1208, -1208, -1208, 146, 1000, 123,
3935 1141, 1131, -1208, -1208, 10353, -1208, 1082, -1208, 1139, 1142,
3936 1152, 1157, 1139, 1046, 1082, -1208, 1159, -1208, -1208, -1208,
3937 1160, -1208, -1208, -1208, 203, 962, 1161, 15169, 1164, -1208,
3938 -1208, -1208, 286, -1208, 1185, 1170, 1178, -1208, -1208, -1208,
3939 -1208, -1208, 203, -1208, -1208, 1183, 5007, 1184, -1208, -1208,
3940 -1208, -1208, -1208, -1208, -1208, -1208, -1208, -1208, -1208, 203,
3941 203, 203, 203, 203, 203, 279, 16291, 12181, 16389, 1177,
3942 -1208, 1226, -1208, -1208, 12061, 12061, -1208, 1302, -1208, 8821,
3943 1189, -1208, 1777, -1208, 1777, -1208, 1154, -1208, 1777, -1208,
3944 -1208, -1208, -1208, 65, -1208, 1513, -1208, -1208, 1203, 15169,
3945 1513, -1208, -1208, 1253, 859, 1853, -1208, -1208, 5007, -1208,
3946 825, -1208, 5007, -1208, 5142, 438, -1208, -1208, -1208, -1208,
3947 -1208, -1208, 147, 173, 203, 300, 403, -1208, -1208, 9277,
3948 -1208, -1208, -1208, 907, -1208, -1208, 123, -1208, 1139, 1139,
3949 1198, 1139, -1208, 1082, -1208, -1208, 1207, 1208, -1208, 859,
3950 1210, 1211, -1208, 16487, 1207, 1215, 203, 1215, -1208, -1208,
3951 413, 143, 1302, -1208, -1208, -1208, -1208, 1777, -1208, -1208,
3952 -1208, 1853, -1208, 1853, -1208, 1513, -1208, 1853, -1208, 1212,
3953 1227, -1208, 5007, -1208, -1208, -1208, -1208, -1208, 1139, 1207,
3954 1207, 1216, 1207, -1208, -1208, -1208, 1853, -1208, -1208, 1207,
3955 -1208
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, 0, 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, 39, 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, 64,
4054 440, 0, 795, 0, 729, 728, 803, 813, 746, 745,
4055 813, 813, 445, 743, 813, 797, 813, 794, 813, 0,
4056 853, 853, 390, 392, 493, 96, 493, 339, 0, 853,
4057 121, 357, 853, 853, 853, 843, 853, 842, 530, 530,
4058 0, 0, 0, 0, 105, 845, 853, 0, 0, 103,
4059 411, 853, 18, 630, 415, 414, 0, 0, 0, 425,
4060 427, 0, 89, 0, 522, 0, 378, 529, 0, 379,
4061 515, 0, 0, 0, 0, 515, 388, 820, 83, 505,
4062 506, 0, 0, 853, 0, 0, 307, 314, 364, 0,
4063 720, 0, 432, 434, 436, 439, 731, 814, 757, 814,
4064 754, 814, 750, 814, 752, 759, 66, 288, 0, 0,
4065 26, 26, 334, 337, 0, 0, 0, 0, 831, 832,
4066 64, 831, 832, 0, 0, 285, 54, 242, 55, 243,
4067 106, 0, 52, 240, 53, 241, 631, 632, 853, 633,
4068 853, 15, 428, 0, 371, 372, 523, 0, 0, 530,
4069 376, 381, 0, 716, 384, 0, 720, 853, 495, 784,
4070 853, 741, 782, 853, 780, 785, 783, 498, 742, 853,
4071 853, 740, 0, 0, 0, 813, 813, 813, 813, 63,
4072 287, 853, 853, 338, 44, 68, 305, 515, 622, 628,
4073 594, 0, 0, 0, 530, 64, 530, 582, 667, 0,
4074 621, 78, 539, 545, 547, 550, 543, 542, 578, 544,
4075 587, 590, 593, 599, 600, 589, 553, 608, 601, 554,
4076 609, 610, 611, 612, 613, 614, 615, 616, 618, 617,
4077 619, 620, 597, 76, 51, 239, 0, 0, 635, 412,
4078 0, 19, 637, 0, 0, 0, 524, 853, 0, 0,
4079 386, 64, 0, 739, 451, 0, 0, 738, 0, 776,
4080 767, 0, 781, 0, 778, 681, 680, 679, 437, 755,
4081 751, 814, 748, 753, 483, 0, 481, 480, 0, 606,
4082 607, 151, 626, 0, 570, 64, 571, 575, 64, 0,
4083 565, 0, 853, 568, 581, 0, 623, 0, 624, 0,
4084 540, 548, 0, 588, 592, 604, 605, 0, 530, 530,
4085 0, 0, 596, 0, 634, 0, 709, 710, 349, 0,
4086 3, 16, 853, 525, 527, 528, 526, 0, 536, 0,
4087 485, 0, 450, 500, 0, 496, 853, 766, 853, 853,
4088 853, 853, 853, 813, 853, 448, 853, 456, 478, 459,
4089 853, 475, 484, 479, 64, 794, 853, 447, 853, 455,
4090 519, 521, 64, 563, 585, 573, 572, 564, 576, 846,
4091 566, 595, 64, 546, 541, 578, 0, 579, 583, 667,
4092 591, 586, 602, 603, 627, 552, 562, 551, 558, 64,
4093 64, 64, 64, 64, 64, 357, 843, 853, 842, 853,
4094 636, 853, 426, 532, 0, 0, 382, 0, 497, 0,
4095 0, 737, 0, 777, 0, 774, 0, 770, 0, 772,
4096 779, 749, 454, 0, 453, 0, 471, 462, 0, 0,
4097 457, 476, 477, 0, 446, 0, 473, 569, 0, 577,
4098 0, 625, 0, 549, 0, 0, 555, 556, 557, 559,
4099 560, 561, 835, 356, 64, 831, 832, 629, 17, 0,
4100 537, 538, 489, 64, 487, 490, 0, 499, 853, 853,
4101 853, 853, 449, 853, 461, 460, 853, 853, 482, 458,
4102 853, 853, 357, 843, 853, 574, 64, 579, 580, 584,
4103 515, 853, 0, 486, 501, 775, 771, 0, 768, 773,
4104 452, 0, 472, 0, 469, 0, 465, 0, 467, 835,
4105 356, 474, 0, 567, 534, 535, 533, 488, 853, 853,
4106 853, 853, 853, 769, 470, 466, 0, 463, 468, 853,
4107 464
4108};
4109
4110/* YYPGOTO[NTERM-NUM]. */
4111static const yytype_int16 yypgoto[] =
4112{
4113 -1208, -91, 1121, -1208, -1208, -1208, 1056, 1311, 888, -47,
4114 -1208, -1208, -531, -1208, 245, 889, -1208, 10, -1208, -1208,
4115 11, -1208, -1208, -156, -1208, 6, -543, -24, -620, 37,
4116 -1208, -1208, 524, 3179, -1208, 3361, -1208, -44, -1208, -1208,
4117 1293, 17, -1208, 797, -1208, -603, 1405, -8, 1296, -163,
4118 40, -430, -62, -1208, 33, 4322, -398, 1291, -41, -7,
4119 -1208, -1208, 3, -1208, -1208, 5327, -1208, -1208, -1208, -1208,
4120 -557, 1310, -1208, 27, 915, 346, -1208, 1104, -1208, 564,
4121 54, 719, -360, -1208, 67, -1208, -28, -368, -202, 18,
4122 -426, -1208, -546, -43, -1208, -1208, -1208, -1208, -1208, -1208,
4123 -1208, -1208, -1208, -1208, -1208, -1208, 1387, -1208, -1208, -1208,
4124 -1208, -1208, -1208, -1208, -1208, -1208, -1208, -1208, -1208, -1208,
4125 -1208, -1208, 452, -1208, -250, 2400, 2712, -394, 451, 193,
4126 -816, -1208, -815, -813, 664, 515, 618, -1208, 169, 103,
4127 -1208, -1031, -1208, 251, -1208, -1189, 101, 156, -1208, -1208,
4128 -1208, 345, -1208, -1208, 178, -1208, 43, 182, -273, 60,
4129 -1208, -1208, 705, -1208, -1208, -1208, 574, -1208, -1208, -97,
4130 -1208, -515, -1208, 1089, -1208, -774, -1208, -722, -801, -536,
4131 -1208, 49, -1208, -1208, -926, -383, -1208, -1208, -1208, -1208,
4132 -1208, 165, -1208, -243, -1208, -605, -1017, -1098, -418, -856,
4133 -1105, -1208, 243, -1208, -1208, -870, 254, -1208, -1208, -664,
4134 244, -1208, -1208, -1208, 159, -1208, -1208, 162, 988, 1069,
4135 -1208, 1351, 1084, 1332, 15, -1208, 1483, -1208, 935, -1208,
4136 1675, -1208, -1208, 1682, -1208, 1725, -1208, -1208, -56, -1208,
4137 -1208, -119, -1208, -1208, -1208, -1208, -1208, -1208, 35, -1208,
4138 -1208, -1208, -1208, 45, -49, 3981, 259, 1366, 4421, 3843,
4139 -1208, -1208, 80, -308, 794, -22, -1208, -731, -422, -528,
4140 -1208, 434, -1208, -876, -737, -681, -450, -1208, -1208, -1208,
4141 1132, -34, -1208, -1208, -1208, 416, -207, -1207, -210, -213,
4142 -748, 809, -318, -638, -1208, -734, -1208, 8, -1208, 367,
4143 -1208, -526, -1208, -1208, -1208, -1208, -1208, 22, -413, -280,
4144 -1208, -1208, -90, 1368, -275, -301, 89, -209, -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 1153, 1311, 657, 1050, 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, 972,
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, 1159,
4161 865, 863, 682, 599, 602, 100, 277, 102, 103, 104,
4162 105, 106, 107, 108, 109, 110, 111, 356, 359, 961,
4163 1150, 852, 966, 967, 800, 278, 279, 659, 847, 968,
4164 969, 419, 757, 758, 759, 760, 571, 772, 773, 1255,
4165 1256, 1163, 1257, 1384, 1341, 1259, 1260, 1336, 1261, 1262,
4166 1263, 1185, 1186, 1264, 1241, 1373, 1374, 529, 740, 899,
4167 314, 1165, 114, 1068, 1245, 1319, 360, 115, 116, 357,
4168 603, 604, 607, 608, 975, 853, 1236, 948, 1033, 824,
4169 1369, 856, 1426, 1237, 1111, 1274, 1113, 1286, 1114, 1220,
4170 1221, 1115, 1350, 1195, 1196, 1197, 1117, 1118, 1287, 1199,
4171 1119, 1120, 1121, 1122, 1123, 572, 1125, 1126, 1127, 1128,
4172 1129, 1130, 1131, 1132, 962, 1048, 1147, 1151, 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, 1001, 1177, 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, 918, 1071, 1247, 578, 579, 769, 580, 581, 582,
4179 583, 1169, 1074, 1075, 1076, 1077, 584, 585, 586, 927,
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, 1203, 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, 286, 293, 237, 237, 318,
4192 221, 401, 73, 309, 661, 509, 412, 315, 334, 456,
4193 263, 236, 236, 225, 226, 454, 925, 365, 675, 971,
4194 221, 919, 917, 245, 245, 915, 573, 252, 252, 1167,
4195 648, 573, 223, 702, 792, 765, 309, 767, 483, 765,
4196 478, 292, 292, 297, 301, 334, 355, 268, 791, 351,
4197 408, 221, 223, 413, 711, 309, 309, 309, 789, 821,
4198 445, 793, 295, 876, 879, 256, 296, 300, 324, 325,
4199 326, 978, 243, 254, 328, 452, 702, 516, 1198, 308,
4200 796, 518, 291, 924, 825, 734, 1003, -141, 1275, 658,
4201 1005, 701, 711, 949, 237, 1243, 846, 894, 1143, 701,
4202 1375, 327, 1285, 706, 221, 1301, 1304, 352, 236, 646,
4203 -142, 654, 505, 562, 1072, 259, 512, -149, 916, 530,
4204 245, 587, 777, 798, 252, 1209, 587, -148, 354, 775,
4205 405, 405, -703, 563, 405, 781, 1385, -711, 1034, 143,
4206 778, 870, 673, -144, 530, 352, 674, 474, 965, 658,
4207 -146, 350, 1217, 1124, 1124, -720, 792, 737, 854, -145,
4208 1175, -703, -113, 567, 568, 692, 688, 886, 466, 450,
4209 -143, -141, 811, 286, 532, 533, -147, 502, 344, 1210,
4210 1072, 799, 646, -129, 654, 1375, 507, -712, 782, 1244,
4211 611, 537, 539, 1300, 1303, 712, 569, 531, 714, 532,
4212 533, -147, -146, 717, 1209, 1321, 783, 1218, 508, -141,
4213 528, 1219, 726, 1332, 322, 1334, 1385, -132, 954, 292,
4214 729, -142, 1238, 331, -832, 334, 959, -142, 286, 332,
4215 331, 1057, 353, 523, 471, 1396, 332, 237, 726, 237,
4216 -133, 471, 351, -149, 485, 1059, 1398, -140, 1158, 925,
4217 138, 236, 309, 236, 746, 142, 265, -139, -585, 1003,
4218 1178, 513, 513, 482, 919, 245, 513, 73, 519, 252,
4219 353, 868, 478, -135, 292, 351, 255, 702, 1124, 548,
4220 1176, 496, -148, 549, 550, 551, 552, 488, 490, -136,
4221 331, -146, 711, 1193, -831, 1202, 332, -146, 771, 859,
4222 -134, 138, 138, -144, 953, 312, 286, 747, 977, 1073,
4223 869, 309, 666, -147, 486, 291, 256, -147, 670, 354,
4224 -832, 1036, 1038, -147, 984, 292, 810, 1042, 1044, 476,
4225 1276, 1234, -137, 1124, -831, 701, 73, 701, 312, 521,
4226 1124, 1124, 1410, 499, 500, 761, 1288, 259, 750, 801,
4227 -141, 334, 292, 663, 664, 662, -141, 421, 431, 431,
4228 431, 283, 1017, -149, 405, 405, 405, 405, -142, 555,
4229 556, 672, 940, 1235, -142, 1073, 1016, 1209, 610, 1006,
4230 726, 765, 237, 615, -149, 1142, 1142, 613, 322, 485,
4231 -149, 726, 292, 291, 653, 887, 236, 842, 702, 292,
4232 292, 751, 873, 849, 850, 1047, -145, 1295, 1297, 342,
4233 343, 1144, 745, 925, 745, 358, -143, 678, 1116, 1116,
4234 696, 919, 1246, -148, 888, 915, 898, 1189, 1190, -148,
4235 259, 889, 1017, 237, 530, 538, 405, -137, 673, 777,
4236 361, 1062, 1191, -138, -144, -832, 655, 236, 653, 814,
4237 -144, 459, 405, 523, -148, 237, 701, 1222, -144, 245,
4238 1008, 1010, 485, 252, 1012, -145, 1014, 653, 1015, 236,
4239 1124, 471, 309, 471, 912, 693, 694, 718, -397, 138,
4240 1250, 703, 1288, 993, 698, -149, 1288, 221, 1399, 532,
4241 533, 884, 709, 710, 530, 653, 890, 259, 568, 691,
4242 -135, -64, 702, 397, 342, 343, -397, -397, 687, 237,
4243 1142, 934, 496, 896, 936, 138, 485, -143, 916, 223,
4244 727, 653, 362, 236, 732, 366, 259, 814, 814, 932,
4245 569, 398, 399, 933, 138, 761, 910, -136, 790, 530,
4246 523, 1292, 1293, 1116, -711, 587, -137, -145, 980, 532,
4247 533, 587, 1281, -145, 312, 754, 1399, -143, 985, 309,
4248 59, 814, -397, -143, 925, 1142, -137, -137, 1070, -831,
4249 -137, 1058, 1142, 1142, 711, 1424, 1030, 503, -141, 919,
4250 786, 458, 925, 786, 138, 138, 987, 400, 292, 1383,
4251 460, 292, 535, 976, 532, 533, 979, 826, -134, -132,
4252 848, -712, 843, 397, 845, 996, 260, 998, 831, -135,
4253 986, -148, 138, 312, 832, 905, 839, 803, 807, 701,
4254 905, 462, 803, 807, 1002, 1179, 1180, 1182, 1183, -135,
4255 -135, 398, 472, -135, 1070, -142, 331, 467, 471, -702,
4256 1112, 1112, 332, 840, 259, 515, -136, 1271, 292, 1154,
4257 292, 237, 138, 925, 875, 646, -133, 654, 485, 138,
4258 138, 897, 237, 653, 468, 236, -136, -136, -702, 485,
4259 -136, 292, 832, 841, 653, 459, 236, 469, 881, 884,
4260 309, 840, 1069, 902, -64, 916, 259, 473, 221, -97,
4261 830, 761, 471, 761, -704, 1192, 368, -705, 513, 835,
4262 803, 803, 1142, 832, 836, 475, -707, -134, 1054, -149,
4263 871, 1055, 1194, 882, 259, 840, 259, 260, 1060, 1097,
4264 223, -64, 947, -704, 1064, 891, -705, -134, -134, 1214,
4265 -140, -134, -699, -144, 803, -707, 1070, 477, -145, 1070,
4266 523, 1070, 397, 1229, 373, 374, 892, -98, 1069, 904,
4267 929, 906, -835, -356, 907, 908, 368, 138, -706, 309,
4268 -699, -699, 392, 393, 394, 1112, 921, 989, 577, 830,
4269 398, 501, 926, 577, 312, 794, 397, 587, 1376, 797,
4270 495, -356, -356, 1078, 397, 814, 814, -706, 587, 255,
4271 -700, 814, 814, 1331, 1200, -835, 451, 956, 385, 386,
4272 1272, 982, 1160, 138, 398, 453, 506, -708, 981, 1294,
4273 983, -709, 398, 526, -97, -112, -699, 1194, -700, -700,
4274 -97, 445, 517, -835, -835, 832, 473, 1194, 1194, -699,
4275 963, -143, 970, 1313, 970, 832, -708, -356, -710, -709,
4276 -709, -832, -349, 587, 951, 952, 891, -700, 138, 1078,
4277 511, 138, 957, 958, 292, 344, 1267, 397, -699, 999,
4278 814, 312, 520, 761, 761, 221, -710, -710, 527, 397,
4279 -349, -349, -98, 1100, -700, 814, -700, -835, -98, -835,
4280 471, 503, 525, -831, 1273, 398, 668, 1277, -357, 405,
4281 1070, 405, 1070, 563, 1070, -709, 1070, 398, 679, 1000,
4282 540, 397, 991, 992, 397, 994, 995, 1296, 138, 1052,
4283 138, 786, 545, 1053, 684, -148, -357, -357, 397, 848,
4284 1395, 1063, -710, 567, 1397, 530, -349, 1289, 237, 398,
4285 945, 138, 398, 1306, 1298, 485, -139, 1364, 964, 965,
4286 653, 669, 236, 685, 1082, 587, 398, 1393, 587, 614,
4287 1049, 1078, 491, 680, 1078, 292, 1078, 1284, 803, 803,
4288 1026, 1265, 492, 493, 803, 803, 605, 1299, 1302, 807,
4289 598, 292, -357, 1041, 965, 1070, 851, -718, 535, 1316,
4290 532, 533, 312, 697, 1020, 946, 1021, 1347, 1307, 835,
4291 292, 1359, 1360, 1361, 405, 601, 832, 1351, 1080, 546,
4292 836, 1157, 680, 1215, 1216, 1267, 667, 1267, 671, 1087,
4293 1065, 368, 1267, 676, 1356, 1357, 1358, 1267, 726, 713,
4294 1091, 1092, 715, -144, 716, 1094, 1095, 722, 381, 382,
4295 1314, 1315, 721, 803, -145, 1172, 1174, 1148, 1206, 1152,
4296 36, 37, 1205, 39, -135, 530, 723, 292, 803, -129,
4297 1208, 259, 1402, 1400, 731, -136, 1164, 733, 956, 1164,
4298 753, 312, 1170, 779, 1080, 530, 368, 844, 1170, 1170,
4299 762, 832, 1201, 766, 389, 390, 391, 392, 393, 394,
4300 1187, 1187, 530, 1267, 768, 1267, -444, 1267, 1207, 1267,
4301 524, 524, -143, 309, 774, 780, 1231, 1232, 536, 530,
4302 532, 533, 1239, 587, 812, 1078, 795, 1078, 1267, 1078,
4303 834, 1078, 1265, -134, 138, 851, 1404, 1265, 743, 914,
4304 532, 533, 854, 914, 911, 1308, 913, 1240, 1270, 1310,
4305 390, 391, 392, 393, 394, 535, 922, 532, 533, 292,
4306 1281, 935, 292, 292, 930, 368, 970, 931, 292, 298,
4307 -329, 508, 748, 1282, 532, 533, 337, 338, 339, 340,
4308 341, 832, 381, 382, 832, 938, 1249, 939, 334, 1251,
4309 941, 942, 1309, 943, 292, 960, 557, 292, 558, 559,
4310 560, 561, 1268, 950, 832, 955, 965, 1320, 778, 997,
4311 1078, 1007, 1265, 1009, 1146, 1011, 557, 1013, 558, 559,
4312 560, 561, 562, -333, 1323, 1325, 1327, 1329, 1330, 390,
4313 391, 392, 393, 394, 309, 138, 1040, 1083, 292, 1280,
4314 1084, 970, 563, 1355, -331, 1149, 755, 1162, 1166, 1184,
4315 1240, 138, 1168, 292, 405, 1164, 564, 1170, 1170, 1170,
4316 1170, 1170, 1171, 1164, 1173, 1164, 565, 878, 880, 1337,
4317 138, 566, 567, 568, 1181, 1337, 1204, 1337, 1211, 1212,
4318 1370, 1371, 1213, 878, 880, 1278, 1018, 1019, 832, 832,
4319 832, 1098, 1279, 138, 138, 1024, 1209, 1305, 1025, 1318,
4320 1027, 895, 1141, 1141, 1322, 569, 309, 1324, 570, 237,
4321 557, 1317, 558, 559, 560, 561, 485, 1326, 963, 1392,
4322 1152, 653, 1328, 236, 1333, 1335, 1340, 138, 292, 1345,
4323 36, 37, 1401, 39, 557, 1348, 558, 559, 560, 561,
4324 45, 46, 461, 1349, 1380, 463, 464, 465, 1352, 1354,
4325 832, 1377, 1388, 1387, 1405, 1406, 1408, 1409, 1391, 1403,
4326 755, 405, 405, 1407, 1372, 756, 558, 559, 560, 561,
4327 1141, 1141, 1411, 1413, 1141, 1415, 1417, 1081, 292, -831,
4328 1422, 1436, 1201, 40, 41, 42, 43, 1170, 1170, 1170,
4329 1170, 1141, 1164, 336, -832, 1337, 1337, 498, 101, 1337,
4330 1337, 547, 728, 1337, 1433, 1230, 988, 730, 368, 411,
4331 970, 433, 247, 247, 416, 1227, 84, 805, 396, 138,
4332 719, 874, 138, 138, 1051, 381, 382, 1141, 138, 909,
4333 84, 84, 1342, 1431, 1346, 1312, 1004, 1170, 1337, 1337,
4334 1337, 1337, 1061, 1081, 1339, 1258, 1382, 1188, 1337, 101,
4335 101, 1390, 1338, 310, 138, 1427, 895, 138, 609, 990,
4336 1425, 1353, 1141, 1283, 247, 1141, 1290, 84, 84, 387,
4337 388, 389, 390, 391, 392, 393, 394, 1291, 1367, 1141,
4338 457, 1141, 84, 1368, 1141, 1141, 310, 446, 749, 1141,
4339 1141, 600, 1161, 455, 0, 1423, 0, 0, 138, 0,
4340 247, 247, 0, 0, 247, 418, 429, 429, 0, 247,
4341 0, 0, 0, 138, 0, 0, 0, 0, 84, 84,
4342 0, 0, 84, 0, 0, 1037, 1039, 84, 0, 0,
4343 0, 1043, 1045, 0, 0, 0, 431, 0, 0, 1242,
4344 0, 0, 0, 1242, 0, 1081, 0, 0, 1081, 0,
4345 1081, 0, 1412, 1414, 0, 1141, 1416, 1418, 0, 0,
4346 1421, 1269, 0, 0, 0, 1037, 1039, 0, 1043, 1045,
4347 0, 0, 0, 0, 0, 557, 0, 558, 559, 560,
4348 561, 562, 699, 700, 0, 0, 0, 920, 138, 0,
4349 0, 298, 0, 0, 0, 1434, 1435, 1437, 1438, 928,
4350 0, 563, 0, 0, 0, 1440, 0, 0, 431, 0,
4351 0, 0, 0, 0, 0, 1145, 0, 1141, 0, 0,
4352 0, 1141, 0, 1141, 0, 565, 700, 101, 1067, 298,
4353 566, 567, 568, 0, 0, 0, 0, 0, 138, 1145,
4354 0, 0, 0, 0, 0, 84, 0, 0, 0, 0,
4355 0, 0, 247, 0, 247, 0, 0, 247, 247, 0,
4356 0, 0, 0, 101, 569, 0, 0, 570, 0, 0,
4357 84, 0, 84, 0, 0, 84, 84, 0, 0, 0,
4358 0, 84, 101, 0, 0, 0, 0, 0, 0, 0,
4359 0, 1141, 0, 0, 1067, 0, 0, 0, 0, 1081,
4360 84, 1081, 310, 1081, 776, 1081, 0, 0, 0, 0,
4361 1242, 0, 1269, 0, 0, 0, 0, 1269, 0, 0,
4362 0, 0, 1269, 0, 806, 0, 0, 0, 0, 819,
4363 0, 0, 101, 101, 247, 247, 247, 247, 0, 247,
4364 247, 0, 0, 0, 0, 0, 0, 0, 1110, 1110,
4365 84, 84, 84, 84, 84, 84, 0, 84, 84, 0,
4366 101, 310, 0, 0, 0, 0, 0, 0, 0, 0,
4367 0, 0, 0, 0, 0, 0, 0, 0, 84, 0,
4368 0, 0, 0, 0, 1081, 0, 0, 0, 1269, 0,
4369 1269, 0, 1269, 0, 1269, 0, 1067, 247, 0, 1067,
4370 101, 1067, 0, 0, 0, 0, 247, 101, 101, 0,
4371 0, 883, 1254, 1269, 0, 84, 1110, 1110, 84, 1079,
4372 1110, 0, 247, 0, 84, 84, 84, 700, 1085, 298,
4373 1086, 0, 1088, 0, 0, 0, 0, 1110, 0, 557,
4374 84, 558, 559, 560, 561, 562, 0, 0, 247, 0,
4375 0, 0, 0, 0, 0, 0, 0, 557, 0, 558,
4376 559, 560, 561, 562, 0, 563, 84, 0, 0, 0,
4377 247, 0, 0, 1110, 0, 0, 0, 0, 0, 564,
4378 0, 0, 0, 563, 0, 1079, 0, 923, 84, 565,
4379 0, 0, 0, 0, 0, 567, 568, 564, 0, 0,
4380 0, 0, 0, 0, 0, 101, 0, 565, 1110, 0,
4381 0, 1110, 566, 567, 568, 557, 937, 558, 559, 560,
4382 561, 562, 310, 84, 247, 1110, 0, 1110, 569, 0,
4383 1110, 1110, 0, 0, 0, 1110, 1110, 0, 0, 0,
4384 0, 563, 84, 0, 0, 0, 569, 0, 700, 570,
4385 1067, 101, 1067, 0, 1067, 0, 1067, 0, 0, 0,
4386 0, 0, 1066, 1254, 0, 565, 974, 0, 1254, 84,
4387 0, 567, 568, 1254, 0, 0, 0, 0, 0, 0,
4388 0, 0, 0, 0, 0, 0, 0, 1248, 0, 0,
4389 0, 0, 1252, 0, 0, 247, 101, 0, 247, 101,
4390 1253, 1110, 0, 1266, 569, 0, 0, 247, 0, 310,
4391 0, 0, 822, 84, 84, 0, 84, 84, 0, 0,
4392 0, 0, 0, 0, 0, 84, 0, 0, 0, 0,
4393 84, 1133, 1133, 0, 0, 1067, 0, 0, 0, 1254,
4394 0, 1254, 0, 1254, 0, 1254, 0, 0, 0, 0,
4395 0, 0, 1023, 0, 0, 0, 101, 0, 101, 0,
4396 0, 0, 0, 1110, 1254, 0, 247, 1110, 0, 1110,
4397 0, 0, 0, 0, 84, 1046, 84, 247, 0, 101,
4398 247, 0, 0, 0, 84, 0, 0, 1056, 0, 0,
4399 822, 822, 0, 0, 0, 84, 0, 84, 84, 1133,
4400 1133, 0, 0, 1133, 0, 0, 0, 0, 84, 84,
4401 0, 298, 1134, 1134, 0, 0, 247, 0, 0, 0,
4402 1133, 0, 0, 0, 822, 0, 0, 1135, 1135, 0,
4403 310, 0, 0, 0, 84, 0, 1093, 1110, 0, 0,
4404 0, 0, 84, 1378, 0, 1379, 0, 1381, 0, 0,
4405 0, 0, 0, 0, 1386, 0, 1133, 0, 0, 0,
4406 0, 0, 0, 0, 1394, 0, 0, 0, 0, 0,
4407 0, 1156, 0, 0, 0, 0, 0, 0, 0, 0,
4408 1134, 1134, 0, 0, 1134, 0, 0, 0, 0, 0,
4409 0, 1133, 0, 0, 1133, 1135, 1135, 0, 0, 1135,
4410 0, 1134, 0, 0, 0, 0, 0, 0, 1133, 310,
4411 1133, 0, 0, 1133, 1133, 0, 1135, 0, 1133, 1133,
4412 0, 0, 0, 0, 0, 0, 1428, 0, 0, 0,
4413 0, 0, 1429, 0, 1430, 0, 1432, 1134, 0, 0,
4414 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4415 0, 0, 1135, 0, 0, 1439, 0, 0, 0, 247,
4416 0, 247, 101, 0, 0, 0, 0, 0, 0, 1233,
4417 0, 0, 1134, 0, 0, 1134, 0, 84, 0, 84,
4418 84, 0, 0, 0, 1133, 0, 0, 1135, 0, 1134,
4419 1135, 1134, 0, 0, 1134, 1134, 0, 0, 0, 1134,
4420 1134, 0, 0, 0, 1135, 0, 1135, 0, 0, 1135,
4421 1135, 0, 0, 0, 1135, 1135, 0, 0, 0, 0,
4422 0, 0, 0, 0, 0, 0, 247, 0, 0, 0,
4423 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4424 0, 0, 0, 247, 84, 0, 1133, 0, 822, 822,
4425 1133, 0, 1133, 0, 822, 822, 0, 0, 0, 0,
4426 0, 84, 0, 101, 247, 1134, 84, 84, 0, 0,
4427 0, 0, 84, 84, 0, 1136, 1136, 0, 0, 101,
4428 1135, 84, 84, 0, 0, 0, 0, 0, 0, 0,
4429 0, 0, 0, 0, 0, 0, 0, 84, 101, 0,
4430 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4431 0, 112, 0, 0, 0, 0, 84, 0, 0, 0,
4432 1133, 101, 101, 822, 0, 112, 112, 1134, 0, 0,
4433 0, 1134, 0, 1134, 0, 0, 0, 0, 822, 84,
4434 84, 84, 1135, 1136, 1136, 0, 1135, 1136, 1135, 0,
4435 0, 0, 0, 0, 0, 101, 84, 0, 0, 0,
4436 0, 0, 112, 112, 1136, 0, 0, 0, 0, 0,
4437 0, 0, 0, 84, 0, 0, 0, 112, 0, 0,
4438 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4439 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4440 1136, 1134, 0, 0, 0, 0, 0, 0, 0, 0,
4441 0, 0, 0, 112, 112, 0, 1135, 112, 0, 0,
4442 0, 0, 112, 0, 0, 0, 1137, 1137, 0, 0,
4443 0, 0, 0, 0, 0, 1136, 0, 0, 1136, 0,
4444 0, 0, 0, 1225, 0, 0, 0, 101, 0, 0,
4445 101, 101, 1136, 0, 1136, 0, 101, 1136, 1136, 0,
4446 0, 0, 1136, 1136, 0, 84, 0, 0, 84, 84,
4447 0, 0, 0, 0, 84, 0, 0, 0, 0, 0,
4448 0, 0, 101, 0, 0, 101, 0, 0, 0, 0,
4449 0, 0, 0, 0, 1137, 1137, 0, 0, 1137, 0,
4450 84, 0, 0, 84, 247, 0, 0, 0, 0, 0,
4451 0, 0, 0, 0, 0, 1137, 0, 0, 0, 0,
4452 0, 0, 84, 0, 0, 0, 101, 0, 1136, 0,
4453 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4454 112, 101, 0, 0, 84, 0, 0, 0, 0, 0,
4455 0, 1137, 0, 0, 0, 0, 0, 0, 0, 84,
4456 0, 0, 0, 0, 1344, 112, 0, 112, 0, 0,
4457 112, 112, 0, 0, 0, 0, 112, 0, 0, 0,
4458 0, 0, 0, 0, 0, 0, 1137, 0, 0, 1137,
4459 1136, 0, 0, 0, 1136, 112, 1136, 0, 0, 0,
4460 0, 0, 0, 1137, 247, 1137, 0, 0, 1137, 1137,
4461 0, 247, 247, 1137, 1137, 0, 101, 0, 1138, 1138,
4462 0, 0, 84, 113, 0, 1139, 1139, 0, 0, 84,
4463 84, 0, 0, 0, 84, 0, 1389, 113, 113, 0,
4464 0, 0, 0, 0, 0, 112, 112, 112, 112, 112,
4465 112, 0, 112, 112, 0, 0, 0, 0, 0, 0,
4466 0, 0, 0, 0, 1136, 0, 101, 0, 1140, 1140,
4467 0, 0, 0, 112, 113, 113, 0, 0, 0, 1137,
4468 0, 0, 0, 0, 84, 0, 1138, 1138, 0, 113,
4469 1138, 0, 0, 1139, 1139, 0, 0, 1139, 0, 0,
4470 0, 0, 0, 0, 0, 0, 0, 1138, 0, 0,
4471 112, 0, 0, 112, 1139, 0, 0, 0, 0, 112,
4472 112, 112, 0, 0, 0, 113, 113, 0, 0, 113,
4473 0, 0, 0, 0, 113, 112, 1140, 1140, 0, 0,
4474 1140, 1137, 0, 1138, 0, 1137, 0, 1137, 0, 0,
4475 1139, 0, 0, 0, 0, 0, 0, 1140, 0, 0,
4476 0, 112, 0, 0, 0, 0, 0, 0, 0, 0,
4477 0, 0, 0, 0, 0, 0, 0, 0, 1138, 0,
4478 0, 1138, 0, 112, 0, 1139, 0, 0, 1139, 0,
4479 0, 0, 0, 1140, 0, 1138, 0, 1138, 0, 0,
4480 1138, 1138, 1139, 0, 1139, 1138, 1138, 1139, 1139, 0,
4481 0, 0, 1139, 1139, 0, 1137, 0, 0, 112, 0,
4482 0, 0, 0, 0, 0, 0, 0, 0, 1140, 0,
4483 0, 1140, 0, 0, 0, 0, 0, 112, 0, 0,
4484 0, 0, 0, 0, 0, 1140, 0, 1140, 0, 0,
4485 1140, 1140, 113, 0, 0, 1140, 1140, 0, 0, 0,
4486 0, 0, 0, 0, 112, 0, 0, 0, 0, 0,
4487 0, 1138, 0, 0, 0, 0, 0, 113, 1139, 113,
4488 0, 0, 113, 113, 0, 0, 0, 0, 113, 0,
4489 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4490 0, 0, 0, 0, 0, 0, 0, 113, 112, 112,
4491 0, 112, 112, 0, 0, 0, 0, 0, 0, 0,
4492 112, 1140, 0, 0, 0, 112, 0, 0, 0, 0,
4493 0, 0, 0, 1138, 0, 0, 0, 1138, 0, 1138,
4494 1139, 0, 0, 0, 1139, 0, 1139, 0, 0, 0,
4495 0, 0, 0, 0, 0, 0, 0, 113, 113, 113,
4496 113, 113, 113, 0, 113, 113, 0, 0, 0, 112,
4497 0, 112, 0, 0, 0, 0, 0, 0, 0, 112,
4498 0, 0, 0, 1140, 0, 113, 0, 1140, 0, 1140,
4499 112, 0, 112, 112, 0, 0, 0, 0, 0, 0,
4500 0, 0, 0, 112, 112, 0, 0, 1138, 0, 0,
4501 0, 0, 0, 0, 1139, 0, 0, 0, 0, 0,
4502 0, 0, 113, 0, 0, 113, 0, 0, 0, 112,
4503 0, 113, 113, 113, 0, 0, 0, 112, 0, 0,
4504 0, 0, 0, 0, 0, 0, 0, 113, 0, 0,
4505 0, 0, 0, 0, 0, 0, 0, 1140, 0, 0,
4506 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4507 0, 0, 0, 113, 0, 0, 0, 0, 0, 0,
4508 0, 0, 0, 0, -853, 0, 0, 0, 0, 0,
4509 80, 0, -853, -853, -853, 113, 0, -853, -853, -853,
4510 0, -853, 0, 0, 80, 80, 0, 0, 0, -853,
4511 -853, -853, 0, 0, 0, 0, 0, 0, 0, 0,
4512 0, -853, -853, 0, -853, -853, -853, -853, -853, 0,
4513 113, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4514 0, 80, 80, 0, 0, 306, 0, 0, 0, 113,
4515 0, 0, -853, -853, 0, 0, 0, 0, 0, 0,
4516 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4517 0, 0, 112, 0, 112, 112, 113, 0, 306, 0,
4518 0, -853, -853, 0, 0, 0, 0, 0, 0, 0,
4519 0, 0, 0, 0, 0, 0, 0, 306, 306, 306,
4520 0, 80, 0, 0, -853, 0, 0, 0, 0, 0,
4521 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4522 113, 113, 0, 113, 113, 0, 0, 0, 0, 0,
4523 0, 0, 113, 0, 0, -853, -853, 113, -853, 112,
4524 0, 255, -853, 0, -853, 0, 0, 0, 0, 0,
4525 0, 0, 0, 0, 0, 0, 112, 0, 0, 0,
4526 0, 112, 112, 0, 0, 0, 0, 112, 112, 0,
4527 0, 0, 81, 0, 0, 0, 112, 112, 0, 0,
4528 0, 113, 0, 113, 0, 0, 81, 81, 0, 0,
4529 0, 113, 112, 0, 0, 0, 0, 0, 0, 0,
4530 0, 0, 113, 0, 113, 113, 0, 0, 0, 0,
4531 0, 112, 0, 0, 0, 113, 113, 0, 0, 80,
4532 0, 0, 0, 81, 81, 0, 0, 307, 0, 0,
4533 0, 0, 0, 0, 112, 112, 112, 0, 0, 0,
4534 0, 113, 0, 0, 80, 0, 80, 0, 0, 113,
4535 0, 112, 0, 0, 0, 80, 0, 0, 367, 0,
4536 307, 0, 0, 0, 0, 0, 0, 0, 112, 0,
4537 0, 0, 0, 0, 80, 0, 0, 0, 0, 307,
4538 307, 307, 0, 81, 0, 0, 0, 0, 0, 0,
4539 0, 0, 0, 0, 306, 0, 0, 0, 0, 0,
4540 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4541 0, 368, 369, 370, 371, 372, 373, 374, 375, 376,
4542 377, 378, 379, 380, 80, 80, 0, 0, 381, 382,
4543 0, 0, 0, 0, 383, 0, 0, 0, 0, 0,
4544 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4545 0, 0, 80, 306, 0, 0, 0, 0, 0, 0,
4546 112, 0, 0, 112, 112, 0, 0, 0, 384, 112,
4547 385, 386, 387, 388, 389, 390, 391, 392, 393, 394,
4548 0, 0, 0, 0, 113, 0, 113, 113, 0, 80,
4549 0, 0, 80, 0, 0, 112, 0, 0, 112, 80,
4550 80, 81, 0, 0, 0, 0, 0, 0, 0, 0,
4551 0, 0, 0, 0, 0, 0, 0, 112, 0, 0,
4552 0, 0, 0, 0, 0, 0, 81, 0, 81, 0,
4553 0, 0, 0, 0, 0, 0, 0, 81, 0, 112,
4554 80, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4555 0, 113, 0, 0, 112, 0, 81, 0, 0, 0,
4556 0, 0, 80, 0, 0, 0, 0, 0, 113, 0,
4557 0, 0, 0, 113, 113, 0, 307, 0, 0, 113,
4558 113, 0, 0, 0, 0, 0, 0, 0, 113, 113,
4559 0, 0, 0, 0, 0, 0, 0, 80, 0, 0,
4560 0, 0, 0, 0, 113, 0, 81, 81, 0, 0,
4561 0, 0, 0, 0, 306, 0, 80, 112, 0, 0,
4562 0, 0, 0, 113, 112, 112, 0, 0, 0, 112,
4563 0, 0, 0, 0, 81, 307, 0, 0, 0, 0,
4564 0, 0, 0, 80, 0, 0, 113, 113, 113, 0,
4565 0, 0, 368, 369, 370, 371, 372, 373, 374, 375,
4566 0, 377, 378, 113, 0, 0, 0, 0, 0, 381,
4567 382, 81, 0, 0, 81, 0, 0, 0, 0, 112,
4568 113, 81, 81, 0, 0, 0, 0, 0, 80, 0,
4569 0, 80, 0, 0, 0, 0, 0, 0, 0, 0,
4570 0, 306, 0, 0, 80, 0, 0, 22, 23, 24,
4571 25, 385, 386, 387, 388, 389, 390, 391, 392, 393,
4572 394, 0, 81, 31, 32, 33, 0, 0, 0, 0,
4573 0, 0, 0, 40, 41, 42, 43, 44, 0, 0,
4574 0, 0, 0, 0, 81, 0, 0, 0, 80, 0,
4575 80, 0, 0, 0, 141, 0, 0, 0, 80, 0,
4576 0, 0, 0, 0, 0, 0, 0, 0, 0, 80,
4577 0, 80, 113, 0, 0, 113, 113, 0, 0, 81,
4578 0, 113, 80, 80, 57, 58, 59, 60, 61, 62,
4579 63, 64, 65, 0, 0, 0, 307, 0, 81, 0,
4580 0, 0, 0, 0, 0, 141, 141, 113, 0, 313,
4581 113, 0, 0, 0, 0, 0, 80, 0, 0, 0,
4582 0, 304, 306, 0, 0, 81, 0, 0, 0, 113,
4583 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4584 0, 0, 313, 0, 0, 0, 0, 0, 0, 0,
4585 0, 113, 0, 0, 0, 0, 0, 0, 0, 0,
4586 0, 422, 432, 432, 0, 0, 113, 0, 0, 0,
4587 81, 0, 0, 81, 0, 944, 0, 0, 0, 0,
4588 0, 0, 0, 307, 0, 0, 81, 0, 0, 0,
4589 0, 0, 137, 0, 0, 0, 0, 0, 0, 0,
4590 0, 306, 0, 0, 0, 0, 0, 0, 0, 368,
4591 369, 370, 371, 372, 373, 374, 375, 376, 377, 378,
4592 379, 380, 0, 0, 0, 0, 381, 382, 0, 113,
4593 81, 0, 81, 0, 0, 0, 113, 113, 0, 0,
4594 81, 113, 0, 137, 137, 0, 0, 311, 0, 0,
4595 0, 81, 0, 81, 80, 0, 0, 0, 0, 0,
4596 0, 0, 0, 0, 81, 81, 384, 0, 385, 386,
4597 387, 388, 389, 390, 391, 392, 393, 394, 0, 0,
4598 311, 0, 0, 141, 0, 0, -298, 0, 0, 0,
4599 0, 113, 0, 0, 0, 0, 0, 0, 81, 420,
4600 430, 430, 430, 0, 307, 0, 0, 0, 0, 0,
4601 0, 0, 0, 0, 0, 0, 0, 0, 0, 141,
4602 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4603 0, 0, 0, 0, 0, 80, 0, 0, 141, 0,
4604 80, 80, 0, 0, 0, 0, 80, 80, 0, 0,
4605 0, 0, 0, 0, 0, 80, 0, 0, 313, 0,
4606 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4607 0, 80, 0, 0, 0, 0, 0, 0, 0, 0,
4608 0, 0, 0, 307, 0, 0, 0, 0, 141, 141,
4609 80, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4610 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4611 0, 0, 0, 80, 80, 80, 141, 313, 0, 0,
4612 0, 137, 368, -854, -854, -854, -854, 373, 374, 0,
4613 80, -854, -854, 0, 0, 0, 81, 0, 0, 381,
4614 382, 0, 0, 0, 0, 0, 0, 80, 0, 0,
4615 0, 0, 0, 0, 0, 0, 141, 137, 0, 0,
4616 0, 0, 0, 141, 141, 0, 0, 0, 0, 944,
4617 0, 0, 0, 0, 0, 0, 137, 0, 0, 0,
4618 0, 385, 386, 387, 388, 389, 390, 391, 392, 393,
4619 394, 0, 0, 0, 0, 0, 311, 0, 0, 0,
4620 0, 0, 0, 368, 369, 370, 371, 372, 373, 374,
4621 375, 376, 377, 378, 379, 380, 0, 81, 0, 0,
4622 381, 382, 81, 81, 0, 0, 137, 137, 81, 81,
4623 0, 0, 0, 91, 0, 306, 0, 81, 0, 80,
4624 0, 0, 80, 80, 0, 0, 0, 0, 80, 0,
4625 0, 0, 0, 81, 137, 311, 0, 0, 0, 0,
4626 384, 141, 385, 386, 387, 388, 389, 390, 391, 392,
4627 393, 394, 81, 0, 80, 0, 0, 80, 313, 0,
4628 0, 0, 0, 0, 91, 91, 0, 0, 0, 0,
4629 0, 0, 0, 0, 137, 81, 81, 81, 0, 0,
4630 0, 137, 137, 0, 0, 0, 0, 141, 22, 23,
4631 24, 25, 81, 0, 0, 0, 0, 0, 80, 0,
4632 0, 0, 0, 0, 31, 32, 33, 1098, 0, 81,
4633 0, 1099, 140, 80, 40, 41, 42, 43, 44, 0,
4634 417, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4635 0, 0, 141, 0, 0, 141, 306, 0, 0, 0,
4636 0, 0, 0, 0, 0, 313, 1101, 1102, 823, 0,
4637 0, 0, 0, 0, 1103, 0, 0, 1104, 0, 1105,
4638 1106, 0, 1107, 140, 140, 57, 58, 59, 60, 61,
4639 62, 63, 64, 65, 0, 0, 80, 0, 0, 137,
4640 0, 0, 0, 0, 0, 0, 0, 0, 80, 0,
4641 0, 0, 141, 0, 141, 1109, 311, 307, 0, 0,
4642 0, 81, 304, 0, 81, 81, 0, 0, 306, 259,
4643 81, 0, 0, 0, 0, 141, 0, 0, 0, 0,
4644 0, 0, 0, 0, 0, 137, 823, 823, 0, 0,
4645 0, 0, 0, 0, 0, 0, 81, 0, 80, 81,
4646 0, 0, 91, 0, 368, 369, 370, 371, 372, 373,
4647 374, 375, 376, 377, 378, 379, 380, 0, 0, 0,
4648 823, 381, 382, 0, 0, 0, 313, 0, 0, 0,
4649 137, 0, 0, 137, 0, 903, 0, 0, 91, 0,
4650 81, 0, 0, 311, 0, 0, 0, 0, 0, 0,
4651 0, 0, 0, 0, 0, 81, 0, 91, 0, 0,
4652 0, 384, 0, 385, 386, 387, 388, 389, 390, 391,
4653 392, 393, 394, 0, 0, 0, 0, 0, 307, 0,
4654 259, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4655 137, 0, 137, 0, 0, 0, 0, 0, 0, 0,
4656 0, 140, 0, 0, 0, 313, 0, 91, 91, 0,
4657 0, 0, 0, 137, 0, 0, 0, 0, 81, 0,
4658 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4659 81, 0, 0, 0, 0, 91, 0, 140, 0, 0,
4660 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4661 307, 0, 0, 0, 0, 0, 140, 0, 141, 0,
4662 0, 0, 0, 0, 311, 0, 0, 0, 0, 0,
4663 0, 0, 0, 0, 0, 91, 0, 0, 0, 0,
4664 81, 0, 91, 91, 0, 0, 0, 0, 0, 0,
4665 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4666 0, 0, 0, 0, 0, 0, 140, 140, 0, 0,
4667 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4668 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4669 0, 0, 0, 0, 140, 0, 0, 0, 0, 0,
4670 0, 0, 0, 311, 823, 823, 0, 0, 0, 0,
4671 823, 823, 0, 0, 0, 0, 0, 0, 0, 141,
4672 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4673 0, 0, 0, 0, 140, 141, 0, 0, 0, 0,
4674 91, 140, 140, 0, 22, 23, 24, 25, 0, 0,
4675 0, 0, 0, 0, 141, 0, 137, 0, 0, 0,
4676 31, 32, 33, 1098, 0, 0, 0, 1099, 0, 1100,
4677 40, 41, 42, 43, 44, 0, 0, 141, 141, 823,
4678 0, 0, 0, 0, 0, 0, 91, 0, 0, 563,
4679 0, 0, 0, 0, 823, 0, 0, 0, 0, 0,
4680 0, 0, 1101, 1102, 0, 0, 0, 0, 0, 0,
4681 1103, 141, 0, 1104, 0, 1105, 1106, 0, 1107, 567,
4682 0, 57, 58, 1108, 60, 61, 62, 63, 64, 65,
4683 0, 91, 0, 0, 91, 0, 0, 0, 0, 140,
4684 0, 0, 0, 0, 0, 0, 0, 817, 0, 0,
4685 0, 1109, 0, 0, 0, 0, 0, 137, 304, 0,
4686 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4687 0, 0, 0, 137, 0, 0, 0, 0, 0, 0,
4688 0, 0, 0, 0, 0, 140, 0, 0, 0, 0,
4689 0, 91, 137, 91, 0, 0, 0, 0, 0, 1228,
4690 0, 0, 0, 141, 0, 0, 141, 141, 0, 0,
4691 0, 0, 141, 0, 91, 137, 137, 0, 0, 0,
4692 0, 0, 0, 0, 0, 817, 817, 0, 0, 0,
4693 140, 0, 0, 140, 0, 0, 0, 0, 141, 0,
4694 0, 141, 0, 0, 0, 0, 140, 0, 0, 137,
4695 22, 23, 24, 25, 0, 0, 0, 0, 0, 817,
4696 0, 0, 0, 0, 0, 0, 31, 32, 33, 1098,
4697 0, 0, 0, 1099, 0, 0, 40, 41, 42, 43,
4698 44, 0, 141, 0, 0, 0, 0, 0, 0, 0,
4699 140, 0, 140, 0, 0, 0, 0, 141, 0, 0,
4700 0, 0, 0, 0, 0, 0, 0, 0, 1101, 1102,
4701 0, 0, 0, 140, 0, 0, 1103, 0, 0, 1104,
4702 432, 1105, 1106, 0, 140, 140, 0, 57, 58, 59,
4703 60, 61, 62, 63, 64, 65, 0, 1226, 0, 0,
4704 0, 137, 0, 0, 137, 137, 0, 0, 0, 0,
4705 137, 0, 0, 0, 0, 0, 0, 1109, 140, 0,
4706 0, 0, 0, 0, 304, 368, 369, 370, 371, 372,
4707 373, 374, 141, 0, 377, 378, 137, 0, 0, 137,
4708 0, 0, 381, 382, 0, 22, 23, 24, 25, 0,
4709 0, 0, 432, 0, 0, 0, 0, 91, 0, 0,
4710 0, 31, 32, 33, 1098, 0, 0, 0, 1099, 0,
4711 0, 40, 41, 42, 43, 44, 0, 0, 0, 0,
4712 137, 0, 141, 0, 385, 386, 387, 388, 389, 390,
4713 391, 392, 393, 394, 0, 137, 0, 0, 0, 0,
4714 0, 0, 0, 1101, 1102, 0, 0, 0, 0, 0,
4715 0, 1103, 0, 0, 1104, 0, 1105, 1106, 430, 1107,
4716 0, 0, 57, 58, 59, 60, 61, 62, 63, 64,
4717 65, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4718 0, 0, 0, 817, 817, 0, 0, 0, 0, 817,
4719 817, 0, 1109, 0, 0, 0, 140, 0, 91, 304,
4720 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4721 137, 0, 0, 0, 91, 0, 0, 0, 0, 0,
4722 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4723 430, 0, 0, 91, 0, 0, 0, 0, 0, 0,
4724 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4725 0, 0, 239, 239, 0, 0, 91, 91, 817, 0,
4726 137, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4727 0, 0, 0, 817, 0, 0, 0, 0, 0, 0,
4728 0, 0, 140, 140, 276, 280, 281, 282, 140, 140,
4729 91, 239, 239, 0, 0, 0, 0, 140, 0, 0,
4730 0, 0, 0, 0, 329, 330, 0, 0, 0, 0,
4731 689, 651, 0, 140, 690, 0, 0, 0, 0, 0,
4732 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4733 0, 0, 140, 0, 188, 189, 190, 191, 192, 193,
4734 194, 195, 196, 0, 0, 197, 198, 0, 0, 239,
4735 0, 199, 200, 201, 202, 140, 140, 140, 0, 0,
4736 0, 0, 0, 0, 0, 203, 204, 0, 0, 0,
4737 0, 0, 140, 0, 0, 0, 0, 0, 1224, 0,
4738 0, 0, 91, 0, 0, 91, 91, 0, 0, 140,
4739 0, 91, 0, 0, 0, 205, 206, 207, 208, 209,
4740 210, 211, 212, 213, 214, 0, 215, 216, 0, 0,
4741 0, 0, 0, 0, 217, 255, 0, 91, 0, 0,
4742 91, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4743 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4744 0, 0, 0, 0, 0, 0, 368, 369, 370, 371,
4745 372, 373, 374, 375, 376, 377, 378, 379, 380, 0,
4746 0, 91, 0, 381, 382, 239, 0, 0, 239, 239,
4747 239, 0, 329, 0, 0, 0, 91, 0, 0, 0,
4748 0, 140, 0, 0, 140, 140, 0, 0, 0, 0,
4749 140, 0, 239, 0, 239, 0, 0, 0, 642, 643,
4750 0, 0, 644, 384, 0, 385, 386, 387, 388, 389,
4751 390, 391, 392, 393, 394, 0, 140, 0, 0, 140,
4752 0, 0, 188, 189, 190, 191, 192, 193, 194, 195,
4753 196, 0, 0, 197, 198, 0, 0, 0, 0, 199,
4754 200, 201, 202, 0, 0, 0, 0, 0, 0, 0,
4755 0, 91, 0, 203, 204, 0, 0, 0, 0, 0,
4756 140, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4757 0, 0, 0, 0, 0, 140, 0, 0, 0, 0,
4758 0, 0, 0, 205, 206, 207, 208, 209, 210, 211,
4759 212, 213, 214, 0, 215, 216, 0, 0, 0, 0,
4760 0, 91, 217, 0, 0, 617, 618, 619, 620, 621,
4761 0, 0, 622, 623, 624, 625, 626, 627, 628, 629,
4762 0, 631, 0, 0, 632, 633, 634, 635, 636, 637,
4763 638, 639, 640, 641, 650, 651, 0, 239, 652, 0,
4764 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4765 140, 0, 0, 0, 0, 0, 0, 0, 188, 189,
4766 190, 191, 192, 193, 194, 195, 196, 0, 0, 197,
4767 198, 0, 0, 0, 0, 199, 200, 201, 202, 0,
4768 0, 0, 0, 0, 0, 0, 0, 0, 239, 203,
4769 204, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4770 140, 0, 0, 0, 0, 239, 239, 0, 0, 0,
4771 239, 0, 0, 0, 239, 0, 282, 0, 0, 205,
4772 206, 207, 208, 209, 210, 211, 212, 213, 214, 0,
4773 215, 216, 0, 0, 720, 0, 0, 0, 217, 0,
4774 0, 0, 0, 0, 0, 0, 0, 0, 0, 239,
4775 0, 0, 239, 0, -853, 3, 0, 4, 5, 6,
4776 7, 8, 0, 0, 239, 9, 10, 0, 0, 0,
4777 11, 0, 12, 13, 14, 15, 16, 17, 18, 0,
4778 0, 0, 752, 0, 19, 20, 21, 22, 23, 24,
4779 25, 0, 0, 26, 0, 0, 0, 0, 0, 27,
4780 28, 284, 30, 31, 32, 33, 34, 35, 36, 37,
4781 38, 39, 0, 40, 41, 42, 43, 44, 45, 46,
4782 0, 0, 0, 0, 0, 0, 0, 239, 0, 0,
4783 47, 48, 0, 0, 0, 787, 0, 0, 787, 0,
4784 0, 0, 0, 0, 0, 49, 50, 239, 0, 0,
4785 0, 0, 818, 51, 0, 0, 52, 53, 54, 55,
4786 0, 56, 0, 0, 57, 58, 59, 60, 61, 62,
4787 63, 64, 65, 0, -853, 0, 0, 368, 369, 370,
4788 371, 372, 373, 374, 375, 376, 377, 378, -854, -854,
4789 0, 0, 0, 0, 381, 382, 0, 0, 0, 0,
4790 0, 66, 67, 68, 0, 0, 239, 0, -853, 0,
4791 0, 0, 0, 0, -853, 0, 0, 239, 0, 0,
4792 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4793 877, 877, 0, 0, 239, 877, 385, 386, 387, 388,
4794 389, 390, 391, 392, 393, 394, 877, 877, 0, 0,
4795 239, 0, 239, 0, 0, 0, 0, 0, 0, 787,
4796 787, 0, 0, 0, 877, 0, 0, 0, 0, 0,
4797 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4798 0, -4, 3, 0, 4, 5, 6, 7, 8, -4,
4799 -4, -4, 9, 10, 0, -4, -4, 11, -4, 12,
4800 13, 14, 15, 16, 17, 18, -4, 0, 0, 0,
4801 239, 19, 20, 21, 22, 23, 24, 25, 0, 0,
4802 26, 0, 0, 0, 0, 0, 27, 28, 284, 30,
4803 31, 32, 33, 34, 35, 36, 37, 38, 39, 239,
4804 40, 41, 42, 43, 44, 45, 46, 0, 0, -4,
4805 0, 0, 0, 0, 0, 0, 0, 47, 48, 0,
4806 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4807 0, 239, 49, 50, 0, 0, 0, 0, 0, 0,
4808 51, 0, 0, 52, 53, 54, 55, 0, 56, 239,
4809 0, 57, 58, 59, 60, 61, 62, 63, 64, 65,
4810 0, -4, 0, 0, 0, 0, 0, 0, 0, 0,
4811 0, 0, 0, 0, 0, 0, 0, 0, 0, 877,
4812 0, 0, 0, 0, 0, 0, 0, 0, 66, 67,
4813 68, 0, 0, -4, 0, 0, 0, 0, 0, -4,
4814 0, 546, 0, 0, 0, 0, 0, 0, 0, 0,
4815 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4816 0, 0, 0, 0, 0, 0, 787, 0, 0, 0,
4817 0, 0, 0, 0, 0, 239, 0, 0, 0, 0,
4818 0, 0, 0, 239, 0, 0, 0, 1035, 877, 877,
4819 0, 0, 0, 0, 877, 877, 0, 0, 239, 0,
4820 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4821 239, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4822 0, 0, 0, 0, 0, 0, 0, 0, 877, 877,
4823 0, 877, 877, 0, 239, 0, 787, 0, 0, 0,
4824 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4825 0, 0, 0, 0, 0, 1089, 1090, 0, 0, 239,
4826 0, 0, 0, 877, 1096, -853, 3, 0, 4, 5,
4827 6, 7, 8, 0, 0, 0, 9, 10, 877, 0,
4828 0, 11, 0, 12, 13, 14, 15, 16, 17, 18,
4829 0, 0, 0, 0, 239, 19, 20, 21, 22, 23,
4830 24, 25, 877, 0, 26, 0, 0, 0, 0, 0,
4831 27, 28, 29, 30, 31, 32, 33, 34, 35, 36,
4832 37, 38, 39, 0, 40, 41, 42, 43, 44, 45,
4833 46, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4834 0, 47, 48, 0, 0, 0, 0, 0, 0, 0,
4835 0, 0, 0, 0, 0, 0, 49, 50, 0, 0,
4836 0, 0, 0, 0, 51, 0, 0, 52, 53, 54,
4837 55, 0, 56, 0, 0, 57, 58, 59, 60, 61,
4838 62, 63, 64, 65, 0, 0, 0, 0, 0, 0,
4839 0, 0, 239, 0, 0, 0, 0, 0, 0, 0,
4840 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4841 0, 0, 66, 67, 68, 0, 0, -4, 3, -853,
4842 4, 5, 6, 7, 8, -853, 0, 0, 9, 10,
4843 0, 0, 0, 11, 0, 12, 13, 14, 15, 16,
4844 17, 18, 0, 0, 0, 0, 0, 19, 20, 21,
4845 22, 23, 24, 25, 0, 0, 26, 0, 0, 0,
4846 0, 0, 27, 28, 29, 30, 31, 32, 33, 34,
4847 35, 36, 37, 38, 39, 0, 40, 41, 42, 43,
4848 44, 45, 46, 0, 0, 0, 0, 0, 0, 0,
4849 0, 0, 0, 47, 48, 0, 0, 0, 0, 0,
4850 0, 0, 0, 0, 0, 0, 0, 0, 49, 50,
4851 0, 0, 0, 0, 0, 0, 51, 0, 0, 52,
4852 53, 54, 55, 0, 56, 0, 0, 57, 58, 59,
4853 60, 61, 62, 63, 64, 65, 0, 0, 0, 0,
4854 0, 0, 0, 0, 239, -835, 0, 0, 0, 0,
4855 0, 0, 0, -835, -835, -835, 0, 0, -835, -835,
4856 -835, 0, -835, 0, 66, 67, 68, 0, 0, -4,
4857 -835, -835, -835, -835, -835, 0, 0, 546, 0, 0,
4858 0, 0, -835, -835, 0, -835, -835, -835, -835, -835,
4859 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4860 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4861 0, 0, 0, -835, -835, 0, 0, 0, 0, 0,
4862 0, 0, 0, -835, -835, -835, -835, -835, -835, -835,
4863 -835, -835, -835, -835, -835, -835, 0, 0, 0, 0,
4864 -835, -835, -835, -835, 0, 885, -835, 0, 0, 0,
4865 0, -835, 0, 0, 0, 0, 0, 0, 0, 0,
4866 0, 0, 0, 0, 0, -835, 0, 0, -835, 0,
4867 0, 0, 0, 0, 0, 0, 0, 0, 0, -146,
4868 -835, -835, -835, -835, -835, -835, -835, -835, -835, -835,
4869 -835, -835, 0, 0, 0, 0, -835, -835, -835, -835,
4870 -835, -699, 0, -835, -835, -835, 0, 0, 0, -699,
4871 -699, -699, 0, 0, -699, -699, -699, 0, -699, 0,
4872 0, 0, 0, 0, 0, 0, -699, 0, -699, -699,
4873 -699, 0, 0, 0, 0, 0, 0, 0, -699, -699,
4874 0, -699, -699, -699, -699, -699, 0, 0, 0, 0,
4875 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4876 0, 0, 0, 0, 0, 0, 0, 0, 0, -699,
4877 -699, 0, 0, 0, 0, 0, 0, 0, 0, -699,
4878 -699, -699, -699, -699, -699, -699, -699, -699, -699, -699,
4879 -699, -699, 0, 0, 0, 0, -699, -699, -699, -699,
4880 0, -699, -699, 0, 0, 0, 0, -699, 0, 0,
4881 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4882 0, -699, 0, 0, -699, 0, 0, 0, 0, 0,
4883 0, 0, 0, 0, 0, -699, -699, -699, -699, -699,
4884 -699, -699, -699, -699, -699, -699, -699, -699, 0, 0,
4885 0, 0, 0, -699, -699, -699, -699, -700, 0, -699,
4886 -699, -699, 0, 0, 0, -700, -700, -700, 0, 0,
4887 -700, -700, -700, 0, -700, 0, 0, 0, 0, 0,
4888 0, 0, -700, 0, -700, -700, -700, 0, 0, 0,
4889 0, 0, 0, 0, -700, -700, 0, -700, -700, -700,
4890 -700, -700, 0, 0, 0, 0, 0, 0, 0, 0,
4891 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4892 0, 0, 0, 0, 0, -700, -700, 0, 0, 0,
4893 0, 0, 0, 0, 0, -700, -700, -700, -700, -700,
4894 -700, -700, -700, -700, -700, -700, -700, -700, 0, 0,
4895 0, 0, -700, -700, -700, -700, 0, -700, -700, 0,
4896 0, 0, 0, -700, 0, 0, 0, 0, 0, 0,
4897 0, 0, 0, 0, 0, 0, 0, -700, 0, 0,
4898 -700, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4899 0, -700, -700, -700, -700, -700, -700, -700, -700, -700,
4900 -700, -700, -700, -700, 0, 0, 0, 0, 0, -700,
4901 -700, -700, -700, -836, 0, -700, -700, -700, 0, 0,
4902 0, -836, -836, -836, 0, 0, -836, -836, -836, 0,
4903 -836, 0, 0, 0, 0, 0, 0, 0, -836, -836,
4904 -836, -836, -836, 0, 0, 0, 0, 0, 0, 0,
4905 -836, -836, 0, -836, -836, -836, -836, -836, 0, 0,
4906 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4907 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4908 0, -836, -836, 0, 0, 0, 0, 0, 0, 0,
4909 0, -836, -836, -836, -836, -836, -836, -836, -836, -836,
4910 -836, -836, -836, -836, 0, 0, 0, 0, -836, -836,
4911 -836, -836, 0, 0, -836, 0, 0, 0, 0, -836,
4912 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4913 0, 0, 0, -836, 0, 0, -836, 0, 0, 0,
4914 0, 0, 0, 0, 0, 0, 0, 0, -836, -836,
4915 -836, -836, -836, -836, -836, -836, -836, -836, -836, -836,
4916 0, 0, 0, 0, -836, -836, -836, -836, -836, -837,
4917 0, -836, -836, -836, 0, 0, 0, -837, -837, -837,
4918 0, 0, -837, -837, -837, 0, -837, 0, 0, 0,
4919 0, 0, 0, 0, -837, -837, -837, -837, -837, 0,
4920 0, 0, 0, 0, 0, 0, -837, -837, 0, -837,
4921 -837, -837, -837, -837, 0, 0, 0, 0, 0, 0,
4922 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4923 0, 0, 0, 0, 0, 0, 0, -837, -837, 0,
4924 0, 0, 0, 0, 0, 0, 0, -837, -837, -837,
4925 -837, -837, -837, -837, -837, -837, -837, -837, -837, -837,
4926 0, 0, 0, 0, -837, -837, -837, -837, 0, 0,
4927 -837, 0, 0, 0, 0, -837, 0, 0, 0, 0,
4928 0, 0, 0, 0, 0, 0, 0, 0, 0, -837,
4929 0, 0, -837, 0, 0, 0, 0, 0, 0, 0,
4930 0, 0, 0, 0, -837, -837, -837, -837, -837, -837,
4931 -837, -837, -837, -837, -837, -837, 0, 0, 0, 0,
4932 -837, -837, -837, -837, -837, -514, 0, -837, -837, -837,
4933 0, 0, 0, -514, -514, -514, 0, 0, -514, -514,
4934 -514, 0, -514, 0, 0, 0, 0, 0, 0, 0,
4935 -514, -514, -514, -514, 0, 0, 0, 0, 0, 0,
4936 0, 0, -514, -514, 0, -514, -514, -514, -514, -514,
4937 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4938 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4939 0, 0, 0, -514, -514, 0, 0, 0, 0, 0,
4940 0, 0, 0, -514, -514, -514, -514, -514, -514, -514,
4941 -514, -514, -514, -514, -514, -514, 0, 0, 0, 0,
4942 -514, -514, -514, -514, 0, 0, -514, 0, 0, 0,
4943 0, -514, 0, 0, 0, 0, 0, 0, 0, 0,
4944 0, 0, 0, 0, 0, -514, 0, 0, 0, 0,
4945 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4946 -514, 0, -514, -514, -514, -514, -514, -514, -514, -514,
4947 -514, -514, 0, 0, 0, 0, -514, -514, -514, -514,
4948 -514, -350, 255, -514, -514, -514, 0, 0, 0, -350,
4949 -350, -350, 0, 0, -350, -350, -350, 0, -350, 0,
4950 0, 0, 0, 0, 0, 0, -350, 0, -350, -350,
4951 -350, 0, 0, 0, 0, 0, 0, 0, -350, -350,
4952 0, -350, -350, -350, -350, -350, 0, 0, 0, 0,
4953 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4954 0, 0, 0, 0, 0, 0, 0, 0, 0, -350,
4955 -350, 0, 0, 0, 0, 0, 0, 0, 0, -350,
4956 -350, -350, -350, -350, -350, -350, -350, -350, -350, -350,
4957 -350, -350, 0, 0, 0, 0, -350, -350, -350, -350,
4958 0, 0, -350, 0, 0, 0, 0, -350, 0, 0,
4959 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4960 0, -350, 0, 0, -350, 0, 0, 0, 0, 0,
4961 0, 0, 0, 0, 0, 0, -350, -350, -350, -350,
4962 -350, -350, -350, -350, -350, -350, -350, -350, 0, 0,
4963 0, 0, 0, -350, -350, -350, -350, -853, 0, -350,
4964 -350, -350, 0, 0, 0, -853, -853, -853, 0, 0,
4965 -853, -853, -853, 0, -853, 0, 0, 0, 0, 0,
4966 0, 0, -853, -853, -853, -853, 0, 0, 0, 0,
4967 0, 0, 0, 0, -853, -853, 0, -853, -853, -853,
4968 -853, -853, 0, 0, 0, 0, 0, 0, 0, 0,
4969 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4970 0, 0, 0, 0, 0, -853, -853, 0, 0, 0,
4971 0, 0, 0, 0, 0, -853, -853, -853, -853, -853,
4972 -853, -853, -853, -853, -853, -853, -853, -853, 0, 0,
4973 0, 0, -853, -853, -853, -853, 0, 0, -853, 0,
4974 0, 0, 0, -853, 0, 0, 0, 0, 0, 0,
4975 0, 0, 0, 0, 0, 0, 0, -853, 0, 0,
4976 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4977 0, 0, -853, 0, -853, -853, -853, -853, -853, -853,
4978 -853, -853, -853, -853, 0, 0, 0, 0, -853, -853,
4979 -853, -853, -853, -356, 255, -853, -853, -853, 0, 0,
4980 0, -356, -356, -356, 0, 0, -356, -356, -356, 0,
4981 -356, 0, 0, 0, 0, 0, 0, 0, -356, 0,
4982 -356, -356, 0, 0, 0, 0, 0, 0, 0, 0,
4983 -356, -356, 0, -356, -356, -356, -356, -356, 0, 0,
4984 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4985 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4986 0, -356, -356, 0, 0, 0, 0, 0, 0, 0,
4987 0, -356, -356, -356, -356, -356, -356, -356, -356, -356,
4988 -356, -356, -356, -356, 0, 0, 0, 0, -356, -356,
4989 -356, -356, 0, 886, -356, 0, 0, 0, 0, -356,
4990 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4991 0, 0, 0, -356, 0, 0, 0, 0, 0, 0,
4992 0, 0, 0, 0, 0, 0, 0, -147, -356, 0,
4993 -356, -356, -356, -356, -356, -356, -356, -356, -356, -356,
4994 0, 0, 0, 0, 829, -356, -356, -356, -356, -363,
4995 0, -356, -356, -356, 0, 0, 0, -363, -363, -363,
4996 0, 0, -363, -363, -363, 0, -363, 0, 0, 0,
4997 0, 0, 0, 0, -363, 0, -363, -363, 0, 0,
4998 0, 0, 0, 0, 0, 0, -363, -363, 0, -363,
4999 -363, -363, -363, -363, 0, 0, 0, 0, 0, 0,
5000 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5001 0, 0, 0, 0, 0, 0, 0, -363, -363, 0,
5002 0, 0, 0, 0, 0, 0, 0, -363, -363, -363,
5003 -363, -363, -363, -363, -363, -363, -363, -363, -363, -363,
5004 0, 0, 0, 0, -363, -363, -363, -363, 0, 0,
5005 -363, 0, 0, 0, 0, -363, 0, 0, 0, 0,
5006 0, 0, 0, 0, 0, 0, 0, 0, 0, -363,
5007 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5008 0, 0, 0, 0, -363, 0, -363, -363, -363, -363,
5009 -363, -363, -363, -363, -363, -363, 0, 0, 0, 0,
5010 0, -363, -363, -363, -363, -835, 451, -363, -363, -363,
5011 0, 0, 0, -835, -835, -835, 0, 0, 0, -835,
5012 -835, 0, -835, 0, 0, 0, 0, 0, 0, 0,
5013 -835, -835, 0, 0, 0, 0, 0, 0, 0, 0,
5014 0, 0, -835, -835, 0, -835, -835, -835, -835, -835,
5015 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5016 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5017 0, 0, 0, -835, -835, 0, 0, 0, 0, 0,
5018 0, 0, 0, -835, -835, -835, -835, -835, -835, -835,
5019 -835, -835, -835, -835, -835, -835, 0, 0, 0, 0,
5020 -835, -835, -835, -835, 0, 827, -835, 0, 0, 0,
5021 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5022 0, 0, 0, 0, 0, -835, 0, 0, 0, 0,
5023 0, 0, 0, 0, 0, 0, 0, 0, 0, -146,
5024 -835, 0, -835, -835, -835, -835, -835, -835, -835, -835,
5025 -835, -835, 0, 0, 0, 0, -835, -835, -835, -835,
5026 -137, -835, 0, -835, 0, -835, 0, 0, 0, -835,
5027 -835, -835, 0, 0, 0, -835, -835, 0, -835, 0,
5028 0, 0, 0, 0, 0, 0, -835, -835, 0, 0,
5029 0, 0, 0, 0, 0, 0, 0, 0, -835, -835,
5030 0, -835, -835, -835, -835, -835, 0, 0, 0, 0,
5031 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5032 0, 0, 0, 0, 0, 0, 0, 0, 0, -835,
5033 -835, 0, 0, 0, 0, 0, 0, 0, 0, -835,
5034 -835, -835, -835, -835, -835, -835, -835, -835, -835, -835,
5035 -835, -835, 0, 0, 0, 0, -835, -835, -835, -835,
5036 0, 827, -835, 0, 0, 0, 0, 0, 0, 0,
5037 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5038 0, -835, 0, 0, 0, 0, 0, 0, 0, 0,
5039 0, 0, 0, 0, 0, -146, -835, 0, -835, -835,
5040 -835, -835, -835, -835, -835, -835, -835, -835, 0, 0,
5041 0, 0, -835, -835, -835, -835, -835, -356, 0, -835,
5042 0, -835, 0, 0, 0, -356, -356, -356, 0, 0,
5043 0, -356, -356, 0, -356, 0, 0, 0, 0, 0,
5044 0, 0, -356, 0, 0, 0, 0, 0, 0, 0,
5045 0, 0, 0, 0, -356, -356, 0, -356, -356, -356,
5046 -356, -356, 0, 0, 0, 0, 0, 0, 0, 0,
5047 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5048 0, 0, 0, 0, 0, -356, -356, 0, 0, 0,
5049 0, 0, 0, 0, 0, -356, -356, -356, -356, -356,
5050 -356, -356, -356, -356, -356, -356, -356, -356, 0, 0,
5051 0, 0, -356, -356, -356, -356, 0, 828, -356, 0,
5052 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5053 0, 0, 0, 0, 0, 0, 0, -356, 0, 0,
5054 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5055 0, -147, -356, 0, -356, -356, -356, -356, -356, -356,
5056 -356, -356, -356, -356, 0, 0, 0, 0, 829, -356,
5057 -356, -356, -138, -356, 0, -356, 0, -356, 0, 0,
5058 0, -356, -356, -356, 0, 0, 0, -356, -356, 0,
5059 -356, 0, 0, 0, 0, 0, 0, 0, -356, 0,
5060 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5061 -356, -356, 0, -356, -356, -356, -356, -356, 0, 0,
5062 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5063 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5064 0, -356, -356, 0, 0, 0, 0, 0, 0, 0,
5065 0, -356, -356, -356, -356, -356, -356, -356, -356, -356,
5066 -356, -356, -356, -356, 0, 0, 0, 0, -356, -356,
5067 -356, -356, 0, 828, -356, 0, 0, 0, 0, 0,
5068 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5069 0, 0, 0, -356, 0, 0, 0, 0, 0, 0,
5070 0, 0, 0, 0, 0, 0, 0, -147, -356, 0,
5071 -356, -356, -356, -356, -356, -356, -356, -356, -356, -356,
5072 0, 0, 0, 0, 829, -356, -356, -356, -356, 0,
5073 0, -356, 3, -356, 4, 5, 6, 7, 8, -853,
5074 -853, -853, 9, 10, 0, 0, -853, 11, 0, 12,
5075 13, 14, 15, 16, 17, 18, 0, 0, 0, 0,
5076 0, 19, 20, 21, 22, 23, 24, 25, 0, 0,
5077 26, 0, 0, 0, 0, 0, 27, 28, 284, 30,
5078 31, 32, 33, 34, 35, 36, 37, 38, 39, 0,
5079 40, 41, 42, 43, 44, 45, 46, 0, 0, -853,
5080 0, 0, 0, 0, 0, 0, 0, 47, 48, 0,
5081 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5082 0, 0, 49, 50, 0, 0, 0, 0, 0, 0,
5083 51, 0, 0, 52, 53, 54, 55, 0, 56, 0,
5084 0, 57, 58, 59, 60, 61, 62, 63, 64, 65,
5085 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5086 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5087 0, 0, 0, 0, 0, 0, 0, 0, 66, 67,
5088 68, 0, 0, 0, 3, -853, 4, 5, 6, 7,
5089 8, -853, 0, -853, 9, 10, 0, -853, -853, 11,
5090 0, 12, 13, 14, 15, 16, 17, 18, 0, 0,
5091 0, 0, 0, 19, 20, 21, 22, 23, 24, 25,
5092 0, 0, 26, 0, 0, 0, 0, 0, 27, 28,
5093 284, 30, 31, 32, 33, 34, 35, 36, 37, 38,
5094 39, 0, 40, 41, 42, 43, 44, 45, 46, 0,
5095 0, -853, 0, 0, 0, 0, 0, 0, 0, 47,
5096 48, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5097 0, 0, 0, 0, 49, 50, 0, 0, 0, 0,
5098 0, 0, 51, 0, 0, 52, 53, 54, 55, 0,
5099 56, 0, 0, 57, 58, 59, 60, 61, 62, 63,
5100 64, 65, 0, 0, 0, 0, 0, 0, 0, 0,
5101 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5102 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5103 66, 67, 68, 0, 0, 0, 3, -853, 4, 5,
5104 6, 7, 8, -853, 0, -853, 9, 10, 0, 0,
5105 -853, 11, -853, 12, 13, 14, 15, 16, 17, 18,
5106 0, 0, 0, 0, 0, 19, 20, 21, 22, 23,
5107 24, 25, 0, 0, 26, 0, 0, 0, 0, 0,
5108 27, 28, 284, 30, 31, 32, 33, 34, 35, 36,
5109 37, 38, 39, 0, 40, 41, 42, 43, 44, 45,
5110 46, 0, 0, -853, 0, 0, 0, 0, 0, 0,
5111 0, 47, 48, 0, 0, 0, 0, 0, 0, 0,
5112 0, 0, 0, 0, 0, 0, 49, 50, 0, 0,
5113 0, 0, 0, 0, 51, 0, 0, 52, 53, 54,
5114 55, 0, 56, 0, 0, 57, 58, 59, 60, 61,
5115 62, 63, 64, 65, 0, 0, 0, 0, 0, 0,
5116 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5117 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5118 0, 0, 66, 67, 68, 0, 0, 0, 3, -853,
5119 4, 5, 6, 7, 8, -853, 0, -853, 9, 10,
5120 0, 0, -853, 11, 0, 12, 13, 14, 15, 16,
5121 17, 18, -853, 0, 0, 0, 0, 19, 20, 21,
5122 22, 23, 24, 25, 0, 0, 26, 0, 0, 0,
5123 0, 0, 27, 28, 284, 30, 31, 32, 33, 34,
5124 35, 36, 37, 38, 39, 0, 40, 41, 42, 43,
5125 44, 45, 46, 0, 0, -853, 0, 0, 0, 0,
5126 0, 0, 0, 47, 48, 0, 0, 0, 0, 0,
5127 0, 0, 0, 0, 0, 0, 0, 0, 49, 50,
5128 0, 0, 0, 0, 0, 0, 51, 0, 0, 52,
5129 53, 54, 55, 0, 56, 0, 0, 57, 58, 59,
5130 60, 61, 62, 63, 64, 65, 0, 0, 0, 0,
5131 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5132 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5133 0, 0, 0, 0, 66, 67, 68, 0, 0, 0,
5134 3, -853, 4, 5, 6, 7, 8, -853, 0, -853,
5135 9, 10, 0, 0, -853, 11, 0, 12, 13, 14,
5136 15, 16, 17, 18, 0, 0, 0, 0, 0, 19,
5137 20, 21, 22, 23, 24, 25, 0, 0, 26, 0,
5138 0, 0, 0, 0, 27, 28, 284, 30, 31, 32,
5139 33, 34, 35, 36, 37, 38, 39, 0, 40, 41,
5140 42, 43, 44, 45, 46, 0, 0, -853, 0, 0,
5141 0, 0, 0, 0, 0, 47, 48, 0, 0, 0,
5142 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5143 49, 50, 0, 0, 0, 0, 0, 0, 51, 0,
5144 0, 52, 53, 54, 55, 0, 56, 0, 0, 57,
5145 58, 59, 60, 61, 62, 63, 64, 65, 0, 0,
5146 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5147 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5148 0, 0, 0, 0, 0, 0, 66, 67, 68, 0,
5149 0, 0, 3, -853, 4, 5, 6, 7, 8, -853,
5150 -853, -853, 9, 10, 0, 0, 0, 11, 0, 12,
5151 13, 14, 15, 16, 17, 18, 0, 0, 0, 0,
5152 0, 19, 20, 21, 22, 23, 24, 25, 0, 0,
5153 26, 0, 0, 0, 0, 0, 27, 28, 284, 30,
5154 31, 32, 33, 34, 35, 36, 37, 38, 39, 0,
5155 40, 41, 42, 43, 44, 45, 46, 0, 0, -853,
5156 0, 0, 0, 0, 0, 0, 0, 47, 48, 0,
5157 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5158 0, 0, 49, 50, 0, 0, 0, 0, 0, 0,
5159 51, 0, 0, 52, 53, 54, 55, 0, 56, 0,
5160 0, 57, 58, 59, 60, 61, 62, 63, 64, 65,
5161 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5162 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5163 0, 0, 0, 0, 0, 0, 0, 0, 66, 67,
5164 68, 0, 0, 0, 3, -853, 4, 5, 6, 7,
5165 8, -853, 0, -853, 9, 10, 0, 0, 0, 11,
5166 0, 12, 13, 14, 15, 16, 17, 18, 0, 0,
5167 0, 0, 0, 19, 20, 21, 22, 23, 24, 25,
5168 0, 0, 26, 0, 0, 0, 0, 0, 27, 28,
5169 284, 30, 31, 32, 33, 34, 35, 36, 37, 38,
5170 39, 0, 40, 41, 42, 43, 44, 45, 46, 0,
5171 0, -853, 0, 0, 0, 0, 0, 0, 0, 47,
5172 48, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5173 0, 0, 0, 0, 49, 50, 0, 0, 0, 0,
5174 0, 0, 51, 0, 0, 52, 53, 54, 55, 0,
5175 56, 0, 0, 57, 58, 59, 60, 61, 62, 63,
5176 64, 65, 0, 0, 0, 0, 0, 0, 0, 0,
5177 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5178 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5179 66, 67, 68, 0, 0, 0, 3, -853, 4, 5,
5180 6, 7, 8, -853, 0, 0, 9, 10, 0, 0,
5181 0, 11, 0, 12, 13, 14, 15, 16, 17, 18,
5182 0, 0, 0, 0, 0, 19, 20, 21, 22, 23,
5183 24, 25, 0, 0, 26, 0, 0, 0, 0, 0,
5184 27, 28, 284, 30, 31, 32, 33, 34, 35, 36,
5185 37, 38, 39, 0, 40, 41, 42, 43, 44, 45,
5186 46, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5187 0, 47, 48, 0, 0, 0, 0, 0, 0, 0,
5188 0, 0, 0, 0, 0, 0, 49, 50, 0, 0,
5189 0, 0, 0, 0, 51, 0, 0, 285, 53, 54,
5190 55, 0, 56, 0, 0, 57, 58, 59, 60, 61,
5191 62, 63, 64, 65, 0, 0, 0, 0, 0, 0,
5192 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5193 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5194 0, 0, 66, 67, 68, 0, 0, 0, 0, -853,
5195 0, 0, 0, -853, 3, -853, 4, 5, 6, 7,
5196 8, 0, 0, 0, 9, 10, 0, 0, 0, 11,
5197 0, 12, 13, 14, 15, 16, 17, 18, 0, 0,
5198 0, 0, 0, 19, 20, 21, 22, 23, 24, 25,
5199 0, 0, 26, 0, 0, 0, 0, 0, 27, 28,
5200 284, 30, 31, 32, 33, 34, 35, 36, 37, 38,
5201 39, 0, 40, 41, 42, 43, 44, 45, 46, 0,
5202 0, 0, 0, 0, 0, 0, 0, 0, 0, 47,
5203 48, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5204 0, 0, 0, 0, 49, 50, 0, 0, 0, 0,
5205 0, 0, 51, 0, 0, 52, 53, 54, 55, 0,
5206 56, 0, 0, 57, 58, 59, 60, 61, 62, 63,
5207 64, 65, 0, 0, 0, 0, 0, 0, 0, 0,
5208 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5209 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5210 66, 67, 68, 0, 0, 0, 0, -853, 0, 0,
5211 0, -853, 3, -853, 4, 5, 6, 7, 8, 0,
5212 0, 0, 9, 10, 0, 0, 0, 11, 0, 12,
5213 13, 14, 15, 16, 17, 18, 0, 0, 0, 0,
5214 0, 19, 20, 21, 22, 23, 24, 25, 0, 0,
5215 26, 0, 0, 0, 0, 0, 27, 28, 29, 30,
5216 31, 32, 33, 34, 35, 36, 37, 38, 39, 0,
5217 40, 41, 42, 43, 44, 45, 46, 0, 0, 0,
5218 0, 0, 0, 0, 0, 0, 0, 47, 48, 0,
5219 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5220 0, 0, 49, 50, 0, 0, 0, 0, 0, 0,
5221 51, 0, 0, 52, 53, 54, 55, 0, 56, 0,
5222 0, 57, 58, 59, 60, 61, 62, 63, 64, 65,
5223 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5224 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5225 0, 0, 0, 0, 0, 0, 0, 0, 66, 67,
5226 68, 0, 0, -853, 3, -853, 4, 5, 6, 7,
5227 8, -853, 0, 0, 9, 10, 0, 0, 0, 11,
5228 0, 12, 13, 14, 15, 16, 17, 18, 0, 0,
5229 0, 0, 0, 19, 20, 21, 22, 23, 24, 25,
5230 0, 0, 26, 0, 0, 0, 0, 0, 27, 28,
5231 284, 30, 31, 32, 33, 34, 35, 36, 37, 38,
5232 39, 0, 40, 41, 42, 43, 44, 45, 46, 0,
5233 0, 0, 0, 0, 0, 0, 0, 0, 0, 47,
5234 48, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5235 0, 0, 0, 0, 49, 50, 0, 0, 0, 0,
5236 0, 0, 51, 0, 0, 52, 53, 54, 55, 0,
5237 56, 0, 0, 57, 58, 59, 60, 61, 62, 63,
5238 64, 65, 0, 0, 0, 0, 0, 0, 0, 0,
5239 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5240 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5241 66, 67, 68, 0, 0, -853, 404, -853, 4, 5,
5242 6, 0, 8, -853, 0, 0, 9, 10, 0, 0,
5243 0, 11, -3, 12, 13, 14, 15, 16, 17, 18,
5244 0, 0, 0, 0, 0, 19, 20, 21, 22, 23,
5245 24, 25, 0, 0, 26, 0, 0, 0, 0, 0,
5246 0, 28, 0, 0, 31, 32, 33, 34, 35, 36,
5247 37, 38, 39, 0, 40, 41, 42, 43, 44, 45,
5248 46, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5249 0, 47, 48, 0, 0, 0, 0, 0, 0, 0,
5250 0, 0, 0, 0, 0, 0, 49, 50, 0, 0,
5251 0, 0, 0, 0, 229, 0, 0, 230, 53, 54,
5252 55, 0, 0, 0, 0, 57, 58, 59, 60, 61,
5253 62, 63, 64, 65, 0, 0, 0, 0, 0, 0,
5254 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5255 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5256 0, 0, 66, 67, 68, 0, 0, 0, 0, 331,
5257 0, 0, 0, 0, 0, 332, 144, 145, 146, 147,
5258 148, 149, 150, 151, 152, 153, 154, 155, 156, 157,
5259 158, 159, 160, 161, 162, 163, 164, 165, 166, 167,
5260 0, 0, 0, 168, 169, 170, 434, 435, 436, 437,
5261 175, 176, 177, 0, 0, 0, 0, 0, 178, 179,
5262 180, 181, 438, 439, 440, 441, 186, 36, 37, 442,
5263 39, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5264 0, 0, 0, 0, 0, 0, 0, 0, 0, 188,
5265 189, 190, 191, 192, 193, 194, 195, 196, 0, 0,
5266 197, 198, 0, 0, 0, 0, 199, 200, 201, 202,
5267 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5268 203, 204, 0, 0, 0, 0, 0, 0, 0, 0,
5269 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5270 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5271 205, 206, 207, 208, 209, 210, 211, 212, 213, 214,
5272 0, 215, 216, 0, 0, 0, 0, 0, 0, 217,
5273 443, 144, 145, 146, 147, 148, 149, 150, 151, 152,
5274 153, 154, 155, 156, 157, 158, 159, 160, 161, 162,
5275 163, 164, 165, 166, 167, 0, 0, 0, 168, 169,
5276 170, 171, 172, 173, 174, 175, 176, 177, 0, 0,
5277 0, 0, 0, 178, 179, 180, 181, 182, 183, 184,
5278 185, 186, 36, 37, 187, 39, 0, 0, 0, 0,
5279 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5280 0, 0, 0, 0, 188, 189, 190, 191, 192, 193,
5281 194, 195, 196, 0, 0, 197, 198, 0, 0, 0,
5282 0, 199, 200, 201, 202, 0, 0, 0, 0, 0,
5283 0, 0, 0, 0, 0, 203, 204, 0, 0, 0,
5284 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5285 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5286 0, 0, 0, 0, 0, 205, 206, 207, 208, 209,
5287 210, 211, 212, 213, 214, 0, 215, 216, 0, 0,
5288 0, 0, 0, 0, 217, 144, 145, 146, 147, 148,
5289 149, 150, 151, 152, 153, 154, 155, 156, 157, 158,
5290 159, 160, 161, 162, 163, 164, 165, 166, 167, 0,
5291 0, 0, 168, 169, 170, 171, 172, 173, 174, 175,
5292 176, 177, 0, 0, 0, 0, 0, 178, 179, 180,
5293 181, 182, 183, 184, 185, 186, 262, 0, 187, 0,
5294 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5295 0, 0, 0, 0, 0, 0, 0, 0, 188, 189,
5296 190, 191, 192, 193, 194, 195, 196, 0, 0, 197,
5297 198, 0, 0, 0, 0, 199, 200, 201, 202, 0,
5298 0, 0, 0, 0, 0, 0, 0, 0, 0, 203,
5299 204, 0, 0, 58, 0, 0, 0, 0, 0, 0,
5300 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5301 0, 0, 0, 0, 0, 0, 0, 0, 0, 205,
5302 206, 207, 208, 209, 210, 211, 212, 213, 214, 0,
5303 215, 216, 0, 0, 0, 0, 0, 0, 217, 144,
5304 145, 146, 147, 148, 149, 150, 151, 152, 153, 154,
5305 155, 156, 157, 158, 159, 160, 161, 162, 163, 164,
5306 165, 166, 167, 0, 0, 0, 168, 169, 170, 171,
5307 172, 173, 174, 175, 176, 177, 0, 0, 0, 0,
5308 0, 178, 179, 180, 181, 182, 183, 184, 185, 186,
5309 0, 0, 187, 0, 0, 0, 0, 0, 0, 0,
5310 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5311 0, 0, 188, 189, 190, 191, 192, 193, 194, 195,
5312 196, 0, 0, 197, 198, 0, 0, 0, 0, 199,
5313 200, 201, 202, 0, 0, 0, 0, 0, 0, 0,
5314 0, 0, 0, 203, 204, 0, 0, 58, 0, 0,
5315 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5316 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5317 0, 0, 0, 205, 206, 207, 208, 209, 210, 211,
5318 212, 213, 214, 0, 215, 216, 0, 0, 0, 0,
5319 0, 0, 217, 144, 145, 146, 147, 148, 149, 150,
5320 151, 152, 153, 154, 155, 156, 157, 158, 159, 160,
5321 161, 162, 163, 164, 165, 166, 167, 0, 0, 0,
5322 168, 169, 170, 171, 172, 173, 174, 175, 176, 177,
5323 0, 0, 0, 0, 0, 178, 179, 180, 181, 182,
5324 183, 184, 185, 186, 0, 0, 187, 0, 0, 0,
5325 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5326 0, 0, 0, 0, 0, 0, 188, 189, 190, 191,
5327 192, 193, 194, 195, 196, 0, 0, 197, 198, 0,
5328 0, 0, 0, 199, 200, 201, 202, 0, 0, 0,
5329 0, 0, 0, 0, 0, 0, 0, 203, 204, 0,
5330 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5331 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5332 0, 0, 0, 0, 0, 0, 0, 205, 206, 207,
5333 208, 209, 210, 211, 212, 213, 214, 0, 215, 216,
5334 4, 5, 6, 0, 8, 0, 217, 0, 9, 10,
5335 0, 0, 0, 11, 0, 12, 13, 14, 270, 271,
5336 17, 18, 0, 0, 0, 0, 0, 19, 20, 272,
5337 22, 23, 24, 25, 0, 0, 227, 0, 0, 0,
5338 0, 0, 0, 302, 0, 0, 31, 32, 33, 34,
5339 35, 36, 37, 38, 39, 0, 40, 41, 42, 43,
5340 44, 45, 46, 0, 0, 0, 0, 0, 0, 0,
5341 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5342 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5343 0, 0, 0, 0, 0, 0, 303, 0, 0, 230,
5344 53, 54, 55, 0, 0, 0, 0, 57, 58, 59,
5345 60, 61, 62, 63, 64, 65, 0, 0, 4, 5,
5346 6, 0, 8, 0, 0, 0, 9, 10, 0, 0,
5347 0, 11, 0, 12, 13, 14, 270, 271, 17, 18,
5348 0, 0, 0, 0, 304, 19, 20, 272, 22, 23,
5349 24, 25, 305, 0, 227, 0, 0, 0, 0, 0,
5350 0, 302, 0, 0, 31, 32, 33, 34, 35, 36,
5351 37, 38, 39, 0, 40, 41, 42, 43, 44, 45,
5352 46, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5353 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5354 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5355 0, 0, 0, 0, 303, 0, 0, 230, 53, 54,
5356 55, 0, 0, 0, 0, 57, 58, 59, 60, 61,
5357 62, 63, 64, 65, 0, 0, 4, 5, 6, 0,
5358 8, 0, 0, 0, 9, 10, 0, 0, 0, 11,
5359 0, 12, 13, 14, 15, 16, 17, 18, 0, 0,
5360 0, 0, 304, 19, 20, 21, 22, 23, 24, 25,
5361 612, 0, 227, 0, 0, 0, 0, 0, 0, 28,
5362 0, 0, 31, 32, 33, 34, 35, 36, 37, 38,
5363 39, 228, 40, 41, 42, 43, 44, 45, 46, 0,
5364 0, 0, 0, 0, 0, 0, 0, 0, 0, 47,
5365 48, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5366 0, 0, 0, 0, 49, 50, 0, 0, 0, 0,
5367 0, 0, 229, 0, 0, 230, 53, 54, 55, 0,
5368 231, 232, 233, 57, 58, 234, 60, 61, 62, 63,
5369 64, 65, 0, 0, 0, 0, 0, 0, 0, 0,
5370 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5371 0, 0, 0, 0, 0, 4, 5, 6, 0, 8,
5372 66, 235, 68, 9, 10, 0, 0, 259, 11, 0,
5373 12, 13, 14, 15, 16, 17, 18, 0, 0, 0,
5374 0, 0, 19, 20, 21, 22, 23, 24, 25, 0,
5375 0, 26, 0, 0, 0, 0, 0, 0, 28, 0,
5376 0, 31, 32, 33, 34, 35, 36, 37, 38, 39,
5377 0, 40, 41, 42, 43, 44, 45, 46, 0, 0,
5378 0, 0, 0, 0, 0, 0, 0, 0, 47, 48,
5379 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5380 0, 0, 0, 49, 50, 0, 0, 0, 0, 0,
5381 0, 229, 0, 0, 230, 53, 54, 55, 0, 0,
5382 0, 0, 57, 58, 59, 60, 61, 62, 63, 64,
5383 65, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5384 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5385 0, 0, 3, 0, 4, 5, 6, 7, 8, 66,
5386 67, 68, 9, 10, 0, 0, 259, 11, 0, 12,
5387 13, 14, 15, 16, 17, 18, 0, 0, 0, 0,
5388 0, 19, 20, 21, 22, 23, 24, 25, 0, 0,
5389 26, 0, 0, 0, 0, 0, 27, 28, 0, 30,
5390 31, 32, 33, 34, 35, 36, 37, 38, 39, 0,
5391 40, 41, 42, 43, 44, 45, 46, 0, 0, 0,
5392 0, 0, 0, 0, 0, 0, 0, 47, 48, 0,
5393 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5394 0, 0, 49, 50, 0, 0, 0, 0, 0, 0,
5395 51, 0, 0, 52, 53, 54, 55, 0, 56, 0,
5396 0, 57, 58, 59, 60, 61, 62, 63, 64, 65,
5397 0, 0, 404, 0, 4, 5, 6, 0, 8, 0,
5398 0, 0, 9, 10, 0, 0, 0, 11, 0, 12,
5399 13, 14, 15, 16, 17, 18, 0, 0, 66, 67,
5400 68, 19, 20, 21, 22, 23, 24, 25, 0, 0,
5401 26, 0, 0, 0, 0, 0, 0, 28, 0, 0,
5402 31, 32, 33, 34, 35, 36, 37, 38, 39, 0,
5403 40, 41, 42, 43, 44, 45, 46, 0, 0, 0,
5404 0, 0, 0, 0, 0, 0, 0, 47, 48, 0,
5405 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5406 0, 0, 49, 50, 0, 0, 0, 0, 0, 0,
5407 229, 0, 0, 230, 53, 54, 55, 0, 0, 0,
5408 0, 57, 58, 59, 60, 61, 62, 63, 64, 65,
5409 0, 0, 0, 0, 4, 5, 6, 0, 8, 0,
5410 0, 0, 9, 10, 0, 0, 0, 11, 0, 12,
5411 13, 14, 15, 16, 17, 18, 0, 0, 66, 67,
5412 68, 19, 20, 21, 22, 23, 24, 25, 0, 0,
5413 227, 0, 0, 0, 0, 0, 0, 28, 0, 0,
5414 31, 32, 33, 34, 35, 36, 37, 38, 39, 228,
5415 40, 41, 42, 43, 44, 45, 46, 0, 0, 0,
5416 0, 0, 0, 0, 0, 0, 0, 47, 48, 0,
5417 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5418 0, 0, 49, 50, 0, 0, 0, 0, 0, 0,
5419 229, 0, 0, 230, 53, 54, 55, 0, 231, 232,
5420 233, 57, 58, 234, 60, 61, 62, 63, 64, 65,
5421 0, 0, 0, 0, 4, 5, 6, 0, 8, 0,
5422 0, 0, 9, 10, 0, 0, 0, 11, 0, 12,
5423 13, 14, 15, 16, 17, 18, 0, 0, 66, 235,
5424 68, 19, 20, 21, 22, 23, 24, 25, 0, 0,
5425 227, 0, 0, 0, 0, 0, 0, 28, 0, 0,
5426 31, 32, 33, 34, 35, 36, 37, 38, 39, 228,
5427 40, 41, 42, 43, 44, 45, 46, 0, 0, 0,
5428 0, 0, 0, 0, 0, 0, 0, 47, 48, 0,
5429 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5430 0, 0, 49, 479, 0, 0, 0, 0, 0, 0,
5431 229, 0, 0, 230, 53, 54, 55, 0, 231, 232,
5432 233, 57, 58, 234, 60, 61, 62, 63, 64, 65,
5433 0, 0, 0, 0, 4, 5, 6, 0, 8, 0,
5434 0, 0, 9, 10, 0, 0, 0, 11, 0, 12,
5435 13, 14, 270, 271, 17, 18, 0, 0, 66, 235,
5436 68, 19, 20, 272, 22, 23, 24, 25, 0, 0,
5437 227, 0, 0, 0, 0, 0, 0, 28, 0, 0,
5438 31, 32, 33, 34, 35, 36, 37, 38, 39, 228,
5439 40, 41, 42, 43, 44, 45, 46, 0, 0, 0,
5440 0, 0, 0, 0, 0, 0, 0, 47, 48, 0,
5441 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5442 0, 0, 49, 50, 0, 0, 0, 0, 0, 0,
5443 229, 0, 0, 230, 53, 54, 55, 0, 231, 232,
5444 233, 57, 58, 234, 60, 61, 62, 63, 64, 65,
5445 0, 0, 0, 0, 4, 5, 6, 0, 8, 0,
5446 0, 0, 9, 10, 0, 0, 0, 11, 0, 12,
5447 13, 14, 270, 271, 17, 18, 0, 0, 66, 235,
5448 68, 19, 20, 272, 22, 23, 24, 25, 0, 0,
5449 227, 0, 0, 0, 0, 0, 0, 28, 0, 0,
5450 31, 32, 33, 34, 35, 36, 37, 38, 39, 228,
5451 40, 41, 42, 43, 44, 45, 46, 0, 0, 0,
5452 0, 0, 0, 0, 0, 0, 0, 47, 48, 0,
5453 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5454 0, 0, 49, 479, 0, 0, 0, 0, 0, 0,
5455 229, 0, 0, 230, 53, 54, 55, 0, 231, 232,
5456 233, 57, 58, 234, 60, 61, 62, 63, 64, 65,
5457 0, 0, 0, 0, 4, 5, 6, 0, 8, 0,
5458 0, 0, 9, 10, 0, 0, 0, 11, 0, 12,
5459 13, 14, 270, 271, 17, 18, 0, 0, 66, 235,
5460 68, 19, 20, 272, 22, 23, 24, 25, 0, 0,
5461 227, 0, 0, 0, 0, 0, 0, 28, 0, 0,
5462 31, 32, 33, 34, 35, 36, 37, 38, 39, 228,
5463 40, 41, 42, 43, 44, 45, 46, 0, 0, 0,
5464 0, 0, 0, 0, 0, 0, 0, 47, 48, 0,
5465 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5466 0, 0, 49, 50, 0, 0, 0, 0, 0, 0,
5467 229, 0, 0, 230, 53, 54, 55, 0, 231, 232,
5468 0, 57, 58, 234, 60, 61, 62, 63, 64, 65,
5469 0, 0, 0, 0, 4, 5, 6, 0, 8, 0,
5470 0, 0, 9, 10, 0, 0, 0, 11, 0, 12,
5471 13, 14, 270, 271, 17, 18, 0, 0, 66, 235,
5472 68, 19, 20, 272, 22, 23, 24, 25, 0, 0,
5473 227, 0, 0, 0, 0, 0, 0, 28, 0, 0,
5474 31, 32, 33, 34, 35, 36, 37, 38, 39, 228,
5475 40, 41, 42, 43, 44, 45, 46, 0, 0, 0,
5476 0, 0, 0, 0, 0, 0, 0, 47, 48, 0,
5477 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5478 0, 0, 49, 50, 0, 0, 0, 0, 0, 0,
5479 229, 0, 0, 230, 53, 54, 55, 0, 0, 232,
5480 233, 57, 58, 234, 60, 61, 62, 63, 64, 65,
5481 0, 0, 0, 0, 4, 5, 6, 0, 8, 0,
5482 0, 0, 9, 10, 0, 0, 0, 11, 0, 12,
5483 13, 14, 270, 271, 17, 18, 0, 0, 66, 235,
5484 68, 19, 20, 272, 22, 23, 24, 25, 0, 0,
5485 227, 0, 0, 0, 0, 0, 0, 28, 0, 0,
5486 31, 32, 33, 34, 35, 36, 37, 38, 39, 228,
5487 40, 41, 42, 43, 44, 45, 46, 0, 0, 0,
5488 0, 0, 0, 0, 0, 0, 0, 47, 48, 0,
5489 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5490 0, 0, 49, 50, 0, 0, 0, 0, 0, 0,
5491 229, 0, 0, 230, 53, 54, 55, 0, 0, 232,
5492 0, 57, 58, 234, 60, 61, 62, 63, 64, 65,
5493 0, 0, 0, 0, 4, 5, 6, 0, 8, 0,
5494 0, 0, 9, 10, 0, 0, 0, 11, 0, 12,
5495 13, 14, 15, 16, 17, 18, 0, 0, 66, 235,
5496 68, 19, 20, 21, 22, 23, 24, 25, 0, 0,
5497 227, 0, 0, 0, 0, 0, 0, 28, 0, 0,
5498 31, 32, 33, 34, 35, 36, 37, 38, 39, 0,
5499 40, 41, 42, 43, 44, 45, 46, 0, 0, 0,
5500 0, 0, 0, 0, 0, 0, 0, 47, 48, 0,
5501 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5502 0, 0, 49, 50, 0, 0, 0, 0, 0, 0,
5503 229, 0, 0, 230, 53, 54, 55, 0, 802, 0,
5504 0, 57, 58, 59, 60, 61, 62, 63, 64, 65,
5505 0, 0, 0, 0, 4, 5, 6, 0, 8, 0,
5506 0, 0, 9, 10, 0, 0, 0, 11, 0, 12,
5507 13, 14, 15, 16, 17, 18, 0, 0, 66, 235,
5508 68, 19, 20, 21, 22, 23, 24, 25, 0, 0,
5509 227, 0, 0, 0, 0, 0, 0, 28, 0, 0,
5510 31, 32, 33, 34, 35, 36, 37, 38, 39, 0,
5511 40, 41, 42, 43, 44, 45, 46, 0, 0, 0,
5512 0, 0, 0, 0, 0, 0, 0, 47, 48, 0,
5513 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5514 0, 0, 49, 50, 0, 0, 0, 0, 0, 0,
5515 813, 0, 0, 230, 53, 54, 55, 0, 802, 0,
5516 0, 57, 58, 59, 60, 61, 62, 63, 64, 65,
5517 0, 0, 0, 0, 4, 5, 6, 0, 8, 0,
5518 0, 0, 9, 10, 0, 0, 0, 11, 0, 12,
5519 13, 14, 270, 271, 17, 18, 0, 0, 66, 235,
5520 68, 19, 20, 272, 22, 23, 24, 25, 0, 0,
5521 227, 0, 0, 0, 0, 0, 0, 28, 0, 0,
5522 31, 32, 33, 34, 35, 36, 37, 38, 39, 0,
5523 40, 41, 42, 43, 44, 45, 46, 0, 0, 0,
5524 0, 0, 0, 0, 0, 0, 0, 47, 48, 0,
5525 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5526 0, 0, 49, 50, 0, 0, 0, 0, 0, 0,
5527 229, 0, 0, 230, 53, 54, 55, 0, 973, 0,
5528 0, 57, 58, 59, 60, 61, 62, 63, 64, 65,
5529 0, 0, 0, 0, 4, 5, 6, 0, 8, 0,
5530 0, 0, 9, 10, 0, 0, 0, 11, 0, 12,
5531 13, 14, 270, 271, 17, 18, 0, 0, 66, 235,
5532 68, 19, 20, 272, 22, 23, 24, 25, 0, 0,
5533 227, 0, 0, 0, 0, 0, 0, 28, 0, 0,
5534 31, 32, 33, 34, 35, 36, 37, 38, 39, 0,
5535 40, 41, 42, 43, 44, 45, 46, 0, 0, 0,
5536 0, 0, 0, 0, 0, 0, 0, 47, 48, 0,
5537 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5538 0, 0, 49, 50, 0, 0, 0, 0, 0, 0,
5539 229, 0, 0, 230, 53, 54, 55, 0, 1022, 0,
5540 0, 57, 58, 59, 60, 61, 62, 63, 64, 65,
5541 0, 0, 0, 0, 4, 5, 6, 0, 8, 0,
5542 0, 0, 9, 10, 0, 0, 0, 11, 0, 12,
5543 13, 14, 270, 271, 17, 18, 0, 0, 66, 235,
5544 68, 19, 20, 272, 22, 23, 24, 25, 0, 0,
5545 227, 0, 0, 0, 0, 0, 0, 28, 0, 0,
5546 31, 32, 33, 34, 35, 36, 37, 38, 39, 0,
5547 40, 41, 42, 43, 44, 45, 46, 0, 0, 0,
5548 0, 0, 0, 0, 0, 0, 0, 47, 48, 0,
5549 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5550 0, 0, 49, 50, 0, 0, 0, 0, 0, 0,
5551 229, 0, 0, 230, 53, 54, 55, 0, 802, 0,
5552 0, 57, 58, 59, 60, 61, 62, 63, 64, 65,
5553 0, 0, 0, 0, 4, 5, 6, 0, 8, 0,
5554 0, 0, 9, 10, 0, 0, 0, 11, 0, 12,
5555 13, 14, 270, 271, 17, 18, 0, 0, 66, 235,
5556 68, 19, 20, 272, 22, 23, 24, 25, 0, 0,
5557 227, 0, 0, 0, 0, 0, 0, 28, 0, 0,
5558 31, 32, 33, 34, 35, 36, 37, 38, 39, 0,
5559 40, 41, 42, 43, 44, 45, 46, 0, 0, 0,
5560 0, 0, 0, 0, 0, 0, 0, 47, 48, 0,
5561 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5562 0, 0, 49, 50, 0, 0, 0, 0, 0, 0,
5563 229, 0, 0, 230, 53, 54, 55, 0, 1155, 0,
5564 0, 57, 58, 59, 60, 61, 62, 63, 64, 65,
5565 0, 0, 0, 0, 4, 5, 6, 0, 8, 0,
5566 0, 0, 9, 10, 0, 0, 0, 11, 0, 12,
5567 13, 14, 270, 271, 17, 18, 0, 0, 66, 235,
5568 68, 19, 20, 272, 22, 23, 24, 25, 0, 0,
5569 227, 0, 0, 0, 0, 0, 0, 28, 0, 0,
5570 31, 32, 33, 34, 35, 36, 37, 38, 39, 0,
5571 40, 41, 42, 43, 44, 45, 46, 0, 0, 0,
5572 0, 0, 0, 0, 0, 0, 0, 47, 48, 0,
5573 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5574 0, 0, 49, 50, 0, 0, 0, 0, 0, 0,
5575 229, 0, 0, 230, 53, 54, 55, 0, 0, 0,
5576 0, 57, 58, 59, 60, 61, 62, 63, 64, 65,
5577 0, 0, 0, 0, 4, 5, 6, 0, 8, 0,
5578 0, 0, 9, 10, 0, 0, 0, 11, 0, 12,
5579 13, 14, 15, 16, 17, 18, 0, 0, 66, 235,
5580 68, 19, 20, 21, 22, 23, 24, 25, 0, 0,
5581 227, 0, 0, 0, 0, 0, 0, 28, 0, 0,
5582 31, 32, 33, 34, 35, 36, 37, 38, 39, 0,
5583 40, 41, 42, 43, 44, 45, 46, 0, 0, 0,
5584 0, 0, 0, 0, 0, 0, 0, 47, 48, 0,
5585 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5586 0, 0, 49, 50, 0, 0, 0, 0, 0, 0,
5587 229, 0, 0, 230, 53, 54, 55, 0, 0, 0,
5588 0, 57, 58, 59, 60, 61, 62, 63, 64, 65,
5589 0, 0, 0, 0, 4, 5, 6, 0, 8, 0,
5590 0, 0, 9, 10, 0, 0, 0, 11, 0, 12,
5591 13, 14, 15, 16, 17, 18, 0, 0, 66, 235,
5592 68, 19, 20, 21, 22, 23, 24, 25, 0, 0,
5593 26, 0, 0, 0, 0, 0, 0, 28, 0, 0,
5594 31, 32, 33, 34, 35, 36, 37, 38, 39, 0,
5595 40, 41, 42, 43, 44, 45, 46, 0, 0, 0,
5596 0, 0, 0, 0, 0, 0, 0, 47, 48, 0,
5597 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5598 0, 0, 49, 50, 0, 0, 0, 0, 0, 0,
5599 229, 0, 0, 230, 53, 54, 55, 0, 0, 0,
5600 0, 57, 58, 59, 60, 61, 62, 63, 64, 65,
5601 0, 0, 0, 0, 4, 5, 6, 0, 8, 0,
5602 0, 0, 9, 10, 0, 0, 0, 11, 0, 12,
5603 13, 14, 15, 16, 17, 18, 0, 0, 66, 67,
5604 68, 19, 20, 21, 22, 23, 24, 25, 0, 0,
5605 784, 0, 0, 0, 0, 0, 0, 28, 0, 0,
5606 31, 32, 33, 34, 35, 36, 37, 38, 39, 0,
5607 40, 41, 42, 43, 44, 45, 46, 0, 0, 0,
5608 0, 0, 0, 0, 0, 0, 0, 47, 48, 0,
5609 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5610 0, 0, 49, 50, 0, 0, 0, 0, 0, 0,
5611 229, 0, 0, 230, 53, 54, 55, 0, 0, 0,
5612 0, 57, 58, 59, 60, 61, 62, 63, 64, 65,
5613 0, 0, 0, 0, 4, 5, 6, 0, 8, 0,
5614 0, 0, 9, 10, 0, 0, 0, 11, 0, 12,
5615 13, 14, 15, 16, 17, 18, 0, 0, 66, 235,
5616 68, 19, 20, 21, 22, 23, 24, 25, 0, 0,
5617 227, 0, 0, 0, 0, 0, 0, 28, 0, 0,
5618 31, 32, 33, 34, 35, 36, 37, 38, 39, 0,
5619 40, 41, 42, 43, 44, 45, 46, 0, 0, 0,
5620 0, 0, 0, 0, 0, 0, 0, 47, 48, 0,
5621 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5622 0, 0, 49, 50, 0, 0, 0, 0, 0, 0,
5623 813, 0, 0, 230, 53, 54, 55, 0, 0, 0,
5624 0, 57, 58, 59, 60, 61, 62, 63, 64, 65,
5625 0, 0, 0, 0, 4, 5, 6, 0, 8, 0,
5626 0, 0, 9, 10, 0, 0, 0, 11, 0, 12,
5627 13, 14, 270, 271, 17, 18, 0, 0, 66, 235,
5628 68, 19, 20, 272, 22, 23, 24, 25, 0, 0,
5629 893, 0, 0, 0, 0, 0, 0, 28, 0, 0,
5630 31, 32, 33, 34, 35, 36, 37, 38, 39, 0,
5631 40, 41, 42, 43, 44, 45, 46, 0, 0, 0,
5632 0, 0, 0, 0, 0, 0, 0, 47, 48, 0,
5633 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5634 0, 0, 49, 50, 0, 0, 0, 0, 0, 0,
5635 229, 0, 0, 230, 53, 54, 55, 0, 0, 0,
5636 0, 57, 58, 59, 60, 61, 62, 63, 64, 65,
5637 0, 0, 0, 0, 4, 5, 6, 0, 8, 0,
5638 0, 0, 9, 10, 0, 0, 0, 11, 0, 12,
5639 13, 14, 270, 271, 17, 18, 0, 0, 66, 235,
5640 68, 19, 20, 272, 22, 23, 24, 25, 0, 0,
5641 227, 0, 0, 0, 0, 0, 0, 302, 0, 0,
5642 31, 32, 33, 34, 35, 36, 37, 38, 39, 0,
5643 40, 41, 42, 43, 44, 45, 46, 0, 0, 0,
5644 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5645 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5646 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5647 303, 0, 0, 363, 53, 54, 55, 0, 364, 0,
5648 0, 57, 58, 59, 60, 61, 62, 63, 64, 65,
5649 0, 0, 4, 5, 6, 0, 8, 0, 0, 0,
5650 9, 10, 0, 0, 0, 11, 0, 12, 13, 14,
5651 270, 271, 17, 18, 0, 0, 0, 0, 304, 19,
5652 20, 272, 22, 23, 24, 25, 0, 0, 227, 0,
5653 0, 0, 0, 0, 0, 302, 0, 0, 31, 32,
5654 33, 34, 35, 36, 37, 38, 39, 0, 40, 41,
5655 42, 43, 44, 45, 46, 0, 0, 0, 0, 0,
5656 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5657 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5658 0, 0, 0, 0, 0, 0, 0, 0, 415, 0,
5659 0, 52, 53, 54, 55, 0, 56, 0, 0, 57,
5660 58, 59, 60, 61, 62, 63, 64, 65, 0, 0,
5661 4, 5, 6, 0, 8, 0, 0, 0, 9, 10,
5662 0, 0, 0, 11, 0, 12, 13, 14, 270, 271,
5663 17, 18, 0, 0, 0, 0, 304, 19, 20, 272,
5664 22, 23, 24, 25, 0, 0, 227, 0, 0, 0,
5665 0, 0, 0, 302, 0, 0, 31, 32, 33, 423,
5666 35, 36, 37, 424, 39, 0, 40, 41, 42, 43,
5667 44, 45, 46, 0, 0, 0, 0, 0, 0, 0,
5668 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5669 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5670 0, 0, 425, 0, 0, 0, 426, 0, 0, 230,
5671 53, 54, 55, 0, 0, 0, 0, 57, 58, 59,
5672 60, 61, 62, 63, 64, 65, 0, 0, 4, 5,
5673 6, 0, 8, 0, 0, 0, 9, 10, 0, 0,
5674 0, 11, 0, 12, 13, 14, 270, 271, 17, 18,
5675 0, 0, 0, 0, 304, 19, 20, 272, 22, 23,
5676 24, 25, 0, 0, 227, 0, 0, 0, 0, 0,
5677 0, 302, 0, 0, 31, 32, 33, 423, 35, 36,
5678 37, 424, 39, 0, 40, 41, 42, 43, 44, 45,
5679 46, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5680 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5681 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5682 0, 0, 0, 0, 426, 0, 0, 230, 53, 54,
5683 55, 0, 0, 0, 0, 57, 58, 59, 60, 61,
5684 62, 63, 64, 65, 0, 0, 4, 5, 6, 0,
5685 8, 0, 0, 0, 9, 10, 0, 0, 0, 11,
5686 0, 12, 13, 14, 270, 271, 17, 18, 0, 0,
5687 0, 0, 304, 19, 20, 272, 22, 23, 24, 25,
5688 0, 0, 227, 0, 0, 0, 0, 0, 0, 302,
5689 0, 0, 31, 32, 33, 34, 35, 36, 37, 38,
5690 39, 0, 40, 41, 42, 43, 44, 45, 46, 0,
5691 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5692 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5693 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5694 0, 0, 303, 0, 0, 363, 53, 54, 55, 0,
5695 0, 0, 0, 57, 58, 59, 60, 61, 62, 63,
5696 64, 65, 0, 0, 4, 5, 6, 0, 8, 0,
5697 0, 0, 9, 10, 0, 0, 0, 11, 0, 12,
5698 13, 14, 270, 271, 17, 18, 0, 0, 0, 0,
5699 304, 19, 20, 272, 22, 23, 24, 25, 0, 0,
5700 227, 0, 0, 0, 0, 0, 0, 302, 0, 0,
5701 31, 32, 33, 34, 35, 36, 37, 38, 39, 0,
5702 40, 41, 42, 43, 44, 45, 46, 0, 0, 0,
5703 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5704 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5705 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5706 1223, 0, 0, 230, 53, 54, 55, 0, 0, 0,
5707 0, 57, 58, 59, 60, 61, 62, 63, 64, 65,
5708 0, 0, 4, 5, 6, 0, 8, 0, 0, 0,
5709 9, 10, 0, 0, 0, 11, 0, 12, 13, 14,
5710 270, 271, 17, 18, 0, 0, 0, 0, 304, 19,
5711 20, 272, 22, 23, 24, 25, 0, 0, 227, 0,
5712 0, 0, 0, 0, 0, 302, 0, 0, 31, 32,
5713 33, 34, 35, 36, 37, 38, 39, 0, 40, 41,
5714 42, 43, 44, 45, 46, 0, 0, 0, 0, 0,
5715 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5716 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5717 0, 0, 0, 0, 0, 704, 643, 0, 1343, 705,
5718 0, 230, 53, 54, 55, 0, 0, 0, 0, 57,
5719 58, 59, 60, 61, 62, 63, 64, 65, 0, 188,
5720 189, 190, 191, 192, 193, 194, 195, 196, 0, 0,
5721 197, 198, 0, 0, 0, 0, 199, 200, 201, 202,
5722 0, 0, 0, 0, 0, 0, 304, 0, 0, 0,
5723 203, 204, 0, 0, 0, 0, 0, 0, 0, 0,
5724 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5725 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5726 205, 206, 207, 208, 209, 210, 211, 212, 213, 214,
5727 0, 215, 216, 707, 651, 0, 0, 708, 0, 217,
5728 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5729 0, 0, 0, 0, 0, 0, 0, 188, 189, 190,
5730 191, 192, 193, 194, 195, 196, 0, 0, 197, 198,
5731 0, 0, 0, 0, 199, 200, 201, 202, 0, 0,
5732 0, 0, 0, 0, 0, 0, 0, 0, 203, 204,
5733 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5734 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5735 0, 0, 0, 0, 0, 0, 0, 0, 205, 206,
5736 207, 208, 209, 210, 211, 212, 213, 214, 0, 215,
5737 216, 704, 643, 0, 0, 724, 0, 217, 0, 0,
5738 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5739 0, 0, 0, 0, 0, 188, 189, 190, 191, 192,
5740 193, 194, 195, 196, 0, 0, 197, 198, 0, 0,
5741 0, 0, 199, 200, 201, 202, 0, 0, 0, 0,
5742 0, 0, 0, 0, 0, 0, 203, 204, 0, 0,
5743 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5744 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5745 0, 0, 0, 0, 0, 0, 205, 206, 207, 208,
5746 209, 210, 211, 212, 213, 214, 0, 215, 216, 735,
5747 643, 0, 0, 736, 0, 217, 0, 0, 0, 0,
5748 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5749 0, 0, 0, 188, 189, 190, 191, 192, 193, 194,
5750 195, 196, 0, 0, 197, 198, 0, 0, 0, 0,
5751 199, 200, 201, 202, 0, 0, 0, 0, 0, 0,
5752 0, 0, 0, 0, 203, 204, 0, 0, 0, 0,
5753 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5754 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5755 0, 0, 0, 0, 205, 206, 207, 208, 209, 210,
5756 211, 212, 213, 214, 0, 215, 216, 738, 651, 0,
5757 0, 739, 0, 217, 0, 0, 0, 0, 0, 0,
5758 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5759 0, 188, 189, 190, 191, 192, 193, 194, 195, 196,
5760 0, 0, 197, 198, 0, 0, 0, 0, 199, 200,
5761 201, 202, 0, 0, 0, 0, 0, 0, 0, 0,
5762 0, 0, 203, 204, 0, 0, 0, 0, 0, 0,
5763 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5764 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5765 0, 0, 205, 206, 207, 208, 209, 210, 211, 212,
5766 213, 214, 0, 215, 216, 857, 643, 0, 0, 858,
5767 0, 217, 0, 0, 0, 0, 0, 0, 0, 0,
5768 0, 0, 0, 0, 0, 0, 0, 0, 0, 188,
5769 189, 190, 191, 192, 193, 194, 195, 196, 0, 0,
5770 197, 198, 0, 0, 0, 0, 199, 200, 201, 202,
5771 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5772 203, 204, 0, 0, 0, 0, 0, 0, 0, 0,
5773 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5774 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5775 205, 206, 207, 208, 209, 210, 211, 212, 213, 214,
5776 0, 215, 216, 860, 651, 0, 0, 861, 0, 217,
5777 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5778 0, 0, 0, 0, 0, 0, 0, 188, 189, 190,
5779 191, 192, 193, 194, 195, 196, 0, 0, 197, 198,
5780 0, 0, 0, 0, 199, 200, 201, 202, 0, 0,
5781 0, 0, 0, 0, 0, 0, 0, 0, 203, 204,
5782 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5783 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5784 0, 0, 0, 0, 0, 0, 0, 0, 205, 206,
5785 207, 208, 209, 210, 211, 212, 213, 214, 0, 215,
5786 216, 866, 643, 0, 0, 867, 0, 217, 0, 0,
5787 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5788 0, 0, 0, 0, 0, 188, 189, 190, 191, 192,
5789 193, 194, 195, 196, 0, 0, 197, 198, 0, 0,
5790 0, 0, 199, 200, 201, 202, 0, 0, 0, 0,
5791 0, 0, 0, 0, 0, 0, 203, 204, 0, 0,
5792 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5793 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5794 0, 0, 0, 0, 0, 0, 205, 206, 207, 208,
5795 209, 210, 211, 212, 213, 214, 0, 215, 216, 689,
5796 651, 0, 0, 690, 0, 217, 0, 0, 0, 0,
5797 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5798 0, 0, 0, 188, 189, 190, 191, 192, 193, 194,
5799 195, 196, 0, 0, 197, 198, 0, 0, 0, 0,
5800 199, 200, 201, 202, 0, 0, 0, 0, 0, 0,
5801 0, 0, 0, 0, 203, 204, 0, 0, 0, 0,
5802 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5803 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5804 0, 0, 0, 0, 205, 206, 207, 208, 209, 210,
5805 211, 212, 213, 214, 0, 215, 216, 1028, 643, 0,
5806 0, 1029, 0, 217, 0, 0, 0, 0, 0, 0,
5807 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5808 0, 188, 189, 190, 191, 192, 193, 194, 195, 196,
5809 0, 0, 197, 198, 0, 0, 0, 0, 199, 200,
5810 201, 202, 0, 0, 0, 0, 0, 0, 0, 0,
5811 0, 0, 203, 204, 0, 0, 0, 0, 0, 0,
5812 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5813 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5814 0, 0, 205, 206, 207, 208, 209, 210, 211, 212,
5815 213, 214, 0, 215, 216, 1031, 651, 0, 0, 1032,
5816 0, 217, 0, 0, 0, 0, 0, 0, 0, 0,
5817 0, 0, 0, 0, 0, 0, 0, 0, 0, 188,
5818 189, 190, 191, 192, 193, 194, 195, 196, 0, 0,
5819 197, 198, 0, 0, 0, 0, 199, 200, 201, 202,
5820 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5821 203, 204, 0, 0, 0, 0, 0, 0, 0, 0,
5822 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5823 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5824 205, 206, 207, 208, 209, 210, 211, 212, 213, 214,
5825 0, 215, 216, 1362, 643, 0, 0, 1363, 0, 217,
5826 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5827 0, 0, 0, 0, 0, 0, 0, 188, 189, 190,
5828 191, 192, 193, 194, 195, 196, 0, 0, 197, 198,
5829 0, 0, 0, 0, 199, 200, 201, 202, 0, 0,
5830 0, 0, 0, 0, 0, 0, 0, 0, 203, 204,
5831 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5832 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5833 0, 0, 0, 0, 0, 0, 0, 0, 205, 206,
5834 207, 208, 209, 210, 211, 212, 213, 214, 0, 215,
5835 216, 1365, 651, 0, 0, 1366, 0, 217, 0, 0,
5836 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5837 0, 0, 0, 0, 0, 188, 189, 190, 191, 192,
5838 193, 194, 195, 196, 0, 0, 197, 198, 0, 0,
5839 0, 0, 199, 200, 201, 202, 0, 0, 0, 0,
5840 0, 0, 0, 0, 0, 0, 203, 204, 0, 0,
5841 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5842 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5843 0, 0, 0, 0, 0, 0, 205, 206, 207, 208,
5844 209, 210, 211, 212, 213, 214, 0, 215, 216, 1419,
5845 643, 0, 0, 1420, 0, 217, 0, 0, 0, 0,
5846 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5847 0, 0, 0, 188, 189, 190, 191, 192, 193, 194,
5848 195, 196, 0, 0, 197, 198, 0, 0, 0, 0,
5849 199, 200, 201, 202, 0, 0, 0, 0, 0, 0,
5850 0, 0, 0, 0, 203, 204, 0, 0, 0, 0,
5851 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5852 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5853 0, 0, 0, 0, 205, 206, 207, 208, 209, 210,
5854 211, 212, 213, 214, 0, 215, 216, 0, 0, 0,
5855 0, 0, 0, 217
5856};
5857
5858static const yytype_int16 yycheck[] =
5859{
5860 1, 70, 26, 59, 28, 52, 53, 15, 16, 58,
5861 7, 101, 1, 56, 408, 290, 107, 58, 70, 116,
5862 27, 15, 16, 13, 14, 115, 774, 89, 426, 845,
5863 27, 768, 766, 15, 16, 766, 344, 15, 16, 1070,
5864 400, 349, 7, 469, 601, 571, 89, 575, 255, 575,
5865 252, 52, 53, 54, 55, 107, 84, 30, 601, 81,
5866 104, 58, 27, 107, 477, 108, 109, 110, 599, 615,
5867 111, 602, 54, 693, 694, 21, 54, 55, 63, 64,
5868 65, 855, 15, 16, 67, 113, 512, 296, 1105, 56,
5869 605, 300, 52, 774, 630, 525, 911, 25, 1196, 13,
5870 913, 469, 515, 825, 112, 29, 27, 727, 1034, 477,
5871 1317, 66, 1210, 473, 111, 1220, 1221, 26, 112, 399,
5872 25, 401, 285, 58, 1000, 154, 155, 25, 766, 66,
5873 112, 344, 34, 10, 112, 101, 349, 25, 84, 589,
5874 103, 104, 69, 78, 107, 595, 1335, 100, 949, 0,
5875 52, 682, 52, 25, 66, 26, 56, 247, 15, 13,
5876 13, 81, 98, 1033, 1034, 134, 723, 527, 25, 25,
5877 0, 98, 134, 108, 109, 455, 451, 100, 234, 112,
5878 25, 134, 612, 230, 121, 122, 13, 277, 157, 155,
5879 1066, 68, 472, 155, 474, 1402, 287, 100, 34, 123,
5880 363, 320, 321, 1220, 1221, 480, 141, 119, 483, 121,
5881 122, 134, 25, 488, 101, 1246, 52, 153, 287, 13,
5882 310, 157, 502, 1254, 161, 1256, 1415, 155, 831, 230,
5883 505, 134, 1158, 154, 157, 287, 839, 13, 285, 160,
5884 154, 155, 151, 305, 245, 1350, 160, 255, 528, 257,
5885 155, 252, 274, 13, 255, 977, 1354, 155, 1059, 1007,
5886 1, 255, 305, 257, 66, 266, 151, 155, 155, 1084,
5887 1083, 295, 296, 255, 1011, 257, 300, 266, 302, 257,
5888 151, 679, 484, 155, 285, 307, 157, 713, 1158, 336,
5889 120, 264, 13, 337, 338, 339, 340, 260, 261, 155,
5890 154, 154, 715, 1104, 157, 1106, 160, 160, 583, 669,
5891 155, 52, 53, 13, 829, 56, 363, 119, 854, 1000,
5892 680, 364, 413, 25, 257, 285, 272, 154, 418, 275,
5893 157, 951, 952, 160, 865, 336, 611, 957, 958, 100,
5894 1196, 1157, 155, 1213, 157, 713, 335, 715, 89, 304,
5895 1220, 1221, 1383, 273, 274, 565, 1212, 154, 66, 609,
5896 154, 413, 363, 410, 411, 409, 160, 108, 109, 110,
5897 111, 56, 929, 134, 337, 338, 339, 340, 154, 342,
5898 343, 425, 812, 1157, 160, 1066, 929, 101, 361, 917,
5899 670, 917, 400, 366, 154, 1033, 1034, 364, 161, 400,
5900 160, 681, 403, 363, 401, 706, 400, 657, 834, 410,
5901 411, 119, 687, 663, 664, 961, 13, 1218, 1219, 37,
5902 38, 1041, 541, 1171, 543, 28, 13, 428, 1033, 1034,
5903 100, 1168, 1166, 154, 100, 1166, 737, 1101, 1102, 160,
5904 154, 100, 999, 451, 66, 67, 409, 25, 52, 34,
5905 134, 982, 56, 155, 154, 157, 402, 451, 455, 615,
5906 160, 100, 425, 525, 134, 473, 834, 52, 134, 451,
5907 920, 921, 473, 451, 924, 134, 926, 474, 928, 473,
5908 1350, 482, 525, 484, 759, 458, 459, 494, 69, 230,
5909 1171, 469, 1348, 100, 467, 134, 1352, 494, 1354, 121,
5910 122, 703, 475, 476, 66, 502, 713, 154, 109, 455,
5911 25, 158, 938, 69, 37, 38, 97, 98, 451, 527,
5912 1158, 794, 495, 732, 797, 266, 527, 134, 1166, 494,
5913 503, 528, 155, 527, 512, 134, 154, 693, 694, 789,
5914 141, 97, 98, 793, 285, 755, 756, 25, 600, 66,
5915 612, 1215, 1216, 1158, 100, 768, 134, 154, 859, 121,
5916 122, 774, 124, 160, 305, 554, 1422, 154, 869, 612,
5917 112, 727, 153, 160, 1322, 1213, 154, 155, 1000, 157,
5918 158, 975, 1220, 1221, 997, 1401, 946, 100, 134, 1326,
5919 598, 100, 1340, 601, 335, 336, 871, 153, 599, 1333,
5920 155, 602, 119, 853, 121, 122, 856, 631, 25, 155,
5921 662, 100, 659, 69, 661, 890, 157, 892, 646, 134,
5922 870, 134, 363, 364, 648, 744, 654, 610, 610, 997,
5923 749, 56, 615, 615, 909, 1085, 1086, 1087, 1088, 154,
5924 155, 97, 98, 158, 1066, 134, 154, 134, 649, 69,
5925 1033, 1034, 160, 654, 154, 155, 134, 1188, 659, 1053,
5926 661, 669, 403, 1411, 692, 945, 155, 947, 669, 410,
5927 411, 733, 680, 670, 101, 669, 154, 155, 98, 680,
5928 158, 682, 706, 656, 681, 100, 680, 155, 695, 891,
5929 733, 692, 1000, 742, 152, 1333, 154, 153, 695, 26,
5930 646, 911, 703, 913, 69, 1103, 78, 69, 732, 100,
5931 693, 694, 1350, 737, 100, 100, 69, 134, 968, 134,
5932 683, 971, 1105, 696, 154, 726, 154, 157, 978, 1030,
5933 695, 159, 822, 98, 984, 713, 98, 154, 155, 1122,
5934 155, 158, 69, 134, 727, 98, 1168, 155, 134, 1171,
5935 812, 1173, 69, 1147, 83, 84, 719, 26, 1066, 744,
5936 784, 746, 26, 69, 749, 750, 78, 508, 69, 812,
5937 97, 98, 144, 145, 146, 1158, 768, 874, 344, 725,
5938 97, 98, 774, 349, 525, 603, 69, 1000, 1319, 607,
5939 157, 97, 98, 1000, 69, 951, 952, 98, 1011, 157,
5940 69, 957, 958, 1253, 1105, 69, 157, 100, 137, 138,
5941 1193, 863, 1062, 554, 97, 98, 158, 69, 862, 1217,
5942 864, 69, 97, 98, 151, 134, 153, 1210, 97, 98,
5943 157, 872, 152, 97, 98, 859, 153, 1220, 1221, 69,
5944 841, 134, 843, 1237, 845, 869, 98, 153, 69, 97,
5945 98, 157, 69, 1066, 827, 828, 834, 69, 599, 1066,
5946 159, 602, 835, 836, 865, 157, 1184, 69, 98, 893,
5947 1026, 612, 56, 1083, 1084, 872, 97, 98, 153, 69,
5948 97, 98, 151, 58, 153, 1041, 98, 151, 157, 153,
5949 891, 100, 155, 157, 1195, 97, 98, 1198, 69, 862,
5950 1322, 864, 1324, 78, 1326, 153, 1328, 97, 98, 899,
5951 161, 69, 885, 886, 69, 888, 889, 1218, 659, 966,
5952 661, 929, 78, 967, 69, 134, 97, 98, 69, 981,
5953 1348, 983, 153, 108, 1352, 66, 153, 112, 946, 97,
5954 98, 682, 97, 98, 1219, 946, 155, 1307, 14, 15,
5955 947, 153, 946, 98, 1001, 1168, 97, 98, 1171, 155,
5956 961, 1168, 54, 153, 1171, 966, 1173, 1210, 951, 952,
5957 943, 1184, 64, 65, 957, 958, 106, 1220, 1221, 961,
5958 134, 982, 153, 956, 15, 1407, 17, 134, 119, 1239,
5959 121, 122, 733, 124, 934, 153, 936, 1272, 153, 100,
5960 1001, 1302, 1303, 1304, 967, 134, 1030, 1282, 1000, 160,
5961 100, 1058, 153, 89, 90, 1333, 56, 1335, 25, 1011,
5962 993, 78, 1340, 138, 1299, 1300, 1301, 1345, 1308, 155,
5963 1020, 1021, 155, 134, 158, 1024, 1025, 134, 95, 96,
5964 40, 41, 152, 1026, 134, 1079, 1080, 1048, 52, 1050,
5965 54, 55, 1108, 57, 155, 66, 134, 1058, 1041, 155,
5966 1109, 154, 155, 1364, 158, 155, 1067, 155, 100, 1070,
5967 152, 812, 1073, 52, 1066, 66, 78, 13, 1079, 1080,
5968 155, 1105, 1106, 155, 141, 142, 143, 144, 145, 146,
5969 1091, 1092, 66, 1411, 155, 1413, 134, 1415, 102, 1417,
5970 306, 307, 134, 1146, 155, 155, 1153, 1154, 119, 66,
5971 121, 122, 1159, 1326, 155, 1322, 152, 1324, 1436, 1326,
5972 155, 1328, 1335, 155, 865, 17, 1376, 1340, 119, 762,
5973 121, 122, 25, 766, 155, 1225, 155, 1161, 1185, 1230,
5974 142, 143, 144, 145, 146, 119, 134, 121, 122, 1150,
5975 124, 152, 1153, 1154, 44, 78, 1157, 44, 1159, 55,
5976 155, 1230, 119, 1207, 121, 122, 40, 41, 42, 43,
5977 44, 1195, 95, 96, 1198, 155, 1168, 44, 1230, 1171,
5978 56, 44, 1229, 134, 1185, 8, 52, 1188, 54, 55,
5979 56, 57, 1184, 136, 1218, 159, 15, 1244, 52, 155,
5980 1407, 155, 1415, 155, 101, 155, 52, 155, 54, 55,
5981 56, 57, 58, 155, 1248, 1249, 1250, 1251, 1252, 142,
5982 143, 144, 145, 146, 1267, 966, 152, 155, 1229, 1202,
5983 155, 1232, 78, 1289, 155, 9, 102, 155, 155, 139,
5984 1264, 982, 155, 1244, 1207, 1246, 92, 1248, 1249, 1250,
5985 1251, 1252, 155, 1254, 155, 1256, 102, 693, 694, 1260,
5986 1001, 107, 108, 109, 155, 1266, 52, 1268, 139, 155,
5987 1314, 1315, 155, 709, 710, 155, 930, 931, 1302, 1303,
5988 1304, 52, 152, 1024, 1025, 939, 101, 56, 942, 158,
5989 944, 727, 1033, 1034, 155, 141, 1339, 155, 144, 1307,
5990 52, 160, 54, 55, 56, 57, 1307, 155, 1309, 56,
5991 1311, 1308, 155, 1307, 155, 155, 155, 1058, 1319, 155,
5992 54, 55, 1369, 57, 52, 155, 54, 55, 56, 57,
5993 64, 65, 228, 155, 1326, 231, 232, 233, 155, 155,
5994 1364, 152, 139, 1335, 1378, 1379, 1380, 1381, 1340, 1373,
5995 102, 1314, 1315, 155, 52, 107, 54, 55, 56, 57,
5996 1101, 1102, 155, 155, 1105, 155, 155, 1000, 1369, 157,
5997 155, 155, 1396, 59, 60, 61, 62, 1378, 1379, 1380,
5998 1381, 1122, 1383, 72, 157, 1386, 1387, 266, 1, 1390,
5999 1391, 335, 504, 1394, 1428, 1150, 872, 508, 78, 106,
6000 1401, 110, 15, 16, 108, 1146, 1, 610, 98, 1150,
6001 495, 692, 1153, 1154, 962, 95, 96, 1158, 1159, 755,
6002 15, 16, 1266, 1415, 1268, 1232, 911, 1428, 1429, 1430,
6003 1431, 1432, 981, 1066, 1265, 1184, 1333, 1092, 1439, 52,
6004 53, 1340, 1264, 56, 1185, 1402, 882, 1188, 359, 875,
6005 1401, 1286, 1193, 1209, 67, 1196, 1213, 52, 53, 139,
6006 140, 141, 142, 143, 144, 145, 146, 1213, 1309, 1210,
6007 119, 1212, 67, 1311, 1215, 1216, 89, 111, 543, 1220,
6008 1221, 349, 1066, 115, -1, 1396, -1, -1, 1229, -1,
6009 103, 104, -1, -1, 107, 108, 109, 110, -1, 112,
6010 -1, -1, -1, 1244, -1, -1, -1, -1, 103, 104,
6011 -1, -1, 107, -1, -1, 951, 952, 112, -1, -1,
6012 -1, 957, 958, -1, -1, -1, 1267, -1, -1, 1162,
6013 -1, -1, -1, 1166, -1, 1168, -1, -1, 1171, -1,
6014 1173, -1, 1386, 1387, -1, 1286, 1390, 1391, -1, -1,
6015 1394, 1184, -1, -1, -1, 991, 992, -1, 994, 995,
6016 -1, -1, -1, -1, -1, 52, -1, 54, 55, 56,
6017 57, 58, 468, 469, -1, -1, -1, 768, 1319, -1,
6018 -1, 477, -1, -1, -1, 1429, 1430, 1431, 1432, 780,
6019 -1, 78, -1, -1, -1, 1439, -1, -1, 1339, -1,
6020 -1, -1, -1, -1, -1, 1041, -1, 1348, -1, -1,
6021 -1, 1352, -1, 1354, -1, 102, 512, 230, 1000, 515,
6022 107, 108, 109, -1, -1, -1, -1, -1, 1369, 1065,
6023 -1, -1, -1, -1, -1, 230, -1, -1, -1, -1,
6024 -1, -1, 255, -1, 257, -1, -1, 260, 261, -1,
6025 -1, -1, -1, 266, 141, -1, -1, 144, -1, -1,
6026 255, -1, 257, -1, -1, 260, 261, -1, -1, -1,
6027 -1, 266, 285, -1, -1, -1, -1, -1, -1, -1,
6028 -1, 1422, -1, -1, 1066, -1, -1, -1, -1, 1322,
6029 285, 1324, 305, 1326, 590, 1328, -1, -1, -1, -1,
6030 1333, -1, 1335, -1, -1, -1, -1, 1340, -1, -1,
6031 -1, -1, 1345, -1, 610, -1, -1, -1, -1, 615,
6032 -1, -1, 335, 336, 337, 338, 339, 340, -1, 342,
6033 343, -1, -1, -1, -1, -1, -1, -1, 1033, 1034,
6034 335, 336, 337, 338, 339, 340, -1, 342, 343, -1,
6035 363, 364, -1, -1, -1, -1, -1, -1, -1, -1,
6036 -1, -1, -1, -1, -1, -1, -1, -1, 363, -1,
6037 -1, -1, -1, -1, 1407, -1, -1, -1, 1411, -1,
6038 1413, -1, 1415, -1, 1417, -1, 1168, 400, -1, 1171,
6039 403, 1173, -1, -1, -1, -1, 409, 410, 411, -1,
6040 -1, 697, 1184, 1436, -1, 400, 1101, 1102, 403, 1000,
6041 1105, -1, 425, -1, 409, 410, 411, 713, 1009, 715,
6042 1011, -1, 1013, -1, -1, -1, -1, 1122, -1, 52,
6043 425, 54, 55, 56, 57, 58, -1, -1, 451, -1,
6044 -1, -1, -1, -1, -1, -1, -1, 52, -1, 54,
6045 55, 56, 57, 58, -1, 78, 451, -1, -1, -1,
6046 473, -1, -1, 1158, -1, -1, -1, -1, -1, 92,
6047 -1, -1, -1, 78, -1, 1066, -1, 773, 473, 102,
6048 -1, -1, -1, -1, -1, 108, 109, 92, -1, -1,
6049 -1, -1, -1, -1, -1, 508, -1, 102, 1193, -1,
6050 -1, 1196, 107, 108, 109, 52, 802, 54, 55, 56,
6051 57, 58, 525, 508, 527, 1210, -1, 1212, 141, -1,
6052 1215, 1216, -1, -1, -1, 1220, 1221, -1, -1, -1,
6053 -1, 78, 527, -1, -1, -1, 141, -1, 834, 144,
6054 1322, 554, 1324, -1, 1326, -1, 1328, -1, -1, -1,
6055 -1, -1, 157, 1335, -1, 102, 852, -1, 1340, 554,
6056 -1, 108, 109, 1345, -1, -1, -1, -1, -1, -1,
6057 -1, -1, -1, -1, -1, -1, -1, 1168, -1, -1,
6058 -1, -1, 1173, -1, -1, 598, 599, -1, 601, 602,
6059 1181, 1286, -1, 1184, 141, -1, -1, 610, -1, 612,
6060 -1, -1, 615, 598, 599, -1, 601, 602, -1, -1,
6061 -1, -1, -1, -1, -1, 610, -1, -1, -1, -1,
6062 615, 1033, 1034, -1, -1, 1407, -1, -1, -1, 1411,
6063 -1, 1413, -1, 1415, -1, 1417, -1, -1, -1, -1,
6064 -1, -1, 938, -1, -1, -1, 659, -1, 661, -1,
6065 -1, -1, -1, 1348, 1436, -1, 669, 1352, -1, 1354,
6066 -1, -1, -1, -1, 659, 961, 661, 680, -1, 682,
6067 683, -1, -1, -1, 669, -1, -1, 973, -1, -1,
6068 693, 694, -1, -1, -1, 680, -1, 682, 683, 1101,
6069 1102, -1, -1, 1105, -1, -1, -1, -1, 693, 694,
6070 -1, 997, 1033, 1034, -1, -1, 719, -1, -1, -1,
6071 1122, -1, -1, -1, 727, -1, -1, 1033, 1034, -1,
6072 733, -1, -1, -1, 719, -1, 1022, 1422, -1, -1,
6073 -1, -1, 727, 1324, -1, 1326, -1, 1328, -1, -1,
6074 -1, -1, -1, -1, 1335, -1, 1158, -1, -1, -1,
6075 -1, -1, -1, -1, 1345, -1, -1, -1, -1, -1,
6076 -1, 1057, -1, -1, -1, -1, -1, -1, -1, -1,
6077 1101, 1102, -1, -1, 1105, -1, -1, -1, -1, -1,
6078 -1, 1193, -1, -1, 1196, 1101, 1102, -1, -1, 1105,
6079 -1, 1122, -1, -1, -1, -1, -1, -1, 1210, 812,
6080 1212, -1, -1, 1215, 1216, -1, 1122, -1, 1220, 1221,
6081 -1, -1, -1, -1, -1, -1, 1407, -1, -1, -1,
6082 -1, -1, 1413, -1, 1415, -1, 1417, 1158, -1, -1,
6083 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6084 -1, -1, 1158, -1, -1, 1436, -1, -1, -1, 862,
6085 -1, 864, 865, -1, -1, -1, -1, -1, -1, 1155,
6086 -1, -1, 1193, -1, -1, 1196, -1, 862, -1, 864,
6087 865, -1, -1, -1, 1286, -1, -1, 1193, -1, 1210,
6088 1196, 1212, -1, -1, 1215, 1216, -1, -1, -1, 1220,
6089 1221, -1, -1, -1, 1210, -1, 1212, -1, -1, 1215,
6090 1216, -1, -1, -1, 1220, 1221, -1, -1, -1, -1,
6091 -1, -1, -1, -1, -1, -1, 929, -1, -1, -1,
6092 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6093 -1, -1, -1, 946, 929, -1, 1348, -1, 951, 952,
6094 1352, -1, 1354, -1, 957, 958, -1, -1, -1, -1,
6095 -1, 946, -1, 966, 967, 1286, 951, 952, -1, -1,
6096 -1, -1, 957, 958, -1, 1033, 1034, -1, -1, 982,
6097 1286, 966, 967, -1, -1, -1, -1, -1, -1, -1,
6098 -1, -1, -1, -1, -1, -1, -1, 982, 1001, -1,
6099 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6100 -1, 1, -1, -1, -1, -1, 1001, -1, -1, -1,
6101 1422, 1024, 1025, 1026, -1, 15, 16, 1348, -1, -1,
6102 -1, 1352, -1, 1354, -1, -1, -1, -1, 1041, 1024,
6103 1025, 1026, 1348, 1101, 1102, -1, 1352, 1105, 1354, -1,
6104 -1, -1, -1, -1, -1, 1058, 1041, -1, -1, -1,
6105 -1, -1, 52, 53, 1122, -1, -1, -1, -1, -1,
6106 -1, -1, -1, 1058, -1, -1, -1, 67, -1, -1,
6107 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6108 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6109 1158, 1422, -1, -1, -1, -1, -1, -1, -1, -1,
6110 -1, -1, -1, 103, 104, -1, 1422, 107, -1, -1,
6111 -1, -1, 112, -1, -1, -1, 1033, 1034, -1, -1,
6112 -1, -1, -1, -1, -1, 1193, -1, -1, 1196, -1,
6113 -1, -1, -1, 1146, -1, -1, -1, 1150, -1, -1,
6114 1153, 1154, 1210, -1, 1212, -1, 1159, 1215, 1216, -1,
6115 -1, -1, 1220, 1221, -1, 1150, -1, -1, 1153, 1154,
6116 -1, -1, -1, -1, 1159, -1, -1, -1, -1, -1,
6117 -1, -1, 1185, -1, -1, 1188, -1, -1, -1, -1,
6118 -1, -1, -1, -1, 1101, 1102, -1, -1, 1105, -1,
6119 1185, -1, -1, 1188, 1207, -1, -1, -1, -1, -1,
6120 -1, -1, -1, -1, -1, 1122, -1, -1, -1, -1,
6121 -1, -1, 1207, -1, -1, -1, 1229, -1, 1286, -1,
6122 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6123 230, 1244, -1, -1, 1229, -1, -1, -1, -1, -1,
6124 -1, 1158, -1, -1, -1, -1, -1, -1, -1, 1244,
6125 -1, -1, -1, -1, 1267, 255, -1, 257, -1, -1,
6126 260, 261, -1, -1, -1, -1, 266, -1, -1, -1,
6127 -1, -1, -1, -1, -1, -1, 1193, -1, -1, 1196,
6128 1348, -1, -1, -1, 1352, 285, 1354, -1, -1, -1,
6129 -1, -1, -1, 1210, 1307, 1212, -1, -1, 1215, 1216,
6130 -1, 1314, 1315, 1220, 1221, -1, 1319, -1, 1033, 1034,
6131 -1, -1, 1307, 1, -1, 1033, 1034, -1, -1, 1314,
6132 1315, -1, -1, -1, 1319, -1, 1339, 15, 16, -1,
6133 -1, -1, -1, -1, -1, 335, 336, 337, 338, 339,
6134 340, -1, 342, 343, -1, -1, -1, -1, -1, -1,
6135 -1, -1, -1, -1, 1422, -1, 1369, -1, 1033, 1034,
6136 -1, -1, -1, 363, 52, 53, -1, -1, -1, 1286,
6137 -1, -1, -1, -1, 1369, -1, 1101, 1102, -1, 67,
6138 1105, -1, -1, 1101, 1102, -1, -1, 1105, -1, -1,
6139 -1, -1, -1, -1, -1, -1, -1, 1122, -1, -1,
6140 400, -1, -1, 403, 1122, -1, -1, -1, -1, 409,
6141 410, 411, -1, -1, -1, 103, 104, -1, -1, 107,
6142 -1, -1, -1, -1, 112, 425, 1101, 1102, -1, -1,
6143 1105, 1348, -1, 1158, -1, 1352, -1, 1354, -1, -1,
6144 1158, -1, -1, -1, -1, -1, -1, 1122, -1, -1,
6145 -1, 451, -1, -1, -1, -1, -1, -1, -1, -1,
6146 -1, -1, -1, -1, -1, -1, -1, -1, 1193, -1,
6147 -1, 1196, -1, 473, -1, 1193, -1, -1, 1196, -1,
6148 -1, -1, -1, 1158, -1, 1210, -1, 1212, -1, -1,
6149 1215, 1216, 1210, -1, 1212, 1220, 1221, 1215, 1216, -1,
6150 -1, -1, 1220, 1221, -1, 1422, -1, -1, 508, -1,
6151 -1, -1, -1, -1, -1, -1, -1, -1, 1193, -1,
6152 -1, 1196, -1, -1, -1, -1, -1, 527, -1, -1,
6153 -1, -1, -1, -1, -1, 1210, -1, 1212, -1, -1,
6154 1215, 1216, 230, -1, -1, 1220, 1221, -1, -1, -1,
6155 -1, -1, -1, -1, 554, -1, -1, -1, -1, -1,
6156 -1, 1286, -1, -1, -1, -1, -1, 255, 1286, 257,
6157 -1, -1, 260, 261, -1, -1, -1, -1, 266, -1,
6158 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6159 -1, -1, -1, -1, -1, -1, -1, 285, 598, 599,
6160 -1, 601, 602, -1, -1, -1, -1, -1, -1, -1,
6161 610, 1286, -1, -1, -1, 615, -1, -1, -1, -1,
6162 -1, -1, -1, 1348, -1, -1, -1, 1352, -1, 1354,
6163 1348, -1, -1, -1, 1352, -1, 1354, -1, -1, -1,
6164 -1, -1, -1, -1, -1, -1, -1, 335, 336, 337,
6165 338, 339, 340, -1, 342, 343, -1, -1, -1, 659,
6166 -1, 661, -1, -1, -1, -1, -1, -1, -1, 669,
6167 -1, -1, -1, 1348, -1, 363, -1, 1352, -1, 1354,
6168 680, -1, 682, 683, -1, -1, -1, -1, -1, -1,
6169 -1, -1, -1, 693, 694, -1, -1, 1422, -1, -1,
6170 -1, -1, -1, -1, 1422, -1, -1, -1, -1, -1,
6171 -1, -1, 400, -1, -1, 403, -1, -1, -1, 719,
6172 -1, 409, 410, 411, -1, -1, -1, 727, -1, -1,
6173 -1, -1, -1, -1, -1, -1, -1, 425, -1, -1,
6174 -1, -1, -1, -1, -1, -1, -1, 1422, -1, -1,
6175 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6176 -1, -1, -1, 451, -1, -1, -1, -1, -1, -1,
6177 -1, -1, -1, -1, 0, -1, -1, -1, -1, -1,
6178 1, -1, 8, 9, 10, 473, -1, 13, 14, 15,
6179 -1, 17, -1, -1, 15, 16, -1, -1, -1, 25,
6180 26, 27, -1, -1, -1, -1, -1, -1, -1, -1,
6181 -1, 37, 38, -1, 40, 41, 42, 43, 44, -1,
6182 508, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6183 -1, 52, 53, -1, -1, 56, -1, -1, -1, 527,
6184 -1, -1, 68, 69, -1, -1, -1, -1, -1, -1,
6185 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6186 -1, -1, 862, -1, 864, 865, 554, -1, 89, -1,
6187 -1, 97, 98, -1, -1, -1, -1, -1, -1, -1,
6188 -1, -1, -1, -1, -1, -1, -1, 108, 109, 110,
6189 -1, 112, -1, -1, 120, -1, -1, -1, -1, -1,
6190 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6191 598, 599, -1, 601, 602, -1, -1, -1, -1, -1,
6192 -1, -1, 610, -1, -1, 151, 152, 615, 154, 929,
6193 -1, 157, 158, -1, 160, -1, -1, -1, -1, -1,
6194 -1, -1, -1, -1, -1, -1, 946, -1, -1, -1,
6195 -1, 951, 952, -1, -1, -1, -1, 957, 958, -1,
6196 -1, -1, 1, -1, -1, -1, 966, 967, -1, -1,
6197 -1, 659, -1, 661, -1, -1, 15, 16, -1, -1,
6198 -1, 669, 982, -1, -1, -1, -1, -1, -1, -1,
6199 -1, -1, 680, -1, 682, 683, -1, -1, -1, -1,
6200 -1, 1001, -1, -1, -1, 693, 694, -1, -1, 230,
6201 -1, -1, -1, 52, 53, -1, -1, 56, -1, -1,
6202 -1, -1, -1, -1, 1024, 1025, 1026, -1, -1, -1,
6203 -1, 719, -1, -1, 255, -1, 257, -1, -1, 727,
6204 -1, 1041, -1, -1, -1, 266, -1, -1, 25, -1,
6205 89, -1, -1, -1, -1, -1, -1, -1, 1058, -1,
6206 -1, -1, -1, -1, 285, -1, -1, -1, -1, 108,
6207 109, 110, -1, 112, -1, -1, -1, -1, -1, -1,
6208 -1, -1, -1, -1, 305, -1, -1, -1, -1, -1,
6209 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6210 -1, 78, 79, 80, 81, 82, 83, 84, 85, 86,
6211 87, 88, 89, 90, 335, 336, -1, -1, 95, 96,
6212 -1, -1, -1, -1, 101, -1, -1, -1, -1, -1,
6213 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6214 -1, -1, 363, 364, -1, -1, -1, -1, -1, -1,
6215 1150, -1, -1, 1153, 1154, -1, -1, -1, 135, 1159,
6216 137, 138, 139, 140, 141, 142, 143, 144, 145, 146,
6217 -1, -1, -1, -1, 862, -1, 864, 865, -1, 400,
6218 -1, -1, 403, -1, -1, 1185, -1, -1, 1188, 410,
6219 411, 230, -1, -1, -1, -1, -1, -1, -1, -1,
6220 -1, -1, -1, -1, -1, -1, -1, 1207, -1, -1,
6221 -1, -1, -1, -1, -1, -1, 255, -1, 257, -1,
6222 -1, -1, -1, -1, -1, -1, -1, 266, -1, 1229,
6223 451, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6224 -1, 929, -1, -1, 1244, -1, 285, -1, -1, -1,
6225 -1, -1, 473, -1, -1, -1, -1, -1, 946, -1,
6226 -1, -1, -1, 951, 952, -1, 305, -1, -1, 957,
6227 958, -1, -1, -1, -1, -1, -1, -1, 966, 967,
6228 -1, -1, -1, -1, -1, -1, -1, 508, -1, -1,
6229 -1, -1, -1, -1, 982, -1, 335, 336, -1, -1,
6230 -1, -1, -1, -1, 525, -1, 527, 1307, -1, -1,
6231 -1, -1, -1, 1001, 1314, 1315, -1, -1, -1, 1319,
6232 -1, -1, -1, -1, 363, 364, -1, -1, -1, -1,
6233 -1, -1, -1, 554, -1, -1, 1024, 1025, 1026, -1,
6234 -1, -1, 78, 79, 80, 81, 82, 83, 84, 85,
6235 -1, 87, 88, 1041, -1, -1, -1, -1, -1, 95,
6236 96, 400, -1, -1, 403, -1, -1, -1, -1, 1369,
6237 1058, 410, 411, -1, -1, -1, -1, -1, 599, -1,
6238 -1, 602, -1, -1, -1, -1, -1, -1, -1, -1,
6239 -1, 612, -1, -1, 615, -1, -1, 33, 34, 35,
6240 36, 137, 138, 139, 140, 141, 142, 143, 144, 145,
6241 146, -1, 451, 49, 50, 51, -1, -1, -1, -1,
6242 -1, -1, -1, 59, 60, 61, 62, 63, -1, -1,
6243 -1, -1, -1, -1, 473, -1, -1, -1, 659, -1,
6244 661, -1, -1, -1, 1, -1, -1, -1, 669, -1,
6245 -1, -1, -1, -1, -1, -1, -1, -1, -1, 680,
6246 -1, 682, 1150, -1, -1, 1153, 1154, -1, -1, 508,
6247 -1, 1159, 693, 694, 110, 111, 112, 113, 114, 115,
6248 116, 117, 118, -1, -1, -1, 525, -1, 527, -1,
6249 -1, -1, -1, -1, -1, 52, 53, 1185, -1, 56,
6250 1188, -1, -1, -1, -1, -1, 727, -1, -1, -1,
6251 -1, 147, 733, -1, -1, 554, -1, -1, -1, 1207,
6252 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6253 -1, -1, 89, -1, -1, -1, -1, -1, -1, -1,
6254 -1, 1229, -1, -1, -1, -1, -1, -1, -1, -1,
6255 -1, 108, 109, 110, -1, -1, 1244, -1, -1, -1,
6256 599, -1, -1, 602, -1, 44, -1, -1, -1, -1,
6257 -1, -1, -1, 612, -1, -1, 615, -1, -1, -1,
6258 -1, -1, 1, -1, -1, -1, -1, -1, -1, -1,
6259 -1, 812, -1, -1, -1, -1, -1, -1, -1, 78,
6260 79, 80, 81, 82, 83, 84, 85, 86, 87, 88,
6261 89, 90, -1, -1, -1, -1, 95, 96, -1, 1307,
6262 659, -1, 661, -1, -1, -1, 1314, 1315, -1, -1,
6263 669, 1319, -1, 52, 53, -1, -1, 56, -1, -1,
6264 -1, 680, -1, 682, 865, -1, -1, -1, -1, -1,
6265 -1, -1, -1, -1, 693, 694, 135, -1, 137, 138,
6266 139, 140, 141, 142, 143, 144, 145, 146, -1, -1,
6267 89, -1, -1, 230, -1, -1, 155, -1, -1, -1,
6268 -1, 1369, -1, -1, -1, -1, -1, -1, 727, 108,
6269 109, 110, 111, -1, 733, -1, -1, -1, -1, -1,
6270 -1, -1, -1, -1, -1, -1, -1, -1, -1, 266,
6271 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6272 -1, -1, -1, -1, -1, 946, -1, -1, 285, -1,
6273 951, 952, -1, -1, -1, -1, 957, 958, -1, -1,
6274 -1, -1, -1, -1, -1, 966, -1, -1, 305, -1,
6275 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6276 -1, 982, -1, -1, -1, -1, -1, -1, -1, -1,
6277 -1, -1, -1, 812, -1, -1, -1, -1, 335, 336,
6278 1001, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6279 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6280 -1, -1, -1, 1024, 1025, 1026, 363, 364, -1, -1,
6281 -1, 230, 78, 79, 80, 81, 82, 83, 84, -1,
6282 1041, 87, 88, -1, -1, -1, 865, -1, -1, 95,
6283 96, -1, -1, -1, -1, -1, -1, 1058, -1, -1,
6284 -1, -1, -1, -1, -1, -1, 403, 266, -1, -1,
6285 -1, -1, -1, 410, 411, -1, -1, -1, -1, 44,
6286 -1, -1, -1, -1, -1, -1, 285, -1, -1, -1,
6287 -1, 137, 138, 139, 140, 141, 142, 143, 144, 145,
6288 146, -1, -1, -1, -1, -1, 305, -1, -1, -1,
6289 -1, -1, -1, 78, 79, 80, 81, 82, 83, 84,
6290 85, 86, 87, 88, 89, 90, -1, 946, -1, -1,
6291 95, 96, 951, 952, -1, -1, 335, 336, 957, 958,
6292 -1, -1, -1, 1, -1, 1146, -1, 966, -1, 1150,
6293 -1, -1, 1153, 1154, -1, -1, -1, -1, 1159, -1,
6294 -1, -1, -1, 982, 363, 364, -1, -1, -1, -1,
6295 135, 508, 137, 138, 139, 140, 141, 142, 143, 144,
6296 145, 146, 1001, -1, 1185, -1, -1, 1188, 525, -1,
6297 -1, -1, -1, -1, 52, 53, -1, -1, -1, -1,
6298 -1, -1, -1, -1, 403, 1024, 1025, 1026, -1, -1,
6299 -1, 410, 411, -1, -1, -1, -1, 554, 33, 34,
6300 35, 36, 1041, -1, -1, -1, -1, -1, 1229, -1,
6301 -1, -1, -1, -1, 49, 50, 51, 52, -1, 1058,
6302 -1, 56, 1, 1244, 59, 60, 61, 62, 63, -1,
6303 108, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6304 -1, -1, 599, -1, -1, 602, 1267, -1, -1, -1,
6305 -1, -1, -1, -1, -1, 612, 91, 92, 615, -1,
6306 -1, -1, -1, -1, 99, -1, -1, 102, -1, 104,
6307 105, -1, 107, 52, 53, 110, 111, 112, 113, 114,
6308 115, 116, 117, 118, -1, -1, 1307, -1, -1, 508,
6309 -1, -1, -1, -1, -1, -1, -1, -1, 1319, -1,
6310 -1, -1, 659, -1, 661, 140, 525, 1146, -1, -1,
6311 -1, 1150, 147, -1, 1153, 1154, -1, -1, 1339, 154,
6312 1159, -1, -1, -1, -1, 682, -1, -1, -1, -1,
6313 -1, -1, -1, -1, -1, 554, 693, 694, -1, -1,
6314 -1, -1, -1, -1, -1, -1, 1185, -1, 1369, 1188,
6315 -1, -1, 230, -1, 78, 79, 80, 81, 82, 83,
6316 84, 85, 86, 87, 88, 89, 90, -1, -1, -1,
6317 727, 95, 96, -1, -1, -1, 733, -1, -1, -1,
6318 599, -1, -1, 602, -1, 742, -1, -1, 266, -1,
6319 1229, -1, -1, 612, -1, -1, -1, -1, -1, -1,
6320 -1, -1, -1, -1, -1, 1244, -1, 285, -1, -1,
6321 -1, 135, -1, 137, 138, 139, 140, 141, 142, 143,
6322 144, 145, 146, -1, -1, -1, -1, -1, 1267, -1,
6323 154, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6324 659, -1, 661, -1, -1, -1, -1, -1, -1, -1,
6325 -1, 230, -1, -1, -1, 812, -1, 335, 336, -1,
6326 -1, -1, -1, 682, -1, -1, -1, -1, 1307, -1,
6327 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6328 1319, -1, -1, -1, -1, 363, -1, 266, -1, -1,
6329 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6330 1339, -1, -1, -1, -1, -1, 285, -1, 865, -1,
6331 -1, -1, -1, -1, 733, -1, -1, -1, -1, -1,
6332 -1, -1, -1, -1, -1, 403, -1, -1, -1, -1,
6333 1369, -1, 410, 411, -1, -1, -1, -1, -1, -1,
6334 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6335 -1, -1, -1, -1, -1, -1, 335, 336, -1, -1,
6336 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6337 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6338 -1, -1, -1, -1, 363, -1, -1, -1, -1, -1,
6339 -1, -1, -1, 812, 951, 952, -1, -1, -1, -1,
6340 957, 958, -1, -1, -1, -1, -1, -1, -1, 966,
6341 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6342 -1, -1, -1, -1, 403, 982, -1, -1, -1, -1,
6343 508, 410, 411, -1, 33, 34, 35, 36, -1, -1,
6344 -1, -1, -1, -1, 1001, -1, 865, -1, -1, -1,
6345 49, 50, 51, 52, -1, -1, -1, 56, -1, 58,
6346 59, 60, 61, 62, 63, -1, -1, 1024, 1025, 1026,
6347 -1, -1, -1, -1, -1, -1, 554, -1, -1, 78,
6348 -1, -1, -1, -1, 1041, -1, -1, -1, -1, -1,
6349 -1, -1, 91, 92, -1, -1, -1, -1, -1, -1,
6350 99, 1058, -1, 102, -1, 104, 105, -1, 107, 108,
6351 -1, 110, 111, 112, 113, 114, 115, 116, 117, 118,
6352 -1, 599, -1, -1, 602, -1, -1, -1, -1, 508,
6353 -1, -1, -1, -1, -1, -1, -1, 615, -1, -1,
6354 -1, 140, -1, -1, -1, -1, -1, 966, 147, -1,
6355 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6356 -1, -1, -1, 982, -1, -1, -1, -1, -1, -1,
6357 -1, -1, -1, -1, -1, 554, -1, -1, -1, -1,
6358 -1, 659, 1001, 661, -1, -1, -1, -1, -1, 1146,
6359 -1, -1, -1, 1150, -1, -1, 1153, 1154, -1, -1,
6360 -1, -1, 1159, -1, 682, 1024, 1025, -1, -1, -1,
6361 -1, -1, -1, -1, -1, 693, 694, -1, -1, -1,
6362 599, -1, -1, 602, -1, -1, -1, -1, 1185, -1,
6363 -1, 1188, -1, -1, -1, -1, 615, -1, -1, 1058,
6364 33, 34, 35, 36, -1, -1, -1, -1, -1, 727,
6365 -1, -1, -1, -1, -1, -1, 49, 50, 51, 52,
6366 -1, -1, -1, 56, -1, -1, 59, 60, 61, 62,
6367 63, -1, 1229, -1, -1, -1, -1, -1, -1, -1,
6368 659, -1, 661, -1, -1, -1, -1, 1244, -1, -1,
6369 -1, -1, -1, -1, -1, -1, -1, -1, 91, 92,
6370 -1, -1, -1, 682, -1, -1, 99, -1, -1, 102,
6371 1267, 104, 105, -1, 693, 694, -1, 110, 111, 112,
6372 113, 114, 115, 116, 117, 118, -1, 1146, -1, -1,
6373 -1, 1150, -1, -1, 1153, 1154, -1, -1, -1, -1,
6374 1159, -1, -1, -1, -1, -1, -1, 140, 727, -1,
6375 -1, -1, -1, -1, 147, 78, 79, 80, 81, 82,
6376 83, 84, 1319, -1, 87, 88, 1185, -1, -1, 1188,
6377 -1, -1, 95, 96, -1, 33, 34, 35, 36, -1,
6378 -1, -1, 1339, -1, -1, -1, -1, 865, -1, -1,
6379 -1, 49, 50, 51, 52, -1, -1, -1, 56, -1,
6380 -1, 59, 60, 61, 62, 63, -1, -1, -1, -1,
6381 1229, -1, 1369, -1, 137, 138, 139, 140, 141, 142,
6382 143, 144, 145, 146, -1, 1244, -1, -1, -1, -1,
6383 -1, -1, -1, 91, 92, -1, -1, -1, -1, -1,
6384 -1, 99, -1, -1, 102, -1, 104, 105, 1267, 107,
6385 -1, -1, 110, 111, 112, 113, 114, 115, 116, 117,
6386 118, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6387 -1, -1, -1, 951, 952, -1, -1, -1, -1, 957,
6388 958, -1, 140, -1, -1, -1, 865, -1, 966, 147,
6389 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6390 1319, -1, -1, -1, 982, -1, -1, -1, -1, -1,
6391 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6392 1339, -1, -1, 1001, -1, -1, -1, -1, -1, -1,
6393 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6394 -1, -1, 15, 16, -1, -1, 1024, 1025, 1026, -1,
6395 1369, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6396 -1, -1, -1, 1041, -1, -1, -1, -1, -1, -1,
6397 -1, -1, 951, 952, 47, 48, 49, 50, 957, 958,
6398 1058, 54, 55, -1, -1, -1, -1, 966, -1, -1,
6399 -1, -1, -1, -1, 67, 68, -1, -1, -1, -1,
6400 52, 53, -1, 982, 56, -1, -1, -1, -1, -1,
6401 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6402 -1, -1, 1001, -1, 76, 77, 78, 79, 80, 81,
6403 82, 83, 84, -1, -1, 87, 88, -1, -1, 112,
6404 -1, 93, 94, 95, 96, 1024, 1025, 1026, -1, -1,
6405 -1, -1, -1, -1, -1, 107, 108, -1, -1, -1,
6406 -1, -1, 1041, -1, -1, -1, -1, -1, 1146, -1,
6407 -1, -1, 1150, -1, -1, 1153, 1154, -1, -1, 1058,
6408 -1, 1159, -1, -1, -1, 137, 138, 139, 140, 141,
6409 142, 143, 144, 145, 146, -1, 148, 149, -1, -1,
6410 -1, -1, -1, -1, 156, 157, -1, 1185, -1, -1,
6411 1188, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6412 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6413 -1, -1, -1, -1, -1, -1, 78, 79, 80, 81,
6414 82, 83, 84, 85, 86, 87, 88, 89, 90, -1,
6415 -1, 1229, -1, 95, 96, 228, -1, -1, 231, 232,
6416 233, -1, 235, -1, -1, -1, 1244, -1, -1, -1,
6417 -1, 1150, -1, -1, 1153, 1154, -1, -1, -1, -1,
6418 1159, -1, 255, -1, 257, -1, -1, -1, 52, 53,
6419 -1, -1, 56, 135, -1, 137, 138, 139, 140, 141,
6420 142, 143, 144, 145, 146, -1, 1185, -1, -1, 1188,
6421 -1, -1, 76, 77, 78, 79, 80, 81, 82, 83,
6422 84, -1, -1, 87, 88, -1, -1, -1, -1, 93,
6423 94, 95, 96, -1, -1, -1, -1, -1, -1, -1,
6424 -1, 1319, -1, 107, 108, -1, -1, -1, -1, -1,
6425 1229, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6426 -1, -1, -1, -1, -1, 1244, -1, -1, -1, -1,
6427 -1, -1, -1, 137, 138, 139, 140, 141, 142, 143,
6428 144, 145, 146, -1, 148, 149, -1, -1, -1, -1,
6429 -1, 1369, 156, -1, -1, 368, 369, 370, 371, 372,
6430 -1, -1, 375, 376, 377, 378, 379, 380, 381, 382,
6431 -1, 384, -1, -1, 387, 388, 389, 390, 391, 392,
6432 393, 394, 395, 396, 52, 53, -1, 400, 56, -1,
6433 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6434 1319, -1, -1, -1, -1, -1, -1, -1, 76, 77,
6435 78, 79, 80, 81, 82, 83, 84, -1, -1, 87,
6436 88, -1, -1, -1, -1, 93, 94, 95, 96, -1,
6437 -1, -1, -1, -1, -1, -1, -1, -1, 451, 107,
6438 108, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6439 1369, -1, -1, -1, -1, 468, 469, -1, -1, -1,
6440 473, -1, -1, -1, 477, -1, 479, -1, -1, 137,
6441 138, 139, 140, 141, 142, 143, 144, 145, 146, -1,
6442 148, 149, -1, -1, 497, -1, -1, -1, 156, -1,
6443 -1, -1, -1, -1, -1, -1, -1, -1, -1, 512,
6444 -1, -1, 515, -1, 0, 1, -1, 3, 4, 5,
6445 6, 7, -1, -1, 527, 11, 12, -1, -1, -1,
6446 16, -1, 18, 19, 20, 21, 22, 23, 24, -1,
6447 -1, -1, 545, -1, 30, 31, 32, 33, 34, 35,
6448 36, -1, -1, 39, -1, -1, -1, -1, -1, 45,
6449 46, 47, 48, 49, 50, 51, 52, 53, 54, 55,
6450 56, 57, -1, 59, 60, 61, 62, 63, 64, 65,
6451 -1, -1, -1, -1, -1, -1, -1, 590, -1, -1,
6452 76, 77, -1, -1, -1, 598, -1, -1, 601, -1,
6453 -1, -1, -1, -1, -1, 91, 92, 610, -1, -1,
6454 -1, -1, 615, 99, -1, -1, 102, 103, 104, 105,
6455 -1, 107, -1, -1, 110, 111, 112, 113, 114, 115,
6456 116, 117, 118, -1, 120, -1, -1, 78, 79, 80,
6457 81, 82, 83, 84, 85, 86, 87, 88, 89, 90,
6458 -1, -1, -1, -1, 95, 96, -1, -1, -1, -1,
6459 -1, 147, 148, 149, -1, -1, 669, -1, 154, -1,
6460 -1, -1, -1, -1, 160, -1, -1, 680, -1, -1,
6461 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6462 693, 694, -1, -1, 697, 698, 137, 138, 139, 140,
6463 141, 142, 143, 144, 145, 146, 709, 710, -1, -1,
6464 713, -1, 715, -1, -1, -1, -1, -1, -1, 722,
6465 723, -1, -1, -1, 727, -1, -1, -1, -1, -1,
6466 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6467 -1, 0, 1, -1, 3, 4, 5, 6, 7, 8,
6468 9, 10, 11, 12, -1, 14, 15, 16, 17, 18,
6469 19, 20, 21, 22, 23, 24, 25, -1, -1, -1,
6470 773, 30, 31, 32, 33, 34, 35, 36, -1, -1,
6471 39, -1, -1, -1, -1, -1, 45, 46, 47, 48,
6472 49, 50, 51, 52, 53, 54, 55, 56, 57, 802,
6473 59, 60, 61, 62, 63, 64, 65, -1, -1, 68,
6474 -1, -1, -1, -1, -1, -1, -1, 76, 77, -1,
6475 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6476 -1, 834, 91, 92, -1, -1, -1, -1, -1, -1,
6477 99, -1, -1, 102, 103, 104, 105, -1, 107, 852,
6478 -1, 110, 111, 112, 113, 114, 115, 116, 117, 118,
6479 -1, 120, -1, -1, -1, -1, -1, -1, -1, -1,
6480 -1, -1, -1, -1, -1, -1, -1, -1, -1, 882,
6481 -1, -1, -1, -1, -1, -1, -1, -1, 147, 148,
6482 149, -1, -1, 152, -1, -1, -1, -1, -1, 158,
6483 -1, 160, -1, -1, -1, -1, -1, -1, -1, -1,
6484 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6485 -1, -1, -1, -1, -1, -1, 929, -1, -1, -1,
6486 -1, -1, -1, -1, -1, 938, -1, -1, -1, -1,
6487 -1, -1, -1, 946, -1, -1, -1, 950, 951, 952,
6488 -1, -1, -1, -1, 957, 958, -1, -1, 961, -1,
6489 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6490 973, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6491 -1, -1, -1, -1, -1, -1, -1, -1, 991, 992,
6492 -1, 994, 995, -1, 997, -1, 999, -1, -1, -1,
6493 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6494 -1, -1, -1, -1, -1, 1018, 1019, -1, -1, 1022,
6495 -1, -1, -1, 1026, 1027, 0, 1, -1, 3, 4,
6496 5, 6, 7, -1, -1, -1, 11, 12, 1041, -1,
6497 -1, 16, -1, 18, 19, 20, 21, 22, 23, 24,
6498 -1, -1, -1, -1, 1057, 30, 31, 32, 33, 34,
6499 35, 36, 1065, -1, 39, -1, -1, -1, -1, -1,
6500 45, 46, 47, 48, 49, 50, 51, 52, 53, 54,
6501 55, 56, 57, -1, 59, 60, 61, 62, 63, 64,
6502 65, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6503 -1, 76, 77, -1, -1, -1, -1, -1, -1, -1,
6504 -1, -1, -1, -1, -1, -1, 91, 92, -1, -1,
6505 -1, -1, -1, -1, 99, -1, -1, 102, 103, 104,
6506 105, -1, 107, -1, -1, 110, 111, 112, 113, 114,
6507 115, 116, 117, 118, -1, -1, -1, -1, -1, -1,
6508 -1, -1, 1155, -1, -1, -1, -1, -1, -1, -1,
6509 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6510 -1, -1, 147, 148, 149, -1, -1, 0, 1, 154,
6511 3, 4, 5, 6, 7, 160, -1, -1, 11, 12,
6512 -1, -1, -1, 16, -1, 18, 19, 20, 21, 22,
6513 23, 24, -1, -1, -1, -1, -1, 30, 31, 32,
6514 33, 34, 35, 36, -1, -1, 39, -1, -1, -1,
6515 -1, -1, 45, 46, 47, 48, 49, 50, 51, 52,
6516 53, 54, 55, 56, 57, -1, 59, 60, 61, 62,
6517 63, 64, 65, -1, -1, -1, -1, -1, -1, -1,
6518 -1, -1, -1, 76, 77, -1, -1, -1, -1, -1,
6519 -1, -1, -1, -1, -1, -1, -1, -1, 91, 92,
6520 -1, -1, -1, -1, -1, -1, 99, -1, -1, 102,
6521 103, 104, 105, -1, 107, -1, -1, 110, 111, 112,
6522 113, 114, 115, 116, 117, 118, -1, -1, -1, -1,
6523 -1, -1, -1, -1, 1307, 0, -1, -1, -1, -1,
6524 -1, -1, -1, 8, 9, 10, -1, -1, 13, 14,
6525 15, -1, 17, -1, 147, 148, 149, -1, -1, 152,
6526 25, 26, 27, 28, 29, -1, -1, 160, -1, -1,
6527 -1, -1, 37, 38, -1, 40, 41, 42, 43, 44,
6528 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6529 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6530 -1, -1, -1, 68, 69, -1, -1, -1, -1, -1,
6531 -1, -1, -1, 78, 79, 80, 81, 82, 83, 84,
6532 85, 86, 87, 88, 89, 90, -1, -1, -1, -1,
6533 95, 96, 97, 98, -1, 100, 101, -1, -1, -1,
6534 -1, 106, -1, -1, -1, -1, -1, -1, -1, -1,
6535 -1, -1, -1, -1, -1, 120, -1, -1, 123, -1,
6536 -1, -1, -1, -1, -1, -1, -1, -1, -1, 134,
6537 135, 136, 137, 138, 139, 140, 141, 142, 143, 144,
6538 145, 146, -1, -1, -1, -1, 151, 152, 153, 154,
6539 155, 0, -1, 158, 159, 160, -1, -1, -1, 8,
6540 9, 10, -1, -1, 13, 14, 15, -1, 17, -1,
6541 -1, -1, -1, -1, -1, -1, 25, -1, 27, 28,
6542 29, -1, -1, -1, -1, -1, -1, -1, 37, 38,
6543 -1, 40, 41, 42, 43, 44, -1, -1, -1, -1,
6544 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6545 -1, -1, -1, -1, -1, -1, -1, -1, -1, 68,
6546 69, -1, -1, -1, -1, -1, -1, -1, -1, 78,
6547 79, 80, 81, 82, 83, 84, 85, 86, 87, 88,
6548 89, 90, -1, -1, -1, -1, 95, 96, 97, 98,
6549 -1, 100, 101, -1, -1, -1, -1, 106, -1, -1,
6550 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6551 -1, 120, -1, -1, 123, -1, -1, -1, -1, -1,
6552 -1, -1, -1, -1, -1, 134, 135, 136, 137, 138,
6553 139, 140, 141, 142, 143, 144, 145, 146, -1, -1,
6554 -1, -1, -1, 152, 153, 154, 155, 0, -1, 158,
6555 159, 160, -1, -1, -1, 8, 9, 10, -1, -1,
6556 13, 14, 15, -1, 17, -1, -1, -1, -1, -1,
6557 -1, -1, 25, -1, 27, 28, 29, -1, -1, -1,
6558 -1, -1, -1, -1, 37, 38, -1, 40, 41, 42,
6559 43, 44, -1, -1, -1, -1, -1, -1, -1, -1,
6560 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6561 -1, -1, -1, -1, -1, 68, 69, -1, -1, -1,
6562 -1, -1, -1, -1, -1, 78, 79, 80, 81, 82,
6563 83, 84, 85, 86, 87, 88, 89, 90, -1, -1,
6564 -1, -1, 95, 96, 97, 98, -1, 100, 101, -1,
6565 -1, -1, -1, 106, -1, -1, -1, -1, -1, -1,
6566 -1, -1, -1, -1, -1, -1, -1, 120, -1, -1,
6567 123, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6568 -1, 134, 135, 136, 137, 138, 139, 140, 141, 142,
6569 143, 144, 145, 146, -1, -1, -1, -1, -1, 152,
6570 153, 154, 155, 0, -1, 158, 159, 160, -1, -1,
6571 -1, 8, 9, 10, -1, -1, 13, 14, 15, -1,
6572 17, -1, -1, -1, -1, -1, -1, -1, 25, 26,
6573 27, 28, 29, -1, -1, -1, -1, -1, -1, -1,
6574 37, 38, -1, 40, 41, 42, 43, 44, -1, -1,
6575 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6576 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6577 -1, 68, 69, -1, -1, -1, -1, -1, -1, -1,
6578 -1, 78, 79, 80, 81, 82, 83, 84, 85, 86,
6579 87, 88, 89, 90, -1, -1, -1, -1, 95, 96,
6580 97, 98, -1, -1, 101, -1, -1, -1, -1, 106,
6581 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6582 -1, -1, -1, 120, -1, -1, 123, -1, -1, -1,
6583 -1, -1, -1, -1, -1, -1, -1, -1, 135, 136,
6584 137, 138, 139, 140, 141, 142, 143, 144, 145, 146,
6585 -1, -1, -1, -1, 151, 152, 153, 154, 155, 0,
6586 -1, 158, 159, 160, -1, -1, -1, 8, 9, 10,
6587 -1, -1, 13, 14, 15, -1, 17, -1, -1, -1,
6588 -1, -1, -1, -1, 25, 26, 27, 28, 29, -1,
6589 -1, -1, -1, -1, -1, -1, 37, 38, -1, 40,
6590 41, 42, 43, 44, -1, -1, -1, -1, -1, -1,
6591 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6592 -1, -1, -1, -1, -1, -1, -1, 68, 69, -1,
6593 -1, -1, -1, -1, -1, -1, -1, 78, 79, 80,
6594 81, 82, 83, 84, 85, 86, 87, 88, 89, 90,
6595 -1, -1, -1, -1, 95, 96, 97, 98, -1, -1,
6596 101, -1, -1, -1, -1, 106, -1, -1, -1, -1,
6597 -1, -1, -1, -1, -1, -1, -1, -1, -1, 120,
6598 -1, -1, 123, -1, -1, -1, -1, -1, -1, -1,
6599 -1, -1, -1, -1, 135, 136, 137, 138, 139, 140,
6600 141, 142, 143, 144, 145, 146, -1, -1, -1, -1,
6601 151, 152, 153, 154, 155, 0, -1, 158, 159, 160,
6602 -1, -1, -1, 8, 9, 10, -1, -1, 13, 14,
6603 15, -1, 17, -1, -1, -1, -1, -1, -1, -1,
6604 25, 26, 27, 28, -1, -1, -1, -1, -1, -1,
6605 -1, -1, 37, 38, -1, 40, 41, 42, 43, 44,
6606 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6607 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6608 -1, -1, -1, 68, 69, -1, -1, -1, -1, -1,
6609 -1, -1, -1, 78, 79, 80, 81, 82, 83, 84,
6610 85, 86, 87, 88, 89, 90, -1, -1, -1, -1,
6611 95, 96, 97, 98, -1, -1, 101, -1, -1, -1,
6612 -1, 106, -1, -1, -1, -1, -1, -1, -1, -1,
6613 -1, -1, -1, -1, -1, 120, -1, -1, -1, -1,
6614 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6615 135, -1, 137, 138, 139, 140, 141, 142, 143, 144,
6616 145, 146, -1, -1, -1, -1, 151, 152, 153, 154,
6617 155, 0, 157, 158, 159, 160, -1, -1, -1, 8,
6618 9, 10, -1, -1, 13, 14, 15, -1, 17, -1,
6619 -1, -1, -1, -1, -1, -1, 25, -1, 27, 28,
6620 29, -1, -1, -1, -1, -1, -1, -1, 37, 38,
6621 -1, 40, 41, 42, 43, 44, -1, -1, -1, -1,
6622 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6623 -1, -1, -1, -1, -1, -1, -1, -1, -1, 68,
6624 69, -1, -1, -1, -1, -1, -1, -1, -1, 78,
6625 79, 80, 81, 82, 83, 84, 85, 86, 87, 88,
6626 89, 90, -1, -1, -1, -1, 95, 96, 97, 98,
6627 -1, -1, 101, -1, -1, -1, -1, 106, -1, -1,
6628 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6629 -1, 120, -1, -1, 123, -1, -1, -1, -1, -1,
6630 -1, -1, -1, -1, -1, -1, 135, 136, 137, 138,
6631 139, 140, 141, 142, 143, 144, 145, 146, -1, -1,
6632 -1, -1, -1, 152, 153, 154, 155, 0, -1, 158,
6633 159, 160, -1, -1, -1, 8, 9, 10, -1, -1,
6634 13, 14, 15, -1, 17, -1, -1, -1, -1, -1,
6635 -1, -1, 25, 26, 27, 28, -1, -1, -1, -1,
6636 -1, -1, -1, -1, 37, 38, -1, 40, 41, 42,
6637 43, 44, -1, -1, -1, -1, -1, -1, -1, -1,
6638 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6639 -1, -1, -1, -1, -1, 68, 69, -1, -1, -1,
6640 -1, -1, -1, -1, -1, 78, 79, 80, 81, 82,
6641 83, 84, 85, 86, 87, 88, 89, 90, -1, -1,
6642 -1, -1, 95, 96, 97, 98, -1, -1, 101, -1,
6643 -1, -1, -1, 106, -1, -1, -1, -1, -1, -1,
6644 -1, -1, -1, -1, -1, -1, -1, 120, -1, -1,
6645 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6646 -1, -1, 135, -1, 137, 138, 139, 140, 141, 142,
6647 143, 144, 145, 146, -1, -1, -1, -1, 151, 152,
6648 153, 154, 155, 0, 157, 158, 159, 160, -1, -1,
6649 -1, 8, 9, 10, -1, -1, 13, 14, 15, -1,
6650 17, -1, -1, -1, -1, -1, -1, -1, 25, -1,
6651 27, 28, -1, -1, -1, -1, -1, -1, -1, -1,
6652 37, 38, -1, 40, 41, 42, 43, 44, -1, -1,
6653 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6654 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6655 -1, 68, 69, -1, -1, -1, -1, -1, -1, -1,
6656 -1, 78, 79, 80, 81, 82, 83, 84, 85, 86,
6657 87, 88, 89, 90, -1, -1, -1, -1, 95, 96,
6658 97, 98, -1, 100, 101, -1, -1, -1, -1, 106,
6659 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6660 -1, -1, -1, 120, -1, -1, -1, -1, -1, -1,
6661 -1, -1, -1, -1, -1, -1, -1, 134, 135, -1,
6662 137, 138, 139, 140, 141, 142, 143, 144, 145, 146,
6663 -1, -1, -1, -1, 151, 152, 153, 154, 155, 0,
6664 -1, 158, 159, 160, -1, -1, -1, 8, 9, 10,
6665 -1, -1, 13, 14, 15, -1, 17, -1, -1, -1,
6666 -1, -1, -1, -1, 25, -1, 27, 28, -1, -1,
6667 -1, -1, -1, -1, -1, -1, 37, 38, -1, 40,
6668 41, 42, 43, 44, -1, -1, -1, -1, -1, -1,
6669 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6670 -1, -1, -1, -1, -1, -1, -1, 68, 69, -1,
6671 -1, -1, -1, -1, -1, -1, -1, 78, 79, 80,
6672 81, 82, 83, 84, 85, 86, 87, 88, 89, 90,
6673 -1, -1, -1, -1, 95, 96, 97, 98, -1, -1,
6674 101, -1, -1, -1, -1, 106, -1, -1, -1, -1,
6675 -1, -1, -1, -1, -1, -1, -1, -1, -1, 120,
6676 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6677 -1, -1, -1, -1, 135, -1, 137, 138, 139, 140,
6678 141, 142, 143, 144, 145, 146, -1, -1, -1, -1,
6679 -1, 152, 153, 154, 155, 0, 157, 158, 159, 160,
6680 -1, -1, -1, 8, 9, 10, -1, -1, -1, 14,
6681 15, -1, 17, -1, -1, -1, -1, -1, -1, -1,
6682 25, 26, -1, -1, -1, -1, -1, -1, -1, -1,
6683 -1, -1, 37, 38, -1, 40, 41, 42, 43, 44,
6684 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6685 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6686 -1, -1, -1, 68, 69, -1, -1, -1, -1, -1,
6687 -1, -1, -1, 78, 79, 80, 81, 82, 83, 84,
6688 85, 86, 87, 88, 89, 90, -1, -1, -1, -1,
6689 95, 96, 97, 98, -1, 100, 101, -1, -1, -1,
6690 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6691 -1, -1, -1, -1, -1, 120, -1, -1, -1, -1,
6692 -1, -1, -1, -1, -1, -1, -1, -1, -1, 134,
6693 135, -1, 137, 138, 139, 140, 141, 142, 143, 144,
6694 145, 146, -1, -1, -1, -1, 151, 152, 153, 154,
6695 155, 0, -1, 158, -1, 160, -1, -1, -1, 8,
6696 9, 10, -1, -1, -1, 14, 15, -1, 17, -1,
6697 -1, -1, -1, -1, -1, -1, 25, 26, -1, -1,
6698 -1, -1, -1, -1, -1, -1, -1, -1, 37, 38,
6699 -1, 40, 41, 42, 43, 44, -1, -1, -1, -1,
6700 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6701 -1, -1, -1, -1, -1, -1, -1, -1, -1, 68,
6702 69, -1, -1, -1, -1, -1, -1, -1, -1, 78,
6703 79, 80, 81, 82, 83, 84, 85, 86, 87, 88,
6704 89, 90, -1, -1, -1, -1, 95, 96, 97, 98,
6705 -1, 100, 101, -1, -1, -1, -1, -1, -1, -1,
6706 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6707 -1, 120, -1, -1, -1, -1, -1, -1, -1, -1,
6708 -1, -1, -1, -1, -1, 134, 135, -1, 137, 138,
6709 139, 140, 141, 142, 143, 144, 145, 146, -1, -1,
6710 -1, -1, 151, 152, 153, 154, 155, 0, -1, 158,
6711 -1, 160, -1, -1, -1, 8, 9, 10, -1, -1,
6712 -1, 14, 15, -1, 17, -1, -1, -1, -1, -1,
6713 -1, -1, 25, -1, -1, -1, -1, -1, -1, -1,
6714 -1, -1, -1, -1, 37, 38, -1, 40, 41, 42,
6715 43, 44, -1, -1, -1, -1, -1, -1, -1, -1,
6716 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6717 -1, -1, -1, -1, -1, 68, 69, -1, -1, -1,
6718 -1, -1, -1, -1, -1, 78, 79, 80, 81, 82,
6719 83, 84, 85, 86, 87, 88, 89, 90, -1, -1,
6720 -1, -1, 95, 96, 97, 98, -1, 100, 101, -1,
6721 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6722 -1, -1, -1, -1, -1, -1, -1, 120, -1, -1,
6723 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6724 -1, 134, 135, -1, 137, 138, 139, 140, 141, 142,
6725 143, 144, 145, 146, -1, -1, -1, -1, 151, 152,
6726 153, 154, 155, 0, -1, 158, -1, 160, -1, -1,
6727 -1, 8, 9, 10, -1, -1, -1, 14, 15, -1,
6728 17, -1, -1, -1, -1, -1, -1, -1, 25, -1,
6729 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6730 37, 38, -1, 40, 41, 42, 43, 44, -1, -1,
6731 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6732 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6733 -1, 68, 69, -1, -1, -1, -1, -1, -1, -1,
6734 -1, 78, 79, 80, 81, 82, 83, 84, 85, 86,
6735 87, 88, 89, 90, -1, -1, -1, -1, 95, 96,
6736 97, 98, -1, 100, 101, -1, -1, -1, -1, -1,
6737 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6738 -1, -1, -1, 120, -1, -1, -1, -1, -1, -1,
6739 -1, -1, -1, -1, -1, -1, -1, 134, 135, -1,
6740 137, 138, 139, 140, 141, 142, 143, 144, 145, 146,
6741 -1, -1, -1, -1, 151, 152, 153, 154, 155, -1,
6742 -1, 158, 1, 160, 3, 4, 5, 6, 7, 8,
6743 9, 10, 11, 12, -1, -1, 15, 16, -1, 18,
6744 19, 20, 21, 22, 23, 24, -1, -1, -1, -1,
6745 -1, 30, 31, 32, 33, 34, 35, 36, -1, -1,
6746 39, -1, -1, -1, -1, -1, 45, 46, 47, 48,
6747 49, 50, 51, 52, 53, 54, 55, 56, 57, -1,
6748 59, 60, 61, 62, 63, 64, 65, -1, -1, 68,
6749 -1, -1, -1, -1, -1, -1, -1, 76, 77, -1,
6750 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6751 -1, -1, 91, 92, -1, -1, -1, -1, -1, -1,
6752 99, -1, -1, 102, 103, 104, 105, -1, 107, -1,
6753 -1, 110, 111, 112, 113, 114, 115, 116, 117, 118,
6754 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6755 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6756 -1, -1, -1, -1, -1, -1, -1, -1, 147, 148,
6757 149, -1, -1, -1, 1, 154, 3, 4, 5, 6,
6758 7, 160, -1, 10, 11, 12, -1, 14, 15, 16,
6759 -1, 18, 19, 20, 21, 22, 23, 24, -1, -1,
6760 -1, -1, -1, 30, 31, 32, 33, 34, 35, 36,
6761 -1, -1, 39, -1, -1, -1, -1, -1, 45, 46,
6762 47, 48, 49, 50, 51, 52, 53, 54, 55, 56,
6763 57, -1, 59, 60, 61, 62, 63, 64, 65, -1,
6764 -1, 68, -1, -1, -1, -1, -1, -1, -1, 76,
6765 77, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6766 -1, -1, -1, -1, 91, 92, -1, -1, -1, -1,
6767 -1, -1, 99, -1, -1, 102, 103, 104, 105, -1,
6768 107, -1, -1, 110, 111, 112, 113, 114, 115, 116,
6769 117, 118, -1, -1, -1, -1, -1, -1, -1, -1,
6770 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6771 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6772 147, 148, 149, -1, -1, -1, 1, 154, 3, 4,
6773 5, 6, 7, 160, -1, 10, 11, 12, -1, -1,
6774 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
6775 -1, -1, -1, -1, -1, 30, 31, 32, 33, 34,
6776 35, 36, -1, -1, 39, -1, -1, -1, -1, -1,
6777 45, 46, 47, 48, 49, 50, 51, 52, 53, 54,
6778 55, 56, 57, -1, 59, 60, 61, 62, 63, 64,
6779 65, -1, -1, 68, -1, -1, -1, -1, -1, -1,
6780 -1, 76, 77, -1, -1, -1, -1, -1, -1, -1,
6781 -1, -1, -1, -1, -1, -1, 91, 92, -1, -1,
6782 -1, -1, -1, -1, 99, -1, -1, 102, 103, 104,
6783 105, -1, 107, -1, -1, 110, 111, 112, 113, 114,
6784 115, 116, 117, 118, -1, -1, -1, -1, -1, -1,
6785 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6786 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6787 -1, -1, 147, 148, 149, -1, -1, -1, 1, 154,
6788 3, 4, 5, 6, 7, 160, -1, 10, 11, 12,
6789 -1, -1, 15, 16, -1, 18, 19, 20, 21, 22,
6790 23, 24, 25, -1, -1, -1, -1, 30, 31, 32,
6791 33, 34, 35, 36, -1, -1, 39, -1, -1, -1,
6792 -1, -1, 45, 46, 47, 48, 49, 50, 51, 52,
6793 53, 54, 55, 56, 57, -1, 59, 60, 61, 62,
6794 63, 64, 65, -1, -1, 68, -1, -1, -1, -1,
6795 -1, -1, -1, 76, 77, -1, -1, -1, -1, -1,
6796 -1, -1, -1, -1, -1, -1, -1, -1, 91, 92,
6797 -1, -1, -1, -1, -1, -1, 99, -1, -1, 102,
6798 103, 104, 105, -1, 107, -1, -1, 110, 111, 112,
6799 113, 114, 115, 116, 117, 118, -1, -1, -1, -1,
6800 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6801 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6802 -1, -1, -1, -1, 147, 148, 149, -1, -1, -1,
6803 1, 154, 3, 4, 5, 6, 7, 160, -1, 10,
6804 11, 12, -1, -1, 15, 16, -1, 18, 19, 20,
6805 21, 22, 23, 24, -1, -1, -1, -1, -1, 30,
6806 31, 32, 33, 34, 35, 36, -1, -1, 39, -1,
6807 -1, -1, -1, -1, 45, 46, 47, 48, 49, 50,
6808 51, 52, 53, 54, 55, 56, 57, -1, 59, 60,
6809 61, 62, 63, 64, 65, -1, -1, 68, -1, -1,
6810 -1, -1, -1, -1, -1, 76, 77, -1, -1, -1,
6811 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6812 91, 92, -1, -1, -1, -1, -1, -1, 99, -1,
6813 -1, 102, 103, 104, 105, -1, 107, -1, -1, 110,
6814 111, 112, 113, 114, 115, 116, 117, 118, -1, -1,
6815 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6816 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6817 -1, -1, -1, -1, -1, -1, 147, 148, 149, -1,
6818 -1, -1, 1, 154, 3, 4, 5, 6, 7, 160,
6819 9, 10, 11, 12, -1, -1, -1, 16, -1, 18,
6820 19, 20, 21, 22, 23, 24, -1, -1, -1, -1,
6821 -1, 30, 31, 32, 33, 34, 35, 36, -1, -1,
6822 39, -1, -1, -1, -1, -1, 45, 46, 47, 48,
6823 49, 50, 51, 52, 53, 54, 55, 56, 57, -1,
6824 59, 60, 61, 62, 63, 64, 65, -1, -1, 68,
6825 -1, -1, -1, -1, -1, -1, -1, 76, 77, -1,
6826 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6827 -1, -1, 91, 92, -1, -1, -1, -1, -1, -1,
6828 99, -1, -1, 102, 103, 104, 105, -1, 107, -1,
6829 -1, 110, 111, 112, 113, 114, 115, 116, 117, 118,
6830 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6831 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6832 -1, -1, -1, -1, -1, -1, -1, -1, 147, 148,
6833 149, -1, -1, -1, 1, 154, 3, 4, 5, 6,
6834 7, 160, -1, 10, 11, 12, -1, -1, -1, 16,
6835 -1, 18, 19, 20, 21, 22, 23, 24, -1, -1,
6836 -1, -1, -1, 30, 31, 32, 33, 34, 35, 36,
6837 -1, -1, 39, -1, -1, -1, -1, -1, 45, 46,
6838 47, 48, 49, 50, 51, 52, 53, 54, 55, 56,
6839 57, -1, 59, 60, 61, 62, 63, 64, 65, -1,
6840 -1, 68, -1, -1, -1, -1, -1, -1, -1, 76,
6841 77, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6842 -1, -1, -1, -1, 91, 92, -1, -1, -1, -1,
6843 -1, -1, 99, -1, -1, 102, 103, 104, 105, -1,
6844 107, -1, -1, 110, 111, 112, 113, 114, 115, 116,
6845 117, 118, -1, -1, -1, -1, -1, -1, -1, -1,
6846 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6847 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6848 147, 148, 149, -1, -1, -1, 1, 154, 3, 4,
6849 5, 6, 7, 160, -1, -1, 11, 12, -1, -1,
6850 -1, 16, -1, 18, 19, 20, 21, 22, 23, 24,
6851 -1, -1, -1, -1, -1, 30, 31, 32, 33, 34,
6852 35, 36, -1, -1, 39, -1, -1, -1, -1, -1,
6853 45, 46, 47, 48, 49, 50, 51, 52, 53, 54,
6854 55, 56, 57, -1, 59, 60, 61, 62, 63, 64,
6855 65, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6856 -1, 76, 77, -1, -1, -1, -1, -1, -1, -1,
6857 -1, -1, -1, -1, -1, -1, 91, 92, -1, -1,
6858 -1, -1, -1, -1, 99, -1, -1, 102, 103, 104,
6859 105, -1, 107, -1, -1, 110, 111, 112, 113, 114,
6860 115, 116, 117, 118, -1, -1, -1, -1, -1, -1,
6861 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6862 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6863 -1, -1, 147, 148, 149, -1, -1, -1, -1, 154,
6864 -1, -1, -1, 158, 1, 160, 3, 4, 5, 6,
6865 7, -1, -1, -1, 11, 12, -1, -1, -1, 16,
6866 -1, 18, 19, 20, 21, 22, 23, 24, -1, -1,
6867 -1, -1, -1, 30, 31, 32, 33, 34, 35, 36,
6868 -1, -1, 39, -1, -1, -1, -1, -1, 45, 46,
6869 47, 48, 49, 50, 51, 52, 53, 54, 55, 56,
6870 57, -1, 59, 60, 61, 62, 63, 64, 65, -1,
6871 -1, -1, -1, -1, -1, -1, -1, -1, -1, 76,
6872 77, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6873 -1, -1, -1, -1, 91, 92, -1, -1, -1, -1,
6874 -1, -1, 99, -1, -1, 102, 103, 104, 105, -1,
6875 107, -1, -1, 110, 111, 112, 113, 114, 115, 116,
6876 117, 118, -1, -1, -1, -1, -1, -1, -1, -1,
6877 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6878 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6879 147, 148, 149, -1, -1, -1, -1, 154, -1, -1,
6880 -1, 158, 1, 160, 3, 4, 5, 6, 7, -1,
6881 -1, -1, 11, 12, -1, -1, -1, 16, -1, 18,
6882 19, 20, 21, 22, 23, 24, -1, -1, -1, -1,
6883 -1, 30, 31, 32, 33, 34, 35, 36, -1, -1,
6884 39, -1, -1, -1, -1, -1, 45, 46, 47, 48,
6885 49, 50, 51, 52, 53, 54, 55, 56, 57, -1,
6886 59, 60, 61, 62, 63, 64, 65, -1, -1, -1,
6887 -1, -1, -1, -1, -1, -1, -1, 76, 77, -1,
6888 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6889 -1, -1, 91, 92, -1, -1, -1, -1, -1, -1,
6890 99, -1, -1, 102, 103, 104, 105, -1, 107, -1,
6891 -1, 110, 111, 112, 113, 114, 115, 116, 117, 118,
6892 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6893 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6894 -1, -1, -1, -1, -1, -1, -1, -1, 147, 148,
6895 149, -1, -1, 152, 1, 154, 3, 4, 5, 6,
6896 7, 160, -1, -1, 11, 12, -1, -1, -1, 16,
6897 -1, 18, 19, 20, 21, 22, 23, 24, -1, -1,
6898 -1, -1, -1, 30, 31, 32, 33, 34, 35, 36,
6899 -1, -1, 39, -1, -1, -1, -1, -1, 45, 46,
6900 47, 48, 49, 50, 51, 52, 53, 54, 55, 56,
6901 57, -1, 59, 60, 61, 62, 63, 64, 65, -1,
6902 -1, -1, -1, -1, -1, -1, -1, -1, -1, 76,
6903 77, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6904 -1, -1, -1, -1, 91, 92, -1, -1, -1, -1,
6905 -1, -1, 99, -1, -1, 102, 103, 104, 105, -1,
6906 107, -1, -1, 110, 111, 112, 113, 114, 115, 116,
6907 117, 118, -1, -1, -1, -1, -1, -1, -1, -1,
6908 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6909 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6910 147, 148, 149, -1, -1, 152, 1, 154, 3, 4,
6911 5, -1, 7, 160, -1, -1, 11, 12, -1, -1,
6912 -1, 16, 17, 18, 19, 20, 21, 22, 23, 24,
6913 -1, -1, -1, -1, -1, 30, 31, 32, 33, 34,
6914 35, 36, -1, -1, 39, -1, -1, -1, -1, -1,
6915 -1, 46, -1, -1, 49, 50, 51, 52, 53, 54,
6916 55, 56, 57, -1, 59, 60, 61, 62, 63, 64,
6917 65, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6918 -1, 76, 77, -1, -1, -1, -1, -1, -1, -1,
6919 -1, -1, -1, -1, -1, -1, 91, 92, -1, -1,
6920 -1, -1, -1, -1, 99, -1, -1, 102, 103, 104,
6921 105, -1, -1, -1, -1, 110, 111, 112, 113, 114,
6922 115, 116, 117, 118, -1, -1, -1, -1, -1, -1,
6923 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6924 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6925 -1, -1, 147, 148, 149, -1, -1, -1, -1, 154,
6926 -1, -1, -1, -1, -1, 160, 3, 4, 5, 6,
6927 7, 8, 9, 10, 11, 12, 13, 14, 15, 16,
6928 17, 18, 19, 20, 21, 22, 23, 24, 25, 26,
6929 -1, -1, -1, 30, 31, 32, 33, 34, 35, 36,
6930 37, 38, 39, -1, -1, -1, -1, -1, 45, 46,
6931 47, 48, 49, 50, 51, 52, 53, 54, 55, 56,
6932 57, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6933 -1, -1, -1, -1, -1, -1, -1, -1, -1, 76,
6934 77, 78, 79, 80, 81, 82, 83, 84, -1, -1,
6935 87, 88, -1, -1, -1, -1, 93, 94, 95, 96,
6936 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6937 107, 108, -1, -1, -1, -1, -1, -1, -1, -1,
6938 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6939 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6940 137, 138, 139, 140, 141, 142, 143, 144, 145, 146,
6941 -1, 148, 149, -1, -1, -1, -1, -1, -1, 156,
6942 157, 3, 4, 5, 6, 7, 8, 9, 10, 11,
6943 12, 13, 14, 15, 16, 17, 18, 19, 20, 21,
6944 22, 23, 24, 25, 26, -1, -1, -1, 30, 31,
6945 32, 33, 34, 35, 36, 37, 38, 39, -1, -1,
6946 -1, -1, -1, 45, 46, 47, 48, 49, 50, 51,
6947 52, 53, 54, 55, 56, 57, -1, -1, -1, -1,
6948 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6949 -1, -1, -1, -1, 76, 77, 78, 79, 80, 81,
6950 82, 83, 84, -1, -1, 87, 88, -1, -1, -1,
6951 -1, 93, 94, 95, 96, -1, -1, -1, -1, -1,
6952 -1, -1, -1, -1, -1, 107, 108, -1, -1, -1,
6953 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6954 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6955 -1, -1, -1, -1, -1, 137, 138, 139, 140, 141,
6956 142, 143, 144, 145, 146, -1, 148, 149, -1, -1,
6957 -1, -1, -1, -1, 156, 3, 4, 5, 6, 7,
6958 8, 9, 10, 11, 12, 13, 14, 15, 16, 17,
6959 18, 19, 20, 21, 22, 23, 24, 25, 26, -1,
6960 -1, -1, 30, 31, 32, 33, 34, 35, 36, 37,
6961 38, 39, -1, -1, -1, -1, -1, 45, 46, 47,
6962 48, 49, 50, 51, 52, 53, 54, -1, 56, -1,
6963 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6964 -1, -1, -1, -1, -1, -1, -1, -1, 76, 77,
6965 78, 79, 80, 81, 82, 83, 84, -1, -1, 87,
6966 88, -1, -1, -1, -1, 93, 94, 95, 96, -1,
6967 -1, -1, -1, -1, -1, -1, -1, -1, -1, 107,
6968 108, -1, -1, 111, -1, -1, -1, -1, -1, -1,
6969 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6970 -1, -1, -1, -1, -1, -1, -1, -1, -1, 137,
6971 138, 139, 140, 141, 142, 143, 144, 145, 146, -1,
6972 148, 149, -1, -1, -1, -1, -1, -1, 156, 3,
6973 4, 5, 6, 7, 8, 9, 10, 11, 12, 13,
6974 14, 15, 16, 17, 18, 19, 20, 21, 22, 23,
6975 24, 25, 26, -1, -1, -1, 30, 31, 32, 33,
6976 34, 35, 36, 37, 38, 39, -1, -1, -1, -1,
6977 -1, 45, 46, 47, 48, 49, 50, 51, 52, 53,
6978 -1, -1, 56, -1, -1, -1, -1, -1, -1, -1,
6979 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6980 -1, -1, 76, 77, 78, 79, 80, 81, 82, 83,
6981 84, -1, -1, 87, 88, -1, -1, -1, -1, 93,
6982 94, 95, 96, -1, -1, -1, -1, -1, -1, -1,
6983 -1, -1, -1, 107, 108, -1, -1, 111, -1, -1,
6984 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6985 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6986 -1, -1, -1, 137, 138, 139, 140, 141, 142, 143,
6987 144, 145, 146, -1, 148, 149, -1, -1, -1, -1,
6988 -1, -1, 156, 3, 4, 5, 6, 7, 8, 9,
6989 10, 11, 12, 13, 14, 15, 16, 17, 18, 19,
6990 20, 21, 22, 23, 24, 25, 26, -1, -1, -1,
6991 30, 31, 32, 33, 34, 35, 36, 37, 38, 39,
6992 -1, -1, -1, -1, -1, 45, 46, 47, 48, 49,
6993 50, 51, 52, 53, -1, -1, 56, -1, -1, -1,
6994 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6995 -1, -1, -1, -1, -1, -1, 76, 77, 78, 79,
6996 80, 81, 82, 83, 84, -1, -1, 87, 88, -1,
6997 -1, -1, -1, 93, 94, 95, 96, -1, -1, -1,
6998 -1, -1, -1, -1, -1, -1, -1, 107, 108, -1,
6999 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7000 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7001 -1, -1, -1, -1, -1, -1, -1, 137, 138, 139,
7002 140, 141, 142, 143, 144, 145, 146, -1, 148, 149,
7003 3, 4, 5, -1, 7, -1, 156, -1, 11, 12,
7004 -1, -1, -1, 16, -1, 18, 19, 20, 21, 22,
7005 23, 24, -1, -1, -1, -1, -1, 30, 31, 32,
7006 33, 34, 35, 36, -1, -1, 39, -1, -1, -1,
7007 -1, -1, -1, 46, -1, -1, 49, 50, 51, 52,
7008 53, 54, 55, 56, 57, -1, 59, 60, 61, 62,
7009 63, 64, 65, -1, -1, -1, -1, -1, -1, -1,
7010 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7011 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7012 -1, -1, -1, -1, -1, -1, 99, -1, -1, 102,
7013 103, 104, 105, -1, -1, -1, -1, 110, 111, 112,
7014 113, 114, 115, 116, 117, 118, -1, -1, 3, 4,
7015 5, -1, 7, -1, -1, -1, 11, 12, -1, -1,
7016 -1, 16, -1, 18, 19, 20, 21, 22, 23, 24,
7017 -1, -1, -1, -1, 147, 30, 31, 32, 33, 34,
7018 35, 36, 155, -1, 39, -1, -1, -1, -1, -1,
7019 -1, 46, -1, -1, 49, 50, 51, 52, 53, 54,
7020 55, 56, 57, -1, 59, 60, 61, 62, 63, 64,
7021 65, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7022 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7023 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7024 -1, -1, -1, -1, 99, -1, -1, 102, 103, 104,
7025 105, -1, -1, -1, -1, 110, 111, 112, 113, 114,
7026 115, 116, 117, 118, -1, -1, 3, 4, 5, -1,
7027 7, -1, -1, -1, 11, 12, -1, -1, -1, 16,
7028 -1, 18, 19, 20, 21, 22, 23, 24, -1, -1,
7029 -1, -1, 147, 30, 31, 32, 33, 34, 35, 36,
7030 155, -1, 39, -1, -1, -1, -1, -1, -1, 46,
7031 -1, -1, 49, 50, 51, 52, 53, 54, 55, 56,
7032 57, 58, 59, 60, 61, 62, 63, 64, 65, -1,
7033 -1, -1, -1, -1, -1, -1, -1, -1, -1, 76,
7034 77, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7035 -1, -1, -1, -1, 91, 92, -1, -1, -1, -1,
7036 -1, -1, 99, -1, -1, 102, 103, 104, 105, -1,
7037 107, 108, 109, 110, 111, 112, 113, 114, 115, 116,
7038 117, 118, -1, -1, -1, -1, -1, -1, -1, -1,
7039 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7040 -1, -1, -1, -1, -1, 3, 4, 5, -1, 7,
7041 147, 148, 149, 11, 12, -1, -1, 154, 16, -1,
7042 18, 19, 20, 21, 22, 23, 24, -1, -1, -1,
7043 -1, -1, 30, 31, 32, 33, 34, 35, 36, -1,
7044 -1, 39, -1, -1, -1, -1, -1, -1, 46, -1,
7045 -1, 49, 50, 51, 52, 53, 54, 55, 56, 57,
7046 -1, 59, 60, 61, 62, 63, 64, 65, -1, -1,
7047 -1, -1, -1, -1, -1, -1, -1, -1, 76, 77,
7048 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7049 -1, -1, -1, 91, 92, -1, -1, -1, -1, -1,
7050 -1, 99, -1, -1, 102, 103, 104, 105, -1, -1,
7051 -1, -1, 110, 111, 112, 113, 114, 115, 116, 117,
7052 118, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7053 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7054 -1, -1, 1, -1, 3, 4, 5, 6, 7, 147,
7055 148, 149, 11, 12, -1, -1, 154, 16, -1, 18,
7056 19, 20, 21, 22, 23, 24, -1, -1, -1, -1,
7057 -1, 30, 31, 32, 33, 34, 35, 36, -1, -1,
7058 39, -1, -1, -1, -1, -1, 45, 46, -1, 48,
7059 49, 50, 51, 52, 53, 54, 55, 56, 57, -1,
7060 59, 60, 61, 62, 63, 64, 65, -1, -1, -1,
7061 -1, -1, -1, -1, -1, -1, -1, 76, 77, -1,
7062 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7063 -1, -1, 91, 92, -1, -1, -1, -1, -1, -1,
7064 99, -1, -1, 102, 103, 104, 105, -1, 107, -1,
7065 -1, 110, 111, 112, 113, 114, 115, 116, 117, 118,
7066 -1, -1, 1, -1, 3, 4, 5, -1, 7, -1,
7067 -1, -1, 11, 12, -1, -1, -1, 16, -1, 18,
7068 19, 20, 21, 22, 23, 24, -1, -1, 147, 148,
7069 149, 30, 31, 32, 33, 34, 35, 36, -1, -1,
7070 39, -1, -1, -1, -1, -1, -1, 46, -1, -1,
7071 49, 50, 51, 52, 53, 54, 55, 56, 57, -1,
7072 59, 60, 61, 62, 63, 64, 65, -1, -1, -1,
7073 -1, -1, -1, -1, -1, -1, -1, 76, 77, -1,
7074 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7075 -1, -1, 91, 92, -1, -1, -1, -1, -1, -1,
7076 99, -1, -1, 102, 103, 104, 105, -1, -1, -1,
7077 -1, 110, 111, 112, 113, 114, 115, 116, 117, 118,
7078 -1, -1, -1, -1, 3, 4, 5, -1, 7, -1,
7079 -1, -1, 11, 12, -1, -1, -1, 16, -1, 18,
7080 19, 20, 21, 22, 23, 24, -1, -1, 147, 148,
7081 149, 30, 31, 32, 33, 34, 35, 36, -1, -1,
7082 39, -1, -1, -1, -1, -1, -1, 46, -1, -1,
7083 49, 50, 51, 52, 53, 54, 55, 56, 57, 58,
7084 59, 60, 61, 62, 63, 64, 65, -1, -1, -1,
7085 -1, -1, -1, -1, -1, -1, -1, 76, 77, -1,
7086 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7087 -1, -1, 91, 92, -1, -1, -1, -1, -1, -1,
7088 99, -1, -1, 102, 103, 104, 105, -1, 107, 108,
7089 109, 110, 111, 112, 113, 114, 115, 116, 117, 118,
7090 -1, -1, -1, -1, 3, 4, 5, -1, 7, -1,
7091 -1, -1, 11, 12, -1, -1, -1, 16, -1, 18,
7092 19, 20, 21, 22, 23, 24, -1, -1, 147, 148,
7093 149, 30, 31, 32, 33, 34, 35, 36, -1, -1,
7094 39, -1, -1, -1, -1, -1, -1, 46, -1, -1,
7095 49, 50, 51, 52, 53, 54, 55, 56, 57, 58,
7096 59, 60, 61, 62, 63, 64, 65, -1, -1, -1,
7097 -1, -1, -1, -1, -1, -1, -1, 76, 77, -1,
7098 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7099 -1, -1, 91, 92, -1, -1, -1, -1, -1, -1,
7100 99, -1, -1, 102, 103, 104, 105, -1, 107, 108,
7101 109, 110, 111, 112, 113, 114, 115, 116, 117, 118,
7102 -1, -1, -1, -1, 3, 4, 5, -1, 7, -1,
7103 -1, -1, 11, 12, -1, -1, -1, 16, -1, 18,
7104 19, 20, 21, 22, 23, 24, -1, -1, 147, 148,
7105 149, 30, 31, 32, 33, 34, 35, 36, -1, -1,
7106 39, -1, -1, -1, -1, -1, -1, 46, -1, -1,
7107 49, 50, 51, 52, 53, 54, 55, 56, 57, 58,
7108 59, 60, 61, 62, 63, 64, 65, -1, -1, -1,
7109 -1, -1, -1, -1, -1, -1, -1, 76, 77, -1,
7110 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7111 -1, -1, 91, 92, -1, -1, -1, -1, -1, -1,
7112 99, -1, -1, 102, 103, 104, 105, -1, 107, 108,
7113 109, 110, 111, 112, 113, 114, 115, 116, 117, 118,
7114 -1, -1, -1, -1, 3, 4, 5, -1, 7, -1,
7115 -1, -1, 11, 12, -1, -1, -1, 16, -1, 18,
7116 19, 20, 21, 22, 23, 24, -1, -1, 147, 148,
7117 149, 30, 31, 32, 33, 34, 35, 36, -1, -1,
7118 39, -1, -1, -1, -1, -1, -1, 46, -1, -1,
7119 49, 50, 51, 52, 53, 54, 55, 56, 57, 58,
7120 59, 60, 61, 62, 63, 64, 65, -1, -1, -1,
7121 -1, -1, -1, -1, -1, -1, -1, 76, 77, -1,
7122 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7123 -1, -1, 91, 92, -1, -1, -1, -1, -1, -1,
7124 99, -1, -1, 102, 103, 104, 105, -1, 107, 108,
7125 109, 110, 111, 112, 113, 114, 115, 116, 117, 118,
7126 -1, -1, -1, -1, 3, 4, 5, -1, 7, -1,
7127 -1, -1, 11, 12, -1, -1, -1, 16, -1, 18,
7128 19, 20, 21, 22, 23, 24, -1, -1, 147, 148,
7129 149, 30, 31, 32, 33, 34, 35, 36, -1, -1,
7130 39, -1, -1, -1, -1, -1, -1, 46, -1, -1,
7131 49, 50, 51, 52, 53, 54, 55, 56, 57, 58,
7132 59, 60, 61, 62, 63, 64, 65, -1, -1, -1,
7133 -1, -1, -1, -1, -1, -1, -1, 76, 77, -1,
7134 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7135 -1, -1, 91, 92, -1, -1, -1, -1, -1, -1,
7136 99, -1, -1, 102, 103, 104, 105, -1, 107, 108,
7137 -1, 110, 111, 112, 113, 114, 115, 116, 117, 118,
7138 -1, -1, -1, -1, 3, 4, 5, -1, 7, -1,
7139 -1, -1, 11, 12, -1, -1, -1, 16, -1, 18,
7140 19, 20, 21, 22, 23, 24, -1, -1, 147, 148,
7141 149, 30, 31, 32, 33, 34, 35, 36, -1, -1,
7142 39, -1, -1, -1, -1, -1, -1, 46, -1, -1,
7143 49, 50, 51, 52, 53, 54, 55, 56, 57, 58,
7144 59, 60, 61, 62, 63, 64, 65, -1, -1, -1,
7145 -1, -1, -1, -1, -1, -1, -1, 76, 77, -1,
7146 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7147 -1, -1, 91, 92, -1, -1, -1, -1, -1, -1,
7148 99, -1, -1, 102, 103, 104, 105, -1, -1, 108,
7149 109, 110, 111, 112, 113, 114, 115, 116, 117, 118,
7150 -1, -1, -1, -1, 3, 4, 5, -1, 7, -1,
7151 -1, -1, 11, 12, -1, -1, -1, 16, -1, 18,
7152 19, 20, 21, 22, 23, 24, -1, -1, 147, 148,
7153 149, 30, 31, 32, 33, 34, 35, 36, -1, -1,
7154 39, -1, -1, -1, -1, -1, -1, 46, -1, -1,
7155 49, 50, 51, 52, 53, 54, 55, 56, 57, 58,
7156 59, 60, 61, 62, 63, 64, 65, -1, -1, -1,
7157 -1, -1, -1, -1, -1, -1, -1, 76, 77, -1,
7158 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7159 -1, -1, 91, 92, -1, -1, -1, -1, -1, -1,
7160 99, -1, -1, 102, 103, 104, 105, -1, -1, 108,
7161 -1, 110, 111, 112, 113, 114, 115, 116, 117, 118,
7162 -1, -1, -1, -1, 3, 4, 5, -1, 7, -1,
7163 -1, -1, 11, 12, -1, -1, -1, 16, -1, 18,
7164 19, 20, 21, 22, 23, 24, -1, -1, 147, 148,
7165 149, 30, 31, 32, 33, 34, 35, 36, -1, -1,
7166 39, -1, -1, -1, -1, -1, -1, 46, -1, -1,
7167 49, 50, 51, 52, 53, 54, 55, 56, 57, -1,
7168 59, 60, 61, 62, 63, 64, 65, -1, -1, -1,
7169 -1, -1, -1, -1, -1, -1, -1, 76, 77, -1,
7170 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7171 -1, -1, 91, 92, -1, -1, -1, -1, -1, -1,
7172 99, -1, -1, 102, 103, 104, 105, -1, 107, -1,
7173 -1, 110, 111, 112, 113, 114, 115, 116, 117, 118,
7174 -1, -1, -1, -1, 3, 4, 5, -1, 7, -1,
7175 -1, -1, 11, 12, -1, -1, -1, 16, -1, 18,
7176 19, 20, 21, 22, 23, 24, -1, -1, 147, 148,
7177 149, 30, 31, 32, 33, 34, 35, 36, -1, -1,
7178 39, -1, -1, -1, -1, -1, -1, 46, -1, -1,
7179 49, 50, 51, 52, 53, 54, 55, 56, 57, -1,
7180 59, 60, 61, 62, 63, 64, 65, -1, -1, -1,
7181 -1, -1, -1, -1, -1, -1, -1, 76, 77, -1,
7182 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7183 -1, -1, 91, 92, -1, -1, -1, -1, -1, -1,
7184 99, -1, -1, 102, 103, 104, 105, -1, 107, -1,
7185 -1, 110, 111, 112, 113, 114, 115, 116, 117, 118,
7186 -1, -1, -1, -1, 3, 4, 5, -1, 7, -1,
7187 -1, -1, 11, 12, -1, -1, -1, 16, -1, 18,
7188 19, 20, 21, 22, 23, 24, -1, -1, 147, 148,
7189 149, 30, 31, 32, 33, 34, 35, 36, -1, -1,
7190 39, -1, -1, -1, -1, -1, -1, 46, -1, -1,
7191 49, 50, 51, 52, 53, 54, 55, 56, 57, -1,
7192 59, 60, 61, 62, 63, 64, 65, -1, -1, -1,
7193 -1, -1, -1, -1, -1, -1, -1, 76, 77, -1,
7194 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7195 -1, -1, 91, 92, -1, -1, -1, -1, -1, -1,
7196 99, -1, -1, 102, 103, 104, 105, -1, 107, -1,
7197 -1, 110, 111, 112, 113, 114, 115, 116, 117, 118,
7198 -1, -1, -1, -1, 3, 4, 5, -1, 7, -1,
7199 -1, -1, 11, 12, -1, -1, -1, 16, -1, 18,
7200 19, 20, 21, 22, 23, 24, -1, -1, 147, 148,
7201 149, 30, 31, 32, 33, 34, 35, 36, -1, -1,
7202 39, -1, -1, -1, -1, -1, -1, 46, -1, -1,
7203 49, 50, 51, 52, 53, 54, 55, 56, 57, -1,
7204 59, 60, 61, 62, 63, 64, 65, -1, -1, -1,
7205 -1, -1, -1, -1, -1, -1, -1, 76, 77, -1,
7206 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7207 -1, -1, 91, 92, -1, -1, -1, -1, -1, -1,
7208 99, -1, -1, 102, 103, 104, 105, -1, 107, -1,
7209 -1, 110, 111, 112, 113, 114, 115, 116, 117, 118,
7210 -1, -1, -1, -1, 3, 4, 5, -1, 7, -1,
7211 -1, -1, 11, 12, -1, -1, -1, 16, -1, 18,
7212 19, 20, 21, 22, 23, 24, -1, -1, 147, 148,
7213 149, 30, 31, 32, 33, 34, 35, 36, -1, -1,
7214 39, -1, -1, -1, -1, -1, -1, 46, -1, -1,
7215 49, 50, 51, 52, 53, 54, 55, 56, 57, -1,
7216 59, 60, 61, 62, 63, 64, 65, -1, -1, -1,
7217 -1, -1, -1, -1, -1, -1, -1, 76, 77, -1,
7218 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7219 -1, -1, 91, 92, -1, -1, -1, -1, -1, -1,
7220 99, -1, -1, 102, 103, 104, 105, -1, 107, -1,
7221 -1, 110, 111, 112, 113, 114, 115, 116, 117, 118,
7222 -1, -1, -1, -1, 3, 4, 5, -1, 7, -1,
7223 -1, -1, 11, 12, -1, -1, -1, 16, -1, 18,
7224 19, 20, 21, 22, 23, 24, -1, -1, 147, 148,
7225 149, 30, 31, 32, 33, 34, 35, 36, -1, -1,
7226 39, -1, -1, -1, -1, -1, -1, 46, -1, -1,
7227 49, 50, 51, 52, 53, 54, 55, 56, 57, -1,
7228 59, 60, 61, 62, 63, 64, 65, -1, -1, -1,
7229 -1, -1, -1, -1, -1, -1, -1, 76, 77, -1,
7230 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7231 -1, -1, 91, 92, -1, -1, -1, -1, -1, -1,
7232 99, -1, -1, 102, 103, 104, 105, -1, 107, -1,
7233 -1, 110, 111, 112, 113, 114, 115, 116, 117, 118,
7234 -1, -1, -1, -1, 3, 4, 5, -1, 7, -1,
7235 -1, -1, 11, 12, -1, -1, -1, 16, -1, 18,
7236 19, 20, 21, 22, 23, 24, -1, -1, 147, 148,
7237 149, 30, 31, 32, 33, 34, 35, 36, -1, -1,
7238 39, -1, -1, -1, -1, -1, -1, 46, -1, -1,
7239 49, 50, 51, 52, 53, 54, 55, 56, 57, -1,
7240 59, 60, 61, 62, 63, 64, 65, -1, -1, -1,
7241 -1, -1, -1, -1, -1, -1, -1, 76, 77, -1,
7242 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7243 -1, -1, 91, 92, -1, -1, -1, -1, -1, -1,
7244 99, -1, -1, 102, 103, 104, 105, -1, -1, -1,
7245 -1, 110, 111, 112, 113, 114, 115, 116, 117, 118,
7246 -1, -1, -1, -1, 3, 4, 5, -1, 7, -1,
7247 -1, -1, 11, 12, -1, -1, -1, 16, -1, 18,
7248 19, 20, 21, 22, 23, 24, -1, -1, 147, 148,
7249 149, 30, 31, 32, 33, 34, 35, 36, -1, -1,
7250 39, -1, -1, -1, -1, -1, -1, 46, -1, -1,
7251 49, 50, 51, 52, 53, 54, 55, 56, 57, -1,
7252 59, 60, 61, 62, 63, 64, 65, -1, -1, -1,
7253 -1, -1, -1, -1, -1, -1, -1, 76, 77, -1,
7254 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7255 -1, -1, 91, 92, -1, -1, -1, -1, -1, -1,
7256 99, -1, -1, 102, 103, 104, 105, -1, -1, -1,
7257 -1, 110, 111, 112, 113, 114, 115, 116, 117, 118,
7258 -1, -1, -1, -1, 3, 4, 5, -1, 7, -1,
7259 -1, -1, 11, 12, -1, -1, -1, 16, -1, 18,
7260 19, 20, 21, 22, 23, 24, -1, -1, 147, 148,
7261 149, 30, 31, 32, 33, 34, 35, 36, -1, -1,
7262 39, -1, -1, -1, -1, -1, -1, 46, -1, -1,
7263 49, 50, 51, 52, 53, 54, 55, 56, 57, -1,
7264 59, 60, 61, 62, 63, 64, 65, -1, -1, -1,
7265 -1, -1, -1, -1, -1, -1, -1, 76, 77, -1,
7266 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7267 -1, -1, 91, 92, -1, -1, -1, -1, -1, -1,
7268 99, -1, -1, 102, 103, 104, 105, -1, -1, -1,
7269 -1, 110, 111, 112, 113, 114, 115, 116, 117, 118,
7270 -1, -1, -1, -1, 3, 4, 5, -1, 7, -1,
7271 -1, -1, 11, 12, -1, -1, -1, 16, -1, 18,
7272 19, 20, 21, 22, 23, 24, -1, -1, 147, 148,
7273 149, 30, 31, 32, 33, 34, 35, 36, -1, -1,
7274 39, -1, -1, -1, -1, -1, -1, 46, -1, -1,
7275 49, 50, 51, 52, 53, 54, 55, 56, 57, -1,
7276 59, 60, 61, 62, 63, 64, 65, -1, -1, -1,
7277 -1, -1, -1, -1, -1, -1, -1, 76, 77, -1,
7278 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7279 -1, -1, 91, 92, -1, -1, -1, -1, -1, -1,
7280 99, -1, -1, 102, 103, 104, 105, -1, -1, -1,
7281 -1, 110, 111, 112, 113, 114, 115, 116, 117, 118,
7282 -1, -1, -1, -1, 3, 4, 5, -1, 7, -1,
7283 -1, -1, 11, 12, -1, -1, -1, 16, -1, 18,
7284 19, 20, 21, 22, 23, 24, -1, -1, 147, 148,
7285 149, 30, 31, 32, 33, 34, 35, 36, -1, -1,
7286 39, -1, -1, -1, -1, -1, -1, 46, -1, -1,
7287 49, 50, 51, 52, 53, 54, 55, 56, 57, -1,
7288 59, 60, 61, 62, 63, 64, 65, -1, -1, -1,
7289 -1, -1, -1, -1, -1, -1, -1, 76, 77, -1,
7290 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7291 -1, -1, 91, 92, -1, -1, -1, -1, -1, -1,
7292 99, -1, -1, 102, 103, 104, 105, -1, -1, -1,
7293 -1, 110, 111, 112, 113, 114, 115, 116, 117, 118,
7294 -1, -1, -1, -1, 3, 4, 5, -1, 7, -1,
7295 -1, -1, 11, 12, -1, -1, -1, 16, -1, 18,
7296 19, 20, 21, 22, 23, 24, -1, -1, 147, 148,
7297 149, 30, 31, 32, 33, 34, 35, 36, -1, -1,
7298 39, -1, -1, -1, -1, -1, -1, 46, -1, -1,
7299 49, 50, 51, 52, 53, 54, 55, 56, 57, -1,
7300 59, 60, 61, 62, 63, 64, 65, -1, -1, -1,
7301 -1, -1, -1, -1, -1, -1, -1, 76, 77, -1,
7302 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7303 -1, -1, 91, 92, -1, -1, -1, -1, -1, -1,
7304 99, -1, -1, 102, 103, 104, 105, -1, -1, -1,
7305 -1, 110, 111, 112, 113, 114, 115, 116, 117, 118,
7306 -1, -1, -1, -1, 3, 4, 5, -1, 7, -1,
7307 -1, -1, 11, 12, -1, -1, -1, 16, -1, 18,
7308 19, 20, 21, 22, 23, 24, -1, -1, 147, 148,
7309 149, 30, 31, 32, 33, 34, 35, 36, -1, -1,
7310 39, -1, -1, -1, -1, -1, -1, 46, -1, -1,
7311 49, 50, 51, 52, 53, 54, 55, 56, 57, -1,
7312 59, 60, 61, 62, 63, 64, 65, -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, -1, -1, -1, -1, -1, -1, -1,
7316 99, -1, -1, 102, 103, 104, 105, -1, 107, -1,
7317 -1, 110, 111, 112, 113, 114, 115, 116, 117, 118,
7318 -1, -1, 3, 4, 5, -1, 7, -1, -1, -1,
7319 11, 12, -1, -1, -1, 16, -1, 18, 19, 20,
7320 21, 22, 23, 24, -1, -1, -1, -1, 147, 30,
7321 31, 32, 33, 34, 35, 36, -1, -1, 39, -1,
7322 -1, -1, -1, -1, -1, 46, -1, -1, 49, 50,
7323 51, 52, 53, 54, 55, 56, 57, -1, 59, 60,
7324 61, 62, 63, 64, 65, -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, -1, -1, -1, 99, -1,
7328 -1, 102, 103, 104, 105, -1, 107, -1, -1, 110,
7329 111, 112, 113, 114, 115, 116, 117, 118, -1, -1,
7330 3, 4, 5, -1, 7, -1, -1, -1, 11, 12,
7331 -1, -1, -1, 16, -1, 18, 19, 20, 21, 22,
7332 23, 24, -1, -1, -1, -1, 147, 30, 31, 32,
7333 33, 34, 35, 36, -1, -1, 39, -1, -1, -1,
7334 -1, -1, -1, 46, -1, -1, 49, 50, 51, 52,
7335 53, 54, 55, 56, 57, -1, 59, 60, 61, 62,
7336 63, 64, 65, -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, 95, -1, -1, -1, 99, -1, -1, 102,
7340 103, 104, 105, -1, -1, -1, -1, 110, 111, 112,
7341 113, 114, 115, 116, 117, 118, -1, -1, 3, 4,
7342 5, -1, 7, -1, -1, -1, 11, 12, -1, -1,
7343 -1, 16, -1, 18, 19, 20, 21, 22, 23, 24,
7344 -1, -1, -1, -1, 147, 30, 31, 32, 33, 34,
7345 35, 36, -1, -1, 39, -1, -1, -1, -1, -1,
7346 -1, 46, -1, -1, 49, 50, 51, 52, 53, 54,
7347 55, 56, 57, -1, 59, 60, 61, 62, 63, 64,
7348 65, -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, -1, -1, -1, 99, -1, -1, 102, 103, 104,
7352 105, -1, -1, -1, -1, 110, 111, 112, 113, 114,
7353 115, 116, 117, 118, -1, -1, 3, 4, 5, -1,
7354 7, -1, -1, -1, 11, 12, -1, -1, -1, 16,
7355 -1, 18, 19, 20, 21, 22, 23, 24, -1, -1,
7356 -1, -1, 147, 30, 31, 32, 33, 34, 35, 36,
7357 -1, -1, 39, -1, -1, -1, -1, -1, -1, 46,
7358 -1, -1, 49, 50, 51, 52, 53, 54, 55, 56,
7359 57, -1, 59, 60, 61, 62, 63, 64, 65, -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, -1,
7363 -1, -1, 99, -1, -1, 102, 103, 104, 105, -1,
7364 -1, -1, -1, 110, 111, 112, 113, 114, 115, 116,
7365 117, 118, -1, -1, 3, 4, 5, -1, 7, -1,
7366 -1, -1, 11, 12, -1, -1, -1, 16, -1, 18,
7367 19, 20, 21, 22, 23, 24, -1, -1, -1, -1,
7368 147, 30, 31, 32, 33, 34, 35, 36, -1, -1,
7369 39, -1, -1, -1, -1, -1, -1, 46, -1, -1,
7370 49, 50, 51, 52, 53, 54, 55, 56, 57, -1,
7371 59, 60, 61, 62, 63, 64, 65, -1, -1, -1,
7372 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7373 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7374 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7375 99, -1, -1, 102, 103, 104, 105, -1, -1, -1,
7376 -1, 110, 111, 112, 113, 114, 115, 116, 117, 118,
7377 -1, -1, 3, 4, 5, -1, 7, -1, -1, -1,
7378 11, 12, -1, -1, -1, 16, -1, 18, 19, 20,
7379 21, 22, 23, 24, -1, -1, -1, -1, 147, 30,
7380 31, 32, 33, 34, 35, 36, -1, -1, 39, -1,
7381 -1, -1, -1, -1, -1, 46, -1, -1, 49, 50,
7382 51, 52, 53, 54, 55, 56, 57, -1, 59, 60,
7383 61, 62, 63, 64, 65, -1, -1, -1, -1, -1,
7384 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7385 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7386 -1, -1, -1, -1, -1, 52, 53, -1, 99, 56,
7387 -1, 102, 103, 104, 105, -1, -1, -1, -1, 110,
7388 111, 112, 113, 114, 115, 116, 117, 118, -1, 76,
7389 77, 78, 79, 80, 81, 82, 83, 84, -1, -1,
7390 87, 88, -1, -1, -1, -1, 93, 94, 95, 96,
7391 -1, -1, -1, -1, -1, -1, 147, -1, -1, -1,
7392 107, 108, -1, -1, -1, -1, -1, -1, -1, -1,
7393 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7394 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7395 137, 138, 139, 140, 141, 142, 143, 144, 145, 146,
7396 -1, 148, 149, 52, 53, -1, -1, 56, -1, 156,
7397 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7398 -1, -1, -1, -1, -1, -1, -1, 76, 77, 78,
7399 79, 80, 81, 82, 83, 84, -1, -1, 87, 88,
7400 -1, -1, -1, -1, 93, 94, 95, 96, -1, -1,
7401 -1, -1, -1, -1, -1, -1, -1, -1, 107, 108,
7402 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7403 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7404 -1, -1, -1, -1, -1, -1, -1, -1, 137, 138,
7405 139, 140, 141, 142, 143, 144, 145, 146, -1, 148,
7406 149, 52, 53, -1, -1, 56, -1, 156, -1, -1,
7407 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7408 -1, -1, -1, -1, -1, 76, 77, 78, 79, 80,
7409 81, 82, 83, 84, -1, -1, 87, 88, -1, -1,
7410 -1, -1, 93, 94, 95, 96, -1, -1, -1, -1,
7411 -1, -1, -1, -1, -1, -1, 107, 108, -1, -1,
7412 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7413 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7414 -1, -1, -1, -1, -1, -1, 137, 138, 139, 140,
7415 141, 142, 143, 144, 145, 146, -1, 148, 149, 52,
7416 53, -1, -1, 56, -1, 156, -1, -1, -1, -1,
7417 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7418 -1, -1, -1, 76, 77, 78, 79, 80, 81, 82,
7419 83, 84, -1, -1, 87, 88, -1, -1, -1, -1,
7420 93, 94, 95, 96, -1, -1, -1, -1, -1, -1,
7421 -1, -1, -1, -1, 107, 108, -1, -1, -1, -1,
7422 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7423 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7424 -1, -1, -1, -1, 137, 138, 139, 140, 141, 142,
7425 143, 144, 145, 146, -1, 148, 149, 52, 53, -1,
7426 -1, 56, -1, 156, -1, -1, -1, -1, -1, -1,
7427 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7428 -1, 76, 77, 78, 79, 80, 81, 82, 83, 84,
7429 -1, -1, 87, 88, -1, -1, -1, -1, 93, 94,
7430 95, 96, -1, -1, -1, -1, -1, -1, -1, -1,
7431 -1, -1, 107, 108, -1, -1, -1, -1, -1, -1,
7432 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7433 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7434 -1, -1, 137, 138, 139, 140, 141, 142, 143, 144,
7435 145, 146, -1, 148, 149, 52, 53, -1, -1, 56,
7436 -1, 156, -1, -1, -1, -1, -1, -1, -1, -1,
7437 -1, -1, -1, -1, -1, -1, -1, -1, -1, 76,
7438 77, 78, 79, 80, 81, 82, 83, 84, -1, -1,
7439 87, 88, -1, -1, -1, -1, 93, 94, 95, 96,
7440 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7441 107, 108, -1, -1, -1, -1, -1, -1, -1, -1,
7442 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7443 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7444 137, 138, 139, 140, 141, 142, 143, 144, 145, 146,
7445 -1, 148, 149, 52, 53, -1, -1, 56, -1, 156,
7446 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7447 -1, -1, -1, -1, -1, -1, -1, 76, 77, 78,
7448 79, 80, 81, 82, 83, 84, -1, -1, 87, 88,
7449 -1, -1, -1, -1, 93, 94, 95, 96, -1, -1,
7450 -1, -1, -1, -1, -1, -1, -1, -1, 107, 108,
7451 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7452 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7453 -1, -1, -1, -1, -1, -1, -1, -1, 137, 138,
7454 139, 140, 141, 142, 143, 144, 145, 146, -1, 148,
7455 149, 52, 53, -1, -1, 56, -1, 156, -1, -1,
7456 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7457 -1, -1, -1, -1, -1, 76, 77, 78, 79, 80,
7458 81, 82, 83, 84, -1, -1, 87, 88, -1, -1,
7459 -1, -1, 93, 94, 95, 96, -1, -1, -1, -1,
7460 -1, -1, -1, -1, -1, -1, 107, 108, -1, -1,
7461 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7462 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7463 -1, -1, -1, -1, -1, -1, 137, 138, 139, 140,
7464 141, 142, 143, 144, 145, 146, -1, 148, 149, 52,
7465 53, -1, -1, 56, -1, 156, -1, -1, -1, -1,
7466 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7467 -1, -1, -1, 76, 77, 78, 79, 80, 81, 82,
7468 83, 84, -1, -1, 87, 88, -1, -1, -1, -1,
7469 93, 94, 95, 96, -1, -1, -1, -1, -1, -1,
7470 -1, -1, -1, -1, 107, 108, -1, -1, -1, -1,
7471 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7472 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7473 -1, -1, -1, -1, 137, 138, 139, 140, 141, 142,
7474 143, 144, 145, 146, -1, 148, 149, 52, 53, -1,
7475 -1, 56, -1, 156, -1, -1, -1, -1, -1, -1,
7476 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7477 -1, 76, 77, 78, 79, 80, 81, 82, 83, 84,
7478 -1, -1, 87, 88, -1, -1, -1, -1, 93, 94,
7479 95, 96, -1, -1, -1, -1, -1, -1, -1, -1,
7480 -1, -1, 107, 108, -1, -1, -1, -1, -1, -1,
7481 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7482 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7483 -1, -1, 137, 138, 139, 140, 141, 142, 143, 144,
7484 145, 146, -1, 148, 149, 52, 53, -1, -1, 56,
7485 -1, 156, -1, -1, -1, -1, -1, -1, -1, -1,
7486 -1, -1, -1, -1, -1, -1, -1, -1, -1, 76,
7487 77, 78, 79, 80, 81, 82, 83, 84, -1, -1,
7488 87, 88, -1, -1, -1, -1, 93, 94, 95, 96,
7489 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7490 107, 108, -1, -1, -1, -1, -1, -1, -1, -1,
7491 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7492 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7493 137, 138, 139, 140, 141, 142, 143, 144, 145, 146,
7494 -1, 148, 149, 52, 53, -1, -1, 56, -1, 156,
7495 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7496 -1, -1, -1, -1, -1, -1, -1, 76, 77, 78,
7497 79, 80, 81, 82, 83, 84, -1, -1, 87, 88,
7498 -1, -1, -1, -1, 93, 94, 95, 96, -1, -1,
7499 -1, -1, -1, -1, -1, -1, -1, -1, 107, 108,
7500 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7501 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7502 -1, -1, -1, -1, -1, -1, -1, -1, 137, 138,
7503 139, 140, 141, 142, 143, 144, 145, 146, -1, 148,
7504 149, 52, 53, -1, -1, 56, -1, 156, -1, -1,
7505 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7506 -1, -1, -1, -1, -1, 76, 77, 78, 79, 80,
7507 81, 82, 83, 84, -1, -1, 87, 88, -1, -1,
7508 -1, -1, 93, 94, 95, 96, -1, -1, -1, -1,
7509 -1, -1, -1, -1, -1, -1, 107, 108, -1, -1,
7510 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7511 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7512 -1, -1, -1, -1, -1, -1, 137, 138, 139, 140,
7513 141, 142, 143, 144, 145, 146, -1, 148, 149, 52,
7514 53, -1, -1, 56, -1, 156, -1, -1, -1, -1,
7515 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7516 -1, -1, -1, 76, 77, 78, 79, 80, 81, 82,
7517 83, 84, -1, -1, 87, 88, -1, -1, -1, -1,
7518 93, 94, 95, 96, -1, -1, -1, -1, -1, -1,
7519 -1, -1, -1, -1, 107, 108, -1, -1, -1, -1,
7520 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7521 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7522 -1, -1, -1, -1, 137, 138, 139, 140, 141, 142,
7523 143, 144, 145, 146, -1, 148, 149, -1, -1, -1,
7524 -1, -1, -1, 156
7525};
7526
7527/* YYSTOS[STATE-NUM] -- The symbol kind of the accessing symbol of
7528 state STATE-NUM. */
7529static const yytype_int16 yystos[] =
7530{
7531 0, 165, 166, 1, 3, 4, 5, 6, 7, 11,
7532 12, 16, 18, 19, 20, 21, 22, 23, 24, 30,
7533 31, 32, 33, 34, 35, 36, 39, 45, 46, 47,
7534 48, 49, 50, 51, 52, 53, 54, 55, 56, 57,
7535 59, 60, 61, 62, 63, 64, 65, 76, 77, 91,
7536 92, 99, 102, 103, 104, 105, 107, 110, 111, 112,
7537 113, 114, 115, 116, 117, 118, 147, 148, 149, 164,
7538 167, 168, 180, 182, 183, 184, 185, 186, 187, 191,
7539 195, 197, 203, 206, 208, 209, 210, 212, 214, 215,
7540 216, 217, 226, 227, 228, 229, 230, 231, 234, 255,
7541 267, 268, 269, 270, 271, 272, 273, 274, 275, 276,
7542 277, 278, 287, 288, 324, 329, 330, 380, 381, 382,
7543 383, 384, 385, 387, 388, 391, 392, 394, 395, 396,
7544 397, 410, 411, 413, 414, 415, 416, 417, 418, 419,
7545 420, 421, 482, 0, 3, 4, 5, 6, 7, 8,
7546 9, 10, 11, 12, 13, 14, 15, 16, 17, 18,
7547 19, 20, 21, 22, 23, 24, 25, 26, 30, 31,
7548 32, 33, 34, 35, 36, 37, 38, 39, 45, 46,
7549 47, 48, 49, 50, 51, 52, 53, 56, 76, 77,
7550 78, 79, 80, 81, 82, 83, 84, 87, 88, 93,
7551 94, 95, 96, 107, 108, 137, 138, 139, 140, 141,
7552 142, 143, 144, 145, 146, 148, 149, 156, 220, 221,
7553 222, 224, 225, 410, 179, 179, 179, 39, 58, 99,
7554 102, 107, 108, 109, 112, 148, 187, 209, 217, 227,
7555 238, 239, 245, 246, 249, 251, 252, 268, 417, 418,
7556 420, 421, 469, 470, 246, 157, 242, 247, 248, 154,
7557 157, 189, 54, 221, 189, 151, 169, 170, 235, 482,
7558 21, 22, 32, 195, 197, 208, 227, 268, 287, 288,
7559 227, 227, 227, 56, 47, 102, 171, 176, 177, 182,
7560 211, 212, 482, 171, 240, 251, 469, 482, 239, 468,
7561 469, 482, 46, 99, 147, 155, 195, 197, 216, 255,
7562 268, 417, 418, 421, 322, 220, 400, 412, 416, 400,
7563 401, 402, 161, 386, 386, 386, 386, 415, 203, 227,
7564 227, 154, 160, 163, 480, 481, 169, 40, 41, 42,
7565 43, 44, 37, 38, 157, 424, 425, 426, 427, 428,
7566 424, 427, 26, 151, 242, 248, 279, 331, 28, 280,
7567 328, 134, 155, 102, 107, 214, 134, 25, 78, 79,
7568 80, 81, 82, 83, 84, 85, 86, 87, 88, 89,
7569 90, 95, 96, 101, 135, 137, 138, 139, 140, 141,
7570 142, 143, 144, 145, 146, 233, 233, 69, 97, 98,
7571 153, 474, 475, 256, 1, 191, 198, 199, 199, 200,
7572 202, 202, 163, 199, 481, 99, 210, 217, 268, 293,
7573 417, 418, 421, 52, 56, 95, 99, 218, 219, 268,
7574 417, 418, 421, 219, 33, 34, 35, 36, 49, 50,
7575 51, 52, 56, 157, 194, 220, 419, 464, 465, 466,
7576 246, 157, 248, 98, 474, 475, 331, 383, 100, 100,
7577 155, 239, 56, 239, 239, 239, 400, 134, 101, 155,
7578 250, 482, 98, 153, 474, 100, 100, 155, 250, 92,
7579 244, 246, 251, 448, 469, 482, 246, 189, 191, 476,
7580 191, 54, 64, 65, 181, 157, 235, 236, 164, 424,
7581 424, 98, 474, 100, 178, 211, 158, 163, 481, 476,
7582 257, 159, 155, 189, 479, 155, 479, 152, 479, 189,
7583 56, 415, 213, 214, 426, 155, 98, 153, 474, 319,
7584 66, 119, 121, 122, 403, 119, 119, 403, 67, 403,
7585 161, 389, 398, 393, 399, 78, 160, 168, 171, 199,
7586 199, 199, 199, 235, 237, 191, 191, 52, 54, 55,
7587 56, 57, 58, 78, 92, 102, 107, 108, 109, 141,
7588 144, 298, 367, 425, 429, 430, 432, 433, 436, 437,
7589 439, 440, 441, 442, 448, 449, 450, 451, 452, 453,
7590 454, 455, 456, 457, 458, 459, 460, 461, 134, 265,
7591 442, 134, 266, 332, 333, 106, 207, 334, 335, 335,
7592 235, 211, 155, 216, 155, 235, 193, 227, 227, 227,
7593 227, 227, 227, 227, 227, 227, 227, 227, 227, 227,
7594 192, 227, 227, 227, 227, 227, 227, 227, 227, 227,
7595 227, 227, 52, 53, 56, 224, 471, 472, 244, 251,
7596 52, 53, 56, 224, 471, 242, 171, 174, 13, 289,
7597 480, 289, 199, 171, 171, 259, 163, 56, 98, 153,
7598 474, 25, 199, 52, 56, 218, 138, 423, 482, 98,
7599 153, 474, 264, 467, 69, 98, 473, 246, 476, 52,
7600 56, 242, 471, 235, 235, 223, 100, 124, 235, 239,
7601 239, 249, 252, 469, 52, 56, 244, 52, 56, 235,
7602 235, 470, 476, 155, 476, 155, 158, 476, 221, 236,
7603 227, 152, 134, 134, 56, 471, 471, 235, 170, 476,
7604 177, 158, 469, 155, 213, 52, 56, 244, 52, 56,
7605 320, 405, 404, 119, 390, 403, 66, 119, 119, 390,
7606 66, 119, 227, 152, 182, 102, 107, 294, 295, 296,
7607 297, 450, 155, 431, 462, 463, 155, 431, 155, 438,
7608 463, 476, 299, 300, 155, 438, 239, 34, 52, 52,
7609 155, 438, 34, 52, 39, 188, 209, 227, 232, 174,
7610 480, 188, 232, 174, 319, 152, 333, 319, 10, 68,
7611 286, 286, 107, 203, 204, 205, 239, 251, 253, 254,
7612 476, 213, 155, 99, 185, 190, 205, 217, 227, 239,
7613 241, 254, 268, 421, 341, 341, 189, 100, 100, 151,
7614 242, 248, 189, 477, 155, 100, 100, 242, 243, 248,
7615 482, 235, 286, 171, 13, 171, 27, 290, 480, 286,
7616 286, 17, 283, 337, 25, 258, 343, 52, 56, 244,
7617 52, 56, 260, 263, 422, 262, 52, 56, 218, 244,
7618 174, 191, 196, 476, 243, 248, 190, 227, 241, 190,
7619 241, 221, 235, 239, 250, 100, 100, 477, 100, 100,
7620 448, 469, 191, 39, 190, 241, 479, 214, 477, 321,
7621 406, 409, 416, 421, 386, 403, 386, 386, 386, 296,
7622 450, 155, 476, 155, 461, 429, 455, 457, 433, 436,
7623 453, 459, 134, 239, 437, 452, 459, 451, 453, 189,
7624 44, 44, 286, 286, 320, 152, 320, 239, 155, 44,
7625 213, 56, 44, 134, 44, 98, 153, 474, 339, 339,
7626 136, 235, 235, 333, 207, 159, 100, 235, 235, 207,
7627 8, 281, 376, 482, 14, 15, 284, 285, 291, 292,
7628 482, 292, 201, 107, 239, 336, 286, 341, 337, 286,
7629 477, 199, 480, 199, 174, 477, 286, 476, 194, 331,
7630 328, 235, 235, 100, 235, 235, 476, 155, 476, 189,
7631 179, 407, 476, 294, 297, 295, 431, 155, 438, 155,
7632 438, 155, 438, 155, 438, 438, 188, 232, 237, 237,
7633 321, 321, 107, 239, 237, 237, 235, 237, 52, 56,
7634 244, 52, 56, 340, 340, 227, 190, 241, 190, 241,
7635 152, 235, 190, 241, 190, 241, 239, 254, 377, 482,
7636 175, 284, 171, 199, 286, 286, 239, 155, 289, 339,
7637 286, 290, 174, 480, 286, 235, 157, 298, 325, 425,
7638 430, 434, 435, 437, 444, 445, 446, 447, 448, 453,
7639 459, 461, 171, 155, 155, 453, 453, 459, 453, 227,
7640 227, 179, 179, 239, 182, 182, 227, 477, 52, 56,
7641 58, 91, 92, 99, 102, 104, 105, 107, 112, 140,
7642 324, 346, 347, 348, 350, 353, 357, 358, 359, 362,
7643 363, 364, 365, 366, 367, 368, 369, 370, 371, 372,
7644 373, 374, 375, 380, 381, 384, 385, 388, 392, 395,
7645 397, 418, 455, 346, 190, 241, 101, 378, 482, 9,
7646 282, 379, 482, 172, 289, 107, 239, 171, 340, 261,
7647 286, 447, 155, 303, 482, 323, 155, 303, 155, 443,
7648 482, 155, 443, 155, 443, 0, 120, 408, 295, 438,
7649 438, 155, 438, 438, 139, 313, 314, 482, 313, 371,
7650 371, 56, 218, 340, 347, 355, 356, 357, 358, 361,
7651 477, 189, 340, 478, 52, 400, 52, 102, 416, 101,
7652 155, 139, 155, 155, 347, 89, 90, 98, 153, 157,
7653 351, 352, 52, 99, 217, 268, 417, 418, 421, 289,
7654 176, 171, 171, 239, 292, 337, 338, 345, 346, 171,
7655 189, 316, 461, 29, 123, 326, 457, 435, 453, 459,
7656 437, 459, 453, 453, 298, 301, 302, 304, 305, 307,
7657 308, 310, 311, 312, 315, 451, 453, 454, 459, 461,
7658 171, 174, 347, 477, 347, 359, 361, 477, 155, 152,
7659 235, 124, 199, 372, 355, 359, 349, 360, 361, 112,
7660 364, 368, 371, 371, 218, 340, 477, 340, 476, 355,
7661 358, 362, 355, 358, 362, 56, 98, 153, 474, 171,
7662 163, 173, 291, 289, 40, 41, 286, 160, 158, 327,
7663 171, 303, 155, 443, 155, 443, 155, 443, 155, 443,
7664 443, 438, 303, 155, 303, 155, 309, 482, 316, 300,
7665 155, 306, 309, 99, 268, 155, 309, 476, 155, 155,
7666 354, 476, 155, 353, 155, 400, 476, 476, 476, 477,
7667 477, 477, 52, 56, 244, 52, 56, 376, 379, 342,
7668 199, 199, 52, 317, 318, 449, 174, 152, 453, 453,
7669 459, 453, 301, 457, 305, 307, 453, 459, 139, 268,
7670 308, 459, 56, 98, 453, 360, 362, 360, 359, 361,
7671 477, 171, 155, 189, 286, 443, 443, 155, 443, 443,
7672 303, 155, 309, 155, 309, 155, 309, 155, 309, 52,
7673 56, 309, 155, 478, 292, 343, 344, 318, 453, 453,
7674 453, 459, 453, 443, 309, 309, 155, 309, 309, 453,
7675 309
7676};
7677
7678/* YYR1[RULE-NUM] -- Symbol kind of the left-hand side of rule RULE-NUM. */
7679static const yytype_int16 yyr1[] =
7680{
7681 0, 162, 165, 163, 163, 164, 166, 167, 167, 167,
7682 168, 168, 169, 170, 171, 172, 173, 174, 175, 174,
7683 176, 176, 176, 177, 178, 177, 179, 180, 181, 182,
7684 182, 182, 182, 182, 182, 182, 182, 182, 182, 182,
7685 182, 182, 183, 182, 182, 182, 182, 182, 184, 185,
7686 186, 186, 186, 186, 186, 186, 186, 186, 185, 187,
7687 187, 185, 188, 188, 189, 189, 188, 190, 190, 190,
7688 191, 191, 191, 191, 191, 192, 191, 193, 191, 191,
7689 194, 195, 196, 197, 198, 199, 199, 200, 201, 202,
7690 203, 203, 204, 205, 206, 206, 207, 208, 208, 208,
7691 209, 209, 209, 209, 209, 209, 209, 209, 209, 209,
7692 209, 209, 210, 210, 211, 211, 212, 212, 212, 213,
7693 213, 212, 212, 212, 212, 212, 212, 212, 214, 214,
7694 215, 215, 216, 216, 216, 216, 216, 216, 216, 216,
7695 216, 217, 217, 217, 217, 217, 217, 217, 217, 217,
7696 218, 218, 219, 219, 219, 220, 220, 220, 220, 220,
7697 221, 221, 222, 223, 222, 224, 224, 224, 224, 224,
7698 224, 224, 224, 224, 224, 224, 224, 224, 224, 224,
7699 224, 224, 224, 224, 224, 224, 224, 224, 224, 224,
7700 224, 224, 224, 224, 224, 225, 225, 225, 225, 225,
7701 225, 225, 225, 225, 225, 225, 225, 225, 225, 225,
7702 225, 225, 225, 225, 225, 225, 225, 225, 225, 225,
7703 225, 225, 225, 225, 225, 225, 225, 225, 225, 225,
7704 225, 225, 225, 225, 225, 225, 226, 227, 228, 228,
7705 228, 228, 228, 228, 228, 228, 227, 229, 229, 229,
7706 229, 229, 229, 227, 227, 227, 227, 227, 227, 227,
7707 227, 227, 227, 227, 227, 227, 227, 227, 227, 227,
7708 227, 227, 227, 227, 227, 227, 227, 227, 227, 227,
7709 230, 230, 227, 227, 227, 231, 232, 232, 232, 233,
7710 233, 233, 233, 234, 234, 235, 236, 237, 238, 239,
7711 240, 240, 240, 240, 241, 241, 242, 242, 242, 243,
7712 243, 244, 244, 244, 244, 244, 245, 246, 246, 246,
7713 246, 246, 246, 247, 248, 249, 249, 250, 250, 251,
7714 251, 251, 251, 252, 252, 253, 253, 254, 254, 254,
7715 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
7716 255, 256, 255, 257, 255, 255, 255, 255, 255, 255,
7717 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
7718 255, 255, 255, 255, 255, 258, 255, 259, 255, 255,
7719 260, 261, 255, 262, 255, 263, 255, 264, 255, 265,
7720 255, 266, 255, 255, 255, 255, 255, 267, 268, 269,
7721 270, 271, 272, 273, 274, 275, 276, 277, 278, 279,
7722 280, 281, 282, 283, 284, 285, 286, 286, 287, 288,
7723 289, 289, 289, 290, 290, 291, 291, 292, 292, 293,
7724 293, 294, 294, 295, 295, 296, 296, 296, 296, 296,
7725 297, 297, 298, 298, 299, 300, 301, 301, 302, 302,
7726 303, 303, 304, 304, 304, 304, 305, 306, 307, 308,
7727 308, 309, 309, 310, 310, 310, 310, 310, 310, 310,
7728 310, 310, 310, 310, 310, 311, 311, 311, 312, 311,
7729 313, 313, 314, 315, 315, 316, 316, 317, 317, 318,
7730 318, 319, 320, 321, 322, 323, 324, 325, 325, 326,
7731 327, 326, 328, 329, 329, 329, 329, 329, 330, 330,
7732 330, 330, 330, 330, 330, 330, 331, 331, 332, 333,
7733 334, 335, 336, 336, 336, 336, 337, 338, 338, 339,
7734 340, 341, 342, 343, 344, 344, 345, 345, 345, 346,
7735 346, 346, 346, 346, 346, 347, 348, 348, 349, 350,
7736 350, 351, 352, 353, 353, 353, 353, 353, 353, 353,
7737 353, 353, 353, 353, 353, 353, 354, 353, 353, 353,
7738 355, 355, 355, 355, 355, 355, 356, 356, 357, 357,
7739 358, 359, 359, 360, 360, 361, 362, 362, 362, 362,
7740 363, 363, 364, 364, 365, 365, 366, 366, 367, 368,
7741 368, 369, 370, 370, 370, 370, 370, 370, 369, 369,
7742 369, 369, 371, 371, 371, 371, 371, 371, 371, 371,
7743 371, 371, 372, 373, 373, 374, 375, 375, 375, 376,
7744 376, 377, 377, 377, 378, 378, 379, 379, 380, 380,
7745 381, 382, 382, 382, 383, 384, 385, 386, 386, 387,
7746 388, 389, 389, 390, 390, 391, 392, 393, 393, 394,
7747 395, 396, 397, 398, 398, 399, 399, 400, 400, 401,
7748 401, 402, 402, 403, 404, 403, 405, 406, 407, 403,
7749 408, 408, 409, 409, 410, 410, 411, 412, 412, 413,
7750 414, 414, 415, 415, 415, 415, 416, 416, 416, 417,
7751 417, 417, 418, 418, 418, 418, 418, 418, 418, 419,
7752 419, 420, 420, 421, 421, 422, 423, 423, 424, 424,
7753 425, 426, 427, 428, 427, 429, 429, 430, 430, 431,
7754 431, 432, 432, 432, 432, 433, 433, 434, 434, 434,
7755 434, 435, 435, 436, 437, 437, 438, 438, 439, 439,
7756 439, 439, 439, 439, 439, 439, 439, 439, 439, 439,
7757 440, 440, 441, 440, 440, 442, 443, 443, 444, 444,
7758 444, 444, 444, 444, 444, 444, 444, 444, 444, 444,
7759 445, 445, 446, 445, 445, 447, 448, 449, 449, 449,
7760 449, 450, 450, 451, 452, 452, 453, 453, 454, 455,
7761 455, 456, 457, 457, 458, 458, 459, 459, 460, 460,
7762 461, 461, 461, 462, 462, 463, 464, 465, 466, 467,
7763 466, 468, 468, 469, 469, 470, 470, 470, 470, 470,
7764 470, 471, 471, 471, 471, 472, 472, 472, 473, 473,
7765 474, 474, 475, 475, 476, 477, 478, 479, 479, 480,
7766 480, 481, 481, 482
7767};
7768
7769/* YYR2[RULE-NUM] -- Number of symbols on the right-hand side of rule RULE-NUM. */
7770static const yytype_int8 yyr2[] =
7771{
7772 0, 2, 0, 0, 1, 2, 2, 1, 1, 3,
7773 1, 2, 1, 3, 2, 0, 0, 8, 0, 5,
7774 1, 1, 3, 1, 0, 3, 0, 2, 0, 4,
7775 3, 3, 3, 2, 3, 3, 3, 3, 4, 4,
7776 1, 4, 4, 1, 7, 4, 1, 1, 4, 1,
7777 4, 7, 6, 6, 6, 6, 5, 4, 1, 4,
7778 4, 1, 1, 4, 0, 1, 3, 1, 4, 1,
7779 1, 3, 3, 3, 2, 0, 7, 0, 7, 1,
7780 1, 2, 0, 5, 1, 1, 1, 0, 0, 4,
7781 1, 1, 1, 1, 1, 4, 3, 1, 1, 1,
7782 2, 3, 4, 5, 4, 5, 6, 2, 2, 2,
7783 2, 2, 1, 3, 1, 3, 1, 2, 3, 1,
7784 3, 5, 2, 4, 2, 4, 1, 3, 1, 3,
7785 2, 3, 1, 1, 4, 3, 3, 3, 3, 2,
7786 1, 1, 1, 4, 3, 3, 3, 3, 2, 1,
7787 1, 1, 2, 1, 3, 1, 1, 1, 1, 1,
7788 1, 1, 1, 0, 4, 1, 1, 1, 1, 1,
7789 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
7790 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
7791 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
7792 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
7793 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
7794 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
7795 1, 1, 1, 1, 1, 1, 4, 1, 4, 7,
7796 6, 6, 6, 6, 5, 4, 1, 3, 3, 2,
7797 2, 2, 2, 1, 3, 3, 3, 3, 3, 3,
7798 4, 2, 2, 3, 3, 3, 3, 1, 3, 3,
7799 3, 3, 3, 2, 2, 3, 3, 3, 3, 4,
7800 4, 4, 1, 1, 1, 6, 1, 4, 3, 1,
7801 1, 1, 1, 3, 3, 1, 1, 1, 1, 1,
7802 1, 2, 4, 2, 1, 4, 3, 5, 3, 1,
7803 1, 1, 1, 2, 4, 2, 1, 1, 1, 2,
7804 2, 4, 1, 0, 2, 2, 1, 2, 1, 1,
7805 1, 3, 3, 2, 1, 1, 1, 3, 4, 2,
7806 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
7807 1, 0, 4, 0, 4, 3, 3, 2, 3, 3,
7808 1, 4, 3, 1, 6, 4, 3, 2, 1, 2,
7809 1, 6, 6, 4, 4, 0, 6, 0, 5, 5,
7810 0, 0, 9, 0, 6, 0, 7, 0, 5, 0,
7811 5, 0, 5, 1, 1, 1, 1, 1, 1, 1,
7812 1, 1, 2, 2, 1, 2, 1, 1, 1, 1,
7813 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
7814 1, 1, 2, 1, 1, 1, 5, 1, 2, 1,
7815 1, 1, 3, 1, 3, 1, 3, 5, 1, 3,
7816 2, 1, 1, 1, 0, 2, 2, 1, 1, 3,
7817 2, 1, 4, 2, 2, 1, 1, 1, 3, 1,
7818 3, 2, 1, 6, 8, 4, 6, 4, 6, 4,
7819 6, 2, 4, 2, 4, 1, 2, 2, 1, 1,
7820 1, 1, 4, 0, 1, 1, 4, 1, 3, 1,
7821 1, 0, 0, 0, 0, 0, 9, 4, 1, 3,
7822 0, 4, 3, 2, 4, 5, 5, 3, 2, 4,
7823 4, 3, 3, 2, 1, 4, 3, 3, 0, 7,
7824 0, 7, 1, 2, 3, 4, 5, 1, 1, 0,
7825 0, 0, 0, 9, 1, 1, 1, 3, 3, 1,
7826 2, 3, 1, 1, 1, 1, 3, 1, 0, 4,
7827 1, 2, 2, 1, 1, 4, 4, 4, 3, 4,
7828 4, 4, 3, 3, 3, 2, 0, 6, 2, 4,
7829 1, 1, 2, 2, 4, 1, 2, 3, 1, 3,
7830 5, 2, 1, 1, 3, 1, 3, 1, 2, 1,
7831 1, 3, 2, 1, 1, 3, 2, 1, 2, 1,
7832 1, 1, 3, 3, 2, 2, 2, 2, 1, 1,
7833 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
7834 1, 1, 1, 2, 2, 4, 2, 3, 1, 6,
7835 1, 1, 1, 1, 2, 1, 3, 1, 1, 1,
7836 1, 1, 1, 2, 3, 3, 3, 1, 2, 4,
7837 1, 0, 3, 1, 2, 4, 1, 0, 3, 4,
7838 1, 4, 1, 0, 3, 0, 3, 0, 2, 0,
7839 2, 0, 2, 1, 0, 3, 0, 0, 0, 6,
7840 1, 1, 1, 1, 1, 1, 2, 1, 1, 3,
7841 1, 2, 1, 1, 1, 1, 1, 1, 1, 1,
7842 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
7843 1, 1, 1, 1, 1, 0, 4, 1, 1, 1,
7844 0, 3, 1, 0, 3, 2, 1, 1, 3, 2,
7845 1, 4, 2, 2, 1, 1, 1, 4, 2, 2,
7846 1, 1, 1, 3, 1, 3, 2, 1, 6, 8,
7847 4, 6, 4, 6, 4, 6, 2, 4, 2, 4,
7848 1, 2, 1, 1, 1, 1, 2, 1, 6, 8,
7849 4, 6, 4, 6, 4, 6, 2, 4, 2, 4,
7850 1, 2, 1, 1, 1, 1, 1, 1, 1, 1,
7851 1, 1, 1, 1, 1, 3, 1, 3, 1, 1,
7852 1, 1, 2, 1, 1, 1, 2, 1, 1, 1,
7853 2, 2, 1, 0, 1, 1, 1, 1, 1, 0,
7854 4, 1, 2, 1, 3, 3, 2, 1, 4, 2,
7855 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
7856 1, 1, 1, 1, 2, 2, 2, 1, 1, 1,
7857 1, 1, 2, 0
7858};
7859
7860
7861enum { YYENOMEM = -2 };
7862
7863#define yyerrok (yyerrstatus = 0)
7864#define yyclearin (yychar = YYEMPTY)
7865
7866#define YYACCEPT goto yyacceptlab
7867#define YYABORT goto yyabortlab
7868#define YYERROR goto yyerrorlab
7869#define YYNOMEM goto yyexhaustedlab
7870
7871
7872#define YYRECOVERING() (!!yyerrstatus)
7873
7874#define YYBACKUP(Token, Value) \
7875 do \
7876 if (yychar == YYEMPTY) \
7877 { \
7878 yychar = (Token); \
7879 yylval = (Value); \
7880 YYPOPSTACK (yylen); \
7881 yystate = *yyssp; \
7882 goto yybackup; \
7883 } \
7884 else \
7885 { \
7886 yyerror (&yylloc, p, YY_("syntax error: cannot back up")); \
7887 YYERROR; \
7888 } \
7889 while (0)
7890
7891/* Backward compatibility with an undocumented macro.
7892 Use YYerror or YYUNDEF. */
7893#define YYERRCODE YYUNDEF
7894
7895/* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
7896 If N is 0, then set CURRENT to the empty location which ends
7897 the previous symbol: RHS[0] (always defined). */
7898
7899#ifndef YYLLOC_DEFAULT
7900# define YYLLOC_DEFAULT(Current, Rhs, N) \
7901 do \
7902 if (N) \
7903 { \
7904 (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \
7905 (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \
7906 (Current).last_line = YYRHSLOC (Rhs, N).last_line; \
7907 (Current).last_column = YYRHSLOC (Rhs, N).last_column; \
7908 } \
7909 else \
7910 { \
7911 (Current).first_line = (Current).last_line = \
7912 YYRHSLOC (Rhs, 0).last_line; \
7913 (Current).first_column = (Current).last_column = \
7914 YYRHSLOC (Rhs, 0).last_column; \
7915 } \
7916 while (0)
7917#endif
7918
7919#define YYRHSLOC(Rhs, K) ((Rhs)[K])
7920
7921
7922/* Enable debugging if requested. */
7923#if YYDEBUG
7924
7925# ifndef YYFPRINTF
7926# include <stdio.h> /* INFRINGES ON USER NAME SPACE */
7927# define YYFPRINTF fprintf
7928# endif
7929
7930# define YYDPRINTF(Args) \
7931do { \
7932 if (yydebug) \
7933 YYFPRINTF Args; \
7934} while (0)
7935
7936
7937/* YYLOCATION_PRINT -- Print the location on the stream.
7938 This macro was not mandated originally: define only if we know
7939 we won't break user code: when these are the locations we know. */
7940
7941# ifndef YYLOCATION_PRINT
7942
7943# if defined YY_LOCATION_PRINT
7944
7945 /* Temporary convenience wrapper in case some people defined the
7946 undocumented and private YY_LOCATION_PRINT macros. */
7947# define YYLOCATION_PRINT(File, Loc, p) YY_LOCATION_PRINT(File, *(Loc), p)
7948
7949# elif defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL
7950
7951/* Print *YYLOCP on YYO. Private, do not rely on its existence. */
7952
7953YY_ATTRIBUTE_UNUSED
7954static int
7955yy_location_print_ (FILE *yyo, YYLTYPE const * const yylocp)
7956{
7957 int res = 0;
7958 int end_col = 0 != yylocp->last_column ? yylocp->last_column - 1 : 0;
7959 if (0 <= yylocp->first_line)
7960 {
7961 res += YYFPRINTF (yyo, "%d", yylocp->first_line);
7962 if (0 <= yylocp->first_column)
7963 res += YYFPRINTF (yyo, ".%d", yylocp->first_column);
7964 }
7965 if (0 <= yylocp->last_line)
7966 {
7967 if (yylocp->first_line < yylocp->last_line)
7968 {
7969 res += YYFPRINTF (yyo, "-%d", yylocp->last_line);
7970 if (0 <= end_col)
7971 res += YYFPRINTF (yyo, ".%d", end_col);
7972 }
7973 else if (0 <= end_col && yylocp->first_column < end_col)
7974 res += YYFPRINTF (yyo, "-%d", end_col);
7975 }
7976 return res;
7977}
7978
7979# define YYLOCATION_PRINT yy_location_print_
7980
7981 /* Temporary convenience wrapper in case some people defined the
7982 undocumented and private YY_LOCATION_PRINT macros. */
7983# define YY_LOCATION_PRINT(File, Loc, p) YYLOCATION_PRINT(File, &(Loc), p)
7984
7985# else
7986
7987# define YYLOCATION_PRINT(File, Loc, p) ((void) 0)
7988 /* Temporary convenience wrapper in case some people defined the
7989 undocumented and private YY_LOCATION_PRINT macros. */
7990# define YY_LOCATION_PRINT YYLOCATION_PRINT
7991
7992# endif
7993# endif /* !defined YYLOCATION_PRINT */
7994
7995
7996# define YY_SYMBOL_PRINT(Title, Kind, Value, Location, p) \
7997do { \
7998 if (yydebug) \
7999 { \
8000 YYFPRINTF (stderr, "%s ", Title); \
8001 yy_symbol_print (stderr, \
8002 Kind, Value, Location, p); \
8003 YYFPRINTF (stderr, "\n"); \
8004 } \
8005} while (0)
8006
8007
8008/*-----------------------------------.
8009| Print this symbol's value on YYO. |
8010`-----------------------------------*/
8011
8012static void
8013yy_symbol_value_print (FILE *yyo,
8014 yysymbol_kind_t yykind, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp, struct parser_params *p)
8015{
8016 FILE *yyoutput = yyo;
8017 YY_USE (yyoutput);
8018 YY_USE (yylocationp);
8019 YY_USE (p);
8020 if (!yyvaluep)
8021 return;
8022 YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
8023switch (yykind)
8024 {
8025 case YYSYMBOL_keyword_class: /* "'class'" */
8026#line 2627 "parse.y"
8027 {
8028 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8029}
8030#line 8031 "parse.c"
8031 break;
8032
8033 case YYSYMBOL_keyword_module: /* "'module'" */
8034#line 2627 "parse.y"
8035 {
8036 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8037}
8038#line 8039 "parse.c"
8039 break;
8040
8041 case YYSYMBOL_keyword_def: /* "'def'" */
8042#line 2627 "parse.y"
8043 {
8044 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8045}
8046#line 8047 "parse.c"
8047 break;
8048
8049 case YYSYMBOL_keyword_undef: /* "'undef'" */
8050#line 2627 "parse.y"
8051 {
8052 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8053}
8054#line 8055 "parse.c"
8055 break;
8056
8057 case YYSYMBOL_keyword_begin: /* "'begin'" */
8058#line 2627 "parse.y"
8059 {
8060 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8061}
8062#line 8063 "parse.c"
8063 break;
8064
8065 case YYSYMBOL_keyword_rescue: /* "'rescue'" */
8066#line 2627 "parse.y"
8067 {
8068 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8069}
8070#line 8071 "parse.c"
8071 break;
8072
8073 case YYSYMBOL_keyword_ensure: /* "'ensure'" */
8074#line 2627 "parse.y"
8075 {
8076 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8077}
8078#line 8079 "parse.c"
8079 break;
8080
8081 case YYSYMBOL_keyword_end: /* "'end'" */
8082#line 2627 "parse.y"
8083 {
8084 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8085}
8086#line 8087 "parse.c"
8087 break;
8088
8089 case YYSYMBOL_keyword_if: /* "'if'" */
8090#line 2627 "parse.y"
8091 {
8092 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8093}
8094#line 8095 "parse.c"
8095 break;
8096
8097 case YYSYMBOL_keyword_unless: /* "'unless'" */
8098#line 2627 "parse.y"
8099 {
8100 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8101}
8102#line 8103 "parse.c"
8103 break;
8104
8105 case YYSYMBOL_keyword_then: /* "'then'" */
8106#line 2627 "parse.y"
8107 {
8108 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8109}
8110#line 8111 "parse.c"
8111 break;
8112
8113 case YYSYMBOL_keyword_elsif: /* "'elsif'" */
8114#line 2627 "parse.y"
8115 {
8116 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8117}
8118#line 8119 "parse.c"
8119 break;
8120
8121 case YYSYMBOL_keyword_else: /* "'else'" */
8122#line 2627 "parse.y"
8123 {
8124 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8125}
8126#line 8127 "parse.c"
8127 break;
8128
8129 case YYSYMBOL_keyword_case: /* "'case'" */
8130#line 2627 "parse.y"
8131 {
8132 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8133}
8134#line 8135 "parse.c"
8135 break;
8136
8137 case YYSYMBOL_keyword_when: /* "'when'" */
8138#line 2627 "parse.y"
8139 {
8140 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8141}
8142#line 8143 "parse.c"
8143 break;
8144
8145 case YYSYMBOL_keyword_while: /* "'while'" */
8146#line 2627 "parse.y"
8147 {
8148 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8149}
8150#line 8151 "parse.c"
8151 break;
8152
8153 case YYSYMBOL_keyword_until: /* "'until'" */
8154#line 2627 "parse.y"
8155 {
8156 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8157}
8158#line 8159 "parse.c"
8159 break;
8160
8161 case YYSYMBOL_keyword_for: /* "'for'" */
8162#line 2627 "parse.y"
8163 {
8164 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8165}
8166#line 8167 "parse.c"
8167 break;
8168
8169 case YYSYMBOL_keyword_break: /* "'break'" */
8170#line 2627 "parse.y"
8171 {
8172 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8173}
8174#line 8175 "parse.c"
8175 break;
8176
8177 case YYSYMBOL_keyword_next: /* "'next'" */
8178#line 2627 "parse.y"
8179 {
8180 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8181}
8182#line 8183 "parse.c"
8183 break;
8184
8185 case YYSYMBOL_keyword_redo: /* "'redo'" */
8186#line 2627 "parse.y"
8187 {
8188 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8189}
8190#line 8191 "parse.c"
8191 break;
8192
8193 case YYSYMBOL_keyword_retry: /* "'retry'" */
8194#line 2627 "parse.y"
8195 {
8196 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8197}
8198#line 8199 "parse.c"
8199 break;
8200
8201 case YYSYMBOL_keyword_in: /* "'in'" */
8202#line 2627 "parse.y"
8203 {
8204 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8205}
8206#line 8207 "parse.c"
8207 break;
8208
8209 case YYSYMBOL_keyword_do: /* "'do'" */
8210#line 2627 "parse.y"
8211 {
8212 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8213}
8214#line 8215 "parse.c"
8215 break;
8216
8217 case YYSYMBOL_keyword_do_cond: /* "'do' for condition" */
8218#line 2627 "parse.y"
8219 {
8220 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8221}
8222#line 8223 "parse.c"
8223 break;
8224
8225 case YYSYMBOL_keyword_do_block: /* "'do' for block" */
8226#line 2627 "parse.y"
8227 {
8228 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8229}
8230#line 8231 "parse.c"
8231 break;
8232
8233 case YYSYMBOL_keyword_do_LAMBDA: /* "'do' for lambda" */
8234#line 2627 "parse.y"
8235 {
8236 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8237}
8238#line 8239 "parse.c"
8239 break;
8240
8241 case YYSYMBOL_keyword_return: /* "'return'" */
8242#line 2627 "parse.y"
8243 {
8244 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8245}
8246#line 8247 "parse.c"
8247 break;
8248
8249 case YYSYMBOL_keyword_yield: /* "'yield'" */
8250#line 2627 "parse.y"
8251 {
8252 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8253}
8254#line 8255 "parse.c"
8255 break;
8256
8257 case YYSYMBOL_keyword_super: /* "'super'" */
8258#line 2627 "parse.y"
8259 {
8260 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8261}
8262#line 8263 "parse.c"
8263 break;
8264
8265 case YYSYMBOL_keyword_self: /* "'self'" */
8266#line 2627 "parse.y"
8267 {
8268 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8269}
8270#line 8271 "parse.c"
8271 break;
8272
8273 case YYSYMBOL_keyword_nil: /* "'nil'" */
8274#line 2627 "parse.y"
8275 {
8276 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8277}
8278#line 8279 "parse.c"
8279 break;
8280
8281 case YYSYMBOL_keyword_true: /* "'true'" */
8282#line 2627 "parse.y"
8283 {
8284 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8285}
8286#line 8287 "parse.c"
8287 break;
8288
8289 case YYSYMBOL_keyword_false: /* "'false'" */
8290#line 2627 "parse.y"
8291 {
8292 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8293}
8294#line 8295 "parse.c"
8295 break;
8296
8297 case YYSYMBOL_keyword_and: /* "'and'" */
8298#line 2627 "parse.y"
8299 {
8300 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8301}
8302#line 8303 "parse.c"
8303 break;
8304
8305 case YYSYMBOL_keyword_or: /* "'or'" */
8306#line 2627 "parse.y"
8307 {
8308 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8309}
8310#line 8311 "parse.c"
8311 break;
8312
8313 case YYSYMBOL_keyword_not: /* "'not'" */
8314#line 2627 "parse.y"
8315 {
8316 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8317}
8318#line 8319 "parse.c"
8319 break;
8320
8321 case YYSYMBOL_modifier_if: /* "'if' modifier" */
8322#line 2627 "parse.y"
8323 {
8324 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8325}
8326#line 8327 "parse.c"
8327 break;
8328
8329 case YYSYMBOL_modifier_unless: /* "'unless' modifier" */
8330#line 2627 "parse.y"
8331 {
8332 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8333}
8334#line 8335 "parse.c"
8335 break;
8336
8337 case YYSYMBOL_modifier_while: /* "'while' modifier" */
8338#line 2627 "parse.y"
8339 {
8340 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8341}
8342#line 8343 "parse.c"
8343 break;
8344
8345 case YYSYMBOL_modifier_until: /* "'until' modifier" */
8346#line 2627 "parse.y"
8347 {
8348 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8349}
8350#line 8351 "parse.c"
8351 break;
8352
8353 case YYSYMBOL_modifier_rescue: /* "'rescue' modifier" */
8354#line 2627 "parse.y"
8355 {
8356 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8357}
8358#line 8359 "parse.c"
8359 break;
8360
8361 case YYSYMBOL_keyword_alias: /* "'alias'" */
8362#line 2627 "parse.y"
8363 {
8364 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8365}
8366#line 8367 "parse.c"
8367 break;
8368
8369 case YYSYMBOL_keyword_defined: /* "'defined?'" */
8370#line 2627 "parse.y"
8371 {
8372 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8373}
8374#line 8375 "parse.c"
8375 break;
8376
8377 case YYSYMBOL_keyword_BEGIN: /* "'BEGIN'" */
8378#line 2627 "parse.y"
8379 {
8380 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8381}
8382#line 8383 "parse.c"
8383 break;
8384
8385 case YYSYMBOL_keyword_END: /* "'END'" */
8386#line 2627 "parse.y"
8387 {
8388 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8389}
8390#line 8391 "parse.c"
8391 break;
8392
8393 case YYSYMBOL_keyword__LINE__: /* "'__LINE__'" */
8394#line 2627 "parse.y"
8395 {
8396 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8397}
8398#line 8399 "parse.c"
8399 break;
8400
8401 case YYSYMBOL_keyword__FILE__: /* "'__FILE__'" */
8402#line 2627 "parse.y"
8403 {
8404 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8405}
8406#line 8407 "parse.c"
8407 break;
8408
8409 case YYSYMBOL_keyword__ENCODING__: /* "'__ENCODING__'" */
8410#line 2627 "parse.y"
8411 {
8412 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8413}
8414#line 8415 "parse.c"
8415 break;
8416
8417 case YYSYMBOL_tIDENTIFIER: /* "local variable or method" */
8418#line 2627 "parse.y"
8419 {
8420 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8421}
8422#line 8423 "parse.c"
8423 break;
8424
8425 case YYSYMBOL_tFID: /* "method" */
8426#line 2627 "parse.y"
8427 {
8428 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8429}
8430#line 8431 "parse.c"
8431 break;
8432
8433 case YYSYMBOL_tGVAR: /* "global variable" */
8434#line 2627 "parse.y"
8435 {
8436 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8437}
8438#line 8439 "parse.c"
8439 break;
8440
8441 case YYSYMBOL_tIVAR: /* "instance variable" */
8442#line 2627 "parse.y"
8443 {
8444 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8445}
8446#line 8447 "parse.c"
8447 break;
8448
8449 case YYSYMBOL_tCONSTANT: /* "constant" */
8450#line 2627 "parse.y"
8451 {
8452 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8453}
8454#line 8455 "parse.c"
8455 break;
8456
8457 case YYSYMBOL_tCVAR: /* "class variable" */
8458#line 2627 "parse.y"
8459 {
8460 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8461}
8462#line 8463 "parse.c"
8463 break;
8464
8465 case YYSYMBOL_tLABEL: /* "label" */
8466#line 2627 "parse.y"
8467 {
8468 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8469}
8470#line 8471 "parse.c"
8471 break;
8472
8473 case YYSYMBOL_tINTEGER: /* "integer literal" */
8474#line 2630 "parse.y"
8475 {
8476 switch (nd_type(RNODE(((*yyvaluep).node)))) {
8477 case NODE_INTEGER:
8478 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_integer_literal_val(((*yyvaluep).node)));
8479 break;
8480 case NODE_FLOAT:
8481 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_float_literal_val(((*yyvaluep).node)));
8482 break;
8483 case NODE_RATIONAL:
8484 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_rational_literal_val(((*yyvaluep).node)));
8485 break;
8486 case NODE_IMAGINARY:
8487 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_imaginary_literal_val(((*yyvaluep).node)));
8488 break;
8489 default:
8490 break;
8491 }
8492}
8493#line 8494 "parse.c"
8494 break;
8495
8496 case YYSYMBOL_tFLOAT: /* "float literal" */
8497#line 2630 "parse.y"
8498 {
8499 switch (nd_type(RNODE(((*yyvaluep).node)))) {
8500 case NODE_INTEGER:
8501 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_integer_literal_val(((*yyvaluep).node)));
8502 break;
8503 case NODE_FLOAT:
8504 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_float_literal_val(((*yyvaluep).node)));
8505 break;
8506 case NODE_RATIONAL:
8507 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_rational_literal_val(((*yyvaluep).node)));
8508 break;
8509 case NODE_IMAGINARY:
8510 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_imaginary_literal_val(((*yyvaluep).node)));
8511 break;
8512 default:
8513 break;
8514 }
8515}
8516#line 8517 "parse.c"
8517 break;
8518
8519 case YYSYMBOL_tRATIONAL: /* "rational literal" */
8520#line 2630 "parse.y"
8521 {
8522 switch (nd_type(RNODE(((*yyvaluep).node)))) {
8523 case NODE_INTEGER:
8524 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_integer_literal_val(((*yyvaluep).node)));
8525 break;
8526 case NODE_FLOAT:
8527 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_float_literal_val(((*yyvaluep).node)));
8528 break;
8529 case NODE_RATIONAL:
8530 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_rational_literal_val(((*yyvaluep).node)));
8531 break;
8532 case NODE_IMAGINARY:
8533 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_imaginary_literal_val(((*yyvaluep).node)));
8534 break;
8535 default:
8536 break;
8537 }
8538}
8539#line 8540 "parse.c"
8540 break;
8541
8542 case YYSYMBOL_tIMAGINARY: /* "imaginary literal" */
8543#line 2630 "parse.y"
8544 {
8545 switch (nd_type(RNODE(((*yyvaluep).node)))) {
8546 case NODE_INTEGER:
8547 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_integer_literal_val(((*yyvaluep).node)));
8548 break;
8549 case NODE_FLOAT:
8550 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_float_literal_val(((*yyvaluep).node)));
8551 break;
8552 case NODE_RATIONAL:
8553 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_rational_literal_val(((*yyvaluep).node)));
8554 break;
8555 case NODE_IMAGINARY:
8556 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_imaginary_literal_val(((*yyvaluep).node)));
8557 break;
8558 default:
8559 break;
8560 }
8561}
8562#line 8563 "parse.c"
8563 break;
8564
8565 case YYSYMBOL_tCHAR: /* "char literal" */
8566#line 2630 "parse.y"
8567 {
8568 switch (nd_type(RNODE(((*yyvaluep).node)))) {
8569 case NODE_INTEGER:
8570 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_integer_literal_val(((*yyvaluep).node)));
8571 break;
8572 case NODE_FLOAT:
8573 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_float_literal_val(((*yyvaluep).node)));
8574 break;
8575 case NODE_RATIONAL:
8576 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_rational_literal_val(((*yyvaluep).node)));
8577 break;
8578 case NODE_IMAGINARY:
8579 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_imaginary_literal_val(((*yyvaluep).node)));
8580 break;
8581 default:
8582 break;
8583 }
8584}
8585#line 8586 "parse.c"
8586 break;
8587
8588 case YYSYMBOL_tNTH_REF: /* "numbered reference" */
8589#line 2648 "parse.y"
8590 {
8591 rb_parser_printf(p, "$%ld", RNODE_NTH_REF(((*yyvaluep).node))->nd_nth);
8592}
8593#line 8594 "parse.c"
8594 break;
8595
8596 case YYSYMBOL_tBACK_REF: /* "back reference" */
8597#line 2651 "parse.y"
8598 {
8599 rb_parser_printf(p, "$%c", (int)RNODE_BACK_REF(((*yyvaluep).node))->nd_nth);
8600}
8601#line 8602 "parse.c"
8602 break;
8603
8604 case YYSYMBOL_tSTRING_CONTENT: /* "literal content" */
8605#line 2630 "parse.y"
8606 {
8607 switch (nd_type(RNODE(((*yyvaluep).node)))) {
8608 case NODE_INTEGER:
8609 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_integer_literal_val(((*yyvaluep).node)));
8610 break;
8611 case NODE_FLOAT:
8612 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_float_literal_val(((*yyvaluep).node)));
8613 break;
8614 case NODE_RATIONAL:
8615 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_rational_literal_val(((*yyvaluep).node)));
8616 break;
8617 case NODE_IMAGINARY:
8618 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_imaginary_literal_val(((*yyvaluep).node)));
8619 break;
8620 default:
8621 break;
8622 }
8623}
8624#line 8625 "parse.c"
8625 break;
8626
8627 case YYSYMBOL_69_: /* '.' */
8628#line 2627 "parse.y"
8629 {
8630 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8631}
8632#line 8633 "parse.c"
8633 break;
8634
8635 case YYSYMBOL_70_backslash_: /* "backslash" */
8636#line 2627 "parse.y"
8637 {
8638 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8639}
8640#line 8641 "parse.c"
8641 break;
8642
8643 case YYSYMBOL_72_escaped_horizontal_tab_: /* "escaped horizontal tab" */
8644#line 2627 "parse.y"
8645 {
8646 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8647}
8648#line 8649 "parse.c"
8649 break;
8650
8651 case YYSYMBOL_73_escaped_form_feed_: /* "escaped form feed" */
8652#line 2627 "parse.y"
8653 {
8654 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8655}
8656#line 8657 "parse.c"
8657 break;
8658
8659 case YYSYMBOL_74_escaped_carriage_return_: /* "escaped carriage return" */
8660#line 2627 "parse.y"
8661 {
8662 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8663}
8664#line 8665 "parse.c"
8665 break;
8666
8667 case YYSYMBOL_75_escaped_vertical_tab_: /* "escaped vertical tab" */
8668#line 2627 "parse.y"
8669 {
8670 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8671}
8672#line 8673 "parse.c"
8673 break;
8674
8675 case YYSYMBOL_tANDDOT: /* "&." */
8676#line 2627 "parse.y"
8677 {
8678 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8679}
8680#line 8681 "parse.c"
8681 break;
8682
8683 case YYSYMBOL_tCOLON2: /* "::" */
8684#line 2627 "parse.y"
8685 {
8686 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8687}
8688#line 8689 "parse.c"
8689 break;
8690
8691 case YYSYMBOL_tOP_ASGN: /* "operator-assignment" */
8692#line 2627 "parse.y"
8693 {
8694 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8695}
8696#line 8697 "parse.c"
8697 break;
8698
8699 case YYSYMBOL_compstmt_top_stmts: /* compstmt_top_stmts */
8700#line 2618 "parse.y"
8701 {
8702 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8703 rb_parser_printf(p, "NODE_SPECIAL");
8704 }
8705 else if (((*yyvaluep).node)) {
8706 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8707 }
8708}
8709#line 8710 "parse.c"
8710 break;
8711
8712 case YYSYMBOL_top_stmts: /* top_stmts */
8713#line 2618 "parse.y"
8714 {
8715 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8716 rb_parser_printf(p, "NODE_SPECIAL");
8717 }
8718 else if (((*yyvaluep).node)) {
8719 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8720 }
8721}
8722#line 8723 "parse.c"
8723 break;
8724
8725 case YYSYMBOL_top_stmt: /* top_stmt */
8726#line 2618 "parse.y"
8727 {
8728 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8729 rb_parser_printf(p, "NODE_SPECIAL");
8730 }
8731 else if (((*yyvaluep).node)) {
8732 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8733 }
8734}
8735#line 8736 "parse.c"
8736 break;
8737
8738 case YYSYMBOL_block_open: /* block_open */
8739#line 2618 "parse.y"
8740 {
8741 if ((NODE *)((*yyvaluep).node_exits) == (NODE *)-1) {
8742 rb_parser_printf(p, "NODE_SPECIAL");
8743 }
8744 else if (((*yyvaluep).node_exits)) {
8745 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_exits)))));
8746 }
8747}
8748#line 8749 "parse.c"
8749 break;
8750
8751 case YYSYMBOL_begin_block: /* begin_block */
8752#line 2618 "parse.y"
8753 {
8754 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8755 rb_parser_printf(p, "NODE_SPECIAL");
8756 }
8757 else if (((*yyvaluep).node)) {
8758 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8759 }
8760}
8761#line 8762 "parse.c"
8762 break;
8763
8764 case YYSYMBOL_compstmt_stmts: /* compstmt_stmts */
8765#line 2618 "parse.y"
8766 {
8767 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8768 rb_parser_printf(p, "NODE_SPECIAL");
8769 }
8770 else if (((*yyvaluep).node)) {
8771 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8772 }
8773}
8774#line 8775 "parse.c"
8775 break;
8776
8777 case YYSYMBOL_bodystmt: /* bodystmt */
8778#line 2618 "parse.y"
8779 {
8780 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8781 rb_parser_printf(p, "NODE_SPECIAL");
8782 }
8783 else if (((*yyvaluep).node)) {
8784 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8785 }
8786}
8787#line 8788 "parse.c"
8788 break;
8789
8790 case YYSYMBOL_stmts: /* stmts */
8791#line 2618 "parse.y"
8792 {
8793 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8794 rb_parser_printf(p, "NODE_SPECIAL");
8795 }
8796 else if (((*yyvaluep).node)) {
8797 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8798 }
8799}
8800#line 8801 "parse.c"
8801 break;
8802
8803 case YYSYMBOL_stmt_or_begin: /* stmt_or_begin */
8804#line 2618 "parse.y"
8805 {
8806 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8807 rb_parser_printf(p, "NODE_SPECIAL");
8808 }
8809 else if (((*yyvaluep).node)) {
8810 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8811 }
8812}
8813#line 8814 "parse.c"
8814 break;
8815
8816 case YYSYMBOL_allow_exits: /* allow_exits */
8817#line 2618 "parse.y"
8818 {
8819 if ((NODE *)((*yyvaluep).node_exits) == (NODE *)-1) {
8820 rb_parser_printf(p, "NODE_SPECIAL");
8821 }
8822 else if (((*yyvaluep).node_exits)) {
8823 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_exits)))));
8824 }
8825}
8826#line 8827 "parse.c"
8827 break;
8828
8829 case YYSYMBOL_stmt: /* stmt */
8830#line 2618 "parse.y"
8831 {
8832 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8833 rb_parser_printf(p, "NODE_SPECIAL");
8834 }
8835 else if (((*yyvaluep).node)) {
8836 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8837 }
8838}
8839#line 8840 "parse.c"
8840 break;
8841
8842 case YYSYMBOL_asgn_mrhs: /* asgn_mrhs */
8843#line 2618 "parse.y"
8844 {
8845 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8846 rb_parser_printf(p, "NODE_SPECIAL");
8847 }
8848 else if (((*yyvaluep).node)) {
8849 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8850 }
8851}
8852#line 8853 "parse.c"
8853 break;
8854
8855 case YYSYMBOL_asgn_command_rhs: /* asgn_command_rhs */
8856#line 2618 "parse.y"
8857 {
8858 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8859 rb_parser_printf(p, "NODE_SPECIAL");
8860 }
8861 else if (((*yyvaluep).node)) {
8862 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8863 }
8864}
8865#line 8866 "parse.c"
8866 break;
8867
8868 case YYSYMBOL_command_asgn: /* command_asgn */
8869#line 2618 "parse.y"
8870 {
8871 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8872 rb_parser_printf(p, "NODE_SPECIAL");
8873 }
8874 else if (((*yyvaluep).node)) {
8875 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8876 }
8877}
8878#line 8879 "parse.c"
8879 break;
8880
8881 case YYSYMBOL_op_asgn_command_rhs: /* op_asgn_command_rhs */
8882#line 2618 "parse.y"
8883 {
8884 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8885 rb_parser_printf(p, "NODE_SPECIAL");
8886 }
8887 else if (((*yyvaluep).node)) {
8888 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8889 }
8890}
8891#line 8892 "parse.c"
8892 break;
8893
8894 case YYSYMBOL_def_endless_method_endless_command: /* def_endless_method_endless_command */
8895#line 2618 "parse.y"
8896 {
8897 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8898 rb_parser_printf(p, "NODE_SPECIAL");
8899 }
8900 else if (((*yyvaluep).node)) {
8901 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8902 }
8903}
8904#line 8905 "parse.c"
8905 break;
8906
8907 case YYSYMBOL_endless_command: /* endless_command */
8908#line 2618 "parse.y"
8909 {
8910 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8911 rb_parser_printf(p, "NODE_SPECIAL");
8912 }
8913 else if (((*yyvaluep).node)) {
8914 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8915 }
8916}
8917#line 8918 "parse.c"
8918 break;
8919
8920 case YYSYMBOL_command_rhs: /* command_rhs */
8921#line 2618 "parse.y"
8922 {
8923 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8924 rb_parser_printf(p, "NODE_SPECIAL");
8925 }
8926 else if (((*yyvaluep).node)) {
8927 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8928 }
8929}
8930#line 8931 "parse.c"
8931 break;
8932
8933 case YYSYMBOL_expr: /* expr */
8934#line 2618 "parse.y"
8935 {
8936 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8937 rb_parser_printf(p, "NODE_SPECIAL");
8938 }
8939 else if (((*yyvaluep).node)) {
8940 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8941 }
8942}
8943#line 8944 "parse.c"
8944 break;
8945
8946 case YYSYMBOL_def_name: /* def_name */
8947#line 2627 "parse.y"
8948 {
8949 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8950}
8951#line 8952 "parse.c"
8952 break;
8953
8954 case YYSYMBOL_defn_head: /* defn_head */
8955#line 2618 "parse.y"
8956 {
8957 if ((NODE *)((*yyvaluep).node_def_temp) == (NODE *)-1) {
8958 rb_parser_printf(p, "NODE_SPECIAL");
8959 }
8960 else if (((*yyvaluep).node_def_temp)) {
8961 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_def_temp)))));
8962 }
8963}
8964#line 8965 "parse.c"
8965 break;
8966
8967 case YYSYMBOL_defs_head: /* defs_head */
8968#line 2618 "parse.y"
8969 {
8970 if ((NODE *)((*yyvaluep).node_def_temp) == (NODE *)-1) {
8971 rb_parser_printf(p, "NODE_SPECIAL");
8972 }
8973 else if (((*yyvaluep).node_def_temp)) {
8974 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_def_temp)))));
8975 }
8976}
8977#line 8978 "parse.c"
8978 break;
8979
8980 case YYSYMBOL_value_expr_expr: /* value_expr_expr */
8981#line 2618 "parse.y"
8982 {
8983 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8984 rb_parser_printf(p, "NODE_SPECIAL");
8985 }
8986 else if (((*yyvaluep).node)) {
8987 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8988 }
8989}
8990#line 8991 "parse.c"
8991 break;
8992
8993 case YYSYMBOL_expr_value: /* expr_value */
8994#line 2618 "parse.y"
8995 {
8996 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8997 rb_parser_printf(p, "NODE_SPECIAL");
8998 }
8999 else if (((*yyvaluep).node)) {
9000 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9001 }
9002}
9003#line 9004 "parse.c"
9004 break;
9005
9006 case YYSYMBOL_expr_value_do: /* expr_value_do */
9007#line 2618 "parse.y"
9008 {
9009 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9010 rb_parser_printf(p, "NODE_SPECIAL");
9011 }
9012 else if (((*yyvaluep).node)) {
9013 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9014 }
9015}
9016#line 9017 "parse.c"
9017 break;
9018
9019 case YYSYMBOL_command_call: /* command_call */
9020#line 2618 "parse.y"
9021 {
9022 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9023 rb_parser_printf(p, "NODE_SPECIAL");
9024 }
9025 else if (((*yyvaluep).node)) {
9026 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9027 }
9028}
9029#line 9030 "parse.c"
9030 break;
9031
9032 case YYSYMBOL_value_expr_command_call: /* value_expr_command_call */
9033#line 2618 "parse.y"
9034 {
9035 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9036 rb_parser_printf(p, "NODE_SPECIAL");
9037 }
9038 else if (((*yyvaluep).node)) {
9039 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9040 }
9041}
9042#line 9043 "parse.c"
9043 break;
9044
9045 case YYSYMBOL_command_call_value: /* command_call_value */
9046#line 2618 "parse.y"
9047 {
9048 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9049 rb_parser_printf(p, "NODE_SPECIAL");
9050 }
9051 else if (((*yyvaluep).node)) {
9052 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9053 }
9054}
9055#line 9056 "parse.c"
9056 break;
9057
9058 case YYSYMBOL_block_command: /* block_command */
9059#line 2618 "parse.y"
9060 {
9061 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9062 rb_parser_printf(p, "NODE_SPECIAL");
9063 }
9064 else if (((*yyvaluep).node)) {
9065 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9066 }
9067}
9068#line 9069 "parse.c"
9069 break;
9070
9071 case YYSYMBOL_cmd_brace_block: /* cmd_brace_block */
9072#line 2618 "parse.y"
9073 {
9074 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9075 rb_parser_printf(p, "NODE_SPECIAL");
9076 }
9077 else if (((*yyvaluep).node)) {
9078 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9079 }
9080}
9081#line 9082 "parse.c"
9082 break;
9083
9084 case YYSYMBOL_fcall: /* fcall */
9085#line 2618 "parse.y"
9086 {
9087 if ((NODE *)((*yyvaluep).node_fcall) == (NODE *)-1) {
9088 rb_parser_printf(p, "NODE_SPECIAL");
9089 }
9090 else if (((*yyvaluep).node_fcall)) {
9091 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_fcall)))));
9092 }
9093}
9094#line 9095 "parse.c"
9095 break;
9096
9097 case YYSYMBOL_command: /* command */
9098#line 2618 "parse.y"
9099 {
9100 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9101 rb_parser_printf(p, "NODE_SPECIAL");
9102 }
9103 else if (((*yyvaluep).node)) {
9104 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9105 }
9106}
9107#line 9108 "parse.c"
9108 break;
9109
9110 case YYSYMBOL_mlhs: /* mlhs */
9111#line 2618 "parse.y"
9112 {
9113 if ((NODE *)((*yyvaluep).node_masgn) == (NODE *)-1) {
9114 rb_parser_printf(p, "NODE_SPECIAL");
9115 }
9116 else if (((*yyvaluep).node_masgn)) {
9117 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_masgn)))));
9118 }
9119}
9120#line 9121 "parse.c"
9121 break;
9122
9123 case YYSYMBOL_mlhs_inner: /* mlhs_inner */
9124#line 2618 "parse.y"
9125 {
9126 if ((NODE *)((*yyvaluep).node_masgn) == (NODE *)-1) {
9127 rb_parser_printf(p, "NODE_SPECIAL");
9128 }
9129 else if (((*yyvaluep).node_masgn)) {
9130 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_masgn)))));
9131 }
9132}
9133#line 9134 "parse.c"
9134 break;
9135
9136 case YYSYMBOL_mlhs_basic: /* mlhs_basic */
9137#line 2618 "parse.y"
9138 {
9139 if ((NODE *)((*yyvaluep).node_masgn) == (NODE *)-1) {
9140 rb_parser_printf(p, "NODE_SPECIAL");
9141 }
9142 else if (((*yyvaluep).node_masgn)) {
9143 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_masgn)))));
9144 }
9145}
9146#line 9147 "parse.c"
9147 break;
9148
9149 case YYSYMBOL_mlhs_items_mlhs_item: /* mlhs_items_mlhs_item */
9150#line 2618 "parse.y"
9151 {
9152 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9153 rb_parser_printf(p, "NODE_SPECIAL");
9154 }
9155 else if (((*yyvaluep).node)) {
9156 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9157 }
9158}
9159#line 9160 "parse.c"
9160 break;
9161
9162 case YYSYMBOL_mlhs_item: /* mlhs_item */
9163#line 2618 "parse.y"
9164 {
9165 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9166 rb_parser_printf(p, "NODE_SPECIAL");
9167 }
9168 else if (((*yyvaluep).node)) {
9169 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9170 }
9171}
9172#line 9173 "parse.c"
9173 break;
9174
9175 case YYSYMBOL_mlhs_head: /* mlhs_head */
9176#line 2618 "parse.y"
9177 {
9178 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9179 rb_parser_printf(p, "NODE_SPECIAL");
9180 }
9181 else if (((*yyvaluep).node)) {
9182 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9183 }
9184}
9185#line 9186 "parse.c"
9186 break;
9187
9188 case YYSYMBOL_mlhs_node: /* mlhs_node */
9189#line 2618 "parse.y"
9190 {
9191 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9192 rb_parser_printf(p, "NODE_SPECIAL");
9193 }
9194 else if (((*yyvaluep).node)) {
9195 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9196 }
9197}
9198#line 9199 "parse.c"
9199 break;
9200
9201 case YYSYMBOL_lhs: /* lhs */
9202#line 2618 "parse.y"
9203 {
9204 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9205 rb_parser_printf(p, "NODE_SPECIAL");
9206 }
9207 else if (((*yyvaluep).node)) {
9208 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9209 }
9210}
9211#line 9212 "parse.c"
9212 break;
9213
9214 case YYSYMBOL_cname: /* cname */
9215#line 2627 "parse.y"
9216 {
9217 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
9218}
9219#line 9220 "parse.c"
9220 break;
9221
9222 case YYSYMBOL_cpath: /* cpath */
9223#line 2618 "parse.y"
9224 {
9225 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9226 rb_parser_printf(p, "NODE_SPECIAL");
9227 }
9228 else if (((*yyvaluep).node)) {
9229 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9230 }
9231}
9232#line 9233 "parse.c"
9233 break;
9234
9235 case YYSYMBOL_fname: /* fname */
9236#line 2627 "parse.y"
9237 {
9238 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
9239}
9240#line 9241 "parse.c"
9241 break;
9242
9243 case YYSYMBOL_fitem: /* fitem */
9244#line 2618 "parse.y"
9245 {
9246 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9247 rb_parser_printf(p, "NODE_SPECIAL");
9248 }
9249 else if (((*yyvaluep).node)) {
9250 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9251 }
9252}
9253#line 9254 "parse.c"
9254 break;
9255
9256 case YYSYMBOL_undef_list: /* undef_list */
9257#line 2618 "parse.y"
9258 {
9259 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9260 rb_parser_printf(p, "NODE_SPECIAL");
9261 }
9262 else if (((*yyvaluep).node)) {
9263 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9264 }
9265}
9266#line 9267 "parse.c"
9267 break;
9268
9269 case YYSYMBOL_op: /* op */
9270#line 2627 "parse.y"
9271 {
9272 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
9273}
9274#line 9275 "parse.c"
9275 break;
9276
9277 case YYSYMBOL_reswords: /* reswords */
9278#line 2627 "parse.y"
9279 {
9280 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
9281}
9282#line 9283 "parse.c"
9283 break;
9284
9285 case YYSYMBOL_asgn_arg_rhs: /* asgn_arg_rhs */
9286#line 2618 "parse.y"
9287 {
9288 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9289 rb_parser_printf(p, "NODE_SPECIAL");
9290 }
9291 else if (((*yyvaluep).node)) {
9292 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9293 }
9294}
9295#line 9296 "parse.c"
9296 break;
9297
9298 case YYSYMBOL_arg: /* arg */
9299#line 2618 "parse.y"
9300 {
9301 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9302 rb_parser_printf(p, "NODE_SPECIAL");
9303 }
9304 else if (((*yyvaluep).node)) {
9305 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9306 }
9307}
9308#line 9309 "parse.c"
9309 break;
9310
9311 case YYSYMBOL_op_asgn_arg_rhs: /* op_asgn_arg_rhs */
9312#line 2618 "parse.y"
9313 {
9314 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9315 rb_parser_printf(p, "NODE_SPECIAL");
9316 }
9317 else if (((*yyvaluep).node)) {
9318 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9319 }
9320}
9321#line 9322 "parse.c"
9322 break;
9323
9324 case YYSYMBOL_range_expr_arg: /* range_expr_arg */
9325#line 2618 "parse.y"
9326 {
9327 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9328 rb_parser_printf(p, "NODE_SPECIAL");
9329 }
9330 else if (((*yyvaluep).node)) {
9331 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9332 }
9333}
9334#line 9335 "parse.c"
9335 break;
9336
9337 case YYSYMBOL_def_endless_method_endless_arg: /* def_endless_method_endless_arg */
9338#line 2618 "parse.y"
9339 {
9340 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9341 rb_parser_printf(p, "NODE_SPECIAL");
9342 }
9343 else if (((*yyvaluep).node)) {
9344 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9345 }
9346}
9347#line 9348 "parse.c"
9348 break;
9349
9350 case YYSYMBOL_ternary: /* ternary */
9351#line 2618 "parse.y"
9352 {
9353 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9354 rb_parser_printf(p, "NODE_SPECIAL");
9355 }
9356 else if (((*yyvaluep).node)) {
9357 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9358 }
9359}
9360#line 9361 "parse.c"
9361 break;
9362
9363 case YYSYMBOL_endless_arg: /* endless_arg */
9364#line 2618 "parse.y"
9365 {
9366 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9367 rb_parser_printf(p, "NODE_SPECIAL");
9368 }
9369 else if (((*yyvaluep).node)) {
9370 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9371 }
9372}
9373#line 9374 "parse.c"
9374 break;
9375
9376 case YYSYMBOL_relop: /* relop */
9377#line 2627 "parse.y"
9378 {
9379 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
9380}
9381#line 9382 "parse.c"
9382 break;
9383
9384 case YYSYMBOL_rel_expr: /* rel_expr */
9385#line 2618 "parse.y"
9386 {
9387 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9388 rb_parser_printf(p, "NODE_SPECIAL");
9389 }
9390 else if (((*yyvaluep).node)) {
9391 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9392 }
9393}
9394#line 9395 "parse.c"
9395 break;
9396
9397 case YYSYMBOL_value_expr_arg: /* value_expr_arg */
9398#line 2618 "parse.y"
9399 {
9400 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9401 rb_parser_printf(p, "NODE_SPECIAL");
9402 }
9403 else if (((*yyvaluep).node)) {
9404 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9405 }
9406}
9407#line 9408 "parse.c"
9408 break;
9409
9410 case YYSYMBOL_arg_value: /* arg_value */
9411#line 2618 "parse.y"
9412 {
9413 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9414 rb_parser_printf(p, "NODE_SPECIAL");
9415 }
9416 else if (((*yyvaluep).node)) {
9417 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9418 }
9419}
9420#line 9421 "parse.c"
9421 break;
9422
9423 case YYSYMBOL_aref_args: /* aref_args */
9424#line 2618 "parse.y"
9425 {
9426 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9427 rb_parser_printf(p, "NODE_SPECIAL");
9428 }
9429 else if (((*yyvaluep).node)) {
9430 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9431 }
9432}
9433#line 9434 "parse.c"
9434 break;
9435
9436 case YYSYMBOL_arg_rhs: /* arg_rhs */
9437#line 2618 "parse.y"
9438 {
9439 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9440 rb_parser_printf(p, "NODE_SPECIAL");
9441 }
9442 else if (((*yyvaluep).node)) {
9443 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9444 }
9445}
9446#line 9447 "parse.c"
9447 break;
9448
9449 case YYSYMBOL_paren_args: /* paren_args */
9450#line 2618 "parse.y"
9451 {
9452 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9453 rb_parser_printf(p, "NODE_SPECIAL");
9454 }
9455 else if (((*yyvaluep).node)) {
9456 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9457 }
9458}
9459#line 9460 "parse.c"
9460 break;
9461
9462 case YYSYMBOL_opt_paren_args: /* opt_paren_args */
9463#line 2618 "parse.y"
9464 {
9465 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9466 rb_parser_printf(p, "NODE_SPECIAL");
9467 }
9468 else if (((*yyvaluep).node)) {
9469 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9470 }
9471}
9472#line 9473 "parse.c"
9473 break;
9474
9475 case YYSYMBOL_opt_call_args: /* opt_call_args */
9476#line 2618 "parse.y"
9477 {
9478 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9479 rb_parser_printf(p, "NODE_SPECIAL");
9480 }
9481 else if (((*yyvaluep).node)) {
9482 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9483 }
9484}
9485#line 9486 "parse.c"
9486 break;
9487
9488 case YYSYMBOL_value_expr_command: /* value_expr_command */
9489#line 2618 "parse.y"
9490 {
9491 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9492 rb_parser_printf(p, "NODE_SPECIAL");
9493 }
9494 else if (((*yyvaluep).node)) {
9495 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9496 }
9497}
9498#line 9499 "parse.c"
9499 break;
9500
9501 case YYSYMBOL_call_args: /* call_args */
9502#line 2618 "parse.y"
9503 {
9504 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9505 rb_parser_printf(p, "NODE_SPECIAL");
9506 }
9507 else if (((*yyvaluep).node)) {
9508 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9509 }
9510}
9511#line 9512 "parse.c"
9512 break;
9513
9514 case YYSYMBOL_command_args: /* command_args */
9515#line 2618 "parse.y"
9516 {
9517 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9518 rb_parser_printf(p, "NODE_SPECIAL");
9519 }
9520 else if (((*yyvaluep).node)) {
9521 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9522 }
9523}
9524#line 9525 "parse.c"
9525 break;
9526
9527 case YYSYMBOL_block_arg: /* block_arg */
9528#line 2618 "parse.y"
9529 {
9530 if ((NODE *)((*yyvaluep).node_block_pass) == (NODE *)-1) {
9531 rb_parser_printf(p, "NODE_SPECIAL");
9532 }
9533 else if (((*yyvaluep).node_block_pass)) {
9534 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_block_pass)))));
9535 }
9536}
9537#line 9538 "parse.c"
9538 break;
9539
9540 case YYSYMBOL_opt_block_arg: /* opt_block_arg */
9541#line 2618 "parse.y"
9542 {
9543 if ((NODE *)((*yyvaluep).node_block_pass) == (NODE *)-1) {
9544 rb_parser_printf(p, "NODE_SPECIAL");
9545 }
9546 else if (((*yyvaluep).node_block_pass)) {
9547 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_block_pass)))));
9548 }
9549}
9550#line 9551 "parse.c"
9551 break;
9552
9553 case YYSYMBOL_args: /* args */
9554#line 2618 "parse.y"
9555 {
9556 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9557 rb_parser_printf(p, "NODE_SPECIAL");
9558 }
9559 else if (((*yyvaluep).node)) {
9560 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9561 }
9562}
9563#line 9564 "parse.c"
9564 break;
9565
9566 case YYSYMBOL_arg_splat: /* arg_splat */
9567#line 2618 "parse.y"
9568 {
9569 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9570 rb_parser_printf(p, "NODE_SPECIAL");
9571 }
9572 else if (((*yyvaluep).node)) {
9573 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9574 }
9575}
9576#line 9577 "parse.c"
9577 break;
9578
9579 case YYSYMBOL_mrhs_arg: /* mrhs_arg */
9580#line 2618 "parse.y"
9581 {
9582 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9583 rb_parser_printf(p, "NODE_SPECIAL");
9584 }
9585 else if (((*yyvaluep).node)) {
9586 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9587 }
9588}
9589#line 9590 "parse.c"
9590 break;
9591
9592 case YYSYMBOL_mrhs: /* mrhs */
9593#line 2618 "parse.y"
9594 {
9595 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9596 rb_parser_printf(p, "NODE_SPECIAL");
9597 }
9598 else if (((*yyvaluep).node)) {
9599 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9600 }
9601}
9602#line 9603 "parse.c"
9603 break;
9604
9605 case YYSYMBOL_primary: /* primary */
9606#line 2618 "parse.y"
9607 {
9608 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9609 rb_parser_printf(p, "NODE_SPECIAL");
9610 }
9611 else if (((*yyvaluep).node)) {
9612 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9613 }
9614}
9615#line 9616 "parse.c"
9616 break;
9617
9618 case YYSYMBOL_value_expr_primary: /* value_expr_primary */
9619#line 2618 "parse.y"
9620 {
9621 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9622 rb_parser_printf(p, "NODE_SPECIAL");
9623 }
9624 else if (((*yyvaluep).node)) {
9625 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9626 }
9627}
9628#line 9629 "parse.c"
9629 break;
9630
9631 case YYSYMBOL_primary_value: /* primary_value */
9632#line 2618 "parse.y"
9633 {
9634 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9635 rb_parser_printf(p, "NODE_SPECIAL");
9636 }
9637 else if (((*yyvaluep).node)) {
9638 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9639 }
9640}
9641#line 9642 "parse.c"
9642 break;
9643
9644 case YYSYMBOL_k_while: /* k_while */
9645#line 2618 "parse.y"
9646 {
9647 if ((NODE *)((*yyvaluep).node_exits) == (NODE *)-1) {
9648 rb_parser_printf(p, "NODE_SPECIAL");
9649 }
9650 else if (((*yyvaluep).node_exits)) {
9651 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_exits)))));
9652 }
9653}
9654#line 9655 "parse.c"
9655 break;
9656
9657 case YYSYMBOL_k_until: /* k_until */
9658#line 2618 "parse.y"
9659 {
9660 if ((NODE *)((*yyvaluep).node_exits) == (NODE *)-1) {
9661 rb_parser_printf(p, "NODE_SPECIAL");
9662 }
9663 else if (((*yyvaluep).node_exits)) {
9664 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_exits)))));
9665 }
9666}
9667#line 9668 "parse.c"
9668 break;
9669
9670 case YYSYMBOL_k_for: /* k_for */
9671#line 2618 "parse.y"
9672 {
9673 if ((NODE *)((*yyvaluep).node_exits) == (NODE *)-1) {
9674 rb_parser_printf(p, "NODE_SPECIAL");
9675 }
9676 else if (((*yyvaluep).node_exits)) {
9677 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_exits)))));
9678 }
9679}
9680#line 9681 "parse.c"
9681 break;
9682
9683 case YYSYMBOL_k_def: /* k_def */
9684#line 2618 "parse.y"
9685 {
9686 if ((NODE *)((*yyvaluep).node_def_temp) == (NODE *)-1) {
9687 rb_parser_printf(p, "NODE_SPECIAL");
9688 }
9689 else if (((*yyvaluep).node_def_temp)) {
9690 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_def_temp)))));
9691 }
9692}
9693#line 9694 "parse.c"
9694 break;
9695
9696 case YYSYMBOL_do: /* do */
9697#line 2627 "parse.y"
9698 {
9699 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
9700}
9701#line 9702 "parse.c"
9702 break;
9703
9704 case YYSYMBOL_if_tail: /* if_tail */
9705#line 2618 "parse.y"
9706 {
9707 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9708 rb_parser_printf(p, "NODE_SPECIAL");
9709 }
9710 else if (((*yyvaluep).node)) {
9711 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9712 }
9713}
9714#line 9715 "parse.c"
9715 break;
9716
9717 case YYSYMBOL_opt_else: /* opt_else */
9718#line 2618 "parse.y"
9719 {
9720 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9721 rb_parser_printf(p, "NODE_SPECIAL");
9722 }
9723 else if (((*yyvaluep).node)) {
9724 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9725 }
9726}
9727#line 9728 "parse.c"
9728 break;
9729
9730 case YYSYMBOL_for_var: /* for_var */
9731#line 2618 "parse.y"
9732 {
9733 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9734 rb_parser_printf(p, "NODE_SPECIAL");
9735 }
9736 else if (((*yyvaluep).node)) {
9737 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9738 }
9739}
9740#line 9741 "parse.c"
9741 break;
9742
9743 case YYSYMBOL_f_marg: /* f_marg */
9744#line 2618 "parse.y"
9745 {
9746 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9747 rb_parser_printf(p, "NODE_SPECIAL");
9748 }
9749 else if (((*yyvaluep).node)) {
9750 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9751 }
9752}
9753#line 9754 "parse.c"
9754 break;
9755
9756 case YYSYMBOL_mlhs_items_f_marg: /* mlhs_items_f_marg */
9757#line 2618 "parse.y"
9758 {
9759 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9760 rb_parser_printf(p, "NODE_SPECIAL");
9761 }
9762 else if (((*yyvaluep).node)) {
9763 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9764 }
9765}
9766#line 9767 "parse.c"
9767 break;
9768
9769 case YYSYMBOL_f_margs: /* f_margs */
9770#line 2618 "parse.y"
9771 {
9772 if ((NODE *)((*yyvaluep).node_masgn) == (NODE *)-1) {
9773 rb_parser_printf(p, "NODE_SPECIAL");
9774 }
9775 else if (((*yyvaluep).node_masgn)) {
9776 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_masgn)))));
9777 }
9778}
9779#line 9780 "parse.c"
9780 break;
9781
9782 case YYSYMBOL_f_rest_marg: /* f_rest_marg */
9783#line 2618 "parse.y"
9784 {
9785 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9786 rb_parser_printf(p, "NODE_SPECIAL");
9787 }
9788 else if (((*yyvaluep).node)) {
9789 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9790 }
9791}
9792#line 9793 "parse.c"
9793 break;
9794
9795 case YYSYMBOL_f_any_kwrest: /* f_any_kwrest */
9796#line 2627 "parse.y"
9797 {
9798 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
9799}
9800#line 9801 "parse.c"
9801 break;
9802
9803 case YYSYMBOL_f_kw_primary_value: /* f_kw_primary_value */
9804#line 2618 "parse.y"
9805 {
9806 if ((NODE *)((*yyvaluep).node_kw_arg) == (NODE *)-1) {
9807 rb_parser_printf(p, "NODE_SPECIAL");
9808 }
9809 else if (((*yyvaluep).node_kw_arg)) {
9810 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_kw_arg)))));
9811 }
9812}
9813#line 9814 "parse.c"
9814 break;
9815
9816 case YYSYMBOL_f_kwarg_primary_value: /* f_kwarg_primary_value */
9817#line 2618 "parse.y"
9818 {
9819 if ((NODE *)((*yyvaluep).node_kw_arg) == (NODE *)-1) {
9820 rb_parser_printf(p, "NODE_SPECIAL");
9821 }
9822 else if (((*yyvaluep).node_kw_arg)) {
9823 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_kw_arg)))));
9824 }
9825}
9826#line 9827 "parse.c"
9827 break;
9828
9829 case YYSYMBOL_opt_f_block_arg_none: /* opt_f_block_arg_none */
9830#line 2627 "parse.y"
9831 {
9832 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
9833}
9834#line 9835 "parse.c"
9835 break;
9836
9837 case YYSYMBOL_args_tail_basic_primary_value_none: /* args_tail_basic_primary_value_none */
9838#line 2618 "parse.y"
9839 {
9840 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
9841 rb_parser_printf(p, "NODE_SPECIAL");
9842 }
9843 else if (((*yyvaluep).node_args)) {
9844 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
9845 }
9846}
9847#line 9848 "parse.c"
9848 break;
9849
9850 case YYSYMBOL_block_args_tail: /* block_args_tail */
9851#line 2618 "parse.y"
9852 {
9853 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
9854 rb_parser_printf(p, "NODE_SPECIAL");
9855 }
9856 else if (((*yyvaluep).node_args)) {
9857 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
9858 }
9859}
9860#line 9861 "parse.c"
9861 break;
9862
9863 case YYSYMBOL_excessed_comma: /* excessed_comma */
9864#line 2627 "parse.y"
9865 {
9866 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
9867}
9868#line 9869 "parse.c"
9869 break;
9870
9871 case YYSYMBOL_f_opt_primary_value: /* f_opt_primary_value */
9872#line 2618 "parse.y"
9873 {
9874 if ((NODE *)((*yyvaluep).node_opt_arg) == (NODE *)-1) {
9875 rb_parser_printf(p, "NODE_SPECIAL");
9876 }
9877 else if (((*yyvaluep).node_opt_arg)) {
9878 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_opt_arg)))));
9879 }
9880}
9881#line 9882 "parse.c"
9882 break;
9883
9884 case YYSYMBOL_f_opt_arg_primary_value: /* f_opt_arg_primary_value */
9885#line 2618 "parse.y"
9886 {
9887 if ((NODE *)((*yyvaluep).node_opt_arg) == (NODE *)-1) {
9888 rb_parser_printf(p, "NODE_SPECIAL");
9889 }
9890 else if (((*yyvaluep).node_opt_arg)) {
9891 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_opt_arg)))));
9892 }
9893}
9894#line 9895 "parse.c"
9895 break;
9896
9897 case YYSYMBOL_opt_args_tail_block_args_tail_none: /* opt_args_tail_block_args_tail_none */
9898#line 2618 "parse.y"
9899 {
9900 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
9901 rb_parser_printf(p, "NODE_SPECIAL");
9902 }
9903 else if (((*yyvaluep).node_args)) {
9904 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
9905 }
9906}
9907#line 9908 "parse.c"
9908 break;
9909
9910 case YYSYMBOL_args_list_primary_value_opt_args_tail_block_args_tail_none: /* args-list_primary_value_opt_args_tail_block_args_tail_none */
9911#line 2618 "parse.y"
9912 {
9913 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
9914 rb_parser_printf(p, "NODE_SPECIAL");
9915 }
9916 else if (((*yyvaluep).node_args)) {
9917 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
9918 }
9919}
9920#line 9921 "parse.c"
9921 break;
9922
9923 case YYSYMBOL_block_param: /* block_param */
9924#line 2618 "parse.y"
9925 {
9926 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
9927 rb_parser_printf(p, "NODE_SPECIAL");
9928 }
9929 else if (((*yyvaluep).node_args)) {
9930 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
9931 }
9932}
9933#line 9934 "parse.c"
9934 break;
9935
9936 case YYSYMBOL_tail_only_args_block_args_tail: /* tail-only-args_block_args_tail */
9937#line 2618 "parse.y"
9938 {
9939 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
9940 rb_parser_printf(p, "NODE_SPECIAL");
9941 }
9942 else if (((*yyvaluep).node_args)) {
9943 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
9944 }
9945}
9946#line 9947 "parse.c"
9947 break;
9948
9949 case YYSYMBOL_opt_block_param_def: /* opt_block_param_def */
9950#line 2618 "parse.y"
9951 {
9952 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
9953 rb_parser_printf(p, "NODE_SPECIAL");
9954 }
9955 else if (((*yyvaluep).node_args)) {
9956 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
9957 }
9958}
9959#line 9960 "parse.c"
9960 break;
9961
9962 case YYSYMBOL_block_param_def: /* block_param_def */
9963#line 2618 "parse.y"
9964 {
9965 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
9966 rb_parser_printf(p, "NODE_SPECIAL");
9967 }
9968 else if (((*yyvaluep).node_args)) {
9969 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
9970 }
9971}
9972#line 9973 "parse.c"
9973 break;
9974
9975 case YYSYMBOL_opt_block_param: /* opt_block_param */
9976#line 2618 "parse.y"
9977 {
9978 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
9979 rb_parser_printf(p, "NODE_SPECIAL");
9980 }
9981 else if (((*yyvaluep).node_args)) {
9982 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
9983 }
9984}
9985#line 9986 "parse.c"
9986 break;
9987
9988 case YYSYMBOL_opt_bv_decl: /* opt_bv_decl */
9989#line 2627 "parse.y"
9990 {
9991 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
9992}
9993#line 9994 "parse.c"
9994 break;
9995
9996 case YYSYMBOL_bv_decls: /* bv_decls */
9997#line 2627 "parse.y"
9998 {
9999 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
10000}
10001#line 10002 "parse.c"
10002 break;
10003
10004 case YYSYMBOL_bvar: /* bvar */
10005#line 2627 "parse.y"
10006 {
10007 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
10008}
10009#line 10010 "parse.c"
10010 break;
10011
10012 case YYSYMBOL_numparam: /* numparam */
10013#line 2618 "parse.y"
10014 {
10015 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10016 rb_parser_printf(p, "NODE_SPECIAL");
10017 }
10018 else if (((*yyvaluep).node)) {
10019 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10020 }
10021}
10022#line 10023 "parse.c"
10023 break;
10024
10025 case YYSYMBOL_it_id: /* it_id */
10026#line 2627 "parse.y"
10027 {
10028 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
10029}
10030#line 10031 "parse.c"
10031 break;
10032
10033 case YYSYMBOL_lambda: /* lambda */
10034#line 2618 "parse.y"
10035 {
10036 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10037 rb_parser_printf(p, "NODE_SPECIAL");
10038 }
10039 else if (((*yyvaluep).node)) {
10040 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10041 }
10042}
10043#line 10044 "parse.c"
10044 break;
10045
10046 case YYSYMBOL_f_larglist: /* f_larglist */
10047#line 2618 "parse.y"
10048 {
10049 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
10050 rb_parser_printf(p, "NODE_SPECIAL");
10051 }
10052 else if (((*yyvaluep).node_args)) {
10053 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
10054 }
10055}
10056#line 10057 "parse.c"
10057 break;
10058
10059 case YYSYMBOL_do_block: /* do_block */
10060#line 2618 "parse.y"
10061 {
10062 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10063 rb_parser_printf(p, "NODE_SPECIAL");
10064 }
10065 else if (((*yyvaluep).node)) {
10066 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10067 }
10068}
10069#line 10070 "parse.c"
10070 break;
10071
10072 case YYSYMBOL_block_call: /* block_call */
10073#line 2618 "parse.y"
10074 {
10075 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10076 rb_parser_printf(p, "NODE_SPECIAL");
10077 }
10078 else if (((*yyvaluep).node)) {
10079 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10080 }
10081}
10082#line 10083 "parse.c"
10083 break;
10084
10085 case YYSYMBOL_method_call: /* method_call */
10086#line 2618 "parse.y"
10087 {
10088 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10089 rb_parser_printf(p, "NODE_SPECIAL");
10090 }
10091 else if (((*yyvaluep).node)) {
10092 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10093 }
10094}
10095#line 10096 "parse.c"
10096 break;
10097
10098 case YYSYMBOL_brace_block: /* brace_block */
10099#line 2618 "parse.y"
10100 {
10101 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10102 rb_parser_printf(p, "NODE_SPECIAL");
10103 }
10104 else if (((*yyvaluep).node)) {
10105 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10106 }
10107}
10108#line 10109 "parse.c"
10109 break;
10110
10111 case YYSYMBOL_brace_body: /* brace_body */
10112#line 2618 "parse.y"
10113 {
10114 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10115 rb_parser_printf(p, "NODE_SPECIAL");
10116 }
10117 else if (((*yyvaluep).node)) {
10118 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10119 }
10120}
10121#line 10122 "parse.c"
10122 break;
10123
10124 case YYSYMBOL_do_body: /* do_body */
10125#line 2618 "parse.y"
10126 {
10127 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10128 rb_parser_printf(p, "NODE_SPECIAL");
10129 }
10130 else if (((*yyvaluep).node)) {
10131 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10132 }
10133}
10134#line 10135 "parse.c"
10135 break;
10136
10137 case YYSYMBOL_case_args: /* case_args */
10138#line 2618 "parse.y"
10139 {
10140 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10141 rb_parser_printf(p, "NODE_SPECIAL");
10142 }
10143 else if (((*yyvaluep).node)) {
10144 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10145 }
10146}
10147#line 10148 "parse.c"
10148 break;
10149
10150 case YYSYMBOL_case_body: /* case_body */
10151#line 2618 "parse.y"
10152 {
10153 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10154 rb_parser_printf(p, "NODE_SPECIAL");
10155 }
10156 else if (((*yyvaluep).node)) {
10157 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10158 }
10159}
10160#line 10161 "parse.c"
10161 break;
10162
10163 case YYSYMBOL_cases: /* cases */
10164#line 2618 "parse.y"
10165 {
10166 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10167 rb_parser_printf(p, "NODE_SPECIAL");
10168 }
10169 else if (((*yyvaluep).node)) {
10170 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10171 }
10172}
10173#line 10174 "parse.c"
10174 break;
10175
10176 case YYSYMBOL_p_case_body: /* p_case_body */
10177#line 2618 "parse.y"
10178 {
10179 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10180 rb_parser_printf(p, "NODE_SPECIAL");
10181 }
10182 else if (((*yyvaluep).node)) {
10183 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10184 }
10185}
10186#line 10187 "parse.c"
10187 break;
10188
10189 case YYSYMBOL_p_cases: /* p_cases */
10190#line 2618 "parse.y"
10191 {
10192 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10193 rb_parser_printf(p, "NODE_SPECIAL");
10194 }
10195 else if (((*yyvaluep).node)) {
10196 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10197 }
10198}
10199#line 10200 "parse.c"
10200 break;
10201
10202 case YYSYMBOL_p_top_expr: /* p_top_expr */
10203#line 2618 "parse.y"
10204 {
10205 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10206 rb_parser_printf(p, "NODE_SPECIAL");
10207 }
10208 else if (((*yyvaluep).node)) {
10209 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10210 }
10211}
10212#line 10213 "parse.c"
10213 break;
10214
10215 case YYSYMBOL_p_top_expr_body: /* p_top_expr_body */
10216#line 2618 "parse.y"
10217 {
10218 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10219 rb_parser_printf(p, "NODE_SPECIAL");
10220 }
10221 else if (((*yyvaluep).node)) {
10222 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10223 }
10224}
10225#line 10226 "parse.c"
10226 break;
10227
10228 case YYSYMBOL_p_expr: /* p_expr */
10229#line 2618 "parse.y"
10230 {
10231 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10232 rb_parser_printf(p, "NODE_SPECIAL");
10233 }
10234 else if (((*yyvaluep).node)) {
10235 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10236 }
10237}
10238#line 10239 "parse.c"
10239 break;
10240
10241 case YYSYMBOL_p_as: /* p_as */
10242#line 2618 "parse.y"
10243 {
10244 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10245 rb_parser_printf(p, "NODE_SPECIAL");
10246 }
10247 else if (((*yyvaluep).node)) {
10248 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10249 }
10250}
10251#line 10252 "parse.c"
10252 break;
10253
10254 case YYSYMBOL_p_alt: /* p_alt */
10255#line 2618 "parse.y"
10256 {
10257 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10258 rb_parser_printf(p, "NODE_SPECIAL");
10259 }
10260 else if (((*yyvaluep).node)) {
10261 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10262 }
10263}
10264#line 10265 "parse.c"
10265 break;
10266
10267 case YYSYMBOL_p_expr_basic: /* p_expr_basic */
10268#line 2618 "parse.y"
10269 {
10270 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10271 rb_parser_printf(p, "NODE_SPECIAL");
10272 }
10273 else if (((*yyvaluep).node)) {
10274 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10275 }
10276}
10277#line 10278 "parse.c"
10278 break;
10279
10280 case YYSYMBOL_p_args: /* p_args */
10281#line 2618 "parse.y"
10282 {
10283 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10284 rb_parser_printf(p, "NODE_SPECIAL");
10285 }
10286 else if (((*yyvaluep).node)) {
10287 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10288 }
10289}
10290#line 10291 "parse.c"
10291 break;
10292
10293 case YYSYMBOL_p_args_head: /* p_args_head */
10294#line 2618 "parse.y"
10295 {
10296 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10297 rb_parser_printf(p, "NODE_SPECIAL");
10298 }
10299 else if (((*yyvaluep).node)) {
10300 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10301 }
10302}
10303#line 10304 "parse.c"
10304 break;
10305
10306 case YYSYMBOL_p_args_tail: /* p_args_tail */
10307#line 2618 "parse.y"
10308 {
10309 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10310 rb_parser_printf(p, "NODE_SPECIAL");
10311 }
10312 else if (((*yyvaluep).node)) {
10313 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10314 }
10315}
10316#line 10317 "parse.c"
10317 break;
10318
10319 case YYSYMBOL_p_find: /* p_find */
10320#line 2618 "parse.y"
10321 {
10322 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10323 rb_parser_printf(p, "NODE_SPECIAL");
10324 }
10325 else if (((*yyvaluep).node)) {
10326 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10327 }
10328}
10329#line 10330 "parse.c"
10330 break;
10331
10332 case YYSYMBOL_p_rest: /* p_rest */
10333#line 2618 "parse.y"
10334 {
10335 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10336 rb_parser_printf(p, "NODE_SPECIAL");
10337 }
10338 else if (((*yyvaluep).node)) {
10339 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10340 }
10341}
10342#line 10343 "parse.c"
10343 break;
10344
10345 case YYSYMBOL_p_args_post: /* p_args_post */
10346#line 2618 "parse.y"
10347 {
10348 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10349 rb_parser_printf(p, "NODE_SPECIAL");
10350 }
10351 else if (((*yyvaluep).node)) {
10352 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10353 }
10354}
10355#line 10356 "parse.c"
10356 break;
10357
10358 case YYSYMBOL_p_arg: /* p_arg */
10359#line 2618 "parse.y"
10360 {
10361 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10362 rb_parser_printf(p, "NODE_SPECIAL");
10363 }
10364 else if (((*yyvaluep).node)) {
10365 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10366 }
10367}
10368#line 10369 "parse.c"
10369 break;
10370
10371 case YYSYMBOL_p_kwargs: /* p_kwargs */
10372#line 2618 "parse.y"
10373 {
10374 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10375 rb_parser_printf(p, "NODE_SPECIAL");
10376 }
10377 else if (((*yyvaluep).node)) {
10378 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10379 }
10380}
10381#line 10382 "parse.c"
10382 break;
10383
10384 case YYSYMBOL_p_kwarg: /* p_kwarg */
10385#line 2618 "parse.y"
10386 {
10387 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10388 rb_parser_printf(p, "NODE_SPECIAL");
10389 }
10390 else if (((*yyvaluep).node)) {
10391 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10392 }
10393}
10394#line 10395 "parse.c"
10395 break;
10396
10397 case YYSYMBOL_p_kw: /* p_kw */
10398#line 2618 "parse.y"
10399 {
10400 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10401 rb_parser_printf(p, "NODE_SPECIAL");
10402 }
10403 else if (((*yyvaluep).node)) {
10404 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10405 }
10406}
10407#line 10408 "parse.c"
10408 break;
10409
10410 case YYSYMBOL_p_kw_label: /* p_kw_label */
10411#line 2627 "parse.y"
10412 {
10413 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
10414}
10415#line 10416 "parse.c"
10416 break;
10417
10418 case YYSYMBOL_p_kwrest: /* p_kwrest */
10419#line 2627 "parse.y"
10420 {
10421 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
10422}
10423#line 10424 "parse.c"
10424 break;
10425
10426 case YYSYMBOL_p_kwnorest: /* p_kwnorest */
10427#line 2627 "parse.y"
10428 {
10429 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
10430}
10431#line 10432 "parse.c"
10432 break;
10433
10434 case YYSYMBOL_p_any_kwrest: /* p_any_kwrest */
10435#line 2627 "parse.y"
10436 {
10437 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
10438}
10439#line 10440 "parse.c"
10440 break;
10441
10442 case YYSYMBOL_p_value: /* p_value */
10443#line 2618 "parse.y"
10444 {
10445 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10446 rb_parser_printf(p, "NODE_SPECIAL");
10447 }
10448 else if (((*yyvaluep).node)) {
10449 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10450 }
10451}
10452#line 10453 "parse.c"
10453 break;
10454
10455 case YYSYMBOL_range_expr_p_primitive: /* range_expr_p_primitive */
10456#line 2618 "parse.y"
10457 {
10458 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10459 rb_parser_printf(p, "NODE_SPECIAL");
10460 }
10461 else if (((*yyvaluep).node)) {
10462 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10463 }
10464}
10465#line 10466 "parse.c"
10466 break;
10467
10468 case YYSYMBOL_p_primitive: /* p_primitive */
10469#line 2618 "parse.y"
10470 {
10471 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10472 rb_parser_printf(p, "NODE_SPECIAL");
10473 }
10474 else if (((*yyvaluep).node)) {
10475 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10476 }
10477}
10478#line 10479 "parse.c"
10479 break;
10480
10481 case YYSYMBOL_p_variable: /* p_variable */
10482#line 2618 "parse.y"
10483 {
10484 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10485 rb_parser_printf(p, "NODE_SPECIAL");
10486 }
10487 else if (((*yyvaluep).node)) {
10488 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10489 }
10490}
10491#line 10492 "parse.c"
10492 break;
10493
10494 case YYSYMBOL_p_var_ref: /* p_var_ref */
10495#line 2618 "parse.y"
10496 {
10497 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10498 rb_parser_printf(p, "NODE_SPECIAL");
10499 }
10500 else if (((*yyvaluep).node)) {
10501 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10502 }
10503}
10504#line 10505 "parse.c"
10505 break;
10506
10507 case YYSYMBOL_p_expr_ref: /* p_expr_ref */
10508#line 2618 "parse.y"
10509 {
10510 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10511 rb_parser_printf(p, "NODE_SPECIAL");
10512 }
10513 else if (((*yyvaluep).node)) {
10514 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10515 }
10516}
10517#line 10518 "parse.c"
10518 break;
10519
10520 case YYSYMBOL_p_const: /* p_const */
10521#line 2618 "parse.y"
10522 {
10523 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10524 rb_parser_printf(p, "NODE_SPECIAL");
10525 }
10526 else if (((*yyvaluep).node)) {
10527 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10528 }
10529}
10530#line 10531 "parse.c"
10531 break;
10532
10533 case YYSYMBOL_opt_rescue: /* opt_rescue */
10534#line 2618 "parse.y"
10535 {
10536 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10537 rb_parser_printf(p, "NODE_SPECIAL");
10538 }
10539 else if (((*yyvaluep).node)) {
10540 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10541 }
10542}
10543#line 10544 "parse.c"
10544 break;
10545
10546 case YYSYMBOL_exc_list: /* exc_list */
10547#line 2618 "parse.y"
10548 {
10549 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10550 rb_parser_printf(p, "NODE_SPECIAL");
10551 }
10552 else if (((*yyvaluep).node)) {
10553 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10554 }
10555}
10556#line 10557 "parse.c"
10557 break;
10558
10559 case YYSYMBOL_exc_var: /* exc_var */
10560#line 2618 "parse.y"
10561 {
10562 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10563 rb_parser_printf(p, "NODE_SPECIAL");
10564 }
10565 else if (((*yyvaluep).node)) {
10566 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10567 }
10568}
10569#line 10570 "parse.c"
10570 break;
10571
10572 case YYSYMBOL_opt_ensure: /* opt_ensure */
10573#line 2618 "parse.y"
10574 {
10575 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10576 rb_parser_printf(p, "NODE_SPECIAL");
10577 }
10578 else if (((*yyvaluep).node)) {
10579 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10580 }
10581}
10582#line 10583 "parse.c"
10583 break;
10584
10585 case YYSYMBOL_literal: /* literal */
10586#line 2618 "parse.y"
10587 {
10588 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10589 rb_parser_printf(p, "NODE_SPECIAL");
10590 }
10591 else if (((*yyvaluep).node)) {
10592 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10593 }
10594}
10595#line 10596 "parse.c"
10596 break;
10597
10598 case YYSYMBOL_strings: /* strings */
10599#line 2618 "parse.y"
10600 {
10601 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10602 rb_parser_printf(p, "NODE_SPECIAL");
10603 }
10604 else if (((*yyvaluep).node)) {
10605 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10606 }
10607}
10608#line 10609 "parse.c"
10609 break;
10610
10611 case YYSYMBOL_string: /* string */
10612#line 2618 "parse.y"
10613 {
10614 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10615 rb_parser_printf(p, "NODE_SPECIAL");
10616 }
10617 else if (((*yyvaluep).node)) {
10618 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10619 }
10620}
10621#line 10622 "parse.c"
10622 break;
10623
10624 case YYSYMBOL_string1: /* string1 */
10625#line 2618 "parse.y"
10626 {
10627 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10628 rb_parser_printf(p, "NODE_SPECIAL");
10629 }
10630 else if (((*yyvaluep).node)) {
10631 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10632 }
10633}
10634#line 10635 "parse.c"
10635 break;
10636
10637 case YYSYMBOL_xstring: /* xstring */
10638#line 2618 "parse.y"
10639 {
10640 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10641 rb_parser_printf(p, "NODE_SPECIAL");
10642 }
10643 else if (((*yyvaluep).node)) {
10644 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10645 }
10646}
10647#line 10648 "parse.c"
10648 break;
10649
10650 case YYSYMBOL_regexp: /* regexp */
10651#line 2618 "parse.y"
10652 {
10653 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10654 rb_parser_printf(p, "NODE_SPECIAL");
10655 }
10656 else if (((*yyvaluep).node)) {
10657 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10658 }
10659}
10660#line 10661 "parse.c"
10661 break;
10662
10663 case YYSYMBOL_words_tWORDS_BEG_word_list: /* words_tWORDS_BEG_word_list */
10664#line 2618 "parse.y"
10665 {
10666 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10667 rb_parser_printf(p, "NODE_SPECIAL");
10668 }
10669 else if (((*yyvaluep).node)) {
10670 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10671 }
10672}
10673#line 10674 "parse.c"
10674 break;
10675
10676 case YYSYMBOL_words: /* words */
10677#line 2618 "parse.y"
10678 {
10679 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10680 rb_parser_printf(p, "NODE_SPECIAL");
10681 }
10682 else if (((*yyvaluep).node)) {
10683 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10684 }
10685}
10686#line 10687 "parse.c"
10687 break;
10688
10689 case YYSYMBOL_word_list: /* word_list */
10690#line 2618 "parse.y"
10691 {
10692 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10693 rb_parser_printf(p, "NODE_SPECIAL");
10694 }
10695 else if (((*yyvaluep).node)) {
10696 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10697 }
10698}
10699#line 10700 "parse.c"
10700 break;
10701
10702 case YYSYMBOL_word: /* word */
10703#line 2618 "parse.y"
10704 {
10705 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10706 rb_parser_printf(p, "NODE_SPECIAL");
10707 }
10708 else if (((*yyvaluep).node)) {
10709 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10710 }
10711}
10712#line 10713 "parse.c"
10713 break;
10714
10715 case YYSYMBOL_words_tSYMBOLS_BEG_symbol_list: /* words_tSYMBOLS_BEG_symbol_list */
10716#line 2618 "parse.y"
10717 {
10718 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10719 rb_parser_printf(p, "NODE_SPECIAL");
10720 }
10721 else if (((*yyvaluep).node)) {
10722 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10723 }
10724}
10725#line 10726 "parse.c"
10726 break;
10727
10728 case YYSYMBOL_symbols: /* symbols */
10729#line 2618 "parse.y"
10730 {
10731 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10732 rb_parser_printf(p, "NODE_SPECIAL");
10733 }
10734 else if (((*yyvaluep).node)) {
10735 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10736 }
10737}
10738#line 10739 "parse.c"
10739 break;
10740
10741 case YYSYMBOL_symbol_list: /* symbol_list */
10742#line 2618 "parse.y"
10743 {
10744 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10745 rb_parser_printf(p, "NODE_SPECIAL");
10746 }
10747 else if (((*yyvaluep).node)) {
10748 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10749 }
10750}
10751#line 10752 "parse.c"
10752 break;
10753
10754 case YYSYMBOL_words_tQWORDS_BEG_qword_list: /* words_tQWORDS_BEG_qword_list */
10755#line 2618 "parse.y"
10756 {
10757 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10758 rb_parser_printf(p, "NODE_SPECIAL");
10759 }
10760 else if (((*yyvaluep).node)) {
10761 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10762 }
10763}
10764#line 10765 "parse.c"
10765 break;
10766
10767 case YYSYMBOL_qwords: /* qwords */
10768#line 2618 "parse.y"
10769 {
10770 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10771 rb_parser_printf(p, "NODE_SPECIAL");
10772 }
10773 else if (((*yyvaluep).node)) {
10774 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10775 }
10776}
10777#line 10778 "parse.c"
10778 break;
10779
10780 case YYSYMBOL_words_tQSYMBOLS_BEG_qsym_list: /* words_tQSYMBOLS_BEG_qsym_list */
10781#line 2618 "parse.y"
10782 {
10783 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10784 rb_parser_printf(p, "NODE_SPECIAL");
10785 }
10786 else if (((*yyvaluep).node)) {
10787 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10788 }
10789}
10790#line 10791 "parse.c"
10791 break;
10792
10793 case YYSYMBOL_qsymbols: /* qsymbols */
10794#line 2618 "parse.y"
10795 {
10796 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10797 rb_parser_printf(p, "NODE_SPECIAL");
10798 }
10799 else if (((*yyvaluep).node)) {
10800 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10801 }
10802}
10803#line 10804 "parse.c"
10804 break;
10805
10806 case YYSYMBOL_qword_list: /* qword_list */
10807#line 2618 "parse.y"
10808 {
10809 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10810 rb_parser_printf(p, "NODE_SPECIAL");
10811 }
10812 else if (((*yyvaluep).node)) {
10813 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10814 }
10815}
10816#line 10817 "parse.c"
10817 break;
10818
10819 case YYSYMBOL_qsym_list: /* qsym_list */
10820#line 2618 "parse.y"
10821 {
10822 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10823 rb_parser_printf(p, "NODE_SPECIAL");
10824 }
10825 else if (((*yyvaluep).node)) {
10826 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10827 }
10828}
10829#line 10830 "parse.c"
10830 break;
10831
10832 case YYSYMBOL_string_contents: /* string_contents */
10833#line 2618 "parse.y"
10834 {
10835 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10836 rb_parser_printf(p, "NODE_SPECIAL");
10837 }
10838 else if (((*yyvaluep).node)) {
10839 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10840 }
10841}
10842#line 10843 "parse.c"
10843 break;
10844
10845 case YYSYMBOL_xstring_contents: /* xstring_contents */
10846#line 2618 "parse.y"
10847 {
10848 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10849 rb_parser_printf(p, "NODE_SPECIAL");
10850 }
10851 else if (((*yyvaluep).node)) {
10852 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10853 }
10854}
10855#line 10856 "parse.c"
10856 break;
10857
10858 case YYSYMBOL_regexp_contents: /* regexp_contents */
10859#line 2618 "parse.y"
10860 {
10861 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10862 rb_parser_printf(p, "NODE_SPECIAL");
10863 }
10864 else if (((*yyvaluep).node)) {
10865 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10866 }
10867}
10868#line 10869 "parse.c"
10869 break;
10870
10871 case YYSYMBOL_string_content: /* string_content */
10872#line 2618 "parse.y"
10873 {
10874 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10875 rb_parser_printf(p, "NODE_SPECIAL");
10876 }
10877 else if (((*yyvaluep).node)) {
10878 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10879 }
10880}
10881#line 10882 "parse.c"
10882 break;
10883
10884 case YYSYMBOL_string_dvar: /* string_dvar */
10885#line 2618 "parse.y"
10886 {
10887 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10888 rb_parser_printf(p, "NODE_SPECIAL");
10889 }
10890 else if (((*yyvaluep).node)) {
10891 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10892 }
10893}
10894#line 10895 "parse.c"
10895 break;
10896
10897 case YYSYMBOL_symbol: /* symbol */
10898#line 2618 "parse.y"
10899 {
10900 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10901 rb_parser_printf(p, "NODE_SPECIAL");
10902 }
10903 else if (((*yyvaluep).node)) {
10904 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10905 }
10906}
10907#line 10908 "parse.c"
10908 break;
10909
10910 case YYSYMBOL_ssym: /* ssym */
10911#line 2618 "parse.y"
10912 {
10913 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10914 rb_parser_printf(p, "NODE_SPECIAL");
10915 }
10916 else if (((*yyvaluep).node)) {
10917 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10918 }
10919}
10920#line 10921 "parse.c"
10921 break;
10922
10923 case YYSYMBOL_sym: /* sym */
10924#line 2627 "parse.y"
10925 {
10926 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
10927}
10928#line 10929 "parse.c"
10929 break;
10930
10931 case YYSYMBOL_dsym: /* dsym */
10932#line 2618 "parse.y"
10933 {
10934 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10935 rb_parser_printf(p, "NODE_SPECIAL");
10936 }
10937 else if (((*yyvaluep).node)) {
10938 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10939 }
10940}
10941#line 10942 "parse.c"
10942 break;
10943
10944 case YYSYMBOL_numeric: /* numeric */
10945#line 2618 "parse.y"
10946 {
10947 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10948 rb_parser_printf(p, "NODE_SPECIAL");
10949 }
10950 else if (((*yyvaluep).node)) {
10951 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10952 }
10953}
10954#line 10955 "parse.c"
10955 break;
10956
10957 case YYSYMBOL_simple_numeric: /* simple_numeric */
10958#line 2618 "parse.y"
10959 {
10960 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10961 rb_parser_printf(p, "NODE_SPECIAL");
10962 }
10963 else if (((*yyvaluep).node)) {
10964 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10965 }
10966}
10967#line 10968 "parse.c"
10968 break;
10969
10970 case YYSYMBOL_nonlocal_var: /* nonlocal_var */
10971#line 2627 "parse.y"
10972 {
10973 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
10974}
10975#line 10976 "parse.c"
10976 break;
10977
10978 case YYSYMBOL_user_variable: /* user_variable */
10979#line 2627 "parse.y"
10980 {
10981 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
10982}
10983#line 10984 "parse.c"
10984 break;
10985
10986 case YYSYMBOL_keyword_variable: /* keyword_variable */
10987#line 2627 "parse.y"
10988 {
10989 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
10990}
10991#line 10992 "parse.c"
10992 break;
10993
10994 case YYSYMBOL_var_ref: /* var_ref */
10995#line 2618 "parse.y"
10996 {
10997 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10998 rb_parser_printf(p, "NODE_SPECIAL");
10999 }
11000 else if (((*yyvaluep).node)) {
11001 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
11002 }
11003}
11004#line 11005 "parse.c"
11005 break;
11006
11007 case YYSYMBOL_var_lhs: /* var_lhs */
11008#line 2618 "parse.y"
11009 {
11010 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
11011 rb_parser_printf(p, "NODE_SPECIAL");
11012 }
11013 else if (((*yyvaluep).node)) {
11014 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
11015 }
11016}
11017#line 11018 "parse.c"
11018 break;
11019
11020 case YYSYMBOL_backref: /* backref */
11021#line 2618 "parse.y"
11022 {
11023 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
11024 rb_parser_printf(p, "NODE_SPECIAL");
11025 }
11026 else if (((*yyvaluep).node)) {
11027 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
11028 }
11029}
11030#line 11031 "parse.c"
11031 break;
11032
11033 case YYSYMBOL_superclass: /* superclass */
11034#line 2618 "parse.y"
11035 {
11036 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
11037 rb_parser_printf(p, "NODE_SPECIAL");
11038 }
11039 else if (((*yyvaluep).node)) {
11040 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
11041 }
11042}
11043#line 11044 "parse.c"
11044 break;
11045
11046 case YYSYMBOL_f_opt_paren_args: /* f_opt_paren_args */
11047#line 2618 "parse.y"
11048 {
11049 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
11050 rb_parser_printf(p, "NODE_SPECIAL");
11051 }
11052 else if (((*yyvaluep).node_args)) {
11053 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
11054 }
11055}
11056#line 11057 "parse.c"
11057 break;
11058
11059 case YYSYMBOL_f_empty_arg: /* f_empty_arg */
11060#line 2618 "parse.y"
11061 {
11062 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
11063 rb_parser_printf(p, "NODE_SPECIAL");
11064 }
11065 else if (((*yyvaluep).node_args)) {
11066 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
11067 }
11068}
11069#line 11070 "parse.c"
11070 break;
11071
11072 case YYSYMBOL_f_paren_args: /* f_paren_args */
11073#line 2618 "parse.y"
11074 {
11075 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
11076 rb_parser_printf(p, "NODE_SPECIAL");
11077 }
11078 else if (((*yyvaluep).node_args)) {
11079 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
11080 }
11081}
11082#line 11083 "parse.c"
11083 break;
11084
11085 case YYSYMBOL_f_arglist: /* f_arglist */
11086#line 2618 "parse.y"
11087 {
11088 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
11089 rb_parser_printf(p, "NODE_SPECIAL");
11090 }
11091 else if (((*yyvaluep).node_args)) {
11092 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
11093 }
11094}
11095#line 11096 "parse.c"
11096 break;
11097
11098 case YYSYMBOL_f_kw_arg_value: /* f_kw_arg_value */
11099#line 2618 "parse.y"
11100 {
11101 if ((NODE *)((*yyvaluep).node_kw_arg) == (NODE *)-1) {
11102 rb_parser_printf(p, "NODE_SPECIAL");
11103 }
11104 else if (((*yyvaluep).node_kw_arg)) {
11105 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_kw_arg)))));
11106 }
11107}
11108#line 11109 "parse.c"
11109 break;
11110
11111 case YYSYMBOL_f_kwarg_arg_value: /* f_kwarg_arg_value */
11112#line 2618 "parse.y"
11113 {
11114 if ((NODE *)((*yyvaluep).node_kw_arg) == (NODE *)-1) {
11115 rb_parser_printf(p, "NODE_SPECIAL");
11116 }
11117 else if (((*yyvaluep).node_kw_arg)) {
11118 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_kw_arg)))));
11119 }
11120}
11121#line 11122 "parse.c"
11122 break;
11123
11124 case YYSYMBOL_opt_f_block_arg_opt_comma: /* opt_f_block_arg_opt_comma */
11125#line 2627 "parse.y"
11126 {
11127 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
11128}
11129#line 11130 "parse.c"
11130 break;
11131
11132 case YYSYMBOL_args_tail_basic_arg_value_opt_comma: /* args_tail_basic_arg_value_opt_comma */
11133#line 2618 "parse.y"
11134 {
11135 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
11136 rb_parser_printf(p, "NODE_SPECIAL");
11137 }
11138 else if (((*yyvaluep).node_args)) {
11139 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
11140 }
11141}
11142#line 11143 "parse.c"
11143 break;
11144
11145 case YYSYMBOL_args_tail: /* args_tail */
11146#line 2618 "parse.y"
11147 {
11148 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
11149 rb_parser_printf(p, "NODE_SPECIAL");
11150 }
11151 else if (((*yyvaluep).node_args)) {
11152 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
11153 }
11154}
11155#line 11156 "parse.c"
11156 break;
11157
11158 case YYSYMBOL_args_tail_basic_arg_value_none: /* args_tail_basic_arg_value_none */
11159#line 2618 "parse.y"
11160 {
11161 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
11162 rb_parser_printf(p, "NODE_SPECIAL");
11163 }
11164 else if (((*yyvaluep).node_args)) {
11165 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
11166 }
11167}
11168#line 11169 "parse.c"
11169 break;
11170
11171 case YYSYMBOL_largs_tail: /* largs_tail */
11172#line 2618 "parse.y"
11173 {
11174 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
11175 rb_parser_printf(p, "NODE_SPECIAL");
11176 }
11177 else if (((*yyvaluep).node_args)) {
11178 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
11179 }
11180}
11181#line 11182 "parse.c"
11182 break;
11183
11184 case YYSYMBOL_f_opt_arg_value: /* f_opt_arg_value */
11185#line 2618 "parse.y"
11186 {
11187 if ((NODE *)((*yyvaluep).node_opt_arg) == (NODE *)-1) {
11188 rb_parser_printf(p, "NODE_SPECIAL");
11189 }
11190 else if (((*yyvaluep).node_opt_arg)) {
11191 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_opt_arg)))));
11192 }
11193}
11194#line 11195 "parse.c"
11195 break;
11196
11197 case YYSYMBOL_f_opt_arg_arg_value: /* f_opt_arg_arg_value */
11198#line 2618 "parse.y"
11199 {
11200 if ((NODE *)((*yyvaluep).node_opt_arg) == (NODE *)-1) {
11201 rb_parser_printf(p, "NODE_SPECIAL");
11202 }
11203 else if (((*yyvaluep).node_opt_arg)) {
11204 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_opt_arg)))));
11205 }
11206}
11207#line 11208 "parse.c"
11208 break;
11209
11210 case YYSYMBOL_opt_args_tail_args_tail_opt_comma: /* opt_args_tail_args_tail_opt_comma */
11211#line 2618 "parse.y"
11212 {
11213 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
11214 rb_parser_printf(p, "NODE_SPECIAL");
11215 }
11216 else if (((*yyvaluep).node_args)) {
11217 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
11218 }
11219}
11220#line 11221 "parse.c"
11221 break;
11222
11223 case YYSYMBOL_args_list_arg_value_opt_args_tail_args_tail_opt_comma: /* args-list_arg_value_opt_args_tail_args_tail_opt_comma */
11224#line 2618 "parse.y"
11225 {
11226 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
11227 rb_parser_printf(p, "NODE_SPECIAL");
11228 }
11229 else if (((*yyvaluep).node_args)) {
11230 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
11231 }
11232}
11233#line 11234 "parse.c"
11234 break;
11235
11236 case YYSYMBOL_f_args_list_args_tail_opt_comma: /* f_args-list_args_tail_opt_comma */
11237#line 2618 "parse.y"
11238 {
11239 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
11240 rb_parser_printf(p, "NODE_SPECIAL");
11241 }
11242 else if (((*yyvaluep).node_args)) {
11243 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
11244 }
11245}
11246#line 11247 "parse.c"
11247 break;
11248
11249 case YYSYMBOL_tail_only_args_args_tail: /* tail-only-args_args_tail */
11250#line 2618 "parse.y"
11251 {
11252 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
11253 rb_parser_printf(p, "NODE_SPECIAL");
11254 }
11255 else if (((*yyvaluep).node_args)) {
11256 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
11257 }
11258}
11259#line 11260 "parse.c"
11260 break;
11261
11262 case YYSYMBOL_f_args: /* f_args */
11263#line 2618 "parse.y"
11264 {
11265 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
11266 rb_parser_printf(p, "NODE_SPECIAL");
11267 }
11268 else if (((*yyvaluep).node_args)) {
11269 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
11270 }
11271}
11272#line 11273 "parse.c"
11273 break;
11274
11275 case YYSYMBOL_opt_args_tail_largs_tail_none: /* opt_args_tail_largs_tail_none */
11276#line 2618 "parse.y"
11277 {
11278 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
11279 rb_parser_printf(p, "NODE_SPECIAL");
11280 }
11281 else if (((*yyvaluep).node_args)) {
11282 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
11283 }
11284}
11285#line 11286 "parse.c"
11286 break;
11287
11288 case YYSYMBOL_args_list_arg_value_opt_args_tail_largs_tail_none: /* args-list_arg_value_opt_args_tail_largs_tail_none */
11289#line 2618 "parse.y"
11290 {
11291 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
11292 rb_parser_printf(p, "NODE_SPECIAL");
11293 }
11294 else if (((*yyvaluep).node_args)) {
11295 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
11296 }
11297}
11298#line 11299 "parse.c"
11299 break;
11300
11301 case YYSYMBOL_f_args_list_largs_tail_none: /* f_args-list_largs_tail_none */
11302#line 2618 "parse.y"
11303 {
11304 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
11305 rb_parser_printf(p, "NODE_SPECIAL");
11306 }
11307 else if (((*yyvaluep).node_args)) {
11308 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
11309 }
11310}
11311#line 11312 "parse.c"
11312 break;
11313
11314 case YYSYMBOL_tail_only_args_largs_tail: /* tail-only-args_largs_tail */
11315#line 2618 "parse.y"
11316 {
11317 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
11318 rb_parser_printf(p, "NODE_SPECIAL");
11319 }
11320 else if (((*yyvaluep).node_args)) {
11321 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
11322 }
11323}
11324#line 11325 "parse.c"
11325 break;
11326
11327 case YYSYMBOL_f_largs: /* f_largs */
11328#line 2618 "parse.y"
11329 {
11330 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
11331 rb_parser_printf(p, "NODE_SPECIAL");
11332 }
11333 else if (((*yyvaluep).node_args)) {
11334 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
11335 }
11336}
11337#line 11338 "parse.c"
11338 break;
11339
11340 case YYSYMBOL_args_forward: /* args_forward */
11341#line 2627 "parse.y"
11342 {
11343 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
11344}
11345#line 11346 "parse.c"
11346 break;
11347
11348 case YYSYMBOL_f_bad_arg: /* f_bad_arg */
11349#line 2627 "parse.y"
11350 {
11351 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
11352}
11353#line 11354 "parse.c"
11354 break;
11355
11356 case YYSYMBOL_f_norm_arg: /* f_norm_arg */
11357#line 2627 "parse.y"
11358 {
11359 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
11360}
11361#line 11362 "parse.c"
11362 break;
11363
11364 case YYSYMBOL_f_arg_asgn: /* f_arg_asgn */
11365#line 2627 "parse.y"
11366 {
11367 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
11368}
11369#line 11370 "parse.c"
11370 break;
11371
11372 case YYSYMBOL_f_arg_item: /* f_arg_item */
11373#line 2618 "parse.y"
11374 {
11375 if ((NODE *)((*yyvaluep).node_args_aux) == (NODE *)-1) {
11376 rb_parser_printf(p, "NODE_SPECIAL");
11377 }
11378 else if (((*yyvaluep).node_args_aux)) {
11379 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args_aux)))));
11380 }
11381}
11382#line 11383 "parse.c"
11383 break;
11384
11385 case YYSYMBOL_f_arg: /* f_arg */
11386#line 2618 "parse.y"
11387 {
11388 if ((NODE *)((*yyvaluep).node_args_aux) == (NODE *)-1) {
11389 rb_parser_printf(p, "NODE_SPECIAL");
11390 }
11391 else if (((*yyvaluep).node_args_aux)) {
11392 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args_aux)))));
11393 }
11394}
11395#line 11396 "parse.c"
11396 break;
11397
11398 case YYSYMBOL_f_label: /* f_label */
11399#line 2627 "parse.y"
11400 {
11401 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
11402}
11403#line 11404 "parse.c"
11404 break;
11405
11406 case YYSYMBOL_f_no_kwarg: /* f_no_kwarg */
11407#line 2627 "parse.y"
11408 {
11409 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
11410}
11411#line 11412 "parse.c"
11412 break;
11413
11414 case YYSYMBOL_f_kwrest: /* f_kwrest */
11415#line 2627 "parse.y"
11416 {
11417 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
11418}
11419#line 11420 "parse.c"
11420 break;
11421
11422 case YYSYMBOL_f_rest_arg: /* f_rest_arg */
11423#line 2627 "parse.y"
11424 {
11425 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
11426}
11427#line 11428 "parse.c"
11428 break;
11429
11430 case YYSYMBOL_f_block_arg: /* f_block_arg */
11431#line 2627 "parse.y"
11432 {
11433 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
11434}
11435#line 11436 "parse.c"
11436 break;
11437
11438 case YYSYMBOL_opt_comma: /* opt_comma */
11439#line 2627 "parse.y"
11440 {
11441 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
11442}
11443#line 11444 "parse.c"
11444 break;
11445
11446 case YYSYMBOL_value_expr_singleton_expr: /* value_expr_singleton_expr */
11447#line 2618 "parse.y"
11448 {
11449 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
11450 rb_parser_printf(p, "NODE_SPECIAL");
11451 }
11452 else if (((*yyvaluep).node)) {
11453 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
11454 }
11455}
11456#line 11457 "parse.c"
11457 break;
11458
11459 case YYSYMBOL_singleton: /* singleton */
11460#line 2618 "parse.y"
11461 {
11462 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
11463 rb_parser_printf(p, "NODE_SPECIAL");
11464 }
11465 else if (((*yyvaluep).node)) {
11466 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
11467 }
11468}
11469#line 11470 "parse.c"
11470 break;
11471
11472 case YYSYMBOL_singleton_expr: /* singleton_expr */
11473#line 2618 "parse.y"
11474 {
11475 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
11476 rb_parser_printf(p, "NODE_SPECIAL");
11477 }
11478 else if (((*yyvaluep).node)) {
11479 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
11480 }
11481}
11482#line 11483 "parse.c"
11483 break;
11484
11485 case YYSYMBOL_assoc_list: /* assoc_list */
11486#line 2618 "parse.y"
11487 {
11488 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
11489 rb_parser_printf(p, "NODE_SPECIAL");
11490 }
11491 else if (((*yyvaluep).node)) {
11492 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
11493 }
11494}
11495#line 11496 "parse.c"
11496 break;
11497
11498 case YYSYMBOL_assocs: /* assocs */
11499#line 2618 "parse.y"
11500 {
11501 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
11502 rb_parser_printf(p, "NODE_SPECIAL");
11503 }
11504 else if (((*yyvaluep).node)) {
11505 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
11506 }
11507}
11508#line 11509 "parse.c"
11509 break;
11510
11511 case YYSYMBOL_assoc: /* assoc */
11512#line 2618 "parse.y"
11513 {
11514 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
11515 rb_parser_printf(p, "NODE_SPECIAL");
11516 }
11517 else if (((*yyvaluep).node)) {
11518 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
11519 }
11520}
11521#line 11522 "parse.c"
11522 break;
11523
11524 case YYSYMBOL_operation2: /* operation2 */
11525#line 2627 "parse.y"
11526 {
11527 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
11528}
11529#line 11530 "parse.c"
11530 break;
11531
11532 case YYSYMBOL_operation3: /* operation3 */
11533#line 2627 "parse.y"
11534 {
11535 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
11536}
11537#line 11538 "parse.c"
11538 break;
11539
11540 case YYSYMBOL_dot_or_colon: /* dot_or_colon */
11541#line 2627 "parse.y"
11542 {
11543 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
11544}
11545#line 11546 "parse.c"
11546 break;
11547
11548 case YYSYMBOL_call_op: /* call_op */
11549#line 2627 "parse.y"
11550 {
11551 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
11552}
11553#line 11554 "parse.c"
11554 break;
11555
11556 case YYSYMBOL_call_op2: /* call_op2 */
11557#line 2627 "parse.y"
11558 {
11559 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
11560}
11561#line 11562 "parse.c"
11562 break;
11563
11564 case YYSYMBOL_none: /* none */
11565#line 2618 "parse.y"
11566 {
11567 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
11568 rb_parser_printf(p, "NODE_SPECIAL");
11569 }
11570 else if (((*yyvaluep).node)) {
11571 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
11572 }
11573}
11574#line 11575 "parse.c"
11575 break;
11576
11577 default:
11578 break;
11579 }
11580 YY_IGNORE_MAYBE_UNINITIALIZED_END
11581}
11582
11583
11584/*---------------------------.
11585| Print this symbol on YYO. |
11586`---------------------------*/
11587
11588static void
11589yy_symbol_print (FILE *yyo,
11590 yysymbol_kind_t yykind, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp, struct parser_params *p)
11591{
11592 YYFPRINTF (yyo, "%s %s (",
11593 yykind < YYNTOKENS ? "token" : "nterm", yysymbol_name (yykind));
11594
11595 YYLOCATION_PRINT (yyo, yylocationp, p);
11596 YYFPRINTF (yyo, ": ");
11597 yy_symbol_value_print (yyo, yykind, yyvaluep, yylocationp, p);
11598 YYFPRINTF (yyo, ")");
11599}
11600
11601/*------------------------------------------------------------------.
11602| yy_stack_print -- Print the state stack from its BOTTOM up to its |
11603| TOP (included). |
11604`------------------------------------------------------------------*/
11605
11606static void
11607yy_stack_print (yy_state_t *yybottom, yy_state_t *yytop, struct parser_params *p)
11608{
11609 YYFPRINTF (stderr, "Stack now");
11610 for (; yybottom <= yytop; yybottom++)
11611 {
11612 int yybot = *yybottom;
11613 YYFPRINTF (stderr, " %d", yybot);
11614 }
11615 YYFPRINTF (stderr, "\n");
11616}
11617
11618# define YY_STACK_PRINT(Bottom, Top, p) \
11619do { \
11620 if (yydebug) \
11621 yy_stack_print ((Bottom), (Top), p); \
11622} while (0)
11623
11624
11625/*------------------------------------------------.
11626| Report that the YYRULE is going to be reduced. |
11627`------------------------------------------------*/
11628
11629static void
11630yy_reduce_print (yy_state_t *yyssp, YYSTYPE *yyvsp, YYLTYPE *yylsp,
11631 int yyrule, struct parser_params *p)
11632{
11633 int yylno = yyrline[yyrule];
11634 int yynrhs = yyr2[yyrule];
11635 int yyi;
11636 YYFPRINTF (stderr, "Reducing stack by rule %d (line %d):\n",
11637 yyrule - 1, yylno);
11638 /* The symbols being reduced. */
11639 for (yyi = 0; yyi < yynrhs; yyi++)
11640 {
11641 YYFPRINTF (stderr, " $%d = ", yyi + 1);
11642 yy_symbol_print (stderr,
11643 YY_ACCESSING_SYMBOL (+yyssp[yyi + 1 - yynrhs]),
11644 &yyvsp[(yyi + 1) - (yynrhs)],
11645 &(yylsp[(yyi + 1) - (yynrhs)]), p);
11646 YYFPRINTF (stderr, "\n");
11647 }
11648}
11649
11650# define YY_REDUCE_PRINT(Rule, p) \
11651do { \
11652 if (yydebug) \
11653 yy_reduce_print (yyssp, yyvsp, yylsp, Rule, p); \
11654} while (0)
11655
11656/* Nonzero means print parse trace. It is left uninitialized so that
11657 multiple parsers can coexist. */
11658#ifndef yydebug
11659int yydebug;
11660#endif
11661#else /* !YYDEBUG */
11662# define YYDPRINTF(Args) ((void) 0)
11663# define YY_SYMBOL_PRINT(Title, Kind, Value, Location, p)
11664# define YY_STACK_PRINT(Bottom, Top, p)
11665# define YY_REDUCE_PRINT(Rule, p)
11666#endif /* !YYDEBUG */
11667
11668
11669/* YYINITDEPTH -- initial size of the parser's stacks. */
11670#ifndef YYINITDEPTH
11671# define YYINITDEPTH 200
11672#endif
11673
11674/* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
11675 if the built-in stack extension method is used).
11676
11677 Do not make this value too large; the results are undefined if
11678 YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
11679 evaluated with infinite-precision integer arithmetic. */
11680
11681#ifndef YYMAXDEPTH
11682# define YYMAXDEPTH 10000
11683#endif
11684
11685
11686/* Context of a parse error. */
11687typedef struct
11688{
11689 yy_state_t *yyssp;
11690 yysymbol_kind_t yytoken;
11691 YYLTYPE *yylloc;
11692} yypcontext_t;
11693
11694/* Put in YYARG at most YYARGN of the expected tokens given the
11695 current YYCTX, and return the number of tokens stored in YYARG. If
11696 YYARG is null, return the number of expected tokens (guaranteed to
11697 be less than YYNTOKENS). Return YYENOMEM on memory exhaustion.
11698 Return 0 if there are more than YYARGN expected tokens, yet fill
11699 YYARG up to YYARGN. */
11700static int
11701yypcontext_expected_tokens (const yypcontext_t *yyctx,
11702 yysymbol_kind_t yyarg[], int yyargn)
11703{
11704 /* Actual size of YYARG. */
11705 int yycount = 0;
11706 int yyn = yypact[+*yyctx->yyssp];
11707 if (!yypact_value_is_default (yyn))
11708 {
11709 /* Start YYX at -YYN if negative to avoid negative indexes in
11710 YYCHECK. In other words, skip the first -YYN actions for
11711 this state because they are default actions. */
11712 int yyxbegin = yyn < 0 ? -yyn : 0;
11713 /* Stay within bounds of both yycheck and yytname. */
11714 int yychecklim = YYLAST - yyn + 1;
11715 int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
11716 int yyx;
11717 for (yyx = yyxbegin; yyx < yyxend; ++yyx)
11718 if (yycheck[yyx + yyn] == yyx && yyx != YYSYMBOL_YYerror
11719 && !yytable_value_is_error (yytable[yyx + yyn]))
11720 {
11721 if (!yyarg)
11722 ++yycount;
11723 else if (yycount == yyargn)
11724 return 0;
11725 else
11726 yyarg[yycount++] = YY_CAST (yysymbol_kind_t, yyx);
11727 }
11728 }
11729 if (yyarg && yycount == 0 && 0 < yyargn)
11730 yyarg[0] = YYSYMBOL_YYEMPTY;
11731 return yycount;
11732}
11733
11734
11735
11736
11737#ifndef yystrlen
11738# if defined __GLIBC__ && defined _STRING_H
11739# define yystrlen(S) (YY_CAST (YYPTRDIFF_T, strlen (S)))
11740# else
11741/* Return the length of YYSTR. */
11742static YYPTRDIFF_T
11743yystrlen (const char *yystr)
11744{
11745 YYPTRDIFF_T yylen;
11746 for (yylen = 0; yystr[yylen]; yylen++)
11747 continue;
11748 return yylen;
11749}
11750# endif
11751#endif
11752
11753#ifndef yystpcpy
11754# if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
11755# define yystpcpy stpcpy
11756# else
11757/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
11758 YYDEST. */
11759static char *
11760yystpcpy (char *yydest, const char *yysrc)
11761{
11762 char *yyd = yydest;
11763 const char *yys = yysrc;
11764
11765 while ((*yyd++ = *yys++) != '\0')
11766 continue;
11767
11768 return yyd - 1;
11769}
11770# endif
11771#endif
11772
11773#ifndef yytnamerr
11774/* Copy to YYRES the contents of YYSTR after stripping away unnecessary
11775 quotes and backslashes, so that it's suitable for yyerror. The
11776 heuristic is that double-quoting is unnecessary unless the string
11777 contains an apostrophe, a comma, or backslash (other than
11778 backslash-backslash). YYSTR is taken from yytname. If YYRES is
11779 null, do not copy; instead, return the length of what the result
11780 would have been. */
11781static YYPTRDIFF_T
11782yytnamerr (char *yyres, const char *yystr)
11783{
11784 if (*yystr == '"')
11785 {
11786 YYPTRDIFF_T yyn = 0;
11787 char const *yyp = yystr;
11788 for (;;)
11789 switch (*++yyp)
11790 {
11791 case '\'':
11792 case ',':
11793 goto do_not_strip_quotes;
11794
11795 case '\\':
11796 if (*++yyp != '\\')
11797 goto do_not_strip_quotes;
11798 else
11799 goto append;
11800
11801 append:
11802 default:
11803 if (yyres)
11804 yyres[yyn] = *yyp;
11805 yyn++;
11806 break;
11807
11808 case '"':
11809 if (yyres)
11810 yyres[yyn] = '\0';
11811 return yyn;
11812 }
11813 do_not_strip_quotes: ;
11814 }
11815
11816 if (yyres)
11817 return yystpcpy (yyres, yystr) - yyres;
11818 else
11819 return yystrlen (yystr);
11820}
11821#endif
11822
11823
11824static int
11825yy_syntax_error_arguments (const yypcontext_t *yyctx,
11826 yysymbol_kind_t yyarg[], int yyargn)
11827{
11828 /* Actual size of YYARG. */
11829 int yycount = 0;
11830 /* There are many possibilities here to consider:
11831 - If this state is a consistent state with a default action, then
11832 the only way this function was invoked is if the default action
11833 is an error action. In that case, don't check for expected
11834 tokens because there are none.
11835 - The only way there can be no lookahead present (in yychar) is if
11836 this state is a consistent state with a default action. Thus,
11837 detecting the absence of a lookahead is sufficient to determine
11838 that there is no unexpected or expected token to report. In that
11839 case, just report a simple "syntax error".
11840 - Don't assume there isn't a lookahead just because this state is a
11841 consistent state with a default action. There might have been a
11842 previous inconsistent state, consistent state with a non-default
11843 action, or user semantic action that manipulated yychar.
11844 - Of course, the expected token list depends on states to have
11845 correct lookahead information, and it depends on the parser not
11846 to perform extra reductions after fetching a lookahead from the
11847 scanner and before detecting a syntax error. Thus, state merging
11848 (from LALR or IELR) and default reductions corrupt the expected
11849 token list. However, the list is correct for canonical LR with
11850 one exception: it will still contain any token that will not be
11851 accepted due to an error action in a later state.
11852 */
11853 if (yyctx->yytoken != YYSYMBOL_YYEMPTY)
11854 {
11855 int yyn;
11856 if (yyarg)
11857 yyarg[yycount] = yyctx->yytoken;
11858 ++yycount;
11859 yyn = yypcontext_expected_tokens (yyctx,
11860 yyarg ? yyarg + 1 : yyarg, yyargn - 1);
11861 if (yyn == YYENOMEM)
11862 return YYENOMEM;
11863 else
11864 yycount += yyn;
11865 }
11866 return yycount;
11867}
11868
11869/* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message
11870 about the unexpected token YYTOKEN for the state stack whose top is
11871 YYSSP.
11872
11873 Return 0 if *YYMSG was successfully written. Return -1 if *YYMSG is
11874 not large enough to hold the message. In that case, also set
11875 *YYMSG_ALLOC to the required number of bytes. Return YYENOMEM if the
11876 required number of bytes is too large to store. */
11877static int
11878yysyntax_error (YYPTRDIFF_T *yymsg_alloc, char **yymsg,
11879 const yypcontext_t *yyctx, struct parser_params *p)
11880{
11881 enum { YYARGS_MAX = 5 };
11882 /* Internationalized format string. */
11883 const char *yyformat = YY_NULLPTR;
11884 /* Arguments of yyformat: reported tokens (one for the "unexpected",
11885 one per "expected"). */
11886 yysymbol_kind_t yyarg[YYARGS_MAX];
11887 /* Cumulated lengths of YYARG. */
11888 YYPTRDIFF_T yysize = 0;
11889
11890 /* Actual size of YYARG. */
11891 int yycount = yy_syntax_error_arguments (yyctx, yyarg, YYARGS_MAX);
11892 if (yycount == YYENOMEM)
11893 return YYENOMEM;
11894
11895 switch (yycount)
11896 {
11897#define YYCASE_(N, S) \
11898 case N: \
11899 yyformat = S; \
11900 break
11901 default: /* Avoid compiler warnings. */
11902 YYCASE_(0, YY_("syntax error"));
11903 YYCASE_(1, YY_("syntax error, unexpected %s"));
11904 YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s"));
11905 YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s"));
11906 YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s"));
11907 YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"));
11908#undef YYCASE_
11909 }
11910
11911 /* Compute error message size. Don't count the "%s"s, but reserve
11912 room for the terminator. */
11913 yysize = yystrlen (yyformat) - 2 * yycount + 1;
11914 {
11915 int yyi;
11916 for (yyi = 0; yyi < yycount; ++yyi)
11917 {
11918 YYPTRDIFF_T yysize1
11919 = yysize + yytnamerr (YY_NULLPTR, yytname[yyarg[yyi]]);
11920 if (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM)
11921 yysize = yysize1;
11922 else
11923 return YYENOMEM;
11924 }
11925 }
11926
11927 if (*yymsg_alloc < yysize)
11928 {
11929 *yymsg_alloc = 2 * yysize;
11930 if (! (yysize <= *yymsg_alloc
11931 && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM))
11932 *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM;
11933 return -1;
11934 }
11935
11936 /* Avoid sprintf, as that infringes on the user's name space.
11937 Don't have undefined behavior even if the translation
11938 produced a string with the wrong number of "%s"s. */
11939 {
11940 char *yyp = *yymsg;
11941 int yyi = 0;
11942 while ((*yyp = *yyformat) != '\0')
11943 if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount)
11944 {
11945 yyp += yytnamerr (yyp, yytname[yyarg[yyi++]]);
11946 yyformat += 2;
11947 }
11948 else
11949 {
11950 ++yyp;
11951 ++yyformat;
11952 }
11953 }
11954 return 0;
11955}
11956
11957
11958/*-----------------------------------------------.
11959| Release the memory associated to this symbol. |
11960`-----------------------------------------------*/
11961
11962static void
11963yydestruct (const char *yymsg,
11964 yysymbol_kind_t yykind, YYSTYPE *yyvaluep, YYLTYPE *yylocationp, struct parser_params *p)
11965{
11966 YY_USE (yyvaluep);
11967 YY_USE (yylocationp);
11968 YY_USE (p);
11969 if (!yymsg)
11970 yymsg = "Deleting";
11971 YY_SYMBOL_PRINT (yymsg, yykind, yyvaluep, yylocationp, p);
11972
11973 YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
11974 switch (yykind)
11975 {
11976 case YYSYMBOL_258_16: /* @16 */
11977#line 2655 "parse.y"
11978 {
11979 if (CASE_LABELS_ENABLED_P(((*yyvaluep).labels))) st_free_table(((*yyvaluep).labels));
11980}
11981#line 11982 "parse.c"
11982 break;
11983
11984 case YYSYMBOL_259_17: /* @17 */
11985#line 2655 "parse.y"
11986 {
11987 if (CASE_LABELS_ENABLED_P(((*yyvaluep).labels))) st_free_table(((*yyvaluep).labels));
11988}
11989#line 11990 "parse.c"
11990 break;
11991
11992 default:
11993 break;
11994 }
11995 YY_IGNORE_MAYBE_UNINITIALIZED_END
11996}
11997
11998
11999
12000
12001
12002
12003/*----------.
12004| yyparse. |
12005`----------*/
12006
12007int
12008yyparse (struct parser_params *p)
12009{
12010/* Lookahead token kind. */
12011int yychar;
12012
12013
12014/* The semantic value of the lookahead symbol. */
12015/* Default value used for initialization, for pacifying older GCCs
12016 or non-GCC compilers. */
12017#ifdef __cplusplus
12018static const YYSTYPE yyval_default = {};
12019(void) yyval_default;
12020#else
12021YY_INITIAL_VALUE (static const YYSTYPE yyval_default;)
12022#endif
12023YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default);
12024
12025/* Location data for the lookahead symbol. */
12026static const YYLTYPE yyloc_default
12027# if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL
12028 = { 1, 1, 1, 1 }
12029# endif
12030;
12031YYLTYPE yylloc = yyloc_default;
12032
12033 /* Number of syntax errors so far. */
12034 int yynerrs = 0;
12035 YY_USE (yynerrs); /* Silence compiler warning. */
12036
12037 yy_state_fast_t yystate = 0;
12038 /* Number of tokens to shift before error messages enabled. */
12039 int yyerrstatus = 0;
12040
12041 /* Refer to the stacks through separate pointers, to allow yyoverflow
12042 to reallocate them elsewhere. */
12043
12044 /* Their size. */
12045 YYPTRDIFF_T yystacksize = YYINITDEPTH;
12046
12047 /* The state stack: array, bottom, top. */
12048 yy_state_t yyssa[YYINITDEPTH];
12049 yy_state_t *yyss = yyssa;
12050 yy_state_t *yyssp = yyss;
12051
12052 /* The semantic value stack: array, bottom, top. */
12053 YYSTYPE yyvsa[YYINITDEPTH];
12054 YYSTYPE *yyvs = yyvsa;
12055 YYSTYPE *yyvsp = yyvs;
12056
12057 /* The location stack: array, bottom, top. */
12058 YYLTYPE yylsa[YYINITDEPTH];
12059 YYLTYPE *yyls = yylsa;
12060 YYLTYPE *yylsp = yyls;
12061
12062 int yyn;
12063 /* The return value of yyparse. */
12064 int yyresult;
12065 /* Lookahead symbol kind. */
12066 yysymbol_kind_t yytoken = YYSYMBOL_YYEMPTY;
12067 /* The variables used to return semantic value and location from the
12068 action routines. */
12069 YYSTYPE yyval;
12070 YYLTYPE yyloc;
12071
12072 /* The locations where the error started and ended. */
12073 YYLTYPE yyerror_range[3];
12074
12075 /* Buffer for error messages, and its allocated size. */
12076 char yymsgbuf[128];
12077 char *yymsg = yymsgbuf;
12078 YYPTRDIFF_T yymsg_alloc = sizeof yymsgbuf;
12079
12080#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N), yylsp -= (N))
12081
12082 /* The number of symbols on the RHS of the reduced rule.
12083 Keep to zero when no symbol should be popped. */
12084 int yylen = 0;
12085
12086 YYDPRINTF ((stderr, "Starting parse\n"));
12087
12088 yychar = YYEMPTY; /* Cause a token to be read. */
12089
12090
12091 /* User initialization code. */
12092#line 2662 "parse.y"
12093 {
12094 RUBY_SET_YYLLOC_OF_NONE(yylloc);
12095}
12096
12097#line 12098 "parse.c"
12098
12099 yylsp[0] = yylloc;
12100 goto yysetstate;
12101
12102
12103/*------------------------------------------------------------.
12104| yynewstate -- push a new state, which is found in yystate. |
12105`------------------------------------------------------------*/
12106yynewstate:
12107 /* In all cases, when you get here, the value and location stacks
12108 have just been pushed. So pushing a state here evens the stacks. */
12109 yyssp++;
12110
12111
12112/*--------------------------------------------------------------------.
12113| yysetstate -- set current state (the top of the stack) to yystate. |
12114`--------------------------------------------------------------------*/
12115yysetstate:
12116 YYDPRINTF ((stderr, "Entering state %d\n", yystate));
12117 YY_ASSERT (0 <= yystate && yystate < YYNSTATES);
12118 YY_IGNORE_USELESS_CAST_BEGIN
12119 *yyssp = YY_CAST (yy_state_t, yystate);
12120 YY_IGNORE_USELESS_CAST_END
12121 YY_STACK_PRINT (yyss, yyssp, p);
12122
12123 if (yyss + yystacksize - 1 <= yyssp)
12124#if !defined yyoverflow && !defined YYSTACK_RELOCATE
12125 YYNOMEM;
12126#else
12127 {
12128 /* Get the current used size of the three stacks, in elements. */
12129 YYPTRDIFF_T yysize = yyssp - yyss + 1;
12130
12131# if defined yyoverflow
12132 {
12133 /* Give user a chance to reallocate the stack. Use copies of
12134 these so that the &'s don't force the real ones into
12135 memory. */
12136 yy_state_t *yyss1 = yyss;
12137 YYSTYPE *yyvs1 = yyvs;
12138 YYLTYPE *yyls1 = yyls;
12139
12140 /* Each stack pointer address is followed by the size of the
12141 data in use in that stack, in bytes. This used to be a
12142 conditional around just the two extra args, but that might
12143 be undefined if yyoverflow is a macro. */
12144 yyoverflow (YY_("memory exhausted"),
12145 &yyss1, yysize * YYSIZEOF (*yyssp),
12146 &yyvs1, yysize * YYSIZEOF (*yyvsp),
12147 &yyls1, yysize * YYSIZEOF (*yylsp),
12148 &yystacksize);
12149 yyss = yyss1;
12150 yyvs = yyvs1;
12151 yyls = yyls1;
12152 }
12153# else /* defined YYSTACK_RELOCATE */
12154 /* Extend the stack our own way. */
12155 if (YYMAXDEPTH <= yystacksize)
12156 YYNOMEM;
12157 yystacksize *= 2;
12158 if (YYMAXDEPTH < yystacksize)
12159 yystacksize = YYMAXDEPTH;
12160
12161 {
12162 yy_state_t *yyss1 = yyss;
12163 union yyalloc *yyptr =
12164 YY_CAST (union yyalloc *,
12165 YYSTACK_ALLOC (YY_CAST (YYSIZE_T, YYSTACK_BYTES (yystacksize))));
12166 if (! yyptr)
12167 YYNOMEM;
12168 YYSTACK_RELOCATE (yyss_alloc, yyss);
12169 YYSTACK_RELOCATE (yyvs_alloc, yyvs);
12170 YYSTACK_RELOCATE (yyls_alloc, yyls);
12171# undef YYSTACK_RELOCATE
12172 if (yyss1 != yyssa)
12173 YYSTACK_FREE (yyss1);
12174 }
12175# endif
12176
12177 yyssp = yyss + yysize - 1;
12178 yyvsp = yyvs + yysize - 1;
12179 yylsp = yyls + yysize - 1;
12180
12181 YY_IGNORE_USELESS_CAST_BEGIN
12182 YYDPRINTF ((stderr, "Stack size increased to %ld\n",
12183 YY_CAST (long, yystacksize)));
12184 YY_IGNORE_USELESS_CAST_END
12185
12186 if (yyss + yystacksize - 1 <= yyssp)
12187 YYABORT;
12188 }
12189#endif /* !defined yyoverflow && !defined YYSTACK_RELOCATE */
12190
12191
12192 if (yystate == YYFINAL)
12193 YYACCEPT;
12194
12195 goto yybackup;
12196
12197
12198/*-----------.
12199| yybackup. |
12200`-----------*/
12201yybackup:
12202 /* Do appropriate processing given the current state. Read a
12203 lookahead token if we need one and don't already have one. */
12204
12205 /* First try to decide what to do without reference to lookahead token. */
12206 yyn = yypact[yystate];
12207 if (yypact_value_is_default (yyn))
12208 goto yydefault;
12209
12210 /* Not known => get a lookahead token if don't already have one. */
12211
12212 /* YYCHAR is either empty, or end-of-input, or a valid lookahead. */
12213 if (yychar == YYEMPTY)
12214 {
12215 YYDPRINTF ((stderr, "Reading a token\n"));
12216 yychar = yylex (&yylval, &yylloc, p);
12217 }
12218
12219 if (yychar <= END_OF_INPUT)
12220 {
12221 yychar = END_OF_INPUT;
12222 yytoken = YYSYMBOL_YYEOF;
12223 YYDPRINTF ((stderr, "Now at end of input.\n"));
12224 }
12225 else if (yychar == YYerror)
12226 {
12227 /* The scanner already issued an error message, process directly
12228 to error recovery. But do not keep the error token as
12229 lookahead, it is too special and may lead us to an endless
12230 loop in error recovery. */
12231 yychar = YYUNDEF;
12232 yytoken = YYSYMBOL_YYerror;
12233 yyerror_range[1] = yylloc;
12234 goto yyerrlab1;
12235 }
12236 else
12237 {
12238 yytoken = YYTRANSLATE (yychar);
12239 YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc, p);
12240 }
12241
12242 /* If the proper action on seeing token YYTOKEN is to reduce or to
12243 detect an error, take that action. */
12244 yyn += yytoken;
12245 if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
12246 goto yydefault;
12247 yyn = yytable[yyn];
12248 if (yyn <= 0)
12249 {
12250 if (yytable_value_is_error (yyn))
12251 goto yyerrlab;
12252 yyn = -yyn;
12253 goto yyreduce;
12254 }
12255
12256 /* Count tokens shifted since error; after three, turn off error
12257 status. */
12258 if (yyerrstatus)
12259 yyerrstatus--;
12260
12261 /* Shift the lookahead token. */
12262 YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc, p);
12263 yystate = yyn;
12264 YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
12265 *++yyvsp = yylval;
12266 YY_IGNORE_MAYBE_UNINITIALIZED_END
12267 *++yylsp = yylloc;
12268 /* %after-shift code. */
12269#line 2665 "parse.y"
12270 {after_shift(p);}
12271#line 12272 "parse.c"
12272
12273
12274 /* Discard the shifted token. */
12275 yychar = YYEMPTY;
12276 goto yynewstate;
12277
12278
12279/*-----------------------------------------------------------.
12280| yydefault -- do the default action for the current state. |
12281`-----------------------------------------------------------*/
12282yydefault:
12283 yyn = yydefact[yystate];
12284 if (yyn == 0)
12285 goto yyerrlab;
12286 goto yyreduce;
12287
12288
12289/*-----------------------------.
12290| yyreduce -- do a reduction. |
12291`-----------------------------*/
12292yyreduce:
12293 /* yyn is the number of a rule to reduce with. */
12294 yylen = yyr2[yyn];
12295
12296 /* If YYLEN is nonzero, implement the default value of the action:
12297 '$$ = $1'.
12298
12299 Otherwise, the following line sets YYVAL to garbage.
12300 This behavior is undocumented and Bison
12301 users should not rely upon it. Assigning to YYVAL
12302 unconditionally makes the parser a bit smaller, and it avoids a
12303 GCC warning that YYVAL may be used uninitialized. */
12304 yyval = yyvsp[1-yylen];
12305 /* %before-reduce function. */
12306#line 2666 "parse.y"
12307 {before_reduce(yylen, p);}
12308#line 12309 "parse.c"
12309
12310
12311 /* Default location. */
12312 YYLLOC_DEFAULT (yyloc, (yylsp - yylen), yylen);
12313 yyerror_range[1] = yyloc;
12314 YY_REDUCE_PRINT (yyn, p);
12315 switch (yyn)
12316 {
12317 case 2: /* $@1: %empty */
12318#line 3170 "parse.y"
12319 {
12320 SET_LEX_STATE(EXPR_BEG);
12321 local_push(p, ifndef_ripper(1)+0);
12322 /* jumps are possible in the top-level loop. */
12323 if (!ifndef_ripper(p->do_loop) + 0) init_block_exit(p);
12324 }
12325#line 12326 "parse.c"
12326 break;
12327
12328 case 5: /* compstmt_top_stmts: top_stmts option_terms */
12329#line 2985 "parse.y"
12330 {
12331 void_stmts(p, (yyval.node) = (yyvsp[-1].node));
12332 }
12333#line 12334 "parse.c"
12334 break;
12335
12336 case 6: /* program: $@1 compstmt_top_stmts */
12337#line 3177 "parse.y"
12338 {
12339 if ((yyvsp[0].node) && !compile_for_eval) {
12340 NODE *node = (yyvsp[0].node);
12341 /* last expression should not be void */
12342 if (nd_type_p(node, NODE_BLOCK)) {
12343 while (RNODE_BLOCK(node)->nd_next) {
12344 node = RNODE_BLOCK(node)->nd_next;
12345 }
12346 node = RNODE_BLOCK(node)->nd_head;
12347 }
12348 node = remove_begin(node);
12349 void_expr(p, node);
12350 }
12351 p->eval_tree = NEW_SCOPE(0, block_append(p, p->eval_tree, (yyvsp[0].node)), NULL, &(yyloc));
12352 /*% ripper[final]: program!($:2) %*/
12353 local_pop(p);
12354 }
12355#line 12356 "parse.c"
12356 break;
12357
12358 case 7: /* top_stmts: none */
12359#line 3197 "parse.y"
12360 {
12361 (yyval.node) = NEW_BEGIN(0, &(yyloc));
12362 /*% ripper: stmts_add!(stmts_new!, void_stmt!) %*/
12363 }
12364#line 12365 "parse.c"
12365 break;
12366
12367 case 8: /* top_stmts: top_stmt */
12368#line 3202 "parse.y"
12369 {
12370 (yyval.node) = newline_node((yyvsp[0].node));
12371 /*% ripper: stmts_add!(stmts_new!, $:1) %*/
12372 }
12373#line 12374 "parse.c"
12374 break;
12375
12376 case 9: /* top_stmts: top_stmts terms top_stmt */
12377#line 3207 "parse.y"
12378 {
12379 (yyval.node) = block_append(p, (yyvsp[-2].node), newline_node((yyvsp[0].node)));
12380 /*% ripper: stmts_add!($:1, $:3) %*/
12381 }
12382#line 12383 "parse.c"
12383 break;
12384
12385 case 10: /* top_stmt: stmt */
12386#line 3214 "parse.y"
12387 {
12388 clear_block_exit(p, true);
12389 (yyval.node) = (yyvsp[0].node);
12390 }
12391#line 12392 "parse.c"
12392 break;
12393
12394 case 11: /* top_stmt: "'BEGIN'" begin_block */
12395#line 3219 "parse.y"
12396 {
12397 (yyval.node) = (yyvsp[0].node);
12398 /*% ripper: $:2 %*/
12399 }
12400#line 12401 "parse.c"
12401 break;
12402
12403 case 12: /* block_open: '{' */
12404#line 3225 "parse.y"
12405 {(yyval.node_exits) = init_block_exit(p);}
12406#line 12407 "parse.c"
12407 break;
12408
12409 case 13: /* begin_block: block_open compstmt_top_stmts '}' */
12410#line 3228 "parse.y"
12411 {
12412 restore_block_exit(p, (yyvsp[-2].node_exits));
12413 p->eval_tree_begin = block_append(p, p->eval_tree_begin,
12414 NEW_BEGIN((yyvsp[-1].node), &(yyloc)));
12415 (yyval.node) = NEW_BEGIN(0, &(yyloc));
12416 /*% ripper: BEGIN!($:compstmt) %*/
12417 }
12418#line 12419 "parse.c"
12419 break;
12420
12421 case 14: /* compstmt_stmts: stmts option_terms */
12422#line 2985 "parse.y"
12423 {
12424 void_stmts(p, (yyval.node) = (yyvsp[-1].node));
12425 }
12426#line 12427 "parse.c"
12427 break;
12428
12429 case 15: /* $@2: %empty */
12430#line 3241 "parse.y"
12431 {
12432 if (!(yyvsp[-1].node)) yyerror1(&(yylsp[0]), "else without rescue is useless");
12433 next_rescue_context(&p->ctxt, &(yyvsp[-2].ctxt), after_else);
12434 }
12435#line 12436 "parse.c"
12436 break;
12437
12438 case 16: /* $@3: %empty */
12439#line 3246 "parse.y"
12440 {
12441 next_rescue_context(&p->ctxt, &(yyvsp[-4].ctxt), after_ensure);
12442 }
12443#line 12444 "parse.c"
12444 break;
12445
12446 case 17: /* bodystmt: compstmt_stmts lex_ctxt opt_rescue k_else $@2 compstmt_stmts $@3 opt_ensure */
12447#line 3250 "parse.y"
12448 {
12449 (yyval.node) = new_bodystmt(p, (yyvsp[-7].node), (yyvsp[-5].node), (yyvsp[-2].node), (yyvsp[0].node), &(yyloc));
12450 /*% ripper: bodystmt!($:body, $:opt_rescue, $:elsebody, $:opt_ensure) %*/
12451 }
12452#line 12453 "parse.c"
12453 break;
12454
12455 case 18: /* $@4: %empty */
12456#line 3257 "parse.y"
12457 {
12458 next_rescue_context(&p->ctxt, &(yyvsp[-1].ctxt), after_ensure);
12459 }
12460#line 12461 "parse.c"
12461 break;
12462
12463 case 19: /* bodystmt: compstmt_stmts lex_ctxt opt_rescue $@4 opt_ensure */
12464#line 3261 "parse.y"
12465 {
12466 (yyval.node) = new_bodystmt(p, (yyvsp[-4].node), (yyvsp[-2].node), 0, (yyvsp[0].node), &(yyloc));
12467 /*% ripper: bodystmt!($:body, $:opt_rescue, Qnil, $:opt_ensure) %*/
12468 }
12469#line 12470 "parse.c"
12470 break;
12471
12472 case 20: /* stmts: none */
12473#line 3268 "parse.y"
12474 {
12475 (yyval.node) = NEW_BEGIN(0, &(yyloc));
12476 /*% ripper: stmts_add!(stmts_new!, void_stmt!) %*/
12477 }
12478#line 12479 "parse.c"
12479 break;
12480
12481 case 21: /* stmts: stmt_or_begin */
12482#line 3273 "parse.y"
12483 {
12484 (yyval.node) = newline_node((yyvsp[0].node));
12485 /*% ripper: stmts_add!(stmts_new!, $:1) %*/
12486 }
12487#line 12488 "parse.c"
12488 break;
12489
12490 case 22: /* stmts: stmts terms stmt_or_begin */
12491#line 3278 "parse.y"
12492 {
12493 (yyval.node) = block_append(p, (yyvsp[-2].node), newline_node((yyvsp[0].node)));
12494 /*% ripper: stmts_add!($:1, $:3) %*/
12495 }
12496#line 12497 "parse.c"
12497 break;
12498
12499 case 24: /* $@5: %empty */
12500#line 3286 "parse.y"
12501 {
12502 yyerror1(&(yylsp[0]), "BEGIN is permitted only at toplevel");
12503 }
12504#line 12505 "parse.c"
12505 break;
12506
12507 case 25: /* stmt_or_begin: "'BEGIN'" $@5 begin_block */
12508#line 3290 "parse.y"
12509 {
12510 (yyval.node) = (yyvsp[0].node);
12511 }
12512#line 12513 "parse.c"
12513 break;
12514
12515 case 26: /* allow_exits: %empty */
12516#line 3295 "parse.y"
12517 {(yyval.node_exits) = allow_block_exit(p);}
12518#line 12519 "parse.c"
12519 break;
12520
12521 case 27: /* k_END: "'END'" lex_ctxt */
12522#line 3298 "parse.y"
12523 {
12524 if (p->ctxt.in_def) {
12525 rb_warn0("END in method; use at_exit");
12526 }
12527 (yyval.ctxt) = (yyvsp[0].ctxt);
12528 p->ctxt.in_rescue = before_rescue;
12529 /*% ripper: $:2 %*/
12530 }
12531#line 12532 "parse.c"
12532 break;
12533
12534 case 28: /* $@6: %empty */
12535#line 3307 "parse.y"
12536 {SET_LEX_STATE(EXPR_FNAME|EXPR_FITEM);}
12537#line 12538 "parse.c"
12538 break;
12539
12540 case 29: /* stmt: "'alias'" fitem $@6 fitem */
12541#line 3308 "parse.y"
12542 {
12543 (yyval.node) = NEW_ALIAS((yyvsp[-2].node), (yyvsp[0].node), &(yyloc), &(yylsp[-3]));
12544 /*% ripper: alias!($:new, $:old) %*/
12545 }
12546#line 12547 "parse.c"
12547 break;
12548
12549 case 30: /* stmt: "'alias'" "global variable" "global variable" */
12550#line 3313 "parse.y"
12551 {
12552 (yyval.node) = NEW_VALIAS((yyvsp[-1].id), (yyvsp[0].id), &(yyloc), &(yylsp[-2]));
12553 /*% ripper: var_alias!($:new, $:old) %*/
12554 }
12555#line 12556 "parse.c"
12556 break;
12557
12558 case 31: /* stmt: "'alias'" "global variable" "back reference" */
12559#line 3318 "parse.y"
12560 {
12561 char buf[2];
12562 buf[0] = '$';
12563 buf[1] = (char)RNODE_BACK_REF((yyvsp[0].node))->nd_nth;
12564 (yyval.node) = NEW_VALIAS((yyvsp[-1].id), rb_intern2(buf, 2), &(yyloc), &(yylsp[-2]));
12565 /*% ripper: var_alias!($:new, $:old) %*/
12566 }
12567#line 12568 "parse.c"
12568 break;
12569
12570 case 32: /* stmt: "'alias'" "global variable" "numbered reference" */
12571#line 3326 "parse.y"
12572 {
12573 static const char mesg[] = "can't make alias for the number variables";
12574 /*%%%*/
12575 yyerror1(&(yylsp[0]), mesg);
12576 /*% %*/
12577 (yyval.node) = NEW_ERROR(&(yyloc));
12578 /*% ripper[error]: alias_error!(ERR_MESG(), $:nth) %*/
12579 }
12580#line 12581 "parse.c"
12581 break;
12582
12583 case 33: /* stmt: "'undef'" undef_list */
12584#line 3335 "parse.y"
12585 {
12586 nd_set_first_loc((yyvsp[0].node), (yylsp[-1]).beg_pos);
12587 RNODE_UNDEF((yyvsp[0].node))->keyword_loc = (yylsp[-1]);
12588 (yyval.node) = (yyvsp[0].node);
12589 /*% ripper: undef!($:list) %*/
12590 }
12591#line 12592 "parse.c"
12592 break;
12593
12594 case 34: /* stmt: stmt "'if' modifier" expr_value */
12595#line 3342 "parse.y"
12596 {
12597 (yyval.node) = new_if(p, (yyvsp[0].node), remove_begin((yyvsp[-2].node)), 0, &(yyloc), &(yylsp[-1]), &NULL_LOC, &NULL_LOC);
12598 fixpos((yyval.node), (yyvsp[0].node));
12599 /*% ripper: if_mod!($:cond, $:body) %*/
12600 }
12601#line 12602 "parse.c"
12602 break;
12603
12604 case 35: /* stmt: stmt "'unless' modifier" expr_value */
12605#line 3348 "parse.y"
12606 {
12607 (yyval.node) = new_unless(p, (yyvsp[0].node), remove_begin((yyvsp[-2].node)), 0, &(yyloc), &(yylsp[-1]), &NULL_LOC, &NULL_LOC);
12608 fixpos((yyval.node), (yyvsp[0].node));
12609 /*% ripper: unless_mod!($:cond, $:body) %*/
12610 }
12611#line 12612 "parse.c"
12612 break;
12613
12614 case 36: /* stmt: stmt "'while' modifier" expr_value */
12615#line 3354 "parse.y"
12616 {
12617 clear_block_exit(p, false);
12618 if ((yyvsp[-2].node) && nd_type_p((yyvsp[-2].node), NODE_BEGIN)) {
12619 (yyval.node) = NEW_WHILE(cond(p, (yyvsp[0].node), &(yylsp[0])), RNODE_BEGIN((yyvsp[-2].node))->nd_body, 0, &(yyloc), &(yylsp[-1]), &NULL_LOC);
12620 }
12621 else {
12622 (yyval.node) = NEW_WHILE(cond(p, (yyvsp[0].node), &(yylsp[0])), (yyvsp[-2].node), 1, &(yyloc), &(yylsp[-1]), &NULL_LOC);
12623 }
12624 /*% ripper: while_mod!($:cond_expr, $:body) %*/
12625 }
12626#line 12627 "parse.c"
12627 break;
12628
12629 case 37: /* stmt: stmt "'until' modifier" expr_value */
12630#line 3365 "parse.y"
12631 {
12632 clear_block_exit(p, 0);
12633 if ((yyvsp[-2].node) && nd_type_p((yyvsp[-2].node), NODE_BEGIN)) {
12634 (yyval.node) = NEW_UNTIL(cond(p, (yyvsp[0].node), &(yylsp[0])), RNODE_BEGIN((yyvsp[-2].node))->nd_body, 0, &(yyloc), &(yylsp[-1]), &NULL_LOC);
12635 }
12636 else {
12637 (yyval.node) = NEW_UNTIL(cond(p, (yyvsp[0].node), &(yylsp[0])), (yyvsp[-2].node), 1, &(yyloc), &(yylsp[-1]), &NULL_LOC);
12638 }
12639 /*% ripper: until_mod!($:cond_expr, $:body) %*/
12640 }
12641#line 12642 "parse.c"
12642 break;
12643
12644 case 38: /* stmt: stmt "'rescue' modifier" after_rescue stmt */
12645#line 3376 "parse.y"
12646 {
12647 p->ctxt.in_rescue = (yyvsp[-1].ctxt).in_rescue;
12648 NODE *resq;
12649 YYLTYPE loc = code_loc_gen(&(yylsp[-2]), &(yylsp[0]));
12650 resq = NEW_RESBODY(0, 0, remove_begin((yyvsp[0].node)), 0, &loc);
12651 (yyval.node) = NEW_RESCUE(remove_begin((yyvsp[-3].node)), resq, 0, &(yyloc));
12652 /*% ripper: rescue_mod!($:body, $:resbody) %*/
12653 }
12654#line 12655 "parse.c"
12655 break;
12656
12657 case 39: /* stmt: k_END block_open compstmt_stmts '}' */
12658#line 3385 "parse.y"
12659 {
12660 clear_block_exit(p, true);
12661 restore_block_exit(p, (yyvsp[-2].node_exits));
12662 p->ctxt = (yyvsp[-3].ctxt);
12663 {
12664 NODE *scope = NEW_SCOPE2(0 /* tbl */, 0 /* args */, (yyvsp[-1].node) /* body */, NULL /* parent */, &(yyloc));
12665 (yyval.node) = NEW_POSTEXE(scope, &(yyloc), &(yylsp[-3]), &(yylsp[-2]), &(yylsp[0]));
12666 RNODE_SCOPE(scope)->nd_parent = (yyval.node);
12667 }
12668 /*% ripper: END!($:body) %*/
12669 }
12670#line 12671 "parse.c"
12671 break;
12672
12673 case 41: /* stmt: mlhs '=' lex_ctxt command_call_value */
12674#line 3398 "parse.y"
12675 {
12676 (yyval.node) = node_assign(p, (NODE *)(yyvsp[-3].node_masgn), (yyvsp[0].node), (yyvsp[-1].ctxt), &(yyloc));
12677 /*% ripper: massign!($:lhs, $:rhs) %*/
12678 }
12679#line 12680 "parse.c"
12680 break;
12681
12682 case 42: /* asgn_mrhs: lhs '=' lex_ctxt mrhs */
12683#line 2920 "parse.y"
12684 {
12685 (yyval.node) = node_assign(p, (NODE *)(yyvsp[-3].node), (yyvsp[0].node), (yyvsp[-1].ctxt), &(yyloc));
12686 /*% ripper: assign!($:1, $:4) %*/
12687 }
12688#line 12689 "parse.c"
12689 break;
12690
12691 case 44: /* stmt: mlhs '=' lex_ctxt mrhs_arg "'rescue' modifier" after_rescue stmt */
12692#line 3405 "parse.y"
12693 {
12694 p->ctxt.in_rescue = (yyvsp[-1].ctxt).in_rescue;
12695 YYLTYPE loc = code_loc_gen(&(yylsp[-2]), &(yylsp[0]));
12696 (yyvsp[0].node) = NEW_RESBODY(0, 0, remove_begin((yyvsp[0].node)), 0, &loc);
12697 loc.beg_pos = (yylsp[-3]).beg_pos;
12698 (yyvsp[-3].node) = NEW_RESCUE((yyvsp[-3].node), (yyvsp[0].node), 0, &loc);
12699 (yyval.node) = node_assign(p, (NODE *)(yyvsp[-6].node_masgn), (yyvsp[-3].node), (yyvsp[-4].ctxt), &(yyloc));
12700 /*% ripper: massign!($:lhs, rescue_mod!($:mrhs_arg, $:resbody)) %*/
12701 }
12702#line 12703 "parse.c"
12703 break;
12704
12705 case 45: /* stmt: mlhs '=' lex_ctxt mrhs_arg */
12706#line 3415 "parse.y"
12707 {
12708 (yyval.node) = node_assign(p, (NODE *)(yyvsp[-3].node_masgn), (yyvsp[0].node), (yyvsp[-1].ctxt), &(yyloc));
12709 /*% ripper: massign!($:lhs, $:rhs) %*/
12710 }
12711#line 12712 "parse.c"
12712 break;
12713
12714 case 47: /* stmt: error */
12715#line 3421 "parse.y"
12716 {
12717 (void)yynerrs;
12718 (yyval.node) = NEW_ERROR(&(yyloc));
12719 }
12720#line 12721 "parse.c"
12721 break;
12722
12723 case 48: /* asgn_command_rhs: lhs '=' lex_ctxt command_rhs */
12724#line 2920 "parse.y"
12725 {
12726 (yyval.node) = node_assign(p, (NODE *)(yyvsp[-3].node), (yyvsp[0].node), (yyvsp[-1].ctxt), &(yyloc));
12727 /*% ripper: assign!($:1, $:4) %*/
12728 }
12729#line 12730 "parse.c"
12730 break;
12731
12732 case 50: /* op_asgn_command_rhs: var_lhs "operator-assignment" lex_ctxt command_rhs */
12733#line 3055 "parse.y"
12734 {
12735 (yyval.node) = new_op_assign(p, (yyvsp[-3].node), (yyvsp[-2].id), (yyvsp[0].node), (yyvsp[-1].ctxt), &(yyloc));
12736 /*% ripper: opassign!($:var_lhs, $:tOP_ASGN, $:rhs) %*/
12737 }
12738#line 12739 "parse.c"
12739 break;
12740
12741 case 51: /* op_asgn_command_rhs: primary_value '[' opt_call_args rbracket "operator-assignment" lex_ctxt command_rhs */
12742#line 3060 "parse.y"
12743 {
12744 (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]));
12745 /*% ripper: opassign!(aref_field!($:primary_value, $:opt_call_args), $:tOP_ASGN, $:rhs) %*/
12746 }
12747#line 12748 "parse.c"
12748 break;
12749
12750 case 52: /* op_asgn_command_rhs: primary_value call_op "local variable or method" "operator-assignment" lex_ctxt command_rhs */
12751#line 3065 "parse.y"
12752 {
12753 (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]));
12754 /*% ripper: opassign!(field!($:primary_value, $:call_op, $:tIDENTIFIER), $:tOP_ASGN, $:rhs) %*/
12755 }
12756#line 12757 "parse.c"
12757 break;
12758
12759 case 53: /* op_asgn_command_rhs: primary_value call_op "constant" "operator-assignment" lex_ctxt command_rhs */
12760#line 3070 "parse.y"
12761 {
12762 (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]));
12763 /*% ripper: opassign!(field!($:primary_value, $:call_op, $:tCONSTANT), $:tOP_ASGN, $:rhs) %*/
12764 }
12765#line 12766 "parse.c"
12766 break;
12767
12768 case 54: /* op_asgn_command_rhs: primary_value "::" "local variable or method" "operator-assignment" lex_ctxt command_rhs */
12769#line 3075 "parse.y"
12770 {
12771 (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]));
12772 /*% ripper: opassign!(field!($:primary_value, $:tCOLON2, $:tIDENTIFIER), $:tOP_ASGN, $:rhs) %*/
12773 }
12774#line 12775 "parse.c"
12775 break;
12776
12777 case 55: /* op_asgn_command_rhs: primary_value "::" "constant" "operator-assignment" lex_ctxt command_rhs */
12778#line 3080 "parse.y"
12779 {
12780 YYLTYPE loc = code_loc_gen(&(yylsp[-5]), &(yylsp[-3]));
12781 (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));
12782 /*% ripper: opassign!(const_path_field!($:primary_value, $:tCONSTANT), $:tOP_ASGN, $:rhs) %*/
12783 }
12784#line 12785 "parse.c"
12785 break;
12786
12787 case 56: /* op_asgn_command_rhs: ":: at EXPR_BEG" "constant" "operator-assignment" lex_ctxt command_rhs */
12788#line 3086 "parse.y"
12789 {
12790 YYLTYPE loc = code_loc_gen(&(yylsp[-4]), &(yylsp[-3]));
12791 (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));
12792 /*% ripper: opassign!(top_const_field!($:tCONSTANT), $:tOP_ASGN, $:rhs) %*/
12793 }
12794#line 12795 "parse.c"
12795 break;
12796
12797 case 57: /* op_asgn_command_rhs: backref "operator-assignment" lex_ctxt command_rhs */
12798#line 3092 "parse.y"
12799 {
12800 VALUE MAYBE_UNUSED(e) = rb_backref_error(p, (yyvsp[-3].node));
12801 (yyval.node) = NEW_ERROR(&(yyloc));
12802 /*% ripper[error]: assign_error!(?e, opassign!(var_field!($:backref), $:tOP_ASGN, $:rhs)) %*/
12803 }
12804#line 12805 "parse.c"
12805 break;
12806
12807 case 59: /* def_endless_method_endless_command: defn_head f_opt_paren_args '=' endless_command */
12808#line 2960 "parse.y"
12809 {
12810 endless_method_name(p, (yyvsp[-3].node_def_temp)->nd_mid, &(yylsp[-3]));
12811 restore_defun(p, (yyvsp[-3].node_def_temp));
12812 ((yyval.node) = (yyvsp[-3].node_def_temp)->nd_def)->nd_loc = (yyloc);
12813 (yyvsp[0].node) = new_scope_body(p, (yyvsp[-2].node_args), (yyvsp[0].node), (yyval.node), &(yyloc));
12814 RNODE_DEFN((yyval.node))->nd_defn = (yyvsp[0].node);
12815 /*% ripper: bodystmt!($:bodystmt, Qnil, Qnil, Qnil) %*/
12816 /*% ripper: def!($:head, $:args, $:$) %*/
12817 local_pop(p);
12818 }
12819#line 12820 "parse.c"
12820 break;
12821
12822 case 60: /* def_endless_method_endless_command: defs_head f_opt_paren_args '=' endless_command */
12823#line 2971 "parse.y"
12824 {
12825 endless_method_name(p, (yyvsp[-3].node_def_temp)->nd_mid, &(yylsp[-3]));
12826 restore_defun(p, (yyvsp[-3].node_def_temp));
12827 ((yyval.node) = (yyvsp[-3].node_def_temp)->nd_def)->nd_loc = (yyloc);
12828 (yyvsp[0].node) = new_scope_body(p, (yyvsp[-2].node_args), (yyvsp[0].node), (yyval.node), &(yyloc));
12829 RNODE_DEFS((yyval.node))->nd_defn = (yyvsp[0].node);
12830 /*% ripper: bodystmt!($:bodystmt, Qnil, Qnil, Qnil) %*/
12831 /*% ripper: defs!(*$:head[0..2], $:args, $:$) %*/
12832 local_pop(p);
12833 }
12834#line 12835 "parse.c"
12835 break;
12836
12837 case 63: /* endless_command: endless_command "'rescue' modifier" after_rescue arg */
12838#line 3434 "parse.y"
12839 {
12840 p->ctxt.in_rescue = (yyvsp[-1].ctxt).in_rescue;
12841 (yyval.node) = rescued_expr(p, (yyvsp[-3].node), (yyvsp[0].node), &(yylsp[-3]), &(yylsp[-2]), &(yylsp[0]));
12842 /*% ripper: rescue_mod!($:1, $:4) %*/
12843 }
12844#line 12845 "parse.c"
12845 break;
12846
12847 case 66: /* endless_command: "'not'" option_'\n' endless_command */
12848#line 3440 "parse.y"
12849 {
12850 (yyval.node) = call_uni_op(p, method_cond(p, (yyvsp[0].node), &(yylsp[0])), METHOD_NOT, &(yylsp[-2]), &(yyloc));
12851 /*% ripper: unary!(ID2VAL(idNOT), $:3) %*/
12852 }
12853#line 12854 "parse.c"
12854 break;
12855
12856 case 68: /* command_rhs: command_call_value "'rescue' modifier" after_rescue stmt */
12857#line 3448 "parse.y"
12858 {
12859 p->ctxt.in_rescue = (yyvsp[-1].ctxt).in_rescue;
12860 YYLTYPE loc = code_loc_gen(&(yylsp[-2]), &(yylsp[0]));
12861 (yyval.node) = NEW_RESCUE((yyvsp[-3].node), NEW_RESBODY(0, 0, remove_begin((yyvsp[0].node)), 0, &loc), 0, &(yyloc));
12862 /*% ripper: rescue_mod!($:1, $:4) %*/
12863 }
12864#line 12865 "parse.c"
12865 break;
12866
12867 case 71: /* expr: expr "'and'" expr */
12868#line 3459 "parse.y"
12869 {
12870 (yyval.node) = logop(p, idAND, (yyvsp[-2].node), (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
12871 /*% ripper: binary!($:left, ID2VAL(idAND), $:right) %*/
12872 }
12873#line 12874 "parse.c"
12874 break;
12875
12876 case 72: /* expr: expr "'or'" expr */
12877#line 3464 "parse.y"
12878 {
12879 (yyval.node) = logop(p, idOR, (yyvsp[-2].node), (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
12880 /*% ripper: binary!($:left, ID2VAL(idOR), $:right) %*/
12881 }
12882#line 12883 "parse.c"
12883 break;
12884
12885 case 73: /* expr: "'not'" option_'\n' expr */
12886#line 3469 "parse.y"
12887 {
12888 (yyval.node) = call_uni_op(p, method_cond(p, (yyvsp[0].node), &(yylsp[0])), METHOD_NOT, &(yylsp[-2]), &(yyloc));
12889 /*% ripper: unary!(ID2VAL(idNOT), $:arg) %*/
12890 }
12891#line 12892 "parse.c"
12892 break;
12893
12894 case 74: /* expr: '!' command_call */
12895#line 3474 "parse.y"
12896 {
12897 (yyval.node) = call_uni_op(p, method_cond(p, (yyvsp[0].node), &(yylsp[0])), '!', &(yylsp[-1]), &(yyloc));
12898 /*% ripper: unary!(ID2VAL('\'!\''), $:arg) %*/
12899 }
12900#line 12901 "parse.c"
12901 break;
12902
12903 case 75: /* $@7: %empty */
12904#line 3479 "parse.y"
12905 {
12906 value_expr(p, (yyvsp[-1].node));
12907 }
12908#line 12909 "parse.c"
12909 break;
12910
12911 case 76: /* expr: arg "=>" $@7 p_in_kwarg p_pvtbl p_pktbl p_top_expr_body */
12912#line 3484 "parse.y"
12913 {
12914 pop_pktbl(p, (yyvsp[-1].tbl));
12915 pop_pvtbl(p, (yyvsp[-2].tbl));
12916 p->ctxt.in_kwarg = (yyvsp[-3].ctxt).in_kwarg;
12917 p->ctxt.in_alt_pattern = (yyvsp[-3].ctxt).in_alt_pattern;
12918 p->ctxt.capture_in_pattern = (yyvsp[-3].ctxt).capture_in_pattern;
12919 (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);
12920 /*% ripper: case!($:arg, in!($:body, Qnil, Qnil)) %*/
12921 }
12922#line 12923 "parse.c"
12923 break;
12924
12925 case 77: /* $@8: %empty */
12926#line 3494 "parse.y"
12927 {
12928 value_expr(p, (yyvsp[-1].node));
12929 }
12930#line 12931 "parse.c"
12931 break;
12932
12933 case 78: /* expr: arg "'in'" $@8 p_in_kwarg p_pvtbl p_pktbl p_top_expr_body */
12934#line 3499 "parse.y"
12935 {
12936 pop_pktbl(p, (yyvsp[-1].tbl));
12937 pop_pvtbl(p, (yyvsp[-2].tbl));
12938 p->ctxt.in_kwarg = (yyvsp[-3].ctxt).in_kwarg;
12939 p->ctxt.in_alt_pattern = (yyvsp[-3].ctxt).in_alt_pattern;
12940 p->ctxt.capture_in_pattern = (yyvsp[-3].ctxt).capture_in_pattern;
12941 (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);
12942 /*% ripper: case!($:arg, in!($:body, Qnil, Qnil)) %*/
12943 }
12944#line 12945 "parse.c"
12945 break;
12946
12947 case 80: /* def_name: fname */
12948#line 3512 "parse.y"
12949 {
12950 numparam_name(p, (yyvsp[0].id));
12951 local_push(p, 0);
12952 p->ctxt.in_def = 1;
12953 p->ctxt.in_rescue = before_rescue;
12954 p->ctxt.cant_return = 0;
12955 (yyval.id) = (yyvsp[0].id);
12956 }
12957#line 12958 "parse.c"
12958 break;
12959
12960 case 81: /* defn_head: k_def def_name */
12961#line 3523 "parse.y"
12962 {
12963 (yyval.node_def_temp) = def_head_save(p, (yyvsp[-1].node_def_temp));
12964 (yyval.node_def_temp)->nd_mid = (yyvsp[0].id);
12965 (yyval.node_def_temp)->nd_def = NEW_DEFN((yyvsp[0].id), 0, &(yyloc));
12966 /*% ripper: $:def_name %*/
12967 }
12968#line 12969 "parse.c"
12969 break;
12970
12971 case 82: /* $@9: %empty */
12972#line 3532 "parse.y"
12973 {
12974 SET_LEX_STATE(EXPR_FNAME);
12975 }
12976#line 12977 "parse.c"
12977 break;
12978
12979 case 83: /* defs_head: k_def singleton dot_or_colon $@9 def_name */
12980#line 3536 "parse.y"
12981 {
12982 SET_LEX_STATE(EXPR_ENDFN|EXPR_LABEL); /* force for args */
12983 (yyval.node_def_temp) = def_head_save(p, (yyvsp[-4].node_def_temp));
12984 (yyval.node_def_temp)->nd_mid = (yyvsp[0].id);
12985 (yyval.node_def_temp)->nd_def = NEW_DEFS((yyvsp[-3].node), (yyvsp[0].id), 0, &(yyloc));
12986 /*% ripper: [$:singleton, $:dot_or_colon, $:def_name] %*/
12987 }
12988#line 12989 "parse.c"
12989 break;
12990
12991 case 84: /* value_expr_expr: expr */
12992#line 3155 "parse.y"
12993 {
12994 value_expr(p, (yyvsp[0].node));
12995 (yyval.node) = (yyvsp[0].node);
12996 }
12997#line 12998 "parse.c"
12998 break;
12999
13000 case 86: /* expr_value: error */
13001#line 3547 "parse.y"
13002 {
13003 (yyval.node) = NEW_ERROR(&(yyloc));
13004 }
13005#line 13006 "parse.c"
13006 break;
13007
13008 case 87: /* $@10: %empty */
13009#line 3552 "parse.y"
13010 {COND_PUSH(1);}
13011#line 13012 "parse.c"
13012 break;
13013
13014 case 88: /* $@11: %empty */
13015#line 3552 "parse.y"
13016 {COND_POP();}
13017#line 13018 "parse.c"
13018 break;
13019
13020 case 89: /* expr_value_do: $@10 expr_value do $@11 */
13021#line 3553 "parse.y"
13022 {
13023 (yyval.node) = (yyvsp[-2].node);
13024 /*% ripper: $:2 %*/
13025 }
13026#line 13027 "parse.c"
13027 break;
13028
13029 case 92: /* value_expr_command_call: command_call */
13030#line 3155 "parse.y"
13031 {
13032 value_expr(p, (yyvsp[0].node));
13033 (yyval.node) = (yyvsp[0].node);
13034 }
13035#line 13036 "parse.c"
13036 break;
13037
13038 case 95: /* block_command: block_call call_op2 operation2 command_args */
13039#line 3568 "parse.y"
13040 {
13041 (yyval.node) = new_qcall(p, (yyvsp[-2].id), (yyvsp[-3].node), (yyvsp[-1].id), (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
13042 /*% ripper: method_add_arg!(call!($:1, $:2, $:3), $:4) %*/
13043 }
13044#line 13045 "parse.c"
13045 break;
13046
13047 case 96: /* cmd_brace_block: "{ arg" brace_body '}' */
13048#line 3575 "parse.y"
13049 {
13050 (yyval.node) = (yyvsp[-1].node);
13051 set_embraced_location((yyval.node), &(yylsp[-2]), &(yylsp[0]));
13052 /*% ripper: $:2 %*/
13053 }
13054#line 13055 "parse.c"
13055 break;
13056
13057 case 97: /* fcall: "local variable or method" */
13058#line 3583 "parse.y"
13059 {
13060 (yyval.node_fcall) = NEW_FCALL((yyvsp[0].id), 0, &(yyloc));
13061 /*% ripper: $:1 %*/
13062 }
13063#line 13064 "parse.c"
13064 break;
13065
13066 case 98: /* fcall: "constant" */
13067#line 3583 "parse.y"
13068 {
13069 (yyval.node_fcall) = NEW_FCALL((yyvsp[0].id), 0, &(yyloc));
13070 /*% ripper: $:1 %*/
13071 }
13072#line 13073 "parse.c"
13073 break;
13074
13075 case 99: /* fcall: "method" */
13076#line 3583 "parse.y"
13077 {
13078 (yyval.node_fcall) = NEW_FCALL((yyvsp[0].id), 0, &(yyloc));
13079 /*% ripper: $:1 %*/
13080 }
13081#line 13082 "parse.c"
13082 break;
13083
13084 case 100: /* command: fcall command_args */
13085#line 3590 "parse.y"
13086 {
13087 (yyvsp[-1].node_fcall)->nd_args = (yyvsp[0].node);
13088 nd_set_last_loc((yyvsp[-1].node_fcall), (yylsp[0]).end_pos);
13089 (yyval.node) = (NODE *)(yyvsp[-1].node_fcall);
13090 /*% ripper: command!($:1, $:2) %*/
13091 }
13092#line 13093 "parse.c"
13093 break;
13094
13095 case 101: /* command: fcall command_args cmd_brace_block */
13096#line 3597 "parse.y"
13097 {
13098 block_dup_check(p, (yyvsp[-1].node), (yyvsp[0].node));
13099 (yyvsp[-2].node_fcall)->nd_args = (yyvsp[-1].node);
13100 (yyval.node) = method_add_block(p, (NODE *)(yyvsp[-2].node_fcall), (yyvsp[0].node), &(yyloc));
13101 fixpos((yyval.node), RNODE((yyvsp[-2].node_fcall)));
13102 nd_set_last_loc((yyvsp[-2].node_fcall), (yylsp[-1]).end_pos);
13103 /*% ripper: method_add_block!(command!($:1, $:2), $:3) %*/
13104 }
13105#line 13106 "parse.c"
13106 break;
13107
13108 case 102: /* command: primary_value call_op operation2 command_args */
13109#line 3606 "parse.y"
13110 {
13111 (yyval.node) = new_command_qcall(p, (yyvsp[-2].id), (yyvsp[-3].node), (yyvsp[-1].id), (yyvsp[0].node), 0, &(yylsp[-1]), &(yyloc));
13112 /*% ripper: command_call!($:1, $:2, $:3, $:4) %*/
13113 }
13114#line 13115 "parse.c"
13115 break;
13116
13117 case 103: /* command: primary_value call_op operation2 command_args cmd_brace_block */
13118#line 3611 "parse.y"
13119 {
13120 (yyval.node) = new_command_qcall(p, (yyvsp[-3].id), (yyvsp[-4].node), (yyvsp[-2].id), (yyvsp[-1].node), (yyvsp[0].node), &(yylsp[-2]), &(yyloc));
13121 /*% ripper: method_add_block!(command_call!($:1, $:2, $:3, $:4), $:5) %*/
13122 }
13123#line 13124 "parse.c"
13124 break;
13125
13126 case 104: /* command: primary_value "::" operation2 command_args */
13127#line 3616 "parse.y"
13128 {
13129 (yyval.node) = new_command_qcall(p, idCOLON2, (yyvsp[-3].node), (yyvsp[-1].id), (yyvsp[0].node), 0, &(yylsp[-1]), &(yyloc));
13130 /*% ripper: command_call!($:1, $:2, $:3, $:4) %*/
13131 }
13132#line 13133 "parse.c"
13133 break;
13134
13135 case 105: /* command: primary_value "::" operation2 command_args cmd_brace_block */
13136#line 3621 "parse.y"
13137 {
13138 (yyval.node) = new_command_qcall(p, idCOLON2, (yyvsp[-4].node), (yyvsp[-2].id), (yyvsp[-1].node), (yyvsp[0].node), &(yylsp[-2]), &(yyloc));
13139 /*% ripper: method_add_block!(command_call!($:1, $:2, $:3, $:4), $:5) %*/
13140 }
13141#line 13142 "parse.c"
13142 break;
13143
13144 case 106: /* command: primary_value "::" "constant" '{' brace_body '}' */
13145#line 3626 "parse.y"
13146 {
13147 set_embraced_location((yyvsp[-1].node), &(yylsp[-2]), &(yylsp[0]));
13148 (yyval.node) = new_command_qcall(p, idCOLON2, (yyvsp[-5].node), (yyvsp[-3].id), 0, (yyvsp[-1].node), &(yylsp[-3]), &(yyloc));
13149 /*% ripper: method_add_block!(command_call!($:1, $:2, $:3, Qnil), $:5) %*/
13150 }
13151#line 13152 "parse.c"
13152 break;
13153
13154 case 107: /* command: "'super'" command_args */
13155#line 3632 "parse.y"
13156 {
13157 (yyval.node) = NEW_SUPER((yyvsp[0].node), &(yyloc), &(yylsp[-1]), &NULL_LOC, &NULL_LOC);
13158 fixpos((yyval.node), (yyvsp[0].node));
13159 /*% ripper: super!($:2) %*/
13160 }
13161#line 13162 "parse.c"
13162 break;
13163
13164 case 108: /* command: k_yield command_args */
13165#line 3638 "parse.y"
13166 {
13167 (yyval.node) = NEW_YIELD((yyvsp[0].node), &(yyloc), &(yylsp[-1]), &NULL_LOC, &NULL_LOC);
13168 fixpos((yyval.node), (yyvsp[0].node));
13169 /*% ripper: yield!($:2) %*/
13170 }
13171#line 13172 "parse.c"
13172 break;
13173
13174 case 109: /* command: k_return call_args */
13175#line 3644 "parse.y"
13176 {
13177 (yyval.node) = NEW_RETURN(ret_args(p, (yyvsp[0].node)), &(yyloc), &(yylsp[-1]));
13178 /*% ripper: return!($:2) %*/
13179 }
13180#line 13181 "parse.c"
13181 break;
13182
13183 case 110: /* command: "'break'" call_args */
13184#line 3649 "parse.y"
13185 {
13186 NODE *args = 0;
13187 args = ret_args(p, (yyvsp[0].node));
13188 (yyval.node) = add_block_exit(p, NEW_BREAK(args, &(yyloc), &(yylsp[-1])));
13189 /*% ripper: break!($:2) %*/
13190 }
13191#line 13192 "parse.c"
13192 break;
13193
13194 case 111: /* command: "'next'" call_args */
13195#line 3656 "parse.y"
13196 {
13197 NODE *args = 0;
13198 args = ret_args(p, (yyvsp[0].node));
13199 (yyval.node) = add_block_exit(p, NEW_NEXT(args, &(yyloc), &(yylsp[-1])));
13200 /*% ripper: next!($:2) %*/
13201 }
13202#line 13203 "parse.c"
13203 break;
13204
13205 case 113: /* mlhs: "(" mlhs_inner rparen */
13206#line 3666 "parse.y"
13207 {
13208 (yyval.node_masgn) = (yyvsp[-1].node_masgn);
13209 /*% ripper: mlhs_paren!($:2) %*/
13210 }
13211#line 13212 "parse.c"
13212 break;
13213
13214 case 115: /* mlhs_inner: "(" mlhs_inner rparen */
13215#line 3674 "parse.y"
13216 {
13217 (yyval.node_masgn) = NEW_MASGN(NEW_LIST((NODE *)(yyvsp[-1].node_masgn), &(yyloc)), 0, &(yyloc));
13218 /*% ripper: mlhs_paren!($:2) %*/
13219 }
13220#line 13221 "parse.c"
13221 break;
13222
13223 case 116: /* mlhs_basic: mlhs_head */
13224#line 3681 "parse.y"
13225 {
13226 (yyval.node_masgn) = NEW_MASGN((yyvsp[0].node), 0, &(yyloc));
13227 /*% ripper: $:1 %*/
13228 }
13229#line 13230 "parse.c"
13230 break;
13231
13232 case 117: /* mlhs_basic: mlhs_head mlhs_item */
13233#line 3686 "parse.y"
13234 {
13235 (yyval.node_masgn) = NEW_MASGN(list_append(p, (yyvsp[-1].node), (yyvsp[0].node)), 0, &(yyloc));
13236 /*% ripper: mlhs_add!($:1, $:2) %*/
13237 }
13238#line 13239 "parse.c"
13239 break;
13240
13241 case 118: /* mlhs_basic: mlhs_head "*" mlhs_node */
13242#line 3691 "parse.y"
13243 {
13244 (yyval.node_masgn) = NEW_MASGN((yyvsp[-2].node), (yyvsp[0].node), &(yyloc));
13245 /*% ripper: mlhs_add_star!($:1, $:3) %*/
13246 }
13247#line 13248 "parse.c"
13248 break;
13249
13250 case 119: /* mlhs_items_mlhs_item: mlhs_item */
13251#line 3042 "parse.y"
13252 {
13253 (yyval.node) = NEW_LIST((yyvsp[0].node), &(yyloc));
13254 /*% ripper: mlhs_add!(mlhs_new!, $:1) %*/
13255 }
13256#line 13257 "parse.c"
13257 break;
13258
13259 case 120: /* mlhs_items_mlhs_item: mlhs_items_mlhs_item ',' mlhs_item */
13260#line 3047 "parse.y"
13261 {
13262 (yyval.node) = list_append(p, (yyvsp[-2].node), (yyvsp[0].node));
13263 /*% ripper: mlhs_add!($:1, $:3) %*/
13264 }
13265#line 13266 "parse.c"
13266 break;
13267
13268 case 121: /* mlhs_basic: mlhs_head "*" mlhs_node ',' mlhs_items_mlhs_item */
13269#line 3696 "parse.y"
13270 {
13271 (yyval.node_masgn) = NEW_MASGN((yyvsp[-4].node), NEW_POSTARG((yyvsp[-2].node),(yyvsp[0].node),&(yyloc)), &(yyloc));
13272 /*% ripper: mlhs_add_post!(mlhs_add_star!($:1, $:3), $:5) %*/
13273 }
13274#line 13275 "parse.c"
13275 break;
13276
13277 case 122: /* mlhs_basic: mlhs_head "*" */
13278#line 3701 "parse.y"
13279 {
13280 (yyval.node_masgn) = NEW_MASGN((yyvsp[-1].node), NODE_SPECIAL_NO_NAME_REST, &(yyloc));
13281 /*% ripper: mlhs_add_star!($:1, Qnil) %*/
13282 }
13283#line 13284 "parse.c"
13284 break;
13285
13286 case 123: /* mlhs_basic: mlhs_head "*" ',' mlhs_items_mlhs_item */
13287#line 3706 "parse.y"
13288 {
13289 (yyval.node_masgn) = NEW_MASGN((yyvsp[-3].node), NEW_POSTARG(NODE_SPECIAL_NO_NAME_REST, (yyvsp[0].node), &(yyloc)), &(yyloc));
13290 /*% ripper: mlhs_add_post!(mlhs_add_star!($:1, Qnil), $:4) %*/
13291 }
13292#line 13293 "parse.c"
13293 break;
13294
13295 case 124: /* mlhs_basic: "*" mlhs_node */
13296#line 3711 "parse.y"
13297 {
13298 (yyval.node_masgn) = NEW_MASGN(0, (yyvsp[0].node), &(yyloc));
13299 /*% ripper: mlhs_add_star!(mlhs_new!, $:2) %*/
13300 }
13301#line 13302 "parse.c"
13302 break;
13303
13304 case 125: /* mlhs_basic: "*" mlhs_node ',' mlhs_items_mlhs_item */
13305#line 3716 "parse.y"
13306 {
13307 (yyval.node_masgn) = NEW_MASGN(0, NEW_POSTARG((yyvsp[-2].node),(yyvsp[0].node),&(yyloc)), &(yyloc));
13308 /*% ripper: mlhs_add_post!(mlhs_add_star!(mlhs_new!, $:2), $:4) %*/
13309 }
13310#line 13311 "parse.c"
13311 break;
13312
13313 case 126: /* mlhs_basic: "*" */
13314#line 3721 "parse.y"
13315 {
13316 (yyval.node_masgn) = NEW_MASGN(0, NODE_SPECIAL_NO_NAME_REST, &(yyloc));
13317 /*% ripper: mlhs_add_star!(mlhs_new!, Qnil) %*/
13318 }
13319#line 13320 "parse.c"
13320 break;
13321
13322 case 127: /* mlhs_basic: "*" ',' mlhs_items_mlhs_item */
13323#line 3726 "parse.y"
13324 {
13325 (yyval.node_masgn) = NEW_MASGN(0, NEW_POSTARG(NODE_SPECIAL_NO_NAME_REST, (yyvsp[0].node), &(yyloc)), &(yyloc));
13326 /*% ripper: mlhs_add_post!(mlhs_add_star!(mlhs_new!, Qnil), $:3) %*/
13327 }
13328#line 13329 "parse.c"
13329 break;
13330
13331 case 129: /* mlhs_item: "(" mlhs_inner rparen */
13332#line 3734 "parse.y"
13333 {
13334 (yyval.node) = (NODE *)(yyvsp[-1].node_masgn);
13335 /*% ripper: mlhs_paren!($:2) %*/
13336 }
13337#line 13338 "parse.c"
13338 break;
13339
13340 case 130: /* mlhs_head: mlhs_item ',' */
13341#line 3741 "parse.y"
13342 {
13343 (yyval.node) = NEW_LIST((yyvsp[-1].node), &(yylsp[-1]));
13344 /*% ripper: mlhs_add!(mlhs_new!, $:1) %*/
13345 }
13346#line 13347 "parse.c"
13347 break;
13348
13349 case 131: /* mlhs_head: mlhs_head mlhs_item ',' */
13350#line 3746 "parse.y"
13351 {
13352 (yyval.node) = list_append(p, (yyvsp[-2].node), (yyvsp[-1].node));
13353 /*% ripper: mlhs_add!($:1, $:2) %*/
13354 }
13355#line 13356 "parse.c"
13356 break;
13357
13358 case 132: /* mlhs_node: user_variable */
13359#line 3754 "parse.y"
13360 {
13361 /*% ripper: var_field!($:1) %*/
13362 (yyval.node) = assignable(p, (yyvsp[0].id), 0, &(yyloc));
13363 }
13364#line 13365 "parse.c"
13365 break;
13366
13367 case 133: /* mlhs_node: keyword_variable */
13368#line 3754 "parse.y"
13369 {
13370 /*% ripper: var_field!($:1) %*/
13371 (yyval.node) = assignable(p, (yyvsp[0].id), 0, &(yyloc));
13372 }
13373#line 13374 "parse.c"
13374 break;
13375
13376 case 134: /* mlhs_node: primary_value '[' opt_call_args rbracket */
13377#line 3759 "parse.y"
13378 {
13379 (yyval.node) = aryset(p, (yyvsp[-3].node), (yyvsp[-1].node), &(yyloc));
13380 /*% ripper: aref_field!($:1, $:3) %*/
13381 }
13382#line 13383 "parse.c"
13383 break;
13384
13385 case 135: /* mlhs_node: primary_value call_op "local variable or method" */
13386#line 3764 "parse.y"
13387 {
13388 anddot_multiple_assignment_check(p, &(yylsp[-1]), (yyvsp[-1].id));
13389 (yyval.node) = attrset(p, (yyvsp[-2].node), (yyvsp[-1].id), (yyvsp[0].id), &(yyloc));
13390 /*% ripper: field!($:1, $:2, $:3) %*/
13391 }
13392#line 13393 "parse.c"
13393 break;
13394
13395 case 136: /* mlhs_node: primary_value call_op "constant" */
13396#line 3764 "parse.y"
13397 {
13398 anddot_multiple_assignment_check(p, &(yylsp[-1]), (yyvsp[-1].id));
13399 (yyval.node) = attrset(p, (yyvsp[-2].node), (yyvsp[-1].id), (yyvsp[0].id), &(yyloc));
13400 /*% ripper: field!($:1, $:2, $:3) %*/
13401 }
13402#line 13403 "parse.c"
13403 break;
13404
13405 case 137: /* mlhs_node: primary_value "::" "local variable or method" */
13406#line 3770 "parse.y"
13407 {
13408 (yyval.node) = attrset(p, (yyvsp[-2].node), idCOLON2, (yyvsp[0].id), &(yyloc));
13409 /*% ripper: const_path_field!($:1, $:3) %*/
13410 }
13411#line 13412 "parse.c"
13412 break;
13413
13414 case 138: /* mlhs_node: primary_value "::" "constant" */
13415#line 3775 "parse.y"
13416 {
13417 /*% ripper: const_path_field!($:1, $:3) %*/
13418 (yyval.node) = const_decl(p, NEW_COLON2((yyvsp[-2].node), (yyvsp[0].id), &(yyloc), &(yylsp[-1]), &(yylsp[0])), &(yyloc));
13419 }
13420#line 13421 "parse.c"
13421 break;
13422
13423 case 139: /* mlhs_node: ":: at EXPR_BEG" "constant" */
13424#line 3780 "parse.y"
13425 {
13426 /*% ripper: top_const_field!($:2) %*/
13427 (yyval.node) = const_decl(p, NEW_COLON3((yyvsp[0].id), &(yyloc), &(yylsp[-1]), &(yylsp[0])), &(yyloc));
13428 }
13429#line 13430 "parse.c"
13430 break;
13431
13432 case 140: /* mlhs_node: backref */
13433#line 3785 "parse.y"
13434 {
13435 VALUE MAYBE_UNUSED(e) = rb_backref_error(p, (yyvsp[0].node));
13436 (yyval.node) = NEW_ERROR(&(yyloc));
13437 /*% ripper[error]: assign_error!(?e, var_field!($:1)) %*/
13438 }
13439#line 13440 "parse.c"
13440 break;
13441
13442 case 141: /* lhs: user_variable */
13443#line 3793 "parse.y"
13444 {
13445 /*% ripper: var_field!($:1) %*/
13446 (yyval.node) = assignable(p, (yyvsp[0].id), 0, &(yyloc));
13447 }
13448#line 13449 "parse.c"
13449 break;
13450
13451 case 142: /* lhs: keyword_variable */
13452#line 3793 "parse.y"
13453 {
13454 /*% ripper: var_field!($:1) %*/
13455 (yyval.node) = assignable(p, (yyvsp[0].id), 0, &(yyloc));
13456 }
13457#line 13458 "parse.c"
13458 break;
13459
13460 case 143: /* lhs: primary_value '[' opt_call_args rbracket */
13461#line 3798 "parse.y"
13462 {
13463 (yyval.node) = aryset(p, (yyvsp[-3].node), (yyvsp[-1].node), &(yyloc));
13464 /*% ripper: aref_field!($:1, $:3) %*/
13465 }
13466#line 13467 "parse.c"
13467 break;
13468
13469 case 144: /* lhs: primary_value call_op "local variable or method" */
13470#line 3803 "parse.y"
13471 {
13472 (yyval.node) = attrset(p, (yyvsp[-2].node), (yyvsp[-1].id), (yyvsp[0].id), &(yyloc));
13473 /*% ripper: field!($:1, $:2, $:3) %*/
13474 }
13475#line 13476 "parse.c"
13476 break;
13477
13478 case 145: /* lhs: primary_value call_op "constant" */
13479#line 3803 "parse.y"
13480 {
13481 (yyval.node) = attrset(p, (yyvsp[-2].node), (yyvsp[-1].id), (yyvsp[0].id), &(yyloc));
13482 /*% ripper: field!($:1, $:2, $:3) %*/
13483 }
13484#line 13485 "parse.c"
13485 break;
13486
13487 case 146: /* lhs: primary_value "::" "local variable or method" */
13488#line 3808 "parse.y"
13489 {
13490 (yyval.node) = attrset(p, (yyvsp[-2].node), idCOLON2, (yyvsp[0].id), &(yyloc));
13491 /*% ripper: field!($:1, $:2, $:3) %*/
13492 }
13493#line 13494 "parse.c"
13494 break;
13495
13496 case 147: /* lhs: primary_value "::" "constant" */
13497#line 3813 "parse.y"
13498 {
13499 /*% ripper: const_path_field!($:1, $:3) %*/
13500 (yyval.node) = const_decl(p, NEW_COLON2((yyvsp[-2].node), (yyvsp[0].id), &(yyloc), &(yylsp[-1]), &(yylsp[0])), &(yyloc));
13501 }
13502#line 13503 "parse.c"
13503 break;
13504
13505 case 148: /* lhs: ":: at EXPR_BEG" "constant" */
13506#line 3818 "parse.y"
13507 {
13508 /*% ripper: top_const_field!($:2) %*/
13509 (yyval.node) = const_decl(p, NEW_COLON3((yyvsp[0].id), &(yyloc), &(yylsp[-1]), &(yylsp[0])), &(yyloc));
13510 }
13511#line 13512 "parse.c"
13512 break;
13513
13514 case 149: /* lhs: backref */
13515#line 3823 "parse.y"
13516 {
13517 VALUE MAYBE_UNUSED(e) = rb_backref_error(p, (yyvsp[0].node));
13518 (yyval.node) = NEW_ERROR(&(yyloc));
13519 /*% ripper[error]: assign_error!(?e, var_field!($:1)) %*/
13520 }
13521#line 13522 "parse.c"
13522 break;
13523
13524 case 150: /* cname: "local variable or method" */
13525#line 3831 "parse.y"
13526 {
13527 static const char mesg[] = "class/module name must be CONSTANT";
13528 /*%%%*/
13529 yyerror1(&(yylsp[0]), mesg);
13530 /*% %*/
13531 /*% ripper[error]: class_name_error!(ERR_MESG(), $:1) %*/
13532 }
13533#line 13534 "parse.c"
13534 break;
13535
13536 case 152: /* cpath: ":: at EXPR_BEG" cname */
13537#line 3842 "parse.y"
13538 {
13539 (yyval.node) = NEW_COLON3((yyvsp[0].id), &(yyloc), &(yylsp[-1]), &(yylsp[0]));
13540 /*% ripper: top_const_ref!($:2) %*/
13541 }
13542#line 13543 "parse.c"
13543 break;
13544
13545 case 153: /* cpath: cname */
13546#line 3847 "parse.y"
13547 {
13548 (yyval.node) = NEW_COLON2(0, (yyvsp[0].id), &(yyloc), &NULL_LOC, &(yylsp[0]));
13549 /*% ripper: const_ref!($:1) %*/
13550 }
13551#line 13552 "parse.c"
13552 break;
13553
13554 case 154: /* cpath: primary_value "::" cname */
13555#line 3852 "parse.y"
13556 {
13557 (yyval.node) = NEW_COLON2((yyvsp[-2].node), (yyvsp[0].id), &(yyloc), &(yylsp[-1]), &(yylsp[0]));
13558 /*% ripper: const_path_ref!($:1, $:3) %*/
13559 }
13560#line 13561 "parse.c"
13561 break;
13562
13563 case 158: /* fname: op */
13564#line 3860 "parse.y"
13565 {
13566 SET_LEX_STATE(EXPR_ENDFN);
13567 (yyval.id) = (yyvsp[0].id);
13568 }
13569#line 13570 "parse.c"
13570 break;
13571
13572 case 160: /* fitem: fname */
13573#line 3868 "parse.y"
13574 {
13575 (yyval.node) = NEW_SYM(rb_id2str((yyvsp[0].id)), &(yyloc));
13576 /*% ripper: symbol_literal!($:1) %*/
13577 }
13578#line 13579 "parse.c"
13579 break;
13580
13581 case 162: /* undef_list: fitem */
13582#line 3876 "parse.y"
13583 {
13584 (yyval.node) = NEW_UNDEF((yyvsp[0].node), &(yyloc));
13585 /*% ripper: rb_ary_new3(1, $:1) %*/
13586 }
13587#line 13588 "parse.c"
13588 break;
13589
13590 case 163: /* $@12: %empty */
13591#line 3880 "parse.y"
13592 {SET_LEX_STATE(EXPR_FNAME|EXPR_FITEM);}
13593#line 13594 "parse.c"
13594 break;
13595
13596 case 164: /* undef_list: undef_list ',' $@12 fitem */
13597#line 3881 "parse.y"
13598 {
13599 nd_set_last_loc((yyvsp[-3].node), (yylsp[0]).end_pos);
13600 rb_parser_ary_push_node(p, RNODE_UNDEF((yyvsp[-3].node))->nd_undefs, (yyvsp[0].node));
13601 /*% ripper: rb_ary_push($:1, $:4) %*/
13602 }
13603#line 13604 "parse.c"
13604 break;
13605
13606 case 165: /* op: '|' */
13607#line 3888 "parse.y"
13608 { (yyval.id) = '|'; }
13609#line 13610 "parse.c"
13610 break;
13611
13612 case 166: /* op: '^' */
13613#line 3889 "parse.y"
13614 { (yyval.id) = '^'; }
13615#line 13616 "parse.c"
13616 break;
13617
13618 case 167: /* op: '&' */
13619#line 3890 "parse.y"
13620 { (yyval.id) = '&'; }
13621#line 13622 "parse.c"
13622 break;
13623
13624 case 168: /* op: "<=>" */
13625#line 3891 "parse.y"
13626 { (yyval.id) = tCMP; }
13627#line 13628 "parse.c"
13628 break;
13629
13630 case 169: /* op: "==" */
13631#line 3892 "parse.y"
13632 { (yyval.id) = tEQ; }
13633#line 13634 "parse.c"
13634 break;
13635
13636 case 170: /* op: "===" */
13637#line 3893 "parse.y"
13638 { (yyval.id) = tEQQ; }
13639#line 13640 "parse.c"
13640 break;
13641
13642 case 171: /* op: "=~" */
13643#line 3894 "parse.y"
13644 { (yyval.id) = tMATCH; }
13645#line 13646 "parse.c"
13646 break;
13647
13648 case 172: /* op: "!~" */
13649#line 3895 "parse.y"
13650 { (yyval.id) = tNMATCH; }
13651#line 13652 "parse.c"
13652 break;
13653
13654 case 173: /* op: '>' */
13655#line 3896 "parse.y"
13656 { (yyval.id) = '>'; }
13657#line 13658 "parse.c"
13658 break;
13659
13660 case 174: /* op: ">=" */
13661#line 3897 "parse.y"
13662 { (yyval.id) = tGEQ; }
13663#line 13664 "parse.c"
13664 break;
13665
13666 case 175: /* op: '<' */
13667#line 3898 "parse.y"
13668 { (yyval.id) = '<'; }
13669#line 13670 "parse.c"
13670 break;
13671
13672 case 176: /* op: "<=" */
13673#line 3899 "parse.y"
13674 { (yyval.id) = tLEQ; }
13675#line 13676 "parse.c"
13676 break;
13677
13678 case 177: /* op: "!=" */
13679#line 3900 "parse.y"
13680 { (yyval.id) = tNEQ; }
13681#line 13682 "parse.c"
13682 break;
13683
13684 case 178: /* op: "<<" */
13685#line 3901 "parse.y"
13686 { (yyval.id) = tLSHFT; }
13687#line 13688 "parse.c"
13688 break;
13689
13690 case 179: /* op: ">>" */
13691#line 3902 "parse.y"
13692 { (yyval.id) = tRSHFT; }
13693#line 13694 "parse.c"
13694 break;
13695
13696 case 180: /* op: '+' */
13697#line 3903 "parse.y"
13698 { (yyval.id) = '+'; }
13699#line 13700 "parse.c"
13700 break;
13701
13702 case 181: /* op: '-' */
13703#line 3904 "parse.y"
13704 { (yyval.id) = '-'; }
13705#line 13706 "parse.c"
13706 break;
13707
13708 case 182: /* op: '*' */
13709#line 3905 "parse.y"
13710 { (yyval.id) = '*'; }
13711#line 13712 "parse.c"
13712 break;
13713
13714 case 183: /* op: "*" */
13715#line 3906 "parse.y"
13716 { (yyval.id) = '*'; }
13717#line 13718 "parse.c"
13718 break;
13719
13720 case 184: /* op: '/' */
13721#line 3907 "parse.y"
13722 { (yyval.id) = '/'; }
13723#line 13724 "parse.c"
13724 break;
13725
13726 case 185: /* op: '%' */
13727#line 3908 "parse.y"
13728 { (yyval.id) = '%'; }
13729#line 13730 "parse.c"
13730 break;
13731
13732 case 186: /* op: "**" */
13733#line 3909 "parse.y"
13734 { (yyval.id) = tPOW; }
13735#line 13736 "parse.c"
13736 break;
13737
13738 case 187: /* op: "**arg" */
13739#line 3910 "parse.y"
13740 { (yyval.id) = tDSTAR; }
13741#line 13742 "parse.c"
13742 break;
13743
13744 case 188: /* op: '!' */
13745#line 3911 "parse.y"
13746 { (yyval.id) = '!'; }
13747#line 13748 "parse.c"
13748 break;
13749
13750 case 189: /* op: '~' */
13751#line 3912 "parse.y"
13752 { (yyval.id) = '~'; }
13753#line 13754 "parse.c"
13754 break;
13755
13756 case 190: /* op: "unary+" */
13757#line 3913 "parse.y"
13758 { (yyval.id) = tUPLUS; }
13759#line 13760 "parse.c"
13760 break;
13761
13762 case 191: /* op: "unary-" */
13763#line 3914 "parse.y"
13764 { (yyval.id) = tUMINUS; }
13765#line 13766 "parse.c"
13766 break;
13767
13768 case 192: /* op: "[]" */
13769#line 3915 "parse.y"
13770 { (yyval.id) = tAREF; }
13771#line 13772 "parse.c"
13772 break;
13773
13774 case 193: /* op: "[]=" */
13775#line 3916 "parse.y"
13776 { (yyval.id) = tASET; }
13777#line 13778 "parse.c"
13778 break;
13779
13780 case 194: /* op: '`' */
13781#line 3917 "parse.y"
13782 { (yyval.id) = '`'; }
13783#line 13784 "parse.c"
13784 break;
13785
13786 case 236: /* asgn_arg_rhs: lhs '=' lex_ctxt arg_rhs */
13787#line 2920 "parse.y"
13788 {
13789 (yyval.node) = node_assign(p, (NODE *)(yyvsp[-3].node), (yyvsp[0].node), (yyvsp[-1].ctxt), &(yyloc));
13790 /*% ripper: assign!($:1, $:4) %*/
13791 }
13792#line 13793 "parse.c"
13793 break;
13794
13795 case 238: /* op_asgn_arg_rhs: var_lhs "operator-assignment" lex_ctxt arg_rhs */
13796#line 3055 "parse.y"
13797 {
13798 (yyval.node) = new_op_assign(p, (yyvsp[-3].node), (yyvsp[-2].id), (yyvsp[0].node), (yyvsp[-1].ctxt), &(yyloc));
13799 /*% ripper: opassign!($:var_lhs, $:tOP_ASGN, $:rhs) %*/
13800 }
13801#line 13802 "parse.c"
13802 break;
13803
13804 case 239: /* op_asgn_arg_rhs: primary_value '[' opt_call_args rbracket "operator-assignment" lex_ctxt arg_rhs */
13805#line 3060 "parse.y"
13806 {
13807 (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]));
13808 /*% ripper: opassign!(aref_field!($:primary_value, $:opt_call_args), $:tOP_ASGN, $:rhs) %*/
13809 }
13810#line 13811 "parse.c"
13811 break;
13812
13813 case 240: /* op_asgn_arg_rhs: primary_value call_op "local variable or method" "operator-assignment" lex_ctxt arg_rhs */
13814#line 3065 "parse.y"
13815 {
13816 (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]));
13817 /*% ripper: opassign!(field!($:primary_value, $:call_op, $:tIDENTIFIER), $:tOP_ASGN, $:rhs) %*/
13818 }
13819#line 13820 "parse.c"
13820 break;
13821
13822 case 241: /* op_asgn_arg_rhs: primary_value call_op "constant" "operator-assignment" lex_ctxt arg_rhs */
13823#line 3070 "parse.y"
13824 {
13825 (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]));
13826 /*% ripper: opassign!(field!($:primary_value, $:call_op, $:tCONSTANT), $:tOP_ASGN, $:rhs) %*/
13827 }
13828#line 13829 "parse.c"
13829 break;
13830
13831 case 242: /* op_asgn_arg_rhs: primary_value "::" "local variable or method" "operator-assignment" lex_ctxt arg_rhs */
13832#line 3075 "parse.y"
13833 {
13834 (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]));
13835 /*% ripper: opassign!(field!($:primary_value, $:tCOLON2, $:tIDENTIFIER), $:tOP_ASGN, $:rhs) %*/
13836 }
13837#line 13838 "parse.c"
13838 break;
13839
13840 case 243: /* op_asgn_arg_rhs: primary_value "::" "constant" "operator-assignment" lex_ctxt arg_rhs */
13841#line 3080 "parse.y"
13842 {
13843 YYLTYPE loc = code_loc_gen(&(yylsp[-5]), &(yylsp[-3]));
13844 (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));
13845 /*% ripper: opassign!(const_path_field!($:primary_value, $:tCONSTANT), $:tOP_ASGN, $:rhs) %*/
13846 }
13847#line 13848 "parse.c"
13848 break;
13849
13850 case 244: /* op_asgn_arg_rhs: ":: at EXPR_BEG" "constant" "operator-assignment" lex_ctxt arg_rhs */
13851#line 3086 "parse.y"
13852 {
13853 YYLTYPE loc = code_loc_gen(&(yylsp[-4]), &(yylsp[-3]));
13854 (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));
13855 /*% ripper: opassign!(top_const_field!($:tCONSTANT), $:tOP_ASGN, $:rhs) %*/
13856 }
13857#line 13858 "parse.c"
13858 break;
13859
13860 case 245: /* op_asgn_arg_rhs: backref "operator-assignment" lex_ctxt arg_rhs */
13861#line 3092 "parse.y"
13862 {
13863 VALUE MAYBE_UNUSED(e) = rb_backref_error(p, (yyvsp[-3].node));
13864 (yyval.node) = NEW_ERROR(&(yyloc));
13865 /*% ripper[error]: assign_error!(?e, opassign!(var_field!($:backref), $:tOP_ASGN, $:rhs)) %*/
13866 }
13867#line 13868 "parse.c"
13868 break;
13869
13870 case 247: /* range_expr_arg: arg ".." arg */
13871#line 3114 "parse.y"
13872 {
13873 value_expr(p, (yyvsp[-2].node));
13874 value_expr(p, (yyvsp[0].node));
13875 (yyval.node) = NEW_DOT2((yyvsp[-2].node), (yyvsp[0].node), &(yyloc), &(yylsp[-1]));
13876 /*% ripper: dot2!($:1, $:3) %*/
13877 }
13878#line 13879 "parse.c"
13879 break;
13880
13881 case 248: /* range_expr_arg: arg "..." arg */
13882#line 3121 "parse.y"
13883 {
13884 value_expr(p, (yyvsp[-2].node));
13885 value_expr(p, (yyvsp[0].node));
13886 (yyval.node) = NEW_DOT3((yyvsp[-2].node), (yyvsp[0].node), &(yyloc), &(yylsp[-1]));
13887 /*% ripper: dot3!($:1, $:3) %*/
13888 }
13889#line 13890 "parse.c"
13890 break;
13891
13892 case 249: /* range_expr_arg: arg ".." */
13893#line 3128 "parse.y"
13894 {
13895 value_expr(p, (yyvsp[-1].node));
13896 (yyval.node) = NEW_DOT2((yyvsp[-1].node), new_nil_at(p, &(yylsp[0]).end_pos), &(yyloc), &(yylsp[0]));
13897 /*% ripper: dot2!($:1, Qnil) %*/
13898 }
13899#line 13900 "parse.c"
13900 break;
13901
13902 case 250: /* range_expr_arg: arg "..." */
13903#line 3134 "parse.y"
13904 {
13905 value_expr(p, (yyvsp[-1].node));
13906 (yyval.node) = NEW_DOT3((yyvsp[-1].node), new_nil_at(p, &(yylsp[0]).end_pos), &(yyloc), &(yylsp[0]));
13907 /*% ripper: dot3!($:1, Qnil) %*/
13908 }
13909#line 13910 "parse.c"
13910 break;
13911
13912 case 251: /* range_expr_arg: "(.." arg */
13913#line 3140 "parse.y"
13914 {
13915 value_expr(p, (yyvsp[0].node));
13916 (yyval.node) = NEW_DOT2(new_nil_at(p, &(yylsp[-1]).beg_pos), (yyvsp[0].node), &(yyloc), &(yylsp[-1]));
13917 /*% ripper: dot2!(Qnil, $:2) %*/
13918 }
13919#line 13920 "parse.c"
13920 break;
13921
13922 case 252: /* range_expr_arg: "(..." arg */
13923#line 3146 "parse.y"
13924 {
13925 value_expr(p, (yyvsp[0].node));
13926 (yyval.node) = NEW_DOT3(new_nil_at(p, &(yylsp[-1]).beg_pos), (yyvsp[0].node), &(yyloc), &(yylsp[-1]));
13927 /*% ripper: dot3!(Qnil, $:2) %*/
13928 }
13929#line 13930 "parse.c"
13930 break;
13931
13932 case 254: /* arg: arg '+' arg */
13933#line 3938 "parse.y"
13934 {
13935 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), '+', (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
13936 /*% ripper: binary!($:1, ID2VAL('\'+\''), $:3) %*/
13937 }
13938#line 13939 "parse.c"
13939 break;
13940
13941 case 255: /* arg: arg '-' arg */
13942#line 3943 "parse.y"
13943 {
13944 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), '-', (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
13945 /*% ripper: binary!($:1, ID2VAL('\'-\''), $:3) %*/
13946 }
13947#line 13948 "parse.c"
13948 break;
13949
13950 case 256: /* arg: arg '*' arg */
13951#line 3948 "parse.y"
13952 {
13953 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), '*', (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
13954 /*% ripper: binary!($:1, ID2VAL('\'*\''), $:3) %*/
13955 }
13956#line 13957 "parse.c"
13957 break;
13958
13959 case 257: /* arg: arg '/' arg */
13960#line 3953 "parse.y"
13961 {
13962 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), '/', (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
13963 /*% ripper: binary!($:1, ID2VAL('\'/\''), $:3) %*/
13964 }
13965#line 13966 "parse.c"
13966 break;
13967
13968 case 258: /* arg: arg '%' arg */
13969#line 3958 "parse.y"
13970 {
13971 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), '%', (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
13972 /*% ripper: binary!($:1, ID2VAL('\'%\''), $:3) %*/
13973 }
13974#line 13975 "parse.c"
13975 break;
13976
13977 case 259: /* arg: arg "**" arg */
13978#line 3963 "parse.y"
13979 {
13980 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), idPow, (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
13981 /*% ripper: binary!($:1, ID2VAL(idPow), $:3) %*/
13982 }
13983#line 13984 "parse.c"
13984 break;
13985
13986 case 260: /* arg: tUMINUS_NUM simple_numeric "**" arg */
13987#line 3968 "parse.y"
13988 {
13989 (yyval.node) = call_uni_op(p, call_bin_op(p, (yyvsp[-2].node), idPow, (yyvsp[0].node), &(yylsp[-2]), &(yyloc)), idUMinus, &(yylsp[-3]), &(yyloc));
13990 /*% ripper: unary!(ID2VAL(idUMinus), binary!($:2, ID2VAL(idPow), $:4)) %*/
13991 }
13992#line 13993 "parse.c"
13993 break;
13994
13995 case 261: /* arg: "unary+" arg */
13996#line 3973 "parse.y"
13997 {
13998 (yyval.node) = call_uni_op(p, (yyvsp[0].node), idUPlus, &(yylsp[-1]), &(yyloc));
13999 /*% ripper: unary!(ID2VAL(idUPlus), $:2) %*/
14000 }
14001#line 14002 "parse.c"
14002 break;
14003
14004 case 262: /* arg: "unary-" arg */
14005#line 3978 "parse.y"
14006 {
14007 (yyval.node) = call_uni_op(p, (yyvsp[0].node), idUMinus, &(yylsp[-1]), &(yyloc));
14008 /*% ripper: unary!(ID2VAL(idUMinus), $:2) %*/
14009 }
14010#line 14011 "parse.c"
14011 break;
14012
14013 case 263: /* arg: arg '|' arg */
14014#line 3983 "parse.y"
14015 {
14016 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), '|', (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
14017 /*% ripper: binary!($:1, ID2VAL('\'|\''), $:3) %*/
14018 }
14019#line 14020 "parse.c"
14020 break;
14021
14022 case 264: /* arg: arg '^' arg */
14023#line 3988 "parse.y"
14024 {
14025 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), '^', (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
14026 /*% ripper: binary!($:1, ID2VAL('\'^\''), $:3) %*/
14027 }
14028#line 14029 "parse.c"
14029 break;
14030
14031 case 265: /* arg: arg '&' arg */
14032#line 3993 "parse.y"
14033 {
14034 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), '&', (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
14035 /*% ripper: binary!($:1, ID2VAL('\'&\''), $:3) %*/
14036 }
14037#line 14038 "parse.c"
14038 break;
14039
14040 case 266: /* arg: arg "<=>" arg */
14041#line 3998 "parse.y"
14042 {
14043 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), idCmp, (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
14044 /*% ripper: binary!($:1, ID2VAL(idCmp), $:3) %*/
14045 }
14046#line 14047 "parse.c"
14047 break;
14048
14049 case 268: /* arg: arg "==" arg */
14050#line 4004 "parse.y"
14051 {
14052 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), idEq, (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
14053 /*% ripper: binary!($:1, ID2VAL(idEq), $:3) %*/
14054 }
14055#line 14056 "parse.c"
14056 break;
14057
14058 case 269: /* arg: arg "===" arg */
14059#line 4009 "parse.y"
14060 {
14061 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), idEqq, (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
14062 /*% ripper: binary!($:1, ID2VAL(idEqq), $:3) %*/
14063 }
14064#line 14065 "parse.c"
14065 break;
14066
14067 case 270: /* arg: arg "!=" arg */
14068#line 4014 "parse.y"
14069 {
14070 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), idNeq, (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
14071 /*% ripper: binary!($:1, ID2VAL(idNeq), $:3) %*/
14072 }
14073#line 14074 "parse.c"
14074 break;
14075
14076 case 271: /* arg: arg "=~" arg */
14077#line 4019 "parse.y"
14078 {
14079 (yyval.node) = match_op(p, (yyvsp[-2].node), (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
14080 /*% ripper: binary!($:1, ID2VAL(idEqTilde), $:3) %*/
14081 }
14082#line 14083 "parse.c"
14083 break;
14084
14085 case 272: /* arg: arg "!~" arg */
14086#line 4024 "parse.y"
14087 {
14088 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), idNeqTilde, (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
14089 /*% ripper: binary!($:1, ID2VAL(idNeqTilde), $:3) %*/
14090 }
14091#line 14092 "parse.c"
14092 break;
14093
14094 case 273: /* arg: '!' arg */
14095#line 4029 "parse.y"
14096 {
14097 (yyval.node) = call_uni_op(p, method_cond(p, (yyvsp[0].node), &(yylsp[0])), '!', &(yylsp[-1]), &(yyloc));
14098 /*% ripper: unary!(ID2VAL('\'!\''), $:2) %*/
14099 }
14100#line 14101 "parse.c"
14101 break;
14102
14103 case 274: /* arg: '~' arg */
14104#line 4034 "parse.y"
14105 {
14106 (yyval.node) = call_uni_op(p, (yyvsp[0].node), '~', &(yylsp[-1]), &(yyloc));
14107 /*% ripper: unary!(ID2VAL('\'~\''), $:2) %*/
14108 }
14109#line 14110 "parse.c"
14110 break;
14111
14112 case 275: /* arg: arg "<<" arg */
14113#line 4039 "parse.y"
14114 {
14115 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), idLTLT, (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
14116 /*% ripper: binary!($:1, ID2VAL(idLTLT), $:3) %*/
14117 }
14118#line 14119 "parse.c"
14119 break;
14120
14121 case 276: /* arg: arg ">>" arg */
14122#line 4044 "parse.y"
14123 {
14124 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), idGTGT, (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
14125 /*% ripper: binary!($:1, ID2VAL(idGTGT), $:3) %*/
14126 }
14127#line 14128 "parse.c"
14128 break;
14129
14130 case 277: /* arg: arg "&&" arg */
14131#line 4049 "parse.y"
14132 {
14133 (yyval.node) = logop(p, idANDOP, (yyvsp[-2].node), (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
14134 /*% ripper: binary!($:1, ID2VAL(idANDOP), $:3) %*/
14135 }
14136#line 14137 "parse.c"
14137 break;
14138
14139 case 278: /* arg: arg "||" arg */
14140#line 4054 "parse.y"
14141 {
14142 (yyval.node) = logop(p, idOROP, (yyvsp[-2].node), (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
14143 /*% ripper: binary!($:1, ID2VAL(idOROP), $:3) %*/
14144 }
14145#line 14146 "parse.c"
14146 break;
14147
14148 case 279: /* arg: "'defined?'" option_'\n' begin_defined arg */
14149#line 4059 "parse.y"
14150 {
14151 p->ctxt.in_defined = (yyvsp[-1].ctxt).in_defined;
14152 (yyval.node) = new_defined(p, (yyvsp[0].node), &(yyloc), &(yylsp[-3]));
14153 p->ctxt.has_trailing_semicolon = (yyvsp[-1].ctxt).has_trailing_semicolon;
14154 /*% ripper: defined!($:4) %*/
14155 }
14156#line 14157 "parse.c"
14157 break;
14158
14159 case 280: /* def_endless_method_endless_arg: defn_head f_opt_paren_args '=' endless_arg */
14160#line 2960 "parse.y"
14161 {
14162 endless_method_name(p, (yyvsp[-3].node_def_temp)->nd_mid, &(yylsp[-3]));
14163 restore_defun(p, (yyvsp[-3].node_def_temp));
14164 ((yyval.node) = (yyvsp[-3].node_def_temp)->nd_def)->nd_loc = (yyloc);
14165 (yyvsp[0].node) = new_scope_body(p, (yyvsp[-2].node_args), (yyvsp[0].node), (yyval.node), &(yyloc));
14166 RNODE_DEFN((yyval.node))->nd_defn = (yyvsp[0].node);
14167 /*% ripper: bodystmt!($:bodystmt, Qnil, Qnil, Qnil) %*/
14168 /*% ripper: def!($:head, $:args, $:$) %*/
14169 local_pop(p);
14170 }
14171#line 14172 "parse.c"
14172 break;
14173
14174 case 281: /* def_endless_method_endless_arg: defs_head f_opt_paren_args '=' endless_arg */
14175#line 2971 "parse.y"
14176 {
14177 endless_method_name(p, (yyvsp[-3].node_def_temp)->nd_mid, &(yylsp[-3]));
14178 restore_defun(p, (yyvsp[-3].node_def_temp));
14179 ((yyval.node) = (yyvsp[-3].node_def_temp)->nd_def)->nd_loc = (yyloc);
14180 (yyvsp[0].node) = new_scope_body(p, (yyvsp[-2].node_args), (yyvsp[0].node), (yyval.node), &(yyloc));
14181 RNODE_DEFS((yyval.node))->nd_defn = (yyvsp[0].node);
14182 /*% ripper: bodystmt!($:bodystmt, Qnil, Qnil, Qnil) %*/
14183 /*% ripper: defs!(*$:head[0..2], $:args, $:$) %*/
14184 local_pop(p);
14185 }
14186#line 14187 "parse.c"
14187 break;
14188
14189 case 285: /* ternary: arg '?' arg option_'\n' ':' arg */
14190#line 4071 "parse.y"
14191 {
14192 value_expr(p, (yyvsp[-5].node));
14193 (yyval.node) = new_if(p, (yyvsp[-5].node), (yyvsp[-3].node), (yyvsp[0].node), &(yyloc), &NULL_LOC, &(yylsp[-1]), &NULL_LOC);
14194 fixpos((yyval.node), (yyvsp[-5].node));
14195 /*% ripper: ifop!($:1, $:3, $:6) %*/
14196 }
14197#line 14198 "parse.c"
14198 break;
14199
14200 case 287: /* endless_arg: endless_arg "'rescue' modifier" after_rescue arg */
14201#line 4081 "parse.y"
14202 {
14203 p->ctxt.in_rescue = (yyvsp[-1].ctxt).in_rescue;
14204 (yyval.node) = rescued_expr(p, (yyvsp[-3].node), (yyvsp[0].node), &(yylsp[-3]), &(yylsp[-2]), &(yylsp[0]));
14205 /*% ripper: rescue_mod!($:1, $:4) %*/
14206 }
14207#line 14208 "parse.c"
14208 break;
14209
14210 case 288: /* endless_arg: "'not'" option_'\n' endless_arg */
14211#line 4087 "parse.y"
14212 {
14213 (yyval.node) = call_uni_op(p, method_cond(p, (yyvsp[0].node), &(yylsp[0])), METHOD_NOT, &(yylsp[-2]), &(yyloc));
14214 /*% ripper: unary!(ID2VAL(idNOT), $:3) %*/
14215 }
14216#line 14217 "parse.c"
14217 break;
14218
14219 case 289: /* relop: '>' */
14220#line 4093 "parse.y"
14221 {(yyval.id) = '>';}
14222#line 14223 "parse.c"
14223 break;
14224
14225 case 290: /* relop: '<' */
14226#line 4094 "parse.y"
14227 {(yyval.id) = '<';}
14228#line 14229 "parse.c"
14229 break;
14230
14231 case 291: /* relop: ">=" */
14232#line 4095 "parse.y"
14233 {(yyval.id) = idGE;}
14234#line 14235 "parse.c"
14235 break;
14236
14237 case 292: /* relop: "<=" */
14238#line 4096 "parse.y"
14239 {(yyval.id) = idLE;}
14240#line 14241 "parse.c"
14241 break;
14242
14243 case 293: /* rel_expr: arg relop arg */
14244#line 4100 "parse.y"
14245 {
14246 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), (yyvsp[-1].id), (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
14247 /*% ripper: binary!($:1, ID2VAL($2), $:3) %*/
14248 }
14249#line 14250 "parse.c"
14250 break;
14251
14252 case 294: /* rel_expr: rel_expr relop arg */
14253#line 4105 "parse.y"
14254 {
14255 rb_warning1("comparison '%s' after comparison", WARN_ID((yyvsp[-1].id)));
14256 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), (yyvsp[-1].id), (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
14257 /*% ripper: binary!($:1, ID2VAL($2), $:3) %*/
14258 }
14259#line 14260 "parse.c"
14260 break;
14261
14262 case 295: /* lex_ctxt: none */
14263#line 4113 "parse.y"
14264 {
14265 (yyval.ctxt) = p->ctxt;
14266 }
14267#line 14268 "parse.c"
14268 break;
14269
14270 case 296: /* begin_defined: lex_ctxt */
14271#line 4119 "parse.y"
14272 {
14273 p->ctxt.in_defined = 1;
14274 (yyval.ctxt) = (yyvsp[0].ctxt);
14275 }
14276#line 14277 "parse.c"
14277 break;
14278
14279 case 297: /* after_rescue: lex_ctxt */
14280#line 4126 "parse.y"
14281 {
14282 p->ctxt.in_rescue = after_rescue;
14283 (yyval.ctxt) = (yyvsp[0].ctxt);
14284 }
14285#line 14286 "parse.c"
14286 break;
14287
14288 case 298: /* value_expr_arg: arg */
14289#line 3155 "parse.y"
14290 {
14291 value_expr(p, (yyvsp[0].node));
14292 (yyval.node) = (yyvsp[0].node);
14293 }
14294#line 14295 "parse.c"
14295 break;
14296
14297 case 302: /* aref_args: args ',' assocs trailer */
14298#line 4138 "parse.y"
14299 {
14300 (yyval.node) = (yyvsp[-1].node) ? arg_append(p, (yyvsp[-3].node), new_hash(p, (yyvsp[-1].node), &(yylsp[-1])), &(yyloc)) : (yyvsp[-3].node);
14301 /*% ripper: args_add!($:1, bare_assoc_hash!($:3)) %*/
14302 }
14303#line 14304 "parse.c"
14304 break;
14305
14306 case 303: /* aref_args: assocs trailer */
14307#line 4143 "parse.y"
14308 {
14309 (yyval.node) = (yyvsp[-1].node) ? NEW_LIST(new_hash(p, (yyvsp[-1].node), &(yylsp[-1])), &(yyloc)) : 0;
14310 /*% ripper: args_add!(args_new!, bare_assoc_hash!($:1)) %*/
14311 }
14312#line 14313 "parse.c"
14313 break;
14314
14315 case 304: /* arg_rhs: arg */
14316#line 4150 "parse.y"
14317 {
14318 value_expr(p, (yyvsp[0].node));
14319 (yyval.node) = (yyvsp[0].node);
14320 }
14321#line 14322 "parse.c"
14322 break;
14323
14324 case 305: /* arg_rhs: arg "'rescue' modifier" after_rescue arg */
14325#line 4155 "parse.y"
14326 {
14327 p->ctxt.in_rescue = (yyvsp[-1].ctxt).in_rescue;
14328 value_expr(p, (yyvsp[-3].node));
14329 (yyval.node) = rescued_expr(p, (yyvsp[-3].node), (yyvsp[0].node), &(yylsp[-3]), &(yylsp[-2]), &(yylsp[0]));
14330 /*% ripper: rescue_mod!($:1, $:4) %*/
14331 }
14332#line 14333 "parse.c"
14333 break;
14334
14335 case 306: /* paren_args: '(' opt_call_args rparen */
14336#line 4164 "parse.y"
14337 {
14338 (yyval.node) = (yyvsp[-1].node);
14339 /*% ripper: arg_paren!($:2) %*/
14340 }
14341#line 14342 "parse.c"
14342 break;
14343
14344 case 307: /* paren_args: '(' args ',' args_forward rparen */
14345#line 4169 "parse.y"
14346 {
14347 if (!check_forwarding_args(p)) {
14348 (yyval.node) = 0;
14349 }
14350 else {
14351 (yyval.node) = new_args_forward_call(p, (yyvsp[-3].node), &(yylsp[-1]), &(yyloc));
14352 /*% ripper: arg_paren!(args_add!($:2, $:4)) %*/
14353 }
14354 }
14355#line 14356 "parse.c"
14356 break;
14357
14358 case 308: /* paren_args: '(' args_forward rparen */
14359#line 4179 "parse.y"
14360 {
14361 if (!check_forwarding_args(p)) {
14362 (yyval.node) = 0;
14363 }
14364 else {
14365 (yyval.node) = new_args_forward_call(p, 0, &(yylsp[-1]), &(yyloc));
14366 /*% ripper: arg_paren!($:2) %*/
14367 }
14368 }
14369#line 14370 "parse.c"
14370 break;
14371
14372 case 310: /* opt_paren_args: paren_args */
14373#line 4192 "parse.y"
14374 {
14375 (yyval.node) = (yyvsp[0].node) ? (yyvsp[0].node) : NODE_SPECIAL_EMPTY_ARGS;
14376 }
14377#line 14378 "parse.c"
14378 break;
14379
14380 case 314: /* opt_call_args: args ',' assocs ',' */
14381#line 4201 "parse.y"
14382 {
14383 (yyval.node) = (yyvsp[-1].node) ? arg_append(p, (yyvsp[-3].node), new_hash(p, (yyvsp[-1].node), &(yylsp[-1])), &(yyloc)) : (yyvsp[-3].node);
14384 /*% ripper: args_add!($:1, bare_assoc_hash!($:3)) %*/
14385 }
14386#line 14387 "parse.c"
14387 break;
14388
14389 case 315: /* opt_call_args: assocs ',' */
14390#line 4206 "parse.y"
14391 {
14392 (yyval.node) = (yyvsp[-1].node) ? NEW_LIST(new_hash(p, (yyvsp[-1].node), &(yylsp[-1])), &(yylsp[-1])) : 0;
14393 /*% ripper: args_add!(args_new!, bare_assoc_hash!($:1)) %*/
14394 }
14395#line 14396 "parse.c"
14396 break;
14397
14398 case 316: /* value_expr_command: command */
14399#line 3155 "parse.y"
14400 {
14401 value_expr(p, (yyvsp[0].node));
14402 (yyval.node) = (yyvsp[0].node);
14403 }
14404#line 14405 "parse.c"
14405 break;
14406
14407 case 317: /* call_args: value_expr_command */
14408#line 4213 "parse.y"
14409 {
14410 (yyval.node) = NEW_LIST((yyvsp[0].node), &(yyloc));
14411 /*% ripper: args_add!(args_new!, $:1) %*/
14412 }
14413#line 14414 "parse.c"
14414 break;
14415
14416 case 318: /* call_args: def_endless_method_endless_command */
14417#line 4218 "parse.y"
14418 {
14419 (yyval.node) = NEW_LIST((yyvsp[0].node), &(yyloc));
14420 /*% ripper: args_add!(args_new!, $:1) %*/
14421 }
14422#line 14423 "parse.c"
14423 break;
14424
14425 case 319: /* call_args: args opt_block_arg */
14426#line 4223 "parse.y"
14427 {
14428 (yyval.node) = arg_blk_pass((yyvsp[-1].node), (yyvsp[0].node_block_pass));
14429 /*% ripper: args_add_block!($:1, $:2) %*/
14430 }
14431#line 14432 "parse.c"
14432 break;
14433
14434 case 320: /* call_args: assocs opt_block_arg */
14435#line 4228 "parse.y"
14436 {
14437 (yyval.node) = (yyvsp[-1].node) ? NEW_LIST(new_hash(p, (yyvsp[-1].node), &(yylsp[-1])), &(yylsp[-1])) : 0;
14438 (yyval.node) = arg_blk_pass((yyval.node), (yyvsp[0].node_block_pass));
14439 /*% ripper: args_add_block!(args_add!(args_new!, bare_assoc_hash!($:1)), $:2) %*/
14440 }
14441#line 14442 "parse.c"
14442 break;
14443
14444 case 321: /* call_args: args ',' assocs opt_block_arg */
14445#line 4234 "parse.y"
14446 {
14447 (yyval.node) = (yyvsp[-1].node) ? arg_append(p, (yyvsp[-3].node), new_hash(p, (yyvsp[-1].node), &(yylsp[-1])), &(yyloc)) : (yyvsp[-3].node);
14448 (yyval.node) = arg_blk_pass((yyval.node), (yyvsp[0].node_block_pass));
14449 /*% ripper: args_add_block!(args_add!($:1, bare_assoc_hash!($:3)), $:4) %*/
14450 }
14451#line 14452 "parse.c"
14452 break;
14453
14454 case 323: /* $@13: %empty */
14455#line 4243 "parse.y"
14456 {
14457 /* If call_args starts with a open paren '(' or '[',
14458 * look-ahead reading of the letters calls CMDARG_PUSH(0),
14459 * but the push must be done after CMDARG_PUSH(1).
14460 * So this code makes them consistent by first cancelling
14461 * the premature CMDARG_PUSH(0), doing CMDARG_PUSH(1),
14462 * and finally redoing CMDARG_PUSH(0).
14463 */
14464 int lookahead = 0;
14465 switch (yychar) {
14466 case '(': case tLPAREN: case tLPAREN_ARG: case '[': case tLBRACK:
14467 lookahead = 1;
14468 }
14469 if (lookahead) CMDARG_POP();
14470 CMDARG_PUSH(1);
14471 if (lookahead) CMDARG_PUSH(0);
14472 }
14473#line 14474 "parse.c"
14474 break;
14475
14476 case 324: /* command_args: $@13 call_args */
14477#line 4261 "parse.y"
14478 {
14479 /* call_args can be followed by tLBRACE_ARG (that does CMDARG_PUSH(0) in the lexer)
14480 * but the push must be done after CMDARG_POP() in the parser.
14481 * So this code does CMDARG_POP() to pop 0 pushed by tLBRACE_ARG,
14482 * CMDARG_POP() to pop 1 pushed by command_args,
14483 * and CMDARG_PUSH(0) to restore back the flag set by tLBRACE_ARG.
14484 */
14485 int lookahead = 0;
14486 switch (yychar) {
14487 case tLBRACE_ARG:
14488 lookahead = 1;
14489 }
14490 if (lookahead) CMDARG_POP();
14491 CMDARG_POP();
14492 if (lookahead) CMDARG_PUSH(0);
14493 (yyval.node) = (yyvsp[0].node);
14494 /*% ripper: $:2 %*/
14495 }
14496#line 14497 "parse.c"
14497 break;
14498
14499 case 325: /* block_arg: "&" arg_value */
14500#line 4282 "parse.y"
14501 {
14502 (yyval.node_block_pass) = NEW_BLOCK_PASS((yyvsp[0].node), &(yyloc), &(yylsp[-1]));
14503 /*% ripper: $:2 %*/
14504 }
14505#line 14506 "parse.c"
14506 break;
14507
14508 case 326: /* block_arg: "&" */
14509#line 4287 "parse.y"
14510 {
14511 forwarding_arg_check(p, idFWD_BLOCK, idFWD_ALL, "block");
14512 (yyval.node_block_pass) = NEW_BLOCK_PASS(NEW_LVAR(idFWD_BLOCK, &(yylsp[0])), &(yyloc), &(yylsp[0]));
14513 /*% ripper: Qnil %*/
14514 }
14515#line 14516 "parse.c"
14516 break;
14517
14518 case 327: /* opt_block_arg: ',' block_arg */
14519#line 4295 "parse.y"
14520 {
14521 (yyval.node_block_pass) = (yyvsp[0].node_block_pass);
14522 /*% ripper: $:2 %*/
14523 }
14524#line 14525 "parse.c"
14525 break;
14526
14527 case 328: /* opt_block_arg: none */
14528#line 4300 "parse.y"
14529 {
14530 (yyval.node_block_pass) = 0;
14531 /*% ripper: Qfalse %*/
14532 }
14533#line 14534 "parse.c"
14534 break;
14535
14536 case 329: /* args: arg_value */
14537#line 4308 "parse.y"
14538 {
14539 (yyval.node) = NEW_LIST((yyvsp[0].node), &(yyloc));
14540 /*% ripper: args_add!(args_new!, $:arg_value) %*/
14541 }
14542#line 14543 "parse.c"
14543 break;
14544
14545 case 330: /* args: arg_splat */
14546#line 4313 "parse.y"
14547 {
14548 (yyval.node) = (yyvsp[0].node);
14549 /*% ripper: args_add_star!(args_new!, $:arg_splat) %*/
14550 }
14551#line 14552 "parse.c"
14552 break;
14553
14554 case 331: /* args: args ',' arg_value */
14555#line 4318 "parse.y"
14556 {
14557 (yyval.node) = last_arg_append(p, (yyvsp[-2].node), (yyvsp[0].node), &(yyloc));
14558 /*% ripper: args_add!($:non_last_args, $:arg_value) %*/
14559 }
14560#line 14561 "parse.c"
14561 break;
14562
14563 case 332: /* args: args ',' arg_splat */
14564#line 4323 "parse.y"
14565 {
14566 (yyval.node) = rest_arg_append(p, (yyvsp[-2].node), RNODE_SPLAT((yyvsp[0].node))->nd_head, &(yyloc));
14567 /*% ripper: args_add_star!($:non_last_args, $:arg_splat) %*/
14568 }
14569#line 14570 "parse.c"
14570 break;
14571
14572 case 333: /* arg_splat: "*" arg_value */
14573#line 4331 "parse.y"
14574 {
14575 (yyval.node) = NEW_SPLAT((yyvsp[0].node), &(yyloc), &(yylsp[-1]));
14576 /*% ripper: $:arg_value %*/
14577 }
14578#line 14579 "parse.c"
14579 break;
14580
14581 case 334: /* arg_splat: "*" */
14582#line 4336 "parse.y"
14583 {
14584 forwarding_arg_check(p, idFWD_REST, idFWD_ALL, "rest");
14585 (yyval.node) = NEW_SPLAT(NEW_LVAR(idFWD_REST, &(yylsp[0])), &(yyloc), &(yylsp[0]));
14586 /*% ripper: Qnil %*/
14587 }
14588#line 14589 "parse.c"
14589 break;
14590
14591 case 337: /* mrhs: args ',' arg_value */
14592#line 4350 "parse.y"
14593 {
14594 (yyval.node) = last_arg_append(p, (yyvsp[-2].node), (yyvsp[0].node), &(yyloc));
14595 /*% ripper: mrhs_add!(mrhs_new_from_args!($:args), $:arg_value) %*/
14596 }
14597#line 14598 "parse.c"
14598 break;
14599
14600 case 338: /* mrhs: args ',' "*" arg_value */
14601#line 4355 "parse.y"
14602 {
14603 (yyval.node) = rest_arg_append(p, (yyvsp[-3].node), (yyvsp[0].node), &(yyloc));
14604 /*% ripper: mrhs_add_star!(mrhs_new_from_args!($:args), $:arg_value) %*/
14605 }
14606#line 14607 "parse.c"
14607 break;
14608
14609 case 339: /* mrhs: "*" arg_value */
14610#line 4360 "parse.y"
14611 {
14612 (yyval.node) = NEW_SPLAT((yyvsp[0].node), &(yyloc), &(yylsp[-1]));
14613 /*% ripper: mrhs_add_star!(mrhs_new!, $:arg_value) %*/
14614 }
14615#line 14616 "parse.c"
14616 break;
14617
14618 case 350: /* primary: "method" */
14619#line 4381 "parse.y"
14620 {
14621 (yyval.node) = (NODE *)NEW_FCALL((yyvsp[0].id), 0, &(yyloc));
14622 /*% ripper: method_add_arg!(fcall!($:fid), args_new!) %*/
14623 }
14624#line 14625 "parse.c"
14625 break;
14626
14627 case 351: /* $@14: %empty */
14628#line 4386 "parse.y"
14629 {
14630 CMDARG_PUSH(0);
14631 }
14632#line 14633 "parse.c"
14633 break;
14634
14635 case 352: /* primary: k_begin $@14 bodystmt k_end */
14636#line 4391 "parse.y"
14637 {
14638 CMDARG_POP();
14639 set_line_body((yyvsp[-1].node), (yylsp[-3]).end_pos.lineno);
14640 (yyval.node) = NEW_BEGIN((yyvsp[-1].node), &(yyloc));
14641 nd_set_line((yyval.node), (yylsp[-3]).end_pos.lineno);
14642 /*% ripper: begin!($:body) %*/
14643 }
14644#line 14645 "parse.c"
14645 break;
14646
14647 case 353: /* $@15: %empty */
14648#line 4398 "parse.y"
14649 {SET_LEX_STATE(EXPR_ENDARG);}
14650#line 14651 "parse.c"
14651 break;
14652
14653 case 354: /* primary: "( arg" compstmt_stmts $@15 ')' */
14654#line 4399 "parse.y"
14655 {
14656 if (nd_type_p((yyvsp[-2].node), NODE_SELF)) RNODE_SELF((yyvsp[-2].node))->nd_state = 0;
14657 (yyval.node) = (yyvsp[-2].node);
14658 /*% ripper: paren!($:body) %*/
14659 }
14660#line 14661 "parse.c"
14661 break;
14662
14663 case 355: /* primary: "(" compstmt_stmts ')' */
14664#line 4405 "parse.y"
14665 {
14666 if (nd_type_p((yyvsp[-1].node), NODE_SELF)) RNODE_SELF((yyvsp[-1].node))->nd_state = 0;
14667 (yyval.node) = NEW_BLOCK((yyvsp[-1].node), &(yyloc));
14668 /*% ripper: paren!($:body) %*/
14669 }
14670#line 14671 "parse.c"
14671 break;
14672
14673 case 356: /* primary: primary_value "::" "constant" */
14674#line 4411 "parse.y"
14675 {
14676 (yyval.node) = NEW_COLON2((yyvsp[-2].node), (yyvsp[0].id), &(yyloc), &(yylsp[-1]), &(yylsp[0]));
14677 /*% ripper: const_path_ref!($:recv, $:name) %*/
14678 }
14679#line 14680 "parse.c"
14680 break;
14681
14682 case 357: /* primary: ":: at EXPR_BEG" "constant" */
14683#line 4416 "parse.y"
14684 {
14685 (yyval.node) = NEW_COLON3((yyvsp[0].id), &(yyloc), &(yylsp[-1]), &(yylsp[0]));
14686 /*% ripper: top_const_ref!($:name) %*/
14687 }
14688#line 14689 "parse.c"
14689 break;
14690
14691 case 358: /* primary: "[" aref_args ']' */
14692#line 4421 "parse.y"
14693 {
14694 (yyval.node) = make_list((yyvsp[-1].node), &(yyloc));
14695 /*% ripper: array!($:args) %*/
14696 }
14697#line 14698 "parse.c"
14698 break;
14699
14700 case 359: /* primary: "{" assoc_list '}' */
14701#line 4426 "parse.y"
14702 {
14703 (yyval.node) = new_hash(p, (yyvsp[-1].node), &(yyloc));
14704 RNODE_HASH((yyval.node))->nd_brace = TRUE;
14705 /*% ripper: hash!($:list) %*/
14706 }
14707#line 14708 "parse.c"
14708 break;
14709
14710 case 360: /* primary: k_return */
14711#line 4432 "parse.y"
14712 {
14713 (yyval.node) = NEW_RETURN(0, &(yyloc), &(yylsp[0]));
14714 /*% ripper: return0! %*/
14715 }
14716#line 14717 "parse.c"
14717 break;
14718
14719 case 361: /* primary: k_yield '(' call_args rparen */
14720#line 4437 "parse.y"
14721 {
14722 (yyval.node) = NEW_YIELD((yyvsp[-1].node), &(yyloc), &(yylsp[-3]), &(yylsp[-2]), &(yylsp[0]));
14723 /*% ripper: yield!(paren!($:args)) %*/
14724 }
14725#line 14726 "parse.c"
14726 break;
14727
14728 case 362: /* primary: k_yield '(' rparen */
14729#line 4442 "parse.y"
14730 {
14731 (yyval.node) = NEW_YIELD(0, &(yyloc), &(yylsp[-2]), &(yylsp[-1]), &(yylsp[0]));
14732 /*% ripper: yield!(paren!(args_new!)) %*/
14733 }
14734#line 14735 "parse.c"
14735 break;
14736
14737 case 363: /* primary: k_yield */
14738#line 4447 "parse.y"
14739 {
14740 (yyval.node) = NEW_YIELD(0, &(yyloc), &(yylsp[0]), &NULL_LOC, &NULL_LOC);
14741 /*% ripper: yield0! %*/
14742 }
14743#line 14744 "parse.c"
14744 break;
14745
14746 case 364: /* primary: "'defined?'" option_'\n' '(' begin_defined expr rparen */
14747#line 4452 "parse.y"
14748 {
14749 p->ctxt.in_defined = (yyvsp[-2].ctxt).in_defined;
14750 (yyval.node) = new_defined(p, (yyvsp[-1].node), &(yyloc), &(yylsp[-5]));
14751 p->ctxt.has_trailing_semicolon = (yyvsp[-2].ctxt).has_trailing_semicolon;
14752 /*% ripper: defined!($:arg) %*/
14753 }
14754#line 14755 "parse.c"
14755 break;
14756
14757 case 365: /* primary: "'not'" '(' expr rparen */
14758#line 4459 "parse.y"
14759 {
14760 (yyval.node) = call_uni_op(p, method_cond(p, (yyvsp[-1].node), &(yylsp[-1])), METHOD_NOT, &(yylsp[-3]), &(yyloc));
14761 /*% ripper: unary!(ID2VAL(idNOT), $:arg) %*/
14762 }
14763#line 14764 "parse.c"
14764 break;
14765
14766 case 366: /* primary: "'not'" '(' rparen */
14767#line 4464 "parse.y"
14768 {
14769 (yyval.node) = call_uni_op(p, method_cond(p, NEW_NIL(&(yylsp[-1])), &(yylsp[-1])), METHOD_NOT, &(yylsp[-2]), &(yyloc));
14770 /*% ripper: unary!(ID2VAL(idNOT), Qnil) %*/
14771 }
14772#line 14773 "parse.c"
14773 break;
14774
14775 case 367: /* primary: fcall brace_block */
14776#line 4469 "parse.y"
14777 {
14778 (yyval.node) = method_add_block(p, (NODE *)(yyvsp[-1].node_fcall), (yyvsp[0].node), &(yyloc));
14779 /*% ripper: method_add_block!(method_add_arg!(fcall!($:call), args_new!), $:block) %*/
14780 }
14781#line 14782 "parse.c"
14782 break;
14783
14784 case 369: /* primary: method_call brace_block */
14785#line 4475 "parse.y"
14786 {
14787 block_dup_check(p, get_nd_args(p, (yyvsp[-1].node)), (yyvsp[0].node));
14788 (yyval.node) = method_add_block(p, (yyvsp[-1].node), (yyvsp[0].node), &(yyloc));
14789 /*% ripper: method_add_block!($:call, $:block) %*/
14790 }
14791#line 14792 "parse.c"
14792 break;
14793
14794 case 371: /* primary: k_if expr_value then compstmt_stmts if_tail k_end */
14795#line 4485 "parse.y"
14796 {
14797 if ((yyvsp[-1].node) && nd_type_p((yyvsp[-1].node), NODE_IF))
14798 RNODE_IF((yyvsp[-1].node))->end_keyword_loc = (yylsp[0]);
14799
14800 (yyval.node) = new_if(p, (yyvsp[-4].node), (yyvsp[-2].node), (yyvsp[-1].node), &(yyloc), &(yylsp[-5]), &(yylsp[-3]), &(yylsp[0]));
14801 fixpos((yyval.node), (yyvsp[-4].node));
14802 /*% ripper: if!($:cond, $:body, $:tail) %*/
14803 }
14804#line 14805 "parse.c"
14805 break;
14806
14807 case 372: /* primary: k_unless expr_value then compstmt_stmts opt_else k_end */
14808#line 4497 "parse.y"
14809 {
14810 (yyval.node) = new_unless(p, (yyvsp[-4].node), (yyvsp[-2].node), (yyvsp[-1].node), &(yyloc), &(yylsp[-5]), &(yylsp[-3]), &(yylsp[0]));
14811 fixpos((yyval.node), (yyvsp[-4].node));
14812 /*% ripper: unless!($:cond, $:body, $:tail) %*/
14813 }
14814#line 14815 "parse.c"
14815 break;
14816
14817 case 373: /* primary: k_while expr_value_do compstmt_stmts k_end */
14818#line 4505 "parse.y"
14819 {
14820 restore_block_exit(p, (yyvsp[-3].node_exits));
14821 (yyval.node) = NEW_WHILE(cond(p, (yyvsp[-2].node), &(yylsp[-2])), (yyvsp[-1].node), 1, &(yyloc), &(yylsp[-3]), &(yylsp[0]));
14822 fixpos((yyval.node), (yyvsp[-2].node));
14823 /*% ripper: while!($:cond, $:body) %*/
14824 }
14825#line 14826 "parse.c"
14826 break;
14827
14828 case 374: /* primary: k_until expr_value_do compstmt_stmts k_end */
14829#line 4514 "parse.y"
14830 {
14831 restore_block_exit(p, (yyvsp[-3].node_exits));
14832 (yyval.node) = NEW_UNTIL(cond(p, (yyvsp[-2].node), &(yylsp[-2])), (yyvsp[-1].node), 1, &(yyloc), &(yylsp[-3]), &(yylsp[0]));
14833 fixpos((yyval.node), (yyvsp[-2].node));
14834 /*% ripper: until!($:cond, $:body) %*/
14835 }
14836#line 14837 "parse.c"
14837 break;
14838
14839 case 375: /* @16: %empty */
14840#line 4521 "parse.y"
14841 {
14842 (yyval.labels) = p->case_labels;
14843 p->case_labels = CHECK_LITERAL_WHEN;
14844 }
14845#line 14846 "parse.c"
14846 break;
14847
14848 case 376: /* primary: k_case expr_value option_terms @16 case_body k_end */
14849#line 4527 "parse.y"
14850 {
14851 if (CASE_LABELS_ENABLED_P(p->case_labels)) st_free_table(p->case_labels);
14852 p->case_labels = (yyvsp[-2].labels);
14853 (yyval.node) = NEW_CASE((yyvsp[-4].node), (yyvsp[-1].node), &(yyloc), &(yylsp[-5]), &(yylsp[0]));
14854 fixpos((yyval.node), (yyvsp[-4].node));
14855 /*% ripper: case!($:expr, $:body) %*/
14856 }
14857#line 14858 "parse.c"
14858 break;
14859
14860 case 377: /* @17: %empty */
14861#line 4535 "parse.y"
14862 {
14863 (yyval.labels) = p->case_labels;
14864 p->case_labels = 0;
14865 }
14866#line 14867 "parse.c"
14867 break;
14868
14869 case 378: /* primary: k_case option_terms @17 case_body k_end */
14870#line 4541 "parse.y"
14871 {
14872 if (p->case_labels) st_free_table(p->case_labels);
14873 p->case_labels = (yyvsp[-2].labels);
14874 (yyval.node) = NEW_CASE2((yyvsp[-1].node), &(yyloc), &(yylsp[-4]), &(yylsp[0]));
14875 /*% ripper: case!(Qnil, $:body) %*/
14876 }
14877#line 14878 "parse.c"
14878 break;
14879
14880 case 379: /* primary: k_case expr_value option_terms p_case_body k_end */
14881#line 4550 "parse.y"
14882 {
14883 (yyval.node) = NEW_CASE3((yyvsp[-3].node), (yyvsp[-1].node), &(yyloc), &(yylsp[-4]), &(yylsp[0]));
14884 /*% ripper: case!($:expr, $:body) %*/
14885 }
14886#line 14887 "parse.c"
14887 break;
14888
14889 case 380: /* $@18: %empty */
14890#line 4555 "parse.y"
14891 {COND_PUSH(1);}
14892#line 14893 "parse.c"
14893 break;
14894
14895 case 381: /* $@19: %empty */
14896#line 4555 "parse.y"
14897 {COND_POP();}
14898#line 14899 "parse.c"
14899 break;
14900
14901 case 382: /* primary: k_for for_var "'in'" $@18 expr_value do $@19 compstmt_stmts k_end */
14902#line 4558 "parse.y"
14903 {
14904 restore_block_exit(p, (yyvsp[-8].node_exits));
14905 /*
14906 * for a, b, c in e
14907 * #=>
14908 * e.each{|*x| a, b, c = x}
14909 *
14910 * for a in e
14911 * #=>
14912 * e.each{|x| a, = x}
14913 */
14914 ID id = internal_id(p);
14915 rb_node_args_aux_t *m = NEW_ARGS_AUX(0, 0, &NULL_LOC);
14916 rb_node_args_t *args;
14917 NODE *scope, *internal_var = NEW_DVAR(id, &(yylsp[-7]));
14918 rb_ast_id_table_t *tbl = rb_ast_new_local_table(p->ast, 1);
14919 tbl->ids[0] = id; /* internal id */
14920
14921 switch (nd_type((yyvsp[-7].node))) {
14922 case NODE_LASGN:
14923 case NODE_DASGN: /* e.each {|internal_var| a = internal_var; ... } */
14924 set_nd_value(p, (yyvsp[-7].node), internal_var);
14925 id = 0;
14926 m->nd_plen = 1;
14927 m->nd_next = (yyvsp[-7].node);
14928 break;
14929 case NODE_MASGN: /* e.each {|*internal_var| a, b, c = (internal_var.length == 1 && Array === (tmp = internal_var[0]) ? tmp : internal_var); ... } */
14930 m->nd_next = node_assign(p, (yyvsp[-7].node), NEW_FOR_MASGN(internal_var, &(yylsp[-7])), NO_LEX_CTXT, &(yylsp[-7]));
14931 break;
14932 default: /* e.each {|*internal_var| @a, B, c[1], d.attr = internal_val; ... } */
14933 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]));
14934 }
14935 /* {|*internal_id| <m> = internal_id; ... } */
14936 args = new_args(p, m, 0, id, 0, new_empty_args_tail(p, &(yylsp[-7])), &(yylsp[-7]));
14937 scope = NEW_SCOPE2(tbl, args, (yyvsp[-1].node), NULL, &(yyloc));
14938 YYLTYPE do_keyword_loc = (yyvsp[-3].id) == keyword_do_cond ? (yylsp[-3]) : NULL_LOC;
14939 (yyval.node) = NEW_FOR((yyvsp[-4].node), scope, &(yyloc), &(yylsp[-8]), &(yylsp[-6]), &do_keyword_loc, &(yylsp[0]));
14940 RNODE_SCOPE(scope)->nd_parent = (yyval.node);
14941 fixpos((yyval.node), (yyvsp[-7].node));
14942 /*% ripper: for!($:for_var, $:expr_value, $:compstmt) %*/
14943 }
14944#line 14945 "parse.c"
14945 break;
14946
14947 case 383: /* $@20: %empty */
14948#line 4600 "parse.y"
14949 {
14950 begin_definition("class", &(yylsp[-2]), &(yylsp[-1]));
14951 }
14952#line 14953 "parse.c"
14953 break;
14954
14955 case 384: /* primary: k_class cpath superclass $@20 bodystmt k_end */
14956#line 4605 "parse.y"
14957 {
14958 YYLTYPE inheritance_operator_loc = NULL_LOC;
14959 if ((yyvsp[-3].node)) {
14960 inheritance_operator_loc = (yylsp[-3]);
14961 inheritance_operator_loc.end_pos.column = inheritance_operator_loc.beg_pos.column + 1;
14962 }
14963 (yyval.node) = NEW_CLASS((yyvsp[-4].node), (yyvsp[-1].node), (yyvsp[-3].node), &(yyloc), &(yylsp[-5]), &inheritance_operator_loc, &(yylsp[0]));
14964 nd_set_line(RNODE_CLASS((yyval.node))->nd_body, (yylsp[0]).end_pos.lineno);
14965 set_line_body((yyvsp[-1].node), (yylsp[-3]).end_pos.lineno);
14966 nd_set_line((yyval.node), (yylsp[-3]).end_pos.lineno);
14967 /*% ripper: class!($:cpath, $:superclass, $:bodystmt) %*/
14968 local_pop(p);
14969 p->ctxt.in_class = (yyvsp[-5].ctxt).in_class;
14970 p->ctxt.cant_return = (yyvsp[-5].ctxt).cant_return;
14971 p->ctxt.shareable_constant_value = (yyvsp[-5].ctxt).shareable_constant_value;
14972 }
14973#line 14974 "parse.c"
14974 break;
14975
14976 case 385: /* $@21: %empty */
14977#line 4622 "parse.y"
14978 {
14979 begin_definition("", &(yylsp[-2]), &(yylsp[-1]));
14980 }
14981#line 14982 "parse.c"
14982 break;
14983
14984 case 386: /* primary: k_class "<<" expr_value $@21 term bodystmt k_end */
14985#line 4628 "parse.y"
14986 {
14987 (yyval.node) = NEW_SCLASS((yyvsp[-4].node), (yyvsp[-1].node), &(yyloc), &(yylsp[-6]), &(yylsp[-5]), &(yylsp[0]));
14988 nd_set_line(RNODE_SCLASS((yyval.node))->nd_body, (yylsp[0]).end_pos.lineno);
14989 set_line_body((yyvsp[-1].node), nd_line((yyvsp[-4].node)));
14990 fixpos((yyval.node), (yyvsp[-4].node));
14991 /*% ripper: sclass!($:expr_value, $:bodystmt) %*/
14992 local_pop(p);
14993 p->ctxt.in_def = (yyvsp[-6].ctxt).in_def;
14994 p->ctxt.in_class = (yyvsp[-6].ctxt).in_class;
14995 p->ctxt.cant_return = (yyvsp[-6].ctxt).cant_return;
14996 p->ctxt.shareable_constant_value = (yyvsp[-6].ctxt).shareable_constant_value;
14997 }
14998#line 14999 "parse.c"
14999 break;
15000
15001 case 387: /* $@22: %empty */
15002#line 4641 "parse.y"
15003 {
15004 begin_definition("module", &(yylsp[-1]), &(yylsp[0]));
15005 }
15006#line 15007 "parse.c"
15007 break;
15008
15009 case 388: /* primary: k_module cpath $@22 bodystmt k_end */
15010#line 4646 "parse.y"
15011 {
15012 (yyval.node) = NEW_MODULE((yyvsp[-3].node), (yyvsp[-1].node), &(yyloc), &(yylsp[-4]), &(yylsp[0]));
15013 nd_set_line(RNODE_MODULE((yyval.node))->nd_body, (yylsp[0]).end_pos.lineno);
15014 set_line_body((yyvsp[-1].node), (yylsp[-3]).end_pos.lineno);
15015 nd_set_line((yyval.node), (yylsp[-3]).end_pos.lineno);
15016 /*% ripper: module!($:cpath, $:bodystmt) %*/
15017 local_pop(p);
15018 p->ctxt.in_class = (yyvsp[-4].ctxt).in_class;
15019 p->ctxt.cant_return = (yyvsp[-4].ctxt).cant_return;
15020 p->ctxt.shareable_constant_value = (yyvsp[-4].ctxt).shareable_constant_value;
15021 }
15022#line 15023 "parse.c"
15023 break;
15024
15025 case 389: /* $@23: %empty */
15026#line 4659 "parse.y"
15027 {
15028 push_end_expect_token_locations(p, &(yylsp[-1]).beg_pos);
15029 }
15030#line 15031 "parse.c"
15031 break;
15032
15033 case 390: /* primary: defn_head f_arglist $@23 bodystmt k_end */
15034#line 4664 "parse.y"
15035 {
15036 restore_defun(p, (yyvsp[-4].node_def_temp));
15037 ((yyval.node) = (yyvsp[-4].node_def_temp)->nd_def)->nd_loc = (yyloc);
15038 (yyvsp[-1].node) = new_scope_body(p, (yyvsp[-3].node_args), (yyvsp[-1].node), (yyval.node), &(yyloc));
15039 RNODE_DEFN((yyval.node))->nd_defn = (yyvsp[-1].node);
15040 /*% ripper: def!($:head, $:args, $:bodystmt) %*/
15041 local_pop(p);
15042 }
15043#line 15044 "parse.c"
15044 break;
15045
15046 case 391: /* $@24: %empty */
15047#line 4674 "parse.y"
15048 {
15049 push_end_expect_token_locations(p, &(yylsp[-1]).beg_pos);
15050 }
15051#line 15052 "parse.c"
15052 break;
15053
15054 case 392: /* primary: defs_head f_arglist $@24 bodystmt k_end */
15055#line 4679 "parse.y"
15056 {
15057 restore_defun(p, (yyvsp[-4].node_def_temp));
15058 ((yyval.node) = (yyvsp[-4].node_def_temp)->nd_def)->nd_loc = (yyloc);
15059 (yyvsp[-1].node) = new_scope_body(p, (yyvsp[-3].node_args), (yyvsp[-1].node), (yyval.node), &(yyloc));
15060 RNODE_DEFS((yyval.node))->nd_defn = (yyvsp[-1].node);
15061 /*% ripper: defs!(*$:head[0..2], $:args, $:bodystmt) %*/
15062 local_pop(p);
15063 }
15064#line 15065 "parse.c"
15065 break;
15066
15067 case 393: /* primary: "'break'" */
15068#line 4688 "parse.y"
15069 {
15070 (yyval.node) = add_block_exit(p, NEW_BREAK(0, &(yyloc), &(yylsp[0])));
15071 /*% ripper: break!(args_new!) %*/
15072 }
15073#line 15074 "parse.c"
15074 break;
15075
15076 case 394: /* primary: "'next'" */
15077#line 4693 "parse.y"
15078 {
15079 (yyval.node) = add_block_exit(p, NEW_NEXT(0, &(yyloc), &(yylsp[0])));
15080 /*% ripper: next!(args_new!) %*/
15081 }
15082#line 15083 "parse.c"
15083 break;
15084
15085 case 395: /* primary: "'redo'" */
15086#line 4698 "parse.y"
15087 {
15088 (yyval.node) = add_block_exit(p, NEW_REDO(&(yyloc), &(yylsp[0])));
15089 /*% ripper: redo! %*/
15090 }
15091#line 15092 "parse.c"
15092 break;
15093
15094 case 396: /* primary: "'retry'" */
15095#line 4703 "parse.y"
15096 {
15097 if (!p->ctxt.in_defined) {
15098 switch (p->ctxt.in_rescue) {
15099 case before_rescue: yyerror1(&(yylsp[0]), "Invalid retry without rescue"); break;
15100 case after_rescue: /* ok */ break;
15101 case after_else: yyerror1(&(yylsp[0]), "Invalid retry after else"); break;
15102 case after_ensure: yyerror1(&(yylsp[0]), "Invalid retry after ensure"); break;
15103 }
15104 }
15105 (yyval.node) = NEW_RETRY(&(yyloc));
15106 /*% ripper: retry! %*/
15107 }
15108#line 15109 "parse.c"
15109 break;
15110
15111 case 397: /* value_expr_primary: primary */
15112#line 3155 "parse.y"
15113 {
15114 value_expr(p, (yyvsp[0].node));
15115 (yyval.node) = (yyvsp[0].node);
15116 }
15117#line 15118 "parse.c"
15118 break;
15119
15120 case 399: /* k_begin: "'begin'" */
15121#line 4721 "parse.y"
15122 {
15123 token_info_push(p, "begin", &(yyloc));
15124 push_end_expect_token_locations(p, &(yylsp[0]).beg_pos);
15125 }
15126#line 15127 "parse.c"
15127 break;
15128
15129 case 400: /* k_if: "'if'" */
15130#line 4728 "parse.y"
15131 {
15132 WARN_EOL("if");
15133 token_info_push(p, "if", &(yyloc));
15134 if (p->token_info && p->token_info->nonspc &&
15135 p->token_info->next && !strcmp(p->token_info->next->token, "else")) {
15136 const char *tok = p->lex.ptok - rb_strlen_lit("if");
15137 const char *beg = p->lex.pbeg + p->token_info->next->beg.column;
15138 beg += rb_strlen_lit("else");
15139 while (beg < tok && ISSPACE(*beg)) beg++;
15140 if (beg == tok) {
15141 p->token_info->nonspc = 0;
15142 }
15143 }
15144 push_end_expect_token_locations(p, &(yylsp[0]).beg_pos);
15145 }
15146#line 15147 "parse.c"
15147 break;
15148
15149 case 401: /* k_unless: "'unless'" */
15150#line 4746 "parse.y"
15151 {
15152 token_info_push(p, "unless", &(yyloc));
15153 push_end_expect_token_locations(p, &(yylsp[0]).beg_pos);
15154 }
15155#line 15156 "parse.c"
15156 break;
15157
15158 case 402: /* k_while: "'while'" allow_exits */
15159#line 4753 "parse.y"
15160 {
15161 (yyval.node_exits) = (yyvsp[0].node_exits);
15162 token_info_push(p, "while", &(yyloc));
15163 push_end_expect_token_locations(p, &(yylsp[-1]).beg_pos);
15164 }
15165#line 15166 "parse.c"
15166 break;
15167
15168 case 403: /* k_until: "'until'" allow_exits */
15169#line 4761 "parse.y"
15170 {
15171 (yyval.node_exits) = (yyvsp[0].node_exits);
15172 token_info_push(p, "until", &(yyloc));
15173 push_end_expect_token_locations(p, &(yylsp[-1]).beg_pos);
15174 }
15175#line 15176 "parse.c"
15176 break;
15177
15178 case 404: /* k_case: "'case'" */
15179#line 4769 "parse.y"
15180 {
15181 token_info_push(p, "case", &(yyloc));
15182 push_end_expect_token_locations(p, &(yylsp[0]).beg_pos);
15183 }
15184#line 15185 "parse.c"
15185 break;
15186
15187 case 405: /* k_for: "'for'" allow_exits */
15188#line 4776 "parse.y"
15189 {
15190 (yyval.node_exits) = (yyvsp[0].node_exits);
15191 token_info_push(p, "for", &(yyloc));
15192 push_end_expect_token_locations(p, &(yylsp[-1]).beg_pos);
15193 }
15194#line 15195 "parse.c"
15195 break;
15196
15197 case 406: /* k_class: "'class'" */
15198#line 4784 "parse.y"
15199 {
15200 token_info_push(p, "class", &(yyloc));
15201 (yyval.ctxt) = p->ctxt;
15202 p->ctxt.in_rescue = before_rescue;
15203 push_end_expect_token_locations(p, &(yylsp[0]).beg_pos);
15204 }
15205#line 15206 "parse.c"
15206 break;
15207
15208 case 407: /* k_module: "'module'" */
15209#line 4793 "parse.y"
15210 {
15211 token_info_push(p, "module", &(yyloc));
15212 (yyval.ctxt) = p->ctxt;
15213 p->ctxt.in_rescue = before_rescue;
15214 push_end_expect_token_locations(p, &(yylsp[0]).beg_pos);
15215 }
15216#line 15217 "parse.c"
15217 break;
15218
15219 case 408: /* k_def: "'def'" */
15220#line 4802 "parse.y"
15221 {
15222 token_info_push(p, "def", &(yyloc));
15223 (yyval.node_def_temp) = NEW_DEF_TEMP(&(yyloc));
15224 p->ctxt.in_argdef = 1;
15225 }
15226#line 15227 "parse.c"
15227 break;
15228
15229 case 409: /* k_do: "'do'" */
15230#line 4810 "parse.y"
15231 {
15232 token_info_push(p, "do", &(yyloc));
15233 push_end_expect_token_locations(p, &(yylsp[0]).beg_pos);
15234 }
15235#line 15236 "parse.c"
15236 break;
15237
15238 case 410: /* k_do_block: "'do' for block" */
15239#line 4817 "parse.y"
15240 {
15241 token_info_push(p, "do", &(yyloc));
15242 push_end_expect_token_locations(p, &(yylsp[0]).beg_pos);
15243 }
15244#line 15245 "parse.c"
15245 break;
15246
15247 case 411: /* k_rescue: "'rescue'" */
15248#line 4824 "parse.y"
15249 {
15250 token_info_warn(p, "rescue", p->token_info, 1, &(yyloc));
15251 (yyval.ctxt) = p->ctxt;
15252 p->ctxt.in_rescue = after_rescue;
15253 }
15254#line 15255 "parse.c"
15255 break;
15256
15257 case 412: /* k_ensure: "'ensure'" */
15258#line 4832 "parse.y"
15259 {
15260 token_info_warn(p, "ensure", p->token_info, 1, &(yyloc));
15261 (yyval.ctxt) = p->ctxt;
15262 }
15263#line 15264 "parse.c"
15264 break;
15265
15266 case 413: /* k_when: "'when'" */
15267#line 4839 "parse.y"
15268 {
15269 token_info_warn(p, "when", p->token_info, 0, &(yyloc));
15270 }
15271#line 15272 "parse.c"
15272 break;
15273
15274 case 414: /* k_else: "'else'" */
15275#line 4845 "parse.y"
15276 {
15277 token_info *ptinfo_beg = p->token_info;
15278 int same = ptinfo_beg && strcmp(ptinfo_beg->token, "case") != 0;
15279 token_info_warn(p, "else", p->token_info, same, &(yyloc));
15280 if (same) {
15281 token_info e;
15282 e.next = ptinfo_beg->next;
15283 e.token = "else";
15284 token_info_setup(&e, p->lex.pbeg, &(yyloc));
15285 if (!e.nonspc) *ptinfo_beg = e;
15286 }
15287 }
15288#line 15289 "parse.c"
15289 break;
15290
15291 case 415: /* k_elsif: "'elsif'" */
15292#line 4860 "parse.y"
15293 {
15294 WARN_EOL("elsif");
15295 token_info_warn(p, "elsif", p->token_info, 1, &(yyloc));
15296 }
15297#line 15298 "parse.c"
15298 break;
15299
15300 case 416: /* k_end: "'end'" */
15301#line 4867 "parse.y"
15302 {
15303 token_info_pop(p, "end", &(yyloc));
15304 pop_end_expect_token_locations(p);
15305 }
15306#line 15307 "parse.c"
15307 break;
15308
15309 case 417: /* k_end: "dummy end" */
15310#line 4872 "parse.y"
15311 {
15312 compile_error(p, "syntax error, unexpected end-of-input");
15313 }
15314#line 15315 "parse.c"
15315 break;
15316
15317 case 418: /* k_return: "'return'" */
15318#line 4878 "parse.y"
15319 {
15320 if (p->ctxt.cant_return && !dyna_in_block(p))
15321 yyerror1(&(yylsp[0]), "Invalid return in class/module body");
15322 }
15323#line 15324 "parse.c"
15324 break;
15325
15326 case 419: /* k_yield: "'yield'" */
15327#line 4885 "parse.y"
15328 {
15329 if (!p->ctxt.in_defined && !p->ctxt.in_def && !compile_for_eval)
15330 yyerror1(&(yylsp[0]), "Invalid yield");
15331 }
15332#line 15333 "parse.c"
15333 break;
15334
15335 case 424: /* do: "'do' for condition" */
15336#line 4897 "parse.y"
15337 { (yyval.id) = keyword_do_cond; }
15338#line 15339 "parse.c"
15339 break;
15340
15341 case 426: /* if_tail: k_elsif expr_value then compstmt_stmts if_tail */
15342#line 4904 "parse.y"
15343 {
15344 (yyval.node) = new_if(p, (yyvsp[-3].node), (yyvsp[-1].node), (yyvsp[0].node), &(yyloc), &(yylsp[-4]), &(yylsp[-2]), &NULL_LOC);
15345 fixpos((yyval.node), (yyvsp[-3].node));
15346 /*% ripper: elsif!($:2, $:4, $:5) %*/
15347 }
15348#line 15349 "parse.c"
15349 break;
15350
15351 case 428: /* opt_else: k_else compstmt_stmts */
15352#line 4913 "parse.y"
15353 {
15354 (yyval.node) = (yyvsp[0].node);
15355 /*% ripper: else!($:2) %*/
15356 }
15357#line 15358 "parse.c"
15358 break;
15359
15360 case 431: /* f_marg: f_norm_arg */
15361#line 4924 "parse.y"
15362 {
15363 (yyval.node) = assignable(p, (yyvsp[0].id), 0, &(yyloc));
15364 mark_lvar_used(p, (yyval.node));
15365 }
15366#line 15367 "parse.c"
15367 break;
15368
15369 case 432: /* f_marg: "(" f_margs rparen */
15370#line 4929 "parse.y"
15371 {
15372 (yyval.node) = (NODE *)(yyvsp[-1].node_masgn);
15373 /*% ripper: mlhs_paren!($:2) %*/
15374 }
15375#line 15376 "parse.c"
15376 break;
15377
15378 case 433: /* mlhs_items_f_marg: f_marg */
15379#line 3042 "parse.y"
15380 {
15381 (yyval.node) = NEW_LIST((yyvsp[0].node), &(yyloc));
15382 /*% ripper: mlhs_add!(mlhs_new!, $:1) %*/
15383 }
15384#line 15385 "parse.c"
15385 break;
15386
15387 case 434: /* mlhs_items_f_marg: mlhs_items_f_marg ',' f_marg */
15388#line 3047 "parse.y"
15389 {
15390 (yyval.node) = list_append(p, (yyvsp[-2].node), (yyvsp[0].node));
15391 /*% ripper: mlhs_add!($:1, $:3) %*/
15392 }
15393#line 15394 "parse.c"
15394 break;
15395
15396 case 435: /* f_margs: mlhs_items_f_marg */
15397#line 4937 "parse.y"
15398 {
15399 (yyval.node_masgn) = NEW_MASGN((yyvsp[0].node), 0, &(yyloc));
15400 /*% ripper: $:1 %*/
15401 }
15402#line 15403 "parse.c"
15403 break;
15404
15405 case 436: /* f_margs: mlhs_items_f_marg ',' f_rest_marg */
15406#line 4942 "parse.y"
15407 {
15408 (yyval.node_masgn) = NEW_MASGN((yyvsp[-2].node), (yyvsp[0].node), &(yyloc));
15409 /*% ripper: mlhs_add_star!($:1, $:3) %*/
15410 }
15411#line 15412 "parse.c"
15412 break;
15413
15414 case 437: /* f_margs: mlhs_items_f_marg ',' f_rest_marg ',' mlhs_items_f_marg */
15415#line 4947 "parse.y"
15416 {
15417 (yyval.node_masgn) = NEW_MASGN((yyvsp[-4].node), NEW_POSTARG((yyvsp[-2].node), (yyvsp[0].node), &(yyloc)), &(yyloc));
15418 /*% ripper: mlhs_add_post!(mlhs_add_star!($:1, $:3), $:5) %*/
15419 }
15420#line 15421 "parse.c"
15421 break;
15422
15423 case 438: /* f_margs: f_rest_marg */
15424#line 4952 "parse.y"
15425 {
15426 (yyval.node_masgn) = NEW_MASGN(0, (yyvsp[0].node), &(yyloc));
15427 /*% ripper: mlhs_add_star!(mlhs_new!, $:1) %*/
15428 }
15429#line 15430 "parse.c"
15430 break;
15431
15432 case 439: /* f_margs: f_rest_marg ',' mlhs_items_f_marg */
15433#line 4957 "parse.y"
15434 {
15435 (yyval.node_masgn) = NEW_MASGN(0, NEW_POSTARG((yyvsp[-2].node), (yyvsp[0].node), &(yyloc)), &(yyloc));
15436 /*% ripper: mlhs_add_post!(mlhs_add_star!(mlhs_new!, $:1), $:3) %*/
15437 }
15438#line 15439 "parse.c"
15439 break;
15440
15441 case 440: /* f_rest_marg: "*" f_norm_arg */
15442#line 4964 "parse.y"
15443 {
15444 /*% ripper: $:2 %*/
15445 (yyval.node) = assignable(p, (yyvsp[0].id), 0, &(yyloc));
15446 mark_lvar_used(p, (yyval.node));
15447 }
15448#line 15449 "parse.c"
15449 break;
15450
15451 case 441: /* f_rest_marg: "*" */
15452#line 4970 "parse.y"
15453 {
15454 (yyval.node) = NODE_SPECIAL_NO_NAME_REST;
15455 /*% ripper: Qnil %*/
15456 }
15457#line 15458 "parse.c"
15458 break;
15459
15460 case 443: /* f_any_kwrest: f_no_kwarg */
15461#line 4978 "parse.y"
15462 {
15463 (yyval.id) = idNil;
15464 /*% ripper: ID2VAL(idNil) %*/
15465 }
15466#line 15467 "parse.c"
15467 break;
15468
15469 case 444: /* $@25: %empty */
15470#line 4984 "parse.y"
15471 {p->ctxt.in_argdef = 0;}
15472#line 15473 "parse.c"
15473 break;
15474
15475 case 446: /* f_kw_primary_value: f_label primary_value */
15476#line 3014 "parse.y"
15477 {
15478 p->ctxt.in_argdef = 1;
15479 (yyval.node_kw_arg) = new_kw_arg(p, assignable(p, (yyvsp[-1].id), (yyvsp[0].node), &(yyloc)), &(yyloc));
15480 /*% ripper: [$:$, $:value] %*/
15481 }
15482#line 15483 "parse.c"
15483 break;
15484
15485 case 447: /* f_kw_primary_value: f_label */
15486#line 3020 "parse.y"
15487 {
15488 p->ctxt.in_argdef = 1;
15489 (yyval.node_kw_arg) = new_kw_arg(p, assignable(p, (yyvsp[0].id), NODE_SPECIAL_REQUIRED_KEYWORD, &(yyloc)), &(yyloc));
15490 /*% ripper: [$:$, 0] %*/
15491 }
15492#line 15493 "parse.c"
15493 break;
15494
15495 case 448: /* f_kwarg_primary_value: f_kw_primary_value */
15496#line 3029 "parse.y"
15497 {
15498 (yyval.node_kw_arg) = (yyvsp[0].node_kw_arg);
15499 /*% ripper: rb_ary_new3(1, $:1) %*/
15500 }
15501#line 15502 "parse.c"
15502 break;
15503
15504 case 449: /* f_kwarg_primary_value: f_kwarg_primary_value ',' f_kw_primary_value */
15505#line 3034 "parse.y"
15506 {
15507 (yyval.node_kw_arg) = kwd_append((yyvsp[-2].node_kw_arg), (yyvsp[0].node_kw_arg));
15508 /*% ripper: rb_ary_push($:1, $:3) %*/
15509 }
15510#line 15511 "parse.c"
15511 break;
15512
15513 case 450: /* opt_f_block_arg_none: ',' f_block_arg */
15514#line 2951 "parse.y"
15515 {
15516 (yyval.id) = (yyvsp[0].id);
15517 /*% ripper: $:2 %*/
15518 }
15519#line 15520 "parse.c"
15520 break;
15521
15522 case 452: /* args_tail_basic_primary_value_none: f_kwarg_primary_value ',' f_kwrest opt_f_block_arg_none */
15523#line 2928 "parse.y"
15524 {
15525 (yyval.node_args) = new_args_tail(p, (yyvsp[-3].node_kw_arg), (yyvsp[-1].id), (yyvsp[0].id), &(yylsp[-1]));
15526 /*% ripper: [$:1, $:3, $:4] %*/
15527 }
15528#line 15529 "parse.c"
15529 break;
15530
15531 case 453: /* args_tail_basic_primary_value_none: f_kwarg_primary_value opt_f_block_arg_none */
15532#line 2933 "parse.y"
15533 {
15534 (yyval.node_args) = new_args_tail(p, (yyvsp[-1].node_kw_arg), 0, (yyvsp[0].id), &(yylsp[-1]));
15535 /*% ripper: [$:1, Qnil, $:2] %*/
15536 }
15537#line 15538 "parse.c"
15538 break;
15539
15540 case 454: /* args_tail_basic_primary_value_none: f_any_kwrest opt_f_block_arg_none */
15541#line 2938 "parse.y"
15542 {
15543 (yyval.node_args) = new_args_tail(p, 0, (yyvsp[-1].id), (yyvsp[0].id), &(yylsp[-1]));
15544 /*% ripper: [Qnil, $:1, $:2] %*/
15545 }
15546#line 15547 "parse.c"
15547 break;
15548
15549 case 455: /* args_tail_basic_primary_value_none: f_block_arg */
15550#line 2943 "parse.y"
15551 {
15552 (yyval.node_args) = new_args_tail(p, 0, 0, (yyvsp[0].id), &(yylsp[0]));
15553 /*% ripper: [Qnil, Qnil, $:1] %*/
15554 }
15555#line 15556 "parse.c"
15556 break;
15557
15558 case 457: /* excessed_comma: ',' */
15559#line 4990 "parse.y"
15560 {
15561 /* magic number for rest_id in iseq_set_arguments() */
15562 (yyval.id) = NODE_SPECIAL_EXCESSIVE_COMMA;
15563 /*% ripper: excessed_comma! %*/
15564 }
15565#line 15566 "parse.c"
15566 break;
15567
15568 case 458: /* f_opt_primary_value: f_arg_asgn f_eq primary_value */
15569#line 2992 "parse.y"
15570 {
15571 p->ctxt.in_argdef = 1;
15572 (yyval.node_opt_arg) = NEW_OPT_ARG(assignable(p, (yyvsp[-2].id), (yyvsp[0].node), &(yyloc)), &(yyloc));
15573 /*% ripper: [$:$, $:3] %*/
15574 }
15575#line 15576 "parse.c"
15576 break;
15577
15578 case 459: /* f_opt_arg_primary_value: f_opt_primary_value */
15579#line 3001 "parse.y"
15580 {
15581 (yyval.node_opt_arg) = (yyvsp[0].node_opt_arg);
15582 /*% ripper: rb_ary_new3(1, $:1) %*/
15583 }
15584#line 15585 "parse.c"
15585 break;
15586
15587 case 460: /* f_opt_arg_primary_value: f_opt_arg_primary_value ',' f_opt_primary_value */
15588#line 3006 "parse.y"
15589 {
15590 (yyval.node_opt_arg) = opt_arg_append((yyvsp[-2].node_opt_arg), (yyvsp[0].node_opt_arg));
15591 /*% ripper: rb_ary_push($:1, $:3) %*/
15592 }
15593#line 15594 "parse.c"
15594 break;
15595
15596 case 461: /* opt_args_tail_block_args_tail_none: ',' block_args_tail */
15597#line 3101 "parse.y"
15598 {
15599 (yyval.node_args) = (yyvsp[0].node_args);
15600 /*% ripper: $:tail %*/
15601 }
15602#line 15603 "parse.c"
15603 break;
15604
15605 case 462: /* opt_args_tail_block_args_tail_none: none */
15606#line 3106 "parse.y"
15607 {
15608 (yyval.node_args) = new_empty_args_tail(p, &(yyloc));
15609 /*% ripper: [Qnil, Qnil, Qnil] %*/
15610 }
15611#line 15612 "parse.c"
15612 break;
15613
15614 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 */
15615#line 6272 "parse.y"
15616 {
15617 (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));
15618 /*% ripper: params!($:pre, $:opt, $:rest, Qnil, *$:tail[0..2]) %*/
15619 }
15620#line 15621 "parse.c"
15621 break;
15622
15623 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 */
15624#line 6277 "parse.y"
15625 {
15626 (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));
15627 /*% ripper: params!($:pre, $:opt, $:rest, $:post, *$:tail[0..2]) %*/
15628 }
15629#line 15630 "parse.c"
15630 break;
15631
15632 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 */
15633#line 6282 "parse.y"
15634 {
15635 (yyval.node_args) = new_args(p, (yyvsp[-3].node_args_aux), (yyvsp[-1].node_opt_arg), 0, 0, (yyvsp[0].node_args), &(yyloc));
15636 /*% ripper: params!($:pre, $:opt, Qnil, Qnil, *$:tail[0..2]) %*/
15637 }
15638#line 15639 "parse.c"
15639 break;
15640
15641 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 */
15642#line 6287 "parse.y"
15643 {
15644 (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));
15645 /*% ripper: params!($:pre, $:opt, Qnil, $:post, *$:tail[0..2]) %*/
15646 }
15647#line 15648 "parse.c"
15648 break;
15649
15650 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 */
15651#line 6292 "parse.y"
15652 {
15653 (yyval.node_args) = new_args(p, (yyvsp[-3].node_args_aux), 0, (yyvsp[-1].id), 0, (yyvsp[0].node_args), &(yyloc));
15654 /*% ripper: params!($:pre, Qnil, $:rest, Qnil, *$:tail[0..2]) %*/
15655 }
15656#line 15657 "parse.c"
15657 break;
15658
15659 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 */
15660#line 6297 "parse.y"
15661 {
15662 (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));
15663 /*% ripper: params!($:pre, Qnil, $:rest, $:post, *$:tail[0..2]) %*/
15664 }
15665#line 15666 "parse.c"
15666 break;
15667
15668 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 */
15669#line 6302 "parse.y"
15670 {
15671 (yyval.node_args) = new_args(p, 0, (yyvsp[-3].node_opt_arg), (yyvsp[-1].id), 0, (yyvsp[0].node_args), &(yyloc));
15672 /*% ripper: params!(Qnil, $:opt, $:rest, Qnil, *$:tail[0..2]) %*/
15673 }
15674#line 15675 "parse.c"
15675 break;
15676
15677 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 */
15678#line 6307 "parse.y"
15679 {
15680 (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));
15681 /*% ripper: params!(Qnil, $:opt, $:rest, $:post, *$:tail[0..2]) %*/
15682 }
15683#line 15684 "parse.c"
15684 break;
15685
15686 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 */
15687#line 6312 "parse.y"
15688 {
15689 (yyval.node_args) = new_args(p, 0, (yyvsp[-1].node_opt_arg), 0, 0, (yyvsp[0].node_args), &(yyloc));
15690 /*% ripper: params!(Qnil, $:opt, Qnil, Qnil, *$:tail[0..2]) %*/
15691 }
15692#line 15693 "parse.c"
15693 break;
15694
15695 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 */
15696#line 6317 "parse.y"
15697 {
15698 (yyval.node_args) = new_args(p, 0, (yyvsp[-3].node_opt_arg), 0, (yyvsp[-1].node_args_aux), (yyvsp[0].node_args), &(yyloc));
15699 /*% ripper: params!(Qnil, $:opt, Qnil, $:post, *$:tail[0..2]) %*/
15700 }
15701#line 15702 "parse.c"
15702 break;
15703
15704 case 473: /* args-list_primary_value_opt_args_tail_block_args_tail_none: f_rest_arg opt_args_tail_block_args_tail_none */
15705#line 6322 "parse.y"
15706 {
15707 (yyval.node_args) = new_args(p, 0, 0, (yyvsp[-1].id), 0, (yyvsp[0].node_args), &(yyloc));
15708 /*% ripper: params!(Qnil, Qnil, $:rest, Qnil, *$:tail[0..2]) %*/
15709 }
15710#line 15711 "parse.c"
15711 break;
15712
15713 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 */
15714#line 6327 "parse.y"
15715 {
15716 (yyval.node_args) = new_args(p, 0, 0, (yyvsp[-3].id), (yyvsp[-1].node_args_aux), (yyvsp[0].node_args), &(yyloc));
15717 /*% ripper: params!(Qnil, Qnil, $:rest, $:post, *$:tail[0..2]) %*/
15718 }
15719#line 15720 "parse.c"
15720 break;
15721
15722 case 476: /* block_param: f_arg excessed_comma */
15723#line 4999 "parse.y"
15724 {
15725 (yyval.node_args) = new_empty_args_tail(p, &(yylsp[0]));
15726 (yyval.node_args) = new_args(p, (yyvsp[-1].node_args_aux), 0, (yyvsp[0].id), 0, (yyval.node_args), &(yyloc));
15727 /*% ripper: params!($:pre, Qnil, $:excessed_comma, Qnil, Qnil, Qnil, Qnil) %*/
15728 }
15729#line 15730 "parse.c"
15730 break;
15731
15732 case 477: /* block_param: f_arg opt_args_tail_block_args_tail_none */
15733#line 5005 "parse.y"
15734 {
15735 (yyval.node_args) = new_args(p, (yyvsp[-1].node_args_aux), 0, 0, 0, (yyvsp[0].node_args), &(yyloc));
15736 /*% ripper: params!($:pre, Qnil, Qnil, Qnil, *$:tail[0..2]) %*/
15737 }
15738#line 15739 "parse.c"
15739 break;
15740
15741 case 478: /* tail-only-args_block_args_tail: block_args_tail */
15742#line 6335 "parse.y"
15743 {
15744 (yyval.node_args) = new_args(p, 0, 0, 0, 0, (yyvsp[0].node_args), &(yyloc));
15745 /*% ripper: params!(Qnil, Qnil, Qnil, Qnil, *$:tail[0..2]) %*/
15746 }
15747#line 15748 "parse.c"
15748 break;
15749
15750 case 481: /* opt_block_param_def: block_param_def */
15751#line 5014 "parse.y"
15752 {
15753 p->command_start = TRUE;
15754 }
15755#line 15756 "parse.c"
15756 break;
15757
15758 case 482: /* block_param_def: '|' opt_block_param opt_bv_decl '|' */
15759#line 5020 "parse.y"
15760 {
15761 p->max_numparam = ORDINAL_PARAM;
15762 p->ctxt.in_argdef = 0;
15763 (yyval.node_args) = (yyvsp[-2].node_args);
15764 /*% ripper: block_var!($:2, $:3) %*/
15765 }
15766#line 15767 "parse.c"
15767 break;
15768
15769 case 483: /* opt_block_param: %empty */
15770#line 5029 "parse.y"
15771 {
15772 (yyval.node_args) = 0;
15773 /*% ripper: params!(Qnil,Qnil,Qnil,Qnil,Qnil,Qnil,Qnil) %*/
15774 }
15775#line 15776 "parse.c"
15776 break;
15777
15778 case 485: /* opt_bv_decl: option_'\n' */
15779#line 5037 "parse.y"
15780 {
15781 (yyval.id) = 0;
15782 /*% ripper: Qfalse %*/
15783 }
15784#line 15785 "parse.c"
15785 break;
15786
15787 case 486: /* opt_bv_decl: option_'\n' ';' bv_decls option_'\n' */
15788#line 5042 "parse.y"
15789 {
15790 (yyval.id) = 0;
15791 /*% ripper: $:3 %*/
15792 }
15793#line 15794 "parse.c"
15794 break;
15795
15796 case 489: /* bvar: "local variable or method" */
15797#line 5055 "parse.y"
15798 {
15799 new_bv(p, (yyvsp[0].id));
15800 /*% ripper: $:1 %*/
15801 }
15802#line 15803 "parse.c"
15803 break;
15804
15805 case 491: /* max_numparam: %empty */
15806#line 5062 "parse.y"
15807 {
15808 (yyval.num) = p->max_numparam;
15809 p->max_numparam = 0;
15810 }
15811#line 15812 "parse.c"
15812 break;
15813
15814 case 492: /* numparam: %empty */
15815#line 5068 "parse.y"
15816 {
15817 (yyval.node) = numparam_push(p);
15818 }
15819#line 15820 "parse.c"
15820 break;
15821
15822 case 493: /* it_id: %empty */
15823#line 5073 "parse.y"
15824 {
15825 (yyval.id) = p->it_id;
15826 p->it_id = 0;
15827 }
15828#line 15829 "parse.c"
15829 break;
15830
15831 case 494: /* @26: %empty */
15832#line 5080 "parse.y"
15833 {
15834 token_info_push(p, "->", &(yylsp[0]));
15835 (yyval.vars) = dyna_push(p);
15836 }
15837#line 15838 "parse.c"
15838 break;
15839
15840 case 495: /* $@27: %empty */
15841#line 5086 "parse.y"
15842 {
15843 CMDARG_PUSH(0);
15844 }
15845#line 15846 "parse.c"
15846 break;
15847
15848 case 496: /* lambda: "->" @26 max_numparam numparam it_id allow_exits f_larglist $@27 lambda_body */
15849#line 5090 "parse.y"
15850 {
15851 int max_numparam = p->max_numparam;
15852 ID it_id = p->it_id;
15853 p->lex.lpar_beg = (yyvsp[-8].num);
15854 p->max_numparam = (yyvsp[-6].num);
15855 p->it_id = (yyvsp[-4].id);
15856 restore_block_exit(p, (yyvsp[-3].node_exits));
15857 CMDARG_POP();
15858 (yyvsp[-2].node_args) = args_with_numbered(p, (yyvsp[-2].node_args), max_numparam, it_id);
15859 {
15860 YYLTYPE loc = code_loc_gen(&(yylsp[-8]), &(yylsp[0]));
15861 (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);
15862 nd_set_line(RNODE_LAMBDA((yyval.node))->nd_body, (yylsp[0]).end_pos.lineno);
15863 nd_set_line((yyval.node), (yylsp[-2]).end_pos.lineno);
15864 nd_set_first_loc((yyval.node), (yylsp[-8]).beg_pos);
15865 xfree((yyvsp[0].locations_lambda_body));
15866 }
15867 /*% ripper: lambda!($:args, $:body) %*/
15868 numparam_pop(p, (yyvsp[-5].node));
15869 dyna_pop(p, (yyvsp[-7].vars));
15870 }
15871#line 15872 "parse.c"
15872 break;
15873
15874 case 497: /* f_larglist: '(' f_largs opt_bv_decl ')' */
15875#line 5114 "parse.y"
15876 {
15877 p->ctxt.in_argdef = 0;
15878 (yyval.node_args) = (yyvsp[-2].node_args);
15879 p->max_numparam = ORDINAL_PARAM;
15880 /*% ripper: paren!($:args) %*/
15881 }
15882#line 15883 "parse.c"
15883 break;
15884
15885 case 498: /* f_larglist: f_largs */
15886#line 5121 "parse.y"
15887 {
15888 p->ctxt.in_argdef = 0;
15889 if (!args_info_empty_p(&(yyvsp[0].node_args)->nd_ainfo))
15890 p->max_numparam = ORDINAL_PARAM;
15891 (yyval.node_args) = (yyvsp[0].node_args);
15892 }
15893#line 15894 "parse.c"
15894 break;
15895
15896 case 499: /* lambda_body: tLAMBEG compstmt_stmts '}' */
15897#line 5130 "parse.y"
15898 {
15899 token_info_pop(p, "}", &(yylsp[0]));
15900 (yyval.locations_lambda_body) = new_locations_lambda_body(p, (yyvsp[-1].node), &(yylsp[-1]), &(yylsp[-2]), &(yylsp[0]));
15901 /*% ripper: $:2 %*/
15902 }
15903#line 15904 "parse.c"
15904 break;
15905
15906 case 500: /* $@28: %empty */
15907#line 5136 "parse.y"
15908 {
15909 push_end_expect_token_locations(p, &(yylsp[0]).beg_pos);
15910 }
15911#line 15912 "parse.c"
15912 break;
15913
15914 case 501: /* lambda_body: "'do' for lambda" $@28 bodystmt k_end */
15915#line 5140 "parse.y"
15916 {
15917 (yyval.locations_lambda_body) = new_locations_lambda_body(p, (yyvsp[-1].node), &(yylsp[-1]), &(yylsp[-3]), &(yylsp[0]));
15918 /*% ripper: $:3 %*/
15919 }
15920#line 15921 "parse.c"
15921 break;
15922
15923 case 502: /* do_block: k_do_block do_body k_end */
15924#line 5147 "parse.y"
15925 {
15926 (yyval.node) = (yyvsp[-1].node);
15927 set_embraced_location((yyval.node), &(yylsp[-2]), &(yylsp[0]));
15928 /*% ripper: $:2 %*/
15929 }
15930#line 15931 "parse.c"
15931 break;
15932
15933 case 503: /* block_call: command do_block */
15934#line 5155 "parse.y"
15935 {
15936 if (nd_type_p((yyvsp[-1].node), NODE_YIELD)) {
15937 compile_error(p, "block given to yield");
15938 }
15939 else {
15940 block_dup_check(p, get_nd_args(p, (yyvsp[-1].node)), (yyvsp[0].node));
15941 }
15942 (yyval.node) = method_add_block(p, (yyvsp[-1].node), (yyvsp[0].node), &(yyloc));
15943 fixpos((yyval.node), (yyvsp[-1].node));
15944 /*% ripper: method_add_block!($:1, $:2) %*/
15945 }
15946#line 15947 "parse.c"
15947 break;
15948
15949 case 504: /* block_call: block_call call_op2 operation2 opt_paren_args */
15950#line 5167 "parse.y"
15951 {
15952 bool has_args = (yyvsp[0].node) != 0;
15953 if (NODE_EMPTY_ARGS_P((yyvsp[0].node))) (yyvsp[0].node) = 0;
15954 (yyval.node) = new_qcall(p, (yyvsp[-2].id), (yyvsp[-3].node), (yyvsp[-1].id), (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
15955 /*% ripper: call!($:1, $:2, $:3) %*/
15956 if (has_args) {
15957 /*% ripper: method_add_arg!($:$, $:4) %*/
15958 }
15959 }
15960#line 15961 "parse.c"
15961 break;
15962
15963 case 505: /* block_call: block_call call_op2 operation2 opt_paren_args brace_block */
15964#line 5177 "parse.y"
15965 {
15966 if (NODE_EMPTY_ARGS_P((yyvsp[-1].node))) (yyvsp[-1].node) = 0;
15967 (yyval.node) = new_command_qcall(p, (yyvsp[-3].id), (yyvsp[-4].node), (yyvsp[-2].id), (yyvsp[-1].node), (yyvsp[0].node), &(yylsp[-2]), &(yyloc));
15968 /*% ripper: method_add_block!(command_call!($:1, $:2, $:3, $:4), $:5) %*/
15969 }
15970#line 15971 "parse.c"
15971 break;
15972
15973 case 506: /* block_call: block_call call_op2 operation2 command_args do_block */
15974#line 5183 "parse.y"
15975 {
15976 (yyval.node) = new_command_qcall(p, (yyvsp[-3].id), (yyvsp[-4].node), (yyvsp[-2].id), (yyvsp[-1].node), (yyvsp[0].node), &(yylsp[-2]), &(yyloc));
15977 /*% ripper: method_add_block!(command_call!($:1, $:2, $:3, $:4), $:5) %*/
15978 }
15979#line 15980 "parse.c"
15980 break;
15981
15982 case 507: /* block_call: block_call call_op2 paren_args */
15983#line 5188 "parse.y"
15984 {
15985 (yyval.node) = new_qcall(p, (yyvsp[-1].id), (yyvsp[-2].node), idCall, (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
15986 nd_set_line((yyval.node), (yylsp[-1]).end_pos.lineno);
15987 /*% ripper: method_add_arg!(call!($:1, $:2, ID2VAL(idCall)), $:3) %*/
15988 }
15989#line 15990 "parse.c"
15990 break;
15991
15992 case 508: /* method_call: fcall paren_args */
15993#line 5196 "parse.y"
15994 {
15995 (yyvsp[-1].node_fcall)->nd_args = (yyvsp[0].node);
15996 (yyval.node) = (NODE *)(yyvsp[-1].node_fcall);
15997 nd_set_last_loc((yyvsp[-1].node_fcall), (yylsp[0]).end_pos);
15998 /*% ripper: method_add_arg!(fcall!($:1), $:2) %*/
15999 }
16000#line 16001 "parse.c"
16001 break;
16002
16003 case 509: /* method_call: primary_value call_op operation2 opt_paren_args */
16004#line 5203 "parse.y"
16005 {
16006 bool has_args = (yyvsp[0].node) != 0;
16007 if (NODE_EMPTY_ARGS_P((yyvsp[0].node))) (yyvsp[0].node) = 0;
16008 (yyval.node) = new_qcall(p, (yyvsp[-2].id), (yyvsp[-3].node), (yyvsp[-1].id), (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
16009 nd_set_line((yyval.node), (yylsp[-1]).end_pos.lineno);
16010 /*% ripper: call!($:1, $:2, $:3) %*/
16011 if (has_args) {
16012 /*% ripper: method_add_arg!($:$, $:4) %*/
16013 }
16014 }
16015#line 16016 "parse.c"
16016 break;
16017
16018 case 510: /* method_call: primary_value "::" operation2 paren_args */
16019#line 5214 "parse.y"
16020 {
16021 (yyval.node) = new_qcall(p, idCOLON2, (yyvsp[-3].node), (yyvsp[-1].id), (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
16022 nd_set_line((yyval.node), (yylsp[-1]).end_pos.lineno);
16023 /*% ripper: method_add_arg!(call!($:1, $:2, $:3), $:4) %*/
16024 }
16025#line 16026 "parse.c"
16026 break;
16027
16028 case 511: /* method_call: primary_value "::" operation3 */
16029#line 5220 "parse.y"
16030 {
16031 (yyval.node) = new_qcall(p, idCOLON2, (yyvsp[-2].node), (yyvsp[0].id), 0, &(yylsp[0]), &(yyloc));
16032 /*% ripper: call!($:1, $:2, $:3) %*/
16033 }
16034#line 16035 "parse.c"
16035 break;
16036
16037 case 512: /* method_call: primary_value call_op2 paren_args */
16038#line 5225 "parse.y"
16039 {
16040 (yyval.node) = new_qcall(p, (yyvsp[-1].id), (yyvsp[-2].node), idCall, (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
16041 nd_set_line((yyval.node), (yylsp[-1]).end_pos.lineno);
16042 /*% ripper: method_add_arg!(call!($:1, $:2, ID2VAL(idCall)), $:3) %*/
16043 }
16044#line 16045 "parse.c"
16045 break;
16046
16047 case 513: /* method_call: "'super'" paren_args */
16048#line 5231 "parse.y"
16049 {
16050 rb_code_location_t lparen_loc = (yylsp[0]);
16051 rb_code_location_t rparen_loc = (yylsp[0]);
16052 lparen_loc.end_pos.column = lparen_loc.beg_pos.column + 1;
16053 rparen_loc.beg_pos.column = rparen_loc.end_pos.column - 1;
16054
16055 (yyval.node) = NEW_SUPER((yyvsp[0].node), &(yyloc), &(yylsp[-1]), &lparen_loc, &rparen_loc);
16056 /*% ripper: super!($:2) %*/
16057 }
16058#line 16059 "parse.c"
16059 break;
16060
16061 case 514: /* method_call: "'super'" */
16062#line 5241 "parse.y"
16063 {
16064 (yyval.node) = NEW_ZSUPER(&(yyloc));
16065 /*% ripper: zsuper! %*/
16066 }
16067#line 16068 "parse.c"
16068 break;
16069
16070 case 515: /* method_call: primary_value '[' opt_call_args rbracket */
16071#line 5246 "parse.y"
16072 {
16073 (yyval.node) = NEW_CALL((yyvsp[-3].node), tAREF, (yyvsp[-1].node), &(yyloc));
16074 fixpos((yyval.node), (yyvsp[-3].node));
16075 /*% ripper: aref!($:1, $:3) %*/
16076 }
16077#line 16078 "parse.c"
16078 break;
16079
16080 case 516: /* brace_block: '{' brace_body '}' */
16081#line 5254 "parse.y"
16082 {
16083 (yyval.node) = (yyvsp[-1].node);
16084 set_embraced_location((yyval.node), &(yylsp[-2]), &(yylsp[0]));
16085 /*% ripper: $:2 %*/
16086 }
16087#line 16088 "parse.c"
16088 break;
16089
16090 case 517: /* brace_block: k_do do_body k_end */
16091#line 5260 "parse.y"
16092 {
16093 (yyval.node) = (yyvsp[-1].node);
16094 set_embraced_location((yyval.node), &(yylsp[-2]), &(yylsp[0]));
16095 /*% ripper: $:2 %*/
16096 }
16097#line 16098 "parse.c"
16098 break;
16099
16100 case 518: /* @29: %empty */
16101#line 5267 "parse.y"
16102 {(yyval.vars) = dyna_push(p);}
16103#line 16104 "parse.c"
16104 break;
16105
16106 case 519: /* brace_body: @29 max_numparam numparam it_id allow_exits opt_block_param_def compstmt_stmts */
16107#line 5270 "parse.y"
16108 {
16109 int max_numparam = p->max_numparam;
16110 ID it_id = p->it_id;
16111 p->max_numparam = (yyvsp[-5].num);
16112 p->it_id = (yyvsp[-3].id);
16113 (yyvsp[-1].node_args) = args_with_numbered(p, (yyvsp[-1].node_args), max_numparam, it_id);
16114 (yyval.node) = NEW_ITER((yyvsp[-1].node_args), (yyvsp[0].node), &(yyloc));
16115 /*% ripper: brace_block!($:args, $:compstmt) %*/
16116 restore_block_exit(p, (yyvsp[-2].node_exits));
16117 numparam_pop(p, (yyvsp[-4].node));
16118 dyna_pop(p, (yyvsp[-6].vars));
16119 }
16120#line 16121 "parse.c"
16121 break;
16122
16123 case 520: /* @30: %empty */
16124#line 5284 "parse.y"
16125 {
16126 (yyval.vars) = dyna_push(p);
16127 CMDARG_PUSH(0);
16128 }
16129#line 16130 "parse.c"
16130 break;
16131
16132 case 521: /* do_body: @30 max_numparam numparam it_id allow_exits opt_block_param_def bodystmt */
16133#line 5290 "parse.y"
16134 {
16135 int max_numparam = p->max_numparam;
16136 ID it_id = p->it_id;
16137 p->max_numparam = (yyvsp[-5].num);
16138 p->it_id = (yyvsp[-3].id);
16139 (yyvsp[-1].node_args) = args_with_numbered(p, (yyvsp[-1].node_args), max_numparam, it_id);
16140 (yyval.node) = NEW_ITER((yyvsp[-1].node_args), (yyvsp[0].node), &(yyloc));
16141 /*% ripper: do_block!($:args, $:bodystmt) %*/
16142 CMDARG_POP();
16143 restore_block_exit(p, (yyvsp[-2].node_exits));
16144 numparam_pop(p, (yyvsp[-4].node));
16145 dyna_pop(p, (yyvsp[-6].vars));
16146 }
16147#line 16148 "parse.c"
16148 break;
16149
16150 case 522: /* case_args: arg_value */
16151#line 5306 "parse.y"
16152 {
16153 check_literal_when(p, (yyvsp[0].node), &(yylsp[0]));
16154 (yyval.node) = NEW_LIST((yyvsp[0].node), &(yyloc));
16155 /*% ripper: args_add!(args_new!, $:arg_value) %*/
16156 }
16157#line 16158 "parse.c"
16158 break;
16159
16160 case 523: /* case_args: "*" arg_value */
16161#line 5312 "parse.y"
16162 {
16163 (yyval.node) = NEW_SPLAT((yyvsp[0].node), &(yyloc), &(yylsp[-1]));
16164 /*% ripper: args_add_star!(args_new!, $:arg_value) %*/
16165 }
16166#line 16167 "parse.c"
16167 break;
16168
16169 case 524: /* case_args: case_args ',' arg_value */
16170#line 5317 "parse.y"
16171 {
16172 check_literal_when(p, (yyvsp[0].node), &(yylsp[0]));
16173 (yyval.node) = last_arg_append(p, (yyvsp[-2].node), (yyvsp[0].node), &(yyloc));
16174 /*% ripper: args_add!($:non_last_args, $:arg_value) %*/
16175 }
16176#line 16177 "parse.c"
16177 break;
16178
16179 case 525: /* case_args: case_args ',' "*" arg_value */
16180#line 5323 "parse.y"
16181 {
16182 (yyval.node) = rest_arg_append(p, (yyvsp[-3].node), (yyvsp[0].node), &(yyloc));
16183 /*% ripper: args_add_star!($:non_last_args, $:arg_value) %*/
16184 }
16185#line 16186 "parse.c"
16186 break;
16187
16188 case 526: /* case_body: k_when case_args then compstmt_stmts cases */
16189#line 5332 "parse.y"
16190 {
16191 (yyval.node) = NEW_WHEN((yyvsp[-3].node), (yyvsp[-1].node), (yyvsp[0].node), &(yyloc), &(yylsp[-4]), &(yylsp[-2]));
16192 fixpos((yyval.node), (yyvsp[-3].node));
16193 /*% ripper: when!($:2, $:4, $:5) %*/
16194 }
16195#line 16196 "parse.c"
16196 break;
16197
16198 case 529: /* p_pvtbl: %empty */
16199#line 5343 "parse.y"
16200 {(yyval.tbl) = p->pvtbl; p->pvtbl = st_init_numtable();}
16201#line 16202 "parse.c"
16202 break;
16203
16204 case 530: /* p_pktbl: %empty */
16205#line 5344 "parse.y"
16206 {(yyval.tbl) = p->pktbl; p->pktbl = 0;}
16207#line 16208 "parse.c"
16208 break;
16209
16210 case 531: /* p_in_kwarg: %empty */
16211#line 5346 "parse.y"
16212 {
16213 (yyval.ctxt) = p->ctxt;
16214 SET_LEX_STATE(EXPR_BEG|EXPR_LABEL);
16215 p->command_start = FALSE;
16216 p->ctxt.in_kwarg = 1;
16217 p->ctxt.in_alt_pattern = 0;
16218 p->ctxt.capture_in_pattern = 0;
16219 }
16220#line 16221 "parse.c"
16221 break;
16222
16223 case 532: /* $@31: %empty */
16224#line 5359 "parse.y"
16225 {
16226 pop_pktbl(p, (yyvsp[-2].tbl));
16227 pop_pvtbl(p, (yyvsp[-3].tbl));
16228 p->ctxt.in_kwarg = (yyvsp[-4].ctxt).in_kwarg;
16229 p->ctxt.in_alt_pattern = (yyvsp[-4].ctxt).in_alt_pattern;
16230 p->ctxt.capture_in_pattern = (yyvsp[-4].ctxt).capture_in_pattern;
16231 }
16232#line 16233 "parse.c"
16233 break;
16234
16235 case 533: /* p_case_body: "'in'" p_in_kwarg p_pvtbl p_pktbl p_top_expr then $@31 compstmt_stmts p_cases */
16236#line 5368 "parse.y"
16237 {
16238 (yyval.node) = NEW_IN((yyvsp[-4].node), (yyvsp[-1].node), (yyvsp[0].node), &(yyloc), &(yylsp[-8]), &(yylsp[-3]), &NULL_LOC);
16239 /*% ripper: in!($:expr, $:compstmt, $:cases) %*/
16240 }
16241#line 16242 "parse.c"
16242 break;
16243
16244 case 537: /* p_top_expr: p_top_expr_body "'if' modifier" expr_value */
16245#line 5380 "parse.y"
16246 {
16247 (yyval.node) = new_if(p, (yyvsp[0].node), (yyvsp[-2].node), 0, &(yyloc), &(yylsp[-1]), &NULL_LOC, &NULL_LOC);
16248 fixpos((yyval.node), (yyvsp[0].node));
16249 /*% ripper: if_mod!($:3, $:1) %*/
16250 }
16251#line 16252 "parse.c"
16252 break;
16253
16254 case 538: /* p_top_expr: p_top_expr_body "'unless' modifier" expr_value */
16255#line 5386 "parse.y"
16256 {
16257 (yyval.node) = new_unless(p, (yyvsp[0].node), (yyvsp[-2].node), 0, &(yyloc), &(yylsp[-1]), &NULL_LOC, &NULL_LOC);
16258 fixpos((yyval.node), (yyvsp[0].node));
16259 /*% ripper: unless_mod!($:3, $:1) %*/
16260 }
16261#line 16262 "parse.c"
16262 break;
16263
16264 case 540: /* p_top_expr_body: p_expr ',' */
16265#line 5395 "parse.y"
16266 {
16267 (yyval.node) = new_array_pattern_tail(p, 0, 1, 0, 0, &(yyloc));
16268 (yyval.node) = new_array_pattern(p, 0, (yyvsp[-1].node), (yyval.node), &(yyloc));
16269 /*% ripper: aryptn!(Qnil, [$:1], Qnil, Qnil) %*/
16270 }
16271#line 16272 "parse.c"
16272 break;
16273
16274 case 541: /* p_top_expr_body: p_expr ',' p_args */
16275#line 5401 "parse.y"
16276 {
16277 (yyval.node) = new_array_pattern(p, 0, (yyvsp[-2].node), (yyvsp[0].node), &(yyloc));
16278 nd_set_first_loc((yyval.node), (yylsp[-2]).beg_pos);
16279 /*% ripper: aryptn!(Qnil, aryptn_pre_args(p, $:1, $:3[0]), *$:3[1..2]) %*/
16280 }
16281#line 16282 "parse.c"
16282 break;
16283
16284 case 542: /* p_top_expr_body: p_find */
16285#line 5407 "parse.y"
16286 {
16287 (yyval.node) = new_find_pattern(p, 0, (yyvsp[0].node), &(yyloc));
16288 /*% ripper: fndptn!(Qnil, *$:1[0..2]) %*/
16289 }
16290#line 16291 "parse.c"
16291 break;
16292
16293 case 543: /* p_top_expr_body: p_args_tail */
16294#line 5412 "parse.y"
16295 {
16296 (yyval.node) = new_array_pattern(p, 0, 0, (yyvsp[0].node), &(yyloc));
16297 /*% ripper: aryptn!(Qnil, *$:1[0..2]) %*/
16298 }
16299#line 16300 "parse.c"
16300 break;
16301
16302 case 544: /* p_top_expr_body: p_kwargs */
16303#line 5417 "parse.y"
16304 {
16305 (yyval.node) = new_hash_pattern(p, 0, (yyvsp[0].node), &(yyloc));
16306 /*% ripper: hshptn!(Qnil, *$:1[0..1]) %*/
16307 }
16308#line 16309 "parse.c"
16309 break;
16310
16311 case 546: /* p_as: p_expr "=>" p_variable */
16312#line 5427 "parse.y"
16313 {
16314 NODE *n = NEW_LIST((yyvsp[-2].node), &(yyloc));
16315 n = list_append(p, n, (yyvsp[0].node));
16316 (yyval.node) = new_hash(p, n, &(yyloc));
16317 /*% ripper: binary!($:1, ID2VAL((id_assoc)), $:3) %*/
16318 }
16319#line 16320 "parse.c"
16320 break;
16321
16322 case 548: /* $@32: %empty */
16323#line 5437 "parse.y"
16324 {
16325 p->ctxt.in_alt_pattern = 1;
16326 }
16327#line 16328 "parse.c"
16328 break;
16329
16330 case 549: /* p_alt: p_alt '|' $@32 p_expr_basic */
16331#line 5441 "parse.y"
16332 {
16333 if (p->ctxt.capture_in_pattern) {
16334 yyerror1(&(yylsp[-2]), "alternative pattern after variable capture");
16335 }
16336 p->ctxt.in_alt_pattern = 0;
16337 (yyval.node) = NEW_OR((yyvsp[-3].node), (yyvsp[0].node), &(yyloc), &(yylsp[-2]));
16338 /*% ripper: binary!($:left, ID2VAL(idOr), $:right) %*/
16339 }
16340#line 16341 "parse.c"
16341 break;
16342
16343 case 551: /* p_lparen: '(' p_pktbl */
16344#line 5453 "parse.y"
16345 {
16346 (yyval.tbl) = (yyvsp[0].tbl);
16347 /*% ripper: $:2 %*/
16348 }
16349#line 16350 "parse.c"
16350 break;
16351
16352 case 552: /* p_lbracket: '[' p_pktbl */
16353#line 5460 "parse.y"
16354 {
16355 (yyval.tbl) = (yyvsp[0].tbl);
16356 /*% ripper: $:2 %*/
16357 }
16358#line 16359 "parse.c"
16359 break;
16360
16361 case 555: /* p_expr_basic: p_const p_lparen p_args rparen */
16362#line 5469 "parse.y"
16363 {
16364 pop_pktbl(p, (yyvsp[-2].tbl));
16365 (yyval.node) = new_array_pattern(p, (yyvsp[-3].node), 0, (yyvsp[-1].node), &(yyloc));
16366 nd_set_first_loc((yyval.node), (yylsp[-3]).beg_pos);
16367 /*% ripper: aryptn!($:p_const, *$:p_args[0..2]) %*/
16368 }
16369#line 16370 "parse.c"
16370 break;
16371
16372 case 556: /* p_expr_basic: p_const p_lparen p_find rparen */
16373#line 5476 "parse.y"
16374 {
16375 pop_pktbl(p, (yyvsp[-2].tbl));
16376 (yyval.node) = new_find_pattern(p, (yyvsp[-3].node), (yyvsp[-1].node), &(yyloc));
16377 nd_set_first_loc((yyval.node), (yylsp[-3]).beg_pos);
16378 /*% ripper: fndptn!($:p_const, *$:p_find[0..2]) %*/
16379 }
16380#line 16381 "parse.c"
16381 break;
16382
16383 case 557: /* p_expr_basic: p_const p_lparen p_kwargs rparen */
16384#line 5483 "parse.y"
16385 {
16386 pop_pktbl(p, (yyvsp[-2].tbl));
16387 (yyval.node) = new_hash_pattern(p, (yyvsp[-3].node), (yyvsp[-1].node), &(yyloc));
16388 nd_set_first_loc((yyval.node), (yylsp[-3]).beg_pos);
16389 /*% ripper: hshptn!($:p_const, *$:p_kwargs[0..1]) %*/
16390 }
16391#line 16392 "parse.c"
16392 break;
16393
16394 case 558: /* p_expr_basic: p_const '(' rparen */
16395#line 5490 "parse.y"
16396 {
16397 (yyval.node) = new_array_pattern_tail(p, 0, 0, 0, 0, &(yyloc));
16398 (yyval.node) = new_array_pattern(p, (yyvsp[-2].node), 0, (yyval.node), &(yyloc));
16399 /*% ripper: aryptn!($:p_const, Qnil, Qnil, Qnil) %*/
16400 }
16401#line 16402 "parse.c"
16402 break;
16403
16404 case 559: /* p_expr_basic: p_const p_lbracket p_args rbracket */
16405#line 5496 "parse.y"
16406 {
16407 pop_pktbl(p, (yyvsp[-2].tbl));
16408 (yyval.node) = new_array_pattern(p, (yyvsp[-3].node), 0, (yyvsp[-1].node), &(yyloc));
16409 nd_set_first_loc((yyval.node), (yylsp[-3]).beg_pos);
16410 /*% ripper: aryptn!($:p_const, *$:p_args[0..2]) %*/
16411 }
16412#line 16413 "parse.c"
16413 break;
16414
16415 case 560: /* p_expr_basic: p_const p_lbracket p_find rbracket */
16416#line 5503 "parse.y"
16417 {
16418 pop_pktbl(p, (yyvsp[-2].tbl));
16419 (yyval.node) = new_find_pattern(p, (yyvsp[-3].node), (yyvsp[-1].node), &(yyloc));
16420 nd_set_first_loc((yyval.node), (yylsp[-3]).beg_pos);
16421 /*% ripper: fndptn!($:p_const, *$:p_find[0..2]) %*/
16422 }
16423#line 16424 "parse.c"
16424 break;
16425
16426 case 561: /* p_expr_basic: p_const p_lbracket p_kwargs rbracket */
16427#line 5510 "parse.y"
16428 {
16429 pop_pktbl(p, (yyvsp[-2].tbl));
16430 (yyval.node) = new_hash_pattern(p, (yyvsp[-3].node), (yyvsp[-1].node), &(yyloc));
16431 nd_set_first_loc((yyval.node), (yylsp[-3]).beg_pos);
16432 /*% ripper: hshptn!($:p_const, *$:p_kwargs[0..1]) %*/
16433 }
16434#line 16435 "parse.c"
16435 break;
16436
16437 case 562: /* p_expr_basic: p_const '[' rbracket */
16438#line 5517 "parse.y"
16439 {
16440 (yyval.node) = new_array_pattern_tail(p, 0, 0, 0, 0, &(yyloc));
16441 (yyval.node) = new_array_pattern(p, (yyvsp[-2].node), 0, (yyval.node), &(yyloc));
16442 /*% ripper: aryptn!($:p_const, Qnil, Qnil, Qnil) %*/
16443 }
16444#line 16445 "parse.c"
16445 break;
16446
16447 case 563: /* p_expr_basic: "[" p_args rbracket */
16448#line 5523 "parse.y"
16449 {
16450 (yyval.node) = new_array_pattern(p, 0, 0, (yyvsp[-1].node), &(yyloc));
16451 /*% ripper: aryptn!(Qnil, *$:p_args[0..2]) %*/
16452 }
16453#line 16454 "parse.c"
16454 break;
16455
16456 case 564: /* p_expr_basic: "[" p_find rbracket */
16457#line 5528 "parse.y"
16458 {
16459 (yyval.node) = new_find_pattern(p, 0, (yyvsp[-1].node), &(yyloc));
16460 /*% ripper: fndptn!(Qnil, *$:p_find[0..2]) %*/
16461 }
16462#line 16463 "parse.c"
16463 break;
16464
16465 case 565: /* p_expr_basic: "[" rbracket */
16466#line 5533 "parse.y"
16467 {
16468 (yyval.node) = new_array_pattern_tail(p, 0, 0, 0, 0, &(yyloc));
16469 (yyval.node) = new_array_pattern(p, 0, 0, (yyval.node), &(yyloc));
16470 /*% ripper: aryptn!(Qnil, Qnil, Qnil, Qnil) %*/
16471 }
16472#line 16473 "parse.c"
16473 break;
16474
16475 case 566: /* $@33: %empty */
16476#line 5539 "parse.y"
16477 {
16478 p->ctxt.in_kwarg = 0;
16479 }
16480#line 16481 "parse.c"
16481 break;
16482
16483 case 567: /* p_expr_basic: "{" p_pktbl lex_ctxt $@33 p_kwargs rbrace */
16484#line 5543 "parse.y"
16485 {
16486 pop_pktbl(p, (yyvsp[-4].tbl));
16487 p->ctxt.in_kwarg = (yyvsp[-3].ctxt).in_kwarg;
16488 (yyval.node) = new_hash_pattern(p, 0, (yyvsp[-1].node), &(yyloc));
16489 /*% ripper: hshptn!(Qnil, *$:p_kwargs[0..1]) %*/
16490 }
16491#line 16492 "parse.c"
16492 break;
16493
16494 case 568: /* p_expr_basic: "{" rbrace */
16495#line 5550 "parse.y"
16496 {
16497 (yyval.node) = new_hash_pattern_tail(p, 0, 0, &(yyloc));
16498 (yyval.node) = new_hash_pattern(p, 0, (yyval.node), &(yyloc));
16499 /*% ripper: hshptn!(Qnil, Qnil, Qnil) %*/
16500 }
16501#line 16502 "parse.c"
16502 break;
16503
16504 case 569: /* p_expr_basic: "(" p_pktbl p_expr rparen */
16505#line 5556 "parse.y"
16506 {
16507 pop_pktbl(p, (yyvsp[-2].tbl));
16508 (yyval.node) = (yyvsp[-1].node);
16509 /*% ripper: $:p_expr %*/
16510 }
16511#line 16512 "parse.c"
16512 break;
16513
16514 case 570: /* p_args: p_expr */
16515#line 5564 "parse.y"
16516 {
16517 NODE *pre_args = NEW_LIST((yyvsp[0].node), &(yyloc));
16518 (yyval.node) = new_array_pattern_tail(p, pre_args, 0, 0, 0, &(yyloc));
16519 /*% ripper: [[$:1], Qnil, Qnil] %*/
16520 }
16521#line 16522 "parse.c"
16522 break;
16523
16524 case 571: /* p_args: p_args_head */
16525#line 5570 "parse.y"
16526 {
16527 (yyval.node) = new_array_pattern_tail(p, (yyvsp[0].node), 1, 0, 0, &(yyloc));
16528 /*% ripper: [$:1, Qnil, Qnil] %*/
16529 }
16530#line 16531 "parse.c"
16531 break;
16532
16533 case 572: /* p_args: p_args_head p_arg */
16534#line 5575 "parse.y"
16535 {
16536 (yyval.node) = new_array_pattern_tail(p, list_concat((yyvsp[-1].node), (yyvsp[0].node)), 0, 0, 0, &(yyloc));
16537 /*% ripper: [rb_ary_concat($:1, $:2), Qnil, Qnil] %*/
16538 }
16539#line 16540 "parse.c"
16540 break;
16541
16542 case 573: /* p_args: p_args_head p_rest */
16543#line 5580 "parse.y"
16544 {
16545 (yyval.node) = new_array_pattern_tail(p, (yyvsp[-1].node), 1, (yyvsp[0].node), 0, &(yyloc));
16546 /*% ripper: [$:1, $:2, Qnil] %*/
16547 }
16548#line 16549 "parse.c"
16549 break;
16550
16551 case 574: /* p_args: p_args_head p_rest ',' p_args_post */
16552#line 5585 "parse.y"
16553 {
16554 (yyval.node) = new_array_pattern_tail(p, (yyvsp[-3].node), 1, (yyvsp[-2].node), (yyvsp[0].node), &(yyloc));
16555 /*% ripper: [$:1, $:2, $:4] %*/
16556 }
16557#line 16558 "parse.c"
16558 break;
16559
16560 case 577: /* p_args_head: p_args_head p_arg ',' */
16561#line 5594 "parse.y"
16562 {
16563 (yyval.node) = list_concat((yyvsp[-2].node), (yyvsp[-1].node));
16564 /*% ripper: rb_ary_concat($:1, $:2) %*/
16565 }
16566#line 16567 "parse.c"
16567 break;
16568
16569 case 578: /* p_args_tail: p_rest */
16570#line 5601 "parse.y"
16571 {
16572 (yyval.node) = new_array_pattern_tail(p, 0, 1, (yyvsp[0].node), 0, &(yyloc));
16573 /*% ripper: [Qnil, $:1, Qnil] %*/
16574 }
16575#line 16576 "parse.c"
16576 break;
16577
16578 case 579: /* p_args_tail: p_rest ',' p_args_post */
16579#line 5606 "parse.y"
16580 {
16581 (yyval.node) = new_array_pattern_tail(p, 0, 1, (yyvsp[-2].node), (yyvsp[0].node), &(yyloc));
16582 /*% ripper: [Qnil, $:1, $:3] %*/
16583 }
16584#line 16585 "parse.c"
16585 break;
16586
16587 case 580: /* p_find: p_rest ',' p_args_post ',' p_rest */
16588#line 5613 "parse.y"
16589 {
16590 (yyval.node) = new_find_pattern_tail(p, (yyvsp[-4].node), (yyvsp[-2].node), (yyvsp[0].node), &(yyloc));
16591 /*% ripper: [$:1, $:3, $:5] %*/
16592 }
16593#line 16594 "parse.c"
16594 break;
16595
16596 case 581: /* p_rest: "*" "local variable or method" */
16597#line 5621 "parse.y"
16598 {
16599 error_duplicate_pattern_variable(p, (yyvsp[0].id), &(yylsp[0]));
16600 /*% ripper: var_field!($:2) %*/
16601 (yyval.node) = assignable(p, (yyvsp[0].id), 0, &(yyloc));
16602 }
16603#line 16604 "parse.c"
16604 break;
16605
16606 case 582: /* p_rest: "*" */
16607#line 5627 "parse.y"
16608 {
16609 (yyval.node) = 0;
16610 /*% ripper: var_field!(Qnil) %*/
16611 }
16612#line 16613 "parse.c"
16613 break;
16614
16615 case 584: /* p_args_post: p_args_post ',' p_arg */
16616#line 5635 "parse.y"
16617 {
16618 (yyval.node) = list_concat((yyvsp[-2].node), (yyvsp[0].node));
16619 /*% ripper: rb_ary_concat($:1, $:3) %*/
16620 }
16621#line 16622 "parse.c"
16622 break;
16623
16624 case 585: /* p_arg: p_expr */
16625#line 5642 "parse.y"
16626 {
16627 (yyval.node) = NEW_LIST((yyvsp[0].node), &(yyloc));
16628 /*% ripper: [$:1] %*/
16629 }
16630#line 16631 "parse.c"
16631 break;
16632
16633 case 586: /* p_kwargs: p_kwarg ',' p_any_kwrest */
16634#line 5649 "parse.y"
16635 {
16636 (yyval.node) = new_hash_pattern_tail(p, new_unique_key_hash(p, (yyvsp[-2].node), &(yyloc)), (yyvsp[0].id), &(yyloc));
16637 /*% ripper: [$:1, $:3] %*/
16638 }
16639#line 16640 "parse.c"
16640 break;
16641
16642 case 587: /* p_kwargs: p_kwarg */
16643#line 5654 "parse.y"
16644 {
16645 (yyval.node) = new_hash_pattern_tail(p, new_unique_key_hash(p, (yyvsp[0].node), &(yyloc)), 0, &(yyloc));
16646 /*% ripper: [$:1, Qnil] %*/
16647 }
16648#line 16649 "parse.c"
16649 break;
16650
16651 case 588: /* p_kwargs: p_kwarg ',' */
16652#line 5659 "parse.y"
16653 {
16654 (yyval.node) = new_hash_pattern_tail(p, new_unique_key_hash(p, (yyvsp[-1].node), &(yyloc)), 0, &(yyloc));
16655 /*% ripper: [$:1, Qnil] %*/
16656 }
16657#line 16658 "parse.c"
16658 break;
16659
16660 case 589: /* p_kwargs: p_any_kwrest */
16661#line 5664 "parse.y"
16662 {
16663 (yyval.node) = new_hash_pattern_tail(p, new_hash(p, 0, &(yyloc)), (yyvsp[0].id), &(yyloc));
16664 /*% ripper: [[], $:1] %*/
16665 }
16666#line 16667 "parse.c"
16667 break;
16668
16669 case 591: /* p_kwarg: p_kwarg ',' p_kw */
16670#line 5673 "parse.y"
16671 {
16672 (yyval.node) = list_concat((yyvsp[-2].node), (yyvsp[0].node));
16673 /*% ripper: rb_ary_push($:1, $:3) %*/
16674 }
16675#line 16676 "parse.c"
16676 break;
16677
16678 case 592: /* p_kw: p_kw_label p_expr */
16679#line 5680 "parse.y"
16680 {
16681 error_duplicate_pattern_key(p, (yyvsp[-1].id), &(yylsp[-1]));
16682 (yyval.node) = list_append(p, NEW_LIST(NEW_SYM(rb_id2str((yyvsp[-1].id)), &(yylsp[-1])), &(yyloc)), (yyvsp[0].node));
16683 /*% ripper: [$:1, $:2] %*/
16684 }
16685#line 16686 "parse.c"
16686 break;
16687
16688 case 593: /* p_kw: p_kw_label */
16689#line 5686 "parse.y"
16690 {
16691 error_duplicate_pattern_key(p, (yyvsp[0].id), &(yylsp[0]));
16692 if ((yyvsp[0].id) && !is_local_id((yyvsp[0].id))) {
16693 yyerror1(&(yylsp[0]), "key must be valid as local variables");
16694 }
16695 error_duplicate_pattern_variable(p, (yyvsp[0].id), &(yylsp[0]));
16696 (yyval.node) = list_append(p, NEW_LIST(NEW_SYM(rb_id2str((yyvsp[0].id)), &(yyloc)), &(yyloc)), assignable(p, (yyvsp[0].id), 0, &(yyloc)));
16697 /*% ripper: [$:1, Qnil] %*/
16698 }
16699#line 16700 "parse.c"
16700 break;
16701
16702 case 595: /* p_kw_label: "string literal" string_contents tLABEL_END */
16703#line 5699 "parse.y"
16704 {
16705 YYLTYPE loc = code_loc_gen(&(yylsp[-2]), &(yylsp[0]));
16706 if (!(yyvsp[-1].node) || nd_type_p((yyvsp[-1].node), NODE_STR)) {
16707 NODE *node = dsym_node(p, (yyvsp[-1].node), &loc);
16708 (yyval.id) = rb_sym2id(rb_node_sym_string_val(node));
16709 }
16710 else {
16711 yyerror1(&loc, "symbol literal with interpolation is not allowed");
16712 (yyval.id) = rb_intern_str(STR_NEW0());
16713 }
16714 /*% ripper: $:2 %*/
16715 }
16716#line 16717 "parse.c"
16717 break;
16718
16719 case 596: /* p_kwrest: kwrest_mark "local variable or method" */
16720#line 5714 "parse.y"
16721 {
16722 (yyval.id) = (yyvsp[0].id);
16723 /*% ripper: var_field!($:2) %*/
16724 }
16725#line 16726 "parse.c"
16726 break;
16727
16728 case 597: /* p_kwrest: kwrest_mark */
16729#line 5719 "parse.y"
16730 {
16731 (yyval.id) = 0;
16732 /*% ripper: Qnil %*/
16733 }
16734#line 16735 "parse.c"
16735 break;
16736
16737 case 598: /* p_kwnorest: kwrest_mark "'nil'" */
16738#line 5726 "parse.y"
16739 {
16740 (yyval.id) = 0;
16741 }
16742#line 16743 "parse.c"
16743 break;
16744
16745 case 600: /* p_any_kwrest: p_kwnorest */
16746#line 5733 "parse.y"
16747 {
16748 (yyval.id) = idNil;
16749 /*% ripper: var_field!(ID2VAL(idNil)) %*/
16750 }
16751#line 16752 "parse.c"
16752 break;
16753
16754 case 602: /* range_expr_p_primitive: p_primitive ".." p_primitive */
16755#line 3114 "parse.y"
16756 {
16757 value_expr(p, (yyvsp[-2].node));
16758 value_expr(p, (yyvsp[0].node));
16759 (yyval.node) = NEW_DOT2((yyvsp[-2].node), (yyvsp[0].node), &(yyloc), &(yylsp[-1]));
16760 /*% ripper: dot2!($:1, $:3) %*/
16761 }
16762#line 16763 "parse.c"
16763 break;
16764
16765 case 603: /* range_expr_p_primitive: p_primitive "..." p_primitive */
16766#line 3121 "parse.y"
16767 {
16768 value_expr(p, (yyvsp[-2].node));
16769 value_expr(p, (yyvsp[0].node));
16770 (yyval.node) = NEW_DOT3((yyvsp[-2].node), (yyvsp[0].node), &(yyloc), &(yylsp[-1]));
16771 /*% ripper: dot3!($:1, $:3) %*/
16772 }
16773#line 16774 "parse.c"
16774 break;
16775
16776 case 604: /* range_expr_p_primitive: p_primitive ".." */
16777#line 3128 "parse.y"
16778 {
16779 value_expr(p, (yyvsp[-1].node));
16780 (yyval.node) = NEW_DOT2((yyvsp[-1].node), new_nil_at(p, &(yylsp[0]).end_pos), &(yyloc), &(yylsp[0]));
16781 /*% ripper: dot2!($:1, Qnil) %*/
16782 }
16783#line 16784 "parse.c"
16784 break;
16785
16786 case 605: /* range_expr_p_primitive: p_primitive "..." */
16787#line 3134 "parse.y"
16788 {
16789 value_expr(p, (yyvsp[-1].node));
16790 (yyval.node) = NEW_DOT3((yyvsp[-1].node), new_nil_at(p, &(yylsp[0]).end_pos), &(yyloc), &(yylsp[0]));
16791 /*% ripper: dot3!($:1, Qnil) %*/
16792 }
16793#line 16794 "parse.c"
16794 break;
16795
16796 case 606: /* range_expr_p_primitive: "(.." p_primitive */
16797#line 3140 "parse.y"
16798 {
16799 value_expr(p, (yyvsp[0].node));
16800 (yyval.node) = NEW_DOT2(new_nil_at(p, &(yylsp[-1]).beg_pos), (yyvsp[0].node), &(yyloc), &(yylsp[-1]));
16801 /*% ripper: dot2!(Qnil, $:2) %*/
16802 }
16803#line 16804 "parse.c"
16804 break;
16805
16806 case 607: /* range_expr_p_primitive: "(..." p_primitive */
16807#line 3146 "parse.y"
16808 {
16809 value_expr(p, (yyvsp[0].node));
16810 (yyval.node) = NEW_DOT3(new_nil_at(p, &(yylsp[-1]).beg_pos), (yyvsp[0].node), &(yyloc), &(yylsp[-1]));
16811 /*% ripper: dot3!(Qnil, $:2) %*/
16812 }
16813#line 16814 "parse.c"
16814 break;
16815
16816 case 620: /* p_primitive: keyword_variable */
16817#line 5748 "parse.y"
16818 {
16819 if (!((yyval.node) = gettable(p, (yyvsp[0].id), &(yyloc)))) (yyval.node) = NEW_ERROR(&(yyloc));
16820 /*% ripper: var_ref!($:1) %*/
16821 }
16822#line 16823 "parse.c"
16823 break;
16824
16825 case 622: /* p_variable: "local variable or method" */
16826#line 5756 "parse.y"
16827 {
16828 error_duplicate_pattern_variable(p, (yyvsp[0].id), &(yylsp[0]));
16829 /*% ripper: var_field!($:1) %*/
16830 (yyval.node) = assignable(p, (yyvsp[0].id), 0, &(yyloc));
16831 }
16832#line 16833 "parse.c"
16833 break;
16834
16835 case 623: /* p_var_ref: '^' "local variable or method" */
16836#line 5764 "parse.y"
16837 {
16838 NODE *n = gettable(p, (yyvsp[0].id), &(yyloc));
16839 if (!n) {
16840 n = NEW_ERROR(&(yyloc));
16841 }
16842 else if (!(nd_type_p(n, NODE_LVAR) || nd_type_p(n, NODE_DVAR))) {
16843 compile_error(p, "%"PRIsVALUE": no such local variable", rb_id2str((yyvsp[0].id)));
16844 }
16845 (yyval.node) = n;
16846 /*% ripper: var_ref!($:2) %*/
16847 }
16848#line 16849 "parse.c"
16849 break;
16850
16851 case 624: /* p_var_ref: '^' nonlocal_var */
16852#line 5776 "parse.y"
16853 {
16854 if (!((yyval.node) = gettable(p, (yyvsp[0].id), &(yyloc)))) (yyval.node) = NEW_ERROR(&(yyloc));
16855 /*% ripper: var_ref!($:2) %*/
16856 }
16857#line 16858 "parse.c"
16858 break;
16859
16860 case 625: /* p_expr_ref: '^' "(" expr_value rparen */
16861#line 5783 "parse.y"
16862 {
16863 (yyval.node) = NEW_BLOCK((yyvsp[-1].node), &(yyloc));
16864 /*% ripper: begin!($:3) %*/
16865 }
16866#line 16867 "parse.c"
16867 break;
16868
16869 case 626: /* p_const: ":: at EXPR_BEG" cname */
16870#line 5790 "parse.y"
16871 {
16872 (yyval.node) = NEW_COLON3((yyvsp[0].id), &(yyloc), &(yylsp[-1]), &(yylsp[0]));
16873 /*% ripper: top_const_ref!($:2) %*/
16874 }
16875#line 16876 "parse.c"
16876 break;
16877
16878 case 627: /* p_const: p_const "::" cname */
16879#line 5795 "parse.y"
16880 {
16881 (yyval.node) = NEW_COLON2((yyvsp[-2].node), (yyvsp[0].id), &(yyloc), &(yylsp[-1]), &(yylsp[0]));
16882 /*% ripper: const_path_ref!($:1, $:3) %*/
16883 }
16884#line 16885 "parse.c"
16885 break;
16886
16887 case 628: /* p_const: "constant" */
16888#line 5800 "parse.y"
16889 {
16890 (yyval.node) = gettable(p, (yyvsp[0].id), &(yyloc));
16891 /*% ripper: var_ref!($:1) %*/
16892 }
16893#line 16894 "parse.c"
16894 break;
16895
16896 case 629: /* opt_rescue: k_rescue exc_list exc_var then compstmt_stmts opt_rescue */
16897#line 5809 "parse.y"
16898 {
16899 NODE *err = (yyvsp[-3].node);
16900 if ((yyvsp[-3].node)) {
16901 err = NEW_ERRINFO(&(yylsp[-3]));
16902 err = node_assign(p, (yyvsp[-3].node), err, NO_LEX_CTXT, &(yylsp[-3]));
16903 }
16904 (yyval.node) = NEW_RESBODY((yyvsp[-4].node), (yyvsp[-3].node), (yyvsp[-1].node), (yyvsp[0].node), &(yyloc));
16905 if ((yyvsp[-4].node)) {
16906 fixpos((yyval.node), (yyvsp[-4].node));
16907 }
16908 else if ((yyvsp[-3].node)) {
16909 fixpos((yyval.node), (yyvsp[-3].node));
16910 }
16911 else {
16912 fixpos((yyval.node), (yyvsp[-1].node));
16913 }
16914 /*% ripper: rescue!($:2, $:3, $:5, $:6) %*/
16915 }
16916#line 16917 "parse.c"
16917 break;
16918
16919 case 631: /* exc_list: arg_value */
16920#line 5831 "parse.y"
16921 {
16922 (yyval.node) = NEW_LIST((yyvsp[0].node), &(yyloc));
16923 /*% ripper: rb_ary_new3(1, $:1) %*/
16924 }
16925#line 16926 "parse.c"
16926 break;
16927
16928 case 632: /* exc_list: mrhs */
16929#line 5836 "parse.y"
16930 {
16931 if (!((yyval.node) = splat_array((yyvsp[0].node)))) (yyval.node) = (yyvsp[0].node);
16932 }
16933#line 16934 "parse.c"
16934 break;
16935
16936 case 634: /* exc_var: "=>" lhs */
16937#line 5843 "parse.y"
16938 {
16939 (yyval.node) = (yyvsp[0].node);
16940 /*% ripper: $:2 %*/
16941 }
16942#line 16943 "parse.c"
16943 break;
16944
16945 case 636: /* opt_ensure: k_ensure stmts option_terms */
16946#line 5851 "parse.y"
16947 {
16948 p->ctxt.in_rescue = (yyvsp[-2].ctxt).in_rescue;
16949 (yyval.node) = (yyvsp[-1].node);
16950 void_expr(p, void_stmts(p, (yyval.node)));
16951 /*% ripper: ensure!($:2) %*/
16952 }
16953#line 16954 "parse.c"
16954 break;
16955
16956 case 640: /* strings: string */
16957#line 5865 "parse.y"
16958 {
16959 if (!(yyvsp[0].node)) {
16960 (yyval.node) = NEW_STR(STRING_NEW0(), &(yyloc));
16961 }
16962 else {
16963 (yyval.node) = evstr2dstr(p, (yyvsp[0].node));
16964 }
16965 /*% ripper: $:1 %*/
16966 }
16967#line 16968 "parse.c"
16968 break;
16969
16970 case 643: /* string: string string1 */
16971#line 5879 "parse.y"
16972 {
16973 (yyval.node) = literal_concat(p, (yyvsp[-1].node), (yyvsp[0].node), &(yyloc));
16974 /*% ripper: string_concat!($:1, $:2) %*/
16975 }
16976#line 16977 "parse.c"
16977 break;
16978
16979 case 644: /* string1: "string literal" string_contents "terminator" */
16980#line 5886 "parse.y"
16981 {
16982 (yyval.node) = heredoc_dedent(p, (yyvsp[-1].node));
16983 if ((yyval.node)) nd_set_loc((yyval.node), &(yyloc));
16984 /*% ripper: $:2 %*/
16985 if (p->heredoc_indent > 0) {
16986 /*% ripper: heredoc_dedent!($:$, INT2NUM(%{p->heredoc_indent})) %*/
16987 p->heredoc_indent = 0;
16988 }
16989 /*% ripper: string_literal!($:$) %*/
16990 }
16991#line 16992 "parse.c"
16992 break;
16993
16994 case 645: /* xstring: "backtick literal" xstring_contents "terminator" */
16995#line 5899 "parse.y"
16996 {
16997 (yyval.node) = new_xstring(p, heredoc_dedent(p, (yyvsp[-1].node)), &(yyloc));
16998 /*% ripper: $:2 %*/
16999 if (p->heredoc_indent > 0) {
17000 /*% ripper: heredoc_dedent!($:$, INT2NUM(%{p->heredoc_indent})) %*/
17001 p->heredoc_indent = 0;
17002 }
17003 /*% ripper: xstring_literal!($:$) %*/
17004 }
17005#line 17006 "parse.c"
17006 break;
17007
17008 case 646: /* regexp: "regexp literal" regexp_contents tREGEXP_END */
17009#line 5911 "parse.y"
17010 {
17011 (yyval.node) = new_regexp(p, (yyvsp[-1].node), (yyvsp[0].num), &(yyloc), &(yylsp[-2]), &(yylsp[-1]), &(yylsp[0]));
17012 /*% ripper: regexp_literal!($:2, $:3) %*/
17013 }
17014#line 17015 "parse.c"
17015 break;
17016
17017 case 649: /* words_tWORDS_BEG_word_list: "word list" nonempty_list_' ' word_list "terminator" */
17018#line 3163 "parse.y"
17019 {
17020 (yyval.node) = make_list((yyvsp[-1].node), &(yyloc));
17021 /*% ripper: array!($:word_list) %*/
17022 }
17023#line 17024 "parse.c"
17024 break;
17025
17026 case 651: /* word_list: %empty */
17027#line 5921 "parse.y"
17028 {
17029 (yyval.node) = 0;
17030 /*% ripper: words_new! %*/
17031 }
17032#line 17033 "parse.c"
17033 break;
17034
17035 case 652: /* word_list: word_list word nonempty_list_' ' */
17036#line 5926 "parse.y"
17037 {
17038 (yyval.node) = list_append(p, (yyvsp[-2].node), evstr2dstr(p, (yyvsp[-1].node)));
17039 /*% ripper: words_add!($:1, $:2) %*/
17040 }
17041#line 17042 "parse.c"
17042 break;
17043
17044 case 654: /* word: word string_content */
17045#line 5935 "parse.y"
17046 {
17047 (yyval.node) = literal_concat(p, (yyvsp[-1].node), (yyvsp[0].node), &(yyloc));
17048 /*% ripper: word_add!($:1, $:2) %*/
17049 }
17050#line 17051 "parse.c"
17051 break;
17052
17053 case 655: /* words_tSYMBOLS_BEG_symbol_list: "symbol list" nonempty_list_' ' symbol_list "terminator" */
17054#line 3163 "parse.y"
17055 {
17056 (yyval.node) = make_list((yyvsp[-1].node), &(yyloc));
17057 /*% ripper: array!($:word_list) %*/
17058 }
17059#line 17060 "parse.c"
17060 break;
17061
17062 case 657: /* symbol_list: %empty */
17063#line 5945 "parse.y"
17064 {
17065 (yyval.node) = 0;
17066 /*% ripper: symbols_new! %*/
17067 }
17068#line 17069 "parse.c"
17069 break;
17070
17071 case 658: /* symbol_list: symbol_list word nonempty_list_' ' */
17072#line 5950 "parse.y"
17073 {
17074 (yyval.node) = symbol_append(p, (yyvsp[-2].node), evstr2dstr(p, (yyvsp[-1].node)));
17075 /*% ripper: symbols_add!($:1, $:2) %*/
17076 }
17077#line 17078 "parse.c"
17078 break;
17079
17080 case 659: /* words_tQWORDS_BEG_qword_list: "verbatim word list" nonempty_list_' ' qword_list "terminator" */
17081#line 3163 "parse.y"
17082 {
17083 (yyval.node) = make_list((yyvsp[-1].node), &(yyloc));
17084 /*% ripper: array!($:word_list) %*/
17085 }
17086#line 17087 "parse.c"
17087 break;
17088
17089 case 661: /* words_tQSYMBOLS_BEG_qsym_list: "verbatim symbol list" nonempty_list_' ' qsym_list "terminator" */
17090#line 3163 "parse.y"
17091 {
17092 (yyval.node) = make_list((yyvsp[-1].node), &(yyloc));
17093 /*% ripper: array!($:word_list) %*/
17094 }
17095#line 17096 "parse.c"
17096 break;
17097
17098 case 663: /* qword_list: %empty */
17099#line 5963 "parse.y"
17100 {
17101 (yyval.node) = 0;
17102 /*% ripper: qwords_new! %*/
17103 }
17104#line 17105 "parse.c"
17105 break;
17106
17107 case 664: /* qword_list: qword_list "literal content" nonempty_list_' ' */
17108#line 5968 "parse.y"
17109 {
17110 (yyval.node) = list_append(p, (yyvsp[-2].node), (yyvsp[-1].node));
17111 /*% ripper: qwords_add!($:1, $:2) %*/
17112 }
17113#line 17114 "parse.c"
17114 break;
17115
17116 case 665: /* qsym_list: %empty */
17117#line 5975 "parse.y"
17118 {
17119 (yyval.node) = 0;
17120 /*% ripper: qsymbols_new! %*/
17121 }
17122#line 17123 "parse.c"
17123 break;
17124
17125 case 666: /* qsym_list: qsym_list "literal content" nonempty_list_' ' */
17126#line 5980 "parse.y"
17127 {
17128 (yyval.node) = symbol_append(p, (yyvsp[-2].node), (yyvsp[-1].node));
17129 /*% ripper: qsymbols_add!($:1, $:2) %*/
17130 }
17131#line 17132 "parse.c"
17132 break;
17133
17134 case 667: /* string_contents: %empty */
17135#line 5987 "parse.y"
17136 {
17137 (yyval.node) = 0;
17138 /*% ripper: string_content! %*/
17139 }
17140#line 17141 "parse.c"
17141 break;
17142
17143 case 668: /* string_contents: string_contents string_content */
17144#line 5992 "parse.y"
17145 {
17146 (yyval.node) = literal_concat(p, (yyvsp[-1].node), (yyvsp[0].node), &(yyloc));
17147 /*% ripper: string_add!($:1, $:2) %*/
17148 }
17149#line 17150 "parse.c"
17150 break;
17151
17152 case 669: /* xstring_contents: %empty */
17153#line 5999 "parse.y"
17154 {
17155 (yyval.node) = 0;
17156 /*% ripper: xstring_new! %*/
17157 }
17158#line 17159 "parse.c"
17159 break;
17160
17161 case 670: /* xstring_contents: xstring_contents string_content */
17162#line 6004 "parse.y"
17163 {
17164 (yyval.node) = literal_concat(p, (yyvsp[-1].node), (yyvsp[0].node), &(yyloc));
17165 /*% ripper: xstring_add!($:1, $:2) %*/
17166 }
17167#line 17168 "parse.c"
17168 break;
17169
17170 case 671: /* regexp_contents: %empty */
17171#line 6011 "parse.y"
17172 {
17173 (yyval.node) = 0;
17174 /*% ripper: regexp_new! %*/
17175 }
17176#line 17177 "parse.c"
17177 break;
17178
17179 case 672: /* regexp_contents: regexp_contents string_content */
17180#line 6016 "parse.y"
17181 {
17182 NODE *head = (yyvsp[-1].node), *tail = (yyvsp[0].node);
17183 if (!head) {
17184 (yyval.node) = tail;
17185 }
17186 else if (!tail) {
17187 (yyval.node) = head;
17188 }
17189 else {
17190 switch (nd_type(head)) {
17191 case NODE_STR:
17192 head = str2dstr(p, head);
17193 break;
17194 case NODE_DSTR:
17195 break;
17196 default:
17197 head = list_append(p, NEW_DSTR(0, &(yyloc)), head);
17198 break;
17199 }
17200 (yyval.node) = list_append(p, head, tail);
17201 }
17202 /*% ripper: regexp_add!($:1, $:2) %*/
17203 }
17204#line 17205 "parse.c"
17205 break;
17206
17207 case 674: /* @34: %empty */
17208#line 6044 "parse.y"
17209 {
17210 /* need to backup p->lex.strterm so that a string literal `%&foo,#$&,bar&` can be parsed */
17211 (yyval.strterm) = p->lex.strterm;
17212 p->lex.strterm = 0;
17213 SET_LEX_STATE(EXPR_BEG);
17214 }
17215#line 17216 "parse.c"
17216 break;
17217
17218 case 675: /* string_content: tSTRING_DVAR @34 string_dvar */
17219#line 6051 "parse.y"
17220 {
17221 p->lex.strterm = (yyvsp[-1].strterm);
17222 (yyval.node) = NEW_EVSTR((yyvsp[0].node), &(yyloc), &(yylsp[-2]), &NULL_LOC);
17223 nd_set_line((yyval.node), (yylsp[0]).end_pos.lineno);
17224 /*% ripper: string_dvar!($:dvar) %*/
17225 }
17226#line 17227 "parse.c"
17227 break;
17228
17229 case 676: /* @35: %empty */
17230#line 6058 "parse.y"
17231 {
17232 CMDARG_PUSH(0);
17233 COND_PUSH(0);
17234 /* need to backup p->lex.strterm so that a string literal `%!foo,#{ !0 },bar!` can be parsed */
17235 (yyval.strterm) = p->lex.strterm;
17236 p->lex.strterm = 0;
17237 SET_LEX_STATE(EXPR_BEG);
17238 }
17239#line 17240 "parse.c"
17240 break;
17241
17242 case 677: /* @36: %empty */
17243#line 6066 "parse.y"
17244 {
17245 (yyval.num) = p->lex.brace_nest;
17246 p->lex.brace_nest = 0;
17247 }
17248#line 17249 "parse.c"
17249 break;
17250
17251 case 678: /* @37: %empty */
17252#line 6070 "parse.y"
17253 {
17254 (yyval.num) = p->heredoc_indent;
17255 p->heredoc_indent = 0;
17256 }
17257#line 17258 "parse.c"
17258 break;
17259
17260 case 679: /* string_content: "'#{'" @35 @36 @37 compstmt_stmts string_dend */
17261#line 6075 "parse.y"
17262 {
17263 COND_POP();
17264 CMDARG_POP();
17265 p->lex.strterm = (yyvsp[-4].strterm);
17266 SET_LEX_STATE((yyvsp[-5].state));
17267 p->lex.brace_nest = (yyvsp[-3].num);
17268 p->heredoc_indent = (yyvsp[-2].num);
17269 p->heredoc_line_indent = -1;
17270 if ((yyvsp[-1].node)) nd_unset_fl_newline((yyvsp[-1].node));
17271 (yyval.node) = new_evstr(p, (yyvsp[-1].node), &(yyloc), &(yylsp[-5]), &(yylsp[0]));
17272 /*% ripper: string_embexpr!($:compstmt) %*/
17273 }
17274#line 17275 "parse.c"
17275 break;
17276
17277 case 682: /* string_dvar: nonlocal_var */
17278#line 6094 "parse.y"
17279 {
17280 if (!((yyval.node) = gettable(p, (yyvsp[0].id), &(yyloc)))) (yyval.node) = NEW_ERROR(&(yyloc));
17281 /*% ripper: var_ref!($:1) %*/
17282 }
17283#line 17284 "parse.c"
17284 break;
17285
17286 case 686: /* ssym: "symbol literal" sym */
17287#line 6106 "parse.y"
17288 {
17289 SET_LEX_STATE(EXPR_END);
17290 VALUE str = rb_id2str((yyvsp[0].id));
17291 /*
17292 * TODO:
17293 * set_yylval_noname sets invalid id to yylval.
17294 * This branch can be removed once yylval is changed to
17295 * hold lexed string.
17296 */
17297 if (!str) str = STR_NEW0();
17298 (yyval.node) = NEW_SYM(str, &(yyloc));
17299 /*% ripper: symbol_literal!(symbol!($:2)) %*/
17300 }
17301#line 17302 "parse.c"
17302 break;
17303
17304 case 689: /* dsym: "symbol literal" string_contents "terminator" */
17305#line 6126 "parse.y"
17306 {
17307 SET_LEX_STATE(EXPR_END);
17308 (yyval.node) = dsym_node(p, (yyvsp[-1].node), &(yyloc));
17309 /*% ripper: dyna_symbol!($:2) %*/
17310 }
17311#line 17312 "parse.c"
17312 break;
17313
17314 case 691: /* numeric: tUMINUS_NUM simple_numeric */
17315#line 6135 "parse.y"
17316 {
17317 (yyval.node) = (yyvsp[0].node);
17318 negate_lit(p, (yyval.node), &(yyloc));
17319 /*% ripper: unary!(ID2VAL(idUMinus), $:2) %*/
17320 }
17321#line 17322 "parse.c"
17322 break;
17323
17324 case 702: /* keyword_variable: "'nil'" */
17325#line 6157 "parse.y"
17326 {(yyval.id) = KWD2EID(nil, (yyvsp[0].id));}
17327#line 17328 "parse.c"
17328 break;
17329
17330 case 703: /* keyword_variable: "'self'" */
17331#line 6158 "parse.y"
17332 {(yyval.id) = KWD2EID(self, (yyvsp[0].id));}
17333#line 17334 "parse.c"
17334 break;
17335
17336 case 704: /* keyword_variable: "'true'" */
17337#line 6159 "parse.y"
17338 {(yyval.id) = KWD2EID(true, (yyvsp[0].id));}
17339#line 17340 "parse.c"
17340 break;
17341
17342 case 705: /* keyword_variable: "'false'" */
17343#line 6160 "parse.y"
17344 {(yyval.id) = KWD2EID(false, (yyvsp[0].id));}
17345#line 17346 "parse.c"
17346 break;
17347
17348 case 706: /* keyword_variable: "'__FILE__'" */
17349#line 6161 "parse.y"
17350 {(yyval.id) = KWD2EID(_FILE__, (yyvsp[0].id));}
17351#line 17352 "parse.c"
17352 break;
17353
17354 case 707: /* keyword_variable: "'__LINE__'" */
17355#line 6162 "parse.y"
17356 {(yyval.id) = KWD2EID(_LINE__, (yyvsp[0].id));}
17357#line 17358 "parse.c"
17358 break;
17359
17360 case 708: /* keyword_variable: "'__ENCODING__'" */
17361#line 6163 "parse.y"
17362 {(yyval.id) = KWD2EID(_ENCODING__, (yyvsp[0].id));}
17363#line 17364 "parse.c"
17364 break;
17365
17366 case 709: /* var_ref: user_variable */
17367#line 6167 "parse.y"
17368 {
17369 if (!((yyval.node) = gettable(p, (yyvsp[0].id), &(yyloc)))) (yyval.node) = NEW_ERROR(&(yyloc));
17370 if (ifdef_ripper(id_is_var(p, (yyvsp[0].id)), false)) {
17371 /*% ripper: var_ref!($:1) %*/
17372 }
17373 else {
17374 /*% ripper: vcall!($:1) %*/
17375 }
17376 }
17377#line 17378 "parse.c"
17378 break;
17379
17380 case 710: /* var_ref: keyword_variable */
17381#line 6177 "parse.y"
17382 {
17383 if (!((yyval.node) = gettable(p, (yyvsp[0].id), &(yyloc)))) (yyval.node) = NEW_ERROR(&(yyloc));
17384 /*% ripper: var_ref!($:1) %*/
17385 }
17386#line 17387 "parse.c"
17387 break;
17388
17389 case 711: /* var_lhs: user_variable */
17390#line 6184 "parse.y"
17391 {
17392 /*% ripper: var_field!($:1) %*/
17393 (yyval.node) = assignable(p, (yyvsp[0].id), 0, &(yyloc));
17394 }
17395#line 17396 "parse.c"
17396 break;
17397
17398 case 712: /* var_lhs: keyword_variable */
17399#line 6184 "parse.y"
17400 {
17401 /*% ripper: var_field!($:1) %*/
17402 (yyval.node) = assignable(p, (yyvsp[0].id), 0, &(yyloc));
17403 }
17404#line 17405 "parse.c"
17405 break;
17406
17407 case 715: /* $@38: %empty */
17408#line 6195 "parse.y"
17409 {
17410 SET_LEX_STATE(EXPR_BEG);
17411 p->command_start = TRUE;
17412 }
17413#line 17414 "parse.c"
17414 break;
17415
17416 case 716: /* superclass: '<' $@38 expr_value term */
17417#line 6200 "parse.y"
17418 {
17419 (yyval.node) = (yyvsp[-1].node);
17420 /*% ripper: $:3 %*/
17421 }
17422#line 17423 "parse.c"
17423 break;
17424
17425 case 719: /* f_opt_paren_args: f_empty_arg */
17426#line 6209 "parse.y"
17427 {
17428 p->ctxt.in_argdef = 0;
17429 }
17430#line 17431 "parse.c"
17431 break;
17432
17433 case 720: /* f_empty_arg: %empty */
17434#line 6215 "parse.y"
17435 {
17436 (yyval.node_args) = new_empty_args_tail(p, &(yyloc));
17437 (yyval.node_args) = new_args(p, 0, 0, 0, 0, (yyval.node_args), &(yyloc));
17438 /*% ripper: params!(Qnil, Qnil, Qnil, Qnil, Qnil, Qnil, Qnil) %*/
17439 }
17440#line 17441 "parse.c"
17441 break;
17442
17443 case 721: /* f_paren_args: '(' f_args rparen */
17444#line 6223 "parse.y"
17445 {
17446 (yyval.node_args) = (yyvsp[-1].node_args);
17447 /*% ripper: paren!($:2) %*/
17448 SET_LEX_STATE(EXPR_BEG);
17449 p->command_start = TRUE;
17450 p->ctxt.in_argdef = 0;
17451 }
17452#line 17453 "parse.c"
17453 break;
17454
17455 case 723: /* @39: %empty */
17456#line 6233 "parse.y"
17457 {
17458 (yyval.ctxt) = p->ctxt;
17459 p->ctxt.in_kwarg = 1;
17460 p->ctxt.in_argdef = 1;
17461 SET_LEX_STATE(p->lex.state|EXPR_LABEL); /* force for args */
17462 }
17463#line 17464 "parse.c"
17464 break;
17465
17466 case 724: /* f_arglist: @39 f_args term */
17467#line 6240 "parse.y"
17468 {
17469 p->ctxt.in_kwarg = (yyvsp[-2].ctxt).in_kwarg;
17470 p->ctxt.in_argdef = 0;
17471 (yyval.node_args) = (yyvsp[-1].node_args);
17472 SET_LEX_STATE(EXPR_BEG);
17473 p->command_start = TRUE;
17474 /*% ripper: $:2 %*/
17475 }
17476#line 17477 "parse.c"
17477 break;
17478
17479 case 725: /* f_kw_arg_value: f_label arg_value */
17480#line 3014 "parse.y"
17481 {
17482 p->ctxt.in_argdef = 1;
17483 (yyval.node_kw_arg) = new_kw_arg(p, assignable(p, (yyvsp[-1].id), (yyvsp[0].node), &(yyloc)), &(yyloc));
17484 /*% ripper: [$:$, $:value] %*/
17485 }
17486#line 17487 "parse.c"
17487 break;
17488
17489 case 726: /* f_kw_arg_value: f_label */
17490#line 3020 "parse.y"
17491 {
17492 p->ctxt.in_argdef = 1;
17493 (yyval.node_kw_arg) = new_kw_arg(p, assignable(p, (yyvsp[0].id), NODE_SPECIAL_REQUIRED_KEYWORD, &(yyloc)), &(yyloc));
17494 /*% ripper: [$:$, 0] %*/
17495 }
17496#line 17497 "parse.c"
17497 break;
17498
17499 case 727: /* f_kwarg_arg_value: f_kw_arg_value */
17500#line 3029 "parse.y"
17501 {
17502 (yyval.node_kw_arg) = (yyvsp[0].node_kw_arg);
17503 /*% ripper: rb_ary_new3(1, $:1) %*/
17504 }
17505#line 17506 "parse.c"
17506 break;
17507
17508 case 728: /* f_kwarg_arg_value: f_kwarg_arg_value ',' f_kw_arg_value */
17509#line 3034 "parse.y"
17510 {
17511 (yyval.node_kw_arg) = kwd_append((yyvsp[-2].node_kw_arg), (yyvsp[0].node_kw_arg));
17512 /*% ripper: rb_ary_push($:1, $:3) %*/
17513 }
17514#line 17515 "parse.c"
17515 break;
17516
17517 case 729: /* opt_f_block_arg_opt_comma: ',' f_block_arg */
17518#line 2951 "parse.y"
17519 {
17520 (yyval.id) = (yyvsp[0].id);
17521 /*% ripper: $:2 %*/
17522 }
17523#line 17524 "parse.c"
17524 break;
17525
17526 case 731: /* args_tail_basic_arg_value_opt_comma: f_kwarg_arg_value ',' f_kwrest opt_f_block_arg_opt_comma */
17527#line 2928 "parse.y"
17528 {
17529 (yyval.node_args) = new_args_tail(p, (yyvsp[-3].node_kw_arg), (yyvsp[-1].id), (yyvsp[0].id), &(yylsp[-1]));
17530 /*% ripper: [$:1, $:3, $:4] %*/
17531 }
17532#line 17533 "parse.c"
17533 break;
17534
17535 case 732: /* args_tail_basic_arg_value_opt_comma: f_kwarg_arg_value opt_f_block_arg_opt_comma */
17536#line 2933 "parse.y"
17537 {
17538 (yyval.node_args) = new_args_tail(p, (yyvsp[-1].node_kw_arg), 0, (yyvsp[0].id), &(yylsp[-1]));
17539 /*% ripper: [$:1, Qnil, $:2] %*/
17540 }
17541#line 17542 "parse.c"
17542 break;
17543
17544 case 733: /* args_tail_basic_arg_value_opt_comma: f_any_kwrest opt_f_block_arg_opt_comma */
17545#line 2938 "parse.y"
17546 {
17547 (yyval.node_args) = new_args_tail(p, 0, (yyvsp[-1].id), (yyvsp[0].id), &(yylsp[-1]));
17548 /*% ripper: [Qnil, $:1, $:2] %*/
17549 }
17550#line 17551 "parse.c"
17551 break;
17552
17553 case 734: /* args_tail_basic_arg_value_opt_comma: f_block_arg */
17554#line 2943 "parse.y"
17555 {
17556 (yyval.node_args) = new_args_tail(p, 0, 0, (yyvsp[0].id), &(yylsp[0]));
17557 /*% ripper: [Qnil, Qnil, $:1] %*/
17558 }
17559#line 17560 "parse.c"
17560 break;
17561
17562 case 736: /* args_tail: args_forward */
17563#line 6252 "parse.y"
17564 {
17565 add_forwarding_args(p);
17566 (yyval.node_args) = new_args_tail(p, 0, (yyvsp[0].id), arg_FWD_BLOCK, &(yylsp[0]));
17567 (yyval.node_args)->nd_ainfo.forwarding = 1;
17568 /*% ripper: [Qnil, $:args_forward, Qnil] %*/
17569 }
17570#line 17571 "parse.c"
17571 break;
17572
17573 case 737: /* args_tail_basic_arg_value_none: f_kwarg_arg_value ',' f_kwrest opt_f_block_arg_none */
17574#line 2928 "parse.y"
17575 {
17576 (yyval.node_args) = new_args_tail(p, (yyvsp[-3].node_kw_arg), (yyvsp[-1].id), (yyvsp[0].id), &(yylsp[-1]));
17577 /*% ripper: [$:1, $:3, $:4] %*/
17578 }
17579#line 17580 "parse.c"
17580 break;
17581
17582 case 738: /* args_tail_basic_arg_value_none: f_kwarg_arg_value opt_f_block_arg_none */
17583#line 2933 "parse.y"
17584 {
17585 (yyval.node_args) = new_args_tail(p, (yyvsp[-1].node_kw_arg), 0, (yyvsp[0].id), &(yylsp[-1]));
17586 /*% ripper: [$:1, Qnil, $:2] %*/
17587 }
17588#line 17589 "parse.c"
17589 break;
17590
17591 case 739: /* args_tail_basic_arg_value_none: f_any_kwrest opt_f_block_arg_none */
17592#line 2938 "parse.y"
17593 {
17594 (yyval.node_args) = new_args_tail(p, 0, (yyvsp[-1].id), (yyvsp[0].id), &(yylsp[-1]));
17595 /*% ripper: [Qnil, $:1, $:2] %*/
17596 }
17597#line 17598 "parse.c"
17598 break;
17599
17600 case 740: /* args_tail_basic_arg_value_none: f_block_arg */
17601#line 2943 "parse.y"
17602 {
17603 (yyval.node_args) = new_args_tail(p, 0, 0, (yyvsp[0].id), &(yylsp[0]));
17604 /*% ripper: [Qnil, Qnil, $:1] %*/
17605 }
17606#line 17607 "parse.c"
17607 break;
17608
17609 case 742: /* largs_tail: args_forward */
17610#line 6262 "parse.y"
17611 {
17612 yyerror1(&(yylsp[0]), "unexpected ... in lambda argument");
17613 (yyval.node_args) = new_args_tail(p, 0, 0, 0, &(yylsp[0]));
17614 (yyval.node_args)->nd_ainfo.forwarding = 1;
17615 /*% ripper: [Qnil, $:args_forward, Qnil] %*/
17616 }
17617#line 17618 "parse.c"
17618 break;
17619
17620 case 743: /* f_opt_arg_value: f_arg_asgn f_eq arg_value */
17621#line 2992 "parse.y"
17622 {
17623 p->ctxt.in_argdef = 1;
17624 (yyval.node_opt_arg) = NEW_OPT_ARG(assignable(p, (yyvsp[-2].id), (yyvsp[0].node), &(yyloc)), &(yyloc));
17625 /*% ripper: [$:$, $:3] %*/
17626 }
17627#line 17628 "parse.c"
17628 break;
17629
17630 case 744: /* f_opt_arg_arg_value: f_opt_arg_value */
17631#line 3001 "parse.y"
17632 {
17633 (yyval.node_opt_arg) = (yyvsp[0].node_opt_arg);
17634 /*% ripper: rb_ary_new3(1, $:1) %*/
17635 }
17636#line 17637 "parse.c"
17637 break;
17638
17639 case 745: /* f_opt_arg_arg_value: f_opt_arg_arg_value ',' f_opt_arg_value */
17640#line 3006 "parse.y"
17641 {
17642 (yyval.node_opt_arg) = opt_arg_append((yyvsp[-2].node_opt_arg), (yyvsp[0].node_opt_arg));
17643 /*% ripper: rb_ary_push($:1, $:3) %*/
17644 }
17645#line 17646 "parse.c"
17646 break;
17647
17648 case 746: /* opt_args_tail_args_tail_opt_comma: ',' args_tail */
17649#line 3101 "parse.y"
17650 {
17651 (yyval.node_args) = (yyvsp[0].node_args);
17652 /*% ripper: $:tail %*/
17653 }
17654#line 17655 "parse.c"
17655 break;
17656
17657 case 747: /* opt_args_tail_args_tail_opt_comma: opt_comma */
17658#line 3106 "parse.y"
17659 {
17660 (yyval.node_args) = new_empty_args_tail(p, &(yyloc));
17661 /*% ripper: [Qnil, Qnil, Qnil] %*/
17662 }
17663#line 17664 "parse.c"
17664 break;
17665
17666 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 */
17667#line 6272 "parse.y"
17668 {
17669 (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));
17670 /*% ripper: params!($:pre, $:opt, $:rest, Qnil, *$:tail[0..2]) %*/
17671 }
17672#line 17673 "parse.c"
17673 break;
17674
17675 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 */
17676#line 6277 "parse.y"
17677 {
17678 (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));
17679 /*% ripper: params!($:pre, $:opt, $:rest, $:post, *$:tail[0..2]) %*/
17680 }
17681#line 17682 "parse.c"
17682 break;
17683
17684 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 */
17685#line 6282 "parse.y"
17686 {
17687 (yyval.node_args) = new_args(p, (yyvsp[-3].node_args_aux), (yyvsp[-1].node_opt_arg), 0, 0, (yyvsp[0].node_args), &(yyloc));
17688 /*% ripper: params!($:pre, $:opt, Qnil, Qnil, *$:tail[0..2]) %*/
17689 }
17690#line 17691 "parse.c"
17691 break;
17692
17693 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 */
17694#line 6287 "parse.y"
17695 {
17696 (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));
17697 /*% ripper: params!($:pre, $:opt, Qnil, $:post, *$:tail[0..2]) %*/
17698 }
17699#line 17700 "parse.c"
17700 break;
17701
17702 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 */
17703#line 6292 "parse.y"
17704 {
17705 (yyval.node_args) = new_args(p, (yyvsp[-3].node_args_aux), 0, (yyvsp[-1].id), 0, (yyvsp[0].node_args), &(yyloc));
17706 /*% ripper: params!($:pre, Qnil, $:rest, Qnil, *$:tail[0..2]) %*/
17707 }
17708#line 17709 "parse.c"
17709 break;
17710
17711 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 */
17712#line 6297 "parse.y"
17713 {
17714 (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));
17715 /*% ripper: params!($:pre, Qnil, $:rest, $:post, *$:tail[0..2]) %*/
17716 }
17717#line 17718 "parse.c"
17718 break;
17719
17720 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 */
17721#line 6302 "parse.y"
17722 {
17723 (yyval.node_args) = new_args(p, 0, (yyvsp[-3].node_opt_arg), (yyvsp[-1].id), 0, (yyvsp[0].node_args), &(yyloc));
17724 /*% ripper: params!(Qnil, $:opt, $:rest, Qnil, *$:tail[0..2]) %*/
17725 }
17726#line 17727 "parse.c"
17727 break;
17728
17729 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 */
17730#line 6307 "parse.y"
17731 {
17732 (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));
17733 /*% ripper: params!(Qnil, $:opt, $:rest, $:post, *$:tail[0..2]) %*/
17734 }
17735#line 17736 "parse.c"
17736 break;
17737
17738 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 */
17739#line 6312 "parse.y"
17740 {
17741 (yyval.node_args) = new_args(p, 0, (yyvsp[-1].node_opt_arg), 0, 0, (yyvsp[0].node_args), &(yyloc));
17742 /*% ripper: params!(Qnil, $:opt, Qnil, Qnil, *$:tail[0..2]) %*/
17743 }
17744#line 17745 "parse.c"
17745 break;
17746
17747 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 */
17748#line 6317 "parse.y"
17749 {
17750 (yyval.node_args) = new_args(p, 0, (yyvsp[-3].node_opt_arg), 0, (yyvsp[-1].node_args_aux), (yyvsp[0].node_args), &(yyloc));
17751 /*% ripper: params!(Qnil, $:opt, Qnil, $:post, *$:tail[0..2]) %*/
17752 }
17753#line 17754 "parse.c"
17754 break;
17755
17756 case 758: /* args-list_arg_value_opt_args_tail_args_tail_opt_comma: f_rest_arg opt_args_tail_args_tail_opt_comma */
17757#line 6322 "parse.y"
17758 {
17759 (yyval.node_args) = new_args(p, 0, 0, (yyvsp[-1].id), 0, (yyvsp[0].node_args), &(yyloc));
17760 /*% ripper: params!(Qnil, Qnil, $:rest, Qnil, *$:tail[0..2]) %*/
17761 }
17762#line 17763 "parse.c"
17763 break;
17764
17765 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 */
17766#line 6327 "parse.y"
17767 {
17768 (yyval.node_args) = new_args(p, 0, 0, (yyvsp[-3].id), (yyvsp[-1].node_args_aux), (yyvsp[0].node_args), &(yyloc));
17769 /*% ripper: params!(Qnil, Qnil, $:rest, $:post, *$:tail[0..2]) %*/
17770 }
17771#line 17772 "parse.c"
17772 break;
17773
17774 case 761: /* f_args-list_args_tail_opt_comma: f_arg opt_args_tail_args_tail_opt_comma */
17775#line 6344 "parse.y"
17776 {
17777 (yyval.node_args) = new_args(p, (yyvsp[-1].node_args_aux), 0, 0, 0, (yyvsp[0].node_args), &(yyloc));
17778 /*% ripper: params!($:pre, Qnil, Qnil, Qnil, *$:tail[0..2]) %*/
17779 }
17780#line 17781 "parse.c"
17781 break;
17782
17783 case 762: /* tail-only-args_args_tail: args_tail */
17784#line 6335 "parse.y"
17785 {
17786 (yyval.node_args) = new_args(p, 0, 0, 0, 0, (yyvsp[0].node_args), &(yyloc));
17787 /*% ripper: params!(Qnil, Qnil, Qnil, Qnil, *$:tail[0..2]) %*/
17788 }
17789#line 17790 "parse.c"
17790 break;
17791
17792 case 766: /* opt_args_tail_largs_tail_none: ',' largs_tail */
17793#line 3101 "parse.y"
17794 {
17795 (yyval.node_args) = (yyvsp[0].node_args);
17796 /*% ripper: $:tail %*/
17797 }
17798#line 17799 "parse.c"
17799 break;
17800
17801 case 767: /* opt_args_tail_largs_tail_none: none */
17802#line 3106 "parse.y"
17803 {
17804 (yyval.node_args) = new_empty_args_tail(p, &(yyloc));
17805 /*% ripper: [Qnil, Qnil, Qnil] %*/
17806 }
17807#line 17808 "parse.c"
17808 break;
17809
17810 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 */
17811#line 6272 "parse.y"
17812 {
17813 (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));
17814 /*% ripper: params!($:pre, $:opt, $:rest, Qnil, *$:tail[0..2]) %*/
17815 }
17816#line 17817 "parse.c"
17817 break;
17818
17819 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 */
17820#line 6277 "parse.y"
17821 {
17822 (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));
17823 /*% ripper: params!($:pre, $:opt, $:rest, $:post, *$:tail[0..2]) %*/
17824 }
17825#line 17826 "parse.c"
17826 break;
17827
17828 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 */
17829#line 6282 "parse.y"
17830 {
17831 (yyval.node_args) = new_args(p, (yyvsp[-3].node_args_aux), (yyvsp[-1].node_opt_arg), 0, 0, (yyvsp[0].node_args), &(yyloc));
17832 /*% ripper: params!($:pre, $:opt, Qnil, Qnil, *$:tail[0..2]) %*/
17833 }
17834#line 17835 "parse.c"
17835 break;
17836
17837 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 */
17838#line 6287 "parse.y"
17839 {
17840 (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));
17841 /*% ripper: params!($:pre, $:opt, Qnil, $:post, *$:tail[0..2]) %*/
17842 }
17843#line 17844 "parse.c"
17844 break;
17845
17846 case 772: /* args-list_arg_value_opt_args_tail_largs_tail_none: f_arg ',' f_rest_arg opt_args_tail_largs_tail_none */
17847#line 6292 "parse.y"
17848 {
17849 (yyval.node_args) = new_args(p, (yyvsp[-3].node_args_aux), 0, (yyvsp[-1].id), 0, (yyvsp[0].node_args), &(yyloc));
17850 /*% ripper: params!($:pre, Qnil, $:rest, Qnil, *$:tail[0..2]) %*/
17851 }
17852#line 17853 "parse.c"
17853 break;
17854
17855 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 */
17856#line 6297 "parse.y"
17857 {
17858 (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));
17859 /*% ripper: params!($:pre, Qnil, $:rest, $:post, *$:tail[0..2]) %*/
17860 }
17861#line 17862 "parse.c"
17862 break;
17863
17864 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 */
17865#line 6302 "parse.y"
17866 {
17867 (yyval.node_args) = new_args(p, 0, (yyvsp[-3].node_opt_arg), (yyvsp[-1].id), 0, (yyvsp[0].node_args), &(yyloc));
17868 /*% ripper: params!(Qnil, $:opt, $:rest, Qnil, *$:tail[0..2]) %*/
17869 }
17870#line 17871 "parse.c"
17871 break;
17872
17873 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 */
17874#line 6307 "parse.y"
17875 {
17876 (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));
17877 /*% ripper: params!(Qnil, $:opt, $:rest, $:post, *$:tail[0..2]) %*/
17878 }
17879#line 17880 "parse.c"
17880 break;
17881
17882 case 776: /* args-list_arg_value_opt_args_tail_largs_tail_none: f_opt_arg_arg_value opt_args_tail_largs_tail_none */
17883#line 6312 "parse.y"
17884 {
17885 (yyval.node_args) = new_args(p, 0, (yyvsp[-1].node_opt_arg), 0, 0, (yyvsp[0].node_args), &(yyloc));
17886 /*% ripper: params!(Qnil, $:opt, Qnil, Qnil, *$:tail[0..2]) %*/
17887 }
17888#line 17889 "parse.c"
17889 break;
17890
17891 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 */
17892#line 6317 "parse.y"
17893 {
17894 (yyval.node_args) = new_args(p, 0, (yyvsp[-3].node_opt_arg), 0, (yyvsp[-1].node_args_aux), (yyvsp[0].node_args), &(yyloc));
17895 /*% ripper: params!(Qnil, $:opt, Qnil, $:post, *$:tail[0..2]) %*/
17896 }
17897#line 17898 "parse.c"
17898 break;
17899
17900 case 778: /* args-list_arg_value_opt_args_tail_largs_tail_none: f_rest_arg opt_args_tail_largs_tail_none */
17901#line 6322 "parse.y"
17902 {
17903 (yyval.node_args) = new_args(p, 0, 0, (yyvsp[-1].id), 0, (yyvsp[0].node_args), &(yyloc));
17904 /*% ripper: params!(Qnil, Qnil, $:rest, Qnil, *$:tail[0..2]) %*/
17905 }
17906#line 17907 "parse.c"
17907 break;
17908
17909 case 779: /* args-list_arg_value_opt_args_tail_largs_tail_none: f_rest_arg ',' f_arg opt_args_tail_largs_tail_none */
17910#line 6327 "parse.y"
17911 {
17912 (yyval.node_args) = new_args(p, 0, 0, (yyvsp[-3].id), (yyvsp[-1].node_args_aux), (yyvsp[0].node_args), &(yyloc));
17913 /*% ripper: params!(Qnil, Qnil, $:rest, $:post, *$:tail[0..2]) %*/
17914 }
17915#line 17916 "parse.c"
17916 break;
17917
17918 case 781: /* f_args-list_largs_tail_none: f_arg opt_args_tail_largs_tail_none */
17919#line 6344 "parse.y"
17920 {
17921 (yyval.node_args) = new_args(p, (yyvsp[-1].node_args_aux), 0, 0, 0, (yyvsp[0].node_args), &(yyloc));
17922 /*% ripper: params!($:pre, Qnil, Qnil, Qnil, *$:tail[0..2]) %*/
17923 }
17924#line 17925 "parse.c"
17925 break;
17926
17927 case 782: /* tail-only-args_largs_tail: largs_tail */
17928#line 6335 "parse.y"
17929 {
17930 (yyval.node_args) = new_args(p, 0, 0, 0, 0, (yyvsp[0].node_args), &(yyloc));
17931 /*% ripper: params!(Qnil, Qnil, Qnil, Qnil, *$:tail[0..2]) %*/
17932 }
17933#line 17934 "parse.c"
17934 break;
17935
17936 case 786: /* args_forward: "(..." */
17937#line 6359 "parse.y"
17938 {
17939 (yyval.id) = idFWD_KWREST;
17940 /*% ripper: args_forward! %*/
17941 }
17942#line 17943 "parse.c"
17943 break;
17944
17945 case 787: /* f_bad_arg: "constant" */
17946#line 6366 "parse.y"
17947 {
17948 static const char mesg[] = "formal argument cannot be a constant";
17949 /*%%%*/
17950 yyerror1(&(yylsp[0]), mesg);
17951 /*% %*/
17952 (yyval.id) = 0;
17953 /*% ripper[error]: param_error!(ERR_MESG(), $:1) %*/
17954 }
17955#line 17956 "parse.c"
17956 break;
17957
17958 case 788: /* f_bad_arg: "instance variable" */
17959#line 6375 "parse.y"
17960 {
17961 static const char mesg[] = "formal argument cannot be an instance variable";
17962 /*%%%*/
17963 yyerror1(&(yylsp[0]), mesg);
17964 /*% %*/
17965 (yyval.id) = 0;
17966 /*% ripper[error]: param_error!(ERR_MESG(), $:1) %*/
17967 }
17968#line 17969 "parse.c"
17969 break;
17970
17971 case 789: /* f_bad_arg: "global variable" */
17972#line 6384 "parse.y"
17973 {
17974 static const char mesg[] = "formal argument cannot be a global variable";
17975 /*%%%*/
17976 yyerror1(&(yylsp[0]), mesg);
17977 /*% %*/
17978 (yyval.id) = 0;
17979 /*% ripper[error]: param_error!(ERR_MESG(), $:1) %*/
17980 }
17981#line 17982 "parse.c"
17982 break;
17983
17984 case 790: /* f_bad_arg: "class variable" */
17985#line 6393 "parse.y"
17986 {
17987 static const char mesg[] = "formal argument cannot be a class variable";
17988 /*%%%*/
17989 yyerror1(&(yylsp[0]), mesg);
17990 /*% %*/
17991 (yyval.id) = 0;
17992 /*% ripper[error]: param_error!(ERR_MESG(), $:1) %*/
17993 }
17994#line 17995 "parse.c"
17995 break;
17996
17997 case 792: /* f_norm_arg: "local variable or method" */
17998#line 6405 "parse.y"
17999 {
18000 VALUE e = formal_argument_error(p, (yyval.id) = (yyvsp[0].id));
18001 if (e) {
18002 /*% ripper[error]: param_error!(?e, $:1) %*/
18003 }
18004 p->max_numparam = ORDINAL_PARAM;
18005 }
18006#line 18007 "parse.c"
18007 break;
18008
18009 case 793: /* f_arg_asgn: f_norm_arg */
18010#line 6415 "parse.y"
18011 {
18012 arg_var(p, (yyvsp[0].id));
18013 (yyval.id) = (yyvsp[0].id);
18014 }
18015#line 18016 "parse.c"
18016 break;
18017
18018 case 794: /* f_arg_item: f_arg_asgn */
18019#line 6422 "parse.y"
18020 {
18021 (yyval.node_args_aux) = NEW_ARGS_AUX((yyvsp[0].id), 1, &NULL_LOC);
18022 /*% ripper: $:1 %*/
18023 }
18024#line 18025 "parse.c"
18025 break;
18026
18027 case 795: /* f_arg_item: "(" f_margs rparen */
18028#line 6427 "parse.y"
18029 {
18030 ID tid = internal_id(p);
18031 YYLTYPE loc;
18032 loc.beg_pos = (yylsp[-1]).beg_pos;
18033 loc.end_pos = (yylsp[-1]).beg_pos;
18034 arg_var(p, tid);
18035 if (dyna_in_block(p)) {
18036 (yyvsp[-1].node_masgn)->nd_value = NEW_DVAR(tid, &loc);
18037 }
18038 else {
18039 (yyvsp[-1].node_masgn)->nd_value = NEW_LVAR(tid, &loc);
18040 }
18041 (yyval.node_args_aux) = NEW_ARGS_AUX(tid, 1, &NULL_LOC);
18042 (yyval.node_args_aux)->nd_next = (NODE *)(yyvsp[-1].node_masgn);
18043 /*% ripper: mlhs_paren!($:2) %*/
18044 }
18045#line 18046 "parse.c"
18046 break;
18047
18048 case 797: /* f_arg: f_arg ',' f_arg_item */
18049#line 6448 "parse.y"
18050 {
18051 (yyval.node_args_aux) = (yyvsp[-2].node_args_aux);
18052 (yyval.node_args_aux)->nd_plen++;
18053 (yyval.node_args_aux)->nd_next = block_append(p, (yyval.node_args_aux)->nd_next, (yyvsp[0].node_args_aux)->nd_next);
18054 rb_discard_node(p, (NODE *)(yyvsp[0].node_args_aux));
18055 /*% ripper: rb_ary_push($:1, $:3) %*/
18056 }
18057#line 18058 "parse.c"
18058 break;
18059
18060 case 798: /* f_label: "label" */
18061#line 6459 "parse.y"
18062 {
18063 VALUE e = formal_argument_error(p, (yyval.id) = (yyvsp[0].id));
18064 if (e) {
18065 (yyval.id) = 0;
18066 /*% ripper[error]: param_error!(?e, $:1) %*/
18067 }
18068 /*
18069 * Workaround for Prism::ParseTest#test_filepath for
18070 * "unparser/corpus/literal/def.txt"
18071 *
18072 * See the discussion on https://github.com/ruby/ruby/pull/9923
18073 */
18074 arg_var(p, ifdef_ripper(0, (yyvsp[0].id)));
18075 /*% ripper: $:1 %*/
18076 p->max_numparam = ORDINAL_PARAM;
18077 p->ctxt.in_argdef = 0;
18078 }
18079#line 18080 "parse.c"
18080 break;
18081
18082 case 801: /* f_no_kwarg: p_kwnorest */
18083#line 6483 "parse.y"
18084 {
18085 /*% ripper: nokw_param!(Qnil) %*/
18086 }
18087#line 18088 "parse.c"
18088 break;
18089
18090 case 802: /* f_kwrest: kwrest_mark "local variable or method" */
18091#line 6489 "parse.y"
18092 {
18093 arg_var(p, shadowing_lvar(p, (yyvsp[0].id)));
18094 (yyval.id) = (yyvsp[0].id);
18095 /*% ripper: kwrest_param!($:2) %*/
18096 }
18097#line 18098 "parse.c"
18098 break;
18099
18100 case 803: /* f_kwrest: kwrest_mark */
18101#line 6495 "parse.y"
18102 {
18103 arg_var(p, idFWD_KWREST);
18104 (yyval.id) = idFWD_KWREST;
18105 /*% ripper: kwrest_param!(Qnil) %*/
18106 }
18107#line 18108 "parse.c"
18108 break;
18109
18110 case 806: /* f_rest_arg: restarg_mark "local variable or method" */
18111#line 6507 "parse.y"
18112 {
18113 arg_var(p, shadowing_lvar(p, (yyvsp[0].id)));
18114 (yyval.id) = (yyvsp[0].id);
18115 /*% ripper: rest_param!($:2) %*/
18116 }
18117#line 18118 "parse.c"
18118 break;
18119
18120 case 807: /* f_rest_arg: restarg_mark */
18121#line 6513 "parse.y"
18122 {
18123 arg_var(p, idFWD_REST);
18124 (yyval.id) = idFWD_REST;
18125 /*% ripper: rest_param!(Qnil) %*/
18126 }
18127#line 18128 "parse.c"
18128 break;
18129
18130 case 810: /* f_block_arg: blkarg_mark "local variable or method" */
18131#line 6525 "parse.y"
18132 {
18133 arg_var(p, shadowing_lvar(p, (yyvsp[0].id)));
18134 (yyval.id) = (yyvsp[0].id);
18135 /*% ripper: blockarg!($:2) %*/
18136 }
18137#line 18138 "parse.c"
18138 break;
18139
18140 case 811: /* f_block_arg: blkarg_mark "'nil'" */
18141#line 6531 "parse.y"
18142 {
18143 (yyval.id) = idNil;
18144 /*% ripper: blockarg!(ID2VAL(idNil)) %*/
18145 }
18146#line 18147 "parse.c"
18147 break;
18148
18149 case 812: /* f_block_arg: blkarg_mark */
18150#line 6536 "parse.y"
18151 {
18152 arg_var(p, idFWD_BLOCK);
18153 (yyval.id) = idFWD_BLOCK;
18154 /*% ripper: blockarg!(Qnil) %*/
18155 }
18156#line 18157 "parse.c"
18157 break;
18158
18159 case 815: /* opt_comma: option_',' */
18160#line 6544 "parse.y"
18161 {
18162 (yyval.id) = 0;
18163 /*% ripper: Qnil %*/
18164 }
18165#line 18166 "parse.c"
18166 break;
18167
18168 case 816: /* value_expr_singleton_expr: singleton_expr */
18169#line 3155 "parse.y"
18170 {
18171 value_expr(p, (yyvsp[0].node));
18172 (yyval.node) = (yyvsp[0].node);
18173 }
18174#line 18175 "parse.c"
18175 break;
18176
18177 case 817: /* singleton: value_expr_singleton_expr */
18178#line 6552 "parse.y"
18179 {
18180 NODE *expr = last_expr_node((yyvsp[0].node));
18181 switch (nd_type(expr)) {
18182 case NODE_STR:
18183 case NODE_DSTR:
18184 case NODE_XSTR:
18185 case NODE_DXSTR:
18186 case NODE_REGX:
18187 case NODE_DREGX:
18188 case NODE_SYM:
18189 case NODE_LINE:
18190 case NODE_FILE:
18191 case NODE_ENCODING:
18192 case NODE_INTEGER:
18193 case NODE_FLOAT:
18194 case NODE_RATIONAL:
18195 case NODE_IMAGINARY:
18196 case NODE_DSYM:
18197 case NODE_LIST:
18198 case NODE_ZLIST:
18199 yyerror1(&expr->nd_loc, "can't define singleton method for literals");
18200 break;
18201 default:
18202 break;
18203 }
18204 (yyval.node) = (yyvsp[0].node);
18205 }
18206#line 18207 "parse.c"
18207 break;
18208
18209 case 819: /* $@40: %empty */
18210#line 6583 "parse.y"
18211 {
18212 SET_LEX_STATE(EXPR_BEG);
18213 p->ctxt.in_argdef = 0;
18214 }
18215#line 18216 "parse.c"
18216 break;
18217
18218 case 820: /* singleton_expr: '(' $@40 expr rparen */
18219#line 6588 "parse.y"
18220 {
18221 p->ctxt.in_argdef = 1;
18222 (yyval.node) = (yyvsp[-1].node);
18223 /*% ripper: paren!($:3) %*/
18224 }
18225#line 18226 "parse.c"
18226 break;
18227
18228 case 822: /* assoc_list: assocs trailer */
18229#line 6597 "parse.y"
18230 {
18231 (yyval.node) = (yyvsp[-1].node);
18232 /*% ripper: assoclist_from_args!($:1) %*/
18233 }
18234#line 18235 "parse.c"
18235 break;
18236
18237 case 824: /* assocs: assocs ',' assoc */
18238#line 6606 "parse.y"
18239 {
18240 NODE *assocs = (yyvsp[-2].node);
18241 NODE *tail = (yyvsp[0].node);
18242 if (!assocs) {
18243 assocs = tail;
18244 }
18245 else if (tail) {
18246 if (RNODE_LIST(assocs)->nd_head) {
18247 NODE *n = RNODE_LIST(tail)->nd_next;
18248 if (!RNODE_LIST(tail)->nd_head && nd_type_p(n, NODE_LIST) &&
18249 nd_type_p((n = RNODE_LIST(n)->nd_head), NODE_HASH)) {
18250 /* DSTAR */
18251 tail = RNODE_HASH(n)->nd_head;
18252 }
18253 }
18254 if (tail) {
18255 assocs = list_concat(assocs, tail);
18256 }
18257 }
18258 (yyval.node) = assocs;
18259 /*% ripper: rb_ary_push($:1, $:3) %*/
18260 }
18261#line 18262 "parse.c"
18262 break;
18263
18264 case 825: /* assoc: arg_value "=>" arg_value */
18265#line 6631 "parse.y"
18266 {
18267 (yyval.node) = list_append(p, NEW_LIST((yyvsp[-2].node), &(yyloc)), (yyvsp[0].node));
18268 /*% ripper: assoc_new!($:1, $:3) %*/
18269 }
18270#line 18271 "parse.c"
18271 break;
18272
18273 case 826: /* assoc: "label" arg_value */
18274#line 6636 "parse.y"
18275 {
18276 (yyval.node) = list_append(p, NEW_LIST(NEW_SYM(rb_id2str((yyvsp[-1].id)), &(yylsp[-1])), &(yyloc)), (yyvsp[0].node));
18277 /*% ripper: assoc_new!($:1, $:2) %*/
18278 }
18279#line 18280 "parse.c"
18280 break;
18281
18282 case 827: /* assoc: "label" */
18283#line 6641 "parse.y"
18284 {
18285 NODE *val = gettable(p, (yyvsp[0].id), &(yyloc));
18286 if (!val) val = NEW_ERROR(&(yyloc));
18287 (yyval.node) = list_append(p, NEW_LIST(NEW_SYM(rb_id2str((yyvsp[0].id)), &(yylsp[0])), &(yyloc)), val);
18288 /*% ripper: assoc_new!($:1, Qnil) %*/
18289 }
18290#line 18291 "parse.c"
18291 break;
18292
18293 case 828: /* assoc: "string literal" string_contents tLABEL_END arg_value */
18294#line 6648 "parse.y"
18295 {
18296 YYLTYPE loc = code_loc_gen(&(yylsp[-3]), &(yylsp[-1]));
18297 (yyval.node) = list_append(p, NEW_LIST(dsym_node(p, (yyvsp[-2].node), &loc), &loc), (yyvsp[0].node));
18298 /*% ripper: assoc_new!(dyna_symbol!($:2), $:4) %*/
18299 }
18300#line 18301 "parse.c"
18301 break;
18302
18303 case 829: /* assoc: "**arg" arg_value */
18304#line 6654 "parse.y"
18305 {
18306 (yyval.node) = list_append(p, NEW_LIST(0, &(yyloc)), (yyvsp[0].node));
18307 /*% ripper: assoc_splat!($:2) %*/
18308 }
18309#line 18310 "parse.c"
18310 break;
18311
18312 case 830: /* assoc: "**arg" */
18313#line 6659 "parse.y"
18314 {
18315 forwarding_arg_check(p, idFWD_KWREST, idFWD_ALL, "keyword rest");
18316 (yyval.node) = list_append(p, NEW_LIST(0, &(yyloc)),
18317 NEW_LVAR(idFWD_KWREST, &(yyloc)));
18318 /*% ripper: assoc_splat!(Qnil) %*/
18319 }
18320#line 18321 "parse.c"
18321 break;
18322
18323 case 849: /* term: ';' */
18324#line 6706 "parse.y"
18325 {
18326 yyerrok;
18327 token_flush(p);
18328 if (p->ctxt.in_defined) {
18329 p->ctxt.has_trailing_semicolon = 1;
18330 }
18331 }
18332#line 18333 "parse.c"
18333 break;
18334
18335 case 850: /* term: '\n' */
18336#line 6714 "parse.y"
18337 {
18338 (yyloc).end_pos = (yyloc).beg_pos;
18339 token_flush(p);
18340 }
18341#line 18342 "parse.c"
18342 break;
18343
18344 case 852: /* terms: terms ';' */
18345#line 6721 "parse.y"
18346 {yyerrok;}
18347#line 18348 "parse.c"
18348 break;
18349
18350 case 853: /* none: %empty */
18351#line 6725 "parse.y"
18352 {
18353 (yyval.node) = 0;
18354 /*% ripper: Qnil %*/
18355 }
18356#line 18357 "parse.c"
18357 break;
18358
18359
18360#line 18361 "parse.c"
18361
18362 default: break;
18363 }
18364 /* User semantic actions sometimes alter yychar, and that requires
18365 that yytoken be updated with the new translation. We take the
18366 approach of translating immediately before every use of yytoken.
18367 One alternative is translating here after every semantic action,
18368 but that translation would be missed if the semantic action invokes
18369 YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or
18370 if it invokes YYBACKUP. In the case of YYABORT or YYACCEPT, an
18371 incorrect destructor might then be invoked immediately. In the
18372 case of YYERROR or YYBACKUP, subsequent parser actions might lead
18373 to an incorrect destructor call or verbose syntax error message
18374 before the lookahead is translated. */
18375 YY_SYMBOL_PRINT ("-> $$ =", YY_CAST (yysymbol_kind_t, yyr1[yyn]), &yyval, &yyloc, p);
18376
18377 YYPOPSTACK (yylen);
18378 /* %after-reduce function. */
18379#line 2667 "parse.y"
18380 {after_reduce(yylen, p);}
18381#line 18382 "parse.c"
18382
18383 yylen = 0;
18384
18385 *++yyvsp = yyval;
18386 *++yylsp = yyloc;
18387
18388 /* Now 'shift' the result of the reduction. Determine what state
18389 that goes to, based on the state we popped back to and the rule
18390 number reduced by. */
18391 {
18392 const int yylhs = yyr1[yyn] - YYNTOKENS;
18393 const int yyi = yypgoto[yylhs] + *yyssp;
18394 yystate = (0 <= yyi && yyi <= YYLAST && yycheck[yyi] == *yyssp
18395 ? yytable[yyi]
18396 : yydefgoto[yylhs]);
18397 }
18398
18399 goto yynewstate;
18400
18401
18402/*--------------------------------------.
18403| yyerrlab -- here on detecting error. |
18404`--------------------------------------*/
18405yyerrlab:
18406 /* Make sure we have latest lookahead translation. See comments at
18407 user semantic actions for why this is necessary. */
18408 yytoken = yychar == YYEMPTY ? YYSYMBOL_YYEMPTY : YYTRANSLATE (yychar);
18409 /* If not already recovering from an error, report this error. */
18410 if (!yyerrstatus)
18411 {
18412 ++yynerrs;
18413 {
18414 yypcontext_t yyctx
18415 = {yyssp, yytoken, &yylloc};
18416 char const *yymsgp = YY_("syntax error");
18417 int yysyntax_error_status;
18418 yysyntax_error_status = yysyntax_error (&yymsg_alloc, &yymsg, &yyctx, p);
18419 if (yysyntax_error_status == 0)
18420 yymsgp = yymsg;
18421 else if (yysyntax_error_status == -1)
18422 {
18423 if (yymsg != yymsgbuf)
18424 YYSTACK_FREE (yymsg);
18425 yymsg = YY_CAST (char *,
18426 YYSTACK_ALLOC (YY_CAST (YYSIZE_T, yymsg_alloc)));
18427 if (yymsg)
18428 {
18429 yysyntax_error_status
18430 = yysyntax_error (&yymsg_alloc, &yymsg, &yyctx, p);
18431 yymsgp = yymsg;
18432 }
18433 else
18434 {
18435 yymsg = yymsgbuf;
18436 yymsg_alloc = sizeof yymsgbuf;
18437 yysyntax_error_status = YYENOMEM;
18438 }
18439 }
18440 yyerror (&yylloc, p, yymsgp);
18441 if (yysyntax_error_status == YYENOMEM)
18442 YYNOMEM;
18443 }
18444 }
18445
18446 yyerror_range[1] = yylloc;
18447 if (yyerrstatus == 3)
18448 {
18449 /* If just tried and failed to reuse lookahead token after an
18450 error, discard it. */
18451
18452 if (yychar <= END_OF_INPUT)
18453 {
18454 /* Return failure if at end of input. */
18455 if (yychar == END_OF_INPUT)
18456 YYABORT;
18457 }
18458 else
18459 {
18460 yydestruct ("Error: discarding",
18461 yytoken, &yylval, &yylloc, p);
18462 yychar = YYEMPTY;
18463 }
18464 }
18465
18466 /* Else will try to reuse lookahead token after shifting the error
18467 token. */
18468 goto yyerrlab1;
18469
18470
18471/*---------------------------------------------------.
18472| yyerrorlab -- error raised explicitly by YYERROR. |
18473`---------------------------------------------------*/
18474yyerrorlab:
18475 /* Pacify compilers when the user code never invokes YYERROR and the
18476 label yyerrorlab therefore never appears in user code. */
18477 if (0)
18478 YYERROR;
18479 ++yynerrs;
18480
18481 /* Do not reclaim the symbols of the rule whose action triggered
18482 this YYERROR. */
18483 YYPOPSTACK (yylen);
18484 /* %after-pop-stack function. */
18485#line 2669 "parse.y"
18486 {after_pop_stack(yylen, p);}
18487#line 18488 "parse.c"
18488
18489 yylen = 0;
18490 YY_STACK_PRINT (yyss, yyssp, p);
18491 yystate = *yyssp;
18492 goto yyerrlab1;
18493
18494
18495/*-------------------------------------------------------------.
18496| yyerrlab1 -- common code for both syntax error and YYERROR. |
18497`-------------------------------------------------------------*/
18498yyerrlab1:
18499 yyerrstatus = 3; /* Each real token shifted decrements this. */
18500
18501 /* Pop stack until we find a state that shifts the error token. */
18502 for (;;)
18503 {
18504 yyn = yypact[yystate];
18505 if (!yypact_value_is_default (yyn))
18506 {
18507 yyn += YYSYMBOL_YYerror;
18508 if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror)
18509 {
18510 yyn = yytable[yyn];
18511 if (0 < yyn)
18512 break;
18513 }
18514 }
18515
18516 /* Pop the current state because it cannot handle the error token. */
18517 if (yyssp == yyss)
18518 YYABORT;
18519
18520 yyerror_range[1] = *yylsp;
18521 yydestruct ("Error: popping",
18522 YY_ACCESSING_SYMBOL (yystate), yyvsp, yylsp, p);
18523 YYPOPSTACK (1);
18524 /* %after-pop-stack function. */
18525#line 2669 "parse.y"
18526 {after_pop_stack(1, p);}
18527#line 18528 "parse.c"
18528
18529 yystate = *yyssp;
18530 YY_STACK_PRINT (yyss, yyssp, p);
18531 }
18532
18533 YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
18534 *++yyvsp = yylval;
18535 YY_IGNORE_MAYBE_UNINITIALIZED_END
18536
18537 yyerror_range[2] = yylloc;
18538 ++yylsp;
18539 YYLLOC_DEFAULT (*yylsp, yyerror_range, 2);
18540
18541 /* Shift the error token. */
18542 YY_SYMBOL_PRINT ("Shifting", YY_ACCESSING_SYMBOL (yyn), yyvsp, yylsp, p);
18543 /* %after-shift-error-token code. */
18544#line 2668 "parse.y"
18545 {after_shift_error_token(p);}
18546#line 18547 "parse.c"
18547
18548
18549 yystate = yyn;
18550 goto yynewstate;
18551
18552
18553/*-------------------------------------.
18554| yyacceptlab -- YYACCEPT comes here. |
18555`-------------------------------------*/
18556yyacceptlab:
18557 yyresult = 0;
18558 goto yyreturnlab;
18559
18560
18561/*-----------------------------------.
18562| yyabortlab -- YYABORT comes here. |
18563`-----------------------------------*/
18564yyabortlab:
18565 yyresult = 1;
18566 goto yyreturnlab;
18567
18568
18569/*-----------------------------------------------------------.
18570| yyexhaustedlab -- YYNOMEM (memory exhaustion) comes here. |
18571`-----------------------------------------------------------*/
18572yyexhaustedlab:
18573 yyerror (&yylloc, p, YY_("memory exhausted"));
18574 yyresult = 2;
18575 goto yyreturnlab;
18576
18577
18578/*----------------------------------------------------------.
18579| yyreturnlab -- parsing is finished, clean up and return. |
18580`----------------------------------------------------------*/
18581yyreturnlab:
18582 if (yychar != YYEMPTY)
18583 {
18584 /* Make sure we have latest lookahead translation. See comments at
18585 user semantic actions for why this is necessary. */
18586 yytoken = YYTRANSLATE (yychar);
18587 yydestruct ("Cleanup: discarding lookahead",
18588 yytoken, &yylval, &yylloc, p);
18589 }
18590 /* Do not reclaim the symbols of the rule whose action triggered
18591 this YYABORT or YYACCEPT. */
18592 YYPOPSTACK (yylen);
18593 YY_STACK_PRINT (yyss, yyssp, p);
18594 while (yyssp != yyss)
18595 {
18596 yydestruct ("Cleanup: popping",
18597 YY_ACCESSING_SYMBOL (+*yyssp), yyvsp, yylsp, p);
18598 YYPOPSTACK (1);
18599 }
18600#ifndef yyoverflow
18601 if (yyss != yyssa)
18602 YYSTACK_FREE (yyss);
18603#endif
18604 if (yymsg != yymsgbuf)
18605 YYSTACK_FREE (yymsg);
18606 return yyresult;
18607}
18608
18609#line 6730 "parse.y"
18610
18611# undef p
18612# undef yylex
18613# undef yylval
18614# define yylval (*p->lval)
18615
18616static int regx_options(struct parser_params*);
18617static int tokadd_string(struct parser_params*,int,int,int,long*,rb_encoding**,rb_encoding**);
18618static void tokaddmbc(struct parser_params *p, int c, rb_encoding *enc);
18619static enum yytokentype parse_string(struct parser_params*,rb_strterm_literal_t*);
18620static enum yytokentype here_document(struct parser_params*,rb_strterm_heredoc_t*);
18621
18622#define set_parser_s_value(x) (ifdef_ripper(p->s_value = (x), (void)0))
18623
18624# define set_yylval_node(x) { \
18625 YYLTYPE _cur_loc; \
18626 rb_parser_set_location(p, &_cur_loc); \
18627 yylval.node = (x); \
18628 set_parser_s_value(STR_NEW(p->lex.ptok, p->lex.pcur-p->lex.ptok)); \
18629}
18630# define set_yylval_str(x) \
18631do { \
18632 set_yylval_node(NEW_STR(x, &_cur_loc)); \
18633 set_parser_s_value(rb_str_new_mutable_parser_string(x)); \
18634} while(0)
18635# define set_yylval_num(x) { \
18636 yylval.num = (x); \
18637 set_parser_s_value(x); \
18638}
18639# define set_yylval_id(x) (yylval.id = (x))
18640# define set_yylval_name(x) { \
18641 (yylval.id = (x)); \
18642 set_parser_s_value(ID2SYM(x)); \
18643}
18644# define yylval_id() (yylval.id)
18645
18646#define set_yylval_noname() set_yylval_id(keyword_nil)
18647#define has_delayed_token(p) (p->delayed.token != NULL)
18648
18649#ifndef RIPPER
18650#define literal_flush(p, ptr) ((p)->lex.ptok = (ptr))
18651#define dispatch_scan_event(p, t) parser_dispatch_scan_event(p, t, __LINE__)
18652
18653static bool
18654parser_has_token(struct parser_params *p)
18655{
18656 const char *const pcur = p->lex.pcur;
18657 const char *const ptok = p->lex.ptok;
18658 if (p->keep_tokens && (pcur < ptok)) {
18659 rb_bug("lex.pcur < lex.ptok. (line: %d) %"PRIdPTRDIFF"|%"PRIdPTRDIFF"|%"PRIdPTRDIFF"",
18660 p->ruby_sourceline, ptok - p->lex.pbeg, pcur - ptok, p->lex.pend - pcur);
18661 }
18662 return pcur > ptok;
18663}
18664
18665static const char *
18666escaped_char(int c)
18667{
18668 switch (c) {
18669 case '"': return "\\\"";
18670 case '\\': return "\\\\";
18671 case '\0': return "\\0";
18672 case '\n': return "\\n";
18673 case '\r': return "\\r";
18674 case '\t': return "\\t";
18675 case '\f': return "\\f";
18676 case '\013': return "\\v";
18677 case '\010': return "\\b";
18678 case '\007': return "\\a";
18679 case '\033': return "\\e";
18680 case '\x7f': return "\\c?";
18681 }
18682 return NULL;
18683}
18684
18685static rb_parser_string_t *
18686rb_parser_str_escape(struct parser_params *p, rb_parser_string_t *str)
18687{
18688 rb_encoding *enc = p->enc;
18689 const char *ptr = str->ptr;
18690 const char *pend = ptr + str->len;
18691 const char *prev = ptr;
18692 char charbuf[5] = {'\\', 'x', 0, 0, 0};
18693 rb_parser_string_t * result = rb_parser_string_new(p, 0, 0);
18694
18695 while (ptr < pend) {
18696 unsigned int c;
18697 const char *cc;
18698 int n = rb_enc_precise_mbclen(ptr, pend, enc);
18699 if (!MBCLEN_CHARFOUND_P(n)) {
18700 if (ptr > prev) parser_str_cat(result, prev, ptr - prev);
18701 n = rb_enc_mbminlen(enc);
18702 if (pend < ptr + n)
18703 n = (int)(pend - ptr);
18704 while (n--) {
18705 c = *ptr & 0xf0 >> 4;
18706 charbuf[2] = (c < 10) ? '0' + c : 'A' + c - 10;
18707 c = *ptr & 0x0f;
18708 charbuf[3] = (c < 10) ? '0' + c : 'A' + c - 10;
18709 parser_str_cat(result, charbuf, 4);
18710 prev = ++ptr;
18711 }
18712 continue;
18713 }
18714 n = MBCLEN_CHARFOUND_LEN(n);
18715 c = rb_enc_mbc_to_codepoint(ptr, pend, enc);
18716 ptr += n;
18717 cc = escaped_char(c);
18718 if (cc) {
18719 if (ptr - n > prev) parser_str_cat(result, prev, ptr - n - prev);
18720 parser_str_cat_cstr(result, cc);
18721 prev = ptr;
18722 }
18723 else if (rb_enc_isascii(c, enc) && ISPRINT(c)) {
18724 }
18725 else {
18726 if (ptr - n > prev) {
18727 parser_str_cat(result, prev, ptr - n - prev);
18728 prev = ptr - n;
18729 }
18730 parser_str_cat(result, prev, ptr - prev);
18731 prev = ptr;
18732 }
18733 }
18734 if (ptr > prev) parser_str_cat(result, prev, ptr - prev);
18735
18736 return result;
18737}
18738
18739static void
18740parser_append_tokens(struct parser_params *p, rb_parser_string_t *str, enum yytokentype t, int line)
18741{
18743 token->id = p->token_id;
18744 token->type_name = parser_token2char(p, t);
18745 token->str = str;
18746 token->loc.beg_pos = p->yylloc->beg_pos;
18747 token->loc.end_pos = p->yylloc->end_pos;
18748 rb_parser_ary_push_ast_token(p, p->tokens, token);
18749 p->token_id++;
18750
18751 if (p->debug) {
18752 rb_parser_string_t *str_escaped = rb_parser_str_escape(p, str);
18753 rb_parser_printf(p, "Append tokens (line: %d) [%d, :%s, \"%s\", [%d, %d, %d, %d]]\n",
18754 line, token->id, token->type_name, str_escaped->ptr,
18755 token->loc.beg_pos.lineno, token->loc.beg_pos.column,
18756 token->loc.end_pos.lineno, token->loc.end_pos.column);
18757 rb_parser_string_free(p, str_escaped);
18758 }
18759}
18760
18761static void
18762parser_dispatch_scan_event(struct parser_params *p, enum yytokentype t, int line)
18763{
18764 debug_token_line(p, "parser_dispatch_scan_event", line);
18765
18766 if (!parser_has_token(p)) return;
18767
18768 RUBY_SET_YYLLOC(*p->yylloc);
18769
18770 if (p->keep_tokens) {
18771 rb_parser_string_t *str = rb_parser_encoding_string_new(p, p->lex.ptok, p->lex.pcur - p->lex.ptok, p->enc);
18772 parser_append_tokens(p, str, t, line);
18773 }
18774
18775 token_flush(p);
18776}
18777
18778#define dispatch_delayed_token(p, t) parser_dispatch_delayed_token(p, t, __LINE__)
18779static void
18780parser_dispatch_delayed_token(struct parser_params *p, enum yytokentype t, int line)
18781{
18782 debug_token_line(p, "parser_dispatch_delayed_token", line);
18783
18784 if (!has_delayed_token(p)) return;
18785
18786 RUBY_SET_YYLLOC_OF_DELAYED_TOKEN(*p->yylloc);
18787
18788 if (p->keep_tokens) {
18789 /* p->delayed.token is freed by rb_parser_tokens_free */
18790 parser_append_tokens(p, p->delayed.token, t, line);
18791 }
18792 else {
18793 rb_parser_string_free(p, p->delayed.token);
18794 }
18795
18796 p->delayed.token = NULL;
18797}
18798#else
18799#define literal_flush(p, ptr) ((void)(ptr))
18800
18801static int
18802ripper_has_scan_event(struct parser_params *p)
18803{
18804 if (p->lex.pcur < p->lex.ptok) rb_raise(rb_eRuntimeError, "lex.pcur < lex.ptok");
18805 return p->lex.pcur > p->lex.ptok;
18806}
18807
18808static VALUE
18809ripper_scan_event_val(struct parser_params *p, enum yytokentype t)
18810{
18811 VALUE str = STR_NEW(p->lex.ptok, p->lex.pcur - p->lex.ptok);
18812 VALUE rval = ripper_dispatch1(p, ripper_token2eventid(t), str);
18813 RUBY_SET_YYLLOC(*p->yylloc);
18814 token_flush(p);
18815 return rval;
18816}
18817
18818static void
18819ripper_dispatch_scan_event(struct parser_params *p, enum yytokentype t)
18820{
18821 if (!ripper_has_scan_event(p)) return;
18822
18823 set_parser_s_value(ripper_scan_event_val(p, t));
18824}
18825#define dispatch_scan_event(p, t) ripper_dispatch_scan_event(p, t)
18826
18827static void
18828ripper_dispatch_delayed_token(struct parser_params *p, enum yytokentype t)
18829{
18830 /* save and adjust the location to delayed token for callbacks */
18831 int saved_line = p->ruby_sourceline;
18832 const char *saved_tokp = p->lex.ptok;
18833 VALUE s_value, str;
18834
18835 if (!has_delayed_token(p)) return;
18836 p->ruby_sourceline = p->delayed.beg_line;
18837 p->lex.ptok = p->lex.pbeg + p->delayed.beg_col;
18838 str = rb_str_new_mutable_parser_string(p->delayed.token);
18839 rb_parser_string_free(p, p->delayed.token);
18840 s_value = ripper_dispatch1(p, ripper_token2eventid(t), str);
18841 set_parser_s_value(s_value);
18842 p->delayed.token = NULL;
18843 p->ruby_sourceline = saved_line;
18844 p->lex.ptok = saved_tokp;
18845}
18846#define dispatch_delayed_token(p, t) ripper_dispatch_delayed_token(p, t)
18847#endif /* RIPPER */
18848
18849static inline int
18850is_identchar(struct parser_params *p, const char *ptr, const char *MAYBE_UNUSED(ptr_end), rb_encoding *enc)
18851{
18852 return rb_enc_isalnum((unsigned char)*ptr, enc) || *ptr == '_' || !ISASCII(*ptr);
18853}
18854
18855static inline bool
18856peek_word_at(struct parser_params *p, const char *str, size_t len, int at)
18857{
18858 const char *ptr = p->lex.pcur + at;
18859 if (lex_eol_ptr_n_p(p, ptr, len-1)) return false;
18860 if (memcmp(ptr, str, len)) return false;
18861 if (lex_eol_ptr_n_p(p, ptr, len)) return true;
18862 switch (ptr[len]) {
18863 case '!': case '?': return false;
18864 }
18865 return !is_identchar(p, ptr+len, p->lex.pend, p->enc);
18866}
18867
18868static inline int
18869parser_is_identchar(struct parser_params *p)
18870{
18871 return !(p)->eofp && is_identchar(p, p->lex.pcur-1, p->lex.pend, p->enc);
18872}
18873
18874static inline int
18875parser_isascii(struct parser_params *p)
18876{
18877 return ISASCII(*(p->lex.pcur-1));
18878}
18879
18880static void
18881token_info_setup(token_info *ptinfo, const char *ptr, const rb_code_location_t *loc)
18882{
18883 int column = 1, nonspc = 0, i;
18884 for (i = 0; i < loc->beg_pos.column; i++, ptr++) {
18885 if (*ptr == '\t') {
18886 column = (((column - 1) / TAB_WIDTH) + 1) * TAB_WIDTH;
18887 }
18888 column++;
18889 if (*ptr != ' ' && *ptr != '\t') {
18890 nonspc = 1;
18891 }
18892 }
18893
18894 ptinfo->beg = loc->beg_pos;
18895 ptinfo->indent = column;
18896 ptinfo->nonspc = nonspc;
18897}
18898
18899static void
18900token_info_push(struct parser_params *p, const char *token, const rb_code_location_t *loc)
18901{
18902 token_info *ptinfo;
18903
18904 if (!p->token_info_enabled) return;
18905 ptinfo = ALLOC(token_info);
18906 ptinfo->token = token;
18907 ptinfo->next = p->token_info;
18908 token_info_setup(ptinfo, p->lex.pbeg, loc);
18909
18910 p->token_info = ptinfo;
18911}
18912
18913static void
18914token_info_pop(struct parser_params *p, const char *token, const rb_code_location_t *loc)
18915{
18916 token_info *ptinfo_beg = p->token_info;
18917
18918 if (!ptinfo_beg) return;
18919
18920 /* indentation check of matched keywords (begin..end, if..end, etc.) */
18921 token_info_warn(p, token, ptinfo_beg, 1, loc);
18922
18923 p->token_info = ptinfo_beg->next;
18924 ruby_xfree_sized(ptinfo_beg, sizeof(*ptinfo_beg));
18925}
18926
18927static void
18928token_info_drop(struct parser_params *p, const char *token, rb_code_position_t beg_pos)
18929{
18930 token_info *ptinfo_beg = p->token_info;
18931
18932 if (!ptinfo_beg) return;
18933 p->token_info = ptinfo_beg->next;
18934
18935 if (ptinfo_beg->beg.lineno != beg_pos.lineno ||
18936 ptinfo_beg->beg.column != beg_pos.column ||
18937 strcmp(ptinfo_beg->token, token)) {
18938 compile_error(p, "token position mismatch: %d:%d:%s expected but %d:%d:%s",
18939 beg_pos.lineno, beg_pos.column, token,
18940 ptinfo_beg->beg.lineno, ptinfo_beg->beg.column,
18941 ptinfo_beg->token);
18942 }
18943
18944 ruby_xfree_sized(ptinfo_beg, sizeof(*ptinfo_beg));
18945}
18946
18947static void
18948token_info_warn(struct parser_params *p, const char *token, token_info *ptinfo_beg, int same, const rb_code_location_t *loc)
18949{
18950 token_info ptinfo_end_body, *ptinfo_end = &ptinfo_end_body;
18951 if (!p->token_info_enabled) return;
18952 if (!ptinfo_beg) return;
18953 token_info_setup(ptinfo_end, p->lex.pbeg, loc);
18954 if (ptinfo_beg->beg.lineno == ptinfo_end->beg.lineno) return; /* ignore one-line block */
18955 if (ptinfo_beg->nonspc || ptinfo_end->nonspc) return; /* ignore keyword in the middle of a line */
18956 if (ptinfo_beg->indent == ptinfo_end->indent) return; /* the indents are matched */
18957 if (!same && ptinfo_beg->indent < ptinfo_end->indent) return;
18958 rb_warn3L(ptinfo_end->beg.lineno,
18959 "mismatched indentations at '%s' with '%s' at %d",
18960 WARN_S(token), WARN_S(ptinfo_beg->token), WARN_I(ptinfo_beg->beg.lineno));
18961}
18962
18963static int
18964parser_precise_mbclen(struct parser_params *p, const char *ptr)
18965{
18966 int len = rb_enc_precise_mbclen(ptr, p->lex.pend, p->enc);
18967 if (!MBCLEN_CHARFOUND_P(len)) {
18968 compile_error(p, "invalid multibyte char (%s)", rb_enc_name(p->enc));
18969 return -1;
18970 }
18971 return len;
18972}
18973
18974#ifndef RIPPER
18975static inline void
18976parser_show_error_line(struct parser_params *p, const YYLTYPE *yylloc)
18977{
18978 rb_parser_string_t *str;
18979 int lineno = p->ruby_sourceline;
18980 if (!yylloc) {
18981 return;
18982 }
18983 else if (yylloc->beg_pos.lineno == lineno) {
18984 str = p->lex.lastline;
18985 }
18986 else {
18987 return;
18988 }
18989 ruby_show_error_line(p, p->error_buffer, yylloc, lineno, str);
18990}
18991
18992static int
18993parser_yyerror(struct parser_params *p, const rb_code_location_t *yylloc, const char *msg)
18994{
18995#if 0
18996 YYLTYPE current;
18997
18998 if (!yylloc) {
18999 yylloc = RUBY_SET_YYLLOC(current);
19000 }
19001 else if ((p->ruby_sourceline != yylloc->beg_pos.lineno &&
19002 p->ruby_sourceline != yylloc->end_pos.lineno)) {
19003 yylloc = 0;
19004 }
19005#endif
19006 parser_compile_error(p, yylloc, "%s", msg);
19007 parser_show_error_line(p, yylloc);
19008 return 0;
19009}
19010
19011static int
19012parser_yyerror0(struct parser_params *p, const char *msg)
19013{
19014 YYLTYPE current;
19015 return parser_yyerror(p, RUBY_SET_YYLLOC(current), msg);
19016}
19017
19018void
19019ruby_show_error_line(struct parser_params *p, VALUE errbuf, const YYLTYPE *yylloc, int lineno, rb_parser_string_t *str)
19020{
19021 VALUE mesg;
19022 const int max_line_margin = 30;
19023 const char *ptr, *ptr_end, *pt, *pb;
19024 const char *pre = "", *post = "", *pend;
19025 const char *code = "", *caret = "";
19026 const char *lim;
19027 const char *const pbeg = PARSER_STRING_PTR(str);
19028 char *buf;
19029 long len;
19030 int i;
19031
19032 if (!yylloc) return;
19033 pend = rb_parser_string_end(str);
19034 if (pend > pbeg && pend[-1] == '\n') {
19035 if (--pend > pbeg && pend[-1] == '\r') --pend;
19036 }
19037
19038 pt = pend;
19039 if (lineno == yylloc->end_pos.lineno &&
19040 (pend - pbeg) > yylloc->end_pos.column) {
19041 pt = pbeg + yylloc->end_pos.column;
19042 }
19043
19044 ptr = ptr_end = pt;
19045 lim = ptr - pbeg > max_line_margin ? ptr - max_line_margin : pbeg;
19046 while ((lim < ptr) && (*(ptr-1) != '\n')) ptr--;
19047
19048 lim = pend - ptr_end > max_line_margin ? ptr_end + max_line_margin : pend;
19049 while ((ptr_end < lim) && (*ptr_end != '\n') && (*ptr_end != '\r')) ptr_end++;
19050
19051 len = ptr_end - ptr;
19052 if (len > 4) {
19053 if (ptr > pbeg) {
19054 ptr = rb_enc_prev_char(pbeg, ptr, pt, rb_parser_str_get_encoding(str));
19055 if (ptr > pbeg) pre = "...";
19056 }
19057 if (ptr_end < pend) {
19058 ptr_end = rb_enc_prev_char(pt, ptr_end, pend, rb_parser_str_get_encoding(str));
19059 if (ptr_end < pend) post = "...";
19060 }
19061 }
19062 pb = pbeg;
19063 if (lineno == yylloc->beg_pos.lineno) {
19064 pb += yylloc->beg_pos.column;
19065 if (pb > pt) pb = pt;
19066 }
19067 if (pb < ptr) pb = ptr;
19068 if (len <= 4 && yylloc->beg_pos.lineno == yylloc->end_pos.lineno) {
19069 return;
19070 }
19071 if (RTEST(errbuf)) {
19072 mesg = rb_attr_get(errbuf, idMesg);
19073 if (char_at_end(p, mesg, '\n') != '\n')
19074 rb_str_cat_cstr(mesg, "\n");
19075 }
19076 else {
19077 mesg = rb_enc_str_new(0, 0, rb_parser_str_get_encoding(str));
19078 }
19079 if (!errbuf && rb_stderr_tty_p()) {
19080#define CSI_BEGIN "\033["
19081#define CSI_SGR "m"
19082 rb_str_catf(mesg,
19083 CSI_BEGIN""CSI_SGR"%s" /* pre */
19084 CSI_BEGIN"1"CSI_SGR"%.*s"
19085 CSI_BEGIN"1;4"CSI_SGR"%.*s"
19086 CSI_BEGIN";1"CSI_SGR"%.*s"
19087 CSI_BEGIN""CSI_SGR"%s" /* post */
19088 "\n",
19089 pre,
19090 (int)(pb - ptr), ptr,
19091 (int)(pt - pb), pb,
19092 (int)(ptr_end - pt), pt,
19093 post);
19094 }
19095 else {
19096 char *p2;
19097
19098 len = ptr_end - ptr;
19099 lim = pt < pend ? pt : pend;
19100 i = (int)(lim - ptr);
19101 buf = ALLOCA_N(char, i+2);
19102 code = ptr;
19103 caret = p2 = buf;
19104 if (ptr <= pb) {
19105 while (ptr < pb) {
19106 *p2++ = *ptr++ == '\t' ? '\t' : ' ';
19107 }
19108 *p2++ = '^';
19109 ptr++;
19110 }
19111 if (lim > ptr) {
19112 memset(p2, '~', (lim - ptr));
19113 p2 += (lim - ptr);
19114 }
19115 *p2 = '\0';
19116 rb_str_catf(mesg, "%s%.*s%s\n""%s%s\n",
19117 pre, (int)len, code, post,
19118 pre, caret);
19119 }
19120 if (!errbuf) rb_write_error_str(mesg);
19121}
19122#else
19123
19124static int
19125parser_yyerror(struct parser_params *p, const YYLTYPE *yylloc, const char *msg)
19126{
19127 const char *pcur = 0, *ptok = 0;
19128 if (p->ruby_sourceline == yylloc->beg_pos.lineno &&
19129 p->ruby_sourceline == yylloc->end_pos.lineno) {
19130 pcur = p->lex.pcur;
19131 ptok = p->lex.ptok;
19132 p->lex.ptok = p->lex.pbeg + yylloc->beg_pos.column;
19133 p->lex.pcur = p->lex.pbeg + yylloc->end_pos.column;
19134 }
19135 parser_yyerror0(p, msg);
19136 if (pcur) {
19137 p->lex.ptok = ptok;
19138 p->lex.pcur = pcur;
19139 }
19140 return 0;
19141}
19142
19143static int
19144parser_yyerror0(struct parser_params *p, const char *msg)
19145{
19146 dispatch1(parse_error, STR_NEW2(msg));
19147 ripper_error(p);
19148 return 0;
19149}
19150
19151static inline void
19152parser_show_error_line(struct parser_params *p, const YYLTYPE *yylloc)
19153{
19154}
19155#endif /* !RIPPER */
19156
19157static int
19158vtable_size(const struct vtable *tbl)
19159{
19160 if (!DVARS_TERMINAL_P(tbl)) {
19161 return tbl->pos;
19162 }
19163 else {
19164 return 0;
19165 }
19166}
19167
19168static struct vtable *
19169vtable_alloc_gen(struct parser_params *p, int line, struct vtable *prev)
19170{
19171 struct vtable *tbl = ALLOC(struct vtable);
19172 tbl->pos = 0;
19173 tbl->capa = 8;
19174 tbl->tbl = ALLOC_N(ID, tbl->capa);
19175 tbl->prev = prev;
19176#ifndef RIPPER
19177 if (p->debug) {
19178 rb_parser_printf(p, "vtable_alloc:%d: %p\n", line, (void *)tbl);
19179 }
19180#endif
19181 return tbl;
19182}
19183#define vtable_alloc(prev) vtable_alloc_gen(p, __LINE__, prev)
19184
19185static void
19186vtable_free_gen(struct parser_params *p, int line, const char *name,
19187 struct vtable *tbl)
19188{
19189#ifndef RIPPER
19190 if (p->debug) {
19191 rb_parser_printf(p, "vtable_free:%d: %s(%p)\n", line, name, (void *)tbl);
19192 }
19193#endif
19194 if (!DVARS_TERMINAL_P(tbl)) {
19195 if (tbl->tbl) {
19196 ruby_xfree_sized(tbl->tbl, tbl->capa * sizeof(ID));
19197 }
19198 ruby_xfree_sized(tbl, sizeof(*tbl));
19199 }
19200}
19201#define vtable_free(tbl) vtable_free_gen(p, __LINE__, #tbl, tbl)
19202
19203static void
19204vtable_add_gen(struct parser_params *p, int line, const char *name,
19205 struct vtable *tbl, ID id)
19206{
19207#ifndef RIPPER
19208 if (p->debug) {
19209 rb_parser_printf(p, "vtable_add:%d: %s(%p), %s\n",
19210 line, name, (void *)tbl, rb_id2name(id));
19211 }
19212#endif
19213 if (DVARS_TERMINAL_P(tbl)) {
19214 rb_parser_fatal(p, "vtable_add: vtable is not allocated (%p)", (void *)tbl);
19215 return;
19216 }
19217 if (tbl->pos == tbl->capa) {
19218 tbl->capa = tbl->capa * 2;
19219 SIZED_REALLOC_N(tbl->tbl, ID, tbl->capa, tbl->pos);
19220 }
19221 tbl->tbl[tbl->pos++] = id;
19222}
19223#define vtable_add(tbl, id) vtable_add_gen(p, __LINE__, #tbl, tbl, id)
19224
19225static void
19226vtable_pop_gen(struct parser_params *p, int line, const char *name,
19227 struct vtable *tbl, int n)
19228{
19229 if (p->debug) {
19230 rb_parser_printf(p, "vtable_pop:%d: %s(%p), %d\n",
19231 line, name, (void *)tbl, n);
19232 }
19233 if (tbl->pos < n) {
19234 rb_parser_fatal(p, "vtable_pop: unreachable (%d < %d)", tbl->pos, n);
19235 return;
19236 }
19237 tbl->pos -= n;
19238}
19239#define vtable_pop(tbl, n) vtable_pop_gen(p, __LINE__, #tbl, tbl, n)
19240
19241static int
19242vtable_included(const struct vtable * tbl, ID id)
19243{
19244 int i;
19245
19246 if (!DVARS_TERMINAL_P(tbl)) {
19247 for (i = 0; i < tbl->pos; i++) {
19248 if (tbl->tbl[i] == id) {
19249 return i+1;
19250 }
19251 }
19252 }
19253 return 0;
19254}
19255
19256static void parser_prepare(struct parser_params *p);
19257
19258static int
19259e_option_supplied(struct parser_params *p)
19260{
19261 return strcmp(p->ruby_sourcefile, "-e") == 0;
19262}
19263
19264#ifndef RIPPER
19265static NODE *parser_append_options(struct parser_params *p, NODE *node);
19266
19267static VALUE
19268yycompile0(VALUE arg)
19269{
19270 int n;
19271 NODE *tree;
19272 struct parser_params *p = (struct parser_params *)arg;
19273 int cov = FALSE;
19274
19275 if (!compile_for_eval && !NIL_P(p->ruby_sourcefile_string) && !e_option_supplied(p)) {
19276 cov = TRUE;
19277 }
19278
19279 if (p->debug_lines) {
19280 p->ast->body.script_lines = p->debug_lines;
19281 }
19282
19283 parser_prepare(p);
19284#define RUBY_DTRACE_PARSE_HOOK(name) \
19285 if (RUBY_DTRACE_PARSE_##name##_ENABLED()) { \
19286 RUBY_DTRACE_PARSE_##name(p->ruby_sourcefile, p->ruby_sourceline); \
19287 }
19288 RUBY_DTRACE_PARSE_HOOK(BEGIN);
19289 n = yyparse(p);
19290 RUBY_DTRACE_PARSE_HOOK(END);
19291
19292 p->debug_lines = 0;
19293
19294 xfree(p->lex.strterm);
19295 p->lex.strterm = 0;
19296 p->lex.pcur = p->lex.pbeg = p->lex.pend = 0;
19297 if (n || p->error_p) {
19298 VALUE mesg = p->error_buffer;
19299 if (!mesg) {
19300 mesg = syntax_error_new();
19301 }
19302 if (!p->error_tolerant) {
19303 rb_set_errinfo(mesg);
19304 return FALSE;
19305 }
19306 }
19307 tree = p->eval_tree;
19308 if (!tree) {
19309 tree = NEW_NIL(&NULL_LOC);
19310 }
19311 else {
19312 rb_parser_ary_t *tokens = p->tokens;
19313 NODE *prelude;
19314 NODE *body = parser_append_options(p, RNODE_SCOPE(tree)->nd_body);
19315 prelude = block_append(p, p->eval_tree_begin, body);
19316 RNODE_SCOPE(tree)->nd_body = prelude;
19317 p->ast->body.frozen_string_literal = p->frozen_string_literal;
19318 p->ast->body.coverage_enabled = cov;
19319 if (p->keep_tokens) {
19320 p->ast->node_buffer->tokens = tokens;
19321 p->tokens = NULL;
19322 }
19323 }
19324 p->ast->body.root = tree;
19325 p->ast->body.line_count = p->line_count;
19326 return TRUE;
19327}
19328
19329static rb_ast_t *
19330yycompile(struct parser_params *p, VALUE fname, int line)
19331{
19332 rb_ast_t *ast;
19333 if (NIL_P(fname)) {
19334 p->ruby_sourcefile_string = Qnil;
19335 p->ruby_sourcefile = "(none)";
19336 }
19337 else {
19338 p->ruby_sourcefile_string = rb_str_to_interned_str(fname);
19339 p->ruby_sourcefile = StringValueCStr(fname);
19340 }
19341 p->ruby_sourceline = line - 1;
19342
19343 p->lvtbl = NULL;
19344
19345 p->ast = ast = rb_ast_new();
19346 compile_callback(yycompile0, (VALUE)p);
19347 p->ast = 0;
19348
19349 while (p->lvtbl) {
19350 local_pop(p);
19351 }
19352
19353 return ast;
19354}
19355#endif /* !RIPPER */
19356
19357static rb_encoding *
19358must_be_ascii_compatible(struct parser_params *p, rb_parser_string_t *s)
19359{
19360 rb_encoding *enc = rb_parser_str_get_encoding(s);
19361 if (!rb_enc_asciicompat(enc)) {
19362 rb_raise(rb_eArgError, "invalid source encoding");
19363 }
19364 return enc;
19365}
19366
19367static rb_parser_string_t *
19368lex_getline(struct parser_params *p)
19369{
19370 rb_parser_string_t *line = (*p->lex.gets)(p, p->lex.input, p->line_count);
19371 if (!line) return 0;
19372 p->line_count++;
19373 string_buffer_append(p, line);
19374 must_be_ascii_compatible(p, line);
19375 return line;
19376}
19377
19378#ifndef RIPPER
19379rb_ast_t*
19380rb_parser_compile(rb_parser_t *p, rb_parser_lex_gets_func *gets, VALUE fname, rb_parser_input_data input, int line)
19381{
19382 p->lex.gets = gets;
19383 p->lex.input = input;
19384 p->lex.pbeg = p->lex.pcur = p->lex.pend = 0;
19385
19386 return yycompile(p, fname, line);
19387}
19388#endif /* !RIPPER */
19389
19390#define STR_FUNC_ESCAPE 0x01
19391#define STR_FUNC_EXPAND 0x02
19392#define STR_FUNC_REGEXP 0x04
19393#define STR_FUNC_QWORDS 0x08
19394#define STR_FUNC_SYMBOL 0x10
19395#define STR_FUNC_INDENT 0x20
19396#define STR_FUNC_LABEL 0x40
19397#define STR_FUNC_LIST 0x4000
19398#define STR_FUNC_TERM 0x8000
19399
19400enum string_type {
19401 str_label = STR_FUNC_LABEL,
19402 str_squote = (0),
19403 str_dquote = (STR_FUNC_EXPAND),
19404 str_xquote = (STR_FUNC_EXPAND),
19405 str_regexp = (STR_FUNC_REGEXP|STR_FUNC_ESCAPE|STR_FUNC_EXPAND),
19406 str_sword = (STR_FUNC_QWORDS|STR_FUNC_LIST),
19407 str_dword = (STR_FUNC_QWORDS|STR_FUNC_EXPAND|STR_FUNC_LIST),
19408 str_ssym = (STR_FUNC_SYMBOL),
19409 str_dsym = (STR_FUNC_SYMBOL|STR_FUNC_EXPAND)
19410};
19411
19412static rb_parser_string_t *
19413parser_str_new(struct parser_params *p, const char *ptr, long len, rb_encoding *enc, int func, rb_encoding *enc0)
19414{
19415 rb_parser_string_t *pstr;
19416
19417 pstr = rb_parser_encoding_string_new(p, ptr, len, enc);
19418
19419 if (!(func & STR_FUNC_REGEXP)) {
19420 if (rb_parser_is_ascii_string(p, pstr)) {
19421 }
19422 else if (rb_is_usascii_enc((void *)enc0) && enc != rb_utf8_encoding()) {
19423 /* everything is valid in ASCII-8BIT */
19424 enc = rb_ascii8bit_encoding();
19425 PARSER_ENCODING_CODERANGE_SET(pstr, enc, RB_PARSER_ENC_CODERANGE_VALID);
19426 }
19427 }
19428
19429 return pstr;
19430}
19431
19432static int
19433strterm_is_heredoc(rb_strterm_t *strterm)
19434{
19435 return strterm->heredoc;
19436}
19437
19438static rb_strterm_t *
19439new_strterm(struct parser_params *p, int func, int term, int paren)
19440{
19441 rb_strterm_t *strterm = ZALLOC(rb_strterm_t);
19442 strterm->u.literal.func = func;
19443 strterm->u.literal.term = term;
19444 strterm->u.literal.paren = paren;
19445 return strterm;
19446}
19447
19448static rb_strterm_t *
19449new_heredoc(struct parser_params *p)
19450{
19451 rb_strterm_t *strterm = ZALLOC(rb_strterm_t);
19452 strterm->heredoc = true;
19453 return strterm;
19454}
19455
19456#define peek(p,c) peek_n(p, (c), 0)
19457#define peek_n(p,c,n) (!lex_eol_n_p(p, n) && (c) == (unsigned char)(p)->lex.pcur[n])
19458#define peekc(p) peekc_n(p, 0)
19459#define peekc_n(p,n) (lex_eol_n_p(p, n) ? -1 : (unsigned char)(p)->lex.pcur[n])
19460
19461#define add_delayed_token(p, tok, end) parser_add_delayed_token(p, tok, end, __LINE__)
19462static void
19463parser_add_delayed_token(struct parser_params *p, const char *tok, const char *end, int line)
19464{
19465 debug_token_line(p, "add_delayed_token", line);
19466
19467 if (tok < end) {
19468 if (has_delayed_token(p)) {
19469 bool next_line = parser_string_char_at_end(p, p->delayed.token, 0) == '\n';
19470 int end_line = (next_line ? 1 : 0) + p->delayed.end_line;
19471 int end_col = (next_line ? 0 : p->delayed.end_col);
19472 if (end_line != p->ruby_sourceline || end_col != tok - p->lex.pbeg) {
19473 dispatch_delayed_token(p, tSTRING_CONTENT);
19474 }
19475 }
19476 if (!has_delayed_token(p)) {
19477 p->delayed.token = rb_parser_string_new(p, 0, 0);
19478 rb_parser_enc_associate(p, p->delayed.token, p->enc);
19479 p->delayed.beg_line = p->ruby_sourceline;
19480 p->delayed.beg_col = rb_long2int(tok - p->lex.pbeg);
19481 }
19482 parser_str_cat(p->delayed.token, tok, end - tok);
19483 p->delayed.end_line = p->ruby_sourceline;
19484 p->delayed.end_col = rb_long2int(end - p->lex.pbeg);
19485 p->lex.ptok = end;
19486 }
19487}
19488
19489static void
19490set_lastline(struct parser_params *p, rb_parser_string_t *str)
19491{
19492 p->lex.pbeg = p->lex.pcur = PARSER_STRING_PTR(str);
19493 p->lex.pend = p->lex.pcur + PARSER_STRING_LEN(str);
19494 p->lex.lastline = str;
19495}
19496
19497static int
19498nextline(struct parser_params *p, int set_encoding)
19499{
19500 rb_parser_string_t *str = p->lex.nextline;
19501 p->lex.nextline = 0;
19502 if (!str) {
19503 if (p->eofp)
19504 return -1;
19505
19506 if (!lex_eol_ptr_p(p, p->lex.pbeg) && *(p->lex.pend-1) != '\n') {
19507 goto end_of_input;
19508 }
19509
19510 if (!p->lex.input || !(str = lex_getline(p))) {
19511 end_of_input:
19512 p->eofp = 1;
19513 lex_goto_eol(p);
19514 return -1;
19515 }
19516#ifndef RIPPER
19517 if (p->debug_lines) {
19518 if (set_encoding) rb_parser_enc_associate(p, str, p->enc);
19519 rb_parser_string_t *copy = rb_parser_string_deep_copy(p, str);
19520 rb_parser_ary_push_script_line(p, p->debug_lines, copy);
19521 }
19522#endif
19523 p->cr_seen = FALSE;
19524 }
19525 else if (str == AFTER_HEREDOC_WITHOUT_TERMINATOR) {
19526 /* after here-document without terminator */
19527 goto end_of_input;
19528 }
19529 add_delayed_token(p, p->lex.ptok, p->lex.pend);
19530 if (p->heredoc_end > 0) {
19531 p->ruby_sourceline = p->heredoc_end;
19532 p->heredoc_end = 0;
19533 }
19534 p->ruby_sourceline++;
19535 set_lastline(p, str);
19536 token_flush(p);
19537 return 0;
19538}
19539
19540static int
19541parser_cr(struct parser_params *p, int c)
19542{
19543 if (peek(p, '\n')) {
19544 p->lex.pcur++;
19545 c = '\n';
19546 }
19547 return c;
19548}
19549
19550static inline int
19551nextc0(struct parser_params *p, int set_encoding)
19552{
19553 int c;
19554
19555 if (UNLIKELY(lex_eol_p(p) || p->eofp || p->lex.nextline > AFTER_HEREDOC_WITHOUT_TERMINATOR)) {
19556 if (nextline(p, set_encoding)) return -1;
19557 }
19558 c = (unsigned char)*p->lex.pcur++;
19559 if (UNLIKELY(c == '\r')) {
19560 c = parser_cr(p, c);
19561 }
19562
19563 return c;
19564}
19565#define nextc(p) nextc0(p, TRUE)
19566
19567static void
19568pushback(struct parser_params *p, int c)
19569{
19570 if (c == -1) return;
19571 p->eofp = 0;
19572 p->lex.pcur--;
19573 if (p->lex.pcur > p->lex.pbeg && p->lex.pcur[0] == '\n' && p->lex.pcur[-1] == '\r') {
19574 p->lex.pcur--;
19575 }
19576}
19577
19578#define was_bol(p) ((p)->lex.pcur == (p)->lex.pbeg + 1)
19579
19580#define tokfix(p) ((p)->tokenbuf[(p)->tokidx]='\0')
19581#define tok(p) (p)->tokenbuf
19582#define toklen(p) (p)->tokidx
19583
19584static int
19585looking_at_eol_p(struct parser_params *p)
19586{
19587 const char *ptr = p->lex.pcur;
19588 while (!lex_eol_ptr_p(p, ptr)) {
19589 int c = (unsigned char)*ptr++;
19590 int eol = (c == '\n' || c == '#');
19591 if (eol || !ISSPACE(c)) {
19592 return eol;
19593 }
19594 }
19595 return TRUE;
19596}
19597
19598static char*
19599newtok(struct parser_params *p)
19600{
19601 p->tokidx = 0;
19602 if (!p->tokenbuf) {
19603 p->toksiz = 60;
19604 p->tokenbuf = ALLOC_N(char, 60);
19605 }
19606 if (p->toksiz > 4096) {
19607 p->toksiz = 60;
19608 REALLOC_N(p->tokenbuf, char, 60);
19609 }
19610 return p->tokenbuf;
19611}
19612
19613static char *
19614tokspace(struct parser_params *p, int n)
19615{
19616 p->tokidx += n;
19617
19618 if (p->tokidx >= p->toksiz) {
19619 do {p->toksiz *= 2;} while (p->toksiz < p->tokidx);
19620 REALLOC_N(p->tokenbuf, char, p->toksiz);
19621 }
19622 return &p->tokenbuf[p->tokidx-n];
19623}
19624
19625static void
19626tokadd(struct parser_params *p, int c)
19627{
19628 p->tokenbuf[p->tokidx++] = (char)c;
19629 if (p->tokidx >= p->toksiz) {
19630 p->toksiz *= 2;
19631 REALLOC_N(p->tokenbuf, char, p->toksiz);
19632 }
19633}
19634
19635static int
19636tok_hex(struct parser_params *p, size_t *numlen)
19637{
19638 int c;
19639
19640 c = (int)ruby_scan_hex(p->lex.pcur, 2, numlen);
19641 if (!*numlen) {
19642 flush_string_content(p, p->enc, rb_strlen_lit("\\x"));
19643 yyerror0("invalid hex escape");
19644 dispatch_scan_event(p, tSTRING_CONTENT);
19645 return 0;
19646 }
19647 p->lex.pcur += *numlen;
19648 return c;
19649}
19650
19651#define tokcopy(p, n) memcpy(tokspace(p, n), (p)->lex.pcur - (n), (n))
19652
19653static int
19654escaped_control_code(int c)
19655{
19656 int c2 = 0;
19657 switch (c) {
19658 case ' ':
19659 c2 = 's';
19660 break;
19661 case '\n':
19662 c2 = 'n';
19663 break;
19664 case '\t':
19665 c2 = 't';
19666 break;
19667 case '\v':
19668 c2 = 'v';
19669 break;
19670 case '\r':
19671 c2 = 'r';
19672 break;
19673 case '\f':
19674 c2 = 'f';
19675 break;
19676 }
19677 return c2;
19678}
19679
19680#define WARN_SPACE_CHAR(c, prefix) \
19681 rb_warn1("invalid character syntax; use "prefix"\\%c", WARN_I(c))
19682
19683static int
19684tokadd_codepoint(struct parser_params *p, rb_encoding **encp,
19685 int regexp_literal, const char *begin)
19686{
19687 const int wide = !begin;
19688 size_t numlen;
19689 int codepoint = (int)ruby_scan_hex(p->lex.pcur, wide ? p->lex.pend - p->lex.pcur : 4, &numlen);
19690
19691 p->lex.pcur += numlen;
19692 if (p->lex.strterm == NULL ||
19693 strterm_is_heredoc(p->lex.strterm) ||
19694 (p->lex.strterm->u.literal.func != str_regexp)) {
19695 if (!begin) begin = p->lex.pcur;
19696 if (wide ? (numlen == 0 || numlen > 6) : (numlen < 4)) {
19697 flush_string_content(p, rb_utf8_encoding(), p->lex.pcur - begin);
19698 yyerror0("invalid Unicode escape");
19699 dispatch_scan_event(p, tSTRING_CONTENT);
19700 return wide && numlen > 0;
19701 }
19702 if (codepoint > 0x10ffff) {
19703 flush_string_content(p, rb_utf8_encoding(), p->lex.pcur - begin);
19704 yyerror0("invalid Unicode codepoint (too large)");
19705 dispatch_scan_event(p, tSTRING_CONTENT);
19706 return wide;
19707 }
19708 if ((codepoint & 0xfffff800) == 0xd800) {
19709 flush_string_content(p, rb_utf8_encoding(), p->lex.pcur - begin);
19710 yyerror0("invalid Unicode codepoint");
19711 dispatch_scan_event(p, tSTRING_CONTENT);
19712 return wide;
19713 }
19714 }
19715 if (regexp_literal) {
19716 tokcopy(p, (int)numlen);
19717 }
19718 else if (codepoint >= 0x80) {
19719 rb_encoding *utf8 = rb_utf8_encoding();
19720 if (*encp && utf8 != *encp) {
19721 YYLTYPE loc = RUBY_INIT_YYLLOC();
19722 compile_error(p, "UTF-8 mixed within %s source", rb_enc_name(*encp));
19723 parser_show_error_line(p, &loc);
19724 return wide;
19725 }
19726 *encp = utf8;
19727 tokaddmbc(p, codepoint, *encp);
19728 }
19729 else {
19730 tokadd(p, codepoint);
19731 }
19732 return TRUE;
19733}
19734
19735static int tokadd_mbchar(struct parser_params *p, int c);
19736
19737static int
19738tokskip_mbchar(struct parser_params *p)
19739{
19740 int len = parser_precise_mbclen(p, p->lex.pcur-1);
19741 if (len > 0) {
19742 p->lex.pcur += len - 1;
19743 }
19744 return len;
19745}
19746
19747/* return value is for ?\u3042 */
19748static void
19749tokadd_utf8(struct parser_params *p, rb_encoding **encp,
19750 int term, int symbol_literal, int regexp_literal)
19751{
19752 /*
19753 * If `term` is not -1, then we allow multiple codepoints in \u{}
19754 * upto `term` byte, otherwise we're parsing a character literal.
19755 * And then add the codepoints to the current token.
19756 */
19757 static const char multiple_codepoints[] = "Multiple codepoints at single character literal";
19758
19759 const int open_brace = '{', close_brace = '}';
19760
19761 if (regexp_literal) { tokadd(p, '\\'); tokadd(p, 'u'); }
19762
19763 if (peek(p, open_brace)) { /* handle \u{...} form */
19764 if (regexp_literal && p->lex.strterm->u.literal.func == str_regexp) {
19765 /*
19766 * Skip parsing validation code and copy bytes as-is until term or
19767 * closing brace, in order to correctly handle extended regexps where
19768 * invalid unicode escapes are allowed in comments. The regexp parser
19769 * does its own validation and will catch any issues.
19770 */
19771 tokadd(p, open_brace);
19772 while (!lex_eol_ptr_p(p, ++p->lex.pcur)) {
19773 int c = peekc(p);
19774 if (c == close_brace) {
19775 tokadd(p, c);
19776 ++p->lex.pcur;
19777 break;
19778 }
19779 else if (c == term) {
19780 break;
19781 }
19782 if (c == '\\' && !lex_eol_n_p(p, 1)) {
19783 tokadd(p, c);
19784 c = *++p->lex.pcur;
19785 }
19786 tokadd_mbchar(p, c);
19787 }
19788 }
19789 else {
19790 const char *second = NULL;
19791 int c, last = nextc(p);
19792 if (lex_eol_p(p)) goto unterminated;
19793 while (ISSPACE(c = peekc(p)) && !lex_eol_ptr_p(p, ++p->lex.pcur));
19794 while (c != close_brace) {
19795 if (c == term) goto unterminated;
19796 if (second == multiple_codepoints)
19797 second = p->lex.pcur;
19798 if (regexp_literal) tokadd(p, last);
19799 if (!tokadd_codepoint(p, encp, regexp_literal, NULL)) {
19800 break;
19801 }
19802 while (ISSPACE(c = peekc(p))) {
19803 if (lex_eol_ptr_p(p, ++p->lex.pcur)) goto unterminated;
19804 last = c;
19805 }
19806 if (term == -1 && !second)
19807 second = multiple_codepoints;
19808 }
19809
19810 if (c != close_brace) {
19811 unterminated:
19812 flush_string_content(p, rb_utf8_encoding(), 0);
19813 yyerror0("unterminated Unicode escape");
19814 dispatch_scan_event(p, tSTRING_CONTENT);
19815 return;
19816 }
19817 if (second && second != multiple_codepoints) {
19818 const char *pcur = p->lex.pcur;
19819 p->lex.pcur = second;
19820 dispatch_scan_event(p, tSTRING_CONTENT);
19821 token_flush(p);
19822 p->lex.pcur = pcur;
19823 yyerror0(multiple_codepoints);
19824 token_flush(p);
19825 }
19826
19827 if (regexp_literal) tokadd(p, close_brace);
19828 nextc(p);
19829 }
19830 }
19831 else { /* handle \uxxxx form */
19832 if (!tokadd_codepoint(p, encp, regexp_literal, p->lex.pcur - rb_strlen_lit("\\u"))) {
19833 token_flush(p);
19834 return;
19835 }
19836 }
19837}
19838
19839#define ESCAPE_CONTROL 1
19840#define ESCAPE_META 2
19841
19842static int
19843read_escape(struct parser_params *p, int flags, const char *begin)
19844{
19845 int c;
19846 size_t numlen;
19847
19848 switch (c = nextc(p)) {
19849 case '\\': /* Backslash */
19850 return c;
19851
19852 case 'n': /* newline */
19853 return '\n';
19854
19855 case 't': /* horizontal tab */
19856 return '\t';
19857
19858 case 'r': /* carriage-return */
19859 return '\r';
19860
19861 case 'f': /* form-feed */
19862 return '\f';
19863
19864 case 'v': /* vertical tab */
19865 return '\13';
19866
19867 case 'a': /* alarm(bell) */
19868 return '\007';
19869
19870 case 'e': /* escape */
19871 return 033;
19872
19873 case '0': case '1': case '2': case '3': /* octal constant */
19874 case '4': case '5': case '6': case '7':
19875 pushback(p, c);
19876 c = (int)ruby_scan_oct(p->lex.pcur, 3, &numlen);
19877 p->lex.pcur += numlen;
19878 return c;
19879
19880 case 'x': /* hex constant */
19881 c = tok_hex(p, &numlen);
19882 if (numlen == 0) return 0;
19883 return c;
19884
19885 case 'b': /* backspace */
19886 return '\010';
19887
19888 case 's': /* space */
19889 return ' ';
19890
19891 case 'M':
19892 if (flags & ESCAPE_META) goto eof;
19893 if ((c = nextc(p)) != '-') {
19894 goto eof;
19895 }
19896 if ((c = nextc(p)) == '\\') {
19897 switch (peekc(p)) {
19898 case 'u': case 'U':
19899 nextc(p);
19900 goto eof;
19901 }
19902 return read_escape(p, flags|ESCAPE_META, begin) | 0x80;
19903 }
19904 else if (c == -1) goto eof;
19905 else if (!ISASCII(c)) {
19906 tokskip_mbchar(p);
19907 goto eof;
19908 }
19909 else {
19910 int c2 = escaped_control_code(c);
19911 if (c2) {
19912 if (ISCNTRL(c) || !(flags & ESCAPE_CONTROL)) {
19913 WARN_SPACE_CHAR(c2, "\\M-");
19914 }
19915 else {
19916 WARN_SPACE_CHAR(c2, "\\C-\\M-");
19917 }
19918 }
19919 else if (ISCNTRL(c)) goto eof;
19920 return ((c & 0xff) | 0x80);
19921 }
19922
19923 case 'C':
19924 if ((c = nextc(p)) != '-') {
19925 goto eof;
19926 }
19927 case 'c':
19928 if (flags & ESCAPE_CONTROL) goto eof;
19929 if ((c = nextc(p))== '\\') {
19930 switch (peekc(p)) {
19931 case 'u': case 'U':
19932 nextc(p);
19933 goto eof;
19934 }
19935 c = read_escape(p, flags|ESCAPE_CONTROL, begin);
19936 }
19937 else if (c == '?')
19938 return 0177;
19939 else if (c == -1) goto eof;
19940 else if (!ISASCII(c)) {
19941 tokskip_mbchar(p);
19942 goto eof;
19943 }
19944 else {
19945 int c2 = escaped_control_code(c);
19946 if (c2) {
19947 if (ISCNTRL(c)) {
19948 if (flags & ESCAPE_META) {
19949 WARN_SPACE_CHAR(c2, "\\M-");
19950 }
19951 else {
19952 WARN_SPACE_CHAR(c2, "");
19953 }
19954 }
19955 else {
19956 if (flags & ESCAPE_META) {
19957 WARN_SPACE_CHAR(c2, "\\M-\\C-");
19958 }
19959 else {
19960 WARN_SPACE_CHAR(c2, "\\C-");
19961 }
19962 }
19963 }
19964 else if (ISCNTRL(c)) goto eof;
19965 }
19966 return c & 0x9f;
19967
19968 eof:
19969 case -1:
19970 flush_string_content(p, p->enc, p->lex.pcur - begin);
19971 yyerror0("Invalid escape character syntax");
19972 dispatch_scan_event(p, tSTRING_CONTENT);
19973 return '\0';
19974
19975 default:
19976 if (!ISASCII(c)) {
19977 tokskip_mbchar(p);
19978 goto eof;
19979 }
19980 return c;
19981 }
19982}
19983
19984static void
19985tokaddmbc(struct parser_params *p, int c, rb_encoding *enc)
19986{
19987 int len = rb_enc_codelen(c, enc);
19988 rb_enc_mbcput(c, tokspace(p, len), enc);
19989}
19990
19991static int
19992tokadd_escape(struct parser_params *p)
19993{
19994 int c;
19995 size_t numlen;
19996 const char *begin = p->lex.pcur;
19997
19998 switch (c = nextc(p)) {
19999 case '\n':
20000 return 0; /* just ignore */
20001
20002 case '0': case '1': case '2': case '3': /* octal constant */
20003 case '4': case '5': case '6': case '7':
20004 {
20005 ruby_scan_oct(--p->lex.pcur, 3, &numlen);
20006 if (numlen == 0) goto eof;
20007 p->lex.pcur += numlen;
20008 tokcopy(p, (int)numlen + 1);
20009 }
20010 return 0;
20011
20012 case 'x': /* hex constant */
20013 {
20014 tok_hex(p, &numlen);
20015 if (numlen == 0) return -1;
20016 tokcopy(p, (int)numlen + 2);
20017 }
20018 return 0;
20019
20020 eof:
20021 case -1:
20022 flush_string_content(p, p->enc, p->lex.pcur - begin);
20023 yyerror0("Invalid escape character syntax");
20024 token_flush(p);
20025 return -1;
20026
20027 default:
20028 tokadd(p, '\\');
20029 tokadd(p, c);
20030 }
20031 return 0;
20032}
20033
20034static int
20035char_to_option(int c)
20036{
20037 int val;
20038
20039 switch (c) {
20040 case 'i':
20041 val = RE_ONIG_OPTION_IGNORECASE;
20042 break;
20043 case 'x':
20044 val = RE_ONIG_OPTION_EXTEND;
20045 break;
20046 case 'm':
20047 val = RE_ONIG_OPTION_MULTILINE;
20048 break;
20049 default:
20050 val = 0;
20051 break;
20052 }
20053 return val;
20054}
20055
20056#define ARG_ENCODING_FIXED 16
20057#define ARG_ENCODING_NONE 32
20058#define ENC_ASCII8BIT 1
20059#define ENC_EUC_JP 2
20060#define ENC_Windows_31J 3
20061#define ENC_UTF8 4
20062
20063static int
20064char_to_option_kcode(int c, int *option, int *kcode)
20065{
20066 *option = 0;
20067
20068 switch (c) {
20069 case 'n':
20070 *kcode = ENC_ASCII8BIT;
20071 return (*option = ARG_ENCODING_NONE);
20072 case 'e':
20073 *kcode = ENC_EUC_JP;
20074 break;
20075 case 's':
20076 *kcode = ENC_Windows_31J;
20077 break;
20078 case 'u':
20079 *kcode = ENC_UTF8;
20080 break;
20081 default:
20082 *kcode = -1;
20083 return (*option = char_to_option(c));
20084 }
20085 *option = ARG_ENCODING_FIXED;
20086 return 1;
20087}
20088
20089static int
20090regx_options(struct parser_params *p)
20091{
20092 int kcode = 0;
20093 int kopt = 0;
20094 int options = 0;
20095 int c, opt, kc;
20096
20097 newtok(p);
20098 while (c = nextc(p), ISALPHA(c)) {
20099 if (c == 'o') {
20100 options |= RE_OPTION_ONCE;
20101 }
20102 else if (char_to_option_kcode(c, &opt, &kc)) {
20103 if (kc >= 0) {
20104 if (kc != ENC_ASCII8BIT) kcode = c;
20105 kopt = opt;
20106 }
20107 else {
20108 options |= opt;
20109 }
20110 }
20111 else {
20112 tokadd(p, c);
20113 }
20114 }
20115 options |= kopt;
20116 pushback(p, c);
20117 if (toklen(p)) {
20118 YYLTYPE loc = RUBY_INIT_YYLLOC();
20119 tokfix(p);
20120 compile_error(p, "unknown regexp option%s - %*s",
20121 toklen(p) > 1 ? "s" : "", toklen(p), tok(p));
20122 parser_show_error_line(p, &loc);
20123 }
20124 return options | RE_OPTION_ENCODING(kcode);
20125}
20126
20127static int
20128tokadd_mbchar(struct parser_params *p, int c)
20129{
20130 int len = parser_precise_mbclen(p, p->lex.pcur-1);
20131 if (len < 0) return -1;
20132 tokadd(p, c);
20133 p->lex.pcur += --len;
20134 if (len > 0) tokcopy(p, len);
20135 return c;
20136}
20137
20138static inline int
20139simple_re_meta(int c)
20140{
20141 switch (c) {
20142 case '$': case '*': case '+': case '.':
20143 case '?': case '^': case '|':
20144 case ')': case ']': case '}': case '>':
20145 return TRUE;
20146 default:
20147 return FALSE;
20148 }
20149}
20150
20151static int
20152parser_update_heredoc_indent(struct parser_params *p, int c)
20153{
20154 if (p->heredoc_line_indent == -1) {
20155 if (c == '\n') p->heredoc_line_indent = 0;
20156 }
20157 else {
20158 if (c == ' ') {
20159 p->heredoc_line_indent++;
20160 return TRUE;
20161 }
20162 else if (c == '\t') {
20163 int w = (p->heredoc_line_indent / TAB_WIDTH) + 1;
20164 p->heredoc_line_indent = w * TAB_WIDTH;
20165 return TRUE;
20166 }
20167 else if (c != '\n') {
20168 if (p->heredoc_indent > p->heredoc_line_indent) {
20169 p->heredoc_indent = p->heredoc_line_indent;
20170 }
20171 p->heredoc_line_indent = -1;
20172 }
20173 else {
20174 /* Whitespace only line has no indentation */
20175 p->heredoc_line_indent = 0;
20176 }
20177 }
20178 return FALSE;
20179}
20180
20181static void
20182parser_mixed_error(struct parser_params *p, rb_encoding *enc1, rb_encoding *enc2)
20183{
20184 YYLTYPE loc = RUBY_INIT_YYLLOC();
20185 const char *n1 = rb_enc_name(enc1), *n2 = rb_enc_name(enc2);
20186 compile_error(p, "%s mixed within %s source", n1, n2);
20187 parser_show_error_line(p, &loc);
20188}
20189
20190static void
20191parser_mixed_escape(struct parser_params *p, const char *beg, rb_encoding *enc1, rb_encoding *enc2)
20192{
20193 const char *pos = p->lex.pcur;
20194 p->lex.pcur = beg;
20195 parser_mixed_error(p, enc1, enc2);
20196 p->lex.pcur = pos;
20197}
20198
20199static inline char
20200nibble_char_upper(unsigned int c)
20201{
20202 c &= 0xf;
20203 return c + (c < 10 ? '0' : 'A' - 10);
20204}
20205
20206static int
20207tokadd_string(struct parser_params *p,
20208 int func, int term, int paren, long *nest,
20209 rb_encoding **encp, rb_encoding **enc)
20210{
20211 int c;
20212 bool erred = false;
20213#ifdef RIPPER
20214 const int heredoc_end = (p->heredoc_end ? p->heredoc_end + 1 : 0);
20215 int top_of_line = FALSE;
20216#endif
20217
20218#define mixed_error(enc1, enc2) \
20219 (void)(erred || (parser_mixed_error(p, enc1, enc2), erred = true))
20220#define mixed_escape(beg, enc1, enc2) \
20221 (void)(erred || (parser_mixed_escape(p, beg, enc1, enc2), erred = true))
20222
20223 while ((c = nextc(p)) != -1) {
20224 if (p->heredoc_indent > 0) {
20225 parser_update_heredoc_indent(p, c);
20226 }
20227#ifdef RIPPER
20228 if (top_of_line && heredoc_end == p->ruby_sourceline) {
20229 pushback(p, c);
20230 break;
20231 }
20232#endif
20233
20234 if (paren && c == paren) {
20235 ++*nest;
20236 }
20237 else if (c == term) {
20238 if (!nest || !*nest) {
20239 pushback(p, c);
20240 break;
20241 }
20242 --*nest;
20243 }
20244 else if ((func & STR_FUNC_EXPAND) && c == '#' && !lex_eol_p(p)) {
20245 unsigned char c2 = *p->lex.pcur;
20246 if (c2 == '$' || c2 == '@' || c2 == '{') {
20247 pushback(p, c);
20248 break;
20249 }
20250 }
20251 else if (c == '\\') {
20252 c = nextc(p);
20253 switch (c) {
20254 case '\n':
20255 if (func & STR_FUNC_QWORDS) break;
20256 if (func & STR_FUNC_EXPAND) {
20257 if (!(func & STR_FUNC_INDENT) || (p->heredoc_indent < 0))
20258 continue;
20259 if (c == term) {
20260 c = '\\';
20261 goto terminate;
20262 }
20263 }
20264 tokadd(p, '\\');
20265 break;
20266
20267 case '\\':
20268 if (func & STR_FUNC_ESCAPE) tokadd(p, c);
20269 break;
20270
20271 case 'u':
20272 if ((func & STR_FUNC_EXPAND) == 0) {
20273 tokadd(p, '\\');
20274 break;
20275 }
20276 tokadd_utf8(p, enc, term,
20277 func & STR_FUNC_SYMBOL,
20278 func & STR_FUNC_REGEXP);
20279 continue;
20280
20281 default:
20282 if (c == -1) return -1;
20283 if (!ISASCII(c)) {
20284 if ((func & STR_FUNC_EXPAND) == 0) tokadd(p, '\\');
20285 goto non_ascii;
20286 }
20287 if (func & STR_FUNC_REGEXP) {
20288 switch (c) {
20289 case 'c':
20290 case 'C':
20291 case 'M': {
20292 pushback(p, c);
20293 c = read_escape(p, 0, p->lex.pcur - 1);
20294
20295 char *t = tokspace(p, rb_strlen_lit("\\x00"));
20296 *t++ = '\\';
20297 *t++ = 'x';
20298 *t++ = nibble_char_upper(c >> 4);
20299 *t++ = nibble_char_upper(c);
20300 continue;
20301 }
20302 }
20303
20304 if (c == term && !simple_re_meta(c)) {
20305 tokadd(p, c);
20306 continue;
20307 }
20308 pushback(p, c);
20309 if ((c = tokadd_escape(p)) < 0)
20310 return -1;
20311 if (*enc && *enc != *encp) {
20312 mixed_escape(p->lex.ptok+2, *enc, *encp);
20313 }
20314 continue;
20315 }
20316 else if (func & STR_FUNC_EXPAND) {
20317 pushback(p, c);
20318 if (func & STR_FUNC_ESCAPE) tokadd(p, '\\');
20319 c = read_escape(p, 0, p->lex.pcur - 1);
20320 }
20321 else if ((func & STR_FUNC_QWORDS) && ISSPACE(c)) {
20322 /* ignore backslashed spaces in %w */
20323 }
20324 else if (c != term && !(paren && c == paren)) {
20325 tokadd(p, '\\');
20326 pushback(p, c);
20327 continue;
20328 }
20329 }
20330 }
20331 else if (!parser_isascii(p)) {
20332 non_ascii:
20333 if (!*enc) {
20334 *enc = *encp;
20335 }
20336 else if (*enc != *encp) {
20337 mixed_error(*enc, *encp);
20338 continue;
20339 }
20340 if (tokadd_mbchar(p, c) == -1) return -1;
20341 continue;
20342 }
20343 else if ((func & STR_FUNC_QWORDS) && ISSPACE(c)) {
20344 pushback(p, c);
20345 break;
20346 }
20347 if (c & 0x80) {
20348 if (!*enc) {
20349 *enc = *encp;
20350 }
20351 else if (*enc != *encp) {
20352 mixed_error(*enc, *encp);
20353 continue;
20354 }
20355 }
20356 tokadd(p, c);
20357#ifdef RIPPER
20358 top_of_line = (c == '\n');
20359#endif
20360 }
20361 terminate:
20362 if (*enc) *encp = *enc;
20363 return c;
20364}
20365
20366#define NEW_STRTERM(func, term, paren) new_strterm(p, func, term, paren)
20367
20368static void
20369flush_string_content(struct parser_params *p, rb_encoding *enc, size_t back)
20370{
20371 p->lex.pcur -= back;
20372 if (has_delayed_token(p)) {
20373 ptrdiff_t len = p->lex.pcur - p->lex.ptok;
20374 if (len > 0) {
20375 rb_parser_enc_str_buf_cat(p, p->delayed.token, p->lex.ptok, len, enc);
20376 p->delayed.end_line = p->ruby_sourceline;
20377 p->delayed.end_col = rb_long2int(p->lex.pcur - p->lex.pbeg);
20378 }
20379 dispatch_delayed_token(p, tSTRING_CONTENT);
20380 p->lex.ptok = p->lex.pcur;
20381 }
20382 dispatch_scan_event(p, tSTRING_CONTENT);
20383 p->lex.pcur += back;
20384}
20385
20386/* this can be shared with ripper, since it's independent from struct
20387 * parser_params. */
20388#ifndef RIPPER
20389#define BIT(c, idx) (((c) / 32 - 1 == idx) ? (1U << ((c) % 32)) : 0)
20390#define SPECIAL_PUNCT(idx) ( \
20391 BIT('~', idx) | BIT('*', idx) | BIT('$', idx) | BIT('?', idx) | \
20392 BIT('!', idx) | BIT('@', idx) | BIT('/', idx) | BIT('\\', idx) | \
20393 BIT(';', idx) | BIT(',', idx) | BIT('.', idx) | BIT('=', idx) | \
20394 BIT(':', idx) | BIT('<', idx) | BIT('>', idx) | BIT('\"', idx) | \
20395 BIT('&', idx) | BIT('`', idx) | BIT('\'', idx) | BIT('+', idx) | \
20396 BIT('0', idx))
20397const uint_least32_t ruby_global_name_punct_bits[] = {
20398 SPECIAL_PUNCT(0),
20399 SPECIAL_PUNCT(1),
20400 SPECIAL_PUNCT(2),
20401};
20402#undef BIT
20403#undef SPECIAL_PUNCT
20404#endif
20405
20406static enum yytokentype
20407parser_peek_variable_name(struct parser_params *p)
20408{
20409 int c;
20410 const char *ptr = p->lex.pcur;
20411
20412 if (lex_eol_ptr_n_p(p, ptr, 1)) return 0;
20413 c = *ptr++;
20414 switch (c) {
20415 case '$':
20416 if ((c = *ptr) == '-') {
20417 if (lex_eol_ptr_p(p, ++ptr)) return 0;
20418 c = *ptr;
20419 }
20420 else if (is_global_name_punct(c) || ISDIGIT(c)) {
20421 return tSTRING_DVAR;
20422 }
20423 break;
20424 case '@':
20425 if ((c = *ptr) == '@') {
20426 if (lex_eol_ptr_p(p, ++ptr)) return 0;
20427 c = *ptr;
20428 }
20429 break;
20430 case '{':
20431 p->lex.pcur = ptr;
20432 p->command_start = TRUE;
20433 yylval.state = p->lex.state;
20434 return tSTRING_DBEG;
20435 default:
20436 return 0;
20437 }
20438 if (!ISASCII(c) || c == '_' || ISALPHA(c))
20439 return tSTRING_DVAR;
20440 return 0;
20441}
20442
20443#define IS_ARG() IS_lex_state(EXPR_ARG_ANY)
20444#define IS_END() IS_lex_state(EXPR_END_ANY)
20445#define IS_BEG() (IS_lex_state(EXPR_BEG_ANY) || IS_lex_state_all(EXPR_ARG|EXPR_LABELED))
20446#define IS_SPCARG(c) (IS_ARG() && space_seen && !ISSPACE(c))
20447#define IS_LABEL_POSSIBLE() (\
20448 (IS_lex_state(EXPR_LABEL|EXPR_ENDFN) && !cmd_state) || \
20449 IS_ARG())
20450#define IS_LABEL_SUFFIX(n) (peek_n(p, ':',(n)) && !peek_n(p, ':', (n)+1))
20451#define IS_AFTER_OPERATOR() IS_lex_state(EXPR_FNAME | EXPR_DOT)
20452
20453static inline enum yytokentype
20454parser_string_term(struct parser_params *p, int func)
20455{
20456 xfree(p->lex.strterm);
20457 p->lex.strterm = 0;
20458 if (func & STR_FUNC_REGEXP) {
20459 set_yylval_num(regx_options(p));
20460 dispatch_scan_event(p, tREGEXP_END);
20461 SET_LEX_STATE(EXPR_END);
20462 return tREGEXP_END;
20463 }
20464 if ((func & STR_FUNC_LABEL) && IS_LABEL_SUFFIX(0)) {
20465 nextc(p);
20466 SET_LEX_STATE(EXPR_ARG|EXPR_LABELED);
20467 return tLABEL_END;
20468 }
20469 SET_LEX_STATE(EXPR_END);
20470 return tSTRING_END;
20471}
20472
20473static enum yytokentype
20474parse_string(struct parser_params *p, rb_strterm_literal_t *quote)
20475{
20476 int func = quote->func;
20477 int term = quote->term;
20478 int paren = quote->paren;
20479 int c, space = 0;
20480 rb_encoding *enc = p->enc;
20481 rb_encoding *base_enc = 0;
20482 rb_parser_string_t *lit;
20483
20484 if (func & STR_FUNC_TERM) {
20485 if (func & STR_FUNC_QWORDS) nextc(p); /* delayed term */
20486 SET_LEX_STATE(EXPR_END);
20487 xfree(p->lex.strterm);
20488 p->lex.strterm = 0;
20489 return func & STR_FUNC_REGEXP ? tREGEXP_END : tSTRING_END;
20490 }
20491 c = nextc(p);
20492 if ((func & STR_FUNC_QWORDS) && ISSPACE(c)) {
20493 while (c != '\n' && ISSPACE(c = nextc(p)));
20494 space = 1;
20495 }
20496 if (func & STR_FUNC_LIST) {
20497 quote->func &= ~STR_FUNC_LIST;
20498 space = 1;
20499 }
20500 if (c == term && !quote->nest) {
20501 if (func & STR_FUNC_QWORDS) {
20502 quote->func |= STR_FUNC_TERM;
20503 pushback(p, c); /* dispatch the term at tSTRING_END */
20504 add_delayed_token(p, p->lex.ptok, p->lex.pcur);
20505 return ' ';
20506 }
20507 return parser_string_term(p, func);
20508 }
20509 if (space) {
20510 if (!ISSPACE(c)) pushback(p, c);
20511 add_delayed_token(p, p->lex.ptok, p->lex.pcur);
20512 return ' ';
20513 }
20514 newtok(p);
20515 if ((func & STR_FUNC_EXPAND) && c == '#') {
20516 enum yytokentype t = parser_peek_variable_name(p);
20517 if (t) return t;
20518 tokadd(p, '#');
20519 c = nextc(p);
20520 }
20521 pushback(p, c);
20522 if (tokadd_string(p, func, term, paren, &quote->nest,
20523 &enc, &base_enc) == -1) {
20524 if (p->eofp) {
20525#ifndef RIPPER
20526# define unterminated_literal(mesg) yyerror0(mesg)
20527#else
20528# define unterminated_literal(mesg) compile_error(p, mesg)
20529#endif
20530 literal_flush(p, p->lex.pcur);
20531 if (func & STR_FUNC_QWORDS) {
20532 /* no content to add, bailing out here */
20533 unterminated_literal("unterminated list meets end of file");
20534 xfree(p->lex.strterm);
20535 p->lex.strterm = 0;
20536 return tSTRING_END;
20537 }
20538 if (func & STR_FUNC_REGEXP) {
20539 unterminated_literal("unterminated regexp meets end of file");
20540 }
20541 else {
20542 unterminated_literal("unterminated string meets end of file");
20543 }
20544 quote->func |= STR_FUNC_TERM;
20545 }
20546 }
20547
20548 tokfix(p);
20549 lit = STR_NEW3(tok(p), toklen(p), enc, func);
20550 set_yylval_str(lit);
20551 flush_string_content(p, enc, 0);
20552
20553 return tSTRING_CONTENT;
20554}
20555
20556static enum yytokentype
20557heredoc_identifier(struct parser_params *p)
20558{
20559 /*
20560 * term_len is length of `<<"END"` except `END`,
20561 * in this case term_len is 4 (<, <, " and ").
20562 */
20563 long len, offset = p->lex.pcur - p->lex.pbeg;
20564 int c = nextc(p), term, func = 0, quote = 0;
20565 enum yytokentype token = tSTRING_BEG;
20566 int indent = 0;
20567
20568 if (c == '-') {
20569 c = nextc(p);
20570 func = STR_FUNC_INDENT;
20571 offset++;
20572 }
20573 else if (c == '~') {
20574 c = nextc(p);
20575 func = STR_FUNC_INDENT;
20576 offset++;
20577 indent = INT_MAX;
20578 }
20579 switch (c) {
20580 case '\'':
20581 func |= str_squote; goto quoted;
20582 case '"':
20583 func |= str_dquote; goto quoted;
20584 case '`':
20585 token = tXSTRING_BEG;
20586 func |= str_xquote; goto quoted;
20587
20588 quoted:
20589 quote++;
20590 offset++;
20591 term = c;
20592 len = 0;
20593 while ((c = nextc(p)) != term) {
20594 if (c == -1 || c == '\r' || c == '\n') {
20595 yyerror0("unterminated here document identifier");
20596 return -1;
20597 }
20598 }
20599 break;
20600
20601 default:
20602 if (!parser_is_identchar(p)) {
20603 pushback(p, c);
20604 if (func & STR_FUNC_INDENT) {
20605 pushback(p, indent > 0 ? '~' : '-');
20606 }
20607 return 0;
20608 }
20609 func |= str_dquote;
20610 do {
20611 int n = parser_precise_mbclen(p, p->lex.pcur-1);
20612 if (n < 0) return 0;
20613 p->lex.pcur += --n;
20614 } while ((c = nextc(p)) != -1 && parser_is_identchar(p));
20615 pushback(p, c);
20616 break;
20617 }
20618
20619 len = p->lex.pcur - (p->lex.pbeg + offset) - quote;
20620 if ((unsigned long)len >= HERETERM_LENGTH_MAX)
20621 yyerror0("too long here document identifier");
20622 dispatch_scan_event(p, tHEREDOC_BEG);
20623 lex_goto_eol(p);
20624
20625 p->lex.strterm = new_heredoc(p);
20626 rb_strterm_heredoc_t *here = &p->lex.strterm->u.heredoc;
20627 here->offset = offset;
20628 here->sourceline = p->ruby_sourceline;
20629 here->length = (unsigned)len;
20630 here->quote = quote;
20631 here->func = func;
20632 here->lastline = p->lex.lastline;
20633
20634 token_flush(p);
20635 p->heredoc_indent = indent;
20636 p->heredoc_line_indent = 0;
20637 return token;
20638}
20639
20640static void
20641heredoc_restore(struct parser_params *p, rb_strterm_heredoc_t *here)
20642{
20643 rb_parser_string_t *line;
20644 rb_strterm_t *term = p->lex.strterm;
20645
20646 p->lex.strterm = 0;
20647 line = here->lastline;
20648 p->lex.lastline = line;
20649 p->lex.pbeg = PARSER_STRING_PTR(line);
20650 p->lex.pend = p->lex.pbeg + PARSER_STRING_LEN(line);
20651 p->lex.pcur = p->lex.pbeg + here->offset + here->length + here->quote;
20652 p->lex.ptok = p->lex.pbeg + here->offset - here->quote;
20653 p->heredoc_end = p->ruby_sourceline;
20654 p->ruby_sourceline = (int)here->sourceline;
20655 if (p->eofp) p->lex.nextline = AFTER_HEREDOC_WITHOUT_TERMINATOR;
20656 p->eofp = 0;
20657 xfree(term);
20658}
20659
20660static int
20661dedent_string_column(const char *str, long len, int width)
20662{
20663 int i, col = 0;
20664
20665 for (i = 0; i < len && col < width; i++) {
20666 if (str[i] == ' ') {
20667 col++;
20668 }
20669 else if (str[i] == '\t') {
20670 int n = TAB_WIDTH * (col / TAB_WIDTH + 1);
20671 if (n > width) break;
20672 col = n;
20673 }
20674 else {
20675 break;
20676 }
20677 }
20678
20679 return i;
20680}
20681
20682static int
20683dedent_string(struct parser_params *p, rb_parser_string_t *string, int width)
20684{
20685 char *str;
20686 long len;
20687 int i;
20688
20689 len = PARSER_STRING_LEN(string);
20690 str = PARSER_STRING_PTR(string);
20691
20692 i = dedent_string_column(str, len, width);
20693 if (!i) return 0;
20694
20695 rb_parser_str_modify(string);
20696 str = PARSER_STRING_PTR(string);
20697 if (PARSER_STRING_LEN(string) != len)
20698 rb_fatal("literal string changed: %s", PARSER_STRING_PTR(string));
20699 MEMMOVE(str, str + i, char, len - i);
20700 rb_parser_str_set_len(p, string, len - i);
20701 return i;
20702}
20703
20704static NODE *
20705heredoc_dedent(struct parser_params *p, NODE *root)
20706{
20707 NODE *node, *str_node, *prev_node;
20708 int indent = p->heredoc_indent;
20709 rb_parser_string_t *prev_lit = 0;
20710
20711 if (indent <= 0) return root;
20712 if (!root) return root;
20713
20714 prev_node = node = str_node = root;
20715 if (nd_type_p(root, NODE_LIST)) str_node = RNODE_LIST(root)->nd_head;
20716
20717 while (str_node) {
20718 rb_parser_string_t *lit = RNODE_STR(str_node)->string;
20719 if (nd_fl_newline(str_node)) {
20720 dedent_string(p, lit, indent);
20721 }
20722 if (!prev_lit) {
20723 prev_lit = lit;
20724 }
20725 else if (!literal_concat0(p, prev_lit, lit)) {
20726 return 0;
20727 }
20728 else {
20729 NODE *end = RNODE_LIST(node)->as.nd_end;
20730 node = RNODE_LIST(prev_node)->nd_next = RNODE_LIST(node)->nd_next;
20731 if (!node) {
20732 if (nd_type_p(prev_node, NODE_DSTR))
20733 nd_set_type(prev_node, NODE_STR);
20734 break;
20735 }
20736 RNODE_LIST(node)->as.nd_end = end;
20737 goto next_str;
20738 }
20739
20740 str_node = 0;
20741 while ((nd_type_p(node, NODE_LIST) || nd_type_p(node, NODE_DSTR)) && (node = RNODE_LIST(prev_node = node)->nd_next) != 0) {
20742 next_str:
20743 if (!nd_type_p(node, NODE_LIST)) break;
20744 if ((str_node = RNODE_LIST(node)->nd_head) != 0) {
20745 enum node_type type = nd_type(str_node);
20746 if (type == NODE_STR || type == NODE_DSTR) break;
20747 prev_lit = 0;
20748 str_node = 0;
20749 }
20750 }
20751 }
20752 return root;
20753}
20754
20755static int
20756whole_match_p(struct parser_params *p, const char *eos, long len, int indent)
20757{
20758 const char *beg = p->lex.pbeg;
20759 const char *ptr = p->lex.pend;
20760
20761 if (ptr - beg < len) return FALSE;
20762 if (ptr > beg && ptr[-1] == '\n') {
20763 if (--ptr > beg && ptr[-1] == '\r') --ptr;
20764 if (ptr - beg < len) return FALSE;
20765 }
20766 if (strncmp(eos, ptr -= len, len)) return FALSE;
20767 if (indent) {
20768 while (beg < ptr && ISSPACE(*beg)) beg++;
20769 }
20770 return beg == ptr;
20771}
20772
20773static int
20774word_match_p(struct parser_params *p, const char *word, long len)
20775{
20776 if (strncmp(p->lex.pcur, word, len)) return 0;
20777 if (lex_eol_n_p(p, len)) return 1;
20778 int c = (unsigned char)p->lex.pcur[len];
20779 if (ISSPACE(c)) return 1;
20780 switch (c) {
20781 case '\0': case '\004': case '\032': return 1;
20782 }
20783 return 0;
20784}
20785
20786#define NUM_SUFFIX_R (1<<0)
20787#define NUM_SUFFIX_I (1<<1)
20788#define NUM_SUFFIX_ALL 3
20789
20790static int
20791number_literal_suffix(struct parser_params *p, int mask)
20792{
20793 int c, result = 0;
20794 const char *lastp = p->lex.pcur;
20795
20796 while ((c = nextc(p)) != -1) {
20797 if ((mask & NUM_SUFFIX_I) && c == 'i') {
20798 result |= (mask & NUM_SUFFIX_I);
20799 mask &= ~NUM_SUFFIX_I;
20800 /* r after i, rational of complex is disallowed */
20801 mask &= ~NUM_SUFFIX_R;
20802 continue;
20803 }
20804 if ((mask & NUM_SUFFIX_R) && c == 'r') {
20805 result |= (mask & NUM_SUFFIX_R);
20806 mask &= ~NUM_SUFFIX_R;
20807 continue;
20808 }
20809 if (!ISASCII(c) || ISALPHA(c) || c == '_') {
20810 p->lex.pcur = lastp;
20811 return 0;
20812 }
20813 pushback(p, c);
20814 break;
20815 }
20816 return result;
20817}
20818
20819static enum yytokentype
20820set_number_literal(struct parser_params *p, enum yytokentype type, int suffix, int base, int seen_point)
20821{
20822 enum rb_numeric_type numeric_type = integer_literal;
20823
20824 if (type == tFLOAT) {
20825 numeric_type = float_literal;
20826 }
20827
20828 if (suffix & NUM_SUFFIX_R) {
20829 type = tRATIONAL;
20830 numeric_type = rational_literal;
20831 }
20832 if (suffix & NUM_SUFFIX_I) {
20833 type = tIMAGINARY;
20834 }
20835
20836 switch (type) {
20837 case tINTEGER:
20838 set_yylval_node(NEW_INTEGER(strdup(tok(p)), base, &_cur_loc));
20839 break;
20840 case tFLOAT:
20841 set_yylval_node(NEW_FLOAT(strdup(tok(p)), &_cur_loc));
20842 break;
20843 case tRATIONAL:
20844 set_yylval_node(NEW_RATIONAL(strdup(tok(p)), base, seen_point, &_cur_loc));
20845 break;
20846 case tIMAGINARY:
20847 set_yylval_node(NEW_IMAGINARY(strdup(tok(p)), base, seen_point, numeric_type, &_cur_loc));
20848 (void)numeric_type; /* for ripper */
20849 break;
20850 default:
20851 rb_bug("unexpected token: %d", type);
20852 }
20853 SET_LEX_STATE(EXPR_END);
20854 return type;
20855}
20856
20857#define dispatch_heredoc_end(p) parser_dispatch_heredoc_end(p, __LINE__)
20858static void
20859parser_dispatch_heredoc_end(struct parser_params *p, int line)
20860{
20861 if (has_delayed_token(p))
20862 dispatch_delayed_token(p, tSTRING_CONTENT);
20863
20864#ifdef RIPPER
20865 VALUE str = STR_NEW(p->lex.ptok, p->lex.pend - p->lex.ptok);
20866 ripper_dispatch1(p, ripper_token2eventid(tHEREDOC_END), str);
20867#else
20868 if (p->keep_tokens) {
20869 rb_parser_string_t *str = rb_parser_encoding_string_new(p, p->lex.ptok, p->lex.pend - p->lex.ptok, p->enc);
20870 RUBY_SET_YYLLOC_OF_HEREDOC_END(*p->yylloc);
20871 parser_append_tokens(p, str, tHEREDOC_END, line);
20872 }
20873#endif
20874
20875 RUBY_SET_YYLLOC_FROM_STRTERM_HEREDOC(*p->yylloc);
20876 lex_goto_eol(p);
20877 token_flush(p);
20878}
20879
20880static enum yytokentype
20881here_document(struct parser_params *p, rb_strterm_heredoc_t *here)
20882{
20883 int c, func, indent = 0;
20884 const char *eos, *ptr, *ptr_end;
20885 long len;
20886 rb_parser_string_t *str = 0;
20887 rb_encoding *enc = p->enc;
20888 rb_encoding *base_enc = 0;
20889 int bol;
20890#ifdef RIPPER
20891 VALUE s_value;
20892#endif
20893
20894 eos = PARSER_STRING_PTR(here->lastline) + here->offset;
20895 len = here->length;
20896 indent = (func = here->func) & STR_FUNC_INDENT;
20897
20898 if ((c = nextc(p)) == -1) {
20899 error:
20900#ifdef RIPPER
20901 if (!has_delayed_token(p)) {
20902 dispatch_scan_event(p, tSTRING_CONTENT);
20903 }
20904 else if (p->delayed.end_line + 1 == p->ruby_sourceline) {
20905 if ((len = p->lex.pcur - p->lex.ptok) > 0) {
20906 if (!(func & STR_FUNC_REGEXP)) {
20907 int cr = ENC_CODERANGE_UNKNOWN;
20908 rb_str_coderange_scan_restartable(p->lex.ptok, p->lex.pcur, enc, &cr);
20909 if (cr != ENC_CODERANGE_7BIT &&
20910 rb_is_usascii_enc(p->enc) &&
20911 enc != rb_utf8_encoding()) {
20912 enc = rb_ascii8bit_encoding();
20913 }
20914 }
20915 rb_parser_enc_str_buf_cat(p, p->delayed.token, p->lex.ptok, len, enc);
20916 }
20917 dispatch_delayed_token(p, tSTRING_CONTENT);
20918 }
20919 else {
20920 dispatch_delayed_token(p, tSTRING_CONTENT);
20921 dispatch_scan_event(p, tSTRING_CONTENT);
20922 }
20923 lex_goto_eol(p);
20924#endif
20925 heredoc_restore(p, &p->lex.strterm->u.heredoc);
20926 compile_error(p, "can't find string \"%.*s\" anywhere before EOF",
20927 (int)len, eos);
20928 token_flush(p);
20929 SET_LEX_STATE(EXPR_END);
20930 return tSTRING_END;
20931 }
20932 bol = was_bol(p);
20933 if (!bol) {
20934 /* not beginning of line, cannot be the terminator */
20935 }
20936 else if (p->heredoc_line_indent == -1) {
20937 /* `heredoc_line_indent == -1` means
20938 * - "after an interpolation in the same line", or
20939 * - "in a continuing line"
20940 */
20941 p->heredoc_line_indent = 0;
20942 }
20943 else if (whole_match_p(p, eos, len, indent)) {
20944 dispatch_heredoc_end(p);
20945 restore:
20946 heredoc_restore(p, &p->lex.strterm->u.heredoc);
20947 token_flush(p);
20948 SET_LEX_STATE(EXPR_END);
20949 return tSTRING_END;
20950 }
20951
20952 if (!(func & STR_FUNC_EXPAND)) {
20953 do {
20954 ptr = PARSER_STRING_PTR(p->lex.lastline);
20955 ptr_end = p->lex.pend;
20956 if (ptr_end > ptr) {
20957 switch (ptr_end[-1]) {
20958 case '\n':
20959 if (--ptr_end == ptr || ptr_end[-1] != '\r') {
20960 ptr_end++;
20961 break;
20962 }
20963 case '\r':
20964 --ptr_end;
20965 }
20966 }
20967
20968 if (p->heredoc_indent > 0) {
20969 long i = 0;
20970 while (ptr + i < ptr_end && parser_update_heredoc_indent(p, ptr[i]))
20971 i++;
20972 p->heredoc_line_indent = 0;
20973 }
20974
20975 if (str)
20976 parser_str_cat(str, ptr, ptr_end - ptr);
20977 else
20978 str = rb_parser_encoding_string_new(p, ptr, ptr_end - ptr, enc);
20979 if (!lex_eol_ptr_p(p, ptr_end)) parser_str_cat_cstr(str, "\n");
20980 lex_goto_eol(p);
20981 if (p->heredoc_indent > 0) {
20982 goto flush_str;
20983 }
20984 if (nextc(p) == -1) {
20985 if (str) {
20986 rb_parser_string_free(p, str);
20987 str = 0;
20988 }
20989 goto error;
20990 }
20991 } while (!whole_match_p(p, eos, len, indent));
20992 }
20993 else {
20994 /* int mb = ENC_CODERANGE_7BIT, *mbp = &mb;*/
20995 newtok(p);
20996 if (c == '#') {
20997 enum yytokentype t = parser_peek_variable_name(p);
20998 if (p->heredoc_line_indent != -1) {
20999 if (p->heredoc_indent > p->heredoc_line_indent) {
21000 p->heredoc_indent = p->heredoc_line_indent;
21001 }
21002 p->heredoc_line_indent = -1;
21003 }
21004 if (t) return t;
21005 tokadd(p, '#');
21006 c = nextc(p);
21007 }
21008 do {
21009 pushback(p, c);
21010 enc = p->enc;
21011 if ((c = tokadd_string(p, func, '\n', 0, NULL, &enc, &base_enc)) == -1) {
21012 if (p->eofp) goto error;
21013 goto restore;
21014 }
21015 if (c != '\n') {
21016 if (c == '\\') p->heredoc_line_indent = -1;
21017 flush:
21018 str = STR_NEW3(tok(p), toklen(p), enc, func);
21019 flush_str:
21020 set_yylval_str(str);
21021#ifndef RIPPER
21022 if (bol) nd_set_fl_newline(yylval.node);
21023#endif
21024 flush_string_content(p, enc, 0);
21025 return tSTRING_CONTENT;
21026 }
21027 tokadd(p, nextc(p));
21028 if (p->heredoc_indent > 0) {
21029 lex_goto_eol(p);
21030 goto flush;
21031 }
21032 /* if (mbp && mb == ENC_CODERANGE_UNKNOWN) mbp = 0;*/
21033 if ((c = nextc(p)) == -1) goto error;
21034 } while (!whole_match_p(p, eos, len, indent));
21035 str = STR_NEW3(tok(p), toklen(p), enc, func);
21036 }
21037 dispatch_heredoc_end(p);
21038 heredoc_restore(p, &p->lex.strterm->u.heredoc);
21039 token_flush(p);
21040 p->lex.strterm = NEW_STRTERM(func | STR_FUNC_TERM, 0, 0);
21041#ifdef RIPPER
21042 /* Preserve s_value for set_yylval_str */
21043 s_value = p->s_value;
21044#endif
21045 set_yylval_str(str);
21046#ifdef RIPPER
21047 set_parser_s_value(s_value);
21048#endif
21049
21050#ifndef RIPPER
21051 if (bol) nd_set_fl_newline(yylval.node);
21052#endif
21053 return tSTRING_CONTENT;
21054}
21055
21056#include "lex.c"
21057
21058static int
21059arg_ambiguous(struct parser_params *p, char c)
21060{
21061#ifndef RIPPER
21062 if (c == '/') {
21063 rb_warning1("ambiguity between regexp and two divisions: wrap regexp in parentheses or add a space after '%c' operator", WARN_I(c));
21064 }
21065 else {
21066 rb_warning1("ambiguous first argument; put parentheses or a space even after '%c' operator", WARN_I(c));
21067 }
21068#else
21069 dispatch1(arg_ambiguous, rb_usascii_str_new(&c, 1));
21070#endif
21071 return TRUE;
21072}
21073
21074/* returns true value if formal argument error;
21075 * Qtrue, or error message if ripper */
21076static VALUE
21077formal_argument_error(struct parser_params *p, ID id)
21078{
21079 switch (id_type(id)) {
21080 case ID_LOCAL:
21081 break;
21082#ifndef RIPPER
21083# define ERR(mesg) (yyerror0(mesg), Qtrue)
21084#else
21085# define ERR(mesg) WARN_S(mesg)
21086#endif
21087 case ID_CONST:
21088 return ERR("formal argument cannot be a constant");
21089 case ID_INSTANCE:
21090 return ERR("formal argument cannot be an instance variable");
21091 case ID_GLOBAL:
21092 return ERR("formal argument cannot be a global variable");
21093 case ID_CLASS:
21094 return ERR("formal argument cannot be a class variable");
21095 default:
21096 return ERR("formal argument must be local variable");
21097#undef ERR
21098 }
21099 shadowing_lvar(p, id);
21100
21101 return Qfalse;
21102}
21103
21104static int
21105lvar_defined(struct parser_params *p, ID id)
21106{
21107 return (dyna_in_block(p) && dvar_defined(p, id)) || local_id(p, id);
21108}
21109
21110/* emacsen -*- hack */
21111static long
21112parser_encode_length(struct parser_params *p, const char *name, long len)
21113{
21114 long nlen;
21115
21116 if (len > 5 && name[nlen = len - 5] == '-') {
21117 if (rb_memcicmp(name + nlen + 1, "unix", 4) == 0)
21118 return nlen;
21119 }
21120 if (len > 4 && name[nlen = len - 4] == '-') {
21121 if (rb_memcicmp(name + nlen + 1, "dos", 3) == 0)
21122 return nlen;
21123 if (rb_memcicmp(name + nlen + 1, "mac", 3) == 0 &&
21124 !(len == 8 && rb_memcicmp(name, "utf8-mac", len) == 0))
21125 /* exclude UTF8-MAC because the encoding named "UTF8" doesn't exist in Ruby */
21126 return nlen;
21127 }
21128 return len;
21129}
21130
21131static void
21132parser_set_encode(struct parser_params *p, const char *name)
21133{
21134 rb_encoding *enc;
21135 VALUE excargs[3];
21136 int idx = 0;
21137
21138 const char *wrong = 0;
21139 switch (*name) {
21140 case 'e': case 'E': wrong = "external"; break;
21141 case 'i': case 'I': wrong = "internal"; break;
21142 case 'f': case 'F': wrong = "filesystem"; break;
21143 case 'l': case 'L': wrong = "locale"; break;
21144 }
21145 if (wrong && STRCASECMP(name, wrong) == 0) goto unknown;
21146 idx = rb_enc_find_index(name);
21147 if (idx < 0) {
21148 unknown:
21149 excargs[1] = rb_sprintf("unknown encoding name: %s", name);
21150 error:
21151 excargs[0] = rb_eArgError;
21152 excargs[2] = rb_make_backtrace();
21153 rb_ary_unshift(excargs[2], rb_sprintf("%"PRIsVALUE":%d", p->ruby_sourcefile_string, p->ruby_sourceline));
21154 VALUE exc = rb_make_exception(3, excargs);
21155 ruby_show_error_line(p, exc, &(YYLTYPE)RUBY_INIT_YYLLOC(), p->ruby_sourceline, p->lex.lastline);
21156
21157 rb_ast_free(p->ast);
21158 p->ast = NULL;
21159
21160 rb_exc_raise(exc);
21161 }
21162 enc = rb_enc_from_index(idx);
21163 if (!rb_enc_asciicompat(enc)) {
21164 excargs[1] = rb_sprintf("%s is not ASCII compatible", rb_enc_name(enc));
21165 goto error;
21166 }
21167 p->enc = enc;
21168#ifndef RIPPER
21169 if (p->debug_lines) {
21170 long i;
21171 for (i = 0; i < p->debug_lines->len; i++) {
21172 rb_parser_enc_associate(p, p->debug_lines->data[i], enc);
21173 }
21174 }
21175#endif
21176}
21177
21178static bool
21179comment_at_top(struct parser_params *p)
21180{
21181 if (p->token_seen) return false;
21182 return (p->line_count == (p->has_shebang ? 2 : 1));
21183}
21184
21185typedef long (*rb_magic_comment_length_t)(struct parser_params *p, const char *name, long len);
21186typedef void (*rb_magic_comment_setter_t)(struct parser_params *p, const char *name, const char *val);
21187
21188static int parser_invalid_pragma_value(struct parser_params *p, const char *name, const char *val);
21189
21190static void
21191magic_comment_encoding(struct parser_params *p, const char *name, const char *val)
21192{
21193 if (!comment_at_top(p)) {
21194 return;
21195 }
21196 parser_set_encode(p, val);
21197}
21198
21199static int
21200parser_get_bool(struct parser_params *p, const char *name, const char *val)
21201{
21202 switch (*val) {
21203 case 't': case 'T':
21204 if (STRCASECMP(val, "true") == 0) {
21205 return TRUE;
21206 }
21207 break;
21208 case 'f': case 'F':
21209 if (STRCASECMP(val, "false") == 0) {
21210 return FALSE;
21211 }
21212 break;
21213 }
21214 return parser_invalid_pragma_value(p, name, val);
21215}
21216
21217static int
21218parser_invalid_pragma_value(struct parser_params *p, const char *name, const char *val)
21219{
21220 rb_warning2("invalid value for %s: %s", WARN_S(name), WARN_S(val));
21221 return -1;
21222}
21223
21224static void
21225parser_set_token_info(struct parser_params *p, const char *name, const char *val)
21226{
21227 int b = parser_get_bool(p, name, val);
21228 if (b >= 0) p->token_info_enabled = b;
21229}
21230
21231static void
21232parser_set_frozen_string_literal(struct parser_params *p, const char *name, const char *val)
21233{
21234 int b;
21235
21236 if (p->token_seen) {
21237 rb_warning1("'%s' is ignored after any tokens", WARN_S(name));
21238 return;
21239 }
21240
21241 b = parser_get_bool(p, name, val);
21242 if (b < 0) return;
21243
21244 p->frozen_string_literal = b;
21245}
21246
21247static void
21248parser_set_shareable_constant_value(struct parser_params *p, const char *name, const char *val)
21249{
21250 for (const char *s = p->lex.pbeg, *e = p->lex.pcur; s < e; ++s) {
21251 if (*s == ' ' || *s == '\t') continue;
21252 if (*s == '#') break;
21253 rb_warning1("'%s' is ignored unless in comment-only line", WARN_S(name));
21254 return;
21255 }
21256
21257 switch (*val) {
21258 case 'n': case 'N':
21259 if (STRCASECMP(val, "none") == 0) {
21260 p->ctxt.shareable_constant_value = rb_parser_shareable_none;
21261 return;
21262 }
21263 break;
21264 case 'l': case 'L':
21265 if (STRCASECMP(val, "literal") == 0) {
21266 p->ctxt.shareable_constant_value = rb_parser_shareable_literal;
21267 return;
21268 }
21269 break;
21270 case 'e': case 'E':
21271 if (STRCASECMP(val, "experimental_copy") == 0) {
21272 p->ctxt.shareable_constant_value = rb_parser_shareable_copy;
21273 return;
21274 }
21275 if (STRCASECMP(val, "experimental_everything") == 0) {
21276 p->ctxt.shareable_constant_value = rb_parser_shareable_everything;
21277 return;
21278 }
21279 break;
21280 }
21281 parser_invalid_pragma_value(p, name, val);
21282}
21283
21284# if WARN_PAST_SCOPE
21285static void
21286parser_set_past_scope(struct parser_params *p, const char *name, const char *val)
21287{
21288 int b = parser_get_bool(p, name, val);
21289 if (b >= 0) p->past_scope_enabled = b;
21290}
21291# endif
21292
21294 const char *name;
21295 rb_magic_comment_setter_t func;
21296 rb_magic_comment_length_t length;
21297};
21298
21299static const struct magic_comment magic_comments[] = {
21300 {"coding", magic_comment_encoding, parser_encode_length},
21301 {"encoding", magic_comment_encoding, parser_encode_length},
21302 {"frozen_string_literal", parser_set_frozen_string_literal},
21303 {"shareable_constant_value", parser_set_shareable_constant_value},
21304 {"warn_indent", parser_set_token_info},
21305# if WARN_PAST_SCOPE
21306 {"warn_past_scope", parser_set_past_scope},
21307# endif
21308};
21309
21310static const char *
21311magic_comment_marker(const char *str, long len)
21312{
21313 long i = 2;
21314
21315 while (i < len) {
21316 switch (str[i]) {
21317 case '-':
21318 if (str[i-1] == '*' && str[i-2] == '-') {
21319 return str + i + 1;
21320 }
21321 i += 2;
21322 break;
21323 case '*':
21324 if (i + 1 >= len) return 0;
21325 if (str[i+1] != '-') {
21326 i += 4;
21327 }
21328 else if (str[i-1] != '-') {
21329 i += 2;
21330 }
21331 else {
21332 return str + i + 2;
21333 }
21334 break;
21335 default:
21336 i += 3;
21337 break;
21338 }
21339 }
21340 return 0;
21341}
21342
21343static int
21344parser_magic_comment(struct parser_params *p, const char *str, long len)
21345{
21346 int indicator = 0;
21347 VALUE name = 0, val = 0;
21348 const char *beg, *end, *vbeg, *vend;
21349#define str_copy(_s, _p, _n) ((_s) \
21350 ? (void)(rb_str_resize((_s), (_n)), \
21351 MEMCPY(RSTRING_PTR(_s), (_p), char, (_n)), (_s)) \
21352 : (void)((_s) = STR_NEW((_p), (_n))))
21353
21354 if (len <= 7) return FALSE;
21355 if (!!(beg = magic_comment_marker(str, len))) {
21356 if (!(end = magic_comment_marker(beg, str + len - beg)))
21357 return FALSE;
21358 indicator = TRUE;
21359 str = beg;
21360 len = end - beg - 3;
21361 }
21362
21363 /* %r"([^\\s\'\":;]+)\\s*:\\s*(\"(?:\\\\.|[^\"])*\"|[^\"\\s;]+)[\\s;]*" */
21364 while (len > 0) {
21365 const struct magic_comment *mc = magic_comments;
21366 char *s;
21367 int i;
21368 long n = 0;
21369
21370 for (; len > 0 && *str; str++, --len) {
21371 switch (*str) {
21372 case '\'': case '"': case ':': case ';':
21373 continue;
21374 }
21375 if (!ISSPACE(*str)) break;
21376 }
21377 for (beg = str; len > 0; str++, --len) {
21378 switch (*str) {
21379 case '\'': case '"': case ':': case ';':
21380 break;
21381 default:
21382 if (ISSPACE(*str)) break;
21383 continue;
21384 }
21385 break;
21386 }
21387 for (end = str; len > 0 && ISSPACE(*str); str++, --len);
21388 if (!len) break;
21389 if (*str != ':') {
21390 if (!indicator) return FALSE;
21391 continue;
21392 }
21393
21394 do str++; while (--len > 0 && ISSPACE(*str));
21395 if (!len) break;
21396 const char *tok_beg = str;
21397 if (*str == '"') {
21398 for (vbeg = ++str; --len > 0 && *str != '"'; str++) {
21399 if (*str == '\\') {
21400 --len;
21401 ++str;
21402 }
21403 }
21404 vend = str;
21405 if (len) {
21406 --len;
21407 ++str;
21408 }
21409 }
21410 else {
21411 for (vbeg = str; len > 0 && *str != '"' && *str != ';' && !ISSPACE(*str); --len, str++);
21412 vend = str;
21413 }
21414 const char *tok_end = str;
21415 if (indicator) {
21416 while (len > 0 && (*str == ';' || ISSPACE(*str))) --len, str++;
21417 }
21418 else {
21419 while (len > 0 && (ISSPACE(*str))) --len, str++;
21420 if (len) return FALSE;
21421 }
21422
21423 n = end - beg;
21424 str_copy(name, beg, n);
21425 s = RSTRING_PTR(name);
21426 for (i = 0; i < n; ++i) {
21427 if (s[i] == '-') s[i] = '_';
21428 }
21429 do {
21430 if (STRNCASECMP(mc->name, s, n) == 0 && !mc->name[n]) {
21431 n = vend - vbeg;
21432 if (mc->length) {
21433 n = (*mc->length)(p, vbeg, n);
21434 }
21435 str_copy(val, vbeg, n);
21436 p->lex.ptok = tok_beg;
21437 p->lex.pcur = tok_end;
21438 (*mc->func)(p, mc->name, RSTRING_PTR(val));
21439 break;
21440 }
21441 } while (++mc < magic_comments + numberof(magic_comments));
21442#ifdef RIPPER
21443 str_copy(val, vbeg, vend - vbeg);
21444 dispatch2(magic_comment, name, val);
21445#endif
21446 }
21447
21448 return TRUE;
21449}
21450
21451static void
21452set_file_encoding(struct parser_params *p, const char *str, const char *send)
21453{
21454 int sep = 0;
21455 const char *beg = str;
21456 VALUE s;
21457
21458 for (;;) {
21459 if (send - str <= 6) return;
21460 switch (str[6]) {
21461 case 'C': case 'c': str += 6; continue;
21462 case 'O': case 'o': str += 5; continue;
21463 case 'D': case 'd': str += 4; continue;
21464 case 'I': case 'i': str += 3; continue;
21465 case 'N': case 'n': str += 2; continue;
21466 case 'G': case 'g': str += 1; continue;
21467 case '=': case ':':
21468 sep = 1;
21469 str += 6;
21470 break;
21471 default:
21472 str += 6;
21473 if (ISSPACE(*str)) break;
21474 continue;
21475 }
21476 if (STRNCASECMP(str-6, "coding", 6) == 0) break;
21477 sep = 0;
21478 }
21479 for (;;) {
21480 do {
21481 if (++str >= send) return;
21482 } while (ISSPACE(*str));
21483 if (sep) break;
21484 if (*str != '=' && *str != ':') return;
21485 sep = 1;
21486 str++;
21487 }
21488 beg = str;
21489 while ((*str == '-' || *str == '_' || ISALNUM(*str)) && ++str < send);
21490 s = rb_str_new(beg, parser_encode_length(p, beg, str - beg));
21491 p->lex.ptok = beg;
21492 p->lex.pcur = str;
21493 parser_set_encode(p, RSTRING_PTR(s));
21494 rb_str_resize(s, 0);
21495}
21496
21497static void
21498parser_prepare(struct parser_params *p)
21499{
21500 int c = nextc0(p, FALSE);
21501 p->token_info_enabled = !compile_for_eval && RTEST(ruby_verbose);
21502 switch (c) {
21503 case '#':
21504 if (peek(p, '!')) p->has_shebang = 1;
21505 break;
21506 case 0xef: /* UTF-8 BOM marker */
21507 if (!lex_eol_n_p(p, 2) &&
21508 (unsigned char)p->lex.pcur[0] == 0xbb &&
21509 (unsigned char)p->lex.pcur[1] == 0xbf) {
21510 p->enc = rb_utf8_encoding();
21511 p->lex.pcur += 2;
21512#ifndef RIPPER
21513 if (p->debug_lines) {
21514 rb_parser_string_set_encoding(p->lex.lastline, p->enc);
21515 }
21516#endif
21517 p->lex.pbeg = p->lex.pcur;
21518 token_flush(p);
21519 return;
21520 }
21521 break;
21522 case -1: /* end of script. */
21523 return;
21524 }
21525 pushback(p, c);
21526 p->enc = rb_parser_str_get_encoding(p->lex.lastline);
21527}
21528
21529#ifndef RIPPER
21530#define ambiguous_operator(tok, op, syn) ( \
21531 rb_warning0("'"op"' after local variable or literal is interpreted as binary operator"), \
21532 rb_warning0("even though it seems like "syn""))
21533#else
21534#define ambiguous_operator(tok, op, syn) \
21535 dispatch2(operator_ambiguous, TOKEN2VAL(tok), rb_str_new_cstr(syn))
21536#endif
21537#define warn_balanced(tok, op, syn) ((void) \
21538 (!IS_lex_state_for(last_state, EXPR_CLASS|EXPR_DOT|EXPR_FNAME|EXPR_ENDFN) && \
21539 space_seen && !ISSPACE(c) && \
21540 (ambiguous_operator(tok, op, syn), 0)), \
21541 (enum yytokentype)(tok))
21542
21543static enum yytokentype
21544no_digits(struct parser_params *p)
21545{
21546 yyerror0("numeric literal without digits");
21547 if (peek(p, '_')) nextc(p);
21548 /* dummy 0, for tUMINUS_NUM at numeric */
21549 return set_number_literal(p, tINTEGER, 0, 10, 0);
21550}
21551
21552static enum yytokentype
21553parse_numeric(struct parser_params *p, int c)
21554{
21555 int is_float, seen_point, seen_e, nondigit;
21556 int suffix;
21557
21558 is_float = seen_point = seen_e = nondigit = 0;
21559 SET_LEX_STATE(EXPR_END);
21560 newtok(p);
21561 if (c == '-' || c == '+') {
21562 tokadd(p, c);
21563 c = nextc(p);
21564 }
21565 if (c == '0') {
21566 int start = toklen(p);
21567 c = nextc(p);
21568 if (c == 'x' || c == 'X') {
21569 /* hexadecimal */
21570 c = nextc(p);
21571 if (c != -1 && ISXDIGIT(c)) {
21572 do {
21573 if (c == '_') {
21574 if (nondigit) break;
21575 nondigit = c;
21576 continue;
21577 }
21578 if (!ISXDIGIT(c)) break;
21579 nondigit = 0;
21580 tokadd(p, c);
21581 } while ((c = nextc(p)) != -1);
21582 }
21583 pushback(p, c);
21584 tokfix(p);
21585 if (toklen(p) == start) {
21586 return no_digits(p);
21587 }
21588 else if (nondigit) goto trailing_uc;
21589 suffix = number_literal_suffix(p, NUM_SUFFIX_ALL);
21590 return set_number_literal(p, tINTEGER, suffix, 16, 0);
21591 }
21592 if (c == 'b' || c == 'B') {
21593 /* binary */
21594 c = nextc(p);
21595 if (c == '0' || c == '1') {
21596 do {
21597 if (c == '_') {
21598 if (nondigit) break;
21599 nondigit = c;
21600 continue;
21601 }
21602 if (c != '0' && c != '1') break;
21603 nondigit = 0;
21604 tokadd(p, c);
21605 } while ((c = nextc(p)) != -1);
21606 }
21607 pushback(p, c);
21608 tokfix(p);
21609 if (toklen(p) == start) {
21610 return no_digits(p);
21611 }
21612 else if (nondigit) goto trailing_uc;
21613 suffix = number_literal_suffix(p, NUM_SUFFIX_ALL);
21614 return set_number_literal(p, tINTEGER, suffix, 2, 0);
21615 }
21616 if (c == 'd' || c == 'D') {
21617 /* decimal */
21618 c = nextc(p);
21619 if (c != -1 && ISDIGIT(c)) {
21620 do {
21621 if (c == '_') {
21622 if (nondigit) break;
21623 nondigit = c;
21624 continue;
21625 }
21626 if (!ISDIGIT(c)) break;
21627 nondigit = 0;
21628 tokadd(p, c);
21629 } while ((c = nextc(p)) != -1);
21630 }
21631 pushback(p, c);
21632 tokfix(p);
21633 if (toklen(p) == start) {
21634 return no_digits(p);
21635 }
21636 else if (nondigit) goto trailing_uc;
21637 suffix = number_literal_suffix(p, NUM_SUFFIX_ALL);
21638 return set_number_literal(p, tINTEGER, suffix, 10, 0);
21639 }
21640 if (c == '_') {
21641 /* 0_0 */
21642 goto octal_number;
21643 }
21644 if (c == 'o' || c == 'O') {
21645 /* prefixed octal */
21646 c = nextc(p);
21647 if (c == -1 || c == '_' || !ISDIGIT(c)) {
21648 tokfix(p);
21649 return no_digits(p);
21650 }
21651 }
21652 if (c >= '0' && c <= '7') {
21653 /* octal */
21654 octal_number:
21655 do {
21656 if (c == '_') {
21657 if (nondigit) break;
21658 nondigit = c;
21659 continue;
21660 }
21661 if (c < '0' || c > '9') break;
21662 if (c > '7') goto invalid_octal;
21663 nondigit = 0;
21664 tokadd(p, c);
21665 } while ((c = nextc(p)) != -1);
21666 if (toklen(p) > start) {
21667 pushback(p, c);
21668 tokfix(p);
21669 if (nondigit) goto trailing_uc;
21670 suffix = number_literal_suffix(p, NUM_SUFFIX_ALL);
21671 return set_number_literal(p, tINTEGER, suffix, 8, 0);
21672 }
21673 if (nondigit) {
21674 pushback(p, c);
21675 goto trailing_uc;
21676 }
21677 }
21678 if (c > '7' && c <= '9') {
21679 invalid_octal:
21680 yyerror0("Invalid octal digit");
21681 }
21682 else if (c == '.' || c == 'e' || c == 'E') {
21683 tokadd(p, '0');
21684 }
21685 else {
21686 pushback(p, c);
21687 tokfix(p);
21688 suffix = number_literal_suffix(p, NUM_SUFFIX_ALL);
21689 return set_number_literal(p, tINTEGER, suffix, 10, 0);
21690 }
21691 }
21692
21693 for (;;) {
21694 switch (c) {
21695 case '0': case '1': case '2': case '3': case '4':
21696 case '5': case '6': case '7': case '8': case '9':
21697 nondigit = 0;
21698 tokadd(p, c);
21699 break;
21700
21701 case '.':
21702 if (nondigit) goto trailing_uc;
21703 if (seen_point || seen_e) {
21704 goto decode_num;
21705 }
21706 else {
21707 int c0 = nextc(p);
21708 if (c0 == -1 || !ISDIGIT(c0)) {
21709 pushback(p, c0);
21710 goto decode_num;
21711 }
21712 c = c0;
21713 }
21714 seen_point = toklen(p);
21715 tokadd(p, '.');
21716 tokadd(p, c);
21717 is_float++;
21718 nondigit = 0;
21719 break;
21720
21721 case 'e':
21722 case 'E':
21723 if (nondigit) {
21724 pushback(p, c);
21725 c = nondigit;
21726 goto decode_num;
21727 }
21728 if (seen_e) {
21729 goto decode_num;
21730 }
21731 nondigit = c;
21732 c = nextc(p);
21733 if (c != '-' && c != '+' && !ISDIGIT(c)) {
21734 pushback(p, c);
21735 c = nondigit;
21736 nondigit = 0;
21737 goto decode_num;
21738 }
21739 tokadd(p, nondigit);
21740 seen_e++;
21741 is_float++;
21742 tokadd(p, c);
21743 nondigit = (c == '-' || c == '+') ? c : 0;
21744 break;
21745
21746 case '_': /* `_' in number just ignored */
21747 if (nondigit) goto decode_num;
21748 nondigit = c;
21749 break;
21750
21751 default:
21752 goto decode_num;
21753 }
21754 c = nextc(p);
21755 }
21756
21757 decode_num:
21758 pushback(p, c);
21759 if (nondigit) {
21760 trailing_uc:
21761 literal_flush(p, p->lex.pcur - 1);
21762 YYLTYPE loc = RUBY_INIT_YYLLOC();
21763 compile_error(p, "trailing '%c' in number", nondigit);
21764 parser_show_error_line(p, &loc);
21765 }
21766 tokfix(p);
21767 if (is_float) {
21768 enum yytokentype type = tFLOAT;
21769
21770 suffix = number_literal_suffix(p, seen_e ? NUM_SUFFIX_I : NUM_SUFFIX_ALL);
21771 if (suffix & NUM_SUFFIX_R) {
21772 type = tRATIONAL;
21773 }
21774 else {
21775 strtod(tok(p), 0);
21776 if (errno == ERANGE) {
21777 rb_warning1("Float %s out of range", WARN_S(tok(p)));
21778 errno = 0;
21779 }
21780 }
21781 return set_number_literal(p, type, suffix, 0, seen_point);
21782 }
21783 suffix = number_literal_suffix(p, NUM_SUFFIX_ALL);
21784 return set_number_literal(p, tINTEGER, suffix, 10, 0);
21785}
21786
21787static enum yytokentype
21788parse_qmark(struct parser_params *p, int space_seen)
21789{
21790 rb_encoding *enc;
21791 register int c;
21792 rb_parser_string_t *lit;
21793 const char *start = p->lex.pcur;
21794
21795 if (IS_END()) {
21796 SET_LEX_STATE(EXPR_VALUE);
21797 return '?';
21798 }
21799 c = nextc(p);
21800 if (c == -1) {
21801 compile_error(p, "incomplete character syntax");
21802 return 0;
21803 }
21804 if (rb_enc_isspace(c, p->enc)) {
21805 if (!IS_ARG()) {
21806 int c2 = escaped_control_code(c);
21807 if (c2) {
21808 WARN_SPACE_CHAR(c2, "?");
21809 }
21810 }
21811 ternary:
21812 pushback(p, c);
21813 SET_LEX_STATE(EXPR_VALUE);
21814 return '?';
21815 }
21816 newtok(p);
21817 enc = p->enc;
21818 int w = parser_precise_mbclen(p, start);
21819 if (is_identchar(p, start, p->lex.pend, p->enc) &&
21820 !(lex_eol_ptr_n_p(p, start, w) || !is_identchar(p, start + w, p->lex.pend, p->enc))) {
21821 if (space_seen) {
21822 const char *ptr = start;
21823 do {
21824 int n = parser_precise_mbclen(p, ptr);
21825 if (n < 0) return -1;
21826 ptr += n;
21827 } while (!lex_eol_ptr_p(p, ptr) && is_identchar(p, ptr, p->lex.pend, p->enc));
21828 rb_warn2("'?' just followed by '%.*s' is interpreted as" \
21829 " a conditional operator, put a space after '?'",
21830 WARN_I((int)(ptr - start)), WARN_S_L(start, (ptr - start)));
21831 }
21832 goto ternary;
21833 }
21834 else if (c == '\\') {
21835 if (peek(p, 'u')) {
21836 nextc(p);
21837 enc = rb_utf8_encoding();
21838 tokadd_utf8(p, &enc, -1, 0, 0);
21839 }
21840 else if (!ISASCII(c = peekc(p)) && c != -1) {
21841 nextc(p);
21842 if (tokadd_mbchar(p, c) == -1) return 0;
21843 }
21844 else {
21845 c = read_escape(p, 0, p->lex.pcur - rb_strlen_lit("?\\"));
21846 tokadd(p, c);
21847 }
21848 }
21849 else {
21850 if (tokadd_mbchar(p, c) == -1) return 0;
21851 }
21852 tokfix(p);
21853 lit = STR_NEW3(tok(p), toklen(p), enc, 0);
21854 set_yylval_str(lit);
21855 SET_LEX_STATE(EXPR_END);
21856 return tCHAR;
21857}
21858
21859static enum yytokentype
21860parse_percent(struct parser_params *p, const int space_seen, const enum lex_state_e last_state)
21861{
21862 register int c;
21863 const char *ptok = p->lex.pcur;
21864
21865 if (IS_BEG()) {
21866 int term;
21867 int paren;
21868
21869 c = nextc(p);
21870 quotation:
21871 if (c == -1) goto unterminated;
21872 if (!ISALNUM(c)) {
21873 term = c;
21874 if (!ISASCII(c)) goto unknown;
21875 c = 'Q';
21876 }
21877 else {
21878 term = nextc(p);
21879 if (rb_enc_isalnum(term, p->enc) || !parser_isascii(p)) {
21880 unknown:
21881 pushback(p, term);
21882 c = parser_precise_mbclen(p, p->lex.pcur);
21883 if (c < 0) return 0;
21884 p->lex.pcur += c;
21885 yyerror0("unknown type of %string");
21886 return 0;
21887 }
21888 }
21889 if (term == -1) {
21890 unterminated:
21891 compile_error(p, "unterminated quoted string meets end of file");
21892 return 0;
21893 }
21894 paren = term;
21895 if (term == '(') term = ')';
21896 else if (term == '[') term = ']';
21897 else if (term == '{') term = '}';
21898 else if (term == '<') term = '>';
21899 else paren = 0;
21900
21901 p->lex.ptok = ptok-1;
21902 switch (c) {
21903 case 'Q':
21904 p->lex.strterm = NEW_STRTERM(str_dquote, term, paren);
21905 return tSTRING_BEG;
21906
21907 case 'q':
21908 p->lex.strterm = NEW_STRTERM(str_squote, term, paren);
21909 return tSTRING_BEG;
21910
21911 case 'W':
21912 p->lex.strterm = NEW_STRTERM(str_dword, term, paren);
21913 return tWORDS_BEG;
21914
21915 case 'w':
21916 p->lex.strterm = NEW_STRTERM(str_sword, term, paren);
21917 return tQWORDS_BEG;
21918
21919 case 'I':
21920 p->lex.strterm = NEW_STRTERM(str_dword, term, paren);
21921 return tSYMBOLS_BEG;
21922
21923 case 'i':
21924 p->lex.strterm = NEW_STRTERM(str_sword, term, paren);
21925 return tQSYMBOLS_BEG;
21926
21927 case 'x':
21928 p->lex.strterm = NEW_STRTERM(str_xquote, term, paren);
21929 return tXSTRING_BEG;
21930
21931 case 'r':
21932 p->lex.strterm = NEW_STRTERM(str_regexp, term, paren);
21933 return tREGEXP_BEG;
21934
21935 case 's':
21936 p->lex.strterm = NEW_STRTERM(str_ssym, term, paren);
21937 SET_LEX_STATE(EXPR_FNAME|EXPR_FITEM);
21938 return tSYMBEG;
21939
21940 default:
21941 yyerror0("unknown type of %string");
21942 return 0;
21943 }
21944 }
21945 if ((c = nextc(p)) == '=') {
21946 set_yylval_id('%');
21947 SET_LEX_STATE(EXPR_BEG);
21948 return tOP_ASGN;
21949 }
21950 if (IS_SPCARG(c) || (IS_lex_state(EXPR_FITEM) && c == 's')) {
21951 goto quotation;
21952 }
21953 SET_LEX_STATE(IS_AFTER_OPERATOR() ? EXPR_ARG : EXPR_BEG);
21954 pushback(p, c);
21955 return warn_balanced('%', "%%", "string literal");
21956}
21957
21958static int
21959tokadd_ident(struct parser_params *p, int c)
21960{
21961 do {
21962 if (tokadd_mbchar(p, c) == -1) return -1;
21963 c = nextc(p);
21964 } while (parser_is_identchar(p));
21965 pushback(p, c);
21966 return 0;
21967}
21968
21969static ID
21970tokenize_ident(struct parser_params *p)
21971{
21972 ID ident = TOK_INTERN();
21973
21974 set_yylval_name(ident);
21975
21976 return ident;
21977}
21978
21979static int
21980parse_numvar(struct parser_params *p)
21981{
21982 size_t len;
21983 int overflow;
21984 unsigned long n = ruby_scan_digits(tok(p)+1, toklen(p)-1, 10, &len, &overflow);
21985 const unsigned long nth_ref_max =
21986 ((FIXNUM_MAX < INT_MAX) ? FIXNUM_MAX : INT_MAX) >> 1;
21987 /* NTH_REF is left-shifted to be ORed with back-ref flag and
21988 * turned into a Fixnum, in compile.c */
21989
21990 if (overflow || n > nth_ref_max) {
21991 /* compile_error()? */
21992 rb_warn1("'%s' is too big for a number variable, always nil", WARN_S(tok(p)));
21993 return 0; /* $0 is $PROGRAM_NAME, not NTH_REF */
21994 }
21995 else {
21996 return (int)n;
21997 }
21998}
21999
22000static enum yytokentype
22001parse_gvar(struct parser_params *p, const enum lex_state_e last_state)
22002{
22003 const char *ptr = p->lex.pcur;
22004 register int c;
22005
22006 SET_LEX_STATE(EXPR_END);
22007 p->lex.ptok = ptr - 1; /* from '$' */
22008 newtok(p);
22009 c = nextc(p);
22010 switch (c) {
22011 case '_': /* $_: last read line string */
22012 c = nextc(p);
22013 if (parser_is_identchar(p)) {
22014 tokadd(p, '$');
22015 tokadd(p, '_');
22016 break;
22017 }
22018 pushback(p, c);
22019 c = '_';
22020 /* fall through */
22021 case '~': /* $~: match-data */
22022 case '*': /* $*: argv */
22023 case '$': /* $$: pid */
22024 case '?': /* $?: last status */
22025 case '!': /* $!: error string */
22026 case '@': /* $@: error position */
22027 case '/': /* $/: input record separator */
22028 case '\\': /* $\: output record separator */
22029 case ';': /* $;: field separator */
22030 case ',': /* $,: output field separator */
22031 case '.': /* $.: last read line number */
22032 case '=': /* $=: ignorecase */
22033 case ':': /* $:: load path */
22034 case '<': /* $<: default input handle */
22035 case '>': /* $>: default output handle */
22036 case '\"': /* $": already loaded files */
22037 tokadd(p, '$');
22038 tokadd(p, c);
22039 goto gvar;
22040
22041 case '-':
22042 tokadd(p, '$');
22043 tokadd(p, c);
22044 c = nextc(p);
22045 if (parser_is_identchar(p)) {
22046 if (tokadd_mbchar(p, c) == -1) return 0;
22047 }
22048 else {
22049 pushback(p, c);
22050 pushback(p, '-');
22051 return '$';
22052 }
22053 gvar:
22054 tokenize_ident(p);
22055 return tGVAR;
22056
22057 case '&': /* $&: last match */
22058 case '`': /* $`: string before last match */
22059 case '\'': /* $': string after last match */
22060 case '+': /* $+: string matches last paren. */
22061 if (IS_lex_state_for(last_state, EXPR_FNAME)) {
22062 tokadd(p, '$');
22063 tokadd(p, c);
22064 goto gvar;
22065 }
22066 set_yylval_node(NEW_BACK_REF(c, &_cur_loc));
22067 return tBACK_REF;
22068
22069 case '1': case '2': case '3':
22070 case '4': case '5': case '6':
22071 case '7': case '8': case '9':
22072 tokadd(p, '$');
22073 do {
22074 tokadd(p, c);
22075 c = nextc(p);
22076 } while (c != -1 && ISDIGIT(c));
22077 pushback(p, c);
22078 if (IS_lex_state_for(last_state, EXPR_FNAME)) goto gvar;
22079 tokfix(p);
22080 c = parse_numvar(p);
22081 set_yylval_node(NEW_NTH_REF(c, &_cur_loc));
22082 return tNTH_REF;
22083
22084 default:
22085 if (!parser_is_identchar(p)) {
22086 YYLTYPE loc = RUBY_INIT_YYLLOC();
22087 if (c == -1 || ISSPACE(c)) {
22088 compile_error(p, "'$' without identifiers is not allowed as a global variable name");
22089 }
22090 else {
22091 pushback(p, c);
22092 compile_error(p, "'$%c' is not allowed as a global variable name", c);
22093 }
22094 parser_show_error_line(p, &loc);
22095 set_yylval_noname();
22096 return tGVAR;
22097 }
22098 /* fall through */
22099 case '0':
22100 tokadd(p, '$');
22101 }
22102
22103 if (tokadd_ident(p, c)) return 0;
22104 SET_LEX_STATE(EXPR_END);
22105 if (VALID_SYMNAME_P(tok(p), toklen(p), p->enc, ID_GLOBAL)) {
22106 tokenize_ident(p);
22107 }
22108 else {
22109 compile_error(p, "'%.*s' is not allowed as a global variable name", toklen(p), tok(p));
22110 set_yylval_noname();
22111 }
22112 return tGVAR;
22113}
22114
22115static bool
22116parser_numbered_param(struct parser_params *p, int n)
22117{
22118 if (n < 0) return false;
22119
22120 if (DVARS_TERMINAL_P(p->lvtbl->args) || DVARS_TERMINAL_P(p->lvtbl->args->prev)) {
22121 return false;
22122 }
22123 if (p->max_numparam == ORDINAL_PARAM) {
22124 compile_error(p, "ordinary parameter is defined");
22125 return false;
22126 }
22127 struct vtable *args = p->lvtbl->args;
22128 if (p->max_numparam < n) {
22129 p->max_numparam = n;
22130 }
22131 while (n > args->pos) {
22132 vtable_add(args, NUMPARAM_IDX_TO_ID(args->pos+1));
22133 }
22134 return true;
22135}
22136
22137static enum yytokentype
22138parse_atmark(struct parser_params *p, const enum lex_state_e last_state)
22139{
22140 const char *ptr = p->lex.pcur;
22141 enum yytokentype result = tIVAR;
22142 register int c = nextc(p);
22143 YYLTYPE loc;
22144
22145 p->lex.ptok = ptr - 1; /* from '@' */
22146 newtok(p);
22147 tokadd(p, '@');
22148 if (c == '@') {
22149 result = tCVAR;
22150 tokadd(p, '@');
22151 c = nextc(p);
22152 }
22153 SET_LEX_STATE(IS_lex_state_for(last_state, EXPR_FNAME) ? EXPR_ENDFN : EXPR_END);
22154 if (c == -1 || !parser_is_identchar(p)) {
22155 pushback(p, c);
22156 RUBY_SET_YYLLOC(loc);
22157 if (result == tIVAR) {
22158 compile_error(p, "'@' without identifiers is not allowed as an instance variable name");
22159 }
22160 else {
22161 compile_error(p, "'@@' without identifiers is not allowed as a class variable name");
22162 }
22163 parser_show_error_line(p, &loc);
22164 set_yylval_noname();
22165 SET_LEX_STATE(EXPR_END);
22166 return result;
22167 }
22168 else if (ISDIGIT(c)) {
22169 pushback(p, c);
22170 RUBY_SET_YYLLOC(loc);
22171 if (result == tIVAR) {
22172 compile_error(p, "'@%c' is not allowed as an instance variable name", c);
22173 }
22174 else {
22175 compile_error(p, "'@@%c' is not allowed as a class variable name", c);
22176 }
22177 parser_show_error_line(p, &loc);
22178 set_yylval_noname();
22179 SET_LEX_STATE(EXPR_END);
22180 return result;
22181 }
22182
22183 if (tokadd_ident(p, c)) return 0;
22184 tokenize_ident(p);
22185 return result;
22186}
22187
22188static enum yytokentype
22189parse_ident(struct parser_params *p, int c, int cmd_state)
22190{
22191 enum yytokentype result;
22192 bool is_ascii = true;
22193 const enum lex_state_e last_state = p->lex.state;
22194 ID ident;
22195 int enforce_keyword_end = 0;
22196
22197 do {
22198 if (!ISASCII(c)) is_ascii = false;
22199 if (tokadd_mbchar(p, c) == -1) return 0;
22200 c = nextc(p);
22201 } while (parser_is_identchar(p));
22202 if ((c == '!' || c == '?') && !peek(p, '=')) {
22203 result = tFID;
22204 tokadd(p, c);
22205 }
22206 else if (c == '=' && IS_lex_state(EXPR_FNAME) &&
22207 (!peek(p, '~') && !peek(p, '>') && (!peek(p, '=') || (peek_n(p, '>', 1))))) {
22208 result = tIDENTIFIER;
22209 tokadd(p, c);
22210 }
22211 else {
22212 result = tCONSTANT; /* assume provisionally */
22213 pushback(p, c);
22214 }
22215 tokfix(p);
22216
22217 if (IS_LABEL_POSSIBLE()) {
22218 if (IS_LABEL_SUFFIX(0)) {
22219 SET_LEX_STATE(EXPR_ARG|EXPR_LABELED);
22220 nextc(p);
22221 tokenize_ident(p);
22222 return tLABEL;
22223 }
22224 }
22225
22226#ifndef RIPPER
22227 if (peek_end_expect_token_locations(p)) {
22228 const rb_code_position_t *end_pos;
22229 int lineno, column;
22230 int beg_pos = (int)(p->lex.ptok - p->lex.pbeg);
22231
22232 end_pos = peek_end_expect_token_locations(p)->pos;
22233 lineno = end_pos->lineno;
22234 column = end_pos->column;
22235
22236 if (p->debug) {
22237 rb_parser_printf(p, "enforce_keyword_end check. current: (%d, %d), peek: (%d, %d)\n",
22238 p->ruby_sourceline, beg_pos, lineno, column);
22239 }
22240
22241 if ((p->ruby_sourceline > lineno) && (beg_pos <= column)) {
22242 const struct kwtable *kw;
22243
22244 if ((IS_lex_state(EXPR_DOT)) && (kw = rb_reserved_word(tok(p), toklen(p))) && (kw && kw->id[0] == keyword_end)) {
22245 if (p->debug) rb_parser_printf(p, "enforce_keyword_end is enabled\n");
22246 enforce_keyword_end = 1;
22247 }
22248 }
22249 }
22250#endif
22251
22252 if (is_ascii && (!IS_lex_state(EXPR_DOT) || enforce_keyword_end)) {
22253 const struct kwtable *kw;
22254
22255 /* See if it is a reserved word. */
22256 kw = rb_reserved_word(tok(p), toklen(p));
22257 if (kw) {
22258 enum lex_state_e state = p->lex.state;
22259 if (IS_lex_state_for(state, EXPR_FNAME)) {
22260 SET_LEX_STATE(EXPR_ENDFN);
22261 set_yylval_name(rb_intern2(tok(p), toklen(p)));
22262 return kw->id[0];
22263 }
22264 SET_LEX_STATE(kw->state);
22265 if (IS_lex_state(EXPR_BEG)) {
22266 p->command_start = TRUE;
22267 }
22268 if (kw->id[0] == keyword_do) {
22269 if (lambda_beginning_p()) {
22270 p->lex.lpar_beg = -1; /* make lambda_beginning_p() == FALSE in the body of "-> do ... end" */
22271 return keyword_do_LAMBDA;
22272 }
22273 if (COND_P()) return keyword_do_cond;
22274 if (CMDARG_P() && !IS_lex_state_for(state, EXPR_CMDARG))
22275 return keyword_do_block;
22276 return keyword_do;
22277 }
22278 if (IS_lex_state_for(state, (EXPR_BEG | EXPR_LABELED | EXPR_CLASS)))
22279 return kw->id[0];
22280 else {
22281 if (kw->id[0] != kw->id[1])
22282 SET_LEX_STATE(EXPR_BEG | EXPR_LABEL);
22283 return kw->id[1];
22284 }
22285 }
22286 }
22287
22288 if (IS_lex_state(EXPR_BEG_ANY | EXPR_ARG_ANY | EXPR_DOT)) {
22289 if (cmd_state) {
22290 SET_LEX_STATE(EXPR_CMDARG);
22291 }
22292 else {
22293 SET_LEX_STATE(EXPR_ARG);
22294 }
22295 }
22296 else if (p->lex.state == EXPR_FNAME) {
22297 SET_LEX_STATE(EXPR_ENDFN);
22298 }
22299 else {
22300 SET_LEX_STATE(EXPR_END);
22301 }
22302
22303 ident = tokenize_ident(p);
22304 if (result == tCONSTANT && is_local_id(ident)) result = tIDENTIFIER;
22305 if (!IS_lex_state_for(last_state, EXPR_DOT|EXPR_FNAME) &&
22306 (result == tIDENTIFIER) && /* not EXPR_FNAME, not attrasgn */
22307 (lvar_defined(p, ident) || NUMPARAM_ID_P(ident))) {
22308 SET_LEX_STATE(EXPR_END|EXPR_LABEL);
22309 }
22310 return result;
22311}
22312
22313static void
22314warn_cr(struct parser_params *p)
22315{
22316 if (!p->cr_seen) {
22317 p->cr_seen = TRUE;
22318 /* carried over with p->lex.nextline for nextc() */
22319 rb_warn0("encountered \\r in middle of line, treated as a mere space");
22320 }
22321}
22322
22323static enum yytokentype
22324parser_yylex(struct parser_params *p)
22325{
22326 register int c;
22327 int space_seen = 0;
22328 int cmd_state;
22329 int label;
22330 enum lex_state_e last_state;
22331 int fallthru = FALSE;
22332 int token_seen = p->token_seen;
22333
22334 if (p->lex.strterm) {
22335 if (strterm_is_heredoc(p->lex.strterm)) {
22336 token_flush(p);
22337 return here_document(p, &p->lex.strterm->u.heredoc);
22338 }
22339 else {
22340 token_flush(p);
22341 return parse_string(p, &p->lex.strterm->u.literal);
22342 }
22343 }
22344 cmd_state = p->command_start;
22345 p->command_start = FALSE;
22346 p->token_seen = TRUE;
22347#ifndef RIPPER
22348 token_flush(p);
22349#endif
22350 retry:
22351 last_state = p->lex.state;
22352 switch (c = nextc(p)) {
22353 case '\0': /* NUL */
22354 case '\004': /* ^D */
22355 case '\032': /* ^Z */
22356 case -1: /* end of script. */
22357 p->eofp = 1;
22358#ifndef RIPPER
22359 if (p->end_expect_token_locations) {
22360 pop_end_expect_token_locations(p);
22361 RUBY_SET_YYLLOC_OF_DUMMY_END(*p->yylloc);
22362 return tDUMNY_END;
22363 }
22364#endif
22365 /* Set location for end-of-input because dispatch_scan_event is not called. */
22366 RUBY_SET_YYLLOC(*p->yylloc);
22367 return END_OF_INPUT;
22368
22369 /* white spaces */
22370 case '\r':
22371 warn_cr(p);
22372 /* fall through */
22373 case ' ': case '\t': case '\f':
22374 case '\13': /* '\v' */
22375 space_seen = 1;
22376 while ((c = nextc(p))) {
22377 switch (c) {
22378 case '\r':
22379 warn_cr(p);
22380 /* fall through */
22381 case ' ': case '\t': case '\f':
22382 case '\13': /* '\v' */
22383 break;
22384 default:
22385 goto outofloop;
22386 }
22387 }
22388 outofloop:
22389 pushback(p, c);
22390 dispatch_scan_event(p, tSP);
22391#ifndef RIPPER
22392 token_flush(p);
22393#endif
22394 goto retry;
22395
22396 case '#': /* it's a comment */
22397 p->token_seen = token_seen;
22398 const char *const pcur = p->lex.pcur, *const ptok = p->lex.ptok;
22399 /* no magic_comment in shebang line */
22400 if (!parser_magic_comment(p, p->lex.pcur, p->lex.pend - p->lex.pcur)) {
22401 if (comment_at_top(p)) {
22402 set_file_encoding(p, p->lex.pcur, p->lex.pend);
22403 }
22404 }
22405 p->lex.pcur = pcur, p->lex.ptok = ptok;
22406 lex_goto_eol(p);
22407 dispatch_scan_event(p, tCOMMENT);
22408 fallthru = TRUE;
22409 /* fall through */
22410 case '\n':
22411 p->token_seen = token_seen;
22412 rb_parser_string_t *prevline = p->lex.lastline;
22413 c = (IS_lex_state(EXPR_BEG|EXPR_CLASS|EXPR_FNAME|EXPR_DOT) &&
22414 !IS_lex_state(EXPR_LABELED));
22415 if (c || IS_lex_state_all(EXPR_ARG|EXPR_LABELED)) {
22416 if (!fallthru) {
22417 dispatch_scan_event(p, tIGNORED_NL);
22418 }
22419 fallthru = FALSE;
22420 if (!c && p->ctxt.in_kwarg) {
22421 goto normal_newline;
22422 }
22423 goto retry;
22424 }
22425 while (1) {
22426 switch (c = nextc(p)) {
22427 case ' ': case '\t': case '\f': case '\r':
22428 case '\13': /* '\v' */
22429 space_seen = 1;
22430 break;
22431 case '#':
22432 pushback(p, c);
22433 if (space_seen) {
22434 dispatch_scan_event(p, tSP);
22435 token_flush(p);
22436 }
22437 goto retry;
22438 case 'a':
22439 if (peek_word_at(p, "nd", 2, 0)) goto leading_logical;
22440 goto bol;
22441 case 'o':
22442 if (peek_word_at(p, "r", 1, 0)) goto leading_logical;
22443 goto bol;
22444 case '|':
22445 if (peek(p, '|')) goto leading_logical;
22446 goto bol;
22447 case '&':
22448 if (peek(p, '&')) {
22449 leading_logical:
22450 pushback(p, c);
22451 dispatch_delayed_token(p, tIGNORED_NL);
22452 cmd_state = FALSE;
22453 goto retry;
22454 }
22455 /* fall through */
22456 case '.': {
22457 dispatch_delayed_token(p, tIGNORED_NL);
22458 if (peek(p, '.') == (c == '&')) {
22459 pushback(p, c);
22460 dispatch_scan_event(p, tSP);
22461 goto retry;
22462 }
22463 }
22464 bol:
22465 default:
22466 p->ruby_sourceline--;
22467 p->lex.nextline = p->lex.lastline;
22468 set_lastline(p, prevline);
22469 case -1: /* EOF no decrement*/
22470 if (c == -1 && space_seen) {
22471 dispatch_scan_event(p, tSP);
22472 }
22473 lex_goto_eol(p);
22474 if (c != -1) {
22475 token_flush(p);
22476 RUBY_SET_YYLLOC(*p->yylloc);
22477 }
22478 goto normal_newline;
22479 }
22480 }
22481 normal_newline:
22482 p->command_start = TRUE;
22483 SET_LEX_STATE(EXPR_BEG);
22484 return '\n';
22485
22486 case '*':
22487 if ((c = nextc(p)) == '*') {
22488 if ((c = nextc(p)) == '=') {
22489 set_yylval_id(idPow);
22490 SET_LEX_STATE(EXPR_BEG);
22491 return tOP_ASGN;
22492 }
22493 pushback(p, c);
22494 if (IS_SPCARG(c)) {
22495 rb_warning0("'**' interpreted as argument prefix");
22496 c = tDSTAR;
22497 }
22498 else if (IS_BEG()) {
22499 c = tDSTAR;
22500 }
22501 else {
22502 c = warn_balanced((enum ruby_method_ids)tPOW, "**", "argument prefix");
22503 }
22504 }
22505 else {
22506 if (c == '=') {
22507 set_yylval_id('*');
22508 SET_LEX_STATE(EXPR_BEG);
22509 return tOP_ASGN;
22510 }
22511 pushback(p, c);
22512 if (IS_SPCARG(c)) {
22513 rb_warning0("'*' interpreted as argument prefix");
22514 c = tSTAR;
22515 }
22516 else if (IS_BEG()) {
22517 c = tSTAR;
22518 }
22519 else {
22520 c = warn_balanced('*', "*", "argument prefix");
22521 }
22522 }
22523 SET_LEX_STATE(IS_AFTER_OPERATOR() ? EXPR_ARG : EXPR_BEG);
22524 return c;
22525
22526 case '!':
22527 c = nextc(p);
22528 if (IS_AFTER_OPERATOR()) {
22529 SET_LEX_STATE(EXPR_ARG);
22530 if (c == '@') {
22531 return '!';
22532 }
22533 }
22534 else {
22535 SET_LEX_STATE(EXPR_BEG);
22536 }
22537 if (c == '=') {
22538 return tNEQ;
22539 }
22540 if (c == '~') {
22541 return tNMATCH;
22542 }
22543 pushback(p, c);
22544 return '!';
22545
22546 case '=':
22547 if (was_bol(p)) {
22548 /* skip embedded rd document */
22549 if (word_match_p(p, "begin", 5)) {
22550 int first_p = TRUE;
22551
22552 lex_goto_eol(p);
22553 dispatch_scan_event(p, tEMBDOC_BEG);
22554 for (;;) {
22555 lex_goto_eol(p);
22556 if (!first_p) {
22557 dispatch_scan_event(p, tEMBDOC);
22558 }
22559 first_p = FALSE;
22560 c = nextc(p);
22561 if (c == -1) {
22562 compile_error(p, "embedded document meets end of file");
22563 return END_OF_INPUT;
22564 }
22565 if (c == '=' && word_match_p(p, "end", 3)) {
22566 break;
22567 }
22568 pushback(p, c);
22569 }
22570 lex_goto_eol(p);
22571 dispatch_scan_event(p, tEMBDOC_END);
22572 goto retry;
22573 }
22574 }
22575
22576 SET_LEX_STATE(IS_AFTER_OPERATOR() ? EXPR_ARG : EXPR_BEG);
22577 if ((c = nextc(p)) == '=') {
22578 if ((c = nextc(p)) == '=') {
22579 return tEQQ;
22580 }
22581 pushback(p, c);
22582 return tEQ;
22583 }
22584 if (c == '~') {
22585 return tMATCH;
22586 }
22587 else if (c == '>') {
22588 return tASSOC;
22589 }
22590 pushback(p, c);
22591 return '=';
22592
22593 case '<':
22594 c = nextc(p);
22595 if (c == '<' &&
22596 !IS_lex_state(EXPR_DOT | EXPR_CLASS) &&
22597 !IS_END() &&
22598 (!IS_ARG() || IS_lex_state(EXPR_LABELED) || space_seen)) {
22599 enum yytokentype token = heredoc_identifier(p);
22600 if (token) return token < 0 ? 0 : token;
22601 }
22602 if (IS_AFTER_OPERATOR()) {
22603 SET_LEX_STATE(EXPR_ARG);
22604 }
22605 else {
22606 if (IS_lex_state(EXPR_CLASS))
22607 p->command_start = TRUE;
22608 SET_LEX_STATE(EXPR_BEG);
22609 }
22610 if (c == '=') {
22611 if ((c = nextc(p)) == '>') {
22612 return tCMP;
22613 }
22614 pushback(p, c);
22615 return tLEQ;
22616 }
22617 if (c == '<') {
22618 if ((c = nextc(p)) == '=') {
22619 set_yylval_id(idLTLT);
22620 SET_LEX_STATE(EXPR_BEG);
22621 return tOP_ASGN;
22622 }
22623 pushback(p, c);
22624 return warn_balanced((enum ruby_method_ids)tLSHFT, "<<", "here document");
22625 }
22626 pushback(p, c);
22627 return '<';
22628
22629 case '>':
22630 SET_LEX_STATE(IS_AFTER_OPERATOR() ? EXPR_ARG : EXPR_BEG);
22631 if ((c = nextc(p)) == '=') {
22632 return tGEQ;
22633 }
22634 if (c == '>') {
22635 if ((c = nextc(p)) == '=') {
22636 set_yylval_id(idGTGT);
22637 SET_LEX_STATE(EXPR_BEG);
22638 return tOP_ASGN;
22639 }
22640 pushback(p, c);
22641 return tRSHFT;
22642 }
22643 pushback(p, c);
22644 return '>';
22645
22646 case '"':
22647 label = (IS_LABEL_POSSIBLE() ? str_label : 0);
22648 p->lex.strterm = NEW_STRTERM(str_dquote | label, '"', 0);
22649 p->lex.ptok = p->lex.pcur-1;
22650 return tSTRING_BEG;
22651
22652 case '`':
22653 if (IS_lex_state(EXPR_FNAME)) {
22654 SET_LEX_STATE(EXPR_ENDFN);
22655 return c;
22656 }
22657 if (IS_lex_state(EXPR_DOT)) {
22658 if (cmd_state)
22659 SET_LEX_STATE(EXPR_CMDARG);
22660 else
22661 SET_LEX_STATE(EXPR_ARG);
22662 return c;
22663 }
22664 p->lex.strterm = NEW_STRTERM(str_xquote, '`', 0);
22665 return tXSTRING_BEG;
22666
22667 case '\'':
22668 label = (IS_LABEL_POSSIBLE() ? str_label : 0);
22669 p->lex.strterm = NEW_STRTERM(str_squote | label, '\'', 0);
22670 p->lex.ptok = p->lex.pcur-1;
22671 return tSTRING_BEG;
22672
22673 case '?':
22674 return parse_qmark(p, space_seen);
22675
22676 case '&':
22677 if ((c = nextc(p)) == '&') {
22678 SET_LEX_STATE(EXPR_BEG);
22679 if ((c = nextc(p)) == '=') {
22680 set_yylval_id(idANDOP);
22681 SET_LEX_STATE(EXPR_BEG);
22682 return tOP_ASGN;
22683 }
22684 pushback(p, c);
22685 return tANDOP;
22686 }
22687 else if (c == '=') {
22688 set_yylval_id('&');
22689 SET_LEX_STATE(EXPR_BEG);
22690 return tOP_ASGN;
22691 }
22692 else if (c == '.') {
22693 set_yylval_id(idANDDOT);
22694 SET_LEX_STATE(EXPR_DOT);
22695 return tANDDOT;
22696 }
22697 pushback(p, c);
22698 if (IS_SPCARG(c)) {
22699 if ((c != ':') ||
22700 (c = peekc_n(p, 1)) == -1 ||
22701 !(c == '\'' || c == '"' ||
22702 is_identchar(p, (p->lex.pcur+1), p->lex.pend, p->enc))) {
22703 rb_warning0("'&' interpreted as argument prefix");
22704 }
22705 c = tAMPER;
22706 }
22707 else if (IS_BEG()) {
22708 c = tAMPER;
22709 }
22710 else {
22711 c = warn_balanced('&', "&", "argument prefix");
22712 }
22713 SET_LEX_STATE(IS_AFTER_OPERATOR() ? EXPR_ARG : EXPR_BEG);
22714 return c;
22715
22716 case '|':
22717 if ((c = nextc(p)) == '|') {
22718 SET_LEX_STATE(EXPR_BEG);
22719 if ((c = nextc(p)) == '=') {
22720 set_yylval_id(idOROP);
22721 SET_LEX_STATE(EXPR_BEG);
22722 return tOP_ASGN;
22723 }
22724 pushback(p, c);
22725 if (IS_lex_state_for(last_state, EXPR_BEG)) {
22726 c = '|';
22727 pushback(p, '|');
22728 return c;
22729 }
22730 return tOROP;
22731 }
22732 if (c == '=') {
22733 set_yylval_id('|');
22734 SET_LEX_STATE(EXPR_BEG);
22735 return tOP_ASGN;
22736 }
22737 SET_LEX_STATE(IS_AFTER_OPERATOR() ? EXPR_ARG : EXPR_BEG|EXPR_LABEL);
22738 pushback(p, c);
22739 return '|';
22740
22741 case '+':
22742 c = nextc(p);
22743 if (IS_AFTER_OPERATOR()) {
22744 SET_LEX_STATE(EXPR_ARG);
22745 if (c == '@') {
22746 return tUPLUS;
22747 }
22748 pushback(p, c);
22749 return '+';
22750 }
22751 if (c == '=') {
22752 set_yylval_id('+');
22753 SET_LEX_STATE(EXPR_BEG);
22754 return tOP_ASGN;
22755 }
22756 if (IS_BEG() || (IS_SPCARG(c) && arg_ambiguous(p, '+'))) {
22757 SET_LEX_STATE(EXPR_BEG);
22758 pushback(p, c);
22759 if (c != -1 && ISDIGIT(c)) {
22760 return parse_numeric(p, '+');
22761 }
22762 return tUPLUS;
22763 }
22764 SET_LEX_STATE(EXPR_BEG);
22765 pushback(p, c);
22766 return warn_balanced('+', "+", "unary operator");
22767
22768 case '-':
22769 c = nextc(p);
22770 if (IS_AFTER_OPERATOR()) {
22771 SET_LEX_STATE(EXPR_ARG);
22772 if (c == '@') {
22773 return tUMINUS;
22774 }
22775 pushback(p, c);
22776 return '-';
22777 }
22778 if (c == '=') {
22779 set_yylval_id('-');
22780 SET_LEX_STATE(EXPR_BEG);
22781 return tOP_ASGN;
22782 }
22783 if (c == '>') {
22784 SET_LEX_STATE(EXPR_ENDFN);
22785 yylval.num = p->lex.lpar_beg;
22786 p->lex.lpar_beg = p->lex.paren_nest;
22787 return tLAMBDA;
22788 }
22789 if (IS_BEG() || (IS_SPCARG(c) && arg_ambiguous(p, '-'))) {
22790 SET_LEX_STATE(EXPR_BEG);
22791 pushback(p, c);
22792 if (c != -1 && ISDIGIT(c)) {
22793 return tUMINUS_NUM;
22794 }
22795 return tUMINUS;
22796 }
22797 SET_LEX_STATE(EXPR_BEG);
22798 pushback(p, c);
22799 return warn_balanced('-', "-", "unary operator");
22800
22801 case '.': {
22802 int is_beg = IS_BEG();
22803 SET_LEX_STATE(EXPR_BEG);
22804 if ((c = nextc(p)) == '.') {
22805 if ((c = nextc(p)) == '.') {
22806 if (p->ctxt.in_argdef || IS_LABEL_POSSIBLE()) {
22807 SET_LEX_STATE(EXPR_ENDARG);
22808 return tBDOT3;
22809 }
22810 if (p->lex.paren_nest == 0 && looking_at_eol_p(p)) {
22811 rb_warn0("... at EOL, should be parenthesized?");
22812 }
22813 return is_beg ? tBDOT3 : tDOT3;
22814 }
22815 pushback(p, c);
22816 return is_beg ? tBDOT2 : tDOT2;
22817 }
22818 pushback(p, c);
22819 if (c != -1 && ISDIGIT(c)) {
22820 char prev = p->lex.pcur-1 > p->lex.pbeg ? *(p->lex.pcur-2) : 0;
22821 parse_numeric(p, '.');
22822 if (ISDIGIT(prev)) {
22823 yyerror0("unexpected fraction part after numeric literal");
22824 }
22825 else {
22826 yyerror0("no .<digit> floating literal anymore; put 0 before dot");
22827 }
22828 SET_LEX_STATE(EXPR_END);
22829 p->lex.ptok = p->lex.pcur;
22830 goto retry;
22831 }
22832 set_yylval_id('.');
22833 SET_LEX_STATE(EXPR_DOT);
22834 return '.';
22835 }
22836
22837 case '0': case '1': case '2': case '3': case '4':
22838 case '5': case '6': case '7': case '8': case '9':
22839 return parse_numeric(p, c);
22840
22841 case ')':
22842 COND_POP();
22843 CMDARG_POP();
22844 SET_LEX_STATE(EXPR_ENDFN);
22845 p->lex.paren_nest--;
22846 return c;
22847
22848 case ']':
22849 COND_POP();
22850 CMDARG_POP();
22851 SET_LEX_STATE(EXPR_END);
22852 p->lex.paren_nest--;
22853 return c;
22854
22855 case '}':
22856 /* tSTRING_DEND does COND_POP and CMDARG_POP in the yacc's rule */
22857 if (!p->lex.brace_nest--) return tSTRING_DEND;
22858 COND_POP();
22859 CMDARG_POP();
22860 SET_LEX_STATE(EXPR_END);
22861 p->lex.paren_nest--;
22862 return c;
22863
22864 case ':':
22865 c = nextc(p);
22866 if (c == ':') {
22867 if (IS_BEG() || IS_lex_state(EXPR_CLASS) || IS_SPCARG(-1)) {
22868 SET_LEX_STATE(EXPR_BEG);
22869 return tCOLON3;
22870 }
22871 set_yylval_id(idCOLON2);
22872 SET_LEX_STATE(EXPR_DOT);
22873 return tCOLON2;
22874 }
22875 if (IS_END() || ISSPACE(c) || c == '#') {
22876 pushback(p, c);
22877 c = warn_balanced(':', ":", "symbol literal");
22878 SET_LEX_STATE(EXPR_BEG);
22879 return c;
22880 }
22881 switch (c) {
22882 case '\'':
22883 p->lex.strterm = NEW_STRTERM(str_ssym, c, 0);
22884 break;
22885 case '"':
22886 p->lex.strterm = NEW_STRTERM(str_dsym, c, 0);
22887 break;
22888 default:
22889 pushback(p, c);
22890 break;
22891 }
22892 SET_LEX_STATE(EXPR_FNAME);
22893 return tSYMBEG;
22894
22895 case '/':
22896 if (IS_BEG()) {
22897 p->lex.strterm = NEW_STRTERM(str_regexp, '/', 0);
22898 return tREGEXP_BEG;
22899 }
22900 if ((c = nextc(p)) == '=') {
22901 set_yylval_id('/');
22902 SET_LEX_STATE(EXPR_BEG);
22903 return tOP_ASGN;
22904 }
22905 pushback(p, c);
22906 if (IS_SPCARG(c)) {
22907 arg_ambiguous(p, '/');
22908 p->lex.strterm = NEW_STRTERM(str_regexp, '/', 0);
22909 return tREGEXP_BEG;
22910 }
22911 SET_LEX_STATE(IS_AFTER_OPERATOR() ? EXPR_ARG : EXPR_BEG);
22912 return warn_balanced('/', "/", "regexp literal");
22913
22914 case '^':
22915 if ((c = nextc(p)) == '=') {
22916 set_yylval_id('^');
22917 SET_LEX_STATE(EXPR_BEG);
22918 return tOP_ASGN;
22919 }
22920 SET_LEX_STATE(IS_AFTER_OPERATOR() ? EXPR_ARG : EXPR_BEG);
22921 pushback(p, c);
22922 return '^';
22923
22924 case ';':
22925 SET_LEX_STATE(EXPR_BEG);
22926 p->command_start = TRUE;
22927 return ';';
22928
22929 case ',':
22930 SET_LEX_STATE(EXPR_BEG|EXPR_LABEL);
22931 return ',';
22932
22933 case '~':
22934 if (IS_AFTER_OPERATOR()) {
22935 if ((c = nextc(p)) != '@') {
22936 pushback(p, c);
22937 }
22938 SET_LEX_STATE(EXPR_ARG);
22939 }
22940 else {
22941 SET_LEX_STATE(EXPR_BEG);
22942 }
22943 return '~';
22944
22945 case '(':
22946 if (IS_BEG()) {
22947 c = tLPAREN;
22948 }
22949 else if (!space_seen) {
22950 /* foo( ... ) => method call, no ambiguity */
22951 }
22952 else if (IS_ARG() || IS_lex_state_all(EXPR_END|EXPR_LABEL)) {
22953 c = tLPAREN_ARG;
22954 }
22955 else if (IS_lex_state(EXPR_ENDFN) && !lambda_beginning_p()) {
22956 rb_warning0("parentheses after method name is interpreted as "
22957 "an argument list, not a decomposed argument");
22958 }
22959 p->lex.paren_nest++;
22960 COND_PUSH(0);
22961 CMDARG_PUSH(0);
22962 SET_LEX_STATE(EXPR_BEG|EXPR_LABEL);
22963 return c;
22964
22965 case '[':
22966 p->lex.paren_nest++;
22967 if (IS_AFTER_OPERATOR()) {
22968 if ((c = nextc(p)) == ']') {
22969 p->lex.paren_nest--;
22970 SET_LEX_STATE(EXPR_ARG);
22971 if ((c = nextc(p)) == '=') {
22972 return tASET;
22973 }
22974 pushback(p, c);
22975 return tAREF;
22976 }
22977 pushback(p, c);
22978 SET_LEX_STATE(EXPR_ARG|EXPR_LABEL);
22979 return '[';
22980 }
22981 else if (IS_BEG()) {
22982 c = tLBRACK;
22983 }
22984 else if (IS_ARG() && (space_seen || IS_lex_state(EXPR_LABELED))) {
22985 c = tLBRACK;
22986 }
22987 SET_LEX_STATE(EXPR_BEG|EXPR_LABEL);
22988 COND_PUSH(0);
22989 CMDARG_PUSH(0);
22990 return c;
22991
22992 case '{':
22993 ++p->lex.brace_nest;
22994 if (lambda_beginning_p())
22995 c = tLAMBEG;
22996 else if (IS_lex_state(EXPR_LABELED))
22997 c = tLBRACE; /* hash */
22998 else if (IS_lex_state(EXPR_ARG_ANY | EXPR_END | EXPR_ENDFN))
22999 c = '{'; /* block (primary) */
23000 else if (IS_lex_state(EXPR_ENDARG))
23001 c = tLBRACE_ARG; /* block (expr) */
23002 else
23003 c = tLBRACE; /* hash */
23004 if (c != tLBRACE) {
23005 p->command_start = TRUE;
23006 SET_LEX_STATE(EXPR_BEG);
23007 }
23008 else {
23009 SET_LEX_STATE(EXPR_BEG|EXPR_LABEL);
23010 }
23011 ++p->lex.paren_nest; /* after lambda_beginning_p() */
23012 COND_PUSH(0);
23013 CMDARG_PUSH(0);
23014 return c;
23015
23016 case '\\':
23017 c = nextc(p);
23018 if (c == '\n') {
23019 space_seen = 1;
23020 dispatch_scan_event(p, tSP);
23021 goto retry; /* skip \\n */
23022 }
23023 if (c == ' ') return tSP;
23024 if (ISSPACE(c)) return c;
23025 pushback(p, c);
23026 return '\\';
23027
23028 case '%':
23029 return parse_percent(p, space_seen, last_state);
23030
23031 case '$':
23032 return parse_gvar(p, last_state);
23033
23034 case '@':
23035 return parse_atmark(p, last_state);
23036
23037 case '_':
23038 if (was_bol(p) && whole_match_p(p, "__END__", 7, 0)) {
23039 p->ruby__end__seen = 1;
23040 p->eofp = 1;
23041#ifdef RIPPER
23042 lex_goto_eol(p);
23043 dispatch_scan_event(p, k__END__);
23044#endif
23045 return END_OF_INPUT;
23046 }
23047 newtok(p);
23048 break;
23049
23050 default:
23051 if (!parser_is_identchar(p)) {
23052 compile_error(p, "Invalid char '\\x%02X' in expression", c);
23053 token_flush(p);
23054 goto retry;
23055 }
23056
23057 newtok(p);
23058 break;
23059 }
23060
23061 return parse_ident(p, c, cmd_state);
23062}
23063
23064static enum yytokentype
23065yylex(YYSTYPE *lval, YYLTYPE *yylloc, struct parser_params *p)
23066{
23067 enum yytokentype t;
23068
23069 p->lval = lval;
23070 lval->node = 0;
23071 p->yylloc = yylloc;
23072
23073 t = parser_yylex(p);
23074
23075 if (has_delayed_token(p))
23076 dispatch_delayed_token(p, t);
23077 else if (t != END_OF_INPUT)
23078 dispatch_scan_event(p, t);
23079
23080 return t;
23081}
23082
23083#define LVAR_USED ((ID)1 << (sizeof(ID) * CHAR_BIT - 1))
23084
23085static NODE*
23086node_new_internal(struct parser_params *p, enum node_type type, size_t size, size_t alignment)
23087{
23088 NODE *n = rb_ast_newnode(p->ast, type, size, alignment);
23089
23090 rb_node_init(n, type);
23091 return n;
23092}
23093
23094static NODE *
23095nd_set_loc(NODE *nd, const YYLTYPE *loc)
23096{
23097 nd->nd_loc = *loc;
23098 nd_set_line(nd, loc->beg_pos.lineno);
23099 return nd;
23100}
23101
23102static NODE*
23103node_newnode(struct parser_params *p, enum node_type type, size_t size, size_t alignment, const rb_code_location_t *loc)
23104{
23105 NODE *n = node_new_internal(p, type, size, alignment);
23106
23107 nd_set_loc(n, loc);
23108 nd_set_node_id(n, parser_get_node_id(p));
23109 return n;
23110}
23111
23112#define NODE_NEWNODE(node_type, type, loc) (type *)(node_newnode(p, node_type, sizeof(type), RUBY_ALIGNOF(type), loc))
23113
23114static rb_node_scope_t *
23115rb_node_scope_new(struct parser_params *p, rb_node_args_t *nd_args, NODE *nd_body, NODE *nd_parent, const YYLTYPE *loc)
23116{
23117 rb_ast_id_table_t *nd_tbl;
23118 nd_tbl = local_tbl(p);
23119 rb_node_scope_t *n = NODE_NEWNODE(NODE_SCOPE, rb_node_scope_t, loc);
23120 n->nd_tbl = nd_tbl;
23121 n->nd_body = nd_body;
23122 n->nd_parent = nd_parent;
23123 n->nd_args = nd_args;
23124
23125 return n;
23126}
23127
23128static rb_node_scope_t *
23129rb_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)
23130{
23131 rb_node_scope_t *n = NODE_NEWNODE(NODE_SCOPE, rb_node_scope_t, loc);
23132 n->nd_tbl = nd_tbl;
23133 n->nd_body = nd_body;
23134 n->nd_parent = nd_parent;
23135 n->nd_args = nd_args;
23136
23137 return n;
23138}
23139
23140static rb_node_defn_t *
23141rb_node_defn_new(struct parser_params *p, ID nd_mid, NODE *nd_defn, const YYLTYPE *loc)
23142{
23143 rb_node_defn_t *n = NODE_NEWNODE(NODE_DEFN, rb_node_defn_t, loc);
23144 n->nd_mid = nd_mid;
23145 n->nd_defn = nd_defn;
23146
23147 return n;
23148}
23149
23150static rb_node_defs_t *
23151rb_node_defs_new(struct parser_params *p, NODE *nd_recv, ID nd_mid, NODE *nd_defn, const YYLTYPE *loc)
23152{
23153 rb_node_defs_t *n = NODE_NEWNODE(NODE_DEFS, rb_node_defs_t, loc);
23154 n->nd_recv = nd_recv;
23155 n->nd_mid = nd_mid;
23156 n->nd_defn = nd_defn;
23157
23158 return n;
23159}
23160
23161static rb_node_block_t *
23162rb_node_block_new(struct parser_params *p, NODE *nd_head, const YYLTYPE *loc)
23163{
23164 rb_node_block_t *n = NODE_NEWNODE(NODE_BLOCK, rb_node_block_t, loc);
23165 n->nd_head = nd_head;
23166 n->nd_end = (NODE *)n;
23167 n->nd_next = 0;
23168
23169 return n;
23170}
23171
23172static rb_node_for_t *
23173rb_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)
23174{
23175 rb_node_for_t *n = NODE_NEWNODE(NODE_FOR, rb_node_for_t, loc);
23176 n->nd_body = nd_body;
23177 n->nd_iter = nd_iter;
23178 n->for_keyword_loc = *for_keyword_loc;
23179 n->in_keyword_loc = *in_keyword_loc;
23180 n->do_keyword_loc = *do_keyword_loc;
23181 n->end_keyword_loc = *end_keyword_loc;
23182
23183 return n;
23184}
23185
23186static rb_node_for_masgn_t *
23187rb_node_for_masgn_new(struct parser_params *p, NODE *nd_var, const YYLTYPE *loc)
23188{
23189 rb_node_for_masgn_t *n = NODE_NEWNODE(NODE_FOR_MASGN, rb_node_for_masgn_t, loc);
23190 n->nd_var = nd_var;
23191
23192 return n;
23193}
23194
23195static rb_node_retry_t *
23196rb_node_retry_new(struct parser_params *p, const YYLTYPE *loc)
23197{
23198 rb_node_retry_t *n = NODE_NEWNODE(NODE_RETRY, rb_node_retry_t, loc);
23199
23200 return n;
23201}
23202
23203static rb_node_begin_t *
23204rb_node_begin_new(struct parser_params *p, NODE *nd_body, const YYLTYPE *loc)
23205{
23206 rb_node_begin_t *n = NODE_NEWNODE(NODE_BEGIN, rb_node_begin_t, loc);
23207 n->nd_body = nd_body;
23208
23209 return n;
23210}
23211
23212static rb_node_rescue_t *
23213rb_node_rescue_new(struct parser_params *p, NODE *nd_head, NODE *nd_resq, NODE *nd_else, const YYLTYPE *loc)
23214{
23215 rb_node_rescue_t *n = NODE_NEWNODE(NODE_RESCUE, rb_node_rescue_t, loc);
23216 n->nd_head = nd_head;
23217 n->nd_resq = nd_resq;
23218 n->nd_else = nd_else;
23219
23220 return n;
23221}
23222
23223static rb_node_resbody_t *
23224rb_node_resbody_new(struct parser_params *p, NODE *nd_args, NODE *nd_exc_var, NODE *nd_body, NODE *nd_next, const YYLTYPE *loc)
23225{
23226 rb_node_resbody_t *n = NODE_NEWNODE(NODE_RESBODY, rb_node_resbody_t, loc);
23227 n->nd_args = nd_args;
23228 n->nd_exc_var = nd_exc_var;
23229 n->nd_body = nd_body;
23230 n->nd_next = nd_next;
23231
23232 return n;
23233}
23234
23235static rb_node_ensure_t *
23236rb_node_ensure_new(struct parser_params *p, NODE *nd_head, NODE *nd_ensr, const YYLTYPE *loc)
23237{
23238 rb_node_ensure_t *n = NODE_NEWNODE(NODE_ENSURE, rb_node_ensure_t, loc);
23239 n->nd_head = nd_head;
23240 n->nd_ensr = nd_ensr;
23241
23242 return n;
23243}
23244
23245static rb_node_and_t *
23246rb_node_and_new(struct parser_params *p, NODE *nd_1st, NODE *nd_2nd, const YYLTYPE *loc, const YYLTYPE *operator_loc)
23247{
23248 rb_node_and_t *n = NODE_NEWNODE(NODE_AND, rb_node_and_t, loc);
23249 n->nd_1st = nd_1st;
23250 n->nd_2nd = nd_2nd;
23251 n->operator_loc = *operator_loc;
23252
23253 return n;
23254}
23255
23256static rb_node_or_t *
23257rb_node_or_new(struct parser_params *p, NODE *nd_1st, NODE *nd_2nd, const YYLTYPE *loc, const YYLTYPE *operator_loc)
23258{
23259 rb_node_or_t *n = NODE_NEWNODE(NODE_OR, rb_node_or_t, loc);
23260 n->nd_1st = nd_1st;
23261 n->nd_2nd = nd_2nd;
23262 n->operator_loc = *operator_loc;
23263
23264 return n;
23265}
23266
23267static rb_node_return_t *
23268rb_node_return_new(struct parser_params *p, NODE *nd_stts, const YYLTYPE *loc, const YYLTYPE *keyword_loc)
23269{
23270 rb_node_return_t *n = NODE_NEWNODE(NODE_RETURN, rb_node_return_t, loc);
23271 n->nd_stts = nd_stts;
23272 n->keyword_loc = *keyword_loc;
23273 return n;
23274}
23275
23276static rb_node_yield_t *
23277rb_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)
23278{
23279 if (nd_head) no_blockarg(p, nd_head);
23280
23281 rb_node_yield_t *n = NODE_NEWNODE(NODE_YIELD, rb_node_yield_t, loc);
23282 n->nd_head = nd_head;
23283 n->keyword_loc = *keyword_loc;
23284 n->lparen_loc = *lparen_loc;
23285 n->rparen_loc = *rparen_loc;
23286
23287 return n;
23288}
23289
23290static rb_node_if_t *
23291rb_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)
23292{
23293 rb_node_if_t *n = NODE_NEWNODE(NODE_IF, rb_node_if_t, loc);
23294 n->nd_cond = nd_cond;
23295 n->nd_body = nd_body;
23296 n->nd_else = nd_else;
23297 n->if_keyword_loc = *if_keyword_loc;
23298 n->then_keyword_loc = *then_keyword_loc;
23299 n->end_keyword_loc = *end_keyword_loc;
23300
23301 return n;
23302}
23303
23304static rb_node_unless_t *
23305rb_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)
23306{
23307 rb_node_unless_t *n = NODE_NEWNODE(NODE_UNLESS, rb_node_unless_t, loc);
23308 n->nd_cond = nd_cond;
23309 n->nd_body = nd_body;
23310 n->nd_else = nd_else;
23311 n->keyword_loc = *keyword_loc;
23312 n->then_keyword_loc = *then_keyword_loc;
23313 n->end_keyword_loc = *end_keyword_loc;
23314
23315 return n;
23316}
23317
23318static rb_node_class_t *
23319rb_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)
23320{
23321 /* Keep the order of node creation */
23322 NODE *scope = NEW_SCOPE(0, nd_body, NULL, loc);
23323 rb_node_class_t *n = NODE_NEWNODE(NODE_CLASS, rb_node_class_t, loc);
23324 RNODE_SCOPE(scope)->nd_parent = &n->node;
23325 n->nd_cpath = nd_cpath;
23326 n->nd_body = scope;
23327 n->nd_super = nd_super;
23328 n->class_keyword_loc = *class_keyword_loc;
23329 n->inheritance_operator_loc = *inheritance_operator_loc;
23330 n->end_keyword_loc = *end_keyword_loc;
23331
23332 return n;
23333}
23334
23335static rb_node_sclass_t *
23336rb_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)
23337{
23338 /* Keep the order of node creation */
23339 NODE *scope = NEW_SCOPE(0, nd_body, NULL, loc);
23340 rb_node_sclass_t *n = NODE_NEWNODE(NODE_SCLASS, rb_node_sclass_t, loc);
23341 RNODE_SCOPE(scope)->nd_parent = &n->node;
23342 n->nd_recv = nd_recv;
23343 n->nd_body = scope;
23344 n->class_keyword_loc = *class_keyword_loc;
23345 n->operator_loc = *operator_loc;
23346 n->end_keyword_loc = *end_keyword_loc;
23347
23348 return n;
23349}
23350
23351static rb_node_module_t *
23352rb_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)
23353{
23354 /* Keep the order of node creation */
23355 NODE *scope = NEW_SCOPE(0, nd_body, NULL, loc);
23356 rb_node_module_t *n = NODE_NEWNODE(NODE_MODULE, rb_node_module_t, loc);
23357 RNODE_SCOPE(scope)->nd_parent = &n->node;
23358 n->nd_cpath = nd_cpath;
23359 n->nd_body = scope;
23360 n->module_keyword_loc = *module_keyword_loc;
23361 n->end_keyword_loc = *end_keyword_loc;
23362
23363 return n;
23364}
23365
23366static rb_node_iter_t *
23367rb_node_iter_new(struct parser_params *p, rb_node_args_t *nd_args, NODE *nd_body, const YYLTYPE *loc)
23368{
23369 /* Keep the order of node creation */
23370 NODE *scope = NEW_SCOPE(nd_args, nd_body, NULL, loc);
23371 rb_node_iter_t *n = NODE_NEWNODE(NODE_ITER, rb_node_iter_t, loc);
23372 RNODE_SCOPE(scope)->nd_parent = &n->node;
23373 n->nd_body = scope;
23374 n->nd_iter = 0;
23375
23376 return n;
23377}
23378
23379static rb_node_lambda_t *
23380rb_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)
23381{
23382 /* Keep the order of node creation */
23383 NODE *scope = NEW_SCOPE(nd_args, nd_body, NULL, loc);
23384 YYLTYPE lambda_loc = code_loc_gen(operator_loc, closing_loc);
23385 rb_node_lambda_t *n = NODE_NEWNODE(NODE_LAMBDA, rb_node_lambda_t, &lambda_loc);
23386 RNODE_SCOPE(scope)->nd_parent = &n->node;
23387 n->nd_body = scope;
23388 n->operator_loc = *operator_loc;
23389 n->opening_loc = *opening_loc;
23390 n->closing_loc = *closing_loc;
23391
23392 return n;
23393}
23394
23395static rb_node_case_t *
23396rb_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)
23397{
23398 rb_node_case_t *n = NODE_NEWNODE(NODE_CASE, rb_node_case_t, loc);
23399 n->nd_head = nd_head;
23400 n->nd_body = nd_body;
23401 n->case_keyword_loc = *case_keyword_loc;
23402 n->end_keyword_loc = *end_keyword_loc;
23403
23404 return n;
23405}
23406
23407static rb_node_case2_t *
23408rb_node_case2_new(struct parser_params *p, NODE *nd_body, const YYLTYPE *loc, const YYLTYPE *case_keyword_loc, const YYLTYPE *end_keyword_loc)
23409{
23410 rb_node_case2_t *n = NODE_NEWNODE(NODE_CASE2, rb_node_case2_t, loc);
23411 n->nd_head = 0;
23412 n->nd_body = nd_body;
23413 n->case_keyword_loc = *case_keyword_loc;
23414 n->end_keyword_loc = *end_keyword_loc;
23415
23416 return n;
23417}
23418
23419static rb_node_case3_t *
23420rb_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)
23421{
23422 rb_node_case3_t *n = NODE_NEWNODE(NODE_CASE3, rb_node_case3_t, loc);
23423 n->nd_head = nd_head;
23424 n->nd_body = nd_body;
23425 n->case_keyword_loc = *case_keyword_loc;
23426 n->end_keyword_loc = *end_keyword_loc;
23427
23428 return n;
23429}
23430
23431static rb_node_when_t *
23432rb_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)
23433{
23434 rb_node_when_t *n = NODE_NEWNODE(NODE_WHEN, rb_node_when_t, loc);
23435 n->nd_head = nd_head;
23436 n->nd_body = nd_body;
23437 n->nd_next = nd_next;
23438 n->keyword_loc = *keyword_loc;
23439 n->then_keyword_loc = *then_keyword_loc;
23440
23441 return n;
23442}
23443
23444static rb_node_in_t *
23445rb_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)
23446{
23447 rb_node_in_t *n = NODE_NEWNODE(NODE_IN, rb_node_in_t, loc);
23448 n->nd_head = nd_head;
23449 n->nd_body = nd_body;
23450 n->nd_next = nd_next;
23451 n->in_keyword_loc = *in_keyword_loc;
23452 n->then_keyword_loc = *then_keyword_loc;
23453 n->operator_loc = *operator_loc;
23454
23455 return n;
23456}
23457
23458static rb_node_while_t *
23459rb_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)
23460{
23461 rb_node_while_t *n = NODE_NEWNODE(NODE_WHILE, rb_node_while_t, loc);
23462 n->nd_cond = nd_cond;
23463 n->nd_body = nd_body;
23464 n->nd_state = nd_state;
23465 n->keyword_loc = *keyword_loc;
23466 n->closing_loc = *closing_loc;
23467
23468 return n;
23469}
23470
23471static rb_node_until_t *
23472rb_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)
23473{
23474 rb_node_until_t *n = NODE_NEWNODE(NODE_UNTIL, rb_node_until_t, loc);
23475 n->nd_cond = nd_cond;
23476 n->nd_body = nd_body;
23477 n->nd_state = nd_state;
23478 n->keyword_loc = *keyword_loc;
23479 n->closing_loc = *closing_loc;
23480
23481 return n;
23482}
23483
23484static rb_node_colon2_t *
23485rb_node_colon2_new(struct parser_params *p, NODE *nd_head, ID nd_mid, const YYLTYPE *loc, const YYLTYPE *delimiter_loc, const YYLTYPE *name_loc)
23486{
23487 rb_node_colon2_t *n = NODE_NEWNODE(NODE_COLON2, rb_node_colon2_t, loc);
23488 n->nd_head = nd_head;
23489 n->nd_mid = nd_mid;
23490 n->delimiter_loc = *delimiter_loc;
23491 n->name_loc = *name_loc;
23492
23493 return n;
23494}
23495
23496static rb_node_colon3_t *
23497rb_node_colon3_new(struct parser_params *p, ID nd_mid, const YYLTYPE *loc, const YYLTYPE *delimiter_loc, const YYLTYPE *name_loc)
23498{
23499 rb_node_colon3_t *n = NODE_NEWNODE(NODE_COLON3, rb_node_colon3_t, loc);
23500 n->nd_mid = nd_mid;
23501 n->delimiter_loc = *delimiter_loc;
23502 n->name_loc = *name_loc;
23503
23504 return n;
23505}
23506
23507static rb_node_dot2_t *
23508rb_node_dot2_new(struct parser_params *p, NODE *nd_beg, NODE *nd_end, const YYLTYPE *loc, const YYLTYPE *operator_loc)
23509{
23510 rb_node_dot2_t *n = NODE_NEWNODE(NODE_DOT2, rb_node_dot2_t, loc);
23511 n->nd_beg = nd_beg;
23512 n->nd_end = nd_end;
23513 n->operator_loc = *operator_loc;
23514
23515 return n;
23516}
23517
23518static rb_node_dot3_t *
23519rb_node_dot3_new(struct parser_params *p, NODE *nd_beg, NODE *nd_end, const YYLTYPE *loc, const YYLTYPE *operator_loc)
23520{
23521 rb_node_dot3_t *n = NODE_NEWNODE(NODE_DOT3, rb_node_dot3_t, loc);
23522 n->nd_beg = nd_beg;
23523 n->nd_end = nd_end;
23524 n->operator_loc = *operator_loc;
23525
23526 return n;
23527}
23528
23529static rb_node_self_t *
23530rb_node_self_new(struct parser_params *p, const YYLTYPE *loc)
23531{
23532 rb_node_self_t *n = NODE_NEWNODE(NODE_SELF, rb_node_self_t, loc);
23533 n->nd_state = 1;
23534
23535 return n;
23536}
23537
23538static rb_node_nil_t *
23539rb_node_nil_new(struct parser_params *p, const YYLTYPE *loc)
23540{
23541 rb_node_nil_t *n = NODE_NEWNODE(NODE_NIL, rb_node_nil_t, loc);
23542
23543 return n;
23544}
23545
23546static rb_node_true_t *
23547rb_node_true_new(struct parser_params *p, const YYLTYPE *loc)
23548{
23549 rb_node_true_t *n = NODE_NEWNODE(NODE_TRUE, rb_node_true_t, loc);
23550
23551 return n;
23552}
23553
23554static rb_node_false_t *
23555rb_node_false_new(struct parser_params *p, const YYLTYPE *loc)
23556{
23557 rb_node_false_t *n = NODE_NEWNODE(NODE_FALSE, rb_node_false_t, loc);
23558
23559 return n;
23560}
23561
23562static rb_node_super_t *
23563rb_node_super_new(struct parser_params *p, NODE *nd_args, const YYLTYPE *loc,
23564 const YYLTYPE *keyword_loc, const YYLTYPE *lparen_loc, const YYLTYPE *rparen_loc)
23565{
23566 rb_node_super_t *n = NODE_NEWNODE(NODE_SUPER, rb_node_super_t, loc);
23567 n->nd_args = nd_args;
23568 n->keyword_loc = *keyword_loc;
23569 n->lparen_loc = *lparen_loc;
23570 n->rparen_loc = *rparen_loc;
23571
23572 return n;
23573}
23574
23575static rb_node_zsuper_t *
23576rb_node_zsuper_new(struct parser_params *p, const YYLTYPE *loc)
23577{
23578 rb_node_zsuper_t *n = NODE_NEWNODE(NODE_ZSUPER, rb_node_zsuper_t, loc);
23579
23580 return n;
23581}
23582
23583static rb_node_match2_t *
23584rb_node_match2_new(struct parser_params *p, NODE *nd_recv, NODE *nd_value, const YYLTYPE *loc)
23585{
23586 rb_node_match2_t *n = NODE_NEWNODE(NODE_MATCH2, rb_node_match2_t, loc);
23587 n->nd_recv = nd_recv;
23588 n->nd_value = nd_value;
23589 n->nd_args = 0;
23590
23591 return n;
23592}
23593
23594static rb_node_match3_t *
23595rb_node_match3_new(struct parser_params *p, NODE *nd_recv, NODE *nd_value, const YYLTYPE *loc)
23596{
23597 rb_node_match3_t *n = NODE_NEWNODE(NODE_MATCH3, rb_node_match3_t, loc);
23598 n->nd_recv = nd_recv;
23599 n->nd_value = nd_value;
23600
23601 return n;
23602}
23603
23604static rb_node_list_t *
23605rb_node_list_new(struct parser_params *p, NODE *nd_head, const YYLTYPE *loc)
23606{
23607 return rb_node_list_new2(p, nd_head, 1, 0, loc);
23608}
23609
23610static rb_node_list_t *
23611rb_node_list_new2(struct parser_params *p, NODE *nd_head, long nd_alen, NODE *nd_next, const YYLTYPE *loc)
23612{
23613 rb_node_list_t *n = NODE_NEWNODE(NODE_LIST, rb_node_list_t, loc);
23614 n->nd_head = nd_head;
23615 n->as.nd_alen = nd_alen;
23616 n->nd_next = nd_next;
23617
23618 return n;
23619}
23620
23621static rb_node_zlist_t *
23622rb_node_zlist_new(struct parser_params *p, const YYLTYPE *loc)
23623{
23624 rb_node_zlist_t *n = NODE_NEWNODE(NODE_ZLIST, rb_node_zlist_t, loc);
23625
23626 return n;
23627}
23628
23629static rb_node_hash_t *
23630rb_node_hash_new(struct parser_params *p, NODE *nd_head, const YYLTYPE *loc)
23631{
23632 rb_node_hash_t *n = NODE_NEWNODE(NODE_HASH, rb_node_hash_t, loc);
23633 n->nd_head = nd_head;
23634 n->nd_brace = 0;
23635
23636 return n;
23637}
23638
23639static rb_node_masgn_t *
23640rb_node_masgn_new(struct parser_params *p, NODE *nd_head, NODE *nd_args, const YYLTYPE *loc)
23641{
23642 rb_node_masgn_t *n = NODE_NEWNODE(NODE_MASGN, rb_node_masgn_t, loc);
23643 n->nd_head = nd_head;
23644 n->nd_value = 0;
23645 n->nd_args = nd_args;
23646
23647 return n;
23648}
23649
23650static rb_node_gasgn_t *
23651rb_node_gasgn_new(struct parser_params *p, ID nd_vid, NODE *nd_value, const YYLTYPE *loc)
23652{
23653 rb_node_gasgn_t *n = NODE_NEWNODE(NODE_GASGN, rb_node_gasgn_t, loc);
23654 n->nd_vid = nd_vid;
23655 n->nd_value = nd_value;
23656
23657 return n;
23658}
23659
23660static rb_node_lasgn_t *
23661rb_node_lasgn_new(struct parser_params *p, ID nd_vid, NODE *nd_value, const YYLTYPE *loc)
23662{
23663 rb_node_lasgn_t *n = NODE_NEWNODE(NODE_LASGN, rb_node_lasgn_t, loc);
23664 n->nd_vid = nd_vid;
23665 n->nd_value = nd_value;
23666
23667 return n;
23668}
23669
23670static rb_node_dasgn_t *
23671rb_node_dasgn_new(struct parser_params *p, ID nd_vid, NODE *nd_value, const YYLTYPE *loc)
23672{
23673 rb_node_dasgn_t *n = NODE_NEWNODE(NODE_DASGN, rb_node_dasgn_t, loc);
23674 n->nd_vid = nd_vid;
23675 n->nd_value = nd_value;
23676
23677 return n;
23678}
23679
23680static rb_node_iasgn_t *
23681rb_node_iasgn_new(struct parser_params *p, ID nd_vid, NODE *nd_value, const YYLTYPE *loc)
23682{
23683 rb_node_iasgn_t *n = NODE_NEWNODE(NODE_IASGN, rb_node_iasgn_t, loc);
23684 n->nd_vid = nd_vid;
23685 n->nd_value = nd_value;
23686
23687 return n;
23688}
23689
23690static rb_node_cvasgn_t *
23691rb_node_cvasgn_new(struct parser_params *p, ID nd_vid, NODE *nd_value, const YYLTYPE *loc)
23692{
23693 rb_node_cvasgn_t *n = NODE_NEWNODE(NODE_CVASGN, rb_node_cvasgn_t, loc);
23694 n->nd_vid = nd_vid;
23695 n->nd_value = nd_value;
23696
23697 return n;
23698}
23699
23700static rb_node_op_asgn1_t *
23701rb_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)
23702{
23703 rb_node_op_asgn1_t *n = NODE_NEWNODE(NODE_OP_ASGN1, rb_node_op_asgn1_t, loc);
23704 n->nd_recv = nd_recv;
23705 n->nd_mid = nd_mid;
23706 n->nd_index = index;
23707 n->nd_rvalue = rvalue;
23708 n->call_operator_loc = *call_operator_loc;
23709 n->opening_loc = *opening_loc;
23710 n->closing_loc = *closing_loc;
23711 n->binary_operator_loc = *binary_operator_loc;
23712
23713 return n;
23714}
23715
23716static rb_node_op_asgn2_t *
23717rb_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)
23718{
23719 rb_node_op_asgn2_t *n = NODE_NEWNODE(NODE_OP_ASGN2, rb_node_op_asgn2_t, loc);
23720 n->nd_recv = nd_recv;
23721 n->nd_value = nd_value;
23722 n->nd_vid = nd_vid;
23723 n->nd_mid = nd_mid;
23724 n->nd_aid = nd_aid;
23725 n->call_operator_loc = *call_operator_loc;
23726 n->message_loc = *message_loc;
23727 n->binary_operator_loc = *binary_operator_loc;
23728
23729 return n;
23730}
23731
23732static rb_node_op_asgn_or_t *
23733rb_node_op_asgn_or_new(struct parser_params *p, NODE *nd_head, NODE *nd_value, const YYLTYPE *loc)
23734{
23735 rb_node_op_asgn_or_t *n = NODE_NEWNODE(NODE_OP_ASGN_OR, rb_node_op_asgn_or_t, loc);
23736 n->nd_head = nd_head;
23737 n->nd_value = nd_value;
23738
23739 return n;
23740}
23741
23742static rb_node_op_asgn_and_t *
23743rb_node_op_asgn_and_new(struct parser_params *p, NODE *nd_head, NODE *nd_value, const YYLTYPE *loc)
23744{
23745 rb_node_op_asgn_and_t *n = NODE_NEWNODE(NODE_OP_ASGN_AND, rb_node_op_asgn_and_t, loc);
23746 n->nd_head = nd_head;
23747 n->nd_value = nd_value;
23748
23749 return n;
23750}
23751
23752static rb_node_gvar_t *
23753rb_node_gvar_new(struct parser_params *p, ID nd_vid, const YYLTYPE *loc)
23754{
23755 rb_node_gvar_t *n = NODE_NEWNODE(NODE_GVAR, rb_node_gvar_t, loc);
23756 n->nd_vid = nd_vid;
23757
23758 return n;
23759}
23760
23761static rb_node_lvar_t *
23762rb_node_lvar_new(struct parser_params *p, ID nd_vid, const YYLTYPE *loc)
23763{
23764 rb_node_lvar_t *n = NODE_NEWNODE(NODE_LVAR, rb_node_lvar_t, loc);
23765 n->nd_vid = nd_vid;
23766
23767 return n;
23768}
23769
23770static rb_node_dvar_t *
23771rb_node_dvar_new(struct parser_params *p, ID nd_vid, const YYLTYPE *loc)
23772{
23773 rb_node_dvar_t *n = NODE_NEWNODE(NODE_DVAR, rb_node_dvar_t, loc);
23774 n->nd_vid = nd_vid;
23775
23776 return n;
23777}
23778
23779static rb_node_ivar_t *
23780rb_node_ivar_new(struct parser_params *p, ID nd_vid, const YYLTYPE *loc)
23781{
23782 rb_node_ivar_t *n = NODE_NEWNODE(NODE_IVAR, rb_node_ivar_t, loc);
23783 n->nd_vid = nd_vid;
23784
23785 return n;
23786}
23787
23788static rb_node_const_t *
23789rb_node_const_new(struct parser_params *p, ID nd_vid, const YYLTYPE *loc)
23790{
23791 rb_node_const_t *n = NODE_NEWNODE(NODE_CONST, rb_node_const_t, loc);
23792 n->nd_vid = nd_vid;
23793
23794 return n;
23795}
23796
23797static rb_node_cvar_t *
23798rb_node_cvar_new(struct parser_params *p, ID nd_vid, const YYLTYPE *loc)
23799{
23800 rb_node_cvar_t *n = NODE_NEWNODE(NODE_CVAR, rb_node_cvar_t, loc);
23801 n->nd_vid = nd_vid;
23802
23803 return n;
23804}
23805
23806static rb_node_nth_ref_t *
23807rb_node_nth_ref_new(struct parser_params *p, long nd_nth, const YYLTYPE *loc)
23808{
23809 rb_node_nth_ref_t *n = NODE_NEWNODE(NODE_NTH_REF, rb_node_nth_ref_t, loc);
23810 n->nd_nth = nd_nth;
23811
23812 return n;
23813}
23814
23815static rb_node_back_ref_t *
23816rb_node_back_ref_new(struct parser_params *p, long nd_nth, const YYLTYPE *loc)
23817{
23818 rb_node_back_ref_t *n = NODE_NEWNODE(NODE_BACK_REF, rb_node_back_ref_t, loc);
23819 n->nd_nth = nd_nth;
23820
23821 return n;
23822}
23823
23824static rb_node_integer_t *
23825rb_node_integer_new(struct parser_params *p, char* val, int base, const YYLTYPE *loc)
23826{
23827 rb_node_integer_t *n = NODE_NEWNODE(NODE_INTEGER, rb_node_integer_t, loc);
23828 n->val = val;
23829 n->minus = FALSE;
23830 n->base = base;
23831
23832 return n;
23833}
23834
23835static rb_node_float_t *
23836rb_node_float_new(struct parser_params *p, char* val, const YYLTYPE *loc)
23837{
23838 rb_node_float_t *n = NODE_NEWNODE(NODE_FLOAT, rb_node_float_t, loc);
23839 n->val = val;
23840 n->minus = FALSE;
23841
23842 return n;
23843}
23844
23845static rb_node_rational_t *
23846rb_node_rational_new(struct parser_params *p, char* val, int base, int seen_point, const YYLTYPE *loc)
23847{
23848 rb_node_rational_t *n = NODE_NEWNODE(NODE_RATIONAL, rb_node_rational_t, loc);
23849 n->val = val;
23850 n->minus = FALSE;
23851 n->base = base;
23852 n->seen_point = seen_point;
23853
23854 return n;
23855}
23856
23857static rb_node_imaginary_t *
23858rb_node_imaginary_new(struct parser_params *p, char* val, int base, int seen_point, enum rb_numeric_type numeric_type, const YYLTYPE *loc)
23859{
23860 rb_node_imaginary_t *n = NODE_NEWNODE(NODE_IMAGINARY, rb_node_imaginary_t, loc);
23861 n->val = val;
23862 n->minus = FALSE;
23863 n->base = base;
23864 n->seen_point = seen_point;
23865 n->type = numeric_type;
23866
23867 return n;
23868}
23869
23870static rb_node_str_t *
23871rb_node_str_new(struct parser_params *p, rb_parser_string_t *string, const YYLTYPE *loc)
23872{
23873 rb_node_str_t *n = NODE_NEWNODE(NODE_STR, rb_node_str_t, loc);
23874 n->string = string;
23875
23876 return n;
23877}
23878
23879/* TODO; Use union for NODE_DSTR2 */
23880static rb_node_dstr_t *
23881rb_node_dstr_new0(struct parser_params *p, rb_parser_string_t *string, long nd_alen, NODE *nd_next, const YYLTYPE *loc)
23882{
23883 rb_node_dstr_t *n = NODE_NEWNODE(NODE_DSTR, rb_node_dstr_t, loc);
23884 n->string = string;
23885 n->as.nd_alen = nd_alen;
23886 n->nd_next = (rb_node_list_t *)nd_next;
23887
23888 return n;
23889}
23890
23891static rb_node_dstr_t *
23892rb_node_dstr_new(struct parser_params *p, rb_parser_string_t *string, const YYLTYPE *loc)
23893{
23894 return rb_node_dstr_new0(p, string, 1, 0, loc);
23895}
23896
23897static rb_node_xstr_t *
23898rb_node_xstr_new(struct parser_params *p, rb_parser_string_t *string, const YYLTYPE *loc)
23899{
23900 rb_node_xstr_t *n = NODE_NEWNODE(NODE_XSTR, rb_node_xstr_t, loc);
23901 n->string = string;
23902
23903 return n;
23904}
23905
23906static rb_node_dxstr_t *
23907rb_node_dxstr_new(struct parser_params *p, rb_parser_string_t *string, long nd_alen, NODE *nd_next, const YYLTYPE *loc)
23908{
23909 rb_node_dxstr_t *n = NODE_NEWNODE(NODE_DXSTR, rb_node_dxstr_t, loc);
23910 n->string = string;
23911 n->as.nd_alen = nd_alen;
23912 n->nd_next = (rb_node_list_t *)nd_next;
23913
23914 return n;
23915}
23916
23917static rb_node_sym_t *
23918rb_node_sym_new(struct parser_params *p, VALUE str, const YYLTYPE *loc)
23919{
23920 rb_node_sym_t *n = NODE_NEWNODE(NODE_SYM, rb_node_sym_t, loc);
23921 n->string = rb_str_to_parser_string(p, str);
23922
23923 return n;
23924}
23925
23926static rb_node_dsym_t *
23927rb_node_dsym_new(struct parser_params *p, rb_parser_string_t *string, long nd_alen, NODE *nd_next, const YYLTYPE *loc)
23928{
23929 rb_node_dsym_t *n = NODE_NEWNODE(NODE_DSYM, rb_node_dsym_t, loc);
23930 n->string = string;
23931 n->as.nd_alen = nd_alen;
23932 n->nd_next = (rb_node_list_t *)nd_next;
23933
23934 return n;
23935}
23936
23937static rb_node_evstr_t *
23938rb_node_evstr_new(struct parser_params *p, NODE *nd_body, const YYLTYPE *loc, const YYLTYPE *opening_loc, const YYLTYPE *closing_loc)
23939{
23940 rb_node_evstr_t *n = NODE_NEWNODE(NODE_EVSTR, rb_node_evstr_t, loc);
23941 n->nd_body = nd_body;
23942 n->opening_loc = *opening_loc;
23943 n->closing_loc = *closing_loc;
23944
23945 return n;
23946}
23947
23948static rb_node_regx_t *
23949rb_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)
23950{
23951 rb_node_regx_t *n = NODE_NEWNODE(NODE_REGX, rb_node_regx_t, loc);
23952 n->string = string;
23953 n->options = options & RE_OPTION_MASK;
23954 n->opening_loc = *opening_loc;
23955 n->content_loc = *content_loc;
23956 n->closing_loc = *closing_loc;
23957
23958 return n;
23959}
23960
23961static rb_node_call_t *
23962rb_node_call_new(struct parser_params *p, NODE *nd_recv, ID nd_mid, NODE *nd_args, const YYLTYPE *loc)
23963{
23964 rb_node_call_t *n = NODE_NEWNODE(NODE_CALL, rb_node_call_t, loc);
23965 n->nd_recv = nd_recv;
23966 n->nd_mid = nd_mid;
23967 n->nd_args = nd_args;
23968
23969 return n;
23970}
23971
23972static rb_node_opcall_t *
23973rb_node_opcall_new(struct parser_params *p, NODE *nd_recv, ID nd_mid, NODE *nd_args, const YYLTYPE *loc)
23974{
23975 rb_node_opcall_t *n = NODE_NEWNODE(NODE_OPCALL, rb_node_opcall_t, loc);
23976 n->nd_recv = nd_recv;
23977 n->nd_mid = nd_mid;
23978 n->nd_args = nd_args;
23979
23980 return n;
23981}
23982
23983static rb_node_fcall_t *
23984rb_node_fcall_new(struct parser_params *p, ID nd_mid, NODE *nd_args, const YYLTYPE *loc)
23985{
23986 rb_node_fcall_t *n = NODE_NEWNODE(NODE_FCALL, rb_node_fcall_t, loc);
23987 n->nd_mid = nd_mid;
23988 n->nd_args = nd_args;
23989
23990 return n;
23991}
23992
23993static rb_node_qcall_t *
23994rb_node_qcall_new(struct parser_params *p, NODE *nd_recv, ID nd_mid, NODE *nd_args, const YYLTYPE *loc)
23995{
23996 rb_node_qcall_t *n = NODE_NEWNODE(NODE_QCALL, rb_node_qcall_t, loc);
23997 n->nd_recv = nd_recv;
23998 n->nd_mid = nd_mid;
23999 n->nd_args = nd_args;
24000
24001 return n;
24002}
24003
24004static rb_node_vcall_t *
24005rb_node_vcall_new(struct parser_params *p, ID nd_mid, const YYLTYPE *loc)
24006{
24007 rb_node_vcall_t *n = NODE_NEWNODE(NODE_VCALL, rb_node_vcall_t, loc);
24008 n->nd_mid = nd_mid;
24009
24010 return n;
24011}
24012
24013static rb_node_once_t *
24014rb_node_once_new(struct parser_params *p, NODE *nd_body, const YYLTYPE *loc)
24015{
24016 rb_node_once_t *n = NODE_NEWNODE(NODE_ONCE, rb_node_once_t, loc);
24017 n->nd_body = nd_body;
24018
24019 return n;
24020}
24021
24022static rb_node_args_t *
24023rb_node_args_new(struct parser_params *p, const YYLTYPE *loc)
24024{
24025 rb_node_args_t *n = NODE_NEWNODE(NODE_ARGS, rb_node_args_t, loc);
24026 MEMZERO(&n->nd_ainfo, struct rb_args_info, 1);
24027
24028 return n;
24029}
24030
24031static rb_node_args_aux_t *
24032rb_node_args_aux_new(struct parser_params *p, ID nd_pid, int nd_plen, const YYLTYPE *loc)
24033{
24034 rb_node_args_aux_t *n = NODE_NEWNODE(NODE_ARGS_AUX, rb_node_args_aux_t, loc);
24035 n->nd_pid = nd_pid;
24036 n->nd_plen = nd_plen;
24037 n->nd_next = 0;
24038
24039 return n;
24040}
24041
24042static rb_node_opt_arg_t *
24043rb_node_opt_arg_new(struct parser_params *p, NODE *nd_body, const YYLTYPE *loc)
24044{
24045 rb_node_opt_arg_t *n = NODE_NEWNODE(NODE_OPT_ARG, rb_node_opt_arg_t, loc);
24046 n->nd_body = nd_body;
24047 n->nd_next = 0;
24048
24049 return n;
24050}
24051
24052static rb_node_kw_arg_t *
24053rb_node_kw_arg_new(struct parser_params *p, NODE *nd_body, const YYLTYPE *loc)
24054{
24055 rb_node_kw_arg_t *n = NODE_NEWNODE(NODE_KW_ARG, rb_node_kw_arg_t, loc);
24056 n->nd_body = nd_body;
24057 n->nd_next = 0;
24058
24059 return n;
24060}
24061
24062static rb_node_postarg_t *
24063rb_node_postarg_new(struct parser_params *p, NODE *nd_1st, NODE *nd_2nd, const YYLTYPE *loc)
24064{
24065 rb_node_postarg_t *n = NODE_NEWNODE(NODE_POSTARG, rb_node_postarg_t, loc);
24066 n->nd_1st = nd_1st;
24067 n->nd_2nd = nd_2nd;
24068
24069 return n;
24070}
24071
24072static rb_node_argscat_t *
24073rb_node_argscat_new(struct parser_params *p, NODE *nd_head, NODE *nd_body, const YYLTYPE *loc)
24074{
24075 rb_node_argscat_t *n = NODE_NEWNODE(NODE_ARGSCAT, rb_node_argscat_t, loc);
24076 n->nd_head = nd_head;
24077 n->nd_body = nd_body;
24078
24079 return n;
24080}
24081
24082static rb_node_argspush_t *
24083rb_node_argspush_new(struct parser_params *p, NODE *nd_head, NODE *nd_body, const YYLTYPE *loc)
24084{
24085 rb_node_argspush_t *n = NODE_NEWNODE(NODE_ARGSPUSH, rb_node_argspush_t, loc);
24086 n->nd_head = nd_head;
24087 n->nd_body = nd_body;
24088
24089 return n;
24090}
24091
24092static rb_node_splat_t *
24093rb_node_splat_new(struct parser_params *p, NODE *nd_head, const YYLTYPE *loc, const YYLTYPE *operator_loc)
24094{
24095 rb_node_splat_t *n = NODE_NEWNODE(NODE_SPLAT, rb_node_splat_t, loc);
24096 n->nd_head = nd_head;
24097 n->operator_loc = *operator_loc;
24098
24099 return n;
24100}
24101
24102static rb_node_block_pass_t *
24103rb_node_block_pass_new(struct parser_params *p, NODE *nd_body, const YYLTYPE *loc, const YYLTYPE *operator_loc)
24104{
24105 rb_node_block_pass_t *n = NODE_NEWNODE(NODE_BLOCK_PASS, rb_node_block_pass_t, loc);
24106 n->forwarding = 0;
24107 n->nd_head = 0;
24108 n->nd_body = nd_body;
24109 n->operator_loc = *operator_loc;
24110
24111 return n;
24112}
24113
24114static rb_node_alias_t *
24115rb_node_alias_new(struct parser_params *p, NODE *nd_1st, NODE *nd_2nd, const YYLTYPE *loc, const YYLTYPE *keyword_loc)
24116{
24117 rb_node_alias_t *n = NODE_NEWNODE(NODE_ALIAS, rb_node_alias_t, loc);
24118 n->nd_1st = nd_1st;
24119 n->nd_2nd = nd_2nd;
24120 n->keyword_loc = *keyword_loc;
24121
24122 return n;
24123}
24124
24125static rb_node_valias_t *
24126rb_node_valias_new(struct parser_params *p, ID nd_alias, ID nd_orig, const YYLTYPE *loc, const YYLTYPE *keyword_loc)
24127{
24128 rb_node_valias_t *n = NODE_NEWNODE(NODE_VALIAS, rb_node_valias_t, loc);
24129 n->nd_alias = nd_alias;
24130 n->nd_orig = nd_orig;
24131 n->keyword_loc = *keyword_loc;
24132
24133 return n;
24134}
24135
24136static rb_node_undef_t *
24137rb_node_undef_new(struct parser_params *p, NODE *nd_undef, const YYLTYPE *loc)
24138{
24139 rb_node_undef_t *n = NODE_NEWNODE(NODE_UNDEF, rb_node_undef_t, loc);
24140 n->nd_undefs = rb_parser_ary_new_capa_for_node(p, 1);
24141 n->keyword_loc = NULL_LOC;
24142 rb_parser_ary_push_node(p, n->nd_undefs, nd_undef);
24143
24144 return n;
24145}
24146
24147static rb_node_errinfo_t *
24148rb_node_errinfo_new(struct parser_params *p, const YYLTYPE *loc)
24149{
24150 rb_node_errinfo_t *n = NODE_NEWNODE(NODE_ERRINFO, rb_node_errinfo_t, loc);
24151
24152 return n;
24153}
24154
24155static rb_node_defined_t *
24156rb_node_defined_new(struct parser_params *p, NODE *nd_head, const YYLTYPE *loc, const YYLTYPE *keyword_loc)
24157{
24158 rb_node_defined_t *n = NODE_NEWNODE(NODE_DEFINED, rb_node_defined_t, loc);
24159 n->nd_head = nd_head;
24160 n->keyword_loc = *keyword_loc;
24161
24162 return n;
24163}
24164
24165static rb_node_postexe_t *
24166rb_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)
24167{
24168 rb_node_postexe_t *n = NODE_NEWNODE(NODE_POSTEXE, rb_node_postexe_t, loc);
24169 n->nd_body = nd_body;
24170 n->keyword_loc = *keyword_loc;
24171 n->opening_loc = *opening_loc;
24172 n->closing_loc = *closing_loc;
24173
24174 return n;
24175}
24176
24177static rb_node_attrasgn_t *
24178rb_node_attrasgn_new(struct parser_params *p, NODE *nd_recv, ID nd_mid, NODE *nd_args, const YYLTYPE *loc)
24179{
24180 rb_node_attrasgn_t *n = NODE_NEWNODE(NODE_ATTRASGN, rb_node_attrasgn_t, loc);
24181 n->nd_recv = nd_recv;
24182 n->nd_mid = nd_mid;
24183 n->nd_args = nd_args;
24184
24185 return n;
24186}
24187
24188static rb_node_aryptn_t *
24189rb_node_aryptn_new(struct parser_params *p, NODE *pre_args, NODE *rest_arg, NODE *post_args, const YYLTYPE *loc)
24190{
24191 rb_node_aryptn_t *n = NODE_NEWNODE(NODE_ARYPTN, rb_node_aryptn_t, loc);
24192 n->nd_pconst = 0;
24193 n->pre_args = pre_args;
24194 n->rest_arg = rest_arg;
24195 n->post_args = post_args;
24196
24197 return n;
24198}
24199
24200static rb_node_hshptn_t *
24201rb_node_hshptn_new(struct parser_params *p, NODE *nd_pconst, NODE *nd_pkwargs, NODE *nd_pkwrestarg, const YYLTYPE *loc)
24202{
24203 rb_node_hshptn_t *n = NODE_NEWNODE(NODE_HSHPTN, rb_node_hshptn_t, loc);
24204 n->nd_pconst = nd_pconst;
24205 n->nd_pkwargs = nd_pkwargs;
24206 n->nd_pkwrestarg = nd_pkwrestarg;
24207
24208 return n;
24209}
24210
24211static rb_node_fndptn_t *
24212rb_node_fndptn_new(struct parser_params *p, NODE *pre_rest_arg, NODE *args, NODE *post_rest_arg, const YYLTYPE *loc)
24213{
24214 rb_node_fndptn_t *n = NODE_NEWNODE(NODE_FNDPTN, rb_node_fndptn_t, loc);
24215 n->nd_pconst = 0;
24216 n->pre_rest_arg = pre_rest_arg;
24217 n->args = args;
24218 n->post_rest_arg = post_rest_arg;
24219
24220 return n;
24221}
24222
24223static rb_node_line_t *
24224rb_node_line_new(struct parser_params *p, const YYLTYPE *loc)
24225{
24226 rb_node_line_t *n = NODE_NEWNODE(NODE_LINE, rb_node_line_t, loc);
24227
24228 return n;
24229}
24230
24231static rb_node_file_t *
24232rb_node_file_new(struct parser_params *p, VALUE str, const YYLTYPE *loc)
24233{
24234 rb_node_file_t *n = NODE_NEWNODE(NODE_FILE, rb_node_file_t, loc);
24235 n->path = rb_str_to_parser_string(p, str);
24236
24237 return n;
24238}
24239
24240static rb_node_encoding_t *
24241rb_node_encoding_new(struct parser_params *p, const YYLTYPE *loc)
24242{
24243 rb_node_encoding_t *n = NODE_NEWNODE(NODE_ENCODING, rb_node_encoding_t, loc);
24244 n->enc = p->enc;
24245
24246 return n;
24247}
24248
24249static rb_node_cdecl_t *
24250rb_node_cdecl_new(struct parser_params *p, ID nd_vid, NODE *nd_value, NODE *nd_else, enum rb_parser_shareability shareability, const YYLTYPE *loc)
24251{
24252 rb_node_cdecl_t *n = NODE_NEWNODE(NODE_CDECL, rb_node_cdecl_t, loc);
24253 n->nd_vid = nd_vid;
24254 n->nd_value = nd_value;
24255 n->nd_else = nd_else;
24256 n->shareability = shareability;
24257
24258 return n;
24259}
24260
24261static rb_node_op_cdecl_t *
24262rb_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)
24263{
24264 rb_node_op_cdecl_t *n = NODE_NEWNODE(NODE_OP_CDECL, rb_node_op_cdecl_t, loc);
24265 n->nd_head = nd_head;
24266 n->nd_value = nd_value;
24267 n->nd_aid = nd_aid;
24268 n->shareability = shareability;
24269
24270 return n;
24271}
24272
24273static rb_node_error_t *
24274rb_node_error_new(struct parser_params *p, const YYLTYPE *loc)
24275{
24276 rb_node_error_t *n = NODE_NEWNODE(NODE_ERROR, rb_node_error_t, loc);
24277
24278 return n;
24279}
24280
24281static rb_node_break_t *
24282rb_node_break_new(struct parser_params *p, NODE *nd_stts, const YYLTYPE *loc, const YYLTYPE *keyword_loc)
24283{
24284 rb_node_break_t *n = NODE_NEWNODE(NODE_BREAK, rb_node_break_t, loc);
24285 n->nd_stts = nd_stts;
24286 n->nd_chain = 0;
24287 n->keyword_loc = *keyword_loc;
24288
24289 return n;
24290}
24291
24292static rb_node_next_t *
24293rb_node_next_new(struct parser_params *p, NODE *nd_stts, const YYLTYPE *loc, const YYLTYPE *keyword_loc)
24294{
24295 rb_node_next_t *n = NODE_NEWNODE(NODE_NEXT, rb_node_next_t, loc);
24296 n->nd_stts = nd_stts;
24297 n->nd_chain = 0;
24298 n->keyword_loc = *keyword_loc;
24299
24300 return n;
24301}
24302
24303static rb_node_redo_t *
24304rb_node_redo_new(struct parser_params *p, const YYLTYPE *loc, const YYLTYPE *keyword_loc)
24305{
24306 rb_node_redo_t *n = NODE_NEWNODE(NODE_REDO, rb_node_redo_t, loc);
24307 n->nd_chain = 0;
24308 n->keyword_loc = *keyword_loc;
24309
24310 return n;
24311}
24312
24313static rb_node_def_temp_t *
24314rb_node_def_temp_new(struct parser_params *p, const YYLTYPE *loc)
24315{
24316 rb_node_def_temp_t *n = NODE_NEWNODE((enum node_type)NODE_DEF_TEMP, rb_node_def_temp_t, loc);
24317 n->save.numparam_save = 0;
24318 n->save.max_numparam = 0;
24319 n->save.ctxt = p->ctxt;
24320 n->nd_def = 0;
24321 n->nd_mid = 0;
24322
24323 return n;
24324}
24325
24326static rb_node_def_temp_t *
24327def_head_save(struct parser_params *p, rb_node_def_temp_t *n)
24328{
24329 n->save.numparam_save = numparam_push(p);
24330 n->save.max_numparam = p->max_numparam;
24331 return n;
24332}
24333
24334#ifndef RIPPER
24335static enum node_type
24336nodetype(NODE *node) /* for debug */
24337{
24338 return (enum node_type)nd_type(node);
24339}
24340
24341static int
24342nodeline(NODE *node)
24343{
24344 return nd_line(node);
24345}
24346#endif
24347
24348static NODE*
24349newline_node(NODE *node)
24350{
24351 if (node) {
24352 node = remove_begin(node);
24353 nd_set_fl_newline(node);
24354 }
24355 return node;
24356}
24357
24358static void
24359fixpos(NODE *node, NODE *orig)
24360{
24361 if (!node) return;
24362 if (!orig) return;
24363 nd_set_line(node, nd_line(orig));
24364}
24365
24366static NODE*
24367block_append(struct parser_params *p, NODE *head, NODE *tail)
24368{
24369 NODE *end, *h = head, *nd;
24370
24371 if (tail == 0) return head;
24372
24373 if (h == 0) return tail;
24374 switch (nd_type(h)) {
24375 default:
24376 h = end = NEW_BLOCK(head, &head->nd_loc);
24377 head = end;
24378 break;
24379 case NODE_BLOCK:
24380 end = RNODE_BLOCK(h)->nd_end;
24381 break;
24382 }
24383
24384 nd = RNODE_BLOCK(end)->nd_head;
24385 switch (nd_type(nd)) {
24386 case NODE_RETURN:
24387 case NODE_BREAK:
24388 case NODE_NEXT:
24389 case NODE_REDO:
24390 case NODE_RETRY:
24391 rb_warning0L(nd_line(tail), "statement not reached");
24392 break;
24393
24394 default:
24395 break;
24396 }
24397
24398 if (!nd_type_p(tail, NODE_BLOCK)) {
24399 tail = NEW_BLOCK(tail, &tail->nd_loc);
24400 }
24401 RNODE_BLOCK(end)->nd_next = tail;
24402 RNODE_BLOCK(h)->nd_end = RNODE_BLOCK(tail)->nd_end;
24403 nd_set_last_loc(head, nd_last_loc(tail));
24404 return head;
24405}
24406
24407/* append item to the list */
24408static NODE*
24409list_append(struct parser_params *p, NODE *list, NODE *item)
24410{
24411 NODE *last;
24412
24413 if (list == 0) return NEW_LIST(item, &item->nd_loc);
24414 if (RNODE_LIST(list)->nd_next) {
24415 last = RNODE_LIST(RNODE_LIST(list)->nd_next)->as.nd_end;
24416 }
24417 else {
24418 last = list;
24419 }
24420
24421 RNODE_LIST(list)->as.nd_alen += 1;
24422 RNODE_LIST(last)->nd_next = NEW_LIST(item, &item->nd_loc);
24423 RNODE_LIST(RNODE_LIST(list)->nd_next)->as.nd_end = RNODE_LIST(last)->nd_next;
24424
24425 nd_set_last_loc(list, nd_last_loc(item));
24426
24427 return list;
24428}
24429
24430/* concat two lists */
24431static NODE*
24432list_concat(NODE *head, NODE *tail)
24433{
24434 NODE *last;
24435
24436 if (RNODE_LIST(head)->nd_next) {
24437 last = RNODE_LIST(RNODE_LIST(head)->nd_next)->as.nd_end;
24438 }
24439 else {
24440 last = head;
24441 }
24442
24443 RNODE_LIST(head)->as.nd_alen += RNODE_LIST(tail)->as.nd_alen;
24444 RNODE_LIST(last)->nd_next = tail;
24445 if (RNODE_LIST(tail)->nd_next) {
24446 RNODE_LIST(RNODE_LIST(head)->nd_next)->as.nd_end = RNODE_LIST(RNODE_LIST(tail)->nd_next)->as.nd_end;
24447 }
24448 else {
24449 RNODE_LIST(RNODE_LIST(head)->nd_next)->as.nd_end = tail;
24450 }
24451
24452 nd_set_last_loc(head, nd_last_loc(tail));
24453
24454 return head;
24455}
24456
24457static int
24458literal_concat0(struct parser_params *p, rb_parser_string_t *head, rb_parser_string_t *tail)
24459{
24460 if (!tail) return 1;
24461 if (!rb_parser_enc_compatible(p, head, tail)) {
24462 compile_error(p, "string literal encodings differ (%s / %s)",
24463 rb_enc_name(rb_parser_str_get_encoding(head)),
24464 rb_enc_name(rb_parser_str_get_encoding(tail)));
24465 rb_parser_str_resize(p, head, 0);
24466 rb_parser_str_resize(p, tail, 0);
24467 return 0;
24468 }
24469 rb_parser_str_buf_append(p, head, tail);
24470 return 1;
24471}
24472
24473static rb_parser_string_t *
24474string_literal_head(struct parser_params *p, enum node_type htype, NODE *head)
24475{
24476 if (htype != NODE_DSTR) return NULL;
24477 if (RNODE_DSTR(head)->nd_next) {
24478 head = RNODE_LIST(RNODE_LIST(RNODE_DSTR(head)->nd_next)->as.nd_end)->nd_head;
24479 if (!head || !nd_type_p(head, NODE_STR)) return NULL;
24480 }
24481 rb_parser_string_t *lit = RNODE_DSTR(head)->string;
24482 ASSUME(lit);
24483 return lit;
24484}
24485
24486#ifndef RIPPER
24487static rb_parser_string_t *
24488rb_parser_string_deep_copy(struct parser_params *p, const rb_parser_string_t *orig)
24489{
24490 rb_parser_string_t *copy;
24491 if (!orig) return NULL;
24492 copy = rb_parser_string_new(p, PARSER_STRING_PTR(orig), PARSER_STRING_LEN(orig));
24493 copy->coderange = orig->coderange;
24494 copy->enc = orig->enc;
24495 return copy;
24496}
24497#endif
24498
24499/* concat two string literals */
24500static NODE *
24501literal_concat(struct parser_params *p, NODE *head, NODE *tail, const YYLTYPE *loc)
24502{
24503 enum node_type htype;
24504 rb_parser_string_t *lit;
24505
24506 if (!head) return tail;
24507 if (!tail) return head;
24508
24509 htype = nd_type(head);
24510 if (htype == NODE_EVSTR) {
24511 head = new_dstr(p, head, loc);
24512 htype = NODE_DSTR;
24513 }
24514 if (p->heredoc_indent > 0) {
24515 switch (htype) {
24516 case NODE_STR:
24517 head = str2dstr(p, head);
24518 case NODE_DSTR:
24519 return list_append(p, head, tail);
24520 default:
24521 break;
24522 }
24523 }
24524 switch (nd_type(tail)) {
24525 case NODE_STR:
24526 if ((lit = string_literal_head(p, htype, head)) != false) {
24527 htype = NODE_STR;
24528 }
24529 else {
24530 lit = RNODE_DSTR(head)->string;
24531 }
24532 if (htype == NODE_STR) {
24533 if (!literal_concat0(p, lit, RNODE_STR(tail)->string)) {
24534 error:
24535 rb_discard_node(p, head);
24536 rb_discard_node(p, tail);
24537 return 0;
24538 }
24539 rb_discard_node(p, tail);
24540 }
24541 else {
24542 list_append(p, head, tail);
24543 }
24544 break;
24545
24546 case NODE_DSTR:
24547 if (htype == NODE_STR) {
24548 if (!literal_concat0(p, RNODE_STR(head)->string, RNODE_DSTR(tail)->string))
24549 goto error;
24550 rb_parser_string_free(p, RNODE_DSTR(tail)->string);
24551 RNODE_DSTR(tail)->string = RNODE_STR(head)->string;
24552 RNODE_STR(head)->string = NULL;
24553 rb_discard_node(p, head);
24554 head = tail;
24555 }
24556 else if (!RNODE_DSTR(tail)->string) {
24557 append:
24558 RNODE_DSTR(head)->as.nd_alen += RNODE_DSTR(tail)->as.nd_alen - 1;
24559 if (!RNODE_DSTR(head)->nd_next) {
24560 RNODE_DSTR(head)->nd_next = RNODE_DSTR(tail)->nd_next;
24561 }
24562 else if (RNODE_DSTR(tail)->nd_next) {
24563 RNODE_DSTR(RNODE_DSTR(RNODE_DSTR(head)->nd_next)->as.nd_end)->nd_next = RNODE_DSTR(tail)->nd_next;
24564 RNODE_DSTR(RNODE_DSTR(head)->nd_next)->as.nd_end = RNODE_DSTR(RNODE_DSTR(tail)->nd_next)->as.nd_end;
24565 }
24566 rb_discard_node(p, tail);
24567 }
24568 else if ((lit = string_literal_head(p, htype, head)) != false) {
24569 if (!literal_concat0(p, lit, RNODE_DSTR(tail)->string))
24570 goto error;
24571 rb_parser_string_free(p, RNODE_DSTR(tail)->string);
24572 RNODE_DSTR(tail)->string = 0;
24573 goto append;
24574 }
24575 else {
24576 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));
24577 RNODE_DSTR(tail)->string = 0;
24578 }
24579 break;
24580
24581 case NODE_EVSTR:
24582 if (htype == NODE_STR) {
24583 head = str2dstr(p, head);
24584 RNODE_DSTR(head)->as.nd_alen = 1;
24585 }
24586 list_append(p, head, tail);
24587 break;
24588 }
24589 return head;
24590}
24591
24592static void
24593nd_copy_flag(NODE *new_node, NODE *old_node)
24594{
24595 if (nd_fl_newline(old_node)) nd_set_fl_newline(new_node);
24596 nd_set_line(new_node, nd_line(old_node));
24597 new_node->nd_loc = old_node->nd_loc;
24598 new_node->node_id = old_node->node_id;
24599}
24600
24601static NODE *
24602str2dstr(struct parser_params *p, NODE *node)
24603{
24604 NODE *new_node = (NODE *)NODE_NEW_INTERNAL(NODE_DSTR, rb_node_dstr_t);
24605 nd_copy_flag(new_node, node);
24606 RNODE_DSTR(new_node)->string = RNODE_STR(node)->string;
24607 RNODE_DSTR(new_node)->as.nd_alen = 0;
24608 RNODE_DSTR(new_node)->nd_next = 0;
24609 RNODE_STR(node)->string = 0;
24610
24611 return new_node;
24612}
24613
24614static NODE *
24615str2regx(struct parser_params *p, NODE *node, int options, const YYLTYPE *loc, const YYLTYPE *opening_loc, const YYLTYPE *content_loc, const YYLTYPE *closing_loc)
24616{
24617 NODE *new_node = (NODE *)NODE_NEW_INTERNAL(NODE_REGX, rb_node_regx_t);
24618 nd_copy_flag(new_node, node);
24619 RNODE_REGX(new_node)->string = RNODE_STR(node)->string;
24620 RNODE_REGX(new_node)->options = options;
24621 nd_set_loc(new_node, loc);
24622 RNODE_REGX(new_node)->opening_loc = *opening_loc;
24623 RNODE_REGX(new_node)->content_loc = *content_loc;
24624 RNODE_REGX(new_node)->closing_loc = *closing_loc;
24625 RNODE_STR(node)->string = 0;
24626
24627 return new_node;
24628}
24629
24630static NODE *
24631evstr2dstr(struct parser_params *p, NODE *node)
24632{
24633 if (nd_type_p(node, NODE_EVSTR)) {
24634 node = new_dstr(p, node, &node->nd_loc);
24635 }
24636 return node;
24637}
24638
24639static NODE *
24640new_evstr(struct parser_params *p, NODE *node, const YYLTYPE *loc, const YYLTYPE *opening_loc, const YYLTYPE *closing_loc)
24641{
24642 NODE *head = node;
24643
24644 if (node) {
24645 switch (nd_type(node)) {
24646 case NODE_STR:
24647 return str2dstr(p, node);
24648 case NODE_DSTR:
24649 break;
24650 case NODE_EVSTR:
24651 return node;
24652 }
24653 }
24654 return NEW_EVSTR(head, loc, opening_loc, closing_loc);
24655}
24656
24657static NODE *
24658new_dstr(struct parser_params *p, NODE *node, const YYLTYPE *loc)
24659{
24660 NODE *dstr = NEW_DSTR(STRING_NEW0(), loc);
24661 return list_append(p, dstr, node);
24662}
24663
24664static NODE *
24665call_bin_op(struct parser_params *p, NODE *recv, ID id, NODE *arg1,
24666 const YYLTYPE *op_loc, const YYLTYPE *loc)
24667{
24668 NODE *expr;
24669 value_expr(p, recv);
24670 value_expr(p, arg1);
24671 expr = NEW_OPCALL(recv, id, NEW_LIST(arg1, &arg1->nd_loc), loc);
24672 nd_set_line(expr, op_loc->beg_pos.lineno);
24673 return expr;
24674}
24675
24676static NODE *
24677call_uni_op(struct parser_params *p, NODE *recv, ID id, const YYLTYPE *op_loc, const YYLTYPE *loc)
24678{
24679 NODE *opcall;
24680 value_expr(p, recv);
24681 opcall = NEW_OPCALL(recv, id, 0, loc);
24682 nd_set_line(opcall, op_loc->beg_pos.lineno);
24683 return opcall;
24684}
24685
24686static NODE *
24687new_qcall(struct parser_params* p, ID atype, NODE *recv, ID mid, NODE *args, const YYLTYPE *op_loc, const YYLTYPE *loc)
24688{
24689 NODE *qcall = NEW_QCALL(atype, recv, mid, args, loc);
24690 nd_set_line(qcall, op_loc->beg_pos.lineno);
24691 return qcall;
24692}
24693
24694static NODE*
24695new_command_qcall(struct parser_params* p, ID atype, NODE *recv, ID mid, NODE *args, NODE *block, const YYLTYPE *op_loc, const YYLTYPE *loc)
24696{
24697 NODE *ret;
24698 if (block) block_dup_check(p, args, block);
24699 ret = new_qcall(p, atype, recv, mid, args, op_loc, loc);
24700 if (block) ret = method_add_block(p, ret, block, loc);
24701 fixpos(ret, recv);
24702 return ret;
24703}
24704
24706new_locations_lambda_body(struct parser_params* p, NODE *node, const YYLTYPE *loc, const YYLTYPE *opening_loc, const YYLTYPE *closing_loc)
24707{
24709 body->node = node;
24710 body->opening_loc = *opening_loc;
24711 body->closing_loc = *closing_loc;
24712 return body;
24713}
24714
24715#define nd_once_body(node) (nd_type_p((node), NODE_ONCE) ? RNODE_ONCE(node)->nd_body : node)
24716
24717static NODE*
24718last_expr_once_body(NODE *node)
24719{
24720 if (!node) return 0;
24721 return nd_once_body(node);
24722}
24723
24724static NODE*
24725match_op(struct parser_params *p, NODE *node1, NODE *node2, const YYLTYPE *op_loc, const YYLTYPE *loc)
24726{
24727 NODE *n;
24728 int line = op_loc->beg_pos.lineno;
24729
24730 value_expr(p, node1);
24731 value_expr(p, node2);
24732
24733 if ((n = last_expr_once_body(node1)) != 0) {
24734 switch (nd_type(n)) {
24735 case NODE_DREGX:
24736 {
24737 NODE *match = NEW_MATCH2(node1, node2, loc);
24738 nd_set_line(match, line);
24739 return match;
24740 }
24741
24742 case NODE_REGX:
24743 {
24744 const VALUE lit = rb_node_regx_string_val(n);
24745 if (!NIL_P(lit)) {
24746 NODE *match = NEW_MATCH2(node1, node2, loc);
24747 RNODE_MATCH2(match)->nd_args = reg_named_capture_assign(p, lit, loc, assignable);
24748 nd_set_line(match, line);
24749 return match;
24750 }
24751 }
24752 }
24753 }
24754
24755 if ((n = last_expr_once_body(node2)) != 0) {
24756 NODE *match3;
24757
24758 switch (nd_type(n)) {
24759 case NODE_DREGX:
24760 match3 = NEW_MATCH3(node2, node1, loc);
24761 return match3;
24762 }
24763 }
24764
24765 n = NEW_CALL(node1, tMATCH, NEW_LIST(node2, &node2->nd_loc), loc);
24766 nd_set_line(n, line);
24767 return n;
24768}
24769
24770# if WARN_PAST_SCOPE
24771static int
24772past_dvar_p(struct parser_params *p, ID id)
24773{
24774 struct vtable *past = p->lvtbl->past;
24775 while (past) {
24776 if (vtable_included(past, id)) return 1;
24777 past = past->prev;
24778 }
24779 return 0;
24780}
24781# endif
24782
24783static int
24784numparam_nested_p(struct parser_params *p)
24785{
24786 struct local_vars *local = p->lvtbl;
24787 NODE *outer = local->numparam.outer;
24788 NODE *inner = local->numparam.inner;
24789 if (outer || inner) {
24790 NODE *used = outer ? outer : inner;
24791 compile_error(p, "numbered parameter is already used in %s block\n"
24792 "%s:%d: numbered parameter is already used here",
24793 outer ? "outer" : "inner",
24794 p->ruby_sourcefile, nd_line(used));
24795 parser_show_error_line(p, &used->nd_loc);
24796 return 1;
24797 }
24798 return 0;
24799}
24800
24801static int
24802numparam_used_p(struct parser_params *p)
24803{
24804 NODE *numparam = p->lvtbl->numparam.current;
24805 if (numparam) {
24806 compile_error(p, "'it' is not allowed when a numbered parameter is already used\n"
24807 "%s:%d: numbered parameter is already used here",
24808 p->ruby_sourcefile, nd_line(numparam));
24809 parser_show_error_line(p, &numparam->nd_loc);
24810 return 1;
24811 }
24812 return 0;
24813}
24814
24815static int
24816it_used_p(struct parser_params *p)
24817{
24818 NODE *it = p->lvtbl->it;
24819 if (it) {
24820 compile_error(p, "numbered parameters are not allowed when 'it' is already used\n"
24821 "%s:%d: 'it' is already used here",
24822 p->ruby_sourcefile, nd_line(it));
24823 parser_show_error_line(p, &it->nd_loc);
24824 return 1;
24825 }
24826 return 0;
24827}
24828
24829static NODE*
24830gettable(struct parser_params *p, ID id, const YYLTYPE *loc)
24831{
24832 ID *vidp = NULL;
24833 NODE *node;
24834 switch (id) {
24835 case keyword_self:
24836 return NEW_SELF(loc);
24837 case keyword_nil:
24838 return NEW_NIL(loc);
24839 case keyword_true:
24840 return NEW_TRUE(loc);
24841 case keyword_false:
24842 return NEW_FALSE(loc);
24843 case keyword__FILE__:
24844 {
24845 VALUE file = p->ruby_sourcefile_string;
24846 if (NIL_P(file))
24847 file = rb_str_new(0, 0);
24848 node = NEW_FILE(file, loc);
24849 }
24850 return node;
24851 case keyword__LINE__:
24852 return NEW_LINE(loc);
24853 case keyword__ENCODING__:
24854 return NEW_ENCODING(loc);
24855
24856 }
24857 switch (id_type(id)) {
24858 case ID_LOCAL:
24859 if (dyna_in_block(p) && dvar_defined_ref(p, id, &vidp)) {
24860 if (NUMPARAM_ID_P(id) && (numparam_nested_p(p) || it_used_p(p))) return 0;
24861 if (vidp) *vidp |= LVAR_USED;
24862 node = NEW_DVAR(id, loc);
24863 return node;
24864 }
24865 if (local_id_ref(p, id, &vidp)) {
24866 if (vidp) *vidp |= LVAR_USED;
24867 node = NEW_LVAR(id, loc);
24868 return node;
24869 }
24870 if (dyna_in_block(p) && NUMPARAM_ID_P(id) &&
24871 parser_numbered_param(p, NUMPARAM_ID_TO_IDX(id))) {
24872 if (numparam_nested_p(p) || it_used_p(p)) return 0;
24873 node = NEW_DVAR(id, loc);
24874 struct local_vars *local = p->lvtbl;
24875 if (!local->numparam.current) local->numparam.current = node;
24876 return node;
24877 }
24878# if WARN_PAST_SCOPE
24879 if (!p->ctxt.in_defined && RTEST(ruby_verbose) && past_dvar_p(p, id)) {
24880 rb_warning1("possible reference to past scope - %"PRIsWARN, rb_id2str(id));
24881 }
24882# endif
24883 /* method call without arguments */
24884 if (dyna_in_block(p) && id == idIt && !(DVARS_TERMINAL_P(p->lvtbl->args) || DVARS_TERMINAL_P(p->lvtbl->args->prev))) {
24885 if (numparam_used_p(p)) return 0;
24886 if (p->max_numparam == ORDINAL_PARAM) {
24887 compile_error(p, "ordinary parameter is defined");
24888 return 0;
24889 }
24890 if (!p->it_id) {
24891 p->it_id = idItImplicit;
24892 vtable_add(p->lvtbl->args, p->it_id);
24893 }
24894 NODE *node = NEW_DVAR(p->it_id, loc);
24895 if (!p->lvtbl->it) p->lvtbl->it = node;
24896 return node;
24897 }
24898 return NEW_VCALL(id, loc);
24899 case ID_GLOBAL:
24900 return NEW_GVAR(id, loc);
24901 case ID_INSTANCE:
24902 return NEW_IVAR(id, loc);
24903 case ID_CONST:
24904 return NEW_CONST(id, loc);
24905 case ID_CLASS:
24906 return NEW_CVAR(id, loc);
24907 }
24908 compile_error(p, "identifier %"PRIsVALUE" is not valid to get", rb_id2str(id));
24909 return 0;
24910}
24911
24912static rb_node_opt_arg_t *
24913opt_arg_append(rb_node_opt_arg_t *opt_list, rb_node_opt_arg_t *opt)
24914{
24915 rb_node_opt_arg_t *opts = opt_list;
24916 RNODE(opts)->nd_loc.end_pos = RNODE(opt)->nd_loc.end_pos;
24917
24918 while (opts->nd_next) {
24919 opts = opts->nd_next;
24920 RNODE(opts)->nd_loc.end_pos = RNODE(opt)->nd_loc.end_pos;
24921 }
24922 opts->nd_next = opt;
24923
24924 return opt_list;
24925}
24926
24927static rb_node_kw_arg_t *
24928kwd_append(rb_node_kw_arg_t *kwlist, rb_node_kw_arg_t *kw)
24929{
24930 if (kwlist) {
24931 /* Assume rb_node_kw_arg_t and rb_node_opt_arg_t has same structure */
24932 opt_arg_append(RNODE_OPT_ARG(kwlist), RNODE_OPT_ARG(kw));
24933 }
24934 return kwlist;
24935}
24936
24937static NODE *
24938new_defined(struct parser_params *p, NODE *expr, const YYLTYPE *loc, const YYLTYPE *keyword_loc)
24939{
24940 int had_trailing_semicolon = p->ctxt.has_trailing_semicolon;
24941 p->ctxt.has_trailing_semicolon = 0;
24942
24943 NODE *n = expr;
24944 while (n) {
24945 if (nd_type_p(n, NODE_BEGIN)) {
24946 n = RNODE_BEGIN(n)->nd_body;
24947 }
24948 else if (nd_type_p(n, NODE_BLOCK) && RNODE_BLOCK(n)->nd_end == n) {
24949 n = RNODE_BLOCK(n)->nd_head;
24950 }
24951 else {
24952 break;
24953 }
24954 }
24955
24956 if (had_trailing_semicolon && !nd_type_p(expr, NODE_BLOCK)) {
24957 NODE *block = NEW_BLOCK(expr, loc);
24958 return NEW_DEFINED(block, loc, keyword_loc);
24959 }
24960
24961 return NEW_DEFINED(n, loc, keyword_loc);
24962}
24963
24964static NODE*
24965str_to_sym_node(struct parser_params *p, NODE *node, const YYLTYPE *loc)
24966{
24967 VALUE lit;
24968 rb_parser_string_t *str = RNODE_STR(node)->string;
24969 if (rb_parser_enc_str_coderange(p, str) == RB_PARSER_ENC_CODERANGE_BROKEN) {
24970 yyerror1(loc, "invalid symbol");
24971 lit = STR_NEW0();
24972 }
24973 else {
24974 lit = rb_str_new_parser_string(str);
24975 }
24976 return NEW_SYM(lit, loc);
24977}
24978
24979static NODE*
24980symbol_append(struct parser_params *p, NODE *symbols, NODE *symbol)
24981{
24982 enum node_type type = nd_type(symbol);
24983 switch (type) {
24984 case NODE_DSTR:
24985 nd_set_type(symbol, NODE_DSYM);
24986 break;
24987 case NODE_STR:
24988 symbol = str_to_sym_node(p, symbol, &RNODE(symbol)->nd_loc);
24989 break;
24990 default:
24991 compile_error(p, "unexpected node as symbol: %s", parser_node_name(type));
24992 }
24993 return list_append(p, symbols, symbol);
24994}
24995
24996static void
24997dregex_fragment_setenc(struct parser_params *p, rb_node_dregx_t *const dreg, int options)
24998{
24999 if (dreg->string) {
25000 reg_fragment_setenc(p, dreg->string, options);
25001 }
25002 for (struct RNode_LIST *list = dreg->nd_next; list; list = RNODE_LIST(list->nd_next)) {
25003 NODE *frag = list->nd_head;
25004 if (nd_type_p(frag, NODE_STR)) {
25005 reg_fragment_setenc(p, RNODE_STR(frag)->string, options);
25006 }
25007 else if (nd_type_p(frag, NODE_DSTR)) {
25008 dregex_fragment_setenc(p, RNODE_DSTR(frag), options);
25009 }
25010 }
25011}
25012
25013static NODE *
25014new_regexp(struct parser_params *p, NODE *node, int options, const YYLTYPE *loc, const YYLTYPE *opening_loc, const YYLTYPE *content_loc, const YYLTYPE *closing_loc)
25015{
25016 if (!node) {
25017 /* Check string is valid regex */
25018 rb_parser_string_t *str = STRING_NEW0();
25019 reg_compile(p, str, options);
25020 node = NEW_REGX(str, options, loc, opening_loc, content_loc, closing_loc);
25021 return node;
25022 }
25023 switch (nd_type(node)) {
25024 case NODE_STR:
25025 {
25026 /* Check string is valid regex */
25027 reg_compile(p, RNODE_STR(node)->string, options);
25028 node = str2regx(p, node, options, loc, opening_loc, content_loc, closing_loc);
25029 }
25030 break;
25031 default:
25032 node = NEW_DSTR0(STRING_NEW0(), 1, NEW_LIST(node, loc), loc);
25033 /* fall through */
25034 case NODE_DSTR:
25035 nd_set_type(node, NODE_DREGX);
25036 nd_set_loc(node, loc);
25037 rb_node_dregx_t *const dreg = RNODE_DREGX(node);
25038 dreg->as.nd_cflag = options & RE_OPTION_MASK;
25039 if (dreg->nd_next) {
25040 dregex_fragment_setenc(p, dreg, options);
25041 }
25042 if (options & RE_OPTION_ONCE) {
25043 node = NEW_ONCE(node, loc);
25044 }
25045 break;
25046 }
25047 return node;
25048}
25049
25050static rb_node_kw_arg_t *
25051new_kw_arg(struct parser_params *p, NODE *k, const YYLTYPE *loc)
25052{
25053 if (!k) return 0;
25054 return NEW_KW_ARG((k), loc);
25055}
25056
25057static NODE *
25058new_xstring(struct parser_params *p, NODE *node, const YYLTYPE *loc)
25059{
25060 if (!node) {
25061 NODE *xstr = NEW_XSTR(STRING_NEW0(), loc);
25062 return xstr;
25063 }
25064 switch (nd_type(node)) {
25065 case NODE_STR:
25066 nd_set_type(node, NODE_XSTR);
25067 nd_set_loc(node, loc);
25068 break;
25069 case NODE_DSTR:
25070 nd_set_type(node, NODE_DXSTR);
25071 nd_set_loc(node, loc);
25072 break;
25073 default:
25074 node = NEW_DXSTR(0, 1, NEW_LIST(node, loc), loc);
25075 break;
25076 }
25077 return node;
25078}
25079
25080static const
25081struct st_hash_type literal_type = {
25082 literal_cmp,
25083 literal_hash,
25084};
25085
25086static int nd_type_st_key_enable_p(NODE *node);
25087
25088static void
25089check_literal_when(struct parser_params *p, NODE *arg, const YYLTYPE *loc)
25090{
25091 /* See https://bugs.ruby-lang.org/issues/20331 for discussion about what is warned. */
25092 if (!arg || !p->case_labels) return;
25093 if (!nd_type_st_key_enable_p(arg)) return;
25094
25095 if (p->case_labels == CHECK_LITERAL_WHEN) {
25096 p->case_labels = st_init_table(&literal_type);
25097 }
25098 else {
25099 st_data_t line;
25100 if (st_lookup(p->case_labels, (st_data_t)arg, &line)) {
25101 rb_warning2("'when' clause on line %d duplicates 'when' clause on line %d and is ignored",
25102 WARN_I((int)nd_line(arg)), WARN_I((int)line));
25103 return;
25104 }
25105 }
25106 st_insert(p->case_labels, (st_data_t)arg, (st_data_t)p->ruby_sourceline);
25107}
25108
25109#ifdef RIPPER
25110static int
25111id_is_var(struct parser_params *p, ID id)
25112{
25113 if (is_notop_id(id)) {
25114 switch (id & ID_SCOPE_MASK) {
25115 case ID_GLOBAL: case ID_INSTANCE: case ID_CONST: case ID_CLASS:
25116 return 1;
25117 case ID_LOCAL:
25118 if (dyna_in_block(p)) {
25119 if (NUMPARAM_ID_P(id) || dvar_defined(p, id)) return 1;
25120 }
25121 if (local_id(p, id)) return 1;
25122 /* method call without arguments */
25123 return 0;
25124 }
25125 }
25126 compile_error(p, "identifier %"PRIsVALUE" is not valid to get", rb_id2str(id));
25127 return 0;
25128}
25129#endif
25130
25131static inline enum lex_state_e
25132parser_set_lex_state(struct parser_params *p, enum lex_state_e ls, int line)
25133{
25134 if (p->debug) {
25135 ls = rb_parser_trace_lex_state(p, p->lex.state, ls, line);
25136 }
25137 return p->lex.state = ls;
25138}
25139
25140#ifndef RIPPER
25141static void
25142flush_debug_buffer(struct parser_params *p, VALUE out, VALUE str)
25143{
25144 VALUE mesg = p->debug_buffer;
25145
25146 if (!NIL_P(mesg) && RSTRING_LEN(mesg)) {
25147 p->debug_buffer = Qnil;
25148 rb_io_puts(1, &mesg, out);
25149 }
25150 if (!NIL_P(str) && RSTRING_LEN(str)) {
25151 rb_io_write(p->debug_output, str);
25152 }
25153}
25154
25155static const char rb_parser_lex_state_names[][8] = {
25156 "BEG", "END", "ENDARG", "ENDFN", "ARG",
25157 "CMDARG", "MID", "FNAME", "DOT", "CLASS",
25158 "LABEL", "LABELED","FITEM",
25159};
25160
25161static VALUE
25162append_lex_state_name(struct parser_params *p, enum lex_state_e state, VALUE buf)
25163{
25164 int i, sep = 0;
25165 unsigned int mask = 1;
25166 static const char none[] = "NONE";
25167
25168 for (i = 0; i < EXPR_MAX_STATE; ++i, mask <<= 1) {
25169 if ((unsigned)state & mask) {
25170 if (sep) {
25171 rb_str_cat(buf, "|", 1);
25172 }
25173 sep = 1;
25174 rb_str_cat_cstr(buf, rb_parser_lex_state_names[i]);
25175 }
25176 }
25177 if (!sep) {
25178 rb_str_cat(buf, none, sizeof(none)-1);
25179 }
25180 return buf;
25181}
25182
25183enum lex_state_e
25184rb_parser_trace_lex_state(struct parser_params *p, enum lex_state_e from,
25185 enum lex_state_e to, int line)
25186{
25187 VALUE mesg;
25188 mesg = rb_str_new_cstr("lex_state: ");
25189 append_lex_state_name(p, from, mesg);
25190 rb_str_cat_cstr(mesg, " -> ");
25191 append_lex_state_name(p, to, mesg);
25192 rb_str_catf(mesg, " at line %d\n", line);
25193 flush_debug_buffer(p, p->debug_output, mesg);
25194 return to;
25195}
25196
25197VALUE
25198rb_parser_lex_state_name(struct parser_params *p, enum lex_state_e state)
25199{
25200 return rb_str_to_interned_str(append_lex_state_name(p, state, rb_str_new(0, 0)));
25201}
25202
25203static void
25204append_bitstack_value(struct parser_params *p, stack_type stack, VALUE mesg)
25205{
25206 if (stack == 0) {
25207 rb_str_cat_cstr(mesg, "0");
25208 }
25209 else {
25210 stack_type mask = (stack_type)1U << (CHAR_BIT * sizeof(stack_type) - 1);
25211 for (; mask && !(stack & mask); mask >>= 1) continue;
25212 for (; mask; mask >>= 1) rb_str_cat(mesg, stack & mask ? "1" : "0", 1);
25213 }
25214}
25215
25216void
25217rb_parser_show_bitstack(struct parser_params *p, stack_type stack,
25218 const char *name, int line)
25219{
25220 VALUE mesg = rb_sprintf("%s: ", name);
25221 append_bitstack_value(p, stack, mesg);
25222 rb_str_catf(mesg, " at line %d\n", line);
25223 flush_debug_buffer(p, p->debug_output, mesg);
25224}
25225
25226void
25227rb_parser_fatal(struct parser_params *p, const char *fmt, ...)
25228{
25229 va_list ap;
25230 VALUE mesg = rb_str_new_cstr("internal parser error: ");
25231
25232 va_start(ap, fmt);
25233 rb_str_vcatf(mesg, fmt, ap);
25234 va_end(ap);
25235 yyerror0(RSTRING_PTR(mesg));
25236 RB_GC_GUARD(mesg);
25237
25238 mesg = rb_str_new(0, 0);
25239 append_lex_state_name(p, p->lex.state, mesg);
25240 compile_error(p, "lex.state: %"PRIsVALUE, mesg);
25241 rb_str_resize(mesg, 0);
25242 append_bitstack_value(p, p->cond_stack, mesg);
25243 compile_error(p, "cond_stack: %"PRIsVALUE, mesg);
25244 rb_str_resize(mesg, 0);
25245 append_bitstack_value(p, p->cmdarg_stack, mesg);
25246 compile_error(p, "cmdarg_stack: %"PRIsVALUE, mesg);
25247 if (p->debug_output == rb_ractor_stdout())
25248 p->debug_output = rb_ractor_stderr();
25249 p->debug = TRUE;
25250}
25251
25252static YYLTYPE *
25253rb_parser_set_pos(YYLTYPE *yylloc, int sourceline, int beg_pos, int end_pos)
25254{
25255 yylloc->beg_pos.lineno = sourceline;
25256 yylloc->beg_pos.column = beg_pos;
25257 yylloc->end_pos.lineno = sourceline;
25258 yylloc->end_pos.column = end_pos;
25259 return yylloc;
25260}
25261
25262YYLTYPE *
25263rb_parser_set_location_from_strterm_heredoc(struct parser_params *p, rb_strterm_heredoc_t *here, YYLTYPE *yylloc)
25264{
25265 int sourceline = here->sourceline;
25266 int beg_pos = (int)here->offset - here->quote
25267 - (rb_strlen_lit("<<-") - !(here->func & STR_FUNC_INDENT));
25268 int end_pos = (int)here->offset + here->length + here->quote;
25269
25270 return rb_parser_set_pos(yylloc, sourceline, beg_pos, end_pos);
25271}
25272
25273YYLTYPE *
25274rb_parser_set_location_of_delayed_token(struct parser_params *p, YYLTYPE *yylloc)
25275{
25276 yylloc->beg_pos.lineno = p->delayed.beg_line;
25277 yylloc->beg_pos.column = p->delayed.beg_col;
25278 yylloc->end_pos.lineno = p->delayed.end_line;
25279 yylloc->end_pos.column = p->delayed.end_col;
25280
25281 return yylloc;
25282}
25283
25284YYLTYPE *
25285rb_parser_set_location_of_heredoc_end(struct parser_params *p, YYLTYPE *yylloc)
25286{
25287 int sourceline = p->ruby_sourceline;
25288 int beg_pos = (int)(p->lex.ptok - p->lex.pbeg);
25289 int end_pos = (int)(p->lex.pend - p->lex.pbeg);
25290 return rb_parser_set_pos(yylloc, sourceline, beg_pos, end_pos);
25291}
25292
25293YYLTYPE *
25294rb_parser_set_location_of_dummy_end(struct parser_params *p, YYLTYPE *yylloc)
25295{
25296 yylloc->end_pos = yylloc->beg_pos;
25297
25298 return yylloc;
25299}
25300
25301YYLTYPE *
25302rb_parser_set_location_of_none(struct parser_params *p, YYLTYPE *yylloc)
25303{
25304 int sourceline = p->ruby_sourceline;
25305 int beg_pos = (int)(p->lex.ptok - p->lex.pbeg);
25306 int end_pos = (int)(p->lex.ptok - p->lex.pbeg);
25307 return rb_parser_set_pos(yylloc, sourceline, beg_pos, end_pos);
25308}
25309
25310YYLTYPE *
25311rb_parser_set_location(struct parser_params *p, YYLTYPE *yylloc)
25312{
25313 int sourceline = p->ruby_sourceline;
25314 int beg_pos = (int)(p->lex.ptok - p->lex.pbeg);
25315 int end_pos = (int)(p->lex.pcur - p->lex.pbeg);
25316 return rb_parser_set_pos(yylloc, sourceline, beg_pos, end_pos);
25317}
25318#endif /* !RIPPER */
25319
25320static int
25321assignable0(struct parser_params *p, ID id, const char **err)
25322{
25323 if (!id) return -1;
25324 switch (id) {
25325 case keyword_self:
25326 *err = "Can't change the value of self";
25327 return -1;
25328 case keyword_nil:
25329 *err = "Can't assign to nil";
25330 return -1;
25331 case keyword_true:
25332 *err = "Can't assign to true";
25333 return -1;
25334 case keyword_false:
25335 *err = "Can't assign to false";
25336 return -1;
25337 case keyword__FILE__:
25338 *err = "Can't assign to __FILE__";
25339 return -1;
25340 case keyword__LINE__:
25341 *err = "Can't assign to __LINE__";
25342 return -1;
25343 case keyword__ENCODING__:
25344 *err = "Can't assign to __ENCODING__";
25345 return -1;
25346 }
25347 switch (id_type(id)) {
25348 case ID_LOCAL:
25349 if (dyna_in_block(p)) {
25350 if (p->max_numparam > NO_PARAM && NUMPARAM_ID_P(id)) {
25351 compile_error(p, "Can't assign to numbered parameter _%d",
25352 NUMPARAM_ID_TO_IDX(id));
25353 return -1;
25354 }
25355 if (dvar_curr(p, id)) return NODE_DASGN;
25356 if (dvar_defined(p, id)) return NODE_DASGN;
25357 if (local_id(p, id)) return NODE_LASGN;
25358 dyna_var(p, id);
25359 return NODE_DASGN;
25360 }
25361 else {
25362 if (!local_id(p, id)) local_var(p, id);
25363 return NODE_LASGN;
25364 }
25365 break;
25366 case ID_GLOBAL: return NODE_GASGN;
25367 case ID_INSTANCE: return NODE_IASGN;
25368 case ID_CONST:
25369 if (!p->ctxt.in_def) return NODE_CDECL;
25370 *err = "dynamic constant assignment";
25371 return -1;
25372 case ID_CLASS: return NODE_CVASGN;
25373 default:
25374 compile_error(p, "identifier %"PRIsVALUE" is not valid to set", rb_id2str(id));
25375 }
25376 return -1;
25377}
25378
25379static NODE*
25380assignable(struct parser_params *p, ID id, NODE *val, const YYLTYPE *loc)
25381{
25382 const char *err = 0;
25383 int node_type = assignable0(p, id, &err);
25384 switch (node_type) {
25385 case NODE_DASGN: return NEW_DASGN(id, val, loc);
25386 case NODE_LASGN: return NEW_LASGN(id, val, loc);
25387 case NODE_GASGN: return NEW_GASGN(id, val, loc);
25388 case NODE_IASGN: return NEW_IASGN(id, val, loc);
25389 case NODE_CDECL: return NEW_CDECL(id, val, 0, p->ctxt.shareable_constant_value, loc);
25390 case NODE_CVASGN: return NEW_CVASGN(id, val, loc);
25391 }
25392/* TODO: FIXME */
25393#ifndef RIPPER
25394 if (err) yyerror1(loc, err);
25395#else
25396 if (err) set_value(assign_error(p, err, p->s_lvalue));
25397#endif
25398 return NEW_ERROR(loc);
25399}
25400
25401static int
25402is_private_local_id(struct parser_params *p, ID name)
25403{
25404 VALUE s;
25405 if (name == idUScore) return 1;
25406 if (!is_local_id(name)) return 0;
25407 s = rb_id2str(name);
25408 if (!s) return 0;
25409 return RSTRING_PTR(s)[0] == '_';
25410}
25411
25412static int
25413shadowing_lvar_0(struct parser_params *p, ID name)
25414{
25415 if (dyna_in_block(p)) {
25416 if (dvar_curr(p, name)) {
25417 if (is_private_local_id(p, name)) return 1;
25418 yyerror0("duplicated argument name");
25419 }
25420 else if (dvar_defined(p, name) || local_id(p, name)) {
25421 vtable_add(p->lvtbl->vars, name);
25422 if (p->lvtbl->used) {
25423 vtable_add(p->lvtbl->used, (ID)p->ruby_sourceline | LVAR_USED);
25424 }
25425 return 0;
25426 }
25427 }
25428 else {
25429 if (local_id(p, name)) {
25430 if (is_private_local_id(p, name)) return 1;
25431 yyerror0("duplicated argument name");
25432 }
25433 }
25434 return 1;
25435}
25436
25437static ID
25438shadowing_lvar(struct parser_params *p, ID name)
25439{
25440 shadowing_lvar_0(p, name);
25441 return name;
25442}
25443
25444static void
25445new_bv(struct parser_params *p, ID name)
25446{
25447 if (!name) return;
25448 if (!is_local_id(name)) {
25449 compile_error(p, "invalid local variable - %"PRIsVALUE,
25450 rb_id2str(name));
25451 return;
25452 }
25453 if (!shadowing_lvar_0(p, name)) return;
25454 dyna_var(p, name);
25455 ID *vidp = 0;
25456 if (dvar_defined_ref(p, name, &vidp)) {
25457 if (vidp) *vidp |= LVAR_USED;
25458 }
25459}
25460
25461static void
25462aryset_check(struct parser_params *p, NODE *args)
25463{
25464 NODE *block = 0, *kwds = 0;
25465 if (args && nd_type_p(args, NODE_BLOCK_PASS)) {
25466 block = RNODE_BLOCK_PASS(args)->nd_body;
25467 args = RNODE_BLOCK_PASS(args)->nd_head;
25468 }
25469 if (args && nd_type_p(args, NODE_ARGSCAT)) {
25470 args = RNODE_ARGSCAT(args)->nd_body;
25471 }
25472 if (args && nd_type_p(args, NODE_ARGSPUSH)) {
25473 kwds = RNODE_ARGSPUSH(args)->nd_body;
25474 }
25475 else {
25476 for (NODE *next = args; next && nd_type_p(next, NODE_LIST);
25477 next = RNODE_LIST(next)->nd_next) {
25478 kwds = RNODE_LIST(next)->nd_head;
25479 }
25480 }
25481 if (kwds && nd_type_p(kwds, NODE_HASH) && !RNODE_HASH(kwds)->nd_brace) {
25482 yyerror1(&kwds->nd_loc, "keyword arg given in index assignment");
25483 }
25484 if (block) {
25485 yyerror1(&block->nd_loc, "block arg given in index assignment");
25486 }
25487}
25488
25489static NODE *
25490aryset(struct parser_params *p, NODE *recv, NODE *idx, const YYLTYPE *loc)
25491{
25492 aryset_check(p, idx);
25493 return NEW_ATTRASGN(recv, tASET, idx, loc);
25494}
25495
25496static void
25497block_dup_check(struct parser_params *p, NODE *node1, NODE *node2)
25498{
25499 if (node2 && node1 && nd_type_p(node1, NODE_BLOCK_PASS)) {
25500 compile_error(p, "both block arg and actual block given");
25501 }
25502}
25503
25504static NODE *
25505attrset(struct parser_params *p, NODE *recv, ID atype, ID id, const YYLTYPE *loc)
25506{
25507 if (!CALL_Q_P(atype)) id = rb_id_attrset(id);
25508 return NEW_ATTRASGN(recv, id, 0, loc);
25509}
25510
25511static VALUE
25512rb_backref_error(struct parser_params *p, NODE *node)
25513{
25514#ifndef RIPPER
25515# define ERR(...) (compile_error(p, __VA_ARGS__), Qtrue)
25516#else
25517# define ERR(...) rb_sprintf(__VA_ARGS__)
25518#endif
25519 switch (nd_type(node)) {
25520 case NODE_NTH_REF:
25521 return ERR("Can't set variable $%ld", RNODE_NTH_REF(node)->nd_nth);
25522 case NODE_BACK_REF:
25523 return ERR("Can't set variable $%c", (int)RNODE_BACK_REF(node)->nd_nth);
25524 }
25525#undef ERR
25526 UNREACHABLE_RETURN(Qfalse); /* only called on syntax error */
25527}
25528
25529static NODE *
25530arg_append(struct parser_params *p, NODE *node1, NODE *node2, const YYLTYPE *loc)
25531{
25532 if (!node1) return NEW_LIST(node2, &node2->nd_loc);
25533 switch (nd_type(node1)) {
25534 case NODE_LIST:
25535 return list_append(p, node1, node2);
25536 case NODE_BLOCK_PASS:
25537 RNODE_BLOCK_PASS(node1)->nd_head = arg_append(p, RNODE_BLOCK_PASS(node1)->nd_head, node2, loc);
25538 node1->nd_loc.end_pos = RNODE_BLOCK_PASS(node1)->nd_head->nd_loc.end_pos;
25539 return node1;
25540 case NODE_ARGSPUSH:
25541 RNODE_ARGSPUSH(node1)->nd_body = list_append(p, NEW_LIST(RNODE_ARGSPUSH(node1)->nd_body, &RNODE_ARGSPUSH(node1)->nd_body->nd_loc), node2);
25542 node1->nd_loc.end_pos = RNODE_ARGSPUSH(node1)->nd_body->nd_loc.end_pos;
25543 nd_set_type(node1, NODE_ARGSCAT);
25544 return node1;
25545 case NODE_ARGSCAT:
25546 if (!nd_type_p(RNODE_ARGSCAT(node1)->nd_body, NODE_LIST)) break;
25547 RNODE_ARGSCAT(node1)->nd_body = list_append(p, RNODE_ARGSCAT(node1)->nd_body, node2);
25548 node1->nd_loc.end_pos = RNODE_ARGSCAT(node1)->nd_body->nd_loc.end_pos;
25549 return node1;
25550 }
25551 return NEW_ARGSPUSH(node1, node2, loc);
25552}
25553
25554static NODE *
25555arg_concat(struct parser_params *p, NODE *node1, NODE *node2, const YYLTYPE *loc)
25556{
25557 if (!node2) return node1;
25558 switch (nd_type(node1)) {
25559 case NODE_BLOCK_PASS:
25560 if (RNODE_BLOCK_PASS(node1)->nd_head)
25561 RNODE_BLOCK_PASS(node1)->nd_head = arg_concat(p, RNODE_BLOCK_PASS(node1)->nd_head, node2, loc);
25562 else
25563 RNODE_LIST(node1)->nd_head = NEW_LIST(node2, loc);
25564 return node1;
25565 case NODE_ARGSPUSH:
25566 if (!nd_type_p(node2, NODE_LIST)) break;
25567 RNODE_ARGSPUSH(node1)->nd_body = list_concat(NEW_LIST(RNODE_ARGSPUSH(node1)->nd_body, loc), node2);
25568 nd_set_type(node1, NODE_ARGSCAT);
25569 return node1;
25570 case NODE_ARGSCAT:
25571 if (!nd_type_p(node2, NODE_LIST) ||
25572 !nd_type_p(RNODE_ARGSCAT(node1)->nd_body, NODE_LIST)) break;
25573 RNODE_ARGSCAT(node1)->nd_body = list_concat(RNODE_ARGSCAT(node1)->nd_body, node2);
25574 return node1;
25575 }
25576 return NEW_ARGSCAT(node1, node2, loc);
25577}
25578
25579static NODE *
25580last_arg_append(struct parser_params *p, NODE *args, NODE *last_arg, const YYLTYPE *loc)
25581{
25582 NODE *n1;
25583 if ((n1 = splat_array(args)) != 0) {
25584 return list_append(p, n1, last_arg);
25585 }
25586 return arg_append(p, args, last_arg, loc);
25587}
25588
25589static NODE *
25590rest_arg_append(struct parser_params *p, NODE *args, NODE *rest_arg, const YYLTYPE *loc)
25591{
25592 NODE *n1;
25593 if ((nd_type_p(rest_arg, NODE_LIST)) && (n1 = splat_array(args)) != 0) {
25594 return list_concat(n1, rest_arg);
25595 }
25596 return arg_concat(p, args, rest_arg, loc);
25597}
25598
25599static NODE *
25600splat_array(NODE* node)
25601{
25602 if (nd_type_p(node, NODE_SPLAT)) node = RNODE_SPLAT(node)->nd_head;
25603 if (nd_type_p(node, NODE_LIST)) return node;
25604 return 0;
25605}
25606
25607static void
25608mark_lvar_used(struct parser_params *p, NODE *rhs)
25609{
25610 ID *vidp = NULL;
25611 if (!rhs) return;
25612 switch (nd_type(rhs)) {
25613 case NODE_LASGN:
25614 if (local_id_ref(p, RNODE_LASGN(rhs)->nd_vid, &vidp)) {
25615 if (vidp) *vidp |= LVAR_USED;
25616 }
25617 break;
25618 case NODE_DASGN:
25619 if (dvar_defined_ref(p, RNODE_DASGN(rhs)->nd_vid, &vidp)) {
25620 if (vidp) *vidp |= LVAR_USED;
25621 }
25622 break;
25623#if 0
25624 case NODE_MASGN:
25625 for (rhs = rhs->nd_head; rhs; rhs = rhs->nd_next) {
25626 mark_lvar_used(p, rhs->nd_head);
25627 }
25628 break;
25629#endif
25630 }
25631}
25632
25633static int is_static_content(NODE *node);
25634
25635static NODE *
25636node_assign(struct parser_params *p, NODE *lhs, NODE *rhs, struct lex_context ctxt, const YYLTYPE *loc)
25637{
25638 if (!lhs) return 0;
25639
25640 switch (nd_type(lhs)) {
25641 case NODE_CDECL:
25642 case NODE_GASGN:
25643 case NODE_IASGN:
25644 case NODE_LASGN:
25645 case NODE_DASGN:
25646 case NODE_MASGN:
25647 case NODE_CVASGN:
25648 set_nd_value(p, lhs, rhs);
25649 nd_set_loc(lhs, loc);
25650 break;
25651
25652 case NODE_ATTRASGN:
25653 RNODE_ATTRASGN(lhs)->nd_args = arg_append(p, RNODE_ATTRASGN(lhs)->nd_args, rhs, loc);
25654 nd_set_loc(lhs, loc);
25655 break;
25656
25657 default:
25658 /* should not happen */
25659 break;
25660 }
25661
25662 return lhs;
25663}
25664
25665static NODE *
25666value_expr_check(struct parser_params *p, NODE *node)
25667{
25668 NODE *void_node = 0, *vn;
25669
25670 if (!node) {
25671 rb_warning0("empty expression");
25672 }
25673 while (node) {
25674 switch (nd_type(node)) {
25675 case NODE_ENSURE:
25676 vn = RNODE_ENSURE(node)->nd_head;
25677 node = RNODE_ENSURE(node)->nd_ensr;
25678 /* nd_ensr should not be NULL, check it out next */
25679 if (vn && (vn = value_expr_check(p, vn))) {
25680 goto found;
25681 }
25682 break;
25683
25684 case NODE_RESCUE:
25685 /* void only if all children are void */
25686 vn = RNODE_RESCUE(node)->nd_head;
25687 if (!vn || !(vn = value_expr_check(p, vn))) {
25688 if (!RNODE_RESCUE(node)->nd_else) return NULL;
25689 }
25690 if (!void_node) void_node = vn;
25691 for (NODE *r = RNODE_RESCUE(node)->nd_resq; r; r = RNODE_RESBODY(r)->nd_next) {
25692 if (!nd_type_p(r, NODE_RESBODY)) {
25693 compile_error(p, "unexpected node");
25694 return NULL;
25695 }
25696 if (!(vn = value_expr_check(p, RNODE_RESBODY(r)->nd_body))) {
25697 return NULL;
25698 }
25699 if (!void_node) void_node = vn;
25700 }
25701 node = RNODE_RESCUE(node)->nd_else;
25702 if (!node) return void_node;
25703 break;
25704
25705 case NODE_RETURN:
25706 case NODE_BREAK:
25707 case NODE_NEXT:
25708 case NODE_REDO:
25709 case NODE_RETRY:
25710 goto found;
25711
25712 case NODE_CASE:
25713 case NODE_CASE2:
25714 for (node = RNODE_CASE(node)->nd_body;
25715 node && nd_type_p(node, NODE_WHEN);
25716 node = RNODE_WHEN(node)->nd_next) {
25717 if (!(vn = value_expr_check(p, RNODE_WHEN(node)->nd_body))) {
25718 return NULL;
25719 }
25720 if (!void_node) void_node = vn;
25721 }
25722 break;
25723
25724 case NODE_CASE3:
25725 {
25726 NODE *in = RNODE_CASE3(node)->nd_body;
25727 if (!in || !nd_type_p(in, NODE_IN)) {
25728 compile_error(p, "unexpected node");
25729 return NULL;
25730 }
25731 if (!RNODE_IN(in)->nd_body) {
25732 /* single line pattern matching with "=>" operator */
25733 goto found;
25734 }
25735 do {
25736 vn = value_expr_check(p, RNODE_IN(in)->nd_body);
25737 if (!vn) return NULL;
25738 if (!void_node) void_node = vn;
25739 in = RNODE_IN(in)->nd_next;
25740 } while (in && nd_type_p(in, NODE_IN));
25741 node = in; /* else */
25742 }
25743 break;
25744
25745 case NODE_BLOCK:
25746 while (RNODE_BLOCK(node)->nd_next) {
25747 vn = value_expr_check(p, RNODE_BLOCK(node)->nd_head);
25748 if (vn) return vn;
25749 node = RNODE_BLOCK(node)->nd_next;
25750 }
25751 node = RNODE_BLOCK(node)->nd_head;
25752 break;
25753
25754 case NODE_BEGIN:
25755 node = RNODE_BEGIN(node)->nd_body;
25756 break;
25757
25758 case NODE_IF:
25759 case NODE_UNLESS:
25760 if (!RNODE_IF(node)->nd_body) {
25761 return NULL;
25762 }
25763 else if (!RNODE_IF(node)->nd_else) {
25764 return NULL;
25765 }
25766 vn = value_expr_check(p, RNODE_IF(node)->nd_body);
25767 if (!vn) return NULL;
25768 if (!void_node) void_node = vn;
25769 node = RNODE_IF(node)->nd_else;
25770 break;
25771
25772 case NODE_AND:
25773 case NODE_OR:
25774 node = RNODE_AND(node)->nd_1st;
25775 break;
25776
25777 case NODE_LASGN:
25778 case NODE_DASGN:
25779 case NODE_MASGN:
25780 mark_lvar_used(p, node);
25781 return NULL;
25782
25783 default:
25784 return NULL;
25785 }
25786 }
25787
25788 return NULL;
25789
25790 found:
25791 /* return the first found node */
25792 return void_node ? void_node : node;
25793}
25794
25795static int
25796value_expr(struct parser_params *p, NODE *node)
25797{
25798 NODE *void_node = value_expr_check(p, node);
25799 if (void_node) {
25800 yyerror1(&void_node->nd_loc, "void value expression");
25801 /* or "control never reach"? */
25802 return FALSE;
25803 }
25804 return TRUE;
25805}
25806
25807static void
25808void_expr(struct parser_params *p, NODE *node)
25809{
25810 const char *useless = 0;
25811
25812 if (!RTEST(ruby_verbose)) return;
25813
25814 if (!node || !(node = nd_once_body(node))) return;
25815 switch (nd_type(node)) {
25816 case NODE_OPCALL:
25817 switch (RNODE_OPCALL(node)->nd_mid) {
25818 case '+':
25819 case '-':
25820 case '*':
25821 case '/':
25822 case '%':
25823 case tPOW:
25824 case tUPLUS:
25825 case tUMINUS:
25826 case '|':
25827 case '^':
25828 case '&':
25829 case tCMP:
25830 case '>':
25831 case tGEQ:
25832 case '<':
25833 case tLEQ:
25834 case tEQ:
25835 case tNEQ:
25836 useless = rb_id2name(RNODE_OPCALL(node)->nd_mid);
25837 break;
25838 }
25839 break;
25840
25841 case NODE_LVAR:
25842 case NODE_DVAR:
25843 case NODE_GVAR:
25844 case NODE_IVAR:
25845 case NODE_CVAR:
25846 case NODE_NTH_REF:
25847 case NODE_BACK_REF:
25848 useless = "a variable";
25849 break;
25850 case NODE_CONST:
25851 useless = "a constant";
25852 break;
25853 case NODE_SYM:
25854 case NODE_LINE:
25855 case NODE_FILE:
25856 case NODE_ENCODING:
25857 case NODE_INTEGER:
25858 case NODE_FLOAT:
25859 case NODE_RATIONAL:
25860 case NODE_IMAGINARY:
25861 case NODE_STR:
25862 case NODE_DSTR:
25863 case NODE_REGX:
25864 case NODE_DREGX:
25865 useless = "a literal";
25866 break;
25867 case NODE_COLON2:
25868 case NODE_COLON3:
25869 useless = "::";
25870 break;
25871 case NODE_DOT2:
25872 useless = "..";
25873 break;
25874 case NODE_DOT3:
25875 useless = "...";
25876 break;
25877 case NODE_SELF:
25878 useless = "self";
25879 break;
25880 case NODE_NIL:
25881 useless = "nil";
25882 break;
25883 case NODE_TRUE:
25884 useless = "true";
25885 break;
25886 case NODE_FALSE:
25887 useless = "false";
25888 break;
25889 case NODE_DEFINED:
25890 useless = "defined?";
25891 break;
25892 }
25893
25894 if (useless) {
25895 rb_warn1L(nd_line(node), "possibly useless use of %s in void context", WARN_S(useless));
25896 }
25897}
25898
25899/* warns useless use of block and returns the last statement node */
25900static NODE *
25901void_stmts(struct parser_params *p, NODE *node)
25902{
25903 NODE *const n = node;
25904 if (!RTEST(ruby_verbose)) return n;
25905 if (!node) return n;
25906 if (!nd_type_p(node, NODE_BLOCK)) return n;
25907
25908 while (RNODE_BLOCK(node)->nd_next) {
25909 void_expr(p, RNODE_BLOCK(node)->nd_head);
25910 node = RNODE_BLOCK(node)->nd_next;
25911 }
25912 return RNODE_BLOCK(node)->nd_head;
25913}
25914
25915static NODE *
25916remove_begin(NODE *node)
25917{
25918 NODE **n = &node, *n1 = node;
25919 while (n1 && nd_type_p(n1, NODE_BEGIN) && RNODE_BEGIN(n1)->nd_body) {
25920 *n = n1 = RNODE_BEGIN(n1)->nd_body;
25921 }
25922 return node;
25923}
25924
25925static void
25926reduce_nodes(struct parser_params *p, NODE **body)
25927{
25928 NODE *node = *body;
25929
25930 if (!node) {
25931 *body = NEW_NIL(&NULL_LOC);
25932 return;
25933 }
25934#define subnodes(type, n1, n2) \
25935 ((!type(node)->n1) ? (type(node)->n2 ? (body = &type(node)->n2, 1) : 0) : \
25936 (!type(node)->n2) ? (body = &type(node)->n1, 1) : \
25937 (reduce_nodes(p, &type(node)->n1), body = &type(node)->n2, 1))
25938
25939 while (node) {
25940 int newline = (int)nd_fl_newline(node);
25941 switch (nd_type(node)) {
25942 end:
25943 case NODE_NIL:
25944 *body = 0;
25945 return;
25946 case NODE_BEGIN:
25947 *body = node = RNODE_BEGIN(node)->nd_body;
25948 if (newline && node) nd_set_fl_newline(node);
25949 continue;
25950 case NODE_BLOCK:
25951 body = &RNODE_BLOCK(RNODE_BLOCK(node)->nd_end)->nd_head;
25952 break;
25953 case NODE_IF:
25954 case NODE_UNLESS:
25955 if (subnodes(RNODE_IF, nd_body, nd_else)) break;
25956 return;
25957 case NODE_CASE:
25958 body = &RNODE_CASE(node)->nd_body;
25959 break;
25960 case NODE_WHEN:
25961 if (!subnodes(RNODE_WHEN, nd_body, nd_next)) goto end;
25962 break;
25963 case NODE_ENSURE:
25964 body = &RNODE_ENSURE(node)->nd_head;
25965 break;
25966 case NODE_RESCUE:
25967 newline = 0; // RESBODY should not be a NEWLINE
25968 if (RNODE_RESCUE(node)->nd_else) {
25969 body = &RNODE_RESCUE(node)->nd_resq;
25970 break;
25971 }
25972 if (!subnodes(RNODE_RESCUE, nd_head, nd_resq)) goto end;
25973 break;
25974 default:
25975 return;
25976 }
25977 node = *body;
25978 if (newline && node) nd_set_fl_newline(node);
25979 }
25980
25981#undef subnodes
25982}
25983
25984static int
25985is_static_content(NODE *node)
25986{
25987 if (!node) return 1;
25988 switch (nd_type(node)) {
25989 case NODE_HASH:
25990 if (!(node = RNODE_HASH(node)->nd_head)) break;
25991 case NODE_LIST:
25992 do {
25993 if (!is_static_content(RNODE_LIST(node)->nd_head)) return 0;
25994 } while ((node = RNODE_LIST(node)->nd_next) != 0);
25995 case NODE_SYM:
25996 case NODE_REGX:
25997 case NODE_LINE:
25998 case NODE_FILE:
25999 case NODE_ENCODING:
26000 case NODE_INTEGER:
26001 case NODE_FLOAT:
26002 case NODE_RATIONAL:
26003 case NODE_IMAGINARY:
26004 case NODE_STR:
26005 case NODE_NIL:
26006 case NODE_TRUE:
26007 case NODE_FALSE:
26008 case NODE_ZLIST:
26009 break;
26010 default:
26011 return 0;
26012 }
26013 return 1;
26014}
26015
26016static int
26017assign_in_cond(struct parser_params *p, NODE *node)
26018{
26019 switch (nd_type(node)) {
26020 case NODE_MASGN:
26021 case NODE_LASGN:
26022 case NODE_DASGN:
26023 case NODE_GASGN:
26024 case NODE_IASGN:
26025 case NODE_CVASGN:
26026 case NODE_CDECL:
26027 break;
26028
26029 default:
26030 return 0;
26031 }
26032
26033 if (!get_nd_value(p, node)) return 1;
26034 if (is_static_content(get_nd_value(p, node))) {
26035 /* reports always */
26036 rb_warn0L(nd_line(get_nd_value(p, node)), "found '= literal' in conditional, should be ==");
26037 }
26038 return 1;
26039}
26040
26041enum cond_type {
26042 COND_IN_OP,
26043 COND_IN_COND,
26044 COND_IN_FF
26045};
26046
26047#define SWITCH_BY_COND_TYPE(t, w, arg) do { \
26048 switch (t) { \
26049 case COND_IN_OP: break; \
26050 case COND_IN_COND: rb_##w##0(arg "literal in condition"); break; \
26051 case COND_IN_FF: rb_##w##0(arg "literal in flip-flop"); break; \
26052 } \
26053} while (0)
26054
26055static NODE *cond0(struct parser_params*,NODE*,enum cond_type,const YYLTYPE*,bool);
26056
26057static NODE*
26058range_op(struct parser_params *p, NODE *node, const YYLTYPE *loc)
26059{
26060 enum node_type type;
26061
26062 if (node == 0) return 0;
26063
26064 type = nd_type(node);
26065 value_expr(p, node);
26066 if (type == NODE_INTEGER) {
26067 if (!e_option_supplied(p)) rb_warn0L(nd_line(node), "integer literal in flip-flop");
26068 ID lineno = rb_intern("$.");
26069 return NEW_CALL(node, tEQ, NEW_LIST(NEW_GVAR(lineno, loc), loc), loc);
26070 }
26071 return cond0(p, node, COND_IN_FF, loc, true);
26072}
26073
26074static NODE*
26075cond0(struct parser_params *p, NODE *node, enum cond_type type, const YYLTYPE *loc, bool top)
26076{
26077 if (node == 0) return 0;
26078 if (!(node = nd_once_body(node))) return 0;
26079 assign_in_cond(p, node);
26080
26081 switch (nd_type(node)) {
26082 case NODE_BEGIN:
26083 RNODE_BEGIN(node)->nd_body = cond0(p, RNODE_BEGIN(node)->nd_body, type, loc, top);
26084 break;
26085
26086 case NODE_DSTR:
26087 case NODE_EVSTR:
26088 case NODE_STR:
26089 case NODE_FILE:
26090 SWITCH_BY_COND_TYPE(type, warn, "string ");
26091 break;
26092
26093 case NODE_REGX:
26094 if (!e_option_supplied(p)) SWITCH_BY_COND_TYPE(type, warn, "regex ");
26095 nd_set_type(node, NODE_MATCH);
26096 break;
26097
26098 case NODE_DREGX:
26099 if (!e_option_supplied(p)) SWITCH_BY_COND_TYPE(type, warning, "regex ");
26100
26101 return NEW_MATCH2(node, NEW_GVAR(idLASTLINE, loc), loc);
26102
26103 case NODE_BLOCK:
26104 {
26105 NODE *end = RNODE_BLOCK(node)->nd_end;
26106 NODE **expr = &RNODE_BLOCK(end)->nd_head;
26107 if (top) top = node == end;
26108 *expr = cond0(p, *expr, type, loc, top);
26109 }
26110 break;
26111
26112 case NODE_AND:
26113 case NODE_OR:
26114 RNODE_AND(node)->nd_1st = cond0(p, RNODE_AND(node)->nd_1st, COND_IN_COND, loc, true);
26115 RNODE_AND(node)->nd_2nd = cond0(p, RNODE_AND(node)->nd_2nd, COND_IN_COND, loc, true);
26116 break;
26117
26118 case NODE_DOT2:
26119 case NODE_DOT3:
26120 if (!top) break;
26121 RNODE_DOT2(node)->nd_beg = range_op(p, RNODE_DOT2(node)->nd_beg, loc);
26122 RNODE_DOT2(node)->nd_end = range_op(p, RNODE_DOT2(node)->nd_end, loc);
26123 switch (nd_type(node)) {
26124 case NODE_DOT2:
26125 nd_set_type(node,NODE_FLIP2);
26126 rb_node_flip2_t *flip2 = RNODE_FLIP2(node); /* for debug info */
26127 (void)flip2;
26128 break;
26129 case NODE_DOT3:
26130 nd_set_type(node, NODE_FLIP3);
26131 rb_node_flip3_t *flip3 = RNODE_FLIP3(node); /* for debug info */
26132 (void)flip3;
26133 break;
26134 }
26135 break;
26136
26137 case NODE_SYM:
26138 case NODE_DSYM:
26139 SWITCH_BY_COND_TYPE(type, warning, "symbol ");
26140 break;
26141
26142 case NODE_LINE:
26143 case NODE_ENCODING:
26144 case NODE_INTEGER:
26145 case NODE_FLOAT:
26146 case NODE_RATIONAL:
26147 case NODE_IMAGINARY:
26148 SWITCH_BY_COND_TYPE(type, warning, "");
26149 break;
26150
26151 default:
26152 break;
26153 }
26154 return node;
26155}
26156
26157static NODE*
26158cond(struct parser_params *p, NODE *node, const YYLTYPE *loc)
26159{
26160 if (node == 0) return 0;
26161 return cond0(p, node, COND_IN_COND, loc, true);
26162}
26163
26164static NODE*
26165method_cond(struct parser_params *p, NODE *node, const YYLTYPE *loc)
26166{
26167 if (node == 0) return 0;
26168 return cond0(p, node, COND_IN_OP, loc, true);
26169}
26170
26171static NODE*
26172new_nil_at(struct parser_params *p, const rb_code_position_t *pos)
26173{
26174 YYLTYPE loc = {*pos, *pos};
26175 return NEW_NIL(&loc);
26176}
26177
26178static NODE*
26179new_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)
26180{
26181 if (!cc) return right;
26182 cc = cond0(p, cc, COND_IN_COND, loc, true);
26183 return newline_node(NEW_IF(cc, left, right, loc, if_keyword_loc, then_keyword_loc, end_keyword_loc));
26184}
26185
26186static NODE*
26187new_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)
26188{
26189 if (!cc) return right;
26190 cc = cond0(p, cc, COND_IN_COND, loc, true);
26191 return newline_node(NEW_UNLESS(cc, left, right, loc, keyword_loc, then_keyword_loc, end_keyword_loc));
26192}
26193
26194#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))
26195
26196static NODE*
26197logop(struct parser_params *p, ID id, NODE *left, NODE *right,
26198 const YYLTYPE *op_loc, const YYLTYPE *loc)
26199{
26200 enum node_type type = id == idAND || id == idANDOP ? NODE_AND : NODE_OR;
26201 NODE *op;
26202 value_expr(p, left);
26203 if (left && nd_type_p(left, type)) {
26204 NODE *node = left, *second;
26205 while ((second = RNODE_AND(node)->nd_2nd) != 0 && nd_type_p(second, type)) {
26206 node = second;
26207 }
26208 RNODE_AND(node)->nd_2nd = NEW_AND_OR(type, second, right, loc, op_loc);
26209 nd_set_line(RNODE_AND(node)->nd_2nd, op_loc->beg_pos.lineno);
26210 left->nd_loc.end_pos = loc->end_pos;
26211 return left;
26212 }
26213 op = NEW_AND_OR(type, left, right, loc, op_loc);
26214 nd_set_line(op, op_loc->beg_pos.lineno);
26215 return op;
26216}
26217
26218#undef NEW_AND_OR
26219
26220static void
26221no_blockarg(struct parser_params *p, NODE *node)
26222{
26223 if (nd_type_p(node, NODE_BLOCK_PASS)) {
26224 compile_error(p, "block argument should not be given");
26225 }
26226}
26227
26228static NODE *
26229ret_args(struct parser_params *p, NODE *node)
26230{
26231 if (node) {
26232 no_blockarg(p, node);
26233 if (nd_type_p(node, NODE_LIST) && !RNODE_LIST(node)->nd_next) {
26234 node = RNODE_LIST(node)->nd_head;
26235 }
26236 }
26237 return node;
26238}
26239
26240static NODE*
26241negate_lit(struct parser_params *p, NODE* node, const YYLTYPE *loc)
26242{
26243 switch (nd_type(node)) {
26244 case NODE_INTEGER:
26245 RNODE_INTEGER(node)->minus = TRUE;
26246 break;
26247 case NODE_FLOAT:
26248 RNODE_FLOAT(node)->minus = TRUE;
26249 break;
26250 case NODE_RATIONAL:
26251 RNODE_RATIONAL(node)->minus = TRUE;
26252 break;
26253 case NODE_IMAGINARY:
26254 RNODE_IMAGINARY(node)->minus = TRUE;
26255 break;
26256 }
26257 node->nd_loc = *loc;
26258 return node;
26259}
26260
26261static NODE *
26262arg_blk_pass(NODE *node1, rb_node_block_pass_t *node2)
26263{
26264 if (node2) {
26265 if (!node1) return (NODE *)node2;
26266 node2->nd_head = node1;
26267 nd_set_first_lineno(node2, nd_first_lineno(node1));
26268 nd_set_first_column(node2, nd_first_column(node1));
26269 return (NODE *)node2;
26270 }
26271 return node1;
26272}
26273
26274static bool
26275args_info_empty_p(struct rb_args_info *args)
26276{
26277 if (args->pre_args_num) return false;
26278 if (args->post_args_num) return false;
26279 if (args->rest_arg) return false;
26280 if (args->opt_args) return false;
26281 if (args->block_arg) return false;
26282 if (args->kw_args) return false;
26283 if (args->kw_rest_arg) return false;
26284 return true;
26285}
26286
26287static rb_node_args_t *
26288new_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)
26289{
26290 struct rb_args_info *args = &tail->nd_ainfo;
26291
26292 if (args->forwarding) {
26293 if (rest_arg) {
26294 yyerror1(&RNODE(tail)->nd_loc, "... after rest argument");
26295 return tail;
26296 }
26297 rest_arg = idFWD_REST;
26298 }
26299
26300 args->pre_args_num = pre_args ? pre_args->nd_plen : 0;
26301 args->pre_init = pre_args ? pre_args->nd_next : 0;
26302
26303 args->post_args_num = post_args ? post_args->nd_plen : 0;
26304 args->post_init = post_args ? post_args->nd_next : 0;
26305 args->first_post_arg = post_args ? post_args->nd_pid : 0;
26306
26307 args->rest_arg = rest_arg;
26308
26309 args->opt_args = opt_args;
26310
26311 nd_set_loc(RNODE(tail), loc);
26312
26313 return tail;
26314}
26315
26316static rb_node_args_t *
26317new_args_tail(struct parser_params *p, rb_node_kw_arg_t *kw_args, ID kw_rest_arg, ID block, const YYLTYPE *kw_rest_loc)
26318{
26319 rb_node_args_t *node = NEW_ARGS(&NULL_LOC);
26320 struct rb_args_info *args = &node->nd_ainfo;
26321 if (p->error_p) return node;
26322
26323 if (block == idNil) {
26324 block = 0;
26325 args->no_blockarg = TRUE;
26326 }
26327 args->block_arg = block;
26328 args->kw_args = kw_args;
26329
26330 if (kw_args) {
26331 /*
26332 * def foo(k1: 1, kr1:, k2: 2, **krest, &b)
26333 * variable order: k1, kr1, k2, &b, internal_id, krest
26334 * #=> <reorder>
26335 * variable order: kr1, k1, k2, internal_id, krest, &b
26336 */
26337 ID kw_bits = internal_id(p), *required_kw_vars, *kw_vars;
26338 struct vtable *vtargs = p->lvtbl->args;
26339 rb_node_kw_arg_t *kwn = kw_args;
26340
26341 if (block) block = vtargs->tbl[vtargs->pos-1];
26342 vtable_pop(vtargs, !!block + !!kw_rest_arg);
26343 required_kw_vars = kw_vars = &vtargs->tbl[vtargs->pos];
26344 while (kwn) {
26345 if (!NODE_REQUIRED_KEYWORD_P(get_nd_value(p, kwn->nd_body)))
26346 --kw_vars;
26347 --required_kw_vars;
26348 kwn = kwn->nd_next;
26349 }
26350
26351 for (kwn = kw_args; kwn; kwn = kwn->nd_next) {
26352 ID vid = get_nd_vid(p, kwn->nd_body);
26353 if (NODE_REQUIRED_KEYWORD_P(get_nd_value(p, kwn->nd_body))) {
26354 *required_kw_vars++ = vid;
26355 }
26356 else {
26357 *kw_vars++ = vid;
26358 }
26359 }
26360
26361 arg_var(p, kw_bits);
26362 if (kw_rest_arg) arg_var(p, kw_rest_arg);
26363 if (block) arg_var(p, block);
26364
26365 args->kw_rest_arg = NEW_DVAR(kw_rest_arg, kw_rest_loc);
26366 }
26367 else if (kw_rest_arg == idNil) {
26368 args->no_kwarg = 1;
26369 }
26370 else if (kw_rest_arg) {
26371 args->kw_rest_arg = NEW_DVAR(kw_rest_arg, kw_rest_loc);
26372 }
26373
26374 return node;
26375}
26376
26377static rb_node_args_t *
26378args_with_numbered(struct parser_params *p, rb_node_args_t *args, int max_numparam, ID it_id)
26379{
26380 if (max_numparam > NO_PARAM || it_id) {
26381 if (!args) {
26382 YYLTYPE loc = RUBY_INIT_YYLLOC();
26383 args = new_empty_args_tail(p, 0);
26384 nd_set_loc(RNODE(args), &loc);
26385 }
26386 args->nd_ainfo.pre_args_num = it_id ? 1 : max_numparam;
26387 }
26388 return args;
26389}
26390
26391static NODE*
26392new_array_pattern(struct parser_params *p, NODE *constant, NODE *pre_arg, NODE *aryptn, const YYLTYPE *loc)
26393{
26394 RNODE_ARYPTN(aryptn)->nd_pconst = constant;
26395
26396 if (pre_arg) {
26397 NODE *pre_args = NEW_LIST(pre_arg, loc);
26398 if (RNODE_ARYPTN(aryptn)->pre_args) {
26399 RNODE_ARYPTN(aryptn)->pre_args = list_concat(pre_args, RNODE_ARYPTN(aryptn)->pre_args);
26400 }
26401 else {
26402 RNODE_ARYPTN(aryptn)->pre_args = pre_args;
26403 }
26404 }
26405 return aryptn;
26406}
26407
26408static NODE*
26409new_array_pattern_tail(struct parser_params *p, NODE *pre_args, int has_rest, NODE *rest_arg, NODE *post_args, const YYLTYPE *loc)
26410{
26411 if (has_rest) {
26412 rest_arg = rest_arg ? rest_arg : NODE_SPECIAL_NO_NAME_REST;
26413 }
26414 else {
26415 rest_arg = NULL;
26416 }
26417 NODE *node = NEW_ARYPTN(pre_args, rest_arg, post_args, loc);
26418
26419 return node;
26420}
26421
26422static NODE*
26423new_find_pattern(struct parser_params *p, NODE *constant, NODE *fndptn, const YYLTYPE *loc)
26424{
26425 RNODE_FNDPTN(fndptn)->nd_pconst = constant;
26426
26427 return fndptn;
26428}
26429
26430static NODE*
26431new_find_pattern_tail(struct parser_params *p, NODE *pre_rest_arg, NODE *args, NODE *post_rest_arg, const YYLTYPE *loc)
26432{
26433 pre_rest_arg = pre_rest_arg ? pre_rest_arg : NODE_SPECIAL_NO_NAME_REST;
26434 post_rest_arg = post_rest_arg ? post_rest_arg : NODE_SPECIAL_NO_NAME_REST;
26435 NODE *node = NEW_FNDPTN(pre_rest_arg, args, post_rest_arg, loc);
26436
26437 return node;
26438}
26439
26440static NODE*
26441new_hash_pattern(struct parser_params *p, NODE *constant, NODE *hshptn, const YYLTYPE *loc)
26442{
26443 RNODE_HSHPTN(hshptn)->nd_pconst = constant;
26444 return hshptn;
26445}
26446
26447static NODE*
26448new_hash_pattern_tail(struct parser_params *p, NODE *kw_args, ID kw_rest_arg, const YYLTYPE *loc)
26449{
26450 NODE *node, *kw_rest_arg_node;
26451
26452 if (kw_rest_arg == idNil) {
26453 kw_rest_arg_node = NODE_SPECIAL_NO_REST_KEYWORD;
26454 }
26455 else if (kw_rest_arg) {
26456 kw_rest_arg_node = assignable(p, kw_rest_arg, 0, loc);
26457 }
26458 else {
26459 kw_rest_arg_node = NULL;
26460 }
26461
26462 node = NEW_HSHPTN(0, kw_args, kw_rest_arg_node, loc);
26463
26464 return node;
26465}
26466
26467static NODE*
26468dsym_node(struct parser_params *p, NODE *node, const YYLTYPE *loc)
26469{
26470 if (!node) {
26471 return NEW_SYM(STR_NEW0(), loc);
26472 }
26473
26474 switch (nd_type(node)) {
26475 case NODE_DSTR:
26476 nd_set_type(node, NODE_DSYM);
26477 nd_set_loc(node, loc);
26478 break;
26479 case NODE_STR:
26480 node = str_to_sym_node(p, node, loc);
26481 break;
26482 default:
26483 node = NEW_DSYM(0, 1, NEW_LIST(node, loc), loc);
26484 break;
26485 }
26486 return node;
26487}
26488
26489static int
26490nd_type_st_key_enable_p(NODE *node)
26491{
26492 switch (nd_type(node)) {
26493 case NODE_INTEGER:
26494 case NODE_FLOAT:
26495 case NODE_RATIONAL:
26496 case NODE_IMAGINARY:
26497 case NODE_STR:
26498 case NODE_SYM:
26499 case NODE_REGX:
26500 case NODE_LINE:
26501 case NODE_FILE:
26502 case NODE_ENCODING:
26503 return true;
26504 default:
26505 return false;
26506 }
26507}
26508
26509static VALUE
26510nd_value(struct parser_params *p, NODE *node)
26511{
26512 switch (nd_type(node)) {
26513 case NODE_STR:
26514 return rb_node_str_string_val(node);
26515 case NODE_INTEGER:
26516 return rb_node_integer_literal_val(node);
26517 case NODE_FLOAT:
26518 return rb_node_float_literal_val(node);
26519 case NODE_RATIONAL:
26520 return rb_node_rational_literal_val(node);
26521 case NODE_IMAGINARY:
26522 return rb_node_imaginary_literal_val(node);
26523 case NODE_SYM:
26524 return rb_node_sym_string_val(node);
26525 case NODE_REGX:
26526 return rb_node_regx_string_val(node);
26527 case NODE_LINE:
26528 return rb_node_line_lineno_val(node);
26529 case NODE_ENCODING:
26530 return rb_node_encoding_val(node);
26531 case NODE_FILE:
26532 return rb_node_file_path_val(node);
26533 default:
26534 rb_bug("unexpected node: %s", ruby_node_name(nd_type(node)));
26536 }
26537}
26538
26539static void
26540warn_duplicate_keys(struct parser_params *p, NODE *hash)
26541{
26542 /* See https://bugs.ruby-lang.org/issues/20331 for discussion about what is warned. */
26543 p->warn_duplicate_keys_table = st_init_table_with_size(&literal_type, RNODE_LIST(hash)->as.nd_alen / 2);
26544 while (hash && RNODE_LIST(hash)->nd_next) {
26545 NODE *head = RNODE_LIST(hash)->nd_head;
26546 NODE *value = RNODE_LIST(hash)->nd_next;
26547 NODE *next = RNODE_LIST(value)->nd_next;
26548 st_data_t key;
26549 st_data_t data;
26550
26551 /* keyword splat, e.g. {k: 1, **z, k: 2} */
26552 if (!head) {
26553 head = value;
26554 }
26555
26556 if (nd_type_st_key_enable_p(head)) {
26557 key = (st_data_t)head;
26558
26559 if (st_delete(p->warn_duplicate_keys_table, &key, &data)) {
26560 rb_warn2L(nd_line((NODE *)data),
26561 "key %+"PRIsWARN" is duplicated and overwritten on line %d",
26562 nd_value(p, head), WARN_I(nd_line(head)));
26563 }
26564 st_insert(p->warn_duplicate_keys_table, (st_data_t)key, (st_data_t)hash);
26565 }
26566 hash = next;
26567 }
26568 st_free_table(p->warn_duplicate_keys_table);
26569 p->warn_duplicate_keys_table = NULL;
26570}
26571
26572static NODE *
26573new_hash(struct parser_params *p, NODE *hash, const YYLTYPE *loc)
26574{
26575 if (hash) warn_duplicate_keys(p, hash);
26576 return NEW_HASH(hash, loc);
26577}
26578
26579static void
26580error_duplicate_pattern_variable(struct parser_params *p, ID id, const YYLTYPE *loc)
26581{
26582 if (is_private_local_id(p, id)) {
26583 return;
26584 }
26585 if (st_is_member(p->pvtbl, id)) {
26586 yyerror1(loc, "duplicated variable name");
26587 }
26588 else if (p->ctxt.in_alt_pattern && id) {
26589 yyerror1(loc, "variable capture in alternative pattern");
26590 }
26591 else {
26592 p->ctxt.capture_in_pattern = 1;
26593 st_insert(p->pvtbl, (st_data_t)id, 0);
26594 }
26595}
26596
26597static void
26598error_duplicate_pattern_key(struct parser_params *p, VALUE key, const YYLTYPE *loc)
26599{
26600 if (!p->pktbl) {
26601 p->pktbl = st_init_numtable();
26602 }
26603 else if (st_is_member(p->pktbl, key)) {
26604 yyerror1(loc, "duplicated key name");
26605 return;
26606 }
26607 st_insert(p->pktbl, (st_data_t)key, 0);
26608}
26609
26610static NODE *
26611new_unique_key_hash(struct parser_params *p, NODE *hash, const YYLTYPE *loc)
26612{
26613 return NEW_HASH(hash, loc);
26614}
26615
26616static NODE *
26617new_op_assign(struct parser_params *p, NODE *lhs, ID op, NODE *rhs, struct lex_context ctxt, const YYLTYPE *loc)
26618{
26619 NODE *asgn;
26620
26621 if (lhs) {
26622 ID vid = get_nd_vid(p, lhs);
26623 YYLTYPE lhs_loc = lhs->nd_loc;
26624 if (op == tOROP) {
26625 set_nd_value(p, lhs, rhs);
26626 nd_set_loc(lhs, loc);
26627 asgn = NEW_OP_ASGN_OR(gettable(p, vid, &lhs_loc), lhs, loc);
26628 }
26629 else if (op == tANDOP) {
26630 set_nd_value(p, lhs, rhs);
26631 nd_set_loc(lhs, loc);
26632 asgn = NEW_OP_ASGN_AND(gettable(p, vid, &lhs_loc), lhs, loc);
26633 }
26634 else {
26635 asgn = lhs;
26636 rhs = NEW_CALL(gettable(p, vid, &lhs_loc), op, NEW_LIST(rhs, &rhs->nd_loc), loc);
26637 set_nd_value(p, asgn, rhs);
26638 nd_set_loc(asgn, loc);
26639 }
26640 }
26641 else {
26642 asgn = NEW_ERROR(loc);
26643 }
26644 return asgn;
26645}
26646
26647static NODE *
26648new_ary_op_assign(struct parser_params *p, NODE *ary,
26649 NODE *args, ID op, NODE *rhs, const YYLTYPE *args_loc, const YYLTYPE *loc,
26650 const YYLTYPE *call_operator_loc, const YYLTYPE *opening_loc, const YYLTYPE *closing_loc, const YYLTYPE *binary_operator_loc)
26651{
26652 NODE *asgn;
26653
26654 aryset_check(p, args);
26655 args = make_list(args, args_loc);
26656 asgn = NEW_OP_ASGN1(ary, op, args, rhs, loc, call_operator_loc, opening_loc, closing_loc, binary_operator_loc);
26657 fixpos(asgn, ary);
26658 return asgn;
26659}
26660
26661static NODE *
26662new_attr_op_assign(struct parser_params *p, NODE *lhs,
26663 ID atype, ID attr, ID op, NODE *rhs, const YYLTYPE *loc,
26664 const YYLTYPE *call_operator_loc, const YYLTYPE *message_loc, const YYLTYPE *binary_operator_loc)
26665{
26666 NODE *asgn;
26667
26668 asgn = NEW_OP_ASGN2(lhs, CALL_Q_P(atype), attr, op, rhs, loc, call_operator_loc, message_loc, binary_operator_loc);
26669 fixpos(asgn, lhs);
26670 return asgn;
26671}
26672
26673static NODE *
26674new_const_op_assign(struct parser_params *p, NODE *lhs, ID op, NODE *rhs, struct lex_context ctxt, const YYLTYPE *loc)
26675{
26676 NODE *asgn;
26677
26678 if (lhs) {
26679 asgn = NEW_OP_CDECL(lhs, op, rhs, ctxt.shareable_constant_value, loc);
26680 }
26681 else {
26682 asgn = NEW_ERROR(loc);
26683 }
26684 fixpos(asgn, lhs);
26685 return asgn;
26686}
26687
26688static NODE *
26689const_decl(struct parser_params *p, NODE *path, const YYLTYPE *loc)
26690{
26691 if (p->ctxt.in_def) {
26692#ifndef RIPPER
26693 yyerror1(loc, "dynamic constant assignment");
26694#else
26695 set_value(assign_error(p, "dynamic constant assignment", p->s_lvalue));
26696#endif
26697 }
26698 return NEW_CDECL(0, 0, (path), p->ctxt.shareable_constant_value, loc);
26699}
26700
26701#ifdef RIPPER
26702static VALUE
26703assign_error(struct parser_params *p, const char *mesg, VALUE a)
26704{
26705 a = dispatch2(assign_error, ERR_MESG(), a);
26706 ripper_error(p);
26707 return a;
26708}
26709#endif
26710
26711static NODE *
26712new_bodystmt(struct parser_params *p, NODE *head, NODE *rescue, NODE *rescue_else, NODE *ensure, const YYLTYPE *loc)
26713{
26714 NODE *result = head;
26715 if (rescue) {
26716 NODE *tmp = rescue_else ? rescue_else : rescue;
26717 YYLTYPE rescue_loc = code_loc_gen(&head->nd_loc, &tmp->nd_loc);
26718
26719 result = NEW_RESCUE(head, rescue, rescue_else, &rescue_loc);
26720 nd_set_line(result, rescue->nd_loc.beg_pos.lineno);
26721 }
26722 if (ensure) {
26723 result = NEW_ENSURE(result, ensure, loc);
26724 }
26725 fixpos(result, head);
26726 return result;
26727}
26728
26729static void
26730warn_unused_var(struct parser_params *p, struct local_vars *local)
26731{
26732 int cnt;
26733
26734 if (!local->used) return;
26735 cnt = local->used->pos;
26736 if (cnt != local->vars->pos) {
26737 rb_parser_fatal(p, "local->used->pos != local->vars->pos");
26738 }
26739#ifndef RIPPER
26740 ID *v = local->vars->tbl;
26741 ID *u = local->used->tbl;
26742 for (int i = 0; i < cnt; ++i) {
26743 if (!v[i] || (u[i] & LVAR_USED)) continue;
26744 if (is_private_local_id(p, v[i])) continue;
26745 rb_warn1L((int)u[i], "assigned but unused variable - %"PRIsWARN, rb_id2str(v[i]));
26746 }
26747#endif
26748}
26749
26750static void
26751local_push(struct parser_params *p, int toplevel_scope)
26752{
26753 struct local_vars *local;
26754 int inherits_dvars = toplevel_scope && compile_for_eval;
26755 int warn_unused_vars = RTEST(ruby_verbose);
26756
26757 local = ALLOC(struct local_vars);
26758 local->prev = p->lvtbl;
26759 local->args = vtable_alloc(0);
26760 local->vars = vtable_alloc(inherits_dvars ? DVARS_INHERIT : DVARS_TOPSCOPE);
26761#ifndef RIPPER
26762 if (toplevel_scope && compile_for_eval) warn_unused_vars = 0;
26763 if (toplevel_scope && e_option_supplied(p)) warn_unused_vars = 0;
26764#endif
26765 local->numparam.outer = 0;
26766 local->numparam.inner = 0;
26767 local->numparam.current = 0;
26768 local->it = 0;
26769 local->used = warn_unused_vars ? vtable_alloc(0) : 0;
26770
26771# if WARN_PAST_SCOPE
26772 local->past = 0;
26773# endif
26774 CMDARG_PUSH(0);
26775 COND_PUSH(0);
26776 p->lvtbl = local;
26777}
26778
26779static void
26780vtable_chain_free(struct parser_params *p, struct vtable *table)
26781{
26782 while (!DVARS_TERMINAL_P(table)) {
26783 struct vtable *cur_table = table;
26784 table = cur_table->prev;
26785 vtable_free(cur_table);
26786 }
26787}
26788
26789static void
26790local_free(struct parser_params *p, struct local_vars *local)
26791{
26792 vtable_chain_free(p, local->used);
26793
26794# if WARN_PAST_SCOPE
26795 vtable_chain_free(p, local->past);
26796# endif
26797
26798 vtable_chain_free(p, local->args);
26799 vtable_chain_free(p, local->vars);
26800
26801 ruby_xfree_sized(local, sizeof(struct local_vars));
26802}
26803
26804static void
26805local_pop(struct parser_params *p)
26806{
26807 struct local_vars *local = p->lvtbl->prev;
26808 if (p->lvtbl->used) {
26809 warn_unused_var(p, p->lvtbl);
26810 }
26811
26812 local_free(p, p->lvtbl);
26813 p->lvtbl = local;
26814
26815 CMDARG_POP();
26816 COND_POP();
26817}
26818
26819static rb_ast_id_table_t *
26820local_tbl(struct parser_params *p)
26821{
26822 int cnt_args = vtable_size(p->lvtbl->args);
26823 int cnt_vars = vtable_size(p->lvtbl->vars);
26824 int cnt = cnt_args + cnt_vars;
26825 int i, j;
26826 rb_ast_id_table_t *tbl;
26827
26828 if (cnt <= 0) return 0;
26829 tbl = rb_ast_new_local_table(p->ast, cnt);
26830 MEMCPY(tbl->ids, p->lvtbl->args->tbl, ID, cnt_args);
26831 /* remove IDs duplicated to warn shadowing */
26832 for (i = 0, j = cnt_args; i < cnt_vars; ++i) {
26833 ID id = p->lvtbl->vars->tbl[i];
26834 if (!vtable_included(p->lvtbl->args, id)) {
26835 tbl->ids[j++] = id;
26836 }
26837 }
26838 if (j < cnt) {
26839 tbl = rb_ast_resize_latest_local_table(p->ast, j);
26840 }
26841
26842 return tbl;
26843}
26844
26845static void
26846numparam_name(struct parser_params *p, ID id)
26847{
26848 if (!NUMPARAM_ID_P(id)) return;
26849 compile_error(p, "_%d is reserved for numbered parameter",
26850 NUMPARAM_ID_TO_IDX(id));
26851}
26852
26853static void
26854arg_var(struct parser_params *p, ID id)
26855{
26856 numparam_name(p, id);
26857 vtable_add(p->lvtbl->args, id);
26858}
26859
26860static void
26861local_var(struct parser_params *p, ID id)
26862{
26863 numparam_name(p, id);
26864 vtable_add(p->lvtbl->vars, id);
26865 if (p->lvtbl->used) {
26866 vtable_add(p->lvtbl->used, (ID)p->ruby_sourceline);
26867 }
26868}
26869
26870#ifndef RIPPER
26871int
26872rb_parser_local_defined(struct parser_params *p, ID id, const struct rb_iseq_struct *iseq)
26873{
26874 return rb_local_defined(id, iseq);
26875}
26876#endif
26877
26878static int
26879local_id_ref(struct parser_params *p, ID id, ID **vidrefp)
26880{
26881 struct vtable *vars, *args, *used;
26882
26883 vars = p->lvtbl->vars;
26884 args = p->lvtbl->args;
26885 used = p->lvtbl->used;
26886
26887 while (vars && !DVARS_TERMINAL_P(vars->prev)) {
26888 vars = vars->prev;
26889 args = args->prev;
26890 if (used) used = used->prev;
26891 }
26892
26893 if (vars && vars->prev == DVARS_INHERIT) {
26894 return rb_parser_local_defined(p, id, p->parent_iseq);
26895 }
26896 else if (vtable_included(args, id)) {
26897 return 1;
26898 }
26899 else {
26900 int i = vtable_included(vars, id);
26901 if (i && used && vidrefp) *vidrefp = &used->tbl[i-1];
26902 return i != 0;
26903 }
26904}
26905
26906static int
26907local_id(struct parser_params *p, ID id)
26908{
26909 return local_id_ref(p, id, NULL);
26910}
26911
26912static int
26913check_forwarding_args(struct parser_params *p)
26914{
26915 if (local_id(p, idFWD_ALL)) return TRUE;
26916 compile_error(p, "unexpected ...");
26917 return FALSE;
26918}
26919
26920static void
26921add_forwarding_args(struct parser_params *p)
26922{
26923 arg_var(p, idFWD_REST);
26924 arg_var(p, idFWD_KWREST);
26925 arg_var(p, idFWD_BLOCK);
26926 arg_var(p, idFWD_ALL);
26927}
26928
26929static void
26930forwarding_arg_check(struct parser_params *p, ID arg, ID all, const char *var)
26931{
26932 bool conflict = false;
26933
26934 struct vtable *vars, *args;
26935
26936 vars = p->lvtbl->vars;
26937 args = p->lvtbl->args;
26938
26939 while (vars && !DVARS_TERMINAL_P(vars->prev)) {
26940 conflict |= (vtable_included(args, arg) && !(all && vtable_included(args, all)));
26941 vars = vars->prev;
26942 args = args->prev;
26943 }
26944
26945 bool found = false;
26946 if (vars && vars->prev == DVARS_INHERIT && !found) {
26947 found = (rb_parser_local_defined(p, arg, p->parent_iseq) &&
26948 !(all && rb_parser_local_defined(p, all, p->parent_iseq)));
26949 }
26950 else {
26951 found = (vtable_included(args, arg) &&
26952 !(all && vtable_included(args, all)));
26953 }
26954
26955 if (!found) {
26956 compile_error(p, "no anonymous %s parameter", var);
26957 }
26958 else if (conflict) {
26959 compile_error(p, "anonymous %s parameter is also used within block", var);
26960 }
26961}
26962
26963static NODE *
26964new_args_forward_call(struct parser_params *p, NODE *leading, const YYLTYPE *loc, const YYLTYPE *argsloc)
26965{
26966 NODE *rest = NEW_LVAR(idFWD_REST, loc);
26967 NODE *kwrest = list_append(p, NEW_LIST(0, loc), NEW_LVAR(idFWD_KWREST, loc));
26968 rb_node_block_pass_t *block = NEW_BLOCK_PASS(NEW_LVAR(idFWD_BLOCK, loc), argsloc, &NULL_LOC);
26969 NODE *args = leading ? rest_arg_append(p, leading, rest, argsloc) : NEW_SPLAT(rest, loc, &NULL_LOC);
26970 block->forwarding = TRUE;
26971 args = arg_append(p, args, new_hash(p, kwrest, loc), argsloc);
26972 return arg_blk_pass(args, block);
26973}
26974
26975static NODE *
26976numparam_push(struct parser_params *p)
26977{
26978 struct local_vars *local = p->lvtbl;
26979 NODE *inner = local->numparam.inner;
26980 if (!local->numparam.outer) {
26981 local->numparam.outer = local->numparam.current;
26982 }
26983 local->numparam.inner = 0;
26984 local->numparam.current = 0;
26985 local->it = 0;
26986 return inner;
26987}
26988
26989static void
26990numparam_pop(struct parser_params *p, NODE *prev_inner)
26991{
26992 struct local_vars *local = p->lvtbl;
26993 if (prev_inner) {
26994 /* prefer first one */
26995 local->numparam.inner = prev_inner;
26996 }
26997 else if (local->numparam.current) {
26998 /* current and inner are exclusive */
26999 local->numparam.inner = local->numparam.current;
27000 }
27001 if (p->max_numparam > NO_PARAM) {
27002 /* current and outer are exclusive */
27003 local->numparam.current = local->numparam.outer;
27004 local->numparam.outer = 0;
27005 }
27006 else {
27007 /* no numbered parameter */
27008 local->numparam.current = 0;
27009 }
27010 local->it = 0;
27011}
27012
27013static const struct vtable *
27014dyna_push(struct parser_params *p)
27015{
27016 p->lvtbl->args = vtable_alloc(p->lvtbl->args);
27017 p->lvtbl->vars = vtable_alloc(p->lvtbl->vars);
27018 if (p->lvtbl->used) {
27019 p->lvtbl->used = vtable_alloc(p->lvtbl->used);
27020 }
27021 return p->lvtbl->args;
27022}
27023
27024static void
27025dyna_pop_vtable(struct parser_params *p, struct vtable **vtblp)
27026{
27027 struct vtable *tmp = *vtblp;
27028 *vtblp = tmp->prev;
27029# if WARN_PAST_SCOPE
27030 if (p->past_scope_enabled) {
27031 tmp->prev = p->lvtbl->past;
27032 p->lvtbl->past = tmp;
27033 return;
27034 }
27035# endif
27036 vtable_free(tmp);
27037}
27038
27039static void
27040dyna_pop_1(struct parser_params *p)
27041{
27042 struct vtable *tmp;
27043
27044 if ((tmp = p->lvtbl->used) != 0) {
27045 warn_unused_var(p, p->lvtbl);
27046 p->lvtbl->used = p->lvtbl->used->prev;
27047 vtable_free(tmp);
27048 }
27049 dyna_pop_vtable(p, &p->lvtbl->args);
27050 dyna_pop_vtable(p, &p->lvtbl->vars);
27051}
27052
27053static void
27054dyna_pop(struct parser_params *p, const struct vtable *lvargs)
27055{
27056 while (p->lvtbl->args != lvargs) {
27057 dyna_pop_1(p);
27058 if (!p->lvtbl->args) {
27059 struct local_vars *local = p->lvtbl->prev;
27060 ruby_xfree_sized(p->lvtbl, sizeof(*p->lvtbl));
27061 p->lvtbl = local;
27062 }
27063 }
27064 dyna_pop_1(p);
27065}
27066
27067static int
27068dyna_in_block(struct parser_params *p)
27069{
27070 return !DVARS_TERMINAL_P(p->lvtbl->vars) && p->lvtbl->vars->prev != DVARS_TOPSCOPE;
27071}
27072
27073#ifndef RIPPER
27074int
27075dvar_defined_ref(struct parser_params *p, ID id, ID **vidrefp)
27076{
27077 struct vtable *vars, *args, *used;
27078 int i;
27079
27080 args = p->lvtbl->args;
27081 vars = p->lvtbl->vars;
27082 used = p->lvtbl->used;
27083
27084 while (!DVARS_TERMINAL_P(vars)) {
27085 if (vtable_included(args, id)) {
27086 return 1;
27087 }
27088 if ((i = vtable_included(vars, id)) != 0) {
27089 if (used && vidrefp) *vidrefp = &used->tbl[i-1];
27090 return 1;
27091 }
27092 args = args->prev;
27093 vars = vars->prev;
27094 if (!vidrefp) used = 0;
27095 if (used) used = used->prev;
27096 }
27097
27098 if (vars == DVARS_INHERIT && !NUMPARAM_ID_P(id)) {
27099 return rb_dvar_defined(id, p->parent_iseq);
27100 }
27101
27102 return 0;
27103}
27104#endif
27105
27106static int
27107dvar_defined(struct parser_params *p, ID id)
27108{
27109 return dvar_defined_ref(p, id, NULL);
27110}
27111
27112static int
27113dvar_curr(struct parser_params *p, ID id)
27114{
27115 return (vtable_included(p->lvtbl->args, id) ||
27116 vtable_included(p->lvtbl->vars, id));
27117}
27118
27119static void
27120reg_fragment_enc_error(struct parser_params* p, rb_parser_string_t *str, int c)
27121{
27122 compile_error(p,
27123 "regexp encoding option '%c' differs from source encoding '%s'",
27124 c, rb_enc_name(rb_parser_str_get_encoding(str)));
27125}
27126
27127#ifndef RIPPER
27128static rb_encoding *
27129find_enc(struct parser_params* p, const char *name)
27130{
27131 int idx = rb_enc_find_index(name);
27132 if (idx < 0) {
27133 rb_bug("unknown encoding name: %s", name);
27134 }
27135
27136 return rb_enc_from_index(idx);
27137}
27138
27139static rb_encoding *
27140kcode_to_enc(struct parser_params* p, int kcode)
27141{
27142 rb_encoding *enc;
27143
27144 switch (kcode) {
27145 case ENC_ASCII8BIT:
27146 enc = rb_ascii8bit_encoding();
27147 break;
27148 case ENC_EUC_JP:
27149 enc = find_enc(p, "EUC-JP");
27150 break;
27151 case ENC_Windows_31J:
27152 enc = find_enc(p, "Windows-31J");
27153 break;
27154 case ENC_UTF8:
27155 enc = rb_utf8_encoding();
27156 break;
27157 default:
27158 enc = NULL;
27159 break;
27160 }
27161
27162 return enc;
27163}
27164
27165int
27166rb_reg_fragment_setenc(struct parser_params* p, rb_parser_string_t *str, int options)
27167{
27168 int c = RE_OPTION_ENCODING_IDX(options);
27169
27170 if (c) {
27171 int opt, idx;
27172 rb_encoding *enc;
27173
27174 char_to_option_kcode(c, &opt, &idx);
27175 enc = kcode_to_enc(p, idx);
27176 if (enc != rb_parser_str_get_encoding(str) &&
27177 !rb_parser_is_ascii_string(p, str)) {
27178 goto error;
27179 }
27180 rb_parser_string_set_encoding(str, enc);
27181 }
27182 else if (RE_OPTION_ENCODING_NONE(options)) {
27183 if (!PARSER_ENCODING_IS_ASCII8BIT(p, str) &&
27184 !rb_parser_is_ascii_string(p, str)) {
27185 c = 'n';
27186 goto error;
27187 }
27188 rb_parser_enc_associate(p, str, rb_ascii8bit_encoding());
27189 }
27190 else if (rb_is_usascii_enc(p->enc)) {
27191 rb_parser_enc_associate(p, str, rb_ascii8bit_encoding());
27192 }
27193 return 0;
27194
27195 error:
27196 return c;
27197}
27198#endif
27199
27200static void
27201reg_fragment_setenc(struct parser_params* p, rb_parser_string_t *str, int options)
27202{
27203 int c = rb_reg_fragment_setenc(p, str, options);
27204 if (c) reg_fragment_enc_error(p, str, c);
27205}
27206
27207#ifndef UNIVERSAL_PARSER
27208typedef struct {
27209 struct parser_params* parser;
27210 rb_encoding *enc;
27211 NODE *succ_block;
27212 const YYLTYPE *loc;
27213 rb_parser_assignable_func assignable;
27215
27216static int
27217reg_named_capture_assign_iter(const OnigUChar *name, const OnigUChar *name_end,
27218 int back_num, int *back_refs, OnigRegex regex, void *arg0)
27219{
27221 struct parser_params* p = arg->parser;
27222 rb_encoding *enc = arg->enc;
27223 long len = name_end - name;
27224 const char *s = (const char *)name;
27225
27226 return rb_reg_named_capture_assign_iter_impl(p, s, len, enc, &arg->succ_block, arg->loc, arg->assignable);
27227}
27228
27229static NODE *
27230reg_named_capture_assign(struct parser_params* p, VALUE regexp, const YYLTYPE *loc, rb_parser_assignable_func assignable)
27231{
27233
27234 arg.parser = p;
27235 arg.enc = rb_enc_get(regexp);
27236 arg.succ_block = 0;
27237 arg.loc = loc;
27238 arg.assignable = assignable;
27239 onig_foreach_name(RREGEXP_PTR(regexp), reg_named_capture_assign_iter, &arg);
27240
27241 if (!arg.succ_block) return 0;
27242 return RNODE_BLOCK(arg.succ_block)->nd_next;
27243}
27244#endif
27245
27246#ifndef RIPPER
27247NODE *
27248rb_parser_assignable(struct parser_params *p, ID id, NODE *val, const YYLTYPE *loc)
27249{
27250 return assignable(p, id, val, loc);
27251}
27252
27253int
27254rb_reg_named_capture_assign_iter_impl(struct parser_params *p, const char *s, long len,
27255 rb_encoding *enc, NODE **succ_block, const rb_code_location_t *loc, rb_parser_assignable_func assignable)
27256{
27257 ID var;
27258 NODE *node, *succ;
27259
27260 if (!len) return ST_CONTINUE;
27261 if (!VALID_SYMNAME_P(s, len, enc, ID_LOCAL))
27262 return ST_CONTINUE;
27263
27264 var = intern_cstr(s, len, enc);
27265 if (len < MAX_WORD_LENGTH && rb_reserved_word(s, (int)len)) {
27266 if (!lvar_defined(p, var)) return ST_CONTINUE;
27267 }
27268 node = node_assign(p, assignable(p, var, 0, loc), NEW_SYM(rb_id2str(var), loc), NO_LEX_CTXT, loc);
27269 succ = *succ_block;
27270 if (!succ) succ = NEW_ERROR(loc);
27271 succ = block_append(p, succ, node);
27272 *succ_block = succ;
27273 return ST_CONTINUE;
27274}
27275#endif
27276
27277static VALUE
27278parser_reg_compile(struct parser_params* p, rb_parser_string_t *str, int options)
27279{
27280 VALUE str2;
27281 reg_fragment_setenc(p, str, options);
27282 str2 = rb_str_new_parser_string(str);
27283 return rb_parser_reg_compile(p, str2, options);
27284}
27285
27286#ifndef RIPPER
27287VALUE
27288rb_parser_reg_compile(struct parser_params* p, VALUE str, int options)
27289{
27290 return rb_reg_compile(str, options & RE_OPTION_MASK, p->ruby_sourcefile, p->ruby_sourceline);
27291}
27292#endif
27293
27294static VALUE
27295reg_compile(struct parser_params* p, rb_parser_string_t *str, int options)
27296{
27297 VALUE re;
27298 VALUE err;
27299
27300 err = rb_errinfo();
27301 re = parser_reg_compile(p, str, options);
27302 if (NIL_P(re)) {
27303 VALUE m = rb_attr_get(rb_errinfo(), idMesg);
27304 rb_set_errinfo(err);
27305 compile_error(p, "%"PRIsVALUE, m);
27306 return Qnil;
27307 }
27308 return re;
27309}
27310
27311#ifndef RIPPER
27312void
27313rb_ruby_parser_set_options(struct parser_params *p, int print, int loop, int chomp, int split)
27314{
27315 p->do_print = print;
27316 p->do_loop = loop;
27317 p->do_chomp = chomp;
27318 p->do_split = split;
27319}
27320
27321static NODE *
27322parser_append_options(struct parser_params *p, NODE *node)
27323{
27324 static const YYLTYPE default_location = {{1, 0}, {1, 0}};
27325 const YYLTYPE *const LOC = &default_location;
27326
27327 if (p->do_print) {
27328 NODE *print = (NODE *)NEW_FCALL(rb_intern("print"),
27329 NEW_LIST(NEW_GVAR(idLASTLINE, LOC), LOC),
27330 LOC);
27331 node = block_append(p, node, print);
27332 }
27333
27334 if (p->do_loop) {
27335 NODE *irs = NEW_LIST(NEW_GVAR(rb_intern("$/"), LOC), LOC);
27336
27337 if (p->do_split) {
27338 ID ifs = rb_intern("$;");
27339 ID fields = rb_intern("$F");
27340 NODE *args = NEW_LIST(NEW_GVAR(ifs, LOC), LOC);
27341 NODE *split = NEW_GASGN(fields,
27342 NEW_CALL(NEW_GVAR(idLASTLINE, LOC),
27343 rb_intern("split"), args, LOC),
27344 LOC);
27345 node = block_append(p, split, node);
27346 }
27347 if (p->do_chomp) {
27348 NODE *chomp = NEW_SYM(rb_str_new_cstr("chomp"), LOC);
27349 chomp = list_append(p, NEW_LIST(chomp, LOC), NEW_TRUE(LOC));
27350 irs = list_append(p, irs, NEW_HASH(chomp, LOC));
27351 }
27352
27353 node = NEW_WHILE((NODE *)NEW_FCALL(idGets, irs, LOC), node, 1, LOC, &NULL_LOC, &NULL_LOC);
27354 }
27355
27356 return node;
27357}
27358
27359void
27360rb_init_parse(void)
27361{
27362 /* just to suppress unused-function warnings */
27363 (void)nodetype;
27364 (void)nodeline;
27365}
27366
27367ID
27368internal_id(struct parser_params *p)
27369{
27370 return rb_make_temporary_id(vtable_size(p->lvtbl->args) + vtable_size(p->lvtbl->vars));
27371}
27372#endif /* !RIPPER */
27373
27374static void
27375parser_initialize(struct parser_params *p)
27376{
27377 /* note: we rely on TypedData_Make_Struct to set most fields to 0 */
27378 p->command_start = TRUE;
27379 p->ruby_sourcefile_string = Qnil;
27380 p->lex.lpar_beg = -1; /* make lambda_beginning_p() == FALSE at first */
27381 string_buffer_init(p);
27382 p->node_id = 0;
27383 p->delayed.token = NULL;
27384 p->frozen_string_literal = -1; /* not specified */
27385#ifndef RIPPER
27386 p->error_buffer = Qfalse;
27387 p->end_expect_token_locations = NULL;
27388 p->token_id = 0;
27389 p->tokens = NULL;
27390#else
27391 p->result = Qnil;
27392 p->parsing_thread = Qnil;
27393 p->s_value = Qnil;
27394 p->s_lvalue = Qnil;
27395 p->s_value_stack = rb_ary_new();
27396#endif
27397 p->debug_buffer = Qnil;
27398 p->debug_output = rb_ractor_stdout();
27399 p->enc = rb_utf8_encoding();
27400 p->exits = 0;
27401}
27402
27403#ifdef RIPPER
27404#define rb_ruby_parser_mark ripper_parser_mark
27405#define rb_ruby_parser_free ripper_parser_free
27406#define rb_ruby_parser_memsize ripper_parser_memsize
27407#endif
27408
27409void
27410rb_ruby_parser_mark(void *ptr)
27411{
27412 struct parser_params *p = (struct parser_params*)ptr;
27413
27414 rb_gc_mark(p->ruby_sourcefile_string);
27415#ifndef RIPPER
27416 rb_gc_mark(p->error_buffer);
27417#else
27418 rb_gc_mark(p->value);
27419 rb_gc_mark(p->result);
27420 rb_gc_mark(p->parsing_thread);
27421 rb_gc_mark(p->s_value);
27422 rb_gc_mark(p->s_lvalue);
27423 rb_gc_mark(p->s_value_stack);
27424#endif
27425 rb_gc_mark(p->debug_buffer);
27426 rb_gc_mark(p->debug_output);
27427}
27428
27429void
27430rb_ruby_parser_free(void *ptr)
27431{
27432 struct parser_params *p = (struct parser_params*)ptr;
27433 struct local_vars *local, *prev;
27434
27435 if (p->ast) {
27436 rb_ast_free(p->ast);
27437 }
27438
27439 if (p->warn_duplicate_keys_table) {
27440 st_free_table(p->warn_duplicate_keys_table);
27441 }
27442
27443#ifndef RIPPER
27444 if (p->tokens) {
27445 rb_parser_ary_free(p, p->tokens);
27446 }
27447#endif
27448
27449 if (p->tokenbuf) {
27450 ruby_xfree_sized(p->tokenbuf, p->toksiz);
27451 }
27452
27453 for (local = p->lvtbl; local; local = prev) {
27454 prev = local->prev;
27455 local_free(p, local);
27456 }
27457
27458 {
27459 token_info *ptinfo;
27460 while ((ptinfo = p->token_info) != 0) {
27461 p->token_info = ptinfo->next;
27462 xfree(ptinfo);
27463 }
27464 }
27465 string_buffer_free(p);
27466
27467 if (p->pvtbl) {
27468 st_free_table(p->pvtbl);
27469 }
27470
27471 if (CASE_LABELS_ENABLED_P(p->case_labels)) {
27472 st_free_table(p->case_labels);
27473 }
27474
27475 xfree(p->lex.strterm);
27476 p->lex.strterm = 0;
27477
27478 xfree(ptr);
27479}
27480
27481size_t
27482rb_ruby_parser_memsize(const void *ptr)
27483{
27484 struct parser_params *p = (struct parser_params*)ptr;
27485 struct local_vars *local;
27486 size_t size = sizeof(*p);
27487
27488 size += p->toksiz;
27489 for (local = p->lvtbl; local; local = local->prev) {
27490 size += sizeof(*local);
27491 if (local->vars) size += local->vars->capa * sizeof(ID);
27492 }
27493 return size;
27494}
27495
27496#ifndef RIPPER
27497#undef rb_reserved_word
27498
27499const struct kwtable *
27500rb_reserved_word(const char *str, unsigned int len)
27501{
27502 return reserved_word(str, len);
27503}
27504
27505#ifdef UNIVERSAL_PARSER
27507rb_ruby_parser_allocate(const rb_parser_config_t *config)
27508{
27509 /* parser_initialize expects fields to be set to 0 */
27510 rb_parser_t *p = (rb_parser_t *)config->calloc(1, sizeof(rb_parser_t));
27511 p->config = config;
27512 return p;
27513}
27514
27516rb_ruby_parser_new(const rb_parser_config_t *config)
27517{
27518 /* parser_initialize expects fields to be set to 0 */
27519 rb_parser_t *p = rb_ruby_parser_allocate(config);
27520 parser_initialize(p);
27521 return p;
27522}
27523#else
27525rb_ruby_parser_allocate(void)
27526{
27527 /* parser_initialize expects fields to be set to 0 */
27528 rb_parser_t *p = (rb_parser_t *)ruby_xcalloc(1, sizeof(rb_parser_t));
27529 return p;
27530}
27531
27533rb_ruby_parser_new(void)
27534{
27535 /* parser_initialize expects fields to be set to 0 */
27536 rb_parser_t *p = rb_ruby_parser_allocate();
27537 parser_initialize(p);
27538 return p;
27539}
27540#endif
27541
27543rb_ruby_parser_set_context(rb_parser_t *p, const struct rb_iseq_struct *base, int main)
27544{
27545 p->error_buffer = main ? Qfalse : Qnil;
27546 p->parent_iseq = base;
27547 return p;
27548}
27549
27550void
27551rb_ruby_parser_set_script_lines(rb_parser_t *p)
27552{
27553 p->debug_lines = rb_parser_ary_new_capa_for_script_line(p, 10);
27554}
27555
27556void
27557rb_ruby_parser_error_tolerant(rb_parser_t *p)
27558{
27559 p->error_tolerant = 1;
27560}
27561
27562void
27563rb_ruby_parser_keep_tokens(rb_parser_t *p)
27564{
27565 p->keep_tokens = 1;
27566 p->tokens = rb_parser_ary_new_capa_for_ast_token(p, 10);
27567}
27568
27570rb_ruby_parser_encoding(rb_parser_t *p)
27571{
27572 return p->enc;
27573}
27574
27575int
27576rb_ruby_parser_end_seen_p(rb_parser_t *p)
27577{
27578 return p->ruby__end__seen;
27579}
27580
27581int
27582rb_ruby_parser_set_yydebug(rb_parser_t *p, int flag)
27583{
27584 p->debug = flag;
27585 return flag;
27586}
27587#endif /* !RIPPER */
27588
27589#ifdef RIPPER
27590int
27591rb_ruby_parser_get_yydebug(rb_parser_t *p)
27592{
27593 return p->debug;
27594}
27595
27596void
27597rb_ruby_parser_set_value(rb_parser_t *p, VALUE value)
27598{
27599 p->value = value;
27600}
27601
27602int
27603rb_ruby_parser_error_p(rb_parser_t *p)
27604{
27605 return p->error_p;
27606}
27607
27608VALUE
27609rb_ruby_parser_debug_output(rb_parser_t *p)
27610{
27611 return p->debug_output;
27612}
27613
27614void
27615rb_ruby_parser_set_debug_output(rb_parser_t *p, VALUE output)
27616{
27617 p->debug_output = output;
27618}
27619
27620VALUE
27621rb_ruby_parser_parsing_thread(rb_parser_t *p)
27622{
27623 return p->parsing_thread;
27624}
27625
27626void
27627rb_ruby_parser_set_parsing_thread(rb_parser_t *p, VALUE parsing_thread)
27628{
27629 p->parsing_thread = parsing_thread;
27630}
27631
27632void
27633rb_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)
27634{
27635 p->lex.gets = gets;
27636 p->lex.input = input;
27637 p->eofp = 0;
27638 p->ruby_sourcefile_string = sourcefile_string;
27639 p->ruby_sourcefile = sourcefile;
27640 p->ruby_sourceline = sourceline;
27641}
27642
27643VALUE
27644rb_ruby_parser_result(rb_parser_t *p)
27645{
27646 return p->result;
27647}
27648
27650rb_ruby_parser_enc(rb_parser_t *p)
27651{
27652 return p->enc;
27653}
27654
27655VALUE
27656rb_ruby_parser_ruby_sourcefile_string(rb_parser_t *p)
27657{
27658 return p->ruby_sourcefile_string;
27659}
27660
27661int
27662rb_ruby_parser_ruby_sourceline(rb_parser_t *p)
27663{
27664 return p->ruby_sourceline;
27665}
27666
27667int
27668rb_ruby_parser_lex_state(rb_parser_t *p)
27669{
27670 return p->lex.state;
27671}
27672
27673void
27674rb_ruby_ripper_parse0(rb_parser_t *p)
27675{
27676 parser_prepare(p);
27677 p->ast = rb_ast_new();
27678 ripper_yyparse((void*)p);
27679 rb_ast_free(p->ast);
27680 p->ast = 0;
27681 p->eval_tree = 0;
27682 p->eval_tree_begin = 0;
27683}
27684
27685int
27686rb_ruby_ripper_dedent_string(rb_parser_t *p, rb_parser_string_t *string, int width)
27687{
27688 return dedent_string(p, string, width);
27689}
27690
27691int
27692rb_ruby_ripper_initialized_p(rb_parser_t *p)
27693{
27694 return p->lex.input != 0;
27695}
27696
27697void
27698rb_ruby_ripper_parser_initialize(rb_parser_t *p)
27699{
27700 parser_initialize(p);
27701}
27702
27703long
27704rb_ruby_ripper_column(rb_parser_t *p)
27705{
27706 return p->lex.ptok - p->lex.pbeg;
27707}
27708
27709long
27710rb_ruby_ripper_token_len(rb_parser_t *p)
27711{
27712 return p->lex.pcur - p->lex.ptok;
27713}
27714
27716rb_ruby_ripper_lex_lastline(rb_parser_t *p)
27717{
27718 return p->lex.lastline;
27719}
27720
27721VALUE
27722rb_ruby_ripper_lex_state_name(struct parser_params *p, int state)
27723{
27724 return rb_parser_lex_state_name(p, (enum lex_state_e)state);
27725}
27726
27727#ifdef UNIVERSAL_PARSER
27729rb_ripper_parser_params_allocate(const rb_parser_config_t *config)
27730{
27731 rb_parser_t *p = (rb_parser_t *)config->calloc(1, sizeof(rb_parser_t));
27732 p->config = config;
27733 return p;
27734}
27735#endif
27736
27737struct parser_params*
27738rb_ruby_ripper_parser_allocate(void)
27739{
27740 return (struct parser_params *)ruby_xcalloc(1, sizeof(struct parser_params));
27741}
27742#endif /* RIPPER */
27743
27744#ifndef RIPPER
27745void
27746rb_parser_printf(struct parser_params *p, const char *fmt, ...)
27747{
27748 va_list ap;
27749 VALUE mesg = p->debug_buffer;
27750
27751 if (NIL_P(mesg)) p->debug_buffer = mesg = rb_str_new(0, 0);
27752 va_start(ap, fmt);
27753 rb_str_vcatf(mesg, fmt, ap);
27754 va_end(ap);
27755 if (char_at_end(p, mesg, 0) == '\n') {
27756 rb_io_write(p->debug_output, mesg);
27757 p->debug_buffer = Qnil;
27758 }
27759}
27760
27761static void
27762parser_compile_error(struct parser_params *p, const rb_code_location_t *loc, const char *fmt, ...)
27763{
27764 va_list ap;
27765 int lineno, column;
27766
27767 if (loc) {
27768 lineno = loc->end_pos.lineno;
27769 column = loc->end_pos.column;
27770 }
27771 else {
27772 lineno = p->ruby_sourceline;
27773 column = rb_long2int(p->lex.pcur - p->lex.pbeg);
27774 }
27775
27776 rb_io_flush(p->debug_output);
27777 p->error_p = 1;
27778 va_start(ap, fmt);
27779 p->error_buffer =
27780 rb_syntax_error_append(p->error_buffer,
27781 p->ruby_sourcefile_string,
27782 lineno, column,
27783 p->enc, fmt, ap);
27784 va_end(ap);
27785}
27786
27787static size_t
27788count_char(const char *str, int c)
27789{
27790 int n = 0;
27791 while (str[n] == c) ++n;
27792 return n;
27793}
27794
27795/*
27796 * strip enclosing double-quotes, same as the default yytnamerr except
27797 * for that single-quotes matching back-quotes do not stop stripping.
27798 *
27799 * "\"`class' keyword\"" => "`class' keyword"
27800 */
27801size_t
27802rb_yytnamerr(struct parser_params *p, char *yyres, const char *yystr)
27803{
27804 if (*yystr == '"') {
27805 size_t yyn = 0, bquote = 0;
27806 const char *yyp = yystr;
27807
27808 while (*++yyp) {
27809 switch (*yyp) {
27810 case '\'':
27811 if (!bquote) {
27812 bquote = count_char(yyp+1, '\'') + 1;
27813 if (yyres) memcpy(&yyres[yyn], yyp, bquote);
27814 yyn += bquote;
27815 yyp += bquote - 1;
27816 break;
27817 }
27818 else {
27819 if (bquote && count_char(yyp+1, '\'') + 1 == bquote) {
27820 if (yyres) memcpy(yyres + yyn, yyp, bquote);
27821 yyn += bquote;
27822 yyp += bquote - 1;
27823 bquote = 0;
27824 break;
27825 }
27826 if (yyp[1] && yyp[1] != '\'' && yyp[2] == '\'') {
27827 if (yyres) memcpy(yyres + yyn, yyp, 3);
27828 yyn += 3;
27829 yyp += 2;
27830 break;
27831 }
27832 goto do_not_strip_quotes;
27833 }
27834
27835 case ',':
27836 goto do_not_strip_quotes;
27837
27838 case '\\':
27839 if (*++yyp != '\\')
27840 goto do_not_strip_quotes;
27841 /* Fall through. */
27842 default:
27843 if (yyres)
27844 yyres[yyn] = *yyp;
27845 yyn++;
27846 break;
27847
27848 case '"':
27849 case '\0':
27850 if (yyres)
27851 yyres[yyn] = '\0';
27852 return yyn;
27853 }
27854 }
27855 do_not_strip_quotes: ;
27856 }
27857
27858 if (!yyres) return strlen(yystr);
27859
27860 return (YYSIZE_T)(yystpcpy(yyres, yystr) - yyres);
27861}
27862#endif
27863
27864#ifdef RIPPER
27865#define validate(x) (void)(x)
27866
27867static VALUE
27868ripper_dispatch0(struct parser_params *p, ID mid)
27869{
27870 return rb_funcall(p->value, mid, 0);
27871}
27872
27873static VALUE
27874ripper_dispatch1(struct parser_params *p, ID mid, VALUE a)
27875{
27876 validate(a);
27877 return rb_funcall(p->value, mid, 1, a);
27878}
27879
27880static VALUE
27881ripper_dispatch2(struct parser_params *p, ID mid, VALUE a, VALUE b)
27882{
27883 validate(a);
27884 validate(b);
27885 return rb_funcall(p->value, mid, 2, a, b);
27886}
27887
27888static VALUE
27889ripper_dispatch3(struct parser_params *p, ID mid, VALUE a, VALUE b, VALUE c)
27890{
27891 validate(a);
27892 validate(b);
27893 validate(c);
27894 return rb_funcall(p->value, mid, 3, a, b, c);
27895}
27896
27897static VALUE
27898ripper_dispatch4(struct parser_params *p, ID mid, VALUE a, VALUE b, VALUE c, VALUE d)
27899{
27900 validate(a);
27901 validate(b);
27902 validate(c);
27903 validate(d);
27904 return rb_funcall(p->value, mid, 4, a, b, c, d);
27905}
27906
27907static VALUE
27908ripper_dispatch5(struct parser_params *p, ID mid, VALUE a, VALUE b, VALUE c, VALUE d, VALUE e)
27909{
27910 validate(a);
27911 validate(b);
27912 validate(c);
27913 validate(d);
27914 validate(e);
27915 return rb_funcall(p->value, mid, 5, a, b, c, d, e);
27916}
27917
27918static VALUE
27919ripper_dispatch7(struct parser_params *p, ID mid, VALUE a, VALUE b, VALUE c, VALUE d, VALUE e, VALUE f, VALUE g)
27920{
27921 validate(a);
27922 validate(b);
27923 validate(c);
27924 validate(d);
27925 validate(e);
27926 validate(f);
27927 validate(g);
27928 return rb_funcall(p->value, mid, 7, a, b, c, d, e, f, g);
27929}
27930
27931void
27932ripper_error(struct parser_params *p)
27933{
27934 p->error_p = TRUE;
27935}
27936
27937VALUE
27938ripper_value(struct parser_params *p)
27939{
27940 (void)yystpcpy; /* may not used in newer bison */
27941
27942 return p->value;
27943}
27944
27945#endif /* RIPPER */
27946/*
27947 * Local variables:
27948 * mode: c
27949 * c-file-style: "ruby"
27950 * End:
27951 */
#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:2296
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:826
VALUE rb_funcall(VALUE recv, ID mid, int n,...)
Calls a method.
Definition vm_eval.c:1121
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:3604
#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.