Ruby 4.1.0dev (2026-09-14 revision e7551c08831c26cdfca6c9ca4bface71e621c93b)
parse.c
1/* A Bison parser, made by Lrama 0.8.0. */
2
3/* Bison implementation for Yacc-like parsers in C
4
5 Copyright (C) 1984, 1989-1990, 2000-2015, 2018-2021 Free Software Foundation,
6 Inc.
7
8 This program is free software: you can redistribute it and/or modify
9 it under the terms of the GNU General Public License as published by
10 the Free Software Foundation, either version 3 of the License, or
11 (at your option) any later version.
12
13 This program is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU General Public License for more details.
17
18 You should have received a copy of the GNU General Public License
19 along with this program. If not, see <https://www.gnu.org/licenses/>. */
20
21/* As a special exception, you may create a larger work that contains
22 part or all of the Bison parser skeleton and distribute that work
23 under terms of your choice, so long as that work isn't itself a
24 parser generator using the skeleton or a modified version thereof
25 as a parser skeleton. Alternatively, if you modify or redistribute
26 the parser skeleton itself, you may (at your option) remove this
27 special exception, which will cause the skeleton and the resulting
28 Bison output files to be licensed under the GNU General Public
29 License without this special exception.
30
31 This special exception was added by the Free Software Foundation in
32 version 2.2 of Bison. */
33
34/* C LALR(1) parser skeleton written by Richard Stallman, by
35 simplifying the original so-called "semantic" parser. */
36
37/* DO NOT RELY ON FEATURES THAT ARE NOT DOCUMENTED in the manual,
38 especially those whose name start with YY_ or yy_. They are
39 private implementation details that can be changed or removed. */
40
41/* All symbols defined below should begin with yy or YY, to avoid
42 infringing on user name space. This should be done even for local
43 variables, as they might otherwise be expanded by user macros.
44 There are some unavoidable exceptions within include files to
45 define necessary library symbols; they are noted "INFRINGES ON
46 USER NAME SPACE" below. */
47
48/* Identify Bison output, and Bison version. */
49#define YYBISON 30802
50
51/* Bison version string. */
52#define YYBISON_VERSION "3.8.2"
53
54/* Skeleton name. */
55#define YYSKELETON_NAME "yacc.c"
56
57/* Pure parsers. */
58#define YYPURE 1
59
60/* Push parsers. */
61#define YYPUSH 0
62
63/* Pull parsers. */
64#define YYPULL 1
65
66
67/* First part of user prologue. */
68#line 12 "parse.y"
69
70
71#if !YYPURE
72# error needs pure parser
73#endif
74#define YYDEBUG 1
75#define YYERROR_VERBOSE 1
76#define YYSTACK_USE_ALLOCA 0
77
78/* For Ripper */
79#ifdef RUBY_EXTCONF_H
80# include RUBY_EXTCONF_H
81#endif
82
83#include "ruby/internal/config.h"
84#include "internal/thread.h"
85
86#include <errno.h>
87
88#ifdef UNIVERSAL_PARSER
89
90#include "internal/ruby_parser.h"
91#include "parser_node.h"
92#include "universal_parser.c"
93
94#ifdef RIPPER
95#define STATIC_ID2SYM p->config->static_id2sym
96#define rb_str_coderange_scan_restartable p->config->str_coderange_scan_restartable
97#endif
98
99#else
100
101#include "internal.h"
102#include "internal/array.h"
103#include "internal/compile.h"
104#include "internal/compilers.h"
105#include "internal/complex.h"
106#include "internal/encoding.h"
107#include "internal/error.h"
108#include "internal/gc.h"
109#include "internal/hash.h"
110#include "internal/io.h"
111#include "internal/numeric.h"
112#include "internal/parse.h"
113#include "internal/rational.h"
114#include "internal/re.h"
115#include "internal/ruby_parser.h"
116#include "internal/symbol.h"
117#include "internal/thread.h"
118#include "node.h"
119#include "parser_node.h"
120#include "probes.h"
121#include "regenc.h"
122#include "ruby/encoding.h"
123#include "ruby/regex.h"
124#include "ruby/ruby.h"
125#include "ruby/st.h"
126#include "ruby/util.h"
127#include "ruby/ractor.h"
128#include "symbol.h"
129
130#ifndef RIPPER
131static VALUE
132syntax_error_new(void)
133{
135}
136#endif
137
138static NODE *reg_named_capture_assign(struct parser_params* p, VALUE regexp, const YYLTYPE *loc, rb_parser_assignable_func assignable);
139
140#define compile_callback rb_suppress_tracing
141#endif /* !UNIVERSAL_PARSER */
142
143#define NODE_SPECIAL_EMPTY_ARGS ((NODE *)-1)
144#define NODE_EMPTY_ARGS_P(node) ((node) == NODE_SPECIAL_EMPTY_ARGS)
145
146static int rb_parser_string_hash_cmp(rb_parser_string_t *str1, rb_parser_string_t *str2);
147
148#ifndef RIPPER
149static rb_parser_string_t *rb_parser_string_deep_copy(struct parser_params *p, const rb_parser_string_t *original);
150#endif
151
152static int
153node_integer_cmp(rb_node_integer_t *n1, rb_node_integer_t *n2)
154{
155 return (n1->minus != n2->minus ||
156 n1->base != n2->base ||
157 strcmp(n1->val, n2->val));
158}
159
160static int
161node_float_cmp(rb_node_float_t *n1, rb_node_float_t *n2)
162{
163 return (n1->minus != n2->minus ||
164 strcmp(n1->val, n2->val));
165}
166
167static int
168node_rational_cmp(rb_node_rational_t *n1, rb_node_rational_t *n2)
169{
170 return (n1->minus != n2->minus ||
171 n1->base != n2->base ||
172 n1->seen_point != n2->seen_point ||
173 strcmp(n1->val, n2->val));
174}
175
176static int
177node_imaginary_cmp(rb_node_imaginary_t *n1, rb_node_imaginary_t *n2)
178{
179 return (n1->minus != n2->minus ||
180 n1->base != n2->base ||
181 n1->seen_point != n2->seen_point ||
182 n1->type != n2->type ||
183 strcmp(n1->val, n2->val));
184}
185
186static int
187rb_parser_regx_hash_cmp(rb_node_regx_t *n1, rb_node_regx_t *n2)
188{
189 return (n1->options != n2->options ||
190 rb_parser_string_hash_cmp(n1->string, n2->string));
191}
192
193static st_index_t rb_parser_str_hash(rb_parser_string_t *str);
194static st_index_t rb_char_p_hash(const char *c);
195
196static int
197literal_cmp(st_data_t val, st_data_t lit)
198{
199 if (val == lit) return 0;
200
201 NODE *node_val = RNODE(val);
202 NODE *node_lit = RNODE(lit);
203 enum node_type type_val = nd_type(node_val);
204 enum node_type type_lit = nd_type(node_lit);
205
206 if (type_val != type_lit) {
207 return -1;
208 }
209
210 switch (type_lit) {
211 case NODE_INTEGER:
212 return node_integer_cmp(RNODE_INTEGER(node_val), RNODE_INTEGER(node_lit));
213 case NODE_FLOAT:
214 return node_float_cmp(RNODE_FLOAT(node_val), RNODE_FLOAT(node_lit));
215 case NODE_RATIONAL:
216 return node_rational_cmp(RNODE_RATIONAL(node_val), RNODE_RATIONAL(node_lit));
217 case NODE_IMAGINARY:
218 return node_imaginary_cmp(RNODE_IMAGINARY(node_val), RNODE_IMAGINARY(node_lit));
219 case NODE_STR:
220 return rb_parser_string_hash_cmp(RNODE_STR(node_val)->string, RNODE_STR(node_lit)->string);
221 case NODE_SYM:
222 return rb_parser_string_hash_cmp(RNODE_SYM(node_val)->string, RNODE_SYM(node_lit)->string);
223 case NODE_REGX:
224 return rb_parser_regx_hash_cmp(RNODE_REGX(node_val), RNODE_REGX(node_lit));
225 case NODE_LINE:
226 return node_val->nd_loc.beg_pos.lineno != node_lit->nd_loc.beg_pos.lineno;
227 case NODE_FILE:
228 return rb_parser_string_hash_cmp(RNODE_FILE(node_val)->path, RNODE_FILE(node_lit)->path);
229 case NODE_ENCODING:
230 return RNODE_ENCODING(node_val)->enc != RNODE_ENCODING(node_lit)->enc;
231 default:
232#ifdef UNIVERSAL_PARSER
233 abort();
234#else
235 rb_bug("unexpected node: %s, %s", ruby_node_name(type_val), ruby_node_name(type_lit));
236#endif
237 }
238}
239
240static st_index_t
241literal_hash(st_data_t a)
242{
243 NODE *node = (NODE *)a;
244 enum node_type type = nd_type(node);
245
246 switch (type) {
247 case NODE_INTEGER:
248 return rb_char_p_hash(RNODE_INTEGER(node)->val);
249 case NODE_FLOAT:
250 return rb_char_p_hash(RNODE_FLOAT(node)->val);
251 case NODE_RATIONAL:
252 return rb_char_p_hash(RNODE_RATIONAL(node)->val);
253 case NODE_IMAGINARY:
254 return rb_char_p_hash(RNODE_IMAGINARY(node)->val);
255 case NODE_STR:
256 return rb_parser_str_hash(RNODE_STR(node)->string);
257 case NODE_SYM:
258 return rb_parser_str_hash(RNODE_SYM(node)->string);
259 case NODE_REGX:
260 return rb_parser_str_hash(RNODE_REGX(node)->string);
261 case NODE_LINE:
262 return (st_index_t)node->nd_loc.beg_pos.lineno;
263 case NODE_FILE:
264 return rb_parser_str_hash(RNODE_FILE(node)->path);
265 case NODE_ENCODING:
266 return (st_index_t)RNODE_ENCODING(node)->enc;
267 default:
268#ifdef UNIVERSAL_PARSER
269 abort();
270#else
271 rb_bug("unexpected node: %s", ruby_node_name(type));
272#endif
273 }
274}
275
276static inline int
277parse_isascii(int c)
278{
279 return '\0' <= c && c <= '\x7f';
280}
281
282#undef ISASCII
283#define ISASCII parse_isascii
284
285static inline int
286parse_isspace(int c)
287{
288 return c == ' ' || ('\t' <= c && c <= '\r');
289}
290
291#undef ISSPACE
292#define ISSPACE parse_isspace
293
294static inline int
295parse_iscntrl(int c)
296{
297 return ('\0' <= c && c < ' ') || c == '\x7f';
298}
299
300#undef ISCNTRL
301#define ISCNTRL(c) parse_iscntrl(c)
302
303static inline int
304parse_isupper(int c)
305{
306 return 'A' <= c && c <= 'Z';
307}
308
309static inline int
310parse_islower(int c)
311{
312 return 'a' <= c && c <= 'z';
313}
314
315static inline int
316parse_isalpha(int c)
317{
318 return parse_isupper(c) || parse_islower(c);
319}
320
321#undef ISALPHA
322#define ISALPHA(c) parse_isalpha(c)
323
324static inline int
325parse_isdigit(int c)
326{
327 return '0' <= c && c <= '9';
328}
329
330#undef ISDIGIT
331#define ISDIGIT(c) parse_isdigit(c)
332
333static inline int
334parse_isalnum(int c)
335{
336 return ISALPHA(c) || ISDIGIT(c);
337}
338
339#undef ISALNUM
340#define ISALNUM(c) parse_isalnum(c)
341
342static inline int
343parse_isxdigit(int c)
344{
345 return ISDIGIT(c) || ('A' <= c && c <= 'F') || ('a' <= c && c <= 'f');
346}
347
348#undef ISXDIGIT
349#define ISXDIGIT(c) parse_isxdigit(c)
350
351#include "parser_st.h"
352
353#undef STRCASECMP
354#define STRCASECMP rb_parser_st_locale_insensitive_strcasecmp
355
356#undef STRNCASECMP
357#define STRNCASECMP rb_parser_st_locale_insensitive_strncasecmp
358
359#ifdef RIPPER
360#include "ripper_init.h"
361#endif
362
363enum rescue_context {
364 before_rescue,
365 after_rescue,
366 after_else,
367 after_ensure,
368};
369
371 unsigned int in_defined: 1;
372 unsigned int in_kwarg: 1;
373 unsigned int in_argdef: 1;
374 unsigned int in_def: 1;
375 unsigned int in_class: 1;
376 unsigned int has_trailing_semicolon: 1;
377 BITFIELD(enum rb_parser_shareability, shareable_constant_value, 2);
378 BITFIELD(enum rescue_context, in_rescue, 2);
379 unsigned int cant_return: 1;
380 unsigned int in_alt_pattern: 1;
381 unsigned int capture_in_pattern: 1;
382};
383
385
386#if defined(__GNUC__) && !defined(__clang__)
387// Suppress "parameter passing for argument of type 'struct
388// lex_context' changed" notes. `struct lex_context` is file scope,
389// and has no ABI compatibility issue.
393// Not sure why effective even after popped.
394#endif
395
396#include "parse.h"
397
398#define NO_LEX_CTXT (struct lex_context){0}
399
400#ifndef WARN_PAST_SCOPE
401# define WARN_PAST_SCOPE 0
402#endif
403
404#define TAB_WIDTH 8
405
406#define yydebug (p->debug) /* disable the global variable definition */
407
408#define YYFPRINTF(out, ...) rb_parser_printf(p, __VA_ARGS__)
409#define YY_LOCATION_PRINT(File, loc, p) \
410 rb_parser_printf(p, "%d.%d-%d.%d", \
411 (loc).beg_pos.lineno, (loc).beg_pos.column,\
412 (loc).end_pos.lineno, (loc).end_pos.column)
413#define YYLLOC_DEFAULT(Current, Rhs, N) \
414 do \
415 if (N) \
416 { \
417 (Current).beg_pos = YYRHSLOC(Rhs, 1).beg_pos; \
418 (Current).end_pos = YYRHSLOC(Rhs, N).end_pos; \
419 } \
420 else \
421 { \
422 (Current).beg_pos = YYRHSLOC(Rhs, 0).end_pos; \
423 (Current).end_pos = YYRHSLOC(Rhs, 0).end_pos; \
424 } \
425 while (0)
426#define YY_(Msgid) \
427 (((Msgid)[0] == 'm') && (strcmp((Msgid), "memory exhausted") == 0) ? \
428 "nesting too deep" : (Msgid))
429
430#define RUBY_SET_YYLLOC_FROM_STRTERM_HEREDOC(Current) \
431 rb_parser_set_location_from_strterm_heredoc(p, &p->lex.strterm->u.heredoc, &(Current))
432#define RUBY_SET_YYLLOC_OF_DELAYED_TOKEN(Current) \
433 rb_parser_set_location_of_delayed_token(p, &(Current))
434#define RUBY_SET_YYLLOC_OF_HEREDOC_END(Current) \
435 rb_parser_set_location_of_heredoc_end(p, &(Current))
436#define RUBY_SET_YYLLOC_OF_DUMMY_END(Current) \
437 rb_parser_set_location_of_dummy_end(p, &(Current))
438#define RUBY_SET_YYLLOC_OF_NONE(Current) \
439 rb_parser_set_location_of_none(p, &(Current))
440#define RUBY_SET_YYLLOC(Current) \
441 rb_parser_set_location(p, &(Current))
442#define RUBY_INIT_YYLLOC() \
443 { \
444 {p->ruby_sourceline, (int)(p->lex.ptok - p->lex.pbeg)}, \
445 {p->ruby_sourceline, (int)(p->lex.pcur - p->lex.pbeg)}, \
446 }
447
448#define IS_lex_state_for(x, ls) ((x) & (ls))
449#define IS_lex_state_all_for(x, ls) (((x) & (ls)) == (ls))
450#define IS_lex_state(ls) IS_lex_state_for(p->lex.state, (ls))
451#define IS_lex_state_all(ls) IS_lex_state_all_for(p->lex.state, (ls))
452
453# define SET_LEX_STATE(ls) \
454 parser_set_lex_state(p, ls, __LINE__)
455static inline enum lex_state_e parser_set_lex_state(struct parser_params *p, enum lex_state_e ls, int line);
456
457typedef VALUE stack_type;
458
459static const rb_code_location_t NULL_LOC = { {0, -1}, {0, -1} };
460
461# define SHOW_BITSTACK(stack, name) (p->debug ? rb_parser_show_bitstack(p, stack, name, __LINE__) : (void)0)
462# define BITSTACK_PUSH(stack, n) (((p->stack) = ((p->stack)<<1)|((n)&1)), SHOW_BITSTACK(p->stack, #stack"(push)"))
463# define BITSTACK_POP(stack) (((p->stack) = (p->stack) >> 1), SHOW_BITSTACK(p->stack, #stack"(pop)"))
464# define BITSTACK_SET_P(stack) (SHOW_BITSTACK(p->stack, #stack), (p->stack)&1)
465# define BITSTACK_SET(stack, n) ((p->stack)=(n), SHOW_BITSTACK(p->stack, #stack"(set)"))
466
467/* A flag to identify keyword_do_cond, "do" keyword after condition expression.
468 Examples: `while ... do`, `until ... do`, and `for ... in ... do` */
469#define COND_PUSH(n) BITSTACK_PUSH(cond_stack, (n))
470#define COND_POP() BITSTACK_POP(cond_stack)
471#define COND_P() BITSTACK_SET_P(cond_stack)
472#define COND_SET(n) BITSTACK_SET(cond_stack, (n))
473
474/* A flag to identify keyword_do_block; "do" keyword after command_call.
475 Example: `foo 1, 2 do`. */
476#define CMDARG_PUSH(n) BITSTACK_PUSH(cmdarg_stack, (n))
477#define CMDARG_POP() BITSTACK_POP(cmdarg_stack)
478#define CMDARG_P() BITSTACK_SET_P(cmdarg_stack)
479#define CMDARG_SET(n) BITSTACK_SET(cmdarg_stack, (n))
480
481struct vtable {
482 ID *tbl;
483 int pos;
484 int capa;
485 struct vtable *prev;
486};
487
489 struct vtable *args;
490 struct vtable *vars;
491 struct vtable *used;
492# if WARN_PAST_SCOPE
493 struct vtable *past;
494# endif
495 struct local_vars *prev;
496 struct {
497 NODE *outer, *inner, *current;
498 } numparam;
499 NODE *it;
500};
501
503 NODE *node;
504 YYLTYPE opening_loc;
505 YYLTYPE closing_loc;
507
508enum {
509 ORDINAL_PARAM = -1,
510 NO_PARAM = 0,
511 NUMPARAM_MAX = 9,
512};
513
514#define DVARS_INHERIT ((void*)1)
515#define DVARS_TOPSCOPE NULL
516#define DVARS_TERMINAL_P(tbl) ((tbl) == DVARS_INHERIT || (tbl) == DVARS_TOPSCOPE)
517
518typedef struct token_info {
519 const char *token;
521 int indent;
522 int nonspc;
523 struct token_info *next;
524} token_info;
525
530
532 struct parser_string_buffer_elem *next;
533 long len; /* Total length of allocated buf */
534 long used; /* Current usage of buf */
535 rb_parser_string_t *buf[FLEX_ARY_LEN];
537
542
543#define AFTER_HEREDOC_WITHOUT_TERMINATOR ((rb_parser_string_t *)1)
544
545/*
546 Structure of Lexer Buffer:
547
548 lex.pbeg lex.ptok lex.pcur lex.pend
549 | | | |
550 |------------+------------+------------|
551 |<---------->|
552 token
553*/
555 YYSTYPE *lval;
556 YYLTYPE *yylloc;
557
558 struct {
559 rb_strterm_t *strterm;
560 rb_parser_lex_gets_func *gets;
561 rb_parser_input_data input;
562 parser_string_buffer_t string_buffer;
563 rb_parser_string_t *lastline;
564 rb_parser_string_t *nextline;
565 const char *pbeg;
566 const char *pcur;
567 const char *pend;
568 const char *ptok;
569 enum lex_state_e state;
570 /* track the nest level of any parens "()[]{}" */
571 int paren_nest;
572 /* keep p->lex.paren_nest at the beginning of lambda "->" to detect tLAMBEG and keyword_do_LAMBDA */
573 int lpar_beg;
574 /* track the nest level of only braces "{}" */
575 int brace_nest;
576 } lex;
577 /* Cache the tail of the and/or chain most recently built by logop(), so a
578 * left-associative chain does not rescan its right branch on every
579 * operator. head is the chain's top node, tail the node whose nd_2nd is the
580 * next insertion point. */
581 struct {
582 NODE *head;
583 NODE *tail;
584 } logop;
585 stack_type cond_stack;
586 stack_type cmdarg_stack;
587 int tokidx;
588 int toksiz;
589 int heredoc_end;
590 int heredoc_indent;
591 int heredoc_line_indent;
592 char *tokenbuf;
593 struct local_vars *lvtbl;
594 st_table *pvtbl;
595 st_table *pktbl;
596 int line_count;
597 int ruby_sourceline; /* current line no. */
598 const char *ruby_sourcefile; /* current source file */
599 VALUE ruby_sourcefile_string;
600 rb_encoding *enc;
602 st_table *case_labels;
603 rb_node_exits_t *exits;
604
605 VALUE debug_buffer;
606 VALUE debug_output;
607
608 struct {
609 rb_parser_string_t *token;
610 int beg_line;
611 int beg_col;
612 int end_line;
613 int end_col;
614 } delayed;
615
616 rb_ast_t *ast;
617 int node_id;
618
619 st_table *warn_duplicate_keys_table;
620
621 int max_numparam;
622 ID it_id;
623
624 struct lex_context ctxt;
625
626 NODE *eval_tree_begin;
627 NODE *eval_tree;
628 const struct rb_iseq_struct *parent_iseq;
629
630#ifdef UNIVERSAL_PARSER
631 const rb_parser_config_t *config;
632#endif
633 /* compile_option */
634 signed int frozen_string_literal:2; /* -1: not specified, 0: false, 1: true */
635
636 unsigned int command_start:1;
637 unsigned int eofp: 1;
638 unsigned int ruby__end__seen: 1;
639 unsigned int debug: 1;
640 unsigned int has_shebang: 1;
641 unsigned int token_seen: 1;
642 unsigned int token_info_enabled: 1;
643# if WARN_PAST_SCOPE
644 unsigned int past_scope_enabled: 1;
645# endif
646 unsigned int error_p: 1;
647 unsigned int cr_seen: 1;
648
649 /* Streaming hash state of the source bytes read so far. */
650 rb_source_hash_state_t source_hash;
651
652#ifndef RIPPER
653 /* Ruby core only */
654
655 unsigned int do_print: 1;
656 unsigned int do_loop: 1;
657 unsigned int do_chomp: 1;
658 unsigned int do_split: 1;
659 unsigned int error_tolerant: 1;
660 unsigned int keep_tokens: 1;
661
662 VALUE error_buffer;
663 rb_parser_ary_t *debug_lines;
664 /*
665 * Store specific keyword locations to generate dummy end token.
666 * Refer to the tail of list element.
667 */
669 /* id for terms */
670 int token_id;
671 /* Array for term tokens */
672 rb_parser_ary_t *tokens;
673#else
674 /* Ripper only */
675
676 VALUE value;
677 VALUE result;
678 VALUE parsing_thread;
679 VALUE s_value; /* Token VALUE */
680 VALUE s_lvalue; /* VALUE generated by rule action (reduce) */
681 VALUE s_value_stack;
682#endif
683};
684
685#define NUMPARAM_ID_P(id) numparam_id_p(p, id)
686#define NUMPARAM_ID_TO_IDX(id) (unsigned int)(((id) >> ID_SCOPE_SHIFT) - (tNUMPARAM_1 - 1))
687#define NUMPARAM_IDX_TO_ID(idx) TOKEN2LOCALID((tNUMPARAM_1 - 1 + (idx)))
688static int
689numparam_id_p(struct parser_params *p, ID id)
690{
691 if (!is_local_id(id) || id < (tNUMPARAM_1 << ID_SCOPE_SHIFT)) return 0;
692 unsigned int idx = NUMPARAM_ID_TO_IDX(id);
693 return idx > 0 && idx <= NUMPARAM_MAX;
694}
695static void numparam_name(struct parser_params *p, ID id);
696
697#ifdef RIPPER
698static void
699after_shift(struct parser_params *p)
700{
701 if (p->debug) {
702 rb_parser_printf(p, "after-shift: %+"PRIsVALUE"\n", p->s_value);
703 }
704 rb_ary_push(p->s_value_stack, p->s_value);
705 p->s_value = Qnil;
706}
707
708static void
709before_reduce(int len, struct parser_params *p)
710{
711 // Initialize $$ with $1.
712 if (len) p->s_lvalue = rb_ary_entry(p->s_value_stack, -len);
713}
714
715static void
716after_reduce(int len, struct parser_params *p)
717{
718 for (int i = 0; i < len; i++) {
719 VALUE tos = rb_ary_pop(p->s_value_stack);
720 if (p->debug) {
721 rb_parser_printf(p, "after-reduce pop: %+"PRIsVALUE"\n", tos);
722 }
723 }
724 if (p->debug) {
725 rb_parser_printf(p, "after-reduce push: %+"PRIsVALUE"\n", p->s_lvalue);
726 }
727 rb_ary_push(p->s_value_stack, p->s_lvalue);
728 p->s_lvalue = Qnil;
729}
730
731static void
732after_shift_error_token(struct parser_params *p)
733{
734 if (p->debug) {
735 rb_parser_printf(p, "after-shift-error-token:\n");
736 }
737 rb_ary_push(p->s_value_stack, Qnil);
738}
739
740static void
741after_pop_stack(int len, struct parser_params *p)
742{
743 for (int i = 0; i < len; i++) {
744 VALUE tos = rb_ary_pop(p->s_value_stack);
745 if (p->debug) {
746 rb_parser_printf(p, "after-pop-stack pop: %+"PRIsVALUE"\n", tos);
747 }
748 }
749}
750#else
751static void
752after_shift(struct parser_params *p)
753{
754}
755
756static void
757before_reduce(int len, struct parser_params *p)
758{
759}
760
761static void
762after_reduce(int len, struct parser_params *p)
763{
764}
765
766static void
767after_shift_error_token(struct parser_params *p)
768{
769}
770
771static void
772after_pop_stack(int len, struct parser_params *p)
773{
774}
775#endif
776
777#define intern_cstr(n,l,en) rb_intern3(n,l,en)
778
779#define STRING_NEW0() rb_parser_encoding_string_new(p,0,0,p->enc)
780
781#define STR_NEW(ptr,len) rb_enc_str_new((ptr),(len),p->enc)
782#define STR_NEW0() rb_enc_str_new(0,0,p->enc)
783#define STR_NEW2(ptr) rb_enc_str_new((ptr),strlen(ptr),p->enc)
784#define STR_NEW3(ptr,len,e,func) parser_str_new(p, (ptr),(len),(e),(func),p->enc)
785#define TOK_INTERN() intern_cstr(tok(p), toklen(p), p->enc)
786#define VALID_SYMNAME_P(s, l, enc, type) (rb_enc_symname_type(s, l, enc, (1U<<(type))) == (int)(type))
787
788#ifndef RIPPER
789static inline int
790char_at_end(struct parser_params *p, VALUE str, int when_empty)
791{
792 long len = RSTRING_LEN(str);
793 return len > 0 ? (unsigned char)RSTRING_PTR(str)[len-1] : when_empty;
794}
795#endif
796
797static void
798pop_pvtbl(struct parser_params *p, st_table *tbl)
799{
800 st_free_table(p->pvtbl);
801 p->pvtbl = tbl;
802}
803
804static void
805pop_pktbl(struct parser_params *p, st_table *tbl)
806{
807 if (p->pktbl) st_free_table(p->pktbl);
808 p->pktbl = tbl;
809}
810
811#define STRING_BUF_DEFAULT_LEN 16
812
813static void
814string_buffer_init(struct parser_params *p)
815{
816 parser_string_buffer_t *buf = &p->lex.string_buffer;
817 const size_t size = offsetof(parser_string_buffer_elem_t, buf) + sizeof(rb_parser_string_t *) * STRING_BUF_DEFAULT_LEN;
818
819 buf->head = buf->last = xmalloc(size);
820 buf->head->len = STRING_BUF_DEFAULT_LEN;
821 buf->head->used = 0;
822 buf->head->next = NULL;
823}
824
825static void
826string_buffer_append(struct parser_params *p, rb_parser_string_t *str)
827{
828 parser_string_buffer_t *buf = &p->lex.string_buffer;
829
830 if (buf->head->used >= buf->head->len) {
832 long n = buf->head->len * 2;
833 const size_t size = offsetof(parser_string_buffer_elem_t, buf) + sizeof(rb_parser_string_t *) * n;
834
835 elem = xmalloc(size);
836 elem->len = n;
837 elem->used = 0;
838 elem->next = NULL;
839 buf->last->next = elem;
840 buf->last = elem;
841 }
842 buf->last->buf[buf->last->used++] = str;
843}
844
845static void
846string_buffer_free(struct parser_params *p)
847{
848 parser_string_buffer_elem_t *elem = p->lex.string_buffer.head;
849
850 while (elem) {
851 parser_string_buffer_elem_t *next_elem = elem->next;
852
853 for (long i = 0; i < elem->used; i++) {
854 rb_parser_string_free(p, elem->buf[i]);
855 }
856
857 xfree(elem);
858 elem = next_elem;
859 }
860}
861
862#ifndef RIPPER
863static void flush_debug_buffer(struct parser_params *p, VALUE out, VALUE str);
864
865static void
866debug_end_expect_token_locations(struct parser_params *p, const char *name)
867{
868 if(p->debug) {
869 VALUE mesg = rb_sprintf("%s: [", name);
870 int i = 0;
871 for (end_expect_token_locations_t *loc = p->end_expect_token_locations; loc; loc = loc->prev) {
872 if (i > 0)
873 rb_str_cat_cstr(mesg, ", ");
874 rb_str_catf(mesg, "[%d, %d]", loc->pos->lineno, loc->pos->column);
875 i++;
876 }
877 rb_str_cat_cstr(mesg, "]\n");
878 flush_debug_buffer(p, p->debug_output, mesg);
879 }
880}
881
882static void
883push_end_expect_token_locations(struct parser_params *p, const rb_code_position_t *pos)
884{
885 if(!p->error_tolerant) return;
886
889 locations->pos = pos;
890 locations->prev = p->end_expect_token_locations;
891 p->end_expect_token_locations = locations;
892
893 debug_end_expect_token_locations(p, "push_end_expect_token_locations");
894}
895
896static void
897pop_end_expect_token_locations(struct parser_params *p)
898{
899 if(!p->end_expect_token_locations) return;
900
901 end_expect_token_locations_t *locations = p->end_expect_token_locations->prev;
902 ruby_xfree_sized(p->end_expect_token_locations, sizeof(end_expect_token_locations_t));
903 p->end_expect_token_locations = locations;
904
905 debug_end_expect_token_locations(p, "pop_end_expect_token_locations");
906}
907
909peek_end_expect_token_locations(struct parser_params *p)
910{
911 return p->end_expect_token_locations;
912}
913
914static const char *
915parser_token2char(struct parser_params *p, enum yytokentype tok)
916{
917 switch ((int) tok) {
918#define TOKEN2CHAR(tok) case tok: return (#tok);
919#define TOKEN2CHAR2(tok, name) case tok: return (name);
920 TOKEN2CHAR2(' ', "word_sep");
921 TOKEN2CHAR2('!', "!")
922 TOKEN2CHAR2('%', "%");
923 TOKEN2CHAR2('&', "&");
924 TOKEN2CHAR2('*', "*");
925 TOKEN2CHAR2('+', "+");
926 TOKEN2CHAR2('-', "-");
927 TOKEN2CHAR2('/', "/");
928 TOKEN2CHAR2('<', "<");
929 TOKEN2CHAR2('=', "=");
930 TOKEN2CHAR2('>', ">");
931 TOKEN2CHAR2('?', "?");
932 TOKEN2CHAR2('^', "^");
933 TOKEN2CHAR2('|', "|");
934 TOKEN2CHAR2('~', "~");
935 TOKEN2CHAR2(':', ":");
936 TOKEN2CHAR2(',', ",");
937 TOKEN2CHAR2('.', ".");
938 TOKEN2CHAR2(';', ";");
939 TOKEN2CHAR2('`', "`");
940 TOKEN2CHAR2('\n', "nl");
941 TOKEN2CHAR2('{', "\"{\"");
942 TOKEN2CHAR2('}', "\"}\"");
943 TOKEN2CHAR2('[', "\"[\"");
944 TOKEN2CHAR2(']', "\"]\"");
945 TOKEN2CHAR2('(', "\"(\"");
946 TOKEN2CHAR2(')', "\")\"");
947 TOKEN2CHAR2('\\', "backslash");
948 TOKEN2CHAR(keyword_class);
949 TOKEN2CHAR(keyword_module);
950 TOKEN2CHAR(keyword_def);
951 TOKEN2CHAR(keyword_undef);
952 TOKEN2CHAR(keyword_begin);
953 TOKEN2CHAR(keyword_rescue);
954 TOKEN2CHAR(keyword_ensure);
955 TOKEN2CHAR(keyword_end);
956 TOKEN2CHAR(keyword_if);
957 TOKEN2CHAR(keyword_unless);
958 TOKEN2CHAR(keyword_then);
959 TOKEN2CHAR(keyword_elsif);
960 TOKEN2CHAR(keyword_else);
961 TOKEN2CHAR(keyword_case);
962 TOKEN2CHAR(keyword_when);
963 TOKEN2CHAR(keyword_while);
964 TOKEN2CHAR(keyword_until);
965 TOKEN2CHAR(keyword_for);
966 TOKEN2CHAR(keyword_break);
967 TOKEN2CHAR(keyword_next);
968 TOKEN2CHAR(keyword_redo);
969 TOKEN2CHAR(keyword_retry);
970 TOKEN2CHAR(keyword_in);
971 TOKEN2CHAR(keyword_do);
972 TOKEN2CHAR(keyword_do_cond);
973 TOKEN2CHAR(keyword_do_block);
974 TOKEN2CHAR(keyword_do_LAMBDA);
975 TOKEN2CHAR(keyword_return);
976 TOKEN2CHAR(keyword_yield);
977 TOKEN2CHAR(keyword_super);
978 TOKEN2CHAR(keyword_self);
979 TOKEN2CHAR(keyword_nil);
980 TOKEN2CHAR(keyword_true);
981 TOKEN2CHAR(keyword_false);
982 TOKEN2CHAR(keyword_and);
983 TOKEN2CHAR(keyword_or);
984 TOKEN2CHAR(keyword_not);
985 TOKEN2CHAR(modifier_if);
986 TOKEN2CHAR(modifier_unless);
987 TOKEN2CHAR(modifier_while);
988 TOKEN2CHAR(modifier_until);
989 TOKEN2CHAR(modifier_rescue);
990 TOKEN2CHAR(keyword_alias);
991 TOKEN2CHAR(keyword_defined);
992 TOKEN2CHAR(keyword_BEGIN);
993 TOKEN2CHAR(keyword_END);
994 TOKEN2CHAR(keyword__LINE__);
995 TOKEN2CHAR(keyword__FILE__);
996 TOKEN2CHAR(keyword__ENCODING__);
997 TOKEN2CHAR(tIDENTIFIER);
998 TOKEN2CHAR(tFID);
999 TOKEN2CHAR(tGVAR);
1000 TOKEN2CHAR(tIVAR);
1001 TOKEN2CHAR(tCONSTANT);
1002 TOKEN2CHAR(tCVAR);
1003 TOKEN2CHAR(tLABEL);
1004 TOKEN2CHAR(tINTEGER);
1005 TOKEN2CHAR(tFLOAT);
1006 TOKEN2CHAR(tRATIONAL);
1007 TOKEN2CHAR(tIMAGINARY);
1008 TOKEN2CHAR(tCHAR);
1009 TOKEN2CHAR(tNTH_REF);
1010 TOKEN2CHAR(tBACK_REF);
1011 TOKEN2CHAR(tSTRING_CONTENT);
1012 TOKEN2CHAR(tREGEXP_END);
1013 TOKEN2CHAR(tDUMNY_END);
1014 TOKEN2CHAR(tSP);
1015 TOKEN2CHAR(tUPLUS);
1016 TOKEN2CHAR(tUMINUS);
1017 TOKEN2CHAR(tPOW);
1018 TOKEN2CHAR(tCMP);
1019 TOKEN2CHAR(tEQ);
1020 TOKEN2CHAR(tEQQ);
1021 TOKEN2CHAR(tNEQ);
1022 TOKEN2CHAR(tGEQ);
1023 TOKEN2CHAR(tLEQ);
1024 TOKEN2CHAR(tANDOP);
1025 TOKEN2CHAR(tOROP);
1026 TOKEN2CHAR(tMATCH);
1027 TOKEN2CHAR(tNMATCH);
1028 TOKEN2CHAR(tDOT2);
1029 TOKEN2CHAR(tDOT3);
1030 TOKEN2CHAR(tBDOT2);
1031 TOKEN2CHAR(tBDOT3);
1032 TOKEN2CHAR(tAREF);
1033 TOKEN2CHAR(tASET);
1034 TOKEN2CHAR(tLSHFT);
1035 TOKEN2CHAR(tRSHFT);
1036 TOKEN2CHAR(tANDDOT);
1037 TOKEN2CHAR(tCOLON2);
1038 TOKEN2CHAR(tCOLON3);
1039 TOKEN2CHAR(tOP_ASGN);
1040 TOKEN2CHAR(tASSOC);
1041 TOKEN2CHAR(tLPAREN);
1042 TOKEN2CHAR(tLPAREN_ARG);
1043 TOKEN2CHAR(tLBRACK);
1044 TOKEN2CHAR(tLBRACE);
1045 TOKEN2CHAR(tLBRACE_ARG);
1046 TOKEN2CHAR(tSTAR);
1047 TOKEN2CHAR(tDSTAR);
1048 TOKEN2CHAR(tAMPER);
1049 TOKEN2CHAR(tLAMBDA);
1050 TOKEN2CHAR(tSYMBEG);
1051 TOKEN2CHAR(tSTRING_BEG);
1052 TOKEN2CHAR(tXSTRING_BEG);
1053 TOKEN2CHAR(tREGEXP_BEG);
1054 TOKEN2CHAR(tWORDS_BEG);
1055 TOKEN2CHAR(tQWORDS_BEG);
1056 TOKEN2CHAR(tSYMBOLS_BEG);
1057 TOKEN2CHAR(tQSYMBOLS_BEG);
1058 TOKEN2CHAR(tSTRING_END);
1059 TOKEN2CHAR(tSTRING_DEND);
1060 TOKEN2CHAR(tSTRING_DBEG);
1061 TOKEN2CHAR(tSTRING_DVAR);
1062 TOKEN2CHAR(tLAMBEG);
1063 TOKEN2CHAR(tLABEL_END);
1064 TOKEN2CHAR(tIGNORED_NL);
1065 TOKEN2CHAR(tCOMMENT);
1066 TOKEN2CHAR(tEMBDOC_BEG);
1067 TOKEN2CHAR(tEMBDOC);
1068 TOKEN2CHAR(tEMBDOC_END);
1069 TOKEN2CHAR(tHEREDOC_BEG);
1070 TOKEN2CHAR(tHEREDOC_END);
1071 TOKEN2CHAR(k__END__);
1072 TOKEN2CHAR(tLOWEST);
1073 TOKEN2CHAR(tUMINUS_NUM);
1074 TOKEN2CHAR(tLAST_TOKEN);
1075#undef TOKEN2CHAR
1076#undef TOKEN2CHAR2
1077 }
1078
1079 rb_bug("parser_token2id: unknown token %d", tok);
1080
1081 UNREACHABLE_RETURN(0);
1082}
1083#else
1084static void
1085push_end_expect_token_locations(struct parser_params *p, const rb_code_position_t *pos)
1086{
1087}
1088
1089static void
1090pop_end_expect_token_locations(struct parser_params *p)
1091{
1092}
1093#endif
1094
1095RBIMPL_ATTR_NONNULL((1, 2, 3))
1096static int parser_yyerror(struct parser_params*, const YYLTYPE *yylloc, const char*);
1097RBIMPL_ATTR_NONNULL((1, 2))
1098static int parser_yyerror0(struct parser_params*, const char*);
1099#define yyerror0(msg) parser_yyerror0(p, (msg))
1100#define yyerror1(loc, msg) parser_yyerror(p, (loc), (msg))
1101#define yyerror(yylloc, p, msg) parser_yyerror(p, yylloc, msg)
1102#define token_flush(ptr) ((ptr)->lex.ptok = (ptr)->lex.pcur)
1103#define lex_goto_eol(p) ((p)->lex.pcur = (p)->lex.pend)
1104#define lex_eol_p(p) lex_eol_n_p(p, 0)
1105#define lex_eol_n_p(p,n) lex_eol_ptr_n_p(p, (p)->lex.pcur, n)
1106#define lex_eol_ptr_p(p,ptr) lex_eol_ptr_n_p(p,ptr,0)
1107#define lex_eol_ptr_n_p(p,ptr,n) ((ptr)+(n) >= (p)->lex.pend)
1108
1109static void token_info_setup(token_info *ptinfo, const char *ptr, const rb_code_location_t *loc);
1110static void token_info_push(struct parser_params*, const char *token, const rb_code_location_t *loc);
1111static void token_info_pop(struct parser_params*, const char *token, const rb_code_location_t *loc);
1112static void token_info_warn(struct parser_params *p, const char *token, token_info *ptinfo_beg, int same, const rb_code_location_t *loc);
1113static void token_info_drop(struct parser_params *p, const char *token, rb_code_position_t beg_pos);
1114
1115#ifdef RIPPER
1116#define compile_for_eval (0)
1117#else
1118#define compile_for_eval (p->parent_iseq != 0)
1119#endif
1120
1121#define token_column ((int)(p->lex.ptok - p->lex.pbeg))
1122
1123#define CALL_Q_P(q) ((q) == tANDDOT)
1124#define NEW_QCALL(q,r,m,a,loc) (CALL_Q_P(q) ? NEW_QCALL0(r,m,a,loc) : NEW_CALL(r,m,a,loc))
1125
1126#define lambda_beginning_p() (p->lex.lpar_beg == p->lex.paren_nest)
1127
1128static enum yytokentype yylex(YYSTYPE*, YYLTYPE*, struct parser_params*);
1129
1130static inline void
1131rb_discard_node(struct parser_params *p, NODE *n)
1132{
1133 rb_ast_delete_node(p->ast, n);
1134}
1135
1136static 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);
1137static 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);
1138static rb_node_block_t *rb_node_block_new(struct parser_params *p, NODE *nd_head, const YYLTYPE *loc);
1139static 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);
1140static 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);
1141static 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);
1142static 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);
1143static 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);
1144static 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);
1145static 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);
1146static 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);
1147static 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);
1148static rb_node_iter_t *rb_node_iter_new(struct parser_params *p, rb_node_args_t *nd_args, NODE *nd_body, const YYLTYPE *loc);
1149static 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);
1150static rb_node_for_masgn_t *rb_node_for_masgn_new(struct parser_params *p, NODE *nd_var, const YYLTYPE *loc);
1151static rb_node_retry_t *rb_node_retry_new(struct parser_params *p, const YYLTYPE *loc);
1152static rb_node_begin_t *rb_node_begin_new(struct parser_params *p, NODE *nd_body, const YYLTYPE *loc);
1153static rb_node_rescue_t *rb_node_rescue_new(struct parser_params *p, NODE *nd_head, NODE *nd_resq, NODE *nd_else, const YYLTYPE *loc);
1154static 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);
1155static rb_node_ensure_t *rb_node_ensure_new(struct parser_params *p, NODE *nd_head, NODE *nd_ensr, const YYLTYPE *loc);
1156static 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);
1157static 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);
1158static rb_node_masgn_t *rb_node_masgn_new(struct parser_params *p, NODE *nd_head, NODE *nd_args, const YYLTYPE *loc);
1159static rb_node_lasgn_t *rb_node_lasgn_new(struct parser_params *p, ID nd_vid, NODE *nd_value, const YYLTYPE *loc);
1160static rb_node_dasgn_t *rb_node_dasgn_new(struct parser_params *p, ID nd_vid, NODE *nd_value, const YYLTYPE *loc);
1161static rb_node_gasgn_t *rb_node_gasgn_new(struct parser_params *p, ID nd_vid, NODE *nd_value, const YYLTYPE *loc);
1162static rb_node_iasgn_t *rb_node_iasgn_new(struct parser_params *p, ID nd_vid, NODE *nd_value, const YYLTYPE *loc);
1163static 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);
1164static rb_node_cvasgn_t *rb_node_cvasgn_new(struct parser_params *p, ID nd_vid, NODE *nd_value, const YYLTYPE *loc);
1165static 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);
1166static 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);
1167static 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);
1168static 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);
1169static 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);
1170static rb_node_call_t *rb_node_call_new(struct parser_params *p, NODE *nd_recv, ID nd_mid, NODE *nd_args, const YYLTYPE *loc);
1171static rb_node_opcall_t *rb_node_opcall_new(struct parser_params *p, NODE *nd_recv, ID nd_mid, NODE *nd_args, const YYLTYPE *loc);
1172static rb_node_fcall_t *rb_node_fcall_new(struct parser_params *p, ID nd_mid, NODE *nd_args, const YYLTYPE *loc);
1173static rb_node_vcall_t *rb_node_vcall_new(struct parser_params *p, ID nd_mid, const YYLTYPE *loc);
1174static rb_node_qcall_t *rb_node_qcall_new(struct parser_params *p, NODE *nd_recv, ID nd_mid, NODE *nd_args, const YYLTYPE *loc);
1175static 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);
1176static rb_node_zsuper_t * rb_node_zsuper_new(struct parser_params *p, const YYLTYPE *loc);
1177static rb_node_list_t *rb_node_list_new(struct parser_params *p, NODE *nd_head, const YYLTYPE *loc);
1178static rb_node_list_t *rb_node_list_new2(struct parser_params *p, NODE *nd_head, long nd_alen, NODE *nd_next, const YYLTYPE *loc);
1179static rb_node_zlist_t *rb_node_zlist_new(struct parser_params *p, const YYLTYPE *loc);
1180static rb_node_hash_t *rb_node_hash_new(struct parser_params *p, NODE *nd_head, const YYLTYPE *loc);
1181static rb_node_return_t *rb_node_return_new(struct parser_params *p, NODE *nd_stts, const YYLTYPE *loc, const YYLTYPE *keyword_loc);
1182static 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);
1183static rb_node_lvar_t *rb_node_lvar_new(struct parser_params *p, ID nd_vid, const YYLTYPE *loc);
1184static rb_node_dvar_t *rb_node_dvar_new(struct parser_params *p, ID nd_vid, const YYLTYPE *loc);
1185static rb_node_gvar_t *rb_node_gvar_new(struct parser_params *p, ID nd_vid, const YYLTYPE *loc);
1186static rb_node_ivar_t *rb_node_ivar_new(struct parser_params *p, ID nd_vid, const YYLTYPE *loc);
1187static rb_node_const_t *rb_node_const_new(struct parser_params *p, ID nd_vid, const YYLTYPE *loc);
1188static rb_node_cvar_t *rb_node_cvar_new(struct parser_params *p, ID nd_vid, const YYLTYPE *loc);
1189static rb_node_nth_ref_t *rb_node_nth_ref_new(struct parser_params *p, long nd_nth, const YYLTYPE *loc);
1190static rb_node_back_ref_t *rb_node_back_ref_new(struct parser_params *p, long nd_nth, const YYLTYPE *loc);
1191static rb_node_match2_t *rb_node_match2_new(struct parser_params *p, NODE *nd_recv, NODE *nd_value, const YYLTYPE *loc);
1192static rb_node_match3_t *rb_node_match3_new(struct parser_params *p, NODE *nd_recv, NODE *nd_value, const YYLTYPE *loc);
1193static rb_node_integer_t * rb_node_integer_new(struct parser_params *p, char* val, int base, const YYLTYPE *loc);
1194static rb_node_float_t * rb_node_float_new(struct parser_params *p, char* val, const YYLTYPE *loc);
1195static rb_node_rational_t * rb_node_rational_new(struct parser_params *p, char* val, int base, int seen_point, const YYLTYPE *loc);
1196static 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);
1197static rb_node_str_t *rb_node_str_new(struct parser_params *p, rb_parser_string_t *string, const YYLTYPE *loc);
1198static 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);
1199static rb_node_dstr_t *rb_node_dstr_new(struct parser_params *p, rb_parser_string_t *string, const YYLTYPE *loc);
1200static rb_node_xstr_t *rb_node_xstr_new(struct parser_params *p, rb_parser_string_t *string, const YYLTYPE *loc);
1201static 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);
1202static 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);
1203static 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);
1204static rb_node_once_t *rb_node_once_new(struct parser_params *p, NODE *nd_body, const YYLTYPE *loc);
1205static rb_node_args_t *rb_node_args_new(struct parser_params *p, const YYLTYPE *loc);
1206static rb_node_args_aux_t *rb_node_args_aux_new(struct parser_params *p, ID nd_pid, int nd_plen, const YYLTYPE *loc);
1207static rb_node_opt_arg_t *rb_node_opt_arg_new(struct parser_params *p, NODE *nd_body, const YYLTYPE *loc);
1208static rb_node_kw_arg_t *rb_node_kw_arg_new(struct parser_params *p, NODE *nd_body, const YYLTYPE *loc);
1209static rb_node_postarg_t *rb_node_postarg_new(struct parser_params *p, NODE *nd_1st, NODE *nd_2nd, const YYLTYPE *loc);
1210static rb_node_argscat_t *rb_node_argscat_new(struct parser_params *p, NODE *nd_head, NODE *nd_body, const YYLTYPE *loc);
1211static rb_node_argspush_t *rb_node_argspush_new(struct parser_params *p, NODE *nd_head, NODE *nd_body, const YYLTYPE *loc);
1212static rb_node_splat_t *rb_node_splat_new(struct parser_params *p, NODE *nd_head, const YYLTYPE *loc, const YYLTYPE *operator_loc);
1213static rb_node_block_pass_t *rb_node_block_pass_new(struct parser_params *p, NODE *nd_body, const YYLTYPE *loc, const YYLTYPE *operator_loc);
1214static rb_node_defn_t *rb_node_defn_new(struct parser_params *p, ID nd_mid, NODE *nd_defn, const YYLTYPE *loc);
1215static rb_node_defs_t *rb_node_defs_new(struct parser_params *p, NODE *nd_recv, ID nd_mid, NODE *nd_defn, const YYLTYPE *loc);
1216static 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);
1217static 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);
1218static rb_node_undef_t *rb_node_undef_new(struct parser_params *p, NODE *nd_undef, const YYLTYPE *loc);
1219static 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);
1220static 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);
1221static 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);
1222static 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);
1223static 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);
1224static 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);
1225static 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);
1226static rb_node_self_t *rb_node_self_new(struct parser_params *p, const YYLTYPE *loc);
1227static rb_node_nil_t *rb_node_nil_new(struct parser_params *p, const YYLTYPE *loc);
1228static rb_node_true_t *rb_node_true_new(struct parser_params *p, const YYLTYPE *loc);
1229static rb_node_false_t *rb_node_false_new(struct parser_params *p, const YYLTYPE *loc);
1230static rb_node_errinfo_t *rb_node_errinfo_new(struct parser_params *p, const YYLTYPE *loc);
1231static rb_node_defined_t *rb_node_defined_new(struct parser_params *p, NODE *nd_head, const YYLTYPE *loc, const YYLTYPE *keyword_loc);
1232static 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);
1233static rb_node_sym_t *rb_node_sym_new(struct parser_params *p, VALUE str, const YYLTYPE *loc);
1234static 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);
1235static rb_node_attrasgn_t *rb_node_attrasgn_new(struct parser_params *p, NODE *nd_recv, ID nd_mid, NODE *nd_args, const YYLTYPE *loc);
1236static 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);
1237static rb_node_aryptn_t *rb_node_aryptn_new(struct parser_params *p, NODE *pre_args, NODE *rest_arg, NODE *post_args, const YYLTYPE *loc);
1238static rb_node_hshptn_t *rb_node_hshptn_new(struct parser_params *p, NODE *nd_pconst, NODE *nd_pkwargs, NODE *nd_pkwrestarg, const YYLTYPE *loc);
1239static 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);
1240static rb_node_line_t *rb_node_line_new(struct parser_params *p, const YYLTYPE *loc);
1241static rb_node_file_t *rb_node_file_new(struct parser_params *p, VALUE str, const YYLTYPE *loc);
1242static rb_node_error_t *rb_node_error_new(struct parser_params *p, const YYLTYPE *loc);
1243
1244#define NEW_SCOPE(a,b,c,loc) (NODE *)rb_node_scope_new(p,a,b,c,loc)
1245#define NEW_SCOPE2(t,a,b,c,loc) (NODE *)rb_node_scope_new2(p,t,a,b,c,loc)
1246#define NEW_BLOCK(a,loc) (NODE *)rb_node_block_new(p,a,loc)
1247#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)
1248#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)
1249#define NEW_CASE(h,b,loc,ck_loc,ek_loc) (NODE *)rb_node_case_new(p,h,b,loc,ck_loc,ek_loc)
1250#define NEW_CASE2(b,loc,ck_loc,ek_loc) (NODE *)rb_node_case2_new(p,b,loc,ck_loc,ek_loc)
1251#define NEW_CASE3(h,b,loc,ck_loc,ek_loc) (NODE *)rb_node_case3_new(p,h,b,loc,ck_loc,ek_loc)
1252#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)
1253#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)
1254#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)
1255#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)
1256#define NEW_ITER(a,b,loc) (NODE *)rb_node_iter_new(p,a,b,loc)
1257#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)
1258#define NEW_FOR_MASGN(v,loc) (NODE *)rb_node_for_masgn_new(p,v,loc)
1259#define NEW_RETRY(loc) (NODE *)rb_node_retry_new(p,loc)
1260#define NEW_BEGIN(b,loc) (NODE *)rb_node_begin_new(p,b,loc)
1261#define NEW_RESCUE(b,res,e,loc) (NODE *)rb_node_rescue_new(p,b,res,e,loc)
1262#define NEW_RESBODY(a,v,ex,n,loc) (NODE *)rb_node_resbody_new(p,a,v,ex,n,loc)
1263#define NEW_ENSURE(b,en,loc) (NODE *)rb_node_ensure_new(p,b,en,loc)
1264#define NEW_AND(f,s,loc,op_loc) (NODE *)rb_node_and_new(p,f,s,loc,op_loc)
1265#define NEW_OR(f,s,loc,op_loc) (NODE *)rb_node_or_new(p,f,s,loc,op_loc)
1266#define NEW_MASGN(l,r,loc) rb_node_masgn_new(p,l,r,loc)
1267#define NEW_LASGN(v,val,loc) (NODE *)rb_node_lasgn_new(p,v,val,loc)
1268#define NEW_DASGN(v,val,loc) (NODE *)rb_node_dasgn_new(p,v,val,loc)
1269#define NEW_GASGN(v,val,loc) (NODE *)rb_node_gasgn_new(p,v,val,loc)
1270#define NEW_IASGN(v,val,loc) (NODE *)rb_node_iasgn_new(p,v,val,loc)
1271#define NEW_CDECL(v,val,path,share,loc) (NODE *)rb_node_cdecl_new(p,v,val,path,share,loc)
1272#define NEW_CVASGN(v,val,loc) (NODE *)rb_node_cvasgn_new(p,v,val,loc)
1273#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)
1274#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)
1275#define NEW_OP_ASGN_OR(i,val,loc) (NODE *)rb_node_op_asgn_or_new(p,i,val,loc)
1276#define NEW_OP_ASGN_AND(i,val,loc) (NODE *)rb_node_op_asgn_and_new(p,i,val,loc)
1277#define NEW_OP_CDECL(v,op,val,share,loc) (NODE *)rb_node_op_cdecl_new(p,v,val,op,share,loc)
1278#define NEW_CALL(r,m,a,loc) (NODE *)rb_node_call_new(p,r,m,a,loc)
1279#define NEW_OPCALL(r,m,a,loc) (NODE *)rb_node_opcall_new(p,r,m,a,loc)
1280#define NEW_FCALL(m,a,loc) rb_node_fcall_new(p,m,a,loc)
1281#define NEW_VCALL(m,loc) (NODE *)rb_node_vcall_new(p,m,loc)
1282#define NEW_QCALL0(r,m,a,loc) (NODE *)rb_node_qcall_new(p,r,m,a,loc)
1283#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)
1284#define NEW_ZSUPER(loc) (NODE *)rb_node_zsuper_new(p,loc)
1285#define NEW_LIST(a,loc) (NODE *)rb_node_list_new(p,a,loc)
1286#define NEW_LIST2(h,l,n,loc) (NODE *)rb_node_list_new2(p,h,l,n,loc)
1287#define NEW_ZLIST(loc) (NODE *)rb_node_zlist_new(p,loc)
1288#define NEW_HASH(a,loc) (NODE *)rb_node_hash_new(p,a,loc)
1289#define NEW_RETURN(s,loc,k_loc) (NODE *)rb_node_return_new(p,s,loc,k_loc)
1290#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)
1291#define NEW_LVAR(v,loc) (NODE *)rb_node_lvar_new(p,v,loc)
1292#define NEW_DVAR(v,loc) (NODE *)rb_node_dvar_new(p,v,loc)
1293#define NEW_GVAR(v,loc) (NODE *)rb_node_gvar_new(p,v,loc)
1294#define NEW_IVAR(v,loc) (NODE *)rb_node_ivar_new(p,v,loc)
1295#define NEW_CONST(v,loc) (NODE *)rb_node_const_new(p,v,loc)
1296#define NEW_CVAR(v,loc) (NODE *)rb_node_cvar_new(p,v,loc)
1297#define NEW_NTH_REF(n,loc) (NODE *)rb_node_nth_ref_new(p,n,loc)
1298#define NEW_BACK_REF(n,loc) (NODE *)rb_node_back_ref_new(p,n,loc)
1299#define NEW_MATCH2(n1,n2,loc) (NODE *)rb_node_match2_new(p,n1,n2,loc)
1300#define NEW_MATCH3(r,n2,loc) (NODE *)rb_node_match3_new(p,r,n2,loc)
1301#define NEW_INTEGER(val, base,loc) (NODE *)rb_node_integer_new(p,val,base,loc)
1302#define NEW_FLOAT(val,loc) (NODE *)rb_node_float_new(p,val,loc)
1303#define NEW_RATIONAL(val,base,seen_point,loc) (NODE *)rb_node_rational_new(p,val,base,seen_point,loc)
1304#define NEW_IMAGINARY(val,base,seen_point,numeric_type,loc) (NODE *)rb_node_imaginary_new(p,val,base,seen_point,numeric_type,loc)
1305#define NEW_STR(s,loc) (NODE *)rb_node_str_new(p,s,loc)
1306#define NEW_DSTR0(s,l,n,loc) (NODE *)rb_node_dstr_new0(p,s,l,n,loc)
1307#define NEW_DSTR(s,loc) (NODE *)rb_node_dstr_new(p,s,loc)
1308#define NEW_XSTR(s,loc) (NODE *)rb_node_xstr_new(p,s,loc)
1309#define NEW_DXSTR(s,l,n,loc) (NODE *)rb_node_dxstr_new(p,s,l,n,loc)
1310#define NEW_EVSTR(n,loc,o_loc,c_loc) (NODE *)rb_node_evstr_new(p,n,loc,o_loc,c_loc)
1311#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)
1312#define NEW_ONCE(b,loc) (NODE *)rb_node_once_new(p,b,loc)
1313#define NEW_ARGS(loc) rb_node_args_new(p,loc)
1314#define NEW_ARGS_AUX(r,b,loc) rb_node_args_aux_new(p,r,b,loc)
1315#define NEW_OPT_ARG(v,loc) rb_node_opt_arg_new(p,v,loc)
1316#define NEW_KW_ARG(v,loc) rb_node_kw_arg_new(p,v,loc)
1317#define NEW_POSTARG(i,v,loc) (NODE *)rb_node_postarg_new(p,i,v,loc)
1318#define NEW_ARGSCAT(a,b,loc) (NODE *)rb_node_argscat_new(p,a,b,loc)
1319#define NEW_ARGSPUSH(a,b,loc) (NODE *)rb_node_argspush_new(p,a,b,loc)
1320#define NEW_SPLAT(a,loc,op_loc) (NODE *)rb_node_splat_new(p,a,loc,op_loc)
1321#define NEW_BLOCK_PASS(b,loc,o_loc) rb_node_block_pass_new(p,b,loc,o_loc)
1322#define NEW_DEFN(i,s,loc) (NODE *)rb_node_defn_new(p,i,s,loc)
1323#define NEW_DEFS(r,i,s,loc) (NODE *)rb_node_defs_new(p,r,i,s,loc)
1324#define NEW_ALIAS(n,o,loc,k_loc) (NODE *)rb_node_alias_new(p,n,o,loc,k_loc)
1325#define NEW_VALIAS(n,o,loc,k_loc) (NODE *)rb_node_valias_new(p,n,o,loc,k_loc)
1326#define NEW_UNDEF(i,loc) (NODE *)rb_node_undef_new(p,i,loc)
1327#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)
1328#define NEW_MODULE(n,b,loc,mk_loc,ek_loc) (NODE *)rb_node_module_new(p,n,b,loc,mk_loc,ek_loc)
1329#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)
1330#define NEW_COLON2(c,i,loc,d_loc,n_loc) (NODE *)rb_node_colon2_new(p,c,i,loc,d_loc,n_loc)
1331#define NEW_COLON3(i,loc,d_loc,n_loc) (NODE *)rb_node_colon3_new(p,i,loc,d_loc,n_loc)
1332#define NEW_DOT2(b,e,loc,op_loc) (NODE *)rb_node_dot2_new(p,b,e,loc,op_loc)
1333#define NEW_DOT3(b,e,loc,op_loc) (NODE *)rb_node_dot3_new(p,b,e,loc,op_loc)
1334#define NEW_SELF(loc) (NODE *)rb_node_self_new(p,loc)
1335#define NEW_NIL(loc) (NODE *)rb_node_nil_new(p,loc)
1336#define NEW_TRUE(loc) (NODE *)rb_node_true_new(p,loc)
1337#define NEW_FALSE(loc) (NODE *)rb_node_false_new(p,loc)
1338#define NEW_ERRINFO(loc) (NODE *)rb_node_errinfo_new(p,loc)
1339#define NEW_DEFINED(e,loc,k_loc) (NODE *)rb_node_defined_new(p,e,loc, k_loc)
1340#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)
1341#define NEW_SYM(str,loc) (NODE *)rb_node_sym_new(p,str,loc)
1342#define NEW_DSYM(s,l,n,loc) (NODE *)rb_node_dsym_new(p,s,l,n,loc)
1343#define NEW_ATTRASGN(r,m,a,loc) (NODE *)rb_node_attrasgn_new(p,r,m,a,loc)
1344#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)
1345#define NEW_ARYPTN(pre,r,post,loc) (NODE *)rb_node_aryptn_new(p,pre,r,post,loc)
1346#define NEW_HSHPTN(c,kw,kwrest,loc) (NODE *)rb_node_hshptn_new(p,c,kw,kwrest,loc)
1347#define NEW_FNDPTN(pre,a,post,loc) (NODE *)rb_node_fndptn_new(p,pre,a,post,loc)
1348#define NEW_LINE(loc) (NODE *)rb_node_line_new(p,loc)
1349#define NEW_FILE(str,loc) (NODE *)rb_node_file_new(p,str,loc)
1350#define NEW_ENCODING(loc) (NODE *)rb_node_encoding_new(p,loc)
1351#define NEW_ERROR(loc) (NODE *)rb_node_error_new(p,loc)
1352
1353enum internal_node_type {
1354 NODE_INTERNAL_ONLY = NODE_LAST,
1355 NODE_DEF_TEMP,
1356 NODE_EXITS,
1357 NODE_INTERNAL_LAST
1358};
1359
1360static const char *
1361parser_node_name(int node)
1362{
1363 switch (node) {
1364 case NODE_DEF_TEMP:
1365 return "NODE_DEF_TEMP";
1366 case NODE_EXITS:
1367 return "NODE_EXITS";
1368 default:
1369 return ruby_node_name(node);
1370 }
1371}
1372
1373/* This node is parse.y internal */
1374struct RNode_DEF_TEMP {
1375 NODE node;
1376
1377 /* for NODE_DEFN/NODE_DEFS */
1378
1379 struct RNode *nd_def;
1380 ID nd_mid;
1381
1382 struct {
1383 int max_numparam;
1384 NODE *numparam_save;
1385 struct lex_context ctxt;
1386 } save;
1387};
1388
1389#define RNODE_DEF_TEMP(node) ((struct RNode_DEF_TEMP *)(node))
1390
1391static rb_node_break_t *rb_node_break_new(struct parser_params *p, NODE *nd_stts, const YYLTYPE *loc, const YYLTYPE *keyword_loc);
1392static rb_node_next_t *rb_node_next_new(struct parser_params *p, NODE *nd_stts, const YYLTYPE *loc, const YYLTYPE *keyword_loc);
1393static rb_node_redo_t *rb_node_redo_new(struct parser_params *p, const YYLTYPE *loc, const YYLTYPE *keyword_loc);
1394static rb_node_def_temp_t *rb_node_def_temp_new(struct parser_params *p, const YYLTYPE *loc);
1395static rb_node_def_temp_t *def_head_save(struct parser_params *p, rb_node_def_temp_t *n);
1396
1397#define NEW_BREAK(s,loc,k_loc) (NODE *)rb_node_break_new(p,s,loc,k_loc)
1398#define NEW_NEXT(s,loc,k_loc) (NODE *)rb_node_next_new(p,s,loc,k_loc)
1399#define NEW_REDO(loc,k_loc) (NODE *)rb_node_redo_new(p,loc,k_loc)
1400#define NEW_DEF_TEMP(loc) rb_node_def_temp_new(p,loc)
1401
1402/* Make a new internal node, which should not be appeared in the
1403 * result AST and does not have node_id and location. */
1404static NODE* node_new_internal(struct parser_params *p, enum node_type type, size_t size, size_t alignment);
1405#define NODE_NEW_INTERNAL(ndtype, type) (type *)node_new_internal(p, (enum node_type)(ndtype), sizeof(type), RUBY_ALIGNOF(type))
1406
1407static NODE *nd_set_loc(NODE *nd, const YYLTYPE *loc);
1408
1409static int
1410parser_get_node_id(struct parser_params *p)
1411{
1412 int node_id = p->node_id;
1413 p->node_id++;
1414 return node_id;
1415}
1416
1417static void
1418anddot_multiple_assignment_check(struct parser_params* p, const YYLTYPE *loc, ID id)
1419{
1420 if (id == tANDDOT) {
1421 yyerror1(loc, "&. inside multiple assignment destination");
1422 }
1423}
1424
1425static inline void
1426set_line_body(NODE *body, int line)
1427{
1428 if (!body) return;
1429 switch (nd_type(body)) {
1430 case NODE_RESCUE:
1431 case NODE_ENSURE:
1432 nd_set_line(body, line);
1433 }
1434}
1435
1436static void
1437set_embraced_location(NODE *node, const rb_code_location_t *beg, const rb_code_location_t *end)
1438{
1439 RNODE_ITER(node)->nd_body->nd_loc = code_loc_gen(beg, end);
1440 nd_set_line(node, beg->end_pos.lineno);
1441}
1442
1443static NODE *
1444last_expr_node(NODE *expr)
1445{
1446 while (expr) {
1447 if (nd_type_p(expr, NODE_BLOCK)) {
1448 expr = RNODE_BLOCK(RNODE_BLOCK(expr)->nd_end)->nd_head;
1449 }
1450 else if (nd_type_p(expr, NODE_BEGIN) && RNODE_BEGIN(expr)->nd_body) {
1451 expr = RNODE_BEGIN(expr)->nd_body;
1452 }
1453 else {
1454 break;
1455 }
1456 }
1457 return expr;
1458}
1459
1460#ifndef RIPPER
1461#define yyparse ruby_yyparse
1462#endif
1463
1464static NODE* cond(struct parser_params *p, NODE *node, const YYLTYPE *loc);
1465static NODE* method_cond(struct parser_params *p, NODE *node, const YYLTYPE *loc);
1466static NODE *new_nil_at(struct parser_params *p, const rb_code_position_t *pos);
1467static NODE *new_if(struct parser_params*,NODE*,NODE*,NODE*,const YYLTYPE*,const YYLTYPE*,const YYLTYPE*,const YYLTYPE*);
1468static NODE *new_unless(struct parser_params*,NODE*,NODE*,NODE*,const YYLTYPE*,const YYLTYPE*,const YYLTYPE*,const YYLTYPE*);
1469static NODE *logop(struct parser_params*,ID,NODE*,NODE*,const YYLTYPE*,const YYLTYPE*);
1470
1471static NODE *newline_node(NODE*);
1472static void fixpos(NODE*,NODE*);
1473
1474static int value_expr(struct parser_params*,NODE*);
1475static void void_expr(struct parser_params*,NODE*);
1476static NODE *remove_begin(NODE*);
1477static NODE *void_stmts(struct parser_params*,NODE*);
1478static void reduce_nodes(struct parser_params*,NODE**);
1479static void block_dup_check(struct parser_params*,NODE*,NODE*);
1480
1481static NODE *block_append(struct parser_params*,NODE*,NODE*);
1482static NODE *list_append(struct parser_params*,NODE*,NODE*);
1483static NODE *list_concat(NODE*,NODE*);
1484static NODE *arg_append(struct parser_params*,NODE*,NODE*,const YYLTYPE*);
1485static NODE *last_arg_append(struct parser_params *p, NODE *args, NODE *last_arg, const YYLTYPE *loc);
1486static NODE *rest_arg_append(struct parser_params *p, NODE *args, NODE *rest_arg, const YYLTYPE *loc);
1487static NODE *literal_concat(struct parser_params*,NODE*,NODE*,const YYLTYPE*);
1488static NODE *new_evstr(struct parser_params*,NODE*,const YYLTYPE*,const YYLTYPE*,const YYLTYPE*);
1489static NODE *new_dstr(struct parser_params*,NODE*,const YYLTYPE*);
1490static NODE *str2dstr(struct parser_params*,NODE*);
1491static NODE *evstr2dstr(struct parser_params*,NODE*);
1492static NODE *splat_array(NODE*);
1493static void mark_lvar_used(struct parser_params *p, NODE *rhs);
1494
1495static NODE *call_bin_op(struct parser_params*,NODE*,ID,NODE*,const YYLTYPE*,const YYLTYPE*);
1496static NODE *call_uni_op(struct parser_params*,NODE*,ID,const YYLTYPE*,const YYLTYPE*);
1497static NODE *new_qcall(struct parser_params* p, ID atype, NODE *recv, ID mid, NODE *args, const YYLTYPE *op_loc, const YYLTYPE *loc);
1498static 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);
1499static 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;}
1500static NODE *command_add_block(struct parser_params*p, NODE *m, NODE *b, const YYLTYPE *loc);
1501
1502static bool args_info_empty_p(struct rb_args_info *args);
1503static 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*);
1504static rb_node_args_t *new_args_tail(struct parser_params*,rb_node_kw_arg_t*,ID,ID,const YYLTYPE*);
1505#define new_empty_args_tail(p, loc) new_args_tail(p, 0, 0, 0, loc)
1506static NODE *new_array_pattern(struct parser_params *p, NODE *constant, NODE *pre_arg, NODE *aryptn, const YYLTYPE *loc);
1507static NODE *new_array_pattern_tail(struct parser_params *p, NODE *pre_args, int has_rest, NODE *rest_arg, NODE *post_args, const YYLTYPE *loc);
1508static NODE *new_find_pattern(struct parser_params *p, NODE *constant, NODE *fndptn, const YYLTYPE *loc);
1509static NODE *new_find_pattern_tail(struct parser_params *p, NODE *pre_rest_arg, NODE *args, NODE *post_rest_arg, const YYLTYPE *loc);
1510static NODE *new_hash_pattern(struct parser_params *p, NODE *constant, NODE *hshptn, const YYLTYPE *loc);
1511static NODE *new_hash_pattern_tail(struct parser_params *p, NODE *kw_args, ID kw_rest_arg, const YYLTYPE *loc);
1512
1513static rb_node_kw_arg_t *new_kw_arg(struct parser_params *p, NODE *k, const YYLTYPE *loc);
1514static rb_node_args_t *args_with_numbered(struct parser_params*,rb_node_args_t*,int,ID);
1515
1516static NODE* negate_lit(struct parser_params*, NODE*,const YYLTYPE*);
1517static void no_blockarg(struct parser_params*,NODE*);
1518static NODE *ret_args(struct parser_params*,NODE*);
1519static NODE *arg_blk_pass(NODE*,rb_node_block_pass_t*);
1520static NODE *dsym_node(struct parser_params*,NODE*,const YYLTYPE*);
1521
1522static NODE *gettable(struct parser_params*,ID,const YYLTYPE*);
1523static NODE *assignable(struct parser_params*,ID,NODE*,const YYLTYPE*);
1524
1525static NODE *aryset(struct parser_params*,NODE*,NODE*,const YYLTYPE*);
1526static NODE *attrset(struct parser_params*,NODE*,ID,ID,const YYLTYPE*);
1527
1528static VALUE rb_backref_error(struct parser_params*,NODE*);
1529static NODE *node_assign(struct parser_params*,NODE*,NODE*,struct lex_context,const YYLTYPE*);
1530
1531static NODE *new_op_assign(struct parser_params *p, NODE *lhs, ID op, NODE *rhs, struct lex_context, const YYLTYPE *loc);
1532static 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);
1533static 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);
1534static NODE *new_const_op_assign(struct parser_params *p, NODE *lhs, ID op, NODE *rhs, struct lex_context, const YYLTYPE *loc);
1535static NODE *new_bodystmt(struct parser_params *p, NODE *head, NODE *rescue, NODE *rescue_else, NODE *ensure, const YYLTYPE *loc);
1536
1537static NODE *const_decl(struct parser_params *p, NODE* path, const YYLTYPE *loc);
1538
1539static rb_node_opt_arg_t *opt_arg_append(rb_node_opt_arg_t*, rb_node_opt_arg_t*);
1540static rb_node_kw_arg_t *kwd_append(rb_node_kw_arg_t*, rb_node_kw_arg_t*);
1541
1542static NODE *new_hash(struct parser_params *p, NODE *hash, const YYLTYPE *loc);
1543static NODE *new_unique_key_hash(struct parser_params *p, NODE *hash, const YYLTYPE *loc);
1544
1545static NODE *new_defined(struct parser_params *p, NODE *expr, const YYLTYPE *loc, const YYLTYPE *keyword_loc);
1546
1547static NODE *new_regexp(struct parser_params *, NODE *, int, const YYLTYPE *, const YYLTYPE *, const YYLTYPE *, const YYLTYPE *);
1548
1549#define make_list(list, loc) ((list) ? (nd_set_loc(list, loc), list) : NEW_ZLIST(loc))
1550
1551static NODE *new_xstring(struct parser_params *, NODE *, const YYLTYPE *loc);
1552
1553static NODE *symbol_append(struct parser_params *p, NODE *symbols, NODE *symbol);
1554
1555static NODE *match_op(struct parser_params*,NODE*,NODE*,const YYLTYPE*,const YYLTYPE*);
1556
1557static rb_ast_id_table_t *local_tbl(struct parser_params*);
1558
1559static VALUE reg_compile(struct parser_params*, rb_parser_string_t*, int);
1560static void reg_fragment_setenc(struct parser_params*, rb_parser_string_t*, int);
1561
1562static int literal_concat0(struct parser_params *p, rb_parser_string_t *head, rb_parser_string_t *tail);
1563static NODE *heredoc_dedent(struct parser_params*,NODE*);
1564
1565static void check_literal_when(struct parser_params *p, NODE *args, const YYLTYPE *loc);
1566
1567static 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);
1568
1569#ifdef RIPPER
1570#define get_value(idx) (rb_ary_entry(p->s_value_stack, idx))
1571#define set_value(val) (p->s_lvalue = val)
1572static VALUE assign_error(struct parser_params *p, const char *mesg, VALUE a);
1573static int id_is_var(struct parser_params *p, ID id);
1574#endif
1575
1576RUBY_SYMBOL_EXPORT_BEGIN
1577VALUE rb_parser_reg_compile(struct parser_params* p, VALUE str, int options);
1578int rb_reg_fragment_setenc(struct parser_params*, rb_parser_string_t *, int);
1579enum lex_state_e rb_parser_trace_lex_state(struct parser_params *, enum lex_state_e, enum lex_state_e, int);
1580VALUE rb_parser_lex_state_name(struct parser_params *p, enum lex_state_e state);
1581void rb_parser_show_bitstack(struct parser_params *, stack_type, const char *, int);
1582PRINTF_ARGS(void rb_parser_fatal(struct parser_params *p, const char *fmt, ...), 2, 3);
1583YYLTYPE *rb_parser_set_location_from_strterm_heredoc(struct parser_params *p, rb_strterm_heredoc_t *here, YYLTYPE *yylloc);
1584YYLTYPE *rb_parser_set_location_of_delayed_token(struct parser_params *p, YYLTYPE *yylloc);
1585YYLTYPE *rb_parser_set_location_of_heredoc_end(struct parser_params *p, YYLTYPE *yylloc);
1586YYLTYPE *rb_parser_set_location_of_dummy_end(struct parser_params *p, YYLTYPE *yylloc);
1587YYLTYPE *rb_parser_set_location_of_none(struct parser_params *p, YYLTYPE *yylloc);
1588YYLTYPE *rb_parser_set_location(struct parser_params *p, YYLTYPE *yylloc);
1589void ruby_show_error_line(struct parser_params *p, VALUE errbuf, const YYLTYPE *yylloc, int lineno, rb_parser_string_t *str);
1590RUBY_SYMBOL_EXPORT_END
1591
1592static void flush_string_content(struct parser_params *p, rb_encoding *enc, size_t back);
1593static void error_duplicate_pattern_variable(struct parser_params *p, ID id, const YYLTYPE *loc);
1594static void error_duplicate_pattern_key(struct parser_params *p, ID id, const YYLTYPE *loc);
1595static VALUE formal_argument_error(struct parser_params*, ID);
1596static ID shadowing_lvar(struct parser_params*,ID);
1597static void new_bv(struct parser_params*,ID);
1598
1599static void local_push(struct parser_params*,int);
1600static void local_pop(struct parser_params*);
1601static void local_var(struct parser_params*, ID);
1602static void arg_var(struct parser_params*, ID);
1603static int local_id(struct parser_params *p, ID id);
1604static int local_id_ref(struct parser_params*, ID, ID **);
1605#define internal_id rb_parser_internal_id
1606ID internal_id(struct parser_params*);
1607static NODE *new_args_forward_call(struct parser_params*, NODE*, const YYLTYPE*, const YYLTYPE*);
1608static int check_forwarding_args(struct parser_params*);
1609static void add_forwarding_args(struct parser_params *p);
1610static void forwarding_arg_check(struct parser_params *p, ID arg, ID all, const char *var);
1611
1612static const struct vtable *dyna_push(struct parser_params *);
1613static void dyna_pop(struct parser_params*, const struct vtable *);
1614static int dyna_in_block(struct parser_params*);
1615#define dyna_var(p, id) local_var(p, id)
1616static int dvar_defined(struct parser_params*, ID);
1617#define dvar_defined_ref rb_parser_dvar_defined_ref
1618int dvar_defined_ref(struct parser_params*, ID, ID**);
1619static int dvar_curr(struct parser_params*,ID);
1620
1621static int lvar_defined(struct parser_params*, ID);
1622
1623static NODE *numparam_push(struct parser_params *p);
1624static void numparam_pop(struct parser_params *p, NODE *prev_inner);
1625
1626#define METHOD_NOT '!'
1627
1628#define idFWD_REST '*'
1629#define idFWD_KWREST idPow /* Use simple "**", as tDSTAR is "**arg" */
1630#define idFWD_BLOCK '&'
1631#define idFWD_ALL idDot3
1632#define arg_FWD_BLOCK idFWD_BLOCK
1633
1634#define RE_ONIG_OPTION_IGNORECASE 1
1635#define RE_ONIG_OPTION_EXTEND (RE_ONIG_OPTION_IGNORECASE<<1)
1636#define RE_ONIG_OPTION_MULTILINE (RE_ONIG_OPTION_EXTEND<<1)
1637#define RE_OPTION_ONCE (1<<16)
1638#define RE_OPTION_ENCODING_SHIFT 8
1639#define RE_OPTION_ENCODING(e) (((e)&0xff)<<RE_OPTION_ENCODING_SHIFT)
1640#define RE_OPTION_ENCODING_IDX(o) (((o)>>RE_OPTION_ENCODING_SHIFT)&0xff)
1641#define RE_OPTION_ENCODING_NONE(o) ((o)&RE_OPTION_ARG_ENCODING_NONE)
1642#define RE_OPTION_MASK 0xff
1643#define RE_OPTION_ARG_ENCODING_NONE 32
1644
1645#define CHECK_LITERAL_WHEN (st_table *)1
1646#define CASE_LABELS_ENABLED_P(case_labels) (case_labels && case_labels != CHECK_LITERAL_WHEN)
1647
1648#define yytnamerr(yyres, yystr) (YYSIZE_T)rb_yytnamerr(p, yyres, yystr)
1649RUBY_FUNC_EXPORTED size_t rb_yytnamerr(struct parser_params *p, char *yyres, const char *yystr);
1650
1651#define TOKEN2ID(tok) ( \
1652 tTOKEN_LOCAL_BEGIN<(tok)&&(tok)<tTOKEN_LOCAL_END ? TOKEN2LOCALID(tok) : \
1653 tTOKEN_INSTANCE_BEGIN<(tok)&&(tok)<tTOKEN_INSTANCE_END ? TOKEN2INSTANCEID(tok) : \
1654 tTOKEN_GLOBAL_BEGIN<(tok)&&(tok)<tTOKEN_GLOBAL_END ? TOKEN2GLOBALID(tok) : \
1655 tTOKEN_CONST_BEGIN<(tok)&&(tok)<tTOKEN_CONST_END ? TOKEN2CONSTID(tok) : \
1656 tTOKEN_CLASS_BEGIN<(tok)&&(tok)<tTOKEN_CLASS_END ? TOKEN2CLASSID(tok) : \
1657 tTOKEN_ATTRSET_BEGIN<(tok)&&(tok)<tTOKEN_ATTRSET_END ? TOKEN2ATTRSETID(tok) : \
1658 ((tok) / ((tok)<tPRESERVED_ID_END && ((tok)>=128 || rb_ispunct(tok)))))
1659
1660/****** Ripper *******/
1661
1662#ifdef RIPPER
1663
1664#include "eventids1.h"
1665#include "eventids2.h"
1666
1667extern const struct ripper_parser_ids ripper_parser_ids;
1668
1669static VALUE ripper_dispatch0(struct parser_params*,ID);
1670static VALUE ripper_dispatch1(struct parser_params*,ID,VALUE);
1671static VALUE ripper_dispatch2(struct parser_params*,ID,VALUE,VALUE);
1672static VALUE ripper_dispatch3(struct parser_params*,ID,VALUE,VALUE,VALUE);
1673static VALUE ripper_dispatch4(struct parser_params*,ID,VALUE,VALUE,VALUE,VALUE);
1674static VALUE ripper_dispatch5(struct parser_params*,ID,VALUE,VALUE,VALUE,VALUE,VALUE);
1675static VALUE ripper_dispatch7(struct parser_params*,ID,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE);
1676void ripper_error(struct parser_params *p);
1677
1678#define dispatch0(n) ripper_dispatch0(p, RIPPER_ID(n))
1679#define dispatch1(n,a) ripper_dispatch1(p, RIPPER_ID(n), (a))
1680#define dispatch2(n,a,b) ripper_dispatch2(p, RIPPER_ID(n), (a), (b))
1681#define dispatch3(n,a,b,c) ripper_dispatch3(p, RIPPER_ID(n), (a), (b), (c))
1682#define dispatch4(n,a,b,c,d) ripper_dispatch4(p, RIPPER_ID(n), (a), (b), (c), (d))
1683#define dispatch5(n,a,b,c,d,e) ripper_dispatch5(p, RIPPER_ID(n), (a), (b), (c), (d), (e))
1684#define dispatch7(n,a,b,c,d,e,f,g) ripper_dispatch7(p, RIPPER_ID(n), (a), (b), (c), (d), (e), (f), (g))
1685
1686#define yyparse ripper_yyparse
1687
1688static VALUE
1689aryptn_pre_args(struct parser_params *p, VALUE pre_arg, VALUE pre_args)
1690{
1691 if (!NIL_P(pre_arg)) {
1692 if (!NIL_P(pre_args)) {
1693 rb_ary_unshift(pre_args, pre_arg);
1694 }
1695 else {
1696 pre_args = rb_ary_new_from_args(1, pre_arg);
1697 }
1698 }
1699 return pre_args;
1700}
1701
1702#define ID2VAL(id) STATIC_ID2SYM(id)
1703#define TOKEN2VAL(t) ID2VAL(TOKEN2ID(t))
1704#endif /* RIPPER */
1705
1706#define KWD2EID(t, v) keyword_##t
1707
1708static NODE *
1709new_scope_body(struct parser_params *p, rb_node_args_t *args, NODE *body, NODE *parent, const YYLTYPE *loc)
1710{
1711 body = remove_begin(body);
1712 reduce_nodes(p, &body);
1713 NODE *n = NEW_SCOPE(args, body, parent, loc);
1714 nd_set_line(n, loc->end_pos.lineno);
1715 set_line_body(body, loc->beg_pos.lineno);
1716 return n;
1717}
1718
1719static NODE *
1720rescued_expr(struct parser_params *p, NODE *arg, NODE *rescue,
1721 const YYLTYPE *arg_loc, const YYLTYPE *mod_loc, const YYLTYPE *res_loc)
1722{
1723 YYLTYPE loc = code_loc_gen(mod_loc, res_loc);
1724 rescue = NEW_RESBODY(0, 0, remove_begin(rescue), 0, &loc);
1725 loc.beg_pos = arg_loc->beg_pos;
1726 return NEW_RESCUE(arg, rescue, 0, &loc);
1727}
1728
1729static NODE *add_block_exit(struct parser_params *p, NODE *node);
1730static rb_node_exits_t *init_block_exit(struct parser_params *p);
1731static rb_node_exits_t *allow_block_exit(struct parser_params *p);
1732static void restore_block_exit(struct parser_params *p, rb_node_exits_t *exits);
1733static void clear_block_exit(struct parser_params *p, bool error);
1734
1735static void
1736next_rescue_context(struct lex_context *next, const struct lex_context *outer, enum rescue_context def)
1737{
1738 next->in_rescue = outer->in_rescue == after_rescue ? after_rescue : def;
1739}
1740
1741static void
1742restore_defun(struct parser_params *p, rb_node_def_temp_t *temp)
1743{
1744 /* See: def_name action */
1745 struct lex_context ctxt = temp->save.ctxt;
1746 p->ctxt.in_def = ctxt.in_def;
1747 p->ctxt.shareable_constant_value = ctxt.shareable_constant_value;
1748 p->ctxt.in_rescue = ctxt.in_rescue;
1749 p->max_numparam = temp->save.max_numparam;
1750 numparam_pop(p, temp->save.numparam_save);
1751 clear_block_exit(p, true);
1752}
1753
1754static void
1755endless_method_name(struct parser_params *p, ID mid, const YYLTYPE *loc)
1756{
1757 if (is_attrset_id(mid)) {
1758 yyerror1(loc, "setter method cannot be defined in an endless method definition");
1759 }
1760 token_info_drop(p, "def", loc->beg_pos);
1761}
1762
1763#define debug_token_line(p, name, line) do { \
1764 if (p->debug) { \
1765 const char *const pcur = p->lex.pcur; \
1766 const char *const ptok = p->lex.ptok; \
1767 rb_parser_printf(p, name ":%d (%d: %"PRIdPTRDIFF"|%"PRIdPTRDIFF"|%"PRIdPTRDIFF")\n", \
1768 line, p->ruby_sourceline, \
1769 ptok - p->lex.pbeg, pcur - ptok, p->lex.pend - pcur); \
1770 } \
1771 } while (0)
1772
1773#define begin_definition(k, loc_beg, loc_end) \
1774 do { \
1775 if (!(p->ctxt.in_class = (k)[0] != 0)) { \
1776 /* singleton class */ \
1777 p->ctxt.cant_return = !p->ctxt.in_def; \
1778 p->ctxt.in_def = 0; \
1779 } \
1780 else if (p->ctxt.in_def) { \
1781 YYLTYPE loc = code_loc_gen(loc_beg, loc_end); \
1782 yyerror1(&loc, k " definition in method body"); \
1783 } \
1784 else { \
1785 p->ctxt.cant_return = 1; \
1786 } \
1787 local_push(p, 0); \
1788 } while (0)
1789
1790#ifndef RIPPER
1791# define ifndef_ripper(x) (x)
1792# define ifdef_ripper(r,x) (x)
1793#else
1794# define ifndef_ripper(x)
1795# define ifdef_ripper(r,x) (r)
1796#endif
1797
1798# define rb_warn0(fmt) WARN_CALL(WARN_ARGS(fmt, 1))
1799# define rb_warn1(fmt,a) WARN_CALL(WARN_ARGS(fmt, 2), (a))
1800# define rb_warn2(fmt,a,b) WARN_CALL(WARN_ARGS(fmt, 3), (a), (b))
1801# define rb_warn3(fmt,a,b,c) WARN_CALL(WARN_ARGS(fmt, 4), (a), (b), (c))
1802# define rb_warn4(fmt,a,b,c,d) WARN_CALL(WARN_ARGS(fmt, 5), (a), (b), (c), (d))
1803# define rb_warning0(fmt) WARNING_CALL(WARNING_ARGS(fmt, 1))
1804# define rb_warning1(fmt,a) WARNING_CALL(WARNING_ARGS(fmt, 2), (a))
1805# define rb_warning2(fmt,a,b) WARNING_CALL(WARNING_ARGS(fmt, 3), (a), (b))
1806# define rb_warning3(fmt,a,b,c) WARNING_CALL(WARNING_ARGS(fmt, 4), (a), (b), (c))
1807# define rb_warning4(fmt,a,b,c,d) WARNING_CALL(WARNING_ARGS(fmt, 5), (a), (b), (c), (d))
1808# define rb_warn0L(l,fmt) WARN_CALL(WARN_ARGS_L(l, fmt, 1))
1809# define rb_warn1L(l,fmt,a) WARN_CALL(WARN_ARGS_L(l, fmt, 2), (a))
1810# define rb_warn2L(l,fmt,a,b) WARN_CALL(WARN_ARGS_L(l, fmt, 3), (a), (b))
1811# define rb_warn3L(l,fmt,a,b,c) WARN_CALL(WARN_ARGS_L(l, fmt, 4), (a), (b), (c))
1812# define rb_warn4L(l,fmt,a,b,c,d) WARN_CALL(WARN_ARGS_L(l, fmt, 5), (a), (b), (c), (d))
1813# define rb_warning0L(l,fmt) WARNING_CALL(WARNING_ARGS_L(l, fmt, 1))
1814# define rb_warning1L(l,fmt,a) WARNING_CALL(WARNING_ARGS_L(l, fmt, 2), (a))
1815# define rb_warning2L(l,fmt,a,b) WARNING_CALL(WARNING_ARGS_L(l, fmt, 3), (a), (b))
1816# define rb_warning3L(l,fmt,a,b,c) WARNING_CALL(WARNING_ARGS_L(l, fmt, 4), (a), (b), (c))
1817# define rb_warning4L(l,fmt,a,b,c,d) WARNING_CALL(WARNING_ARGS_L(l, fmt, 5), (a), (b), (c), (d))
1818#ifdef RIPPER
1819extern const ID id_warn, id_warning, id_gets, id_assoc;
1820# define ERR_MESG() STR_NEW2(mesg) /* to bypass Ripper DSL */
1821# define WARN_S_L(s,l) STR_NEW(s,l)
1822# define WARN_S(s) STR_NEW2(s)
1823# define WARN_I(i) INT2NUM(i)
1824# define WARN_ID(i) rb_id2str(i)
1825# define PRIsWARN PRIsVALUE
1826# define WARN_ARGS(fmt,n) p->value, id_warn, n, rb_usascii_str_new_lit(fmt)
1827# define WARN_ARGS_L(l,fmt,n) WARN_ARGS(fmt,n)
1828# define WARN_CALL(...) rb_funcall(__VA_ARGS__)
1829# define WARNING_ARGS(fmt,n) p->value, id_warning, n, rb_usascii_str_new_lit(fmt)
1830# define WARNING_ARGS_L(l, fmt,n) WARNING_ARGS(fmt,n)
1831# define WARNING_CALL(...) rb_funcall(__VA_ARGS__)
1832# define compile_error ripper_compile_error
1833#else
1834# define WARN_S_L(s,l) s
1835# define WARN_S(s) s
1836# define WARN_I(i) i
1837# define WARN_ID(i) rb_id2name(i)
1838# define PRIsWARN PRIsVALUE
1839# define WARN_ARGS(fmt,n) WARN_ARGS_L(p->ruby_sourceline,fmt,n)
1840# define WARN_ARGS_L(l,fmt,n) p->ruby_sourcefile, (l), (fmt)
1841# define WARN_CALL rb_compile_warn
1842# define WARNING_ARGS(fmt,n) WARN_ARGS(fmt,n)
1843# define WARNING_ARGS_L(l,fmt,n) WARN_ARGS_L(l,fmt,n)
1844# define WARNING_CALL rb_compile_warning
1845PRINTF_ARGS(static void parser_compile_error(struct parser_params*, const rb_code_location_t *loc, const char *fmt, ...), 3, 4);
1846# define compile_error(p, ...) parser_compile_error(p, NULL, __VA_ARGS__)
1847#endif
1848
1849#define RNODE_EXITS(node) ((rb_node_exits_t*)(node))
1850
1851static NODE *
1852add_block_exit(struct parser_params *p, NODE *node)
1853{
1854 if (!node) {
1855 compile_error(p, "unexpected null node");
1856 return 0;
1857 }
1858 switch (nd_type(node)) {
1859 case NODE_BREAK: case NODE_NEXT: case NODE_REDO: break;
1860 default:
1861 compile_error(p, "add_block_exit: unexpected node: %s", parser_node_name(nd_type(node)));
1862 return node;
1863 }
1864 if (!p->ctxt.in_defined) {
1865 rb_node_exits_t *exits = p->exits;
1866 if (exits) {
1867 RNODE_EXITS(exits->nd_stts)->nd_chain = node;
1868 exits->nd_stts = node;
1869 }
1870 }
1871 return node;
1872}
1873
1874static rb_node_exits_t *
1875init_block_exit(struct parser_params *p)
1876{
1877 rb_node_exits_t *old = p->exits;
1878 rb_node_exits_t *exits = NODE_NEW_INTERNAL(NODE_EXITS, rb_node_exits_t);
1879 exits->nd_chain = 0;
1880 exits->nd_stts = RNODE(exits);
1881 p->exits = exits;
1882 return old;
1883}
1884
1885static rb_node_exits_t *
1886allow_block_exit(struct parser_params *p)
1887{
1888 rb_node_exits_t *exits = p->exits;
1889 p->exits = 0;
1890 return exits;
1891}
1892
1893static void
1894restore_block_exit(struct parser_params *p, rb_node_exits_t *exits)
1895{
1896 p->exits = exits;
1897}
1898
1899static void
1900clear_block_exit(struct parser_params *p, bool error)
1901{
1902 rb_node_exits_t *exits = p->exits;
1903 if (!exits) return;
1904 if (error) {
1905 for (NODE *e = RNODE(exits); (e = RNODE_EXITS(e)->nd_chain) != 0; ) {
1906 switch (nd_type(e)) {
1907 case NODE_BREAK:
1908 yyerror1(&e->nd_loc, "Invalid break");
1909 break;
1910 case NODE_NEXT:
1911 yyerror1(&e->nd_loc, "Invalid next");
1912 break;
1913 case NODE_REDO:
1914 yyerror1(&e->nd_loc, "Invalid redo");
1915 break;
1916 default:
1917 yyerror1(&e->nd_loc, "unexpected node");
1918 goto end_checks; /* no nd_chain */
1919 }
1920 }
1921 end_checks:;
1922 }
1923 exits->nd_stts = RNODE(exits);
1924 exits->nd_chain = 0;
1925}
1926
1927#define WARN_EOL(tok) \
1928 (looking_at_eol_p(p) ? \
1929 (void)rb_warning0("'" tok "' at the end of line without an expression") : \
1930 (void)0)
1931static int looking_at_eol_p(struct parser_params *p);
1932
1933static NODE *
1934get_nd_value(struct parser_params *p, NODE *node)
1935{
1936 switch (nd_type(node)) {
1937 case NODE_GASGN:
1938 return RNODE_GASGN(node)->nd_value;
1939 case NODE_IASGN:
1940 return RNODE_IASGN(node)->nd_value;
1941 case NODE_LASGN:
1942 return RNODE_LASGN(node)->nd_value;
1943 case NODE_DASGN:
1944 return RNODE_DASGN(node)->nd_value;
1945 case NODE_MASGN:
1946 return RNODE_MASGN(node)->nd_value;
1947 case NODE_CVASGN:
1948 return RNODE_CVASGN(node)->nd_value;
1949 case NODE_CDECL:
1950 return RNODE_CDECL(node)->nd_value;
1951 default:
1952 compile_error(p, "get_nd_value: unexpected node: %s", parser_node_name(nd_type(node)));
1953 return 0;
1954 }
1955}
1956
1957static void
1958set_nd_value(struct parser_params *p, NODE *node, NODE *rhs)
1959{
1960 switch (nd_type(node)) {
1961 case NODE_CDECL:
1962 RNODE_CDECL(node)->nd_value = rhs;
1963 break;
1964 case NODE_GASGN:
1965 RNODE_GASGN(node)->nd_value = rhs;
1966 break;
1967 case NODE_IASGN:
1968 RNODE_IASGN(node)->nd_value = rhs;
1969 break;
1970 case NODE_LASGN:
1971 RNODE_LASGN(node)->nd_value = rhs;
1972 break;
1973 case NODE_DASGN:
1974 RNODE_DASGN(node)->nd_value = rhs;
1975 break;
1976 case NODE_MASGN:
1977 RNODE_MASGN(node)->nd_value = rhs;
1978 break;
1979 case NODE_CVASGN:
1980 RNODE_CVASGN(node)->nd_value = rhs;
1981 break;
1982 default:
1983 compile_error(p, "set_nd_value: unexpected node: %s", parser_node_name(nd_type(node)));
1984 break;
1985 }
1986}
1987
1988static ID
1989get_nd_vid(struct parser_params *p, NODE *node)
1990{
1991 switch (nd_type(node)) {
1992 case NODE_CDECL:
1993 return RNODE_CDECL(node)->nd_vid;
1994 case NODE_GASGN:
1995 return RNODE_GASGN(node)->nd_vid;
1996 case NODE_IASGN:
1997 return RNODE_IASGN(node)->nd_vid;
1998 case NODE_LASGN:
1999 return RNODE_LASGN(node)->nd_vid;
2000 case NODE_DASGN:
2001 return RNODE_DASGN(node)->nd_vid;
2002 case NODE_CVASGN:
2003 return RNODE_CVASGN(node)->nd_vid;
2004 default:
2005 compile_error(p, "get_nd_vid: unexpected node: %s", parser_node_name(nd_type(node)));
2006 return 0;
2007 }
2008}
2009
2010static NODE *
2011get_nd_args(struct parser_params *p, NODE *node)
2012{
2013 switch (nd_type(node)) {
2014 case NODE_CALL:
2015 return RNODE_CALL(node)->nd_args;
2016 case NODE_OPCALL:
2017 return RNODE_OPCALL(node)->nd_args;
2018 case NODE_FCALL:
2019 return RNODE_FCALL(node)->nd_args;
2020 case NODE_QCALL:
2021 return RNODE_QCALL(node)->nd_args;
2022 case NODE_SUPER:
2023 return RNODE_SUPER(node)->nd_args;
2024 case NODE_VCALL:
2025 case NODE_ZSUPER:
2026 case NODE_YIELD:
2027 case NODE_RETURN:
2028 case NODE_BREAK:
2029 case NODE_NEXT:
2030 return 0;
2031 default:
2032 compile_error(p, "get_nd_args: unexpected node: %s", parser_node_name(nd_type(node)));
2033 return 0;
2034 }
2035}
2036
2037static st_index_t
2038djb2(const uint8_t *str, size_t len)
2039{
2040 st_index_t hash = 5381;
2041
2042 for (size_t i = 0; i < len; i++) {
2043 hash = ((hash << 5) + hash) + str[i];
2044 }
2045
2046 return hash;
2047}
2048
2049static st_index_t
2050parser_memhash(const void *ptr, long len)
2051{
2052 return djb2(ptr, len);
2053}
2054
2055#define PARSER_STRING_PTR(str) (str->ptr)
2056#define PARSER_STRING_LEN(str) (str->len)
2057#define PARSER_STRING_END(str) (&str->ptr[str->len])
2058#define STRING_SIZE(str) ((size_t)str->len + 1)
2059#define STRING_TERM_LEN(str) (1)
2060#define STRING_TERM_FILL(str) (str->ptr[str->len] = '\0')
2061#define PARSER_STRING_RESIZE_CAPA_TERM(p,str,capacity,termlen) do {\
2062 REALLOC_N(str->ptr, char, (size_t)total + termlen); \
2063 str->len = total; \
2064} while (0)
2065#define STRING_SET_LEN(str, n) do { \
2066 (str)->len = (n); \
2067} while (0)
2068#define PARSER_STRING_GETMEM(str, ptrvar, lenvar) \
2069 ((ptrvar) = str->ptr, \
2070 (lenvar) = str->len)
2071
2072static inline int
2073parser_string_char_at_end(struct parser_params *p, rb_parser_string_t *str, int when_empty)
2074{
2075 return PARSER_STRING_LEN(str) > 0 ? (unsigned char)PARSER_STRING_END(str)[-1] : when_empty;
2076}
2077
2078static rb_parser_string_t *
2079rb_parser_string_new(rb_parser_t *p, const char *ptr, long len)
2080{
2081 rb_parser_string_t *str;
2082
2083 if (len < 0) {
2084 rb_bug("negative string size (or size too big): %ld", len);
2085 }
2086
2087 str = xcalloc(1, sizeof(rb_parser_string_t));
2088 str->ptr = xcalloc(len + 1, sizeof(char));
2089
2090 if (ptr) {
2091 memcpy(PARSER_STRING_PTR(str), ptr, len);
2092 }
2093 STRING_SET_LEN(str, len);
2094 STRING_TERM_FILL(str);
2095 return str;
2096}
2097
2098static rb_parser_string_t *
2099rb_parser_encoding_string_new(rb_parser_t *p, const char *ptr, long len, rb_encoding *enc)
2100{
2101 rb_parser_string_t *str = rb_parser_string_new(p, ptr, len);
2102 str->coderange = RB_PARSER_ENC_CODERANGE_UNKNOWN;
2103 str->enc = enc;
2104 return str;
2105}
2106
2107#ifndef RIPPER
2108rb_parser_string_t *
2109rb_str_to_parser_string(rb_parser_t *p, VALUE str)
2110{
2111 /* Type check */
2112 rb_parser_string_t *ret = rb_parser_encoding_string_new(p, RSTRING_PTR(str), RSTRING_LEN(str), rb_enc_get(str));
2113 RB_GC_GUARD(str);
2114 return ret;
2115}
2116
2117void
2118rb_parser_string_free(rb_parser_t *p, rb_parser_string_t *str)
2119{
2120 if (!str) return;
2121 xfree(PARSER_STRING_PTR(str));
2122 xfree(str);
2123}
2124#endif
2125
2126static st_index_t
2127rb_parser_str_hash(rb_parser_string_t *str)
2128{
2129 return parser_memhash((const void *)PARSER_STRING_PTR(str), PARSER_STRING_LEN(str));
2130}
2131
2132static st_index_t
2133rb_char_p_hash(const char *c)
2134{
2135 return parser_memhash((const void *)c, strlen(c));
2136}
2137
2138static size_t
2139rb_parser_str_capacity(rb_parser_string_t *str, const int termlen)
2140{
2141 return PARSER_STRING_LEN(str);
2142}
2143
2144#ifndef RIPPER
2145static char *
2146rb_parser_string_end(rb_parser_string_t *str)
2147{
2148 return &str->ptr[str->len];
2149}
2150#endif
2151
2152static void
2153rb_parser_string_set_encoding(rb_parser_string_t *str, rb_encoding *enc)
2154{
2155 str->enc = enc;
2156}
2157
2158static rb_encoding *
2159rb_parser_str_get_encoding(rb_parser_string_t *str)
2160{
2161 return str->enc;
2162}
2163
2164#ifndef RIPPER
2165static bool
2166PARSER_ENCODING_IS_ASCII8BIT(struct parser_params *p, rb_parser_string_t *str)
2167{
2168 return rb_parser_str_get_encoding(str) == rb_ascii8bit_encoding();
2169}
2170#endif
2171
2172static int
2173PARSER_ENC_CODERANGE(rb_parser_string_t *str)
2174{
2175 return str->coderange;
2176}
2177
2178static void
2179PARSER_ENC_CODERANGE_SET(rb_parser_string_t *str, int coderange)
2180{
2181 str->coderange = coderange;
2182}
2183
2184static void
2185PARSER_ENCODING_CODERANGE_SET(rb_parser_string_t *str, rb_encoding *enc, enum rb_parser_string_coderange_type cr)
2186{
2187 rb_parser_string_set_encoding(str, enc);
2188 PARSER_ENC_CODERANGE_SET(str, cr);
2189}
2190
2191static void
2192PARSER_ENC_CODERANGE_CLEAR(rb_parser_string_t *str)
2193{
2194 str->coderange = RB_PARSER_ENC_CODERANGE_UNKNOWN;
2195}
2196
2197static bool
2198PARSER_ENC_CODERANGE_ASCIIONLY(rb_parser_string_t *str)
2199{
2200 return PARSER_ENC_CODERANGE(str) == RB_PARSER_ENC_CODERANGE_7BIT;
2201}
2202
2203static bool
2204PARSER_ENC_CODERANGE_CLEAN_P(int cr)
2205{
2206 return cr == RB_PARSER_ENC_CODERANGE_7BIT || cr == RB_PARSER_ENC_CODERANGE_VALID;
2207}
2208
2209static const char *
2210rb_parser_search_nonascii(const char *p, const char *e)
2211{
2212 const char *s = p;
2213
2214 for (; s < e; s++) {
2215 if (*s & 0x80) return s;
2216 }
2217
2218 return NULL;
2219}
2220
2221static int
2222rb_parser_coderange_scan(struct parser_params *p, const char *ptr, long len, rb_encoding *enc)
2223{
2224 const char *e = ptr + len;
2225
2226 if (enc == rb_ascii8bit_encoding()) {
2227 /* enc is ASCII-8BIT. ASCII-8BIT string never be broken. */
2228 ptr = rb_parser_search_nonascii(ptr, e);
2229 return ptr ? RB_PARSER_ENC_CODERANGE_VALID : RB_PARSER_ENC_CODERANGE_7BIT;
2230 }
2231
2232 /* parser string encoding is always asciicompat */
2233 ptr = rb_parser_search_nonascii(ptr, e);
2234 if (!ptr) return RB_PARSER_ENC_CODERANGE_7BIT;
2235 for (;;) {
2236 int ret = rb_enc_precise_mbclen(ptr, e, enc);
2237 if (!MBCLEN_CHARFOUND_P(ret)) return RB_PARSER_ENC_CODERANGE_BROKEN;
2238 ptr += MBCLEN_CHARFOUND_LEN(ret);
2239 if (ptr == e) break;
2240 ptr = rb_parser_search_nonascii(ptr, e);
2241 if (!ptr) break;
2242 }
2243
2244 return RB_PARSER_ENC_CODERANGE_VALID;
2245}
2246
2247static int
2248rb_parser_enc_coderange_scan(struct parser_params *p, rb_parser_string_t *str, rb_encoding *enc)
2249{
2250 return rb_parser_coderange_scan(p, PARSER_STRING_PTR(str), PARSER_STRING_LEN(str), enc);
2251}
2252
2253static int
2254rb_parser_enc_str_coderange(struct parser_params *p, rb_parser_string_t *str)
2255{
2256 int cr = PARSER_ENC_CODERANGE(str);
2257
2258 if (cr == RB_PARSER_ENC_CODERANGE_UNKNOWN) {
2259 cr = rb_parser_enc_coderange_scan(p, str, rb_parser_str_get_encoding(str));
2260 PARSER_ENC_CODERANGE_SET(str, cr);
2261 }
2262
2263 return cr;
2264}
2265
2266static rb_parser_string_t *
2267rb_parser_enc_associate(struct parser_params *p, rb_parser_string_t *str, rb_encoding *enc)
2268{
2269 if (rb_parser_str_get_encoding(str) == enc)
2270 return str;
2271 if (!PARSER_ENC_CODERANGE_ASCIIONLY(str)) {
2272 PARSER_ENC_CODERANGE_CLEAR(str);
2273 }
2274 rb_parser_string_set_encoding(str, enc);
2275 return str;
2276}
2277
2278static bool
2279rb_parser_is_ascii_string(struct parser_params *p, rb_parser_string_t *str)
2280{
2281 return rb_parser_enc_str_coderange(p, str) == RB_PARSER_ENC_CODERANGE_7BIT;
2282}
2283
2284static rb_encoding *
2285rb_parser_enc_compatible(struct parser_params *p, rb_parser_string_t *str1, rb_parser_string_t *str2)
2286{
2287 rb_encoding *enc1 = rb_parser_str_get_encoding(str1);
2288 rb_encoding *enc2 = rb_parser_str_get_encoding(str2);
2289
2290 if (enc1 == NULL || enc2 == NULL)
2291 return 0;
2292
2293 if (enc1 == enc2) {
2294 return enc1;
2295 }
2296
2297 if (PARSER_STRING_LEN(str2) == 0)
2298 return enc1;
2299 if (PARSER_STRING_LEN(str1) == 0)
2300 return rb_parser_is_ascii_string(p, str2) ? enc1 : enc2;
2301
2302 int cr1, cr2;
2303
2304 cr1 = rb_parser_enc_str_coderange(p, str1);
2305 cr2 = rb_parser_enc_str_coderange(p, str2);
2306
2307 if (cr1 != cr2) {
2308 if (cr1 == RB_PARSER_ENC_CODERANGE_7BIT) return enc2;
2309 if (cr2 == RB_PARSER_ENC_CODERANGE_7BIT) return enc1;
2310 }
2311
2312 if (cr2 == RB_PARSER_ENC_CODERANGE_7BIT) {
2313 return enc1;
2314 }
2315
2316 if (cr1 == RB_PARSER_ENC_CODERANGE_7BIT) {
2317 return enc2;
2318 }
2319
2320 return 0;
2321}
2322
2323static void
2324rb_parser_str_modify(rb_parser_string_t *str)
2325{
2326 PARSER_ENC_CODERANGE_CLEAR(str);
2327}
2328
2329static void
2330rb_parser_str_set_len(struct parser_params *p, rb_parser_string_t *str, long len)
2331{
2332 long capa;
2333 const int termlen = STRING_TERM_LEN(str);
2334
2335 if (len > (capa = (long)(rb_parser_str_capacity(str, termlen))) || len < 0) {
2336 rb_bug("probable buffer overflow: %ld for %ld", len, capa);
2337 }
2338
2339 int cr = PARSER_ENC_CODERANGE(str);
2340 if (cr == RB_PARSER_ENC_CODERANGE_UNKNOWN) {
2341 /* Leave unknown. */
2342 }
2343 else if (len > PARSER_STRING_LEN(str)) {
2344 PARSER_ENC_CODERANGE_SET(str, RB_PARSER_ENC_CODERANGE_UNKNOWN);
2345 }
2346 else if (len < PARSER_STRING_LEN(str)) {
2347 if (cr != RB_PARSER_ENC_CODERANGE_7BIT) {
2348 /* ASCII-only string is keeping after truncated. Valid
2349 * and broken may be invalid or valid, leave unknown. */
2350 PARSER_ENC_CODERANGE_SET(str, RB_PARSER_ENC_CODERANGE_UNKNOWN);
2351 }
2352 }
2353
2354 STRING_SET_LEN(str, len);
2355 STRING_TERM_FILL(str);
2356}
2357
2358static rb_parser_string_t *
2359rb_parser_str_buf_cat(struct parser_params *p, rb_parser_string_t *str, const char *ptr, long len)
2360{
2361 rb_parser_str_modify(str);
2362 if (len == 0) return 0;
2363
2364 long total, olen, off = -1;
2365 char *sptr;
2366 const int termlen = STRING_TERM_LEN(str);
2367
2368 PARSER_STRING_GETMEM(str, sptr, olen);
2369 if (ptr >= sptr && ptr <= sptr + olen) {
2370 off = ptr - sptr;
2371 }
2372
2373 if (olen > LONG_MAX - len) {
2374 compile_error(p, "string sizes too big");
2375 return 0;
2376 }
2377 total = olen + len;
2378 PARSER_STRING_RESIZE_CAPA_TERM(p, str, total, termlen);
2379 sptr = PARSER_STRING_PTR(str);
2380 if (off != -1) {
2381 ptr = sptr + off;
2382 }
2383 memcpy(sptr + olen, ptr, len);
2384 STRING_SET_LEN(str, total);
2385 STRING_TERM_FILL(str);
2386
2387 return str;
2388}
2389
2390#define parser_str_cat(str, ptr, len) rb_parser_str_buf_cat(p, str, ptr, len)
2391#define parser_str_cat_cstr(str, lit) rb_parser_str_buf_cat(p, str, lit, strlen(lit))
2392
2393static rb_parser_string_t *
2394rb_parser_enc_cr_str_buf_cat(struct parser_params *p, rb_parser_string_t *str, const char *ptr, long len,
2395 rb_encoding *ptr_enc, int ptr_cr, int *ptr_cr_ret)
2396{
2397 int str_cr, res_cr;
2398 rb_encoding *str_enc, *res_enc;
2399
2400 str_enc = rb_parser_str_get_encoding(str);
2401 str_cr = PARSER_STRING_LEN(str) ? PARSER_ENC_CODERANGE(str) : RB_PARSER_ENC_CODERANGE_7BIT;
2402
2403 if (str_enc == ptr_enc) {
2404 if (str_cr != RB_PARSER_ENC_CODERANGE_UNKNOWN && ptr_cr == RB_PARSER_ENC_CODERANGE_UNKNOWN) {
2405 ptr_cr = rb_parser_coderange_scan(p, ptr, len, ptr_enc);
2406 }
2407 }
2408 else {
2409 /* parser string encoding is always asciicompat */
2410 if (ptr_cr == RB_PARSER_ENC_CODERANGE_UNKNOWN) {
2411 ptr_cr = rb_parser_coderange_scan(p, ptr, len, ptr_enc);
2412 }
2413 if (str_cr == RB_PARSER_ENC_CODERANGE_UNKNOWN) {
2414 if (str_enc == rb_ascii8bit_encoding() || ptr_cr != RB_PARSER_ENC_CODERANGE_7BIT) {
2415 str_cr = rb_parser_enc_str_coderange(p, str);
2416 }
2417 }
2418 }
2419 if (ptr_cr_ret)
2420 *ptr_cr_ret = ptr_cr;
2421
2422 if (str_enc != ptr_enc &&
2423 str_cr != RB_PARSER_ENC_CODERANGE_7BIT &&
2424 ptr_cr != RB_PARSER_ENC_CODERANGE_7BIT) {
2425 goto incompatible;
2426 }
2427
2428 if (str_cr == RB_PARSER_ENC_CODERANGE_UNKNOWN) {
2429 res_enc = str_enc;
2430 res_cr = RB_PARSER_ENC_CODERANGE_UNKNOWN;
2431 }
2432 else if (str_cr == RB_PARSER_ENC_CODERANGE_7BIT) {
2433 if (ptr_cr == RB_PARSER_ENC_CODERANGE_7BIT) {
2434 res_enc = str_enc;
2435 res_cr = RB_PARSER_ENC_CODERANGE_7BIT;
2436 }
2437 else {
2438 res_enc = ptr_enc;
2439 res_cr = ptr_cr;
2440 }
2441 }
2442 else if (str_cr == RB_PARSER_ENC_CODERANGE_VALID) {
2443 res_enc = str_enc;
2444 if (PARSER_ENC_CODERANGE_CLEAN_P(ptr_cr))
2445 res_cr = str_cr;
2446 else
2447 res_cr = ptr_cr;
2448 }
2449 else { /* str_cr == RB_PARSER_ENC_CODERANGE_BROKEN */
2450 res_enc = str_enc;
2451 res_cr = str_cr;
2452 if (0 < len) res_cr = RB_PARSER_ENC_CODERANGE_UNKNOWN;
2453 }
2454
2455 if (len < 0) {
2456 compile_error(p, "negative string size (or size too big)");
2457 }
2458 parser_str_cat(str, ptr, len);
2459 PARSER_ENCODING_CODERANGE_SET(str, res_enc, res_cr);
2460 return str;
2461
2462 incompatible:
2463 compile_error(p, "incompatible character encodings: %s and %s",
2464 rb_enc_name(str_enc), rb_enc_name(ptr_enc));
2465 UNREACHABLE_RETURN(0);
2466
2467}
2468
2469static rb_parser_string_t *
2470rb_parser_enc_str_buf_cat(struct parser_params *p, rb_parser_string_t *str, const char *ptr, long len,
2471 rb_encoding *ptr_enc)
2472{
2473 return rb_parser_enc_cr_str_buf_cat(p, str, ptr, len, ptr_enc, RB_PARSER_ENC_CODERANGE_UNKNOWN, NULL);
2474}
2475
2476static rb_parser_string_t *
2477rb_parser_str_buf_append(struct parser_params *p, rb_parser_string_t *str, rb_parser_string_t *str2)
2478{
2479 int str2_cr = rb_parser_enc_str_coderange(p, str2);
2480
2481 rb_parser_enc_cr_str_buf_cat(p, str, PARSER_STRING_PTR(str2), PARSER_STRING_LEN(str2),
2482 rb_parser_str_get_encoding(str2), str2_cr, &str2_cr);
2483
2484 PARSER_ENC_CODERANGE_SET(str2, str2_cr);
2485
2486 return str;
2487}
2488
2489static rb_parser_string_t *
2490rb_parser_str_resize(struct parser_params *p, rb_parser_string_t *str, long len)
2491{
2492 if (len < 0) {
2493 rb_bug("negative string size (or size too big)");
2494 }
2495
2496 long slen = PARSER_STRING_LEN(str);
2497
2498 if (slen > len && PARSER_ENC_CODERANGE(str) != RB_PARSER_ENC_CODERANGE_7BIT) {
2499 PARSER_ENC_CODERANGE_CLEAR(str);
2500 }
2501
2502 {
2503 long capa;
2504 const int termlen = STRING_TERM_LEN(str);
2505
2506 if ((capa = slen) < len) {
2507 SIZED_REALLOC_N(str->ptr, char, (size_t)len + termlen, STRING_SIZE(str));
2508 }
2509 else if (len == slen) return str;
2510 STRING_SET_LEN(str, len);
2511 STRING_TERM_FILL(str);
2512 }
2513 return str;
2514}
2515
2516# define PARSER_ENC_STRING_GETMEM(str, ptrvar, lenvar, encvar) \
2517 ((ptrvar) = str->ptr, \
2518 (lenvar) = str->len, \
2519 (encvar) = str->enc)
2520
2521static int
2522rb_parser_string_hash_cmp(rb_parser_string_t *str1, rb_parser_string_t *str2)
2523{
2524 long len1, len2;
2525 const char *ptr1, *ptr2;
2526 rb_encoding *enc1, *enc2;
2527
2528 PARSER_ENC_STRING_GETMEM(str1, ptr1, len1, enc1);
2529 PARSER_ENC_STRING_GETMEM(str2, ptr2, len2, enc2);
2530
2531 return (len1 != len2 ||
2532 enc1 != enc2 ||
2533 memcmp(ptr1, ptr2, len1) != 0);
2534}
2535
2536static void
2537rb_parser_ary_extend(rb_parser_t *p, rb_parser_ary_t *ary, long len)
2538{
2539 long i;
2540 if (ary->capa < len) {
2541 ary->capa = len;
2542 ary->data = (rb_parser_ary_data *)xrealloc(ary->data, sizeof(rb_parser_ary_data) * len);
2543 for (i = ary->len; i < len; i++) {
2544 ary->data[i] = 0;
2545 }
2546 }
2547}
2548
2549/*
2550 * Do not call this directly.
2551 * Use rb_parser_ary_new_capa_for_XXX() instead.
2552 */
2553static rb_parser_ary_t *
2554parser_ary_new_capa(rb_parser_t *p, long len)
2555{
2556 if (len < 0) {
2557 rb_bug("negative array size (or size too big): %ld", len);
2558 }
2559 rb_parser_ary_t *ary = xcalloc(1, sizeof(rb_parser_ary_t));
2560 ary->data_type = 0;
2561 ary->len = 0;
2562 ary->capa = len;
2563 if (0 < len) {
2564 ary->data = (rb_parser_ary_data *)xcalloc(len, sizeof(rb_parser_ary_data));
2565 }
2566 else {
2567 ary->data = NULL;
2568 }
2569 return ary;
2570}
2571
2572#ifndef RIPPER
2573static rb_parser_ary_t *
2574rb_parser_ary_new_capa_for_script_line(rb_parser_t *p, long len)
2575{
2576 rb_parser_ary_t *ary = parser_ary_new_capa(p, len);
2577 ary->data_type = PARSER_ARY_DATA_SCRIPT_LINE;
2578 return ary;
2579}
2580
2581static rb_parser_ary_t *
2582rb_parser_ary_new_capa_for_ast_token(rb_parser_t *p, long len)
2583{
2584 rb_parser_ary_t *ary = parser_ary_new_capa(p, len);
2585 ary->data_type = PARSER_ARY_DATA_AST_TOKEN;
2586 return ary;
2587}
2588#endif
2589
2590static rb_parser_ary_t *
2591rb_parser_ary_new_capa_for_node(rb_parser_t *p, long len)
2592{
2593 rb_parser_ary_t *ary = parser_ary_new_capa(p, len);
2594 ary->data_type = PARSER_ARY_DATA_NODE;
2595 return ary;
2596}
2597
2598/*
2599 * Do not call this directly.
2600 * Use rb_parser_ary_push_XXX() instead.
2601 */
2602static rb_parser_ary_t *
2603parser_ary_push(rb_parser_t *p, rb_parser_ary_t *ary, rb_parser_ary_data val)
2604{
2605 if (ary->len == ary->capa) {
2606 rb_parser_ary_extend(p, ary, ary->len == 0 ? 1 : ary->len * 2);
2607 }
2608 ary->data[ary->len++] = val;
2609 return ary;
2610}
2611
2612#ifndef RIPPER
2613static rb_parser_ary_t *
2614rb_parser_ary_push_ast_token(rb_parser_t *p, rb_parser_ary_t *ary, rb_parser_ast_token_t *val)
2615{
2616 if (ary->data_type != PARSER_ARY_DATA_AST_TOKEN) {
2617 rb_bug("unexpected rb_parser_ary_data_type: %d", ary->data_type);
2618 }
2619 return parser_ary_push(p, ary, val);
2620}
2621
2622static rb_parser_ary_t *
2623rb_parser_ary_push_script_line(rb_parser_t *p, rb_parser_ary_t *ary, rb_parser_string_t *val)
2624{
2625 if (ary->data_type != PARSER_ARY_DATA_SCRIPT_LINE) {
2626 rb_bug("unexpected rb_parser_ary_data_type: %d", ary->data_type);
2627 }
2628 return parser_ary_push(p, ary, val);
2629}
2630#endif
2631
2632static rb_parser_ary_t *
2633rb_parser_ary_push_node(rb_parser_t *p, rb_parser_ary_t *ary, NODE *val)
2634{
2635 if (ary->data_type != PARSER_ARY_DATA_NODE) {
2636 rb_bug("unexpected rb_parser_ary_data_type: %d", ary->data_type);
2637 }
2638 return parser_ary_push(p, ary, val);
2639}
2640
2641#ifndef RIPPER
2642static void
2643rb_parser_ast_token_free(rb_parser_t *p, rb_parser_ast_token_t *token)
2644{
2645 if (!token) return;
2646 rb_parser_string_free(p, token->str);
2647 xfree(token);
2648}
2649
2650static void
2651rb_parser_ary_free(rb_parser_t *p, rb_parser_ary_t *ary)
2652{
2653# define foreach_ary(ptr) \
2654 for (rb_parser_ary_data *ptr = ary->data, *const end_ary_data = ptr + ary->len; \
2655 ptr < end_ary_data; ptr++)
2656 switch (ary->data_type) {
2657 case PARSER_ARY_DATA_AST_TOKEN:
2658 foreach_ary(data) {rb_parser_ast_token_free(p, *data);}
2659 break;
2660 case PARSER_ARY_DATA_SCRIPT_LINE:
2661 foreach_ary(data) {rb_parser_string_free(p, *data);}
2662 break;
2663 case PARSER_ARY_DATA_NODE:
2664 /* Do nothing because nodes are freed when rb_ast_t is freed */
2665 break;
2666 default:
2667 rb_bug("unexpected rb_parser_ary_data_type: %d", ary->data_type);
2668 break;
2669 }
2670# undef foreach_ary
2671 xfree(ary->data);
2672 xfree(ary);
2673}
2674
2675#endif /* !RIPPER */
2676
2677#line 2678 "parse.c"
2678
2679# ifndef YY_CAST
2680# ifdef __cplusplus
2681# define YY_CAST(Type, Val) static_cast<Type> (Val)
2682# define YY_REINTERPRET_CAST(Type, Val) reinterpret_cast<Type> (Val)
2683# else
2684# define YY_CAST(Type, Val) ((Type) (Val))
2685# define YY_REINTERPRET_CAST(Type, Val) ((Type) (Val))
2686# endif
2687# endif
2688# ifndef YY_NULLPTR
2689# if defined __cplusplus
2690# if 201103L <= __cplusplus
2691# define YY_NULLPTR nullptr
2692# else
2693# define YY_NULLPTR 0
2694# endif
2695# else
2696# define YY_NULLPTR ((void*)0)
2697# endif
2698# endif
2699
2700#include "parse.h"
2701/* Symbol kind. */
2702enum yysymbol_kind_t
2703{
2704 YYSYMBOL_YYEMPTY = -2,
2705 YYSYMBOL_YYEOF = 0, /* "end-of-input" */
2706 YYSYMBOL_YYerror = 1, /* error */
2707 YYSYMBOL_YYUNDEF = 2, /* "invalid token" */
2708 YYSYMBOL_keyword_class = 3, /* "'class'" */
2709 YYSYMBOL_keyword_module = 4, /* "'module'" */
2710 YYSYMBOL_keyword_def = 5, /* "'def'" */
2711 YYSYMBOL_keyword_undef = 6, /* "'undef'" */
2712 YYSYMBOL_keyword_begin = 7, /* "'begin'" */
2713 YYSYMBOL_keyword_rescue = 8, /* "'rescue'" */
2714 YYSYMBOL_keyword_ensure = 9, /* "'ensure'" */
2715 YYSYMBOL_keyword_end = 10, /* "'end'" */
2716 YYSYMBOL_keyword_if = 11, /* "'if'" */
2717 YYSYMBOL_keyword_unless = 12, /* "'unless'" */
2718 YYSYMBOL_keyword_then = 13, /* "'then'" */
2719 YYSYMBOL_keyword_elsif = 14, /* "'elsif'" */
2720 YYSYMBOL_keyword_else = 15, /* "'else'" */
2721 YYSYMBOL_keyword_case = 16, /* "'case'" */
2722 YYSYMBOL_keyword_when = 17, /* "'when'" */
2723 YYSYMBOL_keyword_while = 18, /* "'while'" */
2724 YYSYMBOL_keyword_until = 19, /* "'until'" */
2725 YYSYMBOL_keyword_for = 20, /* "'for'" */
2726 YYSYMBOL_keyword_break = 21, /* "'break'" */
2727 YYSYMBOL_keyword_next = 22, /* "'next'" */
2728 YYSYMBOL_keyword_redo = 23, /* "'redo'" */
2729 YYSYMBOL_keyword_retry = 24, /* "'retry'" */
2730 YYSYMBOL_keyword_in = 25, /* "'in'" */
2731 YYSYMBOL_keyword_do = 26, /* "'do'" */
2732 YYSYMBOL_keyword_do_cond = 27, /* "'do' for condition" */
2733 YYSYMBOL_keyword_do_block = 28, /* "'do' for block" */
2734 YYSYMBOL_keyword_do_LAMBDA = 29, /* "'do' for lambda" */
2735 YYSYMBOL_keyword_return = 30, /* "'return'" */
2736 YYSYMBOL_keyword_yield = 31, /* "'yield'" */
2737 YYSYMBOL_keyword_super = 32, /* "'super'" */
2738 YYSYMBOL_keyword_self = 33, /* "'self'" */
2739 YYSYMBOL_keyword_nil = 34, /* "'nil'" */
2740 YYSYMBOL_keyword_true = 35, /* "'true'" */
2741 YYSYMBOL_keyword_false = 36, /* "'false'" */
2742 YYSYMBOL_keyword_and = 37, /* "'and'" */
2743 YYSYMBOL_keyword_or = 38, /* "'or'" */
2744 YYSYMBOL_keyword_not = 39, /* "'not'" */
2745 YYSYMBOL_modifier_if = 40, /* "'if' modifier" */
2746 YYSYMBOL_modifier_unless = 41, /* "'unless' modifier" */
2747 YYSYMBOL_modifier_while = 42, /* "'while' modifier" */
2748 YYSYMBOL_modifier_until = 43, /* "'until' modifier" */
2749 YYSYMBOL_modifier_rescue = 44, /* "'rescue' modifier" */
2750 YYSYMBOL_keyword_alias = 45, /* "'alias'" */
2751 YYSYMBOL_keyword_defined = 46, /* "'defined?'" */
2752 YYSYMBOL_keyword_BEGIN = 47, /* "'BEGIN'" */
2753 YYSYMBOL_keyword_END = 48, /* "'END'" */
2754 YYSYMBOL_keyword__LINE__ = 49, /* "'__LINE__'" */
2755 YYSYMBOL_keyword__FILE__ = 50, /* "'__FILE__'" */
2756 YYSYMBOL_keyword__ENCODING__ = 51, /* "'__ENCODING__'" */
2757 YYSYMBOL_tIDENTIFIER = 52, /* "local variable or method" */
2758 YYSYMBOL_tFID = 53, /* "method" */
2759 YYSYMBOL_tGVAR = 54, /* "global variable" */
2760 YYSYMBOL_tIVAR = 55, /* "instance variable" */
2761 YYSYMBOL_tCONSTANT = 56, /* "constant" */
2762 YYSYMBOL_tCVAR = 57, /* "class variable" */
2763 YYSYMBOL_tLABEL = 58, /* "label" */
2764 YYSYMBOL_tINTEGER = 59, /* "integer literal" */
2765 YYSYMBOL_tFLOAT = 60, /* "float literal" */
2766 YYSYMBOL_tRATIONAL = 61, /* "rational literal" */
2767 YYSYMBOL_tIMAGINARY = 62, /* "imaginary literal" */
2768 YYSYMBOL_tCHAR = 63, /* "char literal" */
2769 YYSYMBOL_tNTH_REF = 64, /* "numbered reference" */
2770 YYSYMBOL_tBACK_REF = 65, /* "back reference" */
2771 YYSYMBOL_tSTRING_CONTENT = 66, /* "literal content" */
2772 YYSYMBOL_tREGEXP_END = 67, /* tREGEXP_END */
2773 YYSYMBOL_tDUMNY_END = 68, /* "dummy end" */
2774 YYSYMBOL_69_ = 69, /* '.' */
2775 YYSYMBOL_70_backslash_ = 70, /* "backslash" */
2776 YYSYMBOL_tSP = 71, /* "escaped space" */
2777 YYSYMBOL_72_escaped_horizontal_tab_ = 72, /* "escaped horizontal tab" */
2778 YYSYMBOL_73_escaped_form_feed_ = 73, /* "escaped form feed" */
2779 YYSYMBOL_74_escaped_carriage_return_ = 74, /* "escaped carriage return" */
2780 YYSYMBOL_75_escaped_vertical_tab_ = 75, /* "escaped vertical tab" */
2781 YYSYMBOL_tUPLUS = 76, /* "unary+" */
2782 YYSYMBOL_tUMINUS = 77, /* "unary-" */
2783 YYSYMBOL_tPOW = 78, /* "**" */
2784 YYSYMBOL_tCMP = 79, /* "<=>" */
2785 YYSYMBOL_tEQ = 80, /* "==" */
2786 YYSYMBOL_tEQQ = 81, /* "===" */
2787 YYSYMBOL_tNEQ = 82, /* "!=" */
2788 YYSYMBOL_tGEQ = 83, /* ">=" */
2789 YYSYMBOL_tLEQ = 84, /* "<=" */
2790 YYSYMBOL_tANDOP = 85, /* "&&" */
2791 YYSYMBOL_tOROP = 86, /* "||" */
2792 YYSYMBOL_tMATCH = 87, /* "=~" */
2793 YYSYMBOL_tNMATCH = 88, /* "!~" */
2794 YYSYMBOL_tDOT2 = 89, /* ".." */
2795 YYSYMBOL_tDOT3 = 90, /* "..." */
2796 YYSYMBOL_tBDOT2 = 91, /* "(.." */
2797 YYSYMBOL_tBDOT3 = 92, /* "(..." */
2798 YYSYMBOL_tAREF = 93, /* "[]" */
2799 YYSYMBOL_tASET = 94, /* "[]=" */
2800 YYSYMBOL_tLSHFT = 95, /* "<<" */
2801 YYSYMBOL_tRSHFT = 96, /* ">>" */
2802 YYSYMBOL_tANDDOT = 97, /* "&." */
2803 YYSYMBOL_tCOLON2 = 98, /* "::" */
2804 YYSYMBOL_tCOLON3 = 99, /* ":: at EXPR_BEG" */
2805 YYSYMBOL_tOP_ASGN = 100, /* "operator-assignment" */
2806 YYSYMBOL_tASSOC = 101, /* "=>" */
2807 YYSYMBOL_tLPAREN = 102, /* "(" */
2808 YYSYMBOL_tLPAREN_ARG = 103, /* "( arg" */
2809 YYSYMBOL_tLBRACK = 104, /* "[" */
2810 YYSYMBOL_tLBRACE = 105, /* "{" */
2811 YYSYMBOL_tLBRACE_ARG = 106, /* "{ arg" */
2812 YYSYMBOL_tSTAR = 107, /* "*" */
2813 YYSYMBOL_tDSTAR = 108, /* "**arg" */
2814 YYSYMBOL_tAMPER = 109, /* "&" */
2815 YYSYMBOL_tLAMBDA = 110, /* "->" */
2816 YYSYMBOL_tSYMBEG = 111, /* "symbol literal" */
2817 YYSYMBOL_tSTRING_BEG = 112, /* "string literal" */
2818 YYSYMBOL_tXSTRING_BEG = 113, /* "backtick literal" */
2819 YYSYMBOL_tREGEXP_BEG = 114, /* "regexp literal" */
2820 YYSYMBOL_tWORDS_BEG = 115, /* "word list" */
2821 YYSYMBOL_tQWORDS_BEG = 116, /* "verbatim word list" */
2822 YYSYMBOL_tSYMBOLS_BEG = 117, /* "symbol list" */
2823 YYSYMBOL_tQSYMBOLS_BEG = 118, /* "verbatim symbol list" */
2824 YYSYMBOL_tSTRING_END = 119, /* "terminator" */
2825 YYSYMBOL_tSTRING_DEND = 120, /* "'}'" */
2826 YYSYMBOL_tSTRING_DBEG = 121, /* "'#{'" */
2827 YYSYMBOL_tSTRING_DVAR = 122, /* tSTRING_DVAR */
2828 YYSYMBOL_tLAMBEG = 123, /* tLAMBEG */
2829 YYSYMBOL_tLABEL_END = 124, /* tLABEL_END */
2830 YYSYMBOL_tIGNORED_NL = 125, /* tIGNORED_NL */
2831 YYSYMBOL_tCOMMENT = 126, /* tCOMMENT */
2832 YYSYMBOL_tEMBDOC_BEG = 127, /* tEMBDOC_BEG */
2833 YYSYMBOL_tEMBDOC = 128, /* tEMBDOC */
2834 YYSYMBOL_tEMBDOC_END = 129, /* tEMBDOC_END */
2835 YYSYMBOL_tHEREDOC_BEG = 130, /* tHEREDOC_BEG */
2836 YYSYMBOL_tHEREDOC_END = 131, /* tHEREDOC_END */
2837 YYSYMBOL_k__END__ = 132, /* k__END__ */
2838 YYSYMBOL_tLOWEST = 133, /* tLOWEST */
2839 YYSYMBOL_134_ = 134, /* '=' */
2840 YYSYMBOL_135_ = 135, /* '?' */
2841 YYSYMBOL_136_ = 136, /* ':' */
2842 YYSYMBOL_137_ = 137, /* '>' */
2843 YYSYMBOL_138_ = 138, /* '<' */
2844 YYSYMBOL_139_ = 139, /* '|' */
2845 YYSYMBOL_140_ = 140, /* '^' */
2846 YYSYMBOL_141_ = 141, /* '&' */
2847 YYSYMBOL_142_ = 142, /* '+' */
2848 YYSYMBOL_143_ = 143, /* '-' */
2849 YYSYMBOL_144_ = 144, /* '*' */
2850 YYSYMBOL_145_ = 145, /* '/' */
2851 YYSYMBOL_146_ = 146, /* '%' */
2852 YYSYMBOL_tUMINUS_NUM = 147, /* tUMINUS_NUM */
2853 YYSYMBOL_148_ = 148, /* '!' */
2854 YYSYMBOL_149_ = 149, /* '~' */
2855 YYSYMBOL_tLAST_TOKEN = 150, /* tLAST_TOKEN */
2856 YYSYMBOL_151_ = 151, /* '{' */
2857 YYSYMBOL_152_ = 152, /* '}' */
2858 YYSYMBOL_153_ = 153, /* '[' */
2859 YYSYMBOL_154_n_ = 154, /* '\n' */
2860 YYSYMBOL_155_ = 155, /* ',' */
2861 YYSYMBOL_156_ = 156, /* '`' */
2862 YYSYMBOL_157_ = 157, /* '(' */
2863 YYSYMBOL_158_ = 158, /* ')' */
2864 YYSYMBOL_159_ = 159, /* ']' */
2865 YYSYMBOL_160_ = 160, /* ';' */
2866 YYSYMBOL_161_ = 161, /* ' ' */
2867 YYSYMBOL_YYACCEPT = 162, /* $accept */
2868 YYSYMBOL_option_terms = 163, /* option_terms */
2869 YYSYMBOL_compstmt_top_stmts = 164, /* compstmt_top_stmts */
2870 YYSYMBOL_165_1 = 165, /* $@1 */
2871 YYSYMBOL_program = 166, /* program */
2872 YYSYMBOL_top_stmts = 167, /* top_stmts */
2873 YYSYMBOL_top_stmt = 168, /* top_stmt */
2874 YYSYMBOL_block_open = 169, /* block_open */
2875 YYSYMBOL_begin_block = 170, /* begin_block */
2876 YYSYMBOL_compstmt_stmts = 171, /* compstmt_stmts */
2877 YYSYMBOL_172_2 = 172, /* $@2 */
2878 YYSYMBOL_173_3 = 173, /* $@3 */
2879 YYSYMBOL_bodystmt = 174, /* bodystmt */
2880 YYSYMBOL_175_4 = 175, /* $@4 */
2881 YYSYMBOL_stmts = 176, /* stmts */
2882 YYSYMBOL_stmt_or_begin = 177, /* stmt_or_begin */
2883 YYSYMBOL_178_5 = 178, /* $@5 */
2884 YYSYMBOL_allow_exits = 179, /* allow_exits */
2885 YYSYMBOL_k_END = 180, /* k_END */
2886 YYSYMBOL_181_6 = 181, /* $@6 */
2887 YYSYMBOL_stmt = 182, /* stmt */
2888 YYSYMBOL_asgn_mrhs = 183, /* asgn_mrhs */
2889 YYSYMBOL_asgn_command_rhs = 184, /* asgn_command_rhs */
2890 YYSYMBOL_command_asgn = 185, /* command_asgn */
2891 YYSYMBOL_op_asgn_command_rhs = 186, /* op_asgn_command_rhs */
2892 YYSYMBOL_def_endless_method_endless_command = 187, /* def_endless_method_endless_command */
2893 YYSYMBOL_endless_command = 188, /* endless_command */
2894 YYSYMBOL_option__n_ = 189, /* option_'\n' */
2895 YYSYMBOL_command_rhs = 190, /* command_rhs */
2896 YYSYMBOL_expr = 191, /* expr */
2897 YYSYMBOL_192_7 = 192, /* $@7 */
2898 YYSYMBOL_193_8 = 193, /* $@8 */
2899 YYSYMBOL_def_name = 194, /* def_name */
2900 YYSYMBOL_defn_head = 195, /* defn_head */
2901 YYSYMBOL_196_9 = 196, /* $@9 */
2902 YYSYMBOL_defs_head = 197, /* defs_head */
2903 YYSYMBOL_value_expr_expr = 198, /* value_expr_expr */
2904 YYSYMBOL_expr_value = 199, /* expr_value */
2905 YYSYMBOL_200_10 = 200, /* $@10 */
2906 YYSYMBOL_201_11 = 201, /* $@11 */
2907 YYSYMBOL_expr_value_do = 202, /* expr_value_do */
2908 YYSYMBOL_command_call = 203, /* command_call */
2909 YYSYMBOL_value_expr_command_call = 204, /* value_expr_command_call */
2910 YYSYMBOL_command_call_value = 205, /* command_call_value */
2911 YYSYMBOL_block_command = 206, /* block_command */
2912 YYSYMBOL_cmd_brace_block = 207, /* cmd_brace_block */
2913 YYSYMBOL_fcall = 208, /* fcall */
2914 YYSYMBOL_command = 209, /* command */
2915 YYSYMBOL_mlhs = 210, /* mlhs */
2916 YYSYMBOL_mlhs_inner = 211, /* mlhs_inner */
2917 YYSYMBOL_mlhs_basic = 212, /* mlhs_basic */
2918 YYSYMBOL_mlhs_items_mlhs_item = 213, /* mlhs_items_mlhs_item */
2919 YYSYMBOL_mlhs_item = 214, /* mlhs_item */
2920 YYSYMBOL_mlhs_head = 215, /* mlhs_head */
2921 YYSYMBOL_mlhs_node = 216, /* mlhs_node */
2922 YYSYMBOL_lhs = 217, /* lhs */
2923 YYSYMBOL_cname = 218, /* cname */
2924 YYSYMBOL_cpath = 219, /* cpath */
2925 YYSYMBOL_fname = 220, /* fname */
2926 YYSYMBOL_fitem = 221, /* fitem */
2927 YYSYMBOL_undef_list = 222, /* undef_list */
2928 YYSYMBOL_223_12 = 223, /* $@12 */
2929 YYSYMBOL_op = 224, /* op */
2930 YYSYMBOL_reswords = 225, /* reswords */
2931 YYSYMBOL_asgn_arg_rhs = 226, /* asgn_arg_rhs */
2932 YYSYMBOL_arg = 227, /* arg */
2933 YYSYMBOL_op_asgn_arg_rhs = 228, /* op_asgn_arg_rhs */
2934 YYSYMBOL_range_expr_arg = 229, /* range_expr_arg */
2935 YYSYMBOL_def_endless_method_endless_arg = 230, /* def_endless_method_endless_arg */
2936 YYSYMBOL_ternary = 231, /* ternary */
2937 YYSYMBOL_endless_arg = 232, /* endless_arg */
2938 YYSYMBOL_relop = 233, /* relop */
2939 YYSYMBOL_rel_expr = 234, /* rel_expr */
2940 YYSYMBOL_lex_ctxt = 235, /* lex_ctxt */
2941 YYSYMBOL_begin_defined = 236, /* begin_defined */
2942 YYSYMBOL_after_rescue = 237, /* after_rescue */
2943 YYSYMBOL_value_expr_arg = 238, /* value_expr_arg */
2944 YYSYMBOL_arg_value = 239, /* arg_value */
2945 YYSYMBOL_aref_args = 240, /* aref_args */
2946 YYSYMBOL_arg_rhs = 241, /* arg_rhs */
2947 YYSYMBOL_paren_args = 242, /* paren_args */
2948 YYSYMBOL_opt_paren_args = 243, /* opt_paren_args */
2949 YYSYMBOL_opt_call_args = 244, /* opt_call_args */
2950 YYSYMBOL_value_expr_command = 245, /* value_expr_command */
2951 YYSYMBOL_call_args = 246, /* call_args */
2952 YYSYMBOL_247_13 = 247, /* $@13 */
2953 YYSYMBOL_command_args = 248, /* command_args */
2954 YYSYMBOL_block_arg = 249, /* block_arg */
2955 YYSYMBOL_opt_block_arg = 250, /* opt_block_arg */
2956 YYSYMBOL_args = 251, /* args */
2957 YYSYMBOL_arg_splat = 252, /* arg_splat */
2958 YYSYMBOL_mrhs_arg = 253, /* mrhs_arg */
2959 YYSYMBOL_mrhs = 254, /* mrhs */
2960 YYSYMBOL_primary = 255, /* primary */
2961 YYSYMBOL_256_14 = 256, /* $@14 */
2962 YYSYMBOL_257_15 = 257, /* $@15 */
2963 YYSYMBOL_258_16 = 258, /* @16 */
2964 YYSYMBOL_259_17 = 259, /* @17 */
2965 YYSYMBOL_260_18 = 260, /* $@18 */
2966 YYSYMBOL_261_19 = 261, /* $@19 */
2967 YYSYMBOL_262_20 = 262, /* $@20 */
2968 YYSYMBOL_263_21 = 263, /* $@21 */
2969 YYSYMBOL_264_22 = 264, /* $@22 */
2970 YYSYMBOL_265_23 = 265, /* $@23 */
2971 YYSYMBOL_266_24 = 266, /* $@24 */
2972 YYSYMBOL_value_expr_primary = 267, /* value_expr_primary */
2973 YYSYMBOL_primary_value = 268, /* primary_value */
2974 YYSYMBOL_k_begin = 269, /* k_begin */
2975 YYSYMBOL_k_if = 270, /* k_if */
2976 YYSYMBOL_k_unless = 271, /* k_unless */
2977 YYSYMBOL_k_while = 272, /* k_while */
2978 YYSYMBOL_k_until = 273, /* k_until */
2979 YYSYMBOL_k_case = 274, /* k_case */
2980 YYSYMBOL_k_for = 275, /* k_for */
2981 YYSYMBOL_k_class = 276, /* k_class */
2982 YYSYMBOL_k_module = 277, /* k_module */
2983 YYSYMBOL_k_def = 278, /* k_def */
2984 YYSYMBOL_k_do = 279, /* k_do */
2985 YYSYMBOL_k_do_block = 280, /* k_do_block */
2986 YYSYMBOL_k_rescue = 281, /* k_rescue */
2987 YYSYMBOL_k_ensure = 282, /* k_ensure */
2988 YYSYMBOL_k_when = 283, /* k_when */
2989 YYSYMBOL_k_else = 284, /* k_else */
2990 YYSYMBOL_k_elsif = 285, /* k_elsif */
2991 YYSYMBOL_k_end = 286, /* k_end */
2992 YYSYMBOL_k_return = 287, /* k_return */
2993 YYSYMBOL_k_yield = 288, /* k_yield */
2994 YYSYMBOL_then = 289, /* then */
2995 YYSYMBOL_do = 290, /* do */
2996 YYSYMBOL_if_tail = 291, /* if_tail */
2997 YYSYMBOL_opt_else = 292, /* opt_else */
2998 YYSYMBOL_for_var = 293, /* for_var */
2999 YYSYMBOL_f_marg = 294, /* f_marg */
3000 YYSYMBOL_mlhs_items_f_marg = 295, /* mlhs_items_f_marg */
3001 YYSYMBOL_f_margs = 296, /* f_margs */
3002 YYSYMBOL_f_rest_marg = 297, /* f_rest_marg */
3003 YYSYMBOL_f_any_kwrest = 298, /* f_any_kwrest */
3004 YYSYMBOL_299_25 = 299, /* $@25 */
3005 YYSYMBOL_f_eq = 300, /* f_eq */
3006 YYSYMBOL_f_kw_primary_value = 301, /* f_kw_primary_value */
3007 YYSYMBOL_f_kwarg_primary_value = 302, /* f_kwarg_primary_value */
3008 YYSYMBOL_opt_f_block_arg_none = 303, /* opt_f_block_arg_none */
3009 YYSYMBOL_args_tail_basic_primary_value_none = 304, /* args_tail_basic_primary_value_none */
3010 YYSYMBOL_block_args_tail = 305, /* block_args_tail */
3011 YYSYMBOL_excessed_comma = 306, /* excessed_comma */
3012 YYSYMBOL_f_opt_primary_value = 307, /* f_opt_primary_value */
3013 YYSYMBOL_f_opt_arg_primary_value = 308, /* f_opt_arg_primary_value */
3014 YYSYMBOL_opt_args_tail_block_args_tail_none = 309, /* opt_args_tail_block_args_tail_none */
3015 YYSYMBOL_args_list_primary_value_opt_args_tail_block_args_tail_none = 310, /* args-list_primary_value_opt_args_tail_block_args_tail_none */
3016 YYSYMBOL_block_param = 311, /* block_param */
3017 YYSYMBOL_tail_only_args_block_args_tail = 312, /* tail-only-args_block_args_tail */
3018 YYSYMBOL_opt_block_param_def = 313, /* opt_block_param_def */
3019 YYSYMBOL_block_param_def = 314, /* block_param_def */
3020 YYSYMBOL_opt_block_param = 315, /* opt_block_param */
3021 YYSYMBOL_opt_bv_decl = 316, /* opt_bv_decl */
3022 YYSYMBOL_bv_decls = 317, /* bv_decls */
3023 YYSYMBOL_bvar = 318, /* bvar */
3024 YYSYMBOL_max_numparam = 319, /* max_numparam */
3025 YYSYMBOL_numparam = 320, /* numparam */
3026 YYSYMBOL_it_id = 321, /* it_id */
3027 YYSYMBOL_322_26 = 322, /* @26 */
3028 YYSYMBOL_323_27 = 323, /* $@27 */
3029 YYSYMBOL_lambda = 324, /* lambda */
3030 YYSYMBOL_f_larglist = 325, /* f_larglist */
3031 YYSYMBOL_lambda_body = 326, /* lambda_body */
3032 YYSYMBOL_327_28 = 327, /* $@28 */
3033 YYSYMBOL_do_block = 328, /* do_block */
3034 YYSYMBOL_block_call = 329, /* block_call */
3035 YYSYMBOL_method_call = 330, /* method_call */
3036 YYSYMBOL_brace_block = 331, /* brace_block */
3037 YYSYMBOL_332_29 = 332, /* @29 */
3038 YYSYMBOL_brace_body = 333, /* brace_body */
3039 YYSYMBOL_334_30 = 334, /* @30 */
3040 YYSYMBOL_do_body = 335, /* do_body */
3041 YYSYMBOL_case_args = 336, /* case_args */
3042 YYSYMBOL_case_body = 337, /* case_body */
3043 YYSYMBOL_cases = 338, /* cases */
3044 YYSYMBOL_p_pvtbl = 339, /* p_pvtbl */
3045 YYSYMBOL_p_pktbl = 340, /* p_pktbl */
3046 YYSYMBOL_p_in_kwarg = 341, /* p_in_kwarg */
3047 YYSYMBOL_342_31 = 342, /* $@31 */
3048 YYSYMBOL_p_case_body = 343, /* p_case_body */
3049 YYSYMBOL_p_cases = 344, /* p_cases */
3050 YYSYMBOL_p_top_expr = 345, /* p_top_expr */
3051 YYSYMBOL_p_top_expr_body = 346, /* p_top_expr_body */
3052 YYSYMBOL_p_expr = 347, /* p_expr */
3053 YYSYMBOL_p_as = 348, /* p_as */
3054 YYSYMBOL_349_32 = 349, /* $@32 */
3055 YYSYMBOL_p_alt = 350, /* p_alt */
3056 YYSYMBOL_p_lparen = 351, /* p_lparen */
3057 YYSYMBOL_p_lbracket = 352, /* p_lbracket */
3058 YYSYMBOL_p_expr_basic = 353, /* p_expr_basic */
3059 YYSYMBOL_354_33 = 354, /* $@33 */
3060 YYSYMBOL_p_args = 355, /* p_args */
3061 YYSYMBOL_p_args_head = 356, /* p_args_head */
3062 YYSYMBOL_p_args_tail = 357, /* p_args_tail */
3063 YYSYMBOL_p_find = 358, /* p_find */
3064 YYSYMBOL_p_rest = 359, /* p_rest */
3065 YYSYMBOL_p_args_post = 360, /* p_args_post */
3066 YYSYMBOL_p_arg = 361, /* p_arg */
3067 YYSYMBOL_p_kwargs = 362, /* p_kwargs */
3068 YYSYMBOL_p_kwarg = 363, /* p_kwarg */
3069 YYSYMBOL_p_kw = 364, /* p_kw */
3070 YYSYMBOL_p_kw_label = 365, /* p_kw_label */
3071 YYSYMBOL_p_kwrest = 366, /* p_kwrest */
3072 YYSYMBOL_p_kwnorest = 367, /* p_kwnorest */
3073 YYSYMBOL_p_any_kwrest = 368, /* p_any_kwrest */
3074 YYSYMBOL_p_value = 369, /* p_value */
3075 YYSYMBOL_range_expr_p_primitive = 370, /* range_expr_p_primitive */
3076 YYSYMBOL_p_primitive = 371, /* p_primitive */
3077 YYSYMBOL_p_variable = 372, /* p_variable */
3078 YYSYMBOL_p_var_ref = 373, /* p_var_ref */
3079 YYSYMBOL_p_expr_ref = 374, /* p_expr_ref */
3080 YYSYMBOL_p_const = 375, /* p_const */
3081 YYSYMBOL_opt_rescue = 376, /* opt_rescue */
3082 YYSYMBOL_exc_list = 377, /* exc_list */
3083 YYSYMBOL_exc_var = 378, /* exc_var */
3084 YYSYMBOL_opt_ensure = 379, /* opt_ensure */
3085 YYSYMBOL_literal = 380, /* literal */
3086 YYSYMBOL_strings = 381, /* strings */
3087 YYSYMBOL_string = 382, /* string */
3088 YYSYMBOL_string1 = 383, /* string1 */
3089 YYSYMBOL_xstring = 384, /* xstring */
3090 YYSYMBOL_regexp = 385, /* regexp */
3091 YYSYMBOL_nonempty_list__ = 386, /* nonempty_list_' ' */
3092 YYSYMBOL_words_tWORDS_BEG_word_list = 387, /* words_tWORDS_BEG_word_list */
3093 YYSYMBOL_words = 388, /* words */
3094 YYSYMBOL_word_list = 389, /* word_list */
3095 YYSYMBOL_word = 390, /* word */
3096 YYSYMBOL_words_tSYMBOLS_BEG_symbol_list = 391, /* words_tSYMBOLS_BEG_symbol_list */
3097 YYSYMBOL_symbols = 392, /* symbols */
3098 YYSYMBOL_symbol_list = 393, /* symbol_list */
3099 YYSYMBOL_words_tQWORDS_BEG_qword_list = 394, /* words_tQWORDS_BEG_qword_list */
3100 YYSYMBOL_qwords = 395, /* qwords */
3101 YYSYMBOL_words_tQSYMBOLS_BEG_qsym_list = 396, /* words_tQSYMBOLS_BEG_qsym_list */
3102 YYSYMBOL_qsymbols = 397, /* qsymbols */
3103 YYSYMBOL_qword_list = 398, /* qword_list */
3104 YYSYMBOL_qsym_list = 399, /* qsym_list */
3105 YYSYMBOL_string_contents = 400, /* string_contents */
3106 YYSYMBOL_xstring_contents = 401, /* xstring_contents */
3107 YYSYMBOL_regexp_contents = 402, /* regexp_contents */
3108 YYSYMBOL_string_content = 403, /* string_content */
3109 YYSYMBOL_404_34 = 404, /* @34 */
3110 YYSYMBOL_405_35 = 405, /* @35 */
3111 YYSYMBOL_406_36 = 406, /* @36 */
3112 YYSYMBOL_407_37 = 407, /* @37 */
3113 YYSYMBOL_408_38 = 408, /* @38 */
3114 YYSYMBOL_string_dend = 409, /* string_dend */
3115 YYSYMBOL_string_dvar = 410, /* string_dvar */
3116 YYSYMBOL_symbol = 411, /* symbol */
3117 YYSYMBOL_ssym = 412, /* ssym */
3118 YYSYMBOL_sym = 413, /* sym */
3119 YYSYMBOL_dsym = 414, /* dsym */
3120 YYSYMBOL_numeric = 415, /* numeric */
3121 YYSYMBOL_simple_numeric = 416, /* simple_numeric */
3122 YYSYMBOL_nonlocal_var = 417, /* nonlocal_var */
3123 YYSYMBOL_user_variable = 418, /* user_variable */
3124 YYSYMBOL_keyword_variable = 419, /* keyword_variable */
3125 YYSYMBOL_var_ref = 420, /* var_ref */
3126 YYSYMBOL_var_lhs = 421, /* var_lhs */
3127 YYSYMBOL_backref = 422, /* backref */
3128 YYSYMBOL_423_39 = 423, /* $@39 */
3129 YYSYMBOL_superclass = 424, /* superclass */
3130 YYSYMBOL_f_opt_paren_args = 425, /* f_opt_paren_args */
3131 YYSYMBOL_f_empty_arg = 426, /* f_empty_arg */
3132 YYSYMBOL_f_paren_args = 427, /* f_paren_args */
3133 YYSYMBOL_f_arglist = 428, /* f_arglist */
3134 YYSYMBOL_429_40 = 429, /* @40 */
3135 YYSYMBOL_f_kw_arg_value = 430, /* f_kw_arg_value */
3136 YYSYMBOL_f_kwarg_arg_value = 431, /* f_kwarg_arg_value */
3137 YYSYMBOL_opt_f_block_arg_opt_comma = 432, /* opt_f_block_arg_opt_comma */
3138 YYSYMBOL_args_tail_basic_arg_value_opt_comma = 433, /* args_tail_basic_arg_value_opt_comma */
3139 YYSYMBOL_args_tail = 434, /* args_tail */
3140 YYSYMBOL_args_tail_basic_arg_value_none = 435, /* args_tail_basic_arg_value_none */
3141 YYSYMBOL_largs_tail = 436, /* largs_tail */
3142 YYSYMBOL_f_opt_arg_value = 437, /* f_opt_arg_value */
3143 YYSYMBOL_f_opt_arg_arg_value = 438, /* f_opt_arg_arg_value */
3144 YYSYMBOL_opt_args_tail_args_tail_opt_comma = 439, /* opt_args_tail_args_tail_opt_comma */
3145 YYSYMBOL_args_list_arg_value_opt_args_tail_args_tail_opt_comma = 440, /* args-list_arg_value_opt_args_tail_args_tail_opt_comma */
3146 YYSYMBOL_f_args_list_args_tail_opt_comma = 441, /* f_args-list_args_tail_opt_comma */
3147 YYSYMBOL_tail_only_args_args_tail = 442, /* tail-only-args_args_tail */
3148 YYSYMBOL_f_args = 443, /* f_args */
3149 YYSYMBOL_opt_args_tail_largs_tail_none = 444, /* opt_args_tail_largs_tail_none */
3150 YYSYMBOL_args_list_arg_value_opt_args_tail_largs_tail_none = 445, /* args-list_arg_value_opt_args_tail_largs_tail_none */
3151 YYSYMBOL_f_args_list_largs_tail_none = 446, /* f_args-list_largs_tail_none */
3152 YYSYMBOL_tail_only_args_largs_tail = 447, /* tail-only-args_largs_tail */
3153 YYSYMBOL_f_largs = 448, /* f_largs */
3154 YYSYMBOL_args_forward = 449, /* args_forward */
3155 YYSYMBOL_f_bad_arg = 450, /* f_bad_arg */
3156 YYSYMBOL_f_norm_arg = 451, /* f_norm_arg */
3157 YYSYMBOL_f_arg_asgn = 452, /* f_arg_asgn */
3158 YYSYMBOL_f_arg_item = 453, /* f_arg_item */
3159 YYSYMBOL_f_arg = 454, /* f_arg */
3160 YYSYMBOL_f_label = 455, /* f_label */
3161 YYSYMBOL_kwrest_mark = 456, /* kwrest_mark */
3162 YYSYMBOL_f_no_kwarg = 457, /* f_no_kwarg */
3163 YYSYMBOL_f_kwrest = 458, /* f_kwrest */
3164 YYSYMBOL_restarg_mark = 459, /* restarg_mark */
3165 YYSYMBOL_f_rest_arg = 460, /* f_rest_arg */
3166 YYSYMBOL_blkarg_mark = 461, /* blkarg_mark */
3167 YYSYMBOL_f_block_arg = 462, /* f_block_arg */
3168 YYSYMBOL_option__ = 463, /* option_',' */
3169 YYSYMBOL_opt_comma = 464, /* opt_comma */
3170 YYSYMBOL_value_expr_singleton_expr = 465, /* value_expr_singleton_expr */
3171 YYSYMBOL_singleton = 466, /* singleton */
3172 YYSYMBOL_singleton_expr = 467, /* singleton_expr */
3173 YYSYMBOL_468_41 = 468, /* $@41 */
3174 YYSYMBOL_assoc_list = 469, /* assoc_list */
3175 YYSYMBOL_assocs = 470, /* assocs */
3176 YYSYMBOL_assoc = 471, /* assoc */
3177 YYSYMBOL_operation2 = 472, /* operation2 */
3178 YYSYMBOL_operation3 = 473, /* operation3 */
3179 YYSYMBOL_dot_or_colon = 474, /* dot_or_colon */
3180 YYSYMBOL_call_op = 475, /* call_op */
3181 YYSYMBOL_call_op2 = 476, /* call_op2 */
3182 YYSYMBOL_rparen = 477, /* rparen */
3183 YYSYMBOL_rbracket = 478, /* rbracket */
3184 YYSYMBOL_rbrace = 479, /* rbrace */
3185 YYSYMBOL_trailer = 480, /* trailer */
3186 YYSYMBOL_term = 481, /* term */
3187 YYSYMBOL_terms = 482, /* terms */
3188 YYSYMBOL_none = 483 /* none */
3189};
3190typedef enum yysymbol_kind_t yysymbol_kind_t;
3191
3192
3193
3194
3195#ifdef short
3196# undef short
3197#endif
3198
3199/* On compilers that do not define __PTRDIFF_MAX__ etc., make sure
3200 <limits.h> and (if available) <stdint.h> are included
3201 so that the code can choose integer types of a good width. */
3202
3203#ifndef __PTRDIFF_MAX__
3204# include <limits.h> /* INFRINGES ON USER NAME SPACE */
3205# if defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__
3206# include <stdint.h> /* INFRINGES ON USER NAME SPACE */
3207# define YY_STDINT_H
3208# endif
3209#endif
3210
3211/* Narrow types that promote to a signed type and that can represent a
3212 signed or unsigned integer of at least N bits. In tables they can
3213 save space and decrease cache pressure. Promoting to a signed type
3214 helps avoid bugs in integer arithmetic. */
3215
3216#ifdef __INT_LEAST8_MAX__
3217typedef __INT_LEAST8_TYPE__ yytype_int8;
3218#elif defined YY_STDINT_H
3219typedef int_least8_t yytype_int8;
3220#else
3221typedef signed char yytype_int8;
3222#endif
3223
3224#ifdef __INT_LEAST16_MAX__
3225typedef __INT_LEAST16_TYPE__ yytype_int16;
3226#elif defined YY_STDINT_H
3227typedef int_least16_t yytype_int16;
3228#else
3229typedef short yytype_int16;
3230#endif
3231
3232/* Work around bug in HP-UX 11.23, which defines these macros
3233 incorrectly for preprocessor constants. This workaround can likely
3234 be removed in 2023, as HPE has promised support for HP-UX 11.23
3235 (aka HP-UX 11i v2) only through the end of 2022; see Table 2 of
3236 <https://h20195.www2.hpe.com/V2/getpdf.aspx/4AA4-7673ENW.pdf>. */
3237#ifdef __hpux
3238# undef UINT_LEAST8_MAX
3239# undef UINT_LEAST16_MAX
3240# define UINT_LEAST8_MAX 255
3241# define UINT_LEAST16_MAX 65535
3242#endif
3243
3244#if defined __UINT_LEAST8_MAX__ && __UINT_LEAST8_MAX__ <= __INT_MAX__
3245typedef __UINT_LEAST8_TYPE__ yytype_uint8;
3246#elif (!defined __UINT_LEAST8_MAX__ && defined YY_STDINT_H \
3247 && UINT_LEAST8_MAX <= INT_MAX)
3248typedef uint_least8_t yytype_uint8;
3249#elif !defined __UINT_LEAST8_MAX__ && UCHAR_MAX <= INT_MAX
3250typedef unsigned char yytype_uint8;
3251#else
3252typedef short yytype_uint8;
3253#endif
3254
3255#if defined __UINT_LEAST16_MAX__ && __UINT_LEAST16_MAX__ <= __INT_MAX__
3256typedef __UINT_LEAST16_TYPE__ yytype_uint16;
3257#elif (!defined __UINT_LEAST16_MAX__ && defined YY_STDINT_H \
3258 && UINT_LEAST16_MAX <= INT_MAX)
3259typedef uint_least16_t yytype_uint16;
3260#elif !defined __UINT_LEAST16_MAX__ && USHRT_MAX <= INT_MAX
3261typedef unsigned short yytype_uint16;
3262#else
3263typedef int yytype_uint16;
3264#endif
3265
3266#ifndef YYPTRDIFF_T
3267# if defined __PTRDIFF_TYPE__ && defined __PTRDIFF_MAX__
3268# define YYPTRDIFF_T __PTRDIFF_TYPE__
3269# define YYPTRDIFF_MAXIMUM __PTRDIFF_MAX__
3270# elif defined PTRDIFF_MAX
3271# ifndef ptrdiff_t
3272# include <stddef.h> /* INFRINGES ON USER NAME SPACE */
3273# endif
3274# define YYPTRDIFF_T ptrdiff_t
3275# define YYPTRDIFF_MAXIMUM PTRDIFF_MAX
3276# else
3277# define YYPTRDIFF_T long
3278# define YYPTRDIFF_MAXIMUM LONG_MAX
3279# endif
3280#endif
3281
3282#ifndef YYSIZE_T
3283# ifdef __SIZE_TYPE__
3284# define YYSIZE_T __SIZE_TYPE__
3285# elif defined size_t
3286# define YYSIZE_T size_t
3287# elif defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__
3288# include <stddef.h> /* INFRINGES ON USER NAME SPACE */
3289# define YYSIZE_T size_t
3290# else
3291# define YYSIZE_T unsigned
3292# endif
3293#endif
3294
3295#define YYSIZE_MAXIMUM \
3296 YY_CAST (YYPTRDIFF_T, \
3297 (YYPTRDIFF_MAXIMUM < YY_CAST (YYSIZE_T, -1) \
3298 ? YYPTRDIFF_MAXIMUM \
3299 : YY_CAST (YYSIZE_T, -1)))
3300
3301#define YYSIZEOF(X) YY_CAST (YYPTRDIFF_T, sizeof (X))
3302
3303
3304/* Stored state numbers (used for stacks). */
3305typedef yytype_int16 yy_state_t;
3306
3307/* State numbers in computations. */
3308typedef int yy_state_fast_t;
3309
3310#ifndef YY_
3311# if defined YYENABLE_NLS && YYENABLE_NLS
3312# if ENABLE_NLS
3313# include <libintl.h> /* INFRINGES ON USER NAME SPACE */
3314# define YY_(Msgid) dgettext ("bison-runtime", Msgid)
3315# endif
3316# endif
3317# ifndef YY_
3318# define YY_(Msgid) Msgid
3319# endif
3320#endif
3321
3322
3323#ifndef YY_ATTRIBUTE_PURE
3324# if defined __GNUC__ && 2 < __GNUC__ + (96 <= __GNUC_MINOR__)
3325# define YY_ATTRIBUTE_PURE __attribute__ ((__pure__))
3326# else
3327# define YY_ATTRIBUTE_PURE
3328# endif
3329#endif
3330
3331#ifndef YY_ATTRIBUTE_UNUSED
3332# if defined __GNUC__ && 2 < __GNUC__ + (7 <= __GNUC_MINOR__)
3333# define YY_ATTRIBUTE_UNUSED __attribute__ ((__unused__))
3334# else
3335# define YY_ATTRIBUTE_UNUSED
3336# endif
3337#endif
3338
3339/* Suppress unused-variable warnings by "using" E. */
3340#if ! defined lint || defined __GNUC__
3341# define YY_USE(E) ((void) (E))
3342#else
3343# define YY_USE(E) /* empty */
3344#endif
3345
3346/* Suppress an incorrect diagnostic about yylval being uninitialized. */
3347#if defined __GNUC__ && ! defined __ICC && 406 <= __GNUC__ * 100 + __GNUC_MINOR__
3348# if __GNUC__ * 100 + __GNUC_MINOR__ < 407
3349# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \
3350 _Pragma ("GCC diagnostic push") \
3351 _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")
3352# else
3353# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \
3354 _Pragma ("GCC diagnostic push") \
3355 _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"") \
3356 _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
3357# endif
3358# define YY_IGNORE_MAYBE_UNINITIALIZED_END \
3359 _Pragma ("GCC diagnostic pop")
3360#else
3361# define YY_INITIAL_VALUE(Value) Value
3362#endif
3363#ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
3364# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
3365# define YY_IGNORE_MAYBE_UNINITIALIZED_END
3366#endif
3367#ifndef YY_INITIAL_VALUE
3368# define YY_INITIAL_VALUE(Value) /* Nothing. */
3369#endif
3370
3371#if defined __cplusplus && defined __GNUC__ && ! defined __ICC && 6 <= __GNUC__
3372# define YY_IGNORE_USELESS_CAST_BEGIN \
3373 _Pragma ("GCC diagnostic push") \
3374 _Pragma ("GCC diagnostic ignored \"-Wuseless-cast\"")
3375# define YY_IGNORE_USELESS_CAST_END \
3376 _Pragma ("GCC diagnostic pop")
3377#endif
3378#ifndef YY_IGNORE_USELESS_CAST_BEGIN
3379# define YY_IGNORE_USELESS_CAST_BEGIN
3380# define YY_IGNORE_USELESS_CAST_END
3381#endif
3382
3383
3384#define YY_ASSERT(E) ((void) (0 && (E)))
3385
3386#if 1
3387
3388/* The parser invokes alloca or malloc; define the necessary symbols. */
3389
3390# ifdef YYSTACK_USE_ALLOCA
3391# if YYSTACK_USE_ALLOCA
3392# ifdef __GNUC__
3393# define YYSTACK_ALLOC __builtin_alloca
3394# elif defined __BUILTIN_VA_ARG_INCR
3395# include <alloca.h> /* INFRINGES ON USER NAME SPACE */
3396# elif defined _AIX
3397# define YYSTACK_ALLOC __alloca
3398# elif defined _MSC_VER
3399# include <malloc.h> /* INFRINGES ON USER NAME SPACE */
3400# define alloca _alloca
3401# else
3402# define YYSTACK_ALLOC alloca
3403# if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS
3404# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
3405 /* Use EXIT_SUCCESS as a witness for stdlib.h. */
3406# ifndef EXIT_SUCCESS
3407# define EXIT_SUCCESS 0
3408# endif
3409# endif
3410# endif
3411# endif
3412# endif
3413
3414# ifdef YYSTACK_ALLOC
3415 /* Pacify GCC's 'empty if-body' warning. */
3416# define YYSTACK_FREE(Ptr) do { /* empty */; } while (0)
3417# ifndef YYSTACK_ALLOC_MAXIMUM
3418 /* The OS might guarantee only one guard page at the bottom of the stack,
3419 and a page size can be as small as 4096 bytes. So we cannot safely
3420 invoke alloca (N) if N exceeds 4096. Use a slightly smaller number
3421 to allow for a few compiler-allocated temporary stack slots. */
3422# define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
3423# endif
3424# else
3425# define YYSTACK_ALLOC YYMALLOC
3426# define YYSTACK_FREE YYFREE
3427# ifndef YYSTACK_ALLOC_MAXIMUM
3428# define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
3429# endif
3430# if (defined __cplusplus && ! defined EXIT_SUCCESS \
3431 && ! ((defined YYMALLOC || defined malloc) \
3432 && (defined YYFREE || defined free)))
3433# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
3434# ifndef EXIT_SUCCESS
3435# define EXIT_SUCCESS 0
3436# endif
3437# endif
3438# ifndef YYMALLOC
3439# define YYMALLOC malloc
3440# if ! defined malloc && ! defined EXIT_SUCCESS
3441void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
3442# endif
3443# endif
3444# ifndef YYFREE
3445# define YYFREE free
3446# if ! defined free && ! defined EXIT_SUCCESS
3447void free (void *); /* INFRINGES ON USER NAME SPACE */
3448# endif
3449# endif
3450# endif
3451#endif /* 1 */
3452
3453#if (! defined yyoverflow \
3454 && (! defined __cplusplus \
3455 || (defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL \
3456 && defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
3457
3458/* A type that is properly aligned for any stack member. */
3459union yyalloc
3460{
3461 yy_state_t yyss_alloc;
3462 YYSTYPE yyvs_alloc;
3463 YYLTYPE yyls_alloc;
3464};
3465
3466/* The size of the maximum gap between one aligned stack and the next. */
3467# define YYSTACK_GAP_MAXIMUM (YYSIZEOF (union yyalloc) - 1)
3468
3469/* The size of an array large to enough to hold all stacks, each with
3470 N elements. */
3471# define YYSTACK_BYTES(N) \
3472 ((N) * (YYSIZEOF (yy_state_t) + YYSIZEOF (YYSTYPE) \
3473 + YYSIZEOF (YYLTYPE)) \
3474 + 2 * YYSTACK_GAP_MAXIMUM)
3475
3476# define YYCOPY_NEEDED 1
3477
3478/* Relocate STACK from its old location to the new one. The
3479 local variables YYSIZE and YYSTACKSIZE give the old and new number of
3480 elements in the stack, and YYPTR gives the new location of the
3481 stack. Advance YYPTR to a properly aligned location for the next
3482 stack. */
3483# define YYSTACK_RELOCATE(Stack_alloc, Stack) \
3484 do \
3485 { \
3486 YYPTRDIFF_T yynewbytes; \
3487 YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
3488 Stack = &yyptr->Stack_alloc; \
3489 yynewbytes = yystacksize * YYSIZEOF (*Stack) + YYSTACK_GAP_MAXIMUM; \
3490 yyptr += yynewbytes / YYSIZEOF (*yyptr); \
3491 } \
3492 while (0)
3493
3494#endif
3495
3496#if defined YYCOPY_NEEDED && YYCOPY_NEEDED
3497/* Copy COUNT objects from SRC to DST. The source and destination do
3498 not overlap. */
3499# ifndef YYCOPY
3500# if defined __GNUC__ && 1 < __GNUC__
3501# define YYCOPY(Dst, Src, Count) \
3502 __builtin_memcpy (Dst, Src, YY_CAST (YYSIZE_T, (Count)) * sizeof (*(Src)))
3503# else
3504# define YYCOPY(Dst, Src, Count) \
3505 do \
3506 { \
3507 YYPTRDIFF_T yyi; \
3508 for (yyi = 0; yyi < (Count); yyi++) \
3509 (Dst)[yyi] = (Src)[yyi]; \
3510 } \
3511 while (0)
3512# endif
3513# endif
3514#endif /* !YYCOPY_NEEDED */
3515
3516/* YYFINAL -- State number of the termination state. */
3517#define YYFINAL 143
3518/* YYLAST -- Last index in YYTABLE. */
3519#define YYLAST 16524
3520
3521/* YYNTOKENS -- Number of terminals. */
3522#define YYNTOKENS 162
3523/* YYNNTS -- Number of nonterminals. */
3524#define YYNNTS 322
3525/* YYNRULES -- Number of rules. */
3526#define YYNRULES 854
3527/* YYNSTATES -- Number of states. */
3528#define YYNSTATES 1442
3529
3530/* YYMAXUTOK -- Last valid token kind. */
3531#define YYMAXUTOK 361
3532
3533
3534/* YYTRANSLATE(TOKEN-NUM) -- Symbol number corresponding to TOKEN-NUM
3535 as returned by yylex, with out-of-bounds checking. */
3536#define YYTRANSLATE(YYX) \
3537 (0 <= (YYX) && (YYX) <= YYMAXUTOK \
3538 ? YY_CAST (yysymbol_kind_t, yytranslate[YYX]) \
3539 : YYSYMBOL_YYUNDEF)
3540
3541/* YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM
3542 as returned by yylex. */
3543static const yytype_uint8 yytranslate[] =
3544{
3545 0, 2, 2, 2, 2, 2, 2, 2, 2, 72,
3546 154, 75, 73, 74, 2, 2, 2, 2, 2, 2,
3547 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
3548 2, 2, 161, 148, 2, 2, 2, 146, 141, 2,
3549 157, 158, 144, 142, 155, 143, 69, 145, 2, 2,
3550 2, 2, 2, 2, 2, 2, 2, 2, 136, 160,
3551 138, 134, 137, 135, 2, 2, 2, 2, 2, 2,
3552 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
3553 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
3554 2, 153, 70, 159, 140, 2, 156, 2, 2, 2,
3555 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
3556 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
3557 2, 2, 2, 151, 139, 152, 149, 2, 89, 90,
3558 91, 92, 76, 77, 78, 79, 95, 96, 84, 83,
3559 80, 81, 82, 87, 88, 93, 94, 98, 85, 86,
3560 97, 2, 2, 2, 2, 2, 2, 2, 2, 2,
3561 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
3562 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
3563 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
3564 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
3565 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
3566 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
3567 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
3568 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
3569 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
3570 2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
3571 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
3572 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
3573 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
3574 35, 36, 37, 38, 39, 40, 41, 42, 43, 44,
3575 45, 46, 47, 48, 49, 50, 51, 52, 53, 54,
3576 55, 56, 57, 58, 59, 60, 61, 62, 63, 64,
3577 65, 66, 67, 68, 71, 99, 100, 101, 102, 103,
3578 104, 105, 106, 107, 108, 109, 110, 111, 112, 113,
3579 114, 115, 116, 117, 118, 119, 120, 121, 122, 123,
3580 124, 125, 126, 127, 128, 129, 130, 131, 132, 133,
3581 147, 150
3582};
3583
3584#if YYDEBUG
3585/* YYRLINE[YYN] -- Source line where rule number YYN was defined. */
3586static const yytype_int16 yyrline[] =
3587{
3588 0, 3182, 3176, 3182, 3182, 3182, 3182, 3202, 3207, 3212,
3589 3219, 3224, 3231, 3233, 3251, 3247, 3252, 3251, 3263, 3260,
3590 3273, 3278, 3283, 3290, 3292, 3291, 3301, 3303, 3313, 3313,
3591 3318, 3323, 3331, 3340, 3347, 3353, 3359, 3370, 3381, 3390,
3592 3402, 3403, 3408, 3408, 3409, 3420, 3425, 3426, 3433, 3433,
3593 3434, 3434, 3434, 3434, 3434, 3434, 3434, 3434, 3434, 3435,
3594 3435, 3435, 3438, 3439, 3445, 3445, 3445, 3452, 3453, 3460,
3595 3463, 3464, 3469, 3474, 3479, 3485, 3484, 3500, 3499, 3514,
3596 3517, 3528, 3538, 3537, 3551, 3551, 3552, 3558, 3558, 3558,
3597 3565, 3566, 3569, 3569, 3572, 3573, 3580, 3588, 3588, 3588,
3598 3595, 3602, 3611, 3616, 3621, 3626, 3631, 3637, 3643, 3649,
3599 3654, 3661, 3670, 3671, 3678, 3679, 3686, 3691, 3696, 3701,
3600 3701, 3701, 3706, 3711, 3716, 3721, 3726, 3731, 3738, 3739,
3601 3746, 3751, 3759, 3759, 3764, 3769, 3769, 3775, 3780, 3785,
3602 3790, 3798, 3798, 3803, 3808, 3808, 3813, 3818, 3823, 3828,
3603 3836, 3844, 3847, 3852, 3857, 3864, 3864, 3864, 3865, 3870,
3604 3873, 3878, 3881, 3886, 3886, 3894, 3895, 3896, 3897, 3898,
3605 3899, 3900, 3901, 3902, 3903, 3904, 3905, 3906, 3907, 3908,
3606 3909, 3910, 3911, 3912, 3913, 3914, 3915, 3916, 3917, 3918,
3607 3919, 3920, 3921, 3922, 3923, 3926, 3926, 3926, 3927, 3927,
3608 3928, 3928, 3928, 3929, 3929, 3929, 3929, 3930, 3930, 3930,
3609 3930, 3931, 3931, 3931, 3932, 3932, 3932, 3932, 3933, 3933,
3610 3933, 3933, 3934, 3934, 3934, 3934, 3935, 3935, 3935, 3935,
3611 3936, 3936, 3936, 3936, 3937, 3937, 3940, 3940, 3941, 3941,
3612 3941, 3941, 3941, 3941, 3941, 3941, 3941, 3942, 3942, 3942,
3613 3942, 3942, 3942, 3942, 3943, 3948, 3953, 3958, 3963, 3968,
3614 3973, 3978, 3983, 3988, 3993, 3998, 4003, 4008, 4009, 4014,
3615 4019, 4024, 4029, 4034, 4039, 4044, 4049, 4054, 4059, 4064,
3616 4071, 4071, 4071, 4072, 4073, 4076, 4085, 4086, 4092, 4099,
3617 4100, 4101, 4102, 4105, 4110, 4118, 4124, 4131, 4138, 4138,
3618 4141, 4142, 4143, 4148, 4155, 4160, 4169, 4174, 4184, 4196,
3619 4197, 4203, 4204, 4205, 4206, 4211, 4218, 4218, 4223, 4228,
3620 4233, 4239, 4245, 4249, 4249, 4287, 4292, 4300, 4305, 4313,
3621 4318, 4323, 4328, 4336, 4341, 4350, 4351, 4355, 4360, 4365,
3622 4383, 4383, 4383, 4383, 4383, 4383, 4383, 4383, 4384, 4385,
3623 4386, 4392, 4391, 4404, 4404, 4410, 4416, 4421, 4426, 4431,
3624 4437, 4442, 4447, 4452, 4457, 4464, 4469, 4474, 4479, 4480,
3625 4486, 4488, 4500, 4509, 4518, 4527, 4526, 4541, 4540, 4553,
3626 4561, 4561, 4562, 4606, 4605, 4628, 4627, 4647, 4646, 4665,
3627 4663, 4680, 4678, 4693, 4698, 4703, 4708, 4723, 4723, 4726,
3628 4733, 4751, 4758, 4766, 4774, 4781, 4789, 4798, 4807, 4815,
3629 4822, 4829, 4837, 4844, 4850, 4865, 4872, 4877, 4883, 4890,
3630 4897, 4898, 4899, 4902, 4903, 4906, 4908, 4917, 4918, 4925,
3631 4926, 4929, 4934, 4942, 4942, 4942, 4947, 4952, 4957, 4962,
3632 4969, 4975, 4982, 4983, 4990, 4990, 4992, 4992, 4992, 4992,
3633 4992, 4992, 4992, 4992, 4992, 4992, 4992, 4995, 5003, 5003,
3634 5003, 5003, 5003, 5003, 5003, 5003, 5003, 5003, 5003, 5003,
3635 5003, 5003, 5003, 5003, 5003, 5003, 5004, 5010, 5015, 5015,
3636 5018, 5019, 5025, 5035, 5039, 5042, 5047, 5054, 5056, 5060,
3637 5065, 5068, 5074, 5079, 5086, 5092, 5085, 5119, 5126, 5135,
3638 5142, 5141, 5152, 5160, 5166, 5176, 5182, 5187, 5195, 5202,
3639 5213, 5219, 5224, 5230, 5240, 5245, 5253, 5259, 5267, 5269,
3640 5284, 5284, 5305, 5311, 5316, 5322, 5330, 5339, 5340, 5343,
3641 5344, 5346, 5359, 5366, 5374, 5375, 5378, 5379, 5385, 5393,
3642 5394, 5400, 5406, 5411, 5416, 5423, 5426, 5433, 5437, 5436,
3643 5449, 5452, 5459, 5466, 5467, 5468, 5475, 5482, 5489, 5495,
3644 5502, 5509, 5516, 5522, 5527, 5532, 5539, 5538, 5549, 5555,
3645 5563, 5569, 5574, 5579, 5584, 5589, 5592, 5593, 5600, 5605,
3646 5612, 5620, 5626, 5633, 5634, 5641, 5648, 5653, 5658, 5663,
3647 5670, 5672, 5679, 5685, 5697, 5698, 5713, 5718, 5725, 5731,
3648 5732, 5739, 5740, 5740, 5740, 5740, 5740, 5740, 5740, 5741,
3649 5742, 5743, 5746, 5746, 5746, 5746, 5746, 5746, 5746, 5746,
3650 5747, 5752, 5755, 5763, 5775, 5782, 5789, 5794, 5799, 5807,
3651 5827, 5830, 5835, 5839, 5842, 5847, 5850, 5857, 5860, 5861,
3652 5864, 5876, 5877, 5878, 5885, 5898, 5910, 5917, 5917, 5917,
3653 5917, 5921, 5925, 5932, 5934, 5941, 5941, 5945, 5949, 5956,
3654 5956, 5959, 5959, 5963, 5967, 5975, 5979, 5987, 5991, 5999,
3655 6003, 6011, 6015, 6041, 6044, 6043, 6058, 6066, 6070, 6074,
3656 6078, 6094, 6095, 6098, 6103, 6106, 6107, 6110, 6126, 6127,
3657 6130, 6138, 6139, 6147, 6148, 6149, 6150, 6153, 6154, 6155,
3658 6158, 6158, 6159, 6162, 6163, 6164, 6165, 6166, 6167, 6168,
3659 6171, 6181, 6188, 6188, 6195, 6196, 6200, 6199, 6209, 6212,
3660 6213, 6220, 6227, 6237, 6238, 6238, 6255, 6255, 6255, 6255,
3661 6255, 6255, 6255, 6255, 6255, 6255, 6255, 6256, 6265, 6265,
3662 6265, 6265, 6265, 6266, 6357, 6357, 6357, 6357, 6357, 6357,
3663 6357, 6357, 6357, 6357, 6357, 6357, 6357, 6357, 6357, 6357,
3664 6357, 6357, 6357, 6357, 6357, 6357, 6357, 6360, 6360, 6360,
3665 6360, 6360, 6360, 6360, 6360, 6360, 6360, 6360, 6360, 6360,
3666 6360, 6360, 6360, 6360, 6360, 6360, 6360, 6363, 6370, 6379,
3667 6388, 6397, 6408, 6409, 6419, 6426, 6431, 6450, 6452, 6463,
3668 6483, 6484, 6487, 6493, 6499, 6507, 6508, 6511, 6517, 6525,
3669 6526, 6529, 6535, 6540, 6548, 6548, 6548, 6556, 6556, 6586,
3670 6588, 6587, 6600, 6601, 6608, 6610, 6633, 6638, 6643, 6650,
3671 6656, 6661, 6674, 6674, 6674, 6675, 6678, 6679, 6680, 6683,
3672 6684, 6687, 6688, 6691, 6692, 6695, 6698, 6701, 6704, 6705,
3673 6708, 6716, 6723, 6724, 6728
3674};
3675#endif
3676
3678#define YY_ACCESSING_SYMBOL(State) YY_CAST (yysymbol_kind_t, yystos[State])
3679
3680#if 1
3681/* The user-facing name of the symbol whose (internal) number is
3682 YYSYMBOL. No bounds checking. */
3683static const char *yysymbol_name (yysymbol_kind_t yysymbol) YY_ATTRIBUTE_UNUSED;
3684
3685/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
3686 First, the terminals, then, starting at YYNTOKENS, nonterminals. */
3687static const char *const yytname[] =
3688{
3689 "\"end-of-input\"", "error", "\"invalid token\"", "\"'class'\"",
3690 "\"'module'\"", "\"'def'\"", "\"'undef'\"", "\"'begin'\"",
3691 "\"'rescue'\"", "\"'ensure'\"", "\"'end'\"", "\"'if'\"", "\"'unless'\"",
3692 "\"'then'\"", "\"'elsif'\"", "\"'else'\"", "\"'case'\"", "\"'when'\"",
3693 "\"'while'\"", "\"'until'\"", "\"'for'\"", "\"'break'\"", "\"'next'\"",
3694 "\"'redo'\"", "\"'retry'\"", "\"'in'\"", "\"'do'\"",
3695 "\"'do' for condition\"", "\"'do' for block\"", "\"'do' for lambda\"",
3696 "\"'return'\"", "\"'yield'\"", "\"'super'\"", "\"'self'\"", "\"'nil'\"",
3697 "\"'true'\"", "\"'false'\"", "\"'and'\"", "\"'or'\"", "\"'not'\"",
3698 "\"'if' modifier\"", "\"'unless' modifier\"", "\"'while' modifier\"",
3699 "\"'until' modifier\"", "\"'rescue' modifier\"", "\"'alias'\"",
3700 "\"'defined?'\"", "\"'BEGIN'\"", "\"'END'\"", "\"'__LINE__'\"",
3701 "\"'__FILE__'\"", "\"'__ENCODING__'\"", "\"local variable or method\"",
3702 "\"method\"", "\"global variable\"", "\"instance variable\"",
3703 "\"constant\"", "\"class variable\"", "\"label\"", "\"integer literal\"",
3704 "\"float literal\"", "\"rational literal\"", "\"imaginary literal\"",
3705 "\"char literal\"", "\"numbered reference\"", "\"back reference\"",
3706 "\"literal content\"", "tREGEXP_END", "\"dummy end\"", "'.'",
3707 "\"backslash\"", "\"escaped space\"", "\"escaped horizontal tab\"",
3708 "\"escaped form feed\"", "\"escaped carriage return\"",
3709 "\"escaped vertical tab\"", "\"unary+\"", "\"unary-\"", "\"**\"",
3710 "\"<=>\"", "\"==\"", "\"===\"", "\"!=\"", "\">=\"", "\"<=\"", "\"&&\"",
3711 "\"||\"", "\"=~\"", "\"!~\"", "\"..\"", "\"...\"", "\"(..\"", "\"(...\"",
3712 "\"[]\"", "\"[]=\"", "\"<<\"", "\">>\"", "\"&.\"", "\"::\"",
3713 "\":: at EXPR_BEG\"", "\"operator-assignment\"", "\"=>\"", "\"(\"",
3714 "\"( arg\"", "\"[\"", "\"{\"", "\"{ arg\"", "\"*\"", "\"**arg\"",
3715 "\"&\"", "\"->\"", "\"symbol literal\"", "\"string literal\"",
3716 "\"backtick literal\"", "\"regexp literal\"", "\"word list\"",
3717 "\"verbatim word list\"", "\"symbol list\"", "\"verbatim symbol list\"",
3718 "\"terminator\"", "\"'}'\"", "\"'#{'\"", "tSTRING_DVAR", "tLAMBEG",
3719 "tLABEL_END", "tIGNORED_NL", "tCOMMENT", "tEMBDOC_BEG", "tEMBDOC",
3720 "tEMBDOC_END", "tHEREDOC_BEG", "tHEREDOC_END", "k__END__", "tLOWEST",
3721 "'='", "'?'", "':'", "'>'", "'<'", "'|'", "'^'", "'&'", "'+'", "'-'",
3722 "'*'", "'/'", "'%'", "tUMINUS_NUM", "'!'", "'~'", "tLAST_TOKEN", "'{'",
3723 "'}'", "'['", "'\\n'", "','", "'`'", "'('", "')'", "']'", "';'", "' '",
3724 "$accept", "option_terms", "compstmt_top_stmts", "$@1", "program",
3725 "top_stmts", "top_stmt", "block_open", "begin_block", "compstmt_stmts",
3726 "$@2", "$@3", "bodystmt", "$@4", "stmts", "stmt_or_begin", "$@5",
3727 "allow_exits", "k_END", "$@6", "stmt", "asgn_mrhs", "asgn_command_rhs",
3728 "command_asgn", "op_asgn_command_rhs",
3729 "def_endless_method_endless_command", "endless_command", "option_'\\n'",
3730 "command_rhs", "expr", "$@7", "$@8", "def_name", "defn_head", "$@9",
3731 "defs_head", "value_expr_expr", "expr_value", "$@10", "$@11",
3732 "expr_value_do", "command_call", "value_expr_command_call",
3733 "command_call_value", "block_command", "cmd_brace_block", "fcall",
3734 "command", "mlhs", "mlhs_inner", "mlhs_basic", "mlhs_items_mlhs_item",
3735 "mlhs_item", "mlhs_head", "mlhs_node", "lhs", "cname", "cpath", "fname",
3736 "fitem", "undef_list", "$@12", "op", "reswords", "asgn_arg_rhs", "arg",
3737 "op_asgn_arg_rhs", "range_expr_arg", "def_endless_method_endless_arg",
3738 "ternary", "endless_arg", "relop", "rel_expr", "lex_ctxt",
3739 "begin_defined", "after_rescue", "value_expr_arg", "arg_value",
3740 "aref_args", "arg_rhs", "paren_args", "opt_paren_args", "opt_call_args",
3741 "value_expr_command", "call_args", "$@13", "command_args", "block_arg",
3742 "opt_block_arg", "args", "arg_splat", "mrhs_arg", "mrhs", "primary",
3743 "$@14", "$@15", "@16", "@17", "$@18", "$@19", "$@20", "$@21", "$@22",
3744 "$@23", "$@24", "value_expr_primary", "primary_value", "k_begin", "k_if",
3745 "k_unless", "k_while", "k_until", "k_case", "k_for", "k_class",
3746 "k_module", "k_def", "k_do", "k_do_block", "k_rescue", "k_ensure",
3747 "k_when", "k_else", "k_elsif", "k_end", "k_return", "k_yield", "then",
3748 "do", "if_tail", "opt_else", "for_var", "f_marg", "mlhs_items_f_marg",
3749 "f_margs", "f_rest_marg", "f_any_kwrest", "$@25", "f_eq",
3750 "f_kw_primary_value", "f_kwarg_primary_value", "opt_f_block_arg_none",
3751 "args_tail_basic_primary_value_none", "block_args_tail",
3752 "excessed_comma", "f_opt_primary_value", "f_opt_arg_primary_value",
3753 "opt_args_tail_block_args_tail_none",
3754 "args-list_primary_value_opt_args_tail_block_args_tail_none",
3755 "block_param", "tail-only-args_block_args_tail", "opt_block_param_def",
3756 "block_param_def", "opt_block_param", "opt_bv_decl", "bv_decls", "bvar",
3757 "max_numparam", "numparam", "it_id", "@26", "$@27", "lambda",
3758 "f_larglist", "lambda_body", "$@28", "do_block", "block_call",
3759 "method_call", "brace_block", "@29", "brace_body", "@30", "do_body",
3760 "case_args", "case_body", "cases", "p_pvtbl", "p_pktbl", "p_in_kwarg",
3761 "$@31", "p_case_body", "p_cases", "p_top_expr", "p_top_expr_body",
3762 "p_expr", "p_as", "$@32", "p_alt", "p_lparen", "p_lbracket",
3763 "p_expr_basic", "$@33", "p_args", "p_args_head", "p_args_tail", "p_find",
3764 "p_rest", "p_args_post", "p_arg", "p_kwargs", "p_kwarg", "p_kw",
3765 "p_kw_label", "p_kwrest", "p_kwnorest", "p_any_kwrest", "p_value",
3766 "range_expr_p_primitive", "p_primitive", "p_variable", "p_var_ref",
3767 "p_expr_ref", "p_const", "opt_rescue", "exc_list", "exc_var",
3768 "opt_ensure", "literal", "strings", "string", "string1", "xstring",
3769 "regexp", "nonempty_list_' '", "words_tWORDS_BEG_word_list", "words",
3770 "word_list", "word", "words_tSYMBOLS_BEG_symbol_list", "symbols",
3771 "symbol_list", "words_tQWORDS_BEG_qword_list", "qwords",
3772 "words_tQSYMBOLS_BEG_qsym_list", "qsymbols", "qword_list", "qsym_list",
3773 "string_contents", "xstring_contents", "regexp_contents",
3774 "string_content", "@34", "@35", "@36", "@37", "@38", "string_dend",
3775 "string_dvar", "symbol", "ssym", "sym", "dsym", "numeric",
3776 "simple_numeric", "nonlocal_var", "user_variable", "keyword_variable",
3777 "var_ref", "var_lhs", "backref", "$@39", "superclass",
3778 "f_opt_paren_args", "f_empty_arg", "f_paren_args", "f_arglist", "@40",
3779 "f_kw_arg_value", "f_kwarg_arg_value", "opt_f_block_arg_opt_comma",
3780 "args_tail_basic_arg_value_opt_comma", "args_tail",
3781 "args_tail_basic_arg_value_none", "largs_tail", "f_opt_arg_value",
3782 "f_opt_arg_arg_value", "opt_args_tail_args_tail_opt_comma",
3783 "args-list_arg_value_opt_args_tail_args_tail_opt_comma",
3784 "f_args-list_args_tail_opt_comma", "tail-only-args_args_tail", "f_args",
3785 "opt_args_tail_largs_tail_none",
3786 "args-list_arg_value_opt_args_tail_largs_tail_none",
3787 "f_args-list_largs_tail_none", "tail-only-args_largs_tail", "f_largs",
3788 "args_forward", "f_bad_arg", "f_norm_arg", "f_arg_asgn", "f_arg_item",
3789 "f_arg", "f_label", "kwrest_mark", "f_no_kwarg", "f_kwrest",
3790 "restarg_mark", "f_rest_arg", "blkarg_mark", "f_block_arg", "option_','",
3791 "opt_comma", "value_expr_singleton_expr", "singleton", "singleton_expr",
3792 "$@41", "assoc_list", "assocs", "assoc", "operation2", "operation3",
3793 "dot_or_colon", "call_op", "call_op2", "rparen", "rbracket", "rbrace",
3794 "trailer", "term", "terms", "none", YY_NULLPTR
3795};
3796
3797static const char *
3798yysymbol_name (yysymbol_kind_t yysymbol)
3799{
3800 return yytname[yysymbol];
3801}
3802#endif
3803
3804#define YYPACT_NINF (-1208)
3805
3806#define yypact_value_is_default(Yyn) \
3807 ((Yyn) == YYPACT_NINF)
3808
3809#define YYTABLE_NINF (-855)
3810
3811#define yytable_value_is_error(Yyn) \
3812 ((Yyn) == YYTABLE_NINF)
3813
3814/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
3815 STATE-NUM. */
3816static const yytype_int16 yypact[] =
3817{
3818 -1208, 6236, 149, -1208, -1208, -1208, -1208, 11007, -1208, -1208,
3819 -1208, -1208, -1208, -1208, -1208, 12062, 12062, -1208, -1208, -1208,
3820 -1208, 7296, -1208, -1208, -1208, -1208, 400, 10853, 8, 33,
3821 -1208, -1208, -1208, -1208, 6672, 7452, -1208, -1208, 6828, -1208,
3822 -1208, -1208, -1208, -1208, -1208, -1208, -1208, 13622, 13622, 13622,
3823 13622, 144, 9766, 9924, 12542, 12782, 11308, -1208, 10699, -1208,
3824 -1208, -1208, 163, 163, 163, 163, 1269, 13742, 13622, -1208,
3825 563, -1208, 33, 1167, -1208, -1208, -1208, -1208, -1208, 824,
3826 35, 35, -1208, -1208, 170, 214, 280, -1208, 62, 14342,
3827 -1208, 323, -1208, 3973, -1208, -1208, -1208, -1208, 720, 61,
3828 -1208, 133, -1208, 11942, 11942, -1208, -1208, 10386, 14460, 14578,
3829 14696, 10544, 12062, 7920, -1208, 805, 102, -1208, -1208, 458,
3830 -1208, -1208, -1208, -1208, -1208, -1208, -1208, -1208, -1208, -1208,
3831 -1208, -1208, -1208, -1208, -1208, -1208, -1208, 283, 350, -1208,
3832 374, 418, -1208, -1208, -1208, -1208, -1208, -1208, -1208, -1208,
3833 -1208, -1208, -1208, -1208, -1208, -1208, -1208, -1208, -1208, -1208,
3834 -1208, -1208, -1208, -1208, -1208, -1208, -1208, -1208, -1208, -1208,
3835 -1208, -1208, -1208, -1208, -1208, -1208, -1208, -1208, -1208, -1208,
3836 -1208, -1208, -1208, -1208, -1208, -1208, -1208, -1208, -1208, -1208,
3837 -1208, -1208, -1208, -1208, -1208, -1208, -1208, -1208, -1208, -1208,
3838 -1208, -1208, -1208, -1208, -1208, -1208, -1208, -1208, -1208, -1208,
3839 -1208, -1208, -1208, -1208, -1208, -1208, -1208, -1208, -1208, -1208,
3840 357, -1208, -1208, -1208, -1208, -1208, -1208, 432, 13622, 549,
3841 9924, 13622, 13622, 13622, -1208, 13622, -1208, -1208, 476, 6642,
3842 -1208, 525, -1208, -1208, -1208, 501, -1208, 679, 76, 79,
3843 582, 247, 508, -1208, -1208, 12182, -1208, 12062, -1208, -1208,
3844 11683, 13862, 996, -1208, 546, -1208, 10082, -1208, -1208, -1208,
3845 -1208, -1208, 556, 35, 35, 170, -1208, 713, -1208, 558,
3846 609, 6798, 6798, 601, -1208, 9766, 550, 563, -1208, 1167,
3847 8, 592, -1208, -1208, 584, 770, 785, -1208, 525, 640,
3848 785, -1208, 8, 750, 1269, 14814, 651, 651, 658, -1208,
3849 731, 774, 784, 851, -1208, -1208, 1026, -1208, -1208, 1096,
3850 1136, 540, -1208, 654, 654, 654, 654, 761, -1208, -1208,
3851 -1208, -1208, -1208, -1208, -1208, 6388, 10234, 11942, 11942, 11942,
3852 11942, -1208, 13862, 13862, 1926, 702, -1208, 760, -1208, 1926,
3853 763, -1208, -1208, -1208, -1208, 741, -1208, -1208, -1208, -1208,
3854 -1208, -1208, -1208, 9766, 11426, 744, -1208, -1208, 13622, 13622,
3855 13622, 13622, 13622, -1208, -1208, 13622, 13622, 13622, 13622, 13622,
3856 13622, 13622, 13622, -1208, 13622, -1208, -1208, 13622, 13622, 13622,
3857 13622, 13622, 13622, 13622, 13622, 13622, 13622, -1208, -1208, 4938,
3858 12062, 5402, 556, 8702, -1208, 824, -1208, 110, 110, 11942,
3859 9614, 9614, -1208, 563, 756, 866, -1208, -1208, 869, 908,
3860 81, 108, 122, 936, 1017, 11942, 689, -1208, 808, 895,
3861 -1208, -1208, -1208, -1208, 74, 551, 588, 664, 690, 748,
3862 758, 769, 820, -1208, -1208, -1208, -1208, -1208, 823, -1208,
3863 -1208, 11544, -1208, -1208, -1208, 4515, -1208, -1208, -1208, -1208,
3864 -1208, -1208, 353, -1208, -1208, -1208, 730, -1208, 13622, 12302,
3865 -1208, -1208, 15094, 12062, 15192, -1208, -1208, 12662, -1208, 13622,
3866 8, -1208, 800, 8, 815, -1208, -1208, 822, 189, -1208,
3867 -1208, -1208, -1208, -1208, 11007, -1208, -1208, 13622, 811, 848,
3868 874, 15290, 15192, -1208, 33, 8, -1208, -1208, 5800, 880,
3869 858, -1208, 12542, -1208, -1208, 12782, -1208, -1208, -1208, 546,
3870 903, -1208, 891, -1208, -1208, 14814, 15388, 12062, 15486, -1208,
3871 -1208, -1208, -1208, -1208, -1208, -1208, -1208, -1208, -1208, -1208,
3872 -1208, 1156, 72, 1172, 78, 13622, -1208, -1208, 888, -1208,
3873 -1208, -1208, -1208, -1208, 11822, -1208, -1208, -1208, -1208, -1208,
3874 -1208, -1208, -1208, -1208, -1208, 1311, -1208, -1208, -1208, -1208,
3875 -1208, 900, -1208, -1208, -1208, 907, -1208, -1208, -1208, 919,
3876 -1208, -1208, -1208, 8, -1208, -1208, -1208, 942, -1208, 925,
3877 13622, 378, -1208, -1208, 1025, 927, 415, -1208, 13982, 8702,
3878 563, 13982, 8702, -1208, 931, -1208, -1208, -1208, 164, 164,
3879 12902, 8, 14814, 930, -1208, 13022, -1208, 609, 3213, 3213,
3880 3213, 3213, 4601, 3866, 3213, 3213, 6798, 6798, 576, 576,
3881 -1208, 6486, 1128, 1128, 1033, 59, 59, 609, 609, 609,
3882 1055, 1055, 8076, 6984, 8388, 7140, 556, -1208, 8, 933,
3883 675, -1208, 686, -1208, 7608, -1208, -1208, 164, -1208, 8854,
3884 1082, 9310, 89, 164, 164, 1083, 1076, 123, 15584, 12062,
3885 15682, -1208, -1208, -1208, 903, -1208, -1208, -1208, -1208, 15780,
3886 12062, 15878, 8702, 13862, -1208, -1208, -1208, 8, -1208, -1208,
3887 -1208, -1208, 3459, 14102, 14102, 11007, -1208, 13622, 13622, -1208,
3888 525, -1208, -1208, 508, 6516, 7764, 8, 362, 376, 13622,
3889 13622, -1208, -1208, 12422, -1208, 12662, -1208, -1208, -1208, 13862,
3890 6642, -1208, 14222, 14222, 234, 556, 556, 14102, -1208, 56,
3891 -1208, -1208, 785, 14814, 891, 616, 468, 8, 422, 603,
3892 -1208, -1208, 1350, -1208, 367, -1208, 163, -1208, -1208, 367,
3893 163, -1208, 609, -1208, -1208, 1311, 1437, -1208, 950, 8,
3894 954, -1208, 32, -1208, -1208, -1208, 504, -1208, 1926, -1208,
3895 -1208, -1208, 976, 13622, 1926, -1208, -1208, -1208, -1208, -1208,
3896 1944, -1208, -1208, -1208, 400, 1069, -1208, 6642, 1080, 164,
3897 -1208, 1069, 1080, 164, -1208, -1208, 975, -1208, -1208, -1208,
3898 -1208, -1208, 13622, -1208, -1208, -1208, 977, 987, 1087, -1208,
3899 -1208, 891, 14814, 1088, -1208, -1208, 1095, 1035, 3781, -1208,
3900 -1208, -1208, 905, 424, -1208, -1208, 1024, -1208, -1208, -1208,
3901 -1208, 741, 1008, 889, 12302, -1208, -1208, -1208, -1208, 741,
3902 -1208, 1163, -1208, 871, -1208, 1165, -1208, -1208, -1208, -1208,
3903 -1208, -1208, 13142, 164, -1208, 1083, 164, 80, 143, 8,
3904 127, 138, 11942, 563, 11942, 8702, 1068, 468, -1208, 8,
3905 164, 189, 11161, -1208, 102, 214, -1208, 4110, -1208, -1208,
3906 -1208, -1208, 13622, -1208, -1208, -1208, -1208, 496, -1208, -1208,
3907 8, 1028, 189, 400, -1208, -1208, -1208, -1208, 647, -1208,
3908 -1208, -1208, -1208, -1208, 654, -1208, 654, 654, 654, 8,
3909 -1208, 1311, -1208, 1245, -1208, -1208, 1139, 900, -1208, -1208,
3910 1037, 1038, -1208, -1208, 1048, -1208, 1049, -1208, 1037, 13982,
3911 -1208, -1208, -1208, -1208, -1208, -1208, -1208, 1058, 13262, -1208,
3912 891, 497, -1208, -1208, -1208, 15976, 12062, 16074, -1208, -1208,
3913 13622, 14102, 14102, 1062, -1208, -1208, -1208, 14102, 14102, -1208,
3914 -1208, 13382, 1165, -1208, -1208, -1208, 9614, 11942, 164, -1208,
3915 -1208, 164, -1208, 13622, -1208, 274, -1208, -1208, 164, -1208,
3916 150, 89, 8702, 563, 164, -1208, -1208, -1208, -1208, -1208,
3917 -1208, 13622, 13622, -1208, 13622, 13622, -1208, 12662, -1208, 14222,
3918 1388, -1208, -1208, -1208, 1072, 1073, -1208, 1944, -1208, 1944,
3919 -1208, 1926, -1208, 1944, -1208, -1208, 1069, 1080, 13622, 13622,
3920 -1208, -1208, 13622, 1075, 11822, 11822, 14102, 13622, 8232, 8544,
3921 8, 535, 644, 4819, 4819, 6642, -1208, -1208, -1208, -1208,
3922 -1208, 14102, -1208, -1208, -1208, -1208, 977, -1208, 1133, -1208,
3923 1230, -1208, -1208, 110, -1208, -1208, -1208, 13502, 9006, -1208,
3924 -1208, -1208, 164, -1208, -1208, 13622, 1926, 1085, -1208, -1208,
3925 1089, -1208, -1208, 1098, -1208, -1208, -1208, -1208, -1208, 1104,
3926 1106, -1208, 6084, 1245, 1245, 1037, 1037, 1107, 1037, 6642,
3927 6642, 1103, 1103, 1058, -1208, -1208, 6642, 680, -1208, -1208,
3928 -1208, 3155, 3155, 861, -1208, 2296, 304, 1198, -1208, 1260,
3929 -1208, -1208, 39, -1208, 1112, -1208, -1208, -1208, 1108, -1208,
3930 1124, -1208, 5920, -1208, -1208, -1208, -1208, -1208, 898, -1208,
3931 -1208, -1208, 461, -1208, -1208, -1208, -1208, -1208, -1208, -1208,
3932 -1208, -1208, 643, -1208, -1208, -1208, 14932, 110, -1208, -1208,
3933 9614, -1208, -1208, 9462, 8854, 13622, -1208, 530, 4819, 9614,
3934 -1208, 8, 32, -1208, -1208, 98, 504, -1208, 1926, -1208,
3935 -1208, 1926, -1208, 1944, -1208, 113, 1073, -1208, -1208, 1944,
3936 -1208, -1208, 1482, 10234, -1208, -1208, 8702, -1208, -1208, -1208,
3937 -1208, 5920, 296, 8, 5570, -1208, 8, 1126, -1208, 1115,
3938 -1208, -1208, -1208, 999, -1208, 11942, -1208, 1233, 5570, -1208,
3939 5920, 995, 1181, 3155, 3155, 861, 213, 611, 4819, 4819,
3940 -1208, 1231, -1208, 917, 165, 185, 253, 8702, 563, -1208,
3941 871, -1208, -1208, -1208, -1208, 110, 984, 164, 1130, 1137,
3942 -1208, -1208, 10234, -1208, 1085, -1208, 1131, 1141, 1149, 1153,
3943 1131, -1208, -1208, -1208, 1037, 1085, -1208, 1155, -1208, -1208,
3944 -1208, 1168, -1208, -1208, -1208, 8, 942, 1170, 15050, 1177,
3945 -1208, -1208, -1208, 262, -1208, 1181, 1179, 1180, -1208, -1208,
3946 -1208, -1208, -1208, 8, -1208, -1208, 1184, 5920, 1187, -1208,
3947 -1208, -1208, -1208, -1208, -1208, -1208, -1208, -1208, -1208, -1208,
3948 8, 8, 8, 8, 8, 8, 319, 16172, 12062, 16270,
3949 1163, -1208, 1230, -1208, -1208, 11942, 11942, -1208, 1447, -1208,
3950 8702, 1166, -1208, 1944, -1208, 1944, -1208, 1926, -1208, 1944,
3951 -1208, -1208, -1208, -1208, 504, -1208, 1482, -1208, -1208, 1183,
3952 15050, 1482, -1208, -1208, 1280, 922, 1559, -1208, -1208, 5920,
3953 -1208, 995, -1208, 5920, -1208, 5570, 101, -1208, -1208, -1208,
3954 -1208, -1208, -1208, 153, 288, 8, 346, 375, -1208, -1208,
3955 9158, -1208, -1208, -1208, 877, -1208, -1208, 164, -1208, 1131,
3956 1131, 1191, 1131, -1208, 1085, -1208, -1208, 1195, 1196, -1208,
3957 922, 1199, 1201, -1208, 16368, 1195, 1203, 8, 1203, -1208,
3958 -1208, 427, 445, 1447, -1208, -1208, -1208, -1208, 1944, -1208,
3959 -1208, -1208, 1559, -1208, 1559, -1208, 1482, -1208, 1559, -1208,
3960 1204, 1207, -1208, 5920, -1208, -1208, -1208, -1208, -1208, 1131,
3961 1195, 1195, 1215, 1195, -1208, -1208, -1208, 1559, -1208, -1208,
3962 1195, -1208
3963};
3964
3965/* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM.
3966 Performed when YYTABLE does not specify something else to do. Zero
3967 means the default is an error. */
3968static const yytype_int16 yydefact[] =
3969{
3970 2, 0, 0, 47, 406, 407, 408, 0, 399, 400,
3971 401, 404, 26, 26, 26, 393, 394, 395, 396, 418,
3972 419, 323, 704, 703, 705, 706, 64, 0, 64, 0,
3973 854, 708, 707, 709, 97, 99, 698, 697, 98, 699,
3974 693, 694, 695, 696, 641, 714, 715, 0, 0, 0,
3975 0, 0, 0, 0, 854, 854, 126, 494, 667, 667,
3976 669, 671, 0, 0, 0, 0, 0, 0, 0, 6,
3977 3, 8, 0, 10, 43, 49, 40, 58, 61, 46,
3978 724, 724, 70, 91, 323, 90, 0, 112, 0, 116,
3979 128, 0, 237, 79, 246, 253, 282, 283, 267, 284,
3980 398, 0, 351, 0, 0, 87, 87, 0, 0, 0,
3981 0, 0, 360, 323, 370, 94, 368, 340, 341, 640,
3982 642, 342, 343, 650, 344, 656, 346, 660, 345, 662,
3983 347, 639, 685, 686, 638, 691, 702, 710, 711, 348,
3984 0, 349, 7, 1, 205, 216, 206, 229, 202, 222,
3985 212, 211, 232, 233, 227, 210, 209, 204, 230, 234,
3986 235, 214, 203, 217, 221, 223, 215, 208, 224, 231,
3987 226, 225, 218, 228, 213, 201, 220, 219, 200, 207,
3988 198, 199, 195, 196, 197, 155, 157, 156, 190, 191,
3989 186, 168, 169, 170, 177, 174, 176, 171, 172, 192,
3990 193, 178, 179, 183, 187, 173, 175, 165, 166, 167,
3991 180, 181, 182, 184, 185, 188, 189, 194, 160, 162,
3992 33, 158, 159, 161, 402, 403, 405, 0, 828, 0,
3993 0, 334, 831, 326, 667, 0, 318, 316, 0, 298,
3994 299, 329, 317, 110, 322, 854, 330, 0, 710, 711,
3995 0, 349, 854, 824, 111, 854, 513, 0, 107, 65,
3996 64, 0, 0, 28, 854, 12, 0, 11, 27, 295,
3997 393, 394, 514, 724, 724, 0, 261, 0, 360, 363,
3998 262, 251, 252, 357, 24, 0, 0, 3, 21, 23,
3999 64, 114, 20, 353, 0, 64, 64, 300, 0, 0,
4000 64, 822, 64, 0, 0, 0, 724, 724, 124, 397,
4001 0, 132, 133, 140, 491, 688, 0, 687, 689, 0,
4002 0, 0, 647, 651, 663, 657, 665, 692, 74, 273,
4003 274, 851, 850, 5, 852, 0, 0, 0, 0, 0,
4004 0, 854, 0, 0, 721, 0, 720, 723, 389, 721,
4005 0, 391, 409, 518, 508, 100, 520, 367, 410, 520,
4006 503, 854, 130, 0, 122, 117, 854, 77, 0, 0,
4007 0, 0, 0, 291, 292, 0, 0, 0, 0, 249,
4008 250, 0, 0, 75, 0, 289, 290, 0, 0, 0,
4009 0, 0, 0, 0, 0, 0, 0, 841, 842, 844,
4010 854, 843, 0, 0, 86, 84, 85, 0, 0, 0,
4011 0, 0, 377, 3, 4, 0, 430, 429, 0, 0,
4012 710, 711, 349, 150, 151, 0, 0, 153, 854, 0,
4013 710, 711, 349, 387, 225, 218, 228, 213, 195, 196,
4014 197, 155, 156, 820, 81, 80, 819, 818, 0, 817,
4015 109, 64, 108, 844, 843, 0, 369, 643, 854, 854,
4016 163, 827, 357, 333, 830, 325, 0, 854, 0, 0,
4017 319, 328, 844, 854, 843, 854, 854, 0, 320, 787,
4018 64, 312, 854, 64, 854, 311, 324, 0, 64, 366,
4019 73, 30, 32, 31, 0, 854, 296, 0, 0, 0,
4020 0, 844, 843, 854, 0, 64, 355, 14, 0, 113,
4021 0, 358, 849, 848, 301, 849, 303, 359, 823, 0,
4022 139, 692, 127, 119, 723, 0, 844, 854, 843, 492,
4023 673, 690, 676, 674, 668, 644, 645, 670, 646, 672,
4024 648, 0, 0, 0, 0, 0, 853, 9, 0, 34,
4025 35, 36, 37, 297, 0, 71, 72, 793, 790, 789,
4026 788, 791, 799, 800, 787, 0, 806, 801, 810, 809,
4027 805, 814, 802, 765, 728, 814, 736, 763, 745, 814,
4028 761, 766, 764, 64, 737, 792, 794, 795, 797, 814,
4029 727, 804, 443, 442, 808, 814, 813, 735, 0, 0,
4030 0, 0, 0, 491, 0, 518, 101, 491, 0, 0,
4031 0, 64, 0, 118, 131, 0, 531, 259, 266, 268,
4032 269, 270, 277, 278, 271, 272, 247, 248, 275, 276,
4033 531, 64, 263, 264, 265, 254, 255, 256, 257, 258,
4034 293, 294, 832, 834, 833, 835, 323, 511, 64, 854,
4035 832, 834, 833, 835, 323, 512, 854, 0, 421, 0,
4036 420, 0, 0, 0, 0, 0, 375, 357, 844, 854,
4037 843, 380, 385, 150, 151, 152, 716, 383, 718, 844,
4038 854, 843, 0, 0, 839, 840, 82, 64, 362, 832,
4039 833, 507, 323, 0, 0, 0, 854, 0, 0, 826,
4040 331, 327, 332, 854, 832, 833, 64, 832, 833, 0,
4041 0, 825, 306, 313, 308, 315, 845, 365, 29, 0,
4042 279, 13, 0, 0, 356, 0, 854, 0, 25, 115,
4043 22, 354, 64, 0, 125, 836, 138, 64, 832, 833,
4044 493, 677, 0, 649, 0, 653, 0, 659, 655, 0,
4045 0, 661, 260, 39, 38, 0, 441, 433, 435, 64,
4046 438, 431, 815, 734, 816, 731, 815, 733, 815, 757,
4047 748, 722, 0, 0, 815, 762, 726, 598, 803, 807,
4048 815, 759, 812, 811, 64, 59, 62, 286, 280, 0,
4049 725, 60, 281, 0, 492, 516, 0, 492, 416, 417,
4050 517, 502, 334, 92, 93, 41, 336, 0, 45, 335,
4051 129, 123, 0, 0, 69, 48, 67, 0, 304, 329,
4052 236, 42, 0, 349, 529, 529, 0, 854, 854, 518,
4053 510, 104, 0, 515, 313, 854, 854, 310, 509, 102,
4054 309, 854, 352, 854, 422, 854, 424, 88, 423, 373,
4055 374, 413, 0, 0, 531, 0, 0, 836, 356, 64,
4056 832, 833, 0, 0, 0, 0, 150, 151, 154, 64,
4057 0, 64, 0, 361, 504, 95, 50, 304, 238, 57,
4058 245, 164, 0, 829, 321, 854, 854, 515, 854, 854,
4059 64, 854, 64, 64, 56, 244, 302, 120, 515, 26,
4060 678, 675, 683, 684, 652, 654, 664, 658, 666, 64,
4061 440, 0, 796, 0, 730, 729, 804, 814, 747, 746,
4062 814, 814, 445, 744, 814, 798, 814, 795, 814, 0,
4063 854, 854, 390, 392, 493, 96, 493, 339, 0, 854,
4064 121, 357, 854, 854, 854, 844, 854, 843, 530, 530,
4065 0, 0, 0, 0, 105, 846, 854, 0, 0, 103,
4066 411, 854, 18, 630, 415, 414, 0, 0, 0, 425,
4067 427, 0, 89, 0, 522, 0, 378, 529, 0, 379,
4068 515, 0, 0, 0, 0, 515, 388, 821, 83, 505,
4069 506, 0, 0, 854, 0, 0, 307, 314, 364, 0,
4070 721, 679, 432, 434, 436, 439, 732, 815, 758, 815,
4071 755, 815, 751, 815, 753, 760, 66, 288, 0, 0,
4072 26, 26, 334, 337, 0, 0, 0, 0, 832, 833,
4073 64, 832, 833, 0, 0, 285, 54, 242, 55, 243,
4074 106, 0, 52, 240, 53, 241, 631, 632, 854, 633,
4075 854, 15, 428, 0, 371, 372, 523, 0, 0, 530,
4076 376, 381, 0, 717, 384, 0, 721, 854, 495, 785,
4077 854, 742, 783, 854, 781, 786, 784, 498, 743, 854,
4078 854, 741, 0, 0, 0, 814, 814, 814, 814, 63,
4079 287, 854, 854, 338, 44, 68, 305, 515, 622, 628,
4080 594, 0, 0, 0, 530, 64, 530, 582, 667, 0,
4081 621, 78, 539, 545, 547, 550, 543, 542, 578, 544,
4082 587, 590, 593, 599, 600, 589, 553, 608, 601, 554,
4083 609, 610, 611, 612, 613, 614, 615, 616, 618, 617,
4084 619, 620, 597, 76, 51, 239, 0, 0, 635, 412,
4085 0, 19, 637, 0, 0, 0, 524, 854, 0, 0,
4086 386, 64, 0, 740, 451, 0, 0, 739, 0, 777,
4087 768, 0, 782, 0, 779, 0, 437, 756, 752, 815,
4088 749, 754, 483, 0, 481, 480, 0, 606, 607, 151,
4089 626, 0, 570, 64, 571, 575, 64, 0, 565, 0,
4090 854, 568, 581, 0, 623, 0, 624, 0, 540, 548,
4091 0, 588, 592, 604, 605, 0, 530, 530, 0, 0,
4092 596, 0, 634, 0, 710, 711, 349, 0, 3, 16,
4093 854, 525, 527, 528, 526, 0, 536, 0, 485, 0,
4094 450, 500, 0, 496, 854, 767, 854, 854, 854, 854,
4095 854, 682, 681, 680, 814, 854, 448, 854, 456, 478,
4096 459, 854, 475, 484, 479, 64, 795, 854, 447, 854,
4097 455, 519, 521, 64, 563, 585, 573, 572, 564, 576,
4098 847, 566, 595, 64, 546, 541, 578, 0, 579, 583,
4099 667, 591, 586, 602, 603, 627, 552, 562, 551, 558,
4100 64, 64, 64, 64, 64, 64, 357, 844, 854, 843,
4101 854, 636, 854, 426, 532, 0, 0, 382, 0, 497,
4102 0, 0, 738, 0, 778, 0, 775, 0, 771, 0,
4103 773, 780, 750, 454, 0, 453, 0, 471, 462, 0,
4104 0, 457, 476, 477, 0, 446, 0, 473, 569, 0,
4105 577, 0, 625, 0, 549, 0, 0, 555, 556, 557,
4106 559, 560, 561, 836, 356, 64, 832, 833, 629, 17,
4107 0, 537, 538, 489, 64, 487, 490, 0, 499, 854,
4108 854, 854, 854, 449, 854, 461, 460, 854, 854, 482,
4109 458, 854, 854, 357, 844, 854, 574, 64, 579, 580,
4110 584, 515, 854, 0, 486, 501, 776, 772, 0, 769,
4111 774, 452, 0, 472, 0, 469, 0, 465, 0, 467,
4112 836, 356, 474, 0, 567, 534, 535, 533, 488, 854,
4113 854, 854, 854, 854, 770, 470, 466, 0, 463, 468,
4114 854, 464
4115};
4116
4117/* YYPGOTO[NTERM-NUM]. */
4118static const yytype_int16 yypgoto[] =
4119{
4120 -1208, -98, 1110, -1208, -1208, -1208, 1018, 1301, 870, -37,
4121 -1208, -1208, -557, -1208, 227, 876, -1208, 16, -1208, -1208,
4122 17, -1208, -1208, -133, -1208, -5, -553, 159, -51, 11,
4123 -1208, -1208, 510, 3119, -1208, 3492, -1208, -79, -1208, -1208,
4124 1279, -47, -1208, 778, -1208, -447, 1566, -10, 1281, -151,
4125 48, -442, -17, -1208, 25, 4179, -399, 1285, -46, 10,
4126 -1208, -1208, -3, -1208, -1208, 5056, -1208, -1208, -1208, -1208,
4127 -535, 1294, -1208, 141, 904, 242, -1208, 1282, -1208, 885,
4128 42, 710, -374, -1208, 104, -1208, -27, -395, -217, 24,
4129 -411, -1208, -568, -48, -1208, -1208, -1208, -1208, -1208, -1208,
4130 -1208, -1208, -1208, -1208, -1208, -1208, 1344, -1208, -1208, -1208,
4131 -1208, -1208, -1208, -1208, -1208, -1208, -1208, -1208, -1208, -1208,
4132 -1208, -1208, 441, -1208, -278, 2216, 2729, -401, 425, 178,
4133 -799, -1208, -838, -821, 655, 498, 393, -1208, 146, 82,
4134 -1208, -915, -1208, 237, -1208, -1207, 84, -434, -1208, -1208,
4135 -1208, 328, -1208, -1208, 156, -1208, 19, 368, -157, -168,
4136 -1208, -1208, 676, -1208, -1208, -1208, 548, -1208, -1208, -102,
4137 -1208, -520, -1208, 1067, -1208, -788, -1208, -708, -905, -526,
4138 -1208, 36, -1208, -1208, -924, -235, -1208, -1208, -1208, -1208,
4139 -1208, 140, -1208, -83, -1208, -873, -705, -1099, -336, -1059,
4140 -1062, -1208, 223, -1208, -1208, -943, 224, -1208, -1208, -581,
4141 229, -1208, -1208, -1208, 131, -1208, -1208, 125, 884, 1356,
4142 -1208, 1330, 1386, 1420, 5, -1208, 1654, -1208, 912, -1208,
4143 1698, -1208, -1208, 1756, -1208, 1900, -1208, -1208, -57, -1208,
4144 -1208, -140, -1208, -1208, -1208, -1208, -1208, -1208, -1208, 29,
4145 -1208, -1208, -1208, -1208, 37, -45, 4031, 130, 1346, 4554,
4146 3801, -1208, -1208, 83, -327, 732, 30, -1208, -734, -793,
4147 -511, -1208, 200, -1208, -858, -737, -662, -502, -1208, -1208,
4148 -1208, 1109, -370, -1208, -1208, -1208, 394, -221, -1197, -433,
4149 -273, -652, 779, -486, -668, -1208, -723, -1208, -629, -1208,
4150 305, -1208, -496, -1208, -1208, -1208, -1208, -1208, 34, -418,
4151 -378, -1208, -1208, -82, 1353, 248, -482, 64, -216, -69,
4152 -67, -1
4153};
4154
4155/* YYDEFGOTO[NTERM-NUM]. */
4156static const yytype_int16 yydefgoto[] =
4157{
4158 0, 333, 69, 1, 2, 70, 71, 266, 267, 656,
4159 1153, 1312, 657, 1050, 287, 288, 504, 224, 72, 494,
4160 289, 74, 75, 76, 77, 78, 785, 487, 815, 79,
4161 630, 616, 444, 273, 872, 274, 406, 407, 409, 972,
4162 410, 82, 804, 816, 83, 606, 275, 85, 86, 290,
4163 87, 522, 88, 89, 90, 238, 427, 428, 218, 219,
4164 220, 695, 645, 222, 92, 93, 94, 95, 96, 97,
4165 788, 395, 98, 553, 497, 554, 240, 241, 294, 820,
4166 837, 838, 480, 242, 481, 257, 258, 244, 470, 649,
4167 246, 808, 809, 99, 403, 510, 855, 665, 862, 1159,
4168 865, 863, 682, 599, 602, 100, 277, 102, 103, 104,
4169 105, 106, 107, 108, 109, 110, 111, 356, 359, 961,
4170 1150, 852, 966, 967, 800, 278, 279, 659, 847, 968,
4171 969, 419, 757, 758, 759, 760, 571, 772, 773, 1256,
4172 1257, 1163, 1258, 1385, 1342, 1260, 1261, 1337, 1262, 1263,
4173 1264, 1183, 1184, 1265, 1239, 1374, 1375, 529, 740, 899,
4174 314, 1165, 114, 1068, 1243, 1320, 360, 115, 116, 357,
4175 603, 604, 607, 608, 975, 853, 1234, 948, 1033, 824,
4176 1370, 856, 1427, 1235, 1111, 1275, 1113, 1287, 1114, 1218,
4177 1219, 1115, 1351, 1193, 1194, 1195, 1117, 1118, 1288, 1197,
4178 1119, 1120, 1121, 1122, 1123, 572, 1125, 1126, 1127, 1128,
4179 1129, 1130, 1131, 1132, 962, 1048, 1147, 1151, 117, 118,
4180 119, 120, 121, 122, 323, 123, 124, 541, 744, 125,
4181 126, 543, 127, 128, 129, 130, 542, 544, 316, 320,
4182 321, 534, 742, 741, 900, 1001, 1082, 1253, 901, 131,
4183 132, 317, 133, 134, 135, 136, 248, 249, 139, 250,
4184 251, 864, 677, 345, 346, 347, 348, 349, 574, 575,
4185 763, 576, 918, 1071, 1245, 578, 579, 769, 580, 581,
4186 582, 583, 1169, 1074, 1075, 1076, 1077, 584, 585, 586,
4187 927, 588, 589, 590, 591, 592, 593, 594, 595, 596,
4188 597, 764, 770, 447, 448, 449, 683, 299, 484, 253,
4189 725, 647, 686, 681, 402, 489, 833, 1201, 514, 660,
4190 414, 269
4191};
4192
4193/* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If
4194 positive, shift that token. If negative, reduce the rule whose
4195 number is the opposite. If YYTABLE_NINF, syntax error. */
4196static const yytype_int16 yytable[] =
4197{
4198 142, 334, 319, 335, 221, 237, 237, 661, 309, 412,
4199 236, 236, 315, 318, 456, 286, 293, 573, 73, 401,
4200 328, 646, 573, 654, 221, 408, 648, 675, 413, 225,
4201 226, 919, 915, 454, 483, 478, 223, 263, 334, 245,
4202 245, 309, 789, 917, 1034, 793, 971, 821, 791, 252,
4203 252, 292, 292, 297, 301, 221, 223, 355, 702, 711,
4204 309, 309, 309, 256, 767, 445, 792, 978, 324, 325,
4205 326, 587, 365, 1003, 701, 765, 587, 692, 295, 765,
4206 516, 308, 701, 734, 518, 796, 452, 775, 296, 300,
4207 1124, 1124, 1005, 781, 646, 1276, 654, 711, 916, 706,
4208 291, 702, 237, 327, 825, -146, -141, 236, 221, 1286,
4209 1143, 351, 924, 1251, 405, 405, 846, 949, 405, 243,
4210 254, 1376, 925, 658, 726, 870, 354, 1241, 352, 1386,
4211 -397, 138, 761, -142, 505, 1277, 245, 368, 746, 921,
4212 1207, 568, 1072, -704, 750, 926, 252, -149, -148, 143,
4213 726, 1289, -144, 737, 1158, 1167, 1302, 1305, -397, -397,
4214 1116, 1116, 259, -145, 350, 474, -146, 530, -147, -721,
4215 811, 268, -704, 569, 798, -143, -712, 466, -141, -713,
4216 537, 539, 138, 138, 265, 261, 312, 264, 792, 507,
4217 -113, 747, 344, 286, 1208, 502, 352, 751, -142, 1191,
4218 283, 1200, 397, 392, 393, 394, 1376, 1070, 1072, 1386,
4219 -141, -129, 611, -142, -397, 1124, 450, 362, 334, 312,
4220 508, 1242, 532, 533, 887, 1282, 342, 343, 528, 292,
4221 398, 399, 799, 1252, 1236, -137, -132, -832, 421, 431,
4222 431, 431, 358, 331, 471, 237, 1003, 237, 286, 332,
4223 236, 471, 236, 353, 485, 898, 1399, 309, 549, 550,
4224 551, 552, 1176, -133, 331, 142, -149, 478, 1124, 1059,
4225 332, 488, 490, 1070, 919, 1124, 1124, -140, -139, 482,
4226 868, 245, -135, 73, 292, 1116, 400, 658, 523, 1397,
4227 1289, 252, 726, -136, 1289, 859, 1400, 711, -138, 548,
4228 -833, -147, 702, 726, 351, -134, 869, -146, 984, 953,
4229 -832, 1296, 1298, -146, 256, 666, 309, 354, 701, -141,
4230 701, 353, 761, 910, 322, -141, 286, 255, 977, 1322,
4231 662, 801, -148, 291, 886, 292, 670, 351, 1073, -142,
4232 1333, 521, 1335, 259, 334, -142, 672, 476, 405, 405,
4233 405, 405, 73, 555, 556, 925, 499, 500, 1232, -144,
4234 138, 486, 292, 1207, 1400, 1142, 1142, 259, -147, 1233,
4235 940, 1080, -64, 663, 664, 1070, 1016, 980, 1070, 842,
4236 1070, -149, 1087, -712, 954, 849, 850, 985, -145, 613,
4237 237, -833, 959, 1047, 1017, 236, 138, 1207, 653, 485,
4238 1196, 745, 292, 745, 1073, 496, 1006, -149, 1124, 292,
4239 292, 291, 777, -149, 361, 138, 259, -141, 1008, 1010,
4240 405, 765, 1012, 702, 1014, 1062, 1015, 678, 331, 1057,
4241 778, 919, 915, 530, 332, 312, 405, 1080, -132, 701,
4242 -143, 237, -147, 1244, 655, -833, 236, -135, -147, 782,
4243 -713, -585, 653, 696, 513, 513, -64, 366, 259, 513,
4244 965, 519, 888, 237, 1017, 138, 138, 783, 236, 1411,
4245 854, 653, 485, -148, 458, 245, 889, 309, 761, -148,
4246 761, 471, 814, 471, -142, 252, 884, -148, 532, 533,
4247 1142, 221, 890, 138, 312, 587, -144, 691, 916, 653,
4248 -144, 587, 610, 703, 718, -133, -144, 615, 523, 1248,
4249 -145, 932, 460, 1301, 1304, 933, 896, 237, 459, 925,
4250 1187, 1188, 236, 223, 459, 653, 485, 702, 322, -145,
4251 1070, 790, 1070, 138, 1070, -145, 1070, -356, 509, 1247,
4252 138, 138, 1249, 1142, 577, 965, 732, 851, 1097, 577,
4253 1142, 1142, -149, 1269, 259, 687, -135, 260, -149, 1215,
4254 814, 814, 562, 803, 309, -356, -356, 646, 803, 654,
4255 59, 754, 1030, -140, 1058, 976, -135, -135, 979, 711,
4256 -135, -143, 563, 1177, 1178, 1180, 1181, -143, 786, 260,
4257 919, 786, 986, 848, 814, 523, 993, 503, 292, 693,
4258 694, 292, 701, 1425, 905, 462, 530, 538, 698, 905,
4259 467, 1384, 567, 568, 1216, 1070, 709, 710, 1217, 831,
4260 -703, -356, 843, 1198, 845, -833, 468, 839, -136, 1272,
4261 -143, -148, 1293, 1294, 807, 835, 496, 934, 138, 807,
4262 936, -137, 876, 879, 727, 569, 803, 803, 471, -703,
4263 761, 761, 1154, 840, 368, 312, 469, -705, 292, 237,
4264 292, 532, 533, 477, 236, 875, 916, 653, 485, -144,
4265 237, 925, -134, 1069, 884, 236, 894, 777, 653, 485,
4266 803, 292, 475, 1142, 138, 309, -705, 368, 830, 925,
4267 1054, 840, 221, 1055, 871, 1220, 1268, 902, 1381, 688,
4268 1060, 503, 471, 495, 1190, 881, 1064, 1388, 506, 1172,
4269 1174, 1274, 1392, 255, 1278, 451, 897, 331, 390, 391,
4270 392, 393, 394, 332, 223, 840, -112, 587, 712, 138,
4271 892, 714, 138, -706, 1297, -148, 717, -136, 587, 1069,
4272 947, 673, 312, 511, 836, 674, 1227, 891, 397, 904,
4273 -137, 906, 1332, 729, 907, 908, -139, -136, -136, -708,
4274 925, -136, -706, 1377, 309, 259, 1020, 830, 1021, -64,
4275 -137, -137, 989, -832, -137, 835, 398, 472, -145, 1078,
4276 956, -134, 397, 981, 1160, 983, 836, 1432, -708, 138,
4277 826, 138, 517, 587, 982, 523, 530, 841, 1112, 1112,
4278 397, -134, -134, 373, 374, -134, 520, 832, 344, -144,
4279 398, 501, 138, 525, -143, 540, 1295, -707, 814, 814,
4280 -145, 1360, 1361, 1362, 814, 814, 445, -709, 398, 526,
4281 -135, 771, 473, 1343, 1314, 1347, 598, 882, -700, 545,
4282 963, -136, 970, -710, 970, 1078, -707, 605, 1268, 535,
4283 1268, 532, 533, -711, 697, 1268, -709, 385, 386, 810,
4284 1268, 342, 343, 312, 292, 832, 473, -700, 891, 221,
4285 1192, -710, -710, 405, 397, 405, 1324, 1326, 1328, 1330,
4286 1331, -711, -711, 1401, 527, 964, 965, 1212, 1053, -701,
4287 471, 513, 684, 814, -719, 587, 832, 601, 587, 614,
4288 1036, 1038, 398, 453, 803, 803, 1042, 1044, 814, 1266,
4289 803, 803, 848, 673, 1063, 1000, 546, 1189, -701, 786,
4290 -349, 685, 667, 1112, 259, 512, 1268, -710, 1268, 1052,
4291 1268, 726, 1268, 671, 1365, 873, 237, -711, 397, 259,
4292 515, 236, 312, 929, 653, 485, 676, 1078, -349, -349,
4293 1078, 1268, 1078, 1413, 1415, 713, 1273, 1417, 1419, 1317,
4294 1049, 1422, -97, 721, 397, 292, 398, 668, 951, 952,
4295 715, 794, -357, 1192, 397, 797, 957, 958, 405, 803,
4296 716, 292, 722, 1192, 1192, 807, 397, 1213, 1214, 956,
4297 1144, 397, 398, 679, 803, 138, 1435, 1436, 1438, 1439,
4298 -357, -357, 398, 945, -349, -700, 1441, 912, 723, 1406,
4299 1407, 1409, 1410, 1396, 398, 1307, 731, 1398, 832, 398,
4300 1394, 1157, 669, -143, 1315, 1316, 991, 992, 832, 994,
4301 995, 259, 1403, -700, -700, -129, 1091, 1092, 524, 524,
4302 753, 1094, 1095, -98, -134, 1175, 733, 1148, 680, 1152,
4303 491, 1203, 999, 1100, 587, 762, -357, 292, 946, 1434,
4304 492, 493, 766, 1266, 1206, 530, 1164, 914, 1266, 1164,
4305 1308, 914, 1170, 563, 768, 680, -444, 779, 1170, 1170,
4306 774, 292, 780, 795, 1026, 812, -701, -97, 834, -700,
4307 1185, 1185, 530, -97, -836, 844, 138, 1041, 309, 1405,
4308 851, 854, 1078, 567, 1078, 911, 1078, 1290, 1078, 913,
4309 922, 368, 138, 930, -701, -701, 1229, 1230, 535, 987,
4310 532, 533, 1237, 1282, 931, 1285, 1283, 935, 381, 382,
4311 1311, 939, -329, 368, 1065, 1300, 1303, -836, 996, 942,
4312 998, 1309, 938, 1266, 941, 531, 1271, 532, 533, 292,
4313 381, 382, 292, 292, 138, 138, 970, 1002, 292, 334,
4314 950, 508, 530, 1141, 1141, -836, -836, 955, -98, 943,
4315 -701, 960, 1018, 1019, -98, 390, 391, 392, 393, 394,
4316 965, 1024, 292, 997, 1025, 292, 1027, 1078, 138, 832,
4317 1310, 778, 1007, 1009, 387, 388, 389, 390, 391, 392,
4318 393, 394, 530, 1011, 1013, 1321, 368, 337, 338, 339,
4319 340, 341, 138, -333, 1040, 535, 405, 532, 533, -836,
4320 309, -836, 530, 381, 382, -832, 292, 1083, 1084, 970,
4321 -331, 1141, 1141, 1356, 1146, 1141, 1371, 1372, 530, 1149,
4322 1162, 292, 1182, 1164, 1166, 1170, 1170, 1170, 1170, 1170,
4323 1202, 1209, 1141, 1168, 1164, 536, 1164, 532, 533, 1171,
4324 1338, 1173, 1179, 1210, 832, 1199, 1338, 1280, 1338, 389,
4325 390, 391, 392, 393, 394, 743, 1225, 532, 533, 1211,
4326 138, 1279, 1207, 138, 138, 1098, 1323, 1306, 1141, 138,
4327 1318, 748, 309, 532, 533, 1319, 1325, 557, 237, 558,
4328 559, 560, 561, 236, 1327, 1081, 653, 485, 1329, 963,
4329 1334, 1152, 1204, 138, 36, 37, 138, 39, 1378, 292,
4330 1238, 1141, 1389, 1336, 1141, 1341, 405, 405, 40, 41,
4331 42, 43, 1346, 1402, 1349, 1350, 1393, 298, 1141, 1353,
4332 1141, 1281, 1355, 1141, 1141, 101, 1408, 755, 1141, 1141,
4333 1412, 1414, 832, 547, 1416, 832, 1418, 138, 1423, 247,
4334 247, -832, 1205, 557, -833, 558, 559, 560, 561, 292,
4335 1437, 1081, 138, 336, 728, 832, 498, 1228, 1170, 1170,
4336 1170, 1170, 988, 1164, 730, 411, 1338, 1338, 805, 416,
4337 1338, 1338, 396, 1067, 1338, 433, 101, 101, 431, 719,
4338 310, 970, 874, 1051, 36, 37, 1061, 39, 1313, 1004,
4339 909, 247, 1340, 755, 45, 46, 1383, 1141, 756, 1259,
4340 1186, 1339, 1428, 990, 1238, 1391, 609, 1354, 1170, 1338,
4341 1338, 1338, 1338, 310, 1291, 1292, 1284, 1369, 1426, 1338,
4342 557, 1368, 558, 559, 560, 561, 562, 247, 247, 457,
4343 138, 247, 418, 429, 429, 749, 247, 446, 600, 1067,
4344 1161, 1424, 832, 832, 832, 1299, 563, 1240, 455, 0,
4345 431, 1240, 0, 1081, 0, 0, 1081, 0, 1081, 1141,
4346 564, 0, 0, 1141, 0, 1141, 0, 1270, 0, 557,
4347 565, 558, 559, 560, 561, 566, 567, 568, 0, 1373,
4348 138, 558, 559, 560, 561, 0, 0, 0, 0, 0,
4349 461, 0, 0, 463, 464, 465, 0, 0, 0, 0,
4350 0, 1348, 0, 0, 832, 0, 0, 0, 0, 569,
4351 0, 1352, 570, 1404, 557, 0, 558, 559, 560, 561,
4352 562, 0, 0, 0, 0, 1066, 0, 920, 1357, 1358,
4353 1359, 0, 0, 1141, 0, 0, 1199, 0, 0, 928,
4354 563, 1067, 0, 0, 1067, 0, 1067, 84, 0, 0,
4355 0, 0, 0, 0, 101, 1255, 0, 0, 878, 880,
4356 0, 84, 84, 0, 565, 0, 0, 0, 0, 566,
4357 567, 568, 0, 0, 878, 880, 0, 0, 0, 247,
4358 0, 247, 0, 0, 247, 247, 0, 0, 0, 0,
4359 101, 557, 895, 558, 559, 560, 561, 562, 84, 84,
4360 0, 0, 0, 569, 0, 0, 570, 0, 1081, 101,
4361 1081, 0, 1081, 84, 1081, 0, 0, 563, 0, 1240,
4362 0, 1270, 0, 0, 0, 0, 1270, 0, 0, 310,
4363 0, 1270, 0, 0, 0, 0, 0, 0, 0, 0,
4364 0, 565, 0, 0, 0, 0, 0, 567, 568, 84,
4365 84, 0, 0, 84, 0, 0, 0, 0, 84, 101,
4366 101, 247, 247, 247, 247, 0, 247, 247, 0, 0,
4367 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4368 569, 0, 0, 0, 0, 0, 0, 101, 310, 1110,
4369 1110, 0, 0, 1081, 0, 0, 1067, 1270, 1067, 1270,
4370 1067, 1270, 1067, 1270, 0, 0, 0, 0, 0, 1255,
4371 0, 0, 0, 0, 1255, 0, 0, 0, 0, 1255,
4372 0, 0, 1270, 0, 247, 0, 0, 101, 0, 0,
4373 699, 700, 0, 247, 101, 101, 0, 0, 0, 298,
4374 0, 0, 0, 0, 0, 0, 0, 895, 0, 247,
4375 0, 0, 0, 0, 0, 0, 0, 1110, 1110, 1079,
4376 0, 1110, 0, 0, 0, 0, 0, 0, 1085, 0,
4377 1086, 0, 1088, 0, 700, 247, 84, 298, 1110, 0,
4378 0, 1067, 0, 0, 0, 1255, 0, 1255, 0, 1255,
4379 0, 1255, 0, 0, 0, 0, 0, 247, 0, 0,
4380 0, 84, 0, 84, 0, 0, 84, 84, 0, 0,
4381 1255, 0, 84, 0, 1110, 0, 1037, 1039, 0, 0,
4382 0, 0, 1043, 1045, 0, 1079, 0, 0, 0, 0,
4383 0, 84, 101, 0, 0, 0, 0, 0, 0, 0,
4384 0, 0, 0, 0, 0, 0, 0, 1110, 0, 310,
4385 1110, 247, 776, 0, 0, 0, 1037, 1039, 0, 1043,
4386 1045, 0, 0, 0, 1110, 0, 1110, 0, 0, 1110,
4387 1110, 0, 806, 0, 1110, 1110, 0, 819, 101, 0,
4388 0, 84, 84, 84, 84, 84, 84, 0, 84, 84,
4389 0, 0, 0, 0, 0, 0, 0, 1133, 1133, 0,
4390 0, 0, 0, 0, 0, 0, 1145, 0, 0, 84,
4391 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4392 0, 0, 247, 101, 0, 247, 101, 1246, 0, 0,
4393 1145, 0, 1250, 0, 247, 0, 310, 0, 1254, 822,
4394 0, 1267, 0, 1110, 0, 0, 84, 0, 0, 84,
4395 0, 0, 0, 0, 0, 84, 84, 84, 557, 883,
4396 558, 559, 560, 561, 562, 1133, 1133, 0, 0, 1133,
4397 0, 84, 0, 0, 0, 700, 557, 298, 558, 559,
4398 560, 561, 562, 101, 563, 101, 1133, 0, 0, 0,
4399 0, 0, 0, 247, 0, 0, 0, 84, 564, 0,
4400 0, 0, 563, 0, 247, 1110, 101, 247, 565, 1110,
4401 0, 1110, 0, 566, 567, 568, 564, 822, 822, 84,
4402 0, 0, 1133, 0, 0, 0, 565, 0, 0, 0,
4403 0, 0, 567, 568, 0, 923, 0, 0, 0, 0,
4404 0, 0, 0, 247, 0, 0, 0, 569, 0, 0,
4405 570, 822, 0, 0, 84, 1133, 0, 310, 1133, 0,
4406 0, 0, 0, 0, 937, 569, 0, 0, 0, 0,
4407 0, 0, 1133, 84, 1133, 0, 0, 1133, 1133, 1110,
4408 0, 0, 1133, 1133, 1379, 0, 1380, 0, 1382, 0,
4409 0, 0, 0, 0, 0, 1387, 700, 0, 0, 0,
4410 84, 0, 0, 0, 0, 1395, 0, 0, 0, 0,
4411 0, 0, 0, 0, 974, 0, 0, 0, 0, 0,
4412 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4413 0, 0, 0, 0, 0, 0, 310, 0, 0, 0,
4414 0, 0, 0, 0, 84, 84, 0, 84, 84, 0,
4415 0, 1133, 0, 0, 0, 0, 84, 0, 0, 0,
4416 0, 84, 0, 0, 0, 0, 0, 1429, 0, 0,
4417 0, 0, 0, 1430, 0, 1431, 0, 1433, 0, 0,
4418 0, 0, 0, 0, 0, 0, 247, 0, 247, 101,
4419 0, 0, 0, 0, 0, 0, 1440, 112, 0, 0,
4420 1023, 0, 0, 0, 0, 84, 0, 84, 0, 0,
4421 0, 112, 112, 1133, 0, 84, 0, 1133, 0, 1133,
4422 0, 0, 0, 1046, 0, 0, 84, 0, 84, 84,
4423 0, 0, 0, 0, 0, 1056, 0, 0, 0, 84,
4424 84, 0, 0, 0, 0, 0, 0, 0, 112, 112,
4425 0, 0, 0, 247, 0, 0, 0, 0, 0, 298,
4426 0, 0, 0, 112, 0, 84, 0, 0, 0, 0,
4427 247, 0, 0, 84, 0, 822, 822, 0, 0, 0,
4428 0, 822, 822, 0, 1093, 0, 0, 1133, 0, 0,
4429 101, 247, 0, 0, 0, 0, 0, 0, 0, 112,
4430 112, 0, 0, 112, 0, 0, 101, 0, 112, 22,
4431 23, 24, 25, 0, 0, 0, 0, 0, 0, 1156,
4432 0, 0, 0, 0, 0, 31, 32, 33, 1098, 0,
4433 0, 0, 1099, 0, 0, 40, 41, 42, 43, 44,
4434 0, 0, 0, 0, 0, 0, 0, 0, 101, 101,
4435 822, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4436 0, 0, 0, 0, 0, 822, 0, 1101, 1102, 1134,
4437 1134, 0, 0, 0, 0, 1103, 0, 0, 1104, 0,
4438 1105, 1106, 101, 1107, 0, 0, 57, 58, 59, 60,
4439 61, 62, 63, 64, 65, 0, 0, 0, 0, 1135,
4440 1135, 0, 0, 0, 0, 0, 101, 0, 84, 0,
4441 84, 84, 0, 0, 0, 0, 1109, 1231, 0, 0,
4442 0, 0, 0, 304, 0, 0, 112, 0, 0, 0,
4443 259, 0, 0, 1136, 1136, 0, 0, 1134, 1134, 0,
4444 0, 1134, 0, 0, 0, 0, 0, 0, 0, 0,
4445 0, 112, 0, 112, 0, 0, 112, 112, 1134, 0,
4446 0, 0, 112, 0, 0, 0, 0, 1135, 1135, 0,
4447 1223, 1135, 0, 0, 101, 84, 0, 101, 101, 0,
4448 0, 112, 0, 101, 0, 0, 0, 0, 1135, 0,
4449 0, 0, 84, 0, 1134, 0, 0, 84, 84, 0,
4450 0, 1136, 1136, 84, 84, 1136, 0, 101, 0, 0,
4451 101, 0, 84, 84, 0, 0, 0, 0, 0, 0,
4452 0, 0, 1136, 0, 1135, 0, 0, 1134, 84, 247,
4453 1134, 112, 112, 112, 112, 112, 112, 0, 112, 112,
4454 0, 0, 0, 0, 1134, 0, 1134, 0, 0, 1134,
4455 1134, 101, 0, 0, 1134, 1134, 0, 1135, 1136, 112,
4456 1135, 0, 0, 0, 0, 0, 101, 0, 0, 0,
4457 84, 84, 84, 0, 1135, 0, 1135, 0, 0, 1135,
4458 1135, 0, 0, 0, 1135, 1135, 0, 84, 0, 0,
4459 0, 1136, 1345, 0, 1136, 0, 112, 0, 0, 112,
4460 0, 0, 0, 0, 84, 112, 112, 112, 1136, 0,
4461 1136, 0, 0, 1136, 1136, 0, 0, 0, 1136, 1136,
4462 0, 112, 0, 1134, 0, 0, 0, 0, 84, 0,
4463 0, 0, 247, 0, 0, 0, 0, 0, 0, 247,
4464 247, 0, 0, 0, 101, 0, 0, 112, 0, 0,
4465 0, 0, 0, 1135, 0, 0, 0, 0, 0, 0,
4466 0, 0, 0, 0, 1390, 0, 0, 1137, 1137, 112,
4467 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4468 0, 0, 0, 0, 0, 1134, 0, 1136, 0, 1134,
4469 0, 1134, 0, 0, 101, 0, 84, 0, 0, 84,
4470 84, 0, 0, 0, 112, 84, 0, 0, 0, 0,
4471 113, 1138, 1138, 0, 0, 1135, 0, 0, 0, 1135,
4472 0, 1135, 0, 112, 113, 113, 0, 0, 0, 84,
4473 0, 0, 84, 0, 0, 1137, 1137, 0, 0, 1137,
4474 0, 0, 0, 0, 0, 0, 0, 0, 0, 1136,
4475 112, 84, 0, 1136, 0, 1136, 1137, 0, 0, 1134,
4476 0, 113, 113, 0, 0, 0, 0, 0, 0, 1139,
4477 1139, 0, 0, 84, 0, 0, 113, 0, 0, 1138,
4478 1138, 0, 0, 1138, 0, 0, 0, 0, 84, 1135,
4479 0, 0, 1137, 0, 112, 112, 0, 112, 112, 0,
4480 1138, 0, 0, 0, 0, 0, 112, 0, 0, 0,
4481 0, 112, 113, 113, 0, 0, 113, 0, 0, 0,
4482 0, 113, 0, 1136, 0, 1137, 0, 0, 1137, 0,
4483 0, 0, 0, 0, 0, 0, 1138, 1139, 1139, 0,
4484 0, 1139, 1137, 0, 1137, 0, 0, 1137, 1137, 0,
4485 0, 0, 1137, 1137, 84, 112, 0, 112, 1139, 0,
4486 0, 84, 84, 0, 0, 112, 84, 0, 0, 1138,
4487 0, 0, 1138, 0, 0, 0, 112, 0, 112, 112,
4488 0, 0, 0, 0, 0, 0, 1138, 0, 1138, 112,
4489 112, 1138, 1138, 0, 1139, 0, 1138, 1138, 0, 0,
4490 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4491 0, 0, 0, 1140, 1140, 112, 84, 0, 0, 0,
4492 0, 1137, 0, 112, 0, 0, 0, 1139, 0, 0,
4493 1139, 0, 0, 0, 0, 0, 0, 0, 0, 113,
4494 0, 0, 0, 0, 1139, 0, 1139, 0, 0, 1139,
4495 1139, 0, 0, 0, 1139, 1139, 0, 0, 0, 0,
4496 0, 0, 0, 0, 113, 1138, 113, 0, 0, 113,
4497 113, 0, 0, 0, 0, 113, 0, 0, 0, 0,
4498 0, 1140, 1140, 1137, 0, 1140, 0, 1137, 0, 1137,
4499 0, 0, 0, 0, 113, 0, 0, 0, 0, 0,
4500 0, 0, 1140, 0, 0, 0, 0, 0, 0, 0,
4501 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4502 0, 0, 0, 1139, 0, 0, 0, 1138, 0, 0,
4503 0, 1138, 0, 1138, 0, 0, 0, 0, 1140, 0,
4504 0, 0, 0, 0, 113, 113, 113, 113, 113, 113,
4505 0, 113, 113, 0, 0, 0, 0, 1137, 112, 0,
4506 112, 112, 0, 0, 0, 0, 0, 0, 0, 0,
4507 0, 1140, 113, 0, 1140, 0, 0, 0, 0, 0,
4508 0, 0, 0, 0, 0, 1139, 0, 0, 1140, 1139,
4509 1140, 1139, 0, 1140, 1140, 0, 0, 0, 1140, 1140,
4510 80, 1138, 0, 0, 0, 0, 0, 0, 0, 113,
4511 0, 0, 113, 0, 80, 80, 0, 0, 113, 113,
4512 113, 0, 0, 0, 0, 112, 0, 0, 0, 0,
4513 0, 0, 0, 0, 113, 0, 0, 0, 0, 0,
4514 0, 0, 112, 0, 0, 0, 0, 112, 112, 0,
4515 0, 80, 80, 112, 112, 306, 0, 0, 0, 1139,
4516 113, 0, 112, 112, 0, 0, 0, 1140, 22, 23,
4517 24, 25, 0, 0, 0, 0, 0, 0, 112, 0,
4518 0, 0, 113, 0, 31, 32, 33, 0, 306, 0,
4519 0, 0, 0, 0, 40, 41, 42, 43, 44, 0,
4520 0, 0, 0, 0, 0, 0, 0, 306, 306, 306,
4521 0, 80, 0, 0, 0, 0, 0, 113, 0, 0,
4522 112, 112, 112, 0, 0, 0, 0, 0, 0, 1140,
4523 0, 0, 0, 1140, 0, 1140, 113, 112, 0, 0,
4524 0, 0, 0, 0, 0, 57, 58, 59, 60, 61,
4525 62, 63, 64, 65, 112, 0, 0, 0, 0, 0,
4526 0, 0, 0, 113, 0, 0, 0, 0, 0, 0,
4527 0, 368, -855, -855, -855, -855, 373, 374, 112, 0,
4528 -855, -855, 304, 0, 0, 0, 0, 0, 381, 382,
4529 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4530 0, 0, 0, 1140, 0, 0, 0, 113, 113, 0,
4531 113, 113, 0, 0, 0, 0, 0, 0, 0, 113,
4532 0, 0, 0, 0, 113, 0, 0, 0, 0, 80,
4533 385, 386, 387, 388, 389, 390, 391, 392, 393, 394,
4534 0, 0, 0, 0, 0, 0, 112, 0, 0, 112,
4535 112, 0, 0, 0, 80, 112, 80, 0, 0, 0,
4536 0, 0, 0, 0, 0, 80, 0, 0, 113, 0,
4537 113, 0, 0, 0, 0, 0, 0, 0, 113, 112,
4538 0, 0, 112, 0, 80, 0, 0, 0, 0, 113,
4539 0, 113, 113, 0, 0, 0, 0, 0, 0, 0,
4540 0, 112, 113, 113, 306, 0, 0, 0, 0, 0,
4541 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4542 0, 0, 0, 112, 0, 0, 0, 0, 113, 0,
4543 0, 0, 0, 0, 80, 80, 113, 0, 112, -854,
4544 0, 0, 0, 0, 0, 0, 0, -854, -854, -854,
4545 0, 0, -854, -854, -854, 0, -854, 0, 0, 0,
4546 0, 0, 80, 306, -854, -854, -854, 0, 0, 0,
4547 0, 0, 0, 81, 0, 0, -854, -854, 0, -854,
4548 -854, -854, -854, -854, 0, 0, 0, 81, 81, 0,
4549 0, 0, 0, 0, 0, 0, 0, 0, 0, 80,
4550 0, 0, 80, 0, 112, 0, 0, -854, -854, 80,
4551 80, 112, 112, 0, 0, 0, 112, 0, 0, 0,
4552 0, 0, 0, 0, 81, 81, 0, 0, 307, 0,
4553 0, 0, 0, 0, 0, 0, -854, -854, 0, 0,
4554 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4555 80, 0, 0, 0, 0, 0, 0, 0, 0, -854,
4556 0, 307, 0, 0, 0, 0, 112, 0, 0, 0,
4557 0, 113, 80, 113, 113, 0, 0, 0, 0, 0,
4558 307, 307, 307, 0, 81, 0, 0, 0, 0, 0,
4559 -854, -854, 0, -854, 0, 0, 255, -854, 0, -854,
4560 0, 0, 0, 0, 0, 0, 0, 80, 0, 0,
4561 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4562 0, 0, 0, 0, 306, 0, 80, 0, 0, 0,
4563 0, 0, 0, 0, 0, 0, 0, 0, 113, 0,
4564 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4565 0, 0, 0, 80, 0, 113, 0, 0, 0, 0,
4566 113, 113, 0, 0, 0, 0, 113, 113, 0, 0,
4567 0, 0, 0, 0, 0, 113, 113, 0, 0, 0,
4568 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4569 0, 113, 0, 0, 0, 0, 0, 0, 80, 0,
4570 0, 80, 81, 0, 0, 0, 0, 0, 0, 0,
4571 0, 306, 0, 0, 80, 0, 0, 0, 0, 0,
4572 0, 0, 0, 0, 0, 0, 0, 81, 0, 81,
4573 0, 0, 0, 113, 113, 113, 0, 0, 81, 0,
4574 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4575 113, 0, 0, 0, 0, 0, 0, 81, 80, 0,
4576 80, 0, 0, 0, 0, 0, 0, 113, 80, 0,
4577 0, 0, 0, 0, 0, 0, 0, 307, 0, 80,
4578 0, 80, 141, 0, 0, 0, 0, 0, 0, 0,
4579 0, 113, 80, 80, 0, 0, 0, 0, 0, 0,
4580 0, 0, 0, 0, 0, 944, 0, 81, 81, 0,
4581 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4582 0, 0, 0, 0, 0, 0, 80, 0, 0, 0,
4583 0, 0, 306, 141, 141, 81, 307, 313, 0, 368,
4584 369, 370, 371, 372, 373, 374, 375, 376, 377, 378,
4585 379, 380, 0, 0, 0, 0, 381, 382, 0, 113,
4586 0, 0, 113, 113, 0, 0, 0, 0, 113, 0,
4587 313, 0, 81, 0, 0, 81, 0, 0, 0, 0,
4588 0, 0, 81, 81, 0, 0, 0, 0, 0, 422,
4589 432, 432, 113, 0, 0, 113, 384, 0, 385, 386,
4590 387, 388, 389, 390, 391, 392, 393, 394, 0, 0,
4591 0, 306, 0, 0, 113, 0, -298, 0, 0, 0,
4592 0, 0, 0, 81, 368, 369, 370, 371, 372, 373,
4593 374, 375, 0, 377, 378, 0, 113, 0, 0, 0,
4594 0, 381, 382, 0, 0, 81, 0, 0, 0, 0,
4595 0, 113, 0, 0, 0, 0, 0, 0, 0, 0,
4596 0, 0, 0, 0, 80, 0, 0, 0, 0, 0,
4597 0, 0, 0, 0, 0, 0, 0, 0, 367, 0,
4598 81, 0, 0, 385, 386, 387, 388, 389, 390, 391,
4599 392, 393, 394, 0, 0, 0, 0, 307, 0, 81,
4600 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4601 0, 141, 137, 0, 0, 0, 0, 113, 0, 0,
4602 0, 0, 0, 0, 113, 113, 81, 0, 0, 113,
4603 0, 368, 369, 370, 371, 372, 373, 374, 375, 376,
4604 377, 378, 379, 380, 0, 80, 0, 141, 381, 382,
4605 80, 80, 0, 0, 383, 0, 80, 80, 0, 0,
4606 0, 0, 0, 137, 137, 80, 141, 311, 0, 0,
4607 0, 81, 0, 0, 81, 0, 0, 0, 0, 113,
4608 0, 80, 0, 0, 307, 0, 313, 81, 384, 0,
4609 385, 386, 387, 388, 389, 390, 391, 392, 393, 394,
4610 311, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4611 0, 0, 0, 0, 0, 0, 141, 141, 0, 420,
4612 430, 430, 430, 80, 80, 80, 0, 0, 0, 0,
4613 0, 81, 0, 81, 944, 0, 0, 0, 0, 0,
4614 80, 81, 0, 0, 141, 313, 0, 0, 0, 0,
4615 0, 0, 81, 0, 81, 0, 0, 80, 0, 0,
4616 91, 0, 0, 0, 0, 81, 81, 0, 368, 369,
4617 370, 371, 372, 373, 374, 375, 376, 377, 378, 379,
4618 380, 80, 0, 0, 141, 381, 382, 0, 0, 0,
4619 0, 141, 141, 0, 0, 0, 0, 0, 0, 81,
4620 0, 0, 0, 0, 0, 307, 0, 0, 0, 0,
4621 0, 91, 91, 0, 0, 0, 0, 0, 0, 0,
4622 0, 0, 0, 0, 0, 384, 0, 385, 386, 387,
4623 388, 389, 390, 391, 392, 393, 394, 0, 0, 0,
4624 0, 137, 0, 0, 0, 306, 0, 0, 0, 80,
4625 0, 0, 80, 80, 0, 0, 0, 0, 80, 0,
4626 0, 0, 0, 0, 0, 0, 0, 417, 0, 0,
4627 0, 0, 0, 0, 0, 0, 0, 137, 0, 0,
4628 0, 0, 80, 0, 307, 80, 0, 0, 0, 141,
4629 0, 0, 0, 0, 0, 0, 137, 0, 0, 0,
4630 0, 0, 0, 0, 0, 0, 313, 0, 0, 0,
4631 0, 0, 0, 0, 0, 0, 311, 0, 0, 0,
4632 0, 0, 0, 0, 0, 0, 80, 0, 0, 0,
4633 0, 0, 0, 0, 0, 141, 0, 81, 0, 0,
4634 0, 80, 0, 0, 0, 0, 137, 137, 0, 0,
4635 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4636 0, 0, 0, 0, 0, 0, 0, 306, 0, 0,
4637 0, 0, 0, 0, 137, 311, 0, 0, 0, 0,
4638 141, 0, 0, 141, 0, 0, 0, 0, 0, 91,
4639 0, 0, 0, 313, 0, 0, 823, 0, 0, 0,
4640 0, 0, 0, 0, 0, 0, 0, 80, 0, 0,
4641 0, 0, 0, 0, 137, 0, 0, 0, 81, 80,
4642 0, 137, 137, 81, 81, 91, 0, 0, 0, 81,
4643 81, 0, 0, 0, 0, 0, 0, 0, 81, 306,
4644 141, 0, 141, 0, 91, 0, 0, 0, 0, 0,
4645 0, 0, 0, 0, 81, 0, 0, 0, 0, 0,
4646 0, 0, 0, 141, 0, 0, 0, 0, 0, 80,
4647 0, 0, 0, 0, 823, 823, 0, 0, 0, 0,
4648 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4649 0, 0, 0, 0, 91, 91, 81, 81, 81, 0,
4650 0, 0, 0, 0, 0, 0, 0, 0, 823, 0,
4651 0, 0, 0, 81, 313, 0, 0, 0, 0, 137,
4652 0, 0, 91, 903, 0, 0, 0, 0, 0, 0,
4653 81, 0, 0, 0, 0, 140, 311, 0, 0, 0,
4654 0, 0, 0, 0, 0, 0, 0, 689, 651, 0,
4655 0, 690, 0, 0, 81, 0, 0, 0, 0, 0,
4656 0, 0, 91, 0, 0, 137, 0, 0, 0, 91,
4657 91, 188, 189, 190, 191, 192, 193, 194, 195, 196,
4658 0, 0, 197, 198, 0, 0, 140, 140, 199, 200,
4659 201, 202, 0, 313, 0, 0, 0, 0, 0, 0,
4660 0, 0, 203, 204, 0, 0, 0, 0, 0, 0,
4661 137, 0, 0, 137, 0, 0, 0, 0, 307, 0,
4662 0, 0, 81, 311, 0, 81, 81, 0, 0, 0,
4663 0, 81, 205, 206, 207, 208, 209, 210, 211, 212,
4664 213, 214, 0, 215, 216, 0, 141, 0, 0, 0,
4665 0, 217, 255, 0, 0, 81, 0, 0, 81, 368,
4666 369, 370, 371, 372, 373, 374, 0, 91, 377, 378,
4667 137, 0, 137, 0, 0, 0, 381, 382, 0, 0,
4668 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4669 0, 0, 0, 137, 0, 0, 0, 0, 0, 81,
4670 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4671 0, 0, 0, 91, 81, 0, 0, 0, 385, 386,
4672 387, 388, 389, 390, 391, 392, 393, 394, 0, 0,
4673 0, 0, 823, 823, 0, 0, 0, 0, 823, 823,
4674 307, 0, 0, 0, 311, 0, 0, 141, 0, 0,
4675 0, 0, 0, 0, 0, 0, 0, 0, 91, 0,
4676 0, 91, 0, 141, 140, 0, 0, 0, 0, 0,
4677 0, 0, 0, 0, 817, 0, 0, 0, 0, 0,
4678 81, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4679 0, 0, 81, 0, 0, 0, 0, 0, 0, 0,
4680 140, 0, 0, 0, 0, 141, 141, 823, 0, 0,
4681 0, 0, 307, 0, 0, 0, 0, 0, 91, 140,
4682 91, 0, 823, 311, 0, 0, 0, 0, 0, 0,
4683 0, 0, 22, 23, 24, 25, 0, 0, 0, 141,
4684 0, 91, 81, 0, 0, 0, 0, 0, 31, 32,
4685 33, 1098, 817, 817, 0, 1099, 0, 1100, 40, 41,
4686 42, 43, 44, 141, 0, 0, 0, 0, 0, 140,
4687 140, 0, 0, 0, 0, 0, 137, 563, 0, 0,
4688 0, 0, 0, 0, 0, 0, 817, 0, 0, 0,
4689 1101, 1102, 0, 0, 0, 0, 0, 140, 1103, 0,
4690 0, 1104, 0, 1105, 1106, 0, 1107, 567, 0, 57,
4691 58, 1108, 60, 61, 62, 63, 64, 65, 0, 0,
4692 0, 0, 0, 0, 0, 0, 0, 1226, 0, 0,
4693 0, 141, 0, 0, 141, 141, 0, 140, 0, 1109,
4694 141, 0, 0, 0, 140, 140, 304, 0, 0, 0,
4695 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4696 0, 0, 0, 0, 141, 0, 0, 141, 0, 0,
4697 642, 643, 0, 0, 644, 0, 0, 137, 0, 0,
4698 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4699 0, 0, 0, 137, 188, 189, 190, 191, 192, 193,
4700 194, 195, 196, 0, 0, 197, 198, 0, 141, 0,
4701 0, 199, 200, 201, 202, 0, 0, 0, 0, 0,
4702 0, 0, 0, 141, 91, 203, 204, 0, 0, 0,
4703 0, 0, 0, 0, 0, 137, 137, 0, 0, 0,
4704 0, 0, 140, 0, 0, 0, 0, 0, 0, 432,
4705 0, 239, 239, 0, 0, 205, 206, 207, 208, 209,
4706 210, 211, 212, 213, 214, 0, 215, 216, 0, 137,
4707 0, 0, 0, 0, 217, 0, 0, 0, 0, 0,
4708 0, 0, 0, 276, 280, 281, 282, 0, 140, 0,
4709 239, 239, 0, 137, 0, 0, 0, 0, 0, 0,
4710 0, 141, 0, 329, 330, 0, 0, 0, 0, 0,
4711 817, 817, 0, 0, 0, 0, 817, 817, 0, 0,
4712 0, 432, 0, 0, 0, 91, 0, 0, 0, 0,
4713 0, 0, 0, 140, 0, 0, 140, 0, 0, 0,
4714 0, 91, 0, 0, 0, 0, 0, 0, 239, 140,
4715 0, 141, 0, 0, 0, 0, 0, 1224, 0, 0,
4716 0, 137, 0, 0, 137, 137, 0, 0, 0, 0,
4717 137, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4718 0, 0, 0, 91, 91, 817, 0, 0, 0, 0,
4719 0, 0, 0, 140, 137, 140, 0, 137, 0, 0,
4720 817, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4721 0, 0, 0, 0, 0, 0, 140, 91, 0, 0,
4722 0, 0, 0, 0, 0, 0, 0, 140, 140, 0,
4723 0, 0, 0, 0, 0, 0, 0, 0, 137, 0,
4724 0, 91, 0, 0, 0, 0, 0, 0, 0, 0,
4725 0, 0, 0, 137, 0, 0, 0, 0, 0, 0,
4726 0, 140, 0, 0, 239, 0, 0, 239, 239, 239,
4727 0, 329, 0, 0, 0, 0, 0, 0, 0, 430,
4728 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4729 0, 239, 0, 239, 0, 0, 0, 0, 0, 0,
4730 0, 0, 0, 0, 0, 1222, 0, 0, 0, 91,
4731 0, 0, 91, 91, 0, 0, 0, 0, 91, 0,
4732 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4733 0, 137, 0, 0, 0, 0, 0, 0, 0, 0,
4734 0, 0, 91, 0, 0, 91, 0, 0, 0, 0,
4735 0, 430, 0, 0, 0, 0, 0, 0, 0, 0,
4736 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4737 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4738 0, 137, 0, 0, 0, 0, 91, 0, 0, 0,
4739 0, 0, 0, 0, 0, 0, 0, 0, 0, 140,
4740 0, 91, 0, 0, 617, 618, 619, 620, 621, 0,
4741 0, 622, 623, 624, 625, 626, 627, 628, 629, 0,
4742 631, 0, 0, 632, 633, 634, 635, 636, 637, 638,
4743 639, 640, 641, 0, 650, 651, 239, 0, 652, 0,
4744 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4745 0, 0, 0, 0, 0, 0, 0, 0, 188, 189,
4746 190, 191, 192, 193, 194, 195, 196, 0, 0, 197,
4747 198, 0, 0, 0, 0, 199, 200, 201, 202, 91,
4748 0, 0, 0, 0, 0, 140, 140, 239, 0, 203,
4749 204, 140, 140, 0, 0, 0, 0, 0, 0, 0,
4750 140, 0, 0, 0, 239, 239, 0, 0, 0, 239,
4751 0, 0, 0, 239, 0, 282, 140, 0, 0, 205,
4752 206, 207, 208, 209, 210, 211, 212, 213, 214, 91,
4753 215, 216, 0, 720, 0, 0, 0, 0, 217, 0,
4754 0, 0, 0, 0, 0, 0, 0, 0, 239, 0,
4755 0, 239, 0, 0, 0, 0, 0, 0, 140, 140,
4756 140, 0, 0, 239, 0, 0, 0, 0, 0, 0,
4757 0, 0, 0, 0, 0, 140, 0, 0, 0, 0,
4758 0, 752, 0, 22, 23, 24, 25, 0, 0, 0,
4759 0, 0, 140, 0, 0, 0, 0, 0, 0, 31,
4760 32, 33, 1098, 0, 0, 0, 1099, 0, 0, 40,
4761 41, 42, 43, 44, 0, 0, 140, 0, 0, 0,
4762 0, 0, 0, 0, 0, 0, 239, 0, 0, 0,
4763 0, 0, 0, 0, 787, 0, 0, 787, 0, 0,
4764 0, 1101, 1102, 0, 0, 0, 239, 0, 0, 1103,
4765 0, 818, 1104, 0, 1105, 1106, 0, 1107, 0, 0,
4766 57, 58, 59, 60, 61, 62, 63, 64, 65, 0,
4767 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4768 0, 0, 0, 0, 140, 0, 0, 140, 140, 0,
4769 1109, 0, 0, 140, 0, 0, 0, 304, 0, 0,
4770 0, 0, 0, 0, 0, 239, 0, 0, 0, 0,
4771 0, 0, 0, 0, 0, 0, 239, 140, 0, 0,
4772 140, 0, 0, 0, 0, 0, 0, 0, 0, 877,
4773 877, 0, 0, 239, 877, 0, 0, 0, 0, 0,
4774 0, 0, 0, 0, 0, 877, 877, 0, 0, 239,
4775 0, 239, 0, 0, 0, 0, 0, 0, 787, 787,
4776 0, 140, 0, 877, 0, 0, 0, 0, 0, 0,
4777 0, 0, 0, 0, 0, 0, 140, 0, 0, 0,
4778 -4, 3, 0, 4, 5, 6, 7, 8, -4, -4,
4779 -4, 9, 10, 0, -4, -4, 11, -4, 12, 13,
4780 14, 15, 16, 17, 18, -4, 0, 0, 0, 239,
4781 19, 20, 21, 22, 23, 24, 25, 0, 0, 26,
4782 0, 0, 0, 0, 0, 27, 28, 284, 30, 31,
4783 32, 33, 34, 35, 36, 37, 38, 39, 239, 40,
4784 41, 42, 43, 44, 45, 46, 0, 0, -4, 0,
4785 0, 0, 0, 0, 140, 0, 47, 48, 0, 0,
4786 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4787 239, 49, 50, 0, 0, 0, 0, 0, 0, 51,
4788 0, 0, 52, 53, 54, 55, 0, 56, 239, 0,
4789 57, 58, 59, 60, 61, 62, 63, 64, 65, 0,
4790 -4, 0, 0, 0, 140, 0, 0, 0, 0, 0,
4791 0, 0, 0, 0, 0, 0, 0, 0, 877, 0,
4792 0, 0, 0, 0, 0, 0, 0, 66, 67, 68,
4793 0, 0, -4, 22, 23, 24, 25, 0, -4, 0,
4794 546, 0, 0, 0, 0, 0, 0, 0, 0, 31,
4795 32, 33, 1098, 0, 0, 0, 1099, 0, 0, 40,
4796 41, 42, 43, 44, 0, 787, 0, 0, 0, 0,
4797 0, 0, 0, 0, 239, 0, 0, 0, 0, 0,
4798 0, 0, 239, 0, 0, 0, 1035, 877, 877, 0,
4799 0, 1101, 1102, 877, 877, 0, 0, 239, 0, 1103,
4800 0, 0, 1104, 0, 1105, 1106, 0, 0, 0, 239,
4801 57, 58, 59, 60, 61, 62, 63, 64, 65, 0,
4802 0, 0, 0, 0, 0, 0, 0, 877, 877, 0,
4803 877, 877, 0, 239, 0, 787, 0, 0, 0, 0,
4804 1109, 0, 0, 0, 0, 0, 0, 304, 0, 0,
4805 0, 0, 0, 0, 1089, 1090, 0, 0, 239, 0,
4806 0, 0, 877, 1096, -854, 3, 0, 4, 5, 6,
4807 7, 8, 0, 0, 0, 9, 10, 877, 0, 0,
4808 11, 0, 12, 13, 14, 15, 16, 17, 18, 0,
4809 0, 0, 0, 239, 19, 20, 21, 22, 23, 24,
4810 25, 877, 0, 26, 0, 0, 0, 0, 0, 27,
4811 28, 284, 30, 31, 32, 33, 34, 35, 36, 37,
4812 38, 39, 0, 40, 41, 42, 43, 44, 45, 46,
4813 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4814 47, 48, 0, 0, 0, 0, 0, 0, 0, 0,
4815 0, 0, 0, 0, 0, 49, 50, 0, 0, 0,
4816 0, 0, 0, 51, 0, 0, 52, 53, 54, 55,
4817 0, 56, 0, 0, 57, 58, 59, 60, 61, 62,
4818 63, 64, 65, 0, -854, 0, 0, 0, 0, 0,
4819 0, 239, 0, 0, 0, 0, 0, 0, 0, 0,
4820 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4821 0, 66, 67, 68, 0, 0, -854, 3, -854, 4,
4822 5, 6, 7, 8, -854, 0, 0, 9, 10, 0,
4823 0, 0, 11, 0, 12, 13, 14, 15, 16, 17,
4824 18, 0, 0, 0, 0, 0, 19, 20, 21, 22,
4825 23, 24, 25, 0, 0, 26, 0, 0, 0, 0,
4826 0, 27, 28, 29, 30, 31, 32, 33, 34, 35,
4827 36, 37, 38, 39, 0, 40, 41, 42, 43, 44,
4828 45, 46, 0, 0, 0, 0, 0, 0, 0, 0,
4829 0, 0, 47, 48, 0, 0, 0, 0, 0, 0,
4830 0, 0, 0, 0, 0, 0, 0, 49, 50, 0,
4831 0, 0, 0, 0, 0, 51, 0, 0, 52, 53,
4832 54, 55, 0, 56, 0, 0, 57, 58, 59, 60,
4833 61, 62, 63, 64, 65, 0, 0, 0, 0, 0,
4834 0, 0, 0, 0, 239, 0, 0, 0, 0, 0,
4835 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4836 0, 0, 0, 66, 67, 68, 0, 0, -4, 3,
4837 -854, 4, 5, 6, 7, 8, -854, 0, 0, 9,
4838 10, 0, 0, 0, 11, 0, 12, 13, 14, 15,
4839 16, 17, 18, 0, 0, 0, 0, 0, 19, 20,
4840 21, 22, 23, 24, 25, 0, 0, 26, 0, 0,
4841 0, 0, 0, 27, 28, 29, 30, 31, 32, 33,
4842 34, 35, 36, 37, 38, 39, 0, 40, 41, 42,
4843 43, 44, 45, 46, 0, 0, 0, 0, 0, 0,
4844 0, 0, 0, 0, 47, 48, 0, 0, 0, 0,
4845 0, 0, 0, 0, 0, 0, 0, 0, 0, 49,
4846 50, 0, 0, 0, 0, 0, 0, 51, 0, 0,
4847 52, 53, 54, 55, 0, 56, 0, 0, 57, 58,
4848 59, 60, 61, 62, 63, 64, 65, 0, 0, 0,
4849 0, 0, 0, 0, 0, 0, -836, 0, 0, 0,
4850 0, 0, 0, 0, -836, -836, -836, 0, 0, -836,
4851 -836, -836, 0, -836, 0, 66, 67, 68, 0, 0,
4852 -4, -836, -836, -836, -836, -836, 0, 0, 546, 0,
4853 0, 0, 0, -836, -836, 0, -836, -836, -836, -836,
4854 -836, 0, 0, 0, 368, 369, 370, 371, 372, 373,
4855 374, 375, 376, 377, 378, 379, 380, 0, 0, 0,
4856 0, 381, 382, 0, -836, -836, 0, 0, 0, 0,
4857 0, 0, 0, 0, -836, -836, -836, -836, -836, -836,
4858 -836, -836, -836, -836, -836, -836, -836, 0, 0, 0,
4859 0, -836, -836, -836, -836, 0, 885, -836, 0, 0,
4860 0, 384, -836, 385, 386, 387, 388, 389, 390, 391,
4861 392, 393, 394, 0, 0, 0, -836, 0, 0, -836,
4862 259, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4863 -146, -836, -836, -836, -836, -836, -836, -836, -836, -836,
4864 -836, -836, -836, 0, 0, 0, 0, -836, -836, -836,
4865 -836, -836, -700, 0, -836, -836, -836, 0, 0, 0,
4866 -700, -700, -700, 0, 0, -700, -700, -700, 0, -700,
4867 0, 0, 0, 0, 0, 0, 0, -700, 0, -700,
4868 -700, -700, 0, 0, 0, 0, 0, 0, 0, -700,
4869 -700, 0, -700, -700, -700, -700, -700, 0, 0, 0,
4870 368, 369, 370, 371, 372, 373, 374, 375, 376, 377,
4871 378, 379, 380, 0, 0, 0, 0, 381, 382, 0,
4872 -700, -700, 0, 0, 0, 0, 0, 0, 0, 0,
4873 -700, -700, -700, -700, -700, -700, -700, -700, -700, -700,
4874 -700, -700, -700, 0, 0, 0, 0, -700, -700, -700,
4875 -700, 0, -700, -700, 0, 0, 0, 384, -700, 385,
4876 386, 387, 388, 389, 390, 391, 392, 393, 394, 0,
4877 0, 0, -700, 0, 0, -700, 0, 0, 0, 0,
4878 0, 0, 0, 0, 0, 0, -700, -700, -700, -700,
4879 -700, -700, -700, -700, -700, -700, -700, -700, -700, 0,
4880 0, 0, 0, 0, -700, -700, -700, -700, -701, 0,
4881 -700, -700, -700, 0, 0, 0, -701, -701, -701, 0,
4882 0, -701, -701, -701, 0, -701, 0, 0, 0, 0,
4883 0, 0, 0, -701, 0, -701, -701, -701, 0, 0,
4884 0, 0, 0, 0, 0, -701, -701, 0, -701, -701,
4885 -701, -701, -701, 0, 0, 0, 368, 369, 370, 371,
4886 372, 373, 374, 375, 376, 377, 378, -855, -855, 0,
4887 0, 0, 0, 381, 382, 0, -701, -701, 0, 0,
4888 0, 0, 0, 0, 0, 0, -701, -701, -701, -701,
4889 -701, -701, -701, -701, -701, -701, -701, -701, -701, 0,
4890 0, 0, 0, -701, -701, -701, -701, 0, -701, -701,
4891 0, 0, 0, 0, -701, 385, 386, 387, 388, 389,
4892 390, 391, 392, 393, 394, 0, 0, 0, -701, 0,
4893 0, -701, 0, 0, 0, 0, 0, 0, 0, 0,
4894 0, 0, -701, -701, -701, -701, -701, -701, -701, -701,
4895 -701, -701, -701, -701, -701, 0, 0, 0, 0, 0,
4896 -701, -701, -701, -701, -837, 0, -701, -701, -701, 0,
4897 0, 0, -837, -837, -837, 0, 0, -837, -837, -837,
4898 0, -837, 0, 0, 0, 0, 0, 0, 0, -837,
4899 -837, -837, -837, -837, 0, 0, 0, 0, 0, 0,
4900 0, -837, -837, 0, -837, -837, -837, -837, -837, 0,
4901 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4902 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4903 0, 0, -837, -837, 0, 0, 0, 0, 0, 0,
4904 0, 0, -837, -837, -837, -837, -837, -837, -837, -837,
4905 -837, -837, -837, -837, -837, 0, 0, 0, 0, -837,
4906 -837, -837, -837, 0, 0, -837, 0, 0, 0, 0,
4907 -837, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4908 0, 0, 0, 0, -837, 0, 0, -837, 0, 0,
4909 0, 0, 0, 0, 0, 0, 0, 0, 0, -837,
4910 -837, -837, -837, -837, -837, -837, -837, -837, -837, -837,
4911 -837, 0, 0, 0, 0, -837, -837, -837, -837, -837,
4912 -838, 0, -837, -837, -837, 0, 0, 0, -838, -838,
4913 -838, 0, 0, -838, -838, -838, 0, -838, 0, 0,
4914 0, 0, 0, 0, 0, -838, -838, -838, -838, -838,
4915 0, 0, 0, 0, 0, 0, 0, -838, -838, 0,
4916 -838, -838, -838, -838, -838, 0, 0, 0, 0, 0,
4917 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4918 0, 0, 0, 0, 0, 0, 0, 0, -838, -838,
4919 0, 0, 0, 0, 0, 0, 0, 0, -838, -838,
4920 -838, -838, -838, -838, -838, -838, -838, -838, -838, -838,
4921 -838, 0, 0, 0, 0, -838, -838, -838, -838, 0,
4922 0, -838, 0, 0, 0, 0, -838, 0, 0, 0,
4923 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4924 -838, 0, 0, -838, 0, 0, 0, 0, 0, 0,
4925 0, 0, 0, 0, 0, -838, -838, -838, -838, -838,
4926 -838, -838, -838, -838, -838, -838, -838, 0, 0, 0,
4927 0, -838, -838, -838, -838, -838, -514, 0, -838, -838,
4928 -838, 0, 0, 0, -514, -514, -514, 0, 0, -514,
4929 -514, -514, 0, -514, 0, 0, 0, 0, 0, 0,
4930 0, -514, -514, -514, -514, 0, 0, 0, 0, 0,
4931 0, 0, 0, -514, -514, 0, -514, -514, -514, -514,
4932 -514, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4933 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4934 0, 0, 0, 0, -514, -514, 0, 0, 0, 0,
4935 0, 0, 0, 0, -514, -514, -514, -514, -514, -514,
4936 -514, -514, -514, -514, -514, -514, -514, 0, 0, 0,
4937 0, -514, -514, -514, -514, 0, 0, -514, 0, 0,
4938 0, 0, -514, 0, 0, 0, 0, 0, 0, 0,
4939 0, 0, 0, 0, 0, 0, -514, 0, 0, 0,
4940 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4941 0, -514, 0, -514, -514, -514, -514, -514, -514, -514,
4942 -514, -514, -514, 0, 0, 0, 0, -514, -514, -514,
4943 -514, -514, -350, 255, -514, -514, -514, 0, 0, 0,
4944 -350, -350, -350, 0, 0, -350, -350, -350, 0, -350,
4945 0, 0, 0, 0, 0, 0, 0, -350, 0, -350,
4946 -350, -350, 0, 0, 0, 0, 0, 0, 0, -350,
4947 -350, 0, -350, -350, -350, -350, -350, 0, 0, 0,
4948 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4949 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4950 -350, -350, 0, 0, 0, 0, 0, 0, 0, 0,
4951 -350, -350, -350, -350, -350, -350, -350, -350, -350, -350,
4952 -350, -350, -350, 0, 0, 0, 0, -350, -350, -350,
4953 -350, 0, 0, -350, 0, 0, 0, 0, -350, 0,
4954 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4955 0, 0, -350, 0, 0, -350, 0, 0, 0, 0,
4956 0, 0, 0, 0, 0, 0, 0, -350, -350, -350,
4957 -350, -350, -350, -350, -350, -350, -350, -350, -350, 0,
4958 0, 0, 0, 0, -350, -350, -350, -350, -854, 0,
4959 -350, -350, -350, 0, 0, 0, -854, -854, -854, 0,
4960 0, -854, -854, -854, 0, -854, 0, 0, 0, 0,
4961 0, 0, 0, -854, -854, -854, -854, 0, 0, 0,
4962 0, 0, 0, 0, 0, -854, -854, 0, -854, -854,
4963 -854, -854, -854, 0, 0, 0, 0, 0, 0, 0,
4964 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4965 0, 0, 0, 0, 0, 0, -854, -854, 0, 0,
4966 0, 0, 0, 0, 0, 0, -854, -854, -854, -854,
4967 -854, -854, -854, -854, -854, -854, -854, -854, -854, 0,
4968 0, 0, 0, -854, -854, -854, -854, 0, 0, -854,
4969 0, 0, 0, 0, -854, 0, 0, 0, 0, 0,
4970 0, 0, 0, 0, 0, 0, 0, 0, -854, 0,
4971 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4972 0, 0, 0, -854, 0, -854, -854, -854, -854, -854,
4973 -854, -854, -854, -854, -854, 0, 0, 0, 0, -854,
4974 -854, -854, -854, -854, -356, 255, -854, -854, -854, 0,
4975 0, 0, -356, -356, -356, 0, 0, -356, -356, -356,
4976 0, -356, 0, 0, 0, 0, 0, 0, 0, -356,
4977 0, -356, -356, 0, 0, 0, 0, 0, 0, 0,
4978 0, -356, -356, 0, -356, -356, -356, -356, -356, 0,
4979 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4980 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4981 0, 0, -356, -356, 0, 0, 0, 0, 0, 0,
4982 0, 0, -356, -356, -356, -356, -356, -356, -356, -356,
4983 -356, -356, -356, -356, -356, 0, 0, 0, 0, -356,
4984 -356, -356, -356, 0, 886, -356, 0, 0, 0, 0,
4985 -356, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4986 0, 0, 0, 0, -356, 0, 0, 0, 0, 0,
4987 0, 0, 0, 0, 0, 0, 0, 0, -147, -356,
4988 0, -356, -356, -356, -356, -356, -356, -356, -356, -356,
4989 -356, 0, 0, 0, 0, 829, -356, -356, -356, -356,
4990 -363, 0, -356, -356, -356, 0, 0, 0, -363, -363,
4991 -363, 0, 0, -363, -363, -363, 0, -363, 0, 0,
4992 0, 0, 0, 0, 0, -363, 0, -363, -363, 0,
4993 0, 0, 0, 0, 0, 0, 0, -363, -363, 0,
4994 -363, -363, -363, -363, -363, 0, 0, 0, 0, 0,
4995 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4996 0, 0, 0, 0, 0, 0, 0, 0, -363, -363,
4997 0, 0, 0, 0, 0, 0, 0, 0, -363, -363,
4998 -363, -363, -363, -363, -363, -363, -363, -363, -363, -363,
4999 -363, 0, 0, 0, 0, -363, -363, -363, -363, 0,
5000 0, -363, 0, 0, 0, 0, -363, 0, 0, 0,
5001 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5002 -363, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5003 0, 0, 0, 0, 0, -363, 0, -363, -363, -363,
5004 -363, -363, -363, -363, -363, -363, -363, 0, 0, 0,
5005 0, 0, -363, -363, -363, -363, -836, 451, -363, -363,
5006 -363, 0, 0, 0, -836, -836, -836, 0, 0, 0,
5007 -836, -836, 0, -836, 0, 0, 0, 0, 0, 0,
5008 0, -836, -836, 0, 0, 0, 0, 0, 0, 0,
5009 0, 0, 0, -836, -836, 0, -836, -836, -836, -836,
5010 -836, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5011 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5012 0, 0, 0, 0, -836, -836, 0, 0, 0, 0,
5013 0, 0, 0, 0, -836, -836, -836, -836, -836, -836,
5014 -836, -836, -836, -836, -836, -836, -836, 0, 0, 0,
5015 0, -836, -836, -836, -836, 0, 827, -836, 0, 0,
5016 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5017 0, 0, 0, 0, 0, 0, -836, 0, 0, 0,
5018 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5019 -146, -836, 0, -836, -836, -836, -836, -836, -836, -836,
5020 -836, -836, -836, 0, 0, 0, 0, -836, -836, -836,
5021 -836, -137, -836, 0, -836, 0, -836, 0, 0, 0,
5022 -836, -836, -836, 0, 0, 0, -836, -836, 0, -836,
5023 0, 0, 0, 0, 0, 0, 0, -836, -836, 0,
5024 0, 0, 0, 0, 0, 0, 0, 0, 0, -836,
5025 -836, 0, -836, -836, -836, -836, -836, 0, 0, 0,
5026 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5027 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5028 -836, -836, 0, 0, 0, 0, 0, 0, 0, 0,
5029 -836, -836, -836, -836, -836, -836, -836, -836, -836, -836,
5030 -836, -836, -836, 0, 0, 0, 0, -836, -836, -836,
5031 -836, 0, 827, -836, 0, 0, 0, 0, 0, 0,
5032 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5033 0, 0, -836, 0, 0, 0, 0, 0, 0, 0,
5034 0, 0, 0, 0, 0, 0, -146, -836, 0, -836,
5035 -836, -836, -836, -836, -836, -836, -836, -836, -836, 0,
5036 0, 0, 0, -836, -836, -836, -836, -836, -356, 0,
5037 -836, 0, -836, 0, 0, 0, -356, -356, -356, 0,
5038 0, 0, -356, -356, 0, -356, 0, 0, 0, 0,
5039 0, 0, 0, -356, 0, 0, 0, 0, 0, 0,
5040 0, 0, 0, 0, 0, -356, -356, 0, -356, -356,
5041 -356, -356, -356, 0, 0, 0, 0, 0, 0, 0,
5042 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5043 0, 0, 0, 0, 0, 0, -356, -356, 0, 0,
5044 0, 0, 0, 0, 0, 0, -356, -356, -356, -356,
5045 -356, -356, -356, -356, -356, -356, -356, -356, -356, 0,
5046 0, 0, 0, -356, -356, -356, -356, 0, 828, -356,
5047 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5048 0, 0, 0, 0, 0, 0, 0, 0, -356, 0,
5049 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5050 0, 0, -147, -356, 0, -356, -356, -356, -356, -356,
5051 -356, -356, -356, -356, -356, 0, 0, 0, 0, 829,
5052 -356, -356, -356, -138, -356, 0, -356, 0, -356, 0,
5053 0, 0, -356, -356, -356, 0, 0, 0, -356, -356,
5054 0, -356, 0, 0, 0, 0, 0, 0, 0, -356,
5055 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5056 0, -356, -356, 0, -356, -356, -356, -356, -356, 0,
5057 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5058 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5059 0, 0, -356, -356, 0, 0, 0, 0, 0, 0,
5060 0, 0, -356, -356, -356, -356, -356, -356, -356, -356,
5061 -356, -356, -356, -356, -356, 0, 0, 0, 0, -356,
5062 -356, -356, -356, 0, 828, -356, 0, 0, 0, 0,
5063 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5064 0, 0, 0, 0, -356, 0, 0, 0, 0, 0,
5065 0, 0, 0, 0, 0, 0, 0, 0, -147, -356,
5066 0, -356, -356, -356, -356, -356, -356, -356, -356, -356,
5067 -356, 0, 0, 0, 0, 829, -356, -356, -356, -356,
5068 0, 0, -356, 3, -356, 4, 5, 6, 7, 8,
5069 -854, -854, -854, 9, 10, 0, 0, -854, 11, 0,
5070 12, 13, 14, 15, 16, 17, 18, 0, 0, 0,
5071 0, 0, 19, 20, 21, 22, 23, 24, 25, 0,
5072 0, 26, 0, 0, 0, 0, 0, 27, 28, 284,
5073 30, 31, 32, 33, 34, 35, 36, 37, 38, 39,
5074 0, 40, 41, 42, 43, 44, 45, 46, 0, 0,
5075 -854, 0, 0, 0, 0, 0, 0, 0, 47, 48,
5076 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5077 0, 0, 0, 49, 50, 0, 0, 0, 0, 0,
5078 0, 51, 0, 0, 52, 53, 54, 55, 0, 56,
5079 0, 0, 57, 58, 59, 60, 61, 62, 63, 64,
5080 65, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5081 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5082 0, 0, 0, 0, 0, 0, 0, 0, 0, 66,
5083 67, 68, 0, 0, 0, 3, -854, 4, 5, 6,
5084 7, 8, -854, 0, -854, 9, 10, 0, -854, -854,
5085 11, 0, 12, 13, 14, 15, 16, 17, 18, 0,
5086 0, 0, 0, 0, 19, 20, 21, 22, 23, 24,
5087 25, 0, 0, 26, 0, 0, 0, 0, 0, 27,
5088 28, 284, 30, 31, 32, 33, 34, 35, 36, 37,
5089 38, 39, 0, 40, 41, 42, 43, 44, 45, 46,
5090 0, 0, -854, 0, 0, 0, 0, 0, 0, 0,
5091 47, 48, 0, 0, 0, 0, 0, 0, 0, 0,
5092 0, 0, 0, 0, 0, 49, 50, 0, 0, 0,
5093 0, 0, 0, 51, 0, 0, 52, 53, 54, 55,
5094 0, 56, 0, 0, 57, 58, 59, 60, 61, 62,
5095 63, 64, 65, 0, 0, 0, 0, 0, 0, 0,
5096 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5097 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5098 0, 66, 67, 68, 0, 0, 0, 3, -854, 4,
5099 5, 6, 7, 8, -854, 0, -854, 9, 10, 0,
5100 0, -854, 11, -854, 12, 13, 14, 15, 16, 17,
5101 18, 0, 0, 0, 0, 0, 19, 20, 21, 22,
5102 23, 24, 25, 0, 0, 26, 0, 0, 0, 0,
5103 0, 27, 28, 284, 30, 31, 32, 33, 34, 35,
5104 36, 37, 38, 39, 0, 40, 41, 42, 43, 44,
5105 45, 46, 0, 0, -854, 0, 0, 0, 0, 0,
5106 0, 0, 47, 48, 0, 0, 0, 0, 0, 0,
5107 0, 0, 0, 0, 0, 0, 0, 49, 50, 0,
5108 0, 0, 0, 0, 0, 51, 0, 0, 52, 53,
5109 54, 55, 0, 56, 0, 0, 57, 58, 59, 60,
5110 61, 62, 63, 64, 65, 0, 0, 0, 0, 0,
5111 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5112 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5113 0, 0, 0, 66, 67, 68, 0, 0, 0, 3,
5114 -854, 4, 5, 6, 7, 8, -854, 0, -854, 9,
5115 10, 0, 0, -854, 11, 0, 12, 13, 14, 15,
5116 16, 17, 18, -854, 0, 0, 0, 0, 19, 20,
5117 21, 22, 23, 24, 25, 0, 0, 26, 0, 0,
5118 0, 0, 0, 27, 28, 284, 30, 31, 32, 33,
5119 34, 35, 36, 37, 38, 39, 0, 40, 41, 42,
5120 43, 44, 45, 46, 0, 0, -854, 0, 0, 0,
5121 0, 0, 0, 0, 47, 48, 0, 0, 0, 0,
5122 0, 0, 0, 0, 0, 0, 0, 0, 0, 49,
5123 50, 0, 0, 0, 0, 0, 0, 51, 0, 0,
5124 52, 53, 54, 55, 0, 56, 0, 0, 57, 58,
5125 59, 60, 61, 62, 63, 64, 65, 0, 0, 0,
5126 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5127 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5128 0, 0, 0, 0, 0, 66, 67, 68, 0, 0,
5129 0, 3, -854, 4, 5, 6, 7, 8, -854, 0,
5130 -854, 9, 10, 0, 0, -854, 11, 0, 12, 13,
5131 14, 15, 16, 17, 18, 0, 0, 0, 0, 0,
5132 19, 20, 21, 22, 23, 24, 25, 0, 0, 26,
5133 0, 0, 0, 0, 0, 27, 28, 284, 30, 31,
5134 32, 33, 34, 35, 36, 37, 38, 39, 0, 40,
5135 41, 42, 43, 44, 45, 46, 0, 0, -854, 0,
5136 0, 0, 0, 0, 0, 0, 47, 48, 0, 0,
5137 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5138 0, 49, 50, 0, 0, 0, 0, 0, 0, 51,
5139 0, 0, 52, 53, 54, 55, 0, 56, 0, 0,
5140 57, 58, 59, 60, 61, 62, 63, 64, 65, 0,
5141 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5142 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5143 0, 0, 0, 0, 0, 0, 0, 66, 67, 68,
5144 0, 0, 0, 3, -854, 4, 5, 6, 7, 8,
5145 -854, -854, -854, 9, 10, 0, 0, 0, 11, 0,
5146 12, 13, 14, 15, 16, 17, 18, 0, 0, 0,
5147 0, 0, 19, 20, 21, 22, 23, 24, 25, 0,
5148 0, 26, 0, 0, 0, 0, 0, 27, 28, 284,
5149 30, 31, 32, 33, 34, 35, 36, 37, 38, 39,
5150 0, 40, 41, 42, 43, 44, 45, 46, 0, 0,
5151 -854, 0, 0, 0, 0, 0, 0, 0, 47, 48,
5152 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5153 0, 0, 0, 49, 50, 0, 0, 0, 0, 0,
5154 0, 51, 0, 0, 52, 53, 54, 55, 0, 56,
5155 0, 0, 57, 58, 59, 60, 61, 62, 63, 64,
5156 65, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5157 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5158 0, 0, 0, 0, 0, 0, 0, 0, 0, 66,
5159 67, 68, 0, 0, 0, 3, -854, 4, 5, 6,
5160 7, 8, -854, 0, -854, 9, 10, 0, 0, 0,
5161 11, 0, 12, 13, 14, 15, 16, 17, 18, 0,
5162 0, 0, 0, 0, 19, 20, 21, 22, 23, 24,
5163 25, 0, 0, 26, 0, 0, 0, 0, 0, 27,
5164 28, 284, 30, 31, 32, 33, 34, 35, 36, 37,
5165 38, 39, 0, 40, 41, 42, 43, 44, 45, 46,
5166 0, 0, -854, 0, 0, 0, 0, 0, 0, 0,
5167 47, 48, 0, 0, 0, 0, 0, 0, 0, 0,
5168 0, 0, 0, 0, 0, 49, 50, 0, 0, 0,
5169 0, 0, 0, 51, 0, 0, 52, 53, 54, 55,
5170 0, 56, 0, 0, 57, 58, 59, 60, 61, 62,
5171 63, 64, 65, 0, 0, 0, 0, 0, 0, 0,
5172 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5173 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5174 0, 66, 67, 68, 0, 0, 0, 3, -854, 4,
5175 5, 6, 7, 8, -854, 0, 0, 9, 10, 0,
5176 0, 0, 11, 0, 12, 13, 14, 15, 16, 17,
5177 18, 0, 0, 0, 0, 0, 19, 20, 21, 22,
5178 23, 24, 25, 0, 0, 26, 0, 0, 0, 0,
5179 0, 27, 28, 284, 30, 31, 32, 33, 34, 35,
5180 36, 37, 38, 39, 0, 40, 41, 42, 43, 44,
5181 45, 46, 0, 0, 0, 0, 0, 0, 0, 0,
5182 0, 0, 47, 48, 0, 0, 0, 0, 0, 0,
5183 0, 0, 0, 0, 0, 0, 0, 49, 50, 0,
5184 0, 0, 0, 0, 0, 51, 0, 0, 285, 53,
5185 54, 55, 0, 56, 0, 0, 57, 58, 59, 60,
5186 61, 62, 63, 64, 65, 0, 0, 0, 0, 0,
5187 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5188 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5189 0, 0, 0, 66, 67, 68, 0, 0, 0, 0,
5190 -854, 0, 0, 0, -854, 3, -854, 4, 5, 6,
5191 7, 8, 0, 0, 0, 9, 10, 0, 0, 0,
5192 11, 0, 12, 13, 14, 15, 16, 17, 18, 0,
5193 0, 0, 0, 0, 19, 20, 21, 22, 23, 24,
5194 25, 0, 0, 26, 0, 0, 0, 0, 0, 27,
5195 28, 284, 30, 31, 32, 33, 34, 35, 36, 37,
5196 38, 39, 0, 40, 41, 42, 43, 44, 45, 46,
5197 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5198 47, 48, 0, 0, 0, 0, 0, 0, 0, 0,
5199 0, 0, 0, 0, 0, 49, 50, 0, 0, 0,
5200 0, 0, 0, 51, 0, 0, 52, 53, 54, 55,
5201 0, 56, 0, 0, 57, 58, 59, 60, 61, 62,
5202 63, 64, 65, 0, 0, 0, 0, 0, 0, 0,
5203 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5204 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5205 0, 66, 67, 68, 0, 0, 0, 0, -854, 0,
5206 0, 0, -854, 3, -854, 4, 5, 6, 7, 8,
5207 0, 0, 0, 9, 10, 0, 0, 0, 11, 0,
5208 12, 13, 14, 15, 16, 17, 18, 0, 0, 0,
5209 0, 0, 19, 20, 21, 22, 23, 24, 25, 0,
5210 0, 26, 0, 0, 0, 0, 0, 27, 28, 29,
5211 30, 31, 32, 33, 34, 35, 36, 37, 38, 39,
5212 0, 40, 41, 42, 43, 44, 45, 46, 0, 0,
5213 0, 0, 0, 0, 0, 0, 0, 0, 47, 48,
5214 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5215 0, 0, 0, 49, 50, 0, 0, 0, 0, 0,
5216 0, 51, 0, 0, 52, 53, 54, 55, 0, 56,
5217 0, 0, 57, 58, 59, 60, 61, 62, 63, 64,
5218 65, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5219 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5220 0, 0, 0, 0, 0, 0, 0, 0, 0, 66,
5221 67, 68, 0, 0, -854, 3, -854, 4, 5, 6,
5222 7, 8, -854, 0, 0, 9, 10, 0, 0, 0,
5223 11, 0, 12, 13, 14, 15, 16, 17, 18, 0,
5224 0, 0, 0, 0, 19, 20, 21, 22, 23, 24,
5225 25, 0, 0, 26, 0, 0, 0, 0, 0, 27,
5226 28, 284, 30, 31, 32, 33, 34, 35, 36, 37,
5227 38, 39, 0, 40, 41, 42, 43, 44, 45, 46,
5228 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5229 47, 48, 0, 0, 0, 0, 0, 0, 0, 0,
5230 0, 0, 0, 0, 0, 49, 50, 0, 0, 0,
5231 0, 0, 0, 51, 0, 0, 52, 53, 54, 55,
5232 0, 56, 0, 0, 57, 58, 59, 60, 61, 62,
5233 63, 64, 65, 0, 0, 0, 0, 0, 0, 0,
5234 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5235 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5236 0, 66, 67, 68, 0, 0, -854, 404, -854, 4,
5237 5, 6, 0, 8, -854, 0, 0, 9, 10, 0,
5238 0, 0, 11, -3, 12, 13, 14, 15, 16, 17,
5239 18, 0, 0, 0, 0, 0, 19, 20, 21, 22,
5240 23, 24, 25, 0, 0, 26, 0, 0, 0, 0,
5241 0, 0, 28, 0, 0, 31, 32, 33, 34, 35,
5242 36, 37, 38, 39, 0, 40, 41, 42, 43, 44,
5243 45, 46, 0, 0, 0, 0, 0, 0, 0, 0,
5244 0, 0, 47, 48, 0, 0, 0, 0, 0, 0,
5245 0, 0, 0, 0, 0, 0, 0, 49, 50, 0,
5246 0, 0, 0, 0, 0, 229, 0, 0, 230, 53,
5247 54, 55, 0, 0, 0, 0, 57, 58, 59, 60,
5248 61, 62, 63, 64, 65, 0, 0, 0, 0, 0,
5249 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5250 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5251 0, 0, 0, 66, 67, 68, 0, 0, 0, 0,
5252 331, 0, 0, 0, 0, 0, 332, 144, 145, 146,
5253 147, 148, 149, 150, 151, 152, 153, 154, 155, 156,
5254 157, 158, 159, 160, 161, 162, 163, 164, 165, 166,
5255 167, 0, 0, 0, 168, 169, 170, 434, 435, 436,
5256 437, 175, 176, 177, 0, 0, 0, 0, 0, 178,
5257 179, 180, 181, 438, 439, 440, 441, 186, 36, 37,
5258 442, 39, 0, 0, 0, 0, 0, 0, 0, 0,
5259 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5260 188, 189, 190, 191, 192, 193, 194, 195, 196, 0,
5261 0, 197, 198, 0, 0, 0, 0, 199, 200, 201,
5262 202, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5263 0, 203, 204, 0, 0, 0, 0, 0, 0, 0,
5264 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5265 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5266 0, 205, 206, 207, 208, 209, 210, 211, 212, 213,
5267 214, 0, 215, 216, 0, 0, 0, 0, 0, 0,
5268 217, 443, 144, 145, 146, 147, 148, 149, 150, 151,
5269 152, 153, 154, 155, 156, 157, 158, 159, 160, 161,
5270 162, 163, 164, 165, 166, 167, 0, 0, 0, 168,
5271 169, 170, 171, 172, 173, 174, 175, 176, 177, 0,
5272 0, 0, 0, 0, 178, 179, 180, 181, 182, 183,
5273 184, 185, 186, 36, 37, 187, 39, 0, 0, 0,
5274 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5275 0, 0, 0, 0, 0, 188, 189, 190, 191, 192,
5276 193, 194, 195, 196, 0, 0, 197, 198, 0, 0,
5277 0, 0, 199, 200, 201, 202, 0, 0, 0, 0,
5278 0, 0, 0, 0, 0, 0, 203, 204, 0, 0,
5279 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5280 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5281 0, 0, 0, 0, 0, 0, 205, 206, 207, 208,
5282 209, 210, 211, 212, 213, 214, 0, 215, 216, 0,
5283 0, 0, 0, 0, 0, 217, 144, 145, 146, 147,
5284 148, 149, 150, 151, 152, 153, 154, 155, 156, 157,
5285 158, 159, 160, 161, 162, 163, 164, 165, 166, 167,
5286 0, 0, 0, 168, 169, 170, 171, 172, 173, 174,
5287 175, 176, 177, 0, 0, 0, 0, 0, 178, 179,
5288 180, 181, 182, 183, 184, 185, 186, 262, 0, 187,
5289 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5290 0, 0, 0, 0, 0, 0, 0, 0, 0, 188,
5291 189, 190, 191, 192, 193, 194, 195, 196, 0, 0,
5292 197, 198, 0, 0, 0, 0, 199, 200, 201, 202,
5293 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5294 203, 204, 0, 0, 58, 0, 0, 0, 0, 0,
5295 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5296 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5297 205, 206, 207, 208, 209, 210, 211, 212, 213, 214,
5298 0, 215, 216, 0, 0, 0, 0, 0, 0, 217,
5299 144, 145, 146, 147, 148, 149, 150, 151, 152, 153,
5300 154, 155, 156, 157, 158, 159, 160, 161, 162, 163,
5301 164, 165, 166, 167, 0, 0, 0, 168, 169, 170,
5302 171, 172, 173, 174, 175, 176, 177, 0, 0, 0,
5303 0, 0, 178, 179, 180, 181, 182, 183, 184, 185,
5304 186, 0, 0, 187, 0, 0, 0, 0, 0, 0,
5305 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5306 0, 0, 0, 188, 189, 190, 191, 192, 193, 194,
5307 195, 196, 0, 0, 197, 198, 0, 0, 0, 0,
5308 199, 200, 201, 202, 0, 0, 0, 0, 0, 0,
5309 0, 0, 0, 0, 203, 204, 0, 0, 58, 0,
5310 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5311 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5312 0, 0, 0, 0, 205, 206, 207, 208, 209, 210,
5313 211, 212, 213, 214, 0, 215, 216, 0, 0, 0,
5314 0, 0, 0, 217, 144, 145, 146, 147, 148, 149,
5315 150, 151, 152, 153, 154, 155, 156, 157, 158, 159,
5316 160, 161, 162, 163, 164, 165, 166, 167, 0, 0,
5317 0, 168, 169, 170, 171, 172, 173, 174, 175, 176,
5318 177, 0, 0, 0, 0, 0, 178, 179, 180, 181,
5319 182, 183, 184, 185, 186, 0, 0, 187, 0, 0,
5320 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5321 0, 0, 0, 0, 0, 0, 0, 188, 189, 190,
5322 191, 192, 193, 194, 195, 196, 0, 0, 197, 198,
5323 0, 0, 0, 0, 199, 200, 201, 202, 0, 0,
5324 0, 0, 0, 0, 0, 0, 0, 0, 203, 204,
5325 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5326 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5327 0, 0, 0, 0, 0, 0, 0, 0, 205, 206,
5328 207, 208, 209, 210, 211, 212, 213, 214, 0, 215,
5329 216, 4, 5, 6, 0, 8, 0, 217, 0, 9,
5330 10, 0, 0, 0, 11, 0, 12, 13, 14, 270,
5331 271, 17, 18, 0, 0, 0, 0, 0, 19, 20,
5332 272, 22, 23, 24, 25, 0, 0, 227, 0, 0,
5333 0, 0, 0, 0, 302, 0, 0, 31, 32, 33,
5334 34, 35, 36, 37, 38, 39, 0, 40, 41, 42,
5335 43, 44, 45, 46, 0, 0, 0, 0, 0, 0,
5336 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5337 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5338 0, 0, 0, 0, 0, 0, 0, 303, 0, 0,
5339 230, 53, 54, 55, 0, 0, 0, 0, 57, 58,
5340 59, 60, 61, 62, 63, 64, 65, 0, 0, 4,
5341 5, 6, 0, 8, 0, 0, 0, 9, 10, 0,
5342 0, 0, 11, 0, 12, 13, 14, 270, 271, 17,
5343 18, 0, 0, 0, 0, 304, 19, 20, 272, 22,
5344 23, 24, 25, 305, 0, 227, 0, 0, 0, 0,
5345 0, 0, 302, 0, 0, 31, 32, 33, 34, 35,
5346 36, 37, 38, 39, 0, 40, 41, 42, 43, 44,
5347 45, 46, 0, 0, 0, 0, 0, 0, 0, 0,
5348 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5349 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5350 0, 0, 0, 0, 0, 303, 0, 0, 230, 53,
5351 54, 55, 0, 0, 0, 0, 57, 58, 59, 60,
5352 61, 62, 63, 64, 65, 0, 0, 4, 5, 6,
5353 0, 8, 0, 0, 0, 9, 10, 0, 0, 0,
5354 11, 0, 12, 13, 14, 15, 16, 17, 18, 0,
5355 0, 0, 0, 304, 19, 20, 21, 22, 23, 24,
5356 25, 612, 0, 227, 0, 0, 0, 0, 0, 0,
5357 28, 0, 0, 31, 32, 33, 34, 35, 36, 37,
5358 38, 39, 228, 40, 41, 42, 43, 44, 45, 46,
5359 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5360 47, 48, 0, 0, 0, 0, 0, 0, 0, 0,
5361 0, 0, 0, 0, 0, 49, 50, 0, 0, 0,
5362 0, 0, 0, 229, 0, 0, 230, 53, 54, 55,
5363 0, 231, 232, 233, 57, 58, 234, 60, 61, 62,
5364 63, 64, 65, 0, 0, 0, 0, 0, 0, 0,
5365 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5366 0, 0, 0, 0, 0, 0, 4, 5, 6, 0,
5367 8, 66, 235, 68, 9, 10, 0, 0, 259, 11,
5368 0, 12, 13, 14, 15, 16, 17, 18, 0, 0,
5369 0, 0, 0, 19, 20, 21, 22, 23, 24, 25,
5370 0, 0, 26, 0, 0, 0, 0, 0, 0, 28,
5371 0, 0, 31, 32, 33, 34, 35, 36, 37, 38,
5372 39, 0, 40, 41, 42, 43, 44, 45, 46, 0,
5373 0, 0, 0, 0, 0, 0, 0, 0, 0, 47,
5374 48, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5375 0, 0, 0, 0, 49, 50, 0, 0, 0, 0,
5376 0, 0, 229, 0, 0, 230, 53, 54, 55, 0,
5377 0, 0, 0, 57, 58, 59, 60, 61, 62, 63,
5378 64, 65, 0, 0, 0, 0, 0, 0, 0, 0,
5379 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5380 0, 0, 0, 3, 0, 4, 5, 6, 7, 8,
5381 66, 67, 68, 9, 10, 0, 0, 259, 11, 0,
5382 12, 13, 14, 15, 16, 17, 18, 0, 0, 0,
5383 0, 0, 19, 20, 21, 22, 23, 24, 25, 0,
5384 0, 26, 0, 0, 0, 0, 0, 27, 28, 0,
5385 30, 31, 32, 33, 34, 35, 36, 37, 38, 39,
5386 0, 40, 41, 42, 43, 44, 45, 46, 0, 0,
5387 0, 0, 0, 0, 0, 0, 0, 0, 47, 48,
5388 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5389 0, 0, 0, 49, 50, 0, 0, 0, 0, 0,
5390 0, 51, 0, 0, 52, 53, 54, 55, 0, 56,
5391 0, 0, 57, 58, 59, 60, 61, 62, 63, 64,
5392 65, 0, 0, 404, 0, 4, 5, 6, 0, 8,
5393 0, 0, 0, 9, 10, 0, 0, 0, 11, 0,
5394 12, 13, 14, 15, 16, 17, 18, 0, 0, 66,
5395 67, 68, 19, 20, 21, 22, 23, 24, 25, 0,
5396 0, 26, 0, 0, 0, 0, 0, 0, 28, 0,
5397 0, 31, 32, 33, 34, 35, 36, 37, 38, 39,
5398 0, 40, 41, 42, 43, 44, 45, 46, 0, 0,
5399 0, 0, 0, 0, 0, 0, 0, 0, 47, 48,
5400 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5401 0, 0, 0, 49, 50, 0, 0, 0, 0, 0,
5402 0, 229, 0, 0, 230, 53, 54, 55, 0, 0,
5403 0, 0, 57, 58, 59, 60, 61, 62, 63, 64,
5404 65, 0, 0, 0, 0, 4, 5, 6, 0, 8,
5405 0, 0, 0, 9, 10, 0, 0, 0, 11, 0,
5406 12, 13, 14, 15, 16, 17, 18, 0, 0, 66,
5407 67, 68, 19, 20, 21, 22, 23, 24, 25, 0,
5408 0, 227, 0, 0, 0, 0, 0, 0, 28, 0,
5409 0, 31, 32, 33, 34, 35, 36, 37, 38, 39,
5410 228, 40, 41, 42, 43, 44, 45, 46, 0, 0,
5411 0, 0, 0, 0, 0, 0, 0, 0, 47, 48,
5412 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5413 0, 0, 0, 49, 50, 0, 0, 0, 0, 0,
5414 0, 229, 0, 0, 230, 53, 54, 55, 0, 231,
5415 232, 233, 57, 58, 234, 60, 61, 62, 63, 64,
5416 65, 0, 0, 0, 0, 4, 5, 6, 0, 8,
5417 0, 0, 0, 9, 10, 0, 0, 0, 11, 0,
5418 12, 13, 14, 15, 16, 17, 18, 0, 0, 66,
5419 235, 68, 19, 20, 21, 22, 23, 24, 25, 0,
5420 0, 227, 0, 0, 0, 0, 0, 0, 28, 0,
5421 0, 31, 32, 33, 34, 35, 36, 37, 38, 39,
5422 228, 40, 41, 42, 43, 44, 45, 46, 0, 0,
5423 0, 0, 0, 0, 0, 0, 0, 0, 47, 48,
5424 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5425 0, 0, 0, 49, 479, 0, 0, 0, 0, 0,
5426 0, 229, 0, 0, 230, 53, 54, 55, 0, 231,
5427 232, 233, 57, 58, 234, 60, 61, 62, 63, 64,
5428 65, 0, 0, 0, 0, 4, 5, 6, 0, 8,
5429 0, 0, 0, 9, 10, 0, 0, 0, 11, 0,
5430 12, 13, 14, 270, 271, 17, 18, 0, 0, 66,
5431 235, 68, 19, 20, 272, 22, 23, 24, 25, 0,
5432 0, 227, 0, 0, 0, 0, 0, 0, 28, 0,
5433 0, 31, 32, 33, 34, 35, 36, 37, 38, 39,
5434 228, 40, 41, 42, 43, 44, 45, 46, 0, 0,
5435 0, 0, 0, 0, 0, 0, 0, 0, 47, 48,
5436 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5437 0, 0, 0, 49, 50, 0, 0, 0, 0, 0,
5438 0, 229, 0, 0, 230, 53, 54, 55, 0, 231,
5439 232, 233, 57, 58, 234, 60, 61, 62, 63, 64,
5440 65, 0, 0, 0, 0, 4, 5, 6, 0, 8,
5441 0, 0, 0, 9, 10, 0, 0, 0, 11, 0,
5442 12, 13, 14, 270, 271, 17, 18, 0, 0, 66,
5443 235, 68, 19, 20, 272, 22, 23, 24, 25, 0,
5444 0, 227, 0, 0, 0, 0, 0, 0, 28, 0,
5445 0, 31, 32, 33, 34, 35, 36, 37, 38, 39,
5446 228, 40, 41, 42, 43, 44, 45, 46, 0, 0,
5447 0, 0, 0, 0, 0, 0, 0, 0, 47, 48,
5448 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5449 0, 0, 0, 49, 479, 0, 0, 0, 0, 0,
5450 0, 229, 0, 0, 230, 53, 54, 55, 0, 231,
5451 232, 233, 57, 58, 234, 60, 61, 62, 63, 64,
5452 65, 0, 0, 0, 0, 4, 5, 6, 0, 8,
5453 0, 0, 0, 9, 10, 0, 0, 0, 11, 0,
5454 12, 13, 14, 270, 271, 17, 18, 0, 0, 66,
5455 235, 68, 19, 20, 272, 22, 23, 24, 25, 0,
5456 0, 227, 0, 0, 0, 0, 0, 0, 28, 0,
5457 0, 31, 32, 33, 34, 35, 36, 37, 38, 39,
5458 228, 40, 41, 42, 43, 44, 45, 46, 0, 0,
5459 0, 0, 0, 0, 0, 0, 0, 0, 47, 48,
5460 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5461 0, 0, 0, 49, 50, 0, 0, 0, 0, 0,
5462 0, 229, 0, 0, 230, 53, 54, 55, 0, 231,
5463 232, 0, 57, 58, 234, 60, 61, 62, 63, 64,
5464 65, 0, 0, 0, 0, 4, 5, 6, 0, 8,
5465 0, 0, 0, 9, 10, 0, 0, 0, 11, 0,
5466 12, 13, 14, 270, 271, 17, 18, 0, 0, 66,
5467 235, 68, 19, 20, 272, 22, 23, 24, 25, 0,
5468 0, 227, 0, 0, 0, 0, 0, 0, 28, 0,
5469 0, 31, 32, 33, 34, 35, 36, 37, 38, 39,
5470 228, 40, 41, 42, 43, 44, 45, 46, 0, 0,
5471 0, 0, 0, 0, 0, 0, 0, 0, 47, 48,
5472 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5473 0, 0, 0, 49, 50, 0, 0, 0, 0, 0,
5474 0, 229, 0, 0, 230, 53, 54, 55, 0, 0,
5475 232, 233, 57, 58, 234, 60, 61, 62, 63, 64,
5476 65, 0, 0, 0, 0, 4, 5, 6, 0, 8,
5477 0, 0, 0, 9, 10, 0, 0, 0, 11, 0,
5478 12, 13, 14, 270, 271, 17, 18, 0, 0, 66,
5479 235, 68, 19, 20, 272, 22, 23, 24, 25, 0,
5480 0, 227, 0, 0, 0, 0, 0, 0, 28, 0,
5481 0, 31, 32, 33, 34, 35, 36, 37, 38, 39,
5482 228, 40, 41, 42, 43, 44, 45, 46, 0, 0,
5483 0, 0, 0, 0, 0, 0, 0, 0, 47, 48,
5484 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5485 0, 0, 0, 49, 50, 0, 0, 0, 0, 0,
5486 0, 229, 0, 0, 230, 53, 54, 55, 0, 0,
5487 232, 0, 57, 58, 234, 60, 61, 62, 63, 64,
5488 65, 0, 0, 0, 0, 4, 5, 6, 0, 8,
5489 0, 0, 0, 9, 10, 0, 0, 0, 11, 0,
5490 12, 13, 14, 15, 16, 17, 18, 0, 0, 66,
5491 235, 68, 19, 20, 21, 22, 23, 24, 25, 0,
5492 0, 227, 0, 0, 0, 0, 0, 0, 28, 0,
5493 0, 31, 32, 33, 34, 35, 36, 37, 38, 39,
5494 0, 40, 41, 42, 43, 44, 45, 46, 0, 0,
5495 0, 0, 0, 0, 0, 0, 0, 0, 47, 48,
5496 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5497 0, 0, 0, 49, 50, 0, 0, 0, 0, 0,
5498 0, 229, 0, 0, 230, 53, 54, 55, 0, 802,
5499 0, 0, 57, 58, 59, 60, 61, 62, 63, 64,
5500 65, 0, 0, 0, 0, 4, 5, 6, 0, 8,
5501 0, 0, 0, 9, 10, 0, 0, 0, 11, 0,
5502 12, 13, 14, 15, 16, 17, 18, 0, 0, 66,
5503 235, 68, 19, 20, 21, 22, 23, 24, 25, 0,
5504 0, 227, 0, 0, 0, 0, 0, 0, 28, 0,
5505 0, 31, 32, 33, 34, 35, 36, 37, 38, 39,
5506 0, 40, 41, 42, 43, 44, 45, 46, 0, 0,
5507 0, 0, 0, 0, 0, 0, 0, 0, 47, 48,
5508 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5509 0, 0, 0, 49, 50, 0, 0, 0, 0, 0,
5510 0, 813, 0, 0, 230, 53, 54, 55, 0, 802,
5511 0, 0, 57, 58, 59, 60, 61, 62, 63, 64,
5512 65, 0, 0, 0, 0, 4, 5, 6, 0, 8,
5513 0, 0, 0, 9, 10, 0, 0, 0, 11, 0,
5514 12, 13, 14, 270, 271, 17, 18, 0, 0, 66,
5515 235, 68, 19, 20, 272, 22, 23, 24, 25, 0,
5516 0, 227, 0, 0, 0, 0, 0, 0, 28, 0,
5517 0, 31, 32, 33, 34, 35, 36, 37, 38, 39,
5518 0, 40, 41, 42, 43, 44, 45, 46, 0, 0,
5519 0, 0, 0, 0, 0, 0, 0, 0, 47, 48,
5520 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5521 0, 0, 0, 49, 50, 0, 0, 0, 0, 0,
5522 0, 229, 0, 0, 230, 53, 54, 55, 0, 973,
5523 0, 0, 57, 58, 59, 60, 61, 62, 63, 64,
5524 65, 0, 0, 0, 0, 4, 5, 6, 0, 8,
5525 0, 0, 0, 9, 10, 0, 0, 0, 11, 0,
5526 12, 13, 14, 270, 271, 17, 18, 0, 0, 66,
5527 235, 68, 19, 20, 272, 22, 23, 24, 25, 0,
5528 0, 227, 0, 0, 0, 0, 0, 0, 28, 0,
5529 0, 31, 32, 33, 34, 35, 36, 37, 38, 39,
5530 0, 40, 41, 42, 43, 44, 45, 46, 0, 0,
5531 0, 0, 0, 0, 0, 0, 0, 0, 47, 48,
5532 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5533 0, 0, 0, 49, 50, 0, 0, 0, 0, 0,
5534 0, 229, 0, 0, 230, 53, 54, 55, 0, 1022,
5535 0, 0, 57, 58, 59, 60, 61, 62, 63, 64,
5536 65, 0, 0, 0, 0, 4, 5, 6, 0, 8,
5537 0, 0, 0, 9, 10, 0, 0, 0, 11, 0,
5538 12, 13, 14, 270, 271, 17, 18, 0, 0, 66,
5539 235, 68, 19, 20, 272, 22, 23, 24, 25, 0,
5540 0, 227, 0, 0, 0, 0, 0, 0, 28, 0,
5541 0, 31, 32, 33, 34, 35, 36, 37, 38, 39,
5542 0, 40, 41, 42, 43, 44, 45, 46, 0, 0,
5543 0, 0, 0, 0, 0, 0, 0, 0, 47, 48,
5544 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5545 0, 0, 0, 49, 50, 0, 0, 0, 0, 0,
5546 0, 229, 0, 0, 230, 53, 54, 55, 0, 802,
5547 0, 0, 57, 58, 59, 60, 61, 62, 63, 64,
5548 65, 0, 0, 0, 0, 4, 5, 6, 0, 8,
5549 0, 0, 0, 9, 10, 0, 0, 0, 11, 0,
5550 12, 13, 14, 270, 271, 17, 18, 0, 0, 66,
5551 235, 68, 19, 20, 272, 22, 23, 24, 25, 0,
5552 0, 227, 0, 0, 0, 0, 0, 0, 28, 0,
5553 0, 31, 32, 33, 34, 35, 36, 37, 38, 39,
5554 0, 40, 41, 42, 43, 44, 45, 46, 0, 0,
5555 0, 0, 0, 0, 0, 0, 0, 0, 47, 48,
5556 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5557 0, 0, 0, 49, 50, 0, 0, 0, 0, 0,
5558 0, 229, 0, 0, 230, 53, 54, 55, 0, 1155,
5559 0, 0, 57, 58, 59, 60, 61, 62, 63, 64,
5560 65, 0, 0, 0, 0, 4, 5, 6, 0, 8,
5561 0, 0, 0, 9, 10, 0, 0, 0, 11, 0,
5562 12, 13, 14, 270, 271, 17, 18, 0, 0, 66,
5563 235, 68, 19, 20, 272, 22, 23, 24, 25, 0,
5564 0, 227, 0, 0, 0, 0, 0, 0, 28, 0,
5565 0, 31, 32, 33, 34, 35, 36, 37, 38, 39,
5566 0, 40, 41, 42, 43, 44, 45, 46, 0, 0,
5567 0, 0, 0, 0, 0, 0, 0, 0, 47, 48,
5568 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5569 0, 0, 0, 49, 50, 0, 0, 0, 0, 0,
5570 0, 229, 0, 0, 230, 53, 54, 55, 0, 0,
5571 0, 0, 57, 58, 59, 60, 61, 62, 63, 64,
5572 65, 0, 0, 0, 0, 4, 5, 6, 0, 8,
5573 0, 0, 0, 9, 10, 0, 0, 0, 11, 0,
5574 12, 13, 14, 15, 16, 17, 18, 0, 0, 66,
5575 235, 68, 19, 20, 21, 22, 23, 24, 25, 0,
5576 0, 227, 0, 0, 0, 0, 0, 0, 28, 0,
5577 0, 31, 32, 33, 34, 35, 36, 37, 38, 39,
5578 0, 40, 41, 42, 43, 44, 45, 46, 0, 0,
5579 0, 0, 0, 0, 0, 0, 0, 0, 47, 48,
5580 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5581 0, 0, 0, 49, 50, 0, 0, 0, 0, 0,
5582 0, 229, 0, 0, 230, 53, 54, 55, 0, 0,
5583 0, 0, 57, 58, 59, 60, 61, 62, 63, 64,
5584 65, 0, 0, 0, 0, 4, 5, 6, 0, 8,
5585 0, 0, 0, 9, 10, 0, 0, 0, 11, 0,
5586 12, 13, 14, 15, 16, 17, 18, 0, 0, 66,
5587 235, 68, 19, 20, 21, 22, 23, 24, 25, 0,
5588 0, 26, 0, 0, 0, 0, 0, 0, 28, 0,
5589 0, 31, 32, 33, 34, 35, 36, 37, 38, 39,
5590 0, 40, 41, 42, 43, 44, 45, 46, 0, 0,
5591 0, 0, 0, 0, 0, 0, 0, 0, 47, 48,
5592 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5593 0, 0, 0, 49, 50, 0, 0, 0, 0, 0,
5594 0, 229, 0, 0, 230, 53, 54, 55, 0, 0,
5595 0, 0, 57, 58, 59, 60, 61, 62, 63, 64,
5596 65, 0, 0, 0, 0, 4, 5, 6, 0, 8,
5597 0, 0, 0, 9, 10, 0, 0, 0, 11, 0,
5598 12, 13, 14, 15, 16, 17, 18, 0, 0, 66,
5599 67, 68, 19, 20, 21, 22, 23, 24, 25, 0,
5600 0, 784, 0, 0, 0, 0, 0, 0, 28, 0,
5601 0, 31, 32, 33, 34, 35, 36, 37, 38, 39,
5602 0, 40, 41, 42, 43, 44, 45, 46, 0, 0,
5603 0, 0, 0, 0, 0, 0, 0, 0, 47, 48,
5604 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5605 0, 0, 0, 49, 50, 0, 0, 0, 0, 0,
5606 0, 229, 0, 0, 230, 53, 54, 55, 0, 0,
5607 0, 0, 57, 58, 59, 60, 61, 62, 63, 64,
5608 65, 0, 0, 0, 0, 4, 5, 6, 0, 8,
5609 0, 0, 0, 9, 10, 0, 0, 0, 11, 0,
5610 12, 13, 14, 15, 16, 17, 18, 0, 0, 66,
5611 235, 68, 19, 20, 21, 22, 23, 24, 25, 0,
5612 0, 227, 0, 0, 0, 0, 0, 0, 28, 0,
5613 0, 31, 32, 33, 34, 35, 36, 37, 38, 39,
5614 0, 40, 41, 42, 43, 44, 45, 46, 0, 0,
5615 0, 0, 0, 0, 0, 0, 0, 0, 47, 48,
5616 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5617 0, 0, 0, 49, 50, 0, 0, 0, 0, 0,
5618 0, 813, 0, 0, 230, 53, 54, 55, 0, 0,
5619 0, 0, 57, 58, 59, 60, 61, 62, 63, 64,
5620 65, 0, 0, 0, 0, 4, 5, 6, 0, 8,
5621 0, 0, 0, 9, 10, 0, 0, 0, 11, 0,
5622 12, 13, 14, 270, 271, 17, 18, 0, 0, 66,
5623 235, 68, 19, 20, 272, 22, 23, 24, 25, 0,
5624 0, 893, 0, 0, 0, 0, 0, 0, 28, 0,
5625 0, 31, 32, 33, 34, 35, 36, 37, 38, 39,
5626 0, 40, 41, 42, 43, 44, 45, 46, 0, 0,
5627 0, 0, 0, 0, 0, 0, 0, 0, 47, 48,
5628 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5629 0, 0, 0, 49, 50, 0, 0, 0, 0, 0,
5630 0, 229, 0, 0, 230, 53, 54, 55, 0, 0,
5631 0, 0, 57, 58, 59, 60, 61, 62, 63, 64,
5632 65, 0, 0, 0, 0, 4, 5, 6, 0, 8,
5633 0, 0, 0, 9, 10, 0, 0, 0, 11, 0,
5634 12, 13, 14, 270, 271, 17, 18, 0, 0, 66,
5635 235, 68, 19, 20, 272, 22, 23, 24, 25, 0,
5636 0, 227, 0, 0, 0, 0, 0, 0, 302, 0,
5637 0, 31, 32, 33, 34, 35, 36, 37, 38, 39,
5638 0, 40, 41, 42, 43, 44, 45, 46, 0, 0,
5639 0, 0, 0, 0, 0, 0, 0, 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, 303, 0, 0, 363, 53, 54, 55, 0, 364,
5643 0, 0, 57, 58, 59, 60, 61, 62, 63, 64,
5644 65, 0, 0, 4, 5, 6, 0, 8, 0, 0,
5645 0, 9, 10, 0, 0, 0, 11, 0, 12, 13,
5646 14, 270, 271, 17, 18, 0, 0, 0, 0, 304,
5647 19, 20, 272, 22, 23, 24, 25, 0, 0, 227,
5648 0, 0, 0, 0, 0, 0, 302, 0, 0, 31,
5649 32, 33, 34, 35, 36, 37, 38, 39, 0, 40,
5650 41, 42, 43, 44, 45, 46, 0, 0, 0, 0,
5651 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5652 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5653 0, 0, 0, 0, 0, 0, 0, 0, 0, 415,
5654 0, 0, 52, 53, 54, 55, 0, 56, 0, 0,
5655 57, 58, 59, 60, 61, 62, 63, 64, 65, 0,
5656 0, 4, 5, 6, 0, 8, 0, 0, 0, 9,
5657 10, 0, 0, 0, 11, 0, 12, 13, 14, 270,
5658 271, 17, 18, 0, 0, 0, 0, 304, 19, 20,
5659 272, 22, 23, 24, 25, 0, 0, 227, 0, 0,
5660 0, 0, 0, 0, 302, 0, 0, 31, 32, 33,
5661 423, 35, 36, 37, 424, 39, 0, 40, 41, 42,
5662 43, 44, 45, 46, 0, 0, 0, 0, 0, 0,
5663 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5664 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5665 0, 0, 0, 425, 0, 0, 0, 426, 0, 0,
5666 230, 53, 54, 55, 0, 0, 0, 0, 57, 58,
5667 59, 60, 61, 62, 63, 64, 65, 0, 0, 4,
5668 5, 6, 0, 8, 0, 0, 0, 9, 10, 0,
5669 0, 0, 11, 0, 12, 13, 14, 270, 271, 17,
5670 18, 0, 0, 0, 0, 304, 19, 20, 272, 22,
5671 23, 24, 25, 0, 0, 227, 0, 0, 0, 0,
5672 0, 0, 302, 0, 0, 31, 32, 33, 423, 35,
5673 36, 37, 424, 39, 0, 40, 41, 42, 43, 44,
5674 45, 46, 0, 0, 0, 0, 0, 0, 0, 0,
5675 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5676 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5677 0, 0, 0, 0, 0, 426, 0, 0, 230, 53,
5678 54, 55, 0, 0, 0, 0, 57, 58, 59, 60,
5679 61, 62, 63, 64, 65, 0, 0, 4, 5, 6,
5680 0, 8, 0, 0, 0, 9, 10, 0, 0, 0,
5681 11, 0, 12, 13, 14, 270, 271, 17, 18, 0,
5682 0, 0, 0, 304, 19, 20, 272, 22, 23, 24,
5683 25, 0, 0, 227, 0, 0, 0, 0, 0, 0,
5684 302, 0, 0, 31, 32, 33, 34, 35, 36, 37,
5685 38, 39, 0, 40, 41, 42, 43, 44, 45, 46,
5686 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5687 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5688 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5689 0, 0, 0, 303, 0, 0, 363, 53, 54, 55,
5690 0, 0, 0, 0, 57, 58, 59, 60, 61, 62,
5691 63, 64, 65, 0, 0, 4, 5, 6, 0, 8,
5692 0, 0, 0, 9, 10, 0, 0, 0, 11, 0,
5693 12, 13, 14, 270, 271, 17, 18, 0, 0, 0,
5694 0, 304, 19, 20, 272, 22, 23, 24, 25, 0,
5695 0, 227, 0, 0, 0, 0, 0, 0, 302, 0,
5696 0, 31, 32, 33, 34, 35, 36, 37, 38, 39,
5697 0, 40, 41, 42, 43, 44, 45, 46, 0, 0,
5698 0, 0, 0, 0, 0, 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, 1221, 0, 0, 230, 53, 54, 55, 0, 0,
5702 0, 0, 57, 58, 59, 60, 61, 62, 63, 64,
5703 65, 0, 0, 4, 5, 6, 0, 8, 0, 0,
5704 0, 9, 10, 0, 0, 0, 11, 0, 12, 13,
5705 14, 270, 271, 17, 18, 0, 0, 0, 0, 304,
5706 19, 20, 272, 22, 23, 24, 25, 0, 0, 227,
5707 0, 0, 0, 0, 0, 0, 302, 0, 0, 31,
5708 32, 33, 34, 35, 36, 37, 38, 39, 0, 40,
5709 41, 42, 43, 44, 45, 46, 0, 0, 0, 0,
5710 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5711 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5712 0, 0, 0, 0, 0, 0, 704, 643, 0, 1344,
5713 705, 0, 230, 53, 54, 55, 0, 0, 0, 0,
5714 57, 58, 59, 60, 61, 62, 63, 64, 65, 0,
5715 188, 189, 190, 191, 192, 193, 194, 195, 196, 0,
5716 0, 197, 198, 0, 0, 0, 0, 199, 200, 201,
5717 202, 0, 0, 0, 0, 0, 0, 304, 0, 0,
5718 0, 203, 204, 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, 0,
5721 0, 205, 206, 207, 208, 209, 210, 211, 212, 213,
5722 214, 0, 215, 216, 707, 651, 0, 0, 708, 0,
5723 217, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5724 0, 0, 0, 0, 0, 0, 0, 0, 188, 189,
5725 190, 191, 192, 193, 194, 195, 196, 0, 0, 197,
5726 198, 0, 0, 0, 0, 199, 200, 201, 202, 0,
5727 0, 0, 0, 0, 0, 0, 0, 0, 0, 203,
5728 204, 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, 0, 0, 205,
5731 206, 207, 208, 209, 210, 211, 212, 213, 214, 0,
5732 215, 216, 704, 643, 0, 0, 724, 0, 217, 0,
5733 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5734 0, 0, 0, 0, 0, 0, 188, 189, 190, 191,
5735 192, 193, 194, 195, 196, 0, 0, 197, 198, 0,
5736 0, 0, 0, 199, 200, 201, 202, 0, 0, 0,
5737 0, 0, 0, 0, 0, 0, 0, 203, 204, 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, 0, 0, 205, 206, 207,
5741 208, 209, 210, 211, 212, 213, 214, 0, 215, 216,
5742 735, 643, 0, 0, 736, 0, 217, 0, 0, 0,
5743 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5744 0, 0, 0, 0, 188, 189, 190, 191, 192, 193,
5745 194, 195, 196, 0, 0, 197, 198, 0, 0, 0,
5746 0, 199, 200, 201, 202, 0, 0, 0, 0, 0,
5747 0, 0, 0, 0, 0, 203, 204, 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, 0, 0, 205, 206, 207, 208, 209,
5751 210, 211, 212, 213, 214, 0, 215, 216, 738, 651,
5752 0, 0, 739, 0, 217, 0, 0, 0, 0, 0,
5753 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5754 0, 0, 188, 189, 190, 191, 192, 193, 194, 195,
5755 196, 0, 0, 197, 198, 0, 0, 0, 0, 199,
5756 200, 201, 202, 0, 0, 0, 0, 0, 0, 0,
5757 0, 0, 0, 203, 204, 0, 0, 0, 0, 0,
5758 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5759 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5760 0, 0, 0, 205, 206, 207, 208, 209, 210, 211,
5761 212, 213, 214, 0, 215, 216, 857, 643, 0, 0,
5762 858, 0, 217, 0, 0, 0, 0, 0, 0, 0,
5763 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5764 188, 189, 190, 191, 192, 193, 194, 195, 196, 0,
5765 0, 197, 198, 0, 0, 0, 0, 199, 200, 201,
5766 202, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5767 0, 203, 204, 0, 0, 0, 0, 0, 0, 0,
5768 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5769 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5770 0, 205, 206, 207, 208, 209, 210, 211, 212, 213,
5771 214, 0, 215, 216, 860, 651, 0, 0, 861, 0,
5772 217, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5773 0, 0, 0, 0, 0, 0, 0, 0, 188, 189,
5774 190, 191, 192, 193, 194, 195, 196, 0, 0, 197,
5775 198, 0, 0, 0, 0, 199, 200, 201, 202, 0,
5776 0, 0, 0, 0, 0, 0, 0, 0, 0, 203,
5777 204, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5778 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5779 0, 0, 0, 0, 0, 0, 0, 0, 0, 205,
5780 206, 207, 208, 209, 210, 211, 212, 213, 214, 0,
5781 215, 216, 866, 643, 0, 0, 867, 0, 217, 0,
5782 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5783 0, 0, 0, 0, 0, 0, 188, 189, 190, 191,
5784 192, 193, 194, 195, 196, 0, 0, 197, 198, 0,
5785 0, 0, 0, 199, 200, 201, 202, 0, 0, 0,
5786 0, 0, 0, 0, 0, 0, 0, 203, 204, 0,
5787 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5788 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5789 0, 0, 0, 0, 0, 0, 0, 205, 206, 207,
5790 208, 209, 210, 211, 212, 213, 214, 0, 215, 216,
5791 689, 651, 0, 0, 690, 0, 217, 0, 0, 0,
5792 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5793 0, 0, 0, 0, 188, 189, 190, 191, 192, 193,
5794 194, 195, 196, 0, 0, 197, 198, 0, 0, 0,
5795 0, 199, 200, 201, 202, 0, 0, 0, 0, 0,
5796 0, 0, 0, 0, 0, 203, 204, 0, 0, 0,
5797 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5798 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5799 0, 0, 0, 0, 0, 205, 206, 207, 208, 209,
5800 210, 211, 212, 213, 214, 0, 215, 216, 1028, 643,
5801 0, 0, 1029, 0, 217, 0, 0, 0, 0, 0,
5802 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5803 0, 0, 188, 189, 190, 191, 192, 193, 194, 195,
5804 196, 0, 0, 197, 198, 0, 0, 0, 0, 199,
5805 200, 201, 202, 0, 0, 0, 0, 0, 0, 0,
5806 0, 0, 0, 203, 204, 0, 0, 0, 0, 0,
5807 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5808 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5809 0, 0, 0, 205, 206, 207, 208, 209, 210, 211,
5810 212, 213, 214, 0, 215, 216, 1031, 651, 0, 0,
5811 1032, 0, 217, 0, 0, 0, 0, 0, 0, 0,
5812 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5813 188, 189, 190, 191, 192, 193, 194, 195, 196, 0,
5814 0, 197, 198, 0, 0, 0, 0, 199, 200, 201,
5815 202, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5816 0, 203, 204, 0, 0, 0, 0, 0, 0, 0,
5817 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5818 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5819 0, 205, 206, 207, 208, 209, 210, 211, 212, 213,
5820 214, 0, 215, 216, 1363, 643, 0, 0, 1364, 0,
5821 217, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5822 0, 0, 0, 0, 0, 0, 0, 0, 188, 189,
5823 190, 191, 192, 193, 194, 195, 196, 0, 0, 197,
5824 198, 0, 0, 0, 0, 199, 200, 201, 202, 0,
5825 0, 0, 0, 0, 0, 0, 0, 0, 0, 203,
5826 204, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5827 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5828 0, 0, 0, 0, 0, 0, 0, 0, 0, 205,
5829 206, 207, 208, 209, 210, 211, 212, 213, 214, 0,
5830 215, 216, 1366, 651, 0, 0, 1367, 0, 217, 0,
5831 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5832 0, 0, 0, 0, 0, 0, 188, 189, 190, 191,
5833 192, 193, 194, 195, 196, 0, 0, 197, 198, 0,
5834 0, 0, 0, 199, 200, 201, 202, 0, 0, 0,
5835 0, 0, 0, 0, 0, 0, 0, 203, 204, 0,
5836 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5837 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5838 0, 0, 0, 0, 0, 0, 0, 205, 206, 207,
5839 208, 209, 210, 211, 212, 213, 214, 0, 215, 216,
5840 1420, 643, 0, 0, 1421, 0, 217, 0, 0, 0,
5841 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5842 0, 0, 0, 0, 188, 189, 190, 191, 192, 193,
5843 194, 195, 196, 0, 0, 197, 198, 0, 0, 0,
5844 0, 199, 200, 201, 202, 0, 0, 0, 0, 0,
5845 0, 0, 0, 0, 0, 203, 204, 0, 0, 0,
5846 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5847 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5848 0, 0, 0, 0, 0, 205, 206, 207, 208, 209,
5849 210, 211, 212, 213, 214, 0, 215, 216, 0, 0,
5850 0, 0, 0, 0, 217
5851};
5852
5853static const yytype_int16 yycheck[] =
5854{
5855 1, 70, 59, 70, 7, 15, 16, 408, 56, 107,
5856 15, 16, 58, 58, 116, 52, 53, 344, 1, 101,
5857 67, 399, 349, 401, 27, 104, 400, 426, 107, 13,
5858 14, 768, 766, 115, 255, 252, 7, 27, 107, 15,
5859 16, 89, 599, 766, 949, 602, 845, 615, 601, 15,
5860 16, 52, 53, 54, 55, 58, 27, 84, 469, 477,
5861 108, 109, 110, 21, 575, 111, 601, 855, 63, 64,
5862 65, 344, 89, 911, 469, 571, 349, 455, 54, 575,
5863 296, 56, 477, 525, 300, 605, 113, 589, 54, 55,
5864 1033, 1034, 913, 595, 472, 1194, 474, 515, 766, 473,
5865 52, 512, 112, 66, 630, 25, 25, 112, 111, 1208,
5866 1034, 81, 774, 0, 103, 104, 27, 825, 107, 15,
5867 16, 1318, 774, 13, 502, 682, 84, 29, 26, 1336,
5868 69, 1, 565, 25, 285, 1194, 112, 78, 66, 768,
5869 101, 109, 1000, 69, 66, 774, 112, 25, 25, 0,
5870 528, 1210, 25, 527, 1059, 1070, 1218, 1219, 97, 98,
5871 1033, 1034, 154, 25, 81, 247, 13, 66, 25, 134,
5872 612, 30, 98, 141, 10, 25, 100, 234, 13, 100,
5873 320, 321, 52, 53, 151, 26, 56, 28, 723, 287,
5874 134, 119, 157, 230, 155, 277, 26, 119, 13, 1104,
5875 56, 1106, 69, 144, 145, 146, 1403, 1000, 1066, 1416,
5876 134, 155, 363, 134, 153, 1158, 112, 155, 287, 89,
5877 287, 123, 121, 122, 706, 124, 37, 38, 310, 230,
5878 97, 98, 68, 120, 1158, 155, 155, 157, 108, 109,
5879 110, 111, 28, 154, 245, 255, 1084, 257, 285, 160,
5880 255, 252, 257, 151, 255, 737, 1355, 305, 337, 338,
5881 339, 340, 1083, 155, 154, 266, 13, 484, 1211, 977,
5882 160, 260, 261, 1066, 1011, 1218, 1219, 155, 155, 255,
5883 679, 257, 155, 266, 285, 1158, 153, 13, 305, 1351,
5884 1349, 257, 670, 155, 1353, 669, 1355, 715, 155, 336,
5885 157, 13, 713, 681, 274, 155, 680, 154, 865, 829,
5886 157, 1216, 1217, 160, 272, 413, 364, 275, 713, 154,
5887 715, 151, 755, 756, 161, 160, 363, 157, 854, 1244,
5888 409, 609, 13, 285, 100, 336, 418, 307, 1000, 154,
5889 1255, 304, 1257, 154, 413, 160, 425, 100, 337, 338,
5890 339, 340, 335, 342, 343, 1007, 273, 274, 1157, 13,
5891 230, 257, 363, 101, 1423, 1033, 1034, 154, 134, 1157,
5892 812, 1000, 159, 410, 411, 1168, 929, 859, 1171, 657,
5893 1173, 134, 1011, 100, 831, 663, 664, 869, 13, 364,
5894 400, 157, 839, 961, 929, 400, 266, 101, 401, 400,
5895 1105, 541, 403, 543, 1066, 264, 917, 154, 1351, 410,
5896 411, 363, 34, 160, 134, 285, 154, 134, 920, 921,
5897 409, 917, 924, 834, 926, 982, 928, 428, 154, 155,
5898 52, 1168, 1166, 66, 160, 305, 425, 1066, 155, 834,
5899 13, 451, 154, 1166, 402, 157, 451, 25, 160, 34,
5900 100, 155, 455, 100, 295, 296, 152, 134, 154, 300,
5901 15, 302, 100, 473, 999, 335, 336, 52, 473, 1384,
5902 25, 474, 473, 154, 100, 451, 100, 525, 911, 160,
5903 913, 482, 615, 484, 134, 451, 703, 134, 121, 122,
5904 1158, 494, 713, 363, 364, 768, 134, 455, 1166, 502,
5905 154, 774, 361, 469, 494, 155, 160, 366, 525, 1171,
5906 134, 789, 155, 1218, 1219, 793, 732, 527, 100, 1171,
5907 1101, 1102, 527, 494, 100, 528, 527, 938, 161, 154,
5908 1323, 600, 1325, 403, 1327, 160, 1329, 69, 290, 1168,
5909 410, 411, 1171, 1211, 344, 15, 512, 17, 1030, 349,
5910 1218, 1219, 134, 1182, 154, 451, 134, 157, 134, 98,
5911 693, 694, 58, 610, 612, 97, 98, 945, 615, 947,
5912 112, 554, 946, 155, 975, 853, 154, 155, 856, 997,
5913 158, 154, 78, 1085, 1086, 1087, 1088, 160, 598, 157,
5914 1327, 601, 870, 662, 727, 612, 100, 100, 599, 458,
5915 459, 602, 997, 1402, 744, 56, 66, 67, 467, 749,
5916 134, 1334, 108, 109, 153, 1408, 475, 476, 157, 646,
5917 69, 153, 659, 1105, 661, 157, 101, 654, 25, 1186,
5918 134, 134, 1213, 1214, 610, 100, 495, 794, 508, 615,
5919 797, 25, 693, 694, 503, 141, 693, 694, 649, 98,
5920 1083, 1084, 1053, 654, 78, 525, 155, 69, 659, 669,
5921 661, 121, 122, 155, 669, 692, 1334, 670, 669, 134,
5922 680, 1323, 25, 1000, 891, 680, 727, 34, 681, 680,
5923 727, 682, 100, 1351, 554, 733, 98, 78, 646, 1341,
5924 968, 692, 695, 971, 683, 52, 1182, 742, 1327, 451,
5925 978, 100, 703, 157, 1103, 695, 984, 1336, 158, 1079,
5926 1080, 1193, 1341, 157, 1196, 157, 733, 154, 142, 143,
5927 144, 145, 146, 160, 695, 726, 134, 1000, 480, 599,
5928 719, 483, 602, 69, 1216, 134, 488, 134, 1011, 1066,
5929 822, 52, 612, 159, 100, 56, 1147, 713, 69, 744,
5930 134, 746, 1254, 505, 749, 750, 155, 154, 155, 69,
5931 1412, 158, 98, 1320, 812, 154, 934, 725, 936, 158,
5932 154, 155, 874, 157, 158, 100, 97, 98, 134, 1000,
5933 100, 134, 69, 862, 1062, 864, 100, 1416, 98, 659,
5934 631, 661, 152, 1066, 863, 812, 66, 656, 1033, 1034,
5935 69, 154, 155, 83, 84, 158, 56, 648, 157, 134,
5936 97, 98, 682, 155, 134, 161, 1215, 69, 951, 952,
5937 134, 1303, 1304, 1305, 957, 958, 872, 69, 97, 98,
5938 155, 583, 153, 1267, 1235, 1269, 134, 696, 69, 78,
5939 841, 155, 843, 69, 845, 1066, 98, 106, 1334, 119,
5940 1336, 121, 122, 69, 124, 1341, 98, 137, 138, 611,
5941 1346, 37, 38, 733, 865, 706, 153, 98, 834, 872,
5942 1105, 97, 98, 862, 69, 864, 1246, 1247, 1248, 1249,
5943 1250, 97, 98, 1365, 153, 14, 15, 1122, 967, 69,
5944 891, 732, 69, 1026, 134, 1168, 737, 134, 1171, 155,
5945 951, 952, 97, 98, 951, 952, 957, 958, 1041, 1182,
5946 957, 958, 981, 52, 983, 899, 160, 56, 98, 929,
5947 69, 98, 56, 1158, 154, 155, 1412, 153, 1414, 966,
5948 1416, 1309, 1418, 25, 1308, 687, 946, 153, 69, 154,
5949 155, 946, 812, 784, 947, 946, 138, 1168, 97, 98,
5950 1171, 1437, 1173, 1387, 1388, 155, 1191, 1391, 1392, 1237,
5951 961, 1395, 26, 152, 69, 966, 97, 98, 827, 828,
5952 155, 603, 69, 1208, 69, 607, 835, 836, 967, 1026,
5953 158, 982, 134, 1218, 1219, 961, 69, 89, 90, 100,
5954 1041, 69, 97, 98, 1041, 865, 1430, 1431, 1432, 1433,
5955 97, 98, 97, 98, 153, 69, 1440, 759, 134, 1379,
5956 1380, 1381, 1382, 1349, 97, 98, 158, 1353, 859, 97,
5957 98, 1058, 153, 134, 40, 41, 885, 886, 869, 888,
5958 889, 154, 155, 97, 98, 155, 1020, 1021, 306, 307,
5959 152, 1024, 1025, 26, 155, 1082, 155, 1048, 153, 1050,
5960 54, 1108, 893, 58, 1327, 155, 153, 1058, 153, 1429,
5961 64, 65, 155, 1336, 1109, 66, 1067, 762, 1341, 1070,
5962 153, 766, 1073, 78, 155, 153, 134, 52, 1079, 1080,
5963 155, 1082, 155, 152, 943, 155, 69, 151, 155, 153,
5964 1091, 1092, 66, 157, 26, 13, 966, 956, 1146, 1377,
5965 17, 25, 1323, 108, 1325, 155, 1327, 112, 1329, 155,
5966 134, 78, 982, 44, 97, 98, 1153, 1154, 119, 871,
5967 121, 122, 1159, 124, 44, 1208, 1205, 152, 95, 96,
5968 1228, 44, 155, 78, 993, 1218, 1219, 69, 890, 44,
5969 892, 1223, 155, 1416, 56, 119, 1183, 121, 122, 1150,
5970 95, 96, 1153, 1154, 1024, 1025, 1157, 909, 1159, 1228,
5971 136, 1228, 66, 1033, 1034, 97, 98, 159, 151, 134,
5972 153, 8, 930, 931, 157, 142, 143, 144, 145, 146,
5973 15, 939, 1183, 155, 942, 1186, 944, 1408, 1058, 1030,
5974 1227, 52, 155, 155, 139, 140, 141, 142, 143, 144,
5975 145, 146, 66, 155, 155, 1242, 78, 40, 41, 42,
5976 43, 44, 1082, 155, 152, 119, 1205, 121, 122, 151,
5977 1268, 153, 66, 95, 96, 157, 1227, 155, 155, 1230,
5978 155, 1101, 1102, 1290, 101, 1105, 1315, 1316, 66, 9,
5979 155, 1242, 139, 1244, 155, 1246, 1247, 1248, 1249, 1250,
5980 52, 139, 1122, 155, 1255, 119, 1257, 121, 122, 155,
5981 1261, 155, 155, 155, 1105, 1106, 1267, 152, 1269, 141,
5982 142, 143, 144, 145, 146, 119, 1146, 121, 122, 155,
5983 1150, 155, 101, 1153, 1154, 52, 155, 56, 1158, 1159,
5984 160, 119, 1340, 121, 122, 158, 155, 52, 1308, 54,
5985 55, 56, 57, 1308, 155, 1000, 1309, 1308, 155, 1310,
5986 155, 1312, 52, 1183, 54, 55, 1186, 57, 152, 1320,
5987 1161, 1191, 139, 155, 1194, 155, 1315, 1316, 59, 60,
5988 61, 62, 155, 1370, 155, 155, 56, 55, 1208, 155,
5989 1210, 1200, 155, 1213, 1214, 1, 155, 102, 1218, 1219,
5990 155, 155, 1193, 335, 155, 1196, 155, 1227, 155, 15,
5991 16, 157, 102, 52, 157, 54, 55, 56, 57, 1370,
5992 155, 1066, 1242, 72, 504, 1216, 266, 1150, 1379, 1380,
5993 1381, 1382, 872, 1384, 508, 106, 1387, 1388, 610, 108,
5994 1391, 1392, 98, 1000, 1395, 110, 52, 53, 1268, 495,
5995 56, 1402, 692, 962, 54, 55, 981, 57, 1230, 911,
5996 755, 67, 1266, 102, 64, 65, 1334, 1287, 107, 1182,
5997 1092, 1265, 1403, 875, 1265, 1341, 359, 1287, 1429, 1430,
5998 1431, 1432, 1433, 89, 1211, 1211, 1207, 1312, 1402, 1440,
5999 52, 1310, 54, 55, 56, 57, 58, 103, 104, 119,
6000 1320, 107, 108, 109, 110, 543, 112, 111, 349, 1066,
6001 1066, 1397, 1303, 1304, 1305, 1217, 78, 1162, 115, -1,
6002 1340, 1166, -1, 1168, -1, -1, 1171, -1, 1173, 1349,
6003 92, -1, -1, 1353, -1, 1355, -1, 1182, -1, 52,
6004 102, 54, 55, 56, 57, 107, 108, 109, -1, 52,
6005 1370, 54, 55, 56, 57, -1, -1, -1, -1, -1,
6006 228, -1, -1, 231, 232, 233, -1, -1, -1, -1,
6007 -1, 1273, -1, -1, 1365, -1, -1, -1, -1, 141,
6008 -1, 1283, 144, 1374, 52, -1, 54, 55, 56, 57,
6009 58, -1, -1, -1, -1, 157, -1, 768, 1300, 1301,
6010 1302, -1, -1, 1423, -1, -1, 1397, -1, -1, 780,
6011 78, 1168, -1, -1, 1171, -1, 1173, 1, -1, -1,
6012 -1, -1, -1, -1, 230, 1182, -1, -1, 693, 694,
6013 -1, 15, 16, -1, 102, -1, -1, -1, -1, 107,
6014 108, 109, -1, -1, 709, 710, -1, -1, -1, 255,
6015 -1, 257, -1, -1, 260, 261, -1, -1, -1, -1,
6016 266, 52, 727, 54, 55, 56, 57, 58, 52, 53,
6017 -1, -1, -1, 141, -1, -1, 144, -1, 1323, 285,
6018 1325, -1, 1327, 67, 1329, -1, -1, 78, -1, 1334,
6019 -1, 1336, -1, -1, -1, -1, 1341, -1, -1, 305,
6020 -1, 1346, -1, -1, -1, -1, -1, -1, -1, -1,
6021 -1, 102, -1, -1, -1, -1, -1, 108, 109, 103,
6022 104, -1, -1, 107, -1, -1, -1, -1, 112, 335,
6023 336, 337, 338, 339, 340, -1, 342, 343, -1, -1,
6024 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6025 141, -1, -1, -1, -1, -1, -1, 363, 364, 1033,
6026 1034, -1, -1, 1408, -1, -1, 1323, 1412, 1325, 1414,
6027 1327, 1416, 1329, 1418, -1, -1, -1, -1, -1, 1336,
6028 -1, -1, -1, -1, 1341, -1, -1, -1, -1, 1346,
6029 -1, -1, 1437, -1, 400, -1, -1, 403, -1, -1,
6030 468, 469, -1, 409, 410, 411, -1, -1, -1, 477,
6031 -1, -1, -1, -1, -1, -1, -1, 882, -1, 425,
6032 -1, -1, -1, -1, -1, -1, -1, 1101, 1102, 1000,
6033 -1, 1105, -1, -1, -1, -1, -1, -1, 1009, -1,
6034 1011, -1, 1013, -1, 512, 451, 230, 515, 1122, -1,
6035 -1, 1408, -1, -1, -1, 1412, -1, 1414, -1, 1416,
6036 -1, 1418, -1, -1, -1, -1, -1, 473, -1, -1,
6037 -1, 255, -1, 257, -1, -1, 260, 261, -1, -1,
6038 1437, -1, 266, -1, 1158, -1, 951, 952, -1, -1,
6039 -1, -1, 957, 958, -1, 1066, -1, -1, -1, -1,
6040 -1, 285, 508, -1, -1, -1, -1, -1, -1, -1,
6041 -1, -1, -1, -1, -1, -1, -1, 1191, -1, 525,
6042 1194, 527, 590, -1, -1, -1, 991, 992, -1, 994,
6043 995, -1, -1, -1, 1208, -1, 1210, -1, -1, 1213,
6044 1214, -1, 610, -1, 1218, 1219, -1, 615, 554, -1,
6045 -1, 335, 336, 337, 338, 339, 340, -1, 342, 343,
6046 -1, -1, -1, -1, -1, -1, -1, 1033, 1034, -1,
6047 -1, -1, -1, -1, -1, -1, 1041, -1, -1, 363,
6048 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6049 -1, -1, 598, 599, -1, 601, 602, 1168, -1, -1,
6050 1065, -1, 1173, -1, 610, -1, 612, -1, 1179, 615,
6051 -1, 1182, -1, 1287, -1, -1, 400, -1, -1, 403,
6052 -1, -1, -1, -1, -1, 409, 410, 411, 52, 697,
6053 54, 55, 56, 57, 58, 1101, 1102, -1, -1, 1105,
6054 -1, 425, -1, -1, -1, 713, 52, 715, 54, 55,
6055 56, 57, 58, 659, 78, 661, 1122, -1, -1, -1,
6056 -1, -1, -1, 669, -1, -1, -1, 451, 92, -1,
6057 -1, -1, 78, -1, 680, 1349, 682, 683, 102, 1353,
6058 -1, 1355, -1, 107, 108, 109, 92, 693, 694, 473,
6059 -1, -1, 1158, -1, -1, -1, 102, -1, -1, -1,
6060 -1, -1, 108, 109, -1, 773, -1, -1, -1, -1,
6061 -1, -1, -1, 719, -1, -1, -1, 141, -1, -1,
6062 144, 727, -1, -1, 508, 1191, -1, 733, 1194, -1,
6063 -1, -1, -1, -1, 802, 141, -1, -1, -1, -1,
6064 -1, -1, 1208, 527, 1210, -1, -1, 1213, 1214, 1423,
6065 -1, -1, 1218, 1219, 1325, -1, 1327, -1, 1329, -1,
6066 -1, -1, -1, -1, -1, 1336, 834, -1, -1, -1,
6067 554, -1, -1, -1, -1, 1346, -1, -1, -1, -1,
6068 -1, -1, -1, -1, 852, -1, -1, -1, -1, -1,
6069 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6070 -1, -1, -1, -1, -1, -1, 812, -1, -1, -1,
6071 -1, -1, -1, -1, 598, 599, -1, 601, 602, -1,
6072 -1, 1287, -1, -1, -1, -1, 610, -1, -1, -1,
6073 -1, 615, -1, -1, -1, -1, -1, 1408, -1, -1,
6074 -1, -1, -1, 1414, -1, 1416, -1, 1418, -1, -1,
6075 -1, -1, -1, -1, -1, -1, 862, -1, 864, 865,
6076 -1, -1, -1, -1, -1, -1, 1437, 1, -1, -1,
6077 938, -1, -1, -1, -1, 659, -1, 661, -1, -1,
6078 -1, 15, 16, 1349, -1, 669, -1, 1353, -1, 1355,
6079 -1, -1, -1, 961, -1, -1, 680, -1, 682, 683,
6080 -1, -1, -1, -1, -1, 973, -1, -1, -1, 693,
6081 694, -1, -1, -1, -1, -1, -1, -1, 52, 53,
6082 -1, -1, -1, 929, -1, -1, -1, -1, -1, 997,
6083 -1, -1, -1, 67, -1, 719, -1, -1, -1, -1,
6084 946, -1, -1, 727, -1, 951, 952, -1, -1, -1,
6085 -1, 957, 958, -1, 1022, -1, -1, 1423, -1, -1,
6086 966, 967, -1, -1, -1, -1, -1, -1, -1, 103,
6087 104, -1, -1, 107, -1, -1, 982, -1, 112, 33,
6088 34, 35, 36, -1, -1, -1, -1, -1, -1, 1057,
6089 -1, -1, -1, -1, -1, 49, 50, 51, 52, -1,
6090 -1, -1, 56, -1, -1, 59, 60, 61, 62, 63,
6091 -1, -1, -1, -1, -1, -1, -1, -1, 1024, 1025,
6092 1026, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6093 -1, -1, -1, -1, -1, 1041, -1, 91, 92, 1033,
6094 1034, -1, -1, -1, -1, 99, -1, -1, 102, -1,
6095 104, 105, 1058, 107, -1, -1, 110, 111, 112, 113,
6096 114, 115, 116, 117, 118, -1, -1, -1, -1, 1033,
6097 1034, -1, -1, -1, -1, -1, 1082, -1, 862, -1,
6098 864, 865, -1, -1, -1, -1, 140, 1155, -1, -1,
6099 -1, -1, -1, 147, -1, -1, 230, -1, -1, -1,
6100 154, -1, -1, 1033, 1034, -1, -1, 1101, 1102, -1,
6101 -1, 1105, -1, -1, -1, -1, -1, -1, -1, -1,
6102 -1, 255, -1, 257, -1, -1, 260, 261, 1122, -1,
6103 -1, -1, 266, -1, -1, -1, -1, 1101, 1102, -1,
6104 1146, 1105, -1, -1, 1150, 929, -1, 1153, 1154, -1,
6105 -1, 285, -1, 1159, -1, -1, -1, -1, 1122, -1,
6106 -1, -1, 946, -1, 1158, -1, -1, 951, 952, -1,
6107 -1, 1101, 1102, 957, 958, 1105, -1, 1183, -1, -1,
6108 1186, -1, 966, 967, -1, -1, -1, -1, -1, -1,
6109 -1, -1, 1122, -1, 1158, -1, -1, 1191, 982, 1205,
6110 1194, 335, 336, 337, 338, 339, 340, -1, 342, 343,
6111 -1, -1, -1, -1, 1208, -1, 1210, -1, -1, 1213,
6112 1214, 1227, -1, -1, 1218, 1219, -1, 1191, 1158, 363,
6113 1194, -1, -1, -1, -1, -1, 1242, -1, -1, -1,
6114 1024, 1025, 1026, -1, 1208, -1, 1210, -1, -1, 1213,
6115 1214, -1, -1, -1, 1218, 1219, -1, 1041, -1, -1,
6116 -1, 1191, 1268, -1, 1194, -1, 400, -1, -1, 403,
6117 -1, -1, -1, -1, 1058, 409, 410, 411, 1208, -1,
6118 1210, -1, -1, 1213, 1214, -1, -1, -1, 1218, 1219,
6119 -1, 425, -1, 1287, -1, -1, -1, -1, 1082, -1,
6120 -1, -1, 1308, -1, -1, -1, -1, -1, -1, 1315,
6121 1316, -1, -1, -1, 1320, -1, -1, 451, -1, -1,
6122 -1, -1, -1, 1287, -1, -1, -1, -1, -1, -1,
6123 -1, -1, -1, -1, 1340, -1, -1, 1033, 1034, 473,
6124 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6125 -1, -1, -1, -1, -1, 1349, -1, 1287, -1, 1353,
6126 -1, 1355, -1, -1, 1370, -1, 1150, -1, -1, 1153,
6127 1154, -1, -1, -1, 508, 1159, -1, -1, -1, -1,
6128 1, 1033, 1034, -1, -1, 1349, -1, -1, -1, 1353,
6129 -1, 1355, -1, 527, 15, 16, -1, -1, -1, 1183,
6130 -1, -1, 1186, -1, -1, 1101, 1102, -1, -1, 1105,
6131 -1, -1, -1, -1, -1, -1, -1, -1, -1, 1349,
6132 554, 1205, -1, 1353, -1, 1355, 1122, -1, -1, 1423,
6133 -1, 52, 53, -1, -1, -1, -1, -1, -1, 1033,
6134 1034, -1, -1, 1227, -1, -1, 67, -1, -1, 1101,
6135 1102, -1, -1, 1105, -1, -1, -1, -1, 1242, 1423,
6136 -1, -1, 1158, -1, 598, 599, -1, 601, 602, -1,
6137 1122, -1, -1, -1, -1, -1, 610, -1, -1, -1,
6138 -1, 615, 103, 104, -1, -1, 107, -1, -1, -1,
6139 -1, 112, -1, 1423, -1, 1191, -1, -1, 1194, -1,
6140 -1, -1, -1, -1, -1, -1, 1158, 1101, 1102, -1,
6141 -1, 1105, 1208, -1, 1210, -1, -1, 1213, 1214, -1,
6142 -1, -1, 1218, 1219, 1308, 659, -1, 661, 1122, -1,
6143 -1, 1315, 1316, -1, -1, 669, 1320, -1, -1, 1191,
6144 -1, -1, 1194, -1, -1, -1, 680, -1, 682, 683,
6145 -1, -1, -1, -1, -1, -1, 1208, -1, 1210, 693,
6146 694, 1213, 1214, -1, 1158, -1, 1218, 1219, -1, -1,
6147 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6148 -1, -1, -1, 1033, 1034, 719, 1370, -1, -1, -1,
6149 -1, 1287, -1, 727, -1, -1, -1, 1191, -1, -1,
6150 1194, -1, -1, -1, -1, -1, -1, -1, -1, 230,
6151 -1, -1, -1, -1, 1208, -1, 1210, -1, -1, 1213,
6152 1214, -1, -1, -1, 1218, 1219, -1, -1, -1, -1,
6153 -1, -1, -1, -1, 255, 1287, 257, -1, -1, 260,
6154 261, -1, -1, -1, -1, 266, -1, -1, -1, -1,
6155 -1, 1101, 1102, 1349, -1, 1105, -1, 1353, -1, 1355,
6156 -1, -1, -1, -1, 285, -1, -1, -1, -1, -1,
6157 -1, -1, 1122, -1, -1, -1, -1, -1, -1, -1,
6158 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6159 -1, -1, -1, 1287, -1, -1, -1, 1349, -1, -1,
6160 -1, 1353, -1, 1355, -1, -1, -1, -1, 1158, -1,
6161 -1, -1, -1, -1, 335, 336, 337, 338, 339, 340,
6162 -1, 342, 343, -1, -1, -1, -1, 1423, 862, -1,
6163 864, 865, -1, -1, -1, -1, -1, -1, -1, -1,
6164 -1, 1191, 363, -1, 1194, -1, -1, -1, -1, -1,
6165 -1, -1, -1, -1, -1, 1349, -1, -1, 1208, 1353,
6166 1210, 1355, -1, 1213, 1214, -1, -1, -1, 1218, 1219,
6167 1, 1423, -1, -1, -1, -1, -1, -1, -1, 400,
6168 -1, -1, 403, -1, 15, 16, -1, -1, 409, 410,
6169 411, -1, -1, -1, -1, 929, -1, -1, -1, -1,
6170 -1, -1, -1, -1, 425, -1, -1, -1, -1, -1,
6171 -1, -1, 946, -1, -1, -1, -1, 951, 952, -1,
6172 -1, 52, 53, 957, 958, 56, -1, -1, -1, 1423,
6173 451, -1, 966, 967, -1, -1, -1, 1287, 33, 34,
6174 35, 36, -1, -1, -1, -1, -1, -1, 982, -1,
6175 -1, -1, 473, -1, 49, 50, 51, -1, 89, -1,
6176 -1, -1, -1, -1, 59, 60, 61, 62, 63, -1,
6177 -1, -1, -1, -1, -1, -1, -1, 108, 109, 110,
6178 -1, 112, -1, -1, -1, -1, -1, 508, -1, -1,
6179 1024, 1025, 1026, -1, -1, -1, -1, -1, -1, 1349,
6180 -1, -1, -1, 1353, -1, 1355, 527, 1041, -1, -1,
6181 -1, -1, -1, -1, -1, 110, 111, 112, 113, 114,
6182 115, 116, 117, 118, 1058, -1, -1, -1, -1, -1,
6183 -1, -1, -1, 554, -1, -1, -1, -1, -1, -1,
6184 -1, 78, 79, 80, 81, 82, 83, 84, 1082, -1,
6185 87, 88, 147, -1, -1, -1, -1, -1, 95, 96,
6186 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6187 -1, -1, -1, 1423, -1, -1, -1, 598, 599, -1,
6188 601, 602, -1, -1, -1, -1, -1, -1, -1, 610,
6189 -1, -1, -1, -1, 615, -1, -1, -1, -1, 230,
6190 137, 138, 139, 140, 141, 142, 143, 144, 145, 146,
6191 -1, -1, -1, -1, -1, -1, 1150, -1, -1, 1153,
6192 1154, -1, -1, -1, 255, 1159, 257, -1, -1, -1,
6193 -1, -1, -1, -1, -1, 266, -1, -1, 659, -1,
6194 661, -1, -1, -1, -1, -1, -1, -1, 669, 1183,
6195 -1, -1, 1186, -1, 285, -1, -1, -1, -1, 680,
6196 -1, 682, 683, -1, -1, -1, -1, -1, -1, -1,
6197 -1, 1205, 693, 694, 305, -1, -1, -1, -1, -1,
6198 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6199 -1, -1, -1, 1227, -1, -1, -1, -1, 719, -1,
6200 -1, -1, -1, -1, 335, 336, 727, -1, 1242, 0,
6201 -1, -1, -1, -1, -1, -1, -1, 8, 9, 10,
6202 -1, -1, 13, 14, 15, -1, 17, -1, -1, -1,
6203 -1, -1, 363, 364, 25, 26, 27, -1, -1, -1,
6204 -1, -1, -1, 1, -1, -1, 37, 38, -1, 40,
6205 41, 42, 43, 44, -1, -1, -1, 15, 16, -1,
6206 -1, -1, -1, -1, -1, -1, -1, -1, -1, 400,
6207 -1, -1, 403, -1, 1308, -1, -1, 68, 69, 410,
6208 411, 1315, 1316, -1, -1, -1, 1320, -1, -1, -1,
6209 -1, -1, -1, -1, 52, 53, -1, -1, 56, -1,
6210 -1, -1, -1, -1, -1, -1, 97, 98, -1, -1,
6211 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6212 451, -1, -1, -1, -1, -1, -1, -1, -1, 120,
6213 -1, 89, -1, -1, -1, -1, 1370, -1, -1, -1,
6214 -1, 862, 473, 864, 865, -1, -1, -1, -1, -1,
6215 108, 109, 110, -1, 112, -1, -1, -1, -1, -1,
6216 151, 152, -1, 154, -1, -1, 157, 158, -1, 160,
6217 -1, -1, -1, -1, -1, -1, -1, 508, -1, -1,
6218 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6219 -1, -1, -1, -1, 525, -1, 527, -1, -1, -1,
6220 -1, -1, -1, -1, -1, -1, -1, -1, 929, -1,
6221 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6222 -1, -1, -1, 554, -1, 946, -1, -1, -1, -1,
6223 951, 952, -1, -1, -1, -1, 957, 958, -1, -1,
6224 -1, -1, -1, -1, -1, 966, 967, -1, -1, -1,
6225 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6226 -1, 982, -1, -1, -1, -1, -1, -1, 599, -1,
6227 -1, 602, 230, -1, -1, -1, -1, -1, -1, -1,
6228 -1, 612, -1, -1, 615, -1, -1, -1, -1, -1,
6229 -1, -1, -1, -1, -1, -1, -1, 255, -1, 257,
6230 -1, -1, -1, 1024, 1025, 1026, -1, -1, 266, -1,
6231 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6232 1041, -1, -1, -1, -1, -1, -1, 285, 659, -1,
6233 661, -1, -1, -1, -1, -1, -1, 1058, 669, -1,
6234 -1, -1, -1, -1, -1, -1, -1, 305, -1, 680,
6235 -1, 682, 1, -1, -1, -1, -1, -1, -1, -1,
6236 -1, 1082, 693, 694, -1, -1, -1, -1, -1, -1,
6237 -1, -1, -1, -1, -1, 44, -1, 335, 336, -1,
6238 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6239 -1, -1, -1, -1, -1, -1, 727, -1, -1, -1,
6240 -1, -1, 733, 52, 53, 363, 364, 56, -1, 78,
6241 79, 80, 81, 82, 83, 84, 85, 86, 87, 88,
6242 89, 90, -1, -1, -1, -1, 95, 96, -1, 1150,
6243 -1, -1, 1153, 1154, -1, -1, -1, -1, 1159, -1,
6244 89, -1, 400, -1, -1, 403, -1, -1, -1, -1,
6245 -1, -1, 410, 411, -1, -1, -1, -1, -1, 108,
6246 109, 110, 1183, -1, -1, 1186, 135, -1, 137, 138,
6247 139, 140, 141, 142, 143, 144, 145, 146, -1, -1,
6248 -1, 812, -1, -1, 1205, -1, 155, -1, -1, -1,
6249 -1, -1, -1, 451, 78, 79, 80, 81, 82, 83,
6250 84, 85, -1, 87, 88, -1, 1227, -1, -1, -1,
6251 -1, 95, 96, -1, -1, 473, -1, -1, -1, -1,
6252 -1, 1242, -1, -1, -1, -1, -1, -1, -1, -1,
6253 -1, -1, -1, -1, 865, -1, -1, -1, -1, -1,
6254 -1, -1, -1, -1, -1, -1, -1, -1, 25, -1,
6255 508, -1, -1, 137, 138, 139, 140, 141, 142, 143,
6256 144, 145, 146, -1, -1, -1, -1, 525, -1, 527,
6257 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6258 -1, 230, 1, -1, -1, -1, -1, 1308, -1, -1,
6259 -1, -1, -1, -1, 1315, 1316, 554, -1, -1, 1320,
6260 -1, 78, 79, 80, 81, 82, 83, 84, 85, 86,
6261 87, 88, 89, 90, -1, 946, -1, 266, 95, 96,
6262 951, 952, -1, -1, 101, -1, 957, 958, -1, -1,
6263 -1, -1, -1, 52, 53, 966, 285, 56, -1, -1,
6264 -1, 599, -1, -1, 602, -1, -1, -1, -1, 1370,
6265 -1, 982, -1, -1, 612, -1, 305, 615, 135, -1,
6266 137, 138, 139, 140, 141, 142, 143, 144, 145, 146,
6267 89, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6268 -1, -1, -1, -1, -1, -1, 335, 336, -1, 108,
6269 109, 110, 111, 1024, 1025, 1026, -1, -1, -1, -1,
6270 -1, 659, -1, 661, 44, -1, -1, -1, -1, -1,
6271 1041, 669, -1, -1, 363, 364, -1, -1, -1, -1,
6272 -1, -1, 680, -1, 682, -1, -1, 1058, -1, -1,
6273 1, -1, -1, -1, -1, 693, 694, -1, 78, 79,
6274 80, 81, 82, 83, 84, 85, 86, 87, 88, 89,
6275 90, 1082, -1, -1, 403, 95, 96, -1, -1, -1,
6276 -1, 410, 411, -1, -1, -1, -1, -1, -1, 727,
6277 -1, -1, -1, -1, -1, 733, -1, -1, -1, -1,
6278 -1, 52, 53, -1, -1, -1, -1, -1, -1, -1,
6279 -1, -1, -1, -1, -1, 135, -1, 137, 138, 139,
6280 140, 141, 142, 143, 144, 145, 146, -1, -1, -1,
6281 -1, 230, -1, -1, -1, 1146, -1, -1, -1, 1150,
6282 -1, -1, 1153, 1154, -1, -1, -1, -1, 1159, -1,
6283 -1, -1, -1, -1, -1, -1, -1, 108, -1, -1,
6284 -1, -1, -1, -1, -1, -1, -1, 266, -1, -1,
6285 -1, -1, 1183, -1, 812, 1186, -1, -1, -1, 508,
6286 -1, -1, -1, -1, -1, -1, 285, -1, -1, -1,
6287 -1, -1, -1, -1, -1, -1, 525, -1, -1, -1,
6288 -1, -1, -1, -1, -1, -1, 305, -1, -1, -1,
6289 -1, -1, -1, -1, -1, -1, 1227, -1, -1, -1,
6290 -1, -1, -1, -1, -1, 554, -1, 865, -1, -1,
6291 -1, 1242, -1, -1, -1, -1, 335, 336, -1, -1,
6292 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6293 -1, -1, -1, -1, -1, -1, -1, 1268, -1, -1,
6294 -1, -1, -1, -1, 363, 364, -1, -1, -1, -1,
6295 599, -1, -1, 602, -1, -1, -1, -1, -1, 230,
6296 -1, -1, -1, 612, -1, -1, 615, -1, -1, -1,
6297 -1, -1, -1, -1, -1, -1, -1, 1308, -1, -1,
6298 -1, -1, -1, -1, 403, -1, -1, -1, 946, 1320,
6299 -1, 410, 411, 951, 952, 266, -1, -1, -1, 957,
6300 958, -1, -1, -1, -1, -1, -1, -1, 966, 1340,
6301 659, -1, 661, -1, 285, -1, -1, -1, -1, -1,
6302 -1, -1, -1, -1, 982, -1, -1, -1, -1, -1,
6303 -1, -1, -1, 682, -1, -1, -1, -1, -1, 1370,
6304 -1, -1, -1, -1, 693, 694, -1, -1, -1, -1,
6305 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6306 -1, -1, -1, -1, 335, 336, 1024, 1025, 1026, -1,
6307 -1, -1, -1, -1, -1, -1, -1, -1, 727, -1,
6308 -1, -1, -1, 1041, 733, -1, -1, -1, -1, 508,
6309 -1, -1, 363, 742, -1, -1, -1, -1, -1, -1,
6310 1058, -1, -1, -1, -1, 1, 525, -1, -1, -1,
6311 -1, -1, -1, -1, -1, -1, -1, 52, 53, -1,
6312 -1, 56, -1, -1, 1082, -1, -1, -1, -1, -1,
6313 -1, -1, 403, -1, -1, 554, -1, -1, -1, 410,
6314 411, 76, 77, 78, 79, 80, 81, 82, 83, 84,
6315 -1, -1, 87, 88, -1, -1, 52, 53, 93, 94,
6316 95, 96, -1, 812, -1, -1, -1, -1, -1, -1,
6317 -1, -1, 107, 108, -1, -1, -1, -1, -1, -1,
6318 599, -1, -1, 602, -1, -1, -1, -1, 1146, -1,
6319 -1, -1, 1150, 612, -1, 1153, 1154, -1, -1, -1,
6320 -1, 1159, 137, 138, 139, 140, 141, 142, 143, 144,
6321 145, 146, -1, 148, 149, -1, 865, -1, -1, -1,
6322 -1, 156, 157, -1, -1, 1183, -1, -1, 1186, 78,
6323 79, 80, 81, 82, 83, 84, -1, 508, 87, 88,
6324 659, -1, 661, -1, -1, -1, 95, 96, -1, -1,
6325 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6326 -1, -1, -1, 682, -1, -1, -1, -1, -1, 1227,
6327 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6328 -1, -1, -1, 554, 1242, -1, -1, -1, 137, 138,
6329 139, 140, 141, 142, 143, 144, 145, 146, -1, -1,
6330 -1, -1, 951, 952, -1, -1, -1, -1, 957, 958,
6331 1268, -1, -1, -1, 733, -1, -1, 966, -1, -1,
6332 -1, -1, -1, -1, -1, -1, -1, -1, 599, -1,
6333 -1, 602, -1, 982, 230, -1, -1, -1, -1, -1,
6334 -1, -1, -1, -1, 615, -1, -1, -1, -1, -1,
6335 1308, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6336 -1, -1, 1320, -1, -1, -1, -1, -1, -1, -1,
6337 266, -1, -1, -1, -1, 1024, 1025, 1026, -1, -1,
6338 -1, -1, 1340, -1, -1, -1, -1, -1, 659, 285,
6339 661, -1, 1041, 812, -1, -1, -1, -1, -1, -1,
6340 -1, -1, 33, 34, 35, 36, -1, -1, -1, 1058,
6341 -1, 682, 1370, -1, -1, -1, -1, -1, 49, 50,
6342 51, 52, 693, 694, -1, 56, -1, 58, 59, 60,
6343 61, 62, 63, 1082, -1, -1, -1, -1, -1, 335,
6344 336, -1, -1, -1, -1, -1, 865, 78, -1, -1,
6345 -1, -1, -1, -1, -1, -1, 727, -1, -1, -1,
6346 91, 92, -1, -1, -1, -1, -1, 363, 99, -1,
6347 -1, 102, -1, 104, 105, -1, 107, 108, -1, 110,
6348 111, 112, 113, 114, 115, 116, 117, 118, -1, -1,
6349 -1, -1, -1, -1, -1, -1, -1, 1146, -1, -1,
6350 -1, 1150, -1, -1, 1153, 1154, -1, 403, -1, 140,
6351 1159, -1, -1, -1, 410, 411, 147, -1, -1, -1,
6352 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6353 -1, -1, -1, -1, 1183, -1, -1, 1186, -1, -1,
6354 52, 53, -1, -1, 56, -1, -1, 966, -1, -1,
6355 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6356 -1, -1, -1, 982, 76, 77, 78, 79, 80, 81,
6357 82, 83, 84, -1, -1, 87, 88, -1, 1227, -1,
6358 -1, 93, 94, 95, 96, -1, -1, -1, -1, -1,
6359 -1, -1, -1, 1242, 865, 107, 108, -1, -1, -1,
6360 -1, -1, -1, -1, -1, 1024, 1025, -1, -1, -1,
6361 -1, -1, 508, -1, -1, -1, -1, -1, -1, 1268,
6362 -1, 15, 16, -1, -1, 137, 138, 139, 140, 141,
6363 142, 143, 144, 145, 146, -1, 148, 149, -1, 1058,
6364 -1, -1, -1, -1, 156, -1, -1, -1, -1, -1,
6365 -1, -1, -1, 47, 48, 49, 50, -1, 554, -1,
6366 54, 55, -1, 1082, -1, -1, -1, -1, -1, -1,
6367 -1, 1320, -1, 67, 68, -1, -1, -1, -1, -1,
6368 951, 952, -1, -1, -1, -1, 957, 958, -1, -1,
6369 -1, 1340, -1, -1, -1, 966, -1, -1, -1, -1,
6370 -1, -1, -1, 599, -1, -1, 602, -1, -1, -1,
6371 -1, 982, -1, -1, -1, -1, -1, -1, 112, 615,
6372 -1, 1370, -1, -1, -1, -1, -1, 1146, -1, -1,
6373 -1, 1150, -1, -1, 1153, 1154, -1, -1, -1, -1,
6374 1159, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6375 -1, -1, -1, 1024, 1025, 1026, -1, -1, -1, -1,
6376 -1, -1, -1, 659, 1183, 661, -1, 1186, -1, -1,
6377 1041, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6378 -1, -1, -1, -1, -1, -1, 682, 1058, -1, -1,
6379 -1, -1, -1, -1, -1, -1, -1, 693, 694, -1,
6380 -1, -1, -1, -1, -1, -1, -1, -1, 1227, -1,
6381 -1, 1082, -1, -1, -1, -1, -1, -1, -1, -1,
6382 -1, -1, -1, 1242, -1, -1, -1, -1, -1, -1,
6383 -1, 727, -1, -1, 228, -1, -1, 231, 232, 233,
6384 -1, 235, -1, -1, -1, -1, -1, -1, -1, 1268,
6385 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6386 -1, 255, -1, 257, -1, -1, -1, -1, -1, -1,
6387 -1, -1, -1, -1, -1, 1146, -1, -1, -1, 1150,
6388 -1, -1, 1153, 1154, -1, -1, -1, -1, 1159, -1,
6389 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6390 -1, 1320, -1, -1, -1, -1, -1, -1, -1, -1,
6391 -1, -1, 1183, -1, -1, 1186, -1, -1, -1, -1,
6392 -1, 1340, -1, -1, -1, -1, -1, -1, -1, -1,
6393 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6394 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6395 -1, 1370, -1, -1, -1, -1, 1227, -1, -1, -1,
6396 -1, -1, -1, -1, -1, -1, -1, -1, -1, 865,
6397 -1, 1242, -1, -1, 368, 369, 370, 371, 372, -1,
6398 -1, 375, 376, 377, 378, 379, 380, 381, 382, -1,
6399 384, -1, -1, 387, 388, 389, 390, 391, 392, 393,
6400 394, 395, 396, -1, 52, 53, 400, -1, 56, -1,
6401 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6402 -1, -1, -1, -1, -1, -1, -1, -1, 76, 77,
6403 78, 79, 80, 81, 82, 83, 84, -1, -1, 87,
6404 88, -1, -1, -1, -1, 93, 94, 95, 96, 1320,
6405 -1, -1, -1, -1, -1, 951, 952, 451, -1, 107,
6406 108, 957, 958, -1, -1, -1, -1, -1, -1, -1,
6407 966, -1, -1, -1, 468, 469, -1, -1, -1, 473,
6408 -1, -1, -1, 477, -1, 479, 982, -1, -1, 137,
6409 138, 139, 140, 141, 142, 143, 144, 145, 146, 1370,
6410 148, 149, -1, 497, -1, -1, -1, -1, 156, -1,
6411 -1, -1, -1, -1, -1, -1, -1, -1, 512, -1,
6412 -1, 515, -1, -1, -1, -1, -1, -1, 1024, 1025,
6413 1026, -1, -1, 527, -1, -1, -1, -1, -1, -1,
6414 -1, -1, -1, -1, -1, 1041, -1, -1, -1, -1,
6415 -1, 545, -1, 33, 34, 35, 36, -1, -1, -1,
6416 -1, -1, 1058, -1, -1, -1, -1, -1, -1, 49,
6417 50, 51, 52, -1, -1, -1, 56, -1, -1, 59,
6418 60, 61, 62, 63, -1, -1, 1082, -1, -1, -1,
6419 -1, -1, -1, -1, -1, -1, 590, -1, -1, -1,
6420 -1, -1, -1, -1, 598, -1, -1, 601, -1, -1,
6421 -1, 91, 92, -1, -1, -1, 610, -1, -1, 99,
6422 -1, 615, 102, -1, 104, 105, -1, 107, -1, -1,
6423 110, 111, 112, 113, 114, 115, 116, 117, 118, -1,
6424 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6425 -1, -1, -1, -1, 1150, -1, -1, 1153, 1154, -1,
6426 140, -1, -1, 1159, -1, -1, -1, 147, -1, -1,
6427 -1, -1, -1, -1, -1, 669, -1, -1, -1, -1,
6428 -1, -1, -1, -1, -1, -1, 680, 1183, -1, -1,
6429 1186, -1, -1, -1, -1, -1, -1, -1, -1, 693,
6430 694, -1, -1, 697, 698, -1, -1, -1, -1, -1,
6431 -1, -1, -1, -1, -1, 709, 710, -1, -1, 713,
6432 -1, 715, -1, -1, -1, -1, -1, -1, 722, 723,
6433 -1, 1227, -1, 727, -1, -1, -1, -1, -1, -1,
6434 -1, -1, -1, -1, -1, -1, 1242, -1, -1, -1,
6435 0, 1, -1, 3, 4, 5, 6, 7, 8, 9,
6436 10, 11, 12, -1, 14, 15, 16, 17, 18, 19,
6437 20, 21, 22, 23, 24, 25, -1, -1, -1, 773,
6438 30, 31, 32, 33, 34, 35, 36, -1, -1, 39,
6439 -1, -1, -1, -1, -1, 45, 46, 47, 48, 49,
6440 50, 51, 52, 53, 54, 55, 56, 57, 802, 59,
6441 60, 61, 62, 63, 64, 65, -1, -1, 68, -1,
6442 -1, -1, -1, -1, 1320, -1, 76, 77, -1, -1,
6443 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6444 834, 91, 92, -1, -1, -1, -1, -1, -1, 99,
6445 -1, -1, 102, 103, 104, 105, -1, 107, 852, -1,
6446 110, 111, 112, 113, 114, 115, 116, 117, 118, -1,
6447 120, -1, -1, -1, 1370, -1, -1, -1, -1, -1,
6448 -1, -1, -1, -1, -1, -1, -1, -1, 882, -1,
6449 -1, -1, -1, -1, -1, -1, -1, 147, 148, 149,
6450 -1, -1, 152, 33, 34, 35, 36, -1, 158, -1,
6451 160, -1, -1, -1, -1, -1, -1, -1, -1, 49,
6452 50, 51, 52, -1, -1, -1, 56, -1, -1, 59,
6453 60, 61, 62, 63, -1, 929, -1, -1, -1, -1,
6454 -1, -1, -1, -1, 938, -1, -1, -1, -1, -1,
6455 -1, -1, 946, -1, -1, -1, 950, 951, 952, -1,
6456 -1, 91, 92, 957, 958, -1, -1, 961, -1, 99,
6457 -1, -1, 102, -1, 104, 105, -1, -1, -1, 973,
6458 110, 111, 112, 113, 114, 115, 116, 117, 118, -1,
6459 -1, -1, -1, -1, -1, -1, -1, 991, 992, -1,
6460 994, 995, -1, 997, -1, 999, -1, -1, -1, -1,
6461 140, -1, -1, -1, -1, -1, -1, 147, -1, -1,
6462 -1, -1, -1, -1, 1018, 1019, -1, -1, 1022, -1,
6463 -1, -1, 1026, 1027, 0, 1, -1, 3, 4, 5,
6464 6, 7, -1, -1, -1, 11, 12, 1041, -1, -1,
6465 16, -1, 18, 19, 20, 21, 22, 23, 24, -1,
6466 -1, -1, -1, 1057, 30, 31, 32, 33, 34, 35,
6467 36, 1065, -1, 39, -1, -1, -1, -1, -1, 45,
6468 46, 47, 48, 49, 50, 51, 52, 53, 54, 55,
6469 56, 57, -1, 59, 60, 61, 62, 63, 64, 65,
6470 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6471 76, 77, -1, -1, -1, -1, -1, -1, -1, -1,
6472 -1, -1, -1, -1, -1, 91, 92, -1, -1, -1,
6473 -1, -1, -1, 99, -1, -1, 102, 103, 104, 105,
6474 -1, 107, -1, -1, 110, 111, 112, 113, 114, 115,
6475 116, 117, 118, -1, 120, -1, -1, -1, -1, -1,
6476 -1, 1155, -1, -1, -1, -1, -1, -1, -1, -1,
6477 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6478 -1, 147, 148, 149, -1, -1, 0, 1, 154, 3,
6479 4, 5, 6, 7, 160, -1, -1, 11, 12, -1,
6480 -1, -1, 16, -1, 18, 19, 20, 21, 22, 23,
6481 24, -1, -1, -1, -1, -1, 30, 31, 32, 33,
6482 34, 35, 36, -1, -1, 39, -1, -1, -1, -1,
6483 -1, 45, 46, 47, 48, 49, 50, 51, 52, 53,
6484 54, 55, 56, 57, -1, 59, 60, 61, 62, 63,
6485 64, 65, -1, -1, -1, -1, -1, -1, -1, -1,
6486 -1, -1, 76, 77, -1, -1, -1, -1, -1, -1,
6487 -1, -1, -1, -1, -1, -1, -1, 91, 92, -1,
6488 -1, -1, -1, -1, -1, 99, -1, -1, 102, 103,
6489 104, 105, -1, 107, -1, -1, 110, 111, 112, 113,
6490 114, 115, 116, 117, 118, -1, -1, -1, -1, -1,
6491 -1, -1, -1, -1, 1308, -1, -1, -1, -1, -1,
6492 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6493 -1, -1, -1, 147, 148, 149, -1, -1, 0, 1,
6494 154, 3, 4, 5, 6, 7, 160, -1, -1, 11,
6495 12, -1, -1, -1, 16, -1, 18, 19, 20, 21,
6496 22, 23, 24, -1, -1, -1, -1, -1, 30, 31,
6497 32, 33, 34, 35, 36, -1, -1, 39, -1, -1,
6498 -1, -1, -1, 45, 46, 47, 48, 49, 50, 51,
6499 52, 53, 54, 55, 56, 57, -1, 59, 60, 61,
6500 62, 63, 64, 65, -1, -1, -1, -1, -1, -1,
6501 -1, -1, -1, -1, 76, 77, -1, -1, -1, -1,
6502 -1, -1, -1, -1, -1, -1, -1, -1, -1, 91,
6503 92, -1, -1, -1, -1, -1, -1, 99, -1, -1,
6504 102, 103, 104, 105, -1, 107, -1, -1, 110, 111,
6505 112, 113, 114, 115, 116, 117, 118, -1, -1, -1,
6506 -1, -1, -1, -1, -1, -1, 0, -1, -1, -1,
6507 -1, -1, -1, -1, 8, 9, 10, -1, -1, 13,
6508 14, 15, -1, 17, -1, 147, 148, 149, -1, -1,
6509 152, 25, 26, 27, 28, 29, -1, -1, 160, -1,
6510 -1, -1, -1, 37, 38, -1, 40, 41, 42, 43,
6511 44, -1, -1, -1, 78, 79, 80, 81, 82, 83,
6512 84, 85, 86, 87, 88, 89, 90, -1, -1, -1,
6513 -1, 95, 96, -1, 68, 69, -1, -1, -1, -1,
6514 -1, -1, -1, -1, 78, 79, 80, 81, 82, 83,
6515 84, 85, 86, 87, 88, 89, 90, -1, -1, -1,
6516 -1, 95, 96, 97, 98, -1, 100, 101, -1, -1,
6517 -1, 135, 106, 137, 138, 139, 140, 141, 142, 143,
6518 144, 145, 146, -1, -1, -1, 120, -1, -1, 123,
6519 154, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6520 134, 135, 136, 137, 138, 139, 140, 141, 142, 143,
6521 144, 145, 146, -1, -1, -1, -1, 151, 152, 153,
6522 154, 155, 0, -1, 158, 159, 160, -1, -1, -1,
6523 8, 9, 10, -1, -1, 13, 14, 15, -1, 17,
6524 -1, -1, -1, -1, -1, -1, -1, 25, -1, 27,
6525 28, 29, -1, -1, -1, -1, -1, -1, -1, 37,
6526 38, -1, 40, 41, 42, 43, 44, -1, -1, -1,
6527 78, 79, 80, 81, 82, 83, 84, 85, 86, 87,
6528 88, 89, 90, -1, -1, -1, -1, 95, 96, -1,
6529 68, 69, -1, -1, -1, -1, -1, -1, -1, -1,
6530 78, 79, 80, 81, 82, 83, 84, 85, 86, 87,
6531 88, 89, 90, -1, -1, -1, -1, 95, 96, 97,
6532 98, -1, 100, 101, -1, -1, -1, 135, 106, 137,
6533 138, 139, 140, 141, 142, 143, 144, 145, 146, -1,
6534 -1, -1, 120, -1, -1, 123, -1, -1, -1, -1,
6535 -1, -1, -1, -1, -1, -1, 134, 135, 136, 137,
6536 138, 139, 140, 141, 142, 143, 144, 145, 146, -1,
6537 -1, -1, -1, -1, 152, 153, 154, 155, 0, -1,
6538 158, 159, 160, -1, -1, -1, 8, 9, 10, -1,
6539 -1, 13, 14, 15, -1, 17, -1, -1, -1, -1,
6540 -1, -1, -1, 25, -1, 27, 28, 29, -1, -1,
6541 -1, -1, -1, -1, -1, 37, 38, -1, 40, 41,
6542 42, 43, 44, -1, -1, -1, 78, 79, 80, 81,
6543 82, 83, 84, 85, 86, 87, 88, 89, 90, -1,
6544 -1, -1, -1, 95, 96, -1, 68, 69, -1, -1,
6545 -1, -1, -1, -1, -1, -1, 78, 79, 80, 81,
6546 82, 83, 84, 85, 86, 87, 88, 89, 90, -1,
6547 -1, -1, -1, 95, 96, 97, 98, -1, 100, 101,
6548 -1, -1, -1, -1, 106, 137, 138, 139, 140, 141,
6549 142, 143, 144, 145, 146, -1, -1, -1, 120, -1,
6550 -1, 123, -1, -1, -1, -1, -1, -1, -1, -1,
6551 -1, -1, 134, 135, 136, 137, 138, 139, 140, 141,
6552 142, 143, 144, 145, 146, -1, -1, -1, -1, -1,
6553 152, 153, 154, 155, 0, -1, 158, 159, 160, -1,
6554 -1, -1, 8, 9, 10, -1, -1, 13, 14, 15,
6555 -1, 17, -1, -1, -1, -1, -1, -1, -1, 25,
6556 26, 27, 28, 29, -1, -1, -1, -1, -1, -1,
6557 -1, 37, 38, -1, 40, 41, 42, 43, 44, -1,
6558 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6559 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6560 -1, -1, 68, 69, -1, -1, -1, -1, -1, -1,
6561 -1, -1, 78, 79, 80, 81, 82, 83, 84, 85,
6562 86, 87, 88, 89, 90, -1, -1, -1, -1, 95,
6563 96, 97, 98, -1, -1, 101, -1, -1, -1, -1,
6564 106, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6565 -1, -1, -1, -1, 120, -1, -1, 123, -1, -1,
6566 -1, -1, -1, -1, -1, -1, -1, -1, -1, 135,
6567 136, 137, 138, 139, 140, 141, 142, 143, 144, 145,
6568 146, -1, -1, -1, -1, 151, 152, 153, 154, 155,
6569 0, -1, 158, 159, 160, -1, -1, -1, 8, 9,
6570 10, -1, -1, 13, 14, 15, -1, 17, -1, -1,
6571 -1, -1, -1, -1, -1, 25, 26, 27, 28, 29,
6572 -1, -1, -1, -1, -1, -1, -1, 37, 38, -1,
6573 40, 41, 42, 43, 44, -1, -1, -1, -1, -1,
6574 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6575 -1, -1, -1, -1, -1, -1, -1, -1, 68, 69,
6576 -1, -1, -1, -1, -1, -1, -1, -1, 78, 79,
6577 80, 81, 82, 83, 84, 85, 86, 87, 88, 89,
6578 90, -1, -1, -1, -1, 95, 96, 97, 98, -1,
6579 -1, 101, -1, -1, -1, -1, 106, -1, -1, -1,
6580 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6581 120, -1, -1, 123, -1, -1, -1, -1, -1, -1,
6582 -1, -1, -1, -1, -1, 135, 136, 137, 138, 139,
6583 140, 141, 142, 143, 144, 145, 146, -1, -1, -1,
6584 -1, 151, 152, 153, 154, 155, 0, -1, 158, 159,
6585 160, -1, -1, -1, 8, 9, 10, -1, -1, 13,
6586 14, 15, -1, 17, -1, -1, -1, -1, -1, -1,
6587 -1, 25, 26, 27, 28, -1, -1, -1, -1, -1,
6588 -1, -1, -1, 37, 38, -1, 40, 41, 42, 43,
6589 44, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6590 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6591 -1, -1, -1, -1, 68, 69, -1, -1, -1, -1,
6592 -1, -1, -1, -1, 78, 79, 80, 81, 82, 83,
6593 84, 85, 86, 87, 88, 89, 90, -1, -1, -1,
6594 -1, 95, 96, 97, 98, -1, -1, 101, -1, -1,
6595 -1, -1, 106, -1, -1, -1, -1, -1, -1, -1,
6596 -1, -1, -1, -1, -1, -1, 120, -1, -1, -1,
6597 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6598 -1, 135, -1, 137, 138, 139, 140, 141, 142, 143,
6599 144, 145, 146, -1, -1, -1, -1, 151, 152, 153,
6600 154, 155, 0, 157, 158, 159, 160, -1, -1, -1,
6601 8, 9, 10, -1, -1, 13, 14, 15, -1, 17,
6602 -1, -1, -1, -1, -1, -1, -1, 25, -1, 27,
6603 28, 29, -1, -1, -1, -1, -1, -1, -1, 37,
6604 38, -1, 40, 41, 42, 43, 44, -1, -1, -1,
6605 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6606 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6607 68, 69, -1, -1, -1, -1, -1, -1, -1, -1,
6608 78, 79, 80, 81, 82, 83, 84, 85, 86, 87,
6609 88, 89, 90, -1, -1, -1, -1, 95, 96, 97,
6610 98, -1, -1, 101, -1, -1, -1, -1, 106, -1,
6611 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6612 -1, -1, 120, -1, -1, 123, -1, -1, -1, -1,
6613 -1, -1, -1, -1, -1, -1, -1, 135, 136, 137,
6614 138, 139, 140, 141, 142, 143, 144, 145, 146, -1,
6615 -1, -1, -1, -1, 152, 153, 154, 155, 0, -1,
6616 158, 159, 160, -1, -1, -1, 8, 9, 10, -1,
6617 -1, 13, 14, 15, -1, 17, -1, -1, -1, -1,
6618 -1, -1, -1, 25, 26, 27, 28, -1, -1, -1,
6619 -1, -1, -1, -1, -1, 37, 38, -1, 40, 41,
6620 42, 43, 44, -1, -1, -1, -1, -1, -1, -1,
6621 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6622 -1, -1, -1, -1, -1, -1, 68, 69, -1, -1,
6623 -1, -1, -1, -1, -1, -1, 78, 79, 80, 81,
6624 82, 83, 84, 85, 86, 87, 88, 89, 90, -1,
6625 -1, -1, -1, 95, 96, 97, 98, -1, -1, 101,
6626 -1, -1, -1, -1, 106, -1, -1, -1, -1, -1,
6627 -1, -1, -1, -1, -1, -1, -1, -1, 120, -1,
6628 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6629 -1, -1, -1, 135, -1, 137, 138, 139, 140, 141,
6630 142, 143, 144, 145, 146, -1, -1, -1, -1, 151,
6631 152, 153, 154, 155, 0, 157, 158, 159, 160, -1,
6632 -1, -1, 8, 9, 10, -1, -1, 13, 14, 15,
6633 -1, 17, -1, -1, -1, -1, -1, -1, -1, 25,
6634 -1, 27, 28, -1, -1, -1, -1, -1, -1, -1,
6635 -1, 37, 38, -1, 40, 41, 42, 43, 44, -1,
6636 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6637 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6638 -1, -1, 68, 69, -1, -1, -1, -1, -1, -1,
6639 -1, -1, 78, 79, 80, 81, 82, 83, 84, 85,
6640 86, 87, 88, 89, 90, -1, -1, -1, -1, 95,
6641 96, 97, 98, -1, 100, 101, -1, -1, -1, -1,
6642 106, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6643 -1, -1, -1, -1, 120, -1, -1, -1, -1, -1,
6644 -1, -1, -1, -1, -1, -1, -1, -1, 134, 135,
6645 -1, 137, 138, 139, 140, 141, 142, 143, 144, 145,
6646 146, -1, -1, -1, -1, 151, 152, 153, 154, 155,
6647 0, -1, 158, 159, 160, -1, -1, -1, 8, 9,
6648 10, -1, -1, 13, 14, 15, -1, 17, -1, -1,
6649 -1, -1, -1, -1, -1, 25, -1, 27, 28, -1,
6650 -1, -1, -1, -1, -1, -1, -1, 37, 38, -1,
6651 40, 41, 42, 43, 44, -1, -1, -1, -1, -1,
6652 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6653 -1, -1, -1, -1, -1, -1, -1, -1, 68, 69,
6654 -1, -1, -1, -1, -1, -1, -1, -1, 78, 79,
6655 80, 81, 82, 83, 84, 85, 86, 87, 88, 89,
6656 90, -1, -1, -1, -1, 95, 96, 97, 98, -1,
6657 -1, 101, -1, -1, -1, -1, 106, -1, -1, -1,
6658 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6659 120, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6660 -1, -1, -1, -1, -1, 135, -1, 137, 138, 139,
6661 140, 141, 142, 143, 144, 145, 146, -1, -1, -1,
6662 -1, -1, 152, 153, 154, 155, 0, 157, 158, 159,
6663 160, -1, -1, -1, 8, 9, 10, -1, -1, -1,
6664 14, 15, -1, 17, -1, -1, -1, -1, -1, -1,
6665 -1, 25, 26, -1, -1, -1, -1, -1, -1, -1,
6666 -1, -1, -1, 37, 38, -1, 40, 41, 42, 43,
6667 44, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6668 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6669 -1, -1, -1, -1, 68, 69, -1, -1, -1, -1,
6670 -1, -1, -1, -1, 78, 79, 80, 81, 82, 83,
6671 84, 85, 86, 87, 88, 89, 90, -1, -1, -1,
6672 -1, 95, 96, 97, 98, -1, 100, 101, -1, -1,
6673 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6674 -1, -1, -1, -1, -1, -1, 120, -1, -1, -1,
6675 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6676 134, 135, -1, 137, 138, 139, 140, 141, 142, 143,
6677 144, 145, 146, -1, -1, -1, -1, 151, 152, 153,
6678 154, 155, 0, -1, 158, -1, 160, -1, -1, -1,
6679 8, 9, 10, -1, -1, -1, 14, 15, -1, 17,
6680 -1, -1, -1, -1, -1, -1, -1, 25, 26, -1,
6681 -1, -1, -1, -1, -1, -1, -1, -1, -1, 37,
6682 38, -1, 40, 41, 42, 43, 44, -1, -1, -1,
6683 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6684 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6685 68, 69, -1, -1, -1, -1, -1, -1, -1, -1,
6686 78, 79, 80, 81, 82, 83, 84, 85, 86, 87,
6687 88, 89, 90, -1, -1, -1, -1, 95, 96, 97,
6688 98, -1, 100, 101, -1, -1, -1, -1, -1, -1,
6689 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6690 -1, -1, 120, -1, -1, -1, -1, -1, -1, -1,
6691 -1, -1, -1, -1, -1, -1, 134, 135, -1, 137,
6692 138, 139, 140, 141, 142, 143, 144, 145, 146, -1,
6693 -1, -1, -1, 151, 152, 153, 154, 155, 0, -1,
6694 158, -1, 160, -1, -1, -1, 8, 9, 10, -1,
6695 -1, -1, 14, 15, -1, 17, -1, -1, -1, -1,
6696 -1, -1, -1, 25, -1, -1, -1, -1, -1, -1,
6697 -1, -1, -1, -1, -1, 37, 38, -1, 40, 41,
6698 42, 43, 44, -1, -1, -1, -1, -1, -1, -1,
6699 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6700 -1, -1, -1, -1, -1, -1, 68, 69, -1, -1,
6701 -1, -1, -1, -1, -1, -1, 78, 79, 80, 81,
6702 82, 83, 84, 85, 86, 87, 88, 89, 90, -1,
6703 -1, -1, -1, 95, 96, 97, 98, -1, 100, 101,
6704 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6705 -1, -1, -1, -1, -1, -1, -1, -1, 120, -1,
6706 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6707 -1, -1, 134, 135, -1, 137, 138, 139, 140, 141,
6708 142, 143, 144, 145, 146, -1, -1, -1, -1, 151,
6709 152, 153, 154, 155, 0, -1, 158, -1, 160, -1,
6710 -1, -1, 8, 9, 10, -1, -1, -1, 14, 15,
6711 -1, 17, -1, -1, -1, -1, -1, -1, -1, 25,
6712 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6713 -1, 37, 38, -1, 40, 41, 42, 43, 44, -1,
6714 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6715 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6716 -1, -1, 68, 69, -1, -1, -1, -1, -1, -1,
6717 -1, -1, 78, 79, 80, 81, 82, 83, 84, 85,
6718 86, 87, 88, 89, 90, -1, -1, -1, -1, 95,
6719 96, 97, 98, -1, 100, 101, -1, -1, -1, -1,
6720 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6721 -1, -1, -1, -1, 120, -1, -1, -1, -1, -1,
6722 -1, -1, -1, -1, -1, -1, -1, -1, 134, 135,
6723 -1, 137, 138, 139, 140, 141, 142, 143, 144, 145,
6724 146, -1, -1, -1, -1, 151, 152, 153, 154, 155,
6725 -1, -1, 158, 1, 160, 3, 4, 5, 6, 7,
6726 8, 9, 10, 11, 12, -1, -1, 15, 16, -1,
6727 18, 19, 20, 21, 22, 23, 24, -1, -1, -1,
6728 -1, -1, 30, 31, 32, 33, 34, 35, 36, -1,
6729 -1, 39, -1, -1, -1, -1, -1, 45, 46, 47,
6730 48, 49, 50, 51, 52, 53, 54, 55, 56, 57,
6731 -1, 59, 60, 61, 62, 63, 64, 65, -1, -1,
6732 68, -1, -1, -1, -1, -1, -1, -1, 76, 77,
6733 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6734 -1, -1, -1, 91, 92, -1, -1, -1, -1, -1,
6735 -1, 99, -1, -1, 102, 103, 104, 105, -1, 107,
6736 -1, -1, 110, 111, 112, 113, 114, 115, 116, 117,
6737 118, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6738 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6739 -1, -1, -1, -1, -1, -1, -1, -1, -1, 147,
6740 148, 149, -1, -1, -1, 1, 154, 3, 4, 5,
6741 6, 7, 160, -1, 10, 11, 12, -1, 14, 15,
6742 16, -1, 18, 19, 20, 21, 22, 23, 24, -1,
6743 -1, -1, -1, -1, 30, 31, 32, 33, 34, 35,
6744 36, -1, -1, 39, -1, -1, -1, -1, -1, 45,
6745 46, 47, 48, 49, 50, 51, 52, 53, 54, 55,
6746 56, 57, -1, 59, 60, 61, 62, 63, 64, 65,
6747 -1, -1, 68, -1, -1, -1, -1, -1, -1, -1,
6748 76, 77, -1, -1, -1, -1, -1, -1, -1, -1,
6749 -1, -1, -1, -1, -1, 91, 92, -1, -1, -1,
6750 -1, -1, -1, 99, -1, -1, 102, 103, 104, 105,
6751 -1, 107, -1, -1, 110, 111, 112, 113, 114, 115,
6752 116, 117, 118, -1, -1, -1, -1, -1, -1, -1,
6753 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6754 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6755 -1, 147, 148, 149, -1, -1, -1, 1, 154, 3,
6756 4, 5, 6, 7, 160, -1, 10, 11, 12, -1,
6757 -1, 15, 16, 17, 18, 19, 20, 21, 22, 23,
6758 24, -1, -1, -1, -1, -1, 30, 31, 32, 33,
6759 34, 35, 36, -1, -1, 39, -1, -1, -1, -1,
6760 -1, 45, 46, 47, 48, 49, 50, 51, 52, 53,
6761 54, 55, 56, 57, -1, 59, 60, 61, 62, 63,
6762 64, 65, -1, -1, 68, -1, -1, -1, -1, -1,
6763 -1, -1, 76, 77, -1, -1, -1, -1, -1, -1,
6764 -1, -1, -1, -1, -1, -1, -1, 91, 92, -1,
6765 -1, -1, -1, -1, -1, 99, -1, -1, 102, 103,
6766 104, 105, -1, 107, -1, -1, 110, 111, 112, 113,
6767 114, 115, 116, 117, 118, -1, -1, -1, -1, -1,
6768 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6769 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6770 -1, -1, -1, 147, 148, 149, -1, -1, -1, 1,
6771 154, 3, 4, 5, 6, 7, 160, -1, 10, 11,
6772 12, -1, -1, 15, 16, -1, 18, 19, 20, 21,
6773 22, 23, 24, 25, -1, -1, -1, -1, 30, 31,
6774 32, 33, 34, 35, 36, -1, -1, 39, -1, -1,
6775 -1, -1, -1, 45, 46, 47, 48, 49, 50, 51,
6776 52, 53, 54, 55, 56, 57, -1, 59, 60, 61,
6777 62, 63, 64, 65, -1, -1, 68, -1, -1, -1,
6778 -1, -1, -1, -1, 76, 77, -1, -1, -1, -1,
6779 -1, -1, -1, -1, -1, -1, -1, -1, -1, 91,
6780 92, -1, -1, -1, -1, -1, -1, 99, -1, -1,
6781 102, 103, 104, 105, -1, 107, -1, -1, 110, 111,
6782 112, 113, 114, 115, 116, 117, 118, -1, -1, -1,
6783 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6784 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6785 -1, -1, -1, -1, -1, 147, 148, 149, -1, -1,
6786 -1, 1, 154, 3, 4, 5, 6, 7, 160, -1,
6787 10, 11, 12, -1, -1, 15, 16, -1, 18, 19,
6788 20, 21, 22, 23, 24, -1, -1, -1, -1, -1,
6789 30, 31, 32, 33, 34, 35, 36, -1, -1, 39,
6790 -1, -1, -1, -1, -1, 45, 46, 47, 48, 49,
6791 50, 51, 52, 53, 54, 55, 56, 57, -1, 59,
6792 60, 61, 62, 63, 64, 65, -1, -1, 68, -1,
6793 -1, -1, -1, -1, -1, -1, 76, 77, -1, -1,
6794 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6795 -1, 91, 92, -1, -1, -1, -1, -1, -1, 99,
6796 -1, -1, 102, 103, 104, 105, -1, 107, -1, -1,
6797 110, 111, 112, 113, 114, 115, 116, 117, 118, -1,
6798 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6799 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6800 -1, -1, -1, -1, -1, -1, -1, 147, 148, 149,
6801 -1, -1, -1, 1, 154, 3, 4, 5, 6, 7,
6802 160, 9, 10, 11, 12, -1, -1, -1, 16, -1,
6803 18, 19, 20, 21, 22, 23, 24, -1, -1, -1,
6804 -1, -1, 30, 31, 32, 33, 34, 35, 36, -1,
6805 -1, 39, -1, -1, -1, -1, -1, 45, 46, 47,
6806 48, 49, 50, 51, 52, 53, 54, 55, 56, 57,
6807 -1, 59, 60, 61, 62, 63, 64, 65, -1, -1,
6808 68, -1, -1, -1, -1, -1, -1, -1, 76, 77,
6809 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6810 -1, -1, -1, 91, 92, -1, -1, -1, -1, -1,
6811 -1, 99, -1, -1, 102, 103, 104, 105, -1, 107,
6812 -1, -1, 110, 111, 112, 113, 114, 115, 116, 117,
6813 118, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6814 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6815 -1, -1, -1, -1, -1, -1, -1, -1, -1, 147,
6816 148, 149, -1, -1, -1, 1, 154, 3, 4, 5,
6817 6, 7, 160, -1, 10, 11, 12, -1, -1, -1,
6818 16, -1, 18, 19, 20, 21, 22, 23, 24, -1,
6819 -1, -1, -1, -1, 30, 31, 32, 33, 34, 35,
6820 36, -1, -1, 39, -1, -1, -1, -1, -1, 45,
6821 46, 47, 48, 49, 50, 51, 52, 53, 54, 55,
6822 56, 57, -1, 59, 60, 61, 62, 63, 64, 65,
6823 -1, -1, 68, -1, -1, -1, -1, -1, -1, -1,
6824 76, 77, -1, -1, -1, -1, -1, -1, -1, -1,
6825 -1, -1, -1, -1, -1, 91, 92, -1, -1, -1,
6826 -1, -1, -1, 99, -1, -1, 102, 103, 104, 105,
6827 -1, 107, -1, -1, 110, 111, 112, 113, 114, 115,
6828 116, 117, 118, -1, -1, -1, -1, -1, -1, -1,
6829 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6830 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6831 -1, 147, 148, 149, -1, -1, -1, 1, 154, 3,
6832 4, 5, 6, 7, 160, -1, -1, 11, 12, -1,
6833 -1, -1, 16, -1, 18, 19, 20, 21, 22, 23,
6834 24, -1, -1, -1, -1, -1, 30, 31, 32, 33,
6835 34, 35, 36, -1, -1, 39, -1, -1, -1, -1,
6836 -1, 45, 46, 47, 48, 49, 50, 51, 52, 53,
6837 54, 55, 56, 57, -1, 59, 60, 61, 62, 63,
6838 64, 65, -1, -1, -1, -1, -1, -1, -1, -1,
6839 -1, -1, 76, 77, -1, -1, -1, -1, -1, -1,
6840 -1, -1, -1, -1, -1, -1, -1, 91, 92, -1,
6841 -1, -1, -1, -1, -1, 99, -1, -1, 102, 103,
6842 104, 105, -1, 107, -1, -1, 110, 111, 112, 113,
6843 114, 115, 116, 117, 118, -1, -1, -1, -1, -1,
6844 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6845 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6846 -1, -1, -1, 147, 148, 149, -1, -1, -1, -1,
6847 154, -1, -1, -1, 158, 1, 160, 3, 4, 5,
6848 6, 7, -1, -1, -1, 11, 12, -1, -1, -1,
6849 16, -1, 18, 19, 20, 21, 22, 23, 24, -1,
6850 -1, -1, -1, -1, 30, 31, 32, 33, 34, 35,
6851 36, -1, -1, 39, -1, -1, -1, -1, -1, 45,
6852 46, 47, 48, 49, 50, 51, 52, 53, 54, 55,
6853 56, 57, -1, 59, 60, 61, 62, 63, 64, 65,
6854 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6855 76, 77, -1, -1, -1, -1, -1, -1, -1, -1,
6856 -1, -1, -1, -1, -1, 91, 92, -1, -1, -1,
6857 -1, -1, -1, 99, -1, -1, 102, 103, 104, 105,
6858 -1, 107, -1, -1, 110, 111, 112, 113, 114, 115,
6859 116, 117, 118, -1, -1, -1, -1, -1, -1, -1,
6860 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6861 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6862 -1, 147, 148, 149, -1, -1, -1, -1, 154, -1,
6863 -1, -1, 158, 1, 160, 3, 4, 5, 6, 7,
6864 -1, -1, -1, 11, 12, -1, -1, -1, 16, -1,
6865 18, 19, 20, 21, 22, 23, 24, -1, -1, -1,
6866 -1, -1, 30, 31, 32, 33, 34, 35, 36, -1,
6867 -1, 39, -1, -1, -1, -1, -1, 45, 46, 47,
6868 48, 49, 50, 51, 52, 53, 54, 55, 56, 57,
6869 -1, 59, 60, 61, 62, 63, 64, 65, -1, -1,
6870 -1, -1, -1, -1, -1, -1, -1, -1, 76, 77,
6871 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6872 -1, -1, -1, 91, 92, -1, -1, -1, -1, -1,
6873 -1, 99, -1, -1, 102, 103, 104, 105, -1, 107,
6874 -1, -1, 110, 111, 112, 113, 114, 115, 116, 117,
6875 118, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6876 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6877 -1, -1, -1, -1, -1, -1, -1, -1, -1, 147,
6878 148, 149, -1, -1, 152, 1, 154, 3, 4, 5,
6879 6, 7, 160, -1, -1, 11, 12, -1, -1, -1,
6880 16, -1, 18, 19, 20, 21, 22, 23, 24, -1,
6881 -1, -1, -1, -1, 30, 31, 32, 33, 34, 35,
6882 36, -1, -1, 39, -1, -1, -1, -1, -1, 45,
6883 46, 47, 48, 49, 50, 51, 52, 53, 54, 55,
6884 56, 57, -1, 59, 60, 61, 62, 63, 64, 65,
6885 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6886 76, 77, -1, -1, -1, -1, -1, -1, -1, -1,
6887 -1, -1, -1, -1, -1, 91, 92, -1, -1, -1,
6888 -1, -1, -1, 99, -1, -1, 102, 103, 104, 105,
6889 -1, 107, -1, -1, 110, 111, 112, 113, 114, 115,
6890 116, 117, 118, -1, -1, -1, -1, -1, -1, -1,
6891 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6892 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6893 -1, 147, 148, 149, -1, -1, 152, 1, 154, 3,
6894 4, 5, -1, 7, 160, -1, -1, 11, 12, -1,
6895 -1, -1, 16, 17, 18, 19, 20, 21, 22, 23,
6896 24, -1, -1, -1, -1, -1, 30, 31, 32, 33,
6897 34, 35, 36, -1, -1, 39, -1, -1, -1, -1,
6898 -1, -1, 46, -1, -1, 49, 50, 51, 52, 53,
6899 54, 55, 56, 57, -1, 59, 60, 61, 62, 63,
6900 64, 65, -1, -1, -1, -1, -1, -1, -1, -1,
6901 -1, -1, 76, 77, -1, -1, -1, -1, -1, -1,
6902 -1, -1, -1, -1, -1, -1, -1, 91, 92, -1,
6903 -1, -1, -1, -1, -1, 99, -1, -1, 102, 103,
6904 104, 105, -1, -1, -1, -1, 110, 111, 112, 113,
6905 114, 115, 116, 117, 118, -1, -1, -1, -1, -1,
6906 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6907 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6908 -1, -1, -1, 147, 148, 149, -1, -1, -1, -1,
6909 154, -1, -1, -1, -1, -1, 160, 3, 4, 5,
6910 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
6911 16, 17, 18, 19, 20, 21, 22, 23, 24, 25,
6912 26, -1, -1, -1, 30, 31, 32, 33, 34, 35,
6913 36, 37, 38, 39, -1, -1, -1, -1, -1, 45,
6914 46, 47, 48, 49, 50, 51, 52, 53, 54, 55,
6915 56, 57, -1, -1, -1, -1, -1, -1, -1, -1,
6916 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6917 76, 77, 78, 79, 80, 81, 82, 83, 84, -1,
6918 -1, 87, 88, -1, -1, -1, -1, 93, 94, 95,
6919 96, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6920 -1, 107, 108, -1, -1, -1, -1, -1, -1, -1,
6921 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6922 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6923 -1, 137, 138, 139, 140, 141, 142, 143, 144, 145,
6924 146, -1, 148, 149, -1, -1, -1, -1, -1, -1,
6925 156, 157, 3, 4, 5, 6, 7, 8, 9, 10,
6926 11, 12, 13, 14, 15, 16, 17, 18, 19, 20,
6927 21, 22, 23, 24, 25, 26, -1, -1, -1, 30,
6928 31, 32, 33, 34, 35, 36, 37, 38, 39, -1,
6929 -1, -1, -1, -1, 45, 46, 47, 48, 49, 50,
6930 51, 52, 53, 54, 55, 56, 57, -1, -1, -1,
6931 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6932 -1, -1, -1, -1, -1, 76, 77, 78, 79, 80,
6933 81, 82, 83, 84, -1, -1, 87, 88, -1, -1,
6934 -1, -1, 93, 94, 95, 96, -1, -1, -1, -1,
6935 -1, -1, -1, -1, -1, -1, 107, 108, -1, -1,
6936 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6937 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6938 -1, -1, -1, -1, -1, -1, 137, 138, 139, 140,
6939 141, 142, 143, 144, 145, 146, -1, 148, 149, -1,
6940 -1, -1, -1, -1, -1, 156, 3, 4, 5, 6,
6941 7, 8, 9, 10, 11, 12, 13, 14, 15, 16,
6942 17, 18, 19, 20, 21, 22, 23, 24, 25, 26,
6943 -1, -1, -1, 30, 31, 32, 33, 34, 35, 36,
6944 37, 38, 39, -1, -1, -1, -1, -1, 45, 46,
6945 47, 48, 49, 50, 51, 52, 53, 54, -1, 56,
6946 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6947 -1, -1, -1, -1, -1, -1, -1, -1, -1, 76,
6948 77, 78, 79, 80, 81, 82, 83, 84, -1, -1,
6949 87, 88, -1, -1, -1, -1, 93, 94, 95, 96,
6950 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6951 107, 108, -1, -1, 111, -1, -1, -1, -1, -1,
6952 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6953 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6954 137, 138, 139, 140, 141, 142, 143, 144, 145, 146,
6955 -1, 148, 149, -1, -1, -1, -1, -1, -1, 156,
6956 3, 4, 5, 6, 7, 8, 9, 10, 11, 12,
6957 13, 14, 15, 16, 17, 18, 19, 20, 21, 22,
6958 23, 24, 25, 26, -1, -1, -1, 30, 31, 32,
6959 33, 34, 35, 36, 37, 38, 39, -1, -1, -1,
6960 -1, -1, 45, 46, 47, 48, 49, 50, 51, 52,
6961 53, -1, -1, 56, -1, -1, -1, -1, -1, -1,
6962 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6963 -1, -1, -1, 76, 77, 78, 79, 80, 81, 82,
6964 83, 84, -1, -1, 87, 88, -1, -1, -1, -1,
6965 93, 94, 95, 96, -1, -1, -1, -1, -1, -1,
6966 -1, -1, -1, -1, 107, 108, -1, -1, 111, -1,
6967 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6968 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6969 -1, -1, -1, -1, 137, 138, 139, 140, 141, 142,
6970 143, 144, 145, 146, -1, 148, 149, -1, -1, -1,
6971 -1, -1, -1, 156, 3, 4, 5, 6, 7, 8,
6972 9, 10, 11, 12, 13, 14, 15, 16, 17, 18,
6973 19, 20, 21, 22, 23, 24, 25, 26, -1, -1,
6974 -1, 30, 31, 32, 33, 34, 35, 36, 37, 38,
6975 39, -1, -1, -1, -1, -1, 45, 46, 47, 48,
6976 49, 50, 51, 52, 53, -1, -1, 56, -1, -1,
6977 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6978 -1, -1, -1, -1, -1, -1, -1, 76, 77, 78,
6979 79, 80, 81, 82, 83, 84, -1, -1, 87, 88,
6980 -1, -1, -1, -1, 93, 94, 95, 96, -1, -1,
6981 -1, -1, -1, -1, -1, -1, -1, -1, 107, 108,
6982 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6983 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6984 -1, -1, -1, -1, -1, -1, -1, -1, 137, 138,
6985 139, 140, 141, 142, 143, 144, 145, 146, -1, 148,
6986 149, 3, 4, 5, -1, 7, -1, 156, -1, 11,
6987 12, -1, -1, -1, 16, -1, 18, 19, 20, 21,
6988 22, 23, 24, -1, -1, -1, -1, -1, 30, 31,
6989 32, 33, 34, 35, 36, -1, -1, 39, -1, -1,
6990 -1, -1, -1, -1, 46, -1, -1, 49, 50, 51,
6991 52, 53, 54, 55, 56, 57, -1, 59, 60, 61,
6992 62, 63, 64, 65, -1, -1, -1, -1, -1, -1,
6993 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6994 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6995 -1, -1, -1, -1, -1, -1, -1, 99, -1, -1,
6996 102, 103, 104, 105, -1, -1, -1, -1, 110, 111,
6997 112, 113, 114, 115, 116, 117, 118, -1, -1, 3,
6998 4, 5, -1, 7, -1, -1, -1, 11, 12, -1,
6999 -1, -1, 16, -1, 18, 19, 20, 21, 22, 23,
7000 24, -1, -1, -1, -1, 147, 30, 31, 32, 33,
7001 34, 35, 36, 155, -1, 39, -1, -1, -1, -1,
7002 -1, -1, 46, -1, -1, 49, 50, 51, 52, 53,
7003 54, 55, 56, 57, -1, 59, 60, 61, 62, 63,
7004 64, 65, -1, -1, -1, -1, -1, -1, -1, -1,
7005 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7006 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7007 -1, -1, -1, -1, -1, 99, -1, -1, 102, 103,
7008 104, 105, -1, -1, -1, -1, 110, 111, 112, 113,
7009 114, 115, 116, 117, 118, -1, -1, 3, 4, 5,
7010 -1, 7, -1, -1, -1, 11, 12, -1, -1, -1,
7011 16, -1, 18, 19, 20, 21, 22, 23, 24, -1,
7012 -1, -1, -1, 147, 30, 31, 32, 33, 34, 35,
7013 36, 155, -1, 39, -1, -1, -1, -1, -1, -1,
7014 46, -1, -1, 49, 50, 51, 52, 53, 54, 55,
7015 56, 57, 58, 59, 60, 61, 62, 63, 64, 65,
7016 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7017 76, 77, -1, -1, -1, -1, -1, -1, -1, -1,
7018 -1, -1, -1, -1, -1, 91, 92, -1, -1, -1,
7019 -1, -1, -1, 99, -1, -1, 102, 103, 104, 105,
7020 -1, 107, 108, 109, 110, 111, 112, 113, 114, 115,
7021 116, 117, 118, -1, -1, -1, -1, -1, -1, -1,
7022 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7023 -1, -1, -1, -1, -1, -1, 3, 4, 5, -1,
7024 7, 147, 148, 149, 11, 12, -1, -1, 154, 16,
7025 -1, 18, 19, 20, 21, 22, 23, 24, -1, -1,
7026 -1, -1, -1, 30, 31, 32, 33, 34, 35, 36,
7027 -1, -1, 39, -1, -1, -1, -1, -1, -1, 46,
7028 -1, -1, 49, 50, 51, 52, 53, 54, 55, 56,
7029 57, -1, 59, 60, 61, 62, 63, 64, 65, -1,
7030 -1, -1, -1, -1, -1, -1, -1, -1, -1, 76,
7031 77, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7032 -1, -1, -1, -1, 91, 92, -1, -1, -1, -1,
7033 -1, -1, 99, -1, -1, 102, 103, 104, 105, -1,
7034 -1, -1, -1, 110, 111, 112, 113, 114, 115, 116,
7035 117, 118, -1, -1, -1, -1, -1, -1, -1, -1,
7036 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7037 -1, -1, -1, 1, -1, 3, 4, 5, 6, 7,
7038 147, 148, 149, 11, 12, -1, -1, 154, 16, -1,
7039 18, 19, 20, 21, 22, 23, 24, -1, -1, -1,
7040 -1, -1, 30, 31, 32, 33, 34, 35, 36, -1,
7041 -1, 39, -1, -1, -1, -1, -1, 45, 46, -1,
7042 48, 49, 50, 51, 52, 53, 54, 55, 56, 57,
7043 -1, 59, 60, 61, 62, 63, 64, 65, -1, -1,
7044 -1, -1, -1, -1, -1, -1, -1, -1, 76, 77,
7045 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7046 -1, -1, -1, 91, 92, -1, -1, -1, -1, -1,
7047 -1, 99, -1, -1, 102, 103, 104, 105, -1, 107,
7048 -1, -1, 110, 111, 112, 113, 114, 115, 116, 117,
7049 118, -1, -1, 1, -1, 3, 4, 5, -1, 7,
7050 -1, -1, -1, 11, 12, -1, -1, -1, 16, -1,
7051 18, 19, 20, 21, 22, 23, 24, -1, -1, 147,
7052 148, 149, 30, 31, 32, 33, 34, 35, 36, -1,
7053 -1, 39, -1, -1, -1, -1, -1, -1, 46, -1,
7054 -1, 49, 50, 51, 52, 53, 54, 55, 56, 57,
7055 -1, 59, 60, 61, 62, 63, 64, 65, -1, -1,
7056 -1, -1, -1, -1, -1, -1, -1, -1, 76, 77,
7057 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7058 -1, -1, -1, 91, 92, -1, -1, -1, -1, -1,
7059 -1, 99, -1, -1, 102, 103, 104, 105, -1, -1,
7060 -1, -1, 110, 111, 112, 113, 114, 115, 116, 117,
7061 118, -1, -1, -1, -1, 3, 4, 5, -1, 7,
7062 -1, -1, -1, 11, 12, -1, -1, -1, 16, -1,
7063 18, 19, 20, 21, 22, 23, 24, -1, -1, 147,
7064 148, 149, 30, 31, 32, 33, 34, 35, 36, -1,
7065 -1, 39, -1, -1, -1, -1, -1, -1, 46, -1,
7066 -1, 49, 50, 51, 52, 53, 54, 55, 56, 57,
7067 58, 59, 60, 61, 62, 63, 64, 65, -1, -1,
7068 -1, -1, -1, -1, -1, -1, -1, -1, 76, 77,
7069 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7070 -1, -1, -1, 91, 92, -1, -1, -1, -1, -1,
7071 -1, 99, -1, -1, 102, 103, 104, 105, -1, 107,
7072 108, 109, 110, 111, 112, 113, 114, 115, 116, 117,
7073 118, -1, -1, -1, -1, 3, 4, 5, -1, 7,
7074 -1, -1, -1, 11, 12, -1, -1, -1, 16, -1,
7075 18, 19, 20, 21, 22, 23, 24, -1, -1, 147,
7076 148, 149, 30, 31, 32, 33, 34, 35, 36, -1,
7077 -1, 39, -1, -1, -1, -1, -1, -1, 46, -1,
7078 -1, 49, 50, 51, 52, 53, 54, 55, 56, 57,
7079 58, 59, 60, 61, 62, 63, 64, 65, -1, -1,
7080 -1, -1, -1, -1, -1, -1, -1, -1, 76, 77,
7081 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7082 -1, -1, -1, 91, 92, -1, -1, -1, -1, -1,
7083 -1, 99, -1, -1, 102, 103, 104, 105, -1, 107,
7084 108, 109, 110, 111, 112, 113, 114, 115, 116, 117,
7085 118, -1, -1, -1, -1, 3, 4, 5, -1, 7,
7086 -1, -1, -1, 11, 12, -1, -1, -1, 16, -1,
7087 18, 19, 20, 21, 22, 23, 24, -1, -1, 147,
7088 148, 149, 30, 31, 32, 33, 34, 35, 36, -1,
7089 -1, 39, -1, -1, -1, -1, -1, -1, 46, -1,
7090 -1, 49, 50, 51, 52, 53, 54, 55, 56, 57,
7091 58, 59, 60, 61, 62, 63, 64, 65, -1, -1,
7092 -1, -1, -1, -1, -1, -1, -1, -1, 76, 77,
7093 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7094 -1, -1, -1, 91, 92, -1, -1, -1, -1, -1,
7095 -1, 99, -1, -1, 102, 103, 104, 105, -1, 107,
7096 108, 109, 110, 111, 112, 113, 114, 115, 116, 117,
7097 118, -1, -1, -1, -1, 3, 4, 5, -1, 7,
7098 -1, -1, -1, 11, 12, -1, -1, -1, 16, -1,
7099 18, 19, 20, 21, 22, 23, 24, -1, -1, 147,
7100 148, 149, 30, 31, 32, 33, 34, 35, 36, -1,
7101 -1, 39, -1, -1, -1, -1, -1, -1, 46, -1,
7102 -1, 49, 50, 51, 52, 53, 54, 55, 56, 57,
7103 58, 59, 60, 61, 62, 63, 64, 65, -1, -1,
7104 -1, -1, -1, -1, -1, -1, -1, -1, 76, 77,
7105 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7106 -1, -1, -1, 91, 92, -1, -1, -1, -1, -1,
7107 -1, 99, -1, -1, 102, 103, 104, 105, -1, 107,
7108 108, 109, 110, 111, 112, 113, 114, 115, 116, 117,
7109 118, -1, -1, -1, -1, 3, 4, 5, -1, 7,
7110 -1, -1, -1, 11, 12, -1, -1, -1, 16, -1,
7111 18, 19, 20, 21, 22, 23, 24, -1, -1, 147,
7112 148, 149, 30, 31, 32, 33, 34, 35, 36, -1,
7113 -1, 39, -1, -1, -1, -1, -1, -1, 46, -1,
7114 -1, 49, 50, 51, 52, 53, 54, 55, 56, 57,
7115 58, 59, 60, 61, 62, 63, 64, 65, -1, -1,
7116 -1, -1, -1, -1, -1, -1, -1, -1, 76, 77,
7117 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7118 -1, -1, -1, 91, 92, -1, -1, -1, -1, -1,
7119 -1, 99, -1, -1, 102, 103, 104, 105, -1, 107,
7120 108, -1, 110, 111, 112, 113, 114, 115, 116, 117,
7121 118, -1, -1, -1, -1, 3, 4, 5, -1, 7,
7122 -1, -1, -1, 11, 12, -1, -1, -1, 16, -1,
7123 18, 19, 20, 21, 22, 23, 24, -1, -1, 147,
7124 148, 149, 30, 31, 32, 33, 34, 35, 36, -1,
7125 -1, 39, -1, -1, -1, -1, -1, -1, 46, -1,
7126 -1, 49, 50, 51, 52, 53, 54, 55, 56, 57,
7127 58, 59, 60, 61, 62, 63, 64, 65, -1, -1,
7128 -1, -1, -1, -1, -1, -1, -1, -1, 76, 77,
7129 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7130 -1, -1, -1, 91, 92, -1, -1, -1, -1, -1,
7131 -1, 99, -1, -1, 102, 103, 104, 105, -1, -1,
7132 108, 109, 110, 111, 112, 113, 114, 115, 116, 117,
7133 118, -1, -1, -1, -1, 3, 4, 5, -1, 7,
7134 -1, -1, -1, 11, 12, -1, -1, -1, 16, -1,
7135 18, 19, 20, 21, 22, 23, 24, -1, -1, 147,
7136 148, 149, 30, 31, 32, 33, 34, 35, 36, -1,
7137 -1, 39, -1, -1, -1, -1, -1, -1, 46, -1,
7138 -1, 49, 50, 51, 52, 53, 54, 55, 56, 57,
7139 58, 59, 60, 61, 62, 63, 64, 65, -1, -1,
7140 -1, -1, -1, -1, -1, -1, -1, -1, 76, 77,
7141 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7142 -1, -1, -1, 91, 92, -1, -1, -1, -1, -1,
7143 -1, 99, -1, -1, 102, 103, 104, 105, -1, -1,
7144 108, -1, 110, 111, 112, 113, 114, 115, 116, 117,
7145 118, -1, -1, -1, -1, 3, 4, 5, -1, 7,
7146 -1, -1, -1, 11, 12, -1, -1, -1, 16, -1,
7147 18, 19, 20, 21, 22, 23, 24, -1, -1, 147,
7148 148, 149, 30, 31, 32, 33, 34, 35, 36, -1,
7149 -1, 39, -1, -1, -1, -1, -1, -1, 46, -1,
7150 -1, 49, 50, 51, 52, 53, 54, 55, 56, 57,
7151 -1, 59, 60, 61, 62, 63, 64, 65, -1, -1,
7152 -1, -1, -1, -1, -1, -1, -1, -1, 76, 77,
7153 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7154 -1, -1, -1, 91, 92, -1, -1, -1, -1, -1,
7155 -1, 99, -1, -1, 102, 103, 104, 105, -1, 107,
7156 -1, -1, 110, 111, 112, 113, 114, 115, 116, 117,
7157 118, -1, -1, -1, -1, 3, 4, 5, -1, 7,
7158 -1, -1, -1, 11, 12, -1, -1, -1, 16, -1,
7159 18, 19, 20, 21, 22, 23, 24, -1, -1, 147,
7160 148, 149, 30, 31, 32, 33, 34, 35, 36, -1,
7161 -1, 39, -1, -1, -1, -1, -1, -1, 46, -1,
7162 -1, 49, 50, 51, 52, 53, 54, 55, 56, 57,
7163 -1, 59, 60, 61, 62, 63, 64, 65, -1, -1,
7164 -1, -1, -1, -1, -1, -1, -1, -1, 76, 77,
7165 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7166 -1, -1, -1, 91, 92, -1, -1, -1, -1, -1,
7167 -1, 99, -1, -1, 102, 103, 104, 105, -1, 107,
7168 -1, -1, 110, 111, 112, 113, 114, 115, 116, 117,
7169 118, -1, -1, -1, -1, 3, 4, 5, -1, 7,
7170 -1, -1, -1, 11, 12, -1, -1, -1, 16, -1,
7171 18, 19, 20, 21, 22, 23, 24, -1, -1, 147,
7172 148, 149, 30, 31, 32, 33, 34, 35, 36, -1,
7173 -1, 39, -1, -1, -1, -1, -1, -1, 46, -1,
7174 -1, 49, 50, 51, 52, 53, 54, 55, 56, 57,
7175 -1, 59, 60, 61, 62, 63, 64, 65, -1, -1,
7176 -1, -1, -1, -1, -1, -1, -1, -1, 76, 77,
7177 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7178 -1, -1, -1, 91, 92, -1, -1, -1, -1, -1,
7179 -1, 99, -1, -1, 102, 103, 104, 105, -1, 107,
7180 -1, -1, 110, 111, 112, 113, 114, 115, 116, 117,
7181 118, -1, -1, -1, -1, 3, 4, 5, -1, 7,
7182 -1, -1, -1, 11, 12, -1, -1, -1, 16, -1,
7183 18, 19, 20, 21, 22, 23, 24, -1, -1, 147,
7184 148, 149, 30, 31, 32, 33, 34, 35, 36, -1,
7185 -1, 39, -1, -1, -1, -1, -1, -1, 46, -1,
7186 -1, 49, 50, 51, 52, 53, 54, 55, 56, 57,
7187 -1, 59, 60, 61, 62, 63, 64, 65, -1, -1,
7188 -1, -1, -1, -1, -1, -1, -1, -1, 76, 77,
7189 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7190 -1, -1, -1, 91, 92, -1, -1, -1, -1, -1,
7191 -1, 99, -1, -1, 102, 103, 104, 105, -1, 107,
7192 -1, -1, 110, 111, 112, 113, 114, 115, 116, 117,
7193 118, -1, -1, -1, -1, 3, 4, 5, -1, 7,
7194 -1, -1, -1, 11, 12, -1, -1, -1, 16, -1,
7195 18, 19, 20, 21, 22, 23, 24, -1, -1, 147,
7196 148, 149, 30, 31, 32, 33, 34, 35, 36, -1,
7197 -1, 39, -1, -1, -1, -1, -1, -1, 46, -1,
7198 -1, 49, 50, 51, 52, 53, 54, 55, 56, 57,
7199 -1, 59, 60, 61, 62, 63, 64, 65, -1, -1,
7200 -1, -1, -1, -1, -1, -1, -1, -1, 76, 77,
7201 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7202 -1, -1, -1, 91, 92, -1, -1, -1, -1, -1,
7203 -1, 99, -1, -1, 102, 103, 104, 105, -1, 107,
7204 -1, -1, 110, 111, 112, 113, 114, 115, 116, 117,
7205 118, -1, -1, -1, -1, 3, 4, 5, -1, 7,
7206 -1, -1, -1, 11, 12, -1, -1, -1, 16, -1,
7207 18, 19, 20, 21, 22, 23, 24, -1, -1, 147,
7208 148, 149, 30, 31, 32, 33, 34, 35, 36, -1,
7209 -1, 39, -1, -1, -1, -1, -1, -1, 46, -1,
7210 -1, 49, 50, 51, 52, 53, 54, 55, 56, 57,
7211 -1, 59, 60, 61, 62, 63, 64, 65, -1, -1,
7212 -1, -1, -1, -1, -1, -1, -1, -1, 76, 77,
7213 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7214 -1, -1, -1, 91, 92, -1, -1, -1, -1, -1,
7215 -1, 99, -1, -1, 102, 103, 104, 105, -1, 107,
7216 -1, -1, 110, 111, 112, 113, 114, 115, 116, 117,
7217 118, -1, -1, -1, -1, 3, 4, 5, -1, 7,
7218 -1, -1, -1, 11, 12, -1, -1, -1, 16, -1,
7219 18, 19, 20, 21, 22, 23, 24, -1, -1, 147,
7220 148, 149, 30, 31, 32, 33, 34, 35, 36, -1,
7221 -1, 39, -1, -1, -1, -1, -1, -1, 46, -1,
7222 -1, 49, 50, 51, 52, 53, 54, 55, 56, 57,
7223 -1, 59, 60, 61, 62, 63, 64, 65, -1, -1,
7224 -1, -1, -1, -1, -1, -1, -1, -1, 76, 77,
7225 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7226 -1, -1, -1, 91, 92, -1, -1, -1, -1, -1,
7227 -1, 99, -1, -1, 102, 103, 104, 105, -1, -1,
7228 -1, -1, 110, 111, 112, 113, 114, 115, 116, 117,
7229 118, -1, -1, -1, -1, 3, 4, 5, -1, 7,
7230 -1, -1, -1, 11, 12, -1, -1, -1, 16, -1,
7231 18, 19, 20, 21, 22, 23, 24, -1, -1, 147,
7232 148, 149, 30, 31, 32, 33, 34, 35, 36, -1,
7233 -1, 39, -1, -1, -1, -1, -1, -1, 46, -1,
7234 -1, 49, 50, 51, 52, 53, 54, 55, 56, 57,
7235 -1, 59, 60, 61, 62, 63, 64, 65, -1, -1,
7236 -1, -1, -1, -1, -1, -1, -1, -1, 76, 77,
7237 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7238 -1, -1, -1, 91, 92, -1, -1, -1, -1, -1,
7239 -1, 99, -1, -1, 102, 103, 104, 105, -1, -1,
7240 -1, -1, 110, 111, 112, 113, 114, 115, 116, 117,
7241 118, -1, -1, -1, -1, 3, 4, 5, -1, 7,
7242 -1, -1, -1, 11, 12, -1, -1, -1, 16, -1,
7243 18, 19, 20, 21, 22, 23, 24, -1, -1, 147,
7244 148, 149, 30, 31, 32, 33, 34, 35, 36, -1,
7245 -1, 39, -1, -1, -1, -1, -1, -1, 46, -1,
7246 -1, 49, 50, 51, 52, 53, 54, 55, 56, 57,
7247 -1, 59, 60, 61, 62, 63, 64, 65, -1, -1,
7248 -1, -1, -1, -1, -1, -1, -1, -1, 76, 77,
7249 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7250 -1, -1, -1, 91, 92, -1, -1, -1, -1, -1,
7251 -1, 99, -1, -1, 102, 103, 104, 105, -1, -1,
7252 -1, -1, 110, 111, 112, 113, 114, 115, 116, 117,
7253 118, -1, -1, -1, -1, 3, 4, 5, -1, 7,
7254 -1, -1, -1, 11, 12, -1, -1, -1, 16, -1,
7255 18, 19, 20, 21, 22, 23, 24, -1, -1, 147,
7256 148, 149, 30, 31, 32, 33, 34, 35, 36, -1,
7257 -1, 39, -1, -1, -1, -1, -1, -1, 46, -1,
7258 -1, 49, 50, 51, 52, 53, 54, 55, 56, 57,
7259 -1, 59, 60, 61, 62, 63, 64, 65, -1, -1,
7260 -1, -1, -1, -1, -1, -1, -1, -1, 76, 77,
7261 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7262 -1, -1, -1, 91, 92, -1, -1, -1, -1, -1,
7263 -1, 99, -1, -1, 102, 103, 104, 105, -1, -1,
7264 -1, -1, 110, 111, 112, 113, 114, 115, 116, 117,
7265 118, -1, -1, -1, -1, 3, 4, 5, -1, 7,
7266 -1, -1, -1, 11, 12, -1, -1, -1, 16, -1,
7267 18, 19, 20, 21, 22, 23, 24, -1, -1, 147,
7268 148, 149, 30, 31, 32, 33, 34, 35, 36, -1,
7269 -1, 39, -1, -1, -1, -1, -1, -1, 46, -1,
7270 -1, 49, 50, 51, 52, 53, 54, 55, 56, 57,
7271 -1, 59, 60, 61, 62, 63, 64, 65, -1, -1,
7272 -1, -1, -1, -1, -1, -1, -1, -1, 76, 77,
7273 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7274 -1, -1, -1, 91, 92, -1, -1, -1, -1, -1,
7275 -1, 99, -1, -1, 102, 103, 104, 105, -1, -1,
7276 -1, -1, 110, 111, 112, 113, 114, 115, 116, 117,
7277 118, -1, -1, -1, -1, 3, 4, 5, -1, 7,
7278 -1, -1, -1, 11, 12, -1, -1, -1, 16, -1,
7279 18, 19, 20, 21, 22, 23, 24, -1, -1, 147,
7280 148, 149, 30, 31, 32, 33, 34, 35, 36, -1,
7281 -1, 39, -1, -1, -1, -1, -1, -1, 46, -1,
7282 -1, 49, 50, 51, 52, 53, 54, 55, 56, 57,
7283 -1, 59, 60, 61, 62, 63, 64, 65, -1, -1,
7284 -1, -1, -1, -1, -1, -1, -1, -1, 76, 77,
7285 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7286 -1, -1, -1, 91, 92, -1, -1, -1, -1, -1,
7287 -1, 99, -1, -1, 102, 103, 104, 105, -1, -1,
7288 -1, -1, 110, 111, 112, 113, 114, 115, 116, 117,
7289 118, -1, -1, -1, -1, 3, 4, 5, -1, 7,
7290 -1, -1, -1, 11, 12, -1, -1, -1, 16, -1,
7291 18, 19, 20, 21, 22, 23, 24, -1, -1, 147,
7292 148, 149, 30, 31, 32, 33, 34, 35, 36, -1,
7293 -1, 39, -1, -1, -1, -1, -1, -1, 46, -1,
7294 -1, 49, 50, 51, 52, 53, 54, 55, 56, 57,
7295 -1, 59, 60, 61, 62, 63, 64, 65, -1, -1,
7296 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7297 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7298 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7299 -1, 99, -1, -1, 102, 103, 104, 105, -1, 107,
7300 -1, -1, 110, 111, 112, 113, 114, 115, 116, 117,
7301 118, -1, -1, 3, 4, 5, -1, 7, -1, -1,
7302 -1, 11, 12, -1, -1, -1, 16, -1, 18, 19,
7303 20, 21, 22, 23, 24, -1, -1, -1, -1, 147,
7304 30, 31, 32, 33, 34, 35, 36, -1, -1, 39,
7305 -1, -1, -1, -1, -1, -1, 46, -1, -1, 49,
7306 50, 51, 52, 53, 54, 55, 56, 57, -1, 59,
7307 60, 61, 62, 63, 64, 65, -1, -1, -1, -1,
7308 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7309 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7310 -1, -1, -1, -1, -1, -1, -1, -1, -1, 99,
7311 -1, -1, 102, 103, 104, 105, -1, 107, -1, -1,
7312 110, 111, 112, 113, 114, 115, 116, 117, 118, -1,
7313 -1, 3, 4, 5, -1, 7, -1, -1, -1, 11,
7314 12, -1, -1, -1, 16, -1, 18, 19, 20, 21,
7315 22, 23, 24, -1, -1, -1, -1, 147, 30, 31,
7316 32, 33, 34, 35, 36, -1, -1, 39, -1, -1,
7317 -1, -1, -1, -1, 46, -1, -1, 49, 50, 51,
7318 52, 53, 54, 55, 56, 57, -1, 59, 60, 61,
7319 62, 63, 64, 65, -1, -1, -1, -1, -1, -1,
7320 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7321 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7322 -1, -1, -1, 95, -1, -1, -1, 99, -1, -1,
7323 102, 103, 104, 105, -1, -1, -1, -1, 110, 111,
7324 112, 113, 114, 115, 116, 117, 118, -1, -1, 3,
7325 4, 5, -1, 7, -1, -1, -1, 11, 12, -1,
7326 -1, -1, 16, -1, 18, 19, 20, 21, 22, 23,
7327 24, -1, -1, -1, -1, 147, 30, 31, 32, 33,
7328 34, 35, 36, -1, -1, 39, -1, -1, -1, -1,
7329 -1, -1, 46, -1, -1, 49, 50, 51, 52, 53,
7330 54, 55, 56, 57, -1, 59, 60, 61, 62, 63,
7331 64, 65, -1, -1, -1, -1, -1, -1, -1, -1,
7332 -1, -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, 99, -1, -1, 102, 103,
7335 104, 105, -1, -1, -1, -1, 110, 111, 112, 113,
7336 114, 115, 116, 117, 118, -1, -1, 3, 4, 5,
7337 -1, 7, -1, -1, -1, 11, 12, -1, -1, -1,
7338 16, -1, 18, 19, 20, 21, 22, 23, 24, -1,
7339 -1, -1, -1, 147, 30, 31, 32, 33, 34, 35,
7340 36, -1, -1, 39, -1, -1, -1, -1, -1, -1,
7341 46, -1, -1, 49, 50, 51, 52, 53, 54, 55,
7342 56, 57, -1, 59, 60, 61, 62, 63, 64, 65,
7343 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7344 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7345 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7346 -1, -1, -1, 99, -1, -1, 102, 103, 104, 105,
7347 -1, -1, -1, -1, 110, 111, 112, 113, 114, 115,
7348 116, 117, 118, -1, -1, 3, 4, 5, -1, 7,
7349 -1, -1, -1, 11, 12, -1, -1, -1, 16, -1,
7350 18, 19, 20, 21, 22, 23, 24, -1, -1, -1,
7351 -1, 147, 30, 31, 32, 33, 34, 35, 36, -1,
7352 -1, 39, -1, -1, -1, -1, -1, -1, 46, -1,
7353 -1, 49, 50, 51, 52, 53, 54, 55, 56, 57,
7354 -1, 59, 60, 61, 62, 63, 64, 65, -1, -1,
7355 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7356 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7357 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7358 -1, 99, -1, -1, 102, 103, 104, 105, -1, -1,
7359 -1, -1, 110, 111, 112, 113, 114, 115, 116, 117,
7360 118, -1, -1, 3, 4, 5, -1, 7, -1, -1,
7361 -1, 11, 12, -1, -1, -1, 16, -1, 18, 19,
7362 20, 21, 22, 23, 24, -1, -1, -1, -1, 147,
7363 30, 31, 32, 33, 34, 35, 36, -1, -1, 39,
7364 -1, -1, -1, -1, -1, -1, 46, -1, -1, 49,
7365 50, 51, 52, 53, 54, 55, 56, 57, -1, 59,
7366 60, 61, 62, 63, 64, 65, -1, -1, -1, -1,
7367 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7368 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7369 -1, -1, -1, -1, -1, -1, 52, 53, -1, 99,
7370 56, -1, 102, 103, 104, 105, -1, -1, -1, -1,
7371 110, 111, 112, 113, 114, 115, 116, 117, 118, -1,
7372 76, 77, 78, 79, 80, 81, 82, 83, 84, -1,
7373 -1, 87, 88, -1, -1, -1, -1, 93, 94, 95,
7374 96, -1, -1, -1, -1, -1, -1, 147, -1, -1,
7375 -1, 107, 108, -1, -1, -1, -1, -1, -1, -1,
7376 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7377 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7378 -1, 137, 138, 139, 140, 141, 142, 143, 144, 145,
7379 146, -1, 148, 149, 52, 53, -1, -1, 56, -1,
7380 156, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7381 -1, -1, -1, -1, -1, -1, -1, -1, 76, 77,
7382 78, 79, 80, 81, 82, 83, 84, -1, -1, 87,
7383 88, -1, -1, -1, -1, 93, 94, 95, 96, -1,
7384 -1, -1, -1, -1, -1, -1, -1, -1, -1, 107,
7385 108, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7386 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7387 -1, -1, -1, -1, -1, -1, -1, -1, -1, 137,
7388 138, 139, 140, 141, 142, 143, 144, 145, 146, -1,
7389 148, 149, 52, 53, -1, -1, 56, -1, 156, -1,
7390 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7391 -1, -1, -1, -1, -1, -1, 76, 77, 78, 79,
7392 80, 81, 82, 83, 84, -1, -1, 87, 88, -1,
7393 -1, -1, -1, 93, 94, 95, 96, -1, -1, -1,
7394 -1, -1, -1, -1, -1, -1, -1, 107, 108, -1,
7395 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7396 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7397 -1, -1, -1, -1, -1, -1, -1, 137, 138, 139,
7398 140, 141, 142, 143, 144, 145, 146, -1, 148, 149,
7399 52, 53, -1, -1, 56, -1, 156, -1, -1, -1,
7400 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7401 -1, -1, -1, -1, 76, 77, 78, 79, 80, 81,
7402 82, 83, 84, -1, -1, 87, 88, -1, -1, -1,
7403 -1, 93, 94, 95, 96, -1, -1, -1, -1, -1,
7404 -1, -1, -1, -1, -1, 107, 108, -1, -1, -1,
7405 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7406 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7407 -1, -1, -1, -1, -1, 137, 138, 139, 140, 141,
7408 142, 143, 144, 145, 146, -1, 148, 149, 52, 53,
7409 -1, -1, 56, -1, 156, -1, -1, -1, -1, -1,
7410 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7411 -1, -1, 76, 77, 78, 79, 80, 81, 82, 83,
7412 84, -1, -1, 87, 88, -1, -1, -1, -1, 93,
7413 94, 95, 96, -1, -1, -1, -1, -1, -1, -1,
7414 -1, -1, -1, 107, 108, -1, -1, -1, -1, -1,
7415 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7416 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7417 -1, -1, -1, 137, 138, 139, 140, 141, 142, 143,
7418 144, 145, 146, -1, 148, 149, 52, 53, -1, -1,
7419 56, -1, 156, -1, -1, -1, -1, -1, -1, -1,
7420 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7421 76, 77, 78, 79, 80, 81, 82, 83, 84, -1,
7422 -1, 87, 88, -1, -1, -1, -1, 93, 94, 95,
7423 96, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7424 -1, 107, 108, -1, -1, -1, -1, -1, -1, -1,
7425 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7426 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7427 -1, 137, 138, 139, 140, 141, 142, 143, 144, 145,
7428 146, -1, 148, 149, 52, 53, -1, -1, 56, -1,
7429 156, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7430 -1, -1, -1, -1, -1, -1, -1, -1, 76, 77,
7431 78, 79, 80, 81, 82, 83, 84, -1, -1, 87,
7432 88, -1, -1, -1, -1, 93, 94, 95, 96, -1,
7433 -1, -1, -1, -1, -1, -1, -1, -1, -1, 107,
7434 108, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7435 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7436 -1, -1, -1, -1, -1, -1, -1, -1, -1, 137,
7437 138, 139, 140, 141, 142, 143, 144, 145, 146, -1,
7438 148, 149, 52, 53, -1, -1, 56, -1, 156, -1,
7439 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7440 -1, -1, -1, -1, -1, -1, 76, 77, 78, 79,
7441 80, 81, 82, 83, 84, -1, -1, 87, 88, -1,
7442 -1, -1, -1, 93, 94, 95, 96, -1, -1, -1,
7443 -1, -1, -1, -1, -1, -1, -1, 107, 108, -1,
7444 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7445 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7446 -1, -1, -1, -1, -1, -1, -1, 137, 138, 139,
7447 140, 141, 142, 143, 144, 145, 146, -1, 148, 149,
7448 52, 53, -1, -1, 56, -1, 156, -1, -1, -1,
7449 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7450 -1, -1, -1, -1, 76, 77, 78, 79, 80, 81,
7451 82, 83, 84, -1, -1, 87, 88, -1, -1, -1,
7452 -1, 93, 94, 95, 96, -1, -1, -1, -1, -1,
7453 -1, -1, -1, -1, -1, 107, 108, -1, -1, -1,
7454 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7455 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7456 -1, -1, -1, -1, -1, 137, 138, 139, 140, 141,
7457 142, 143, 144, 145, 146, -1, 148, 149, 52, 53,
7458 -1, -1, 56, -1, 156, -1, -1, -1, -1, -1,
7459 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7460 -1, -1, 76, 77, 78, 79, 80, 81, 82, 83,
7461 84, -1, -1, 87, 88, -1, -1, -1, -1, 93,
7462 94, 95, 96, -1, -1, -1, -1, -1, -1, -1,
7463 -1, -1, -1, 107, 108, -1, -1, -1, -1, -1,
7464 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7465 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7466 -1, -1, -1, 137, 138, 139, 140, 141, 142, 143,
7467 144, 145, 146, -1, 148, 149, 52, 53, -1, -1,
7468 56, -1, 156, -1, -1, -1, -1, -1, -1, -1,
7469 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7470 76, 77, 78, 79, 80, 81, 82, 83, 84, -1,
7471 -1, 87, 88, -1, -1, -1, -1, 93, 94, 95,
7472 96, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7473 -1, 107, 108, -1, -1, -1, -1, -1, -1, -1,
7474 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7475 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7476 -1, 137, 138, 139, 140, 141, 142, 143, 144, 145,
7477 146, -1, 148, 149, 52, 53, -1, -1, 56, -1,
7478 156, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7479 -1, -1, -1, -1, -1, -1, -1, -1, 76, 77,
7480 78, 79, 80, 81, 82, 83, 84, -1, -1, 87,
7481 88, -1, -1, -1, -1, 93, 94, 95, 96, -1,
7482 -1, -1, -1, -1, -1, -1, -1, -1, -1, 107,
7483 108, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7484 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7485 -1, -1, -1, -1, -1, -1, -1, -1, -1, 137,
7486 138, 139, 140, 141, 142, 143, 144, 145, 146, -1,
7487 148, 149, 52, 53, -1, -1, 56, -1, 156, -1,
7488 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7489 -1, -1, -1, -1, -1, -1, 76, 77, 78, 79,
7490 80, 81, 82, 83, 84, -1, -1, 87, 88, -1,
7491 -1, -1, -1, 93, 94, 95, 96, -1, -1, -1,
7492 -1, -1, -1, -1, -1, -1, -1, 107, 108, -1,
7493 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7494 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7495 -1, -1, -1, -1, -1, -1, -1, 137, 138, 139,
7496 140, 141, 142, 143, 144, 145, 146, -1, 148, 149,
7497 52, 53, -1, -1, 56, -1, 156, -1, -1, -1,
7498 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7499 -1, -1, -1, -1, 76, 77, 78, 79, 80, 81,
7500 82, 83, 84, -1, -1, 87, 88, -1, -1, -1,
7501 -1, 93, 94, 95, 96, -1, -1, -1, -1, -1,
7502 -1, -1, -1, -1, -1, 107, 108, -1, -1, -1,
7503 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7504 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7505 -1, -1, -1, -1, -1, 137, 138, 139, 140, 141,
7506 142, 143, 144, 145, 146, -1, 148, 149, -1, -1,
7507 -1, -1, -1, -1, 156
7508};
7509
7510/* YYSTOS[STATE-NUM] -- The symbol kind of the accessing symbol of
7511 state STATE-NUM. */
7512static const yytype_int16 yystos[] =
7513{
7514 0, 165, 166, 1, 3, 4, 5, 6, 7, 11,
7515 12, 16, 18, 19, 20, 21, 22, 23, 24, 30,
7516 31, 32, 33, 34, 35, 36, 39, 45, 46, 47,
7517 48, 49, 50, 51, 52, 53, 54, 55, 56, 57,
7518 59, 60, 61, 62, 63, 64, 65, 76, 77, 91,
7519 92, 99, 102, 103, 104, 105, 107, 110, 111, 112,
7520 113, 114, 115, 116, 117, 118, 147, 148, 149, 164,
7521 167, 168, 180, 182, 183, 184, 185, 186, 187, 191,
7522 195, 197, 203, 206, 208, 209, 210, 212, 214, 215,
7523 216, 217, 226, 227, 228, 229, 230, 231, 234, 255,
7524 267, 268, 269, 270, 271, 272, 273, 274, 275, 276,
7525 277, 278, 287, 288, 324, 329, 330, 380, 381, 382,
7526 383, 384, 385, 387, 388, 391, 392, 394, 395, 396,
7527 397, 411, 412, 414, 415, 416, 417, 418, 419, 420,
7528 421, 422, 483, 0, 3, 4, 5, 6, 7, 8,
7529 9, 10, 11, 12, 13, 14, 15, 16, 17, 18,
7530 19, 20, 21, 22, 23, 24, 25, 26, 30, 31,
7531 32, 33, 34, 35, 36, 37, 38, 39, 45, 46,
7532 47, 48, 49, 50, 51, 52, 53, 56, 76, 77,
7533 78, 79, 80, 81, 82, 83, 84, 87, 88, 93,
7534 94, 95, 96, 107, 108, 137, 138, 139, 140, 141,
7535 142, 143, 144, 145, 146, 148, 149, 156, 220, 221,
7536 222, 224, 225, 411, 179, 179, 179, 39, 58, 99,
7537 102, 107, 108, 109, 112, 148, 187, 209, 217, 227,
7538 238, 239, 245, 246, 249, 251, 252, 268, 418, 419,
7539 421, 422, 470, 471, 246, 157, 242, 247, 248, 154,
7540 157, 189, 54, 221, 189, 151, 169, 170, 235, 483,
7541 21, 22, 32, 195, 197, 208, 227, 268, 287, 288,
7542 227, 227, 227, 56, 47, 102, 171, 176, 177, 182,
7543 211, 212, 483, 171, 240, 251, 470, 483, 239, 469,
7544 470, 483, 46, 99, 147, 155, 195, 197, 216, 255,
7545 268, 418, 419, 422, 322, 220, 400, 413, 417, 400,
7546 401, 402, 161, 386, 386, 386, 386, 416, 203, 227,
7547 227, 154, 160, 163, 481, 482, 169, 40, 41, 42,
7548 43, 44, 37, 38, 157, 425, 426, 427, 428, 429,
7549 425, 428, 26, 151, 242, 248, 279, 331, 28, 280,
7550 328, 134, 155, 102, 107, 214, 134, 25, 78, 79,
7551 80, 81, 82, 83, 84, 85, 86, 87, 88, 89,
7552 90, 95, 96, 101, 135, 137, 138, 139, 140, 141,
7553 142, 143, 144, 145, 146, 233, 233, 69, 97, 98,
7554 153, 475, 476, 256, 1, 191, 198, 199, 199, 200,
7555 202, 202, 163, 199, 482, 99, 210, 217, 268, 293,
7556 418, 419, 422, 52, 56, 95, 99, 218, 219, 268,
7557 418, 419, 422, 219, 33, 34, 35, 36, 49, 50,
7558 51, 52, 56, 157, 194, 220, 420, 465, 466, 467,
7559 246, 157, 248, 98, 475, 476, 331, 383, 100, 100,
7560 155, 239, 56, 239, 239, 239, 400, 134, 101, 155,
7561 250, 483, 98, 153, 475, 100, 100, 155, 250, 92,
7562 244, 246, 251, 449, 470, 483, 246, 189, 191, 477,
7563 191, 54, 64, 65, 181, 157, 235, 236, 164, 425,
7564 425, 98, 475, 100, 178, 211, 158, 163, 482, 477,
7565 257, 159, 155, 189, 480, 155, 480, 152, 480, 189,
7566 56, 416, 213, 214, 427, 155, 98, 153, 475, 319,
7567 66, 119, 121, 122, 403, 119, 119, 403, 67, 403,
7568 161, 389, 398, 393, 399, 78, 160, 168, 171, 199,
7569 199, 199, 199, 235, 237, 191, 191, 52, 54, 55,
7570 56, 57, 58, 78, 92, 102, 107, 108, 109, 141,
7571 144, 298, 367, 426, 430, 431, 433, 434, 437, 438,
7572 440, 441, 442, 443, 449, 450, 451, 452, 453, 454,
7573 455, 456, 457, 458, 459, 460, 461, 462, 134, 265,
7574 443, 134, 266, 332, 333, 106, 207, 334, 335, 335,
7575 235, 211, 155, 216, 155, 235, 193, 227, 227, 227,
7576 227, 227, 227, 227, 227, 227, 227, 227, 227, 227,
7577 192, 227, 227, 227, 227, 227, 227, 227, 227, 227,
7578 227, 227, 52, 53, 56, 224, 472, 473, 244, 251,
7579 52, 53, 56, 224, 472, 242, 171, 174, 13, 289,
7580 481, 289, 199, 171, 171, 259, 163, 56, 98, 153,
7581 475, 25, 199, 52, 56, 218, 138, 424, 483, 98,
7582 153, 475, 264, 468, 69, 98, 474, 246, 477, 52,
7583 56, 242, 472, 235, 235, 223, 100, 124, 235, 239,
7584 239, 249, 252, 470, 52, 56, 244, 52, 56, 235,
7585 235, 471, 477, 155, 477, 155, 158, 477, 221, 236,
7586 227, 152, 134, 134, 56, 472, 472, 235, 170, 477,
7587 177, 158, 470, 155, 213, 52, 56, 244, 52, 56,
7588 320, 405, 404, 119, 390, 403, 66, 119, 119, 390,
7589 66, 119, 227, 152, 182, 102, 107, 294, 295, 296,
7590 297, 451, 155, 432, 463, 464, 155, 432, 155, 439,
7591 464, 477, 299, 300, 155, 439, 239, 34, 52, 52,
7592 155, 439, 34, 52, 39, 188, 209, 227, 232, 174,
7593 481, 188, 232, 174, 319, 152, 333, 319, 10, 68,
7594 286, 286, 107, 203, 204, 205, 239, 251, 253, 254,
7595 477, 213, 155, 99, 185, 190, 205, 217, 227, 239,
7596 241, 254, 268, 422, 341, 341, 189, 100, 100, 151,
7597 242, 248, 189, 478, 155, 100, 100, 242, 243, 248,
7598 483, 235, 286, 171, 13, 171, 27, 290, 481, 286,
7599 286, 17, 283, 337, 25, 258, 343, 52, 56, 244,
7600 52, 56, 260, 263, 423, 262, 52, 56, 218, 244,
7601 174, 191, 196, 477, 243, 248, 190, 227, 241, 190,
7602 241, 221, 235, 239, 250, 100, 100, 478, 100, 100,
7603 449, 470, 191, 39, 190, 241, 480, 214, 478, 321,
7604 406, 410, 417, 422, 386, 403, 386, 386, 386, 296,
7605 451, 155, 477, 155, 462, 430, 456, 458, 434, 437,
7606 454, 460, 134, 239, 438, 453, 460, 452, 454, 189,
7607 44, 44, 286, 286, 320, 152, 320, 239, 155, 44,
7608 213, 56, 44, 134, 44, 98, 153, 475, 339, 339,
7609 136, 235, 235, 333, 207, 159, 100, 235, 235, 207,
7610 8, 281, 376, 483, 14, 15, 284, 285, 291, 292,
7611 483, 292, 201, 107, 239, 336, 286, 341, 337, 286,
7612 478, 199, 481, 199, 174, 478, 286, 477, 194, 331,
7613 328, 235, 235, 100, 235, 235, 477, 155, 477, 189,
7614 179, 407, 477, 294, 297, 295, 432, 155, 439, 155,
7615 439, 155, 439, 155, 439, 439, 188, 232, 237, 237,
7616 321, 321, 107, 239, 237, 237, 235, 237, 52, 56,
7617 244, 52, 56, 340, 340, 227, 190, 241, 190, 241,
7618 152, 235, 190, 241, 190, 241, 239, 254, 377, 483,
7619 175, 284, 171, 199, 286, 286, 239, 155, 289, 339,
7620 286, 290, 174, 481, 286, 235, 157, 298, 325, 426,
7621 431, 435, 436, 438, 445, 446, 447, 448, 449, 454,
7622 460, 462, 408, 155, 155, 454, 454, 460, 454, 227,
7623 227, 179, 179, 239, 182, 182, 227, 478, 52, 56,
7624 58, 91, 92, 99, 102, 104, 105, 107, 112, 140,
7625 324, 346, 347, 348, 350, 353, 357, 358, 359, 362,
7626 363, 364, 365, 366, 367, 368, 369, 370, 371, 372,
7627 373, 374, 375, 380, 381, 384, 385, 388, 392, 395,
7628 397, 419, 456, 346, 190, 241, 101, 378, 483, 9,
7629 282, 379, 483, 172, 289, 107, 239, 171, 340, 261,
7630 286, 448, 155, 303, 483, 323, 155, 303, 155, 444,
7631 483, 155, 444, 155, 444, 171, 295, 439, 439, 155,
7632 439, 439, 139, 313, 314, 483, 313, 371, 371, 56,
7633 218, 340, 347, 355, 356, 357, 358, 361, 478, 189,
7634 340, 479, 52, 400, 52, 102, 417, 101, 155, 139,
7635 155, 155, 347, 89, 90, 98, 153, 157, 351, 352,
7636 52, 99, 217, 268, 418, 419, 422, 289, 176, 171,
7637 171, 239, 292, 337, 338, 345, 346, 171, 189, 316,
7638 462, 29, 123, 326, 458, 436, 454, 460, 438, 460,
7639 454, 0, 120, 409, 454, 298, 301, 302, 304, 305,
7640 307, 308, 310, 311, 312, 315, 452, 454, 455, 460,
7641 462, 171, 174, 347, 478, 347, 359, 361, 478, 155,
7642 152, 235, 124, 199, 372, 355, 359, 349, 360, 361,
7643 112, 364, 368, 371, 371, 218, 340, 478, 340, 477,
7644 355, 358, 362, 355, 358, 362, 56, 98, 153, 475,
7645 171, 163, 173, 291, 289, 40, 41, 286, 160, 158,
7646 327, 171, 303, 155, 444, 155, 444, 155, 444, 155,
7647 444, 444, 439, 303, 155, 303, 155, 309, 483, 316,
7648 300, 155, 306, 309, 99, 268, 155, 309, 477, 155,
7649 155, 354, 477, 155, 353, 155, 400, 477, 477, 477,
7650 478, 478, 478, 52, 56, 244, 52, 56, 376, 379,
7651 342, 199, 199, 52, 317, 318, 450, 174, 152, 454,
7652 454, 460, 454, 301, 458, 305, 307, 454, 460, 139,
7653 268, 308, 460, 56, 98, 454, 360, 362, 360, 359,
7654 361, 478, 171, 155, 189, 286, 444, 444, 155, 444,
7655 444, 303, 155, 309, 155, 309, 155, 309, 155, 309,
7656 52, 56, 309, 155, 479, 292, 343, 344, 318, 454,
7657 454, 454, 460, 454, 444, 309, 309, 155, 309, 309,
7658 454, 309
7659};
7660
7661/* YYR1[RULE-NUM] -- Symbol kind of the left-hand side of rule RULE-NUM. */
7662static const yytype_int16 yyr1[] =
7663{
7664 0, 162, 165, 163, 163, 164, 166, 167, 167, 167,
7665 168, 168, 169, 170, 171, 172, 173, 174, 175, 174,
7666 176, 176, 176, 177, 178, 177, 179, 180, 181, 182,
7667 182, 182, 182, 182, 182, 182, 182, 182, 182, 182,
7668 182, 182, 183, 182, 182, 182, 182, 182, 184, 185,
7669 186, 186, 186, 186, 186, 186, 186, 186, 185, 187,
7670 187, 185, 188, 188, 189, 189, 188, 190, 190, 190,
7671 191, 191, 191, 191, 191, 192, 191, 193, 191, 191,
7672 194, 195, 196, 197, 198, 199, 199, 200, 201, 202,
7673 203, 203, 204, 205, 206, 206, 207, 208, 208, 208,
7674 209, 209, 209, 209, 209, 209, 209, 209, 209, 209,
7675 209, 209, 210, 210, 211, 211, 212, 212, 212, 213,
7676 213, 212, 212, 212, 212, 212, 212, 212, 214, 214,
7677 215, 215, 216, 216, 216, 216, 216, 216, 216, 216,
7678 216, 217, 217, 217, 217, 217, 217, 217, 217, 217,
7679 218, 218, 219, 219, 219, 220, 220, 220, 220, 220,
7680 221, 221, 222, 223, 222, 224, 224, 224, 224, 224,
7681 224, 224, 224, 224, 224, 224, 224, 224, 224, 224,
7682 224, 224, 224, 224, 224, 224, 224, 224, 224, 224,
7683 224, 224, 224, 224, 224, 225, 225, 225, 225, 225,
7684 225, 225, 225, 225, 225, 225, 225, 225, 225, 225,
7685 225, 225, 225, 225, 225, 225, 225, 225, 225, 225,
7686 225, 225, 225, 225, 225, 225, 225, 225, 225, 225,
7687 225, 225, 225, 225, 225, 225, 226, 227, 228, 228,
7688 228, 228, 228, 228, 228, 228, 227, 229, 229, 229,
7689 229, 229, 229, 227, 227, 227, 227, 227, 227, 227,
7690 227, 227, 227, 227, 227, 227, 227, 227, 227, 227,
7691 227, 227, 227, 227, 227, 227, 227, 227, 227, 227,
7692 230, 230, 227, 227, 227, 231, 232, 232, 232, 233,
7693 233, 233, 233, 234, 234, 235, 236, 237, 238, 239,
7694 240, 240, 240, 240, 241, 241, 242, 242, 242, 243,
7695 243, 244, 244, 244, 244, 244, 245, 246, 246, 246,
7696 246, 246, 246, 247, 248, 249, 249, 250, 250, 251,
7697 251, 251, 251, 252, 252, 253, 253, 254, 254, 254,
7698 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
7699 255, 256, 255, 257, 255, 255, 255, 255, 255, 255,
7700 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
7701 255, 255, 255, 255, 255, 258, 255, 259, 255, 255,
7702 260, 261, 255, 262, 255, 263, 255, 264, 255, 265,
7703 255, 266, 255, 255, 255, 255, 255, 267, 268, 269,
7704 270, 271, 272, 273, 274, 275, 276, 277, 278, 279,
7705 280, 281, 282, 283, 284, 285, 286, 286, 287, 288,
7706 289, 289, 289, 290, 290, 291, 291, 292, 292, 293,
7707 293, 294, 294, 295, 295, 296, 296, 296, 296, 296,
7708 297, 297, 298, 298, 299, 300, 301, 301, 302, 302,
7709 303, 303, 304, 304, 304, 304, 305, 306, 307, 308,
7710 308, 309, 309, 310, 310, 310, 310, 310, 310, 310,
7711 310, 310, 310, 310, 310, 311, 311, 311, 312, 311,
7712 313, 313, 314, 315, 315, 316, 316, 317, 317, 318,
7713 318, 319, 320, 321, 322, 323, 324, 325, 325, 326,
7714 327, 326, 328, 329, 329, 329, 329, 329, 330, 330,
7715 330, 330, 330, 330, 330, 330, 331, 331, 332, 333,
7716 334, 335, 336, 336, 336, 336, 337, 338, 338, 339,
7717 340, 341, 342, 343, 344, 344, 345, 345, 345, 346,
7718 346, 346, 346, 346, 346, 347, 348, 348, 349, 350,
7719 350, 351, 352, 353, 353, 353, 353, 353, 353, 353,
7720 353, 353, 353, 353, 353, 353, 354, 353, 353, 353,
7721 355, 355, 355, 355, 355, 355, 356, 356, 357, 357,
7722 358, 359, 359, 360, 360, 361, 362, 362, 362, 362,
7723 363, 363, 364, 364, 365, 365, 366, 366, 367, 368,
7724 368, 369, 370, 370, 370, 370, 370, 370, 369, 369,
7725 369, 369, 371, 371, 371, 371, 371, 371, 371, 371,
7726 371, 371, 372, 373, 373, 374, 375, 375, 375, 376,
7727 376, 377, 377, 377, 378, 378, 379, 379, 380, 380,
7728 381, 382, 382, 382, 383, 384, 385, 386, 386, 387,
7729 388, 389, 389, 390, 390, 391, 392, 393, 393, 394,
7730 395, 396, 397, 398, 398, 399, 399, 400, 400, 401,
7731 401, 402, 402, 403, 404, 403, 405, 406, 407, 408,
7732 403, 409, 409, 410, 410, 411, 411, 412, 413, 413,
7733 414, 415, 415, 416, 416, 416, 416, 417, 417, 417,
7734 418, 418, 418, 419, 419, 419, 419, 419, 419, 419,
7735 420, 420, 421, 421, 422, 422, 423, 424, 424, 425,
7736 425, 426, 427, 428, 429, 428, 430, 430, 431, 431,
7737 432, 432, 433, 433, 433, 433, 434, 434, 435, 435,
7738 435, 435, 436, 436, 437, 438, 438, 439, 439, 440,
7739 440, 440, 440, 440, 440, 440, 440, 440, 440, 440,
7740 440, 441, 441, 442, 441, 441, 443, 444, 444, 445,
7741 445, 445, 445, 445, 445, 445, 445, 445, 445, 445,
7742 445, 446, 446, 447, 446, 446, 448, 449, 450, 450,
7743 450, 450, 451, 451, 452, 453, 453, 454, 454, 455,
7744 456, 456, 457, 458, 458, 459, 459, 460, 460, 461,
7745 461, 462, 462, 462, 463, 463, 464, 465, 466, 467,
7746 468, 467, 469, 469, 470, 470, 471, 471, 471, 471,
7747 471, 471, 472, 472, 472, 472, 473, 473, 473, 474,
7748 474, 475, 475, 476, 476, 477, 478, 479, 480, 480,
7749 481, 481, 482, 482, 483
7750};
7751
7752/* YYR2[RULE-NUM] -- Number of symbols on the right-hand side of rule RULE-NUM. */
7753static const yytype_int8 yyr2[] =
7754{
7755 0, 2, 0, 0, 1, 2, 2, 1, 1, 3,
7756 1, 2, 1, 3, 2, 0, 0, 8, 0, 5,
7757 1, 1, 3, 1, 0, 3, 0, 2, 0, 4,
7758 3, 3, 3, 2, 3, 3, 3, 3, 4, 4,
7759 1, 4, 4, 1, 7, 4, 1, 1, 4, 1,
7760 4, 7, 6, 6, 6, 6, 5, 4, 1, 4,
7761 4, 1, 1, 4, 0, 1, 3, 1, 4, 1,
7762 1, 3, 3, 3, 2, 0, 7, 0, 7, 1,
7763 1, 2, 0, 5, 1, 1, 1, 0, 0, 4,
7764 1, 1, 1, 1, 1, 4, 3, 1, 1, 1,
7765 2, 3, 4, 5, 4, 5, 6, 2, 2, 2,
7766 2, 2, 1, 3, 1, 3, 1, 2, 3, 1,
7767 3, 5, 2, 4, 2, 4, 1, 3, 1, 3,
7768 2, 3, 1, 1, 4, 3, 3, 3, 3, 2,
7769 1, 1, 1, 4, 3, 3, 3, 3, 2, 1,
7770 1, 1, 2, 1, 3, 1, 1, 1, 1, 1,
7771 1, 1, 1, 0, 4, 1, 1, 1, 1, 1,
7772 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
7773 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
7774 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
7775 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
7776 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
7777 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
7778 1, 1, 1, 1, 1, 1, 4, 1, 4, 7,
7779 6, 6, 6, 6, 5, 4, 1, 3, 3, 2,
7780 2, 2, 2, 1, 3, 3, 3, 3, 3, 3,
7781 4, 2, 2, 3, 3, 3, 3, 1, 3, 3,
7782 3, 3, 3, 2, 2, 3, 3, 3, 3, 4,
7783 4, 4, 1, 1, 1, 6, 1, 4, 3, 1,
7784 1, 1, 1, 3, 3, 1, 1, 1, 1, 1,
7785 1, 2, 4, 2, 1, 4, 3, 5, 3, 1,
7786 1, 1, 1, 2, 4, 2, 1, 1, 1, 2,
7787 2, 4, 1, 0, 2, 2, 1, 2, 1, 1,
7788 1, 3, 3, 2, 1, 1, 1, 3, 4, 2,
7789 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
7790 1, 0, 4, 0, 4, 3, 3, 2, 3, 3,
7791 1, 4, 3, 1, 6, 4, 3, 2, 1, 2,
7792 1, 6, 6, 4, 4, 0, 6, 0, 5, 5,
7793 0, 0, 9, 0, 6, 0, 7, 0, 5, 0,
7794 5, 0, 5, 1, 1, 1, 1, 1, 1, 1,
7795 1, 1, 2, 2, 1, 2, 1, 1, 1, 1,
7796 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
7797 1, 1, 2, 1, 1, 1, 5, 1, 2, 1,
7798 1, 1, 3, 1, 3, 1, 3, 5, 1, 3,
7799 2, 1, 1, 1, 0, 2, 2, 1, 1, 3,
7800 2, 1, 4, 2, 2, 1, 1, 1, 3, 1,
7801 3, 2, 1, 6, 8, 4, 6, 4, 6, 4,
7802 6, 2, 4, 2, 4, 1, 2, 2, 1, 1,
7803 1, 1, 4, 0, 1, 1, 4, 1, 3, 1,
7804 1, 0, 0, 0, 0, 0, 9, 4, 1, 3,
7805 0, 4, 3, 2, 4, 5, 5, 3, 2, 4,
7806 4, 3, 3, 2, 1, 4, 3, 3, 0, 7,
7807 0, 7, 1, 2, 3, 4, 5, 1, 1, 0,
7808 0, 0, 0, 9, 1, 1, 1, 3, 3, 1,
7809 2, 3, 1, 1, 1, 1, 3, 1, 0, 4,
7810 1, 2, 2, 1, 1, 4, 4, 4, 3, 4,
7811 4, 4, 3, 3, 3, 2, 0, 6, 2, 4,
7812 1, 1, 2, 2, 4, 1, 2, 3, 1, 3,
7813 5, 2, 1, 1, 3, 1, 3, 1, 2, 1,
7814 1, 3, 2, 1, 1, 3, 2, 1, 2, 1,
7815 1, 1, 3, 3, 2, 2, 2, 2, 1, 1,
7816 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
7817 1, 1, 1, 2, 2, 4, 2, 3, 1, 6,
7818 1, 1, 1, 1, 2, 1, 3, 1, 1, 1,
7819 1, 1, 1, 2, 3, 3, 3, 1, 2, 4,
7820 1, 0, 3, 1, 2, 4, 1, 0, 3, 4,
7821 1, 4, 1, 0, 3, 0, 3, 0, 2, 0,
7822 2, 0, 2, 1, 0, 3, 0, 0, 0, 0,
7823 7, 1, 1, 1, 1, 1, 1, 2, 1, 1,
7824 3, 1, 2, 1, 1, 1, 1, 1, 1, 1,
7825 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
7826 1, 1, 1, 1, 1, 1, 0, 4, 1, 1,
7827 1, 0, 3, 1, 0, 3, 2, 1, 1, 3,
7828 2, 1, 4, 2, 2, 1, 1, 1, 4, 2,
7829 2, 1, 1, 1, 3, 1, 3, 2, 1, 6,
7830 8, 4, 6, 4, 6, 4, 6, 2, 4, 2,
7831 4, 1, 2, 1, 1, 1, 1, 2, 1, 6,
7832 8, 4, 6, 4, 6, 4, 6, 2, 4, 2,
7833 4, 1, 2, 1, 1, 1, 1, 1, 1, 1,
7834 1, 1, 1, 1, 1, 1, 3, 1, 3, 1,
7835 1, 1, 1, 2, 1, 1, 1, 2, 1, 1,
7836 1, 2, 2, 1, 0, 1, 1, 1, 1, 1,
7837 0, 4, 1, 2, 1, 3, 3, 2, 1, 4,
7838 2, 1, 1, 1, 1, 1, 1, 1, 1, 1,
7839 1, 1, 1, 1, 1, 2, 2, 2, 1, 1,
7840 1, 1, 1, 2, 0
7841};
7842
7843
7844enum { YYENOMEM = -2 };
7845
7846#define yyerrok (yyerrstatus = 0)
7847#define yyclearin (yychar = YYEMPTY)
7848
7849#define YYACCEPT goto yyacceptlab
7850#define YYABORT goto yyabortlab
7851#define YYERROR goto yyerrorlab
7852#define YYNOMEM goto yyexhaustedlab
7853
7854
7855#define YYRECOVERING() (!!yyerrstatus)
7856
7857#define YYBACKUP(Token, Value) \
7858 do \
7859 if (yychar == YYEMPTY) \
7860 { \
7861 yychar = (Token); \
7862 yylval = (Value); \
7863 YYPOPSTACK (yylen); \
7864 yystate = *yyssp; \
7865 goto yybackup; \
7866 } \
7867 else \
7868 { \
7869 yyerror (&yylloc, p, YY_("syntax error: cannot back up")); \
7870 YYERROR; \
7871 } \
7872 while (0)
7873
7874/* Backward compatibility with an undocumented macro.
7875 Use YYerror or YYUNDEF. */
7876#define YYERRCODE YYUNDEF
7877
7878/* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
7879 If N is 0, then set CURRENT to the empty location which ends
7880 the previous symbol: RHS[0] (always defined). */
7881
7882#ifndef YYLLOC_DEFAULT
7883# define YYLLOC_DEFAULT(Current, Rhs, N) \
7884 do \
7885 if (N) \
7886 { \
7887 (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \
7888 (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \
7889 (Current).last_line = YYRHSLOC (Rhs, N).last_line; \
7890 (Current).last_column = YYRHSLOC (Rhs, N).last_column; \
7891 } \
7892 else \
7893 { \
7894 (Current).first_line = (Current).last_line = \
7895 YYRHSLOC (Rhs, 0).last_line; \
7896 (Current).first_column = (Current).last_column = \
7897 YYRHSLOC (Rhs, 0).last_column; \
7898 } \
7899 while (0)
7900#endif
7901
7902#define YYRHSLOC(Rhs, K) ((Rhs)[K])
7903
7904
7905/* Enable debugging if requested. */
7906#if YYDEBUG
7907
7908# ifndef YYFPRINTF
7909# include <stdio.h> /* INFRINGES ON USER NAME SPACE */
7910# define YYFPRINTF fprintf
7911# endif
7912
7913# define YYDPRINTF(Args) \
7914do { \
7915 if (yydebug) \
7916 YYFPRINTF Args; \
7917} while (0)
7918
7919
7920/* YYLOCATION_PRINT -- Print the location on the stream.
7921 This macro was not mandated originally: define only if we know
7922 we won't break user code: when these are the locations we know. */
7923
7924# ifndef YYLOCATION_PRINT
7925
7926# if defined YY_LOCATION_PRINT
7927
7928 /* Temporary convenience wrapper in case some people defined the
7929 undocumented and private YY_LOCATION_PRINT macros. */
7930# define YYLOCATION_PRINT(File, Loc, p) YY_LOCATION_PRINT(File, *(Loc), p)
7931
7932# elif defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL
7933
7934/* Print *YYLOCP on YYO. Private, do not rely on its existence. */
7935
7936YY_ATTRIBUTE_UNUSED
7937static int
7938yy_location_print_ (FILE *yyo, YYLTYPE const * const yylocp)
7939{
7940 int res = 0;
7941 int end_col = 0 != yylocp->last_column ? yylocp->last_column - 1 : 0;
7942 if (0 <= yylocp->first_line)
7943 {
7944 res += YYFPRINTF (yyo, "%d", yylocp->first_line);
7945 if (0 <= yylocp->first_column)
7946 res += YYFPRINTF (yyo, ".%d", yylocp->first_column);
7947 }
7948 if (0 <= yylocp->last_line)
7949 {
7950 if (yylocp->first_line < yylocp->last_line)
7951 {
7952 res += YYFPRINTF (yyo, "-%d", yylocp->last_line);
7953 if (0 <= end_col)
7954 res += YYFPRINTF (yyo, ".%d", end_col);
7955 }
7956 else if (0 <= end_col && yylocp->first_column < end_col)
7957 res += YYFPRINTF (yyo, "-%d", end_col);
7958 }
7959 return res;
7960}
7961
7962# define YYLOCATION_PRINT yy_location_print_
7963
7964 /* Temporary convenience wrapper in case some people defined the
7965 undocumented and private YY_LOCATION_PRINT macros. */
7966# define YY_LOCATION_PRINT(File, Loc, p) YYLOCATION_PRINT(File, &(Loc), p)
7967
7968# else
7969
7970# define YYLOCATION_PRINT(File, Loc, p) ((void) 0)
7971 /* Temporary convenience wrapper in case some people defined the
7972 undocumented and private YY_LOCATION_PRINT macros. */
7973# define YY_LOCATION_PRINT YYLOCATION_PRINT
7974
7975# endif
7976# endif /* !defined YYLOCATION_PRINT */
7977
7978
7979# define YY_SYMBOL_PRINT(Title, Kind, Value, Location, p) \
7980do { \
7981 if (yydebug) \
7982 { \
7983 YYFPRINTF (stderr, "%s ", Title); \
7984 yy_symbol_print (stderr, \
7985 Kind, Value, Location, p); \
7986 YYFPRINTF (stderr, "\n"); \
7987 } \
7988} while (0)
7989
7990
7991/*-----------------------------------.
7992| Print this symbol's value on YYO. |
7993`-----------------------------------*/
7994
7995static void
7996yy_symbol_value_print (FILE *yyo,
7997 yysymbol_kind_t yykind, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp, struct parser_params *p)
7998{
7999 FILE *yyoutput = yyo;
8000 YY_USE (yyoutput);
8001 YY_USE (yylocationp);
8002 YY_USE (p);
8003 if (!yyvaluep)
8004 return;
8005 YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
8006switch (yykind)
8007 {
8008 case YYSYMBOL_keyword_class: /* "'class'" */
8009#line 2633 "parse.y"
8010 {
8011 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8012}
8013#line 8014 "parse.c"
8014 break;
8015
8016 case YYSYMBOL_keyword_module: /* "'module'" */
8017#line 2633 "parse.y"
8018 {
8019 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8020}
8021#line 8022 "parse.c"
8022 break;
8023
8024 case YYSYMBOL_keyword_def: /* "'def'" */
8025#line 2633 "parse.y"
8026 {
8027 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8028}
8029#line 8030 "parse.c"
8030 break;
8031
8032 case YYSYMBOL_keyword_undef: /* "'undef'" */
8033#line 2633 "parse.y"
8034 {
8035 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8036}
8037#line 8038 "parse.c"
8038 break;
8039
8040 case YYSYMBOL_keyword_begin: /* "'begin'" */
8041#line 2633 "parse.y"
8042 {
8043 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8044}
8045#line 8046 "parse.c"
8046 break;
8047
8048 case YYSYMBOL_keyword_rescue: /* "'rescue'" */
8049#line 2633 "parse.y"
8050 {
8051 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8052}
8053#line 8054 "parse.c"
8054 break;
8055
8056 case YYSYMBOL_keyword_ensure: /* "'ensure'" */
8057#line 2633 "parse.y"
8058 {
8059 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8060}
8061#line 8062 "parse.c"
8062 break;
8063
8064 case YYSYMBOL_keyword_end: /* "'end'" */
8065#line 2633 "parse.y"
8066 {
8067 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8068}
8069#line 8070 "parse.c"
8070 break;
8071
8072 case YYSYMBOL_keyword_if: /* "'if'" */
8073#line 2633 "parse.y"
8074 {
8075 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8076}
8077#line 8078 "parse.c"
8078 break;
8079
8080 case YYSYMBOL_keyword_unless: /* "'unless'" */
8081#line 2633 "parse.y"
8082 {
8083 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8084}
8085#line 8086 "parse.c"
8086 break;
8087
8088 case YYSYMBOL_keyword_then: /* "'then'" */
8089#line 2633 "parse.y"
8090 {
8091 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8092}
8093#line 8094 "parse.c"
8094 break;
8095
8096 case YYSYMBOL_keyword_elsif: /* "'elsif'" */
8097#line 2633 "parse.y"
8098 {
8099 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8100}
8101#line 8102 "parse.c"
8102 break;
8103
8104 case YYSYMBOL_keyword_else: /* "'else'" */
8105#line 2633 "parse.y"
8106 {
8107 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8108}
8109#line 8110 "parse.c"
8110 break;
8111
8112 case YYSYMBOL_keyword_case: /* "'case'" */
8113#line 2633 "parse.y"
8114 {
8115 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8116}
8117#line 8118 "parse.c"
8118 break;
8119
8120 case YYSYMBOL_keyword_when: /* "'when'" */
8121#line 2633 "parse.y"
8122 {
8123 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8124}
8125#line 8126 "parse.c"
8126 break;
8127
8128 case YYSYMBOL_keyword_while: /* "'while'" */
8129#line 2633 "parse.y"
8130 {
8131 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8132}
8133#line 8134 "parse.c"
8134 break;
8135
8136 case YYSYMBOL_keyword_until: /* "'until'" */
8137#line 2633 "parse.y"
8138 {
8139 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8140}
8141#line 8142 "parse.c"
8142 break;
8143
8144 case YYSYMBOL_keyword_for: /* "'for'" */
8145#line 2633 "parse.y"
8146 {
8147 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8148}
8149#line 8150 "parse.c"
8150 break;
8151
8152 case YYSYMBOL_keyword_break: /* "'break'" */
8153#line 2633 "parse.y"
8154 {
8155 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8156}
8157#line 8158 "parse.c"
8158 break;
8159
8160 case YYSYMBOL_keyword_next: /* "'next'" */
8161#line 2633 "parse.y"
8162 {
8163 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8164}
8165#line 8166 "parse.c"
8166 break;
8167
8168 case YYSYMBOL_keyword_redo: /* "'redo'" */
8169#line 2633 "parse.y"
8170 {
8171 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8172}
8173#line 8174 "parse.c"
8174 break;
8175
8176 case YYSYMBOL_keyword_retry: /* "'retry'" */
8177#line 2633 "parse.y"
8178 {
8179 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8180}
8181#line 8182 "parse.c"
8182 break;
8183
8184 case YYSYMBOL_keyword_in: /* "'in'" */
8185#line 2633 "parse.y"
8186 {
8187 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8188}
8189#line 8190 "parse.c"
8190 break;
8191
8192 case YYSYMBOL_keyword_do: /* "'do'" */
8193#line 2633 "parse.y"
8194 {
8195 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8196}
8197#line 8198 "parse.c"
8198 break;
8199
8200 case YYSYMBOL_keyword_do_cond: /* "'do' for condition" */
8201#line 2633 "parse.y"
8202 {
8203 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8204}
8205#line 8206 "parse.c"
8206 break;
8207
8208 case YYSYMBOL_keyword_do_block: /* "'do' for block" */
8209#line 2633 "parse.y"
8210 {
8211 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8212}
8213#line 8214 "parse.c"
8214 break;
8215
8216 case YYSYMBOL_keyword_do_LAMBDA: /* "'do' for lambda" */
8217#line 2633 "parse.y"
8218 {
8219 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8220}
8221#line 8222 "parse.c"
8222 break;
8223
8224 case YYSYMBOL_keyword_return: /* "'return'" */
8225#line 2633 "parse.y"
8226 {
8227 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8228}
8229#line 8230 "parse.c"
8230 break;
8231
8232 case YYSYMBOL_keyword_yield: /* "'yield'" */
8233#line 2633 "parse.y"
8234 {
8235 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8236}
8237#line 8238 "parse.c"
8238 break;
8239
8240 case YYSYMBOL_keyword_super: /* "'super'" */
8241#line 2633 "parse.y"
8242 {
8243 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8244}
8245#line 8246 "parse.c"
8246 break;
8247
8248 case YYSYMBOL_keyword_self: /* "'self'" */
8249#line 2633 "parse.y"
8250 {
8251 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8252}
8253#line 8254 "parse.c"
8254 break;
8255
8256 case YYSYMBOL_keyword_nil: /* "'nil'" */
8257#line 2633 "parse.y"
8258 {
8259 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8260}
8261#line 8262 "parse.c"
8262 break;
8263
8264 case YYSYMBOL_keyword_true: /* "'true'" */
8265#line 2633 "parse.y"
8266 {
8267 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8268}
8269#line 8270 "parse.c"
8270 break;
8271
8272 case YYSYMBOL_keyword_false: /* "'false'" */
8273#line 2633 "parse.y"
8274 {
8275 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8276}
8277#line 8278 "parse.c"
8278 break;
8279
8280 case YYSYMBOL_keyword_and: /* "'and'" */
8281#line 2633 "parse.y"
8282 {
8283 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8284}
8285#line 8286 "parse.c"
8286 break;
8287
8288 case YYSYMBOL_keyword_or: /* "'or'" */
8289#line 2633 "parse.y"
8290 {
8291 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8292}
8293#line 8294 "parse.c"
8294 break;
8295
8296 case YYSYMBOL_keyword_not: /* "'not'" */
8297#line 2633 "parse.y"
8298 {
8299 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8300}
8301#line 8302 "parse.c"
8302 break;
8303
8304 case YYSYMBOL_modifier_if: /* "'if' modifier" */
8305#line 2633 "parse.y"
8306 {
8307 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8308}
8309#line 8310 "parse.c"
8310 break;
8311
8312 case YYSYMBOL_modifier_unless: /* "'unless' modifier" */
8313#line 2633 "parse.y"
8314 {
8315 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8316}
8317#line 8318 "parse.c"
8318 break;
8319
8320 case YYSYMBOL_modifier_while: /* "'while' modifier" */
8321#line 2633 "parse.y"
8322 {
8323 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8324}
8325#line 8326 "parse.c"
8326 break;
8327
8328 case YYSYMBOL_modifier_until: /* "'until' modifier" */
8329#line 2633 "parse.y"
8330 {
8331 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8332}
8333#line 8334 "parse.c"
8334 break;
8335
8336 case YYSYMBOL_modifier_rescue: /* "'rescue' modifier" */
8337#line 2633 "parse.y"
8338 {
8339 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8340}
8341#line 8342 "parse.c"
8342 break;
8343
8344 case YYSYMBOL_keyword_alias: /* "'alias'" */
8345#line 2633 "parse.y"
8346 {
8347 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8348}
8349#line 8350 "parse.c"
8350 break;
8351
8352 case YYSYMBOL_keyword_defined: /* "'defined?'" */
8353#line 2633 "parse.y"
8354 {
8355 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8356}
8357#line 8358 "parse.c"
8358 break;
8359
8360 case YYSYMBOL_keyword_BEGIN: /* "'BEGIN'" */
8361#line 2633 "parse.y"
8362 {
8363 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8364}
8365#line 8366 "parse.c"
8366 break;
8367
8368 case YYSYMBOL_keyword_END: /* "'END'" */
8369#line 2633 "parse.y"
8370 {
8371 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8372}
8373#line 8374 "parse.c"
8374 break;
8375
8376 case YYSYMBOL_keyword__LINE__: /* "'__LINE__'" */
8377#line 2633 "parse.y"
8378 {
8379 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8380}
8381#line 8382 "parse.c"
8382 break;
8383
8384 case YYSYMBOL_keyword__FILE__: /* "'__FILE__'" */
8385#line 2633 "parse.y"
8386 {
8387 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8388}
8389#line 8390 "parse.c"
8390 break;
8391
8392 case YYSYMBOL_keyword__ENCODING__: /* "'__ENCODING__'" */
8393#line 2633 "parse.y"
8394 {
8395 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8396}
8397#line 8398 "parse.c"
8398 break;
8399
8400 case YYSYMBOL_tIDENTIFIER: /* "local variable or method" */
8401#line 2633 "parse.y"
8402 {
8403 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8404}
8405#line 8406 "parse.c"
8406 break;
8407
8408 case YYSYMBOL_tFID: /* "method" */
8409#line 2633 "parse.y"
8410 {
8411 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8412}
8413#line 8414 "parse.c"
8414 break;
8415
8416 case YYSYMBOL_tGVAR: /* "global variable" */
8417#line 2633 "parse.y"
8418 {
8419 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8420}
8421#line 8422 "parse.c"
8422 break;
8423
8424 case YYSYMBOL_tIVAR: /* "instance variable" */
8425#line 2633 "parse.y"
8426 {
8427 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8428}
8429#line 8430 "parse.c"
8430 break;
8431
8432 case YYSYMBOL_tCONSTANT: /* "constant" */
8433#line 2633 "parse.y"
8434 {
8435 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8436}
8437#line 8438 "parse.c"
8438 break;
8439
8440 case YYSYMBOL_tCVAR: /* "class variable" */
8441#line 2633 "parse.y"
8442 {
8443 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8444}
8445#line 8446 "parse.c"
8446 break;
8447
8448 case YYSYMBOL_tLABEL: /* "label" */
8449#line 2633 "parse.y"
8450 {
8451 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8452}
8453#line 8454 "parse.c"
8454 break;
8455
8456 case YYSYMBOL_tINTEGER: /* "integer literal" */
8457#line 2636 "parse.y"
8458 {
8459 switch (nd_type(RNODE(((*yyvaluep).node)))) {
8460 case NODE_INTEGER:
8461 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_integer_literal_val(((*yyvaluep).node)));
8462 break;
8463 case NODE_FLOAT:
8464 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_float_literal_val(((*yyvaluep).node)));
8465 break;
8466 case NODE_RATIONAL:
8467 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_rational_literal_val(((*yyvaluep).node)));
8468 break;
8469 case NODE_IMAGINARY:
8470 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_imaginary_literal_val(((*yyvaluep).node)));
8471 break;
8472 default:
8473 break;
8474 }
8475}
8476#line 8477 "parse.c"
8477 break;
8478
8479 case YYSYMBOL_tFLOAT: /* "float literal" */
8480#line 2636 "parse.y"
8481 {
8482 switch (nd_type(RNODE(((*yyvaluep).node)))) {
8483 case NODE_INTEGER:
8484 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_integer_literal_val(((*yyvaluep).node)));
8485 break;
8486 case NODE_FLOAT:
8487 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_float_literal_val(((*yyvaluep).node)));
8488 break;
8489 case NODE_RATIONAL:
8490 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_rational_literal_val(((*yyvaluep).node)));
8491 break;
8492 case NODE_IMAGINARY:
8493 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_imaginary_literal_val(((*yyvaluep).node)));
8494 break;
8495 default:
8496 break;
8497 }
8498}
8499#line 8500 "parse.c"
8500 break;
8501
8502 case YYSYMBOL_tRATIONAL: /* "rational literal" */
8503#line 2636 "parse.y"
8504 {
8505 switch (nd_type(RNODE(((*yyvaluep).node)))) {
8506 case NODE_INTEGER:
8507 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_integer_literal_val(((*yyvaluep).node)));
8508 break;
8509 case NODE_FLOAT:
8510 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_float_literal_val(((*yyvaluep).node)));
8511 break;
8512 case NODE_RATIONAL:
8513 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_rational_literal_val(((*yyvaluep).node)));
8514 break;
8515 case NODE_IMAGINARY:
8516 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_imaginary_literal_val(((*yyvaluep).node)));
8517 break;
8518 default:
8519 break;
8520 }
8521}
8522#line 8523 "parse.c"
8523 break;
8524
8525 case YYSYMBOL_tIMAGINARY: /* "imaginary literal" */
8526#line 2636 "parse.y"
8527 {
8528 switch (nd_type(RNODE(((*yyvaluep).node)))) {
8529 case NODE_INTEGER:
8530 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_integer_literal_val(((*yyvaluep).node)));
8531 break;
8532 case NODE_FLOAT:
8533 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_float_literal_val(((*yyvaluep).node)));
8534 break;
8535 case NODE_RATIONAL:
8536 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_rational_literal_val(((*yyvaluep).node)));
8537 break;
8538 case NODE_IMAGINARY:
8539 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_imaginary_literal_val(((*yyvaluep).node)));
8540 break;
8541 default:
8542 break;
8543 }
8544}
8545#line 8546 "parse.c"
8546 break;
8547
8548 case YYSYMBOL_tCHAR: /* "char literal" */
8549#line 2636 "parse.y"
8550 {
8551 switch (nd_type(RNODE(((*yyvaluep).node)))) {
8552 case NODE_INTEGER:
8553 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_integer_literal_val(((*yyvaluep).node)));
8554 break;
8555 case NODE_FLOAT:
8556 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_float_literal_val(((*yyvaluep).node)));
8557 break;
8558 case NODE_RATIONAL:
8559 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_rational_literal_val(((*yyvaluep).node)));
8560 break;
8561 case NODE_IMAGINARY:
8562 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_imaginary_literal_val(((*yyvaluep).node)));
8563 break;
8564 default:
8565 break;
8566 }
8567}
8568#line 8569 "parse.c"
8569 break;
8570
8571 case YYSYMBOL_tNTH_REF: /* "numbered reference" */
8572#line 2654 "parse.y"
8573 {
8574 rb_parser_printf(p, "$%ld", RNODE_NTH_REF(((*yyvaluep).node))->nd_nth);
8575}
8576#line 8577 "parse.c"
8577 break;
8578
8579 case YYSYMBOL_tBACK_REF: /* "back reference" */
8580#line 2657 "parse.y"
8581 {
8582 rb_parser_printf(p, "$%c", (int)RNODE_BACK_REF(((*yyvaluep).node))->nd_nth);
8583}
8584#line 8585 "parse.c"
8585 break;
8586
8587 case YYSYMBOL_tSTRING_CONTENT: /* "literal content" */
8588#line 2636 "parse.y"
8589 {
8590 switch (nd_type(RNODE(((*yyvaluep).node)))) {
8591 case NODE_INTEGER:
8592 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_integer_literal_val(((*yyvaluep).node)));
8593 break;
8594 case NODE_FLOAT:
8595 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_float_literal_val(((*yyvaluep).node)));
8596 break;
8597 case NODE_RATIONAL:
8598 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_rational_literal_val(((*yyvaluep).node)));
8599 break;
8600 case NODE_IMAGINARY:
8601 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_imaginary_literal_val(((*yyvaluep).node)));
8602 break;
8603 default:
8604 break;
8605 }
8606}
8607#line 8608 "parse.c"
8608 break;
8609
8610 case YYSYMBOL_69_: /* '.' */
8611#line 2633 "parse.y"
8612 {
8613 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8614}
8615#line 8616 "parse.c"
8616 break;
8617
8618 case YYSYMBOL_70_backslash_: /* "backslash" */
8619#line 2633 "parse.y"
8620 {
8621 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8622}
8623#line 8624 "parse.c"
8624 break;
8625
8626 case YYSYMBOL_72_escaped_horizontal_tab_: /* "escaped horizontal tab" */
8627#line 2633 "parse.y"
8628 {
8629 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8630}
8631#line 8632 "parse.c"
8632 break;
8633
8634 case YYSYMBOL_73_escaped_form_feed_: /* "escaped form feed" */
8635#line 2633 "parse.y"
8636 {
8637 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8638}
8639#line 8640 "parse.c"
8640 break;
8641
8642 case YYSYMBOL_74_escaped_carriage_return_: /* "escaped carriage return" */
8643#line 2633 "parse.y"
8644 {
8645 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8646}
8647#line 8648 "parse.c"
8648 break;
8649
8650 case YYSYMBOL_75_escaped_vertical_tab_: /* "escaped vertical tab" */
8651#line 2633 "parse.y"
8652 {
8653 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8654}
8655#line 8656 "parse.c"
8656 break;
8657
8658 case YYSYMBOL_tANDDOT: /* "&." */
8659#line 2633 "parse.y"
8660 {
8661 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8662}
8663#line 8664 "parse.c"
8664 break;
8665
8666 case YYSYMBOL_tCOLON2: /* "::" */
8667#line 2633 "parse.y"
8668 {
8669 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8670}
8671#line 8672 "parse.c"
8672 break;
8673
8674 case YYSYMBOL_tOP_ASGN: /* "operator-assignment" */
8675#line 2633 "parse.y"
8676 {
8677 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8678}
8679#line 8680 "parse.c"
8680 break;
8681
8682 case YYSYMBOL_compstmt_top_stmts: /* compstmt_top_stmts */
8683#line 2624 "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_top_stmts: /* top_stmts */
8696#line 2624 "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_top_stmt: /* top_stmt */
8709#line 2624 "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_block_open: /* block_open */
8722#line 2624 "parse.y"
8723 {
8724 if ((NODE *)((*yyvaluep).node_exits) == (NODE *)-1) {
8725 rb_parser_printf(p, "NODE_SPECIAL");
8726 }
8727 else if (((*yyvaluep).node_exits)) {
8728 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_exits)))));
8729 }
8730}
8731#line 8732 "parse.c"
8732 break;
8733
8734 case YYSYMBOL_begin_block: /* begin_block */
8735#line 2624 "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_compstmt_stmts: /* compstmt_stmts */
8748#line 2624 "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_bodystmt: /* bodystmt */
8761#line 2624 "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_stmts: /* stmts */
8774#line 2624 "parse.y"
8775 {
8776 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8777 rb_parser_printf(p, "NODE_SPECIAL");
8778 }
8779 else if (((*yyvaluep).node)) {
8780 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8781 }
8782}
8783#line 8784 "parse.c"
8784 break;
8785
8786 case YYSYMBOL_stmt_or_begin: /* stmt_or_begin */
8787#line 2624 "parse.y"
8788 {
8789 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8790 rb_parser_printf(p, "NODE_SPECIAL");
8791 }
8792 else if (((*yyvaluep).node)) {
8793 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8794 }
8795}
8796#line 8797 "parse.c"
8797 break;
8798
8799 case YYSYMBOL_allow_exits: /* allow_exits */
8800#line 2624 "parse.y"
8801 {
8802 if ((NODE *)((*yyvaluep).node_exits) == (NODE *)-1) {
8803 rb_parser_printf(p, "NODE_SPECIAL");
8804 }
8805 else if (((*yyvaluep).node_exits)) {
8806 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_exits)))));
8807 }
8808}
8809#line 8810 "parse.c"
8810 break;
8811
8812 case YYSYMBOL_stmt: /* stmt */
8813#line 2624 "parse.y"
8814 {
8815 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8816 rb_parser_printf(p, "NODE_SPECIAL");
8817 }
8818 else if (((*yyvaluep).node)) {
8819 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8820 }
8821}
8822#line 8823 "parse.c"
8823 break;
8824
8825 case YYSYMBOL_asgn_mrhs: /* asgn_mrhs */
8826#line 2624 "parse.y"
8827 {
8828 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8829 rb_parser_printf(p, "NODE_SPECIAL");
8830 }
8831 else if (((*yyvaluep).node)) {
8832 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8833 }
8834}
8835#line 8836 "parse.c"
8836 break;
8837
8838 case YYSYMBOL_asgn_command_rhs: /* asgn_command_rhs */
8839#line 2624 "parse.y"
8840 {
8841 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8842 rb_parser_printf(p, "NODE_SPECIAL");
8843 }
8844 else if (((*yyvaluep).node)) {
8845 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8846 }
8847}
8848#line 8849 "parse.c"
8849 break;
8850
8851 case YYSYMBOL_command_asgn: /* command_asgn */
8852#line 2624 "parse.y"
8853 {
8854 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8855 rb_parser_printf(p, "NODE_SPECIAL");
8856 }
8857 else if (((*yyvaluep).node)) {
8858 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8859 }
8860}
8861#line 8862 "parse.c"
8862 break;
8863
8864 case YYSYMBOL_op_asgn_command_rhs: /* op_asgn_command_rhs */
8865#line 2624 "parse.y"
8866 {
8867 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8868 rb_parser_printf(p, "NODE_SPECIAL");
8869 }
8870 else if (((*yyvaluep).node)) {
8871 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8872 }
8873}
8874#line 8875 "parse.c"
8875 break;
8876
8877 case YYSYMBOL_def_endless_method_endless_command: /* def_endless_method_endless_command */
8878#line 2624 "parse.y"
8879 {
8880 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8881 rb_parser_printf(p, "NODE_SPECIAL");
8882 }
8883 else if (((*yyvaluep).node)) {
8884 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8885 }
8886}
8887#line 8888 "parse.c"
8888 break;
8889
8890 case YYSYMBOL_endless_command: /* endless_command */
8891#line 2624 "parse.y"
8892 {
8893 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8894 rb_parser_printf(p, "NODE_SPECIAL");
8895 }
8896 else if (((*yyvaluep).node)) {
8897 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8898 }
8899}
8900#line 8901 "parse.c"
8901 break;
8902
8903 case YYSYMBOL_command_rhs: /* command_rhs */
8904#line 2624 "parse.y"
8905 {
8906 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8907 rb_parser_printf(p, "NODE_SPECIAL");
8908 }
8909 else if (((*yyvaluep).node)) {
8910 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8911 }
8912}
8913#line 8914 "parse.c"
8914 break;
8915
8916 case YYSYMBOL_expr: /* expr */
8917#line 2624 "parse.y"
8918 {
8919 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8920 rb_parser_printf(p, "NODE_SPECIAL");
8921 }
8922 else if (((*yyvaluep).node)) {
8923 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8924 }
8925}
8926#line 8927 "parse.c"
8927 break;
8928
8929 case YYSYMBOL_def_name: /* def_name */
8930#line 2633 "parse.y"
8931 {
8932 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8933}
8934#line 8935 "parse.c"
8935 break;
8936
8937 case YYSYMBOL_defn_head: /* defn_head */
8938#line 2624 "parse.y"
8939 {
8940 if ((NODE *)((*yyvaluep).node_def_temp) == (NODE *)-1) {
8941 rb_parser_printf(p, "NODE_SPECIAL");
8942 }
8943 else if (((*yyvaluep).node_def_temp)) {
8944 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_def_temp)))));
8945 }
8946}
8947#line 8948 "parse.c"
8948 break;
8949
8950 case YYSYMBOL_defs_head: /* defs_head */
8951#line 2624 "parse.y"
8952 {
8953 if ((NODE *)((*yyvaluep).node_def_temp) == (NODE *)-1) {
8954 rb_parser_printf(p, "NODE_SPECIAL");
8955 }
8956 else if (((*yyvaluep).node_def_temp)) {
8957 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_def_temp)))));
8958 }
8959}
8960#line 8961 "parse.c"
8961 break;
8962
8963 case YYSYMBOL_value_expr_expr: /* value_expr_expr */
8964#line 2624 "parse.y"
8965 {
8966 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8967 rb_parser_printf(p, "NODE_SPECIAL");
8968 }
8969 else if (((*yyvaluep).node)) {
8970 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8971 }
8972}
8973#line 8974 "parse.c"
8974 break;
8975
8976 case YYSYMBOL_expr_value: /* expr_value */
8977#line 2624 "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_expr_value_do: /* expr_value_do */
8990#line 2624 "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_command_call: /* command_call */
9003#line 2624 "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_value_expr_command_call: /* value_expr_command_call */
9016#line 2624 "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_command_call_value: /* command_call_value */
9029#line 2624 "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_block_command: /* block_command */
9042#line 2624 "parse.y"
9043 {
9044 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9045 rb_parser_printf(p, "NODE_SPECIAL");
9046 }
9047 else if (((*yyvaluep).node)) {
9048 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9049 }
9050}
9051#line 9052 "parse.c"
9052 break;
9053
9054 case YYSYMBOL_cmd_brace_block: /* cmd_brace_block */
9055#line 2624 "parse.y"
9056 {
9057 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9058 rb_parser_printf(p, "NODE_SPECIAL");
9059 }
9060 else if (((*yyvaluep).node)) {
9061 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9062 }
9063}
9064#line 9065 "parse.c"
9065 break;
9066
9067 case YYSYMBOL_fcall: /* fcall */
9068#line 2624 "parse.y"
9069 {
9070 if ((NODE *)((*yyvaluep).node_fcall) == (NODE *)-1) {
9071 rb_parser_printf(p, "NODE_SPECIAL");
9072 }
9073 else if (((*yyvaluep).node_fcall)) {
9074 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_fcall)))));
9075 }
9076}
9077#line 9078 "parse.c"
9078 break;
9079
9080 case YYSYMBOL_command: /* command */
9081#line 2624 "parse.y"
9082 {
9083 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9084 rb_parser_printf(p, "NODE_SPECIAL");
9085 }
9086 else if (((*yyvaluep).node)) {
9087 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9088 }
9089}
9090#line 9091 "parse.c"
9091 break;
9092
9093 case YYSYMBOL_mlhs: /* mlhs */
9094#line 2624 "parse.y"
9095 {
9096 if ((NODE *)((*yyvaluep).node_masgn) == (NODE *)-1) {
9097 rb_parser_printf(p, "NODE_SPECIAL");
9098 }
9099 else if (((*yyvaluep).node_masgn)) {
9100 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_masgn)))));
9101 }
9102}
9103#line 9104 "parse.c"
9104 break;
9105
9106 case YYSYMBOL_mlhs_inner: /* mlhs_inner */
9107#line 2624 "parse.y"
9108 {
9109 if ((NODE *)((*yyvaluep).node_masgn) == (NODE *)-1) {
9110 rb_parser_printf(p, "NODE_SPECIAL");
9111 }
9112 else if (((*yyvaluep).node_masgn)) {
9113 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_masgn)))));
9114 }
9115}
9116#line 9117 "parse.c"
9117 break;
9118
9119 case YYSYMBOL_mlhs_basic: /* mlhs_basic */
9120#line 2624 "parse.y"
9121 {
9122 if ((NODE *)((*yyvaluep).node_masgn) == (NODE *)-1) {
9123 rb_parser_printf(p, "NODE_SPECIAL");
9124 }
9125 else if (((*yyvaluep).node_masgn)) {
9126 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_masgn)))));
9127 }
9128}
9129#line 9130 "parse.c"
9130 break;
9131
9132 case YYSYMBOL_mlhs_items_mlhs_item: /* mlhs_items_mlhs_item */
9133#line 2624 "parse.y"
9134 {
9135 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9136 rb_parser_printf(p, "NODE_SPECIAL");
9137 }
9138 else if (((*yyvaluep).node)) {
9139 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9140 }
9141}
9142#line 9143 "parse.c"
9143 break;
9144
9145 case YYSYMBOL_mlhs_item: /* mlhs_item */
9146#line 2624 "parse.y"
9147 {
9148 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9149 rb_parser_printf(p, "NODE_SPECIAL");
9150 }
9151 else if (((*yyvaluep).node)) {
9152 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9153 }
9154}
9155#line 9156 "parse.c"
9156 break;
9157
9158 case YYSYMBOL_mlhs_head: /* mlhs_head */
9159#line 2624 "parse.y"
9160 {
9161 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9162 rb_parser_printf(p, "NODE_SPECIAL");
9163 }
9164 else if (((*yyvaluep).node)) {
9165 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9166 }
9167}
9168#line 9169 "parse.c"
9169 break;
9170
9171 case YYSYMBOL_mlhs_node: /* mlhs_node */
9172#line 2624 "parse.y"
9173 {
9174 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9175 rb_parser_printf(p, "NODE_SPECIAL");
9176 }
9177 else if (((*yyvaluep).node)) {
9178 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9179 }
9180}
9181#line 9182 "parse.c"
9182 break;
9183
9184 case YYSYMBOL_lhs: /* lhs */
9185#line 2624 "parse.y"
9186 {
9187 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9188 rb_parser_printf(p, "NODE_SPECIAL");
9189 }
9190 else if (((*yyvaluep).node)) {
9191 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9192 }
9193}
9194#line 9195 "parse.c"
9195 break;
9196
9197 case YYSYMBOL_cname: /* cname */
9198#line 2633 "parse.y"
9199 {
9200 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
9201}
9202#line 9203 "parse.c"
9203 break;
9204
9205 case YYSYMBOL_cpath: /* cpath */
9206#line 2624 "parse.y"
9207 {
9208 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9209 rb_parser_printf(p, "NODE_SPECIAL");
9210 }
9211 else if (((*yyvaluep).node)) {
9212 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9213 }
9214}
9215#line 9216 "parse.c"
9216 break;
9217
9218 case YYSYMBOL_fname: /* fname */
9219#line 2633 "parse.y"
9220 {
9221 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
9222}
9223#line 9224 "parse.c"
9224 break;
9225
9226 case YYSYMBOL_fitem: /* fitem */
9227#line 2624 "parse.y"
9228 {
9229 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9230 rb_parser_printf(p, "NODE_SPECIAL");
9231 }
9232 else if (((*yyvaluep).node)) {
9233 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9234 }
9235}
9236#line 9237 "parse.c"
9237 break;
9238
9239 case YYSYMBOL_undef_list: /* undef_list */
9240#line 2624 "parse.y"
9241 {
9242 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9243 rb_parser_printf(p, "NODE_SPECIAL");
9244 }
9245 else if (((*yyvaluep).node)) {
9246 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9247 }
9248}
9249#line 9250 "parse.c"
9250 break;
9251
9252 case YYSYMBOL_op: /* op */
9253#line 2633 "parse.y"
9254 {
9255 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
9256}
9257#line 9258 "parse.c"
9258 break;
9259
9260 case YYSYMBOL_reswords: /* reswords */
9261#line 2633 "parse.y"
9262 {
9263 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
9264}
9265#line 9266 "parse.c"
9266 break;
9267
9268 case YYSYMBOL_asgn_arg_rhs: /* asgn_arg_rhs */
9269#line 2624 "parse.y"
9270 {
9271 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9272 rb_parser_printf(p, "NODE_SPECIAL");
9273 }
9274 else if (((*yyvaluep).node)) {
9275 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9276 }
9277}
9278#line 9279 "parse.c"
9279 break;
9280
9281 case YYSYMBOL_arg: /* arg */
9282#line 2624 "parse.y"
9283 {
9284 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9285 rb_parser_printf(p, "NODE_SPECIAL");
9286 }
9287 else if (((*yyvaluep).node)) {
9288 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9289 }
9290}
9291#line 9292 "parse.c"
9292 break;
9293
9294 case YYSYMBOL_op_asgn_arg_rhs: /* op_asgn_arg_rhs */
9295#line 2624 "parse.y"
9296 {
9297 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9298 rb_parser_printf(p, "NODE_SPECIAL");
9299 }
9300 else if (((*yyvaluep).node)) {
9301 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9302 }
9303}
9304#line 9305 "parse.c"
9305 break;
9306
9307 case YYSYMBOL_range_expr_arg: /* range_expr_arg */
9308#line 2624 "parse.y"
9309 {
9310 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9311 rb_parser_printf(p, "NODE_SPECIAL");
9312 }
9313 else if (((*yyvaluep).node)) {
9314 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9315 }
9316}
9317#line 9318 "parse.c"
9318 break;
9319
9320 case YYSYMBOL_def_endless_method_endless_arg: /* def_endless_method_endless_arg */
9321#line 2624 "parse.y"
9322 {
9323 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9324 rb_parser_printf(p, "NODE_SPECIAL");
9325 }
9326 else if (((*yyvaluep).node)) {
9327 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9328 }
9329}
9330#line 9331 "parse.c"
9331 break;
9332
9333 case YYSYMBOL_ternary: /* ternary */
9334#line 2624 "parse.y"
9335 {
9336 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9337 rb_parser_printf(p, "NODE_SPECIAL");
9338 }
9339 else if (((*yyvaluep).node)) {
9340 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9341 }
9342}
9343#line 9344 "parse.c"
9344 break;
9345
9346 case YYSYMBOL_endless_arg: /* endless_arg */
9347#line 2624 "parse.y"
9348 {
9349 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9350 rb_parser_printf(p, "NODE_SPECIAL");
9351 }
9352 else if (((*yyvaluep).node)) {
9353 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9354 }
9355}
9356#line 9357 "parse.c"
9357 break;
9358
9359 case YYSYMBOL_relop: /* relop */
9360#line 2633 "parse.y"
9361 {
9362 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
9363}
9364#line 9365 "parse.c"
9365 break;
9366
9367 case YYSYMBOL_rel_expr: /* rel_expr */
9368#line 2624 "parse.y"
9369 {
9370 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9371 rb_parser_printf(p, "NODE_SPECIAL");
9372 }
9373 else if (((*yyvaluep).node)) {
9374 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9375 }
9376}
9377#line 9378 "parse.c"
9378 break;
9379
9380 case YYSYMBOL_value_expr_arg: /* value_expr_arg */
9381#line 2624 "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_value: /* arg_value */
9394#line 2624 "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_aref_args: /* aref_args */
9407#line 2624 "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_arg_rhs: /* arg_rhs */
9420#line 2624 "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_paren_args: /* paren_args */
9433#line 2624 "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_opt_paren_args: /* opt_paren_args */
9446#line 2624 "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_opt_call_args: /* opt_call_args */
9459#line 2624 "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_value_expr_command: /* value_expr_command */
9472#line 2624 "parse.y"
9473 {
9474 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9475 rb_parser_printf(p, "NODE_SPECIAL");
9476 }
9477 else if (((*yyvaluep).node)) {
9478 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9479 }
9480}
9481#line 9482 "parse.c"
9482 break;
9483
9484 case YYSYMBOL_call_args: /* call_args */
9485#line 2624 "parse.y"
9486 {
9487 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9488 rb_parser_printf(p, "NODE_SPECIAL");
9489 }
9490 else if (((*yyvaluep).node)) {
9491 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9492 }
9493}
9494#line 9495 "parse.c"
9495 break;
9496
9497 case YYSYMBOL_command_args: /* command_args */
9498#line 2624 "parse.y"
9499 {
9500 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9501 rb_parser_printf(p, "NODE_SPECIAL");
9502 }
9503 else if (((*yyvaluep).node)) {
9504 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9505 }
9506}
9507#line 9508 "parse.c"
9508 break;
9509
9510 case YYSYMBOL_block_arg: /* block_arg */
9511#line 2624 "parse.y"
9512 {
9513 if ((NODE *)((*yyvaluep).node_block_pass) == (NODE *)-1) {
9514 rb_parser_printf(p, "NODE_SPECIAL");
9515 }
9516 else if (((*yyvaluep).node_block_pass)) {
9517 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_block_pass)))));
9518 }
9519}
9520#line 9521 "parse.c"
9521 break;
9522
9523 case YYSYMBOL_opt_block_arg: /* opt_block_arg */
9524#line 2624 "parse.y"
9525 {
9526 if ((NODE *)((*yyvaluep).node_block_pass) == (NODE *)-1) {
9527 rb_parser_printf(p, "NODE_SPECIAL");
9528 }
9529 else if (((*yyvaluep).node_block_pass)) {
9530 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_block_pass)))));
9531 }
9532}
9533#line 9534 "parse.c"
9534 break;
9535
9536 case YYSYMBOL_args: /* args */
9537#line 2624 "parse.y"
9538 {
9539 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9540 rb_parser_printf(p, "NODE_SPECIAL");
9541 }
9542 else if (((*yyvaluep).node)) {
9543 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9544 }
9545}
9546#line 9547 "parse.c"
9547 break;
9548
9549 case YYSYMBOL_arg_splat: /* arg_splat */
9550#line 2624 "parse.y"
9551 {
9552 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9553 rb_parser_printf(p, "NODE_SPECIAL");
9554 }
9555 else if (((*yyvaluep).node)) {
9556 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9557 }
9558}
9559#line 9560 "parse.c"
9560 break;
9561
9562 case YYSYMBOL_mrhs_arg: /* mrhs_arg */
9563#line 2624 "parse.y"
9564 {
9565 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9566 rb_parser_printf(p, "NODE_SPECIAL");
9567 }
9568 else if (((*yyvaluep).node)) {
9569 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9570 }
9571}
9572#line 9573 "parse.c"
9573 break;
9574
9575 case YYSYMBOL_mrhs: /* mrhs */
9576#line 2624 "parse.y"
9577 {
9578 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9579 rb_parser_printf(p, "NODE_SPECIAL");
9580 }
9581 else if (((*yyvaluep).node)) {
9582 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9583 }
9584}
9585#line 9586 "parse.c"
9586 break;
9587
9588 case YYSYMBOL_primary: /* primary */
9589#line 2624 "parse.y"
9590 {
9591 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9592 rb_parser_printf(p, "NODE_SPECIAL");
9593 }
9594 else if (((*yyvaluep).node)) {
9595 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9596 }
9597}
9598#line 9599 "parse.c"
9599 break;
9600
9601 case YYSYMBOL_value_expr_primary: /* value_expr_primary */
9602#line 2624 "parse.y"
9603 {
9604 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9605 rb_parser_printf(p, "NODE_SPECIAL");
9606 }
9607 else if (((*yyvaluep).node)) {
9608 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9609 }
9610}
9611#line 9612 "parse.c"
9612 break;
9613
9614 case YYSYMBOL_primary_value: /* primary_value */
9615#line 2624 "parse.y"
9616 {
9617 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9618 rb_parser_printf(p, "NODE_SPECIAL");
9619 }
9620 else if (((*yyvaluep).node)) {
9621 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9622 }
9623}
9624#line 9625 "parse.c"
9625 break;
9626
9627 case YYSYMBOL_k_while: /* k_while */
9628#line 2624 "parse.y"
9629 {
9630 if ((NODE *)((*yyvaluep).node_exits) == (NODE *)-1) {
9631 rb_parser_printf(p, "NODE_SPECIAL");
9632 }
9633 else if (((*yyvaluep).node_exits)) {
9634 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_exits)))));
9635 }
9636}
9637#line 9638 "parse.c"
9638 break;
9639
9640 case YYSYMBOL_k_until: /* k_until */
9641#line 2624 "parse.y"
9642 {
9643 if ((NODE *)((*yyvaluep).node_exits) == (NODE *)-1) {
9644 rb_parser_printf(p, "NODE_SPECIAL");
9645 }
9646 else if (((*yyvaluep).node_exits)) {
9647 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_exits)))));
9648 }
9649}
9650#line 9651 "parse.c"
9651 break;
9652
9653 case YYSYMBOL_k_for: /* k_for */
9654#line 2624 "parse.y"
9655 {
9656 if ((NODE *)((*yyvaluep).node_exits) == (NODE *)-1) {
9657 rb_parser_printf(p, "NODE_SPECIAL");
9658 }
9659 else if (((*yyvaluep).node_exits)) {
9660 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_exits)))));
9661 }
9662}
9663#line 9664 "parse.c"
9664 break;
9665
9666 case YYSYMBOL_k_def: /* k_def */
9667#line 2624 "parse.y"
9668 {
9669 if ((NODE *)((*yyvaluep).node_def_temp) == (NODE *)-1) {
9670 rb_parser_printf(p, "NODE_SPECIAL");
9671 }
9672 else if (((*yyvaluep).node_def_temp)) {
9673 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_def_temp)))));
9674 }
9675}
9676#line 9677 "parse.c"
9677 break;
9678
9679 case YYSYMBOL_do: /* do */
9680#line 2633 "parse.y"
9681 {
9682 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
9683}
9684#line 9685 "parse.c"
9685 break;
9686
9687 case YYSYMBOL_if_tail: /* if_tail */
9688#line 2624 "parse.y"
9689 {
9690 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9691 rb_parser_printf(p, "NODE_SPECIAL");
9692 }
9693 else if (((*yyvaluep).node)) {
9694 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9695 }
9696}
9697#line 9698 "parse.c"
9698 break;
9699
9700 case YYSYMBOL_opt_else: /* opt_else */
9701#line 2624 "parse.y"
9702 {
9703 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9704 rb_parser_printf(p, "NODE_SPECIAL");
9705 }
9706 else if (((*yyvaluep).node)) {
9707 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9708 }
9709}
9710#line 9711 "parse.c"
9711 break;
9712
9713 case YYSYMBOL_for_var: /* for_var */
9714#line 2624 "parse.y"
9715 {
9716 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9717 rb_parser_printf(p, "NODE_SPECIAL");
9718 }
9719 else if (((*yyvaluep).node)) {
9720 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9721 }
9722}
9723#line 9724 "parse.c"
9724 break;
9725
9726 case YYSYMBOL_f_marg: /* f_marg */
9727#line 2624 "parse.y"
9728 {
9729 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9730 rb_parser_printf(p, "NODE_SPECIAL");
9731 }
9732 else if (((*yyvaluep).node)) {
9733 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9734 }
9735}
9736#line 9737 "parse.c"
9737 break;
9738
9739 case YYSYMBOL_mlhs_items_f_marg: /* mlhs_items_f_marg */
9740#line 2624 "parse.y"
9741 {
9742 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9743 rb_parser_printf(p, "NODE_SPECIAL");
9744 }
9745 else if (((*yyvaluep).node)) {
9746 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9747 }
9748}
9749#line 9750 "parse.c"
9750 break;
9751
9752 case YYSYMBOL_f_margs: /* f_margs */
9753#line 2624 "parse.y"
9754 {
9755 if ((NODE *)((*yyvaluep).node_masgn) == (NODE *)-1) {
9756 rb_parser_printf(p, "NODE_SPECIAL");
9757 }
9758 else if (((*yyvaluep).node_masgn)) {
9759 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_masgn)))));
9760 }
9761}
9762#line 9763 "parse.c"
9763 break;
9764
9765 case YYSYMBOL_f_rest_marg: /* f_rest_marg */
9766#line 2624 "parse.y"
9767 {
9768 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9769 rb_parser_printf(p, "NODE_SPECIAL");
9770 }
9771 else if (((*yyvaluep).node)) {
9772 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9773 }
9774}
9775#line 9776 "parse.c"
9776 break;
9777
9778 case YYSYMBOL_f_any_kwrest: /* f_any_kwrest */
9779#line 2633 "parse.y"
9780 {
9781 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
9782}
9783#line 9784 "parse.c"
9784 break;
9785
9786 case YYSYMBOL_f_kw_primary_value: /* f_kw_primary_value */
9787#line 2624 "parse.y"
9788 {
9789 if ((NODE *)((*yyvaluep).node_kw_arg) == (NODE *)-1) {
9790 rb_parser_printf(p, "NODE_SPECIAL");
9791 }
9792 else if (((*yyvaluep).node_kw_arg)) {
9793 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_kw_arg)))));
9794 }
9795}
9796#line 9797 "parse.c"
9797 break;
9798
9799 case YYSYMBOL_f_kwarg_primary_value: /* f_kwarg_primary_value */
9800#line 2624 "parse.y"
9801 {
9802 if ((NODE *)((*yyvaluep).node_kw_arg) == (NODE *)-1) {
9803 rb_parser_printf(p, "NODE_SPECIAL");
9804 }
9805 else if (((*yyvaluep).node_kw_arg)) {
9806 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_kw_arg)))));
9807 }
9808}
9809#line 9810 "parse.c"
9810 break;
9811
9812 case YYSYMBOL_opt_f_block_arg_none: /* opt_f_block_arg_none */
9813#line 2633 "parse.y"
9814 {
9815 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
9816}
9817#line 9818 "parse.c"
9818 break;
9819
9820 case YYSYMBOL_args_tail_basic_primary_value_none: /* args_tail_basic_primary_value_none */
9821#line 2624 "parse.y"
9822 {
9823 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
9824 rb_parser_printf(p, "NODE_SPECIAL");
9825 }
9826 else if (((*yyvaluep).node_args)) {
9827 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
9828 }
9829}
9830#line 9831 "parse.c"
9831 break;
9832
9833 case YYSYMBOL_block_args_tail: /* block_args_tail */
9834#line 2624 "parse.y"
9835 {
9836 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
9837 rb_parser_printf(p, "NODE_SPECIAL");
9838 }
9839 else if (((*yyvaluep).node_args)) {
9840 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
9841 }
9842}
9843#line 9844 "parse.c"
9844 break;
9845
9846 case YYSYMBOL_excessed_comma: /* excessed_comma */
9847#line 2633 "parse.y"
9848 {
9849 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
9850}
9851#line 9852 "parse.c"
9852 break;
9853
9854 case YYSYMBOL_f_opt_primary_value: /* f_opt_primary_value */
9855#line 2624 "parse.y"
9856 {
9857 if ((NODE *)((*yyvaluep).node_opt_arg) == (NODE *)-1) {
9858 rb_parser_printf(p, "NODE_SPECIAL");
9859 }
9860 else if (((*yyvaluep).node_opt_arg)) {
9861 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_opt_arg)))));
9862 }
9863}
9864#line 9865 "parse.c"
9865 break;
9866
9867 case YYSYMBOL_f_opt_arg_primary_value: /* f_opt_arg_primary_value */
9868#line 2624 "parse.y"
9869 {
9870 if ((NODE *)((*yyvaluep).node_opt_arg) == (NODE *)-1) {
9871 rb_parser_printf(p, "NODE_SPECIAL");
9872 }
9873 else if (((*yyvaluep).node_opt_arg)) {
9874 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_opt_arg)))));
9875 }
9876}
9877#line 9878 "parse.c"
9878 break;
9879
9880 case YYSYMBOL_opt_args_tail_block_args_tail_none: /* opt_args_tail_block_args_tail_none */
9881#line 2624 "parse.y"
9882 {
9883 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
9884 rb_parser_printf(p, "NODE_SPECIAL");
9885 }
9886 else if (((*yyvaluep).node_args)) {
9887 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
9888 }
9889}
9890#line 9891 "parse.c"
9891 break;
9892
9893 case YYSYMBOL_args_list_primary_value_opt_args_tail_block_args_tail_none: /* args-list_primary_value_opt_args_tail_block_args_tail_none */
9894#line 2624 "parse.y"
9895 {
9896 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
9897 rb_parser_printf(p, "NODE_SPECIAL");
9898 }
9899 else if (((*yyvaluep).node_args)) {
9900 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
9901 }
9902}
9903#line 9904 "parse.c"
9904 break;
9905
9906 case YYSYMBOL_block_param: /* block_param */
9907#line 2624 "parse.y"
9908 {
9909 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
9910 rb_parser_printf(p, "NODE_SPECIAL");
9911 }
9912 else if (((*yyvaluep).node_args)) {
9913 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
9914 }
9915}
9916#line 9917 "parse.c"
9917 break;
9918
9919 case YYSYMBOL_tail_only_args_block_args_tail: /* tail-only-args_block_args_tail */
9920#line 2624 "parse.y"
9921 {
9922 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
9923 rb_parser_printf(p, "NODE_SPECIAL");
9924 }
9925 else if (((*yyvaluep).node_args)) {
9926 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
9927 }
9928}
9929#line 9930 "parse.c"
9930 break;
9931
9932 case YYSYMBOL_opt_block_param_def: /* opt_block_param_def */
9933#line 2624 "parse.y"
9934 {
9935 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
9936 rb_parser_printf(p, "NODE_SPECIAL");
9937 }
9938 else if (((*yyvaluep).node_args)) {
9939 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
9940 }
9941}
9942#line 9943 "parse.c"
9943 break;
9944
9945 case YYSYMBOL_block_param_def: /* block_param_def */
9946#line 2624 "parse.y"
9947 {
9948 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
9949 rb_parser_printf(p, "NODE_SPECIAL");
9950 }
9951 else if (((*yyvaluep).node_args)) {
9952 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
9953 }
9954}
9955#line 9956 "parse.c"
9956 break;
9957
9958 case YYSYMBOL_opt_block_param: /* opt_block_param */
9959#line 2624 "parse.y"
9960 {
9961 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
9962 rb_parser_printf(p, "NODE_SPECIAL");
9963 }
9964 else if (((*yyvaluep).node_args)) {
9965 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
9966 }
9967}
9968#line 9969 "parse.c"
9969 break;
9970
9971 case YYSYMBOL_opt_bv_decl: /* opt_bv_decl */
9972#line 2633 "parse.y"
9973 {
9974 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
9975}
9976#line 9977 "parse.c"
9977 break;
9978
9979 case YYSYMBOL_bv_decls: /* bv_decls */
9980#line 2633 "parse.y"
9981 {
9982 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
9983}
9984#line 9985 "parse.c"
9985 break;
9986
9987 case YYSYMBOL_bvar: /* bvar */
9988#line 2633 "parse.y"
9989 {
9990 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
9991}
9992#line 9993 "parse.c"
9993 break;
9994
9995 case YYSYMBOL_numparam: /* numparam */
9996#line 2624 "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_it_id: /* it_id */
10009#line 2633 "parse.y"
10010 {
10011 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
10012}
10013#line 10014 "parse.c"
10014 break;
10015
10016 case YYSYMBOL_lambda: /* lambda */
10017#line 2624 "parse.y"
10018 {
10019 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10020 rb_parser_printf(p, "NODE_SPECIAL");
10021 }
10022 else if (((*yyvaluep).node)) {
10023 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10024 }
10025}
10026#line 10027 "parse.c"
10027 break;
10028
10029 case YYSYMBOL_f_larglist: /* f_larglist */
10030#line 2624 "parse.y"
10031 {
10032 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
10033 rb_parser_printf(p, "NODE_SPECIAL");
10034 }
10035 else if (((*yyvaluep).node_args)) {
10036 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
10037 }
10038}
10039#line 10040 "parse.c"
10040 break;
10041
10042 case YYSYMBOL_do_block: /* do_block */
10043#line 2624 "parse.y"
10044 {
10045 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10046 rb_parser_printf(p, "NODE_SPECIAL");
10047 }
10048 else if (((*yyvaluep).node)) {
10049 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10050 }
10051}
10052#line 10053 "parse.c"
10053 break;
10054
10055 case YYSYMBOL_block_call: /* block_call */
10056#line 2624 "parse.y"
10057 {
10058 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10059 rb_parser_printf(p, "NODE_SPECIAL");
10060 }
10061 else if (((*yyvaluep).node)) {
10062 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10063 }
10064}
10065#line 10066 "parse.c"
10066 break;
10067
10068 case YYSYMBOL_method_call: /* method_call */
10069#line 2624 "parse.y"
10070 {
10071 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10072 rb_parser_printf(p, "NODE_SPECIAL");
10073 }
10074 else if (((*yyvaluep).node)) {
10075 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10076 }
10077}
10078#line 10079 "parse.c"
10079 break;
10080
10081 case YYSYMBOL_brace_block: /* brace_block */
10082#line 2624 "parse.y"
10083 {
10084 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10085 rb_parser_printf(p, "NODE_SPECIAL");
10086 }
10087 else if (((*yyvaluep).node)) {
10088 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10089 }
10090}
10091#line 10092 "parse.c"
10092 break;
10093
10094 case YYSYMBOL_brace_body: /* brace_body */
10095#line 2624 "parse.y"
10096 {
10097 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10098 rb_parser_printf(p, "NODE_SPECIAL");
10099 }
10100 else if (((*yyvaluep).node)) {
10101 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10102 }
10103}
10104#line 10105 "parse.c"
10105 break;
10106
10107 case YYSYMBOL_do_body: /* do_body */
10108#line 2624 "parse.y"
10109 {
10110 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10111 rb_parser_printf(p, "NODE_SPECIAL");
10112 }
10113 else if (((*yyvaluep).node)) {
10114 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10115 }
10116}
10117#line 10118 "parse.c"
10118 break;
10119
10120 case YYSYMBOL_case_args: /* case_args */
10121#line 2624 "parse.y"
10122 {
10123 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10124 rb_parser_printf(p, "NODE_SPECIAL");
10125 }
10126 else if (((*yyvaluep).node)) {
10127 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10128 }
10129}
10130#line 10131 "parse.c"
10131 break;
10132
10133 case YYSYMBOL_case_body: /* case_body */
10134#line 2624 "parse.y"
10135 {
10136 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10137 rb_parser_printf(p, "NODE_SPECIAL");
10138 }
10139 else if (((*yyvaluep).node)) {
10140 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10141 }
10142}
10143#line 10144 "parse.c"
10144 break;
10145
10146 case YYSYMBOL_cases: /* cases */
10147#line 2624 "parse.y"
10148 {
10149 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10150 rb_parser_printf(p, "NODE_SPECIAL");
10151 }
10152 else if (((*yyvaluep).node)) {
10153 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10154 }
10155}
10156#line 10157 "parse.c"
10157 break;
10158
10159 case YYSYMBOL_p_case_body: /* p_case_body */
10160#line 2624 "parse.y"
10161 {
10162 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10163 rb_parser_printf(p, "NODE_SPECIAL");
10164 }
10165 else if (((*yyvaluep).node)) {
10166 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10167 }
10168}
10169#line 10170 "parse.c"
10170 break;
10171
10172 case YYSYMBOL_p_cases: /* p_cases */
10173#line 2624 "parse.y"
10174 {
10175 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10176 rb_parser_printf(p, "NODE_SPECIAL");
10177 }
10178 else if (((*yyvaluep).node)) {
10179 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10180 }
10181}
10182#line 10183 "parse.c"
10183 break;
10184
10185 case YYSYMBOL_p_top_expr: /* p_top_expr */
10186#line 2624 "parse.y"
10187 {
10188 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10189 rb_parser_printf(p, "NODE_SPECIAL");
10190 }
10191 else if (((*yyvaluep).node)) {
10192 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10193 }
10194}
10195#line 10196 "parse.c"
10196 break;
10197
10198 case YYSYMBOL_p_top_expr_body: /* p_top_expr_body */
10199#line 2624 "parse.y"
10200 {
10201 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10202 rb_parser_printf(p, "NODE_SPECIAL");
10203 }
10204 else if (((*yyvaluep).node)) {
10205 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10206 }
10207}
10208#line 10209 "parse.c"
10209 break;
10210
10211 case YYSYMBOL_p_expr: /* p_expr */
10212#line 2624 "parse.y"
10213 {
10214 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10215 rb_parser_printf(p, "NODE_SPECIAL");
10216 }
10217 else if (((*yyvaluep).node)) {
10218 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10219 }
10220}
10221#line 10222 "parse.c"
10222 break;
10223
10224 case YYSYMBOL_p_as: /* p_as */
10225#line 2624 "parse.y"
10226 {
10227 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10228 rb_parser_printf(p, "NODE_SPECIAL");
10229 }
10230 else if (((*yyvaluep).node)) {
10231 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10232 }
10233}
10234#line 10235 "parse.c"
10235 break;
10236
10237 case YYSYMBOL_p_alt: /* p_alt */
10238#line 2624 "parse.y"
10239 {
10240 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10241 rb_parser_printf(p, "NODE_SPECIAL");
10242 }
10243 else if (((*yyvaluep).node)) {
10244 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10245 }
10246}
10247#line 10248 "parse.c"
10248 break;
10249
10250 case YYSYMBOL_p_expr_basic: /* p_expr_basic */
10251#line 2624 "parse.y"
10252 {
10253 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10254 rb_parser_printf(p, "NODE_SPECIAL");
10255 }
10256 else if (((*yyvaluep).node)) {
10257 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10258 }
10259}
10260#line 10261 "parse.c"
10261 break;
10262
10263 case YYSYMBOL_p_args: /* p_args */
10264#line 2624 "parse.y"
10265 {
10266 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10267 rb_parser_printf(p, "NODE_SPECIAL");
10268 }
10269 else if (((*yyvaluep).node)) {
10270 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10271 }
10272}
10273#line 10274 "parse.c"
10274 break;
10275
10276 case YYSYMBOL_p_args_head: /* p_args_head */
10277#line 2624 "parse.y"
10278 {
10279 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10280 rb_parser_printf(p, "NODE_SPECIAL");
10281 }
10282 else if (((*yyvaluep).node)) {
10283 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10284 }
10285}
10286#line 10287 "parse.c"
10287 break;
10288
10289 case YYSYMBOL_p_args_tail: /* p_args_tail */
10290#line 2624 "parse.y"
10291 {
10292 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10293 rb_parser_printf(p, "NODE_SPECIAL");
10294 }
10295 else if (((*yyvaluep).node)) {
10296 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10297 }
10298}
10299#line 10300 "parse.c"
10300 break;
10301
10302 case YYSYMBOL_p_find: /* p_find */
10303#line 2624 "parse.y"
10304 {
10305 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10306 rb_parser_printf(p, "NODE_SPECIAL");
10307 }
10308 else if (((*yyvaluep).node)) {
10309 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10310 }
10311}
10312#line 10313 "parse.c"
10313 break;
10314
10315 case YYSYMBOL_p_rest: /* p_rest */
10316#line 2624 "parse.y"
10317 {
10318 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10319 rb_parser_printf(p, "NODE_SPECIAL");
10320 }
10321 else if (((*yyvaluep).node)) {
10322 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10323 }
10324}
10325#line 10326 "parse.c"
10326 break;
10327
10328 case YYSYMBOL_p_args_post: /* p_args_post */
10329#line 2624 "parse.y"
10330 {
10331 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10332 rb_parser_printf(p, "NODE_SPECIAL");
10333 }
10334 else if (((*yyvaluep).node)) {
10335 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10336 }
10337}
10338#line 10339 "parse.c"
10339 break;
10340
10341 case YYSYMBOL_p_arg: /* p_arg */
10342#line 2624 "parse.y"
10343 {
10344 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10345 rb_parser_printf(p, "NODE_SPECIAL");
10346 }
10347 else if (((*yyvaluep).node)) {
10348 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10349 }
10350}
10351#line 10352 "parse.c"
10352 break;
10353
10354 case YYSYMBOL_p_kwargs: /* p_kwargs */
10355#line 2624 "parse.y"
10356 {
10357 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10358 rb_parser_printf(p, "NODE_SPECIAL");
10359 }
10360 else if (((*yyvaluep).node)) {
10361 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10362 }
10363}
10364#line 10365 "parse.c"
10365 break;
10366
10367 case YYSYMBOL_p_kwarg: /* p_kwarg */
10368#line 2624 "parse.y"
10369 {
10370 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10371 rb_parser_printf(p, "NODE_SPECIAL");
10372 }
10373 else if (((*yyvaluep).node)) {
10374 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10375 }
10376}
10377#line 10378 "parse.c"
10378 break;
10379
10380 case YYSYMBOL_p_kw: /* p_kw */
10381#line 2624 "parse.y"
10382 {
10383 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10384 rb_parser_printf(p, "NODE_SPECIAL");
10385 }
10386 else if (((*yyvaluep).node)) {
10387 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10388 }
10389}
10390#line 10391 "parse.c"
10391 break;
10392
10393 case YYSYMBOL_p_kw_label: /* p_kw_label */
10394#line 2633 "parse.y"
10395 {
10396 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
10397}
10398#line 10399 "parse.c"
10399 break;
10400
10401 case YYSYMBOL_p_kwrest: /* p_kwrest */
10402#line 2633 "parse.y"
10403 {
10404 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
10405}
10406#line 10407 "parse.c"
10407 break;
10408
10409 case YYSYMBOL_p_kwnorest: /* p_kwnorest */
10410#line 2633 "parse.y"
10411 {
10412 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
10413}
10414#line 10415 "parse.c"
10415 break;
10416
10417 case YYSYMBOL_p_any_kwrest: /* p_any_kwrest */
10418#line 2633 "parse.y"
10419 {
10420 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
10421}
10422#line 10423 "parse.c"
10423 break;
10424
10425 case YYSYMBOL_p_value: /* p_value */
10426#line 2624 "parse.y"
10427 {
10428 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10429 rb_parser_printf(p, "NODE_SPECIAL");
10430 }
10431 else if (((*yyvaluep).node)) {
10432 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10433 }
10434}
10435#line 10436 "parse.c"
10436 break;
10437
10438 case YYSYMBOL_range_expr_p_primitive: /* range_expr_p_primitive */
10439#line 2624 "parse.y"
10440 {
10441 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10442 rb_parser_printf(p, "NODE_SPECIAL");
10443 }
10444 else if (((*yyvaluep).node)) {
10445 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10446 }
10447}
10448#line 10449 "parse.c"
10449 break;
10450
10451 case YYSYMBOL_p_primitive: /* p_primitive */
10452#line 2624 "parse.y"
10453 {
10454 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10455 rb_parser_printf(p, "NODE_SPECIAL");
10456 }
10457 else if (((*yyvaluep).node)) {
10458 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10459 }
10460}
10461#line 10462 "parse.c"
10462 break;
10463
10464 case YYSYMBOL_p_variable: /* p_variable */
10465#line 2624 "parse.y"
10466 {
10467 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10468 rb_parser_printf(p, "NODE_SPECIAL");
10469 }
10470 else if (((*yyvaluep).node)) {
10471 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10472 }
10473}
10474#line 10475 "parse.c"
10475 break;
10476
10477 case YYSYMBOL_p_var_ref: /* p_var_ref */
10478#line 2624 "parse.y"
10479 {
10480 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10481 rb_parser_printf(p, "NODE_SPECIAL");
10482 }
10483 else if (((*yyvaluep).node)) {
10484 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10485 }
10486}
10487#line 10488 "parse.c"
10488 break;
10489
10490 case YYSYMBOL_p_expr_ref: /* p_expr_ref */
10491#line 2624 "parse.y"
10492 {
10493 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10494 rb_parser_printf(p, "NODE_SPECIAL");
10495 }
10496 else if (((*yyvaluep).node)) {
10497 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10498 }
10499}
10500#line 10501 "parse.c"
10501 break;
10502
10503 case YYSYMBOL_p_const: /* p_const */
10504#line 2624 "parse.y"
10505 {
10506 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10507 rb_parser_printf(p, "NODE_SPECIAL");
10508 }
10509 else if (((*yyvaluep).node)) {
10510 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10511 }
10512}
10513#line 10514 "parse.c"
10514 break;
10515
10516 case YYSYMBOL_opt_rescue: /* opt_rescue */
10517#line 2624 "parse.y"
10518 {
10519 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10520 rb_parser_printf(p, "NODE_SPECIAL");
10521 }
10522 else if (((*yyvaluep).node)) {
10523 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10524 }
10525}
10526#line 10527 "parse.c"
10527 break;
10528
10529 case YYSYMBOL_exc_list: /* exc_list */
10530#line 2624 "parse.y"
10531 {
10532 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10533 rb_parser_printf(p, "NODE_SPECIAL");
10534 }
10535 else if (((*yyvaluep).node)) {
10536 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10537 }
10538}
10539#line 10540 "parse.c"
10540 break;
10541
10542 case YYSYMBOL_exc_var: /* exc_var */
10543#line 2624 "parse.y"
10544 {
10545 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10546 rb_parser_printf(p, "NODE_SPECIAL");
10547 }
10548 else if (((*yyvaluep).node)) {
10549 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10550 }
10551}
10552#line 10553 "parse.c"
10553 break;
10554
10555 case YYSYMBOL_opt_ensure: /* opt_ensure */
10556#line 2624 "parse.y"
10557 {
10558 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10559 rb_parser_printf(p, "NODE_SPECIAL");
10560 }
10561 else if (((*yyvaluep).node)) {
10562 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10563 }
10564}
10565#line 10566 "parse.c"
10566 break;
10567
10568 case YYSYMBOL_literal: /* literal */
10569#line 2624 "parse.y"
10570 {
10571 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10572 rb_parser_printf(p, "NODE_SPECIAL");
10573 }
10574 else if (((*yyvaluep).node)) {
10575 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10576 }
10577}
10578#line 10579 "parse.c"
10579 break;
10580
10581 case YYSYMBOL_strings: /* strings */
10582#line 2624 "parse.y"
10583 {
10584 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10585 rb_parser_printf(p, "NODE_SPECIAL");
10586 }
10587 else if (((*yyvaluep).node)) {
10588 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10589 }
10590}
10591#line 10592 "parse.c"
10592 break;
10593
10594 case YYSYMBOL_string: /* string */
10595#line 2624 "parse.y"
10596 {
10597 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10598 rb_parser_printf(p, "NODE_SPECIAL");
10599 }
10600 else if (((*yyvaluep).node)) {
10601 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10602 }
10603}
10604#line 10605 "parse.c"
10605 break;
10606
10607 case YYSYMBOL_string1: /* string1 */
10608#line 2624 "parse.y"
10609 {
10610 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10611 rb_parser_printf(p, "NODE_SPECIAL");
10612 }
10613 else if (((*yyvaluep).node)) {
10614 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10615 }
10616}
10617#line 10618 "parse.c"
10618 break;
10619
10620 case YYSYMBOL_xstring: /* xstring */
10621#line 2624 "parse.y"
10622 {
10623 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10624 rb_parser_printf(p, "NODE_SPECIAL");
10625 }
10626 else if (((*yyvaluep).node)) {
10627 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10628 }
10629}
10630#line 10631 "parse.c"
10631 break;
10632
10633 case YYSYMBOL_regexp: /* regexp */
10634#line 2624 "parse.y"
10635 {
10636 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10637 rb_parser_printf(p, "NODE_SPECIAL");
10638 }
10639 else if (((*yyvaluep).node)) {
10640 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10641 }
10642}
10643#line 10644 "parse.c"
10644 break;
10645
10646 case YYSYMBOL_words_tWORDS_BEG_word_list: /* words_tWORDS_BEG_word_list */
10647#line 2624 "parse.y"
10648 {
10649 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10650 rb_parser_printf(p, "NODE_SPECIAL");
10651 }
10652 else if (((*yyvaluep).node)) {
10653 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10654 }
10655}
10656#line 10657 "parse.c"
10657 break;
10658
10659 case YYSYMBOL_words: /* words */
10660#line 2624 "parse.y"
10661 {
10662 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10663 rb_parser_printf(p, "NODE_SPECIAL");
10664 }
10665 else if (((*yyvaluep).node)) {
10666 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10667 }
10668}
10669#line 10670 "parse.c"
10670 break;
10671
10672 case YYSYMBOL_word_list: /* word_list */
10673#line 2624 "parse.y"
10674 {
10675 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10676 rb_parser_printf(p, "NODE_SPECIAL");
10677 }
10678 else if (((*yyvaluep).node)) {
10679 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10680 }
10681}
10682#line 10683 "parse.c"
10683 break;
10684
10685 case YYSYMBOL_word: /* word */
10686#line 2624 "parse.y"
10687 {
10688 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10689 rb_parser_printf(p, "NODE_SPECIAL");
10690 }
10691 else if (((*yyvaluep).node)) {
10692 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10693 }
10694}
10695#line 10696 "parse.c"
10696 break;
10697
10698 case YYSYMBOL_words_tSYMBOLS_BEG_symbol_list: /* words_tSYMBOLS_BEG_symbol_list */
10699#line 2624 "parse.y"
10700 {
10701 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10702 rb_parser_printf(p, "NODE_SPECIAL");
10703 }
10704 else if (((*yyvaluep).node)) {
10705 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10706 }
10707}
10708#line 10709 "parse.c"
10709 break;
10710
10711 case YYSYMBOL_symbols: /* symbols */
10712#line 2624 "parse.y"
10713 {
10714 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10715 rb_parser_printf(p, "NODE_SPECIAL");
10716 }
10717 else if (((*yyvaluep).node)) {
10718 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10719 }
10720}
10721#line 10722 "parse.c"
10722 break;
10723
10724 case YYSYMBOL_symbol_list: /* symbol_list */
10725#line 2624 "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_words_tQWORDS_BEG_qword_list: /* words_tQWORDS_BEG_qword_list */
10738#line 2624 "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_qwords: /* qwords */
10751#line 2624 "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_words_tQSYMBOLS_BEG_qsym_list: /* words_tQSYMBOLS_BEG_qsym_list */
10764#line 2624 "parse.y"
10765 {
10766 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10767 rb_parser_printf(p, "NODE_SPECIAL");
10768 }
10769 else if (((*yyvaluep).node)) {
10770 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10771 }
10772}
10773#line 10774 "parse.c"
10774 break;
10775
10776 case YYSYMBOL_qsymbols: /* qsymbols */
10777#line 2624 "parse.y"
10778 {
10779 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10780 rb_parser_printf(p, "NODE_SPECIAL");
10781 }
10782 else if (((*yyvaluep).node)) {
10783 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10784 }
10785}
10786#line 10787 "parse.c"
10787 break;
10788
10789 case YYSYMBOL_qword_list: /* qword_list */
10790#line 2624 "parse.y"
10791 {
10792 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10793 rb_parser_printf(p, "NODE_SPECIAL");
10794 }
10795 else if (((*yyvaluep).node)) {
10796 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10797 }
10798}
10799#line 10800 "parse.c"
10800 break;
10801
10802 case YYSYMBOL_qsym_list: /* qsym_list */
10803#line 2624 "parse.y"
10804 {
10805 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10806 rb_parser_printf(p, "NODE_SPECIAL");
10807 }
10808 else if (((*yyvaluep).node)) {
10809 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10810 }
10811}
10812#line 10813 "parse.c"
10813 break;
10814
10815 case YYSYMBOL_string_contents: /* string_contents */
10816#line 2624 "parse.y"
10817 {
10818 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10819 rb_parser_printf(p, "NODE_SPECIAL");
10820 }
10821 else if (((*yyvaluep).node)) {
10822 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10823 }
10824}
10825#line 10826 "parse.c"
10826 break;
10827
10828 case YYSYMBOL_xstring_contents: /* xstring_contents */
10829#line 2624 "parse.y"
10830 {
10831 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10832 rb_parser_printf(p, "NODE_SPECIAL");
10833 }
10834 else if (((*yyvaluep).node)) {
10835 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10836 }
10837}
10838#line 10839 "parse.c"
10839 break;
10840
10841 case YYSYMBOL_regexp_contents: /* regexp_contents */
10842#line 2624 "parse.y"
10843 {
10844 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10845 rb_parser_printf(p, "NODE_SPECIAL");
10846 }
10847 else if (((*yyvaluep).node)) {
10848 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10849 }
10850}
10851#line 10852 "parse.c"
10852 break;
10853
10854 case YYSYMBOL_string_content: /* string_content */
10855#line 2624 "parse.y"
10856 {
10857 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10858 rb_parser_printf(p, "NODE_SPECIAL");
10859 }
10860 else if (((*yyvaluep).node)) {
10861 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10862 }
10863}
10864#line 10865 "parse.c"
10865 break;
10866
10867 case YYSYMBOL_string_dvar: /* string_dvar */
10868#line 2624 "parse.y"
10869 {
10870 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10871 rb_parser_printf(p, "NODE_SPECIAL");
10872 }
10873 else if (((*yyvaluep).node)) {
10874 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10875 }
10876}
10877#line 10878 "parse.c"
10878 break;
10879
10880 case YYSYMBOL_symbol: /* symbol */
10881#line 2624 "parse.y"
10882 {
10883 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10884 rb_parser_printf(p, "NODE_SPECIAL");
10885 }
10886 else if (((*yyvaluep).node)) {
10887 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10888 }
10889}
10890#line 10891 "parse.c"
10891 break;
10892
10893 case YYSYMBOL_ssym: /* ssym */
10894#line 2624 "parse.y"
10895 {
10896 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10897 rb_parser_printf(p, "NODE_SPECIAL");
10898 }
10899 else if (((*yyvaluep).node)) {
10900 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10901 }
10902}
10903#line 10904 "parse.c"
10904 break;
10905
10906 case YYSYMBOL_sym: /* sym */
10907#line 2633 "parse.y"
10908 {
10909 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
10910}
10911#line 10912 "parse.c"
10912 break;
10913
10914 case YYSYMBOL_dsym: /* dsym */
10915#line 2624 "parse.y"
10916 {
10917 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10918 rb_parser_printf(p, "NODE_SPECIAL");
10919 }
10920 else if (((*yyvaluep).node)) {
10921 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10922 }
10923}
10924#line 10925 "parse.c"
10925 break;
10926
10927 case YYSYMBOL_numeric: /* numeric */
10928#line 2624 "parse.y"
10929 {
10930 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10931 rb_parser_printf(p, "NODE_SPECIAL");
10932 }
10933 else if (((*yyvaluep).node)) {
10934 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10935 }
10936}
10937#line 10938 "parse.c"
10938 break;
10939
10940 case YYSYMBOL_simple_numeric: /* simple_numeric */
10941#line 2624 "parse.y"
10942 {
10943 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10944 rb_parser_printf(p, "NODE_SPECIAL");
10945 }
10946 else if (((*yyvaluep).node)) {
10947 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10948 }
10949}
10950#line 10951 "parse.c"
10951 break;
10952
10953 case YYSYMBOL_nonlocal_var: /* nonlocal_var */
10954#line 2633 "parse.y"
10955 {
10956 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
10957}
10958#line 10959 "parse.c"
10959 break;
10960
10961 case YYSYMBOL_user_variable: /* user_variable */
10962#line 2633 "parse.y"
10963 {
10964 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
10965}
10966#line 10967 "parse.c"
10967 break;
10968
10969 case YYSYMBOL_keyword_variable: /* keyword_variable */
10970#line 2633 "parse.y"
10971 {
10972 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
10973}
10974#line 10975 "parse.c"
10975 break;
10976
10977 case YYSYMBOL_var_ref: /* var_ref */
10978#line 2624 "parse.y"
10979 {
10980 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10981 rb_parser_printf(p, "NODE_SPECIAL");
10982 }
10983 else if (((*yyvaluep).node)) {
10984 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10985 }
10986}
10987#line 10988 "parse.c"
10988 break;
10989
10990 case YYSYMBOL_var_lhs: /* var_lhs */
10991#line 2624 "parse.y"
10992 {
10993 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10994 rb_parser_printf(p, "NODE_SPECIAL");
10995 }
10996 else if (((*yyvaluep).node)) {
10997 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10998 }
10999}
11000#line 11001 "parse.c"
11001 break;
11002
11003 case YYSYMBOL_backref: /* backref */
11004#line 2624 "parse.y"
11005 {
11006 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
11007 rb_parser_printf(p, "NODE_SPECIAL");
11008 }
11009 else if (((*yyvaluep).node)) {
11010 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
11011 }
11012}
11013#line 11014 "parse.c"
11014 break;
11015
11016 case YYSYMBOL_superclass: /* superclass */
11017#line 2624 "parse.y"
11018 {
11019 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
11020 rb_parser_printf(p, "NODE_SPECIAL");
11021 }
11022 else if (((*yyvaluep).node)) {
11023 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
11024 }
11025}
11026#line 11027 "parse.c"
11027 break;
11028
11029 case YYSYMBOL_f_opt_paren_args: /* f_opt_paren_args */
11030#line 2624 "parse.y"
11031 {
11032 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
11033 rb_parser_printf(p, "NODE_SPECIAL");
11034 }
11035 else if (((*yyvaluep).node_args)) {
11036 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
11037 }
11038}
11039#line 11040 "parse.c"
11040 break;
11041
11042 case YYSYMBOL_f_empty_arg: /* f_empty_arg */
11043#line 2624 "parse.y"
11044 {
11045 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
11046 rb_parser_printf(p, "NODE_SPECIAL");
11047 }
11048 else if (((*yyvaluep).node_args)) {
11049 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
11050 }
11051}
11052#line 11053 "parse.c"
11053 break;
11054
11055 case YYSYMBOL_f_paren_args: /* f_paren_args */
11056#line 2624 "parse.y"
11057 {
11058 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
11059 rb_parser_printf(p, "NODE_SPECIAL");
11060 }
11061 else if (((*yyvaluep).node_args)) {
11062 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
11063 }
11064}
11065#line 11066 "parse.c"
11066 break;
11067
11068 case YYSYMBOL_f_arglist: /* f_arglist */
11069#line 2624 "parse.y"
11070 {
11071 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
11072 rb_parser_printf(p, "NODE_SPECIAL");
11073 }
11074 else if (((*yyvaluep).node_args)) {
11075 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
11076 }
11077}
11078#line 11079 "parse.c"
11079 break;
11080
11081 case YYSYMBOL_f_kw_arg_value: /* f_kw_arg_value */
11082#line 2624 "parse.y"
11083 {
11084 if ((NODE *)((*yyvaluep).node_kw_arg) == (NODE *)-1) {
11085 rb_parser_printf(p, "NODE_SPECIAL");
11086 }
11087 else if (((*yyvaluep).node_kw_arg)) {
11088 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_kw_arg)))));
11089 }
11090}
11091#line 11092 "parse.c"
11092 break;
11093
11094 case YYSYMBOL_f_kwarg_arg_value: /* f_kwarg_arg_value */
11095#line 2624 "parse.y"
11096 {
11097 if ((NODE *)((*yyvaluep).node_kw_arg) == (NODE *)-1) {
11098 rb_parser_printf(p, "NODE_SPECIAL");
11099 }
11100 else if (((*yyvaluep).node_kw_arg)) {
11101 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_kw_arg)))));
11102 }
11103}
11104#line 11105 "parse.c"
11105 break;
11106
11107 case YYSYMBOL_opt_f_block_arg_opt_comma: /* opt_f_block_arg_opt_comma */
11108#line 2633 "parse.y"
11109 {
11110 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
11111}
11112#line 11113 "parse.c"
11113 break;
11114
11115 case YYSYMBOL_args_tail_basic_arg_value_opt_comma: /* args_tail_basic_arg_value_opt_comma */
11116#line 2624 "parse.y"
11117 {
11118 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
11119 rb_parser_printf(p, "NODE_SPECIAL");
11120 }
11121 else if (((*yyvaluep).node_args)) {
11122 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
11123 }
11124}
11125#line 11126 "parse.c"
11126 break;
11127
11128 case YYSYMBOL_args_tail: /* args_tail */
11129#line 2624 "parse.y"
11130 {
11131 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
11132 rb_parser_printf(p, "NODE_SPECIAL");
11133 }
11134 else if (((*yyvaluep).node_args)) {
11135 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
11136 }
11137}
11138#line 11139 "parse.c"
11139 break;
11140
11141 case YYSYMBOL_args_tail_basic_arg_value_none: /* args_tail_basic_arg_value_none */
11142#line 2624 "parse.y"
11143 {
11144 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
11145 rb_parser_printf(p, "NODE_SPECIAL");
11146 }
11147 else if (((*yyvaluep).node_args)) {
11148 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
11149 }
11150}
11151#line 11152 "parse.c"
11152 break;
11153
11154 case YYSYMBOL_largs_tail: /* largs_tail */
11155#line 2624 "parse.y"
11156 {
11157 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
11158 rb_parser_printf(p, "NODE_SPECIAL");
11159 }
11160 else if (((*yyvaluep).node_args)) {
11161 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
11162 }
11163}
11164#line 11165 "parse.c"
11165 break;
11166
11167 case YYSYMBOL_f_opt_arg_value: /* f_opt_arg_value */
11168#line 2624 "parse.y"
11169 {
11170 if ((NODE *)((*yyvaluep).node_opt_arg) == (NODE *)-1) {
11171 rb_parser_printf(p, "NODE_SPECIAL");
11172 }
11173 else if (((*yyvaluep).node_opt_arg)) {
11174 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_opt_arg)))));
11175 }
11176}
11177#line 11178 "parse.c"
11178 break;
11179
11180 case YYSYMBOL_f_opt_arg_arg_value: /* f_opt_arg_arg_value */
11181#line 2624 "parse.y"
11182 {
11183 if ((NODE *)((*yyvaluep).node_opt_arg) == (NODE *)-1) {
11184 rb_parser_printf(p, "NODE_SPECIAL");
11185 }
11186 else if (((*yyvaluep).node_opt_arg)) {
11187 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_opt_arg)))));
11188 }
11189}
11190#line 11191 "parse.c"
11191 break;
11192
11193 case YYSYMBOL_opt_args_tail_args_tail_opt_comma: /* opt_args_tail_args_tail_opt_comma */
11194#line 2624 "parse.y"
11195 {
11196 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
11197 rb_parser_printf(p, "NODE_SPECIAL");
11198 }
11199 else if (((*yyvaluep).node_args)) {
11200 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
11201 }
11202}
11203#line 11204 "parse.c"
11204 break;
11205
11206 case YYSYMBOL_args_list_arg_value_opt_args_tail_args_tail_opt_comma: /* args-list_arg_value_opt_args_tail_args_tail_opt_comma */
11207#line 2624 "parse.y"
11208 {
11209 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
11210 rb_parser_printf(p, "NODE_SPECIAL");
11211 }
11212 else if (((*yyvaluep).node_args)) {
11213 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
11214 }
11215}
11216#line 11217 "parse.c"
11217 break;
11218
11219 case YYSYMBOL_f_args_list_args_tail_opt_comma: /* f_args-list_args_tail_opt_comma */
11220#line 2624 "parse.y"
11221 {
11222 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
11223 rb_parser_printf(p, "NODE_SPECIAL");
11224 }
11225 else if (((*yyvaluep).node_args)) {
11226 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
11227 }
11228}
11229#line 11230 "parse.c"
11230 break;
11231
11232 case YYSYMBOL_tail_only_args_args_tail: /* tail-only-args_args_tail */
11233#line 2624 "parse.y"
11234 {
11235 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
11236 rb_parser_printf(p, "NODE_SPECIAL");
11237 }
11238 else if (((*yyvaluep).node_args)) {
11239 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
11240 }
11241}
11242#line 11243 "parse.c"
11243 break;
11244
11245 case YYSYMBOL_f_args: /* f_args */
11246#line 2624 "parse.y"
11247 {
11248 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
11249 rb_parser_printf(p, "NODE_SPECIAL");
11250 }
11251 else if (((*yyvaluep).node_args)) {
11252 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
11253 }
11254}
11255#line 11256 "parse.c"
11256 break;
11257
11258 case YYSYMBOL_opt_args_tail_largs_tail_none: /* opt_args_tail_largs_tail_none */
11259#line 2624 "parse.y"
11260 {
11261 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
11262 rb_parser_printf(p, "NODE_SPECIAL");
11263 }
11264 else if (((*yyvaluep).node_args)) {
11265 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
11266 }
11267}
11268#line 11269 "parse.c"
11269 break;
11270
11271 case YYSYMBOL_args_list_arg_value_opt_args_tail_largs_tail_none: /* args-list_arg_value_opt_args_tail_largs_tail_none */
11272#line 2624 "parse.y"
11273 {
11274 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
11275 rb_parser_printf(p, "NODE_SPECIAL");
11276 }
11277 else if (((*yyvaluep).node_args)) {
11278 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
11279 }
11280}
11281#line 11282 "parse.c"
11282 break;
11283
11284 case YYSYMBOL_f_args_list_largs_tail_none: /* f_args-list_largs_tail_none */
11285#line 2624 "parse.y"
11286 {
11287 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
11288 rb_parser_printf(p, "NODE_SPECIAL");
11289 }
11290 else if (((*yyvaluep).node_args)) {
11291 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
11292 }
11293}
11294#line 11295 "parse.c"
11295 break;
11296
11297 case YYSYMBOL_tail_only_args_largs_tail: /* tail-only-args_largs_tail */
11298#line 2624 "parse.y"
11299 {
11300 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
11301 rb_parser_printf(p, "NODE_SPECIAL");
11302 }
11303 else if (((*yyvaluep).node_args)) {
11304 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
11305 }
11306}
11307#line 11308 "parse.c"
11308 break;
11309
11310 case YYSYMBOL_f_largs: /* f_largs */
11311#line 2624 "parse.y"
11312 {
11313 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
11314 rb_parser_printf(p, "NODE_SPECIAL");
11315 }
11316 else if (((*yyvaluep).node_args)) {
11317 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
11318 }
11319}
11320#line 11321 "parse.c"
11321 break;
11322
11323 case YYSYMBOL_args_forward: /* args_forward */
11324#line 2633 "parse.y"
11325 {
11326 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
11327}
11328#line 11329 "parse.c"
11329 break;
11330
11331 case YYSYMBOL_f_bad_arg: /* f_bad_arg */
11332#line 2633 "parse.y"
11333 {
11334 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
11335}
11336#line 11337 "parse.c"
11337 break;
11338
11339 case YYSYMBOL_f_norm_arg: /* f_norm_arg */
11340#line 2633 "parse.y"
11341 {
11342 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
11343}
11344#line 11345 "parse.c"
11345 break;
11346
11347 case YYSYMBOL_f_arg_asgn: /* f_arg_asgn */
11348#line 2633 "parse.y"
11349 {
11350 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
11351}
11352#line 11353 "parse.c"
11353 break;
11354
11355 case YYSYMBOL_f_arg_item: /* f_arg_item */
11356#line 2624 "parse.y"
11357 {
11358 if ((NODE *)((*yyvaluep).node_args_aux) == (NODE *)-1) {
11359 rb_parser_printf(p, "NODE_SPECIAL");
11360 }
11361 else if (((*yyvaluep).node_args_aux)) {
11362 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args_aux)))));
11363 }
11364}
11365#line 11366 "parse.c"
11366 break;
11367
11368 case YYSYMBOL_f_arg: /* f_arg */
11369#line 2624 "parse.y"
11370 {
11371 if ((NODE *)((*yyvaluep).node_args_aux) == (NODE *)-1) {
11372 rb_parser_printf(p, "NODE_SPECIAL");
11373 }
11374 else if (((*yyvaluep).node_args_aux)) {
11375 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args_aux)))));
11376 }
11377}
11378#line 11379 "parse.c"
11379 break;
11380
11381 case YYSYMBOL_f_label: /* f_label */
11382#line 2633 "parse.y"
11383 {
11384 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
11385}
11386#line 11387 "parse.c"
11387 break;
11388
11389 case YYSYMBOL_f_no_kwarg: /* f_no_kwarg */
11390#line 2633 "parse.y"
11391 {
11392 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
11393}
11394#line 11395 "parse.c"
11395 break;
11396
11397 case YYSYMBOL_f_kwrest: /* f_kwrest */
11398#line 2633 "parse.y"
11399 {
11400 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
11401}
11402#line 11403 "parse.c"
11403 break;
11404
11405 case YYSYMBOL_f_rest_arg: /* f_rest_arg */
11406#line 2633 "parse.y"
11407 {
11408 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
11409}
11410#line 11411 "parse.c"
11411 break;
11412
11413 case YYSYMBOL_f_block_arg: /* f_block_arg */
11414#line 2633 "parse.y"
11415 {
11416 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
11417}
11418#line 11419 "parse.c"
11419 break;
11420
11421 case YYSYMBOL_opt_comma: /* opt_comma */
11422#line 2633 "parse.y"
11423 {
11424 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
11425}
11426#line 11427 "parse.c"
11427 break;
11428
11429 case YYSYMBOL_value_expr_singleton_expr: /* value_expr_singleton_expr */
11430#line 2624 "parse.y"
11431 {
11432 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
11433 rb_parser_printf(p, "NODE_SPECIAL");
11434 }
11435 else if (((*yyvaluep).node)) {
11436 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
11437 }
11438}
11439#line 11440 "parse.c"
11440 break;
11441
11442 case YYSYMBOL_singleton: /* singleton */
11443#line 2624 "parse.y"
11444 {
11445 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
11446 rb_parser_printf(p, "NODE_SPECIAL");
11447 }
11448 else if (((*yyvaluep).node)) {
11449 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
11450 }
11451}
11452#line 11453 "parse.c"
11453 break;
11454
11455 case YYSYMBOL_singleton_expr: /* singleton_expr */
11456#line 2624 "parse.y"
11457 {
11458 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
11459 rb_parser_printf(p, "NODE_SPECIAL");
11460 }
11461 else if (((*yyvaluep).node)) {
11462 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
11463 }
11464}
11465#line 11466 "parse.c"
11466 break;
11467
11468 case YYSYMBOL_assoc_list: /* assoc_list */
11469#line 2624 "parse.y"
11470 {
11471 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
11472 rb_parser_printf(p, "NODE_SPECIAL");
11473 }
11474 else if (((*yyvaluep).node)) {
11475 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
11476 }
11477}
11478#line 11479 "parse.c"
11479 break;
11480
11481 case YYSYMBOL_assocs: /* assocs */
11482#line 2624 "parse.y"
11483 {
11484 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
11485 rb_parser_printf(p, "NODE_SPECIAL");
11486 }
11487 else if (((*yyvaluep).node)) {
11488 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
11489 }
11490}
11491#line 11492 "parse.c"
11492 break;
11493
11494 case YYSYMBOL_assoc: /* assoc */
11495#line 2624 "parse.y"
11496 {
11497 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
11498 rb_parser_printf(p, "NODE_SPECIAL");
11499 }
11500 else if (((*yyvaluep).node)) {
11501 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
11502 }
11503}
11504#line 11505 "parse.c"
11505 break;
11506
11507 case YYSYMBOL_operation2: /* operation2 */
11508#line 2633 "parse.y"
11509 {
11510 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
11511}
11512#line 11513 "parse.c"
11513 break;
11514
11515 case YYSYMBOL_operation3: /* operation3 */
11516#line 2633 "parse.y"
11517 {
11518 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
11519}
11520#line 11521 "parse.c"
11521 break;
11522
11523 case YYSYMBOL_dot_or_colon: /* dot_or_colon */
11524#line 2633 "parse.y"
11525 {
11526 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
11527}
11528#line 11529 "parse.c"
11529 break;
11530
11531 case YYSYMBOL_call_op: /* call_op */
11532#line 2633 "parse.y"
11533 {
11534 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
11535}
11536#line 11537 "parse.c"
11537 break;
11538
11539 case YYSYMBOL_call_op2: /* call_op2 */
11540#line 2633 "parse.y"
11541 {
11542 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
11543}
11544#line 11545 "parse.c"
11545 break;
11546
11547 case YYSYMBOL_none: /* none */
11548#line 2624 "parse.y"
11549 {
11550 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
11551 rb_parser_printf(p, "NODE_SPECIAL");
11552 }
11553 else if (((*yyvaluep).node)) {
11554 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
11555 }
11556}
11557#line 11558 "parse.c"
11558 break;
11559
11560 default:
11561 break;
11562 }
11563 YY_IGNORE_MAYBE_UNINITIALIZED_END
11564}
11565
11566
11567/*---------------------------.
11568| Print this symbol on YYO. |
11569`---------------------------*/
11570
11571static void
11572yy_symbol_print (FILE *yyo,
11573 yysymbol_kind_t yykind, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp, struct parser_params *p)
11574{
11575 YYFPRINTF (yyo, "%s %s (",
11576 yykind < YYNTOKENS ? "token" : "nterm", yysymbol_name (yykind));
11577
11578 YYLOCATION_PRINT (yyo, yylocationp, p);
11579 YYFPRINTF (yyo, ": ");
11580 yy_symbol_value_print (yyo, yykind, yyvaluep, yylocationp, p);
11581 YYFPRINTF (yyo, ")");
11582}
11583
11584/*------------------------------------------------------------------.
11585| yy_stack_print -- Print the state stack from its BOTTOM up to its |
11586| TOP (included). |
11587`------------------------------------------------------------------*/
11588
11589static void
11590yy_stack_print (yy_state_t *yybottom, yy_state_t *yytop, struct parser_params *p)
11591{
11592 YYFPRINTF (stderr, "Stack now");
11593 for (; yybottom <= yytop; yybottom++)
11594 {
11595 int yybot = *yybottom;
11596 YYFPRINTF (stderr, " %d", yybot);
11597 }
11598 YYFPRINTF (stderr, "\n");
11599}
11600
11601# define YY_STACK_PRINT(Bottom, Top, p) \
11602do { \
11603 if (yydebug) \
11604 yy_stack_print ((Bottom), (Top), p); \
11605} while (0)
11606
11607
11608/*------------------------------------------------.
11609| Report that the YYRULE is going to be reduced. |
11610`------------------------------------------------*/
11611
11612static void
11613yy_reduce_print (yy_state_t *yyssp, YYSTYPE *yyvsp, YYLTYPE *yylsp,
11614 int yyrule, struct parser_params *p)
11615{
11616 int yylno = yyrline[yyrule];
11617 int yynrhs = yyr2[yyrule];
11618 int yyi;
11619 YYFPRINTF (stderr, "Reducing stack by rule %d (line %d):\n",
11620 yyrule - 1, yylno);
11621 /* The symbols being reduced. */
11622 for (yyi = 0; yyi < yynrhs; yyi++)
11623 {
11624 YYFPRINTF (stderr, " $%d = ", yyi + 1);
11625 yy_symbol_print (stderr,
11626 YY_ACCESSING_SYMBOL (+yyssp[yyi + 1 - yynrhs]),
11627 &yyvsp[(yyi + 1) - (yynrhs)],
11628 &(yylsp[(yyi + 1) - (yynrhs)]), p);
11629 YYFPRINTF (stderr, "\n");
11630 }
11631}
11632
11633# define YY_REDUCE_PRINT(Rule, p) \
11634do { \
11635 if (yydebug) \
11636 yy_reduce_print (yyssp, yyvsp, yylsp, Rule, p); \
11637} while (0)
11638
11639/* Nonzero means print parse trace. It is left uninitialized so that
11640 multiple parsers can coexist. */
11641#ifndef yydebug
11642int yydebug;
11643#endif
11644#else /* !YYDEBUG */
11645# define YYDPRINTF(Args) ((void) 0)
11646# define YY_SYMBOL_PRINT(Title, Kind, Value, Location, p)
11647# define YY_STACK_PRINT(Bottom, Top, p)
11648# define YY_REDUCE_PRINT(Rule, p)
11649#endif /* !YYDEBUG */
11650
11651
11652/* YYINITDEPTH -- initial size of the parser's stacks. */
11653#ifndef YYINITDEPTH
11654# define YYINITDEPTH 200
11655#endif
11656
11657/* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
11658 if the built-in stack extension method is used).
11659
11660 Do not make this value too large; the results are undefined if
11661 YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
11662 evaluated with infinite-precision integer arithmetic. */
11663
11664#ifndef YYMAXDEPTH
11665# define YYMAXDEPTH 10000
11666#endif
11667
11668
11669/* Context of a parse error. */
11670typedef struct
11671{
11672 yy_state_t *yyssp;
11673 yysymbol_kind_t yytoken;
11674 YYLTYPE *yylloc;
11675} yypcontext_t;
11676
11677/* Put in YYARG at most YYARGN of the expected tokens given the
11678 current YYCTX, and return the number of tokens stored in YYARG. If
11679 YYARG is null, return the number of expected tokens (guaranteed to
11680 be less than YYNTOKENS). Return YYENOMEM on memory exhaustion.
11681 Return 0 if there are more than YYARGN expected tokens, yet fill
11682 YYARG up to YYARGN. */
11683static int
11684yypcontext_expected_tokens (const yypcontext_t *yyctx,
11685 yysymbol_kind_t yyarg[], int yyargn)
11686{
11687 /* Actual size of YYARG. */
11688 int yycount = 0;
11689 int yyn = yypact[+*yyctx->yyssp];
11690 if (!yypact_value_is_default (yyn))
11691 {
11692 /* Start YYX at -YYN if negative to avoid negative indexes in
11693 YYCHECK. In other words, skip the first -YYN actions for
11694 this state because they are default actions. */
11695 int yyxbegin = yyn < 0 ? -yyn : 0;
11696 /* Stay within bounds of both yycheck and yytname. */
11697 int yychecklim = YYLAST - yyn + 1;
11698 int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
11699 int yyx;
11700 for (yyx = yyxbegin; yyx < yyxend; ++yyx)
11701 if (yycheck[yyx + yyn] == yyx && yyx != YYSYMBOL_YYerror
11702 && !yytable_value_is_error (yytable[yyx + yyn]))
11703 {
11704 if (!yyarg)
11705 ++yycount;
11706 else if (yycount == yyargn)
11707 return 0;
11708 else
11709 yyarg[yycount++] = YY_CAST (yysymbol_kind_t, yyx);
11710 }
11711 }
11712 if (yyarg && yycount == 0 && 0 < yyargn)
11713 yyarg[0] = YYSYMBOL_YYEMPTY;
11714 return yycount;
11715}
11716
11717
11718
11719
11720#ifndef yystrlen
11721# if defined __GLIBC__ && defined _STRING_H
11722# define yystrlen(S) (YY_CAST (YYPTRDIFF_T, strlen (S)))
11723# else
11724/* Return the length of YYSTR. */
11725static YYPTRDIFF_T
11726yystrlen (const char *yystr)
11727{
11728 YYPTRDIFF_T yylen;
11729 for (yylen = 0; yystr[yylen]; yylen++)
11730 continue;
11731 return yylen;
11732}
11733# endif
11734#endif
11735
11736#ifndef yystpcpy
11737# if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
11738# define yystpcpy stpcpy
11739# else
11740/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
11741 YYDEST. */
11742static char *
11743yystpcpy (char *yydest, const char *yysrc)
11744{
11745 char *yyd = yydest;
11746 const char *yys = yysrc;
11747
11748 while ((*yyd++ = *yys++) != '\0')
11749 continue;
11750
11751 return yyd - 1;
11752}
11753# endif
11754#endif
11755
11756#ifndef yytnamerr
11757/* Copy to YYRES the contents of YYSTR after stripping away unnecessary
11758 quotes and backslashes, so that it's suitable for yyerror. The
11759 heuristic is that double-quoting is unnecessary unless the string
11760 contains an apostrophe, a comma, or backslash (other than
11761 backslash-backslash). YYSTR is taken from yytname. If YYRES is
11762 null, do not copy; instead, return the length of what the result
11763 would have been. */
11764static YYPTRDIFF_T
11765yytnamerr (char *yyres, const char *yystr)
11766{
11767 if (*yystr == '"')
11768 {
11769 YYPTRDIFF_T yyn = 0;
11770 char const *yyp = yystr;
11771 for (;;)
11772 switch (*++yyp)
11773 {
11774 case '\'':
11775 case ',':
11776 goto do_not_strip_quotes;
11777
11778 case '\\':
11779 if (*++yyp != '\\')
11780 goto do_not_strip_quotes;
11781 else
11782 goto append;
11783
11784 append:
11785 default:
11786 if (yyres)
11787 yyres[yyn] = *yyp;
11788 yyn++;
11789 break;
11790
11791 case '"':
11792 if (yyres)
11793 yyres[yyn] = '\0';
11794 return yyn;
11795 }
11796 do_not_strip_quotes: ;
11797 }
11798
11799 if (yyres)
11800 return yystpcpy (yyres, yystr) - yyres;
11801 else
11802 return yystrlen (yystr);
11803}
11804#endif
11805
11806
11807static int
11808yy_syntax_error_arguments (const yypcontext_t *yyctx,
11809 yysymbol_kind_t yyarg[], int yyargn)
11810{
11811 /* Actual size of YYARG. */
11812 int yycount = 0;
11813 /* There are many possibilities here to consider:
11814 - If this state is a consistent state with a default action, then
11815 the only way this function was invoked is if the default action
11816 is an error action. In that case, don't check for expected
11817 tokens because there are none.
11818 - The only way there can be no lookahead present (in yychar) is if
11819 this state is a consistent state with a default action. Thus,
11820 detecting the absence of a lookahead is sufficient to determine
11821 that there is no unexpected or expected token to report. In that
11822 case, just report a simple "syntax error".
11823 - Don't assume there isn't a lookahead just because this state is a
11824 consistent state with a default action. There might have been a
11825 previous inconsistent state, consistent state with a non-default
11826 action, or user semantic action that manipulated yychar.
11827 - Of course, the expected token list depends on states to have
11828 correct lookahead information, and it depends on the parser not
11829 to perform extra reductions after fetching a lookahead from the
11830 scanner and before detecting a syntax error. Thus, state merging
11831 (from LALR or IELR) and default reductions corrupt the expected
11832 token list. However, the list is correct for canonical LR with
11833 one exception: it will still contain any token that will not be
11834 accepted due to an error action in a later state.
11835 */
11836 if (yyctx->yytoken != YYSYMBOL_YYEMPTY)
11837 {
11838 int yyn;
11839 if (yyarg)
11840 yyarg[yycount] = yyctx->yytoken;
11841 ++yycount;
11842 yyn = yypcontext_expected_tokens (yyctx,
11843 yyarg ? yyarg + 1 : yyarg, yyargn - 1);
11844 if (yyn == YYENOMEM)
11845 return YYENOMEM;
11846 else
11847 yycount += yyn;
11848 }
11849 return yycount;
11850}
11851
11852/* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message
11853 about the unexpected token YYTOKEN for the state stack whose top is
11854 YYSSP.
11855
11856 Return 0 if *YYMSG was successfully written. Return -1 if *YYMSG is
11857 not large enough to hold the message. In that case, also set
11858 *YYMSG_ALLOC to the required number of bytes. Return YYENOMEM if the
11859 required number of bytes is too large to store. */
11860static int
11861yysyntax_error (YYPTRDIFF_T *yymsg_alloc, char **yymsg,
11862 const yypcontext_t *yyctx, struct parser_params *p)
11863{
11864 enum { YYARGS_MAX = 5 };
11865 /* Internationalized format string. */
11866 const char *yyformat = YY_NULLPTR;
11867 /* Arguments of yyformat: reported tokens (one for the "unexpected",
11868 one per "expected"). */
11869 yysymbol_kind_t yyarg[YYARGS_MAX];
11870 /* Cumulated lengths of YYARG. */
11871 YYPTRDIFF_T yysize = 0;
11872
11873 /* Actual size of YYARG. */
11874 int yycount = yy_syntax_error_arguments (yyctx, yyarg, YYARGS_MAX);
11875 if (yycount == YYENOMEM)
11876 return YYENOMEM;
11877
11878 switch (yycount)
11879 {
11880#define YYCASE_(N, S) \
11881 case N: \
11882 yyformat = S; \
11883 break
11884 default: /* Avoid compiler warnings. */
11885 YYCASE_(0, YY_("syntax error"));
11886 YYCASE_(1, YY_("syntax error, unexpected %s"));
11887 YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s"));
11888 YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s"));
11889 YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s"));
11890 YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"));
11891#undef YYCASE_
11892 }
11893
11894 /* Compute error message size. Don't count the "%s"s, but reserve
11895 room for the terminator. */
11896 yysize = yystrlen (yyformat) - 2 * yycount + 1;
11897 {
11898 int yyi;
11899 for (yyi = 0; yyi < yycount; ++yyi)
11900 {
11901 YYPTRDIFF_T yysize1
11902 = yysize + yytnamerr (YY_NULLPTR, yytname[yyarg[yyi]]);
11903 if (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM)
11904 yysize = yysize1;
11905 else
11906 return YYENOMEM;
11907 }
11908 }
11909
11910 if (*yymsg_alloc < yysize)
11911 {
11912 *yymsg_alloc = 2 * yysize;
11913 if (! (yysize <= *yymsg_alloc
11914 && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM))
11915 *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM;
11916 return -1;
11917 }
11918
11919 /* Avoid sprintf, as that infringes on the user's name space.
11920 Don't have undefined behavior even if the translation
11921 produced a string with the wrong number of "%s"s. */
11922 {
11923 char *yyp = *yymsg;
11924 int yyi = 0;
11925 while ((*yyp = *yyformat) != '\0')
11926 if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount)
11927 {
11928 yyp += yytnamerr (yyp, yytname[yyarg[yyi++]]);
11929 yyformat += 2;
11930 }
11931 else
11932 {
11933 ++yyp;
11934 ++yyformat;
11935 }
11936 }
11937 return 0;
11938}
11939
11940
11941/*-----------------------------------------------.
11942| Release the memory associated to this symbol. |
11943`-----------------------------------------------*/
11944
11945static void
11946yydestruct (const char *yymsg,
11947 yysymbol_kind_t yykind, YYSTYPE *yyvaluep, YYLTYPE *yylocationp, struct parser_params *p)
11948{
11949 YY_USE (yyvaluep);
11950 YY_USE (yylocationp);
11951 YY_USE (p);
11952 if (!yymsg)
11953 yymsg = "Deleting";
11954 YY_SYMBOL_PRINT (yymsg, yykind, yyvaluep, yylocationp, p);
11955
11956 YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
11957 switch (yykind)
11958 {
11959 case YYSYMBOL_258_16: /* @16 */
11960#line 2661 "parse.y"
11961 {
11962 if (CASE_LABELS_ENABLED_P(((*yyvaluep).labels))) st_free_table(((*yyvaluep).labels));
11963}
11964#line 11965 "parse.c"
11965 break;
11966
11967 case YYSYMBOL_259_17: /* @17 */
11968#line 2661 "parse.y"
11969 {
11970 if (CASE_LABELS_ENABLED_P(((*yyvaluep).labels))) st_free_table(((*yyvaluep).labels));
11971}
11972#line 11973 "parse.c"
11973 break;
11974
11975 default:
11976 break;
11977 }
11978 YY_IGNORE_MAYBE_UNINITIALIZED_END
11979}
11980
11981
11982
11983
11984
11985
11986/*----------.
11987| yyparse. |
11988`----------*/
11989
11990int
11991yyparse (struct parser_params *p)
11992{
11993/* Lookahead token kind. */
11994int yychar;
11995
11996
11997/* The semantic value of the lookahead symbol. */
11998/* Default value used for initialization, for pacifying older GCCs
11999 or non-GCC compilers. */
12000#ifdef __cplusplus
12001static const YYSTYPE yyval_default = {};
12002(void) yyval_default;
12003#else
12004YY_INITIAL_VALUE (static const YYSTYPE yyval_default;)
12005#endif
12006YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default);
12007
12008/* Location data for the lookahead symbol. */
12009static const YYLTYPE yyloc_default
12010# if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL
12011 = { 1, 1, 1, 1 }
12012# endif
12013;
12014YYLTYPE yylloc = yyloc_default;
12015
12016 /* Number of syntax errors so far. */
12017 int yynerrs = 0;
12018 YY_USE (yynerrs); /* Silence compiler warning. */
12019
12020 yy_state_fast_t yystate = 0;
12021 /* Number of tokens to shift before error messages enabled. */
12022 int yyerrstatus = 0;
12023
12024 /* Refer to the stacks through separate pointers, to allow yyoverflow
12025 to reallocate them elsewhere. */
12026
12027 /* Their size. */
12028 YYPTRDIFF_T yystacksize = YYINITDEPTH;
12029
12030 /* The state stack: array, bottom, top. */
12031 yy_state_t yyssa[YYINITDEPTH];
12032 yy_state_t *yyss = yyssa;
12033 yy_state_t *yyssp = yyss;
12034
12035 /* The semantic value stack: array, bottom, top. */
12036 YYSTYPE yyvsa[YYINITDEPTH];
12037 YYSTYPE *yyvs = yyvsa;
12038 YYSTYPE *yyvsp = yyvs;
12039
12040 /* The location stack: array, bottom, top. */
12041 YYLTYPE yylsa[YYINITDEPTH];
12042 YYLTYPE *yyls = yylsa;
12043 YYLTYPE *yylsp = yyls;
12044
12045 int yyn;
12046 /* The return value of yyparse. */
12047 int yyresult;
12048 /* Lookahead symbol kind. */
12049 yysymbol_kind_t yytoken = YYSYMBOL_YYEMPTY;
12050 /* The variables used to return semantic value and location from the
12051 action routines. */
12052 YYSTYPE yyval;
12053 YYLTYPE yyloc;
12054
12055 /* The locations where the error started and ended. */
12056 YYLTYPE yyerror_range[3];
12057
12058 /* Buffer for error messages, and its allocated size. */
12059 char yymsgbuf[128];
12060 char *yymsg = yymsgbuf;
12061 YYPTRDIFF_T yymsg_alloc = sizeof yymsgbuf;
12062
12063#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N), yylsp -= (N))
12064
12065 /* The number of symbols on the RHS of the reduced rule.
12066 Keep to zero when no symbol should be popped. */
12067 int yylen = 0;
12068
12069 YYDPRINTF ((stderr, "Starting parse\n"));
12070
12071 yychar = YYEMPTY; /* Cause a token to be read. */
12072
12073
12074 /* User initialization code. */
12075#line 2668 "parse.y"
12076 {
12077 RUBY_SET_YYLLOC_OF_NONE(yylloc);
12078}
12079
12080#line 12081 "parse.c"
12081
12082 yylsp[0] = yylloc;
12083 goto yysetstate;
12084
12085
12086/*------------------------------------------------------------.
12087| yynewstate -- push a new state, which is found in yystate. |
12088`------------------------------------------------------------*/
12089yynewstate:
12090 /* In all cases, when you get here, the value and location stacks
12091 have just been pushed. So pushing a state here evens the stacks. */
12092 yyssp++;
12093
12094
12095/*--------------------------------------------------------------------.
12096| yysetstate -- set current state (the top of the stack) to yystate. |
12097`--------------------------------------------------------------------*/
12098yysetstate:
12099 YYDPRINTF ((stderr, "Entering state %d\n", yystate));
12100 YY_ASSERT (0 <= yystate && yystate < YYNSTATES);
12101 YY_IGNORE_USELESS_CAST_BEGIN
12102 *yyssp = YY_CAST (yy_state_t, yystate);
12103 YY_IGNORE_USELESS_CAST_END
12104 YY_STACK_PRINT (yyss, yyssp, p);
12105
12106 if (yyss + yystacksize - 1 <= yyssp)
12107#if !defined yyoverflow && !defined YYSTACK_RELOCATE
12108 YYNOMEM;
12109#else
12110 {
12111 /* Get the current used size of the three stacks, in elements. */
12112 YYPTRDIFF_T yysize = yyssp - yyss + 1;
12113
12114# if defined yyoverflow
12115 {
12116 /* Give user a chance to reallocate the stack. Use copies of
12117 these so that the &'s don't force the real ones into
12118 memory. */
12119 yy_state_t *yyss1 = yyss;
12120 YYSTYPE *yyvs1 = yyvs;
12121 YYLTYPE *yyls1 = yyls;
12122
12123 /* Each stack pointer address is followed by the size of the
12124 data in use in that stack, in bytes. This used to be a
12125 conditional around just the two extra args, but that might
12126 be undefined if yyoverflow is a macro. */
12127 yyoverflow (YY_("memory exhausted"),
12128 &yyss1, yysize * YYSIZEOF (*yyssp),
12129 &yyvs1, yysize * YYSIZEOF (*yyvsp),
12130 &yyls1, yysize * YYSIZEOF (*yylsp),
12131 &yystacksize);
12132 yyss = yyss1;
12133 yyvs = yyvs1;
12134 yyls = yyls1;
12135 }
12136# else /* defined YYSTACK_RELOCATE */
12137 /* Extend the stack our own way. */
12138 if (YYMAXDEPTH <= yystacksize)
12139 YYNOMEM;
12140 yystacksize *= 2;
12141 if (YYMAXDEPTH < yystacksize)
12142 yystacksize = YYMAXDEPTH;
12143
12144 {
12145 yy_state_t *yyss1 = yyss;
12146 union yyalloc *yyptr =
12147 YY_CAST (union yyalloc *,
12148 YYSTACK_ALLOC (YY_CAST (YYSIZE_T, YYSTACK_BYTES (yystacksize))));
12149 if (! yyptr)
12150 YYNOMEM;
12151 YYSTACK_RELOCATE (yyss_alloc, yyss);
12152 YYSTACK_RELOCATE (yyvs_alloc, yyvs);
12153 YYSTACK_RELOCATE (yyls_alloc, yyls);
12154# undef YYSTACK_RELOCATE
12155 if (yyss1 != yyssa)
12156 YYSTACK_FREE (yyss1);
12157 }
12158# endif
12159
12160 yyssp = yyss + yysize - 1;
12161 yyvsp = yyvs + yysize - 1;
12162 yylsp = yyls + yysize - 1;
12163
12164 YY_IGNORE_USELESS_CAST_BEGIN
12165 YYDPRINTF ((stderr, "Stack size increased to %ld\n",
12166 YY_CAST (long, yystacksize)));
12167 YY_IGNORE_USELESS_CAST_END
12168
12169 if (yyss + yystacksize - 1 <= yyssp)
12170 YYABORT;
12171 }
12172#endif /* !defined yyoverflow && !defined YYSTACK_RELOCATE */
12173
12174
12175 if (yystate == YYFINAL)
12176 YYACCEPT;
12177
12178 goto yybackup;
12179
12180
12181/*-----------.
12182| yybackup. |
12183`-----------*/
12184yybackup:
12185 /* Do appropriate processing given the current state. Read a
12186 lookahead token if we need one and don't already have one. */
12187
12188 /* First try to decide what to do without reference to lookahead token. */
12189 yyn = yypact[yystate];
12190 if (yypact_value_is_default (yyn))
12191 goto yydefault;
12192
12193 /* Not known => get a lookahead token if don't already have one. */
12194
12195 /* YYCHAR is either empty, or end-of-input, or a valid lookahead. */
12196 if (yychar == YYEMPTY)
12197 {
12198 YYDPRINTF ((stderr, "Reading a token\n"));
12199 yychar = yylex (&yylval, &yylloc, p);
12200 }
12201
12202 if (yychar <= END_OF_INPUT)
12203 {
12204 yychar = END_OF_INPUT;
12205 yytoken = YYSYMBOL_YYEOF;
12206 YYDPRINTF ((stderr, "Now at end of input.\n"));
12207 }
12208 else if (yychar == YYerror)
12209 {
12210 /* The scanner already issued an error message, process directly
12211 to error recovery. But do not keep the error token as
12212 lookahead, it is too special and may lead us to an endless
12213 loop in error recovery. */
12214 yychar = YYUNDEF;
12215 yytoken = YYSYMBOL_YYerror;
12216 yyerror_range[1] = yylloc;
12217 goto yyerrlab1;
12218 }
12219 else
12220 {
12221 yytoken = YYTRANSLATE (yychar);
12222 YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc, p);
12223 }
12224
12225 /* If the proper action on seeing token YYTOKEN is to reduce or to
12226 detect an error, take that action. */
12227 yyn += yytoken;
12228 if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
12229 goto yydefault;
12230 yyn = yytable[yyn];
12231 if (yyn <= 0)
12232 {
12233 if (yytable_value_is_error (yyn))
12234 goto yyerrlab;
12235 yyn = -yyn;
12236 goto yyreduce;
12237 }
12238
12239 /* Count tokens shifted since error; after three, turn off error
12240 status. */
12241 if (yyerrstatus)
12242 yyerrstatus--;
12243
12244 /* Shift the lookahead token. */
12245 YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc, p);
12246 yystate = yyn;
12247 YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
12248 *++yyvsp = yylval;
12249 YY_IGNORE_MAYBE_UNINITIALIZED_END
12250 *++yylsp = yylloc;
12251 /* %after-shift code. */
12252#line 2671 "parse.y"
12253 {after_shift(p);}
12254#line 12255 "parse.c"
12255
12256
12257 /* Discard the shifted token. */
12258 yychar = YYEMPTY;
12259 goto yynewstate;
12260
12261
12262/*-----------------------------------------------------------.
12263| yydefault -- do the default action for the current state. |
12264`-----------------------------------------------------------*/
12265yydefault:
12266 yyn = yydefact[yystate];
12267 if (yyn == 0)
12268 goto yyerrlab;
12269 goto yyreduce;
12270
12271
12272/*-----------------------------.
12273| yyreduce -- do a reduction. |
12274`-----------------------------*/
12275yyreduce:
12276 /* yyn is the number of a rule to reduce with. */
12277 yylen = yyr2[yyn];
12278
12279 /* If YYLEN is nonzero, implement the default value of the action:
12280 '$$ = $1'.
12281
12282 Otherwise, the following line sets YYVAL to garbage.
12283 This behavior is undocumented and Bison
12284 users should not rely upon it. Assigning to YYVAL
12285 unconditionally makes the parser a bit smaller, and it avoids a
12286 GCC warning that YYVAL may be used uninitialized. */
12287 yyval = yyvsp[1-yylen];
12288 /* %before-reduce function. */
12289#line 2672 "parse.y"
12290 {before_reduce(yylen, p);}
12291#line 12292 "parse.c"
12292
12293
12294 /* Default location. */
12295 YYLLOC_DEFAULT (yyloc, (yylsp - yylen), yylen);
12296 yyerror_range[1] = yyloc;
12297 YY_REDUCE_PRINT (yyn, p);
12298 switch (yyn)
12299 {
12300 case 2: /* $@1: %empty */
12301#line 3176 "parse.y"
12302 {
12303 SET_LEX_STATE(EXPR_BEG);
12304 local_push(p, ifndef_ripper(1)+0);
12305 /* jumps are possible in the top-level loop. */
12306 if (!ifndef_ripper(p->do_loop) + 0) init_block_exit(p);
12307 }
12308#line 12309 "parse.c"
12309 break;
12310
12311 case 5: /* compstmt_top_stmts: top_stmts option_terms */
12312#line 2991 "parse.y"
12313 {
12314 void_stmts(p, (yyval.node) = (yyvsp[-1].node));
12315 }
12316#line 12317 "parse.c"
12317 break;
12318
12319 case 6: /* program: $@1 compstmt_top_stmts */
12320#line 3183 "parse.y"
12321 {
12322 if ((yyvsp[0].node) && !compile_for_eval) {
12323 NODE *node = (yyvsp[0].node);
12324 /* last expression should not be void */
12325 if (nd_type_p(node, NODE_BLOCK)) {
12326 while (RNODE_BLOCK(node)->nd_next) {
12327 node = RNODE_BLOCK(node)->nd_next;
12328 }
12329 node = RNODE_BLOCK(node)->nd_head;
12330 }
12331 node = remove_begin(node);
12332 void_expr(p, node);
12333 }
12334 p->eval_tree = NEW_SCOPE(0, block_append(p, p->eval_tree, (yyvsp[0].node)), NULL, &(yyloc));
12335 /*% ripper[final]: program!($:2) %*/
12336 local_pop(p);
12337 }
12338#line 12339 "parse.c"
12339 break;
12340
12341 case 7: /* top_stmts: none */
12342#line 3203 "parse.y"
12343 {
12344 (yyval.node) = NEW_BEGIN(0, &(yyloc));
12345 /*% ripper: stmts_add!(stmts_new!, void_stmt!) %*/
12346 }
12347#line 12348 "parse.c"
12348 break;
12349
12350 case 8: /* top_stmts: top_stmt */
12351#line 3208 "parse.y"
12352 {
12353 (yyval.node) = newline_node((yyvsp[0].node));
12354 /*% ripper: stmts_add!(stmts_new!, $:1) %*/
12355 }
12356#line 12357 "parse.c"
12357 break;
12358
12359 case 9: /* top_stmts: top_stmts terms top_stmt */
12360#line 3213 "parse.y"
12361 {
12362 (yyval.node) = block_append(p, (yyvsp[-2].node), newline_node((yyvsp[0].node)));
12363 /*% ripper: stmts_add!($:1, $:3) %*/
12364 }
12365#line 12366 "parse.c"
12366 break;
12367
12368 case 10: /* top_stmt: stmt */
12369#line 3220 "parse.y"
12370 {
12371 clear_block_exit(p, true);
12372 (yyval.node) = (yyvsp[0].node);
12373 }
12374#line 12375 "parse.c"
12375 break;
12376
12377 case 11: /* top_stmt: "'BEGIN'" begin_block */
12378#line 3225 "parse.y"
12379 {
12380 (yyval.node) = (yyvsp[0].node);
12381 /*% ripper: $:2 %*/
12382 }
12383#line 12384 "parse.c"
12384 break;
12385
12386 case 12: /* block_open: '{' */
12387#line 3231 "parse.y"
12388 {(yyval.node_exits) = init_block_exit(p);}
12389#line 12390 "parse.c"
12390 break;
12391
12392 case 13: /* begin_block: block_open compstmt_top_stmts '}' */
12393#line 3234 "parse.y"
12394 {
12395 restore_block_exit(p, (yyvsp[-2].node_exits));
12396 p->eval_tree_begin = block_append(p, p->eval_tree_begin,
12397 NEW_BEGIN((yyvsp[-1].node), &(yyloc)));
12398 (yyval.node) = NEW_BEGIN(0, &(yyloc));
12399 /*% ripper: BEGIN!($:compstmt) %*/
12400 }
12401#line 12402 "parse.c"
12402 break;
12403
12404 case 14: /* compstmt_stmts: stmts option_terms */
12405#line 2991 "parse.y"
12406 {
12407 void_stmts(p, (yyval.node) = (yyvsp[-1].node));
12408 }
12409#line 12410 "parse.c"
12410 break;
12411
12412 case 15: /* $@2: %empty */
12413#line 3247 "parse.y"
12414 {
12415 if (!(yyvsp[-1].node)) yyerror1(&(yylsp[0]), "else without rescue is useless");
12416 next_rescue_context(&p->ctxt, &(yyvsp[-2].ctxt), after_else);
12417 }
12418#line 12419 "parse.c"
12419 break;
12420
12421 case 16: /* $@3: %empty */
12422#line 3252 "parse.y"
12423 {
12424 next_rescue_context(&p->ctxt, &(yyvsp[-4].ctxt), after_ensure);
12425 }
12426#line 12427 "parse.c"
12427 break;
12428
12429 case 17: /* bodystmt: compstmt_stmts lex_ctxt opt_rescue k_else $@2 compstmt_stmts $@3 opt_ensure */
12430#line 3256 "parse.y"
12431 {
12432 (yyval.node) = new_bodystmt(p, (yyvsp[-7].node), (yyvsp[-5].node), (yyvsp[-2].node), (yyvsp[0].node), &(yyloc));
12433 /*% ripper: bodystmt!($:body, $:opt_rescue, $:elsebody, $:opt_ensure) %*/
12434 }
12435#line 12436 "parse.c"
12436 break;
12437
12438 case 18: /* $@4: %empty */
12439#line 3263 "parse.y"
12440 {
12441 next_rescue_context(&p->ctxt, &(yyvsp[-1].ctxt), after_ensure);
12442 }
12443#line 12444 "parse.c"
12444 break;
12445
12446 case 19: /* bodystmt: compstmt_stmts lex_ctxt opt_rescue $@4 opt_ensure */
12447#line 3267 "parse.y"
12448 {
12449 (yyval.node) = new_bodystmt(p, (yyvsp[-4].node), (yyvsp[-2].node), 0, (yyvsp[0].node), &(yyloc));
12450 /*% ripper: bodystmt!($:body, $:opt_rescue, Qnil, $:opt_ensure) %*/
12451 }
12452#line 12453 "parse.c"
12453 break;
12454
12455 case 20: /* stmts: none */
12456#line 3274 "parse.y"
12457 {
12458 (yyval.node) = NEW_BEGIN(0, &(yyloc));
12459 /*% ripper: stmts_add!(stmts_new!, void_stmt!) %*/
12460 }
12461#line 12462 "parse.c"
12462 break;
12463
12464 case 21: /* stmts: stmt_or_begin */
12465#line 3279 "parse.y"
12466 {
12467 (yyval.node) = newline_node((yyvsp[0].node));
12468 /*% ripper: stmts_add!(stmts_new!, $:1) %*/
12469 }
12470#line 12471 "parse.c"
12471 break;
12472
12473 case 22: /* stmts: stmts terms stmt_or_begin */
12474#line 3284 "parse.y"
12475 {
12476 (yyval.node) = block_append(p, (yyvsp[-2].node), newline_node((yyvsp[0].node)));
12477 /*% ripper: stmts_add!($:1, $:3) %*/
12478 }
12479#line 12480 "parse.c"
12480 break;
12481
12482 case 24: /* $@5: %empty */
12483#line 3292 "parse.y"
12484 {
12485 yyerror1(&(yylsp[0]), "BEGIN is permitted only at toplevel");
12486 }
12487#line 12488 "parse.c"
12488 break;
12489
12490 case 25: /* stmt_or_begin: "'BEGIN'" $@5 begin_block */
12491#line 3296 "parse.y"
12492 {
12493 (yyval.node) = (yyvsp[0].node);
12494 }
12495#line 12496 "parse.c"
12496 break;
12497
12498 case 26: /* allow_exits: %empty */
12499#line 3301 "parse.y"
12500 {(yyval.node_exits) = allow_block_exit(p);}
12501#line 12502 "parse.c"
12502 break;
12503
12504 case 27: /* k_END: "'END'" lex_ctxt */
12505#line 3304 "parse.y"
12506 {
12507 if (p->ctxt.in_def) {
12508 rb_warn0("END in method; use at_exit");
12509 }
12510 (yyval.ctxt) = (yyvsp[0].ctxt);
12511 p->ctxt.in_rescue = before_rescue;
12512 /*% ripper: $:2 %*/
12513 }
12514#line 12515 "parse.c"
12515 break;
12516
12517 case 28: /* $@6: %empty */
12518#line 3313 "parse.y"
12519 {SET_LEX_STATE(EXPR_FNAME|EXPR_FITEM);}
12520#line 12521 "parse.c"
12521 break;
12522
12523 case 29: /* stmt: "'alias'" fitem $@6 fitem */
12524#line 3314 "parse.y"
12525 {
12526 (yyval.node) = NEW_ALIAS((yyvsp[-2].node), (yyvsp[0].node), &(yyloc), &(yylsp[-3]));
12527 /*% ripper: alias!($:new, $:old) %*/
12528 }
12529#line 12530 "parse.c"
12530 break;
12531
12532 case 30: /* stmt: "'alias'" "global variable" "global variable" */
12533#line 3319 "parse.y"
12534 {
12535 (yyval.node) = NEW_VALIAS((yyvsp[-1].id), (yyvsp[0].id), &(yyloc), &(yylsp[-2]));
12536 /*% ripper: var_alias!($:new, $:old) %*/
12537 }
12538#line 12539 "parse.c"
12539 break;
12540
12541 case 31: /* stmt: "'alias'" "global variable" "back reference" */
12542#line 3324 "parse.y"
12543 {
12544 char buf[2];
12545 buf[0] = '$';
12546 buf[1] = (char)RNODE_BACK_REF((yyvsp[0].node))->nd_nth;
12547 (yyval.node) = NEW_VALIAS((yyvsp[-1].id), rb_intern2(buf, 2), &(yyloc), &(yylsp[-2]));
12548 /*% ripper: var_alias!($:new, $:old) %*/
12549 }
12550#line 12551 "parse.c"
12551 break;
12552
12553 case 32: /* stmt: "'alias'" "global variable" "numbered reference" */
12554#line 3332 "parse.y"
12555 {
12556 static const char mesg[] = "can't make alias for the number variables";
12557 /*%%%*/
12558 yyerror1(&(yylsp[0]), mesg);
12559 /*% %*/
12560 (yyval.node) = NEW_ERROR(&(yyloc));
12561 /*% ripper[error]: alias_error!(ERR_MESG(), $:nth) %*/
12562 }
12563#line 12564 "parse.c"
12564 break;
12565
12566 case 33: /* stmt: "'undef'" undef_list */
12567#line 3341 "parse.y"
12568 {
12569 nd_set_first_loc((yyvsp[0].node), (yylsp[-1]).beg_pos);
12570 RNODE_UNDEF((yyvsp[0].node))->keyword_loc = (yylsp[-1]);
12571 (yyval.node) = (yyvsp[0].node);
12572 /*% ripper: undef!($:list) %*/
12573 }
12574#line 12575 "parse.c"
12575 break;
12576
12577 case 34: /* stmt: stmt "'if' modifier" expr_value */
12578#line 3348 "parse.y"
12579 {
12580 (yyval.node) = new_if(p, (yyvsp[0].node), remove_begin((yyvsp[-2].node)), 0, &(yyloc), &(yylsp[-1]), &NULL_LOC, &NULL_LOC);
12581 fixpos((yyval.node), (yyvsp[0].node));
12582 /*% ripper: if_mod!($:cond, $:body) %*/
12583 }
12584#line 12585 "parse.c"
12585 break;
12586
12587 case 35: /* stmt: stmt "'unless' modifier" expr_value */
12588#line 3354 "parse.y"
12589 {
12590 (yyval.node) = new_unless(p, (yyvsp[0].node), remove_begin((yyvsp[-2].node)), 0, &(yyloc), &(yylsp[-1]), &NULL_LOC, &NULL_LOC);
12591 fixpos((yyval.node), (yyvsp[0].node));
12592 /*% ripper: unless_mod!($:cond, $:body) %*/
12593 }
12594#line 12595 "parse.c"
12595 break;
12596
12597 case 36: /* stmt: stmt "'while' modifier" expr_value */
12598#line 3360 "parse.y"
12599 {
12600 clear_block_exit(p, false);
12601 if ((yyvsp[-2].node) && nd_type_p((yyvsp[-2].node), NODE_BEGIN)) {
12602 (yyval.node) = NEW_WHILE(cond(p, (yyvsp[0].node), &(yylsp[0])), RNODE_BEGIN((yyvsp[-2].node))->nd_body, 0, &(yyloc), &(yylsp[-1]), &NULL_LOC);
12603 }
12604 else {
12605 (yyval.node) = NEW_WHILE(cond(p, (yyvsp[0].node), &(yylsp[0])), (yyvsp[-2].node), 1, &(yyloc), &(yylsp[-1]), &NULL_LOC);
12606 }
12607 /*% ripper: while_mod!($:cond_expr, $:body) %*/
12608 }
12609#line 12610 "parse.c"
12610 break;
12611
12612 case 37: /* stmt: stmt "'until' modifier" expr_value */
12613#line 3371 "parse.y"
12614 {
12615 clear_block_exit(p, 0);
12616 if ((yyvsp[-2].node) && nd_type_p((yyvsp[-2].node), NODE_BEGIN)) {
12617 (yyval.node) = NEW_UNTIL(cond(p, (yyvsp[0].node), &(yylsp[0])), RNODE_BEGIN((yyvsp[-2].node))->nd_body, 0, &(yyloc), &(yylsp[-1]), &NULL_LOC);
12618 }
12619 else {
12620 (yyval.node) = NEW_UNTIL(cond(p, (yyvsp[0].node), &(yylsp[0])), (yyvsp[-2].node), 1, &(yyloc), &(yylsp[-1]), &NULL_LOC);
12621 }
12622 /*% ripper: until_mod!($:cond_expr, $:body) %*/
12623 }
12624#line 12625 "parse.c"
12625 break;
12626
12627 case 38: /* stmt: stmt "'rescue' modifier" after_rescue stmt */
12628#line 3382 "parse.y"
12629 {
12630 p->ctxt.in_rescue = (yyvsp[-1].ctxt).in_rescue;
12631 NODE *resq;
12632 YYLTYPE loc = code_loc_gen(&(yylsp[-2]), &(yylsp[0]));
12633 resq = NEW_RESBODY(0, 0, remove_begin((yyvsp[0].node)), 0, &loc);
12634 (yyval.node) = NEW_RESCUE(remove_begin((yyvsp[-3].node)), resq, 0, &(yyloc));
12635 /*% ripper: rescue_mod!($:body, $:resbody) %*/
12636 }
12637#line 12638 "parse.c"
12638 break;
12639
12640 case 39: /* stmt: k_END block_open compstmt_stmts '}' */
12641#line 3391 "parse.y"
12642 {
12643 clear_block_exit(p, true);
12644 restore_block_exit(p, (yyvsp[-2].node_exits));
12645 p->ctxt = (yyvsp[-3].ctxt);
12646 {
12647 NODE *scope = NEW_SCOPE2(0 /* tbl */, 0 /* args */, (yyvsp[-1].node) /* body */, NULL /* parent */, &(yyloc));
12648 (yyval.node) = NEW_POSTEXE(scope, &(yyloc), &(yylsp[-3]), &(yylsp[-2]), &(yylsp[0]));
12649 RNODE_SCOPE(scope)->nd_parent = (yyval.node);
12650 }
12651 /*% ripper: END!($:body) %*/
12652 }
12653#line 12654 "parse.c"
12654 break;
12655
12656 case 41: /* stmt: mlhs '=' lex_ctxt command_call_value */
12657#line 3404 "parse.y"
12658 {
12659 (yyval.node) = node_assign(p, (NODE *)(yyvsp[-3].node_masgn), (yyvsp[0].node), (yyvsp[-1].ctxt), &(yyloc));
12660 /*% ripper: massign!($:lhs, $:rhs) %*/
12661 }
12662#line 12663 "parse.c"
12663 break;
12664
12665 case 42: /* asgn_mrhs: lhs '=' lex_ctxt mrhs */
12666#line 2926 "parse.y"
12667 {
12668 (yyval.node) = node_assign(p, (NODE *)(yyvsp[-3].node), (yyvsp[0].node), (yyvsp[-1].ctxt), &(yyloc));
12669 /*% ripper: assign!($:1, $:4) %*/
12670 }
12671#line 12672 "parse.c"
12672 break;
12673
12674 case 44: /* stmt: mlhs '=' lex_ctxt mrhs_arg "'rescue' modifier" after_rescue stmt */
12675#line 3411 "parse.y"
12676 {
12677 p->ctxt.in_rescue = (yyvsp[-1].ctxt).in_rescue;
12678 YYLTYPE loc = code_loc_gen(&(yylsp[-2]), &(yylsp[0]));
12679 (yyvsp[0].node) = NEW_RESBODY(0, 0, remove_begin((yyvsp[0].node)), 0, &loc);
12680 loc.beg_pos = (yylsp[-3]).beg_pos;
12681 (yyvsp[-3].node) = NEW_RESCUE((yyvsp[-3].node), (yyvsp[0].node), 0, &loc);
12682 (yyval.node) = node_assign(p, (NODE *)(yyvsp[-6].node_masgn), (yyvsp[-3].node), (yyvsp[-4].ctxt), &(yyloc));
12683 /*% ripper: massign!($:lhs, rescue_mod!($:mrhs_arg, $:resbody)) %*/
12684 }
12685#line 12686 "parse.c"
12686 break;
12687
12688 case 45: /* stmt: mlhs '=' lex_ctxt mrhs_arg */
12689#line 3421 "parse.y"
12690 {
12691 (yyval.node) = node_assign(p, (NODE *)(yyvsp[-3].node_masgn), (yyvsp[0].node), (yyvsp[-1].ctxt), &(yyloc));
12692 /*% ripper: massign!($:lhs, $:rhs) %*/
12693 }
12694#line 12695 "parse.c"
12695 break;
12696
12697 case 47: /* stmt: error */
12698#line 3427 "parse.y"
12699 {
12700 (void)yynerrs;
12701 (yyval.node) = NEW_ERROR(&(yyloc));
12702 }
12703#line 12704 "parse.c"
12704 break;
12705
12706 case 48: /* asgn_command_rhs: lhs '=' lex_ctxt command_rhs */
12707#line 2926 "parse.y"
12708 {
12709 (yyval.node) = node_assign(p, (NODE *)(yyvsp[-3].node), (yyvsp[0].node), (yyvsp[-1].ctxt), &(yyloc));
12710 /*% ripper: assign!($:1, $:4) %*/
12711 }
12712#line 12713 "parse.c"
12713 break;
12714
12715 case 50: /* op_asgn_command_rhs: var_lhs "operator-assignment" lex_ctxt command_rhs */
12716#line 3061 "parse.y"
12717 {
12718 (yyval.node) = new_op_assign(p, (yyvsp[-3].node), (yyvsp[-2].id), (yyvsp[0].node), (yyvsp[-1].ctxt), &(yyloc));
12719 /*% ripper: opassign!($:var_lhs, $:tOP_ASGN, $:rhs) %*/
12720 }
12721#line 12722 "parse.c"
12722 break;
12723
12724 case 51: /* op_asgn_command_rhs: primary_value '[' opt_call_args rbracket "operator-assignment" lex_ctxt command_rhs */
12725#line 3066 "parse.y"
12726 {
12727 (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]));
12728 /*% ripper: opassign!(aref_field!($:primary_value, $:opt_call_args), $:tOP_ASGN, $:rhs) %*/
12729 }
12730#line 12731 "parse.c"
12731 break;
12732
12733 case 52: /* op_asgn_command_rhs: primary_value call_op "local variable or method" "operator-assignment" lex_ctxt command_rhs */
12734#line 3071 "parse.y"
12735 {
12736 (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]));
12737 /*% ripper: opassign!(field!($:primary_value, $:call_op, $:tIDENTIFIER), $:tOP_ASGN, $:rhs) %*/
12738 }
12739#line 12740 "parse.c"
12740 break;
12741
12742 case 53: /* op_asgn_command_rhs: primary_value call_op "constant" "operator-assignment" lex_ctxt command_rhs */
12743#line 3076 "parse.y"
12744 {
12745 (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]));
12746 /*% ripper: opassign!(field!($:primary_value, $:call_op, $:tCONSTANT), $:tOP_ASGN, $:rhs) %*/
12747 }
12748#line 12749 "parse.c"
12749 break;
12750
12751 case 54: /* op_asgn_command_rhs: primary_value "::" "local variable or method" "operator-assignment" lex_ctxt command_rhs */
12752#line 3081 "parse.y"
12753 {
12754 (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]));
12755 /*% ripper: opassign!(field!($:primary_value, $:tCOLON2, $:tIDENTIFIER), $:tOP_ASGN, $:rhs) %*/
12756 }
12757#line 12758 "parse.c"
12758 break;
12759
12760 case 55: /* op_asgn_command_rhs: primary_value "::" "constant" "operator-assignment" lex_ctxt command_rhs */
12761#line 3086 "parse.y"
12762 {
12763 YYLTYPE loc = code_loc_gen(&(yylsp[-5]), &(yylsp[-3]));
12764 (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));
12765 /*% ripper: opassign!(const_path_field!($:primary_value, $:tCONSTANT), $:tOP_ASGN, $:rhs) %*/
12766 }
12767#line 12768 "parse.c"
12768 break;
12769
12770 case 56: /* op_asgn_command_rhs: ":: at EXPR_BEG" "constant" "operator-assignment" lex_ctxt command_rhs */
12771#line 3092 "parse.y"
12772 {
12773 YYLTYPE loc = code_loc_gen(&(yylsp[-4]), &(yylsp[-3]));
12774 (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));
12775 /*% ripper: opassign!(top_const_field!($:tCONSTANT), $:tOP_ASGN, $:rhs) %*/
12776 }
12777#line 12778 "parse.c"
12778 break;
12779
12780 case 57: /* op_asgn_command_rhs: backref "operator-assignment" lex_ctxt command_rhs */
12781#line 3098 "parse.y"
12782 {
12783 VALUE MAYBE_UNUSED(e) = rb_backref_error(p, (yyvsp[-3].node));
12784 (yyval.node) = NEW_ERROR(&(yyloc));
12785 /*% ripper[error]: assign_error!(?e, opassign!(var_field!($:backref), $:tOP_ASGN, $:rhs)) %*/
12786 }
12787#line 12788 "parse.c"
12788 break;
12789
12790 case 59: /* def_endless_method_endless_command: defn_head f_opt_paren_args '=' endless_command */
12791#line 2966 "parse.y"
12792 {
12793 endless_method_name(p, (yyvsp[-3].node_def_temp)->nd_mid, &(yylsp[-3]));
12794 restore_defun(p, (yyvsp[-3].node_def_temp));
12795 ((yyval.node) = (yyvsp[-3].node_def_temp)->nd_def)->nd_loc = (yyloc);
12796 (yyvsp[0].node) = new_scope_body(p, (yyvsp[-2].node_args), (yyvsp[0].node), (yyval.node), &(yyloc));
12797 RNODE_DEFN((yyval.node))->nd_defn = (yyvsp[0].node);
12798 /*% ripper: bodystmt!($:bodystmt, Qnil, Qnil, Qnil) %*/
12799 /*% ripper: def!($:head, $:args, $:$) %*/
12800 local_pop(p);
12801 }
12802#line 12803 "parse.c"
12803 break;
12804
12805 case 60: /* def_endless_method_endless_command: defs_head f_opt_paren_args '=' endless_command */
12806#line 2977 "parse.y"
12807 {
12808 endless_method_name(p, (yyvsp[-3].node_def_temp)->nd_mid, &(yylsp[-3]));
12809 restore_defun(p, (yyvsp[-3].node_def_temp));
12810 ((yyval.node) = (yyvsp[-3].node_def_temp)->nd_def)->nd_loc = (yyloc);
12811 (yyvsp[0].node) = new_scope_body(p, (yyvsp[-2].node_args), (yyvsp[0].node), (yyval.node), &(yyloc));
12812 RNODE_DEFS((yyval.node))->nd_defn = (yyvsp[0].node);
12813 /*% ripper: bodystmt!($:bodystmt, Qnil, Qnil, Qnil) %*/
12814 /*% ripper: defs!(*$:head[0..2], $:args, $:$) %*/
12815 local_pop(p);
12816 }
12817#line 12818 "parse.c"
12818 break;
12819
12820 case 63: /* endless_command: endless_command "'rescue' modifier" after_rescue arg */
12821#line 3440 "parse.y"
12822 {
12823 p->ctxt.in_rescue = (yyvsp[-1].ctxt).in_rescue;
12824 (yyval.node) = rescued_expr(p, (yyvsp[-3].node), (yyvsp[0].node), &(yylsp[-3]), &(yylsp[-2]), &(yylsp[0]));
12825 /*% ripper: rescue_mod!($:1, $:4) %*/
12826 }
12827#line 12828 "parse.c"
12828 break;
12829
12830 case 66: /* endless_command: "'not'" option_'\n' endless_command */
12831#line 3446 "parse.y"
12832 {
12833 (yyval.node) = call_uni_op(p, method_cond(p, (yyvsp[0].node), &(yylsp[0])), METHOD_NOT, &(yylsp[-2]), &(yyloc));
12834 /*% ripper: unary!(ID2VAL(idNOT), $:3) %*/
12835 }
12836#line 12837 "parse.c"
12837 break;
12838
12839 case 68: /* command_rhs: command_call_value "'rescue' modifier" after_rescue stmt */
12840#line 3454 "parse.y"
12841 {
12842 p->ctxt.in_rescue = (yyvsp[-1].ctxt).in_rescue;
12843 YYLTYPE loc = code_loc_gen(&(yylsp[-2]), &(yylsp[0]));
12844 (yyval.node) = NEW_RESCUE((yyvsp[-3].node), NEW_RESBODY(0, 0, remove_begin((yyvsp[0].node)), 0, &loc), 0, &(yyloc));
12845 /*% ripper: rescue_mod!($:1, $:4) %*/
12846 }
12847#line 12848 "parse.c"
12848 break;
12849
12850 case 71: /* expr: expr "'and'" expr */
12851#line 3465 "parse.y"
12852 {
12853 (yyval.node) = logop(p, idAND, (yyvsp[-2].node), (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
12854 /*% ripper: binary!($:left, ID2VAL(idAND), $:right) %*/
12855 }
12856#line 12857 "parse.c"
12857 break;
12858
12859 case 72: /* expr: expr "'or'" expr */
12860#line 3470 "parse.y"
12861 {
12862 (yyval.node) = logop(p, idOR, (yyvsp[-2].node), (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
12863 /*% ripper: binary!($:left, ID2VAL(idOR), $:right) %*/
12864 }
12865#line 12866 "parse.c"
12866 break;
12867
12868 case 73: /* expr: "'not'" option_'\n' expr */
12869#line 3475 "parse.y"
12870 {
12871 (yyval.node) = call_uni_op(p, method_cond(p, (yyvsp[0].node), &(yylsp[0])), METHOD_NOT, &(yylsp[-2]), &(yyloc));
12872 /*% ripper: unary!(ID2VAL(idNOT), $:arg) %*/
12873 }
12874#line 12875 "parse.c"
12875 break;
12876
12877 case 74: /* expr: '!' command_call */
12878#line 3480 "parse.y"
12879 {
12880 (yyval.node) = call_uni_op(p, method_cond(p, (yyvsp[0].node), &(yylsp[0])), '!', &(yylsp[-1]), &(yyloc));
12881 /*% ripper: unary!(ID2VAL('\'!\''), $:arg) %*/
12882 }
12883#line 12884 "parse.c"
12884 break;
12885
12886 case 75: /* $@7: %empty */
12887#line 3485 "parse.y"
12888 {
12889 value_expr(p, (yyvsp[-1].node));
12890 }
12891#line 12892 "parse.c"
12892 break;
12893
12894 case 76: /* expr: arg "=>" $@7 p_in_kwarg p_pvtbl p_pktbl p_top_expr_body */
12895#line 3490 "parse.y"
12896 {
12897 pop_pktbl(p, (yyvsp[-1].tbl));
12898 pop_pvtbl(p, (yyvsp[-2].tbl));
12899 p->ctxt.in_kwarg = (yyvsp[-3].ctxt).in_kwarg;
12900 p->ctxt.in_alt_pattern = (yyvsp[-3].ctxt).in_alt_pattern;
12901 p->ctxt.capture_in_pattern = (yyvsp[-3].ctxt).capture_in_pattern;
12902 (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);
12903 /*% ripper: case!($:arg, in!($:body, Qnil, Qnil)) %*/
12904 }
12905#line 12906 "parse.c"
12906 break;
12907
12908 case 77: /* $@8: %empty */
12909#line 3500 "parse.y"
12910 {
12911 value_expr(p, (yyvsp[-1].node));
12912 }
12913#line 12914 "parse.c"
12914 break;
12915
12916 case 78: /* expr: arg "'in'" $@8 p_in_kwarg p_pvtbl p_pktbl p_top_expr_body */
12917#line 3505 "parse.y"
12918 {
12919 pop_pktbl(p, (yyvsp[-1].tbl));
12920 pop_pvtbl(p, (yyvsp[-2].tbl));
12921 p->ctxt.in_kwarg = (yyvsp[-3].ctxt).in_kwarg;
12922 p->ctxt.in_alt_pattern = (yyvsp[-3].ctxt).in_alt_pattern;
12923 p->ctxt.capture_in_pattern = (yyvsp[-3].ctxt).capture_in_pattern;
12924 (yyval.node) = NEW_CASE3((yyvsp[-6].node), NEW_IN((yyvsp[0].node), NEW_TRUE(&(yylsp[0])), NEW_FALSE(&(yylsp[0])), &(yylsp[0]), &(yylsp[-5]), &NULL_LOC, &NULL_LOC), &(yyloc), &NULL_LOC, &NULL_LOC);
12925 /*% ripper: case!($:arg, in!($:body, Qnil, Qnil)) %*/
12926 }
12927#line 12928 "parse.c"
12928 break;
12929
12930 case 80: /* def_name: fname */
12931#line 3518 "parse.y"
12932 {
12933 numparam_name(p, (yyvsp[0].id));
12934 local_push(p, 0);
12935 p->ctxt.in_def = 1;
12936 p->ctxt.in_rescue = before_rescue;
12937 p->ctxt.cant_return = 0;
12938 (yyval.id) = (yyvsp[0].id);
12939 }
12940#line 12941 "parse.c"
12941 break;
12942
12943 case 81: /* defn_head: k_def def_name */
12944#line 3529 "parse.y"
12945 {
12946 (yyval.node_def_temp) = def_head_save(p, (yyvsp[-1].node_def_temp));
12947 (yyval.node_def_temp)->nd_mid = (yyvsp[0].id);
12948 (yyval.node_def_temp)->nd_def = NEW_DEFN((yyvsp[0].id), 0, &(yyloc));
12949 /*% ripper: $:def_name %*/
12950 }
12951#line 12952 "parse.c"
12952 break;
12953
12954 case 82: /* $@9: %empty */
12955#line 3538 "parse.y"
12956 {
12957 SET_LEX_STATE(EXPR_FNAME);
12958 }
12959#line 12960 "parse.c"
12960 break;
12961
12962 case 83: /* defs_head: k_def singleton dot_or_colon $@9 def_name */
12963#line 3542 "parse.y"
12964 {
12965 SET_LEX_STATE(EXPR_ENDFN|EXPR_LABEL); /* force for args */
12966 (yyval.node_def_temp) = def_head_save(p, (yyvsp[-4].node_def_temp));
12967 (yyval.node_def_temp)->nd_mid = (yyvsp[0].id);
12968 (yyval.node_def_temp)->nd_def = NEW_DEFS((yyvsp[-3].node), (yyvsp[0].id), 0, &(yyloc));
12969 /*% ripper: [$:singleton, $:dot_or_colon, $:def_name] %*/
12970 }
12971#line 12972 "parse.c"
12972 break;
12973
12974 case 84: /* value_expr_expr: expr */
12975#line 3161 "parse.y"
12976 {
12977 value_expr(p, (yyvsp[0].node));
12978 (yyval.node) = (yyvsp[0].node);
12979 }
12980#line 12981 "parse.c"
12981 break;
12982
12983 case 86: /* expr_value: error */
12984#line 3553 "parse.y"
12985 {
12986 (yyval.node) = NEW_ERROR(&(yyloc));
12987 }
12988#line 12989 "parse.c"
12989 break;
12990
12991 case 87: /* $@10: %empty */
12992#line 3558 "parse.y"
12993 {COND_PUSH(1);}
12994#line 12995 "parse.c"
12995 break;
12996
12997 case 88: /* $@11: %empty */
12998#line 3558 "parse.y"
12999 {COND_POP();}
13000#line 13001 "parse.c"
13001 break;
13002
13003 case 89: /* expr_value_do: $@10 expr_value do $@11 */
13004#line 3559 "parse.y"
13005 {
13006 (yyval.node) = (yyvsp[-2].node);
13007 /*% ripper: $:2 %*/
13008 }
13009#line 13010 "parse.c"
13010 break;
13011
13012 case 92: /* value_expr_command_call: command_call */
13013#line 3161 "parse.y"
13014 {
13015 value_expr(p, (yyvsp[0].node));
13016 (yyval.node) = (yyvsp[0].node);
13017 }
13018#line 13019 "parse.c"
13019 break;
13020
13021 case 95: /* block_command: block_call call_op2 operation2 command_args */
13022#line 3574 "parse.y"
13023 {
13024 (yyval.node) = new_qcall(p, (yyvsp[-2].id), (yyvsp[-3].node), (yyvsp[-1].id), (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
13025 /*% ripper: method_add_arg!(call!($:1, $:2, $:3), $:4) %*/
13026 }
13027#line 13028 "parse.c"
13028 break;
13029
13030 case 96: /* cmd_brace_block: "{ arg" brace_body '}' */
13031#line 3581 "parse.y"
13032 {
13033 (yyval.node) = (yyvsp[-1].node);
13034 set_embraced_location((yyval.node), &(yylsp[-2]), &(yylsp[0]));
13035 /*% ripper: $:2 %*/
13036 }
13037#line 13038 "parse.c"
13038 break;
13039
13040 case 97: /* fcall: "local variable or method" */
13041#line 3589 "parse.y"
13042 {
13043 (yyval.node_fcall) = NEW_FCALL((yyvsp[0].id), 0, &(yyloc));
13044 /*% ripper: $:1 %*/
13045 }
13046#line 13047 "parse.c"
13047 break;
13048
13049 case 98: /* fcall: "constant" */
13050#line 3589 "parse.y"
13051 {
13052 (yyval.node_fcall) = NEW_FCALL((yyvsp[0].id), 0, &(yyloc));
13053 /*% ripper: $:1 %*/
13054 }
13055#line 13056 "parse.c"
13056 break;
13057
13058 case 99: /* fcall: "method" */
13059#line 3589 "parse.y"
13060 {
13061 (yyval.node_fcall) = NEW_FCALL((yyvsp[0].id), 0, &(yyloc));
13062 /*% ripper: $:1 %*/
13063 }
13064#line 13065 "parse.c"
13065 break;
13066
13067 case 100: /* command: fcall command_args */
13068#line 3596 "parse.y"
13069 {
13070 (yyvsp[-1].node_fcall)->nd_args = (yyvsp[0].node);
13071 nd_set_last_loc((yyvsp[-1].node_fcall), (yylsp[0]).end_pos);
13072 (yyval.node) = (NODE *)(yyvsp[-1].node_fcall);
13073 /*% ripper: command!($:1, $:2) %*/
13074 }
13075#line 13076 "parse.c"
13076 break;
13077
13078 case 101: /* command: fcall command_args cmd_brace_block */
13079#line 3603 "parse.y"
13080 {
13081 block_dup_check(p, (yyvsp[-1].node), (yyvsp[0].node));
13082 (yyvsp[-2].node_fcall)->nd_args = (yyvsp[-1].node);
13083 (yyval.node) = method_add_block(p, (NODE *)(yyvsp[-2].node_fcall), (yyvsp[0].node), &(yyloc));
13084 fixpos((yyval.node), RNODE((yyvsp[-2].node_fcall)));
13085 nd_set_last_loc((yyvsp[-2].node_fcall), (yylsp[-1]).end_pos);
13086 /*% ripper: method_add_block!(command!($:1, $:2), $:3) %*/
13087 }
13088#line 13089 "parse.c"
13089 break;
13090
13091 case 102: /* command: primary_value call_op operation2 command_args */
13092#line 3612 "parse.y"
13093 {
13094 (yyval.node) = new_command_qcall(p, (yyvsp[-2].id), (yyvsp[-3].node), (yyvsp[-1].id), (yyvsp[0].node), 0, &(yylsp[-1]), &(yyloc));
13095 /*% ripper: command_call!($:1, $:2, $:3, $:4) %*/
13096 }
13097#line 13098 "parse.c"
13098 break;
13099
13100 case 103: /* command: primary_value call_op operation2 command_args cmd_brace_block */
13101#line 3617 "parse.y"
13102 {
13103 (yyval.node) = new_command_qcall(p, (yyvsp[-3].id), (yyvsp[-4].node), (yyvsp[-2].id), (yyvsp[-1].node), (yyvsp[0].node), &(yylsp[-2]), &(yyloc));
13104 /*% ripper: method_add_block!(command_call!($:1, $:2, $:3, $:4), $:5) %*/
13105 }
13106#line 13107 "parse.c"
13107 break;
13108
13109 case 104: /* command: primary_value "::" operation2 command_args */
13110#line 3622 "parse.y"
13111 {
13112 (yyval.node) = new_command_qcall(p, idCOLON2, (yyvsp[-3].node), (yyvsp[-1].id), (yyvsp[0].node), 0, &(yylsp[-1]), &(yyloc));
13113 /*% ripper: command_call!($:1, $:2, $:3, $:4) %*/
13114 }
13115#line 13116 "parse.c"
13116 break;
13117
13118 case 105: /* command: primary_value "::" operation2 command_args cmd_brace_block */
13119#line 3627 "parse.y"
13120 {
13121 (yyval.node) = new_command_qcall(p, idCOLON2, (yyvsp[-4].node), (yyvsp[-2].id), (yyvsp[-1].node), (yyvsp[0].node), &(yylsp[-2]), &(yyloc));
13122 /*% ripper: method_add_block!(command_call!($:1, $:2, $:3, $:4), $:5) %*/
13123 }
13124#line 13125 "parse.c"
13125 break;
13126
13127 case 106: /* command: primary_value "::" "constant" '{' brace_body '}' */
13128#line 3632 "parse.y"
13129 {
13130 set_embraced_location((yyvsp[-1].node), &(yylsp[-2]), &(yylsp[0]));
13131 (yyval.node) = new_command_qcall(p, idCOLON2, (yyvsp[-5].node), (yyvsp[-3].id), 0, (yyvsp[-1].node), &(yylsp[-3]), &(yyloc));
13132 /*% ripper: method_add_block!(command_call!($:1, $:2, $:3, Qnil), $:5) %*/
13133 }
13134#line 13135 "parse.c"
13135 break;
13136
13137 case 107: /* command: "'super'" command_args */
13138#line 3638 "parse.y"
13139 {
13140 (yyval.node) = NEW_SUPER((yyvsp[0].node), &(yyloc), &(yylsp[-1]), &NULL_LOC, &NULL_LOC);
13141 fixpos((yyval.node), (yyvsp[0].node));
13142 /*% ripper: super!($:2) %*/
13143 }
13144#line 13145 "parse.c"
13145 break;
13146
13147 case 108: /* command: k_yield command_args */
13148#line 3644 "parse.y"
13149 {
13150 (yyval.node) = NEW_YIELD((yyvsp[0].node), &(yyloc), &(yylsp[-1]), &NULL_LOC, &NULL_LOC);
13151 fixpos((yyval.node), (yyvsp[0].node));
13152 /*% ripper: yield!($:2) %*/
13153 }
13154#line 13155 "parse.c"
13155 break;
13156
13157 case 109: /* command: k_return call_args */
13158#line 3650 "parse.y"
13159 {
13160 (yyval.node) = NEW_RETURN(ret_args(p, (yyvsp[0].node)), &(yyloc), &(yylsp[-1]));
13161 /*% ripper: return!($:2) %*/
13162 }
13163#line 13164 "parse.c"
13164 break;
13165
13166 case 110: /* command: "'break'" call_args */
13167#line 3655 "parse.y"
13168 {
13169 NODE *args = 0;
13170 args = ret_args(p, (yyvsp[0].node));
13171 (yyval.node) = add_block_exit(p, NEW_BREAK(args, &(yyloc), &(yylsp[-1])));
13172 /*% ripper: break!($:2) %*/
13173 }
13174#line 13175 "parse.c"
13175 break;
13176
13177 case 111: /* command: "'next'" call_args */
13178#line 3662 "parse.y"
13179 {
13180 NODE *args = 0;
13181 args = ret_args(p, (yyvsp[0].node));
13182 (yyval.node) = add_block_exit(p, NEW_NEXT(args, &(yyloc), &(yylsp[-1])));
13183 /*% ripper: next!($:2) %*/
13184 }
13185#line 13186 "parse.c"
13186 break;
13187
13188 case 113: /* mlhs: "(" mlhs_inner rparen */
13189#line 3672 "parse.y"
13190 {
13191 (yyval.node_masgn) = (yyvsp[-1].node_masgn);
13192 /*% ripper: mlhs_paren!($:2) %*/
13193 }
13194#line 13195 "parse.c"
13195 break;
13196
13197 case 115: /* mlhs_inner: "(" mlhs_inner rparen */
13198#line 3680 "parse.y"
13199 {
13200 (yyval.node_masgn) = NEW_MASGN(NEW_LIST((NODE *)(yyvsp[-1].node_masgn), &(yyloc)), 0, &(yyloc));
13201 /*% ripper: mlhs_paren!($:2) %*/
13202 }
13203#line 13204 "parse.c"
13204 break;
13205
13206 case 116: /* mlhs_basic: mlhs_head */
13207#line 3687 "parse.y"
13208 {
13209 (yyval.node_masgn) = NEW_MASGN((yyvsp[0].node), 0, &(yyloc));
13210 /*% ripper: $:1 %*/
13211 }
13212#line 13213 "parse.c"
13213 break;
13214
13215 case 117: /* mlhs_basic: mlhs_head mlhs_item */
13216#line 3692 "parse.y"
13217 {
13218 (yyval.node_masgn) = NEW_MASGN(list_append(p, (yyvsp[-1].node), (yyvsp[0].node)), 0, &(yyloc));
13219 /*% ripper: mlhs_add!($:1, $:2) %*/
13220 }
13221#line 13222 "parse.c"
13222 break;
13223
13224 case 118: /* mlhs_basic: mlhs_head "*" mlhs_node */
13225#line 3697 "parse.y"
13226 {
13227 (yyval.node_masgn) = NEW_MASGN((yyvsp[-2].node), (yyvsp[0].node), &(yyloc));
13228 /*% ripper: mlhs_add_star!($:1, $:3) %*/
13229 }
13230#line 13231 "parse.c"
13231 break;
13232
13233 case 119: /* mlhs_items_mlhs_item: mlhs_item */
13234#line 3048 "parse.y"
13235 {
13236 (yyval.node) = NEW_LIST((yyvsp[0].node), &(yyloc));
13237 /*% ripper: mlhs_add!(mlhs_new!, $:1) %*/
13238 }
13239#line 13240 "parse.c"
13240 break;
13241
13242 case 120: /* mlhs_items_mlhs_item: mlhs_items_mlhs_item ',' mlhs_item */
13243#line 3053 "parse.y"
13244 {
13245 (yyval.node) = list_append(p, (yyvsp[-2].node), (yyvsp[0].node));
13246 /*% ripper: mlhs_add!($:1, $:3) %*/
13247 }
13248#line 13249 "parse.c"
13249 break;
13250
13251 case 121: /* mlhs_basic: mlhs_head "*" mlhs_node ',' mlhs_items_mlhs_item */
13252#line 3702 "parse.y"
13253 {
13254 (yyval.node_masgn) = NEW_MASGN((yyvsp[-4].node), NEW_POSTARG((yyvsp[-2].node),(yyvsp[0].node),&(yyloc)), &(yyloc));
13255 /*% ripper: mlhs_add_post!(mlhs_add_star!($:1, $:3), $:5) %*/
13256 }
13257#line 13258 "parse.c"
13258 break;
13259
13260 case 122: /* mlhs_basic: mlhs_head "*" */
13261#line 3707 "parse.y"
13262 {
13263 (yyval.node_masgn) = NEW_MASGN((yyvsp[-1].node), NODE_SPECIAL_NO_NAME_REST, &(yyloc));
13264 /*% ripper: mlhs_add_star!($:1, Qnil) %*/
13265 }
13266#line 13267 "parse.c"
13267 break;
13268
13269 case 123: /* mlhs_basic: mlhs_head "*" ',' mlhs_items_mlhs_item */
13270#line 3712 "parse.y"
13271 {
13272 (yyval.node_masgn) = NEW_MASGN((yyvsp[-3].node), NEW_POSTARG(NODE_SPECIAL_NO_NAME_REST, (yyvsp[0].node), &(yyloc)), &(yyloc));
13273 /*% ripper: mlhs_add_post!(mlhs_add_star!($:1, Qnil), $:4) %*/
13274 }
13275#line 13276 "parse.c"
13276 break;
13277
13278 case 124: /* mlhs_basic: "*" mlhs_node */
13279#line 3717 "parse.y"
13280 {
13281 (yyval.node_masgn) = NEW_MASGN(0, (yyvsp[0].node), &(yyloc));
13282 /*% ripper: mlhs_add_star!(mlhs_new!, $:2) %*/
13283 }
13284#line 13285 "parse.c"
13285 break;
13286
13287 case 125: /* mlhs_basic: "*" mlhs_node ',' mlhs_items_mlhs_item */
13288#line 3722 "parse.y"
13289 {
13290 (yyval.node_masgn) = NEW_MASGN(0, NEW_POSTARG((yyvsp[-2].node),(yyvsp[0].node),&(yyloc)), &(yyloc));
13291 /*% ripper: mlhs_add_post!(mlhs_add_star!(mlhs_new!, $:2), $:4) %*/
13292 }
13293#line 13294 "parse.c"
13294 break;
13295
13296 case 126: /* mlhs_basic: "*" */
13297#line 3727 "parse.y"
13298 {
13299 (yyval.node_masgn) = NEW_MASGN(0, NODE_SPECIAL_NO_NAME_REST, &(yyloc));
13300 /*% ripper: mlhs_add_star!(mlhs_new!, Qnil) %*/
13301 }
13302#line 13303 "parse.c"
13303 break;
13304
13305 case 127: /* mlhs_basic: "*" ',' mlhs_items_mlhs_item */
13306#line 3732 "parse.y"
13307 {
13308 (yyval.node_masgn) = NEW_MASGN(0, NEW_POSTARG(NODE_SPECIAL_NO_NAME_REST, (yyvsp[0].node), &(yyloc)), &(yyloc));
13309 /*% ripper: mlhs_add_post!(mlhs_add_star!(mlhs_new!, Qnil), $:3) %*/
13310 }
13311#line 13312 "parse.c"
13312 break;
13313
13314 case 129: /* mlhs_item: "(" mlhs_inner rparen */
13315#line 3740 "parse.y"
13316 {
13317 (yyval.node) = (NODE *)(yyvsp[-1].node_masgn);
13318 /*% ripper: mlhs_paren!($:2) %*/
13319 }
13320#line 13321 "parse.c"
13321 break;
13322
13323 case 130: /* mlhs_head: mlhs_item ',' */
13324#line 3747 "parse.y"
13325 {
13326 (yyval.node) = NEW_LIST((yyvsp[-1].node), &(yylsp[-1]));
13327 /*% ripper: mlhs_add!(mlhs_new!, $:1) %*/
13328 }
13329#line 13330 "parse.c"
13330 break;
13331
13332 case 131: /* mlhs_head: mlhs_head mlhs_item ',' */
13333#line 3752 "parse.y"
13334 {
13335 (yyval.node) = list_append(p, (yyvsp[-2].node), (yyvsp[-1].node));
13336 /*% ripper: mlhs_add!($:1, $:2) %*/
13337 }
13338#line 13339 "parse.c"
13339 break;
13340
13341 case 132: /* mlhs_node: user_variable */
13342#line 3760 "parse.y"
13343 {
13344 /*% ripper: var_field!($:1) %*/
13345 (yyval.node) = assignable(p, (yyvsp[0].id), 0, &(yyloc));
13346 }
13347#line 13348 "parse.c"
13348 break;
13349
13350 case 133: /* mlhs_node: keyword_variable */
13351#line 3760 "parse.y"
13352 {
13353 /*% ripper: var_field!($:1) %*/
13354 (yyval.node) = assignable(p, (yyvsp[0].id), 0, &(yyloc));
13355 }
13356#line 13357 "parse.c"
13357 break;
13358
13359 case 134: /* mlhs_node: primary_value '[' opt_call_args rbracket */
13360#line 3765 "parse.y"
13361 {
13362 (yyval.node) = aryset(p, (yyvsp[-3].node), (yyvsp[-1].node), &(yyloc));
13363 /*% ripper: aref_field!($:1, $:3) %*/
13364 }
13365#line 13366 "parse.c"
13366 break;
13367
13368 case 135: /* mlhs_node: primary_value call_op "local variable or method" */
13369#line 3770 "parse.y"
13370 {
13371 anddot_multiple_assignment_check(p, &(yylsp[-1]), (yyvsp[-1].id));
13372 (yyval.node) = attrset(p, (yyvsp[-2].node), (yyvsp[-1].id), (yyvsp[0].id), &(yyloc));
13373 /*% ripper: field!($:1, $:2, $:3) %*/
13374 }
13375#line 13376 "parse.c"
13376 break;
13377
13378 case 136: /* mlhs_node: primary_value call_op "constant" */
13379#line 3770 "parse.y"
13380 {
13381 anddot_multiple_assignment_check(p, &(yylsp[-1]), (yyvsp[-1].id));
13382 (yyval.node) = attrset(p, (yyvsp[-2].node), (yyvsp[-1].id), (yyvsp[0].id), &(yyloc));
13383 /*% ripper: field!($:1, $:2, $:3) %*/
13384 }
13385#line 13386 "parse.c"
13386 break;
13387
13388 case 137: /* mlhs_node: primary_value "::" "local variable or method" */
13389#line 3776 "parse.y"
13390 {
13391 (yyval.node) = attrset(p, (yyvsp[-2].node), idCOLON2, (yyvsp[0].id), &(yyloc));
13392 /*% ripper: const_path_field!($:1, $:3) %*/
13393 }
13394#line 13395 "parse.c"
13395 break;
13396
13397 case 138: /* mlhs_node: primary_value "::" "constant" */
13398#line 3781 "parse.y"
13399 {
13400 /*% ripper: const_path_field!($:1, $:3) %*/
13401 (yyval.node) = const_decl(p, NEW_COLON2((yyvsp[-2].node), (yyvsp[0].id), &(yyloc), &(yylsp[-1]), &(yylsp[0])), &(yyloc));
13402 }
13403#line 13404 "parse.c"
13404 break;
13405
13406 case 139: /* mlhs_node: ":: at EXPR_BEG" "constant" */
13407#line 3786 "parse.y"
13408 {
13409 /*% ripper: top_const_field!($:2) %*/
13410 (yyval.node) = const_decl(p, NEW_COLON3((yyvsp[0].id), &(yyloc), &(yylsp[-1]), &(yylsp[0])), &(yyloc));
13411 }
13412#line 13413 "parse.c"
13413 break;
13414
13415 case 140: /* mlhs_node: backref */
13416#line 3791 "parse.y"
13417 {
13418 VALUE MAYBE_UNUSED(e) = rb_backref_error(p, (yyvsp[0].node));
13419 (yyval.node) = NEW_ERROR(&(yyloc));
13420 /*% ripper[error]: assign_error!(?e, var_field!($:1)) %*/
13421 }
13422#line 13423 "parse.c"
13423 break;
13424
13425 case 141: /* lhs: user_variable */
13426#line 3799 "parse.y"
13427 {
13428 /*% ripper: var_field!($:1) %*/
13429 (yyval.node) = assignable(p, (yyvsp[0].id), 0, &(yyloc));
13430 }
13431#line 13432 "parse.c"
13432 break;
13433
13434 case 142: /* lhs: keyword_variable */
13435#line 3799 "parse.y"
13436 {
13437 /*% ripper: var_field!($:1) %*/
13438 (yyval.node) = assignable(p, (yyvsp[0].id), 0, &(yyloc));
13439 }
13440#line 13441 "parse.c"
13441 break;
13442
13443 case 143: /* lhs: primary_value '[' opt_call_args rbracket */
13444#line 3804 "parse.y"
13445 {
13446 (yyval.node) = aryset(p, (yyvsp[-3].node), (yyvsp[-1].node), &(yyloc));
13447 /*% ripper: aref_field!($:1, $:3) %*/
13448 }
13449#line 13450 "parse.c"
13450 break;
13451
13452 case 144: /* lhs: primary_value call_op "local variable or method" */
13453#line 3809 "parse.y"
13454 {
13455 (yyval.node) = attrset(p, (yyvsp[-2].node), (yyvsp[-1].id), (yyvsp[0].id), &(yyloc));
13456 /*% ripper: field!($:1, $:2, $:3) %*/
13457 }
13458#line 13459 "parse.c"
13459 break;
13460
13461 case 145: /* lhs: primary_value call_op "constant" */
13462#line 3809 "parse.y"
13463 {
13464 (yyval.node) = attrset(p, (yyvsp[-2].node), (yyvsp[-1].id), (yyvsp[0].id), &(yyloc));
13465 /*% ripper: field!($:1, $:2, $:3) %*/
13466 }
13467#line 13468 "parse.c"
13468 break;
13469
13470 case 146: /* lhs: primary_value "::" "local variable or method" */
13471#line 3814 "parse.y"
13472 {
13473 (yyval.node) = attrset(p, (yyvsp[-2].node), idCOLON2, (yyvsp[0].id), &(yyloc));
13474 /*% ripper: field!($:1, $:2, $:3) %*/
13475 }
13476#line 13477 "parse.c"
13477 break;
13478
13479 case 147: /* lhs: primary_value "::" "constant" */
13480#line 3819 "parse.y"
13481 {
13482 /*% ripper: const_path_field!($:1, $:3) %*/
13483 (yyval.node) = const_decl(p, NEW_COLON2((yyvsp[-2].node), (yyvsp[0].id), &(yyloc), &(yylsp[-1]), &(yylsp[0])), &(yyloc));
13484 }
13485#line 13486 "parse.c"
13486 break;
13487
13488 case 148: /* lhs: ":: at EXPR_BEG" "constant" */
13489#line 3824 "parse.y"
13490 {
13491 /*% ripper: top_const_field!($:2) %*/
13492 (yyval.node) = const_decl(p, NEW_COLON3((yyvsp[0].id), &(yyloc), &(yylsp[-1]), &(yylsp[0])), &(yyloc));
13493 }
13494#line 13495 "parse.c"
13495 break;
13496
13497 case 149: /* lhs: backref */
13498#line 3829 "parse.y"
13499 {
13500 VALUE MAYBE_UNUSED(e) = rb_backref_error(p, (yyvsp[0].node));
13501 (yyval.node) = NEW_ERROR(&(yyloc));
13502 /*% ripper[error]: assign_error!(?e, var_field!($:1)) %*/
13503 }
13504#line 13505 "parse.c"
13505 break;
13506
13507 case 150: /* cname: "local variable or method" */
13508#line 3837 "parse.y"
13509 {
13510 static const char mesg[] = "class/module name must be CONSTANT";
13511 /*%%%*/
13512 yyerror1(&(yylsp[0]), mesg);
13513 /*% %*/
13514 /*% ripper[error]: class_name_error!(ERR_MESG(), $:1) %*/
13515 }
13516#line 13517 "parse.c"
13517 break;
13518
13519 case 152: /* cpath: ":: at EXPR_BEG" cname */
13520#line 3848 "parse.y"
13521 {
13522 (yyval.node) = NEW_COLON3((yyvsp[0].id), &(yyloc), &(yylsp[-1]), &(yylsp[0]));
13523 /*% ripper: top_const_ref!($:2) %*/
13524 }
13525#line 13526 "parse.c"
13526 break;
13527
13528 case 153: /* cpath: cname */
13529#line 3853 "parse.y"
13530 {
13531 (yyval.node) = NEW_COLON2(0, (yyvsp[0].id), &(yyloc), &NULL_LOC, &(yylsp[0]));
13532 /*% ripper: const_ref!($:1) %*/
13533 }
13534#line 13535 "parse.c"
13535 break;
13536
13537 case 154: /* cpath: primary_value "::" cname */
13538#line 3858 "parse.y"
13539 {
13540 (yyval.node) = NEW_COLON2((yyvsp[-2].node), (yyvsp[0].id), &(yyloc), &(yylsp[-1]), &(yylsp[0]));
13541 /*% ripper: const_path_ref!($:1, $:3) %*/
13542 }
13543#line 13544 "parse.c"
13544 break;
13545
13546 case 158: /* fname: op */
13547#line 3866 "parse.y"
13548 {
13549 SET_LEX_STATE(EXPR_ENDFN);
13550 (yyval.id) = (yyvsp[0].id);
13551 }
13552#line 13553 "parse.c"
13553 break;
13554
13555 case 160: /* fitem: fname */
13556#line 3874 "parse.y"
13557 {
13558 (yyval.node) = NEW_SYM(rb_id2str((yyvsp[0].id)), &(yyloc));
13559 /*% ripper: symbol_literal!($:1) %*/
13560 }
13561#line 13562 "parse.c"
13562 break;
13563
13564 case 162: /* undef_list: fitem */
13565#line 3882 "parse.y"
13566 {
13567 (yyval.node) = NEW_UNDEF((yyvsp[0].node), &(yyloc));
13568 /*% ripper: rb_ary_new3(1, $:1) %*/
13569 }
13570#line 13571 "parse.c"
13571 break;
13572
13573 case 163: /* $@12: %empty */
13574#line 3886 "parse.y"
13575 {SET_LEX_STATE(EXPR_FNAME|EXPR_FITEM);}
13576#line 13577 "parse.c"
13577 break;
13578
13579 case 164: /* undef_list: undef_list ',' $@12 fitem */
13580#line 3887 "parse.y"
13581 {
13582 nd_set_last_loc((yyvsp[-3].node), (yylsp[0]).end_pos);
13583 rb_parser_ary_push_node(p, RNODE_UNDEF((yyvsp[-3].node))->nd_undefs, (yyvsp[0].node));
13584 /*% ripper: rb_ary_push($:1, $:4) %*/
13585 }
13586#line 13587 "parse.c"
13587 break;
13588
13589 case 165: /* op: '|' */
13590#line 3894 "parse.y"
13591 { (yyval.id) = '|'; }
13592#line 13593 "parse.c"
13593 break;
13594
13595 case 166: /* op: '^' */
13596#line 3895 "parse.y"
13597 { (yyval.id) = '^'; }
13598#line 13599 "parse.c"
13599 break;
13600
13601 case 167: /* op: '&' */
13602#line 3896 "parse.y"
13603 { (yyval.id) = '&'; }
13604#line 13605 "parse.c"
13605 break;
13606
13607 case 168: /* op: "<=>" */
13608#line 3897 "parse.y"
13609 { (yyval.id) = tCMP; }
13610#line 13611 "parse.c"
13611 break;
13612
13613 case 169: /* op: "==" */
13614#line 3898 "parse.y"
13615 { (yyval.id) = tEQ; }
13616#line 13617 "parse.c"
13617 break;
13618
13619 case 170: /* op: "===" */
13620#line 3899 "parse.y"
13621 { (yyval.id) = tEQQ; }
13622#line 13623 "parse.c"
13623 break;
13624
13625 case 171: /* op: "=~" */
13626#line 3900 "parse.y"
13627 { (yyval.id) = tMATCH; }
13628#line 13629 "parse.c"
13629 break;
13630
13631 case 172: /* op: "!~" */
13632#line 3901 "parse.y"
13633 { (yyval.id) = tNMATCH; }
13634#line 13635 "parse.c"
13635 break;
13636
13637 case 173: /* op: '>' */
13638#line 3902 "parse.y"
13639 { (yyval.id) = '>'; }
13640#line 13641 "parse.c"
13641 break;
13642
13643 case 174: /* op: ">=" */
13644#line 3903 "parse.y"
13645 { (yyval.id) = tGEQ; }
13646#line 13647 "parse.c"
13647 break;
13648
13649 case 175: /* op: '<' */
13650#line 3904 "parse.y"
13651 { (yyval.id) = '<'; }
13652#line 13653 "parse.c"
13653 break;
13654
13655 case 176: /* op: "<=" */
13656#line 3905 "parse.y"
13657 { (yyval.id) = tLEQ; }
13658#line 13659 "parse.c"
13659 break;
13660
13661 case 177: /* op: "!=" */
13662#line 3906 "parse.y"
13663 { (yyval.id) = tNEQ; }
13664#line 13665 "parse.c"
13665 break;
13666
13667 case 178: /* op: "<<" */
13668#line 3907 "parse.y"
13669 { (yyval.id) = tLSHFT; }
13670#line 13671 "parse.c"
13671 break;
13672
13673 case 179: /* op: ">>" */
13674#line 3908 "parse.y"
13675 { (yyval.id) = tRSHFT; }
13676#line 13677 "parse.c"
13677 break;
13678
13679 case 180: /* op: '+' */
13680#line 3909 "parse.y"
13681 { (yyval.id) = '+'; }
13682#line 13683 "parse.c"
13683 break;
13684
13685 case 181: /* op: '-' */
13686#line 3910 "parse.y"
13687 { (yyval.id) = '-'; }
13688#line 13689 "parse.c"
13689 break;
13690
13691 case 182: /* op: '*' */
13692#line 3911 "parse.y"
13693 { (yyval.id) = '*'; }
13694#line 13695 "parse.c"
13695 break;
13696
13697 case 183: /* op: "*" */
13698#line 3912 "parse.y"
13699 { (yyval.id) = '*'; }
13700#line 13701 "parse.c"
13701 break;
13702
13703 case 184: /* op: '/' */
13704#line 3913 "parse.y"
13705 { (yyval.id) = '/'; }
13706#line 13707 "parse.c"
13707 break;
13708
13709 case 185: /* op: '%' */
13710#line 3914 "parse.y"
13711 { (yyval.id) = '%'; }
13712#line 13713 "parse.c"
13713 break;
13714
13715 case 186: /* op: "**" */
13716#line 3915 "parse.y"
13717 { (yyval.id) = tPOW; }
13718#line 13719 "parse.c"
13719 break;
13720
13721 case 187: /* op: "**arg" */
13722#line 3916 "parse.y"
13723 { (yyval.id) = tDSTAR; }
13724#line 13725 "parse.c"
13725 break;
13726
13727 case 188: /* op: '!' */
13728#line 3917 "parse.y"
13729 { (yyval.id) = '!'; }
13730#line 13731 "parse.c"
13731 break;
13732
13733 case 189: /* op: '~' */
13734#line 3918 "parse.y"
13735 { (yyval.id) = '~'; }
13736#line 13737 "parse.c"
13737 break;
13738
13739 case 190: /* op: "unary+" */
13740#line 3919 "parse.y"
13741 { (yyval.id) = tUPLUS; }
13742#line 13743 "parse.c"
13743 break;
13744
13745 case 191: /* op: "unary-" */
13746#line 3920 "parse.y"
13747 { (yyval.id) = tUMINUS; }
13748#line 13749 "parse.c"
13749 break;
13750
13751 case 192: /* op: "[]" */
13752#line 3921 "parse.y"
13753 { (yyval.id) = tAREF; }
13754#line 13755 "parse.c"
13755 break;
13756
13757 case 193: /* op: "[]=" */
13758#line 3922 "parse.y"
13759 { (yyval.id) = tASET; }
13760#line 13761 "parse.c"
13761 break;
13762
13763 case 194: /* op: '`' */
13764#line 3923 "parse.y"
13765 { (yyval.id) = '`'; }
13766#line 13767 "parse.c"
13767 break;
13768
13769 case 236: /* asgn_arg_rhs: lhs '=' lex_ctxt arg_rhs */
13770#line 2926 "parse.y"
13771 {
13772 (yyval.node) = node_assign(p, (NODE *)(yyvsp[-3].node), (yyvsp[0].node), (yyvsp[-1].ctxt), &(yyloc));
13773 /*% ripper: assign!($:1, $:4) %*/
13774 }
13775#line 13776 "parse.c"
13776 break;
13777
13778 case 238: /* op_asgn_arg_rhs: var_lhs "operator-assignment" lex_ctxt arg_rhs */
13779#line 3061 "parse.y"
13780 {
13781 (yyval.node) = new_op_assign(p, (yyvsp[-3].node), (yyvsp[-2].id), (yyvsp[0].node), (yyvsp[-1].ctxt), &(yyloc));
13782 /*% ripper: opassign!($:var_lhs, $:tOP_ASGN, $:rhs) %*/
13783 }
13784#line 13785 "parse.c"
13785 break;
13786
13787 case 239: /* op_asgn_arg_rhs: primary_value '[' opt_call_args rbracket "operator-assignment" lex_ctxt arg_rhs */
13788#line 3066 "parse.y"
13789 {
13790 (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]));
13791 /*% ripper: opassign!(aref_field!($:primary_value, $:opt_call_args), $:tOP_ASGN, $:rhs) %*/
13792 }
13793#line 13794 "parse.c"
13794 break;
13795
13796 case 240: /* op_asgn_arg_rhs: primary_value call_op "local variable or method" "operator-assignment" lex_ctxt arg_rhs */
13797#line 3071 "parse.y"
13798 {
13799 (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]));
13800 /*% ripper: opassign!(field!($:primary_value, $:call_op, $:tIDENTIFIER), $:tOP_ASGN, $:rhs) %*/
13801 }
13802#line 13803 "parse.c"
13803 break;
13804
13805 case 241: /* op_asgn_arg_rhs: primary_value call_op "constant" "operator-assignment" lex_ctxt arg_rhs */
13806#line 3076 "parse.y"
13807 {
13808 (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]));
13809 /*% ripper: opassign!(field!($:primary_value, $:call_op, $:tCONSTANT), $:tOP_ASGN, $:rhs) %*/
13810 }
13811#line 13812 "parse.c"
13812 break;
13813
13814 case 242: /* op_asgn_arg_rhs: primary_value "::" "local variable or method" "operator-assignment" lex_ctxt arg_rhs */
13815#line 3081 "parse.y"
13816 {
13817 (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]));
13818 /*% ripper: opassign!(field!($:primary_value, $:tCOLON2, $:tIDENTIFIER), $:tOP_ASGN, $:rhs) %*/
13819 }
13820#line 13821 "parse.c"
13821 break;
13822
13823 case 243: /* op_asgn_arg_rhs: primary_value "::" "constant" "operator-assignment" lex_ctxt arg_rhs */
13824#line 3086 "parse.y"
13825 {
13826 YYLTYPE loc = code_loc_gen(&(yylsp[-5]), &(yylsp[-3]));
13827 (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));
13828 /*% ripper: opassign!(const_path_field!($:primary_value, $:tCONSTANT), $:tOP_ASGN, $:rhs) %*/
13829 }
13830#line 13831 "parse.c"
13831 break;
13832
13833 case 244: /* op_asgn_arg_rhs: ":: at EXPR_BEG" "constant" "operator-assignment" lex_ctxt arg_rhs */
13834#line 3092 "parse.y"
13835 {
13836 YYLTYPE loc = code_loc_gen(&(yylsp[-4]), &(yylsp[-3]));
13837 (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));
13838 /*% ripper: opassign!(top_const_field!($:tCONSTANT), $:tOP_ASGN, $:rhs) %*/
13839 }
13840#line 13841 "parse.c"
13841 break;
13842
13843 case 245: /* op_asgn_arg_rhs: backref "operator-assignment" lex_ctxt arg_rhs */
13844#line 3098 "parse.y"
13845 {
13846 VALUE MAYBE_UNUSED(e) = rb_backref_error(p, (yyvsp[-3].node));
13847 (yyval.node) = NEW_ERROR(&(yyloc));
13848 /*% ripper[error]: assign_error!(?e, opassign!(var_field!($:backref), $:tOP_ASGN, $:rhs)) %*/
13849 }
13850#line 13851 "parse.c"
13851 break;
13852
13853 case 247: /* range_expr_arg: arg ".." arg */
13854#line 3120 "parse.y"
13855 {
13856 value_expr(p, (yyvsp[-2].node));
13857 value_expr(p, (yyvsp[0].node));
13858 (yyval.node) = NEW_DOT2((yyvsp[-2].node), (yyvsp[0].node), &(yyloc), &(yylsp[-1]));
13859 /*% ripper: dot2!($:1, $:3) %*/
13860 }
13861#line 13862 "parse.c"
13862 break;
13863
13864 case 248: /* range_expr_arg: arg "..." arg */
13865#line 3127 "parse.y"
13866 {
13867 value_expr(p, (yyvsp[-2].node));
13868 value_expr(p, (yyvsp[0].node));
13869 (yyval.node) = NEW_DOT3((yyvsp[-2].node), (yyvsp[0].node), &(yyloc), &(yylsp[-1]));
13870 /*% ripper: dot3!($:1, $:3) %*/
13871 }
13872#line 13873 "parse.c"
13873 break;
13874
13875 case 249: /* range_expr_arg: arg ".." */
13876#line 3134 "parse.y"
13877 {
13878 value_expr(p, (yyvsp[-1].node));
13879 (yyval.node) = NEW_DOT2((yyvsp[-1].node), new_nil_at(p, &(yylsp[0]).end_pos), &(yyloc), &(yylsp[0]));
13880 /*% ripper: dot2!($:1, Qnil) %*/
13881 }
13882#line 13883 "parse.c"
13883 break;
13884
13885 case 250: /* range_expr_arg: arg "..." */
13886#line 3140 "parse.y"
13887 {
13888 value_expr(p, (yyvsp[-1].node));
13889 (yyval.node) = NEW_DOT3((yyvsp[-1].node), new_nil_at(p, &(yylsp[0]).end_pos), &(yyloc), &(yylsp[0]));
13890 /*% ripper: dot3!($:1, Qnil) %*/
13891 }
13892#line 13893 "parse.c"
13893 break;
13894
13895 case 251: /* range_expr_arg: "(.." arg */
13896#line 3146 "parse.y"
13897 {
13898 value_expr(p, (yyvsp[0].node));
13899 (yyval.node) = NEW_DOT2(new_nil_at(p, &(yylsp[-1]).beg_pos), (yyvsp[0].node), &(yyloc), &(yylsp[-1]));
13900 /*% ripper: dot2!(Qnil, $:2) %*/
13901 }
13902#line 13903 "parse.c"
13903 break;
13904
13905 case 252: /* range_expr_arg: "(..." arg */
13906#line 3152 "parse.y"
13907 {
13908 value_expr(p, (yyvsp[0].node));
13909 (yyval.node) = NEW_DOT3(new_nil_at(p, &(yylsp[-1]).beg_pos), (yyvsp[0].node), &(yyloc), &(yylsp[-1]));
13910 /*% ripper: dot3!(Qnil, $:2) %*/
13911 }
13912#line 13913 "parse.c"
13913 break;
13914
13915 case 254: /* arg: arg '+' arg */
13916#line 3944 "parse.y"
13917 {
13918 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), '+', (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
13919 /*% ripper: binary!($:1, ID2VAL('\'+\''), $:3) %*/
13920 }
13921#line 13922 "parse.c"
13922 break;
13923
13924 case 255: /* arg: arg '-' arg */
13925#line 3949 "parse.y"
13926 {
13927 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), '-', (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
13928 /*% ripper: binary!($:1, ID2VAL('\'-\''), $:3) %*/
13929 }
13930#line 13931 "parse.c"
13931 break;
13932
13933 case 256: /* arg: arg '*' arg */
13934#line 3954 "parse.y"
13935 {
13936 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), '*', (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
13937 /*% ripper: binary!($:1, ID2VAL('\'*\''), $:3) %*/
13938 }
13939#line 13940 "parse.c"
13940 break;
13941
13942 case 257: /* arg: arg '/' arg */
13943#line 3959 "parse.y"
13944 {
13945 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), '/', (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
13946 /*% ripper: binary!($:1, ID2VAL('\'/\''), $:3) %*/
13947 }
13948#line 13949 "parse.c"
13949 break;
13950
13951 case 258: /* arg: arg '%' arg */
13952#line 3964 "parse.y"
13953 {
13954 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), '%', (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
13955 /*% ripper: binary!($:1, ID2VAL('\'%\''), $:3) %*/
13956 }
13957#line 13958 "parse.c"
13958 break;
13959
13960 case 259: /* arg: arg "**" arg */
13961#line 3969 "parse.y"
13962 {
13963 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), idPow, (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
13964 /*% ripper: binary!($:1, ID2VAL(idPow), $:3) %*/
13965 }
13966#line 13967 "parse.c"
13967 break;
13968
13969 case 260: /* arg: tUMINUS_NUM simple_numeric "**" arg */
13970#line 3974 "parse.y"
13971 {
13972 (yyval.node) = call_uni_op(p, call_bin_op(p, (yyvsp[-2].node), idPow, (yyvsp[0].node), &(yylsp[-2]), &(yyloc)), idUMinus, &(yylsp[-3]), &(yyloc));
13973 /*% ripper: unary!(ID2VAL(idUMinus), binary!($:2, ID2VAL(idPow), $:4)) %*/
13974 }
13975#line 13976 "parse.c"
13976 break;
13977
13978 case 261: /* arg: "unary+" arg */
13979#line 3979 "parse.y"
13980 {
13981 (yyval.node) = call_uni_op(p, (yyvsp[0].node), idUPlus, &(yylsp[-1]), &(yyloc));
13982 /*% ripper: unary!(ID2VAL(idUPlus), $:2) %*/
13983 }
13984#line 13985 "parse.c"
13985 break;
13986
13987 case 262: /* arg: "unary-" arg */
13988#line 3984 "parse.y"
13989 {
13990 (yyval.node) = call_uni_op(p, (yyvsp[0].node), idUMinus, &(yylsp[-1]), &(yyloc));
13991 /*% ripper: unary!(ID2VAL(idUMinus), $:2) %*/
13992 }
13993#line 13994 "parse.c"
13994 break;
13995
13996 case 263: /* arg: arg '|' arg */
13997#line 3989 "parse.y"
13998 {
13999 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), '|', (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
14000 /*% ripper: binary!($:1, ID2VAL('\'|\''), $:3) %*/
14001 }
14002#line 14003 "parse.c"
14003 break;
14004
14005 case 264: /* arg: arg '^' arg */
14006#line 3994 "parse.y"
14007 {
14008 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), '^', (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
14009 /*% ripper: binary!($:1, ID2VAL('\'^\''), $:3) %*/
14010 }
14011#line 14012 "parse.c"
14012 break;
14013
14014 case 265: /* arg: arg '&' arg */
14015#line 3999 "parse.y"
14016 {
14017 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), '&', (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
14018 /*% ripper: binary!($:1, ID2VAL('\'&\''), $:3) %*/
14019 }
14020#line 14021 "parse.c"
14021 break;
14022
14023 case 266: /* arg: arg "<=>" arg */
14024#line 4004 "parse.y"
14025 {
14026 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), idCmp, (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
14027 /*% ripper: binary!($:1, ID2VAL(idCmp), $:3) %*/
14028 }
14029#line 14030 "parse.c"
14030 break;
14031
14032 case 268: /* arg: arg "==" arg */
14033#line 4010 "parse.y"
14034 {
14035 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), idEq, (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
14036 /*% ripper: binary!($:1, ID2VAL(idEq), $:3) %*/
14037 }
14038#line 14039 "parse.c"
14039 break;
14040
14041 case 269: /* arg: arg "===" arg */
14042#line 4015 "parse.y"
14043 {
14044 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), idEqq, (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
14045 /*% ripper: binary!($:1, ID2VAL(idEqq), $:3) %*/
14046 }
14047#line 14048 "parse.c"
14048 break;
14049
14050 case 270: /* arg: arg "!=" arg */
14051#line 4020 "parse.y"
14052 {
14053 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), idNeq, (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
14054 /*% ripper: binary!($:1, ID2VAL(idNeq), $:3) %*/
14055 }
14056#line 14057 "parse.c"
14057 break;
14058
14059 case 271: /* arg: arg "=~" arg */
14060#line 4025 "parse.y"
14061 {
14062 (yyval.node) = match_op(p, (yyvsp[-2].node), (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
14063 /*% ripper: binary!($:1, ID2VAL(idEqTilde), $:3) %*/
14064 }
14065#line 14066 "parse.c"
14066 break;
14067
14068 case 272: /* arg: arg "!~" arg */
14069#line 4030 "parse.y"
14070 {
14071 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), idNeqTilde, (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
14072 /*% ripper: binary!($:1, ID2VAL(idNeqTilde), $:3) %*/
14073 }
14074#line 14075 "parse.c"
14075 break;
14076
14077 case 273: /* arg: '!' arg */
14078#line 4035 "parse.y"
14079 {
14080 (yyval.node) = call_uni_op(p, method_cond(p, (yyvsp[0].node), &(yylsp[0])), '!', &(yylsp[-1]), &(yyloc));
14081 /*% ripper: unary!(ID2VAL('\'!\''), $:2) %*/
14082 }
14083#line 14084 "parse.c"
14084 break;
14085
14086 case 274: /* arg: '~' arg */
14087#line 4040 "parse.y"
14088 {
14089 (yyval.node) = call_uni_op(p, (yyvsp[0].node), '~', &(yylsp[-1]), &(yyloc));
14090 /*% ripper: unary!(ID2VAL('\'~\''), $:2) %*/
14091 }
14092#line 14093 "parse.c"
14093 break;
14094
14095 case 275: /* arg: arg "<<" arg */
14096#line 4045 "parse.y"
14097 {
14098 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), idLTLT, (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
14099 /*% ripper: binary!($:1, ID2VAL(idLTLT), $:3) %*/
14100 }
14101#line 14102 "parse.c"
14102 break;
14103
14104 case 276: /* arg: arg ">>" arg */
14105#line 4050 "parse.y"
14106 {
14107 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), idGTGT, (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
14108 /*% ripper: binary!($:1, ID2VAL(idGTGT), $:3) %*/
14109 }
14110#line 14111 "parse.c"
14111 break;
14112
14113 case 277: /* arg: arg "&&" arg */
14114#line 4055 "parse.y"
14115 {
14116 (yyval.node) = logop(p, idANDOP, (yyvsp[-2].node), (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
14117 /*% ripper: binary!($:1, ID2VAL(idANDOP), $:3) %*/
14118 }
14119#line 14120 "parse.c"
14120 break;
14121
14122 case 278: /* arg: arg "||" arg */
14123#line 4060 "parse.y"
14124 {
14125 (yyval.node) = logop(p, idOROP, (yyvsp[-2].node), (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
14126 /*% ripper: binary!($:1, ID2VAL(idOROP), $:3) %*/
14127 }
14128#line 14129 "parse.c"
14129 break;
14130
14131 case 279: /* arg: "'defined?'" option_'\n' begin_defined arg */
14132#line 4065 "parse.y"
14133 {
14134 p->ctxt.in_defined = (yyvsp[-1].ctxt).in_defined;
14135 (yyval.node) = new_defined(p, (yyvsp[0].node), &(yyloc), &(yylsp[-3]));
14136 p->ctxt.has_trailing_semicolon = (yyvsp[-1].ctxt).has_trailing_semicolon;
14137 /*% ripper: defined!($:4) %*/
14138 }
14139#line 14140 "parse.c"
14140 break;
14141
14142 case 280: /* def_endless_method_endless_arg: defn_head f_opt_paren_args '=' endless_arg */
14143#line 2966 "parse.y"
14144 {
14145 endless_method_name(p, (yyvsp[-3].node_def_temp)->nd_mid, &(yylsp[-3]));
14146 restore_defun(p, (yyvsp[-3].node_def_temp));
14147 ((yyval.node) = (yyvsp[-3].node_def_temp)->nd_def)->nd_loc = (yyloc);
14148 (yyvsp[0].node) = new_scope_body(p, (yyvsp[-2].node_args), (yyvsp[0].node), (yyval.node), &(yyloc));
14149 RNODE_DEFN((yyval.node))->nd_defn = (yyvsp[0].node);
14150 /*% ripper: bodystmt!($:bodystmt, Qnil, Qnil, Qnil) %*/
14151 /*% ripper: def!($:head, $:args, $:$) %*/
14152 local_pop(p);
14153 }
14154#line 14155 "parse.c"
14155 break;
14156
14157 case 281: /* def_endless_method_endless_arg: defs_head f_opt_paren_args '=' endless_arg */
14158#line 2977 "parse.y"
14159 {
14160 endless_method_name(p, (yyvsp[-3].node_def_temp)->nd_mid, &(yylsp[-3]));
14161 restore_defun(p, (yyvsp[-3].node_def_temp));
14162 ((yyval.node) = (yyvsp[-3].node_def_temp)->nd_def)->nd_loc = (yyloc);
14163 (yyvsp[0].node) = new_scope_body(p, (yyvsp[-2].node_args), (yyvsp[0].node), (yyval.node), &(yyloc));
14164 RNODE_DEFS((yyval.node))->nd_defn = (yyvsp[0].node);
14165 /*% ripper: bodystmt!($:bodystmt, Qnil, Qnil, Qnil) %*/
14166 /*% ripper: defs!(*$:head[0..2], $:args, $:$) %*/
14167 local_pop(p);
14168 }
14169#line 14170 "parse.c"
14170 break;
14171
14172 case 285: /* ternary: arg '?' arg option_'\n' ':' arg */
14173#line 4077 "parse.y"
14174 {
14175 value_expr(p, (yyvsp[-5].node));
14176 (yyval.node) = new_if(p, (yyvsp[-5].node), (yyvsp[-3].node), (yyvsp[0].node), &(yyloc), &NULL_LOC, &(yylsp[-1]), &NULL_LOC);
14177 fixpos((yyval.node), (yyvsp[-5].node));
14178 /*% ripper: ifop!($:1, $:3, $:6) %*/
14179 }
14180#line 14181 "parse.c"
14181 break;
14182
14183 case 287: /* endless_arg: endless_arg "'rescue' modifier" after_rescue arg */
14184#line 4087 "parse.y"
14185 {
14186 p->ctxt.in_rescue = (yyvsp[-1].ctxt).in_rescue;
14187 (yyval.node) = rescued_expr(p, (yyvsp[-3].node), (yyvsp[0].node), &(yylsp[-3]), &(yylsp[-2]), &(yylsp[0]));
14188 /*% ripper: rescue_mod!($:1, $:4) %*/
14189 }
14190#line 14191 "parse.c"
14191 break;
14192
14193 case 288: /* endless_arg: "'not'" option_'\n' endless_arg */
14194#line 4093 "parse.y"
14195 {
14196 (yyval.node) = call_uni_op(p, method_cond(p, (yyvsp[0].node), &(yylsp[0])), METHOD_NOT, &(yylsp[-2]), &(yyloc));
14197 /*% ripper: unary!(ID2VAL(idNOT), $:3) %*/
14198 }
14199#line 14200 "parse.c"
14200 break;
14201
14202 case 289: /* relop: '>' */
14203#line 4099 "parse.y"
14204 {(yyval.id) = '>';}
14205#line 14206 "parse.c"
14206 break;
14207
14208 case 290: /* relop: '<' */
14209#line 4100 "parse.y"
14210 {(yyval.id) = '<';}
14211#line 14212 "parse.c"
14212 break;
14213
14214 case 291: /* relop: ">=" */
14215#line 4101 "parse.y"
14216 {(yyval.id) = idGE;}
14217#line 14218 "parse.c"
14218 break;
14219
14220 case 292: /* relop: "<=" */
14221#line 4102 "parse.y"
14222 {(yyval.id) = idLE;}
14223#line 14224 "parse.c"
14224 break;
14225
14226 case 293: /* rel_expr: arg relop arg */
14227#line 4106 "parse.y"
14228 {
14229 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), (yyvsp[-1].id), (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
14230 /*% ripper: binary!($:1, ID2VAL($2), $:3) %*/
14231 }
14232#line 14233 "parse.c"
14233 break;
14234
14235 case 294: /* rel_expr: rel_expr relop arg */
14236#line 4111 "parse.y"
14237 {
14238 rb_warning1("comparison '%s' after comparison", WARN_ID((yyvsp[-1].id)));
14239 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), (yyvsp[-1].id), (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
14240 /*% ripper: binary!($:1, ID2VAL($2), $:3) %*/
14241 }
14242#line 14243 "parse.c"
14243 break;
14244
14245 case 295: /* lex_ctxt: none */
14246#line 4119 "parse.y"
14247 {
14248 (yyval.ctxt) = p->ctxt;
14249 }
14250#line 14251 "parse.c"
14251 break;
14252
14253 case 296: /* begin_defined: lex_ctxt */
14254#line 4125 "parse.y"
14255 {
14256 p->ctxt.in_defined = 1;
14257 (yyval.ctxt) = (yyvsp[0].ctxt);
14258 }
14259#line 14260 "parse.c"
14260 break;
14261
14262 case 297: /* after_rescue: lex_ctxt */
14263#line 4132 "parse.y"
14264 {
14265 p->ctxt.in_rescue = after_rescue;
14266 (yyval.ctxt) = (yyvsp[0].ctxt);
14267 }
14268#line 14269 "parse.c"
14269 break;
14270
14271 case 298: /* value_expr_arg: arg */
14272#line 3161 "parse.y"
14273 {
14274 value_expr(p, (yyvsp[0].node));
14275 (yyval.node) = (yyvsp[0].node);
14276 }
14277#line 14278 "parse.c"
14278 break;
14279
14280 case 302: /* aref_args: args ',' assocs trailer */
14281#line 4144 "parse.y"
14282 {
14283 (yyval.node) = (yyvsp[-1].node) ? arg_append(p, (yyvsp[-3].node), new_hash(p, (yyvsp[-1].node), &(yylsp[-1])), &(yyloc)) : (yyvsp[-3].node);
14284 /*% ripper: args_add!($:1, bare_assoc_hash!($:3)) %*/
14285 }
14286#line 14287 "parse.c"
14287 break;
14288
14289 case 303: /* aref_args: assocs trailer */
14290#line 4149 "parse.y"
14291 {
14292 (yyval.node) = (yyvsp[-1].node) ? NEW_LIST(new_hash(p, (yyvsp[-1].node), &(yylsp[-1])), &(yyloc)) : 0;
14293 /*% ripper: args_add!(args_new!, bare_assoc_hash!($:1)) %*/
14294 }
14295#line 14296 "parse.c"
14296 break;
14297
14298 case 304: /* arg_rhs: arg */
14299#line 4156 "parse.y"
14300 {
14301 value_expr(p, (yyvsp[0].node));
14302 (yyval.node) = (yyvsp[0].node);
14303 }
14304#line 14305 "parse.c"
14305 break;
14306
14307 case 305: /* arg_rhs: arg "'rescue' modifier" after_rescue arg */
14308#line 4161 "parse.y"
14309 {
14310 p->ctxt.in_rescue = (yyvsp[-1].ctxt).in_rescue;
14311 value_expr(p, (yyvsp[-3].node));
14312 (yyval.node) = rescued_expr(p, (yyvsp[-3].node), (yyvsp[0].node), &(yylsp[-3]), &(yylsp[-2]), &(yylsp[0]));
14313 /*% ripper: rescue_mod!($:1, $:4) %*/
14314 }
14315#line 14316 "parse.c"
14316 break;
14317
14318 case 306: /* paren_args: '(' opt_call_args rparen */
14319#line 4170 "parse.y"
14320 {
14321 (yyval.node) = (yyvsp[-1].node);
14322 /*% ripper: arg_paren!($:2) %*/
14323 }
14324#line 14325 "parse.c"
14325 break;
14326
14327 case 307: /* paren_args: '(' args ',' args_forward rparen */
14328#line 4175 "parse.y"
14329 {
14330 if (!check_forwarding_args(p)) {
14331 (yyval.node) = 0;
14332 }
14333 else {
14334 (yyval.node) = new_args_forward_call(p, (yyvsp[-3].node), &(yylsp[-1]), &(yyloc));
14335 /*% ripper: arg_paren!(args_add!($:2, $:4)) %*/
14336 }
14337 }
14338#line 14339 "parse.c"
14339 break;
14340
14341 case 308: /* paren_args: '(' args_forward rparen */
14342#line 4185 "parse.y"
14343 {
14344 if (!check_forwarding_args(p)) {
14345 (yyval.node) = 0;
14346 }
14347 else {
14348 (yyval.node) = new_args_forward_call(p, 0, &(yylsp[-1]), &(yyloc));
14349 /*% ripper: arg_paren!($:2) %*/
14350 }
14351 }
14352#line 14353 "parse.c"
14353 break;
14354
14355 case 310: /* opt_paren_args: paren_args */
14356#line 4198 "parse.y"
14357 {
14358 (yyval.node) = (yyvsp[0].node) ? (yyvsp[0].node) : NODE_SPECIAL_EMPTY_ARGS;
14359 }
14360#line 14361 "parse.c"
14361 break;
14362
14363 case 314: /* opt_call_args: args ',' assocs ',' */
14364#line 4207 "parse.y"
14365 {
14366 (yyval.node) = (yyvsp[-1].node) ? arg_append(p, (yyvsp[-3].node), new_hash(p, (yyvsp[-1].node), &(yylsp[-1])), &(yyloc)) : (yyvsp[-3].node);
14367 /*% ripper: args_add!($:1, bare_assoc_hash!($:3)) %*/
14368 }
14369#line 14370 "parse.c"
14370 break;
14371
14372 case 315: /* opt_call_args: assocs ',' */
14373#line 4212 "parse.y"
14374 {
14375 (yyval.node) = (yyvsp[-1].node) ? NEW_LIST(new_hash(p, (yyvsp[-1].node), &(yylsp[-1])), &(yylsp[-1])) : 0;
14376 /*% ripper: args_add!(args_new!, bare_assoc_hash!($:1)) %*/
14377 }
14378#line 14379 "parse.c"
14379 break;
14380
14381 case 316: /* value_expr_command: command */
14382#line 3161 "parse.y"
14383 {
14384 value_expr(p, (yyvsp[0].node));
14385 (yyval.node) = (yyvsp[0].node);
14386 }
14387#line 14388 "parse.c"
14388 break;
14389
14390 case 317: /* call_args: value_expr_command */
14391#line 4219 "parse.y"
14392 {
14393 (yyval.node) = NEW_LIST((yyvsp[0].node), &(yyloc));
14394 /*% ripper: args_add!(args_new!, $:1) %*/
14395 }
14396#line 14397 "parse.c"
14397 break;
14398
14399 case 318: /* call_args: def_endless_method_endless_command */
14400#line 4224 "parse.y"
14401 {
14402 (yyval.node) = NEW_LIST((yyvsp[0].node), &(yyloc));
14403 /*% ripper: args_add!(args_new!, $:1) %*/
14404 }
14405#line 14406 "parse.c"
14406 break;
14407
14408 case 319: /* call_args: args opt_block_arg */
14409#line 4229 "parse.y"
14410 {
14411 (yyval.node) = arg_blk_pass((yyvsp[-1].node), (yyvsp[0].node_block_pass));
14412 /*% ripper: args_add_block!($:1, $:2) %*/
14413 }
14414#line 14415 "parse.c"
14415 break;
14416
14417 case 320: /* call_args: assocs opt_block_arg */
14418#line 4234 "parse.y"
14419 {
14420 (yyval.node) = (yyvsp[-1].node) ? NEW_LIST(new_hash(p, (yyvsp[-1].node), &(yylsp[-1])), &(yylsp[-1])) : 0;
14421 (yyval.node) = arg_blk_pass((yyval.node), (yyvsp[0].node_block_pass));
14422 /*% ripper: args_add_block!(args_add!(args_new!, bare_assoc_hash!($:1)), $:2) %*/
14423 }
14424#line 14425 "parse.c"
14425 break;
14426
14427 case 321: /* call_args: args ',' assocs opt_block_arg */
14428#line 4240 "parse.y"
14429 {
14430 (yyval.node) = (yyvsp[-1].node) ? arg_append(p, (yyvsp[-3].node), new_hash(p, (yyvsp[-1].node), &(yylsp[-1])), &(yyloc)) : (yyvsp[-3].node);
14431 (yyval.node) = arg_blk_pass((yyval.node), (yyvsp[0].node_block_pass));
14432 /*% ripper: args_add_block!(args_add!($:1, bare_assoc_hash!($:3)), $:4) %*/
14433 }
14434#line 14435 "parse.c"
14435 break;
14436
14437 case 323: /* $@13: %empty */
14438#line 4249 "parse.y"
14439 {
14440 /* If call_args starts with a open paren '(' or '[',
14441 * look-ahead reading of the letters calls CMDARG_PUSH(0),
14442 * but the push must be done after CMDARG_PUSH(1).
14443 * So this code makes them consistent by first cancelling
14444 * the premature CMDARG_PUSH(0), doing CMDARG_PUSH(1),
14445 * and finally redoing CMDARG_PUSH(0).
14446 */
14447 int lookahead = 0;
14448 switch (yychar) {
14449 case '(': case tLPAREN: case tLPAREN_ARG: case '[': case tLBRACK:
14450 lookahead = 1;
14451 }
14452 if (lookahead) CMDARG_POP();
14453 CMDARG_PUSH(1);
14454 if (lookahead) CMDARG_PUSH(0);
14455 }
14456#line 14457 "parse.c"
14457 break;
14458
14459 case 324: /* command_args: $@13 call_args */
14460#line 4267 "parse.y"
14461 {
14462 /* call_args can be followed by tLBRACE_ARG (that does CMDARG_PUSH(0) in the lexer)
14463 * but the push must be done after CMDARG_POP() in the parser.
14464 * So this code does CMDARG_POP() to pop 0 pushed by tLBRACE_ARG,
14465 * CMDARG_POP() to pop 1 pushed by command_args,
14466 * and CMDARG_PUSH(0) to restore back the flag set by tLBRACE_ARG.
14467 */
14468 int lookahead = 0;
14469 switch (yychar) {
14470 case tLBRACE_ARG:
14471 lookahead = 1;
14472 }
14473 if (lookahead) CMDARG_POP();
14474 CMDARG_POP();
14475 if (lookahead) CMDARG_PUSH(0);
14476 (yyval.node) = (yyvsp[0].node);
14477 /*% ripper: $:2 %*/
14478 }
14479#line 14480 "parse.c"
14480 break;
14481
14482 case 325: /* block_arg: "&" arg_value */
14483#line 4288 "parse.y"
14484 {
14485 (yyval.node_block_pass) = NEW_BLOCK_PASS((yyvsp[0].node), &(yyloc), &(yylsp[-1]));
14486 /*% ripper: $:2 %*/
14487 }
14488#line 14489 "parse.c"
14489 break;
14490
14491 case 326: /* block_arg: "&" */
14492#line 4293 "parse.y"
14493 {
14494 forwarding_arg_check(p, idFWD_BLOCK, idFWD_ALL, "block");
14495 (yyval.node_block_pass) = NEW_BLOCK_PASS(NEW_LVAR(idFWD_BLOCK, &(yylsp[0])), &(yyloc), &(yylsp[0]));
14496 /*% ripper: Qnil %*/
14497 }
14498#line 14499 "parse.c"
14499 break;
14500
14501 case 327: /* opt_block_arg: ',' block_arg */
14502#line 4301 "parse.y"
14503 {
14504 (yyval.node_block_pass) = (yyvsp[0].node_block_pass);
14505 /*% ripper: $:2 %*/
14506 }
14507#line 14508 "parse.c"
14508 break;
14509
14510 case 328: /* opt_block_arg: none */
14511#line 4306 "parse.y"
14512 {
14513 (yyval.node_block_pass) = 0;
14514 /*% ripper: Qfalse %*/
14515 }
14516#line 14517 "parse.c"
14517 break;
14518
14519 case 329: /* args: arg_value */
14520#line 4314 "parse.y"
14521 {
14522 (yyval.node) = NEW_LIST((yyvsp[0].node), &(yyloc));
14523 /*% ripper: args_add!(args_new!, $:arg_value) %*/
14524 }
14525#line 14526 "parse.c"
14526 break;
14527
14528 case 330: /* args: arg_splat */
14529#line 4319 "parse.y"
14530 {
14531 (yyval.node) = (yyvsp[0].node);
14532 /*% ripper: args_add_star!(args_new!, $:arg_splat) %*/
14533 }
14534#line 14535 "parse.c"
14535 break;
14536
14537 case 331: /* args: args ',' arg_value */
14538#line 4324 "parse.y"
14539 {
14540 (yyval.node) = last_arg_append(p, (yyvsp[-2].node), (yyvsp[0].node), &(yyloc));
14541 /*% ripper: args_add!($:non_last_args, $:arg_value) %*/
14542 }
14543#line 14544 "parse.c"
14544 break;
14545
14546 case 332: /* args: args ',' arg_splat */
14547#line 4329 "parse.y"
14548 {
14549 (yyval.node) = rest_arg_append(p, (yyvsp[-2].node), RNODE_SPLAT((yyvsp[0].node))->nd_head, &(yyloc));
14550 /*% ripper: args_add_star!($:non_last_args, $:arg_splat) %*/
14551 }
14552#line 14553 "parse.c"
14553 break;
14554
14555 case 333: /* arg_splat: "*" arg_value */
14556#line 4337 "parse.y"
14557 {
14558 (yyval.node) = NEW_SPLAT((yyvsp[0].node), &(yyloc), &(yylsp[-1]));
14559 /*% ripper: $:arg_value %*/
14560 }
14561#line 14562 "parse.c"
14562 break;
14563
14564 case 334: /* arg_splat: "*" */
14565#line 4342 "parse.y"
14566 {
14567 forwarding_arg_check(p, idFWD_REST, idFWD_ALL, "rest");
14568 (yyval.node) = NEW_SPLAT(NEW_LVAR(idFWD_REST, &(yylsp[0])), &(yyloc), &(yylsp[0]));
14569 /*% ripper: Qnil %*/
14570 }
14571#line 14572 "parse.c"
14572 break;
14573
14574 case 337: /* mrhs: args ',' arg_value */
14575#line 4356 "parse.y"
14576 {
14577 (yyval.node) = last_arg_append(p, (yyvsp[-2].node), (yyvsp[0].node), &(yyloc));
14578 /*% ripper: mrhs_add!(mrhs_new_from_args!($:args), $:arg_value) %*/
14579 }
14580#line 14581 "parse.c"
14581 break;
14582
14583 case 338: /* mrhs: args ',' "*" arg_value */
14584#line 4361 "parse.y"
14585 {
14586 (yyval.node) = rest_arg_append(p, (yyvsp[-3].node), (yyvsp[0].node), &(yyloc));
14587 /*% ripper: mrhs_add_star!(mrhs_new_from_args!($:args), $:arg_value) %*/
14588 }
14589#line 14590 "parse.c"
14590 break;
14591
14592 case 339: /* mrhs: "*" arg_value */
14593#line 4366 "parse.y"
14594 {
14595 (yyval.node) = NEW_SPLAT((yyvsp[0].node), &(yyloc), &(yylsp[-1]));
14596 /*% ripper: mrhs_add_star!(mrhs_new!, $:arg_value) %*/
14597 }
14598#line 14599 "parse.c"
14599 break;
14600
14601 case 350: /* primary: "method" */
14602#line 4387 "parse.y"
14603 {
14604 (yyval.node) = (NODE *)NEW_FCALL((yyvsp[0].id), 0, &(yyloc));
14605 /*% ripper: method_add_arg!(fcall!($:fid), args_new!) %*/
14606 }
14607#line 14608 "parse.c"
14608 break;
14609
14610 case 351: /* $@14: %empty */
14611#line 4392 "parse.y"
14612 {
14613 CMDARG_PUSH(0);
14614 }
14615#line 14616 "parse.c"
14616 break;
14617
14618 case 352: /* primary: k_begin $@14 bodystmt k_end */
14619#line 4397 "parse.y"
14620 {
14621 CMDARG_POP();
14622 set_line_body((yyvsp[-1].node), (yylsp[-3]).end_pos.lineno);
14623 (yyval.node) = NEW_BEGIN((yyvsp[-1].node), &(yyloc));
14624 nd_set_line((yyval.node), (yylsp[-3]).end_pos.lineno);
14625 /*% ripper: begin!($:body) %*/
14626 }
14627#line 14628 "parse.c"
14628 break;
14629
14630 case 353: /* $@15: %empty */
14631#line 4404 "parse.y"
14632 {SET_LEX_STATE(EXPR_ENDARG);}
14633#line 14634 "parse.c"
14634 break;
14635
14636 case 354: /* primary: "( arg" compstmt_stmts $@15 ')' */
14637#line 4405 "parse.y"
14638 {
14639 if (nd_type_p((yyvsp[-2].node), NODE_SELF)) RNODE_SELF((yyvsp[-2].node))->nd_state = 0;
14640 (yyval.node) = (yyvsp[-2].node);
14641 /*% ripper: paren!($:body) %*/
14642 }
14643#line 14644 "parse.c"
14644 break;
14645
14646 case 355: /* primary: "(" compstmt_stmts ')' */
14647#line 4411 "parse.y"
14648 {
14649 if (nd_type_p((yyvsp[-1].node), NODE_SELF)) RNODE_SELF((yyvsp[-1].node))->nd_state = 0;
14650 (yyval.node) = NEW_BLOCK((yyvsp[-1].node), &(yyloc));
14651 /*% ripper: paren!($:body) %*/
14652 }
14653#line 14654 "parse.c"
14654 break;
14655
14656 case 356: /* primary: primary_value "::" "constant" */
14657#line 4417 "parse.y"
14658 {
14659 (yyval.node) = NEW_COLON2((yyvsp[-2].node), (yyvsp[0].id), &(yyloc), &(yylsp[-1]), &(yylsp[0]));
14660 /*% ripper: const_path_ref!($:recv, $:name) %*/
14661 }
14662#line 14663 "parse.c"
14663 break;
14664
14665 case 357: /* primary: ":: at EXPR_BEG" "constant" */
14666#line 4422 "parse.y"
14667 {
14668 (yyval.node) = NEW_COLON3((yyvsp[0].id), &(yyloc), &(yylsp[-1]), &(yylsp[0]));
14669 /*% ripper: top_const_ref!($:name) %*/
14670 }
14671#line 14672 "parse.c"
14672 break;
14673
14674 case 358: /* primary: "[" aref_args ']' */
14675#line 4427 "parse.y"
14676 {
14677 (yyval.node) = make_list((yyvsp[-1].node), &(yyloc));
14678 /*% ripper: array!($:args) %*/
14679 }
14680#line 14681 "parse.c"
14681 break;
14682
14683 case 359: /* primary: "{" assoc_list '}' */
14684#line 4432 "parse.y"
14685 {
14686 (yyval.node) = new_hash(p, (yyvsp[-1].node), &(yyloc));
14687 RNODE_HASH((yyval.node))->nd_brace = TRUE;
14688 /*% ripper: hash!($:list) %*/
14689 }
14690#line 14691 "parse.c"
14691 break;
14692
14693 case 360: /* primary: k_return */
14694#line 4438 "parse.y"
14695 {
14696 (yyval.node) = NEW_RETURN(0, &(yyloc), &(yylsp[0]));
14697 /*% ripper: return0! %*/
14698 }
14699#line 14700 "parse.c"
14700 break;
14701
14702 case 361: /* primary: k_yield '(' call_args rparen */
14703#line 4443 "parse.y"
14704 {
14705 (yyval.node) = NEW_YIELD((yyvsp[-1].node), &(yyloc), &(yylsp[-3]), &(yylsp[-2]), &(yylsp[0]));
14706 /*% ripper: yield!(paren!($:args)) %*/
14707 }
14708#line 14709 "parse.c"
14709 break;
14710
14711 case 362: /* primary: k_yield '(' rparen */
14712#line 4448 "parse.y"
14713 {
14714 (yyval.node) = NEW_YIELD(0, &(yyloc), &(yylsp[-2]), &(yylsp[-1]), &(yylsp[0]));
14715 /*% ripper: yield!(paren!(args_new!)) %*/
14716 }
14717#line 14718 "parse.c"
14718 break;
14719
14720 case 363: /* primary: k_yield */
14721#line 4453 "parse.y"
14722 {
14723 (yyval.node) = NEW_YIELD(0, &(yyloc), &(yylsp[0]), &NULL_LOC, &NULL_LOC);
14724 /*% ripper: yield0! %*/
14725 }
14726#line 14727 "parse.c"
14727 break;
14728
14729 case 364: /* primary: "'defined?'" option_'\n' '(' begin_defined expr rparen */
14730#line 4458 "parse.y"
14731 {
14732 p->ctxt.in_defined = (yyvsp[-2].ctxt).in_defined;
14733 (yyval.node) = new_defined(p, (yyvsp[-1].node), &(yyloc), &(yylsp[-5]));
14734 p->ctxt.has_trailing_semicolon = (yyvsp[-2].ctxt).has_trailing_semicolon;
14735 /*% ripper: defined!($:arg) %*/
14736 }
14737#line 14738 "parse.c"
14738 break;
14739
14740 case 365: /* primary: "'not'" '(' expr rparen */
14741#line 4465 "parse.y"
14742 {
14743 (yyval.node) = call_uni_op(p, method_cond(p, (yyvsp[-1].node), &(yylsp[-1])), METHOD_NOT, &(yylsp[-3]), &(yyloc));
14744 /*% ripper: unary!(ID2VAL(idNOT), $:arg) %*/
14745 }
14746#line 14747 "parse.c"
14747 break;
14748
14749 case 366: /* primary: "'not'" '(' rparen */
14750#line 4470 "parse.y"
14751 {
14752 (yyval.node) = call_uni_op(p, method_cond(p, NEW_NIL(&(yylsp[-1])), &(yylsp[-1])), METHOD_NOT, &(yylsp[-2]), &(yyloc));
14753 /*% ripper: unary!(ID2VAL(idNOT), Qnil) %*/
14754 }
14755#line 14756 "parse.c"
14756 break;
14757
14758 case 367: /* primary: fcall brace_block */
14759#line 4475 "parse.y"
14760 {
14761 (yyval.node) = method_add_block(p, (NODE *)(yyvsp[-1].node_fcall), (yyvsp[0].node), &(yyloc));
14762 /*% ripper: method_add_block!(method_add_arg!(fcall!($:call), args_new!), $:block) %*/
14763 }
14764#line 14765 "parse.c"
14765 break;
14766
14767 case 369: /* primary: method_call brace_block */
14768#line 4481 "parse.y"
14769 {
14770 block_dup_check(p, get_nd_args(p, (yyvsp[-1].node)), (yyvsp[0].node));
14771 (yyval.node) = method_add_block(p, (yyvsp[-1].node), (yyvsp[0].node), &(yyloc));
14772 /*% ripper: method_add_block!($:call, $:block) %*/
14773 }
14774#line 14775 "parse.c"
14775 break;
14776
14777 case 371: /* primary: k_if expr_value then compstmt_stmts if_tail k_end */
14778#line 4491 "parse.y"
14779 {
14780 if ((yyvsp[-1].node) && nd_type_p((yyvsp[-1].node), NODE_IF))
14781 RNODE_IF((yyvsp[-1].node))->end_keyword_loc = (yylsp[0]);
14782
14783 (yyval.node) = new_if(p, (yyvsp[-4].node), (yyvsp[-2].node), (yyvsp[-1].node), &(yyloc), &(yylsp[-5]), &(yylsp[-3]), &(yylsp[0]));
14784 fixpos((yyval.node), (yyvsp[-4].node));
14785 /*% ripper: if!($:cond, $:body, $:tail) %*/
14786 }
14787#line 14788 "parse.c"
14788 break;
14789
14790 case 372: /* primary: k_unless expr_value then compstmt_stmts opt_else k_end */
14791#line 4503 "parse.y"
14792 {
14793 (yyval.node) = new_unless(p, (yyvsp[-4].node), (yyvsp[-2].node), (yyvsp[-1].node), &(yyloc), &(yylsp[-5]), &(yylsp[-3]), &(yylsp[0]));
14794 fixpos((yyval.node), (yyvsp[-4].node));
14795 /*% ripper: unless!($:cond, $:body, $:tail) %*/
14796 }
14797#line 14798 "parse.c"
14798 break;
14799
14800 case 373: /* primary: k_while expr_value_do compstmt_stmts k_end */
14801#line 4511 "parse.y"
14802 {
14803 restore_block_exit(p, (yyvsp[-3].node_exits));
14804 (yyval.node) = NEW_WHILE(cond(p, (yyvsp[-2].node), &(yylsp[-2])), (yyvsp[-1].node), 1, &(yyloc), &(yylsp[-3]), &(yylsp[0]));
14805 fixpos((yyval.node), (yyvsp[-2].node));
14806 /*% ripper: while!($:cond, $:body) %*/
14807 }
14808#line 14809 "parse.c"
14809 break;
14810
14811 case 374: /* primary: k_until expr_value_do compstmt_stmts k_end */
14812#line 4520 "parse.y"
14813 {
14814 restore_block_exit(p, (yyvsp[-3].node_exits));
14815 (yyval.node) = NEW_UNTIL(cond(p, (yyvsp[-2].node), &(yylsp[-2])), (yyvsp[-1].node), 1, &(yyloc), &(yylsp[-3]), &(yylsp[0]));
14816 fixpos((yyval.node), (yyvsp[-2].node));
14817 /*% ripper: until!($:cond, $:body) %*/
14818 }
14819#line 14820 "parse.c"
14820 break;
14821
14822 case 375: /* @16: %empty */
14823#line 4527 "parse.y"
14824 {
14825 (yyval.labels) = p->case_labels;
14826 p->case_labels = CHECK_LITERAL_WHEN;
14827 }
14828#line 14829 "parse.c"
14829 break;
14830
14831 case 376: /* primary: k_case expr_value option_terms @16 case_body k_end */
14832#line 4533 "parse.y"
14833 {
14834 if (CASE_LABELS_ENABLED_P(p->case_labels)) st_free_table(p->case_labels);
14835 p->case_labels = (yyvsp[-2].labels);
14836 (yyval.node) = NEW_CASE((yyvsp[-4].node), (yyvsp[-1].node), &(yyloc), &(yylsp[-5]), &(yylsp[0]));
14837 fixpos((yyval.node), (yyvsp[-4].node));
14838 /*% ripper: case!($:expr, $:body) %*/
14839 }
14840#line 14841 "parse.c"
14841 break;
14842
14843 case 377: /* @17: %empty */
14844#line 4541 "parse.y"
14845 {
14846 (yyval.labels) = p->case_labels;
14847 p->case_labels = 0;
14848 }
14849#line 14850 "parse.c"
14850 break;
14851
14852 case 378: /* primary: k_case option_terms @17 case_body k_end */
14853#line 4547 "parse.y"
14854 {
14855 if (p->case_labels) st_free_table(p->case_labels);
14856 p->case_labels = (yyvsp[-2].labels);
14857 (yyval.node) = NEW_CASE2((yyvsp[-1].node), &(yyloc), &(yylsp[-4]), &(yylsp[0]));
14858 /*% ripper: case!(Qnil, $:body) %*/
14859 }
14860#line 14861 "parse.c"
14861 break;
14862
14863 case 379: /* primary: k_case expr_value option_terms p_case_body k_end */
14864#line 4556 "parse.y"
14865 {
14866 (yyval.node) = NEW_CASE3((yyvsp[-3].node), (yyvsp[-1].node), &(yyloc), &(yylsp[-4]), &(yylsp[0]));
14867 /*% ripper: case!($:expr, $:body) %*/
14868 }
14869#line 14870 "parse.c"
14870 break;
14871
14872 case 380: /* $@18: %empty */
14873#line 4561 "parse.y"
14874 {COND_PUSH(1);}
14875#line 14876 "parse.c"
14876 break;
14877
14878 case 381: /* $@19: %empty */
14879#line 4561 "parse.y"
14880 {COND_POP();}
14881#line 14882 "parse.c"
14882 break;
14883
14884 case 382: /* primary: k_for for_var "'in'" $@18 expr_value do $@19 compstmt_stmts k_end */
14885#line 4564 "parse.y"
14886 {
14887 restore_block_exit(p, (yyvsp[-8].node_exits));
14888 /*
14889 * for a, b, c in e
14890 * #=>
14891 * e.each{|*x| a, b, c = x}
14892 *
14893 * for a in e
14894 * #=>
14895 * e.each{|x| a, = x}
14896 */
14897 ID id = internal_id(p);
14898 rb_node_args_aux_t *m = NEW_ARGS_AUX(0, 0, &NULL_LOC);
14899 rb_node_args_t *args;
14900 NODE *scope, *internal_var = NEW_DVAR(id, &(yylsp[-7]));
14901 rb_ast_id_table_t *tbl = rb_ast_new_local_table(p->ast, 1);
14902 tbl->ids[0] = id; /* internal id */
14903
14904 switch (nd_type((yyvsp[-7].node))) {
14905 case NODE_LASGN:
14906 case NODE_DASGN: /* e.each {|internal_var| a = internal_var; ... } */
14907 set_nd_value(p, (yyvsp[-7].node), internal_var);
14908 id = 0;
14909 m->nd_plen = 1;
14910 m->nd_next = (yyvsp[-7].node);
14911 break;
14912 case NODE_MASGN: /* e.each {|*internal_var| a, b, c = (internal_var.length == 1 && Array === (tmp = internal_var[0]) ? tmp : internal_var); ... } */
14913 m->nd_next = node_assign(p, (yyvsp[-7].node), NEW_FOR_MASGN(internal_var, &(yylsp[-7])), NO_LEX_CTXT, &(yylsp[-7]));
14914 break;
14915 default: /* e.each {|*internal_var| @a, B, c[1], d.attr = internal_val; ... } */
14916 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]));
14917 }
14918 /* {|*internal_id| <m> = internal_id; ... } */
14919 args = new_args(p, m, 0, id, 0, new_empty_args_tail(p, &(yylsp[-7])), &(yylsp[-7]));
14920 scope = NEW_SCOPE2(tbl, args, (yyvsp[-1].node), NULL, &(yyloc));
14921 YYLTYPE do_keyword_loc = (yyvsp[-3].id) == keyword_do_cond ? (yylsp[-3]) : NULL_LOC;
14922 (yyval.node) = NEW_FOR((yyvsp[-4].node), scope, &(yyloc), &(yylsp[-8]), &(yylsp[-6]), &do_keyword_loc, &(yylsp[0]));
14923 RNODE_SCOPE(scope)->nd_parent = (yyval.node);
14924 fixpos((yyval.node), (yyvsp[-7].node));
14925 /*% ripper: for!($:for_var, $:expr_value, $:compstmt) %*/
14926 }
14927#line 14928 "parse.c"
14928 break;
14929
14930 case 383: /* $@20: %empty */
14931#line 4606 "parse.y"
14932 {
14933 begin_definition("class", &(yylsp[-2]), &(yylsp[-1]));
14934 }
14935#line 14936 "parse.c"
14936 break;
14937
14938 case 384: /* primary: k_class cpath superclass $@20 bodystmt k_end */
14939#line 4611 "parse.y"
14940 {
14941 YYLTYPE inheritance_operator_loc = NULL_LOC;
14942 if ((yyvsp[-3].node)) {
14943 inheritance_operator_loc = (yylsp[-3]);
14944 inheritance_operator_loc.end_pos.column = inheritance_operator_loc.beg_pos.column + 1;
14945 }
14946 (yyval.node) = NEW_CLASS((yyvsp[-4].node), (yyvsp[-1].node), (yyvsp[-3].node), &(yyloc), &(yylsp[-5]), &inheritance_operator_loc, &(yylsp[0]));
14947 nd_set_line(RNODE_CLASS((yyval.node))->nd_body, (yylsp[0]).end_pos.lineno);
14948 set_line_body((yyvsp[-1].node), (yylsp[-3]).end_pos.lineno);
14949 nd_set_line((yyval.node), (yylsp[-3]).end_pos.lineno);
14950 /*% ripper: class!($:cpath, $:superclass, $:bodystmt) %*/
14951 local_pop(p);
14952 p->ctxt.in_class = (yyvsp[-5].ctxt).in_class;
14953 p->ctxt.cant_return = (yyvsp[-5].ctxt).cant_return;
14954 p->ctxt.shareable_constant_value = (yyvsp[-5].ctxt).shareable_constant_value;
14955 }
14956#line 14957 "parse.c"
14957 break;
14958
14959 case 385: /* $@21: %empty */
14960#line 4628 "parse.y"
14961 {
14962 begin_definition("", &(yylsp[-2]), &(yylsp[-1]));
14963 }
14964#line 14965 "parse.c"
14965 break;
14966
14967 case 386: /* primary: k_class "<<" expr_value $@21 term bodystmt k_end */
14968#line 4634 "parse.y"
14969 {
14970 (yyval.node) = NEW_SCLASS((yyvsp[-4].node), (yyvsp[-1].node), &(yyloc), &(yylsp[-6]), &(yylsp[-5]), &(yylsp[0]));
14971 nd_set_line(RNODE_SCLASS((yyval.node))->nd_body, (yylsp[0]).end_pos.lineno);
14972 set_line_body((yyvsp[-1].node), nd_line((yyvsp[-4].node)));
14973 fixpos((yyval.node), (yyvsp[-4].node));
14974 /*% ripper: sclass!($:expr_value, $:bodystmt) %*/
14975 local_pop(p);
14976 p->ctxt.in_def = (yyvsp[-6].ctxt).in_def;
14977 p->ctxt.in_class = (yyvsp[-6].ctxt).in_class;
14978 p->ctxt.cant_return = (yyvsp[-6].ctxt).cant_return;
14979 p->ctxt.shareable_constant_value = (yyvsp[-6].ctxt).shareable_constant_value;
14980 }
14981#line 14982 "parse.c"
14982 break;
14983
14984 case 387: /* $@22: %empty */
14985#line 4647 "parse.y"
14986 {
14987 begin_definition("module", &(yylsp[-1]), &(yylsp[0]));
14988 }
14989#line 14990 "parse.c"
14990 break;
14991
14992 case 388: /* primary: k_module cpath $@22 bodystmt k_end */
14993#line 4652 "parse.y"
14994 {
14995 (yyval.node) = NEW_MODULE((yyvsp[-3].node), (yyvsp[-1].node), &(yyloc), &(yylsp[-4]), &(yylsp[0]));
14996 nd_set_line(RNODE_MODULE((yyval.node))->nd_body, (yylsp[0]).end_pos.lineno);
14997 set_line_body((yyvsp[-1].node), (yylsp[-3]).end_pos.lineno);
14998 nd_set_line((yyval.node), (yylsp[-3]).end_pos.lineno);
14999 /*% ripper: module!($:cpath, $:bodystmt) %*/
15000 local_pop(p);
15001 p->ctxt.in_class = (yyvsp[-4].ctxt).in_class;
15002 p->ctxt.cant_return = (yyvsp[-4].ctxt).cant_return;
15003 p->ctxt.shareable_constant_value = (yyvsp[-4].ctxt).shareable_constant_value;
15004 }
15005#line 15006 "parse.c"
15006 break;
15007
15008 case 389: /* $@23: %empty */
15009#line 4665 "parse.y"
15010 {
15011 push_end_expect_token_locations(p, &(yylsp[-1]).beg_pos);
15012 }
15013#line 15014 "parse.c"
15014 break;
15015
15016 case 390: /* primary: defn_head f_arglist $@23 bodystmt k_end */
15017#line 4670 "parse.y"
15018 {
15019 restore_defun(p, (yyvsp[-4].node_def_temp));
15020 ((yyval.node) = (yyvsp[-4].node_def_temp)->nd_def)->nd_loc = (yyloc);
15021 (yyvsp[-1].node) = new_scope_body(p, (yyvsp[-3].node_args), (yyvsp[-1].node), (yyval.node), &(yyloc));
15022 RNODE_DEFN((yyval.node))->nd_defn = (yyvsp[-1].node);
15023 /*% ripper: def!($:head, $:args, $:bodystmt) %*/
15024 local_pop(p);
15025 }
15026#line 15027 "parse.c"
15027 break;
15028
15029 case 391: /* $@24: %empty */
15030#line 4680 "parse.y"
15031 {
15032 push_end_expect_token_locations(p, &(yylsp[-1]).beg_pos);
15033 }
15034#line 15035 "parse.c"
15035 break;
15036
15037 case 392: /* primary: defs_head f_arglist $@24 bodystmt k_end */
15038#line 4685 "parse.y"
15039 {
15040 restore_defun(p, (yyvsp[-4].node_def_temp));
15041 ((yyval.node) = (yyvsp[-4].node_def_temp)->nd_def)->nd_loc = (yyloc);
15042 (yyvsp[-1].node) = new_scope_body(p, (yyvsp[-3].node_args), (yyvsp[-1].node), (yyval.node), &(yyloc));
15043 RNODE_DEFS((yyval.node))->nd_defn = (yyvsp[-1].node);
15044 /*% ripper: defs!(*$:head[0..2], $:args, $:bodystmt) %*/
15045 local_pop(p);
15046 }
15047#line 15048 "parse.c"
15048 break;
15049
15050 case 393: /* primary: "'break'" */
15051#line 4694 "parse.y"
15052 {
15053 (yyval.node) = add_block_exit(p, NEW_BREAK(0, &(yyloc), &(yylsp[0])));
15054 /*% ripper: break!(args_new!) %*/
15055 }
15056#line 15057 "parse.c"
15057 break;
15058
15059 case 394: /* primary: "'next'" */
15060#line 4699 "parse.y"
15061 {
15062 (yyval.node) = add_block_exit(p, NEW_NEXT(0, &(yyloc), &(yylsp[0])));
15063 /*% ripper: next!(args_new!) %*/
15064 }
15065#line 15066 "parse.c"
15066 break;
15067
15068 case 395: /* primary: "'redo'" */
15069#line 4704 "parse.y"
15070 {
15071 (yyval.node) = add_block_exit(p, NEW_REDO(&(yyloc), &(yylsp[0])));
15072 /*% ripper: redo! %*/
15073 }
15074#line 15075 "parse.c"
15075 break;
15076
15077 case 396: /* primary: "'retry'" */
15078#line 4709 "parse.y"
15079 {
15080 if (!p->ctxt.in_defined) {
15081 switch (p->ctxt.in_rescue) {
15082 case before_rescue: yyerror1(&(yylsp[0]), "Invalid retry without rescue"); break;
15083 case after_rescue: /* ok */ break;
15084 case after_else: yyerror1(&(yylsp[0]), "Invalid retry after else"); break;
15085 case after_ensure: yyerror1(&(yylsp[0]), "Invalid retry after ensure"); break;
15086 }
15087 }
15088 (yyval.node) = NEW_RETRY(&(yyloc));
15089 /*% ripper: retry! %*/
15090 }
15091#line 15092 "parse.c"
15092 break;
15093
15094 case 397: /* value_expr_primary: primary */
15095#line 3161 "parse.y"
15096 {
15097 value_expr(p, (yyvsp[0].node));
15098 (yyval.node) = (yyvsp[0].node);
15099 }
15100#line 15101 "parse.c"
15101 break;
15102
15103 case 399: /* k_begin: "'begin'" */
15104#line 4727 "parse.y"
15105 {
15106 token_info_push(p, "begin", &(yyloc));
15107 push_end_expect_token_locations(p, &(yylsp[0]).beg_pos);
15108 }
15109#line 15110 "parse.c"
15110 break;
15111
15112 case 400: /* k_if: "'if'" */
15113#line 4734 "parse.y"
15114 {
15115 WARN_EOL("if");
15116 token_info_push(p, "if", &(yyloc));
15117 if (p->token_info && p->token_info->nonspc &&
15118 p->token_info->next && !strcmp(p->token_info->next->token, "else")) {
15119 const char *tok = p->lex.ptok - rb_strlen_lit("if");
15120 const char *beg = p->lex.pbeg + p->token_info->next->beg.column;
15121 beg += rb_strlen_lit("else");
15122 while (beg < tok && ISSPACE(*beg)) beg++;
15123 if (beg == tok) {
15124 p->token_info->nonspc = 0;
15125 }
15126 }
15127 push_end_expect_token_locations(p, &(yylsp[0]).beg_pos);
15128 }
15129#line 15130 "parse.c"
15130 break;
15131
15132 case 401: /* k_unless: "'unless'" */
15133#line 4752 "parse.y"
15134 {
15135 token_info_push(p, "unless", &(yyloc));
15136 push_end_expect_token_locations(p, &(yylsp[0]).beg_pos);
15137 }
15138#line 15139 "parse.c"
15139 break;
15140
15141 case 402: /* k_while: "'while'" allow_exits */
15142#line 4759 "parse.y"
15143 {
15144 (yyval.node_exits) = (yyvsp[0].node_exits);
15145 token_info_push(p, "while", &(yyloc));
15146 push_end_expect_token_locations(p, &(yylsp[-1]).beg_pos);
15147 }
15148#line 15149 "parse.c"
15149 break;
15150
15151 case 403: /* k_until: "'until'" allow_exits */
15152#line 4767 "parse.y"
15153 {
15154 (yyval.node_exits) = (yyvsp[0].node_exits);
15155 token_info_push(p, "until", &(yyloc));
15156 push_end_expect_token_locations(p, &(yylsp[-1]).beg_pos);
15157 }
15158#line 15159 "parse.c"
15159 break;
15160
15161 case 404: /* k_case: "'case'" */
15162#line 4775 "parse.y"
15163 {
15164 token_info_push(p, "case", &(yyloc));
15165 push_end_expect_token_locations(p, &(yylsp[0]).beg_pos);
15166 }
15167#line 15168 "parse.c"
15168 break;
15169
15170 case 405: /* k_for: "'for'" allow_exits */
15171#line 4782 "parse.y"
15172 {
15173 (yyval.node_exits) = (yyvsp[0].node_exits);
15174 token_info_push(p, "for", &(yyloc));
15175 push_end_expect_token_locations(p, &(yylsp[-1]).beg_pos);
15176 }
15177#line 15178 "parse.c"
15178 break;
15179
15180 case 406: /* k_class: "'class'" */
15181#line 4790 "parse.y"
15182 {
15183 token_info_push(p, "class", &(yyloc));
15184 (yyval.ctxt) = p->ctxt;
15185 p->ctxt.in_rescue = before_rescue;
15186 push_end_expect_token_locations(p, &(yylsp[0]).beg_pos);
15187 }
15188#line 15189 "parse.c"
15189 break;
15190
15191 case 407: /* k_module: "'module'" */
15192#line 4799 "parse.y"
15193 {
15194 token_info_push(p, "module", &(yyloc));
15195 (yyval.ctxt) = p->ctxt;
15196 p->ctxt.in_rescue = before_rescue;
15197 push_end_expect_token_locations(p, &(yylsp[0]).beg_pos);
15198 }
15199#line 15200 "parse.c"
15200 break;
15201
15202 case 408: /* k_def: "'def'" */
15203#line 4808 "parse.y"
15204 {
15205 token_info_push(p, "def", &(yyloc));
15206 (yyval.node_def_temp) = NEW_DEF_TEMP(&(yyloc));
15207 p->ctxt.in_argdef = 1;
15208 }
15209#line 15210 "parse.c"
15210 break;
15211
15212 case 409: /* k_do: "'do'" */
15213#line 4816 "parse.y"
15214 {
15215 token_info_push(p, "do", &(yyloc));
15216 push_end_expect_token_locations(p, &(yylsp[0]).beg_pos);
15217 }
15218#line 15219 "parse.c"
15219 break;
15220
15221 case 410: /* k_do_block: "'do' for block" */
15222#line 4823 "parse.y"
15223 {
15224 token_info_push(p, "do", &(yyloc));
15225 push_end_expect_token_locations(p, &(yylsp[0]).beg_pos);
15226 }
15227#line 15228 "parse.c"
15228 break;
15229
15230 case 411: /* k_rescue: "'rescue'" */
15231#line 4830 "parse.y"
15232 {
15233 token_info_warn(p, "rescue", p->token_info, 1, &(yyloc));
15234 (yyval.ctxt) = p->ctxt;
15235 p->ctxt.in_rescue = after_rescue;
15236 }
15237#line 15238 "parse.c"
15238 break;
15239
15240 case 412: /* k_ensure: "'ensure'" */
15241#line 4838 "parse.y"
15242 {
15243 token_info_warn(p, "ensure", p->token_info, 1, &(yyloc));
15244 (yyval.ctxt) = p->ctxt;
15245 }
15246#line 15247 "parse.c"
15247 break;
15248
15249 case 413: /* k_when: "'when'" */
15250#line 4845 "parse.y"
15251 {
15252 token_info_warn(p, "when", p->token_info, 0, &(yyloc));
15253 }
15254#line 15255 "parse.c"
15255 break;
15256
15257 case 414: /* k_else: "'else'" */
15258#line 4851 "parse.y"
15259 {
15260 token_info *ptinfo_beg = p->token_info;
15261 int same = ptinfo_beg && strcmp(ptinfo_beg->token, "case") != 0;
15262 token_info_warn(p, "else", p->token_info, same, &(yyloc));
15263 if (same) {
15264 token_info e;
15265 e.next = ptinfo_beg->next;
15266 e.token = "else";
15267 token_info_setup(&e, p->lex.pbeg, &(yyloc));
15268 if (!e.nonspc) *ptinfo_beg = e;
15269 }
15270 }
15271#line 15272 "parse.c"
15272 break;
15273
15274 case 415: /* k_elsif: "'elsif'" */
15275#line 4866 "parse.y"
15276 {
15277 WARN_EOL("elsif");
15278 token_info_warn(p, "elsif", p->token_info, 1, &(yyloc));
15279 }
15280#line 15281 "parse.c"
15281 break;
15282
15283 case 416: /* k_end: "'end'" */
15284#line 4873 "parse.y"
15285 {
15286 token_info_pop(p, "end", &(yyloc));
15287 pop_end_expect_token_locations(p);
15288 }
15289#line 15290 "parse.c"
15290 break;
15291
15292 case 417: /* k_end: "dummy end" */
15293#line 4878 "parse.y"
15294 {
15295 compile_error(p, "syntax error, unexpected end-of-input");
15296 }
15297#line 15298 "parse.c"
15298 break;
15299
15300 case 418: /* k_return: "'return'" */
15301#line 4884 "parse.y"
15302 {
15303 if (p->ctxt.cant_return && !dyna_in_block(p))
15304 yyerror1(&(yylsp[0]), "Invalid return in class/module body");
15305 }
15306#line 15307 "parse.c"
15307 break;
15308
15309 case 419: /* k_yield: "'yield'" */
15310#line 4891 "parse.y"
15311 {
15312 if (!p->ctxt.in_defined && !p->ctxt.in_def && !compile_for_eval)
15313 yyerror1(&(yylsp[0]), "Invalid yield");
15314 }
15315#line 15316 "parse.c"
15316 break;
15317
15318 case 424: /* do: "'do' for condition" */
15319#line 4903 "parse.y"
15320 { (yyval.id) = keyword_do_cond; }
15321#line 15322 "parse.c"
15322 break;
15323
15324 case 426: /* if_tail: k_elsif expr_value then compstmt_stmts if_tail */
15325#line 4910 "parse.y"
15326 {
15327 (yyval.node) = new_if(p, (yyvsp[-3].node), (yyvsp[-1].node), (yyvsp[0].node), &(yyloc), &(yylsp[-4]), &(yylsp[-2]), &NULL_LOC);
15328 fixpos((yyval.node), (yyvsp[-3].node));
15329 /*% ripper: elsif!($:2, $:4, $:5) %*/
15330 }
15331#line 15332 "parse.c"
15332 break;
15333
15334 case 428: /* opt_else: k_else compstmt_stmts */
15335#line 4919 "parse.y"
15336 {
15337 (yyval.node) = (yyvsp[0].node);
15338 /*% ripper: else!($:2) %*/
15339 }
15340#line 15341 "parse.c"
15341 break;
15342
15343 case 431: /* f_marg: f_norm_arg */
15344#line 4930 "parse.y"
15345 {
15346 (yyval.node) = assignable(p, (yyvsp[0].id), 0, &(yyloc));
15347 mark_lvar_used(p, (yyval.node));
15348 }
15349#line 15350 "parse.c"
15350 break;
15351
15352 case 432: /* f_marg: "(" f_margs rparen */
15353#line 4935 "parse.y"
15354 {
15355 (yyval.node) = (NODE *)(yyvsp[-1].node_masgn);
15356 /*% ripper: mlhs_paren!($:2) %*/
15357 }
15358#line 15359 "parse.c"
15359 break;
15360
15361 case 433: /* mlhs_items_f_marg: f_marg */
15362#line 3048 "parse.y"
15363 {
15364 (yyval.node) = NEW_LIST((yyvsp[0].node), &(yyloc));
15365 /*% ripper: mlhs_add!(mlhs_new!, $:1) %*/
15366 }
15367#line 15368 "parse.c"
15368 break;
15369
15370 case 434: /* mlhs_items_f_marg: mlhs_items_f_marg ',' f_marg */
15371#line 3053 "parse.y"
15372 {
15373 (yyval.node) = list_append(p, (yyvsp[-2].node), (yyvsp[0].node));
15374 /*% ripper: mlhs_add!($:1, $:3) %*/
15375 }
15376#line 15377 "parse.c"
15377 break;
15378
15379 case 435: /* f_margs: mlhs_items_f_marg */
15380#line 4943 "parse.y"
15381 {
15382 (yyval.node_masgn) = NEW_MASGN((yyvsp[0].node), 0, &(yyloc));
15383 /*% ripper: $:1 %*/
15384 }
15385#line 15386 "parse.c"
15386 break;
15387
15388 case 436: /* f_margs: mlhs_items_f_marg ',' f_rest_marg */
15389#line 4948 "parse.y"
15390 {
15391 (yyval.node_masgn) = NEW_MASGN((yyvsp[-2].node), (yyvsp[0].node), &(yyloc));
15392 /*% ripper: mlhs_add_star!($:1, $:3) %*/
15393 }
15394#line 15395 "parse.c"
15395 break;
15396
15397 case 437: /* f_margs: mlhs_items_f_marg ',' f_rest_marg ',' mlhs_items_f_marg */
15398#line 4953 "parse.y"
15399 {
15400 (yyval.node_masgn) = NEW_MASGN((yyvsp[-4].node), NEW_POSTARG((yyvsp[-2].node), (yyvsp[0].node), &(yyloc)), &(yyloc));
15401 /*% ripper: mlhs_add_post!(mlhs_add_star!($:1, $:3), $:5) %*/
15402 }
15403#line 15404 "parse.c"
15404 break;
15405
15406 case 438: /* f_margs: f_rest_marg */
15407#line 4958 "parse.y"
15408 {
15409 (yyval.node_masgn) = NEW_MASGN(0, (yyvsp[0].node), &(yyloc));
15410 /*% ripper: mlhs_add_star!(mlhs_new!, $:1) %*/
15411 }
15412#line 15413 "parse.c"
15413 break;
15414
15415 case 439: /* f_margs: f_rest_marg ',' mlhs_items_f_marg */
15416#line 4963 "parse.y"
15417 {
15418 (yyval.node_masgn) = NEW_MASGN(0, NEW_POSTARG((yyvsp[-2].node), (yyvsp[0].node), &(yyloc)), &(yyloc));
15419 /*% ripper: mlhs_add_post!(mlhs_add_star!(mlhs_new!, $:1), $:3) %*/
15420 }
15421#line 15422 "parse.c"
15422 break;
15423
15424 case 440: /* f_rest_marg: "*" f_norm_arg */
15425#line 4970 "parse.y"
15426 {
15427 /*% ripper: $:2 %*/
15428 (yyval.node) = assignable(p, (yyvsp[0].id), 0, &(yyloc));
15429 mark_lvar_used(p, (yyval.node));
15430 }
15431#line 15432 "parse.c"
15432 break;
15433
15434 case 441: /* f_rest_marg: "*" */
15435#line 4976 "parse.y"
15436 {
15437 (yyval.node) = NODE_SPECIAL_NO_NAME_REST;
15438 /*% ripper: Qnil %*/
15439 }
15440#line 15441 "parse.c"
15441 break;
15442
15443 case 443: /* f_any_kwrest: f_no_kwarg */
15444#line 4984 "parse.y"
15445 {
15446 (yyval.id) = idNil;
15447 /*% ripper: ID2VAL(idNil) %*/
15448 }
15449#line 15450 "parse.c"
15450 break;
15451
15452 case 444: /* $@25: %empty */
15453#line 4990 "parse.y"
15454 {p->ctxt.in_argdef = 0;}
15455#line 15456 "parse.c"
15456 break;
15457
15458 case 446: /* f_kw_primary_value: f_label primary_value */
15459#line 3020 "parse.y"
15460 {
15461 p->ctxt.in_argdef = 1;
15462 (yyval.node_kw_arg) = new_kw_arg(p, assignable(p, (yyvsp[-1].id), (yyvsp[0].node), &(yyloc)), &(yyloc));
15463 /*% ripper: [$:$, $:value] %*/
15464 }
15465#line 15466 "parse.c"
15466 break;
15467
15468 case 447: /* f_kw_primary_value: f_label */
15469#line 3026 "parse.y"
15470 {
15471 p->ctxt.in_argdef = 1;
15472 (yyval.node_kw_arg) = new_kw_arg(p, assignable(p, (yyvsp[0].id), NODE_SPECIAL_REQUIRED_KEYWORD, &(yyloc)), &(yyloc));
15473 /*% ripper: [$:$, 0] %*/
15474 }
15475#line 15476 "parse.c"
15476 break;
15477
15478 case 448: /* f_kwarg_primary_value: f_kw_primary_value */
15479#line 3035 "parse.y"
15480 {
15481 (yyval.node_kw_arg) = (yyvsp[0].node_kw_arg);
15482 /*% ripper: rb_ary_new3(1, $:1) %*/
15483 }
15484#line 15485 "parse.c"
15485 break;
15486
15487 case 449: /* f_kwarg_primary_value: f_kwarg_primary_value ',' f_kw_primary_value */
15488#line 3040 "parse.y"
15489 {
15490 (yyval.node_kw_arg) = kwd_append((yyvsp[-2].node_kw_arg), (yyvsp[0].node_kw_arg));
15491 /*% ripper: rb_ary_push($:1, $:3) %*/
15492 }
15493#line 15494 "parse.c"
15494 break;
15495
15496 case 450: /* opt_f_block_arg_none: ',' f_block_arg */
15497#line 2957 "parse.y"
15498 {
15499 (yyval.id) = (yyvsp[0].id);
15500 /*% ripper: $:2 %*/
15501 }
15502#line 15503 "parse.c"
15503 break;
15504
15505 case 452: /* args_tail_basic_primary_value_none: f_kwarg_primary_value ',' f_kwrest opt_f_block_arg_none */
15506#line 2934 "parse.y"
15507 {
15508 (yyval.node_args) = new_args_tail(p, (yyvsp[-3].node_kw_arg), (yyvsp[-1].id), (yyvsp[0].id), &(yylsp[-1]));
15509 /*% ripper: [$:1, $:3, $:4] %*/
15510 }
15511#line 15512 "parse.c"
15512 break;
15513
15514 case 453: /* args_tail_basic_primary_value_none: f_kwarg_primary_value opt_f_block_arg_none */
15515#line 2939 "parse.y"
15516 {
15517 (yyval.node_args) = new_args_tail(p, (yyvsp[-1].node_kw_arg), 0, (yyvsp[0].id), &(yylsp[-1]));
15518 /*% ripper: [$:1, Qnil, $:2] %*/
15519 }
15520#line 15521 "parse.c"
15521 break;
15522
15523 case 454: /* args_tail_basic_primary_value_none: f_any_kwrest opt_f_block_arg_none */
15524#line 2944 "parse.y"
15525 {
15526 (yyval.node_args) = new_args_tail(p, 0, (yyvsp[-1].id), (yyvsp[0].id), &(yylsp[-1]));
15527 /*% ripper: [Qnil, $:1, $:2] %*/
15528 }
15529#line 15530 "parse.c"
15530 break;
15531
15532 case 455: /* args_tail_basic_primary_value_none: f_block_arg */
15533#line 2949 "parse.y"
15534 {
15535 (yyval.node_args) = new_args_tail(p, 0, 0, (yyvsp[0].id), &(yylsp[0]));
15536 /*% ripper: [Qnil, Qnil, $:1] %*/
15537 }
15538#line 15539 "parse.c"
15539 break;
15540
15541 case 457: /* excessed_comma: ',' */
15542#line 4996 "parse.y"
15543 {
15544 /* magic number for rest_id in iseq_set_arguments() */
15545 (yyval.id) = NODE_SPECIAL_EXCESSIVE_COMMA;
15546 /*% ripper: excessed_comma! %*/
15547 }
15548#line 15549 "parse.c"
15549 break;
15550
15551 case 458: /* f_opt_primary_value: f_arg_asgn f_eq primary_value */
15552#line 2998 "parse.y"
15553 {
15554 p->ctxt.in_argdef = 1;
15555 (yyval.node_opt_arg) = NEW_OPT_ARG(assignable(p, (yyvsp[-2].id), (yyvsp[0].node), &(yyloc)), &(yyloc));
15556 /*% ripper: [$:$, $:3] %*/
15557 }
15558#line 15559 "parse.c"
15559 break;
15560
15561 case 459: /* f_opt_arg_primary_value: f_opt_primary_value */
15562#line 3007 "parse.y"
15563 {
15564 (yyval.node_opt_arg) = (yyvsp[0].node_opt_arg);
15565 /*% ripper: rb_ary_new3(1, $:1) %*/
15566 }
15567#line 15568 "parse.c"
15568 break;
15569
15570 case 460: /* f_opt_arg_primary_value: f_opt_arg_primary_value ',' f_opt_primary_value */
15571#line 3012 "parse.y"
15572 {
15573 (yyval.node_opt_arg) = opt_arg_append((yyvsp[-2].node_opt_arg), (yyvsp[0].node_opt_arg));
15574 /*% ripper: rb_ary_push($:1, $:3) %*/
15575 }
15576#line 15577 "parse.c"
15577 break;
15578
15579 case 461: /* opt_args_tail_block_args_tail_none: ',' block_args_tail */
15580#line 3107 "parse.y"
15581 {
15582 (yyval.node_args) = (yyvsp[0].node_args);
15583 /*% ripper: $:tail %*/
15584 }
15585#line 15586 "parse.c"
15586 break;
15587
15588 case 462: /* opt_args_tail_block_args_tail_none: none */
15589#line 3112 "parse.y"
15590 {
15591 (yyval.node_args) = new_empty_args_tail(p, &(yyloc));
15592 /*% ripper: [Qnil, Qnil, Qnil] %*/
15593 }
15594#line 15595 "parse.c"
15595 break;
15596
15597 case 463: /* args-list_primary_value_opt_args_tail_block_args_tail_none: f_arg ',' f_opt_arg_primary_value ',' f_rest_arg opt_args_tail_block_args_tail_none */
15598#line 6277 "parse.y"
15599 {
15600 (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));
15601 /*% ripper: params!($:pre, $:opt, $:rest, Qnil, *$:tail[0..2]) %*/
15602 }
15603#line 15604 "parse.c"
15604 break;
15605
15606 case 464: /* args-list_primary_value_opt_args_tail_block_args_tail_none: f_arg ',' f_opt_arg_primary_value ',' f_rest_arg ',' f_arg opt_args_tail_block_args_tail_none */
15607#line 6282 "parse.y"
15608 {
15609 (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));
15610 /*% ripper: params!($:pre, $:opt, $:rest, $:post, *$:tail[0..2]) %*/
15611 }
15612#line 15613 "parse.c"
15613 break;
15614
15615 case 465: /* args-list_primary_value_opt_args_tail_block_args_tail_none: f_arg ',' f_opt_arg_primary_value opt_args_tail_block_args_tail_none */
15616#line 6287 "parse.y"
15617 {
15618 (yyval.node_args) = new_args(p, (yyvsp[-3].node_args_aux), (yyvsp[-1].node_opt_arg), 0, 0, (yyvsp[0].node_args), &(yyloc));
15619 /*% ripper: params!($:pre, $:opt, Qnil, Qnil, *$:tail[0..2]) %*/
15620 }
15621#line 15622 "parse.c"
15622 break;
15623
15624 case 466: /* args-list_primary_value_opt_args_tail_block_args_tail_none: f_arg ',' f_opt_arg_primary_value ',' f_arg opt_args_tail_block_args_tail_none */
15625#line 6292 "parse.y"
15626 {
15627 (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));
15628 /*% ripper: params!($:pre, $:opt, Qnil, $:post, *$:tail[0..2]) %*/
15629 }
15630#line 15631 "parse.c"
15631 break;
15632
15633 case 467: /* args-list_primary_value_opt_args_tail_block_args_tail_none: f_arg ',' f_rest_arg opt_args_tail_block_args_tail_none */
15634#line 6297 "parse.y"
15635 {
15636 (yyval.node_args) = new_args(p, (yyvsp[-3].node_args_aux), 0, (yyvsp[-1].id), 0, (yyvsp[0].node_args), &(yyloc));
15637 /*% ripper: params!($:pre, Qnil, $:rest, Qnil, *$:tail[0..2]) %*/
15638 }
15639#line 15640 "parse.c"
15640 break;
15641
15642 case 468: /* args-list_primary_value_opt_args_tail_block_args_tail_none: f_arg ',' f_rest_arg ',' f_arg opt_args_tail_block_args_tail_none */
15643#line 6302 "parse.y"
15644 {
15645 (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));
15646 /*% ripper: params!($:pre, Qnil, $:rest, $:post, *$:tail[0..2]) %*/
15647 }
15648#line 15649 "parse.c"
15649 break;
15650
15651 case 469: /* args-list_primary_value_opt_args_tail_block_args_tail_none: f_opt_arg_primary_value ',' f_rest_arg opt_args_tail_block_args_tail_none */
15652#line 6307 "parse.y"
15653 {
15654 (yyval.node_args) = new_args(p, 0, (yyvsp[-3].node_opt_arg), (yyvsp[-1].id), 0, (yyvsp[0].node_args), &(yyloc));
15655 /*% ripper: params!(Qnil, $:opt, $:rest, Qnil, *$:tail[0..2]) %*/
15656 }
15657#line 15658 "parse.c"
15658 break;
15659
15660 case 470: /* args-list_primary_value_opt_args_tail_block_args_tail_none: f_opt_arg_primary_value ',' f_rest_arg ',' f_arg opt_args_tail_block_args_tail_none */
15661#line 6312 "parse.y"
15662 {
15663 (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));
15664 /*% ripper: params!(Qnil, $:opt, $:rest, $:post, *$:tail[0..2]) %*/
15665 }
15666#line 15667 "parse.c"
15667 break;
15668
15669 case 471: /* args-list_primary_value_opt_args_tail_block_args_tail_none: f_opt_arg_primary_value opt_args_tail_block_args_tail_none */
15670#line 6317 "parse.y"
15671 {
15672 (yyval.node_args) = new_args(p, 0, (yyvsp[-1].node_opt_arg), 0, 0, (yyvsp[0].node_args), &(yyloc));
15673 /*% ripper: params!(Qnil, $:opt, Qnil, Qnil, *$:tail[0..2]) %*/
15674 }
15675#line 15676 "parse.c"
15676 break;
15677
15678 case 472: /* args-list_primary_value_opt_args_tail_block_args_tail_none: f_opt_arg_primary_value ',' f_arg opt_args_tail_block_args_tail_none */
15679#line 6322 "parse.y"
15680 {
15681 (yyval.node_args) = new_args(p, 0, (yyvsp[-3].node_opt_arg), 0, (yyvsp[-1].node_args_aux), (yyvsp[0].node_args), &(yyloc));
15682 /*% ripper: params!(Qnil, $:opt, Qnil, $:post, *$:tail[0..2]) %*/
15683 }
15684#line 15685 "parse.c"
15685 break;
15686
15687 case 473: /* args-list_primary_value_opt_args_tail_block_args_tail_none: f_rest_arg opt_args_tail_block_args_tail_none */
15688#line 6327 "parse.y"
15689 {
15690 (yyval.node_args) = new_args(p, 0, 0, (yyvsp[-1].id), 0, (yyvsp[0].node_args), &(yyloc));
15691 /*% ripper: params!(Qnil, Qnil, $:rest, Qnil, *$:tail[0..2]) %*/
15692 }
15693#line 15694 "parse.c"
15694 break;
15695
15696 case 474: /* args-list_primary_value_opt_args_tail_block_args_tail_none: f_rest_arg ',' f_arg opt_args_tail_block_args_tail_none */
15697#line 6332 "parse.y"
15698 {
15699 (yyval.node_args) = new_args(p, 0, 0, (yyvsp[-3].id), (yyvsp[-1].node_args_aux), (yyvsp[0].node_args), &(yyloc));
15700 /*% ripper: params!(Qnil, Qnil, $:rest, $:post, *$:tail[0..2]) %*/
15701 }
15702#line 15703 "parse.c"
15703 break;
15704
15705 case 476: /* block_param: f_arg excessed_comma */
15706#line 5005 "parse.y"
15707 {
15708 (yyval.node_args) = new_empty_args_tail(p, &(yylsp[0]));
15709 (yyval.node_args) = new_args(p, (yyvsp[-1].node_args_aux), 0, (yyvsp[0].id), 0, (yyval.node_args), &(yyloc));
15710 /*% ripper: params!($:pre, Qnil, $:excessed_comma, Qnil, Qnil, Qnil, Qnil) %*/
15711 }
15712#line 15713 "parse.c"
15713 break;
15714
15715 case 477: /* block_param: f_arg opt_args_tail_block_args_tail_none */
15716#line 5011 "parse.y"
15717 {
15718 (yyval.node_args) = new_args(p, (yyvsp[-1].node_args_aux), 0, 0, 0, (yyvsp[0].node_args), &(yyloc));
15719 /*% ripper: params!($:pre, Qnil, Qnil, Qnil, *$:tail[0..2]) %*/
15720 }
15721#line 15722 "parse.c"
15722 break;
15723
15724 case 478: /* tail-only-args_block_args_tail: block_args_tail */
15725#line 6340 "parse.y"
15726 {
15727 (yyval.node_args) = new_args(p, 0, 0, 0, 0, (yyvsp[0].node_args), &(yyloc));
15728 /*% ripper: params!(Qnil, Qnil, Qnil, Qnil, *$:tail[0..2]) %*/
15729 }
15730#line 15731 "parse.c"
15731 break;
15732
15733 case 481: /* opt_block_param_def: block_param_def */
15734#line 5020 "parse.y"
15735 {
15736 p->command_start = TRUE;
15737 }
15738#line 15739 "parse.c"
15739 break;
15740
15741 case 482: /* block_param_def: '|' opt_block_param opt_bv_decl '|' */
15742#line 5026 "parse.y"
15743 {
15744 p->max_numparam = ORDINAL_PARAM;
15745 p->ctxt.in_argdef = 0;
15746 (yyval.node_args) = (yyvsp[-2].node_args);
15747 /*% ripper: block_var!($:2, $:3) %*/
15748 }
15749#line 15750 "parse.c"
15750 break;
15751
15752 case 483: /* opt_block_param: %empty */
15753#line 5035 "parse.y"
15754 {
15755 (yyval.node_args) = 0;
15756 /*% ripper: params!(Qnil,Qnil,Qnil,Qnil,Qnil,Qnil,Qnil) %*/
15757 }
15758#line 15759 "parse.c"
15759 break;
15760
15761 case 485: /* opt_bv_decl: option_'\n' */
15762#line 5043 "parse.y"
15763 {
15764 (yyval.id) = 0;
15765 /*% ripper: Qfalse %*/
15766 }
15767#line 15768 "parse.c"
15768 break;
15769
15770 case 486: /* opt_bv_decl: option_'\n' ';' bv_decls option_'\n' */
15771#line 5048 "parse.y"
15772 {
15773 (yyval.id) = 0;
15774 /*% ripper: $:3 %*/
15775 }
15776#line 15777 "parse.c"
15777 break;
15778
15779 case 489: /* bvar: "local variable or method" */
15780#line 5061 "parse.y"
15781 {
15782 new_bv(p, (yyvsp[0].id));
15783 /*% ripper: $:1 %*/
15784 }
15785#line 15786 "parse.c"
15786 break;
15787
15788 case 491: /* max_numparam: %empty */
15789#line 5068 "parse.y"
15790 {
15791 (yyval.num) = p->max_numparam;
15792 p->max_numparam = 0;
15793 }
15794#line 15795 "parse.c"
15795 break;
15796
15797 case 492: /* numparam: %empty */
15798#line 5074 "parse.y"
15799 {
15800 (yyval.node) = numparam_push(p);
15801 }
15802#line 15803 "parse.c"
15803 break;
15804
15805 case 493: /* it_id: %empty */
15806#line 5079 "parse.y"
15807 {
15808 (yyval.id) = p->it_id;
15809 p->it_id = 0;
15810 }
15811#line 15812 "parse.c"
15812 break;
15813
15814 case 494: /* @26: %empty */
15815#line 5086 "parse.y"
15816 {
15817 token_info_push(p, "->", &(yylsp[0]));
15818 (yyval.vars) = dyna_push(p);
15819 }
15820#line 15821 "parse.c"
15821 break;
15822
15823 case 495: /* $@27: %empty */
15824#line 5092 "parse.y"
15825 {
15826 CMDARG_PUSH(0);
15827 }
15828#line 15829 "parse.c"
15829 break;
15830
15831 case 496: /* lambda: "->" @26 max_numparam numparam it_id allow_exits f_larglist $@27 lambda_body */
15832#line 5096 "parse.y"
15833 {
15834 int max_numparam = p->max_numparam;
15835 ID it_id = p->it_id;
15836 p->lex.lpar_beg = (yyvsp[-8].num);
15837 p->max_numparam = (yyvsp[-6].num);
15838 p->it_id = (yyvsp[-4].id);
15839 restore_block_exit(p, (yyvsp[-3].node_exits));
15840 CMDARG_POP();
15841 (yyvsp[-2].node_args) = args_with_numbered(p, (yyvsp[-2].node_args), max_numparam, it_id);
15842 {
15843 YYLTYPE loc = code_loc_gen(&(yylsp[-8]), &(yylsp[0]));
15844 (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);
15845 nd_set_line(RNODE_LAMBDA((yyval.node))->nd_body, (yylsp[0]).end_pos.lineno);
15846 nd_set_line((yyval.node), (yylsp[-2]).end_pos.lineno);
15847 nd_set_first_loc((yyval.node), (yylsp[-8]).beg_pos);
15848 xfree((yyvsp[0].locations_lambda_body));
15849 }
15850 /*% ripper: lambda!($:args, $:body) %*/
15851 numparam_pop(p, (yyvsp[-5].node));
15852 dyna_pop(p, (yyvsp[-7].vars));
15853 }
15854#line 15855 "parse.c"
15855 break;
15856
15857 case 497: /* f_larglist: '(' f_largs opt_bv_decl ')' */
15858#line 5120 "parse.y"
15859 {
15860 p->ctxt.in_argdef = 0;
15861 (yyval.node_args) = (yyvsp[-2].node_args);
15862 p->max_numparam = ORDINAL_PARAM;
15863 /*% ripper: paren!($:args) %*/
15864 }
15865#line 15866 "parse.c"
15866 break;
15867
15868 case 498: /* f_larglist: f_largs */
15869#line 5127 "parse.y"
15870 {
15871 p->ctxt.in_argdef = 0;
15872 if (!args_info_empty_p(&(yyvsp[0].node_args)->nd_ainfo))
15873 p->max_numparam = ORDINAL_PARAM;
15874 (yyval.node_args) = (yyvsp[0].node_args);
15875 }
15876#line 15877 "parse.c"
15877 break;
15878
15879 case 499: /* lambda_body: tLAMBEG compstmt_stmts '}' */
15880#line 5136 "parse.y"
15881 {
15882 token_info_pop(p, "}", &(yylsp[0]));
15883 (yyval.locations_lambda_body) = new_locations_lambda_body(p, (yyvsp[-1].node), &(yylsp[-1]), &(yylsp[-2]), &(yylsp[0]));
15884 /*% ripper: $:2 %*/
15885 }
15886#line 15887 "parse.c"
15887 break;
15888
15889 case 500: /* $@28: %empty */
15890#line 5142 "parse.y"
15891 {
15892 push_end_expect_token_locations(p, &(yylsp[0]).beg_pos);
15893 }
15894#line 15895 "parse.c"
15895 break;
15896
15897 case 501: /* lambda_body: "'do' for lambda" $@28 bodystmt k_end */
15898#line 5146 "parse.y"
15899 {
15900 (yyval.locations_lambda_body) = new_locations_lambda_body(p, (yyvsp[-1].node), &(yylsp[-1]), &(yylsp[-3]), &(yylsp[0]));
15901 /*% ripper: $:3 %*/
15902 }
15903#line 15904 "parse.c"
15904 break;
15905
15906 case 502: /* do_block: k_do_block do_body k_end */
15907#line 5153 "parse.y"
15908 {
15909 (yyval.node) = (yyvsp[-1].node);
15910 set_embraced_location((yyval.node), &(yylsp[-2]), &(yylsp[0]));
15911 /*% ripper: $:2 %*/
15912 }
15913#line 15914 "parse.c"
15914 break;
15915
15916 case 503: /* block_call: command do_block */
15917#line 5161 "parse.y"
15918 {
15919 (yyval.node) = command_add_block(p, (yyvsp[-1].node), (yyvsp[0].node), &(yyloc));
15920 fixpos((yyval.node), (yyvsp[-1].node));
15921 /*% ripper: method_add_block!($:1, $:2) %*/
15922 }
15923#line 15924 "parse.c"
15924 break;
15925
15926 case 504: /* block_call: block_call call_op2 operation2 opt_paren_args */
15927#line 5167 "parse.y"
15928 {
15929 bool has_args = (yyvsp[0].node) != 0;
15930 if (NODE_EMPTY_ARGS_P((yyvsp[0].node))) (yyvsp[0].node) = 0;
15931 (yyval.node) = new_qcall(p, (yyvsp[-2].id), (yyvsp[-3].node), (yyvsp[-1].id), (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
15932 /*% ripper: call!($:1, $:2, $:3) %*/
15933 if (has_args) {
15934 /*% ripper: method_add_arg!($:$, $:4) %*/
15935 }
15936 }
15937#line 15938 "parse.c"
15938 break;
15939
15940 case 505: /* block_call: block_call call_op2 operation2 opt_paren_args brace_block */
15941#line 5177 "parse.y"
15942 {
15943 if (NODE_EMPTY_ARGS_P((yyvsp[-1].node))) (yyvsp[-1].node) = 0;
15944 (yyval.node) = new_command_qcall(p, (yyvsp[-3].id), (yyvsp[-4].node), (yyvsp[-2].id), (yyvsp[-1].node), (yyvsp[0].node), &(yylsp[-2]), &(yyloc));
15945 /*% ripper: method_add_block!(command_call!($:1, $:2, $:3, $:4), $:5) %*/
15946 }
15947#line 15948 "parse.c"
15948 break;
15949
15950 case 506: /* block_call: block_call call_op2 operation2 command_args do_block */
15951#line 5183 "parse.y"
15952 {
15953 (yyval.node) = new_command_qcall(p, (yyvsp[-3].id), (yyvsp[-4].node), (yyvsp[-2].id), (yyvsp[-1].node), (yyvsp[0].node), &(yylsp[-2]), &(yyloc));
15954 /*% ripper: method_add_block!(command_call!($:1, $:2, $:3, $:4), $:5) %*/
15955 }
15956#line 15957 "parse.c"
15957 break;
15958
15959 case 507: /* block_call: block_call call_op2 paren_args */
15960#line 5188 "parse.y"
15961 {
15962 (yyval.node) = new_qcall(p, (yyvsp[-1].id), (yyvsp[-2].node), idCall, (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
15963 nd_set_line((yyval.node), (yylsp[-1]).end_pos.lineno);
15964 /*% ripper: method_add_arg!(call!($:1, $:2, ID2VAL(idCall)), $:3) %*/
15965 }
15966#line 15967 "parse.c"
15967 break;
15968
15969 case 508: /* method_call: fcall paren_args */
15970#line 5196 "parse.y"
15971 {
15972 (yyvsp[-1].node_fcall)->nd_args = (yyvsp[0].node);
15973 (yyval.node) = (NODE *)(yyvsp[-1].node_fcall);
15974 nd_set_last_loc((yyvsp[-1].node_fcall), (yylsp[0]).end_pos);
15975 /*% ripper: method_add_arg!(fcall!($:1), $:2) %*/
15976 }
15977#line 15978 "parse.c"
15978 break;
15979
15980 case 509: /* method_call: primary_value call_op operation2 opt_paren_args */
15981#line 5203 "parse.y"
15982 {
15983 bool has_args = (yyvsp[0].node) != 0;
15984 if (NODE_EMPTY_ARGS_P((yyvsp[0].node))) (yyvsp[0].node) = 0;
15985 (yyval.node) = new_qcall(p, (yyvsp[-2].id), (yyvsp[-3].node), (yyvsp[-1].id), (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
15986 nd_set_line((yyval.node), (yylsp[-1]).end_pos.lineno);
15987 /*% ripper: call!($:1, $:2, $:3) %*/
15988 if (has_args) {
15989 /*% ripper: method_add_arg!($:$, $:4) %*/
15990 }
15991 }
15992#line 15993 "parse.c"
15993 break;
15994
15995 case 510: /* method_call: primary_value "::" operation2 paren_args */
15996#line 5214 "parse.y"
15997 {
15998 (yyval.node) = new_qcall(p, idCOLON2, (yyvsp[-3].node), (yyvsp[-1].id), (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
15999 nd_set_line((yyval.node), (yylsp[-1]).end_pos.lineno);
16000 /*% ripper: method_add_arg!(call!($:1, $:2, $:3), $:4) %*/
16001 }
16002#line 16003 "parse.c"
16003 break;
16004
16005 case 511: /* method_call: primary_value "::" operation3 */
16006#line 5220 "parse.y"
16007 {
16008 (yyval.node) = new_qcall(p, idCOLON2, (yyvsp[-2].node), (yyvsp[0].id), 0, &(yylsp[0]), &(yyloc));
16009 /*% ripper: call!($:1, $:2, $:3) %*/
16010 }
16011#line 16012 "parse.c"
16012 break;
16013
16014 case 512: /* method_call: primary_value call_op2 paren_args */
16015#line 5225 "parse.y"
16016 {
16017 (yyval.node) = new_qcall(p, (yyvsp[-1].id), (yyvsp[-2].node), idCall, (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
16018 nd_set_line((yyval.node), (yylsp[-1]).end_pos.lineno);
16019 /*% ripper: method_add_arg!(call!($:1, $:2, ID2VAL(idCall)), $:3) %*/
16020 }
16021#line 16022 "parse.c"
16022 break;
16023
16024 case 513: /* method_call: "'super'" paren_args */
16025#line 5231 "parse.y"
16026 {
16027 rb_code_location_t lparen_loc = (yylsp[0]);
16028 rb_code_location_t rparen_loc = (yylsp[0]);
16029 lparen_loc.end_pos.column = lparen_loc.beg_pos.column + 1;
16030 rparen_loc.beg_pos.column = rparen_loc.end_pos.column - 1;
16031
16032 (yyval.node) = NEW_SUPER((yyvsp[0].node), &(yyloc), &(yylsp[-1]), &lparen_loc, &rparen_loc);
16033 /*% ripper: super!($:2) %*/
16034 }
16035#line 16036 "parse.c"
16036 break;
16037
16038 case 514: /* method_call: "'super'" */
16039#line 5241 "parse.y"
16040 {
16041 (yyval.node) = NEW_ZSUPER(&(yyloc));
16042 /*% ripper: zsuper! %*/
16043 }
16044#line 16045 "parse.c"
16045 break;
16046
16047 case 515: /* method_call: primary_value '[' opt_call_args rbracket */
16048#line 5246 "parse.y"
16049 {
16050 (yyval.node) = NEW_CALL((yyvsp[-3].node), tAREF, (yyvsp[-1].node), &(yyloc));
16051 fixpos((yyval.node), (yyvsp[-3].node));
16052 /*% ripper: aref!($:1, $:3) %*/
16053 }
16054#line 16055 "parse.c"
16055 break;
16056
16057 case 516: /* brace_block: '{' brace_body '}' */
16058#line 5254 "parse.y"
16059 {
16060 (yyval.node) = (yyvsp[-1].node);
16061 set_embraced_location((yyval.node), &(yylsp[-2]), &(yylsp[0]));
16062 /*% ripper: $:2 %*/
16063 }
16064#line 16065 "parse.c"
16065 break;
16066
16067 case 517: /* brace_block: k_do do_body k_end */
16068#line 5260 "parse.y"
16069 {
16070 (yyval.node) = (yyvsp[-1].node);
16071 set_embraced_location((yyval.node), &(yylsp[-2]), &(yylsp[0]));
16072 /*% ripper: $:2 %*/
16073 }
16074#line 16075 "parse.c"
16075 break;
16076
16077 case 518: /* @29: %empty */
16078#line 5267 "parse.y"
16079 {(yyval.vars) = dyna_push(p);}
16080#line 16081 "parse.c"
16081 break;
16082
16083 case 519: /* brace_body: @29 max_numparam numparam it_id allow_exits opt_block_param_def compstmt_stmts */
16084#line 5270 "parse.y"
16085 {
16086 int max_numparam = p->max_numparam;
16087 ID it_id = p->it_id;
16088 p->max_numparam = (yyvsp[-5].num);
16089 p->it_id = (yyvsp[-3].id);
16090 (yyvsp[-1].node_args) = args_with_numbered(p, (yyvsp[-1].node_args), max_numparam, it_id);
16091 (yyval.node) = NEW_ITER((yyvsp[-1].node_args), (yyvsp[0].node), &(yyloc));
16092 /*% ripper: brace_block!($:args, $:compstmt) %*/
16093 restore_block_exit(p, (yyvsp[-2].node_exits));
16094 numparam_pop(p, (yyvsp[-4].node));
16095 dyna_pop(p, (yyvsp[-6].vars));
16096 }
16097#line 16098 "parse.c"
16098 break;
16099
16100 case 520: /* @30: %empty */
16101#line 5284 "parse.y"
16102 {
16103 (yyval.vars) = dyna_push(p);
16104 CMDARG_PUSH(0);
16105 }
16106#line 16107 "parse.c"
16107 break;
16108
16109 case 521: /* do_body: @30 max_numparam numparam it_id allow_exits opt_block_param_def bodystmt */
16110#line 5290 "parse.y"
16111 {
16112 int max_numparam = p->max_numparam;
16113 ID it_id = p->it_id;
16114 p->max_numparam = (yyvsp[-5].num);
16115 p->it_id = (yyvsp[-3].id);
16116 (yyvsp[-1].node_args) = args_with_numbered(p, (yyvsp[-1].node_args), max_numparam, it_id);
16117 (yyval.node) = NEW_ITER((yyvsp[-1].node_args), (yyvsp[0].node), &(yyloc));
16118 /*% ripper: do_block!($:args, $:bodystmt) %*/
16119 CMDARG_POP();
16120 restore_block_exit(p, (yyvsp[-2].node_exits));
16121 numparam_pop(p, (yyvsp[-4].node));
16122 dyna_pop(p, (yyvsp[-6].vars));
16123 }
16124#line 16125 "parse.c"
16125 break;
16126
16127 case 522: /* case_args: arg_value */
16128#line 5306 "parse.y"
16129 {
16130 check_literal_when(p, (yyvsp[0].node), &(yylsp[0]));
16131 (yyval.node) = NEW_LIST((yyvsp[0].node), &(yyloc));
16132 /*% ripper: args_add!(args_new!, $:arg_value) %*/
16133 }
16134#line 16135 "parse.c"
16135 break;
16136
16137 case 523: /* case_args: "*" arg_value */
16138#line 5312 "parse.y"
16139 {
16140 (yyval.node) = NEW_SPLAT((yyvsp[0].node), &(yyloc), &(yylsp[-1]));
16141 /*% ripper: args_add_star!(args_new!, $:arg_value) %*/
16142 }
16143#line 16144 "parse.c"
16144 break;
16145
16146 case 524: /* case_args: case_args ',' arg_value */
16147#line 5317 "parse.y"
16148 {
16149 check_literal_when(p, (yyvsp[0].node), &(yylsp[0]));
16150 (yyval.node) = last_arg_append(p, (yyvsp[-2].node), (yyvsp[0].node), &(yyloc));
16151 /*% ripper: args_add!($:non_last_args, $:arg_value) %*/
16152 }
16153#line 16154 "parse.c"
16154 break;
16155
16156 case 525: /* case_args: case_args ',' "*" arg_value */
16157#line 5323 "parse.y"
16158 {
16159 (yyval.node) = rest_arg_append(p, (yyvsp[-3].node), (yyvsp[0].node), &(yyloc));
16160 /*% ripper: args_add_star!($:non_last_args, $:arg_value) %*/
16161 }
16162#line 16163 "parse.c"
16163 break;
16164
16165 case 526: /* case_body: k_when case_args then compstmt_stmts cases */
16166#line 5332 "parse.y"
16167 {
16168 (yyval.node) = NEW_WHEN((yyvsp[-3].node), (yyvsp[-1].node), (yyvsp[0].node), &(yyloc), &(yylsp[-4]), &(yylsp[-2]));
16169 fixpos((yyval.node), (yyvsp[-3].node));
16170 /*% ripper: when!($:2, $:4, $:5) %*/
16171 }
16172#line 16173 "parse.c"
16173 break;
16174
16175 case 529: /* p_pvtbl: %empty */
16176#line 5343 "parse.y"
16177 {(yyval.tbl) = p->pvtbl; p->pvtbl = st_init_numtable();}
16178#line 16179 "parse.c"
16179 break;
16180
16181 case 530: /* p_pktbl: %empty */
16182#line 5344 "parse.y"
16183 {(yyval.tbl) = p->pktbl; p->pktbl = 0;}
16184#line 16185 "parse.c"
16185 break;
16186
16187 case 531: /* p_in_kwarg: %empty */
16188#line 5346 "parse.y"
16189 {
16190 (yyval.ctxt) = p->ctxt;
16191 SET_LEX_STATE(EXPR_BEG|EXPR_LABEL);
16192 p->command_start = FALSE;
16193 p->ctxt.in_kwarg = 1;
16194 p->ctxt.in_alt_pattern = 0;
16195 p->ctxt.capture_in_pattern = 0;
16196 }
16197#line 16198 "parse.c"
16198 break;
16199
16200 case 532: /* $@31: %empty */
16201#line 5359 "parse.y"
16202 {
16203 pop_pktbl(p, (yyvsp[-2].tbl));
16204 pop_pvtbl(p, (yyvsp[-3].tbl));
16205 p->ctxt.in_kwarg = (yyvsp[-4].ctxt).in_kwarg;
16206 p->ctxt.in_alt_pattern = (yyvsp[-4].ctxt).in_alt_pattern;
16207 p->ctxt.capture_in_pattern = (yyvsp[-4].ctxt).capture_in_pattern;
16208 }
16209#line 16210 "parse.c"
16210 break;
16211
16212 case 533: /* p_case_body: "'in'" p_in_kwarg p_pvtbl p_pktbl p_top_expr then $@31 compstmt_stmts p_cases */
16213#line 5368 "parse.y"
16214 {
16215 (yyval.node) = NEW_IN((yyvsp[-4].node), (yyvsp[-1].node), (yyvsp[0].node), &(yyloc), &(yylsp[-8]), &(yylsp[-3]), &NULL_LOC);
16216 /*% ripper: in!($:expr, $:compstmt, $:cases) %*/
16217 }
16218#line 16219 "parse.c"
16219 break;
16220
16221 case 537: /* p_top_expr: p_top_expr_body "'if' modifier" expr_value */
16222#line 5380 "parse.y"
16223 {
16224 (yyval.node) = new_if(p, (yyvsp[0].node), (yyvsp[-2].node), 0, &(yyloc), &(yylsp[-1]), &NULL_LOC, &NULL_LOC);
16225 fixpos((yyval.node), (yyvsp[0].node));
16226 /*% ripper: if_mod!($:3, $:1) %*/
16227 }
16228#line 16229 "parse.c"
16229 break;
16230
16231 case 538: /* p_top_expr: p_top_expr_body "'unless' modifier" expr_value */
16232#line 5386 "parse.y"
16233 {
16234 (yyval.node) = new_unless(p, (yyvsp[0].node), (yyvsp[-2].node), 0, &(yyloc), &(yylsp[-1]), &NULL_LOC, &NULL_LOC);
16235 fixpos((yyval.node), (yyvsp[0].node));
16236 /*% ripper: unless_mod!($:3, $:1) %*/
16237 }
16238#line 16239 "parse.c"
16239 break;
16240
16241 case 540: /* p_top_expr_body: p_expr ',' */
16242#line 5395 "parse.y"
16243 {
16244 (yyval.node) = new_array_pattern_tail(p, 0, 1, 0, 0, &(yyloc));
16245 (yyval.node) = new_array_pattern(p, 0, (yyvsp[-1].node), (yyval.node), &(yyloc));
16246 /*% ripper: aryptn!(Qnil, [$:1], Qnil, Qnil) %*/
16247 }
16248#line 16249 "parse.c"
16249 break;
16250
16251 case 541: /* p_top_expr_body: p_expr ',' p_args */
16252#line 5401 "parse.y"
16253 {
16254 (yyval.node) = new_array_pattern(p, 0, (yyvsp[-2].node), (yyvsp[0].node), &(yyloc));
16255 nd_set_first_loc((yyval.node), (yylsp[-2]).beg_pos);
16256 /*% ripper: aryptn!(Qnil, aryptn_pre_args(p, $:1, $:3[0]), *$:3[1..2]) %*/
16257 }
16258#line 16259 "parse.c"
16259 break;
16260
16261 case 542: /* p_top_expr_body: p_find */
16262#line 5407 "parse.y"
16263 {
16264 (yyval.node) = new_find_pattern(p, 0, (yyvsp[0].node), &(yyloc));
16265 /*% ripper: fndptn!(Qnil, *$:1[0..2]) %*/
16266 }
16267#line 16268 "parse.c"
16268 break;
16269
16270 case 543: /* p_top_expr_body: p_args_tail */
16271#line 5412 "parse.y"
16272 {
16273 (yyval.node) = new_array_pattern(p, 0, 0, (yyvsp[0].node), &(yyloc));
16274 /*% ripper: aryptn!(Qnil, *$:1[0..2]) %*/
16275 }
16276#line 16277 "parse.c"
16277 break;
16278
16279 case 544: /* p_top_expr_body: p_kwargs */
16280#line 5417 "parse.y"
16281 {
16282 (yyval.node) = new_hash_pattern(p, 0, (yyvsp[0].node), &(yyloc));
16283 /*% ripper: hshptn!(Qnil, *$:1[0..1]) %*/
16284 }
16285#line 16286 "parse.c"
16286 break;
16287
16288 case 546: /* p_as: p_expr "=>" p_variable */
16289#line 5427 "parse.y"
16290 {
16291 NODE *n = NEW_LIST((yyvsp[-2].node), &(yyloc));
16292 n = list_append(p, n, (yyvsp[0].node));
16293 (yyval.node) = new_hash(p, n, &(yyloc));
16294 /*% ripper: binary!($:1, ID2VAL((id_assoc)), $:3) %*/
16295 }
16296#line 16297 "parse.c"
16297 break;
16298
16299 case 548: /* $@32: %empty */
16300#line 5437 "parse.y"
16301 {
16302 p->ctxt.in_alt_pattern = 1;
16303 }
16304#line 16305 "parse.c"
16305 break;
16306
16307 case 549: /* p_alt: p_alt '|' $@32 p_expr_basic */
16308#line 5441 "parse.y"
16309 {
16310 if (p->ctxt.capture_in_pattern) {
16311 yyerror1(&(yylsp[-2]), "alternative pattern after variable capture");
16312 }
16313 p->ctxt.in_alt_pattern = 0;
16314 (yyval.node) = NEW_OR((yyvsp[-3].node), (yyvsp[0].node), &(yyloc), &(yylsp[-2]));
16315 /*% ripper: binary!($:left, ID2VAL(idOr), $:right) %*/
16316 }
16317#line 16318 "parse.c"
16318 break;
16319
16320 case 551: /* p_lparen: '(' p_pktbl */
16321#line 5453 "parse.y"
16322 {
16323 (yyval.tbl) = (yyvsp[0].tbl);
16324 /*% ripper: $:2 %*/
16325 }
16326#line 16327 "parse.c"
16327 break;
16328
16329 case 552: /* p_lbracket: '[' p_pktbl */
16330#line 5460 "parse.y"
16331 {
16332 (yyval.tbl) = (yyvsp[0].tbl);
16333 /*% ripper: $:2 %*/
16334 }
16335#line 16336 "parse.c"
16336 break;
16337
16338 case 555: /* p_expr_basic: p_const p_lparen p_args rparen */
16339#line 5469 "parse.y"
16340 {
16341 pop_pktbl(p, (yyvsp[-2].tbl));
16342 (yyval.node) = new_array_pattern(p, (yyvsp[-3].node), 0, (yyvsp[-1].node), &(yyloc));
16343 nd_set_first_loc((yyval.node), (yylsp[-3]).beg_pos);
16344 /*% ripper: aryptn!($:p_const, *$:p_args[0..2]) %*/
16345 }
16346#line 16347 "parse.c"
16347 break;
16348
16349 case 556: /* p_expr_basic: p_const p_lparen p_find rparen */
16350#line 5476 "parse.y"
16351 {
16352 pop_pktbl(p, (yyvsp[-2].tbl));
16353 (yyval.node) = new_find_pattern(p, (yyvsp[-3].node), (yyvsp[-1].node), &(yyloc));
16354 nd_set_first_loc((yyval.node), (yylsp[-3]).beg_pos);
16355 /*% ripper: fndptn!($:p_const, *$:p_find[0..2]) %*/
16356 }
16357#line 16358 "parse.c"
16358 break;
16359
16360 case 557: /* p_expr_basic: p_const p_lparen p_kwargs rparen */
16361#line 5483 "parse.y"
16362 {
16363 pop_pktbl(p, (yyvsp[-2].tbl));
16364 (yyval.node) = new_hash_pattern(p, (yyvsp[-3].node), (yyvsp[-1].node), &(yyloc));
16365 nd_set_first_loc((yyval.node), (yylsp[-3]).beg_pos);
16366 /*% ripper: hshptn!($:p_const, *$:p_kwargs[0..1]) %*/
16367 }
16368#line 16369 "parse.c"
16369 break;
16370
16371 case 558: /* p_expr_basic: p_const '(' rparen */
16372#line 5490 "parse.y"
16373 {
16374 (yyval.node) = new_array_pattern_tail(p, 0, 0, 0, 0, &(yyloc));
16375 (yyval.node) = new_array_pattern(p, (yyvsp[-2].node), 0, (yyval.node), &(yyloc));
16376 /*% ripper: aryptn!($:p_const, Qnil, Qnil, Qnil) %*/
16377 }
16378#line 16379 "parse.c"
16379 break;
16380
16381 case 559: /* p_expr_basic: p_const p_lbracket p_args rbracket */
16382#line 5496 "parse.y"
16383 {
16384 pop_pktbl(p, (yyvsp[-2].tbl));
16385 (yyval.node) = new_array_pattern(p, (yyvsp[-3].node), 0, (yyvsp[-1].node), &(yyloc));
16386 nd_set_first_loc((yyval.node), (yylsp[-3]).beg_pos);
16387 /*% ripper: aryptn!($:p_const, *$:p_args[0..2]) %*/
16388 }
16389#line 16390 "parse.c"
16390 break;
16391
16392 case 560: /* p_expr_basic: p_const p_lbracket p_find rbracket */
16393#line 5503 "parse.y"
16394 {
16395 pop_pktbl(p, (yyvsp[-2].tbl));
16396 (yyval.node) = new_find_pattern(p, (yyvsp[-3].node), (yyvsp[-1].node), &(yyloc));
16397 nd_set_first_loc((yyval.node), (yylsp[-3]).beg_pos);
16398 /*% ripper: fndptn!($:p_const, *$:p_find[0..2]) %*/
16399 }
16400#line 16401 "parse.c"
16401 break;
16402
16403 case 561: /* p_expr_basic: p_const p_lbracket p_kwargs rbracket */
16404#line 5510 "parse.y"
16405 {
16406 pop_pktbl(p, (yyvsp[-2].tbl));
16407 (yyval.node) = new_hash_pattern(p, (yyvsp[-3].node), (yyvsp[-1].node), &(yyloc));
16408 nd_set_first_loc((yyval.node), (yylsp[-3]).beg_pos);
16409 /*% ripper: hshptn!($:p_const, *$:p_kwargs[0..1]) %*/
16410 }
16411#line 16412 "parse.c"
16412 break;
16413
16414 case 562: /* p_expr_basic: p_const '[' rbracket */
16415#line 5517 "parse.y"
16416 {
16417 (yyval.node) = new_array_pattern_tail(p, 0, 0, 0, 0, &(yyloc));
16418 (yyval.node) = new_array_pattern(p, (yyvsp[-2].node), 0, (yyval.node), &(yyloc));
16419 /*% ripper: aryptn!($:p_const, Qnil, Qnil, Qnil) %*/
16420 }
16421#line 16422 "parse.c"
16422 break;
16423
16424 case 563: /* p_expr_basic: "[" p_args rbracket */
16425#line 5523 "parse.y"
16426 {
16427 (yyval.node) = new_array_pattern(p, 0, 0, (yyvsp[-1].node), &(yyloc));
16428 /*% ripper: aryptn!(Qnil, *$:p_args[0..2]) %*/
16429 }
16430#line 16431 "parse.c"
16431 break;
16432
16433 case 564: /* p_expr_basic: "[" p_find rbracket */
16434#line 5528 "parse.y"
16435 {
16436 (yyval.node) = new_find_pattern(p, 0, (yyvsp[-1].node), &(yyloc));
16437 /*% ripper: fndptn!(Qnil, *$:p_find[0..2]) %*/
16438 }
16439#line 16440 "parse.c"
16440 break;
16441
16442 case 565: /* p_expr_basic: "[" rbracket */
16443#line 5533 "parse.y"
16444 {
16445 (yyval.node) = new_array_pattern_tail(p, 0, 0, 0, 0, &(yyloc));
16446 (yyval.node) = new_array_pattern(p, 0, 0, (yyval.node), &(yyloc));
16447 /*% ripper: aryptn!(Qnil, Qnil, Qnil, Qnil) %*/
16448 }
16449#line 16450 "parse.c"
16450 break;
16451
16452 case 566: /* $@33: %empty */
16453#line 5539 "parse.y"
16454 {
16455 p->ctxt.in_kwarg = 0;
16456 }
16457#line 16458 "parse.c"
16458 break;
16459
16460 case 567: /* p_expr_basic: "{" p_pktbl lex_ctxt $@33 p_kwargs rbrace */
16461#line 5543 "parse.y"
16462 {
16463 pop_pktbl(p, (yyvsp[-4].tbl));
16464 p->ctxt.in_kwarg = (yyvsp[-3].ctxt).in_kwarg;
16465 (yyval.node) = new_hash_pattern(p, 0, (yyvsp[-1].node), &(yyloc));
16466 /*% ripper: hshptn!(Qnil, *$:p_kwargs[0..1]) %*/
16467 }
16468#line 16469 "parse.c"
16469 break;
16470
16471 case 568: /* p_expr_basic: "{" rbrace */
16472#line 5550 "parse.y"
16473 {
16474 (yyval.node) = new_hash_pattern_tail(p, 0, 0, &(yyloc));
16475 (yyval.node) = new_hash_pattern(p, 0, (yyval.node), &(yyloc));
16476 /*% ripper: hshptn!(Qnil, Qnil, Qnil) %*/
16477 }
16478#line 16479 "parse.c"
16479 break;
16480
16481 case 569: /* p_expr_basic: "(" p_pktbl p_expr rparen */
16482#line 5556 "parse.y"
16483 {
16484 pop_pktbl(p, (yyvsp[-2].tbl));
16485 (yyval.node) = (yyvsp[-1].node);
16486 /*% ripper: $:p_expr %*/
16487 }
16488#line 16489 "parse.c"
16489 break;
16490
16491 case 570: /* p_args: p_expr */
16492#line 5564 "parse.y"
16493 {
16494 NODE *pre_args = NEW_LIST((yyvsp[0].node), &(yyloc));
16495 (yyval.node) = new_array_pattern_tail(p, pre_args, 0, 0, 0, &(yyloc));
16496 /*% ripper: [[$:1], Qnil, Qnil] %*/
16497 }
16498#line 16499 "parse.c"
16499 break;
16500
16501 case 571: /* p_args: p_args_head */
16502#line 5570 "parse.y"
16503 {
16504 (yyval.node) = new_array_pattern_tail(p, (yyvsp[0].node), 1, 0, 0, &(yyloc));
16505 /*% ripper: [$:1, Qnil, Qnil] %*/
16506 }
16507#line 16508 "parse.c"
16508 break;
16509
16510 case 572: /* p_args: p_args_head p_arg */
16511#line 5575 "parse.y"
16512 {
16513 (yyval.node) = new_array_pattern_tail(p, list_concat((yyvsp[-1].node), (yyvsp[0].node)), 0, 0, 0, &(yyloc));
16514 /*% ripper: [rb_ary_concat($:1, $:2), Qnil, Qnil] %*/
16515 }
16516#line 16517 "parse.c"
16517 break;
16518
16519 case 573: /* p_args: p_args_head p_rest */
16520#line 5580 "parse.y"
16521 {
16522 (yyval.node) = new_array_pattern_tail(p, (yyvsp[-1].node), 1, (yyvsp[0].node), 0, &(yyloc));
16523 /*% ripper: [$:1, $:2, Qnil] %*/
16524 }
16525#line 16526 "parse.c"
16526 break;
16527
16528 case 574: /* p_args: p_args_head p_rest ',' p_args_post */
16529#line 5585 "parse.y"
16530 {
16531 (yyval.node) = new_array_pattern_tail(p, (yyvsp[-3].node), 1, (yyvsp[-2].node), (yyvsp[0].node), &(yyloc));
16532 /*% ripper: [$:1, $:2, $:4] %*/
16533 }
16534#line 16535 "parse.c"
16535 break;
16536
16537 case 577: /* p_args_head: p_args_head p_arg ',' */
16538#line 5594 "parse.y"
16539 {
16540 (yyval.node) = list_concat((yyvsp[-2].node), (yyvsp[-1].node));
16541 /*% ripper: rb_ary_concat($:1, $:2) %*/
16542 }
16543#line 16544 "parse.c"
16544 break;
16545
16546 case 578: /* p_args_tail: p_rest */
16547#line 5601 "parse.y"
16548 {
16549 (yyval.node) = new_array_pattern_tail(p, 0, 1, (yyvsp[0].node), 0, &(yyloc));
16550 /*% ripper: [Qnil, $:1, Qnil] %*/
16551 }
16552#line 16553 "parse.c"
16553 break;
16554
16555 case 579: /* p_args_tail: p_rest ',' p_args_post */
16556#line 5606 "parse.y"
16557 {
16558 (yyval.node) = new_array_pattern_tail(p, 0, 1, (yyvsp[-2].node), (yyvsp[0].node), &(yyloc));
16559 /*% ripper: [Qnil, $:1, $:3] %*/
16560 }
16561#line 16562 "parse.c"
16562 break;
16563
16564 case 580: /* p_find: p_rest ',' p_args_post ',' p_rest */
16565#line 5613 "parse.y"
16566 {
16567 (yyval.node) = new_find_pattern_tail(p, (yyvsp[-4].node), (yyvsp[-2].node), (yyvsp[0].node), &(yyloc));
16568 /*% ripper: [$:1, $:3, $:5] %*/
16569 }
16570#line 16571 "parse.c"
16571 break;
16572
16573 case 581: /* p_rest: "*" "local variable or method" */
16574#line 5621 "parse.y"
16575 {
16576 error_duplicate_pattern_variable(p, (yyvsp[0].id), &(yylsp[0]));
16577 /*% ripper: var_field!($:2) %*/
16578 (yyval.node) = assignable(p, (yyvsp[0].id), 0, &(yyloc));
16579 }
16580#line 16581 "parse.c"
16581 break;
16582
16583 case 582: /* p_rest: "*" */
16584#line 5627 "parse.y"
16585 {
16586 (yyval.node) = 0;
16587 /*% ripper: var_field!(Qnil) %*/
16588 }
16589#line 16590 "parse.c"
16590 break;
16591
16592 case 584: /* p_args_post: p_args_post ',' p_arg */
16593#line 5635 "parse.y"
16594 {
16595 (yyval.node) = list_concat((yyvsp[-2].node), (yyvsp[0].node));
16596 /*% ripper: rb_ary_concat($:1, $:3) %*/
16597 }
16598#line 16599 "parse.c"
16599 break;
16600
16601 case 585: /* p_arg: p_expr */
16602#line 5642 "parse.y"
16603 {
16604 (yyval.node) = NEW_LIST((yyvsp[0].node), &(yyloc));
16605 /*% ripper: [$:1] %*/
16606 }
16607#line 16608 "parse.c"
16608 break;
16609
16610 case 586: /* p_kwargs: p_kwarg ',' p_any_kwrest */
16611#line 5649 "parse.y"
16612 {
16613 (yyval.node) = new_hash_pattern_tail(p, new_unique_key_hash(p, (yyvsp[-2].node), &(yyloc)), (yyvsp[0].id), &(yyloc));
16614 /*% ripper: [$:1, $:3] %*/
16615 }
16616#line 16617 "parse.c"
16617 break;
16618
16619 case 587: /* p_kwargs: p_kwarg */
16620#line 5654 "parse.y"
16621 {
16622 (yyval.node) = new_hash_pattern_tail(p, new_unique_key_hash(p, (yyvsp[0].node), &(yyloc)), 0, &(yyloc));
16623 /*% ripper: [$:1, Qnil] %*/
16624 }
16625#line 16626 "parse.c"
16626 break;
16627
16628 case 588: /* p_kwargs: p_kwarg ',' */
16629#line 5659 "parse.y"
16630 {
16631 (yyval.node) = new_hash_pattern_tail(p, new_unique_key_hash(p, (yyvsp[-1].node), &(yyloc)), 0, &(yyloc));
16632 /*% ripper: [$:1, Qnil] %*/
16633 }
16634#line 16635 "parse.c"
16635 break;
16636
16637 case 589: /* p_kwargs: p_any_kwrest */
16638#line 5664 "parse.y"
16639 {
16640 (yyval.node) = new_hash_pattern_tail(p, new_hash(p, 0, &(yyloc)), (yyvsp[0].id), &(yyloc));
16641 /*% ripper: [[], $:1] %*/
16642 }
16643#line 16644 "parse.c"
16644 break;
16645
16646 case 591: /* p_kwarg: p_kwarg ',' p_kw */
16647#line 5673 "parse.y"
16648 {
16649 (yyval.node) = list_concat((yyvsp[-2].node), (yyvsp[0].node));
16650 /*% ripper: rb_ary_push($:1, $:3) %*/
16651 }
16652#line 16653 "parse.c"
16653 break;
16654
16655 case 592: /* p_kw: p_kw_label p_expr */
16656#line 5680 "parse.y"
16657 {
16658 error_duplicate_pattern_key(p, (yyvsp[-1].id), &(yylsp[-1]));
16659 (yyval.node) = list_append(p, NEW_LIST(NEW_SYM(rb_id2str((yyvsp[-1].id)), &(yylsp[-1])), &(yyloc)), (yyvsp[0].node));
16660 /*% ripper: [$:1, $:2] %*/
16661 }
16662#line 16663 "parse.c"
16663 break;
16664
16665 case 593: /* p_kw: p_kw_label */
16666#line 5686 "parse.y"
16667 {
16668 error_duplicate_pattern_key(p, (yyvsp[0].id), &(yylsp[0]));
16669 if ((yyvsp[0].id) && !is_local_id((yyvsp[0].id))) {
16670 yyerror1(&(yylsp[0]), "key must be valid as local variables");
16671 }
16672 error_duplicate_pattern_variable(p, (yyvsp[0].id), &(yylsp[0]));
16673 (yyval.node) = list_append(p, NEW_LIST(NEW_SYM(rb_id2str((yyvsp[0].id)), &(yyloc)), &(yyloc)), assignable(p, (yyvsp[0].id), 0, &(yyloc)));
16674 /*% ripper: [$:1, Qnil] %*/
16675 }
16676#line 16677 "parse.c"
16677 break;
16678
16679 case 595: /* p_kw_label: "string literal" string_contents tLABEL_END */
16680#line 5699 "parse.y"
16681 {
16682 YYLTYPE loc = code_loc_gen(&(yylsp[-2]), &(yylsp[0]));
16683 if (!(yyvsp[-1].node) || nd_type_p((yyvsp[-1].node), NODE_STR)) {
16684 NODE *node = dsym_node(p, (yyvsp[-1].node), &loc);
16685 (yyval.id) = rb_sym2id(rb_node_sym_string_val(node));
16686 }
16687 else {
16688 yyerror1(&loc, "symbol literal with interpolation is not allowed");
16689 (yyval.id) = rb_intern_str(STR_NEW0());
16690 }
16691 /*% ripper: $:2 %*/
16692 }
16693#line 16694 "parse.c"
16694 break;
16695
16696 case 596: /* p_kwrest: kwrest_mark "local variable or method" */
16697#line 5714 "parse.y"
16698 {
16699 (yyval.id) = (yyvsp[0].id);
16700 /*% ripper: var_field!($:2) %*/
16701 }
16702#line 16703 "parse.c"
16703 break;
16704
16705 case 597: /* p_kwrest: kwrest_mark */
16706#line 5719 "parse.y"
16707 {
16708 (yyval.id) = 0;
16709 /*% ripper: Qnil %*/
16710 }
16711#line 16712 "parse.c"
16712 break;
16713
16714 case 598: /* p_kwnorest: kwrest_mark "'nil'" */
16715#line 5726 "parse.y"
16716 {
16717 (yyval.id) = 0;
16718 }
16719#line 16720 "parse.c"
16720 break;
16721
16722 case 600: /* p_any_kwrest: p_kwnorest */
16723#line 5733 "parse.y"
16724 {
16725 (yyval.id) = idNil;
16726 /*% ripper: var_field!(ID2VAL(idNil)) %*/
16727 }
16728#line 16729 "parse.c"
16729 break;
16730
16731 case 602: /* range_expr_p_primitive: p_primitive ".." p_primitive */
16732#line 3120 "parse.y"
16733 {
16734 value_expr(p, (yyvsp[-2].node));
16735 value_expr(p, (yyvsp[0].node));
16736 (yyval.node) = NEW_DOT2((yyvsp[-2].node), (yyvsp[0].node), &(yyloc), &(yylsp[-1]));
16737 /*% ripper: dot2!($:1, $:3) %*/
16738 }
16739#line 16740 "parse.c"
16740 break;
16741
16742 case 603: /* range_expr_p_primitive: p_primitive "..." p_primitive */
16743#line 3127 "parse.y"
16744 {
16745 value_expr(p, (yyvsp[-2].node));
16746 value_expr(p, (yyvsp[0].node));
16747 (yyval.node) = NEW_DOT3((yyvsp[-2].node), (yyvsp[0].node), &(yyloc), &(yylsp[-1]));
16748 /*% ripper: dot3!($:1, $:3) %*/
16749 }
16750#line 16751 "parse.c"
16751 break;
16752
16753 case 604: /* range_expr_p_primitive: p_primitive ".." */
16754#line 3134 "parse.y"
16755 {
16756 value_expr(p, (yyvsp[-1].node));
16757 (yyval.node) = NEW_DOT2((yyvsp[-1].node), new_nil_at(p, &(yylsp[0]).end_pos), &(yyloc), &(yylsp[0]));
16758 /*% ripper: dot2!($:1, Qnil) %*/
16759 }
16760#line 16761 "parse.c"
16761 break;
16762
16763 case 605: /* range_expr_p_primitive: p_primitive "..." */
16764#line 3140 "parse.y"
16765 {
16766 value_expr(p, (yyvsp[-1].node));
16767 (yyval.node) = NEW_DOT3((yyvsp[-1].node), new_nil_at(p, &(yylsp[0]).end_pos), &(yyloc), &(yylsp[0]));
16768 /*% ripper: dot3!($:1, Qnil) %*/
16769 }
16770#line 16771 "parse.c"
16771 break;
16772
16773 case 606: /* range_expr_p_primitive: "(.." p_primitive */
16774#line 3146 "parse.y"
16775 {
16776 value_expr(p, (yyvsp[0].node));
16777 (yyval.node) = NEW_DOT2(new_nil_at(p, &(yylsp[-1]).beg_pos), (yyvsp[0].node), &(yyloc), &(yylsp[-1]));
16778 /*% ripper: dot2!(Qnil, $:2) %*/
16779 }
16780#line 16781 "parse.c"
16781 break;
16782
16783 case 607: /* range_expr_p_primitive: "(..." p_primitive */
16784#line 3152 "parse.y"
16785 {
16786 value_expr(p, (yyvsp[0].node));
16787 (yyval.node) = NEW_DOT3(new_nil_at(p, &(yylsp[-1]).beg_pos), (yyvsp[0].node), &(yyloc), &(yylsp[-1]));
16788 /*% ripper: dot3!(Qnil, $:2) %*/
16789 }
16790#line 16791 "parse.c"
16791 break;
16792
16793 case 620: /* p_primitive: keyword_variable */
16794#line 5748 "parse.y"
16795 {
16796 if (!((yyval.node) = gettable(p, (yyvsp[0].id), &(yyloc)))) (yyval.node) = NEW_ERROR(&(yyloc));
16797 /*% ripper: var_ref!($:1) %*/
16798 }
16799#line 16800 "parse.c"
16800 break;
16801
16802 case 622: /* p_variable: "local variable or method" */
16803#line 5756 "parse.y"
16804 {
16805 error_duplicate_pattern_variable(p, (yyvsp[0].id), &(yylsp[0]));
16806 /*% ripper: var_field!($:1) %*/
16807 (yyval.node) = assignable(p, (yyvsp[0].id), 0, &(yyloc));
16808 }
16809#line 16810 "parse.c"
16810 break;
16811
16812 case 623: /* p_var_ref: '^' "local variable or method" */
16813#line 5764 "parse.y"
16814 {
16815 NODE *n = gettable(p, (yyvsp[0].id), &(yyloc));
16816 if (!n) {
16817 n = NEW_ERROR(&(yyloc));
16818 }
16819 else if (!(nd_type_p(n, NODE_LVAR) || nd_type_p(n, NODE_DVAR))) {
16820 compile_error(p, "%"PRIsVALUE": no such local variable", rb_id2str((yyvsp[0].id)));
16821 }
16822 (yyval.node) = n;
16823 /*% ripper: var_ref!($:2) %*/
16824 }
16825#line 16826 "parse.c"
16826 break;
16827
16828 case 624: /* p_var_ref: '^' nonlocal_var */
16829#line 5776 "parse.y"
16830 {
16831 if (!((yyval.node) = gettable(p, (yyvsp[0].id), &(yyloc)))) (yyval.node) = NEW_ERROR(&(yyloc));
16832 /*% ripper: var_ref!($:2) %*/
16833 }
16834#line 16835 "parse.c"
16835 break;
16836
16837 case 625: /* p_expr_ref: '^' "(" expr_value rparen */
16838#line 5783 "parse.y"
16839 {
16840 (yyval.node) = NEW_BLOCK((yyvsp[-1].node), &(yyloc));
16841 /*% ripper: begin!($:3) %*/
16842 }
16843#line 16844 "parse.c"
16844 break;
16845
16846 case 626: /* p_const: ":: at EXPR_BEG" cname */
16847#line 5790 "parse.y"
16848 {
16849 (yyval.node) = NEW_COLON3((yyvsp[0].id), &(yyloc), &(yylsp[-1]), &(yylsp[0]));
16850 /*% ripper: top_const_ref!($:2) %*/
16851 }
16852#line 16853 "parse.c"
16853 break;
16854
16855 case 627: /* p_const: p_const "::" cname */
16856#line 5795 "parse.y"
16857 {
16858 (yyval.node) = NEW_COLON2((yyvsp[-2].node), (yyvsp[0].id), &(yyloc), &(yylsp[-1]), &(yylsp[0]));
16859 /*% ripper: const_path_ref!($:1, $:3) %*/
16860 }
16861#line 16862 "parse.c"
16862 break;
16863
16864 case 628: /* p_const: "constant" */
16865#line 5800 "parse.y"
16866 {
16867 (yyval.node) = gettable(p, (yyvsp[0].id), &(yyloc));
16868 /*% ripper: var_ref!($:1) %*/
16869 }
16870#line 16871 "parse.c"
16871 break;
16872
16873 case 629: /* opt_rescue: k_rescue exc_list exc_var then compstmt_stmts opt_rescue */
16874#line 5809 "parse.y"
16875 {
16876 NODE *err = (yyvsp[-3].node);
16877 if ((yyvsp[-3].node)) {
16878 err = NEW_ERRINFO(&(yylsp[-3]));
16879 err = node_assign(p, (yyvsp[-3].node), err, NO_LEX_CTXT, &(yylsp[-3]));
16880 }
16881 (yyval.node) = NEW_RESBODY((yyvsp[-4].node), (yyvsp[-3].node), (yyvsp[-1].node), (yyvsp[0].node), &(yyloc));
16882 if ((yyvsp[-4].node)) {
16883 fixpos((yyval.node), (yyvsp[-4].node));
16884 }
16885 else if ((yyvsp[-3].node)) {
16886 fixpos((yyval.node), (yyvsp[-3].node));
16887 }
16888 else {
16889 fixpos((yyval.node), (yyvsp[-1].node));
16890 }
16891 /*% ripper: rescue!($:2, $:3, $:5, $:6) %*/
16892 }
16893#line 16894 "parse.c"
16894 break;
16895
16896 case 631: /* exc_list: arg_value */
16897#line 5831 "parse.y"
16898 {
16899 (yyval.node) = NEW_LIST((yyvsp[0].node), &(yyloc));
16900 /*% ripper: rb_ary_new3(1, $:1) %*/
16901 }
16902#line 16903 "parse.c"
16903 break;
16904
16905 case 632: /* exc_list: mrhs */
16906#line 5836 "parse.y"
16907 {
16908 if (!((yyval.node) = splat_array((yyvsp[0].node)))) (yyval.node) = (yyvsp[0].node);
16909 }
16910#line 16911 "parse.c"
16911 break;
16912
16913 case 634: /* exc_var: "=>" lhs */
16914#line 5843 "parse.y"
16915 {
16916 (yyval.node) = (yyvsp[0].node);
16917 /*% ripper: $:2 %*/
16918 }
16919#line 16920 "parse.c"
16920 break;
16921
16922 case 636: /* opt_ensure: k_ensure stmts option_terms */
16923#line 5851 "parse.y"
16924 {
16925 p->ctxt.in_rescue = (yyvsp[-2].ctxt).in_rescue;
16926 (yyval.node) = (yyvsp[-1].node);
16927 void_expr(p, void_stmts(p, (yyval.node)));
16928 /*% ripper: ensure!($:2) %*/
16929 }
16930#line 16931 "parse.c"
16931 break;
16932
16933 case 640: /* strings: string */
16934#line 5865 "parse.y"
16935 {
16936 if (!(yyvsp[0].node)) {
16937 (yyval.node) = NEW_STR(STRING_NEW0(), &(yyloc));
16938 }
16939 else {
16940 (yyval.node) = evstr2dstr(p, (yyvsp[0].node));
16941 }
16942 /*% ripper: $:1 %*/
16943 }
16944#line 16945 "parse.c"
16945 break;
16946
16947 case 643: /* string: string string1 */
16948#line 5879 "parse.y"
16949 {
16950 (yyval.node) = literal_concat(p, (yyvsp[-1].node), (yyvsp[0].node), &(yyloc));
16951 /*% ripper: string_concat!($:1, $:2) %*/
16952 }
16953#line 16954 "parse.c"
16954 break;
16955
16956 case 644: /* string1: "string literal" string_contents "terminator" */
16957#line 5886 "parse.y"
16958 {
16959 (yyval.node) = heredoc_dedent(p, (yyvsp[-1].node));
16960 if ((yyval.node)) nd_set_loc((yyval.node), &(yyloc));
16961 /*% ripper: $:2 %*/
16962 if (p->heredoc_indent > 0) {
16963 /*% ripper: heredoc_dedent!($:$, INT2NUM(%{p->heredoc_indent})) %*/
16964 p->heredoc_indent = 0;
16965 }
16966 /*% ripper: string_literal!($:$) %*/
16967 }
16968#line 16969 "parse.c"
16969 break;
16970
16971 case 645: /* xstring: "backtick literal" xstring_contents "terminator" */
16972#line 5899 "parse.y"
16973 {
16974 (yyval.node) = new_xstring(p, heredoc_dedent(p, (yyvsp[-1].node)), &(yyloc));
16975 /*% ripper: $:2 %*/
16976 if (p->heredoc_indent > 0) {
16977 /*% ripper: heredoc_dedent!($:$, INT2NUM(%{p->heredoc_indent})) %*/
16978 p->heredoc_indent = 0;
16979 }
16980 /*% ripper: xstring_literal!($:$) %*/
16981 }
16982#line 16983 "parse.c"
16983 break;
16984
16985 case 646: /* regexp: "regexp literal" regexp_contents tREGEXP_END */
16986#line 5911 "parse.y"
16987 {
16988 (yyval.node) = new_regexp(p, (yyvsp[-1].node), (yyvsp[0].num), &(yyloc), &(yylsp[-2]), &(yylsp[-1]), &(yylsp[0]));
16989 /*% ripper: regexp_literal!($:2, $:3) %*/
16990 }
16991#line 16992 "parse.c"
16992 break;
16993
16994 case 649: /* words_tWORDS_BEG_word_list: "word list" nonempty_list_' ' word_list "terminator" */
16995#line 3169 "parse.y"
16996 {
16997 (yyval.node) = make_list((yyvsp[-1].node), &(yyloc));
16998 /*% ripper: array!($:word_list) %*/
16999 }
17000#line 17001 "parse.c"
17001 break;
17002
17003 case 651: /* word_list: %empty */
17004#line 5921 "parse.y"
17005 {
17006 (yyval.node) = 0;
17007 /*% ripper: words_new! %*/
17008 }
17009#line 17010 "parse.c"
17010 break;
17011
17012 case 652: /* word_list: word_list word nonempty_list_' ' */
17013#line 5926 "parse.y"
17014 {
17015 (yyval.node) = list_append(p, (yyvsp[-2].node), evstr2dstr(p, (yyvsp[-1].node)));
17016 /*% ripper: words_add!($:1, $:2) %*/
17017 }
17018#line 17019 "parse.c"
17019 break;
17020
17021 case 654: /* word: word string_content */
17022#line 5935 "parse.y"
17023 {
17024 (yyval.node) = literal_concat(p, (yyvsp[-1].node), (yyvsp[0].node), &(yyloc));
17025 /*% ripper: word_add!($:1, $:2) %*/
17026 }
17027#line 17028 "parse.c"
17028 break;
17029
17030 case 655: /* words_tSYMBOLS_BEG_symbol_list: "symbol list" nonempty_list_' ' symbol_list "terminator" */
17031#line 3169 "parse.y"
17032 {
17033 (yyval.node) = make_list((yyvsp[-1].node), &(yyloc));
17034 /*% ripper: array!($:word_list) %*/
17035 }
17036#line 17037 "parse.c"
17037 break;
17038
17039 case 657: /* symbol_list: %empty */
17040#line 5945 "parse.y"
17041 {
17042 (yyval.node) = 0;
17043 /*% ripper: symbols_new! %*/
17044 }
17045#line 17046 "parse.c"
17046 break;
17047
17048 case 658: /* symbol_list: symbol_list word nonempty_list_' ' */
17049#line 5950 "parse.y"
17050 {
17051 (yyval.node) = symbol_append(p, (yyvsp[-2].node), evstr2dstr(p, (yyvsp[-1].node)));
17052 /*% ripper: symbols_add!($:1, $:2) %*/
17053 }
17054#line 17055 "parse.c"
17055 break;
17056
17057 case 659: /* words_tQWORDS_BEG_qword_list: "verbatim word list" nonempty_list_' ' qword_list "terminator" */
17058#line 3169 "parse.y"
17059 {
17060 (yyval.node) = make_list((yyvsp[-1].node), &(yyloc));
17061 /*% ripper: array!($:word_list) %*/
17062 }
17063#line 17064 "parse.c"
17064 break;
17065
17066 case 661: /* words_tQSYMBOLS_BEG_qsym_list: "verbatim symbol list" nonempty_list_' ' qsym_list "terminator" */
17067#line 3169 "parse.y"
17068 {
17069 (yyval.node) = make_list((yyvsp[-1].node), &(yyloc));
17070 /*% ripper: array!($:word_list) %*/
17071 }
17072#line 17073 "parse.c"
17073 break;
17074
17075 case 663: /* qword_list: %empty */
17076#line 5963 "parse.y"
17077 {
17078 (yyval.node) = 0;
17079 /*% ripper: qwords_new! %*/
17080 }
17081#line 17082 "parse.c"
17082 break;
17083
17084 case 664: /* qword_list: qword_list "literal content" nonempty_list_' ' */
17085#line 5968 "parse.y"
17086 {
17087 (yyval.node) = list_append(p, (yyvsp[-2].node), (yyvsp[-1].node));
17088 /*% ripper: qwords_add!($:1, $:2) %*/
17089 }
17090#line 17091 "parse.c"
17091 break;
17092
17093 case 665: /* qsym_list: %empty */
17094#line 5975 "parse.y"
17095 {
17096 (yyval.node) = 0;
17097 /*% ripper: qsymbols_new! %*/
17098 }
17099#line 17100 "parse.c"
17100 break;
17101
17102 case 666: /* qsym_list: qsym_list "literal content" nonempty_list_' ' */
17103#line 5980 "parse.y"
17104 {
17105 (yyval.node) = symbol_append(p, (yyvsp[-2].node), (yyvsp[-1].node));
17106 /*% ripper: qsymbols_add!($:1, $:2) %*/
17107 }
17108#line 17109 "parse.c"
17109 break;
17110
17111 case 667: /* string_contents: %empty */
17112#line 5987 "parse.y"
17113 {
17114 (yyval.node) = 0;
17115 /*% ripper: string_content! %*/
17116 }
17117#line 17118 "parse.c"
17118 break;
17119
17120 case 668: /* string_contents: string_contents string_content */
17121#line 5992 "parse.y"
17122 {
17123 (yyval.node) = literal_concat(p, (yyvsp[-1].node), (yyvsp[0].node), &(yyloc));
17124 /*% ripper: string_add!($:1, $:2) %*/
17125 }
17126#line 17127 "parse.c"
17127 break;
17128
17129 case 669: /* xstring_contents: %empty */
17130#line 5999 "parse.y"
17131 {
17132 (yyval.node) = 0;
17133 /*% ripper: xstring_new! %*/
17134 }
17135#line 17136 "parse.c"
17136 break;
17137
17138 case 670: /* xstring_contents: xstring_contents string_content */
17139#line 6004 "parse.y"
17140 {
17141 (yyval.node) = literal_concat(p, (yyvsp[-1].node), (yyvsp[0].node), &(yyloc));
17142 /*% ripper: xstring_add!($:1, $:2) %*/
17143 }
17144#line 17145 "parse.c"
17145 break;
17146
17147 case 671: /* regexp_contents: %empty */
17148#line 6011 "parse.y"
17149 {
17150 (yyval.node) = 0;
17151 /*% ripper: regexp_new! %*/
17152 }
17153#line 17154 "parse.c"
17154 break;
17155
17156 case 672: /* regexp_contents: regexp_contents string_content */
17157#line 6016 "parse.y"
17158 {
17159 NODE *head = (yyvsp[-1].node), *tail = (yyvsp[0].node);
17160 if (!head) {
17161 (yyval.node) = tail;
17162 }
17163 else if (!tail) {
17164 (yyval.node) = head;
17165 }
17166 else {
17167 switch (nd_type(head)) {
17168 case NODE_STR:
17169 head = str2dstr(p, head);
17170 break;
17171 case NODE_DSTR:
17172 break;
17173 default:
17174 head = list_append(p, NEW_DSTR(0, &(yyloc)), head);
17175 break;
17176 }
17177 (yyval.node) = list_append(p, head, tail);
17178 }
17179 /*% ripper: regexp_add!($:1, $:2) %*/
17180 }
17181#line 17182 "parse.c"
17182 break;
17183
17184 case 674: /* @34: %empty */
17185#line 6044 "parse.y"
17186 {
17187 /* need to backup p->lex.strterm so that a string literal `%&foo,#$&,bar&` can be parsed */
17188 (yyval.strterm) = p->lex.strterm;
17189 p->lex.strterm = 0;
17190 SET_LEX_STATE(EXPR_BEG);
17191 }
17192#line 17193 "parse.c"
17193 break;
17194
17195 case 675: /* string_content: tSTRING_DVAR @34 string_dvar */
17196#line 6051 "parse.y"
17197 {
17198 p->lex.strterm = (yyvsp[-1].strterm);
17199 (yyval.node) = NEW_EVSTR((yyvsp[0].node), &(yyloc), &(yylsp[-2]), &NULL_LOC);
17200 nd_set_line((yyval.node), (yylsp[0]).end_pos.lineno);
17201 /*% ripper: string_dvar!($:dvar) %*/
17202 }
17203#line 17204 "parse.c"
17204 break;
17205
17206 case 676: /* @35: %empty */
17207#line 6058 "parse.y"
17208 {
17209 CMDARG_PUSH(0);
17210 COND_PUSH(0);
17211 /* need to backup p->lex.strterm so that a string literal `%!foo,#{ !0 },bar!` can be parsed */
17212 (yyval.strterm) = p->lex.strterm;
17213 p->lex.strterm = 0;
17214 SET_LEX_STATE(EXPR_BEG);
17215 }
17216#line 17217 "parse.c"
17217 break;
17218
17219 case 677: /* @36: %empty */
17220#line 6066 "parse.y"
17221 {
17222 (yyval.num) = p->lex.brace_nest;
17223 p->lex.brace_nest = 0;
17224 }
17225#line 17226 "parse.c"
17226 break;
17227
17228 case 678: /* @37: %empty */
17229#line 6070 "parse.y"
17230 {
17231 (yyval.num) = p->lex.lpar_beg;
17232 p->lex.lpar_beg = -1;
17233 }
17234#line 17235 "parse.c"
17235 break;
17236
17237 case 679: /* @38: %empty */
17238#line 6074 "parse.y"
17239 {
17240 (yyval.num) = p->heredoc_indent;
17241 p->heredoc_indent = 0;
17242 }
17243#line 17244 "parse.c"
17244 break;
17245
17246 case 680: /* string_content: "'#{'" @35 @36 @37 @38 compstmt_stmts string_dend */
17247#line 6079 "parse.y"
17248 {
17249 COND_POP();
17250 CMDARG_POP();
17251 p->lex.strterm = (yyvsp[-5].strterm);
17252 SET_LEX_STATE((yyvsp[-6].state));
17253 p->lex.brace_nest = (yyvsp[-4].num);
17254 p->lex.lpar_beg = (yyvsp[-3].num);
17255 p->heredoc_indent = (yyvsp[-2].num);
17256 p->heredoc_line_indent = -1;
17257 if ((yyvsp[-1].node)) nd_unset_fl_newline((yyvsp[-1].node));
17258 (yyval.node) = new_evstr(p, (yyvsp[-1].node), &(yyloc), &(yylsp[-6]), &(yylsp[0]));
17259 /*% ripper: string_embexpr!($:compstmt) %*/
17260 }
17261#line 17262 "parse.c"
17262 break;
17263
17264 case 683: /* string_dvar: nonlocal_var */
17265#line 6099 "parse.y"
17266 {
17267 if (!((yyval.node) = gettable(p, (yyvsp[0].id), &(yyloc)))) (yyval.node) = NEW_ERROR(&(yyloc));
17268 /*% ripper: var_ref!($:1) %*/
17269 }
17270#line 17271 "parse.c"
17271 break;
17272
17273 case 687: /* ssym: "symbol literal" sym */
17274#line 6111 "parse.y"
17275 {
17276 SET_LEX_STATE(EXPR_END);
17277 VALUE str = rb_id2str((yyvsp[0].id));
17278 /*
17279 * TODO:
17280 * set_yylval_noname sets invalid id to yylval.
17281 * This branch can be removed once yylval is changed to
17282 * hold lexed string.
17283 */
17284 if (!str) str = STR_NEW0();
17285 (yyval.node) = NEW_SYM(str, &(yyloc));
17286 /*% ripper: symbol_literal!(symbol!($:2)) %*/
17287 }
17288#line 17289 "parse.c"
17289 break;
17290
17291 case 690: /* dsym: "symbol literal" string_contents "terminator" */
17292#line 6131 "parse.y"
17293 {
17294 SET_LEX_STATE(EXPR_END);
17295 (yyval.node) = dsym_node(p, (yyvsp[-1].node), &(yyloc));
17296 /*% ripper: dyna_symbol!($:2) %*/
17297 }
17298#line 17299 "parse.c"
17299 break;
17300
17301 case 692: /* numeric: tUMINUS_NUM simple_numeric */
17302#line 6140 "parse.y"
17303 {
17304 (yyval.node) = (yyvsp[0].node);
17305 negate_lit(p, (yyval.node), &(yyloc));
17306 /*% ripper: unary!(ID2VAL(idUMinus), $:2) %*/
17307 }
17308#line 17309 "parse.c"
17309 break;
17310
17311 case 703: /* keyword_variable: "'nil'" */
17312#line 6162 "parse.y"
17313 {(yyval.id) = KWD2EID(nil, (yyvsp[0].id));}
17314#line 17315 "parse.c"
17315 break;
17316
17317 case 704: /* keyword_variable: "'self'" */
17318#line 6163 "parse.y"
17319 {(yyval.id) = KWD2EID(self, (yyvsp[0].id));}
17320#line 17321 "parse.c"
17321 break;
17322
17323 case 705: /* keyword_variable: "'true'" */
17324#line 6164 "parse.y"
17325 {(yyval.id) = KWD2EID(true, (yyvsp[0].id));}
17326#line 17327 "parse.c"
17327 break;
17328
17329 case 706: /* keyword_variable: "'false'" */
17330#line 6165 "parse.y"
17331 {(yyval.id) = KWD2EID(false, (yyvsp[0].id));}
17332#line 17333 "parse.c"
17333 break;
17334
17335 case 707: /* keyword_variable: "'__FILE__'" */
17336#line 6166 "parse.y"
17337 {(yyval.id) = KWD2EID(_FILE__, (yyvsp[0].id));}
17338#line 17339 "parse.c"
17339 break;
17340
17341 case 708: /* keyword_variable: "'__LINE__'" */
17342#line 6167 "parse.y"
17343 {(yyval.id) = KWD2EID(_LINE__, (yyvsp[0].id));}
17344#line 17345 "parse.c"
17345 break;
17346
17347 case 709: /* keyword_variable: "'__ENCODING__'" */
17348#line 6168 "parse.y"
17349 {(yyval.id) = KWD2EID(_ENCODING__, (yyvsp[0].id));}
17350#line 17351 "parse.c"
17351 break;
17352
17353 case 710: /* var_ref: user_variable */
17354#line 6172 "parse.y"
17355 {
17356 if (!((yyval.node) = gettable(p, (yyvsp[0].id), &(yyloc)))) (yyval.node) = NEW_ERROR(&(yyloc));
17357 if (ifdef_ripper(id_is_var(p, (yyvsp[0].id)), false)) {
17358 /*% ripper: var_ref!($:1) %*/
17359 }
17360 else {
17361 /*% ripper: vcall!($:1) %*/
17362 }
17363 }
17364#line 17365 "parse.c"
17365 break;
17366
17367 case 711: /* var_ref: keyword_variable */
17368#line 6182 "parse.y"
17369 {
17370 if (!((yyval.node) = gettable(p, (yyvsp[0].id), &(yyloc)))) (yyval.node) = NEW_ERROR(&(yyloc));
17371 /*% ripper: var_ref!($:1) %*/
17372 }
17373#line 17374 "parse.c"
17374 break;
17375
17376 case 712: /* var_lhs: user_variable */
17377#line 6189 "parse.y"
17378 {
17379 /*% ripper: var_field!($:1) %*/
17380 (yyval.node) = assignable(p, (yyvsp[0].id), 0, &(yyloc));
17381 }
17382#line 17383 "parse.c"
17383 break;
17384
17385 case 713: /* var_lhs: keyword_variable */
17386#line 6189 "parse.y"
17387 {
17388 /*% ripper: var_field!($:1) %*/
17389 (yyval.node) = assignable(p, (yyvsp[0].id), 0, &(yyloc));
17390 }
17391#line 17392 "parse.c"
17392 break;
17393
17394 case 716: /* $@39: %empty */
17395#line 6200 "parse.y"
17396 {
17397 SET_LEX_STATE(EXPR_BEG);
17398 p->command_start = TRUE;
17399 }
17400#line 17401 "parse.c"
17401 break;
17402
17403 case 717: /* superclass: '<' $@39 expr_value term */
17404#line 6205 "parse.y"
17405 {
17406 (yyval.node) = (yyvsp[-1].node);
17407 /*% ripper: $:3 %*/
17408 }
17409#line 17410 "parse.c"
17410 break;
17411
17412 case 720: /* f_opt_paren_args: f_empty_arg */
17413#line 6214 "parse.y"
17414 {
17415 p->ctxt.in_argdef = 0;
17416 }
17417#line 17418 "parse.c"
17418 break;
17419
17420 case 721: /* f_empty_arg: %empty */
17421#line 6220 "parse.y"
17422 {
17423 (yyval.node_args) = new_empty_args_tail(p, &(yyloc));
17424 (yyval.node_args) = new_args(p, 0, 0, 0, 0, (yyval.node_args), &(yyloc));
17425 /*% ripper: params!(Qnil, Qnil, Qnil, Qnil, Qnil, Qnil, Qnil) %*/
17426 }
17427#line 17428 "parse.c"
17428 break;
17429
17430 case 722: /* f_paren_args: '(' f_args rparen */
17431#line 6228 "parse.y"
17432 {
17433 (yyval.node_args) = (yyvsp[-1].node_args);
17434 /*% ripper: paren!($:2) %*/
17435 SET_LEX_STATE(EXPR_BEG);
17436 p->command_start = TRUE;
17437 p->ctxt.in_argdef = 0;
17438 }
17439#line 17440 "parse.c"
17440 break;
17441
17442 case 724: /* @40: %empty */
17443#line 6238 "parse.y"
17444 {
17445 (yyval.ctxt) = p->ctxt;
17446 p->ctxt.in_kwarg = 1;
17447 p->ctxt.in_argdef = 1;
17448 SET_LEX_STATE(p->lex.state|EXPR_LABEL); /* force for args */
17449 }
17450#line 17451 "parse.c"
17451 break;
17452
17453 case 725: /* f_arglist: @40 f_args term */
17454#line 6245 "parse.y"
17455 {
17456 p->ctxt.in_kwarg = (yyvsp[-2].ctxt).in_kwarg;
17457 p->ctxt.in_argdef = 0;
17458 (yyval.node_args) = (yyvsp[-1].node_args);
17459 SET_LEX_STATE(EXPR_BEG);
17460 p->command_start = TRUE;
17461 /*% ripper: $:2 %*/
17462 }
17463#line 17464 "parse.c"
17464 break;
17465
17466 case 726: /* f_kw_arg_value: f_label arg_value */
17467#line 3020 "parse.y"
17468 {
17469 p->ctxt.in_argdef = 1;
17470 (yyval.node_kw_arg) = new_kw_arg(p, assignable(p, (yyvsp[-1].id), (yyvsp[0].node), &(yyloc)), &(yyloc));
17471 /*% ripper: [$:$, $:value] %*/
17472 }
17473#line 17474 "parse.c"
17474 break;
17475
17476 case 727: /* f_kw_arg_value: f_label */
17477#line 3026 "parse.y"
17478 {
17479 p->ctxt.in_argdef = 1;
17480 (yyval.node_kw_arg) = new_kw_arg(p, assignable(p, (yyvsp[0].id), NODE_SPECIAL_REQUIRED_KEYWORD, &(yyloc)), &(yyloc));
17481 /*% ripper: [$:$, 0] %*/
17482 }
17483#line 17484 "parse.c"
17484 break;
17485
17486 case 728: /* f_kwarg_arg_value: f_kw_arg_value */
17487#line 3035 "parse.y"
17488 {
17489 (yyval.node_kw_arg) = (yyvsp[0].node_kw_arg);
17490 /*% ripper: rb_ary_new3(1, $:1) %*/
17491 }
17492#line 17493 "parse.c"
17493 break;
17494
17495 case 729: /* f_kwarg_arg_value: f_kwarg_arg_value ',' f_kw_arg_value */
17496#line 3040 "parse.y"
17497 {
17498 (yyval.node_kw_arg) = kwd_append((yyvsp[-2].node_kw_arg), (yyvsp[0].node_kw_arg));
17499 /*% ripper: rb_ary_push($:1, $:3) %*/
17500 }
17501#line 17502 "parse.c"
17502 break;
17503
17504 case 730: /* opt_f_block_arg_opt_comma: ',' f_block_arg */
17505#line 2957 "parse.y"
17506 {
17507 (yyval.id) = (yyvsp[0].id);
17508 /*% ripper: $:2 %*/
17509 }
17510#line 17511 "parse.c"
17511 break;
17512
17513 case 732: /* args_tail_basic_arg_value_opt_comma: f_kwarg_arg_value ',' f_kwrest opt_f_block_arg_opt_comma */
17514#line 2934 "parse.y"
17515 {
17516 (yyval.node_args) = new_args_tail(p, (yyvsp[-3].node_kw_arg), (yyvsp[-1].id), (yyvsp[0].id), &(yylsp[-1]));
17517 /*% ripper: [$:1, $:3, $:4] %*/
17518 }
17519#line 17520 "parse.c"
17520 break;
17521
17522 case 733: /* args_tail_basic_arg_value_opt_comma: f_kwarg_arg_value opt_f_block_arg_opt_comma */
17523#line 2939 "parse.y"
17524 {
17525 (yyval.node_args) = new_args_tail(p, (yyvsp[-1].node_kw_arg), 0, (yyvsp[0].id), &(yylsp[-1]));
17526 /*% ripper: [$:1, Qnil, $:2] %*/
17527 }
17528#line 17529 "parse.c"
17529 break;
17530
17531 case 734: /* args_tail_basic_arg_value_opt_comma: f_any_kwrest opt_f_block_arg_opt_comma */
17532#line 2944 "parse.y"
17533 {
17534 (yyval.node_args) = new_args_tail(p, 0, (yyvsp[-1].id), (yyvsp[0].id), &(yylsp[-1]));
17535 /*% ripper: [Qnil, $:1, $:2] %*/
17536 }
17537#line 17538 "parse.c"
17538 break;
17539
17540 case 735: /* args_tail_basic_arg_value_opt_comma: f_block_arg */
17541#line 2949 "parse.y"
17542 {
17543 (yyval.node_args) = new_args_tail(p, 0, 0, (yyvsp[0].id), &(yylsp[0]));
17544 /*% ripper: [Qnil, Qnil, $:1] %*/
17545 }
17546#line 17547 "parse.c"
17547 break;
17548
17549 case 737: /* args_tail: args_forward */
17550#line 6257 "parse.y"
17551 {
17552 add_forwarding_args(p);
17553 (yyval.node_args) = new_args_tail(p, 0, (yyvsp[0].id), arg_FWD_BLOCK, &(yylsp[0]));
17554 (yyval.node_args)->nd_ainfo.forwarding = 1;
17555 /*% ripper: [Qnil, $:args_forward, Qnil] %*/
17556 }
17557#line 17558 "parse.c"
17558 break;
17559
17560 case 738: /* args_tail_basic_arg_value_none: f_kwarg_arg_value ',' f_kwrest opt_f_block_arg_none */
17561#line 2934 "parse.y"
17562 {
17563 (yyval.node_args) = new_args_tail(p, (yyvsp[-3].node_kw_arg), (yyvsp[-1].id), (yyvsp[0].id), &(yylsp[-1]));
17564 /*% ripper: [$:1, $:3, $:4] %*/
17565 }
17566#line 17567 "parse.c"
17567 break;
17568
17569 case 739: /* args_tail_basic_arg_value_none: f_kwarg_arg_value opt_f_block_arg_none */
17570#line 2939 "parse.y"
17571 {
17572 (yyval.node_args) = new_args_tail(p, (yyvsp[-1].node_kw_arg), 0, (yyvsp[0].id), &(yylsp[-1]));
17573 /*% ripper: [$:1, Qnil, $:2] %*/
17574 }
17575#line 17576 "parse.c"
17576 break;
17577
17578 case 740: /* args_tail_basic_arg_value_none: f_any_kwrest opt_f_block_arg_none */
17579#line 2944 "parse.y"
17580 {
17581 (yyval.node_args) = new_args_tail(p, 0, (yyvsp[-1].id), (yyvsp[0].id), &(yylsp[-1]));
17582 /*% ripper: [Qnil, $:1, $:2] %*/
17583 }
17584#line 17585 "parse.c"
17585 break;
17586
17587 case 741: /* args_tail_basic_arg_value_none: f_block_arg */
17588#line 2949 "parse.y"
17589 {
17590 (yyval.node_args) = new_args_tail(p, 0, 0, (yyvsp[0].id), &(yylsp[0]));
17591 /*% ripper: [Qnil, Qnil, $:1] %*/
17592 }
17593#line 17594 "parse.c"
17594 break;
17595
17596 case 743: /* largs_tail: args_forward */
17597#line 6267 "parse.y"
17598 {
17599 yyerror1(&(yylsp[0]), "unexpected ... in lambda argument");
17600 (yyval.node_args) = new_args_tail(p, 0, 0, 0, &(yylsp[0]));
17601 (yyval.node_args)->nd_ainfo.forwarding = 1;
17602 /*% ripper: [Qnil, $:args_forward, Qnil] %*/
17603 }
17604#line 17605 "parse.c"
17605 break;
17606
17607 case 744: /* f_opt_arg_value: f_arg_asgn f_eq arg_value */
17608#line 2998 "parse.y"
17609 {
17610 p->ctxt.in_argdef = 1;
17611 (yyval.node_opt_arg) = NEW_OPT_ARG(assignable(p, (yyvsp[-2].id), (yyvsp[0].node), &(yyloc)), &(yyloc));
17612 /*% ripper: [$:$, $:3] %*/
17613 }
17614#line 17615 "parse.c"
17615 break;
17616
17617 case 745: /* f_opt_arg_arg_value: f_opt_arg_value */
17618#line 3007 "parse.y"
17619 {
17620 (yyval.node_opt_arg) = (yyvsp[0].node_opt_arg);
17621 /*% ripper: rb_ary_new3(1, $:1) %*/
17622 }
17623#line 17624 "parse.c"
17624 break;
17625
17626 case 746: /* f_opt_arg_arg_value: f_opt_arg_arg_value ',' f_opt_arg_value */
17627#line 3012 "parse.y"
17628 {
17629 (yyval.node_opt_arg) = opt_arg_append((yyvsp[-2].node_opt_arg), (yyvsp[0].node_opt_arg));
17630 /*% ripper: rb_ary_push($:1, $:3) %*/
17631 }
17632#line 17633 "parse.c"
17633 break;
17634
17635 case 747: /* opt_args_tail_args_tail_opt_comma: ',' args_tail */
17636#line 3107 "parse.y"
17637 {
17638 (yyval.node_args) = (yyvsp[0].node_args);
17639 /*% ripper: $:tail %*/
17640 }
17641#line 17642 "parse.c"
17642 break;
17643
17644 case 748: /* opt_args_tail_args_tail_opt_comma: opt_comma */
17645#line 3112 "parse.y"
17646 {
17647 (yyval.node_args) = new_empty_args_tail(p, &(yyloc));
17648 /*% ripper: [Qnil, Qnil, Qnil] %*/
17649 }
17650#line 17651 "parse.c"
17651 break;
17652
17653 case 749: /* args-list_arg_value_opt_args_tail_args_tail_opt_comma: f_arg ',' f_opt_arg_arg_value ',' f_rest_arg opt_args_tail_args_tail_opt_comma */
17654#line 6277 "parse.y"
17655 {
17656 (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));
17657 /*% ripper: params!($:pre, $:opt, $:rest, Qnil, *$:tail[0..2]) %*/
17658 }
17659#line 17660 "parse.c"
17660 break;
17661
17662 case 750: /* args-list_arg_value_opt_args_tail_args_tail_opt_comma: f_arg ',' f_opt_arg_arg_value ',' f_rest_arg ',' f_arg opt_args_tail_args_tail_opt_comma */
17663#line 6282 "parse.y"
17664 {
17665 (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));
17666 /*% ripper: params!($:pre, $:opt, $:rest, $:post, *$:tail[0..2]) %*/
17667 }
17668#line 17669 "parse.c"
17669 break;
17670
17671 case 751: /* args-list_arg_value_opt_args_tail_args_tail_opt_comma: f_arg ',' f_opt_arg_arg_value opt_args_tail_args_tail_opt_comma */
17672#line 6287 "parse.y"
17673 {
17674 (yyval.node_args) = new_args(p, (yyvsp[-3].node_args_aux), (yyvsp[-1].node_opt_arg), 0, 0, (yyvsp[0].node_args), &(yyloc));
17675 /*% ripper: params!($:pre, $:opt, Qnil, Qnil, *$:tail[0..2]) %*/
17676 }
17677#line 17678 "parse.c"
17678 break;
17679
17680 case 752: /* args-list_arg_value_opt_args_tail_args_tail_opt_comma: f_arg ',' f_opt_arg_arg_value ',' f_arg opt_args_tail_args_tail_opt_comma */
17681#line 6292 "parse.y"
17682 {
17683 (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));
17684 /*% ripper: params!($:pre, $:opt, Qnil, $:post, *$:tail[0..2]) %*/
17685 }
17686#line 17687 "parse.c"
17687 break;
17688
17689 case 753: /* args-list_arg_value_opt_args_tail_args_tail_opt_comma: f_arg ',' f_rest_arg opt_args_tail_args_tail_opt_comma */
17690#line 6297 "parse.y"
17691 {
17692 (yyval.node_args) = new_args(p, (yyvsp[-3].node_args_aux), 0, (yyvsp[-1].id), 0, (yyvsp[0].node_args), &(yyloc));
17693 /*% ripper: params!($:pre, Qnil, $:rest, Qnil, *$:tail[0..2]) %*/
17694 }
17695#line 17696 "parse.c"
17696 break;
17697
17698 case 754: /* args-list_arg_value_opt_args_tail_args_tail_opt_comma: f_arg ',' f_rest_arg ',' f_arg opt_args_tail_args_tail_opt_comma */
17699#line 6302 "parse.y"
17700 {
17701 (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));
17702 /*% ripper: params!($:pre, Qnil, $:rest, $:post, *$:tail[0..2]) %*/
17703 }
17704#line 17705 "parse.c"
17705 break;
17706
17707 case 755: /* args-list_arg_value_opt_args_tail_args_tail_opt_comma: f_opt_arg_arg_value ',' f_rest_arg opt_args_tail_args_tail_opt_comma */
17708#line 6307 "parse.y"
17709 {
17710 (yyval.node_args) = new_args(p, 0, (yyvsp[-3].node_opt_arg), (yyvsp[-1].id), 0, (yyvsp[0].node_args), &(yyloc));
17711 /*% ripper: params!(Qnil, $:opt, $:rest, Qnil, *$:tail[0..2]) %*/
17712 }
17713#line 17714 "parse.c"
17714 break;
17715
17716 case 756: /* args-list_arg_value_opt_args_tail_args_tail_opt_comma: f_opt_arg_arg_value ',' f_rest_arg ',' f_arg opt_args_tail_args_tail_opt_comma */
17717#line 6312 "parse.y"
17718 {
17719 (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));
17720 /*% ripper: params!(Qnil, $:opt, $:rest, $:post, *$:tail[0..2]) %*/
17721 }
17722#line 17723 "parse.c"
17723 break;
17724
17725 case 757: /* args-list_arg_value_opt_args_tail_args_tail_opt_comma: f_opt_arg_arg_value opt_args_tail_args_tail_opt_comma */
17726#line 6317 "parse.y"
17727 {
17728 (yyval.node_args) = new_args(p, 0, (yyvsp[-1].node_opt_arg), 0, 0, (yyvsp[0].node_args), &(yyloc));
17729 /*% ripper: params!(Qnil, $:opt, Qnil, Qnil, *$:tail[0..2]) %*/
17730 }
17731#line 17732 "parse.c"
17732 break;
17733
17734 case 758: /* args-list_arg_value_opt_args_tail_args_tail_opt_comma: f_opt_arg_arg_value ',' f_arg opt_args_tail_args_tail_opt_comma */
17735#line 6322 "parse.y"
17736 {
17737 (yyval.node_args) = new_args(p, 0, (yyvsp[-3].node_opt_arg), 0, (yyvsp[-1].node_args_aux), (yyvsp[0].node_args), &(yyloc));
17738 /*% ripper: params!(Qnil, $:opt, Qnil, $:post, *$:tail[0..2]) %*/
17739 }
17740#line 17741 "parse.c"
17741 break;
17742
17743 case 759: /* args-list_arg_value_opt_args_tail_args_tail_opt_comma: f_rest_arg opt_args_tail_args_tail_opt_comma */
17744#line 6327 "parse.y"
17745 {
17746 (yyval.node_args) = new_args(p, 0, 0, (yyvsp[-1].id), 0, (yyvsp[0].node_args), &(yyloc));
17747 /*% ripper: params!(Qnil, Qnil, $:rest, Qnil, *$:tail[0..2]) %*/
17748 }
17749#line 17750 "parse.c"
17750 break;
17751
17752 case 760: /* args-list_arg_value_opt_args_tail_args_tail_opt_comma: f_rest_arg ',' f_arg opt_args_tail_args_tail_opt_comma */
17753#line 6332 "parse.y"
17754 {
17755 (yyval.node_args) = new_args(p, 0, 0, (yyvsp[-3].id), (yyvsp[-1].node_args_aux), (yyvsp[0].node_args), &(yyloc));
17756 /*% ripper: params!(Qnil, Qnil, $:rest, $:post, *$:tail[0..2]) %*/
17757 }
17758#line 17759 "parse.c"
17759 break;
17760
17761 case 762: /* f_args-list_args_tail_opt_comma: f_arg opt_args_tail_args_tail_opt_comma */
17762#line 6349 "parse.y"
17763 {
17764 (yyval.node_args) = new_args(p, (yyvsp[-1].node_args_aux), 0, 0, 0, (yyvsp[0].node_args), &(yyloc));
17765 /*% ripper: params!($:pre, Qnil, Qnil, Qnil, *$:tail[0..2]) %*/
17766 }
17767#line 17768 "parse.c"
17768 break;
17769
17770 case 763: /* tail-only-args_args_tail: args_tail */
17771#line 6340 "parse.y"
17772 {
17773 (yyval.node_args) = new_args(p, 0, 0, 0, 0, (yyvsp[0].node_args), &(yyloc));
17774 /*% ripper: params!(Qnil, Qnil, Qnil, Qnil, *$:tail[0..2]) %*/
17775 }
17776#line 17777 "parse.c"
17777 break;
17778
17779 case 767: /* opt_args_tail_largs_tail_none: ',' largs_tail */
17780#line 3107 "parse.y"
17781 {
17782 (yyval.node_args) = (yyvsp[0].node_args);
17783 /*% ripper: $:tail %*/
17784 }
17785#line 17786 "parse.c"
17786 break;
17787
17788 case 768: /* opt_args_tail_largs_tail_none: none */
17789#line 3112 "parse.y"
17790 {
17791 (yyval.node_args) = new_empty_args_tail(p, &(yyloc));
17792 /*% ripper: [Qnil, Qnil, Qnil] %*/
17793 }
17794#line 17795 "parse.c"
17795 break;
17796
17797 case 769: /* args-list_arg_value_opt_args_tail_largs_tail_none: f_arg ',' f_opt_arg_arg_value ',' f_rest_arg opt_args_tail_largs_tail_none */
17798#line 6277 "parse.y"
17799 {
17800 (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));
17801 /*% ripper: params!($:pre, $:opt, $:rest, Qnil, *$:tail[0..2]) %*/
17802 }
17803#line 17804 "parse.c"
17804 break;
17805
17806 case 770: /* args-list_arg_value_opt_args_tail_largs_tail_none: f_arg ',' f_opt_arg_arg_value ',' f_rest_arg ',' f_arg opt_args_tail_largs_tail_none */
17807#line 6282 "parse.y"
17808 {
17809 (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));
17810 /*% ripper: params!($:pre, $:opt, $:rest, $:post, *$:tail[0..2]) %*/
17811 }
17812#line 17813 "parse.c"
17813 break;
17814
17815 case 771: /* args-list_arg_value_opt_args_tail_largs_tail_none: f_arg ',' f_opt_arg_arg_value opt_args_tail_largs_tail_none */
17816#line 6287 "parse.y"
17817 {
17818 (yyval.node_args) = new_args(p, (yyvsp[-3].node_args_aux), (yyvsp[-1].node_opt_arg), 0, 0, (yyvsp[0].node_args), &(yyloc));
17819 /*% ripper: params!($:pre, $:opt, Qnil, Qnil, *$:tail[0..2]) %*/
17820 }
17821#line 17822 "parse.c"
17822 break;
17823
17824 case 772: /* args-list_arg_value_opt_args_tail_largs_tail_none: f_arg ',' f_opt_arg_arg_value ',' f_arg opt_args_tail_largs_tail_none */
17825#line 6292 "parse.y"
17826 {
17827 (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));
17828 /*% ripper: params!($:pre, $:opt, Qnil, $:post, *$:tail[0..2]) %*/
17829 }
17830#line 17831 "parse.c"
17831 break;
17832
17833 case 773: /* args-list_arg_value_opt_args_tail_largs_tail_none: f_arg ',' f_rest_arg opt_args_tail_largs_tail_none */
17834#line 6297 "parse.y"
17835 {
17836 (yyval.node_args) = new_args(p, (yyvsp[-3].node_args_aux), 0, (yyvsp[-1].id), 0, (yyvsp[0].node_args), &(yyloc));
17837 /*% ripper: params!($:pre, Qnil, $:rest, Qnil, *$:tail[0..2]) %*/
17838 }
17839#line 17840 "parse.c"
17840 break;
17841
17842 case 774: /* args-list_arg_value_opt_args_tail_largs_tail_none: f_arg ',' f_rest_arg ',' f_arg opt_args_tail_largs_tail_none */
17843#line 6302 "parse.y"
17844 {
17845 (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));
17846 /*% ripper: params!($:pre, Qnil, $:rest, $:post, *$:tail[0..2]) %*/
17847 }
17848#line 17849 "parse.c"
17849 break;
17850
17851 case 775: /* args-list_arg_value_opt_args_tail_largs_tail_none: f_opt_arg_arg_value ',' f_rest_arg opt_args_tail_largs_tail_none */
17852#line 6307 "parse.y"
17853 {
17854 (yyval.node_args) = new_args(p, 0, (yyvsp[-3].node_opt_arg), (yyvsp[-1].id), 0, (yyvsp[0].node_args), &(yyloc));
17855 /*% ripper: params!(Qnil, $:opt, $:rest, Qnil, *$:tail[0..2]) %*/
17856 }
17857#line 17858 "parse.c"
17858 break;
17859
17860 case 776: /* args-list_arg_value_opt_args_tail_largs_tail_none: f_opt_arg_arg_value ',' f_rest_arg ',' f_arg opt_args_tail_largs_tail_none */
17861#line 6312 "parse.y"
17862 {
17863 (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));
17864 /*% ripper: params!(Qnil, $:opt, $:rest, $:post, *$:tail[0..2]) %*/
17865 }
17866#line 17867 "parse.c"
17867 break;
17868
17869 case 777: /* args-list_arg_value_opt_args_tail_largs_tail_none: f_opt_arg_arg_value opt_args_tail_largs_tail_none */
17870#line 6317 "parse.y"
17871 {
17872 (yyval.node_args) = new_args(p, 0, (yyvsp[-1].node_opt_arg), 0, 0, (yyvsp[0].node_args), &(yyloc));
17873 /*% ripper: params!(Qnil, $:opt, Qnil, Qnil, *$:tail[0..2]) %*/
17874 }
17875#line 17876 "parse.c"
17876 break;
17877
17878 case 778: /* args-list_arg_value_opt_args_tail_largs_tail_none: f_opt_arg_arg_value ',' f_arg opt_args_tail_largs_tail_none */
17879#line 6322 "parse.y"
17880 {
17881 (yyval.node_args) = new_args(p, 0, (yyvsp[-3].node_opt_arg), 0, (yyvsp[-1].node_args_aux), (yyvsp[0].node_args), &(yyloc));
17882 /*% ripper: params!(Qnil, $:opt, Qnil, $:post, *$:tail[0..2]) %*/
17883 }
17884#line 17885 "parse.c"
17885 break;
17886
17887 case 779: /* args-list_arg_value_opt_args_tail_largs_tail_none: f_rest_arg opt_args_tail_largs_tail_none */
17888#line 6327 "parse.y"
17889 {
17890 (yyval.node_args) = new_args(p, 0, 0, (yyvsp[-1].id), 0, (yyvsp[0].node_args), &(yyloc));
17891 /*% ripper: params!(Qnil, Qnil, $:rest, Qnil, *$:tail[0..2]) %*/
17892 }
17893#line 17894 "parse.c"
17894 break;
17895
17896 case 780: /* args-list_arg_value_opt_args_tail_largs_tail_none: f_rest_arg ',' f_arg opt_args_tail_largs_tail_none */
17897#line 6332 "parse.y"
17898 {
17899 (yyval.node_args) = new_args(p, 0, 0, (yyvsp[-3].id), (yyvsp[-1].node_args_aux), (yyvsp[0].node_args), &(yyloc));
17900 /*% ripper: params!(Qnil, Qnil, $:rest, $:post, *$:tail[0..2]) %*/
17901 }
17902#line 17903 "parse.c"
17903 break;
17904
17905 case 782: /* f_args-list_largs_tail_none: f_arg opt_args_tail_largs_tail_none */
17906#line 6349 "parse.y"
17907 {
17908 (yyval.node_args) = new_args(p, (yyvsp[-1].node_args_aux), 0, 0, 0, (yyvsp[0].node_args), &(yyloc));
17909 /*% ripper: params!($:pre, Qnil, Qnil, Qnil, *$:tail[0..2]) %*/
17910 }
17911#line 17912 "parse.c"
17912 break;
17913
17914 case 783: /* tail-only-args_largs_tail: largs_tail */
17915#line 6340 "parse.y"
17916 {
17917 (yyval.node_args) = new_args(p, 0, 0, 0, 0, (yyvsp[0].node_args), &(yyloc));
17918 /*% ripper: params!(Qnil, Qnil, Qnil, Qnil, *$:tail[0..2]) %*/
17919 }
17920#line 17921 "parse.c"
17921 break;
17922
17923 case 787: /* args_forward: "(..." */
17924#line 6364 "parse.y"
17925 {
17926 (yyval.id) = idFWD_KWREST;
17927 /*% ripper: args_forward! %*/
17928 }
17929#line 17930 "parse.c"
17930 break;
17931
17932 case 788: /* f_bad_arg: "constant" */
17933#line 6371 "parse.y"
17934 {
17935 static const char mesg[] = "formal argument cannot be a constant";
17936 /*%%%*/
17937 yyerror1(&(yylsp[0]), mesg);
17938 /*% %*/
17939 (yyval.id) = 0;
17940 /*% ripper[error]: param_error!(ERR_MESG(), $:1) %*/
17941 }
17942#line 17943 "parse.c"
17943 break;
17944
17945 case 789: /* f_bad_arg: "instance variable" */
17946#line 6380 "parse.y"
17947 {
17948 static const char mesg[] = "formal argument cannot be an instance variable";
17949 /*%%%*/
17950 yyerror1(&(yylsp[0]), mesg);
17951 /*% %*/
17952 (yyval.id) = 0;
17953 /*% ripper[error]: param_error!(ERR_MESG(), $:1) %*/
17954 }
17955#line 17956 "parse.c"
17956 break;
17957
17958 case 790: /* f_bad_arg: "global variable" */
17959#line 6389 "parse.y"
17960 {
17961 static const char mesg[] = "formal argument cannot be a global variable";
17962 /*%%%*/
17963 yyerror1(&(yylsp[0]), mesg);
17964 /*% %*/
17965 (yyval.id) = 0;
17966 /*% ripper[error]: param_error!(ERR_MESG(), $:1) %*/
17967 }
17968#line 17969 "parse.c"
17969 break;
17970
17971 case 791: /* f_bad_arg: "class variable" */
17972#line 6398 "parse.y"
17973 {
17974 static const char mesg[] = "formal argument cannot be a class variable";
17975 /*%%%*/
17976 yyerror1(&(yylsp[0]), mesg);
17977 /*% %*/
17978 (yyval.id) = 0;
17979 /*% ripper[error]: param_error!(ERR_MESG(), $:1) %*/
17980 }
17981#line 17982 "parse.c"
17982 break;
17983
17984 case 793: /* f_norm_arg: "local variable or method" */
17985#line 6410 "parse.y"
17986 {
17987 VALUE e = formal_argument_error(p, (yyval.id) = (yyvsp[0].id));
17988 if (e) {
17989 /*% ripper[error]: param_error!(?e, $:1) %*/
17990 }
17991 p->max_numparam = ORDINAL_PARAM;
17992 }
17993#line 17994 "parse.c"
17994 break;
17995
17996 case 794: /* f_arg_asgn: f_norm_arg */
17997#line 6420 "parse.y"
17998 {
17999 arg_var(p, (yyvsp[0].id));
18000 (yyval.id) = (yyvsp[0].id);
18001 }
18002#line 18003 "parse.c"
18003 break;
18004
18005 case 795: /* f_arg_item: f_arg_asgn */
18006#line 6427 "parse.y"
18007 {
18008 (yyval.node_args_aux) = NEW_ARGS_AUX((yyvsp[0].id), 1, &NULL_LOC);
18009 /*% ripper: $:1 %*/
18010 }
18011#line 18012 "parse.c"
18012 break;
18013
18014 case 796: /* f_arg_item: "(" f_margs rparen */
18015#line 6432 "parse.y"
18016 {
18017 ID tid = internal_id(p);
18018 YYLTYPE loc;
18019 loc.beg_pos = (yylsp[-1]).beg_pos;
18020 loc.end_pos = (yylsp[-1]).beg_pos;
18021 arg_var(p, tid);
18022 if (dyna_in_block(p)) {
18023 (yyvsp[-1].node_masgn)->nd_value = NEW_DVAR(tid, &loc);
18024 }
18025 else {
18026 (yyvsp[-1].node_masgn)->nd_value = NEW_LVAR(tid, &loc);
18027 }
18028 (yyval.node_args_aux) = NEW_ARGS_AUX(tid, 1, &NULL_LOC);
18029 (yyval.node_args_aux)->nd_next = (NODE *)(yyvsp[-1].node_masgn);
18030 /*% ripper: mlhs_paren!($:2) %*/
18031 }
18032#line 18033 "parse.c"
18033 break;
18034
18035 case 798: /* f_arg: f_arg ',' f_arg_item */
18036#line 6453 "parse.y"
18037 {
18038 (yyval.node_args_aux) = (yyvsp[-2].node_args_aux);
18039 (yyval.node_args_aux)->nd_plen++;
18040 (yyval.node_args_aux)->nd_next = block_append(p, (yyval.node_args_aux)->nd_next, (yyvsp[0].node_args_aux)->nd_next);
18041 rb_discard_node(p, (NODE *)(yyvsp[0].node_args_aux));
18042 /*% ripper: rb_ary_push($:1, $:3) %*/
18043 }
18044#line 18045 "parse.c"
18045 break;
18046
18047 case 799: /* f_label: "label" */
18048#line 6464 "parse.y"
18049 {
18050 VALUE e = formal_argument_error(p, (yyval.id) = (yyvsp[0].id));
18051 if (e) {
18052 (yyval.id) = 0;
18053 /*% ripper[error]: param_error!(?e, $:1) %*/
18054 }
18055 /*
18056 * Workaround for Prism::ParseTest#test_filepath for
18057 * "unparser/corpus/literal/def.txt"
18058 *
18059 * See the discussion on https://github.com/ruby/ruby/pull/9923
18060 */
18061 arg_var(p, ifdef_ripper(0, (yyvsp[0].id)));
18062 /*% ripper: $:1 %*/
18063 p->max_numparam = ORDINAL_PARAM;
18064 p->ctxt.in_argdef = 0;
18065 }
18066#line 18067 "parse.c"
18067 break;
18068
18069 case 802: /* f_no_kwarg: p_kwnorest */
18070#line 6488 "parse.y"
18071 {
18072 /*% ripper: nokw_param!(Qnil) %*/
18073 }
18074#line 18075 "parse.c"
18075 break;
18076
18077 case 803: /* f_kwrest: kwrest_mark "local variable or method" */
18078#line 6494 "parse.y"
18079 {
18080 arg_var(p, shadowing_lvar(p, (yyvsp[0].id)));
18081 (yyval.id) = (yyvsp[0].id);
18082 /*% ripper: kwrest_param!($:2) %*/
18083 }
18084#line 18085 "parse.c"
18085 break;
18086
18087 case 804: /* f_kwrest: kwrest_mark */
18088#line 6500 "parse.y"
18089 {
18090 arg_var(p, idFWD_KWREST);
18091 (yyval.id) = idFWD_KWREST;
18092 /*% ripper: kwrest_param!(Qnil) %*/
18093 }
18094#line 18095 "parse.c"
18095 break;
18096
18097 case 807: /* f_rest_arg: restarg_mark "local variable or method" */
18098#line 6512 "parse.y"
18099 {
18100 arg_var(p, shadowing_lvar(p, (yyvsp[0].id)));
18101 (yyval.id) = (yyvsp[0].id);
18102 /*% ripper: rest_param!($:2) %*/
18103 }
18104#line 18105 "parse.c"
18105 break;
18106
18107 case 808: /* f_rest_arg: restarg_mark */
18108#line 6518 "parse.y"
18109 {
18110 arg_var(p, idFWD_REST);
18111 (yyval.id) = idFWD_REST;
18112 /*% ripper: rest_param!(Qnil) %*/
18113 }
18114#line 18115 "parse.c"
18115 break;
18116
18117 case 811: /* f_block_arg: blkarg_mark "local variable or method" */
18118#line 6530 "parse.y"
18119 {
18120 arg_var(p, shadowing_lvar(p, (yyvsp[0].id)));
18121 (yyval.id) = (yyvsp[0].id);
18122 /*% ripper: blockarg!($:2) %*/
18123 }
18124#line 18125 "parse.c"
18125 break;
18126
18127 case 812: /* f_block_arg: blkarg_mark "'nil'" */
18128#line 6536 "parse.y"
18129 {
18130 (yyval.id) = idNil;
18131 /*% ripper: blockarg!(ID2VAL(idNil)) %*/
18132 }
18133#line 18134 "parse.c"
18134 break;
18135
18136 case 813: /* f_block_arg: blkarg_mark */
18137#line 6541 "parse.y"
18138 {
18139 arg_var(p, idFWD_BLOCK);
18140 (yyval.id) = idFWD_BLOCK;
18141 /*% ripper: blockarg!(Qnil) %*/
18142 }
18143#line 18144 "parse.c"
18144 break;
18145
18146 case 816: /* opt_comma: option_',' */
18147#line 6549 "parse.y"
18148 {
18149 (yyval.id) = 0;
18150 /*% ripper: Qnil %*/
18151 }
18152#line 18153 "parse.c"
18153 break;
18154
18155 case 817: /* value_expr_singleton_expr: singleton_expr */
18156#line 3161 "parse.y"
18157 {
18158 value_expr(p, (yyvsp[0].node));
18159 (yyval.node) = (yyvsp[0].node);
18160 }
18161#line 18162 "parse.c"
18162 break;
18163
18164 case 818: /* singleton: value_expr_singleton_expr */
18165#line 6557 "parse.y"
18166 {
18167 NODE *expr = last_expr_node((yyvsp[0].node));
18168 switch (nd_type(expr)) {
18169 case NODE_STR:
18170 case NODE_DSTR:
18171 case NODE_XSTR:
18172 case NODE_DXSTR:
18173 case NODE_REGX:
18174 case NODE_DREGX:
18175 case NODE_SYM:
18176 case NODE_LINE:
18177 case NODE_FILE:
18178 case NODE_ENCODING:
18179 case NODE_INTEGER:
18180 case NODE_FLOAT:
18181 case NODE_RATIONAL:
18182 case NODE_IMAGINARY:
18183 case NODE_DSYM:
18184 case NODE_LIST:
18185 case NODE_ZLIST:
18186 yyerror1(&expr->nd_loc, "can't define singleton method for literals");
18187 break;
18188 default:
18189 break;
18190 }
18191 (yyval.node) = (yyvsp[0].node);
18192 }
18193#line 18194 "parse.c"
18194 break;
18195
18196 case 820: /* $@41: %empty */
18197#line 6588 "parse.y"
18198 {
18199 SET_LEX_STATE(EXPR_BEG);
18200 p->ctxt.in_argdef = 0;
18201 }
18202#line 18203 "parse.c"
18203 break;
18204
18205 case 821: /* singleton_expr: '(' $@41 expr rparen */
18206#line 6593 "parse.y"
18207 {
18208 p->ctxt.in_argdef = 1;
18209 (yyval.node) = (yyvsp[-1].node);
18210 /*% ripper: paren!($:3) %*/
18211 }
18212#line 18213 "parse.c"
18213 break;
18214
18215 case 823: /* assoc_list: assocs trailer */
18216#line 6602 "parse.y"
18217 {
18218 (yyval.node) = (yyvsp[-1].node);
18219 /*% ripper: assoclist_from_args!($:1) %*/
18220 }
18221#line 18222 "parse.c"
18222 break;
18223
18224 case 825: /* assocs: assocs ',' assoc */
18225#line 6611 "parse.y"
18226 {
18227 NODE *assocs = (yyvsp[-2].node);
18228 NODE *tail = (yyvsp[0].node);
18229 if (!assocs) {
18230 assocs = tail;
18231 }
18232 else if (tail) {
18233 NODE *n = RNODE_LIST(tail)->nd_next;
18234 if (!RNODE_LIST(tail)->nd_head && nd_type_p(n, NODE_LIST) &&
18235 nd_type_p((n = RNODE_LIST(n)->nd_head), NODE_HASH)) {
18236 /* DSTAR */
18237 tail = RNODE_HASH(n)->nd_head;
18238 }
18239 if (tail) {
18240 assocs = list_concat(assocs, tail);
18241 }
18242 }
18243 (yyval.node) = assocs;
18244 /*% ripper: rb_ary_push($:1, $:3) %*/
18245 }
18246#line 18247 "parse.c"
18247 break;
18248
18249 case 826: /* assoc: arg_value "=>" arg_value */
18250#line 6634 "parse.y"
18251 {
18252 (yyval.node) = list_append(p, NEW_LIST((yyvsp[-2].node), &(yyloc)), (yyvsp[0].node));
18253 /*% ripper: assoc_new!($:1, $:3) %*/
18254 }
18255#line 18256 "parse.c"
18256 break;
18257
18258 case 827: /* assoc: "label" arg_value */
18259#line 6639 "parse.y"
18260 {
18261 (yyval.node) = list_append(p, NEW_LIST(NEW_SYM(rb_id2str((yyvsp[-1].id)), &(yylsp[-1])), &(yyloc)), (yyvsp[0].node));
18262 /*% ripper: assoc_new!($:1, $:2) %*/
18263 }
18264#line 18265 "parse.c"
18265 break;
18266
18267 case 828: /* assoc: "label" */
18268#line 6644 "parse.y"
18269 {
18270 NODE *val = gettable(p, (yyvsp[0].id), &(yyloc));
18271 if (!val) val = NEW_ERROR(&(yyloc));
18272 (yyval.node) = list_append(p, NEW_LIST(NEW_SYM(rb_id2str((yyvsp[0].id)), &(yylsp[0])), &(yyloc)), val);
18273 /*% ripper: assoc_new!($:1, Qnil) %*/
18274 }
18275#line 18276 "parse.c"
18276 break;
18277
18278 case 829: /* assoc: "string literal" string_contents tLABEL_END arg_value */
18279#line 6651 "parse.y"
18280 {
18281 YYLTYPE loc = code_loc_gen(&(yylsp[-3]), &(yylsp[-1]));
18282 (yyval.node) = list_append(p, NEW_LIST(dsym_node(p, (yyvsp[-2].node), &loc), &loc), (yyvsp[0].node));
18283 /*% ripper: assoc_new!(dyna_symbol!($:2), $:4) %*/
18284 }
18285#line 18286 "parse.c"
18286 break;
18287
18288 case 830: /* assoc: "**arg" arg_value */
18289#line 6657 "parse.y"
18290 {
18291 (yyval.node) = list_append(p, NEW_LIST(0, &(yyloc)), (yyvsp[0].node));
18292 /*% ripper: assoc_splat!($:2) %*/
18293 }
18294#line 18295 "parse.c"
18295 break;
18296
18297 case 831: /* assoc: "**arg" */
18298#line 6662 "parse.y"
18299 {
18300 forwarding_arg_check(p, idFWD_KWREST, idFWD_ALL, "keyword rest");
18301 (yyval.node) = list_append(p, NEW_LIST(0, &(yyloc)),
18302 NEW_LVAR(idFWD_KWREST, &(yyloc)));
18303 /*% ripper: assoc_splat!(Qnil) %*/
18304 }
18305#line 18306 "parse.c"
18306 break;
18307
18308 case 850: /* term: ';' */
18309#line 6709 "parse.y"
18310 {
18311 yyerrok;
18312 token_flush(p);
18313 if (p->ctxt.in_defined) {
18314 p->ctxt.has_trailing_semicolon = 1;
18315 }
18316 }
18317#line 18318 "parse.c"
18318 break;
18319
18320 case 851: /* term: '\n' */
18321#line 6717 "parse.y"
18322 {
18323 (yyloc).end_pos = (yyloc).beg_pos;
18324 token_flush(p);
18325 }
18326#line 18327 "parse.c"
18327 break;
18328
18329 case 853: /* terms: terms ';' */
18330#line 6724 "parse.y"
18331 {yyerrok;}
18332#line 18333 "parse.c"
18333 break;
18334
18335 case 854: /* none: %empty */
18336#line 6728 "parse.y"
18337 {
18338 (yyval.node) = 0;
18339 /*% ripper: Qnil %*/
18340 }
18341#line 18342 "parse.c"
18342 break;
18343
18344
18345#line 18346 "parse.c"
18346
18347 default: break;
18348 }
18349 /* User semantic actions sometimes alter yychar, and that requires
18350 that yytoken be updated with the new translation. We take the
18351 approach of translating immediately before every use of yytoken.
18352 One alternative is translating here after every semantic action,
18353 but that translation would be missed if the semantic action invokes
18354 YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or
18355 if it invokes YYBACKUP. In the case of YYABORT or YYACCEPT, an
18356 incorrect destructor might then be invoked immediately. In the
18357 case of YYERROR or YYBACKUP, subsequent parser actions might lead
18358 to an incorrect destructor call or verbose syntax error message
18359 before the lookahead is translated. */
18360 YY_SYMBOL_PRINT ("-> $$ =", YY_CAST (yysymbol_kind_t, yyr1[yyn]), &yyval, &yyloc, p);
18361
18362 YYPOPSTACK (yylen);
18363 /* %after-reduce function. */
18364#line 2673 "parse.y"
18365 {after_reduce(yylen, p);}
18366#line 18367 "parse.c"
18367
18368 yylen = 0;
18369
18370 *++yyvsp = yyval;
18371 *++yylsp = yyloc;
18372
18373 /* Now 'shift' the result of the reduction. Determine what state
18374 that goes to, based on the state we popped back to and the rule
18375 number reduced by. */
18376 {
18377 const int yylhs = yyr1[yyn] - YYNTOKENS;
18378 const int yyi = yypgoto[yylhs] + *yyssp;
18379 yystate = (0 <= yyi && yyi <= YYLAST && yycheck[yyi] == *yyssp
18380 ? yytable[yyi]
18381 : yydefgoto[yylhs]);
18382 }
18383
18384 goto yynewstate;
18385
18386
18387/*--------------------------------------.
18388| yyerrlab -- here on detecting error. |
18389`--------------------------------------*/
18390yyerrlab:
18391 /* Make sure we have latest lookahead translation. See comments at
18392 user semantic actions for why this is necessary. */
18393 yytoken = yychar == YYEMPTY ? YYSYMBOL_YYEMPTY : YYTRANSLATE (yychar);
18394 /* If not already recovering from an error, report this error. */
18395 if (!yyerrstatus)
18396 {
18397 ++yynerrs;
18398 {
18399 yypcontext_t yyctx
18400 = {yyssp, yytoken, &yylloc};
18401 char const *yymsgp = YY_("syntax error");
18402 int yysyntax_error_status;
18403 yysyntax_error_status = yysyntax_error (&yymsg_alloc, &yymsg, &yyctx, p);
18404 if (yysyntax_error_status == 0)
18405 yymsgp = yymsg;
18406 else if (yysyntax_error_status == -1)
18407 {
18408 if (yymsg != yymsgbuf)
18409 YYSTACK_FREE (yymsg);
18410 yymsg = YY_CAST (char *,
18411 YYSTACK_ALLOC (YY_CAST (YYSIZE_T, yymsg_alloc)));
18412 if (yymsg)
18413 {
18414 yysyntax_error_status
18415 = yysyntax_error (&yymsg_alloc, &yymsg, &yyctx, p);
18416 yymsgp = yymsg;
18417 }
18418 else
18419 {
18420 yymsg = yymsgbuf;
18421 yymsg_alloc = sizeof yymsgbuf;
18422 yysyntax_error_status = YYENOMEM;
18423 }
18424 }
18425 yyerror (&yylloc, p, yymsgp);
18426 if (yysyntax_error_status == YYENOMEM)
18427 YYNOMEM;
18428 }
18429 }
18430
18431 yyerror_range[1] = yylloc;
18432 if (yyerrstatus == 3)
18433 {
18434 /* If just tried and failed to reuse lookahead token after an
18435 error, discard it. */
18436
18437 if (yychar <= END_OF_INPUT)
18438 {
18439 /* Return failure if at end of input. */
18440 if (yychar == END_OF_INPUT)
18441 YYABORT;
18442 }
18443 else
18444 {
18445 yydestruct ("Error: discarding",
18446 yytoken, &yylval, &yylloc, p);
18447 yychar = YYEMPTY;
18448 }
18449 }
18450
18451 /* Else will try to reuse lookahead token after shifting the error
18452 token. */
18453 goto yyerrlab1;
18454
18455
18456/*---------------------------------------------------.
18457| yyerrorlab -- error raised explicitly by YYERROR. |
18458`---------------------------------------------------*/
18459yyerrorlab:
18460 /* Pacify compilers when the user code never invokes YYERROR and the
18461 label yyerrorlab therefore never appears in user code. */
18462 if (0)
18463 YYERROR;
18464 ++yynerrs;
18465
18466 /* Do not reclaim the symbols of the rule whose action triggered
18467 this YYERROR. */
18468 YYPOPSTACK (yylen);
18469 /* %after-pop-stack function. */
18470#line 2675 "parse.y"
18471 {after_pop_stack(yylen, p);}
18472#line 18473 "parse.c"
18473
18474 yylen = 0;
18475 YY_STACK_PRINT (yyss, yyssp, p);
18476 yystate = *yyssp;
18477 goto yyerrlab1;
18478
18479
18480/*-------------------------------------------------------------.
18481| yyerrlab1 -- common code for both syntax error and YYERROR. |
18482`-------------------------------------------------------------*/
18483yyerrlab1:
18484 yyerrstatus = 3; /* Each real token shifted decrements this. */
18485
18486 /* Pop stack until we find a state that shifts the error token. */
18487 for (;;)
18488 {
18489 yyn = yypact[yystate];
18490 if (!yypact_value_is_default (yyn))
18491 {
18492 yyn += YYSYMBOL_YYerror;
18493 if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror)
18494 {
18495 yyn = yytable[yyn];
18496 if (0 < yyn)
18497 break;
18498 }
18499 }
18500
18501 /* Pop the current state because it cannot handle the error token. */
18502 if (yyssp == yyss)
18503 YYABORT;
18504
18505 yyerror_range[1] = *yylsp;
18506 yydestruct ("Error: popping",
18507 YY_ACCESSING_SYMBOL (yystate), yyvsp, yylsp, p);
18508 YYPOPSTACK (1);
18509 /* %after-pop-stack function. */
18510#line 2675 "parse.y"
18511 {after_pop_stack(1, p);}
18512#line 18513 "parse.c"
18513
18514 yystate = *yyssp;
18515 YY_STACK_PRINT (yyss, yyssp, p);
18516 }
18517
18518 YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
18519 *++yyvsp = yylval;
18520 YY_IGNORE_MAYBE_UNINITIALIZED_END
18521
18522 yyerror_range[2] = yylloc;
18523 ++yylsp;
18524 YYLLOC_DEFAULT (*yylsp, yyerror_range, 2);
18525
18526 /* Shift the error token. */
18527 YY_SYMBOL_PRINT ("Shifting", YY_ACCESSING_SYMBOL (yyn), yyvsp, yylsp, p);
18528 /* %after-shift-error-token code. */
18529#line 2674 "parse.y"
18530 {after_shift_error_token(p);}
18531#line 18532 "parse.c"
18532
18533
18534 yystate = yyn;
18535 goto yynewstate;
18536
18537
18538/*-------------------------------------.
18539| yyacceptlab -- YYACCEPT comes here. |
18540`-------------------------------------*/
18541yyacceptlab:
18542 yyresult = 0;
18543 goto yyreturnlab;
18544
18545
18546/*-----------------------------------.
18547| yyabortlab -- YYABORT comes here. |
18548`-----------------------------------*/
18549yyabortlab:
18550 yyresult = 1;
18551 goto yyreturnlab;
18552
18553
18554/*-----------------------------------------------------------.
18555| yyexhaustedlab -- YYNOMEM (memory exhaustion) comes here. |
18556`-----------------------------------------------------------*/
18557yyexhaustedlab:
18558 yyerror (&yylloc, p, YY_("memory exhausted"));
18559 yyresult = 2;
18560 goto yyreturnlab;
18561
18562
18563/*----------------------------------------------------------.
18564| yyreturnlab -- parsing is finished, clean up and return. |
18565`----------------------------------------------------------*/
18566yyreturnlab:
18567 if (yychar != YYEMPTY)
18568 {
18569 /* Make sure we have latest lookahead translation. See comments at
18570 user semantic actions for why this is necessary. */
18571 yytoken = YYTRANSLATE (yychar);
18572 yydestruct ("Cleanup: discarding lookahead",
18573 yytoken, &yylval, &yylloc, p);
18574 }
18575 /* Do not reclaim the symbols of the rule whose action triggered
18576 this YYABORT or YYACCEPT. */
18577 YYPOPSTACK (yylen);
18578 YY_STACK_PRINT (yyss, yyssp, p);
18579 while (yyssp != yyss)
18580 {
18581 yydestruct ("Cleanup: popping",
18582 YY_ACCESSING_SYMBOL (+*yyssp), yyvsp, yylsp, p);
18583 YYPOPSTACK (1);
18584 }
18585#ifndef yyoverflow
18586 if (yyss != yyssa)
18587 YYSTACK_FREE (yyss);
18588#endif
18589 if (yymsg != yymsgbuf)
18590 YYSTACK_FREE (yymsg);
18591 return yyresult;
18592}
18593
18594#line 6733 "parse.y"
18595
18596# undef p
18597# undef yylex
18598# undef yylval
18599# define yylval (*p->lval)
18600
18601static int regx_options(struct parser_params*);
18602static int tokadd_string(struct parser_params*,int,int,int,long*,rb_encoding**,rb_encoding**);
18603static void tokaddmbc(struct parser_params *p, int c, rb_encoding *enc);
18604static enum yytokentype parse_string(struct parser_params*,rb_strterm_literal_t*);
18605static enum yytokentype here_document(struct parser_params*,rb_strterm_heredoc_t*);
18606
18607#define set_parser_s_value(x) (ifdef_ripper(p->s_value = (x), (void)0))
18608
18609# define set_yylval_node(x) { \
18610 YYLTYPE _cur_loc; \
18611 rb_parser_set_location(p, &_cur_loc); \
18612 yylval.node = (x); \
18613 set_parser_s_value(STR_NEW(p->lex.ptok, p->lex.pcur-p->lex.ptok)); \
18614}
18615# define set_yylval_str(x) \
18616do { \
18617 set_yylval_node(NEW_STR(x, &_cur_loc)); \
18618 set_parser_s_value(rb_str_new_mutable_parser_string(x)); \
18619} while(0)
18620# define set_yylval_num(x) { \
18621 yylval.num = (x); \
18622 set_parser_s_value(x); \
18623}
18624# define set_yylval_id(x) (yylval.id = (x))
18625# define set_yylval_name(x) { \
18626 (yylval.id = (x)); \
18627 set_parser_s_value(ID2SYM(x)); \
18628}
18629# define yylval_id() (yylval.id)
18630
18631#define set_yylval_noname() set_yylval_id(keyword_nil)
18632#define has_delayed_token(p) (p->delayed.token != NULL)
18633
18634#ifndef RIPPER
18635#define literal_flush(p, ptr) ((p)->lex.ptok = (ptr))
18636#define dispatch_scan_event(p, t) parser_dispatch_scan_event(p, t, __LINE__)
18637
18638static bool
18639parser_has_token(struct parser_params *p)
18640{
18641 const char *const pcur = p->lex.pcur;
18642 const char *const ptok = p->lex.ptok;
18643 if (p->keep_tokens && (pcur < ptok)) {
18644 rb_bug("lex.pcur < lex.ptok. (line: %d) %"PRIdPTRDIFF"|%"PRIdPTRDIFF"|%"PRIdPTRDIFF"",
18645 p->ruby_sourceline, ptok - p->lex.pbeg, pcur - ptok, p->lex.pend - pcur);
18646 }
18647 return pcur > ptok;
18648}
18649
18650static const char *
18651escaped_char(int c)
18652{
18653 switch (c) {
18654 case '"': return "\\\"";
18655 case '\\': return "\\\\";
18656 case '\0': return "\\0";
18657 case '\n': return "\\n";
18658 case '\r': return "\\r";
18659 case '\t': return "\\t";
18660 case '\f': return "\\f";
18661 case '\013': return "\\v";
18662 case '\010': return "\\b";
18663 case '\007': return "\\a";
18664 case '\033': return "\\e";
18665 case '\x7f': return "\\c?";
18666 }
18667 return NULL;
18668}
18669
18670static rb_parser_string_t *
18671rb_parser_str_escape(struct parser_params *p, rb_parser_string_t *str)
18672{
18673 rb_encoding *enc = p->enc;
18674 const char *ptr = str->ptr;
18675 const char *pend = ptr + str->len;
18676 const char *prev = ptr;
18677 char charbuf[5] = {'\\', 'x', 0, 0, 0};
18678 rb_parser_string_t * result = rb_parser_string_new(p, 0, 0);
18679
18680 while (ptr < pend) {
18681 unsigned int c;
18682 const char *cc;
18683 int n = rb_enc_precise_mbclen(ptr, pend, enc);
18684 if (!MBCLEN_CHARFOUND_P(n)) {
18685 if (ptr > prev) parser_str_cat(result, prev, ptr - prev);
18686 n = rb_enc_mbminlen(enc);
18687 if (pend < ptr + n)
18688 n = (int)(pend - ptr);
18689 while (n--) {
18690 c = ((unsigned char)*ptr >> 4) & 0x0f;
18691 charbuf[2] = (c < 10) ? '0' + c : 'A' + c - 10;
18692 c = *ptr & 0x0f;
18693 charbuf[3] = (c < 10) ? '0' + c : 'A' + c - 10;
18694 parser_str_cat(result, charbuf, 4);
18695 prev = ++ptr;
18696 }
18697 continue;
18698 }
18699 n = MBCLEN_CHARFOUND_LEN(n);
18700 c = rb_enc_mbc_to_codepoint(ptr, pend, enc);
18701 ptr += n;
18702 cc = escaped_char(c);
18703 if (cc) {
18704 if (ptr - n > prev) parser_str_cat(result, prev, ptr - n - prev);
18705 parser_str_cat_cstr(result, cc);
18706 prev = ptr;
18707 }
18708 else if (rb_enc_isascii(c, enc) && ISPRINT(c)) {
18709 }
18710 else {
18711 if (ptr - n > prev) {
18712 parser_str_cat(result, prev, ptr - n - prev);
18713 prev = ptr - n;
18714 }
18715 parser_str_cat(result, prev, ptr - prev);
18716 prev = ptr;
18717 }
18718 }
18719 if (ptr > prev) parser_str_cat(result, prev, ptr - prev);
18720
18721 return result;
18722}
18723
18724static void
18725parser_append_tokens(struct parser_params *p, rb_parser_string_t *str, enum yytokentype t, int line)
18726{
18728 token->id = p->token_id;
18729 token->type_name = parser_token2char(p, t);
18730 token->str = str;
18731 token->loc.beg_pos = p->yylloc->beg_pos;
18732 token->loc.end_pos = p->yylloc->end_pos;
18733 rb_parser_ary_push_ast_token(p, p->tokens, token);
18734 p->token_id++;
18735
18736 if (p->debug) {
18737 rb_parser_string_t *str_escaped = rb_parser_str_escape(p, str);
18738 rb_parser_printf(p, "Append tokens (line: %d) [%d, :%s, \"%s\", [%d, %d, %d, %d]]\n",
18739 line, token->id, token->type_name, str_escaped->ptr,
18740 token->loc.beg_pos.lineno, token->loc.beg_pos.column,
18741 token->loc.end_pos.lineno, token->loc.end_pos.column);
18742 rb_parser_string_free(p, str_escaped);
18743 }
18744}
18745
18746static void
18747parser_dispatch_scan_event(struct parser_params *p, enum yytokentype t, int line)
18748{
18749 debug_token_line(p, "parser_dispatch_scan_event", line);
18750
18751 if (!parser_has_token(p)) return;
18752
18753 RUBY_SET_YYLLOC(*p->yylloc);
18754
18755 if (p->keep_tokens) {
18756 rb_parser_string_t *str = rb_parser_encoding_string_new(p, p->lex.ptok, p->lex.pcur - p->lex.ptok, p->enc);
18757 parser_append_tokens(p, str, t, line);
18758 }
18759
18760 token_flush(p);
18761}
18762
18763#define dispatch_delayed_token(p, t) parser_dispatch_delayed_token(p, t, __LINE__)
18764static void
18765parser_dispatch_delayed_token(struct parser_params *p, enum yytokentype t, int line)
18766{
18767 debug_token_line(p, "parser_dispatch_delayed_token", line);
18768
18769 if (!has_delayed_token(p)) return;
18770
18771 RUBY_SET_YYLLOC_OF_DELAYED_TOKEN(*p->yylloc);
18772
18773 if (p->keep_tokens) {
18774 /* p->delayed.token is freed by rb_parser_tokens_free */
18775 parser_append_tokens(p, p->delayed.token, t, line);
18776 }
18777 else {
18778 rb_parser_string_free(p, p->delayed.token);
18779 }
18780
18781 p->delayed.token = NULL;
18782}
18783#else
18784#define literal_flush(p, ptr) ((void)(ptr))
18785
18786static int
18787ripper_has_scan_event(struct parser_params *p)
18788{
18789 if (p->lex.pcur < p->lex.ptok) rb_raise(rb_eRuntimeError, "lex.pcur < lex.ptok");
18790 return p->lex.pcur > p->lex.ptok;
18791}
18792
18793static VALUE
18794ripper_scan_event_val(struct parser_params *p, enum yytokentype t)
18795{
18796 VALUE str = STR_NEW(p->lex.ptok, p->lex.pcur - p->lex.ptok);
18797 VALUE rval = ripper_dispatch1(p, ripper_token2eventid(t), str);
18798 RUBY_SET_YYLLOC(*p->yylloc);
18799 token_flush(p);
18800 return rval;
18801}
18802
18803static void
18804ripper_dispatch_scan_event(struct parser_params *p, enum yytokentype t)
18805{
18806 if (!ripper_has_scan_event(p)) return;
18807
18808 set_parser_s_value(ripper_scan_event_val(p, t));
18809}
18810#define dispatch_scan_event(p, t) ripper_dispatch_scan_event(p, t)
18811
18812static void
18813ripper_dispatch_delayed_token(struct parser_params *p, enum yytokentype t)
18814{
18815 /* save and adjust the location to delayed token for callbacks */
18816 int saved_line = p->ruby_sourceline;
18817 const char *saved_tokp = p->lex.ptok;
18818 VALUE s_value, str;
18819
18820 if (!has_delayed_token(p)) return;
18821 p->ruby_sourceline = p->delayed.beg_line;
18822 p->lex.ptok = p->lex.pbeg + p->delayed.beg_col;
18823 str = rb_str_new_mutable_parser_string(p->delayed.token);
18824 rb_parser_string_free(p, p->delayed.token);
18825 s_value = ripper_dispatch1(p, ripper_token2eventid(t), str);
18826 set_parser_s_value(s_value);
18827 p->delayed.token = NULL;
18828 p->ruby_sourceline = saved_line;
18829 p->lex.ptok = saved_tokp;
18830}
18831#define dispatch_delayed_token(p, t) ripper_dispatch_delayed_token(p, t)
18832#endif /* RIPPER */
18833
18834static inline int
18835is_identchar(struct parser_params *p, const char *ptr, const char *MAYBE_UNUSED(ptr_end), rb_encoding *enc)
18836{
18837 return rb_enc_isalnum((unsigned char)*ptr, enc) || *ptr == '_' || !ISASCII(*ptr);
18838}
18839
18840static inline bool
18841peek_word_at(struct parser_params *p, const char *str, size_t len, int at)
18842{
18843 const char *ptr = p->lex.pcur + at;
18844 if (lex_eol_ptr_n_p(p, ptr, len-1)) return false;
18845 if (memcmp(ptr, str, len)) return false;
18846 if (lex_eol_ptr_n_p(p, ptr, len)) return true;
18847 switch (ptr[len]) {
18848 case '!': case '?': return false;
18849 }
18850 return !is_identchar(p, ptr+len, p->lex.pend, p->enc);
18851}
18852
18853static inline int
18854parser_is_identchar(struct parser_params *p)
18855{
18856 return !(p)->eofp && is_identchar(p, p->lex.pcur-1, p->lex.pend, p->enc);
18857}
18858
18859static inline int
18860parser_isascii(struct parser_params *p)
18861{
18862 return ISASCII(*(p->lex.pcur-1));
18863}
18864
18865static void
18866token_info_setup(token_info *ptinfo, const char *ptr, const rb_code_location_t *loc)
18867{
18868 int column = 1, nonspc = 0, i;
18869 for (i = 0; i < loc->beg_pos.column; i++, ptr++) {
18870 if (*ptr == '\t') {
18871 column = (((column - 1) / TAB_WIDTH) + 1) * TAB_WIDTH;
18872 }
18873 column++;
18874 if (*ptr != ' ' && *ptr != '\t') {
18875 nonspc = 1;
18876 }
18877 }
18878
18879 ptinfo->beg = loc->beg_pos;
18880 ptinfo->indent = column;
18881 ptinfo->nonspc = nonspc;
18882}
18883
18884static void
18885token_info_push(struct parser_params *p, const char *token, const rb_code_location_t *loc)
18886{
18887 token_info *ptinfo;
18888
18889 if (!p->token_info_enabled) return;
18890 ptinfo = ALLOC(token_info);
18891 ptinfo->token = token;
18892 ptinfo->next = p->token_info;
18893 token_info_setup(ptinfo, p->lex.pbeg, loc);
18894
18895 p->token_info = ptinfo;
18896}
18897
18898static void
18899token_info_pop(struct parser_params *p, const char *token, const rb_code_location_t *loc)
18900{
18901 token_info *ptinfo_beg = p->token_info;
18902
18903 if (!ptinfo_beg) return;
18904
18905 /* indentation check of matched keywords (begin..end, if..end, etc.) */
18906 token_info_warn(p, token, ptinfo_beg, 1, loc);
18907
18908 p->token_info = ptinfo_beg->next;
18909 ruby_xfree_sized(ptinfo_beg, sizeof(*ptinfo_beg));
18910}
18911
18912static void
18913token_info_drop(struct parser_params *p, const char *token, rb_code_position_t beg_pos)
18914{
18915 token_info *ptinfo_beg = p->token_info;
18916
18917 if (!ptinfo_beg) return;
18918 p->token_info = ptinfo_beg->next;
18919
18920 if (ptinfo_beg->beg.lineno != beg_pos.lineno ||
18921 ptinfo_beg->beg.column != beg_pos.column ||
18922 strcmp(ptinfo_beg->token, token)) {
18923 compile_error(p, "token position mismatch: %d:%d:%s expected but %d:%d:%s",
18924 beg_pos.lineno, beg_pos.column, token,
18925 ptinfo_beg->beg.lineno, ptinfo_beg->beg.column,
18926 ptinfo_beg->token);
18927 }
18928
18929 ruby_xfree_sized(ptinfo_beg, sizeof(*ptinfo_beg));
18930}
18931
18932static void
18933token_info_warn(struct parser_params *p, const char *token, token_info *ptinfo_beg, int same, const rb_code_location_t *loc)
18934{
18935 token_info ptinfo_end_body, *ptinfo_end = &ptinfo_end_body;
18936 if (!p->token_info_enabled) return;
18937 if (!ptinfo_beg) return;
18938 token_info_setup(ptinfo_end, p->lex.pbeg, loc);
18939 if (ptinfo_beg->beg.lineno == ptinfo_end->beg.lineno) return; /* ignore one-line block */
18940 if (ptinfo_beg->nonspc || ptinfo_end->nonspc) return; /* ignore keyword in the middle of a line */
18941 if (ptinfo_beg->indent == ptinfo_end->indent) return; /* the indents are matched */
18942 if (!same && ptinfo_beg->indent < ptinfo_end->indent) return;
18943 rb_warn3L(ptinfo_end->beg.lineno,
18944 "mismatched indentations at '%s' with '%s' at %d",
18945 WARN_S(token), WARN_S(ptinfo_beg->token), WARN_I(ptinfo_beg->beg.lineno));
18946}
18947
18948static int
18949parser_precise_mbclen(struct parser_params *p, const char *ptr)
18950{
18951 int len = rb_enc_precise_mbclen(ptr, p->lex.pend, p->enc);
18952 if (!MBCLEN_CHARFOUND_P(len)) {
18953 compile_error(p, "invalid multibyte char (%s)", rb_enc_name(p->enc));
18954 return -1;
18955 }
18956 return len;
18957}
18958
18959#ifndef RIPPER
18960static inline void
18961parser_show_error_line(struct parser_params *p, const YYLTYPE *yylloc)
18962{
18963 rb_parser_string_t *str;
18964 int lineno = p->ruby_sourceline;
18965 if (!yylloc) {
18966 return;
18967 }
18968 else if (yylloc->beg_pos.lineno == lineno) {
18969 str = p->lex.lastline;
18970 }
18971 else {
18972 return;
18973 }
18974 ruby_show_error_line(p, p->error_buffer, yylloc, lineno, str);
18975}
18976
18977static int
18978parser_yyerror(struct parser_params *p, const rb_code_location_t *yylloc, const char *msg)
18979{
18980#if 0
18981 YYLTYPE current;
18982
18983 if (!yylloc) {
18984 yylloc = RUBY_SET_YYLLOC(current);
18985 }
18986 else if ((p->ruby_sourceline != yylloc->beg_pos.lineno &&
18987 p->ruby_sourceline != yylloc->end_pos.lineno)) {
18988 yylloc = 0;
18989 }
18990#endif
18991 parser_compile_error(p, yylloc, "%s", msg);
18992 parser_show_error_line(p, yylloc);
18993 return 0;
18994}
18995
18996static int
18997parser_yyerror0(struct parser_params *p, const char *msg)
18998{
18999 YYLTYPE current;
19000 return parser_yyerror(p, RUBY_SET_YYLLOC(current), msg);
19001}
19002
19003void
19004ruby_show_error_line(struct parser_params *p, VALUE errbuf, const YYLTYPE *yylloc, int lineno, rb_parser_string_t *str)
19005{
19006 VALUE mesg;
19007 const int max_line_margin = 30;
19008 const char *ptr, *ptr_end, *pt, *pb;
19009 const char *pre = "", *post = "", *pend;
19010 const char *code = "", *caret = "";
19011 const char *lim;
19012 const char *const pbeg = PARSER_STRING_PTR(str);
19013 char *buf;
19014 long len;
19015 int i;
19016
19017 if (!yylloc) return;
19018 pend = rb_parser_string_end(str);
19019 if (pend > pbeg && pend[-1] == '\n') {
19020 if (--pend > pbeg && pend[-1] == '\r') --pend;
19021 }
19022
19023 pt = pend;
19024 if (lineno == yylloc->end_pos.lineno &&
19025 (pend - pbeg) > yylloc->end_pos.column) {
19026 pt = pbeg + yylloc->end_pos.column;
19027 }
19028
19029 ptr = ptr_end = pt;
19030 lim = ptr - pbeg > max_line_margin ? ptr - max_line_margin : pbeg;
19031 while ((lim < ptr) && (*(ptr-1) != '\n')) ptr--;
19032
19033 lim = pend - ptr_end > max_line_margin ? ptr_end + max_line_margin : pend;
19034 while ((ptr_end < lim) && (*ptr_end != '\n') && (*ptr_end != '\r')) ptr_end++;
19035
19036 len = ptr_end - ptr;
19037 if (len > 4) {
19038 if (ptr > pbeg) {
19039 ptr = rb_enc_prev_char(pbeg, ptr, pt, rb_parser_str_get_encoding(str));
19040 if (ptr > pbeg) pre = "...";
19041 }
19042 if (ptr_end < pend) {
19043 ptr_end = rb_enc_prev_char(pt, ptr_end, pend, rb_parser_str_get_encoding(str));
19044 if (ptr_end < pend) post = "...";
19045 }
19046 }
19047 pb = pbeg;
19048 if (lineno == yylloc->beg_pos.lineno) {
19049 pb += yylloc->beg_pos.column;
19050 if (pb > pt) pb = pt;
19051 }
19052 if (pb < ptr) pb = ptr;
19053 if (len <= 4 && yylloc->beg_pos.lineno == yylloc->end_pos.lineno) {
19054 return;
19055 }
19056 if (RTEST(errbuf)) {
19057 mesg = rb_attr_get(errbuf, idMesg);
19058 if (char_at_end(p, mesg, '\n') != '\n')
19059 rb_str_cat_cstr(mesg, "\n");
19060 }
19061 else {
19062 mesg = rb_enc_str_new(0, 0, rb_parser_str_get_encoding(str));
19063 }
19064 if (!errbuf && rb_stderr_tty_p()) {
19065#define CSI_BEGIN "\033["
19066#define CSI_SGR "m"
19067 rb_str_catf(mesg,
19068 CSI_BEGIN""CSI_SGR"%s" /* pre */
19069 CSI_BEGIN"1"CSI_SGR"%.*s"
19070 CSI_BEGIN"1;4"CSI_SGR"%.*s"
19071 CSI_BEGIN";1"CSI_SGR"%.*s"
19072 CSI_BEGIN""CSI_SGR"%s" /* post */
19073 "\n",
19074 pre,
19075 (int)(pb - ptr), ptr,
19076 (int)(pt - pb), pb,
19077 (int)(ptr_end - pt), pt,
19078 post);
19079 }
19080 else {
19081 char *p2;
19082
19083 len = ptr_end - ptr;
19084 lim = pt < pend ? pt : pend;
19085 i = (int)(lim - ptr);
19086 buf = ALLOCA_N(char, i+2);
19087 code = ptr;
19088 caret = p2 = buf;
19089 if (ptr <= pb) {
19090 while (ptr < pb) {
19091 *p2++ = *ptr++ == '\t' ? '\t' : ' ';
19092 }
19093 *p2++ = '^';
19094 ptr++;
19095 }
19096 if (lim > ptr) {
19097 memset(p2, '~', (lim - ptr));
19098 p2 += (lim - ptr);
19099 }
19100 *p2 = '\0';
19101 rb_str_catf(mesg, "%s%.*s%s\n""%s%s\n",
19102 pre, (int)len, code, post,
19103 pre, caret);
19104 }
19105 if (!errbuf) rb_write_error_str(mesg);
19106}
19107#else
19108
19109static int
19110parser_yyerror(struct parser_params *p, const YYLTYPE *yylloc, const char *msg)
19111{
19112 const char *pcur = 0, *ptok = 0;
19113 if (p->ruby_sourceline == yylloc->beg_pos.lineno &&
19114 p->ruby_sourceline == yylloc->end_pos.lineno) {
19115 pcur = p->lex.pcur;
19116 ptok = p->lex.ptok;
19117 p->lex.ptok = p->lex.pbeg + yylloc->beg_pos.column;
19118 p->lex.pcur = p->lex.pbeg + yylloc->end_pos.column;
19119 }
19120 parser_yyerror0(p, msg);
19121 if (pcur) {
19122 p->lex.ptok = ptok;
19123 p->lex.pcur = pcur;
19124 }
19125 return 0;
19126}
19127
19128static int
19129parser_yyerror0(struct parser_params *p, const char *msg)
19130{
19131 dispatch1(parse_error, STR_NEW2(msg));
19132 ripper_error(p);
19133 return 0;
19134}
19135
19136static inline void
19137parser_show_error_line(struct parser_params *p, const YYLTYPE *yylloc)
19138{
19139}
19140#endif /* !RIPPER */
19141
19142static int
19143vtable_size(const struct vtable *tbl)
19144{
19145 if (!DVARS_TERMINAL_P(tbl)) {
19146 return tbl->pos;
19147 }
19148 else {
19149 return 0;
19150 }
19151}
19152
19153static struct vtable *
19154vtable_alloc_gen(struct parser_params *p, int line, struct vtable *prev)
19155{
19156 struct vtable *tbl = ALLOC(struct vtable);
19157 tbl->pos = 0;
19158 tbl->capa = 8;
19159 tbl->tbl = ALLOC_N(ID, tbl->capa);
19160 tbl->prev = prev;
19161#ifndef RIPPER
19162 if (p->debug) {
19163 rb_parser_printf(p, "vtable_alloc:%d: %p\n", line, (void *)tbl);
19164 }
19165#endif
19166 return tbl;
19167}
19168#define vtable_alloc(prev) vtable_alloc_gen(p, __LINE__, prev)
19169
19170static void
19171vtable_free_gen(struct parser_params *p, int line, const char *name,
19172 struct vtable *tbl)
19173{
19174#ifndef RIPPER
19175 if (p->debug) {
19176 rb_parser_printf(p, "vtable_free:%d: %s(%p)\n", line, name, (void *)tbl);
19177 }
19178#endif
19179 if (!DVARS_TERMINAL_P(tbl)) {
19180 if (tbl->tbl) {
19181 ruby_xfree_sized(tbl->tbl, tbl->capa * sizeof(ID));
19182 }
19183 ruby_xfree_sized(tbl, sizeof(*tbl));
19184 }
19185}
19186#define vtable_free(tbl) vtable_free_gen(p, __LINE__, #tbl, tbl)
19187
19188static void
19189vtable_add_gen(struct parser_params *p, int line, const char *name,
19190 struct vtable *tbl, ID id)
19191{
19192#ifndef RIPPER
19193 if (p->debug) {
19194 rb_parser_printf(p, "vtable_add:%d: %s(%p), %s\n",
19195 line, name, (void *)tbl, rb_id2name(id));
19196 }
19197#endif
19198 if (DVARS_TERMINAL_P(tbl)) {
19199 rb_parser_fatal(p, "vtable_add: vtable is not allocated (%p)", (void *)tbl);
19200 return;
19201 }
19202 if (tbl->pos == tbl->capa) {
19203 tbl->capa = tbl->capa * 2;
19204 SIZED_REALLOC_N(tbl->tbl, ID, tbl->capa, tbl->pos);
19205 }
19206 tbl->tbl[tbl->pos++] = id;
19207}
19208#define vtable_add(tbl, id) vtable_add_gen(p, __LINE__, #tbl, tbl, id)
19209
19210static void
19211vtable_pop_gen(struct parser_params *p, int line, const char *name,
19212 struct vtable *tbl, int n)
19213{
19214 if (p->debug) {
19215 rb_parser_printf(p, "vtable_pop:%d: %s(%p), %d\n",
19216 line, name, (void *)tbl, n);
19217 }
19218 if (tbl->pos < n) {
19219 rb_parser_fatal(p, "vtable_pop: unreachable (%d < %d)", tbl->pos, n);
19220 return;
19221 }
19222 tbl->pos -= n;
19223}
19224#define vtable_pop(tbl, n) vtable_pop_gen(p, __LINE__, #tbl, tbl, n)
19225
19226static int
19227vtable_included(const struct vtable * tbl, ID id)
19228{
19229 int i;
19230
19231 if (!DVARS_TERMINAL_P(tbl)) {
19232 for (i = 0; i < tbl->pos; i++) {
19233 if (tbl->tbl[i] == id) {
19234 return i+1;
19235 }
19236 }
19237 }
19238 return 0;
19239}
19240
19241static void parser_prepare(struct parser_params *p);
19242
19243static int
19244e_option_supplied(struct parser_params *p)
19245{
19246 return strcmp(p->ruby_sourcefile, "-e") == 0;
19247}
19248
19249#ifndef RIPPER
19250static NODE *parser_append_options(struct parser_params *p, NODE *node);
19251
19252static VALUE
19253yycompile0(VALUE arg)
19254{
19255 int n;
19256 NODE *tree;
19257 struct parser_params *p = (struct parser_params *)arg;
19258 int cov = FALSE;
19259
19260 if (!compile_for_eval && !NIL_P(p->ruby_sourcefile_string) && !e_option_supplied(p)) {
19261 cov = TRUE;
19262 }
19263
19264 if (p->debug_lines) {
19265 p->ast->body.script_lines = p->debug_lines;
19266 }
19267
19268 parser_prepare(p);
19269#define RUBY_DTRACE_PARSE_HOOK(name) \
19270 if (RUBY_DTRACE_PARSE_##name##_ENABLED()) { \
19271 RUBY_DTRACE_PARSE_##name(p->ruby_sourcefile, p->ruby_sourceline); \
19272 }
19273 RUBY_DTRACE_PARSE_HOOK(BEGIN);
19274 n = yyparse(p);
19275 RUBY_DTRACE_PARSE_HOOK(END);
19276
19277 p->debug_lines = 0;
19278
19279 xfree(p->lex.strterm);
19280 p->lex.strterm = 0;
19281 p->lex.pcur = p->lex.pbeg = p->lex.pend = 0;
19282 if (n || p->error_p) {
19283 VALUE mesg = p->error_buffer;
19284 if (!mesg) {
19285 mesg = syntax_error_new();
19286 }
19287 if (!p->error_tolerant) {
19288 rb_set_errinfo(mesg);
19289 return FALSE;
19290 }
19291 }
19292 tree = p->eval_tree;
19293 if (!tree) {
19294 tree = NEW_NIL(&NULL_LOC);
19295 }
19296 else {
19297 rb_parser_ary_t *tokens = p->tokens;
19298 NODE *prelude;
19299 NODE *body = parser_append_options(p, RNODE_SCOPE(tree)->nd_body);
19300 prelude = block_append(p, p->eval_tree_begin, body);
19301 RNODE_SCOPE(tree)->nd_body = prelude;
19302 p->ast->body.frozen_string_literal = p->frozen_string_literal;
19303 p->ast->body.coverage_enabled = cov;
19304 if (p->keep_tokens) {
19305 p->ast->node_buffer->tokens = tokens;
19306 p->tokens = NULL;
19307 }
19308 }
19309 p->ast->body.root = tree;
19310 p->ast->body.line_count = p->line_count;
19311 return TRUE;
19312}
19313
19314static rb_ast_t *
19315yycompile(struct parser_params *p, VALUE fname, int line)
19316{
19317 rb_ast_t *ast;
19318 if (NIL_P(fname)) {
19319 p->ruby_sourcefile_string = Qnil;
19320 p->ruby_sourcefile = "(none)";
19321 }
19322 else {
19323 p->ruby_sourcefile_string = rb_str_to_interned_str(fname);
19324 p->ruby_sourcefile = StringValueCStr(fname);
19325 }
19326 p->ruby_sourceline = line - 1;
19327
19328 p->lvtbl = NULL;
19329
19330 p->ast = ast = rb_ast_new();
19331 compile_callback(yycompile0, (VALUE)p);
19332 ast->body.source_hash = rb_source_hash_finalize(&p->source_hash);
19333 ast->body.has_source_hash = 1;
19334 p->ast = 0;
19335
19336 while (p->lvtbl) {
19337 local_pop(p);
19338 }
19339
19340 return ast;
19341}
19342#endif /* !RIPPER */
19343
19344static rb_encoding *
19345must_be_ascii_compatible(struct parser_params *p, rb_parser_string_t *s)
19346{
19347 rb_encoding *enc = rb_parser_str_get_encoding(s);
19348 if (!rb_enc_asciicompat(enc)) {
19349 rb_raise(rb_eArgError, "invalid source encoding");
19350 }
19351 return enc;
19352}
19353
19354static rb_parser_string_t *
19355lex_getline(struct parser_params *p)
19356{
19357 rb_parser_string_t *line = (*p->lex.gets)(p, p->lex.input, p->line_count);
19358 if (!line) return 0;
19359 p->line_count++;
19360 rb_source_hash_update(&p->source_hash, (const uint8_t *)line->ptr, (size_t)line->len);
19361 string_buffer_append(p, line);
19362 must_be_ascii_compatible(p, line);
19363 return line;
19364}
19365
19366#ifndef RIPPER
19367rb_ast_t*
19368rb_parser_compile(rb_parser_t *p, rb_parser_lex_gets_func *gets, VALUE fname, rb_parser_input_data input, int line)
19369{
19370 p->lex.gets = gets;
19371 p->lex.input = input;
19372 p->lex.pbeg = p->lex.pcur = p->lex.pend = 0;
19373
19374 return yycompile(p, fname, line);
19375}
19376#endif /* !RIPPER */
19377
19378#define STR_FUNC_ESCAPE 0x01
19379#define STR_FUNC_EXPAND 0x02
19380#define STR_FUNC_REGEXP 0x04
19381#define STR_FUNC_QWORDS 0x08
19382#define STR_FUNC_SYMBOL 0x10
19383#define STR_FUNC_INDENT 0x20
19384#define STR_FUNC_LABEL 0x40
19385#define STR_FUNC_LIST 0x4000
19386#define STR_FUNC_TERM 0x8000
19387
19388enum string_type {
19389 str_label = STR_FUNC_LABEL,
19390 str_squote = (0),
19391 str_dquote = (STR_FUNC_EXPAND),
19392 str_xquote = (STR_FUNC_EXPAND),
19393 str_regexp = (STR_FUNC_REGEXP|STR_FUNC_ESCAPE|STR_FUNC_EXPAND),
19394 str_sword = (STR_FUNC_QWORDS|STR_FUNC_LIST),
19395 str_dword = (STR_FUNC_QWORDS|STR_FUNC_EXPAND|STR_FUNC_LIST),
19396 str_ssym = (STR_FUNC_SYMBOL),
19397 str_dsym = (STR_FUNC_SYMBOL|STR_FUNC_EXPAND)
19398};
19399
19400static rb_parser_string_t *
19401parser_str_new(struct parser_params *p, const char *ptr, long len, rb_encoding *enc, int func, rb_encoding *enc0)
19402{
19403 rb_parser_string_t *pstr;
19404
19405 pstr = rb_parser_encoding_string_new(p, ptr, len, enc);
19406
19407 if (!(func & STR_FUNC_REGEXP)) {
19408 if (rb_parser_is_ascii_string(p, pstr)) {
19409 }
19410 else if (rb_is_usascii_enc((void *)enc0) && enc != rb_utf8_encoding()) {
19411 /* everything is valid in ASCII-8BIT */
19412 enc = rb_ascii8bit_encoding();
19413 PARSER_ENCODING_CODERANGE_SET(pstr, enc, RB_PARSER_ENC_CODERANGE_VALID);
19414 }
19415 }
19416
19417 return pstr;
19418}
19419
19420static int
19421strterm_is_heredoc(rb_strterm_t *strterm)
19422{
19423 return strterm->heredoc;
19424}
19425
19426static rb_strterm_t *
19427new_strterm(struct parser_params *p, int func, int term, int paren)
19428{
19429 rb_strterm_t *strterm = ZALLOC(rb_strterm_t);
19430 strterm->u.literal.func = func;
19431 strterm->u.literal.term = term;
19432 strterm->u.literal.paren = paren;
19433 return strterm;
19434}
19435
19436static rb_strterm_t *
19437new_heredoc(struct parser_params *p)
19438{
19439 rb_strterm_t *strterm = ZALLOC(rb_strterm_t);
19440 strterm->heredoc = true;
19441 return strterm;
19442}
19443
19444#define peek(p,c) peek_n(p, (c), 0)
19445#define peek_n(p,c,n) (!lex_eol_n_p(p, n) && (c) == (unsigned char)(p)->lex.pcur[n])
19446#define peekc(p) peekc_n(p, 0)
19447#define peekc_n(p,n) (lex_eol_n_p(p, n) ? -1 : (unsigned char)(p)->lex.pcur[n])
19448
19449#define add_delayed_token(p, tok, end) parser_add_delayed_token(p, tok, end, __LINE__)
19450static void
19451parser_add_delayed_token(struct parser_params *p, const char *tok, const char *end, int line)
19452{
19453 debug_token_line(p, "add_delayed_token", line);
19454
19455 if (tok < end) {
19456 if (has_delayed_token(p)) {
19457 bool next_line = parser_string_char_at_end(p, p->delayed.token, 0) == '\n';
19458 int end_line = (next_line ? 1 : 0) + p->delayed.end_line;
19459 int end_col = (next_line ? 0 : p->delayed.end_col);
19460 if (end_line != p->ruby_sourceline || end_col != tok - p->lex.pbeg) {
19461 dispatch_delayed_token(p, tSTRING_CONTENT);
19462 }
19463 }
19464 if (!has_delayed_token(p)) {
19465 p->delayed.token = rb_parser_string_new(p, 0, 0);
19466 rb_parser_enc_associate(p, p->delayed.token, p->enc);
19467 p->delayed.beg_line = p->ruby_sourceline;
19468 p->delayed.beg_col = rb_long2int(tok - p->lex.pbeg);
19469 }
19470 parser_str_cat(p->delayed.token, tok, end - tok);
19471 p->delayed.end_line = p->ruby_sourceline;
19472 p->delayed.end_col = rb_long2int(end - p->lex.pbeg);
19473 p->lex.ptok = end;
19474 }
19475}
19476
19477static void
19478set_lastline(struct parser_params *p, rb_parser_string_t *str)
19479{
19480 p->lex.pbeg = p->lex.pcur = PARSER_STRING_PTR(str);
19481 p->lex.pend = p->lex.pcur + PARSER_STRING_LEN(str);
19482 p->lex.lastline = str;
19483}
19484
19485static int
19486nextline(struct parser_params *p, int set_encoding)
19487{
19488 rb_parser_string_t *str = p->lex.nextline;
19489 p->lex.nextline = 0;
19490 if (!str) {
19491 if (p->eofp)
19492 return -1;
19493
19494 if (!lex_eol_ptr_p(p, p->lex.pbeg) && *(p->lex.pend-1) != '\n') {
19495 goto end_of_input;
19496 }
19497
19498 if (!p->lex.input || !(str = lex_getline(p))) {
19499 end_of_input:
19500 p->eofp = 1;
19501 lex_goto_eol(p);
19502 return -1;
19503 }
19504#ifndef RIPPER
19505 if (p->debug_lines) {
19506 if (set_encoding) rb_parser_enc_associate(p, str, p->enc);
19507 rb_parser_string_t *copy = rb_parser_string_deep_copy(p, str);
19508 rb_parser_ary_push_script_line(p, p->debug_lines, copy);
19509 }
19510#endif
19511 p->cr_seen = FALSE;
19512 }
19513 else if (str == AFTER_HEREDOC_WITHOUT_TERMINATOR) {
19514 /* after here-document without terminator */
19515 goto end_of_input;
19516 }
19517 add_delayed_token(p, p->lex.ptok, p->lex.pend);
19518 if (p->heredoc_end > 0) {
19519 p->ruby_sourceline = p->heredoc_end;
19520 p->heredoc_end = 0;
19521 }
19522 p->ruby_sourceline++;
19523 set_lastline(p, str);
19524 token_flush(p);
19525 return 0;
19526}
19527
19528static int
19529parser_cr(struct parser_params *p, int c)
19530{
19531 if (peek(p, '\n')) {
19532 p->lex.pcur++;
19533 c = '\n';
19534 }
19535 return c;
19536}
19537
19538static inline int
19539nextc0(struct parser_params *p, int set_encoding)
19540{
19541 int c;
19542
19543 if (UNLIKELY(lex_eol_p(p) || p->eofp || p->lex.nextline > AFTER_HEREDOC_WITHOUT_TERMINATOR)) {
19544 if (nextline(p, set_encoding)) return -1;
19545 }
19546 c = (unsigned char)*p->lex.pcur++;
19547 if (UNLIKELY(c == '\r')) {
19548 c = parser_cr(p, c);
19549 }
19550
19551 return c;
19552}
19553#define nextc(p) nextc0(p, TRUE)
19554
19555static void
19556pushback(struct parser_params *p, int c)
19557{
19558 if (c == -1) return;
19559 p->eofp = 0;
19560 p->lex.pcur--;
19561 if (p->lex.pcur > p->lex.pbeg && p->lex.pcur[0] == '\n' && p->lex.pcur[-1] == '\r') {
19562 p->lex.pcur--;
19563 }
19564}
19565
19566#define was_bol(p) ((p)->lex.pcur == (p)->lex.pbeg + 1)
19567
19568#define tokfix(p) ((p)->tokenbuf[(p)->tokidx]='\0')
19569#define tok(p) (p)->tokenbuf
19570#define toklen(p) (p)->tokidx
19571
19572static int
19573looking_at_eol_p(struct parser_params *p)
19574{
19575 const char *ptr = p->lex.pcur;
19576 while (!lex_eol_ptr_p(p, ptr)) {
19577 int c = (unsigned char)*ptr++;
19578 int eol = (c == '\n' || c == '#');
19579 if (eol || !ISSPACE(c)) {
19580 return eol;
19581 }
19582 }
19583 return TRUE;
19584}
19585
19586static char*
19587newtok(struct parser_params *p)
19588{
19589 p->tokidx = 0;
19590 if (!p->tokenbuf) {
19591 p->toksiz = 60;
19592 p->tokenbuf = ALLOC_N(char, 60);
19593 }
19594 if (p->toksiz > 4096) {
19595 p->toksiz = 60;
19596 REALLOC_N(p->tokenbuf, char, 60);
19597 }
19598 return p->tokenbuf;
19599}
19600
19601static char *
19602tokspace(struct parser_params *p, int n)
19603{
19604 p->tokidx += n;
19605
19606 if (p->tokidx >= p->toksiz) {
19607 do {p->toksiz *= 2;} while (p->toksiz <= p->tokidx);
19608 REALLOC_N(p->tokenbuf, char, p->toksiz);
19609 }
19610 return &p->tokenbuf[p->tokidx-n];
19611}
19612
19613static void
19614tokadd(struct parser_params *p, int c)
19615{
19616 p->tokenbuf[p->tokidx++] = (char)c;
19617 if (p->tokidx >= p->toksiz) {
19618 p->toksiz *= 2;
19619 REALLOC_N(p->tokenbuf, char, p->toksiz);
19620 }
19621}
19622
19623static int
19624tok_hex(struct parser_params *p, size_t *numlen)
19625{
19626 int c;
19627
19628 c = (int)ruby_scan_hex(p->lex.pcur, 2, numlen);
19629 if (!*numlen) {
19630 flush_string_content(p, p->enc, rb_strlen_lit("\\x"));
19631 yyerror0("invalid hex escape");
19632 dispatch_scan_event(p, tSTRING_CONTENT);
19633 return 0;
19634 }
19635 p->lex.pcur += *numlen;
19636 return c;
19637}
19638
19639#define tokcopy(p, n) memcpy(tokspace(p, n), (p)->lex.pcur - (n), (n))
19640
19641static int
19642escaped_control_code(int c)
19643{
19644 int c2 = 0;
19645 switch (c) {
19646 case ' ':
19647 c2 = 's';
19648 break;
19649 case '\n':
19650 c2 = 'n';
19651 break;
19652 case '\t':
19653 c2 = 't';
19654 break;
19655 case '\v':
19656 c2 = 'v';
19657 break;
19658 case '\r':
19659 c2 = 'r';
19660 break;
19661 case '\f':
19662 c2 = 'f';
19663 break;
19664 }
19665 return c2;
19666}
19667
19668#define WARN_SPACE_CHAR(c, prefix) \
19669 rb_warn1("invalid character syntax; use "prefix"\\%c", WARN_I(c))
19670
19671static int
19672tokadd_codepoint(struct parser_params *p, rb_encoding **encp,
19673 int regexp_literal, const char *begin)
19674{
19675 const int wide = !begin;
19676 size_t numlen;
19677 int codepoint = (int)ruby_scan_hex(p->lex.pcur, wide ? p->lex.pend - p->lex.pcur : 4, &numlen);
19678
19679 p->lex.pcur += numlen;
19680 if (p->lex.strterm == NULL ||
19681 strterm_is_heredoc(p->lex.strterm) ||
19682 (p->lex.strterm->u.literal.func != str_regexp)) {
19683 if (!begin) begin = p->lex.pcur;
19684 if (wide ? (numlen == 0 || numlen > 6) : (numlen < 4)) {
19685 flush_string_content(p, rb_utf8_encoding(), p->lex.pcur - begin);
19686 yyerror0("invalid Unicode escape");
19687 dispatch_scan_event(p, tSTRING_CONTENT);
19688 return wide && numlen > 0;
19689 }
19690 if (codepoint > 0x10ffff) {
19691 flush_string_content(p, rb_utf8_encoding(), p->lex.pcur - begin);
19692 yyerror0("invalid Unicode codepoint (too large)");
19693 dispatch_scan_event(p, tSTRING_CONTENT);
19694 return wide;
19695 }
19696 if ((codepoint & 0xfffff800) == 0xd800) {
19697 flush_string_content(p, rb_utf8_encoding(), p->lex.pcur - begin);
19698 yyerror0("invalid Unicode codepoint");
19699 dispatch_scan_event(p, tSTRING_CONTENT);
19700 return wide;
19701 }
19702 }
19703 if (regexp_literal) {
19704 tokcopy(p, (int)numlen);
19705 }
19706 else if (codepoint >= 0x80) {
19707 rb_encoding *utf8 = rb_utf8_encoding();
19708 if (*encp && utf8 != *encp) {
19709 YYLTYPE loc = RUBY_INIT_YYLLOC();
19710 compile_error(p, "UTF-8 mixed within %s source", rb_enc_name(*encp));
19711 parser_show_error_line(p, &loc);
19712 return wide;
19713 }
19714 *encp = utf8;
19715 tokaddmbc(p, codepoint, *encp);
19716 }
19717 else {
19718 tokadd(p, codepoint);
19719 }
19720 return TRUE;
19721}
19722
19723static int tokadd_mbchar(struct parser_params *p, int c);
19724
19725static int
19726tokskip_mbchar(struct parser_params *p)
19727{
19728 int len = parser_precise_mbclen(p, p->lex.pcur-1);
19729 if (len > 0) {
19730 p->lex.pcur += len - 1;
19731 }
19732 return len;
19733}
19734
19735/* return value is for ?\u3042 */
19736static void
19737tokadd_utf8(struct parser_params *p, rb_encoding **encp,
19738 int term, int symbol_literal, int regexp_literal)
19739{
19740 /*
19741 * If `term` is not -1, then we allow multiple codepoints in \u{}
19742 * upto `term` byte, otherwise we're parsing a character literal.
19743 * And then add the codepoints to the current token.
19744 */
19745 static const char multiple_codepoints[] = "Multiple codepoints at single character literal";
19746
19747 const int open_brace = '{', close_brace = '}';
19748
19749 if (regexp_literal) { tokadd(p, '\\'); tokadd(p, 'u'); }
19750
19751 if (peek(p, open_brace)) { /* handle \u{...} form */
19752 if (regexp_literal && p->lex.strterm->u.literal.func == str_regexp) {
19753 /*
19754 * Skip parsing validation code and copy bytes as-is until term or
19755 * closing brace, in order to correctly handle extended regexps where
19756 * invalid unicode escapes are allowed in comments. The regexp parser
19757 * does its own validation and will catch any issues.
19758 */
19759 tokadd(p, open_brace);
19760 while (!lex_eol_ptr_p(p, ++p->lex.pcur)) {
19761 int c = peekc(p);
19762 if (c == close_brace) {
19763 tokadd(p, c);
19764 ++p->lex.pcur;
19765 break;
19766 }
19767 else if (c == term) {
19768 break;
19769 }
19770 if (c == '\\' && !lex_eol_n_p(p, 1)) {
19771 tokadd(p, c);
19772 c = *++p->lex.pcur;
19773 }
19774 tokadd_mbchar(p, c);
19775 }
19776 }
19777 else {
19778 const char *second = NULL;
19779 int c, last = nextc(p);
19780 if (lex_eol_p(p)) goto unterminated;
19781 while (ISSPACE(c = peekc(p)) && !lex_eol_ptr_p(p, ++p->lex.pcur));
19782 while (c != close_brace) {
19783 if (c == term) goto unterminated;
19784 if (second == multiple_codepoints)
19785 second = p->lex.pcur;
19786 if (regexp_literal) tokadd(p, last);
19787 if (!tokadd_codepoint(p, encp, regexp_literal, NULL)) {
19788 break;
19789 }
19790 while (ISSPACE(c = peekc(p))) {
19791 if (lex_eol_ptr_p(p, ++p->lex.pcur)) goto unterminated;
19792 last = c;
19793 }
19794 if (term == -1 && !second)
19795 second = multiple_codepoints;
19796 }
19797
19798 if (c != close_brace) {
19799 unterminated:
19800 flush_string_content(p, rb_utf8_encoding(), 0);
19801 yyerror0("unterminated Unicode escape");
19802 dispatch_scan_event(p, tSTRING_CONTENT);
19803 return;
19804 }
19805 if (second && second != multiple_codepoints) {
19806 const char *pcur = p->lex.pcur;
19807 p->lex.pcur = second;
19808 dispatch_scan_event(p, tSTRING_CONTENT);
19809 token_flush(p);
19810 p->lex.pcur = pcur;
19811 yyerror0(multiple_codepoints);
19812 token_flush(p);
19813 }
19814
19815 if (regexp_literal) tokadd(p, close_brace);
19816 nextc(p);
19817 }
19818 }
19819 else { /* handle \uxxxx form */
19820 if (!tokadd_codepoint(p, encp, regexp_literal, p->lex.pcur - rb_strlen_lit("\\u"))) {
19821 token_flush(p);
19822 return;
19823 }
19824 }
19825}
19826
19827#define ESCAPE_CONTROL 1
19828#define ESCAPE_META 2
19829
19830static int
19831read_escape(struct parser_params *p, int flags, const char *begin)
19832{
19833 int c;
19834 size_t numlen;
19835
19836 switch (c = nextc(p)) {
19837 case '\\': /* Backslash */
19838 return c;
19839
19840 case 'n': /* newline */
19841 return '\n';
19842
19843 case 't': /* horizontal tab */
19844 return '\t';
19845
19846 case 'r': /* carriage-return */
19847 return '\r';
19848
19849 case 'f': /* form-feed */
19850 return '\f';
19851
19852 case 'v': /* vertical tab */
19853 return '\13';
19854
19855 case 'a': /* alarm(bell) */
19856 return '\007';
19857
19858 case 'e': /* escape */
19859 return 033;
19860
19861 case '0': case '1': case '2': case '3': /* octal constant */
19862 case '4': case '5': case '6': case '7':
19863 pushback(p, c);
19864 c = (int)ruby_scan_oct(p->lex.pcur, 3, &numlen);
19865 p->lex.pcur += numlen;
19866 return c;
19867
19868 case 'x': /* hex constant */
19869 c = tok_hex(p, &numlen);
19870 if (numlen == 0) return 0;
19871 return c;
19872
19873 case 'b': /* backspace */
19874 return '\010';
19875
19876 case 's': /* space */
19877 return ' ';
19878
19879 case 'M':
19880 if (flags & ESCAPE_META) goto eof;
19881 if ((c = nextc(p)) != '-') {
19882 goto eof;
19883 }
19884 if ((c = nextc(p)) == '\\') {
19885 switch (peekc(p)) {
19886 case 'u': case 'U':
19887 nextc(p);
19888 goto eof;
19889 }
19890 return read_escape(p, flags|ESCAPE_META, begin) | 0x80;
19891 }
19892 else if (c == -1) goto eof;
19893 else if (!ISASCII(c)) {
19894 tokskip_mbchar(p);
19895 goto eof;
19896 }
19897 else {
19898 int c2 = escaped_control_code(c);
19899 if (c2) {
19900 if (ISCNTRL(c) || !(flags & ESCAPE_CONTROL)) {
19901 WARN_SPACE_CHAR(c2, "\\M-");
19902 }
19903 else {
19904 WARN_SPACE_CHAR(c2, "\\C-\\M-");
19905 }
19906 }
19907 else if (ISCNTRL(c)) goto eof;
19908 return ((c & 0xff) | 0x80);
19909 }
19910
19911 case 'C':
19912 if ((c = nextc(p)) != '-') {
19913 goto eof;
19914 }
19915 case 'c':
19916 if (flags & ESCAPE_CONTROL) goto eof;
19917 if ((c = nextc(p))== '\\') {
19918 switch (peekc(p)) {
19919 case 'u': case 'U':
19920 nextc(p);
19921 goto eof;
19922 }
19923 c = read_escape(p, flags|ESCAPE_CONTROL, begin);
19924 }
19925 else if (c == '?')
19926 return 0177;
19927 else if (c == -1) goto eof;
19928 else if (!ISASCII(c)) {
19929 tokskip_mbchar(p);
19930 goto eof;
19931 }
19932 else {
19933 int c2 = escaped_control_code(c);
19934 if (c2) {
19935 if (ISCNTRL(c)) {
19936 if (flags & ESCAPE_META) {
19937 WARN_SPACE_CHAR(c2, "\\M-");
19938 }
19939 else {
19940 WARN_SPACE_CHAR(c2, "");
19941 }
19942 }
19943 else {
19944 if (flags & ESCAPE_META) {
19945 WARN_SPACE_CHAR(c2, "\\M-\\C-");
19946 }
19947 else {
19948 WARN_SPACE_CHAR(c2, "\\C-");
19949 }
19950 }
19951 }
19952 else if (ISCNTRL(c)) goto eof;
19953 }
19954 return c & 0x9f;
19955
19956 eof:
19957 case -1:
19958 flush_string_content(p, p->enc, p->lex.pcur - begin);
19959 yyerror0("Invalid escape character syntax");
19960 dispatch_scan_event(p, tSTRING_CONTENT);
19961 return '\0';
19962
19963 default:
19964 if (!ISASCII(c)) {
19965 tokskip_mbchar(p);
19966 goto eof;
19967 }
19968 return c;
19969 }
19970}
19971
19972static void
19973tokaddmbc(struct parser_params *p, int c, rb_encoding *enc)
19974{
19975 int len = rb_enc_codelen(c, enc);
19976 rb_enc_mbcput(c, tokspace(p, len), enc);
19977}
19978
19979static int
19980tokadd_escape(struct parser_params *p)
19981{
19982 int c;
19983 size_t numlen;
19984 const char *begin = p->lex.pcur;
19985
19986 switch (c = nextc(p)) {
19987 case '\n':
19988 return 0; /* just ignore */
19989
19990 case '0': case '1': case '2': case '3': /* octal constant */
19991 case '4': case '5': case '6': case '7':
19992 {
19993 ruby_scan_oct(--p->lex.pcur, 3, &numlen);
19994 if (numlen == 0) goto eof;
19995 p->lex.pcur += numlen;
19996 tokcopy(p, (int)numlen + 1);
19997 }
19998 return 0;
19999
20000 case 'x': /* hex constant */
20001 {
20002 tok_hex(p, &numlen);
20003 if (numlen == 0) return -1;
20004 tokcopy(p, (int)numlen + 2);
20005 }
20006 return 0;
20007
20008 eof:
20009 case -1:
20010 flush_string_content(p, p->enc, p->lex.pcur - begin);
20011 yyerror0("Invalid escape character syntax");
20012 token_flush(p);
20013 return -1;
20014
20015 default:
20016 tokadd(p, '\\');
20017 tokadd(p, c);
20018 }
20019 return 0;
20020}
20021
20022static int
20023char_to_option(int c)
20024{
20025 int val;
20026
20027 switch (c) {
20028 case 'i':
20029 val = RE_ONIG_OPTION_IGNORECASE;
20030 break;
20031 case 'x':
20032 val = RE_ONIG_OPTION_EXTEND;
20033 break;
20034 case 'm':
20035 val = RE_ONIG_OPTION_MULTILINE;
20036 break;
20037 default:
20038 val = 0;
20039 break;
20040 }
20041 return val;
20042}
20043
20044#define ARG_ENCODING_FIXED 16
20045#define ARG_ENCODING_NONE 32
20046#define ENC_ASCII8BIT 1
20047#define ENC_EUC_JP 2
20048#define ENC_Windows_31J 3
20049#define ENC_UTF8 4
20050
20051static int
20052char_to_option_kcode(int c, int *option, int *kcode)
20053{
20054 *option = 0;
20055
20056 switch (c) {
20057 case 'n':
20058 *kcode = ENC_ASCII8BIT;
20059 return (*option = ARG_ENCODING_NONE);
20060 case 'e':
20061 *kcode = ENC_EUC_JP;
20062 break;
20063 case 's':
20064 *kcode = ENC_Windows_31J;
20065 break;
20066 case 'u':
20067 *kcode = ENC_UTF8;
20068 break;
20069 default:
20070 *kcode = -1;
20071 return (*option = char_to_option(c));
20072 }
20073 *option = ARG_ENCODING_FIXED;
20074 return 1;
20075}
20076
20077static int
20078regx_options(struct parser_params *p)
20079{
20080 int kcode = 0;
20081 int kopt = 0;
20082 int options = 0;
20083 int c, opt, kc;
20084
20085 newtok(p);
20086 while (c = nextc(p), ISALPHA(c)) {
20087 if (c == 'o') {
20088 options |= RE_OPTION_ONCE;
20089 }
20090 else if (char_to_option_kcode(c, &opt, &kc)) {
20091 if (kc >= 0) {
20092 if (kc != ENC_ASCII8BIT) kcode = c;
20093 kopt = opt;
20094 }
20095 else {
20096 options |= opt;
20097 }
20098 }
20099 else {
20100 tokadd(p, c);
20101 }
20102 }
20103 options |= kopt;
20104 pushback(p, c);
20105 if (toklen(p)) {
20106 YYLTYPE loc = RUBY_INIT_YYLLOC();
20107 tokfix(p);
20108 compile_error(p, "unknown regexp option%s - %*s",
20109 toklen(p) > 1 ? "s" : "", toklen(p), tok(p));
20110 parser_show_error_line(p, &loc);
20111 }
20112 return options | RE_OPTION_ENCODING(kcode);
20113}
20114
20115static int
20116tokadd_mbchar(struct parser_params *p, int c)
20117{
20118 int len = parser_precise_mbclen(p, p->lex.pcur-1);
20119 if (len < 0) return -1;
20120 tokadd(p, c);
20121 p->lex.pcur += --len;
20122 if (len > 0) tokcopy(p, len);
20123 return c;
20124}
20125
20126static inline int
20127simple_re_meta(int c)
20128{
20129 switch (c) {
20130 case '$': case '*': case '+': case '.':
20131 case '?': case '^': case '|':
20132 case ')': case ']': case '}': case '>':
20133 return TRUE;
20134 default:
20135 return FALSE;
20136 }
20137}
20138
20139static int
20140parser_update_heredoc_indent(struct parser_params *p, int c)
20141{
20142 if (p->heredoc_line_indent == -1) {
20143 if (c == '\n') p->heredoc_line_indent = 0;
20144 }
20145 else {
20146 if (c == ' ') {
20147 p->heredoc_line_indent++;
20148 return TRUE;
20149 }
20150 else if (c == '\t') {
20151 int w = (p->heredoc_line_indent / TAB_WIDTH) + 1;
20152 p->heredoc_line_indent = w * TAB_WIDTH;
20153 return TRUE;
20154 }
20155 else if (c != '\n') {
20156 if (p->heredoc_indent > p->heredoc_line_indent) {
20157 p->heredoc_indent = p->heredoc_line_indent;
20158 }
20159 p->heredoc_line_indent = -1;
20160 }
20161 else {
20162 /* Whitespace only line has no indentation */
20163 p->heredoc_line_indent = 0;
20164 }
20165 }
20166 return FALSE;
20167}
20168
20169static void
20170parser_mixed_error(struct parser_params *p, rb_encoding *enc1, rb_encoding *enc2)
20171{
20172 YYLTYPE loc = RUBY_INIT_YYLLOC();
20173 const char *n1 = rb_enc_name(enc1), *n2 = rb_enc_name(enc2);
20174 compile_error(p, "%s mixed within %s source", n1, n2);
20175 parser_show_error_line(p, &loc);
20176}
20177
20178static void
20179parser_mixed_escape(struct parser_params *p, const char *beg, rb_encoding *enc1, rb_encoding *enc2)
20180{
20181 const char *pos = p->lex.pcur;
20182 p->lex.pcur = beg;
20183 parser_mixed_error(p, enc1, enc2);
20184 p->lex.pcur = pos;
20185}
20186
20187static inline char
20188nibble_char_upper(unsigned int c)
20189{
20190 c &= 0xf;
20191 return c + (c < 10 ? '0' : 'A' - 10);
20192}
20193
20194static int
20195tokadd_string(struct parser_params *p,
20196 int func, int term, int paren, long *nest,
20197 rb_encoding **encp, rb_encoding **enc)
20198{
20199 int c;
20200 bool erred = false;
20201#ifdef RIPPER
20202 const int heredoc_end = (p->heredoc_end ? p->heredoc_end + 1 : 0);
20203 int top_of_line = FALSE;
20204#endif
20205
20206#define mixed_error(enc1, enc2) \
20207 (void)(erred || (parser_mixed_error(p, enc1, enc2), erred = true))
20208#define mixed_escape(beg, enc1, enc2) \
20209 (void)(erred || (parser_mixed_escape(p, beg, enc1, enc2), erred = true))
20210
20211 while ((c = nextc(p)) != -1) {
20212 if (p->heredoc_indent > 0) {
20213 parser_update_heredoc_indent(p, c);
20214 }
20215#ifdef RIPPER
20216 if (top_of_line && heredoc_end == p->ruby_sourceline) {
20217 pushback(p, c);
20218 break;
20219 }
20220#endif
20221
20222 if (paren && c == paren) {
20223 ++*nest;
20224 }
20225 else if (c == term) {
20226 if (!nest || !*nest) {
20227 pushback(p, c);
20228 break;
20229 }
20230 --*nest;
20231 }
20232 else if ((func & STR_FUNC_EXPAND) && c == '#' && !lex_eol_p(p)) {
20233 unsigned char c2 = *p->lex.pcur;
20234 if (c2 == '$' || c2 == '@' || c2 == '{') {
20235 pushback(p, c);
20236 break;
20237 }
20238 }
20239 else if (c == '\\') {
20240 c = nextc(p);
20241 switch (c) {
20242 case '\n':
20243 if (func & STR_FUNC_QWORDS) break;
20244 if (func & STR_FUNC_EXPAND) {
20245 if (!(func & STR_FUNC_INDENT) || (p->heredoc_indent < 0))
20246 continue;
20247 if (c == term) {
20248 c = '\\';
20249 goto terminate;
20250 }
20251 }
20252 tokadd(p, '\\');
20253 break;
20254
20255 case '\\':
20256 if (func & STR_FUNC_ESCAPE) tokadd(p, c);
20257 break;
20258
20259 case 'u':
20260 if ((func & STR_FUNC_EXPAND) == 0) {
20261 tokadd(p, '\\');
20262 break;
20263 }
20264 tokadd_utf8(p, enc, term,
20265 func & STR_FUNC_SYMBOL,
20266 func & STR_FUNC_REGEXP);
20267 continue;
20268
20269 default:
20270 if (c == -1) return -1;
20271 if (!ISASCII(c)) {
20272 if ((func & STR_FUNC_EXPAND) == 0) tokadd(p, '\\');
20273 goto non_ascii;
20274 }
20275 if (func & STR_FUNC_REGEXP) {
20276 switch (c) {
20277 case 'c':
20278 case 'C':
20279 case 'M': {
20280 pushback(p, c);
20281 c = read_escape(p, 0, p->lex.pcur - 1);
20282
20283 char *t = tokspace(p, rb_strlen_lit("\\x00"));
20284 *t++ = '\\';
20285 *t++ = 'x';
20286 *t++ = nibble_char_upper(c >> 4);
20287 *t++ = nibble_char_upper(c);
20288 continue;
20289 }
20290 }
20291
20292 if (c == term && !simple_re_meta(c)) {
20293 tokadd(p, c);
20294 continue;
20295 }
20296 pushback(p, c);
20297 if ((c = tokadd_escape(p)) < 0)
20298 return -1;
20299 if (*enc && *enc != *encp) {
20300 mixed_escape(p->lex.ptok+2, *enc, *encp);
20301 }
20302 continue;
20303 }
20304 else if (func & STR_FUNC_EXPAND) {
20305 pushback(p, c);
20306 if (func & STR_FUNC_ESCAPE) tokadd(p, '\\');
20307 c = read_escape(p, 0, p->lex.pcur - 1);
20308 }
20309 else if ((func & STR_FUNC_QWORDS) && ISSPACE(c)) {
20310 /* ignore backslashed spaces in %w */
20311 }
20312 else if (c != term && !(paren && c == paren)) {
20313 tokadd(p, '\\');
20314 pushback(p, c);
20315 continue;
20316 }
20317 }
20318 }
20319 else if (!parser_isascii(p)) {
20320 non_ascii:
20321 if (!*enc) {
20322 *enc = *encp;
20323 }
20324 else if (*enc != *encp) {
20325 mixed_error(*enc, *encp);
20326 continue;
20327 }
20328 if (tokadd_mbchar(p, c) == -1) return -1;
20329 continue;
20330 }
20331 else if ((func & STR_FUNC_QWORDS) && ISSPACE(c)) {
20332 pushback(p, c);
20333 break;
20334 }
20335 if (c & 0x80) {
20336 if (!*enc) {
20337 *enc = *encp;
20338 }
20339 else if (*enc != *encp) {
20340 mixed_error(*enc, *encp);
20341 continue;
20342 }
20343 }
20344 tokadd(p, c);
20345#ifdef RIPPER
20346 top_of_line = (c == '\n');
20347#endif
20348 }
20349 terminate:
20350 if (*enc) *encp = *enc;
20351 return c;
20352}
20353
20354#define NEW_STRTERM(func, term, paren) new_strterm(p, func, term, paren)
20355
20356static void
20357flush_string_content(struct parser_params *p, rb_encoding *enc, size_t back)
20358{
20359 p->lex.pcur -= back;
20360 if (has_delayed_token(p)) {
20361 ptrdiff_t len = p->lex.pcur - p->lex.ptok;
20362 if (len > 0) {
20363 rb_parser_enc_str_buf_cat(p, p->delayed.token, p->lex.ptok, len, enc);
20364 p->delayed.end_line = p->ruby_sourceline;
20365 p->delayed.end_col = rb_long2int(p->lex.pcur - p->lex.pbeg);
20366 }
20367 dispatch_delayed_token(p, tSTRING_CONTENT);
20368 p->lex.ptok = p->lex.pcur;
20369 }
20370 dispatch_scan_event(p, tSTRING_CONTENT);
20371 p->lex.pcur += back;
20372}
20373
20374/* this can be shared with ripper, since it's independent from struct
20375 * parser_params. */
20376#ifndef RIPPER
20377#define BIT(c, idx) (((c) / 32 - 1 == idx) ? (1U << ((c) % 32)) : 0)
20378#define SPECIAL_PUNCT(idx) ( \
20379 BIT('~', idx) | BIT('*', idx) | BIT('$', idx) | BIT('?', idx) | \
20380 BIT('!', idx) | BIT('@', idx) | BIT('/', idx) | BIT('\\', idx) | \
20381 BIT(';', idx) | BIT(',', idx) | BIT('.', idx) | BIT('=', idx) | \
20382 BIT(':', idx) | BIT('<', idx) | BIT('>', idx) | BIT('\"', idx) | \
20383 BIT('&', idx) | BIT('`', idx) | BIT('\'', idx) | BIT('+', idx) | \
20384 BIT('0', idx))
20385const uint_least32_t ruby_global_name_punct_bits[] = {
20386 SPECIAL_PUNCT(0),
20387 SPECIAL_PUNCT(1),
20388 SPECIAL_PUNCT(2),
20389};
20390#undef BIT
20391#undef SPECIAL_PUNCT
20392#endif
20393
20394static enum yytokentype
20395parser_peek_variable_name(struct parser_params *p)
20396{
20397 int c;
20398 const char *ptr = p->lex.pcur;
20399
20400 if (lex_eol_ptr_n_p(p, ptr, 1)) return 0;
20401 c = *ptr++;
20402 switch (c) {
20403 case '$':
20404 if ((c = *ptr) == '-') {
20405 if (lex_eol_ptr_p(p, ++ptr)) return 0;
20406 c = *ptr;
20407 }
20408 else if (is_global_name_punct(c) || ISDIGIT(c)) {
20409 return tSTRING_DVAR;
20410 }
20411 break;
20412 case '@':
20413 if ((c = *ptr) == '@') {
20414 if (lex_eol_ptr_p(p, ++ptr)) return 0;
20415 c = *ptr;
20416 }
20417 break;
20418 case '{':
20419 p->lex.pcur = ptr;
20420 p->command_start = TRUE;
20421 yylval.state = p->lex.state;
20422 return tSTRING_DBEG;
20423 default:
20424 return 0;
20425 }
20426 if (!ISASCII(c) || c == '_' || ISALPHA(c))
20427 return tSTRING_DVAR;
20428 return 0;
20429}
20430
20431#define IS_ARG() IS_lex_state(EXPR_ARG_ANY)
20432#define IS_END() IS_lex_state(EXPR_END_ANY)
20433#define IS_BEG() (IS_lex_state(EXPR_BEG_ANY) || IS_lex_state_all(EXPR_ARG|EXPR_LABELED))
20434#define IS_SPCARG(c) (IS_ARG() && space_seen && !ISSPACE(c))
20435#define IS_LABEL_POSSIBLE() (\
20436 (IS_lex_state(EXPR_LABEL|EXPR_ENDFN) && !cmd_state) || \
20437 IS_ARG())
20438#define IS_LABEL_SUFFIX(n) (peek_n(p, ':',(n)) && !peek_n(p, ':', (n)+1))
20439#define IS_AFTER_OPERATOR() IS_lex_state(EXPR_FNAME | EXPR_DOT)
20440
20441static inline enum yytokentype
20442parser_string_term(struct parser_params *p, int func)
20443{
20444 xfree(p->lex.strterm);
20445 p->lex.strterm = 0;
20446 if (func & STR_FUNC_REGEXP) {
20447 set_yylval_num(regx_options(p));
20448 dispatch_scan_event(p, tREGEXP_END);
20449 SET_LEX_STATE(EXPR_END);
20450 return tREGEXP_END;
20451 }
20452 if ((func & STR_FUNC_LABEL) && IS_LABEL_SUFFIX(0)) {
20453 nextc(p);
20454 SET_LEX_STATE(EXPR_ARG|EXPR_LABELED);
20455 return tLABEL_END;
20456 }
20457 SET_LEX_STATE(EXPR_END);
20458 return tSTRING_END;
20459}
20460
20461static enum yytokentype
20462parse_string(struct parser_params *p, rb_strterm_literal_t *quote)
20463{
20464 int func = quote->func;
20465 int term = quote->term;
20466 int paren = quote->paren;
20467 int c, space = 0;
20468 rb_encoding *enc = p->enc;
20469 rb_encoding *base_enc = 0;
20470 rb_parser_string_t *lit;
20471
20472 if (func & STR_FUNC_TERM) {
20473 if (func & STR_FUNC_QWORDS) nextc(p); /* delayed term */
20474 SET_LEX_STATE(EXPR_END);
20475 xfree(p->lex.strterm);
20476 p->lex.strterm = 0;
20477 return func & STR_FUNC_REGEXP ? tREGEXP_END : tSTRING_END;
20478 }
20479 c = nextc(p);
20480 if ((func & STR_FUNC_QWORDS) && ISSPACE(c)) {
20481 while (c != '\n' && ISSPACE(c = nextc(p)));
20482 space = 1;
20483 }
20484 if (func & STR_FUNC_LIST) {
20485 quote->func &= ~STR_FUNC_LIST;
20486 space = 1;
20487 }
20488 if (c == term && !quote->nest) {
20489 if (func & STR_FUNC_QWORDS) {
20490 quote->func |= STR_FUNC_TERM;
20491 pushback(p, c); /* dispatch the term at tSTRING_END */
20492 add_delayed_token(p, p->lex.ptok, p->lex.pcur);
20493 return ' ';
20494 }
20495 return parser_string_term(p, func);
20496 }
20497 if (space) {
20498 if (!ISSPACE(c)) pushback(p, c);
20499 add_delayed_token(p, p->lex.ptok, p->lex.pcur);
20500 return ' ';
20501 }
20502 newtok(p);
20503 if ((func & STR_FUNC_EXPAND) && c == '#') {
20504 enum yytokentype t = parser_peek_variable_name(p);
20505 if (t) return t;
20506 tokadd(p, '#');
20507 c = nextc(p);
20508 }
20509 pushback(p, c);
20510 if (tokadd_string(p, func, term, paren, &quote->nest,
20511 &enc, &base_enc) == -1) {
20512 if (p->eofp) {
20513#ifndef RIPPER
20514# define unterminated_literal(mesg) yyerror0(mesg)
20515#else
20516# define unterminated_literal(mesg) compile_error(p, mesg)
20517#endif
20518 literal_flush(p, p->lex.pcur);
20519 if (func & STR_FUNC_QWORDS) {
20520 /* no content to add, bailing out here */
20521 unterminated_literal("unterminated list meets end of file");
20522 xfree(p->lex.strterm);
20523 p->lex.strterm = 0;
20524 return tSTRING_END;
20525 }
20526 if (func & STR_FUNC_REGEXP) {
20527 unterminated_literal("unterminated regexp meets end of file");
20528 }
20529 else {
20530 unterminated_literal("unterminated string meets end of file");
20531 }
20532 quote->func |= STR_FUNC_TERM;
20533 }
20534 }
20535
20536 tokfix(p);
20537 lit = STR_NEW3(tok(p), toklen(p), enc, func);
20538 set_yylval_str(lit);
20539 flush_string_content(p, enc, 0);
20540
20541 return tSTRING_CONTENT;
20542}
20543
20544static enum yytokentype
20545heredoc_identifier(struct parser_params *p)
20546{
20547 /*
20548 * term_len is length of `<<"END"` except `END`,
20549 * in this case term_len is 4 (<, <, " and ").
20550 */
20551 long len, offset = p->lex.pcur - p->lex.pbeg;
20552 int c = nextc(p), term, func = 0, quote = 0;
20553 enum yytokentype token = tSTRING_BEG;
20554 int indent = 0;
20555
20556 if (c == '-') {
20557 c = nextc(p);
20558 func = STR_FUNC_INDENT;
20559 offset++;
20560 }
20561 else if (c == '~') {
20562 c = nextc(p);
20563 func = STR_FUNC_INDENT;
20564 offset++;
20565 indent = INT_MAX;
20566 }
20567 switch (c) {
20568 case '\'':
20569 func |= str_squote; goto quoted;
20570 case '"':
20571 func |= str_dquote; goto quoted;
20572 case '`':
20573 token = tXSTRING_BEG;
20574 func |= str_xquote; goto quoted;
20575
20576 quoted:
20577 quote++;
20578 offset++;
20579 term = c;
20580 len = 0;
20581 while ((c = nextc(p)) != term) {
20582 if (c == -1 || c == '\r' || c == '\n') {
20583 yyerror0("unterminated here document identifier");
20584 return -1;
20585 }
20586 }
20587 break;
20588
20589 default:
20590 if (!parser_is_identchar(p)) {
20591 pushback(p, c);
20592 if (func & STR_FUNC_INDENT) {
20593 pushback(p, indent > 0 ? '~' : '-');
20594 }
20595 return 0;
20596 }
20597 func |= str_dquote;
20598 do {
20599 int n = parser_precise_mbclen(p, p->lex.pcur-1);
20600 if (n < 0) return 0;
20601 p->lex.pcur += --n;
20602 } while ((c = nextc(p)) != -1 && parser_is_identchar(p));
20603 pushback(p, c);
20604 break;
20605 }
20606
20607 len = p->lex.pcur - (p->lex.pbeg + offset) - quote;
20608 if ((unsigned long)len >= HERETERM_LENGTH_MAX)
20609 yyerror0("too long here document identifier");
20610 dispatch_scan_event(p, tHEREDOC_BEG);
20611 lex_goto_eol(p);
20612
20613 p->lex.strterm = new_heredoc(p);
20614 rb_strterm_heredoc_t *here = &p->lex.strterm->u.heredoc;
20615 here->offset = offset;
20616 here->sourceline = p->ruby_sourceline;
20617 here->length = (unsigned)len;
20618 here->quote = quote;
20619 here->func = func;
20620 here->lastline = p->lex.lastline;
20621
20622 token_flush(p);
20623 p->heredoc_indent = indent;
20624 p->heredoc_line_indent = 0;
20625 return token;
20626}
20627
20628static void
20629heredoc_restore(struct parser_params *p, rb_strterm_heredoc_t *here)
20630{
20631 rb_parser_string_t *line;
20632 rb_strterm_t *term = p->lex.strterm;
20633
20634 p->lex.strterm = 0;
20635 line = here->lastline;
20636 p->lex.lastline = line;
20637 p->lex.pbeg = PARSER_STRING_PTR(line);
20638 p->lex.pend = p->lex.pbeg + PARSER_STRING_LEN(line);
20639 p->lex.pcur = p->lex.pbeg + here->offset + here->length + here->quote;
20640 p->lex.ptok = p->lex.pbeg + here->offset - here->quote;
20641 p->heredoc_end = p->ruby_sourceline;
20642 p->ruby_sourceline = (int)here->sourceline;
20643 if (p->eofp) p->lex.nextline = AFTER_HEREDOC_WITHOUT_TERMINATOR;
20644 p->eofp = 0;
20645 xfree(term);
20646}
20647
20648static int
20649dedent_string_column(const char *str, long len, int width)
20650{
20651 int i, col = 0;
20652
20653 for (i = 0; i < len && col < width; i++) {
20654 if (str[i] == ' ') {
20655 col++;
20656 }
20657 else if (str[i] == '\t') {
20658 int n = TAB_WIDTH * (col / TAB_WIDTH + 1);
20659 if (n > width) break;
20660 col = n;
20661 }
20662 else {
20663 break;
20664 }
20665 }
20666
20667 return i;
20668}
20669
20670static int
20671dedent_string(struct parser_params *p, rb_parser_string_t *string, int width)
20672{
20673 char *str;
20674 long len;
20675 int i;
20676
20677 len = PARSER_STRING_LEN(string);
20678 str = PARSER_STRING_PTR(string);
20679
20680 i = dedent_string_column(str, len, width);
20681 if (!i) return 0;
20682
20683 rb_parser_str_modify(string);
20684 str = PARSER_STRING_PTR(string);
20685 if (PARSER_STRING_LEN(string) != len)
20686 rb_fatal("literal string changed: %s", PARSER_STRING_PTR(string));
20687 MEMMOVE(str, str + i, char, len - i);
20688 rb_parser_str_set_len(p, string, len - i);
20689 return i;
20690}
20691
20692static NODE *
20693heredoc_dedent(struct parser_params *p, NODE *root)
20694{
20695 NODE *node, *str_node, *prev_node;
20696 int indent = p->heredoc_indent;
20697 rb_parser_string_t *prev_lit = 0;
20698
20699 if (indent <= 0) return root;
20700 if (!root) return root;
20701
20702 prev_node = node = str_node = root;
20703 if (nd_type_p(root, NODE_LIST)) str_node = RNODE_LIST(root)->nd_head;
20704
20705 while (str_node) {
20706 rb_parser_string_t *lit = RNODE_STR(str_node)->string;
20707 if (nd_fl_newline(str_node)) {
20708 dedent_string(p, lit, indent);
20709 }
20710 if (!prev_lit) {
20711 prev_lit = lit;
20712 }
20713 else if (!literal_concat0(p, prev_lit, lit)) {
20714 return 0;
20715 }
20716 else {
20717 NODE *end = RNODE_LIST(node)->as.nd_end;
20718 node = RNODE_LIST(prev_node)->nd_next = RNODE_LIST(node)->nd_next;
20719 if (!node) {
20720 if (nd_type_p(prev_node, NODE_DSTR))
20721 nd_set_type(prev_node, NODE_STR);
20722 break;
20723 }
20724 RNODE_LIST(node)->as.nd_end = end;
20725 goto next_str;
20726 }
20727
20728 str_node = 0;
20729 while ((nd_type_p(node, NODE_LIST) || nd_type_p(node, NODE_DSTR)) && (node = RNODE_LIST(prev_node = node)->nd_next) != 0) {
20730 next_str:
20731 if (!nd_type_p(node, NODE_LIST)) break;
20732 if ((str_node = RNODE_LIST(node)->nd_head) != 0) {
20733 enum node_type type = nd_type(str_node);
20734 if (type == NODE_STR || type == NODE_DSTR) break;
20735 prev_lit = 0;
20736 str_node = 0;
20737 }
20738 }
20739 }
20740 return root;
20741}
20742
20743static int
20744whole_match_p(struct parser_params *p, const char *eos, long len, int indent)
20745{
20746 const char *beg = p->lex.pbeg;
20747 const char *ptr = p->lex.pend;
20748
20749 if (ptr - beg < len) return FALSE;
20750 if (ptr > beg && ptr[-1] == '\n') {
20751 if (--ptr > beg && ptr[-1] == '\r') --ptr;
20752 if (ptr - beg < len) return FALSE;
20753 }
20754 if (strncmp(eos, ptr -= len, len)) return FALSE;
20755 if (indent) {
20756 while (beg < ptr && ISSPACE(*beg)) beg++;
20757 }
20758 return beg == ptr;
20759}
20760
20761static int
20762word_match_p(struct parser_params *p, const char *word, long len)
20763{
20764 if (strncmp(p->lex.pcur, word, len)) return 0;
20765 if (lex_eol_n_p(p, len)) return 1;
20766 int c = (unsigned char)p->lex.pcur[len];
20767 if (ISSPACE(c)) return 1;
20768 switch (c) {
20769 case '\0': case '\004': case '\032': return 1;
20770 }
20771 return 0;
20772}
20773
20774#define NUM_SUFFIX_R (1<<0)
20775#define NUM_SUFFIX_I (1<<1)
20776#define NUM_SUFFIX_ALL 3
20777
20778static int
20779number_literal_suffix(struct parser_params *p, int mask)
20780{
20781 int c, result = 0;
20782 const char *lastp = p->lex.pcur;
20783
20784 while ((c = nextc(p)) != -1) {
20785 if ((mask & NUM_SUFFIX_I) && c == 'i') {
20786 result |= (mask & NUM_SUFFIX_I);
20787 mask &= ~NUM_SUFFIX_I;
20788 /* r after i, rational of complex is disallowed */
20789 mask &= ~NUM_SUFFIX_R;
20790 continue;
20791 }
20792 if ((mask & NUM_SUFFIX_R) && c == 'r') {
20793 result |= (mask & NUM_SUFFIX_R);
20794 mask &= ~NUM_SUFFIX_R;
20795 continue;
20796 }
20797 if (!ISASCII(c) || ISALPHA(c) || c == '_') {
20798 p->lex.pcur = lastp;
20799 return 0;
20800 }
20801 pushback(p, c);
20802 break;
20803 }
20804 return result;
20805}
20806
20807static enum yytokentype
20808set_number_literal(struct parser_params *p, enum yytokentype type, int suffix, int base, int seen_point)
20809{
20810 enum rb_numeric_type numeric_type = integer_literal;
20811
20812 if (type == tFLOAT) {
20813 numeric_type = float_literal;
20814 }
20815
20816 if (suffix & NUM_SUFFIX_R) {
20817 type = tRATIONAL;
20818 numeric_type = rational_literal;
20819 }
20820 if (suffix & NUM_SUFFIX_I) {
20821 type = tIMAGINARY;
20822 }
20823
20824 switch (type) {
20825 case tINTEGER:
20826 set_yylval_node(NEW_INTEGER(strdup(tok(p)), base, &_cur_loc));
20827 break;
20828 case tFLOAT:
20829 set_yylval_node(NEW_FLOAT(strdup(tok(p)), &_cur_loc));
20830 break;
20831 case tRATIONAL:
20832 set_yylval_node(NEW_RATIONAL(strdup(tok(p)), base, seen_point, &_cur_loc));
20833 break;
20834 case tIMAGINARY:
20835 set_yylval_node(NEW_IMAGINARY(strdup(tok(p)), base, seen_point, numeric_type, &_cur_loc));
20836 (void)numeric_type; /* for ripper */
20837 break;
20838 default:
20839 rb_bug("unexpected token: %d", type);
20840 }
20841 SET_LEX_STATE(EXPR_END);
20842 return type;
20843}
20844
20845#define dispatch_heredoc_end(p) parser_dispatch_heredoc_end(p, __LINE__)
20846static void
20847parser_dispatch_heredoc_end(struct parser_params *p, int line)
20848{
20849 if (has_delayed_token(p))
20850 dispatch_delayed_token(p, tSTRING_CONTENT);
20851
20852#ifdef RIPPER
20853 VALUE str = STR_NEW(p->lex.ptok, p->lex.pend - p->lex.ptok);
20854 ripper_dispatch1(p, ripper_token2eventid(tHEREDOC_END), str);
20855#else
20856 if (p->keep_tokens) {
20857 rb_parser_string_t *str = rb_parser_encoding_string_new(p, p->lex.ptok, p->lex.pend - p->lex.ptok, p->enc);
20858 RUBY_SET_YYLLOC_OF_HEREDOC_END(*p->yylloc);
20859 parser_append_tokens(p, str, tHEREDOC_END, line);
20860 }
20861#endif
20862
20863 RUBY_SET_YYLLOC_FROM_STRTERM_HEREDOC(*p->yylloc);
20864 lex_goto_eol(p);
20865 token_flush(p);
20866}
20867
20868static enum yytokentype
20869here_document(struct parser_params *p, rb_strterm_heredoc_t *here)
20870{
20871 int c, func, indent = 0;
20872 const char *eos, *ptr, *ptr_end;
20873 long len;
20874 rb_parser_string_t *str = 0;
20875 rb_encoding *enc = p->enc;
20876 rb_encoding *base_enc = 0;
20877 int bol;
20878#ifdef RIPPER
20879 VALUE s_value;
20880#endif
20881
20882 eos = PARSER_STRING_PTR(here->lastline) + here->offset;
20883 len = here->length;
20884 indent = (func = here->func) & STR_FUNC_INDENT;
20885
20886 if ((c = nextc(p)) == -1) {
20887 error:
20888#ifdef RIPPER
20889 if (!has_delayed_token(p)) {
20890 dispatch_scan_event(p, tSTRING_CONTENT);
20891 }
20892 else if (p->delayed.end_line + 1 == p->ruby_sourceline) {
20893 if ((len = p->lex.pcur - p->lex.ptok) > 0) {
20894 if (!(func & STR_FUNC_REGEXP)) {
20895 int cr = ENC_CODERANGE_UNKNOWN;
20896 rb_str_coderange_scan_restartable(p->lex.ptok, p->lex.pcur, enc, &cr);
20897 if (cr != ENC_CODERANGE_7BIT &&
20898 rb_is_usascii_enc(p->enc) &&
20899 enc != rb_utf8_encoding()) {
20900 enc = rb_ascii8bit_encoding();
20901 }
20902 }
20903 rb_parser_enc_str_buf_cat(p, p->delayed.token, p->lex.ptok, len, enc);
20904 }
20905 dispatch_delayed_token(p, tSTRING_CONTENT);
20906 }
20907 else {
20908 dispatch_delayed_token(p, tSTRING_CONTENT);
20909 dispatch_scan_event(p, tSTRING_CONTENT);
20910 }
20911 lex_goto_eol(p);
20912#endif
20913 heredoc_restore(p, &p->lex.strterm->u.heredoc);
20914 compile_error(p, "can't find string \"%.*s\" anywhere before EOF",
20915 (int)len, eos);
20916 token_flush(p);
20917 SET_LEX_STATE(EXPR_END);
20918 return tSTRING_END;
20919 }
20920 bol = was_bol(p);
20921 if (!bol) {
20922 /* not beginning of line, cannot be the terminator */
20923 }
20924 else if (p->heredoc_line_indent == -1) {
20925 /* `heredoc_line_indent == -1` means
20926 * - "after an interpolation in the same line", or
20927 * - "in a continuing line"
20928 */
20929 p->heredoc_line_indent = 0;
20930 }
20931 else if (whole_match_p(p, eos, len, indent)) {
20932 dispatch_heredoc_end(p);
20933 restore:
20934 heredoc_restore(p, &p->lex.strterm->u.heredoc);
20935 token_flush(p);
20936 SET_LEX_STATE(EXPR_END);
20937 return tSTRING_END;
20938 }
20939
20940 if (!(func & STR_FUNC_EXPAND)) {
20941 do {
20942 ptr = PARSER_STRING_PTR(p->lex.lastline);
20943 ptr_end = p->lex.pend;
20944 if (ptr_end > ptr) {
20945 switch (ptr_end[-1]) {
20946 case '\n':
20947 if (--ptr_end == ptr || ptr_end[-1] != '\r') {
20948 ptr_end++;
20949 break;
20950 }
20951 case '\r':
20952 --ptr_end;
20953 }
20954 }
20955
20956 if (p->heredoc_indent > 0) {
20957 long i = 0;
20958 while (ptr + i < ptr_end && parser_update_heredoc_indent(p, ptr[i]))
20959 i++;
20960 p->heredoc_line_indent = 0;
20961 }
20962
20963 if (str)
20964 parser_str_cat(str, ptr, ptr_end - ptr);
20965 else
20966 str = rb_parser_encoding_string_new(p, ptr, ptr_end - ptr, enc);
20967 if (!lex_eol_ptr_p(p, ptr_end)) parser_str_cat_cstr(str, "\n");
20968 lex_goto_eol(p);
20969 if (p->heredoc_indent > 0) {
20970 goto flush_str;
20971 }
20972 if (nextc(p) == -1) {
20973 if (str) {
20974 rb_parser_string_free(p, str);
20975 str = 0;
20976 }
20977 goto error;
20978 }
20979 } while (!whole_match_p(p, eos, len, indent));
20980 }
20981 else {
20982 /* int mb = ENC_CODERANGE_7BIT, *mbp = &mb;*/
20983 newtok(p);
20984 if (c == '#') {
20985 enum yytokentype t = parser_peek_variable_name(p);
20986 if (p->heredoc_line_indent != -1) {
20987 if (p->heredoc_indent > p->heredoc_line_indent) {
20988 p->heredoc_indent = p->heredoc_line_indent;
20989 }
20990 p->heredoc_line_indent = -1;
20991 }
20992 if (t) return t;
20993 tokadd(p, '#');
20994 c = nextc(p);
20995 }
20996 do {
20997 pushback(p, c);
20998 enc = p->enc;
20999 if ((c = tokadd_string(p, func, '\n', 0, NULL, &enc, &base_enc)) == -1) {
21000 if (p->eofp) goto error;
21001 goto restore;
21002 }
21003 if (c != '\n') {
21004 if (c == '\\') p->heredoc_line_indent = -1;
21005 flush:
21006 str = STR_NEW3(tok(p), toklen(p), enc, func);
21007 flush_str:
21008 set_yylval_str(str);
21009#ifndef RIPPER
21010 if (bol) nd_set_fl_newline(yylval.node);
21011#endif
21012 flush_string_content(p, enc, 0);
21013 return tSTRING_CONTENT;
21014 }
21015 tokadd(p, nextc(p));
21016 if (p->heredoc_indent > 0) {
21017 lex_goto_eol(p);
21018 goto flush;
21019 }
21020 /* if (mbp && mb == ENC_CODERANGE_UNKNOWN) mbp = 0;*/
21021 if ((c = nextc(p)) == -1) goto error;
21022 } while (!whole_match_p(p, eos, len, indent));
21023 str = STR_NEW3(tok(p), toklen(p), enc, func);
21024 }
21025 dispatch_heredoc_end(p);
21026 heredoc_restore(p, &p->lex.strterm->u.heredoc);
21027 token_flush(p);
21028 p->lex.strterm = NEW_STRTERM(func | STR_FUNC_TERM, 0, 0);
21029#ifdef RIPPER
21030 /* Preserve s_value for set_yylval_str */
21031 s_value = p->s_value;
21032#endif
21033 set_yylval_str(str);
21034#ifdef RIPPER
21035 set_parser_s_value(s_value);
21036#endif
21037
21038#ifndef RIPPER
21039 if (bol) nd_set_fl_newline(yylval.node);
21040#endif
21041 return tSTRING_CONTENT;
21042}
21043
21044#include "lex.c"
21045
21046static int
21047arg_ambiguous(struct parser_params *p, char c)
21048{
21049#ifndef RIPPER
21050 rb_warning1("ambiguous first argument; put parentheses or a space even after '%c' operator", WARN_I(c));
21051#else
21052 dispatch1(arg_ambiguous, rb_usascii_str_new(&c, 1));
21053#endif
21054 return TRUE;
21055}
21056
21057/* returns true value if formal argument error;
21058 * Qtrue, or error message if ripper */
21059static VALUE
21060formal_argument_error(struct parser_params *p, ID id)
21061{
21062 switch (id_type(id)) {
21063 case ID_LOCAL:
21064 break;
21065#ifndef RIPPER
21066# define ERR(mesg) (yyerror0(mesg), Qtrue)
21067#else
21068# define ERR(mesg) WARN_S(mesg)
21069#endif
21070 case ID_CONST:
21071 return ERR("formal argument cannot be a constant");
21072 case ID_INSTANCE:
21073 return ERR("formal argument cannot be an instance variable");
21074 case ID_GLOBAL:
21075 return ERR("formal argument cannot be a global variable");
21076 case ID_CLASS:
21077 return ERR("formal argument cannot be a class variable");
21078 default:
21079 return ERR("formal argument must be local variable");
21080#undef ERR
21081 }
21082 shadowing_lvar(p, id);
21083
21084 return Qfalse;
21085}
21086
21087static int
21088lvar_defined(struct parser_params *p, ID id)
21089{
21090 return (dyna_in_block(p) && dvar_defined(p, id)) || local_id(p, id);
21091}
21092
21093/* emacsen -*- hack */
21094static long
21095parser_encode_length(struct parser_params *p, const char *name, long len)
21096{
21097 long nlen;
21098
21099 if (len > 5 && name[nlen = len - 5] == '-') {
21100 if (rb_memcicmp(name + nlen + 1, "unix", 4) == 0)
21101 return nlen;
21102 }
21103 if (len > 4 && name[nlen = len - 4] == '-') {
21104 if (rb_memcicmp(name + nlen + 1, "dos", 3) == 0)
21105 return nlen;
21106 if (rb_memcicmp(name + nlen + 1, "mac", 3) == 0 &&
21107 !(len == 8 && rb_memcicmp(name, "utf8-mac", len) == 0))
21108 /* exclude UTF8-MAC because the encoding named "UTF8" doesn't exist in Ruby */
21109 return nlen;
21110 }
21111 return len;
21112}
21113
21114static void
21115parser_set_encode(struct parser_params *p, const char *name)
21116{
21117 rb_encoding *enc;
21118 VALUE excargs[3];
21119 int idx = 0;
21120
21121 const char *wrong = 0;
21122 switch (*name) {
21123 case 'e': case 'E': wrong = "external"; break;
21124 case 'i': case 'I': wrong = "internal"; break;
21125 case 'f': case 'F': wrong = "filesystem"; break;
21126 case 'l': case 'L': wrong = "locale"; break;
21127 }
21128 if (wrong && STRCASECMP(name, wrong) == 0) goto unknown;
21129 idx = rb_enc_find_index(name);
21130 if (idx < 0) {
21131 unknown:
21132 excargs[1] = rb_sprintf("unknown encoding name: %s", name);
21133 error:
21134 excargs[0] = rb_eArgError;
21135 excargs[2] = rb_make_backtrace();
21136 rb_ary_unshift(excargs[2], rb_sprintf("%"PRIsVALUE":%d", p->ruby_sourcefile_string, p->ruby_sourceline));
21137 VALUE exc = rb_make_exception(3, excargs);
21138 ruby_show_error_line(p, exc, &(YYLTYPE)RUBY_INIT_YYLLOC(), p->ruby_sourceline, p->lex.lastline);
21139
21140 rb_ast_free(p->ast);
21141 p->ast = NULL;
21142
21143 rb_exc_raise(exc);
21144 }
21145 enc = rb_enc_from_index(idx);
21146 if (!rb_enc_asciicompat(enc)) {
21147 excargs[1] = rb_sprintf("%s is not ASCII compatible", rb_enc_name(enc));
21148 goto error;
21149 }
21150 p->enc = enc;
21151#ifndef RIPPER
21152 if (p->debug_lines) {
21153 long i;
21154 for (i = 0; i < p->debug_lines->len; i++) {
21155 rb_parser_enc_associate(p, p->debug_lines->data[i], enc);
21156 }
21157 }
21158#endif
21159}
21160
21161static bool
21162comment_at_top(struct parser_params *p)
21163{
21164 if (p->token_seen) return false;
21165 return (p->line_count == (p->has_shebang ? 2 : 1));
21166}
21167
21168typedef long (*rb_magic_comment_length_t)(struct parser_params *p, const char *name, long len);
21169typedef void (*rb_magic_comment_setter_t)(struct parser_params *p, const char *name, const char *val);
21170
21171static int parser_invalid_pragma_value(struct parser_params *p, const char *name, const char *val);
21172
21173static void
21174magic_comment_encoding(struct parser_params *p, const char *name, const char *val)
21175{
21176 if (!comment_at_top(p)) {
21177 return;
21178 }
21179 parser_set_encode(p, val);
21180}
21181
21182static int
21183parser_get_bool(struct parser_params *p, const char *name, const char *val)
21184{
21185 switch (*val) {
21186 case 't': case 'T':
21187 if (STRCASECMP(val, "true") == 0) {
21188 return TRUE;
21189 }
21190 break;
21191 case 'f': case 'F':
21192 if (STRCASECMP(val, "false") == 0) {
21193 return FALSE;
21194 }
21195 break;
21196 }
21197 return parser_invalid_pragma_value(p, name, val);
21198}
21199
21200static int
21201parser_invalid_pragma_value(struct parser_params *p, const char *name, const char *val)
21202{
21203 rb_warning2("invalid value for %s: %s", WARN_S(name), WARN_S(val));
21204 return -1;
21205}
21206
21207static void
21208parser_set_token_info(struct parser_params *p, const char *name, const char *val)
21209{
21210 int b = parser_get_bool(p, name, val);
21211 if (b >= 0) p->token_info_enabled = b;
21212}
21213
21214static void
21215parser_set_frozen_string_literal(struct parser_params *p, const char *name, const char *val)
21216{
21217 int b;
21218
21219 if (p->token_seen) {
21220 rb_warning1("'%s' is ignored after any tokens", WARN_S(name));
21221 return;
21222 }
21223
21224 b = parser_get_bool(p, name, val);
21225 if (b < 0) return;
21226
21227 p->frozen_string_literal = b;
21228}
21229
21230static void
21231parser_set_shareable_constant_value(struct parser_params *p, const char *name, const char *val)
21232{
21233 for (const char *s = p->lex.pbeg, *e = p->lex.pcur; s < e; ++s) {
21234 if (*s == ' ' || *s == '\t') continue;
21235 if (*s == '#') break;
21236 rb_warning1("'%s' is ignored unless in comment-only line", WARN_S(name));
21237 return;
21238 }
21239
21240 switch (*val) {
21241 case 'n': case 'N':
21242 if (STRCASECMP(val, "none") == 0) {
21243 p->ctxt.shareable_constant_value = rb_parser_shareable_none;
21244 return;
21245 }
21246 break;
21247 case 'l': case 'L':
21248 if (STRCASECMP(val, "literal") == 0) {
21249 p->ctxt.shareable_constant_value = rb_parser_shareable_literal;
21250 return;
21251 }
21252 break;
21253 case 'e': case 'E':
21254 if (STRCASECMP(val, "experimental_copy") == 0) {
21255 p->ctxt.shareable_constant_value = rb_parser_shareable_copy;
21256 return;
21257 }
21258 if (STRCASECMP(val, "experimental_everything") == 0) {
21259 p->ctxt.shareable_constant_value = rb_parser_shareable_everything;
21260 return;
21261 }
21262 break;
21263 }
21264 parser_invalid_pragma_value(p, name, val);
21265}
21266
21267# if WARN_PAST_SCOPE
21268static void
21269parser_set_past_scope(struct parser_params *p, const char *name, const char *val)
21270{
21271 int b = parser_get_bool(p, name, val);
21272 if (b >= 0) p->past_scope_enabled = b;
21273}
21274# endif
21275
21277 const char *name;
21278 rb_magic_comment_setter_t func;
21279 rb_magic_comment_length_t length;
21280};
21281
21282static const struct magic_comment magic_comments[] = {
21283 {"coding", magic_comment_encoding, parser_encode_length},
21284 {"encoding", magic_comment_encoding, parser_encode_length},
21285 {"frozen_string_literal", parser_set_frozen_string_literal},
21286 {"shareable_constant_value", parser_set_shareable_constant_value},
21287 {"warn_indent", parser_set_token_info},
21288# if WARN_PAST_SCOPE
21289 {"warn_past_scope", parser_set_past_scope},
21290# endif
21291};
21292
21293static const char *
21294magic_comment_marker(const char *str, long len)
21295{
21296 long i = 2;
21297
21298 while (i < len) {
21299 switch (str[i]) {
21300 case '-':
21301 if (str[i-1] == '*' && str[i-2] == '-') {
21302 return str + i + 1;
21303 }
21304 i += 2;
21305 break;
21306 case '*':
21307 if (i + 1 >= len) return 0;
21308 if (str[i+1] != '-') {
21309 i += 4;
21310 }
21311 else if (str[i-1] != '-') {
21312 i += 2;
21313 }
21314 else {
21315 return str + i + 2;
21316 }
21317 break;
21318 default:
21319 i += 3;
21320 break;
21321 }
21322 }
21323 return 0;
21324}
21325
21326static int
21327parser_magic_comment(struct parser_params *p, const char *str, long len)
21328{
21329 int indicator = 0;
21330 VALUE name = 0, val = 0;
21331 const char *beg, *end, *vbeg, *vend;
21332#define str_copy(_s, _p, _n) ((_s) \
21333 ? (void)(rb_str_resize((_s), (_n)), \
21334 MEMCPY(RSTRING_PTR(_s), (_p), char, (_n)), (_s)) \
21335 : (void)((_s) = STR_NEW((_p), (_n))))
21336
21337 if (len <= 7) return FALSE;
21338 if (!!(beg = magic_comment_marker(str, len))) {
21339 if (!(end = magic_comment_marker(beg, str + len - beg)))
21340 return FALSE;
21341 indicator = TRUE;
21342 str = beg;
21343 len = end - beg - 3;
21344 }
21345
21346 /* %r"([^\\s\'\":;]+)\\s*:\\s*(\"(?:\\\\.|[^\"])*\"|[^\"\\s;]+)[\\s;]*" */
21347 while (len > 0) {
21348 const struct magic_comment *mc = magic_comments;
21349 char *s;
21350 int i;
21351 long n = 0;
21352
21353 for (; len > 0 && *str; str++, --len) {
21354 switch (*str) {
21355 case '\'': case '"': case ':': case ';':
21356 continue;
21357 }
21358 if (!ISSPACE(*str)) break;
21359 }
21360 for (beg = str; len > 0; str++, --len) {
21361 switch (*str) {
21362 case '\'': case '"': case ':': case ';':
21363 break;
21364 default:
21365 if (ISSPACE(*str)) break;
21366 continue;
21367 }
21368 break;
21369 }
21370 for (end = str; len > 0 && ISSPACE(*str); str++, --len);
21371 if (!len) break;
21372 if (*str != ':') {
21373 if (!indicator) return FALSE;
21374 continue;
21375 }
21376
21377 do str++; while (--len > 0 && ISSPACE(*str));
21378 if (!len) break;
21379 const char *tok_beg = str;
21380 if (*str == '"') {
21381 for (vbeg = ++str; --len > 0 && *str != '"'; str++) {
21382 if (*str == '\\') {
21383 --len;
21384 ++str;
21385 }
21386 }
21387 vend = str;
21388 if (len) {
21389 --len;
21390 ++str;
21391 }
21392 }
21393 else {
21394 for (vbeg = str; len > 0 && *str != '"' && *str != ';' && !ISSPACE(*str); --len, str++);
21395 vend = str;
21396 }
21397 const char *tok_end = str;
21398 if (indicator) {
21399 while (len > 0 && (*str == ';' || ISSPACE(*str))) --len, str++;
21400 }
21401 else {
21402 while (len > 0 && (ISSPACE(*str))) --len, str++;
21403 if (len) return FALSE;
21404 }
21405
21406 n = end - beg;
21407 str_copy(name, beg, n);
21408 s = RSTRING_PTR(name);
21409 for (i = 0; i < n; ++i) {
21410 if (s[i] == '-') s[i] = '_';
21411 }
21412 do {
21413 if (STRNCASECMP(mc->name, s, n) == 0 && !mc->name[n]) {
21414 n = vend - vbeg;
21415 if (mc->length) {
21416 n = (*mc->length)(p, vbeg, n);
21417 }
21418 str_copy(val, vbeg, n);
21419 p->lex.ptok = tok_beg;
21420 p->lex.pcur = tok_end;
21421 (*mc->func)(p, mc->name, RSTRING_PTR(val));
21422 break;
21423 }
21424 } while (++mc < magic_comments + numberof(magic_comments));
21425#ifdef RIPPER
21426 str_copy(val, vbeg, vend - vbeg);
21427 dispatch2(magic_comment, name, val);
21428#endif
21429 }
21430
21431 return TRUE;
21432}
21433
21434static void
21435set_file_encoding(struct parser_params *p, const char *str, const char *send)
21436{
21437 int sep = 0;
21438 const char *beg = str;
21439 VALUE s;
21440
21441 for (;;) {
21442 if (send - str <= 6) return;
21443 switch (str[6]) {
21444 case 'C': case 'c': str += 6; continue;
21445 case 'O': case 'o': str += 5; continue;
21446 case 'D': case 'd': str += 4; continue;
21447 case 'I': case 'i': str += 3; continue;
21448 case 'N': case 'n': str += 2; continue;
21449 case 'G': case 'g': str += 1; continue;
21450 case '=': case ':':
21451 sep = 1;
21452 str += 6;
21453 break;
21454 default:
21455 str += 6;
21456 if (ISSPACE(*str)) break;
21457 continue;
21458 }
21459 if (STRNCASECMP(str-6, "coding", 6) == 0) break;
21460 sep = 0;
21461 }
21462 for (;;) {
21463 do {
21464 if (++str >= send) return;
21465 } while (ISSPACE(*str));
21466 if (sep) break;
21467 if (*str != '=' && *str != ':') return;
21468 sep = 1;
21469 str++;
21470 }
21471 beg = str;
21472 while ((*str == '-' || *str == '_' || ISALNUM(*str)) && ++str < send);
21473 s = rb_str_new(beg, parser_encode_length(p, beg, str - beg));
21474 p->lex.ptok = beg;
21475 p->lex.pcur = str;
21476 parser_set_encode(p, RSTRING_PTR(s));
21477 rb_str_resize(s, 0);
21478}
21479
21480static void
21481parser_prepare(struct parser_params *p)
21482{
21483 int c = nextc0(p, FALSE);
21484 p->token_info_enabled = !compile_for_eval && RTEST(ruby_verbose);
21485 switch (c) {
21486 case '#':
21487 if (peek(p, '!')) p->has_shebang = 1;
21488 break;
21489 case 0xef: /* UTF-8 BOM marker */
21490 if (!lex_eol_n_p(p, 2) &&
21491 (unsigned char)p->lex.pcur[0] == 0xbb &&
21492 (unsigned char)p->lex.pcur[1] == 0xbf) {
21493 p->enc = rb_utf8_encoding();
21494 p->lex.pcur += 2;
21495#ifndef RIPPER
21496 if (p->debug_lines) {
21497 rb_parser_string_set_encoding(p->lex.lastline, p->enc);
21498 }
21499#endif
21500 p->lex.pbeg = p->lex.pcur;
21501 token_flush(p);
21502 return;
21503 }
21504 break;
21505 case -1: /* end of script. */
21506 return;
21507 }
21508 pushback(p, c);
21509 p->enc = rb_parser_str_get_encoding(p->lex.lastline);
21510}
21511
21512#ifndef RIPPER
21513#define ambiguous_operator(tok, op, syn) ( \
21514 rb_warning0("'"op"' after local variable or literal is interpreted as binary operator"), \
21515 rb_warning0("even though it seems like "syn""))
21516#else
21517#define ambiguous_operator(tok, op, syn) \
21518 dispatch2(operator_ambiguous, TOKEN2VAL(tok), rb_str_new_cstr(syn))
21519#endif
21520#define warn_balanced(tok, op, syn) ((void) \
21521 (!IS_lex_state_for(last_state, EXPR_CLASS|EXPR_DOT|EXPR_FNAME|EXPR_ENDFN) && \
21522 space_seen && !ISSPACE(c) && \
21523 (ambiguous_operator(tok, op, syn), 0)), \
21524 (enum yytokentype)(tok))
21525
21526static enum yytokentype
21527no_digits(struct parser_params *p)
21528{
21529 yyerror0("numeric literal without digits");
21530 if (peek(p, '_')) nextc(p);
21531 /* dummy 0, for tUMINUS_NUM at numeric */
21532 return set_number_literal(p, tINTEGER, 0, 10, 0);
21533}
21534
21535static enum yytokentype
21536parse_numeric(struct parser_params *p, int c)
21537{
21538 int is_float, seen_point, seen_e, nondigit;
21539 int suffix;
21540
21541 is_float = seen_point = seen_e = nondigit = 0;
21542 SET_LEX_STATE(EXPR_END);
21543 newtok(p);
21544 if (c == '-' || c == '+') {
21545 tokadd(p, c);
21546 c = nextc(p);
21547 }
21548 if (c == '0') {
21549 int start = toklen(p);
21550 c = nextc(p);
21551 if (c == 'x' || c == 'X') {
21552 /* hexadecimal */
21553 c = nextc(p);
21554 if (c != -1 && ISXDIGIT(c)) {
21555 do {
21556 if (c == '_') {
21557 if (nondigit) break;
21558 nondigit = c;
21559 continue;
21560 }
21561 if (!ISXDIGIT(c)) break;
21562 nondigit = 0;
21563 tokadd(p, c);
21564 } while ((c = nextc(p)) != -1);
21565 }
21566 pushback(p, c);
21567 tokfix(p);
21568 if (toklen(p) == start) {
21569 return no_digits(p);
21570 }
21571 else if (nondigit) goto trailing_uc;
21572 suffix = number_literal_suffix(p, NUM_SUFFIX_ALL);
21573 return set_number_literal(p, tINTEGER, suffix, 16, 0);
21574 }
21575 if (c == 'b' || c == 'B') {
21576 /* binary */
21577 c = nextc(p);
21578 if (c == '0' || c == '1') {
21579 do {
21580 if (c == '_') {
21581 if (nondigit) break;
21582 nondigit = c;
21583 continue;
21584 }
21585 if (c != '0' && c != '1') break;
21586 nondigit = 0;
21587 tokadd(p, c);
21588 } while ((c = nextc(p)) != -1);
21589 }
21590 pushback(p, c);
21591 tokfix(p);
21592 if (toklen(p) == start) {
21593 return no_digits(p);
21594 }
21595 else if (nondigit) goto trailing_uc;
21596 suffix = number_literal_suffix(p, NUM_SUFFIX_ALL);
21597 return set_number_literal(p, tINTEGER, suffix, 2, 0);
21598 }
21599 if (c == 'd' || c == 'D') {
21600 /* decimal */
21601 c = nextc(p);
21602 if (c != -1 && ISDIGIT(c)) {
21603 do {
21604 if (c == '_') {
21605 if (nondigit) break;
21606 nondigit = c;
21607 continue;
21608 }
21609 if (!ISDIGIT(c)) break;
21610 nondigit = 0;
21611 tokadd(p, c);
21612 } while ((c = nextc(p)) != -1);
21613 }
21614 pushback(p, c);
21615 tokfix(p);
21616 if (toklen(p) == start) {
21617 return no_digits(p);
21618 }
21619 else if (nondigit) goto trailing_uc;
21620 suffix = number_literal_suffix(p, NUM_SUFFIX_ALL);
21621 return set_number_literal(p, tINTEGER, suffix, 10, 0);
21622 }
21623 if (c == '_') {
21624 /* 0_0 */
21625 goto octal_number;
21626 }
21627 if (c == 'o' || c == 'O') {
21628 /* prefixed octal */
21629 c = nextc(p);
21630 if (c == -1 || c == '_' || !ISDIGIT(c)) {
21631 tokfix(p);
21632 return no_digits(p);
21633 }
21634 }
21635 if (c >= '0' && c <= '7') {
21636 /* octal */
21637 octal_number:
21638 do {
21639 if (c == '_') {
21640 if (nondigit) break;
21641 nondigit = c;
21642 continue;
21643 }
21644 if (c < '0' || c > '9') break;
21645 if (c > '7') goto invalid_octal;
21646 nondigit = 0;
21647 tokadd(p, c);
21648 } while ((c = nextc(p)) != -1);
21649 if (toklen(p) > start) {
21650 pushback(p, c);
21651 tokfix(p);
21652 if (nondigit) goto trailing_uc;
21653 suffix = number_literal_suffix(p, NUM_SUFFIX_ALL);
21654 return set_number_literal(p, tINTEGER, suffix, 8, 0);
21655 }
21656 if (nondigit) {
21657 pushback(p, c);
21658 goto trailing_uc;
21659 }
21660 }
21661 if (c > '7' && c <= '9') {
21662 invalid_octal:
21663 yyerror0("Invalid octal digit");
21664 }
21665 else if (c == '.' || c == 'e' || c == 'E') {
21666 tokadd(p, '0');
21667 }
21668 else {
21669 pushback(p, c);
21670 tokfix(p);
21671 suffix = number_literal_suffix(p, NUM_SUFFIX_ALL);
21672 return set_number_literal(p, tINTEGER, suffix, 10, 0);
21673 }
21674 }
21675
21676 for (;;) {
21677 switch (c) {
21678 case '0': case '1': case '2': case '3': case '4':
21679 case '5': case '6': case '7': case '8': case '9':
21680 nondigit = 0;
21681 tokadd(p, c);
21682 break;
21683
21684 case '.':
21685 if (nondigit) goto trailing_uc;
21686 if (seen_point || seen_e) {
21687 goto decode_num;
21688 }
21689 else {
21690 int c0 = nextc(p);
21691 if (c0 == -1 || !ISDIGIT(c0)) {
21692 pushback(p, c0);
21693 goto decode_num;
21694 }
21695 c = c0;
21696 }
21697 seen_point = toklen(p);
21698 tokadd(p, '.');
21699 tokadd(p, c);
21700 is_float++;
21701 nondigit = 0;
21702 break;
21703
21704 case 'e':
21705 case 'E':
21706 if (nondigit) {
21707 pushback(p, c);
21708 c = nondigit;
21709 goto decode_num;
21710 }
21711 if (seen_e) {
21712 goto decode_num;
21713 }
21714 nondigit = c;
21715 c = nextc(p);
21716 if (c != '-' && c != '+' && !ISDIGIT(c)) {
21717 pushback(p, c);
21718 c = nondigit;
21719 nondigit = 0;
21720 goto decode_num;
21721 }
21722 tokadd(p, nondigit);
21723 seen_e++;
21724 is_float++;
21725 tokadd(p, c);
21726 nondigit = (c == '-' || c == '+') ? c : 0;
21727 break;
21728
21729 case '_': /* `_' in number just ignored */
21730 if (nondigit) goto decode_num;
21731 nondigit = c;
21732 break;
21733
21734 default:
21735 goto decode_num;
21736 }
21737 c = nextc(p);
21738 }
21739
21740 decode_num:
21741 pushback(p, c);
21742 if (nondigit) {
21743 trailing_uc:
21744 literal_flush(p, p->lex.pcur - 1);
21745 YYLTYPE loc = RUBY_INIT_YYLLOC();
21746 compile_error(p, "trailing '%c' in number", nondigit);
21747 parser_show_error_line(p, &loc);
21748 }
21749 tokfix(p);
21750 if (is_float) {
21751 enum yytokentype type = tFLOAT;
21752
21753 suffix = number_literal_suffix(p, seen_e ? NUM_SUFFIX_I : NUM_SUFFIX_ALL);
21754 if (suffix & NUM_SUFFIX_R) {
21755 type = tRATIONAL;
21756 }
21757 else {
21758 errno = 0;
21759 strtod(tok(p), 0);
21760 if (errno == ERANGE) {
21761 rb_warning1("Float %s out of range", WARN_S(tok(p)));
21762 errno = 0;
21763 }
21764 }
21765 return set_number_literal(p, type, suffix, 0, seen_point);
21766 }
21767 suffix = number_literal_suffix(p, NUM_SUFFIX_ALL);
21768 return set_number_literal(p, tINTEGER, suffix, 10, 0);
21769}
21770
21771static enum yytokentype
21772parse_qmark(struct parser_params *p, int space_seen)
21773{
21774 rb_encoding *enc;
21775 register int c;
21776 rb_parser_string_t *lit;
21777 const char *start = p->lex.pcur;
21778
21779 if (IS_END()) {
21780 SET_LEX_STATE(EXPR_VALUE);
21781 return '?';
21782 }
21783 c = nextc(p);
21784 if (c == -1) {
21785 compile_error(p, "incomplete character syntax");
21786 return 0;
21787 }
21788 if (rb_enc_isspace(c, p->enc)) {
21789 if (!IS_ARG()) {
21790 int c2 = escaped_control_code(c);
21791 if (c2) {
21792 WARN_SPACE_CHAR(c2, "?");
21793 }
21794 }
21795 ternary:
21796 pushback(p, c);
21797 SET_LEX_STATE(EXPR_VALUE);
21798 return '?';
21799 }
21800 newtok(p);
21801 enc = p->enc;
21802 int w = parser_precise_mbclen(p, start);
21803 if (is_identchar(p, start, p->lex.pend, p->enc) &&
21804 !(lex_eol_ptr_n_p(p, start, w) || !is_identchar(p, start + w, p->lex.pend, p->enc))) {
21805 if (space_seen) {
21806 const char *ptr = start;
21807 do {
21808 int n = parser_precise_mbclen(p, ptr);
21809 if (n < 0) return -1;
21810 ptr += n;
21811 } while (!lex_eol_ptr_p(p, ptr) && is_identchar(p, ptr, p->lex.pend, p->enc));
21812 rb_warn2("'?' just followed by '%.*s' is interpreted as" \
21813 " a conditional operator, put a space after '?'",
21814 WARN_I((int)(ptr - start)), WARN_S_L(start, (ptr - start)));
21815 }
21816 goto ternary;
21817 }
21818 else if (c == '\\') {
21819 if (peek(p, 'u')) {
21820 nextc(p);
21821 enc = rb_utf8_encoding();
21822 tokadd_utf8(p, &enc, -1, 0, 0);
21823 }
21824 else if (!ISASCII(c = peekc(p)) && c != -1) {
21825 nextc(p);
21826 if (tokadd_mbchar(p, c) == -1) return 0;
21827 }
21828 else {
21829 c = read_escape(p, 0, p->lex.pcur - rb_strlen_lit("?\\"));
21830 tokadd(p, c);
21831 }
21832 }
21833 else {
21834 if (tokadd_mbchar(p, c) == -1) return 0;
21835 }
21836 tokfix(p);
21837 lit = STR_NEW3(tok(p), toklen(p), enc, 0);
21838 set_yylval_str(lit);
21839 SET_LEX_STATE(EXPR_END);
21840 return tCHAR;
21841}
21842
21843static enum yytokentype
21844parse_percent(struct parser_params *p, const int space_seen, const enum lex_state_e last_state)
21845{
21846 register int c;
21847 const char *ptok = p->lex.pcur;
21848
21849 if (IS_BEG()) {
21850 int term;
21851 int paren;
21852
21853 c = nextc(p);
21854 quotation:
21855 if (c == -1) goto unterminated;
21856 if (!ISALNUM(c)) {
21857 term = c;
21858 if (!ISASCII(c)) goto unknown;
21859 c = 'Q';
21860 }
21861 else {
21862 term = nextc(p);
21863 if (rb_enc_isalnum(term, p->enc) || !parser_isascii(p)) {
21864 unknown:
21865 pushback(p, term);
21866 c = parser_precise_mbclen(p, p->lex.pcur);
21867 if (c < 0) return 0;
21868 p->lex.pcur += c;
21869 yyerror0("unknown type of %string");
21870 return 0;
21871 }
21872 }
21873 if (term == -1) {
21874 unterminated:
21875 compile_error(p, "unterminated quoted string meets end of file");
21876 return 0;
21877 }
21878 paren = term;
21879 if (term == '(') term = ')';
21880 else if (term == '[') term = ']';
21881 else if (term == '{') term = '}';
21882 else if (term == '<') term = '>';
21883 else paren = 0;
21884
21885 p->lex.ptok = ptok-1;
21886 switch (c) {
21887 case 'Q':
21888 p->lex.strterm = NEW_STRTERM(str_dquote, term, paren);
21889 return tSTRING_BEG;
21890
21891 case 'q':
21892 p->lex.strterm = NEW_STRTERM(str_squote, term, paren);
21893 return tSTRING_BEG;
21894
21895 case 'W':
21896 p->lex.strterm = NEW_STRTERM(str_dword, term, paren);
21897 return tWORDS_BEG;
21898
21899 case 'w':
21900 p->lex.strterm = NEW_STRTERM(str_sword, term, paren);
21901 return tQWORDS_BEG;
21902
21903 case 'I':
21904 p->lex.strterm = NEW_STRTERM(str_dword, term, paren);
21905 return tSYMBOLS_BEG;
21906
21907 case 'i':
21908 p->lex.strterm = NEW_STRTERM(str_sword, term, paren);
21909 return tQSYMBOLS_BEG;
21910
21911 case 'x':
21912 p->lex.strterm = NEW_STRTERM(str_xquote, term, paren);
21913 return tXSTRING_BEG;
21914
21915 case 'r':
21916 p->lex.strterm = NEW_STRTERM(str_regexp, term, paren);
21917 return tREGEXP_BEG;
21918
21919 case 's':
21920 p->lex.strterm = NEW_STRTERM(str_ssym, term, paren);
21921 SET_LEX_STATE(EXPR_FNAME|EXPR_FITEM);
21922 return tSYMBEG;
21923
21924 default:
21925 yyerror0("unknown type of %string");
21926 return 0;
21927 }
21928 }
21929 if ((c = nextc(p)) == '=') {
21930 set_yylval_id('%');
21931 SET_LEX_STATE(EXPR_BEG);
21932 return tOP_ASGN;
21933 }
21934 if (IS_SPCARG(c) || (IS_lex_state(EXPR_FITEM) && c == 's')) {
21935 goto quotation;
21936 }
21937 SET_LEX_STATE(IS_AFTER_OPERATOR() ? EXPR_ARG : EXPR_BEG);
21938 pushback(p, c);
21939 return warn_balanced('%', "%%", "string literal");
21940}
21941
21942static int
21943tokadd_ident(struct parser_params *p, int c)
21944{
21945 do {
21946 if (tokadd_mbchar(p, c) == -1) return -1;
21947 c = nextc(p);
21948 } while (parser_is_identchar(p));
21949 pushback(p, c);
21950 return 0;
21951}
21952
21953static ID
21954tokenize_ident(struct parser_params *p)
21955{
21956 ID ident = TOK_INTERN();
21957
21958 set_yylval_name(ident);
21959
21960 return ident;
21961}
21962
21963static int
21964parse_numvar(struct parser_params *p)
21965{
21966 size_t len;
21967 int overflow;
21968 unsigned long n = ruby_scan_digits(tok(p)+1, toklen(p)-1, 10, &len, &overflow);
21969 const unsigned long nth_ref_max =
21970 ((FIXNUM_MAX < INT_MAX) ? FIXNUM_MAX : INT_MAX) >> 1;
21971 /* NTH_REF is left-shifted to be ORed with back-ref flag and
21972 * turned into a Fixnum, in compile.c */
21973
21974 if (overflow || n > nth_ref_max) {
21975 /* compile_error()? */
21976 rb_warn1("'%s' is too big for a number variable, always nil", WARN_S(tok(p)));
21977 return 0; /* $0 is $PROGRAM_NAME, not NTH_REF */
21978 }
21979 else {
21980 return (int)n;
21981 }
21982}
21983
21984static enum yytokentype
21985parse_gvar(struct parser_params *p, const enum lex_state_e last_state)
21986{
21987 const char *ptr = p->lex.pcur;
21988 register int c;
21989
21990 SET_LEX_STATE(EXPR_END);
21991 p->lex.ptok = ptr - 1; /* from '$' */
21992 newtok(p);
21993 c = nextc(p);
21994 switch (c) {
21995 case '_': /* $_: last read line string */
21996 c = nextc(p);
21997 if (parser_is_identchar(p)) {
21998 tokadd(p, '$');
21999 tokadd(p, '_');
22000 break;
22001 }
22002 pushback(p, c);
22003 c = '_';
22004 /* fall through */
22005 case '~': /* $~: match-data */
22006 case '*': /* $*: argv */
22007 case '$': /* $$: pid */
22008 case '?': /* $?: last status */
22009 case '!': /* $!: error string */
22010 case '@': /* $@: error position */
22011 case '/': /* $/: input record separator */
22012 case '\\': /* $\: output record separator */
22013 case ';': /* $;: field separator */
22014 case ',': /* $,: output field separator */
22015 case '.': /* $.: last read line number */
22016 case '=': /* $=: ignorecase */
22017 case ':': /* $:: load path */
22018 case '<': /* $<: default input handle */
22019 case '>': /* $>: default output handle */
22020 case '\"': /* $": already loaded files */
22021 tokadd(p, '$');
22022 tokadd(p, c);
22023 goto gvar;
22024
22025 case '-':
22026 tokadd(p, '$');
22027 tokadd(p, c);
22028 c = nextc(p);
22029 if (parser_is_identchar(p)) {
22030 if (tokadd_mbchar(p, c) == -1) return 0;
22031 }
22032 else {
22033 pushback(p, c);
22034 pushback(p, '-');
22035 return '$';
22036 }
22037 gvar:
22038 tokenize_ident(p);
22039 return tGVAR;
22040
22041 case '&': /* $&: last match */
22042 case '`': /* $`: string before last match */
22043 case '\'': /* $': string after last match */
22044 case '+': /* $+: string matches last paren. */
22045 if (IS_lex_state_for(last_state, EXPR_FNAME)) {
22046 tokadd(p, '$');
22047 tokadd(p, c);
22048 goto gvar;
22049 }
22050 set_yylval_node(NEW_BACK_REF(c, &_cur_loc));
22051 return tBACK_REF;
22052
22053 case '1': case '2': case '3':
22054 case '4': case '5': case '6':
22055 case '7': case '8': case '9':
22056 tokadd(p, '$');
22057 do {
22058 tokadd(p, c);
22059 c = nextc(p);
22060 } while (c != -1 && ISDIGIT(c));
22061 pushback(p, c);
22062 if (IS_lex_state_for(last_state, EXPR_FNAME)) goto gvar;
22063 tokfix(p);
22064 c = parse_numvar(p);
22065 set_yylval_node(NEW_NTH_REF(c, &_cur_loc));
22066 return tNTH_REF;
22067
22068 default:
22069 if (!parser_is_identchar(p)) {
22070 YYLTYPE loc = RUBY_INIT_YYLLOC();
22071 if (c == -1 || ISSPACE(c)) {
22072 compile_error(p, "'$' without identifiers is not allowed as a global variable name");
22073 }
22074 else {
22075 pushback(p, c);
22076 compile_error(p, "'$%c' is not allowed as a global variable name", c);
22077 }
22078 parser_show_error_line(p, &loc);
22079 set_yylval_noname();
22080 return tGVAR;
22081 }
22082 /* fall through */
22083 case '0':
22084 tokadd(p, '$');
22085 }
22086
22087 if (tokadd_ident(p, c)) return 0;
22088 SET_LEX_STATE(EXPR_END);
22089 if (VALID_SYMNAME_P(tok(p), toklen(p), p->enc, ID_GLOBAL)) {
22090 tokenize_ident(p);
22091 }
22092 else {
22093 compile_error(p, "'%.*s' is not allowed as a global variable name", toklen(p), tok(p));
22094 set_yylval_noname();
22095 }
22096 return tGVAR;
22097}
22098
22099static bool
22100parser_numbered_param(struct parser_params *p, int n)
22101{
22102 if (n < 0) return false;
22103
22104 if (DVARS_TERMINAL_P(p->lvtbl->args) || DVARS_TERMINAL_P(p->lvtbl->args->prev)) {
22105 return false;
22106 }
22107 if (p->max_numparam == ORDINAL_PARAM) {
22108 compile_error(p, "ordinary parameter is defined");
22109 return false;
22110 }
22111 struct vtable *args = p->lvtbl->args;
22112 if (p->max_numparam < n) {
22113 p->max_numparam = n;
22114 }
22115 while (n > args->pos) {
22116 vtable_add(args, NUMPARAM_IDX_TO_ID(args->pos+1));
22117 }
22118 return true;
22119}
22120
22121static enum yytokentype
22122parse_atmark(struct parser_params *p, const enum lex_state_e last_state)
22123{
22124 const char *ptr = p->lex.pcur;
22125 enum yytokentype result = tIVAR;
22126 register int c = nextc(p);
22127 YYLTYPE loc;
22128
22129 p->lex.ptok = ptr - 1; /* from '@' */
22130 newtok(p);
22131 tokadd(p, '@');
22132 if (c == '@') {
22133 result = tCVAR;
22134 tokadd(p, '@');
22135 c = nextc(p);
22136 }
22137 SET_LEX_STATE(IS_lex_state_for(last_state, EXPR_FNAME) ? EXPR_ENDFN : EXPR_END);
22138 if (c == -1 || !parser_is_identchar(p)) {
22139 pushback(p, c);
22140 RUBY_SET_YYLLOC(loc);
22141 if (result == tIVAR) {
22142 compile_error(p, "'@' without identifiers is not allowed as an instance variable name");
22143 }
22144 else {
22145 compile_error(p, "'@@' without identifiers is not allowed as a class variable name");
22146 }
22147 parser_show_error_line(p, &loc);
22148 set_yylval_noname();
22149 SET_LEX_STATE(EXPR_END);
22150 return result;
22151 }
22152 else if (ISDIGIT(c)) {
22153 pushback(p, c);
22154 RUBY_SET_YYLLOC(loc);
22155 if (result == tIVAR) {
22156 compile_error(p, "'@%c' is not allowed as an instance variable name", c);
22157 }
22158 else {
22159 compile_error(p, "'@@%c' is not allowed as a class variable name", c);
22160 }
22161 parser_show_error_line(p, &loc);
22162 set_yylval_noname();
22163 SET_LEX_STATE(EXPR_END);
22164 return result;
22165 }
22166
22167 if (tokadd_ident(p, c)) return 0;
22168 tokenize_ident(p);
22169 return result;
22170}
22171
22172static enum yytokentype
22173parse_ident(struct parser_params *p, int c, int cmd_state)
22174{
22175 enum yytokentype result;
22176 bool is_ascii = true;
22177 const enum lex_state_e last_state = p->lex.state;
22178 ID ident;
22179 int enforce_keyword_end = 0;
22180
22181 do {
22182 if (!ISASCII(c)) is_ascii = false;
22183 if (tokadd_mbchar(p, c) == -1) return 0;
22184 c = nextc(p);
22185 } while (parser_is_identchar(p));
22186 if ((c == '!' || c == '?') && !peek(p, '=')) {
22187 result = tFID;
22188 tokadd(p, c);
22189 }
22190 else if (c == '=' && IS_lex_state(EXPR_FNAME) &&
22191 (!peek(p, '~') && !peek(p, '>') && (!peek(p, '=') || (peek_n(p, '>', 1))))) {
22192 result = tIDENTIFIER;
22193 tokadd(p, c);
22194 }
22195 else {
22196 result = tCONSTANT; /* assume provisionally */
22197 pushback(p, c);
22198 }
22199 tokfix(p);
22200
22201 if (IS_LABEL_POSSIBLE()) {
22202 if (IS_LABEL_SUFFIX(0)) {
22203 SET_LEX_STATE(EXPR_ARG|EXPR_LABELED);
22204 nextc(p);
22205 tokenize_ident(p);
22206 return tLABEL;
22207 }
22208 }
22209
22210#ifndef RIPPER
22211 if (peek_end_expect_token_locations(p)) {
22212 const rb_code_position_t *end_pos;
22213 int lineno, column;
22214 int beg_pos = (int)(p->lex.ptok - p->lex.pbeg);
22215
22216 end_pos = peek_end_expect_token_locations(p)->pos;
22217 lineno = end_pos->lineno;
22218 column = end_pos->column;
22219
22220 if (p->debug) {
22221 rb_parser_printf(p, "enforce_keyword_end check. current: (%d, %d), peek: (%d, %d)\n",
22222 p->ruby_sourceline, beg_pos, lineno, column);
22223 }
22224
22225 if ((p->ruby_sourceline > lineno) && (beg_pos <= column)) {
22226 const struct kwtable *kw;
22227
22228 if ((IS_lex_state(EXPR_DOT)) && (kw = rb_reserved_word(tok(p), toklen(p))) && (kw && kw->id[0] == keyword_end)) {
22229 if (p->debug) rb_parser_printf(p, "enforce_keyword_end is enabled\n");
22230 enforce_keyword_end = 1;
22231 }
22232 }
22233 }
22234#endif
22235
22236 if (is_ascii && (!IS_lex_state(EXPR_DOT) || enforce_keyword_end)) {
22237 const struct kwtable *kw;
22238
22239 /* See if it is a reserved word. */
22240 kw = rb_reserved_word(tok(p), toklen(p));
22241 if (kw) {
22242 enum lex_state_e state = p->lex.state;
22243 if (IS_lex_state_for(state, EXPR_FNAME)) {
22244 SET_LEX_STATE(EXPR_ENDFN);
22245 set_yylval_name(rb_intern2(tok(p), toklen(p)));
22246 return kw->id[0];
22247 }
22248 SET_LEX_STATE(kw->state);
22249 if (IS_lex_state(EXPR_BEG)) {
22250 p->command_start = TRUE;
22251 }
22252 if (kw->id[0] == keyword_do) {
22253 if (lambda_beginning_p()) {
22254 p->lex.lpar_beg = -1; /* make lambda_beginning_p() == FALSE in the body of "-> do ... end" */
22255 return keyword_do_LAMBDA;
22256 }
22257 if (COND_P()) return keyword_do_cond;
22258 if (CMDARG_P() && !IS_lex_state_for(state, EXPR_CMDARG))
22259 return keyword_do_block;
22260 return keyword_do;
22261 }
22262 if (IS_lex_state_for(state, (EXPR_BEG | EXPR_LABELED | EXPR_CLASS)))
22263 return kw->id[0];
22264 else {
22265 if (kw->id[0] != kw->id[1])
22266 SET_LEX_STATE(EXPR_BEG | EXPR_LABEL);
22267 return kw->id[1];
22268 }
22269 }
22270 }
22271
22272 if (IS_lex_state(EXPR_BEG_ANY | EXPR_ARG_ANY | EXPR_DOT)) {
22273 if (cmd_state) {
22274 SET_LEX_STATE(EXPR_CMDARG);
22275 }
22276 else {
22277 SET_LEX_STATE(EXPR_ARG);
22278 }
22279 }
22280 else if (p->lex.state == EXPR_FNAME) {
22281 SET_LEX_STATE(EXPR_ENDFN);
22282 }
22283 else {
22284 SET_LEX_STATE(EXPR_END);
22285 }
22286
22287 ident = tokenize_ident(p);
22288 if (result == tCONSTANT && is_local_id(ident)) result = tIDENTIFIER;
22289 if (!IS_lex_state_for(last_state, EXPR_DOT|EXPR_FNAME) &&
22290 (result == tIDENTIFIER) && /* not EXPR_FNAME, not attrasgn */
22291 (lvar_defined(p, ident) || NUMPARAM_ID_P(ident))) {
22292 SET_LEX_STATE(EXPR_END|EXPR_LABEL);
22293 }
22294 return result;
22295}
22296
22297static void
22298warn_cr(struct parser_params *p)
22299{
22300 if (!p->cr_seen) {
22301 p->cr_seen = TRUE;
22302 /* carried over with p->lex.nextline for nextc() */
22303 rb_warn0("encountered \\r in middle of line, treated as a mere space");
22304 }
22305}
22306
22307static enum yytokentype
22308parser_yylex(struct parser_params *p)
22309{
22310 register int c;
22311 int space_seen = 0;
22312 int cmd_state;
22313 int label;
22314 enum lex_state_e last_state;
22315 int fallthru = FALSE;
22316 int token_seen = p->token_seen;
22317
22318 if (p->lex.strterm) {
22319 if (strterm_is_heredoc(p->lex.strterm)) {
22320 token_flush(p);
22321 return here_document(p, &p->lex.strterm->u.heredoc);
22322 }
22323 else {
22324 token_flush(p);
22325 return parse_string(p, &p->lex.strterm->u.literal);
22326 }
22327 }
22328 cmd_state = p->command_start;
22329 p->command_start = FALSE;
22330 p->token_seen = TRUE;
22331#ifndef RIPPER
22332 token_flush(p);
22333#endif
22334 retry:
22335 last_state = p->lex.state;
22336 switch (c = nextc(p)) {
22337 case '\0': /* NUL */
22338 case '\004': /* ^D */
22339 case '\032': /* ^Z */
22340 case -1: /* end of script. */
22341 p->eofp = 1;
22342#ifndef RIPPER
22343 if (p->end_expect_token_locations) {
22344 pop_end_expect_token_locations(p);
22345 RUBY_SET_YYLLOC_OF_DUMMY_END(*p->yylloc);
22346 return tDUMNY_END;
22347 }
22348#endif
22349 /* Set location for end-of-input because dispatch_scan_event is not called. */
22350 RUBY_SET_YYLLOC(*p->yylloc);
22351 return END_OF_INPUT;
22352
22353 /* white spaces */
22354 case '\r':
22355 warn_cr(p);
22356 /* fall through */
22357 case ' ': case '\t': case '\f':
22358 case '\13': /* '\v' */
22359 space_seen = 1;
22360 while ((c = nextc(p))) {
22361 switch (c) {
22362 case '\r':
22363 warn_cr(p);
22364 /* fall through */
22365 case ' ': case '\t': case '\f':
22366 case '\13': /* '\v' */
22367 break;
22368 default:
22369 goto outofloop;
22370 }
22371 }
22372 outofloop:
22373 pushback(p, c);
22374 dispatch_scan_event(p, tSP);
22375#ifndef RIPPER
22376 token_flush(p);
22377#endif
22378 goto retry;
22379
22380 case '#': /* it's a comment */
22381 p->token_seen = token_seen;
22382 const char *const pcur = p->lex.pcur, *const ptok = p->lex.ptok;
22383 /* no magic_comment in shebang line */
22384 if (!parser_magic_comment(p, p->lex.pcur, p->lex.pend - p->lex.pcur)) {
22385 if (comment_at_top(p)) {
22386 set_file_encoding(p, p->lex.pcur, p->lex.pend);
22387 }
22388 }
22389 p->lex.pcur = pcur, p->lex.ptok = ptok;
22390 lex_goto_eol(p);
22391 dispatch_scan_event(p, tCOMMENT);
22392 fallthru = TRUE;
22393 /* fall through */
22394 case '\n':
22395 p->token_seen = token_seen;
22396 rb_parser_string_t *prevline = p->lex.lastline;
22397 c = (IS_lex_state(EXPR_BEG|EXPR_CLASS|EXPR_FNAME|EXPR_DOT) &&
22398 !IS_lex_state(EXPR_LABELED));
22399 if (c || IS_lex_state_all(EXPR_ARG|EXPR_LABELED)) {
22400 if (!fallthru) {
22401 dispatch_scan_event(p, tIGNORED_NL);
22402 }
22403 fallthru = FALSE;
22404 if (!c && p->ctxt.in_kwarg) {
22405 goto normal_newline;
22406 }
22407 goto retry;
22408 }
22409 while (1) {
22410 switch (c = nextc(p)) {
22411 case ' ': case '\t': case '\f': case '\r':
22412 case '\13': /* '\v' */
22413 space_seen = 1;
22414 break;
22415 case '#':
22416 pushback(p, c);
22417 if (space_seen) {
22418 dispatch_scan_event(p, tSP);
22419 token_flush(p);
22420 }
22421 goto retry;
22422 case 'a':
22423 if (peek_word_at(p, "nd", 2, 0)) goto leading_logical;
22424 goto bol;
22425 case 'o':
22426 if (peek_word_at(p, "r", 1, 0)) goto leading_logical;
22427 goto bol;
22428 case '|':
22429 if (peek(p, '|')) goto leading_logical;
22430 goto bol;
22431 case '&':
22432 if (peek(p, '&')) {
22433 leading_logical:
22434 pushback(p, c);
22435 dispatch_delayed_token(p, tIGNORED_NL);
22436 cmd_state = FALSE;
22437 goto retry;
22438 }
22439 /* fall through */
22440 case '.': {
22441 dispatch_delayed_token(p, tIGNORED_NL);
22442 if (peek(p, '.') == (c == '&')) {
22443 pushback(p, c);
22444 dispatch_scan_event(p, tSP);
22445 goto retry;
22446 }
22447 }
22448 bol:
22449 default:
22450 p->ruby_sourceline--;
22451 p->lex.nextline = p->lex.lastline;
22452 set_lastline(p, prevline);
22453 case -1: /* EOF no decrement*/
22454 if (c == -1 && space_seen) {
22455 dispatch_scan_event(p, tSP);
22456 }
22457 lex_goto_eol(p);
22458 if (c != -1) {
22459 token_flush(p);
22460 RUBY_SET_YYLLOC(*p->yylloc);
22461 }
22462 goto normal_newline;
22463 }
22464 }
22465 normal_newline:
22466 p->command_start = TRUE;
22467 SET_LEX_STATE(EXPR_BEG);
22468 return '\n';
22469
22470 case '*':
22471 if ((c = nextc(p)) == '*') {
22472 if ((c = nextc(p)) == '=') {
22473 set_yylval_id(idPow);
22474 SET_LEX_STATE(EXPR_BEG);
22475 return tOP_ASGN;
22476 }
22477 pushback(p, c);
22478 if (IS_SPCARG(c)) {
22479 rb_warning0("'**' interpreted as argument prefix");
22480 c = tDSTAR;
22481 }
22482 else if (IS_BEG()) {
22483 c = tDSTAR;
22484 }
22485 else {
22486 c = warn_balanced((enum ruby_method_ids)tPOW, "**", "argument prefix");
22487 }
22488 }
22489 else {
22490 if (c == '=') {
22491 set_yylval_id('*');
22492 SET_LEX_STATE(EXPR_BEG);
22493 return tOP_ASGN;
22494 }
22495 pushback(p, c);
22496 if (IS_SPCARG(c)) {
22497 rb_warning0("'*' interpreted as argument prefix");
22498 c = tSTAR;
22499 }
22500 else if (IS_BEG()) {
22501 c = tSTAR;
22502 }
22503 else {
22504 c = warn_balanced('*', "*", "argument prefix");
22505 }
22506 }
22507 SET_LEX_STATE(IS_AFTER_OPERATOR() ? EXPR_ARG : EXPR_BEG);
22508 return c;
22509
22510 case '!':
22511 c = nextc(p);
22512 if (IS_AFTER_OPERATOR()) {
22513 SET_LEX_STATE(EXPR_ARG);
22514 if (c == '@') {
22515 return '!';
22516 }
22517 }
22518 else {
22519 SET_LEX_STATE(EXPR_BEG);
22520 }
22521 if (c == '=') {
22522 return tNEQ;
22523 }
22524 if (c == '~') {
22525 return tNMATCH;
22526 }
22527 pushback(p, c);
22528 return '!';
22529
22530 case '=':
22531 if (was_bol(p)) {
22532 /* skip embedded rd document */
22533 if (word_match_p(p, "begin", 5)) {
22534 int first_p = TRUE;
22535
22536 lex_goto_eol(p);
22537 dispatch_scan_event(p, tEMBDOC_BEG);
22538 for (;;) {
22539 lex_goto_eol(p);
22540 if (!first_p) {
22541 dispatch_scan_event(p, tEMBDOC);
22542 }
22543 first_p = FALSE;
22544 c = nextc(p);
22545 if (c == -1) {
22546 compile_error(p, "embedded document meets end of file");
22547 return END_OF_INPUT;
22548 }
22549 if (c == '=' && word_match_p(p, "end", 3)) {
22550 break;
22551 }
22552 pushback(p, c);
22553 }
22554 lex_goto_eol(p);
22555 dispatch_scan_event(p, tEMBDOC_END);
22556 goto retry;
22557 }
22558 }
22559
22560 SET_LEX_STATE(IS_AFTER_OPERATOR() ? EXPR_ARG : EXPR_BEG);
22561 if ((c = nextc(p)) == '=') {
22562 if ((c = nextc(p)) == '=') {
22563 return tEQQ;
22564 }
22565 pushback(p, c);
22566 return tEQ;
22567 }
22568 if (c == '~') {
22569 return tMATCH;
22570 }
22571 else if (c == '>') {
22572 return tASSOC;
22573 }
22574 pushback(p, c);
22575 return '=';
22576
22577 case '<':
22578 c = nextc(p);
22579 if (c == '<' &&
22580 !IS_lex_state(EXPR_DOT | EXPR_CLASS) &&
22581 !IS_END() &&
22582 (!IS_ARG() || IS_lex_state(EXPR_LABELED) || space_seen)) {
22583 enum yytokentype token = heredoc_identifier(p);
22584 if (token) return token < 0 ? 0 : token;
22585 }
22586 if (IS_AFTER_OPERATOR()) {
22587 SET_LEX_STATE(EXPR_ARG);
22588 }
22589 else {
22590 if (IS_lex_state(EXPR_CLASS))
22591 p->command_start = TRUE;
22592 SET_LEX_STATE(EXPR_BEG);
22593 }
22594 if (c == '=') {
22595 if ((c = nextc(p)) == '>') {
22596 return tCMP;
22597 }
22598 pushback(p, c);
22599 return tLEQ;
22600 }
22601 if (c == '<') {
22602 if ((c = nextc(p)) == '=') {
22603 set_yylval_id(idLTLT);
22604 SET_LEX_STATE(EXPR_BEG);
22605 return tOP_ASGN;
22606 }
22607 pushback(p, c);
22608 return warn_balanced((enum ruby_method_ids)tLSHFT, "<<", "here document");
22609 }
22610 pushback(p, c);
22611 return '<';
22612
22613 case '>':
22614 SET_LEX_STATE(IS_AFTER_OPERATOR() ? EXPR_ARG : EXPR_BEG);
22615 if ((c = nextc(p)) == '=') {
22616 return tGEQ;
22617 }
22618 if (c == '>') {
22619 if ((c = nextc(p)) == '=') {
22620 set_yylval_id(idGTGT);
22621 SET_LEX_STATE(EXPR_BEG);
22622 return tOP_ASGN;
22623 }
22624 pushback(p, c);
22625 return tRSHFT;
22626 }
22627 pushback(p, c);
22628 return '>';
22629
22630 case '"':
22631 label = (IS_LABEL_POSSIBLE() ? str_label : 0);
22632 p->lex.strterm = NEW_STRTERM(str_dquote | label, '"', 0);
22633 p->lex.ptok = p->lex.pcur-1;
22634 return tSTRING_BEG;
22635
22636 case '`':
22637 if (IS_lex_state(EXPR_FNAME)) {
22638 SET_LEX_STATE(EXPR_ENDFN);
22639 return c;
22640 }
22641 if (IS_lex_state(EXPR_DOT)) {
22642 if (cmd_state)
22643 SET_LEX_STATE(EXPR_CMDARG);
22644 else
22645 SET_LEX_STATE(EXPR_ARG);
22646 return c;
22647 }
22648 p->lex.strterm = NEW_STRTERM(str_xquote, '`', 0);
22649 return tXSTRING_BEG;
22650
22651 case '\'':
22652 label = (IS_LABEL_POSSIBLE() ? str_label : 0);
22653 p->lex.strterm = NEW_STRTERM(str_squote | label, '\'', 0);
22654 p->lex.ptok = p->lex.pcur-1;
22655 return tSTRING_BEG;
22656
22657 case '?':
22658 return parse_qmark(p, space_seen);
22659
22660 case '&':
22661 if ((c = nextc(p)) == '&') {
22662 SET_LEX_STATE(EXPR_BEG);
22663 if ((c = nextc(p)) == '=') {
22664 set_yylval_id(idANDOP);
22665 SET_LEX_STATE(EXPR_BEG);
22666 return tOP_ASGN;
22667 }
22668 pushback(p, c);
22669 return tANDOP;
22670 }
22671 else if (c == '=') {
22672 set_yylval_id('&');
22673 SET_LEX_STATE(EXPR_BEG);
22674 return tOP_ASGN;
22675 }
22676 else if (c == '.') {
22677 set_yylval_id(idANDDOT);
22678 SET_LEX_STATE(EXPR_DOT);
22679 return tANDDOT;
22680 }
22681 pushback(p, c);
22682 if (IS_SPCARG(c)) {
22683 if ((c != ':') ||
22684 (c = peekc_n(p, 1)) == -1 ||
22685 !(c == '\'' || c == '"' ||
22686 is_identchar(p, (p->lex.pcur+1), p->lex.pend, p->enc))) {
22687 rb_warning0("'&' interpreted as argument prefix");
22688 }
22689 c = tAMPER;
22690 }
22691 else if (IS_BEG()) {
22692 c = tAMPER;
22693 }
22694 else {
22695 c = warn_balanced('&', "&", "argument prefix");
22696 }
22697 SET_LEX_STATE(IS_AFTER_OPERATOR() ? EXPR_ARG : EXPR_BEG);
22698 return c;
22699
22700 case '|':
22701 if ((c = nextc(p)) == '|') {
22702 SET_LEX_STATE(EXPR_BEG);
22703 if ((c = nextc(p)) == '=') {
22704 set_yylval_id(idOROP);
22705 SET_LEX_STATE(EXPR_BEG);
22706 return tOP_ASGN;
22707 }
22708 pushback(p, c);
22709 if (IS_lex_state_for(last_state, EXPR_BEG)) {
22710 c = '|';
22711 pushback(p, '|');
22712 return c;
22713 }
22714 return tOROP;
22715 }
22716 if (c == '=') {
22717 set_yylval_id('|');
22718 SET_LEX_STATE(EXPR_BEG);
22719 return tOP_ASGN;
22720 }
22721 SET_LEX_STATE(IS_AFTER_OPERATOR() ? EXPR_ARG : EXPR_BEG|EXPR_LABEL);
22722 pushback(p, c);
22723 return '|';
22724
22725 case '+':
22726 c = nextc(p);
22727 if (IS_AFTER_OPERATOR()) {
22728 SET_LEX_STATE(EXPR_ARG);
22729 if (c == '@') {
22730 return tUPLUS;
22731 }
22732 pushback(p, c);
22733 return '+';
22734 }
22735 if (c == '=') {
22736 set_yylval_id('+');
22737 SET_LEX_STATE(EXPR_BEG);
22738 return tOP_ASGN;
22739 }
22740 if (IS_BEG() || (IS_SPCARG(c) && arg_ambiguous(p, '+'))) {
22741 SET_LEX_STATE(EXPR_BEG);
22742 pushback(p, c);
22743 if (c != -1 && ISDIGIT(c)) {
22744 return parse_numeric(p, '+');
22745 }
22746 return tUPLUS;
22747 }
22748 SET_LEX_STATE(EXPR_BEG);
22749 pushback(p, c);
22750 return warn_balanced('+', "+", "unary operator");
22751
22752 case '-':
22753 c = nextc(p);
22754 if (IS_AFTER_OPERATOR()) {
22755 SET_LEX_STATE(EXPR_ARG);
22756 if (c == '@') {
22757 return tUMINUS;
22758 }
22759 pushback(p, c);
22760 return '-';
22761 }
22762 if (c == '=') {
22763 set_yylval_id('-');
22764 SET_LEX_STATE(EXPR_BEG);
22765 return tOP_ASGN;
22766 }
22767 if (c == '>') {
22768 SET_LEX_STATE(EXPR_ENDFN);
22769 yylval.num = p->lex.lpar_beg;
22770 p->lex.lpar_beg = p->lex.paren_nest;
22771 return tLAMBDA;
22772 }
22773 if (IS_BEG() || (IS_SPCARG(c) && arg_ambiguous(p, '-'))) {
22774 SET_LEX_STATE(EXPR_BEG);
22775 pushback(p, c);
22776 if (c != -1 && ISDIGIT(c)) {
22777 return tUMINUS_NUM;
22778 }
22779 return tUMINUS;
22780 }
22781 SET_LEX_STATE(EXPR_BEG);
22782 pushback(p, c);
22783 return warn_balanced('-', "-", "unary operator");
22784
22785 case '.': {
22786 int is_beg = IS_BEG();
22787 SET_LEX_STATE(EXPR_BEG);
22788 if ((c = nextc(p)) == '.') {
22789 if ((c = nextc(p)) == '.') {
22790 if (p->ctxt.in_argdef || IS_LABEL_POSSIBLE()) {
22791 SET_LEX_STATE(EXPR_ENDARG);
22792 return tBDOT3;
22793 }
22794 if (p->lex.paren_nest == 0 && looking_at_eol_p(p)) {
22795 rb_warn0("... at EOL, should be parenthesized?");
22796 }
22797 return is_beg ? tBDOT3 : tDOT3;
22798 }
22799 pushback(p, c);
22800 return is_beg ? tBDOT2 : tDOT2;
22801 }
22802 pushback(p, c);
22803 if (c != -1 && ISDIGIT(c)) {
22804 char prev = p->lex.pcur-1 > p->lex.pbeg ? *(p->lex.pcur-2) : 0;
22805 parse_numeric(p, '.');
22806 if (ISDIGIT(prev)) {
22807 yyerror0("unexpected fraction part after numeric literal");
22808 }
22809 else {
22810 yyerror0("no .<digit> floating literal anymore; put 0 before dot");
22811 }
22812 SET_LEX_STATE(EXPR_END);
22813 p->lex.ptok = p->lex.pcur;
22814 goto retry;
22815 }
22816 set_yylval_id('.');
22817 SET_LEX_STATE(EXPR_DOT);
22818 return '.';
22819 }
22820
22821 case '0': case '1': case '2': case '3': case '4':
22822 case '5': case '6': case '7': case '8': case '9':
22823 return parse_numeric(p, c);
22824
22825 case ')':
22826 COND_POP();
22827 CMDARG_POP();
22828 SET_LEX_STATE(EXPR_ENDFN);
22829 p->lex.paren_nest--;
22830 return c;
22831
22832 case ']':
22833 COND_POP();
22834 CMDARG_POP();
22835 SET_LEX_STATE(EXPR_END);
22836 p->lex.paren_nest--;
22837 return c;
22838
22839 case '}':
22840 /* tSTRING_DEND does COND_POP and CMDARG_POP in the yacc's rule */
22841 if (!p->lex.brace_nest--) return tSTRING_DEND;
22842 COND_POP();
22843 CMDARG_POP();
22844 SET_LEX_STATE(EXPR_END);
22845 p->lex.paren_nest--;
22846 return c;
22847
22848 case ':':
22849 c = nextc(p);
22850 if (c == ':') {
22851 if (IS_BEG() || IS_lex_state(EXPR_CLASS) || IS_SPCARG(-1)) {
22852 SET_LEX_STATE(EXPR_BEG);
22853 return tCOLON3;
22854 }
22855 set_yylval_id(idCOLON2);
22856 SET_LEX_STATE(EXPR_DOT);
22857 return tCOLON2;
22858 }
22859 if (IS_END() || ISSPACE(c) || c == '#') {
22860 pushback(p, c);
22861 c = warn_balanced(':', ":", "symbol literal");
22862 SET_LEX_STATE(EXPR_BEG);
22863 return c;
22864 }
22865 switch (c) {
22866 case '\'':
22867 p->lex.strterm = NEW_STRTERM(str_ssym, c, 0);
22868 break;
22869 case '"':
22870 p->lex.strterm = NEW_STRTERM(str_dsym, c, 0);
22871 break;
22872 default:
22873 pushback(p, c);
22874 break;
22875 }
22876 SET_LEX_STATE(EXPR_FNAME);
22877 return tSYMBEG;
22878
22879 case '/':
22880 if (IS_BEG()) {
22881 p->lex.strterm = NEW_STRTERM(str_regexp, '/', 0);
22882 return tREGEXP_BEG;
22883 }
22884 if ((c = nextc(p)) == '=') {
22885 set_yylval_id('/');
22886 SET_LEX_STATE(EXPR_BEG);
22887 return tOP_ASGN;
22888 }
22889 pushback(p, c);
22890 if (IS_SPCARG(c)) {
22891 p->lex.strterm = NEW_STRTERM(str_regexp, '/', 0);
22892 return tREGEXP_BEG;
22893 }
22894 SET_LEX_STATE(IS_AFTER_OPERATOR() ? EXPR_ARG : EXPR_BEG);
22895 return warn_balanced('/', "/", "regexp literal");
22896
22897 case '^':
22898 if ((c = nextc(p)) == '=') {
22899 set_yylval_id('^');
22900 SET_LEX_STATE(EXPR_BEG);
22901 return tOP_ASGN;
22902 }
22903 SET_LEX_STATE(IS_AFTER_OPERATOR() ? EXPR_ARG : EXPR_BEG);
22904 pushback(p, c);
22905 return '^';
22906
22907 case ';':
22908 SET_LEX_STATE(EXPR_BEG);
22909 p->command_start = TRUE;
22910 return ';';
22911
22912 case ',':
22913 SET_LEX_STATE(EXPR_BEG|EXPR_LABEL);
22914 return ',';
22915
22916 case '~':
22917 if (IS_AFTER_OPERATOR()) {
22918 if ((c = nextc(p)) != '@') {
22919 pushback(p, c);
22920 }
22921 SET_LEX_STATE(EXPR_ARG);
22922 }
22923 else {
22924 SET_LEX_STATE(EXPR_BEG);
22925 }
22926 return '~';
22927
22928 case '(':
22929 if (IS_BEG()) {
22930 c = tLPAREN;
22931 }
22932 else if (!space_seen) {
22933 /* foo( ... ) => method call, no ambiguity */
22934 }
22935 else if (IS_ARG() || IS_lex_state_all(EXPR_END|EXPR_LABEL)) {
22936 c = tLPAREN_ARG;
22937 }
22938 else if (IS_lex_state(EXPR_ENDFN) && !lambda_beginning_p()) {
22939 rb_warning0("parentheses after method name is interpreted as "
22940 "an argument list, not a decomposed argument");
22941 }
22942 p->lex.paren_nest++;
22943 COND_PUSH(0);
22944 CMDARG_PUSH(0);
22945 SET_LEX_STATE(EXPR_BEG|EXPR_LABEL);
22946 return c;
22947
22948 case '[':
22949 p->lex.paren_nest++;
22950 if (IS_AFTER_OPERATOR()) {
22951 if ((c = nextc(p)) == ']') {
22952 p->lex.paren_nest--;
22953 SET_LEX_STATE(EXPR_ARG);
22954 if ((c = nextc(p)) == '=') {
22955 return tASET;
22956 }
22957 pushback(p, c);
22958 return tAREF;
22959 }
22960 pushback(p, c);
22961 SET_LEX_STATE(EXPR_ARG|EXPR_LABEL);
22962 return '[';
22963 }
22964 else if (IS_BEG()) {
22965 c = tLBRACK;
22966 }
22967 else if (IS_ARG() && (space_seen || IS_lex_state(EXPR_LABELED))) {
22968 c = tLBRACK;
22969 }
22970 SET_LEX_STATE(EXPR_BEG|EXPR_LABEL);
22971 COND_PUSH(0);
22972 CMDARG_PUSH(0);
22973 return c;
22974
22975 case '{':
22976 ++p->lex.brace_nest;
22977 if (lambda_beginning_p())
22978 c = tLAMBEG;
22979 else if (IS_lex_state(EXPR_LABELED))
22980 c = tLBRACE; /* hash */
22981 else if (IS_lex_state(EXPR_ARG_ANY | EXPR_END | EXPR_ENDFN))
22982 c = '{'; /* block (primary) */
22983 else if (IS_lex_state(EXPR_ENDARG))
22984 c = tLBRACE_ARG; /* block (expr) */
22985 else
22986 c = tLBRACE; /* hash */
22987 if (c != tLBRACE) {
22988 p->command_start = TRUE;
22989 SET_LEX_STATE(EXPR_BEG);
22990 }
22991 else {
22992 SET_LEX_STATE(EXPR_BEG|EXPR_LABEL);
22993 }
22994 ++p->lex.paren_nest; /* after lambda_beginning_p() */
22995 COND_PUSH(0);
22996 CMDARG_PUSH(0);
22997 return c;
22998
22999 case '\\':
23000 c = nextc(p);
23001 if (c == '\n') {
23002 space_seen = 1;
23003 dispatch_scan_event(p, tSP);
23004 goto retry; /* skip \\n */
23005 }
23006 if (c == ' ') return tSP;
23007 if (ISSPACE(c)) return c;
23008 pushback(p, c);
23009 return '\\';
23010
23011 case '%':
23012 return parse_percent(p, space_seen, last_state);
23013
23014 case '$':
23015 return parse_gvar(p, last_state);
23016
23017 case '@':
23018 return parse_atmark(p, last_state);
23019
23020 case '_':
23021 if (was_bol(p) && whole_match_p(p, "__END__", 7, 0)) {
23022 p->ruby__end__seen = 1;
23023 p->eofp = 1;
23024#ifdef RIPPER
23025 lex_goto_eol(p);
23026 dispatch_scan_event(p, k__END__);
23027#endif
23028 return END_OF_INPUT;
23029 }
23030 newtok(p);
23031 break;
23032
23033 default:
23034 if (!parser_is_identchar(p)) {
23035 compile_error(p, "Invalid char '\\x%02X' in expression", c);
23036 token_flush(p);
23037 goto retry;
23038 }
23039
23040 newtok(p);
23041 break;
23042 }
23043
23044 return parse_ident(p, c, cmd_state);
23045}
23046
23047static enum yytokentype
23048yylex(YYSTYPE *lval, YYLTYPE *yylloc, struct parser_params *p)
23049{
23050 enum yytokentype t;
23051
23052 p->lval = lval;
23053 lval->node = 0;
23054 p->yylloc = yylloc;
23055
23056 t = parser_yylex(p);
23057
23058 if (has_delayed_token(p))
23059 dispatch_delayed_token(p, t);
23060 else if (t != END_OF_INPUT)
23061 dispatch_scan_event(p, t);
23062
23063 return t;
23064}
23065
23066#define LVAR_USED ((ID)1 << (sizeof(ID) * CHAR_BIT - 1))
23067
23068static NODE*
23069node_new_internal(struct parser_params *p, enum node_type type, size_t size, size_t alignment)
23070{
23071 NODE *n = rb_ast_newnode(p->ast, type, size, alignment);
23072
23073 rb_node_init(n, type);
23074 return n;
23075}
23076
23077static NODE *
23078nd_set_loc(NODE *nd, const YYLTYPE *loc)
23079{
23080 nd->nd_loc = *loc;
23081 nd_set_line(nd, loc->beg_pos.lineno);
23082 return nd;
23083}
23084
23085static NODE*
23086node_newnode(struct parser_params *p, enum node_type type, size_t size, size_t alignment, const rb_code_location_t *loc)
23087{
23088 NODE *n = node_new_internal(p, type, size, alignment);
23089
23090 nd_set_loc(n, loc);
23091 nd_set_node_id(n, parser_get_node_id(p));
23092 return n;
23093}
23094
23095#define NODE_NEWNODE(node_type, type, loc) (type *)(node_newnode(p, node_type, sizeof(type), RUBY_ALIGNOF(type), loc))
23096
23097static rb_node_scope_t *
23098rb_node_scope_new(struct parser_params *p, rb_node_args_t *nd_args, NODE *nd_body, NODE *nd_parent, const YYLTYPE *loc)
23099{
23100 rb_ast_id_table_t *nd_tbl;
23101 nd_tbl = local_tbl(p);
23102 rb_node_scope_t *n = NODE_NEWNODE(NODE_SCOPE, rb_node_scope_t, loc);
23103 n->nd_tbl = nd_tbl;
23104 n->nd_body = nd_body;
23105 n->nd_parent = nd_parent;
23106 n->nd_args = nd_args;
23107
23108 return n;
23109}
23110
23111static rb_node_scope_t *
23112rb_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)
23113{
23114 rb_node_scope_t *n = NODE_NEWNODE(NODE_SCOPE, rb_node_scope_t, loc);
23115 n->nd_tbl = nd_tbl;
23116 n->nd_body = nd_body;
23117 n->nd_parent = nd_parent;
23118 n->nd_args = nd_args;
23119
23120 return n;
23121}
23122
23123static rb_node_defn_t *
23124rb_node_defn_new(struct parser_params *p, ID nd_mid, NODE *nd_defn, const YYLTYPE *loc)
23125{
23126 rb_node_defn_t *n = NODE_NEWNODE(NODE_DEFN, rb_node_defn_t, loc);
23127 n->nd_mid = nd_mid;
23128 n->nd_defn = nd_defn;
23129
23130 return n;
23131}
23132
23133static rb_node_defs_t *
23134rb_node_defs_new(struct parser_params *p, NODE *nd_recv, ID nd_mid, NODE *nd_defn, const YYLTYPE *loc)
23135{
23136 rb_node_defs_t *n = NODE_NEWNODE(NODE_DEFS, rb_node_defs_t, loc);
23137 n->nd_recv = nd_recv;
23138 n->nd_mid = nd_mid;
23139 n->nd_defn = nd_defn;
23140
23141 return n;
23142}
23143
23144static rb_node_block_t *
23145rb_node_block_new(struct parser_params *p, NODE *nd_head, const YYLTYPE *loc)
23146{
23147 rb_node_block_t *n = NODE_NEWNODE(NODE_BLOCK, rb_node_block_t, loc);
23148 n->nd_head = nd_head;
23149 n->nd_end = (NODE *)n;
23150 n->nd_next = 0;
23151
23152 return n;
23153}
23154
23155static rb_node_for_t *
23156rb_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)
23157{
23158 rb_node_for_t *n = NODE_NEWNODE(NODE_FOR, rb_node_for_t, loc);
23159 n->nd_body = nd_body;
23160 n->nd_iter = nd_iter;
23161 n->for_keyword_loc = *for_keyword_loc;
23162 n->in_keyword_loc = *in_keyword_loc;
23163 n->do_keyword_loc = *do_keyword_loc;
23164 n->end_keyword_loc = *end_keyword_loc;
23165
23166 return n;
23167}
23168
23169static rb_node_for_masgn_t *
23170rb_node_for_masgn_new(struct parser_params *p, NODE *nd_var, const YYLTYPE *loc)
23171{
23172 rb_node_for_masgn_t *n = NODE_NEWNODE(NODE_FOR_MASGN, rb_node_for_masgn_t, loc);
23173 n->nd_var = nd_var;
23174
23175 return n;
23176}
23177
23178static rb_node_retry_t *
23179rb_node_retry_new(struct parser_params *p, const YYLTYPE *loc)
23180{
23181 rb_node_retry_t *n = NODE_NEWNODE(NODE_RETRY, rb_node_retry_t, loc);
23182
23183 return n;
23184}
23185
23186static rb_node_begin_t *
23187rb_node_begin_new(struct parser_params *p, NODE *nd_body, const YYLTYPE *loc)
23188{
23189 rb_node_begin_t *n = NODE_NEWNODE(NODE_BEGIN, rb_node_begin_t, loc);
23190 n->nd_body = nd_body;
23191
23192 return n;
23193}
23194
23195static rb_node_rescue_t *
23196rb_node_rescue_new(struct parser_params *p, NODE *nd_head, NODE *nd_resq, NODE *nd_else, const YYLTYPE *loc)
23197{
23198 rb_node_rescue_t *n = NODE_NEWNODE(NODE_RESCUE, rb_node_rescue_t, loc);
23199 n->nd_head = nd_head;
23200 n->nd_resq = nd_resq;
23201 n->nd_else = nd_else;
23202
23203 return n;
23204}
23205
23206static rb_node_resbody_t *
23207rb_node_resbody_new(struct parser_params *p, NODE *nd_args, NODE *nd_exc_var, NODE *nd_body, NODE *nd_next, const YYLTYPE *loc)
23208{
23209 rb_node_resbody_t *n = NODE_NEWNODE(NODE_RESBODY, rb_node_resbody_t, loc);
23210 n->nd_args = nd_args;
23211 n->nd_exc_var = nd_exc_var;
23212 n->nd_body = nd_body;
23213 n->nd_next = nd_next;
23214
23215 return n;
23216}
23217
23218static rb_node_ensure_t *
23219rb_node_ensure_new(struct parser_params *p, NODE *nd_head, NODE *nd_ensr, const YYLTYPE *loc)
23220{
23221 rb_node_ensure_t *n = NODE_NEWNODE(NODE_ENSURE, rb_node_ensure_t, loc);
23222 n->nd_head = nd_head;
23223 n->nd_ensr = nd_ensr;
23224
23225 return n;
23226}
23227
23228static rb_node_and_t *
23229rb_node_and_new(struct parser_params *p, NODE *nd_1st, NODE *nd_2nd, const YYLTYPE *loc, const YYLTYPE *operator_loc)
23230{
23231 rb_node_and_t *n = NODE_NEWNODE(NODE_AND, rb_node_and_t, loc);
23232 n->nd_1st = nd_1st;
23233 n->nd_2nd = nd_2nd;
23234 n->operator_loc = *operator_loc;
23235
23236 return n;
23237}
23238
23239static rb_node_or_t *
23240rb_node_or_new(struct parser_params *p, NODE *nd_1st, NODE *nd_2nd, const YYLTYPE *loc, const YYLTYPE *operator_loc)
23241{
23242 rb_node_or_t *n = NODE_NEWNODE(NODE_OR, rb_node_or_t, loc);
23243 n->nd_1st = nd_1st;
23244 n->nd_2nd = nd_2nd;
23245 n->operator_loc = *operator_loc;
23246
23247 return n;
23248}
23249
23250static rb_node_return_t *
23251rb_node_return_new(struct parser_params *p, NODE *nd_stts, const YYLTYPE *loc, const YYLTYPE *keyword_loc)
23252{
23253 rb_node_return_t *n = NODE_NEWNODE(NODE_RETURN, rb_node_return_t, loc);
23254 n->nd_stts = nd_stts;
23255 n->keyword_loc = *keyword_loc;
23256 return n;
23257}
23258
23259static rb_node_yield_t *
23260rb_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)
23261{
23262 if (nd_head) no_blockarg(p, nd_head);
23263
23264 rb_node_yield_t *n = NODE_NEWNODE(NODE_YIELD, rb_node_yield_t, loc);
23265 n->nd_head = nd_head;
23266 n->keyword_loc = *keyword_loc;
23267 n->lparen_loc = *lparen_loc;
23268 n->rparen_loc = *rparen_loc;
23269
23270 return n;
23271}
23272
23273static rb_node_if_t *
23274rb_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)
23275{
23276 rb_node_if_t *n = NODE_NEWNODE(NODE_IF, rb_node_if_t, loc);
23277 n->nd_cond = nd_cond;
23278 n->nd_body = nd_body;
23279 n->nd_else = nd_else;
23280 n->if_keyword_loc = *if_keyword_loc;
23281 n->then_keyword_loc = *then_keyword_loc;
23282 n->end_keyword_loc = *end_keyword_loc;
23283
23284 return n;
23285}
23286
23287static rb_node_unless_t *
23288rb_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)
23289{
23290 rb_node_unless_t *n = NODE_NEWNODE(NODE_UNLESS, rb_node_unless_t, loc);
23291 n->nd_cond = nd_cond;
23292 n->nd_body = nd_body;
23293 n->nd_else = nd_else;
23294 n->keyword_loc = *keyword_loc;
23295 n->then_keyword_loc = *then_keyword_loc;
23296 n->end_keyword_loc = *end_keyword_loc;
23297
23298 return n;
23299}
23300
23301static rb_node_class_t *
23302rb_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)
23303{
23304 /* Keep the order of node creation */
23305 NODE *scope = NEW_SCOPE(0, nd_body, NULL, loc);
23306 rb_node_class_t *n = NODE_NEWNODE(NODE_CLASS, rb_node_class_t, loc);
23307 RNODE_SCOPE(scope)->nd_parent = &n->node;
23308 n->nd_cpath = nd_cpath;
23309 n->nd_body = scope;
23310 n->nd_super = nd_super;
23311 n->class_keyword_loc = *class_keyword_loc;
23312 n->inheritance_operator_loc = *inheritance_operator_loc;
23313 n->end_keyword_loc = *end_keyword_loc;
23314
23315 return n;
23316}
23317
23318static rb_node_sclass_t *
23319rb_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)
23320{
23321 /* Keep the order of node creation */
23322 NODE *scope = NEW_SCOPE(0, nd_body, NULL, loc);
23323 rb_node_sclass_t *n = NODE_NEWNODE(NODE_SCLASS, rb_node_sclass_t, loc);
23324 RNODE_SCOPE(scope)->nd_parent = &n->node;
23325 n->nd_recv = nd_recv;
23326 n->nd_body = scope;
23327 n->class_keyword_loc = *class_keyword_loc;
23328 n->operator_loc = *operator_loc;
23329 n->end_keyword_loc = *end_keyword_loc;
23330
23331 return n;
23332}
23333
23334static rb_node_module_t *
23335rb_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)
23336{
23337 /* Keep the order of node creation */
23338 NODE *scope = NEW_SCOPE(0, nd_body, NULL, loc);
23339 rb_node_module_t *n = NODE_NEWNODE(NODE_MODULE, rb_node_module_t, loc);
23340 RNODE_SCOPE(scope)->nd_parent = &n->node;
23341 n->nd_cpath = nd_cpath;
23342 n->nd_body = scope;
23343 n->module_keyword_loc = *module_keyword_loc;
23344 n->end_keyword_loc = *end_keyword_loc;
23345
23346 return n;
23347}
23348
23349static rb_node_iter_t *
23350rb_node_iter_new(struct parser_params *p, rb_node_args_t *nd_args, NODE *nd_body, const YYLTYPE *loc)
23351{
23352 /* Keep the order of node creation */
23353 NODE *scope = NEW_SCOPE(nd_args, nd_body, NULL, loc);
23354 rb_node_iter_t *n = NODE_NEWNODE(NODE_ITER, rb_node_iter_t, loc);
23355 RNODE_SCOPE(scope)->nd_parent = &n->node;
23356 n->nd_body = scope;
23357 n->nd_iter = 0;
23358
23359 return n;
23360}
23361
23362static rb_node_lambda_t *
23363rb_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)
23364{
23365 /* Keep the order of node creation */
23366 NODE *scope = NEW_SCOPE(nd_args, nd_body, NULL, loc);
23367 YYLTYPE lambda_loc = code_loc_gen(operator_loc, closing_loc);
23368 rb_node_lambda_t *n = NODE_NEWNODE(NODE_LAMBDA, rb_node_lambda_t, &lambda_loc);
23369 RNODE_SCOPE(scope)->nd_parent = &n->node;
23370 n->nd_body = scope;
23371 n->operator_loc = *operator_loc;
23372 n->opening_loc = *opening_loc;
23373 n->closing_loc = *closing_loc;
23374
23375 return n;
23376}
23377
23378static rb_node_case_t *
23379rb_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)
23380{
23381 rb_node_case_t *n = NODE_NEWNODE(NODE_CASE, rb_node_case_t, loc);
23382 n->nd_head = nd_head;
23383 n->nd_body = nd_body;
23384 n->case_keyword_loc = *case_keyword_loc;
23385 n->end_keyword_loc = *end_keyword_loc;
23386
23387 return n;
23388}
23389
23390static rb_node_case2_t *
23391rb_node_case2_new(struct parser_params *p, NODE *nd_body, const YYLTYPE *loc, const YYLTYPE *case_keyword_loc, const YYLTYPE *end_keyword_loc)
23392{
23393 rb_node_case2_t *n = NODE_NEWNODE(NODE_CASE2, rb_node_case2_t, loc);
23394 n->nd_head = 0;
23395 n->nd_body = nd_body;
23396 n->case_keyword_loc = *case_keyword_loc;
23397 n->end_keyword_loc = *end_keyword_loc;
23398
23399 return n;
23400}
23401
23402static rb_node_case3_t *
23403rb_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)
23404{
23405 rb_node_case3_t *n = NODE_NEWNODE(NODE_CASE3, rb_node_case3_t, loc);
23406 n->nd_head = nd_head;
23407 n->nd_body = nd_body;
23408 n->case_keyword_loc = *case_keyword_loc;
23409 n->end_keyword_loc = *end_keyword_loc;
23410
23411 return n;
23412}
23413
23414static rb_node_when_t *
23415rb_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)
23416{
23417 rb_node_when_t *n = NODE_NEWNODE(NODE_WHEN, rb_node_when_t, loc);
23418 n->nd_head = nd_head;
23419 n->nd_body = nd_body;
23420 n->nd_next = nd_next;
23421 n->keyword_loc = *keyword_loc;
23422 n->then_keyword_loc = *then_keyword_loc;
23423
23424 return n;
23425}
23426
23427static rb_node_in_t *
23428rb_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)
23429{
23430 rb_node_in_t *n = NODE_NEWNODE(NODE_IN, rb_node_in_t, loc);
23431 n->nd_head = nd_head;
23432 n->nd_body = nd_body;
23433 n->nd_next = nd_next;
23434 n->in_keyword_loc = *in_keyword_loc;
23435 n->then_keyword_loc = *then_keyword_loc;
23436 n->operator_loc = *operator_loc;
23437
23438 return n;
23439}
23440
23441static rb_node_while_t *
23442rb_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)
23443{
23444 rb_node_while_t *n = NODE_NEWNODE(NODE_WHILE, rb_node_while_t, loc);
23445 n->nd_cond = nd_cond;
23446 n->nd_body = nd_body;
23447 n->nd_state = nd_state;
23448 n->keyword_loc = *keyword_loc;
23449 n->closing_loc = *closing_loc;
23450
23451 return n;
23452}
23453
23454static rb_node_until_t *
23455rb_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)
23456{
23457 rb_node_until_t *n = NODE_NEWNODE(NODE_UNTIL, rb_node_until_t, loc);
23458 n->nd_cond = nd_cond;
23459 n->nd_body = nd_body;
23460 n->nd_state = nd_state;
23461 n->keyword_loc = *keyword_loc;
23462 n->closing_loc = *closing_loc;
23463
23464 return n;
23465}
23466
23467static rb_node_colon2_t *
23468rb_node_colon2_new(struct parser_params *p, NODE *nd_head, ID nd_mid, const YYLTYPE *loc, const YYLTYPE *delimiter_loc, const YYLTYPE *name_loc)
23469{
23470 rb_node_colon2_t *n = NODE_NEWNODE(NODE_COLON2, rb_node_colon2_t, loc);
23471 n->nd_head = nd_head;
23472 n->nd_mid = nd_mid;
23473 n->delimiter_loc = *delimiter_loc;
23474 n->name_loc = *name_loc;
23475
23476 return n;
23477}
23478
23479static rb_node_colon3_t *
23480rb_node_colon3_new(struct parser_params *p, ID nd_mid, const YYLTYPE *loc, const YYLTYPE *delimiter_loc, const YYLTYPE *name_loc)
23481{
23482 rb_node_colon3_t *n = NODE_NEWNODE(NODE_COLON3, rb_node_colon3_t, loc);
23483 n->nd_mid = nd_mid;
23484 n->delimiter_loc = *delimiter_loc;
23485 n->name_loc = *name_loc;
23486
23487 return n;
23488}
23489
23490static rb_node_dot2_t *
23491rb_node_dot2_new(struct parser_params *p, NODE *nd_beg, NODE *nd_end, const YYLTYPE *loc, const YYLTYPE *operator_loc)
23492{
23493 rb_node_dot2_t *n = NODE_NEWNODE(NODE_DOT2, rb_node_dot2_t, loc);
23494 n->nd_beg = nd_beg;
23495 n->nd_end = nd_end;
23496 n->operator_loc = *operator_loc;
23497
23498 return n;
23499}
23500
23501static rb_node_dot3_t *
23502rb_node_dot3_new(struct parser_params *p, NODE *nd_beg, NODE *nd_end, const YYLTYPE *loc, const YYLTYPE *operator_loc)
23503{
23504 rb_node_dot3_t *n = NODE_NEWNODE(NODE_DOT3, rb_node_dot3_t, loc);
23505 n->nd_beg = nd_beg;
23506 n->nd_end = nd_end;
23507 n->operator_loc = *operator_loc;
23508
23509 return n;
23510}
23511
23512static rb_node_self_t *
23513rb_node_self_new(struct parser_params *p, const YYLTYPE *loc)
23514{
23515 rb_node_self_t *n = NODE_NEWNODE(NODE_SELF, rb_node_self_t, loc);
23516 n->nd_state = 1;
23517
23518 return n;
23519}
23520
23521static rb_node_nil_t *
23522rb_node_nil_new(struct parser_params *p, const YYLTYPE *loc)
23523{
23524 rb_node_nil_t *n = NODE_NEWNODE(NODE_NIL, rb_node_nil_t, loc);
23525
23526 return n;
23527}
23528
23529static rb_node_true_t *
23530rb_node_true_new(struct parser_params *p, const YYLTYPE *loc)
23531{
23532 rb_node_true_t *n = NODE_NEWNODE(NODE_TRUE, rb_node_true_t, loc);
23533
23534 return n;
23535}
23536
23537static rb_node_false_t *
23538rb_node_false_new(struct parser_params *p, const YYLTYPE *loc)
23539{
23540 rb_node_false_t *n = NODE_NEWNODE(NODE_FALSE, rb_node_false_t, loc);
23541
23542 return n;
23543}
23544
23545static rb_node_super_t *
23546rb_node_super_new(struct parser_params *p, NODE *nd_args, const YYLTYPE *loc,
23547 const YYLTYPE *keyword_loc, const YYLTYPE *lparen_loc, const YYLTYPE *rparen_loc)
23548{
23549 rb_node_super_t *n = NODE_NEWNODE(NODE_SUPER, rb_node_super_t, loc);
23550 n->nd_args = nd_args;
23551 n->keyword_loc = *keyword_loc;
23552 n->lparen_loc = *lparen_loc;
23553 n->rparen_loc = *rparen_loc;
23554
23555 return n;
23556}
23557
23558static rb_node_zsuper_t *
23559rb_node_zsuper_new(struct parser_params *p, const YYLTYPE *loc)
23560{
23561 rb_node_zsuper_t *n = NODE_NEWNODE(NODE_ZSUPER, rb_node_zsuper_t, loc);
23562
23563 return n;
23564}
23565
23566static rb_node_match2_t *
23567rb_node_match2_new(struct parser_params *p, NODE *nd_recv, NODE *nd_value, const YYLTYPE *loc)
23568{
23569 rb_node_match2_t *n = NODE_NEWNODE(NODE_MATCH2, rb_node_match2_t, loc);
23570 n->nd_recv = nd_recv;
23571 n->nd_value = nd_value;
23572 n->nd_args = 0;
23573
23574 return n;
23575}
23576
23577static rb_node_match3_t *
23578rb_node_match3_new(struct parser_params *p, NODE *nd_recv, NODE *nd_value, const YYLTYPE *loc)
23579{
23580 rb_node_match3_t *n = NODE_NEWNODE(NODE_MATCH3, rb_node_match3_t, loc);
23581 n->nd_recv = nd_recv;
23582 n->nd_value = nd_value;
23583
23584 return n;
23585}
23586
23587static rb_node_list_t *
23588rb_node_list_new(struct parser_params *p, NODE *nd_head, const YYLTYPE *loc)
23589{
23590 return rb_node_list_new2(p, nd_head, 1, 0, loc);
23591}
23592
23593static rb_node_list_t *
23594rb_node_list_new2(struct parser_params *p, NODE *nd_head, long nd_alen, NODE *nd_next, const YYLTYPE *loc)
23595{
23596 rb_node_list_t *n = NODE_NEWNODE(NODE_LIST, rb_node_list_t, loc);
23597 n->nd_head = nd_head;
23598 n->as.nd_alen = nd_alen;
23599 n->nd_next = nd_next;
23600
23601 return n;
23602}
23603
23604static rb_node_zlist_t *
23605rb_node_zlist_new(struct parser_params *p, const YYLTYPE *loc)
23606{
23607 rb_node_zlist_t *n = NODE_NEWNODE(NODE_ZLIST, rb_node_zlist_t, loc);
23608
23609 return n;
23610}
23611
23612static rb_node_hash_t *
23613rb_node_hash_new(struct parser_params *p, NODE *nd_head, const YYLTYPE *loc)
23614{
23615 rb_node_hash_t *n = NODE_NEWNODE(NODE_HASH, rb_node_hash_t, loc);
23616 n->nd_head = nd_head;
23617 n->nd_brace = 0;
23618
23619 return n;
23620}
23621
23622static rb_node_masgn_t *
23623rb_node_masgn_new(struct parser_params *p, NODE *nd_head, NODE *nd_args, const YYLTYPE *loc)
23624{
23625 rb_node_masgn_t *n = NODE_NEWNODE(NODE_MASGN, rb_node_masgn_t, loc);
23626 n->nd_head = nd_head;
23627 n->nd_value = 0;
23628 n->nd_args = nd_args;
23629
23630 return n;
23631}
23632
23633static rb_node_gasgn_t *
23634rb_node_gasgn_new(struct parser_params *p, ID nd_vid, NODE *nd_value, const YYLTYPE *loc)
23635{
23636 rb_node_gasgn_t *n = NODE_NEWNODE(NODE_GASGN, rb_node_gasgn_t, loc);
23637 n->nd_vid = nd_vid;
23638 n->nd_value = nd_value;
23639
23640 return n;
23641}
23642
23643static rb_node_lasgn_t *
23644rb_node_lasgn_new(struct parser_params *p, ID nd_vid, NODE *nd_value, const YYLTYPE *loc)
23645{
23646 rb_node_lasgn_t *n = NODE_NEWNODE(NODE_LASGN, rb_node_lasgn_t, loc);
23647 n->nd_vid = nd_vid;
23648 n->nd_value = nd_value;
23649
23650 return n;
23651}
23652
23653static rb_node_dasgn_t *
23654rb_node_dasgn_new(struct parser_params *p, ID nd_vid, NODE *nd_value, const YYLTYPE *loc)
23655{
23656 rb_node_dasgn_t *n = NODE_NEWNODE(NODE_DASGN, rb_node_dasgn_t, loc);
23657 n->nd_vid = nd_vid;
23658 n->nd_value = nd_value;
23659
23660 return n;
23661}
23662
23663static rb_node_iasgn_t *
23664rb_node_iasgn_new(struct parser_params *p, ID nd_vid, NODE *nd_value, const YYLTYPE *loc)
23665{
23666 rb_node_iasgn_t *n = NODE_NEWNODE(NODE_IASGN, rb_node_iasgn_t, loc);
23667 n->nd_vid = nd_vid;
23668 n->nd_value = nd_value;
23669
23670 return n;
23671}
23672
23673static rb_node_cvasgn_t *
23674rb_node_cvasgn_new(struct parser_params *p, ID nd_vid, NODE *nd_value, const YYLTYPE *loc)
23675{
23676 rb_node_cvasgn_t *n = NODE_NEWNODE(NODE_CVASGN, rb_node_cvasgn_t, loc);
23677 n->nd_vid = nd_vid;
23678 n->nd_value = nd_value;
23679
23680 return n;
23681}
23682
23683static rb_node_op_asgn1_t *
23684rb_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)
23685{
23686 rb_node_op_asgn1_t *n = NODE_NEWNODE(NODE_OP_ASGN1, rb_node_op_asgn1_t, loc);
23687 n->nd_recv = nd_recv;
23688 n->nd_mid = nd_mid;
23689 n->nd_index = index;
23690 n->nd_rvalue = rvalue;
23691 n->call_operator_loc = *call_operator_loc;
23692 n->opening_loc = *opening_loc;
23693 n->closing_loc = *closing_loc;
23694 n->binary_operator_loc = *binary_operator_loc;
23695
23696 return n;
23697}
23698
23699static rb_node_op_asgn2_t *
23700rb_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)
23701{
23702 rb_node_op_asgn2_t *n = NODE_NEWNODE(NODE_OP_ASGN2, rb_node_op_asgn2_t, loc);
23703 n->nd_recv = nd_recv;
23704 n->nd_value = nd_value;
23705 n->nd_vid = nd_vid;
23706 n->nd_mid = nd_mid;
23707 n->nd_aid = nd_aid;
23708 n->call_operator_loc = *call_operator_loc;
23709 n->message_loc = *message_loc;
23710 n->binary_operator_loc = *binary_operator_loc;
23711
23712 return n;
23713}
23714
23715static rb_node_op_asgn_or_t *
23716rb_node_op_asgn_or_new(struct parser_params *p, NODE *nd_head, NODE *nd_value, const YYLTYPE *loc)
23717{
23718 rb_node_op_asgn_or_t *n = NODE_NEWNODE(NODE_OP_ASGN_OR, rb_node_op_asgn_or_t, loc);
23719 n->nd_head = nd_head;
23720 n->nd_value = nd_value;
23721
23722 return n;
23723}
23724
23725static rb_node_op_asgn_and_t *
23726rb_node_op_asgn_and_new(struct parser_params *p, NODE *nd_head, NODE *nd_value, const YYLTYPE *loc)
23727{
23728 rb_node_op_asgn_and_t *n = NODE_NEWNODE(NODE_OP_ASGN_AND, rb_node_op_asgn_and_t, loc);
23729 n->nd_head = nd_head;
23730 n->nd_value = nd_value;
23731
23732 return n;
23733}
23734
23735static rb_node_gvar_t *
23736rb_node_gvar_new(struct parser_params *p, ID nd_vid, const YYLTYPE *loc)
23737{
23738 rb_node_gvar_t *n = NODE_NEWNODE(NODE_GVAR, rb_node_gvar_t, loc);
23739 n->nd_vid = nd_vid;
23740
23741 return n;
23742}
23743
23744static rb_node_lvar_t *
23745rb_node_lvar_new(struct parser_params *p, ID nd_vid, const YYLTYPE *loc)
23746{
23747 rb_node_lvar_t *n = NODE_NEWNODE(NODE_LVAR, rb_node_lvar_t, loc);
23748 n->nd_vid = nd_vid;
23749
23750 return n;
23751}
23752
23753static rb_node_dvar_t *
23754rb_node_dvar_new(struct parser_params *p, ID nd_vid, const YYLTYPE *loc)
23755{
23756 rb_node_dvar_t *n = NODE_NEWNODE(NODE_DVAR, rb_node_dvar_t, loc);
23757 n->nd_vid = nd_vid;
23758
23759 return n;
23760}
23761
23762static rb_node_ivar_t *
23763rb_node_ivar_new(struct parser_params *p, ID nd_vid, const YYLTYPE *loc)
23764{
23765 rb_node_ivar_t *n = NODE_NEWNODE(NODE_IVAR, rb_node_ivar_t, loc);
23766 n->nd_vid = nd_vid;
23767
23768 return n;
23769}
23770
23771static rb_node_const_t *
23772rb_node_const_new(struct parser_params *p, ID nd_vid, const YYLTYPE *loc)
23773{
23774 rb_node_const_t *n = NODE_NEWNODE(NODE_CONST, rb_node_const_t, loc);
23775 n->nd_vid = nd_vid;
23776
23777 return n;
23778}
23779
23780static rb_node_cvar_t *
23781rb_node_cvar_new(struct parser_params *p, ID nd_vid, const YYLTYPE *loc)
23782{
23783 rb_node_cvar_t *n = NODE_NEWNODE(NODE_CVAR, rb_node_cvar_t, loc);
23784 n->nd_vid = nd_vid;
23785
23786 return n;
23787}
23788
23789static rb_node_nth_ref_t *
23790rb_node_nth_ref_new(struct parser_params *p, long nd_nth, const YYLTYPE *loc)
23791{
23792 rb_node_nth_ref_t *n = NODE_NEWNODE(NODE_NTH_REF, rb_node_nth_ref_t, loc);
23793 n->nd_nth = nd_nth;
23794
23795 return n;
23796}
23797
23798static rb_node_back_ref_t *
23799rb_node_back_ref_new(struct parser_params *p, long nd_nth, const YYLTYPE *loc)
23800{
23801 rb_node_back_ref_t *n = NODE_NEWNODE(NODE_BACK_REF, rb_node_back_ref_t, loc);
23802 n->nd_nth = nd_nth;
23803
23804 return n;
23805}
23806
23807static rb_node_integer_t *
23808rb_node_integer_new(struct parser_params *p, char* val, int base, const YYLTYPE *loc)
23809{
23810 rb_node_integer_t *n = NODE_NEWNODE(NODE_INTEGER, rb_node_integer_t, loc);
23811 n->val = val;
23812 n->minus = FALSE;
23813 n->base = base;
23814
23815 return n;
23816}
23817
23818static rb_node_float_t *
23819rb_node_float_new(struct parser_params *p, char* val, const YYLTYPE *loc)
23820{
23821 rb_node_float_t *n = NODE_NEWNODE(NODE_FLOAT, rb_node_float_t, loc);
23822 n->val = val;
23823 n->minus = FALSE;
23824
23825 return n;
23826}
23827
23828static rb_node_rational_t *
23829rb_node_rational_new(struct parser_params *p, char* val, int base, int seen_point, const YYLTYPE *loc)
23830{
23831 rb_node_rational_t *n = NODE_NEWNODE(NODE_RATIONAL, rb_node_rational_t, loc);
23832 n->val = val;
23833 n->minus = FALSE;
23834 n->base = base;
23835 n->seen_point = seen_point;
23836
23837 return n;
23838}
23839
23840static rb_node_imaginary_t *
23841rb_node_imaginary_new(struct parser_params *p, char* val, int base, int seen_point, enum rb_numeric_type numeric_type, const YYLTYPE *loc)
23842{
23843 rb_node_imaginary_t *n = NODE_NEWNODE(NODE_IMAGINARY, rb_node_imaginary_t, loc);
23844 n->val = val;
23845 n->minus = FALSE;
23846 n->base = base;
23847 n->seen_point = seen_point;
23848 n->type = numeric_type;
23849
23850 return n;
23851}
23852
23853static rb_node_str_t *
23854rb_node_str_new(struct parser_params *p, rb_parser_string_t *string, const YYLTYPE *loc)
23855{
23856 rb_node_str_t *n = NODE_NEWNODE(NODE_STR, rb_node_str_t, loc);
23857 n->string = string;
23858
23859 return n;
23860}
23861
23862/* TODO; Use union for NODE_DSTR2 */
23863static rb_node_dstr_t *
23864rb_node_dstr_new0(struct parser_params *p, rb_parser_string_t *string, long nd_alen, NODE *nd_next, const YYLTYPE *loc)
23865{
23866 rb_node_dstr_t *n = NODE_NEWNODE(NODE_DSTR, rb_node_dstr_t, loc);
23867 n->string = string;
23868 n->as.nd_alen = nd_alen;
23869 n->nd_next = (rb_node_list_t *)nd_next;
23870
23871 return n;
23872}
23873
23874static rb_node_dstr_t *
23875rb_node_dstr_new(struct parser_params *p, rb_parser_string_t *string, const YYLTYPE *loc)
23876{
23877 return rb_node_dstr_new0(p, string, 1, 0, loc);
23878}
23879
23880static rb_node_xstr_t *
23881rb_node_xstr_new(struct parser_params *p, rb_parser_string_t *string, const YYLTYPE *loc)
23882{
23883 rb_node_xstr_t *n = NODE_NEWNODE(NODE_XSTR, rb_node_xstr_t, loc);
23884 n->string = string;
23885
23886 return n;
23887}
23888
23889static rb_node_dxstr_t *
23890rb_node_dxstr_new(struct parser_params *p, rb_parser_string_t *string, long nd_alen, NODE *nd_next, const YYLTYPE *loc)
23891{
23892 rb_node_dxstr_t *n = NODE_NEWNODE(NODE_DXSTR, rb_node_dxstr_t, loc);
23893 n->string = string;
23894 n->as.nd_alen = nd_alen;
23895 n->nd_next = (rb_node_list_t *)nd_next;
23896
23897 return n;
23898}
23899
23900static rb_node_sym_t *
23901rb_node_sym_new(struct parser_params *p, VALUE str, const YYLTYPE *loc)
23902{
23903 rb_node_sym_t *n = NODE_NEWNODE(NODE_SYM, rb_node_sym_t, loc);
23904 n->string = rb_str_to_parser_string(p, str);
23905
23906 return n;
23907}
23908
23909static rb_node_dsym_t *
23910rb_node_dsym_new(struct parser_params *p, rb_parser_string_t *string, long nd_alen, NODE *nd_next, const YYLTYPE *loc)
23911{
23912 rb_node_dsym_t *n = NODE_NEWNODE(NODE_DSYM, rb_node_dsym_t, loc);
23913 n->string = string;
23914 n->as.nd_alen = nd_alen;
23915 n->nd_next = (rb_node_list_t *)nd_next;
23916
23917 return n;
23918}
23919
23920static rb_node_evstr_t *
23921rb_node_evstr_new(struct parser_params *p, NODE *nd_body, const YYLTYPE *loc, const YYLTYPE *opening_loc, const YYLTYPE *closing_loc)
23922{
23923 rb_node_evstr_t *n = NODE_NEWNODE(NODE_EVSTR, rb_node_evstr_t, loc);
23924 n->nd_body = nd_body;
23925 n->opening_loc = *opening_loc;
23926 n->closing_loc = *closing_loc;
23927
23928 return n;
23929}
23930
23931static rb_node_regx_t *
23932rb_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)
23933{
23934 rb_node_regx_t *n = NODE_NEWNODE(NODE_REGX, rb_node_regx_t, loc);
23935 n->string = string;
23936 n->options = options & RE_OPTION_MASK;
23937 n->opening_loc = *opening_loc;
23938 n->content_loc = *content_loc;
23939 n->closing_loc = *closing_loc;
23940
23941 return n;
23942}
23943
23944static rb_node_call_t *
23945rb_node_call_new(struct parser_params *p, NODE *nd_recv, ID nd_mid, NODE *nd_args, const YYLTYPE *loc)
23946{
23947 rb_node_call_t *n = NODE_NEWNODE(NODE_CALL, rb_node_call_t, loc);
23948 n->nd_recv = nd_recv;
23949 n->nd_mid = nd_mid;
23950 n->nd_args = nd_args;
23951
23952 return n;
23953}
23954
23955static rb_node_opcall_t *
23956rb_node_opcall_new(struct parser_params *p, NODE *nd_recv, ID nd_mid, NODE *nd_args, const YYLTYPE *loc)
23957{
23958 rb_node_opcall_t *n = NODE_NEWNODE(NODE_OPCALL, rb_node_opcall_t, loc);
23959 n->nd_recv = nd_recv;
23960 n->nd_mid = nd_mid;
23961 n->nd_args = nd_args;
23962
23963 return n;
23964}
23965
23966static rb_node_fcall_t *
23967rb_node_fcall_new(struct parser_params *p, ID nd_mid, NODE *nd_args, const YYLTYPE *loc)
23968{
23969 rb_node_fcall_t *n = NODE_NEWNODE(NODE_FCALL, rb_node_fcall_t, loc);
23970 n->nd_mid = nd_mid;
23971 n->nd_args = nd_args;
23972
23973 return n;
23974}
23975
23976static rb_node_qcall_t *
23977rb_node_qcall_new(struct parser_params *p, NODE *nd_recv, ID nd_mid, NODE *nd_args, const YYLTYPE *loc)
23978{
23979 rb_node_qcall_t *n = NODE_NEWNODE(NODE_QCALL, rb_node_qcall_t, loc);
23980 n->nd_recv = nd_recv;
23981 n->nd_mid = nd_mid;
23982 n->nd_args = nd_args;
23983
23984 return n;
23985}
23986
23987static rb_node_vcall_t *
23988rb_node_vcall_new(struct parser_params *p, ID nd_mid, const YYLTYPE *loc)
23989{
23990 rb_node_vcall_t *n = NODE_NEWNODE(NODE_VCALL, rb_node_vcall_t, loc);
23991 n->nd_mid = nd_mid;
23992
23993 return n;
23994}
23995
23996static rb_node_once_t *
23997rb_node_once_new(struct parser_params *p, NODE *nd_body, const YYLTYPE *loc)
23998{
23999 rb_node_once_t *n = NODE_NEWNODE(NODE_ONCE, rb_node_once_t, loc);
24000 n->nd_body = nd_body;
24001
24002 return n;
24003}
24004
24005static rb_node_args_t *
24006rb_node_args_new(struct parser_params *p, const YYLTYPE *loc)
24007{
24008 rb_node_args_t *n = NODE_NEWNODE(NODE_ARGS, rb_node_args_t, loc);
24009 MEMZERO(&n->nd_ainfo, struct rb_args_info, 1);
24010
24011 return n;
24012}
24013
24014static rb_node_args_aux_t *
24015rb_node_args_aux_new(struct parser_params *p, ID nd_pid, int nd_plen, const YYLTYPE *loc)
24016{
24017 rb_node_args_aux_t *n = NODE_NEWNODE(NODE_ARGS_AUX, rb_node_args_aux_t, loc);
24018 n->nd_pid = nd_pid;
24019 n->nd_plen = nd_plen;
24020 n->nd_next = 0;
24021
24022 return n;
24023}
24024
24025static rb_node_opt_arg_t *
24026rb_node_opt_arg_new(struct parser_params *p, NODE *nd_body, const YYLTYPE *loc)
24027{
24028 rb_node_opt_arg_t *n = NODE_NEWNODE(NODE_OPT_ARG, rb_node_opt_arg_t, loc);
24029 n->nd_body = nd_body;
24030 n->nd_next = 0;
24031
24032 return n;
24033}
24034
24035static rb_node_kw_arg_t *
24036rb_node_kw_arg_new(struct parser_params *p, NODE *nd_body, const YYLTYPE *loc)
24037{
24038 rb_node_kw_arg_t *n = NODE_NEWNODE(NODE_KW_ARG, rb_node_kw_arg_t, loc);
24039 n->nd_body = nd_body;
24040 n->nd_next = 0;
24041
24042 return n;
24043}
24044
24045static rb_node_postarg_t *
24046rb_node_postarg_new(struct parser_params *p, NODE *nd_1st, NODE *nd_2nd, const YYLTYPE *loc)
24047{
24048 rb_node_postarg_t *n = NODE_NEWNODE(NODE_POSTARG, rb_node_postarg_t, loc);
24049 n->nd_1st = nd_1st;
24050 n->nd_2nd = nd_2nd;
24051
24052 return n;
24053}
24054
24055static rb_node_argscat_t *
24056rb_node_argscat_new(struct parser_params *p, NODE *nd_head, NODE *nd_body, const YYLTYPE *loc)
24057{
24058 rb_node_argscat_t *n = NODE_NEWNODE(NODE_ARGSCAT, rb_node_argscat_t, loc);
24059 n->nd_head = nd_head;
24060 n->nd_body = nd_body;
24061
24062 return n;
24063}
24064
24065static rb_node_argspush_t *
24066rb_node_argspush_new(struct parser_params *p, NODE *nd_head, NODE *nd_body, const YYLTYPE *loc)
24067{
24068 rb_node_argspush_t *n = NODE_NEWNODE(NODE_ARGSPUSH, rb_node_argspush_t, loc);
24069 n->nd_head = nd_head;
24070 n->nd_body = nd_body;
24071
24072 return n;
24073}
24074
24075static rb_node_splat_t *
24076rb_node_splat_new(struct parser_params *p, NODE *nd_head, const YYLTYPE *loc, const YYLTYPE *operator_loc)
24077{
24078 rb_node_splat_t *n = NODE_NEWNODE(NODE_SPLAT, rb_node_splat_t, loc);
24079 n->nd_head = nd_head;
24080 n->operator_loc = *operator_loc;
24081
24082 return n;
24083}
24084
24085static rb_node_block_pass_t *
24086rb_node_block_pass_new(struct parser_params *p, NODE *nd_body, const YYLTYPE *loc, const YYLTYPE *operator_loc)
24087{
24088 rb_node_block_pass_t *n = NODE_NEWNODE(NODE_BLOCK_PASS, rb_node_block_pass_t, loc);
24089 n->forwarding = 0;
24090 n->nd_head = 0;
24091 n->nd_body = nd_body;
24092 n->operator_loc = *operator_loc;
24093
24094 return n;
24095}
24096
24097static rb_node_alias_t *
24098rb_node_alias_new(struct parser_params *p, NODE *nd_1st, NODE *nd_2nd, const YYLTYPE *loc, const YYLTYPE *keyword_loc)
24099{
24100 rb_node_alias_t *n = NODE_NEWNODE(NODE_ALIAS, rb_node_alias_t, loc);
24101 n->nd_1st = nd_1st;
24102 n->nd_2nd = nd_2nd;
24103 n->keyword_loc = *keyword_loc;
24104
24105 return n;
24106}
24107
24108static rb_node_valias_t *
24109rb_node_valias_new(struct parser_params *p, ID nd_alias, ID nd_orig, const YYLTYPE *loc, const YYLTYPE *keyword_loc)
24110{
24111 rb_node_valias_t *n = NODE_NEWNODE(NODE_VALIAS, rb_node_valias_t, loc);
24112 n->nd_alias = nd_alias;
24113 n->nd_orig = nd_orig;
24114 n->keyword_loc = *keyword_loc;
24115
24116 return n;
24117}
24118
24119static rb_node_undef_t *
24120rb_node_undef_new(struct parser_params *p, NODE *nd_undef, const YYLTYPE *loc)
24121{
24122 rb_node_undef_t *n = NODE_NEWNODE(NODE_UNDEF, rb_node_undef_t, loc);
24123 n->nd_undefs = rb_parser_ary_new_capa_for_node(p, 1);
24124 n->keyword_loc = NULL_LOC;
24125 rb_parser_ary_push_node(p, n->nd_undefs, nd_undef);
24126
24127 return n;
24128}
24129
24130static rb_node_errinfo_t *
24131rb_node_errinfo_new(struct parser_params *p, const YYLTYPE *loc)
24132{
24133 rb_node_errinfo_t *n = NODE_NEWNODE(NODE_ERRINFO, rb_node_errinfo_t, loc);
24134
24135 return n;
24136}
24137
24138static rb_node_defined_t *
24139rb_node_defined_new(struct parser_params *p, NODE *nd_head, const YYLTYPE *loc, const YYLTYPE *keyword_loc)
24140{
24141 rb_node_defined_t *n = NODE_NEWNODE(NODE_DEFINED, rb_node_defined_t, loc);
24142 n->nd_head = nd_head;
24143 n->keyword_loc = *keyword_loc;
24144
24145 return n;
24146}
24147
24148static rb_node_postexe_t *
24149rb_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)
24150{
24151 rb_node_postexe_t *n = NODE_NEWNODE(NODE_POSTEXE, rb_node_postexe_t, loc);
24152 n->nd_body = nd_body;
24153 n->keyword_loc = *keyword_loc;
24154 n->opening_loc = *opening_loc;
24155 n->closing_loc = *closing_loc;
24156
24157 return n;
24158}
24159
24160static rb_node_attrasgn_t *
24161rb_node_attrasgn_new(struct parser_params *p, NODE *nd_recv, ID nd_mid, NODE *nd_args, const YYLTYPE *loc)
24162{
24163 rb_node_attrasgn_t *n = NODE_NEWNODE(NODE_ATTRASGN, rb_node_attrasgn_t, loc);
24164 n->nd_recv = nd_recv;
24165 n->nd_mid = nd_mid;
24166 n->nd_args = nd_args;
24167
24168 return n;
24169}
24170
24171static rb_node_aryptn_t *
24172rb_node_aryptn_new(struct parser_params *p, NODE *pre_args, NODE *rest_arg, NODE *post_args, const YYLTYPE *loc)
24173{
24174 rb_node_aryptn_t *n = NODE_NEWNODE(NODE_ARYPTN, rb_node_aryptn_t, loc);
24175 n->nd_pconst = 0;
24176 n->pre_args = pre_args;
24177 n->rest_arg = rest_arg;
24178 n->post_args = post_args;
24179
24180 return n;
24181}
24182
24183static rb_node_hshptn_t *
24184rb_node_hshptn_new(struct parser_params *p, NODE *nd_pconst, NODE *nd_pkwargs, NODE *nd_pkwrestarg, const YYLTYPE *loc)
24185{
24186 rb_node_hshptn_t *n = NODE_NEWNODE(NODE_HSHPTN, rb_node_hshptn_t, loc);
24187 n->nd_pconst = nd_pconst;
24188 n->nd_pkwargs = nd_pkwargs;
24189 n->nd_pkwrestarg = nd_pkwrestarg;
24190
24191 return n;
24192}
24193
24194static rb_node_fndptn_t *
24195rb_node_fndptn_new(struct parser_params *p, NODE *pre_rest_arg, NODE *args, NODE *post_rest_arg, const YYLTYPE *loc)
24196{
24197 rb_node_fndptn_t *n = NODE_NEWNODE(NODE_FNDPTN, rb_node_fndptn_t, loc);
24198 n->nd_pconst = 0;
24199 n->pre_rest_arg = pre_rest_arg;
24200 n->args = args;
24201 n->post_rest_arg = post_rest_arg;
24202
24203 return n;
24204}
24205
24206static rb_node_line_t *
24207rb_node_line_new(struct parser_params *p, const YYLTYPE *loc)
24208{
24209 rb_node_line_t *n = NODE_NEWNODE(NODE_LINE, rb_node_line_t, loc);
24210
24211 return n;
24212}
24213
24214static rb_node_file_t *
24215rb_node_file_new(struct parser_params *p, VALUE str, const YYLTYPE *loc)
24216{
24217 rb_node_file_t *n = NODE_NEWNODE(NODE_FILE, rb_node_file_t, loc);
24218 n->path = rb_str_to_parser_string(p, str);
24219
24220 return n;
24221}
24222
24223static rb_node_encoding_t *
24224rb_node_encoding_new(struct parser_params *p, const YYLTYPE *loc)
24225{
24226 rb_node_encoding_t *n = NODE_NEWNODE(NODE_ENCODING, rb_node_encoding_t, loc);
24227 n->enc = p->enc;
24228
24229 return n;
24230}
24231
24232static rb_node_cdecl_t *
24233rb_node_cdecl_new(struct parser_params *p, ID nd_vid, NODE *nd_value, NODE *nd_else, enum rb_parser_shareability shareability, const YYLTYPE *loc)
24234{
24235 rb_node_cdecl_t *n = NODE_NEWNODE(NODE_CDECL, rb_node_cdecl_t, loc);
24236 n->nd_vid = nd_vid;
24237 n->nd_value = nd_value;
24238 n->nd_else = nd_else;
24239 n->shareability = shareability;
24240
24241 return n;
24242}
24243
24244static rb_node_op_cdecl_t *
24245rb_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)
24246{
24247 rb_node_op_cdecl_t *n = NODE_NEWNODE(NODE_OP_CDECL, rb_node_op_cdecl_t, loc);
24248 n->nd_head = nd_head;
24249 n->nd_value = nd_value;
24250 n->nd_aid = nd_aid;
24251 n->shareability = shareability;
24252
24253 return n;
24254}
24255
24256static rb_node_error_t *
24257rb_node_error_new(struct parser_params *p, const YYLTYPE *loc)
24258{
24259 rb_node_error_t *n = NODE_NEWNODE(NODE_ERROR, rb_node_error_t, loc);
24260
24261 return n;
24262}
24263
24264static rb_node_break_t *
24265rb_node_break_new(struct parser_params *p, NODE *nd_stts, const YYLTYPE *loc, const YYLTYPE *keyword_loc)
24266{
24267 rb_node_break_t *n = NODE_NEWNODE(NODE_BREAK, rb_node_break_t, loc);
24268 n->nd_stts = nd_stts;
24269 n->nd_chain = 0;
24270 n->keyword_loc = *keyword_loc;
24271
24272 return n;
24273}
24274
24275static rb_node_next_t *
24276rb_node_next_new(struct parser_params *p, NODE *nd_stts, const YYLTYPE *loc, const YYLTYPE *keyword_loc)
24277{
24278 rb_node_next_t *n = NODE_NEWNODE(NODE_NEXT, rb_node_next_t, loc);
24279 n->nd_stts = nd_stts;
24280 n->nd_chain = 0;
24281 n->keyword_loc = *keyword_loc;
24282
24283 return n;
24284}
24285
24286static rb_node_redo_t *
24287rb_node_redo_new(struct parser_params *p, const YYLTYPE *loc, const YYLTYPE *keyword_loc)
24288{
24289 rb_node_redo_t *n = NODE_NEWNODE(NODE_REDO, rb_node_redo_t, loc);
24290 n->nd_chain = 0;
24291 n->keyword_loc = *keyword_loc;
24292
24293 return n;
24294}
24295
24296static rb_node_def_temp_t *
24297rb_node_def_temp_new(struct parser_params *p, const YYLTYPE *loc)
24298{
24299 rb_node_def_temp_t *n = NODE_NEWNODE((enum node_type)NODE_DEF_TEMP, rb_node_def_temp_t, loc);
24300 n->save.numparam_save = 0;
24301 n->save.max_numparam = 0;
24302 n->save.ctxt = p->ctxt;
24303 n->nd_def = 0;
24304 n->nd_mid = 0;
24305
24306 return n;
24307}
24308
24309static rb_node_def_temp_t *
24310def_head_save(struct parser_params *p, rb_node_def_temp_t *n)
24311{
24312 n->save.numparam_save = numparam_push(p);
24313 n->save.max_numparam = p->max_numparam;
24314 return n;
24315}
24316
24317#ifndef RIPPER
24318static enum node_type
24319nodetype(NODE *node) /* for debug */
24320{
24321 return (enum node_type)nd_type(node);
24322}
24323
24324static int
24325nodeline(NODE *node)
24326{
24327 return nd_line(node);
24328}
24329#endif
24330
24331static NODE*
24332newline_node(NODE *node)
24333{
24334 if (node) {
24335 node = remove_begin(node);
24336 nd_set_fl_newline(node);
24337 }
24338 return node;
24339}
24340
24341static void
24342fixpos(NODE *node, NODE *orig)
24343{
24344 if (!node) return;
24345 if (!orig) return;
24346 nd_set_line(node, nd_line(orig));
24347}
24348
24349static NODE*
24350block_append(struct parser_params *p, NODE *head, NODE *tail)
24351{
24352 NODE *end, *h = head, *nd;
24353
24354 if (tail == 0) return head;
24355
24356 if (h == 0) return tail;
24357 switch (nd_type(h)) {
24358 default:
24359 h = end = NEW_BLOCK(head, &head->nd_loc);
24360 head = end;
24361 break;
24362 case NODE_BLOCK:
24363 end = RNODE_BLOCK(h)->nd_end;
24364 break;
24365 }
24366
24367 nd = RNODE_BLOCK(end)->nd_head;
24368 switch (nd_type(nd)) {
24369 case NODE_RETURN:
24370 case NODE_BREAK:
24371 case NODE_NEXT:
24372 case NODE_REDO:
24373 case NODE_RETRY:
24374 rb_warning0L(nd_line(tail), "statement not reached");
24375 break;
24376
24377 default:
24378 break;
24379 }
24380
24381 if (!nd_type_p(tail, NODE_BLOCK)) {
24382 tail = NEW_BLOCK(tail, &tail->nd_loc);
24383 }
24384 RNODE_BLOCK(end)->nd_next = tail;
24385 RNODE_BLOCK(h)->nd_end = RNODE_BLOCK(tail)->nd_end;
24386 nd_set_last_loc(head, nd_last_loc(tail));
24387 return head;
24388}
24389
24390/* append item to the list */
24391static NODE*
24392list_append(struct parser_params *p, NODE *list, NODE *item)
24393{
24394 NODE *last;
24395
24396 if (list == 0) return NEW_LIST(item, &item->nd_loc);
24397 if (RNODE_LIST(list)->nd_next) {
24398 last = RNODE_LIST(RNODE_LIST(list)->nd_next)->as.nd_end;
24399 }
24400 else {
24401 last = list;
24402 }
24403
24404 RNODE_LIST(list)->as.nd_alen += 1;
24405 RNODE_LIST(last)->nd_next = NEW_LIST(item, &item->nd_loc);
24406 RNODE_LIST(RNODE_LIST(list)->nd_next)->as.nd_end = RNODE_LIST(last)->nd_next;
24407
24408 nd_set_last_loc(list, nd_last_loc(item));
24409
24410 return list;
24411}
24412
24413/* concat two lists */
24414static NODE*
24415list_concat(NODE *head, NODE *tail)
24416{
24417 NODE *last;
24418
24419 if (RNODE_LIST(head)->nd_next) {
24420 last = RNODE_LIST(RNODE_LIST(head)->nd_next)->as.nd_end;
24421 }
24422 else {
24423 last = head;
24424 }
24425
24426 RNODE_LIST(head)->as.nd_alen += RNODE_LIST(tail)->as.nd_alen;
24427 RNODE_LIST(last)->nd_next = tail;
24428 if (RNODE_LIST(tail)->nd_next) {
24429 RNODE_LIST(RNODE_LIST(head)->nd_next)->as.nd_end = RNODE_LIST(RNODE_LIST(tail)->nd_next)->as.nd_end;
24430 }
24431 else {
24432 RNODE_LIST(RNODE_LIST(head)->nd_next)->as.nd_end = tail;
24433 }
24434
24435 nd_set_last_loc(head, nd_last_loc(tail));
24436
24437 return head;
24438}
24439
24440static int
24441literal_concat0(struct parser_params *p, rb_parser_string_t *head, rb_parser_string_t *tail)
24442{
24443 if (!tail) return 1;
24444 if (!rb_parser_enc_compatible(p, head, tail)) {
24445 compile_error(p, "string literal encodings differ (%s / %s)",
24446 rb_enc_name(rb_parser_str_get_encoding(head)),
24447 rb_enc_name(rb_parser_str_get_encoding(tail)));
24448 rb_parser_str_resize(p, head, 0);
24449 rb_parser_str_resize(p, tail, 0);
24450 return 0;
24451 }
24452 rb_parser_str_buf_append(p, head, tail);
24453 return 1;
24454}
24455
24456static rb_parser_string_t *
24457string_literal_head(struct parser_params *p, enum node_type htype, NODE *head)
24458{
24459 if (htype != NODE_DSTR) return NULL;
24460 if (RNODE_DSTR(head)->nd_next) {
24461 head = RNODE_LIST(RNODE_LIST(RNODE_DSTR(head)->nd_next)->as.nd_end)->nd_head;
24462 if (!head || !nd_type_p(head, NODE_STR)) return NULL;
24463 }
24464 rb_parser_string_t *lit = RNODE_DSTR(head)->string;
24465 ASSUME(lit);
24466 return lit;
24467}
24468
24469#ifndef RIPPER
24470static rb_parser_string_t *
24471rb_parser_string_deep_copy(struct parser_params *p, const rb_parser_string_t *orig)
24472{
24473 rb_parser_string_t *copy;
24474 if (!orig) return NULL;
24475 copy = rb_parser_string_new(p, PARSER_STRING_PTR(orig), PARSER_STRING_LEN(orig));
24476 copy->coderange = orig->coderange;
24477 copy->enc = orig->enc;
24478 return copy;
24479}
24480#endif
24481
24482/* concat two string literals */
24483static NODE *
24484literal_concat(struct parser_params *p, NODE *head, NODE *tail, const YYLTYPE *loc)
24485{
24486 enum node_type htype;
24487 rb_parser_string_t *lit;
24488
24489 if (!head) return tail;
24490 if (!tail) return head;
24491
24492 htype = nd_type(head);
24493 if (htype == NODE_EVSTR) {
24494 head = new_dstr(p, head, loc);
24495 htype = NODE_DSTR;
24496 }
24497 if (p->heredoc_indent > 0) {
24498 switch (htype) {
24499 case NODE_STR:
24500 head = str2dstr(p, head);
24501 case NODE_DSTR:
24502 return list_append(p, head, tail);
24503 default:
24504 break;
24505 }
24506 }
24507 switch (nd_type(tail)) {
24508 case NODE_STR:
24509 if ((lit = string_literal_head(p, htype, head)) != false) {
24510 htype = NODE_STR;
24511 }
24512 else {
24513 lit = RNODE_DSTR(head)->string;
24514 }
24515 if (htype == NODE_STR) {
24516 if (!literal_concat0(p, lit, RNODE_STR(tail)->string)) {
24517 error:
24518 rb_discard_node(p, head);
24519 rb_discard_node(p, tail);
24520 return 0;
24521 }
24522 rb_discard_node(p, tail);
24523 }
24524 else {
24525 list_append(p, head, tail);
24526 }
24527 break;
24528
24529 case NODE_DSTR:
24530 if (htype == NODE_STR) {
24531 if (!literal_concat0(p, RNODE_STR(head)->string, RNODE_DSTR(tail)->string))
24532 goto error;
24533 rb_parser_string_free(p, RNODE_DSTR(tail)->string);
24534 RNODE_DSTR(tail)->string = RNODE_STR(head)->string;
24535 RNODE_STR(head)->string = NULL;
24536 rb_discard_node(p, head);
24537 head = tail;
24538 }
24539 else if (!RNODE_DSTR(tail)->string) {
24540 append:
24541 RNODE_DSTR(head)->as.nd_alen += RNODE_DSTR(tail)->as.nd_alen - 1;
24542 if (!RNODE_DSTR(head)->nd_next) {
24543 RNODE_DSTR(head)->nd_next = RNODE_DSTR(tail)->nd_next;
24544 }
24545 else if (RNODE_DSTR(tail)->nd_next) {
24546 RNODE_DSTR(RNODE_DSTR(RNODE_DSTR(head)->nd_next)->as.nd_end)->nd_next = RNODE_DSTR(tail)->nd_next;
24547 RNODE_DSTR(RNODE_DSTR(head)->nd_next)->as.nd_end = RNODE_DSTR(RNODE_DSTR(tail)->nd_next)->as.nd_end;
24548 }
24549 rb_discard_node(p, tail);
24550 }
24551 else if ((lit = string_literal_head(p, htype, head)) != false) {
24552 if (!literal_concat0(p, lit, RNODE_DSTR(tail)->string))
24553 goto error;
24554 rb_parser_string_free(p, RNODE_DSTR(tail)->string);
24555 RNODE_DSTR(tail)->string = 0;
24556 goto append;
24557 }
24558 else {
24559 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));
24560 RNODE_DSTR(tail)->string = 0;
24561 }
24562 break;
24563
24564 case NODE_EVSTR:
24565 if (htype == NODE_STR) {
24566 head = str2dstr(p, head);
24567 RNODE_DSTR(head)->as.nd_alen = 1;
24568 }
24569 list_append(p, head, tail);
24570 break;
24571 }
24572 return head;
24573}
24574
24575static void
24576nd_copy_flag(NODE *new_node, NODE *old_node)
24577{
24578 if (nd_fl_newline(old_node)) nd_set_fl_newline(new_node);
24579 nd_set_line(new_node, nd_line(old_node));
24580 new_node->nd_loc = old_node->nd_loc;
24581 new_node->node_id = old_node->node_id;
24582}
24583
24584static NODE *
24585str2dstr(struct parser_params *p, NODE *node)
24586{
24587 NODE *new_node = (NODE *)NODE_NEW_INTERNAL(NODE_DSTR, rb_node_dstr_t);
24588 nd_copy_flag(new_node, node);
24589 RNODE_DSTR(new_node)->string = RNODE_STR(node)->string;
24590 RNODE_DSTR(new_node)->as.nd_alen = 0;
24591 RNODE_DSTR(new_node)->nd_next = 0;
24592 RNODE_STR(node)->string = 0;
24593
24594 return new_node;
24595}
24596
24597static NODE *
24598str2regx(struct parser_params *p, NODE *node, int options, const YYLTYPE *loc, const YYLTYPE *opening_loc, const YYLTYPE *content_loc, const YYLTYPE *closing_loc)
24599{
24600 NODE *new_node = (NODE *)NODE_NEW_INTERNAL(NODE_REGX, rb_node_regx_t);
24601 nd_copy_flag(new_node, node);
24602 RNODE_REGX(new_node)->string = RNODE_STR(node)->string;
24603 RNODE_REGX(new_node)->options = options;
24604 nd_set_loc(new_node, loc);
24605 RNODE_REGX(new_node)->opening_loc = *opening_loc;
24606 RNODE_REGX(new_node)->content_loc = *content_loc;
24607 RNODE_REGX(new_node)->closing_loc = *closing_loc;
24608 RNODE_STR(node)->string = 0;
24609
24610 return new_node;
24611}
24612
24613static NODE *
24614evstr2dstr(struct parser_params *p, NODE *node)
24615{
24616 if (nd_type_p(node, NODE_EVSTR)) {
24617 node = new_dstr(p, node, &node->nd_loc);
24618 }
24619 return node;
24620}
24621
24622static NODE *
24623new_evstr(struct parser_params *p, NODE *node, const YYLTYPE *loc, const YYLTYPE *opening_loc, const YYLTYPE *closing_loc)
24624{
24625 NODE *head = node;
24626
24627 if (node) {
24628 switch (nd_type(node)) {
24629 case NODE_STR:
24630 return str2dstr(p, node);
24631 case NODE_DSTR:
24632 break;
24633 case NODE_EVSTR:
24634 return node;
24635 }
24636 }
24637 return NEW_EVSTR(head, loc, opening_loc, closing_loc);
24638}
24639
24640static NODE *
24641new_dstr(struct parser_params *p, NODE *node, const YYLTYPE *loc)
24642{
24643 NODE *dstr = NEW_DSTR(STRING_NEW0(), loc);
24644 return list_append(p, dstr, node);
24645}
24646
24647static NODE *
24648call_bin_op(struct parser_params *p, NODE *recv, ID id, NODE *arg1,
24649 const YYLTYPE *op_loc, const YYLTYPE *loc)
24650{
24651 NODE *expr;
24652 value_expr(p, recv);
24653 value_expr(p, arg1);
24654 expr = NEW_OPCALL(recv, id, NEW_LIST(arg1, &arg1->nd_loc), loc);
24655 nd_set_line(expr, op_loc->beg_pos.lineno);
24656 return expr;
24657}
24658
24659static NODE *
24660call_uni_op(struct parser_params *p, NODE *recv, ID id, const YYLTYPE *op_loc, const YYLTYPE *loc)
24661{
24662 NODE *opcall;
24663 value_expr(p, recv);
24664 opcall = NEW_OPCALL(recv, id, 0, loc);
24665 nd_set_line(opcall, op_loc->beg_pos.lineno);
24666 return opcall;
24667}
24668
24669static NODE *
24670new_qcall(struct parser_params* p, ID atype, NODE *recv, ID mid, NODE *args, const YYLTYPE *op_loc, const YYLTYPE *loc)
24671{
24672 NODE *qcall = NEW_QCALL(atype, recv, mid, args, loc);
24673 nd_set_line(qcall, op_loc->beg_pos.lineno);
24674 return qcall;
24675}
24676
24677static NODE*
24678new_command_qcall(struct parser_params* p, ID atype, NODE *recv, ID mid, NODE *args, NODE *block, const YYLTYPE *op_loc, const YYLTYPE *loc)
24679{
24680 NODE *ret;
24681 if (block) block_dup_check(p, args, block);
24682 ret = new_qcall(p, atype, recv, mid, args, op_loc, loc);
24683 if (block) ret = method_add_block(p, ret, block, loc);
24684 fixpos(ret, recv);
24685 return ret;
24686}
24687
24689new_locations_lambda_body(struct parser_params* p, NODE *node, const YYLTYPE *loc, const YYLTYPE *opening_loc, const YYLTYPE *closing_loc)
24690{
24692 body->node = node;
24693 body->opening_loc = *opening_loc;
24694 body->closing_loc = *closing_loc;
24695 return body;
24696}
24697
24698static NODE *
24699command_add_block(struct parser_params*p, NODE *m, NODE *b, const YYLTYPE *loc)
24700{
24701 NODE **body;
24702 enum node_type type = nd_type(m);
24703 switch (type) {
24704 case NODE_YIELD:
24705 compile_error(p, "block given to yield");
24706 return m;
24707 case NODE_RETURN:
24708 body = &RNODE_RETURN(m)->nd_stts;
24709 break;
24710 case NODE_BREAK:
24711 case NODE_NEXT:
24712 body = &RNODE_EXITS(m)->nd_stts;
24713 break;
24714 case NODE_REDO: /* `redo` has no argument */
24715 compile_error(p, "command_add_block: unexpected node: NODE_REDO");
24716 return m;
24717 case NODE_RETRY: /* `retry` has no argument */
24718 compile_error(p, "command_add_block: unexpected node: NODE_RETRY");
24719 return m;
24720 default:
24721 block_dup_check(p, get_nd_args(p, m), b);
24722 return method_add_block(p, m, b, loc);
24723 }
24724 RUBY_ASSERT(*body, "no argument %s with do_block", parser_node_name(type));
24725 YYLTYPE b_loc = code_loc_gen(&(*body)->nd_loc, loc);
24726 *body = command_add_block(p, *body, b, &b_loc);
24727 m->nd_loc.end_pos = loc->end_pos;
24728 return m;
24729}
24730
24731#define nd_once_body(node) (nd_type_p((node), NODE_ONCE) ? RNODE_ONCE(node)->nd_body : node)
24732
24733static NODE*
24734last_expr_once_body(NODE *node)
24735{
24736 if (!node) return 0;
24737 return nd_once_body(node);
24738}
24739
24740static NODE*
24741match_op(struct parser_params *p, NODE *node1, NODE *node2, const YYLTYPE *op_loc, const YYLTYPE *loc)
24742{
24743 NODE *n;
24744 int line = op_loc->beg_pos.lineno;
24745
24746 value_expr(p, node1);
24747 value_expr(p, node2);
24748
24749 if ((n = last_expr_once_body(node1)) != 0) {
24750 switch (nd_type(n)) {
24751 case NODE_DREGX:
24752 {
24753 NODE *match = NEW_MATCH2(node1, node2, loc);
24754 nd_set_line(match, line);
24755 return match;
24756 }
24757
24758 case NODE_REGX:
24759 {
24760 const VALUE lit = rb_node_regx_string_val(n);
24761 if (!NIL_P(lit)) {
24762 NODE *match = NEW_MATCH2(node1, node2, loc);
24763 RNODE_MATCH2(match)->nd_args = reg_named_capture_assign(p, lit, loc, assignable);
24764 nd_set_line(match, line);
24765 return match;
24766 }
24767 }
24768 }
24769 }
24770
24771 if ((n = last_expr_once_body(node2)) != 0) {
24772 NODE *match3;
24773
24774 switch (nd_type(n)) {
24775 case NODE_DREGX:
24776 match3 = NEW_MATCH3(node2, node1, loc);
24777 return match3;
24778 }
24779 }
24780
24781 n = NEW_CALL(node1, tMATCH, NEW_LIST(node2, &node2->nd_loc), loc);
24782 nd_set_line(n, line);
24783 return n;
24784}
24785
24786# if WARN_PAST_SCOPE
24787static int
24788past_dvar_p(struct parser_params *p, ID id)
24789{
24790 struct vtable *past = p->lvtbl->past;
24791 while (past) {
24792 if (vtable_included(past, id)) return 1;
24793 past = past->prev;
24794 }
24795 return 0;
24796}
24797# endif
24798
24799static int
24800numparam_nested_p(struct parser_params *p)
24801{
24802 struct local_vars *local = p->lvtbl;
24803 NODE *outer = local->numparam.outer;
24804 NODE *inner = local->numparam.inner;
24805 if (outer || inner) {
24806 NODE *used = outer ? outer : inner;
24807 compile_error(p, "numbered parameter is already used in %s block\n"
24808 "%s:%d: numbered parameter is already used here",
24809 outer ? "outer" : "inner",
24810 p->ruby_sourcefile, nd_line(used));
24811 parser_show_error_line(p, &used->nd_loc);
24812 return 1;
24813 }
24814 return 0;
24815}
24816
24817static int
24818numparam_used_p(struct parser_params *p)
24819{
24820 NODE *numparam = p->lvtbl->numparam.current;
24821 if (numparam) {
24822 compile_error(p, "'it' is not allowed when a numbered parameter is already used\n"
24823 "%s:%d: numbered parameter is already used here",
24824 p->ruby_sourcefile, nd_line(numparam));
24825 parser_show_error_line(p, &numparam->nd_loc);
24826 return 1;
24827 }
24828 return 0;
24829}
24830
24831static int
24832it_used_p(struct parser_params *p)
24833{
24834 NODE *it = p->lvtbl->it;
24835 if (it) {
24836 compile_error(p, "numbered parameters are not allowed when 'it' is already used\n"
24837 "%s:%d: 'it' is already used here",
24838 p->ruby_sourcefile, nd_line(it));
24839 parser_show_error_line(p, &it->nd_loc);
24840 return 1;
24841 }
24842 return 0;
24843}
24844
24845static NODE*
24846gettable(struct parser_params *p, ID id, const YYLTYPE *loc)
24847{
24848 ID *vidp = NULL;
24849 NODE *node;
24850 switch (id) {
24851 case keyword_self:
24852 return NEW_SELF(loc);
24853 case keyword_nil:
24854 return NEW_NIL(loc);
24855 case keyword_true:
24856 return NEW_TRUE(loc);
24857 case keyword_false:
24858 return NEW_FALSE(loc);
24859 case keyword__FILE__:
24860 {
24861 VALUE file = p->ruby_sourcefile_string;
24862 if (NIL_P(file))
24863 file = rb_str_new(0, 0);
24864 node = NEW_FILE(file, loc);
24865 }
24866 return node;
24867 case keyword__LINE__:
24868 return NEW_LINE(loc);
24869 case keyword__ENCODING__:
24870 return NEW_ENCODING(loc);
24871
24872 }
24873 switch (id_type(id)) {
24874 case ID_LOCAL:
24875 if (dyna_in_block(p) && dvar_defined_ref(p, id, &vidp)) {
24876 if (NUMPARAM_ID_P(id) && (numparam_nested_p(p) || it_used_p(p))) return 0;
24877 if (vidp) *vidp |= LVAR_USED;
24878 node = NEW_DVAR(id, loc);
24879 return node;
24880 }
24881 if (local_id_ref(p, id, &vidp)) {
24882 if (vidp) *vidp |= LVAR_USED;
24883 node = NEW_LVAR(id, loc);
24884 return node;
24885 }
24886 if (dyna_in_block(p) && NUMPARAM_ID_P(id) &&
24887 parser_numbered_param(p, NUMPARAM_ID_TO_IDX(id))) {
24888 if (numparam_nested_p(p) || it_used_p(p)) return 0;
24889 node = NEW_DVAR(id, loc);
24890 struct local_vars *local = p->lvtbl;
24891 if (!local->numparam.current) local->numparam.current = node;
24892 return node;
24893 }
24894# if WARN_PAST_SCOPE
24895 if (!p->ctxt.in_defined && RTEST(ruby_verbose) && past_dvar_p(p, id)) {
24896 rb_warning1("possible reference to past scope - %"PRIsWARN, rb_id2str(id));
24897 }
24898# endif
24899 /* method call without arguments */
24900 if (dyna_in_block(p) && id == idIt && !(DVARS_TERMINAL_P(p->lvtbl->args) || DVARS_TERMINAL_P(p->lvtbl->args->prev))) {
24901 if (numparam_used_p(p)) return 0;
24902 if (p->max_numparam == ORDINAL_PARAM) {
24903 compile_error(p, "ordinary parameter is defined");
24904 return 0;
24905 }
24906 if (!p->it_id) {
24907 p->it_id = idItImplicit;
24908 vtable_add(p->lvtbl->args, p->it_id);
24909 }
24910 NODE *node = NEW_DVAR(p->it_id, loc);
24911 if (!p->lvtbl->it) p->lvtbl->it = node;
24912 return node;
24913 }
24914 return NEW_VCALL(id, loc);
24915 case ID_GLOBAL:
24916 return NEW_GVAR(id, loc);
24917 case ID_INSTANCE:
24918 return NEW_IVAR(id, loc);
24919 case ID_CONST:
24920 return NEW_CONST(id, loc);
24921 case ID_CLASS:
24922 return NEW_CVAR(id, loc);
24923 }
24924 compile_error(p, "identifier %"PRIsVALUE" is not valid to get", rb_id2str(id));
24925 return 0;
24926}
24927
24928static rb_node_opt_arg_t *
24929opt_arg_append(rb_node_opt_arg_t *opt_list, rb_node_opt_arg_t *opt)
24930{
24931 rb_node_opt_arg_t *opts = opt_list;
24932 RNODE(opts)->nd_loc.end_pos = RNODE(opt)->nd_loc.end_pos;
24933
24934 while (opts->nd_next) {
24935 opts = opts->nd_next;
24936 RNODE(opts)->nd_loc.end_pos = RNODE(opt)->nd_loc.end_pos;
24937 }
24938 opts->nd_next = opt;
24939
24940 return opt_list;
24941}
24942
24943static rb_node_kw_arg_t *
24944kwd_append(rb_node_kw_arg_t *kwlist, rb_node_kw_arg_t *kw)
24945{
24946 if (kwlist) {
24947 /* Assume rb_node_kw_arg_t and rb_node_opt_arg_t has same structure */
24948 opt_arg_append(RNODE_OPT_ARG(kwlist), RNODE_OPT_ARG(kw));
24949 }
24950 return kwlist;
24951}
24952
24953static NODE *
24954new_defined(struct parser_params *p, NODE *expr, const YYLTYPE *loc, const YYLTYPE *keyword_loc)
24955{
24956 int had_trailing_semicolon = p->ctxt.has_trailing_semicolon;
24957 p->ctxt.has_trailing_semicolon = 0;
24958
24959 NODE *n = expr;
24960 while (n) {
24961 if (nd_type_p(n, NODE_BEGIN)) {
24962 n = RNODE_BEGIN(n)->nd_body;
24963 }
24964 else if (nd_type_p(n, NODE_BLOCK) && RNODE_BLOCK(n)->nd_end == n) {
24965 n = RNODE_BLOCK(n)->nd_head;
24966 }
24967 else {
24968 break;
24969 }
24970 }
24971
24972 if (had_trailing_semicolon && !nd_type_p(expr, NODE_BLOCK)) {
24973 NODE *block = NEW_BLOCK(expr, loc);
24974 return NEW_DEFINED(block, loc, keyword_loc);
24975 }
24976
24977 return NEW_DEFINED(n, loc, keyword_loc);
24978}
24979
24980static NODE*
24981str_to_sym_node(struct parser_params *p, NODE *node, const YYLTYPE *loc)
24982{
24983 VALUE lit;
24984 rb_parser_string_t *str = RNODE_STR(node)->string;
24985 if (rb_parser_enc_str_coderange(p, str) == RB_PARSER_ENC_CODERANGE_BROKEN) {
24986 yyerror1(loc, "invalid symbol");
24987 lit = STR_NEW0();
24988 }
24989 else {
24990 lit = rb_str_new_parser_string(str);
24991 }
24992 return NEW_SYM(lit, loc);
24993}
24994
24995static NODE*
24996symbol_append(struct parser_params *p, NODE *symbols, NODE *symbol)
24997{
24998 enum node_type type = nd_type(symbol);
24999 switch (type) {
25000 case NODE_DSTR:
25001 nd_set_type(symbol, NODE_DSYM);
25002 break;
25003 case NODE_STR:
25004 symbol = str_to_sym_node(p, symbol, &RNODE(symbol)->nd_loc);
25005 break;
25006 default:
25007 compile_error(p, "unexpected node as symbol: %s", parser_node_name(type));
25008 }
25009 return list_append(p, symbols, symbol);
25010}
25011
25012static void
25013dregex_fragment_setenc(struct parser_params *p, rb_node_dregx_t *const dreg, int options)
25014{
25015 if (dreg->string) {
25016 reg_fragment_setenc(p, dreg->string, options);
25017 }
25018 for (struct RNode_LIST *list = dreg->nd_next; list; list = RNODE_LIST(list->nd_next)) {
25019 NODE *frag = list->nd_head;
25020 if (nd_type_p(frag, NODE_STR)) {
25021 reg_fragment_setenc(p, RNODE_STR(frag)->string, options);
25022 }
25023 else if (nd_type_p(frag, NODE_DSTR)) {
25024 dregex_fragment_setenc(p, RNODE_DSTR(frag), options);
25025 }
25026 }
25027}
25028
25029static NODE *
25030new_regexp(struct parser_params *p, NODE *node, int options, const YYLTYPE *loc, const YYLTYPE *opening_loc, const YYLTYPE *content_loc, const YYLTYPE *closing_loc)
25031{
25032 if (!node) {
25033 /* Check string is valid regex */
25034 rb_parser_string_t *str = STRING_NEW0();
25035 reg_compile(p, str, options);
25036 node = NEW_REGX(str, options, loc, opening_loc, content_loc, closing_loc);
25037 return node;
25038 }
25039 switch (nd_type(node)) {
25040 case NODE_STR:
25041 {
25042 /* Check string is valid regex */
25043 reg_compile(p, RNODE_STR(node)->string, options);
25044 node = str2regx(p, node, options, loc, opening_loc, content_loc, closing_loc);
25045 }
25046 break;
25047 default:
25048 node = NEW_DSTR0(STRING_NEW0(), 1, NEW_LIST(node, loc), loc);
25049 /* fall through */
25050 case NODE_DSTR:
25051 nd_set_type(node, NODE_DREGX);
25052 nd_set_loc(node, loc);
25053 rb_node_dregx_t *const dreg = RNODE_DREGX(node);
25054 dreg->as.nd_cflag = options & RE_OPTION_MASK;
25055 if (dreg->nd_next) {
25056 dregex_fragment_setenc(p, dreg, options);
25057 }
25058 if (options & RE_OPTION_ONCE) {
25059 node = NEW_ONCE(node, loc);
25060 }
25061 break;
25062 }
25063 return node;
25064}
25065
25066static rb_node_kw_arg_t *
25067new_kw_arg(struct parser_params *p, NODE *k, const YYLTYPE *loc)
25068{
25069 if (!k) return 0;
25070 return NEW_KW_ARG((k), loc);
25071}
25072
25073static NODE *
25074new_xstring(struct parser_params *p, NODE *node, const YYLTYPE *loc)
25075{
25076 if (!node) {
25077 NODE *xstr = NEW_XSTR(STRING_NEW0(), loc);
25078 return xstr;
25079 }
25080 switch (nd_type(node)) {
25081 case NODE_STR:
25082 nd_set_type(node, NODE_XSTR);
25083 nd_set_loc(node, loc);
25084 break;
25085 case NODE_DSTR:
25086 nd_set_type(node, NODE_DXSTR);
25087 nd_set_loc(node, loc);
25088 break;
25089 default:
25090 node = NEW_DXSTR(0, 1, NEW_LIST(node, loc), loc);
25091 break;
25092 }
25093 return node;
25094}
25095
25096static const
25097struct st_hash_type literal_type = {
25098 literal_cmp,
25099 literal_hash,
25100};
25101
25102static int nd_type_st_key_enable_p(NODE *node);
25103
25104static void
25105check_literal_when(struct parser_params *p, NODE *arg, const YYLTYPE *loc)
25106{
25107 /* See https://bugs.ruby-lang.org/issues/20331 for discussion about what is warned. */
25108 if (!arg || !p->case_labels) return;
25109 if (!nd_type_st_key_enable_p(arg)) return;
25110
25111 if (p->case_labels == CHECK_LITERAL_WHEN) {
25112 p->case_labels = st_init_table(&literal_type);
25113 }
25114 else {
25115 st_data_t line;
25116 if (st_lookup(p->case_labels, (st_data_t)arg, &line)) {
25117 rb_warning2("'when' clause on line %d duplicates 'when' clause on line %d and is ignored",
25118 WARN_I((int)nd_line(arg)), WARN_I((int)line));
25119 return;
25120 }
25121 }
25122 st_insert(p->case_labels, (st_data_t)arg, (st_data_t)p->ruby_sourceline);
25123}
25124
25125#ifdef RIPPER
25126static int
25127id_is_var(struct parser_params *p, ID id)
25128{
25129 if (is_notop_id(id)) {
25130 switch (id & ID_SCOPE_MASK) {
25131 case ID_GLOBAL: case ID_INSTANCE: case ID_CONST: case ID_CLASS:
25132 return 1;
25133 case ID_LOCAL:
25134 if (dyna_in_block(p)) {
25135 if (NUMPARAM_ID_P(id) || dvar_defined(p, id)) return 1;
25136 }
25137 if (local_id(p, id)) return 1;
25138 /* method call without arguments */
25139 return 0;
25140 }
25141 }
25142 compile_error(p, "identifier %"PRIsVALUE" is not valid to get", rb_id2str(id));
25143 return 0;
25144}
25145#endif
25146
25147static inline enum lex_state_e
25148parser_set_lex_state(struct parser_params *p, enum lex_state_e ls, int line)
25149{
25150 if (p->debug) {
25151 ls = rb_parser_trace_lex_state(p, p->lex.state, ls, line);
25152 }
25153 return p->lex.state = ls;
25154}
25155
25156#ifndef RIPPER
25157static void
25158flush_debug_buffer(struct parser_params *p, VALUE out, VALUE str)
25159{
25160 VALUE mesg = p->debug_buffer;
25161
25162 if (!NIL_P(mesg) && RSTRING_LEN(mesg)) {
25163 p->debug_buffer = Qnil;
25164 rb_io_puts(1, &mesg, out);
25165 }
25166 if (!NIL_P(str) && RSTRING_LEN(str)) {
25167 rb_io_write(p->debug_output, str);
25168 }
25169}
25170
25171static const char rb_parser_lex_state_names[][8] = {
25172 "BEG", "END", "ENDARG", "ENDFN", "ARG",
25173 "CMDARG", "MID", "FNAME", "DOT", "CLASS",
25174 "LABEL", "LABELED","FITEM",
25175};
25176
25177static VALUE
25178append_lex_state_name(struct parser_params *p, enum lex_state_e state, VALUE buf)
25179{
25180 int i, sep = 0;
25181 unsigned int mask = 1;
25182 static const char none[] = "NONE";
25183
25184 for (i = 0; i < EXPR_MAX_STATE; ++i, mask <<= 1) {
25185 if ((unsigned)state & mask) {
25186 if (sep) {
25187 rb_str_cat(buf, "|", 1);
25188 }
25189 sep = 1;
25190 rb_str_cat_cstr(buf, rb_parser_lex_state_names[i]);
25191 }
25192 }
25193 if (!sep) {
25194 rb_str_cat(buf, none, sizeof(none)-1);
25195 }
25196 return buf;
25197}
25198
25199enum lex_state_e
25200rb_parser_trace_lex_state(struct parser_params *p, enum lex_state_e from,
25201 enum lex_state_e to, int line)
25202{
25203 VALUE mesg;
25204 mesg = rb_str_new_cstr("lex_state: ");
25205 append_lex_state_name(p, from, mesg);
25206 rb_str_cat_cstr(mesg, " -> ");
25207 append_lex_state_name(p, to, mesg);
25208 rb_str_catf(mesg, " at line %d\n", line);
25209 flush_debug_buffer(p, p->debug_output, mesg);
25210 return to;
25211}
25212
25213VALUE
25214rb_parser_lex_state_name(struct parser_params *p, enum lex_state_e state)
25215{
25216 return rb_str_to_interned_str(append_lex_state_name(p, state, rb_str_new(0, 0)));
25217}
25218
25219static void
25220append_bitstack_value(struct parser_params *p, stack_type stack, VALUE mesg)
25221{
25222 if (stack == 0) {
25223 rb_str_cat_cstr(mesg, "0");
25224 }
25225 else {
25226 stack_type mask = (stack_type)1U << (CHAR_BIT * sizeof(stack_type) - 1);
25227 for (; mask && !(stack & mask); mask >>= 1) continue;
25228 for (; mask; mask >>= 1) rb_str_cat(mesg, stack & mask ? "1" : "0", 1);
25229 }
25230}
25231
25232void
25233rb_parser_show_bitstack(struct parser_params *p, stack_type stack,
25234 const char *name, int line)
25235{
25236 VALUE mesg = rb_sprintf("%s: ", name);
25237 append_bitstack_value(p, stack, mesg);
25238 rb_str_catf(mesg, " at line %d\n", line);
25239 flush_debug_buffer(p, p->debug_output, mesg);
25240}
25241
25242void
25243rb_parser_fatal(struct parser_params *p, const char *fmt, ...)
25244{
25245 va_list ap;
25246 VALUE mesg = rb_str_new_cstr("internal parser error: ");
25247
25248 va_start(ap, fmt);
25249 rb_str_vcatf(mesg, fmt, ap);
25250 va_end(ap);
25251 yyerror0(RSTRING_PTR(mesg));
25252 RB_GC_GUARD(mesg);
25253
25254 mesg = rb_str_new(0, 0);
25255 append_lex_state_name(p, p->lex.state, mesg);
25256 compile_error(p, "lex.state: %"PRIsVALUE, mesg);
25257 rb_str_resize(mesg, 0);
25258 append_bitstack_value(p, p->cond_stack, mesg);
25259 compile_error(p, "cond_stack: %"PRIsVALUE, mesg);
25260 rb_str_resize(mesg, 0);
25261 append_bitstack_value(p, p->cmdarg_stack, mesg);
25262 compile_error(p, "cmdarg_stack: %"PRIsVALUE, mesg);
25263 if (p->debug_output == rb_ractor_stdout())
25264 p->debug_output = rb_ractor_stderr();
25265 p->debug = TRUE;
25266}
25267
25268static YYLTYPE *
25269rb_parser_set_pos(YYLTYPE *yylloc, int sourceline, int beg_pos, int end_pos)
25270{
25271 yylloc->beg_pos.lineno = sourceline;
25272 yylloc->beg_pos.column = beg_pos;
25273 yylloc->end_pos.lineno = sourceline;
25274 yylloc->end_pos.column = end_pos;
25275 return yylloc;
25276}
25277
25278YYLTYPE *
25279rb_parser_set_location_from_strterm_heredoc(struct parser_params *p, rb_strterm_heredoc_t *here, YYLTYPE *yylloc)
25280{
25281 int sourceline = here->sourceline;
25282 int beg_pos = (int)here->offset - here->quote
25283 - (rb_strlen_lit("<<-") - !(here->func & STR_FUNC_INDENT));
25284 int end_pos = (int)here->offset + here->length + here->quote;
25285
25286 return rb_parser_set_pos(yylloc, sourceline, beg_pos, end_pos);
25287}
25288
25289YYLTYPE *
25290rb_parser_set_location_of_delayed_token(struct parser_params *p, YYLTYPE *yylloc)
25291{
25292 yylloc->beg_pos.lineno = p->delayed.beg_line;
25293 yylloc->beg_pos.column = p->delayed.beg_col;
25294 yylloc->end_pos.lineno = p->delayed.end_line;
25295 yylloc->end_pos.column = p->delayed.end_col;
25296
25297 return yylloc;
25298}
25299
25300YYLTYPE *
25301rb_parser_set_location_of_heredoc_end(struct parser_params *p, YYLTYPE *yylloc)
25302{
25303 int sourceline = p->ruby_sourceline;
25304 int beg_pos = (int)(p->lex.ptok - p->lex.pbeg);
25305 int end_pos = (int)(p->lex.pend - p->lex.pbeg);
25306 return rb_parser_set_pos(yylloc, sourceline, beg_pos, end_pos);
25307}
25308
25309YYLTYPE *
25310rb_parser_set_location_of_dummy_end(struct parser_params *p, YYLTYPE *yylloc)
25311{
25312 yylloc->end_pos = yylloc->beg_pos;
25313
25314 return yylloc;
25315}
25316
25317YYLTYPE *
25318rb_parser_set_location_of_none(struct parser_params *p, YYLTYPE *yylloc)
25319{
25320 int sourceline = p->ruby_sourceline;
25321 int beg_pos = (int)(p->lex.ptok - p->lex.pbeg);
25322 int end_pos = (int)(p->lex.ptok - p->lex.pbeg);
25323 return rb_parser_set_pos(yylloc, sourceline, beg_pos, end_pos);
25324}
25325
25326YYLTYPE *
25327rb_parser_set_location(struct parser_params *p, YYLTYPE *yylloc)
25328{
25329 int sourceline = p->ruby_sourceline;
25330 int beg_pos = (int)(p->lex.ptok - p->lex.pbeg);
25331 int end_pos = (int)(p->lex.pcur - p->lex.pbeg);
25332 return rb_parser_set_pos(yylloc, sourceline, beg_pos, end_pos);
25333}
25334#endif /* !RIPPER */
25335
25336static int
25337assignable0(struct parser_params *p, ID id, const char **err)
25338{
25339 if (!id) return -1;
25340 switch (id) {
25341 case keyword_self:
25342 *err = "Can't change the value of self";
25343 return -1;
25344 case keyword_nil:
25345 *err = "Can't assign to nil";
25346 return -1;
25347 case keyword_true:
25348 *err = "Can't assign to true";
25349 return -1;
25350 case keyword_false:
25351 *err = "Can't assign to false";
25352 return -1;
25353 case keyword__FILE__:
25354 *err = "Can't assign to __FILE__";
25355 return -1;
25356 case keyword__LINE__:
25357 *err = "Can't assign to __LINE__";
25358 return -1;
25359 case keyword__ENCODING__:
25360 *err = "Can't assign to __ENCODING__";
25361 return -1;
25362 }
25363 switch (id_type(id)) {
25364 case ID_LOCAL:
25365 if (dyna_in_block(p)) {
25366 if (p->max_numparam > NO_PARAM && NUMPARAM_ID_P(id)) {
25367 compile_error(p, "Can't assign to numbered parameter _%d",
25368 NUMPARAM_ID_TO_IDX(id));
25369 return -1;
25370 }
25371 if (dvar_curr(p, id)) return NODE_DASGN;
25372 if (dvar_defined(p, id)) return NODE_DASGN;
25373 if (local_id(p, id)) return NODE_LASGN;
25374 dyna_var(p, id);
25375 return NODE_DASGN;
25376 }
25377 else {
25378 if (!local_id(p, id)) local_var(p, id);
25379 return NODE_LASGN;
25380 }
25381 break;
25382 case ID_GLOBAL: return NODE_GASGN;
25383 case ID_INSTANCE: return NODE_IASGN;
25384 case ID_CONST:
25385 if (!p->ctxt.in_def) return NODE_CDECL;
25386 *err = "dynamic constant assignment";
25387 return -1;
25388 case ID_CLASS: return NODE_CVASGN;
25389 default:
25390 compile_error(p, "identifier %"PRIsVALUE" is not valid to set", rb_id2str(id));
25391 }
25392 return -1;
25393}
25394
25395static NODE*
25396assignable(struct parser_params *p, ID id, NODE *val, const YYLTYPE *loc)
25397{
25398 const char *err = 0;
25399 int node_type = assignable0(p, id, &err);
25400 switch (node_type) {
25401 case NODE_DASGN: return NEW_DASGN(id, val, loc);
25402 case NODE_LASGN: return NEW_LASGN(id, val, loc);
25403 case NODE_GASGN: return NEW_GASGN(id, val, loc);
25404 case NODE_IASGN: return NEW_IASGN(id, val, loc);
25405 case NODE_CDECL: return NEW_CDECL(id, val, 0, p->ctxt.shareable_constant_value, loc);
25406 case NODE_CVASGN: return NEW_CVASGN(id, val, loc);
25407 }
25408/* TODO: FIXME */
25409#ifndef RIPPER
25410 if (err) yyerror1(loc, err);
25411#else
25412 if (err) set_value(assign_error(p, err, p->s_lvalue));
25413#endif
25414 return NEW_ERROR(loc);
25415}
25416
25417static int
25418is_private_local_id(struct parser_params *p, ID name)
25419{
25420 VALUE s;
25421 if (name == idUScore) return 1;
25422 if (!is_local_id(name)) return 0;
25423 s = rb_id2str(name);
25424 if (!s) return 0;
25425 return RSTRING_PTR(s)[0] == '_';
25426}
25427
25428static int
25429shadowing_lvar_0(struct parser_params *p, ID name)
25430{
25431 if (dyna_in_block(p)) {
25432 if (dvar_curr(p, name)) {
25433 if (is_private_local_id(p, name)) return 1;
25434 yyerror0("duplicated argument name");
25435 }
25436 else if (dvar_defined(p, name) || local_id(p, name)) {
25437 vtable_add(p->lvtbl->vars, name);
25438 if (p->lvtbl->used) {
25439 vtable_add(p->lvtbl->used, (ID)p->ruby_sourceline | LVAR_USED);
25440 }
25441 return 0;
25442 }
25443 }
25444 else {
25445 if (local_id(p, name)) {
25446 if (is_private_local_id(p, name)) return 1;
25447 yyerror0("duplicated argument name");
25448 }
25449 }
25450 return 1;
25451}
25452
25453static ID
25454shadowing_lvar(struct parser_params *p, ID name)
25455{
25456 shadowing_lvar_0(p, name);
25457 return name;
25458}
25459
25460static void
25461new_bv(struct parser_params *p, ID name)
25462{
25463 if (!name) return;
25464 if (!is_local_id(name)) {
25465 compile_error(p, "invalid local variable - %"PRIsVALUE,
25466 rb_id2str(name));
25467 return;
25468 }
25469 if (!shadowing_lvar_0(p, name)) return;
25470 dyna_var(p, name);
25471 ID *vidp = 0;
25472 if (dvar_defined_ref(p, name, &vidp)) {
25473 if (vidp) *vidp |= LVAR_USED;
25474 }
25475}
25476
25477static void
25478aryset_check(struct parser_params *p, NODE *args)
25479{
25480 NODE *block = 0, *kwds = 0;
25481 if (args && nd_type_p(args, NODE_BLOCK_PASS)) {
25482 block = RNODE_BLOCK_PASS(args)->nd_body;
25483 args = RNODE_BLOCK_PASS(args)->nd_head;
25484 }
25485 if (args && nd_type_p(args, NODE_ARGSCAT)) {
25486 args = RNODE_ARGSCAT(args)->nd_body;
25487 }
25488 if (args && nd_type_p(args, NODE_ARGSPUSH)) {
25489 kwds = RNODE_ARGSPUSH(args)->nd_body;
25490 }
25491 else {
25492 for (NODE *next = args; next && nd_type_p(next, NODE_LIST);
25493 next = RNODE_LIST(next)->nd_next) {
25494 kwds = RNODE_LIST(next)->nd_head;
25495 }
25496 }
25497 if (kwds && nd_type_p(kwds, NODE_HASH) && !RNODE_HASH(kwds)->nd_brace) {
25498 yyerror1(&kwds->nd_loc, "keyword arg given in index assignment");
25499 }
25500 if (block) {
25501 yyerror1(&block->nd_loc, "block arg given in index assignment");
25502 }
25503}
25504
25505static NODE *
25506aryset(struct parser_params *p, NODE *recv, NODE *idx, const YYLTYPE *loc)
25507{
25508 aryset_check(p, idx);
25509 return NEW_ATTRASGN(recv, tASET, idx, loc);
25510}
25511
25512static void
25513block_dup_check(struct parser_params *p, NODE *node1, NODE *node2)
25514{
25515 if (node2 && node1 && nd_type_p(node1, NODE_BLOCK_PASS)) {
25516 compile_error(p, "both block arg and actual block given");
25517 }
25518}
25519
25520static NODE *
25521attrset(struct parser_params *p, NODE *recv, ID atype, ID id, const YYLTYPE *loc)
25522{
25523 if (!CALL_Q_P(atype)) id = rb_id_attrset(id);
25524 return NEW_ATTRASGN(recv, id, 0, loc);
25525}
25526
25527static VALUE
25528rb_backref_error(struct parser_params *p, NODE *node)
25529{
25530#ifndef RIPPER
25531# define ERR(...) (compile_error(p, __VA_ARGS__), Qtrue)
25532#else
25533# define ERR(...) rb_sprintf(__VA_ARGS__)
25534#endif
25535 switch (nd_type(node)) {
25536 case NODE_NTH_REF:
25537 return ERR("Can't set variable $%ld", RNODE_NTH_REF(node)->nd_nth);
25538 case NODE_BACK_REF:
25539 return ERR("Can't set variable $%c", (int)RNODE_BACK_REF(node)->nd_nth);
25540 }
25541#undef ERR
25542 UNREACHABLE_RETURN(Qfalse); /* only called on syntax error */
25543}
25544
25545static NODE *
25546arg_append(struct parser_params *p, NODE *node1, NODE *node2, const YYLTYPE *loc)
25547{
25548 if (!node1) return NEW_LIST(node2, &node2->nd_loc);
25549 switch (nd_type(node1)) {
25550 case NODE_LIST:
25551 return list_append(p, node1, node2);
25552 case NODE_BLOCK_PASS:
25553 RNODE_BLOCK_PASS(node1)->nd_head = arg_append(p, RNODE_BLOCK_PASS(node1)->nd_head, node2, loc);
25554 node1->nd_loc.end_pos = RNODE_BLOCK_PASS(node1)->nd_head->nd_loc.end_pos;
25555 return node1;
25556 case NODE_ARGSPUSH:
25557 RNODE_ARGSPUSH(node1)->nd_body = list_append(p, NEW_LIST(RNODE_ARGSPUSH(node1)->nd_body, &RNODE_ARGSPUSH(node1)->nd_body->nd_loc), node2);
25558 node1->nd_loc.end_pos = RNODE_ARGSPUSH(node1)->nd_body->nd_loc.end_pos;
25559 nd_set_type(node1, NODE_ARGSCAT);
25560 return node1;
25561 case NODE_ARGSCAT:
25562 if (!nd_type_p(RNODE_ARGSCAT(node1)->nd_body, NODE_LIST)) break;
25563 RNODE_ARGSCAT(node1)->nd_body = list_append(p, RNODE_ARGSCAT(node1)->nd_body, node2);
25564 node1->nd_loc.end_pos = RNODE_ARGSCAT(node1)->nd_body->nd_loc.end_pos;
25565 return node1;
25566 }
25567 return NEW_ARGSPUSH(node1, node2, loc);
25568}
25569
25570static NODE *
25571arg_concat(struct parser_params *p, NODE *node1, NODE *node2, const YYLTYPE *loc)
25572{
25573 if (!node2) return node1;
25574 switch (nd_type(node1)) {
25575 case NODE_BLOCK_PASS:
25576 if (RNODE_BLOCK_PASS(node1)->nd_head)
25577 RNODE_BLOCK_PASS(node1)->nd_head = arg_concat(p, RNODE_BLOCK_PASS(node1)->nd_head, node2, loc);
25578 else
25579 RNODE_LIST(node1)->nd_head = NEW_LIST(node2, loc);
25580 return node1;
25581 case NODE_ARGSPUSH:
25582 if (!nd_type_p(node2, NODE_LIST)) break;
25583 RNODE_ARGSPUSH(node1)->nd_body = list_concat(NEW_LIST(RNODE_ARGSPUSH(node1)->nd_body, loc), node2);
25584 nd_set_type(node1, NODE_ARGSCAT);
25585 return node1;
25586 case NODE_ARGSCAT:
25587 if (!nd_type_p(node2, NODE_LIST) ||
25588 !nd_type_p(RNODE_ARGSCAT(node1)->nd_body, NODE_LIST)) break;
25589 RNODE_ARGSCAT(node1)->nd_body = list_concat(RNODE_ARGSCAT(node1)->nd_body, node2);
25590 return node1;
25591 }
25592 return NEW_ARGSCAT(node1, node2, loc);
25593}
25594
25595static NODE *
25596last_arg_append(struct parser_params *p, NODE *args, NODE *last_arg, const YYLTYPE *loc)
25597{
25598 NODE *n1;
25599 if ((n1 = splat_array(args)) != 0) {
25600 return list_append(p, n1, last_arg);
25601 }
25602 return arg_append(p, args, last_arg, loc);
25603}
25604
25605static NODE *
25606rest_arg_append(struct parser_params *p, NODE *args, NODE *rest_arg, const YYLTYPE *loc)
25607{
25608 NODE *n1;
25609 if ((nd_type_p(rest_arg, NODE_LIST)) && (n1 = splat_array(args)) != 0) {
25610 return list_concat(n1, rest_arg);
25611 }
25612 return arg_concat(p, args, rest_arg, loc);
25613}
25614
25615static NODE *
25616splat_array(NODE* node)
25617{
25618 if (nd_type_p(node, NODE_SPLAT)) node = RNODE_SPLAT(node)->nd_head;
25619 if (nd_type_p(node, NODE_LIST)) return node;
25620 return 0;
25621}
25622
25623static void
25624mark_lvar_used(struct parser_params *p, NODE *rhs)
25625{
25626 ID *vidp = NULL;
25627 if (!rhs) return;
25628 switch (nd_type(rhs)) {
25629 case NODE_LASGN:
25630 if (local_id_ref(p, RNODE_LASGN(rhs)->nd_vid, &vidp)) {
25631 if (vidp) *vidp |= LVAR_USED;
25632 }
25633 break;
25634 case NODE_DASGN:
25635 if (dvar_defined_ref(p, RNODE_DASGN(rhs)->nd_vid, &vidp)) {
25636 if (vidp) *vidp |= LVAR_USED;
25637 }
25638 break;
25639#if 0
25640 case NODE_MASGN:
25641 for (rhs = rhs->nd_head; rhs; rhs = rhs->nd_next) {
25642 mark_lvar_used(p, rhs->nd_head);
25643 }
25644 break;
25645#endif
25646 }
25647}
25648
25649static int is_static_content(NODE *node);
25650
25651static NODE *
25652node_assign(struct parser_params *p, NODE *lhs, NODE *rhs, struct lex_context ctxt, const YYLTYPE *loc)
25653{
25654 if (!lhs) return 0;
25655
25656 switch (nd_type(lhs)) {
25657 case NODE_CDECL:
25658 case NODE_GASGN:
25659 case NODE_IASGN:
25660 case NODE_LASGN:
25661 case NODE_DASGN:
25662 case NODE_MASGN:
25663 case NODE_CVASGN:
25664 set_nd_value(p, lhs, rhs);
25665 nd_set_loc(lhs, loc);
25666 break;
25667
25668 case NODE_ATTRASGN:
25669 RNODE_ATTRASGN(lhs)->nd_args = arg_append(p, RNODE_ATTRASGN(lhs)->nd_args, rhs, loc);
25670 nd_set_loc(lhs, loc);
25671 break;
25672
25673 default:
25674 /* should not happen */
25675 break;
25676 }
25677
25678 return lhs;
25679}
25680
25681static NODE *
25682value_expr_check(struct parser_params *p, NODE *node)
25683{
25684 NODE *void_node = 0, *vn;
25685
25686 if (!node) {
25687 rb_warning0("empty expression");
25688 }
25689 while (node) {
25690 switch (nd_type(node)) {
25691 case NODE_ENSURE:
25692 vn = RNODE_ENSURE(node)->nd_head;
25693 node = RNODE_ENSURE(node)->nd_ensr;
25694 /* nd_ensr should not be NULL, check it out next */
25695 if (vn && (vn = value_expr_check(p, vn))) {
25696 goto found;
25697 }
25698 break;
25699
25700 case NODE_RESCUE:
25701 /* void only if all children are void */
25702 vn = RNODE_RESCUE(node)->nd_head;
25703 if (!vn || !(vn = value_expr_check(p, vn))) {
25704 if (!RNODE_RESCUE(node)->nd_else) return NULL;
25705 }
25706 if (!void_node) void_node = vn;
25707 for (NODE *r = RNODE_RESCUE(node)->nd_resq; r; r = RNODE_RESBODY(r)->nd_next) {
25708 if (!nd_type_p(r, NODE_RESBODY)) {
25709 compile_error(p, "unexpected node");
25710 return NULL;
25711 }
25712 if (!(vn = value_expr_check(p, RNODE_RESBODY(r)->nd_body))) {
25713 return NULL;
25714 }
25715 if (!void_node) void_node = vn;
25716 }
25717 node = RNODE_RESCUE(node)->nd_else;
25718 if (!node) return void_node;
25719 break;
25720
25721 case NODE_RETURN:
25722 case NODE_BREAK:
25723 case NODE_NEXT:
25724 case NODE_REDO:
25725 case NODE_RETRY:
25726 goto found;
25727
25728 case NODE_CASE:
25729 case NODE_CASE2:
25730 for (node = RNODE_CASE(node)->nd_body;
25731 node && nd_type_p(node, NODE_WHEN);
25732 node = RNODE_WHEN(node)->nd_next) {
25733 if (!(vn = value_expr_check(p, RNODE_WHEN(node)->nd_body))) {
25734 return NULL;
25735 }
25736 if (!void_node) void_node = vn;
25737 }
25738 break;
25739
25740 case NODE_CASE3:
25741 {
25742 NODE *in = RNODE_CASE3(node)->nd_body;
25743 if (!in || !nd_type_p(in, NODE_IN)) {
25744 compile_error(p, "unexpected node");
25745 return NULL;
25746 }
25747 if (!RNODE_IN(in)->nd_body) {
25748 /* single line pattern matching with "=>" operator */
25749 goto found;
25750 }
25751 do {
25752 vn = value_expr_check(p, RNODE_IN(in)->nd_body);
25753 if (!vn) return NULL;
25754 if (!void_node) void_node = vn;
25755 in = RNODE_IN(in)->nd_next;
25756 } while (in && nd_type_p(in, NODE_IN));
25757 node = in; /* else */
25758 }
25759 break;
25760
25761 case NODE_BLOCK:
25762 while (RNODE_BLOCK(node)->nd_next) {
25763 vn = value_expr_check(p, RNODE_BLOCK(node)->nd_head);
25764 if (vn) return vn;
25765 node = RNODE_BLOCK(node)->nd_next;
25766 }
25767 node = RNODE_BLOCK(node)->nd_head;
25768 break;
25769
25770 case NODE_BEGIN:
25771 node = RNODE_BEGIN(node)->nd_body;
25772 break;
25773
25774 case NODE_IF:
25775 case NODE_UNLESS:
25776 if (!RNODE_IF(node)->nd_body) {
25777 return NULL;
25778 }
25779 else if (!RNODE_IF(node)->nd_else) {
25780 return NULL;
25781 }
25782 vn = value_expr_check(p, RNODE_IF(node)->nd_body);
25783 if (!vn) return NULL;
25784 if (!void_node) void_node = vn;
25785 node = RNODE_IF(node)->nd_else;
25786 break;
25787
25788 case NODE_AND:
25789 case NODE_OR:
25790 /* The left operand was already checked for a value when logop()
25791 * built this node, so stop here instead of re-reporting the same
25792 * void value once per operator in a chain. */
25793 return NULL;
25794
25795 case NODE_LASGN:
25796 case NODE_DASGN:
25797 case NODE_MASGN:
25798 mark_lvar_used(p, node);
25799 return NULL;
25800
25801 default:
25802 return NULL;
25803 }
25804 }
25805
25806 return NULL;
25807
25808 found:
25809 /* return the first found node */
25810 return void_node ? void_node : node;
25811}
25812
25813static int
25814value_expr(struct parser_params *p, NODE *node)
25815{
25816 NODE *void_node = value_expr_check(p, node);
25817 if (void_node) {
25818 yyerror1(&void_node->nd_loc, "void value expression");
25819 /* or "control never reach"? */
25820 return FALSE;
25821 }
25822 return TRUE;
25823}
25824
25825static void
25826void_expr(struct parser_params *p, NODE *node)
25827{
25828 const char *useless = 0;
25829
25830 if (!RTEST(ruby_verbose)) return;
25831
25832 if (!node || !(node = nd_once_body(node))) return;
25833 switch (nd_type(node)) {
25834 case NODE_OPCALL:
25835 switch (RNODE_OPCALL(node)->nd_mid) {
25836 case '+':
25837 case '-':
25838 case '*':
25839 case '/':
25840 case '%':
25841 case tPOW:
25842 case tUPLUS:
25843 case tUMINUS:
25844 case '|':
25845 case '^':
25846 case '&':
25847 case tCMP:
25848 case '>':
25849 case tGEQ:
25850 case '<':
25851 case tLEQ:
25852 case tEQ:
25853 case tNEQ:
25854 useless = rb_id2name(RNODE_OPCALL(node)->nd_mid);
25855 break;
25856 }
25857 break;
25858
25859 case NODE_LVAR:
25860 case NODE_DVAR:
25861 case NODE_GVAR:
25862 case NODE_IVAR:
25863 case NODE_CVAR:
25864 case NODE_NTH_REF:
25865 case NODE_BACK_REF:
25866 useless = "a variable";
25867 break;
25868 case NODE_CONST:
25869 useless = "a constant";
25870 break;
25871 case NODE_SYM:
25872 case NODE_LINE:
25873 case NODE_FILE:
25874 case NODE_ENCODING:
25875 case NODE_INTEGER:
25876 case NODE_FLOAT:
25877 case NODE_RATIONAL:
25878 case NODE_IMAGINARY:
25879 case NODE_STR:
25880 case NODE_DSTR:
25881 case NODE_REGX:
25882 case NODE_DREGX:
25883 useless = "a literal";
25884 break;
25885 case NODE_COLON2:
25886 case NODE_COLON3:
25887 useless = "::";
25888 break;
25889 case NODE_DOT2:
25890 useless = "..";
25891 break;
25892 case NODE_DOT3:
25893 useless = "...";
25894 break;
25895 case NODE_SELF:
25896 useless = "self";
25897 break;
25898 case NODE_NIL:
25899 useless = "nil";
25900 break;
25901 case NODE_TRUE:
25902 useless = "true";
25903 break;
25904 case NODE_FALSE:
25905 useless = "false";
25906 break;
25907 case NODE_DEFINED:
25908 useless = "defined?";
25909 break;
25910 }
25911
25912 if (useless) {
25913 rb_warn1L(nd_line(node), "possibly useless use of %s in void context", WARN_S(useless));
25914 }
25915}
25916
25917/* warns useless use of block and returns the last statement node */
25918static NODE *
25919void_stmts(struct parser_params *p, NODE *node)
25920{
25921 NODE *const n = node;
25922 if (!RTEST(ruby_verbose)) return n;
25923 if (!node) return n;
25924 if (!nd_type_p(node, NODE_BLOCK)) return n;
25925
25926 while (RNODE_BLOCK(node)->nd_next) {
25927 void_expr(p, RNODE_BLOCK(node)->nd_head);
25928 node = RNODE_BLOCK(node)->nd_next;
25929 }
25930 return RNODE_BLOCK(node)->nd_head;
25931}
25932
25933static NODE *
25934remove_begin(NODE *node)
25935{
25936 NODE **n = &node, *n1 = node;
25937 while (n1 && nd_type_p(n1, NODE_BEGIN) && RNODE_BEGIN(n1)->nd_body) {
25938 *n = n1 = RNODE_BEGIN(n1)->nd_body;
25939 }
25940 return node;
25941}
25942
25943static void
25944reduce_nodes(struct parser_params *p, NODE **body)
25945{
25946 NODE *node = *body;
25947
25948 if (!node) {
25949 *body = NEW_NIL(&NULL_LOC);
25950 return;
25951 }
25952#define subnodes(type, n1, n2) \
25953 ((!type(node)->n1) ? (type(node)->n2 ? (body = &type(node)->n2, 1) : 0) : \
25954 (!type(node)->n2) ? (body = &type(node)->n1, 1) : \
25955 (reduce_nodes(p, &type(node)->n1), body = &type(node)->n2, 1))
25956
25957 while (node) {
25958 int newline = (int)nd_fl_newline(node);
25959 switch (nd_type(node)) {
25960 case NODE_NIL:
25961 // Keep an explicit nil in a method's tail (value) position when it
25962 // is on its own line, so it still emits a :line event and records
25963 // line coverage for that line. [Bug #22302]
25964 if (newline) return;
25965 end:
25966 *body = 0;
25967 return;
25968 case NODE_BEGIN:
25969 *body = node = RNODE_BEGIN(node)->nd_body;
25970 if (newline && node) nd_set_fl_newline(node);
25971 continue;
25972 case NODE_BLOCK:
25973 body = &RNODE_BLOCK(RNODE_BLOCK(node)->nd_end)->nd_head;
25974 break;
25975 case NODE_IF:
25976 case NODE_UNLESS:
25977 if (subnodes(RNODE_IF, nd_body, nd_else)) break;
25978 return;
25979 case NODE_CASE:
25980 body = &RNODE_CASE(node)->nd_body;
25981 break;
25982 case NODE_WHEN:
25983 if (!subnodes(RNODE_WHEN, nd_body, nd_next)) goto end;
25984 break;
25985 case NODE_ENSURE:
25986 body = &RNODE_ENSURE(node)->nd_head;
25987 break;
25988 case NODE_RESCUE:
25989 newline = 0; // RESBODY should not be a NEWLINE
25990 if (RNODE_RESCUE(node)->nd_else) {
25991 body = &RNODE_RESCUE(node)->nd_resq;
25992 break;
25993 }
25994 if (!subnodes(RNODE_RESCUE, nd_head, nd_resq)) goto end;
25995 break;
25996 default:
25997 return;
25998 }
25999 node = *body;
26000 if (newline && node) nd_set_fl_newline(node);
26001 }
26002
26003#undef subnodes
26004}
26005
26006static int
26007is_static_content(NODE *node)
26008{
26009 if (!node) return 1;
26010 switch (nd_type(node)) {
26011 case NODE_HASH:
26012 if (!(node = RNODE_HASH(node)->nd_head)) break;
26013 case NODE_LIST:
26014 do {
26015 if (!is_static_content(RNODE_LIST(node)->nd_head)) return 0;
26016 } while ((node = RNODE_LIST(node)->nd_next) != 0);
26017 case NODE_SYM:
26018 case NODE_REGX:
26019 case NODE_LINE:
26020 case NODE_FILE:
26021 case NODE_ENCODING:
26022 case NODE_INTEGER:
26023 case NODE_FLOAT:
26024 case NODE_RATIONAL:
26025 case NODE_IMAGINARY:
26026 case NODE_STR:
26027 case NODE_NIL:
26028 case NODE_TRUE:
26029 case NODE_FALSE:
26030 case NODE_ZLIST:
26031 break;
26032 default:
26033 return 0;
26034 }
26035 return 1;
26036}
26037
26038static int
26039assign_in_cond(struct parser_params *p, NODE *node)
26040{
26041 switch (nd_type(node)) {
26042 case NODE_MASGN:
26043 case NODE_LASGN:
26044 case NODE_DASGN:
26045 case NODE_GASGN:
26046 case NODE_IASGN:
26047 case NODE_CVASGN:
26048 case NODE_CDECL:
26049 break;
26050
26051 default:
26052 return 0;
26053 }
26054
26055 if (!get_nd_value(p, node)) return 1;
26056 if (is_static_content(get_nd_value(p, node))) {
26057 /* reports always */
26058 rb_warn0L(nd_line(get_nd_value(p, node)), "found '= literal' in conditional, should be ==");
26059 }
26060 return 1;
26061}
26062
26063enum cond_type {
26064 COND_IN_OP,
26065 COND_IN_COND,
26066 COND_IN_FF
26067};
26068
26069#define SWITCH_BY_COND_TYPE(t, w, arg) do { \
26070 switch (t) { \
26071 case COND_IN_OP: break; \
26072 case COND_IN_COND: rb_##w##0(arg "literal in condition"); break; \
26073 case COND_IN_FF: rb_##w##0(arg "literal in flip-flop"); break; \
26074 } \
26075} while (0)
26076
26077static NODE *cond0(struct parser_params*,NODE*,enum cond_type,const YYLTYPE*,bool);
26078
26079static NODE*
26080range_op(struct parser_params *p, NODE *node, const YYLTYPE *loc)
26081{
26082 enum node_type type;
26083
26084 if (node == 0) return 0;
26085
26086 type = nd_type(node);
26087 value_expr(p, node);
26088 if (type == NODE_INTEGER) {
26089 if (!e_option_supplied(p)) rb_warn0L(nd_line(node), "integer literal in flip-flop");
26090 ID lineno = rb_intern("$.");
26091 return NEW_CALL(node, tEQ, NEW_LIST(NEW_GVAR(lineno, loc), loc), loc);
26092 }
26093 return cond0(p, node, COND_IN_FF, loc, true);
26094}
26095
26096static NODE*
26097cond0(struct parser_params *p, NODE *node, enum cond_type type, const YYLTYPE *loc, bool top)
26098{
26099 if (node == 0) return 0;
26100 if (!(node = nd_once_body(node))) return 0;
26101 assign_in_cond(p, node);
26102
26103 switch (nd_type(node)) {
26104 case NODE_BEGIN:
26105 RNODE_BEGIN(node)->nd_body = cond0(p, RNODE_BEGIN(node)->nd_body, type, loc, top);
26106 break;
26107
26108 case NODE_DSTR:
26109 case NODE_EVSTR:
26110 case NODE_STR:
26111 case NODE_FILE:
26112 SWITCH_BY_COND_TYPE(type, warn, "string ");
26113 break;
26114
26115 case NODE_REGX:
26116 if (!e_option_supplied(p)) SWITCH_BY_COND_TYPE(type, warn, "regex ");
26117 nd_set_type(node, NODE_MATCH);
26118 break;
26119
26120 case NODE_DREGX:
26121 if (!e_option_supplied(p)) SWITCH_BY_COND_TYPE(type, warning, "regex ");
26122
26123 return NEW_MATCH2(node, NEW_GVAR(idLASTLINE, loc), loc);
26124
26125 case NODE_BLOCK:
26126 {
26127 NODE *end = RNODE_BLOCK(node)->nd_end;
26128 NODE **expr = &RNODE_BLOCK(end)->nd_head;
26129 if (top) top = node == end;
26130 *expr = cond0(p, *expr, type, loc, top);
26131 }
26132 break;
26133
26134 case NODE_AND:
26135 case NODE_OR:
26136 RNODE_AND(node)->nd_1st = cond0(p, RNODE_AND(node)->nd_1st, COND_IN_COND, loc, true);
26137 RNODE_AND(node)->nd_2nd = cond0(p, RNODE_AND(node)->nd_2nd, COND_IN_COND, loc, true);
26138 break;
26139
26140 case NODE_DOT2:
26141 case NODE_DOT3:
26142 if (!top) break;
26143 RNODE_DOT2(node)->nd_beg = range_op(p, RNODE_DOT2(node)->nd_beg, loc);
26144 RNODE_DOT2(node)->nd_end = range_op(p, RNODE_DOT2(node)->nd_end, loc);
26145 switch (nd_type(node)) {
26146 case NODE_DOT2:
26147 nd_set_type(node,NODE_FLIP2);
26148 rb_node_flip2_t *flip2 = RNODE_FLIP2(node); /* for debug info */
26149 (void)flip2;
26150 break;
26151 case NODE_DOT3:
26152 nd_set_type(node, NODE_FLIP3);
26153 rb_node_flip3_t *flip3 = RNODE_FLIP3(node); /* for debug info */
26154 (void)flip3;
26155 break;
26156 }
26157 break;
26158
26159 case NODE_SYM:
26160 case NODE_DSYM:
26161 SWITCH_BY_COND_TYPE(type, warning, "symbol ");
26162 break;
26163
26164 case NODE_LINE:
26165 case NODE_ENCODING:
26166 case NODE_INTEGER:
26167 case NODE_FLOAT:
26168 case NODE_RATIONAL:
26169 case NODE_IMAGINARY:
26170 SWITCH_BY_COND_TYPE(type, warning, "");
26171 break;
26172
26173 default:
26174 break;
26175 }
26176 return node;
26177}
26178
26179static NODE*
26180cond(struct parser_params *p, NODE *node, const YYLTYPE *loc)
26181{
26182 if (node == 0) return 0;
26183 return cond0(p, node, COND_IN_COND, loc, true);
26184}
26185
26186static NODE*
26187method_cond(struct parser_params *p, NODE *node, const YYLTYPE *loc)
26188{
26189 if (node == 0) return 0;
26190 return cond0(p, node, COND_IN_OP, loc, true);
26191}
26192
26193static NODE*
26194new_nil_at(struct parser_params *p, const rb_code_position_t *pos)
26195{
26196 YYLTYPE loc = {*pos, *pos};
26197 return NEW_NIL(&loc);
26198}
26199
26200static NODE*
26201new_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)
26202{
26203 if (!cc) return right;
26204 cc = cond0(p, cc, COND_IN_COND, loc, true);
26205 return newline_node(NEW_IF(cc, left, right, loc, if_keyword_loc, then_keyword_loc, end_keyword_loc));
26206}
26207
26208static NODE*
26209new_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)
26210{
26211 if (!cc) return right;
26212 cc = cond0(p, cc, COND_IN_COND, loc, true);
26213 return newline_node(NEW_UNLESS(cc, left, right, loc, keyword_loc, then_keyword_loc, end_keyword_loc));
26214}
26215
26216#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))
26217
26218/* A cached logop tail is usable only if it is still a node of the chain's type
26219 * whose nd_2nd is the insertion point, i.e. not itself another node of that
26220 * type. This rejects a stale cache left over from an earlier parse. */
26221static int
26222logop_valid_tail(NODE *tail, enum node_type type)
26223{
26224 NODE *second;
26225 return tail && nd_type_p(tail, type) &&
26226 ((second = RNODE_AND(tail)->nd_2nd) == 0 || !nd_type_p(second, type));
26227}
26228
26229static NODE*
26230logop(struct parser_params *p, ID id, NODE *left, NODE *right,
26231 const YYLTYPE *op_loc, const YYLTYPE *loc)
26232{
26233 enum node_type type = id == idAND || id == idANDOP ? NODE_AND : NODE_OR;
26234 NODE *op;
26235 /* Snapshot the cache from the previous logop() call before overwriting it. */
26236 NODE *prev_head = p->logop.head;
26237 NODE *prev_tail = p->logop.tail;
26238 NODE *node, *second;
26239 value_expr(p, left);
26240 if (left && nd_type_p(left, type)) {
26241 /* The insertion point is the far end of left's right branch.
26242 * Reusing the cached tail keeps a chain such as `a && a && ... && a`
26243 * linear instead of rescanning the whole branch on every operator. The
26244 * cache is validated (its nd_2nd is not another node of the same type)
26245 * so a stale entry falls back to the scan. */
26246 if (left == prev_head && logop_valid_tail(prev_tail, type)) {
26247 node = prev_tail;
26248 }
26249 else {
26250 node = left;
26251 while ((second = RNODE_AND(node)->nd_2nd) != 0 && nd_type_p(second, type)) {
26252 node = second;
26253 }
26254 }
26255 second = RNODE_AND(node)->nd_2nd;
26256 RNODE_AND(node)->nd_2nd = NEW_AND_OR(type, second, right, loc, op_loc);
26257 nd_set_line(RNODE_AND(node)->nd_2nd, op_loc->beg_pos.lineno);
26258 left->nd_loc.end_pos = loc->end_pos;
26259 p->logop.head = left;
26260 p->logop.tail = RNODE_AND(node)->nd_2nd;
26261 return left;
26262 }
26263 op = NEW_AND_OR(type, left, right, loc, op_loc);
26264 nd_set_line(op, op_loc->beg_pos.lineno);
26265 /* Record where the next operator will extend op, mirroring the scan the
26266 * chained branch above would perform: if right is itself a chain of the
26267 * same type (from parentheses), its far end; otherwise op itself. */
26268 p->logop.head = op;
26269 if (right == prev_head && logop_valid_tail(prev_tail, type)) {
26270 p->logop.tail = prev_tail;
26271 }
26272 else if (right && nd_type_p(right, type)) {
26273 node = right;
26274 while ((second = RNODE_AND(node)->nd_2nd) != 0 && nd_type_p(second, type)) {
26275 node = second;
26276 }
26277 p->logop.tail = node;
26278 }
26279 else {
26280 p->logop.tail = op;
26281 }
26282 return op;
26283}
26284
26285#undef NEW_AND_OR
26286
26287static void
26288no_blockarg(struct parser_params *p, NODE *node)
26289{
26290 if (nd_type_p(node, NODE_BLOCK_PASS)) {
26291 compile_error(p, "block argument should not be given");
26292 }
26293}
26294
26295static NODE *
26296ret_args(struct parser_params *p, NODE *node)
26297{
26298 if (node) {
26299 no_blockarg(p, node);
26300 if (nd_type_p(node, NODE_LIST) && !RNODE_LIST(node)->nd_next) {
26301 node = RNODE_LIST(node)->nd_head;
26302 }
26303 }
26304 return node;
26305}
26306
26307static NODE*
26308negate_lit(struct parser_params *p, NODE* node, const YYLTYPE *loc)
26309{
26310 switch (nd_type(node)) {
26311 case NODE_INTEGER:
26312 RNODE_INTEGER(node)->minus = TRUE;
26313 break;
26314 case NODE_FLOAT:
26315 RNODE_FLOAT(node)->minus = TRUE;
26316 break;
26317 case NODE_RATIONAL:
26318 RNODE_RATIONAL(node)->minus = TRUE;
26319 break;
26320 case NODE_IMAGINARY:
26321 RNODE_IMAGINARY(node)->minus = TRUE;
26322 break;
26323 }
26324 node->nd_loc = *loc;
26325 return node;
26326}
26327
26328static NODE *
26329arg_blk_pass(NODE *node1, rb_node_block_pass_t *node2)
26330{
26331 if (node2) {
26332 if (!node1) return (NODE *)node2;
26333 node2->nd_head = node1;
26334 nd_set_first_lineno(node2, nd_first_lineno(node1));
26335 nd_set_first_column(node2, nd_first_column(node1));
26336 return (NODE *)node2;
26337 }
26338 return node1;
26339}
26340
26341static bool
26342args_info_empty_p(struct rb_args_info *args)
26343{
26344 if (args->pre_args_num) return false;
26345 if (args->post_args_num) return false;
26346 if (args->rest_arg) return false;
26347 if (args->opt_args) return false;
26348 if (args->block_arg) return false;
26349 if (args->kw_args) return false;
26350 if (args->kw_rest_arg) return false;
26351 return true;
26352}
26353
26354static rb_node_args_t *
26355new_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)
26356{
26357 struct rb_args_info *args = &tail->nd_ainfo;
26358
26359 if (args->forwarding) {
26360 if (rest_arg) {
26361 yyerror1(&RNODE(tail)->nd_loc, "... after rest argument");
26362 return tail;
26363 }
26364 rest_arg = idFWD_REST;
26365 }
26366
26367 args->pre_args_num = pre_args ? pre_args->nd_plen : 0;
26368 args->pre_init = pre_args ? pre_args->nd_next : 0;
26369
26370 args->post_args_num = post_args ? post_args->nd_plen : 0;
26371 args->post_init = post_args ? post_args->nd_next : 0;
26372 args->first_post_arg = post_args ? post_args->nd_pid : 0;
26373
26374 args->rest_arg = rest_arg;
26375
26376 args->opt_args = opt_args;
26377
26378 nd_set_loc(RNODE(tail), loc);
26379
26380 return tail;
26381}
26382
26383static rb_node_args_t *
26384new_args_tail(struct parser_params *p, rb_node_kw_arg_t *kw_args, ID kw_rest_arg, ID block, const YYLTYPE *kw_rest_loc)
26385{
26386 rb_node_args_t *node = NEW_ARGS(&NULL_LOC);
26387 struct rb_args_info *args = &node->nd_ainfo;
26388 if (p->error_p) return node;
26389
26390 if (block == idNil) {
26391 block = 0;
26392 args->no_blockarg = TRUE;
26393 }
26394 args->block_arg = block;
26395 args->kw_args = kw_args;
26396
26397 if (kw_args) {
26398 /*
26399 * def foo(k1: 1, kr1:, k2: 2, **krest, &b)
26400 * variable order: k1, kr1, k2, &b, internal_id, krest
26401 * #=> <reorder>
26402 * variable order: kr1, k1, k2, internal_id, krest, &b
26403 */
26404 ID kw_bits = internal_id(p), *required_kw_vars, *kw_vars;
26405 struct vtable *vtargs = p->lvtbl->args;
26406 rb_node_kw_arg_t *kwn = kw_args;
26407
26408 if (block) block = vtargs->tbl[vtargs->pos-1];
26409 vtable_pop(vtargs, !!block + !!kw_rest_arg);
26410 required_kw_vars = kw_vars = &vtargs->tbl[vtargs->pos];
26411 while (kwn) {
26412 if (!NODE_REQUIRED_KEYWORD_P(get_nd_value(p, kwn->nd_body)))
26413 --kw_vars;
26414 --required_kw_vars;
26415 kwn = kwn->nd_next;
26416 }
26417
26418 for (kwn = kw_args; kwn; kwn = kwn->nd_next) {
26419 ID vid = get_nd_vid(p, kwn->nd_body);
26420 if (NODE_REQUIRED_KEYWORD_P(get_nd_value(p, kwn->nd_body))) {
26421 *required_kw_vars++ = vid;
26422 }
26423 else {
26424 *kw_vars++ = vid;
26425 }
26426 }
26427
26428 arg_var(p, kw_bits);
26429 if (kw_rest_arg) arg_var(p, kw_rest_arg);
26430 if (block) arg_var(p, block);
26431
26432 args->kw_rest_arg = NEW_DVAR(kw_rest_arg, kw_rest_loc);
26433 }
26434 else if (kw_rest_arg == idNil) {
26435 args->no_kwarg = 1;
26436 }
26437 else if (kw_rest_arg) {
26438 args->kw_rest_arg = NEW_DVAR(kw_rest_arg, kw_rest_loc);
26439 }
26440
26441 return node;
26442}
26443
26444static rb_node_args_t *
26445args_with_numbered(struct parser_params *p, rb_node_args_t *args, int max_numparam, ID it_id)
26446{
26447 if (max_numparam > NO_PARAM || it_id) {
26448 if (!args) {
26449 YYLTYPE loc = RUBY_INIT_YYLLOC();
26450 args = new_empty_args_tail(p, 0);
26451 nd_set_loc(RNODE(args), &loc);
26452 }
26453 args->nd_ainfo.pre_args_num = it_id ? 1 : max_numparam;
26454 }
26455 return args;
26456}
26457
26458static NODE*
26459new_array_pattern(struct parser_params *p, NODE *constant, NODE *pre_arg, NODE *aryptn, const YYLTYPE *loc)
26460{
26461 RNODE_ARYPTN(aryptn)->nd_pconst = constant;
26462
26463 if (pre_arg) {
26464 NODE *pre_args = NEW_LIST(pre_arg, loc);
26465 if (RNODE_ARYPTN(aryptn)->pre_args) {
26466 RNODE_ARYPTN(aryptn)->pre_args = list_concat(pre_args, RNODE_ARYPTN(aryptn)->pre_args);
26467 }
26468 else {
26469 RNODE_ARYPTN(aryptn)->pre_args = pre_args;
26470 }
26471 }
26472 return aryptn;
26473}
26474
26475static NODE*
26476new_array_pattern_tail(struct parser_params *p, NODE *pre_args, int has_rest, NODE *rest_arg, NODE *post_args, const YYLTYPE *loc)
26477{
26478 if (has_rest) {
26479 rest_arg = rest_arg ? rest_arg : NODE_SPECIAL_NO_NAME_REST;
26480 }
26481 else {
26482 rest_arg = NULL;
26483 }
26484 NODE *node = NEW_ARYPTN(pre_args, rest_arg, post_args, loc);
26485
26486 return node;
26487}
26488
26489static NODE*
26490new_find_pattern(struct parser_params *p, NODE *constant, NODE *fndptn, const YYLTYPE *loc)
26491{
26492 RNODE_FNDPTN(fndptn)->nd_pconst = constant;
26493
26494 return fndptn;
26495}
26496
26497static NODE*
26498new_find_pattern_tail(struct parser_params *p, NODE *pre_rest_arg, NODE *args, NODE *post_rest_arg, const YYLTYPE *loc)
26499{
26500 pre_rest_arg = pre_rest_arg ? pre_rest_arg : NODE_SPECIAL_NO_NAME_REST;
26501 post_rest_arg = post_rest_arg ? post_rest_arg : NODE_SPECIAL_NO_NAME_REST;
26502 NODE *node = NEW_FNDPTN(pre_rest_arg, args, post_rest_arg, loc);
26503
26504 return node;
26505}
26506
26507static NODE*
26508new_hash_pattern(struct parser_params *p, NODE *constant, NODE *hshptn, const YYLTYPE *loc)
26509{
26510 RNODE_HSHPTN(hshptn)->nd_pconst = constant;
26511 return hshptn;
26512}
26513
26514static NODE*
26515new_hash_pattern_tail(struct parser_params *p, NODE *kw_args, ID kw_rest_arg, const YYLTYPE *loc)
26516{
26517 NODE *node, *kw_rest_arg_node;
26518
26519 if (kw_rest_arg == idNil) {
26520 kw_rest_arg_node = NODE_SPECIAL_NO_REST_KEYWORD;
26521 }
26522 else if (kw_rest_arg) {
26523 kw_rest_arg_node = assignable(p, kw_rest_arg, 0, loc);
26524 }
26525 else {
26526 kw_rest_arg_node = NULL;
26527 }
26528
26529 node = NEW_HSHPTN(0, kw_args, kw_rest_arg_node, loc);
26530
26531 return node;
26532}
26533
26534static NODE*
26535dsym_node(struct parser_params *p, NODE *node, const YYLTYPE *loc)
26536{
26537 if (!node) {
26538 return NEW_SYM(STR_NEW0(), loc);
26539 }
26540
26541 switch (nd_type(node)) {
26542 case NODE_DSTR:
26543 nd_set_type(node, NODE_DSYM);
26544 nd_set_loc(node, loc);
26545 break;
26546 case NODE_STR:
26547 node = str_to_sym_node(p, node, loc);
26548 break;
26549 default:
26550 node = NEW_DSYM(0, 1, NEW_LIST(node, loc), loc);
26551 break;
26552 }
26553 return node;
26554}
26555
26556static int
26557nd_type_st_key_enable_p(NODE *node)
26558{
26559 switch (nd_type(node)) {
26560 case NODE_INTEGER:
26561 case NODE_FLOAT:
26562 case NODE_RATIONAL:
26563 case NODE_IMAGINARY:
26564 case NODE_STR:
26565 case NODE_SYM:
26566 case NODE_REGX:
26567 case NODE_LINE:
26568 case NODE_FILE:
26569 case NODE_ENCODING:
26570 return true;
26571 default:
26572 return false;
26573 }
26574}
26575
26576static VALUE
26577nd_value(struct parser_params *p, NODE *node)
26578{
26579 switch (nd_type(node)) {
26580 case NODE_STR:
26581 return rb_node_str_string_val(node);
26582 case NODE_INTEGER:
26583 return rb_node_integer_literal_val(node);
26584 case NODE_FLOAT:
26585 return rb_node_float_literal_val(node);
26586 case NODE_RATIONAL:
26587 return rb_node_rational_literal_val(node);
26588 case NODE_IMAGINARY:
26589 return rb_node_imaginary_literal_val(node);
26590 case NODE_SYM:
26591 return rb_node_sym_string_val(node);
26592 case NODE_REGX:
26593 return rb_node_regx_string_val(node);
26594 case NODE_LINE:
26595 return rb_node_line_lineno_val(node);
26596 case NODE_ENCODING:
26597 return rb_node_encoding_val(node);
26598 case NODE_FILE:
26599 return rb_node_file_path_val(node);
26600 default:
26601 rb_bug("unexpected node: %s", ruby_node_name(nd_type(node)));
26603 }
26604}
26605
26606static void
26607warn_duplicate_keys(struct parser_params *p, NODE *hash)
26608{
26609 /* See https://bugs.ruby-lang.org/issues/20331 for discussion about what is warned. */
26610 p->warn_duplicate_keys_table = st_init_table_with_size(&literal_type, RNODE_LIST(hash)->as.nd_alen / 2);
26611 while (hash && RNODE_LIST(hash)->nd_next) {
26612 NODE *head = RNODE_LIST(hash)->nd_head;
26613 NODE *value = RNODE_LIST(hash)->nd_next;
26614 NODE *next = RNODE_LIST(value)->nd_next;
26615 st_data_t key;
26616 st_data_t data;
26617
26618 /* keyword splat, e.g. {k: 1, **z, k: 2} */
26619 if (!head) {
26620 head = value;
26621 }
26622
26623 if (nd_type_st_key_enable_p(head)) {
26624 key = (st_data_t)head;
26625
26626 if (st_delete(p->warn_duplicate_keys_table, &key, &data)) {
26627 rb_warn2L(nd_line((NODE *)data),
26628 "key %+"PRIsWARN" is duplicated and overwritten on line %d",
26629 nd_value(p, head), WARN_I(nd_line(head)));
26630 }
26631 st_insert(p->warn_duplicate_keys_table, (st_data_t)key, (st_data_t)hash);
26632 }
26633 hash = next;
26634 }
26635 st_free_table(p->warn_duplicate_keys_table);
26636 p->warn_duplicate_keys_table = NULL;
26637}
26638
26639static NODE *
26640new_hash(struct parser_params *p, NODE *hash, const YYLTYPE *loc)
26641{
26642 if (hash) warn_duplicate_keys(p, hash);
26643 return NEW_HASH(hash, loc);
26644}
26645
26646static void
26647error_duplicate_pattern_variable(struct parser_params *p, ID id, const YYLTYPE *loc)
26648{
26649 if (is_private_local_id(p, id)) {
26650 return;
26651 }
26652 if (st_is_member(p->pvtbl, id)) {
26653 yyerror1(loc, "duplicated variable name");
26654 }
26655 else if (p->ctxt.in_alt_pattern && id) {
26656 yyerror1(loc, "variable capture in alternative pattern");
26657 }
26658 else {
26659 p->ctxt.capture_in_pattern = 1;
26660 st_insert(p->pvtbl, (st_data_t)id, 0);
26661 }
26662}
26663
26664static void
26665error_duplicate_pattern_key(struct parser_params *p, VALUE key, const YYLTYPE *loc)
26666{
26667 if (!p->pktbl) {
26668 p->pktbl = st_init_numtable();
26669 }
26670 else if (st_is_member(p->pktbl, key)) {
26671 yyerror1(loc, "duplicated key name");
26672 return;
26673 }
26674 st_insert(p->pktbl, (st_data_t)key, 0);
26675}
26676
26677static NODE *
26678new_unique_key_hash(struct parser_params *p, NODE *hash, const YYLTYPE *loc)
26679{
26680 return NEW_HASH(hash, loc);
26681}
26682
26683static NODE *
26684new_op_assign(struct parser_params *p, NODE *lhs, ID op, NODE *rhs, struct lex_context ctxt, const YYLTYPE *loc)
26685{
26686 NODE *asgn;
26687
26688 if (lhs) {
26689 ID vid = get_nd_vid(p, lhs);
26690 YYLTYPE lhs_loc = lhs->nd_loc;
26691 /* A constant read can raise NameError. Prism has no separate read node
26692 * for `Const op= value` and reports the whole expression, so give the
26693 * NODE_CONST the location of the whole operator assignment as well,
26694 * for consistent Thread::Backtrace::Location#source_range between both
26695 * parsers. */
26696 const YYLTYPE *read_loc = nd_type_p(lhs, NODE_CDECL) ? loc : &lhs_loc;
26697 if (op == tOROP) {
26698 set_nd_value(p, lhs, rhs);
26699 nd_set_loc(lhs, loc);
26700 asgn = NEW_OP_ASGN_OR(gettable(p, vid, read_loc), lhs, loc);
26701 }
26702 else if (op == tANDOP) {
26703 set_nd_value(p, lhs, rhs);
26704 nd_set_loc(lhs, loc);
26705 asgn = NEW_OP_ASGN_AND(gettable(p, vid, read_loc), lhs, loc);
26706 }
26707 else {
26708 asgn = lhs;
26709 rhs = NEW_CALL(gettable(p, vid, read_loc), op, NEW_LIST(rhs, &rhs->nd_loc), loc);
26710 set_nd_value(p, asgn, rhs);
26711 nd_set_loc(asgn, loc);
26712 }
26713 }
26714 else {
26715 asgn = NEW_ERROR(loc);
26716 }
26717 return asgn;
26718}
26719
26720static NODE *
26721new_ary_op_assign(struct parser_params *p, NODE *ary,
26722 NODE *args, ID op, NODE *rhs, const YYLTYPE *args_loc, const YYLTYPE *loc,
26723 const YYLTYPE *call_operator_loc, const YYLTYPE *opening_loc, const YYLTYPE *closing_loc, const YYLTYPE *binary_operator_loc)
26724{
26725 NODE *asgn;
26726
26727 aryset_check(p, args);
26728 args = make_list(args, args_loc);
26729 asgn = NEW_OP_ASGN1(ary, op, args, rhs, loc, call_operator_loc, opening_loc, closing_loc, binary_operator_loc);
26730 fixpos(asgn, ary);
26731 return asgn;
26732}
26733
26734static NODE *
26735new_attr_op_assign(struct parser_params *p, NODE *lhs,
26736 ID atype, ID attr, ID op, NODE *rhs, const YYLTYPE *loc,
26737 const YYLTYPE *call_operator_loc, const YYLTYPE *message_loc, const YYLTYPE *binary_operator_loc)
26738{
26739 NODE *asgn;
26740
26741 asgn = NEW_OP_ASGN2(lhs, CALL_Q_P(atype), attr, op, rhs, loc, call_operator_loc, message_loc, binary_operator_loc);
26742 fixpos(asgn, lhs);
26743 return asgn;
26744}
26745
26746static NODE *
26747new_const_op_assign(struct parser_params *p, NODE *lhs, ID op, NODE *rhs, struct lex_context ctxt, const YYLTYPE *loc)
26748{
26749 NODE *asgn;
26750
26751 if (lhs) {
26752 asgn = NEW_OP_CDECL(lhs, op, rhs, ctxt.shareable_constant_value, loc);
26753 }
26754 else {
26755 asgn = NEW_ERROR(loc);
26756 }
26757 fixpos(asgn, lhs);
26758 return asgn;
26759}
26760
26761static NODE *
26762const_decl(struct parser_params *p, NODE *path, const YYLTYPE *loc)
26763{
26764 if (p->ctxt.in_def) {
26765#ifndef RIPPER
26766 yyerror1(loc, "dynamic constant assignment");
26767#else
26768 set_value(assign_error(p, "dynamic constant assignment", p->s_lvalue));
26769#endif
26770 }
26771 return NEW_CDECL(0, 0, (path), p->ctxt.shareable_constant_value, loc);
26772}
26773
26774#ifdef RIPPER
26775static VALUE
26776assign_error(struct parser_params *p, const char *mesg, VALUE a)
26777{
26778 a = dispatch2(assign_error, ERR_MESG(), a);
26779 ripper_error(p);
26780 return a;
26781}
26782#endif
26783
26784static NODE *
26785new_bodystmt(struct parser_params *p, NODE *head, NODE *rescue, NODE *rescue_else, NODE *ensure, const YYLTYPE *loc)
26786{
26787 NODE *result = head;
26788 if (rescue) {
26789 NODE *tmp = rescue_else ? rescue_else : rescue;
26790 YYLTYPE rescue_loc = code_loc_gen(&head->nd_loc, &tmp->nd_loc);
26791
26792 result = NEW_RESCUE(head, rescue, rescue_else, &rescue_loc);
26793 nd_set_line(result, rescue->nd_loc.beg_pos.lineno);
26794 }
26795 if (ensure) {
26796 result = NEW_ENSURE(result, ensure, loc);
26797 }
26798 fixpos(result, head);
26799 return result;
26800}
26801
26802static void
26803warn_unused_var(struct parser_params *p, struct local_vars *local)
26804{
26805 int cnt;
26806
26807 if (!local->used) return;
26808 cnt = local->used->pos;
26809 if (cnt != local->vars->pos) {
26810 rb_parser_fatal(p, "local->used->pos != local->vars->pos");
26811 }
26812#ifndef RIPPER
26813 ID *v = local->vars->tbl;
26814 ID *u = local->used->tbl;
26815 for (int i = 0; i < cnt; ++i) {
26816 if (!v[i] || (u[i] & LVAR_USED)) continue;
26817 if (is_private_local_id(p, v[i])) continue;
26818 rb_warn1L((int)u[i], "assigned but unused variable - %"PRIsWARN, rb_id2str(v[i]));
26819 }
26820#endif
26821}
26822
26823static void
26824local_push(struct parser_params *p, int toplevel_scope)
26825{
26826 struct local_vars *local;
26827 int inherits_dvars = toplevel_scope && compile_for_eval;
26828 int warn_unused_vars = RTEST(ruby_verbose);
26829
26830 local = ALLOC(struct local_vars);
26831 local->prev = p->lvtbl;
26832 local->args = vtable_alloc(0);
26833 local->vars = vtable_alloc(inherits_dvars ? DVARS_INHERIT : DVARS_TOPSCOPE);
26834#ifndef RIPPER
26835 if (toplevel_scope && compile_for_eval) warn_unused_vars = 0;
26836 if (toplevel_scope && e_option_supplied(p)) warn_unused_vars = 0;
26837#endif
26838 local->numparam.outer = 0;
26839 local->numparam.inner = 0;
26840 local->numparam.current = 0;
26841 local->it = 0;
26842 local->used = warn_unused_vars ? vtable_alloc(0) : 0;
26843
26844# if WARN_PAST_SCOPE
26845 local->past = 0;
26846# endif
26847 CMDARG_PUSH(0);
26848 COND_PUSH(0);
26849 p->lvtbl = local;
26850}
26851
26852static void
26853vtable_chain_free(struct parser_params *p, struct vtable *table)
26854{
26855 while (!DVARS_TERMINAL_P(table)) {
26856 struct vtable *cur_table = table;
26857 table = cur_table->prev;
26858 vtable_free(cur_table);
26859 }
26860}
26861
26862static void
26863local_free(struct parser_params *p, struct local_vars *local)
26864{
26865 vtable_chain_free(p, local->used);
26866
26867# if WARN_PAST_SCOPE
26868 vtable_chain_free(p, local->past);
26869# endif
26870
26871 vtable_chain_free(p, local->args);
26872 vtable_chain_free(p, local->vars);
26873
26874 ruby_xfree_sized(local, sizeof(struct local_vars));
26875}
26876
26877static void
26878local_pop(struct parser_params *p)
26879{
26880 struct local_vars *local = p->lvtbl->prev;
26881 if (p->lvtbl->used) {
26882 warn_unused_var(p, p->lvtbl);
26883 }
26884
26885 local_free(p, p->lvtbl);
26886 p->lvtbl = local;
26887
26888 CMDARG_POP();
26889 COND_POP();
26890}
26891
26892static rb_ast_id_table_t *
26893local_tbl(struct parser_params *p)
26894{
26895 int cnt_args = vtable_size(p->lvtbl->args);
26896 int cnt_vars = vtable_size(p->lvtbl->vars);
26897 int cnt = cnt_args + cnt_vars;
26898 int i, j;
26899 rb_ast_id_table_t *tbl;
26900
26901 if (cnt <= 0) return 0;
26902 tbl = rb_ast_new_local_table(p->ast, cnt);
26903 MEMCPY(tbl->ids, p->lvtbl->args->tbl, ID, cnt_args);
26904 /* remove IDs duplicated to warn shadowing */
26905 for (i = 0, j = cnt_args; i < cnt_vars; ++i) {
26906 ID id = p->lvtbl->vars->tbl[i];
26907 if (!vtable_included(p->lvtbl->args, id)) {
26908 tbl->ids[j++] = id;
26909 }
26910 }
26911 if (j < cnt) {
26912 tbl = rb_ast_resize_latest_local_table(p->ast, j);
26913 }
26914
26915 return tbl;
26916}
26917
26918static void
26919numparam_name(struct parser_params *p, ID id)
26920{
26921 if (!NUMPARAM_ID_P(id)) return;
26922 compile_error(p, "_%d is reserved for numbered parameter",
26923 NUMPARAM_ID_TO_IDX(id));
26924}
26925
26926static void
26927arg_var(struct parser_params *p, ID id)
26928{
26929 numparam_name(p, id);
26930 vtable_add(p->lvtbl->args, id);
26931}
26932
26933static void
26934local_var(struct parser_params *p, ID id)
26935{
26936 numparam_name(p, id);
26937 vtable_add(p->lvtbl->vars, id);
26938 if (p->lvtbl->used) {
26939 vtable_add(p->lvtbl->used, (ID)p->ruby_sourceline);
26940 }
26941}
26942
26943#ifndef RIPPER
26944int
26945rb_parser_local_defined(struct parser_params *p, ID id, const struct rb_iseq_struct *iseq)
26946{
26947 return rb_local_defined(id, iseq);
26948}
26949#endif
26950
26951static int
26952local_id_ref(struct parser_params *p, ID id, ID **vidrefp)
26953{
26954 struct vtable *vars, *args, *used;
26955
26956 vars = p->lvtbl->vars;
26957 args = p->lvtbl->args;
26958 used = p->lvtbl->used;
26959
26960 while (vars && !DVARS_TERMINAL_P(vars->prev)) {
26961 vars = vars->prev;
26962 args = args->prev;
26963 if (used) used = used->prev;
26964 }
26965
26966 if (vars && vars->prev == DVARS_INHERIT) {
26967 return rb_parser_local_defined(p, id, p->parent_iseq);
26968 }
26969 else if (vtable_included(args, id)) {
26970 return 1;
26971 }
26972 else {
26973 int i = vtable_included(vars, id);
26974 if (i && used && vidrefp) *vidrefp = &used->tbl[i-1];
26975 return i != 0;
26976 }
26977}
26978
26979static int
26980local_id(struct parser_params *p, ID id)
26981{
26982 return local_id_ref(p, id, NULL);
26983}
26984
26985static int
26986check_forwarding_args(struct parser_params *p)
26987{
26988 if (local_id(p, idFWD_ALL)) return TRUE;
26989 compile_error(p, "unexpected ...");
26990 return FALSE;
26991}
26992
26993static void
26994add_forwarding_args(struct parser_params *p)
26995{
26996 arg_var(p, idFWD_REST);
26997 arg_var(p, idFWD_KWREST);
26998 arg_var(p, idFWD_BLOCK);
26999 arg_var(p, idFWD_ALL);
27000}
27001
27002static void
27003forwarding_arg_check(struct parser_params *p, ID arg, ID all, const char *var)
27004{
27005 bool conflict = false;
27006
27007 struct vtable *vars, *args;
27008
27009 vars = p->lvtbl->vars;
27010 args = p->lvtbl->args;
27011
27012 while (vars && !DVARS_TERMINAL_P(vars->prev)) {
27013 conflict |= (vtable_included(args, arg) && !(all && vtable_included(args, all)));
27014 vars = vars->prev;
27015 args = args->prev;
27016 }
27017
27018 bool found = false;
27019 if (vars && vars->prev == DVARS_INHERIT && !found) {
27020 found = (rb_parser_local_defined(p, arg, p->parent_iseq) &&
27021 !(all && rb_parser_local_defined(p, all, p->parent_iseq)));
27022 }
27023 else {
27024 found = (vtable_included(args, arg) &&
27025 !(all && vtable_included(args, all)));
27026 }
27027
27028 if (!found) {
27029 compile_error(p, "no anonymous %s parameter", var);
27030 }
27031 else if (conflict) {
27032 compile_error(p, "anonymous %s parameter is also used within block", var);
27033 }
27034}
27035
27036static NODE *
27037new_args_forward_call(struct parser_params *p, NODE *leading, const YYLTYPE *loc, const YYLTYPE *argsloc)
27038{
27039 NODE *rest = NEW_LVAR(idFWD_REST, loc);
27040 NODE *kwrest = list_append(p, NEW_LIST(0, loc), NEW_LVAR(idFWD_KWREST, loc));
27041 rb_node_block_pass_t *block = NEW_BLOCK_PASS(NEW_LVAR(idFWD_BLOCK, loc), argsloc, &NULL_LOC);
27042 NODE *args = leading ? rest_arg_append(p, leading, rest, argsloc) : NEW_SPLAT(rest, loc, &NULL_LOC);
27043 block->forwarding = TRUE;
27044 args = arg_append(p, args, new_hash(p, kwrest, loc), argsloc);
27045 return arg_blk_pass(args, block);
27046}
27047
27048static NODE *
27049numparam_push(struct parser_params *p)
27050{
27051 struct local_vars *local = p->lvtbl;
27052 NODE *inner = local->numparam.inner;
27053 if (!local->numparam.outer) {
27054 local->numparam.outer = local->numparam.current;
27055 }
27056 local->numparam.inner = 0;
27057 local->numparam.current = 0;
27058 local->it = 0;
27059 return inner;
27060}
27061
27062static void
27063numparam_pop(struct parser_params *p, NODE *prev_inner)
27064{
27065 struct local_vars *local = p->lvtbl;
27066 if (prev_inner) {
27067 /* prefer first one */
27068 local->numparam.inner = prev_inner;
27069 }
27070 else if (local->numparam.current) {
27071 /* current and inner are exclusive */
27072 local->numparam.inner = local->numparam.current;
27073 }
27074 if (p->max_numparam > NO_PARAM) {
27075 /* current and outer are exclusive */
27076 local->numparam.current = local->numparam.outer;
27077 local->numparam.outer = 0;
27078 }
27079 else {
27080 /* no numbered parameter */
27081 local->numparam.current = 0;
27082 }
27083 local->it = 0;
27084}
27085
27086static const struct vtable *
27087dyna_push(struct parser_params *p)
27088{
27089 p->lvtbl->args = vtable_alloc(p->lvtbl->args);
27090 p->lvtbl->vars = vtable_alloc(p->lvtbl->vars);
27091 if (p->lvtbl->used) {
27092 p->lvtbl->used = vtable_alloc(p->lvtbl->used);
27093 }
27094 return p->lvtbl->args;
27095}
27096
27097static void
27098dyna_pop_vtable(struct parser_params *p, struct vtable **vtblp)
27099{
27100 struct vtable *tmp = *vtblp;
27101 *vtblp = tmp->prev;
27102# if WARN_PAST_SCOPE
27103 if (p->past_scope_enabled) {
27104 tmp->prev = p->lvtbl->past;
27105 p->lvtbl->past = tmp;
27106 return;
27107 }
27108# endif
27109 vtable_free(tmp);
27110}
27111
27112static void
27113dyna_pop_1(struct parser_params *p)
27114{
27115 struct vtable *tmp;
27116
27117 if ((tmp = p->lvtbl->used) != 0) {
27118 warn_unused_var(p, p->lvtbl);
27119 p->lvtbl->used = p->lvtbl->used->prev;
27120 vtable_free(tmp);
27121 }
27122 dyna_pop_vtable(p, &p->lvtbl->args);
27123 dyna_pop_vtable(p, &p->lvtbl->vars);
27124}
27125
27126static void
27127dyna_pop(struct parser_params *p, const struct vtable *lvargs)
27128{
27129 while (p->lvtbl->args != lvargs) {
27130 dyna_pop_1(p);
27131 if (!p->lvtbl->args) {
27132 struct local_vars *local = p->lvtbl->prev;
27133 ruby_xfree_sized(p->lvtbl, sizeof(*p->lvtbl));
27134 p->lvtbl = local;
27135 }
27136 }
27137 dyna_pop_1(p);
27138}
27139
27140static int
27141dyna_in_block(struct parser_params *p)
27142{
27143 return !DVARS_TERMINAL_P(p->lvtbl->vars) && p->lvtbl->vars->prev != DVARS_TOPSCOPE;
27144}
27145
27146#ifndef RIPPER
27147int
27148dvar_defined_ref(struct parser_params *p, ID id, ID **vidrefp)
27149{
27150 struct vtable *vars, *args, *used;
27151 int i;
27152
27153 args = p->lvtbl->args;
27154 vars = p->lvtbl->vars;
27155 used = p->lvtbl->used;
27156
27157 while (!DVARS_TERMINAL_P(vars)) {
27158 if (vtable_included(args, id)) {
27159 return 1;
27160 }
27161 if ((i = vtable_included(vars, id)) != 0) {
27162 if (used && vidrefp) *vidrefp = &used->tbl[i-1];
27163 return 1;
27164 }
27165 args = args->prev;
27166 vars = vars->prev;
27167 if (!vidrefp) used = 0;
27168 if (used) used = used->prev;
27169 }
27170
27171 if (vars == DVARS_INHERIT && !NUMPARAM_ID_P(id)) {
27172 return rb_dvar_defined(id, p->parent_iseq);
27173 }
27174
27175 return 0;
27176}
27177#endif
27178
27179static int
27180dvar_defined(struct parser_params *p, ID id)
27181{
27182 return dvar_defined_ref(p, id, NULL);
27183}
27184
27185static int
27186dvar_curr(struct parser_params *p, ID id)
27187{
27188 return (vtable_included(p->lvtbl->args, id) ||
27189 vtable_included(p->lvtbl->vars, id));
27190}
27191
27192static void
27193reg_fragment_enc_error(struct parser_params* p, rb_parser_string_t *str, int c)
27194{
27195 compile_error(p,
27196 "regexp encoding option '%c' differs from source encoding '%s'",
27197 c, rb_enc_name(rb_parser_str_get_encoding(str)));
27198}
27199
27200#ifndef RIPPER
27201static rb_encoding *
27202find_enc(struct parser_params* p, const char *name)
27203{
27204 int idx = rb_enc_find_index(name);
27205 if (idx < 0) {
27206 rb_bug("unknown encoding name: %s", name);
27207 }
27208
27209 return rb_enc_from_index(idx);
27210}
27211
27212static rb_encoding *
27213kcode_to_enc(struct parser_params* p, int kcode)
27214{
27215 rb_encoding *enc;
27216
27217 switch (kcode) {
27218 case ENC_ASCII8BIT:
27219 enc = rb_ascii8bit_encoding();
27220 break;
27221 case ENC_EUC_JP:
27222 enc = find_enc(p, "EUC-JP");
27223 break;
27224 case ENC_Windows_31J:
27225 enc = find_enc(p, "Windows-31J");
27226 break;
27227 case ENC_UTF8:
27228 enc = rb_utf8_encoding();
27229 break;
27230 default:
27231 enc = NULL;
27232 break;
27233 }
27234
27235 return enc;
27236}
27237
27238int
27239rb_reg_fragment_setenc(struct parser_params* p, rb_parser_string_t *str, int options)
27240{
27241 int c = RE_OPTION_ENCODING_IDX(options);
27242
27243 if (c) {
27244 int opt, idx;
27245 rb_encoding *enc;
27246
27247 char_to_option_kcode(c, &opt, &idx);
27248 enc = kcode_to_enc(p, idx);
27249 if (enc != rb_parser_str_get_encoding(str) &&
27250 !rb_parser_is_ascii_string(p, str)) {
27251 goto error;
27252 }
27253 rb_parser_string_set_encoding(str, enc);
27254 }
27255 else if (RE_OPTION_ENCODING_NONE(options)) {
27256 if (!PARSER_ENCODING_IS_ASCII8BIT(p, str) &&
27257 !rb_parser_is_ascii_string(p, str)) {
27258 c = 'n';
27259 goto error;
27260 }
27261 rb_parser_enc_associate(p, str, rb_ascii8bit_encoding());
27262 }
27263 else if (rb_is_usascii_enc(p->enc)) {
27264 rb_parser_enc_associate(p, str, rb_ascii8bit_encoding());
27265 }
27266 return 0;
27267
27268 error:
27269 return c;
27270}
27271#endif
27272
27273static void
27274reg_fragment_setenc(struct parser_params* p, rb_parser_string_t *str, int options)
27275{
27276 int c = rb_reg_fragment_setenc(p, str, options);
27277 if (c) reg_fragment_enc_error(p, str, c);
27278}
27279
27280#ifndef UNIVERSAL_PARSER
27281typedef struct {
27282 struct parser_params* parser;
27283 rb_encoding *enc;
27284 NODE *succ_block;
27285 const YYLTYPE *loc;
27286 rb_parser_assignable_func assignable;
27288
27289static int
27290reg_named_capture_assign_iter(const OnigUChar *name, const OnigUChar *name_end,
27291 int back_num, int *back_refs, OnigRegex regex, void *arg0)
27292{
27294 struct parser_params* p = arg->parser;
27295 rb_encoding *enc = arg->enc;
27296 long len = name_end - name;
27297 const char *s = (const char *)name;
27298
27299 return rb_reg_named_capture_assign_iter_impl(p, s, len, enc, &arg->succ_block, arg->loc, arg->assignable);
27300}
27301
27302static NODE *
27303reg_named_capture_assign(struct parser_params* p, VALUE regexp, const YYLTYPE *loc, rb_parser_assignable_func assignable)
27304{
27306
27307 arg.parser = p;
27308 arg.enc = rb_enc_get(regexp);
27309 arg.succ_block = 0;
27310 arg.loc = loc;
27311 arg.assignable = assignable;
27312 onig_foreach_name(RREGEXP_PTR(regexp), reg_named_capture_assign_iter, &arg);
27313
27314 if (!arg.succ_block) return 0;
27315 return RNODE_BLOCK(arg.succ_block)->nd_next;
27316}
27317#endif
27318
27319#ifndef RIPPER
27320NODE *
27321rb_parser_assignable(struct parser_params *p, ID id, NODE *val, const YYLTYPE *loc)
27322{
27323 return assignable(p, id, val, loc);
27324}
27325
27326int
27327rb_reg_named_capture_assign_iter_impl(struct parser_params *p, const char *s, long len,
27328 rb_encoding *enc, NODE **succ_block, const rb_code_location_t *loc, rb_parser_assignable_func assignable)
27329{
27330 ID var;
27331 NODE *node, *succ;
27332
27333 if (!len) return ST_CONTINUE;
27334 if (!VALID_SYMNAME_P(s, len, enc, ID_LOCAL))
27335 return ST_CONTINUE;
27336
27337 var = intern_cstr(s, len, enc);
27338 if (len < MAX_WORD_LENGTH && rb_reserved_word(s, (int)len)) {
27339 if (!lvar_defined(p, var)) return ST_CONTINUE;
27340 }
27341 node = node_assign(p, assignable(p, var, 0, loc), NEW_SYM(rb_id2str(var), loc), NO_LEX_CTXT, loc);
27342 succ = *succ_block;
27343 if (!succ) succ = NEW_ERROR(loc);
27344 succ = block_append(p, succ, node);
27345 *succ_block = succ;
27346 return ST_CONTINUE;
27347}
27348#endif
27349
27350static VALUE
27351parser_reg_compile(struct parser_params* p, rb_parser_string_t *str, int options)
27352{
27353 VALUE str2;
27354 reg_fragment_setenc(p, str, options);
27355 str2 = rb_str_new_parser_string(str);
27356 return rb_parser_reg_compile(p, str2, options);
27357}
27358
27359#ifndef RIPPER
27360VALUE
27361rb_parser_reg_compile(struct parser_params* p, VALUE str, int options)
27362{
27363 return rb_reg_compile(str, options & RE_OPTION_MASK, p->ruby_sourcefile, p->ruby_sourceline);
27364}
27365#endif
27366
27367static VALUE
27368reg_compile(struct parser_params* p, rb_parser_string_t *str, int options)
27369{
27370 VALUE re;
27371 VALUE err;
27372
27373 err = rb_errinfo();
27374 re = parser_reg_compile(p, str, options);
27375 if (NIL_P(re)) {
27376 VALUE m = rb_attr_get(rb_errinfo(), idMesg);
27377 rb_set_errinfo(err);
27378 compile_error(p, "%"PRIsVALUE, m);
27379 return Qnil;
27380 }
27381 return re;
27382}
27383
27384#ifndef RIPPER
27385void
27386rb_ruby_parser_set_options(struct parser_params *p, int print, int loop, int chomp, int split)
27387{
27388 p->do_print = print;
27389 p->do_loop = loop;
27390 p->do_chomp = chomp;
27391 p->do_split = split;
27392}
27393
27394static NODE *
27395parser_append_options(struct parser_params *p, NODE *node)
27396{
27397 static const YYLTYPE default_location = {{1, 0}, {1, 0}};
27398 const YYLTYPE *const LOC = &default_location;
27399
27400 if (p->do_print) {
27401 NODE *print = (NODE *)NEW_FCALL(rb_intern("print"),
27402 NEW_LIST(NEW_GVAR(idLASTLINE, LOC), LOC),
27403 LOC);
27404 node = block_append(p, node, print);
27405 }
27406
27407 if (p->do_loop) {
27408 NODE *irs = NEW_LIST(NEW_GVAR(rb_intern("$/"), LOC), LOC);
27409
27410 if (p->do_split) {
27411 ID ifs = rb_intern("$;");
27412 ID fields = rb_intern("$F");
27413 NODE *args = NEW_LIST(NEW_GVAR(ifs, LOC), LOC);
27414 NODE *split = NEW_GASGN(fields,
27415 NEW_CALL(NEW_GVAR(idLASTLINE, LOC),
27416 rb_intern("split"), args, LOC),
27417 LOC);
27418 node = block_append(p, split, node);
27419 }
27420 if (p->do_chomp) {
27421 NODE *chomp = NEW_SYM(rb_str_new_cstr("chomp"), LOC);
27422 chomp = list_append(p, NEW_LIST(chomp, LOC), NEW_TRUE(LOC));
27423 irs = list_append(p, irs, NEW_HASH(chomp, LOC));
27424 }
27425
27426 node = NEW_WHILE((NODE *)NEW_FCALL(idGets, irs, LOC), node, 1, LOC, &NULL_LOC, &NULL_LOC);
27427 }
27428
27429 return node;
27430}
27431
27432void
27433rb_init_parse(void)
27434{
27435 /* just to suppress unused-function warnings */
27436 (void)nodetype;
27437 (void)nodeline;
27438}
27439
27440ID
27441internal_id(struct parser_params *p)
27442{
27443 return rb_make_temporary_id(vtable_size(p->lvtbl->args) + vtable_size(p->lvtbl->vars));
27444}
27445#endif /* !RIPPER */
27446
27447static void
27448parser_initialize(struct parser_params *p)
27449{
27450 /* note: we rely on TypedData_Make_Struct to set most fields to 0 */
27451 p->command_start = TRUE;
27452 p->ruby_sourcefile_string = Qnil;
27453 p->lex.lpar_beg = -1; /* make lambda_beginning_p() == FALSE at first */
27454 string_buffer_init(p);
27455 p->node_id = 0;
27456 p->delayed.token = NULL;
27457 p->frozen_string_literal = -1; /* not specified */
27458 rb_source_hash_init(&p->source_hash);
27459#ifndef RIPPER
27460 p->error_buffer = Qfalse;
27461 p->end_expect_token_locations = NULL;
27462 p->token_id = 0;
27463 p->tokens = NULL;
27464#else
27465 p->result = Qnil;
27466 p->parsing_thread = Qnil;
27467 p->s_value = Qnil;
27468 p->s_lvalue = Qnil;
27469 p->s_value_stack = rb_ary_new();
27470#endif
27471 p->debug_buffer = Qnil;
27472 p->debug_output = rb_ractor_stdout();
27473 p->enc = rb_utf8_encoding();
27474 p->exits = 0;
27475}
27476
27477#ifdef RIPPER
27478#define rb_ruby_parser_mark ripper_parser_mark
27479#define rb_ruby_parser_free ripper_parser_free
27480#define rb_ruby_parser_memsize ripper_parser_memsize
27481#endif
27482
27483void
27484rb_ruby_parser_mark(void *ptr)
27485{
27486 struct parser_params *p = (struct parser_params*)ptr;
27487
27488 rb_gc_mark(p->ruby_sourcefile_string);
27489#ifndef RIPPER
27490 rb_gc_mark(p->error_buffer);
27491#else
27492 rb_gc_mark(p->value);
27493 rb_gc_mark(p->result);
27494 rb_gc_mark(p->parsing_thread);
27495 rb_gc_mark(p->s_value);
27496 rb_gc_mark(p->s_lvalue);
27497 rb_gc_mark(p->s_value_stack);
27498#endif
27499 rb_gc_mark(p->debug_buffer);
27500 rb_gc_mark(p->debug_output);
27501}
27502
27503void
27504rb_ruby_parser_free(void *ptr)
27505{
27506 struct parser_params *p = (struct parser_params*)ptr;
27507 struct local_vars *local, *prev;
27508
27509 if (p->ast) {
27510 rb_ast_free(p->ast);
27511 }
27512
27513 if (p->warn_duplicate_keys_table) {
27514 st_free_table(p->warn_duplicate_keys_table);
27515 }
27516
27517#ifndef RIPPER
27518 if (p->tokens) {
27519 rb_parser_ary_free(p, p->tokens);
27520 }
27521#endif
27522
27523 if (p->tokenbuf) {
27524 ruby_xfree_sized(p->tokenbuf, p->toksiz);
27525 }
27526
27527 for (local = p->lvtbl; local; local = prev) {
27528 prev = local->prev;
27529 local_free(p, local);
27530 }
27531
27532 {
27533 token_info *ptinfo;
27534 while ((ptinfo = p->token_info) != 0) {
27535 p->token_info = ptinfo->next;
27536 xfree(ptinfo);
27537 }
27538 }
27539 string_buffer_free(p);
27540
27541 if (p->pvtbl) {
27542 st_free_table(p->pvtbl);
27543 }
27544
27545 if (CASE_LABELS_ENABLED_P(p->case_labels)) {
27546 st_free_table(p->case_labels);
27547 }
27548
27549 xfree(p->lex.strterm);
27550 p->lex.strterm = 0;
27551
27552 xfree(ptr);
27553}
27554
27555size_t
27556rb_ruby_parser_memsize(const void *ptr)
27557{
27558 struct parser_params *p = (struct parser_params*)ptr;
27559 struct local_vars *local;
27560 size_t size = sizeof(*p);
27561
27562 size += p->toksiz;
27563 for (local = p->lvtbl; local; local = local->prev) {
27564 size += sizeof(*local);
27565 if (local->vars) size += local->vars->capa * sizeof(ID);
27566 }
27567 return size;
27568}
27569
27570#ifndef RIPPER
27571#undef rb_reserved_word
27572
27573const struct kwtable *
27574rb_reserved_word(const char *str, unsigned int len)
27575{
27576 return reserved_word(str, len);
27577}
27578
27579#ifdef UNIVERSAL_PARSER
27581rb_ruby_parser_allocate(const rb_parser_config_t *config)
27582{
27583 /* parser_initialize expects fields to be set to 0 */
27584 rb_parser_t *p = (rb_parser_t *)config->calloc(1, sizeof(rb_parser_t));
27585 p->config = config;
27586 return p;
27587}
27588
27590rb_ruby_parser_new(const rb_parser_config_t *config)
27591{
27592 /* parser_initialize expects fields to be set to 0 */
27593 rb_parser_t *p = rb_ruby_parser_allocate(config);
27594 parser_initialize(p);
27595 return p;
27596}
27597#else
27599rb_ruby_parser_allocate(void)
27600{
27601 /* parser_initialize expects fields to be set to 0 */
27602 rb_parser_t *p = (rb_parser_t *)ruby_xcalloc(1, sizeof(rb_parser_t));
27603 return p;
27604}
27605
27607rb_ruby_parser_new(void)
27608{
27609 /* parser_initialize expects fields to be set to 0 */
27610 rb_parser_t *p = rb_ruby_parser_allocate();
27611 parser_initialize(p);
27612 return p;
27613}
27614#endif
27615
27617rb_ruby_parser_set_context(rb_parser_t *p, const struct rb_iseq_struct *base, int main)
27618{
27619 p->error_buffer = main ? Qfalse : Qnil;
27620 p->parent_iseq = base;
27621 return p;
27622}
27623
27624void
27625rb_ruby_parser_set_script_lines(rb_parser_t *p)
27626{
27627 p->debug_lines = rb_parser_ary_new_capa_for_script_line(p, 10);
27628}
27629
27630void
27631rb_ruby_parser_error_tolerant(rb_parser_t *p)
27632{
27633 p->error_tolerant = 1;
27634}
27635
27636void
27637rb_ruby_parser_keep_tokens(rb_parser_t *p)
27638{
27639 p->keep_tokens = 1;
27640 p->tokens = rb_parser_ary_new_capa_for_ast_token(p, 10);
27641}
27642
27644rb_ruby_parser_encoding(rb_parser_t *p)
27645{
27646 return p->enc;
27647}
27648
27649int
27650rb_ruby_parser_end_seen_p(rb_parser_t *p)
27651{
27652 return p->ruby__end__seen;
27653}
27654
27655int
27656rb_ruby_parser_set_yydebug(rb_parser_t *p, int flag)
27657{
27658 p->debug = flag;
27659 return flag;
27660}
27661#endif /* !RIPPER */
27662
27663#ifdef RIPPER
27664int
27665rb_ruby_parser_get_yydebug(rb_parser_t *p)
27666{
27667 return p->debug;
27668}
27669
27670void
27671rb_ruby_parser_set_value(rb_parser_t *p, VALUE value)
27672{
27673 p->value = value;
27674}
27675
27676int
27677rb_ruby_parser_error_p(rb_parser_t *p)
27678{
27679 return p->error_p;
27680}
27681
27682VALUE
27683rb_ruby_parser_debug_output(rb_parser_t *p)
27684{
27685 return p->debug_output;
27686}
27687
27688void
27689rb_ruby_parser_set_debug_output(rb_parser_t *p, VALUE output)
27690{
27691 p->debug_output = output;
27692}
27693
27694VALUE
27695rb_ruby_parser_parsing_thread(rb_parser_t *p)
27696{
27697 return p->parsing_thread;
27698}
27699
27700void
27701rb_ruby_parser_set_parsing_thread(rb_parser_t *p, VALUE parsing_thread)
27702{
27703 p->parsing_thread = parsing_thread;
27704}
27705
27706void
27707rb_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)
27708{
27709 p->lex.gets = gets;
27710 p->lex.input = input;
27711 p->eofp = 0;
27712 p->ruby_sourcefile_string = sourcefile_string;
27713 p->ruby_sourcefile = sourcefile;
27714 p->ruby_sourceline = sourceline;
27715}
27716
27717VALUE
27718rb_ruby_parser_result(rb_parser_t *p)
27719{
27720 return p->result;
27721}
27722
27724rb_ruby_parser_enc(rb_parser_t *p)
27725{
27726 return p->enc;
27727}
27728
27729VALUE
27730rb_ruby_parser_ruby_sourcefile_string(rb_parser_t *p)
27731{
27732 return p->ruby_sourcefile_string;
27733}
27734
27735int
27736rb_ruby_parser_ruby_sourceline(rb_parser_t *p)
27737{
27738 return p->ruby_sourceline;
27739}
27740
27741int
27742rb_ruby_parser_lex_state(rb_parser_t *p)
27743{
27744 return p->lex.state;
27745}
27746
27747void
27748rb_ruby_ripper_parse0(rb_parser_t *p)
27749{
27750 parser_prepare(p);
27751 p->ast = rb_ast_new();
27752 ripper_yyparse((void*)p);
27753 rb_ast_free(p->ast);
27754 p->ast = 0;
27755 p->eval_tree = 0;
27756 p->eval_tree_begin = 0;
27757}
27758
27759int
27760rb_ruby_ripper_dedent_string(rb_parser_t *p, rb_parser_string_t *string, int width)
27761{
27762 return dedent_string(p, string, width);
27763}
27764
27765int
27766rb_ruby_ripper_initialized_p(rb_parser_t *p)
27767{
27768 return p->lex.input != 0;
27769}
27770
27771void
27772rb_ruby_ripper_parser_initialize(rb_parser_t *p)
27773{
27774 parser_initialize(p);
27775}
27776
27777long
27778rb_ruby_ripper_column(rb_parser_t *p)
27779{
27780 return p->lex.ptok - p->lex.pbeg;
27781}
27782
27783long
27784rb_ruby_ripper_token_len(rb_parser_t *p)
27785{
27786 return p->lex.pcur - p->lex.ptok;
27787}
27788
27790rb_ruby_ripper_lex_lastline(rb_parser_t *p)
27791{
27792 return p->lex.lastline;
27793}
27794
27795VALUE
27796rb_ruby_ripper_lex_state_name(struct parser_params *p, int state)
27797{
27798 return rb_parser_lex_state_name(p, (enum lex_state_e)state);
27799}
27800
27801#ifdef UNIVERSAL_PARSER
27803rb_ripper_parser_params_allocate(const rb_parser_config_t *config)
27804{
27805 rb_parser_t *p = (rb_parser_t *)config->calloc(1, sizeof(rb_parser_t));
27806 p->config = config;
27807 return p;
27808}
27809#endif
27810
27811struct parser_params*
27812rb_ruby_ripper_parser_allocate(void)
27813{
27814 return (struct parser_params *)ruby_xcalloc(1, sizeof(struct parser_params));
27815}
27816#endif /* RIPPER */
27817
27818#ifndef RIPPER
27819void
27820rb_parser_printf(struct parser_params *p, const char *fmt, ...)
27821{
27822 va_list ap;
27823 VALUE mesg = p->debug_buffer;
27824
27825 if (NIL_P(mesg)) p->debug_buffer = mesg = rb_str_new(0, 0);
27826 va_start(ap, fmt);
27827 rb_str_vcatf(mesg, fmt, ap);
27828 va_end(ap);
27829 if (char_at_end(p, mesg, 0) == '\n') {
27830 rb_io_write(p->debug_output, mesg);
27831 p->debug_buffer = Qnil;
27832 }
27833}
27834
27835static void
27836parser_compile_error(struct parser_params *p, const rb_code_location_t *loc, const char *fmt, ...)
27837{
27838 va_list ap;
27839 int lineno, column;
27840
27841 if (loc) {
27842 lineno = loc->end_pos.lineno;
27843 column = loc->end_pos.column;
27844 }
27845 else {
27846 lineno = p->ruby_sourceline;
27847 column = rb_long2int(p->lex.pcur - p->lex.pbeg);
27848 }
27849
27850 rb_io_flush(p->debug_output);
27851 p->error_p = 1;
27852 va_start(ap, fmt);
27853 p->error_buffer =
27854 rb_syntax_error_append(p->error_buffer,
27855 p->ruby_sourcefile_string,
27856 lineno, column,
27857 p->enc, fmt, ap);
27858 va_end(ap);
27859}
27860
27861static size_t
27862count_char(const char *str, int c)
27863{
27864 int n = 0;
27865 while (str[n] == c) ++n;
27866 return n;
27867}
27868
27869/*
27870 * strip enclosing double-quotes, same as the default yytnamerr except
27871 * for that single-quotes matching back-quotes do not stop stripping.
27872 *
27873 * "\"`class' keyword\"" => "`class' keyword"
27874 */
27875size_t
27876rb_yytnamerr(struct parser_params *p, char *yyres, const char *yystr)
27877{
27878 if (*yystr == '"') {
27879 size_t yyn = 0, bquote = 0;
27880 const char *yyp = yystr;
27881
27882 while (*++yyp) {
27883 switch (*yyp) {
27884 case '\'':
27885 if (!bquote) {
27886 bquote = count_char(yyp+1, '\'') + 1;
27887 if (yyres) memcpy(&yyres[yyn], yyp, bquote);
27888 yyn += bquote;
27889 yyp += bquote - 1;
27890 break;
27891 }
27892 else {
27893 if (bquote && count_char(yyp+1, '\'') + 1 == bquote) {
27894 if (yyres) memcpy(yyres + yyn, yyp, bquote);
27895 yyn += bquote;
27896 yyp += bquote - 1;
27897 bquote = 0;
27898 break;
27899 }
27900 if (yyp[1] && yyp[1] != '\'' && yyp[2] == '\'') {
27901 if (yyres) memcpy(yyres + yyn, yyp, 3);
27902 yyn += 3;
27903 yyp += 2;
27904 break;
27905 }
27906 goto do_not_strip_quotes;
27907 }
27908
27909 case ',':
27910 goto do_not_strip_quotes;
27911
27912 case '\\':
27913 if (*++yyp != '\\')
27914 goto do_not_strip_quotes;
27915 /* Fall through. */
27916 default:
27917 if (yyres)
27918 yyres[yyn] = *yyp;
27919 yyn++;
27920 break;
27921
27922 case '"':
27923 case '\0':
27924 if (yyres)
27925 yyres[yyn] = '\0';
27926 return yyn;
27927 }
27928 }
27929 do_not_strip_quotes: ;
27930 }
27931
27932 if (!yyres) return strlen(yystr);
27933
27934 return (YYSIZE_T)(yystpcpy(yyres, yystr) - yyres);
27935}
27936#endif
27937
27938#ifdef RIPPER
27939#define validate(x) (void)(x)
27940
27941static VALUE
27942ripper_dispatch0(struct parser_params *p, ID mid)
27943{
27944 return rb_funcall(p->value, mid, 0);
27945}
27946
27947static VALUE
27948ripper_dispatch1(struct parser_params *p, ID mid, VALUE a)
27949{
27950 validate(a);
27951 return rb_funcall(p->value, mid, 1, a);
27952}
27953
27954static VALUE
27955ripper_dispatch2(struct parser_params *p, ID mid, VALUE a, VALUE b)
27956{
27957 validate(a);
27958 validate(b);
27959 return rb_funcall(p->value, mid, 2, a, b);
27960}
27961
27962static VALUE
27963ripper_dispatch3(struct parser_params *p, ID mid, VALUE a, VALUE b, VALUE c)
27964{
27965 validate(a);
27966 validate(b);
27967 validate(c);
27968 return rb_funcall(p->value, mid, 3, a, b, c);
27969}
27970
27971static VALUE
27972ripper_dispatch4(struct parser_params *p, ID mid, VALUE a, VALUE b, VALUE c, VALUE d)
27973{
27974 validate(a);
27975 validate(b);
27976 validate(c);
27977 validate(d);
27978 return rb_funcall(p->value, mid, 4, a, b, c, d);
27979}
27980
27981static VALUE
27982ripper_dispatch5(struct parser_params *p, ID mid, VALUE a, VALUE b, VALUE c, VALUE d, VALUE e)
27983{
27984 validate(a);
27985 validate(b);
27986 validate(c);
27987 validate(d);
27988 validate(e);
27989 return rb_funcall(p->value, mid, 5, a, b, c, d, e);
27990}
27991
27992static VALUE
27993ripper_dispatch7(struct parser_params *p, ID mid, VALUE a, VALUE b, VALUE c, VALUE d, VALUE e, VALUE f, VALUE g)
27994{
27995 validate(a);
27996 validate(b);
27997 validate(c);
27998 validate(d);
27999 validate(e);
28000 validate(f);
28001 validate(g);
28002 return rb_funcall(p->value, mid, 7, a, b, c, d, e, f, g);
28003}
28004
28005void
28006ripper_error(struct parser_params *p)
28007{
28008 p->error_p = TRUE;
28009}
28010
28011VALUE
28012ripper_value(struct parser_params *p)
28013{
28014 (void)yystpcpy; /* may not used in newer bison */
28015
28016 return p->value;
28017}
28018
28019#endif /* RIPPER */
28020/*
28021 * Local variables:
28022 * mode: c
28023 * c-file-style: "ruby"
28024 * End:
28025 */
#define RUBY_ASSERT(...)
Asserts that the given expression is truthy if and only if RUBY_DEBUG is truthy.
Definition assert.h:219
#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:677
#define ruby_verbose
This variable controls whether the interpreter is in debug mode.
Definition error.h:476
VALUE rb_eRuntimeError
RuntimeError exception.
Definition error.c:1461
VALUE rb_eSyntaxError
SyntaxError exception.
Definition error.c:1480
VALUE rb_class_new_instance(int argc, const VALUE *argv, VALUE klass)
Allocates, then initialises an instance of the given class.
Definition object.c:2297
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:844
VALUE rb_funcall(VALUE recv, ID mid, int n,...)
Calls a method.
Definition vm_eval.c:1123
VALUE rb_ary_new(void)
Allocates a new, empty array.
VALUE rb_ary_pop(VALUE ary)
Destructively deletes an element from the end of the passed array and returns what was deleted.
VALUE rb_ary_push(VALUE ary, VALUE elem)
Special case of rb_ary_cat() that it adds only one element.
VALUE rb_ary_entry(VALUE ary, long off)
Queries an element of an array.
#define rb_str_new(str, len)
Allocates an instance of rb_cString.
Definition string.h:1499
#define rb_usascii_str_new(str, len)
Identical to rb_str_new, except it generates a string of "US ASCII" encoding.
Definition string.h:1533
VALUE rb_str_cat(VALUE dst, const char *src, long srclen)
Destructively appends the passed contents to the string.
Definition string.c:3666
#define rb_strlen_lit(str)
Length of a string literal.
Definition string.h:1693
#define rb_str_cat_cstr(buf, str)
Identical to rb_str_cat(), except it assumes the passed pointer is a pointer to a C string.
Definition string.h:1657
#define rb_str_new_cstr(str)
Identical to rb_str_new, except it assumes the passed pointer is a pointer to a C string.
Definition string.h:1515
ID rb_sym2id(VALUE obj)
Converts an instance of rb_cSymbol into an ID.
Definition symbol.c:1091
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.
static struct re_pattern_buffer * RREGEXP_PTR(VALUE rexp)
Convenient getter function.
Definition rregexp.h:86
#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.