Ruby 4.0.0dev (2025-12-12 revision be43ad37b7fe7dbeaec653c4ec3dfcf5999e2824)
parse.c
1/* A Bison parser, made by Lrama 0.7.0. */
2
3/* Bison implementation for Yacc-like parsers in C
4
5 Copyright (C) 1984, 1989-1990, 2000-2015, 2018-2021 Free Software Foundation,
6 Inc.
7
8 This program is free software: you can redistribute it and/or modify
9 it under the terms of the GNU General Public License as published by
10 the Free Software Foundation, either version 3 of the License, or
11 (at your option) any later version.
12
13 This program is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU General Public License for more details.
17
18 You should have received a copy of the GNU General Public License
19 along with this program. If not, see <https://www.gnu.org/licenses/>. */
20
21/* As a special exception, you may create a larger work that contains
22 part or all of the Bison parser skeleton and distribute that work
23 under terms of your choice, so long as that work isn't itself a
24 parser generator using the skeleton or a modified version thereof
25 as a parser skeleton. Alternatively, if you modify or redistribute
26 the parser skeleton itself, you may (at your option) remove this
27 special exception, which will cause the skeleton and the resulting
28 Bison output files to be licensed under the GNU General Public
29 License without this special exception.
30
31 This special exception was added by the Free Software Foundation in
32 version 2.2 of Bison. */
33
34/* C LALR(1) parser skeleton written by Richard Stallman, by
35 simplifying the original so-called "semantic" parser. */
36
37/* DO NOT RELY ON FEATURES THAT ARE NOT DOCUMENTED in the manual,
38 especially those whose name start with YY_ or yy_. They are
39 private implementation details that can be changed or removed. */
40
41/* All symbols defined below should begin with yy or YY, to avoid
42 infringing on user name space. This should be done even for local
43 variables, as they might otherwise be expanded by user macros.
44 There are some unavoidable exceptions within include files to
45 define necessary library symbols; they are noted "INFRINGES ON
46 USER NAME SPACE" below. */
47
48/* Identify Bison output, and Bison version. */
49#define YYBISON 30802
50
51/* Bison version string. */
52#define YYBISON_VERSION "3.8.2"
53
54/* Skeleton name. */
55#define YYSKELETON_NAME "yacc.c"
56
57/* Pure parsers. */
58#define YYPURE 1
59
60/* Push parsers. */
61#define YYPUSH 0
62
63/* Pull parsers. */
64#define YYPULL 1
65
66
67/* First part of user prologue. */
68#line 12 "parse.y"
69
70
71#if !YYPURE
72# error needs pure parser
73#endif
74#define YYDEBUG 1
75#define YYERROR_VERBOSE 1
76#define YYSTACK_USE_ALLOCA 0
77
78/* For Ripper */
79#ifdef RUBY_EXTCONF_H
80# include RUBY_EXTCONF_H
81#endif
82
83#include "ruby/internal/config.h"
84
85#include <errno.h>
86
87#ifdef UNIVERSAL_PARSER
88
89#include "internal/ruby_parser.h"
90#include "parser_node.h"
91#include "universal_parser.c"
92
93#ifdef RIPPER
94#define STATIC_ID2SYM p->config->static_id2sym
95#define rb_str_coderange_scan_restartable p->config->str_coderange_scan_restartable
96#endif
97
98#else
99
100#include "internal.h"
101#include "internal/compile.h"
102#include "internal/compilers.h"
103#include "internal/complex.h"
104#include "internal/encoding.h"
105#include "internal/error.h"
106#include "internal/hash.h"
107#include "internal/io.h"
108#include "internal/numeric.h"
109#include "internal/parse.h"
110#include "internal/rational.h"
111#include "internal/re.h"
112#include "internal/ruby_parser.h"
113#include "internal/symbol.h"
114#include "internal/thread.h"
115#include "internal/variable.h"
116#include "node.h"
117#include "parser_node.h"
118#include "probes.h"
119#include "regenc.h"
120#include "ruby/encoding.h"
121#include "ruby/regex.h"
122#include "ruby/ruby.h"
123#include "ruby/st.h"
124#include "ruby/util.h"
125#include "ruby/ractor.h"
126#include "symbol.h"
127
128#ifndef RIPPER
129static VALUE
130syntax_error_new(void)
131{
133}
134#endif
135
136static NODE *reg_named_capture_assign(struct parser_params* p, VALUE regexp, const YYLTYPE *loc, rb_parser_assignable_func assignable);
137
138#define compile_callback rb_suppress_tracing
139#endif /* !UNIVERSAL_PARSER */
140
141#define NODE_SPECIAL_EMPTY_ARGS ((NODE *)-1)
142#define NODE_EMPTY_ARGS_P(node) ((node) == NODE_SPECIAL_EMPTY_ARGS)
143
144static int rb_parser_string_hash_cmp(rb_parser_string_t *str1, rb_parser_string_t *str2);
145
146#ifndef RIPPER
147static rb_parser_string_t *rb_parser_string_deep_copy(struct parser_params *p, const rb_parser_string_t *original);
148#endif
149
150static int
151node_integer_cmp(rb_node_integer_t *n1, rb_node_integer_t *n2)
152{
153 return (n1->minus != n2->minus ||
154 n1->base != n2->base ||
155 strcmp(n1->val, n2->val));
156}
157
158static int
159node_float_cmp(rb_node_float_t *n1, rb_node_float_t *n2)
160{
161 return (n1->minus != n2->minus ||
162 strcmp(n1->val, n2->val));
163}
164
165static int
166node_rational_cmp(rb_node_rational_t *n1, rb_node_rational_t *n2)
167{
168 return (n1->minus != n2->minus ||
169 n1->base != n2->base ||
170 n1->seen_point != n2->seen_point ||
171 strcmp(n1->val, n2->val));
172}
173
174static int
175node_imaginary_cmp(rb_node_imaginary_t *n1, rb_node_imaginary_t *n2)
176{
177 return (n1->minus != n2->minus ||
178 n1->base != n2->base ||
179 n1->seen_point != n2->seen_point ||
180 n1->type != n2->type ||
181 strcmp(n1->val, n2->val));
182}
183
184static int
185rb_parser_regx_hash_cmp(rb_node_regx_t *n1, rb_node_regx_t *n2)
186{
187 return (n1->options != n2->options ||
188 rb_parser_string_hash_cmp(n1->string, n2->string));
189}
190
191static st_index_t rb_parser_str_hash(rb_parser_string_t *str);
192static st_index_t rb_char_p_hash(const char *c);
193
194static int
195literal_cmp(st_data_t val, st_data_t lit)
196{
197 if (val == lit) return 0;
198
199 NODE *node_val = RNODE(val);
200 NODE *node_lit = RNODE(lit);
201 enum node_type type_val = nd_type(node_val);
202 enum node_type type_lit = nd_type(node_lit);
203
204 if (type_val != type_lit) {
205 return -1;
206 }
207
208 switch (type_lit) {
209 case NODE_INTEGER:
210 return node_integer_cmp(RNODE_INTEGER(node_val), RNODE_INTEGER(node_lit));
211 case NODE_FLOAT:
212 return node_float_cmp(RNODE_FLOAT(node_val), RNODE_FLOAT(node_lit));
213 case NODE_RATIONAL:
214 return node_rational_cmp(RNODE_RATIONAL(node_val), RNODE_RATIONAL(node_lit));
215 case NODE_IMAGINARY:
216 return node_imaginary_cmp(RNODE_IMAGINARY(node_val), RNODE_IMAGINARY(node_lit));
217 case NODE_STR:
218 return rb_parser_string_hash_cmp(RNODE_STR(node_val)->string, RNODE_STR(node_lit)->string);
219 case NODE_SYM:
220 return rb_parser_string_hash_cmp(RNODE_SYM(node_val)->string, RNODE_SYM(node_lit)->string);
221 case NODE_REGX:
222 return rb_parser_regx_hash_cmp(RNODE_REGX(node_val), RNODE_REGX(node_lit));
223 case NODE_LINE:
224 return node_val->nd_loc.beg_pos.lineno != node_lit->nd_loc.beg_pos.lineno;
225 case NODE_FILE:
226 return rb_parser_string_hash_cmp(RNODE_FILE(node_val)->path, RNODE_FILE(node_lit)->path);
227 case NODE_ENCODING:
228 return RNODE_ENCODING(node_val)->enc != RNODE_ENCODING(node_lit)->enc;
229 default:
230#ifdef UNIVERSAL_PARSER
231 abort();
232#else
233 rb_bug("unexpected node: %s, %s", ruby_node_name(type_val), ruby_node_name(type_lit));
234#endif
235 }
236}
237
238static st_index_t
239literal_hash(st_data_t a)
240{
241 NODE *node = (NODE *)a;
242 enum node_type type = nd_type(node);
243
244 switch (type) {
245 case NODE_INTEGER:
246 return rb_char_p_hash(RNODE_INTEGER(node)->val);
247 case NODE_FLOAT:
248 return rb_char_p_hash(RNODE_FLOAT(node)->val);
249 case NODE_RATIONAL:
250 return rb_char_p_hash(RNODE_RATIONAL(node)->val);
251 case NODE_IMAGINARY:
252 return rb_char_p_hash(RNODE_IMAGINARY(node)->val);
253 case NODE_STR:
254 return rb_parser_str_hash(RNODE_STR(node)->string);
255 case NODE_SYM:
256 return rb_parser_str_hash(RNODE_SYM(node)->string);
257 case NODE_REGX:
258 return rb_parser_str_hash(RNODE_REGX(node)->string);
259 case NODE_LINE:
260 return (st_index_t)node->nd_loc.beg_pos.lineno;
261 case NODE_FILE:
262 return rb_parser_str_hash(RNODE_FILE(node)->path);
263 case NODE_ENCODING:
264 return (st_index_t)RNODE_ENCODING(node)->enc;
265 default:
266#ifdef UNIVERSAL_PARSER
267 abort();
268#else
269 rb_bug("unexpected node: %s", ruby_node_name(type));
270#endif
271 }
272}
273
274static inline int
275parse_isascii(int c)
276{
277 return '\0' <= c && c <= '\x7f';
278}
279
280#undef ISASCII
281#define ISASCII parse_isascii
282
283static inline int
284parse_isspace(int c)
285{
286 return c == ' ' || ('\t' <= c && c <= '\r');
287}
288
289#undef ISSPACE
290#define ISSPACE parse_isspace
291
292static inline int
293parse_iscntrl(int c)
294{
295 return ('\0' <= c && c < ' ') || c == '\x7f';
296}
297
298#undef ISCNTRL
299#define ISCNTRL(c) parse_iscntrl(c)
300
301static inline int
302parse_isupper(int c)
303{
304 return 'A' <= c && c <= 'Z';
305}
306
307static inline int
308parse_islower(int c)
309{
310 return 'a' <= c && c <= 'z';
311}
312
313static inline int
314parse_isalpha(int c)
315{
316 return parse_isupper(c) || parse_islower(c);
317}
318
319#undef ISALPHA
320#define ISALPHA(c) parse_isalpha(c)
321
322static inline int
323parse_isdigit(int c)
324{
325 return '0' <= c && c <= '9';
326}
327
328#undef ISDIGIT
329#define ISDIGIT(c) parse_isdigit(c)
330
331static inline int
332parse_isalnum(int c)
333{
334 return ISALPHA(c) || ISDIGIT(c);
335}
336
337#undef ISALNUM
338#define ISALNUM(c) parse_isalnum(c)
339
340static inline int
341parse_isxdigit(int c)
342{
343 return ISDIGIT(c) || ('A' <= c && c <= 'F') || ('a' <= c && c <= 'f');
344}
345
346#undef ISXDIGIT
347#define ISXDIGIT(c) parse_isxdigit(c)
348
349#include "parser_st.h"
350
351#undef STRCASECMP
352#define STRCASECMP rb_parser_st_locale_insensitive_strcasecmp
353
354#undef STRNCASECMP
355#define STRNCASECMP rb_parser_st_locale_insensitive_strncasecmp
356
357#ifdef RIPPER
358#include "ripper_init.h"
359#endif
360
361enum rescue_context {
362 before_rescue,
363 after_rescue,
364 after_else,
365 after_ensure,
366};
367
369 unsigned int in_defined: 1;
370 unsigned int in_kwarg: 1;
371 unsigned int in_argdef: 1;
372 unsigned int in_def: 1;
373 unsigned int in_class: 1;
374 unsigned int has_trailing_semicolon: 1;
375 BITFIELD(enum rb_parser_shareability, shareable_constant_value, 2);
376 BITFIELD(enum rescue_context, in_rescue, 2);
377 unsigned int cant_return: 1;
378 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_sized_xfree(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*);
1491static NODE *new_array_pattern(struct parser_params *p, NODE *constant, NODE *pre_arg, NODE *aryptn, const YYLTYPE *loc);
1492static NODE *new_array_pattern_tail(struct parser_params *p, NODE *pre_args, int has_rest, NODE *rest_arg, NODE *post_args, const YYLTYPE *loc);
1493static NODE *new_find_pattern(struct parser_params *p, NODE *constant, NODE *fndptn, const YYLTYPE *loc);
1494static NODE *new_find_pattern_tail(struct parser_params *p, NODE *pre_rest_arg, NODE *args, NODE *post_rest_arg, const YYLTYPE *loc);
1495static NODE *new_hash_pattern(struct parser_params *p, NODE *constant, NODE *hshptn, const YYLTYPE *loc);
1496static NODE *new_hash_pattern_tail(struct parser_params *p, NODE *kw_args, ID kw_rest_arg, const YYLTYPE *loc);
1497
1498static rb_node_kw_arg_t *new_kw_arg(struct parser_params *p, NODE *k, const YYLTYPE *loc);
1499static rb_node_args_t *args_with_numbered(struct parser_params*,rb_node_args_t*,int,ID);
1500
1501static NODE* negate_lit(struct parser_params*, NODE*);
1502static void no_blockarg(struct parser_params*,NODE*);
1503static NODE *ret_args(struct parser_params*,NODE*);
1504static NODE *arg_blk_pass(NODE*,rb_node_block_pass_t*);
1505static NODE *dsym_node(struct parser_params*,NODE*,const YYLTYPE*);
1506
1507static NODE *gettable(struct parser_params*,ID,const YYLTYPE*);
1508static NODE *assignable(struct parser_params*,ID,NODE*,const YYLTYPE*);
1509
1510static NODE *aryset(struct parser_params*,NODE*,NODE*,const YYLTYPE*);
1511static NODE *attrset(struct parser_params*,NODE*,ID,ID,const YYLTYPE*);
1512
1513static VALUE rb_backref_error(struct parser_params*,NODE*);
1514static NODE *node_assign(struct parser_params*,NODE*,NODE*,struct lex_context,const YYLTYPE*);
1515
1516static NODE *new_op_assign(struct parser_params *p, NODE *lhs, ID op, NODE *rhs, struct lex_context, const YYLTYPE *loc);
1517static NODE *new_ary_op_assign(struct parser_params *p, NODE *ary, NODE *args, ID op, NODE *rhs, const YYLTYPE *args_loc, const YYLTYPE *loc, const YYLTYPE *call_operator_loc, const YYLTYPE *opening_loc, const YYLTYPE *closing_loc, const YYLTYPE *binary_operator_loc);
1518static NODE *new_attr_op_assign(struct parser_params *p, NODE *lhs, ID atype, ID attr, ID op, NODE *rhs, const YYLTYPE *loc, const YYLTYPE *call_operator_loc, const YYLTYPE *message_loc, const YYLTYPE *binary_operator_loc);
1519static NODE *new_const_op_assign(struct parser_params *p, NODE *lhs, ID op, NODE *rhs, struct lex_context, const YYLTYPE *loc);
1520static NODE *new_bodystmt(struct parser_params *p, NODE *head, NODE *rescue, NODE *rescue_else, NODE *ensure, const YYLTYPE *loc);
1521
1522static NODE *const_decl(struct parser_params *p, NODE* path, const YYLTYPE *loc);
1523
1524static rb_node_opt_arg_t *opt_arg_append(rb_node_opt_arg_t*, rb_node_opt_arg_t*);
1525static rb_node_kw_arg_t *kwd_append(rb_node_kw_arg_t*, rb_node_kw_arg_t*);
1526
1527static NODE *new_hash(struct parser_params *p, NODE *hash, const YYLTYPE *loc);
1528static NODE *new_unique_key_hash(struct parser_params *p, NODE *hash, const YYLTYPE *loc);
1529
1530static NODE *new_defined(struct parser_params *p, NODE *expr, const YYLTYPE *loc, const YYLTYPE *keyword_loc);
1531
1532static NODE *new_regexp(struct parser_params *, NODE *, int, const YYLTYPE *, const YYLTYPE *, const YYLTYPE *, const YYLTYPE *);
1533
1534#define make_list(list, loc) ((list) ? (nd_set_loc(list, loc), list) : NEW_ZLIST(loc))
1535
1536static NODE *new_xstring(struct parser_params *, NODE *, const YYLTYPE *loc);
1537
1538static NODE *symbol_append(struct parser_params *p, NODE *symbols, NODE *symbol);
1539
1540static NODE *match_op(struct parser_params*,NODE*,NODE*,const YYLTYPE*,const YYLTYPE*);
1541
1542static rb_ast_id_table_t *local_tbl(struct parser_params*);
1543
1544static VALUE reg_compile(struct parser_params*, rb_parser_string_t*, int);
1545static void reg_fragment_setenc(struct parser_params*, rb_parser_string_t*, int);
1546
1547static int literal_concat0(struct parser_params *p, rb_parser_string_t *head, rb_parser_string_t *tail);
1548static NODE *heredoc_dedent(struct parser_params*,NODE*);
1549
1550static void check_literal_when(struct parser_params *p, NODE *args, const YYLTYPE *loc);
1551
1552static rb_locations_lambda_body_t* new_locations_lambda_body(struct parser_params *p, NODE *node, const YYLTYPE *loc, const YYLTYPE *opening_loc, const YYLTYPE *closing_loc);
1553
1554#ifdef RIPPER
1555#define get_value(idx) (rb_ary_entry(p->s_value_stack, idx))
1556#define set_value(val) (p->s_lvalue = val)
1557static VALUE assign_error(struct parser_params *p, const char *mesg, VALUE a);
1558static int id_is_var(struct parser_params *p, ID id);
1559#endif
1560
1561RUBY_SYMBOL_EXPORT_BEGIN
1562VALUE rb_parser_reg_compile(struct parser_params* p, VALUE str, int options);
1563int rb_reg_fragment_setenc(struct parser_params*, rb_parser_string_t *, int);
1564enum lex_state_e rb_parser_trace_lex_state(struct parser_params *, enum lex_state_e, enum lex_state_e, int);
1565VALUE rb_parser_lex_state_name(struct parser_params *p, enum lex_state_e state);
1566void rb_parser_show_bitstack(struct parser_params *, stack_type, const char *, int);
1567PRINTF_ARGS(void rb_parser_fatal(struct parser_params *p, const char *fmt, ...), 2, 3);
1568YYLTYPE *rb_parser_set_location_from_strterm_heredoc(struct parser_params *p, rb_strterm_heredoc_t *here, YYLTYPE *yylloc);
1569YYLTYPE *rb_parser_set_location_of_delayed_token(struct parser_params *p, YYLTYPE *yylloc);
1570YYLTYPE *rb_parser_set_location_of_heredoc_end(struct parser_params *p, YYLTYPE *yylloc);
1571YYLTYPE *rb_parser_set_location_of_dummy_end(struct parser_params *p, YYLTYPE *yylloc);
1572YYLTYPE *rb_parser_set_location_of_none(struct parser_params *p, YYLTYPE *yylloc);
1573YYLTYPE *rb_parser_set_location(struct parser_params *p, YYLTYPE *yylloc);
1574void ruby_show_error_line(struct parser_params *p, VALUE errbuf, const YYLTYPE *yylloc, int lineno, rb_parser_string_t *str);
1575RUBY_SYMBOL_EXPORT_END
1576
1577static void flush_string_content(struct parser_params *p, rb_encoding *enc, size_t back);
1578static void error_duplicate_pattern_variable(struct parser_params *p, ID id, const YYLTYPE *loc);
1579static void error_duplicate_pattern_key(struct parser_params *p, ID id, const YYLTYPE *loc);
1580static VALUE formal_argument_error(struct parser_params*, ID);
1581static ID shadowing_lvar(struct parser_params*,ID);
1582static void new_bv(struct parser_params*,ID);
1583
1584static void local_push(struct parser_params*,int);
1585static void local_pop(struct parser_params*);
1586static void local_var(struct parser_params*, ID);
1587static void arg_var(struct parser_params*, ID);
1588static int local_id(struct parser_params *p, ID id);
1589static int local_id_ref(struct parser_params*, ID, ID **);
1590#define internal_id rb_parser_internal_id
1591ID internal_id(struct parser_params*);
1592static NODE *new_args_forward_call(struct parser_params*, NODE*, const YYLTYPE*, const YYLTYPE*);
1593static int check_forwarding_args(struct parser_params*);
1594static void add_forwarding_args(struct parser_params *p);
1595static void forwarding_arg_check(struct parser_params *p, ID arg, ID all, const char *var);
1596
1597static const struct vtable *dyna_push(struct parser_params *);
1598static void dyna_pop(struct parser_params*, const struct vtable *);
1599static int dyna_in_block(struct parser_params*);
1600#define dyna_var(p, id) local_var(p, id)
1601static int dvar_defined(struct parser_params*, ID);
1602#define dvar_defined_ref rb_parser_dvar_defined_ref
1603int dvar_defined_ref(struct parser_params*, ID, ID**);
1604static int dvar_curr(struct parser_params*,ID);
1605
1606static int lvar_defined(struct parser_params*, ID);
1607
1608static NODE *numparam_push(struct parser_params *p);
1609static void numparam_pop(struct parser_params *p, NODE *prev_inner);
1610
1611#define METHOD_NOT '!'
1612
1613#define idFWD_REST '*'
1614#define idFWD_KWREST idPow /* Use simple "**", as tDSTAR is "**arg" */
1615#define idFWD_BLOCK '&'
1616#define idFWD_ALL idDot3
1617#define arg_FWD_BLOCK idFWD_BLOCK
1618
1619#define RE_ONIG_OPTION_IGNORECASE 1
1620#define RE_ONIG_OPTION_EXTEND (RE_ONIG_OPTION_IGNORECASE<<1)
1621#define RE_ONIG_OPTION_MULTILINE (RE_ONIG_OPTION_EXTEND<<1)
1622#define RE_OPTION_ONCE (1<<16)
1623#define RE_OPTION_ENCODING_SHIFT 8
1624#define RE_OPTION_ENCODING(e) (((e)&0xff)<<RE_OPTION_ENCODING_SHIFT)
1625#define RE_OPTION_ENCODING_IDX(o) (((o)>>RE_OPTION_ENCODING_SHIFT)&0xff)
1626#define RE_OPTION_ENCODING_NONE(o) ((o)&RE_OPTION_ARG_ENCODING_NONE)
1627#define RE_OPTION_MASK 0xff
1628#define RE_OPTION_ARG_ENCODING_NONE 32
1629
1630#define CHECK_LITERAL_WHEN (st_table *)1
1631#define CASE_LABELS_ENABLED_P(case_labels) (case_labels && case_labels != CHECK_LITERAL_WHEN)
1632
1633#define yytnamerr(yyres, yystr) (YYSIZE_T)rb_yytnamerr(p, yyres, yystr)
1634RUBY_FUNC_EXPORTED size_t rb_yytnamerr(struct parser_params *p, char *yyres, const char *yystr);
1635
1636#define TOKEN2ID(tok) ( \
1637 tTOKEN_LOCAL_BEGIN<(tok)&&(tok)<tTOKEN_LOCAL_END ? TOKEN2LOCALID(tok) : \
1638 tTOKEN_INSTANCE_BEGIN<(tok)&&(tok)<tTOKEN_INSTANCE_END ? TOKEN2INSTANCEID(tok) : \
1639 tTOKEN_GLOBAL_BEGIN<(tok)&&(tok)<tTOKEN_GLOBAL_END ? TOKEN2GLOBALID(tok) : \
1640 tTOKEN_CONST_BEGIN<(tok)&&(tok)<tTOKEN_CONST_END ? TOKEN2CONSTID(tok) : \
1641 tTOKEN_CLASS_BEGIN<(tok)&&(tok)<tTOKEN_CLASS_END ? TOKEN2CLASSID(tok) : \
1642 tTOKEN_ATTRSET_BEGIN<(tok)&&(tok)<tTOKEN_ATTRSET_END ? TOKEN2ATTRSETID(tok) : \
1643 ((tok) / ((tok)<tPRESERVED_ID_END && ((tok)>=128 || rb_ispunct(tok)))))
1644
1645/****** Ripper *******/
1646
1647#ifdef RIPPER
1648
1649#include "eventids1.h"
1650#include "eventids2.h"
1651
1652extern const struct ripper_parser_ids ripper_parser_ids;
1653
1654static VALUE ripper_dispatch0(struct parser_params*,ID);
1655static VALUE ripper_dispatch1(struct parser_params*,ID,VALUE);
1656static VALUE ripper_dispatch2(struct parser_params*,ID,VALUE,VALUE);
1657static VALUE ripper_dispatch3(struct parser_params*,ID,VALUE,VALUE,VALUE);
1658static VALUE ripper_dispatch4(struct parser_params*,ID,VALUE,VALUE,VALUE,VALUE);
1659static VALUE ripper_dispatch5(struct parser_params*,ID,VALUE,VALUE,VALUE,VALUE,VALUE);
1660static VALUE ripper_dispatch7(struct parser_params*,ID,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE);
1661void ripper_error(struct parser_params *p);
1662
1663#define dispatch0(n) ripper_dispatch0(p, RIPPER_ID(n))
1664#define dispatch1(n,a) ripper_dispatch1(p, RIPPER_ID(n), (a))
1665#define dispatch2(n,a,b) ripper_dispatch2(p, RIPPER_ID(n), (a), (b))
1666#define dispatch3(n,a,b,c) ripper_dispatch3(p, RIPPER_ID(n), (a), (b), (c))
1667#define dispatch4(n,a,b,c,d) ripper_dispatch4(p, RIPPER_ID(n), (a), (b), (c), (d))
1668#define dispatch5(n,a,b,c,d,e) ripper_dispatch5(p, RIPPER_ID(n), (a), (b), (c), (d), (e))
1669#define dispatch7(n,a,b,c,d,e,f,g) ripper_dispatch7(p, RIPPER_ID(n), (a), (b), (c), (d), (e), (f), (g))
1670
1671#define yyparse ripper_yyparse
1672
1673static VALUE
1674aryptn_pre_args(struct parser_params *p, VALUE pre_arg, VALUE pre_args)
1675{
1676 if (!NIL_P(pre_arg)) {
1677 if (!NIL_P(pre_args)) {
1678 rb_ary_unshift(pre_args, pre_arg);
1679 }
1680 else {
1681 pre_args = rb_ary_new_from_args(1, pre_arg);
1682 }
1683 }
1684 return pre_args;
1685}
1686
1687#define ID2VAL(id) STATIC_ID2SYM(id)
1688#define TOKEN2VAL(t) ID2VAL(TOKEN2ID(t))
1689#endif /* RIPPER */
1690
1691#define KWD2EID(t, v) keyword_##t
1692
1693static NODE *
1694new_scope_body(struct parser_params *p, rb_node_args_t *args, NODE *body, NODE *parent, const YYLTYPE *loc)
1695{
1696 body = remove_begin(body);
1697 reduce_nodes(p, &body);
1698 NODE *n = NEW_SCOPE(args, body, parent, loc);
1699 nd_set_line(n, loc->end_pos.lineno);
1700 set_line_body(body, loc->beg_pos.lineno);
1701 return n;
1702}
1703
1704static NODE *
1705rescued_expr(struct parser_params *p, NODE *arg, NODE *rescue,
1706 const YYLTYPE *arg_loc, const YYLTYPE *mod_loc, const YYLTYPE *res_loc)
1707{
1708 YYLTYPE loc = code_loc_gen(mod_loc, res_loc);
1709 rescue = NEW_RESBODY(0, 0, remove_begin(rescue), 0, &loc);
1710 loc.beg_pos = arg_loc->beg_pos;
1711 return NEW_RESCUE(arg, rescue, 0, &loc);
1712}
1713
1714static NODE *add_block_exit(struct parser_params *p, NODE *node);
1715static rb_node_exits_t *init_block_exit(struct parser_params *p);
1716static rb_node_exits_t *allow_block_exit(struct parser_params *p);
1717static void restore_block_exit(struct parser_params *p, rb_node_exits_t *exits);
1718static void clear_block_exit(struct parser_params *p, bool error);
1719
1720static void
1721next_rescue_context(struct lex_context *next, const struct lex_context *outer, enum rescue_context def)
1722{
1723 next->in_rescue = outer->in_rescue == after_rescue ? after_rescue : def;
1724}
1725
1726static void
1727restore_defun(struct parser_params *p, rb_node_def_temp_t *temp)
1728{
1729 /* See: def_name action */
1730 struct lex_context ctxt = temp->save.ctxt;
1731 p->ctxt.in_def = ctxt.in_def;
1732 p->ctxt.shareable_constant_value = ctxt.shareable_constant_value;
1733 p->ctxt.in_rescue = ctxt.in_rescue;
1734 p->max_numparam = temp->save.max_numparam;
1735 numparam_pop(p, temp->save.numparam_save);
1736 clear_block_exit(p, true);
1737}
1738
1739static void
1740endless_method_name(struct parser_params *p, ID mid, const YYLTYPE *loc)
1741{
1742 if (is_attrset_id(mid)) {
1743 yyerror1(loc, "setter method cannot be defined in an endless method definition");
1744 }
1745 token_info_drop(p, "def", loc->beg_pos);
1746}
1747
1748#define debug_token_line(p, name, line) do { \
1749 if (p->debug) { \
1750 const char *const pcur = p->lex.pcur; \
1751 const char *const ptok = p->lex.ptok; \
1752 rb_parser_printf(p, name ":%d (%d: %"PRIdPTRDIFF"|%"PRIdPTRDIFF"|%"PRIdPTRDIFF")\n", \
1753 line, p->ruby_sourceline, \
1754 ptok - p->lex.pbeg, pcur - ptok, p->lex.pend - pcur); \
1755 } \
1756 } while (0)
1757
1758#define begin_definition(k, loc_beg, loc_end) \
1759 do { \
1760 if (!(p->ctxt.in_class = (k)[0] != 0)) { \
1761 /* singleton class */ \
1762 p->ctxt.cant_return = !p->ctxt.in_def; \
1763 p->ctxt.in_def = 0; \
1764 } \
1765 else if (p->ctxt.in_def) { \
1766 YYLTYPE loc = code_loc_gen(loc_beg, loc_end); \
1767 yyerror1(&loc, k " definition in method body"); \
1768 } \
1769 else { \
1770 p->ctxt.cant_return = 1; \
1771 } \
1772 local_push(p, 0); \
1773 } while (0)
1774
1775#ifndef RIPPER
1776# define ifndef_ripper(x) (x)
1777# define ifdef_ripper(r,x) (x)
1778#else
1779# define ifndef_ripper(x)
1780# define ifdef_ripper(r,x) (r)
1781#endif
1782
1783# define rb_warn0(fmt) WARN_CALL(WARN_ARGS(fmt, 1))
1784# define rb_warn1(fmt,a) WARN_CALL(WARN_ARGS(fmt, 2), (a))
1785# define rb_warn2(fmt,a,b) WARN_CALL(WARN_ARGS(fmt, 3), (a), (b))
1786# define rb_warn3(fmt,a,b,c) WARN_CALL(WARN_ARGS(fmt, 4), (a), (b), (c))
1787# define rb_warn4(fmt,a,b,c,d) WARN_CALL(WARN_ARGS(fmt, 5), (a), (b), (c), (d))
1788# define rb_warning0(fmt) WARNING_CALL(WARNING_ARGS(fmt, 1))
1789# define rb_warning1(fmt,a) WARNING_CALL(WARNING_ARGS(fmt, 2), (a))
1790# define rb_warning2(fmt,a,b) WARNING_CALL(WARNING_ARGS(fmt, 3), (a), (b))
1791# define rb_warning3(fmt,a,b,c) WARNING_CALL(WARNING_ARGS(fmt, 4), (a), (b), (c))
1792# define rb_warning4(fmt,a,b,c,d) WARNING_CALL(WARNING_ARGS(fmt, 5), (a), (b), (c), (d))
1793# define rb_warn0L(l,fmt) WARN_CALL(WARN_ARGS_L(l, fmt, 1))
1794# define rb_warn1L(l,fmt,a) WARN_CALL(WARN_ARGS_L(l, fmt, 2), (a))
1795# define rb_warn2L(l,fmt,a,b) WARN_CALL(WARN_ARGS_L(l, fmt, 3), (a), (b))
1796# define rb_warn3L(l,fmt,a,b,c) WARN_CALL(WARN_ARGS_L(l, fmt, 4), (a), (b), (c))
1797# define rb_warn4L(l,fmt,a,b,c,d) WARN_CALL(WARN_ARGS_L(l, fmt, 5), (a), (b), (c), (d))
1798# define rb_warning0L(l,fmt) WARNING_CALL(WARNING_ARGS_L(l, fmt, 1))
1799# define rb_warning1L(l,fmt,a) WARNING_CALL(WARNING_ARGS_L(l, fmt, 2), (a))
1800# define rb_warning2L(l,fmt,a,b) WARNING_CALL(WARNING_ARGS_L(l, fmt, 3), (a), (b))
1801# define rb_warning3L(l,fmt,a,b,c) WARNING_CALL(WARNING_ARGS_L(l, fmt, 4), (a), (b), (c))
1802# define rb_warning4L(l,fmt,a,b,c,d) WARNING_CALL(WARNING_ARGS_L(l, fmt, 5), (a), (b), (c), (d))
1803#ifdef RIPPER
1804extern const ID id_warn, id_warning, id_gets, id_assoc;
1805# define ERR_MESG() STR_NEW2(mesg) /* to bypass Ripper DSL */
1806# define WARN_S_L(s,l) STR_NEW(s,l)
1807# define WARN_S(s) STR_NEW2(s)
1808# define WARN_I(i) INT2NUM(i)
1809# define WARN_ID(i) rb_id2str(i)
1810# define PRIsWARN PRIsVALUE
1811# define WARN_ARGS(fmt,n) p->value, id_warn, n, rb_usascii_str_new_lit(fmt)
1812# define WARN_ARGS_L(l,fmt,n) WARN_ARGS(fmt,n)
1813# ifdef HAVE_VA_ARGS_MACRO
1814# define WARN_CALL(...) rb_funcall(__VA_ARGS__)
1815# else
1816# define WARN_CALL rb_funcall
1817# endif
1818# define WARNING_ARGS(fmt,n) p->value, id_warning, n, rb_usascii_str_new_lit(fmt)
1819# define WARNING_ARGS_L(l, fmt,n) WARNING_ARGS(fmt,n)
1820# ifdef HAVE_VA_ARGS_MACRO
1821# define WARNING_CALL(...) rb_funcall(__VA_ARGS__)
1822# else
1823# define WARNING_CALL rb_funcall
1824# endif
1825# define compile_error ripper_compile_error
1826#else
1827# define WARN_S_L(s,l) s
1828# define WARN_S(s) s
1829# define WARN_I(i) i
1830# define WARN_ID(i) rb_id2name(i)
1831# define PRIsWARN PRIsVALUE
1832# define WARN_ARGS(fmt,n) WARN_ARGS_L(p->ruby_sourceline,fmt,n)
1833# define WARN_ARGS_L(l,fmt,n) p->ruby_sourcefile, (l), (fmt)
1834# define WARN_CALL rb_compile_warn
1835# define WARNING_ARGS(fmt,n) WARN_ARGS(fmt,n)
1836# define WARNING_ARGS_L(l,fmt,n) WARN_ARGS_L(l,fmt,n)
1837# define WARNING_CALL rb_compile_warning
1838PRINTF_ARGS(static void parser_compile_error(struct parser_params*, const rb_code_location_t *loc, const char *fmt, ...), 3, 4);
1839# define compile_error(p, ...) parser_compile_error(p, NULL, __VA_ARGS__)
1840#endif
1841
1842#define RNODE_EXITS(node) ((rb_node_exits_t*)(node))
1843
1844static NODE *
1845add_block_exit(struct parser_params *p, NODE *node)
1846{
1847 if (!node) {
1848 compile_error(p, "unexpected null node");
1849 return 0;
1850 }
1851 switch (nd_type(node)) {
1852 case NODE_BREAK: case NODE_NEXT: case NODE_REDO: break;
1853 default:
1854 compile_error(p, "add_block_exit: unexpected node: %s", parser_node_name(nd_type(node)));
1855 return node;
1856 }
1857 if (!p->ctxt.in_defined) {
1858 rb_node_exits_t *exits = p->exits;
1859 if (exits) {
1860 RNODE_EXITS(exits->nd_stts)->nd_chain = node;
1861 exits->nd_stts = node;
1862 }
1863 }
1864 return node;
1865}
1866
1867static rb_node_exits_t *
1868init_block_exit(struct parser_params *p)
1869{
1870 rb_node_exits_t *old = p->exits;
1871 rb_node_exits_t *exits = NODE_NEW_INTERNAL(NODE_EXITS, rb_node_exits_t);
1872 exits->nd_chain = 0;
1873 exits->nd_stts = RNODE(exits);
1874 p->exits = exits;
1875 return old;
1876}
1877
1878static rb_node_exits_t *
1879allow_block_exit(struct parser_params *p)
1880{
1881 rb_node_exits_t *exits = p->exits;
1882 p->exits = 0;
1883 return exits;
1884}
1885
1886static void
1887restore_block_exit(struct parser_params *p, rb_node_exits_t *exits)
1888{
1889 p->exits = exits;
1890}
1891
1892static void
1893clear_block_exit(struct parser_params *p, bool error)
1894{
1895 rb_node_exits_t *exits = p->exits;
1896 if (!exits) return;
1897 if (error) {
1898 for (NODE *e = RNODE(exits); (e = RNODE_EXITS(e)->nd_chain) != 0; ) {
1899 switch (nd_type(e)) {
1900 case NODE_BREAK:
1901 yyerror1(&e->nd_loc, "Invalid break");
1902 break;
1903 case NODE_NEXT:
1904 yyerror1(&e->nd_loc, "Invalid next");
1905 break;
1906 case NODE_REDO:
1907 yyerror1(&e->nd_loc, "Invalid redo");
1908 break;
1909 default:
1910 yyerror1(&e->nd_loc, "unexpected node");
1911 goto end_checks; /* no nd_chain */
1912 }
1913 }
1914 end_checks:;
1915 }
1916 exits->nd_stts = RNODE(exits);
1917 exits->nd_chain = 0;
1918}
1919
1920#define WARN_EOL(tok) \
1921 (looking_at_eol_p(p) ? \
1922 (void)rb_warning0("'" tok "' at the end of line without an expression") : \
1923 (void)0)
1924static int looking_at_eol_p(struct parser_params *p);
1925
1926static NODE *
1927get_nd_value(struct parser_params *p, NODE *node)
1928{
1929 switch (nd_type(node)) {
1930 case NODE_GASGN:
1931 return RNODE_GASGN(node)->nd_value;
1932 case NODE_IASGN:
1933 return RNODE_IASGN(node)->nd_value;
1934 case NODE_LASGN:
1935 return RNODE_LASGN(node)->nd_value;
1936 case NODE_DASGN:
1937 return RNODE_DASGN(node)->nd_value;
1938 case NODE_MASGN:
1939 return RNODE_MASGN(node)->nd_value;
1940 case NODE_CVASGN:
1941 return RNODE_CVASGN(node)->nd_value;
1942 case NODE_CDECL:
1943 return RNODE_CDECL(node)->nd_value;
1944 default:
1945 compile_error(p, "get_nd_value: unexpected node: %s", parser_node_name(nd_type(node)));
1946 return 0;
1947 }
1948}
1949
1950static void
1951set_nd_value(struct parser_params *p, NODE *node, NODE *rhs)
1952{
1953 switch (nd_type(node)) {
1954 case NODE_CDECL:
1955 RNODE_CDECL(node)->nd_value = rhs;
1956 break;
1957 case NODE_GASGN:
1958 RNODE_GASGN(node)->nd_value = rhs;
1959 break;
1960 case NODE_IASGN:
1961 RNODE_IASGN(node)->nd_value = rhs;
1962 break;
1963 case NODE_LASGN:
1964 RNODE_LASGN(node)->nd_value = rhs;
1965 break;
1966 case NODE_DASGN:
1967 RNODE_DASGN(node)->nd_value = rhs;
1968 break;
1969 case NODE_MASGN:
1970 RNODE_MASGN(node)->nd_value = rhs;
1971 break;
1972 case NODE_CVASGN:
1973 RNODE_CVASGN(node)->nd_value = rhs;
1974 break;
1975 default:
1976 compile_error(p, "set_nd_value: unexpected node: %s", parser_node_name(nd_type(node)));
1977 break;
1978 }
1979}
1980
1981static ID
1982get_nd_vid(struct parser_params *p, NODE *node)
1983{
1984 switch (nd_type(node)) {
1985 case NODE_CDECL:
1986 return RNODE_CDECL(node)->nd_vid;
1987 case NODE_GASGN:
1988 return RNODE_GASGN(node)->nd_vid;
1989 case NODE_IASGN:
1990 return RNODE_IASGN(node)->nd_vid;
1991 case NODE_LASGN:
1992 return RNODE_LASGN(node)->nd_vid;
1993 case NODE_DASGN:
1994 return RNODE_DASGN(node)->nd_vid;
1995 case NODE_CVASGN:
1996 return RNODE_CVASGN(node)->nd_vid;
1997 default:
1998 compile_error(p, "get_nd_vid: unexpected node: %s", parser_node_name(nd_type(node)));
1999 return 0;
2000 }
2001}
2002
2003static NODE *
2004get_nd_args(struct parser_params *p, NODE *node)
2005{
2006 switch (nd_type(node)) {
2007 case NODE_CALL:
2008 return RNODE_CALL(node)->nd_args;
2009 case NODE_OPCALL:
2010 return RNODE_OPCALL(node)->nd_args;
2011 case NODE_FCALL:
2012 return RNODE_FCALL(node)->nd_args;
2013 case NODE_QCALL:
2014 return RNODE_QCALL(node)->nd_args;
2015 case NODE_SUPER:
2016 return RNODE_SUPER(node)->nd_args;
2017 case NODE_VCALL:
2018 case NODE_ZSUPER:
2019 case NODE_YIELD:
2020 case NODE_RETURN:
2021 case NODE_BREAK:
2022 case NODE_NEXT:
2023 return 0;
2024 default:
2025 compile_error(p, "get_nd_args: unexpected node: %s", parser_node_name(nd_type(node)));
2026 return 0;
2027 }
2028}
2029
2030static st_index_t
2031djb2(const uint8_t *str, size_t len)
2032{
2033 st_index_t hash = 5381;
2034
2035 for (size_t i = 0; i < len; i++) {
2036 hash = ((hash << 5) + hash) + str[i];
2037 }
2038
2039 return hash;
2040}
2041
2042static st_index_t
2043parser_memhash(const void *ptr, long len)
2044{
2045 return djb2(ptr, len);
2046}
2047
2048#define PARSER_STRING_PTR(str) (str->ptr)
2049#define PARSER_STRING_LEN(str) (str->len)
2050#define PARSER_STRING_END(str) (&str->ptr[str->len])
2051#define STRING_SIZE(str) ((size_t)str->len + 1)
2052#define STRING_TERM_LEN(str) (1)
2053#define STRING_TERM_FILL(str) (str->ptr[str->len] = '\0')
2054#define PARSER_STRING_RESIZE_CAPA_TERM(p,str,capacity,termlen) do {\
2055 SIZED_REALLOC_N(str->ptr, char, (size_t)total + termlen, STRING_SIZE(str)); \
2056 str->len = total; \
2057} while (0)
2058#define STRING_SET_LEN(str, n) do { \
2059 (str)->len = (n); \
2060} while (0)
2061#define PARSER_STRING_GETMEM(str, ptrvar, lenvar) \
2062 ((ptrvar) = str->ptr, \
2063 (lenvar) = str->len)
2064
2065static inline int
2066parser_string_char_at_end(struct parser_params *p, rb_parser_string_t *str, int when_empty)
2067{
2068 return PARSER_STRING_LEN(str) > 0 ? (unsigned char)PARSER_STRING_END(str)[-1] : when_empty;
2069}
2070
2071static rb_parser_string_t *
2072rb_parser_string_new(rb_parser_t *p, const char *ptr, long len)
2073{
2074 rb_parser_string_t *str;
2075
2076 if (len < 0) {
2077 rb_bug("negative string size (or size too big): %ld", len);
2078 }
2079
2080 str = xcalloc(1, sizeof(rb_parser_string_t));
2081 str->ptr = xcalloc(len + 1, sizeof(char));
2082
2083 if (ptr) {
2084 memcpy(PARSER_STRING_PTR(str), ptr, len);
2085 }
2086 STRING_SET_LEN(str, len);
2087 STRING_TERM_FILL(str);
2088 return str;
2089}
2090
2091static rb_parser_string_t *
2092rb_parser_encoding_string_new(rb_parser_t *p, const char *ptr, long len, rb_encoding *enc)
2093{
2094 rb_parser_string_t *str = rb_parser_string_new(p, ptr, len);
2095 str->coderange = RB_PARSER_ENC_CODERANGE_UNKNOWN;
2096 str->enc = enc;
2097 return str;
2098}
2099
2100#ifndef RIPPER
2101rb_parser_string_t *
2102rb_str_to_parser_string(rb_parser_t *p, VALUE str)
2103{
2104 /* Type check */
2105 rb_parser_string_t *ret = rb_parser_encoding_string_new(p, RSTRING_PTR(str), RSTRING_LEN(str), rb_enc_get(str));
2106 RB_GC_GUARD(str);
2107 return ret;
2108}
2109
2110void
2111rb_parser_string_free(rb_parser_t *p, rb_parser_string_t *str)
2112{
2113 if (!str) return;
2114 xfree(PARSER_STRING_PTR(str));
2115 xfree(str);
2116}
2117#endif
2118
2119static st_index_t
2120rb_parser_str_hash(rb_parser_string_t *str)
2121{
2122 return parser_memhash((const void *)PARSER_STRING_PTR(str), PARSER_STRING_LEN(str));
2123}
2124
2125static st_index_t
2126rb_char_p_hash(const char *c)
2127{
2128 return parser_memhash((const void *)c, strlen(c));
2129}
2130
2131static size_t
2132rb_parser_str_capacity(rb_parser_string_t *str, const int termlen)
2133{
2134 return PARSER_STRING_LEN(str);
2135}
2136
2137#ifndef RIPPER
2138static char *
2139rb_parser_string_end(rb_parser_string_t *str)
2140{
2141 return &str->ptr[str->len];
2142}
2143#endif
2144
2145static void
2146rb_parser_string_set_encoding(rb_parser_string_t *str, rb_encoding *enc)
2147{
2148 str->enc = enc;
2149}
2150
2151static rb_encoding *
2152rb_parser_str_get_encoding(rb_parser_string_t *str)
2153{
2154 return str->enc;
2155}
2156
2157#ifndef RIPPER
2158static bool
2159PARSER_ENCODING_IS_ASCII8BIT(struct parser_params *p, rb_parser_string_t *str)
2160{
2161 return rb_parser_str_get_encoding(str) == rb_ascii8bit_encoding();
2162}
2163#endif
2164
2165static int
2166PARSER_ENC_CODERANGE(rb_parser_string_t *str)
2167{
2168 return str->coderange;
2169}
2170
2171static void
2172PARSER_ENC_CODERANGE_SET(rb_parser_string_t *str, int coderange)
2173{
2174 str->coderange = coderange;
2175}
2176
2177static void
2178PARSER_ENCODING_CODERANGE_SET(rb_parser_string_t *str, rb_encoding *enc, enum rb_parser_string_coderange_type cr)
2179{
2180 rb_parser_string_set_encoding(str, enc);
2181 PARSER_ENC_CODERANGE_SET(str, cr);
2182}
2183
2184static void
2185PARSER_ENC_CODERANGE_CLEAR(rb_parser_string_t *str)
2186{
2187 str->coderange = RB_PARSER_ENC_CODERANGE_UNKNOWN;
2188}
2189
2190static bool
2191PARSER_ENC_CODERANGE_ASCIIONLY(rb_parser_string_t *str)
2192{
2193 return PARSER_ENC_CODERANGE(str) == RB_PARSER_ENC_CODERANGE_7BIT;
2194}
2195
2196static bool
2197PARSER_ENC_CODERANGE_CLEAN_P(int cr)
2198{
2199 return cr == RB_PARSER_ENC_CODERANGE_7BIT || cr == RB_PARSER_ENC_CODERANGE_VALID;
2200}
2201
2202static const char *
2203rb_parser_search_nonascii(const char *p, const char *e)
2204{
2205 const char *s = p;
2206
2207 for (; s < e; s++) {
2208 if (*s & 0x80) return s;
2209 }
2210
2211 return NULL;
2212}
2213
2214static int
2215rb_parser_coderange_scan(struct parser_params *p, const char *ptr, long len, rb_encoding *enc)
2216{
2217 const char *e = ptr + len;
2218
2219 if (enc == rb_ascii8bit_encoding()) {
2220 /* enc is ASCII-8BIT. ASCII-8BIT string never be broken. */
2221 ptr = rb_parser_search_nonascii(ptr, e);
2222 return ptr ? RB_PARSER_ENC_CODERANGE_VALID : RB_PARSER_ENC_CODERANGE_7BIT;
2223 }
2224
2225 /* parser string encoding is always asciicompat */
2226 ptr = rb_parser_search_nonascii(ptr, e);
2227 if (!ptr) return RB_PARSER_ENC_CODERANGE_7BIT;
2228 for (;;) {
2229 int ret = rb_enc_precise_mbclen(ptr, e, enc);
2230 if (!MBCLEN_CHARFOUND_P(ret)) return RB_PARSER_ENC_CODERANGE_BROKEN;
2231 ptr += MBCLEN_CHARFOUND_LEN(ret);
2232 if (ptr == e) break;
2233 ptr = rb_parser_search_nonascii(ptr, e);
2234 if (!ptr) break;
2235 }
2236
2237 return RB_PARSER_ENC_CODERANGE_VALID;
2238}
2239
2240static int
2241rb_parser_enc_coderange_scan(struct parser_params *p, rb_parser_string_t *str, rb_encoding *enc)
2242{
2243 return rb_parser_coderange_scan(p, PARSER_STRING_PTR(str), PARSER_STRING_LEN(str), enc);
2244}
2245
2246static int
2247rb_parser_enc_str_coderange(struct parser_params *p, rb_parser_string_t *str)
2248{
2249 int cr = PARSER_ENC_CODERANGE(str);
2250
2251 if (cr == RB_PARSER_ENC_CODERANGE_UNKNOWN) {
2252 cr = rb_parser_enc_coderange_scan(p, str, rb_parser_str_get_encoding(str));
2253 PARSER_ENC_CODERANGE_SET(str, cr);
2254 }
2255
2256 return cr;
2257}
2258
2259static rb_parser_string_t *
2260rb_parser_enc_associate(struct parser_params *p, rb_parser_string_t *str, rb_encoding *enc)
2261{
2262 if (rb_parser_str_get_encoding(str) == enc)
2263 return str;
2264 if (!PARSER_ENC_CODERANGE_ASCIIONLY(str)) {
2265 PARSER_ENC_CODERANGE_CLEAR(str);
2266 }
2267 rb_parser_string_set_encoding(str, enc);
2268 return str;
2269}
2270
2271static bool
2272rb_parser_is_ascii_string(struct parser_params *p, rb_parser_string_t *str)
2273{
2274 return rb_parser_enc_str_coderange(p, str) == RB_PARSER_ENC_CODERANGE_7BIT;
2275}
2276
2277static rb_encoding *
2278rb_parser_enc_compatible(struct parser_params *p, rb_parser_string_t *str1, rb_parser_string_t *str2)
2279{
2280 rb_encoding *enc1 = rb_parser_str_get_encoding(str1);
2281 rb_encoding *enc2 = rb_parser_str_get_encoding(str2);
2282
2283 if (enc1 == NULL || enc2 == NULL)
2284 return 0;
2285
2286 if (enc1 == enc2) {
2287 return enc1;
2288 }
2289
2290 if (PARSER_STRING_LEN(str2) == 0)
2291 return enc1;
2292 if (PARSER_STRING_LEN(str1) == 0)
2293 return rb_parser_is_ascii_string(p, str2) ? enc1 : enc2;
2294
2295 int cr1, cr2;
2296
2297 cr1 = rb_parser_enc_str_coderange(p, str1);
2298 cr2 = rb_parser_enc_str_coderange(p, str2);
2299
2300 if (cr1 != cr2) {
2301 if (cr1 == RB_PARSER_ENC_CODERANGE_7BIT) return enc2;
2302 if (cr2 == RB_PARSER_ENC_CODERANGE_7BIT) return enc1;
2303 }
2304
2305 if (cr2 == RB_PARSER_ENC_CODERANGE_7BIT) {
2306 return enc1;
2307 }
2308
2309 if (cr1 == RB_PARSER_ENC_CODERANGE_7BIT) {
2310 return enc2;
2311 }
2312
2313 return 0;
2314}
2315
2316static void
2317rb_parser_str_modify(rb_parser_string_t *str)
2318{
2319 PARSER_ENC_CODERANGE_CLEAR(str);
2320}
2321
2322static void
2323rb_parser_str_set_len(struct parser_params *p, rb_parser_string_t *str, long len)
2324{
2325 long capa;
2326 const int termlen = STRING_TERM_LEN(str);
2327
2328 if (len > (capa = (long)(rb_parser_str_capacity(str, termlen))) || len < 0) {
2329 rb_bug("probable buffer overflow: %ld for %ld", len, capa);
2330 }
2331
2332 int cr = PARSER_ENC_CODERANGE(str);
2333 if (cr == RB_PARSER_ENC_CODERANGE_UNKNOWN) {
2334 /* Leave unknown. */
2335 }
2336 else if (len > PARSER_STRING_LEN(str)) {
2337 PARSER_ENC_CODERANGE_SET(str, RB_PARSER_ENC_CODERANGE_UNKNOWN);
2338 }
2339 else if (len < PARSER_STRING_LEN(str)) {
2340 if (cr != RB_PARSER_ENC_CODERANGE_7BIT) {
2341 /* ASCII-only string is keeping after truncated. Valid
2342 * and broken may be invalid or valid, leave unknown. */
2343 PARSER_ENC_CODERANGE_SET(str, RB_PARSER_ENC_CODERANGE_UNKNOWN);
2344 }
2345 }
2346
2347 STRING_SET_LEN(str, len);
2348 STRING_TERM_FILL(str);
2349}
2350
2351static rb_parser_string_t *
2352rb_parser_str_buf_cat(struct parser_params *p, rb_parser_string_t *str, const char *ptr, long len)
2353{
2354 rb_parser_str_modify(str);
2355 if (len == 0) return 0;
2356
2357 long total, olen, off = -1;
2358 char *sptr;
2359 const int termlen = STRING_TERM_LEN(str);
2360
2361 PARSER_STRING_GETMEM(str, sptr, olen);
2362 if (ptr >= sptr && ptr <= sptr + olen) {
2363 off = ptr - sptr;
2364 }
2365
2366 if (olen > LONG_MAX - len) {
2367 compile_error(p, "string sizes too big");
2368 return 0;
2369 }
2370 total = olen + len;
2371 PARSER_STRING_RESIZE_CAPA_TERM(p, str, total, termlen);
2372 sptr = PARSER_STRING_PTR(str);
2373 if (off != -1) {
2374 ptr = sptr + off;
2375 }
2376 memcpy(sptr + olen, ptr, len);
2377 STRING_SET_LEN(str, total);
2378 STRING_TERM_FILL(str);
2379
2380 return str;
2381}
2382
2383#define parser_str_cat(str, ptr, len) rb_parser_str_buf_cat(p, str, ptr, len)
2384#define parser_str_cat_cstr(str, lit) rb_parser_str_buf_cat(p, str, lit, strlen(lit))
2385
2386static rb_parser_string_t *
2387rb_parser_enc_cr_str_buf_cat(struct parser_params *p, rb_parser_string_t *str, const char *ptr, long len,
2388 rb_encoding *ptr_enc, int ptr_cr, int *ptr_cr_ret)
2389{
2390 int str_cr, res_cr;
2391 rb_encoding *str_enc, *res_enc;
2392
2393 str_enc = rb_parser_str_get_encoding(str);
2394 str_cr = PARSER_STRING_LEN(str) ? PARSER_ENC_CODERANGE(str) : RB_PARSER_ENC_CODERANGE_7BIT;
2395
2396 if (str_enc == ptr_enc) {
2397 if (str_cr != RB_PARSER_ENC_CODERANGE_UNKNOWN && ptr_cr == RB_PARSER_ENC_CODERANGE_UNKNOWN) {
2398 ptr_cr = rb_parser_coderange_scan(p, ptr, len, ptr_enc);
2399 }
2400 }
2401 else {
2402 /* parser string encoding is always asciicompat */
2403 if (ptr_cr == RB_PARSER_ENC_CODERANGE_UNKNOWN) {
2404 ptr_cr = rb_parser_coderange_scan(p, ptr, len, ptr_enc);
2405 }
2406 if (str_cr == RB_PARSER_ENC_CODERANGE_UNKNOWN) {
2407 if (str_enc == rb_ascii8bit_encoding() || ptr_cr != RB_PARSER_ENC_CODERANGE_7BIT) {
2408 str_cr = rb_parser_enc_str_coderange(p, str);
2409 }
2410 }
2411 }
2412 if (ptr_cr_ret)
2413 *ptr_cr_ret = ptr_cr;
2414
2415 if (str_enc != ptr_enc &&
2416 str_cr != RB_PARSER_ENC_CODERANGE_7BIT &&
2417 ptr_cr != RB_PARSER_ENC_CODERANGE_7BIT) {
2418 goto incompatible;
2419 }
2420
2421 if (str_cr == RB_PARSER_ENC_CODERANGE_UNKNOWN) {
2422 res_enc = str_enc;
2423 res_cr = RB_PARSER_ENC_CODERANGE_UNKNOWN;
2424 }
2425 else if (str_cr == RB_PARSER_ENC_CODERANGE_7BIT) {
2426 if (ptr_cr == RB_PARSER_ENC_CODERANGE_7BIT) {
2427 res_enc = str_enc;
2428 res_cr = RB_PARSER_ENC_CODERANGE_7BIT;
2429 }
2430 else {
2431 res_enc = ptr_enc;
2432 res_cr = ptr_cr;
2433 }
2434 }
2435 else if (str_cr == RB_PARSER_ENC_CODERANGE_VALID) {
2436 res_enc = str_enc;
2437 if (PARSER_ENC_CODERANGE_CLEAN_P(ptr_cr))
2438 res_cr = str_cr;
2439 else
2440 res_cr = ptr_cr;
2441 }
2442 else { /* str_cr == RB_PARSER_ENC_CODERANGE_BROKEN */
2443 res_enc = str_enc;
2444 res_cr = str_cr;
2445 if (0 < len) res_cr = RB_PARSER_ENC_CODERANGE_UNKNOWN;
2446 }
2447
2448 if (len < 0) {
2449 compile_error(p, "negative string size (or size too big)");
2450 }
2451 parser_str_cat(str, ptr, len);
2452 PARSER_ENCODING_CODERANGE_SET(str, res_enc, res_cr);
2453 return str;
2454
2455 incompatible:
2456 compile_error(p, "incompatible character encodings: %s and %s",
2457 rb_enc_name(str_enc), rb_enc_name(ptr_enc));
2458 UNREACHABLE_RETURN(0);
2459
2460}
2461
2462static rb_parser_string_t *
2463rb_parser_enc_str_buf_cat(struct parser_params *p, rb_parser_string_t *str, const char *ptr, long len,
2464 rb_encoding *ptr_enc)
2465{
2466 return rb_parser_enc_cr_str_buf_cat(p, str, ptr, len, ptr_enc, RB_PARSER_ENC_CODERANGE_UNKNOWN, NULL);
2467}
2468
2469static rb_parser_string_t *
2470rb_parser_str_buf_append(struct parser_params *p, rb_parser_string_t *str, rb_parser_string_t *str2)
2471{
2472 int str2_cr = rb_parser_enc_str_coderange(p, str2);
2473
2474 rb_parser_enc_cr_str_buf_cat(p, str, PARSER_STRING_PTR(str2), PARSER_STRING_LEN(str2),
2475 rb_parser_str_get_encoding(str2), str2_cr, &str2_cr);
2476
2477 PARSER_ENC_CODERANGE_SET(str2, str2_cr);
2478
2479 return str;
2480}
2481
2482static rb_parser_string_t *
2483rb_parser_str_resize(struct parser_params *p, rb_parser_string_t *str, long len)
2484{
2485 if (len < 0) {
2486 rb_bug("negative string size (or size too big)");
2487 }
2488
2489 long slen = PARSER_STRING_LEN(str);
2490
2491 if (slen > len && PARSER_ENC_CODERANGE(str) != RB_PARSER_ENC_CODERANGE_7BIT) {
2492 PARSER_ENC_CODERANGE_CLEAR(str);
2493 }
2494
2495 {
2496 long capa;
2497 const int termlen = STRING_TERM_LEN(str);
2498
2499 if ((capa = slen) < len) {
2500 SIZED_REALLOC_N(str->ptr, char, (size_t)len + termlen, STRING_SIZE(str));
2501 }
2502 else if (len == slen) return str;
2503 STRING_SET_LEN(str, len);
2504 STRING_TERM_FILL(str);
2505 }
2506 return str;
2507}
2508
2509# define PARSER_ENC_STRING_GETMEM(str, ptrvar, lenvar, encvar) \
2510 ((ptrvar) = str->ptr, \
2511 (lenvar) = str->len, \
2512 (encvar) = str->enc)
2513
2514static int
2515rb_parser_string_hash_cmp(rb_parser_string_t *str1, rb_parser_string_t *str2)
2516{
2517 long len1, len2;
2518 const char *ptr1, *ptr2;
2519 rb_encoding *enc1, *enc2;
2520
2521 PARSER_ENC_STRING_GETMEM(str1, ptr1, len1, enc1);
2522 PARSER_ENC_STRING_GETMEM(str2, ptr2, len2, enc2);
2523
2524 return (len1 != len2 ||
2525 enc1 != enc2 ||
2526 memcmp(ptr1, ptr2, len1) != 0);
2527}
2528
2529static void
2530rb_parser_ary_extend(rb_parser_t *p, rb_parser_ary_t *ary, long len)
2531{
2532 long i;
2533 if (ary->capa < len) {
2534 ary->capa = len;
2535 ary->data = (rb_parser_ary_data *)xrealloc(ary->data, sizeof(rb_parser_ary_data) * len);
2536 for (i = ary->len; i < len; i++) {
2537 ary->data[i] = 0;
2538 }
2539 }
2540}
2541
2542/*
2543 * Do not call this directly.
2544 * Use rb_parser_ary_new_capa_for_XXX() instead.
2545 */
2546static rb_parser_ary_t *
2547parser_ary_new_capa(rb_parser_t *p, long len)
2548{
2549 if (len < 0) {
2550 rb_bug("negative array size (or size too big): %ld", len);
2551 }
2552 rb_parser_ary_t *ary = xcalloc(1, sizeof(rb_parser_ary_t));
2553 ary->data_type = 0;
2554 ary->len = 0;
2555 ary->capa = len;
2556 if (0 < len) {
2557 ary->data = (rb_parser_ary_data *)xcalloc(len, sizeof(rb_parser_ary_data));
2558 }
2559 else {
2560 ary->data = NULL;
2561 }
2562 return ary;
2563}
2564
2565#ifndef RIPPER
2566static rb_parser_ary_t *
2567rb_parser_ary_new_capa_for_script_line(rb_parser_t *p, long len)
2568{
2569 rb_parser_ary_t *ary = parser_ary_new_capa(p, len);
2570 ary->data_type = PARSER_ARY_DATA_SCRIPT_LINE;
2571 return ary;
2572}
2573
2574static rb_parser_ary_t *
2575rb_parser_ary_new_capa_for_ast_token(rb_parser_t *p, long len)
2576{
2577 rb_parser_ary_t *ary = parser_ary_new_capa(p, len);
2578 ary->data_type = PARSER_ARY_DATA_AST_TOKEN;
2579 return ary;
2580}
2581#endif
2582
2583static rb_parser_ary_t *
2584rb_parser_ary_new_capa_for_node(rb_parser_t *p, long len)
2585{
2586 rb_parser_ary_t *ary = parser_ary_new_capa(p, len);
2587 ary->data_type = PARSER_ARY_DATA_NODE;
2588 return ary;
2589}
2590
2591/*
2592 * Do not call this directly.
2593 * Use rb_parser_ary_push_XXX() instead.
2594 */
2595static rb_parser_ary_t *
2596parser_ary_push(rb_parser_t *p, rb_parser_ary_t *ary, rb_parser_ary_data val)
2597{
2598 if (ary->len == ary->capa) {
2599 rb_parser_ary_extend(p, ary, ary->len == 0 ? 1 : ary->len * 2);
2600 }
2601 ary->data[ary->len++] = val;
2602 return ary;
2603}
2604
2605#ifndef RIPPER
2606static rb_parser_ary_t *
2607rb_parser_ary_push_ast_token(rb_parser_t *p, rb_parser_ary_t *ary, rb_parser_ast_token_t *val)
2608{
2609 if (ary->data_type != PARSER_ARY_DATA_AST_TOKEN) {
2610 rb_bug("unexpected rb_parser_ary_data_type: %d", ary->data_type);
2611 }
2612 return parser_ary_push(p, ary, val);
2613}
2614
2615static rb_parser_ary_t *
2616rb_parser_ary_push_script_line(rb_parser_t *p, rb_parser_ary_t *ary, rb_parser_string_t *val)
2617{
2618 if (ary->data_type != PARSER_ARY_DATA_SCRIPT_LINE) {
2619 rb_bug("unexpected rb_parser_ary_data_type: %d", ary->data_type);
2620 }
2621 return parser_ary_push(p, ary, val);
2622}
2623#endif
2624
2625static rb_parser_ary_t *
2626rb_parser_ary_push_node(rb_parser_t *p, rb_parser_ary_t *ary, NODE *val)
2627{
2628 if (ary->data_type != PARSER_ARY_DATA_NODE) {
2629 rb_bug("unexpected rb_parser_ary_data_type: %d", ary->data_type);
2630 }
2631 return parser_ary_push(p, ary, val);
2632}
2633
2634#ifndef RIPPER
2635static void
2636rb_parser_ast_token_free(rb_parser_t *p, rb_parser_ast_token_t *token)
2637{
2638 if (!token) return;
2639 rb_parser_string_free(p, token->str);
2640 xfree(token);
2641}
2642
2643static void
2644rb_parser_ary_free(rb_parser_t *p, rb_parser_ary_t *ary)
2645{
2646# define foreach_ary(ptr) \
2647 for (rb_parser_ary_data *ptr = ary->data, *const end_ary_data = ptr + ary->len; \
2648 ptr < end_ary_data; ptr++)
2649 switch (ary->data_type) {
2650 case PARSER_ARY_DATA_AST_TOKEN:
2651 foreach_ary(data) {rb_parser_ast_token_free(p, *data);}
2652 break;
2653 case PARSER_ARY_DATA_SCRIPT_LINE:
2654 foreach_ary(data) {rb_parser_string_free(p, *data);}
2655 break;
2656 case PARSER_ARY_DATA_NODE:
2657 /* Do nothing because nodes are freed when rb_ast_t is freed */
2658 break;
2659 default:
2660 rb_bug("unexpected rb_parser_ary_data_type: %d", ary->data_type);
2661 break;
2662 }
2663# undef foreach_ary
2664 xfree(ary->data);
2665 xfree(ary);
2666}
2667
2668#endif /* !RIPPER */
2669
2670#line 2671 "parse.c"
2671
2672# ifndef YY_CAST
2673# ifdef __cplusplus
2674# define YY_CAST(Type, Val) static_cast<Type> (Val)
2675# define YY_REINTERPRET_CAST(Type, Val) reinterpret_cast<Type> (Val)
2676# else
2677# define YY_CAST(Type, Val) ((Type) (Val))
2678# define YY_REINTERPRET_CAST(Type, Val) ((Type) (Val))
2679# endif
2680# endif
2681# ifndef YY_NULLPTR
2682# if defined __cplusplus
2683# if 201103L <= __cplusplus
2684# define YY_NULLPTR nullptr
2685# else
2686# define YY_NULLPTR 0
2687# endif
2688# else
2689# define YY_NULLPTR ((void*)0)
2690# endif
2691# endif
2692
2693#include "parse.h"
2694/* Symbol kind. */
2695enum yysymbol_kind_t
2696{
2697 YYSYMBOL_YYEMPTY = -2,
2698 YYSYMBOL_YYEOF = 0, /* "end-of-input" */
2699 YYSYMBOL_YYerror = 1, /* error */
2700 YYSYMBOL_YYUNDEF = 2, /* "invalid token" */
2701 YYSYMBOL_keyword_class = 3, /* "'class'" */
2702 YYSYMBOL_keyword_module = 4, /* "'module'" */
2703 YYSYMBOL_keyword_def = 5, /* "'def'" */
2704 YYSYMBOL_keyword_undef = 6, /* "'undef'" */
2705 YYSYMBOL_keyword_begin = 7, /* "'begin'" */
2706 YYSYMBOL_keyword_rescue = 8, /* "'rescue'" */
2707 YYSYMBOL_keyword_ensure = 9, /* "'ensure'" */
2708 YYSYMBOL_keyword_end = 10, /* "'end'" */
2709 YYSYMBOL_keyword_if = 11, /* "'if'" */
2710 YYSYMBOL_keyword_unless = 12, /* "'unless'" */
2711 YYSYMBOL_keyword_then = 13, /* "'then'" */
2712 YYSYMBOL_keyword_elsif = 14, /* "'elsif'" */
2713 YYSYMBOL_keyword_else = 15, /* "'else'" */
2714 YYSYMBOL_keyword_case = 16, /* "'case'" */
2715 YYSYMBOL_keyword_when = 17, /* "'when'" */
2716 YYSYMBOL_keyword_while = 18, /* "'while'" */
2717 YYSYMBOL_keyword_until = 19, /* "'until'" */
2718 YYSYMBOL_keyword_for = 20, /* "'for'" */
2719 YYSYMBOL_keyword_break = 21, /* "'break'" */
2720 YYSYMBOL_keyword_next = 22, /* "'next'" */
2721 YYSYMBOL_keyword_redo = 23, /* "'redo'" */
2722 YYSYMBOL_keyword_retry = 24, /* "'retry'" */
2723 YYSYMBOL_keyword_in = 25, /* "'in'" */
2724 YYSYMBOL_keyword_do = 26, /* "'do'" */
2725 YYSYMBOL_keyword_do_cond = 27, /* "'do' for condition" */
2726 YYSYMBOL_keyword_do_block = 28, /* "'do' for block" */
2727 YYSYMBOL_keyword_do_LAMBDA = 29, /* "'do' for lambda" */
2728 YYSYMBOL_keyword_return = 30, /* "'return'" */
2729 YYSYMBOL_keyword_yield = 31, /* "'yield'" */
2730 YYSYMBOL_keyword_super = 32, /* "'super'" */
2731 YYSYMBOL_keyword_self = 33, /* "'self'" */
2732 YYSYMBOL_keyword_nil = 34, /* "'nil'" */
2733 YYSYMBOL_keyword_true = 35, /* "'true'" */
2734 YYSYMBOL_keyword_false = 36, /* "'false'" */
2735 YYSYMBOL_keyword_and = 37, /* "'and'" */
2736 YYSYMBOL_keyword_or = 38, /* "'or'" */
2737 YYSYMBOL_keyword_not = 39, /* "'not'" */
2738 YYSYMBOL_modifier_if = 40, /* "'if' modifier" */
2739 YYSYMBOL_modifier_unless = 41, /* "'unless' modifier" */
2740 YYSYMBOL_modifier_while = 42, /* "'while' modifier" */
2741 YYSYMBOL_modifier_until = 43, /* "'until' modifier" */
2742 YYSYMBOL_modifier_rescue = 44, /* "'rescue' modifier" */
2743 YYSYMBOL_keyword_alias = 45, /* "'alias'" */
2744 YYSYMBOL_keyword_defined = 46, /* "'defined?'" */
2745 YYSYMBOL_keyword_BEGIN = 47, /* "'BEGIN'" */
2746 YYSYMBOL_keyword_END = 48, /* "'END'" */
2747 YYSYMBOL_keyword__LINE__ = 49, /* "'__LINE__'" */
2748 YYSYMBOL_keyword__FILE__ = 50, /* "'__FILE__'" */
2749 YYSYMBOL_keyword__ENCODING__ = 51, /* "'__ENCODING__'" */
2750 YYSYMBOL_tIDENTIFIER = 52, /* "local variable or method" */
2751 YYSYMBOL_tFID = 53, /* "method" */
2752 YYSYMBOL_tGVAR = 54, /* "global variable" */
2753 YYSYMBOL_tIVAR = 55, /* "instance variable" */
2754 YYSYMBOL_tCONSTANT = 56, /* "constant" */
2755 YYSYMBOL_tCVAR = 57, /* "class variable" */
2756 YYSYMBOL_tLABEL = 58, /* "label" */
2757 YYSYMBOL_tINTEGER = 59, /* "integer literal" */
2758 YYSYMBOL_tFLOAT = 60, /* "float literal" */
2759 YYSYMBOL_tRATIONAL = 61, /* "rational literal" */
2760 YYSYMBOL_tIMAGINARY = 62, /* "imaginary literal" */
2761 YYSYMBOL_tCHAR = 63, /* "char literal" */
2762 YYSYMBOL_tNTH_REF = 64, /* "numbered reference" */
2763 YYSYMBOL_tBACK_REF = 65, /* "back reference" */
2764 YYSYMBOL_tSTRING_CONTENT = 66, /* "literal content" */
2765 YYSYMBOL_tREGEXP_END = 67, /* tREGEXP_END */
2766 YYSYMBOL_tDUMNY_END = 68, /* "dummy end" */
2767 YYSYMBOL_69_ = 69, /* '.' */
2768 YYSYMBOL_70_backslash_ = 70, /* "backslash" */
2769 YYSYMBOL_tSP = 71, /* "escaped space" */
2770 YYSYMBOL_72_escaped_horizontal_tab_ = 72, /* "escaped horizontal tab" */
2771 YYSYMBOL_73_escaped_form_feed_ = 73, /* "escaped form feed" */
2772 YYSYMBOL_74_escaped_carriage_return_ = 74, /* "escaped carriage return" */
2773 YYSYMBOL_75_escaped_vertical_tab_ = 75, /* "escaped vertical tab" */
2774 YYSYMBOL_tUPLUS = 76, /* "unary+" */
2775 YYSYMBOL_tUMINUS = 77, /* "unary-" */
2776 YYSYMBOL_tPOW = 78, /* "**" */
2777 YYSYMBOL_tCMP = 79, /* "<=>" */
2778 YYSYMBOL_tEQ = 80, /* "==" */
2779 YYSYMBOL_tEQQ = 81, /* "===" */
2780 YYSYMBOL_tNEQ = 82, /* "!=" */
2781 YYSYMBOL_tGEQ = 83, /* ">=" */
2782 YYSYMBOL_tLEQ = 84, /* "<=" */
2783 YYSYMBOL_tANDOP = 85, /* "&&" */
2784 YYSYMBOL_tOROP = 86, /* "||" */
2785 YYSYMBOL_tMATCH = 87, /* "=~" */
2786 YYSYMBOL_tNMATCH = 88, /* "!~" */
2787 YYSYMBOL_tDOT2 = 89, /* ".." */
2788 YYSYMBOL_tDOT3 = 90, /* "..." */
2789 YYSYMBOL_tBDOT2 = 91, /* "(.." */
2790 YYSYMBOL_tBDOT3 = 92, /* "(..." */
2791 YYSYMBOL_tAREF = 93, /* "[]" */
2792 YYSYMBOL_tASET = 94, /* "[]=" */
2793 YYSYMBOL_tLSHFT = 95, /* "<<" */
2794 YYSYMBOL_tRSHFT = 96, /* ">>" */
2795 YYSYMBOL_tANDDOT = 97, /* "&." */
2796 YYSYMBOL_tCOLON2 = 98, /* "::" */
2797 YYSYMBOL_tCOLON3 = 99, /* ":: at EXPR_BEG" */
2798 YYSYMBOL_tOP_ASGN = 100, /* "operator-assignment" */
2799 YYSYMBOL_tASSOC = 101, /* "=>" */
2800 YYSYMBOL_tLPAREN = 102, /* "(" */
2801 YYSYMBOL_tLPAREN_ARG = 103, /* "( arg" */
2802 YYSYMBOL_tLBRACK = 104, /* "[" */
2803 YYSYMBOL_tLBRACE = 105, /* "{" */
2804 YYSYMBOL_tLBRACE_ARG = 106, /* "{ arg" */
2805 YYSYMBOL_tSTAR = 107, /* "*" */
2806 YYSYMBOL_tDSTAR = 108, /* "**arg" */
2807 YYSYMBOL_tAMPER = 109, /* "&" */
2808 YYSYMBOL_tLAMBDA = 110, /* "->" */
2809 YYSYMBOL_tSYMBEG = 111, /* "symbol literal" */
2810 YYSYMBOL_tSTRING_BEG = 112, /* "string literal" */
2811 YYSYMBOL_tXSTRING_BEG = 113, /* "backtick literal" */
2812 YYSYMBOL_tREGEXP_BEG = 114, /* "regexp literal" */
2813 YYSYMBOL_tWORDS_BEG = 115, /* "word list" */
2814 YYSYMBOL_tQWORDS_BEG = 116, /* "verbatim word list" */
2815 YYSYMBOL_tSYMBOLS_BEG = 117, /* "symbol list" */
2816 YYSYMBOL_tQSYMBOLS_BEG = 118, /* "verbatim symbol list" */
2817 YYSYMBOL_tSTRING_END = 119, /* "terminator" */
2818 YYSYMBOL_tSTRING_DEND = 120, /* "'}'" */
2819 YYSYMBOL_tSTRING_DBEG = 121, /* "'#{'" */
2820 YYSYMBOL_tSTRING_DVAR = 122, /* tSTRING_DVAR */
2821 YYSYMBOL_tLAMBEG = 123, /* tLAMBEG */
2822 YYSYMBOL_tLABEL_END = 124, /* tLABEL_END */
2823 YYSYMBOL_tIGNORED_NL = 125, /* tIGNORED_NL */
2824 YYSYMBOL_tCOMMENT = 126, /* tCOMMENT */
2825 YYSYMBOL_tEMBDOC_BEG = 127, /* tEMBDOC_BEG */
2826 YYSYMBOL_tEMBDOC = 128, /* tEMBDOC */
2827 YYSYMBOL_tEMBDOC_END = 129, /* tEMBDOC_END */
2828 YYSYMBOL_tHEREDOC_BEG = 130, /* tHEREDOC_BEG */
2829 YYSYMBOL_tHEREDOC_END = 131, /* tHEREDOC_END */
2830 YYSYMBOL_k__END__ = 132, /* k__END__ */
2831 YYSYMBOL_tLOWEST = 133, /* tLOWEST */
2832 YYSYMBOL_134_ = 134, /* '=' */
2833 YYSYMBOL_135_ = 135, /* '?' */
2834 YYSYMBOL_136_ = 136, /* ':' */
2835 YYSYMBOL_137_ = 137, /* '>' */
2836 YYSYMBOL_138_ = 138, /* '<' */
2837 YYSYMBOL_139_ = 139, /* '|' */
2838 YYSYMBOL_140_ = 140, /* '^' */
2839 YYSYMBOL_141_ = 141, /* '&' */
2840 YYSYMBOL_142_ = 142, /* '+' */
2841 YYSYMBOL_143_ = 143, /* '-' */
2842 YYSYMBOL_144_ = 144, /* '*' */
2843 YYSYMBOL_145_ = 145, /* '/' */
2844 YYSYMBOL_146_ = 146, /* '%' */
2845 YYSYMBOL_tUMINUS_NUM = 147, /* tUMINUS_NUM */
2846 YYSYMBOL_148_ = 148, /* '!' */
2847 YYSYMBOL_149_ = 149, /* '~' */
2848 YYSYMBOL_tLAST_TOKEN = 150, /* tLAST_TOKEN */
2849 YYSYMBOL_151_ = 151, /* '{' */
2850 YYSYMBOL_152_ = 152, /* '}' */
2851 YYSYMBOL_153_ = 153, /* '[' */
2852 YYSYMBOL_154_n_ = 154, /* '\n' */
2853 YYSYMBOL_155_ = 155, /* ',' */
2854 YYSYMBOL_156_ = 156, /* '`' */
2855 YYSYMBOL_157_ = 157, /* '(' */
2856 YYSYMBOL_158_ = 158, /* ')' */
2857 YYSYMBOL_159_ = 159, /* ']' */
2858 YYSYMBOL_160_ = 160, /* ';' */
2859 YYSYMBOL_161_ = 161, /* ' ' */
2860 YYSYMBOL_YYACCEPT = 162, /* $accept */
2861 YYSYMBOL_option_terms = 163, /* option_terms */
2862 YYSYMBOL_compstmt_top_stmts = 164, /* compstmt_top_stmts */
2863 YYSYMBOL_165_1 = 165, /* $@1 */
2864 YYSYMBOL_program = 166, /* program */
2865 YYSYMBOL_top_stmts = 167, /* top_stmts */
2866 YYSYMBOL_top_stmt = 168, /* top_stmt */
2867 YYSYMBOL_block_open = 169, /* block_open */
2868 YYSYMBOL_begin_block = 170, /* begin_block */
2869 YYSYMBOL_compstmt_stmts = 171, /* compstmt_stmts */
2870 YYSYMBOL_172_2 = 172, /* $@2 */
2871 YYSYMBOL_173_3 = 173, /* $@3 */
2872 YYSYMBOL_bodystmt = 174, /* bodystmt */
2873 YYSYMBOL_175_4 = 175, /* $@4 */
2874 YYSYMBOL_stmts = 176, /* stmts */
2875 YYSYMBOL_stmt_or_begin = 177, /* stmt_or_begin */
2876 YYSYMBOL_178_5 = 178, /* $@5 */
2877 YYSYMBOL_allow_exits = 179, /* allow_exits */
2878 YYSYMBOL_k_END = 180, /* k_END */
2879 YYSYMBOL_181_6 = 181, /* $@6 */
2880 YYSYMBOL_stmt = 182, /* stmt */
2881 YYSYMBOL_asgn_mrhs = 183, /* asgn_mrhs */
2882 YYSYMBOL_asgn_command_rhs = 184, /* asgn_command_rhs */
2883 YYSYMBOL_command_asgn = 185, /* command_asgn */
2884 YYSYMBOL_op_asgn_command_rhs = 186, /* op_asgn_command_rhs */
2885 YYSYMBOL_def_endless_method_endless_command = 187, /* def_endless_method_endless_command */
2886 YYSYMBOL_endless_command = 188, /* endless_command */
2887 YYSYMBOL_option__n_ = 189, /* option_'\n' */
2888 YYSYMBOL_command_rhs = 190, /* command_rhs */
2889 YYSYMBOL_expr = 191, /* expr */
2890 YYSYMBOL_192_7 = 192, /* $@7 */
2891 YYSYMBOL_193_8 = 193, /* $@8 */
2892 YYSYMBOL_def_name = 194, /* def_name */
2893 YYSYMBOL_defn_head = 195, /* defn_head */
2894 YYSYMBOL_196_9 = 196, /* $@9 */
2895 YYSYMBOL_defs_head = 197, /* defs_head */
2896 YYSYMBOL_value_expr_expr = 198, /* value_expr_expr */
2897 YYSYMBOL_expr_value = 199, /* expr_value */
2898 YYSYMBOL_200_10 = 200, /* $@10 */
2899 YYSYMBOL_201_11 = 201, /* $@11 */
2900 YYSYMBOL_expr_value_do = 202, /* expr_value_do */
2901 YYSYMBOL_command_call = 203, /* command_call */
2902 YYSYMBOL_value_expr_command_call = 204, /* value_expr_command_call */
2903 YYSYMBOL_command_call_value = 205, /* command_call_value */
2904 YYSYMBOL_block_command = 206, /* block_command */
2905 YYSYMBOL_cmd_brace_block = 207, /* cmd_brace_block */
2906 YYSYMBOL_fcall = 208, /* fcall */
2907 YYSYMBOL_command = 209, /* command */
2908 YYSYMBOL_mlhs = 210, /* mlhs */
2909 YYSYMBOL_mlhs_inner = 211, /* mlhs_inner */
2910 YYSYMBOL_mlhs_basic = 212, /* mlhs_basic */
2911 YYSYMBOL_mlhs_items_mlhs_item = 213, /* mlhs_items_mlhs_item */
2912 YYSYMBOL_mlhs_item = 214, /* mlhs_item */
2913 YYSYMBOL_mlhs_head = 215, /* mlhs_head */
2914 YYSYMBOL_mlhs_node = 216, /* mlhs_node */
2915 YYSYMBOL_lhs = 217, /* lhs */
2916 YYSYMBOL_cname = 218, /* cname */
2917 YYSYMBOL_cpath = 219, /* cpath */
2918 YYSYMBOL_fname = 220, /* fname */
2919 YYSYMBOL_fitem = 221, /* fitem */
2920 YYSYMBOL_undef_list = 222, /* undef_list */
2921 YYSYMBOL_223_12 = 223, /* $@12 */
2922 YYSYMBOL_op = 224, /* op */
2923 YYSYMBOL_reswords = 225, /* reswords */
2924 YYSYMBOL_asgn_arg_rhs = 226, /* asgn_arg_rhs */
2925 YYSYMBOL_arg = 227, /* arg */
2926 YYSYMBOL_op_asgn_arg_rhs = 228, /* op_asgn_arg_rhs */
2927 YYSYMBOL_range_expr_arg = 229, /* range_expr_arg */
2928 YYSYMBOL_def_endless_method_endless_arg = 230, /* def_endless_method_endless_arg */
2929 YYSYMBOL_ternary = 231, /* ternary */
2930 YYSYMBOL_endless_arg = 232, /* endless_arg */
2931 YYSYMBOL_relop = 233, /* relop */
2932 YYSYMBOL_rel_expr = 234, /* rel_expr */
2933 YYSYMBOL_lex_ctxt = 235, /* lex_ctxt */
2934 YYSYMBOL_begin_defined = 236, /* begin_defined */
2935 YYSYMBOL_after_rescue = 237, /* after_rescue */
2936 YYSYMBOL_value_expr_arg = 238, /* value_expr_arg */
2937 YYSYMBOL_arg_value = 239, /* arg_value */
2938 YYSYMBOL_aref_args = 240, /* aref_args */
2939 YYSYMBOL_arg_rhs = 241, /* arg_rhs */
2940 YYSYMBOL_paren_args = 242, /* paren_args */
2941 YYSYMBOL_opt_paren_args = 243, /* opt_paren_args */
2942 YYSYMBOL_opt_call_args = 244, /* opt_call_args */
2943 YYSYMBOL_value_expr_command = 245, /* value_expr_command */
2944 YYSYMBOL_call_args = 246, /* call_args */
2945 YYSYMBOL_247_13 = 247, /* $@13 */
2946 YYSYMBOL_command_args = 248, /* command_args */
2947 YYSYMBOL_block_arg = 249, /* block_arg */
2948 YYSYMBOL_opt_block_arg = 250, /* opt_block_arg */
2949 YYSYMBOL_args = 251, /* args */
2950 YYSYMBOL_arg_splat = 252, /* arg_splat */
2951 YYSYMBOL_mrhs_arg = 253, /* mrhs_arg */
2952 YYSYMBOL_mrhs = 254, /* mrhs */
2953 YYSYMBOL_primary = 255, /* primary */
2954 YYSYMBOL_256_14 = 256, /* $@14 */
2955 YYSYMBOL_257_15 = 257, /* $@15 */
2956 YYSYMBOL_258_16 = 258, /* @16 */
2957 YYSYMBOL_259_17 = 259, /* @17 */
2958 YYSYMBOL_260_18 = 260, /* $@18 */
2959 YYSYMBOL_261_19 = 261, /* $@19 */
2960 YYSYMBOL_262_20 = 262, /* $@20 */
2961 YYSYMBOL_263_21 = 263, /* $@21 */
2962 YYSYMBOL_264_22 = 264, /* $@22 */
2963 YYSYMBOL_265_23 = 265, /* $@23 */
2964 YYSYMBOL_266_24 = 266, /* $@24 */
2965 YYSYMBOL_value_expr_primary = 267, /* value_expr_primary */
2966 YYSYMBOL_primary_value = 268, /* primary_value */
2967 YYSYMBOL_k_begin = 269, /* k_begin */
2968 YYSYMBOL_k_if = 270, /* k_if */
2969 YYSYMBOL_k_unless = 271, /* k_unless */
2970 YYSYMBOL_k_while = 272, /* k_while */
2971 YYSYMBOL_k_until = 273, /* k_until */
2972 YYSYMBOL_k_case = 274, /* k_case */
2973 YYSYMBOL_k_for = 275, /* k_for */
2974 YYSYMBOL_k_class = 276, /* k_class */
2975 YYSYMBOL_k_module = 277, /* k_module */
2976 YYSYMBOL_k_def = 278, /* k_def */
2977 YYSYMBOL_k_do = 279, /* k_do */
2978 YYSYMBOL_k_do_block = 280, /* k_do_block */
2979 YYSYMBOL_k_rescue = 281, /* k_rescue */
2980 YYSYMBOL_k_ensure = 282, /* k_ensure */
2981 YYSYMBOL_k_when = 283, /* k_when */
2982 YYSYMBOL_k_else = 284, /* k_else */
2983 YYSYMBOL_k_elsif = 285, /* k_elsif */
2984 YYSYMBOL_k_end = 286, /* k_end */
2985 YYSYMBOL_k_return = 287, /* k_return */
2986 YYSYMBOL_k_yield = 288, /* k_yield */
2987 YYSYMBOL_then = 289, /* then */
2988 YYSYMBOL_do = 290, /* do */
2989 YYSYMBOL_if_tail = 291, /* if_tail */
2990 YYSYMBOL_opt_else = 292, /* opt_else */
2991 YYSYMBOL_for_var = 293, /* for_var */
2992 YYSYMBOL_f_marg = 294, /* f_marg */
2993 YYSYMBOL_mlhs_items_f_marg = 295, /* mlhs_items_f_marg */
2994 YYSYMBOL_f_margs = 296, /* f_margs */
2995 YYSYMBOL_f_rest_marg = 297, /* f_rest_marg */
2996 YYSYMBOL_f_any_kwrest = 298, /* f_any_kwrest */
2997 YYSYMBOL_299_25 = 299, /* $@25 */
2998 YYSYMBOL_f_eq = 300, /* f_eq */
2999 YYSYMBOL_f_kw_primary_value = 301, /* f_kw_primary_value */
3000 YYSYMBOL_f_kwarg_primary_value = 302, /* f_kwarg_primary_value */
3001 YYSYMBOL_args_tail_basic_primary_value = 303, /* args_tail_basic_primary_value */
3002 YYSYMBOL_block_args_tail = 304, /* block_args_tail */
3003 YYSYMBOL_excessed_comma = 305, /* excessed_comma */
3004 YYSYMBOL_f_opt_primary_value = 306, /* f_opt_primary_value */
3005 YYSYMBOL_f_opt_arg_primary_value = 307, /* f_opt_arg_primary_value */
3006 YYSYMBOL_opt_args_tail_block_args_tail = 308, /* opt_args_tail_block_args_tail */
3007 YYSYMBOL_block_param = 309, /* block_param */
3008 YYSYMBOL_opt_block_param_def = 310, /* opt_block_param_def */
3009 YYSYMBOL_block_param_def = 311, /* block_param_def */
3010 YYSYMBOL_opt_block_param = 312, /* opt_block_param */
3011 YYSYMBOL_opt_bv_decl = 313, /* opt_bv_decl */
3012 YYSYMBOL_bv_decls = 314, /* bv_decls */
3013 YYSYMBOL_bvar = 315, /* bvar */
3014 YYSYMBOL_max_numparam = 316, /* max_numparam */
3015 YYSYMBOL_numparam = 317, /* numparam */
3016 YYSYMBOL_it_id = 318, /* it_id */
3017 YYSYMBOL_319_26 = 319, /* @26 */
3018 YYSYMBOL_320_27 = 320, /* $@27 */
3019 YYSYMBOL_lambda = 321, /* lambda */
3020 YYSYMBOL_f_larglist = 322, /* f_larglist */
3021 YYSYMBOL_lambda_body = 323, /* lambda_body */
3022 YYSYMBOL_324_28 = 324, /* $@28 */
3023 YYSYMBOL_do_block = 325, /* do_block */
3024 YYSYMBOL_block_call = 326, /* block_call */
3025 YYSYMBOL_method_call = 327, /* method_call */
3026 YYSYMBOL_brace_block = 328, /* brace_block */
3027 YYSYMBOL_329_29 = 329, /* @29 */
3028 YYSYMBOL_brace_body = 330, /* brace_body */
3029 YYSYMBOL_331_30 = 331, /* @30 */
3030 YYSYMBOL_do_body = 332, /* do_body */
3031 YYSYMBOL_case_args = 333, /* case_args */
3032 YYSYMBOL_case_body = 334, /* case_body */
3033 YYSYMBOL_cases = 335, /* cases */
3034 YYSYMBOL_p_pvtbl = 336, /* p_pvtbl */
3035 YYSYMBOL_p_pktbl = 337, /* p_pktbl */
3036 YYSYMBOL_p_in_kwarg = 338, /* p_in_kwarg */
3037 YYSYMBOL_339_31 = 339, /* $@31 */
3038 YYSYMBOL_p_case_body = 340, /* p_case_body */
3039 YYSYMBOL_p_cases = 341, /* p_cases */
3040 YYSYMBOL_p_top_expr = 342, /* p_top_expr */
3041 YYSYMBOL_p_top_expr_body = 343, /* p_top_expr_body */
3042 YYSYMBOL_p_expr = 344, /* p_expr */
3043 YYSYMBOL_p_as = 345, /* p_as */
3044 YYSYMBOL_346_32 = 346, /* $@32 */
3045 YYSYMBOL_p_alt = 347, /* p_alt */
3046 YYSYMBOL_p_lparen = 348, /* p_lparen */
3047 YYSYMBOL_p_lbracket = 349, /* p_lbracket */
3048 YYSYMBOL_p_expr_basic = 350, /* p_expr_basic */
3049 YYSYMBOL_351_33 = 351, /* $@33 */
3050 YYSYMBOL_p_args = 352, /* p_args */
3051 YYSYMBOL_p_args_head = 353, /* p_args_head */
3052 YYSYMBOL_p_args_tail = 354, /* p_args_tail */
3053 YYSYMBOL_p_find = 355, /* p_find */
3054 YYSYMBOL_p_rest = 356, /* p_rest */
3055 YYSYMBOL_p_args_post = 357, /* p_args_post */
3056 YYSYMBOL_p_arg = 358, /* p_arg */
3057 YYSYMBOL_p_kwargs = 359, /* p_kwargs */
3058 YYSYMBOL_p_kwarg = 360, /* p_kwarg */
3059 YYSYMBOL_p_kw = 361, /* p_kw */
3060 YYSYMBOL_p_kw_label = 362, /* p_kw_label */
3061 YYSYMBOL_p_kwrest = 363, /* p_kwrest */
3062 YYSYMBOL_p_kwnorest = 364, /* p_kwnorest */
3063 YYSYMBOL_p_any_kwrest = 365, /* p_any_kwrest */
3064 YYSYMBOL_p_value = 366, /* p_value */
3065 YYSYMBOL_range_expr_p_primitive = 367, /* range_expr_p_primitive */
3066 YYSYMBOL_p_primitive = 368, /* p_primitive */
3067 YYSYMBOL_p_variable = 369, /* p_variable */
3068 YYSYMBOL_p_var_ref = 370, /* p_var_ref */
3069 YYSYMBOL_p_expr_ref = 371, /* p_expr_ref */
3070 YYSYMBOL_p_const = 372, /* p_const */
3071 YYSYMBOL_opt_rescue = 373, /* opt_rescue */
3072 YYSYMBOL_exc_list = 374, /* exc_list */
3073 YYSYMBOL_exc_var = 375, /* exc_var */
3074 YYSYMBOL_opt_ensure = 376, /* opt_ensure */
3075 YYSYMBOL_literal = 377, /* literal */
3076 YYSYMBOL_strings = 378, /* strings */
3077 YYSYMBOL_string = 379, /* string */
3078 YYSYMBOL_string1 = 380, /* string1 */
3079 YYSYMBOL_xstring = 381, /* xstring */
3080 YYSYMBOL_regexp = 382, /* regexp */
3081 YYSYMBOL_nonempty_list__ = 383, /* nonempty_list_' ' */
3082 YYSYMBOL_words_tWORDS_BEG_word_list = 384, /* words_tWORDS_BEG_word_list */
3083 YYSYMBOL_words = 385, /* words */
3084 YYSYMBOL_word_list = 386, /* word_list */
3085 YYSYMBOL_word = 387, /* word */
3086 YYSYMBOL_words_tSYMBOLS_BEG_symbol_list = 388, /* words_tSYMBOLS_BEG_symbol_list */
3087 YYSYMBOL_symbols = 389, /* symbols */
3088 YYSYMBOL_symbol_list = 390, /* symbol_list */
3089 YYSYMBOL_words_tQWORDS_BEG_qword_list = 391, /* words_tQWORDS_BEG_qword_list */
3090 YYSYMBOL_qwords = 392, /* qwords */
3091 YYSYMBOL_words_tQSYMBOLS_BEG_qsym_list = 393, /* words_tQSYMBOLS_BEG_qsym_list */
3092 YYSYMBOL_qsymbols = 394, /* qsymbols */
3093 YYSYMBOL_qword_list = 395, /* qword_list */
3094 YYSYMBOL_qsym_list = 396, /* qsym_list */
3095 YYSYMBOL_string_contents = 397, /* string_contents */
3096 YYSYMBOL_xstring_contents = 398, /* xstring_contents */
3097 YYSYMBOL_regexp_contents = 399, /* regexp_contents */
3098 YYSYMBOL_string_content = 400, /* string_content */
3099 YYSYMBOL_401_34 = 401, /* @34 */
3100 YYSYMBOL_402_35 = 402, /* @35 */
3101 YYSYMBOL_403_36 = 403, /* @36 */
3102 YYSYMBOL_404_37 = 404, /* @37 */
3103 YYSYMBOL_string_dend = 405, /* string_dend */
3104 YYSYMBOL_string_dvar = 406, /* string_dvar */
3105 YYSYMBOL_symbol = 407, /* symbol */
3106 YYSYMBOL_ssym = 408, /* ssym */
3107 YYSYMBOL_sym = 409, /* sym */
3108 YYSYMBOL_dsym = 410, /* dsym */
3109 YYSYMBOL_numeric = 411, /* numeric */
3110 YYSYMBOL_simple_numeric = 412, /* simple_numeric */
3111 YYSYMBOL_nonlocal_var = 413, /* nonlocal_var */
3112 YYSYMBOL_user_variable = 414, /* user_variable */
3113 YYSYMBOL_keyword_variable = 415, /* keyword_variable */
3114 YYSYMBOL_var_ref = 416, /* var_ref */
3115 YYSYMBOL_var_lhs = 417, /* var_lhs */
3116 YYSYMBOL_backref = 418, /* backref */
3117 YYSYMBOL_419_38 = 419, /* $@38 */
3118 YYSYMBOL_superclass = 420, /* superclass */
3119 YYSYMBOL_f_opt_paren_args = 421, /* f_opt_paren_args */
3120 YYSYMBOL_f_paren_args = 422, /* f_paren_args */
3121 YYSYMBOL_f_arglist = 423, /* f_arglist */
3122 YYSYMBOL_424_39 = 424, /* @39 */
3123 YYSYMBOL_f_kw_arg_value = 425, /* f_kw_arg_value */
3124 YYSYMBOL_f_kwarg_arg_value = 426, /* f_kwarg_arg_value */
3125 YYSYMBOL_args_tail_basic_arg_value = 427, /* args_tail_basic_arg_value */
3126 YYSYMBOL_args_tail = 428, /* args_tail */
3127 YYSYMBOL_f_opt_arg_value = 429, /* f_opt_arg_value */
3128 YYSYMBOL_f_opt_arg_arg_value = 430, /* f_opt_arg_arg_value */
3129 YYSYMBOL_opt_args_tail_args_tail = 431, /* opt_args_tail_args_tail */
3130 YYSYMBOL_f_args = 432, /* f_args */
3131 YYSYMBOL_args_forward = 433, /* args_forward */
3132 YYSYMBOL_f_bad_arg = 434, /* f_bad_arg */
3133 YYSYMBOL_f_norm_arg = 435, /* f_norm_arg */
3134 YYSYMBOL_f_arg_asgn = 436, /* f_arg_asgn */
3135 YYSYMBOL_f_arg_item = 437, /* f_arg_item */
3136 YYSYMBOL_f_arg = 438, /* f_arg */
3137 YYSYMBOL_f_label = 439, /* f_label */
3138 YYSYMBOL_kwrest_mark = 440, /* kwrest_mark */
3139 YYSYMBOL_f_no_kwarg = 441, /* f_no_kwarg */
3140 YYSYMBOL_f_kwrest = 442, /* f_kwrest */
3141 YYSYMBOL_restarg_mark = 443, /* restarg_mark */
3142 YYSYMBOL_f_rest_arg = 444, /* f_rest_arg */
3143 YYSYMBOL_blkarg_mark = 445, /* blkarg_mark */
3144 YYSYMBOL_f_block_arg = 446, /* f_block_arg */
3145 YYSYMBOL_opt_f_block_arg = 447, /* opt_f_block_arg */
3146 YYSYMBOL_value_expr_singleton_expr = 448, /* value_expr_singleton_expr */
3147 YYSYMBOL_singleton = 449, /* singleton */
3148 YYSYMBOL_singleton_expr = 450, /* singleton_expr */
3149 YYSYMBOL_451_40 = 451, /* $@40 */
3150 YYSYMBOL_assoc_list = 452, /* assoc_list */
3151 YYSYMBOL_assocs = 453, /* assocs */
3152 YYSYMBOL_assoc = 454, /* assoc */
3153 YYSYMBOL_operation2 = 455, /* operation2 */
3154 YYSYMBOL_operation3 = 456, /* operation3 */
3155 YYSYMBOL_dot_or_colon = 457, /* dot_or_colon */
3156 YYSYMBOL_call_op = 458, /* call_op */
3157 YYSYMBOL_call_op2 = 459, /* call_op2 */
3158 YYSYMBOL_rparen = 460, /* rparen */
3159 YYSYMBOL_rbracket = 461, /* rbracket */
3160 YYSYMBOL_rbrace = 462, /* rbrace */
3161 YYSYMBOL_trailer = 463, /* trailer */
3162 YYSYMBOL_term = 464, /* term */
3163 YYSYMBOL_terms = 465, /* terms */
3164 YYSYMBOL_none = 466 /* none */
3165};
3166typedef enum yysymbol_kind_t yysymbol_kind_t;
3167
3168
3169
3170
3171#ifdef short
3172# undef short
3173#endif
3174
3175/* On compilers that do not define __PTRDIFF_MAX__ etc., make sure
3176 <limits.h> and (if available) <stdint.h> are included
3177 so that the code can choose integer types of a good width. */
3178
3179#ifndef __PTRDIFF_MAX__
3180# include <limits.h> /* INFRINGES ON USER NAME SPACE */
3181# if defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__
3182# include <stdint.h> /* INFRINGES ON USER NAME SPACE */
3183# define YY_STDINT_H
3184# endif
3185#endif
3186
3187/* Narrow types that promote to a signed type and that can represent a
3188 signed or unsigned integer of at least N bits. In tables they can
3189 save space and decrease cache pressure. Promoting to a signed type
3190 helps avoid bugs in integer arithmetic. */
3191
3192#ifdef __INT_LEAST8_MAX__
3193typedef __INT_LEAST8_TYPE__ yytype_int8;
3194#elif defined YY_STDINT_H
3195typedef int_least8_t yytype_int8;
3196#else
3197typedef signed char yytype_int8;
3198#endif
3199
3200#ifdef __INT_LEAST16_MAX__
3201typedef __INT_LEAST16_TYPE__ yytype_int16;
3202#elif defined YY_STDINT_H
3203typedef int_least16_t yytype_int16;
3204#else
3205typedef short yytype_int16;
3206#endif
3207
3208/* Work around bug in HP-UX 11.23, which defines these macros
3209 incorrectly for preprocessor constants. This workaround can likely
3210 be removed in 2023, as HPE has promised support for HP-UX 11.23
3211 (aka HP-UX 11i v2) only through the end of 2022; see Table 2 of
3212 <https://h20195.www2.hpe.com/V2/getpdf.aspx/4AA4-7673ENW.pdf>. */
3213#ifdef __hpux
3214# undef UINT_LEAST8_MAX
3215# undef UINT_LEAST16_MAX
3216# define UINT_LEAST8_MAX 255
3217# define UINT_LEAST16_MAX 65535
3218#endif
3219
3220#if defined __UINT_LEAST8_MAX__ && __UINT_LEAST8_MAX__ <= __INT_MAX__
3221typedef __UINT_LEAST8_TYPE__ yytype_uint8;
3222#elif (!defined __UINT_LEAST8_MAX__ && defined YY_STDINT_H \
3223 && UINT_LEAST8_MAX <= INT_MAX)
3224typedef uint_least8_t yytype_uint8;
3225#elif !defined __UINT_LEAST8_MAX__ && UCHAR_MAX <= INT_MAX
3226typedef unsigned char yytype_uint8;
3227#else
3228typedef short yytype_uint8;
3229#endif
3230
3231#if defined __UINT_LEAST16_MAX__ && __UINT_LEAST16_MAX__ <= __INT_MAX__
3232typedef __UINT_LEAST16_TYPE__ yytype_uint16;
3233#elif (!defined __UINT_LEAST16_MAX__ && defined YY_STDINT_H \
3234 && UINT_LEAST16_MAX <= INT_MAX)
3235typedef uint_least16_t yytype_uint16;
3236#elif !defined __UINT_LEAST16_MAX__ && USHRT_MAX <= INT_MAX
3237typedef unsigned short yytype_uint16;
3238#else
3239typedef int yytype_uint16;
3240#endif
3241
3242#ifndef YYPTRDIFF_T
3243# if defined __PTRDIFF_TYPE__ && defined __PTRDIFF_MAX__
3244# define YYPTRDIFF_T __PTRDIFF_TYPE__
3245# define YYPTRDIFF_MAXIMUM __PTRDIFF_MAX__
3246# elif defined PTRDIFF_MAX
3247# ifndef ptrdiff_t
3248# include <stddef.h> /* INFRINGES ON USER NAME SPACE */
3249# endif
3250# define YYPTRDIFF_T ptrdiff_t
3251# define YYPTRDIFF_MAXIMUM PTRDIFF_MAX
3252# else
3253# define YYPTRDIFF_T long
3254# define YYPTRDIFF_MAXIMUM LONG_MAX
3255# endif
3256#endif
3257
3258#ifndef YYSIZE_T
3259# ifdef __SIZE_TYPE__
3260# define YYSIZE_T __SIZE_TYPE__
3261# elif defined size_t
3262# define YYSIZE_T size_t
3263# elif defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__
3264# include <stddef.h> /* INFRINGES ON USER NAME SPACE */
3265# define YYSIZE_T size_t
3266# else
3267# define YYSIZE_T unsigned
3268# endif
3269#endif
3270
3271#define YYSIZE_MAXIMUM \
3272 YY_CAST (YYPTRDIFF_T, \
3273 (YYPTRDIFF_MAXIMUM < YY_CAST (YYSIZE_T, -1) \
3274 ? YYPTRDIFF_MAXIMUM \
3275 : YY_CAST (YYSIZE_T, -1)))
3276
3277#define YYSIZEOF(X) YY_CAST (YYPTRDIFF_T, sizeof (X))
3278
3279
3280/* Stored state numbers (used for stacks). */
3281typedef yytype_int16 yy_state_t;
3282
3283/* State numbers in computations. */
3284typedef int yy_state_fast_t;
3285
3286#ifndef YY_
3287# if defined YYENABLE_NLS && YYENABLE_NLS
3288# if ENABLE_NLS
3289# include <libintl.h> /* INFRINGES ON USER NAME SPACE */
3290# define YY_(Msgid) dgettext ("bison-runtime", Msgid)
3291# endif
3292# endif
3293# ifndef YY_
3294# define YY_(Msgid) Msgid
3295# endif
3296#endif
3297
3298
3299#ifndef YY_ATTRIBUTE_PURE
3300# if defined __GNUC__ && 2 < __GNUC__ + (96 <= __GNUC_MINOR__)
3301# define YY_ATTRIBUTE_PURE __attribute__ ((__pure__))
3302# else
3303# define YY_ATTRIBUTE_PURE
3304# endif
3305#endif
3306
3307#ifndef YY_ATTRIBUTE_UNUSED
3308# if defined __GNUC__ && 2 < __GNUC__ + (7 <= __GNUC_MINOR__)
3309# define YY_ATTRIBUTE_UNUSED __attribute__ ((__unused__))
3310# else
3311# define YY_ATTRIBUTE_UNUSED
3312# endif
3313#endif
3314
3315/* Suppress unused-variable warnings by "using" E. */
3316#if ! defined lint || defined __GNUC__
3317# define YY_USE(E) ((void) (E))
3318#else
3319# define YY_USE(E) /* empty */
3320#endif
3321
3322/* Suppress an incorrect diagnostic about yylval being uninitialized. */
3323#if defined __GNUC__ && ! defined __ICC && 406 <= __GNUC__ * 100 + __GNUC_MINOR__
3324# if __GNUC__ * 100 + __GNUC_MINOR__ < 407
3325# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \
3326 _Pragma ("GCC diagnostic push") \
3327 _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")
3328# else
3329# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \
3330 _Pragma ("GCC diagnostic push") \
3331 _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"") \
3332 _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
3333# endif
3334# define YY_IGNORE_MAYBE_UNINITIALIZED_END \
3335 _Pragma ("GCC diagnostic pop")
3336#else
3337# define YY_INITIAL_VALUE(Value) Value
3338#endif
3339#ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
3340# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
3341# define YY_IGNORE_MAYBE_UNINITIALIZED_END
3342#endif
3343#ifndef YY_INITIAL_VALUE
3344# define YY_INITIAL_VALUE(Value) /* Nothing. */
3345#endif
3346
3347#if defined __cplusplus && defined __GNUC__ && ! defined __ICC && 6 <= __GNUC__
3348# define YY_IGNORE_USELESS_CAST_BEGIN \
3349 _Pragma ("GCC diagnostic push") \
3350 _Pragma ("GCC diagnostic ignored \"-Wuseless-cast\"")
3351# define YY_IGNORE_USELESS_CAST_END \
3352 _Pragma ("GCC diagnostic pop")
3353#endif
3354#ifndef YY_IGNORE_USELESS_CAST_BEGIN
3355# define YY_IGNORE_USELESS_CAST_BEGIN
3356# define YY_IGNORE_USELESS_CAST_END
3357#endif
3358
3359
3360#define YY_ASSERT(E) ((void) (0 && (E)))
3361
3362#if 1
3363
3364/* The parser invokes alloca or malloc; define the necessary symbols. */
3365
3366# ifdef YYSTACK_USE_ALLOCA
3367# if YYSTACK_USE_ALLOCA
3368# ifdef __GNUC__
3369# define YYSTACK_ALLOC __builtin_alloca
3370# elif defined __BUILTIN_VA_ARG_INCR
3371# include <alloca.h> /* INFRINGES ON USER NAME SPACE */
3372# elif defined _AIX
3373# define YYSTACK_ALLOC __alloca
3374# elif defined _MSC_VER
3375# include <malloc.h> /* INFRINGES ON USER NAME SPACE */
3376# define alloca _alloca
3377# else
3378# define YYSTACK_ALLOC alloca
3379# if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS
3380# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
3381 /* Use EXIT_SUCCESS as a witness for stdlib.h. */
3382# ifndef EXIT_SUCCESS
3383# define EXIT_SUCCESS 0
3384# endif
3385# endif
3386# endif
3387# endif
3388# endif
3389
3390# ifdef YYSTACK_ALLOC
3391 /* Pacify GCC's 'empty if-body' warning. */
3392# define YYSTACK_FREE(Ptr) do { /* empty */; } while (0)
3393# ifndef YYSTACK_ALLOC_MAXIMUM
3394 /* The OS might guarantee only one guard page at the bottom of the stack,
3395 and a page size can be as small as 4096 bytes. So we cannot safely
3396 invoke alloca (N) if N exceeds 4096. Use a slightly smaller number
3397 to allow for a few compiler-allocated temporary stack slots. */
3398# define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
3399# endif
3400# else
3401# define YYSTACK_ALLOC YYMALLOC
3402# define YYSTACK_FREE YYFREE
3403# ifndef YYSTACK_ALLOC_MAXIMUM
3404# define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
3405# endif
3406# if (defined __cplusplus && ! defined EXIT_SUCCESS \
3407 && ! ((defined YYMALLOC || defined malloc) \
3408 && (defined YYFREE || defined free)))
3409# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
3410# ifndef EXIT_SUCCESS
3411# define EXIT_SUCCESS 0
3412# endif
3413# endif
3414# ifndef YYMALLOC
3415# define YYMALLOC malloc
3416# if ! defined malloc && ! defined EXIT_SUCCESS
3417void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
3418# endif
3419# endif
3420# ifndef YYFREE
3421# define YYFREE free
3422# if ! defined free && ! defined EXIT_SUCCESS
3423void free (void *); /* INFRINGES ON USER NAME SPACE */
3424# endif
3425# endif
3426# endif
3427#endif /* 1 */
3428
3429#if (! defined yyoverflow \
3430 && (! defined __cplusplus \
3431 || (defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL \
3432 && defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
3433
3434/* A type that is properly aligned for any stack member. */
3435union yyalloc
3436{
3437 yy_state_t yyss_alloc;
3438 YYSTYPE yyvs_alloc;
3439 YYLTYPE yyls_alloc;
3440};
3441
3442/* The size of the maximum gap between one aligned stack and the next. */
3443# define YYSTACK_GAP_MAXIMUM (YYSIZEOF (union yyalloc) - 1)
3444
3445/* The size of an array large to enough to hold all stacks, each with
3446 N elements. */
3447# define YYSTACK_BYTES(N) \
3448 ((N) * (YYSIZEOF (yy_state_t) + YYSIZEOF (YYSTYPE) \
3449 + YYSIZEOF (YYLTYPE)) \
3450 + 2 * YYSTACK_GAP_MAXIMUM)
3451
3452# define YYCOPY_NEEDED 1
3453
3454/* Relocate STACK from its old location to the new one. The
3455 local variables YYSIZE and YYSTACKSIZE give the old and new number of
3456 elements in the stack, and YYPTR gives the new location of the
3457 stack. Advance YYPTR to a properly aligned location for the next
3458 stack. */
3459# define YYSTACK_RELOCATE(Stack_alloc, Stack) \
3460 do \
3461 { \
3462 YYPTRDIFF_T yynewbytes; \
3463 YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
3464 Stack = &yyptr->Stack_alloc; \
3465 yynewbytes = yystacksize * YYSIZEOF (*Stack) + YYSTACK_GAP_MAXIMUM; \
3466 yyptr += yynewbytes / YYSIZEOF (*yyptr); \
3467 } \
3468 while (0)
3469
3470#endif
3471
3472#if defined YYCOPY_NEEDED && YYCOPY_NEEDED
3473/* Copy COUNT objects from SRC to DST. The source and destination do
3474 not overlap. */
3475# ifndef YYCOPY
3476# if defined __GNUC__ && 1 < __GNUC__
3477# define YYCOPY(Dst, Src, Count) \
3478 __builtin_memcpy (Dst, Src, YY_CAST (YYSIZE_T, (Count)) * sizeof (*(Src)))
3479# else
3480# define YYCOPY(Dst, Src, Count) \
3481 do \
3482 { \
3483 YYPTRDIFF_T yyi; \
3484 for (yyi = 0; yyi < (Count); yyi++) \
3485 (Dst)[yyi] = (Src)[yyi]; \
3486 } \
3487 while (0)
3488# endif
3489# endif
3490#endif /* !YYCOPY_NEEDED */
3491
3492/* YYFINAL -- State number of the termination state. */
3493#define YYFINAL 143
3494/* YYLAST -- Last index in YYTABLE. */
3495#define YYLAST 16092
3496
3497/* YYNTOKENS -- Number of terminals. */
3498#define YYNTOKENS 162
3499/* YYNNTS -- Number of nonterminals. */
3500#define YYNNTS 305
3501/* YYNRULES -- Number of rules. */
3502#define YYNRULES 815
3503/* YYNSTATES -- Number of states. */
3504#define YYNSTATES 1378
3505
3506/* YYMAXUTOK -- Last valid token kind. */
3507#define YYMAXUTOK 361
3508
3509
3510/* YYTRANSLATE(TOKEN-NUM) -- Symbol number corresponding to TOKEN-NUM
3511 as returned by yylex, with out-of-bounds checking. */
3512#define YYTRANSLATE(YYX) \
3513 (0 <= (YYX) && (YYX) <= YYMAXUTOK \
3514 ? YY_CAST (yysymbol_kind_t, yytranslate[YYX]) \
3515 : YYSYMBOL_YYUNDEF)
3516
3517/* YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM
3518 as returned by yylex. */
3519static const yytype_uint8 yytranslate[] =
3520{
3521 0, 2, 2, 2, 2, 2, 2, 2, 2, 72,
3522 154, 75, 73, 74, 2, 2, 2, 2, 2, 2,
3523 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
3524 2, 2, 161, 148, 2, 2, 2, 146, 141, 2,
3525 157, 158, 144, 142, 155, 143, 69, 145, 2, 2,
3526 2, 2, 2, 2, 2, 2, 2, 2, 136, 160,
3527 138, 134, 137, 135, 2, 2, 2, 2, 2, 2,
3528 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
3529 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
3530 2, 153, 70, 159, 140, 2, 156, 2, 2, 2,
3531 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
3532 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
3533 2, 2, 2, 151, 139, 152, 149, 2, 89, 90,
3534 91, 92, 76, 77, 78, 79, 95, 96, 84, 83,
3535 80, 81, 82, 87, 88, 93, 94, 98, 85, 86,
3536 97, 2, 2, 2, 2, 2, 2, 2, 2, 2,
3537 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
3538 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
3539 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
3540 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
3541 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
3542 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
3543 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
3544 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
3545 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
3546 2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
3547 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
3548 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
3549 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
3550 35, 36, 37, 38, 39, 40, 41, 42, 43, 44,
3551 45, 46, 47, 48, 49, 50, 51, 52, 53, 54,
3552 55, 56, 57, 58, 59, 60, 61, 62, 63, 64,
3553 65, 66, 67, 68, 71, 99, 100, 101, 102, 103,
3554 104, 105, 106, 107, 108, 109, 110, 111, 112, 113,
3555 114, 115, 116, 117, 118, 119, 120, 121, 122, 123,
3556 124, 125, 126, 127, 128, 129, 130, 131, 132, 133,
3557 147, 150
3558};
3559
3560#if YYDEBUG
3561/* YYRLINE[YYN] -- Source line where rule number YYN was defined. */
3562static const yytype_int16 yyrline[] =
3563{
3564 0, 3165, 3159, 3165, 3165, 3165, 3165, 3185, 3190, 3195,
3565 3202, 3207, 3214, 3216, 3234, 3230, 3235, 3234, 3246, 3243,
3566 3256, 3261, 3266, 3273, 3275, 3274, 3284, 3286, 3293, 3293,
3567 3298, 3303, 3311, 3320, 3327, 3333, 3339, 3350, 3361, 3370,
3568 3384, 3385, 3390, 3390, 3391, 3402, 3407, 3408, 3415, 3415,
3569 3416, 3416, 3416, 3416, 3416, 3416, 3416, 3416, 3416, 3417,
3570 3417, 3417, 3420, 3421, 3427, 3427, 3427, 3434, 3435, 3442,
3571 3445, 3446, 3451, 3456, 3461, 3467, 3466, 3482, 3481, 3496,
3572 3499, 3510, 3520, 3519, 3533, 3533, 3534, 3540, 3540, 3540,
3573 3547, 3548, 3551, 3551, 3554, 3555, 3562, 3570, 3570, 3570,
3574 3577, 3584, 3593, 3598, 3603, 3608, 3613, 3619, 3625, 3631,
3575 3636, 3643, 3652, 3653, 3660, 3661, 3668, 3673, 3678, 3683,
3576 3683, 3683, 3688, 3693, 3698, 3703, 3708, 3713, 3720, 3721,
3577 3728, 3733, 3741, 3741, 3746, 3751, 3751, 3757, 3762, 3767,
3578 3772, 3780, 3780, 3785, 3790, 3790, 3795, 3800, 3805, 3810,
3579 3818, 3826, 3829, 3834, 3839, 3846, 3846, 3846, 3847, 3852,
3580 3855, 3860, 3863, 3868, 3868, 3876, 3877, 3878, 3879, 3880,
3581 3881, 3882, 3883, 3884, 3885, 3886, 3887, 3888, 3889, 3890,
3582 3891, 3892, 3893, 3894, 3895, 3896, 3897, 3898, 3899, 3900,
3583 3901, 3902, 3903, 3904, 3905, 3908, 3908, 3908, 3909, 3909,
3584 3910, 3910, 3910, 3911, 3911, 3911, 3911, 3912, 3912, 3912,
3585 3912, 3913, 3913, 3913, 3914, 3914, 3914, 3914, 3915, 3915,
3586 3915, 3915, 3916, 3916, 3916, 3916, 3917, 3917, 3917, 3917,
3587 3918, 3918, 3918, 3918, 3919, 3919, 3922, 3922, 3923, 3923,
3588 3923, 3923, 3923, 3923, 3923, 3923, 3923, 3924, 3924, 3924,
3589 3924, 3924, 3924, 3924, 3925, 3930, 3935, 3940, 3945, 3950,
3590 3955, 3960, 3965, 3970, 3975, 3980, 3985, 3990, 3991, 3996,
3591 4001, 4006, 4011, 4016, 4021, 4026, 4031, 4036, 4041, 4046,
3592 4053, 4053, 4053, 4054, 4055, 4058, 4067, 4068, 4074, 4081,
3593 4082, 4083, 4084, 4087, 4092, 4100, 4106, 4113, 4120, 4120,
3594 4123, 4124, 4125, 4130, 4137, 4142, 4151, 4156, 4166, 4178,
3595 4179, 4185, 4186, 4187, 4188, 4193, 4200, 4200, 4205, 4210,
3596 4215, 4221, 4227, 4231, 4231, 4269, 4274, 4282, 4287, 4295,
3597 4300, 4305, 4310, 4318, 4323, 4332, 4333, 4337, 4342, 4347,
3598 4365, 4365, 4365, 4365, 4365, 4365, 4365, 4365, 4366, 4367,
3599 4368, 4374, 4373, 4386, 4386, 4392, 4398, 4403, 4408, 4413,
3600 4419, 4424, 4429, 4434, 4439, 4446, 4451, 4456, 4461, 4462,
3601 4468, 4470, 4482, 4491, 4500, 4509, 4508, 4523, 4522, 4535,
3602 4543, 4543, 4544, 4588, 4587, 4610, 4609, 4629, 4628, 4647,
3603 4645, 4662, 4660, 4675, 4680, 4685, 4690, 4705, 4705, 4708,
3604 4715, 4733, 4740, 4748, 4756, 4763, 4771, 4780, 4789, 4797,
3605 4804, 4811, 4819, 4826, 4832, 4847, 4854, 4859, 4865, 4872,
3606 4879, 4880, 4881, 4884, 4885, 4888, 4890, 4899, 4900, 4907,
3607 4908, 4911, 4916, 4924, 4924, 4924, 4929, 4934, 4939, 4944,
3608 4951, 4957, 4964, 4965, 4972, 4972, 4974, 4974, 4974, 4974,
3609 4974, 4974, 4974, 4974, 4974, 4977, 4985, 4985, 4985, 4985,
3610 4985, 4985, 4990, 4995, 5000, 5005, 5010, 5016, 5021, 5026,
3611 5031, 5036, 5041, 5046, 5051, 5056, 5063, 5064, 5070, 5080,
3612 5084, 5087, 5092, 5099, 5101, 5105, 5110, 5113, 5119, 5124,
3613 5131, 5137, 5130, 5164, 5171, 5180, 5187, 5186, 5197, 5205,
3614 5217, 5227, 5233, 5238, 5246, 5253, 5264, 5270, 5275, 5281,
3615 5291, 5296, 5304, 5310, 5318, 5320, 5335, 5335, 5356, 5362,
3616 5367, 5373, 5381, 5390, 5391, 5394, 5395, 5397, 5410, 5417,
3617 5425, 5426, 5429, 5430, 5436, 5444, 5445, 5451, 5457, 5462,
3618 5467, 5474, 5477, 5484, 5488, 5487, 5500, 5503, 5510, 5517,
3619 5518, 5519, 5526, 5533, 5540, 5546, 5553, 5560, 5567, 5573,
3620 5578, 5583, 5590, 5589, 5600, 5606, 5614, 5620, 5625, 5630,
3621 5635, 5640, 5643, 5644, 5651, 5656, 5663, 5671, 5677, 5684,
3622 5685, 5692, 5699, 5704, 5709, 5714, 5721, 5723, 5730, 5736,
3623 5748, 5749, 5764, 5769, 5776, 5782, 5783, 5790, 5791, 5791,
3624 5791, 5791, 5791, 5791, 5791, 5792, 5793, 5794, 5797, 5797,
3625 5797, 5797, 5797, 5797, 5797, 5797, 5798, 5803, 5806, 5814,
3626 5826, 5833, 5840, 5845, 5850, 5858, 5878, 5881, 5886, 5890,
3627 5893, 5898, 5901, 5908, 5911, 5912, 5915, 5927, 5928, 5929,
3628 5936, 5949, 5961, 5968, 5968, 5968, 5968, 5972, 5976, 5983,
3629 5985, 5992, 5992, 5996, 6000, 6007, 6007, 6010, 6010, 6014,
3630 6018, 6026, 6030, 6038, 6042, 6050, 6054, 6062, 6066, 6092,
3631 6095, 6094, 6109, 6117, 6121, 6125, 6140, 6141, 6144, 6149,
3632 6152, 6153, 6156, 6172, 6173, 6176, 6184, 6185, 6193, 6194,
3633 6195, 6196, 6199, 6200, 6201, 6204, 6204, 6205, 6208, 6209,
3634 6210, 6211, 6212, 6213, 6214, 6217, 6227, 6234, 6234, 6241,
3635 6242, 6246, 6245, 6255, 6258, 6259, 6268, 6278, 6279, 6279,
3636 6296, 6296, 6296, 6296, 6296, 6296, 6296, 6296, 6296, 6297,
3637 6314, 6314, 6314, 6314, 6314, 6314, 6319, 6324, 6329, 6334,
3638 6339, 6344, 6349, 6354, 6359, 6364, 6369, 6374, 6379, 6385,
3639 6392, 6399, 6408, 6417, 6426, 6437, 6438, 6448, 6455, 6460,
3640 6479, 6481, 6492, 6512, 6513, 6516, 6522, 6528, 6536, 6537,
3641 6540, 6546, 6554, 6555, 6558, 6564, 6572, 6577, 6581, 6581,
3642 6611, 6613, 6612, 6625, 6626, 6633, 6635, 6660, 6665, 6670,
3643 6677, 6683, 6688, 6701, 6701, 6701, 6702, 6705, 6706, 6707,
3644 6710, 6711, 6714, 6715, 6718, 6719, 6722, 6725, 6728, 6731,
3645 6732, 6735, 6743, 6750, 6751, 6755
3646};
3647#endif
3648
3650#define YY_ACCESSING_SYMBOL(State) YY_CAST (yysymbol_kind_t, yystos[State])
3651
3652#if 1
3653/* The user-facing name of the symbol whose (internal) number is
3654 YYSYMBOL. No bounds checking. */
3655static const char *yysymbol_name (yysymbol_kind_t yysymbol) YY_ATTRIBUTE_UNUSED;
3656
3657/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
3658 First, the terminals, then, starting at YYNTOKENS, nonterminals. */
3659static const char *const yytname[] =
3660{
3661 "\"end-of-input\"", "error", "\"invalid token\"", "\"'class'\"",
3662 "\"'module'\"", "\"'def'\"", "\"'undef'\"", "\"'begin'\"",
3663 "\"'rescue'\"", "\"'ensure'\"", "\"'end'\"", "\"'if'\"", "\"'unless'\"",
3664 "\"'then'\"", "\"'elsif'\"", "\"'else'\"", "\"'case'\"", "\"'when'\"",
3665 "\"'while'\"", "\"'until'\"", "\"'for'\"", "\"'break'\"", "\"'next'\"",
3666 "\"'redo'\"", "\"'retry'\"", "\"'in'\"", "\"'do'\"",
3667 "\"'do' for condition\"", "\"'do' for block\"", "\"'do' for lambda\"",
3668 "\"'return'\"", "\"'yield'\"", "\"'super'\"", "\"'self'\"", "\"'nil'\"",
3669 "\"'true'\"", "\"'false'\"", "\"'and'\"", "\"'or'\"", "\"'not'\"",
3670 "\"'if' modifier\"", "\"'unless' modifier\"", "\"'while' modifier\"",
3671 "\"'until' modifier\"", "\"'rescue' modifier\"", "\"'alias'\"",
3672 "\"'defined?'\"", "\"'BEGIN'\"", "\"'END'\"", "\"'__LINE__'\"",
3673 "\"'__FILE__'\"", "\"'__ENCODING__'\"", "\"local variable or method\"",
3674 "\"method\"", "\"global variable\"", "\"instance variable\"",
3675 "\"constant\"", "\"class variable\"", "\"label\"", "\"integer literal\"",
3676 "\"float literal\"", "\"rational literal\"", "\"imaginary literal\"",
3677 "\"char literal\"", "\"numbered reference\"", "\"back reference\"",
3678 "\"literal content\"", "tREGEXP_END", "\"dummy end\"", "'.'",
3679 "\"backslash\"", "\"escaped space\"", "\"escaped horizontal tab\"",
3680 "\"escaped form feed\"", "\"escaped carriage return\"",
3681 "\"escaped vertical tab\"", "\"unary+\"", "\"unary-\"", "\"**\"",
3682 "\"<=>\"", "\"==\"", "\"===\"", "\"!=\"", "\">=\"", "\"<=\"", "\"&&\"",
3683 "\"||\"", "\"=~\"", "\"!~\"", "\"..\"", "\"...\"", "\"(..\"", "\"(...\"",
3684 "\"[]\"", "\"[]=\"", "\"<<\"", "\">>\"", "\"&.\"", "\"::\"",
3685 "\":: at EXPR_BEG\"", "\"operator-assignment\"", "\"=>\"", "\"(\"",
3686 "\"( arg\"", "\"[\"", "\"{\"", "\"{ arg\"", "\"*\"", "\"**arg\"",
3687 "\"&\"", "\"->\"", "\"symbol literal\"", "\"string literal\"",
3688 "\"backtick literal\"", "\"regexp literal\"", "\"word list\"",
3689 "\"verbatim word list\"", "\"symbol list\"", "\"verbatim symbol list\"",
3690 "\"terminator\"", "\"'}'\"", "\"'#{'\"", "tSTRING_DVAR", "tLAMBEG",
3691 "tLABEL_END", "tIGNORED_NL", "tCOMMENT", "tEMBDOC_BEG", "tEMBDOC",
3692 "tEMBDOC_END", "tHEREDOC_BEG", "tHEREDOC_END", "k__END__", "tLOWEST",
3693 "'='", "'?'", "':'", "'>'", "'<'", "'|'", "'^'", "'&'", "'+'", "'-'",
3694 "'*'", "'/'", "'%'", "tUMINUS_NUM", "'!'", "'~'", "tLAST_TOKEN", "'{'",
3695 "'}'", "'['", "'\\n'", "','", "'`'", "'('", "')'", "']'", "';'", "' '",
3696 "$accept", "option_terms", "compstmt_top_stmts", "$@1", "program",
3697 "top_stmts", "top_stmt", "block_open", "begin_block", "compstmt_stmts",
3698 "$@2", "$@3", "bodystmt", "$@4", "stmts", "stmt_or_begin", "$@5",
3699 "allow_exits", "k_END", "$@6", "stmt", "asgn_mrhs", "asgn_command_rhs",
3700 "command_asgn", "op_asgn_command_rhs",
3701 "def_endless_method_endless_command", "endless_command", "option_'\\n'",
3702 "command_rhs", "expr", "$@7", "$@8", "def_name", "defn_head", "$@9",
3703 "defs_head", "value_expr_expr", "expr_value", "$@10", "$@11",
3704 "expr_value_do", "command_call", "value_expr_command_call",
3705 "command_call_value", "block_command", "cmd_brace_block", "fcall",
3706 "command", "mlhs", "mlhs_inner", "mlhs_basic", "mlhs_items_mlhs_item",
3707 "mlhs_item", "mlhs_head", "mlhs_node", "lhs", "cname", "cpath", "fname",
3708 "fitem", "undef_list", "$@12", "op", "reswords", "asgn_arg_rhs", "arg",
3709 "op_asgn_arg_rhs", "range_expr_arg", "def_endless_method_endless_arg",
3710 "ternary", "endless_arg", "relop", "rel_expr", "lex_ctxt",
3711 "begin_defined", "after_rescue", "value_expr_arg", "arg_value",
3712 "aref_args", "arg_rhs", "paren_args", "opt_paren_args", "opt_call_args",
3713 "value_expr_command", "call_args", "$@13", "command_args", "block_arg",
3714 "opt_block_arg", "args", "arg_splat", "mrhs_arg", "mrhs", "primary",
3715 "$@14", "$@15", "@16", "@17", "$@18", "$@19", "$@20", "$@21", "$@22",
3716 "$@23", "$@24", "value_expr_primary", "primary_value", "k_begin", "k_if",
3717 "k_unless", "k_while", "k_until", "k_case", "k_for", "k_class",
3718 "k_module", "k_def", "k_do", "k_do_block", "k_rescue", "k_ensure",
3719 "k_when", "k_else", "k_elsif", "k_end", "k_return", "k_yield", "then",
3720 "do", "if_tail", "opt_else", "for_var", "f_marg", "mlhs_items_f_marg",
3721 "f_margs", "f_rest_marg", "f_any_kwrest", "$@25", "f_eq",
3722 "f_kw_primary_value", "f_kwarg_primary_value",
3723 "args_tail_basic_primary_value", "block_args_tail", "excessed_comma",
3724 "f_opt_primary_value", "f_opt_arg_primary_value",
3725 "opt_args_tail_block_args_tail", "block_param", "opt_block_param_def",
3726 "block_param_def", "opt_block_param", "opt_bv_decl", "bv_decls", "bvar",
3727 "max_numparam", "numparam", "it_id", "@26", "$@27", "lambda",
3728 "f_larglist", "lambda_body", "$@28", "do_block", "block_call",
3729 "method_call", "brace_block", "@29", "brace_body", "@30", "do_body",
3730 "case_args", "case_body", "cases", "p_pvtbl", "p_pktbl", "p_in_kwarg",
3731 "$@31", "p_case_body", "p_cases", "p_top_expr", "p_top_expr_body",
3732 "p_expr", "p_as", "$@32", "p_alt", "p_lparen", "p_lbracket",
3733 "p_expr_basic", "$@33", "p_args", "p_args_head", "p_args_tail", "p_find",
3734 "p_rest", "p_args_post", "p_arg", "p_kwargs", "p_kwarg", "p_kw",
3735 "p_kw_label", "p_kwrest", "p_kwnorest", "p_any_kwrest", "p_value",
3736 "range_expr_p_primitive", "p_primitive", "p_variable", "p_var_ref",
3737 "p_expr_ref", "p_const", "opt_rescue", "exc_list", "exc_var",
3738 "opt_ensure", "literal", "strings", "string", "string1", "xstring",
3739 "regexp", "nonempty_list_' '", "words_tWORDS_BEG_word_list", "words",
3740 "word_list", "word", "words_tSYMBOLS_BEG_symbol_list", "symbols",
3741 "symbol_list", "words_tQWORDS_BEG_qword_list", "qwords",
3742 "words_tQSYMBOLS_BEG_qsym_list", "qsymbols", "qword_list", "qsym_list",
3743 "string_contents", "xstring_contents", "regexp_contents",
3744 "string_content", "@34", "@35", "@36", "@37", "string_dend",
3745 "string_dvar", "symbol", "ssym", "sym", "dsym", "numeric",
3746 "simple_numeric", "nonlocal_var", "user_variable", "keyword_variable",
3747 "var_ref", "var_lhs", "backref", "$@38", "superclass",
3748 "f_opt_paren_args", "f_paren_args", "f_arglist", "@39", "f_kw_arg_value",
3749 "f_kwarg_arg_value", "args_tail_basic_arg_value", "args_tail",
3750 "f_opt_arg_value", "f_opt_arg_arg_value", "opt_args_tail_args_tail",
3751 "f_args", "args_forward", "f_bad_arg", "f_norm_arg", "f_arg_asgn",
3752 "f_arg_item", "f_arg", "f_label", "kwrest_mark", "f_no_kwarg",
3753 "f_kwrest", "restarg_mark", "f_rest_arg", "blkarg_mark", "f_block_arg",
3754 "opt_f_block_arg", "value_expr_singleton_expr", "singleton",
3755 "singleton_expr", "$@40", "assoc_list", "assocs", "assoc", "operation2",
3756 "operation3", "dot_or_colon", "call_op", "call_op2", "rparen",
3757 "rbracket", "rbrace", "trailer", "term", "terms", "none", YY_NULLPTR
3758};
3759
3760static const char *
3761yysymbol_name (yysymbol_kind_t yysymbol)
3762{
3763 return yytname[yysymbol];
3764}
3765#endif
3766
3767#define YYPACT_NINF (-1154)
3768
3769#define yypact_value_is_default(Yyn) \
3770 ((Yyn) == YYPACT_NINF)
3771
3772#define YYTABLE_NINF (-816)
3773
3774#define yytable_value_is_error(Yyn) \
3775 ((Yyn) == YYTABLE_NINF)
3776
3777/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
3778 STATE-NUM. */
3779static const yytype_int16 yypact[] =
3780{
3781 -1154, 5861, 140, -1154, -1154, -1154, -1154, 10474, -1154, -1154,
3782 -1154, -1154, -1154, -1154, -1154, 11529, 11529, -1154, -1154, -1154,
3783 -1154, 6763, -1154, -1154, -1154, -1154, 479, 10320, -9, 31,
3784 -1154, -1154, -1154, -1154, 6139, 6919, -1154, -1154, 6295, -1154,
3785 -1154, -1154, -1154, -1154, -1154, -1154, -1154, 13089, 13089, 13089,
3786 13089, 133, 9233, 9391, 12009, 12249, 10775, -1154, 10166, -1154,
3787 -1154, -1154, 43, 43, 43, 43, 1177, 13209, 13089, -1154,
3788 236, -1154, -1154, 1304, -1154, -1154, -1154, -1154, -1154, 894,
3789 318, 318, -1154, -1154, 110, 181, 123, -1154, 79, 13809,
3790 -1154, 249, -1154, 1945, -1154, -1154, -1154, -1154, 896, 448,
3791 -1154, 598, -1154, 11409, 11409, -1154, -1154, 9853, 13927, 14045,
3792 14163, 10011, 11529, 7387, -1154, 737, 70, -1154, -1154, 324,
3793 -1154, -1154, -1154, -1154, -1154, -1154, -1154, -1154, -1154, -1154,
3794 -1154, -1154, -1154, -1154, -1154, -1154, -1154, 81, 503, -1154,
3795 231, 528, -1154, -1154, -1154, -1154, -1154, -1154, -1154, -1154,
3796 -1154, -1154, -1154, -1154, -1154, -1154, -1154, -1154, -1154, -1154,
3797 -1154, -1154, -1154, -1154, -1154, -1154, -1154, -1154, -1154, -1154,
3798 -1154, -1154, -1154, -1154, -1154, -1154, -1154, -1154, -1154, -1154,
3799 -1154, -1154, -1154, -1154, -1154, -1154, -1154, -1154, -1154, -1154,
3800 -1154, -1154, -1154, -1154, -1154, -1154, -1154, -1154, -1154, -1154,
3801 -1154, -1154, -1154, -1154, -1154, -1154, -1154, -1154, -1154, -1154,
3802 -1154, -1154, -1154, -1154, -1154, -1154, -1154, -1154, -1154, -1154,
3803 292, -1154, -1154, -1154, -1154, -1154, -1154, 315, 13089, 462,
3804 9391, 13089, 13089, 13089, -1154, 13089, -1154, -1154, 389, 4606,
3805 -1154, 480, -1154, -1154, -1154, 408, -1154, 607, 44, 80,
3806 500, 244, 469, -1154, -1154, 11649, -1154, 11529, -1154, -1154,
3807 11150, 13329, 779, -1154, 438, -1154, 9549, -1154, -1154, -1154,
3808 -1154, -1154, 460, 318, 318, 110, -1154, 665, -1154, 511,
3809 633, 4706, 4706, 703, -1154, 9233, 580, 236, -1154, 1304,
3810 -9, 613, -1154, -1154, 591, 818, 851, -1154, 480, 604,
3811 851, -1154, -9, 715, 1177, 14281, 634, 634, 670, -1154,
3812 726, 777, 797, 807, -1154, -1154, 732, -1154, -1154, 1132,
3813 1147, 678, -1154, 686, 686, 686, 686, 761, -1154, -1154,
3814 -1154, -1154, -1154, -1154, -1154, 6013, 734, 11409, 11409, 11409,
3815 11409, -1154, 13329, 13329, 1810, 753, 762, -1154, 1810, -1154,
3816 766, -1154, -1154, -1154, -1154, 806, -1154, -1154, -1154, -1154,
3817 -1154, -1154, -1154, 9233, 10893, 764, -1154, -1154, 13089, 13089,
3818 13089, 13089, 13089, -1154, -1154, 13089, 13089, 13089, 13089, 13089,
3819 13089, 13089, 13089, -1154, 13089, -1154, -1154, 13089, 13089, 13089,
3820 13089, 13089, 13089, 13089, 13089, 13089, 13089, -1154, -1154, 3522,
3821 11529, 4301, 460, 8169, -1154, 894, -1154, 214, 214, 11409,
3822 9081, 9081, -1154, 236, 774, 868, -1154, -1154, 854, 916,
3823 93, 97, 121, 711, 758, 11409, 296, -1154, 809, 866,
3824 -1154, -1154, -1154, -1154, 73, 114, 461, 625, 637, 656,
3825 677, 738, 769, -1154, -1154, -1154, -1154, -1154, 772, -1154,
3826 -1154, 11011, -1154, -1154, -1154, 2213, -1154, -1154, -1154, -1154,
3827 -1154, -1154, 316, -1154, -1154, -1154, 707, -1154, 13089, 11769,
3828 -1154, -1154, 14662, 11529, 14760, -1154, -1154, 12129, -1154, 13089,
3829 -9, -1154, 801, -9, 803, -1154, -1154, 823, 170, -1154,
3830 -1154, -1154, -1154, -1154, 10474, -1154, -1154, 13089, 813, 827,
3831 849, 14858, 14760, -1154, 31, -9, -1154, -1154, 5468, 840,
3832 845, -1154, 12009, -1154, -1154, 12249, -1154, -1154, -1154, 438,
3833 870, -1154, 853, -1154, -1154, 14281, 14956, 11529, 15054, -1154,
3834 -1154, -1154, -1154, -1154, -1154, -1154, -1154, -1154, -1154, -1154,
3835 -1154, 1153, 103, 1221, 293, 13089, -1154, -1154, 9701, -1154,
3836 -1154, -1154, -1154, -1154, 11289, -1154, -1154, -1154, -1154, -1154,
3837 -1154, -1154, -1154, -1154, -1154, 1349, -1154, -1154, -1154, -1154,
3838 -1154, 855, -1154, -1154, 861, -1154, -1154, -1154, 865, -9,
3839 -1154, -1154, -1154, 903, -1154, 873, 13089, 288, -1154, -1154,
3840 970, 875, 996, -1154, 13449, 8169, 236, 13449, 8169, -1154,
3841 898, -1154, -1154, -1154, 138, 138, 12369, -9, 14281, 897,
3842 -1154, 12489, -1154, 633, 4788, 4788, 4788, 4788, 5010, 3762,
3843 4788, 4788, 4706, 4706, 572, 572, -1154, 4380, 1239, 1239,
3844 1283, 430, 430, 633, 633, 633, 965, 965, 7543, 6451,
3845 7855, 6607, 460, -1154, -9, 904, 765, -1154, 783, -1154,
3846 7075, -1154, -1154, 138, -1154, 8321, 1051, 8777, 197, 138,
3847 138, 1050, 1044, 126, 15152, 11529, 15250, -1154, -1154, -1154,
3848 870, -1154, -1154, -1154, -1154, 15348, 11529, 15446, 8169, 13329,
3849 -1154, -1154, -1154, -9, -1154, -1154, -1154, -1154, 3914, 13569,
3850 13569, 10474, -1154, 13089, 13089, -1154, 480, -1154, -1154, 469,
3851 5159, 7231, -9, 328, 351, 13089, 13089, -1154, -1154, 11889,
3852 -1154, 12129, -1154, -1154, -1154, 13329, 4606, -1154, 13689, 13689,
3853 84, 460, 460, 13569, -1154, 552, -1154, -1154, 851, 14281,
3854 853, 477, 436, -9, 92, 322, -1154, -1154, 1067, -1154,
3855 360, -1154, 43, -1154, -1154, 360, 43, -1154, 633, 919,
3856 -1154, 1349, 1441, -1154, 929, -9, 933, -1154, 429, -1154,
3857 -1154, 349, -1154, 1810, -1154, -1154, 966, 13089, 1810, -1154,
3858 -1154, -1154, -1154, -1154, 1360, -1154, -1154, 479, 1055, -1154,
3859 4606, 1057, 138, -1154, 1055, 1057, 138, -1154, -1154, 960,
3860 -1154, -1154, -1154, -1154, -1154, 13089, -1154, -1154, -1154, 958,
3861 961, 1075, -1154, -1154, 853, 14281, 1064, -1154, -1154, 1084,
3862 995, 1604, -1154, -1154, -1154, 888, 450, -1154, -1154, 1000,
3863 -1154, -1154, -1154, -1154, 806, 982, 837, 11769, -1154, -1154,
3864 -1154, -1154, 806, -1154, 1142, -1154, 1010, -1154, 1144, -1154,
3865 -1154, -1154, -1154, -1154, -1154, 12609, 138, -1154, 1050, 138,
3866 134, 151, -9, 150, 166, 11409, 236, 11409, 8169, 791,
3867 436, -1154, -9, 138, 170, 10628, -1154, 70, 181, -1154,
3868 3321, -1154, -1154, -1154, -1154, 13089, -1154, -1154, -1154, -1154,
3869 456, -1154, -1154, -9, 1007, 170, 479, -1154, -1154, -1154,
3870 -1154, 647, -1154, -1154, -1154, -1154, -1154, 686, -1154, 686,
3871 686, 686, -1154, -9, -1154, 1349, -1154, 1451, -1154, -1154,
3872 1105, 855, -1154, -1154, 1011, 1020, -1154, -1154, 1021, -1154,
3873 1022, -1154, 1011, 13449, -1154, -1154, -1154, -1154, -1154, -1154,
3874 -1154, 1027, 12729, -1154, 853, 508, -1154, -1154, -1154, 15544,
3875 11529, 15642, -1154, -1154, 13089, 13569, 13569, 1013, -1154, -1154,
3876 -1154, 13569, 13569, -1154, -1154, 12849, 1144, -1154, -1154, -1154,
3877 9081, 11409, 138, -1154, -1154, 138, -1154, 13089, -1154, 100,
3878 -1154, -1154, 138, -1154, 168, 197, 8169, 236, 138, -1154,
3879 -1154, -1154, -1154, -1154, -1154, 13089, 13089, -1154, 13089, 13089,
3880 -1154, 12129, -1154, 13689, 1680, 5709, -1154, -1154, 1030, 1035,
3881 -1154, 1360, -1154, 1360, -1154, 1810, -1154, 1360, -1154, -1154,
3882 1055, 1057, 13089, 13089, -1154, -1154, 13089, 1037, 11289, 11289,
3883 13569, 13089, 7699, 8011, -9, 526, 619, 4514, 4514, 4606,
3884 -1154, -1154, -1154, -1154, -1154, 13569, -1154, -1154, -1154, -1154,
3885 958, -1154, 1093, -1154, 1187, -1154, -1154, 214, -1154, -1154,
3886 -1154, 12969, 8473, -1154, -1154, -1154, 138, -1154, -1154, 13089,
3887 1810, -1154, -1154, 115, 1451, 1451, 1011, 1011, 1045, 1011,
3888 4606, 4606, 1060, 1060, 1027, -1154, -1154, 4606, 627, -1154,
3889 -1154, -1154, 2841, 2841, 571, -1154, 4211, 489, 1149, -1154,
3890 1423, -1154, -1154, 56, -1154, 1065, -1154, -1154, -1154, 1054,
3891 -1154, 1059, -1154, 14590, -1154, -1154, -1154, -1154, -1154, 973,
3892 -1154, -1154, -1154, 453, -1154, -1154, -1154, -1154, -1154, -1154,
3893 -1154, -1154, -1154, 440, -1154, -1154, -1154, 14399, 214, -1154,
3894 -1154, 9081, -1154, -1154, 8929, 8321, 13089, -1154, 749, 4514,
3895 9081, -1154, -9, 108, -1154, -1154, -1154, 1035, -1154, -1154,
3896 1360, -1154, -1154, 1993, 9701, -1154, -1154, 8169, -1154, -1154,
3897 -1154, -1154, 14590, 65, -9, 5289, -1154, -9, 1062, -1154,
3898 1058, -1154, -1154, -1154, 1048, -1154, 11409, -1154, 1154, 5289,
3899 -1154, 14590, 971, 1117, 2841, 2841, 571, -16, 691, 4514,
3900 4514, -1154, 1167, -1154, 901, 219, 289, 294, 8169, 236,
3901 -1154, 1010, -1154, -1154, -1154, -1154, 214, 1033, 138, 1072,
3902 1066, -1154, 9701, -1154, 1011, 855, -1154, 1087, -1154, -1154,
3903 -1154, 1090, -1154, -9, 903, 1095, 14517, 1102, -1154, -1154,
3904 -1154, 281, -1154, 1117, 1106, 1107, -1154, -1154, -1154, -1154,
3905 -1154, -9, -1154, -1154, 1108, 14590, 1109, -1154, -1154, -1154,
3906 -1154, -1154, -1154, -1154, -1154, -1154, -1154, -1154, -9, -9,
3907 -9, -9, -9, -9, 372, 15740, 11529, 15838, 1142, -1154,
3908 1187, -1154, -1154, 11409, 11409, -1154, 1481, -1154, 8169, 1115,
3909 -1154, -1154, 349, -1154, 1993, -1154, 1088, 14517, 1993, -1154,
3910 -1154, 1214, 915, 1518, -1154, -1154, 14590, -1154, 971, -1154,
3911 14590, -1154, 5289, 867, -1154, -1154, -1154, -1154, -1154, -1154,
3912 251, 284, -9, 418, 432, -1154, -1154, 8625, -1154, -1154,
3913 -1154, 923, -1154, -1154, 138, -1154, -1154, 855, -1154, -1154,
3914 1121, 1123, -1154, 915, 1128, 1130, -1154, 15936, 1121, 1134,
3915 -9, 1134, -1154, -1154, 442, 495, 1481, -1154, -1154, -1154,
3916 1518, -1154, 1518, -1154, 1993, -1154, 1518, -1154, 1133, 1136,
3917 -1154, 14590, -1154, -1154, -1154, -1154, -1154, 1121, 1121, 1139,
3918 1121, -1154, -1154, 1518, -1154, -1154, 1121, -1154
3919};
3920
3921/* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM.
3922 Performed when YYTABLE does not specify something else to do. Zero
3923 means the default is an error. */
3924static const yytype_int16 yydefact[] =
3925{
3926 2, 0, 0, 47, 406, 407, 408, 0, 399, 400,
3927 401, 404, 26, 26, 26, 393, 394, 395, 396, 418,
3928 419, 323, 699, 698, 700, 701, 64, 0, 64, 0,
3929 815, 703, 702, 704, 97, 99, 693, 692, 98, 694,
3930 688, 689, 690, 691, 637, 709, 710, 0, 0, 0,
3931 0, 0, 0, 0, 815, 815, 126, 490, 663, 663,
3932 665, 667, 0, 0, 0, 0, 0, 0, 0, 6,
3933 3, 8, 26, 10, 43, 49, 40, 58, 61, 46,
3934 718, 718, 70, 91, 323, 90, 0, 112, 0, 116,
3935 128, 0, 237, 79, 246, 253, 282, 283, 267, 284,
3936 398, 0, 351, 0, 0, 87, 87, 0, 0, 0,
3937 0, 0, 360, 323, 370, 94, 368, 340, 341, 636,
3938 638, 342, 343, 646, 344, 652, 346, 656, 345, 658,
3939 347, 635, 680, 681, 634, 686, 697, 705, 706, 348,
3940 0, 349, 7, 1, 205, 216, 206, 229, 202, 222,
3941 212, 211, 232, 233, 227, 210, 209, 204, 230, 234,
3942 235, 214, 203, 217, 221, 223, 215, 208, 224, 231,
3943 226, 225, 218, 228, 213, 201, 220, 219, 200, 207,
3944 198, 199, 195, 196, 197, 155, 157, 156, 190, 191,
3945 186, 168, 169, 170, 177, 174, 176, 171, 172, 192,
3946 193, 178, 179, 183, 187, 173, 175, 165, 166, 167,
3947 180, 181, 182, 184, 185, 188, 189, 194, 160, 162,
3948 33, 158, 159, 161, 402, 403, 405, 0, 789, 0,
3949 0, 334, 792, 326, 663, 0, 318, 316, 0, 298,
3950 299, 329, 317, 110, 322, 815, 330, 0, 705, 706,
3951 0, 349, 815, 785, 111, 815, 509, 0, 107, 65,
3952 64, 0, 0, 28, 815, 12, 0, 11, 27, 295,
3953 393, 394, 510, 718, 718, 0, 261, 0, 360, 363,
3954 262, 251, 252, 357, 24, 0, 0, 3, 21, 23,
3955 64, 114, 20, 353, 0, 64, 64, 300, 0, 0,
3956 64, 783, 64, 0, 0, 0, 718, 718, 124, 397,
3957 0, 132, 133, 140, 487, 683, 0, 682, 684, 0,
3958 0, 0, 643, 647, 659, 653, 661, 687, 74, 273,
3959 274, 812, 811, 5, 813, 0, 0, 0, 0, 0,
3960 0, 815, 0, 0, 749, 0, 717, 389, 749, 715,
3961 0, 391, 409, 514, 504, 100, 516, 367, 410, 516,
3962 499, 815, 130, 0, 122, 117, 815, 77, 0, 0,
3963 0, 0, 0, 291, 292, 0, 0, 0, 0, 249,
3964 250, 0, 0, 75, 0, 289, 290, 0, 0, 0,
3965 0, 0, 0, 0, 0, 0, 0, 802, 803, 805,
3966 815, 804, 0, 0, 86, 84, 85, 0, 0, 0,
3967 0, 0, 377, 3, 4, 0, 430, 429, 0, 0,
3968 705, 706, 349, 150, 151, 0, 0, 153, 815, 0,
3969 705, 706, 349, 387, 225, 218, 228, 213, 195, 196,
3970 197, 155, 156, 781, 81, 80, 780, 779, 0, 778,
3971 109, 64, 108, 805, 804, 0, 369, 639, 815, 815,
3972 163, 788, 357, 333, 791, 325, 0, 815, 0, 0,
3973 319, 328, 805, 815, 804, 815, 815, 0, 320, 750,
3974 64, 312, 815, 64, 815, 311, 324, 0, 64, 366,
3975 73, 30, 32, 31, 0, 815, 296, 0, 0, 0,
3976 0, 805, 804, 815, 0, 64, 355, 14, 0, 113,
3977 0, 358, 810, 809, 301, 810, 303, 359, 784, 0,
3978 139, 687, 127, 119, 717, 0, 805, 815, 804, 488,
3979 669, 685, 672, 670, 664, 640, 641, 666, 642, 668,
3980 644, 0, 0, 0, 0, 0, 814, 9, 0, 34,
3981 35, 36, 37, 297, 0, 71, 72, 756, 753, 752,
3982 751, 754, 762, 763, 750, 0, 769, 764, 773, 772,
3983 768, 815, 765, 722, 815, 728, 748, 731, 734, 64,
3984 729, 755, 757, 758, 760, 734, 721, 767, 443, 442,
3985 771, 734, 775, 727, 0, 0, 0, 0, 0, 487,
3986 0, 514, 101, 487, 0, 0, 0, 64, 0, 118,
3987 131, 0, 527, 259, 266, 268, 269, 270, 277, 278,
3988 271, 272, 247, 248, 275, 276, 527, 64, 263, 264,
3989 265, 254, 255, 256, 257, 258, 293, 294, 793, 795,
3990 794, 796, 323, 507, 64, 815, 793, 795, 794, 796,
3991 323, 508, 815, 0, 421, 0, 420, 0, 0, 0,
3992 0, 0, 375, 357, 805, 815, 804, 380, 385, 150,
3993 151, 152, 711, 383, 713, 805, 815, 804, 0, 0,
3994 800, 801, 82, 64, 362, 793, 794, 503, 323, 0,
3995 0, 0, 815, 0, 0, 787, 331, 327, 332, 815,
3996 793, 794, 64, 793, 794, 0, 0, 786, 306, 313,
3997 308, 315, 806, 365, 29, 0, 279, 13, 0, 0,
3998 356, 0, 815, 0, 25, 115, 22, 354, 64, 0,
3999 125, 797, 138, 64, 793, 794, 489, 673, 0, 645,
4000 0, 649, 0, 655, 651, 0, 0, 657, 260, 0,
4001 38, 0, 441, 433, 435, 64, 438, 431, 0, 726,
4002 777, 0, 725, 0, 744, 716, 0, 0, 0, 741,
4003 720, 594, 766, 770, 0, 746, 774, 64, 59, 62,
4004 286, 280, 0, 719, 60, 281, 0, 488, 512, 0,
4005 488, 416, 417, 513, 498, 334, 92, 93, 41, 336,
4006 0, 45, 335, 129, 123, 0, 0, 69, 48, 67,
4007 0, 304, 329, 236, 42, 0, 349, 525, 525, 0,
4008 815, 815, 514, 506, 104, 0, 511, 313, 815, 815,
4009 310, 505, 102, 309, 815, 352, 815, 422, 815, 424,
4010 88, 423, 373, 374, 413, 0, 0, 527, 0, 0,
4011 797, 356, 64, 793, 794, 0, 0, 0, 0, 150,
4012 151, 154, 64, 0, 64, 0, 361, 500, 95, 50,
4013 304, 238, 57, 245, 164, 0, 790, 321, 815, 815,
4014 511, 815, 815, 64, 815, 64, 64, 56, 244, 302,
4015 120, 511, 26, 674, 671, 678, 679, 648, 650, 660,
4016 654, 662, 39, 64, 440, 0, 759, 0, 776, 723,
4017 767, 815, 733, 732, 734, 734, 445, 730, 734, 761,
4018 734, 758, 734, 0, 815, 815, 390, 392, 489, 96,
4019 489, 339, 0, 815, 121, 357, 815, 815, 815, 805,
4020 815, 804, 526, 526, 0, 0, 0, 0, 105, 807,
4021 815, 0, 0, 103, 411, 815, 18, 626, 415, 414,
4022 0, 0, 0, 425, 427, 0, 89, 0, 518, 0,
4023 378, 525, 0, 379, 511, 0, 0, 0, 0, 511,
4024 388, 782, 83, 501, 502, 0, 0, 815, 0, 0,
4025 307, 314, 364, 0, 749, 0, 432, 434, 436, 439,
4026 724, 0, 745, 0, 742, 0, 737, 0, 739, 747,
4027 66, 288, 0, 0, 26, 26, 334, 337, 0, 0,
4028 0, 0, 793, 794, 64, 793, 794, 0, 0, 285,
4029 54, 242, 55, 243, 106, 0, 52, 240, 53, 241,
4030 627, 628, 815, 629, 815, 15, 428, 0, 371, 372,
4031 519, 0, 0, 526, 376, 381, 0, 712, 384, 0,
4032 749, 491, 494, 0, 0, 0, 734, 734, 734, 734,
4033 63, 287, 815, 815, 338, 44, 68, 305, 511, 618,
4034 624, 590, 0, 0, 0, 526, 64, 526, 578, 663,
4035 0, 617, 78, 535, 541, 543, 546, 539, 538, 574,
4036 540, 583, 586, 589, 595, 596, 585, 549, 604, 597,
4037 550, 605, 606, 607, 608, 609, 610, 611, 612, 614,
4038 613, 615, 616, 593, 76, 51, 239, 0, 0, 631,
4039 412, 0, 19, 633, 0, 0, 0, 520, 815, 0,
4040 0, 386, 64, 0, 677, 676, 675, 437, 743, 738,
4041 0, 735, 740, 479, 0, 477, 476, 0, 602, 603,
4042 151, 622, 0, 566, 64, 567, 571, 64, 0, 561,
4043 0, 815, 564, 577, 0, 619, 0, 620, 0, 536,
4044 544, 0, 584, 588, 600, 601, 0, 526, 526, 0,
4045 0, 592, 0, 630, 0, 705, 706, 349, 0, 3,
4046 16, 815, 521, 523, 524, 522, 0, 532, 0, 481,
4047 0, 496, 0, 492, 734, 815, 448, 815, 454, 475,
4048 457, 460, 480, 64, 758, 460, 447, 460, 453, 515,
4049 517, 64, 559, 581, 569, 568, 560, 572, 808, 562,
4050 591, 64, 542, 537, 574, 0, 575, 579, 663, 587,
4051 582, 598, 599, 623, 548, 558, 547, 554, 64, 64,
4052 64, 64, 64, 64, 357, 805, 815, 804, 815, 632,
4053 815, 426, 528, 0, 0, 382, 0, 493, 0, 0,
4054 736, 452, 0, 451, 0, 471, 0, 0, 455, 466,
4055 468, 0, 446, 0, 473, 565, 0, 573, 0, 621,
4056 0, 545, 0, 0, 551, 552, 553, 555, 556, 557,
4057 797, 356, 64, 793, 794, 625, 17, 0, 533, 534,
4058 485, 64, 483, 486, 0, 495, 449, 815, 459, 458,
4059 460, 460, 478, 456, 460, 460, 357, 805, 460, 570,
4060 64, 575, 576, 580, 511, 815, 0, 482, 497, 450,
4061 0, 472, 0, 469, 0, 463, 0, 465, 797, 356,
4062 474, 0, 563, 530, 531, 529, 484, 460, 460, 460,
4063 460, 470, 464, 0, 461, 467, 460, 462
4064};
4065
4066/* YYPGOTO[NTERM-NUM]. */
4067static const yytype_int16 yypgoto[] =
4068{
4069 -1154, -102, 1031, -1154, -1154, -1154, 963, -1154, 792, -17,
4070 -1154, -1154, -539, -1154, 174, 798, -1154, 0, -1154, -1154,
4071 26, -1154, -1154, -24, -1154, 15, -552, 169, -565, -100,
4072 -1154, -1154, 443, 2573, -1154, 3086, -1154, -25, -1154, -1154,
4073 1201, -38, -1154, 706, -1154, -659, 1206, 22, 1207, -169,
4074 35, -445, -72, -1154, 2, 3822, -400, 1204, -46, 6,
4075 -1154, -1154, 12, -1154, -1154, 4667, -1154, -1154, -1154, -1154,
4076 -547, 1222, -1154, 899, 824, 222, -1154, 1002, -1154, 497,
4077 28, 639, -375, -1154, 88, -1154, 13, -393, -231, 38,
4078 -423, -1154, -567, -47, -1154, -1154, -1154, -1154, -1154, -1154,
4079 -1154, -1154, -1154, -1154, -1154, -1154, 986, -1154, -1154, -1154,
4080 -1154, -1154, -1154, -1154, -1154, -1154, -1154, -1154, -1154, -1154,
4081 -1154, -1154, 366, -1154, -443, 1837, 2057, -386, 355, 131,
4082 -797, -1154, -794, -801, 586, 433, -955, -1154, 127, 57,
4083 -1154, -1154, 199, -1154, -1153, 66, 336, -1154, 282, -1154,
4084 -1154, 139, -1154, 17, 260, -58, -88, -1154, -1154, 337,
4085 -1154, -1154, -1154, 499, -1154, -1154, -115, -1154, -528, -1154,
4086 1009, -1154, -773, -1154, -698, -755, -521, -1154, 24, -1154,
4087 -1154, -909, -213, -1154, -1154, -1154, -1154, -1154, 125, -1154,
4088 -143, -1154, -636, -750, -1024, -390, -1051, -1036, -1154, 189,
4089 -1154, -1154, -568, 191, -1154, -1154, -555, 198, -1154, -1154,
4090 -1154, 109, -1154, -1154, 117, 1029, 1459, -1154, 1269, 1564,
4091 1759, 37, -1154, 1883, -1154, 847, -1154, 1968, -1154, -1154,
4092 2174, -1154, 2208, -1154, -1154, -57, -1154, -1154, -188, -1154,
4093 -1154, -1154, -1154, -1154, -1154, 50, -1154, -1154, -1154, -1154,
4094 33, -50, 3681, -1, 1280, 3945, 3453, -1154, -1154, 9,
4095 785, 68, -1154, 632, -1154, -1154, -301, -677, 630, -421,
4096 -320, -184, -1141, -549, -284, -745, -584, -472, -678, -1154,
4097 -727, -1154, -576, -1154, -562, -542, -1154, -1154, -1154, -1154,
4098 -1154, 113, -437, -381, -1154, -1154, -91, 1284, -116, 41,
4099 60, -215, -59, -64, 14
4100};
4101
4102/* YYDEFGOTO[NTERM-NUM]. */
4103static const yytype_int16 yydefgoto[] =
4104{
4105 0, 333, 69, 1, 2, 70, 71, 266, 267, 652,
4106 1134, 1270, 653, 1044, 287, 288, 504, 224, 72, 494,
4107 289, 74, 75, 76, 77, 78, 778, 487, 808, 79,
4108 626, 612, 444, 273, 865, 274, 406, 407, 409, 966,
4109 410, 82, 797, 809, 83, 602, 275, 85, 86, 290,
4110 87, 522, 88, 89, 90, 238, 427, 428, 218, 219,
4111 220, 691, 641, 222, 92, 93, 94, 95, 96, 97,
4112 781, 395, 98, 553, 497, 554, 240, 241, 294, 813,
4113 830, 831, 480, 242, 481, 257, 258, 244, 470, 645,
4114 246, 801, 802, 99, 403, 510, 848, 661, 855, 1140,
4115 858, 856, 678, 595, 598, 100, 277, 102, 103, 104,
4116 105, 106, 107, 108, 109, 110, 111, 356, 359, 955,
4117 1131, 845, 960, 961, 793, 278, 279, 655, 840, 962,
4118 963, 419, 753, 754, 755, 756, 571, 766, 767, 1216,
4119 1217, 1218, 1328, 1289, 1220, 1221, 1285, 1222, 1154, 1155,
4120 1223, 1210, 1321, 1322, 529, 736, 892, 314, 1143, 114,
4121 1061, 1213, 1278, 360, 115, 116, 357, 599, 600, 603,
4122 604, 969, 846, 1205, 942, 1027, 817, 1317, 849, 1365,
4123 1206, 1092, 1233, 1094, 1245, 1095, 1189, 1190, 1096, 1298,
4124 1164, 1165, 1166, 1098, 1099, 1246, 1168, 1100, 1101, 1102,
4125 1103, 1104, 572, 1106, 1107, 1108, 1109, 1110, 1111, 1112,
4126 1113, 956, 1042, 1128, 1132, 117, 118, 119, 120, 121,
4127 122, 323, 123, 124, 541, 740, 125, 126, 543, 127,
4128 128, 129, 130, 542, 544, 316, 320, 321, 534, 738,
4129 737, 893, 995, 1146, 894, 131, 132, 317, 133, 134,
4130 135, 136, 248, 249, 139, 250, 251, 857, 673, 345,
4131 346, 347, 348, 573, 574, 575, 912, 577, 578, 764,
4132 579, 580, 581, 582, 921, 584, 585, 586, 587, 588,
4133 589, 590, 591, 592, 593, 759, 447, 448, 449, 679,
4134 299, 484, 253, 721, 643, 682, 677, 402, 489, 826,
4135 1172, 514, 656, 414, 269
4136};
4137
4138/* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If
4139 positive, shift that token. If negative, reduce the rule whose
4140 number is the opposite. If YYTABLE_NINF, syntax error. */
4141static const yytype_int16 yytable[] =
4142{
4143 138, 456, 319, 405, 405, 412, 335, 405, 318, 309,
4144 401, 334, 315, 225, 226, 142, 757, 365, 642, 221,
4145 650, 478, 657, 919, 454, 644, 671, 73, 596, 328,
4146 236, 236, 762, 263, 911, 286, 293, 237, 237, 221,
4147 707, 965, 309, 576, 814, 784, 698, 576, 334, 256,
4148 785, 138, 138, 245, 245, 312, 782, 223, 308, 786,
4149 583, 309, 309, 309, 583, 445, 292, 292, 297, 301,
4150 221, 483, 336, 789, 688, 972, 697, 223, 707, 408,
4151 730, 516, 413, 910, 697, 518, 913, 291, 312, 698,
4152 350, 642, 295, 650, 349, 349, 352, 355, 702, 327,
4153 324, 325, 326, 243, 254, 818, 999, 421, 431, 431,
4154 431, 997, 354, 654, 1235, 1144, 505, -135, -141, 1124,
4155 943, 722, -142, 221, 869, 872, 452, 236, 252, 252,
4156 1247, 1329, 537, 539, 237, 1323, 352, 1211, 259, 863,
4157 143, 1234, -699, -64, -707, 259, -149, 722, 791, 351,
4158 245, -148, 733, 1260, 1263, 1244, 474, 1178, 887, -146,
4159 488, 490, 794, 804, 769, 948, 1178, 296, 300, 742,
4160 775, -699, 785, 953, 509, -144, -147, 466, -141, 914,
4161 -708, -707, 265, -698, 879, 507, 502, 915, 1028, 283,
4162 922, -145, 920, -143, 607, 261, 908, 264, 1215, 908,
4163 450, 1329, 757, 904, 322, 1323, 792, 342, 343, 358,
4164 835, 1179, -698, 286, -142, -141, 842, 843, -147, 528,
4165 -581, 353, 743, 508, 839, 252, -135, 654, 334, 138,
4166 1207, 1212, -141, 523, 362, 1145, -132, 405, 405, 405,
4167 405, -794, 555, 556, 292, 1247, -135, -135, -132, 1247,
4168 -135, 1343, -133, 478, 331, 1051, 919, 361, 309, 471,
4169 332, 353, 1340, 1147, -146, 138, 471, 255, 286, 485,
4170 236, 997, 236, 1053, 707, 861, -140, 237, 1342, 237,
4171 142, -139, 499, 500, 138, 722, 698, 349, 349, -137,
4172 852, -793, 73, 482, 947, 245, 722, -147, 1139, 292,
4173 256, 862, -142, 354, 312, -135, -138, -149, -794, 405,
4174 1343, 662, 549, 550, 551, 552, 697, 309, 697, 978,
4175 291, -136, 771, -134, 259, 405, 971, 666, 913, 1215,
4176 1162, 458, 1171, 1215, 138, 684, 1167, 521, 1215, 926,
4177 772, 1203, 351, 927, 476, 486, 286, -136, 669, 1123,
4178 1123, 331, 670, 741, 334, 741, 757, 332, 757, 746,
4179 934, 73, 138, 312, 708, 1204, 609, 710, 331, 1000,
4180 252, 1010, 713, -141, 332, 351, 1011, 292, -149, -141,
4181 1030, 1032, 1178, 366, 658, -148, 1036, 1038, 1041, 725,
4182 331, 1097, 1097, 659, 660, 1215, 332, 1215, 291, 1215,
4183 668, 1215, 138, 970, 698, -146, 973, 562, -793, 138,
4184 138, -146, 747, 649, 485, 236, 692, 292, 1215, 1066,
4185 980, 1067, 237, 1069, 292, 292, 530, 563, 881, 1068,
4186 651, -144, 1254, 1256, 697, 259, 59, 1056, -147, 1259,
4187 1262, -794, 674, -142, -147, -145, 1011, 460, -149, -142,
4188 -148, 882, -815, 523, -149, -143, -136, 567, 568, 1105,
4189 1105, 1123, -144, 765, 513, 513, 236, 649, 877, 513,
4190 1125, 519, 260, 237, 771, 344, -136, -136, 309, 583,
4191 -136, 532, 533, 687, 583, -145, 649, 485, 236, 245,
4192 569, 803, 1191, 1002, 1004, 237, 471, 1006, 471, 1008,
4193 714, 1009, -137, 1097, 1123, -356, 221, 138, 368, 698,
4194 959, 1123, 1123, 889, 649, 757, 757, -397, 462, 1048,
4195 847, 322, 1049, 467, 312, 883, -148, 1158, 1159, 1054,
4196 -700, 749, -148, -356, -356, 1058, 523, 783, 568, 683,
4197 649, 485, 236, 919, 223, -397, -397, 138, 1363, 237,
4198 459, 1186, 898, 138, 707, 1327, 987, 898, 642, -700,
4199 650, 309, 292, 469, 252, 1024, 1214, 866, 796, 1225,
4200 569, 1105, -144, 796, 392, 393, 394, 1227, -144, 864,
4201 750, 468, 699, 1052, -149, 760, -145, 807, 760, -356,
4202 -143, 1228, -145, -794, 138, 495, -143, 138, 697, 841,
4203 475, -397, -143, -708, 910, 919, 1187, 312, 503, 292,
4204 1188, -137, 292, 1141, 1105, 885, 779, 255, 1230, 779,
4205 1123, 1105, 1105, 669, 477, 728, 828, 1160, 459, 1251,
4206 1252, -137, -137, 259, -793, -137, 260, -142, 836, 906,
4207 838, -64, -148, 259, 800, 1148, 1149, 1151, 1152, 800,
4208 368, 796, 796, 877, 138, 824, 138, 890, -133, 471,
4209 -144, 1135, -149, 832, 833, 807, 807, 397, 451, 292,
4210 823, 292, -134, 1281, 1062, 1283, 397, 138, 649, 485,
4211 236, 1226, 309, -140, 1161, 796, -113, 237, 895, 649,
4212 485, 236, 292, 576, -701, 398, 399, 874, 237, 807,
4213 1330, 868, 833, 221, 398, 472, -703, -129, 1331, 1338,
4214 583, 368, 1335, 471, 390, 391, 392, 393, 394, 829,
4215 908, 583, 1228, -701, 941, -702, 1228, 950, 312, 928,
4216 1105, 1228, 930, 523, 397, -703, 833, -97, 506, 1324,
4217 1142, 223, 1198, 880, 530, 538, -704, -112, 981, 823,
4218 511, 400, 983, -145, -702, 405, 517, 405, 309, 576,
4219 473, -143, 398, 501, 959, 1275, 844, 990, 1367, 992,
4220 1368, 520, 1370, 530, 891, -704, 583, 897, 1369, 899,
4221 -695, -134, 900, 901, -98, 1349, 1253, 996, 1228, 1376,
4222 1228, 344, 1228, 1280, 1228, 397, 819, 976, 530, 532,
4223 533, -134, -134, 503, 312, -134, 397, -695, -695, -695,
4224 1226, 1228, 1226, 825, 1093, 1093, 1226, -797, 473, 445,
4225 1272, 1226, 884, 398, 526, 525, 535, -696, 532, 533,
4226 975, 693, 977, 491, 398, 453, -695, -148, -696, 545,
4227 1014, 680, 1015, 492, 493, 259, -705, 540, 957, -64,
4228 964, 531, 964, 532, 533, -696, -696, 138, -139, 787,
4229 -797, 405, -97, 790, -695, 828, -706, -696, -97, 1224,
4230 681, 825, 292, 1163, -705, -705, -349, 221, 1226, 527,
4231 1226, 1348, 1226, 829, 1226, 548, 722, 594, -797, -797,
4232 1183, 1312, 994, 974, -706, -706, -714, 513, 471, -144,
4233 597, 1226, 825, 979, -349, -349, 1339, 796, 796, -98,
4234 1341, -696, 601, 796, 796, -98, 841, -145, 1057, 610,
4235 -135, 807, 807, 397, 663, 760, 1093, 807, 807, 268,
4236 -705, 342, 343, 530, 546, 397, 1047, 950, -136, -357,
4237 884, 667, -797, 1046, -797, 779, 923, 672, -793, 1231,
4238 -706, 398, 664, 649, 485, 236, 709, 397, 711, 138,
4239 -349, 718, 237, 398, 675, 717, 1163, -357, -357, 1043,
4240 397, -143, 259, 512, 292, 138, 1163, 1163, 1063, 373,
4241 374, 712, 796, 719, 397, 398, 939, 101, 532, 533,
4242 292, 1240, -134, 800, 138, -129, 807, 796, 398, 1265,
4243 1224, 247, 247, 727, 1224, 259, 515, 665, 729, 292,
4244 758, 807, 398, 1337, 1072, 1073, 761, 138, 138, 676,
4245 763, 825, 773, -357, 958, 959, 1122, 1122, 768, 1081,
4246 774, 825, 1174, 385, 386, 1138, 1243, -444, 101, 101,
4247 1177, 940, 310, 368, 1075, 1076, 1258, 1261, 776, 563,
4248 788, 138, 805, 247, 1266, 993, 1129, 298, 1133, 827,
4249 381, 382, 1184, 1185, 837, 1078, 292, 844, 676, 847,
4250 1224, 902, 1257, 1273, 1274, 310, 405, 259, 1346, 567,
4251 309, 1122, 1122, 1248, 905, 1122, 1156, 1156, 907, 247,
4252 247, 524, 524, 247, 418, 429, 429, 1269, 247, 924,
4253 916, 925, 1122, 1267, 387, 388, 389, 390, 391, 392,
4254 393, 394, 929, -329, 530, 1295, 932, 1200, 1201, 933,
4255 935, 36, 37, 1208, 39, 1299, 1196, 1169, 936, 937,
4256 138, 45, 46, 138, 138, 508, 944, 1229, 1122, 138,
4257 334, 949, 1304, 1305, 1306, 292, 1012, 1013, 292, 292,
4258 954, 1241, 964, 138, 292, 1018, 138, 772, 1019, 959,
4259 1021, 1122, 991, 496, 1122, 1034, 1001, 535, 292, 532,
4260 533, 292, 1240, 405, 405, 1003, 1005, 1007, 1122, 309,
4261 1122, 1268, -333, 1122, 1122, 1064, 871, 873, 1122, 1122,
4262 1065, 1303, -331, 825, 1127, 1279, 1130, 138, 530, 1153,
4263 1150, 1173, 871, 873, 1180, 1232, 1079, 84, 1236, 1181,
4264 1238, 138, 292, 530, 1182, 964, 101, 1237, 1178, 530,
4265 888, 84, 84, 1264, 1277, 431, 292, 1332, 1255, 760,
4266 461, 760, 1276, 463, 464, 465, 40, 41, 42, 43,
4267 309, 247, 1282, 247, 1122, 1284, 247, 247, 1318, 1319,
4268 1288, 535, 101, 532, 533, 825, 1170, 1293, 84, 84,
4269 606, 1296, 1297, 1300, 1302, 611, 536, 1325, 532, 533,
4270 1336, 101, 739, 84, 532, 533, 1350, 138, 1352, 649,
4271 485, 236, 957, 1354, 1133, 1356, 431, 530, 237, 1361,
4272 -793, 310, 292, -794, 1373, 1122, 724, 498, 547, 1122,
4273 1345, 1122, 1307, 1308, 1309, 1199, 726, 411, 982, 84,
4274 84, 1209, 798, 84, 433, 416, 138, 368, 84, 715,
4275 396, 101, 1045, 247, 247, 247, 247, 867, 247, 247,
4276 1055, 292, 1271, 825, 381, 382, 825, 903, 998, 1326,
4277 744, 760, 532, 533, 337, 338, 339, 340, 341, 101,
4278 310, 1287, 1219, 1344, 1334, 1157, 825, 689, 690, 964,
4279 1122, 368, 1286, 1366, 1091, 1091, 694, 984, 605, 1364,
4280 1301, 1249, 888, 1250, 705, 706, 1242, 1315, 381, 382,
4281 389, 390, 391, 392, 393, 394, 247, 1316, 457, 101,
4282 745, 446, 1209, 909, 496, 247, 101, 101, 918, 455,
4283 1362, 557, 723, 558, 559, 560, 561, 0, 0, 0,
4284 0, 247, 557, 0, 558, 559, 560, 561, 562, 1091,
4285 1091, 0, 0, 1091, 0, 390, 391, 392, 393, 394,
4286 825, 825, 825, 0, 0, 0, 84, 247, 563, 0,
4287 1091, 0, 1031, 1033, 0, 0, 0, 0, 1037, 1039,
4288 0, 751, 564, 0, 0, 0, 752, 0, 0, 247,
4289 0, 84, 565, 84, 0, 0, 84, 84, 567, 568,
4290 695, 696, 84, 0, 0, 1175, 1091, 36, 37, 298,
4291 39, 825, 1031, 1033, 0, 1037, 1039, 0, 0, 0,
4292 1347, 84, 0, 557, 101, 558, 559, 560, 561, 1091,
4293 0, 569, 1091, 557, 0, 558, 559, 560, 561, 1170,
4294 0, 310, 0, 247, 696, 0, 1091, 298, 1091, 0,
4295 0, 1091, 1091, 0, 0, 1176, 1091, 1091, 0, 0,
4296 0, 0, 1126, 1320, 101, 558, 559, 560, 561, 0,
4297 101, 84, 0, 84, 84, 84, 84, 0, 84, 84,
4298 0, 834, 0, 751, 0, 0, 1126, 0, 0, 0,
4299 0, 1290, 0, 1294, 0, 0, 0, 0, 0, 84,
4300 557, 0, 558, 559, 560, 561, 562, 0, 0, 0,
4301 247, 101, 1091, 247, 101, 0, 0, 0, 770, 0,
4302 0, 875, 247, 0, 310, 0, 563, 815, 0, 0,
4303 0, 0, 0, 0, 0, 0, 84, 0, 799, 84,
4304 0, 0, 0, 812, 0, 84, 84, 84, 0, 0,
4305 565, 0, 0, 0, 0, 0, 567, 568, 0, 0,
4306 0, 84, 0, 1091, 0, 0, 0, 1091, 0, 1091,
4307 0, 101, 0, 101, 0, 0, 0, 0, 938, 0,
4308 0, 247, 0, 0, 0, 0, 0, 84, 0, 569,
4309 0, 0, 247, 0, 101, 247, 1351, 1353, 0, 0,
4310 1355, 1357, 0, 0, 1360, 815, 815, 0, 0, 84,
4311 0, 0, 368, 369, 370, 371, 372, 373, 374, 375,
4312 376, 377, 378, 379, 380, 876, 0, 0, 1091, 381,
4313 382, 247, 0, 1371, 1372, 1374, 1375, 0, 0, 815,
4314 0, 696, 1377, 298, 84, 310, 0, 0, 0, 945,
4315 946, 0, 0, 0, 0, 0, 0, 951, 952, 0,
4316 0, 0, 557, 84, 558, 559, 560, 561, 562, 384,
4317 0, 385, 386, 387, 388, 389, 390, 391, 392, 393,
4318 394, 0, 0, 0, 84, 0, 0, 0, 563, -298,
4319 84, 0, 0, 0, 0, 0, 0, 0, 0, 917,
4320 0, 0, 564, 0, 0, 0, 0, 985, 986, 0,
4321 988, 989, 565, 0, 0, 0, 0, 566, 567, 568,
4322 0, 310, 0, 0, 0, 0, 0, 931, 0, 0,
4323 84, 84, 0, 84, 84, 0, 0, 0, 0, 0,
4324 0, 0, 84, 0, 0, 0, 0, 84, 0, 0,
4325 0, 569, 0, 0, 570, 0, 0, 0, 0, 696,
4326 0, 0, 0, 0, 0, 0, 1020, 1060, 112, 0,
4327 0, 247, 0, 247, 101, 0, 0, 968, 0, 1035,
4328 0, 0, 112, 112, 0, 0, 0, 0, 0, 0,
4329 0, 84, 557, 84, 558, 559, 560, 561, 562, 0,
4330 0, 84, 0, 0, 0, 0, 0, 0, 0, 0,
4331 0, 0, 84, 0, 84, 84, 1059, 0, 563, 112,
4332 112, 0, 0, 0, 0, 84, 84, 0, 0, 0,
4333 0, 0, 564, 0, 112, 0, 0, 0, 0, 247,
4334 0, 0, 565, 0, 0, 0, 0, 566, 567, 568,
4335 0, 84, 0, 0, 0, 0, 247, 0, 0, 84,
4336 0, 815, 815, 0, 1017, 0, 0, 815, 815, 0,
4337 112, 112, 0, 0, 112, 0, 101, 247, 0, 112,
4338 0, 569, 0, 0, 570, 0, 0, 1040, 0, 0,
4339 0, 0, 101, 0, 0, 0, 0, 0, 0, 1050,
4340 367, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4341 0, 101, 0, 0, 0, 0, 0, 0, 0, 0,
4342 0, 0, 0, 298, 0, 0, 0, 0, 0, 0,
4343 0, 0, 0, 0, 101, 101, 815, 0, 0, 0,
4344 0, 0, 0, 0, 0, 0, 0, 0, 1074, 0,
4345 0, 815, 0, 368, 369, 370, 371, 372, 373, 374,
4346 375, 376, 377, 378, 379, 380, 0, 0, 101, 0,
4347 381, 382, 0, 0, 0, 557, 383, 558, 559, 560,
4348 561, 562, 0, 1137, 0, 0, 1114, 1114, 113, 0,
4349 0, 84, 0, 84, 84, 0, 0, 112, 0, 0,
4350 1239, 563, 113, 113, 0, 0, 0, 0, 0, 0,
4351 384, 0, 385, 386, 387, 388, 389, 390, 391, 392,
4352 393, 394, 112, 0, 112, 565, 0, 112, 112, 0,
4353 566, 567, 568, 112, 0, 0, 0, 0, 0, 113,
4354 113, 1114, 1114, 1194, 0, 1114, 0, 101, 0, 0,
4355 101, 101, 112, 0, 113, 0, 101, 0, 0, 84,
4356 0, 0, 1114, 0, 569, 0, 0, 570, 1202, 0,
4357 101, 0, 0, 101, 0, 0, 84, 0, 0, 0,
4358 0, 84, 84, 0, 0, 0, 0, 84, 84, 0,
4359 113, 113, 247, 0, 113, 0, 84, 84, 1114, 113,
4360 0, 0, 112, 0, 112, 112, 112, 112, 0, 112,
4361 112, 0, 84, 0, 101, 0, 0, 0, 0, 0,
4362 0, 1114, 0, 0, 1114, 0, 0, 0, 101, 0,
4363 112, 84, 0, 0, 0, 0, 0, 0, 1114, 0,
4364 1114, 0, 1292, 1114, 1114, 0, 0, 0, 1114, 1114,
4365 0, 0, 0, 0, 84, 84, 84, 0, 0, 0,
4366 0, 0, 0, 0, 0, 0, 0, 112, 0, 0,
4367 112, 84, 0, 0, 0, 0, 112, 112, 112, 0,
4368 0, 0, 247, 0, 0, 0, 0, 0, 84, 247,
4369 247, 0, 112, 0, 101, 685, 647, 0, 0, 686,
4370 0, 0, 0, 1333, 1114, 0, 0, 0, 0, 0,
4371 0, 0, 0, 0, 0, 0, 0, 113, 112, 188,
4372 189, 190, 191, 192, 193, 194, 195, 196, 0, 0,
4373 197, 198, 0, 101, 0, 0, 199, 200, 201, 202,
4374 112, 0, 113, 0, 113, 0, 0, 113, 113, 0,
4375 203, 204, 0, 113, 0, 1114, 0, 0, 0, 1114,
4376 0, 1114, 0, 0, 0, 0, 0, 84, 0, 0,
4377 84, 84, 113, 0, 0, 112, 84, 0, 0, 0,
4378 205, 206, 207, 208, 209, 210, 211, 212, 213, 214,
4379 84, 215, 216, 84, 112, 0, 0, 0, 0, 217,
4380 255, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4381 0, 0, 84, 0, 0, 112, 0, 0, 0, 0,
4382 1114, 112, 113, 0, 113, 113, 113, 113, 0, 113,
4383 113, 0, 0, 0, 84, 0, 0, 0, 0, 0,
4384 0, 0, 0, 0, 0, 0, 0, 0, 84, 0,
4385 113, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4386 0, 112, 112, 0, 112, 112, 0, 0, 0, 0,
4387 0, 0, 0, 112, 0, 0, 0, 0, 112, 0,
4388 0, 0, 0, 0, 0, 0, 0, 113, 0, 0,
4389 113, 0, 0, 0, 0, 0, 113, 113, 113, 0,
4390 0, 0, 84, 0, 0, 0, 0, 0, 0, 84,
4391 84, 0, 113, 0, 84, 0, 1115, 1115, 0, 0,
4392 0, 0, 112, 0, 112, 0, 0, 0, 0, 0,
4393 0, 0, 112, 0, 0, 0, 0, 0, 113, 0,
4394 0, 0, 0, 112, 0, 112, 112, 0, 0, 0,
4395 0, 0, 0, 84, 0, 0, 112, 112, 0, 0,
4396 113, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4397 0, 1115, 1115, 0, 0, 1115, 0, 0, 0, 0,
4398 0, 0, 112, 0, 0, 0, 0, 0, 0, 0,
4399 112, 0, 1115, 0, 0, 113, 0, 0, 0, 0,
4400 0, 0, 0, 0, 80, 0, 0, 0, 0, 0,
4401 0, 0, 0, 0, 113, 0, 0, 0, 80, 80,
4402 0, 1116, 1116, 0, 0, 0, 0, 0, 1115, 0,
4403 0, 0, 0, 0, 0, 113, 0, 0, 0, 0,
4404 0, 113, 0, 0, 0, 0, 0, 0, 0, 0,
4405 0, 1115, 0, 0, 1115, 80, 80, 0, 0, 306,
4406 0, 0, 0, 0, 0, 0, 0, 0, 1115, 0,
4407 1115, 0, 0, 1115, 1115, 0, 1116, 1116, 1115, 1115,
4408 1116, 113, 113, 0, 113, 113, 0, 0, 0, 0,
4409 0, 0, 306, 113, 0, 0, 0, 1116, 113, 0,
4410 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4411 0, 306, 306, 306, 0, 80, 0, 0, 0, 0,
4412 0, 0, 112, 0, 112, 112, 0, 0, 0, 0,
4413 0, 0, 0, 1116, 1115, 0, 0, 0, 0, 0,
4414 0, 0, 113, 0, 113, 0, 0, 0, 0, 0,
4415 0, 0, 113, 0, 0, 0, 1116, 0, 0, 1116,
4416 0, 0, 0, 113, 0, 113, 113, 0, 0, 0,
4417 0, 0, 0, 1116, 0, 1116, 113, 113, 1116, 1116,
4418 0, 0, 0, 1116, 1116, 1115, 0, 0, 0, 1115,
4419 112, 1115, 0, 0, 0, 0, 0, 0, 0, 0,
4420 0, 0, 113, 0, 0, 0, 0, 112, 0, 0,
4421 113, 0, 112, 112, 0, 0, 1117, 1117, 112, 112,
4422 0, 0, 0, 0, 0, 0, 0, 112, 112, 0,
4423 0, 0, 0, 80, 0, 0, 0, 0, 0, 1116,
4424 0, 0, 0, 112, 0, 0, 0, 0, 0, 0,
4425 1115, 0, 0, 0, 0, 0, 0, 0, 80, 0,
4426 80, 0, 112, 0, 0, 0, 0, 0, 0, 80,
4427 0, 1117, 1117, 0, 0, 1117, 0, 0, 0, 0,
4428 0, 0, 0, 0, 0, 112, 112, 112, 80, 0,
4429 1116, 0, 1117, 0, 1116, 0, 1116, 0, 0, 0,
4430 0, 0, 112, 0, 22, 23, 24, 25, 306, 0,
4431 0, 0, 0, 0, 0, 0, 0, 0, 0, 112,
4432 31, 32, 33, 0, 0, 0, 0, 0, 1117, 0,
4433 40, 41, 42, 43, 44, 0, 0, 0, 80, 0,
4434 1118, 1118, 113, 0, 113, 113, 0, 0, 0, 0,
4435 0, 1117, 0, 0, 1117, 1116, 0, 0, 0, 0,
4436 0, 0, 0, 0, 0, 0, 80, 306, 1117, 0,
4437 1117, 0, 0, 1117, 1117, 0, 0, 0, 1117, 1117,
4438 0, 57, 58, 59, 60, 61, 62, 63, 64, 65,
4439 0, 0, 0, 0, 0, 1118, 1118, 0, 112, 1118,
4440 0, 112, 112, 80, 0, 0, 80, 112, 0, 0,
4441 113, 0, 0, 80, 80, 0, 1118, 0, 304, 0,
4442 0, 112, 0, 0, 112, 1119, 1119, 113, 0, 0,
4443 0, 0, 113, 113, 1117, 0, 0, 0, 113, 113,
4444 0, 0, 0, 112, 0, 0, 0, 113, 113, 0,
4445 0, 0, 1118, 0, 80, 0, 0, 0, 0, 0,
4446 0, 0, 0, 113, 0, 112, 0, 0, 0, 0,
4447 0, 0, 0, 0, 0, 1118, 80, 0, 1118, 112,
4448 1119, 1119, 113, 0, 1119, 1117, 0, 0, 0, 1117,
4449 0, 1117, 1118, 0, 1118, 0, 0, 1118, 1118, 0,
4450 0, 1119, 1118, 1118, 0, 113, 113, 113, 0, 0,
4451 0, 80, 0, 0, 0, 0, 0, 81, 0, 0,
4452 0, 0, 113, 0, 0, 0, 0, 0, 306, 0,
4453 80, 81, 81, 112, 0, 0, 0, 1119, 0, 113,
4454 112, 112, 0, 0, 0, 112, 0, 0, 0, 0,
4455 1117, 80, 0, 0, 0, 0, 0, 80, 1118, 0,
4456 1119, 0, 0, 1119, 0, 0, 0, 0, 81, 81,
4457 0, 0, 307, 0, 0, 0, 0, 1119, 0, 1119,
4458 0, 0, 1119, 1119, 112, 0, 0, 1119, 1119, 0,
4459 0, 0, 0, 0, 0, 0, 0, 0, 80, 0,
4460 0, 80, 0, 0, 0, 307, 0, 0, 0, 1118,
4461 0, 306, 0, 1118, 80, 1118, 0, 0, 113, 0,
4462 0, 113, 113, 0, 307, 307, 307, 113, 81, 0,
4463 0, 1120, 1120, 0, 0, 0, 0, 0, 0, 0,
4464 0, 113, 0, 1119, 113, 0, 0, 0, 0, 0,
4465 0, 0, 0, 0, 0, 0, 0, 0, 80, 0,
4466 80, 0, 0, 113, 0, 1121, 1121, 0, 80, 0,
4467 0, 0, 0, 0, 1118, 0, 0, 0, 0, 80,
4468 0, 80, 0, 0, 0, 113, 1120, 1120, 0, 0,
4469 1120, 0, 80, 80, 1119, 0, 0, 0, 1119, 113,
4470 1119, 0, 0, 0, 0, 0, 0, 1120, 0, 0,
4471 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4472 1121, 1121, 0, 0, 1121, 0, 80, 0, 0, 0,
4473 0, 0, 306, 0, 0, 0, 0, 0, 0, 0,
4474 0, 1121, 0, 1120, 0, 0, 81, 0, 0, 0,
4475 0, 0, 0, 113, 0, 0, 0, 0, 0, 1119,
4476 113, 113, 0, 0, 0, 113, 1120, 0, 0, 1120,
4477 0, 81, 0, 81, 0, 0, 0, 1121, 0, 0,
4478 0, 0, 81, 1120, 0, 1120, 0, 0, 1120, 1120,
4479 0, 0, 0, 1120, 1120, 938, 0, 0, 0, 0,
4480 1121, 81, 0, 1121, 113, 0, 0, 0, 306, 0,
4481 0, 0, 0, 0, 0, 0, 0, 1121, 0, 1121,
4482 0, 307, 1121, 1121, 0, 0, 0, 1121, 1121, 368,
4483 369, 370, 371, 372, 373, 374, 375, 376, 377, 378,
4484 379, 380, 0, 0, 0, 0, 381, 382, 0, 1120,
4485 0, 81, 0, 0, 0, 0, 0, 0, 0, 0,
4486 0, 80, 0, 0, 0, 0, 0, 0, 0, 0,
4487 0, 0, 0, 0, 0, 0, 0, 0, 0, 81,
4488 307, 0, 0, 1121, 141, 0, 384, 0, 385, 386,
4489 387, 388, 389, 390, 391, 392, 393, 394, 0, 0,
4490 1120, 0, 0, 0, 1120, 0, 1120, 0, 0, 0,
4491 0, 0, 0, 0, 0, 0, 81, 0, 0, 81,
4492 0, 0, 0, 0, 0, 0, 81, 81, 0, 0,
4493 0, 0, 0, 0, 1121, 141, 141, 0, 1121, 313,
4494 1121, 0, 0, 80, 0, 0, 0, 0, 80, 80,
4495 0, 0, 0, 0, 80, 80, 0, 0, 0, 0,
4496 0, 0, 0, 80, 0, 1120, 0, 81, 0, 0,
4497 0, 0, 313, 0, 0, 0, 0, 0, 0, 80,
4498 0, 0, 0, 0, 0, 0, 0, 0, 0, 81,
4499 0, 422, 432, 432, 0, 0, 0, 0, 80, 1121,
4500 0, 0, 0, 0, 638, 639, 0, 0, 640, 0,
4501 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4502 0, 80, 80, 80, 81, 0, 0, 0, 188, 189,
4503 190, 191, 192, 193, 194, 195, 196, 0, 80, 197,
4504 198, 307, 0, 81, 0, 199, 200, 201, 202, 0,
4505 0, 0, 0, 0, 0, 80, 0, 0, 0, 203,
4506 204, 0, 0, 0, 81, 0, 0, 0, 0, 0,
4507 81, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4508 0, 0, 0, 0, 0, 0, 0, 0, 0, 205,
4509 206, 207, 208, 209, 210, 211, 212, 213, 214, 0,
4510 215, 216, 0, 0, 0, 0, 0, 0, 217, 0,
4511 0, 81, 137, 141, 81, 0, 0, 0, 0, 0,
4512 0, 0, 0, 0, 307, 0, 0, 81, 0, 0,
4513 306, 0, 0, 0, 80, 0, 0, 80, 80, 0,
4514 0, 0, 0, 80, 0, 0, 0, 0, 0, 141,
4515 0, 0, 0, 0, 0, 0, 0, 80, 0, 0,
4516 80, 0, 0, 137, 137, 0, 0, 311, 141, 0,
4517 0, 81, 0, 81, 0, 0, 0, 0, 0, 0,
4518 0, 81, 0, 0, 0, 0, 0, 0, 313, 0,
4519 0, 0, 81, 0, 81, 0, 0, 0, 0, 0,
4520 311, 80, 0, 0, 0, 81, 81, 0, 0, 0,
4521 0, 0, 0, 0, 0, 80, 0, 0, 141, 420,
4522 430, 430, 430, 0, 0, 0, 0, 0, 0, 306,
4523 0, 0, 0, 0, 0, 0, 0, 0, 0, 81,
4524 0, 0, 0, 0, 0, 307, 141, 313, 0, 0,
4525 0, 0, 0, 91, 0, 0, 0, 0, 0, 0,
4526 0, 0, 0, 0, 0, 0, 0, 0, 0, 80,
4527 368, 369, 370, 371, 372, 373, 374, 375, 0, 377,
4528 378, 80, 0, 0, 0, 0, 141, 381, 382, 0,
4529 306, 0, 0, 141, 141, 0, 0, 0, 0, 0,
4530 0, 0, 0, 0, 91, 91, 0, 0, 0, 0,
4531 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4532 80, 307, 0, 0, 0, 0, 0, 0, 0, 385,
4533 386, 387, 388, 389, 390, 391, 392, 393, 394, 0,
4534 0, 137, 0, 0, -815, 0, 0, 0, 0, 0,
4535 0, 0, -815, -815, -815, 0, 0, -815, -815, -815,
4536 417, -815, 0, 0, 0, 0, 0, 0, 0, -815,
4537 -815, -815, 0, 0, 81, 0, 140, 137, 0, 0,
4538 0, -815, -815, 0, -815, -815, -815, -815, -815, 0,
4539 0, 141, 0, 0, 0, 0, 137, 0, 0, 0,
4540 0, 0, 0, 0, 0, 0, 0, 0, 313, 0,
4541 0, 0, -815, -815, 0, 0, 311, 0, 0, 0,
4542 0, 0, 0, 0, 0, 0, 0, 140, 140, 0,
4543 0, 141, 0, 0, 0, 0, 0, 141, 0, 0,
4544 0, -815, -815, 0, 0, 0, 137, 0, 0, 0,
4545 0, 0, 0, 0, 0, 0, 81, 0, 0, 0,
4546 0, 81, 81, 0, -815, 0, 0, 81, 81, 0,
4547 0, 0, 0, 0, 137, 311, 81, 0, 141, 0,
4548 0, 141, 91, 0, 0, 0, 0, 0, 0, 0,
4549 0, 313, 81, 0, 816, -815, -815, 0, -815, 0,
4550 0, 255, -815, 0, -815, 0, 0, 0, 0, 0,
4551 0, 81, 0, 0, 137, 0, 0, 0, 91, 0,
4552 0, 137, 137, 0, 0, 0, 0, 0, 0, 0,
4553 0, 0, 0, 0, 81, 81, 81, 91, 141, 0,
4554 141, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4555 0, 81, 0, 0, 0, 0, 0, 0, 0, 0,
4556 0, 141, 0, 0, 0, 0, 0, 0, 81, 0,
4557 0, 0, 816, 816, 0, 0, 0, 0, 0, 0,
4558 0, 0, 0, 0, 0, 0, 0, 91, 0, 0,
4559 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4560 0, 0, 0, 0, 0, 140, 816, 0, 0, 0,
4561 0, 0, 313, 0, 0, 91, 0, 0, 0, 137,
4562 0, 896, 0, 0, 0, 0, 0, 0, 0, 0,
4563 0, 0, 0, 0, 0, 0, 311, 0, 0, 0,
4564 0, 140, 0, 307, 0, 0, 0, 81, 0, 0,
4565 81, 81, 0, 0, 0, 91, 81, 0, 0, 137,
4566 140, 0, 91, 91, 0, 137, 0, 0, 0, 0,
4567 81, 0, 0, 81, 22, 23, 24, 25, 0, 0,
4568 0, 0, 0, 0, 0, 0, 0, 0, 313, 0,
4569 31, 32, 33, 1079, 0, 0, 0, 1080, 0, 0,
4570 40, 41, 42, 43, 44, 0, 137, 0, 0, 137,
4571 140, 0, 0, 0, 81, 0, 0, 0, 0, 311,
4572 0, 0, 0, 0, 0, 0, 0, 0, 81, 0,
4573 0, 0, 1082, 1083, 0, 0, 0, 0, 140, 0,
4574 1084, 141, 307, 1085, 0, 1086, 1087, 0, 1088, 0,
4575 0, 57, 58, 59, 60, 61, 62, 63, 64, 65,
4576 91, 0, 0, 0, 0, 0, 137, 0, 137, 0,
4577 0, 0, 0, 0, 0, 0, 0, 0, 140, 0,
4578 0, 1090, 81, 646, 647, 140, 140, 648, 304, 137,
4579 0, 0, 0, 0, 81, 259, 0, 0, 0, 0,
4580 91, 0, 0, 307, 0, 0, 91, 188, 189, 190,
4581 191, 192, 193, 194, 195, 196, 0, 0, 197, 198,
4582 0, 0, 0, 0, 199, 200, 201, 202, 816, 816,
4583 0, 0, 0, 81, 816, 816, 0, 0, 203, 204,
4584 311, 0, 0, 141, 0, 0, 0, 91, 0, 0,
4585 91, 0, 0, 0, 0, 0, 0, 0, 0, 141,
4586 0, 0, 0, 810, 0, 0, 0, 0, 205, 206,
4587 207, 208, 209, 210, 211, 212, 213, 214, 141, 215,
4588 216, 0, 0, 140, 0, 0, 0, 217, 368, 369,
4589 370, 371, 372, 373, 374, 375, 376, 377, 378, 379,
4590 380, 141, 141, 816, 0, 381, 382, 91, 0, 91,
4591 0, 0, 0, 0, 0, 0, 311, 0, 816, 0,
4592 0, 0, 0, 140, 0, 0, 0, 0, 0, 140,
4593 91, 0, 0, 0, 0, 141, 0, 0, 0, 0,
4594 0, 810, 810, 0, 0, 384, 0, 385, 386, 387,
4595 388, 389, 390, 391, 392, 393, 394, 0, 0, 0,
4596 0, 0, 0, 0, 259, 0, 0, 0, 0, 137,
4597 140, 0, 0, 140, 0, 810, 0, 22, 23, 24,
4598 25, 0, 0, 0, 0, 0, 140, 0, 0, 0,
4599 0, 0, 0, 31, 32, 33, 1079, 0, 0, 0,
4600 1080, 0, 1081, 40, 41, 42, 43, 44, 0, 0,
4601 1197, 0, 0, 0, 141, 0, 0, 141, 141, 0,
4602 0, 0, 563, 141, 0, 0, 0, 0, 0, 0,
4603 140, 0, 140, 0, 0, 1082, 1083, 141, 0, 0,
4604 141, 0, 0, 1084, 0, 0, 1085, 0, 1086, 1087,
4605 0, 1088, 567, 140, 57, 58, 1089, 60, 61, 62,
4606 63, 64, 65, 0, 140, 140, 0, 0, 0, 0,
4607 0, 137, 0, 0, 0, 0, 0, 0, 0, 0,
4608 0, 141, 0, 0, 1090, 0, 0, 137, 0, 0,
4609 0, 304, 0, 0, 0, 141, 0, 0, 140, 0,
4610 0, 0, 0, 0, 0, 0, 137, 0, 0, 432,
4611 91, 0, 239, 239, 368, 369, 370, 371, 372, 373,
4612 374, 375, 376, 377, 378, 379, 380, 0, 0, 137,
4613 137, 381, 382, 0, 0, 0, 0, 0, 0, 0,
4614 0, 0, 0, 0, 276, 280, 281, 282, 0, 0,
4615 0, 239, 239, 0, 0, 0, 0, 0, 0, 0,
4616 0, 141, 0, 137, 329, 330, 0, 0, 0, 0,
4617 432, 384, 0, 385, 386, 387, 388, 389, 390, 391,
4618 392, 393, 394, 0, 0, 0, 0, 0, 0, 0,
4619 0, 0, 0, 0, 0, 0, 0, 810, 810, 0,
4620 141, 0, 0, 810, 810, 0, 0, 0, 0, 239,
4621 0, 0, 91, 0, 368, 369, 370, 371, 372, 373,
4622 374, 375, 376, 377, 378, -816, -816, 0, 91, 0,
4623 0, 381, 382, 140, 0, 0, 0, 0, 1195, 0,
4624 0, 0, 137, 0, 0, 137, 137, 91, 0, 0,
4625 0, 137, 0, 0, 0, 0, 0, 0, 0, 0,
4626 0, 0, 0, 0, 0, 137, 0, 0, 137, 0,
4627 91, 91, 810, 385, 386, 387, 388, 389, 390, 391,
4628 392, 393, 394, 0, 0, 0, 0, 810, 0, 0,
4629 0, 0, 0, 0, 0, 0, 368, -816, -816, -816,
4630 -816, 373, 374, 0, 91, -816, -816, 0, 0, 137,
4631 0, 0, 0, 381, 382, 0, 0, 0, 0, 0,
4632 140, 140, 0, 137, 0, 239, 140, 140, 239, 239,
4633 239, 0, 329, 0, 0, 140, 0, 430, 0, 0,
4634 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4635 0, 140, 239, 0, 239, 385, 386, 387, 388, 389,
4636 390, 391, 392, 393, 394, 0, 0, 0, 0, 0,
4637 140, 0, 0, 0, 0, 0, 0, 0, 0, 1193,
4638 0, 0, 0, 91, 0, 0, 91, 91, 0, 137,
4639 0, 0, 91, 140, 140, 140, 0, 0, 430, 0,
4640 0, 0, 0, 0, 0, 0, 91, 0, 0, 91,
4641 140, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4642 0, 0, 0, 0, 0, 0, 0, 140, 137, 0,
4643 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4644 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4645 91, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4646 0, 0, 0, 0, 91, 613, 614, 615, 616, 617,
4647 0, 0, 618, 619, 620, 621, 622, 623, 624, 625,
4648 0, 627, 0, 0, 628, 629, 630, 631, 632, 633,
4649 634, 635, 636, 637, 0, 0, 0, 239, 0, 0,
4650 0, 0, 0, 0, 0, 0, 140, 0, 0, 140,
4651 140, 0, 0, 0, 0, 140, 0, 0, 368, 369,
4652 370, 371, 372, 373, 374, 0, 0, 377, 378, 140,
4653 91, 0, 140, 0, 0, 381, 382, 0, 0, 0,
4654 0, 0, 0, 0, 0, 0, 0, 0, 239, 0,
4655 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4656 0, 0, 0, 0, 0, 239, 239, 0, 0, 91,
4657 239, 0, 0, 140, 239, 0, 282, 385, 386, 387,
4658 388, 389, 390, 391, 392, 393, 394, 140, 0, -797,
4659 0, 0, 0, 0, 716, 0, 0, -797, -797, -797,
4660 0, 0, -797, -797, -797, 0, -797, 0, 0, 239,
4661 0, 0, 239, 0, -797, -797, -797, -797, -797, 0,
4662 0, 0, 0, 0, 239, 0, -797, -797, 0, -797,
4663 -797, -797, -797, -797, 0, 0, 0, 0, 0, 0,
4664 0, 0, 748, 0, 0, 0, 0, 0, 0, 0,
4665 0, 0, 0, 140, 0, 0, 0, -797, -797, 0,
4666 0, 0, 0, 0, 0, 0, 0, -797, -797, -797,
4667 -797, -797, -797, -797, -797, -797, -797, -797, -797, -797,
4668 0, 0, 0, 239, -797, -797, -797, -797, 0, 878,
4669 -797, 780, 140, 0, 780, -797, 0, 0, 0, 0,
4670 0, 0, 0, 239, 0, 0, 0, 0, 811, -797,
4671 0, 0, -797, 0, 0, 0, 0, 0, 0, 0,
4672 0, 0, 0, -146, -797, -797, -797, -797, -797, -797,
4673 -797, -797, -797, -797, -797, -797, 0, 0, 0, 0,
4674 -797, -797, -797, -797, -797, 0, 0, -797, -797, -797,
4675 0, 0, 22, 23, 24, 25, 0, 0, 0, 0,
4676 0, 0, 239, 0, 0, 0, 0, 0, 31, 32,
4677 33, 1079, 0, 239, 0, 1080, 0, 0, 40, 41,
4678 42, 43, 44, 0, 0, 0, 870, 870, 0, 0,
4679 239, 870, 0, 0, 0, 0, 0, 0, 0, 0,
4680 0, 0, 870, 870, 0, 0, 239, 0, 239, 0,
4681 1082, 1083, 0, 0, 0, 780, 780, 0, 1084, 0,
4682 870, 1085, 0, 1086, 1087, 0, 1088, 0, 0, 57,
4683 58, 59, 60, 61, 62, 63, 64, 65, 0, 0,
4684 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4685 0, 0, 0, 0, 0, 0, 0, 0, 0, 1090,
4686 0, 0, 0, 0, 239, 0, 304, 0, 0, 0,
4687 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4688 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4689 0, 0, 239, 0, 0, 0, 0, 0, -4, 3,
4690 0, 4, 5, 6, 7, 8, -4, -4, -4, 9,
4691 10, 0, -4, -4, 11, -4, 12, 13, 14, 15,
4692 16, 17, 18, -4, 239, 0, 0, 0, 19, 20,
4693 21, 22, 23, 24, 25, 0, 0, 26, 0, 0,
4694 0, 0, 239, 27, 28, 284, 30, 31, 32, 33,
4695 34, 35, 36, 37, 38, 39, 0, 40, 41, 42,
4696 43, 44, 45, 46, 0, 0, -4, 0, 0, 0,
4697 0, 0, 870, 0, 47, 48, 0, 0, 0, 0,
4698 0, 0, 0, 0, 0, 0, 0, 0, 0, 49,
4699 50, 0, 0, 0, 0, 0, 0, 51, 0, 0,
4700 52, 53, 54, 55, 0, 56, 0, 0, 57, 58,
4701 59, 60, 61, 62, 63, 64, 65, 0, -4, 0,
4702 780, 0, 0, 0, 0, 0, 0, 0, 0, 239,
4703 0, 0, 0, 0, 0, 0, 0, 239, 0, 0,
4704 0, 1029, 870, 870, 0, 66, 67, 68, 870, 870,
4705 -4, 0, 239, 0, 0, 0, -4, 0, 546, 0,
4706 0, 0, 0, 0, 239, 0, 0, 0, 0, 0,
4707 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4708 0, 0, 870, 870, 0, 870, 870, 0, 239, 0,
4709 780, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4710 0, 0, 0, 0, 0, 0, 0, 0, 0, 1070,
4711 1071, 0, 0, 239, 0, 0, 0, 870, 1077, 0,
4712 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4713 0, 0, 870, 0, 0, 0, 0, 0, 0, -815,
4714 3, 0, 4, 5, 6, 7, 8, 0, 239, 0,
4715 9, 10, 0, 0, 0, 11, 870, 12, 13, 14,
4716 15, 16, 17, 18, 0, 0, 0, 0, 0, 19,
4717 20, 21, 22, 23, 24, 25, 0, 0, 26, 0,
4718 0, 0, 0, 0, 27, 28, 284, 30, 31, 32,
4719 33, 34, 35, 36, 37, 38, 39, 0, 40, 41,
4720 42, 43, 44, 45, 46, 0, 0, 0, 0, 0,
4721 0, 0, 0, 0, 0, 47, 48, 0, 0, 0,
4722 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4723 49, 50, 0, 239, 0, 0, 0, 0, 51, 0,
4724 0, 52, 53, 54, 55, 0, 56, 0, 0, 57,
4725 58, 59, 60, 61, 62, 63, 64, 65, 0, -815,
4726 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4727 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4728 0, 0, 0, 0, 0, 0, 66, 67, 68, 0,
4729 0, -815, 3, -815, 4, 5, 6, 7, 8, -815,
4730 0, 0, 9, 10, 0, 0, 0, 11, 0, 12,
4731 13, 14, 15, 16, 17, 18, 0, 0, 0, 0,
4732 0, 19, 20, 21, 22, 23, 24, 25, 0, 0,
4733 26, 0, 0, 0, 0, 0, 27, 28, 29, 30,
4734 31, 32, 33, 34, 35, 36, 37, 38, 39, 0,
4735 40, 41, 42, 43, 44, 45, 46, 0, 0, 0,
4736 0, 0, 0, 239, 0, 0, 0, 47, 48, 0,
4737 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4738 0, 0, 49, 50, 0, 0, 0, 0, 0, 0,
4739 51, 0, 0, 52, 53, 54, 55, 0, 56, 0,
4740 0, 57, 58, 59, 60, 61, 62, 63, 64, 65,
4741 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4742 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4743 0, 0, 0, 0, 0, 0, 0, 0, 66, 67,
4744 68, 0, 0, -4, 3, -815, 4, 5, 6, 7,
4745 8, -815, 0, 0, 9, 10, 0, 0, 0, 11,
4746 0, 12, 13, 14, 15, 16, 17, 18, 0, 0,
4747 0, 0, 0, 19, 20, 21, 22, 23, 24, 25,
4748 0, 0, 26, 0, 0, 0, 0, 0, 27, 28,
4749 29, 30, 31, 32, 33, 34, 35, 36, 37, 38,
4750 39, 0, 40, 41, 42, 43, 44, 45, 46, 0,
4751 0, 0, 0, 0, 0, 0, 0, 0, 0, 47,
4752 48, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4753 0, 0, 0, 0, 49, 50, 0, 0, 0, 0,
4754 0, 0, 51, 0, 0, 52, 53, 54, 55, 0,
4755 56, 0, 0, 57, 58, 59, 60, 61, 62, 63,
4756 64, 65, 0, 0, 0, 0, 0, 0, 0, -695,
4757 0, 0, 0, 0, 0, 0, 0, -695, -695, -695,
4758 0, 0, -695, -695, -695, 0, -695, 0, 0, 0,
4759 66, 67, 68, 0, -695, -4, -695, -695, -695, 0,
4760 0, 0, 0, 546, 0, 0, -695, -695, 0, -695,
4761 -695, -695, -695, -695, 0, 0, 0, 0, 0, 0,
4762 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4763 0, 0, 0, 0, 0, 0, 0, -695, -695, 0,
4764 0, 0, 0, 0, 0, 0, 0, -695, -695, -695,
4765 -695, -695, -695, -695, -695, -695, -695, -695, -695, -695,
4766 0, 0, 0, 0, -695, -695, -695, -695, 0, -695,
4767 -695, 0, 0, 0, 0, -695, 0, 0, 0, 0,
4768 0, 0, 0, 0, 0, 0, 0, 0, 0, -695,
4769 0, 0, -695, 0, 0, 0, 0, 0, 0, 0,
4770 0, 0, 0, -695, -695, -695, -695, -695, -695, -695,
4771 -695, -695, -695, -695, -695, -695, 0, 0, 0, 0,
4772 0, -695, -695, -695, -695, -696, 0, -695, -695, -695,
4773 0, 0, 0, -696, -696, -696, 0, 0, -696, -696,
4774 -696, 0, -696, 0, 0, 0, 0, 0, 0, 0,
4775 -696, 0, -696, -696, -696, 0, 0, 0, 0, 0,
4776 0, 0, -696, -696, 0, -696, -696, -696, -696, -696,
4777 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4778 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4779 0, 0, 0, -696, -696, 0, 0, 0, 0, 0,
4780 0, 0, 0, -696, -696, -696, -696, -696, -696, -696,
4781 -696, -696, -696, -696, -696, -696, 0, 0, 0, 0,
4782 -696, -696, -696, -696, 0, -696, -696, 0, 0, 0,
4783 0, -696, 0, 0, 0, 0, 0, 0, 0, 0,
4784 0, 0, 0, 0, 0, -696, 0, 0, -696, 0,
4785 0, 0, 0, 0, 0, 0, 0, 0, 0, -696,
4786 -696, -696, -696, -696, -696, -696, -696, -696, -696, -696,
4787 -696, -696, 0, 0, 0, 0, 0, -696, -696, -696,
4788 -696, -798, 0, -696, -696, -696, 0, 0, 0, -798,
4789 -798, -798, 0, 0, -798, -798, -798, 0, -798, 0,
4790 0, 0, 0, 0, 0, 0, -798, -798, -798, -798,
4791 -798, 0, 0, 0, 0, 0, 0, 0, -798, -798,
4792 0, -798, -798, -798, -798, -798, 0, 0, 0, 0,
4793 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4794 0, 0, 0, 0, 0, 0, 0, 0, 0, -798,
4795 -798, 0, 0, 0, 0, 0, 0, 0, 0, -798,
4796 -798, -798, -798, -798, -798, -798, -798, -798, -798, -798,
4797 -798, -798, 0, 0, 0, 0, -798, -798, -798, -798,
4798 0, 0, -798, 0, 0, 0, 0, -798, 0, 0,
4799 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4800 0, -798, 0, 0, -798, 0, 0, 0, 0, 0,
4801 0, 0, 0, 0, 0, 0, -798, -798, -798, -798,
4802 -798, -798, -798, -798, -798, -798, -798, -798, 0, 0,
4803 0, 0, -798, -798, -798, -798, -798, -799, 0, -798,
4804 -798, -798, 0, 0, 0, -799, -799, -799, 0, 0,
4805 -799, -799, -799, 0, -799, 0, 0, 0, 0, 0,
4806 0, 0, -799, -799, -799, -799, -799, 0, 0, 0,
4807 0, 0, 0, 0, -799, -799, 0, -799, -799, -799,
4808 -799, -799, 0, 0, 0, 0, 0, 0, 0, 0,
4809 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4810 0, 0, 0, 0, 0, -799, -799, 0, 0, 0,
4811 0, 0, 0, 0, 0, -799, -799, -799, -799, -799,
4812 -799, -799, -799, -799, -799, -799, -799, -799, 0, 0,
4813 0, 0, -799, -799, -799, -799, 0, 0, -799, 0,
4814 0, 0, 0, -799, 0, 0, 0, 0, 0, 0,
4815 0, 0, 0, 0, 0, 0, 0, -799, 0, 0,
4816 -799, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4817 0, 0, -799, -799, -799, -799, -799, -799, -799, -799,
4818 -799, -799, -799, -799, 0, 0, 0, 0, -799, -799,
4819 -799, -799, -799, -510, 0, -799, -799, -799, 0, 0,
4820 0, -510, -510, -510, 0, 0, -510, -510, -510, 0,
4821 -510, 0, 0, 0, 0, 0, 0, 0, -510, -510,
4822 -510, -510, 0, 0, 0, 0, 0, 0, 0, 0,
4823 -510, -510, 0, -510, -510, -510, -510, -510, 0, 0,
4824 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4825 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4826 0, -510, -510, 0, 0, 0, 0, 0, 0, 0,
4827 0, -510, -510, -510, -510, -510, -510, -510, -510, -510,
4828 -510, -510, -510, -510, 0, 0, 0, 0, -510, -510,
4829 -510, -510, 0, 0, -510, 0, 0, 0, 0, -510,
4830 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4831 0, 0, 0, -510, 0, 0, 0, 0, 0, 0,
4832 0, 0, 0, 0, 0, 0, 0, 0, -510, 0,
4833 -510, -510, -510, -510, -510, -510, -510, -510, -510, -510,
4834 0, 0, 0, 0, -510, -510, -510, -510, -510, -350,
4835 255, -510, -510, -510, 0, 0, 0, -350, -350, -350,
4836 0, 0, -350, -350, -350, 0, -350, 0, 0, 0,
4837 0, 0, 0, 0, -350, 0, -350, -350, -350, 0,
4838 0, 0, 0, 0, 0, 0, -350, -350, 0, -350,
4839 -350, -350, -350, -350, 0, 0, 0, 0, 0, 0,
4840 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4841 0, 0, 0, 0, 0, 0, 0, -350, -350, 0,
4842 0, 0, 0, 0, 0, 0, 0, -350, -350, -350,
4843 -350, -350, -350, -350, -350, -350, -350, -350, -350, -350,
4844 0, 0, 0, 0, -350, -350, -350, -350, 0, 0,
4845 -350, 0, 0, 0, 0, -350, 0, 0, 0, 0,
4846 0, 0, 0, 0, 0, 0, 0, 0, 0, -350,
4847 0, 0, -350, 0, 0, 0, 0, 0, 0, 0,
4848 0, 0, 0, 0, -350, -350, -350, -350, -350, -350,
4849 -350, -350, -350, -350, -350, -350, 0, 0, 0, 0,
4850 0, -350, -350, -350, -350, -815, 0, -350, -350, -350,
4851 0, 0, 0, -815, -815, -815, 0, 0, -815, -815,
4852 -815, 0, -815, 0, 0, 0, 0, 0, 0, 0,
4853 -815, -815, -815, -815, 0, 0, 0, 0, 0, 0,
4854 0, 0, -815, -815, 0, -815, -815, -815, -815, -815,
4855 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4856 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4857 0, 0, 0, -815, -815, 0, 0, 0, 0, 0,
4858 0, 0, 0, -815, -815, -815, -815, -815, -815, -815,
4859 -815, -815, -815, -815, -815, -815, 0, 0, 0, 0,
4860 -815, -815, -815, -815, 0, 0, -815, 0, 0, 0,
4861 0, -815, 0, 0, 0, 0, 0, 0, 0, 0,
4862 0, 0, 0, 0, 0, -815, 0, 0, 0, 0,
4863 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4864 -815, 0, -815, -815, -815, -815, -815, -815, -815, -815,
4865 -815, -815, 0, 0, 0, 0, -815, -815, -815, -815,
4866 -815, -356, 255, -815, -815, -815, 0, 0, 0, -356,
4867 -356, -356, 0, 0, -356, -356, -356, 0, -356, 0,
4868 0, 0, 0, 0, 0, 0, -356, 0, -356, -356,
4869 0, 0, 0, 0, 0, 0, 0, 0, -356, -356,
4870 0, -356, -356, -356, -356, -356, 0, 0, 0, 0,
4871 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4872 0, 0, 0, 0, 0, 0, 0, 0, 0, -356,
4873 -356, 0, 0, 0, 0, 0, 0, 0, 0, -356,
4874 -356, -356, -356, -356, -356, -356, -356, -356, -356, -356,
4875 -356, -356, 0, 0, 0, 0, -356, -356, -356, -356,
4876 0, 879, -356, 0, 0, 0, 0, -356, 0, 0,
4877 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4878 0, -356, 0, 0, 0, 0, 0, 0, 0, 0,
4879 0, 0, 0, 0, 0, -147, -356, 0, -356, -356,
4880 -356, -356, -356, -356, -356, -356, -356, -356, 0, 0,
4881 0, 0, 822, -356, -356, -356, -356, -363, 0, -356,
4882 -356, -356, 0, 0, 0, -363, -363, -363, 0, 0,
4883 -363, -363, -363, 0, -363, 0, 0, 0, 0, 0,
4884 0, 0, -363, 0, -363, -363, 0, 0, 0, 0,
4885 0, 0, 0, 0, -363, -363, 0, -363, -363, -363,
4886 -363, -363, 0, 0, 0, 0, 0, 0, 0, 0,
4887 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4888 0, 0, 0, 0, 0, -363, -363, 0, 0, 0,
4889 0, 0, 0, 0, 0, -363, -363, -363, -363, -363,
4890 -363, -363, -363, -363, -363, -363, -363, -363, 0, 0,
4891 0, 0, -363, -363, -363, -363, 0, 0, -363, 0,
4892 0, 0, 0, -363, 0, 0, 0, 0, 0, 0,
4893 0, 0, 0, 0, 0, 0, 0, -363, 0, 0,
4894 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4895 0, 0, -363, 0, -363, -363, -363, -363, -363, -363,
4896 -363, -363, -363, -363, 0, 0, 0, 0, 0, -363,
4897 -363, -363, -363, -797, 451, -363, -363, -363, 0, 0,
4898 0, -797, -797, -797, 0, 0, 0, -797, -797, 0,
4899 -797, 0, 0, 0, 0, 0, 0, 0, -797, -797,
4900 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4901 -797, -797, 0, -797, -797, -797, -797, -797, 0, 0,
4902 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4903 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4904 0, -797, -797, 0, 0, 0, 0, 0, 0, 0,
4905 0, -797, -797, -797, -797, -797, -797, -797, -797, -797,
4906 -797, -797, -797, -797, 0, 0, 0, 0, -797, -797,
4907 -797, -797, 0, 820, -797, 0, 0, 0, 0, 0,
4908 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4909 0, 0, 0, -797, 0, 0, 0, 0, 0, 0,
4910 0, 0, 0, 0, 0, 0, 0, -146, -797, 0,
4911 -797, -797, -797, -797, -797, -797, -797, -797, -797, -797,
4912 0, 0, 0, 0, -797, -797, -797, -797, -137, -797,
4913 0, -797, 0, -797, 0, 0, 0, -797, -797, -797,
4914 0, 0, 0, -797, -797, 0, -797, 0, 0, 0,
4915 0, 0, 0, 0, -797, -797, 0, 0, 0, 0,
4916 0, 0, 0, 0, 0, 0, -797, -797, 0, -797,
4917 -797, -797, -797, -797, 0, 0, 0, 0, 0, 0,
4918 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4919 0, 0, 0, 0, 0, 0, 0, -797, -797, 0,
4920 0, 0, 0, 0, 0, 0, 0, -797, -797, -797,
4921 -797, -797, -797, -797, -797, -797, -797, -797, -797, -797,
4922 0, 0, 0, 0, -797, -797, -797, -797, 0, 820,
4923 -797, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4924 0, 0, 0, 0, 0, 0, 0, 0, 0, -797,
4925 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4926 0, 0, 0, -146, -797, 0, -797, -797, -797, -797,
4927 -797, -797, -797, -797, -797, -797, 0, 0, 0, 0,
4928 -797, -797, -797, -797, -797, -356, 0, -797, 0, -797,
4929 0, 0, 0, -356, -356, -356, 0, 0, 0, -356,
4930 -356, 0, -356, 0, 0, 0, 0, 0, 0, 0,
4931 -356, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4932 0, 0, -356, -356, 0, -356, -356, -356, -356, -356,
4933 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4934 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4935 0, 0, 0, -356, -356, 0, 0, 0, 0, 0,
4936 0, 0, 0, -356, -356, -356, -356, -356, -356, -356,
4937 -356, -356, -356, -356, -356, -356, 0, 0, 0, 0,
4938 -356, -356, -356, -356, 0, 821, -356, 0, 0, 0,
4939 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4940 0, 0, 0, 0, 0, -356, 0, 0, 0, 0,
4941 0, 0, 0, 0, 0, 0, 0, 0, 0, -147,
4942 -356, 0, -356, -356, -356, -356, -356, -356, -356, -356,
4943 -356, -356, 0, 0, 0, 0, 822, -356, -356, -356,
4944 -138, -356, 0, -356, 0, -356, 0, 0, 0, -356,
4945 -356, -356, 0, 0, 0, -356, -356, 0, -356, 0,
4946 0, 0, 0, 0, 0, 0, -356, 0, 0, 0,
4947 0, 0, 0, 0, 0, 0, 0, 0, -356, -356,
4948 0, -356, -356, -356, -356, -356, 0, 0, 0, 0,
4949 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4950 0, 0, 0, 0, 0, 0, 0, 0, 0, -356,
4951 -356, 0, 0, 0, 0, 0, 0, 0, 0, -356,
4952 -356, -356, -356, -356, -356, -356, -356, -356, -356, -356,
4953 -356, -356, 0, 0, 0, 0, -356, -356, -356, -356,
4954 0, 821, -356, 0, 0, 0, 0, 0, 0, 0,
4955 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4956 0, -356, 0, 0, 0, 0, 0, 0, 0, 0,
4957 0, 0, 0, 0, 0, -147, -356, 0, -356, -356,
4958 -356, -356, -356, -356, -356, -356, -356, -356, 0, 0,
4959 0, 0, 822, -356, -356, -356, -356, 0, 0, -356,
4960 3, -356, 4, 5, 6, 7, 8, -815, -815, -815,
4961 9, 10, 0, 0, -815, 11, 0, 12, 13, 14,
4962 15, 16, 17, 18, 0, 0, 0, 0, 0, 19,
4963 20, 21, 22, 23, 24, 25, 0, 0, 26, 0,
4964 0, 0, 0, 0, 27, 28, 284, 30, 31, 32,
4965 33, 34, 35, 36, 37, 38, 39, 0, 40, 41,
4966 42, 43, 44, 45, 46, 0, 0, -815, 0, 0,
4967 0, 0, 0, 0, 0, 47, 48, 0, 0, 0,
4968 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4969 49, 50, 0, 0, 0, 0, 0, 0, 51, 0,
4970 0, 52, 53, 54, 55, 0, 56, 0, 0, 57,
4971 58, 59, 60, 61, 62, 63, 64, 65, 0, 0,
4972 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4973 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4974 0, 0, 0, 0, 0, 0, 66, 67, 68, 0,
4975 0, 0, 3, -815, 4, 5, 6, 7, 8, -815,
4976 0, -815, 9, 10, 0, -815, -815, 11, 0, 12,
4977 13, 14, 15, 16, 17, 18, 0, 0, 0, 0,
4978 0, 19, 20, 21, 22, 23, 24, 25, 0, 0,
4979 26, 0, 0, 0, 0, 0, 27, 28, 284, 30,
4980 31, 32, 33, 34, 35, 36, 37, 38, 39, 0,
4981 40, 41, 42, 43, 44, 45, 46, 0, 0, -815,
4982 0, 0, 0, 0, 0, 0, 0, 47, 48, 0,
4983 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4984 0, 0, 49, 50, 0, 0, 0, 0, 0, 0,
4985 51, 0, 0, 52, 53, 54, 55, 0, 56, 0,
4986 0, 57, 58, 59, 60, 61, 62, 63, 64, 65,
4987 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4988 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4989 0, 0, 0, 0, 0, 0, 0, 0, 66, 67,
4990 68, 0, 0, 0, 3, -815, 4, 5, 6, 7,
4991 8, -815, 0, -815, 9, 10, 0, 0, -815, 11,
4992 -815, 12, 13, 14, 15, 16, 17, 18, 0, 0,
4993 0, 0, 0, 19, 20, 21, 22, 23, 24, 25,
4994 0, 0, 26, 0, 0, 0, 0, 0, 27, 28,
4995 284, 30, 31, 32, 33, 34, 35, 36, 37, 38,
4996 39, 0, 40, 41, 42, 43, 44, 45, 46, 0,
4997 0, -815, 0, 0, 0, 0, 0, 0, 0, 47,
4998 48, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4999 0, 0, 0, 0, 49, 50, 0, 0, 0, 0,
5000 0, 0, 51, 0, 0, 52, 53, 54, 55, 0,
5001 56, 0, 0, 57, 58, 59, 60, 61, 62, 63,
5002 64, 65, 0, 0, 0, 0, 0, 0, 0, 0,
5003 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5004 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5005 66, 67, 68, 0, 0, 0, 3, -815, 4, 5,
5006 6, 7, 8, -815, 0, -815, 9, 10, 0, 0,
5007 -815, 11, 0, 12, 13, 14, 15, 16, 17, 18,
5008 -815, 0, 0, 0, 0, 19, 20, 21, 22, 23,
5009 24, 25, 0, 0, 26, 0, 0, 0, 0, 0,
5010 27, 28, 284, 30, 31, 32, 33, 34, 35, 36,
5011 37, 38, 39, 0, 40, 41, 42, 43, 44, 45,
5012 46, 0, 0, -815, 0, 0, 0, 0, 0, 0,
5013 0, 47, 48, 0, 0, 0, 0, 0, 0, 0,
5014 0, 0, 0, 0, 0, 0, 49, 50, 0, 0,
5015 0, 0, 0, 0, 51, 0, 0, 52, 53, 54,
5016 55, 0, 56, 0, 0, 57, 58, 59, 60, 61,
5017 62, 63, 64, 65, 0, 0, 0, 0, 0, 0,
5018 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5019 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5020 0, 0, 66, 67, 68, 0, 0, 0, 3, -815,
5021 4, 5, 6, 7, 8, -815, 0, -815, 9, 10,
5022 0, 0, -815, 11, 0, 12, 13, 14, 15, 16,
5023 17, 18, 0, 0, 0, 0, 0, 19, 20, 21,
5024 22, 23, 24, 25, 0, 0, 26, 0, 0, 0,
5025 0, 0, 27, 28, 284, 30, 31, 32, 33, 34,
5026 35, 36, 37, 38, 39, 0, 40, 41, 42, 43,
5027 44, 45, 46, 0, 0, -815, 0, 0, 0, 0,
5028 0, 0, 0, 47, 48, 0, 0, 0, 0, 0,
5029 0, 0, 0, 0, 0, 0, 0, 0, 49, 50,
5030 0, 0, 0, 0, 0, 0, 51, 0, 0, 52,
5031 53, 54, 55, 0, 56, 0, 0, 57, 58, 59,
5032 60, 61, 62, 63, 64, 65, 0, 0, 0, 0,
5033 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5034 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5035 0, 0, 0, 0, 66, 67, 68, 0, 0, 0,
5036 3, -815, 4, 5, 6, 7, 8, -815, -815, -815,
5037 9, 10, 0, 0, 0, 11, 0, 12, 13, 14,
5038 15, 16, 17, 18, 0, 0, 0, 0, 0, 19,
5039 20, 21, 22, 23, 24, 25, 0, 0, 26, 0,
5040 0, 0, 0, 0, 27, 28, 284, 30, 31, 32,
5041 33, 34, 35, 36, 37, 38, 39, 0, 40, 41,
5042 42, 43, 44, 45, 46, 0, 0, -815, 0, 0,
5043 0, 0, 0, 0, 0, 47, 48, 0, 0, 0,
5044 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5045 49, 50, 0, 0, 0, 0, 0, 0, 51, 0,
5046 0, 52, 53, 54, 55, 0, 56, 0, 0, 57,
5047 58, 59, 60, 61, 62, 63, 64, 65, 0, 0,
5048 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5049 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5050 0, 0, 0, 0, 0, 0, 66, 67, 68, 0,
5051 0, 0, 3, -815, 4, 5, 6, 7, 8, -815,
5052 0, -815, 9, 10, 0, 0, 0, 11, 0, 12,
5053 13, 14, 15, 16, 17, 18, 0, 0, 0, 0,
5054 0, 19, 20, 21, 22, 23, 24, 25, 0, 0,
5055 26, 0, 0, 0, 0, 0, 27, 28, 284, 30,
5056 31, 32, 33, 34, 35, 36, 37, 38, 39, 0,
5057 40, 41, 42, 43, 44, 45, 46, 0, 0, -815,
5058 0, 0, 0, 0, 0, 0, 0, 47, 48, 0,
5059 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5060 0, 0, 49, 50, 0, 0, 0, 0, 0, 0,
5061 51, 0, 0, 52, 53, 54, 55, 0, 56, 0,
5062 0, 57, 58, 59, 60, 61, 62, 63, 64, 65,
5063 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5064 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5065 0, 0, 0, 0, 0, 0, 0, 0, 66, 67,
5066 68, 0, 0, 0, 3, -815, 4, 5, 6, 7,
5067 8, -815, 0, 0, 9, 10, 0, 0, 0, 11,
5068 0, 12, 13, 14, 15, 16, 17, 18, 0, 0,
5069 0, 0, 0, 19, 20, 21, 22, 23, 24, 25,
5070 0, 0, 26, 0, 0, 0, 0, 0, 27, 28,
5071 284, 30, 31, 32, 33, 34, 35, 36, 37, 38,
5072 39, 0, 40, 41, 42, 43, 44, 45, 46, 0,
5073 0, 0, 0, 0, 0, 0, 0, 0, 0, 47,
5074 48, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5075 0, 0, 0, 0, 49, 50, 0, 0, 0, 0,
5076 0, 0, 51, 0, 0, 285, 53, 54, 55, 0,
5077 56, 0, 0, 57, 58, 59, 60, 61, 62, 63,
5078 64, 65, 0, 0, 0, 0, 0, 0, 0, 0,
5079 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5080 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5081 66, 67, 68, 0, 0, 0, 0, -815, 0, 0,
5082 0, -815, 3, -815, 4, 5, 6, 7, 8, 0,
5083 0, 0, 9, 10, 0, 0, 0, 11, 0, 12,
5084 13, 14, 15, 16, 17, 18, 0, 0, 0, 0,
5085 0, 19, 20, 21, 22, 23, 24, 25, 0, 0,
5086 26, 0, 0, 0, 0, 0, 27, 28, 284, 30,
5087 31, 32, 33, 34, 35, 36, 37, 38, 39, 0,
5088 40, 41, 42, 43, 44, 45, 46, 0, 0, 0,
5089 0, 0, 0, 0, 0, 0, 0, 47, 48, 0,
5090 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5091 0, 0, 49, 50, 0, 0, 0, 0, 0, 0,
5092 51, 0, 0, 52, 53, 54, 55, 0, 56, 0,
5093 0, 57, 58, 59, 60, 61, 62, 63, 64, 65,
5094 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5095 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5096 0, 0, 0, 0, 0, 0, 0, 0, 66, 67,
5097 68, 0, 0, 0, 0, -815, 0, 0, 0, -815,
5098 3, -815, 4, 5, 6, 7, 8, 0, 0, 0,
5099 9, 10, 0, 0, 0, 11, 0, 12, 13, 14,
5100 15, 16, 17, 18, 0, 0, 0, 0, 0, 19,
5101 20, 21, 22, 23, 24, 25, 0, 0, 26, 0,
5102 0, 0, 0, 0, 27, 28, 29, 30, 31, 32,
5103 33, 34, 35, 36, 37, 38, 39, 0, 40, 41,
5104 42, 43, 44, 45, 46, 0, 0, 0, 0, 0,
5105 0, 0, 0, 0, 0, 47, 48, 0, 0, 0,
5106 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5107 49, 50, 0, 0, 0, 0, 0, 0, 51, 0,
5108 0, 52, 53, 54, 55, 0, 56, 0, 0, 57,
5109 58, 59, 60, 61, 62, 63, 64, 65, 0, 0,
5110 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5111 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5112 0, 0, 0, 0, 0, 0, 66, 67, 68, 0,
5113 0, -815, 3, -815, 4, 5, 6, 7, 8, -815,
5114 0, 0, 9, 10, 0, 0, 0, 11, 0, 12,
5115 13, 14, 15, 16, 17, 18, 0, 0, 0, 0,
5116 0, 19, 20, 21, 22, 23, 24, 25, 0, 0,
5117 26, 0, 0, 0, 0, 0, 27, 28, 284, 30,
5118 31, 32, 33, 34, 35, 36, 37, 38, 39, 0,
5119 40, 41, 42, 43, 44, 45, 46, 0, 0, 0,
5120 0, 0, 0, 0, 0, 0, 0, 47, 48, 0,
5121 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5122 0, 0, 49, 50, 0, 0, 0, 0, 0, 0,
5123 51, 0, 0, 52, 53, 54, 55, 0, 56, 0,
5124 0, 57, 58, 59, 60, 61, 62, 63, 64, 65,
5125 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5126 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5127 0, 0, 0, 0, 0, 0, 0, 0, 66, 67,
5128 68, 0, 0, -815, 404, -815, 4, 5, 6, 0,
5129 8, -815, 0, 0, 9, 10, 0, 0, 0, 11,
5130 -3, 12, 13, 14, 15, 16, 17, 18, 0, 0,
5131 0, 0, 0, 19, 20, 21, 22, 23, 24, 25,
5132 0, 0, 26, 0, 0, 0, 0, 0, 0, 28,
5133 0, 0, 31, 32, 33, 34, 35, 36, 37, 38,
5134 39, 0, 40, 41, 42, 43, 44, 45, 46, 0,
5135 0, 0, 0, 0, 0, 0, 0, 0, 0, 47,
5136 48, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5137 0, 0, 0, 0, 49, 50, 0, 0, 0, 0,
5138 0, 0, 229, 0, 0, 230, 53, 54, 55, 0,
5139 0, 0, 0, 57, 58, 59, 60, 61, 62, 63,
5140 64, 65, 0, 0, 0, 0, 0, 0, 0, 0,
5141 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5142 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5143 66, 67, 68, 0, 0, 0, 0, 331, 0, 0,
5144 0, 0, 0, 332, 144, 145, 146, 147, 148, 149,
5145 150, 151, 152, 153, 154, 155, 156, 157, 158, 159,
5146 160, 161, 162, 163, 164, 165, 166, 167, 0, 0,
5147 0, 168, 169, 170, 434, 435, 436, 437, 175, 176,
5148 177, 0, 0, 0, 0, 0, 178, 179, 180, 181,
5149 438, 439, 440, 441, 186, 36, 37, 442, 39, 0,
5150 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5151 0, 0, 0, 0, 0, 0, 0, 188, 189, 190,
5152 191, 192, 193, 194, 195, 196, 0, 0, 197, 198,
5153 0, 0, 0, 0, 199, 200, 201, 202, 0, 0,
5154 0, 0, 0, 0, 0, 0, 0, 0, 203, 204,
5155 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5156 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5157 0, 0, 0, 0, 0, 0, 0, 0, 205, 206,
5158 207, 208, 209, 210, 211, 212, 213, 214, 0, 215,
5159 216, 0, 0, 0, 0, 0, 0, 217, 443, 144,
5160 145, 146, 147, 148, 149, 150, 151, 152, 153, 154,
5161 155, 156, 157, 158, 159, 160, 161, 162, 163, 164,
5162 165, 166, 167, 0, 0, 0, 168, 169, 170, 171,
5163 172, 173, 174, 175, 176, 177, 0, 0, 0, 0,
5164 0, 178, 179, 180, 181, 182, 183, 184, 185, 186,
5165 36, 37, 187, 39, 0, 0, 0, 0, 0, 0,
5166 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5167 0, 0, 188, 189, 190, 191, 192, 193, 194, 195,
5168 196, 0, 0, 197, 198, 0, 0, 0, 0, 199,
5169 200, 201, 202, 0, 0, 0, 0, 0, 0, 0,
5170 0, 0, 0, 203, 204, 0, 0, 0, 0, 0,
5171 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5172 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5173 0, 0, 0, 205, 206, 207, 208, 209, 210, 211,
5174 212, 213, 214, 0, 215, 216, 0, 0, 0, 0,
5175 0, 0, 217, 144, 145, 146, 147, 148, 149, 150,
5176 151, 152, 153, 154, 155, 156, 157, 158, 159, 160,
5177 161, 162, 163, 164, 165, 166, 167, 0, 0, 0,
5178 168, 169, 170, 171, 172, 173, 174, 175, 176, 177,
5179 0, 0, 0, 0, 0, 178, 179, 180, 181, 182,
5180 183, 184, 185, 186, 262, 0, 187, 0, 0, 0,
5181 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5182 0, 0, 0, 0, 0, 0, 188, 189, 190, 191,
5183 192, 193, 194, 195, 196, 0, 0, 197, 198, 0,
5184 0, 0, 0, 199, 200, 201, 202, 0, 0, 0,
5185 0, 0, 0, 0, 0, 0, 0, 203, 204, 0,
5186 0, 58, 0, 0, 0, 0, 0, 0, 0, 0,
5187 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5188 0, 0, 0, 0, 0, 0, 0, 205, 206, 207,
5189 208, 209, 210, 211, 212, 213, 214, 0, 215, 216,
5190 0, 0, 0, 0, 0, 0, 217, 144, 145, 146,
5191 147, 148, 149, 150, 151, 152, 153, 154, 155, 156,
5192 157, 158, 159, 160, 161, 162, 163, 164, 165, 166,
5193 167, 0, 0, 0, 168, 169, 170, 171, 172, 173,
5194 174, 175, 176, 177, 0, 0, 0, 0, 0, 178,
5195 179, 180, 181, 182, 183, 184, 185, 186, 0, 0,
5196 187, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5197 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5198 188, 189, 190, 191, 192, 193, 194, 195, 196, 0,
5199 0, 197, 198, 0, 0, 0, 0, 199, 200, 201,
5200 202, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5201 0, 203, 204, 0, 0, 58, 0, 0, 0, 0,
5202 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5203 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5204 0, 205, 206, 207, 208, 209, 210, 211, 212, 213,
5205 214, 0, 215, 216, 0, 0, 0, 0, 0, 0,
5206 217, 144, 145, 146, 147, 148, 149, 150, 151, 152,
5207 153, 154, 155, 156, 157, 158, 159, 160, 161, 162,
5208 163, 164, 165, 166, 167, 0, 0, 0, 168, 169,
5209 170, 171, 172, 173, 174, 175, 176, 177, 0, 0,
5210 0, 0, 0, 178, 179, 180, 181, 182, 183, 184,
5211 185, 186, 0, 0, 187, 0, 0, 0, 0, 0,
5212 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5213 0, 0, 0, 0, 188, 189, 190, 191, 192, 193,
5214 194, 195, 196, 0, 0, 197, 198, 0, 0, 0,
5215 0, 199, 200, 201, 202, 0, 0, 0, 0, 0,
5216 0, 0, 0, 0, 0, 203, 204, 0, 0, 0,
5217 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5218 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5219 0, 0, 0, 0, 0, 205, 206, 207, 208, 209,
5220 210, 211, 212, 213, 214, 0, 215, 216, 4, 5,
5221 6, 0, 8, 0, 217, 0, 9, 10, 0, 0,
5222 0, 11, 0, 12, 13, 14, 270, 271, 17, 18,
5223 0, 0, 0, 0, 0, 19, 20, 272, 22, 23,
5224 24, 25, 0, 0, 227, 0, 0, 0, 0, 0,
5225 0, 302, 0, 0, 31, 32, 33, 34, 35, 36,
5226 37, 38, 39, 0, 40, 41, 42, 43, 44, 45,
5227 46, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5228 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5229 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5230 0, 0, 0, 0, 303, 0, 0, 230, 53, 54,
5231 55, 0, 0, 0, 0, 57, 58, 59, 60, 61,
5232 62, 63, 64, 65, 0, 0, 4, 5, 6, 0,
5233 8, 0, 0, 0, 9, 10, 0, 0, 0, 11,
5234 0, 12, 13, 14, 270, 271, 17, 18, 0, 0,
5235 0, 0, 304, 19, 20, 272, 22, 23, 24, 25,
5236 305, 0, 227, 0, 0, 0, 0, 0, 0, 302,
5237 0, 0, 31, 32, 33, 34, 35, 36, 37, 38,
5238 39, 0, 40, 41, 42, 43, 44, 45, 46, 0,
5239 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5240 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5241 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5242 0, 0, 303, 0, 0, 230, 53, 54, 55, 0,
5243 0, 0, 0, 57, 58, 59, 60, 61, 62, 63,
5244 64, 65, 0, 0, 4, 5, 6, 0, 8, 0,
5245 0, 0, 9, 10, 0, 0, 0, 11, 0, 12,
5246 13, 14, 15, 16, 17, 18, 0, 0, 0, 0,
5247 304, 19, 20, 21, 22, 23, 24, 25, 608, 0,
5248 227, 0, 0, 0, 0, 0, 0, 28, 0, 0,
5249 31, 32, 33, 34, 35, 36, 37, 38, 39, 228,
5250 40, 41, 42, 43, 44, 45, 46, 0, 0, 0,
5251 0, 0, 0, 0, 0, 0, 0, 47, 48, 0,
5252 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5253 0, 0, 49, 50, 0, 0, 0, 0, 0, 0,
5254 229, 0, 0, 230, 53, 54, 55, 0, 231, 232,
5255 233, 57, 58, 234, 60, 61, 62, 63, 64, 65,
5256 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5257 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5258 0, 0, 0, 4, 5, 6, 0, 8, 66, 235,
5259 68, 9, 10, 0, 0, 259, 11, 0, 12, 13,
5260 14, 15, 16, 17, 18, 0, 0, 0, 0, 0,
5261 19, 20, 21, 22, 23, 24, 25, 0, 0, 26,
5262 0, 0, 0, 0, 0, 0, 28, 0, 0, 31,
5263 32, 33, 34, 35, 36, 37, 38, 39, 0, 40,
5264 41, 42, 43, 44, 45, 46, 0, 0, 0, 0,
5265 0, 0, 0, 0, 0, 0, 47, 48, 0, 0,
5266 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5267 0, 49, 50, 0, 0, 0, 0, 0, 0, 229,
5268 0, 0, 230, 53, 54, 55, 0, 0, 0, 0,
5269 57, 58, 59, 60, 61, 62, 63, 64, 65, 0,
5270 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5271 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5272 3, 0, 4, 5, 6, 7, 8, 66, 67, 68,
5273 9, 10, 0, 0, 259, 11, 0, 12, 13, 14,
5274 15, 16, 17, 18, 0, 0, 0, 0, 0, 19,
5275 20, 21, 22, 23, 24, 25, 0, 0, 26, 0,
5276 0, 0, 0, 0, 27, 28, 0, 30, 31, 32,
5277 33, 34, 35, 36, 37, 38, 39, 0, 40, 41,
5278 42, 43, 44, 45, 46, 0, 0, 0, 0, 0,
5279 0, 0, 0, 0, 0, 47, 48, 0, 0, 0,
5280 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5281 49, 50, 0, 0, 0, 0, 0, 0, 51, 0,
5282 0, 52, 53, 54, 55, 0, 56, 0, 0, 57,
5283 58, 59, 60, 61, 62, 63, 64, 65, 0, 0,
5284 404, 0, 4, 5, 6, 0, 8, 0, 0, 0,
5285 9, 10, 0, 0, 0, 11, 0, 12, 13, 14,
5286 15, 16, 17, 18, 0, 0, 66, 67, 68, 19,
5287 20, 21, 22, 23, 24, 25, 0, 0, 26, 0,
5288 0, 0, 0, 0, 0, 28, 0, 0, 31, 32,
5289 33, 34, 35, 36, 37, 38, 39, 0, 40, 41,
5290 42, 43, 44, 45, 46, 0, 0, 0, 0, 0,
5291 0, 0, 0, 0, 0, 47, 48, 0, 0, 0,
5292 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5293 49, 50, 0, 0, 0, 0, 0, 0, 229, 0,
5294 0, 230, 53, 54, 55, 0, 0, 0, 0, 57,
5295 58, 59, 60, 61, 62, 63, 64, 65, 0, 0,
5296 0, 0, 4, 5, 6, 0, 8, 0, 0, 0,
5297 9, 10, 0, 0, 0, 11, 0, 12, 13, 14,
5298 15, 16, 17, 18, 0, 0, 66, 67, 68, 19,
5299 20, 21, 22, 23, 24, 25, 0, 0, 227, 0,
5300 0, 0, 0, 0, 0, 28, 0, 0, 31, 32,
5301 33, 34, 35, 36, 37, 38, 39, 228, 40, 41,
5302 42, 43, 44, 45, 46, 0, 0, 0, 0, 0,
5303 0, 0, 0, 0, 0, 47, 48, 0, 0, 0,
5304 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5305 49, 50, 0, 0, 0, 0, 0, 0, 229, 0,
5306 0, 230, 53, 54, 55, 0, 231, 232, 233, 57,
5307 58, 234, 60, 61, 62, 63, 64, 65, 0, 0,
5308 0, 0, 4, 5, 6, 0, 8, 0, 0, 0,
5309 9, 10, 0, 0, 0, 11, 0, 12, 13, 14,
5310 15, 16, 17, 18, 0, 0, 66, 235, 68, 19,
5311 20, 21, 22, 23, 24, 25, 0, 0, 227, 0,
5312 0, 0, 0, 0, 0, 28, 0, 0, 31, 32,
5313 33, 34, 35, 36, 37, 38, 39, 228, 40, 41,
5314 42, 43, 44, 45, 46, 0, 0, 0, 0, 0,
5315 0, 0, 0, 0, 0, 47, 48, 0, 0, 0,
5316 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5317 49, 479, 0, 0, 0, 0, 0, 0, 229, 0,
5318 0, 230, 53, 54, 55, 0, 231, 232, 233, 57,
5319 58, 234, 60, 61, 62, 63, 64, 65, 0, 0,
5320 0, 0, 4, 5, 6, 0, 8, 0, 0, 0,
5321 9, 10, 0, 0, 0, 11, 0, 12, 13, 14,
5322 270, 271, 17, 18, 0, 0, 66, 235, 68, 19,
5323 20, 272, 22, 23, 24, 25, 0, 0, 227, 0,
5324 0, 0, 0, 0, 0, 28, 0, 0, 31, 32,
5325 33, 34, 35, 36, 37, 38, 39, 228, 40, 41,
5326 42, 43, 44, 45, 46, 0, 0, 0, 0, 0,
5327 0, 0, 0, 0, 0, 47, 48, 0, 0, 0,
5328 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5329 49, 50, 0, 0, 0, 0, 0, 0, 229, 0,
5330 0, 230, 53, 54, 55, 0, 231, 232, 233, 57,
5331 58, 234, 60, 61, 62, 63, 64, 65, 0, 0,
5332 0, 0, 4, 5, 6, 0, 8, 0, 0, 0,
5333 9, 10, 0, 0, 0, 11, 0, 12, 13, 14,
5334 270, 271, 17, 18, 0, 0, 66, 235, 68, 19,
5335 20, 272, 22, 23, 24, 25, 0, 0, 227, 0,
5336 0, 0, 0, 0, 0, 28, 0, 0, 31, 32,
5337 33, 34, 35, 36, 37, 38, 39, 228, 40, 41,
5338 42, 43, 44, 45, 46, 0, 0, 0, 0, 0,
5339 0, 0, 0, 0, 0, 47, 48, 0, 0, 0,
5340 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5341 49, 479, 0, 0, 0, 0, 0, 0, 229, 0,
5342 0, 230, 53, 54, 55, 0, 231, 232, 233, 57,
5343 58, 234, 60, 61, 62, 63, 64, 65, 0, 0,
5344 0, 0, 4, 5, 6, 0, 8, 0, 0, 0,
5345 9, 10, 0, 0, 0, 11, 0, 12, 13, 14,
5346 270, 271, 17, 18, 0, 0, 66, 235, 68, 19,
5347 20, 272, 22, 23, 24, 25, 0, 0, 227, 0,
5348 0, 0, 0, 0, 0, 28, 0, 0, 31, 32,
5349 33, 34, 35, 36, 37, 38, 39, 228, 40, 41,
5350 42, 43, 44, 45, 46, 0, 0, 0, 0, 0,
5351 0, 0, 0, 0, 0, 47, 48, 0, 0, 0,
5352 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5353 49, 50, 0, 0, 0, 0, 0, 0, 229, 0,
5354 0, 230, 53, 54, 55, 0, 231, 232, 0, 57,
5355 58, 234, 60, 61, 62, 63, 64, 65, 0, 0,
5356 0, 0, 4, 5, 6, 0, 8, 0, 0, 0,
5357 9, 10, 0, 0, 0, 11, 0, 12, 13, 14,
5358 270, 271, 17, 18, 0, 0, 66, 235, 68, 19,
5359 20, 272, 22, 23, 24, 25, 0, 0, 227, 0,
5360 0, 0, 0, 0, 0, 28, 0, 0, 31, 32,
5361 33, 34, 35, 36, 37, 38, 39, 228, 40, 41,
5362 42, 43, 44, 45, 46, 0, 0, 0, 0, 0,
5363 0, 0, 0, 0, 0, 47, 48, 0, 0, 0,
5364 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5365 49, 50, 0, 0, 0, 0, 0, 0, 229, 0,
5366 0, 230, 53, 54, 55, 0, 0, 232, 233, 57,
5367 58, 234, 60, 61, 62, 63, 64, 65, 0, 0,
5368 0, 0, 4, 5, 6, 0, 8, 0, 0, 0,
5369 9, 10, 0, 0, 0, 11, 0, 12, 13, 14,
5370 270, 271, 17, 18, 0, 0, 66, 235, 68, 19,
5371 20, 272, 22, 23, 24, 25, 0, 0, 227, 0,
5372 0, 0, 0, 0, 0, 28, 0, 0, 31, 32,
5373 33, 34, 35, 36, 37, 38, 39, 228, 40, 41,
5374 42, 43, 44, 45, 46, 0, 0, 0, 0, 0,
5375 0, 0, 0, 0, 0, 47, 48, 0, 0, 0,
5376 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5377 49, 50, 0, 0, 0, 0, 0, 0, 229, 0,
5378 0, 230, 53, 54, 55, 0, 0, 232, 0, 57,
5379 58, 234, 60, 61, 62, 63, 64, 65, 0, 0,
5380 0, 0, 4, 5, 6, 0, 8, 0, 0, 0,
5381 9, 10, 0, 0, 0, 11, 0, 12, 13, 14,
5382 15, 16, 17, 18, 0, 0, 66, 235, 68, 19,
5383 20, 21, 22, 23, 24, 25, 0, 0, 227, 0,
5384 0, 0, 0, 0, 0, 28, 0, 0, 31, 32,
5385 33, 34, 35, 36, 37, 38, 39, 0, 40, 41,
5386 42, 43, 44, 45, 46, 0, 0, 0, 0, 0,
5387 0, 0, 0, 0, 0, 47, 48, 0, 0, 0,
5388 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5389 49, 50, 0, 0, 0, 0, 0, 0, 229, 0,
5390 0, 230, 53, 54, 55, 0, 795, 0, 0, 57,
5391 58, 59, 60, 61, 62, 63, 64, 65, 0, 0,
5392 0, 0, 4, 5, 6, 0, 8, 0, 0, 0,
5393 9, 10, 0, 0, 0, 11, 0, 12, 13, 14,
5394 15, 16, 17, 18, 0, 0, 66, 235, 68, 19,
5395 20, 21, 22, 23, 24, 25, 0, 0, 227, 0,
5396 0, 0, 0, 0, 0, 28, 0, 0, 31, 32,
5397 33, 34, 35, 36, 37, 38, 39, 0, 40, 41,
5398 42, 43, 44, 45, 46, 0, 0, 0, 0, 0,
5399 0, 0, 0, 0, 0, 47, 48, 0, 0, 0,
5400 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5401 49, 50, 0, 0, 0, 0, 0, 0, 806, 0,
5402 0, 230, 53, 54, 55, 0, 795, 0, 0, 57,
5403 58, 59, 60, 61, 62, 63, 64, 65, 0, 0,
5404 0, 0, 4, 5, 6, 0, 8, 0, 0, 0,
5405 9, 10, 0, 0, 0, 11, 0, 12, 13, 14,
5406 270, 271, 17, 18, 0, 0, 66, 235, 68, 19,
5407 20, 272, 22, 23, 24, 25, 0, 0, 227, 0,
5408 0, 0, 0, 0, 0, 28, 0, 0, 31, 32,
5409 33, 34, 35, 36, 37, 38, 39, 0, 40, 41,
5410 42, 43, 44, 45, 46, 0, 0, 0, 0, 0,
5411 0, 0, 0, 0, 0, 47, 48, 0, 0, 0,
5412 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5413 49, 50, 0, 0, 0, 0, 0, 0, 229, 0,
5414 0, 230, 53, 54, 55, 0, 967, 0, 0, 57,
5415 58, 59, 60, 61, 62, 63, 64, 65, 0, 0,
5416 0, 0, 4, 5, 6, 0, 8, 0, 0, 0,
5417 9, 10, 0, 0, 0, 11, 0, 12, 13, 14,
5418 270, 271, 17, 18, 0, 0, 66, 235, 68, 19,
5419 20, 272, 22, 23, 24, 25, 0, 0, 227, 0,
5420 0, 0, 0, 0, 0, 28, 0, 0, 31, 32,
5421 33, 34, 35, 36, 37, 38, 39, 0, 40, 41,
5422 42, 43, 44, 45, 46, 0, 0, 0, 0, 0,
5423 0, 0, 0, 0, 0, 47, 48, 0, 0, 0,
5424 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5425 49, 50, 0, 0, 0, 0, 0, 0, 229, 0,
5426 0, 230, 53, 54, 55, 0, 1016, 0, 0, 57,
5427 58, 59, 60, 61, 62, 63, 64, 65, 0, 0,
5428 0, 0, 4, 5, 6, 0, 8, 0, 0, 0,
5429 9, 10, 0, 0, 0, 11, 0, 12, 13, 14,
5430 270, 271, 17, 18, 0, 0, 66, 235, 68, 19,
5431 20, 272, 22, 23, 24, 25, 0, 0, 227, 0,
5432 0, 0, 0, 0, 0, 28, 0, 0, 31, 32,
5433 33, 34, 35, 36, 37, 38, 39, 0, 40, 41,
5434 42, 43, 44, 45, 46, 0, 0, 0, 0, 0,
5435 0, 0, 0, 0, 0, 47, 48, 0, 0, 0,
5436 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5437 49, 50, 0, 0, 0, 0, 0, 0, 229, 0,
5438 0, 230, 53, 54, 55, 0, 795, 0, 0, 57,
5439 58, 59, 60, 61, 62, 63, 64, 65, 0, 0,
5440 0, 0, 4, 5, 6, 0, 8, 0, 0, 0,
5441 9, 10, 0, 0, 0, 11, 0, 12, 13, 14,
5442 270, 271, 17, 18, 0, 0, 66, 235, 68, 19,
5443 20, 272, 22, 23, 24, 25, 0, 0, 227, 0,
5444 0, 0, 0, 0, 0, 28, 0, 0, 31, 32,
5445 33, 34, 35, 36, 37, 38, 39, 0, 40, 41,
5446 42, 43, 44, 45, 46, 0, 0, 0, 0, 0,
5447 0, 0, 0, 0, 0, 47, 48, 0, 0, 0,
5448 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5449 49, 50, 0, 0, 0, 0, 0, 0, 229, 0,
5450 0, 230, 53, 54, 55, 0, 1136, 0, 0, 57,
5451 58, 59, 60, 61, 62, 63, 64, 65, 0, 0,
5452 0, 0, 4, 5, 6, 0, 8, 0, 0, 0,
5453 9, 10, 0, 0, 0, 11, 0, 12, 13, 14,
5454 270, 271, 17, 18, 0, 0, 66, 235, 68, 19,
5455 20, 272, 22, 23, 24, 25, 0, 0, 227, 0,
5456 0, 0, 0, 0, 0, 28, 0, 0, 31, 32,
5457 33, 34, 35, 36, 37, 38, 39, 0, 40, 41,
5458 42, 43, 44, 45, 46, 0, 0, 0, 0, 0,
5459 0, 0, 0, 0, 0, 47, 48, 0, 0, 0,
5460 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5461 49, 50, 0, 0, 0, 0, 0, 0, 229, 0,
5462 0, 230, 53, 54, 55, 0, 0, 0, 0, 57,
5463 58, 59, 60, 61, 62, 63, 64, 65, 0, 0,
5464 0, 0, 4, 5, 6, 0, 8, 0, 0, 0,
5465 9, 10, 0, 0, 0, 11, 0, 12, 13, 14,
5466 15, 16, 17, 18, 0, 0, 66, 235, 68, 19,
5467 20, 21, 22, 23, 24, 25, 0, 0, 227, 0,
5468 0, 0, 0, 0, 0, 28, 0, 0, 31, 32,
5469 33, 34, 35, 36, 37, 38, 39, 0, 40, 41,
5470 42, 43, 44, 45, 46, 0, 0, 0, 0, 0,
5471 0, 0, 0, 0, 0, 47, 48, 0, 0, 0,
5472 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5473 49, 50, 0, 0, 0, 0, 0, 0, 229, 0,
5474 0, 230, 53, 54, 55, 0, 0, 0, 0, 57,
5475 58, 59, 60, 61, 62, 63, 64, 65, 0, 0,
5476 0, 0, 4, 5, 6, 0, 8, 0, 0, 0,
5477 9, 10, 0, 0, 0, 11, 0, 12, 13, 14,
5478 15, 16, 17, 18, 0, 0, 66, 235, 68, 19,
5479 20, 21, 22, 23, 24, 25, 0, 0, 26, 0,
5480 0, 0, 0, 0, 0, 28, 0, 0, 31, 32,
5481 33, 34, 35, 36, 37, 38, 39, 0, 40, 41,
5482 42, 43, 44, 45, 46, 0, 0, 0, 0, 0,
5483 0, 0, 0, 0, 0, 47, 48, 0, 0, 0,
5484 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5485 49, 50, 0, 0, 0, 0, 0, 0, 229, 0,
5486 0, 230, 53, 54, 55, 0, 0, 0, 0, 57,
5487 58, 59, 60, 61, 62, 63, 64, 65, 0, 0,
5488 0, 0, 4, 5, 6, 0, 8, 0, 0, 0,
5489 9, 10, 0, 0, 0, 11, 0, 12, 13, 14,
5490 15, 16, 17, 18, 0, 0, 66, 67, 68, 19,
5491 20, 21, 22, 23, 24, 25, 0, 0, 777, 0,
5492 0, 0, 0, 0, 0, 28, 0, 0, 31, 32,
5493 33, 34, 35, 36, 37, 38, 39, 0, 40, 41,
5494 42, 43, 44, 45, 46, 0, 0, 0, 0, 0,
5495 0, 0, 0, 0, 0, 47, 48, 0, 0, 0,
5496 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5497 49, 50, 0, 0, 0, 0, 0, 0, 229, 0,
5498 0, 230, 53, 54, 55, 0, 0, 0, 0, 57,
5499 58, 59, 60, 61, 62, 63, 64, 65, 0, 0,
5500 0, 0, 4, 5, 6, 0, 8, 0, 0, 0,
5501 9, 10, 0, 0, 0, 11, 0, 12, 13, 14,
5502 15, 16, 17, 18, 0, 0, 66, 235, 68, 19,
5503 20, 21, 22, 23, 24, 25, 0, 0, 227, 0,
5504 0, 0, 0, 0, 0, 28, 0, 0, 31, 32,
5505 33, 34, 35, 36, 37, 38, 39, 0, 40, 41,
5506 42, 43, 44, 45, 46, 0, 0, 0, 0, 0,
5507 0, 0, 0, 0, 0, 47, 48, 0, 0, 0,
5508 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5509 49, 50, 0, 0, 0, 0, 0, 0, 806, 0,
5510 0, 230, 53, 54, 55, 0, 0, 0, 0, 57,
5511 58, 59, 60, 61, 62, 63, 64, 65, 0, 0,
5512 0, 0, 4, 5, 6, 0, 8, 0, 0, 0,
5513 9, 10, 0, 0, 0, 11, 0, 12, 13, 14,
5514 270, 271, 17, 18, 0, 0, 66, 235, 68, 19,
5515 20, 272, 22, 23, 24, 25, 0, 0, 886, 0,
5516 0, 0, 0, 0, 0, 28, 0, 0, 31, 32,
5517 33, 34, 35, 36, 37, 38, 39, 0, 40, 41,
5518 42, 43, 44, 45, 46, 0, 0, 0, 0, 0,
5519 0, 0, 0, 0, 0, 47, 48, 0, 0, 0,
5520 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5521 49, 50, 0, 0, 0, 0, 0, 0, 229, 0,
5522 0, 230, 53, 54, 55, 0, 0, 0, 0, 57,
5523 58, 59, 60, 61, 62, 63, 64, 65, 0, 0,
5524 0, 0, 4, 5, 6, 0, 8, 0, 0, 0,
5525 9, 10, 0, 0, 0, 11, 0, 12, 13, 14,
5526 270, 271, 17, 18, 0, 0, 66, 235, 68, 19,
5527 20, 272, 22, 23, 24, 25, 0, 0, 227, 0,
5528 0, 0, 0, 0, 0, 302, 0, 0, 31, 32,
5529 33, 34, 35, 36, 37, 38, 39, 0, 40, 41,
5530 42, 43, 44, 45, 46, 0, 0, 0, 0, 0,
5531 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5532 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5533 0, 0, 0, 0, 0, 0, 0, 0, 303, 0,
5534 0, 363, 53, 54, 55, 0, 364, 0, 0, 57,
5535 58, 59, 60, 61, 62, 63, 64, 65, 0, 0,
5536 4, 5, 6, 0, 8, 0, 0, 0, 9, 10,
5537 0, 0, 0, 11, 0, 12, 13, 14, 270, 271,
5538 17, 18, 0, 0, 0, 0, 304, 19, 20, 272,
5539 22, 23, 24, 25, 0, 0, 227, 0, 0, 0,
5540 0, 0, 0, 302, 0, 0, 31, 32, 33, 34,
5541 35, 36, 37, 38, 39, 0, 40, 41, 42, 43,
5542 44, 45, 46, 0, 0, 0, 0, 0, 0, 0,
5543 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5544 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5545 0, 0, 0, 0, 0, 0, 415, 0, 0, 52,
5546 53, 54, 55, 0, 56, 0, 0, 57, 58, 59,
5547 60, 61, 62, 63, 64, 65, 0, 0, 4, 5,
5548 6, 0, 8, 0, 0, 0, 9, 10, 0, 0,
5549 0, 11, 0, 12, 13, 14, 270, 271, 17, 18,
5550 0, 0, 0, 0, 304, 19, 20, 272, 22, 23,
5551 24, 25, 0, 0, 227, 0, 0, 0, 0, 0,
5552 0, 302, 0, 0, 31, 32, 33, 423, 35, 36,
5553 37, 424, 39, 0, 40, 41, 42, 43, 44, 45,
5554 46, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5555 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5556 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5557 425, 0, 0, 0, 426, 0, 0, 230, 53, 54,
5558 55, 0, 0, 0, 0, 57, 58, 59, 60, 61,
5559 62, 63, 64, 65, 0, 0, 4, 5, 6, 0,
5560 8, 0, 0, 0, 9, 10, 0, 0, 0, 11,
5561 0, 12, 13, 14, 270, 271, 17, 18, 0, 0,
5562 0, 0, 304, 19, 20, 272, 22, 23, 24, 25,
5563 0, 0, 227, 0, 0, 0, 0, 0, 0, 302,
5564 0, 0, 31, 32, 33, 423, 35, 36, 37, 424,
5565 39, 0, 40, 41, 42, 43, 44, 45, 46, 0,
5566 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5567 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5568 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5569 0, 0, 426, 0, 0, 230, 53, 54, 55, 0,
5570 0, 0, 0, 57, 58, 59, 60, 61, 62, 63,
5571 64, 65, 0, 0, 4, 5, 6, 0, 8, 0,
5572 0, 0, 9, 10, 0, 0, 0, 11, 0, 12,
5573 13, 14, 270, 271, 17, 18, 0, 0, 0, 0,
5574 304, 19, 20, 272, 22, 23, 24, 25, 0, 0,
5575 227, 0, 0, 0, 0, 0, 0, 302, 0, 0,
5576 31, 32, 33, 34, 35, 36, 37, 38, 39, 0,
5577 40, 41, 42, 43, 44, 45, 46, 0, 0, 0,
5578 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5579 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5580 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5581 303, 0, 0, 363, 53, 54, 55, 0, 0, 0,
5582 0, 57, 58, 59, 60, 61, 62, 63, 64, 65,
5583 0, 0, 4, 5, 6, 0, 8, 0, 0, 0,
5584 9, 10, 0, 0, 0, 11, 0, 12, 13, 14,
5585 270, 271, 17, 18, 0, 0, 0, 0, 304, 19,
5586 20, 272, 22, 23, 24, 25, 0, 0, 227, 0,
5587 0, 0, 0, 0, 0, 302, 0, 0, 31, 32,
5588 33, 34, 35, 36, 37, 38, 39, 0, 40, 41,
5589 42, 43, 44, 45, 46, 0, 0, 0, 0, 0,
5590 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5591 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5592 0, 0, 0, 0, 0, 0, 0, 0, 1192, 0,
5593 0, 230, 53, 54, 55, 0, 0, 0, 0, 57,
5594 58, 59, 60, 61, 62, 63, 64, 65, 0, 0,
5595 4, 5, 6, 0, 8, 0, 0, 0, 9, 10,
5596 0, 0, 0, 11, 0, 12, 13, 14, 270, 271,
5597 17, 18, 0, 0, 0, 0, 304, 19, 20, 272,
5598 22, 23, 24, 25, 0, 0, 227, 0, 0, 0,
5599 0, 0, 0, 302, 0, 0, 31, 32, 33, 34,
5600 35, 36, 37, 38, 39, 0, 40, 41, 42, 43,
5601 44, 45, 46, 0, 0, 0, 0, 0, 0, 0,
5602 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5603 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5604 0, 0, 0, 0, 0, 0, 1291, 0, 0, 230,
5605 53, 54, 55, 22, 23, 24, 25, 57, 58, 59,
5606 60, 61, 62, 63, 64, 65, 0, 0, 0, 31,
5607 32, 33, 1079, 0, 0, 0, 1080, 0, 0, 40,
5608 41, 42, 43, 44, 0, 0, 0, 0, 0, 0,
5609 0, 0, 0, 0, 304, 0, 0, 0, 0, 0,
5610 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5611 0, 1082, 1083, 0, 0, 0, 0, 0, 0, 1084,
5612 0, 0, 1085, 0, 1086, 1087, 0, 0, 0, 0,
5613 57, 58, 59, 60, 61, 62, 63, 64, 65, 0,
5614 0, 0, 0, 0, 700, 639, 0, 0, 701, 0,
5615 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5616 1090, 0, 0, 0, 0, 0, 0, 304, 188, 189,
5617 190, 191, 192, 193, 194, 195, 196, 0, 0, 197,
5618 198, 0, 0, 0, 0, 199, 200, 201, 202, 0,
5619 0, 0, 0, 0, 0, 0, 0, 0, 0, 203,
5620 204, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5621 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5622 0, 0, 0, 0, 0, 0, 0, 0, 0, 205,
5623 206, 207, 208, 209, 210, 211, 212, 213, 214, 0,
5624 215, 216, 703, 647, 0, 0, 704, 0, 217, 0,
5625 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5626 0, 0, 0, 0, 0, 0, 188, 189, 190, 191,
5627 192, 193, 194, 195, 196, 0, 0, 197, 198, 0,
5628 0, 0, 0, 199, 200, 201, 202, 0, 0, 0,
5629 0, 0, 0, 0, 0, 0, 0, 203, 204, 0,
5630 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5631 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5632 0, 0, 0, 0, 0, 0, 0, 205, 206, 207,
5633 208, 209, 210, 211, 212, 213, 214, 0, 215, 216,
5634 700, 639, 0, 0, 720, 0, 217, 0, 0, 0,
5635 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5636 0, 0, 0, 0, 188, 189, 190, 191, 192, 193,
5637 194, 195, 196, 0, 0, 197, 198, 0, 0, 0,
5638 0, 199, 200, 201, 202, 0, 0, 0, 0, 0,
5639 0, 0, 0, 0, 0, 203, 204, 0, 0, 0,
5640 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5641 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5642 0, 0, 0, 0, 0, 205, 206, 207, 208, 209,
5643 210, 211, 212, 213, 214, 0, 215, 216, 731, 639,
5644 0, 0, 732, 0, 217, 0, 0, 0, 0, 0,
5645 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5646 0, 0, 188, 189, 190, 191, 192, 193, 194, 195,
5647 196, 0, 0, 197, 198, 0, 0, 0, 0, 199,
5648 200, 201, 202, 0, 0, 0, 0, 0, 0, 0,
5649 0, 0, 0, 203, 204, 0, 0, 0, 0, 0,
5650 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5651 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5652 0, 0, 0, 205, 206, 207, 208, 209, 210, 211,
5653 212, 213, 214, 0, 215, 216, 734, 647, 0, 0,
5654 735, 0, 217, 0, 0, 0, 0, 0, 0, 0,
5655 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5656 188, 189, 190, 191, 192, 193, 194, 195, 196, 0,
5657 0, 197, 198, 0, 0, 0, 0, 199, 200, 201,
5658 202, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5659 0, 203, 204, 0, 0, 0, 0, 0, 0, 0,
5660 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5661 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5662 0, 205, 206, 207, 208, 209, 210, 211, 212, 213,
5663 214, 0, 215, 216, 850, 639, 0, 0, 851, 0,
5664 217, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5665 0, 0, 0, 0, 0, 0, 0, 0, 188, 189,
5666 190, 191, 192, 193, 194, 195, 196, 0, 0, 197,
5667 198, 0, 0, 0, 0, 199, 200, 201, 202, 0,
5668 0, 0, 0, 0, 0, 0, 0, 0, 0, 203,
5669 204, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5670 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5671 0, 0, 0, 0, 0, 0, 0, 0, 0, 205,
5672 206, 207, 208, 209, 210, 211, 212, 213, 214, 0,
5673 215, 216, 853, 647, 0, 0, 854, 0, 217, 0,
5674 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5675 0, 0, 0, 0, 0, 0, 188, 189, 190, 191,
5676 192, 193, 194, 195, 196, 0, 0, 197, 198, 0,
5677 0, 0, 0, 199, 200, 201, 202, 0, 0, 0,
5678 0, 0, 0, 0, 0, 0, 0, 203, 204, 0,
5679 0, 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, 205, 206, 207,
5682 208, 209, 210, 211, 212, 213, 214, 0, 215, 216,
5683 859, 639, 0, 0, 860, 0, 217, 0, 0, 0,
5684 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5685 0, 0, 0, 0, 188, 189, 190, 191, 192, 193,
5686 194, 195, 196, 0, 0, 197, 198, 0, 0, 0,
5687 0, 199, 200, 201, 202, 0, 0, 0, 0, 0,
5688 0, 0, 0, 0, 0, 203, 204, 0, 0, 0,
5689 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5690 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5691 0, 0, 0, 0, 0, 205, 206, 207, 208, 209,
5692 210, 211, 212, 213, 214, 0, 215, 216, 685, 647,
5693 0, 0, 686, 0, 217, 0, 0, 0, 0, 0,
5694 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5695 0, 0, 188, 189, 190, 191, 192, 193, 194, 195,
5696 196, 0, 0, 197, 198, 0, 0, 0, 0, 199,
5697 200, 201, 202, 0, 0, 0, 0, 0, 0, 0,
5698 0, 0, 0, 203, 204, 0, 0, 0, 0, 0,
5699 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5700 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5701 0, 0, 0, 205, 206, 207, 208, 209, 210, 211,
5702 212, 213, 214, 0, 215, 216, 1022, 639, 0, 0,
5703 1023, 0, 217, 0, 0, 0, 0, 0, 0, 0,
5704 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5705 188, 189, 190, 191, 192, 193, 194, 195, 196, 0,
5706 0, 197, 198, 0, 0, 0, 0, 199, 200, 201,
5707 202, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5708 0, 203, 204, 0, 0, 0, 0, 0, 0, 0,
5709 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5710 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5711 0, 205, 206, 207, 208, 209, 210, 211, 212, 213,
5712 214, 0, 215, 216, 1025, 647, 0, 0, 1026, 0,
5713 217, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5714 0, 0, 0, 0, 0, 0, 0, 0, 188, 189,
5715 190, 191, 192, 193, 194, 195, 196, 0, 0, 197,
5716 198, 0, 0, 0, 0, 199, 200, 201, 202, 0,
5717 0, 0, 0, 0, 0, 0, 0, 0, 0, 203,
5718 204, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5719 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5720 0, 0, 0, 0, 0, 0, 0, 0, 0, 205,
5721 206, 207, 208, 209, 210, 211, 212, 213, 214, 0,
5722 215, 216, 1310, 639, 0, 0, 1311, 0, 217, 0,
5723 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5724 0, 0, 0, 0, 0, 0, 188, 189, 190, 191,
5725 192, 193, 194, 195, 196, 0, 0, 197, 198, 0,
5726 0, 0, 0, 199, 200, 201, 202, 0, 0, 0,
5727 0, 0, 0, 0, 0, 0, 0, 203, 204, 0,
5728 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5729 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5730 0, 0, 0, 0, 0, 0, 0, 205, 206, 207,
5731 208, 209, 210, 211, 212, 213, 214, 0, 215, 216,
5732 1313, 647, 0, 0, 1314, 0, 217, 0, 0, 0,
5733 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5734 0, 0, 0, 0, 188, 189, 190, 191, 192, 193,
5735 194, 195, 196, 0, 0, 197, 198, 0, 0, 0,
5736 0, 199, 200, 201, 202, 0, 0, 0, 0, 0,
5737 0, 0, 0, 0, 0, 203, 204, 0, 0, 0,
5738 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5739 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5740 0, 0, 0, 0, 0, 205, 206, 207, 208, 209,
5741 210, 211, 212, 213, 214, 0, 215, 216, 1358, 639,
5742 0, 0, 1359, 0, 217, 0, 0, 0, 0, 0,
5743 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5744 0, 0, 188, 189, 190, 191, 192, 193, 194, 195,
5745 196, 0, 0, 197, 198, 0, 0, 0, 0, 199,
5746 200, 201, 202, 0, 0, 0, 0, 0, 0, 0,
5747 0, 0, 0, 203, 204, 0, 0, 0, 0, 0,
5748 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5749 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5750 0, 0, 0, 205, 206, 207, 208, 209, 210, 211,
5751 212, 213, 214, 0, 215, 216, 0, 0, 0, 0,
5752 0, 0, 217
5753};
5754
5755static const yytype_int16 yycheck[] =
5756{
5757 1, 116, 59, 103, 104, 107, 70, 107, 58, 56,
5758 101, 70, 58, 13, 14, 1, 565, 89, 399, 7,
5759 401, 252, 408, 768, 115, 400, 426, 1, 348, 67,
5760 15, 16, 574, 27, 761, 52, 53, 15, 16, 27,
5761 477, 838, 89, 344, 611, 597, 469, 348, 107, 21,
5762 597, 52, 53, 15, 16, 56, 595, 7, 56, 598,
5763 344, 108, 109, 110, 348, 111, 52, 53, 54, 55,
5764 58, 255, 72, 601, 455, 848, 469, 27, 515, 104,
5765 525, 296, 107, 761, 477, 300, 763, 52, 89, 512,
5766 81, 472, 54, 474, 80, 81, 26, 84, 473, 66,
5767 63, 64, 65, 15, 16, 626, 907, 108, 109, 110,
5768 111, 905, 84, 13, 1165, 0, 285, 25, 25, 1028,
5769 818, 502, 25, 111, 689, 690, 113, 112, 15, 16,
5770 1181, 1284, 320, 321, 112, 1276, 26, 29, 154, 678,
5771 0, 1165, 69, 159, 100, 154, 25, 528, 10, 81,
5772 112, 25, 527, 1189, 1190, 1179, 247, 101, 723, 25,
5773 260, 261, 605, 608, 585, 824, 101, 54, 55, 66,
5774 591, 98, 719, 832, 290, 25, 25, 234, 134, 763,
5775 100, 100, 151, 69, 100, 287, 277, 763, 943, 56,
5776 774, 25, 768, 25, 363, 26, 758, 28, 1153, 761,
5777 112, 1354, 751, 752, 161, 1346, 68, 37, 38, 28,
5778 653, 155, 98, 230, 134, 134, 659, 660, 134, 310,
5779 155, 151, 119, 287, 27, 112, 134, 13, 287, 230,
5780 1139, 123, 13, 305, 155, 120, 155, 337, 338, 339,
5781 340, 157, 342, 343, 230, 1296, 154, 155, 155, 1300,
5782 158, 1302, 155, 484, 154, 155, 1001, 134, 305, 245,
5783 160, 151, 1298, 1064, 13, 266, 252, 157, 285, 255,
5784 255, 1065, 257, 971, 711, 675, 155, 255, 1302, 257,
5785 266, 155, 273, 274, 285, 666, 709, 273, 274, 155,
5786 665, 157, 266, 255, 822, 257, 677, 13, 1053, 285,
5787 272, 676, 13, 275, 305, 155, 155, 13, 157, 409,
5788 1361, 413, 337, 338, 339, 340, 709, 364, 711, 858,
5789 285, 155, 34, 155, 154, 425, 847, 418, 1005, 1284,
5790 1085, 100, 1087, 1288, 335, 451, 1086, 304, 1293, 782,
5791 52, 1138, 274, 786, 100, 257, 363, 25, 52, 1027,
5792 1028, 154, 56, 541, 413, 543, 905, 160, 907, 66,
5793 805, 335, 363, 364, 480, 1138, 364, 483, 154, 911,
5794 257, 923, 488, 154, 160, 307, 923, 363, 134, 160,
5795 945, 946, 101, 134, 409, 13, 951, 952, 955, 505,
5796 154, 1027, 1028, 410, 411, 1350, 160, 1352, 363, 1354,
5797 425, 1356, 403, 846, 827, 154, 849, 58, 157, 410,
5798 411, 160, 119, 401, 400, 400, 100, 403, 1373, 1003,
5799 863, 1005, 400, 1007, 410, 411, 66, 78, 100, 1005,
5800 402, 13, 1187, 1188, 827, 154, 112, 976, 154, 1189,
5801 1190, 157, 428, 154, 160, 13, 993, 155, 154, 160,
5802 134, 100, 134, 525, 160, 13, 134, 108, 109, 1027,
5803 1028, 1139, 134, 579, 295, 296, 451, 455, 699, 300,
5804 1035, 302, 157, 451, 34, 157, 154, 155, 525, 763,
5805 158, 121, 122, 455, 768, 134, 474, 473, 473, 451,
5806 141, 607, 52, 914, 915, 473, 482, 918, 484, 920,
5807 494, 922, 25, 1139, 1182, 69, 494, 508, 78, 932,
5808 15, 1189, 1190, 728, 502, 1064, 1065, 69, 56, 962,
5809 25, 161, 965, 134, 525, 709, 154, 1082, 1083, 972,
5810 69, 548, 160, 97, 98, 978, 608, 596, 109, 451,
5811 528, 527, 527, 1288, 494, 97, 98, 548, 1345, 527,
5812 100, 98, 740, 554, 991, 1282, 100, 745, 939, 98,
5813 941, 608, 548, 155, 451, 940, 1150, 683, 606, 1153,
5814 141, 1139, 154, 611, 144, 145, 146, 1153, 160, 679,
5815 554, 101, 469, 969, 134, 571, 154, 611, 574, 153,
5816 134, 1153, 160, 157, 595, 157, 154, 598, 991, 658,
5817 100, 153, 160, 100, 1282, 1350, 153, 608, 100, 595,
5818 157, 134, 598, 1056, 1182, 715, 594, 157, 1157, 597,
5819 1298, 1189, 1190, 52, 155, 512, 100, 56, 100, 1184,
5820 1185, 154, 155, 154, 157, 158, 157, 134, 655, 755,
5821 657, 152, 134, 154, 606, 1066, 1067, 1068, 1069, 611,
5822 78, 689, 690, 884, 655, 642, 657, 729, 155, 645,
5823 134, 1047, 134, 650, 650, 689, 690, 69, 157, 655,
5824 642, 657, 25, 1215, 994, 1217, 69, 678, 666, 665,
5825 665, 1153, 729, 155, 1084, 723, 134, 665, 738, 677,
5826 676, 676, 678, 994, 69, 97, 98, 691, 676, 723,
5827 1284, 688, 688, 691, 97, 98, 69, 155, 1284, 1293,
5828 994, 78, 1288, 699, 142, 143, 144, 145, 146, 100,
5829 1282, 1005, 1284, 98, 815, 69, 1288, 100, 729, 787,
5830 1298, 1293, 790, 805, 69, 98, 722, 26, 158, 1278,
5831 1060, 691, 1128, 702, 66, 67, 69, 134, 864, 721,
5832 159, 153, 867, 134, 98, 855, 152, 857, 805, 1060,
5833 153, 134, 97, 98, 15, 1208, 17, 883, 1352, 885,
5834 1354, 56, 1356, 66, 733, 98, 1060, 740, 1354, 742,
5835 69, 134, 745, 746, 26, 1327, 1186, 903, 1350, 1373,
5836 1352, 157, 1354, 1214, 1356, 69, 627, 856, 66, 121,
5837 122, 154, 155, 100, 805, 158, 69, 69, 97, 98,
5838 1282, 1373, 1284, 644, 1027, 1028, 1288, 26, 153, 865,
5839 1206, 1293, 709, 97, 98, 155, 119, 69, 121, 122,
5840 855, 124, 857, 54, 97, 98, 98, 134, 69, 78,
5841 928, 69, 930, 64, 65, 154, 69, 161, 834, 158,
5842 836, 119, 838, 121, 122, 97, 98, 858, 155, 599,
5843 69, 961, 151, 603, 153, 100, 69, 98, 157, 1153,
5844 98, 702, 858, 1086, 97, 98, 69, 865, 1350, 153,
5845 1352, 1324, 1354, 100, 1356, 151, 1267, 134, 97, 98,
5846 1103, 1266, 892, 852, 97, 98, 134, 728, 884, 134,
5847 134, 1373, 733, 862, 97, 98, 1296, 945, 946, 151,
5848 1300, 153, 106, 951, 952, 157, 975, 134, 977, 155,
5849 155, 945, 946, 69, 56, 911, 1139, 951, 952, 30,
5850 153, 37, 38, 66, 160, 69, 961, 100, 155, 69,
5851 827, 25, 151, 960, 153, 923, 777, 138, 157, 1162,
5852 153, 97, 98, 941, 940, 940, 155, 69, 155, 960,
5853 153, 134, 940, 97, 98, 152, 1179, 97, 98, 955,
5854 69, 134, 154, 155, 960, 976, 1189, 1190, 995, 83,
5855 84, 158, 1020, 134, 69, 97, 98, 1, 121, 122,
5856 976, 124, 155, 955, 995, 155, 1020, 1035, 97, 98,
5857 1284, 15, 16, 158, 1288, 154, 155, 153, 155, 995,
5858 155, 1035, 97, 98, 1014, 1015, 155, 1018, 1019, 153,
5859 155, 852, 52, 153, 14, 15, 1027, 1028, 155, 58,
5860 155, 862, 1089, 137, 138, 1052, 1179, 134, 52, 53,
5861 1090, 153, 56, 78, 1018, 1019, 1189, 1190, 52, 78,
5862 152, 1052, 155, 67, 153, 886, 1042, 55, 1044, 155,
5863 95, 96, 89, 90, 13, 1024, 1052, 17, 153, 25,
5864 1354, 152, 1188, 40, 41, 89, 1176, 154, 155, 108,
5865 1127, 1082, 1083, 112, 155, 1086, 1072, 1073, 155, 103,
5866 104, 306, 307, 107, 108, 109, 110, 1199, 112, 44,
5867 134, 44, 1103, 1194, 139, 140, 141, 142, 143, 144,
5868 145, 146, 152, 155, 66, 1231, 155, 1134, 1135, 44,
5869 56, 54, 55, 1140, 57, 1241, 1127, 1086, 44, 134,
5870 1131, 64, 65, 1134, 1135, 1199, 136, 1154, 1139, 1140,
5871 1199, 159, 1258, 1259, 1260, 1131, 924, 925, 1134, 1135,
5872 8, 1176, 1138, 1154, 1140, 933, 1157, 52, 936, 15,
5873 938, 1162, 155, 264, 1165, 152, 155, 119, 1154, 121,
5874 122, 1157, 124, 1273, 1274, 155, 155, 155, 1179, 1226,
5875 1181, 1198, 155, 1184, 1185, 155, 689, 690, 1189, 1190,
5876 155, 1248, 155, 1024, 101, 1212, 9, 1198, 66, 139,
5877 155, 52, 705, 706, 139, 1164, 52, 1, 1167, 155,
5878 152, 1212, 1198, 66, 155, 1201, 230, 155, 101, 66,
5879 723, 15, 16, 56, 158, 1226, 1212, 139, 1187, 1215,
5880 228, 1217, 160, 231, 232, 233, 59, 60, 61, 62,
5881 1287, 255, 155, 257, 1245, 155, 260, 261, 1273, 1274,
5882 155, 119, 266, 121, 122, 1086, 1087, 155, 52, 53,
5883 361, 155, 155, 155, 155, 366, 119, 152, 121, 122,
5884 56, 285, 119, 67, 121, 122, 155, 1278, 155, 1267,
5885 1266, 1266, 1268, 155, 1270, 155, 1287, 66, 1266, 155,
5886 157, 305, 1278, 157, 155, 1296, 504, 266, 335, 1300,
5887 1317, 1302, 1261, 1262, 1263, 1131, 508, 106, 865, 103,
5888 104, 1142, 606, 107, 110, 108, 1317, 78, 112, 495,
5889 98, 335, 956, 337, 338, 339, 340, 688, 342, 343,
5890 975, 1317, 1201, 1164, 95, 96, 1167, 751, 905, 1282,
5891 119, 1327, 121, 122, 40, 41, 42, 43, 44, 363,
5892 364, 1224, 1153, 1312, 1288, 1073, 1187, 458, 459, 1345,
5893 1361, 78, 1223, 1346, 1027, 1028, 467, 868, 359, 1345,
5894 1245, 1182, 875, 1182, 475, 476, 1178, 1268, 95, 96,
5895 141, 142, 143, 144, 145, 146, 400, 1270, 119, 403,
5896 543, 111, 1223, 761, 495, 409, 410, 411, 768, 115,
5897 1340, 52, 503, 54, 55, 56, 57, -1, -1, -1,
5898 -1, 425, 52, -1, 54, 55, 56, 57, 58, 1082,
5899 1083, -1, -1, 1086, -1, 142, 143, 144, 145, 146,
5900 1261, 1262, 1263, -1, -1, -1, 230, 451, 78, -1,
5901 1103, -1, 945, 946, -1, -1, -1, -1, 951, 952,
5902 -1, 102, 92, -1, -1, -1, 107, -1, -1, 473,
5903 -1, 255, 102, 257, -1, -1, 260, 261, 108, 109,
5904 468, 469, 266, -1, -1, 52, 1139, 54, 55, 477,
5905 57, 1312, 985, 986, -1, 988, 989, -1, -1, -1,
5906 1321, 285, -1, 52, 508, 54, 55, 56, 57, 1162,
5907 -1, 141, 1165, 52, -1, 54, 55, 56, 57, 1340,
5908 -1, 525, -1, 527, 512, -1, 1179, 515, 1181, -1,
5909 -1, 1184, 1185, -1, -1, 102, 1189, 1190, -1, -1,
5910 -1, -1, 1035, 52, 548, 54, 55, 56, 57, -1,
5911 554, 335, -1, 337, 338, 339, 340, -1, 342, 343,
5912 -1, 652, -1, 102, -1, -1, 1059, -1, -1, -1,
5913 -1, 1225, -1, 1227, -1, -1, -1, -1, -1, 363,
5914 52, -1, 54, 55, 56, 57, 58, -1, -1, -1,
5915 594, 595, 1245, 597, 598, -1, -1, -1, 586, -1,
5916 -1, 692, 606, -1, 608, -1, 78, 611, -1, -1,
5917 -1, -1, -1, -1, -1, -1, 400, -1, 606, 403,
5918 -1, -1, -1, 611, -1, 409, 410, 411, -1, -1,
5919 102, -1, -1, -1, -1, -1, 108, 109, -1, -1,
5920 -1, 425, -1, 1296, -1, -1, -1, 1300, -1, 1302,
5921 -1, 655, -1, 657, -1, -1, -1, -1, 44, -1,
5922 -1, 665, -1, -1, -1, -1, -1, 451, -1, 141,
5923 -1, -1, 676, -1, 678, 679, 1330, 1331, -1, -1,
5924 1334, 1335, -1, -1, 1338, 689, 690, -1, -1, 473,
5925 -1, -1, 78, 79, 80, 81, 82, 83, 84, 85,
5926 86, 87, 88, 89, 90, 693, -1, -1, 1361, 95,
5927 96, 715, -1, 1367, 1368, 1369, 1370, -1, -1, 723,
5928 -1, 709, 1376, 711, 508, 729, -1, -1, -1, 820,
5929 821, -1, -1, -1, -1, -1, -1, 828, 829, -1,
5930 -1, -1, 52, 527, 54, 55, 56, 57, 58, 135,
5931 -1, 137, 138, 139, 140, 141, 142, 143, 144, 145,
5932 146, -1, -1, -1, 548, -1, -1, -1, 78, 155,
5933 554, -1, -1, -1, -1, -1, -1, -1, -1, 767,
5934 -1, -1, 92, -1, -1, -1, -1, 878, 879, -1,
5935 881, 882, 102, -1, -1, -1, -1, 107, 108, 109,
5936 -1, 805, -1, -1, -1, -1, -1, 795, -1, -1,
5937 594, 595, -1, 597, 598, -1, -1, -1, -1, -1,
5938 -1, -1, 606, -1, -1, -1, -1, 611, -1, -1,
5939 -1, 141, -1, -1, 144, -1, -1, -1, -1, 827,
5940 -1, -1, -1, -1, -1, -1, 937, 157, 1, -1,
5941 -1, 855, -1, 857, 858, -1, -1, 845, -1, 950,
5942 -1, -1, 15, 16, -1, -1, -1, -1, -1, -1,
5943 -1, 655, 52, 657, 54, 55, 56, 57, 58, -1,
5944 -1, 665, -1, -1, -1, -1, -1, -1, -1, -1,
5945 -1, -1, 676, -1, 678, 679, 987, -1, 78, 52,
5946 53, -1, -1, -1, -1, 689, 690, -1, -1, -1,
5947 -1, -1, 92, -1, 67, -1, -1, -1, -1, 923,
5948 -1, -1, 102, -1, -1, -1, -1, 107, 108, 109,
5949 -1, 715, -1, -1, -1, -1, 940, -1, -1, 723,
5950 -1, 945, 946, -1, 932, -1, -1, 951, 952, -1,
5951 103, 104, -1, -1, 107, -1, 960, 961, -1, 112,
5952 -1, 141, -1, -1, 144, -1, -1, 955, -1, -1,
5953 -1, -1, 976, -1, -1, -1, -1, -1, -1, 967,
5954 25, -1, -1, -1, -1, -1, -1, -1, -1, -1,
5955 -1, 995, -1, -1, -1, -1, -1, -1, -1, -1,
5956 -1, -1, -1, 991, -1, -1, -1, -1, -1, -1,
5957 -1, -1, -1, -1, 1018, 1019, 1020, -1, -1, -1,
5958 -1, -1, -1, -1, -1, -1, -1, -1, 1016, -1,
5959 -1, 1035, -1, 78, 79, 80, 81, 82, 83, 84,
5960 85, 86, 87, 88, 89, 90, -1, -1, 1052, -1,
5961 95, 96, -1, -1, -1, 52, 101, 54, 55, 56,
5962 57, 58, -1, 1051, -1, -1, 1027, 1028, 1, -1,
5963 -1, 855, -1, 857, 858, -1, -1, 230, -1, -1,
5964 1171, 78, 15, 16, -1, -1, -1, -1, -1, -1,
5965 135, -1, 137, 138, 139, 140, 141, 142, 143, 144,
5966 145, 146, 255, -1, 257, 102, -1, 260, 261, -1,
5967 107, 108, 109, 266, -1, -1, -1, -1, -1, 52,
5968 53, 1082, 1083, 1127, -1, 1086, -1, 1131, -1, -1,
5969 1134, 1135, 285, -1, 67, -1, 1140, -1, -1, 923,
5970 -1, -1, 1103, -1, 141, -1, -1, 144, 1136, -1,
5971 1154, -1, -1, 1157, -1, -1, 940, -1, -1, -1,
5972 -1, 945, 946, -1, -1, -1, -1, 951, 952, -1,
5973 103, 104, 1176, -1, 107, -1, 960, 961, 1139, 112,
5974 -1, -1, 335, -1, 337, 338, 339, 340, -1, 342,
5975 343, -1, 976, -1, 1198, -1, -1, -1, -1, -1,
5976 -1, 1162, -1, -1, 1165, -1, -1, -1, 1212, -1,
5977 363, 995, -1, -1, -1, -1, -1, -1, 1179, -1,
5978 1181, -1, 1226, 1184, 1185, -1, -1, -1, 1189, 1190,
5979 -1, -1, -1, -1, 1018, 1019, 1020, -1, -1, -1,
5980 -1, -1, -1, -1, -1, -1, -1, 400, -1, -1,
5981 403, 1035, -1, -1, -1, -1, 409, 410, 411, -1,
5982 -1, -1, 1266, -1, -1, -1, -1, -1, 1052, 1273,
5983 1274, -1, 425, -1, 1278, 52, 53, -1, -1, 56,
5984 -1, -1, -1, 1287, 1245, -1, -1, -1, -1, -1,
5985 -1, -1, -1, -1, -1, -1, -1, 230, 451, 76,
5986 77, 78, 79, 80, 81, 82, 83, 84, -1, -1,
5987 87, 88, -1, 1317, -1, -1, 93, 94, 95, 96,
5988 473, -1, 255, -1, 257, -1, -1, 260, 261, -1,
5989 107, 108, -1, 266, -1, 1296, -1, -1, -1, 1300,
5990 -1, 1302, -1, -1, -1, -1, -1, 1131, -1, -1,
5991 1134, 1135, 285, -1, -1, 508, 1140, -1, -1, -1,
5992 137, 138, 139, 140, 141, 142, 143, 144, 145, 146,
5993 1154, 148, 149, 1157, 527, -1, -1, -1, -1, 156,
5994 157, -1, -1, -1, -1, -1, -1, -1, -1, -1,
5995 -1, -1, 1176, -1, -1, 548, -1, -1, -1, -1,
5996 1361, 554, 335, -1, 337, 338, 339, 340, -1, 342,
5997 343, -1, -1, -1, 1198, -1, -1, -1, -1, -1,
5998 -1, -1, -1, -1, -1, -1, -1, -1, 1212, -1,
5999 363, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6000 -1, 594, 595, -1, 597, 598, -1, -1, -1, -1,
6001 -1, -1, -1, 606, -1, -1, -1, -1, 611, -1,
6002 -1, -1, -1, -1, -1, -1, -1, 400, -1, -1,
6003 403, -1, -1, -1, -1, -1, 409, 410, 411, -1,
6004 -1, -1, 1266, -1, -1, -1, -1, -1, -1, 1273,
6005 1274, -1, 425, -1, 1278, -1, 1027, 1028, -1, -1,
6006 -1, -1, 655, -1, 657, -1, -1, -1, -1, -1,
6007 -1, -1, 665, -1, -1, -1, -1, -1, 451, -1,
6008 -1, -1, -1, 676, -1, 678, 679, -1, -1, -1,
6009 -1, -1, -1, 1317, -1, -1, 689, 690, -1, -1,
6010 473, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6011 -1, 1082, 1083, -1, -1, 1086, -1, -1, -1, -1,
6012 -1, -1, 715, -1, -1, -1, -1, -1, -1, -1,
6013 723, -1, 1103, -1, -1, 508, -1, -1, -1, -1,
6014 -1, -1, -1, -1, 1, -1, -1, -1, -1, -1,
6015 -1, -1, -1, -1, 527, -1, -1, -1, 15, 16,
6016 -1, 1027, 1028, -1, -1, -1, -1, -1, 1139, -1,
6017 -1, -1, -1, -1, -1, 548, -1, -1, -1, -1,
6018 -1, 554, -1, -1, -1, -1, -1, -1, -1, -1,
6019 -1, 1162, -1, -1, 1165, 52, 53, -1, -1, 56,
6020 -1, -1, -1, -1, -1, -1, -1, -1, 1179, -1,
6021 1181, -1, -1, 1184, 1185, -1, 1082, 1083, 1189, 1190,
6022 1086, 594, 595, -1, 597, 598, -1, -1, -1, -1,
6023 -1, -1, 89, 606, -1, -1, -1, 1103, 611, -1,
6024 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6025 -1, 108, 109, 110, -1, 112, -1, -1, -1, -1,
6026 -1, -1, 855, -1, 857, 858, -1, -1, -1, -1,
6027 -1, -1, -1, 1139, 1245, -1, -1, -1, -1, -1,
6028 -1, -1, 655, -1, 657, -1, -1, -1, -1, -1,
6029 -1, -1, 665, -1, -1, -1, 1162, -1, -1, 1165,
6030 -1, -1, -1, 676, -1, 678, 679, -1, -1, -1,
6031 -1, -1, -1, 1179, -1, 1181, 689, 690, 1184, 1185,
6032 -1, -1, -1, 1189, 1190, 1296, -1, -1, -1, 1300,
6033 923, 1302, -1, -1, -1, -1, -1, -1, -1, -1,
6034 -1, -1, 715, -1, -1, -1, -1, 940, -1, -1,
6035 723, -1, 945, 946, -1, -1, 1027, 1028, 951, 952,
6036 -1, -1, -1, -1, -1, -1, -1, 960, 961, -1,
6037 -1, -1, -1, 230, -1, -1, -1, -1, -1, 1245,
6038 -1, -1, -1, 976, -1, -1, -1, -1, -1, -1,
6039 1361, -1, -1, -1, -1, -1, -1, -1, 255, -1,
6040 257, -1, 995, -1, -1, -1, -1, -1, -1, 266,
6041 -1, 1082, 1083, -1, -1, 1086, -1, -1, -1, -1,
6042 -1, -1, -1, -1, -1, 1018, 1019, 1020, 285, -1,
6043 1296, -1, 1103, -1, 1300, -1, 1302, -1, -1, -1,
6044 -1, -1, 1035, -1, 33, 34, 35, 36, 305, -1,
6045 -1, -1, -1, -1, -1, -1, -1, -1, -1, 1052,
6046 49, 50, 51, -1, -1, -1, -1, -1, 1139, -1,
6047 59, 60, 61, 62, 63, -1, -1, -1, 335, -1,
6048 1027, 1028, 855, -1, 857, 858, -1, -1, -1, -1,
6049 -1, 1162, -1, -1, 1165, 1361, -1, -1, -1, -1,
6050 -1, -1, -1, -1, -1, -1, 363, 364, 1179, -1,
6051 1181, -1, -1, 1184, 1185, -1, -1, -1, 1189, 1190,
6052 -1, 110, 111, 112, 113, 114, 115, 116, 117, 118,
6053 -1, -1, -1, -1, -1, 1082, 1083, -1, 1131, 1086,
6054 -1, 1134, 1135, 400, -1, -1, 403, 1140, -1, -1,
6055 923, -1, -1, 410, 411, -1, 1103, -1, 147, -1,
6056 -1, 1154, -1, -1, 1157, 1027, 1028, 940, -1, -1,
6057 -1, -1, 945, 946, 1245, -1, -1, -1, 951, 952,
6058 -1, -1, -1, 1176, -1, -1, -1, 960, 961, -1,
6059 -1, -1, 1139, -1, 451, -1, -1, -1, -1, -1,
6060 -1, -1, -1, 976, -1, 1198, -1, -1, -1, -1,
6061 -1, -1, -1, -1, -1, 1162, 473, -1, 1165, 1212,
6062 1082, 1083, 995, -1, 1086, 1296, -1, -1, -1, 1300,
6063 -1, 1302, 1179, -1, 1181, -1, -1, 1184, 1185, -1,
6064 -1, 1103, 1189, 1190, -1, 1018, 1019, 1020, -1, -1,
6065 -1, 508, -1, -1, -1, -1, -1, 1, -1, -1,
6066 -1, -1, 1035, -1, -1, -1, -1, -1, 525, -1,
6067 527, 15, 16, 1266, -1, -1, -1, 1139, -1, 1052,
6068 1273, 1274, -1, -1, -1, 1278, -1, -1, -1, -1,
6069 1361, 548, -1, -1, -1, -1, -1, 554, 1245, -1,
6070 1162, -1, -1, 1165, -1, -1, -1, -1, 52, 53,
6071 -1, -1, 56, -1, -1, -1, -1, 1179, -1, 1181,
6072 -1, -1, 1184, 1185, 1317, -1, -1, 1189, 1190, -1,
6073 -1, -1, -1, -1, -1, -1, -1, -1, 595, -1,
6074 -1, 598, -1, -1, -1, 89, -1, -1, -1, 1296,
6075 -1, 608, -1, 1300, 611, 1302, -1, -1, 1131, -1,
6076 -1, 1134, 1135, -1, 108, 109, 110, 1140, 112, -1,
6077 -1, 1027, 1028, -1, -1, -1, -1, -1, -1, -1,
6078 -1, 1154, -1, 1245, 1157, -1, -1, -1, -1, -1,
6079 -1, -1, -1, -1, -1, -1, -1, -1, 655, -1,
6080 657, -1, -1, 1176, -1, 1027, 1028, -1, 665, -1,
6081 -1, -1, -1, -1, 1361, -1, -1, -1, -1, 676,
6082 -1, 678, -1, -1, -1, 1198, 1082, 1083, -1, -1,
6083 1086, -1, 689, 690, 1296, -1, -1, -1, 1300, 1212,
6084 1302, -1, -1, -1, -1, -1, -1, 1103, -1, -1,
6085 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6086 1082, 1083, -1, -1, 1086, -1, 723, -1, -1, -1,
6087 -1, -1, 729, -1, -1, -1, -1, -1, -1, -1,
6088 -1, 1103, -1, 1139, -1, -1, 230, -1, -1, -1,
6089 -1, -1, -1, 1266, -1, -1, -1, -1, -1, 1361,
6090 1273, 1274, -1, -1, -1, 1278, 1162, -1, -1, 1165,
6091 -1, 255, -1, 257, -1, -1, -1, 1139, -1, -1,
6092 -1, -1, 266, 1179, -1, 1181, -1, -1, 1184, 1185,
6093 -1, -1, -1, 1189, 1190, 44, -1, -1, -1, -1,
6094 1162, 285, -1, 1165, 1317, -1, -1, -1, 805, -1,
6095 -1, -1, -1, -1, -1, -1, -1, 1179, -1, 1181,
6096 -1, 305, 1184, 1185, -1, -1, -1, 1189, 1190, 78,
6097 79, 80, 81, 82, 83, 84, 85, 86, 87, 88,
6098 89, 90, -1, -1, -1, -1, 95, 96, -1, 1245,
6099 -1, 335, -1, -1, -1, -1, -1, -1, -1, -1,
6100 -1, 858, -1, -1, -1, -1, -1, -1, -1, -1,
6101 -1, -1, -1, -1, -1, -1, -1, -1, -1, 363,
6102 364, -1, -1, 1245, 1, -1, 135, -1, 137, 138,
6103 139, 140, 141, 142, 143, 144, 145, 146, -1, -1,
6104 1296, -1, -1, -1, 1300, -1, 1302, -1, -1, -1,
6105 -1, -1, -1, -1, -1, -1, 400, -1, -1, 403,
6106 -1, -1, -1, -1, -1, -1, 410, 411, -1, -1,
6107 -1, -1, -1, -1, 1296, 52, 53, -1, 1300, 56,
6108 1302, -1, -1, 940, -1, -1, -1, -1, 945, 946,
6109 -1, -1, -1, -1, 951, 952, -1, -1, -1, -1,
6110 -1, -1, -1, 960, -1, 1361, -1, 451, -1, -1,
6111 -1, -1, 89, -1, -1, -1, -1, -1, -1, 976,
6112 -1, -1, -1, -1, -1, -1, -1, -1, -1, 473,
6113 -1, 108, 109, 110, -1, -1, -1, -1, 995, 1361,
6114 -1, -1, -1, -1, 52, 53, -1, -1, 56, -1,
6115 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6116 -1, 1018, 1019, 1020, 508, -1, -1, -1, 76, 77,
6117 78, 79, 80, 81, 82, 83, 84, -1, 1035, 87,
6118 88, 525, -1, 527, -1, 93, 94, 95, 96, -1,
6119 -1, -1, -1, -1, -1, 1052, -1, -1, -1, 107,
6120 108, -1, -1, -1, 548, -1, -1, -1, -1, -1,
6121 554, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6122 -1, -1, -1, -1, -1, -1, -1, -1, -1, 137,
6123 138, 139, 140, 141, 142, 143, 144, 145, 146, -1,
6124 148, 149, -1, -1, -1, -1, -1, -1, 156, -1,
6125 -1, 595, 1, 230, 598, -1, -1, -1, -1, -1,
6126 -1, -1, -1, -1, 608, -1, -1, 611, -1, -1,
6127 1127, -1, -1, -1, 1131, -1, -1, 1134, 1135, -1,
6128 -1, -1, -1, 1140, -1, -1, -1, -1, -1, 266,
6129 -1, -1, -1, -1, -1, -1, -1, 1154, -1, -1,
6130 1157, -1, -1, 52, 53, -1, -1, 56, 285, -1,
6131 -1, 655, -1, 657, -1, -1, -1, -1, -1, -1,
6132 -1, 665, -1, -1, -1, -1, -1, -1, 305, -1,
6133 -1, -1, 676, -1, 678, -1, -1, -1, -1, -1,
6134 89, 1198, -1, -1, -1, 689, 690, -1, -1, -1,
6135 -1, -1, -1, -1, -1, 1212, -1, -1, 335, 108,
6136 109, 110, 111, -1, -1, -1, -1, -1, -1, 1226,
6137 -1, -1, -1, -1, -1, -1, -1, -1, -1, 723,
6138 -1, -1, -1, -1, -1, 729, 363, 364, -1, -1,
6139 -1, -1, -1, 1, -1, -1, -1, -1, -1, -1,
6140 -1, -1, -1, -1, -1, -1, -1, -1, -1, 1266,
6141 78, 79, 80, 81, 82, 83, 84, 85, -1, 87,
6142 88, 1278, -1, -1, -1, -1, 403, 95, 96, -1,
6143 1287, -1, -1, 410, 411, -1, -1, -1, -1, -1,
6144 -1, -1, -1, -1, 52, 53, -1, -1, -1, -1,
6145 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6146 1317, 805, -1, -1, -1, -1, -1, -1, -1, 137,
6147 138, 139, 140, 141, 142, 143, 144, 145, 146, -1,
6148 -1, 230, -1, -1, 0, -1, -1, -1, -1, -1,
6149 -1, -1, 8, 9, 10, -1, -1, 13, 14, 15,
6150 108, 17, -1, -1, -1, -1, -1, -1, -1, 25,
6151 26, 27, -1, -1, 858, -1, 1, 266, -1, -1,
6152 -1, 37, 38, -1, 40, 41, 42, 43, 44, -1,
6153 -1, 508, -1, -1, -1, -1, 285, -1, -1, -1,
6154 -1, -1, -1, -1, -1, -1, -1, -1, 525, -1,
6155 -1, -1, 68, 69, -1, -1, 305, -1, -1, -1,
6156 -1, -1, -1, -1, -1, -1, -1, 52, 53, -1,
6157 -1, 548, -1, -1, -1, -1, -1, 554, -1, -1,
6158 -1, 97, 98, -1, -1, -1, 335, -1, -1, -1,
6159 -1, -1, -1, -1, -1, -1, 940, -1, -1, -1,
6160 -1, 945, 946, -1, 120, -1, -1, 951, 952, -1,
6161 -1, -1, -1, -1, 363, 364, 960, -1, 595, -1,
6162 -1, 598, 230, -1, -1, -1, -1, -1, -1, -1,
6163 -1, 608, 976, -1, 611, 151, 152, -1, 154, -1,
6164 -1, 157, 158, -1, 160, -1, -1, -1, -1, -1,
6165 -1, 995, -1, -1, 403, -1, -1, -1, 266, -1,
6166 -1, 410, 411, -1, -1, -1, -1, -1, -1, -1,
6167 -1, -1, -1, -1, 1018, 1019, 1020, 285, 655, -1,
6168 657, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6169 -1, 1035, -1, -1, -1, -1, -1, -1, -1, -1,
6170 -1, 678, -1, -1, -1, -1, -1, -1, 1052, -1,
6171 -1, -1, 689, 690, -1, -1, -1, -1, -1, -1,
6172 -1, -1, -1, -1, -1, -1, -1, 335, -1, -1,
6173 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6174 -1, -1, -1, -1, -1, 230, 723, -1, -1, -1,
6175 -1, -1, 729, -1, -1, 363, -1, -1, -1, 508,
6176 -1, 738, -1, -1, -1, -1, -1, -1, -1, -1,
6177 -1, -1, -1, -1, -1, -1, 525, -1, -1, -1,
6178 -1, 266, -1, 1127, -1, -1, -1, 1131, -1, -1,
6179 1134, 1135, -1, -1, -1, 403, 1140, -1, -1, 548,
6180 285, -1, 410, 411, -1, 554, -1, -1, -1, -1,
6181 1154, -1, -1, 1157, 33, 34, 35, 36, -1, -1,
6182 -1, -1, -1, -1, -1, -1, -1, -1, 805, -1,
6183 49, 50, 51, 52, -1, -1, -1, 56, -1, -1,
6184 59, 60, 61, 62, 63, -1, 595, -1, -1, 598,
6185 335, -1, -1, -1, 1198, -1, -1, -1, -1, 608,
6186 -1, -1, -1, -1, -1, -1, -1, -1, 1212, -1,
6187 -1, -1, 91, 92, -1, -1, -1, -1, 363, -1,
6188 99, 858, 1226, 102, -1, 104, 105, -1, 107, -1,
6189 -1, 110, 111, 112, 113, 114, 115, 116, 117, 118,
6190 508, -1, -1, -1, -1, -1, 655, -1, 657, -1,
6191 -1, -1, -1, -1, -1, -1, -1, -1, 403, -1,
6192 -1, 140, 1266, 52, 53, 410, 411, 56, 147, 678,
6193 -1, -1, -1, -1, 1278, 154, -1, -1, -1, -1,
6194 548, -1, -1, 1287, -1, -1, 554, 76, 77, 78,
6195 79, 80, 81, 82, 83, 84, -1, -1, 87, 88,
6196 -1, -1, -1, -1, 93, 94, 95, 96, 945, 946,
6197 -1, -1, -1, 1317, 951, 952, -1, -1, 107, 108,
6198 729, -1, -1, 960, -1, -1, -1, 595, -1, -1,
6199 598, -1, -1, -1, -1, -1, -1, -1, -1, 976,
6200 -1, -1, -1, 611, -1, -1, -1, -1, 137, 138,
6201 139, 140, 141, 142, 143, 144, 145, 146, 995, 148,
6202 149, -1, -1, 508, -1, -1, -1, 156, 78, 79,
6203 80, 81, 82, 83, 84, 85, 86, 87, 88, 89,
6204 90, 1018, 1019, 1020, -1, 95, 96, 655, -1, 657,
6205 -1, -1, -1, -1, -1, -1, 805, -1, 1035, -1,
6206 -1, -1, -1, 548, -1, -1, -1, -1, -1, 554,
6207 678, -1, -1, -1, -1, 1052, -1, -1, -1, -1,
6208 -1, 689, 690, -1, -1, 135, -1, 137, 138, 139,
6209 140, 141, 142, 143, 144, 145, 146, -1, -1, -1,
6210 -1, -1, -1, -1, 154, -1, -1, -1, -1, 858,
6211 595, -1, -1, 598, -1, 723, -1, 33, 34, 35,
6212 36, -1, -1, -1, -1, -1, 611, -1, -1, -1,
6213 -1, -1, -1, 49, 50, 51, 52, -1, -1, -1,
6214 56, -1, 58, 59, 60, 61, 62, 63, -1, -1,
6215 1127, -1, -1, -1, 1131, -1, -1, 1134, 1135, -1,
6216 -1, -1, 78, 1140, -1, -1, -1, -1, -1, -1,
6217 655, -1, 657, -1, -1, 91, 92, 1154, -1, -1,
6218 1157, -1, -1, 99, -1, -1, 102, -1, 104, 105,
6219 -1, 107, 108, 678, 110, 111, 112, 113, 114, 115,
6220 116, 117, 118, -1, 689, 690, -1, -1, -1, -1,
6221 -1, 960, -1, -1, -1, -1, -1, -1, -1, -1,
6222 -1, 1198, -1, -1, 140, -1, -1, 976, -1, -1,
6223 -1, 147, -1, -1, -1, 1212, -1, -1, 723, -1,
6224 -1, -1, -1, -1, -1, -1, 995, -1, -1, 1226,
6225 858, -1, 15, 16, 78, 79, 80, 81, 82, 83,
6226 84, 85, 86, 87, 88, 89, 90, -1, -1, 1018,
6227 1019, 95, 96, -1, -1, -1, -1, -1, -1, -1,
6228 -1, -1, -1, -1, 47, 48, 49, 50, -1, -1,
6229 -1, 54, 55, -1, -1, -1, -1, -1, -1, -1,
6230 -1, 1278, -1, 1052, 67, 68, -1, -1, -1, -1,
6231 1287, 135, -1, 137, 138, 139, 140, 141, 142, 143,
6232 144, 145, 146, -1, -1, -1, -1, -1, -1, -1,
6233 -1, -1, -1, -1, -1, -1, -1, 945, 946, -1,
6234 1317, -1, -1, 951, 952, -1, -1, -1, -1, 112,
6235 -1, -1, 960, -1, 78, 79, 80, 81, 82, 83,
6236 84, 85, 86, 87, 88, 89, 90, -1, 976, -1,
6237 -1, 95, 96, 858, -1, -1, -1, -1, 1127, -1,
6238 -1, -1, 1131, -1, -1, 1134, 1135, 995, -1, -1,
6239 -1, 1140, -1, -1, -1, -1, -1, -1, -1, -1,
6240 -1, -1, -1, -1, -1, 1154, -1, -1, 1157, -1,
6241 1018, 1019, 1020, 137, 138, 139, 140, 141, 142, 143,
6242 144, 145, 146, -1, -1, -1, -1, 1035, -1, -1,
6243 -1, -1, -1, -1, -1, -1, 78, 79, 80, 81,
6244 82, 83, 84, -1, 1052, 87, 88, -1, -1, 1198,
6245 -1, -1, -1, 95, 96, -1, -1, -1, -1, -1,
6246 945, 946, -1, 1212, -1, 228, 951, 952, 231, 232,
6247 233, -1, 235, -1, -1, 960, -1, 1226, -1, -1,
6248 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6249 -1, 976, 255, -1, 257, 137, 138, 139, 140, 141,
6250 142, 143, 144, 145, 146, -1, -1, -1, -1, -1,
6251 995, -1, -1, -1, -1, -1, -1, -1, -1, 1127,
6252 -1, -1, -1, 1131, -1, -1, 1134, 1135, -1, 1278,
6253 -1, -1, 1140, 1018, 1019, 1020, -1, -1, 1287, -1,
6254 -1, -1, -1, -1, -1, -1, 1154, -1, -1, 1157,
6255 1035, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6256 -1, -1, -1, -1, -1, -1, -1, 1052, 1317, -1,
6257 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6258 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6259 1198, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6260 -1, -1, -1, -1, 1212, 368, 369, 370, 371, 372,
6261 -1, -1, 375, 376, 377, 378, 379, 380, 381, 382,
6262 -1, 384, -1, -1, 387, 388, 389, 390, 391, 392,
6263 393, 394, 395, 396, -1, -1, -1, 400, -1, -1,
6264 -1, -1, -1, -1, -1, -1, 1131, -1, -1, 1134,
6265 1135, -1, -1, -1, -1, 1140, -1, -1, 78, 79,
6266 80, 81, 82, 83, 84, -1, -1, 87, 88, 1154,
6267 1278, -1, 1157, -1, -1, 95, 96, -1, -1, -1,
6268 -1, -1, -1, -1, -1, -1, -1, -1, 451, -1,
6269 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6270 -1, -1, -1, -1, -1, 468, 469, -1, -1, 1317,
6271 473, -1, -1, 1198, 477, -1, 479, 137, 138, 139,
6272 140, 141, 142, 143, 144, 145, 146, 1212, -1, 0,
6273 -1, -1, -1, -1, 497, -1, -1, 8, 9, 10,
6274 -1, -1, 13, 14, 15, -1, 17, -1, -1, 512,
6275 -1, -1, 515, -1, 25, 26, 27, 28, 29, -1,
6276 -1, -1, -1, -1, 527, -1, 37, 38, -1, 40,
6277 41, 42, 43, 44, -1, -1, -1, -1, -1, -1,
6278 -1, -1, 545, -1, -1, -1, -1, -1, -1, -1,
6279 -1, -1, -1, 1278, -1, -1, -1, 68, 69, -1,
6280 -1, -1, -1, -1, -1, -1, -1, 78, 79, 80,
6281 81, 82, 83, 84, 85, 86, 87, 88, 89, 90,
6282 -1, -1, -1, 586, 95, 96, 97, 98, -1, 100,
6283 101, 594, 1317, -1, 597, 106, -1, -1, -1, -1,
6284 -1, -1, -1, 606, -1, -1, -1, -1, 611, 120,
6285 -1, -1, 123, -1, -1, -1, -1, -1, -1, -1,
6286 -1, -1, -1, 134, 135, 136, 137, 138, 139, 140,
6287 141, 142, 143, 144, 145, 146, -1, -1, -1, -1,
6288 151, 152, 153, 154, 155, -1, -1, 158, 159, 160,
6289 -1, -1, 33, 34, 35, 36, -1, -1, -1, -1,
6290 -1, -1, 665, -1, -1, -1, -1, -1, 49, 50,
6291 51, 52, -1, 676, -1, 56, -1, -1, 59, 60,
6292 61, 62, 63, -1, -1, -1, 689, 690, -1, -1,
6293 693, 694, -1, -1, -1, -1, -1, -1, -1, -1,
6294 -1, -1, 705, 706, -1, -1, 709, -1, 711, -1,
6295 91, 92, -1, -1, -1, 718, 719, -1, 99, -1,
6296 723, 102, -1, 104, 105, -1, 107, -1, -1, 110,
6297 111, 112, 113, 114, 115, 116, 117, 118, -1, -1,
6298 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6299 -1, -1, -1, -1, -1, -1, -1, -1, -1, 140,
6300 -1, -1, -1, -1, 767, -1, 147, -1, -1, -1,
6301 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6302 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6303 -1, -1, 795, -1, -1, -1, -1, -1, 0, 1,
6304 -1, 3, 4, 5, 6, 7, 8, 9, 10, 11,
6305 12, -1, 14, 15, 16, 17, 18, 19, 20, 21,
6306 22, 23, 24, 25, 827, -1, -1, -1, 30, 31,
6307 32, 33, 34, 35, 36, -1, -1, 39, -1, -1,
6308 -1, -1, 845, 45, 46, 47, 48, 49, 50, 51,
6309 52, 53, 54, 55, 56, 57, -1, 59, 60, 61,
6310 62, 63, 64, 65, -1, -1, 68, -1, -1, -1,
6311 -1, -1, 875, -1, 76, 77, -1, -1, -1, -1,
6312 -1, -1, -1, -1, -1, -1, -1, -1, -1, 91,
6313 92, -1, -1, -1, -1, -1, -1, 99, -1, -1,
6314 102, 103, 104, 105, -1, 107, -1, -1, 110, 111,
6315 112, 113, 114, 115, 116, 117, 118, -1, 120, -1,
6316 923, -1, -1, -1, -1, -1, -1, -1, -1, 932,
6317 -1, -1, -1, -1, -1, -1, -1, 940, -1, -1,
6318 -1, 944, 945, 946, -1, 147, 148, 149, 951, 952,
6319 152, -1, 955, -1, -1, -1, 158, -1, 160, -1,
6320 -1, -1, -1, -1, 967, -1, -1, -1, -1, -1,
6321 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6322 -1, -1, 985, 986, -1, 988, 989, -1, 991, -1,
6323 993, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6324 -1, -1, -1, -1, -1, -1, -1, -1, -1, 1012,
6325 1013, -1, -1, 1016, -1, -1, -1, 1020, 1021, -1,
6326 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6327 -1, -1, 1035, -1, -1, -1, -1, -1, -1, 0,
6328 1, -1, 3, 4, 5, 6, 7, -1, 1051, -1,
6329 11, 12, -1, -1, -1, 16, 1059, 18, 19, 20,
6330 21, 22, 23, 24, -1, -1, -1, -1, -1, 30,
6331 31, 32, 33, 34, 35, 36, -1, -1, 39, -1,
6332 -1, -1, -1, -1, 45, 46, 47, 48, 49, 50,
6333 51, 52, 53, 54, 55, 56, 57, -1, 59, 60,
6334 61, 62, 63, 64, 65, -1, -1, -1, -1, -1,
6335 -1, -1, -1, -1, -1, 76, 77, -1, -1, -1,
6336 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6337 91, 92, -1, 1136, -1, -1, -1, -1, 99, -1,
6338 -1, 102, 103, 104, 105, -1, 107, -1, -1, 110,
6339 111, 112, 113, 114, 115, 116, 117, 118, -1, 120,
6340 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6341 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6342 -1, -1, -1, -1, -1, -1, 147, 148, 149, -1,
6343 -1, 0, 1, 154, 3, 4, 5, 6, 7, 160,
6344 -1, -1, 11, 12, -1, -1, -1, 16, -1, 18,
6345 19, 20, 21, 22, 23, 24, -1, -1, -1, -1,
6346 -1, 30, 31, 32, 33, 34, 35, 36, -1, -1,
6347 39, -1, -1, -1, -1, -1, 45, 46, 47, 48,
6348 49, 50, 51, 52, 53, 54, 55, 56, 57, -1,
6349 59, 60, 61, 62, 63, 64, 65, -1, -1, -1,
6350 -1, -1, -1, 1266, -1, -1, -1, 76, 77, -1,
6351 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6352 -1, -1, 91, 92, -1, -1, -1, -1, -1, -1,
6353 99, -1, -1, 102, 103, 104, 105, -1, 107, -1,
6354 -1, 110, 111, 112, 113, 114, 115, 116, 117, 118,
6355 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6356 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6357 -1, -1, -1, -1, -1, -1, -1, -1, 147, 148,
6358 149, -1, -1, 0, 1, 154, 3, 4, 5, 6,
6359 7, 160, -1, -1, 11, 12, -1, -1, -1, 16,
6360 -1, 18, 19, 20, 21, 22, 23, 24, -1, -1,
6361 -1, -1, -1, 30, 31, 32, 33, 34, 35, 36,
6362 -1, -1, 39, -1, -1, -1, -1, -1, 45, 46,
6363 47, 48, 49, 50, 51, 52, 53, 54, 55, 56,
6364 57, -1, 59, 60, 61, 62, 63, 64, 65, -1,
6365 -1, -1, -1, -1, -1, -1, -1, -1, -1, 76,
6366 77, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6367 -1, -1, -1, -1, 91, 92, -1, -1, -1, -1,
6368 -1, -1, 99, -1, -1, 102, 103, 104, 105, -1,
6369 107, -1, -1, 110, 111, 112, 113, 114, 115, 116,
6370 117, 118, -1, -1, -1, -1, -1, -1, -1, 0,
6371 -1, -1, -1, -1, -1, -1, -1, 8, 9, 10,
6372 -1, -1, 13, 14, 15, -1, 17, -1, -1, -1,
6373 147, 148, 149, -1, 25, 152, 27, 28, 29, -1,
6374 -1, -1, -1, 160, -1, -1, 37, 38, -1, 40,
6375 41, 42, 43, 44, -1, -1, -1, -1, -1, -1,
6376 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6377 -1, -1, -1, -1, -1, -1, -1, 68, 69, -1,
6378 -1, -1, -1, -1, -1, -1, -1, 78, 79, 80,
6379 81, 82, 83, 84, 85, 86, 87, 88, 89, 90,
6380 -1, -1, -1, -1, 95, 96, 97, 98, -1, 100,
6381 101, -1, -1, -1, -1, 106, -1, -1, -1, -1,
6382 -1, -1, -1, -1, -1, -1, -1, -1, -1, 120,
6383 -1, -1, 123, -1, -1, -1, -1, -1, -1, -1,
6384 -1, -1, -1, 134, 135, 136, 137, 138, 139, 140,
6385 141, 142, 143, 144, 145, 146, -1, -1, -1, -1,
6386 -1, 152, 153, 154, 155, 0, -1, 158, 159, 160,
6387 -1, -1, -1, 8, 9, 10, -1, -1, 13, 14,
6388 15, -1, 17, -1, -1, -1, -1, -1, -1, -1,
6389 25, -1, 27, 28, 29, -1, -1, -1, -1, -1,
6390 -1, -1, 37, 38, -1, 40, 41, 42, 43, 44,
6391 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6392 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6393 -1, -1, -1, 68, 69, -1, -1, -1, -1, -1,
6394 -1, -1, -1, 78, 79, 80, 81, 82, 83, 84,
6395 85, 86, 87, 88, 89, 90, -1, -1, -1, -1,
6396 95, 96, 97, 98, -1, 100, 101, -1, -1, -1,
6397 -1, 106, -1, -1, -1, -1, -1, -1, -1, -1,
6398 -1, -1, -1, -1, -1, 120, -1, -1, 123, -1,
6399 -1, -1, -1, -1, -1, -1, -1, -1, -1, 134,
6400 135, 136, 137, 138, 139, 140, 141, 142, 143, 144,
6401 145, 146, -1, -1, -1, -1, -1, 152, 153, 154,
6402 155, 0, -1, 158, 159, 160, -1, -1, -1, 8,
6403 9, 10, -1, -1, 13, 14, 15, -1, 17, -1,
6404 -1, -1, -1, -1, -1, -1, 25, 26, 27, 28,
6405 29, -1, -1, -1, -1, -1, -1, -1, 37, 38,
6406 -1, 40, 41, 42, 43, 44, -1, -1, -1, -1,
6407 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6408 -1, -1, -1, -1, -1, -1, -1, -1, -1, 68,
6409 69, -1, -1, -1, -1, -1, -1, -1, -1, 78,
6410 79, 80, 81, 82, 83, 84, 85, 86, 87, 88,
6411 89, 90, -1, -1, -1, -1, 95, 96, 97, 98,
6412 -1, -1, 101, -1, -1, -1, -1, 106, -1, -1,
6413 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6414 -1, 120, -1, -1, 123, -1, -1, -1, -1, -1,
6415 -1, -1, -1, -1, -1, -1, 135, 136, 137, 138,
6416 139, 140, 141, 142, 143, 144, 145, 146, -1, -1,
6417 -1, -1, 151, 152, 153, 154, 155, 0, -1, 158,
6418 159, 160, -1, -1, -1, 8, 9, 10, -1, -1,
6419 13, 14, 15, -1, 17, -1, -1, -1, -1, -1,
6420 -1, -1, 25, 26, 27, 28, 29, -1, -1, -1,
6421 -1, -1, -1, -1, 37, 38, -1, 40, 41, 42,
6422 43, 44, -1, -1, -1, -1, -1, -1, -1, -1,
6423 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6424 -1, -1, -1, -1, -1, 68, 69, -1, -1, -1,
6425 -1, -1, -1, -1, -1, 78, 79, 80, 81, 82,
6426 83, 84, 85, 86, 87, 88, 89, 90, -1, -1,
6427 -1, -1, 95, 96, 97, 98, -1, -1, 101, -1,
6428 -1, -1, -1, 106, -1, -1, -1, -1, -1, -1,
6429 -1, -1, -1, -1, -1, -1, -1, 120, -1, -1,
6430 123, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6431 -1, -1, 135, 136, 137, 138, 139, 140, 141, 142,
6432 143, 144, 145, 146, -1, -1, -1, -1, 151, 152,
6433 153, 154, 155, 0, -1, 158, 159, 160, -1, -1,
6434 -1, 8, 9, 10, -1, -1, 13, 14, 15, -1,
6435 17, -1, -1, -1, -1, -1, -1, -1, 25, 26,
6436 27, 28, -1, -1, -1, -1, -1, -1, -1, -1,
6437 37, 38, -1, 40, 41, 42, 43, 44, -1, -1,
6438 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6439 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6440 -1, 68, 69, -1, -1, -1, -1, -1, -1, -1,
6441 -1, 78, 79, 80, 81, 82, 83, 84, 85, 86,
6442 87, 88, 89, 90, -1, -1, -1, -1, 95, 96,
6443 97, 98, -1, -1, 101, -1, -1, -1, -1, 106,
6444 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6445 -1, -1, -1, 120, -1, -1, -1, -1, -1, -1,
6446 -1, -1, -1, -1, -1, -1, -1, -1, 135, -1,
6447 137, 138, 139, 140, 141, 142, 143, 144, 145, 146,
6448 -1, -1, -1, -1, 151, 152, 153, 154, 155, 0,
6449 157, 158, 159, 160, -1, -1, -1, 8, 9, 10,
6450 -1, -1, 13, 14, 15, -1, 17, -1, -1, -1,
6451 -1, -1, -1, -1, 25, -1, 27, 28, 29, -1,
6452 -1, -1, -1, -1, -1, -1, 37, 38, -1, 40,
6453 41, 42, 43, 44, -1, -1, -1, -1, -1, -1,
6454 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6455 -1, -1, -1, -1, -1, -1, -1, 68, 69, -1,
6456 -1, -1, -1, -1, -1, -1, -1, 78, 79, 80,
6457 81, 82, 83, 84, 85, 86, 87, 88, 89, 90,
6458 -1, -1, -1, -1, 95, 96, 97, 98, -1, -1,
6459 101, -1, -1, -1, -1, 106, -1, -1, -1, -1,
6460 -1, -1, -1, -1, -1, -1, -1, -1, -1, 120,
6461 -1, -1, 123, -1, -1, -1, -1, -1, -1, -1,
6462 -1, -1, -1, -1, 135, 136, 137, 138, 139, 140,
6463 141, 142, 143, 144, 145, 146, -1, -1, -1, -1,
6464 -1, 152, 153, 154, 155, 0, -1, 158, 159, 160,
6465 -1, -1, -1, 8, 9, 10, -1, -1, 13, 14,
6466 15, -1, 17, -1, -1, -1, -1, -1, -1, -1,
6467 25, 26, 27, 28, -1, -1, -1, -1, -1, -1,
6468 -1, -1, 37, 38, -1, 40, 41, 42, 43, 44,
6469 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6470 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6471 -1, -1, -1, 68, 69, -1, -1, -1, -1, -1,
6472 -1, -1, -1, 78, 79, 80, 81, 82, 83, 84,
6473 85, 86, 87, 88, 89, 90, -1, -1, -1, -1,
6474 95, 96, 97, 98, -1, -1, 101, -1, -1, -1,
6475 -1, 106, -1, -1, -1, -1, -1, -1, -1, -1,
6476 -1, -1, -1, -1, -1, 120, -1, -1, -1, -1,
6477 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6478 135, -1, 137, 138, 139, 140, 141, 142, 143, 144,
6479 145, 146, -1, -1, -1, -1, 151, 152, 153, 154,
6480 155, 0, 157, 158, 159, 160, -1, -1, -1, 8,
6481 9, 10, -1, -1, 13, 14, 15, -1, 17, -1,
6482 -1, -1, -1, -1, -1, -1, 25, -1, 27, 28,
6483 -1, -1, -1, -1, -1, -1, -1, -1, 37, 38,
6484 -1, 40, 41, 42, 43, 44, -1, -1, -1, -1,
6485 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6486 -1, -1, -1, -1, -1, -1, -1, -1, -1, 68,
6487 69, -1, -1, -1, -1, -1, -1, -1, -1, 78,
6488 79, 80, 81, 82, 83, 84, 85, 86, 87, 88,
6489 89, 90, -1, -1, -1, -1, 95, 96, 97, 98,
6490 -1, 100, 101, -1, -1, -1, -1, 106, -1, -1,
6491 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6492 -1, 120, -1, -1, -1, -1, -1, -1, -1, -1,
6493 -1, -1, -1, -1, -1, 134, 135, -1, 137, 138,
6494 139, 140, 141, 142, 143, 144, 145, 146, -1, -1,
6495 -1, -1, 151, 152, 153, 154, 155, 0, -1, 158,
6496 159, 160, -1, -1, -1, 8, 9, 10, -1, -1,
6497 13, 14, 15, -1, 17, -1, -1, -1, -1, -1,
6498 -1, -1, 25, -1, 27, 28, -1, -1, -1, -1,
6499 -1, -1, -1, -1, 37, 38, -1, 40, 41, 42,
6500 43, 44, -1, -1, -1, -1, -1, -1, -1, -1,
6501 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6502 -1, -1, -1, -1, -1, 68, 69, -1, -1, -1,
6503 -1, -1, -1, -1, -1, 78, 79, 80, 81, 82,
6504 83, 84, 85, 86, 87, 88, 89, 90, -1, -1,
6505 -1, -1, 95, 96, 97, 98, -1, -1, 101, -1,
6506 -1, -1, -1, 106, -1, -1, -1, -1, -1, -1,
6507 -1, -1, -1, -1, -1, -1, -1, 120, -1, -1,
6508 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6509 -1, -1, 135, -1, 137, 138, 139, 140, 141, 142,
6510 143, 144, 145, 146, -1, -1, -1, -1, -1, 152,
6511 153, 154, 155, 0, 157, 158, 159, 160, -1, -1,
6512 -1, 8, 9, 10, -1, -1, -1, 14, 15, -1,
6513 17, -1, -1, -1, -1, -1, -1, -1, 25, 26,
6514 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6515 37, 38, -1, 40, 41, 42, 43, 44, -1, -1,
6516 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6517 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6518 -1, 68, 69, -1, -1, -1, -1, -1, -1, -1,
6519 -1, 78, 79, 80, 81, 82, 83, 84, 85, 86,
6520 87, 88, 89, 90, -1, -1, -1, -1, 95, 96,
6521 97, 98, -1, 100, 101, -1, -1, -1, -1, -1,
6522 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6523 -1, -1, -1, 120, -1, -1, -1, -1, -1, -1,
6524 -1, -1, -1, -1, -1, -1, -1, 134, 135, -1,
6525 137, 138, 139, 140, 141, 142, 143, 144, 145, 146,
6526 -1, -1, -1, -1, 151, 152, 153, 154, 155, 0,
6527 -1, 158, -1, 160, -1, -1, -1, 8, 9, 10,
6528 -1, -1, -1, 14, 15, -1, 17, -1, -1, -1,
6529 -1, -1, -1, -1, 25, 26, -1, -1, -1, -1,
6530 -1, -1, -1, -1, -1, -1, 37, 38, -1, 40,
6531 41, 42, 43, 44, -1, -1, -1, -1, -1, -1,
6532 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6533 -1, -1, -1, -1, -1, -1, -1, 68, 69, -1,
6534 -1, -1, -1, -1, -1, -1, -1, 78, 79, 80,
6535 81, 82, 83, 84, 85, 86, 87, 88, 89, 90,
6536 -1, -1, -1, -1, 95, 96, 97, 98, -1, 100,
6537 101, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6538 -1, -1, -1, -1, -1, -1, -1, -1, -1, 120,
6539 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6540 -1, -1, -1, 134, 135, -1, 137, 138, 139, 140,
6541 141, 142, 143, 144, 145, 146, -1, -1, -1, -1,
6542 151, 152, 153, 154, 155, 0, -1, 158, -1, 160,
6543 -1, -1, -1, 8, 9, 10, -1, -1, -1, 14,
6544 15, -1, 17, -1, -1, -1, -1, -1, -1, -1,
6545 25, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6546 -1, -1, 37, 38, -1, 40, 41, 42, 43, 44,
6547 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6548 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6549 -1, -1, -1, 68, 69, -1, -1, -1, -1, -1,
6550 -1, -1, -1, 78, 79, 80, 81, 82, 83, 84,
6551 85, 86, 87, 88, 89, 90, -1, -1, -1, -1,
6552 95, 96, 97, 98, -1, 100, 101, -1, -1, -1,
6553 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6554 -1, -1, -1, -1, -1, 120, -1, -1, -1, -1,
6555 -1, -1, -1, -1, -1, -1, -1, -1, -1, 134,
6556 135, -1, 137, 138, 139, 140, 141, 142, 143, 144,
6557 145, 146, -1, -1, -1, -1, 151, 152, 153, 154,
6558 155, 0, -1, 158, -1, 160, -1, -1, -1, 8,
6559 9, 10, -1, -1, -1, 14, 15, -1, 17, -1,
6560 -1, -1, -1, -1, -1, -1, 25, -1, -1, -1,
6561 -1, -1, -1, -1, -1, -1, -1, -1, 37, 38,
6562 -1, 40, 41, 42, 43, 44, -1, -1, -1, -1,
6563 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6564 -1, -1, -1, -1, -1, -1, -1, -1, -1, 68,
6565 69, -1, -1, -1, -1, -1, -1, -1, -1, 78,
6566 79, 80, 81, 82, 83, 84, 85, 86, 87, 88,
6567 89, 90, -1, -1, -1, -1, 95, 96, 97, 98,
6568 -1, 100, 101, -1, -1, -1, -1, -1, -1, -1,
6569 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6570 -1, 120, -1, -1, -1, -1, -1, -1, -1, -1,
6571 -1, -1, -1, -1, -1, 134, 135, -1, 137, 138,
6572 139, 140, 141, 142, 143, 144, 145, 146, -1, -1,
6573 -1, -1, 151, 152, 153, 154, 155, -1, -1, 158,
6574 1, 160, 3, 4, 5, 6, 7, 8, 9, 10,
6575 11, 12, -1, -1, 15, 16, -1, 18, 19, 20,
6576 21, 22, 23, 24, -1, -1, -1, -1, -1, 30,
6577 31, 32, 33, 34, 35, 36, -1, -1, 39, -1,
6578 -1, -1, -1, -1, 45, 46, 47, 48, 49, 50,
6579 51, 52, 53, 54, 55, 56, 57, -1, 59, 60,
6580 61, 62, 63, 64, 65, -1, -1, 68, -1, -1,
6581 -1, -1, -1, -1, -1, 76, 77, -1, -1, -1,
6582 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6583 91, 92, -1, -1, -1, -1, -1, -1, 99, -1,
6584 -1, 102, 103, 104, 105, -1, 107, -1, -1, 110,
6585 111, 112, 113, 114, 115, 116, 117, 118, -1, -1,
6586 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6587 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6588 -1, -1, -1, -1, -1, -1, 147, 148, 149, -1,
6589 -1, -1, 1, 154, 3, 4, 5, 6, 7, 160,
6590 -1, 10, 11, 12, -1, 14, 15, 16, -1, 18,
6591 19, 20, 21, 22, 23, 24, -1, -1, -1, -1,
6592 -1, 30, 31, 32, 33, 34, 35, 36, -1, -1,
6593 39, -1, -1, -1, -1, -1, 45, 46, 47, 48,
6594 49, 50, 51, 52, 53, 54, 55, 56, 57, -1,
6595 59, 60, 61, 62, 63, 64, 65, -1, -1, 68,
6596 -1, -1, -1, -1, -1, -1, -1, 76, 77, -1,
6597 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6598 -1, -1, 91, 92, -1, -1, -1, -1, -1, -1,
6599 99, -1, -1, 102, 103, 104, 105, -1, 107, -1,
6600 -1, 110, 111, 112, 113, 114, 115, 116, 117, 118,
6601 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6602 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6603 -1, -1, -1, -1, -1, -1, -1, -1, 147, 148,
6604 149, -1, -1, -1, 1, 154, 3, 4, 5, 6,
6605 7, 160, -1, 10, 11, 12, -1, -1, 15, 16,
6606 17, 18, 19, 20, 21, 22, 23, 24, -1, -1,
6607 -1, -1, -1, 30, 31, 32, 33, 34, 35, 36,
6608 -1, -1, 39, -1, -1, -1, -1, -1, 45, 46,
6609 47, 48, 49, 50, 51, 52, 53, 54, 55, 56,
6610 57, -1, 59, 60, 61, 62, 63, 64, 65, -1,
6611 -1, 68, -1, -1, -1, -1, -1, -1, -1, 76,
6612 77, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6613 -1, -1, -1, -1, 91, 92, -1, -1, -1, -1,
6614 -1, -1, 99, -1, -1, 102, 103, 104, 105, -1,
6615 107, -1, -1, 110, 111, 112, 113, 114, 115, 116,
6616 117, 118, -1, -1, -1, -1, -1, -1, -1, -1,
6617 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6618 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6619 147, 148, 149, -1, -1, -1, 1, 154, 3, 4,
6620 5, 6, 7, 160, -1, 10, 11, 12, -1, -1,
6621 15, 16, -1, 18, 19, 20, 21, 22, 23, 24,
6622 25, -1, -1, -1, -1, 30, 31, 32, 33, 34,
6623 35, 36, -1, -1, 39, -1, -1, -1, -1, -1,
6624 45, 46, 47, 48, 49, 50, 51, 52, 53, 54,
6625 55, 56, 57, -1, 59, 60, 61, 62, 63, 64,
6626 65, -1, -1, 68, -1, -1, -1, -1, -1, -1,
6627 -1, 76, 77, -1, -1, -1, -1, -1, -1, -1,
6628 -1, -1, -1, -1, -1, -1, 91, 92, -1, -1,
6629 -1, -1, -1, -1, 99, -1, -1, 102, 103, 104,
6630 105, -1, 107, -1, -1, 110, 111, 112, 113, 114,
6631 115, 116, 117, 118, -1, -1, -1, -1, -1, -1,
6632 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6633 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6634 -1, -1, 147, 148, 149, -1, -1, -1, 1, 154,
6635 3, 4, 5, 6, 7, 160, -1, 10, 11, 12,
6636 -1, -1, 15, 16, -1, 18, 19, 20, 21, 22,
6637 23, 24, -1, -1, -1, -1, -1, 30, 31, 32,
6638 33, 34, 35, 36, -1, -1, 39, -1, -1, -1,
6639 -1, -1, 45, 46, 47, 48, 49, 50, 51, 52,
6640 53, 54, 55, 56, 57, -1, 59, 60, 61, 62,
6641 63, 64, 65, -1, -1, 68, -1, -1, -1, -1,
6642 -1, -1, -1, 76, 77, -1, -1, -1, -1, -1,
6643 -1, -1, -1, -1, -1, -1, -1, -1, 91, 92,
6644 -1, -1, -1, -1, -1, -1, 99, -1, -1, 102,
6645 103, 104, 105, -1, 107, -1, -1, 110, 111, 112,
6646 113, 114, 115, 116, 117, 118, -1, -1, -1, -1,
6647 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6648 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6649 -1, -1, -1, -1, 147, 148, 149, -1, -1, -1,
6650 1, 154, 3, 4, 5, 6, 7, 160, 9, 10,
6651 11, 12, -1, -1, -1, 16, -1, 18, 19, 20,
6652 21, 22, 23, 24, -1, -1, -1, -1, -1, 30,
6653 31, 32, 33, 34, 35, 36, -1, -1, 39, -1,
6654 -1, -1, -1, -1, 45, 46, 47, 48, 49, 50,
6655 51, 52, 53, 54, 55, 56, 57, -1, 59, 60,
6656 61, 62, 63, 64, 65, -1, -1, 68, -1, -1,
6657 -1, -1, -1, -1, -1, 76, 77, -1, -1, -1,
6658 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6659 91, 92, -1, -1, -1, -1, -1, -1, 99, -1,
6660 -1, 102, 103, 104, 105, -1, 107, -1, -1, 110,
6661 111, 112, 113, 114, 115, 116, 117, 118, -1, -1,
6662 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6663 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6664 -1, -1, -1, -1, -1, -1, 147, 148, 149, -1,
6665 -1, -1, 1, 154, 3, 4, 5, 6, 7, 160,
6666 -1, 10, 11, 12, -1, -1, -1, 16, -1, 18,
6667 19, 20, 21, 22, 23, 24, -1, -1, -1, -1,
6668 -1, 30, 31, 32, 33, 34, 35, 36, -1, -1,
6669 39, -1, -1, -1, -1, -1, 45, 46, 47, 48,
6670 49, 50, 51, 52, 53, 54, 55, 56, 57, -1,
6671 59, 60, 61, 62, 63, 64, 65, -1, -1, 68,
6672 -1, -1, -1, -1, -1, -1, -1, 76, 77, -1,
6673 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6674 -1, -1, 91, 92, -1, -1, -1, -1, -1, -1,
6675 99, -1, -1, 102, 103, 104, 105, -1, 107, -1,
6676 -1, 110, 111, 112, 113, 114, 115, 116, 117, 118,
6677 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6678 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6679 -1, -1, -1, -1, -1, -1, -1, -1, 147, 148,
6680 149, -1, -1, -1, 1, 154, 3, 4, 5, 6,
6681 7, 160, -1, -1, 11, 12, -1, -1, -1, 16,
6682 -1, 18, 19, 20, 21, 22, 23, 24, -1, -1,
6683 -1, -1, -1, 30, 31, 32, 33, 34, 35, 36,
6684 -1, -1, 39, -1, -1, -1, -1, -1, 45, 46,
6685 47, 48, 49, 50, 51, 52, 53, 54, 55, 56,
6686 57, -1, 59, 60, 61, 62, 63, 64, 65, -1,
6687 -1, -1, -1, -1, -1, -1, -1, -1, -1, 76,
6688 77, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6689 -1, -1, -1, -1, 91, 92, -1, -1, -1, -1,
6690 -1, -1, 99, -1, -1, 102, 103, 104, 105, -1,
6691 107, -1, -1, 110, 111, 112, 113, 114, 115, 116,
6692 117, 118, -1, -1, -1, -1, -1, -1, -1, -1,
6693 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6694 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6695 147, 148, 149, -1, -1, -1, -1, 154, -1, -1,
6696 -1, 158, 1, 160, 3, 4, 5, 6, 7, -1,
6697 -1, -1, 11, 12, -1, -1, -1, 16, -1, 18,
6698 19, 20, 21, 22, 23, 24, -1, -1, -1, -1,
6699 -1, 30, 31, 32, 33, 34, 35, 36, -1, -1,
6700 39, -1, -1, -1, -1, -1, 45, 46, 47, 48,
6701 49, 50, 51, 52, 53, 54, 55, 56, 57, -1,
6702 59, 60, 61, 62, 63, 64, 65, -1, -1, -1,
6703 -1, -1, -1, -1, -1, -1, -1, 76, 77, -1,
6704 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6705 -1, -1, 91, 92, -1, -1, -1, -1, -1, -1,
6706 99, -1, -1, 102, 103, 104, 105, -1, 107, -1,
6707 -1, 110, 111, 112, 113, 114, 115, 116, 117, 118,
6708 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6709 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6710 -1, -1, -1, -1, -1, -1, -1, -1, 147, 148,
6711 149, -1, -1, -1, -1, 154, -1, -1, -1, 158,
6712 1, 160, 3, 4, 5, 6, 7, -1, -1, -1,
6713 11, 12, -1, -1, -1, 16, -1, 18, 19, 20,
6714 21, 22, 23, 24, -1, -1, -1, -1, -1, 30,
6715 31, 32, 33, 34, 35, 36, -1, -1, 39, -1,
6716 -1, -1, -1, -1, 45, 46, 47, 48, 49, 50,
6717 51, 52, 53, 54, 55, 56, 57, -1, 59, 60,
6718 61, 62, 63, 64, 65, -1, -1, -1, -1, -1,
6719 -1, -1, -1, -1, -1, 76, 77, -1, -1, -1,
6720 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6721 91, 92, -1, -1, -1, -1, -1, -1, 99, -1,
6722 -1, 102, 103, 104, 105, -1, 107, -1, -1, 110,
6723 111, 112, 113, 114, 115, 116, 117, 118, -1, -1,
6724 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6725 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6726 -1, -1, -1, -1, -1, -1, 147, 148, 149, -1,
6727 -1, 152, 1, 154, 3, 4, 5, 6, 7, 160,
6728 -1, -1, 11, 12, -1, -1, -1, 16, -1, 18,
6729 19, 20, 21, 22, 23, 24, -1, -1, -1, -1,
6730 -1, 30, 31, 32, 33, 34, 35, 36, -1, -1,
6731 39, -1, -1, -1, -1, -1, 45, 46, 47, 48,
6732 49, 50, 51, 52, 53, 54, 55, 56, 57, -1,
6733 59, 60, 61, 62, 63, 64, 65, -1, -1, -1,
6734 -1, -1, -1, -1, -1, -1, -1, 76, 77, -1,
6735 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6736 -1, -1, 91, 92, -1, -1, -1, -1, -1, -1,
6737 99, -1, -1, 102, 103, 104, 105, -1, 107, -1,
6738 -1, 110, 111, 112, 113, 114, 115, 116, 117, 118,
6739 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6740 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6741 -1, -1, -1, -1, -1, -1, -1, -1, 147, 148,
6742 149, -1, -1, 152, 1, 154, 3, 4, 5, -1,
6743 7, 160, -1, -1, 11, 12, -1, -1, -1, 16,
6744 17, 18, 19, 20, 21, 22, 23, 24, -1, -1,
6745 -1, -1, -1, 30, 31, 32, 33, 34, 35, 36,
6746 -1, -1, 39, -1, -1, -1, -1, -1, -1, 46,
6747 -1, -1, 49, 50, 51, 52, 53, 54, 55, 56,
6748 57, -1, 59, 60, 61, 62, 63, 64, 65, -1,
6749 -1, -1, -1, -1, -1, -1, -1, -1, -1, 76,
6750 77, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6751 -1, -1, -1, -1, 91, 92, -1, -1, -1, -1,
6752 -1, -1, 99, -1, -1, 102, 103, 104, 105, -1,
6753 -1, -1, -1, 110, 111, 112, 113, 114, 115, 116,
6754 117, 118, -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, -1, -1,
6757 147, 148, 149, -1, -1, -1, -1, 154, -1, -1,
6758 -1, -1, -1, 160, 3, 4, 5, 6, 7, 8,
6759 9, 10, 11, 12, 13, 14, 15, 16, 17, 18,
6760 19, 20, 21, 22, 23, 24, 25, 26, -1, -1,
6761 -1, 30, 31, 32, 33, 34, 35, 36, 37, 38,
6762 39, -1, -1, -1, -1, -1, 45, 46, 47, 48,
6763 49, 50, 51, 52, 53, 54, 55, 56, 57, -1,
6764 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6765 -1, -1, -1, -1, -1, -1, -1, 76, 77, 78,
6766 79, 80, 81, 82, 83, 84, -1, -1, 87, 88,
6767 -1, -1, -1, -1, 93, 94, 95, 96, -1, -1,
6768 -1, -1, -1, -1, -1, -1, -1, -1, 107, 108,
6769 -1, -1, -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, 137, 138,
6772 139, 140, 141, 142, 143, 144, 145, 146, -1, 148,
6773 149, -1, -1, -1, -1, -1, -1, 156, 157, 3,
6774 4, 5, 6, 7, 8, 9, 10, 11, 12, 13,
6775 14, 15, 16, 17, 18, 19, 20, 21, 22, 23,
6776 24, 25, 26, -1, -1, -1, 30, 31, 32, 33,
6777 34, 35, 36, 37, 38, 39, -1, -1, -1, -1,
6778 -1, 45, 46, 47, 48, 49, 50, 51, 52, 53,
6779 54, 55, 56, 57, -1, -1, -1, -1, -1, -1,
6780 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6781 -1, -1, 76, 77, 78, 79, 80, 81, 82, 83,
6782 84, -1, -1, 87, 88, -1, -1, -1, -1, 93,
6783 94, 95, 96, -1, -1, -1, -1, -1, -1, -1,
6784 -1, -1, -1, 107, 108, -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, -1, 137, 138, 139, 140, 141, 142, 143,
6788 144, 145, 146, -1, 148, 149, -1, -1, -1, -1,
6789 -1, -1, 156, 3, 4, 5, 6, 7, 8, 9,
6790 10, 11, 12, 13, 14, 15, 16, 17, 18, 19,
6791 20, 21, 22, 23, 24, 25, 26, -1, -1, -1,
6792 30, 31, 32, 33, 34, 35, 36, 37, 38, 39,
6793 -1, -1, -1, -1, -1, 45, 46, 47, 48, 49,
6794 50, 51, 52, 53, 54, -1, 56, -1, -1, -1,
6795 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6796 -1, -1, -1, -1, -1, -1, 76, 77, 78, 79,
6797 80, 81, 82, 83, 84, -1, -1, 87, 88, -1,
6798 -1, -1, -1, 93, 94, 95, 96, -1, -1, -1,
6799 -1, -1, -1, -1, -1, -1, -1, 107, 108, -1,
6800 -1, 111, -1, -1, -1, -1, -1, -1, -1, -1,
6801 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6802 -1, -1, -1, -1, -1, -1, -1, 137, 138, 139,
6803 140, 141, 142, 143, 144, 145, 146, -1, 148, 149,
6804 -1, -1, -1, -1, -1, -1, 156, 3, 4, 5,
6805 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
6806 16, 17, 18, 19, 20, 21, 22, 23, 24, 25,
6807 26, -1, -1, -1, 30, 31, 32, 33, 34, 35,
6808 36, 37, 38, 39, -1, -1, -1, -1, -1, 45,
6809 46, 47, 48, 49, 50, 51, 52, 53, -1, -1,
6810 56, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6811 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6812 76, 77, 78, 79, 80, 81, 82, 83, 84, -1,
6813 -1, 87, 88, -1, -1, -1, -1, 93, 94, 95,
6814 96, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6815 -1, 107, 108, -1, -1, 111, -1, -1, -1, -1,
6816 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6817 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6818 -1, 137, 138, 139, 140, 141, 142, 143, 144, 145,
6819 146, -1, 148, 149, -1, -1, -1, -1, -1, -1,
6820 156, 3, 4, 5, 6, 7, 8, 9, 10, 11,
6821 12, 13, 14, 15, 16, 17, 18, 19, 20, 21,
6822 22, 23, 24, 25, 26, -1, -1, -1, 30, 31,
6823 32, 33, 34, 35, 36, 37, 38, 39, -1, -1,
6824 -1, -1, -1, 45, 46, 47, 48, 49, 50, 51,
6825 52, 53, -1, -1, 56, -1, -1, -1, -1, -1,
6826 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6827 -1, -1, -1, -1, 76, 77, 78, 79, 80, 81,
6828 82, 83, 84, -1, -1, 87, 88, -1, -1, -1,
6829 -1, 93, 94, 95, 96, -1, -1, -1, -1, -1,
6830 -1, -1, -1, -1, -1, 107, 108, -1, -1, -1,
6831 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6832 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6833 -1, -1, -1, -1, -1, 137, 138, 139, 140, 141,
6834 142, 143, 144, 145, 146, -1, 148, 149, 3, 4,
6835 5, -1, 7, -1, 156, -1, 11, 12, -1, -1,
6836 -1, 16, -1, 18, 19, 20, 21, 22, 23, 24,
6837 -1, -1, -1, -1, -1, 30, 31, 32, 33, 34,
6838 35, 36, -1, -1, 39, -1, -1, -1, -1, -1,
6839 -1, 46, -1, -1, 49, 50, 51, 52, 53, 54,
6840 55, 56, 57, -1, 59, 60, 61, 62, 63, 64,
6841 65, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6842 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6843 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6844 -1, -1, -1, -1, 99, -1, -1, 102, 103, 104,
6845 105, -1, -1, -1, -1, 110, 111, 112, 113, 114,
6846 115, 116, 117, 118, -1, -1, 3, 4, 5, -1,
6847 7, -1, -1, -1, 11, 12, -1, -1, -1, 16,
6848 -1, 18, 19, 20, 21, 22, 23, 24, -1, -1,
6849 -1, -1, 147, 30, 31, 32, 33, 34, 35, 36,
6850 155, -1, 39, -1, -1, -1, -1, -1, -1, 46,
6851 -1, -1, 49, 50, 51, 52, 53, 54, 55, 56,
6852 57, -1, 59, 60, 61, 62, 63, 64, 65, -1,
6853 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6854 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6855 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6856 -1, -1, 99, -1, -1, 102, 103, 104, 105, -1,
6857 -1, -1, -1, 110, 111, 112, 113, 114, 115, 116,
6858 117, 118, -1, -1, 3, 4, 5, -1, 7, -1,
6859 -1, -1, 11, 12, -1, -1, -1, 16, -1, 18,
6860 19, 20, 21, 22, 23, 24, -1, -1, -1, -1,
6861 147, 30, 31, 32, 33, 34, 35, 36, 155, -1,
6862 39, -1, -1, -1, -1, -1, -1, 46, -1, -1,
6863 49, 50, 51, 52, 53, 54, 55, 56, 57, 58,
6864 59, 60, 61, 62, 63, 64, 65, -1, -1, -1,
6865 -1, -1, -1, -1, -1, -1, -1, 76, 77, -1,
6866 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6867 -1, -1, 91, 92, -1, -1, -1, -1, -1, -1,
6868 99, -1, -1, 102, 103, 104, 105, -1, 107, 108,
6869 109, 110, 111, 112, 113, 114, 115, 116, 117, 118,
6870 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6871 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6872 -1, -1, -1, 3, 4, 5, -1, 7, 147, 148,
6873 149, 11, 12, -1, -1, 154, 16, -1, 18, 19,
6874 20, 21, 22, 23, 24, -1, -1, -1, -1, -1,
6875 30, 31, 32, 33, 34, 35, 36, -1, -1, 39,
6876 -1, -1, -1, -1, -1, -1, 46, -1, -1, 49,
6877 50, 51, 52, 53, 54, 55, 56, 57, -1, 59,
6878 60, 61, 62, 63, 64, 65, -1, -1, -1, -1,
6879 -1, -1, -1, -1, -1, -1, 76, 77, -1, -1,
6880 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6881 -1, 91, 92, -1, -1, -1, -1, -1, -1, 99,
6882 -1, -1, 102, 103, 104, 105, -1, -1, -1, -1,
6883 110, 111, 112, 113, 114, 115, 116, 117, 118, -1,
6884 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6885 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6886 1, -1, 3, 4, 5, 6, 7, 147, 148, 149,
6887 11, 12, -1, -1, 154, 16, -1, 18, 19, 20,
6888 21, 22, 23, 24, -1, -1, -1, -1, -1, 30,
6889 31, 32, 33, 34, 35, 36, -1, -1, 39, -1,
6890 -1, -1, -1, -1, 45, 46, -1, 48, 49, 50,
6891 51, 52, 53, 54, 55, 56, 57, -1, 59, 60,
6892 61, 62, 63, 64, 65, -1, -1, -1, -1, -1,
6893 -1, -1, -1, -1, -1, 76, 77, -1, -1, -1,
6894 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6895 91, 92, -1, -1, -1, -1, -1, -1, 99, -1,
6896 -1, 102, 103, 104, 105, -1, 107, -1, -1, 110,
6897 111, 112, 113, 114, 115, 116, 117, 118, -1, -1,
6898 1, -1, 3, 4, 5, -1, 7, -1, -1, -1,
6899 11, 12, -1, -1, -1, 16, -1, 18, 19, 20,
6900 21, 22, 23, 24, -1, -1, 147, 148, 149, 30,
6901 31, 32, 33, 34, 35, 36, -1, -1, 39, -1,
6902 -1, -1, -1, -1, -1, 46, -1, -1, 49, 50,
6903 51, 52, 53, 54, 55, 56, 57, -1, 59, 60,
6904 61, 62, 63, 64, 65, -1, -1, -1, -1, -1,
6905 -1, -1, -1, -1, -1, 76, 77, -1, -1, -1,
6906 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6907 91, 92, -1, -1, -1, -1, -1, -1, 99, -1,
6908 -1, 102, 103, 104, 105, -1, -1, -1, -1, 110,
6909 111, 112, 113, 114, 115, 116, 117, 118, -1, -1,
6910 -1, -1, 3, 4, 5, -1, 7, -1, -1, -1,
6911 11, 12, -1, -1, -1, 16, -1, 18, 19, 20,
6912 21, 22, 23, 24, -1, -1, 147, 148, 149, 30,
6913 31, 32, 33, 34, 35, 36, -1, -1, 39, -1,
6914 -1, -1, -1, -1, -1, 46, -1, -1, 49, 50,
6915 51, 52, 53, 54, 55, 56, 57, 58, 59, 60,
6916 61, 62, 63, 64, 65, -1, -1, -1, -1, -1,
6917 -1, -1, -1, -1, -1, 76, 77, -1, -1, -1,
6918 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6919 91, 92, -1, -1, -1, -1, -1, -1, 99, -1,
6920 -1, 102, 103, 104, 105, -1, 107, 108, 109, 110,
6921 111, 112, 113, 114, 115, 116, 117, 118, -1, -1,
6922 -1, -1, 3, 4, 5, -1, 7, -1, -1, -1,
6923 11, 12, -1, -1, -1, 16, -1, 18, 19, 20,
6924 21, 22, 23, 24, -1, -1, 147, 148, 149, 30,
6925 31, 32, 33, 34, 35, 36, -1, -1, 39, -1,
6926 -1, -1, -1, -1, -1, 46, -1, -1, 49, 50,
6927 51, 52, 53, 54, 55, 56, 57, 58, 59, 60,
6928 61, 62, 63, 64, 65, -1, -1, -1, -1, -1,
6929 -1, -1, -1, -1, -1, 76, 77, -1, -1, -1,
6930 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6931 91, 92, -1, -1, -1, -1, -1, -1, 99, -1,
6932 -1, 102, 103, 104, 105, -1, 107, 108, 109, 110,
6933 111, 112, 113, 114, 115, 116, 117, 118, -1, -1,
6934 -1, -1, 3, 4, 5, -1, 7, -1, -1, -1,
6935 11, 12, -1, -1, -1, 16, -1, 18, 19, 20,
6936 21, 22, 23, 24, -1, -1, 147, 148, 149, 30,
6937 31, 32, 33, 34, 35, 36, -1, -1, 39, -1,
6938 -1, -1, -1, -1, -1, 46, -1, -1, 49, 50,
6939 51, 52, 53, 54, 55, 56, 57, 58, 59, 60,
6940 61, 62, 63, 64, 65, -1, -1, -1, -1, -1,
6941 -1, -1, -1, -1, -1, 76, 77, -1, -1, -1,
6942 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6943 91, 92, -1, -1, -1, -1, -1, -1, 99, -1,
6944 -1, 102, 103, 104, 105, -1, 107, 108, 109, 110,
6945 111, 112, 113, 114, 115, 116, 117, 118, -1, -1,
6946 -1, -1, 3, 4, 5, -1, 7, -1, -1, -1,
6947 11, 12, -1, -1, -1, 16, -1, 18, 19, 20,
6948 21, 22, 23, 24, -1, -1, 147, 148, 149, 30,
6949 31, 32, 33, 34, 35, 36, -1, -1, 39, -1,
6950 -1, -1, -1, -1, -1, 46, -1, -1, 49, 50,
6951 51, 52, 53, 54, 55, 56, 57, 58, 59, 60,
6952 61, 62, 63, 64, 65, -1, -1, -1, -1, -1,
6953 -1, -1, -1, -1, -1, 76, 77, -1, -1, -1,
6954 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6955 91, 92, -1, -1, -1, -1, -1, -1, 99, -1,
6956 -1, 102, 103, 104, 105, -1, 107, 108, 109, 110,
6957 111, 112, 113, 114, 115, 116, 117, 118, -1, -1,
6958 -1, -1, 3, 4, 5, -1, 7, -1, -1, -1,
6959 11, 12, -1, -1, -1, 16, -1, 18, 19, 20,
6960 21, 22, 23, 24, -1, -1, 147, 148, 149, 30,
6961 31, 32, 33, 34, 35, 36, -1, -1, 39, -1,
6962 -1, -1, -1, -1, -1, 46, -1, -1, 49, 50,
6963 51, 52, 53, 54, 55, 56, 57, 58, 59, 60,
6964 61, 62, 63, 64, 65, -1, -1, -1, -1, -1,
6965 -1, -1, -1, -1, -1, 76, 77, -1, -1, -1,
6966 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6967 91, 92, -1, -1, -1, -1, -1, -1, 99, -1,
6968 -1, 102, 103, 104, 105, -1, 107, 108, -1, 110,
6969 111, 112, 113, 114, 115, 116, 117, 118, -1, -1,
6970 -1, -1, 3, 4, 5, -1, 7, -1, -1, -1,
6971 11, 12, -1, -1, -1, 16, -1, 18, 19, 20,
6972 21, 22, 23, 24, -1, -1, 147, 148, 149, 30,
6973 31, 32, 33, 34, 35, 36, -1, -1, 39, -1,
6974 -1, -1, -1, -1, -1, 46, -1, -1, 49, 50,
6975 51, 52, 53, 54, 55, 56, 57, 58, 59, 60,
6976 61, 62, 63, 64, 65, -1, -1, -1, -1, -1,
6977 -1, -1, -1, -1, -1, 76, 77, -1, -1, -1,
6978 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6979 91, 92, -1, -1, -1, -1, -1, -1, 99, -1,
6980 -1, 102, 103, 104, 105, -1, -1, 108, 109, 110,
6981 111, 112, 113, 114, 115, 116, 117, 118, -1, -1,
6982 -1, -1, 3, 4, 5, -1, 7, -1, -1, -1,
6983 11, 12, -1, -1, -1, 16, -1, 18, 19, 20,
6984 21, 22, 23, 24, -1, -1, 147, 148, 149, 30,
6985 31, 32, 33, 34, 35, 36, -1, -1, 39, -1,
6986 -1, -1, -1, -1, -1, 46, -1, -1, 49, 50,
6987 51, 52, 53, 54, 55, 56, 57, 58, 59, 60,
6988 61, 62, 63, 64, 65, -1, -1, -1, -1, -1,
6989 -1, -1, -1, -1, -1, 76, 77, -1, -1, -1,
6990 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6991 91, 92, -1, -1, -1, -1, -1, -1, 99, -1,
6992 -1, 102, 103, 104, 105, -1, -1, 108, -1, 110,
6993 111, 112, 113, 114, 115, 116, 117, 118, -1, -1,
6994 -1, -1, 3, 4, 5, -1, 7, -1, -1, -1,
6995 11, 12, -1, -1, -1, 16, -1, 18, 19, 20,
6996 21, 22, 23, 24, -1, -1, 147, 148, 149, 30,
6997 31, 32, 33, 34, 35, 36, -1, -1, 39, -1,
6998 -1, -1, -1, -1, -1, 46, -1, -1, 49, 50,
6999 51, 52, 53, 54, 55, 56, 57, -1, 59, 60,
7000 61, 62, 63, 64, 65, -1, -1, -1, -1, -1,
7001 -1, -1, -1, -1, -1, 76, 77, -1, -1, -1,
7002 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7003 91, 92, -1, -1, -1, -1, -1, -1, 99, -1,
7004 -1, 102, 103, 104, 105, -1, 107, -1, -1, 110,
7005 111, 112, 113, 114, 115, 116, 117, 118, -1, -1,
7006 -1, -1, 3, 4, 5, -1, 7, -1, -1, -1,
7007 11, 12, -1, -1, -1, 16, -1, 18, 19, 20,
7008 21, 22, 23, 24, -1, -1, 147, 148, 149, 30,
7009 31, 32, 33, 34, 35, 36, -1, -1, 39, -1,
7010 -1, -1, -1, -1, -1, 46, -1, -1, 49, 50,
7011 51, 52, 53, 54, 55, 56, 57, -1, 59, 60,
7012 61, 62, 63, 64, 65, -1, -1, -1, -1, -1,
7013 -1, -1, -1, -1, -1, 76, 77, -1, -1, -1,
7014 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7015 91, 92, -1, -1, -1, -1, -1, -1, 99, -1,
7016 -1, 102, 103, 104, 105, -1, 107, -1, -1, 110,
7017 111, 112, 113, 114, 115, 116, 117, 118, -1, -1,
7018 -1, -1, 3, 4, 5, -1, 7, -1, -1, -1,
7019 11, 12, -1, -1, -1, 16, -1, 18, 19, 20,
7020 21, 22, 23, 24, -1, -1, 147, 148, 149, 30,
7021 31, 32, 33, 34, 35, 36, -1, -1, 39, -1,
7022 -1, -1, -1, -1, -1, 46, -1, -1, 49, 50,
7023 51, 52, 53, 54, 55, 56, 57, -1, 59, 60,
7024 61, 62, 63, 64, 65, -1, -1, -1, -1, -1,
7025 -1, -1, -1, -1, -1, 76, 77, -1, -1, -1,
7026 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7027 91, 92, -1, -1, -1, -1, -1, -1, 99, -1,
7028 -1, 102, 103, 104, 105, -1, 107, -1, -1, 110,
7029 111, 112, 113, 114, 115, 116, 117, 118, -1, -1,
7030 -1, -1, 3, 4, 5, -1, 7, -1, -1, -1,
7031 11, 12, -1, -1, -1, 16, -1, 18, 19, 20,
7032 21, 22, 23, 24, -1, -1, 147, 148, 149, 30,
7033 31, 32, 33, 34, 35, 36, -1, -1, 39, -1,
7034 -1, -1, -1, -1, -1, 46, -1, -1, 49, 50,
7035 51, 52, 53, 54, 55, 56, 57, -1, 59, 60,
7036 61, 62, 63, 64, 65, -1, -1, -1, -1, -1,
7037 -1, -1, -1, -1, -1, 76, 77, -1, -1, -1,
7038 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7039 91, 92, -1, -1, -1, -1, -1, -1, 99, -1,
7040 -1, 102, 103, 104, 105, -1, 107, -1, -1, 110,
7041 111, 112, 113, 114, 115, 116, 117, 118, -1, -1,
7042 -1, -1, 3, 4, 5, -1, 7, -1, -1, -1,
7043 11, 12, -1, -1, -1, 16, -1, 18, 19, 20,
7044 21, 22, 23, 24, -1, -1, 147, 148, 149, 30,
7045 31, 32, 33, 34, 35, 36, -1, -1, 39, -1,
7046 -1, -1, -1, -1, -1, 46, -1, -1, 49, 50,
7047 51, 52, 53, 54, 55, 56, 57, -1, 59, 60,
7048 61, 62, 63, 64, 65, -1, -1, -1, -1, -1,
7049 -1, -1, -1, -1, -1, 76, 77, -1, -1, -1,
7050 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7051 91, 92, -1, -1, -1, -1, -1, -1, 99, -1,
7052 -1, 102, 103, 104, 105, -1, 107, -1, -1, 110,
7053 111, 112, 113, 114, 115, 116, 117, 118, -1, -1,
7054 -1, -1, 3, 4, 5, -1, 7, -1, -1, -1,
7055 11, 12, -1, -1, -1, 16, -1, 18, 19, 20,
7056 21, 22, 23, 24, -1, -1, 147, 148, 149, 30,
7057 31, 32, 33, 34, 35, 36, -1, -1, 39, -1,
7058 -1, -1, -1, -1, -1, 46, -1, -1, 49, 50,
7059 51, 52, 53, 54, 55, 56, 57, -1, 59, 60,
7060 61, 62, 63, 64, 65, -1, -1, -1, -1, -1,
7061 -1, -1, -1, -1, -1, 76, 77, -1, -1, -1,
7062 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7063 91, 92, -1, -1, -1, -1, -1, -1, 99, -1,
7064 -1, 102, 103, 104, 105, -1, 107, -1, -1, 110,
7065 111, 112, 113, 114, 115, 116, 117, 118, -1, -1,
7066 -1, -1, 3, 4, 5, -1, 7, -1, -1, -1,
7067 11, 12, -1, -1, -1, 16, -1, 18, 19, 20,
7068 21, 22, 23, 24, -1, -1, 147, 148, 149, 30,
7069 31, 32, 33, 34, 35, 36, -1, -1, 39, -1,
7070 -1, -1, -1, -1, -1, 46, -1, -1, 49, 50,
7071 51, 52, 53, 54, 55, 56, 57, -1, 59, 60,
7072 61, 62, 63, 64, 65, -1, -1, -1, -1, -1,
7073 -1, -1, -1, -1, -1, 76, 77, -1, -1, -1,
7074 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7075 91, 92, -1, -1, -1, -1, -1, -1, 99, -1,
7076 -1, 102, 103, 104, 105, -1, -1, -1, -1, 110,
7077 111, 112, 113, 114, 115, 116, 117, 118, -1, -1,
7078 -1, -1, 3, 4, 5, -1, 7, -1, -1, -1,
7079 11, 12, -1, -1, -1, 16, -1, 18, 19, 20,
7080 21, 22, 23, 24, -1, -1, 147, 148, 149, 30,
7081 31, 32, 33, 34, 35, 36, -1, -1, 39, -1,
7082 -1, -1, -1, -1, -1, 46, -1, -1, 49, 50,
7083 51, 52, 53, 54, 55, 56, 57, -1, 59, 60,
7084 61, 62, 63, 64, 65, -1, -1, -1, -1, -1,
7085 -1, -1, -1, -1, -1, 76, 77, -1, -1, -1,
7086 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7087 91, 92, -1, -1, -1, -1, -1, -1, 99, -1,
7088 -1, 102, 103, 104, 105, -1, -1, -1, -1, 110,
7089 111, 112, 113, 114, 115, 116, 117, 118, -1, -1,
7090 -1, -1, 3, 4, 5, -1, 7, -1, -1, -1,
7091 11, 12, -1, -1, -1, 16, -1, 18, 19, 20,
7092 21, 22, 23, 24, -1, -1, 147, 148, 149, 30,
7093 31, 32, 33, 34, 35, 36, -1, -1, 39, -1,
7094 -1, -1, -1, -1, -1, 46, -1, -1, 49, 50,
7095 51, 52, 53, 54, 55, 56, 57, -1, 59, 60,
7096 61, 62, 63, 64, 65, -1, -1, -1, -1, -1,
7097 -1, -1, -1, -1, -1, 76, 77, -1, -1, -1,
7098 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7099 91, 92, -1, -1, -1, -1, -1, -1, 99, -1,
7100 -1, 102, 103, 104, 105, -1, -1, -1, -1, 110,
7101 111, 112, 113, 114, 115, 116, 117, 118, -1, -1,
7102 -1, -1, 3, 4, 5, -1, 7, -1, -1, -1,
7103 11, 12, -1, -1, -1, 16, -1, 18, 19, 20,
7104 21, 22, 23, 24, -1, -1, 147, 148, 149, 30,
7105 31, 32, 33, 34, 35, 36, -1, -1, 39, -1,
7106 -1, -1, -1, -1, -1, 46, -1, -1, 49, 50,
7107 51, 52, 53, 54, 55, 56, 57, -1, 59, 60,
7108 61, 62, 63, 64, 65, -1, -1, -1, -1, -1,
7109 -1, -1, -1, -1, -1, 76, 77, -1, -1, -1,
7110 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7111 91, 92, -1, -1, -1, -1, -1, -1, 99, -1,
7112 -1, 102, 103, 104, 105, -1, -1, -1, -1, 110,
7113 111, 112, 113, 114, 115, 116, 117, 118, -1, -1,
7114 -1, -1, 3, 4, 5, -1, 7, -1, -1, -1,
7115 11, 12, -1, -1, -1, 16, -1, 18, 19, 20,
7116 21, 22, 23, 24, -1, -1, 147, 148, 149, 30,
7117 31, 32, 33, 34, 35, 36, -1, -1, 39, -1,
7118 -1, -1, -1, -1, -1, 46, -1, -1, 49, 50,
7119 51, 52, 53, 54, 55, 56, 57, -1, 59, 60,
7120 61, 62, 63, 64, 65, -1, -1, -1, -1, -1,
7121 -1, -1, -1, -1, -1, 76, 77, -1, -1, -1,
7122 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7123 91, 92, -1, -1, -1, -1, -1, -1, 99, -1,
7124 -1, 102, 103, 104, 105, -1, -1, -1, -1, 110,
7125 111, 112, 113, 114, 115, 116, 117, 118, -1, -1,
7126 -1, -1, 3, 4, 5, -1, 7, -1, -1, -1,
7127 11, 12, -1, -1, -1, 16, -1, 18, 19, 20,
7128 21, 22, 23, 24, -1, -1, 147, 148, 149, 30,
7129 31, 32, 33, 34, 35, 36, -1, -1, 39, -1,
7130 -1, -1, -1, -1, -1, 46, -1, -1, 49, 50,
7131 51, 52, 53, 54, 55, 56, 57, -1, 59, 60,
7132 61, 62, 63, 64, 65, -1, -1, -1, -1, -1,
7133 -1, -1, -1, -1, -1, 76, 77, -1, -1, -1,
7134 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7135 91, 92, -1, -1, -1, -1, -1, -1, 99, -1,
7136 -1, 102, 103, 104, 105, -1, -1, -1, -1, 110,
7137 111, 112, 113, 114, 115, 116, 117, 118, -1, -1,
7138 -1, -1, 3, 4, 5, -1, 7, -1, -1, -1,
7139 11, 12, -1, -1, -1, 16, -1, 18, 19, 20,
7140 21, 22, 23, 24, -1, -1, 147, 148, 149, 30,
7141 31, 32, 33, 34, 35, 36, -1, -1, 39, -1,
7142 -1, -1, -1, -1, -1, 46, -1, -1, 49, 50,
7143 51, 52, 53, 54, 55, 56, 57, -1, 59, 60,
7144 61, 62, 63, 64, 65, -1, -1, -1, -1, -1,
7145 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7146 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7147 -1, -1, -1, -1, -1, -1, -1, -1, 99, -1,
7148 -1, 102, 103, 104, 105, -1, 107, -1, -1, 110,
7149 111, 112, 113, 114, 115, 116, 117, 118, -1, -1,
7150 3, 4, 5, -1, 7, -1, -1, -1, 11, 12,
7151 -1, -1, -1, 16, -1, 18, 19, 20, 21, 22,
7152 23, 24, -1, -1, -1, -1, 147, 30, 31, 32,
7153 33, 34, 35, 36, -1, -1, 39, -1, -1, -1,
7154 -1, -1, -1, 46, -1, -1, 49, 50, 51, 52,
7155 53, 54, 55, 56, 57, -1, 59, 60, 61, 62,
7156 63, 64, 65, -1, -1, -1, -1, -1, -1, -1,
7157 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7158 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7159 -1, -1, -1, -1, -1, -1, 99, -1, -1, 102,
7160 103, 104, 105, -1, 107, -1, -1, 110, 111, 112,
7161 113, 114, 115, 116, 117, 118, -1, -1, 3, 4,
7162 5, -1, 7, -1, -1, -1, 11, 12, -1, -1,
7163 -1, 16, -1, 18, 19, 20, 21, 22, 23, 24,
7164 -1, -1, -1, -1, 147, 30, 31, 32, 33, 34,
7165 35, 36, -1, -1, 39, -1, -1, -1, -1, -1,
7166 -1, 46, -1, -1, 49, 50, 51, 52, 53, 54,
7167 55, 56, 57, -1, 59, 60, 61, 62, 63, 64,
7168 65, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7169 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7170 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7171 95, -1, -1, -1, 99, -1, -1, 102, 103, 104,
7172 105, -1, -1, -1, -1, 110, 111, 112, 113, 114,
7173 115, 116, 117, 118, -1, -1, 3, 4, 5, -1,
7174 7, -1, -1, -1, 11, 12, -1, -1, -1, 16,
7175 -1, 18, 19, 20, 21, 22, 23, 24, -1, -1,
7176 -1, -1, 147, 30, 31, 32, 33, 34, 35, 36,
7177 -1, -1, 39, -1, -1, -1, -1, -1, -1, 46,
7178 -1, -1, 49, 50, 51, 52, 53, 54, 55, 56,
7179 57, -1, 59, 60, 61, 62, 63, 64, 65, -1,
7180 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7181 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7182 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7183 -1, -1, 99, -1, -1, 102, 103, 104, 105, -1,
7184 -1, -1, -1, 110, 111, 112, 113, 114, 115, 116,
7185 117, 118, -1, -1, 3, 4, 5, -1, 7, -1,
7186 -1, -1, 11, 12, -1, -1, -1, 16, -1, 18,
7187 19, 20, 21, 22, 23, 24, -1, -1, -1, -1,
7188 147, 30, 31, 32, 33, 34, 35, 36, -1, -1,
7189 39, -1, -1, -1, -1, -1, -1, 46, -1, -1,
7190 49, 50, 51, 52, 53, 54, 55, 56, 57, -1,
7191 59, 60, 61, 62, 63, 64, 65, -1, -1, -1,
7192 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7193 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7194 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7195 99, -1, -1, 102, 103, 104, 105, -1, -1, -1,
7196 -1, 110, 111, 112, 113, 114, 115, 116, 117, 118,
7197 -1, -1, 3, 4, 5, -1, 7, -1, -1, -1,
7198 11, 12, -1, -1, -1, 16, -1, 18, 19, 20,
7199 21, 22, 23, 24, -1, -1, -1, -1, 147, 30,
7200 31, 32, 33, 34, 35, 36, -1, -1, 39, -1,
7201 -1, -1, -1, -1, -1, 46, -1, -1, 49, 50,
7202 51, 52, 53, 54, 55, 56, 57, -1, 59, 60,
7203 61, 62, 63, 64, 65, -1, -1, -1, -1, -1,
7204 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7205 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7206 -1, -1, -1, -1, -1, -1, -1, -1, 99, -1,
7207 -1, 102, 103, 104, 105, -1, -1, -1, -1, 110,
7208 111, 112, 113, 114, 115, 116, 117, 118, -1, -1,
7209 3, 4, 5, -1, 7, -1, -1, -1, 11, 12,
7210 -1, -1, -1, 16, -1, 18, 19, 20, 21, 22,
7211 23, 24, -1, -1, -1, -1, 147, 30, 31, 32,
7212 33, 34, 35, 36, -1, -1, 39, -1, -1, -1,
7213 -1, -1, -1, 46, -1, -1, 49, 50, 51, 52,
7214 53, 54, 55, 56, 57, -1, 59, 60, 61, 62,
7215 63, 64, 65, -1, -1, -1, -1, -1, -1, -1,
7216 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7217 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7218 -1, -1, -1, -1, -1, -1, 99, -1, -1, 102,
7219 103, 104, 105, 33, 34, 35, 36, 110, 111, 112,
7220 113, 114, 115, 116, 117, 118, -1, -1, -1, 49,
7221 50, 51, 52, -1, -1, -1, 56, -1, -1, 59,
7222 60, 61, 62, 63, -1, -1, -1, -1, -1, -1,
7223 -1, -1, -1, -1, 147, -1, -1, -1, -1, -1,
7224 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7225 -1, 91, 92, -1, -1, -1, -1, -1, -1, 99,
7226 -1, -1, 102, -1, 104, 105, -1, -1, -1, -1,
7227 110, 111, 112, 113, 114, 115, 116, 117, 118, -1,
7228 -1, -1, -1, -1, 52, 53, -1, -1, 56, -1,
7229 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7230 140, -1, -1, -1, -1, -1, -1, 147, 76, 77,
7231 78, 79, 80, 81, 82, 83, 84, -1, -1, 87,
7232 88, -1, -1, -1, -1, 93, 94, 95, 96, -1,
7233 -1, -1, -1, -1, -1, -1, -1, -1, -1, 107,
7234 108, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7235 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7236 -1, -1, -1, -1, -1, -1, -1, -1, -1, 137,
7237 138, 139, 140, 141, 142, 143, 144, 145, 146, -1,
7238 148, 149, 52, 53, -1, -1, 56, -1, 156, -1,
7239 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7240 -1, -1, -1, -1, -1, -1, 76, 77, 78, 79,
7241 80, 81, 82, 83, 84, -1, -1, 87, 88, -1,
7242 -1, -1, -1, 93, 94, 95, 96, -1, -1, -1,
7243 -1, -1, -1, -1, -1, -1, -1, 107, 108, -1,
7244 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7245 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7246 -1, -1, -1, -1, -1, -1, -1, 137, 138, 139,
7247 140, 141, 142, 143, 144, 145, 146, -1, 148, 149,
7248 52, 53, -1, -1, 56, -1, 156, -1, -1, -1,
7249 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7250 -1, -1, -1, -1, 76, 77, 78, 79, 80, 81,
7251 82, 83, 84, -1, -1, 87, 88, -1, -1, -1,
7252 -1, 93, 94, 95, 96, -1, -1, -1, -1, -1,
7253 -1, -1, -1, -1, -1, 107, 108, -1, -1, -1,
7254 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7255 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7256 -1, -1, -1, -1, -1, 137, 138, 139, 140, 141,
7257 142, 143, 144, 145, 146, -1, 148, 149, 52, 53,
7258 -1, -1, 56, -1, 156, -1, -1, -1, -1, -1,
7259 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7260 -1, -1, 76, 77, 78, 79, 80, 81, 82, 83,
7261 84, -1, -1, 87, 88, -1, -1, -1, -1, 93,
7262 94, 95, 96, -1, -1, -1, -1, -1, -1, -1,
7263 -1, -1, -1, 107, 108, -1, -1, -1, -1, -1,
7264 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7265 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7266 -1, -1, -1, 137, 138, 139, 140, 141, 142, 143,
7267 144, 145, 146, -1, 148, 149, 52, 53, -1, -1,
7268 56, -1, 156, -1, -1, -1, -1, -1, -1, -1,
7269 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7270 76, 77, 78, 79, 80, 81, 82, 83, 84, -1,
7271 -1, 87, 88, -1, -1, -1, -1, 93, 94, 95,
7272 96, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7273 -1, 107, 108, -1, -1, -1, -1, -1, -1, -1,
7274 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7275 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7276 -1, 137, 138, 139, 140, 141, 142, 143, 144, 145,
7277 146, -1, 148, 149, 52, 53, -1, -1, 56, -1,
7278 156, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7279 -1, -1, -1, -1, -1, -1, -1, -1, 76, 77,
7280 78, 79, 80, 81, 82, 83, 84, -1, -1, 87,
7281 88, -1, -1, -1, -1, 93, 94, 95, 96, -1,
7282 -1, -1, -1, -1, -1, -1, -1, -1, -1, 107,
7283 108, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7284 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7285 -1, -1, -1, -1, -1, -1, -1, -1, -1, 137,
7286 138, 139, 140, 141, 142, 143, 144, 145, 146, -1,
7287 148, 149, 52, 53, -1, -1, 56, -1, 156, -1,
7288 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7289 -1, -1, -1, -1, -1, -1, 76, 77, 78, 79,
7290 80, 81, 82, 83, 84, -1, -1, 87, 88, -1,
7291 -1, -1, -1, 93, 94, 95, 96, -1, -1, -1,
7292 -1, -1, -1, -1, -1, -1, -1, 107, 108, -1,
7293 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7294 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7295 -1, -1, -1, -1, -1, -1, -1, 137, 138, 139,
7296 140, 141, 142, 143, 144, 145, 146, -1, 148, 149,
7297 52, 53, -1, -1, 56, -1, 156, -1, -1, -1,
7298 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7299 -1, -1, -1, -1, 76, 77, 78, 79, 80, 81,
7300 82, 83, 84, -1, -1, 87, 88, -1, -1, -1,
7301 -1, 93, 94, 95, 96, -1, -1, -1, -1, -1,
7302 -1, -1, -1, -1, -1, 107, 108, -1, -1, -1,
7303 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7304 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7305 -1, -1, -1, -1, -1, 137, 138, 139, 140, 141,
7306 142, 143, 144, 145, 146, -1, 148, 149, 52, 53,
7307 -1, -1, 56, -1, 156, -1, -1, -1, -1, -1,
7308 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7309 -1, -1, 76, 77, 78, 79, 80, 81, 82, 83,
7310 84, -1, -1, 87, 88, -1, -1, -1, -1, 93,
7311 94, 95, 96, -1, -1, -1, -1, -1, -1, -1,
7312 -1, -1, -1, 107, 108, -1, -1, -1, -1, -1,
7313 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7314 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7315 -1, -1, -1, 137, 138, 139, 140, 141, 142, 143,
7316 144, 145, 146, -1, 148, 149, 52, 53, -1, -1,
7317 56, -1, 156, -1, -1, -1, -1, -1, -1, -1,
7318 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7319 76, 77, 78, 79, 80, 81, 82, 83, 84, -1,
7320 -1, 87, 88, -1, -1, -1, -1, 93, 94, 95,
7321 96, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7322 -1, 107, 108, -1, -1, -1, -1, -1, -1, -1,
7323 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7324 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7325 -1, 137, 138, 139, 140, 141, 142, 143, 144, 145,
7326 146, -1, 148, 149, 52, 53, -1, -1, 56, -1,
7327 156, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7328 -1, -1, -1, -1, -1, -1, -1, -1, 76, 77,
7329 78, 79, 80, 81, 82, 83, 84, -1, -1, 87,
7330 88, -1, -1, -1, -1, 93, 94, 95, 96, -1,
7331 -1, -1, -1, -1, -1, -1, -1, -1, -1, 107,
7332 108, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7333 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7334 -1, -1, -1, -1, -1, -1, -1, -1, -1, 137,
7335 138, 139, 140, 141, 142, 143, 144, 145, 146, -1,
7336 148, 149, 52, 53, -1, -1, 56, -1, 156, -1,
7337 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7338 -1, -1, -1, -1, -1, -1, 76, 77, 78, 79,
7339 80, 81, 82, 83, 84, -1, -1, 87, 88, -1,
7340 -1, -1, -1, 93, 94, 95, 96, -1, -1, -1,
7341 -1, -1, -1, -1, -1, -1, -1, 107, 108, -1,
7342 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7343 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7344 -1, -1, -1, -1, -1, -1, -1, 137, 138, 139,
7345 140, 141, 142, 143, 144, 145, 146, -1, 148, 149,
7346 52, 53, -1, -1, 56, -1, 156, -1, -1, -1,
7347 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7348 -1, -1, -1, -1, 76, 77, 78, 79, 80, 81,
7349 82, 83, 84, -1, -1, 87, 88, -1, -1, -1,
7350 -1, 93, 94, 95, 96, -1, -1, -1, -1, -1,
7351 -1, -1, -1, -1, -1, 107, 108, -1, -1, -1,
7352 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7353 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7354 -1, -1, -1, -1, -1, 137, 138, 139, 140, 141,
7355 142, 143, 144, 145, 146, -1, 148, 149, 52, 53,
7356 -1, -1, 56, -1, 156, -1, -1, -1, -1, -1,
7357 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7358 -1, -1, 76, 77, 78, 79, 80, 81, 82, 83,
7359 84, -1, -1, 87, 88, -1, -1, -1, -1, 93,
7360 94, 95, 96, -1, -1, -1, -1, -1, -1, -1,
7361 -1, -1, -1, 107, 108, -1, -1, -1, -1, -1,
7362 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7363 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7364 -1, -1, -1, 137, 138, 139, 140, 141, 142, 143,
7365 144, 145, 146, -1, 148, 149, -1, -1, -1, -1,
7366 -1, -1, 156
7367};
7368
7369/* YYSTOS[STATE-NUM] -- The symbol kind of the accessing symbol of
7370 state STATE-NUM. */
7371static const yytype_int16 yystos[] =
7372{
7373 0, 165, 166, 1, 3, 4, 5, 6, 7, 11,
7374 12, 16, 18, 19, 20, 21, 22, 23, 24, 30,
7375 31, 32, 33, 34, 35, 36, 39, 45, 46, 47,
7376 48, 49, 50, 51, 52, 53, 54, 55, 56, 57,
7377 59, 60, 61, 62, 63, 64, 65, 76, 77, 91,
7378 92, 99, 102, 103, 104, 105, 107, 110, 111, 112,
7379 113, 114, 115, 116, 117, 118, 147, 148, 149, 164,
7380 167, 168, 180, 182, 183, 184, 185, 186, 187, 191,
7381 195, 197, 203, 206, 208, 209, 210, 212, 214, 215,
7382 216, 217, 226, 227, 228, 229, 230, 231, 234, 255,
7383 267, 268, 269, 270, 271, 272, 273, 274, 275, 276,
7384 277, 278, 287, 288, 321, 326, 327, 377, 378, 379,
7385 380, 381, 382, 384, 385, 388, 389, 391, 392, 393,
7386 394, 407, 408, 410, 411, 412, 413, 414, 415, 416,
7387 417, 418, 466, 0, 3, 4, 5, 6, 7, 8,
7388 9, 10, 11, 12, 13, 14, 15, 16, 17, 18,
7389 19, 20, 21, 22, 23, 24, 25, 26, 30, 31,
7390 32, 33, 34, 35, 36, 37, 38, 39, 45, 46,
7391 47, 48, 49, 50, 51, 52, 53, 56, 76, 77,
7392 78, 79, 80, 81, 82, 83, 84, 87, 88, 93,
7393 94, 95, 96, 107, 108, 137, 138, 139, 140, 141,
7394 142, 143, 144, 145, 146, 148, 149, 156, 220, 221,
7395 222, 224, 225, 407, 179, 179, 179, 39, 58, 99,
7396 102, 107, 108, 109, 112, 148, 187, 209, 217, 227,
7397 238, 239, 245, 246, 249, 251, 252, 268, 414, 415,
7398 417, 418, 453, 454, 246, 157, 242, 247, 248, 154,
7399 157, 189, 54, 221, 189, 151, 169, 170, 235, 466,
7400 21, 22, 32, 195, 197, 208, 227, 268, 287, 288,
7401 227, 227, 227, 56, 47, 102, 171, 176, 177, 182,
7402 211, 212, 466, 171, 240, 251, 453, 466, 239, 452,
7403 453, 466, 46, 99, 147, 155, 195, 197, 216, 255,
7404 268, 414, 415, 418, 319, 220, 397, 409, 413, 397,
7405 398, 399, 161, 383, 383, 383, 383, 412, 203, 227,
7406 227, 154, 160, 163, 464, 465, 179, 40, 41, 42,
7407 43, 44, 37, 38, 157, 421, 422, 423, 424, 466,
7408 421, 423, 26, 151, 242, 248, 279, 328, 28, 280,
7409 325, 134, 155, 102, 107, 214, 134, 25, 78, 79,
7410 80, 81, 82, 83, 84, 85, 86, 87, 88, 89,
7411 90, 95, 96, 101, 135, 137, 138, 139, 140, 141,
7412 142, 143, 144, 145, 146, 233, 233, 69, 97, 98,
7413 153, 458, 459, 256, 1, 191, 198, 199, 199, 200,
7414 202, 202, 163, 199, 465, 99, 210, 217, 268, 293,
7415 414, 415, 418, 52, 56, 95, 99, 218, 219, 268,
7416 414, 415, 418, 219, 33, 34, 35, 36, 49, 50,
7417 51, 52, 56, 157, 194, 220, 416, 448, 449, 450,
7418 246, 157, 248, 98, 458, 459, 328, 380, 100, 100,
7419 155, 239, 56, 239, 239, 239, 397, 134, 101, 155,
7420 250, 466, 98, 153, 458, 100, 100, 155, 250, 92,
7421 244, 246, 251, 433, 453, 466, 246, 189, 191, 460,
7422 191, 54, 64, 65, 181, 157, 235, 236, 164, 421,
7423 421, 98, 458, 100, 178, 211, 158, 163, 465, 460,
7424 257, 159, 155, 189, 463, 155, 463, 152, 463, 189,
7425 56, 412, 213, 214, 422, 155, 98, 153, 458, 316,
7426 66, 119, 121, 122, 400, 119, 119, 400, 67, 400,
7427 161, 386, 395, 390, 396, 78, 160, 168, 151, 199,
7428 199, 199, 199, 235, 237, 191, 191, 52, 54, 55,
7429 56, 57, 58, 78, 92, 102, 107, 108, 109, 141,
7430 144, 298, 364, 425, 426, 427, 428, 429, 430, 432,
7431 433, 434, 435, 436, 437, 438, 439, 440, 441, 442,
7432 443, 444, 445, 446, 134, 265, 432, 134, 266, 329,
7433 330, 106, 207, 331, 332, 332, 235, 211, 155, 216,
7434 155, 235, 193, 227, 227, 227, 227, 227, 227, 227,
7435 227, 227, 227, 227, 227, 227, 192, 227, 227, 227,
7436 227, 227, 227, 227, 227, 227, 227, 227, 52, 53,
7437 56, 224, 455, 456, 244, 251, 52, 53, 56, 224,
7438 455, 242, 171, 174, 13, 289, 464, 289, 199, 171,
7439 171, 259, 163, 56, 98, 153, 458, 25, 199, 52,
7440 56, 218, 138, 420, 466, 98, 153, 458, 264, 451,
7441 69, 98, 457, 246, 460, 52, 56, 242, 455, 235,
7442 235, 223, 100, 124, 235, 239, 239, 249, 252, 453,
7443 52, 56, 244, 52, 56, 235, 235, 454, 460, 155,
7444 460, 155, 158, 460, 221, 236, 227, 152, 134, 134,
7445 56, 455, 455, 235, 170, 460, 177, 158, 453, 155,
7446 213, 52, 56, 244, 52, 56, 317, 402, 401, 119,
7447 387, 400, 66, 119, 119, 387, 66, 119, 227, 171,
7448 182, 102, 107, 294, 295, 296, 297, 435, 155, 447,
7449 466, 155, 447, 155, 431, 460, 299, 300, 155, 431,
7450 239, 34, 52, 52, 155, 431, 52, 39, 188, 209,
7451 227, 232, 174, 464, 188, 232, 174, 316, 152, 330,
7452 316, 10, 68, 286, 286, 107, 203, 204, 205, 239,
7453 251, 253, 254, 460, 213, 155, 99, 185, 190, 205,
7454 217, 227, 239, 241, 254, 268, 418, 338, 338, 189,
7455 100, 100, 151, 242, 248, 189, 461, 155, 100, 100,
7456 242, 243, 248, 466, 235, 286, 171, 13, 171, 27,
7457 290, 464, 286, 286, 17, 283, 334, 25, 258, 340,
7458 52, 56, 244, 52, 56, 260, 263, 419, 262, 52,
7459 56, 218, 244, 174, 191, 196, 460, 243, 248, 190,
7460 227, 241, 190, 241, 221, 235, 239, 250, 100, 100,
7461 461, 100, 100, 433, 453, 191, 39, 190, 241, 463,
7462 214, 461, 318, 403, 406, 413, 418, 383, 400, 383,
7463 383, 383, 152, 296, 435, 155, 460, 155, 446, 425,
7464 440, 442, 428, 429, 438, 444, 134, 239, 430, 437,
7465 444, 436, 438, 189, 44, 44, 286, 286, 317, 152,
7466 317, 239, 155, 44, 213, 56, 44, 134, 44, 98,
7467 153, 458, 336, 336, 136, 235, 235, 330, 207, 159,
7468 100, 235, 235, 207, 8, 281, 373, 466, 14, 15,
7469 284, 285, 291, 292, 466, 292, 201, 107, 239, 333,
7470 286, 338, 334, 286, 461, 199, 464, 199, 174, 461,
7471 286, 460, 194, 328, 325, 235, 235, 100, 235, 235,
7472 460, 155, 460, 189, 179, 404, 460, 294, 297, 295,
7473 447, 155, 431, 155, 431, 155, 431, 155, 431, 431,
7474 188, 232, 237, 237, 318, 318, 107, 239, 237, 237,
7475 235, 237, 52, 56, 244, 52, 56, 337, 337, 227,
7476 190, 241, 190, 241, 152, 235, 190, 241, 190, 241,
7477 239, 254, 374, 466, 175, 284, 171, 199, 286, 286,
7478 239, 155, 289, 336, 286, 290, 174, 464, 286, 235,
7479 157, 322, 432, 171, 155, 155, 438, 438, 444, 438,
7480 227, 227, 179, 179, 239, 182, 182, 227, 461, 52,
7481 56, 58, 91, 92, 99, 102, 104, 105, 107, 112,
7482 140, 321, 343, 344, 345, 347, 350, 354, 355, 356,
7483 359, 360, 361, 362, 363, 364, 365, 366, 367, 368,
7484 369, 370, 371, 372, 377, 378, 381, 382, 385, 389,
7485 392, 394, 415, 440, 343, 190, 241, 101, 375, 466,
7486 9, 282, 376, 466, 172, 289, 107, 239, 171, 337,
7487 261, 286, 432, 320, 0, 120, 405, 295, 431, 431,
7488 155, 431, 431, 139, 310, 311, 466, 310, 368, 368,
7489 56, 218, 337, 344, 352, 353, 354, 355, 358, 461,
7490 189, 337, 462, 52, 397, 52, 102, 413, 101, 155,
7491 139, 155, 155, 344, 89, 90, 98, 153, 157, 348,
7492 349, 52, 99, 217, 268, 414, 415, 418, 289, 176,
7493 171, 171, 239, 292, 334, 335, 342, 343, 171, 189,
7494 313, 29, 123, 323, 438, 298, 301, 302, 303, 304,
7495 306, 307, 309, 312, 436, 438, 439, 444, 446, 171,
7496 174, 344, 461, 344, 356, 358, 461, 155, 152, 235,
7497 124, 199, 369, 352, 356, 346, 357, 358, 112, 361,
7498 365, 368, 368, 218, 337, 461, 337, 460, 352, 355,
7499 359, 352, 355, 359, 56, 98, 153, 458, 171, 163,
7500 173, 291, 289, 40, 41, 286, 160, 158, 324, 171,
7501 431, 447, 155, 447, 155, 308, 313, 300, 155, 305,
7502 308, 99, 268, 155, 308, 460, 155, 155, 351, 460,
7503 155, 350, 155, 397, 460, 460, 460, 461, 461, 461,
7504 52, 56, 244, 52, 56, 373, 376, 339, 199, 199,
7505 52, 314, 315, 434, 174, 152, 301, 442, 304, 306,
7506 438, 444, 139, 268, 307, 444, 56, 98, 438, 357,
7507 359, 357, 356, 358, 461, 171, 155, 189, 286, 447,
7508 155, 308, 155, 308, 155, 308, 155, 308, 52, 56,
7509 308, 155, 462, 292, 340, 341, 315, 438, 438, 444,
7510 438, 308, 308, 155, 308, 308, 438, 308
7511};
7512
7513/* YYR1[RULE-NUM] -- Symbol kind of the left-hand side of rule RULE-NUM. */
7514static const yytype_int16 yyr1[] =
7515{
7516 0, 162, 165, 163, 163, 164, 166, 167, 167, 167,
7517 168, 168, 169, 170, 171, 172, 173, 174, 175, 174,
7518 176, 176, 176, 177, 178, 177, 179, 180, 181, 182,
7519 182, 182, 182, 182, 182, 182, 182, 182, 182, 182,
7520 182, 182, 183, 182, 182, 182, 182, 182, 184, 185,
7521 186, 186, 186, 186, 186, 186, 186, 186, 185, 187,
7522 187, 185, 188, 188, 189, 189, 188, 190, 190, 190,
7523 191, 191, 191, 191, 191, 192, 191, 193, 191, 191,
7524 194, 195, 196, 197, 198, 199, 199, 200, 201, 202,
7525 203, 203, 204, 205, 206, 206, 207, 208, 208, 208,
7526 209, 209, 209, 209, 209, 209, 209, 209, 209, 209,
7527 209, 209, 210, 210, 211, 211, 212, 212, 212, 213,
7528 213, 212, 212, 212, 212, 212, 212, 212, 214, 214,
7529 215, 215, 216, 216, 216, 216, 216, 216, 216, 216,
7530 216, 217, 217, 217, 217, 217, 217, 217, 217, 217,
7531 218, 218, 219, 219, 219, 220, 220, 220, 220, 220,
7532 221, 221, 222, 223, 222, 224, 224, 224, 224, 224,
7533 224, 224, 224, 224, 224, 224, 224, 224, 224, 224,
7534 224, 224, 224, 224, 224, 224, 224, 224, 224, 224,
7535 224, 224, 224, 224, 224, 225, 225, 225, 225, 225,
7536 225, 225, 225, 225, 225, 225, 225, 225, 225, 225,
7537 225, 225, 225, 225, 225, 225, 225, 225, 225, 225,
7538 225, 225, 225, 225, 225, 225, 225, 225, 225, 225,
7539 225, 225, 225, 225, 225, 225, 226, 227, 228, 228,
7540 228, 228, 228, 228, 228, 228, 227, 229, 229, 229,
7541 229, 229, 229, 227, 227, 227, 227, 227, 227, 227,
7542 227, 227, 227, 227, 227, 227, 227, 227, 227, 227,
7543 227, 227, 227, 227, 227, 227, 227, 227, 227, 227,
7544 230, 230, 227, 227, 227, 231, 232, 232, 232, 233,
7545 233, 233, 233, 234, 234, 235, 236, 237, 238, 239,
7546 240, 240, 240, 240, 241, 241, 242, 242, 242, 243,
7547 243, 244, 244, 244, 244, 244, 245, 246, 246, 246,
7548 246, 246, 246, 247, 248, 249, 249, 250, 250, 251,
7549 251, 251, 251, 252, 252, 253, 253, 254, 254, 254,
7550 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
7551 255, 256, 255, 257, 255, 255, 255, 255, 255, 255,
7552 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
7553 255, 255, 255, 255, 255, 258, 255, 259, 255, 255,
7554 260, 261, 255, 262, 255, 263, 255, 264, 255, 265,
7555 255, 266, 255, 255, 255, 255, 255, 267, 268, 269,
7556 270, 271, 272, 273, 274, 275, 276, 277, 278, 279,
7557 280, 281, 282, 283, 284, 285, 286, 286, 287, 288,
7558 289, 289, 289, 290, 290, 291, 291, 292, 292, 293,
7559 293, 294, 294, 295, 295, 296, 296, 296, 296, 296,
7560 297, 297, 298, 298, 299, 300, 301, 301, 302, 302,
7561 303, 303, 303, 303, 304, 305, 306, 307, 307, 308,
7562 308, 309, 309, 309, 309, 309, 309, 309, 309, 309,
7563 309, 309, 309, 309, 309, 309, 310, 310, 311, 312,
7564 312, 313, 313, 314, 314, 315, 315, 316, 317, 318,
7565 319, 320, 321, 322, 322, 323, 324, 323, 325, 326,
7566 326, 326, 326, 326, 327, 327, 327, 327, 327, 327,
7567 327, 327, 328, 328, 329, 330, 331, 332, 333, 333,
7568 333, 333, 334, 335, 335, 336, 337, 338, 339, 340,
7569 341, 341, 342, 342, 342, 343, 343, 343, 343, 343,
7570 343, 344, 345, 345, 346, 347, 347, 348, 349, 350,
7571 350, 350, 350, 350, 350, 350, 350, 350, 350, 350,
7572 350, 350, 351, 350, 350, 350, 352, 352, 352, 352,
7573 352, 352, 353, 353, 354, 354, 355, 356, 356, 357,
7574 357, 358, 359, 359, 359, 359, 360, 360, 361, 361,
7575 362, 362, 363, 363, 364, 365, 365, 366, 367, 367,
7576 367, 367, 367, 367, 366, 366, 366, 366, 368, 368,
7577 368, 368, 368, 368, 368, 368, 368, 368, 369, 370,
7578 370, 371, 372, 372, 372, 373, 373, 374, 374, 374,
7579 375, 375, 376, 376, 377, 377, 378, 379, 379, 379,
7580 380, 381, 382, 383, 383, 384, 385, 386, 386, 387,
7581 387, 388, 389, 390, 390, 391, 392, 393, 394, 395,
7582 395, 396, 396, 397, 397, 398, 398, 399, 399, 400,
7583 401, 400, 402, 403, 404, 400, 405, 405, 406, 406,
7584 407, 407, 408, 409, 409, 410, 411, 411, 412, 412,
7585 412, 412, 413, 413, 413, 414, 414, 414, 415, 415,
7586 415, 415, 415, 415, 415, 416, 416, 417, 417, 418,
7587 418, 419, 420, 420, 421, 421, 422, 423, 424, 423,
7588 425, 425, 426, 426, 427, 427, 427, 427, 428, 428,
7589 429, 430, 430, 431, 431, 432, 432, 432, 432, 432,
7590 432, 432, 432, 432, 432, 432, 432, 432, 432, 432,
7591 433, 434, 434, 434, 434, 435, 435, 436, 437, 437,
7592 438, 438, 439, 440, 440, 441, 442, 442, 443, 443,
7593 444, 444, 445, 445, 446, 446, 447, 447, 448, 449,
7594 450, 451, 450, 452, 452, 453, 453, 454, 454, 454,
7595 454, 454, 454, 455, 455, 455, 455, 456, 456, 456,
7596 457, 457, 458, 458, 459, 459, 460, 461, 462, 463,
7597 463, 464, 464, 465, 465, 466
7598};
7599
7600/* YYR2[RULE-NUM] -- Number of symbols on the right-hand side of rule RULE-NUM. */
7601static const yytype_int8 yyr2[] =
7602{
7603 0, 2, 0, 0, 1, 2, 2, 1, 1, 3,
7604 1, 2, 1, 3, 2, 0, 0, 8, 0, 5,
7605 1, 1, 3, 1, 0, 3, 0, 2, 0, 4,
7606 3, 3, 3, 2, 3, 3, 3, 3, 4, 5,
7607 1, 4, 4, 1, 7, 4, 1, 1, 4, 1,
7608 4, 7, 6, 6, 6, 6, 5, 4, 1, 4,
7609 4, 1, 1, 4, 0, 1, 3, 1, 4, 1,
7610 1, 3, 3, 3, 2, 0, 7, 0, 7, 1,
7611 1, 2, 0, 5, 1, 1, 1, 0, 0, 4,
7612 1, 1, 1, 1, 1, 4, 3, 1, 1, 1,
7613 2, 3, 4, 5, 4, 5, 6, 2, 2, 2,
7614 2, 2, 1, 3, 1, 3, 1, 2, 3, 1,
7615 3, 5, 2, 4, 2, 4, 1, 3, 1, 3,
7616 2, 3, 1, 1, 4, 3, 3, 3, 3, 2,
7617 1, 1, 1, 4, 3, 3, 3, 3, 2, 1,
7618 1, 1, 2, 1, 3, 1, 1, 1, 1, 1,
7619 1, 1, 1, 0, 4, 1, 1, 1, 1, 1,
7620 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
7621 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
7622 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
7623 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
7624 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
7625 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
7626 1, 1, 1, 1, 1, 1, 4, 1, 4, 7,
7627 6, 6, 6, 6, 5, 4, 1, 3, 3, 2,
7628 2, 2, 2, 1, 3, 3, 3, 3, 3, 3,
7629 4, 2, 2, 3, 3, 3, 3, 1, 3, 3,
7630 3, 3, 3, 2, 2, 3, 3, 3, 3, 4,
7631 4, 4, 1, 1, 1, 6, 1, 4, 3, 1,
7632 1, 1, 1, 3, 3, 1, 1, 1, 1, 1,
7633 1, 2, 4, 2, 1, 4, 3, 5, 3, 1,
7634 1, 1, 1, 2, 4, 2, 1, 1, 1, 2,
7635 2, 4, 1, 0, 2, 2, 1, 2, 1, 1,
7636 1, 3, 3, 2, 1, 1, 1, 3, 4, 2,
7637 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
7638 1, 0, 4, 0, 4, 3, 3, 2, 3, 3,
7639 1, 4, 3, 1, 6, 4, 3, 2, 1, 2,
7640 1, 6, 6, 4, 4, 0, 6, 0, 5, 5,
7641 0, 0, 9, 0, 6, 0, 7, 0, 5, 0,
7642 5, 0, 5, 1, 1, 1, 1, 1, 1, 1,
7643 1, 1, 2, 2, 1, 2, 1, 1, 1, 1,
7644 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
7645 1, 1, 2, 1, 1, 1, 5, 1, 2, 1,
7646 1, 1, 3, 1, 3, 1, 3, 5, 1, 3,
7647 2, 1, 1, 1, 0, 2, 2, 1, 1, 3,
7648 4, 2, 2, 1, 1, 1, 3, 1, 3, 2,
7649 0, 6, 8, 4, 6, 4, 2, 6, 2, 4,
7650 6, 2, 4, 2, 4, 1, 1, 1, 4, 0,
7651 1, 1, 4, 1, 3, 1, 1, 0, 0, 0,
7652 0, 0, 9, 4, 1, 3, 0, 4, 3, 2,
7653 4, 5, 5, 3, 2, 4, 4, 3, 3, 2,
7654 1, 4, 3, 3, 0, 7, 0, 7, 1, 2,
7655 3, 4, 5, 1, 1, 0, 0, 0, 0, 9,
7656 1, 1, 1, 3, 3, 1, 2, 3, 1, 1,
7657 1, 1, 3, 1, 0, 4, 1, 2, 2, 1,
7658 1, 4, 4, 4, 3, 4, 4, 4, 3, 3,
7659 3, 2, 0, 6, 2, 4, 1, 1, 2, 2,
7660 4, 1, 2, 3, 1, 3, 5, 2, 1, 1,
7661 3, 1, 3, 1, 2, 1, 1, 3, 2, 1,
7662 1, 3, 2, 1, 2, 1, 1, 1, 3, 3,
7663 2, 2, 2, 2, 1, 1, 1, 1, 1, 1,
7664 1, 1, 1, 1, 1, 1, 1, 1, 1, 2,
7665 2, 4, 2, 3, 1, 6, 1, 1, 1, 1,
7666 2, 1, 3, 1, 1, 1, 1, 1, 1, 2,
7667 3, 3, 3, 1, 2, 4, 1, 0, 3, 1,
7668 2, 4, 1, 0, 3, 4, 1, 4, 1, 0,
7669 3, 0, 3, 0, 2, 0, 2, 0, 2, 1,
7670 0, 3, 0, 0, 0, 6, 1, 1, 1, 1,
7671 1, 1, 2, 1, 1, 3, 1, 2, 1, 1,
7672 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
7673 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
7674 1, 0, 4, 1, 1, 1, 3, 1, 0, 3,
7675 2, 1, 1, 3, 4, 2, 2, 1, 1, 1,
7676 3, 1, 3, 2, 0, 6, 8, 4, 6, 4,
7677 6, 2, 4, 6, 2, 4, 2, 4, 1, 0,
7678 1, 1, 1, 1, 1, 1, 1, 1, 1, 3,
7679 1, 3, 1, 1, 1, 1, 2, 1, 1, 1,
7680 2, 1, 1, 1, 2, 1, 2, 1, 1, 1,
7681 1, 0, 4, 1, 2, 1, 3, 3, 2, 1,
7682 4, 2, 1, 1, 1, 1, 1, 1, 1, 1,
7683 1, 1, 1, 1, 1, 1, 2, 2, 2, 1,
7684 1, 1, 1, 1, 2, 0
7685};
7686
7687
7688enum { YYENOMEM = -2 };
7689
7690#define yyerrok (yyerrstatus = 0)
7691#define yyclearin (yychar = YYEMPTY)
7692
7693#define YYACCEPT goto yyacceptlab
7694#define YYABORT goto yyabortlab
7695#define YYERROR goto yyerrorlab
7696#define YYNOMEM goto yyexhaustedlab
7697
7698
7699#define YYRECOVERING() (!!yyerrstatus)
7700
7701#define YYBACKUP(Token, Value) \
7702 do \
7703 if (yychar == YYEMPTY) \
7704 { \
7705 yychar = (Token); \
7706 yylval = (Value); \
7707 YYPOPSTACK (yylen); \
7708 yystate = *yyssp; \
7709 goto yybackup; \
7710 } \
7711 else \
7712 { \
7713 yyerror (&yylloc, p, YY_("syntax error: cannot back up")); \
7714 YYERROR; \
7715 } \
7716 while (0)
7717
7718/* Backward compatibility with an undocumented macro.
7719 Use YYerror or YYUNDEF. */
7720#define YYERRCODE YYUNDEF
7721
7722/* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
7723 If N is 0, then set CURRENT to the empty location which ends
7724 the previous symbol: RHS[0] (always defined). */
7725
7726#ifndef YYLLOC_DEFAULT
7727# define YYLLOC_DEFAULT(Current, Rhs, N) \
7728 do \
7729 if (N) \
7730 { \
7731 (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \
7732 (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \
7733 (Current).last_line = YYRHSLOC (Rhs, N).last_line; \
7734 (Current).last_column = YYRHSLOC (Rhs, N).last_column; \
7735 } \
7736 else \
7737 { \
7738 (Current).first_line = (Current).last_line = \
7739 YYRHSLOC (Rhs, 0).last_line; \
7740 (Current).first_column = (Current).last_column = \
7741 YYRHSLOC (Rhs, 0).last_column; \
7742 } \
7743 while (0)
7744#endif
7745
7746#define YYRHSLOC(Rhs, K) ((Rhs)[K])
7747
7748
7749/* Enable debugging if requested. */
7750#if YYDEBUG
7751
7752# ifndef YYFPRINTF
7753# include <stdio.h> /* INFRINGES ON USER NAME SPACE */
7754# define YYFPRINTF fprintf
7755# endif
7756
7757# define YYDPRINTF(Args) \
7758do { \
7759 if (yydebug) \
7760 YYFPRINTF Args; \
7761} while (0)
7762
7763
7764/* YYLOCATION_PRINT -- Print the location on the stream.
7765 This macro was not mandated originally: define only if we know
7766 we won't break user code: when these are the locations we know. */
7767
7768# ifndef YYLOCATION_PRINT
7769
7770# if defined YY_LOCATION_PRINT
7771
7772 /* Temporary convenience wrapper in case some people defined the
7773 undocumented and private YY_LOCATION_PRINT macros. */
7774# define YYLOCATION_PRINT(File, Loc, p) YY_LOCATION_PRINT(File, *(Loc), p)
7775
7776# elif defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL
7777
7778/* Print *YYLOCP on YYO. Private, do not rely on its existence. */
7779
7780YY_ATTRIBUTE_UNUSED
7781static int
7782yy_location_print_ (FILE *yyo, YYLTYPE const * const yylocp)
7783{
7784 int res = 0;
7785 int end_col = 0 != yylocp->last_column ? yylocp->last_column - 1 : 0;
7786 if (0 <= yylocp->first_line)
7787 {
7788 res += YYFPRINTF (yyo, "%d", yylocp->first_line);
7789 if (0 <= yylocp->first_column)
7790 res += YYFPRINTF (yyo, ".%d", yylocp->first_column);
7791 }
7792 if (0 <= yylocp->last_line)
7793 {
7794 if (yylocp->first_line < yylocp->last_line)
7795 {
7796 res += YYFPRINTF (yyo, "-%d", yylocp->last_line);
7797 if (0 <= end_col)
7798 res += YYFPRINTF (yyo, ".%d", end_col);
7799 }
7800 else if (0 <= end_col && yylocp->first_column < end_col)
7801 res += YYFPRINTF (yyo, "-%d", end_col);
7802 }
7803 return res;
7804}
7805
7806# define YYLOCATION_PRINT yy_location_print_
7807
7808 /* Temporary convenience wrapper in case some people defined the
7809 undocumented and private YY_LOCATION_PRINT macros. */
7810# define YY_LOCATION_PRINT(File, Loc, p) YYLOCATION_PRINT(File, &(Loc), p)
7811
7812# else
7813
7814# define YYLOCATION_PRINT(File, Loc, p) ((void) 0)
7815 /* Temporary convenience wrapper in case some people defined the
7816 undocumented and private YY_LOCATION_PRINT macros. */
7817# define YY_LOCATION_PRINT YYLOCATION_PRINT
7818
7819# endif
7820# endif /* !defined YYLOCATION_PRINT */
7821
7822
7823# define YY_SYMBOL_PRINT(Title, Kind, Value, Location, p) \
7824do { \
7825 if (yydebug) \
7826 { \
7827 YYFPRINTF (stderr, "%s ", Title); \
7828 yy_symbol_print (stderr, \
7829 Kind, Value, Location, p); \
7830 YYFPRINTF (stderr, "\n"); \
7831 } \
7832} while (0)
7833
7834
7835/*-----------------------------------.
7836| Print this symbol's value on YYO. |
7837`-----------------------------------*/
7838
7839static void
7840yy_symbol_value_print (FILE *yyo,
7841 yysymbol_kind_t yykind, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp, struct parser_params *p)
7842{
7843 FILE *yyoutput = yyo;
7844 YY_USE (yyoutput);
7845 YY_USE (yylocationp);
7846 YY_USE (p);
7847 if (!yyvaluep)
7848 return;
7849 YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
7850switch (yykind)
7851 {
7852 case YYSYMBOL_keyword_class: /* "'class'" */
7853#line 2626 "parse.y"
7854 {
7855 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
7856}
7857#line 7858 "parse.c"
7858 break;
7859
7860 case YYSYMBOL_keyword_module: /* "'module'" */
7861#line 2626 "parse.y"
7862 {
7863 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
7864}
7865#line 7866 "parse.c"
7866 break;
7867
7868 case YYSYMBOL_keyword_def: /* "'def'" */
7869#line 2626 "parse.y"
7870 {
7871 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
7872}
7873#line 7874 "parse.c"
7874 break;
7875
7876 case YYSYMBOL_keyword_undef: /* "'undef'" */
7877#line 2626 "parse.y"
7878 {
7879 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
7880}
7881#line 7882 "parse.c"
7882 break;
7883
7884 case YYSYMBOL_keyword_begin: /* "'begin'" */
7885#line 2626 "parse.y"
7886 {
7887 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
7888}
7889#line 7890 "parse.c"
7890 break;
7891
7892 case YYSYMBOL_keyword_rescue: /* "'rescue'" */
7893#line 2626 "parse.y"
7894 {
7895 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
7896}
7897#line 7898 "parse.c"
7898 break;
7899
7900 case YYSYMBOL_keyword_ensure: /* "'ensure'" */
7901#line 2626 "parse.y"
7902 {
7903 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
7904}
7905#line 7906 "parse.c"
7906 break;
7907
7908 case YYSYMBOL_keyword_end: /* "'end'" */
7909#line 2626 "parse.y"
7910 {
7911 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
7912}
7913#line 7914 "parse.c"
7914 break;
7915
7916 case YYSYMBOL_keyword_if: /* "'if'" */
7917#line 2626 "parse.y"
7918 {
7919 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
7920}
7921#line 7922 "parse.c"
7922 break;
7923
7924 case YYSYMBOL_keyword_unless: /* "'unless'" */
7925#line 2626 "parse.y"
7926 {
7927 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
7928}
7929#line 7930 "parse.c"
7930 break;
7931
7932 case YYSYMBOL_keyword_then: /* "'then'" */
7933#line 2626 "parse.y"
7934 {
7935 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
7936}
7937#line 7938 "parse.c"
7938 break;
7939
7940 case YYSYMBOL_keyword_elsif: /* "'elsif'" */
7941#line 2626 "parse.y"
7942 {
7943 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
7944}
7945#line 7946 "parse.c"
7946 break;
7947
7948 case YYSYMBOL_keyword_else: /* "'else'" */
7949#line 2626 "parse.y"
7950 {
7951 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
7952}
7953#line 7954 "parse.c"
7954 break;
7955
7956 case YYSYMBOL_keyword_case: /* "'case'" */
7957#line 2626 "parse.y"
7958 {
7959 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
7960}
7961#line 7962 "parse.c"
7962 break;
7963
7964 case YYSYMBOL_keyword_when: /* "'when'" */
7965#line 2626 "parse.y"
7966 {
7967 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
7968}
7969#line 7970 "parse.c"
7970 break;
7971
7972 case YYSYMBOL_keyword_while: /* "'while'" */
7973#line 2626 "parse.y"
7974 {
7975 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
7976}
7977#line 7978 "parse.c"
7978 break;
7979
7980 case YYSYMBOL_keyword_until: /* "'until'" */
7981#line 2626 "parse.y"
7982 {
7983 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
7984}
7985#line 7986 "parse.c"
7986 break;
7987
7988 case YYSYMBOL_keyword_for: /* "'for'" */
7989#line 2626 "parse.y"
7990 {
7991 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
7992}
7993#line 7994 "parse.c"
7994 break;
7995
7996 case YYSYMBOL_keyword_break: /* "'break'" */
7997#line 2626 "parse.y"
7998 {
7999 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8000}
8001#line 8002 "parse.c"
8002 break;
8003
8004 case YYSYMBOL_keyword_next: /* "'next'" */
8005#line 2626 "parse.y"
8006 {
8007 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8008}
8009#line 8010 "parse.c"
8010 break;
8011
8012 case YYSYMBOL_keyword_redo: /* "'redo'" */
8013#line 2626 "parse.y"
8014 {
8015 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8016}
8017#line 8018 "parse.c"
8018 break;
8019
8020 case YYSYMBOL_keyword_retry: /* "'retry'" */
8021#line 2626 "parse.y"
8022 {
8023 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8024}
8025#line 8026 "parse.c"
8026 break;
8027
8028 case YYSYMBOL_keyword_in: /* "'in'" */
8029#line 2626 "parse.y"
8030 {
8031 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8032}
8033#line 8034 "parse.c"
8034 break;
8035
8036 case YYSYMBOL_keyword_do: /* "'do'" */
8037#line 2626 "parse.y"
8038 {
8039 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8040}
8041#line 8042 "parse.c"
8042 break;
8043
8044 case YYSYMBOL_keyword_do_cond: /* "'do' for condition" */
8045#line 2626 "parse.y"
8046 {
8047 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8048}
8049#line 8050 "parse.c"
8050 break;
8051
8052 case YYSYMBOL_keyword_do_block: /* "'do' for block" */
8053#line 2626 "parse.y"
8054 {
8055 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8056}
8057#line 8058 "parse.c"
8058 break;
8059
8060 case YYSYMBOL_keyword_do_LAMBDA: /* "'do' for lambda" */
8061#line 2626 "parse.y"
8062 {
8063 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8064}
8065#line 8066 "parse.c"
8066 break;
8067
8068 case YYSYMBOL_keyword_return: /* "'return'" */
8069#line 2626 "parse.y"
8070 {
8071 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8072}
8073#line 8074 "parse.c"
8074 break;
8075
8076 case YYSYMBOL_keyword_yield: /* "'yield'" */
8077#line 2626 "parse.y"
8078 {
8079 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8080}
8081#line 8082 "parse.c"
8082 break;
8083
8084 case YYSYMBOL_keyword_super: /* "'super'" */
8085#line 2626 "parse.y"
8086 {
8087 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8088}
8089#line 8090 "parse.c"
8090 break;
8091
8092 case YYSYMBOL_keyword_self: /* "'self'" */
8093#line 2626 "parse.y"
8094 {
8095 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8096}
8097#line 8098 "parse.c"
8098 break;
8099
8100 case YYSYMBOL_keyword_nil: /* "'nil'" */
8101#line 2626 "parse.y"
8102 {
8103 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8104}
8105#line 8106 "parse.c"
8106 break;
8107
8108 case YYSYMBOL_keyword_true: /* "'true'" */
8109#line 2626 "parse.y"
8110 {
8111 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8112}
8113#line 8114 "parse.c"
8114 break;
8115
8116 case YYSYMBOL_keyword_false: /* "'false'" */
8117#line 2626 "parse.y"
8118 {
8119 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8120}
8121#line 8122 "parse.c"
8122 break;
8123
8124 case YYSYMBOL_keyword_and: /* "'and'" */
8125#line 2626 "parse.y"
8126 {
8127 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8128}
8129#line 8130 "parse.c"
8130 break;
8131
8132 case YYSYMBOL_keyword_or: /* "'or'" */
8133#line 2626 "parse.y"
8134 {
8135 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8136}
8137#line 8138 "parse.c"
8138 break;
8139
8140 case YYSYMBOL_keyword_not: /* "'not'" */
8141#line 2626 "parse.y"
8142 {
8143 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8144}
8145#line 8146 "parse.c"
8146 break;
8147
8148 case YYSYMBOL_modifier_if: /* "'if' modifier" */
8149#line 2626 "parse.y"
8150 {
8151 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8152}
8153#line 8154 "parse.c"
8154 break;
8155
8156 case YYSYMBOL_modifier_unless: /* "'unless' modifier" */
8157#line 2626 "parse.y"
8158 {
8159 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8160}
8161#line 8162 "parse.c"
8162 break;
8163
8164 case YYSYMBOL_modifier_while: /* "'while' modifier" */
8165#line 2626 "parse.y"
8166 {
8167 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8168}
8169#line 8170 "parse.c"
8170 break;
8171
8172 case YYSYMBOL_modifier_until: /* "'until' modifier" */
8173#line 2626 "parse.y"
8174 {
8175 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8176}
8177#line 8178 "parse.c"
8178 break;
8179
8180 case YYSYMBOL_modifier_rescue: /* "'rescue' modifier" */
8181#line 2626 "parse.y"
8182 {
8183 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8184}
8185#line 8186 "parse.c"
8186 break;
8187
8188 case YYSYMBOL_keyword_alias: /* "'alias'" */
8189#line 2626 "parse.y"
8190 {
8191 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8192}
8193#line 8194 "parse.c"
8194 break;
8195
8196 case YYSYMBOL_keyword_defined: /* "'defined?'" */
8197#line 2626 "parse.y"
8198 {
8199 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8200}
8201#line 8202 "parse.c"
8202 break;
8203
8204 case YYSYMBOL_keyword_BEGIN: /* "'BEGIN'" */
8205#line 2626 "parse.y"
8206 {
8207 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8208}
8209#line 8210 "parse.c"
8210 break;
8211
8212 case YYSYMBOL_keyword_END: /* "'END'" */
8213#line 2626 "parse.y"
8214 {
8215 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8216}
8217#line 8218 "parse.c"
8218 break;
8219
8220 case YYSYMBOL_keyword__LINE__: /* "'__LINE__'" */
8221#line 2626 "parse.y"
8222 {
8223 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8224}
8225#line 8226 "parse.c"
8226 break;
8227
8228 case YYSYMBOL_keyword__FILE__: /* "'__FILE__'" */
8229#line 2626 "parse.y"
8230 {
8231 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8232}
8233#line 8234 "parse.c"
8234 break;
8235
8236 case YYSYMBOL_keyword__ENCODING__: /* "'__ENCODING__'" */
8237#line 2626 "parse.y"
8238 {
8239 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8240}
8241#line 8242 "parse.c"
8242 break;
8243
8244 case YYSYMBOL_tIDENTIFIER: /* "local variable or method" */
8245#line 2626 "parse.y"
8246 {
8247 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8248}
8249#line 8250 "parse.c"
8250 break;
8251
8252 case YYSYMBOL_tFID: /* "method" */
8253#line 2626 "parse.y"
8254 {
8255 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8256}
8257#line 8258 "parse.c"
8258 break;
8259
8260 case YYSYMBOL_tGVAR: /* "global variable" */
8261#line 2626 "parse.y"
8262 {
8263 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8264}
8265#line 8266 "parse.c"
8266 break;
8267
8268 case YYSYMBOL_tIVAR: /* "instance variable" */
8269#line 2626 "parse.y"
8270 {
8271 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8272}
8273#line 8274 "parse.c"
8274 break;
8275
8276 case YYSYMBOL_tCONSTANT: /* "constant" */
8277#line 2626 "parse.y"
8278 {
8279 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8280}
8281#line 8282 "parse.c"
8282 break;
8283
8284 case YYSYMBOL_tCVAR: /* "class variable" */
8285#line 2626 "parse.y"
8286 {
8287 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8288}
8289#line 8290 "parse.c"
8290 break;
8291
8292 case YYSYMBOL_tLABEL: /* "label" */
8293#line 2626 "parse.y"
8294 {
8295 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8296}
8297#line 8298 "parse.c"
8298 break;
8299
8300 case YYSYMBOL_tINTEGER: /* "integer literal" */
8301#line 2629 "parse.y"
8302 {
8303 switch (nd_type(RNODE(((*yyvaluep).node)))) {
8304 case NODE_INTEGER:
8305 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_integer_literal_val(((*yyvaluep).node)));
8306 break;
8307 case NODE_FLOAT:
8308 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_float_literal_val(((*yyvaluep).node)));
8309 break;
8310 case NODE_RATIONAL:
8311 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_rational_literal_val(((*yyvaluep).node)));
8312 break;
8313 case NODE_IMAGINARY:
8314 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_imaginary_literal_val(((*yyvaluep).node)));
8315 break;
8316 default:
8317 break;
8318 }
8319}
8320#line 8321 "parse.c"
8321 break;
8322
8323 case YYSYMBOL_tFLOAT: /* "float literal" */
8324#line 2629 "parse.y"
8325 {
8326 switch (nd_type(RNODE(((*yyvaluep).node)))) {
8327 case NODE_INTEGER:
8328 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_integer_literal_val(((*yyvaluep).node)));
8329 break;
8330 case NODE_FLOAT:
8331 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_float_literal_val(((*yyvaluep).node)));
8332 break;
8333 case NODE_RATIONAL:
8334 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_rational_literal_val(((*yyvaluep).node)));
8335 break;
8336 case NODE_IMAGINARY:
8337 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_imaginary_literal_val(((*yyvaluep).node)));
8338 break;
8339 default:
8340 break;
8341 }
8342}
8343#line 8344 "parse.c"
8344 break;
8345
8346 case YYSYMBOL_tRATIONAL: /* "rational literal" */
8347#line 2629 "parse.y"
8348 {
8349 switch (nd_type(RNODE(((*yyvaluep).node)))) {
8350 case NODE_INTEGER:
8351 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_integer_literal_val(((*yyvaluep).node)));
8352 break;
8353 case NODE_FLOAT:
8354 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_float_literal_val(((*yyvaluep).node)));
8355 break;
8356 case NODE_RATIONAL:
8357 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_rational_literal_val(((*yyvaluep).node)));
8358 break;
8359 case NODE_IMAGINARY:
8360 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_imaginary_literal_val(((*yyvaluep).node)));
8361 break;
8362 default:
8363 break;
8364 }
8365}
8366#line 8367 "parse.c"
8367 break;
8368
8369 case YYSYMBOL_tIMAGINARY: /* "imaginary literal" */
8370#line 2629 "parse.y"
8371 {
8372 switch (nd_type(RNODE(((*yyvaluep).node)))) {
8373 case NODE_INTEGER:
8374 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_integer_literal_val(((*yyvaluep).node)));
8375 break;
8376 case NODE_FLOAT:
8377 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_float_literal_val(((*yyvaluep).node)));
8378 break;
8379 case NODE_RATIONAL:
8380 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_rational_literal_val(((*yyvaluep).node)));
8381 break;
8382 case NODE_IMAGINARY:
8383 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_imaginary_literal_val(((*yyvaluep).node)));
8384 break;
8385 default:
8386 break;
8387 }
8388}
8389#line 8390 "parse.c"
8390 break;
8391
8392 case YYSYMBOL_tCHAR: /* "char literal" */
8393#line 2629 "parse.y"
8394 {
8395 switch (nd_type(RNODE(((*yyvaluep).node)))) {
8396 case NODE_INTEGER:
8397 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_integer_literal_val(((*yyvaluep).node)));
8398 break;
8399 case NODE_FLOAT:
8400 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_float_literal_val(((*yyvaluep).node)));
8401 break;
8402 case NODE_RATIONAL:
8403 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_rational_literal_val(((*yyvaluep).node)));
8404 break;
8405 case NODE_IMAGINARY:
8406 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_imaginary_literal_val(((*yyvaluep).node)));
8407 break;
8408 default:
8409 break;
8410 }
8411}
8412#line 8413 "parse.c"
8413 break;
8414
8415 case YYSYMBOL_tNTH_REF: /* "numbered reference" */
8416#line 2647 "parse.y"
8417 {
8418 rb_parser_printf(p, "$%ld", RNODE_NTH_REF(((*yyvaluep).node))->nd_nth);
8419}
8420#line 8421 "parse.c"
8421 break;
8422
8423 case YYSYMBOL_tBACK_REF: /* "back reference" */
8424#line 2650 "parse.y"
8425 {
8426 rb_parser_printf(p, "$%c", (int)RNODE_BACK_REF(((*yyvaluep).node))->nd_nth);
8427}
8428#line 8429 "parse.c"
8429 break;
8430
8431 case YYSYMBOL_tSTRING_CONTENT: /* "literal content" */
8432#line 2629 "parse.y"
8433 {
8434 switch (nd_type(RNODE(((*yyvaluep).node)))) {
8435 case NODE_INTEGER:
8436 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_integer_literal_val(((*yyvaluep).node)));
8437 break;
8438 case NODE_FLOAT:
8439 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_float_literal_val(((*yyvaluep).node)));
8440 break;
8441 case NODE_RATIONAL:
8442 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_rational_literal_val(((*yyvaluep).node)));
8443 break;
8444 case NODE_IMAGINARY:
8445 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_imaginary_literal_val(((*yyvaluep).node)));
8446 break;
8447 default:
8448 break;
8449 }
8450}
8451#line 8452 "parse.c"
8452 break;
8453
8454 case YYSYMBOL_69_: /* '.' */
8455#line 2626 "parse.y"
8456 {
8457 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8458}
8459#line 8460 "parse.c"
8460 break;
8461
8462 case YYSYMBOL_70_backslash_: /* "backslash" */
8463#line 2626 "parse.y"
8464 {
8465 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8466}
8467#line 8468 "parse.c"
8468 break;
8469
8470 case YYSYMBOL_72_escaped_horizontal_tab_: /* "escaped horizontal tab" */
8471#line 2626 "parse.y"
8472 {
8473 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8474}
8475#line 8476 "parse.c"
8476 break;
8477
8478 case YYSYMBOL_73_escaped_form_feed_: /* "escaped form feed" */
8479#line 2626 "parse.y"
8480 {
8481 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8482}
8483#line 8484 "parse.c"
8484 break;
8485
8486 case YYSYMBOL_74_escaped_carriage_return_: /* "escaped carriage return" */
8487#line 2626 "parse.y"
8488 {
8489 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8490}
8491#line 8492 "parse.c"
8492 break;
8493
8494 case YYSYMBOL_75_escaped_vertical_tab_: /* "escaped vertical tab" */
8495#line 2626 "parse.y"
8496 {
8497 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8498}
8499#line 8500 "parse.c"
8500 break;
8501
8502 case YYSYMBOL_tANDDOT: /* "&." */
8503#line 2626 "parse.y"
8504 {
8505 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8506}
8507#line 8508 "parse.c"
8508 break;
8509
8510 case YYSYMBOL_tCOLON2: /* "::" */
8511#line 2626 "parse.y"
8512 {
8513 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8514}
8515#line 8516 "parse.c"
8516 break;
8517
8518 case YYSYMBOL_tOP_ASGN: /* "operator-assignment" */
8519#line 2626 "parse.y"
8520 {
8521 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8522}
8523#line 8524 "parse.c"
8524 break;
8525
8526 case YYSYMBOL_compstmt_top_stmts: /* compstmt_top_stmts */
8527#line 2617 "parse.y"
8528 {
8529 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8530 rb_parser_printf(p, "NODE_SPECIAL");
8531 }
8532 else if (((*yyvaluep).node)) {
8533 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8534 }
8535}
8536#line 8537 "parse.c"
8537 break;
8538
8539 case YYSYMBOL_top_stmts: /* top_stmts */
8540#line 2617 "parse.y"
8541 {
8542 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8543 rb_parser_printf(p, "NODE_SPECIAL");
8544 }
8545 else if (((*yyvaluep).node)) {
8546 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8547 }
8548}
8549#line 8550 "parse.c"
8550 break;
8551
8552 case YYSYMBOL_top_stmt: /* top_stmt */
8553#line 2617 "parse.y"
8554 {
8555 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8556 rb_parser_printf(p, "NODE_SPECIAL");
8557 }
8558 else if (((*yyvaluep).node)) {
8559 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8560 }
8561}
8562#line 8563 "parse.c"
8563 break;
8564
8565 case YYSYMBOL_block_open: /* block_open */
8566#line 2617 "parse.y"
8567 {
8568 if ((NODE *)((*yyvaluep).node_exits) == (NODE *)-1) {
8569 rb_parser_printf(p, "NODE_SPECIAL");
8570 }
8571 else if (((*yyvaluep).node_exits)) {
8572 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_exits)))));
8573 }
8574}
8575#line 8576 "parse.c"
8576 break;
8577
8578 case YYSYMBOL_begin_block: /* begin_block */
8579#line 2617 "parse.y"
8580 {
8581 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8582 rb_parser_printf(p, "NODE_SPECIAL");
8583 }
8584 else if (((*yyvaluep).node)) {
8585 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8586 }
8587}
8588#line 8589 "parse.c"
8589 break;
8590
8591 case YYSYMBOL_compstmt_stmts: /* compstmt_stmts */
8592#line 2617 "parse.y"
8593 {
8594 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8595 rb_parser_printf(p, "NODE_SPECIAL");
8596 }
8597 else if (((*yyvaluep).node)) {
8598 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8599 }
8600}
8601#line 8602 "parse.c"
8602 break;
8603
8604 case YYSYMBOL_bodystmt: /* bodystmt */
8605#line 2617 "parse.y"
8606 {
8607 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8608 rb_parser_printf(p, "NODE_SPECIAL");
8609 }
8610 else if (((*yyvaluep).node)) {
8611 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8612 }
8613}
8614#line 8615 "parse.c"
8615 break;
8616
8617 case YYSYMBOL_stmts: /* stmts */
8618#line 2617 "parse.y"
8619 {
8620 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8621 rb_parser_printf(p, "NODE_SPECIAL");
8622 }
8623 else if (((*yyvaluep).node)) {
8624 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8625 }
8626}
8627#line 8628 "parse.c"
8628 break;
8629
8630 case YYSYMBOL_stmt_or_begin: /* stmt_or_begin */
8631#line 2617 "parse.y"
8632 {
8633 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8634 rb_parser_printf(p, "NODE_SPECIAL");
8635 }
8636 else if (((*yyvaluep).node)) {
8637 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8638 }
8639}
8640#line 8641 "parse.c"
8641 break;
8642
8643 case YYSYMBOL_allow_exits: /* allow_exits */
8644#line 2617 "parse.y"
8645 {
8646 if ((NODE *)((*yyvaluep).node_exits) == (NODE *)-1) {
8647 rb_parser_printf(p, "NODE_SPECIAL");
8648 }
8649 else if (((*yyvaluep).node_exits)) {
8650 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_exits)))));
8651 }
8652}
8653#line 8654 "parse.c"
8654 break;
8655
8656 case YYSYMBOL_stmt: /* stmt */
8657#line 2617 "parse.y"
8658 {
8659 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8660 rb_parser_printf(p, "NODE_SPECIAL");
8661 }
8662 else if (((*yyvaluep).node)) {
8663 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8664 }
8665}
8666#line 8667 "parse.c"
8667 break;
8668
8669 case YYSYMBOL_asgn_mrhs: /* asgn_mrhs */
8670#line 2617 "parse.y"
8671 {
8672 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8673 rb_parser_printf(p, "NODE_SPECIAL");
8674 }
8675 else if (((*yyvaluep).node)) {
8676 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8677 }
8678}
8679#line 8680 "parse.c"
8680 break;
8681
8682 case YYSYMBOL_asgn_command_rhs: /* asgn_command_rhs */
8683#line 2617 "parse.y"
8684 {
8685 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8686 rb_parser_printf(p, "NODE_SPECIAL");
8687 }
8688 else if (((*yyvaluep).node)) {
8689 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8690 }
8691}
8692#line 8693 "parse.c"
8693 break;
8694
8695 case YYSYMBOL_command_asgn: /* command_asgn */
8696#line 2617 "parse.y"
8697 {
8698 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8699 rb_parser_printf(p, "NODE_SPECIAL");
8700 }
8701 else if (((*yyvaluep).node)) {
8702 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8703 }
8704}
8705#line 8706 "parse.c"
8706 break;
8707
8708 case YYSYMBOL_op_asgn_command_rhs: /* op_asgn_command_rhs */
8709#line 2617 "parse.y"
8710 {
8711 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8712 rb_parser_printf(p, "NODE_SPECIAL");
8713 }
8714 else if (((*yyvaluep).node)) {
8715 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8716 }
8717}
8718#line 8719 "parse.c"
8719 break;
8720
8721 case YYSYMBOL_def_endless_method_endless_command: /* def_endless_method_endless_command */
8722#line 2617 "parse.y"
8723 {
8724 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8725 rb_parser_printf(p, "NODE_SPECIAL");
8726 }
8727 else if (((*yyvaluep).node)) {
8728 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8729 }
8730}
8731#line 8732 "parse.c"
8732 break;
8733
8734 case YYSYMBOL_endless_command: /* endless_command */
8735#line 2617 "parse.y"
8736 {
8737 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8738 rb_parser_printf(p, "NODE_SPECIAL");
8739 }
8740 else if (((*yyvaluep).node)) {
8741 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8742 }
8743}
8744#line 8745 "parse.c"
8745 break;
8746
8747 case YYSYMBOL_command_rhs: /* command_rhs */
8748#line 2617 "parse.y"
8749 {
8750 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8751 rb_parser_printf(p, "NODE_SPECIAL");
8752 }
8753 else if (((*yyvaluep).node)) {
8754 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8755 }
8756}
8757#line 8758 "parse.c"
8758 break;
8759
8760 case YYSYMBOL_expr: /* expr */
8761#line 2617 "parse.y"
8762 {
8763 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8764 rb_parser_printf(p, "NODE_SPECIAL");
8765 }
8766 else if (((*yyvaluep).node)) {
8767 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8768 }
8769}
8770#line 8771 "parse.c"
8771 break;
8772
8773 case YYSYMBOL_def_name: /* def_name */
8774#line 2626 "parse.y"
8775 {
8776 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8777}
8778#line 8779 "parse.c"
8779 break;
8780
8781 case YYSYMBOL_defn_head: /* defn_head */
8782#line 2617 "parse.y"
8783 {
8784 if ((NODE *)((*yyvaluep).node_def_temp) == (NODE *)-1) {
8785 rb_parser_printf(p, "NODE_SPECIAL");
8786 }
8787 else if (((*yyvaluep).node_def_temp)) {
8788 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_def_temp)))));
8789 }
8790}
8791#line 8792 "parse.c"
8792 break;
8793
8794 case YYSYMBOL_defs_head: /* defs_head */
8795#line 2617 "parse.y"
8796 {
8797 if ((NODE *)((*yyvaluep).node_def_temp) == (NODE *)-1) {
8798 rb_parser_printf(p, "NODE_SPECIAL");
8799 }
8800 else if (((*yyvaluep).node_def_temp)) {
8801 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_def_temp)))));
8802 }
8803}
8804#line 8805 "parse.c"
8805 break;
8806
8807 case YYSYMBOL_value_expr_expr: /* value_expr_expr */
8808#line 2617 "parse.y"
8809 {
8810 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8811 rb_parser_printf(p, "NODE_SPECIAL");
8812 }
8813 else if (((*yyvaluep).node)) {
8814 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8815 }
8816}
8817#line 8818 "parse.c"
8818 break;
8819
8820 case YYSYMBOL_expr_value: /* expr_value */
8821#line 2617 "parse.y"
8822 {
8823 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8824 rb_parser_printf(p, "NODE_SPECIAL");
8825 }
8826 else if (((*yyvaluep).node)) {
8827 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8828 }
8829}
8830#line 8831 "parse.c"
8831 break;
8832
8833 case YYSYMBOL_expr_value_do: /* expr_value_do */
8834#line 2617 "parse.y"
8835 {
8836 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8837 rb_parser_printf(p, "NODE_SPECIAL");
8838 }
8839 else if (((*yyvaluep).node)) {
8840 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8841 }
8842}
8843#line 8844 "parse.c"
8844 break;
8845
8846 case YYSYMBOL_command_call: /* command_call */
8847#line 2617 "parse.y"
8848 {
8849 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8850 rb_parser_printf(p, "NODE_SPECIAL");
8851 }
8852 else if (((*yyvaluep).node)) {
8853 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8854 }
8855}
8856#line 8857 "parse.c"
8857 break;
8858
8859 case YYSYMBOL_value_expr_command_call: /* value_expr_command_call */
8860#line 2617 "parse.y"
8861 {
8862 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8863 rb_parser_printf(p, "NODE_SPECIAL");
8864 }
8865 else if (((*yyvaluep).node)) {
8866 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8867 }
8868}
8869#line 8870 "parse.c"
8870 break;
8871
8872 case YYSYMBOL_command_call_value: /* command_call_value */
8873#line 2617 "parse.y"
8874 {
8875 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8876 rb_parser_printf(p, "NODE_SPECIAL");
8877 }
8878 else if (((*yyvaluep).node)) {
8879 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8880 }
8881}
8882#line 8883 "parse.c"
8883 break;
8884
8885 case YYSYMBOL_block_command: /* block_command */
8886#line 2617 "parse.y"
8887 {
8888 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8889 rb_parser_printf(p, "NODE_SPECIAL");
8890 }
8891 else if (((*yyvaluep).node)) {
8892 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8893 }
8894}
8895#line 8896 "parse.c"
8896 break;
8897
8898 case YYSYMBOL_cmd_brace_block: /* cmd_brace_block */
8899#line 2617 "parse.y"
8900 {
8901 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8902 rb_parser_printf(p, "NODE_SPECIAL");
8903 }
8904 else if (((*yyvaluep).node)) {
8905 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8906 }
8907}
8908#line 8909 "parse.c"
8909 break;
8910
8911 case YYSYMBOL_fcall: /* fcall */
8912#line 2617 "parse.y"
8913 {
8914 if ((NODE *)((*yyvaluep).node_fcall) == (NODE *)-1) {
8915 rb_parser_printf(p, "NODE_SPECIAL");
8916 }
8917 else if (((*yyvaluep).node_fcall)) {
8918 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_fcall)))));
8919 }
8920}
8921#line 8922 "parse.c"
8922 break;
8923
8924 case YYSYMBOL_command: /* command */
8925#line 2617 "parse.y"
8926 {
8927 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8928 rb_parser_printf(p, "NODE_SPECIAL");
8929 }
8930 else if (((*yyvaluep).node)) {
8931 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8932 }
8933}
8934#line 8935 "parse.c"
8935 break;
8936
8937 case YYSYMBOL_mlhs: /* mlhs */
8938#line 2617 "parse.y"
8939 {
8940 if ((NODE *)((*yyvaluep).node_masgn) == (NODE *)-1) {
8941 rb_parser_printf(p, "NODE_SPECIAL");
8942 }
8943 else if (((*yyvaluep).node_masgn)) {
8944 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_masgn)))));
8945 }
8946}
8947#line 8948 "parse.c"
8948 break;
8949
8950 case YYSYMBOL_mlhs_inner: /* mlhs_inner */
8951#line 2617 "parse.y"
8952 {
8953 if ((NODE *)((*yyvaluep).node_masgn) == (NODE *)-1) {
8954 rb_parser_printf(p, "NODE_SPECIAL");
8955 }
8956 else if (((*yyvaluep).node_masgn)) {
8957 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_masgn)))));
8958 }
8959}
8960#line 8961 "parse.c"
8961 break;
8962
8963 case YYSYMBOL_mlhs_basic: /* mlhs_basic */
8964#line 2617 "parse.y"
8965 {
8966 if ((NODE *)((*yyvaluep).node_masgn) == (NODE *)-1) {
8967 rb_parser_printf(p, "NODE_SPECIAL");
8968 }
8969 else if (((*yyvaluep).node_masgn)) {
8970 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_masgn)))));
8971 }
8972}
8973#line 8974 "parse.c"
8974 break;
8975
8976 case YYSYMBOL_mlhs_items_mlhs_item: /* mlhs_items_mlhs_item */
8977#line 2617 "parse.y"
8978 {
8979 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8980 rb_parser_printf(p, "NODE_SPECIAL");
8981 }
8982 else if (((*yyvaluep).node)) {
8983 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8984 }
8985}
8986#line 8987 "parse.c"
8987 break;
8988
8989 case YYSYMBOL_mlhs_item: /* mlhs_item */
8990#line 2617 "parse.y"
8991 {
8992 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8993 rb_parser_printf(p, "NODE_SPECIAL");
8994 }
8995 else if (((*yyvaluep).node)) {
8996 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8997 }
8998}
8999#line 9000 "parse.c"
9000 break;
9001
9002 case YYSYMBOL_mlhs_head: /* mlhs_head */
9003#line 2617 "parse.y"
9004 {
9005 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9006 rb_parser_printf(p, "NODE_SPECIAL");
9007 }
9008 else if (((*yyvaluep).node)) {
9009 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9010 }
9011}
9012#line 9013 "parse.c"
9013 break;
9014
9015 case YYSYMBOL_mlhs_node: /* mlhs_node */
9016#line 2617 "parse.y"
9017 {
9018 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9019 rb_parser_printf(p, "NODE_SPECIAL");
9020 }
9021 else if (((*yyvaluep).node)) {
9022 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9023 }
9024}
9025#line 9026 "parse.c"
9026 break;
9027
9028 case YYSYMBOL_lhs: /* lhs */
9029#line 2617 "parse.y"
9030 {
9031 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9032 rb_parser_printf(p, "NODE_SPECIAL");
9033 }
9034 else if (((*yyvaluep).node)) {
9035 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9036 }
9037}
9038#line 9039 "parse.c"
9039 break;
9040
9041 case YYSYMBOL_cname: /* cname */
9042#line 2626 "parse.y"
9043 {
9044 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
9045}
9046#line 9047 "parse.c"
9047 break;
9048
9049 case YYSYMBOL_cpath: /* cpath */
9050#line 2617 "parse.y"
9051 {
9052 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9053 rb_parser_printf(p, "NODE_SPECIAL");
9054 }
9055 else if (((*yyvaluep).node)) {
9056 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9057 }
9058}
9059#line 9060 "parse.c"
9060 break;
9061
9062 case YYSYMBOL_fname: /* fname */
9063#line 2626 "parse.y"
9064 {
9065 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
9066}
9067#line 9068 "parse.c"
9068 break;
9069
9070 case YYSYMBOL_fitem: /* fitem */
9071#line 2617 "parse.y"
9072 {
9073 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9074 rb_parser_printf(p, "NODE_SPECIAL");
9075 }
9076 else if (((*yyvaluep).node)) {
9077 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9078 }
9079}
9080#line 9081 "parse.c"
9081 break;
9082
9083 case YYSYMBOL_undef_list: /* undef_list */
9084#line 2617 "parse.y"
9085 {
9086 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9087 rb_parser_printf(p, "NODE_SPECIAL");
9088 }
9089 else if (((*yyvaluep).node)) {
9090 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9091 }
9092}
9093#line 9094 "parse.c"
9094 break;
9095
9096 case YYSYMBOL_op: /* op */
9097#line 2626 "parse.y"
9098 {
9099 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
9100}
9101#line 9102 "parse.c"
9102 break;
9103
9104 case YYSYMBOL_reswords: /* reswords */
9105#line 2626 "parse.y"
9106 {
9107 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
9108}
9109#line 9110 "parse.c"
9110 break;
9111
9112 case YYSYMBOL_asgn_arg_rhs: /* asgn_arg_rhs */
9113#line 2617 "parse.y"
9114 {
9115 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9116 rb_parser_printf(p, "NODE_SPECIAL");
9117 }
9118 else if (((*yyvaluep).node)) {
9119 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9120 }
9121}
9122#line 9123 "parse.c"
9123 break;
9124
9125 case YYSYMBOL_arg: /* arg */
9126#line 2617 "parse.y"
9127 {
9128 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9129 rb_parser_printf(p, "NODE_SPECIAL");
9130 }
9131 else if (((*yyvaluep).node)) {
9132 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9133 }
9134}
9135#line 9136 "parse.c"
9136 break;
9137
9138 case YYSYMBOL_op_asgn_arg_rhs: /* op_asgn_arg_rhs */
9139#line 2617 "parse.y"
9140 {
9141 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9142 rb_parser_printf(p, "NODE_SPECIAL");
9143 }
9144 else if (((*yyvaluep).node)) {
9145 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9146 }
9147}
9148#line 9149 "parse.c"
9149 break;
9150
9151 case YYSYMBOL_range_expr_arg: /* range_expr_arg */
9152#line 2617 "parse.y"
9153 {
9154 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9155 rb_parser_printf(p, "NODE_SPECIAL");
9156 }
9157 else if (((*yyvaluep).node)) {
9158 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9159 }
9160}
9161#line 9162 "parse.c"
9162 break;
9163
9164 case YYSYMBOL_def_endless_method_endless_arg: /* def_endless_method_endless_arg */
9165#line 2617 "parse.y"
9166 {
9167 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9168 rb_parser_printf(p, "NODE_SPECIAL");
9169 }
9170 else if (((*yyvaluep).node)) {
9171 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9172 }
9173}
9174#line 9175 "parse.c"
9175 break;
9176
9177 case YYSYMBOL_ternary: /* ternary */
9178#line 2617 "parse.y"
9179 {
9180 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9181 rb_parser_printf(p, "NODE_SPECIAL");
9182 }
9183 else if (((*yyvaluep).node)) {
9184 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9185 }
9186}
9187#line 9188 "parse.c"
9188 break;
9189
9190 case YYSYMBOL_endless_arg: /* endless_arg */
9191#line 2617 "parse.y"
9192 {
9193 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9194 rb_parser_printf(p, "NODE_SPECIAL");
9195 }
9196 else if (((*yyvaluep).node)) {
9197 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9198 }
9199}
9200#line 9201 "parse.c"
9201 break;
9202
9203 case YYSYMBOL_relop: /* relop */
9204#line 2626 "parse.y"
9205 {
9206 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
9207}
9208#line 9209 "parse.c"
9209 break;
9210
9211 case YYSYMBOL_rel_expr: /* rel_expr */
9212#line 2617 "parse.y"
9213 {
9214 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9215 rb_parser_printf(p, "NODE_SPECIAL");
9216 }
9217 else if (((*yyvaluep).node)) {
9218 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9219 }
9220}
9221#line 9222 "parse.c"
9222 break;
9223
9224 case YYSYMBOL_value_expr_arg: /* value_expr_arg */
9225#line 2617 "parse.y"
9226 {
9227 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9228 rb_parser_printf(p, "NODE_SPECIAL");
9229 }
9230 else if (((*yyvaluep).node)) {
9231 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9232 }
9233}
9234#line 9235 "parse.c"
9235 break;
9236
9237 case YYSYMBOL_arg_value: /* arg_value */
9238#line 2617 "parse.y"
9239 {
9240 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9241 rb_parser_printf(p, "NODE_SPECIAL");
9242 }
9243 else if (((*yyvaluep).node)) {
9244 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9245 }
9246}
9247#line 9248 "parse.c"
9248 break;
9249
9250 case YYSYMBOL_aref_args: /* aref_args */
9251#line 2617 "parse.y"
9252 {
9253 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9254 rb_parser_printf(p, "NODE_SPECIAL");
9255 }
9256 else if (((*yyvaluep).node)) {
9257 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9258 }
9259}
9260#line 9261 "parse.c"
9261 break;
9262
9263 case YYSYMBOL_arg_rhs: /* arg_rhs */
9264#line 2617 "parse.y"
9265 {
9266 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9267 rb_parser_printf(p, "NODE_SPECIAL");
9268 }
9269 else if (((*yyvaluep).node)) {
9270 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9271 }
9272}
9273#line 9274 "parse.c"
9274 break;
9275
9276 case YYSYMBOL_paren_args: /* paren_args */
9277#line 2617 "parse.y"
9278 {
9279 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9280 rb_parser_printf(p, "NODE_SPECIAL");
9281 }
9282 else if (((*yyvaluep).node)) {
9283 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9284 }
9285}
9286#line 9287 "parse.c"
9287 break;
9288
9289 case YYSYMBOL_opt_paren_args: /* opt_paren_args */
9290#line 2617 "parse.y"
9291 {
9292 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9293 rb_parser_printf(p, "NODE_SPECIAL");
9294 }
9295 else if (((*yyvaluep).node)) {
9296 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9297 }
9298}
9299#line 9300 "parse.c"
9300 break;
9301
9302 case YYSYMBOL_opt_call_args: /* opt_call_args */
9303#line 2617 "parse.y"
9304 {
9305 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9306 rb_parser_printf(p, "NODE_SPECIAL");
9307 }
9308 else if (((*yyvaluep).node)) {
9309 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9310 }
9311}
9312#line 9313 "parse.c"
9313 break;
9314
9315 case YYSYMBOL_value_expr_command: /* value_expr_command */
9316#line 2617 "parse.y"
9317 {
9318 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9319 rb_parser_printf(p, "NODE_SPECIAL");
9320 }
9321 else if (((*yyvaluep).node)) {
9322 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9323 }
9324}
9325#line 9326 "parse.c"
9326 break;
9327
9328 case YYSYMBOL_call_args: /* call_args */
9329#line 2617 "parse.y"
9330 {
9331 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9332 rb_parser_printf(p, "NODE_SPECIAL");
9333 }
9334 else if (((*yyvaluep).node)) {
9335 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9336 }
9337}
9338#line 9339 "parse.c"
9339 break;
9340
9341 case YYSYMBOL_command_args: /* command_args */
9342#line 2617 "parse.y"
9343 {
9344 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9345 rb_parser_printf(p, "NODE_SPECIAL");
9346 }
9347 else if (((*yyvaluep).node)) {
9348 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9349 }
9350}
9351#line 9352 "parse.c"
9352 break;
9353
9354 case YYSYMBOL_block_arg: /* block_arg */
9355#line 2617 "parse.y"
9356 {
9357 if ((NODE *)((*yyvaluep).node_block_pass) == (NODE *)-1) {
9358 rb_parser_printf(p, "NODE_SPECIAL");
9359 }
9360 else if (((*yyvaluep).node_block_pass)) {
9361 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_block_pass)))));
9362 }
9363}
9364#line 9365 "parse.c"
9365 break;
9366
9367 case YYSYMBOL_opt_block_arg: /* opt_block_arg */
9368#line 2617 "parse.y"
9369 {
9370 if ((NODE *)((*yyvaluep).node_block_pass) == (NODE *)-1) {
9371 rb_parser_printf(p, "NODE_SPECIAL");
9372 }
9373 else if (((*yyvaluep).node_block_pass)) {
9374 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_block_pass)))));
9375 }
9376}
9377#line 9378 "parse.c"
9378 break;
9379
9380 case YYSYMBOL_args: /* args */
9381#line 2617 "parse.y"
9382 {
9383 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9384 rb_parser_printf(p, "NODE_SPECIAL");
9385 }
9386 else if (((*yyvaluep).node)) {
9387 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9388 }
9389}
9390#line 9391 "parse.c"
9391 break;
9392
9393 case YYSYMBOL_arg_splat: /* arg_splat */
9394#line 2617 "parse.y"
9395 {
9396 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9397 rb_parser_printf(p, "NODE_SPECIAL");
9398 }
9399 else if (((*yyvaluep).node)) {
9400 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9401 }
9402}
9403#line 9404 "parse.c"
9404 break;
9405
9406 case YYSYMBOL_mrhs_arg: /* mrhs_arg */
9407#line 2617 "parse.y"
9408 {
9409 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9410 rb_parser_printf(p, "NODE_SPECIAL");
9411 }
9412 else if (((*yyvaluep).node)) {
9413 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9414 }
9415}
9416#line 9417 "parse.c"
9417 break;
9418
9419 case YYSYMBOL_mrhs: /* mrhs */
9420#line 2617 "parse.y"
9421 {
9422 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9423 rb_parser_printf(p, "NODE_SPECIAL");
9424 }
9425 else if (((*yyvaluep).node)) {
9426 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9427 }
9428}
9429#line 9430 "parse.c"
9430 break;
9431
9432 case YYSYMBOL_primary: /* primary */
9433#line 2617 "parse.y"
9434 {
9435 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9436 rb_parser_printf(p, "NODE_SPECIAL");
9437 }
9438 else if (((*yyvaluep).node)) {
9439 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9440 }
9441}
9442#line 9443 "parse.c"
9443 break;
9444
9445 case YYSYMBOL_value_expr_primary: /* value_expr_primary */
9446#line 2617 "parse.y"
9447 {
9448 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9449 rb_parser_printf(p, "NODE_SPECIAL");
9450 }
9451 else if (((*yyvaluep).node)) {
9452 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9453 }
9454}
9455#line 9456 "parse.c"
9456 break;
9457
9458 case YYSYMBOL_primary_value: /* primary_value */
9459#line 2617 "parse.y"
9460 {
9461 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9462 rb_parser_printf(p, "NODE_SPECIAL");
9463 }
9464 else if (((*yyvaluep).node)) {
9465 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9466 }
9467}
9468#line 9469 "parse.c"
9469 break;
9470
9471 case YYSYMBOL_k_while: /* k_while */
9472#line 2617 "parse.y"
9473 {
9474 if ((NODE *)((*yyvaluep).node_exits) == (NODE *)-1) {
9475 rb_parser_printf(p, "NODE_SPECIAL");
9476 }
9477 else if (((*yyvaluep).node_exits)) {
9478 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_exits)))));
9479 }
9480}
9481#line 9482 "parse.c"
9482 break;
9483
9484 case YYSYMBOL_k_until: /* k_until */
9485#line 2617 "parse.y"
9486 {
9487 if ((NODE *)((*yyvaluep).node_exits) == (NODE *)-1) {
9488 rb_parser_printf(p, "NODE_SPECIAL");
9489 }
9490 else if (((*yyvaluep).node_exits)) {
9491 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_exits)))));
9492 }
9493}
9494#line 9495 "parse.c"
9495 break;
9496
9497 case YYSYMBOL_k_for: /* k_for */
9498#line 2617 "parse.y"
9499 {
9500 if ((NODE *)((*yyvaluep).node_exits) == (NODE *)-1) {
9501 rb_parser_printf(p, "NODE_SPECIAL");
9502 }
9503 else if (((*yyvaluep).node_exits)) {
9504 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_exits)))));
9505 }
9506}
9507#line 9508 "parse.c"
9508 break;
9509
9510 case YYSYMBOL_k_def: /* k_def */
9511#line 2617 "parse.y"
9512 {
9513 if ((NODE *)((*yyvaluep).node_def_temp) == (NODE *)-1) {
9514 rb_parser_printf(p, "NODE_SPECIAL");
9515 }
9516 else if (((*yyvaluep).node_def_temp)) {
9517 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_def_temp)))));
9518 }
9519}
9520#line 9521 "parse.c"
9521 break;
9522
9523 case YYSYMBOL_do: /* do */
9524#line 2626 "parse.y"
9525 {
9526 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
9527}
9528#line 9529 "parse.c"
9529 break;
9530
9531 case YYSYMBOL_if_tail: /* if_tail */
9532#line 2617 "parse.y"
9533 {
9534 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9535 rb_parser_printf(p, "NODE_SPECIAL");
9536 }
9537 else if (((*yyvaluep).node)) {
9538 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9539 }
9540}
9541#line 9542 "parse.c"
9542 break;
9543
9544 case YYSYMBOL_opt_else: /* opt_else */
9545#line 2617 "parse.y"
9546 {
9547 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9548 rb_parser_printf(p, "NODE_SPECIAL");
9549 }
9550 else if (((*yyvaluep).node)) {
9551 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9552 }
9553}
9554#line 9555 "parse.c"
9555 break;
9556
9557 case YYSYMBOL_for_var: /* for_var */
9558#line 2617 "parse.y"
9559 {
9560 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9561 rb_parser_printf(p, "NODE_SPECIAL");
9562 }
9563 else if (((*yyvaluep).node)) {
9564 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9565 }
9566}
9567#line 9568 "parse.c"
9568 break;
9569
9570 case YYSYMBOL_f_marg: /* f_marg */
9571#line 2617 "parse.y"
9572 {
9573 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9574 rb_parser_printf(p, "NODE_SPECIAL");
9575 }
9576 else if (((*yyvaluep).node)) {
9577 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9578 }
9579}
9580#line 9581 "parse.c"
9581 break;
9582
9583 case YYSYMBOL_mlhs_items_f_marg: /* mlhs_items_f_marg */
9584#line 2617 "parse.y"
9585 {
9586 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9587 rb_parser_printf(p, "NODE_SPECIAL");
9588 }
9589 else if (((*yyvaluep).node)) {
9590 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9591 }
9592}
9593#line 9594 "parse.c"
9594 break;
9595
9596 case YYSYMBOL_f_margs: /* f_margs */
9597#line 2617 "parse.y"
9598 {
9599 if ((NODE *)((*yyvaluep).node_masgn) == (NODE *)-1) {
9600 rb_parser_printf(p, "NODE_SPECIAL");
9601 }
9602 else if (((*yyvaluep).node_masgn)) {
9603 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_masgn)))));
9604 }
9605}
9606#line 9607 "parse.c"
9607 break;
9608
9609 case YYSYMBOL_f_rest_marg: /* f_rest_marg */
9610#line 2617 "parse.y"
9611 {
9612 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9613 rb_parser_printf(p, "NODE_SPECIAL");
9614 }
9615 else if (((*yyvaluep).node)) {
9616 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9617 }
9618}
9619#line 9620 "parse.c"
9620 break;
9621
9622 case YYSYMBOL_f_any_kwrest: /* f_any_kwrest */
9623#line 2626 "parse.y"
9624 {
9625 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
9626}
9627#line 9628 "parse.c"
9628 break;
9629
9630 case YYSYMBOL_f_kw_primary_value: /* f_kw_primary_value */
9631#line 2617 "parse.y"
9632 {
9633 if ((NODE *)((*yyvaluep).node_kw_arg) == (NODE *)-1) {
9634 rb_parser_printf(p, "NODE_SPECIAL");
9635 }
9636 else if (((*yyvaluep).node_kw_arg)) {
9637 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_kw_arg)))));
9638 }
9639}
9640#line 9641 "parse.c"
9641 break;
9642
9643 case YYSYMBOL_f_kwarg_primary_value: /* f_kwarg_primary_value */
9644#line 2617 "parse.y"
9645 {
9646 if ((NODE *)((*yyvaluep).node_kw_arg) == (NODE *)-1) {
9647 rb_parser_printf(p, "NODE_SPECIAL");
9648 }
9649 else if (((*yyvaluep).node_kw_arg)) {
9650 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_kw_arg)))));
9651 }
9652}
9653#line 9654 "parse.c"
9654 break;
9655
9656 case YYSYMBOL_args_tail_basic_primary_value: /* args_tail_basic_primary_value */
9657#line 2617 "parse.y"
9658 {
9659 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
9660 rb_parser_printf(p, "NODE_SPECIAL");
9661 }
9662 else if (((*yyvaluep).node_args)) {
9663 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
9664 }
9665}
9666#line 9667 "parse.c"
9667 break;
9668
9669 case YYSYMBOL_block_args_tail: /* block_args_tail */
9670#line 2617 "parse.y"
9671 {
9672 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
9673 rb_parser_printf(p, "NODE_SPECIAL");
9674 }
9675 else if (((*yyvaluep).node_args)) {
9676 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
9677 }
9678}
9679#line 9680 "parse.c"
9680 break;
9681
9682 case YYSYMBOL_excessed_comma: /* excessed_comma */
9683#line 2626 "parse.y"
9684 {
9685 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
9686}
9687#line 9688 "parse.c"
9688 break;
9689
9690 case YYSYMBOL_f_opt_primary_value: /* f_opt_primary_value */
9691#line 2617 "parse.y"
9692 {
9693 if ((NODE *)((*yyvaluep).node_opt_arg) == (NODE *)-1) {
9694 rb_parser_printf(p, "NODE_SPECIAL");
9695 }
9696 else if (((*yyvaluep).node_opt_arg)) {
9697 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_opt_arg)))));
9698 }
9699}
9700#line 9701 "parse.c"
9701 break;
9702
9703 case YYSYMBOL_f_opt_arg_primary_value: /* f_opt_arg_primary_value */
9704#line 2617 "parse.y"
9705 {
9706 if ((NODE *)((*yyvaluep).node_opt_arg) == (NODE *)-1) {
9707 rb_parser_printf(p, "NODE_SPECIAL");
9708 }
9709 else if (((*yyvaluep).node_opt_arg)) {
9710 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_opt_arg)))));
9711 }
9712}
9713#line 9714 "parse.c"
9714 break;
9715
9716 case YYSYMBOL_opt_args_tail_block_args_tail: /* opt_args_tail_block_args_tail */
9717#line 2617 "parse.y"
9718 {
9719 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
9720 rb_parser_printf(p, "NODE_SPECIAL");
9721 }
9722 else if (((*yyvaluep).node_args)) {
9723 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
9724 }
9725}
9726#line 9727 "parse.c"
9727 break;
9728
9729 case YYSYMBOL_block_param: /* block_param */
9730#line 2617 "parse.y"
9731 {
9732 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
9733 rb_parser_printf(p, "NODE_SPECIAL");
9734 }
9735 else if (((*yyvaluep).node_args)) {
9736 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
9737 }
9738}
9739#line 9740 "parse.c"
9740 break;
9741
9742 case YYSYMBOL_opt_block_param_def: /* opt_block_param_def */
9743#line 2617 "parse.y"
9744 {
9745 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
9746 rb_parser_printf(p, "NODE_SPECIAL");
9747 }
9748 else if (((*yyvaluep).node_args)) {
9749 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
9750 }
9751}
9752#line 9753 "parse.c"
9753 break;
9754
9755 case YYSYMBOL_block_param_def: /* block_param_def */
9756#line 2617 "parse.y"
9757 {
9758 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
9759 rb_parser_printf(p, "NODE_SPECIAL");
9760 }
9761 else if (((*yyvaluep).node_args)) {
9762 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
9763 }
9764}
9765#line 9766 "parse.c"
9766 break;
9767
9768 case YYSYMBOL_opt_block_param: /* opt_block_param */
9769#line 2617 "parse.y"
9770 {
9771 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
9772 rb_parser_printf(p, "NODE_SPECIAL");
9773 }
9774 else if (((*yyvaluep).node_args)) {
9775 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
9776 }
9777}
9778#line 9779 "parse.c"
9779 break;
9780
9781 case YYSYMBOL_opt_bv_decl: /* opt_bv_decl */
9782#line 2626 "parse.y"
9783 {
9784 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
9785}
9786#line 9787 "parse.c"
9787 break;
9788
9789 case YYSYMBOL_bv_decls: /* bv_decls */
9790#line 2626 "parse.y"
9791 {
9792 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
9793}
9794#line 9795 "parse.c"
9795 break;
9796
9797 case YYSYMBOL_bvar: /* bvar */
9798#line 2626 "parse.y"
9799 {
9800 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
9801}
9802#line 9803 "parse.c"
9803 break;
9804
9805 case YYSYMBOL_numparam: /* numparam */
9806#line 2617 "parse.y"
9807 {
9808 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9809 rb_parser_printf(p, "NODE_SPECIAL");
9810 }
9811 else if (((*yyvaluep).node)) {
9812 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9813 }
9814}
9815#line 9816 "parse.c"
9816 break;
9817
9818 case YYSYMBOL_it_id: /* it_id */
9819#line 2626 "parse.y"
9820 {
9821 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
9822}
9823#line 9824 "parse.c"
9824 break;
9825
9826 case YYSYMBOL_lambda: /* lambda */
9827#line 2617 "parse.y"
9828 {
9829 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9830 rb_parser_printf(p, "NODE_SPECIAL");
9831 }
9832 else if (((*yyvaluep).node)) {
9833 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9834 }
9835}
9836#line 9837 "parse.c"
9837 break;
9838
9839 case YYSYMBOL_f_larglist: /* f_larglist */
9840#line 2617 "parse.y"
9841 {
9842 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
9843 rb_parser_printf(p, "NODE_SPECIAL");
9844 }
9845 else if (((*yyvaluep).node_args)) {
9846 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
9847 }
9848}
9849#line 9850 "parse.c"
9850 break;
9851
9852 case YYSYMBOL_do_block: /* do_block */
9853#line 2617 "parse.y"
9854 {
9855 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9856 rb_parser_printf(p, "NODE_SPECIAL");
9857 }
9858 else if (((*yyvaluep).node)) {
9859 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9860 }
9861}
9862#line 9863 "parse.c"
9863 break;
9864
9865 case YYSYMBOL_block_call: /* block_call */
9866#line 2617 "parse.y"
9867 {
9868 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9869 rb_parser_printf(p, "NODE_SPECIAL");
9870 }
9871 else if (((*yyvaluep).node)) {
9872 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9873 }
9874}
9875#line 9876 "parse.c"
9876 break;
9877
9878 case YYSYMBOL_method_call: /* method_call */
9879#line 2617 "parse.y"
9880 {
9881 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9882 rb_parser_printf(p, "NODE_SPECIAL");
9883 }
9884 else if (((*yyvaluep).node)) {
9885 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9886 }
9887}
9888#line 9889 "parse.c"
9889 break;
9890
9891 case YYSYMBOL_brace_block: /* brace_block */
9892#line 2617 "parse.y"
9893 {
9894 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9895 rb_parser_printf(p, "NODE_SPECIAL");
9896 }
9897 else if (((*yyvaluep).node)) {
9898 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9899 }
9900}
9901#line 9902 "parse.c"
9902 break;
9903
9904 case YYSYMBOL_brace_body: /* brace_body */
9905#line 2617 "parse.y"
9906 {
9907 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9908 rb_parser_printf(p, "NODE_SPECIAL");
9909 }
9910 else if (((*yyvaluep).node)) {
9911 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9912 }
9913}
9914#line 9915 "parse.c"
9915 break;
9916
9917 case YYSYMBOL_do_body: /* do_body */
9918#line 2617 "parse.y"
9919 {
9920 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9921 rb_parser_printf(p, "NODE_SPECIAL");
9922 }
9923 else if (((*yyvaluep).node)) {
9924 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9925 }
9926}
9927#line 9928 "parse.c"
9928 break;
9929
9930 case YYSYMBOL_case_args: /* case_args */
9931#line 2617 "parse.y"
9932 {
9933 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9934 rb_parser_printf(p, "NODE_SPECIAL");
9935 }
9936 else if (((*yyvaluep).node)) {
9937 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9938 }
9939}
9940#line 9941 "parse.c"
9941 break;
9942
9943 case YYSYMBOL_case_body: /* case_body */
9944#line 2617 "parse.y"
9945 {
9946 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9947 rb_parser_printf(p, "NODE_SPECIAL");
9948 }
9949 else if (((*yyvaluep).node)) {
9950 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9951 }
9952}
9953#line 9954 "parse.c"
9954 break;
9955
9956 case YYSYMBOL_cases: /* cases */
9957#line 2617 "parse.y"
9958 {
9959 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9960 rb_parser_printf(p, "NODE_SPECIAL");
9961 }
9962 else if (((*yyvaluep).node)) {
9963 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9964 }
9965}
9966#line 9967 "parse.c"
9967 break;
9968
9969 case YYSYMBOL_p_case_body: /* p_case_body */
9970#line 2617 "parse.y"
9971 {
9972 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9973 rb_parser_printf(p, "NODE_SPECIAL");
9974 }
9975 else if (((*yyvaluep).node)) {
9976 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9977 }
9978}
9979#line 9980 "parse.c"
9980 break;
9981
9982 case YYSYMBOL_p_cases: /* p_cases */
9983#line 2617 "parse.y"
9984 {
9985 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9986 rb_parser_printf(p, "NODE_SPECIAL");
9987 }
9988 else if (((*yyvaluep).node)) {
9989 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9990 }
9991}
9992#line 9993 "parse.c"
9993 break;
9994
9995 case YYSYMBOL_p_top_expr: /* p_top_expr */
9996#line 2617 "parse.y"
9997 {
9998 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9999 rb_parser_printf(p, "NODE_SPECIAL");
10000 }
10001 else if (((*yyvaluep).node)) {
10002 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10003 }
10004}
10005#line 10006 "parse.c"
10006 break;
10007
10008 case YYSYMBOL_p_top_expr_body: /* p_top_expr_body */
10009#line 2617 "parse.y"
10010 {
10011 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10012 rb_parser_printf(p, "NODE_SPECIAL");
10013 }
10014 else if (((*yyvaluep).node)) {
10015 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10016 }
10017}
10018#line 10019 "parse.c"
10019 break;
10020
10021 case YYSYMBOL_p_expr: /* p_expr */
10022#line 2617 "parse.y"
10023 {
10024 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10025 rb_parser_printf(p, "NODE_SPECIAL");
10026 }
10027 else if (((*yyvaluep).node)) {
10028 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10029 }
10030}
10031#line 10032 "parse.c"
10032 break;
10033
10034 case YYSYMBOL_p_as: /* p_as */
10035#line 2617 "parse.y"
10036 {
10037 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10038 rb_parser_printf(p, "NODE_SPECIAL");
10039 }
10040 else if (((*yyvaluep).node)) {
10041 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10042 }
10043}
10044#line 10045 "parse.c"
10045 break;
10046
10047 case YYSYMBOL_p_alt: /* p_alt */
10048#line 2617 "parse.y"
10049 {
10050 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10051 rb_parser_printf(p, "NODE_SPECIAL");
10052 }
10053 else if (((*yyvaluep).node)) {
10054 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10055 }
10056}
10057#line 10058 "parse.c"
10058 break;
10059
10060 case YYSYMBOL_p_expr_basic: /* p_expr_basic */
10061#line 2617 "parse.y"
10062 {
10063 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10064 rb_parser_printf(p, "NODE_SPECIAL");
10065 }
10066 else if (((*yyvaluep).node)) {
10067 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10068 }
10069}
10070#line 10071 "parse.c"
10071 break;
10072
10073 case YYSYMBOL_p_args: /* p_args */
10074#line 2617 "parse.y"
10075 {
10076 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10077 rb_parser_printf(p, "NODE_SPECIAL");
10078 }
10079 else if (((*yyvaluep).node)) {
10080 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10081 }
10082}
10083#line 10084 "parse.c"
10084 break;
10085
10086 case YYSYMBOL_p_args_head: /* p_args_head */
10087#line 2617 "parse.y"
10088 {
10089 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10090 rb_parser_printf(p, "NODE_SPECIAL");
10091 }
10092 else if (((*yyvaluep).node)) {
10093 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10094 }
10095}
10096#line 10097 "parse.c"
10097 break;
10098
10099 case YYSYMBOL_p_args_tail: /* p_args_tail */
10100#line 2617 "parse.y"
10101 {
10102 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10103 rb_parser_printf(p, "NODE_SPECIAL");
10104 }
10105 else if (((*yyvaluep).node)) {
10106 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10107 }
10108}
10109#line 10110 "parse.c"
10110 break;
10111
10112 case YYSYMBOL_p_find: /* p_find */
10113#line 2617 "parse.y"
10114 {
10115 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10116 rb_parser_printf(p, "NODE_SPECIAL");
10117 }
10118 else if (((*yyvaluep).node)) {
10119 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10120 }
10121}
10122#line 10123 "parse.c"
10123 break;
10124
10125 case YYSYMBOL_p_rest: /* p_rest */
10126#line 2617 "parse.y"
10127 {
10128 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10129 rb_parser_printf(p, "NODE_SPECIAL");
10130 }
10131 else if (((*yyvaluep).node)) {
10132 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10133 }
10134}
10135#line 10136 "parse.c"
10136 break;
10137
10138 case YYSYMBOL_p_args_post: /* p_args_post */
10139#line 2617 "parse.y"
10140 {
10141 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10142 rb_parser_printf(p, "NODE_SPECIAL");
10143 }
10144 else if (((*yyvaluep).node)) {
10145 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10146 }
10147}
10148#line 10149 "parse.c"
10149 break;
10150
10151 case YYSYMBOL_p_arg: /* p_arg */
10152#line 2617 "parse.y"
10153 {
10154 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10155 rb_parser_printf(p, "NODE_SPECIAL");
10156 }
10157 else if (((*yyvaluep).node)) {
10158 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10159 }
10160}
10161#line 10162 "parse.c"
10162 break;
10163
10164 case YYSYMBOL_p_kwargs: /* p_kwargs */
10165#line 2617 "parse.y"
10166 {
10167 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10168 rb_parser_printf(p, "NODE_SPECIAL");
10169 }
10170 else if (((*yyvaluep).node)) {
10171 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10172 }
10173}
10174#line 10175 "parse.c"
10175 break;
10176
10177 case YYSYMBOL_p_kwarg: /* p_kwarg */
10178#line 2617 "parse.y"
10179 {
10180 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10181 rb_parser_printf(p, "NODE_SPECIAL");
10182 }
10183 else if (((*yyvaluep).node)) {
10184 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10185 }
10186}
10187#line 10188 "parse.c"
10188 break;
10189
10190 case YYSYMBOL_p_kw: /* p_kw */
10191#line 2617 "parse.y"
10192 {
10193 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10194 rb_parser_printf(p, "NODE_SPECIAL");
10195 }
10196 else if (((*yyvaluep).node)) {
10197 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10198 }
10199}
10200#line 10201 "parse.c"
10201 break;
10202
10203 case YYSYMBOL_p_kw_label: /* p_kw_label */
10204#line 2626 "parse.y"
10205 {
10206 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
10207}
10208#line 10209 "parse.c"
10209 break;
10210
10211 case YYSYMBOL_p_kwrest: /* p_kwrest */
10212#line 2626 "parse.y"
10213 {
10214 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
10215}
10216#line 10217 "parse.c"
10217 break;
10218
10219 case YYSYMBOL_p_kwnorest: /* p_kwnorest */
10220#line 2626 "parse.y"
10221 {
10222 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
10223}
10224#line 10225 "parse.c"
10225 break;
10226
10227 case YYSYMBOL_p_any_kwrest: /* p_any_kwrest */
10228#line 2626 "parse.y"
10229 {
10230 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
10231}
10232#line 10233 "parse.c"
10233 break;
10234
10235 case YYSYMBOL_p_value: /* p_value */
10236#line 2617 "parse.y"
10237 {
10238 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10239 rb_parser_printf(p, "NODE_SPECIAL");
10240 }
10241 else if (((*yyvaluep).node)) {
10242 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10243 }
10244}
10245#line 10246 "parse.c"
10246 break;
10247
10248 case YYSYMBOL_range_expr_p_primitive: /* range_expr_p_primitive */
10249#line 2617 "parse.y"
10250 {
10251 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10252 rb_parser_printf(p, "NODE_SPECIAL");
10253 }
10254 else if (((*yyvaluep).node)) {
10255 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10256 }
10257}
10258#line 10259 "parse.c"
10259 break;
10260
10261 case YYSYMBOL_p_primitive: /* p_primitive */
10262#line 2617 "parse.y"
10263 {
10264 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10265 rb_parser_printf(p, "NODE_SPECIAL");
10266 }
10267 else if (((*yyvaluep).node)) {
10268 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10269 }
10270}
10271#line 10272 "parse.c"
10272 break;
10273
10274 case YYSYMBOL_p_variable: /* p_variable */
10275#line 2617 "parse.y"
10276 {
10277 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10278 rb_parser_printf(p, "NODE_SPECIAL");
10279 }
10280 else if (((*yyvaluep).node)) {
10281 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10282 }
10283}
10284#line 10285 "parse.c"
10285 break;
10286
10287 case YYSYMBOL_p_var_ref: /* p_var_ref */
10288#line 2617 "parse.y"
10289 {
10290 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10291 rb_parser_printf(p, "NODE_SPECIAL");
10292 }
10293 else if (((*yyvaluep).node)) {
10294 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10295 }
10296}
10297#line 10298 "parse.c"
10298 break;
10299
10300 case YYSYMBOL_p_expr_ref: /* p_expr_ref */
10301#line 2617 "parse.y"
10302 {
10303 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10304 rb_parser_printf(p, "NODE_SPECIAL");
10305 }
10306 else if (((*yyvaluep).node)) {
10307 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10308 }
10309}
10310#line 10311 "parse.c"
10311 break;
10312
10313 case YYSYMBOL_p_const: /* p_const */
10314#line 2617 "parse.y"
10315 {
10316 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10317 rb_parser_printf(p, "NODE_SPECIAL");
10318 }
10319 else if (((*yyvaluep).node)) {
10320 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10321 }
10322}
10323#line 10324 "parse.c"
10324 break;
10325
10326 case YYSYMBOL_opt_rescue: /* opt_rescue */
10327#line 2617 "parse.y"
10328 {
10329 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10330 rb_parser_printf(p, "NODE_SPECIAL");
10331 }
10332 else if (((*yyvaluep).node)) {
10333 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10334 }
10335}
10336#line 10337 "parse.c"
10337 break;
10338
10339 case YYSYMBOL_exc_list: /* exc_list */
10340#line 2617 "parse.y"
10341 {
10342 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10343 rb_parser_printf(p, "NODE_SPECIAL");
10344 }
10345 else if (((*yyvaluep).node)) {
10346 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10347 }
10348}
10349#line 10350 "parse.c"
10350 break;
10351
10352 case YYSYMBOL_exc_var: /* exc_var */
10353#line 2617 "parse.y"
10354 {
10355 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10356 rb_parser_printf(p, "NODE_SPECIAL");
10357 }
10358 else if (((*yyvaluep).node)) {
10359 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10360 }
10361}
10362#line 10363 "parse.c"
10363 break;
10364
10365 case YYSYMBOL_opt_ensure: /* opt_ensure */
10366#line 2617 "parse.y"
10367 {
10368 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10369 rb_parser_printf(p, "NODE_SPECIAL");
10370 }
10371 else if (((*yyvaluep).node)) {
10372 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10373 }
10374}
10375#line 10376 "parse.c"
10376 break;
10377
10378 case YYSYMBOL_literal: /* literal */
10379#line 2617 "parse.y"
10380 {
10381 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10382 rb_parser_printf(p, "NODE_SPECIAL");
10383 }
10384 else if (((*yyvaluep).node)) {
10385 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10386 }
10387}
10388#line 10389 "parse.c"
10389 break;
10390
10391 case YYSYMBOL_strings: /* strings */
10392#line 2617 "parse.y"
10393 {
10394 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10395 rb_parser_printf(p, "NODE_SPECIAL");
10396 }
10397 else if (((*yyvaluep).node)) {
10398 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10399 }
10400}
10401#line 10402 "parse.c"
10402 break;
10403
10404 case YYSYMBOL_string: /* string */
10405#line 2617 "parse.y"
10406 {
10407 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10408 rb_parser_printf(p, "NODE_SPECIAL");
10409 }
10410 else if (((*yyvaluep).node)) {
10411 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10412 }
10413}
10414#line 10415 "parse.c"
10415 break;
10416
10417 case YYSYMBOL_string1: /* string1 */
10418#line 2617 "parse.y"
10419 {
10420 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10421 rb_parser_printf(p, "NODE_SPECIAL");
10422 }
10423 else if (((*yyvaluep).node)) {
10424 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10425 }
10426}
10427#line 10428 "parse.c"
10428 break;
10429
10430 case YYSYMBOL_xstring: /* xstring */
10431#line 2617 "parse.y"
10432 {
10433 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10434 rb_parser_printf(p, "NODE_SPECIAL");
10435 }
10436 else if (((*yyvaluep).node)) {
10437 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10438 }
10439}
10440#line 10441 "parse.c"
10441 break;
10442
10443 case YYSYMBOL_regexp: /* regexp */
10444#line 2617 "parse.y"
10445 {
10446 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10447 rb_parser_printf(p, "NODE_SPECIAL");
10448 }
10449 else if (((*yyvaluep).node)) {
10450 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10451 }
10452}
10453#line 10454 "parse.c"
10454 break;
10455
10456 case YYSYMBOL_words_tWORDS_BEG_word_list: /* words_tWORDS_BEG_word_list */
10457#line 2617 "parse.y"
10458 {
10459 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10460 rb_parser_printf(p, "NODE_SPECIAL");
10461 }
10462 else if (((*yyvaluep).node)) {
10463 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10464 }
10465}
10466#line 10467 "parse.c"
10467 break;
10468
10469 case YYSYMBOL_words: /* words */
10470#line 2617 "parse.y"
10471 {
10472 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10473 rb_parser_printf(p, "NODE_SPECIAL");
10474 }
10475 else if (((*yyvaluep).node)) {
10476 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10477 }
10478}
10479#line 10480 "parse.c"
10480 break;
10481
10482 case YYSYMBOL_word_list: /* word_list */
10483#line 2617 "parse.y"
10484 {
10485 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10486 rb_parser_printf(p, "NODE_SPECIAL");
10487 }
10488 else if (((*yyvaluep).node)) {
10489 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10490 }
10491}
10492#line 10493 "parse.c"
10493 break;
10494
10495 case YYSYMBOL_word: /* word */
10496#line 2617 "parse.y"
10497 {
10498 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10499 rb_parser_printf(p, "NODE_SPECIAL");
10500 }
10501 else if (((*yyvaluep).node)) {
10502 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10503 }
10504}
10505#line 10506 "parse.c"
10506 break;
10507
10508 case YYSYMBOL_words_tSYMBOLS_BEG_symbol_list: /* words_tSYMBOLS_BEG_symbol_list */
10509#line 2617 "parse.y"
10510 {
10511 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10512 rb_parser_printf(p, "NODE_SPECIAL");
10513 }
10514 else if (((*yyvaluep).node)) {
10515 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10516 }
10517}
10518#line 10519 "parse.c"
10519 break;
10520
10521 case YYSYMBOL_symbols: /* symbols */
10522#line 2617 "parse.y"
10523 {
10524 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10525 rb_parser_printf(p, "NODE_SPECIAL");
10526 }
10527 else if (((*yyvaluep).node)) {
10528 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10529 }
10530}
10531#line 10532 "parse.c"
10532 break;
10533
10534 case YYSYMBOL_symbol_list: /* symbol_list */
10535#line 2617 "parse.y"
10536 {
10537 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10538 rb_parser_printf(p, "NODE_SPECIAL");
10539 }
10540 else if (((*yyvaluep).node)) {
10541 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10542 }
10543}
10544#line 10545 "parse.c"
10545 break;
10546
10547 case YYSYMBOL_words_tQWORDS_BEG_qword_list: /* words_tQWORDS_BEG_qword_list */
10548#line 2617 "parse.y"
10549 {
10550 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10551 rb_parser_printf(p, "NODE_SPECIAL");
10552 }
10553 else if (((*yyvaluep).node)) {
10554 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10555 }
10556}
10557#line 10558 "parse.c"
10558 break;
10559
10560 case YYSYMBOL_qwords: /* qwords */
10561#line 2617 "parse.y"
10562 {
10563 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10564 rb_parser_printf(p, "NODE_SPECIAL");
10565 }
10566 else if (((*yyvaluep).node)) {
10567 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10568 }
10569}
10570#line 10571 "parse.c"
10571 break;
10572
10573 case YYSYMBOL_words_tQSYMBOLS_BEG_qsym_list: /* words_tQSYMBOLS_BEG_qsym_list */
10574#line 2617 "parse.y"
10575 {
10576 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10577 rb_parser_printf(p, "NODE_SPECIAL");
10578 }
10579 else if (((*yyvaluep).node)) {
10580 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10581 }
10582}
10583#line 10584 "parse.c"
10584 break;
10585
10586 case YYSYMBOL_qsymbols: /* qsymbols */
10587#line 2617 "parse.y"
10588 {
10589 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10590 rb_parser_printf(p, "NODE_SPECIAL");
10591 }
10592 else if (((*yyvaluep).node)) {
10593 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10594 }
10595}
10596#line 10597 "parse.c"
10597 break;
10598
10599 case YYSYMBOL_qword_list: /* qword_list */
10600#line 2617 "parse.y"
10601 {
10602 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10603 rb_parser_printf(p, "NODE_SPECIAL");
10604 }
10605 else if (((*yyvaluep).node)) {
10606 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10607 }
10608}
10609#line 10610 "parse.c"
10610 break;
10611
10612 case YYSYMBOL_qsym_list: /* qsym_list */
10613#line 2617 "parse.y"
10614 {
10615 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10616 rb_parser_printf(p, "NODE_SPECIAL");
10617 }
10618 else if (((*yyvaluep).node)) {
10619 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10620 }
10621}
10622#line 10623 "parse.c"
10623 break;
10624
10625 case YYSYMBOL_string_contents: /* string_contents */
10626#line 2617 "parse.y"
10627 {
10628 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10629 rb_parser_printf(p, "NODE_SPECIAL");
10630 }
10631 else if (((*yyvaluep).node)) {
10632 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10633 }
10634}
10635#line 10636 "parse.c"
10636 break;
10637
10638 case YYSYMBOL_xstring_contents: /* xstring_contents */
10639#line 2617 "parse.y"
10640 {
10641 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10642 rb_parser_printf(p, "NODE_SPECIAL");
10643 }
10644 else if (((*yyvaluep).node)) {
10645 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10646 }
10647}
10648#line 10649 "parse.c"
10649 break;
10650
10651 case YYSYMBOL_regexp_contents: /* regexp_contents */
10652#line 2617 "parse.y"
10653 {
10654 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10655 rb_parser_printf(p, "NODE_SPECIAL");
10656 }
10657 else if (((*yyvaluep).node)) {
10658 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10659 }
10660}
10661#line 10662 "parse.c"
10662 break;
10663
10664 case YYSYMBOL_string_content: /* string_content */
10665#line 2617 "parse.y"
10666 {
10667 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10668 rb_parser_printf(p, "NODE_SPECIAL");
10669 }
10670 else if (((*yyvaluep).node)) {
10671 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10672 }
10673}
10674#line 10675 "parse.c"
10675 break;
10676
10677 case YYSYMBOL_string_dvar: /* string_dvar */
10678#line 2617 "parse.y"
10679 {
10680 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10681 rb_parser_printf(p, "NODE_SPECIAL");
10682 }
10683 else if (((*yyvaluep).node)) {
10684 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10685 }
10686}
10687#line 10688 "parse.c"
10688 break;
10689
10690 case YYSYMBOL_symbol: /* symbol */
10691#line 2617 "parse.y"
10692 {
10693 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10694 rb_parser_printf(p, "NODE_SPECIAL");
10695 }
10696 else if (((*yyvaluep).node)) {
10697 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10698 }
10699}
10700#line 10701 "parse.c"
10701 break;
10702
10703 case YYSYMBOL_ssym: /* ssym */
10704#line 2617 "parse.y"
10705 {
10706 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10707 rb_parser_printf(p, "NODE_SPECIAL");
10708 }
10709 else if (((*yyvaluep).node)) {
10710 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10711 }
10712}
10713#line 10714 "parse.c"
10714 break;
10715
10716 case YYSYMBOL_sym: /* sym */
10717#line 2626 "parse.y"
10718 {
10719 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
10720}
10721#line 10722 "parse.c"
10722 break;
10723
10724 case YYSYMBOL_dsym: /* dsym */
10725#line 2617 "parse.y"
10726 {
10727 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10728 rb_parser_printf(p, "NODE_SPECIAL");
10729 }
10730 else if (((*yyvaluep).node)) {
10731 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10732 }
10733}
10734#line 10735 "parse.c"
10735 break;
10736
10737 case YYSYMBOL_numeric: /* numeric */
10738#line 2617 "parse.y"
10739 {
10740 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10741 rb_parser_printf(p, "NODE_SPECIAL");
10742 }
10743 else if (((*yyvaluep).node)) {
10744 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10745 }
10746}
10747#line 10748 "parse.c"
10748 break;
10749
10750 case YYSYMBOL_simple_numeric: /* simple_numeric */
10751#line 2617 "parse.y"
10752 {
10753 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10754 rb_parser_printf(p, "NODE_SPECIAL");
10755 }
10756 else if (((*yyvaluep).node)) {
10757 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10758 }
10759}
10760#line 10761 "parse.c"
10761 break;
10762
10763 case YYSYMBOL_nonlocal_var: /* nonlocal_var */
10764#line 2626 "parse.y"
10765 {
10766 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
10767}
10768#line 10769 "parse.c"
10769 break;
10770
10771 case YYSYMBOL_user_variable: /* user_variable */
10772#line 2626 "parse.y"
10773 {
10774 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
10775}
10776#line 10777 "parse.c"
10777 break;
10778
10779 case YYSYMBOL_keyword_variable: /* keyword_variable */
10780#line 2626 "parse.y"
10781 {
10782 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
10783}
10784#line 10785 "parse.c"
10785 break;
10786
10787 case YYSYMBOL_var_ref: /* var_ref */
10788#line 2617 "parse.y"
10789 {
10790 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10791 rb_parser_printf(p, "NODE_SPECIAL");
10792 }
10793 else if (((*yyvaluep).node)) {
10794 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10795 }
10796}
10797#line 10798 "parse.c"
10798 break;
10799
10800 case YYSYMBOL_var_lhs: /* var_lhs */
10801#line 2617 "parse.y"
10802 {
10803 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10804 rb_parser_printf(p, "NODE_SPECIAL");
10805 }
10806 else if (((*yyvaluep).node)) {
10807 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10808 }
10809}
10810#line 10811 "parse.c"
10811 break;
10812
10813 case YYSYMBOL_backref: /* backref */
10814#line 2617 "parse.y"
10815 {
10816 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10817 rb_parser_printf(p, "NODE_SPECIAL");
10818 }
10819 else if (((*yyvaluep).node)) {
10820 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10821 }
10822}
10823#line 10824 "parse.c"
10824 break;
10825
10826 case YYSYMBOL_superclass: /* superclass */
10827#line 2617 "parse.y"
10828 {
10829 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10830 rb_parser_printf(p, "NODE_SPECIAL");
10831 }
10832 else if (((*yyvaluep).node)) {
10833 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10834 }
10835}
10836#line 10837 "parse.c"
10837 break;
10838
10839 case YYSYMBOL_f_opt_paren_args: /* f_opt_paren_args */
10840#line 2617 "parse.y"
10841 {
10842 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
10843 rb_parser_printf(p, "NODE_SPECIAL");
10844 }
10845 else if (((*yyvaluep).node_args)) {
10846 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
10847 }
10848}
10849#line 10850 "parse.c"
10850 break;
10851
10852 case YYSYMBOL_f_paren_args: /* f_paren_args */
10853#line 2617 "parse.y"
10854 {
10855 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
10856 rb_parser_printf(p, "NODE_SPECIAL");
10857 }
10858 else if (((*yyvaluep).node_args)) {
10859 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
10860 }
10861}
10862#line 10863 "parse.c"
10863 break;
10864
10865 case YYSYMBOL_f_arglist: /* f_arglist */
10866#line 2617 "parse.y"
10867 {
10868 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
10869 rb_parser_printf(p, "NODE_SPECIAL");
10870 }
10871 else if (((*yyvaluep).node_args)) {
10872 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
10873 }
10874}
10875#line 10876 "parse.c"
10876 break;
10877
10878 case YYSYMBOL_f_kw_arg_value: /* f_kw_arg_value */
10879#line 2617 "parse.y"
10880 {
10881 if ((NODE *)((*yyvaluep).node_kw_arg) == (NODE *)-1) {
10882 rb_parser_printf(p, "NODE_SPECIAL");
10883 }
10884 else if (((*yyvaluep).node_kw_arg)) {
10885 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_kw_arg)))));
10886 }
10887}
10888#line 10889 "parse.c"
10889 break;
10890
10891 case YYSYMBOL_f_kwarg_arg_value: /* f_kwarg_arg_value */
10892#line 2617 "parse.y"
10893 {
10894 if ((NODE *)((*yyvaluep).node_kw_arg) == (NODE *)-1) {
10895 rb_parser_printf(p, "NODE_SPECIAL");
10896 }
10897 else if (((*yyvaluep).node_kw_arg)) {
10898 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_kw_arg)))));
10899 }
10900}
10901#line 10902 "parse.c"
10902 break;
10903
10904 case YYSYMBOL_args_tail_basic_arg_value: /* args_tail_basic_arg_value */
10905#line 2617 "parse.y"
10906 {
10907 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
10908 rb_parser_printf(p, "NODE_SPECIAL");
10909 }
10910 else if (((*yyvaluep).node_args)) {
10911 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
10912 }
10913}
10914#line 10915 "parse.c"
10915 break;
10916
10917 case YYSYMBOL_args_tail: /* args_tail */
10918#line 2617 "parse.y"
10919 {
10920 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
10921 rb_parser_printf(p, "NODE_SPECIAL");
10922 }
10923 else if (((*yyvaluep).node_args)) {
10924 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
10925 }
10926}
10927#line 10928 "parse.c"
10928 break;
10929
10930 case YYSYMBOL_f_opt_arg_value: /* f_opt_arg_value */
10931#line 2617 "parse.y"
10932 {
10933 if ((NODE *)((*yyvaluep).node_opt_arg) == (NODE *)-1) {
10934 rb_parser_printf(p, "NODE_SPECIAL");
10935 }
10936 else if (((*yyvaluep).node_opt_arg)) {
10937 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_opt_arg)))));
10938 }
10939}
10940#line 10941 "parse.c"
10941 break;
10942
10943 case YYSYMBOL_f_opt_arg_arg_value: /* f_opt_arg_arg_value */
10944#line 2617 "parse.y"
10945 {
10946 if ((NODE *)((*yyvaluep).node_opt_arg) == (NODE *)-1) {
10947 rb_parser_printf(p, "NODE_SPECIAL");
10948 }
10949 else if (((*yyvaluep).node_opt_arg)) {
10950 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_opt_arg)))));
10951 }
10952}
10953#line 10954 "parse.c"
10954 break;
10955
10956 case YYSYMBOL_opt_args_tail_args_tail: /* opt_args_tail_args_tail */
10957#line 2617 "parse.y"
10958 {
10959 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
10960 rb_parser_printf(p, "NODE_SPECIAL");
10961 }
10962 else if (((*yyvaluep).node_args)) {
10963 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
10964 }
10965}
10966#line 10967 "parse.c"
10967 break;
10968
10969 case YYSYMBOL_f_args: /* f_args */
10970#line 2617 "parse.y"
10971 {
10972 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
10973 rb_parser_printf(p, "NODE_SPECIAL");
10974 }
10975 else if (((*yyvaluep).node_args)) {
10976 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
10977 }
10978}
10979#line 10980 "parse.c"
10980 break;
10981
10982 case YYSYMBOL_args_forward: /* args_forward */
10983#line 2626 "parse.y"
10984 {
10985 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
10986}
10987#line 10988 "parse.c"
10988 break;
10989
10990 case YYSYMBOL_f_bad_arg: /* f_bad_arg */
10991#line 2626 "parse.y"
10992 {
10993 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
10994}
10995#line 10996 "parse.c"
10996 break;
10997
10998 case YYSYMBOL_f_norm_arg: /* f_norm_arg */
10999#line 2626 "parse.y"
11000 {
11001 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
11002}
11003#line 11004 "parse.c"
11004 break;
11005
11006 case YYSYMBOL_f_arg_asgn: /* f_arg_asgn */
11007#line 2626 "parse.y"
11008 {
11009 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
11010}
11011#line 11012 "parse.c"
11012 break;
11013
11014 case YYSYMBOL_f_arg_item: /* f_arg_item */
11015#line 2617 "parse.y"
11016 {
11017 if ((NODE *)((*yyvaluep).node_args_aux) == (NODE *)-1) {
11018 rb_parser_printf(p, "NODE_SPECIAL");
11019 }
11020 else if (((*yyvaluep).node_args_aux)) {
11021 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args_aux)))));
11022 }
11023}
11024#line 11025 "parse.c"
11025 break;
11026
11027 case YYSYMBOL_f_arg: /* f_arg */
11028#line 2617 "parse.y"
11029 {
11030 if ((NODE *)((*yyvaluep).node_args_aux) == (NODE *)-1) {
11031 rb_parser_printf(p, "NODE_SPECIAL");
11032 }
11033 else if (((*yyvaluep).node_args_aux)) {
11034 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args_aux)))));
11035 }
11036}
11037#line 11038 "parse.c"
11038 break;
11039
11040 case YYSYMBOL_f_label: /* f_label */
11041#line 2626 "parse.y"
11042 {
11043 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
11044}
11045#line 11046 "parse.c"
11046 break;
11047
11048 case YYSYMBOL_f_no_kwarg: /* f_no_kwarg */
11049#line 2626 "parse.y"
11050 {
11051 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
11052}
11053#line 11054 "parse.c"
11054 break;
11055
11056 case YYSYMBOL_f_kwrest: /* f_kwrest */
11057#line 2626 "parse.y"
11058 {
11059 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
11060}
11061#line 11062 "parse.c"
11062 break;
11063
11064 case YYSYMBOL_f_rest_arg: /* f_rest_arg */
11065#line 2626 "parse.y"
11066 {
11067 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
11068}
11069#line 11070 "parse.c"
11070 break;
11071
11072 case YYSYMBOL_f_block_arg: /* f_block_arg */
11073#line 2626 "parse.y"
11074 {
11075 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
11076}
11077#line 11078 "parse.c"
11078 break;
11079
11080 case YYSYMBOL_opt_f_block_arg: /* opt_f_block_arg */
11081#line 2626 "parse.y"
11082 {
11083 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
11084}
11085#line 11086 "parse.c"
11086 break;
11087
11088 case YYSYMBOL_value_expr_singleton_expr: /* value_expr_singleton_expr */
11089#line 2617 "parse.y"
11090 {
11091 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
11092 rb_parser_printf(p, "NODE_SPECIAL");
11093 }
11094 else if (((*yyvaluep).node)) {
11095 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
11096 }
11097}
11098#line 11099 "parse.c"
11099 break;
11100
11101 case YYSYMBOL_singleton: /* singleton */
11102#line 2617 "parse.y"
11103 {
11104 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
11105 rb_parser_printf(p, "NODE_SPECIAL");
11106 }
11107 else if (((*yyvaluep).node)) {
11108 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
11109 }
11110}
11111#line 11112 "parse.c"
11112 break;
11113
11114 case YYSYMBOL_singleton_expr: /* singleton_expr */
11115#line 2617 "parse.y"
11116 {
11117 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
11118 rb_parser_printf(p, "NODE_SPECIAL");
11119 }
11120 else if (((*yyvaluep).node)) {
11121 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
11122 }
11123}
11124#line 11125 "parse.c"
11125 break;
11126
11127 case YYSYMBOL_assoc_list: /* assoc_list */
11128#line 2617 "parse.y"
11129 {
11130 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
11131 rb_parser_printf(p, "NODE_SPECIAL");
11132 }
11133 else if (((*yyvaluep).node)) {
11134 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
11135 }
11136}
11137#line 11138 "parse.c"
11138 break;
11139
11140 case YYSYMBOL_assocs: /* assocs */
11141#line 2617 "parse.y"
11142 {
11143 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
11144 rb_parser_printf(p, "NODE_SPECIAL");
11145 }
11146 else if (((*yyvaluep).node)) {
11147 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
11148 }
11149}
11150#line 11151 "parse.c"
11151 break;
11152
11153 case YYSYMBOL_assoc: /* assoc */
11154#line 2617 "parse.y"
11155 {
11156 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
11157 rb_parser_printf(p, "NODE_SPECIAL");
11158 }
11159 else if (((*yyvaluep).node)) {
11160 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
11161 }
11162}
11163#line 11164 "parse.c"
11164 break;
11165
11166 case YYSYMBOL_operation2: /* operation2 */
11167#line 2626 "parse.y"
11168 {
11169 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
11170}
11171#line 11172 "parse.c"
11172 break;
11173
11174 case YYSYMBOL_operation3: /* operation3 */
11175#line 2626 "parse.y"
11176 {
11177 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
11178}
11179#line 11180 "parse.c"
11180 break;
11181
11182 case YYSYMBOL_dot_or_colon: /* dot_or_colon */
11183#line 2626 "parse.y"
11184 {
11185 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
11186}
11187#line 11188 "parse.c"
11188 break;
11189
11190 case YYSYMBOL_call_op: /* call_op */
11191#line 2626 "parse.y"
11192 {
11193 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
11194}
11195#line 11196 "parse.c"
11196 break;
11197
11198 case YYSYMBOL_call_op2: /* call_op2 */
11199#line 2626 "parse.y"
11200 {
11201 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
11202}
11203#line 11204 "parse.c"
11204 break;
11205
11206 case YYSYMBOL_none: /* none */
11207#line 2617 "parse.y"
11208 {
11209 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
11210 rb_parser_printf(p, "NODE_SPECIAL");
11211 }
11212 else if (((*yyvaluep).node)) {
11213 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
11214 }
11215}
11216#line 11217 "parse.c"
11217 break;
11218
11219 default:
11220 break;
11221 }
11222 YY_IGNORE_MAYBE_UNINITIALIZED_END
11223}
11224
11225
11226/*---------------------------.
11227| Print this symbol on YYO. |
11228`---------------------------*/
11229
11230static void
11231yy_symbol_print (FILE *yyo,
11232 yysymbol_kind_t yykind, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp, struct parser_params *p)
11233{
11234 YYFPRINTF (yyo, "%s %s (",
11235 yykind < YYNTOKENS ? "token" : "nterm", yysymbol_name (yykind));
11236
11237 YYLOCATION_PRINT (yyo, yylocationp, p);
11238 YYFPRINTF (yyo, ": ");
11239 yy_symbol_value_print (yyo, yykind, yyvaluep, yylocationp, p);
11240 YYFPRINTF (yyo, ")");
11241}
11242
11243/*------------------------------------------------------------------.
11244| yy_stack_print -- Print the state stack from its BOTTOM up to its |
11245| TOP (included). |
11246`------------------------------------------------------------------*/
11247
11248static void
11249yy_stack_print (yy_state_t *yybottom, yy_state_t *yytop, struct parser_params *p)
11250{
11251 YYFPRINTF (stderr, "Stack now");
11252 for (; yybottom <= yytop; yybottom++)
11253 {
11254 int yybot = *yybottom;
11255 YYFPRINTF (stderr, " %d", yybot);
11256 }
11257 YYFPRINTF (stderr, "\n");
11258}
11259
11260# define YY_STACK_PRINT(Bottom, Top, p) \
11261do { \
11262 if (yydebug) \
11263 yy_stack_print ((Bottom), (Top), p); \
11264} while (0)
11265
11266
11267/*------------------------------------------------.
11268| Report that the YYRULE is going to be reduced. |
11269`------------------------------------------------*/
11270
11271static void
11272yy_reduce_print (yy_state_t *yyssp, YYSTYPE *yyvsp, YYLTYPE *yylsp,
11273 int yyrule, struct parser_params *p)
11274{
11275 int yylno = yyrline[yyrule];
11276 int yynrhs = yyr2[yyrule];
11277 int yyi;
11278 YYFPRINTF (stderr, "Reducing stack by rule %d (line %d):\n",
11279 yyrule - 1, yylno);
11280 /* The symbols being reduced. */
11281 for (yyi = 0; yyi < yynrhs; yyi++)
11282 {
11283 YYFPRINTF (stderr, " $%d = ", yyi + 1);
11284 yy_symbol_print (stderr,
11285 YY_ACCESSING_SYMBOL (+yyssp[yyi + 1 - yynrhs]),
11286 &yyvsp[(yyi + 1) - (yynrhs)],
11287 &(yylsp[(yyi + 1) - (yynrhs)]), p);
11288 YYFPRINTF (stderr, "\n");
11289 }
11290}
11291
11292# define YY_REDUCE_PRINT(Rule, p) \
11293do { \
11294 if (yydebug) \
11295 yy_reduce_print (yyssp, yyvsp, yylsp, Rule, p); \
11296} while (0)
11297
11298/* Nonzero means print parse trace. It is left uninitialized so that
11299 multiple parsers can coexist. */
11300#ifndef yydebug
11301int yydebug;
11302#endif
11303#else /* !YYDEBUG */
11304# define YYDPRINTF(Args) ((void) 0)
11305# define YY_SYMBOL_PRINT(Title, Kind, Value, Location, p)
11306# define YY_STACK_PRINT(Bottom, Top, p)
11307# define YY_REDUCE_PRINT(Rule, p)
11308#endif /* !YYDEBUG */
11309
11310
11311/* YYINITDEPTH -- initial size of the parser's stacks. */
11312#ifndef YYINITDEPTH
11313# define YYINITDEPTH 200
11314#endif
11315
11316/* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
11317 if the built-in stack extension method is used).
11318
11319 Do not make this value too large; the results are undefined if
11320 YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
11321 evaluated with infinite-precision integer arithmetic. */
11322
11323#ifndef YYMAXDEPTH
11324# define YYMAXDEPTH 10000
11325#endif
11326
11327
11328/* Context of a parse error. */
11329typedef struct
11330{
11331 yy_state_t *yyssp;
11332 yysymbol_kind_t yytoken;
11333 YYLTYPE *yylloc;
11334} yypcontext_t;
11335
11336/* Put in YYARG at most YYARGN of the expected tokens given the
11337 current YYCTX, and return the number of tokens stored in YYARG. If
11338 YYARG is null, return the number of expected tokens (guaranteed to
11339 be less than YYNTOKENS). Return YYENOMEM on memory exhaustion.
11340 Return 0 if there are more than YYARGN expected tokens, yet fill
11341 YYARG up to YYARGN. */
11342static int
11343yypcontext_expected_tokens (const yypcontext_t *yyctx,
11344 yysymbol_kind_t yyarg[], int yyargn)
11345{
11346 /* Actual size of YYARG. */
11347 int yycount = 0;
11348 int yyn = yypact[+*yyctx->yyssp];
11349 if (!yypact_value_is_default (yyn))
11350 {
11351 /* Start YYX at -YYN if negative to avoid negative indexes in
11352 YYCHECK. In other words, skip the first -YYN actions for
11353 this state because they are default actions. */
11354 int yyxbegin = yyn < 0 ? -yyn : 0;
11355 /* Stay within bounds of both yycheck and yytname. */
11356 int yychecklim = YYLAST - yyn + 1;
11357 int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
11358 int yyx;
11359 for (yyx = yyxbegin; yyx < yyxend; ++yyx)
11360 if (yycheck[yyx + yyn] == yyx && yyx != YYSYMBOL_YYerror
11361 && !yytable_value_is_error (yytable[yyx + yyn]))
11362 {
11363 if (!yyarg)
11364 ++yycount;
11365 else if (yycount == yyargn)
11366 return 0;
11367 else
11368 yyarg[yycount++] = YY_CAST (yysymbol_kind_t, yyx);
11369 }
11370 }
11371 if (yyarg && yycount == 0 && 0 < yyargn)
11372 yyarg[0] = YYSYMBOL_YYEMPTY;
11373 return yycount;
11374}
11375
11376
11377
11378
11379#ifndef yystrlen
11380# if defined __GLIBC__ && defined _STRING_H
11381# define yystrlen(S) (YY_CAST (YYPTRDIFF_T, strlen (S)))
11382# else
11383/* Return the length of YYSTR. */
11384static YYPTRDIFF_T
11385yystrlen (const char *yystr)
11386{
11387 YYPTRDIFF_T yylen;
11388 for (yylen = 0; yystr[yylen]; yylen++)
11389 continue;
11390 return yylen;
11391}
11392# endif
11393#endif
11394
11395#ifndef yystpcpy
11396# if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
11397# define yystpcpy stpcpy
11398# else
11399/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
11400 YYDEST. */
11401static char *
11402yystpcpy (char *yydest, const char *yysrc)
11403{
11404 char *yyd = yydest;
11405 const char *yys = yysrc;
11406
11407 while ((*yyd++ = *yys++) != '\0')
11408 continue;
11409
11410 return yyd - 1;
11411}
11412# endif
11413#endif
11414
11415#ifndef yytnamerr
11416/* Copy to YYRES the contents of YYSTR after stripping away unnecessary
11417 quotes and backslashes, so that it's suitable for yyerror. The
11418 heuristic is that double-quoting is unnecessary unless the string
11419 contains an apostrophe, a comma, or backslash (other than
11420 backslash-backslash). YYSTR is taken from yytname. If YYRES is
11421 null, do not copy; instead, return the length of what the result
11422 would have been. */
11423static YYPTRDIFF_T
11424yytnamerr (char *yyres, const char *yystr)
11425{
11426 if (*yystr == '"')
11427 {
11428 YYPTRDIFF_T yyn = 0;
11429 char const *yyp = yystr;
11430 for (;;)
11431 switch (*++yyp)
11432 {
11433 case '\'':
11434 case ',':
11435 goto do_not_strip_quotes;
11436
11437 case '\\':
11438 if (*++yyp != '\\')
11439 goto do_not_strip_quotes;
11440 else
11441 goto append;
11442
11443 append:
11444 default:
11445 if (yyres)
11446 yyres[yyn] = *yyp;
11447 yyn++;
11448 break;
11449
11450 case '"':
11451 if (yyres)
11452 yyres[yyn] = '\0';
11453 return yyn;
11454 }
11455 do_not_strip_quotes: ;
11456 }
11457
11458 if (yyres)
11459 return yystpcpy (yyres, yystr) - yyres;
11460 else
11461 return yystrlen (yystr);
11462}
11463#endif
11464
11465
11466static int
11467yy_syntax_error_arguments (const yypcontext_t *yyctx,
11468 yysymbol_kind_t yyarg[], int yyargn)
11469{
11470 /* Actual size of YYARG. */
11471 int yycount = 0;
11472 /* There are many possibilities here to consider:
11473 - If this state is a consistent state with a default action, then
11474 the only way this function was invoked is if the default action
11475 is an error action. In that case, don't check for expected
11476 tokens because there are none.
11477 - The only way there can be no lookahead present (in yychar) is if
11478 this state is a consistent state with a default action. Thus,
11479 detecting the absence of a lookahead is sufficient to determine
11480 that there is no unexpected or expected token to report. In that
11481 case, just report a simple "syntax error".
11482 - Don't assume there isn't a lookahead just because this state is a
11483 consistent state with a default action. There might have been a
11484 previous inconsistent state, consistent state with a non-default
11485 action, or user semantic action that manipulated yychar.
11486 - Of course, the expected token list depends on states to have
11487 correct lookahead information, and it depends on the parser not
11488 to perform extra reductions after fetching a lookahead from the
11489 scanner and before detecting a syntax error. Thus, state merging
11490 (from LALR or IELR) and default reductions corrupt the expected
11491 token list. However, the list is correct for canonical LR with
11492 one exception: it will still contain any token that will not be
11493 accepted due to an error action in a later state.
11494 */
11495 if (yyctx->yytoken != YYSYMBOL_YYEMPTY)
11496 {
11497 int yyn;
11498 if (yyarg)
11499 yyarg[yycount] = yyctx->yytoken;
11500 ++yycount;
11501 yyn = yypcontext_expected_tokens (yyctx,
11502 yyarg ? yyarg + 1 : yyarg, yyargn - 1);
11503 if (yyn == YYENOMEM)
11504 return YYENOMEM;
11505 else
11506 yycount += yyn;
11507 }
11508 return yycount;
11509}
11510
11511/* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message
11512 about the unexpected token YYTOKEN for the state stack whose top is
11513 YYSSP.
11514
11515 Return 0 if *YYMSG was successfully written. Return -1 if *YYMSG is
11516 not large enough to hold the message. In that case, also set
11517 *YYMSG_ALLOC to the required number of bytes. Return YYENOMEM if the
11518 required number of bytes is too large to store. */
11519static int
11520yysyntax_error (YYPTRDIFF_T *yymsg_alloc, char **yymsg,
11521 const yypcontext_t *yyctx, struct parser_params *p)
11522{
11523 enum { YYARGS_MAX = 5 };
11524 /* Internationalized format string. */
11525 const char *yyformat = YY_NULLPTR;
11526 /* Arguments of yyformat: reported tokens (one for the "unexpected",
11527 one per "expected"). */
11528 yysymbol_kind_t yyarg[YYARGS_MAX];
11529 /* Cumulated lengths of YYARG. */
11530 YYPTRDIFF_T yysize = 0;
11531
11532 /* Actual size of YYARG. */
11533 int yycount = yy_syntax_error_arguments (yyctx, yyarg, YYARGS_MAX);
11534 if (yycount == YYENOMEM)
11535 return YYENOMEM;
11536
11537 switch (yycount)
11538 {
11539#define YYCASE_(N, S) \
11540 case N: \
11541 yyformat = S; \
11542 break
11543 default: /* Avoid compiler warnings. */
11544 YYCASE_(0, YY_("syntax error"));
11545 YYCASE_(1, YY_("syntax error, unexpected %s"));
11546 YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s"));
11547 YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s"));
11548 YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s"));
11549 YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"));
11550#undef YYCASE_
11551 }
11552
11553 /* Compute error message size. Don't count the "%s"s, but reserve
11554 room for the terminator. */
11555 yysize = yystrlen (yyformat) - 2 * yycount + 1;
11556 {
11557 int yyi;
11558 for (yyi = 0; yyi < yycount; ++yyi)
11559 {
11560 YYPTRDIFF_T yysize1
11561 = yysize + yytnamerr (YY_NULLPTR, yytname[yyarg[yyi]]);
11562 if (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM)
11563 yysize = yysize1;
11564 else
11565 return YYENOMEM;
11566 }
11567 }
11568
11569 if (*yymsg_alloc < yysize)
11570 {
11571 *yymsg_alloc = 2 * yysize;
11572 if (! (yysize <= *yymsg_alloc
11573 && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM))
11574 *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM;
11575 return -1;
11576 }
11577
11578 /* Avoid sprintf, as that infringes on the user's name space.
11579 Don't have undefined behavior even if the translation
11580 produced a string with the wrong number of "%s"s. */
11581 {
11582 char *yyp = *yymsg;
11583 int yyi = 0;
11584 while ((*yyp = *yyformat) != '\0')
11585 if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount)
11586 {
11587 yyp += yytnamerr (yyp, yytname[yyarg[yyi++]]);
11588 yyformat += 2;
11589 }
11590 else
11591 {
11592 ++yyp;
11593 ++yyformat;
11594 }
11595 }
11596 return 0;
11597}
11598
11599
11600/*-----------------------------------------------.
11601| Release the memory associated to this symbol. |
11602`-----------------------------------------------*/
11603
11604static void
11605yydestruct (const char *yymsg,
11606 yysymbol_kind_t yykind, YYSTYPE *yyvaluep, YYLTYPE *yylocationp, struct parser_params *p)
11607{
11608 YY_USE (yyvaluep);
11609 YY_USE (yylocationp);
11610 YY_USE (p);
11611 if (!yymsg)
11612 yymsg = "Deleting";
11613 YY_SYMBOL_PRINT (yymsg, yykind, yyvaluep, yylocationp, p);
11614
11615 YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
11616 switch (yykind)
11617 {
11618 case YYSYMBOL_258_16: /* @16 */
11619#line 2654 "parse.y"
11620 {
11621 if (CASE_LABELS_ENABLED_P(((*yyvaluep).labels))) st_free_table(((*yyvaluep).labels));
11622}
11623#line 11624 "parse.c"
11624 break;
11625
11626 case YYSYMBOL_259_17: /* @17 */
11627#line 2654 "parse.y"
11628 {
11629 if (CASE_LABELS_ENABLED_P(((*yyvaluep).labels))) st_free_table(((*yyvaluep).labels));
11630}
11631#line 11632 "parse.c"
11632 break;
11633
11634 default:
11635 break;
11636 }
11637 YY_IGNORE_MAYBE_UNINITIALIZED_END
11638}
11639
11640
11641
11642
11643
11644
11645/*----------.
11646| yyparse. |
11647`----------*/
11648
11649int
11650yyparse (struct parser_params *p)
11651{
11652/* Lookahead token kind. */
11653int yychar;
11654
11655
11656/* The semantic value of the lookahead symbol. */
11657/* Default value used for initialization, for pacifying older GCCs
11658 or non-GCC compilers. */
11659#ifdef __cplusplus
11660static const YYSTYPE yyval_default = {};
11661(void) yyval_default;
11662#else
11663YY_INITIAL_VALUE (static const YYSTYPE yyval_default;)
11664#endif
11665YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default);
11666
11667/* Location data for the lookahead symbol. */
11668static const YYLTYPE yyloc_default
11669# if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL
11670 = { 1, 1, 1, 1 }
11671# endif
11672;
11673YYLTYPE yylloc = yyloc_default;
11674
11675 /* Number of syntax errors so far. */
11676 int yynerrs = 0;
11677 YY_USE (yynerrs); /* Silence compiler warning. */
11678
11679 yy_state_fast_t yystate = 0;
11680 /* Number of tokens to shift before error messages enabled. */
11681 int yyerrstatus = 0;
11682
11683 /* Refer to the stacks through separate pointers, to allow yyoverflow
11684 to reallocate them elsewhere. */
11685
11686 /* Their size. */
11687 YYPTRDIFF_T yystacksize = YYINITDEPTH;
11688
11689 /* The state stack: array, bottom, top. */
11690 yy_state_t yyssa[YYINITDEPTH];
11691 yy_state_t *yyss = yyssa;
11692 yy_state_t *yyssp = yyss;
11693
11694 /* The semantic value stack: array, bottom, top. */
11695 YYSTYPE yyvsa[YYINITDEPTH];
11696 YYSTYPE *yyvs = yyvsa;
11697 YYSTYPE *yyvsp = yyvs;
11698
11699 /* The location stack: array, bottom, top. */
11700 YYLTYPE yylsa[YYINITDEPTH];
11701 YYLTYPE *yyls = yylsa;
11702 YYLTYPE *yylsp = yyls;
11703
11704 int yyn;
11705 /* The return value of yyparse. */
11706 int yyresult;
11707 /* Lookahead symbol kind. */
11708 yysymbol_kind_t yytoken = YYSYMBOL_YYEMPTY;
11709 /* The variables used to return semantic value and location from the
11710 action routines. */
11711 YYSTYPE yyval;
11712 YYLTYPE yyloc;
11713
11714 /* The locations where the error started and ended. */
11715 YYLTYPE yyerror_range[3];
11716
11717 /* Buffer for error messages, and its allocated size. */
11718 char yymsgbuf[128];
11719 char *yymsg = yymsgbuf;
11720 YYPTRDIFF_T yymsg_alloc = sizeof yymsgbuf;
11721
11722#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N), yylsp -= (N))
11723
11724 /* The number of symbols on the RHS of the reduced rule.
11725 Keep to zero when no symbol should be popped. */
11726 int yylen = 0;
11727
11728 YYDPRINTF ((stderr, "Starting parse\n"));
11729
11730 yychar = YYEMPTY; /* Cause a token to be read. */
11731
11732
11733 /* User initialization code. */
11734#line 2661 "parse.y"
11735 {
11736 RUBY_SET_YYLLOC_OF_NONE(yylloc);
11737}
11738
11739#line 11740 "parse.c"
11740
11741 yylsp[0] = yylloc;
11742 goto yysetstate;
11743
11744
11745/*------------------------------------------------------------.
11746| yynewstate -- push a new state, which is found in yystate. |
11747`------------------------------------------------------------*/
11748yynewstate:
11749 /* In all cases, when you get here, the value and location stacks
11750 have just been pushed. So pushing a state here evens the stacks. */
11751 yyssp++;
11752
11753
11754/*--------------------------------------------------------------------.
11755| yysetstate -- set current state (the top of the stack) to yystate. |
11756`--------------------------------------------------------------------*/
11757yysetstate:
11758 YYDPRINTF ((stderr, "Entering state %d\n", yystate));
11759 YY_ASSERT (0 <= yystate && yystate < YYNSTATES);
11760 YY_IGNORE_USELESS_CAST_BEGIN
11761 *yyssp = YY_CAST (yy_state_t, yystate);
11762 YY_IGNORE_USELESS_CAST_END
11763 YY_STACK_PRINT (yyss, yyssp, p);
11764
11765 if (yyss + yystacksize - 1 <= yyssp)
11766#if !defined yyoverflow && !defined YYSTACK_RELOCATE
11767 YYNOMEM;
11768#else
11769 {
11770 /* Get the current used size of the three stacks, in elements. */
11771 YYPTRDIFF_T yysize = yyssp - yyss + 1;
11772
11773# if defined yyoverflow
11774 {
11775 /* Give user a chance to reallocate the stack. Use copies of
11776 these so that the &'s don't force the real ones into
11777 memory. */
11778 yy_state_t *yyss1 = yyss;
11779 YYSTYPE *yyvs1 = yyvs;
11780 YYLTYPE *yyls1 = yyls;
11781
11782 /* Each stack pointer address is followed by the size of the
11783 data in use in that stack, in bytes. This used to be a
11784 conditional around just the two extra args, but that might
11785 be undefined if yyoverflow is a macro. */
11786 yyoverflow (YY_("memory exhausted"),
11787 &yyss1, yysize * YYSIZEOF (*yyssp),
11788 &yyvs1, yysize * YYSIZEOF (*yyvsp),
11789 &yyls1, yysize * YYSIZEOF (*yylsp),
11790 &yystacksize);
11791 yyss = yyss1;
11792 yyvs = yyvs1;
11793 yyls = yyls1;
11794 }
11795# else /* defined YYSTACK_RELOCATE */
11796 /* Extend the stack our own way. */
11797 if (YYMAXDEPTH <= yystacksize)
11798 YYNOMEM;
11799 yystacksize *= 2;
11800 if (YYMAXDEPTH < yystacksize)
11801 yystacksize = YYMAXDEPTH;
11802
11803 {
11804 yy_state_t *yyss1 = yyss;
11805 union yyalloc *yyptr =
11806 YY_CAST (union yyalloc *,
11807 YYSTACK_ALLOC (YY_CAST (YYSIZE_T, YYSTACK_BYTES (yystacksize))));
11808 if (! yyptr)
11809 YYNOMEM;
11810 YYSTACK_RELOCATE (yyss_alloc, yyss);
11811 YYSTACK_RELOCATE (yyvs_alloc, yyvs);
11812 YYSTACK_RELOCATE (yyls_alloc, yyls);
11813# undef YYSTACK_RELOCATE
11814 if (yyss1 != yyssa)
11815 YYSTACK_FREE (yyss1);
11816 }
11817# endif
11818
11819 yyssp = yyss + yysize - 1;
11820 yyvsp = yyvs + yysize - 1;
11821 yylsp = yyls + yysize - 1;
11822
11823 YY_IGNORE_USELESS_CAST_BEGIN
11824 YYDPRINTF ((stderr, "Stack size increased to %ld\n",
11825 YY_CAST (long, yystacksize)));
11826 YY_IGNORE_USELESS_CAST_END
11827
11828 if (yyss + yystacksize - 1 <= yyssp)
11829 YYABORT;
11830 }
11831#endif /* !defined yyoverflow && !defined YYSTACK_RELOCATE */
11832
11833
11834 if (yystate == YYFINAL)
11835 YYACCEPT;
11836
11837 goto yybackup;
11838
11839
11840/*-----------.
11841| yybackup. |
11842`-----------*/
11843yybackup:
11844 /* Do appropriate processing given the current state. Read a
11845 lookahead token if we need one and don't already have one. */
11846
11847 /* First try to decide what to do without reference to lookahead token. */
11848 yyn = yypact[yystate];
11849 if (yypact_value_is_default (yyn))
11850 goto yydefault;
11851
11852 /* Not known => get a lookahead token if don't already have one. */
11853
11854 /* YYCHAR is either empty, or end-of-input, or a valid lookahead. */
11855 if (yychar == YYEMPTY)
11856 {
11857 YYDPRINTF ((stderr, "Reading a token\n"));
11858 yychar = yylex (&yylval, &yylloc, p);
11859 }
11860
11861 if (yychar <= END_OF_INPUT)
11862 {
11863 yychar = END_OF_INPUT;
11864 yytoken = YYSYMBOL_YYEOF;
11865 YYDPRINTF ((stderr, "Now at end of input.\n"));
11866 }
11867 else if (yychar == YYerror)
11868 {
11869 /* The scanner already issued an error message, process directly
11870 to error recovery. But do not keep the error token as
11871 lookahead, it is too special and may lead us to an endless
11872 loop in error recovery. */
11873 yychar = YYUNDEF;
11874 yytoken = YYSYMBOL_YYerror;
11875 yyerror_range[1] = yylloc;
11876 goto yyerrlab1;
11877 }
11878 else
11879 {
11880 yytoken = YYTRANSLATE (yychar);
11881 YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc, p);
11882 }
11883
11884 /* If the proper action on seeing token YYTOKEN is to reduce or to
11885 detect an error, take that action. */
11886 yyn += yytoken;
11887 if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
11888 goto yydefault;
11889 yyn = yytable[yyn];
11890 if (yyn <= 0)
11891 {
11892 if (yytable_value_is_error (yyn))
11893 goto yyerrlab;
11894 yyn = -yyn;
11895 goto yyreduce;
11896 }
11897
11898 /* Count tokens shifted since error; after three, turn off error
11899 status. */
11900 if (yyerrstatus)
11901 yyerrstatus--;
11902
11903 /* Shift the lookahead token. */
11904 YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc, p);
11905 yystate = yyn;
11906 YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
11907 *++yyvsp = yylval;
11908 YY_IGNORE_MAYBE_UNINITIALIZED_END
11909 *++yylsp = yylloc;
11910 /* %after-shift code. */
11911#line 2664 "parse.y"
11912 {after_shift(p);}
11913#line 11914 "parse.c"
11914
11915
11916 /* Discard the shifted token. */
11917 yychar = YYEMPTY;
11918 goto yynewstate;
11919
11920
11921/*-----------------------------------------------------------.
11922| yydefault -- do the default action for the current state. |
11923`-----------------------------------------------------------*/
11924yydefault:
11925 yyn = yydefact[yystate];
11926 if (yyn == 0)
11927 goto yyerrlab;
11928 goto yyreduce;
11929
11930
11931/*-----------------------------.
11932| yyreduce -- do a reduction. |
11933`-----------------------------*/
11934yyreduce:
11935 /* yyn is the number of a rule to reduce with. */
11936 yylen = yyr2[yyn];
11937
11938 /* If YYLEN is nonzero, implement the default value of the action:
11939 '$$ = $1'.
11940
11941 Otherwise, the following line sets YYVAL to garbage.
11942 This behavior is undocumented and Bison
11943 users should not rely upon it. Assigning to YYVAL
11944 unconditionally makes the parser a bit smaller, and it avoids a
11945 GCC warning that YYVAL may be used uninitialized. */
11946 yyval = yyvsp[1-yylen];
11947 /* %before-reduce function. */
11948#line 2665 "parse.y"
11949 {before_reduce(yylen, p);}
11950#line 11951 "parse.c"
11951
11952
11953 /* Default location. */
11954 YYLLOC_DEFAULT (yyloc, (yylsp - yylen), yylen);
11955 yyerror_range[1] = yyloc;
11956 YY_REDUCE_PRINT (yyn, p);
11957 switch (yyn)
11958 {
11959 case 2: /* $@1: %empty */
11960#line 3159 "parse.y"
11961 {
11962 SET_LEX_STATE(EXPR_BEG);
11963 local_push(p, ifndef_ripper(1)+0);
11964 /* jumps are possible in the top-level loop. */
11965 if (!ifndef_ripper(p->do_loop) + 0) init_block_exit(p);
11966 }
11967#line 11968 "parse.c"
11968 break;
11969
11970 case 5: /* compstmt_top_stmts: top_stmts option_terms */
11971#line 2974 "parse.y"
11972 {
11973 void_stmts(p, (yyval.node) = (yyvsp[-1].node));
11974 }
11975#line 11976 "parse.c"
11976 break;
11977
11978 case 6: /* program: $@1 compstmt_top_stmts */
11979#line 3166 "parse.y"
11980 {
11981 if ((yyvsp[0].node) && !compile_for_eval) {
11982 NODE *node = (yyvsp[0].node);
11983 /* last expression should not be void */
11984 if (nd_type_p(node, NODE_BLOCK)) {
11985 while (RNODE_BLOCK(node)->nd_next) {
11986 node = RNODE_BLOCK(node)->nd_next;
11987 }
11988 node = RNODE_BLOCK(node)->nd_head;
11989 }
11990 node = remove_begin(node);
11991 void_expr(p, node);
11992 }
11993 p->eval_tree = NEW_SCOPE(0, block_append(p, p->eval_tree, (yyvsp[0].node)), NULL, &(yyloc));
11994 /*% ripper[final]: program!($:2) %*/
11995 local_pop(p);
11996 }
11997#line 11998 "parse.c"
11998 break;
11999
12000 case 7: /* top_stmts: none */
12001#line 3186 "parse.y"
12002 {
12003 (yyval.node) = NEW_BEGIN(0, &(yyloc));
12004 /*% ripper: stmts_add!(stmts_new!, void_stmt!) %*/
12005 }
12006#line 12007 "parse.c"
12007 break;
12008
12009 case 8: /* top_stmts: top_stmt */
12010#line 3191 "parse.y"
12011 {
12012 (yyval.node) = newline_node((yyvsp[0].node));
12013 /*% ripper: stmts_add!(stmts_new!, $:1) %*/
12014 }
12015#line 12016 "parse.c"
12016 break;
12017
12018 case 9: /* top_stmts: top_stmts terms top_stmt */
12019#line 3196 "parse.y"
12020 {
12021 (yyval.node) = block_append(p, (yyvsp[-2].node), newline_node((yyvsp[0].node)));
12022 /*% ripper: stmts_add!($:1, $:3) %*/
12023 }
12024#line 12025 "parse.c"
12025 break;
12026
12027 case 10: /* top_stmt: stmt */
12028#line 3203 "parse.y"
12029 {
12030 clear_block_exit(p, true);
12031 (yyval.node) = (yyvsp[0].node);
12032 }
12033#line 12034 "parse.c"
12034 break;
12035
12036 case 11: /* top_stmt: "'BEGIN'" begin_block */
12037#line 3208 "parse.y"
12038 {
12039 (yyval.node) = (yyvsp[0].node);
12040 /*% ripper: $:2 %*/
12041 }
12042#line 12043 "parse.c"
12043 break;
12044
12045 case 12: /* block_open: '{' */
12046#line 3214 "parse.y"
12047 {(yyval.node_exits) = init_block_exit(p);}
12048#line 12049 "parse.c"
12049 break;
12050
12051 case 13: /* begin_block: block_open compstmt_top_stmts '}' */
12052#line 3217 "parse.y"
12053 {
12054 restore_block_exit(p, (yyvsp[-2].node_exits));
12055 p->eval_tree_begin = block_append(p, p->eval_tree_begin,
12056 NEW_BEGIN((yyvsp[-1].node), &(yyloc)));
12057 (yyval.node) = NEW_BEGIN(0, &(yyloc));
12058 /*% ripper: BEGIN!($:2) %*/
12059 }
12060#line 12061 "parse.c"
12061 break;
12062
12063 case 14: /* compstmt_stmts: stmts option_terms */
12064#line 2974 "parse.y"
12065 {
12066 void_stmts(p, (yyval.node) = (yyvsp[-1].node));
12067 }
12068#line 12069 "parse.c"
12069 break;
12070
12071 case 15: /* $@2: %empty */
12072#line 3230 "parse.y"
12073 {
12074 if (!(yyvsp[-1].node)) yyerror1(&(yylsp[0]), "else without rescue is useless");
12075 next_rescue_context(&p->ctxt, &(yyvsp[-2].ctxt), after_else);
12076 }
12077#line 12078 "parse.c"
12078 break;
12079
12080 case 16: /* $@3: %empty */
12081#line 3235 "parse.y"
12082 {
12083 next_rescue_context(&p->ctxt, &(yyvsp[-4].ctxt), after_ensure);
12084 }
12085#line 12086 "parse.c"
12086 break;
12087
12088 case 17: /* bodystmt: compstmt_stmts lex_ctxt opt_rescue k_else $@2 compstmt_stmts $@3 opt_ensure */
12089#line 3239 "parse.y"
12090 {
12091 (yyval.node) = new_bodystmt(p, (yyvsp[-7].node), (yyvsp[-5].node), (yyvsp[-2].node), (yyvsp[0].node), &(yyloc));
12092 /*% ripper: bodystmt!($:body, $:opt_rescue, $:elsebody, $:opt_ensure) %*/
12093 }
12094#line 12095 "parse.c"
12095 break;
12096
12097 case 18: /* $@4: %empty */
12098#line 3246 "parse.y"
12099 {
12100 next_rescue_context(&p->ctxt, &(yyvsp[-1].ctxt), after_ensure);
12101 }
12102#line 12103 "parse.c"
12103 break;
12104
12105 case 19: /* bodystmt: compstmt_stmts lex_ctxt opt_rescue $@4 opt_ensure */
12106#line 3250 "parse.y"
12107 {
12108 (yyval.node) = new_bodystmt(p, (yyvsp[-4].node), (yyvsp[-2].node), 0, (yyvsp[0].node), &(yyloc));
12109 /*% ripper: bodystmt!($:body, $:opt_rescue, Qnil, $:opt_ensure) %*/
12110 }
12111#line 12112 "parse.c"
12112 break;
12113
12114 case 20: /* stmts: none */
12115#line 3257 "parse.y"
12116 {
12117 (yyval.node) = NEW_BEGIN(0, &(yyloc));
12118 /*% ripper: stmts_add!(stmts_new!, void_stmt!) %*/
12119 }
12120#line 12121 "parse.c"
12121 break;
12122
12123 case 21: /* stmts: stmt_or_begin */
12124#line 3262 "parse.y"
12125 {
12126 (yyval.node) = newline_node((yyvsp[0].node));
12127 /*% ripper: stmts_add!(stmts_new!, $:1) %*/
12128 }
12129#line 12130 "parse.c"
12130 break;
12131
12132 case 22: /* stmts: stmts terms stmt_or_begin */
12133#line 3267 "parse.y"
12134 {
12135 (yyval.node) = block_append(p, (yyvsp[-2].node), newline_node((yyvsp[0].node)));
12136 /*% ripper: stmts_add!($:1, $:3) %*/
12137 }
12138#line 12139 "parse.c"
12139 break;
12140
12141 case 24: /* $@5: %empty */
12142#line 3275 "parse.y"
12143 {
12144 yyerror1(&(yylsp[0]), "BEGIN is permitted only at toplevel");
12145 }
12146#line 12147 "parse.c"
12147 break;
12148
12149 case 25: /* stmt_or_begin: "'BEGIN'" $@5 begin_block */
12150#line 3279 "parse.y"
12151 {
12152 (yyval.node) = (yyvsp[0].node);
12153 }
12154#line 12155 "parse.c"
12155 break;
12156
12157 case 26: /* allow_exits: %empty */
12158#line 3284 "parse.y"
12159 {(yyval.node_exits) = allow_block_exit(p);}
12160#line 12161 "parse.c"
12161 break;
12162
12163 case 27: /* k_END: "'END'" lex_ctxt */
12164#line 3287 "parse.y"
12165 {
12166 (yyval.ctxt) = (yyvsp[0].ctxt);
12167 p->ctxt.in_rescue = before_rescue;
12168 /*% ripper: $:2 %*/
12169 }
12170#line 12171 "parse.c"
12171 break;
12172
12173 case 28: /* $@6: %empty */
12174#line 3293 "parse.y"
12175 {SET_LEX_STATE(EXPR_FNAME|EXPR_FITEM);}
12176#line 12177 "parse.c"
12177 break;
12178
12179 case 29: /* stmt: "'alias'" fitem $@6 fitem */
12180#line 3294 "parse.y"
12181 {
12182 (yyval.node) = NEW_ALIAS((yyvsp[-2].node), (yyvsp[0].node), &(yyloc), &(yylsp[-3]));
12183 /*% ripper: alias!($:2, $:4) %*/
12184 }
12185#line 12186 "parse.c"
12186 break;
12187
12188 case 30: /* stmt: "'alias'" "global variable" "global variable" */
12189#line 3299 "parse.y"
12190 {
12191 (yyval.node) = NEW_VALIAS((yyvsp[-1].id), (yyvsp[0].id), &(yyloc), &(yylsp[-2]));
12192 /*% ripper: var_alias!($:2, $:3) %*/
12193 }
12194#line 12195 "parse.c"
12195 break;
12196
12197 case 31: /* stmt: "'alias'" "global variable" "back reference" */
12198#line 3304 "parse.y"
12199 {
12200 char buf[2];
12201 buf[0] = '$';
12202 buf[1] = (char)RNODE_BACK_REF((yyvsp[0].node))->nd_nth;
12203 (yyval.node) = NEW_VALIAS((yyvsp[-1].id), rb_intern2(buf, 2), &(yyloc), &(yylsp[-2]));
12204 /*% ripper: var_alias!($:2, $:3) %*/
12205 }
12206#line 12207 "parse.c"
12207 break;
12208
12209 case 32: /* stmt: "'alias'" "global variable" "numbered reference" */
12210#line 3312 "parse.y"
12211 {
12212 static const char mesg[] = "can't make alias for the number variables";
12213 /*%%%*/
12214 yyerror1(&(yylsp[0]), mesg);
12215 /*% %*/
12216 (yyval.node) = NEW_ERROR(&(yyloc));
12217 /*% ripper[error]: alias_error!(ERR_MESG(), $:3) %*/
12218 }
12219#line 12220 "parse.c"
12220 break;
12221
12222 case 33: /* stmt: "'undef'" undef_list */
12223#line 3321 "parse.y"
12224 {
12225 nd_set_first_loc((yyvsp[0].node), (yylsp[-1]).beg_pos);
12226 RNODE_UNDEF((yyvsp[0].node))->keyword_loc = (yylsp[-1]);
12227 (yyval.node) = (yyvsp[0].node);
12228 /*% ripper: undef!($:2) %*/
12229 }
12230#line 12231 "parse.c"
12231 break;
12232
12233 case 34: /* stmt: stmt "'if' modifier" expr_value */
12234#line 3328 "parse.y"
12235 {
12236 (yyval.node) = new_if(p, (yyvsp[0].node), remove_begin((yyvsp[-2].node)), 0, &(yyloc), &(yylsp[-1]), &NULL_LOC, &NULL_LOC);
12237 fixpos((yyval.node), (yyvsp[0].node));
12238 /*% ripper: if_mod!($:3, $:1) %*/
12239 }
12240#line 12241 "parse.c"
12241 break;
12242
12243 case 35: /* stmt: stmt "'unless' modifier" expr_value */
12244#line 3334 "parse.y"
12245 {
12246 (yyval.node) = new_unless(p, (yyvsp[0].node), remove_begin((yyvsp[-2].node)), 0, &(yyloc), &(yylsp[-1]), &NULL_LOC, &NULL_LOC);
12247 fixpos((yyval.node), (yyvsp[0].node));
12248 /*% ripper: unless_mod!($:3, $:1) %*/
12249 }
12250#line 12251 "parse.c"
12251 break;
12252
12253 case 36: /* stmt: stmt "'while' modifier" expr_value */
12254#line 3340 "parse.y"
12255 {
12256 clear_block_exit(p, false);
12257 if ((yyvsp[-2].node) && nd_type_p((yyvsp[-2].node), NODE_BEGIN)) {
12258 (yyval.node) = NEW_WHILE(cond(p, (yyvsp[0].node), &(yylsp[0])), RNODE_BEGIN((yyvsp[-2].node))->nd_body, 0, &(yyloc), &(yylsp[-1]), &NULL_LOC);
12259 }
12260 else {
12261 (yyval.node) = NEW_WHILE(cond(p, (yyvsp[0].node), &(yylsp[0])), (yyvsp[-2].node), 1, &(yyloc), &(yylsp[-1]), &NULL_LOC);
12262 }
12263 /*% ripper: while_mod!($:3, $:1) %*/
12264 }
12265#line 12266 "parse.c"
12266 break;
12267
12268 case 37: /* stmt: stmt "'until' modifier" expr_value */
12269#line 3351 "parse.y"
12270 {
12271 clear_block_exit(p, false);
12272 if ((yyvsp[-2].node) && nd_type_p((yyvsp[-2].node), NODE_BEGIN)) {
12273 (yyval.node) = NEW_UNTIL(cond(p, (yyvsp[0].node), &(yylsp[0])), RNODE_BEGIN((yyvsp[-2].node))->nd_body, 0, &(yyloc), &(yylsp[-1]), &NULL_LOC);
12274 }
12275 else {
12276 (yyval.node) = NEW_UNTIL(cond(p, (yyvsp[0].node), &(yylsp[0])), (yyvsp[-2].node), 1, &(yyloc), &(yylsp[-1]), &NULL_LOC);
12277 }
12278 /*% ripper: until_mod!($:3, $:1) %*/
12279 }
12280#line 12281 "parse.c"
12281 break;
12282
12283 case 38: /* stmt: stmt "'rescue' modifier" after_rescue stmt */
12284#line 3362 "parse.y"
12285 {
12286 p->ctxt.in_rescue = (yyvsp[-1].ctxt).in_rescue;
12287 NODE *resq;
12288 YYLTYPE loc = code_loc_gen(&(yylsp[-2]), &(yylsp[0]));
12289 resq = NEW_RESBODY(0, 0, remove_begin((yyvsp[0].node)), 0, &loc);
12290 (yyval.node) = NEW_RESCUE(remove_begin((yyvsp[-3].node)), resq, 0, &(yyloc));
12291 /*% ripper: rescue_mod!($:1, $:4) %*/
12292 }
12293#line 12294 "parse.c"
12294 break;
12295
12296 case 39: /* stmt: k_END allow_exits '{' compstmt_stmts '}' */
12297#line 3371 "parse.y"
12298 {
12299 if (p->ctxt.in_def) {
12300 rb_warn0("END in method; use at_exit");
12301 }
12302 restore_block_exit(p, (yyvsp[-3].node_exits));
12303 p->ctxt = (yyvsp[-4].ctxt);
12304 {
12305 NODE *scope = NEW_SCOPE2(0 /* tbl */, 0 /* args */, (yyvsp[-1].node) /* body */, NULL /* parent */, &(yyloc));
12306 (yyval.node) = NEW_POSTEXE(scope, &(yyloc), &(yylsp[-4]), &(yylsp[-2]), &(yylsp[0]));
12307 RNODE_SCOPE(scope)->nd_parent = (yyval.node);
12308 }
12309 /*% ripper: END!($:compstmt) %*/
12310 }
12311#line 12312 "parse.c"
12312 break;
12313
12314 case 41: /* stmt: mlhs '=' lex_ctxt command_call_value */
12315#line 3386 "parse.y"
12316 {
12317 (yyval.node) = node_assign(p, (NODE *)(yyvsp[-3].node_masgn), (yyvsp[0].node), (yyvsp[-1].ctxt), &(yyloc));
12318 /*% ripper: massign!($:1, $:4) %*/
12319 }
12320#line 12321 "parse.c"
12321 break;
12322
12323 case 42: /* asgn_mrhs: lhs '=' lex_ctxt mrhs */
12324#line 2919 "parse.y"
12325 {
12326 (yyval.node) = node_assign(p, (NODE *)(yyvsp[-3].node), (yyvsp[0].node), (yyvsp[-1].ctxt), &(yyloc));
12327 /*% ripper: assign!($:1, $:4) %*/
12328 }
12329#line 12330 "parse.c"
12330 break;
12331
12332 case 44: /* stmt: mlhs '=' lex_ctxt mrhs_arg "'rescue' modifier" after_rescue stmt */
12333#line 3393 "parse.y"
12334 {
12335 p->ctxt.in_rescue = (yyvsp[-4].ctxt).in_rescue;
12336 YYLTYPE loc = code_loc_gen(&(yylsp[-2]), &(yylsp[0]));
12337 (yyvsp[0].node) = NEW_RESBODY(0, 0, remove_begin((yyvsp[0].node)), 0, &loc);
12338 loc.beg_pos = (yylsp[-3]).beg_pos;
12339 (yyvsp[-3].node) = NEW_RESCUE((yyvsp[-3].node), (yyvsp[0].node), 0, &loc);
12340 (yyval.node) = node_assign(p, (NODE *)(yyvsp[-6].node_masgn), (yyvsp[-3].node), (yyvsp[-4].ctxt), &(yyloc));
12341 /*% ripper: massign!($:1, rescue_mod!($:4, $:7)) %*/
12342 }
12343#line 12344 "parse.c"
12344 break;
12345
12346 case 45: /* stmt: mlhs '=' lex_ctxt mrhs_arg */
12347#line 3403 "parse.y"
12348 {
12349 (yyval.node) = node_assign(p, (NODE *)(yyvsp[-3].node_masgn), (yyvsp[0].node), (yyvsp[-1].ctxt), &(yyloc));
12350 /*% ripper: massign!($:1, $:4) %*/
12351 }
12352#line 12353 "parse.c"
12353 break;
12354
12355 case 47: /* stmt: error */
12356#line 3409 "parse.y"
12357 {
12358 (void)yynerrs;
12359 (yyval.node) = NEW_ERROR(&(yyloc));
12360 }
12361#line 12362 "parse.c"
12362 break;
12363
12364 case 48: /* asgn_command_rhs: lhs '=' lex_ctxt command_rhs */
12365#line 2919 "parse.y"
12366 {
12367 (yyval.node) = node_assign(p, (NODE *)(yyvsp[-3].node), (yyvsp[0].node), (yyvsp[-1].ctxt), &(yyloc));
12368 /*% ripper: assign!($:1, $:4) %*/
12369 }
12370#line 12371 "parse.c"
12371 break;
12372
12373 case 50: /* op_asgn_command_rhs: var_lhs "operator-assignment" lex_ctxt command_rhs */
12374#line 3044 "parse.y"
12375 {
12376 (yyval.node) = new_op_assign(p, (yyvsp[-3].node), (yyvsp[-2].id), (yyvsp[0].node), (yyvsp[-1].ctxt), &(yyloc));
12377 /*% ripper: opassign!($:1, $:2, $:4) %*/
12378 }
12379#line 12380 "parse.c"
12380 break;
12381
12382 case 51: /* op_asgn_command_rhs: primary_value '[' opt_call_args rbracket "operator-assignment" lex_ctxt command_rhs */
12383#line 3049 "parse.y"
12384 {
12385 (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]));
12386 /*% ripper: opassign!(aref_field!($:1, $:3), $:5, $:7) %*/
12387 }
12388#line 12389 "parse.c"
12389 break;
12390
12391 case 52: /* op_asgn_command_rhs: primary_value call_op "local variable or method" "operator-assignment" lex_ctxt command_rhs */
12392#line 3054 "parse.y"
12393 {
12394 (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]));
12395 /*% ripper: opassign!(field!($:1, $:2, $:3), $:4, $:6) %*/
12396 }
12397#line 12398 "parse.c"
12398 break;
12399
12400 case 53: /* op_asgn_command_rhs: primary_value call_op "constant" "operator-assignment" lex_ctxt command_rhs */
12401#line 3059 "parse.y"
12402 {
12403 (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]));
12404 /*% ripper: opassign!(field!($:1, $:2, $:3), $:4, $:6) %*/
12405 }
12406#line 12407 "parse.c"
12407 break;
12408
12409 case 54: /* op_asgn_command_rhs: primary_value "::" "local variable or method" "operator-assignment" lex_ctxt command_rhs */
12410#line 3064 "parse.y"
12411 {
12412 (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]));
12413 /*% ripper: opassign!(field!($:1, $:2, $:3), $:4, $:6) %*/
12414 }
12415#line 12416 "parse.c"
12416 break;
12417
12418 case 55: /* op_asgn_command_rhs: primary_value "::" "constant" "operator-assignment" lex_ctxt command_rhs */
12419#line 3069 "parse.y"
12420 {
12421 YYLTYPE loc = code_loc_gen(&(yylsp[-5]), &(yylsp[-3]));
12422 (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));
12423 /*% ripper: opassign!(const_path_field!($:1, $:3), $:4, $:6) %*/
12424 }
12425#line 12426 "parse.c"
12426 break;
12427
12428 case 56: /* op_asgn_command_rhs: ":: at EXPR_BEG" "constant" "operator-assignment" lex_ctxt command_rhs */
12429#line 3075 "parse.y"
12430 {
12431 YYLTYPE loc = code_loc_gen(&(yylsp[-4]), &(yylsp[-3]));
12432 (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));
12433 /*% ripper: opassign!(top_const_field!($:2), $:3, $:5) %*/
12434 }
12435#line 12436 "parse.c"
12436 break;
12437
12438 case 57: /* op_asgn_command_rhs: backref "operator-assignment" lex_ctxt command_rhs */
12439#line 3081 "parse.y"
12440 {
12441 VALUE MAYBE_UNUSED(e) = rb_backref_error(p, (yyvsp[-3].node));
12442 (yyval.node) = NEW_ERROR(&(yyloc));
12443 /*% ripper[error]: assign_error!(?e, opassign!(var_field!($:1), $:2, $:4)) %*/
12444 }
12445#line 12446 "parse.c"
12446 break;
12447
12448 case 59: /* def_endless_method_endless_command: defn_head f_opt_paren_args '=' endless_command */
12449#line 2949 "parse.y"
12450 {
12451 endless_method_name(p, (yyvsp[-3].node_def_temp)->nd_mid, &(yylsp[-3]));
12452 restore_defun(p, (yyvsp[-3].node_def_temp));
12453 ((yyval.node) = (yyvsp[-3].node_def_temp)->nd_def)->nd_loc = (yyloc);
12454 (yyvsp[0].node) = new_scope_body(p, (yyvsp[-2].node_args), (yyvsp[0].node), (yyval.node), &(yyloc));
12455 RNODE_DEFN((yyval.node))->nd_defn = (yyvsp[0].node);
12456 /*% ripper: bodystmt!($:bodystmt, Qnil, Qnil, Qnil) %*/
12457 /*% ripper: def!($:head, $:args, $:$) %*/
12458 local_pop(p);
12459 }
12460#line 12461 "parse.c"
12461 break;
12462
12463 case 60: /* def_endless_method_endless_command: defs_head f_opt_paren_args '=' endless_command */
12464#line 2960 "parse.y"
12465 {
12466 endless_method_name(p, (yyvsp[-3].node_def_temp)->nd_mid, &(yylsp[-3]));
12467 restore_defun(p, (yyvsp[-3].node_def_temp));
12468 ((yyval.node) = (yyvsp[-3].node_def_temp)->nd_def)->nd_loc = (yyloc);
12469 (yyvsp[0].node) = new_scope_body(p, (yyvsp[-2].node_args), (yyvsp[0].node), (yyval.node), &(yyloc));
12470 RNODE_DEFS((yyval.node))->nd_defn = (yyvsp[0].node);
12471 /*% ripper: bodystmt!($:bodystmt, Qnil, Qnil, Qnil) %*/
12472 /*% ripper: defs!(*$:head[0..2], $:args, $:$) %*/
12473 local_pop(p);
12474 }
12475#line 12476 "parse.c"
12476 break;
12477
12478 case 63: /* endless_command: endless_command "'rescue' modifier" after_rescue arg */
12479#line 3422 "parse.y"
12480 {
12481 p->ctxt.in_rescue = (yyvsp[-1].ctxt).in_rescue;
12482 (yyval.node) = rescued_expr(p, (yyvsp[-3].node), (yyvsp[0].node), &(yylsp[-3]), &(yylsp[-2]), &(yylsp[0]));
12483 /*% ripper: rescue_mod!($:1, $:4) %*/
12484 }
12485#line 12486 "parse.c"
12486 break;
12487
12488 case 66: /* endless_command: "'not'" option_'\n' endless_command */
12489#line 3428 "parse.y"
12490 {
12491 (yyval.node) = call_uni_op(p, method_cond(p, (yyvsp[0].node), &(yylsp[0])), METHOD_NOT, &(yylsp[-2]), &(yyloc));
12492 /*% ripper: unary!(ID2VAL(idNOT), $:3) %*/
12493 }
12494#line 12495 "parse.c"
12495 break;
12496
12497 case 68: /* command_rhs: command_call_value "'rescue' modifier" after_rescue stmt */
12498#line 3436 "parse.y"
12499 {
12500 p->ctxt.in_rescue = (yyvsp[-1].ctxt).in_rescue;
12501 YYLTYPE loc = code_loc_gen(&(yylsp[-2]), &(yylsp[0]));
12502 (yyval.node) = NEW_RESCUE((yyvsp[-3].node), NEW_RESBODY(0, 0, remove_begin((yyvsp[0].node)), 0, &loc), 0, &(yyloc));
12503 /*% ripper: rescue_mod!($:1, $:4) %*/
12504 }
12505#line 12506 "parse.c"
12506 break;
12507
12508 case 71: /* expr: expr "'and'" expr */
12509#line 3447 "parse.y"
12510 {
12511 (yyval.node) = logop(p, idAND, (yyvsp[-2].node), (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
12512 /*% ripper: binary!($:1, ID2VAL(idAND), $:3) %*/
12513 }
12514#line 12515 "parse.c"
12515 break;
12516
12517 case 72: /* expr: expr "'or'" expr */
12518#line 3452 "parse.y"
12519 {
12520 (yyval.node) = logop(p, idOR, (yyvsp[-2].node), (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
12521 /*% ripper: binary!($:1, ID2VAL(idOR), $:3) %*/
12522 }
12523#line 12524 "parse.c"
12524 break;
12525
12526 case 73: /* expr: "'not'" option_'\n' expr */
12527#line 3457 "parse.y"
12528 {
12529 (yyval.node) = call_uni_op(p, method_cond(p, (yyvsp[0].node), &(yylsp[0])), METHOD_NOT, &(yylsp[-2]), &(yyloc));
12530 /*% ripper: unary!(ID2VAL(idNOT), $:3) %*/
12531 }
12532#line 12533 "parse.c"
12533 break;
12534
12535 case 74: /* expr: '!' command_call */
12536#line 3462 "parse.y"
12537 {
12538 (yyval.node) = call_uni_op(p, method_cond(p, (yyvsp[0].node), &(yylsp[0])), '!', &(yylsp[-1]), &(yyloc));
12539 /*% ripper: unary!(ID2VAL('\'!\''), $:2) %*/
12540 }
12541#line 12542 "parse.c"
12542 break;
12543
12544 case 75: /* $@7: %empty */
12545#line 3467 "parse.y"
12546 {
12547 value_expr(p, (yyvsp[-1].node));
12548 }
12549#line 12550 "parse.c"
12550 break;
12551
12552 case 76: /* expr: arg "=>" $@7 p_in_kwarg p_pvtbl p_pktbl p_top_expr_body */
12553#line 3472 "parse.y"
12554 {
12555 pop_pktbl(p, (yyvsp[-1].tbl));
12556 pop_pvtbl(p, (yyvsp[-2].tbl));
12557 p->ctxt.in_kwarg = (yyvsp[-3].ctxt).in_kwarg;
12558 p->ctxt.in_alt_pattern = (yyvsp[-3].ctxt).in_alt_pattern;
12559 p->ctxt.capture_in_pattern = (yyvsp[-3].ctxt).capture_in_pattern;
12560 (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);
12561 /*% ripper: case!($:arg, in!($:body, Qnil, Qnil)) %*/
12562 }
12563#line 12564 "parse.c"
12564 break;
12565
12566 case 77: /* $@8: %empty */
12567#line 3482 "parse.y"
12568 {
12569 value_expr(p, (yyvsp[-1].node));
12570 }
12571#line 12572 "parse.c"
12572 break;
12573
12574 case 78: /* expr: arg "'in'" $@8 p_in_kwarg p_pvtbl p_pktbl p_top_expr_body */
12575#line 3487 "parse.y"
12576 {
12577 pop_pktbl(p, (yyvsp[-1].tbl));
12578 pop_pvtbl(p, (yyvsp[-2].tbl));
12579 p->ctxt.in_kwarg = (yyvsp[-3].ctxt).in_kwarg;
12580 p->ctxt.in_alt_pattern = (yyvsp[-3].ctxt).in_alt_pattern;
12581 p->ctxt.capture_in_pattern = (yyvsp[-3].ctxt).capture_in_pattern;
12582 (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);
12583 /*% ripper: case!($:arg, in!($:body, Qnil, Qnil)) %*/
12584 }
12585#line 12586 "parse.c"
12586 break;
12587
12588 case 80: /* def_name: fname */
12589#line 3500 "parse.y"
12590 {
12591 numparam_name(p, (yyvsp[0].id));
12592 local_push(p, 0);
12593 p->ctxt.in_def = 1;
12594 p->ctxt.in_rescue = before_rescue;
12595 p->ctxt.cant_return = 0;
12596 (yyval.id) = (yyvsp[0].id);
12597 }
12598#line 12599 "parse.c"
12599 break;
12600
12601 case 81: /* defn_head: k_def def_name */
12602#line 3511 "parse.y"
12603 {
12604 (yyval.node_def_temp) = def_head_save(p, (yyvsp[-1].node_def_temp));
12605 (yyval.node_def_temp)->nd_mid = (yyvsp[0].id);
12606 (yyval.node_def_temp)->nd_def = NEW_DEFN((yyvsp[0].id), 0, &(yyloc));
12607 /*% ripper: $:def_name %*/
12608 }
12609#line 12610 "parse.c"
12610 break;
12611
12612 case 82: /* $@9: %empty */
12613#line 3520 "parse.y"
12614 {
12615 SET_LEX_STATE(EXPR_FNAME);
12616 }
12617#line 12618 "parse.c"
12618 break;
12619
12620 case 83: /* defs_head: k_def singleton dot_or_colon $@9 def_name */
12621#line 3524 "parse.y"
12622 {
12623 SET_LEX_STATE(EXPR_ENDFN|EXPR_LABEL); /* force for args */
12624 (yyval.node_def_temp) = def_head_save(p, (yyvsp[-4].node_def_temp));
12625 (yyval.node_def_temp)->nd_mid = (yyvsp[0].id);
12626 (yyval.node_def_temp)->nd_def = NEW_DEFS((yyvsp[-3].node), (yyvsp[0].id), 0, &(yyloc));
12627 /*% ripper: [$:singleton, $:dot_or_colon, $:def_name] %*/
12628 }
12629#line 12630 "parse.c"
12630 break;
12631
12632 case 84: /* value_expr_expr: expr */
12633#line 3144 "parse.y"
12634 {
12635 value_expr(p, (yyvsp[0].node));
12636 (yyval.node) = (yyvsp[0].node);
12637 }
12638#line 12639 "parse.c"
12639 break;
12640
12641 case 86: /* expr_value: error */
12642#line 3535 "parse.y"
12643 {
12644 (yyval.node) = NEW_ERROR(&(yyloc));
12645 }
12646#line 12647 "parse.c"
12647 break;
12648
12649 case 87: /* $@10: %empty */
12650#line 3540 "parse.y"
12651 {COND_PUSH(1);}
12652#line 12653 "parse.c"
12653 break;
12654
12655 case 88: /* $@11: %empty */
12656#line 3540 "parse.y"
12657 {COND_POP();}
12658#line 12659 "parse.c"
12659 break;
12660
12661 case 89: /* expr_value_do: $@10 expr_value do $@11 */
12662#line 3541 "parse.y"
12663 {
12664 (yyval.node) = (yyvsp[-2].node);
12665 /*% ripper: $:2 %*/
12666 }
12667#line 12668 "parse.c"
12668 break;
12669
12670 case 92: /* value_expr_command_call: command_call */
12671#line 3144 "parse.y"
12672 {
12673 value_expr(p, (yyvsp[0].node));
12674 (yyval.node) = (yyvsp[0].node);
12675 }
12676#line 12677 "parse.c"
12677 break;
12678
12679 case 95: /* block_command: block_call call_op2 operation2 command_args */
12680#line 3556 "parse.y"
12681 {
12682 (yyval.node) = new_qcall(p, (yyvsp[-2].id), (yyvsp[-3].node), (yyvsp[-1].id), (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
12683 /*% ripper: method_add_arg!(call!($:1, $:2, $:3), $:4) %*/
12684 }
12685#line 12686 "parse.c"
12686 break;
12687
12688 case 96: /* cmd_brace_block: "{ arg" brace_body '}' */
12689#line 3563 "parse.y"
12690 {
12691 (yyval.node) = (yyvsp[-1].node);
12692 set_embraced_location((yyval.node), &(yylsp[-2]), &(yylsp[0]));
12693 /*% ripper: $:2 %*/
12694 }
12695#line 12696 "parse.c"
12696 break;
12697
12698 case 97: /* fcall: "local variable or method" */
12699#line 3571 "parse.y"
12700 {
12701 (yyval.node_fcall) = NEW_FCALL((yyvsp[0].id), 0, &(yyloc));
12702 /*% ripper: $:1 %*/
12703 }
12704#line 12705 "parse.c"
12705 break;
12706
12707 case 98: /* fcall: "constant" */
12708#line 3571 "parse.y"
12709 {
12710 (yyval.node_fcall) = NEW_FCALL((yyvsp[0].id), 0, &(yyloc));
12711 /*% ripper: $:1 %*/
12712 }
12713#line 12714 "parse.c"
12714 break;
12715
12716 case 99: /* fcall: "method" */
12717#line 3571 "parse.y"
12718 {
12719 (yyval.node_fcall) = NEW_FCALL((yyvsp[0].id), 0, &(yyloc));
12720 /*% ripper: $:1 %*/
12721 }
12722#line 12723 "parse.c"
12723 break;
12724
12725 case 100: /* command: fcall command_args */
12726#line 3578 "parse.y"
12727 {
12728 (yyvsp[-1].node_fcall)->nd_args = (yyvsp[0].node);
12729 nd_set_last_loc((yyvsp[-1].node_fcall), (yylsp[0]).end_pos);
12730 (yyval.node) = (NODE *)(yyvsp[-1].node_fcall);
12731 /*% ripper: command!($:1, $:2) %*/
12732 }
12733#line 12734 "parse.c"
12734 break;
12735
12736 case 101: /* command: fcall command_args cmd_brace_block */
12737#line 3585 "parse.y"
12738 {
12739 block_dup_check(p, (yyvsp[-1].node), (yyvsp[0].node));
12740 (yyvsp[-2].node_fcall)->nd_args = (yyvsp[-1].node);
12741 (yyval.node) = method_add_block(p, (NODE *)(yyvsp[-2].node_fcall), (yyvsp[0].node), &(yyloc));
12742 fixpos((yyval.node), RNODE((yyvsp[-2].node_fcall)));
12743 nd_set_last_loc((yyvsp[-2].node_fcall), (yylsp[-1]).end_pos);
12744 /*% ripper: method_add_block!(command!($:1, $:2), $:3) %*/
12745 }
12746#line 12747 "parse.c"
12747 break;
12748
12749 case 102: /* command: primary_value call_op operation2 command_args */
12750#line 3594 "parse.y"
12751 {
12752 (yyval.node) = new_command_qcall(p, (yyvsp[-2].id), (yyvsp[-3].node), (yyvsp[-1].id), (yyvsp[0].node), 0, &(yylsp[-1]), &(yyloc));
12753 /*% ripper: command_call!($:1, $:2, $:3, $:4) %*/
12754 }
12755#line 12756 "parse.c"
12756 break;
12757
12758 case 103: /* command: primary_value call_op operation2 command_args cmd_brace_block */
12759#line 3599 "parse.y"
12760 {
12761 (yyval.node) = new_command_qcall(p, (yyvsp[-3].id), (yyvsp[-4].node), (yyvsp[-2].id), (yyvsp[-1].node), (yyvsp[0].node), &(yylsp[-2]), &(yyloc));
12762 /*% ripper: method_add_block!(command_call!($:1, $:2, $:3, $:4), $:5) %*/
12763 }
12764#line 12765 "parse.c"
12765 break;
12766
12767 case 104: /* command: primary_value "::" operation2 command_args */
12768#line 3604 "parse.y"
12769 {
12770 (yyval.node) = new_command_qcall(p, idCOLON2, (yyvsp[-3].node), (yyvsp[-1].id), (yyvsp[0].node), 0, &(yylsp[-1]), &(yyloc));
12771 /*% ripper: command_call!($:1, $:2, $:3, $:4) %*/
12772 }
12773#line 12774 "parse.c"
12774 break;
12775
12776 case 105: /* command: primary_value "::" operation2 command_args cmd_brace_block */
12777#line 3609 "parse.y"
12778 {
12779 (yyval.node) = new_command_qcall(p, idCOLON2, (yyvsp[-4].node), (yyvsp[-2].id), (yyvsp[-1].node), (yyvsp[0].node), &(yylsp[-2]), &(yyloc));
12780 /*% ripper: method_add_block!(command_call!($:1, $:2, $:3, $:4), $:5) %*/
12781 }
12782#line 12783 "parse.c"
12783 break;
12784
12785 case 106: /* command: primary_value "::" "constant" '{' brace_body '}' */
12786#line 3614 "parse.y"
12787 {
12788 set_embraced_location((yyvsp[-1].node), &(yylsp[-2]), &(yylsp[0]));
12789 (yyval.node) = new_command_qcall(p, idCOLON2, (yyvsp[-5].node), (yyvsp[-3].id), 0, (yyvsp[-1].node), &(yylsp[-3]), &(yyloc));
12790 /*% ripper: method_add_block!(command_call!($:1, $:2, $:3, Qnil), $:5) %*/
12791 }
12792#line 12793 "parse.c"
12793 break;
12794
12795 case 107: /* command: "'super'" command_args */
12796#line 3620 "parse.y"
12797 {
12798 (yyval.node) = NEW_SUPER((yyvsp[0].node), &(yyloc), &(yylsp[-1]), &NULL_LOC, &NULL_LOC);
12799 fixpos((yyval.node), (yyvsp[0].node));
12800 /*% ripper: super!($:2) %*/
12801 }
12802#line 12803 "parse.c"
12803 break;
12804
12805 case 108: /* command: k_yield command_args */
12806#line 3626 "parse.y"
12807 {
12808 (yyval.node) = NEW_YIELD((yyvsp[0].node), &(yyloc), &(yylsp[-1]), &NULL_LOC, &NULL_LOC);
12809 fixpos((yyval.node), (yyvsp[0].node));
12810 /*% ripper: yield!($:2) %*/
12811 }
12812#line 12813 "parse.c"
12813 break;
12814
12815 case 109: /* command: k_return call_args */
12816#line 3632 "parse.y"
12817 {
12818 (yyval.node) = NEW_RETURN(ret_args(p, (yyvsp[0].node)), &(yyloc), &(yylsp[-1]));
12819 /*% ripper: return!($:2) %*/
12820 }
12821#line 12822 "parse.c"
12822 break;
12823
12824 case 110: /* command: "'break'" call_args */
12825#line 3637 "parse.y"
12826 {
12827 NODE *args = 0;
12828 args = ret_args(p, (yyvsp[0].node));
12829 (yyval.node) = add_block_exit(p, NEW_BREAK(args, &(yyloc), &(yylsp[-1])));
12830 /*% ripper: break!($:2) %*/
12831 }
12832#line 12833 "parse.c"
12833 break;
12834
12835 case 111: /* command: "'next'" call_args */
12836#line 3644 "parse.y"
12837 {
12838 NODE *args = 0;
12839 args = ret_args(p, (yyvsp[0].node));
12840 (yyval.node) = add_block_exit(p, NEW_NEXT(args, &(yyloc), &(yylsp[-1])));
12841 /*% ripper: next!($:2) %*/
12842 }
12843#line 12844 "parse.c"
12844 break;
12845
12846 case 113: /* mlhs: "(" mlhs_inner rparen */
12847#line 3654 "parse.y"
12848 {
12849 (yyval.node_masgn) = (yyvsp[-1].node_masgn);
12850 /*% ripper: mlhs_paren!($:2) %*/
12851 }
12852#line 12853 "parse.c"
12853 break;
12854
12855 case 115: /* mlhs_inner: "(" mlhs_inner rparen */
12856#line 3662 "parse.y"
12857 {
12858 (yyval.node_masgn) = NEW_MASGN(NEW_LIST((NODE *)(yyvsp[-1].node_masgn), &(yyloc)), 0, &(yyloc));
12859 /*% ripper: mlhs_paren!($:2) %*/
12860 }
12861#line 12862 "parse.c"
12862 break;
12863
12864 case 116: /* mlhs_basic: mlhs_head */
12865#line 3669 "parse.y"
12866 {
12867 (yyval.node_masgn) = NEW_MASGN((yyvsp[0].node), 0, &(yyloc));
12868 /*% ripper: $:1 %*/
12869 }
12870#line 12871 "parse.c"
12871 break;
12872
12873 case 117: /* mlhs_basic: mlhs_head mlhs_item */
12874#line 3674 "parse.y"
12875 {
12876 (yyval.node_masgn) = NEW_MASGN(list_append(p, (yyvsp[-1].node), (yyvsp[0].node)), 0, &(yyloc));
12877 /*% ripper: mlhs_add!($:1, $:2) %*/
12878 }
12879#line 12880 "parse.c"
12880 break;
12881
12882 case 118: /* mlhs_basic: mlhs_head "*" mlhs_node */
12883#line 3679 "parse.y"
12884 {
12885 (yyval.node_masgn) = NEW_MASGN((yyvsp[-2].node), (yyvsp[0].node), &(yyloc));
12886 /*% ripper: mlhs_add_star!($:1, $:3) %*/
12887 }
12888#line 12889 "parse.c"
12889 break;
12890
12891 case 119: /* mlhs_items_mlhs_item: mlhs_item */
12892#line 3031 "parse.y"
12893 {
12894 (yyval.node) = NEW_LIST((yyvsp[0].node), &(yyloc));
12895 /*% ripper: mlhs_add!(mlhs_new!, $:1) %*/
12896 }
12897#line 12898 "parse.c"
12898 break;
12899
12900 case 120: /* mlhs_items_mlhs_item: mlhs_items_mlhs_item ',' mlhs_item */
12901#line 3036 "parse.y"
12902 {
12903 (yyval.node) = list_append(p, (yyvsp[-2].node), (yyvsp[0].node));
12904 /*% ripper: mlhs_add!($:1, $:3) %*/
12905 }
12906#line 12907 "parse.c"
12907 break;
12908
12909 case 121: /* mlhs_basic: mlhs_head "*" mlhs_node ',' mlhs_items_mlhs_item */
12910#line 3684 "parse.y"
12911 {
12912 (yyval.node_masgn) = NEW_MASGN((yyvsp[-4].node), NEW_POSTARG((yyvsp[-2].node),(yyvsp[0].node),&(yyloc)), &(yyloc));
12913 /*% ripper: mlhs_add_post!(mlhs_add_star!($:1, $:3), $:5) %*/
12914 }
12915#line 12916 "parse.c"
12916 break;
12917
12918 case 122: /* mlhs_basic: mlhs_head "*" */
12919#line 3689 "parse.y"
12920 {
12921 (yyval.node_masgn) = NEW_MASGN((yyvsp[-1].node), NODE_SPECIAL_NO_NAME_REST, &(yyloc));
12922 /*% ripper: mlhs_add_star!($:1, Qnil) %*/
12923 }
12924#line 12925 "parse.c"
12925 break;
12926
12927 case 123: /* mlhs_basic: mlhs_head "*" ',' mlhs_items_mlhs_item */
12928#line 3694 "parse.y"
12929 {
12930 (yyval.node_masgn) = NEW_MASGN((yyvsp[-3].node), NEW_POSTARG(NODE_SPECIAL_NO_NAME_REST, (yyvsp[0].node), &(yyloc)), &(yyloc));
12931 /*% ripper: mlhs_add_post!(mlhs_add_star!($:1, Qnil), $:4) %*/
12932 }
12933#line 12934 "parse.c"
12934 break;
12935
12936 case 124: /* mlhs_basic: "*" mlhs_node */
12937#line 3699 "parse.y"
12938 {
12939 (yyval.node_masgn) = NEW_MASGN(0, (yyvsp[0].node), &(yyloc));
12940 /*% ripper: mlhs_add_star!(mlhs_new!, $:2) %*/
12941 }
12942#line 12943 "parse.c"
12943 break;
12944
12945 case 125: /* mlhs_basic: "*" mlhs_node ',' mlhs_items_mlhs_item */
12946#line 3704 "parse.y"
12947 {
12948 (yyval.node_masgn) = NEW_MASGN(0, NEW_POSTARG((yyvsp[-2].node),(yyvsp[0].node),&(yyloc)), &(yyloc));
12949 /*% ripper: mlhs_add_post!(mlhs_add_star!(mlhs_new!, $:2), $:4) %*/
12950 }
12951#line 12952 "parse.c"
12952 break;
12953
12954 case 126: /* mlhs_basic: "*" */
12955#line 3709 "parse.y"
12956 {
12957 (yyval.node_masgn) = NEW_MASGN(0, NODE_SPECIAL_NO_NAME_REST, &(yyloc));
12958 /*% ripper: mlhs_add_star!(mlhs_new!, Qnil) %*/
12959 }
12960#line 12961 "parse.c"
12961 break;
12962
12963 case 127: /* mlhs_basic: "*" ',' mlhs_items_mlhs_item */
12964#line 3714 "parse.y"
12965 {
12966 (yyval.node_masgn) = NEW_MASGN(0, NEW_POSTARG(NODE_SPECIAL_NO_NAME_REST, (yyvsp[0].node), &(yyloc)), &(yyloc));
12967 /*% ripper: mlhs_add_post!(mlhs_add_star!(mlhs_new!, Qnil), $:3) %*/
12968 }
12969#line 12970 "parse.c"
12970 break;
12971
12972 case 129: /* mlhs_item: "(" mlhs_inner rparen */
12973#line 3722 "parse.y"
12974 {
12975 (yyval.node) = (NODE *)(yyvsp[-1].node_masgn);
12976 /*% ripper: mlhs_paren!($:2) %*/
12977 }
12978#line 12979 "parse.c"
12979 break;
12980
12981 case 130: /* mlhs_head: mlhs_item ',' */
12982#line 3729 "parse.y"
12983 {
12984 (yyval.node) = NEW_LIST((yyvsp[-1].node), &(yylsp[-1]));
12985 /*% ripper: mlhs_add!(mlhs_new!, $:1) %*/
12986 }
12987#line 12988 "parse.c"
12988 break;
12989
12990 case 131: /* mlhs_head: mlhs_head mlhs_item ',' */
12991#line 3734 "parse.y"
12992 {
12993 (yyval.node) = list_append(p, (yyvsp[-2].node), (yyvsp[-1].node));
12994 /*% ripper: mlhs_add!($:1, $:2) %*/
12995 }
12996#line 12997 "parse.c"
12997 break;
12998
12999 case 132: /* mlhs_node: user_variable */
13000#line 3742 "parse.y"
13001 {
13002 /*% ripper: var_field!($:1) %*/
13003 (yyval.node) = assignable(p, (yyvsp[0].id), 0, &(yyloc));
13004 }
13005#line 13006 "parse.c"
13006 break;
13007
13008 case 133: /* mlhs_node: keyword_variable */
13009#line 3742 "parse.y"
13010 {
13011 /*% ripper: var_field!($:1) %*/
13012 (yyval.node) = assignable(p, (yyvsp[0].id), 0, &(yyloc));
13013 }
13014#line 13015 "parse.c"
13015 break;
13016
13017 case 134: /* mlhs_node: primary_value '[' opt_call_args rbracket */
13018#line 3747 "parse.y"
13019 {
13020 (yyval.node) = aryset(p, (yyvsp[-3].node), (yyvsp[-1].node), &(yyloc));
13021 /*% ripper: aref_field!($:1, $:3) %*/
13022 }
13023#line 13024 "parse.c"
13024 break;
13025
13026 case 135: /* mlhs_node: primary_value call_op "local variable or method" */
13027#line 3752 "parse.y"
13028 {
13029 anddot_multiple_assignment_check(p, &(yylsp[-1]), (yyvsp[-1].id));
13030 (yyval.node) = attrset(p, (yyvsp[-2].node), (yyvsp[-1].id), (yyvsp[0].id), &(yyloc));
13031 /*% ripper: field!($:1, $:2, $:3) %*/
13032 }
13033#line 13034 "parse.c"
13034 break;
13035
13036 case 136: /* mlhs_node: primary_value call_op "constant" */
13037#line 3752 "parse.y"
13038 {
13039 anddot_multiple_assignment_check(p, &(yylsp[-1]), (yyvsp[-1].id));
13040 (yyval.node) = attrset(p, (yyvsp[-2].node), (yyvsp[-1].id), (yyvsp[0].id), &(yyloc));
13041 /*% ripper: field!($:1, $:2, $:3) %*/
13042 }
13043#line 13044 "parse.c"
13044 break;
13045
13046 case 137: /* mlhs_node: primary_value "::" "local variable or method" */
13047#line 3758 "parse.y"
13048 {
13049 (yyval.node) = attrset(p, (yyvsp[-2].node), idCOLON2, (yyvsp[0].id), &(yyloc));
13050 /*% ripper: const_path_field!($:1, $:3) %*/
13051 }
13052#line 13053 "parse.c"
13053 break;
13054
13055 case 138: /* mlhs_node: primary_value "::" "constant" */
13056#line 3763 "parse.y"
13057 {
13058 /*% ripper: const_path_field!($:1, $:3) %*/
13059 (yyval.node) = const_decl(p, NEW_COLON2((yyvsp[-2].node), (yyvsp[0].id), &(yyloc), &(yylsp[-1]), &(yylsp[0])), &(yyloc));
13060 }
13061#line 13062 "parse.c"
13062 break;
13063
13064 case 139: /* mlhs_node: ":: at EXPR_BEG" "constant" */
13065#line 3768 "parse.y"
13066 {
13067 /*% ripper: top_const_field!($:2) %*/
13068 (yyval.node) = const_decl(p, NEW_COLON3((yyvsp[0].id), &(yyloc), &(yylsp[-1]), &(yylsp[0])), &(yyloc));
13069 }
13070#line 13071 "parse.c"
13071 break;
13072
13073 case 140: /* mlhs_node: backref */
13074#line 3773 "parse.y"
13075 {
13076 VALUE MAYBE_UNUSED(e) = rb_backref_error(p, (yyvsp[0].node));
13077 (yyval.node) = NEW_ERROR(&(yyloc));
13078 /*% ripper[error]: assign_error!(?e, var_field!($:1)) %*/
13079 }
13080#line 13081 "parse.c"
13081 break;
13082
13083 case 141: /* lhs: user_variable */
13084#line 3781 "parse.y"
13085 {
13086 /*% ripper: var_field!($:1) %*/
13087 (yyval.node) = assignable(p, (yyvsp[0].id), 0, &(yyloc));
13088 }
13089#line 13090 "parse.c"
13090 break;
13091
13092 case 142: /* lhs: keyword_variable */
13093#line 3781 "parse.y"
13094 {
13095 /*% ripper: var_field!($:1) %*/
13096 (yyval.node) = assignable(p, (yyvsp[0].id), 0, &(yyloc));
13097 }
13098#line 13099 "parse.c"
13099 break;
13100
13101 case 143: /* lhs: primary_value '[' opt_call_args rbracket */
13102#line 3786 "parse.y"
13103 {
13104 (yyval.node) = aryset(p, (yyvsp[-3].node), (yyvsp[-1].node), &(yyloc));
13105 /*% ripper: aref_field!($:1, $:3) %*/
13106 }
13107#line 13108 "parse.c"
13108 break;
13109
13110 case 144: /* lhs: primary_value call_op "local variable or method" */
13111#line 3791 "parse.y"
13112 {
13113 (yyval.node) = attrset(p, (yyvsp[-2].node), (yyvsp[-1].id), (yyvsp[0].id), &(yyloc));
13114 /*% ripper: field!($:1, $:2, $:3) %*/
13115 }
13116#line 13117 "parse.c"
13117 break;
13118
13119 case 145: /* lhs: primary_value call_op "constant" */
13120#line 3791 "parse.y"
13121 {
13122 (yyval.node) = attrset(p, (yyvsp[-2].node), (yyvsp[-1].id), (yyvsp[0].id), &(yyloc));
13123 /*% ripper: field!($:1, $:2, $:3) %*/
13124 }
13125#line 13126 "parse.c"
13126 break;
13127
13128 case 146: /* lhs: primary_value "::" "local variable or method" */
13129#line 3796 "parse.y"
13130 {
13131 (yyval.node) = attrset(p, (yyvsp[-2].node), idCOLON2, (yyvsp[0].id), &(yyloc));
13132 /*% ripper: field!($:1, $:2, $:3) %*/
13133 }
13134#line 13135 "parse.c"
13135 break;
13136
13137 case 147: /* lhs: primary_value "::" "constant" */
13138#line 3801 "parse.y"
13139 {
13140 /*% ripper: const_path_field!($:1, $:3) %*/
13141 (yyval.node) = const_decl(p, NEW_COLON2((yyvsp[-2].node), (yyvsp[0].id), &(yyloc), &(yylsp[-1]), &(yylsp[0])), &(yyloc));
13142 }
13143#line 13144 "parse.c"
13144 break;
13145
13146 case 148: /* lhs: ":: at EXPR_BEG" "constant" */
13147#line 3806 "parse.y"
13148 {
13149 /*% ripper: top_const_field!($:2) %*/
13150 (yyval.node) = const_decl(p, NEW_COLON3((yyvsp[0].id), &(yyloc), &(yylsp[-1]), &(yylsp[0])), &(yyloc));
13151 }
13152#line 13153 "parse.c"
13153 break;
13154
13155 case 149: /* lhs: backref */
13156#line 3811 "parse.y"
13157 {
13158 VALUE MAYBE_UNUSED(e) = rb_backref_error(p, (yyvsp[0].node));
13159 (yyval.node) = NEW_ERROR(&(yyloc));
13160 /*% ripper[error]: assign_error!(?e, var_field!($:1)) %*/
13161 }
13162#line 13163 "parse.c"
13163 break;
13164
13165 case 150: /* cname: "local variable or method" */
13166#line 3819 "parse.y"
13167 {
13168 static const char mesg[] = "class/module name must be CONSTANT";
13169 /*%%%*/
13170 yyerror1(&(yylsp[0]), mesg);
13171 /*% %*/
13172 /*% ripper[error]: class_name_error!(ERR_MESG(), $:1) %*/
13173 }
13174#line 13175 "parse.c"
13175 break;
13176
13177 case 152: /* cpath: ":: at EXPR_BEG" cname */
13178#line 3830 "parse.y"
13179 {
13180 (yyval.node) = NEW_COLON3((yyvsp[0].id), &(yyloc), &(yylsp[-1]), &(yylsp[0]));
13181 /*% ripper: top_const_ref!($:2) %*/
13182 }
13183#line 13184 "parse.c"
13184 break;
13185
13186 case 153: /* cpath: cname */
13187#line 3835 "parse.y"
13188 {
13189 (yyval.node) = NEW_COLON2(0, (yyvsp[0].id), &(yyloc), &NULL_LOC, &(yylsp[0]));
13190 /*% ripper: const_ref!($:1) %*/
13191 }
13192#line 13193 "parse.c"
13193 break;
13194
13195 case 154: /* cpath: primary_value "::" cname */
13196#line 3840 "parse.y"
13197 {
13198 (yyval.node) = NEW_COLON2((yyvsp[-2].node), (yyvsp[0].id), &(yyloc), &(yylsp[-1]), &(yylsp[0]));
13199 /*% ripper: const_path_ref!($:1, $:3) %*/
13200 }
13201#line 13202 "parse.c"
13202 break;
13203
13204 case 158: /* fname: op */
13205#line 3848 "parse.y"
13206 {
13207 SET_LEX_STATE(EXPR_ENDFN);
13208 (yyval.id) = (yyvsp[0].id);
13209 }
13210#line 13211 "parse.c"
13211 break;
13212
13213 case 160: /* fitem: fname */
13214#line 3856 "parse.y"
13215 {
13216 (yyval.node) = NEW_SYM(rb_id2str((yyvsp[0].id)), &(yyloc));
13217 /*% ripper: symbol_literal!($:1) %*/
13218 }
13219#line 13220 "parse.c"
13220 break;
13221
13222 case 162: /* undef_list: fitem */
13223#line 3864 "parse.y"
13224 {
13225 (yyval.node) = NEW_UNDEF((yyvsp[0].node), &(yyloc));
13226 /*% ripper: rb_ary_new3(1, $:1) %*/
13227 }
13228#line 13229 "parse.c"
13229 break;
13230
13231 case 163: /* $@12: %empty */
13232#line 3868 "parse.y"
13233 {SET_LEX_STATE(EXPR_FNAME|EXPR_FITEM);}
13234#line 13235 "parse.c"
13235 break;
13236
13237 case 164: /* undef_list: undef_list ',' $@12 fitem */
13238#line 3869 "parse.y"
13239 {
13240 nd_set_last_loc((yyvsp[-3].node), (yylsp[0]).end_pos);
13241 rb_parser_ary_push_node(p, RNODE_UNDEF((yyvsp[-3].node))->nd_undefs, (yyvsp[0].node));
13242 /*% ripper: rb_ary_push($:1, $:4) %*/
13243 }
13244#line 13245 "parse.c"
13245 break;
13246
13247 case 165: /* op: '|' */
13248#line 3876 "parse.y"
13249 { (yyval.id) = '|'; }
13250#line 13251 "parse.c"
13251 break;
13252
13253 case 166: /* op: '^' */
13254#line 3877 "parse.y"
13255 { (yyval.id) = '^'; }
13256#line 13257 "parse.c"
13257 break;
13258
13259 case 167: /* op: '&' */
13260#line 3878 "parse.y"
13261 { (yyval.id) = '&'; }
13262#line 13263 "parse.c"
13263 break;
13264
13265 case 168: /* op: "<=>" */
13266#line 3879 "parse.y"
13267 { (yyval.id) = tCMP; }
13268#line 13269 "parse.c"
13269 break;
13270
13271 case 169: /* op: "==" */
13272#line 3880 "parse.y"
13273 { (yyval.id) = tEQ; }
13274#line 13275 "parse.c"
13275 break;
13276
13277 case 170: /* op: "===" */
13278#line 3881 "parse.y"
13279 { (yyval.id) = tEQQ; }
13280#line 13281 "parse.c"
13281 break;
13282
13283 case 171: /* op: "=~" */
13284#line 3882 "parse.y"
13285 { (yyval.id) = tMATCH; }
13286#line 13287 "parse.c"
13287 break;
13288
13289 case 172: /* op: "!~" */
13290#line 3883 "parse.y"
13291 { (yyval.id) = tNMATCH; }
13292#line 13293 "parse.c"
13293 break;
13294
13295 case 173: /* op: '>' */
13296#line 3884 "parse.y"
13297 { (yyval.id) = '>'; }
13298#line 13299 "parse.c"
13299 break;
13300
13301 case 174: /* op: ">=" */
13302#line 3885 "parse.y"
13303 { (yyval.id) = tGEQ; }
13304#line 13305 "parse.c"
13305 break;
13306
13307 case 175: /* op: '<' */
13308#line 3886 "parse.y"
13309 { (yyval.id) = '<'; }
13310#line 13311 "parse.c"
13311 break;
13312
13313 case 176: /* op: "<=" */
13314#line 3887 "parse.y"
13315 { (yyval.id) = tLEQ; }
13316#line 13317 "parse.c"
13317 break;
13318
13319 case 177: /* op: "!=" */
13320#line 3888 "parse.y"
13321 { (yyval.id) = tNEQ; }
13322#line 13323 "parse.c"
13323 break;
13324
13325 case 178: /* op: "<<" */
13326#line 3889 "parse.y"
13327 { (yyval.id) = tLSHFT; }
13328#line 13329 "parse.c"
13329 break;
13330
13331 case 179: /* op: ">>" */
13332#line 3890 "parse.y"
13333 { (yyval.id) = tRSHFT; }
13334#line 13335 "parse.c"
13335 break;
13336
13337 case 180: /* op: '+' */
13338#line 3891 "parse.y"
13339 { (yyval.id) = '+'; }
13340#line 13341 "parse.c"
13341 break;
13342
13343 case 181: /* op: '-' */
13344#line 3892 "parse.y"
13345 { (yyval.id) = '-'; }
13346#line 13347 "parse.c"
13347 break;
13348
13349 case 182: /* op: '*' */
13350#line 3893 "parse.y"
13351 { (yyval.id) = '*'; }
13352#line 13353 "parse.c"
13353 break;
13354
13355 case 183: /* op: "*" */
13356#line 3894 "parse.y"
13357 { (yyval.id) = '*'; }
13358#line 13359 "parse.c"
13359 break;
13360
13361 case 184: /* op: '/' */
13362#line 3895 "parse.y"
13363 { (yyval.id) = '/'; }
13364#line 13365 "parse.c"
13365 break;
13366
13367 case 185: /* op: '%' */
13368#line 3896 "parse.y"
13369 { (yyval.id) = '%'; }
13370#line 13371 "parse.c"
13371 break;
13372
13373 case 186: /* op: "**" */
13374#line 3897 "parse.y"
13375 { (yyval.id) = tPOW; }
13376#line 13377 "parse.c"
13377 break;
13378
13379 case 187: /* op: "**arg" */
13380#line 3898 "parse.y"
13381 { (yyval.id) = tDSTAR; }
13382#line 13383 "parse.c"
13383 break;
13384
13385 case 188: /* op: '!' */
13386#line 3899 "parse.y"
13387 { (yyval.id) = '!'; }
13388#line 13389 "parse.c"
13389 break;
13390
13391 case 189: /* op: '~' */
13392#line 3900 "parse.y"
13393 { (yyval.id) = '~'; }
13394#line 13395 "parse.c"
13395 break;
13396
13397 case 190: /* op: "unary+" */
13398#line 3901 "parse.y"
13399 { (yyval.id) = tUPLUS; }
13400#line 13401 "parse.c"
13401 break;
13402
13403 case 191: /* op: "unary-" */
13404#line 3902 "parse.y"
13405 { (yyval.id) = tUMINUS; }
13406#line 13407 "parse.c"
13407 break;
13408
13409 case 192: /* op: "[]" */
13410#line 3903 "parse.y"
13411 { (yyval.id) = tAREF; }
13412#line 13413 "parse.c"
13413 break;
13414
13415 case 193: /* op: "[]=" */
13416#line 3904 "parse.y"
13417 { (yyval.id) = tASET; }
13418#line 13419 "parse.c"
13419 break;
13420
13421 case 194: /* op: '`' */
13422#line 3905 "parse.y"
13423 { (yyval.id) = '`'; }
13424#line 13425 "parse.c"
13425 break;
13426
13427 case 236: /* asgn_arg_rhs: lhs '=' lex_ctxt arg_rhs */
13428#line 2919 "parse.y"
13429 {
13430 (yyval.node) = node_assign(p, (NODE *)(yyvsp[-3].node), (yyvsp[0].node), (yyvsp[-1].ctxt), &(yyloc));
13431 /*% ripper: assign!($:1, $:4) %*/
13432 }
13433#line 13434 "parse.c"
13434 break;
13435
13436 case 238: /* op_asgn_arg_rhs: var_lhs "operator-assignment" lex_ctxt arg_rhs */
13437#line 3044 "parse.y"
13438 {
13439 (yyval.node) = new_op_assign(p, (yyvsp[-3].node), (yyvsp[-2].id), (yyvsp[0].node), (yyvsp[-1].ctxt), &(yyloc));
13440 /*% ripper: opassign!($:1, $:2, $:4) %*/
13441 }
13442#line 13443 "parse.c"
13443 break;
13444
13445 case 239: /* op_asgn_arg_rhs: primary_value '[' opt_call_args rbracket "operator-assignment" lex_ctxt arg_rhs */
13446#line 3049 "parse.y"
13447 {
13448 (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]));
13449 /*% ripper: opassign!(aref_field!($:1, $:3), $:5, $:7) %*/
13450 }
13451#line 13452 "parse.c"
13452 break;
13453
13454 case 240: /* op_asgn_arg_rhs: primary_value call_op "local variable or method" "operator-assignment" lex_ctxt arg_rhs */
13455#line 3054 "parse.y"
13456 {
13457 (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]));
13458 /*% ripper: opassign!(field!($:1, $:2, $:3), $:4, $:6) %*/
13459 }
13460#line 13461 "parse.c"
13461 break;
13462
13463 case 241: /* op_asgn_arg_rhs: primary_value call_op "constant" "operator-assignment" lex_ctxt arg_rhs */
13464#line 3059 "parse.y"
13465 {
13466 (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]));
13467 /*% ripper: opassign!(field!($:1, $:2, $:3), $:4, $:6) %*/
13468 }
13469#line 13470 "parse.c"
13470 break;
13471
13472 case 242: /* op_asgn_arg_rhs: primary_value "::" "local variable or method" "operator-assignment" lex_ctxt arg_rhs */
13473#line 3064 "parse.y"
13474 {
13475 (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]));
13476 /*% ripper: opassign!(field!($:1, $:2, $:3), $:4, $:6) %*/
13477 }
13478#line 13479 "parse.c"
13479 break;
13480
13481 case 243: /* op_asgn_arg_rhs: primary_value "::" "constant" "operator-assignment" lex_ctxt arg_rhs */
13482#line 3069 "parse.y"
13483 {
13484 YYLTYPE loc = code_loc_gen(&(yylsp[-5]), &(yylsp[-3]));
13485 (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));
13486 /*% ripper: opassign!(const_path_field!($:1, $:3), $:4, $:6) %*/
13487 }
13488#line 13489 "parse.c"
13489 break;
13490
13491 case 244: /* op_asgn_arg_rhs: ":: at EXPR_BEG" "constant" "operator-assignment" lex_ctxt arg_rhs */
13492#line 3075 "parse.y"
13493 {
13494 YYLTYPE loc = code_loc_gen(&(yylsp[-4]), &(yylsp[-3]));
13495 (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));
13496 /*% ripper: opassign!(top_const_field!($:2), $:3, $:5) %*/
13497 }
13498#line 13499 "parse.c"
13499 break;
13500
13501 case 245: /* op_asgn_arg_rhs: backref "operator-assignment" lex_ctxt arg_rhs */
13502#line 3081 "parse.y"
13503 {
13504 VALUE MAYBE_UNUSED(e) = rb_backref_error(p, (yyvsp[-3].node));
13505 (yyval.node) = NEW_ERROR(&(yyloc));
13506 /*% ripper[error]: assign_error!(?e, opassign!(var_field!($:1), $:2, $:4)) %*/
13507 }
13508#line 13509 "parse.c"
13509 break;
13510
13511 case 247: /* range_expr_arg: arg ".." arg */
13512#line 3103 "parse.y"
13513 {
13514 value_expr(p, (yyvsp[-2].node));
13515 value_expr(p, (yyvsp[0].node));
13516 (yyval.node) = NEW_DOT2((yyvsp[-2].node), (yyvsp[0].node), &(yyloc), &(yylsp[-1]));
13517 /*% ripper: dot2!($:1, $:3) %*/
13518 }
13519#line 13520 "parse.c"
13520 break;
13521
13522 case 248: /* range_expr_arg: arg "..." arg */
13523#line 3110 "parse.y"
13524 {
13525 value_expr(p, (yyvsp[-2].node));
13526 value_expr(p, (yyvsp[0].node));
13527 (yyval.node) = NEW_DOT3((yyvsp[-2].node), (yyvsp[0].node), &(yyloc), &(yylsp[-1]));
13528 /*% ripper: dot3!($:1, $:3) %*/
13529 }
13530#line 13531 "parse.c"
13531 break;
13532
13533 case 249: /* range_expr_arg: arg ".." */
13534#line 3117 "parse.y"
13535 {
13536 value_expr(p, (yyvsp[-1].node));
13537 (yyval.node) = NEW_DOT2((yyvsp[-1].node), new_nil_at(p, &(yylsp[0]).end_pos), &(yyloc), &(yylsp[0]));
13538 /*% ripper: dot2!($:1, Qnil) %*/
13539 }
13540#line 13541 "parse.c"
13541 break;
13542
13543 case 250: /* range_expr_arg: arg "..." */
13544#line 3123 "parse.y"
13545 {
13546 value_expr(p, (yyvsp[-1].node));
13547 (yyval.node) = NEW_DOT3((yyvsp[-1].node), new_nil_at(p, &(yylsp[0]).end_pos), &(yyloc), &(yylsp[0]));
13548 /*% ripper: dot3!($:1, Qnil) %*/
13549 }
13550#line 13551 "parse.c"
13551 break;
13552
13553 case 251: /* range_expr_arg: "(.." arg */
13554#line 3129 "parse.y"
13555 {
13556 value_expr(p, (yyvsp[0].node));
13557 (yyval.node) = NEW_DOT2(new_nil_at(p, &(yylsp[-1]).beg_pos), (yyvsp[0].node), &(yyloc), &(yylsp[-1]));
13558 /*% ripper: dot2!(Qnil, $:2) %*/
13559 }
13560#line 13561 "parse.c"
13561 break;
13562
13563 case 252: /* range_expr_arg: "(..." arg */
13564#line 3135 "parse.y"
13565 {
13566 value_expr(p, (yyvsp[0].node));
13567 (yyval.node) = NEW_DOT3(new_nil_at(p, &(yylsp[-1]).beg_pos), (yyvsp[0].node), &(yyloc), &(yylsp[-1]));
13568 /*% ripper: dot3!(Qnil, $:2) %*/
13569 }
13570#line 13571 "parse.c"
13571 break;
13572
13573 case 254: /* arg: arg '+' arg */
13574#line 3926 "parse.y"
13575 {
13576 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), '+', (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
13577 /*% ripper: binary!($:1, ID2VAL('\'+\''), $:3) %*/
13578 }
13579#line 13580 "parse.c"
13580 break;
13581
13582 case 255: /* arg: arg '-' arg */
13583#line 3931 "parse.y"
13584 {
13585 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), '-', (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
13586 /*% ripper: binary!($:1, ID2VAL('\'-\''), $:3) %*/
13587 }
13588#line 13589 "parse.c"
13589 break;
13590
13591 case 256: /* arg: arg '*' arg */
13592#line 3936 "parse.y"
13593 {
13594 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), '*', (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
13595 /*% ripper: binary!($:1, ID2VAL('\'*\''), $:3) %*/
13596 }
13597#line 13598 "parse.c"
13598 break;
13599
13600 case 257: /* arg: arg '/' arg */
13601#line 3941 "parse.y"
13602 {
13603 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), '/', (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
13604 /*% ripper: binary!($:1, ID2VAL('\'/\''), $:3) %*/
13605 }
13606#line 13607 "parse.c"
13607 break;
13608
13609 case 258: /* arg: arg '%' arg */
13610#line 3946 "parse.y"
13611 {
13612 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), '%', (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
13613 /*% ripper: binary!($:1, ID2VAL('\'%\''), $:3) %*/
13614 }
13615#line 13616 "parse.c"
13616 break;
13617
13618 case 259: /* arg: arg "**" arg */
13619#line 3951 "parse.y"
13620 {
13621 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), idPow, (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
13622 /*% ripper: binary!($:1, ID2VAL(idPow), $:3) %*/
13623 }
13624#line 13625 "parse.c"
13625 break;
13626
13627 case 260: /* arg: tUMINUS_NUM simple_numeric "**" arg */
13628#line 3956 "parse.y"
13629 {
13630 (yyval.node) = call_uni_op(p, call_bin_op(p, (yyvsp[-2].node), idPow, (yyvsp[0].node), &(yylsp[-2]), &(yyloc)), idUMinus, &(yylsp[-3]), &(yyloc));
13631 /*% ripper: unary!(ID2VAL(idUMinus), binary!($:2, ID2VAL(idPow), $:4)) %*/
13632 }
13633#line 13634 "parse.c"
13634 break;
13635
13636 case 261: /* arg: "unary+" arg */
13637#line 3961 "parse.y"
13638 {
13639 (yyval.node) = call_uni_op(p, (yyvsp[0].node), idUPlus, &(yylsp[-1]), &(yyloc));
13640 /*% ripper: unary!(ID2VAL(idUPlus), $:2) %*/
13641 }
13642#line 13643 "parse.c"
13643 break;
13644
13645 case 262: /* arg: "unary-" arg */
13646#line 3966 "parse.y"
13647 {
13648 (yyval.node) = call_uni_op(p, (yyvsp[0].node), idUMinus, &(yylsp[-1]), &(yyloc));
13649 /*% ripper: unary!(ID2VAL(idUMinus), $:2) %*/
13650 }
13651#line 13652 "parse.c"
13652 break;
13653
13654 case 263: /* arg: arg '|' arg */
13655#line 3971 "parse.y"
13656 {
13657 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), '|', (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
13658 /*% ripper: binary!($:1, ID2VAL('\'|\''), $:3) %*/
13659 }
13660#line 13661 "parse.c"
13661 break;
13662
13663 case 264: /* arg: arg '^' arg */
13664#line 3976 "parse.y"
13665 {
13666 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), '^', (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
13667 /*% ripper: binary!($:1, ID2VAL('\'^\''), $:3) %*/
13668 }
13669#line 13670 "parse.c"
13670 break;
13671
13672 case 265: /* arg: arg '&' arg */
13673#line 3981 "parse.y"
13674 {
13675 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), '&', (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
13676 /*% ripper: binary!($:1, ID2VAL('\'&\''), $:3) %*/
13677 }
13678#line 13679 "parse.c"
13679 break;
13680
13681 case 266: /* arg: arg "<=>" arg */
13682#line 3986 "parse.y"
13683 {
13684 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), idCmp, (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
13685 /*% ripper: binary!($:1, ID2VAL(idCmp), $:3) %*/
13686 }
13687#line 13688 "parse.c"
13688 break;
13689
13690 case 268: /* arg: arg "==" arg */
13691#line 3992 "parse.y"
13692 {
13693 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), idEq, (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
13694 /*% ripper: binary!($:1, ID2VAL(idEq), $:3) %*/
13695 }
13696#line 13697 "parse.c"
13697 break;
13698
13699 case 269: /* arg: arg "===" arg */
13700#line 3997 "parse.y"
13701 {
13702 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), idEqq, (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
13703 /*% ripper: binary!($:1, ID2VAL(idEqq), $:3) %*/
13704 }
13705#line 13706 "parse.c"
13706 break;
13707
13708 case 270: /* arg: arg "!=" arg */
13709#line 4002 "parse.y"
13710 {
13711 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), idNeq, (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
13712 /*% ripper: binary!($:1, ID2VAL(idNeq), $:3) %*/
13713 }
13714#line 13715 "parse.c"
13715 break;
13716
13717 case 271: /* arg: arg "=~" arg */
13718#line 4007 "parse.y"
13719 {
13720 (yyval.node) = match_op(p, (yyvsp[-2].node), (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
13721 /*% ripper: binary!($:1, ID2VAL(idEqTilde), $:3) %*/
13722 }
13723#line 13724 "parse.c"
13724 break;
13725
13726 case 272: /* arg: arg "!~" arg */
13727#line 4012 "parse.y"
13728 {
13729 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), idNeqTilde, (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
13730 /*% ripper: binary!($:1, ID2VAL(idNeqTilde), $:3) %*/
13731 }
13732#line 13733 "parse.c"
13733 break;
13734
13735 case 273: /* arg: '!' arg */
13736#line 4017 "parse.y"
13737 {
13738 (yyval.node) = call_uni_op(p, method_cond(p, (yyvsp[0].node), &(yylsp[0])), '!', &(yylsp[-1]), &(yyloc));
13739 /*% ripper: unary!(ID2VAL('\'!\''), $:2) %*/
13740 }
13741#line 13742 "parse.c"
13742 break;
13743
13744 case 274: /* arg: '~' arg */
13745#line 4022 "parse.y"
13746 {
13747 (yyval.node) = call_uni_op(p, (yyvsp[0].node), '~', &(yylsp[-1]), &(yyloc));
13748 /*% ripper: unary!(ID2VAL('\'~\''), $:2) %*/
13749 }
13750#line 13751 "parse.c"
13751 break;
13752
13753 case 275: /* arg: arg "<<" arg */
13754#line 4027 "parse.y"
13755 {
13756 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), idLTLT, (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
13757 /*% ripper: binary!($:1, ID2VAL(idLTLT), $:3) %*/
13758 }
13759#line 13760 "parse.c"
13760 break;
13761
13762 case 276: /* arg: arg ">>" arg */
13763#line 4032 "parse.y"
13764 {
13765 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), idGTGT, (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
13766 /*% ripper: binary!($:1, ID2VAL(idGTGT), $:3) %*/
13767 }
13768#line 13769 "parse.c"
13769 break;
13770
13771 case 277: /* arg: arg "&&" arg */
13772#line 4037 "parse.y"
13773 {
13774 (yyval.node) = logop(p, idANDOP, (yyvsp[-2].node), (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
13775 /*% ripper: binary!($:1, ID2VAL(idANDOP), $:3) %*/
13776 }
13777#line 13778 "parse.c"
13778 break;
13779
13780 case 278: /* arg: arg "||" arg */
13781#line 4042 "parse.y"
13782 {
13783 (yyval.node) = logop(p, idOROP, (yyvsp[-2].node), (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
13784 /*% ripper: binary!($:1, ID2VAL(idOROP), $:3) %*/
13785 }
13786#line 13787 "parse.c"
13787 break;
13788
13789 case 279: /* arg: "'defined?'" option_'\n' begin_defined arg */
13790#line 4047 "parse.y"
13791 {
13792 p->ctxt.in_defined = (yyvsp[-1].ctxt).in_defined;
13793 (yyval.node) = new_defined(p, (yyvsp[0].node), &(yyloc), &(yylsp[-3]));
13794 p->ctxt.has_trailing_semicolon = (yyvsp[-1].ctxt).has_trailing_semicolon;
13795 /*% ripper: defined!($:4) %*/
13796 }
13797#line 13798 "parse.c"
13798 break;
13799
13800 case 280: /* def_endless_method_endless_arg: defn_head f_opt_paren_args '=' endless_arg */
13801#line 2949 "parse.y"
13802 {
13803 endless_method_name(p, (yyvsp[-3].node_def_temp)->nd_mid, &(yylsp[-3]));
13804 restore_defun(p, (yyvsp[-3].node_def_temp));
13805 ((yyval.node) = (yyvsp[-3].node_def_temp)->nd_def)->nd_loc = (yyloc);
13806 (yyvsp[0].node) = new_scope_body(p, (yyvsp[-2].node_args), (yyvsp[0].node), (yyval.node), &(yyloc));
13807 RNODE_DEFN((yyval.node))->nd_defn = (yyvsp[0].node);
13808 /*% ripper: bodystmt!($:bodystmt, Qnil, Qnil, Qnil) %*/
13809 /*% ripper: def!($:head, $:args, $:$) %*/
13810 local_pop(p);
13811 }
13812#line 13813 "parse.c"
13813 break;
13814
13815 case 281: /* def_endless_method_endless_arg: defs_head f_opt_paren_args '=' endless_arg */
13816#line 2960 "parse.y"
13817 {
13818 endless_method_name(p, (yyvsp[-3].node_def_temp)->nd_mid, &(yylsp[-3]));
13819 restore_defun(p, (yyvsp[-3].node_def_temp));
13820 ((yyval.node) = (yyvsp[-3].node_def_temp)->nd_def)->nd_loc = (yyloc);
13821 (yyvsp[0].node) = new_scope_body(p, (yyvsp[-2].node_args), (yyvsp[0].node), (yyval.node), &(yyloc));
13822 RNODE_DEFS((yyval.node))->nd_defn = (yyvsp[0].node);
13823 /*% ripper: bodystmt!($:bodystmt, Qnil, Qnil, Qnil) %*/
13824 /*% ripper: defs!(*$:head[0..2], $:args, $:$) %*/
13825 local_pop(p);
13826 }
13827#line 13828 "parse.c"
13828 break;
13829
13830 case 285: /* ternary: arg '?' arg option_'\n' ':' arg */
13831#line 4059 "parse.y"
13832 {
13833 value_expr(p, (yyvsp[-5].node));
13834 (yyval.node) = new_if(p, (yyvsp[-5].node), (yyvsp[-3].node), (yyvsp[0].node), &(yyloc), &NULL_LOC, &(yylsp[-1]), &NULL_LOC);
13835 fixpos((yyval.node), (yyvsp[-5].node));
13836 /*% ripper: ifop!($:1, $:3, $:6) %*/
13837 }
13838#line 13839 "parse.c"
13839 break;
13840
13841 case 287: /* endless_arg: endless_arg "'rescue' modifier" after_rescue arg */
13842#line 4069 "parse.y"
13843 {
13844 p->ctxt.in_rescue = (yyvsp[-1].ctxt).in_rescue;
13845 (yyval.node) = rescued_expr(p, (yyvsp[-3].node), (yyvsp[0].node), &(yylsp[-3]), &(yylsp[-2]), &(yylsp[0]));
13846 /*% ripper: rescue_mod!($:1, $:4) %*/
13847 }
13848#line 13849 "parse.c"
13849 break;
13850
13851 case 288: /* endless_arg: "'not'" option_'\n' endless_arg */
13852#line 4075 "parse.y"
13853 {
13854 (yyval.node) = call_uni_op(p, method_cond(p, (yyvsp[0].node), &(yylsp[0])), METHOD_NOT, &(yylsp[-2]), &(yyloc));
13855 /*% ripper: unary!(ID2VAL(idNOT), $:3) %*/
13856 }
13857#line 13858 "parse.c"
13858 break;
13859
13860 case 289: /* relop: '>' */
13861#line 4081 "parse.y"
13862 {(yyval.id) = '>';}
13863#line 13864 "parse.c"
13864 break;
13865
13866 case 290: /* relop: '<' */
13867#line 4082 "parse.y"
13868 {(yyval.id) = '<';}
13869#line 13870 "parse.c"
13870 break;
13871
13872 case 291: /* relop: ">=" */
13873#line 4083 "parse.y"
13874 {(yyval.id) = idGE;}
13875#line 13876 "parse.c"
13876 break;
13877
13878 case 292: /* relop: "<=" */
13879#line 4084 "parse.y"
13880 {(yyval.id) = idLE;}
13881#line 13882 "parse.c"
13882 break;
13883
13884 case 293: /* rel_expr: arg relop arg */
13885#line 4088 "parse.y"
13886 {
13887 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), (yyvsp[-1].id), (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
13888 /*% ripper: binary!($:1, ID2VAL($2), $:3) %*/
13889 }
13890#line 13891 "parse.c"
13891 break;
13892
13893 case 294: /* rel_expr: rel_expr relop arg */
13894#line 4093 "parse.y"
13895 {
13896 rb_warning1("comparison '%s' after comparison", WARN_ID((yyvsp[-1].id)));
13897 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), (yyvsp[-1].id), (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
13898 /*% ripper: binary!($:1, ID2VAL($2), $:3) %*/
13899 }
13900#line 13901 "parse.c"
13901 break;
13902
13903 case 295: /* lex_ctxt: none */
13904#line 4101 "parse.y"
13905 {
13906 (yyval.ctxt) = p->ctxt;
13907 }
13908#line 13909 "parse.c"
13909 break;
13910
13911 case 296: /* begin_defined: lex_ctxt */
13912#line 4107 "parse.y"
13913 {
13914 p->ctxt.in_defined = 1;
13915 (yyval.ctxt) = (yyvsp[0].ctxt);
13916 }
13917#line 13918 "parse.c"
13918 break;
13919
13920 case 297: /* after_rescue: lex_ctxt */
13921#line 4114 "parse.y"
13922 {
13923 p->ctxt.in_rescue = after_rescue;
13924 (yyval.ctxt) = (yyvsp[0].ctxt);
13925 }
13926#line 13927 "parse.c"
13927 break;
13928
13929 case 298: /* value_expr_arg: arg */
13930#line 3144 "parse.y"
13931 {
13932 value_expr(p, (yyvsp[0].node));
13933 (yyval.node) = (yyvsp[0].node);
13934 }
13935#line 13936 "parse.c"
13936 break;
13937
13938 case 302: /* aref_args: args ',' assocs trailer */
13939#line 4126 "parse.y"
13940 {
13941 (yyval.node) = (yyvsp[-1].node) ? arg_append(p, (yyvsp[-3].node), new_hash(p, (yyvsp[-1].node), &(yylsp[-1])), &(yyloc)) : (yyvsp[-3].node);
13942 /*% ripper: args_add!($:1, bare_assoc_hash!($:3)) %*/
13943 }
13944#line 13945 "parse.c"
13945 break;
13946
13947 case 303: /* aref_args: assocs trailer */
13948#line 4131 "parse.y"
13949 {
13950 (yyval.node) = (yyvsp[-1].node) ? NEW_LIST(new_hash(p, (yyvsp[-1].node), &(yylsp[-1])), &(yyloc)) : 0;
13951 /*% ripper: args_add!(args_new!, bare_assoc_hash!($:1)) %*/
13952 }
13953#line 13954 "parse.c"
13954 break;
13955
13956 case 304: /* arg_rhs: arg */
13957#line 4138 "parse.y"
13958 {
13959 value_expr(p, (yyvsp[0].node));
13960 (yyval.node) = (yyvsp[0].node);
13961 }
13962#line 13963 "parse.c"
13963 break;
13964
13965 case 305: /* arg_rhs: arg "'rescue' modifier" after_rescue arg */
13966#line 4143 "parse.y"
13967 {
13968 p->ctxt.in_rescue = (yyvsp[-1].ctxt).in_rescue;
13969 value_expr(p, (yyvsp[-3].node));
13970 (yyval.node) = rescued_expr(p, (yyvsp[-3].node), (yyvsp[0].node), &(yylsp[-3]), &(yylsp[-2]), &(yylsp[0]));
13971 /*% ripper: rescue_mod!($:1, $:4) %*/
13972 }
13973#line 13974 "parse.c"
13974 break;
13975
13976 case 306: /* paren_args: '(' opt_call_args rparen */
13977#line 4152 "parse.y"
13978 {
13979 (yyval.node) = (yyvsp[-1].node);
13980 /*% ripper: arg_paren!($:2) %*/
13981 }
13982#line 13983 "parse.c"
13983 break;
13984
13985 case 307: /* paren_args: '(' args ',' args_forward rparen */
13986#line 4157 "parse.y"
13987 {
13988 if (!check_forwarding_args(p)) {
13989 (yyval.node) = 0;
13990 }
13991 else {
13992 (yyval.node) = new_args_forward_call(p, (yyvsp[-3].node), &(yylsp[-1]), &(yyloc));
13993 /*% ripper: arg_paren!(args_add!($:2, $:4)) %*/
13994 }
13995 }
13996#line 13997 "parse.c"
13997 break;
13998
13999 case 308: /* paren_args: '(' args_forward rparen */
14000#line 4167 "parse.y"
14001 {
14002 if (!check_forwarding_args(p)) {
14003 (yyval.node) = 0;
14004 }
14005 else {
14006 (yyval.node) = new_args_forward_call(p, 0, &(yylsp[-1]), &(yyloc));
14007 /*% ripper: arg_paren!($:2) %*/
14008 }
14009 }
14010#line 14011 "parse.c"
14011 break;
14012
14013 case 310: /* opt_paren_args: paren_args */
14014#line 4180 "parse.y"
14015 {
14016 (yyval.node) = (yyvsp[0].node) ? (yyvsp[0].node) : NODE_SPECIAL_EMPTY_ARGS;
14017 }
14018#line 14019 "parse.c"
14019 break;
14020
14021 case 314: /* opt_call_args: args ',' assocs ',' */
14022#line 4189 "parse.y"
14023 {
14024 (yyval.node) = (yyvsp[-1].node) ? arg_append(p, (yyvsp[-3].node), new_hash(p, (yyvsp[-1].node), &(yylsp[-1])), &(yyloc)) : (yyvsp[-3].node);
14025 /*% ripper: args_add!($:1, bare_assoc_hash!($:3)) %*/
14026 }
14027#line 14028 "parse.c"
14028 break;
14029
14030 case 315: /* opt_call_args: assocs ',' */
14031#line 4194 "parse.y"
14032 {
14033 (yyval.node) = (yyvsp[-1].node) ? NEW_LIST(new_hash(p, (yyvsp[-1].node), &(yylsp[-1])), &(yylsp[-1])) : 0;
14034 /*% ripper: args_add!(args_new!, bare_assoc_hash!($:1)) %*/
14035 }
14036#line 14037 "parse.c"
14037 break;
14038
14039 case 316: /* value_expr_command: command */
14040#line 3144 "parse.y"
14041 {
14042 value_expr(p, (yyvsp[0].node));
14043 (yyval.node) = (yyvsp[0].node);
14044 }
14045#line 14046 "parse.c"
14046 break;
14047
14048 case 317: /* call_args: value_expr_command */
14049#line 4201 "parse.y"
14050 {
14051 (yyval.node) = NEW_LIST((yyvsp[0].node), &(yyloc));
14052 /*% ripper: args_add!(args_new!, $:1) %*/
14053 }
14054#line 14055 "parse.c"
14055 break;
14056
14057 case 318: /* call_args: def_endless_method_endless_command */
14058#line 4206 "parse.y"
14059 {
14060 (yyval.node) = NEW_LIST((yyvsp[0].node), &(yyloc));
14061 /*% ripper: args_add!(args_new!, $:1) %*/
14062 }
14063#line 14064 "parse.c"
14064 break;
14065
14066 case 319: /* call_args: args opt_block_arg */
14067#line 4211 "parse.y"
14068 {
14069 (yyval.node) = arg_blk_pass((yyvsp[-1].node), (yyvsp[0].node_block_pass));
14070 /*% ripper: args_add_block!($:1, $:2) %*/
14071 }
14072#line 14073 "parse.c"
14073 break;
14074
14075 case 320: /* call_args: assocs opt_block_arg */
14076#line 4216 "parse.y"
14077 {
14078 (yyval.node) = (yyvsp[-1].node) ? NEW_LIST(new_hash(p, (yyvsp[-1].node), &(yylsp[-1])), &(yylsp[-1])) : 0;
14079 (yyval.node) = arg_blk_pass((yyval.node), (yyvsp[0].node_block_pass));
14080 /*% ripper: args_add_block!(args_add!(args_new!, bare_assoc_hash!($:1)), $:2) %*/
14081 }
14082#line 14083 "parse.c"
14083 break;
14084
14085 case 321: /* call_args: args ',' assocs opt_block_arg */
14086#line 4222 "parse.y"
14087 {
14088 (yyval.node) = (yyvsp[-1].node) ? arg_append(p, (yyvsp[-3].node), new_hash(p, (yyvsp[-1].node), &(yylsp[-1])), &(yyloc)) : (yyvsp[-3].node);
14089 (yyval.node) = arg_blk_pass((yyval.node), (yyvsp[0].node_block_pass));
14090 /*% ripper: args_add_block!(args_add!($:1, bare_assoc_hash!($:3)), $:4) %*/
14091 }
14092#line 14093 "parse.c"
14093 break;
14094
14095 case 323: /* $@13: %empty */
14096#line 4231 "parse.y"
14097 {
14098 /* If call_args starts with a open paren '(' or '[',
14099 * look-ahead reading of the letters calls CMDARG_PUSH(0),
14100 * but the push must be done after CMDARG_PUSH(1).
14101 * So this code makes them consistent by first cancelling
14102 * the premature CMDARG_PUSH(0), doing CMDARG_PUSH(1),
14103 * and finally redoing CMDARG_PUSH(0).
14104 */
14105 int lookahead = 0;
14106 switch (yychar) {
14107 case '(': case tLPAREN: case tLPAREN_ARG: case '[': case tLBRACK:
14108 lookahead = 1;
14109 }
14110 if (lookahead) CMDARG_POP();
14111 CMDARG_PUSH(1);
14112 if (lookahead) CMDARG_PUSH(0);
14113 }
14114#line 14115 "parse.c"
14115 break;
14116
14117 case 324: /* command_args: $@13 call_args */
14118#line 4249 "parse.y"
14119 {
14120 /* call_args can be followed by tLBRACE_ARG (that does CMDARG_PUSH(0) in the lexer)
14121 * but the push must be done after CMDARG_POP() in the parser.
14122 * So this code does CMDARG_POP() to pop 0 pushed by tLBRACE_ARG,
14123 * CMDARG_POP() to pop 1 pushed by command_args,
14124 * and CMDARG_PUSH(0) to restore back the flag set by tLBRACE_ARG.
14125 */
14126 int lookahead = 0;
14127 switch (yychar) {
14128 case tLBRACE_ARG:
14129 lookahead = 1;
14130 }
14131 if (lookahead) CMDARG_POP();
14132 CMDARG_POP();
14133 if (lookahead) CMDARG_PUSH(0);
14134 (yyval.node) = (yyvsp[0].node);
14135 /*% ripper: $:2 %*/
14136 }
14137#line 14138 "parse.c"
14138 break;
14139
14140 case 325: /* block_arg: "&" arg_value */
14141#line 4270 "parse.y"
14142 {
14143 (yyval.node_block_pass) = NEW_BLOCK_PASS((yyvsp[0].node), &(yyloc), &(yylsp[-1]));
14144 /*% ripper: $:2 %*/
14145 }
14146#line 14147 "parse.c"
14147 break;
14148
14149 case 326: /* block_arg: "&" */
14150#line 4275 "parse.y"
14151 {
14152 forwarding_arg_check(p, idFWD_BLOCK, idFWD_ALL, "block");
14153 (yyval.node_block_pass) = NEW_BLOCK_PASS(NEW_LVAR(idFWD_BLOCK, &(yylsp[0])), &(yyloc), &(yylsp[0]));
14154 /*% ripper: Qnil %*/
14155 }
14156#line 14157 "parse.c"
14157 break;
14158
14159 case 327: /* opt_block_arg: ',' block_arg */
14160#line 4283 "parse.y"
14161 {
14162 (yyval.node_block_pass) = (yyvsp[0].node_block_pass);
14163 /*% ripper: $:2 %*/
14164 }
14165#line 14166 "parse.c"
14166 break;
14167
14168 case 328: /* opt_block_arg: none */
14169#line 4288 "parse.y"
14170 {
14171 (yyval.node_block_pass) = 0;
14172 /*% ripper: Qfalse %*/
14173 }
14174#line 14175 "parse.c"
14175 break;
14176
14177 case 329: /* args: arg_value */
14178#line 4296 "parse.y"
14179 {
14180 (yyval.node) = NEW_LIST((yyvsp[0].node), &(yyloc));
14181 /*% ripper: args_add!(args_new!, $:arg_value) %*/
14182 }
14183#line 14184 "parse.c"
14184 break;
14185
14186 case 330: /* args: arg_splat */
14187#line 4301 "parse.y"
14188 {
14189 (yyval.node) = (yyvsp[0].node);
14190 /*% ripper: args_add_star!(args_new!, $:arg_splat) %*/
14191 }
14192#line 14193 "parse.c"
14193 break;
14194
14195 case 331: /* args: args ',' arg_value */
14196#line 4306 "parse.y"
14197 {
14198 (yyval.node) = last_arg_append(p, (yyvsp[-2].node), (yyvsp[0].node), &(yyloc));
14199 /*% ripper: args_add!($:non_last_args, $:arg_value) %*/
14200 }
14201#line 14202 "parse.c"
14202 break;
14203
14204 case 332: /* args: args ',' arg_splat */
14205#line 4311 "parse.y"
14206 {
14207 (yyval.node) = rest_arg_append(p, (yyvsp[-2].node), RNODE_SPLAT((yyvsp[0].node))->nd_head, &(yyloc));
14208 /*% ripper: args_add_star!($:non_last_args, $:arg_splat) %*/
14209 }
14210#line 14211 "parse.c"
14211 break;
14212
14213 case 333: /* arg_splat: "*" arg_value */
14214#line 4319 "parse.y"
14215 {
14216 (yyval.node) = NEW_SPLAT((yyvsp[0].node), &(yyloc), &(yylsp[-1]));
14217 /*% ripper: $:arg_value %*/
14218 }
14219#line 14220 "parse.c"
14220 break;
14221
14222 case 334: /* arg_splat: "*" */
14223#line 4324 "parse.y"
14224 {
14225 forwarding_arg_check(p, idFWD_REST, idFWD_ALL, "rest");
14226 (yyval.node) = NEW_SPLAT(NEW_LVAR(idFWD_REST, &(yylsp[0])), &(yyloc), &(yylsp[0]));
14227 /*% ripper: Qnil %*/
14228 }
14229#line 14230 "parse.c"
14230 break;
14231
14232 case 337: /* mrhs: args ',' arg_value */
14233#line 4338 "parse.y"
14234 {
14235 (yyval.node) = last_arg_append(p, (yyvsp[-2].node), (yyvsp[0].node), &(yyloc));
14236 /*% ripper: mrhs_add!(mrhs_new_from_args!($:args), $:arg_value) %*/
14237 }
14238#line 14239 "parse.c"
14239 break;
14240
14241 case 338: /* mrhs: args ',' "*" arg_value */
14242#line 4343 "parse.y"
14243 {
14244 (yyval.node) = rest_arg_append(p, (yyvsp[-3].node), (yyvsp[0].node), &(yyloc));
14245 /*% ripper: mrhs_add_star!(mrhs_new_from_args!($:args), $:arg_value) %*/
14246 }
14247#line 14248 "parse.c"
14248 break;
14249
14250 case 339: /* mrhs: "*" arg_value */
14251#line 4348 "parse.y"
14252 {
14253 (yyval.node) = NEW_SPLAT((yyvsp[0].node), &(yyloc), &(yylsp[-1]));
14254 /*% ripper: mrhs_add_star!(mrhs_new!, $:arg_value) %*/
14255 }
14256#line 14257 "parse.c"
14257 break;
14258
14259 case 350: /* primary: "method" */
14260#line 4369 "parse.y"
14261 {
14262 (yyval.node) = (NODE *)NEW_FCALL((yyvsp[0].id), 0, &(yyloc));
14263 /*% ripper: method_add_arg!(fcall!($:1), args_new!) %*/
14264 }
14265#line 14266 "parse.c"
14266 break;
14267
14268 case 351: /* $@14: %empty */
14269#line 4374 "parse.y"
14270 {
14271 CMDARG_PUSH(0);
14272 }
14273#line 14274 "parse.c"
14274 break;
14275
14276 case 352: /* primary: k_begin $@14 bodystmt k_end */
14277#line 4379 "parse.y"
14278 {
14279 CMDARG_POP();
14280 set_line_body((yyvsp[-1].node), (yylsp[-3]).end_pos.lineno);
14281 (yyval.node) = NEW_BEGIN((yyvsp[-1].node), &(yyloc));
14282 nd_set_line((yyval.node), (yylsp[-3]).end_pos.lineno);
14283 /*% ripper: begin!($:3) %*/
14284 }
14285#line 14286 "parse.c"
14286 break;
14287
14288 case 353: /* $@15: %empty */
14289#line 4386 "parse.y"
14290 {SET_LEX_STATE(EXPR_ENDARG);}
14291#line 14292 "parse.c"
14292 break;
14293
14294 case 354: /* primary: "( arg" compstmt_stmts $@15 ')' */
14295#line 4387 "parse.y"
14296 {
14297 if (nd_type_p((yyvsp[-2].node), NODE_SELF)) RNODE_SELF((yyvsp[-2].node))->nd_state = 0;
14298 (yyval.node) = (yyvsp[-2].node);
14299 /*% ripper: paren!($:2) %*/
14300 }
14301#line 14302 "parse.c"
14302 break;
14303
14304 case 355: /* primary: "(" compstmt_stmts ')' */
14305#line 4393 "parse.y"
14306 {
14307 if (nd_type_p((yyvsp[-1].node), NODE_SELF)) RNODE_SELF((yyvsp[-1].node))->nd_state = 0;
14308 (yyval.node) = NEW_BLOCK((yyvsp[-1].node), &(yyloc));
14309 /*% ripper: paren!($:2) %*/
14310 }
14311#line 14312 "parse.c"
14312 break;
14313
14314 case 356: /* primary: primary_value "::" "constant" */
14315#line 4399 "parse.y"
14316 {
14317 (yyval.node) = NEW_COLON2((yyvsp[-2].node), (yyvsp[0].id), &(yyloc), &(yylsp[-1]), &(yylsp[0]));
14318 /*% ripper: const_path_ref!($:1, $:3) %*/
14319 }
14320#line 14321 "parse.c"
14321 break;
14322
14323 case 357: /* primary: ":: at EXPR_BEG" "constant" */
14324#line 4404 "parse.y"
14325 {
14326 (yyval.node) = NEW_COLON3((yyvsp[0].id), &(yyloc), &(yylsp[-1]), &(yylsp[0]));
14327 /*% ripper: top_const_ref!($:2) %*/
14328 }
14329#line 14330 "parse.c"
14330 break;
14331
14332 case 358: /* primary: "[" aref_args ']' */
14333#line 4409 "parse.y"
14334 {
14335 (yyval.node) = make_list((yyvsp[-1].node), &(yyloc));
14336 /*% ripper: array!($:2) %*/
14337 }
14338#line 14339 "parse.c"
14339 break;
14340
14341 case 359: /* primary: "{" assoc_list '}' */
14342#line 4414 "parse.y"
14343 {
14344 (yyval.node) = new_hash(p, (yyvsp[-1].node), &(yyloc));
14345 RNODE_HASH((yyval.node))->nd_brace = TRUE;
14346 /*% ripper: hash!($:2) %*/
14347 }
14348#line 14349 "parse.c"
14349 break;
14350
14351 case 360: /* primary: k_return */
14352#line 4420 "parse.y"
14353 {
14354 (yyval.node) = NEW_RETURN(0, &(yyloc), &(yylsp[0]));
14355 /*% ripper: return0! %*/
14356 }
14357#line 14358 "parse.c"
14358 break;
14359
14360 case 361: /* primary: k_yield '(' call_args rparen */
14361#line 4425 "parse.y"
14362 {
14363 (yyval.node) = NEW_YIELD((yyvsp[-1].node), &(yyloc), &(yylsp[-3]), &(yylsp[-2]), &(yylsp[0]));
14364 /*% ripper: yield!(paren!($:3)) %*/
14365 }
14366#line 14367 "parse.c"
14367 break;
14368
14369 case 362: /* primary: k_yield '(' rparen */
14370#line 4430 "parse.y"
14371 {
14372 (yyval.node) = NEW_YIELD(0, &(yyloc), &(yylsp[-2]), &(yylsp[-1]), &(yylsp[0]));
14373 /*% ripper: yield!(paren!(args_new!)) %*/
14374 }
14375#line 14376 "parse.c"
14376 break;
14377
14378 case 363: /* primary: k_yield */
14379#line 4435 "parse.y"
14380 {
14381 (yyval.node) = NEW_YIELD(0, &(yyloc), &(yylsp[0]), &NULL_LOC, &NULL_LOC);
14382 /*% ripper: yield0! %*/
14383 }
14384#line 14385 "parse.c"
14385 break;
14386
14387 case 364: /* primary: "'defined?'" option_'\n' '(' begin_defined expr rparen */
14388#line 4440 "parse.y"
14389 {
14390 p->ctxt.in_defined = (yyvsp[-2].ctxt).in_defined;
14391 (yyval.node) = new_defined(p, (yyvsp[-1].node), &(yyloc), &(yylsp[-5]));
14392 p->ctxt.has_trailing_semicolon = (yyvsp[-2].ctxt).has_trailing_semicolon;
14393 /*% ripper: defined!($:5) %*/
14394 }
14395#line 14396 "parse.c"
14396 break;
14397
14398 case 365: /* primary: "'not'" '(' expr rparen */
14399#line 4447 "parse.y"
14400 {
14401 (yyval.node) = call_uni_op(p, method_cond(p, (yyvsp[-1].node), &(yylsp[-1])), METHOD_NOT, &(yylsp[-3]), &(yyloc));
14402 /*% ripper: unary!(ID2VAL(idNOT), $:3) %*/
14403 }
14404#line 14405 "parse.c"
14405 break;
14406
14407 case 366: /* primary: "'not'" '(' rparen */
14408#line 4452 "parse.y"
14409 {
14410 (yyval.node) = call_uni_op(p, method_cond(p, NEW_NIL(&(yylsp[-1])), &(yylsp[-1])), METHOD_NOT, &(yylsp[-2]), &(yyloc));
14411 /*% ripper: unary!(ID2VAL(idNOT), Qnil) %*/
14412 }
14413#line 14414 "parse.c"
14414 break;
14415
14416 case 367: /* primary: fcall brace_block */
14417#line 4457 "parse.y"
14418 {
14419 (yyval.node) = method_add_block(p, (NODE *)(yyvsp[-1].node_fcall), (yyvsp[0].node), &(yyloc));
14420 /*% ripper: method_add_block!(method_add_arg!(fcall!($:1), args_new!), $:2) %*/
14421 }
14422#line 14423 "parse.c"
14423 break;
14424
14425 case 369: /* primary: method_call brace_block */
14426#line 4463 "parse.y"
14427 {
14428 block_dup_check(p, get_nd_args(p, (yyvsp[-1].node)), (yyvsp[0].node));
14429 (yyval.node) = method_add_block(p, (yyvsp[-1].node), (yyvsp[0].node), &(yyloc));
14430 /*% ripper: method_add_block!($:1, $:2) %*/
14431 }
14432#line 14433 "parse.c"
14433 break;
14434
14435 case 371: /* primary: k_if expr_value then compstmt_stmts if_tail k_end */
14436#line 4473 "parse.y"
14437 {
14438 if ((yyvsp[-1].node) && nd_type_p((yyvsp[-1].node), NODE_IF))
14439 RNODE_IF((yyvsp[-1].node))->end_keyword_loc = (yylsp[0]);
14440
14441 (yyval.node) = new_if(p, (yyvsp[-4].node), (yyvsp[-2].node), (yyvsp[-1].node), &(yyloc), &(yylsp[-5]), &(yylsp[-3]), &(yylsp[0]));
14442 fixpos((yyval.node), (yyvsp[-4].node));
14443 /*% ripper: if!($:2, $:4, $:5) %*/
14444 }
14445#line 14446 "parse.c"
14446 break;
14447
14448 case 372: /* primary: k_unless expr_value then compstmt_stmts opt_else k_end */
14449#line 4485 "parse.y"
14450 {
14451 (yyval.node) = new_unless(p, (yyvsp[-4].node), (yyvsp[-2].node), (yyvsp[-1].node), &(yyloc), &(yylsp[-5]), &(yylsp[-3]), &(yylsp[0]));
14452 fixpos((yyval.node), (yyvsp[-4].node));
14453 /*% ripper: unless!($:2, $:4, $:5) %*/
14454 }
14455#line 14456 "parse.c"
14456 break;
14457
14458 case 373: /* primary: k_while expr_value_do compstmt_stmts k_end */
14459#line 4493 "parse.y"
14460 {
14461 restore_block_exit(p, (yyvsp[-3].node_exits));
14462 (yyval.node) = NEW_WHILE(cond(p, (yyvsp[-2].node), &(yylsp[-2])), (yyvsp[-1].node), 1, &(yyloc), &(yylsp[-3]), &(yylsp[0]));
14463 fixpos((yyval.node), (yyvsp[-2].node));
14464 /*% ripper: while!($:2, $:3) %*/
14465 }
14466#line 14467 "parse.c"
14467 break;
14468
14469 case 374: /* primary: k_until expr_value_do compstmt_stmts k_end */
14470#line 4502 "parse.y"
14471 {
14472 restore_block_exit(p, (yyvsp[-3].node_exits));
14473 (yyval.node) = NEW_UNTIL(cond(p, (yyvsp[-2].node), &(yylsp[-2])), (yyvsp[-1].node), 1, &(yyloc), &(yylsp[-3]), &(yylsp[0]));
14474 fixpos((yyval.node), (yyvsp[-2].node));
14475 /*% ripper: until!($:2, $:3) %*/
14476 }
14477#line 14478 "parse.c"
14478 break;
14479
14480 case 375: /* @16: %empty */
14481#line 4509 "parse.y"
14482 {
14483 (yyval.labels) = p->case_labels;
14484 p->case_labels = CHECK_LITERAL_WHEN;
14485 }
14486#line 14487 "parse.c"
14487 break;
14488
14489 case 376: /* primary: k_case expr_value option_terms @16 case_body k_end */
14490#line 4515 "parse.y"
14491 {
14492 if (CASE_LABELS_ENABLED_P(p->case_labels)) st_free_table(p->case_labels);
14493 p->case_labels = (yyvsp[-2].labels);
14494 (yyval.node) = NEW_CASE((yyvsp[-4].node), (yyvsp[-1].node), &(yyloc), &(yylsp[-5]), &(yylsp[0]));
14495 fixpos((yyval.node), (yyvsp[-4].node));
14496 /*% ripper: case!($:2, $:5) %*/
14497 }
14498#line 14499 "parse.c"
14499 break;
14500
14501 case 377: /* @17: %empty */
14502#line 4523 "parse.y"
14503 {
14504 (yyval.labels) = p->case_labels;
14505 p->case_labels = 0;
14506 }
14507#line 14508 "parse.c"
14508 break;
14509
14510 case 378: /* primary: k_case option_terms @17 case_body k_end */
14511#line 4529 "parse.y"
14512 {
14513 if (p->case_labels) st_free_table(p->case_labels);
14514 p->case_labels = (yyvsp[-2].labels);
14515 (yyval.node) = NEW_CASE2((yyvsp[-1].node), &(yyloc), &(yylsp[-4]), &(yylsp[0]));
14516 /*% ripper: case!(Qnil, $:4) %*/
14517 }
14518#line 14519 "parse.c"
14519 break;
14520
14521 case 379: /* primary: k_case expr_value option_terms p_case_body k_end */
14522#line 4538 "parse.y"
14523 {
14524 (yyval.node) = NEW_CASE3((yyvsp[-3].node), (yyvsp[-1].node), &(yyloc), &(yylsp[-4]), &(yylsp[0]));
14525 /*% ripper: case!($:2, $:4) %*/
14526 }
14527#line 14528 "parse.c"
14528 break;
14529
14530 case 380: /* $@18: %empty */
14531#line 4543 "parse.y"
14532 {COND_PUSH(1);}
14533#line 14534 "parse.c"
14534 break;
14535
14536 case 381: /* $@19: %empty */
14537#line 4543 "parse.y"
14538 {COND_POP();}
14539#line 14540 "parse.c"
14540 break;
14541
14542 case 382: /* primary: k_for for_var "'in'" $@18 expr_value do $@19 compstmt_stmts k_end */
14543#line 4546 "parse.y"
14544 {
14545 restore_block_exit(p, (yyvsp[-8].node_exits));
14546 /*
14547 * for a, b, c in e
14548 * #=>
14549 * e.each{|*x| a, b, c = x}
14550 *
14551 * for a in e
14552 * #=>
14553 * e.each{|x| a, = x}
14554 */
14555 ID id = internal_id(p);
14556 rb_node_args_aux_t *m = NEW_ARGS_AUX(0, 0, &NULL_LOC);
14557 rb_node_args_t *args;
14558 NODE *scope, *internal_var = NEW_DVAR(id, &(yylsp[-7]));
14559 rb_ast_id_table_t *tbl = rb_ast_new_local_table(p->ast, 1);
14560 tbl->ids[0] = id; /* internal id */
14561
14562 switch (nd_type((yyvsp[-7].node))) {
14563 case NODE_LASGN:
14564 case NODE_DASGN: /* e.each {|internal_var| a = internal_var; ... } */
14565 set_nd_value(p, (yyvsp[-7].node), internal_var);
14566 id = 0;
14567 m->nd_plen = 1;
14568 m->nd_next = (yyvsp[-7].node);
14569 break;
14570 case NODE_MASGN: /* e.each {|*internal_var| a, b, c = (internal_var.length == 1 && Array === (tmp = internal_var[0]) ? tmp : internal_var); ... } */
14571 m->nd_next = node_assign(p, (yyvsp[-7].node), NEW_FOR_MASGN(internal_var, &(yylsp[-7])), NO_LEX_CTXT, &(yylsp[-7]));
14572 break;
14573 default: /* e.each {|*internal_var| @a, B, c[1], d.attr = internal_val; ... } */
14574 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]));
14575 }
14576 /* {|*internal_id| <m> = internal_id; ... } */
14577 args = new_args(p, m, 0, id, 0, new_args_tail(p, 0, 0, 0, &(yylsp[-7])), &(yylsp[-7]));
14578 scope = NEW_SCOPE2(tbl, args, (yyvsp[-1].node), NULL, &(yyloc));
14579 YYLTYPE do_keyword_loc = (yyvsp[-3].id) == keyword_do_cond ? (yylsp[-3]) : NULL_LOC;
14580 (yyval.node) = NEW_FOR((yyvsp[-4].node), scope, &(yyloc), &(yylsp[-8]), &(yylsp[-6]), &do_keyword_loc, &(yylsp[0]));
14581 RNODE_SCOPE(scope)->nd_parent = (yyval.node);
14582 fixpos((yyval.node), (yyvsp[-7].node));
14583 /*% ripper: for!($:for_var, $:expr_value, $:compstmt) %*/
14584 }
14585#line 14586 "parse.c"
14586 break;
14587
14588 case 383: /* $@20: %empty */
14589#line 4588 "parse.y"
14590 {
14591 begin_definition("class", &(yylsp[-2]), &(yylsp[-1]));
14592 }
14593#line 14594 "parse.c"
14594 break;
14595
14596 case 384: /* primary: k_class cpath superclass $@20 bodystmt k_end */
14597#line 4593 "parse.y"
14598 {
14599 YYLTYPE inheritance_operator_loc = NULL_LOC;
14600 if ((yyvsp[-3].node)) {
14601 inheritance_operator_loc = (yylsp[-3]);
14602 inheritance_operator_loc.end_pos.column = inheritance_operator_loc.beg_pos.column + 1;
14603 }
14604 (yyval.node) = NEW_CLASS((yyvsp[-4].node), (yyvsp[-1].node), (yyvsp[-3].node), &(yyloc), &(yylsp[-5]), &inheritance_operator_loc, &(yylsp[0]));
14605 nd_set_line(RNODE_CLASS((yyval.node))->nd_body, (yylsp[0]).end_pos.lineno);
14606 set_line_body((yyvsp[-1].node), (yylsp[-3]).end_pos.lineno);
14607 nd_set_line((yyval.node), (yylsp[-3]).end_pos.lineno);
14608 /*% ripper: class!($:cpath, $:superclass, $:bodystmt) %*/
14609 local_pop(p);
14610 p->ctxt.in_class = (yyvsp[-5].ctxt).in_class;
14611 p->ctxt.cant_return = (yyvsp[-5].ctxt).cant_return;
14612 p->ctxt.shareable_constant_value = (yyvsp[-5].ctxt).shareable_constant_value;
14613 }
14614#line 14615 "parse.c"
14615 break;
14616
14617 case 385: /* $@21: %empty */
14618#line 4610 "parse.y"
14619 {
14620 begin_definition("", &(yylsp[-2]), &(yylsp[-1]));
14621 }
14622#line 14623 "parse.c"
14623 break;
14624
14625 case 386: /* primary: k_class "<<" expr_value $@21 term bodystmt k_end */
14626#line 4616 "parse.y"
14627 {
14628 (yyval.node) = NEW_SCLASS((yyvsp[-4].node), (yyvsp[-1].node), &(yyloc), &(yylsp[-6]), &(yylsp[-5]), &(yylsp[0]));
14629 nd_set_line(RNODE_SCLASS((yyval.node))->nd_body, (yylsp[0]).end_pos.lineno);
14630 set_line_body((yyvsp[-1].node), nd_line((yyvsp[-4].node)));
14631 fixpos((yyval.node), (yyvsp[-4].node));
14632 /*% ripper: sclass!($:expr_value, $:bodystmt) %*/
14633 local_pop(p);
14634 p->ctxt.in_def = (yyvsp[-6].ctxt).in_def;
14635 p->ctxt.in_class = (yyvsp[-6].ctxt).in_class;
14636 p->ctxt.cant_return = (yyvsp[-6].ctxt).cant_return;
14637 p->ctxt.shareable_constant_value = (yyvsp[-6].ctxt).shareable_constant_value;
14638 }
14639#line 14640 "parse.c"
14640 break;
14641
14642 case 387: /* $@22: %empty */
14643#line 4629 "parse.y"
14644 {
14645 begin_definition("module", &(yylsp[-1]), &(yylsp[0]));
14646 }
14647#line 14648 "parse.c"
14648 break;
14649
14650 case 388: /* primary: k_module cpath $@22 bodystmt k_end */
14651#line 4634 "parse.y"
14652 {
14653 (yyval.node) = NEW_MODULE((yyvsp[-3].node), (yyvsp[-1].node), &(yyloc), &(yylsp[-4]), &(yylsp[0]));
14654 nd_set_line(RNODE_MODULE((yyval.node))->nd_body, (yylsp[0]).end_pos.lineno);
14655 set_line_body((yyvsp[-1].node), (yylsp[-3]).end_pos.lineno);
14656 nd_set_line((yyval.node), (yylsp[-3]).end_pos.lineno);
14657 /*% ripper: module!($:cpath, $:bodystmt) %*/
14658 local_pop(p);
14659 p->ctxt.in_class = (yyvsp[-4].ctxt).in_class;
14660 p->ctxt.cant_return = (yyvsp[-4].ctxt).cant_return;
14661 p->ctxt.shareable_constant_value = (yyvsp[-4].ctxt).shareable_constant_value;
14662 }
14663#line 14664 "parse.c"
14664 break;
14665
14666 case 389: /* $@23: %empty */
14667#line 4647 "parse.y"
14668 {
14669 push_end_expect_token_locations(p, &(yylsp[-1]).beg_pos);
14670 }
14671#line 14672 "parse.c"
14672 break;
14673
14674 case 390: /* primary: defn_head f_arglist $@23 bodystmt k_end */
14675#line 4652 "parse.y"
14676 {
14677 restore_defun(p, (yyvsp[-4].node_def_temp));
14678 ((yyval.node) = (yyvsp[-4].node_def_temp)->nd_def)->nd_loc = (yyloc);
14679 (yyvsp[-1].node) = new_scope_body(p, (yyvsp[-3].node_args), (yyvsp[-1].node), (yyval.node), &(yyloc));
14680 RNODE_DEFN((yyval.node))->nd_defn = (yyvsp[-1].node);
14681 /*% ripper: def!($:head, $:args, $:bodystmt) %*/
14682 local_pop(p);
14683 }
14684#line 14685 "parse.c"
14685 break;
14686
14687 case 391: /* $@24: %empty */
14688#line 4662 "parse.y"
14689 {
14690 push_end_expect_token_locations(p, &(yylsp[-1]).beg_pos);
14691 }
14692#line 14693 "parse.c"
14693 break;
14694
14695 case 392: /* primary: defs_head f_arglist $@24 bodystmt k_end */
14696#line 4667 "parse.y"
14697 {
14698 restore_defun(p, (yyvsp[-4].node_def_temp));
14699 ((yyval.node) = (yyvsp[-4].node_def_temp)->nd_def)->nd_loc = (yyloc);
14700 (yyvsp[-1].node) = new_scope_body(p, (yyvsp[-3].node_args), (yyvsp[-1].node), (yyval.node), &(yyloc));
14701 RNODE_DEFS((yyval.node))->nd_defn = (yyvsp[-1].node);
14702 /*% ripper: defs!(*$:head[0..2], $:args, $:bodystmt) %*/
14703 local_pop(p);
14704 }
14705#line 14706 "parse.c"
14706 break;
14707
14708 case 393: /* primary: "'break'" */
14709#line 4676 "parse.y"
14710 {
14711 (yyval.node) = add_block_exit(p, NEW_BREAK(0, &(yyloc), &(yylsp[0])));
14712 /*% ripper: break!(args_new!) %*/
14713 }
14714#line 14715 "parse.c"
14715 break;
14716
14717 case 394: /* primary: "'next'" */
14718#line 4681 "parse.y"
14719 {
14720 (yyval.node) = add_block_exit(p, NEW_NEXT(0, &(yyloc), &(yylsp[0])));
14721 /*% ripper: next!(args_new!) %*/
14722 }
14723#line 14724 "parse.c"
14724 break;
14725
14726 case 395: /* primary: "'redo'" */
14727#line 4686 "parse.y"
14728 {
14729 (yyval.node) = add_block_exit(p, NEW_REDO(&(yyloc), &(yylsp[0])));
14730 /*% ripper: redo! %*/
14731 }
14732#line 14733 "parse.c"
14733 break;
14734
14735 case 396: /* primary: "'retry'" */
14736#line 4691 "parse.y"
14737 {
14738 if (!p->ctxt.in_defined) {
14739 switch (p->ctxt.in_rescue) {
14740 case before_rescue: yyerror1(&(yylsp[0]), "Invalid retry without rescue"); break;
14741 case after_rescue: /* ok */ break;
14742 case after_else: yyerror1(&(yylsp[0]), "Invalid retry after else"); break;
14743 case after_ensure: yyerror1(&(yylsp[0]), "Invalid retry after ensure"); break;
14744 }
14745 }
14746 (yyval.node) = NEW_RETRY(&(yyloc));
14747 /*% ripper: retry! %*/
14748 }
14749#line 14750 "parse.c"
14750 break;
14751
14752 case 397: /* value_expr_primary: primary */
14753#line 3144 "parse.y"
14754 {
14755 value_expr(p, (yyvsp[0].node));
14756 (yyval.node) = (yyvsp[0].node);
14757 }
14758#line 14759 "parse.c"
14759 break;
14760
14761 case 399: /* k_begin: "'begin'" */
14762#line 4709 "parse.y"
14763 {
14764 token_info_push(p, "begin", &(yyloc));
14765 push_end_expect_token_locations(p, &(yylsp[0]).beg_pos);
14766 }
14767#line 14768 "parse.c"
14768 break;
14769
14770 case 400: /* k_if: "'if'" */
14771#line 4716 "parse.y"
14772 {
14773 WARN_EOL("if");
14774 token_info_push(p, "if", &(yyloc));
14775 if (p->token_info && p->token_info->nonspc &&
14776 p->token_info->next && !strcmp(p->token_info->next->token, "else")) {
14777 const char *tok = p->lex.ptok - rb_strlen_lit("if");
14778 const char *beg = p->lex.pbeg + p->token_info->next->beg.column;
14779 beg += rb_strlen_lit("else");
14780 while (beg < tok && ISSPACE(*beg)) beg++;
14781 if (beg == tok) {
14782 p->token_info->nonspc = 0;
14783 }
14784 }
14785 push_end_expect_token_locations(p, &(yylsp[0]).beg_pos);
14786 }
14787#line 14788 "parse.c"
14788 break;
14789
14790 case 401: /* k_unless: "'unless'" */
14791#line 4734 "parse.y"
14792 {
14793 token_info_push(p, "unless", &(yyloc));
14794 push_end_expect_token_locations(p, &(yylsp[0]).beg_pos);
14795 }
14796#line 14797 "parse.c"
14797 break;
14798
14799 case 402: /* k_while: "'while'" allow_exits */
14800#line 4741 "parse.y"
14801 {
14802 (yyval.node_exits) = (yyvsp[0].node_exits);
14803 token_info_push(p, "while", &(yyloc));
14804 push_end_expect_token_locations(p, &(yylsp[-1]).beg_pos);
14805 }
14806#line 14807 "parse.c"
14807 break;
14808
14809 case 403: /* k_until: "'until'" allow_exits */
14810#line 4749 "parse.y"
14811 {
14812 (yyval.node_exits) = (yyvsp[0].node_exits);
14813 token_info_push(p, "until", &(yyloc));
14814 push_end_expect_token_locations(p, &(yylsp[-1]).beg_pos);
14815 }
14816#line 14817 "parse.c"
14817 break;
14818
14819 case 404: /* k_case: "'case'" */
14820#line 4757 "parse.y"
14821 {
14822 token_info_push(p, "case", &(yyloc));
14823 push_end_expect_token_locations(p, &(yylsp[0]).beg_pos);
14824 }
14825#line 14826 "parse.c"
14826 break;
14827
14828 case 405: /* k_for: "'for'" allow_exits */
14829#line 4764 "parse.y"
14830 {
14831 (yyval.node_exits) = (yyvsp[0].node_exits);
14832 token_info_push(p, "for", &(yyloc));
14833 push_end_expect_token_locations(p, &(yylsp[-1]).beg_pos);
14834 }
14835#line 14836 "parse.c"
14836 break;
14837
14838 case 406: /* k_class: "'class'" */
14839#line 4772 "parse.y"
14840 {
14841 token_info_push(p, "class", &(yyloc));
14842 (yyval.ctxt) = p->ctxt;
14843 p->ctxt.in_rescue = before_rescue;
14844 push_end_expect_token_locations(p, &(yylsp[0]).beg_pos);
14845 }
14846#line 14847 "parse.c"
14847 break;
14848
14849 case 407: /* k_module: "'module'" */
14850#line 4781 "parse.y"
14851 {
14852 token_info_push(p, "module", &(yyloc));
14853 (yyval.ctxt) = p->ctxt;
14854 p->ctxt.in_rescue = before_rescue;
14855 push_end_expect_token_locations(p, &(yylsp[0]).beg_pos);
14856 }
14857#line 14858 "parse.c"
14858 break;
14859
14860 case 408: /* k_def: "'def'" */
14861#line 4790 "parse.y"
14862 {
14863 token_info_push(p, "def", &(yyloc));
14864 (yyval.node_def_temp) = NEW_DEF_TEMP(&(yyloc));
14865 p->ctxt.in_argdef = 1;
14866 }
14867#line 14868 "parse.c"
14868 break;
14869
14870 case 409: /* k_do: "'do'" */
14871#line 4798 "parse.y"
14872 {
14873 token_info_push(p, "do", &(yyloc));
14874 push_end_expect_token_locations(p, &(yylsp[0]).beg_pos);
14875 }
14876#line 14877 "parse.c"
14877 break;
14878
14879 case 410: /* k_do_block: "'do' for block" */
14880#line 4805 "parse.y"
14881 {
14882 token_info_push(p, "do", &(yyloc));
14883 push_end_expect_token_locations(p, &(yylsp[0]).beg_pos);
14884 }
14885#line 14886 "parse.c"
14886 break;
14887
14888 case 411: /* k_rescue: "'rescue'" */
14889#line 4812 "parse.y"
14890 {
14891 token_info_warn(p, "rescue", p->token_info, 1, &(yyloc));
14892 (yyval.ctxt) = p->ctxt;
14893 p->ctxt.in_rescue = after_rescue;
14894 }
14895#line 14896 "parse.c"
14896 break;
14897
14898 case 412: /* k_ensure: "'ensure'" */
14899#line 4820 "parse.y"
14900 {
14901 token_info_warn(p, "ensure", p->token_info, 1, &(yyloc));
14902 (yyval.ctxt) = p->ctxt;
14903 }
14904#line 14905 "parse.c"
14905 break;
14906
14907 case 413: /* k_when: "'when'" */
14908#line 4827 "parse.y"
14909 {
14910 token_info_warn(p, "when", p->token_info, 0, &(yyloc));
14911 }
14912#line 14913 "parse.c"
14913 break;
14914
14915 case 414: /* k_else: "'else'" */
14916#line 4833 "parse.y"
14917 {
14918 token_info *ptinfo_beg = p->token_info;
14919 int same = ptinfo_beg && strcmp(ptinfo_beg->token, "case") != 0;
14920 token_info_warn(p, "else", p->token_info, same, &(yyloc));
14921 if (same) {
14922 token_info e;
14923 e.next = ptinfo_beg->next;
14924 e.token = "else";
14925 token_info_setup(&e, p->lex.pbeg, &(yyloc));
14926 if (!e.nonspc) *ptinfo_beg = e;
14927 }
14928 }
14929#line 14930 "parse.c"
14930 break;
14931
14932 case 415: /* k_elsif: "'elsif'" */
14933#line 4848 "parse.y"
14934 {
14935 WARN_EOL("elsif");
14936 token_info_warn(p, "elsif", p->token_info, 1, &(yyloc));
14937 }
14938#line 14939 "parse.c"
14939 break;
14940
14941 case 416: /* k_end: "'end'" */
14942#line 4855 "parse.y"
14943 {
14944 token_info_pop(p, "end", &(yyloc));
14945 pop_end_expect_token_locations(p);
14946 }
14947#line 14948 "parse.c"
14948 break;
14949
14950 case 417: /* k_end: "dummy end" */
14951#line 4860 "parse.y"
14952 {
14953 compile_error(p, "syntax error, unexpected end-of-input");
14954 }
14955#line 14956 "parse.c"
14956 break;
14957
14958 case 418: /* k_return: "'return'" */
14959#line 4866 "parse.y"
14960 {
14961 if (p->ctxt.cant_return && !dyna_in_block(p))
14962 yyerror1(&(yylsp[0]), "Invalid return in class/module body");
14963 }
14964#line 14965 "parse.c"
14965 break;
14966
14967 case 419: /* k_yield: "'yield'" */
14968#line 4873 "parse.y"
14969 {
14970 if (!p->ctxt.in_defined && !p->ctxt.in_def && !compile_for_eval)
14971 yyerror1(&(yylsp[0]), "Invalid yield");
14972 }
14973#line 14974 "parse.c"
14974 break;
14975
14976 case 424: /* do: "'do' for condition" */
14977#line 4885 "parse.y"
14978 { (yyval.id) = keyword_do_cond; }
14979#line 14980 "parse.c"
14980 break;
14981
14982 case 426: /* if_tail: k_elsif expr_value then compstmt_stmts if_tail */
14983#line 4892 "parse.y"
14984 {
14985 (yyval.node) = new_if(p, (yyvsp[-3].node), (yyvsp[-1].node), (yyvsp[0].node), &(yyloc), &(yylsp[-4]), &(yylsp[-2]), &NULL_LOC);
14986 fixpos((yyval.node), (yyvsp[-3].node));
14987 /*% ripper: elsif!($:2, $:4, $:5) %*/
14988 }
14989#line 14990 "parse.c"
14990 break;
14991
14992 case 428: /* opt_else: k_else compstmt_stmts */
14993#line 4901 "parse.y"
14994 {
14995 (yyval.node) = (yyvsp[0].node);
14996 /*% ripper: else!($:2) %*/
14997 }
14998#line 14999 "parse.c"
14999 break;
15000
15001 case 431: /* f_marg: f_norm_arg */
15002#line 4912 "parse.y"
15003 {
15004 (yyval.node) = assignable(p, (yyvsp[0].id), 0, &(yyloc));
15005 mark_lvar_used(p, (yyval.node));
15006 }
15007#line 15008 "parse.c"
15008 break;
15009
15010 case 432: /* f_marg: "(" f_margs rparen */
15011#line 4917 "parse.y"
15012 {
15013 (yyval.node) = (NODE *)(yyvsp[-1].node_masgn);
15014 /*% ripper: mlhs_paren!($:2) %*/
15015 }
15016#line 15017 "parse.c"
15017 break;
15018
15019 case 433: /* mlhs_items_f_marg: f_marg */
15020#line 3031 "parse.y"
15021 {
15022 (yyval.node) = NEW_LIST((yyvsp[0].node), &(yyloc));
15023 /*% ripper: mlhs_add!(mlhs_new!, $:1) %*/
15024 }
15025#line 15026 "parse.c"
15026 break;
15027
15028 case 434: /* mlhs_items_f_marg: mlhs_items_f_marg ',' f_marg */
15029#line 3036 "parse.y"
15030 {
15031 (yyval.node) = list_append(p, (yyvsp[-2].node), (yyvsp[0].node));
15032 /*% ripper: mlhs_add!($:1, $:3) %*/
15033 }
15034#line 15035 "parse.c"
15035 break;
15036
15037 case 435: /* f_margs: mlhs_items_f_marg */
15038#line 4925 "parse.y"
15039 {
15040 (yyval.node_masgn) = NEW_MASGN((yyvsp[0].node), 0, &(yyloc));
15041 /*% ripper: $:1 %*/
15042 }
15043#line 15044 "parse.c"
15044 break;
15045
15046 case 436: /* f_margs: mlhs_items_f_marg ',' f_rest_marg */
15047#line 4930 "parse.y"
15048 {
15049 (yyval.node_masgn) = NEW_MASGN((yyvsp[-2].node), (yyvsp[0].node), &(yyloc));
15050 /*% ripper: mlhs_add_star!($:1, $:3) %*/
15051 }
15052#line 15053 "parse.c"
15053 break;
15054
15055 case 437: /* f_margs: mlhs_items_f_marg ',' f_rest_marg ',' mlhs_items_f_marg */
15056#line 4935 "parse.y"
15057 {
15058 (yyval.node_masgn) = NEW_MASGN((yyvsp[-4].node), NEW_POSTARG((yyvsp[-2].node), (yyvsp[0].node), &(yyloc)), &(yyloc));
15059 /*% ripper: mlhs_add_post!(mlhs_add_star!($:1, $:3), $:5) %*/
15060 }
15061#line 15062 "parse.c"
15062 break;
15063
15064 case 438: /* f_margs: f_rest_marg */
15065#line 4940 "parse.y"
15066 {
15067 (yyval.node_masgn) = NEW_MASGN(0, (yyvsp[0].node), &(yyloc));
15068 /*% ripper: mlhs_add_star!(mlhs_new!, $:1) %*/
15069 }
15070#line 15071 "parse.c"
15071 break;
15072
15073 case 439: /* f_margs: f_rest_marg ',' mlhs_items_f_marg */
15074#line 4945 "parse.y"
15075 {
15076 (yyval.node_masgn) = NEW_MASGN(0, NEW_POSTARG((yyvsp[-2].node), (yyvsp[0].node), &(yyloc)), &(yyloc));
15077 /*% ripper: mlhs_add_post!(mlhs_add_star!(mlhs_new!, $:1), $:3) %*/
15078 }
15079#line 15080 "parse.c"
15080 break;
15081
15082 case 440: /* f_rest_marg: "*" f_norm_arg */
15083#line 4952 "parse.y"
15084 {
15085 /*% ripper: $:2 %*/
15086 (yyval.node) = assignable(p, (yyvsp[0].id), 0, &(yyloc));
15087 mark_lvar_used(p, (yyval.node));
15088 }
15089#line 15090 "parse.c"
15090 break;
15091
15092 case 441: /* f_rest_marg: "*" */
15093#line 4958 "parse.y"
15094 {
15095 (yyval.node) = NODE_SPECIAL_NO_NAME_REST;
15096 /*% ripper: Qnil %*/
15097 }
15098#line 15099 "parse.c"
15099 break;
15100
15101 case 443: /* f_any_kwrest: f_no_kwarg */
15102#line 4966 "parse.y"
15103 {
15104 (yyval.id) = idNil;
15105 /*% ripper: ID2VAL(idNil) %*/
15106 }
15107#line 15108 "parse.c"
15108 break;
15109
15110 case 444: /* $@25: %empty */
15111#line 4972 "parse.y"
15112 {p->ctxt.in_argdef = 0;}
15113#line 15114 "parse.c"
15114 break;
15115
15116 case 446: /* f_kw_primary_value: f_label primary_value */
15117#line 3003 "parse.y"
15118 {
15119 p->ctxt.in_argdef = 1;
15120 (yyval.node_kw_arg) = new_kw_arg(p, assignable(p, (yyvsp[-1].id), (yyvsp[0].node), &(yyloc)), &(yyloc));
15121 /*% ripper: [$:$, $:value] %*/
15122 }
15123#line 15124 "parse.c"
15124 break;
15125
15126 case 447: /* f_kw_primary_value: f_label */
15127#line 3009 "parse.y"
15128 {
15129 p->ctxt.in_argdef = 1;
15130 (yyval.node_kw_arg) = new_kw_arg(p, assignable(p, (yyvsp[0].id), NODE_SPECIAL_REQUIRED_KEYWORD, &(yyloc)), &(yyloc));
15131 /*% ripper: [$:$, 0] %*/
15132 }
15133#line 15134 "parse.c"
15134 break;
15135
15136 case 448: /* f_kwarg_primary_value: f_kw_primary_value */
15137#line 3018 "parse.y"
15138 {
15139 (yyval.node_kw_arg) = (yyvsp[0].node_kw_arg);
15140 /*% ripper: rb_ary_new3(1, $:1) %*/
15141 }
15142#line 15143 "parse.c"
15143 break;
15144
15145 case 449: /* f_kwarg_primary_value: f_kwarg_primary_value ',' f_kw_primary_value */
15146#line 3023 "parse.y"
15147 {
15148 (yyval.node_kw_arg) = kwd_append((yyvsp[-2].node_kw_arg), (yyvsp[0].node_kw_arg));
15149 /*% ripper: rb_ary_push($:1, $:3) %*/
15150 }
15151#line 15152 "parse.c"
15152 break;
15153
15154 case 450: /* args_tail_basic_primary_value: f_kwarg_primary_value ',' f_kwrest opt_f_block_arg */
15155#line 2927 "parse.y"
15156 {
15157 (yyval.node_args) = new_args_tail(p, (yyvsp[-3].node_kw_arg), (yyvsp[-1].id), (yyvsp[0].id), &(yylsp[-1]));
15158 /*% ripper: [$:1, $:3, $:4] %*/
15159 }
15160#line 15161 "parse.c"
15161 break;
15162
15163 case 451: /* args_tail_basic_primary_value: f_kwarg_primary_value opt_f_block_arg */
15164#line 2932 "parse.y"
15165 {
15166 (yyval.node_args) = new_args_tail(p, (yyvsp[-1].node_kw_arg), 0, (yyvsp[0].id), &(yylsp[-1]));
15167 /*% ripper: [$:1, Qnil, $:2] %*/
15168 }
15169#line 15170 "parse.c"
15170 break;
15171
15172 case 452: /* args_tail_basic_primary_value: f_any_kwrest opt_f_block_arg */
15173#line 2937 "parse.y"
15174 {
15175 (yyval.node_args) = new_args_tail(p, 0, (yyvsp[-1].id), (yyvsp[0].id), &(yylsp[-1]));
15176 /*% ripper: [Qnil, $:1, $:2] %*/
15177 }
15178#line 15179 "parse.c"
15179 break;
15180
15181 case 453: /* args_tail_basic_primary_value: f_block_arg */
15182#line 2942 "parse.y"
15183 {
15184 (yyval.node_args) = new_args_tail(p, 0, 0, (yyvsp[0].id), &(yylsp[0]));
15185 /*% ripper: [Qnil, Qnil, $:1] %*/
15186 }
15187#line 15188 "parse.c"
15188 break;
15189
15190 case 455: /* excessed_comma: ',' */
15191#line 4978 "parse.y"
15192 {
15193 /* magic number for rest_id in iseq_set_arguments() */
15194 (yyval.id) = NODE_SPECIAL_EXCESSIVE_COMMA;
15195 /*% ripper: excessed_comma! %*/
15196 }
15197#line 15198 "parse.c"
15198 break;
15199
15200 case 456: /* f_opt_primary_value: f_arg_asgn f_eq primary_value */
15201#line 2981 "parse.y"
15202 {
15203 p->ctxt.in_argdef = 1;
15204 (yyval.node_opt_arg) = NEW_OPT_ARG(assignable(p, (yyvsp[-2].id), (yyvsp[0].node), &(yyloc)), &(yyloc));
15205 /*% ripper: [$:$, $:3] %*/
15206 }
15207#line 15208 "parse.c"
15208 break;
15209
15210 case 457: /* f_opt_arg_primary_value: f_opt_primary_value */
15211#line 2990 "parse.y"
15212 {
15213 (yyval.node_opt_arg) = (yyvsp[0].node_opt_arg);
15214 /*% ripper: rb_ary_new3(1, $:1) %*/
15215 }
15216#line 15217 "parse.c"
15217 break;
15218
15219 case 458: /* f_opt_arg_primary_value: f_opt_arg_primary_value ',' f_opt_primary_value */
15220#line 2995 "parse.y"
15221 {
15222 (yyval.node_opt_arg) = opt_arg_append((yyvsp[-2].node_opt_arg), (yyvsp[0].node_opt_arg));
15223 /*% ripper: rb_ary_push($:1, $:3) %*/
15224 }
15225#line 15226 "parse.c"
15226 break;
15227
15228 case 459: /* opt_args_tail_block_args_tail: ',' block_args_tail */
15229#line 3090 "parse.y"
15230 {
15231 (yyval.node_args) = (yyvsp[0].node_args);
15232 /*% ripper: $:2 %*/
15233 }
15234#line 15235 "parse.c"
15235 break;
15236
15237 case 460: /* opt_args_tail_block_args_tail: %empty */
15238#line 3095 "parse.y"
15239 {
15240 (yyval.node_args) = new_args_tail(p, 0, 0, 0, &(yylsp[0]));
15241 /*% ripper: [Qnil, Qnil, Qnil] %*/
15242 }
15243#line 15244 "parse.c"
15244 break;
15245
15246 case 461: /* block_param: f_arg ',' f_opt_arg_primary_value ',' f_rest_arg opt_args_tail_block_args_tail */
15247#line 4986 "parse.y"
15248 {
15249 (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));
15250 /*% ripper: params!($:1, $:3, $:5, Qnil, *$:6[0..2]) %*/
15251 }
15252#line 15253 "parse.c"
15253 break;
15254
15255 case 462: /* block_param: f_arg ',' f_opt_arg_primary_value ',' f_rest_arg ',' f_arg opt_args_tail_block_args_tail */
15256#line 4991 "parse.y"
15257 {
15258 (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));
15259 /*% ripper: params!($:1, $:3, $:5, $:7, *$:8[0..2]) %*/
15260 }
15261#line 15262 "parse.c"
15262 break;
15263
15264 case 463: /* block_param: f_arg ',' f_opt_arg_primary_value opt_args_tail_block_args_tail */
15265#line 4996 "parse.y"
15266 {
15267 (yyval.node_args) = new_args(p, (yyvsp[-3].node_args_aux), (yyvsp[-1].node_opt_arg), 0, 0, (yyvsp[0].node_args), &(yyloc));
15268 /*% ripper: params!($:1, $:3, Qnil, Qnil, *$:4[0..2]) %*/
15269 }
15270#line 15271 "parse.c"
15271 break;
15272
15273 case 464: /* block_param: f_arg ',' f_opt_arg_primary_value ',' f_arg opt_args_tail_block_args_tail */
15274#line 5001 "parse.y"
15275 {
15276 (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));
15277 /*% ripper: params!($:1, $:3, Qnil, $:5, *$:6[0..2]) %*/
15278 }
15279#line 15280 "parse.c"
15280 break;
15281
15282 case 465: /* block_param: f_arg ',' f_rest_arg opt_args_tail_block_args_tail */
15283#line 5006 "parse.y"
15284 {
15285 (yyval.node_args) = new_args(p, (yyvsp[-3].node_args_aux), 0, (yyvsp[-1].id), 0, (yyvsp[0].node_args), &(yyloc));
15286 /*% ripper: params!($:1, Qnil, $:3, Qnil, *$:4[0..2]) %*/
15287 }
15288#line 15289 "parse.c"
15289 break;
15290
15291 case 466: /* block_param: f_arg excessed_comma */
15292#line 5011 "parse.y"
15293 {
15294 (yyval.node_args) = new_args_tail(p, 0, 0, 0, &(yylsp[0]));
15295 (yyval.node_args) = new_args(p, (yyvsp[-1].node_args_aux), 0, (yyvsp[0].id), 0, (yyval.node_args), &(yyloc));
15296 /*% ripper: params!($:1, Qnil, $:2, Qnil, Qnil, Qnil, Qnil) %*/
15297 }
15298#line 15299 "parse.c"
15299 break;
15300
15301 case 467: /* block_param: f_arg ',' f_rest_arg ',' f_arg opt_args_tail_block_args_tail */
15302#line 5017 "parse.y"
15303 {
15304 (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));
15305 /*% ripper: params!($:1, Qnil, $:3, $:5, *$:6[0..2]) %*/
15306 }
15307#line 15308 "parse.c"
15308 break;
15309
15310 case 468: /* block_param: f_arg opt_args_tail_block_args_tail */
15311#line 5022 "parse.y"
15312 {
15313 (yyval.node_args) = new_args(p, (yyvsp[-1].node_args_aux), 0, 0, 0, (yyvsp[0].node_args), &(yyloc));
15314 /*% ripper: params!($:1, Qnil, Qnil, Qnil, *$:2[0..2]) %*/
15315 }
15316#line 15317 "parse.c"
15317 break;
15318
15319 case 469: /* block_param: f_opt_arg_primary_value ',' f_rest_arg opt_args_tail_block_args_tail */
15320#line 5027 "parse.y"
15321 {
15322 (yyval.node_args) = new_args(p, 0, (yyvsp[-3].node_opt_arg), (yyvsp[-1].id), 0, (yyvsp[0].node_args), &(yyloc));
15323 /*% ripper: params!(Qnil, $:1, $:3, Qnil, *$:4[0..2]) %*/
15324 }
15325#line 15326 "parse.c"
15326 break;
15327
15328 case 470: /* block_param: f_opt_arg_primary_value ',' f_rest_arg ',' f_arg opt_args_tail_block_args_tail */
15329#line 5032 "parse.y"
15330 {
15331 (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));
15332 /*% ripper: params!(Qnil, $:1, $:3, $:5, *$:6[0..2]) %*/
15333 }
15334#line 15335 "parse.c"
15335 break;
15336
15337 case 471: /* block_param: f_opt_arg_primary_value opt_args_tail_block_args_tail */
15338#line 5037 "parse.y"
15339 {
15340 (yyval.node_args) = new_args(p, 0, (yyvsp[-1].node_opt_arg), 0, 0, (yyvsp[0].node_args), &(yyloc));
15341 /*% ripper: params!(Qnil, $:1, Qnil, Qnil, *$:2[0..2]) %*/
15342 }
15343#line 15344 "parse.c"
15344 break;
15345
15346 case 472: /* block_param: f_opt_arg_primary_value ',' f_arg opt_args_tail_block_args_tail */
15347#line 5042 "parse.y"
15348 {
15349 (yyval.node_args) = new_args(p, 0, (yyvsp[-3].node_opt_arg), 0, (yyvsp[-1].node_args_aux), (yyvsp[0].node_args), &(yyloc));
15350 /*% ripper: params!(Qnil, $:1, Qnil, $:3, *$:4[0..2]) %*/
15351 }
15352#line 15353 "parse.c"
15353 break;
15354
15355 case 473: /* block_param: f_rest_arg opt_args_tail_block_args_tail */
15356#line 5047 "parse.y"
15357 {
15358 (yyval.node_args) = new_args(p, 0, 0, (yyvsp[-1].id), 0, (yyvsp[0].node_args), &(yyloc));
15359 /*% ripper: params!(Qnil, Qnil, $:1, Qnil, *$:2[0..2]) %*/
15360 }
15361#line 15362 "parse.c"
15362 break;
15363
15364 case 474: /* block_param: f_rest_arg ',' f_arg opt_args_tail_block_args_tail */
15365#line 5052 "parse.y"
15366 {
15367 (yyval.node_args) = new_args(p, 0, 0, (yyvsp[-3].id), (yyvsp[-1].node_args_aux), (yyvsp[0].node_args), &(yyloc));
15368 /*% ripper: params!(Qnil, Qnil, $:1, $:3, *$:4[0..2]) %*/
15369 }
15370#line 15371 "parse.c"
15371 break;
15372
15373 case 475: /* block_param: block_args_tail */
15374#line 5057 "parse.y"
15375 {
15376 (yyval.node_args) = new_args(p, 0, 0, 0, 0, (yyvsp[0].node_args), &(yyloc));
15377 /*% ripper: params!(Qnil, Qnil, Qnil, Qnil, *$:1[0..2]) %*/
15378 }
15379#line 15380 "parse.c"
15380 break;
15381
15382 case 477: /* opt_block_param_def: block_param_def */
15383#line 5065 "parse.y"
15384 {
15385 p->command_start = TRUE;
15386 }
15387#line 15388 "parse.c"
15388 break;
15389
15390 case 478: /* block_param_def: '|' opt_block_param opt_bv_decl '|' */
15391#line 5071 "parse.y"
15392 {
15393 p->max_numparam = ORDINAL_PARAM;
15394 p->ctxt.in_argdef = 0;
15395 (yyval.node_args) = (yyvsp[-2].node_args);
15396 /*% ripper: block_var!($:2, $:3) %*/
15397 }
15398#line 15399 "parse.c"
15399 break;
15400
15401 case 479: /* opt_block_param: %empty */
15402#line 5080 "parse.y"
15403 {
15404 (yyval.node_args) = 0;
15405 /*% ripper: params!(Qnil,Qnil,Qnil,Qnil,Qnil,Qnil,Qnil) %*/
15406 }
15407#line 15408 "parse.c"
15408 break;
15409
15410 case 481: /* opt_bv_decl: option_'\n' */
15411#line 5088 "parse.y"
15412 {
15413 (yyval.id) = 0;
15414 /*% ripper: Qfalse %*/
15415 }
15416#line 15417 "parse.c"
15417 break;
15418
15419 case 482: /* opt_bv_decl: option_'\n' ';' bv_decls option_'\n' */
15420#line 5093 "parse.y"
15421 {
15422 (yyval.id) = 0;
15423 /*% ripper: $:3 %*/
15424 }
15425#line 15426 "parse.c"
15426 break;
15427
15428 case 485: /* bvar: "local variable or method" */
15429#line 5106 "parse.y"
15430 {
15431 new_bv(p, (yyvsp[0].id));
15432 /*% ripper: $:1 %*/
15433 }
15434#line 15435 "parse.c"
15435 break;
15436
15437 case 487: /* max_numparam: %empty */
15438#line 5113 "parse.y"
15439 {
15440 (yyval.num) = p->max_numparam;
15441 p->max_numparam = 0;
15442 }
15443#line 15444 "parse.c"
15444 break;
15445
15446 case 488: /* numparam: %empty */
15447#line 5119 "parse.y"
15448 {
15449 (yyval.node) = numparam_push(p);
15450 }
15451#line 15452 "parse.c"
15452 break;
15453
15454 case 489: /* it_id: %empty */
15455#line 5124 "parse.y"
15456 {
15457 (yyval.id) = p->it_id;
15458 p->it_id = 0;
15459 }
15460#line 15461 "parse.c"
15461 break;
15462
15463 case 490: /* @26: %empty */
15464#line 5131 "parse.y"
15465 {
15466 token_info_push(p, "->", &(yylsp[0]));
15467 (yyval.vars) = dyna_push(p);
15468 }
15469#line 15470 "parse.c"
15470 break;
15471
15472 case 491: /* $@27: %empty */
15473#line 5137 "parse.y"
15474 {
15475 CMDARG_PUSH(0);
15476 }
15477#line 15478 "parse.c"
15478 break;
15479
15480 case 492: /* lambda: "->" @26 max_numparam numparam it_id allow_exits f_larglist $@27 lambda_body */
15481#line 5141 "parse.y"
15482 {
15483 int max_numparam = p->max_numparam;
15484 ID it_id = p->it_id;
15485 p->lex.lpar_beg = (yyvsp[-8].num);
15486 p->max_numparam = (yyvsp[-6].num);
15487 p->it_id = (yyvsp[-4].id);
15488 restore_block_exit(p, (yyvsp[-3].node_exits));
15489 CMDARG_POP();
15490 (yyvsp[-2].node_args) = args_with_numbered(p, (yyvsp[-2].node_args), max_numparam, it_id);
15491 {
15492 YYLTYPE loc = code_loc_gen(&(yylsp[-2]), &(yylsp[0]));
15493 (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);
15494 nd_set_line(RNODE_LAMBDA((yyval.node))->nd_body, (yylsp[0]).end_pos.lineno);
15495 nd_set_line((yyval.node), (yylsp[-2]).end_pos.lineno);
15496 nd_set_first_loc((yyval.node), (yylsp[-8]).beg_pos);
15497 xfree((yyvsp[0].locations_lambda_body));
15498 }
15499 /*% ripper: lambda!($:args, $:body) %*/
15500 numparam_pop(p, (yyvsp[-5].node));
15501 dyna_pop(p, (yyvsp[-7].vars));
15502 }
15503#line 15504 "parse.c"
15504 break;
15505
15506 case 493: /* f_larglist: '(' f_args opt_bv_decl ')' */
15507#line 5165 "parse.y"
15508 {
15509 p->ctxt.in_argdef = 0;
15510 (yyval.node_args) = (yyvsp[-2].node_args);
15511 p->max_numparam = ORDINAL_PARAM;
15512 /*% ripper: paren!($:2) %*/
15513 }
15514#line 15515 "parse.c"
15515 break;
15516
15517 case 494: /* f_larglist: f_args */
15518#line 5172 "parse.y"
15519 {
15520 p->ctxt.in_argdef = 0;
15521 if (!args_info_empty_p(&(yyvsp[0].node_args)->nd_ainfo))
15522 p->max_numparam = ORDINAL_PARAM;
15523 (yyval.node_args) = (yyvsp[0].node_args);
15524 }
15525#line 15526 "parse.c"
15526 break;
15527
15528 case 495: /* lambda_body: tLAMBEG compstmt_stmts '}' */
15529#line 5181 "parse.y"
15530 {
15531 token_info_pop(p, "}", &(yylsp[0]));
15532 (yyval.locations_lambda_body) = new_locations_lambda_body(p, (yyvsp[-1].node), &(yylsp[-1]), &(yylsp[-2]), &(yylsp[0]));
15533 /*% ripper: $:2 %*/
15534 }
15535#line 15536 "parse.c"
15536 break;
15537
15538 case 496: /* $@28: %empty */
15539#line 5187 "parse.y"
15540 {
15541 push_end_expect_token_locations(p, &(yylsp[0]).beg_pos);
15542 }
15543#line 15544 "parse.c"
15544 break;
15545
15546 case 497: /* lambda_body: "'do' for lambda" $@28 bodystmt k_end */
15547#line 5191 "parse.y"
15548 {
15549 (yyval.locations_lambda_body) = new_locations_lambda_body(p, (yyvsp[-1].node), &(yylsp[-1]), &(yylsp[-3]), &(yylsp[0]));
15550 /*% ripper: $:3 %*/
15551 }
15552#line 15553 "parse.c"
15553 break;
15554
15555 case 498: /* do_block: k_do_block do_body k_end */
15556#line 5198 "parse.y"
15557 {
15558 (yyval.node) = (yyvsp[-1].node);
15559 set_embraced_location((yyval.node), &(yylsp[-2]), &(yylsp[0]));
15560 /*% ripper: $:2 %*/
15561 }
15562#line 15563 "parse.c"
15563 break;
15564
15565 case 499: /* block_call: command do_block */
15566#line 5206 "parse.y"
15567 {
15568 if (nd_type_p((yyvsp[-1].node), NODE_YIELD)) {
15569 compile_error(p, "block given to yield");
15570 }
15571 else {
15572 block_dup_check(p, get_nd_args(p, (yyvsp[-1].node)), (yyvsp[0].node));
15573 }
15574 (yyval.node) = method_add_block(p, (yyvsp[-1].node), (yyvsp[0].node), &(yyloc));
15575 fixpos((yyval.node), (yyvsp[-1].node));
15576 /*% ripper: method_add_block!($:1, $:2) %*/
15577 }
15578#line 15579 "parse.c"
15579 break;
15580
15581 case 500: /* block_call: block_call call_op2 operation2 opt_paren_args */
15582#line 5218 "parse.y"
15583 {
15584 bool has_args = (yyvsp[0].node) != 0;
15585 if (NODE_EMPTY_ARGS_P((yyvsp[0].node))) (yyvsp[0].node) = 0;
15586 (yyval.node) = new_qcall(p, (yyvsp[-2].id), (yyvsp[-3].node), (yyvsp[-1].id), (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
15587 /*% ripper: call!($:1, $:2, $:3) %*/
15588 if (has_args) {
15589 /*% ripper: method_add_arg!($:$, $:4) %*/
15590 }
15591 }
15592#line 15593 "parse.c"
15593 break;
15594
15595 case 501: /* block_call: block_call call_op2 operation2 opt_paren_args brace_block */
15596#line 5228 "parse.y"
15597 {
15598 if (NODE_EMPTY_ARGS_P((yyvsp[-1].node))) (yyvsp[-1].node) = 0;
15599 (yyval.node) = new_command_qcall(p, (yyvsp[-3].id), (yyvsp[-4].node), (yyvsp[-2].id), (yyvsp[-1].node), (yyvsp[0].node), &(yylsp[-2]), &(yyloc));
15600 /*% ripper: method_add_block!(command_call!($:1, $:2, $:3, $:4), $:5) %*/
15601 }
15602#line 15603 "parse.c"
15603 break;
15604
15605 case 502: /* block_call: block_call call_op2 operation2 command_args do_block */
15606#line 5234 "parse.y"
15607 {
15608 (yyval.node) = new_command_qcall(p, (yyvsp[-3].id), (yyvsp[-4].node), (yyvsp[-2].id), (yyvsp[-1].node), (yyvsp[0].node), &(yylsp[-2]), &(yyloc));
15609 /*% ripper: method_add_block!(command_call!($:1, $:2, $:3, $:4), $:5) %*/
15610 }
15611#line 15612 "parse.c"
15612 break;
15613
15614 case 503: /* block_call: block_call call_op2 paren_args */
15615#line 5239 "parse.y"
15616 {
15617 (yyval.node) = new_qcall(p, (yyvsp[-1].id), (yyvsp[-2].node), idCall, (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
15618 nd_set_line((yyval.node), (yylsp[-1]).end_pos.lineno);
15619 /*% ripper: method_add_arg!(call!($:1, $:2, ID2VAL(idCall)), $:3) %*/
15620 }
15621#line 15622 "parse.c"
15622 break;
15623
15624 case 504: /* method_call: fcall paren_args */
15625#line 5247 "parse.y"
15626 {
15627 (yyvsp[-1].node_fcall)->nd_args = (yyvsp[0].node);
15628 (yyval.node) = (NODE *)(yyvsp[-1].node_fcall);
15629 nd_set_last_loc((yyvsp[-1].node_fcall), (yylsp[0]).end_pos);
15630 /*% ripper: method_add_arg!(fcall!($:1), $:2) %*/
15631 }
15632#line 15633 "parse.c"
15633 break;
15634
15635 case 505: /* method_call: primary_value call_op operation2 opt_paren_args */
15636#line 5254 "parse.y"
15637 {
15638 bool has_args = (yyvsp[0].node) != 0;
15639 if (NODE_EMPTY_ARGS_P((yyvsp[0].node))) (yyvsp[0].node) = 0;
15640 (yyval.node) = new_qcall(p, (yyvsp[-2].id), (yyvsp[-3].node), (yyvsp[-1].id), (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
15641 nd_set_line((yyval.node), (yylsp[-1]).end_pos.lineno);
15642 /*% ripper: call!($:1, $:2, $:3) %*/
15643 if (has_args) {
15644 /*% ripper: method_add_arg!($:$, $:4) %*/
15645 }
15646 }
15647#line 15648 "parse.c"
15648 break;
15649
15650 case 506: /* method_call: primary_value "::" operation2 paren_args */
15651#line 5265 "parse.y"
15652 {
15653 (yyval.node) = new_qcall(p, idCOLON2, (yyvsp[-3].node), (yyvsp[-1].id), (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
15654 nd_set_line((yyval.node), (yylsp[-1]).end_pos.lineno);
15655 /*% ripper: method_add_arg!(call!($:1, $:2, $:3), $:4) %*/
15656 }
15657#line 15658 "parse.c"
15658 break;
15659
15660 case 507: /* method_call: primary_value "::" operation3 */
15661#line 5271 "parse.y"
15662 {
15663 (yyval.node) = new_qcall(p, idCOLON2, (yyvsp[-2].node), (yyvsp[0].id), 0, &(yylsp[0]), &(yyloc));
15664 /*% ripper: call!($:1, $:2, $:3) %*/
15665 }
15666#line 15667 "parse.c"
15667 break;
15668
15669 case 508: /* method_call: primary_value call_op2 paren_args */
15670#line 5276 "parse.y"
15671 {
15672 (yyval.node) = new_qcall(p, (yyvsp[-1].id), (yyvsp[-2].node), idCall, (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
15673 nd_set_line((yyval.node), (yylsp[-1]).end_pos.lineno);
15674 /*% ripper: method_add_arg!(call!($:1, $:2, ID2VAL(idCall)), $:3) %*/
15675 }
15676#line 15677 "parse.c"
15677 break;
15678
15679 case 509: /* method_call: "'super'" paren_args */
15680#line 5282 "parse.y"
15681 {
15682 rb_code_location_t lparen_loc = (yylsp[0]);
15683 rb_code_location_t rparen_loc = (yylsp[0]);
15684 lparen_loc.end_pos.column = lparen_loc.beg_pos.column + 1;
15685 rparen_loc.beg_pos.column = rparen_loc.end_pos.column - 1;
15686
15687 (yyval.node) = NEW_SUPER((yyvsp[0].node), &(yyloc), &(yylsp[-1]), &lparen_loc, &rparen_loc);
15688 /*% ripper: super!($:2) %*/
15689 }
15690#line 15691 "parse.c"
15691 break;
15692
15693 case 510: /* method_call: "'super'" */
15694#line 5292 "parse.y"
15695 {
15696 (yyval.node) = NEW_ZSUPER(&(yyloc));
15697 /*% ripper: zsuper! %*/
15698 }
15699#line 15700 "parse.c"
15700 break;
15701
15702 case 511: /* method_call: primary_value '[' opt_call_args rbracket */
15703#line 5297 "parse.y"
15704 {
15705 (yyval.node) = NEW_CALL((yyvsp[-3].node), tAREF, (yyvsp[-1].node), &(yyloc));
15706 fixpos((yyval.node), (yyvsp[-3].node));
15707 /*% ripper: aref!($:1, $:3) %*/
15708 }
15709#line 15710 "parse.c"
15710 break;
15711
15712 case 512: /* brace_block: '{' brace_body '}' */
15713#line 5305 "parse.y"
15714 {
15715 (yyval.node) = (yyvsp[-1].node);
15716 set_embraced_location((yyval.node), &(yylsp[-2]), &(yylsp[0]));
15717 /*% ripper: $:2 %*/
15718 }
15719#line 15720 "parse.c"
15720 break;
15721
15722 case 513: /* brace_block: k_do do_body k_end */
15723#line 5311 "parse.y"
15724 {
15725 (yyval.node) = (yyvsp[-1].node);
15726 set_embraced_location((yyval.node), &(yylsp[-2]), &(yylsp[0]));
15727 /*% ripper: $:2 %*/
15728 }
15729#line 15730 "parse.c"
15730 break;
15731
15732 case 514: /* @29: %empty */
15733#line 5318 "parse.y"
15734 {(yyval.vars) = dyna_push(p);}
15735#line 15736 "parse.c"
15736 break;
15737
15738 case 515: /* brace_body: @29 max_numparam numparam it_id allow_exits opt_block_param_def compstmt_stmts */
15739#line 5321 "parse.y"
15740 {
15741 int max_numparam = p->max_numparam;
15742 ID it_id = p->it_id;
15743 p->max_numparam = (yyvsp[-5].num);
15744 p->it_id = (yyvsp[-3].id);
15745 (yyvsp[-1].node_args) = args_with_numbered(p, (yyvsp[-1].node_args), max_numparam, it_id);
15746 (yyval.node) = NEW_ITER((yyvsp[-1].node_args), (yyvsp[0].node), &(yyloc));
15747 /*% ripper: brace_block!($:args, $:compstmt) %*/
15748 restore_block_exit(p, (yyvsp[-2].node_exits));
15749 numparam_pop(p, (yyvsp[-4].node));
15750 dyna_pop(p, (yyvsp[-6].vars));
15751 }
15752#line 15753 "parse.c"
15753 break;
15754
15755 case 516: /* @30: %empty */
15756#line 5335 "parse.y"
15757 {
15758 (yyval.vars) = dyna_push(p);
15759 CMDARG_PUSH(0);
15760 }
15761#line 15762 "parse.c"
15762 break;
15763
15764 case 517: /* do_body: @30 max_numparam numparam it_id allow_exits opt_block_param_def bodystmt */
15765#line 5341 "parse.y"
15766 {
15767 int max_numparam = p->max_numparam;
15768 ID it_id = p->it_id;
15769 p->max_numparam = (yyvsp[-5].num);
15770 p->it_id = (yyvsp[-3].id);
15771 (yyvsp[-1].node_args) = args_with_numbered(p, (yyvsp[-1].node_args), max_numparam, it_id);
15772 (yyval.node) = NEW_ITER((yyvsp[-1].node_args), (yyvsp[0].node), &(yyloc));
15773 /*% ripper: do_block!($:args, $:bodystmt) %*/
15774 CMDARG_POP();
15775 restore_block_exit(p, (yyvsp[-2].node_exits));
15776 numparam_pop(p, (yyvsp[-4].node));
15777 dyna_pop(p, (yyvsp[-6].vars));
15778 }
15779#line 15780 "parse.c"
15780 break;
15781
15782 case 518: /* case_args: arg_value */
15783#line 5357 "parse.y"
15784 {
15785 check_literal_when(p, (yyvsp[0].node), &(yylsp[0]));
15786 (yyval.node) = NEW_LIST((yyvsp[0].node), &(yyloc));
15787 /*% ripper: args_add!(args_new!, $:arg_value) %*/
15788 }
15789#line 15790 "parse.c"
15790 break;
15791
15792 case 519: /* case_args: "*" arg_value */
15793#line 5363 "parse.y"
15794 {
15795 (yyval.node) = NEW_SPLAT((yyvsp[0].node), &(yyloc), &(yylsp[-1]));
15796 /*% ripper: args_add_star!(args_new!, $:arg_value) %*/
15797 }
15798#line 15799 "parse.c"
15799 break;
15800
15801 case 520: /* case_args: case_args ',' arg_value */
15802#line 5368 "parse.y"
15803 {
15804 check_literal_when(p, (yyvsp[0].node), &(yylsp[0]));
15805 (yyval.node) = last_arg_append(p, (yyvsp[-2].node), (yyvsp[0].node), &(yyloc));
15806 /*% ripper: args_add!($:non_last_args, $:arg_value) %*/
15807 }
15808#line 15809 "parse.c"
15809 break;
15810
15811 case 521: /* case_args: case_args ',' "*" arg_value */
15812#line 5374 "parse.y"
15813 {
15814 (yyval.node) = rest_arg_append(p, (yyvsp[-3].node), (yyvsp[0].node), &(yyloc));
15815 /*% ripper: args_add_star!($:non_last_args, $:arg_value) %*/
15816 }
15817#line 15818 "parse.c"
15818 break;
15819
15820 case 522: /* case_body: k_when case_args then compstmt_stmts cases */
15821#line 5383 "parse.y"
15822 {
15823 (yyval.node) = NEW_WHEN((yyvsp[-3].node), (yyvsp[-1].node), (yyvsp[0].node), &(yyloc), &(yylsp[-4]), &(yylsp[-2]));
15824 fixpos((yyval.node), (yyvsp[-3].node));
15825 /*% ripper: when!($:2, $:4, $:5) %*/
15826 }
15827#line 15828 "parse.c"
15828 break;
15829
15830 case 525: /* p_pvtbl: %empty */
15831#line 5394 "parse.y"
15832 {(yyval.tbl) = p->pvtbl; p->pvtbl = st_init_numtable();}
15833#line 15834 "parse.c"
15834 break;
15835
15836 case 526: /* p_pktbl: %empty */
15837#line 5395 "parse.y"
15838 {(yyval.tbl) = p->pktbl; p->pktbl = 0;}
15839#line 15840 "parse.c"
15840 break;
15841
15842 case 527: /* p_in_kwarg: %empty */
15843#line 5397 "parse.y"
15844 {
15845 (yyval.ctxt) = p->ctxt;
15846 SET_LEX_STATE(EXPR_BEG|EXPR_LABEL);
15847 p->command_start = FALSE;
15848 p->ctxt.in_kwarg = 1;
15849 p->ctxt.in_alt_pattern = 0;
15850 p->ctxt.capture_in_pattern = 0;
15851 }
15852#line 15853 "parse.c"
15853 break;
15854
15855 case 528: /* $@31: %empty */
15856#line 5410 "parse.y"
15857 {
15858 pop_pktbl(p, (yyvsp[-2].tbl));
15859 pop_pvtbl(p, (yyvsp[-3].tbl));
15860 p->ctxt.in_kwarg = (yyvsp[-4].ctxt).in_kwarg;
15861 p->ctxt.in_alt_pattern = (yyvsp[-4].ctxt).in_alt_pattern;
15862 p->ctxt.capture_in_pattern = (yyvsp[-4].ctxt).capture_in_pattern;
15863 }
15864#line 15865 "parse.c"
15865 break;
15866
15867 case 529: /* p_case_body: "'in'" p_in_kwarg p_pvtbl p_pktbl p_top_expr then $@31 compstmt_stmts p_cases */
15868#line 5419 "parse.y"
15869 {
15870 (yyval.node) = NEW_IN((yyvsp[-4].node), (yyvsp[-1].node), (yyvsp[0].node), &(yyloc), &(yylsp[-8]), &(yylsp[-3]), &NULL_LOC);
15871 /*% ripper: in!($:expr, $:compstmt, $:cases) %*/
15872 }
15873#line 15874 "parse.c"
15874 break;
15875
15876 case 533: /* p_top_expr: p_top_expr_body "'if' modifier" expr_value */
15877#line 5431 "parse.y"
15878 {
15879 (yyval.node) = new_if(p, (yyvsp[0].node), (yyvsp[-2].node), 0, &(yyloc), &(yylsp[-1]), &NULL_LOC, &NULL_LOC);
15880 fixpos((yyval.node), (yyvsp[0].node));
15881 /*% ripper: if_mod!($:3, $:1) %*/
15882 }
15883#line 15884 "parse.c"
15884 break;
15885
15886 case 534: /* p_top_expr: p_top_expr_body "'unless' modifier" expr_value */
15887#line 5437 "parse.y"
15888 {
15889 (yyval.node) = new_unless(p, (yyvsp[0].node), (yyvsp[-2].node), 0, &(yyloc), &(yylsp[-1]), &NULL_LOC, &NULL_LOC);
15890 fixpos((yyval.node), (yyvsp[0].node));
15891 /*% ripper: unless_mod!($:3, $:1) %*/
15892 }
15893#line 15894 "parse.c"
15894 break;
15895
15896 case 536: /* p_top_expr_body: p_expr ',' */
15897#line 5446 "parse.y"
15898 {
15899 (yyval.node) = new_array_pattern_tail(p, 0, 1, 0, 0, &(yyloc));
15900 (yyval.node) = new_array_pattern(p, 0, (yyvsp[-1].node), (yyval.node), &(yyloc));
15901 /*% ripper: aryptn!(Qnil, [$:1], Qnil, Qnil) %*/
15902 }
15903#line 15904 "parse.c"
15904 break;
15905
15906 case 537: /* p_top_expr_body: p_expr ',' p_args */
15907#line 5452 "parse.y"
15908 {
15909 (yyval.node) = new_array_pattern(p, 0, (yyvsp[-2].node), (yyvsp[0].node), &(yyloc));
15910 nd_set_first_loc((yyval.node), (yylsp[-2]).beg_pos);
15911 /*% ripper: aryptn!(Qnil, aryptn_pre_args(p, $:1, $:3[0]), *$:3[1..2]) %*/
15912 }
15913#line 15914 "parse.c"
15914 break;
15915
15916 case 538: /* p_top_expr_body: p_find */
15917#line 5458 "parse.y"
15918 {
15919 (yyval.node) = new_find_pattern(p, 0, (yyvsp[0].node), &(yyloc));
15920 /*% ripper: fndptn!(Qnil, *$:1[0..2]) %*/
15921 }
15922#line 15923 "parse.c"
15923 break;
15924
15925 case 539: /* p_top_expr_body: p_args_tail */
15926#line 5463 "parse.y"
15927 {
15928 (yyval.node) = new_array_pattern(p, 0, 0, (yyvsp[0].node), &(yyloc));
15929 /*% ripper: aryptn!(Qnil, *$:1[0..2]) %*/
15930 }
15931#line 15932 "parse.c"
15932 break;
15933
15934 case 540: /* p_top_expr_body: p_kwargs */
15935#line 5468 "parse.y"
15936 {
15937 (yyval.node) = new_hash_pattern(p, 0, (yyvsp[0].node), &(yyloc));
15938 /*% ripper: hshptn!(Qnil, *$:1[0..1]) %*/
15939 }
15940#line 15941 "parse.c"
15941 break;
15942
15943 case 542: /* p_as: p_expr "=>" p_variable */
15944#line 5478 "parse.y"
15945 {
15946 NODE *n = NEW_LIST((yyvsp[-2].node), &(yyloc));
15947 n = list_append(p, n, (yyvsp[0].node));
15948 (yyval.node) = new_hash(p, n, &(yyloc));
15949 /*% ripper: binary!($:1, ID2VAL((id_assoc)), $:3) %*/
15950 }
15951#line 15952 "parse.c"
15952 break;
15953
15954 case 544: /* $@32: %empty */
15955#line 5488 "parse.y"
15956 {
15957 p->ctxt.in_alt_pattern = 1;
15958 }
15959#line 15960 "parse.c"
15960 break;
15961
15962 case 545: /* p_alt: p_alt '|' $@32 p_expr_basic */
15963#line 5492 "parse.y"
15964 {
15965 if (p->ctxt.capture_in_pattern) {
15966 yyerror1(&(yylsp[-2]), "alternative pattern after variable capture");
15967 }
15968 p->ctxt.in_alt_pattern = 0;
15969 (yyval.node) = NEW_OR((yyvsp[-3].node), (yyvsp[0].node), &(yyloc), &(yylsp[-2]));
15970 /*% ripper: binary!($:left, ID2VAL(idOr), $:right) %*/
15971 }
15972#line 15973 "parse.c"
15973 break;
15974
15975 case 547: /* p_lparen: '(' p_pktbl */
15976#line 5504 "parse.y"
15977 {
15978 (yyval.tbl) = (yyvsp[0].tbl);
15979 /*% ripper: $:2 %*/
15980 }
15981#line 15982 "parse.c"
15982 break;
15983
15984 case 548: /* p_lbracket: '[' p_pktbl */
15985#line 5511 "parse.y"
15986 {
15987 (yyval.tbl) = (yyvsp[0].tbl);
15988 /*% ripper: $:2 %*/
15989 }
15990#line 15991 "parse.c"
15991 break;
15992
15993 case 551: /* p_expr_basic: p_const p_lparen p_args rparen */
15994#line 5520 "parse.y"
15995 {
15996 pop_pktbl(p, (yyvsp[-2].tbl));
15997 (yyval.node) = new_array_pattern(p, (yyvsp[-3].node), 0, (yyvsp[-1].node), &(yyloc));
15998 nd_set_first_loc((yyval.node), (yylsp[-3]).beg_pos);
15999 /*% ripper: aryptn!($:p_const, *$:p_args[0..2]) %*/
16000 }
16001#line 16002 "parse.c"
16002 break;
16003
16004 case 552: /* p_expr_basic: p_const p_lparen p_find rparen */
16005#line 5527 "parse.y"
16006 {
16007 pop_pktbl(p, (yyvsp[-2].tbl));
16008 (yyval.node) = new_find_pattern(p, (yyvsp[-3].node), (yyvsp[-1].node), &(yyloc));
16009 nd_set_first_loc((yyval.node), (yylsp[-3]).beg_pos);
16010 /*% ripper: fndptn!($:p_const, *$:p_find[0..2]) %*/
16011 }
16012#line 16013 "parse.c"
16013 break;
16014
16015 case 553: /* p_expr_basic: p_const p_lparen p_kwargs rparen */
16016#line 5534 "parse.y"
16017 {
16018 pop_pktbl(p, (yyvsp[-2].tbl));
16019 (yyval.node) = new_hash_pattern(p, (yyvsp[-3].node), (yyvsp[-1].node), &(yyloc));
16020 nd_set_first_loc((yyval.node), (yylsp[-3]).beg_pos);
16021 /*% ripper: hshptn!($:p_const, *$:p_kwargs[0..1]) %*/
16022 }
16023#line 16024 "parse.c"
16024 break;
16025
16026 case 554: /* p_expr_basic: p_const '(' rparen */
16027#line 5541 "parse.y"
16028 {
16029 (yyval.node) = new_array_pattern_tail(p, 0, 0, 0, 0, &(yyloc));
16030 (yyval.node) = new_array_pattern(p, (yyvsp[-2].node), 0, (yyval.node), &(yyloc));
16031 /*% ripper: aryptn!($:p_const, Qnil, Qnil, Qnil) %*/
16032 }
16033#line 16034 "parse.c"
16034 break;
16035
16036 case 555: /* p_expr_basic: p_const p_lbracket p_args rbracket */
16037#line 5547 "parse.y"
16038 {
16039 pop_pktbl(p, (yyvsp[-2].tbl));
16040 (yyval.node) = new_array_pattern(p, (yyvsp[-3].node), 0, (yyvsp[-1].node), &(yyloc));
16041 nd_set_first_loc((yyval.node), (yylsp[-3]).beg_pos);
16042 /*% ripper: aryptn!($:p_const, *$:p_args[0..2]) %*/
16043 }
16044#line 16045 "parse.c"
16045 break;
16046
16047 case 556: /* p_expr_basic: p_const p_lbracket p_find rbracket */
16048#line 5554 "parse.y"
16049 {
16050 pop_pktbl(p, (yyvsp[-2].tbl));
16051 (yyval.node) = new_find_pattern(p, (yyvsp[-3].node), (yyvsp[-1].node), &(yyloc));
16052 nd_set_first_loc((yyval.node), (yylsp[-3]).beg_pos);
16053 /*% ripper: fndptn!($:p_const, *$:p_find[0..2]) %*/
16054 }
16055#line 16056 "parse.c"
16056 break;
16057
16058 case 557: /* p_expr_basic: p_const p_lbracket p_kwargs rbracket */
16059#line 5561 "parse.y"
16060 {
16061 pop_pktbl(p, (yyvsp[-2].tbl));
16062 (yyval.node) = new_hash_pattern(p, (yyvsp[-3].node), (yyvsp[-1].node), &(yyloc));
16063 nd_set_first_loc((yyval.node), (yylsp[-3]).beg_pos);
16064 /*% ripper: hshptn!($:p_const, *$:p_kwargs[0..1]) %*/
16065 }
16066#line 16067 "parse.c"
16067 break;
16068
16069 case 558: /* p_expr_basic: p_const '[' rbracket */
16070#line 5568 "parse.y"
16071 {
16072 (yyval.node) = new_array_pattern_tail(p, 0, 0, 0, 0, &(yyloc));
16073 (yyval.node) = new_array_pattern(p, (yyvsp[-2].node), 0, (yyval.node), &(yyloc));
16074 /*% ripper: aryptn!($:1, Qnil, Qnil, Qnil) %*/
16075 }
16076#line 16077 "parse.c"
16077 break;
16078
16079 case 559: /* p_expr_basic: "[" p_args rbracket */
16080#line 5574 "parse.y"
16081 {
16082 (yyval.node) = new_array_pattern(p, 0, 0, (yyvsp[-1].node), &(yyloc));
16083 /*% ripper: aryptn!(Qnil, *$:p_args[0..2]) %*/
16084 }
16085#line 16086 "parse.c"
16086 break;
16087
16088 case 560: /* p_expr_basic: "[" p_find rbracket */
16089#line 5579 "parse.y"
16090 {
16091 (yyval.node) = new_find_pattern(p, 0, (yyvsp[-1].node), &(yyloc));
16092 /*% ripper: fndptn!(Qnil, *$:p_find[0..2]) %*/
16093 }
16094#line 16095 "parse.c"
16095 break;
16096
16097 case 561: /* p_expr_basic: "[" rbracket */
16098#line 5584 "parse.y"
16099 {
16100 (yyval.node) = new_array_pattern_tail(p, 0, 0, 0, 0, &(yyloc));
16101 (yyval.node) = new_array_pattern(p, 0, 0, (yyval.node), &(yyloc));
16102 /*% ripper: aryptn!(Qnil, Qnil, Qnil, Qnil) %*/
16103 }
16104#line 16105 "parse.c"
16105 break;
16106
16107 case 562: /* $@33: %empty */
16108#line 5590 "parse.y"
16109 {
16110 p->ctxt.in_kwarg = 0;
16111 }
16112#line 16113 "parse.c"
16113 break;
16114
16115 case 563: /* p_expr_basic: "{" p_pktbl lex_ctxt $@33 p_kwargs rbrace */
16116#line 5594 "parse.y"
16117 {
16118 pop_pktbl(p, (yyvsp[-4].tbl));
16119 p->ctxt.in_kwarg = (yyvsp[-3].ctxt).in_kwarg;
16120 (yyval.node) = new_hash_pattern(p, 0, (yyvsp[-1].node), &(yyloc));
16121 /*% ripper: hshptn!(Qnil, *$:p_kwargs[0..1]) %*/
16122 }
16123#line 16124 "parse.c"
16124 break;
16125
16126 case 564: /* p_expr_basic: "{" rbrace */
16127#line 5601 "parse.y"
16128 {
16129 (yyval.node) = new_hash_pattern_tail(p, 0, 0, &(yyloc));
16130 (yyval.node) = new_hash_pattern(p, 0, (yyval.node), &(yyloc));
16131 /*% ripper: hshptn!(Qnil, Qnil, Qnil) %*/
16132 }
16133#line 16134 "parse.c"
16134 break;
16135
16136 case 565: /* p_expr_basic: "(" p_pktbl p_expr rparen */
16137#line 5607 "parse.y"
16138 {
16139 pop_pktbl(p, (yyvsp[-2].tbl));
16140 (yyval.node) = (yyvsp[-1].node);
16141 /*% ripper: $:p_expr %*/
16142 }
16143#line 16144 "parse.c"
16144 break;
16145
16146 case 566: /* p_args: p_expr */
16147#line 5615 "parse.y"
16148 {
16149 NODE *pre_args = NEW_LIST((yyvsp[0].node), &(yyloc));
16150 (yyval.node) = new_array_pattern_tail(p, pre_args, 0, 0, 0, &(yyloc));
16151 /*% ripper: [[$:1], Qnil, Qnil] %*/
16152 }
16153#line 16154 "parse.c"
16154 break;
16155
16156 case 567: /* p_args: p_args_head */
16157#line 5621 "parse.y"
16158 {
16159 (yyval.node) = new_array_pattern_tail(p, (yyvsp[0].node), 1, 0, 0, &(yyloc));
16160 /*% ripper: [$:1, Qnil, Qnil] %*/
16161 }
16162#line 16163 "parse.c"
16163 break;
16164
16165 case 568: /* p_args: p_args_head p_arg */
16166#line 5626 "parse.y"
16167 {
16168 (yyval.node) = new_array_pattern_tail(p, list_concat((yyvsp[-1].node), (yyvsp[0].node)), 0, 0, 0, &(yyloc));
16169 /*% ripper: [rb_ary_concat($:1, $:2), Qnil, Qnil] %*/
16170 }
16171#line 16172 "parse.c"
16172 break;
16173
16174 case 569: /* p_args: p_args_head p_rest */
16175#line 5631 "parse.y"
16176 {
16177 (yyval.node) = new_array_pattern_tail(p, (yyvsp[-1].node), 1, (yyvsp[0].node), 0, &(yyloc));
16178 /*% ripper: [$:1, $:2, Qnil] %*/
16179 }
16180#line 16181 "parse.c"
16181 break;
16182
16183 case 570: /* p_args: p_args_head p_rest ',' p_args_post */
16184#line 5636 "parse.y"
16185 {
16186 (yyval.node) = new_array_pattern_tail(p, (yyvsp[-3].node), 1, (yyvsp[-2].node), (yyvsp[0].node), &(yyloc));
16187 /*% ripper: [$:1, $:2, $:4] %*/
16188 }
16189#line 16190 "parse.c"
16190 break;
16191
16192 case 573: /* p_args_head: p_args_head p_arg ',' */
16193#line 5645 "parse.y"
16194 {
16195 (yyval.node) = list_concat((yyvsp[-2].node), (yyvsp[-1].node));
16196 /*% ripper: rb_ary_concat($:1, $:2) %*/
16197 }
16198#line 16199 "parse.c"
16199 break;
16200
16201 case 574: /* p_args_tail: p_rest */
16202#line 5652 "parse.y"
16203 {
16204 (yyval.node) = new_array_pattern_tail(p, 0, 1, (yyvsp[0].node), 0, &(yyloc));
16205 /*% ripper: [Qnil, $:1, Qnil] %*/
16206 }
16207#line 16208 "parse.c"
16208 break;
16209
16210 case 575: /* p_args_tail: p_rest ',' p_args_post */
16211#line 5657 "parse.y"
16212 {
16213 (yyval.node) = new_array_pattern_tail(p, 0, 1, (yyvsp[-2].node), (yyvsp[0].node), &(yyloc));
16214 /*% ripper: [Qnil, $:1, $:3] %*/
16215 }
16216#line 16217 "parse.c"
16217 break;
16218
16219 case 576: /* p_find: p_rest ',' p_args_post ',' p_rest */
16220#line 5664 "parse.y"
16221 {
16222 (yyval.node) = new_find_pattern_tail(p, (yyvsp[-4].node), (yyvsp[-2].node), (yyvsp[0].node), &(yyloc));
16223 /*% ripper: [$:1, $:3, $:5] %*/
16224 }
16225#line 16226 "parse.c"
16226 break;
16227
16228 case 577: /* p_rest: "*" "local variable or method" */
16229#line 5672 "parse.y"
16230 {
16231 error_duplicate_pattern_variable(p, (yyvsp[0].id), &(yylsp[0]));
16232 /*% ripper: var_field!($:2) %*/
16233 (yyval.node) = assignable(p, (yyvsp[0].id), 0, &(yyloc));
16234 }
16235#line 16236 "parse.c"
16236 break;
16237
16238 case 578: /* p_rest: "*" */
16239#line 5678 "parse.y"
16240 {
16241 (yyval.node) = 0;
16242 /*% ripper: var_field!(Qnil) %*/
16243 }
16244#line 16245 "parse.c"
16245 break;
16246
16247 case 580: /* p_args_post: p_args_post ',' p_arg */
16248#line 5686 "parse.y"
16249 {
16250 (yyval.node) = list_concat((yyvsp[-2].node), (yyvsp[0].node));
16251 /*% ripper: rb_ary_concat($:1, $:3) %*/
16252 }
16253#line 16254 "parse.c"
16254 break;
16255
16256 case 581: /* p_arg: p_expr */
16257#line 5693 "parse.y"
16258 {
16259 (yyval.node) = NEW_LIST((yyvsp[0].node), &(yyloc));
16260 /*% ripper: [$:1] %*/
16261 }
16262#line 16263 "parse.c"
16263 break;
16264
16265 case 582: /* p_kwargs: p_kwarg ',' p_any_kwrest */
16266#line 5700 "parse.y"
16267 {
16268 (yyval.node) = new_hash_pattern_tail(p, new_unique_key_hash(p, (yyvsp[-2].node), &(yyloc)), (yyvsp[0].id), &(yyloc));
16269 /*% ripper: [$:1, $:3] %*/
16270 }
16271#line 16272 "parse.c"
16272 break;
16273
16274 case 583: /* p_kwargs: p_kwarg */
16275#line 5705 "parse.y"
16276 {
16277 (yyval.node) = new_hash_pattern_tail(p, new_unique_key_hash(p, (yyvsp[0].node), &(yyloc)), 0, &(yyloc));
16278 /*% ripper: [$:1, Qnil] %*/
16279 }
16280#line 16281 "parse.c"
16281 break;
16282
16283 case 584: /* p_kwargs: p_kwarg ',' */
16284#line 5710 "parse.y"
16285 {
16286 (yyval.node) = new_hash_pattern_tail(p, new_unique_key_hash(p, (yyvsp[-1].node), &(yyloc)), 0, &(yyloc));
16287 /*% ripper: [$:1, Qnil] %*/
16288 }
16289#line 16290 "parse.c"
16290 break;
16291
16292 case 585: /* p_kwargs: p_any_kwrest */
16293#line 5715 "parse.y"
16294 {
16295 (yyval.node) = new_hash_pattern_tail(p, new_hash(p, 0, &(yyloc)), (yyvsp[0].id), &(yyloc));
16296 /*% ripper: [[], $:1] %*/
16297 }
16298#line 16299 "parse.c"
16299 break;
16300
16301 case 587: /* p_kwarg: p_kwarg ',' p_kw */
16302#line 5724 "parse.y"
16303 {
16304 (yyval.node) = list_concat((yyvsp[-2].node), (yyvsp[0].node));
16305 /*% ripper: rb_ary_push($:1, $:3) %*/
16306 }
16307#line 16308 "parse.c"
16308 break;
16309
16310 case 588: /* p_kw: p_kw_label p_expr */
16311#line 5731 "parse.y"
16312 {
16313 error_duplicate_pattern_key(p, (yyvsp[-1].id), &(yylsp[-1]));
16314 (yyval.node) = list_append(p, NEW_LIST(NEW_SYM(rb_id2str((yyvsp[-1].id)), &(yylsp[-1])), &(yyloc)), (yyvsp[0].node));
16315 /*% ripper: [$:1, $:2] %*/
16316 }
16317#line 16318 "parse.c"
16318 break;
16319
16320 case 589: /* p_kw: p_kw_label */
16321#line 5737 "parse.y"
16322 {
16323 error_duplicate_pattern_key(p, (yyvsp[0].id), &(yylsp[0]));
16324 if ((yyvsp[0].id) && !is_local_id((yyvsp[0].id))) {
16325 yyerror1(&(yylsp[0]), "key must be valid as local variables");
16326 }
16327 error_duplicate_pattern_variable(p, (yyvsp[0].id), &(yylsp[0]));
16328 (yyval.node) = list_append(p, NEW_LIST(NEW_SYM(rb_id2str((yyvsp[0].id)), &(yyloc)), &(yyloc)), assignable(p, (yyvsp[0].id), 0, &(yyloc)));
16329 /*% ripper: [$:1, Qnil] %*/
16330 }
16331#line 16332 "parse.c"
16332 break;
16333
16334 case 591: /* p_kw_label: "string literal" string_contents tLABEL_END */
16335#line 5750 "parse.y"
16336 {
16337 YYLTYPE loc = code_loc_gen(&(yylsp[-2]), &(yylsp[0]));
16338 if (!(yyvsp[-1].node) || nd_type_p((yyvsp[-1].node), NODE_STR)) {
16339 NODE *node = dsym_node(p, (yyvsp[-1].node), &loc);
16340 (yyval.id) = rb_sym2id(rb_node_sym_string_val(node));
16341 }
16342 else {
16343 yyerror1(&loc, "symbol literal with interpolation is not allowed");
16344 (yyval.id) = rb_intern_str(STR_NEW0());
16345 }
16346 /*% ripper: $:2 %*/
16347 }
16348#line 16349 "parse.c"
16349 break;
16350
16351 case 592: /* p_kwrest: kwrest_mark "local variable or method" */
16352#line 5765 "parse.y"
16353 {
16354 (yyval.id) = (yyvsp[0].id);
16355 /*% ripper: var_field!($:2) %*/
16356 }
16357#line 16358 "parse.c"
16358 break;
16359
16360 case 593: /* p_kwrest: kwrest_mark */
16361#line 5770 "parse.y"
16362 {
16363 (yyval.id) = 0;
16364 /*% ripper: Qnil %*/
16365 }
16366#line 16367 "parse.c"
16367 break;
16368
16369 case 594: /* p_kwnorest: kwrest_mark "'nil'" */
16370#line 5777 "parse.y"
16371 {
16372 (yyval.id) = 0;
16373 }
16374#line 16375 "parse.c"
16375 break;
16376
16377 case 596: /* p_any_kwrest: p_kwnorest */
16378#line 5784 "parse.y"
16379 {
16380 (yyval.id) = idNil;
16381 /*% ripper: var_field!(ID2VAL(idNil)) %*/
16382 }
16383#line 16384 "parse.c"
16384 break;
16385
16386 case 598: /* range_expr_p_primitive: p_primitive ".." p_primitive */
16387#line 3103 "parse.y"
16388 {
16389 value_expr(p, (yyvsp[-2].node));
16390 value_expr(p, (yyvsp[0].node));
16391 (yyval.node) = NEW_DOT2((yyvsp[-2].node), (yyvsp[0].node), &(yyloc), &(yylsp[-1]));
16392 /*% ripper: dot2!($:1, $:3) %*/
16393 }
16394#line 16395 "parse.c"
16395 break;
16396
16397 case 599: /* range_expr_p_primitive: p_primitive "..." p_primitive */
16398#line 3110 "parse.y"
16399 {
16400 value_expr(p, (yyvsp[-2].node));
16401 value_expr(p, (yyvsp[0].node));
16402 (yyval.node) = NEW_DOT3((yyvsp[-2].node), (yyvsp[0].node), &(yyloc), &(yylsp[-1]));
16403 /*% ripper: dot3!($:1, $:3) %*/
16404 }
16405#line 16406 "parse.c"
16406 break;
16407
16408 case 600: /* range_expr_p_primitive: p_primitive ".." */
16409#line 3117 "parse.y"
16410 {
16411 value_expr(p, (yyvsp[-1].node));
16412 (yyval.node) = NEW_DOT2((yyvsp[-1].node), new_nil_at(p, &(yylsp[0]).end_pos), &(yyloc), &(yylsp[0]));
16413 /*% ripper: dot2!($:1, Qnil) %*/
16414 }
16415#line 16416 "parse.c"
16416 break;
16417
16418 case 601: /* range_expr_p_primitive: p_primitive "..." */
16419#line 3123 "parse.y"
16420 {
16421 value_expr(p, (yyvsp[-1].node));
16422 (yyval.node) = NEW_DOT3((yyvsp[-1].node), new_nil_at(p, &(yylsp[0]).end_pos), &(yyloc), &(yylsp[0]));
16423 /*% ripper: dot3!($:1, Qnil) %*/
16424 }
16425#line 16426 "parse.c"
16426 break;
16427
16428 case 602: /* range_expr_p_primitive: "(.." p_primitive */
16429#line 3129 "parse.y"
16430 {
16431 value_expr(p, (yyvsp[0].node));
16432 (yyval.node) = NEW_DOT2(new_nil_at(p, &(yylsp[-1]).beg_pos), (yyvsp[0].node), &(yyloc), &(yylsp[-1]));
16433 /*% ripper: dot2!(Qnil, $:2) %*/
16434 }
16435#line 16436 "parse.c"
16436 break;
16437
16438 case 603: /* range_expr_p_primitive: "(..." p_primitive */
16439#line 3135 "parse.y"
16440 {
16441 value_expr(p, (yyvsp[0].node));
16442 (yyval.node) = NEW_DOT3(new_nil_at(p, &(yylsp[-1]).beg_pos), (yyvsp[0].node), &(yyloc), &(yylsp[-1]));
16443 /*% ripper: dot3!(Qnil, $:2) %*/
16444 }
16445#line 16446 "parse.c"
16446 break;
16447
16448 case 616: /* p_primitive: keyword_variable */
16449#line 5799 "parse.y"
16450 {
16451 if (!((yyval.node) = gettable(p, (yyvsp[0].id), &(yyloc)))) (yyval.node) = NEW_ERROR(&(yyloc));
16452 /*% ripper: var_ref!($:1) %*/
16453 }
16454#line 16455 "parse.c"
16455 break;
16456
16457 case 618: /* p_variable: "local variable or method" */
16458#line 5807 "parse.y"
16459 {
16460 error_duplicate_pattern_variable(p, (yyvsp[0].id), &(yylsp[0]));
16461 /*% ripper: var_field!($:1) %*/
16462 (yyval.node) = assignable(p, (yyvsp[0].id), 0, &(yyloc));
16463 }
16464#line 16465 "parse.c"
16465 break;
16466
16467 case 619: /* p_var_ref: '^' "local variable or method" */
16468#line 5815 "parse.y"
16469 {
16470 NODE *n = gettable(p, (yyvsp[0].id), &(yyloc));
16471 if (!n) {
16472 n = NEW_ERROR(&(yyloc));
16473 }
16474 else if (!(nd_type_p(n, NODE_LVAR) || nd_type_p(n, NODE_DVAR))) {
16475 compile_error(p, "%"PRIsVALUE": no such local variable", rb_id2str((yyvsp[0].id)));
16476 }
16477 (yyval.node) = n;
16478 /*% ripper: var_ref!($:2) %*/
16479 }
16480#line 16481 "parse.c"
16481 break;
16482
16483 case 620: /* p_var_ref: '^' nonlocal_var */
16484#line 5827 "parse.y"
16485 {
16486 if (!((yyval.node) = gettable(p, (yyvsp[0].id), &(yyloc)))) (yyval.node) = NEW_ERROR(&(yyloc));
16487 /*% ripper: var_ref!($:2) %*/
16488 }
16489#line 16490 "parse.c"
16490 break;
16491
16492 case 621: /* p_expr_ref: '^' "(" expr_value rparen */
16493#line 5834 "parse.y"
16494 {
16495 (yyval.node) = NEW_BLOCK((yyvsp[-1].node), &(yyloc));
16496 /*% ripper: begin!($:3) %*/
16497 }
16498#line 16499 "parse.c"
16499 break;
16500
16501 case 622: /* p_const: ":: at EXPR_BEG" cname */
16502#line 5841 "parse.y"
16503 {
16504 (yyval.node) = NEW_COLON3((yyvsp[0].id), &(yyloc), &(yylsp[-1]), &(yylsp[0]));
16505 /*% ripper: top_const_ref!($:2) %*/
16506 }
16507#line 16508 "parse.c"
16508 break;
16509
16510 case 623: /* p_const: p_const "::" cname */
16511#line 5846 "parse.y"
16512 {
16513 (yyval.node) = NEW_COLON2((yyvsp[-2].node), (yyvsp[0].id), &(yyloc), &(yylsp[-1]), &(yylsp[0]));
16514 /*% ripper: const_path_ref!($:1, $:3) %*/
16515 }
16516#line 16517 "parse.c"
16517 break;
16518
16519 case 624: /* p_const: "constant" */
16520#line 5851 "parse.y"
16521 {
16522 (yyval.node) = gettable(p, (yyvsp[0].id), &(yyloc));
16523 /*% ripper: var_ref!($:1) %*/
16524 }
16525#line 16526 "parse.c"
16526 break;
16527
16528 case 625: /* opt_rescue: k_rescue exc_list exc_var then compstmt_stmts opt_rescue */
16529#line 5860 "parse.y"
16530 {
16531 NODE *err = (yyvsp[-3].node);
16532 if ((yyvsp[-3].node)) {
16533 err = NEW_ERRINFO(&(yylsp[-3]));
16534 err = node_assign(p, (yyvsp[-3].node), err, NO_LEX_CTXT, &(yylsp[-3]));
16535 }
16536 (yyval.node) = NEW_RESBODY((yyvsp[-4].node), (yyvsp[-3].node), (yyvsp[-1].node), (yyvsp[0].node), &(yyloc));
16537 if ((yyvsp[-4].node)) {
16538 fixpos((yyval.node), (yyvsp[-4].node));
16539 }
16540 else if ((yyvsp[-3].node)) {
16541 fixpos((yyval.node), (yyvsp[-3].node));
16542 }
16543 else {
16544 fixpos((yyval.node), (yyvsp[-1].node));
16545 }
16546 /*% ripper: rescue!($:2, $:3, $:5, $:6) %*/
16547 }
16548#line 16549 "parse.c"
16549 break;
16550
16551 case 627: /* exc_list: arg_value */
16552#line 5882 "parse.y"
16553 {
16554 (yyval.node) = NEW_LIST((yyvsp[0].node), &(yyloc));
16555 /*% ripper: rb_ary_new3(1, $:1) %*/
16556 }
16557#line 16558 "parse.c"
16558 break;
16559
16560 case 628: /* exc_list: mrhs */
16561#line 5887 "parse.y"
16562 {
16563 if (!((yyval.node) = splat_array((yyvsp[0].node)))) (yyval.node) = (yyvsp[0].node);
16564 }
16565#line 16566 "parse.c"
16566 break;
16567
16568 case 630: /* exc_var: "=>" lhs */
16569#line 5894 "parse.y"
16570 {
16571 (yyval.node) = (yyvsp[0].node);
16572 /*% ripper: $:2 %*/
16573 }
16574#line 16575 "parse.c"
16575 break;
16576
16577 case 632: /* opt_ensure: k_ensure stmts option_terms */
16578#line 5902 "parse.y"
16579 {
16580 p->ctxt.in_rescue = (yyvsp[-2].ctxt).in_rescue;
16581 (yyval.node) = (yyvsp[-1].node);
16582 void_expr(p, void_stmts(p, (yyval.node)));
16583 /*% ripper: ensure!($:2) %*/
16584 }
16585#line 16586 "parse.c"
16586 break;
16587
16588 case 636: /* strings: string */
16589#line 5916 "parse.y"
16590 {
16591 if (!(yyvsp[0].node)) {
16592 (yyval.node) = NEW_STR(STRING_NEW0(), &(yyloc));
16593 }
16594 else {
16595 (yyval.node) = evstr2dstr(p, (yyvsp[0].node));
16596 }
16597 /*% ripper: $:1 %*/
16598 }
16599#line 16600 "parse.c"
16600 break;
16601
16602 case 639: /* string: string string1 */
16603#line 5930 "parse.y"
16604 {
16605 (yyval.node) = literal_concat(p, (yyvsp[-1].node), (yyvsp[0].node), &(yyloc));
16606 /*% ripper: string_concat!($:1, $:2) %*/
16607 }
16608#line 16609 "parse.c"
16609 break;
16610
16611 case 640: /* string1: "string literal" string_contents "terminator" */
16612#line 5937 "parse.y"
16613 {
16614 (yyval.node) = heredoc_dedent(p, (yyvsp[-1].node));
16615 if ((yyval.node)) nd_set_loc((yyval.node), &(yyloc));
16616 /*% ripper: $:2 %*/
16617 if (p->heredoc_indent > 0) {
16618 /*% ripper: heredoc_dedent!($:$, INT2NUM(%{p->heredoc_indent})) %*/
16619 p->heredoc_indent = 0;
16620 }
16621 /*% ripper: string_literal!($:$) %*/
16622 }
16623#line 16624 "parse.c"
16624 break;
16625
16626 case 641: /* xstring: "backtick literal" xstring_contents "terminator" */
16627#line 5950 "parse.y"
16628 {
16629 (yyval.node) = new_xstring(p, heredoc_dedent(p, (yyvsp[-1].node)), &(yyloc));
16630 /*% ripper: $:2 %*/
16631 if (p->heredoc_indent > 0) {
16632 /*% ripper: heredoc_dedent!($:$, INT2NUM(%{p->heredoc_indent})) %*/
16633 p->heredoc_indent = 0;
16634 }
16635 /*% ripper: xstring_literal!($:$) %*/
16636 }
16637#line 16638 "parse.c"
16638 break;
16639
16640 case 642: /* regexp: "regexp literal" regexp_contents tREGEXP_END */
16641#line 5962 "parse.y"
16642 {
16643 (yyval.node) = new_regexp(p, (yyvsp[-1].node), (yyvsp[0].num), &(yyloc), &(yylsp[-2]), &(yylsp[-1]), &(yylsp[0]));
16644 /*% ripper: regexp_literal!($:2, $:3) %*/
16645 }
16646#line 16647 "parse.c"
16647 break;
16648
16649 case 645: /* words_tWORDS_BEG_word_list: "word list" nonempty_list_' ' word_list "terminator" */
16650#line 3152 "parse.y"
16651 {
16652 (yyval.node) = make_list((yyvsp[-1].node), &(yyloc));
16653 /*% ripper: array!($:3) %*/
16654 }
16655#line 16656 "parse.c"
16656 break;
16657
16658 case 647: /* word_list: %empty */
16659#line 5972 "parse.y"
16660 {
16661 (yyval.node) = 0;
16662 /*% ripper: words_new! %*/
16663 }
16664#line 16665 "parse.c"
16665 break;
16666
16667 case 648: /* word_list: word_list word nonempty_list_' ' */
16668#line 5977 "parse.y"
16669 {
16670 (yyval.node) = list_append(p, (yyvsp[-2].node), evstr2dstr(p, (yyvsp[-1].node)));
16671 /*% ripper: words_add!($:1, $:2) %*/
16672 }
16673#line 16674 "parse.c"
16674 break;
16675
16676 case 650: /* word: word string_content */
16677#line 5986 "parse.y"
16678 {
16679 (yyval.node) = literal_concat(p, (yyvsp[-1].node), (yyvsp[0].node), &(yyloc));
16680 /*% ripper: word_add!($:1, $:2) %*/
16681 }
16682#line 16683 "parse.c"
16683 break;
16684
16685 case 651: /* words_tSYMBOLS_BEG_symbol_list: "symbol list" nonempty_list_' ' symbol_list "terminator" */
16686#line 3152 "parse.y"
16687 {
16688 (yyval.node) = make_list((yyvsp[-1].node), &(yyloc));
16689 /*% ripper: array!($:3) %*/
16690 }
16691#line 16692 "parse.c"
16692 break;
16693
16694 case 653: /* symbol_list: %empty */
16695#line 5996 "parse.y"
16696 {
16697 (yyval.node) = 0;
16698 /*% ripper: symbols_new! %*/
16699 }
16700#line 16701 "parse.c"
16701 break;
16702
16703 case 654: /* symbol_list: symbol_list word nonempty_list_' ' */
16704#line 6001 "parse.y"
16705 {
16706 (yyval.node) = symbol_append(p, (yyvsp[-2].node), evstr2dstr(p, (yyvsp[-1].node)));
16707 /*% ripper: symbols_add!($:1, $:2) %*/
16708 }
16709#line 16710 "parse.c"
16710 break;
16711
16712 case 655: /* words_tQWORDS_BEG_qword_list: "verbatim word list" nonempty_list_' ' qword_list "terminator" */
16713#line 3152 "parse.y"
16714 {
16715 (yyval.node) = make_list((yyvsp[-1].node), &(yyloc));
16716 /*% ripper: array!($:3) %*/
16717 }
16718#line 16719 "parse.c"
16719 break;
16720
16721 case 657: /* words_tQSYMBOLS_BEG_qsym_list: "verbatim symbol list" nonempty_list_' ' qsym_list "terminator" */
16722#line 3152 "parse.y"
16723 {
16724 (yyval.node) = make_list((yyvsp[-1].node), &(yyloc));
16725 /*% ripper: array!($:3) %*/
16726 }
16727#line 16728 "parse.c"
16728 break;
16729
16730 case 659: /* qword_list: %empty */
16731#line 6014 "parse.y"
16732 {
16733 (yyval.node) = 0;
16734 /*% ripper: qwords_new! %*/
16735 }
16736#line 16737 "parse.c"
16737 break;
16738
16739 case 660: /* qword_list: qword_list "literal content" nonempty_list_' ' */
16740#line 6019 "parse.y"
16741 {
16742 (yyval.node) = list_append(p, (yyvsp[-2].node), (yyvsp[-1].node));
16743 /*% ripper: qwords_add!($:1, $:2) %*/
16744 }
16745#line 16746 "parse.c"
16746 break;
16747
16748 case 661: /* qsym_list: %empty */
16749#line 6026 "parse.y"
16750 {
16751 (yyval.node) = 0;
16752 /*% ripper: qsymbols_new! %*/
16753 }
16754#line 16755 "parse.c"
16755 break;
16756
16757 case 662: /* qsym_list: qsym_list "literal content" nonempty_list_' ' */
16758#line 6031 "parse.y"
16759 {
16760 (yyval.node) = symbol_append(p, (yyvsp[-2].node), (yyvsp[-1].node));
16761 /*% ripper: qsymbols_add!($:1, $:2) %*/
16762 }
16763#line 16764 "parse.c"
16764 break;
16765
16766 case 663: /* string_contents: %empty */
16767#line 6038 "parse.y"
16768 {
16769 (yyval.node) = 0;
16770 /*% ripper: string_content! %*/
16771 }
16772#line 16773 "parse.c"
16773 break;
16774
16775 case 664: /* string_contents: string_contents string_content */
16776#line 6043 "parse.y"
16777 {
16778 (yyval.node) = literal_concat(p, (yyvsp[-1].node), (yyvsp[0].node), &(yyloc));
16779 /*% ripper: string_add!($:1, $:2) %*/
16780 }
16781#line 16782 "parse.c"
16782 break;
16783
16784 case 665: /* xstring_contents: %empty */
16785#line 6050 "parse.y"
16786 {
16787 (yyval.node) = 0;
16788 /*% ripper: xstring_new! %*/
16789 }
16790#line 16791 "parse.c"
16791 break;
16792
16793 case 666: /* xstring_contents: xstring_contents string_content */
16794#line 6055 "parse.y"
16795 {
16796 (yyval.node) = literal_concat(p, (yyvsp[-1].node), (yyvsp[0].node), &(yyloc));
16797 /*% ripper: xstring_add!($:1, $:2) %*/
16798 }
16799#line 16800 "parse.c"
16800 break;
16801
16802 case 667: /* regexp_contents: %empty */
16803#line 6062 "parse.y"
16804 {
16805 (yyval.node) = 0;
16806 /*% ripper: regexp_new! %*/
16807 }
16808#line 16809 "parse.c"
16809 break;
16810
16811 case 668: /* regexp_contents: regexp_contents string_content */
16812#line 6067 "parse.y"
16813 {
16814 NODE *head = (yyvsp[-1].node), *tail = (yyvsp[0].node);
16815 if (!head) {
16816 (yyval.node) = tail;
16817 }
16818 else if (!tail) {
16819 (yyval.node) = head;
16820 }
16821 else {
16822 switch (nd_type(head)) {
16823 case NODE_STR:
16824 head = str2dstr(p, head);
16825 break;
16826 case NODE_DSTR:
16827 break;
16828 default:
16829 head = list_append(p, NEW_DSTR(0, &(yyloc)), head);
16830 break;
16831 }
16832 (yyval.node) = list_append(p, head, tail);
16833 }
16834 /*% ripper: regexp_add!($:1, $:2) %*/
16835 }
16836#line 16837 "parse.c"
16837 break;
16838
16839 case 670: /* @34: %empty */
16840#line 6095 "parse.y"
16841 {
16842 /* need to backup p->lex.strterm so that a string literal `%&foo,#$&,bar&` can be parsed */
16843 (yyval.strterm) = p->lex.strterm;
16844 p->lex.strterm = 0;
16845 SET_LEX_STATE(EXPR_BEG);
16846 }
16847#line 16848 "parse.c"
16848 break;
16849
16850 case 671: /* string_content: tSTRING_DVAR @34 string_dvar */
16851#line 6102 "parse.y"
16852 {
16853 p->lex.strterm = (yyvsp[-1].strterm);
16854 (yyval.node) = NEW_EVSTR((yyvsp[0].node), &(yyloc), &(yylsp[-2]), &NULL_LOC);
16855 nd_set_line((yyval.node), (yylsp[0]).end_pos.lineno);
16856 /*% ripper: string_dvar!($:3) %*/
16857 }
16858#line 16859 "parse.c"
16859 break;
16860
16861 case 672: /* @35: %empty */
16862#line 6109 "parse.y"
16863 {
16864 CMDARG_PUSH(0);
16865 COND_PUSH(0);
16866 /* need to backup p->lex.strterm so that a string literal `%!foo,#{ !0 },bar!` can be parsed */
16867 (yyval.strterm) = p->lex.strterm;
16868 p->lex.strterm = 0;
16869 SET_LEX_STATE(EXPR_BEG);
16870 }
16871#line 16872 "parse.c"
16872 break;
16873
16874 case 673: /* @36: %empty */
16875#line 6117 "parse.y"
16876 {
16877 (yyval.num) = p->lex.brace_nest;
16878 p->lex.brace_nest = 0;
16879 }
16880#line 16881 "parse.c"
16881 break;
16882
16883 case 674: /* @37: %empty */
16884#line 6121 "parse.y"
16885 {
16886 (yyval.num) = p->heredoc_indent;
16887 p->heredoc_indent = 0;
16888 }
16889#line 16890 "parse.c"
16890 break;
16891
16892 case 675: /* string_content: "'#{'" @35 @36 @37 compstmt_stmts string_dend */
16893#line 6126 "parse.y"
16894 {
16895 COND_POP();
16896 CMDARG_POP();
16897 p->lex.strterm = (yyvsp[-4].strterm);
16898 SET_LEX_STATE((yyvsp[-5].state));
16899 p->lex.brace_nest = (yyvsp[-3].num);
16900 p->heredoc_indent = (yyvsp[-2].num);
16901 p->heredoc_line_indent = -1;
16902 if ((yyvsp[-1].node)) nd_unset_fl_newline((yyvsp[-1].node));
16903 (yyval.node) = new_evstr(p, (yyvsp[-1].node), &(yyloc), &(yylsp[-5]), &(yylsp[0]));
16904 /*% ripper: string_embexpr!($:compstmt) %*/
16905 }
16906#line 16907 "parse.c"
16907 break;
16908
16909 case 678: /* string_dvar: nonlocal_var */
16910#line 6145 "parse.y"
16911 {
16912 if (!((yyval.node) = gettable(p, (yyvsp[0].id), &(yyloc)))) (yyval.node) = NEW_ERROR(&(yyloc));
16913 /*% ripper: var_ref!($:1) %*/
16914 }
16915#line 16916 "parse.c"
16916 break;
16917
16918 case 682: /* ssym: "symbol literal" sym */
16919#line 6157 "parse.y"
16920 {
16921 SET_LEX_STATE(EXPR_END);
16922 VALUE str = rb_id2str((yyvsp[0].id));
16923 /*
16924 * TODO:
16925 * set_yylval_noname sets invalid id to yylval.
16926 * This branch can be removed once yylval is changed to
16927 * hold lexed string.
16928 */
16929 if (!str) str = STR_NEW0();
16930 (yyval.node) = NEW_SYM(str, &(yyloc));
16931 /*% ripper: symbol_literal!(symbol!($:2)) %*/
16932 }
16933#line 16934 "parse.c"
16934 break;
16935
16936 case 685: /* dsym: "symbol literal" string_contents "terminator" */
16937#line 6177 "parse.y"
16938 {
16939 SET_LEX_STATE(EXPR_END);
16940 (yyval.node) = dsym_node(p, (yyvsp[-1].node), &(yyloc));
16941 /*% ripper: dyna_symbol!($:2) %*/
16942 }
16943#line 16944 "parse.c"
16944 break;
16945
16946 case 687: /* numeric: tUMINUS_NUM simple_numeric */
16947#line 6186 "parse.y"
16948 {
16949 (yyval.node) = (yyvsp[0].node);
16950 negate_lit(p, (yyval.node));
16951 /*% ripper: unary!(ID2VAL(idUMinus), $:2) %*/
16952 }
16953#line 16954 "parse.c"
16954 break;
16955
16956 case 698: /* keyword_variable: "'nil'" */
16957#line 6208 "parse.y"
16958 {(yyval.id) = KWD2EID(nil, (yyvsp[0].id));}
16959#line 16960 "parse.c"
16960 break;
16961
16962 case 699: /* keyword_variable: "'self'" */
16963#line 6209 "parse.y"
16964 {(yyval.id) = KWD2EID(self, (yyvsp[0].id));}
16965#line 16966 "parse.c"
16966 break;
16967
16968 case 700: /* keyword_variable: "'true'" */
16969#line 6210 "parse.y"
16970 {(yyval.id) = KWD2EID(true, (yyvsp[0].id));}
16971#line 16972 "parse.c"
16972 break;
16973
16974 case 701: /* keyword_variable: "'false'" */
16975#line 6211 "parse.y"
16976 {(yyval.id) = KWD2EID(false, (yyvsp[0].id));}
16977#line 16978 "parse.c"
16978 break;
16979
16980 case 702: /* keyword_variable: "'__FILE__'" */
16981#line 6212 "parse.y"
16982 {(yyval.id) = KWD2EID(_FILE__, (yyvsp[0].id));}
16983#line 16984 "parse.c"
16984 break;
16985
16986 case 703: /* keyword_variable: "'__LINE__'" */
16987#line 6213 "parse.y"
16988 {(yyval.id) = KWD2EID(_LINE__, (yyvsp[0].id));}
16989#line 16990 "parse.c"
16990 break;
16991
16992 case 704: /* keyword_variable: "'__ENCODING__'" */
16993#line 6214 "parse.y"
16994 {(yyval.id) = KWD2EID(_ENCODING__, (yyvsp[0].id));}
16995#line 16996 "parse.c"
16996 break;
16997
16998 case 705: /* var_ref: user_variable */
16999#line 6218 "parse.y"
17000 {
17001 if (!((yyval.node) = gettable(p, (yyvsp[0].id), &(yyloc)))) (yyval.node) = NEW_ERROR(&(yyloc));
17002 if (ifdef_ripper(id_is_var(p, (yyvsp[0].id)), false)) {
17003 /*% ripper: var_ref!($:1) %*/
17004 }
17005 else {
17006 /*% ripper: vcall!($:1) %*/
17007 }
17008 }
17009#line 17010 "parse.c"
17010 break;
17011
17012 case 706: /* var_ref: keyword_variable */
17013#line 6228 "parse.y"
17014 {
17015 if (!((yyval.node) = gettable(p, (yyvsp[0].id), &(yyloc)))) (yyval.node) = NEW_ERROR(&(yyloc));
17016 /*% ripper: var_ref!($:1) %*/
17017 }
17018#line 17019 "parse.c"
17019 break;
17020
17021 case 707: /* var_lhs: user_variable */
17022#line 6235 "parse.y"
17023 {
17024 /*% ripper: var_field!($:1) %*/
17025 (yyval.node) = assignable(p, (yyvsp[0].id), 0, &(yyloc));
17026 }
17027#line 17028 "parse.c"
17028 break;
17029
17030 case 708: /* var_lhs: keyword_variable */
17031#line 6235 "parse.y"
17032 {
17033 /*% ripper: var_field!($:1) %*/
17034 (yyval.node) = assignable(p, (yyvsp[0].id), 0, &(yyloc));
17035 }
17036#line 17037 "parse.c"
17037 break;
17038
17039 case 711: /* $@38: %empty */
17040#line 6246 "parse.y"
17041 {
17042 SET_LEX_STATE(EXPR_BEG);
17043 p->command_start = TRUE;
17044 }
17045#line 17046 "parse.c"
17046 break;
17047
17048 case 712: /* superclass: '<' $@38 expr_value term */
17049#line 6251 "parse.y"
17050 {
17051 (yyval.node) = (yyvsp[-1].node);
17052 /*% ripper: $:3 %*/
17053 }
17054#line 17055 "parse.c"
17055 break;
17056
17057 case 715: /* f_opt_paren_args: none */
17058#line 6260 "parse.y"
17059 {
17060 p->ctxt.in_argdef = 0;
17061 (yyval.node_args) = new_args_tail(p, 0, 0, 0, &(yylsp[-1]));
17062 (yyval.node_args) = new_args(p, 0, 0, 0, 0, (yyval.node_args), &(yylsp[-1]));
17063 /*% ripper: params!(Qnil, Qnil, Qnil, Qnil, Qnil, Qnil, Qnil) %*/
17064 }
17065#line 17066 "parse.c"
17066 break;
17067
17068 case 716: /* f_paren_args: '(' f_args rparen */
17069#line 6269 "parse.y"
17070 {
17071 (yyval.node_args) = (yyvsp[-1].node_args);
17072 /*% ripper: paren!($:2) %*/
17073 SET_LEX_STATE(EXPR_BEG);
17074 p->command_start = TRUE;
17075 p->ctxt.in_argdef = 0;
17076 }
17077#line 17078 "parse.c"
17078 break;
17079
17080 case 718: /* @39: %empty */
17081#line 6279 "parse.y"
17082 {
17083 (yyval.ctxt) = p->ctxt;
17084 p->ctxt.in_kwarg = 1;
17085 p->ctxt.in_argdef = 1;
17086 SET_LEX_STATE(p->lex.state|EXPR_LABEL); /* force for args */
17087 }
17088#line 17089 "parse.c"
17089 break;
17090
17091 case 719: /* f_arglist: @39 f_args term */
17092#line 6286 "parse.y"
17093 {
17094 p->ctxt.in_kwarg = (yyvsp[-2].ctxt).in_kwarg;
17095 p->ctxt.in_argdef = 0;
17096 (yyval.node_args) = (yyvsp[-1].node_args);
17097 SET_LEX_STATE(EXPR_BEG);
17098 p->command_start = TRUE;
17099 /*% ripper: $:2 %*/
17100 }
17101#line 17102 "parse.c"
17102 break;
17103
17104 case 720: /* f_kw_arg_value: f_label arg_value */
17105#line 3003 "parse.y"
17106 {
17107 p->ctxt.in_argdef = 1;
17108 (yyval.node_kw_arg) = new_kw_arg(p, assignable(p, (yyvsp[-1].id), (yyvsp[0].node), &(yyloc)), &(yyloc));
17109 /*% ripper: [$:$, $:value] %*/
17110 }
17111#line 17112 "parse.c"
17112 break;
17113
17114 case 721: /* f_kw_arg_value: f_label */
17115#line 3009 "parse.y"
17116 {
17117 p->ctxt.in_argdef = 1;
17118 (yyval.node_kw_arg) = new_kw_arg(p, assignable(p, (yyvsp[0].id), NODE_SPECIAL_REQUIRED_KEYWORD, &(yyloc)), &(yyloc));
17119 /*% ripper: [$:$, 0] %*/
17120 }
17121#line 17122 "parse.c"
17122 break;
17123
17124 case 722: /* f_kwarg_arg_value: f_kw_arg_value */
17125#line 3018 "parse.y"
17126 {
17127 (yyval.node_kw_arg) = (yyvsp[0].node_kw_arg);
17128 /*% ripper: rb_ary_new3(1, $:1) %*/
17129 }
17130#line 17131 "parse.c"
17131 break;
17132
17133 case 723: /* f_kwarg_arg_value: f_kwarg_arg_value ',' f_kw_arg_value */
17134#line 3023 "parse.y"
17135 {
17136 (yyval.node_kw_arg) = kwd_append((yyvsp[-2].node_kw_arg), (yyvsp[0].node_kw_arg));
17137 /*% ripper: rb_ary_push($:1, $:3) %*/
17138 }
17139#line 17140 "parse.c"
17140 break;
17141
17142 case 724: /* args_tail_basic_arg_value: f_kwarg_arg_value ',' f_kwrest opt_f_block_arg */
17143#line 2927 "parse.y"
17144 {
17145 (yyval.node_args) = new_args_tail(p, (yyvsp[-3].node_kw_arg), (yyvsp[-1].id), (yyvsp[0].id), &(yylsp[-1]));
17146 /*% ripper: [$:1, $:3, $:4] %*/
17147 }
17148#line 17149 "parse.c"
17149 break;
17150
17151 case 725: /* args_tail_basic_arg_value: f_kwarg_arg_value opt_f_block_arg */
17152#line 2932 "parse.y"
17153 {
17154 (yyval.node_args) = new_args_tail(p, (yyvsp[-1].node_kw_arg), 0, (yyvsp[0].id), &(yylsp[-1]));
17155 /*% ripper: [$:1, Qnil, $:2] %*/
17156 }
17157#line 17158 "parse.c"
17158 break;
17159
17160 case 726: /* args_tail_basic_arg_value: f_any_kwrest opt_f_block_arg */
17161#line 2937 "parse.y"
17162 {
17163 (yyval.node_args) = new_args_tail(p, 0, (yyvsp[-1].id), (yyvsp[0].id), &(yylsp[-1]));
17164 /*% ripper: [Qnil, $:1, $:2] %*/
17165 }
17166#line 17167 "parse.c"
17167 break;
17168
17169 case 727: /* args_tail_basic_arg_value: f_block_arg */
17170#line 2942 "parse.y"
17171 {
17172 (yyval.node_args) = new_args_tail(p, 0, 0, (yyvsp[0].id), &(yylsp[0]));
17173 /*% ripper: [Qnil, Qnil, $:1] %*/
17174 }
17175#line 17176 "parse.c"
17176 break;
17177
17178 case 729: /* args_tail: args_forward */
17179#line 6298 "parse.y"
17180 {
17181 ID fwd = (yyvsp[0].id);
17182 if (lambda_beginning_p() ||
17183 (p->lex.lpar_beg >= 0 && p->lex.lpar_beg+1 == p->lex.paren_nest)) {
17184 yyerror0("unexpected ... in lambda argument");
17185 fwd = 0;
17186 }
17187 else {
17188 add_forwarding_args(p);
17189 }
17190 (yyval.node_args) = new_args_tail(p, 0, fwd, arg_FWD_BLOCK, &(yylsp[0]));
17191 (yyval.node_args)->nd_ainfo.forwarding = 1;
17192 /*% ripper: [Qnil, $:1, Qnil] %*/
17193 }
17194#line 17195 "parse.c"
17195 break;
17196
17197 case 730: /* f_opt_arg_value: f_arg_asgn f_eq arg_value */
17198#line 2981 "parse.y"
17199 {
17200 p->ctxt.in_argdef = 1;
17201 (yyval.node_opt_arg) = NEW_OPT_ARG(assignable(p, (yyvsp[-2].id), (yyvsp[0].node), &(yyloc)), &(yyloc));
17202 /*% ripper: [$:$, $:3] %*/
17203 }
17204#line 17205 "parse.c"
17205 break;
17206
17207 case 731: /* f_opt_arg_arg_value: f_opt_arg_value */
17208#line 2990 "parse.y"
17209 {
17210 (yyval.node_opt_arg) = (yyvsp[0].node_opt_arg);
17211 /*% ripper: rb_ary_new3(1, $:1) %*/
17212 }
17213#line 17214 "parse.c"
17214 break;
17215
17216 case 732: /* f_opt_arg_arg_value: f_opt_arg_arg_value ',' f_opt_arg_value */
17217#line 2995 "parse.y"
17218 {
17219 (yyval.node_opt_arg) = opt_arg_append((yyvsp[-2].node_opt_arg), (yyvsp[0].node_opt_arg));
17220 /*% ripper: rb_ary_push($:1, $:3) %*/
17221 }
17222#line 17223 "parse.c"
17223 break;
17224
17225 case 733: /* opt_args_tail_args_tail: ',' args_tail */
17226#line 3090 "parse.y"
17227 {
17228 (yyval.node_args) = (yyvsp[0].node_args);
17229 /*% ripper: $:2 %*/
17230 }
17231#line 17232 "parse.c"
17232 break;
17233
17234 case 734: /* opt_args_tail_args_tail: %empty */
17235#line 3095 "parse.y"
17236 {
17237 (yyval.node_args) = new_args_tail(p, 0, 0, 0, &(yylsp[0]));
17238 /*% ripper: [Qnil, Qnil, Qnil] %*/
17239 }
17240#line 17241 "parse.c"
17241 break;
17242
17243 case 735: /* f_args: f_arg ',' f_opt_arg_arg_value ',' f_rest_arg opt_args_tail_args_tail */
17244#line 6315 "parse.y"
17245 {
17246 (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));
17247 /*% ripper: params!($:1, $:3, $:5, Qnil, *$:6[0..2]) %*/
17248 }
17249#line 17250 "parse.c"
17250 break;
17251
17252 case 736: /* f_args: f_arg ',' f_opt_arg_arg_value ',' f_rest_arg ',' f_arg opt_args_tail_args_tail */
17253#line 6320 "parse.y"
17254 {
17255 (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));
17256 /*% ripper: params!($:1, $:3, $:5, $:7, *$:8[0..2]) %*/
17257 }
17258#line 17259 "parse.c"
17259 break;
17260
17261 case 737: /* f_args: f_arg ',' f_opt_arg_arg_value opt_args_tail_args_tail */
17262#line 6325 "parse.y"
17263 {
17264 (yyval.node_args) = new_args(p, (yyvsp[-3].node_args_aux), (yyvsp[-1].node_opt_arg), 0, 0, (yyvsp[0].node_args), &(yyloc));
17265 /*% ripper: params!($:1, $:3, Qnil, Qnil, *$:4[0..2]) %*/
17266 }
17267#line 17268 "parse.c"
17268 break;
17269
17270 case 738: /* f_args: f_arg ',' f_opt_arg_arg_value ',' f_arg opt_args_tail_args_tail */
17271#line 6330 "parse.y"
17272 {
17273 (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));
17274 /*% ripper: params!($:1, $:3, Qnil, $:5, *$:6[0..2]) %*/
17275 }
17276#line 17277 "parse.c"
17277 break;
17278
17279 case 739: /* f_args: f_arg ',' f_rest_arg opt_args_tail_args_tail */
17280#line 6335 "parse.y"
17281 {
17282 (yyval.node_args) = new_args(p, (yyvsp[-3].node_args_aux), 0, (yyvsp[-1].id), 0, (yyvsp[0].node_args), &(yyloc));
17283 /*% ripper: params!($:1, Qnil, $:3, Qnil, *$:4[0..2]) %*/
17284 }
17285#line 17286 "parse.c"
17286 break;
17287
17288 case 740: /* f_args: f_arg ',' f_rest_arg ',' f_arg opt_args_tail_args_tail */
17289#line 6340 "parse.y"
17290 {
17291 (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));
17292 /*% ripper: params!($:1, Qnil, $:3, $:5, *$:6[0..2]) %*/
17293 }
17294#line 17295 "parse.c"
17295 break;
17296
17297 case 741: /* f_args: f_arg opt_args_tail_args_tail */
17298#line 6345 "parse.y"
17299 {
17300 (yyval.node_args) = new_args(p, (yyvsp[-1].node_args_aux), 0, 0, 0, (yyvsp[0].node_args), &(yyloc));
17301 /*% ripper: params!($:1, Qnil, Qnil, Qnil, *$:2[0..2]) %*/
17302 }
17303#line 17304 "parse.c"
17304 break;
17305
17306 case 742: /* f_args: f_opt_arg_arg_value ',' f_rest_arg opt_args_tail_args_tail */
17307#line 6350 "parse.y"
17308 {
17309 (yyval.node_args) = new_args(p, 0, (yyvsp[-3].node_opt_arg), (yyvsp[-1].id), 0, (yyvsp[0].node_args), &(yyloc));
17310 /*% ripper: params!(Qnil, $:1, $:3, Qnil, *$:4[0..2]) %*/
17311 }
17312#line 17313 "parse.c"
17313 break;
17314
17315 case 743: /* f_args: f_opt_arg_arg_value ',' f_rest_arg ',' f_arg opt_args_tail_args_tail */
17316#line 6355 "parse.y"
17317 {
17318 (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));
17319 /*% ripper: params!(Qnil, $:1, $:3, $:5, *$:6[0..2]) %*/
17320 }
17321#line 17322 "parse.c"
17322 break;
17323
17324 case 744: /* f_args: f_opt_arg_arg_value opt_args_tail_args_tail */
17325#line 6360 "parse.y"
17326 {
17327 (yyval.node_args) = new_args(p, 0, (yyvsp[-1].node_opt_arg), 0, 0, (yyvsp[0].node_args), &(yyloc));
17328 /*% ripper: params!(Qnil, $:1, Qnil, Qnil, *$:2[0..2]) %*/
17329 }
17330#line 17331 "parse.c"
17331 break;
17332
17333 case 745: /* f_args: f_opt_arg_arg_value ',' f_arg opt_args_tail_args_tail */
17334#line 6365 "parse.y"
17335 {
17336 (yyval.node_args) = new_args(p, 0, (yyvsp[-3].node_opt_arg), 0, (yyvsp[-1].node_args_aux), (yyvsp[0].node_args), &(yyloc));
17337 /*% ripper: params!(Qnil, $:1, Qnil, $:3, *$:4[0..2]) %*/
17338 }
17339#line 17340 "parse.c"
17340 break;
17341
17342 case 746: /* f_args: f_rest_arg opt_args_tail_args_tail */
17343#line 6370 "parse.y"
17344 {
17345 (yyval.node_args) = new_args(p, 0, 0, (yyvsp[-1].id), 0, (yyvsp[0].node_args), &(yyloc));
17346 /*% ripper: params!(Qnil, Qnil, $:1, Qnil, *$:2[0..2]) %*/
17347 }
17348#line 17349 "parse.c"
17349 break;
17350
17351 case 747: /* f_args: f_rest_arg ',' f_arg opt_args_tail_args_tail */
17352#line 6375 "parse.y"
17353 {
17354 (yyval.node_args) = new_args(p, 0, 0, (yyvsp[-3].id), (yyvsp[-1].node_args_aux), (yyvsp[0].node_args), &(yyloc));
17355 /*% ripper: params!(Qnil, Qnil, $:1, $:3, *$:4[0..2]) %*/
17356 }
17357#line 17358 "parse.c"
17358 break;
17359
17360 case 748: /* f_args: args_tail */
17361#line 6380 "parse.y"
17362 {
17363 (yyval.node_args) = new_args(p, 0, 0, 0, 0, (yyvsp[0].node_args), &(yyloc));
17364 /*% ripper: params!(Qnil, Qnil, Qnil, Qnil, *$:1[0..2]) %*/
17365 }
17366#line 17367 "parse.c"
17367 break;
17368
17369 case 749: /* f_args: %empty */
17370#line 6385 "parse.y"
17371 {
17372 (yyval.node_args) = new_args_tail(p, 0, 0, 0, &(yylsp[0]));
17373 (yyval.node_args) = new_args(p, 0, 0, 0, 0, (yyval.node_args), &(yylsp[0]));
17374 /*% ripper: params!(Qnil, Qnil, Qnil, Qnil, Qnil, Qnil, Qnil) %*/
17375 }
17376#line 17377 "parse.c"
17377 break;
17378
17379 case 750: /* args_forward: "(..." */
17380#line 6393 "parse.y"
17381 {
17382 (yyval.id) = idFWD_KWREST;
17383 /*% ripper: args_forward! %*/
17384 }
17385#line 17386 "parse.c"
17386 break;
17387
17388 case 751: /* f_bad_arg: "constant" */
17389#line 6400 "parse.y"
17390 {
17391 static const char mesg[] = "formal argument cannot be a constant";
17392 /*%%%*/
17393 yyerror1(&(yylsp[0]), mesg);
17394 /*% %*/
17395 (yyval.id) = 0;
17396 /*% ripper[error]: param_error!(ERR_MESG(), $:1) %*/
17397 }
17398#line 17399 "parse.c"
17399 break;
17400
17401 case 752: /* f_bad_arg: "instance variable" */
17402#line 6409 "parse.y"
17403 {
17404 static const char mesg[] = "formal argument cannot be an instance variable";
17405 /*%%%*/
17406 yyerror1(&(yylsp[0]), mesg);
17407 /*% %*/
17408 (yyval.id) = 0;
17409 /*% ripper[error]: param_error!(ERR_MESG(), $:1) %*/
17410 }
17411#line 17412 "parse.c"
17412 break;
17413
17414 case 753: /* f_bad_arg: "global variable" */
17415#line 6418 "parse.y"
17416 {
17417 static const char mesg[] = "formal argument cannot be a global variable";
17418 /*%%%*/
17419 yyerror1(&(yylsp[0]), mesg);
17420 /*% %*/
17421 (yyval.id) = 0;
17422 /*% ripper[error]: param_error!(ERR_MESG(), $:1) %*/
17423 }
17424#line 17425 "parse.c"
17425 break;
17426
17427 case 754: /* f_bad_arg: "class variable" */
17428#line 6427 "parse.y"
17429 {
17430 static const char mesg[] = "formal argument cannot be a class variable";
17431 /*%%%*/
17432 yyerror1(&(yylsp[0]), mesg);
17433 /*% %*/
17434 (yyval.id) = 0;
17435 /*% ripper[error]: param_error!(ERR_MESG(), $:1) %*/
17436 }
17437#line 17438 "parse.c"
17438 break;
17439
17440 case 756: /* f_norm_arg: "local variable or method" */
17441#line 6439 "parse.y"
17442 {
17443 VALUE e = formal_argument_error(p, (yyval.id) = (yyvsp[0].id));
17444 if (e) {
17445 /*% ripper[error]: param_error!(?e, $:1) %*/
17446 }
17447 p->max_numparam = ORDINAL_PARAM;
17448 }
17449#line 17450 "parse.c"
17450 break;
17451
17452 case 757: /* f_arg_asgn: f_norm_arg */
17453#line 6449 "parse.y"
17454 {
17455 arg_var(p, (yyvsp[0].id));
17456 (yyval.id) = (yyvsp[0].id);
17457 }
17458#line 17459 "parse.c"
17459 break;
17460
17461 case 758: /* f_arg_item: f_arg_asgn */
17462#line 6456 "parse.y"
17463 {
17464 (yyval.node_args_aux) = NEW_ARGS_AUX((yyvsp[0].id), 1, &NULL_LOC);
17465 /*% ripper: $:1 %*/
17466 }
17467#line 17468 "parse.c"
17468 break;
17469
17470 case 759: /* f_arg_item: "(" f_margs rparen */
17471#line 6461 "parse.y"
17472 {
17473 ID tid = internal_id(p);
17474 YYLTYPE loc;
17475 loc.beg_pos = (yylsp[-1]).beg_pos;
17476 loc.end_pos = (yylsp[-1]).beg_pos;
17477 arg_var(p, tid);
17478 if (dyna_in_block(p)) {
17479 (yyvsp[-1].node_masgn)->nd_value = NEW_DVAR(tid, &loc);
17480 }
17481 else {
17482 (yyvsp[-1].node_masgn)->nd_value = NEW_LVAR(tid, &loc);
17483 }
17484 (yyval.node_args_aux) = NEW_ARGS_AUX(tid, 1, &NULL_LOC);
17485 (yyval.node_args_aux)->nd_next = (NODE *)(yyvsp[-1].node_masgn);
17486 /*% ripper: mlhs_paren!($:2) %*/
17487 }
17488#line 17489 "parse.c"
17489 break;
17490
17491 case 761: /* f_arg: f_arg ',' f_arg_item */
17492#line 6482 "parse.y"
17493 {
17494 (yyval.node_args_aux) = (yyvsp[-2].node_args_aux);
17495 (yyval.node_args_aux)->nd_plen++;
17496 (yyval.node_args_aux)->nd_next = block_append(p, (yyval.node_args_aux)->nd_next, (yyvsp[0].node_args_aux)->nd_next);
17497 rb_discard_node(p, (NODE *)(yyvsp[0].node_args_aux));
17498 /*% ripper: rb_ary_push($:1, $:3) %*/
17499 }
17500#line 17501 "parse.c"
17501 break;
17502
17503 case 762: /* f_label: "label" */
17504#line 6493 "parse.y"
17505 {
17506 VALUE e = formal_argument_error(p, (yyval.id) = (yyvsp[0].id));
17507 if (e) {
17508 (yyval.id) = 0;
17509 /*% ripper[error]: param_error!(?e, $:1) %*/
17510 }
17511 /*
17512 * Workaround for Prism::ParseTest#test_filepath for
17513 * "unparser/corpus/literal/def.txt"
17514 *
17515 * See the discussion on https://github.com/ruby/ruby/pull/9923
17516 */
17517 arg_var(p, ifdef_ripper(0, (yyvsp[0].id)));
17518 /*% ripper: $:1 %*/
17519 p->max_numparam = ORDINAL_PARAM;
17520 p->ctxt.in_argdef = 0;
17521 }
17522#line 17523 "parse.c"
17523 break;
17524
17525 case 765: /* f_no_kwarg: p_kwnorest */
17526#line 6517 "parse.y"
17527 {
17528 /*% ripper: nokw_param!(Qnil) %*/
17529 }
17530#line 17531 "parse.c"
17531 break;
17532
17533 case 766: /* f_kwrest: kwrest_mark "local variable or method" */
17534#line 6523 "parse.y"
17535 {
17536 arg_var(p, shadowing_lvar(p, (yyvsp[0].id)));
17537 (yyval.id) = (yyvsp[0].id);
17538 /*% ripper: kwrest_param!($:2) %*/
17539 }
17540#line 17541 "parse.c"
17541 break;
17542
17543 case 767: /* f_kwrest: kwrest_mark */
17544#line 6529 "parse.y"
17545 {
17546 arg_var(p, idFWD_KWREST);
17547 (yyval.id) = idFWD_KWREST;
17548 /*% ripper: kwrest_param!(Qnil) %*/
17549 }
17550#line 17551 "parse.c"
17551 break;
17552
17553 case 770: /* f_rest_arg: restarg_mark "local variable or method" */
17554#line 6541 "parse.y"
17555 {
17556 arg_var(p, shadowing_lvar(p, (yyvsp[0].id)));
17557 (yyval.id) = (yyvsp[0].id);
17558 /*% ripper: rest_param!($:2) %*/
17559 }
17560#line 17561 "parse.c"
17561 break;
17562
17563 case 771: /* f_rest_arg: restarg_mark */
17564#line 6547 "parse.y"
17565 {
17566 arg_var(p, idFWD_REST);
17567 (yyval.id) = idFWD_REST;
17568 /*% ripper: rest_param!(Qnil) %*/
17569 }
17570#line 17571 "parse.c"
17571 break;
17572
17573 case 774: /* f_block_arg: blkarg_mark "local variable or method" */
17574#line 6559 "parse.y"
17575 {
17576 arg_var(p, shadowing_lvar(p, (yyvsp[0].id)));
17577 (yyval.id) = (yyvsp[0].id);
17578 /*% ripper: blockarg!($:2) %*/
17579 }
17580#line 17581 "parse.c"
17581 break;
17582
17583 case 775: /* f_block_arg: blkarg_mark */
17584#line 6565 "parse.y"
17585 {
17586 arg_var(p, idFWD_BLOCK);
17587 (yyval.id) = idFWD_BLOCK;
17588 /*% ripper: blockarg!(Qnil) %*/
17589 }
17590#line 17591 "parse.c"
17591 break;
17592
17593 case 776: /* opt_f_block_arg: ',' f_block_arg */
17594#line 6573 "parse.y"
17595 {
17596 (yyval.id) = (yyvsp[0].id);
17597 /*% ripper: $:2 %*/
17598 }
17599#line 17600 "parse.c"
17600 break;
17601
17602 case 778: /* value_expr_singleton_expr: singleton_expr */
17603#line 3144 "parse.y"
17604 {
17605 value_expr(p, (yyvsp[0].node));
17606 (yyval.node) = (yyvsp[0].node);
17607 }
17608#line 17609 "parse.c"
17609 break;
17610
17611 case 779: /* singleton: value_expr_singleton_expr */
17612#line 6582 "parse.y"
17613 {
17614 NODE *expr = last_expr_node((yyvsp[0].node));
17615 switch (nd_type(expr)) {
17616 case NODE_STR:
17617 case NODE_DSTR:
17618 case NODE_XSTR:
17619 case NODE_DXSTR:
17620 case NODE_REGX:
17621 case NODE_DREGX:
17622 case NODE_SYM:
17623 case NODE_LINE:
17624 case NODE_FILE:
17625 case NODE_ENCODING:
17626 case NODE_INTEGER:
17627 case NODE_FLOAT:
17628 case NODE_RATIONAL:
17629 case NODE_IMAGINARY:
17630 case NODE_DSYM:
17631 case NODE_LIST:
17632 case NODE_ZLIST:
17633 yyerror1(&expr->nd_loc, "can't define singleton method for literals");
17634 break;
17635 default:
17636 break;
17637 }
17638 (yyval.node) = (yyvsp[0].node);
17639 }
17640#line 17641 "parse.c"
17641 break;
17642
17643 case 781: /* $@40: %empty */
17644#line 6613 "parse.y"
17645 {
17646 SET_LEX_STATE(EXPR_BEG);
17647 p->ctxt.in_argdef = 0;
17648 }
17649#line 17650 "parse.c"
17650 break;
17651
17652 case 782: /* singleton_expr: '(' $@40 expr rparen */
17653#line 6618 "parse.y"
17654 {
17655 p->ctxt.in_argdef = 1;
17656 (yyval.node) = (yyvsp[-1].node);
17657 /*% ripper: paren!($:3) %*/
17658 }
17659#line 17660 "parse.c"
17660 break;
17661
17662 case 784: /* assoc_list: assocs trailer */
17663#line 6627 "parse.y"
17664 {
17665 (yyval.node) = (yyvsp[-1].node);
17666 /*% ripper: assoclist_from_args!($:1) %*/
17667 }
17668#line 17669 "parse.c"
17669 break;
17670
17671 case 786: /* assocs: assocs ',' assoc */
17672#line 6636 "parse.y"
17673 {
17674 NODE *assocs = (yyvsp[-2].node);
17675 NODE *tail = (yyvsp[0].node);
17676 if (!assocs) {
17677 assocs = tail;
17678 }
17679 else if (tail) {
17680 if (RNODE_LIST(assocs)->nd_head) {
17681 NODE *n = RNODE_LIST(tail)->nd_next;
17682 if (!RNODE_LIST(tail)->nd_head && nd_type_p(n, NODE_LIST) &&
17683 nd_type_p((n = RNODE_LIST(n)->nd_head), NODE_HASH)) {
17684 /* DSTAR */
17685 tail = RNODE_HASH(n)->nd_head;
17686 }
17687 }
17688 if (tail) {
17689 assocs = list_concat(assocs, tail);
17690 }
17691 }
17692 (yyval.node) = assocs;
17693 /*% ripper: rb_ary_push($:1, $:3) %*/
17694 }
17695#line 17696 "parse.c"
17696 break;
17697
17698 case 787: /* assoc: arg_value "=>" arg_value */
17699#line 6661 "parse.y"
17700 {
17701 (yyval.node) = list_append(p, NEW_LIST((yyvsp[-2].node), &(yyloc)), (yyvsp[0].node));
17702 /*% ripper: assoc_new!($:1, $:3) %*/
17703 }
17704#line 17705 "parse.c"
17705 break;
17706
17707 case 788: /* assoc: "label" arg_value */
17708#line 6666 "parse.y"
17709 {
17710 (yyval.node) = list_append(p, NEW_LIST(NEW_SYM(rb_id2str((yyvsp[-1].id)), &(yylsp[-1])), &(yyloc)), (yyvsp[0].node));
17711 /*% ripper: assoc_new!($:1, $:2) %*/
17712 }
17713#line 17714 "parse.c"
17714 break;
17715
17716 case 789: /* assoc: "label" */
17717#line 6671 "parse.y"
17718 {
17719 NODE *val = gettable(p, (yyvsp[0].id), &(yyloc));
17720 if (!val) val = NEW_ERROR(&(yyloc));
17721 (yyval.node) = list_append(p, NEW_LIST(NEW_SYM(rb_id2str((yyvsp[0].id)), &(yylsp[0])), &(yyloc)), val);
17722 /*% ripper: assoc_new!($:1, Qnil) %*/
17723 }
17724#line 17725 "parse.c"
17725 break;
17726
17727 case 790: /* assoc: "string literal" string_contents tLABEL_END arg_value */
17728#line 6678 "parse.y"
17729 {
17730 YYLTYPE loc = code_loc_gen(&(yylsp[-3]), &(yylsp[-1]));
17731 (yyval.node) = list_append(p, NEW_LIST(dsym_node(p, (yyvsp[-2].node), &loc), &loc), (yyvsp[0].node));
17732 /*% ripper: assoc_new!(dyna_symbol!($:2), $:4) %*/
17733 }
17734#line 17735 "parse.c"
17735 break;
17736
17737 case 791: /* assoc: "**arg" arg_value */
17738#line 6684 "parse.y"
17739 {
17740 (yyval.node) = list_append(p, NEW_LIST(0, &(yyloc)), (yyvsp[0].node));
17741 /*% ripper: assoc_splat!($:2) %*/
17742 }
17743#line 17744 "parse.c"
17744 break;
17745
17746 case 792: /* assoc: "**arg" */
17747#line 6689 "parse.y"
17748 {
17749 forwarding_arg_check(p, idFWD_KWREST, idFWD_ALL, "keyword rest");
17750 (yyval.node) = list_append(p, NEW_LIST(0, &(yyloc)),
17751 NEW_LVAR(idFWD_KWREST, &(yyloc)));
17752 /*% ripper: assoc_splat!(Qnil) %*/
17753 }
17754#line 17755 "parse.c"
17755 break;
17756
17757 case 811: /* term: ';' */
17758#line 6736 "parse.y"
17759 {
17760 yyerrok;
17761 token_flush(p);
17762 if (p->ctxt.in_defined) {
17763 p->ctxt.has_trailing_semicolon = 1;
17764 }
17765 }
17766#line 17767 "parse.c"
17767 break;
17768
17769 case 812: /* term: '\n' */
17770#line 6744 "parse.y"
17771 {
17772 (yyloc).end_pos = (yyloc).beg_pos;
17773 token_flush(p);
17774 }
17775#line 17776 "parse.c"
17776 break;
17777
17778 case 814: /* terms: terms ';' */
17779#line 6751 "parse.y"
17780 {yyerrok;}
17781#line 17782 "parse.c"
17782 break;
17783
17784 case 815: /* none: %empty */
17785#line 6755 "parse.y"
17786 {
17787 (yyval.node) = 0;
17788 /*% ripper: Qnil %*/
17789 }
17790#line 17791 "parse.c"
17791 break;
17792
17793
17794#line 17795 "parse.c"
17795
17796 default: break;
17797 }
17798 /* User semantic actions sometimes alter yychar, and that requires
17799 that yytoken be updated with the new translation. We take the
17800 approach of translating immediately before every use of yytoken.
17801 One alternative is translating here after every semantic action,
17802 but that translation would be missed if the semantic action invokes
17803 YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or
17804 if it invokes YYBACKUP. In the case of YYABORT or YYACCEPT, an
17805 incorrect destructor might then be invoked immediately. In the
17806 case of YYERROR or YYBACKUP, subsequent parser actions might lead
17807 to an incorrect destructor call or verbose syntax error message
17808 before the lookahead is translated. */
17809 YY_SYMBOL_PRINT ("-> $$ =", YY_CAST (yysymbol_kind_t, yyr1[yyn]), &yyval, &yyloc, p);
17810
17811 YYPOPSTACK (yylen);
17812 /* %after-reduce function. */
17813#line 2666 "parse.y"
17814 {after_reduce(yylen, p);}
17815#line 17816 "parse.c"
17816
17817 yylen = 0;
17818
17819 *++yyvsp = yyval;
17820 *++yylsp = yyloc;
17821
17822 /* Now 'shift' the result of the reduction. Determine what state
17823 that goes to, based on the state we popped back to and the rule
17824 number reduced by. */
17825 {
17826 const int yylhs = yyr1[yyn] - YYNTOKENS;
17827 const int yyi = yypgoto[yylhs] + *yyssp;
17828 yystate = (0 <= yyi && yyi <= YYLAST && yycheck[yyi] == *yyssp
17829 ? yytable[yyi]
17830 : yydefgoto[yylhs]);
17831 }
17832
17833 goto yynewstate;
17834
17835
17836/*--------------------------------------.
17837| yyerrlab -- here on detecting error. |
17838`--------------------------------------*/
17839yyerrlab:
17840 /* Make sure we have latest lookahead translation. See comments at
17841 user semantic actions for why this is necessary. */
17842 yytoken = yychar == YYEMPTY ? YYSYMBOL_YYEMPTY : YYTRANSLATE (yychar);
17843 /* If not already recovering from an error, report this error. */
17844 if (!yyerrstatus)
17845 {
17846 ++yynerrs;
17847 {
17848 yypcontext_t yyctx
17849 = {yyssp, yytoken, &yylloc};
17850 char const *yymsgp = YY_("syntax error");
17851 int yysyntax_error_status;
17852 yysyntax_error_status = yysyntax_error (&yymsg_alloc, &yymsg, &yyctx, p);
17853 if (yysyntax_error_status == 0)
17854 yymsgp = yymsg;
17855 else if (yysyntax_error_status == -1)
17856 {
17857 if (yymsg != yymsgbuf)
17858 YYSTACK_FREE (yymsg);
17859 yymsg = YY_CAST (char *,
17860 YYSTACK_ALLOC (YY_CAST (YYSIZE_T, yymsg_alloc)));
17861 if (yymsg)
17862 {
17863 yysyntax_error_status
17864 = yysyntax_error (&yymsg_alloc, &yymsg, &yyctx, p);
17865 yymsgp = yymsg;
17866 }
17867 else
17868 {
17869 yymsg = yymsgbuf;
17870 yymsg_alloc = sizeof yymsgbuf;
17871 yysyntax_error_status = YYENOMEM;
17872 }
17873 }
17874 yyerror (&yylloc, p, yymsgp);
17875 if (yysyntax_error_status == YYENOMEM)
17876 YYNOMEM;
17877 }
17878 }
17879
17880 yyerror_range[1] = yylloc;
17881 if (yyerrstatus == 3)
17882 {
17883 /* If just tried and failed to reuse lookahead token after an
17884 error, discard it. */
17885
17886 if (yychar <= END_OF_INPUT)
17887 {
17888 /* Return failure if at end of input. */
17889 if (yychar == END_OF_INPUT)
17890 YYABORT;
17891 }
17892 else
17893 {
17894 yydestruct ("Error: discarding",
17895 yytoken, &yylval, &yylloc, p);
17896 yychar = YYEMPTY;
17897 }
17898 }
17899
17900 /* Else will try to reuse lookahead token after shifting the error
17901 token. */
17902 goto yyerrlab1;
17903
17904
17905/*---------------------------------------------------.
17906| yyerrorlab -- error raised explicitly by YYERROR. |
17907`---------------------------------------------------*/
17908yyerrorlab:
17909 /* Pacify compilers when the user code never invokes YYERROR and the
17910 label yyerrorlab therefore never appears in user code. */
17911 if (0)
17912 YYERROR;
17913 ++yynerrs;
17914
17915 /* Do not reclaim the symbols of the rule whose action triggered
17916 this YYERROR. */
17917 YYPOPSTACK (yylen);
17918 /* %after-pop-stack function. */
17919#line 2668 "parse.y"
17920 {after_pop_stack(yylen, p);}
17921#line 17922 "parse.c"
17922
17923 yylen = 0;
17924 YY_STACK_PRINT (yyss, yyssp, p);
17925 yystate = *yyssp;
17926 goto yyerrlab1;
17927
17928
17929/*-------------------------------------------------------------.
17930| yyerrlab1 -- common code for both syntax error and YYERROR. |
17931`-------------------------------------------------------------*/
17932yyerrlab1:
17933 yyerrstatus = 3; /* Each real token shifted decrements this. */
17934
17935 /* Pop stack until we find a state that shifts the error token. */
17936 for (;;)
17937 {
17938 yyn = yypact[yystate];
17939 if (!yypact_value_is_default (yyn))
17940 {
17941 yyn += YYSYMBOL_YYerror;
17942 if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror)
17943 {
17944 yyn = yytable[yyn];
17945 if (0 < yyn)
17946 break;
17947 }
17948 }
17949
17950 /* Pop the current state because it cannot handle the error token. */
17951 if (yyssp == yyss)
17952 YYABORT;
17953
17954 yyerror_range[1] = *yylsp;
17955 yydestruct ("Error: popping",
17956 YY_ACCESSING_SYMBOL (yystate), yyvsp, yylsp, p);
17957 YYPOPSTACK (1);
17958 /* %after-pop-stack function. */
17959#line 2668 "parse.y"
17960 {after_pop_stack(1, p);}
17961#line 17962 "parse.c"
17962
17963 yystate = *yyssp;
17964 YY_STACK_PRINT (yyss, yyssp, p);
17965 }
17966
17967 YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
17968 *++yyvsp = yylval;
17969 YY_IGNORE_MAYBE_UNINITIALIZED_END
17970
17971 yyerror_range[2] = yylloc;
17972 ++yylsp;
17973 YYLLOC_DEFAULT (*yylsp, yyerror_range, 2);
17974
17975 /* Shift the error token. */
17976 YY_SYMBOL_PRINT ("Shifting", YY_ACCESSING_SYMBOL (yyn), yyvsp, yylsp, p);
17977 /* %after-shift-error-token code. */
17978#line 2667 "parse.y"
17979 {after_shift_error_token(p);}
17980#line 17981 "parse.c"
17981
17982
17983 yystate = yyn;
17984 goto yynewstate;
17985
17986
17987/*-------------------------------------.
17988| yyacceptlab -- YYACCEPT comes here. |
17989`-------------------------------------*/
17990yyacceptlab:
17991 yyresult = 0;
17992 goto yyreturnlab;
17993
17994
17995/*-----------------------------------.
17996| yyabortlab -- YYABORT comes here. |
17997`-----------------------------------*/
17998yyabortlab:
17999 yyresult = 1;
18000 goto yyreturnlab;
18001
18002
18003/*-----------------------------------------------------------.
18004| yyexhaustedlab -- YYNOMEM (memory exhaustion) comes here. |
18005`-----------------------------------------------------------*/
18006yyexhaustedlab:
18007 yyerror (&yylloc, p, YY_("memory exhausted"));
18008 yyresult = 2;
18009 goto yyreturnlab;
18010
18011
18012/*----------------------------------------------------------.
18013| yyreturnlab -- parsing is finished, clean up and return. |
18014`----------------------------------------------------------*/
18015yyreturnlab:
18016 if (yychar != YYEMPTY)
18017 {
18018 /* Make sure we have latest lookahead translation. See comments at
18019 user semantic actions for why this is necessary. */
18020 yytoken = YYTRANSLATE (yychar);
18021 yydestruct ("Cleanup: discarding lookahead",
18022 yytoken, &yylval, &yylloc, p);
18023 }
18024 /* Do not reclaim the symbols of the rule whose action triggered
18025 this YYABORT or YYACCEPT. */
18026 YYPOPSTACK (yylen);
18027 YY_STACK_PRINT (yyss, yyssp, p);
18028 while (yyssp != yyss)
18029 {
18030 yydestruct ("Cleanup: popping",
18031 YY_ACCESSING_SYMBOL (+*yyssp), yyvsp, yylsp, p);
18032 YYPOPSTACK (1);
18033 }
18034#ifndef yyoverflow
18035 if (yyss != yyssa)
18036 YYSTACK_FREE (yyss);
18037#endif
18038 if (yymsg != yymsgbuf)
18039 YYSTACK_FREE (yymsg);
18040 return yyresult;
18041}
18042
18043#line 6760 "parse.y"
18044
18045# undef p
18046# undef yylex
18047# undef yylval
18048# define yylval (*p->lval)
18049
18050static int regx_options(struct parser_params*);
18051static int tokadd_string(struct parser_params*,int,int,int,long*,rb_encoding**,rb_encoding**);
18052static void tokaddmbc(struct parser_params *p, int c, rb_encoding *enc);
18053static enum yytokentype parse_string(struct parser_params*,rb_strterm_literal_t*);
18054static enum yytokentype here_document(struct parser_params*,rb_strterm_heredoc_t*);
18055
18056#define set_parser_s_value(x) (ifdef_ripper(p->s_value = (x), (void)0))
18057
18058# define set_yylval_node(x) { \
18059 YYLTYPE _cur_loc; \
18060 rb_parser_set_location(p, &_cur_loc); \
18061 yylval.node = (x); \
18062 set_parser_s_value(STR_NEW(p->lex.ptok, p->lex.pcur-p->lex.ptok)); \
18063}
18064# define set_yylval_str(x) \
18065do { \
18066 set_yylval_node(NEW_STR(x, &_cur_loc)); \
18067 set_parser_s_value(rb_str_new_mutable_parser_string(x)); \
18068} while(0)
18069# define set_yylval_num(x) { \
18070 yylval.num = (x); \
18071 set_parser_s_value(x); \
18072}
18073# define set_yylval_id(x) (yylval.id = (x))
18074# define set_yylval_name(x) { \
18075 (yylval.id = (x)); \
18076 set_parser_s_value(ID2SYM(x)); \
18077}
18078# define yylval_id() (yylval.id)
18079
18080#define set_yylval_noname() set_yylval_id(keyword_nil)
18081#define has_delayed_token(p) (p->delayed.token != NULL)
18082
18083#ifndef RIPPER
18084#define literal_flush(p, ptr) ((p)->lex.ptok = (ptr))
18085#define dispatch_scan_event(p, t) parser_dispatch_scan_event(p, t, __LINE__)
18086
18087static bool
18088parser_has_token(struct parser_params *p)
18089{
18090 const char *const pcur = p->lex.pcur;
18091 const char *const ptok = p->lex.ptok;
18092 if (p->keep_tokens && (pcur < ptok)) {
18093 rb_bug("lex.pcur < lex.ptok. (line: %d) %"PRIdPTRDIFF"|%"PRIdPTRDIFF"|%"PRIdPTRDIFF"",
18094 p->ruby_sourceline, ptok - p->lex.pbeg, pcur - ptok, p->lex.pend - pcur);
18095 }
18096 return pcur > ptok;
18097}
18098
18099static const char *
18100escaped_char(int c)
18101{
18102 switch (c) {
18103 case '"': return "\\\"";
18104 case '\\': return "\\\\";
18105 case '\0': return "\\0";
18106 case '\n': return "\\n";
18107 case '\r': return "\\r";
18108 case '\t': return "\\t";
18109 case '\f': return "\\f";
18110 case '\013': return "\\v";
18111 case '\010': return "\\b";
18112 case '\007': return "\\a";
18113 case '\033': return "\\e";
18114 case '\x7f': return "\\c?";
18115 }
18116 return NULL;
18117}
18118
18119static rb_parser_string_t *
18120rb_parser_str_escape(struct parser_params *p, rb_parser_string_t *str)
18121{
18122 rb_encoding *enc = p->enc;
18123 const char *ptr = str->ptr;
18124 const char *pend = ptr + str->len;
18125 const char *prev = ptr;
18126 char charbuf[5] = {'\\', 'x', 0, 0, 0};
18127 rb_parser_string_t * result = rb_parser_string_new(p, 0, 0);
18128
18129 while (ptr < pend) {
18130 unsigned int c;
18131 const char *cc;
18132 int n = rb_enc_precise_mbclen(ptr, pend, enc);
18133 if (!MBCLEN_CHARFOUND_P(n)) {
18134 if (ptr > prev) parser_str_cat(result, prev, ptr - prev);
18135 n = rb_enc_mbminlen(enc);
18136 if (pend < ptr + n)
18137 n = (int)(pend - ptr);
18138 while (n--) {
18139 c = *ptr & 0xf0 >> 4;
18140 charbuf[2] = (c < 10) ? '0' + c : 'A' + c - 10;
18141 c = *ptr & 0x0f;
18142 charbuf[3] = (c < 10) ? '0' + c : 'A' + c - 10;
18143 parser_str_cat(result, charbuf, 4);
18144 prev = ++ptr;
18145 }
18146 continue;
18147 }
18148 n = MBCLEN_CHARFOUND_LEN(n);
18149 c = rb_enc_mbc_to_codepoint(ptr, pend, enc);
18150 ptr += n;
18151 cc = escaped_char(c);
18152 if (cc) {
18153 if (ptr - n > prev) parser_str_cat(result, prev, ptr - n - prev);
18154 parser_str_cat_cstr(result, cc);
18155 prev = ptr;
18156 }
18157 else if (rb_enc_isascii(c, enc) && ISPRINT(c)) {
18158 }
18159 else {
18160 if (ptr - n > prev) {
18161 parser_str_cat(result, prev, ptr - n - prev);
18162 prev = ptr - n;
18163 }
18164 parser_str_cat(result, prev, ptr - prev);
18165 prev = ptr;
18166 }
18167 }
18168 if (ptr > prev) parser_str_cat(result, prev, ptr - prev);
18169
18170 return result;
18171}
18172
18173static void
18174parser_append_tokens(struct parser_params *p, rb_parser_string_t *str, enum yytokentype t, int line)
18175{
18177 token->id = p->token_id;
18178 token->type_name = parser_token2char(p, t);
18179 token->str = str;
18180 token->loc.beg_pos = p->yylloc->beg_pos;
18181 token->loc.end_pos = p->yylloc->end_pos;
18182 rb_parser_ary_push_ast_token(p, p->tokens, token);
18183 p->token_id++;
18184
18185 if (p->debug) {
18186 rb_parser_string_t *str_escaped = rb_parser_str_escape(p, str);
18187 rb_parser_printf(p, "Append tokens (line: %d) [%d, :%s, \"%s\", [%d, %d, %d, %d]]\n",
18188 line, token->id, token->type_name, str_escaped->ptr,
18189 token->loc.beg_pos.lineno, token->loc.beg_pos.column,
18190 token->loc.end_pos.lineno, token->loc.end_pos.column);
18191 rb_parser_string_free(p, str_escaped);
18192 }
18193}
18194
18195static void
18196parser_dispatch_scan_event(struct parser_params *p, enum yytokentype t, int line)
18197{
18198 debug_token_line(p, "parser_dispatch_scan_event", line);
18199
18200 if (!parser_has_token(p)) return;
18201
18202 RUBY_SET_YYLLOC(*p->yylloc);
18203
18204 if (p->keep_tokens) {
18205 rb_parser_string_t *str = rb_parser_encoding_string_new(p, p->lex.ptok, p->lex.pcur - p->lex.ptok, p->enc);
18206 parser_append_tokens(p, str, t, line);
18207 }
18208
18209 token_flush(p);
18210}
18211
18212#define dispatch_delayed_token(p, t) parser_dispatch_delayed_token(p, t, __LINE__)
18213static void
18214parser_dispatch_delayed_token(struct parser_params *p, enum yytokentype t, int line)
18215{
18216 debug_token_line(p, "parser_dispatch_delayed_token", line);
18217
18218 if (!has_delayed_token(p)) return;
18219
18220 RUBY_SET_YYLLOC_OF_DELAYED_TOKEN(*p->yylloc);
18221
18222 if (p->keep_tokens) {
18223 /* p->delayed.token is freed by rb_parser_tokens_free */
18224 parser_append_tokens(p, p->delayed.token, t, line);
18225 }
18226 else {
18227 rb_parser_string_free(p, p->delayed.token);
18228 }
18229
18230 p->delayed.token = NULL;
18231}
18232#else
18233#define literal_flush(p, ptr) ((void)(ptr))
18234
18235static int
18236ripper_has_scan_event(struct parser_params *p)
18237{
18238 if (p->lex.pcur < p->lex.ptok) rb_raise(rb_eRuntimeError, "lex.pcur < lex.ptok");
18239 return p->lex.pcur > p->lex.ptok;
18240}
18241
18242static VALUE
18243ripper_scan_event_val(struct parser_params *p, enum yytokentype t)
18244{
18245 VALUE str = STR_NEW(p->lex.ptok, p->lex.pcur - p->lex.ptok);
18246 VALUE rval = ripper_dispatch1(p, ripper_token2eventid(t), str);
18247 RUBY_SET_YYLLOC(*p->yylloc);
18248 token_flush(p);
18249 return rval;
18250}
18251
18252static void
18253ripper_dispatch_scan_event(struct parser_params *p, enum yytokentype t)
18254{
18255 if (!ripper_has_scan_event(p)) return;
18256
18257 set_parser_s_value(ripper_scan_event_val(p, t));
18258}
18259#define dispatch_scan_event(p, t) ripper_dispatch_scan_event(p, t)
18260
18261static void
18262ripper_dispatch_delayed_token(struct parser_params *p, enum yytokentype t)
18263{
18264 /* save and adjust the location to delayed token for callbacks */
18265 int saved_line = p->ruby_sourceline;
18266 const char *saved_tokp = p->lex.ptok;
18267 VALUE s_value, str;
18268
18269 if (!has_delayed_token(p)) return;
18270 p->ruby_sourceline = p->delayed.beg_line;
18271 p->lex.ptok = p->lex.pbeg + p->delayed.beg_col;
18272 str = rb_str_new_mutable_parser_string(p->delayed.token);
18273 rb_parser_string_free(p, p->delayed.token);
18274 s_value = ripper_dispatch1(p, ripper_token2eventid(t), str);
18275 set_parser_s_value(s_value);
18276 p->delayed.token = NULL;
18277 p->ruby_sourceline = saved_line;
18278 p->lex.ptok = saved_tokp;
18279}
18280#define dispatch_delayed_token(p, t) ripper_dispatch_delayed_token(p, t)
18281#endif /* RIPPER */
18282
18283static inline int
18284is_identchar(struct parser_params *p, const char *ptr, const char *MAYBE_UNUSED(ptr_end), rb_encoding *enc)
18285{
18286 return rb_enc_isalnum((unsigned char)*ptr, enc) || *ptr == '_' || !ISASCII(*ptr);
18287}
18288
18289static inline bool
18290peek_word_at(struct parser_params *p, const char *str, size_t len, int at)
18291{
18292 const char *ptr = p->lex.pcur + at;
18293 if (lex_eol_ptr_n_p(p, ptr, len-1)) return false;
18294 if (memcmp(ptr, str, len)) return false;
18295 if (lex_eol_ptr_n_p(p, ptr, len)) return true;
18296 return !is_identchar(p, ptr+len, p->lex.pend, p->enc);
18297}
18298
18299static inline int
18300parser_is_identchar(struct parser_params *p)
18301{
18302 return !(p)->eofp && is_identchar(p, p->lex.pcur-1, p->lex.pend, p->enc);
18303}
18304
18305static inline int
18306parser_isascii(struct parser_params *p)
18307{
18308 return ISASCII(*(p->lex.pcur-1));
18309}
18310
18311static void
18312token_info_setup(token_info *ptinfo, const char *ptr, const rb_code_location_t *loc)
18313{
18314 int column = 1, nonspc = 0, i;
18315 for (i = 0; i < loc->beg_pos.column; i++, ptr++) {
18316 if (*ptr == '\t') {
18317 column = (((column - 1) / TAB_WIDTH) + 1) * TAB_WIDTH;
18318 }
18319 column++;
18320 if (*ptr != ' ' && *ptr != '\t') {
18321 nonspc = 1;
18322 }
18323 }
18324
18325 ptinfo->beg = loc->beg_pos;
18326 ptinfo->indent = column;
18327 ptinfo->nonspc = nonspc;
18328}
18329
18330static void
18331token_info_push(struct parser_params *p, const char *token, const rb_code_location_t *loc)
18332{
18333 token_info *ptinfo;
18334
18335 if (!p->token_info_enabled) return;
18336 ptinfo = ALLOC(token_info);
18337 ptinfo->token = token;
18338 ptinfo->next = p->token_info;
18339 token_info_setup(ptinfo, p->lex.pbeg, loc);
18340
18341 p->token_info = ptinfo;
18342}
18343
18344static void
18345token_info_pop(struct parser_params *p, const char *token, const rb_code_location_t *loc)
18346{
18347 token_info *ptinfo_beg = p->token_info;
18348
18349 if (!ptinfo_beg) return;
18350
18351 /* indentation check of matched keywords (begin..end, if..end, etc.) */
18352 token_info_warn(p, token, ptinfo_beg, 1, loc);
18353
18354 p->token_info = ptinfo_beg->next;
18355 ruby_sized_xfree(ptinfo_beg, sizeof(*ptinfo_beg));
18356}
18357
18358static void
18359token_info_drop(struct parser_params *p, const char *token, rb_code_position_t beg_pos)
18360{
18361 token_info *ptinfo_beg = p->token_info;
18362
18363 if (!ptinfo_beg) return;
18364 p->token_info = ptinfo_beg->next;
18365
18366 if (ptinfo_beg->beg.lineno != beg_pos.lineno ||
18367 ptinfo_beg->beg.column != beg_pos.column ||
18368 strcmp(ptinfo_beg->token, token)) {
18369 compile_error(p, "token position mismatch: %d:%d:%s expected but %d:%d:%s",
18370 beg_pos.lineno, beg_pos.column, token,
18371 ptinfo_beg->beg.lineno, ptinfo_beg->beg.column,
18372 ptinfo_beg->token);
18373 }
18374
18375 ruby_sized_xfree(ptinfo_beg, sizeof(*ptinfo_beg));
18376}
18377
18378static void
18379token_info_warn(struct parser_params *p, const char *token, token_info *ptinfo_beg, int same, const rb_code_location_t *loc)
18380{
18381 token_info ptinfo_end_body, *ptinfo_end = &ptinfo_end_body;
18382 if (!p->token_info_enabled) return;
18383 if (!ptinfo_beg) return;
18384 token_info_setup(ptinfo_end, p->lex.pbeg, loc);
18385 if (ptinfo_beg->beg.lineno == ptinfo_end->beg.lineno) return; /* ignore one-line block */
18386 if (ptinfo_beg->nonspc || ptinfo_end->nonspc) return; /* ignore keyword in the middle of a line */
18387 if (ptinfo_beg->indent == ptinfo_end->indent) return; /* the indents are matched */
18388 if (!same && ptinfo_beg->indent < ptinfo_end->indent) return;
18389 rb_warn3L(ptinfo_end->beg.lineno,
18390 "mismatched indentations at '%s' with '%s' at %d",
18391 WARN_S(token), WARN_S(ptinfo_beg->token), WARN_I(ptinfo_beg->beg.lineno));
18392}
18393
18394static int
18395parser_precise_mbclen(struct parser_params *p, const char *ptr)
18396{
18397 int len = rb_enc_precise_mbclen(ptr, p->lex.pend, p->enc);
18398 if (!MBCLEN_CHARFOUND_P(len)) {
18399 compile_error(p, "invalid multibyte char (%s)", rb_enc_name(p->enc));
18400 return -1;
18401 }
18402 return len;
18403}
18404
18405#ifndef RIPPER
18406static inline void
18407parser_show_error_line(struct parser_params *p, const YYLTYPE *yylloc)
18408{
18409 rb_parser_string_t *str;
18410 int lineno = p->ruby_sourceline;
18411 if (!yylloc) {
18412 return;
18413 }
18414 else if (yylloc->beg_pos.lineno == lineno) {
18415 str = p->lex.lastline;
18416 }
18417 else {
18418 return;
18419 }
18420 ruby_show_error_line(p, p->error_buffer, yylloc, lineno, str);
18421}
18422
18423static int
18424parser_yyerror(struct parser_params *p, const rb_code_location_t *yylloc, const char *msg)
18425{
18426#if 0
18427 YYLTYPE current;
18428
18429 if (!yylloc) {
18430 yylloc = RUBY_SET_YYLLOC(current);
18431 }
18432 else if ((p->ruby_sourceline != yylloc->beg_pos.lineno &&
18433 p->ruby_sourceline != yylloc->end_pos.lineno)) {
18434 yylloc = 0;
18435 }
18436#endif
18437 parser_compile_error(p, yylloc, "%s", msg);
18438 parser_show_error_line(p, yylloc);
18439 return 0;
18440}
18441
18442static int
18443parser_yyerror0(struct parser_params *p, const char *msg)
18444{
18445 YYLTYPE current;
18446 return parser_yyerror(p, RUBY_SET_YYLLOC(current), msg);
18447}
18448
18449void
18450ruby_show_error_line(struct parser_params *p, VALUE errbuf, const YYLTYPE *yylloc, int lineno, rb_parser_string_t *str)
18451{
18452 VALUE mesg;
18453 const int max_line_margin = 30;
18454 const char *ptr, *ptr_end, *pt, *pb;
18455 const char *pre = "", *post = "", *pend;
18456 const char *code = "", *caret = "";
18457 const char *lim;
18458 const char *const pbeg = PARSER_STRING_PTR(str);
18459 char *buf;
18460 long len;
18461 int i;
18462
18463 if (!yylloc) return;
18464 pend = rb_parser_string_end(str);
18465 if (pend > pbeg && pend[-1] == '\n') {
18466 if (--pend > pbeg && pend[-1] == '\r') --pend;
18467 }
18468
18469 pt = pend;
18470 if (lineno == yylloc->end_pos.lineno &&
18471 (pend - pbeg) > yylloc->end_pos.column) {
18472 pt = pbeg + yylloc->end_pos.column;
18473 }
18474
18475 ptr = ptr_end = pt;
18476 lim = ptr - pbeg > max_line_margin ? ptr - max_line_margin : pbeg;
18477 while ((lim < ptr) && (*(ptr-1) != '\n')) ptr--;
18478
18479 lim = pend - ptr_end > max_line_margin ? ptr_end + max_line_margin : pend;
18480 while ((ptr_end < lim) && (*ptr_end != '\n') && (*ptr_end != '\r')) ptr_end++;
18481
18482 len = ptr_end - ptr;
18483 if (len > 4) {
18484 if (ptr > pbeg) {
18485 ptr = rb_enc_prev_char(pbeg, ptr, pt, rb_parser_str_get_encoding(str));
18486 if (ptr > pbeg) pre = "...";
18487 }
18488 if (ptr_end < pend) {
18489 ptr_end = rb_enc_prev_char(pt, ptr_end, pend, rb_parser_str_get_encoding(str));
18490 if (ptr_end < pend) post = "...";
18491 }
18492 }
18493 pb = pbeg;
18494 if (lineno == yylloc->beg_pos.lineno) {
18495 pb += yylloc->beg_pos.column;
18496 if (pb > pt) pb = pt;
18497 }
18498 if (pb < ptr) pb = ptr;
18499 if (len <= 4 && yylloc->beg_pos.lineno == yylloc->end_pos.lineno) {
18500 return;
18501 }
18502 if (RTEST(errbuf)) {
18503 mesg = rb_attr_get(errbuf, idMesg);
18504 if (char_at_end(p, mesg, '\n') != '\n')
18505 rb_str_cat_cstr(mesg, "\n");
18506 }
18507 else {
18508 mesg = rb_enc_str_new(0, 0, rb_parser_str_get_encoding(str));
18509 }
18510 if (!errbuf && rb_stderr_tty_p()) {
18511#define CSI_BEGIN "\033["
18512#define CSI_SGR "m"
18513 rb_str_catf(mesg,
18514 CSI_BEGIN""CSI_SGR"%s" /* pre */
18515 CSI_BEGIN"1"CSI_SGR"%.*s"
18516 CSI_BEGIN"1;4"CSI_SGR"%.*s"
18517 CSI_BEGIN";1"CSI_SGR"%.*s"
18518 CSI_BEGIN""CSI_SGR"%s" /* post */
18519 "\n",
18520 pre,
18521 (int)(pb - ptr), ptr,
18522 (int)(pt - pb), pb,
18523 (int)(ptr_end - pt), pt,
18524 post);
18525 }
18526 else {
18527 char *p2;
18528
18529 len = ptr_end - ptr;
18530 lim = pt < pend ? pt : pend;
18531 i = (int)(lim - ptr);
18532 buf = ALLOCA_N(char, i+2);
18533 code = ptr;
18534 caret = p2 = buf;
18535 if (ptr <= pb) {
18536 while (ptr < pb) {
18537 *p2++ = *ptr++ == '\t' ? '\t' : ' ';
18538 }
18539 *p2++ = '^';
18540 ptr++;
18541 }
18542 if (lim > ptr) {
18543 memset(p2, '~', (lim - ptr));
18544 p2 += (lim - ptr);
18545 }
18546 *p2 = '\0';
18547 rb_str_catf(mesg, "%s%.*s%s\n""%s%s\n",
18548 pre, (int)len, code, post,
18549 pre, caret);
18550 }
18551 if (!errbuf) rb_write_error_str(mesg);
18552}
18553#else
18554
18555static int
18556parser_yyerror(struct parser_params *p, const YYLTYPE *yylloc, const char *msg)
18557{
18558 const char *pcur = 0, *ptok = 0;
18559 if (p->ruby_sourceline == yylloc->beg_pos.lineno &&
18560 p->ruby_sourceline == yylloc->end_pos.lineno) {
18561 pcur = p->lex.pcur;
18562 ptok = p->lex.ptok;
18563 p->lex.ptok = p->lex.pbeg + yylloc->beg_pos.column;
18564 p->lex.pcur = p->lex.pbeg + yylloc->end_pos.column;
18565 }
18566 parser_yyerror0(p, msg);
18567 if (pcur) {
18568 p->lex.ptok = ptok;
18569 p->lex.pcur = pcur;
18570 }
18571 return 0;
18572}
18573
18574static int
18575parser_yyerror0(struct parser_params *p, const char *msg)
18576{
18577 dispatch1(parse_error, STR_NEW2(msg));
18578 ripper_error(p);
18579 return 0;
18580}
18581
18582static inline void
18583parser_show_error_line(struct parser_params *p, const YYLTYPE *yylloc)
18584{
18585}
18586#endif /* !RIPPER */
18587
18588static int
18589vtable_size(const struct vtable *tbl)
18590{
18591 if (!DVARS_TERMINAL_P(tbl)) {
18592 return tbl->pos;
18593 }
18594 else {
18595 return 0;
18596 }
18597}
18598
18599static struct vtable *
18600vtable_alloc_gen(struct parser_params *p, int line, struct vtable *prev)
18601{
18602 struct vtable *tbl = ALLOC(struct vtable);
18603 tbl->pos = 0;
18604 tbl->capa = 8;
18605 tbl->tbl = ALLOC_N(ID, tbl->capa);
18606 tbl->prev = prev;
18607#ifndef RIPPER
18608 if (p->debug) {
18609 rb_parser_printf(p, "vtable_alloc:%d: %p\n", line, (void *)tbl);
18610 }
18611#endif
18612 return tbl;
18613}
18614#define vtable_alloc(prev) vtable_alloc_gen(p, __LINE__, prev)
18615
18616static void
18617vtable_free_gen(struct parser_params *p, int line, const char *name,
18618 struct vtable *tbl)
18619{
18620#ifndef RIPPER
18621 if (p->debug) {
18622 rb_parser_printf(p, "vtable_free:%d: %s(%p)\n", line, name, (void *)tbl);
18623 }
18624#endif
18625 if (!DVARS_TERMINAL_P(tbl)) {
18626 if (tbl->tbl) {
18627 ruby_sized_xfree(tbl->tbl, tbl->capa * sizeof(ID));
18628 }
18629 ruby_sized_xfree(tbl, sizeof(*tbl));
18630 }
18631}
18632#define vtable_free(tbl) vtable_free_gen(p, __LINE__, #tbl, tbl)
18633
18634static void
18635vtable_add_gen(struct parser_params *p, int line, const char *name,
18636 struct vtable *tbl, ID id)
18637{
18638#ifndef RIPPER
18639 if (p->debug) {
18640 rb_parser_printf(p, "vtable_add:%d: %s(%p), %s\n",
18641 line, name, (void *)tbl, rb_id2name(id));
18642 }
18643#endif
18644 if (DVARS_TERMINAL_P(tbl)) {
18645 rb_parser_fatal(p, "vtable_add: vtable is not allocated (%p)", (void *)tbl);
18646 return;
18647 }
18648 if (tbl->pos == tbl->capa) {
18649 tbl->capa = tbl->capa * 2;
18650 SIZED_REALLOC_N(tbl->tbl, ID, tbl->capa, tbl->pos);
18651 }
18652 tbl->tbl[tbl->pos++] = id;
18653}
18654#define vtable_add(tbl, id) vtable_add_gen(p, __LINE__, #tbl, tbl, id)
18655
18656static void
18657vtable_pop_gen(struct parser_params *p, int line, const char *name,
18658 struct vtable *tbl, int n)
18659{
18660 if (p->debug) {
18661 rb_parser_printf(p, "vtable_pop:%d: %s(%p), %d\n",
18662 line, name, (void *)tbl, n);
18663 }
18664 if (tbl->pos < n) {
18665 rb_parser_fatal(p, "vtable_pop: unreachable (%d < %d)", tbl->pos, n);
18666 return;
18667 }
18668 tbl->pos -= n;
18669}
18670#define vtable_pop(tbl, n) vtable_pop_gen(p, __LINE__, #tbl, tbl, n)
18671
18672static int
18673vtable_included(const struct vtable * tbl, ID id)
18674{
18675 int i;
18676
18677 if (!DVARS_TERMINAL_P(tbl)) {
18678 for (i = 0; i < tbl->pos; i++) {
18679 if (tbl->tbl[i] == id) {
18680 return i+1;
18681 }
18682 }
18683 }
18684 return 0;
18685}
18686
18687static void parser_prepare(struct parser_params *p);
18688
18689static int
18690e_option_supplied(struct parser_params *p)
18691{
18692 return strcmp(p->ruby_sourcefile, "-e") == 0;
18693}
18694
18695#ifndef RIPPER
18696static NODE *parser_append_options(struct parser_params *p, NODE *node);
18697
18698static VALUE
18699yycompile0(VALUE arg)
18700{
18701 int n;
18702 NODE *tree;
18703 struct parser_params *p = (struct parser_params *)arg;
18704 int cov = FALSE;
18705
18706 if (!compile_for_eval && !NIL_P(p->ruby_sourcefile_string) && !e_option_supplied(p)) {
18707 cov = TRUE;
18708 }
18709
18710 if (p->debug_lines) {
18711 p->ast->body.script_lines = p->debug_lines;
18712 }
18713
18714 parser_prepare(p);
18715#define RUBY_DTRACE_PARSE_HOOK(name) \
18716 if (RUBY_DTRACE_PARSE_##name##_ENABLED()) { \
18717 RUBY_DTRACE_PARSE_##name(p->ruby_sourcefile, p->ruby_sourceline); \
18718 }
18719 RUBY_DTRACE_PARSE_HOOK(BEGIN);
18720 n = yyparse(p);
18721 RUBY_DTRACE_PARSE_HOOK(END);
18722
18723 p->debug_lines = 0;
18724
18725 xfree(p->lex.strterm);
18726 p->lex.strterm = 0;
18727 p->lex.pcur = p->lex.pbeg = p->lex.pend = 0;
18728 if (n || p->error_p) {
18729 VALUE mesg = p->error_buffer;
18730 if (!mesg) {
18731 mesg = syntax_error_new();
18732 }
18733 if (!p->error_tolerant) {
18734 rb_set_errinfo(mesg);
18735 return FALSE;
18736 }
18737 }
18738 tree = p->eval_tree;
18739 if (!tree) {
18740 tree = NEW_NIL(&NULL_LOC);
18741 }
18742 else {
18743 rb_parser_ary_t *tokens = p->tokens;
18744 NODE *prelude;
18745 NODE *body = parser_append_options(p, RNODE_SCOPE(tree)->nd_body);
18746 prelude = block_append(p, p->eval_tree_begin, body);
18747 RNODE_SCOPE(tree)->nd_body = prelude;
18748 p->ast->body.frozen_string_literal = p->frozen_string_literal;
18749 p->ast->body.coverage_enabled = cov;
18750 if (p->keep_tokens) {
18751 p->ast->node_buffer->tokens = tokens;
18752 p->tokens = NULL;
18753 }
18754 }
18755 p->ast->body.root = tree;
18756 p->ast->body.line_count = p->line_count;
18757 return TRUE;
18758}
18759
18760static rb_ast_t *
18761yycompile(struct parser_params *p, VALUE fname, int line)
18762{
18763 rb_ast_t *ast;
18764 if (NIL_P(fname)) {
18765 p->ruby_sourcefile_string = Qnil;
18766 p->ruby_sourcefile = "(none)";
18767 }
18768 else {
18769 p->ruby_sourcefile_string = rb_str_to_interned_str(fname);
18770 p->ruby_sourcefile = StringValueCStr(fname);
18771 }
18772 p->ruby_sourceline = line - 1;
18773
18774 p->lvtbl = NULL;
18775
18776 p->ast = ast = rb_ast_new();
18777 compile_callback(yycompile0, (VALUE)p);
18778 p->ast = 0;
18779
18780 while (p->lvtbl) {
18781 local_pop(p);
18782 }
18783
18784 return ast;
18785}
18786#endif /* !RIPPER */
18787
18788static rb_encoding *
18789must_be_ascii_compatible(struct parser_params *p, rb_parser_string_t *s)
18790{
18791 rb_encoding *enc = rb_parser_str_get_encoding(s);
18792 if (!rb_enc_asciicompat(enc)) {
18793 rb_raise(rb_eArgError, "invalid source encoding");
18794 }
18795 return enc;
18796}
18797
18798static rb_parser_string_t *
18799lex_getline(struct parser_params *p)
18800{
18801 rb_parser_string_t *line = (*p->lex.gets)(p, p->lex.input, p->line_count);
18802 if (!line) return 0;
18803 p->line_count++;
18804 string_buffer_append(p, line);
18805 must_be_ascii_compatible(p, line);
18806 return line;
18807}
18808
18809#ifndef RIPPER
18810rb_ast_t*
18811rb_parser_compile(rb_parser_t *p, rb_parser_lex_gets_func *gets, VALUE fname, rb_parser_input_data input, int line)
18812{
18813 p->lex.gets = gets;
18814 p->lex.input = input;
18815 p->lex.pbeg = p->lex.pcur = p->lex.pend = 0;
18816
18817 return yycompile(p, fname, line);
18818}
18819#endif /* !RIPPER */
18820
18821#define STR_FUNC_ESCAPE 0x01
18822#define STR_FUNC_EXPAND 0x02
18823#define STR_FUNC_REGEXP 0x04
18824#define STR_FUNC_QWORDS 0x08
18825#define STR_FUNC_SYMBOL 0x10
18826#define STR_FUNC_INDENT 0x20
18827#define STR_FUNC_LABEL 0x40
18828#define STR_FUNC_LIST 0x4000
18829#define STR_FUNC_TERM 0x8000
18830
18831enum string_type {
18832 str_label = STR_FUNC_LABEL,
18833 str_squote = (0),
18834 str_dquote = (STR_FUNC_EXPAND),
18835 str_xquote = (STR_FUNC_EXPAND),
18836 str_regexp = (STR_FUNC_REGEXP|STR_FUNC_ESCAPE|STR_FUNC_EXPAND),
18837 str_sword = (STR_FUNC_QWORDS|STR_FUNC_LIST),
18838 str_dword = (STR_FUNC_QWORDS|STR_FUNC_EXPAND|STR_FUNC_LIST),
18839 str_ssym = (STR_FUNC_SYMBOL),
18840 str_dsym = (STR_FUNC_SYMBOL|STR_FUNC_EXPAND)
18841};
18842
18843static rb_parser_string_t *
18844parser_str_new(struct parser_params *p, const char *ptr, long len, rb_encoding *enc, int func, rb_encoding *enc0)
18845{
18846 rb_parser_string_t *pstr;
18847
18848 pstr = rb_parser_encoding_string_new(p, ptr, len, enc);
18849
18850 if (!(func & STR_FUNC_REGEXP)) {
18851 if (rb_parser_is_ascii_string(p, pstr)) {
18852 }
18853 else if (rb_is_usascii_enc((void *)enc0) && enc != rb_utf8_encoding()) {
18854 /* everything is valid in ASCII-8BIT */
18855 enc = rb_ascii8bit_encoding();
18856 PARSER_ENCODING_CODERANGE_SET(pstr, enc, RB_PARSER_ENC_CODERANGE_VALID);
18857 }
18858 }
18859
18860 return pstr;
18861}
18862
18863static int
18864strterm_is_heredoc(rb_strterm_t *strterm)
18865{
18866 return strterm->heredoc;
18867}
18868
18869static rb_strterm_t *
18870new_strterm(struct parser_params *p, int func, int term, int paren)
18871{
18872 rb_strterm_t *strterm = ZALLOC(rb_strterm_t);
18873 strterm->u.literal.func = func;
18874 strterm->u.literal.term = term;
18875 strterm->u.literal.paren = paren;
18876 return strterm;
18877}
18878
18879static rb_strterm_t *
18880new_heredoc(struct parser_params *p)
18881{
18882 rb_strterm_t *strterm = ZALLOC(rb_strterm_t);
18883 strterm->heredoc = true;
18884 return strterm;
18885}
18886
18887#define peek(p,c) peek_n(p, (c), 0)
18888#define peek_n(p,c,n) (!lex_eol_n_p(p, n) && (c) == (unsigned char)(p)->lex.pcur[n])
18889#define peekc(p) peekc_n(p, 0)
18890#define peekc_n(p,n) (lex_eol_n_p(p, n) ? -1 : (unsigned char)(p)->lex.pcur[n])
18891
18892#define add_delayed_token(p, tok, end) parser_add_delayed_token(p, tok, end, __LINE__)
18893static void
18894parser_add_delayed_token(struct parser_params *p, const char *tok, const char *end, int line)
18895{
18896 debug_token_line(p, "add_delayed_token", line);
18897
18898 if (tok < end) {
18899 if (has_delayed_token(p)) {
18900 bool next_line = parser_string_char_at_end(p, p->delayed.token, 0) == '\n';
18901 int end_line = (next_line ? 1 : 0) + p->delayed.end_line;
18902 int end_col = (next_line ? 0 : p->delayed.end_col);
18903 if (end_line != p->ruby_sourceline || end_col != tok - p->lex.pbeg) {
18904 dispatch_delayed_token(p, tSTRING_CONTENT);
18905 }
18906 }
18907 if (!has_delayed_token(p)) {
18908 p->delayed.token = rb_parser_string_new(p, 0, 0);
18909 rb_parser_enc_associate(p, p->delayed.token, p->enc);
18910 p->delayed.beg_line = p->ruby_sourceline;
18911 p->delayed.beg_col = rb_long2int(tok - p->lex.pbeg);
18912 }
18913 parser_str_cat(p->delayed.token, tok, end - tok);
18914 p->delayed.end_line = p->ruby_sourceline;
18915 p->delayed.end_col = rb_long2int(end - p->lex.pbeg);
18916 p->lex.ptok = end;
18917 }
18918}
18919
18920static void
18921set_lastline(struct parser_params *p, rb_parser_string_t *str)
18922{
18923 p->lex.pbeg = p->lex.pcur = PARSER_STRING_PTR(str);
18924 p->lex.pend = p->lex.pcur + PARSER_STRING_LEN(str);
18925 p->lex.lastline = str;
18926}
18927
18928static int
18929nextline(struct parser_params *p, int set_encoding)
18930{
18931 rb_parser_string_t *str = p->lex.nextline;
18932 p->lex.nextline = 0;
18933 if (!str) {
18934 if (p->eofp)
18935 return -1;
18936
18937 if (!lex_eol_ptr_p(p, p->lex.pbeg) && *(p->lex.pend-1) != '\n') {
18938 goto end_of_input;
18939 }
18940
18941 if (!p->lex.input || !(str = lex_getline(p))) {
18942 end_of_input:
18943 p->eofp = 1;
18944 lex_goto_eol(p);
18945 return -1;
18946 }
18947#ifndef RIPPER
18948 if (p->debug_lines) {
18949 if (set_encoding) rb_parser_enc_associate(p, str, p->enc);
18950 rb_parser_string_t *copy = rb_parser_string_deep_copy(p, str);
18951 rb_parser_ary_push_script_line(p, p->debug_lines, copy);
18952 }
18953#endif
18954 p->cr_seen = FALSE;
18955 }
18956 else if (str == AFTER_HEREDOC_WITHOUT_TERMINATOR) {
18957 /* after here-document without terminator */
18958 goto end_of_input;
18959 }
18960 add_delayed_token(p, p->lex.ptok, p->lex.pend);
18961 if (p->heredoc_end > 0) {
18962 p->ruby_sourceline = p->heredoc_end;
18963 p->heredoc_end = 0;
18964 }
18965 p->ruby_sourceline++;
18966 set_lastline(p, str);
18967 token_flush(p);
18968 return 0;
18969}
18970
18971static int
18972parser_cr(struct parser_params *p, int c)
18973{
18974 if (peek(p, '\n')) {
18975 p->lex.pcur++;
18976 c = '\n';
18977 }
18978 return c;
18979}
18980
18981static inline int
18982nextc0(struct parser_params *p, int set_encoding)
18983{
18984 int c;
18985
18986 if (UNLIKELY(lex_eol_p(p) || p->eofp || p->lex.nextline > AFTER_HEREDOC_WITHOUT_TERMINATOR)) {
18987 if (nextline(p, set_encoding)) return -1;
18988 }
18989 c = (unsigned char)*p->lex.pcur++;
18990 if (UNLIKELY(c == '\r')) {
18991 c = parser_cr(p, c);
18992 }
18993
18994 return c;
18995}
18996#define nextc(p) nextc0(p, TRUE)
18997
18998static void
18999pushback(struct parser_params *p, int c)
19000{
19001 if (c == -1) return;
19002 p->eofp = 0;
19003 p->lex.pcur--;
19004 if (p->lex.pcur > p->lex.pbeg && p->lex.pcur[0] == '\n' && p->lex.pcur[-1] == '\r') {
19005 p->lex.pcur--;
19006 }
19007}
19008
19009#define was_bol(p) ((p)->lex.pcur == (p)->lex.pbeg + 1)
19010
19011#define tokfix(p) ((p)->tokenbuf[(p)->tokidx]='\0')
19012#define tok(p) (p)->tokenbuf
19013#define toklen(p) (p)->tokidx
19014
19015static int
19016looking_at_eol_p(struct parser_params *p)
19017{
19018 const char *ptr = p->lex.pcur;
19019 while (!lex_eol_ptr_p(p, ptr)) {
19020 int c = (unsigned char)*ptr++;
19021 int eol = (c == '\n' || c == '#');
19022 if (eol || !ISSPACE(c)) {
19023 return eol;
19024 }
19025 }
19026 return TRUE;
19027}
19028
19029static char*
19030newtok(struct parser_params *p)
19031{
19032 p->tokidx = 0;
19033 if (!p->tokenbuf) {
19034 p->toksiz = 60;
19035 p->tokenbuf = ALLOC_N(char, 60);
19036 }
19037 if (p->toksiz > 4096) {
19038 p->toksiz = 60;
19039 REALLOC_N(p->tokenbuf, char, 60);
19040 }
19041 return p->tokenbuf;
19042}
19043
19044static char *
19045tokspace(struct parser_params *p, int n)
19046{
19047 p->tokidx += n;
19048
19049 if (p->tokidx >= p->toksiz) {
19050 do {p->toksiz *= 2;} while (p->toksiz < p->tokidx);
19051 REALLOC_N(p->tokenbuf, char, p->toksiz);
19052 }
19053 return &p->tokenbuf[p->tokidx-n];
19054}
19055
19056static void
19057tokadd(struct parser_params *p, int c)
19058{
19059 p->tokenbuf[p->tokidx++] = (char)c;
19060 if (p->tokidx >= p->toksiz) {
19061 p->toksiz *= 2;
19062 REALLOC_N(p->tokenbuf, char, p->toksiz);
19063 }
19064}
19065
19066static int
19067tok_hex(struct parser_params *p, size_t *numlen)
19068{
19069 int c;
19070
19071 c = (int)ruby_scan_hex(p->lex.pcur, 2, numlen);
19072 if (!*numlen) {
19073 flush_string_content(p, p->enc, rb_strlen_lit("\\x"));
19074 yyerror0("invalid hex escape");
19075 dispatch_scan_event(p, tSTRING_CONTENT);
19076 return 0;
19077 }
19078 p->lex.pcur += *numlen;
19079 return c;
19080}
19081
19082#define tokcopy(p, n) memcpy(tokspace(p, n), (p)->lex.pcur - (n), (n))
19083
19084static int
19085escaped_control_code(int c)
19086{
19087 int c2 = 0;
19088 switch (c) {
19089 case ' ':
19090 c2 = 's';
19091 break;
19092 case '\n':
19093 c2 = 'n';
19094 break;
19095 case '\t':
19096 c2 = 't';
19097 break;
19098 case '\v':
19099 c2 = 'v';
19100 break;
19101 case '\r':
19102 c2 = 'r';
19103 break;
19104 case '\f':
19105 c2 = 'f';
19106 break;
19107 }
19108 return c2;
19109}
19110
19111#define WARN_SPACE_CHAR(c, prefix) \
19112 rb_warn1("invalid character syntax; use "prefix"\\%c", WARN_I(c))
19113
19114static int
19115tokadd_codepoint(struct parser_params *p, rb_encoding **encp,
19116 int regexp_literal, const char *begin)
19117{
19118 const int wide = !begin;
19119 size_t numlen;
19120 int codepoint = (int)ruby_scan_hex(p->lex.pcur, wide ? p->lex.pend - p->lex.pcur : 4, &numlen);
19121
19122 p->lex.pcur += numlen;
19123 if (p->lex.strterm == NULL ||
19124 strterm_is_heredoc(p->lex.strterm) ||
19125 (p->lex.strterm->u.literal.func != str_regexp)) {
19126 if (!begin) begin = p->lex.pcur;
19127 if (wide ? (numlen == 0 || numlen > 6) : (numlen < 4)) {
19128 flush_string_content(p, rb_utf8_encoding(), p->lex.pcur - begin);
19129 yyerror0("invalid Unicode escape");
19130 dispatch_scan_event(p, tSTRING_CONTENT);
19131 return wide && numlen > 0;
19132 }
19133 if (codepoint > 0x10ffff) {
19134 flush_string_content(p, rb_utf8_encoding(), p->lex.pcur - begin);
19135 yyerror0("invalid Unicode codepoint (too large)");
19136 dispatch_scan_event(p, tSTRING_CONTENT);
19137 return wide;
19138 }
19139 if ((codepoint & 0xfffff800) == 0xd800) {
19140 flush_string_content(p, rb_utf8_encoding(), p->lex.pcur - begin);
19141 yyerror0("invalid Unicode codepoint");
19142 dispatch_scan_event(p, tSTRING_CONTENT);
19143 return wide;
19144 }
19145 }
19146 if (regexp_literal) {
19147 tokcopy(p, (int)numlen);
19148 }
19149 else if (codepoint >= 0x80) {
19150 rb_encoding *utf8 = rb_utf8_encoding();
19151 if (*encp && utf8 != *encp) {
19152 YYLTYPE loc = RUBY_INIT_YYLLOC();
19153 compile_error(p, "UTF-8 mixed within %s source", rb_enc_name(*encp));
19154 parser_show_error_line(p, &loc);
19155 return wide;
19156 }
19157 *encp = utf8;
19158 tokaddmbc(p, codepoint, *encp);
19159 }
19160 else {
19161 tokadd(p, codepoint);
19162 }
19163 return TRUE;
19164}
19165
19166static int tokadd_mbchar(struct parser_params *p, int c);
19167
19168static int
19169tokskip_mbchar(struct parser_params *p)
19170{
19171 int len = parser_precise_mbclen(p, p->lex.pcur-1);
19172 if (len > 0) {
19173 p->lex.pcur += len - 1;
19174 }
19175 return len;
19176}
19177
19178/* return value is for ?\u3042 */
19179static void
19180tokadd_utf8(struct parser_params *p, rb_encoding **encp,
19181 int term, int symbol_literal, int regexp_literal)
19182{
19183 /*
19184 * If `term` is not -1, then we allow multiple codepoints in \u{}
19185 * upto `term` byte, otherwise we're parsing a character literal.
19186 * And then add the codepoints to the current token.
19187 */
19188 static const char multiple_codepoints[] = "Multiple codepoints at single character literal";
19189
19190 const int open_brace = '{', close_brace = '}';
19191
19192 if (regexp_literal) { tokadd(p, '\\'); tokadd(p, 'u'); }
19193
19194 if (peek(p, open_brace)) { /* handle \u{...} form */
19195 if (regexp_literal && p->lex.strterm->u.literal.func == str_regexp) {
19196 /*
19197 * Skip parsing validation code and copy bytes as-is until term or
19198 * closing brace, in order to correctly handle extended regexps where
19199 * invalid unicode escapes are allowed in comments. The regexp parser
19200 * does its own validation and will catch any issues.
19201 */
19202 tokadd(p, open_brace);
19203 while (!lex_eol_ptr_p(p, ++p->lex.pcur)) {
19204 int c = peekc(p);
19205 if (c == close_brace) {
19206 tokadd(p, c);
19207 ++p->lex.pcur;
19208 break;
19209 }
19210 else if (c == term) {
19211 break;
19212 }
19213 if (c == '\\' && !lex_eol_n_p(p, 1)) {
19214 tokadd(p, c);
19215 c = *++p->lex.pcur;
19216 }
19217 tokadd_mbchar(p, c);
19218 }
19219 }
19220 else {
19221 const char *second = NULL;
19222 int c, last = nextc(p);
19223 if (lex_eol_p(p)) goto unterminated;
19224 while (ISSPACE(c = peekc(p)) && !lex_eol_ptr_p(p, ++p->lex.pcur));
19225 while (c != close_brace) {
19226 if (c == term) goto unterminated;
19227 if (second == multiple_codepoints)
19228 second = p->lex.pcur;
19229 if (regexp_literal) tokadd(p, last);
19230 if (!tokadd_codepoint(p, encp, regexp_literal, NULL)) {
19231 break;
19232 }
19233 while (ISSPACE(c = peekc(p))) {
19234 if (lex_eol_ptr_p(p, ++p->lex.pcur)) goto unterminated;
19235 last = c;
19236 }
19237 if (term == -1 && !second)
19238 second = multiple_codepoints;
19239 }
19240
19241 if (c != close_brace) {
19242 unterminated:
19243 flush_string_content(p, rb_utf8_encoding(), 0);
19244 yyerror0("unterminated Unicode escape");
19245 dispatch_scan_event(p, tSTRING_CONTENT);
19246 return;
19247 }
19248 if (second && second != multiple_codepoints) {
19249 const char *pcur = p->lex.pcur;
19250 p->lex.pcur = second;
19251 dispatch_scan_event(p, tSTRING_CONTENT);
19252 token_flush(p);
19253 p->lex.pcur = pcur;
19254 yyerror0(multiple_codepoints);
19255 token_flush(p);
19256 }
19257
19258 if (regexp_literal) tokadd(p, close_brace);
19259 nextc(p);
19260 }
19261 }
19262 else { /* handle \uxxxx form */
19263 if (!tokadd_codepoint(p, encp, regexp_literal, p->lex.pcur - rb_strlen_lit("\\u"))) {
19264 token_flush(p);
19265 return;
19266 }
19267 }
19268}
19269
19270#define ESCAPE_CONTROL 1
19271#define ESCAPE_META 2
19272
19273static int
19274read_escape(struct parser_params *p, int flags, const char *begin)
19275{
19276 int c;
19277 size_t numlen;
19278
19279 switch (c = nextc(p)) {
19280 case '\\': /* Backslash */
19281 return c;
19282
19283 case 'n': /* newline */
19284 return '\n';
19285
19286 case 't': /* horizontal tab */
19287 return '\t';
19288
19289 case 'r': /* carriage-return */
19290 return '\r';
19291
19292 case 'f': /* form-feed */
19293 return '\f';
19294
19295 case 'v': /* vertical tab */
19296 return '\13';
19297
19298 case 'a': /* alarm(bell) */
19299 return '\007';
19300
19301 case 'e': /* escape */
19302 return 033;
19303
19304 case '0': case '1': case '2': case '3': /* octal constant */
19305 case '4': case '5': case '6': case '7':
19306 pushback(p, c);
19307 c = (int)ruby_scan_oct(p->lex.pcur, 3, &numlen);
19308 p->lex.pcur += numlen;
19309 return c;
19310
19311 case 'x': /* hex constant */
19312 c = tok_hex(p, &numlen);
19313 if (numlen == 0) return 0;
19314 return c;
19315
19316 case 'b': /* backspace */
19317 return '\010';
19318
19319 case 's': /* space */
19320 return ' ';
19321
19322 case 'M':
19323 if (flags & ESCAPE_META) goto eof;
19324 if ((c = nextc(p)) != '-') {
19325 goto eof;
19326 }
19327 if ((c = nextc(p)) == '\\') {
19328 switch (peekc(p)) {
19329 case 'u': case 'U':
19330 nextc(p);
19331 goto eof;
19332 }
19333 return read_escape(p, flags|ESCAPE_META, begin) | 0x80;
19334 }
19335 else if (c == -1) goto eof;
19336 else if (!ISASCII(c)) {
19337 tokskip_mbchar(p);
19338 goto eof;
19339 }
19340 else {
19341 int c2 = escaped_control_code(c);
19342 if (c2) {
19343 if (ISCNTRL(c) || !(flags & ESCAPE_CONTROL)) {
19344 WARN_SPACE_CHAR(c2, "\\M-");
19345 }
19346 else {
19347 WARN_SPACE_CHAR(c2, "\\C-\\M-");
19348 }
19349 }
19350 else if (ISCNTRL(c)) goto eof;
19351 return ((c & 0xff) | 0x80);
19352 }
19353
19354 case 'C':
19355 if ((c = nextc(p)) != '-') {
19356 goto eof;
19357 }
19358 case 'c':
19359 if (flags & ESCAPE_CONTROL) goto eof;
19360 if ((c = nextc(p))== '\\') {
19361 switch (peekc(p)) {
19362 case 'u': case 'U':
19363 nextc(p);
19364 goto eof;
19365 }
19366 c = read_escape(p, flags|ESCAPE_CONTROL, begin);
19367 }
19368 else if (c == '?')
19369 return 0177;
19370 else if (c == -1) goto eof;
19371 else if (!ISASCII(c)) {
19372 tokskip_mbchar(p);
19373 goto eof;
19374 }
19375 else {
19376 int c2 = escaped_control_code(c);
19377 if (c2) {
19378 if (ISCNTRL(c)) {
19379 if (flags & ESCAPE_META) {
19380 WARN_SPACE_CHAR(c2, "\\M-");
19381 }
19382 else {
19383 WARN_SPACE_CHAR(c2, "");
19384 }
19385 }
19386 else {
19387 if (flags & ESCAPE_META) {
19388 WARN_SPACE_CHAR(c2, "\\M-\\C-");
19389 }
19390 else {
19391 WARN_SPACE_CHAR(c2, "\\C-");
19392 }
19393 }
19394 }
19395 else if (ISCNTRL(c)) goto eof;
19396 }
19397 return c & 0x9f;
19398
19399 eof:
19400 case -1:
19401 flush_string_content(p, p->enc, p->lex.pcur - begin);
19402 yyerror0("Invalid escape character syntax");
19403 dispatch_scan_event(p, tSTRING_CONTENT);
19404 return '\0';
19405
19406 default:
19407 if (!ISASCII(c)) {
19408 tokskip_mbchar(p);
19409 goto eof;
19410 }
19411 return c;
19412 }
19413}
19414
19415static void
19416tokaddmbc(struct parser_params *p, int c, rb_encoding *enc)
19417{
19418 int len = rb_enc_codelen(c, enc);
19419 rb_enc_mbcput(c, tokspace(p, len), enc);
19420}
19421
19422static int
19423tokadd_escape(struct parser_params *p)
19424{
19425 int c;
19426 size_t numlen;
19427 const char *begin = p->lex.pcur;
19428
19429 switch (c = nextc(p)) {
19430 case '\n':
19431 return 0; /* just ignore */
19432
19433 case '0': case '1': case '2': case '3': /* octal constant */
19434 case '4': case '5': case '6': case '7':
19435 {
19436 ruby_scan_oct(--p->lex.pcur, 3, &numlen);
19437 if (numlen == 0) goto eof;
19438 p->lex.pcur += numlen;
19439 tokcopy(p, (int)numlen + 1);
19440 }
19441 return 0;
19442
19443 case 'x': /* hex constant */
19444 {
19445 tok_hex(p, &numlen);
19446 if (numlen == 0) return -1;
19447 tokcopy(p, (int)numlen + 2);
19448 }
19449 return 0;
19450
19451 eof:
19452 case -1:
19453 flush_string_content(p, p->enc, p->lex.pcur - begin);
19454 yyerror0("Invalid escape character syntax");
19455 token_flush(p);
19456 return -1;
19457
19458 default:
19459 tokadd(p, '\\');
19460 tokadd(p, c);
19461 }
19462 return 0;
19463}
19464
19465static int
19466char_to_option(int c)
19467{
19468 int val;
19469
19470 switch (c) {
19471 case 'i':
19472 val = RE_ONIG_OPTION_IGNORECASE;
19473 break;
19474 case 'x':
19475 val = RE_ONIG_OPTION_EXTEND;
19476 break;
19477 case 'm':
19478 val = RE_ONIG_OPTION_MULTILINE;
19479 break;
19480 default:
19481 val = 0;
19482 break;
19483 }
19484 return val;
19485}
19486
19487#define ARG_ENCODING_FIXED 16
19488#define ARG_ENCODING_NONE 32
19489#define ENC_ASCII8BIT 1
19490#define ENC_EUC_JP 2
19491#define ENC_Windows_31J 3
19492#define ENC_UTF8 4
19493
19494static int
19495char_to_option_kcode(int c, int *option, int *kcode)
19496{
19497 *option = 0;
19498
19499 switch (c) {
19500 case 'n':
19501 *kcode = ENC_ASCII8BIT;
19502 return (*option = ARG_ENCODING_NONE);
19503 case 'e':
19504 *kcode = ENC_EUC_JP;
19505 break;
19506 case 's':
19507 *kcode = ENC_Windows_31J;
19508 break;
19509 case 'u':
19510 *kcode = ENC_UTF8;
19511 break;
19512 default:
19513 *kcode = -1;
19514 return (*option = char_to_option(c));
19515 }
19516 *option = ARG_ENCODING_FIXED;
19517 return 1;
19518}
19519
19520static int
19521regx_options(struct parser_params *p)
19522{
19523 int kcode = 0;
19524 int kopt = 0;
19525 int options = 0;
19526 int c, opt, kc;
19527
19528 newtok(p);
19529 while (c = nextc(p), ISALPHA(c)) {
19530 if (c == 'o') {
19531 options |= RE_OPTION_ONCE;
19532 }
19533 else if (char_to_option_kcode(c, &opt, &kc)) {
19534 if (kc >= 0) {
19535 if (kc != ENC_ASCII8BIT) kcode = c;
19536 kopt = opt;
19537 }
19538 else {
19539 options |= opt;
19540 }
19541 }
19542 else {
19543 tokadd(p, c);
19544 }
19545 }
19546 options |= kopt;
19547 pushback(p, c);
19548 if (toklen(p)) {
19549 YYLTYPE loc = RUBY_INIT_YYLLOC();
19550 tokfix(p);
19551 compile_error(p, "unknown regexp option%s - %*s",
19552 toklen(p) > 1 ? "s" : "", toklen(p), tok(p));
19553 parser_show_error_line(p, &loc);
19554 }
19555 return options | RE_OPTION_ENCODING(kcode);
19556}
19557
19558static int
19559tokadd_mbchar(struct parser_params *p, int c)
19560{
19561 int len = parser_precise_mbclen(p, p->lex.pcur-1);
19562 if (len < 0) return -1;
19563 tokadd(p, c);
19564 p->lex.pcur += --len;
19565 if (len > 0) tokcopy(p, len);
19566 return c;
19567}
19568
19569static inline int
19570simple_re_meta(int c)
19571{
19572 switch (c) {
19573 case '$': case '*': case '+': case '.':
19574 case '?': case '^': case '|':
19575 case ')': case ']': case '}': case '>':
19576 return TRUE;
19577 default:
19578 return FALSE;
19579 }
19580}
19581
19582static int
19583parser_update_heredoc_indent(struct parser_params *p, int c)
19584{
19585 if (p->heredoc_line_indent == -1) {
19586 if (c == '\n') p->heredoc_line_indent = 0;
19587 }
19588 else {
19589 if (c == ' ') {
19590 p->heredoc_line_indent++;
19591 return TRUE;
19592 }
19593 else if (c == '\t') {
19594 int w = (p->heredoc_line_indent / TAB_WIDTH) + 1;
19595 p->heredoc_line_indent = w * TAB_WIDTH;
19596 return TRUE;
19597 }
19598 else if (c != '\n') {
19599 if (p->heredoc_indent > p->heredoc_line_indent) {
19600 p->heredoc_indent = p->heredoc_line_indent;
19601 }
19602 p->heredoc_line_indent = -1;
19603 }
19604 else {
19605 /* Whitespace only line has no indentation */
19606 p->heredoc_line_indent = 0;
19607 }
19608 }
19609 return FALSE;
19610}
19611
19612static void
19613parser_mixed_error(struct parser_params *p, rb_encoding *enc1, rb_encoding *enc2)
19614{
19615 YYLTYPE loc = RUBY_INIT_YYLLOC();
19616 const char *n1 = rb_enc_name(enc1), *n2 = rb_enc_name(enc2);
19617 compile_error(p, "%s mixed within %s source", n1, n2);
19618 parser_show_error_line(p, &loc);
19619}
19620
19621static void
19622parser_mixed_escape(struct parser_params *p, const char *beg, rb_encoding *enc1, rb_encoding *enc2)
19623{
19624 const char *pos = p->lex.pcur;
19625 p->lex.pcur = beg;
19626 parser_mixed_error(p, enc1, enc2);
19627 p->lex.pcur = pos;
19628}
19629
19630static inline char
19631nibble_char_upper(unsigned int c)
19632{
19633 c &= 0xf;
19634 return c + (c < 10 ? '0' : 'A' - 10);
19635}
19636
19637static int
19638tokadd_string(struct parser_params *p,
19639 int func, int term, int paren, long *nest,
19640 rb_encoding **encp, rb_encoding **enc)
19641{
19642 int c;
19643 bool erred = false;
19644#ifdef RIPPER
19645 const int heredoc_end = (p->heredoc_end ? p->heredoc_end + 1 : 0);
19646 int top_of_line = FALSE;
19647#endif
19648
19649#define mixed_error(enc1, enc2) \
19650 (void)(erred || (parser_mixed_error(p, enc1, enc2), erred = true))
19651#define mixed_escape(beg, enc1, enc2) \
19652 (void)(erred || (parser_mixed_escape(p, beg, enc1, enc2), erred = true))
19653
19654 while ((c = nextc(p)) != -1) {
19655 if (p->heredoc_indent > 0) {
19656 parser_update_heredoc_indent(p, c);
19657 }
19658#ifdef RIPPER
19659 if (top_of_line && heredoc_end == p->ruby_sourceline) {
19660 pushback(p, c);
19661 break;
19662 }
19663#endif
19664
19665 if (paren && c == paren) {
19666 ++*nest;
19667 }
19668 else if (c == term) {
19669 if (!nest || !*nest) {
19670 pushback(p, c);
19671 break;
19672 }
19673 --*nest;
19674 }
19675 else if ((func & STR_FUNC_EXPAND) && c == '#' && !lex_eol_p(p)) {
19676 unsigned char c2 = *p->lex.pcur;
19677 if (c2 == '$' || c2 == '@' || c2 == '{') {
19678 pushback(p, c);
19679 break;
19680 }
19681 }
19682 else if (c == '\\') {
19683 c = nextc(p);
19684 switch (c) {
19685 case '\n':
19686 if (func & STR_FUNC_QWORDS) break;
19687 if (func & STR_FUNC_EXPAND) {
19688 if (!(func & STR_FUNC_INDENT) || (p->heredoc_indent < 0))
19689 continue;
19690 if (c == term) {
19691 c = '\\';
19692 goto terminate;
19693 }
19694 }
19695 tokadd(p, '\\');
19696 break;
19697
19698 case '\\':
19699 if (func & STR_FUNC_ESCAPE) tokadd(p, c);
19700 break;
19701
19702 case 'u':
19703 if ((func & STR_FUNC_EXPAND) == 0) {
19704 tokadd(p, '\\');
19705 break;
19706 }
19707 tokadd_utf8(p, enc, term,
19708 func & STR_FUNC_SYMBOL,
19709 func & STR_FUNC_REGEXP);
19710 continue;
19711
19712 default:
19713 if (c == -1) return -1;
19714 if (!ISASCII(c)) {
19715 if ((func & STR_FUNC_EXPAND) == 0) tokadd(p, '\\');
19716 goto non_ascii;
19717 }
19718 if (func & STR_FUNC_REGEXP) {
19719 switch (c) {
19720 case 'c':
19721 case 'C':
19722 case 'M': {
19723 pushback(p, c);
19724 c = read_escape(p, 0, p->lex.pcur - 1);
19725
19726 char *t = tokspace(p, rb_strlen_lit("\\x00"));
19727 *t++ = '\\';
19728 *t++ = 'x';
19729 *t++ = nibble_char_upper(c >> 4);
19730 *t++ = nibble_char_upper(c);
19731 continue;
19732 }
19733 }
19734
19735 if (c == term && !simple_re_meta(c)) {
19736 tokadd(p, c);
19737 continue;
19738 }
19739 pushback(p, c);
19740 if ((c = tokadd_escape(p)) < 0)
19741 return -1;
19742 if (*enc && *enc != *encp) {
19743 mixed_escape(p->lex.ptok+2, *enc, *encp);
19744 }
19745 continue;
19746 }
19747 else if (func & STR_FUNC_EXPAND) {
19748 pushback(p, c);
19749 if (func & STR_FUNC_ESCAPE) tokadd(p, '\\');
19750 c = read_escape(p, 0, p->lex.pcur - 1);
19751 }
19752 else if ((func & STR_FUNC_QWORDS) && ISSPACE(c)) {
19753 /* ignore backslashed spaces in %w */
19754 }
19755 else if (c != term && !(paren && c == paren)) {
19756 tokadd(p, '\\');
19757 pushback(p, c);
19758 continue;
19759 }
19760 }
19761 }
19762 else if (!parser_isascii(p)) {
19763 non_ascii:
19764 if (!*enc) {
19765 *enc = *encp;
19766 }
19767 else if (*enc != *encp) {
19768 mixed_error(*enc, *encp);
19769 continue;
19770 }
19771 if (tokadd_mbchar(p, c) == -1) return -1;
19772 continue;
19773 }
19774 else if ((func & STR_FUNC_QWORDS) && ISSPACE(c)) {
19775 pushback(p, c);
19776 break;
19777 }
19778 if (c & 0x80) {
19779 if (!*enc) {
19780 *enc = *encp;
19781 }
19782 else if (*enc != *encp) {
19783 mixed_error(*enc, *encp);
19784 continue;
19785 }
19786 }
19787 tokadd(p, c);
19788#ifdef RIPPER
19789 top_of_line = (c == '\n');
19790#endif
19791 }
19792 terminate:
19793 if (*enc) *encp = *enc;
19794 return c;
19795}
19796
19797#define NEW_STRTERM(func, term, paren) new_strterm(p, func, term, paren)
19798
19799static void
19800flush_string_content(struct parser_params *p, rb_encoding *enc, size_t back)
19801{
19802 p->lex.pcur -= back;
19803 if (has_delayed_token(p)) {
19804 ptrdiff_t len = p->lex.pcur - p->lex.ptok;
19805 if (len > 0) {
19806 rb_parser_enc_str_buf_cat(p, p->delayed.token, p->lex.ptok, len, enc);
19807 p->delayed.end_line = p->ruby_sourceline;
19808 p->delayed.end_col = rb_long2int(p->lex.pcur - p->lex.pbeg);
19809 }
19810 dispatch_delayed_token(p, tSTRING_CONTENT);
19811 p->lex.ptok = p->lex.pcur;
19812 }
19813 dispatch_scan_event(p, tSTRING_CONTENT);
19814 p->lex.pcur += back;
19815}
19816
19817/* this can be shared with ripper, since it's independent from struct
19818 * parser_params. */
19819#ifndef RIPPER
19820#define BIT(c, idx) (((c) / 32 - 1 == idx) ? (1U << ((c) % 32)) : 0)
19821#define SPECIAL_PUNCT(idx) ( \
19822 BIT('~', idx) | BIT('*', idx) | BIT('$', idx) | BIT('?', idx) | \
19823 BIT('!', idx) | BIT('@', idx) | BIT('/', idx) | BIT('\\', idx) | \
19824 BIT(';', idx) | BIT(',', idx) | BIT('.', idx) | BIT('=', idx) | \
19825 BIT(':', idx) | BIT('<', idx) | BIT('>', idx) | BIT('\"', idx) | \
19826 BIT('&', idx) | BIT('`', idx) | BIT('\'', idx) | BIT('+', idx) | \
19827 BIT('0', idx))
19828const uint_least32_t ruby_global_name_punct_bits[] = {
19829 SPECIAL_PUNCT(0),
19830 SPECIAL_PUNCT(1),
19831 SPECIAL_PUNCT(2),
19832};
19833#undef BIT
19834#undef SPECIAL_PUNCT
19835#endif
19836
19837static enum yytokentype
19838parser_peek_variable_name(struct parser_params *p)
19839{
19840 int c;
19841 const char *ptr = p->lex.pcur;
19842
19843 if (lex_eol_ptr_n_p(p, ptr, 1)) return 0;
19844 c = *ptr++;
19845 switch (c) {
19846 case '$':
19847 if ((c = *ptr) == '-') {
19848 if (lex_eol_ptr_p(p, ++ptr)) return 0;
19849 c = *ptr;
19850 }
19851 else if (is_global_name_punct(c) || ISDIGIT(c)) {
19852 return tSTRING_DVAR;
19853 }
19854 break;
19855 case '@':
19856 if ((c = *ptr) == '@') {
19857 if (lex_eol_ptr_p(p, ++ptr)) return 0;
19858 c = *ptr;
19859 }
19860 break;
19861 case '{':
19862 p->lex.pcur = ptr;
19863 p->command_start = TRUE;
19864 yylval.state = p->lex.state;
19865 return tSTRING_DBEG;
19866 default:
19867 return 0;
19868 }
19869 if (!ISASCII(c) || c == '_' || ISALPHA(c))
19870 return tSTRING_DVAR;
19871 return 0;
19872}
19873
19874#define IS_ARG() IS_lex_state(EXPR_ARG_ANY)
19875#define IS_END() IS_lex_state(EXPR_END_ANY)
19876#define IS_BEG() (IS_lex_state(EXPR_BEG_ANY) || IS_lex_state_all(EXPR_ARG|EXPR_LABELED))
19877#define IS_SPCARG(c) (IS_ARG() && space_seen && !ISSPACE(c))
19878#define IS_LABEL_POSSIBLE() (\
19879 (IS_lex_state(EXPR_LABEL|EXPR_ENDFN) && !cmd_state) || \
19880 IS_ARG())
19881#define IS_LABEL_SUFFIX(n) (peek_n(p, ':',(n)) && !peek_n(p, ':', (n)+1))
19882#define IS_AFTER_OPERATOR() IS_lex_state(EXPR_FNAME | EXPR_DOT)
19883
19884static inline enum yytokentype
19885parser_string_term(struct parser_params *p, int func)
19886{
19887 xfree(p->lex.strterm);
19888 p->lex.strterm = 0;
19889 if (func & STR_FUNC_REGEXP) {
19890 set_yylval_num(regx_options(p));
19891 dispatch_scan_event(p, tREGEXP_END);
19892 SET_LEX_STATE(EXPR_END);
19893 return tREGEXP_END;
19894 }
19895 if ((func & STR_FUNC_LABEL) && IS_LABEL_SUFFIX(0)) {
19896 nextc(p);
19897 SET_LEX_STATE(EXPR_ARG|EXPR_LABELED);
19898 return tLABEL_END;
19899 }
19900 SET_LEX_STATE(EXPR_END);
19901 return tSTRING_END;
19902}
19903
19904static enum yytokentype
19905parse_string(struct parser_params *p, rb_strterm_literal_t *quote)
19906{
19907 int func = quote->func;
19908 int term = quote->term;
19909 int paren = quote->paren;
19910 int c, space = 0;
19911 rb_encoding *enc = p->enc;
19912 rb_encoding *base_enc = 0;
19913 rb_parser_string_t *lit;
19914
19915 if (func & STR_FUNC_TERM) {
19916 if (func & STR_FUNC_QWORDS) nextc(p); /* delayed term */
19917 SET_LEX_STATE(EXPR_END);
19918 xfree(p->lex.strterm);
19919 p->lex.strterm = 0;
19920 return func & STR_FUNC_REGEXP ? tREGEXP_END : tSTRING_END;
19921 }
19922 c = nextc(p);
19923 if ((func & STR_FUNC_QWORDS) && ISSPACE(c)) {
19924 while (c != '\n' && ISSPACE(c = nextc(p)));
19925 space = 1;
19926 }
19927 if (func & STR_FUNC_LIST) {
19928 quote->func &= ~STR_FUNC_LIST;
19929 space = 1;
19930 }
19931 if (c == term && !quote->nest) {
19932 if (func & STR_FUNC_QWORDS) {
19933 quote->func |= STR_FUNC_TERM;
19934 pushback(p, c); /* dispatch the term at tSTRING_END */
19935 add_delayed_token(p, p->lex.ptok, p->lex.pcur);
19936 return ' ';
19937 }
19938 return parser_string_term(p, func);
19939 }
19940 if (space) {
19941 if (!ISSPACE(c)) pushback(p, c);
19942 add_delayed_token(p, p->lex.ptok, p->lex.pcur);
19943 return ' ';
19944 }
19945 newtok(p);
19946 if ((func & STR_FUNC_EXPAND) && c == '#') {
19947 enum yytokentype t = parser_peek_variable_name(p);
19948 if (t) return t;
19949 tokadd(p, '#');
19950 c = nextc(p);
19951 }
19952 pushback(p, c);
19953 if (tokadd_string(p, func, term, paren, &quote->nest,
19954 &enc, &base_enc) == -1) {
19955 if (p->eofp) {
19956#ifndef RIPPER
19957# define unterminated_literal(mesg) yyerror0(mesg)
19958#else
19959# define unterminated_literal(mesg) compile_error(p, mesg)
19960#endif
19961 literal_flush(p, p->lex.pcur);
19962 if (func & STR_FUNC_QWORDS) {
19963 /* no content to add, bailing out here */
19964 unterminated_literal("unterminated list meets end of file");
19965 xfree(p->lex.strterm);
19966 p->lex.strterm = 0;
19967 return tSTRING_END;
19968 }
19969 if (func & STR_FUNC_REGEXP) {
19970 unterminated_literal("unterminated regexp meets end of file");
19971 }
19972 else {
19973 unterminated_literal("unterminated string meets end of file");
19974 }
19975 quote->func |= STR_FUNC_TERM;
19976 }
19977 }
19978
19979 tokfix(p);
19980 lit = STR_NEW3(tok(p), toklen(p), enc, func);
19981 set_yylval_str(lit);
19982 flush_string_content(p, enc, 0);
19983
19984 return tSTRING_CONTENT;
19985}
19986
19987static enum yytokentype
19988heredoc_identifier(struct parser_params *p)
19989{
19990 /*
19991 * term_len is length of `<<"END"` except `END`,
19992 * in this case term_len is 4 (<, <, " and ").
19993 */
19994 long len, offset = p->lex.pcur - p->lex.pbeg;
19995 int c = nextc(p), term, func = 0, quote = 0;
19996 enum yytokentype token = tSTRING_BEG;
19997 int indent = 0;
19998
19999 if (c == '-') {
20000 c = nextc(p);
20001 func = STR_FUNC_INDENT;
20002 offset++;
20003 }
20004 else if (c == '~') {
20005 c = nextc(p);
20006 func = STR_FUNC_INDENT;
20007 offset++;
20008 indent = INT_MAX;
20009 }
20010 switch (c) {
20011 case '\'':
20012 func |= str_squote; goto quoted;
20013 case '"':
20014 func |= str_dquote; goto quoted;
20015 case '`':
20016 token = tXSTRING_BEG;
20017 func |= str_xquote; goto quoted;
20018
20019 quoted:
20020 quote++;
20021 offset++;
20022 term = c;
20023 len = 0;
20024 while ((c = nextc(p)) != term) {
20025 if (c == -1 || c == '\r' || c == '\n') {
20026 yyerror0("unterminated here document identifier");
20027 return -1;
20028 }
20029 }
20030 break;
20031
20032 default:
20033 if (!parser_is_identchar(p)) {
20034 pushback(p, c);
20035 if (func & STR_FUNC_INDENT) {
20036 pushback(p, indent > 0 ? '~' : '-');
20037 }
20038 return 0;
20039 }
20040 func |= str_dquote;
20041 do {
20042 int n = parser_precise_mbclen(p, p->lex.pcur-1);
20043 if (n < 0) return 0;
20044 p->lex.pcur += --n;
20045 } while ((c = nextc(p)) != -1 && parser_is_identchar(p));
20046 pushback(p, c);
20047 break;
20048 }
20049
20050 len = p->lex.pcur - (p->lex.pbeg + offset) - quote;
20051 if ((unsigned long)len >= HERETERM_LENGTH_MAX)
20052 yyerror0("too long here document identifier");
20053 dispatch_scan_event(p, tHEREDOC_BEG);
20054 lex_goto_eol(p);
20055
20056 p->lex.strterm = new_heredoc(p);
20057 rb_strterm_heredoc_t *here = &p->lex.strterm->u.heredoc;
20058 here->offset = offset;
20059 here->sourceline = p->ruby_sourceline;
20060 here->length = (unsigned)len;
20061 here->quote = quote;
20062 here->func = func;
20063 here->lastline = p->lex.lastline;
20064
20065 token_flush(p);
20066 p->heredoc_indent = indent;
20067 p->heredoc_line_indent = 0;
20068 return token;
20069}
20070
20071static void
20072heredoc_restore(struct parser_params *p, rb_strterm_heredoc_t *here)
20073{
20074 rb_parser_string_t *line;
20075 rb_strterm_t *term = p->lex.strterm;
20076
20077 p->lex.strterm = 0;
20078 line = here->lastline;
20079 p->lex.lastline = line;
20080 p->lex.pbeg = PARSER_STRING_PTR(line);
20081 p->lex.pend = p->lex.pbeg + PARSER_STRING_LEN(line);
20082 p->lex.pcur = p->lex.pbeg + here->offset + here->length + here->quote;
20083 p->lex.ptok = p->lex.pbeg + here->offset - here->quote;
20084 p->heredoc_end = p->ruby_sourceline;
20085 p->ruby_sourceline = (int)here->sourceline;
20086 if (p->eofp) p->lex.nextline = AFTER_HEREDOC_WITHOUT_TERMINATOR;
20087 p->eofp = 0;
20088 xfree(term);
20089}
20090
20091static int
20092dedent_string_column(const char *str, long len, int width)
20093{
20094 int i, col = 0;
20095
20096 for (i = 0; i < len && col < width; i++) {
20097 if (str[i] == ' ') {
20098 col++;
20099 }
20100 else if (str[i] == '\t') {
20101 int n = TAB_WIDTH * (col / TAB_WIDTH + 1);
20102 if (n > width) break;
20103 col = n;
20104 }
20105 else {
20106 break;
20107 }
20108 }
20109
20110 return i;
20111}
20112
20113static int
20114dedent_string(struct parser_params *p, rb_parser_string_t *string, int width)
20115{
20116 char *str;
20117 long len;
20118 int i;
20119
20120 len = PARSER_STRING_LEN(string);
20121 str = PARSER_STRING_PTR(string);
20122
20123 i = dedent_string_column(str, len, width);
20124 if (!i) return 0;
20125
20126 rb_parser_str_modify(string);
20127 str = PARSER_STRING_PTR(string);
20128 if (PARSER_STRING_LEN(string) != len)
20129 rb_fatal("literal string changed: %s", PARSER_STRING_PTR(string));
20130 MEMMOVE(str, str + i, char, len - i);
20131 rb_parser_str_set_len(p, string, len - i);
20132 return i;
20133}
20134
20135static NODE *
20136heredoc_dedent(struct parser_params *p, NODE *root)
20137{
20138 NODE *node, *str_node, *prev_node;
20139 int indent = p->heredoc_indent;
20140 rb_parser_string_t *prev_lit = 0;
20141
20142 if (indent <= 0) return root;
20143 if (!root) return root;
20144
20145 prev_node = node = str_node = root;
20146 if (nd_type_p(root, NODE_LIST)) str_node = RNODE_LIST(root)->nd_head;
20147
20148 while (str_node) {
20149 rb_parser_string_t *lit = RNODE_STR(str_node)->string;
20150 if (nd_fl_newline(str_node)) {
20151 dedent_string(p, lit, indent);
20152 }
20153 if (!prev_lit) {
20154 prev_lit = lit;
20155 }
20156 else if (!literal_concat0(p, prev_lit, lit)) {
20157 return 0;
20158 }
20159 else {
20160 NODE *end = RNODE_LIST(node)->as.nd_end;
20161 node = RNODE_LIST(prev_node)->nd_next = RNODE_LIST(node)->nd_next;
20162 if (!node) {
20163 if (nd_type_p(prev_node, NODE_DSTR))
20164 nd_set_type(prev_node, NODE_STR);
20165 break;
20166 }
20167 RNODE_LIST(node)->as.nd_end = end;
20168 goto next_str;
20169 }
20170
20171 str_node = 0;
20172 while ((nd_type_p(node, NODE_LIST) || nd_type_p(node, NODE_DSTR)) && (node = RNODE_LIST(prev_node = node)->nd_next) != 0) {
20173 next_str:
20174 if (!nd_type_p(node, NODE_LIST)) break;
20175 if ((str_node = RNODE_LIST(node)->nd_head) != 0) {
20176 enum node_type type = nd_type(str_node);
20177 if (type == NODE_STR || type == NODE_DSTR) break;
20178 prev_lit = 0;
20179 str_node = 0;
20180 }
20181 }
20182 }
20183 return root;
20184}
20185
20186static int
20187whole_match_p(struct parser_params *p, const char *eos, long len, int indent)
20188{
20189 const char *beg = p->lex.pbeg;
20190 const char *ptr = p->lex.pend;
20191
20192 if (ptr - beg < len) return FALSE;
20193 if (ptr > beg && ptr[-1] == '\n') {
20194 if (--ptr > beg && ptr[-1] == '\r') --ptr;
20195 if (ptr - beg < len) return FALSE;
20196 }
20197 if (strncmp(eos, ptr -= len, len)) return FALSE;
20198 if (indent) {
20199 while (beg < ptr && ISSPACE(*beg)) beg++;
20200 }
20201 return beg == ptr;
20202}
20203
20204static int
20205word_match_p(struct parser_params *p, const char *word, long len)
20206{
20207 if (strncmp(p->lex.pcur, word, len)) return 0;
20208 if (lex_eol_n_p(p, len)) return 1;
20209 int c = (unsigned char)p->lex.pcur[len];
20210 if (ISSPACE(c)) return 1;
20211 switch (c) {
20212 case '\0': case '\004': case '\032': return 1;
20213 }
20214 return 0;
20215}
20216
20217#define NUM_SUFFIX_R (1<<0)
20218#define NUM_SUFFIX_I (1<<1)
20219#define NUM_SUFFIX_ALL 3
20220
20221static int
20222number_literal_suffix(struct parser_params *p, int mask)
20223{
20224 int c, result = 0;
20225 const char *lastp = p->lex.pcur;
20226
20227 while ((c = nextc(p)) != -1) {
20228 if ((mask & NUM_SUFFIX_I) && c == 'i') {
20229 result |= (mask & NUM_SUFFIX_I);
20230 mask &= ~NUM_SUFFIX_I;
20231 /* r after i, rational of complex is disallowed */
20232 mask &= ~NUM_SUFFIX_R;
20233 continue;
20234 }
20235 if ((mask & NUM_SUFFIX_R) && c == 'r') {
20236 result |= (mask & NUM_SUFFIX_R);
20237 mask &= ~NUM_SUFFIX_R;
20238 continue;
20239 }
20240 if (!ISASCII(c) || ISALPHA(c) || c == '_') {
20241 p->lex.pcur = lastp;
20242 literal_flush(p, p->lex.pcur);
20243 return 0;
20244 }
20245 pushback(p, c);
20246 break;
20247 }
20248 return result;
20249}
20250
20251static enum yytokentype
20252set_number_literal(struct parser_params *p, enum yytokentype type, int suffix, int base, int seen_point)
20253{
20254 enum rb_numeric_type numeric_type = integer_literal;
20255
20256 if (type == tFLOAT) {
20257 numeric_type = float_literal;
20258 }
20259
20260 if (suffix & NUM_SUFFIX_R) {
20261 type = tRATIONAL;
20262 numeric_type = rational_literal;
20263 }
20264 if (suffix & NUM_SUFFIX_I) {
20265 type = tIMAGINARY;
20266 }
20267
20268 switch (type) {
20269 case tINTEGER:
20270 set_yylval_node(NEW_INTEGER(strdup(tok(p)), base, &_cur_loc));
20271 break;
20272 case tFLOAT:
20273 set_yylval_node(NEW_FLOAT(strdup(tok(p)), &_cur_loc));
20274 break;
20275 case tRATIONAL:
20276 set_yylval_node(NEW_RATIONAL(strdup(tok(p)), base, seen_point, &_cur_loc));
20277 break;
20278 case tIMAGINARY:
20279 set_yylval_node(NEW_IMAGINARY(strdup(tok(p)), base, seen_point, numeric_type, &_cur_loc));
20280 (void)numeric_type; /* for ripper */
20281 break;
20282 default:
20283 rb_bug("unexpected token: %d", type);
20284 }
20285 SET_LEX_STATE(EXPR_END);
20286 return type;
20287}
20288
20289#define dispatch_heredoc_end(p) parser_dispatch_heredoc_end(p, __LINE__)
20290static void
20291parser_dispatch_heredoc_end(struct parser_params *p, int line)
20292{
20293 if (has_delayed_token(p))
20294 dispatch_delayed_token(p, tSTRING_CONTENT);
20295
20296#ifdef RIPPER
20297 VALUE str = STR_NEW(p->lex.ptok, p->lex.pend - p->lex.ptok);
20298 ripper_dispatch1(p, ripper_token2eventid(tHEREDOC_END), str);
20299#else
20300 if (p->keep_tokens) {
20301 rb_parser_string_t *str = rb_parser_encoding_string_new(p, p->lex.ptok, p->lex.pend - p->lex.ptok, p->enc);
20302 RUBY_SET_YYLLOC_OF_HEREDOC_END(*p->yylloc);
20303 parser_append_tokens(p, str, tHEREDOC_END, line);
20304 }
20305#endif
20306
20307 RUBY_SET_YYLLOC_FROM_STRTERM_HEREDOC(*p->yylloc);
20308 lex_goto_eol(p);
20309 token_flush(p);
20310}
20311
20312static enum yytokentype
20313here_document(struct parser_params *p, rb_strterm_heredoc_t *here)
20314{
20315 int c, func, indent = 0;
20316 const char *eos, *ptr, *ptr_end;
20317 long len;
20318 rb_parser_string_t *str = 0;
20319 rb_encoding *enc = p->enc;
20320 rb_encoding *base_enc = 0;
20321 int bol;
20322#ifdef RIPPER
20323 VALUE s_value;
20324#endif
20325
20326 eos = PARSER_STRING_PTR(here->lastline) + here->offset;
20327 len = here->length;
20328 indent = (func = here->func) & STR_FUNC_INDENT;
20329
20330 if ((c = nextc(p)) == -1) {
20331 error:
20332#ifdef RIPPER
20333 if (!has_delayed_token(p)) {
20334 dispatch_scan_event(p, tSTRING_CONTENT);
20335 }
20336 else if (p->delayed.end_line + 1 == p->ruby_sourceline) {
20337 if ((len = p->lex.pcur - p->lex.ptok) > 0) {
20338 if (!(func & STR_FUNC_REGEXP)) {
20339 int cr = ENC_CODERANGE_UNKNOWN;
20340 rb_str_coderange_scan_restartable(p->lex.ptok, p->lex.pcur, enc, &cr);
20341 if (cr != ENC_CODERANGE_7BIT &&
20342 rb_is_usascii_enc(p->enc) &&
20343 enc != rb_utf8_encoding()) {
20344 enc = rb_ascii8bit_encoding();
20345 }
20346 }
20347 rb_parser_enc_str_buf_cat(p, p->delayed.token, p->lex.ptok, len, enc);
20348 }
20349 dispatch_delayed_token(p, tSTRING_CONTENT);
20350 }
20351 else {
20352 dispatch_delayed_token(p, tSTRING_CONTENT);
20353 dispatch_scan_event(p, tSTRING_CONTENT);
20354 }
20355 lex_goto_eol(p);
20356#endif
20357 heredoc_restore(p, &p->lex.strterm->u.heredoc);
20358 compile_error(p, "can't find string \"%.*s\" anywhere before EOF",
20359 (int)len, eos);
20360 token_flush(p);
20361 SET_LEX_STATE(EXPR_END);
20362 return tSTRING_END;
20363 }
20364 bol = was_bol(p);
20365 if (!bol) {
20366 /* not beginning of line, cannot be the terminator */
20367 }
20368 else if (p->heredoc_line_indent == -1) {
20369 /* `heredoc_line_indent == -1` means
20370 * - "after an interpolation in the same line", or
20371 * - "in a continuing line"
20372 */
20373 p->heredoc_line_indent = 0;
20374 }
20375 else if (whole_match_p(p, eos, len, indent)) {
20376 dispatch_heredoc_end(p);
20377 restore:
20378 heredoc_restore(p, &p->lex.strterm->u.heredoc);
20379 token_flush(p);
20380 SET_LEX_STATE(EXPR_END);
20381 return tSTRING_END;
20382 }
20383
20384 if (!(func & STR_FUNC_EXPAND)) {
20385 do {
20386 ptr = PARSER_STRING_PTR(p->lex.lastline);
20387 ptr_end = p->lex.pend;
20388 if (ptr_end > ptr) {
20389 switch (ptr_end[-1]) {
20390 case '\n':
20391 if (--ptr_end == ptr || ptr_end[-1] != '\r') {
20392 ptr_end++;
20393 break;
20394 }
20395 case '\r':
20396 --ptr_end;
20397 }
20398 }
20399
20400 if (p->heredoc_indent > 0) {
20401 long i = 0;
20402 while (ptr + i < ptr_end && parser_update_heredoc_indent(p, ptr[i]))
20403 i++;
20404 p->heredoc_line_indent = 0;
20405 }
20406
20407 if (str)
20408 parser_str_cat(str, ptr, ptr_end - ptr);
20409 else
20410 str = rb_parser_encoding_string_new(p, ptr, ptr_end - ptr, enc);
20411 if (!lex_eol_ptr_p(p, ptr_end)) parser_str_cat_cstr(str, "\n");
20412 lex_goto_eol(p);
20413 if (p->heredoc_indent > 0) {
20414 goto flush_str;
20415 }
20416 if (nextc(p) == -1) {
20417 if (str) {
20418 rb_parser_string_free(p, str);
20419 str = 0;
20420 }
20421 goto error;
20422 }
20423 } while (!whole_match_p(p, eos, len, indent));
20424 }
20425 else {
20426 /* int mb = ENC_CODERANGE_7BIT, *mbp = &mb;*/
20427 newtok(p);
20428 if (c == '#') {
20429 enum yytokentype t = parser_peek_variable_name(p);
20430 if (p->heredoc_line_indent != -1) {
20431 if (p->heredoc_indent > p->heredoc_line_indent) {
20432 p->heredoc_indent = p->heredoc_line_indent;
20433 }
20434 p->heredoc_line_indent = -1;
20435 }
20436 if (t) return t;
20437 tokadd(p, '#');
20438 c = nextc(p);
20439 }
20440 do {
20441 pushback(p, c);
20442 enc = p->enc;
20443 if ((c = tokadd_string(p, func, '\n', 0, NULL, &enc, &base_enc)) == -1) {
20444 if (p->eofp) goto error;
20445 goto restore;
20446 }
20447 if (c != '\n') {
20448 if (c == '\\') p->heredoc_line_indent = -1;
20449 flush:
20450 str = STR_NEW3(tok(p), toklen(p), enc, func);
20451 flush_str:
20452 set_yylval_str(str);
20453#ifndef RIPPER
20454 if (bol) nd_set_fl_newline(yylval.node);
20455#endif
20456 flush_string_content(p, enc, 0);
20457 return tSTRING_CONTENT;
20458 }
20459 tokadd(p, nextc(p));
20460 if (p->heredoc_indent > 0) {
20461 lex_goto_eol(p);
20462 goto flush;
20463 }
20464 /* if (mbp && mb == ENC_CODERANGE_UNKNOWN) mbp = 0;*/
20465 if ((c = nextc(p)) == -1) goto error;
20466 } while (!whole_match_p(p, eos, len, indent));
20467 str = STR_NEW3(tok(p), toklen(p), enc, func);
20468 }
20469 dispatch_heredoc_end(p);
20470 heredoc_restore(p, &p->lex.strterm->u.heredoc);
20471 token_flush(p);
20472 p->lex.strterm = NEW_STRTERM(func | STR_FUNC_TERM, 0, 0);
20473#ifdef RIPPER
20474 /* Preserve s_value for set_yylval_str */
20475 s_value = p->s_value;
20476#endif
20477 set_yylval_str(str);
20478#ifdef RIPPER
20479 set_parser_s_value(s_value);
20480#endif
20481
20482#ifndef RIPPER
20483 if (bol) nd_set_fl_newline(yylval.node);
20484#endif
20485 return tSTRING_CONTENT;
20486}
20487
20488#include "lex.c"
20489
20490static int
20491arg_ambiguous(struct parser_params *p, char c)
20492{
20493#ifndef RIPPER
20494 if (c == '/') {
20495 rb_warning1("ambiguity between regexp and two divisions: wrap regexp in parentheses or add a space after '%c' operator", WARN_I(c));
20496 }
20497 else {
20498 rb_warning1("ambiguous first argument; put parentheses or a space even after '%c' operator", WARN_I(c));
20499 }
20500#else
20501 dispatch1(arg_ambiguous, rb_usascii_str_new(&c, 1));
20502#endif
20503 return TRUE;
20504}
20505
20506/* returns true value if formal argument error;
20507 * Qtrue, or error message if ripper */
20508static VALUE
20509formal_argument_error(struct parser_params *p, ID id)
20510{
20511 switch (id_type(id)) {
20512 case ID_LOCAL:
20513 break;
20514#ifndef RIPPER
20515# define ERR(mesg) (yyerror0(mesg), Qtrue)
20516#else
20517# define ERR(mesg) WARN_S(mesg)
20518#endif
20519 case ID_CONST:
20520 return ERR("formal argument cannot be a constant");
20521 case ID_INSTANCE:
20522 return ERR("formal argument cannot be an instance variable");
20523 case ID_GLOBAL:
20524 return ERR("formal argument cannot be a global variable");
20525 case ID_CLASS:
20526 return ERR("formal argument cannot be a class variable");
20527 default:
20528 return ERR("formal argument must be local variable");
20529#undef ERR
20530 }
20531 shadowing_lvar(p, id);
20532
20533 return Qfalse;
20534}
20535
20536static int
20537lvar_defined(struct parser_params *p, ID id)
20538{
20539 return (dyna_in_block(p) && dvar_defined(p, id)) || local_id(p, id);
20540}
20541
20542/* emacsen -*- hack */
20543static long
20544parser_encode_length(struct parser_params *p, const char *name, long len)
20545{
20546 long nlen;
20547
20548 if (len > 5 && name[nlen = len - 5] == '-') {
20549 if (rb_memcicmp(name + nlen + 1, "unix", 4) == 0)
20550 return nlen;
20551 }
20552 if (len > 4 && name[nlen = len - 4] == '-') {
20553 if (rb_memcicmp(name + nlen + 1, "dos", 3) == 0)
20554 return nlen;
20555 if (rb_memcicmp(name + nlen + 1, "mac", 3) == 0 &&
20556 !(len == 8 && rb_memcicmp(name, "utf8-mac", len) == 0))
20557 /* exclude UTF8-MAC because the encoding named "UTF8" doesn't exist in Ruby */
20558 return nlen;
20559 }
20560 return len;
20561}
20562
20563static void
20564parser_set_encode(struct parser_params *p, const char *name)
20565{
20566 rb_encoding *enc;
20567 VALUE excargs[3];
20568 int idx = 0;
20569
20570 const char *wrong = 0;
20571 switch (*name) {
20572 case 'e': case 'E': wrong = "external"; break;
20573 case 'i': case 'I': wrong = "internal"; break;
20574 case 'f': case 'F': wrong = "filesystem"; break;
20575 case 'l': case 'L': wrong = "locale"; break;
20576 }
20577 if (wrong && STRCASECMP(name, wrong) == 0) goto unknown;
20578 idx = rb_enc_find_index(name);
20579 if (idx < 0) {
20580 unknown:
20581 excargs[1] = rb_sprintf("unknown encoding name: %s", name);
20582 error:
20583 excargs[0] = rb_eArgError;
20584 excargs[2] = rb_make_backtrace();
20585 rb_ary_unshift(excargs[2], rb_sprintf("%"PRIsVALUE":%d", p->ruby_sourcefile_string, p->ruby_sourceline));
20586 VALUE exc = rb_make_exception(3, excargs);
20587 ruby_show_error_line(p, exc, &(YYLTYPE)RUBY_INIT_YYLLOC(), p->ruby_sourceline, p->lex.lastline);
20588
20589 rb_ast_free(p->ast);
20590 p->ast = NULL;
20591
20592 rb_exc_raise(exc);
20593 }
20594 enc = rb_enc_from_index(idx);
20595 if (!rb_enc_asciicompat(enc)) {
20596 excargs[1] = rb_sprintf("%s is not ASCII compatible", rb_enc_name(enc));
20597 goto error;
20598 }
20599 p->enc = enc;
20600#ifndef RIPPER
20601 if (p->debug_lines) {
20602 long i;
20603 for (i = 0; i < p->debug_lines->len; i++) {
20604 rb_parser_enc_associate(p, p->debug_lines->data[i], enc);
20605 }
20606 }
20607#endif
20608}
20609
20610static bool
20611comment_at_top(struct parser_params *p)
20612{
20613 if (p->token_seen) return false;
20614 return (p->line_count == (p->has_shebang ? 2 : 1));
20615}
20616
20617typedef long (*rb_magic_comment_length_t)(struct parser_params *p, const char *name, long len);
20618typedef void (*rb_magic_comment_setter_t)(struct parser_params *p, const char *name, const char *val);
20619
20620static int parser_invalid_pragma_value(struct parser_params *p, const char *name, const char *val);
20621
20622static void
20623magic_comment_encoding(struct parser_params *p, const char *name, const char *val)
20624{
20625 if (!comment_at_top(p)) {
20626 return;
20627 }
20628 parser_set_encode(p, val);
20629}
20630
20631static int
20632parser_get_bool(struct parser_params *p, const char *name, const char *val)
20633{
20634 switch (*val) {
20635 case 't': case 'T':
20636 if (STRCASECMP(val, "true") == 0) {
20637 return TRUE;
20638 }
20639 break;
20640 case 'f': case 'F':
20641 if (STRCASECMP(val, "false") == 0) {
20642 return FALSE;
20643 }
20644 break;
20645 }
20646 return parser_invalid_pragma_value(p, name, val);
20647}
20648
20649static int
20650parser_invalid_pragma_value(struct parser_params *p, const char *name, const char *val)
20651{
20652 rb_warning2("invalid value for %s: %s", WARN_S(name), WARN_S(val));
20653 return -1;
20654}
20655
20656static void
20657parser_set_token_info(struct parser_params *p, const char *name, const char *val)
20658{
20659 int b = parser_get_bool(p, name, val);
20660 if (b >= 0) p->token_info_enabled = b;
20661}
20662
20663static void
20664parser_set_frozen_string_literal(struct parser_params *p, const char *name, const char *val)
20665{
20666 int b;
20667
20668 if (p->token_seen) {
20669 rb_warning1("'%s' is ignored after any tokens", WARN_S(name));
20670 return;
20671 }
20672
20673 b = parser_get_bool(p, name, val);
20674 if (b < 0) return;
20675
20676 p->frozen_string_literal = b;
20677}
20678
20679static void
20680parser_set_shareable_constant_value(struct parser_params *p, const char *name, const char *val)
20681{
20682 for (const char *s = p->lex.pbeg, *e = p->lex.pcur; s < e; ++s) {
20683 if (*s == ' ' || *s == '\t') continue;
20684 if (*s == '#') break;
20685 rb_warning1("'%s' is ignored unless in comment-only line", WARN_S(name));
20686 return;
20687 }
20688
20689 switch (*val) {
20690 case 'n': case 'N':
20691 if (STRCASECMP(val, "none") == 0) {
20692 p->ctxt.shareable_constant_value = rb_parser_shareable_none;
20693 return;
20694 }
20695 break;
20696 case 'l': case 'L':
20697 if (STRCASECMP(val, "literal") == 0) {
20698 p->ctxt.shareable_constant_value = rb_parser_shareable_literal;
20699 return;
20700 }
20701 break;
20702 case 'e': case 'E':
20703 if (STRCASECMP(val, "experimental_copy") == 0) {
20704 p->ctxt.shareable_constant_value = rb_parser_shareable_copy;
20705 return;
20706 }
20707 if (STRCASECMP(val, "experimental_everything") == 0) {
20708 p->ctxt.shareable_constant_value = rb_parser_shareable_everything;
20709 return;
20710 }
20711 break;
20712 }
20713 parser_invalid_pragma_value(p, name, val);
20714}
20715
20716# if WARN_PAST_SCOPE
20717static void
20718parser_set_past_scope(struct parser_params *p, const char *name, const char *val)
20719{
20720 int b = parser_get_bool(p, name, val);
20721 if (b >= 0) p->past_scope_enabled = b;
20722}
20723# endif
20724
20726 const char *name;
20727 rb_magic_comment_setter_t func;
20728 rb_magic_comment_length_t length;
20729};
20730
20731static const struct magic_comment magic_comments[] = {
20732 {"coding", magic_comment_encoding, parser_encode_length},
20733 {"encoding", magic_comment_encoding, parser_encode_length},
20734 {"frozen_string_literal", parser_set_frozen_string_literal},
20735 {"shareable_constant_value", parser_set_shareable_constant_value},
20736 {"warn_indent", parser_set_token_info},
20737# if WARN_PAST_SCOPE
20738 {"warn_past_scope", parser_set_past_scope},
20739# endif
20740};
20741
20742static const char *
20743magic_comment_marker(const char *str, long len)
20744{
20745 long i = 2;
20746
20747 while (i < len) {
20748 switch (str[i]) {
20749 case '-':
20750 if (str[i-1] == '*' && str[i-2] == '-') {
20751 return str + i + 1;
20752 }
20753 i += 2;
20754 break;
20755 case '*':
20756 if (i + 1 >= len) return 0;
20757 if (str[i+1] != '-') {
20758 i += 4;
20759 }
20760 else if (str[i-1] != '-') {
20761 i += 2;
20762 }
20763 else {
20764 return str + i + 2;
20765 }
20766 break;
20767 default:
20768 i += 3;
20769 break;
20770 }
20771 }
20772 return 0;
20773}
20774
20775static int
20776parser_magic_comment(struct parser_params *p, const char *str, long len)
20777{
20778 int indicator = 0;
20779 VALUE name = 0, val = 0;
20780 const char *beg, *end, *vbeg, *vend;
20781#define str_copy(_s, _p, _n) ((_s) \
20782 ? (void)(rb_str_resize((_s), (_n)), \
20783 MEMCPY(RSTRING_PTR(_s), (_p), char, (_n)), (_s)) \
20784 : (void)((_s) = STR_NEW((_p), (_n))))
20785
20786 if (len <= 7) return FALSE;
20787 if (!!(beg = magic_comment_marker(str, len))) {
20788 if (!(end = magic_comment_marker(beg, str + len - beg)))
20789 return FALSE;
20790 indicator = TRUE;
20791 str = beg;
20792 len = end - beg - 3;
20793 }
20794
20795 /* %r"([^\\s\'\":;]+)\\s*:\\s*(\"(?:\\\\.|[^\"])*\"|[^\"\\s;]+)[\\s;]*" */
20796 while (len > 0) {
20797 const struct magic_comment *mc = magic_comments;
20798 char *s;
20799 int i;
20800 long n = 0;
20801
20802 for (; len > 0 && *str; str++, --len) {
20803 switch (*str) {
20804 case '\'': case '"': case ':': case ';':
20805 continue;
20806 }
20807 if (!ISSPACE(*str)) break;
20808 }
20809 for (beg = str; len > 0; str++, --len) {
20810 switch (*str) {
20811 case '\'': case '"': case ':': case ';':
20812 break;
20813 default:
20814 if (ISSPACE(*str)) break;
20815 continue;
20816 }
20817 break;
20818 }
20819 for (end = str; len > 0 && ISSPACE(*str); str++, --len);
20820 if (!len) break;
20821 if (*str != ':') {
20822 if (!indicator) return FALSE;
20823 continue;
20824 }
20825
20826 do str++; while (--len > 0 && ISSPACE(*str));
20827 if (!len) break;
20828 const char *tok_beg = str;
20829 if (*str == '"') {
20830 for (vbeg = ++str; --len > 0 && *str != '"'; str++) {
20831 if (*str == '\\') {
20832 --len;
20833 ++str;
20834 }
20835 }
20836 vend = str;
20837 if (len) {
20838 --len;
20839 ++str;
20840 }
20841 }
20842 else {
20843 for (vbeg = str; len > 0 && *str != '"' && *str != ';' && !ISSPACE(*str); --len, str++);
20844 vend = str;
20845 }
20846 const char *tok_end = str;
20847 if (indicator) {
20848 while (len > 0 && (*str == ';' || ISSPACE(*str))) --len, str++;
20849 }
20850 else {
20851 while (len > 0 && (ISSPACE(*str))) --len, str++;
20852 if (len) return FALSE;
20853 }
20854
20855 n = end - beg;
20856 str_copy(name, beg, n);
20857 s = RSTRING_PTR(name);
20858 for (i = 0; i < n; ++i) {
20859 if (s[i] == '-') s[i] = '_';
20860 }
20861 do {
20862 if (STRNCASECMP(mc->name, s, n) == 0 && !mc->name[n]) {
20863 n = vend - vbeg;
20864 if (mc->length) {
20865 n = (*mc->length)(p, vbeg, n);
20866 }
20867 str_copy(val, vbeg, n);
20868 p->lex.ptok = tok_beg;
20869 p->lex.pcur = tok_end;
20870 (*mc->func)(p, mc->name, RSTRING_PTR(val));
20871 break;
20872 }
20873 } while (++mc < magic_comments + numberof(magic_comments));
20874#ifdef RIPPER
20875 str_copy(val, vbeg, vend - vbeg);
20876 dispatch2(magic_comment, name, val);
20877#endif
20878 }
20879
20880 return TRUE;
20881}
20882
20883static void
20884set_file_encoding(struct parser_params *p, const char *str, const char *send)
20885{
20886 int sep = 0;
20887 const char *beg = str;
20888 VALUE s;
20889
20890 for (;;) {
20891 if (send - str <= 6) return;
20892 switch (str[6]) {
20893 case 'C': case 'c': str += 6; continue;
20894 case 'O': case 'o': str += 5; continue;
20895 case 'D': case 'd': str += 4; continue;
20896 case 'I': case 'i': str += 3; continue;
20897 case 'N': case 'n': str += 2; continue;
20898 case 'G': case 'g': str += 1; continue;
20899 case '=': case ':':
20900 sep = 1;
20901 str += 6;
20902 break;
20903 default:
20904 str += 6;
20905 if (ISSPACE(*str)) break;
20906 continue;
20907 }
20908 if (STRNCASECMP(str-6, "coding", 6) == 0) break;
20909 sep = 0;
20910 }
20911 for (;;) {
20912 do {
20913 if (++str >= send) return;
20914 } while (ISSPACE(*str));
20915 if (sep) break;
20916 if (*str != '=' && *str != ':') return;
20917 sep = 1;
20918 str++;
20919 }
20920 beg = str;
20921 while ((*str == '-' || *str == '_' || ISALNUM(*str)) && ++str < send);
20922 s = rb_str_new(beg, parser_encode_length(p, beg, str - beg));
20923 p->lex.ptok = beg;
20924 p->lex.pcur = str;
20925 parser_set_encode(p, RSTRING_PTR(s));
20926 rb_str_resize(s, 0);
20927}
20928
20929static void
20930parser_prepare(struct parser_params *p)
20931{
20932 int c = nextc0(p, FALSE);
20933 p->token_info_enabled = !compile_for_eval && RTEST(ruby_verbose);
20934 switch (c) {
20935 case '#':
20936 if (peek(p, '!')) p->has_shebang = 1;
20937 break;
20938 case 0xef: /* UTF-8 BOM marker */
20939 if (!lex_eol_n_p(p, 2) &&
20940 (unsigned char)p->lex.pcur[0] == 0xbb &&
20941 (unsigned char)p->lex.pcur[1] == 0xbf) {
20942 p->enc = rb_utf8_encoding();
20943 p->lex.pcur += 2;
20944#ifndef RIPPER
20945 if (p->debug_lines) {
20946 rb_parser_string_set_encoding(p->lex.lastline, p->enc);
20947 }
20948#endif
20949 p->lex.pbeg = p->lex.pcur;
20950 token_flush(p);
20951 return;
20952 }
20953 break;
20954 case -1: /* end of script. */
20955 return;
20956 }
20957 pushback(p, c);
20958 p->enc = rb_parser_str_get_encoding(p->lex.lastline);
20959}
20960
20961#ifndef RIPPER
20962#define ambiguous_operator(tok, op, syn) ( \
20963 rb_warning0("'"op"' after local variable or literal is interpreted as binary operator"), \
20964 rb_warning0("even though it seems like "syn""))
20965#else
20966#define ambiguous_operator(tok, op, syn) \
20967 dispatch2(operator_ambiguous, TOKEN2VAL(tok), rb_str_new_cstr(syn))
20968#endif
20969#define warn_balanced(tok, op, syn) ((void) \
20970 (!IS_lex_state_for(last_state, EXPR_CLASS|EXPR_DOT|EXPR_FNAME|EXPR_ENDFN) && \
20971 space_seen && !ISSPACE(c) && \
20972 (ambiguous_operator(tok, op, syn), 0)), \
20973 (enum yytokentype)(tok))
20974
20975static enum yytokentype
20976no_digits(struct parser_params *p)
20977{
20978 yyerror0("numeric literal without digits");
20979 if (peek(p, '_')) nextc(p);
20980 /* dummy 0, for tUMINUS_NUM at numeric */
20981 return set_number_literal(p, tINTEGER, 0, 10, 0);
20982}
20983
20984static enum yytokentype
20985parse_numeric(struct parser_params *p, int c)
20986{
20987 int is_float, seen_point, seen_e, nondigit;
20988 int suffix;
20989
20990 is_float = seen_point = seen_e = nondigit = 0;
20991 SET_LEX_STATE(EXPR_END);
20992 newtok(p);
20993 if (c == '-' || c == '+') {
20994 tokadd(p, c);
20995 c = nextc(p);
20996 }
20997 if (c == '0') {
20998 int start = toklen(p);
20999 c = nextc(p);
21000 if (c == 'x' || c == 'X') {
21001 /* hexadecimal */
21002 c = nextc(p);
21003 if (c != -1 && ISXDIGIT(c)) {
21004 do {
21005 if (c == '_') {
21006 if (nondigit) break;
21007 nondigit = c;
21008 continue;
21009 }
21010 if (!ISXDIGIT(c)) break;
21011 nondigit = 0;
21012 tokadd(p, c);
21013 } while ((c = nextc(p)) != -1);
21014 }
21015 pushback(p, c);
21016 tokfix(p);
21017 if (toklen(p) == start) {
21018 return no_digits(p);
21019 }
21020 else if (nondigit) goto trailing_uc;
21021 suffix = number_literal_suffix(p, NUM_SUFFIX_ALL);
21022 return set_number_literal(p, tINTEGER, suffix, 16, 0);
21023 }
21024 if (c == 'b' || c == 'B') {
21025 /* binary */
21026 c = nextc(p);
21027 if (c == '0' || c == '1') {
21028 do {
21029 if (c == '_') {
21030 if (nondigit) break;
21031 nondigit = c;
21032 continue;
21033 }
21034 if (c != '0' && c != '1') break;
21035 nondigit = 0;
21036 tokadd(p, c);
21037 } while ((c = nextc(p)) != -1);
21038 }
21039 pushback(p, c);
21040 tokfix(p);
21041 if (toklen(p) == start) {
21042 return no_digits(p);
21043 }
21044 else if (nondigit) goto trailing_uc;
21045 suffix = number_literal_suffix(p, NUM_SUFFIX_ALL);
21046 return set_number_literal(p, tINTEGER, suffix, 2, 0);
21047 }
21048 if (c == 'd' || c == 'D') {
21049 /* decimal */
21050 c = nextc(p);
21051 if (c != -1 && ISDIGIT(c)) {
21052 do {
21053 if (c == '_') {
21054 if (nondigit) break;
21055 nondigit = c;
21056 continue;
21057 }
21058 if (!ISDIGIT(c)) break;
21059 nondigit = 0;
21060 tokadd(p, c);
21061 } while ((c = nextc(p)) != -1);
21062 }
21063 pushback(p, c);
21064 tokfix(p);
21065 if (toklen(p) == start) {
21066 return no_digits(p);
21067 }
21068 else if (nondigit) goto trailing_uc;
21069 suffix = number_literal_suffix(p, NUM_SUFFIX_ALL);
21070 return set_number_literal(p, tINTEGER, suffix, 10, 0);
21071 }
21072 if (c == '_') {
21073 /* 0_0 */
21074 goto octal_number;
21075 }
21076 if (c == 'o' || c == 'O') {
21077 /* prefixed octal */
21078 c = nextc(p);
21079 if (c == -1 || c == '_' || !ISDIGIT(c)) {
21080 tokfix(p);
21081 return no_digits(p);
21082 }
21083 }
21084 if (c >= '0' && c <= '7') {
21085 /* octal */
21086 octal_number:
21087 do {
21088 if (c == '_') {
21089 if (nondigit) break;
21090 nondigit = c;
21091 continue;
21092 }
21093 if (c < '0' || c > '9') break;
21094 if (c > '7') goto invalid_octal;
21095 nondigit = 0;
21096 tokadd(p, c);
21097 } while ((c = nextc(p)) != -1);
21098 if (toklen(p) > start) {
21099 pushback(p, c);
21100 tokfix(p);
21101 if (nondigit) goto trailing_uc;
21102 suffix = number_literal_suffix(p, NUM_SUFFIX_ALL);
21103 return set_number_literal(p, tINTEGER, suffix, 8, 0);
21104 }
21105 if (nondigit) {
21106 pushback(p, c);
21107 goto trailing_uc;
21108 }
21109 }
21110 if (c > '7' && c <= '9') {
21111 invalid_octal:
21112 yyerror0("Invalid octal digit");
21113 }
21114 else if (c == '.' || c == 'e' || c == 'E') {
21115 tokadd(p, '0');
21116 }
21117 else {
21118 pushback(p, c);
21119 tokfix(p);
21120 suffix = number_literal_suffix(p, NUM_SUFFIX_ALL);
21121 return set_number_literal(p, tINTEGER, suffix, 10, 0);
21122 }
21123 }
21124
21125 for (;;) {
21126 switch (c) {
21127 case '0': case '1': case '2': case '3': case '4':
21128 case '5': case '6': case '7': case '8': case '9':
21129 nondigit = 0;
21130 tokadd(p, c);
21131 break;
21132
21133 case '.':
21134 if (nondigit) goto trailing_uc;
21135 if (seen_point || seen_e) {
21136 goto decode_num;
21137 }
21138 else {
21139 int c0 = nextc(p);
21140 if (c0 == -1 || !ISDIGIT(c0)) {
21141 pushback(p, c0);
21142 goto decode_num;
21143 }
21144 c = c0;
21145 }
21146 seen_point = toklen(p);
21147 tokadd(p, '.');
21148 tokadd(p, c);
21149 is_float++;
21150 nondigit = 0;
21151 break;
21152
21153 case 'e':
21154 case 'E':
21155 if (nondigit) {
21156 pushback(p, c);
21157 c = nondigit;
21158 goto decode_num;
21159 }
21160 if (seen_e) {
21161 goto decode_num;
21162 }
21163 nondigit = c;
21164 c = nextc(p);
21165 if (c != '-' && c != '+' && !ISDIGIT(c)) {
21166 pushback(p, c);
21167 c = nondigit;
21168 nondigit = 0;
21169 goto decode_num;
21170 }
21171 tokadd(p, nondigit);
21172 seen_e++;
21173 is_float++;
21174 tokadd(p, c);
21175 nondigit = (c == '-' || c == '+') ? c : 0;
21176 break;
21177
21178 case '_': /* `_' in number just ignored */
21179 if (nondigit) goto decode_num;
21180 nondigit = c;
21181 break;
21182
21183 default:
21184 goto decode_num;
21185 }
21186 c = nextc(p);
21187 }
21188
21189 decode_num:
21190 pushback(p, c);
21191 if (nondigit) {
21192 trailing_uc:
21193 literal_flush(p, p->lex.pcur - 1);
21194 YYLTYPE loc = RUBY_INIT_YYLLOC();
21195 compile_error(p, "trailing '%c' in number", nondigit);
21196 parser_show_error_line(p, &loc);
21197 }
21198 tokfix(p);
21199 if (is_float) {
21200 enum yytokentype type = tFLOAT;
21201
21202 suffix = number_literal_suffix(p, seen_e ? NUM_SUFFIX_I : NUM_SUFFIX_ALL);
21203 if (suffix & NUM_SUFFIX_R) {
21204 type = tRATIONAL;
21205 }
21206 else {
21207 strtod(tok(p), 0);
21208 if (errno == ERANGE) {
21209 rb_warning1("Float %s out of range", WARN_S(tok(p)));
21210 errno = 0;
21211 }
21212 }
21213 return set_number_literal(p, type, suffix, 0, seen_point);
21214 }
21215 suffix = number_literal_suffix(p, NUM_SUFFIX_ALL);
21216 return set_number_literal(p, tINTEGER, suffix, 10, 0);
21217}
21218
21219static enum yytokentype
21220parse_qmark(struct parser_params *p, int space_seen)
21221{
21222 rb_encoding *enc;
21223 register int c;
21224 rb_parser_string_t *lit;
21225 const char *start = p->lex.pcur;
21226
21227 if (IS_END()) {
21228 SET_LEX_STATE(EXPR_VALUE);
21229 return '?';
21230 }
21231 c = nextc(p);
21232 if (c == -1) {
21233 compile_error(p, "incomplete character syntax");
21234 return 0;
21235 }
21236 if (rb_enc_isspace(c, p->enc)) {
21237 if (!IS_ARG()) {
21238 int c2 = escaped_control_code(c);
21239 if (c2) {
21240 WARN_SPACE_CHAR(c2, "?");
21241 }
21242 }
21243 ternary:
21244 pushback(p, c);
21245 SET_LEX_STATE(EXPR_VALUE);
21246 return '?';
21247 }
21248 newtok(p);
21249 enc = p->enc;
21250 int w = parser_precise_mbclen(p, start);
21251 if (is_identchar(p, start, p->lex.pend, p->enc) &&
21252 !(lex_eol_ptr_n_p(p, start, w) || !is_identchar(p, start + w, p->lex.pend, p->enc))) {
21253 if (space_seen) {
21254 const char *ptr = start;
21255 do {
21256 int n = parser_precise_mbclen(p, ptr);
21257 if (n < 0) return -1;
21258 ptr += n;
21259 } while (!lex_eol_ptr_p(p, ptr) && is_identchar(p, ptr, p->lex.pend, p->enc));
21260 rb_warn2("'?' just followed by '%.*s' is interpreted as" \
21261 " a conditional operator, put a space after '?'",
21262 WARN_I((int)(ptr - start)), WARN_S_L(start, (ptr - start)));
21263 }
21264 goto ternary;
21265 }
21266 else if (c == '\\') {
21267 if (peek(p, 'u')) {
21268 nextc(p);
21269 enc = rb_utf8_encoding();
21270 tokadd_utf8(p, &enc, -1, 0, 0);
21271 }
21272 else if (!ISASCII(c = peekc(p)) && c != -1) {
21273 nextc(p);
21274 if (tokadd_mbchar(p, c) == -1) return 0;
21275 }
21276 else {
21277 c = read_escape(p, 0, p->lex.pcur - rb_strlen_lit("?\\"));
21278 tokadd(p, c);
21279 }
21280 }
21281 else {
21282 if (tokadd_mbchar(p, c) == -1) return 0;
21283 }
21284 tokfix(p);
21285 lit = STR_NEW3(tok(p), toklen(p), enc, 0);
21286 set_yylval_str(lit);
21287 SET_LEX_STATE(EXPR_END);
21288 return tCHAR;
21289}
21290
21291static enum yytokentype
21292parse_percent(struct parser_params *p, const int space_seen, const enum lex_state_e last_state)
21293{
21294 register int c;
21295 const char *ptok = p->lex.pcur;
21296
21297 if (IS_BEG()) {
21298 int term;
21299 int paren;
21300
21301 c = nextc(p);
21302 quotation:
21303 if (c == -1) goto unterminated;
21304 if (!ISALNUM(c)) {
21305 term = c;
21306 if (!ISASCII(c)) goto unknown;
21307 c = 'Q';
21308 }
21309 else {
21310 term = nextc(p);
21311 if (rb_enc_isalnum(term, p->enc) || !parser_isascii(p)) {
21312 unknown:
21313 pushback(p, term);
21314 c = parser_precise_mbclen(p, p->lex.pcur);
21315 if (c < 0) return 0;
21316 p->lex.pcur += c;
21317 yyerror0("unknown type of %string");
21318 return 0;
21319 }
21320 }
21321 if (term == -1) {
21322 unterminated:
21323 compile_error(p, "unterminated quoted string meets end of file");
21324 return 0;
21325 }
21326 paren = term;
21327 if (term == '(') term = ')';
21328 else if (term == '[') term = ']';
21329 else if (term == '{') term = '}';
21330 else if (term == '<') term = '>';
21331 else paren = 0;
21332
21333 p->lex.ptok = ptok-1;
21334 switch (c) {
21335 case 'Q':
21336 p->lex.strterm = NEW_STRTERM(str_dquote, term, paren);
21337 return tSTRING_BEG;
21338
21339 case 'q':
21340 p->lex.strterm = NEW_STRTERM(str_squote, term, paren);
21341 return tSTRING_BEG;
21342
21343 case 'W':
21344 p->lex.strterm = NEW_STRTERM(str_dword, term, paren);
21345 return tWORDS_BEG;
21346
21347 case 'w':
21348 p->lex.strterm = NEW_STRTERM(str_sword, term, paren);
21349 return tQWORDS_BEG;
21350
21351 case 'I':
21352 p->lex.strterm = NEW_STRTERM(str_dword, term, paren);
21353 return tSYMBOLS_BEG;
21354
21355 case 'i':
21356 p->lex.strterm = NEW_STRTERM(str_sword, term, paren);
21357 return tQSYMBOLS_BEG;
21358
21359 case 'x':
21360 p->lex.strterm = NEW_STRTERM(str_xquote, term, paren);
21361 return tXSTRING_BEG;
21362
21363 case 'r':
21364 p->lex.strterm = NEW_STRTERM(str_regexp, term, paren);
21365 return tREGEXP_BEG;
21366
21367 case 's':
21368 p->lex.strterm = NEW_STRTERM(str_ssym, term, paren);
21369 SET_LEX_STATE(EXPR_FNAME|EXPR_FITEM);
21370 return tSYMBEG;
21371
21372 default:
21373 yyerror0("unknown type of %string");
21374 return 0;
21375 }
21376 }
21377 if ((c = nextc(p)) == '=') {
21378 set_yylval_id('%');
21379 SET_LEX_STATE(EXPR_BEG);
21380 return tOP_ASGN;
21381 }
21382 if (IS_SPCARG(c) || (IS_lex_state(EXPR_FITEM) && c == 's')) {
21383 goto quotation;
21384 }
21385 SET_LEX_STATE(IS_AFTER_OPERATOR() ? EXPR_ARG : EXPR_BEG);
21386 pushback(p, c);
21387 return warn_balanced('%', "%%", "string literal");
21388}
21389
21390static int
21391tokadd_ident(struct parser_params *p, int c)
21392{
21393 do {
21394 if (tokadd_mbchar(p, c) == -1) return -1;
21395 c = nextc(p);
21396 } while (parser_is_identchar(p));
21397 pushback(p, c);
21398 return 0;
21399}
21400
21401static ID
21402tokenize_ident(struct parser_params *p)
21403{
21404 ID ident = TOK_INTERN();
21405
21406 set_yylval_name(ident);
21407
21408 return ident;
21409}
21410
21411static int
21412parse_numvar(struct parser_params *p)
21413{
21414 size_t len;
21415 int overflow;
21416 unsigned long n = ruby_scan_digits(tok(p)+1, toklen(p)-1, 10, &len, &overflow);
21417 const unsigned long nth_ref_max =
21418 ((FIXNUM_MAX < INT_MAX) ? FIXNUM_MAX : INT_MAX) >> 1;
21419 /* NTH_REF is left-shifted to be ORed with back-ref flag and
21420 * turned into a Fixnum, in compile.c */
21421
21422 if (overflow || n > nth_ref_max) {
21423 /* compile_error()? */
21424 rb_warn1("'%s' is too big for a number variable, always nil", WARN_S(tok(p)));
21425 return 0; /* $0 is $PROGRAM_NAME, not NTH_REF */
21426 }
21427 else {
21428 return (int)n;
21429 }
21430}
21431
21432static enum yytokentype
21433parse_gvar(struct parser_params *p, const enum lex_state_e last_state)
21434{
21435 const char *ptr = p->lex.pcur;
21436 register int c;
21437
21438 SET_LEX_STATE(EXPR_END);
21439 p->lex.ptok = ptr - 1; /* from '$' */
21440 newtok(p);
21441 c = nextc(p);
21442 switch (c) {
21443 case '_': /* $_: last read line string */
21444 c = nextc(p);
21445 if (parser_is_identchar(p)) {
21446 tokadd(p, '$');
21447 tokadd(p, '_');
21448 break;
21449 }
21450 pushback(p, c);
21451 c = '_';
21452 /* fall through */
21453 case '~': /* $~: match-data */
21454 case '*': /* $*: argv */
21455 case '$': /* $$: pid */
21456 case '?': /* $?: last status */
21457 case '!': /* $!: error string */
21458 case '@': /* $@: error position */
21459 case '/': /* $/: input record separator */
21460 case '\\': /* $\: output record separator */
21461 case ';': /* $;: field separator */
21462 case ',': /* $,: output field separator */
21463 case '.': /* $.: last read line number */
21464 case '=': /* $=: ignorecase */
21465 case ':': /* $:: load path */
21466 case '<': /* $<: default input handle */
21467 case '>': /* $>: default output handle */
21468 case '\"': /* $": already loaded files */
21469 tokadd(p, '$');
21470 tokadd(p, c);
21471 goto gvar;
21472
21473 case '-':
21474 tokadd(p, '$');
21475 tokadd(p, c);
21476 c = nextc(p);
21477 if (parser_is_identchar(p)) {
21478 if (tokadd_mbchar(p, c) == -1) return 0;
21479 }
21480 else {
21481 pushback(p, c);
21482 pushback(p, '-');
21483 return '$';
21484 }
21485 gvar:
21486 tokenize_ident(p);
21487 return tGVAR;
21488
21489 case '&': /* $&: last match */
21490 case '`': /* $`: string before last match */
21491 case '\'': /* $': string after last match */
21492 case '+': /* $+: string matches last paren. */
21493 if (IS_lex_state_for(last_state, EXPR_FNAME)) {
21494 tokadd(p, '$');
21495 tokadd(p, c);
21496 goto gvar;
21497 }
21498 set_yylval_node(NEW_BACK_REF(c, &_cur_loc));
21499 return tBACK_REF;
21500
21501 case '1': case '2': case '3':
21502 case '4': case '5': case '6':
21503 case '7': case '8': case '9':
21504 tokadd(p, '$');
21505 do {
21506 tokadd(p, c);
21507 c = nextc(p);
21508 } while (c != -1 && ISDIGIT(c));
21509 pushback(p, c);
21510 if (IS_lex_state_for(last_state, EXPR_FNAME)) goto gvar;
21511 tokfix(p);
21512 c = parse_numvar(p);
21513 set_yylval_node(NEW_NTH_REF(c, &_cur_loc));
21514 return tNTH_REF;
21515
21516 default:
21517 if (!parser_is_identchar(p)) {
21518 YYLTYPE loc = RUBY_INIT_YYLLOC();
21519 if (c == -1 || ISSPACE(c)) {
21520 compile_error(p, "'$' without identifiers is not allowed as a global variable name");
21521 }
21522 else {
21523 pushback(p, c);
21524 compile_error(p, "'$%c' is not allowed as a global variable name", c);
21525 }
21526 parser_show_error_line(p, &loc);
21527 set_yylval_noname();
21528 return tGVAR;
21529 }
21530 /* fall through */
21531 case '0':
21532 tokadd(p, '$');
21533 }
21534
21535 if (tokadd_ident(p, c)) return 0;
21536 SET_LEX_STATE(EXPR_END);
21537 if (VALID_SYMNAME_P(tok(p), toklen(p), p->enc, ID_GLOBAL)) {
21538 tokenize_ident(p);
21539 }
21540 else {
21541 compile_error(p, "'%.*s' is not allowed as a global variable name", toklen(p), tok(p));
21542 set_yylval_noname();
21543 }
21544 return tGVAR;
21545}
21546
21547static bool
21548parser_numbered_param(struct parser_params *p, int n)
21549{
21550 if (n < 0) return false;
21551
21552 if (DVARS_TERMINAL_P(p->lvtbl->args) || DVARS_TERMINAL_P(p->lvtbl->args->prev)) {
21553 return false;
21554 }
21555 if (p->max_numparam == ORDINAL_PARAM) {
21556 compile_error(p, "ordinary parameter is defined");
21557 return false;
21558 }
21559 struct vtable *args = p->lvtbl->args;
21560 if (p->max_numparam < n) {
21561 p->max_numparam = n;
21562 }
21563 while (n > args->pos) {
21564 vtable_add(args, NUMPARAM_IDX_TO_ID(args->pos+1));
21565 }
21566 return true;
21567}
21568
21569static enum yytokentype
21570parse_atmark(struct parser_params *p, const enum lex_state_e last_state)
21571{
21572 const char *ptr = p->lex.pcur;
21573 enum yytokentype result = tIVAR;
21574 register int c = nextc(p);
21575 YYLTYPE loc;
21576
21577 p->lex.ptok = ptr - 1; /* from '@' */
21578 newtok(p);
21579 tokadd(p, '@');
21580 if (c == '@') {
21581 result = tCVAR;
21582 tokadd(p, '@');
21583 c = nextc(p);
21584 }
21585 SET_LEX_STATE(IS_lex_state_for(last_state, EXPR_FNAME) ? EXPR_ENDFN : EXPR_END);
21586 if (c == -1 || !parser_is_identchar(p)) {
21587 pushback(p, c);
21588 RUBY_SET_YYLLOC(loc);
21589 if (result == tIVAR) {
21590 compile_error(p, "'@' without identifiers is not allowed as an instance variable name");
21591 }
21592 else {
21593 compile_error(p, "'@@' without identifiers is not allowed as a class variable name");
21594 }
21595 parser_show_error_line(p, &loc);
21596 set_yylval_noname();
21597 SET_LEX_STATE(EXPR_END);
21598 return result;
21599 }
21600 else if (ISDIGIT(c)) {
21601 pushback(p, c);
21602 RUBY_SET_YYLLOC(loc);
21603 if (result == tIVAR) {
21604 compile_error(p, "'@%c' is not allowed as an instance variable name", c);
21605 }
21606 else {
21607 compile_error(p, "'@@%c' is not allowed as a class variable name", c);
21608 }
21609 parser_show_error_line(p, &loc);
21610 set_yylval_noname();
21611 SET_LEX_STATE(EXPR_END);
21612 return result;
21613 }
21614
21615 if (tokadd_ident(p, c)) return 0;
21616 tokenize_ident(p);
21617 return result;
21618}
21619
21620static enum yytokentype
21621parse_ident(struct parser_params *p, int c, int cmd_state)
21622{
21623 enum yytokentype result;
21624 bool is_ascii = true;
21625 const enum lex_state_e last_state = p->lex.state;
21626 ID ident;
21627 int enforce_keyword_end = 0;
21628
21629 do {
21630 if (!ISASCII(c)) is_ascii = false;
21631 if (tokadd_mbchar(p, c) == -1) return 0;
21632 c = nextc(p);
21633 } while (parser_is_identchar(p));
21634 if ((c == '!' || c == '?') && !peek(p, '=')) {
21635 result = tFID;
21636 tokadd(p, c);
21637 }
21638 else if (c == '=' && IS_lex_state(EXPR_FNAME) &&
21639 (!peek(p, '~') && !peek(p, '>') && (!peek(p, '=') || (peek_n(p, '>', 1))))) {
21640 result = tIDENTIFIER;
21641 tokadd(p, c);
21642 }
21643 else {
21644 result = tCONSTANT; /* assume provisionally */
21645 pushback(p, c);
21646 }
21647 tokfix(p);
21648
21649 if (IS_LABEL_POSSIBLE()) {
21650 if (IS_LABEL_SUFFIX(0)) {
21651 SET_LEX_STATE(EXPR_ARG|EXPR_LABELED);
21652 nextc(p);
21653 tokenize_ident(p);
21654 return tLABEL;
21655 }
21656 }
21657
21658#ifndef RIPPER
21659 if (peek_end_expect_token_locations(p)) {
21660 const rb_code_position_t *end_pos;
21661 int lineno, column;
21662 int beg_pos = (int)(p->lex.ptok - p->lex.pbeg);
21663
21664 end_pos = peek_end_expect_token_locations(p)->pos;
21665 lineno = end_pos->lineno;
21666 column = end_pos->column;
21667
21668 if (p->debug) {
21669 rb_parser_printf(p, "enforce_keyword_end check. current: (%d, %d), peek: (%d, %d)\n",
21670 p->ruby_sourceline, beg_pos, lineno, column);
21671 }
21672
21673 if ((p->ruby_sourceline > lineno) && (beg_pos <= column)) {
21674 const struct kwtable *kw;
21675
21676 if ((IS_lex_state(EXPR_DOT)) && (kw = rb_reserved_word(tok(p), toklen(p))) && (kw && kw->id[0] == keyword_end)) {
21677 if (p->debug) rb_parser_printf(p, "enforce_keyword_end is enabled\n");
21678 enforce_keyword_end = 1;
21679 }
21680 }
21681 }
21682#endif
21683
21684 if (is_ascii && (!IS_lex_state(EXPR_DOT) || enforce_keyword_end)) {
21685 const struct kwtable *kw;
21686
21687 /* See if it is a reserved word. */
21688 kw = rb_reserved_word(tok(p), toklen(p));
21689 if (kw) {
21690 enum lex_state_e state = p->lex.state;
21691 if (IS_lex_state_for(state, EXPR_FNAME)) {
21692 SET_LEX_STATE(EXPR_ENDFN);
21693 set_yylval_name(rb_intern2(tok(p), toklen(p)));
21694 return kw->id[0];
21695 }
21696 SET_LEX_STATE(kw->state);
21697 if (IS_lex_state(EXPR_BEG)) {
21698 p->command_start = TRUE;
21699 }
21700 if (kw->id[0] == keyword_do) {
21701 if (lambda_beginning_p()) {
21702 p->lex.lpar_beg = -1; /* make lambda_beginning_p() == FALSE in the body of "-> do ... end" */
21703 return keyword_do_LAMBDA;
21704 }
21705 if (COND_P()) return keyword_do_cond;
21706 if (CMDARG_P() && !IS_lex_state_for(state, EXPR_CMDARG))
21707 return keyword_do_block;
21708 return keyword_do;
21709 }
21710 if (IS_lex_state_for(state, (EXPR_BEG | EXPR_LABELED | EXPR_CLASS)))
21711 return kw->id[0];
21712 else {
21713 if (kw->id[0] != kw->id[1])
21714 SET_LEX_STATE(EXPR_BEG | EXPR_LABEL);
21715 return kw->id[1];
21716 }
21717 }
21718 }
21719
21720 if (IS_lex_state(EXPR_BEG_ANY | EXPR_ARG_ANY | EXPR_DOT)) {
21721 if (cmd_state) {
21722 SET_LEX_STATE(EXPR_CMDARG);
21723 }
21724 else {
21725 SET_LEX_STATE(EXPR_ARG);
21726 }
21727 }
21728 else if (p->lex.state == EXPR_FNAME) {
21729 SET_LEX_STATE(EXPR_ENDFN);
21730 }
21731 else {
21732 SET_LEX_STATE(EXPR_END);
21733 }
21734
21735 ident = tokenize_ident(p);
21736 if (result == tCONSTANT && is_local_id(ident)) result = tIDENTIFIER;
21737 if (!IS_lex_state_for(last_state, EXPR_DOT|EXPR_FNAME) &&
21738 (result == tIDENTIFIER) && /* not EXPR_FNAME, not attrasgn */
21739 (lvar_defined(p, ident) || NUMPARAM_ID_P(ident))) {
21740 SET_LEX_STATE(EXPR_END|EXPR_LABEL);
21741 }
21742 return result;
21743}
21744
21745static void
21746warn_cr(struct parser_params *p)
21747{
21748 if (!p->cr_seen) {
21749 p->cr_seen = TRUE;
21750 /* carried over with p->lex.nextline for nextc() */
21751 rb_warn0("encountered \\r in middle of line, treated as a mere space");
21752 }
21753}
21754
21755static enum yytokentype
21756parser_yylex(struct parser_params *p)
21757{
21758 register int c;
21759 int space_seen = 0;
21760 int cmd_state;
21761 int label;
21762 enum lex_state_e last_state;
21763 int fallthru = FALSE;
21764 int token_seen = p->token_seen;
21765
21766 if (p->lex.strterm) {
21767 if (strterm_is_heredoc(p->lex.strterm)) {
21768 token_flush(p);
21769 return here_document(p, &p->lex.strterm->u.heredoc);
21770 }
21771 else {
21772 token_flush(p);
21773 return parse_string(p, &p->lex.strterm->u.literal);
21774 }
21775 }
21776 cmd_state = p->command_start;
21777 p->command_start = FALSE;
21778 p->token_seen = TRUE;
21779#ifndef RIPPER
21780 token_flush(p);
21781#endif
21782 retry:
21783 last_state = p->lex.state;
21784 switch (c = nextc(p)) {
21785 case '\0': /* NUL */
21786 case '\004': /* ^D */
21787 case '\032': /* ^Z */
21788 case -1: /* end of script. */
21789 p->eofp = 1;
21790#ifndef RIPPER
21791 if (p->end_expect_token_locations) {
21792 pop_end_expect_token_locations(p);
21793 RUBY_SET_YYLLOC_OF_DUMMY_END(*p->yylloc);
21794 return tDUMNY_END;
21795 }
21796#endif
21797 /* Set location for end-of-input because dispatch_scan_event is not called. */
21798 RUBY_SET_YYLLOC(*p->yylloc);
21799 return END_OF_INPUT;
21800
21801 /* white spaces */
21802 case '\r':
21803 warn_cr(p);
21804 /* fall through */
21805 case ' ': case '\t': case '\f':
21806 case '\13': /* '\v' */
21807 space_seen = 1;
21808 while ((c = nextc(p))) {
21809 switch (c) {
21810 case '\r':
21811 warn_cr(p);
21812 /* fall through */
21813 case ' ': case '\t': case '\f':
21814 case '\13': /* '\v' */
21815 break;
21816 default:
21817 goto outofloop;
21818 }
21819 }
21820 outofloop:
21821 pushback(p, c);
21822 dispatch_scan_event(p, tSP);
21823#ifndef RIPPER
21824 token_flush(p);
21825#endif
21826 goto retry;
21827
21828 case '#': /* it's a comment */
21829 p->token_seen = token_seen;
21830 const char *const pcur = p->lex.pcur, *const ptok = p->lex.ptok;
21831 /* no magic_comment in shebang line */
21832 if (!parser_magic_comment(p, p->lex.pcur, p->lex.pend - p->lex.pcur)) {
21833 if (comment_at_top(p)) {
21834 set_file_encoding(p, p->lex.pcur, p->lex.pend);
21835 }
21836 }
21837 p->lex.pcur = pcur, p->lex.ptok = ptok;
21838 lex_goto_eol(p);
21839 dispatch_scan_event(p, tCOMMENT);
21840 fallthru = TRUE;
21841 /* fall through */
21842 case '\n':
21843 p->token_seen = token_seen;
21844 rb_parser_string_t *prevline = p->lex.lastline;
21845 c = (IS_lex_state(EXPR_BEG|EXPR_CLASS|EXPR_FNAME|EXPR_DOT) &&
21846 !IS_lex_state(EXPR_LABELED));
21847 if (c || IS_lex_state_all(EXPR_ARG|EXPR_LABELED)) {
21848 if (!fallthru) {
21849 dispatch_scan_event(p, tIGNORED_NL);
21850 }
21851 fallthru = FALSE;
21852 if (!c && p->ctxt.in_kwarg) {
21853 goto normal_newline;
21854 }
21855 goto retry;
21856 }
21857 while (1) {
21858 switch (c = nextc(p)) {
21859 case ' ': case '\t': case '\f': case '\r':
21860 case '\13': /* '\v' */
21861 space_seen = 1;
21862 break;
21863 case '#':
21864 pushback(p, c);
21865 if (space_seen) {
21866 dispatch_scan_event(p, tSP);
21867 token_flush(p);
21868 }
21869 goto retry;
21870 case 'a':
21871 if (peek_word_at(p, "nd", 2, 0)) goto leading_logical;
21872 goto bol;
21873 case 'o':
21874 if (peek_word_at(p, "r", 1, 0)) goto leading_logical;
21875 goto bol;
21876 case '|':
21877 if (peek(p, '|')) goto leading_logical;
21878 goto bol;
21879 case '&':
21880 if (peek(p, '&')) {
21881 leading_logical:
21882 pushback(p, c);
21883 dispatch_delayed_token(p, tIGNORED_NL);
21884 cmd_state = FALSE;
21885 goto retry;
21886 }
21887 /* fall through */
21888 case '.': {
21889 dispatch_delayed_token(p, tIGNORED_NL);
21890 if (peek(p, '.') == (c == '&')) {
21891 pushback(p, c);
21892 dispatch_scan_event(p, tSP);
21893 goto retry;
21894 }
21895 }
21896 bol:
21897 default:
21898 p->ruby_sourceline--;
21899 p->lex.nextline = p->lex.lastline;
21900 set_lastline(p, prevline);
21901 case -1: /* EOF no decrement*/
21902 if (c == -1 && space_seen) {
21903 dispatch_scan_event(p, tSP);
21904 }
21905 lex_goto_eol(p);
21906 if (c != -1) {
21907 token_flush(p);
21908 RUBY_SET_YYLLOC(*p->yylloc);
21909 }
21910 goto normal_newline;
21911 }
21912 }
21913 normal_newline:
21914 p->command_start = TRUE;
21915 SET_LEX_STATE(EXPR_BEG);
21916 return '\n';
21917
21918 case '*':
21919 if ((c = nextc(p)) == '*') {
21920 if ((c = nextc(p)) == '=') {
21921 set_yylval_id(idPow);
21922 SET_LEX_STATE(EXPR_BEG);
21923 return tOP_ASGN;
21924 }
21925 pushback(p, c);
21926 if (IS_SPCARG(c)) {
21927 rb_warning0("'**' interpreted as argument prefix");
21928 c = tDSTAR;
21929 }
21930 else if (IS_BEG()) {
21931 c = tDSTAR;
21932 }
21933 else {
21934 c = warn_balanced((enum ruby_method_ids)tPOW, "**", "argument prefix");
21935 }
21936 }
21937 else {
21938 if (c == '=') {
21939 set_yylval_id('*');
21940 SET_LEX_STATE(EXPR_BEG);
21941 return tOP_ASGN;
21942 }
21943 pushback(p, c);
21944 if (IS_SPCARG(c)) {
21945 rb_warning0("'*' interpreted as argument prefix");
21946 c = tSTAR;
21947 }
21948 else if (IS_BEG()) {
21949 c = tSTAR;
21950 }
21951 else {
21952 c = warn_balanced('*', "*", "argument prefix");
21953 }
21954 }
21955 SET_LEX_STATE(IS_AFTER_OPERATOR() ? EXPR_ARG : EXPR_BEG);
21956 return c;
21957
21958 case '!':
21959 c = nextc(p);
21960 if (IS_AFTER_OPERATOR()) {
21961 SET_LEX_STATE(EXPR_ARG);
21962 if (c == '@') {
21963 return '!';
21964 }
21965 }
21966 else {
21967 SET_LEX_STATE(EXPR_BEG);
21968 }
21969 if (c == '=') {
21970 return tNEQ;
21971 }
21972 if (c == '~') {
21973 return tNMATCH;
21974 }
21975 pushback(p, c);
21976 return '!';
21977
21978 case '=':
21979 if (was_bol(p)) {
21980 /* skip embedded rd document */
21981 if (word_match_p(p, "begin", 5)) {
21982 int first_p = TRUE;
21983
21984 lex_goto_eol(p);
21985 dispatch_scan_event(p, tEMBDOC_BEG);
21986 for (;;) {
21987 lex_goto_eol(p);
21988 if (!first_p) {
21989 dispatch_scan_event(p, tEMBDOC);
21990 }
21991 first_p = FALSE;
21992 c = nextc(p);
21993 if (c == -1) {
21994 compile_error(p, "embedded document meets end of file");
21995 return END_OF_INPUT;
21996 }
21997 if (c == '=' && word_match_p(p, "end", 3)) {
21998 break;
21999 }
22000 pushback(p, c);
22001 }
22002 lex_goto_eol(p);
22003 dispatch_scan_event(p, tEMBDOC_END);
22004 goto retry;
22005 }
22006 }
22007
22008 SET_LEX_STATE(IS_AFTER_OPERATOR() ? EXPR_ARG : EXPR_BEG);
22009 if ((c = nextc(p)) == '=') {
22010 if ((c = nextc(p)) == '=') {
22011 return tEQQ;
22012 }
22013 pushback(p, c);
22014 return tEQ;
22015 }
22016 if (c == '~') {
22017 return tMATCH;
22018 }
22019 else if (c == '>') {
22020 return tASSOC;
22021 }
22022 pushback(p, c);
22023 return '=';
22024
22025 case '<':
22026 c = nextc(p);
22027 if (c == '<' &&
22028 !IS_lex_state(EXPR_DOT | EXPR_CLASS) &&
22029 !IS_END() &&
22030 (!IS_ARG() || IS_lex_state(EXPR_LABELED) || space_seen)) {
22031 enum yytokentype token = heredoc_identifier(p);
22032 if (token) return token < 0 ? 0 : token;
22033 }
22034 if (IS_AFTER_OPERATOR()) {
22035 SET_LEX_STATE(EXPR_ARG);
22036 }
22037 else {
22038 if (IS_lex_state(EXPR_CLASS))
22039 p->command_start = TRUE;
22040 SET_LEX_STATE(EXPR_BEG);
22041 }
22042 if (c == '=') {
22043 if ((c = nextc(p)) == '>') {
22044 return tCMP;
22045 }
22046 pushback(p, c);
22047 return tLEQ;
22048 }
22049 if (c == '<') {
22050 if ((c = nextc(p)) == '=') {
22051 set_yylval_id(idLTLT);
22052 SET_LEX_STATE(EXPR_BEG);
22053 return tOP_ASGN;
22054 }
22055 pushback(p, c);
22056 return warn_balanced((enum ruby_method_ids)tLSHFT, "<<", "here document");
22057 }
22058 pushback(p, c);
22059 return '<';
22060
22061 case '>':
22062 SET_LEX_STATE(IS_AFTER_OPERATOR() ? EXPR_ARG : EXPR_BEG);
22063 if ((c = nextc(p)) == '=') {
22064 return tGEQ;
22065 }
22066 if (c == '>') {
22067 if ((c = nextc(p)) == '=') {
22068 set_yylval_id(idGTGT);
22069 SET_LEX_STATE(EXPR_BEG);
22070 return tOP_ASGN;
22071 }
22072 pushback(p, c);
22073 return tRSHFT;
22074 }
22075 pushback(p, c);
22076 return '>';
22077
22078 case '"':
22079 label = (IS_LABEL_POSSIBLE() ? str_label : 0);
22080 p->lex.strterm = NEW_STRTERM(str_dquote | label, '"', 0);
22081 p->lex.ptok = p->lex.pcur-1;
22082 return tSTRING_BEG;
22083
22084 case '`':
22085 if (IS_lex_state(EXPR_FNAME)) {
22086 SET_LEX_STATE(EXPR_ENDFN);
22087 return c;
22088 }
22089 if (IS_lex_state(EXPR_DOT)) {
22090 if (cmd_state)
22091 SET_LEX_STATE(EXPR_CMDARG);
22092 else
22093 SET_LEX_STATE(EXPR_ARG);
22094 return c;
22095 }
22096 p->lex.strterm = NEW_STRTERM(str_xquote, '`', 0);
22097 return tXSTRING_BEG;
22098
22099 case '\'':
22100 label = (IS_LABEL_POSSIBLE() ? str_label : 0);
22101 p->lex.strterm = NEW_STRTERM(str_squote | label, '\'', 0);
22102 p->lex.ptok = p->lex.pcur-1;
22103 return tSTRING_BEG;
22104
22105 case '?':
22106 return parse_qmark(p, space_seen);
22107
22108 case '&':
22109 if ((c = nextc(p)) == '&') {
22110 SET_LEX_STATE(EXPR_BEG);
22111 if ((c = nextc(p)) == '=') {
22112 set_yylval_id(idANDOP);
22113 SET_LEX_STATE(EXPR_BEG);
22114 return tOP_ASGN;
22115 }
22116 pushback(p, c);
22117 return tANDOP;
22118 }
22119 else if (c == '=') {
22120 set_yylval_id('&');
22121 SET_LEX_STATE(EXPR_BEG);
22122 return tOP_ASGN;
22123 }
22124 else if (c == '.') {
22125 set_yylval_id(idANDDOT);
22126 SET_LEX_STATE(EXPR_DOT);
22127 return tANDDOT;
22128 }
22129 pushback(p, c);
22130 if (IS_SPCARG(c)) {
22131 if ((c != ':') ||
22132 (c = peekc_n(p, 1)) == -1 ||
22133 !(c == '\'' || c == '"' ||
22134 is_identchar(p, (p->lex.pcur+1), p->lex.pend, p->enc))) {
22135 rb_warning0("'&' interpreted as argument prefix");
22136 }
22137 c = tAMPER;
22138 }
22139 else if (IS_BEG()) {
22140 c = tAMPER;
22141 }
22142 else {
22143 c = warn_balanced('&', "&", "argument prefix");
22144 }
22145 SET_LEX_STATE(IS_AFTER_OPERATOR() ? EXPR_ARG : EXPR_BEG);
22146 return c;
22147
22148 case '|':
22149 if ((c = nextc(p)) == '|') {
22150 SET_LEX_STATE(EXPR_BEG);
22151 if ((c = nextc(p)) == '=') {
22152 set_yylval_id(idOROP);
22153 SET_LEX_STATE(EXPR_BEG);
22154 return tOP_ASGN;
22155 }
22156 pushback(p, c);
22157 if (IS_lex_state_for(last_state, EXPR_BEG)) {
22158 c = '|';
22159 pushback(p, '|');
22160 return c;
22161 }
22162 return tOROP;
22163 }
22164 if (c == '=') {
22165 set_yylval_id('|');
22166 SET_LEX_STATE(EXPR_BEG);
22167 return tOP_ASGN;
22168 }
22169 SET_LEX_STATE(IS_AFTER_OPERATOR() ? EXPR_ARG : EXPR_BEG|EXPR_LABEL);
22170 pushback(p, c);
22171 return '|';
22172
22173 case '+':
22174 c = nextc(p);
22175 if (IS_AFTER_OPERATOR()) {
22176 SET_LEX_STATE(EXPR_ARG);
22177 if (c == '@') {
22178 return tUPLUS;
22179 }
22180 pushback(p, c);
22181 return '+';
22182 }
22183 if (c == '=') {
22184 set_yylval_id('+');
22185 SET_LEX_STATE(EXPR_BEG);
22186 return tOP_ASGN;
22187 }
22188 if (IS_BEG() || (IS_SPCARG(c) && arg_ambiguous(p, '+'))) {
22189 SET_LEX_STATE(EXPR_BEG);
22190 pushback(p, c);
22191 if (c != -1 && ISDIGIT(c)) {
22192 return parse_numeric(p, '+');
22193 }
22194 return tUPLUS;
22195 }
22196 SET_LEX_STATE(EXPR_BEG);
22197 pushback(p, c);
22198 return warn_balanced('+', "+", "unary operator");
22199
22200 case '-':
22201 c = nextc(p);
22202 if (IS_AFTER_OPERATOR()) {
22203 SET_LEX_STATE(EXPR_ARG);
22204 if (c == '@') {
22205 return tUMINUS;
22206 }
22207 pushback(p, c);
22208 return '-';
22209 }
22210 if (c == '=') {
22211 set_yylval_id('-');
22212 SET_LEX_STATE(EXPR_BEG);
22213 return tOP_ASGN;
22214 }
22215 if (c == '>') {
22216 SET_LEX_STATE(EXPR_ENDFN);
22217 yylval.num = p->lex.lpar_beg;
22218 p->lex.lpar_beg = p->lex.paren_nest;
22219 return tLAMBDA;
22220 }
22221 if (IS_BEG() || (IS_SPCARG(c) && arg_ambiguous(p, '-'))) {
22222 SET_LEX_STATE(EXPR_BEG);
22223 pushback(p, c);
22224 if (c != -1 && ISDIGIT(c)) {
22225 return tUMINUS_NUM;
22226 }
22227 return tUMINUS;
22228 }
22229 SET_LEX_STATE(EXPR_BEG);
22230 pushback(p, c);
22231 return warn_balanced('-', "-", "unary operator");
22232
22233 case '.': {
22234 int is_beg = IS_BEG();
22235 SET_LEX_STATE(EXPR_BEG);
22236 if ((c = nextc(p)) == '.') {
22237 if ((c = nextc(p)) == '.') {
22238 if (p->ctxt.in_argdef || IS_LABEL_POSSIBLE()) {
22239 SET_LEX_STATE(EXPR_ENDARG);
22240 return tBDOT3;
22241 }
22242 if (p->lex.paren_nest == 0 && looking_at_eol_p(p)) {
22243 rb_warn0("... at EOL, should be parenthesized?");
22244 }
22245 return is_beg ? tBDOT3 : tDOT3;
22246 }
22247 pushback(p, c);
22248 return is_beg ? tBDOT2 : tDOT2;
22249 }
22250 pushback(p, c);
22251 if (c != -1 && ISDIGIT(c)) {
22252 char prev = p->lex.pcur-1 > p->lex.pbeg ? *(p->lex.pcur-2) : 0;
22253 parse_numeric(p, '.');
22254 if (ISDIGIT(prev)) {
22255 yyerror0("unexpected fraction part after numeric literal");
22256 }
22257 else {
22258 yyerror0("no .<digit> floating literal anymore; put 0 before dot");
22259 }
22260 SET_LEX_STATE(EXPR_END);
22261 p->lex.ptok = p->lex.pcur;
22262 goto retry;
22263 }
22264 set_yylval_id('.');
22265 SET_LEX_STATE(EXPR_DOT);
22266 return '.';
22267 }
22268
22269 case '0': case '1': case '2': case '3': case '4':
22270 case '5': case '6': case '7': case '8': case '9':
22271 return parse_numeric(p, c);
22272
22273 case ')':
22274 COND_POP();
22275 CMDARG_POP();
22276 SET_LEX_STATE(EXPR_ENDFN);
22277 p->lex.paren_nest--;
22278 return c;
22279
22280 case ']':
22281 COND_POP();
22282 CMDARG_POP();
22283 SET_LEX_STATE(EXPR_END);
22284 p->lex.paren_nest--;
22285 return c;
22286
22287 case '}':
22288 /* tSTRING_DEND does COND_POP and CMDARG_POP in the yacc's rule */
22289 if (!p->lex.brace_nest--) return tSTRING_DEND;
22290 COND_POP();
22291 CMDARG_POP();
22292 SET_LEX_STATE(EXPR_END);
22293 p->lex.paren_nest--;
22294 return c;
22295
22296 case ':':
22297 c = nextc(p);
22298 if (c == ':') {
22299 if (IS_BEG() || IS_lex_state(EXPR_CLASS) || IS_SPCARG(-1)) {
22300 SET_LEX_STATE(EXPR_BEG);
22301 return tCOLON3;
22302 }
22303 set_yylval_id(idCOLON2);
22304 SET_LEX_STATE(EXPR_DOT);
22305 return tCOLON2;
22306 }
22307 if (IS_END() || ISSPACE(c) || c == '#') {
22308 pushback(p, c);
22309 c = warn_balanced(':', ":", "symbol literal");
22310 SET_LEX_STATE(EXPR_BEG);
22311 return c;
22312 }
22313 switch (c) {
22314 case '\'':
22315 p->lex.strterm = NEW_STRTERM(str_ssym, c, 0);
22316 break;
22317 case '"':
22318 p->lex.strterm = NEW_STRTERM(str_dsym, c, 0);
22319 break;
22320 default:
22321 pushback(p, c);
22322 break;
22323 }
22324 SET_LEX_STATE(EXPR_FNAME);
22325 return tSYMBEG;
22326
22327 case '/':
22328 if (IS_BEG()) {
22329 p->lex.strterm = NEW_STRTERM(str_regexp, '/', 0);
22330 return tREGEXP_BEG;
22331 }
22332 if ((c = nextc(p)) == '=') {
22333 set_yylval_id('/');
22334 SET_LEX_STATE(EXPR_BEG);
22335 return tOP_ASGN;
22336 }
22337 pushback(p, c);
22338 if (IS_SPCARG(c)) {
22339 arg_ambiguous(p, '/');
22340 p->lex.strterm = NEW_STRTERM(str_regexp, '/', 0);
22341 return tREGEXP_BEG;
22342 }
22343 SET_LEX_STATE(IS_AFTER_OPERATOR() ? EXPR_ARG : EXPR_BEG);
22344 return warn_balanced('/', "/", "regexp literal");
22345
22346 case '^':
22347 if ((c = nextc(p)) == '=') {
22348 set_yylval_id('^');
22349 SET_LEX_STATE(EXPR_BEG);
22350 return tOP_ASGN;
22351 }
22352 SET_LEX_STATE(IS_AFTER_OPERATOR() ? EXPR_ARG : EXPR_BEG);
22353 pushback(p, c);
22354 return '^';
22355
22356 case ';':
22357 SET_LEX_STATE(EXPR_BEG);
22358 p->command_start = TRUE;
22359 return ';';
22360
22361 case ',':
22362 SET_LEX_STATE(EXPR_BEG|EXPR_LABEL);
22363 return ',';
22364
22365 case '~':
22366 if (IS_AFTER_OPERATOR()) {
22367 if ((c = nextc(p)) != '@') {
22368 pushback(p, c);
22369 }
22370 SET_LEX_STATE(EXPR_ARG);
22371 }
22372 else {
22373 SET_LEX_STATE(EXPR_BEG);
22374 }
22375 return '~';
22376
22377 case '(':
22378 if (IS_BEG()) {
22379 c = tLPAREN;
22380 }
22381 else if (!space_seen) {
22382 /* foo( ... ) => method call, no ambiguity */
22383 }
22384 else if (IS_ARG() || IS_lex_state_all(EXPR_END|EXPR_LABEL)) {
22385 c = tLPAREN_ARG;
22386 }
22387 else if (IS_lex_state(EXPR_ENDFN) && !lambda_beginning_p()) {
22388 rb_warning0("parentheses after method name is interpreted as "
22389 "an argument list, not a decomposed argument");
22390 }
22391 p->lex.paren_nest++;
22392 COND_PUSH(0);
22393 CMDARG_PUSH(0);
22394 SET_LEX_STATE(EXPR_BEG|EXPR_LABEL);
22395 return c;
22396
22397 case '[':
22398 p->lex.paren_nest++;
22399 if (IS_AFTER_OPERATOR()) {
22400 if ((c = nextc(p)) == ']') {
22401 p->lex.paren_nest--;
22402 SET_LEX_STATE(EXPR_ARG);
22403 if ((c = nextc(p)) == '=') {
22404 return tASET;
22405 }
22406 pushback(p, c);
22407 return tAREF;
22408 }
22409 pushback(p, c);
22410 SET_LEX_STATE(EXPR_ARG|EXPR_LABEL);
22411 return '[';
22412 }
22413 else if (IS_BEG()) {
22414 c = tLBRACK;
22415 }
22416 else if (IS_ARG() && (space_seen || IS_lex_state(EXPR_LABELED))) {
22417 c = tLBRACK;
22418 }
22419 SET_LEX_STATE(EXPR_BEG|EXPR_LABEL);
22420 COND_PUSH(0);
22421 CMDARG_PUSH(0);
22422 return c;
22423
22424 case '{':
22425 ++p->lex.brace_nest;
22426 if (lambda_beginning_p())
22427 c = tLAMBEG;
22428 else if (IS_lex_state(EXPR_LABELED))
22429 c = tLBRACE; /* hash */
22430 else if (IS_lex_state(EXPR_ARG_ANY | EXPR_END | EXPR_ENDFN))
22431 c = '{'; /* block (primary) */
22432 else if (IS_lex_state(EXPR_ENDARG))
22433 c = tLBRACE_ARG; /* block (expr) */
22434 else
22435 c = tLBRACE; /* hash */
22436 if (c != tLBRACE) {
22437 p->command_start = TRUE;
22438 SET_LEX_STATE(EXPR_BEG);
22439 }
22440 else {
22441 SET_LEX_STATE(EXPR_BEG|EXPR_LABEL);
22442 }
22443 ++p->lex.paren_nest; /* after lambda_beginning_p() */
22444 COND_PUSH(0);
22445 CMDARG_PUSH(0);
22446 return c;
22447
22448 case '\\':
22449 c = nextc(p);
22450 if (c == '\n') {
22451 space_seen = 1;
22452 dispatch_scan_event(p, tSP);
22453 goto retry; /* skip \\n */
22454 }
22455 if (c == ' ') return tSP;
22456 if (ISSPACE(c)) return c;
22457 pushback(p, c);
22458 return '\\';
22459
22460 case '%':
22461 return parse_percent(p, space_seen, last_state);
22462
22463 case '$':
22464 return parse_gvar(p, last_state);
22465
22466 case '@':
22467 return parse_atmark(p, last_state);
22468
22469 case '_':
22470 if (was_bol(p) && whole_match_p(p, "__END__", 7, 0)) {
22471 p->ruby__end__seen = 1;
22472 p->eofp = 1;
22473#ifdef RIPPER
22474 lex_goto_eol(p);
22475 dispatch_scan_event(p, k__END__);
22476#endif
22477 return END_OF_INPUT;
22478 }
22479 newtok(p);
22480 break;
22481
22482 default:
22483 if (!parser_is_identchar(p)) {
22484 compile_error(p, "Invalid char '\\x%02X' in expression", c);
22485 token_flush(p);
22486 goto retry;
22487 }
22488
22489 newtok(p);
22490 break;
22491 }
22492
22493 return parse_ident(p, c, cmd_state);
22494}
22495
22496static enum yytokentype
22497yylex(YYSTYPE *lval, YYLTYPE *yylloc, struct parser_params *p)
22498{
22499 enum yytokentype t;
22500
22501 p->lval = lval;
22502 lval->node = 0;
22503 p->yylloc = yylloc;
22504
22505 t = parser_yylex(p);
22506
22507 if (has_delayed_token(p))
22508 dispatch_delayed_token(p, t);
22509 else if (t != END_OF_INPUT)
22510 dispatch_scan_event(p, t);
22511
22512 return t;
22513}
22514
22515#define LVAR_USED ((ID)1 << (sizeof(ID) * CHAR_BIT - 1))
22516
22517static NODE*
22518node_new_internal(struct parser_params *p, enum node_type type, size_t size, size_t alignment)
22519{
22520 NODE *n = rb_ast_newnode(p->ast, type, size, alignment);
22521
22522 rb_node_init(n, type);
22523 return n;
22524}
22525
22526static NODE *
22527nd_set_loc(NODE *nd, const YYLTYPE *loc)
22528{
22529 nd->nd_loc = *loc;
22530 nd_set_line(nd, loc->beg_pos.lineno);
22531 return nd;
22532}
22533
22534static NODE*
22535node_newnode(struct parser_params *p, enum node_type type, size_t size, size_t alignment, const rb_code_location_t *loc)
22536{
22537 NODE *n = node_new_internal(p, type, size, alignment);
22538
22539 nd_set_loc(n, loc);
22540 nd_set_node_id(n, parser_get_node_id(p));
22541 return n;
22542}
22543
22544#define NODE_NEWNODE(node_type, type, loc) (type *)(node_newnode(p, node_type, sizeof(type), RUBY_ALIGNOF(type), loc))
22545
22546static rb_node_scope_t *
22547rb_node_scope_new(struct parser_params *p, rb_node_args_t *nd_args, NODE *nd_body, NODE *nd_parent, const YYLTYPE *loc)
22548{
22549 rb_ast_id_table_t *nd_tbl;
22550 nd_tbl = local_tbl(p);
22551 rb_node_scope_t *n = NODE_NEWNODE(NODE_SCOPE, rb_node_scope_t, loc);
22552 n->nd_tbl = nd_tbl;
22553 n->nd_body = nd_body;
22554 n->nd_parent = nd_parent;
22555 n->nd_args = nd_args;
22556
22557 return n;
22558}
22559
22560static rb_node_scope_t *
22561rb_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)
22562{
22563 rb_node_scope_t *n = NODE_NEWNODE(NODE_SCOPE, rb_node_scope_t, loc);
22564 n->nd_tbl = nd_tbl;
22565 n->nd_body = nd_body;
22566 n->nd_parent = nd_parent;
22567 n->nd_args = nd_args;
22568
22569 return n;
22570}
22571
22572static rb_node_defn_t *
22573rb_node_defn_new(struct parser_params *p, ID nd_mid, NODE *nd_defn, const YYLTYPE *loc)
22574{
22575 rb_node_defn_t *n = NODE_NEWNODE(NODE_DEFN, rb_node_defn_t, loc);
22576 n->nd_mid = nd_mid;
22577 n->nd_defn = nd_defn;
22578
22579 return n;
22580}
22581
22582static rb_node_defs_t *
22583rb_node_defs_new(struct parser_params *p, NODE *nd_recv, ID nd_mid, NODE *nd_defn, const YYLTYPE *loc)
22584{
22585 rb_node_defs_t *n = NODE_NEWNODE(NODE_DEFS, rb_node_defs_t, loc);
22586 n->nd_recv = nd_recv;
22587 n->nd_mid = nd_mid;
22588 n->nd_defn = nd_defn;
22589
22590 return n;
22591}
22592
22593static rb_node_block_t *
22594rb_node_block_new(struct parser_params *p, NODE *nd_head, const YYLTYPE *loc)
22595{
22596 rb_node_block_t *n = NODE_NEWNODE(NODE_BLOCK, rb_node_block_t, loc);
22597 n->nd_head = nd_head;
22598 n->nd_end = (NODE *)n;
22599 n->nd_next = 0;
22600
22601 return n;
22602}
22603
22604static rb_node_for_t *
22605rb_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)
22606{
22607 rb_node_for_t *n = NODE_NEWNODE(NODE_FOR, rb_node_for_t, loc);
22608 n->nd_body = nd_body;
22609 n->nd_iter = nd_iter;
22610 n->for_keyword_loc = *for_keyword_loc;
22611 n->in_keyword_loc = *in_keyword_loc;
22612 n->do_keyword_loc = *do_keyword_loc;
22613 n->end_keyword_loc = *end_keyword_loc;
22614
22615 return n;
22616}
22617
22618static rb_node_for_masgn_t *
22619rb_node_for_masgn_new(struct parser_params *p, NODE *nd_var, const YYLTYPE *loc)
22620{
22621 rb_node_for_masgn_t *n = NODE_NEWNODE(NODE_FOR_MASGN, rb_node_for_masgn_t, loc);
22622 n->nd_var = nd_var;
22623
22624 return n;
22625}
22626
22627static rb_node_retry_t *
22628rb_node_retry_new(struct parser_params *p, const YYLTYPE *loc)
22629{
22630 rb_node_retry_t *n = NODE_NEWNODE(NODE_RETRY, rb_node_retry_t, loc);
22631
22632 return n;
22633}
22634
22635static rb_node_begin_t *
22636rb_node_begin_new(struct parser_params *p, NODE *nd_body, const YYLTYPE *loc)
22637{
22638 rb_node_begin_t *n = NODE_NEWNODE(NODE_BEGIN, rb_node_begin_t, loc);
22639 n->nd_body = nd_body;
22640
22641 return n;
22642}
22643
22644static rb_node_rescue_t *
22645rb_node_rescue_new(struct parser_params *p, NODE *nd_head, NODE *nd_resq, NODE *nd_else, const YYLTYPE *loc)
22646{
22647 rb_node_rescue_t *n = NODE_NEWNODE(NODE_RESCUE, rb_node_rescue_t, loc);
22648 n->nd_head = nd_head;
22649 n->nd_resq = nd_resq;
22650 n->nd_else = nd_else;
22651
22652 return n;
22653}
22654
22655static rb_node_resbody_t *
22656rb_node_resbody_new(struct parser_params *p, NODE *nd_args, NODE *nd_exc_var, NODE *nd_body, NODE *nd_next, const YYLTYPE *loc)
22657{
22658 rb_node_resbody_t *n = NODE_NEWNODE(NODE_RESBODY, rb_node_resbody_t, loc);
22659 n->nd_args = nd_args;
22660 n->nd_exc_var = nd_exc_var;
22661 n->nd_body = nd_body;
22662 n->nd_next = nd_next;
22663
22664 return n;
22665}
22666
22667static rb_node_ensure_t *
22668rb_node_ensure_new(struct parser_params *p, NODE *nd_head, NODE *nd_ensr, const YYLTYPE *loc)
22669{
22670 rb_node_ensure_t *n = NODE_NEWNODE(NODE_ENSURE, rb_node_ensure_t, loc);
22671 n->nd_head = nd_head;
22672 n->nd_ensr = nd_ensr;
22673
22674 return n;
22675}
22676
22677static rb_node_and_t *
22678rb_node_and_new(struct parser_params *p, NODE *nd_1st, NODE *nd_2nd, const YYLTYPE *loc, const YYLTYPE *operator_loc)
22679{
22680 rb_node_and_t *n = NODE_NEWNODE(NODE_AND, rb_node_and_t, loc);
22681 n->nd_1st = nd_1st;
22682 n->nd_2nd = nd_2nd;
22683 n->operator_loc = *operator_loc;
22684
22685 return n;
22686}
22687
22688static rb_node_or_t *
22689rb_node_or_new(struct parser_params *p, NODE *nd_1st, NODE *nd_2nd, const YYLTYPE *loc, const YYLTYPE *operator_loc)
22690{
22691 rb_node_or_t *n = NODE_NEWNODE(NODE_OR, rb_node_or_t, loc);
22692 n->nd_1st = nd_1st;
22693 n->nd_2nd = nd_2nd;
22694 n->operator_loc = *operator_loc;
22695
22696 return n;
22697}
22698
22699static rb_node_return_t *
22700rb_node_return_new(struct parser_params *p, NODE *nd_stts, const YYLTYPE *loc, const YYLTYPE *keyword_loc)
22701{
22702 rb_node_return_t *n = NODE_NEWNODE(NODE_RETURN, rb_node_return_t, loc);
22703 n->nd_stts = nd_stts;
22704 n->keyword_loc = *keyword_loc;
22705 return n;
22706}
22707
22708static rb_node_yield_t *
22709rb_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)
22710{
22711 if (nd_head) no_blockarg(p, nd_head);
22712
22713 rb_node_yield_t *n = NODE_NEWNODE(NODE_YIELD, rb_node_yield_t, loc);
22714 n->nd_head = nd_head;
22715 n->keyword_loc = *keyword_loc;
22716 n->lparen_loc = *lparen_loc;
22717 n->rparen_loc = *rparen_loc;
22718
22719 return n;
22720}
22721
22722static rb_node_if_t *
22723rb_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)
22724{
22725 rb_node_if_t *n = NODE_NEWNODE(NODE_IF, rb_node_if_t, loc);
22726 n->nd_cond = nd_cond;
22727 n->nd_body = nd_body;
22728 n->nd_else = nd_else;
22729 n->if_keyword_loc = *if_keyword_loc;
22730 n->then_keyword_loc = *then_keyword_loc;
22731 n->end_keyword_loc = *end_keyword_loc;
22732
22733 return n;
22734}
22735
22736static rb_node_unless_t *
22737rb_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)
22738{
22739 rb_node_unless_t *n = NODE_NEWNODE(NODE_UNLESS, rb_node_unless_t, loc);
22740 n->nd_cond = nd_cond;
22741 n->nd_body = nd_body;
22742 n->nd_else = nd_else;
22743 n->keyword_loc = *keyword_loc;
22744 n->then_keyword_loc = *then_keyword_loc;
22745 n->end_keyword_loc = *end_keyword_loc;
22746
22747 return n;
22748}
22749
22750static rb_node_class_t *
22751rb_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)
22752{
22753 /* Keep the order of node creation */
22754 NODE *scope = NEW_SCOPE(0, nd_body, NULL, loc);
22755 rb_node_class_t *n = NODE_NEWNODE(NODE_CLASS, rb_node_class_t, loc);
22756 RNODE_SCOPE(scope)->nd_parent = &n->node;
22757 n->nd_cpath = nd_cpath;
22758 n->nd_body = scope;
22759 n->nd_super = nd_super;
22760 n->class_keyword_loc = *class_keyword_loc;
22761 n->inheritance_operator_loc = *inheritance_operator_loc;
22762 n->end_keyword_loc = *end_keyword_loc;
22763
22764 return n;
22765}
22766
22767static rb_node_sclass_t *
22768rb_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)
22769{
22770 /* Keep the order of node creation */
22771 NODE *scope = NEW_SCOPE(0, nd_body, NULL, loc);
22772 rb_node_sclass_t *n = NODE_NEWNODE(NODE_SCLASS, rb_node_sclass_t, loc);
22773 RNODE_SCOPE(scope)->nd_parent = &n->node;
22774 n->nd_recv = nd_recv;
22775 n->nd_body = scope;
22776 n->class_keyword_loc = *class_keyword_loc;
22777 n->operator_loc = *operator_loc;
22778 n->end_keyword_loc = *end_keyword_loc;
22779
22780 return n;
22781}
22782
22783static rb_node_module_t *
22784rb_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)
22785{
22786 /* Keep the order of node creation */
22787 NODE *scope = NEW_SCOPE(0, nd_body, NULL, loc);
22788 rb_node_module_t *n = NODE_NEWNODE(NODE_MODULE, rb_node_module_t, loc);
22789 RNODE_SCOPE(scope)->nd_parent = &n->node;
22790 n->nd_cpath = nd_cpath;
22791 n->nd_body = scope;
22792 n->module_keyword_loc = *module_keyword_loc;
22793 n->end_keyword_loc = *end_keyword_loc;
22794
22795 return n;
22796}
22797
22798static rb_node_iter_t *
22799rb_node_iter_new(struct parser_params *p, rb_node_args_t *nd_args, NODE *nd_body, const YYLTYPE *loc)
22800{
22801 /* Keep the order of node creation */
22802 NODE *scope = NEW_SCOPE(nd_args, nd_body, NULL, loc);
22803 rb_node_iter_t *n = NODE_NEWNODE(NODE_ITER, rb_node_iter_t, loc);
22804 RNODE_SCOPE(scope)->nd_parent = &n->node;
22805 n->nd_body = scope;
22806 n->nd_iter = 0;
22807
22808 return n;
22809}
22810
22811static rb_node_lambda_t *
22812rb_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)
22813{
22814 /* Keep the order of node creation */
22815 NODE *scope = NEW_SCOPE(nd_args, nd_body, NULL, loc);
22816 YYLTYPE lambda_loc = code_loc_gen(operator_loc, closing_loc);
22817 rb_node_lambda_t *n = NODE_NEWNODE(NODE_LAMBDA, rb_node_lambda_t, &lambda_loc);
22818 RNODE_SCOPE(scope)->nd_parent = &n->node;
22819 n->nd_body = scope;
22820 n->operator_loc = *operator_loc;
22821 n->opening_loc = *opening_loc;
22822 n->closing_loc = *closing_loc;
22823
22824 return n;
22825}
22826
22827static rb_node_case_t *
22828rb_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)
22829{
22830 rb_node_case_t *n = NODE_NEWNODE(NODE_CASE, rb_node_case_t, loc);
22831 n->nd_head = nd_head;
22832 n->nd_body = nd_body;
22833 n->case_keyword_loc = *case_keyword_loc;
22834 n->end_keyword_loc = *end_keyword_loc;
22835
22836 return n;
22837}
22838
22839static rb_node_case2_t *
22840rb_node_case2_new(struct parser_params *p, NODE *nd_body, const YYLTYPE *loc, const YYLTYPE *case_keyword_loc, const YYLTYPE *end_keyword_loc)
22841{
22842 rb_node_case2_t *n = NODE_NEWNODE(NODE_CASE2, rb_node_case2_t, loc);
22843 n->nd_head = 0;
22844 n->nd_body = nd_body;
22845 n->case_keyword_loc = *case_keyword_loc;
22846 n->end_keyword_loc = *end_keyword_loc;
22847
22848 return n;
22849}
22850
22851static rb_node_case3_t *
22852rb_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)
22853{
22854 rb_node_case3_t *n = NODE_NEWNODE(NODE_CASE3, rb_node_case3_t, loc);
22855 n->nd_head = nd_head;
22856 n->nd_body = nd_body;
22857 n->case_keyword_loc = *case_keyword_loc;
22858 n->end_keyword_loc = *end_keyword_loc;
22859
22860 return n;
22861}
22862
22863static rb_node_when_t *
22864rb_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)
22865{
22866 rb_node_when_t *n = NODE_NEWNODE(NODE_WHEN, rb_node_when_t, loc);
22867 n->nd_head = nd_head;
22868 n->nd_body = nd_body;
22869 n->nd_next = nd_next;
22870 n->keyword_loc = *keyword_loc;
22871 n->then_keyword_loc = *then_keyword_loc;
22872
22873 return n;
22874}
22875
22876static rb_node_in_t *
22877rb_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)
22878{
22879 rb_node_in_t *n = NODE_NEWNODE(NODE_IN, rb_node_in_t, loc);
22880 n->nd_head = nd_head;
22881 n->nd_body = nd_body;
22882 n->nd_next = nd_next;
22883 n->in_keyword_loc = *in_keyword_loc;
22884 n->then_keyword_loc = *then_keyword_loc;
22885 n->operator_loc = *operator_loc;
22886
22887 return n;
22888}
22889
22890static rb_node_while_t *
22891rb_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)
22892{
22893 rb_node_while_t *n = NODE_NEWNODE(NODE_WHILE, rb_node_while_t, loc);
22894 n->nd_cond = nd_cond;
22895 n->nd_body = nd_body;
22896 n->nd_state = nd_state;
22897 n->keyword_loc = *keyword_loc;
22898 n->closing_loc = *closing_loc;
22899
22900 return n;
22901}
22902
22903static rb_node_until_t *
22904rb_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)
22905{
22906 rb_node_until_t *n = NODE_NEWNODE(NODE_UNTIL, rb_node_until_t, loc);
22907 n->nd_cond = nd_cond;
22908 n->nd_body = nd_body;
22909 n->nd_state = nd_state;
22910 n->keyword_loc = *keyword_loc;
22911 n->closing_loc = *closing_loc;
22912
22913 return n;
22914}
22915
22916static rb_node_colon2_t *
22917rb_node_colon2_new(struct parser_params *p, NODE *nd_head, ID nd_mid, const YYLTYPE *loc, const YYLTYPE *delimiter_loc, const YYLTYPE *name_loc)
22918{
22919 rb_node_colon2_t *n = NODE_NEWNODE(NODE_COLON2, rb_node_colon2_t, loc);
22920 n->nd_head = nd_head;
22921 n->nd_mid = nd_mid;
22922 n->delimiter_loc = *delimiter_loc;
22923 n->name_loc = *name_loc;
22924
22925 return n;
22926}
22927
22928static rb_node_colon3_t *
22929rb_node_colon3_new(struct parser_params *p, ID nd_mid, const YYLTYPE *loc, const YYLTYPE *delimiter_loc, const YYLTYPE *name_loc)
22930{
22931 rb_node_colon3_t *n = NODE_NEWNODE(NODE_COLON3, rb_node_colon3_t, loc);
22932 n->nd_mid = nd_mid;
22933 n->delimiter_loc = *delimiter_loc;
22934 n->name_loc = *name_loc;
22935
22936 return n;
22937}
22938
22939static rb_node_dot2_t *
22940rb_node_dot2_new(struct parser_params *p, NODE *nd_beg, NODE *nd_end, const YYLTYPE *loc, const YYLTYPE *operator_loc)
22941{
22942 rb_node_dot2_t *n = NODE_NEWNODE(NODE_DOT2, rb_node_dot2_t, loc);
22943 n->nd_beg = nd_beg;
22944 n->nd_end = nd_end;
22945 n->operator_loc = *operator_loc;
22946
22947 return n;
22948}
22949
22950static rb_node_dot3_t *
22951rb_node_dot3_new(struct parser_params *p, NODE *nd_beg, NODE *nd_end, const YYLTYPE *loc, const YYLTYPE *operator_loc)
22952{
22953 rb_node_dot3_t *n = NODE_NEWNODE(NODE_DOT3, rb_node_dot3_t, loc);
22954 n->nd_beg = nd_beg;
22955 n->nd_end = nd_end;
22956 n->operator_loc = *operator_loc;
22957
22958 return n;
22959}
22960
22961static rb_node_self_t *
22962rb_node_self_new(struct parser_params *p, const YYLTYPE *loc)
22963{
22964 rb_node_self_t *n = NODE_NEWNODE(NODE_SELF, rb_node_self_t, loc);
22965 n->nd_state = 1;
22966
22967 return n;
22968}
22969
22970static rb_node_nil_t *
22971rb_node_nil_new(struct parser_params *p, const YYLTYPE *loc)
22972{
22973 rb_node_nil_t *n = NODE_NEWNODE(NODE_NIL, rb_node_nil_t, loc);
22974
22975 return n;
22976}
22977
22978static rb_node_true_t *
22979rb_node_true_new(struct parser_params *p, const YYLTYPE *loc)
22980{
22981 rb_node_true_t *n = NODE_NEWNODE(NODE_TRUE, rb_node_true_t, loc);
22982
22983 return n;
22984}
22985
22986static rb_node_false_t *
22987rb_node_false_new(struct parser_params *p, const YYLTYPE *loc)
22988{
22989 rb_node_false_t *n = NODE_NEWNODE(NODE_FALSE, rb_node_false_t, loc);
22990
22991 return n;
22992}
22993
22994static rb_node_super_t *
22995rb_node_super_new(struct parser_params *p, NODE *nd_args, const YYLTYPE *loc,
22996 const YYLTYPE *keyword_loc, const YYLTYPE *lparen_loc, const YYLTYPE *rparen_loc)
22997{
22998 rb_node_super_t *n = NODE_NEWNODE(NODE_SUPER, rb_node_super_t, loc);
22999 n->nd_args = nd_args;
23000 n->keyword_loc = *keyword_loc;
23001 n->lparen_loc = *lparen_loc;
23002 n->rparen_loc = *rparen_loc;
23003
23004 return n;
23005}
23006
23007static rb_node_zsuper_t *
23008rb_node_zsuper_new(struct parser_params *p, const YYLTYPE *loc)
23009{
23010 rb_node_zsuper_t *n = NODE_NEWNODE(NODE_ZSUPER, rb_node_zsuper_t, loc);
23011
23012 return n;
23013}
23014
23015static rb_node_match2_t *
23016rb_node_match2_new(struct parser_params *p, NODE *nd_recv, NODE *nd_value, const YYLTYPE *loc)
23017{
23018 rb_node_match2_t *n = NODE_NEWNODE(NODE_MATCH2, rb_node_match2_t, loc);
23019 n->nd_recv = nd_recv;
23020 n->nd_value = nd_value;
23021 n->nd_args = 0;
23022
23023 return n;
23024}
23025
23026static rb_node_match3_t *
23027rb_node_match3_new(struct parser_params *p, NODE *nd_recv, NODE *nd_value, const YYLTYPE *loc)
23028{
23029 rb_node_match3_t *n = NODE_NEWNODE(NODE_MATCH3, rb_node_match3_t, loc);
23030 n->nd_recv = nd_recv;
23031 n->nd_value = nd_value;
23032
23033 return n;
23034}
23035
23036/* TODO: Use union for NODE_LIST2 */
23037static rb_node_list_t *
23038rb_node_list_new(struct parser_params *p, NODE *nd_head, const YYLTYPE *loc)
23039{
23040 rb_node_list_t *n = NODE_NEWNODE(NODE_LIST, rb_node_list_t, loc);
23041 n->nd_head = nd_head;
23042 n->as.nd_alen = 1;
23043 n->nd_next = 0;
23044
23045 return n;
23046}
23047
23048static rb_node_list_t *
23049rb_node_list_new2(struct parser_params *p, NODE *nd_head, long nd_alen, NODE *nd_next, const YYLTYPE *loc)
23050{
23051 rb_node_list_t *n = NODE_NEWNODE(NODE_LIST, rb_node_list_t, loc);
23052 n->nd_head = nd_head;
23053 n->as.nd_alen = nd_alen;
23054 n->nd_next = nd_next;
23055
23056 return n;
23057}
23058
23059static rb_node_zlist_t *
23060rb_node_zlist_new(struct parser_params *p, const YYLTYPE *loc)
23061{
23062 rb_node_zlist_t *n = NODE_NEWNODE(NODE_ZLIST, rb_node_zlist_t, loc);
23063
23064 return n;
23065}
23066
23067static rb_node_hash_t *
23068rb_node_hash_new(struct parser_params *p, NODE *nd_head, const YYLTYPE *loc)
23069{
23070 rb_node_hash_t *n = NODE_NEWNODE(NODE_HASH, rb_node_hash_t, loc);
23071 n->nd_head = nd_head;
23072 n->nd_brace = 0;
23073
23074 return n;
23075}
23076
23077static rb_node_masgn_t *
23078rb_node_masgn_new(struct parser_params *p, NODE *nd_head, NODE *nd_args, const YYLTYPE *loc)
23079{
23080 rb_node_masgn_t *n = NODE_NEWNODE(NODE_MASGN, rb_node_masgn_t, loc);
23081 n->nd_head = nd_head;
23082 n->nd_value = 0;
23083 n->nd_args = nd_args;
23084
23085 return n;
23086}
23087
23088static rb_node_gasgn_t *
23089rb_node_gasgn_new(struct parser_params *p, ID nd_vid, NODE *nd_value, const YYLTYPE *loc)
23090{
23091 rb_node_gasgn_t *n = NODE_NEWNODE(NODE_GASGN, rb_node_gasgn_t, loc);
23092 n->nd_vid = nd_vid;
23093 n->nd_value = nd_value;
23094
23095 return n;
23096}
23097
23098static rb_node_lasgn_t *
23099rb_node_lasgn_new(struct parser_params *p, ID nd_vid, NODE *nd_value, const YYLTYPE *loc)
23100{
23101 rb_node_lasgn_t *n = NODE_NEWNODE(NODE_LASGN, rb_node_lasgn_t, loc);
23102 n->nd_vid = nd_vid;
23103 n->nd_value = nd_value;
23104
23105 return n;
23106}
23107
23108static rb_node_dasgn_t *
23109rb_node_dasgn_new(struct parser_params *p, ID nd_vid, NODE *nd_value, const YYLTYPE *loc)
23110{
23111 rb_node_dasgn_t *n = NODE_NEWNODE(NODE_DASGN, rb_node_dasgn_t, loc);
23112 n->nd_vid = nd_vid;
23113 n->nd_value = nd_value;
23114
23115 return n;
23116}
23117
23118static rb_node_iasgn_t *
23119rb_node_iasgn_new(struct parser_params *p, ID nd_vid, NODE *nd_value, const YYLTYPE *loc)
23120{
23121 rb_node_iasgn_t *n = NODE_NEWNODE(NODE_IASGN, rb_node_iasgn_t, loc);
23122 n->nd_vid = nd_vid;
23123 n->nd_value = nd_value;
23124
23125 return n;
23126}
23127
23128static rb_node_cvasgn_t *
23129rb_node_cvasgn_new(struct parser_params *p, ID nd_vid, NODE *nd_value, const YYLTYPE *loc)
23130{
23131 rb_node_cvasgn_t *n = NODE_NEWNODE(NODE_CVASGN, rb_node_cvasgn_t, loc);
23132 n->nd_vid = nd_vid;
23133 n->nd_value = nd_value;
23134
23135 return n;
23136}
23137
23138static rb_node_op_asgn1_t *
23139rb_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)
23140{
23141 rb_node_op_asgn1_t *n = NODE_NEWNODE(NODE_OP_ASGN1, rb_node_op_asgn1_t, loc);
23142 n->nd_recv = nd_recv;
23143 n->nd_mid = nd_mid;
23144 n->nd_index = index;
23145 n->nd_rvalue = rvalue;
23146 n->call_operator_loc = *call_operator_loc;
23147 n->opening_loc = *opening_loc;
23148 n->closing_loc = *closing_loc;
23149 n->binary_operator_loc = *binary_operator_loc;
23150
23151 return n;
23152}
23153
23154static rb_node_op_asgn2_t *
23155rb_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)
23156{
23157 rb_node_op_asgn2_t *n = NODE_NEWNODE(NODE_OP_ASGN2, rb_node_op_asgn2_t, loc);
23158 n->nd_recv = nd_recv;
23159 n->nd_value = nd_value;
23160 n->nd_vid = nd_vid;
23161 n->nd_mid = nd_mid;
23162 n->nd_aid = nd_aid;
23163 n->call_operator_loc = *call_operator_loc;
23164 n->message_loc = *message_loc;
23165 n->binary_operator_loc = *binary_operator_loc;
23166
23167 return n;
23168}
23169
23170static rb_node_op_asgn_or_t *
23171rb_node_op_asgn_or_new(struct parser_params *p, NODE *nd_head, NODE *nd_value, const YYLTYPE *loc)
23172{
23173 rb_node_op_asgn_or_t *n = NODE_NEWNODE(NODE_OP_ASGN_OR, rb_node_op_asgn_or_t, loc);
23174 n->nd_head = nd_head;
23175 n->nd_value = nd_value;
23176
23177 return n;
23178}
23179
23180static rb_node_op_asgn_and_t *
23181rb_node_op_asgn_and_new(struct parser_params *p, NODE *nd_head, NODE *nd_value, const YYLTYPE *loc)
23182{
23183 rb_node_op_asgn_and_t *n = NODE_NEWNODE(NODE_OP_ASGN_AND, rb_node_op_asgn_and_t, loc);
23184 n->nd_head = nd_head;
23185 n->nd_value = nd_value;
23186
23187 return n;
23188}
23189
23190static rb_node_gvar_t *
23191rb_node_gvar_new(struct parser_params *p, ID nd_vid, const YYLTYPE *loc)
23192{
23193 rb_node_gvar_t *n = NODE_NEWNODE(NODE_GVAR, rb_node_gvar_t, loc);
23194 n->nd_vid = nd_vid;
23195
23196 return n;
23197}
23198
23199static rb_node_lvar_t *
23200rb_node_lvar_new(struct parser_params *p, ID nd_vid, const YYLTYPE *loc)
23201{
23202 rb_node_lvar_t *n = NODE_NEWNODE(NODE_LVAR, rb_node_lvar_t, loc);
23203 n->nd_vid = nd_vid;
23204
23205 return n;
23206}
23207
23208static rb_node_dvar_t *
23209rb_node_dvar_new(struct parser_params *p, ID nd_vid, const YYLTYPE *loc)
23210{
23211 rb_node_dvar_t *n = NODE_NEWNODE(NODE_DVAR, rb_node_dvar_t, loc);
23212 n->nd_vid = nd_vid;
23213
23214 return n;
23215}
23216
23217static rb_node_ivar_t *
23218rb_node_ivar_new(struct parser_params *p, ID nd_vid, const YYLTYPE *loc)
23219{
23220 rb_node_ivar_t *n = NODE_NEWNODE(NODE_IVAR, rb_node_ivar_t, loc);
23221 n->nd_vid = nd_vid;
23222
23223 return n;
23224}
23225
23226static rb_node_const_t *
23227rb_node_const_new(struct parser_params *p, ID nd_vid, const YYLTYPE *loc)
23228{
23229 rb_node_const_t *n = NODE_NEWNODE(NODE_CONST, rb_node_const_t, loc);
23230 n->nd_vid = nd_vid;
23231
23232 return n;
23233}
23234
23235static rb_node_cvar_t *
23236rb_node_cvar_new(struct parser_params *p, ID nd_vid, const YYLTYPE *loc)
23237{
23238 rb_node_cvar_t *n = NODE_NEWNODE(NODE_CVAR, rb_node_cvar_t, loc);
23239 n->nd_vid = nd_vid;
23240
23241 return n;
23242}
23243
23244static rb_node_nth_ref_t *
23245rb_node_nth_ref_new(struct parser_params *p, long nd_nth, const YYLTYPE *loc)
23246{
23247 rb_node_nth_ref_t *n = NODE_NEWNODE(NODE_NTH_REF, rb_node_nth_ref_t, loc);
23248 n->nd_nth = nd_nth;
23249
23250 return n;
23251}
23252
23253static rb_node_back_ref_t *
23254rb_node_back_ref_new(struct parser_params *p, long nd_nth, const YYLTYPE *loc)
23255{
23256 rb_node_back_ref_t *n = NODE_NEWNODE(NODE_BACK_REF, rb_node_back_ref_t, loc);
23257 n->nd_nth = nd_nth;
23258
23259 return n;
23260}
23261
23262static rb_node_integer_t *
23263rb_node_integer_new(struct parser_params *p, char* val, int base, const YYLTYPE *loc)
23264{
23265 rb_node_integer_t *n = NODE_NEWNODE(NODE_INTEGER, rb_node_integer_t, loc);
23266 n->val = val;
23267 n->minus = FALSE;
23268 n->base = base;
23269
23270 return n;
23271}
23272
23273static rb_node_float_t *
23274rb_node_float_new(struct parser_params *p, char* val, const YYLTYPE *loc)
23275{
23276 rb_node_float_t *n = NODE_NEWNODE(NODE_FLOAT, rb_node_float_t, loc);
23277 n->val = val;
23278 n->minus = FALSE;
23279
23280 return n;
23281}
23282
23283static rb_node_rational_t *
23284rb_node_rational_new(struct parser_params *p, char* val, int base, int seen_point, const YYLTYPE *loc)
23285{
23286 rb_node_rational_t *n = NODE_NEWNODE(NODE_RATIONAL, rb_node_rational_t, loc);
23287 n->val = val;
23288 n->minus = FALSE;
23289 n->base = base;
23290 n->seen_point = seen_point;
23291
23292 return n;
23293}
23294
23295static rb_node_imaginary_t *
23296rb_node_imaginary_new(struct parser_params *p, char* val, int base, int seen_point, enum rb_numeric_type numeric_type, const YYLTYPE *loc)
23297{
23298 rb_node_imaginary_t *n = NODE_NEWNODE(NODE_IMAGINARY, rb_node_imaginary_t, loc);
23299 n->val = val;
23300 n->minus = FALSE;
23301 n->base = base;
23302 n->seen_point = seen_point;
23303 n->type = numeric_type;
23304
23305 return n;
23306}
23307
23308static rb_node_str_t *
23309rb_node_str_new(struct parser_params *p, rb_parser_string_t *string, const YYLTYPE *loc)
23310{
23311 rb_node_str_t *n = NODE_NEWNODE(NODE_STR, rb_node_str_t, loc);
23312 n->string = string;
23313
23314 return n;
23315}
23316
23317/* TODO; Use union for NODE_DSTR2 */
23318static rb_node_dstr_t *
23319rb_node_dstr_new0(struct parser_params *p, rb_parser_string_t *string, long nd_alen, NODE *nd_next, const YYLTYPE *loc)
23320{
23321 rb_node_dstr_t *n = NODE_NEWNODE(NODE_DSTR, rb_node_dstr_t, loc);
23322 n->string = string;
23323 n->as.nd_alen = nd_alen;
23324 n->nd_next = (rb_node_list_t *)nd_next;
23325
23326 return n;
23327}
23328
23329static rb_node_dstr_t *
23330rb_node_dstr_new(struct parser_params *p, rb_parser_string_t *string, const YYLTYPE *loc)
23331{
23332 return rb_node_dstr_new0(p, string, 1, 0, loc);
23333}
23334
23335static rb_node_xstr_t *
23336rb_node_xstr_new(struct parser_params *p, rb_parser_string_t *string, const YYLTYPE *loc)
23337{
23338 rb_node_xstr_t *n = NODE_NEWNODE(NODE_XSTR, rb_node_xstr_t, loc);
23339 n->string = string;
23340
23341 return n;
23342}
23343
23344static rb_node_dxstr_t *
23345rb_node_dxstr_new(struct parser_params *p, rb_parser_string_t *string, long nd_alen, NODE *nd_next, const YYLTYPE *loc)
23346{
23347 rb_node_dxstr_t *n = NODE_NEWNODE(NODE_DXSTR, rb_node_dxstr_t, loc);
23348 n->string = string;
23349 n->as.nd_alen = nd_alen;
23350 n->nd_next = (rb_node_list_t *)nd_next;
23351
23352 return n;
23353}
23354
23355static rb_node_sym_t *
23356rb_node_sym_new(struct parser_params *p, VALUE str, const YYLTYPE *loc)
23357{
23358 rb_node_sym_t *n = NODE_NEWNODE(NODE_SYM, rb_node_sym_t, loc);
23359 n->string = rb_str_to_parser_string(p, str);
23360
23361 return n;
23362}
23363
23364static rb_node_dsym_t *
23365rb_node_dsym_new(struct parser_params *p, rb_parser_string_t *string, long nd_alen, NODE *nd_next, const YYLTYPE *loc)
23366{
23367 rb_node_dsym_t *n = NODE_NEWNODE(NODE_DSYM, rb_node_dsym_t, loc);
23368 n->string = string;
23369 n->as.nd_alen = nd_alen;
23370 n->nd_next = (rb_node_list_t *)nd_next;
23371
23372 return n;
23373}
23374
23375static rb_node_evstr_t *
23376rb_node_evstr_new(struct parser_params *p, NODE *nd_body, const YYLTYPE *loc, const YYLTYPE *opening_loc, const YYLTYPE *closing_loc)
23377{
23378 rb_node_evstr_t *n = NODE_NEWNODE(NODE_EVSTR, rb_node_evstr_t, loc);
23379 n->nd_body = nd_body;
23380 n->opening_loc = *opening_loc;
23381 n->closing_loc = *closing_loc;
23382
23383 return n;
23384}
23385
23386static rb_node_regx_t *
23387rb_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)
23388{
23389 rb_node_regx_t *n = NODE_NEWNODE(NODE_REGX, rb_node_regx_t, loc);
23390 n->string = string;
23391 n->options = options & RE_OPTION_MASK;
23392 n->opening_loc = *opening_loc;
23393 n->content_loc = *content_loc;
23394 n->closing_loc = *closing_loc;
23395
23396 return n;
23397}
23398
23399static rb_node_call_t *
23400rb_node_call_new(struct parser_params *p, NODE *nd_recv, ID nd_mid, NODE *nd_args, const YYLTYPE *loc)
23401{
23402 rb_node_call_t *n = NODE_NEWNODE(NODE_CALL, rb_node_call_t, loc);
23403 n->nd_recv = nd_recv;
23404 n->nd_mid = nd_mid;
23405 n->nd_args = nd_args;
23406
23407 return n;
23408}
23409
23410static rb_node_opcall_t *
23411rb_node_opcall_new(struct parser_params *p, NODE *nd_recv, ID nd_mid, NODE *nd_args, const YYLTYPE *loc)
23412{
23413 rb_node_opcall_t *n = NODE_NEWNODE(NODE_OPCALL, rb_node_opcall_t, loc);
23414 n->nd_recv = nd_recv;
23415 n->nd_mid = nd_mid;
23416 n->nd_args = nd_args;
23417
23418 return n;
23419}
23420
23421static rb_node_fcall_t *
23422rb_node_fcall_new(struct parser_params *p, ID nd_mid, NODE *nd_args, const YYLTYPE *loc)
23423{
23424 rb_node_fcall_t *n = NODE_NEWNODE(NODE_FCALL, rb_node_fcall_t, loc);
23425 n->nd_mid = nd_mid;
23426 n->nd_args = nd_args;
23427
23428 return n;
23429}
23430
23431static rb_node_qcall_t *
23432rb_node_qcall_new(struct parser_params *p, NODE *nd_recv, ID nd_mid, NODE *nd_args, const YYLTYPE *loc)
23433{
23434 rb_node_qcall_t *n = NODE_NEWNODE(NODE_QCALL, rb_node_qcall_t, loc);
23435 n->nd_recv = nd_recv;
23436 n->nd_mid = nd_mid;
23437 n->nd_args = nd_args;
23438
23439 return n;
23440}
23441
23442static rb_node_vcall_t *
23443rb_node_vcall_new(struct parser_params *p, ID nd_mid, const YYLTYPE *loc)
23444{
23445 rb_node_vcall_t *n = NODE_NEWNODE(NODE_VCALL, rb_node_vcall_t, loc);
23446 n->nd_mid = nd_mid;
23447
23448 return n;
23449}
23450
23451static rb_node_once_t *
23452rb_node_once_new(struct parser_params *p, NODE *nd_body, const YYLTYPE *loc)
23453{
23454 rb_node_once_t *n = NODE_NEWNODE(NODE_ONCE, rb_node_once_t, loc);
23455 n->nd_body = nd_body;
23456
23457 return n;
23458}
23459
23460static rb_node_args_t *
23461rb_node_args_new(struct parser_params *p, const YYLTYPE *loc)
23462{
23463 rb_node_args_t *n = NODE_NEWNODE(NODE_ARGS, rb_node_args_t, loc);
23464 MEMZERO(&n->nd_ainfo, struct rb_args_info, 1);
23465
23466 return n;
23467}
23468
23469static rb_node_args_aux_t *
23470rb_node_args_aux_new(struct parser_params *p, ID nd_pid, int nd_plen, const YYLTYPE *loc)
23471{
23472 rb_node_args_aux_t *n = NODE_NEWNODE(NODE_ARGS_AUX, rb_node_args_aux_t, loc);
23473 n->nd_pid = nd_pid;
23474 n->nd_plen = nd_plen;
23475 n->nd_next = 0;
23476
23477 return n;
23478}
23479
23480static rb_node_opt_arg_t *
23481rb_node_opt_arg_new(struct parser_params *p, NODE *nd_body, const YYLTYPE *loc)
23482{
23483 rb_node_opt_arg_t *n = NODE_NEWNODE(NODE_OPT_ARG, rb_node_opt_arg_t, loc);
23484 n->nd_body = nd_body;
23485 n->nd_next = 0;
23486
23487 return n;
23488}
23489
23490static rb_node_kw_arg_t *
23491rb_node_kw_arg_new(struct parser_params *p, NODE *nd_body, const YYLTYPE *loc)
23492{
23493 rb_node_kw_arg_t *n = NODE_NEWNODE(NODE_KW_ARG, rb_node_kw_arg_t, loc);
23494 n->nd_body = nd_body;
23495 n->nd_next = 0;
23496
23497 return n;
23498}
23499
23500static rb_node_postarg_t *
23501rb_node_postarg_new(struct parser_params *p, NODE *nd_1st, NODE *nd_2nd, const YYLTYPE *loc)
23502{
23503 rb_node_postarg_t *n = NODE_NEWNODE(NODE_POSTARG, rb_node_postarg_t, loc);
23504 n->nd_1st = nd_1st;
23505 n->nd_2nd = nd_2nd;
23506
23507 return n;
23508}
23509
23510static rb_node_argscat_t *
23511rb_node_argscat_new(struct parser_params *p, NODE *nd_head, NODE *nd_body, const YYLTYPE *loc)
23512{
23513 rb_node_argscat_t *n = NODE_NEWNODE(NODE_ARGSCAT, rb_node_argscat_t, loc);
23514 n->nd_head = nd_head;
23515 n->nd_body = nd_body;
23516
23517 return n;
23518}
23519
23520static rb_node_argspush_t *
23521rb_node_argspush_new(struct parser_params *p, NODE *nd_head, NODE *nd_body, const YYLTYPE *loc)
23522{
23523 rb_node_argspush_t *n = NODE_NEWNODE(NODE_ARGSPUSH, rb_node_argspush_t, loc);
23524 n->nd_head = nd_head;
23525 n->nd_body = nd_body;
23526
23527 return n;
23528}
23529
23530static rb_node_splat_t *
23531rb_node_splat_new(struct parser_params *p, NODE *nd_head, const YYLTYPE *loc, const YYLTYPE *operator_loc)
23532{
23533 rb_node_splat_t *n = NODE_NEWNODE(NODE_SPLAT, rb_node_splat_t, loc);
23534 n->nd_head = nd_head;
23535 n->operator_loc = *operator_loc;
23536
23537 return n;
23538}
23539
23540static rb_node_block_pass_t *
23541rb_node_block_pass_new(struct parser_params *p, NODE *nd_body, const YYLTYPE *loc, const YYLTYPE *operator_loc)
23542{
23543 rb_node_block_pass_t *n = NODE_NEWNODE(NODE_BLOCK_PASS, rb_node_block_pass_t, loc);
23544 n->forwarding = 0;
23545 n->nd_head = 0;
23546 n->nd_body = nd_body;
23547 n->operator_loc = *operator_loc;
23548
23549 return n;
23550}
23551
23552static rb_node_alias_t *
23553rb_node_alias_new(struct parser_params *p, NODE *nd_1st, NODE *nd_2nd, const YYLTYPE *loc, const YYLTYPE *keyword_loc)
23554{
23555 rb_node_alias_t *n = NODE_NEWNODE(NODE_ALIAS, rb_node_alias_t, loc);
23556 n->nd_1st = nd_1st;
23557 n->nd_2nd = nd_2nd;
23558 n->keyword_loc = *keyword_loc;
23559
23560 return n;
23561}
23562
23563static rb_node_valias_t *
23564rb_node_valias_new(struct parser_params *p, ID nd_alias, ID nd_orig, const YYLTYPE *loc, const YYLTYPE *keyword_loc)
23565{
23566 rb_node_valias_t *n = NODE_NEWNODE(NODE_VALIAS, rb_node_valias_t, loc);
23567 n->nd_alias = nd_alias;
23568 n->nd_orig = nd_orig;
23569 n->keyword_loc = *keyword_loc;
23570
23571 return n;
23572}
23573
23574static rb_node_undef_t *
23575rb_node_undef_new(struct parser_params *p, NODE *nd_undef, const YYLTYPE *loc)
23576{
23577 rb_node_undef_t *n = NODE_NEWNODE(NODE_UNDEF, rb_node_undef_t, loc);
23578 n->nd_undefs = rb_parser_ary_new_capa_for_node(p, 1);
23579 n->keyword_loc = NULL_LOC;
23580 rb_parser_ary_push_node(p, n->nd_undefs, nd_undef);
23581
23582 return n;
23583}
23584
23585static rb_node_errinfo_t *
23586rb_node_errinfo_new(struct parser_params *p, const YYLTYPE *loc)
23587{
23588 rb_node_errinfo_t *n = NODE_NEWNODE(NODE_ERRINFO, rb_node_errinfo_t, loc);
23589
23590 return n;
23591}
23592
23593static rb_node_defined_t *
23594rb_node_defined_new(struct parser_params *p, NODE *nd_head, const YYLTYPE *loc, const YYLTYPE *keyword_loc)
23595{
23596 rb_node_defined_t *n = NODE_NEWNODE(NODE_DEFINED, rb_node_defined_t, loc);
23597 n->nd_head = nd_head;
23598 n->keyword_loc = *keyword_loc;
23599
23600 return n;
23601}
23602
23603static rb_node_postexe_t *
23604rb_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)
23605{
23606 rb_node_postexe_t *n = NODE_NEWNODE(NODE_POSTEXE, rb_node_postexe_t, loc);
23607 n->nd_body = nd_body;
23608 n->keyword_loc = *keyword_loc;
23609 n->opening_loc = *opening_loc;
23610 n->closing_loc = *closing_loc;
23611
23612 return n;
23613}
23614
23615static rb_node_attrasgn_t *
23616rb_node_attrasgn_new(struct parser_params *p, NODE *nd_recv, ID nd_mid, NODE *nd_args, const YYLTYPE *loc)
23617{
23618 rb_node_attrasgn_t *n = NODE_NEWNODE(NODE_ATTRASGN, rb_node_attrasgn_t, loc);
23619 n->nd_recv = nd_recv;
23620 n->nd_mid = nd_mid;
23621 n->nd_args = nd_args;
23622
23623 return n;
23624}
23625
23626static rb_node_aryptn_t *
23627rb_node_aryptn_new(struct parser_params *p, NODE *pre_args, NODE *rest_arg, NODE *post_args, const YYLTYPE *loc)
23628{
23629 rb_node_aryptn_t *n = NODE_NEWNODE(NODE_ARYPTN, rb_node_aryptn_t, loc);
23630 n->nd_pconst = 0;
23631 n->pre_args = pre_args;
23632 n->rest_arg = rest_arg;
23633 n->post_args = post_args;
23634
23635 return n;
23636}
23637
23638static rb_node_hshptn_t *
23639rb_node_hshptn_new(struct parser_params *p, NODE *nd_pconst, NODE *nd_pkwargs, NODE *nd_pkwrestarg, const YYLTYPE *loc)
23640{
23641 rb_node_hshptn_t *n = NODE_NEWNODE(NODE_HSHPTN, rb_node_hshptn_t, loc);
23642 n->nd_pconst = nd_pconst;
23643 n->nd_pkwargs = nd_pkwargs;
23644 n->nd_pkwrestarg = nd_pkwrestarg;
23645
23646 return n;
23647}
23648
23649static rb_node_fndptn_t *
23650rb_node_fndptn_new(struct parser_params *p, NODE *pre_rest_arg, NODE *args, NODE *post_rest_arg, const YYLTYPE *loc)
23651{
23652 rb_node_fndptn_t *n = NODE_NEWNODE(NODE_FNDPTN, rb_node_fndptn_t, loc);
23653 n->nd_pconst = 0;
23654 n->pre_rest_arg = pre_rest_arg;
23655 n->args = args;
23656 n->post_rest_arg = post_rest_arg;
23657
23658 return n;
23659}
23660
23661static rb_node_line_t *
23662rb_node_line_new(struct parser_params *p, const YYLTYPE *loc)
23663{
23664 rb_node_line_t *n = NODE_NEWNODE(NODE_LINE, rb_node_line_t, loc);
23665
23666 return n;
23667}
23668
23669static rb_node_file_t *
23670rb_node_file_new(struct parser_params *p, VALUE str, const YYLTYPE *loc)
23671{
23672 rb_node_file_t *n = NODE_NEWNODE(NODE_FILE, rb_node_file_t, loc);
23673 n->path = rb_str_to_parser_string(p, str);
23674
23675 return n;
23676}
23677
23678static rb_node_encoding_t *
23679rb_node_encoding_new(struct parser_params *p, const YYLTYPE *loc)
23680{
23681 rb_node_encoding_t *n = NODE_NEWNODE(NODE_ENCODING, rb_node_encoding_t, loc);
23682 n->enc = p->enc;
23683
23684 return n;
23685}
23686
23687static rb_node_cdecl_t *
23688rb_node_cdecl_new(struct parser_params *p, ID nd_vid, NODE *nd_value, NODE *nd_else, enum rb_parser_shareability shareability, const YYLTYPE *loc)
23689{
23690 rb_node_cdecl_t *n = NODE_NEWNODE(NODE_CDECL, rb_node_cdecl_t, loc);
23691 n->nd_vid = nd_vid;
23692 n->nd_value = nd_value;
23693 n->nd_else = nd_else;
23694 n->shareability = shareability;
23695
23696 return n;
23697}
23698
23699static rb_node_op_cdecl_t *
23700rb_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)
23701{
23702 rb_node_op_cdecl_t *n = NODE_NEWNODE(NODE_OP_CDECL, rb_node_op_cdecl_t, loc);
23703 n->nd_head = nd_head;
23704 n->nd_value = nd_value;
23705 n->nd_aid = nd_aid;
23706 n->shareability = shareability;
23707
23708 return n;
23709}
23710
23711static rb_node_error_t *
23712rb_node_error_new(struct parser_params *p, const YYLTYPE *loc)
23713{
23714 rb_node_error_t *n = NODE_NEWNODE(NODE_ERROR, rb_node_error_t, loc);
23715
23716 return n;
23717}
23718
23719static rb_node_break_t *
23720rb_node_break_new(struct parser_params *p, NODE *nd_stts, const YYLTYPE *loc, const YYLTYPE *keyword_loc)
23721{
23722 rb_node_break_t *n = NODE_NEWNODE(NODE_BREAK, rb_node_break_t, loc);
23723 n->nd_stts = nd_stts;
23724 n->nd_chain = 0;
23725 n->keyword_loc = *keyword_loc;
23726
23727 return n;
23728}
23729
23730static rb_node_next_t *
23731rb_node_next_new(struct parser_params *p, NODE *nd_stts, const YYLTYPE *loc, const YYLTYPE *keyword_loc)
23732{
23733 rb_node_next_t *n = NODE_NEWNODE(NODE_NEXT, rb_node_next_t, loc);
23734 n->nd_stts = nd_stts;
23735 n->nd_chain = 0;
23736 n->keyword_loc = *keyword_loc;
23737
23738 return n;
23739}
23740
23741static rb_node_redo_t *
23742rb_node_redo_new(struct parser_params *p, const YYLTYPE *loc, const YYLTYPE *keyword_loc)
23743{
23744 rb_node_redo_t *n = NODE_NEWNODE(NODE_REDO, rb_node_redo_t, loc);
23745 n->nd_chain = 0;
23746 n->keyword_loc = *keyword_loc;
23747
23748 return n;
23749}
23750
23751static rb_node_def_temp_t *
23752rb_node_def_temp_new(struct parser_params *p, const YYLTYPE *loc)
23753{
23754 rb_node_def_temp_t *n = NODE_NEWNODE((enum node_type)NODE_DEF_TEMP, rb_node_def_temp_t, loc);
23755 n->save.numparam_save = 0;
23756 n->save.max_numparam = 0;
23757 n->save.ctxt = p->ctxt;
23758 n->nd_def = 0;
23759 n->nd_mid = 0;
23760
23761 return n;
23762}
23763
23764static rb_node_def_temp_t *
23765def_head_save(struct parser_params *p, rb_node_def_temp_t *n)
23766{
23767 n->save.numparam_save = numparam_push(p);
23768 n->save.max_numparam = p->max_numparam;
23769 return n;
23770}
23771
23772#ifndef RIPPER
23773static enum node_type
23774nodetype(NODE *node) /* for debug */
23775{
23776 return (enum node_type)nd_type(node);
23777}
23778
23779static int
23780nodeline(NODE *node)
23781{
23782 return nd_line(node);
23783}
23784#endif
23785
23786static NODE*
23787newline_node(NODE *node)
23788{
23789 if (node) {
23790 node = remove_begin(node);
23791 nd_set_fl_newline(node);
23792 }
23793 return node;
23794}
23795
23796static void
23797fixpos(NODE *node, NODE *orig)
23798{
23799 if (!node) return;
23800 if (!orig) return;
23801 nd_set_line(node, nd_line(orig));
23802}
23803
23804static NODE*
23805block_append(struct parser_params *p, NODE *head, NODE *tail)
23806{
23807 NODE *end, *h = head, *nd;
23808
23809 if (tail == 0) return head;
23810
23811 if (h == 0) return tail;
23812 switch (nd_type(h)) {
23813 default:
23814 h = end = NEW_BLOCK(head, &head->nd_loc);
23815 head = end;
23816 break;
23817 case NODE_BLOCK:
23818 end = RNODE_BLOCK(h)->nd_end;
23819 break;
23820 }
23821
23822 nd = RNODE_BLOCK(end)->nd_head;
23823 switch (nd_type(nd)) {
23824 case NODE_RETURN:
23825 case NODE_BREAK:
23826 case NODE_NEXT:
23827 case NODE_REDO:
23828 case NODE_RETRY:
23829 rb_warning0L(nd_line(tail), "statement not reached");
23830 break;
23831
23832 default:
23833 break;
23834 }
23835
23836 if (!nd_type_p(tail, NODE_BLOCK)) {
23837 tail = NEW_BLOCK(tail, &tail->nd_loc);
23838 }
23839 RNODE_BLOCK(end)->nd_next = tail;
23840 RNODE_BLOCK(h)->nd_end = RNODE_BLOCK(tail)->nd_end;
23841 nd_set_last_loc(head, nd_last_loc(tail));
23842 return head;
23843}
23844
23845/* append item to the list */
23846static NODE*
23847list_append(struct parser_params *p, NODE *list, NODE *item)
23848{
23849 NODE *last;
23850
23851 if (list == 0) return NEW_LIST(item, &item->nd_loc);
23852 if (RNODE_LIST(list)->nd_next) {
23853 last = RNODE_LIST(RNODE_LIST(list)->nd_next)->as.nd_end;
23854 }
23855 else {
23856 last = list;
23857 }
23858
23859 RNODE_LIST(list)->as.nd_alen += 1;
23860 RNODE_LIST(last)->nd_next = NEW_LIST(item, &item->nd_loc);
23861 RNODE_LIST(RNODE_LIST(list)->nd_next)->as.nd_end = RNODE_LIST(last)->nd_next;
23862
23863 nd_set_last_loc(list, nd_last_loc(item));
23864
23865 return list;
23866}
23867
23868/* concat two lists */
23869static NODE*
23870list_concat(NODE *head, NODE *tail)
23871{
23872 NODE *last;
23873
23874 if (RNODE_LIST(head)->nd_next) {
23875 last = RNODE_LIST(RNODE_LIST(head)->nd_next)->as.nd_end;
23876 }
23877 else {
23878 last = head;
23879 }
23880
23881 RNODE_LIST(head)->as.nd_alen += RNODE_LIST(tail)->as.nd_alen;
23882 RNODE_LIST(last)->nd_next = tail;
23883 if (RNODE_LIST(tail)->nd_next) {
23884 RNODE_LIST(RNODE_LIST(head)->nd_next)->as.nd_end = RNODE_LIST(RNODE_LIST(tail)->nd_next)->as.nd_end;
23885 }
23886 else {
23887 RNODE_LIST(RNODE_LIST(head)->nd_next)->as.nd_end = tail;
23888 }
23889
23890 nd_set_last_loc(head, nd_last_loc(tail));
23891
23892 return head;
23893}
23894
23895static int
23896literal_concat0(struct parser_params *p, rb_parser_string_t *head, rb_parser_string_t *tail)
23897{
23898 if (!tail) return 1;
23899 if (!rb_parser_enc_compatible(p, head, tail)) {
23900 compile_error(p, "string literal encodings differ (%s / %s)",
23901 rb_enc_name(rb_parser_str_get_encoding(head)),
23902 rb_enc_name(rb_parser_str_get_encoding(tail)));
23903 rb_parser_str_resize(p, head, 0);
23904 rb_parser_str_resize(p, tail, 0);
23905 return 0;
23906 }
23907 rb_parser_str_buf_append(p, head, tail);
23908 return 1;
23909}
23910
23911static rb_parser_string_t *
23912string_literal_head(struct parser_params *p, enum node_type htype, NODE *head)
23913{
23914 if (htype != NODE_DSTR) return NULL;
23915 if (RNODE_DSTR(head)->nd_next) {
23916 head = RNODE_LIST(RNODE_LIST(RNODE_DSTR(head)->nd_next)->as.nd_end)->nd_head;
23917 if (!head || !nd_type_p(head, NODE_STR)) return NULL;
23918 }
23919 rb_parser_string_t *lit = RNODE_DSTR(head)->string;
23920 ASSUME(lit);
23921 return lit;
23922}
23923
23924#ifndef RIPPER
23925static rb_parser_string_t *
23926rb_parser_string_deep_copy(struct parser_params *p, const rb_parser_string_t *orig)
23927{
23928 rb_parser_string_t *copy;
23929 if (!orig) return NULL;
23930 copy = rb_parser_string_new(p, PARSER_STRING_PTR(orig), PARSER_STRING_LEN(orig));
23931 copy->coderange = orig->coderange;
23932 copy->enc = orig->enc;
23933 return copy;
23934}
23935#endif
23936
23937/* concat two string literals */
23938static NODE *
23939literal_concat(struct parser_params *p, NODE *head, NODE *tail, const YYLTYPE *loc)
23940{
23941 enum node_type htype;
23942 rb_parser_string_t *lit;
23943
23944 if (!head) return tail;
23945 if (!tail) return head;
23946
23947 htype = nd_type(head);
23948 if (htype == NODE_EVSTR) {
23949 head = new_dstr(p, head, loc);
23950 htype = NODE_DSTR;
23951 }
23952 if (p->heredoc_indent > 0) {
23953 switch (htype) {
23954 case NODE_STR:
23955 head = str2dstr(p, head);
23956 case NODE_DSTR:
23957 return list_append(p, head, tail);
23958 default:
23959 break;
23960 }
23961 }
23962 switch (nd_type(tail)) {
23963 case NODE_STR:
23964 if ((lit = string_literal_head(p, htype, head)) != false) {
23965 htype = NODE_STR;
23966 }
23967 else {
23968 lit = RNODE_DSTR(head)->string;
23969 }
23970 if (htype == NODE_STR) {
23971 if (!literal_concat0(p, lit, RNODE_STR(tail)->string)) {
23972 error:
23973 rb_discard_node(p, head);
23974 rb_discard_node(p, tail);
23975 return 0;
23976 }
23977 rb_discard_node(p, tail);
23978 }
23979 else {
23980 list_append(p, head, tail);
23981 }
23982 break;
23983
23984 case NODE_DSTR:
23985 if (htype == NODE_STR) {
23986 if (!literal_concat0(p, RNODE_STR(head)->string, RNODE_DSTR(tail)->string))
23987 goto error;
23988 rb_parser_string_free(p, RNODE_DSTR(tail)->string);
23989 RNODE_DSTR(tail)->string = RNODE_STR(head)->string;
23990 RNODE_STR(head)->string = NULL;
23991 rb_discard_node(p, head);
23992 head = tail;
23993 }
23994 else if (!RNODE_DSTR(tail)->string) {
23995 append:
23996 RNODE_DSTR(head)->as.nd_alen += RNODE_DSTR(tail)->as.nd_alen - 1;
23997 if (!RNODE_DSTR(head)->nd_next) {
23998 RNODE_DSTR(head)->nd_next = RNODE_DSTR(tail)->nd_next;
23999 }
24000 else if (RNODE_DSTR(tail)->nd_next) {
24001 RNODE_DSTR(RNODE_DSTR(RNODE_DSTR(head)->nd_next)->as.nd_end)->nd_next = RNODE_DSTR(tail)->nd_next;
24002 RNODE_DSTR(RNODE_DSTR(head)->nd_next)->as.nd_end = RNODE_DSTR(RNODE_DSTR(tail)->nd_next)->as.nd_end;
24003 }
24004 rb_discard_node(p, tail);
24005 }
24006 else if ((lit = string_literal_head(p, htype, head)) != false) {
24007 if (!literal_concat0(p, lit, RNODE_DSTR(tail)->string))
24008 goto error;
24009 rb_parser_string_free(p, RNODE_DSTR(tail)->string);
24010 RNODE_DSTR(tail)->string = 0;
24011 goto append;
24012 }
24013 else {
24014 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));
24015 RNODE_DSTR(tail)->string = 0;
24016 }
24017 break;
24018
24019 case NODE_EVSTR:
24020 if (htype == NODE_STR) {
24021 head = str2dstr(p, head);
24022 RNODE_DSTR(head)->as.nd_alen = 1;
24023 }
24024 list_append(p, head, tail);
24025 break;
24026 }
24027 return head;
24028}
24029
24030static void
24031nd_copy_flag(NODE *new_node, NODE *old_node)
24032{
24033 if (nd_fl_newline(old_node)) nd_set_fl_newline(new_node);
24034 nd_set_line(new_node, nd_line(old_node));
24035 new_node->nd_loc = old_node->nd_loc;
24036 new_node->node_id = old_node->node_id;
24037}
24038
24039static NODE *
24040str2dstr(struct parser_params *p, NODE *node)
24041{
24042 NODE *new_node = (NODE *)NODE_NEW_INTERNAL(NODE_DSTR, rb_node_dstr_t);
24043 nd_copy_flag(new_node, node);
24044 RNODE_DSTR(new_node)->string = RNODE_STR(node)->string;
24045 RNODE_DSTR(new_node)->as.nd_alen = 0;
24046 RNODE_DSTR(new_node)->nd_next = 0;
24047 RNODE_STR(node)->string = 0;
24048
24049 return new_node;
24050}
24051
24052static NODE *
24053str2regx(struct parser_params *p, NODE *node, int options, const YYLTYPE *loc, const YYLTYPE *opening_loc, const YYLTYPE *content_loc, const YYLTYPE *closing_loc)
24054{
24055 NODE *new_node = (NODE *)NODE_NEW_INTERNAL(NODE_REGX, rb_node_regx_t);
24056 nd_copy_flag(new_node, node);
24057 RNODE_REGX(new_node)->string = RNODE_STR(node)->string;
24058 RNODE_REGX(new_node)->options = options;
24059 nd_set_loc(new_node, loc);
24060 RNODE_REGX(new_node)->opening_loc = *opening_loc;
24061 RNODE_REGX(new_node)->content_loc = *content_loc;
24062 RNODE_REGX(new_node)->closing_loc = *closing_loc;
24063 RNODE_STR(node)->string = 0;
24064
24065 return new_node;
24066}
24067
24068static NODE *
24069evstr2dstr(struct parser_params *p, NODE *node)
24070{
24071 if (nd_type_p(node, NODE_EVSTR)) {
24072 node = new_dstr(p, node, &node->nd_loc);
24073 }
24074 return node;
24075}
24076
24077static NODE *
24078new_evstr(struct parser_params *p, NODE *node, const YYLTYPE *loc, const YYLTYPE *opening_loc, const YYLTYPE *closing_loc)
24079{
24080 NODE *head = node;
24081
24082 if (node) {
24083 switch (nd_type(node)) {
24084 case NODE_STR:
24085 return str2dstr(p, node);
24086 case NODE_DSTR:
24087 break;
24088 case NODE_EVSTR:
24089 return node;
24090 }
24091 }
24092 return NEW_EVSTR(head, loc, opening_loc, closing_loc);
24093}
24094
24095static NODE *
24096new_dstr(struct parser_params *p, NODE *node, const YYLTYPE *loc)
24097{
24098 NODE *dstr = NEW_DSTR(STRING_NEW0(), loc);
24099 return list_append(p, dstr, node);
24100}
24101
24102static NODE *
24103call_bin_op(struct parser_params *p, NODE *recv, ID id, NODE *arg1,
24104 const YYLTYPE *op_loc, const YYLTYPE *loc)
24105{
24106 NODE *expr;
24107 value_expr(p, recv);
24108 value_expr(p, arg1);
24109 expr = NEW_OPCALL(recv, id, NEW_LIST(arg1, &arg1->nd_loc), loc);
24110 nd_set_line(expr, op_loc->beg_pos.lineno);
24111 return expr;
24112}
24113
24114static NODE *
24115call_uni_op(struct parser_params *p, NODE *recv, ID id, const YYLTYPE *op_loc, const YYLTYPE *loc)
24116{
24117 NODE *opcall;
24118 value_expr(p, recv);
24119 opcall = NEW_OPCALL(recv, id, 0, loc);
24120 nd_set_line(opcall, op_loc->beg_pos.lineno);
24121 return opcall;
24122}
24123
24124static NODE *
24125new_qcall(struct parser_params* p, ID atype, NODE *recv, ID mid, NODE *args, const YYLTYPE *op_loc, const YYLTYPE *loc)
24126{
24127 NODE *qcall = NEW_QCALL(atype, recv, mid, args, loc);
24128 nd_set_line(qcall, op_loc->beg_pos.lineno);
24129 return qcall;
24130}
24131
24132static NODE*
24133new_command_qcall(struct parser_params* p, ID atype, NODE *recv, ID mid, NODE *args, NODE *block, const YYLTYPE *op_loc, const YYLTYPE *loc)
24134{
24135 NODE *ret;
24136 if (block) block_dup_check(p, args, block);
24137 ret = new_qcall(p, atype, recv, mid, args, op_loc, loc);
24138 if (block) ret = method_add_block(p, ret, block, loc);
24139 fixpos(ret, recv);
24140 return ret;
24141}
24142
24144new_locations_lambda_body(struct parser_params* p, NODE *node, const YYLTYPE *loc, const YYLTYPE *opening_loc, const YYLTYPE *closing_loc)
24145{
24147 body->node = node;
24148 body->opening_loc = *opening_loc;
24149 body->closing_loc = *closing_loc;
24150 return body;
24151}
24152
24153#define nd_once_body(node) (nd_type_p((node), NODE_ONCE) ? RNODE_ONCE(node)->nd_body : node)
24154
24155static NODE*
24156last_expr_once_body(NODE *node)
24157{
24158 if (!node) return 0;
24159 return nd_once_body(node);
24160}
24161
24162static NODE*
24163match_op(struct parser_params *p, NODE *node1, NODE *node2, const YYLTYPE *op_loc, const YYLTYPE *loc)
24164{
24165 NODE *n;
24166 int line = op_loc->beg_pos.lineno;
24167
24168 value_expr(p, node1);
24169 value_expr(p, node2);
24170
24171 if ((n = last_expr_once_body(node1)) != 0) {
24172 switch (nd_type(n)) {
24173 case NODE_DREGX:
24174 {
24175 NODE *match = NEW_MATCH2(node1, node2, loc);
24176 nd_set_line(match, line);
24177 return match;
24178 }
24179
24180 case NODE_REGX:
24181 {
24182 const VALUE lit = rb_node_regx_string_val(n);
24183 if (!NIL_P(lit)) {
24184 NODE *match = NEW_MATCH2(node1, node2, loc);
24185 RNODE_MATCH2(match)->nd_args = reg_named_capture_assign(p, lit, loc, assignable);
24186 nd_set_line(match, line);
24187 return match;
24188 }
24189 }
24190 }
24191 }
24192
24193 if ((n = last_expr_once_body(node2)) != 0) {
24194 NODE *match3;
24195
24196 switch (nd_type(n)) {
24197 case NODE_DREGX:
24198 match3 = NEW_MATCH3(node2, node1, loc);
24199 return match3;
24200 }
24201 }
24202
24203 n = NEW_CALL(node1, tMATCH, NEW_LIST(node2, &node2->nd_loc), loc);
24204 nd_set_line(n, line);
24205 return n;
24206}
24207
24208# if WARN_PAST_SCOPE
24209static int
24210past_dvar_p(struct parser_params *p, ID id)
24211{
24212 struct vtable *past = p->lvtbl->past;
24213 while (past) {
24214 if (vtable_included(past, id)) return 1;
24215 past = past->prev;
24216 }
24217 return 0;
24218}
24219# endif
24220
24221static int
24222numparam_nested_p(struct parser_params *p)
24223{
24224 struct local_vars *local = p->lvtbl;
24225 NODE *outer = local->numparam.outer;
24226 NODE *inner = local->numparam.inner;
24227 if (outer || inner) {
24228 NODE *used = outer ? outer : inner;
24229 compile_error(p, "numbered parameter is already used in %s block\n"
24230 "%s:%d: numbered parameter is already used here",
24231 outer ? "outer" : "inner",
24232 p->ruby_sourcefile, nd_line(used));
24233 parser_show_error_line(p, &used->nd_loc);
24234 return 1;
24235 }
24236 return 0;
24237}
24238
24239static int
24240numparam_used_p(struct parser_params *p)
24241{
24242 NODE *numparam = p->lvtbl->numparam.current;
24243 if (numparam) {
24244 compile_error(p, "'it' is not allowed when a numbered parameter is already used\n"
24245 "%s:%d: numbered parameter is already used here",
24246 p->ruby_sourcefile, nd_line(numparam));
24247 parser_show_error_line(p, &numparam->nd_loc);
24248 return 1;
24249 }
24250 return 0;
24251}
24252
24253static int
24254it_used_p(struct parser_params *p)
24255{
24256 NODE *it = p->lvtbl->it;
24257 if (it) {
24258 compile_error(p, "numbered parameters are not allowed when 'it' is already used\n"
24259 "%s:%d: 'it' is already used here",
24260 p->ruby_sourcefile, nd_line(it));
24261 parser_show_error_line(p, &it->nd_loc);
24262 return 1;
24263 }
24264 return 0;
24265}
24266
24267static NODE*
24268gettable(struct parser_params *p, ID id, const YYLTYPE *loc)
24269{
24270 ID *vidp = NULL;
24271 NODE *node;
24272 switch (id) {
24273 case keyword_self:
24274 return NEW_SELF(loc);
24275 case keyword_nil:
24276 return NEW_NIL(loc);
24277 case keyword_true:
24278 return NEW_TRUE(loc);
24279 case keyword_false:
24280 return NEW_FALSE(loc);
24281 case keyword__FILE__:
24282 {
24283 VALUE file = p->ruby_sourcefile_string;
24284 if (NIL_P(file))
24285 file = rb_str_new(0, 0);
24286 node = NEW_FILE(file, loc);
24287 }
24288 return node;
24289 case keyword__LINE__:
24290 return NEW_LINE(loc);
24291 case keyword__ENCODING__:
24292 return NEW_ENCODING(loc);
24293
24294 }
24295 switch (id_type(id)) {
24296 case ID_LOCAL:
24297 if (dyna_in_block(p) && dvar_defined_ref(p, id, &vidp)) {
24298 if (NUMPARAM_ID_P(id) && (numparam_nested_p(p) || it_used_p(p))) return 0;
24299 if (vidp) *vidp |= LVAR_USED;
24300 node = NEW_DVAR(id, loc);
24301 return node;
24302 }
24303 if (local_id_ref(p, id, &vidp)) {
24304 if (vidp) *vidp |= LVAR_USED;
24305 node = NEW_LVAR(id, loc);
24306 return node;
24307 }
24308 if (dyna_in_block(p) && NUMPARAM_ID_P(id) &&
24309 parser_numbered_param(p, NUMPARAM_ID_TO_IDX(id))) {
24310 if (numparam_nested_p(p) || it_used_p(p)) return 0;
24311 node = NEW_DVAR(id, loc);
24312 struct local_vars *local = p->lvtbl;
24313 if (!local->numparam.current) local->numparam.current = node;
24314 return node;
24315 }
24316# if WARN_PAST_SCOPE
24317 if (!p->ctxt.in_defined && RTEST(ruby_verbose) && past_dvar_p(p, id)) {
24318 rb_warning1("possible reference to past scope - %"PRIsWARN, rb_id2str(id));
24319 }
24320# endif
24321 /* method call without arguments */
24322 if (dyna_in_block(p) && id == rb_intern("it") && !(DVARS_TERMINAL_P(p->lvtbl->args) || DVARS_TERMINAL_P(p->lvtbl->args->prev))) {
24323 if (numparam_used_p(p)) return 0;
24324 if (p->max_numparam == ORDINAL_PARAM) {
24325 compile_error(p, "ordinary parameter is defined");
24326 return 0;
24327 }
24328 if (!p->it_id) {
24329 p->it_id = internal_id(p);
24330 vtable_add(p->lvtbl->args, p->it_id);
24331 }
24332 NODE *node = NEW_DVAR(p->it_id, loc);
24333 if (!p->lvtbl->it) p->lvtbl->it = node;
24334 return node;
24335 }
24336 return NEW_VCALL(id, loc);
24337 case ID_GLOBAL:
24338 return NEW_GVAR(id, loc);
24339 case ID_INSTANCE:
24340 return NEW_IVAR(id, loc);
24341 case ID_CONST:
24342 return NEW_CONST(id, loc);
24343 case ID_CLASS:
24344 return NEW_CVAR(id, loc);
24345 }
24346 compile_error(p, "identifier %"PRIsVALUE" is not valid to get", rb_id2str(id));
24347 return 0;
24348}
24349
24350static rb_node_opt_arg_t *
24351opt_arg_append(rb_node_opt_arg_t *opt_list, rb_node_opt_arg_t *opt)
24352{
24353 rb_node_opt_arg_t *opts = opt_list;
24354 RNODE(opts)->nd_loc.end_pos = RNODE(opt)->nd_loc.end_pos;
24355
24356 while (opts->nd_next) {
24357 opts = opts->nd_next;
24358 RNODE(opts)->nd_loc.end_pos = RNODE(opt)->nd_loc.end_pos;
24359 }
24360 opts->nd_next = opt;
24361
24362 return opt_list;
24363}
24364
24365static rb_node_kw_arg_t *
24366kwd_append(rb_node_kw_arg_t *kwlist, rb_node_kw_arg_t *kw)
24367{
24368 if (kwlist) {
24369 /* Assume rb_node_kw_arg_t and rb_node_opt_arg_t has same structure */
24370 opt_arg_append(RNODE_OPT_ARG(kwlist), RNODE_OPT_ARG(kw));
24371 }
24372 return kwlist;
24373}
24374
24375static NODE *
24376new_defined(struct parser_params *p, NODE *expr, const YYLTYPE *loc, const YYLTYPE *keyword_loc)
24377{
24378 int had_trailing_semicolon = p->ctxt.has_trailing_semicolon;
24379 p->ctxt.has_trailing_semicolon = 0;
24380
24381 NODE *n = expr;
24382 while (n) {
24383 if (nd_type_p(n, NODE_BEGIN)) {
24384 n = RNODE_BEGIN(n)->nd_body;
24385 }
24386 else if (nd_type_p(n, NODE_BLOCK) && RNODE_BLOCK(n)->nd_end == n) {
24387 n = RNODE_BLOCK(n)->nd_head;
24388 }
24389 else {
24390 break;
24391 }
24392 }
24393
24394 if (had_trailing_semicolon && !nd_type_p(expr, NODE_BLOCK)) {
24395 NODE *block = NEW_BLOCK(expr, loc);
24396 return NEW_DEFINED(block, loc, keyword_loc);
24397 }
24398
24399 return NEW_DEFINED(n, loc, keyword_loc);
24400}
24401
24402static NODE*
24403str_to_sym_node(struct parser_params *p, NODE *node, const YYLTYPE *loc)
24404{
24405 VALUE lit;
24406 rb_parser_string_t *str = RNODE_STR(node)->string;
24407 if (rb_parser_enc_str_coderange(p, str) == RB_PARSER_ENC_CODERANGE_BROKEN) {
24408 yyerror1(loc, "invalid symbol");
24409 lit = STR_NEW0();
24410 }
24411 else {
24412 lit = rb_str_new_parser_string(str);
24413 }
24414 return NEW_SYM(lit, loc);
24415}
24416
24417static NODE*
24418symbol_append(struct parser_params *p, NODE *symbols, NODE *symbol)
24419{
24420 enum node_type type = nd_type(symbol);
24421 switch (type) {
24422 case NODE_DSTR:
24423 nd_set_type(symbol, NODE_DSYM);
24424 break;
24425 case NODE_STR:
24426 symbol = str_to_sym_node(p, symbol, &RNODE(symbol)->nd_loc);
24427 break;
24428 default:
24429 compile_error(p, "unexpected node as symbol: %s", parser_node_name(type));
24430 }
24431 return list_append(p, symbols, symbol);
24432}
24433
24434static void
24435dregex_fragment_setenc(struct parser_params *p, rb_node_dregx_t *const dreg, int options)
24436{
24437 if (dreg->string) {
24438 reg_fragment_setenc(p, dreg->string, options);
24439 }
24440 for (struct RNode_LIST *list = dreg->nd_next; list; list = RNODE_LIST(list->nd_next)) {
24441 NODE *frag = list->nd_head;
24442 if (nd_type_p(frag, NODE_STR)) {
24443 reg_fragment_setenc(p, RNODE_STR(frag)->string, options);
24444 }
24445 else if (nd_type_p(frag, NODE_DSTR)) {
24446 dregex_fragment_setenc(p, RNODE_DSTR(frag), options);
24447 }
24448 }
24449}
24450
24451static NODE *
24452new_regexp(struct parser_params *p, NODE *node, int options, const YYLTYPE *loc, const YYLTYPE *opening_loc, const YYLTYPE *content_loc, const YYLTYPE *closing_loc)
24453{
24454 if (!node) {
24455 /* Check string is valid regex */
24456 rb_parser_string_t *str = STRING_NEW0();
24457 reg_compile(p, str, options);
24458 node = NEW_REGX(str, options, loc, opening_loc, content_loc, closing_loc);
24459 return node;
24460 }
24461 switch (nd_type(node)) {
24462 case NODE_STR:
24463 {
24464 /* Check string is valid regex */
24465 reg_compile(p, RNODE_STR(node)->string, options);
24466 node = str2regx(p, node, options, loc, opening_loc, content_loc, closing_loc);
24467 }
24468 break;
24469 default:
24470 node = NEW_DSTR0(STRING_NEW0(), 1, NEW_LIST(node, loc), loc);
24471 /* fall through */
24472 case NODE_DSTR:
24473 nd_set_type(node, NODE_DREGX);
24474 nd_set_loc(node, loc);
24475 rb_node_dregx_t *const dreg = RNODE_DREGX(node);
24476 dreg->as.nd_cflag = options & RE_OPTION_MASK;
24477 if (dreg->nd_next) {
24478 dregex_fragment_setenc(p, dreg, options);
24479 }
24480 if (options & RE_OPTION_ONCE) {
24481 node = NEW_ONCE(node, loc);
24482 }
24483 break;
24484 }
24485 return node;
24486}
24487
24488static rb_node_kw_arg_t *
24489new_kw_arg(struct parser_params *p, NODE *k, const YYLTYPE *loc)
24490{
24491 if (!k) return 0;
24492 return NEW_KW_ARG((k), loc);
24493}
24494
24495static NODE *
24496new_xstring(struct parser_params *p, NODE *node, const YYLTYPE *loc)
24497{
24498 if (!node) {
24499 NODE *xstr = NEW_XSTR(STRING_NEW0(), loc);
24500 return xstr;
24501 }
24502 switch (nd_type(node)) {
24503 case NODE_STR:
24504 nd_set_type(node, NODE_XSTR);
24505 nd_set_loc(node, loc);
24506 break;
24507 case NODE_DSTR:
24508 nd_set_type(node, NODE_DXSTR);
24509 nd_set_loc(node, loc);
24510 break;
24511 default:
24512 node = NEW_DXSTR(0, 1, NEW_LIST(node, loc), loc);
24513 break;
24514 }
24515 return node;
24516}
24517
24518static const
24519struct st_hash_type literal_type = {
24520 literal_cmp,
24521 literal_hash,
24522};
24523
24524static int nd_type_st_key_enable_p(NODE *node);
24525
24526static void
24527check_literal_when(struct parser_params *p, NODE *arg, const YYLTYPE *loc)
24528{
24529 /* See https://bugs.ruby-lang.org/issues/20331 for discussion about what is warned. */
24530 if (!arg || !p->case_labels) return;
24531 if (!nd_type_st_key_enable_p(arg)) return;
24532
24533 if (p->case_labels == CHECK_LITERAL_WHEN) {
24534 p->case_labels = st_init_table(&literal_type);
24535 }
24536 else {
24537 st_data_t line;
24538 if (st_lookup(p->case_labels, (st_data_t)arg, &line)) {
24539 rb_warning2("'when' clause on line %d duplicates 'when' clause on line %d and is ignored",
24540 WARN_I((int)nd_line(arg)), WARN_I((int)line));
24541 return;
24542 }
24543 }
24544 st_insert(p->case_labels, (st_data_t)arg, (st_data_t)p->ruby_sourceline);
24545}
24546
24547#ifdef RIPPER
24548static int
24549id_is_var(struct parser_params *p, ID id)
24550{
24551 if (is_notop_id(id)) {
24552 switch (id & ID_SCOPE_MASK) {
24553 case ID_GLOBAL: case ID_INSTANCE: case ID_CONST: case ID_CLASS:
24554 return 1;
24555 case ID_LOCAL:
24556 if (dyna_in_block(p)) {
24557 if (NUMPARAM_ID_P(id) || dvar_defined(p, id)) return 1;
24558 }
24559 if (local_id(p, id)) return 1;
24560 /* method call without arguments */
24561 return 0;
24562 }
24563 }
24564 compile_error(p, "identifier %"PRIsVALUE" is not valid to get", rb_id2str(id));
24565 return 0;
24566}
24567#endif
24568
24569static inline enum lex_state_e
24570parser_set_lex_state(struct parser_params *p, enum lex_state_e ls, int line)
24571{
24572 if (p->debug) {
24573 ls = rb_parser_trace_lex_state(p, p->lex.state, ls, line);
24574 }
24575 return p->lex.state = ls;
24576}
24577
24578#ifndef RIPPER
24579static void
24580flush_debug_buffer(struct parser_params *p, VALUE out, VALUE str)
24581{
24582 VALUE mesg = p->debug_buffer;
24583
24584 if (!NIL_P(mesg) && RSTRING_LEN(mesg)) {
24585 p->debug_buffer = Qnil;
24586 rb_io_puts(1, &mesg, out);
24587 }
24588 if (!NIL_P(str) && RSTRING_LEN(str)) {
24589 rb_io_write(p->debug_output, str);
24590 }
24591}
24592
24593static const char rb_parser_lex_state_names[][8] = {
24594 "BEG", "END", "ENDARG", "ENDFN", "ARG",
24595 "CMDARG", "MID", "FNAME", "DOT", "CLASS",
24596 "LABEL", "LABELED","FITEM",
24597};
24598
24599static VALUE
24600append_lex_state_name(struct parser_params *p, enum lex_state_e state, VALUE buf)
24601{
24602 int i, sep = 0;
24603 unsigned int mask = 1;
24604 static const char none[] = "NONE";
24605
24606 for (i = 0; i < EXPR_MAX_STATE; ++i, mask <<= 1) {
24607 if ((unsigned)state & mask) {
24608 if (sep) {
24609 rb_str_cat(buf, "|", 1);
24610 }
24611 sep = 1;
24612 rb_str_cat_cstr(buf, rb_parser_lex_state_names[i]);
24613 }
24614 }
24615 if (!sep) {
24616 rb_str_cat(buf, none, sizeof(none)-1);
24617 }
24618 return buf;
24619}
24620
24621enum lex_state_e
24622rb_parser_trace_lex_state(struct parser_params *p, enum lex_state_e from,
24623 enum lex_state_e to, int line)
24624{
24625 VALUE mesg;
24626 mesg = rb_str_new_cstr("lex_state: ");
24627 append_lex_state_name(p, from, mesg);
24628 rb_str_cat_cstr(mesg, " -> ");
24629 append_lex_state_name(p, to, mesg);
24630 rb_str_catf(mesg, " at line %d\n", line);
24631 flush_debug_buffer(p, p->debug_output, mesg);
24632 return to;
24633}
24634
24635VALUE
24636rb_parser_lex_state_name(struct parser_params *p, enum lex_state_e state)
24637{
24638 return rb_str_to_interned_str(append_lex_state_name(p, state, rb_str_new(0, 0)));
24639}
24640
24641static void
24642append_bitstack_value(struct parser_params *p, stack_type stack, VALUE mesg)
24643{
24644 if (stack == 0) {
24645 rb_str_cat_cstr(mesg, "0");
24646 }
24647 else {
24648 stack_type mask = (stack_type)1U << (CHAR_BIT * sizeof(stack_type) - 1);
24649 for (; mask && !(stack & mask); mask >>= 1) continue;
24650 for (; mask; mask >>= 1) rb_str_cat(mesg, stack & mask ? "1" : "0", 1);
24651 }
24652}
24653
24654void
24655rb_parser_show_bitstack(struct parser_params *p, stack_type stack,
24656 const char *name, int line)
24657{
24658 VALUE mesg = rb_sprintf("%s: ", name);
24659 append_bitstack_value(p, stack, mesg);
24660 rb_str_catf(mesg, " at line %d\n", line);
24661 flush_debug_buffer(p, p->debug_output, mesg);
24662}
24663
24664void
24665rb_parser_fatal(struct parser_params *p, const char *fmt, ...)
24666{
24667 va_list ap;
24668 VALUE mesg = rb_str_new_cstr("internal parser error: ");
24669
24670 va_start(ap, fmt);
24671 rb_str_vcatf(mesg, fmt, ap);
24672 va_end(ap);
24673 yyerror0(RSTRING_PTR(mesg));
24674 RB_GC_GUARD(mesg);
24675
24676 mesg = rb_str_new(0, 0);
24677 append_lex_state_name(p, p->lex.state, mesg);
24678 compile_error(p, "lex.state: %"PRIsVALUE, mesg);
24679 rb_str_resize(mesg, 0);
24680 append_bitstack_value(p, p->cond_stack, mesg);
24681 compile_error(p, "cond_stack: %"PRIsVALUE, mesg);
24682 rb_str_resize(mesg, 0);
24683 append_bitstack_value(p, p->cmdarg_stack, mesg);
24684 compile_error(p, "cmdarg_stack: %"PRIsVALUE, mesg);
24685 if (p->debug_output == rb_ractor_stdout())
24686 p->debug_output = rb_ractor_stderr();
24687 p->debug = TRUE;
24688}
24689
24690static YYLTYPE *
24691rb_parser_set_pos(YYLTYPE *yylloc, int sourceline, int beg_pos, int end_pos)
24692{
24693 yylloc->beg_pos.lineno = sourceline;
24694 yylloc->beg_pos.column = beg_pos;
24695 yylloc->end_pos.lineno = sourceline;
24696 yylloc->end_pos.column = end_pos;
24697 return yylloc;
24698}
24699
24700YYLTYPE *
24701rb_parser_set_location_from_strterm_heredoc(struct parser_params *p, rb_strterm_heredoc_t *here, YYLTYPE *yylloc)
24702{
24703 int sourceline = here->sourceline;
24704 int beg_pos = (int)here->offset - here->quote
24705 - (rb_strlen_lit("<<-") - !(here->func & STR_FUNC_INDENT));
24706 int end_pos = (int)here->offset + here->length + here->quote;
24707
24708 return rb_parser_set_pos(yylloc, sourceline, beg_pos, end_pos);
24709}
24710
24711YYLTYPE *
24712rb_parser_set_location_of_delayed_token(struct parser_params *p, YYLTYPE *yylloc)
24713{
24714 yylloc->beg_pos.lineno = p->delayed.beg_line;
24715 yylloc->beg_pos.column = p->delayed.beg_col;
24716 yylloc->end_pos.lineno = p->delayed.end_line;
24717 yylloc->end_pos.column = p->delayed.end_col;
24718
24719 return yylloc;
24720}
24721
24722YYLTYPE *
24723rb_parser_set_location_of_heredoc_end(struct parser_params *p, YYLTYPE *yylloc)
24724{
24725 int sourceline = p->ruby_sourceline;
24726 int beg_pos = (int)(p->lex.ptok - p->lex.pbeg);
24727 int end_pos = (int)(p->lex.pend - p->lex.pbeg);
24728 return rb_parser_set_pos(yylloc, sourceline, beg_pos, end_pos);
24729}
24730
24731YYLTYPE *
24732rb_parser_set_location_of_dummy_end(struct parser_params *p, YYLTYPE *yylloc)
24733{
24734 yylloc->end_pos = yylloc->beg_pos;
24735
24736 return yylloc;
24737}
24738
24739YYLTYPE *
24740rb_parser_set_location_of_none(struct parser_params *p, YYLTYPE *yylloc)
24741{
24742 int sourceline = p->ruby_sourceline;
24743 int beg_pos = (int)(p->lex.ptok - p->lex.pbeg);
24744 int end_pos = (int)(p->lex.ptok - p->lex.pbeg);
24745 return rb_parser_set_pos(yylloc, sourceline, beg_pos, end_pos);
24746}
24747
24748YYLTYPE *
24749rb_parser_set_location(struct parser_params *p, YYLTYPE *yylloc)
24750{
24751 int sourceline = p->ruby_sourceline;
24752 int beg_pos = (int)(p->lex.ptok - p->lex.pbeg);
24753 int end_pos = (int)(p->lex.pcur - p->lex.pbeg);
24754 return rb_parser_set_pos(yylloc, sourceline, beg_pos, end_pos);
24755}
24756#endif /* !RIPPER */
24757
24758static int
24759assignable0(struct parser_params *p, ID id, const char **err)
24760{
24761 if (!id) return -1;
24762 switch (id) {
24763 case keyword_self:
24764 *err = "Can't change the value of self";
24765 return -1;
24766 case keyword_nil:
24767 *err = "Can't assign to nil";
24768 return -1;
24769 case keyword_true:
24770 *err = "Can't assign to true";
24771 return -1;
24772 case keyword_false:
24773 *err = "Can't assign to false";
24774 return -1;
24775 case keyword__FILE__:
24776 *err = "Can't assign to __FILE__";
24777 return -1;
24778 case keyword__LINE__:
24779 *err = "Can't assign to __LINE__";
24780 return -1;
24781 case keyword__ENCODING__:
24782 *err = "Can't assign to __ENCODING__";
24783 return -1;
24784 }
24785 switch (id_type(id)) {
24786 case ID_LOCAL:
24787 if (dyna_in_block(p)) {
24788 if (p->max_numparam > NO_PARAM && NUMPARAM_ID_P(id)) {
24789 compile_error(p, "Can't assign to numbered parameter _%d",
24790 NUMPARAM_ID_TO_IDX(id));
24791 return -1;
24792 }
24793 if (dvar_curr(p, id)) return NODE_DASGN;
24794 if (dvar_defined(p, id)) return NODE_DASGN;
24795 if (local_id(p, id)) return NODE_LASGN;
24796 dyna_var(p, id);
24797 return NODE_DASGN;
24798 }
24799 else {
24800 if (!local_id(p, id)) local_var(p, id);
24801 return NODE_LASGN;
24802 }
24803 break;
24804 case ID_GLOBAL: return NODE_GASGN;
24805 case ID_INSTANCE: return NODE_IASGN;
24806 case ID_CONST:
24807 if (!p->ctxt.in_def) return NODE_CDECL;
24808 *err = "dynamic constant assignment";
24809 return -1;
24810 case ID_CLASS: return NODE_CVASGN;
24811 default:
24812 compile_error(p, "identifier %"PRIsVALUE" is not valid to set", rb_id2str(id));
24813 }
24814 return -1;
24815}
24816
24817static NODE*
24818assignable(struct parser_params *p, ID id, NODE *val, const YYLTYPE *loc)
24819{
24820 const char *err = 0;
24821 int node_type = assignable0(p, id, &err);
24822 switch (node_type) {
24823 case NODE_DASGN: return NEW_DASGN(id, val, loc);
24824 case NODE_LASGN: return NEW_LASGN(id, val, loc);
24825 case NODE_GASGN: return NEW_GASGN(id, val, loc);
24826 case NODE_IASGN: return NEW_IASGN(id, val, loc);
24827 case NODE_CDECL: return NEW_CDECL(id, val, 0, p->ctxt.shareable_constant_value, loc);
24828 case NODE_CVASGN: return NEW_CVASGN(id, val, loc);
24829 }
24830/* TODO: FIXME */
24831#ifndef RIPPER
24832 if (err) yyerror1(loc, err);
24833#else
24834 if (err) set_value(assign_error(p, err, p->s_lvalue));
24835#endif
24836 return NEW_ERROR(loc);
24837}
24838
24839static int
24840is_private_local_id(struct parser_params *p, ID name)
24841{
24842 VALUE s;
24843 if (name == idUScore) return 1;
24844 if (!is_local_id(name)) return 0;
24845 s = rb_id2str(name);
24846 if (!s) return 0;
24847 return RSTRING_PTR(s)[0] == '_';
24848}
24849
24850static int
24851shadowing_lvar_0(struct parser_params *p, ID name)
24852{
24853 if (dyna_in_block(p)) {
24854 if (dvar_curr(p, name)) {
24855 if (is_private_local_id(p, name)) return 1;
24856 yyerror0("duplicated argument name");
24857 }
24858 else if (dvar_defined(p, name) || local_id(p, name)) {
24859 vtable_add(p->lvtbl->vars, name);
24860 if (p->lvtbl->used) {
24861 vtable_add(p->lvtbl->used, (ID)p->ruby_sourceline | LVAR_USED);
24862 }
24863 return 0;
24864 }
24865 }
24866 else {
24867 if (local_id(p, name)) {
24868 if (is_private_local_id(p, name)) return 1;
24869 yyerror0("duplicated argument name");
24870 }
24871 }
24872 return 1;
24873}
24874
24875static ID
24876shadowing_lvar(struct parser_params *p, ID name)
24877{
24878 shadowing_lvar_0(p, name);
24879 return name;
24880}
24881
24882static void
24883new_bv(struct parser_params *p, ID name)
24884{
24885 if (!name) return;
24886 if (!is_local_id(name)) {
24887 compile_error(p, "invalid local variable - %"PRIsVALUE,
24888 rb_id2str(name));
24889 return;
24890 }
24891 if (!shadowing_lvar_0(p, name)) return;
24892 dyna_var(p, name);
24893 ID *vidp = 0;
24894 if (dvar_defined_ref(p, name, &vidp)) {
24895 if (vidp) *vidp |= LVAR_USED;
24896 }
24897}
24898
24899static void
24900aryset_check(struct parser_params *p, NODE *args)
24901{
24902 NODE *block = 0, *kwds = 0;
24903 if (args && nd_type_p(args, NODE_BLOCK_PASS)) {
24904 block = RNODE_BLOCK_PASS(args)->nd_body;
24905 args = RNODE_BLOCK_PASS(args)->nd_head;
24906 }
24907 if (args && nd_type_p(args, NODE_ARGSCAT)) {
24908 args = RNODE_ARGSCAT(args)->nd_body;
24909 }
24910 if (args && nd_type_p(args, NODE_ARGSPUSH)) {
24911 kwds = RNODE_ARGSPUSH(args)->nd_body;
24912 }
24913 else {
24914 for (NODE *next = args; next && nd_type_p(next, NODE_LIST);
24915 next = RNODE_LIST(next)->nd_next) {
24916 kwds = RNODE_LIST(next)->nd_head;
24917 }
24918 }
24919 if (kwds && nd_type_p(kwds, NODE_HASH) && !RNODE_HASH(kwds)->nd_brace) {
24920 yyerror1(&kwds->nd_loc, "keyword arg given in index assignment");
24921 }
24922 if (block) {
24923 yyerror1(&block->nd_loc, "block arg given in index assignment");
24924 }
24925}
24926
24927static NODE *
24928aryset(struct parser_params *p, NODE *recv, NODE *idx, const YYLTYPE *loc)
24929{
24930 aryset_check(p, idx);
24931 return NEW_ATTRASGN(recv, tASET, idx, loc);
24932}
24933
24934static void
24935block_dup_check(struct parser_params *p, NODE *node1, NODE *node2)
24936{
24937 if (node2 && node1 && nd_type_p(node1, NODE_BLOCK_PASS)) {
24938 compile_error(p, "both block arg and actual block given");
24939 }
24940}
24941
24942static NODE *
24943attrset(struct parser_params *p, NODE *recv, ID atype, ID id, const YYLTYPE *loc)
24944{
24945 if (!CALL_Q_P(atype)) id = rb_id_attrset(id);
24946 return NEW_ATTRASGN(recv, id, 0, loc);
24947}
24948
24949static VALUE
24950rb_backref_error(struct parser_params *p, NODE *node)
24951{
24952#ifndef RIPPER
24953# define ERR(...) (compile_error(p, __VA_ARGS__), Qtrue)
24954#else
24955# define ERR(...) rb_sprintf(__VA_ARGS__)
24956#endif
24957 switch (nd_type(node)) {
24958 case NODE_NTH_REF:
24959 return ERR("Can't set variable $%ld", RNODE_NTH_REF(node)->nd_nth);
24960 case NODE_BACK_REF:
24961 return ERR("Can't set variable $%c", (int)RNODE_BACK_REF(node)->nd_nth);
24962 }
24963#undef ERR
24964 UNREACHABLE_RETURN(Qfalse); /* only called on syntax error */
24965}
24966
24967static NODE *
24968arg_append(struct parser_params *p, NODE *node1, NODE *node2, const YYLTYPE *loc)
24969{
24970 if (!node1) return NEW_LIST(node2, &node2->nd_loc);
24971 switch (nd_type(node1)) {
24972 case NODE_LIST:
24973 return list_append(p, node1, node2);
24974 case NODE_BLOCK_PASS:
24975 RNODE_BLOCK_PASS(node1)->nd_head = arg_append(p, RNODE_BLOCK_PASS(node1)->nd_head, node2, loc);
24976 node1->nd_loc.end_pos = RNODE_BLOCK_PASS(node1)->nd_head->nd_loc.end_pos;
24977 return node1;
24978 case NODE_ARGSPUSH:
24979 RNODE_ARGSPUSH(node1)->nd_body = list_append(p, NEW_LIST(RNODE_ARGSPUSH(node1)->nd_body, &RNODE_ARGSPUSH(node1)->nd_body->nd_loc), node2);
24980 node1->nd_loc.end_pos = RNODE_ARGSPUSH(node1)->nd_body->nd_loc.end_pos;
24981 nd_set_type(node1, NODE_ARGSCAT);
24982 return node1;
24983 case NODE_ARGSCAT:
24984 if (!nd_type_p(RNODE_ARGSCAT(node1)->nd_body, NODE_LIST)) break;
24985 RNODE_ARGSCAT(node1)->nd_body = list_append(p, RNODE_ARGSCAT(node1)->nd_body, node2);
24986 node1->nd_loc.end_pos = RNODE_ARGSCAT(node1)->nd_body->nd_loc.end_pos;
24987 return node1;
24988 }
24989 return NEW_ARGSPUSH(node1, node2, loc);
24990}
24991
24992static NODE *
24993arg_concat(struct parser_params *p, NODE *node1, NODE *node2, const YYLTYPE *loc)
24994{
24995 if (!node2) return node1;
24996 switch (nd_type(node1)) {
24997 case NODE_BLOCK_PASS:
24998 if (RNODE_BLOCK_PASS(node1)->nd_head)
24999 RNODE_BLOCK_PASS(node1)->nd_head = arg_concat(p, RNODE_BLOCK_PASS(node1)->nd_head, node2, loc);
25000 else
25001 RNODE_LIST(node1)->nd_head = NEW_LIST(node2, loc);
25002 return node1;
25003 case NODE_ARGSPUSH:
25004 if (!nd_type_p(node2, NODE_LIST)) break;
25005 RNODE_ARGSPUSH(node1)->nd_body = list_concat(NEW_LIST(RNODE_ARGSPUSH(node1)->nd_body, loc), node2);
25006 nd_set_type(node1, NODE_ARGSCAT);
25007 return node1;
25008 case NODE_ARGSCAT:
25009 if (!nd_type_p(node2, NODE_LIST) ||
25010 !nd_type_p(RNODE_ARGSCAT(node1)->nd_body, NODE_LIST)) break;
25011 RNODE_ARGSCAT(node1)->nd_body = list_concat(RNODE_ARGSCAT(node1)->nd_body, node2);
25012 return node1;
25013 }
25014 return NEW_ARGSCAT(node1, node2, loc);
25015}
25016
25017static NODE *
25018last_arg_append(struct parser_params *p, NODE *args, NODE *last_arg, const YYLTYPE *loc)
25019{
25020 NODE *n1;
25021 if ((n1 = splat_array(args)) != 0) {
25022 return list_append(p, n1, last_arg);
25023 }
25024 return arg_append(p, args, last_arg, loc);
25025}
25026
25027static NODE *
25028rest_arg_append(struct parser_params *p, NODE *args, NODE *rest_arg, const YYLTYPE *loc)
25029{
25030 NODE *n1;
25031 if ((nd_type_p(rest_arg, NODE_LIST)) && (n1 = splat_array(args)) != 0) {
25032 return list_concat(n1, rest_arg);
25033 }
25034 return arg_concat(p, args, rest_arg, loc);
25035}
25036
25037static NODE *
25038splat_array(NODE* node)
25039{
25040 if (nd_type_p(node, NODE_SPLAT)) node = RNODE_SPLAT(node)->nd_head;
25041 if (nd_type_p(node, NODE_LIST)) return node;
25042 return 0;
25043}
25044
25045static void
25046mark_lvar_used(struct parser_params *p, NODE *rhs)
25047{
25048 ID *vidp = NULL;
25049 if (!rhs) return;
25050 switch (nd_type(rhs)) {
25051 case NODE_LASGN:
25052 if (local_id_ref(p, RNODE_LASGN(rhs)->nd_vid, &vidp)) {
25053 if (vidp) *vidp |= LVAR_USED;
25054 }
25055 break;
25056 case NODE_DASGN:
25057 if (dvar_defined_ref(p, RNODE_DASGN(rhs)->nd_vid, &vidp)) {
25058 if (vidp) *vidp |= LVAR_USED;
25059 }
25060 break;
25061#if 0
25062 case NODE_MASGN:
25063 for (rhs = rhs->nd_head; rhs; rhs = rhs->nd_next) {
25064 mark_lvar_used(p, rhs->nd_head);
25065 }
25066 break;
25067#endif
25068 }
25069}
25070
25071static int is_static_content(NODE *node);
25072
25073static NODE *
25074node_assign(struct parser_params *p, NODE *lhs, NODE *rhs, struct lex_context ctxt, const YYLTYPE *loc)
25075{
25076 if (!lhs) return 0;
25077
25078 switch (nd_type(lhs)) {
25079 case NODE_CDECL:
25080 case NODE_GASGN:
25081 case NODE_IASGN:
25082 case NODE_LASGN:
25083 case NODE_DASGN:
25084 case NODE_MASGN:
25085 case NODE_CVASGN:
25086 set_nd_value(p, lhs, rhs);
25087 nd_set_loc(lhs, loc);
25088 break;
25089
25090 case NODE_ATTRASGN:
25091 RNODE_ATTRASGN(lhs)->nd_args = arg_append(p, RNODE_ATTRASGN(lhs)->nd_args, rhs, loc);
25092 nd_set_loc(lhs, loc);
25093 break;
25094
25095 default:
25096 /* should not happen */
25097 break;
25098 }
25099
25100 return lhs;
25101}
25102
25103static NODE *
25104value_expr_check(struct parser_params *p, NODE *node)
25105{
25106 NODE *void_node = 0, *vn;
25107
25108 if (!node) {
25109 rb_warning0("empty expression");
25110 }
25111 while (node) {
25112 switch (nd_type(node)) {
25113 case NODE_ENSURE:
25114 vn = RNODE_ENSURE(node)->nd_head;
25115 node = RNODE_ENSURE(node)->nd_ensr;
25116 /* nd_ensr should not be NULL, check it out next */
25117 if (vn && (vn = value_expr_check(p, vn))) {
25118 goto found;
25119 }
25120 break;
25121
25122 case NODE_RESCUE:
25123 /* void only if all children are void */
25124 vn = RNODE_RESCUE(node)->nd_head;
25125 if (!vn || !(vn = value_expr_check(p, vn))) return NULL;
25126 if (!void_node) void_node = vn;
25127 for (NODE *r = RNODE_RESCUE(node)->nd_resq; r; r = RNODE_RESBODY(r)->nd_next) {
25128 if (!nd_type_p(r, NODE_RESBODY)) {
25129 compile_error(p, "unexpected node");
25130 return NULL;
25131 }
25132 if (!(vn = value_expr_check(p, RNODE_RESBODY(r)->nd_body))) {
25133 void_node = 0;
25134 break;
25135 }
25136 if (!void_node) void_node = vn;
25137 }
25138 node = RNODE_RESCUE(node)->nd_else;
25139 if (!node) return void_node;
25140 break;
25141
25142 case NODE_RETURN:
25143 case NODE_BREAK:
25144 case NODE_NEXT:
25145 case NODE_REDO:
25146 case NODE_RETRY:
25147 goto found;
25148
25149 case NODE_CASE3:
25150 if (!RNODE_CASE3(node)->nd_body || !nd_type_p(RNODE_CASE3(node)->nd_body, NODE_IN)) {
25151 compile_error(p, "unexpected node");
25152 return NULL;
25153 }
25154 if (RNODE_IN(RNODE_CASE3(node)->nd_body)->nd_body) {
25155 return NULL;
25156 }
25157 /* single line pattern matching with "=>" operator */
25158 goto found;
25159
25160 case NODE_BLOCK:
25161 while (RNODE_BLOCK(node)->nd_next) {
25162 node = RNODE_BLOCK(node)->nd_next;
25163 }
25164 node = RNODE_BLOCK(node)->nd_head;
25165 break;
25166
25167 case NODE_BEGIN:
25168 node = RNODE_BEGIN(node)->nd_body;
25169 break;
25170
25171 case NODE_IF:
25172 case NODE_UNLESS:
25173 if (!RNODE_IF(node)->nd_body) {
25174 return NULL;
25175 }
25176 else if (!RNODE_IF(node)->nd_else) {
25177 return NULL;
25178 }
25179 vn = value_expr_check(p, RNODE_IF(node)->nd_body);
25180 if (!vn) return NULL;
25181 if (!void_node) void_node = vn;
25182 node = RNODE_IF(node)->nd_else;
25183 break;
25184
25185 case NODE_AND:
25186 case NODE_OR:
25187 node = RNODE_AND(node)->nd_1st;
25188 break;
25189
25190 case NODE_LASGN:
25191 case NODE_DASGN:
25192 case NODE_MASGN:
25193 mark_lvar_used(p, node);
25194 return NULL;
25195
25196 default:
25197 return NULL;
25198 }
25199 }
25200
25201 return NULL;
25202
25203 found:
25204 /* return the first found node */
25205 return void_node ? void_node : node;
25206}
25207
25208static int
25209value_expr(struct parser_params *p, NODE *node)
25210{
25211 NODE *void_node = value_expr_check(p, node);
25212 if (void_node) {
25213 yyerror1(&void_node->nd_loc, "void value expression");
25214 /* or "control never reach"? */
25215 return FALSE;
25216 }
25217 return TRUE;
25218}
25219
25220static void
25221void_expr(struct parser_params *p, NODE *node)
25222{
25223 const char *useless = 0;
25224
25225 if (!RTEST(ruby_verbose)) return;
25226
25227 if (!node || !(node = nd_once_body(node))) return;
25228 switch (nd_type(node)) {
25229 case NODE_OPCALL:
25230 switch (RNODE_OPCALL(node)->nd_mid) {
25231 case '+':
25232 case '-':
25233 case '*':
25234 case '/':
25235 case '%':
25236 case tPOW:
25237 case tUPLUS:
25238 case tUMINUS:
25239 case '|':
25240 case '^':
25241 case '&':
25242 case tCMP:
25243 case '>':
25244 case tGEQ:
25245 case '<':
25246 case tLEQ:
25247 case tEQ:
25248 case tNEQ:
25249 useless = rb_id2name(RNODE_OPCALL(node)->nd_mid);
25250 break;
25251 }
25252 break;
25253
25254 case NODE_LVAR:
25255 case NODE_DVAR:
25256 case NODE_GVAR:
25257 case NODE_IVAR:
25258 case NODE_CVAR:
25259 case NODE_NTH_REF:
25260 case NODE_BACK_REF:
25261 useless = "a variable";
25262 break;
25263 case NODE_CONST:
25264 useless = "a constant";
25265 break;
25266 case NODE_SYM:
25267 case NODE_LINE:
25268 case NODE_FILE:
25269 case NODE_ENCODING:
25270 case NODE_INTEGER:
25271 case NODE_FLOAT:
25272 case NODE_RATIONAL:
25273 case NODE_IMAGINARY:
25274 case NODE_STR:
25275 case NODE_DSTR:
25276 case NODE_REGX:
25277 case NODE_DREGX:
25278 useless = "a literal";
25279 break;
25280 case NODE_COLON2:
25281 case NODE_COLON3:
25282 useless = "::";
25283 break;
25284 case NODE_DOT2:
25285 useless = "..";
25286 break;
25287 case NODE_DOT3:
25288 useless = "...";
25289 break;
25290 case NODE_SELF:
25291 useless = "self";
25292 break;
25293 case NODE_NIL:
25294 useless = "nil";
25295 break;
25296 case NODE_TRUE:
25297 useless = "true";
25298 break;
25299 case NODE_FALSE:
25300 useless = "false";
25301 break;
25302 case NODE_DEFINED:
25303 useless = "defined?";
25304 break;
25305 }
25306
25307 if (useless) {
25308 rb_warn1L(nd_line(node), "possibly useless use of %s in void context", WARN_S(useless));
25309 }
25310}
25311
25312/* warns useless use of block and returns the last statement node */
25313static NODE *
25314void_stmts(struct parser_params *p, NODE *node)
25315{
25316 NODE *const n = node;
25317 if (!RTEST(ruby_verbose)) return n;
25318 if (!node) return n;
25319 if (!nd_type_p(node, NODE_BLOCK)) return n;
25320
25321 while (RNODE_BLOCK(node)->nd_next) {
25322 void_expr(p, RNODE_BLOCK(node)->nd_head);
25323 node = RNODE_BLOCK(node)->nd_next;
25324 }
25325 return RNODE_BLOCK(node)->nd_head;
25326}
25327
25328static NODE *
25329remove_begin(NODE *node)
25330{
25331 NODE **n = &node, *n1 = node;
25332 while (n1 && nd_type_p(n1, NODE_BEGIN) && RNODE_BEGIN(n1)->nd_body) {
25333 *n = n1 = RNODE_BEGIN(n1)->nd_body;
25334 }
25335 return node;
25336}
25337
25338static void
25339reduce_nodes(struct parser_params *p, NODE **body)
25340{
25341 NODE *node = *body;
25342
25343 if (!node) {
25344 *body = NEW_NIL(&NULL_LOC);
25345 return;
25346 }
25347#define subnodes(type, n1, n2) \
25348 ((!type(node)->n1) ? (type(node)->n2 ? (body = &type(node)->n2, 1) : 0) : \
25349 (!type(node)->n2) ? (body = &type(node)->n1, 1) : \
25350 (reduce_nodes(p, &type(node)->n1), body = &type(node)->n2, 1))
25351
25352 while (node) {
25353 int newline = (int)nd_fl_newline(node);
25354 switch (nd_type(node)) {
25355 end:
25356 case NODE_NIL:
25357 *body = 0;
25358 return;
25359 case NODE_BEGIN:
25360 *body = node = RNODE_BEGIN(node)->nd_body;
25361 if (newline && node) nd_set_fl_newline(node);
25362 continue;
25363 case NODE_BLOCK:
25364 body = &RNODE_BLOCK(RNODE_BLOCK(node)->nd_end)->nd_head;
25365 break;
25366 case NODE_IF:
25367 case NODE_UNLESS:
25368 if (subnodes(RNODE_IF, nd_body, nd_else)) break;
25369 return;
25370 case NODE_CASE:
25371 body = &RNODE_CASE(node)->nd_body;
25372 break;
25373 case NODE_WHEN:
25374 if (!subnodes(RNODE_WHEN, nd_body, nd_next)) goto end;
25375 break;
25376 case NODE_ENSURE:
25377 body = &RNODE_ENSURE(node)->nd_head;
25378 break;
25379 case NODE_RESCUE:
25380 newline = 0; // RESBODY should not be a NEWLINE
25381 if (RNODE_RESCUE(node)->nd_else) {
25382 body = &RNODE_RESCUE(node)->nd_resq;
25383 break;
25384 }
25385 if (!subnodes(RNODE_RESCUE, nd_head, nd_resq)) goto end;
25386 break;
25387 default:
25388 return;
25389 }
25390 node = *body;
25391 if (newline && node) nd_set_fl_newline(node);
25392 }
25393
25394#undef subnodes
25395}
25396
25397static int
25398is_static_content(NODE *node)
25399{
25400 if (!node) return 1;
25401 switch (nd_type(node)) {
25402 case NODE_HASH:
25403 if (!(node = RNODE_HASH(node)->nd_head)) break;
25404 case NODE_LIST:
25405 do {
25406 if (!is_static_content(RNODE_LIST(node)->nd_head)) return 0;
25407 } while ((node = RNODE_LIST(node)->nd_next) != 0);
25408 case NODE_SYM:
25409 case NODE_REGX:
25410 case NODE_LINE:
25411 case NODE_FILE:
25412 case NODE_ENCODING:
25413 case NODE_INTEGER:
25414 case NODE_FLOAT:
25415 case NODE_RATIONAL:
25416 case NODE_IMAGINARY:
25417 case NODE_STR:
25418 case NODE_NIL:
25419 case NODE_TRUE:
25420 case NODE_FALSE:
25421 case NODE_ZLIST:
25422 break;
25423 default:
25424 return 0;
25425 }
25426 return 1;
25427}
25428
25429static int
25430assign_in_cond(struct parser_params *p, NODE *node)
25431{
25432 switch (nd_type(node)) {
25433 case NODE_MASGN:
25434 case NODE_LASGN:
25435 case NODE_DASGN:
25436 case NODE_GASGN:
25437 case NODE_IASGN:
25438 case NODE_CVASGN:
25439 case NODE_CDECL:
25440 break;
25441
25442 default:
25443 return 0;
25444 }
25445
25446 if (!get_nd_value(p, node)) return 1;
25447 if (is_static_content(get_nd_value(p, node))) {
25448 /* reports always */
25449 rb_warn0L(nd_line(get_nd_value(p, node)), "found '= literal' in conditional, should be ==");
25450 }
25451 return 1;
25452}
25453
25454enum cond_type {
25455 COND_IN_OP,
25456 COND_IN_COND,
25457 COND_IN_FF
25458};
25459
25460#define SWITCH_BY_COND_TYPE(t, w, arg) do { \
25461 switch (t) { \
25462 case COND_IN_OP: break; \
25463 case COND_IN_COND: rb_##w##0(arg "literal in condition"); break; \
25464 case COND_IN_FF: rb_##w##0(arg "literal in flip-flop"); break; \
25465 } \
25466} while (0)
25467
25468static NODE *cond0(struct parser_params*,NODE*,enum cond_type,const YYLTYPE*,bool);
25469
25470static NODE*
25471range_op(struct parser_params *p, NODE *node, const YYLTYPE *loc)
25472{
25473 enum node_type type;
25474
25475 if (node == 0) return 0;
25476
25477 type = nd_type(node);
25478 value_expr(p, node);
25479 if (type == NODE_INTEGER) {
25480 if (!e_option_supplied(p)) rb_warn0L(nd_line(node), "integer literal in flip-flop");
25481 ID lineno = rb_intern("$.");
25482 return NEW_CALL(node, tEQ, NEW_LIST(NEW_GVAR(lineno, loc), loc), loc);
25483 }
25484 return cond0(p, node, COND_IN_FF, loc, true);
25485}
25486
25487static NODE*
25488cond0(struct parser_params *p, NODE *node, enum cond_type type, const YYLTYPE *loc, bool top)
25489{
25490 if (node == 0) return 0;
25491 if (!(node = nd_once_body(node))) return 0;
25492 assign_in_cond(p, node);
25493
25494 switch (nd_type(node)) {
25495 case NODE_BEGIN:
25496 RNODE_BEGIN(node)->nd_body = cond0(p, RNODE_BEGIN(node)->nd_body, type, loc, top);
25497 break;
25498
25499 case NODE_DSTR:
25500 case NODE_EVSTR:
25501 case NODE_STR:
25502 case NODE_FILE:
25503 SWITCH_BY_COND_TYPE(type, warn, "string ");
25504 break;
25505
25506 case NODE_REGX:
25507 if (!e_option_supplied(p)) SWITCH_BY_COND_TYPE(type, warn, "regex ");
25508 nd_set_type(node, NODE_MATCH);
25509 break;
25510
25511 case NODE_DREGX:
25512 if (!e_option_supplied(p)) SWITCH_BY_COND_TYPE(type, warning, "regex ");
25513
25514 return NEW_MATCH2(node, NEW_GVAR(idLASTLINE, loc), loc);
25515
25516 case NODE_BLOCK:
25517 {
25518 NODE *end = RNODE_BLOCK(node)->nd_end;
25519 NODE **expr = &RNODE_BLOCK(end)->nd_head;
25520 if (top) top = node == end;
25521 *expr = cond0(p, *expr, type, loc, top);
25522 }
25523 break;
25524
25525 case NODE_AND:
25526 case NODE_OR:
25527 RNODE_AND(node)->nd_1st = cond0(p, RNODE_AND(node)->nd_1st, COND_IN_COND, loc, true);
25528 RNODE_AND(node)->nd_2nd = cond0(p, RNODE_AND(node)->nd_2nd, COND_IN_COND, loc, true);
25529 break;
25530
25531 case NODE_DOT2:
25532 case NODE_DOT3:
25533 if (!top) break;
25534 RNODE_DOT2(node)->nd_beg = range_op(p, RNODE_DOT2(node)->nd_beg, loc);
25535 RNODE_DOT2(node)->nd_end = range_op(p, RNODE_DOT2(node)->nd_end, loc);
25536 switch (nd_type(node)) {
25537 case NODE_DOT2:
25538 nd_set_type(node,NODE_FLIP2);
25539 rb_node_flip2_t *flip2 = RNODE_FLIP2(node); /* for debug info */
25540 (void)flip2;
25541 break;
25542 case NODE_DOT3:
25543 nd_set_type(node, NODE_FLIP3);
25544 rb_node_flip3_t *flip3 = RNODE_FLIP3(node); /* for debug info */
25545 (void)flip3;
25546 break;
25547 }
25548 break;
25549
25550 case NODE_SYM:
25551 case NODE_DSYM:
25552 SWITCH_BY_COND_TYPE(type, warning, "symbol ");
25553 break;
25554
25555 case NODE_LINE:
25556 case NODE_ENCODING:
25557 case NODE_INTEGER:
25558 case NODE_FLOAT:
25559 case NODE_RATIONAL:
25560 case NODE_IMAGINARY:
25561 SWITCH_BY_COND_TYPE(type, warning, "");
25562 break;
25563
25564 default:
25565 break;
25566 }
25567 return node;
25568}
25569
25570static NODE*
25571cond(struct parser_params *p, NODE *node, const YYLTYPE *loc)
25572{
25573 if (node == 0) return 0;
25574 return cond0(p, node, COND_IN_COND, loc, true);
25575}
25576
25577static NODE*
25578method_cond(struct parser_params *p, NODE *node, const YYLTYPE *loc)
25579{
25580 if (node == 0) return 0;
25581 return cond0(p, node, COND_IN_OP, loc, true);
25582}
25583
25584static NODE*
25585new_nil_at(struct parser_params *p, const rb_code_position_t *pos)
25586{
25587 YYLTYPE loc = {*pos, *pos};
25588 return NEW_NIL(&loc);
25589}
25590
25591static NODE*
25592new_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)
25593{
25594 if (!cc) return right;
25595 cc = cond0(p, cc, COND_IN_COND, loc, true);
25596 return newline_node(NEW_IF(cc, left, right, loc, if_keyword_loc, then_keyword_loc, end_keyword_loc));
25597}
25598
25599static NODE*
25600new_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)
25601{
25602 if (!cc) return right;
25603 cc = cond0(p, cc, COND_IN_COND, loc, true);
25604 return newline_node(NEW_UNLESS(cc, left, right, loc, keyword_loc, then_keyword_loc, end_keyword_loc));
25605}
25606
25607#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))
25608
25609static NODE*
25610logop(struct parser_params *p, ID id, NODE *left, NODE *right,
25611 const YYLTYPE *op_loc, const YYLTYPE *loc)
25612{
25613 enum node_type type = id == idAND || id == idANDOP ? NODE_AND : NODE_OR;
25614 NODE *op;
25615 value_expr(p, left);
25616 if (left && nd_type_p(left, type)) {
25617 NODE *node = left, *second;
25618 while ((second = RNODE_AND(node)->nd_2nd) != 0 && nd_type_p(second, type)) {
25619 node = second;
25620 }
25621 RNODE_AND(node)->nd_2nd = NEW_AND_OR(type, second, right, loc, op_loc);
25622 nd_set_line(RNODE_AND(node)->nd_2nd, op_loc->beg_pos.lineno);
25623 left->nd_loc.end_pos = loc->end_pos;
25624 return left;
25625 }
25626 op = NEW_AND_OR(type, left, right, loc, op_loc);
25627 nd_set_line(op, op_loc->beg_pos.lineno);
25628 return op;
25629}
25630
25631#undef NEW_AND_OR
25632
25633static void
25634no_blockarg(struct parser_params *p, NODE *node)
25635{
25636 if (nd_type_p(node, NODE_BLOCK_PASS)) {
25637 compile_error(p, "block argument should not be given");
25638 }
25639}
25640
25641static NODE *
25642ret_args(struct parser_params *p, NODE *node)
25643{
25644 if (node) {
25645 no_blockarg(p, node);
25646 if (nd_type_p(node, NODE_LIST) && !RNODE_LIST(node)->nd_next) {
25647 node = RNODE_LIST(node)->nd_head;
25648 }
25649 }
25650 return node;
25651}
25652
25653static NODE*
25654negate_lit(struct parser_params *p, NODE* node)
25655{
25656 switch (nd_type(node)) {
25657 case NODE_INTEGER:
25658 RNODE_INTEGER(node)->minus = TRUE;
25659 break;
25660 case NODE_FLOAT:
25661 RNODE_FLOAT(node)->minus = TRUE;
25662 break;
25663 case NODE_RATIONAL:
25664 RNODE_RATIONAL(node)->minus = TRUE;
25665 break;
25666 case NODE_IMAGINARY:
25667 RNODE_IMAGINARY(node)->minus = TRUE;
25668 break;
25669 }
25670 return node;
25671}
25672
25673static NODE *
25674arg_blk_pass(NODE *node1, rb_node_block_pass_t *node2)
25675{
25676 if (node2) {
25677 if (!node1) return (NODE *)node2;
25678 node2->nd_head = node1;
25679 nd_set_first_lineno(node2, nd_first_lineno(node1));
25680 nd_set_first_column(node2, nd_first_column(node1));
25681 return (NODE *)node2;
25682 }
25683 return node1;
25684}
25685
25686static bool
25687args_info_empty_p(struct rb_args_info *args)
25688{
25689 if (args->pre_args_num) return false;
25690 if (args->post_args_num) return false;
25691 if (args->rest_arg) return false;
25692 if (args->opt_args) return false;
25693 if (args->block_arg) return false;
25694 if (args->kw_args) return false;
25695 if (args->kw_rest_arg) return false;
25696 return true;
25697}
25698
25699static rb_node_args_t *
25700new_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)
25701{
25702 struct rb_args_info *args = &tail->nd_ainfo;
25703
25704 if (args->forwarding) {
25705 if (rest_arg) {
25706 yyerror1(&RNODE(tail)->nd_loc, "... after rest argument");
25707 return tail;
25708 }
25709 rest_arg = idFWD_REST;
25710 }
25711
25712 args->pre_args_num = pre_args ? pre_args->nd_plen : 0;
25713 args->pre_init = pre_args ? pre_args->nd_next : 0;
25714
25715 args->post_args_num = post_args ? post_args->nd_plen : 0;
25716 args->post_init = post_args ? post_args->nd_next : 0;
25717 args->first_post_arg = post_args ? post_args->nd_pid : 0;
25718
25719 args->rest_arg = rest_arg;
25720
25721 args->opt_args = opt_args;
25722
25723 nd_set_loc(RNODE(tail), loc);
25724
25725 return tail;
25726}
25727
25728static rb_node_args_t *
25729new_args_tail(struct parser_params *p, rb_node_kw_arg_t *kw_args, ID kw_rest_arg, ID block, const YYLTYPE *kw_rest_loc)
25730{
25731 rb_node_args_t *node = NEW_ARGS(&NULL_LOC);
25732 struct rb_args_info *args = &node->nd_ainfo;
25733 if (p->error_p) return node;
25734
25735 args->block_arg = block;
25736 args->kw_args = kw_args;
25737
25738 if (kw_args) {
25739 /*
25740 * def foo(k1: 1, kr1:, k2: 2, **krest, &b)
25741 * variable order: k1, kr1, k2, &b, internal_id, krest
25742 * #=> <reorder>
25743 * variable order: kr1, k1, k2, internal_id, krest, &b
25744 */
25745 ID kw_bits = internal_id(p), *required_kw_vars, *kw_vars;
25746 struct vtable *vtargs = p->lvtbl->args;
25747 rb_node_kw_arg_t *kwn = kw_args;
25748
25749 if (block) block = vtargs->tbl[vtargs->pos-1];
25750 vtable_pop(vtargs, !!block + !!kw_rest_arg);
25751 required_kw_vars = kw_vars = &vtargs->tbl[vtargs->pos];
25752 while (kwn) {
25753 if (!NODE_REQUIRED_KEYWORD_P(get_nd_value(p, kwn->nd_body)))
25754 --kw_vars;
25755 --required_kw_vars;
25756 kwn = kwn->nd_next;
25757 }
25758
25759 for (kwn = kw_args; kwn; kwn = kwn->nd_next) {
25760 ID vid = get_nd_vid(p, kwn->nd_body);
25761 if (NODE_REQUIRED_KEYWORD_P(get_nd_value(p, kwn->nd_body))) {
25762 *required_kw_vars++ = vid;
25763 }
25764 else {
25765 *kw_vars++ = vid;
25766 }
25767 }
25768
25769 arg_var(p, kw_bits);
25770 if (kw_rest_arg) arg_var(p, kw_rest_arg);
25771 if (block) arg_var(p, block);
25772
25773 args->kw_rest_arg = NEW_DVAR(kw_rest_arg, kw_rest_loc);
25774 }
25775 else if (kw_rest_arg == idNil) {
25776 args->no_kwarg = 1;
25777 }
25778 else if (kw_rest_arg) {
25779 args->kw_rest_arg = NEW_DVAR(kw_rest_arg, kw_rest_loc);
25780 }
25781
25782 return node;
25783}
25784
25785static rb_node_args_t *
25786args_with_numbered(struct parser_params *p, rb_node_args_t *args, int max_numparam, ID it_id)
25787{
25788 if (max_numparam > NO_PARAM || it_id) {
25789 if (!args) {
25790 YYLTYPE loc = RUBY_INIT_YYLLOC();
25791 args = new_args_tail(p, 0, 0, 0, 0);
25792 nd_set_loc(RNODE(args), &loc);
25793 }
25794 args->nd_ainfo.pre_args_num = it_id ? 1 : max_numparam;
25795 }
25796 return args;
25797}
25798
25799static NODE*
25800new_array_pattern(struct parser_params *p, NODE *constant, NODE *pre_arg, NODE *aryptn, const YYLTYPE *loc)
25801{
25802 RNODE_ARYPTN(aryptn)->nd_pconst = constant;
25803
25804 if (pre_arg) {
25805 NODE *pre_args = NEW_LIST(pre_arg, loc);
25806 if (RNODE_ARYPTN(aryptn)->pre_args) {
25807 RNODE_ARYPTN(aryptn)->pre_args = list_concat(pre_args, RNODE_ARYPTN(aryptn)->pre_args);
25808 }
25809 else {
25810 RNODE_ARYPTN(aryptn)->pre_args = pre_args;
25811 }
25812 }
25813 return aryptn;
25814}
25815
25816static NODE*
25817new_array_pattern_tail(struct parser_params *p, NODE *pre_args, int has_rest, NODE *rest_arg, NODE *post_args, const YYLTYPE *loc)
25818{
25819 if (has_rest) {
25820 rest_arg = rest_arg ? rest_arg : NODE_SPECIAL_NO_NAME_REST;
25821 }
25822 else {
25823 rest_arg = NULL;
25824 }
25825 NODE *node = NEW_ARYPTN(pre_args, rest_arg, post_args, loc);
25826
25827 return node;
25828}
25829
25830static NODE*
25831new_find_pattern(struct parser_params *p, NODE *constant, NODE *fndptn, const YYLTYPE *loc)
25832{
25833 RNODE_FNDPTN(fndptn)->nd_pconst = constant;
25834
25835 return fndptn;
25836}
25837
25838static NODE*
25839new_find_pattern_tail(struct parser_params *p, NODE *pre_rest_arg, NODE *args, NODE *post_rest_arg, const YYLTYPE *loc)
25840{
25841 pre_rest_arg = pre_rest_arg ? pre_rest_arg : NODE_SPECIAL_NO_NAME_REST;
25842 post_rest_arg = post_rest_arg ? post_rest_arg : NODE_SPECIAL_NO_NAME_REST;
25843 NODE *node = NEW_FNDPTN(pre_rest_arg, args, post_rest_arg, loc);
25844
25845 return node;
25846}
25847
25848static NODE*
25849new_hash_pattern(struct parser_params *p, NODE *constant, NODE *hshptn, const YYLTYPE *loc)
25850{
25851 RNODE_HSHPTN(hshptn)->nd_pconst = constant;
25852 return hshptn;
25853}
25854
25855static NODE*
25856new_hash_pattern_tail(struct parser_params *p, NODE *kw_args, ID kw_rest_arg, const YYLTYPE *loc)
25857{
25858 NODE *node, *kw_rest_arg_node;
25859
25860 if (kw_rest_arg == idNil) {
25861 kw_rest_arg_node = NODE_SPECIAL_NO_REST_KEYWORD;
25862 }
25863 else if (kw_rest_arg) {
25864 kw_rest_arg_node = assignable(p, kw_rest_arg, 0, loc);
25865 }
25866 else {
25867 kw_rest_arg_node = NULL;
25868 }
25869
25870 node = NEW_HSHPTN(0, kw_args, kw_rest_arg_node, loc);
25871
25872 return node;
25873}
25874
25875static NODE*
25876dsym_node(struct parser_params *p, NODE *node, const YYLTYPE *loc)
25877{
25878 if (!node) {
25879 return NEW_SYM(STR_NEW0(), loc);
25880 }
25881
25882 switch (nd_type(node)) {
25883 case NODE_DSTR:
25884 nd_set_type(node, NODE_DSYM);
25885 nd_set_loc(node, loc);
25886 break;
25887 case NODE_STR:
25888 node = str_to_sym_node(p, node, loc);
25889 break;
25890 default:
25891 node = NEW_DSYM(0, 1, NEW_LIST(node, loc), loc);
25892 break;
25893 }
25894 return node;
25895}
25896
25897static int
25898nd_type_st_key_enable_p(NODE *node)
25899{
25900 switch (nd_type(node)) {
25901 case NODE_INTEGER:
25902 case NODE_FLOAT:
25903 case NODE_RATIONAL:
25904 case NODE_IMAGINARY:
25905 case NODE_STR:
25906 case NODE_SYM:
25907 case NODE_REGX:
25908 case NODE_LINE:
25909 case NODE_FILE:
25910 case NODE_ENCODING:
25911 return true;
25912 default:
25913 return false;
25914 }
25915}
25916
25917static VALUE
25918nd_value(struct parser_params *p, NODE *node)
25919{
25920 switch (nd_type(node)) {
25921 case NODE_STR:
25922 return rb_node_str_string_val(node);
25923 case NODE_INTEGER:
25924 return rb_node_integer_literal_val(node);
25925 case NODE_FLOAT:
25926 return rb_node_float_literal_val(node);
25927 case NODE_RATIONAL:
25928 return rb_node_rational_literal_val(node);
25929 case NODE_IMAGINARY:
25930 return rb_node_imaginary_literal_val(node);
25931 case NODE_SYM:
25932 return rb_node_sym_string_val(node);
25933 case NODE_REGX:
25934 return rb_node_regx_string_val(node);
25935 case NODE_LINE:
25936 return rb_node_line_lineno_val(node);
25937 case NODE_ENCODING:
25938 return rb_node_encoding_val(node);
25939 case NODE_FILE:
25940 return rb_node_file_path_val(node);
25941 default:
25942 rb_bug("unexpected node: %s", ruby_node_name(nd_type(node)));
25944 }
25945}
25946
25947static void
25948warn_duplicate_keys(struct parser_params *p, NODE *hash)
25949{
25950 /* See https://bugs.ruby-lang.org/issues/20331 for discussion about what is warned. */
25951 p->warn_duplicate_keys_table = st_init_table_with_size(&literal_type, RNODE_LIST(hash)->as.nd_alen / 2);
25952 while (hash && RNODE_LIST(hash)->nd_next) {
25953 NODE *head = RNODE_LIST(hash)->nd_head;
25954 NODE *value = RNODE_LIST(hash)->nd_next;
25955 NODE *next = RNODE_LIST(value)->nd_next;
25956 st_data_t key;
25957 st_data_t data;
25958
25959 /* keyword splat, e.g. {k: 1, **z, k: 2} */
25960 if (!head) {
25961 head = value;
25962 }
25963
25964 if (nd_type_st_key_enable_p(head)) {
25965 key = (st_data_t)head;
25966
25967 if (st_delete(p->warn_duplicate_keys_table, &key, &data)) {
25968 rb_warn2L(nd_line((NODE *)data),
25969 "key %+"PRIsWARN" is duplicated and overwritten on line %d",
25970 nd_value(p, head), WARN_I(nd_line(head)));
25971 }
25972 st_insert(p->warn_duplicate_keys_table, (st_data_t)key, (st_data_t)hash);
25973 }
25974 hash = next;
25975 }
25976 st_free_table(p->warn_duplicate_keys_table);
25977 p->warn_duplicate_keys_table = NULL;
25978}
25979
25980static NODE *
25981new_hash(struct parser_params *p, NODE *hash, const YYLTYPE *loc)
25982{
25983 if (hash) warn_duplicate_keys(p, hash);
25984 return NEW_HASH(hash, loc);
25985}
25986
25987static void
25988error_duplicate_pattern_variable(struct parser_params *p, ID id, const YYLTYPE *loc)
25989{
25990 if (is_private_local_id(p, id)) {
25991 return;
25992 }
25993 if (st_is_member(p->pvtbl, id)) {
25994 yyerror1(loc, "duplicated variable name");
25995 }
25996 else if (p->ctxt.in_alt_pattern && id) {
25997 yyerror1(loc, "variable capture in alternative pattern");
25998 }
25999 else {
26000 p->ctxt.capture_in_pattern = 1;
26001 st_insert(p->pvtbl, (st_data_t)id, 0);
26002 }
26003}
26004
26005static void
26006error_duplicate_pattern_key(struct parser_params *p, VALUE key, const YYLTYPE *loc)
26007{
26008 if (!p->pktbl) {
26009 p->pktbl = st_init_numtable();
26010 }
26011 else if (st_is_member(p->pktbl, key)) {
26012 yyerror1(loc, "duplicated key name");
26013 return;
26014 }
26015 st_insert(p->pktbl, (st_data_t)key, 0);
26016}
26017
26018static NODE *
26019new_unique_key_hash(struct parser_params *p, NODE *hash, const YYLTYPE *loc)
26020{
26021 return NEW_HASH(hash, loc);
26022}
26023
26024static NODE *
26025new_op_assign(struct parser_params *p, NODE *lhs, ID op, NODE *rhs, struct lex_context ctxt, const YYLTYPE *loc)
26026{
26027 NODE *asgn;
26028
26029 if (lhs) {
26030 ID vid = get_nd_vid(p, lhs);
26031 YYLTYPE lhs_loc = lhs->nd_loc;
26032 if (op == tOROP) {
26033 set_nd_value(p, lhs, rhs);
26034 nd_set_loc(lhs, loc);
26035 asgn = NEW_OP_ASGN_OR(gettable(p, vid, &lhs_loc), lhs, loc);
26036 }
26037 else if (op == tANDOP) {
26038 set_nd_value(p, lhs, rhs);
26039 nd_set_loc(lhs, loc);
26040 asgn = NEW_OP_ASGN_AND(gettable(p, vid, &lhs_loc), lhs, loc);
26041 }
26042 else {
26043 asgn = lhs;
26044 rhs = NEW_CALL(gettable(p, vid, &lhs_loc), op, NEW_LIST(rhs, &rhs->nd_loc), loc);
26045 set_nd_value(p, asgn, rhs);
26046 nd_set_loc(asgn, loc);
26047 }
26048 }
26049 else {
26050 asgn = NEW_ERROR(loc);
26051 }
26052 return asgn;
26053}
26054
26055static NODE *
26056new_ary_op_assign(struct parser_params *p, NODE *ary,
26057 NODE *args, ID op, NODE *rhs, const YYLTYPE *args_loc, const YYLTYPE *loc,
26058 const YYLTYPE *call_operator_loc, const YYLTYPE *opening_loc, const YYLTYPE *closing_loc, const YYLTYPE *binary_operator_loc)
26059{
26060 NODE *asgn;
26061
26062 aryset_check(p, args);
26063 args = make_list(args, args_loc);
26064 asgn = NEW_OP_ASGN1(ary, op, args, rhs, loc, call_operator_loc, opening_loc, closing_loc, binary_operator_loc);
26065 fixpos(asgn, ary);
26066 return asgn;
26067}
26068
26069static NODE *
26070new_attr_op_assign(struct parser_params *p, NODE *lhs,
26071 ID atype, ID attr, ID op, NODE *rhs, const YYLTYPE *loc,
26072 const YYLTYPE *call_operator_loc, const YYLTYPE *message_loc, const YYLTYPE *binary_operator_loc)
26073{
26074 NODE *asgn;
26075
26076 asgn = NEW_OP_ASGN2(lhs, CALL_Q_P(atype), attr, op, rhs, loc, call_operator_loc, message_loc, binary_operator_loc);
26077 fixpos(asgn, lhs);
26078 return asgn;
26079}
26080
26081static NODE *
26082new_const_op_assign(struct parser_params *p, NODE *lhs, ID op, NODE *rhs, struct lex_context ctxt, const YYLTYPE *loc)
26083{
26084 NODE *asgn;
26085
26086 if (lhs) {
26087 asgn = NEW_OP_CDECL(lhs, op, rhs, ctxt.shareable_constant_value, loc);
26088 }
26089 else {
26090 asgn = NEW_ERROR(loc);
26091 }
26092 fixpos(asgn, lhs);
26093 return asgn;
26094}
26095
26096static NODE *
26097const_decl(struct parser_params *p, NODE *path, const YYLTYPE *loc)
26098{
26099 if (p->ctxt.in_def) {
26100#ifndef RIPPER
26101 yyerror1(loc, "dynamic constant assignment");
26102#else
26103 set_value(assign_error(p, "dynamic constant assignment", p->s_lvalue));
26104#endif
26105 }
26106 return NEW_CDECL(0, 0, (path), p->ctxt.shareable_constant_value, loc);
26107}
26108
26109#ifdef RIPPER
26110static VALUE
26111assign_error(struct parser_params *p, const char *mesg, VALUE a)
26112{
26113 a = dispatch2(assign_error, ERR_MESG(), a);
26114 ripper_error(p);
26115 return a;
26116}
26117#endif
26118
26119static NODE *
26120new_bodystmt(struct parser_params *p, NODE *head, NODE *rescue, NODE *rescue_else, NODE *ensure, const YYLTYPE *loc)
26121{
26122 NODE *result = head;
26123 if (rescue) {
26124 NODE *tmp = rescue_else ? rescue_else : rescue;
26125 YYLTYPE rescue_loc = code_loc_gen(&head->nd_loc, &tmp->nd_loc);
26126
26127 result = NEW_RESCUE(head, rescue, rescue_else, &rescue_loc);
26128 nd_set_line(result, rescue->nd_loc.beg_pos.lineno);
26129 }
26130 if (ensure) {
26131 result = NEW_ENSURE(result, ensure, loc);
26132 }
26133 fixpos(result, head);
26134 return result;
26135}
26136
26137static void
26138warn_unused_var(struct parser_params *p, struct local_vars *local)
26139{
26140 int cnt;
26141
26142 if (!local->used) return;
26143 cnt = local->used->pos;
26144 if (cnt != local->vars->pos) {
26145 rb_parser_fatal(p, "local->used->pos != local->vars->pos");
26146 }
26147#ifndef RIPPER
26148 ID *v = local->vars->tbl;
26149 ID *u = local->used->tbl;
26150 for (int i = 0; i < cnt; ++i) {
26151 if (!v[i] || (u[i] & LVAR_USED)) continue;
26152 if (is_private_local_id(p, v[i])) continue;
26153 rb_warn1L((int)u[i], "assigned but unused variable - %"PRIsWARN, rb_id2str(v[i]));
26154 }
26155#endif
26156}
26157
26158static void
26159local_push(struct parser_params *p, int toplevel_scope)
26160{
26161 struct local_vars *local;
26162 int inherits_dvars = toplevel_scope && compile_for_eval;
26163 int warn_unused_vars = RTEST(ruby_verbose);
26164
26165 local = ALLOC(struct local_vars);
26166 local->prev = p->lvtbl;
26167 local->args = vtable_alloc(0);
26168 local->vars = vtable_alloc(inherits_dvars ? DVARS_INHERIT : DVARS_TOPSCOPE);
26169#ifndef RIPPER
26170 if (toplevel_scope && compile_for_eval) warn_unused_vars = 0;
26171 if (toplevel_scope && e_option_supplied(p)) warn_unused_vars = 0;
26172#endif
26173 local->numparam.outer = 0;
26174 local->numparam.inner = 0;
26175 local->numparam.current = 0;
26176 local->it = 0;
26177 local->used = warn_unused_vars ? vtable_alloc(0) : 0;
26178
26179# if WARN_PAST_SCOPE
26180 local->past = 0;
26181# endif
26182 CMDARG_PUSH(0);
26183 COND_PUSH(0);
26184 p->lvtbl = local;
26185}
26186
26187static void
26188vtable_chain_free(struct parser_params *p, struct vtable *table)
26189{
26190 while (!DVARS_TERMINAL_P(table)) {
26191 struct vtable *cur_table = table;
26192 table = cur_table->prev;
26193 vtable_free(cur_table);
26194 }
26195}
26196
26197static void
26198local_free(struct parser_params *p, struct local_vars *local)
26199{
26200 vtable_chain_free(p, local->used);
26201
26202# if WARN_PAST_SCOPE
26203 vtable_chain_free(p, local->past);
26204# endif
26205
26206 vtable_chain_free(p, local->args);
26207 vtable_chain_free(p, local->vars);
26208
26209 ruby_sized_xfree(local, sizeof(struct local_vars));
26210}
26211
26212static void
26213local_pop(struct parser_params *p)
26214{
26215 struct local_vars *local = p->lvtbl->prev;
26216 if (p->lvtbl->used) {
26217 warn_unused_var(p, p->lvtbl);
26218 }
26219
26220 local_free(p, p->lvtbl);
26221 p->lvtbl = local;
26222
26223 CMDARG_POP();
26224 COND_POP();
26225}
26226
26227static rb_ast_id_table_t *
26228local_tbl(struct parser_params *p)
26229{
26230 int cnt_args = vtable_size(p->lvtbl->args);
26231 int cnt_vars = vtable_size(p->lvtbl->vars);
26232 int cnt = cnt_args + cnt_vars;
26233 int i, j;
26234 rb_ast_id_table_t *tbl;
26235
26236 if (cnt <= 0) return 0;
26237 tbl = rb_ast_new_local_table(p->ast, cnt);
26238 MEMCPY(tbl->ids, p->lvtbl->args->tbl, ID, cnt_args);
26239 /* remove IDs duplicated to warn shadowing */
26240 for (i = 0, j = cnt_args; i < cnt_vars; ++i) {
26241 ID id = p->lvtbl->vars->tbl[i];
26242 if (!vtable_included(p->lvtbl->args, id)) {
26243 tbl->ids[j++] = id;
26244 }
26245 }
26246 if (j < cnt) {
26247 tbl = rb_ast_resize_latest_local_table(p->ast, j);
26248 }
26249
26250 return tbl;
26251}
26252
26253static void
26254numparam_name(struct parser_params *p, ID id)
26255{
26256 if (!NUMPARAM_ID_P(id)) return;
26257 compile_error(p, "_%d is reserved for numbered parameter",
26258 NUMPARAM_ID_TO_IDX(id));
26259}
26260
26261static void
26262arg_var(struct parser_params *p, ID id)
26263{
26264 numparam_name(p, id);
26265 vtable_add(p->lvtbl->args, id);
26266}
26267
26268static void
26269local_var(struct parser_params *p, ID id)
26270{
26271 numparam_name(p, id);
26272 vtable_add(p->lvtbl->vars, id);
26273 if (p->lvtbl->used) {
26274 vtable_add(p->lvtbl->used, (ID)p->ruby_sourceline);
26275 }
26276}
26277
26278#ifndef RIPPER
26279int
26280rb_parser_local_defined(struct parser_params *p, ID id, const struct rb_iseq_struct *iseq)
26281{
26282 return rb_local_defined(id, iseq);
26283}
26284#endif
26285
26286static int
26287local_id_ref(struct parser_params *p, ID id, ID **vidrefp)
26288{
26289 struct vtable *vars, *args, *used;
26290
26291 vars = p->lvtbl->vars;
26292 args = p->lvtbl->args;
26293 used = p->lvtbl->used;
26294
26295 while (vars && !DVARS_TERMINAL_P(vars->prev)) {
26296 vars = vars->prev;
26297 args = args->prev;
26298 if (used) used = used->prev;
26299 }
26300
26301 if (vars && vars->prev == DVARS_INHERIT) {
26302 return rb_parser_local_defined(p, id, p->parent_iseq);
26303 }
26304 else if (vtable_included(args, id)) {
26305 return 1;
26306 }
26307 else {
26308 int i = vtable_included(vars, id);
26309 if (i && used && vidrefp) *vidrefp = &used->tbl[i-1];
26310 return i != 0;
26311 }
26312}
26313
26314static int
26315local_id(struct parser_params *p, ID id)
26316{
26317 return local_id_ref(p, id, NULL);
26318}
26319
26320static int
26321check_forwarding_args(struct parser_params *p)
26322{
26323 if (local_id(p, idFWD_ALL)) return TRUE;
26324 compile_error(p, "unexpected ...");
26325 return FALSE;
26326}
26327
26328static void
26329add_forwarding_args(struct parser_params *p)
26330{
26331 arg_var(p, idFWD_REST);
26332 arg_var(p, idFWD_KWREST);
26333 arg_var(p, idFWD_BLOCK);
26334 arg_var(p, idFWD_ALL);
26335}
26336
26337static void
26338forwarding_arg_check(struct parser_params *p, ID arg, ID all, const char *var)
26339{
26340 bool conflict = false;
26341
26342 struct vtable *vars, *args;
26343
26344 vars = p->lvtbl->vars;
26345 args = p->lvtbl->args;
26346
26347 while (vars && !DVARS_TERMINAL_P(vars->prev)) {
26348 conflict |= (vtable_included(args, arg) && !(all && vtable_included(args, all)));
26349 vars = vars->prev;
26350 args = args->prev;
26351 }
26352
26353 bool found = false;
26354 if (vars && vars->prev == DVARS_INHERIT && !found) {
26355 found = (rb_parser_local_defined(p, arg, p->parent_iseq) &&
26356 !(all && rb_parser_local_defined(p, all, p->parent_iseq)));
26357 }
26358 else {
26359 found = (vtable_included(args, arg) &&
26360 !(all && vtable_included(args, all)));
26361 }
26362
26363 if (!found) {
26364 compile_error(p, "no anonymous %s parameter", var);
26365 }
26366 else if (conflict) {
26367 compile_error(p, "anonymous %s parameter is also used within block", var);
26368 }
26369}
26370
26371static NODE *
26372new_args_forward_call(struct parser_params *p, NODE *leading, const YYLTYPE *loc, const YYLTYPE *argsloc)
26373{
26374 NODE *rest = NEW_LVAR(idFWD_REST, loc);
26375 NODE *kwrest = list_append(p, NEW_LIST(0, loc), NEW_LVAR(idFWD_KWREST, loc));
26376 rb_node_block_pass_t *block = NEW_BLOCK_PASS(NEW_LVAR(idFWD_BLOCK, loc), argsloc, &NULL_LOC);
26377 NODE *args = leading ? rest_arg_append(p, leading, rest, argsloc) : NEW_SPLAT(rest, loc, &NULL_LOC);
26378 block->forwarding = TRUE;
26379 args = arg_append(p, args, new_hash(p, kwrest, loc), argsloc);
26380 return arg_blk_pass(args, block);
26381}
26382
26383static NODE *
26384numparam_push(struct parser_params *p)
26385{
26386 struct local_vars *local = p->lvtbl;
26387 NODE *inner = local->numparam.inner;
26388 if (!local->numparam.outer) {
26389 local->numparam.outer = local->numparam.current;
26390 }
26391 local->numparam.inner = 0;
26392 local->numparam.current = 0;
26393 local->it = 0;
26394 return inner;
26395}
26396
26397static void
26398numparam_pop(struct parser_params *p, NODE *prev_inner)
26399{
26400 struct local_vars *local = p->lvtbl;
26401 if (prev_inner) {
26402 /* prefer first one */
26403 local->numparam.inner = prev_inner;
26404 }
26405 else if (local->numparam.current) {
26406 /* current and inner are exclusive */
26407 local->numparam.inner = local->numparam.current;
26408 }
26409 if (p->max_numparam > NO_PARAM) {
26410 /* current and outer are exclusive */
26411 local->numparam.current = local->numparam.outer;
26412 local->numparam.outer = 0;
26413 }
26414 else {
26415 /* no numbered parameter */
26416 local->numparam.current = 0;
26417 }
26418 local->it = 0;
26419}
26420
26421static const struct vtable *
26422dyna_push(struct parser_params *p)
26423{
26424 p->lvtbl->args = vtable_alloc(p->lvtbl->args);
26425 p->lvtbl->vars = vtable_alloc(p->lvtbl->vars);
26426 if (p->lvtbl->used) {
26427 p->lvtbl->used = vtable_alloc(p->lvtbl->used);
26428 }
26429 return p->lvtbl->args;
26430}
26431
26432static void
26433dyna_pop_vtable(struct parser_params *p, struct vtable **vtblp)
26434{
26435 struct vtable *tmp = *vtblp;
26436 *vtblp = tmp->prev;
26437# if WARN_PAST_SCOPE
26438 if (p->past_scope_enabled) {
26439 tmp->prev = p->lvtbl->past;
26440 p->lvtbl->past = tmp;
26441 return;
26442 }
26443# endif
26444 vtable_free(tmp);
26445}
26446
26447static void
26448dyna_pop_1(struct parser_params *p)
26449{
26450 struct vtable *tmp;
26451
26452 if ((tmp = p->lvtbl->used) != 0) {
26453 warn_unused_var(p, p->lvtbl);
26454 p->lvtbl->used = p->lvtbl->used->prev;
26455 vtable_free(tmp);
26456 }
26457 dyna_pop_vtable(p, &p->lvtbl->args);
26458 dyna_pop_vtable(p, &p->lvtbl->vars);
26459}
26460
26461static void
26462dyna_pop(struct parser_params *p, const struct vtable *lvargs)
26463{
26464 while (p->lvtbl->args != lvargs) {
26465 dyna_pop_1(p);
26466 if (!p->lvtbl->args) {
26467 struct local_vars *local = p->lvtbl->prev;
26468 ruby_sized_xfree(p->lvtbl, sizeof(*p->lvtbl));
26469 p->lvtbl = local;
26470 }
26471 }
26472 dyna_pop_1(p);
26473}
26474
26475static int
26476dyna_in_block(struct parser_params *p)
26477{
26478 return !DVARS_TERMINAL_P(p->lvtbl->vars) && p->lvtbl->vars->prev != DVARS_TOPSCOPE;
26479}
26480
26481#ifndef RIPPER
26482int
26483dvar_defined_ref(struct parser_params *p, ID id, ID **vidrefp)
26484{
26485 struct vtable *vars, *args, *used;
26486 int i;
26487
26488 args = p->lvtbl->args;
26489 vars = p->lvtbl->vars;
26490 used = p->lvtbl->used;
26491
26492 while (!DVARS_TERMINAL_P(vars)) {
26493 if (vtable_included(args, id)) {
26494 return 1;
26495 }
26496 if ((i = vtable_included(vars, id)) != 0) {
26497 if (used && vidrefp) *vidrefp = &used->tbl[i-1];
26498 return 1;
26499 }
26500 args = args->prev;
26501 vars = vars->prev;
26502 if (!vidrefp) used = 0;
26503 if (used) used = used->prev;
26504 }
26505
26506 if (vars == DVARS_INHERIT && !NUMPARAM_ID_P(id)) {
26507 return rb_dvar_defined(id, p->parent_iseq);
26508 }
26509
26510 return 0;
26511}
26512#endif
26513
26514static int
26515dvar_defined(struct parser_params *p, ID id)
26516{
26517 return dvar_defined_ref(p, id, NULL);
26518}
26519
26520static int
26521dvar_curr(struct parser_params *p, ID id)
26522{
26523 return (vtable_included(p->lvtbl->args, id) ||
26524 vtable_included(p->lvtbl->vars, id));
26525}
26526
26527static void
26528reg_fragment_enc_error(struct parser_params* p, rb_parser_string_t *str, int c)
26529{
26530 compile_error(p,
26531 "regexp encoding option '%c' differs from source encoding '%s'",
26532 c, rb_enc_name(rb_parser_str_get_encoding(str)));
26533}
26534
26535#ifndef RIPPER
26536static rb_encoding *
26537find_enc(struct parser_params* p, const char *name)
26538{
26539 int idx = rb_enc_find_index(name);
26540 if (idx < 0) {
26541 rb_bug("unknown encoding name: %s", name);
26542 }
26543
26544 return rb_enc_from_index(idx);
26545}
26546
26547static rb_encoding *
26548kcode_to_enc(struct parser_params* p, int kcode)
26549{
26550 rb_encoding *enc;
26551
26552 switch (kcode) {
26553 case ENC_ASCII8BIT:
26554 enc = rb_ascii8bit_encoding();
26555 break;
26556 case ENC_EUC_JP:
26557 enc = find_enc(p, "EUC-JP");
26558 break;
26559 case ENC_Windows_31J:
26560 enc = find_enc(p, "Windows-31J");
26561 break;
26562 case ENC_UTF8:
26563 enc = rb_utf8_encoding();
26564 break;
26565 default:
26566 enc = NULL;
26567 break;
26568 }
26569
26570 return enc;
26571}
26572
26573int
26574rb_reg_fragment_setenc(struct parser_params* p, rb_parser_string_t *str, int options)
26575{
26576 int c = RE_OPTION_ENCODING_IDX(options);
26577
26578 if (c) {
26579 int opt, idx;
26580 rb_encoding *enc;
26581
26582 char_to_option_kcode(c, &opt, &idx);
26583 enc = kcode_to_enc(p, idx);
26584 if (enc != rb_parser_str_get_encoding(str) &&
26585 !rb_parser_is_ascii_string(p, str)) {
26586 goto error;
26587 }
26588 rb_parser_string_set_encoding(str, enc);
26589 }
26590 else if (RE_OPTION_ENCODING_NONE(options)) {
26591 if (!PARSER_ENCODING_IS_ASCII8BIT(p, str) &&
26592 !rb_parser_is_ascii_string(p, str)) {
26593 c = 'n';
26594 goto error;
26595 }
26596 rb_parser_enc_associate(p, str, rb_ascii8bit_encoding());
26597 }
26598 else if (rb_is_usascii_enc(p->enc)) {
26599 rb_parser_enc_associate(p, str, rb_ascii8bit_encoding());
26600 }
26601 return 0;
26602
26603 error:
26604 return c;
26605}
26606#endif
26607
26608static void
26609reg_fragment_setenc(struct parser_params* p, rb_parser_string_t *str, int options)
26610{
26611 int c = rb_reg_fragment_setenc(p, str, options);
26612 if (c) reg_fragment_enc_error(p, str, c);
26613}
26614
26615#ifndef UNIVERSAL_PARSER
26616typedef struct {
26617 struct parser_params* parser;
26618 rb_encoding *enc;
26619 NODE *succ_block;
26620 const YYLTYPE *loc;
26621 rb_parser_assignable_func assignable;
26623
26624static int
26625reg_named_capture_assign_iter(const OnigUChar *name, const OnigUChar *name_end,
26626 int back_num, int *back_refs, OnigRegex regex, void *arg0)
26627{
26629 struct parser_params* p = arg->parser;
26630 rb_encoding *enc = arg->enc;
26631 long len = name_end - name;
26632 const char *s = (const char *)name;
26633
26634 return rb_reg_named_capture_assign_iter_impl(p, s, len, enc, &arg->succ_block, arg->loc, arg->assignable);
26635}
26636
26637static NODE *
26638reg_named_capture_assign(struct parser_params* p, VALUE regexp, const YYLTYPE *loc, rb_parser_assignable_func assignable)
26639{
26641
26642 arg.parser = p;
26643 arg.enc = rb_enc_get(regexp);
26644 arg.succ_block = 0;
26645 arg.loc = loc;
26646 arg.assignable = assignable;
26647 onig_foreach_name(RREGEXP_PTR(regexp), reg_named_capture_assign_iter, &arg);
26648
26649 if (!arg.succ_block) return 0;
26650 return RNODE_BLOCK(arg.succ_block)->nd_next;
26651}
26652#endif
26653
26654#ifndef RIPPER
26655NODE *
26656rb_parser_assignable(struct parser_params *p, ID id, NODE *val, const YYLTYPE *loc)
26657{
26658 return assignable(p, id, val, loc);
26659}
26660
26661int
26662rb_reg_named_capture_assign_iter_impl(struct parser_params *p, const char *s, long len,
26663 rb_encoding *enc, NODE **succ_block, const rb_code_location_t *loc, rb_parser_assignable_func assignable)
26664{
26665 ID var;
26666 NODE *node, *succ;
26667
26668 if (!len) return ST_CONTINUE;
26669 if (!VALID_SYMNAME_P(s, len, enc, ID_LOCAL))
26670 return ST_CONTINUE;
26671
26672 var = intern_cstr(s, len, enc);
26673 if (len < MAX_WORD_LENGTH && rb_reserved_word(s, (int)len)) {
26674 if (!lvar_defined(p, var)) return ST_CONTINUE;
26675 }
26676 node = node_assign(p, assignable(p, var, 0, loc), NEW_SYM(rb_id2str(var), loc), NO_LEX_CTXT, loc);
26677 succ = *succ_block;
26678 if (!succ) succ = NEW_ERROR(loc);
26679 succ = block_append(p, succ, node);
26680 *succ_block = succ;
26681 return ST_CONTINUE;
26682}
26683#endif
26684
26685static VALUE
26686parser_reg_compile(struct parser_params* p, rb_parser_string_t *str, int options)
26687{
26688 VALUE str2;
26689 reg_fragment_setenc(p, str, options);
26690 str2 = rb_str_new_parser_string(str);
26691 return rb_parser_reg_compile(p, str2, options);
26692}
26693
26694#ifndef RIPPER
26695VALUE
26696rb_parser_reg_compile(struct parser_params* p, VALUE str, int options)
26697{
26698 return rb_reg_compile(str, options & RE_OPTION_MASK, p->ruby_sourcefile, p->ruby_sourceline);
26699}
26700#endif
26701
26702static VALUE
26703reg_compile(struct parser_params* p, rb_parser_string_t *str, int options)
26704{
26705 VALUE re;
26706 VALUE err;
26707
26708 err = rb_errinfo();
26709 re = parser_reg_compile(p, str, options);
26710 if (NIL_P(re)) {
26711 VALUE m = rb_attr_get(rb_errinfo(), idMesg);
26712 rb_set_errinfo(err);
26713 compile_error(p, "%"PRIsVALUE, m);
26714 return Qnil;
26715 }
26716 return re;
26717}
26718
26719#ifndef RIPPER
26720void
26721rb_ruby_parser_set_options(struct parser_params *p, int print, int loop, int chomp, int split)
26722{
26723 p->do_print = print;
26724 p->do_loop = loop;
26725 p->do_chomp = chomp;
26726 p->do_split = split;
26727}
26728
26729static NODE *
26730parser_append_options(struct parser_params *p, NODE *node)
26731{
26732 static const YYLTYPE default_location = {{1, 0}, {1, 0}};
26733 const YYLTYPE *const LOC = &default_location;
26734
26735 if (p->do_print) {
26736 NODE *print = (NODE *)NEW_FCALL(rb_intern("print"),
26737 NEW_LIST(NEW_GVAR(idLASTLINE, LOC), LOC),
26738 LOC);
26739 node = block_append(p, node, print);
26740 }
26741
26742 if (p->do_loop) {
26743 NODE *irs = NEW_LIST(NEW_GVAR(rb_intern("$/"), LOC), LOC);
26744
26745 if (p->do_split) {
26746 ID ifs = rb_intern("$;");
26747 ID fields = rb_intern("$F");
26748 NODE *args = NEW_LIST(NEW_GVAR(ifs, LOC), LOC);
26749 NODE *split = NEW_GASGN(fields,
26750 NEW_CALL(NEW_GVAR(idLASTLINE, LOC),
26751 rb_intern("split"), args, LOC),
26752 LOC);
26753 node = block_append(p, split, node);
26754 }
26755 if (p->do_chomp) {
26756 NODE *chomp = NEW_SYM(rb_str_new_cstr("chomp"), LOC);
26757 chomp = list_append(p, NEW_LIST(chomp, LOC), NEW_TRUE(LOC));
26758 irs = list_append(p, irs, NEW_HASH(chomp, LOC));
26759 }
26760
26761 node = NEW_WHILE((NODE *)NEW_FCALL(idGets, irs, LOC), node, 1, LOC, &NULL_LOC, &NULL_LOC);
26762 }
26763
26764 return node;
26765}
26766
26767void
26768rb_init_parse(void)
26769{
26770 /* just to suppress unused-function warnings */
26771 (void)nodetype;
26772 (void)nodeline;
26773}
26774
26775ID
26776internal_id(struct parser_params *p)
26777{
26778 return rb_make_temporary_id(vtable_size(p->lvtbl->args) + vtable_size(p->lvtbl->vars));
26779}
26780#endif /* !RIPPER */
26781
26782static void
26783parser_initialize(struct parser_params *p)
26784{
26785 /* note: we rely on TypedData_Make_Struct to set most fields to 0 */
26786 p->command_start = TRUE;
26787 p->ruby_sourcefile_string = Qnil;
26788 p->lex.lpar_beg = -1; /* make lambda_beginning_p() == FALSE at first */
26789 string_buffer_init(p);
26790 p->node_id = 0;
26791 p->delayed.token = NULL;
26792 p->frozen_string_literal = -1; /* not specified */
26793#ifndef RIPPER
26794 p->error_buffer = Qfalse;
26795 p->end_expect_token_locations = NULL;
26796 p->token_id = 0;
26797 p->tokens = NULL;
26798#else
26799 p->result = Qnil;
26800 p->parsing_thread = Qnil;
26801 p->s_value = Qnil;
26802 p->s_lvalue = Qnil;
26803 p->s_value_stack = rb_ary_new();
26804#endif
26805 p->debug_buffer = Qnil;
26806 p->debug_output = rb_ractor_stdout();
26807 p->enc = rb_utf8_encoding();
26808 p->exits = 0;
26809}
26810
26811#ifdef RIPPER
26812#define rb_ruby_parser_mark ripper_parser_mark
26813#define rb_ruby_parser_free ripper_parser_free
26814#define rb_ruby_parser_memsize ripper_parser_memsize
26815#endif
26816
26817void
26818rb_ruby_parser_mark(void *ptr)
26819{
26820 struct parser_params *p = (struct parser_params*)ptr;
26821
26822 rb_gc_mark(p->ruby_sourcefile_string);
26823#ifndef RIPPER
26824 rb_gc_mark(p->error_buffer);
26825#else
26826 rb_gc_mark(p->value);
26827 rb_gc_mark(p->result);
26828 rb_gc_mark(p->parsing_thread);
26829 rb_gc_mark(p->s_value);
26830 rb_gc_mark(p->s_lvalue);
26831 rb_gc_mark(p->s_value_stack);
26832#endif
26833 rb_gc_mark(p->debug_buffer);
26834 rb_gc_mark(p->debug_output);
26835}
26836
26837void
26838rb_ruby_parser_free(void *ptr)
26839{
26840 struct parser_params *p = (struct parser_params*)ptr;
26841 struct local_vars *local, *prev;
26842
26843 if (p->ast) {
26844 rb_ast_free(p->ast);
26845 }
26846
26847 if (p->warn_duplicate_keys_table) {
26848 st_free_table(p->warn_duplicate_keys_table);
26849 }
26850
26851#ifndef RIPPER
26852 if (p->tokens) {
26853 rb_parser_ary_free(p, p->tokens);
26854 }
26855#endif
26856
26857 if (p->tokenbuf) {
26858 ruby_sized_xfree(p->tokenbuf, p->toksiz);
26859 }
26860
26861 for (local = p->lvtbl; local; local = prev) {
26862 prev = local->prev;
26863 local_free(p, local);
26864 }
26865
26866 {
26867 token_info *ptinfo;
26868 while ((ptinfo = p->token_info) != 0) {
26869 p->token_info = ptinfo->next;
26870 xfree(ptinfo);
26871 }
26872 }
26873 string_buffer_free(p);
26874
26875 if (p->pvtbl) {
26876 st_free_table(p->pvtbl);
26877 }
26878
26879 if (CASE_LABELS_ENABLED_P(p->case_labels)) {
26880 st_free_table(p->case_labels);
26881 }
26882
26883 xfree(p->lex.strterm);
26884 p->lex.strterm = 0;
26885
26886 xfree(ptr);
26887}
26888
26889size_t
26890rb_ruby_parser_memsize(const void *ptr)
26891{
26892 struct parser_params *p = (struct parser_params*)ptr;
26893 struct local_vars *local;
26894 size_t size = sizeof(*p);
26895
26896 size += p->toksiz;
26897 for (local = p->lvtbl; local; local = local->prev) {
26898 size += sizeof(*local);
26899 if (local->vars) size += local->vars->capa * sizeof(ID);
26900 }
26901 return size;
26902}
26903
26904#ifndef RIPPER
26905#undef rb_reserved_word
26906
26907const struct kwtable *
26908rb_reserved_word(const char *str, unsigned int len)
26909{
26910 return reserved_word(str, len);
26911}
26912
26913#ifdef UNIVERSAL_PARSER
26915rb_ruby_parser_allocate(const rb_parser_config_t *config)
26916{
26917 /* parser_initialize expects fields to be set to 0 */
26918 rb_parser_t *p = (rb_parser_t *)config->calloc(1, sizeof(rb_parser_t));
26919 p->config = config;
26920 return p;
26921}
26922
26924rb_ruby_parser_new(const rb_parser_config_t *config)
26925{
26926 /* parser_initialize expects fields to be set to 0 */
26927 rb_parser_t *p = rb_ruby_parser_allocate(config);
26928 parser_initialize(p);
26929 return p;
26930}
26931#else
26933rb_ruby_parser_allocate(void)
26934{
26935 /* parser_initialize expects fields to be set to 0 */
26936 rb_parser_t *p = (rb_parser_t *)ruby_xcalloc(1, sizeof(rb_parser_t));
26937 return p;
26938}
26939
26941rb_ruby_parser_new(void)
26942{
26943 /* parser_initialize expects fields to be set to 0 */
26944 rb_parser_t *p = rb_ruby_parser_allocate();
26945 parser_initialize(p);
26946 return p;
26947}
26948#endif
26949
26951rb_ruby_parser_set_context(rb_parser_t *p, const struct rb_iseq_struct *base, int main)
26952{
26953 p->error_buffer = main ? Qfalse : Qnil;
26954 p->parent_iseq = base;
26955 return p;
26956}
26957
26958void
26959rb_ruby_parser_set_script_lines(rb_parser_t *p)
26960{
26961 p->debug_lines = rb_parser_ary_new_capa_for_script_line(p, 10);
26962}
26963
26964void
26965rb_ruby_parser_error_tolerant(rb_parser_t *p)
26966{
26967 p->error_tolerant = 1;
26968}
26969
26970void
26971rb_ruby_parser_keep_tokens(rb_parser_t *p)
26972{
26973 p->keep_tokens = 1;
26974 p->tokens = rb_parser_ary_new_capa_for_ast_token(p, 10);
26975}
26976
26978rb_ruby_parser_encoding(rb_parser_t *p)
26979{
26980 return p->enc;
26981}
26982
26983int
26984rb_ruby_parser_end_seen_p(rb_parser_t *p)
26985{
26986 return p->ruby__end__seen;
26987}
26988
26989int
26990rb_ruby_parser_set_yydebug(rb_parser_t *p, int flag)
26991{
26992 p->debug = flag;
26993 return flag;
26994}
26995#endif /* !RIPPER */
26996
26997#ifdef RIPPER
26998int
26999rb_ruby_parser_get_yydebug(rb_parser_t *p)
27000{
27001 return p->debug;
27002}
27003
27004void
27005rb_ruby_parser_set_value(rb_parser_t *p, VALUE value)
27006{
27007 p->value = value;
27008}
27009
27010int
27011rb_ruby_parser_error_p(rb_parser_t *p)
27012{
27013 return p->error_p;
27014}
27015
27016VALUE
27017rb_ruby_parser_debug_output(rb_parser_t *p)
27018{
27019 return p->debug_output;
27020}
27021
27022void
27023rb_ruby_parser_set_debug_output(rb_parser_t *p, VALUE output)
27024{
27025 p->debug_output = output;
27026}
27027
27028VALUE
27029rb_ruby_parser_parsing_thread(rb_parser_t *p)
27030{
27031 return p->parsing_thread;
27032}
27033
27034void
27035rb_ruby_parser_set_parsing_thread(rb_parser_t *p, VALUE parsing_thread)
27036{
27037 p->parsing_thread = parsing_thread;
27038}
27039
27040void
27041rb_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)
27042{
27043 p->lex.gets = gets;
27044 p->lex.input = input;
27045 p->eofp = 0;
27046 p->ruby_sourcefile_string = sourcefile_string;
27047 p->ruby_sourcefile = sourcefile;
27048 p->ruby_sourceline = sourceline;
27049}
27050
27051VALUE
27052rb_ruby_parser_result(rb_parser_t *p)
27053{
27054 return p->result;
27055}
27056
27058rb_ruby_parser_enc(rb_parser_t *p)
27059{
27060 return p->enc;
27061}
27062
27063VALUE
27064rb_ruby_parser_ruby_sourcefile_string(rb_parser_t *p)
27065{
27066 return p->ruby_sourcefile_string;
27067}
27068
27069int
27070rb_ruby_parser_ruby_sourceline(rb_parser_t *p)
27071{
27072 return p->ruby_sourceline;
27073}
27074
27075int
27076rb_ruby_parser_lex_state(rb_parser_t *p)
27077{
27078 return p->lex.state;
27079}
27080
27081void
27082rb_ruby_ripper_parse0(rb_parser_t *p)
27083{
27084 parser_prepare(p);
27085 p->ast = rb_ast_new();
27086 ripper_yyparse((void*)p);
27087 rb_ast_free(p->ast);
27088 p->ast = 0;
27089 p->eval_tree = 0;
27090 p->eval_tree_begin = 0;
27091}
27092
27093int
27094rb_ruby_ripper_dedent_string(rb_parser_t *p, rb_parser_string_t *string, int width)
27095{
27096 return dedent_string(p, string, width);
27097}
27098
27099int
27100rb_ruby_ripper_initialized_p(rb_parser_t *p)
27101{
27102 return p->lex.input != 0;
27103}
27104
27105void
27106rb_ruby_ripper_parser_initialize(rb_parser_t *p)
27107{
27108 parser_initialize(p);
27109}
27110
27111long
27112rb_ruby_ripper_column(rb_parser_t *p)
27113{
27114 return p->lex.ptok - p->lex.pbeg;
27115}
27116
27117long
27118rb_ruby_ripper_token_len(rb_parser_t *p)
27119{
27120 return p->lex.pcur - p->lex.ptok;
27121}
27122
27124rb_ruby_ripper_lex_lastline(rb_parser_t *p)
27125{
27126 return p->lex.lastline;
27127}
27128
27129VALUE
27130rb_ruby_ripper_lex_state_name(struct parser_params *p, int state)
27131{
27132 return rb_parser_lex_state_name(p, (enum lex_state_e)state);
27133}
27134
27135#ifdef UNIVERSAL_PARSER
27137rb_ripper_parser_params_allocate(const rb_parser_config_t *config)
27138{
27139 rb_parser_t *p = (rb_parser_t *)config->calloc(1, sizeof(rb_parser_t));
27140 p->config = config;
27141 return p;
27142}
27143#endif
27144
27145struct parser_params*
27146rb_ruby_ripper_parser_allocate(void)
27147{
27148 return (struct parser_params *)ruby_xcalloc(1, sizeof(struct parser_params));
27149}
27150#endif /* RIPPER */
27151
27152#ifndef RIPPER
27153void
27154rb_parser_printf(struct parser_params *p, const char *fmt, ...)
27155{
27156 va_list ap;
27157 VALUE mesg = p->debug_buffer;
27158
27159 if (NIL_P(mesg)) p->debug_buffer = mesg = rb_str_new(0, 0);
27160 va_start(ap, fmt);
27161 rb_str_vcatf(mesg, fmt, ap);
27162 va_end(ap);
27163 if (char_at_end(p, mesg, 0) == '\n') {
27164 rb_io_write(p->debug_output, mesg);
27165 p->debug_buffer = Qnil;
27166 }
27167}
27168
27169static void
27170parser_compile_error(struct parser_params *p, const rb_code_location_t *loc, const char *fmt, ...)
27171{
27172 va_list ap;
27173 int lineno, column;
27174
27175 if (loc) {
27176 lineno = loc->end_pos.lineno;
27177 column = loc->end_pos.column;
27178 }
27179 else {
27180 lineno = p->ruby_sourceline;
27181 column = rb_long2int(p->lex.pcur - p->lex.pbeg);
27182 }
27183
27184 rb_io_flush(p->debug_output);
27185 p->error_p = 1;
27186 va_start(ap, fmt);
27187 p->error_buffer =
27188 rb_syntax_error_append(p->error_buffer,
27189 p->ruby_sourcefile_string,
27190 lineno, column,
27191 p->enc, fmt, ap);
27192 va_end(ap);
27193}
27194
27195static size_t
27196count_char(const char *str, int c)
27197{
27198 int n = 0;
27199 while (str[n] == c) ++n;
27200 return n;
27201}
27202
27203/*
27204 * strip enclosing double-quotes, same as the default yytnamerr except
27205 * for that single-quotes matching back-quotes do not stop stripping.
27206 *
27207 * "\"`class' keyword\"" => "`class' keyword"
27208 */
27209size_t
27210rb_yytnamerr(struct parser_params *p, char *yyres, const char *yystr)
27211{
27212 if (*yystr == '"') {
27213 size_t yyn = 0, bquote = 0;
27214 const char *yyp = yystr;
27215
27216 while (*++yyp) {
27217 switch (*yyp) {
27218 case '\'':
27219 if (!bquote) {
27220 bquote = count_char(yyp+1, '\'') + 1;
27221 if (yyres) memcpy(&yyres[yyn], yyp, bquote);
27222 yyn += bquote;
27223 yyp += bquote - 1;
27224 break;
27225 }
27226 else {
27227 if (bquote && count_char(yyp+1, '\'') + 1 == bquote) {
27228 if (yyres) memcpy(yyres + yyn, yyp, bquote);
27229 yyn += bquote;
27230 yyp += bquote - 1;
27231 bquote = 0;
27232 break;
27233 }
27234 if (yyp[1] && yyp[1] != '\'' && yyp[2] == '\'') {
27235 if (yyres) memcpy(yyres + yyn, yyp, 3);
27236 yyn += 3;
27237 yyp += 2;
27238 break;
27239 }
27240 goto do_not_strip_quotes;
27241 }
27242
27243 case ',':
27244 goto do_not_strip_quotes;
27245
27246 case '\\':
27247 if (*++yyp != '\\')
27248 goto do_not_strip_quotes;
27249 /* Fall through. */
27250 default:
27251 if (yyres)
27252 yyres[yyn] = *yyp;
27253 yyn++;
27254 break;
27255
27256 case '"':
27257 case '\0':
27258 if (yyres)
27259 yyres[yyn] = '\0';
27260 return yyn;
27261 }
27262 }
27263 do_not_strip_quotes: ;
27264 }
27265
27266 if (!yyres) return strlen(yystr);
27267
27268 return (YYSIZE_T)(yystpcpy(yyres, yystr) - yyres);
27269}
27270#endif
27271
27272#ifdef RIPPER
27273#define validate(x) (void)(x)
27274
27275static VALUE
27276ripper_dispatch0(struct parser_params *p, ID mid)
27277{
27278 return rb_funcall(p->value, mid, 0);
27279}
27280
27281static VALUE
27282ripper_dispatch1(struct parser_params *p, ID mid, VALUE a)
27283{
27284 validate(a);
27285 return rb_funcall(p->value, mid, 1, a);
27286}
27287
27288static VALUE
27289ripper_dispatch2(struct parser_params *p, ID mid, VALUE a, VALUE b)
27290{
27291 validate(a);
27292 validate(b);
27293 return rb_funcall(p->value, mid, 2, a, b);
27294}
27295
27296static VALUE
27297ripper_dispatch3(struct parser_params *p, ID mid, VALUE a, VALUE b, VALUE c)
27298{
27299 validate(a);
27300 validate(b);
27301 validate(c);
27302 return rb_funcall(p->value, mid, 3, a, b, c);
27303}
27304
27305static VALUE
27306ripper_dispatch4(struct parser_params *p, ID mid, VALUE a, VALUE b, VALUE c, VALUE d)
27307{
27308 validate(a);
27309 validate(b);
27310 validate(c);
27311 validate(d);
27312 return rb_funcall(p->value, mid, 4, a, b, c, d);
27313}
27314
27315static VALUE
27316ripper_dispatch5(struct parser_params *p, ID mid, VALUE a, VALUE b, VALUE c, VALUE d, VALUE e)
27317{
27318 validate(a);
27319 validate(b);
27320 validate(c);
27321 validate(d);
27322 validate(e);
27323 return rb_funcall(p->value, mid, 5, a, b, c, d, e);
27324}
27325
27326static VALUE
27327ripper_dispatch7(struct parser_params *p, ID mid, VALUE a, VALUE b, VALUE c, VALUE d, VALUE e, VALUE f, VALUE g)
27328{
27329 validate(a);
27330 validate(b);
27331 validate(c);
27332 validate(d);
27333 validate(e);
27334 validate(f);
27335 validate(g);
27336 return rb_funcall(p->value, mid, 7, a, b, c, d, e, f, g);
27337}
27338
27339void
27340ripper_error(struct parser_params *p)
27341{
27342 p->error_p = TRUE;
27343}
27344
27345VALUE
27346ripper_value(struct parser_params *p)
27347{
27348 (void)yystpcpy; /* may not used in newer bison */
27349
27350 return p->value;
27351}
27352
27353#endif /* RIPPER */
27354/*
27355 * Local variables:
27356 * mode: c
27357 * c-file-style: "ruby"
27358 * End:
27359 */
#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:653
#define ruby_verbose
This variable controls whether the interpreter is in debug mode.
Definition error.h:475
VALUE rb_eRuntimeError
RuntimeError exception.
Definition error.c:1429
VALUE rb_eSyntaxError
SyntaxError exception.
Definition error.c:1448
VALUE rb_class_new_instance(int argc, const VALUE *argv, VALUE klass)
Allocates, then initialises an instance of the given class.
Definition object.c:2232
Encoding relates APIs.
long rb_str_coderange_scan_restartable(const char *str, const char *end, rb_encoding *enc, int *cr)
Scans the passed string until it finds something odd.
Definition string.c:829
VALUE rb_funcall(VALUE recv, ID mid, int n,...)
Calls a method.
Definition vm_eval.c:1117
VALUE rb_ary_new(void)
Allocates a new, empty array.
VALUE rb_ary_pop(VALUE ary)
Destructively deletes an element from the end of the passed array and returns what was deleted.
VALUE rb_ary_push(VALUE ary, VALUE elem)
Special case of rb_ary_cat() that it adds only one element.
VALUE rb_ary_entry(VALUE ary, long off)
Queries an element of an array.
#define rb_str_new(str, len)
Allocates an instance of rb_cString.
Definition string.h:1497
#define rb_usascii_str_new(str, len)
Identical to rb_str_new, except it generates a string of "US ASCII" encoding.
Definition string.h:1531
VALUE rb_str_cat(VALUE dst, const char *src, long srclen)
Destructively appends the passed contents to the string.
Definition string.c:3563
#define rb_strlen_lit(str)
Length of a string literal.
Definition string.h:1691
#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:1655
#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:1513
ID rb_sym2id(VALUE obj)
Converts an instance of rb_cSymbol into an ID.
Definition symbol.c:943
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.