Ruby 4.1.0dev (2026-09-07 revision 11ce3778c6eacc10897729314e5ab3bed7830971)
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 stack_type cond_stack;
578 stack_type cmdarg_stack;
579 int tokidx;
580 int toksiz;
581 int heredoc_end;
582 int heredoc_indent;
583 int heredoc_line_indent;
584 char *tokenbuf;
585 struct local_vars *lvtbl;
586 st_table *pvtbl;
587 st_table *pktbl;
588 int line_count;
589 int ruby_sourceline; /* current line no. */
590 const char *ruby_sourcefile; /* current source file */
591 VALUE ruby_sourcefile_string;
592 rb_encoding *enc;
594 st_table *case_labels;
595 rb_node_exits_t *exits;
596
597 VALUE debug_buffer;
598 VALUE debug_output;
599
600 struct {
601 rb_parser_string_t *token;
602 int beg_line;
603 int beg_col;
604 int end_line;
605 int end_col;
606 } delayed;
607
608 rb_ast_t *ast;
609 int node_id;
610
611 st_table *warn_duplicate_keys_table;
612
613 int max_numparam;
614 ID it_id;
615
616 struct lex_context ctxt;
617
618 NODE *eval_tree_begin;
619 NODE *eval_tree;
620 const struct rb_iseq_struct *parent_iseq;
621
622#ifdef UNIVERSAL_PARSER
623 const rb_parser_config_t *config;
624#endif
625 /* compile_option */
626 signed int frozen_string_literal:2; /* -1: not specified, 0: false, 1: true */
627
628 unsigned int command_start:1;
629 unsigned int eofp: 1;
630 unsigned int ruby__end__seen: 1;
631 unsigned int debug: 1;
632 unsigned int has_shebang: 1;
633 unsigned int token_seen: 1;
634 unsigned int token_info_enabled: 1;
635# if WARN_PAST_SCOPE
636 unsigned int past_scope_enabled: 1;
637# endif
638 unsigned int error_p: 1;
639 unsigned int cr_seen: 1;
640
641 /* Streaming hash state of the source bytes read so far. */
642 rb_source_hash_state_t source_hash;
643
644#ifndef RIPPER
645 /* Ruby core only */
646
647 unsigned int do_print: 1;
648 unsigned int do_loop: 1;
649 unsigned int do_chomp: 1;
650 unsigned int do_split: 1;
651 unsigned int error_tolerant: 1;
652 unsigned int keep_tokens: 1;
653
654 VALUE error_buffer;
655 rb_parser_ary_t *debug_lines;
656 /*
657 * Store specific keyword locations to generate dummy end token.
658 * Refer to the tail of list element.
659 */
661 /* id for terms */
662 int token_id;
663 /* Array for term tokens */
664 rb_parser_ary_t *tokens;
665#else
666 /* Ripper only */
667
668 VALUE value;
669 VALUE result;
670 VALUE parsing_thread;
671 VALUE s_value; /* Token VALUE */
672 VALUE s_lvalue; /* VALUE generated by rule action (reduce) */
673 VALUE s_value_stack;
674#endif
675};
676
677#define NUMPARAM_ID_P(id) numparam_id_p(p, id)
678#define NUMPARAM_ID_TO_IDX(id) (unsigned int)(((id) >> ID_SCOPE_SHIFT) - (tNUMPARAM_1 - 1))
679#define NUMPARAM_IDX_TO_ID(idx) TOKEN2LOCALID((tNUMPARAM_1 - 1 + (idx)))
680static int
681numparam_id_p(struct parser_params *p, ID id)
682{
683 if (!is_local_id(id) || id < (tNUMPARAM_1 << ID_SCOPE_SHIFT)) return 0;
684 unsigned int idx = NUMPARAM_ID_TO_IDX(id);
685 return idx > 0 && idx <= NUMPARAM_MAX;
686}
687static void numparam_name(struct parser_params *p, ID id);
688
689#ifdef RIPPER
690static void
691after_shift(struct parser_params *p)
692{
693 if (p->debug) {
694 rb_parser_printf(p, "after-shift: %+"PRIsVALUE"\n", p->s_value);
695 }
696 rb_ary_push(p->s_value_stack, p->s_value);
697 p->s_value = Qnil;
698}
699
700static void
701before_reduce(int len, struct parser_params *p)
702{
703 // Initialize $$ with $1.
704 if (len) p->s_lvalue = rb_ary_entry(p->s_value_stack, -len);
705}
706
707static void
708after_reduce(int len, struct parser_params *p)
709{
710 for (int i = 0; i < len; i++) {
711 VALUE tos = rb_ary_pop(p->s_value_stack);
712 if (p->debug) {
713 rb_parser_printf(p, "after-reduce pop: %+"PRIsVALUE"\n", tos);
714 }
715 }
716 if (p->debug) {
717 rb_parser_printf(p, "after-reduce push: %+"PRIsVALUE"\n", p->s_lvalue);
718 }
719 rb_ary_push(p->s_value_stack, p->s_lvalue);
720 p->s_lvalue = Qnil;
721}
722
723static void
724after_shift_error_token(struct parser_params *p)
725{
726 if (p->debug) {
727 rb_parser_printf(p, "after-shift-error-token:\n");
728 }
729 rb_ary_push(p->s_value_stack, Qnil);
730}
731
732static void
733after_pop_stack(int len, struct parser_params *p)
734{
735 for (int i = 0; i < len; i++) {
736 VALUE tos = rb_ary_pop(p->s_value_stack);
737 if (p->debug) {
738 rb_parser_printf(p, "after-pop-stack pop: %+"PRIsVALUE"\n", tos);
739 }
740 }
741}
742#else
743static void
744after_shift(struct parser_params *p)
745{
746}
747
748static void
749before_reduce(int len, struct parser_params *p)
750{
751}
752
753static void
754after_reduce(int len, struct parser_params *p)
755{
756}
757
758static void
759after_shift_error_token(struct parser_params *p)
760{
761}
762
763static void
764after_pop_stack(int len, struct parser_params *p)
765{
766}
767#endif
768
769#define intern_cstr(n,l,en) rb_intern3(n,l,en)
770
771#define STRING_NEW0() rb_parser_encoding_string_new(p,0,0,p->enc)
772
773#define STR_NEW(ptr,len) rb_enc_str_new((ptr),(len),p->enc)
774#define STR_NEW0() rb_enc_str_new(0,0,p->enc)
775#define STR_NEW2(ptr) rb_enc_str_new((ptr),strlen(ptr),p->enc)
776#define STR_NEW3(ptr,len,e,func) parser_str_new(p, (ptr),(len),(e),(func),p->enc)
777#define TOK_INTERN() intern_cstr(tok(p), toklen(p), p->enc)
778#define VALID_SYMNAME_P(s, l, enc, type) (rb_enc_symname_type(s, l, enc, (1U<<(type))) == (int)(type))
779
780#ifndef RIPPER
781static inline int
782char_at_end(struct parser_params *p, VALUE str, int when_empty)
783{
784 long len = RSTRING_LEN(str);
785 return len > 0 ? (unsigned char)RSTRING_PTR(str)[len-1] : when_empty;
786}
787#endif
788
789static void
790pop_pvtbl(struct parser_params *p, st_table *tbl)
791{
792 st_free_table(p->pvtbl);
793 p->pvtbl = tbl;
794}
795
796static void
797pop_pktbl(struct parser_params *p, st_table *tbl)
798{
799 if (p->pktbl) st_free_table(p->pktbl);
800 p->pktbl = tbl;
801}
802
803#define STRING_BUF_DEFAULT_LEN 16
804
805static void
806string_buffer_init(struct parser_params *p)
807{
808 parser_string_buffer_t *buf = &p->lex.string_buffer;
809 const size_t size = offsetof(parser_string_buffer_elem_t, buf) + sizeof(rb_parser_string_t *) * STRING_BUF_DEFAULT_LEN;
810
811 buf->head = buf->last = xmalloc(size);
812 buf->head->len = STRING_BUF_DEFAULT_LEN;
813 buf->head->used = 0;
814 buf->head->next = NULL;
815}
816
817static void
818string_buffer_append(struct parser_params *p, rb_parser_string_t *str)
819{
820 parser_string_buffer_t *buf = &p->lex.string_buffer;
821
822 if (buf->head->used >= buf->head->len) {
824 long n = buf->head->len * 2;
825 const size_t size = offsetof(parser_string_buffer_elem_t, buf) + sizeof(rb_parser_string_t *) * n;
826
827 elem = xmalloc(size);
828 elem->len = n;
829 elem->used = 0;
830 elem->next = NULL;
831 buf->last->next = elem;
832 buf->last = elem;
833 }
834 buf->last->buf[buf->last->used++] = str;
835}
836
837static void
838string_buffer_free(struct parser_params *p)
839{
840 parser_string_buffer_elem_t *elem = p->lex.string_buffer.head;
841
842 while (elem) {
843 parser_string_buffer_elem_t *next_elem = elem->next;
844
845 for (long i = 0; i < elem->used; i++) {
846 rb_parser_string_free(p, elem->buf[i]);
847 }
848
849 xfree(elem);
850 elem = next_elem;
851 }
852}
853
854#ifndef RIPPER
855static void flush_debug_buffer(struct parser_params *p, VALUE out, VALUE str);
856
857static void
858debug_end_expect_token_locations(struct parser_params *p, const char *name)
859{
860 if(p->debug) {
861 VALUE mesg = rb_sprintf("%s: [", name);
862 int i = 0;
863 for (end_expect_token_locations_t *loc = p->end_expect_token_locations; loc; loc = loc->prev) {
864 if (i > 0)
865 rb_str_cat_cstr(mesg, ", ");
866 rb_str_catf(mesg, "[%d, %d]", loc->pos->lineno, loc->pos->column);
867 i++;
868 }
869 rb_str_cat_cstr(mesg, "]\n");
870 flush_debug_buffer(p, p->debug_output, mesg);
871 }
872}
873
874static void
875push_end_expect_token_locations(struct parser_params *p, const rb_code_position_t *pos)
876{
877 if(!p->error_tolerant) return;
878
881 locations->pos = pos;
882 locations->prev = p->end_expect_token_locations;
883 p->end_expect_token_locations = locations;
884
885 debug_end_expect_token_locations(p, "push_end_expect_token_locations");
886}
887
888static void
889pop_end_expect_token_locations(struct parser_params *p)
890{
891 if(!p->end_expect_token_locations) return;
892
893 end_expect_token_locations_t *locations = p->end_expect_token_locations->prev;
894 ruby_xfree_sized(p->end_expect_token_locations, sizeof(end_expect_token_locations_t));
895 p->end_expect_token_locations = locations;
896
897 debug_end_expect_token_locations(p, "pop_end_expect_token_locations");
898}
899
901peek_end_expect_token_locations(struct parser_params *p)
902{
903 return p->end_expect_token_locations;
904}
905
906static const char *
907parser_token2char(struct parser_params *p, enum yytokentype tok)
908{
909 switch ((int) tok) {
910#define TOKEN2CHAR(tok) case tok: return (#tok);
911#define TOKEN2CHAR2(tok, name) case tok: return (name);
912 TOKEN2CHAR2(' ', "word_sep");
913 TOKEN2CHAR2('!', "!")
914 TOKEN2CHAR2('%', "%");
915 TOKEN2CHAR2('&', "&");
916 TOKEN2CHAR2('*', "*");
917 TOKEN2CHAR2('+', "+");
918 TOKEN2CHAR2('-', "-");
919 TOKEN2CHAR2('/', "/");
920 TOKEN2CHAR2('<', "<");
921 TOKEN2CHAR2('=', "=");
922 TOKEN2CHAR2('>', ">");
923 TOKEN2CHAR2('?', "?");
924 TOKEN2CHAR2('^', "^");
925 TOKEN2CHAR2('|', "|");
926 TOKEN2CHAR2('~', "~");
927 TOKEN2CHAR2(':', ":");
928 TOKEN2CHAR2(',', ",");
929 TOKEN2CHAR2('.', ".");
930 TOKEN2CHAR2(';', ";");
931 TOKEN2CHAR2('`', "`");
932 TOKEN2CHAR2('\n', "nl");
933 TOKEN2CHAR2('{', "\"{\"");
934 TOKEN2CHAR2('}', "\"}\"");
935 TOKEN2CHAR2('[', "\"[\"");
936 TOKEN2CHAR2(']', "\"]\"");
937 TOKEN2CHAR2('(', "\"(\"");
938 TOKEN2CHAR2(')', "\")\"");
939 TOKEN2CHAR2('\\', "backslash");
940 TOKEN2CHAR(keyword_class);
941 TOKEN2CHAR(keyword_module);
942 TOKEN2CHAR(keyword_def);
943 TOKEN2CHAR(keyword_undef);
944 TOKEN2CHAR(keyword_begin);
945 TOKEN2CHAR(keyword_rescue);
946 TOKEN2CHAR(keyword_ensure);
947 TOKEN2CHAR(keyword_end);
948 TOKEN2CHAR(keyword_if);
949 TOKEN2CHAR(keyword_unless);
950 TOKEN2CHAR(keyword_then);
951 TOKEN2CHAR(keyword_elsif);
952 TOKEN2CHAR(keyword_else);
953 TOKEN2CHAR(keyword_case);
954 TOKEN2CHAR(keyword_when);
955 TOKEN2CHAR(keyword_while);
956 TOKEN2CHAR(keyword_until);
957 TOKEN2CHAR(keyword_for);
958 TOKEN2CHAR(keyword_break);
959 TOKEN2CHAR(keyword_next);
960 TOKEN2CHAR(keyword_redo);
961 TOKEN2CHAR(keyword_retry);
962 TOKEN2CHAR(keyword_in);
963 TOKEN2CHAR(keyword_do);
964 TOKEN2CHAR(keyword_do_cond);
965 TOKEN2CHAR(keyword_do_block);
966 TOKEN2CHAR(keyword_do_LAMBDA);
967 TOKEN2CHAR(keyword_return);
968 TOKEN2CHAR(keyword_yield);
969 TOKEN2CHAR(keyword_super);
970 TOKEN2CHAR(keyword_self);
971 TOKEN2CHAR(keyword_nil);
972 TOKEN2CHAR(keyword_true);
973 TOKEN2CHAR(keyword_false);
974 TOKEN2CHAR(keyword_and);
975 TOKEN2CHAR(keyword_or);
976 TOKEN2CHAR(keyword_not);
977 TOKEN2CHAR(modifier_if);
978 TOKEN2CHAR(modifier_unless);
979 TOKEN2CHAR(modifier_while);
980 TOKEN2CHAR(modifier_until);
981 TOKEN2CHAR(modifier_rescue);
982 TOKEN2CHAR(keyword_alias);
983 TOKEN2CHAR(keyword_defined);
984 TOKEN2CHAR(keyword_BEGIN);
985 TOKEN2CHAR(keyword_END);
986 TOKEN2CHAR(keyword__LINE__);
987 TOKEN2CHAR(keyword__FILE__);
988 TOKEN2CHAR(keyword__ENCODING__);
989 TOKEN2CHAR(tIDENTIFIER);
990 TOKEN2CHAR(tFID);
991 TOKEN2CHAR(tGVAR);
992 TOKEN2CHAR(tIVAR);
993 TOKEN2CHAR(tCONSTANT);
994 TOKEN2CHAR(tCVAR);
995 TOKEN2CHAR(tLABEL);
996 TOKEN2CHAR(tINTEGER);
997 TOKEN2CHAR(tFLOAT);
998 TOKEN2CHAR(tRATIONAL);
999 TOKEN2CHAR(tIMAGINARY);
1000 TOKEN2CHAR(tCHAR);
1001 TOKEN2CHAR(tNTH_REF);
1002 TOKEN2CHAR(tBACK_REF);
1003 TOKEN2CHAR(tSTRING_CONTENT);
1004 TOKEN2CHAR(tREGEXP_END);
1005 TOKEN2CHAR(tDUMNY_END);
1006 TOKEN2CHAR(tSP);
1007 TOKEN2CHAR(tUPLUS);
1008 TOKEN2CHAR(tUMINUS);
1009 TOKEN2CHAR(tPOW);
1010 TOKEN2CHAR(tCMP);
1011 TOKEN2CHAR(tEQ);
1012 TOKEN2CHAR(tEQQ);
1013 TOKEN2CHAR(tNEQ);
1014 TOKEN2CHAR(tGEQ);
1015 TOKEN2CHAR(tLEQ);
1016 TOKEN2CHAR(tANDOP);
1017 TOKEN2CHAR(tOROP);
1018 TOKEN2CHAR(tMATCH);
1019 TOKEN2CHAR(tNMATCH);
1020 TOKEN2CHAR(tDOT2);
1021 TOKEN2CHAR(tDOT3);
1022 TOKEN2CHAR(tBDOT2);
1023 TOKEN2CHAR(tBDOT3);
1024 TOKEN2CHAR(tAREF);
1025 TOKEN2CHAR(tASET);
1026 TOKEN2CHAR(tLSHFT);
1027 TOKEN2CHAR(tRSHFT);
1028 TOKEN2CHAR(tANDDOT);
1029 TOKEN2CHAR(tCOLON2);
1030 TOKEN2CHAR(tCOLON3);
1031 TOKEN2CHAR(tOP_ASGN);
1032 TOKEN2CHAR(tASSOC);
1033 TOKEN2CHAR(tLPAREN);
1034 TOKEN2CHAR(tLPAREN_ARG);
1035 TOKEN2CHAR(tLBRACK);
1036 TOKEN2CHAR(tLBRACE);
1037 TOKEN2CHAR(tLBRACE_ARG);
1038 TOKEN2CHAR(tSTAR);
1039 TOKEN2CHAR(tDSTAR);
1040 TOKEN2CHAR(tAMPER);
1041 TOKEN2CHAR(tLAMBDA);
1042 TOKEN2CHAR(tSYMBEG);
1043 TOKEN2CHAR(tSTRING_BEG);
1044 TOKEN2CHAR(tXSTRING_BEG);
1045 TOKEN2CHAR(tREGEXP_BEG);
1046 TOKEN2CHAR(tWORDS_BEG);
1047 TOKEN2CHAR(tQWORDS_BEG);
1048 TOKEN2CHAR(tSYMBOLS_BEG);
1049 TOKEN2CHAR(tQSYMBOLS_BEG);
1050 TOKEN2CHAR(tSTRING_END);
1051 TOKEN2CHAR(tSTRING_DEND);
1052 TOKEN2CHAR(tSTRING_DBEG);
1053 TOKEN2CHAR(tSTRING_DVAR);
1054 TOKEN2CHAR(tLAMBEG);
1055 TOKEN2CHAR(tLABEL_END);
1056 TOKEN2CHAR(tIGNORED_NL);
1057 TOKEN2CHAR(tCOMMENT);
1058 TOKEN2CHAR(tEMBDOC_BEG);
1059 TOKEN2CHAR(tEMBDOC);
1060 TOKEN2CHAR(tEMBDOC_END);
1061 TOKEN2CHAR(tHEREDOC_BEG);
1062 TOKEN2CHAR(tHEREDOC_END);
1063 TOKEN2CHAR(k__END__);
1064 TOKEN2CHAR(tLOWEST);
1065 TOKEN2CHAR(tUMINUS_NUM);
1066 TOKEN2CHAR(tLAST_TOKEN);
1067#undef TOKEN2CHAR
1068#undef TOKEN2CHAR2
1069 }
1070
1071 rb_bug("parser_token2id: unknown token %d", tok);
1072
1073 UNREACHABLE_RETURN(0);
1074}
1075#else
1076static void
1077push_end_expect_token_locations(struct parser_params *p, const rb_code_position_t *pos)
1078{
1079}
1080
1081static void
1082pop_end_expect_token_locations(struct parser_params *p)
1083{
1084}
1085#endif
1086
1087RBIMPL_ATTR_NONNULL((1, 2, 3))
1088static int parser_yyerror(struct parser_params*, const YYLTYPE *yylloc, const char*);
1089RBIMPL_ATTR_NONNULL((1, 2))
1090static int parser_yyerror0(struct parser_params*, const char*);
1091#define yyerror0(msg) parser_yyerror0(p, (msg))
1092#define yyerror1(loc, msg) parser_yyerror(p, (loc), (msg))
1093#define yyerror(yylloc, p, msg) parser_yyerror(p, yylloc, msg)
1094#define token_flush(ptr) ((ptr)->lex.ptok = (ptr)->lex.pcur)
1095#define lex_goto_eol(p) ((p)->lex.pcur = (p)->lex.pend)
1096#define lex_eol_p(p) lex_eol_n_p(p, 0)
1097#define lex_eol_n_p(p,n) lex_eol_ptr_n_p(p, (p)->lex.pcur, n)
1098#define lex_eol_ptr_p(p,ptr) lex_eol_ptr_n_p(p,ptr,0)
1099#define lex_eol_ptr_n_p(p,ptr,n) ((ptr)+(n) >= (p)->lex.pend)
1100
1101static void token_info_setup(token_info *ptinfo, const char *ptr, const rb_code_location_t *loc);
1102static void token_info_push(struct parser_params*, const char *token, const rb_code_location_t *loc);
1103static void token_info_pop(struct parser_params*, const char *token, const rb_code_location_t *loc);
1104static void token_info_warn(struct parser_params *p, const char *token, token_info *ptinfo_beg, int same, const rb_code_location_t *loc);
1105static void token_info_drop(struct parser_params *p, const char *token, rb_code_position_t beg_pos);
1106
1107#ifdef RIPPER
1108#define compile_for_eval (0)
1109#else
1110#define compile_for_eval (p->parent_iseq != 0)
1111#endif
1112
1113#define token_column ((int)(p->lex.ptok - p->lex.pbeg))
1114
1115#define CALL_Q_P(q) ((q) == tANDDOT)
1116#define NEW_QCALL(q,r,m,a,loc) (CALL_Q_P(q) ? NEW_QCALL0(r,m,a,loc) : NEW_CALL(r,m,a,loc))
1117
1118#define lambda_beginning_p() (p->lex.lpar_beg == p->lex.paren_nest)
1119
1120static enum yytokentype yylex(YYSTYPE*, YYLTYPE*, struct parser_params*);
1121
1122static inline void
1123rb_discard_node(struct parser_params *p, NODE *n)
1124{
1125 rb_ast_delete_node(p->ast, n);
1126}
1127
1128static 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);
1129static 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);
1130static rb_node_block_t *rb_node_block_new(struct parser_params *p, NODE *nd_head, const YYLTYPE *loc);
1131static 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);
1132static 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);
1133static 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);
1134static 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);
1135static 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);
1136static 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);
1137static 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);
1138static 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);
1139static 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);
1140static rb_node_iter_t *rb_node_iter_new(struct parser_params *p, rb_node_args_t *nd_args, NODE *nd_body, const YYLTYPE *loc);
1141static 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);
1142static rb_node_for_masgn_t *rb_node_for_masgn_new(struct parser_params *p, NODE *nd_var, const YYLTYPE *loc);
1143static rb_node_retry_t *rb_node_retry_new(struct parser_params *p, const YYLTYPE *loc);
1144static rb_node_begin_t *rb_node_begin_new(struct parser_params *p, NODE *nd_body, const YYLTYPE *loc);
1145static rb_node_rescue_t *rb_node_rescue_new(struct parser_params *p, NODE *nd_head, NODE *nd_resq, NODE *nd_else, const YYLTYPE *loc);
1146static 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);
1147static rb_node_ensure_t *rb_node_ensure_new(struct parser_params *p, NODE *nd_head, NODE *nd_ensr, const YYLTYPE *loc);
1148static 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);
1149static 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);
1150static rb_node_masgn_t *rb_node_masgn_new(struct parser_params *p, NODE *nd_head, NODE *nd_args, const YYLTYPE *loc);
1151static rb_node_lasgn_t *rb_node_lasgn_new(struct parser_params *p, ID nd_vid, NODE *nd_value, const YYLTYPE *loc);
1152static rb_node_dasgn_t *rb_node_dasgn_new(struct parser_params *p, ID nd_vid, NODE *nd_value, const YYLTYPE *loc);
1153static rb_node_gasgn_t *rb_node_gasgn_new(struct parser_params *p, ID nd_vid, NODE *nd_value, const YYLTYPE *loc);
1154static rb_node_iasgn_t *rb_node_iasgn_new(struct parser_params *p, ID nd_vid, NODE *nd_value, const YYLTYPE *loc);
1155static 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);
1156static rb_node_cvasgn_t *rb_node_cvasgn_new(struct parser_params *p, ID nd_vid, NODE *nd_value, const YYLTYPE *loc);
1157static 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);
1158static 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);
1159static 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);
1160static 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);
1161static 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);
1162static rb_node_call_t *rb_node_call_new(struct parser_params *p, NODE *nd_recv, ID nd_mid, NODE *nd_args, const YYLTYPE *loc);
1163static rb_node_opcall_t *rb_node_opcall_new(struct parser_params *p, NODE *nd_recv, ID nd_mid, NODE *nd_args, const YYLTYPE *loc);
1164static rb_node_fcall_t *rb_node_fcall_new(struct parser_params *p, ID nd_mid, NODE *nd_args, const YYLTYPE *loc);
1165static rb_node_vcall_t *rb_node_vcall_new(struct parser_params *p, ID nd_mid, const YYLTYPE *loc);
1166static rb_node_qcall_t *rb_node_qcall_new(struct parser_params *p, NODE *nd_recv, ID nd_mid, NODE *nd_args, const YYLTYPE *loc);
1167static 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);
1168static rb_node_zsuper_t * rb_node_zsuper_new(struct parser_params *p, const YYLTYPE *loc);
1169static rb_node_list_t *rb_node_list_new(struct parser_params *p, NODE *nd_head, const YYLTYPE *loc);
1170static rb_node_list_t *rb_node_list_new2(struct parser_params *p, NODE *nd_head, long nd_alen, NODE *nd_next, const YYLTYPE *loc);
1171static rb_node_zlist_t *rb_node_zlist_new(struct parser_params *p, const YYLTYPE *loc);
1172static rb_node_hash_t *rb_node_hash_new(struct parser_params *p, NODE *nd_head, const YYLTYPE *loc);
1173static rb_node_return_t *rb_node_return_new(struct parser_params *p, NODE *nd_stts, const YYLTYPE *loc, const YYLTYPE *keyword_loc);
1174static 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);
1175static rb_node_lvar_t *rb_node_lvar_new(struct parser_params *p, ID nd_vid, const YYLTYPE *loc);
1176static rb_node_dvar_t *rb_node_dvar_new(struct parser_params *p, ID nd_vid, const YYLTYPE *loc);
1177static rb_node_gvar_t *rb_node_gvar_new(struct parser_params *p, ID nd_vid, const YYLTYPE *loc);
1178static rb_node_ivar_t *rb_node_ivar_new(struct parser_params *p, ID nd_vid, const YYLTYPE *loc);
1179static rb_node_const_t *rb_node_const_new(struct parser_params *p, ID nd_vid, const YYLTYPE *loc);
1180static rb_node_cvar_t *rb_node_cvar_new(struct parser_params *p, ID nd_vid, const YYLTYPE *loc);
1181static rb_node_nth_ref_t *rb_node_nth_ref_new(struct parser_params *p, long nd_nth, const YYLTYPE *loc);
1182static rb_node_back_ref_t *rb_node_back_ref_new(struct parser_params *p, long nd_nth, const YYLTYPE *loc);
1183static rb_node_match2_t *rb_node_match2_new(struct parser_params *p, NODE *nd_recv, NODE *nd_value, const YYLTYPE *loc);
1184static rb_node_match3_t *rb_node_match3_new(struct parser_params *p, NODE *nd_recv, NODE *nd_value, const YYLTYPE *loc);
1185static rb_node_integer_t * rb_node_integer_new(struct parser_params *p, char* val, int base, const YYLTYPE *loc);
1186static rb_node_float_t * rb_node_float_new(struct parser_params *p, char* val, const YYLTYPE *loc);
1187static rb_node_rational_t * rb_node_rational_new(struct parser_params *p, char* val, int base, int seen_point, const YYLTYPE *loc);
1188static 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);
1189static rb_node_str_t *rb_node_str_new(struct parser_params *p, rb_parser_string_t *string, const YYLTYPE *loc);
1190static 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);
1191static rb_node_dstr_t *rb_node_dstr_new(struct parser_params *p, rb_parser_string_t *string, const YYLTYPE *loc);
1192static rb_node_xstr_t *rb_node_xstr_new(struct parser_params *p, rb_parser_string_t *string, const YYLTYPE *loc);
1193static 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);
1194static 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);
1195static 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);
1196static rb_node_once_t *rb_node_once_new(struct parser_params *p, NODE *nd_body, const YYLTYPE *loc);
1197static rb_node_args_t *rb_node_args_new(struct parser_params *p, const YYLTYPE *loc);
1198static rb_node_args_aux_t *rb_node_args_aux_new(struct parser_params *p, ID nd_pid, int nd_plen, const YYLTYPE *loc);
1199static rb_node_opt_arg_t *rb_node_opt_arg_new(struct parser_params *p, NODE *nd_body, const YYLTYPE *loc);
1200static rb_node_kw_arg_t *rb_node_kw_arg_new(struct parser_params *p, NODE *nd_body, const YYLTYPE *loc);
1201static rb_node_postarg_t *rb_node_postarg_new(struct parser_params *p, NODE *nd_1st, NODE *nd_2nd, const YYLTYPE *loc);
1202static rb_node_argscat_t *rb_node_argscat_new(struct parser_params *p, NODE *nd_head, NODE *nd_body, const YYLTYPE *loc);
1203static rb_node_argspush_t *rb_node_argspush_new(struct parser_params *p, NODE *nd_head, NODE *nd_body, const YYLTYPE *loc);
1204static rb_node_splat_t *rb_node_splat_new(struct parser_params *p, NODE *nd_head, const YYLTYPE *loc, const YYLTYPE *operator_loc);
1205static rb_node_block_pass_t *rb_node_block_pass_new(struct parser_params *p, NODE *nd_body, const YYLTYPE *loc, const YYLTYPE *operator_loc);
1206static rb_node_defn_t *rb_node_defn_new(struct parser_params *p, ID nd_mid, NODE *nd_defn, const YYLTYPE *loc);
1207static rb_node_defs_t *rb_node_defs_new(struct parser_params *p, NODE *nd_recv, ID nd_mid, NODE *nd_defn, const YYLTYPE *loc);
1208static 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);
1209static 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);
1210static rb_node_undef_t *rb_node_undef_new(struct parser_params *p, NODE *nd_undef, const YYLTYPE *loc);
1211static 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);
1212static 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);
1213static 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);
1214static 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);
1215static 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);
1216static 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);
1217static 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);
1218static rb_node_self_t *rb_node_self_new(struct parser_params *p, const YYLTYPE *loc);
1219static rb_node_nil_t *rb_node_nil_new(struct parser_params *p, const YYLTYPE *loc);
1220static rb_node_true_t *rb_node_true_new(struct parser_params *p, const YYLTYPE *loc);
1221static rb_node_false_t *rb_node_false_new(struct parser_params *p, const YYLTYPE *loc);
1222static rb_node_errinfo_t *rb_node_errinfo_new(struct parser_params *p, const YYLTYPE *loc);
1223static rb_node_defined_t *rb_node_defined_new(struct parser_params *p, NODE *nd_head, const YYLTYPE *loc, const YYLTYPE *keyword_loc);
1224static 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);
1225static rb_node_sym_t *rb_node_sym_new(struct parser_params *p, VALUE str, const YYLTYPE *loc);
1226static 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);
1227static rb_node_attrasgn_t *rb_node_attrasgn_new(struct parser_params *p, NODE *nd_recv, ID nd_mid, NODE *nd_args, const YYLTYPE *loc);
1228static 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);
1229static rb_node_aryptn_t *rb_node_aryptn_new(struct parser_params *p, NODE *pre_args, NODE *rest_arg, NODE *post_args, const YYLTYPE *loc);
1230static rb_node_hshptn_t *rb_node_hshptn_new(struct parser_params *p, NODE *nd_pconst, NODE *nd_pkwargs, NODE *nd_pkwrestarg, const YYLTYPE *loc);
1231static 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);
1232static rb_node_line_t *rb_node_line_new(struct parser_params *p, const YYLTYPE *loc);
1233static rb_node_file_t *rb_node_file_new(struct parser_params *p, VALUE str, const YYLTYPE *loc);
1234static rb_node_error_t *rb_node_error_new(struct parser_params *p, const YYLTYPE *loc);
1235
1236#define NEW_SCOPE(a,b,c,loc) (NODE *)rb_node_scope_new(p,a,b,c,loc)
1237#define NEW_SCOPE2(t,a,b,c,loc) (NODE *)rb_node_scope_new2(p,t,a,b,c,loc)
1238#define NEW_BLOCK(a,loc) (NODE *)rb_node_block_new(p,a,loc)
1239#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)
1240#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)
1241#define NEW_CASE(h,b,loc,ck_loc,ek_loc) (NODE *)rb_node_case_new(p,h,b,loc,ck_loc,ek_loc)
1242#define NEW_CASE2(b,loc,ck_loc,ek_loc) (NODE *)rb_node_case2_new(p,b,loc,ck_loc,ek_loc)
1243#define NEW_CASE3(h,b,loc,ck_loc,ek_loc) (NODE *)rb_node_case3_new(p,h,b,loc,ck_loc,ek_loc)
1244#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)
1245#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)
1246#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)
1247#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)
1248#define NEW_ITER(a,b,loc) (NODE *)rb_node_iter_new(p,a,b,loc)
1249#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)
1250#define NEW_FOR_MASGN(v,loc) (NODE *)rb_node_for_masgn_new(p,v,loc)
1251#define NEW_RETRY(loc) (NODE *)rb_node_retry_new(p,loc)
1252#define NEW_BEGIN(b,loc) (NODE *)rb_node_begin_new(p,b,loc)
1253#define NEW_RESCUE(b,res,e,loc) (NODE *)rb_node_rescue_new(p,b,res,e,loc)
1254#define NEW_RESBODY(a,v,ex,n,loc) (NODE *)rb_node_resbody_new(p,a,v,ex,n,loc)
1255#define NEW_ENSURE(b,en,loc) (NODE *)rb_node_ensure_new(p,b,en,loc)
1256#define NEW_AND(f,s,loc,op_loc) (NODE *)rb_node_and_new(p,f,s,loc,op_loc)
1257#define NEW_OR(f,s,loc,op_loc) (NODE *)rb_node_or_new(p,f,s,loc,op_loc)
1258#define NEW_MASGN(l,r,loc) rb_node_masgn_new(p,l,r,loc)
1259#define NEW_LASGN(v,val,loc) (NODE *)rb_node_lasgn_new(p,v,val,loc)
1260#define NEW_DASGN(v,val,loc) (NODE *)rb_node_dasgn_new(p,v,val,loc)
1261#define NEW_GASGN(v,val,loc) (NODE *)rb_node_gasgn_new(p,v,val,loc)
1262#define NEW_IASGN(v,val,loc) (NODE *)rb_node_iasgn_new(p,v,val,loc)
1263#define NEW_CDECL(v,val,path,share,loc) (NODE *)rb_node_cdecl_new(p,v,val,path,share,loc)
1264#define NEW_CVASGN(v,val,loc) (NODE *)rb_node_cvasgn_new(p,v,val,loc)
1265#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)
1266#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)
1267#define NEW_OP_ASGN_OR(i,val,loc) (NODE *)rb_node_op_asgn_or_new(p,i,val,loc)
1268#define NEW_OP_ASGN_AND(i,val,loc) (NODE *)rb_node_op_asgn_and_new(p,i,val,loc)
1269#define NEW_OP_CDECL(v,op,val,share,loc) (NODE *)rb_node_op_cdecl_new(p,v,val,op,share,loc)
1270#define NEW_CALL(r,m,a,loc) (NODE *)rb_node_call_new(p,r,m,a,loc)
1271#define NEW_OPCALL(r,m,a,loc) (NODE *)rb_node_opcall_new(p,r,m,a,loc)
1272#define NEW_FCALL(m,a,loc) rb_node_fcall_new(p,m,a,loc)
1273#define NEW_VCALL(m,loc) (NODE *)rb_node_vcall_new(p,m,loc)
1274#define NEW_QCALL0(r,m,a,loc) (NODE *)rb_node_qcall_new(p,r,m,a,loc)
1275#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)
1276#define NEW_ZSUPER(loc) (NODE *)rb_node_zsuper_new(p,loc)
1277#define NEW_LIST(a,loc) (NODE *)rb_node_list_new(p,a,loc)
1278#define NEW_LIST2(h,l,n,loc) (NODE *)rb_node_list_new2(p,h,l,n,loc)
1279#define NEW_ZLIST(loc) (NODE *)rb_node_zlist_new(p,loc)
1280#define NEW_HASH(a,loc) (NODE *)rb_node_hash_new(p,a,loc)
1281#define NEW_RETURN(s,loc,k_loc) (NODE *)rb_node_return_new(p,s,loc,k_loc)
1282#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)
1283#define NEW_LVAR(v,loc) (NODE *)rb_node_lvar_new(p,v,loc)
1284#define NEW_DVAR(v,loc) (NODE *)rb_node_dvar_new(p,v,loc)
1285#define NEW_GVAR(v,loc) (NODE *)rb_node_gvar_new(p,v,loc)
1286#define NEW_IVAR(v,loc) (NODE *)rb_node_ivar_new(p,v,loc)
1287#define NEW_CONST(v,loc) (NODE *)rb_node_const_new(p,v,loc)
1288#define NEW_CVAR(v,loc) (NODE *)rb_node_cvar_new(p,v,loc)
1289#define NEW_NTH_REF(n,loc) (NODE *)rb_node_nth_ref_new(p,n,loc)
1290#define NEW_BACK_REF(n,loc) (NODE *)rb_node_back_ref_new(p,n,loc)
1291#define NEW_MATCH2(n1,n2,loc) (NODE *)rb_node_match2_new(p,n1,n2,loc)
1292#define NEW_MATCH3(r,n2,loc) (NODE *)rb_node_match3_new(p,r,n2,loc)
1293#define NEW_INTEGER(val, base,loc) (NODE *)rb_node_integer_new(p,val,base,loc)
1294#define NEW_FLOAT(val,loc) (NODE *)rb_node_float_new(p,val,loc)
1295#define NEW_RATIONAL(val,base,seen_point,loc) (NODE *)rb_node_rational_new(p,val,base,seen_point,loc)
1296#define NEW_IMAGINARY(val,base,seen_point,numeric_type,loc) (NODE *)rb_node_imaginary_new(p,val,base,seen_point,numeric_type,loc)
1297#define NEW_STR(s,loc) (NODE *)rb_node_str_new(p,s,loc)
1298#define NEW_DSTR0(s,l,n,loc) (NODE *)rb_node_dstr_new0(p,s,l,n,loc)
1299#define NEW_DSTR(s,loc) (NODE *)rb_node_dstr_new(p,s,loc)
1300#define NEW_XSTR(s,loc) (NODE *)rb_node_xstr_new(p,s,loc)
1301#define NEW_DXSTR(s,l,n,loc) (NODE *)rb_node_dxstr_new(p,s,l,n,loc)
1302#define NEW_EVSTR(n,loc,o_loc,c_loc) (NODE *)rb_node_evstr_new(p,n,loc,o_loc,c_loc)
1303#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)
1304#define NEW_ONCE(b,loc) (NODE *)rb_node_once_new(p,b,loc)
1305#define NEW_ARGS(loc) rb_node_args_new(p,loc)
1306#define NEW_ARGS_AUX(r,b,loc) rb_node_args_aux_new(p,r,b,loc)
1307#define NEW_OPT_ARG(v,loc) rb_node_opt_arg_new(p,v,loc)
1308#define NEW_KW_ARG(v,loc) rb_node_kw_arg_new(p,v,loc)
1309#define NEW_POSTARG(i,v,loc) (NODE *)rb_node_postarg_new(p,i,v,loc)
1310#define NEW_ARGSCAT(a,b,loc) (NODE *)rb_node_argscat_new(p,a,b,loc)
1311#define NEW_ARGSPUSH(a,b,loc) (NODE *)rb_node_argspush_new(p,a,b,loc)
1312#define NEW_SPLAT(a,loc,op_loc) (NODE *)rb_node_splat_new(p,a,loc,op_loc)
1313#define NEW_BLOCK_PASS(b,loc,o_loc) rb_node_block_pass_new(p,b,loc,o_loc)
1314#define NEW_DEFN(i,s,loc) (NODE *)rb_node_defn_new(p,i,s,loc)
1315#define NEW_DEFS(r,i,s,loc) (NODE *)rb_node_defs_new(p,r,i,s,loc)
1316#define NEW_ALIAS(n,o,loc,k_loc) (NODE *)rb_node_alias_new(p,n,o,loc,k_loc)
1317#define NEW_VALIAS(n,o,loc,k_loc) (NODE *)rb_node_valias_new(p,n,o,loc,k_loc)
1318#define NEW_UNDEF(i,loc) (NODE *)rb_node_undef_new(p,i,loc)
1319#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)
1320#define NEW_MODULE(n,b,loc,mk_loc,ek_loc) (NODE *)rb_node_module_new(p,n,b,loc,mk_loc,ek_loc)
1321#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)
1322#define NEW_COLON2(c,i,loc,d_loc,n_loc) (NODE *)rb_node_colon2_new(p,c,i,loc,d_loc,n_loc)
1323#define NEW_COLON3(i,loc,d_loc,n_loc) (NODE *)rb_node_colon3_new(p,i,loc,d_loc,n_loc)
1324#define NEW_DOT2(b,e,loc,op_loc) (NODE *)rb_node_dot2_new(p,b,e,loc,op_loc)
1325#define NEW_DOT3(b,e,loc,op_loc) (NODE *)rb_node_dot3_new(p,b,e,loc,op_loc)
1326#define NEW_SELF(loc) (NODE *)rb_node_self_new(p,loc)
1327#define NEW_NIL(loc) (NODE *)rb_node_nil_new(p,loc)
1328#define NEW_TRUE(loc) (NODE *)rb_node_true_new(p,loc)
1329#define NEW_FALSE(loc) (NODE *)rb_node_false_new(p,loc)
1330#define NEW_ERRINFO(loc) (NODE *)rb_node_errinfo_new(p,loc)
1331#define NEW_DEFINED(e,loc,k_loc) (NODE *)rb_node_defined_new(p,e,loc, k_loc)
1332#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)
1333#define NEW_SYM(str,loc) (NODE *)rb_node_sym_new(p,str,loc)
1334#define NEW_DSYM(s,l,n,loc) (NODE *)rb_node_dsym_new(p,s,l,n,loc)
1335#define NEW_ATTRASGN(r,m,a,loc) (NODE *)rb_node_attrasgn_new(p,r,m,a,loc)
1336#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)
1337#define NEW_ARYPTN(pre,r,post,loc) (NODE *)rb_node_aryptn_new(p,pre,r,post,loc)
1338#define NEW_HSHPTN(c,kw,kwrest,loc) (NODE *)rb_node_hshptn_new(p,c,kw,kwrest,loc)
1339#define NEW_FNDPTN(pre,a,post,loc) (NODE *)rb_node_fndptn_new(p,pre,a,post,loc)
1340#define NEW_LINE(loc) (NODE *)rb_node_line_new(p,loc)
1341#define NEW_FILE(str,loc) (NODE *)rb_node_file_new(p,str,loc)
1342#define NEW_ENCODING(loc) (NODE *)rb_node_encoding_new(p,loc)
1343#define NEW_ERROR(loc) (NODE *)rb_node_error_new(p,loc)
1344
1345enum internal_node_type {
1346 NODE_INTERNAL_ONLY = NODE_LAST,
1347 NODE_DEF_TEMP,
1348 NODE_EXITS,
1349 NODE_INTERNAL_LAST
1350};
1351
1352static const char *
1353parser_node_name(int node)
1354{
1355 switch (node) {
1356 case NODE_DEF_TEMP:
1357 return "NODE_DEF_TEMP";
1358 case NODE_EXITS:
1359 return "NODE_EXITS";
1360 default:
1361 return ruby_node_name(node);
1362 }
1363}
1364
1365/* This node is parse.y internal */
1366struct RNode_DEF_TEMP {
1367 NODE node;
1368
1369 /* for NODE_DEFN/NODE_DEFS */
1370
1371 struct RNode *nd_def;
1372 ID nd_mid;
1373
1374 struct {
1375 int max_numparam;
1376 NODE *numparam_save;
1377 struct lex_context ctxt;
1378 } save;
1379};
1380
1381#define RNODE_DEF_TEMP(node) ((struct RNode_DEF_TEMP *)(node))
1382
1383static rb_node_break_t *rb_node_break_new(struct parser_params *p, NODE *nd_stts, const YYLTYPE *loc, const YYLTYPE *keyword_loc);
1384static rb_node_next_t *rb_node_next_new(struct parser_params *p, NODE *nd_stts, const YYLTYPE *loc, const YYLTYPE *keyword_loc);
1385static rb_node_redo_t *rb_node_redo_new(struct parser_params *p, const YYLTYPE *loc, const YYLTYPE *keyword_loc);
1386static rb_node_def_temp_t *rb_node_def_temp_new(struct parser_params *p, const YYLTYPE *loc);
1387static rb_node_def_temp_t *def_head_save(struct parser_params *p, rb_node_def_temp_t *n);
1388
1389#define NEW_BREAK(s,loc,k_loc) (NODE *)rb_node_break_new(p,s,loc,k_loc)
1390#define NEW_NEXT(s,loc,k_loc) (NODE *)rb_node_next_new(p,s,loc,k_loc)
1391#define NEW_REDO(loc,k_loc) (NODE *)rb_node_redo_new(p,loc,k_loc)
1392#define NEW_DEF_TEMP(loc) rb_node_def_temp_new(p,loc)
1393
1394/* Make a new internal node, which should not be appeared in the
1395 * result AST and does not have node_id and location. */
1396static NODE* node_new_internal(struct parser_params *p, enum node_type type, size_t size, size_t alignment);
1397#define NODE_NEW_INTERNAL(ndtype, type) (type *)node_new_internal(p, (enum node_type)(ndtype), sizeof(type), RUBY_ALIGNOF(type))
1398
1399static NODE *nd_set_loc(NODE *nd, const YYLTYPE *loc);
1400
1401static int
1402parser_get_node_id(struct parser_params *p)
1403{
1404 int node_id = p->node_id;
1405 p->node_id++;
1406 return node_id;
1407}
1408
1409static void
1410anddot_multiple_assignment_check(struct parser_params* p, const YYLTYPE *loc, ID id)
1411{
1412 if (id == tANDDOT) {
1413 yyerror1(loc, "&. inside multiple assignment destination");
1414 }
1415}
1416
1417static inline void
1418set_line_body(NODE *body, int line)
1419{
1420 if (!body) return;
1421 switch (nd_type(body)) {
1422 case NODE_RESCUE:
1423 case NODE_ENSURE:
1424 nd_set_line(body, line);
1425 }
1426}
1427
1428static void
1429set_embraced_location(NODE *node, const rb_code_location_t *beg, const rb_code_location_t *end)
1430{
1431 RNODE_ITER(node)->nd_body->nd_loc = code_loc_gen(beg, end);
1432 nd_set_line(node, beg->end_pos.lineno);
1433}
1434
1435static NODE *
1436last_expr_node(NODE *expr)
1437{
1438 while (expr) {
1439 if (nd_type_p(expr, NODE_BLOCK)) {
1440 expr = RNODE_BLOCK(RNODE_BLOCK(expr)->nd_end)->nd_head;
1441 }
1442 else if (nd_type_p(expr, NODE_BEGIN) && RNODE_BEGIN(expr)->nd_body) {
1443 expr = RNODE_BEGIN(expr)->nd_body;
1444 }
1445 else {
1446 break;
1447 }
1448 }
1449 return expr;
1450}
1451
1452#ifndef RIPPER
1453#define yyparse ruby_yyparse
1454#endif
1455
1456static NODE* cond(struct parser_params *p, NODE *node, const YYLTYPE *loc);
1457static NODE* method_cond(struct parser_params *p, NODE *node, const YYLTYPE *loc);
1458static NODE *new_nil_at(struct parser_params *p, const rb_code_position_t *pos);
1459static NODE *new_if(struct parser_params*,NODE*,NODE*,NODE*,const YYLTYPE*,const YYLTYPE*,const YYLTYPE*,const YYLTYPE*);
1460static NODE *new_unless(struct parser_params*,NODE*,NODE*,NODE*,const YYLTYPE*,const YYLTYPE*,const YYLTYPE*,const YYLTYPE*);
1461static NODE *logop(struct parser_params*,ID,NODE*,NODE*,const YYLTYPE*,const YYLTYPE*);
1462
1463static NODE *newline_node(NODE*);
1464static void fixpos(NODE*,NODE*);
1465
1466static int value_expr(struct parser_params*,NODE*);
1467static void void_expr(struct parser_params*,NODE*);
1468static NODE *remove_begin(NODE*);
1469static NODE *void_stmts(struct parser_params*,NODE*);
1470static void reduce_nodes(struct parser_params*,NODE**);
1471static void block_dup_check(struct parser_params*,NODE*,NODE*);
1472
1473static NODE *block_append(struct parser_params*,NODE*,NODE*);
1474static NODE *list_append(struct parser_params*,NODE*,NODE*);
1475static NODE *list_concat(NODE*,NODE*);
1476static NODE *arg_append(struct parser_params*,NODE*,NODE*,const YYLTYPE*);
1477static NODE *last_arg_append(struct parser_params *p, NODE *args, NODE *last_arg, const YYLTYPE *loc);
1478static NODE *rest_arg_append(struct parser_params *p, NODE *args, NODE *rest_arg, const YYLTYPE *loc);
1479static NODE *literal_concat(struct parser_params*,NODE*,NODE*,const YYLTYPE*);
1480static NODE *new_evstr(struct parser_params*,NODE*,const YYLTYPE*,const YYLTYPE*,const YYLTYPE*);
1481static NODE *new_dstr(struct parser_params*,NODE*,const YYLTYPE*);
1482static NODE *str2dstr(struct parser_params*,NODE*);
1483static NODE *evstr2dstr(struct parser_params*,NODE*);
1484static NODE *splat_array(NODE*);
1485static void mark_lvar_used(struct parser_params *p, NODE *rhs);
1486
1487static NODE *call_bin_op(struct parser_params*,NODE*,ID,NODE*,const YYLTYPE*,const YYLTYPE*);
1488static NODE *call_uni_op(struct parser_params*,NODE*,ID,const YYLTYPE*,const YYLTYPE*);
1489static NODE *new_qcall(struct parser_params* p, ID atype, NODE *recv, ID mid, NODE *args, const YYLTYPE *op_loc, const YYLTYPE *loc);
1490static 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);
1491static 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;}
1492static NODE *command_add_block(struct parser_params*p, NODE *m, NODE *b, const YYLTYPE *loc);
1493
1494static bool args_info_empty_p(struct rb_args_info *args);
1495static 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*);
1496static rb_node_args_t *new_args_tail(struct parser_params*,rb_node_kw_arg_t*,ID,ID,const YYLTYPE*);
1497#define new_empty_args_tail(p, loc) new_args_tail(p, 0, 0, 0, loc)
1498static NODE *new_array_pattern(struct parser_params *p, NODE *constant, NODE *pre_arg, NODE *aryptn, const YYLTYPE *loc);
1499static NODE *new_array_pattern_tail(struct parser_params *p, NODE *pre_args, int has_rest, NODE *rest_arg, NODE *post_args, const YYLTYPE *loc);
1500static NODE *new_find_pattern(struct parser_params *p, NODE *constant, NODE *fndptn, const YYLTYPE *loc);
1501static NODE *new_find_pattern_tail(struct parser_params *p, NODE *pre_rest_arg, NODE *args, NODE *post_rest_arg, const YYLTYPE *loc);
1502static NODE *new_hash_pattern(struct parser_params *p, NODE *constant, NODE *hshptn, const YYLTYPE *loc);
1503static NODE *new_hash_pattern_tail(struct parser_params *p, NODE *kw_args, ID kw_rest_arg, const YYLTYPE *loc);
1504
1505static rb_node_kw_arg_t *new_kw_arg(struct parser_params *p, NODE *k, const YYLTYPE *loc);
1506static rb_node_args_t *args_with_numbered(struct parser_params*,rb_node_args_t*,int,ID);
1507
1508static NODE* negate_lit(struct parser_params*, NODE*,const YYLTYPE*);
1509static void no_blockarg(struct parser_params*,NODE*);
1510static NODE *ret_args(struct parser_params*,NODE*);
1511static NODE *arg_blk_pass(NODE*,rb_node_block_pass_t*);
1512static NODE *dsym_node(struct parser_params*,NODE*,const YYLTYPE*);
1513
1514static NODE *gettable(struct parser_params*,ID,const YYLTYPE*);
1515static NODE *assignable(struct parser_params*,ID,NODE*,const YYLTYPE*);
1516
1517static NODE *aryset(struct parser_params*,NODE*,NODE*,const YYLTYPE*);
1518static NODE *attrset(struct parser_params*,NODE*,ID,ID,const YYLTYPE*);
1519
1520static VALUE rb_backref_error(struct parser_params*,NODE*);
1521static NODE *node_assign(struct parser_params*,NODE*,NODE*,struct lex_context,const YYLTYPE*);
1522
1523static NODE *new_op_assign(struct parser_params *p, NODE *lhs, ID op, NODE *rhs, struct lex_context, const YYLTYPE *loc);
1524static 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);
1525static 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);
1526static NODE *new_const_op_assign(struct parser_params *p, NODE *lhs, ID op, NODE *rhs, struct lex_context, const YYLTYPE *loc);
1527static NODE *new_bodystmt(struct parser_params *p, NODE *head, NODE *rescue, NODE *rescue_else, NODE *ensure, const YYLTYPE *loc);
1528
1529static NODE *const_decl(struct parser_params *p, NODE* path, const YYLTYPE *loc);
1530
1531static rb_node_opt_arg_t *opt_arg_append(rb_node_opt_arg_t*, rb_node_opt_arg_t*);
1532static rb_node_kw_arg_t *kwd_append(rb_node_kw_arg_t*, rb_node_kw_arg_t*);
1533
1534static NODE *new_hash(struct parser_params *p, NODE *hash, const YYLTYPE *loc);
1535static NODE *new_unique_key_hash(struct parser_params *p, NODE *hash, const YYLTYPE *loc);
1536
1537static NODE *new_defined(struct parser_params *p, NODE *expr, const YYLTYPE *loc, const YYLTYPE *keyword_loc);
1538
1539static NODE *new_regexp(struct parser_params *, NODE *, int, const YYLTYPE *, const YYLTYPE *, const YYLTYPE *, const YYLTYPE *);
1540
1541#define make_list(list, loc) ((list) ? (nd_set_loc(list, loc), list) : NEW_ZLIST(loc))
1542
1543static NODE *new_xstring(struct parser_params *, NODE *, const YYLTYPE *loc);
1544
1545static NODE *symbol_append(struct parser_params *p, NODE *symbols, NODE *symbol);
1546
1547static NODE *match_op(struct parser_params*,NODE*,NODE*,const YYLTYPE*,const YYLTYPE*);
1548
1549static rb_ast_id_table_t *local_tbl(struct parser_params*);
1550
1551static VALUE reg_compile(struct parser_params*, rb_parser_string_t*, int);
1552static void reg_fragment_setenc(struct parser_params*, rb_parser_string_t*, int);
1553
1554static int literal_concat0(struct parser_params *p, rb_parser_string_t *head, rb_parser_string_t *tail);
1555static NODE *heredoc_dedent(struct parser_params*,NODE*);
1556
1557static void check_literal_when(struct parser_params *p, NODE *args, const YYLTYPE *loc);
1558
1559static 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);
1560
1561#ifdef RIPPER
1562#define get_value(idx) (rb_ary_entry(p->s_value_stack, idx))
1563#define set_value(val) (p->s_lvalue = val)
1564static VALUE assign_error(struct parser_params *p, const char *mesg, VALUE a);
1565static int id_is_var(struct parser_params *p, ID id);
1566#endif
1567
1568RUBY_SYMBOL_EXPORT_BEGIN
1569VALUE rb_parser_reg_compile(struct parser_params* p, VALUE str, int options);
1570int rb_reg_fragment_setenc(struct parser_params*, rb_parser_string_t *, int);
1571enum lex_state_e rb_parser_trace_lex_state(struct parser_params *, enum lex_state_e, enum lex_state_e, int);
1572VALUE rb_parser_lex_state_name(struct parser_params *p, enum lex_state_e state);
1573void rb_parser_show_bitstack(struct parser_params *, stack_type, const char *, int);
1574PRINTF_ARGS(void rb_parser_fatal(struct parser_params *p, const char *fmt, ...), 2, 3);
1575YYLTYPE *rb_parser_set_location_from_strterm_heredoc(struct parser_params *p, rb_strterm_heredoc_t *here, YYLTYPE *yylloc);
1576YYLTYPE *rb_parser_set_location_of_delayed_token(struct parser_params *p, YYLTYPE *yylloc);
1577YYLTYPE *rb_parser_set_location_of_heredoc_end(struct parser_params *p, YYLTYPE *yylloc);
1578YYLTYPE *rb_parser_set_location_of_dummy_end(struct parser_params *p, YYLTYPE *yylloc);
1579YYLTYPE *rb_parser_set_location_of_none(struct parser_params *p, YYLTYPE *yylloc);
1580YYLTYPE *rb_parser_set_location(struct parser_params *p, YYLTYPE *yylloc);
1581void ruby_show_error_line(struct parser_params *p, VALUE errbuf, const YYLTYPE *yylloc, int lineno, rb_parser_string_t *str);
1582RUBY_SYMBOL_EXPORT_END
1583
1584static void flush_string_content(struct parser_params *p, rb_encoding *enc, size_t back);
1585static void error_duplicate_pattern_variable(struct parser_params *p, ID id, const YYLTYPE *loc);
1586static void error_duplicate_pattern_key(struct parser_params *p, ID id, const YYLTYPE *loc);
1587static VALUE formal_argument_error(struct parser_params*, ID);
1588static ID shadowing_lvar(struct parser_params*,ID);
1589static void new_bv(struct parser_params*,ID);
1590
1591static void local_push(struct parser_params*,int);
1592static void local_pop(struct parser_params*);
1593static void local_var(struct parser_params*, ID);
1594static void arg_var(struct parser_params*, ID);
1595static int local_id(struct parser_params *p, ID id);
1596static int local_id_ref(struct parser_params*, ID, ID **);
1597#define internal_id rb_parser_internal_id
1598ID internal_id(struct parser_params*);
1599static NODE *new_args_forward_call(struct parser_params*, NODE*, const YYLTYPE*, const YYLTYPE*);
1600static int check_forwarding_args(struct parser_params*);
1601static void add_forwarding_args(struct parser_params *p);
1602static void forwarding_arg_check(struct parser_params *p, ID arg, ID all, const char *var);
1603
1604static const struct vtable *dyna_push(struct parser_params *);
1605static void dyna_pop(struct parser_params*, const struct vtable *);
1606static int dyna_in_block(struct parser_params*);
1607#define dyna_var(p, id) local_var(p, id)
1608static int dvar_defined(struct parser_params*, ID);
1609#define dvar_defined_ref rb_parser_dvar_defined_ref
1610int dvar_defined_ref(struct parser_params*, ID, ID**);
1611static int dvar_curr(struct parser_params*,ID);
1612
1613static int lvar_defined(struct parser_params*, ID);
1614
1615static NODE *numparam_push(struct parser_params *p);
1616static void numparam_pop(struct parser_params *p, NODE *prev_inner);
1617
1618#define METHOD_NOT '!'
1619
1620#define idFWD_REST '*'
1621#define idFWD_KWREST idPow /* Use simple "**", as tDSTAR is "**arg" */
1622#define idFWD_BLOCK '&'
1623#define idFWD_ALL idDot3
1624#define arg_FWD_BLOCK idFWD_BLOCK
1625
1626#define RE_ONIG_OPTION_IGNORECASE 1
1627#define RE_ONIG_OPTION_EXTEND (RE_ONIG_OPTION_IGNORECASE<<1)
1628#define RE_ONIG_OPTION_MULTILINE (RE_ONIG_OPTION_EXTEND<<1)
1629#define RE_OPTION_ONCE (1<<16)
1630#define RE_OPTION_ENCODING_SHIFT 8
1631#define RE_OPTION_ENCODING(e) (((e)&0xff)<<RE_OPTION_ENCODING_SHIFT)
1632#define RE_OPTION_ENCODING_IDX(o) (((o)>>RE_OPTION_ENCODING_SHIFT)&0xff)
1633#define RE_OPTION_ENCODING_NONE(o) ((o)&RE_OPTION_ARG_ENCODING_NONE)
1634#define RE_OPTION_MASK 0xff
1635#define RE_OPTION_ARG_ENCODING_NONE 32
1636
1637#define CHECK_LITERAL_WHEN (st_table *)1
1638#define CASE_LABELS_ENABLED_P(case_labels) (case_labels && case_labels != CHECK_LITERAL_WHEN)
1639
1640#define yytnamerr(yyres, yystr) (YYSIZE_T)rb_yytnamerr(p, yyres, yystr)
1641RUBY_FUNC_EXPORTED size_t rb_yytnamerr(struct parser_params *p, char *yyres, const char *yystr);
1642
1643#define TOKEN2ID(tok) ( \
1644 tTOKEN_LOCAL_BEGIN<(tok)&&(tok)<tTOKEN_LOCAL_END ? TOKEN2LOCALID(tok) : \
1645 tTOKEN_INSTANCE_BEGIN<(tok)&&(tok)<tTOKEN_INSTANCE_END ? TOKEN2INSTANCEID(tok) : \
1646 tTOKEN_GLOBAL_BEGIN<(tok)&&(tok)<tTOKEN_GLOBAL_END ? TOKEN2GLOBALID(tok) : \
1647 tTOKEN_CONST_BEGIN<(tok)&&(tok)<tTOKEN_CONST_END ? TOKEN2CONSTID(tok) : \
1648 tTOKEN_CLASS_BEGIN<(tok)&&(tok)<tTOKEN_CLASS_END ? TOKEN2CLASSID(tok) : \
1649 tTOKEN_ATTRSET_BEGIN<(tok)&&(tok)<tTOKEN_ATTRSET_END ? TOKEN2ATTRSETID(tok) : \
1650 ((tok) / ((tok)<tPRESERVED_ID_END && ((tok)>=128 || rb_ispunct(tok)))))
1651
1652/****** Ripper *******/
1653
1654#ifdef RIPPER
1655
1656#include "eventids1.h"
1657#include "eventids2.h"
1658
1659extern const struct ripper_parser_ids ripper_parser_ids;
1660
1661static VALUE ripper_dispatch0(struct parser_params*,ID);
1662static VALUE ripper_dispatch1(struct parser_params*,ID,VALUE);
1663static VALUE ripper_dispatch2(struct parser_params*,ID,VALUE,VALUE);
1664static VALUE ripper_dispatch3(struct parser_params*,ID,VALUE,VALUE,VALUE);
1665static VALUE ripper_dispatch4(struct parser_params*,ID,VALUE,VALUE,VALUE,VALUE);
1666static VALUE ripper_dispatch5(struct parser_params*,ID,VALUE,VALUE,VALUE,VALUE,VALUE);
1667static VALUE ripper_dispatch7(struct parser_params*,ID,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE);
1668void ripper_error(struct parser_params *p);
1669
1670#define dispatch0(n) ripper_dispatch0(p, RIPPER_ID(n))
1671#define dispatch1(n,a) ripper_dispatch1(p, RIPPER_ID(n), (a))
1672#define dispatch2(n,a,b) ripper_dispatch2(p, RIPPER_ID(n), (a), (b))
1673#define dispatch3(n,a,b,c) ripper_dispatch3(p, RIPPER_ID(n), (a), (b), (c))
1674#define dispatch4(n,a,b,c,d) ripper_dispatch4(p, RIPPER_ID(n), (a), (b), (c), (d))
1675#define dispatch5(n,a,b,c,d,e) ripper_dispatch5(p, RIPPER_ID(n), (a), (b), (c), (d), (e))
1676#define dispatch7(n,a,b,c,d,e,f,g) ripper_dispatch7(p, RIPPER_ID(n), (a), (b), (c), (d), (e), (f), (g))
1677
1678#define yyparse ripper_yyparse
1679
1680static VALUE
1681aryptn_pre_args(struct parser_params *p, VALUE pre_arg, VALUE pre_args)
1682{
1683 if (!NIL_P(pre_arg)) {
1684 if (!NIL_P(pre_args)) {
1685 rb_ary_unshift(pre_args, pre_arg);
1686 }
1687 else {
1688 pre_args = rb_ary_new_from_args(1, pre_arg);
1689 }
1690 }
1691 return pre_args;
1692}
1693
1694#define ID2VAL(id) STATIC_ID2SYM(id)
1695#define TOKEN2VAL(t) ID2VAL(TOKEN2ID(t))
1696#endif /* RIPPER */
1697
1698#define KWD2EID(t, v) keyword_##t
1699
1700static NODE *
1701new_scope_body(struct parser_params *p, rb_node_args_t *args, NODE *body, NODE *parent, const YYLTYPE *loc)
1702{
1703 body = remove_begin(body);
1704 reduce_nodes(p, &body);
1705 NODE *n = NEW_SCOPE(args, body, parent, loc);
1706 nd_set_line(n, loc->end_pos.lineno);
1707 set_line_body(body, loc->beg_pos.lineno);
1708 return n;
1709}
1710
1711static NODE *
1712rescued_expr(struct parser_params *p, NODE *arg, NODE *rescue,
1713 const YYLTYPE *arg_loc, const YYLTYPE *mod_loc, const YYLTYPE *res_loc)
1714{
1715 YYLTYPE loc = code_loc_gen(mod_loc, res_loc);
1716 rescue = NEW_RESBODY(0, 0, remove_begin(rescue), 0, &loc);
1717 loc.beg_pos = arg_loc->beg_pos;
1718 return NEW_RESCUE(arg, rescue, 0, &loc);
1719}
1720
1721static NODE *add_block_exit(struct parser_params *p, NODE *node);
1722static rb_node_exits_t *init_block_exit(struct parser_params *p);
1723static rb_node_exits_t *allow_block_exit(struct parser_params *p);
1724static void restore_block_exit(struct parser_params *p, rb_node_exits_t *exits);
1725static void clear_block_exit(struct parser_params *p, bool error);
1726
1727static void
1728next_rescue_context(struct lex_context *next, const struct lex_context *outer, enum rescue_context def)
1729{
1730 next->in_rescue = outer->in_rescue == after_rescue ? after_rescue : def;
1731}
1732
1733static void
1734restore_defun(struct parser_params *p, rb_node_def_temp_t *temp)
1735{
1736 /* See: def_name action */
1737 struct lex_context ctxt = temp->save.ctxt;
1738 p->ctxt.in_def = ctxt.in_def;
1739 p->ctxt.shareable_constant_value = ctxt.shareable_constant_value;
1740 p->ctxt.in_rescue = ctxt.in_rescue;
1741 p->max_numparam = temp->save.max_numparam;
1742 numparam_pop(p, temp->save.numparam_save);
1743 clear_block_exit(p, true);
1744}
1745
1746static void
1747endless_method_name(struct parser_params *p, ID mid, const YYLTYPE *loc)
1748{
1749 if (is_attrset_id(mid)) {
1750 yyerror1(loc, "setter method cannot be defined in an endless method definition");
1751 }
1752 token_info_drop(p, "def", loc->beg_pos);
1753}
1754
1755#define debug_token_line(p, name, line) do { \
1756 if (p->debug) { \
1757 const char *const pcur = p->lex.pcur; \
1758 const char *const ptok = p->lex.ptok; \
1759 rb_parser_printf(p, name ":%d (%d: %"PRIdPTRDIFF"|%"PRIdPTRDIFF"|%"PRIdPTRDIFF")\n", \
1760 line, p->ruby_sourceline, \
1761 ptok - p->lex.pbeg, pcur - ptok, p->lex.pend - pcur); \
1762 } \
1763 } while (0)
1764
1765#define begin_definition(k, loc_beg, loc_end) \
1766 do { \
1767 if (!(p->ctxt.in_class = (k)[0] != 0)) { \
1768 /* singleton class */ \
1769 p->ctxt.cant_return = !p->ctxt.in_def; \
1770 p->ctxt.in_def = 0; \
1771 } \
1772 else if (p->ctxt.in_def) { \
1773 YYLTYPE loc = code_loc_gen(loc_beg, loc_end); \
1774 yyerror1(&loc, k " definition in method body"); \
1775 } \
1776 else { \
1777 p->ctxt.cant_return = 1; \
1778 } \
1779 local_push(p, 0); \
1780 } while (0)
1781
1782#ifndef RIPPER
1783# define ifndef_ripper(x) (x)
1784# define ifdef_ripper(r,x) (x)
1785#else
1786# define ifndef_ripper(x)
1787# define ifdef_ripper(r,x) (r)
1788#endif
1789
1790# define rb_warn0(fmt) WARN_CALL(WARN_ARGS(fmt, 1))
1791# define rb_warn1(fmt,a) WARN_CALL(WARN_ARGS(fmt, 2), (a))
1792# define rb_warn2(fmt,a,b) WARN_CALL(WARN_ARGS(fmt, 3), (a), (b))
1793# define rb_warn3(fmt,a,b,c) WARN_CALL(WARN_ARGS(fmt, 4), (a), (b), (c))
1794# define rb_warn4(fmt,a,b,c,d) WARN_CALL(WARN_ARGS(fmt, 5), (a), (b), (c), (d))
1795# define rb_warning0(fmt) WARNING_CALL(WARNING_ARGS(fmt, 1))
1796# define rb_warning1(fmt,a) WARNING_CALL(WARNING_ARGS(fmt, 2), (a))
1797# define rb_warning2(fmt,a,b) WARNING_CALL(WARNING_ARGS(fmt, 3), (a), (b))
1798# define rb_warning3(fmt,a,b,c) WARNING_CALL(WARNING_ARGS(fmt, 4), (a), (b), (c))
1799# define rb_warning4(fmt,a,b,c,d) WARNING_CALL(WARNING_ARGS(fmt, 5), (a), (b), (c), (d))
1800# define rb_warn0L(l,fmt) WARN_CALL(WARN_ARGS_L(l, fmt, 1))
1801# define rb_warn1L(l,fmt,a) WARN_CALL(WARN_ARGS_L(l, fmt, 2), (a))
1802# define rb_warn2L(l,fmt,a,b) WARN_CALL(WARN_ARGS_L(l, fmt, 3), (a), (b))
1803# define rb_warn3L(l,fmt,a,b,c) WARN_CALL(WARN_ARGS_L(l, fmt, 4), (a), (b), (c))
1804# define rb_warn4L(l,fmt,a,b,c,d) WARN_CALL(WARN_ARGS_L(l, fmt, 5), (a), (b), (c), (d))
1805# define rb_warning0L(l,fmt) WARNING_CALL(WARNING_ARGS_L(l, fmt, 1))
1806# define rb_warning1L(l,fmt,a) WARNING_CALL(WARNING_ARGS_L(l, fmt, 2), (a))
1807# define rb_warning2L(l,fmt,a,b) WARNING_CALL(WARNING_ARGS_L(l, fmt, 3), (a), (b))
1808# define rb_warning3L(l,fmt,a,b,c) WARNING_CALL(WARNING_ARGS_L(l, fmt, 4), (a), (b), (c))
1809# define rb_warning4L(l,fmt,a,b,c,d) WARNING_CALL(WARNING_ARGS_L(l, fmt, 5), (a), (b), (c), (d))
1810#ifdef RIPPER
1811extern const ID id_warn, id_warning, id_gets, id_assoc;
1812# define ERR_MESG() STR_NEW2(mesg) /* to bypass Ripper DSL */
1813# define WARN_S_L(s,l) STR_NEW(s,l)
1814# define WARN_S(s) STR_NEW2(s)
1815# define WARN_I(i) INT2NUM(i)
1816# define WARN_ID(i) rb_id2str(i)
1817# define PRIsWARN PRIsVALUE
1818# define WARN_ARGS(fmt,n) p->value, id_warn, n, rb_usascii_str_new_lit(fmt)
1819# define WARN_ARGS_L(l,fmt,n) WARN_ARGS(fmt,n)
1820# define WARN_CALL(...) rb_funcall(__VA_ARGS__)
1821# define WARNING_ARGS(fmt,n) p->value, id_warning, n, rb_usascii_str_new_lit(fmt)
1822# define WARNING_ARGS_L(l, fmt,n) WARNING_ARGS(fmt,n)
1823# define WARNING_CALL(...) rb_funcall(__VA_ARGS__)
1824# define compile_error ripper_compile_error
1825#else
1826# define WARN_S_L(s,l) s
1827# define WARN_S(s) s
1828# define WARN_I(i) i
1829# define WARN_ID(i) rb_id2name(i)
1830# define PRIsWARN PRIsVALUE
1831# define WARN_ARGS(fmt,n) WARN_ARGS_L(p->ruby_sourceline,fmt,n)
1832# define WARN_ARGS_L(l,fmt,n) p->ruby_sourcefile, (l), (fmt)
1833# define WARN_CALL rb_compile_warn
1834# define WARNING_ARGS(fmt,n) WARN_ARGS(fmt,n)
1835# define WARNING_ARGS_L(l,fmt,n) WARN_ARGS_L(l,fmt,n)
1836# define WARNING_CALL rb_compile_warning
1837PRINTF_ARGS(static void parser_compile_error(struct parser_params*, const rb_code_location_t *loc, const char *fmt, ...), 3, 4);
1838# define compile_error(p, ...) parser_compile_error(p, NULL, __VA_ARGS__)
1839#endif
1840
1841#define RNODE_EXITS(node) ((rb_node_exits_t*)(node))
1842
1843static NODE *
1844add_block_exit(struct parser_params *p, NODE *node)
1845{
1846 if (!node) {
1847 compile_error(p, "unexpected null node");
1848 return 0;
1849 }
1850 switch (nd_type(node)) {
1851 case NODE_BREAK: case NODE_NEXT: case NODE_REDO: break;
1852 default:
1853 compile_error(p, "add_block_exit: unexpected node: %s", parser_node_name(nd_type(node)));
1854 return node;
1855 }
1856 if (!p->ctxt.in_defined) {
1857 rb_node_exits_t *exits = p->exits;
1858 if (exits) {
1859 RNODE_EXITS(exits->nd_stts)->nd_chain = node;
1860 exits->nd_stts = node;
1861 }
1862 }
1863 return node;
1864}
1865
1866static rb_node_exits_t *
1867init_block_exit(struct parser_params *p)
1868{
1869 rb_node_exits_t *old = p->exits;
1870 rb_node_exits_t *exits = NODE_NEW_INTERNAL(NODE_EXITS, rb_node_exits_t);
1871 exits->nd_chain = 0;
1872 exits->nd_stts = RNODE(exits);
1873 p->exits = exits;
1874 return old;
1875}
1876
1877static rb_node_exits_t *
1878allow_block_exit(struct parser_params *p)
1879{
1880 rb_node_exits_t *exits = p->exits;
1881 p->exits = 0;
1882 return exits;
1883}
1884
1885static void
1886restore_block_exit(struct parser_params *p, rb_node_exits_t *exits)
1887{
1888 p->exits = exits;
1889}
1890
1891static void
1892clear_block_exit(struct parser_params *p, bool error)
1893{
1894 rb_node_exits_t *exits = p->exits;
1895 if (!exits) return;
1896 if (error) {
1897 for (NODE *e = RNODE(exits); (e = RNODE_EXITS(e)->nd_chain) != 0; ) {
1898 switch (nd_type(e)) {
1899 case NODE_BREAK:
1900 yyerror1(&e->nd_loc, "Invalid break");
1901 break;
1902 case NODE_NEXT:
1903 yyerror1(&e->nd_loc, "Invalid next");
1904 break;
1905 case NODE_REDO:
1906 yyerror1(&e->nd_loc, "Invalid redo");
1907 break;
1908 default:
1909 yyerror1(&e->nd_loc, "unexpected node");
1910 goto end_checks; /* no nd_chain */
1911 }
1912 }
1913 end_checks:;
1914 }
1915 exits->nd_stts = RNODE(exits);
1916 exits->nd_chain = 0;
1917}
1918
1919#define WARN_EOL(tok) \
1920 (looking_at_eol_p(p) ? \
1921 (void)rb_warning0("'" tok "' at the end of line without an expression") : \
1922 (void)0)
1923static int looking_at_eol_p(struct parser_params *p);
1924
1925static NODE *
1926get_nd_value(struct parser_params *p, NODE *node)
1927{
1928 switch (nd_type(node)) {
1929 case NODE_GASGN:
1930 return RNODE_GASGN(node)->nd_value;
1931 case NODE_IASGN:
1932 return RNODE_IASGN(node)->nd_value;
1933 case NODE_LASGN:
1934 return RNODE_LASGN(node)->nd_value;
1935 case NODE_DASGN:
1936 return RNODE_DASGN(node)->nd_value;
1937 case NODE_MASGN:
1938 return RNODE_MASGN(node)->nd_value;
1939 case NODE_CVASGN:
1940 return RNODE_CVASGN(node)->nd_value;
1941 case NODE_CDECL:
1942 return RNODE_CDECL(node)->nd_value;
1943 default:
1944 compile_error(p, "get_nd_value: unexpected node: %s", parser_node_name(nd_type(node)));
1945 return 0;
1946 }
1947}
1948
1949static void
1950set_nd_value(struct parser_params *p, NODE *node, NODE *rhs)
1951{
1952 switch (nd_type(node)) {
1953 case NODE_CDECL:
1954 RNODE_CDECL(node)->nd_value = rhs;
1955 break;
1956 case NODE_GASGN:
1957 RNODE_GASGN(node)->nd_value = rhs;
1958 break;
1959 case NODE_IASGN:
1960 RNODE_IASGN(node)->nd_value = rhs;
1961 break;
1962 case NODE_LASGN:
1963 RNODE_LASGN(node)->nd_value = rhs;
1964 break;
1965 case NODE_DASGN:
1966 RNODE_DASGN(node)->nd_value = rhs;
1967 break;
1968 case NODE_MASGN:
1969 RNODE_MASGN(node)->nd_value = rhs;
1970 break;
1971 case NODE_CVASGN:
1972 RNODE_CVASGN(node)->nd_value = rhs;
1973 break;
1974 default:
1975 compile_error(p, "set_nd_value: unexpected node: %s", parser_node_name(nd_type(node)));
1976 break;
1977 }
1978}
1979
1980static ID
1981get_nd_vid(struct parser_params *p, NODE *node)
1982{
1983 switch (nd_type(node)) {
1984 case NODE_CDECL:
1985 return RNODE_CDECL(node)->nd_vid;
1986 case NODE_GASGN:
1987 return RNODE_GASGN(node)->nd_vid;
1988 case NODE_IASGN:
1989 return RNODE_IASGN(node)->nd_vid;
1990 case NODE_LASGN:
1991 return RNODE_LASGN(node)->nd_vid;
1992 case NODE_DASGN:
1993 return RNODE_DASGN(node)->nd_vid;
1994 case NODE_CVASGN:
1995 return RNODE_CVASGN(node)->nd_vid;
1996 default:
1997 compile_error(p, "get_nd_vid: unexpected node: %s", parser_node_name(nd_type(node)));
1998 return 0;
1999 }
2000}
2001
2002static NODE *
2003get_nd_args(struct parser_params *p, NODE *node)
2004{
2005 switch (nd_type(node)) {
2006 case NODE_CALL:
2007 return RNODE_CALL(node)->nd_args;
2008 case NODE_OPCALL:
2009 return RNODE_OPCALL(node)->nd_args;
2010 case NODE_FCALL:
2011 return RNODE_FCALL(node)->nd_args;
2012 case NODE_QCALL:
2013 return RNODE_QCALL(node)->nd_args;
2014 case NODE_SUPER:
2015 return RNODE_SUPER(node)->nd_args;
2016 case NODE_VCALL:
2017 case NODE_ZSUPER:
2018 case NODE_YIELD:
2019 case NODE_RETURN:
2020 case NODE_BREAK:
2021 case NODE_NEXT:
2022 return 0;
2023 default:
2024 compile_error(p, "get_nd_args: unexpected node: %s", parser_node_name(nd_type(node)));
2025 return 0;
2026 }
2027}
2028
2029static st_index_t
2030djb2(const uint8_t *str, size_t len)
2031{
2032 st_index_t hash = 5381;
2033
2034 for (size_t i = 0; i < len; i++) {
2035 hash = ((hash << 5) + hash) + str[i];
2036 }
2037
2038 return hash;
2039}
2040
2041static st_index_t
2042parser_memhash(const void *ptr, long len)
2043{
2044 return djb2(ptr, len);
2045}
2046
2047#define PARSER_STRING_PTR(str) (str->ptr)
2048#define PARSER_STRING_LEN(str) (str->len)
2049#define PARSER_STRING_END(str) (&str->ptr[str->len])
2050#define STRING_SIZE(str) ((size_t)str->len + 1)
2051#define STRING_TERM_LEN(str) (1)
2052#define STRING_TERM_FILL(str) (str->ptr[str->len] = '\0')
2053#define PARSER_STRING_RESIZE_CAPA_TERM(p,str,capacity,termlen) do {\
2054 REALLOC_N(str->ptr, char, (size_t)total + termlen); \
2055 str->len = total; \
2056} while (0)
2057#define STRING_SET_LEN(str, n) do { \
2058 (str)->len = (n); \
2059} while (0)
2060#define PARSER_STRING_GETMEM(str, ptrvar, lenvar) \
2061 ((ptrvar) = str->ptr, \
2062 (lenvar) = str->len)
2063
2064static inline int
2065parser_string_char_at_end(struct parser_params *p, rb_parser_string_t *str, int when_empty)
2066{
2067 return PARSER_STRING_LEN(str) > 0 ? (unsigned char)PARSER_STRING_END(str)[-1] : when_empty;
2068}
2069
2070static rb_parser_string_t *
2071rb_parser_string_new(rb_parser_t *p, const char *ptr, long len)
2072{
2073 rb_parser_string_t *str;
2074
2075 if (len < 0) {
2076 rb_bug("negative string size (or size too big): %ld", len);
2077 }
2078
2079 str = xcalloc(1, sizeof(rb_parser_string_t));
2080 str->ptr = xcalloc(len + 1, sizeof(char));
2081
2082 if (ptr) {
2083 memcpy(PARSER_STRING_PTR(str), ptr, len);
2084 }
2085 STRING_SET_LEN(str, len);
2086 STRING_TERM_FILL(str);
2087 return str;
2088}
2089
2090static rb_parser_string_t *
2091rb_parser_encoding_string_new(rb_parser_t *p, const char *ptr, long len, rb_encoding *enc)
2092{
2093 rb_parser_string_t *str = rb_parser_string_new(p, ptr, len);
2094 str->coderange = RB_PARSER_ENC_CODERANGE_UNKNOWN;
2095 str->enc = enc;
2096 return str;
2097}
2098
2099#ifndef RIPPER
2100rb_parser_string_t *
2101rb_str_to_parser_string(rb_parser_t *p, VALUE str)
2102{
2103 /* Type check */
2104 rb_parser_string_t *ret = rb_parser_encoding_string_new(p, RSTRING_PTR(str), RSTRING_LEN(str), rb_enc_get(str));
2105 RB_GC_GUARD(str);
2106 return ret;
2107}
2108
2109void
2110rb_parser_string_free(rb_parser_t *p, rb_parser_string_t *str)
2111{
2112 if (!str) return;
2113 xfree(PARSER_STRING_PTR(str));
2114 xfree(str);
2115}
2116#endif
2117
2118static st_index_t
2119rb_parser_str_hash(rb_parser_string_t *str)
2120{
2121 return parser_memhash((const void *)PARSER_STRING_PTR(str), PARSER_STRING_LEN(str));
2122}
2123
2124static st_index_t
2125rb_char_p_hash(const char *c)
2126{
2127 return parser_memhash((const void *)c, strlen(c));
2128}
2129
2130static size_t
2131rb_parser_str_capacity(rb_parser_string_t *str, const int termlen)
2132{
2133 return PARSER_STRING_LEN(str);
2134}
2135
2136#ifndef RIPPER
2137static char *
2138rb_parser_string_end(rb_parser_string_t *str)
2139{
2140 return &str->ptr[str->len];
2141}
2142#endif
2143
2144static void
2145rb_parser_string_set_encoding(rb_parser_string_t *str, rb_encoding *enc)
2146{
2147 str->enc = enc;
2148}
2149
2150static rb_encoding *
2151rb_parser_str_get_encoding(rb_parser_string_t *str)
2152{
2153 return str->enc;
2154}
2155
2156#ifndef RIPPER
2157static bool
2158PARSER_ENCODING_IS_ASCII8BIT(struct parser_params *p, rb_parser_string_t *str)
2159{
2160 return rb_parser_str_get_encoding(str) == rb_ascii8bit_encoding();
2161}
2162#endif
2163
2164static int
2165PARSER_ENC_CODERANGE(rb_parser_string_t *str)
2166{
2167 return str->coderange;
2168}
2169
2170static void
2171PARSER_ENC_CODERANGE_SET(rb_parser_string_t *str, int coderange)
2172{
2173 str->coderange = coderange;
2174}
2175
2176static void
2177PARSER_ENCODING_CODERANGE_SET(rb_parser_string_t *str, rb_encoding *enc, enum rb_parser_string_coderange_type cr)
2178{
2179 rb_parser_string_set_encoding(str, enc);
2180 PARSER_ENC_CODERANGE_SET(str, cr);
2181}
2182
2183static void
2184PARSER_ENC_CODERANGE_CLEAR(rb_parser_string_t *str)
2185{
2186 str->coderange = RB_PARSER_ENC_CODERANGE_UNKNOWN;
2187}
2188
2189static bool
2190PARSER_ENC_CODERANGE_ASCIIONLY(rb_parser_string_t *str)
2191{
2192 return PARSER_ENC_CODERANGE(str) == RB_PARSER_ENC_CODERANGE_7BIT;
2193}
2194
2195static bool
2196PARSER_ENC_CODERANGE_CLEAN_P(int cr)
2197{
2198 return cr == RB_PARSER_ENC_CODERANGE_7BIT || cr == RB_PARSER_ENC_CODERANGE_VALID;
2199}
2200
2201static const char *
2202rb_parser_search_nonascii(const char *p, const char *e)
2203{
2204 const char *s = p;
2205
2206 for (; s < e; s++) {
2207 if (*s & 0x80) return s;
2208 }
2209
2210 return NULL;
2211}
2212
2213static int
2214rb_parser_coderange_scan(struct parser_params *p, const char *ptr, long len, rb_encoding *enc)
2215{
2216 const char *e = ptr + len;
2217
2218 if (enc == rb_ascii8bit_encoding()) {
2219 /* enc is ASCII-8BIT. ASCII-8BIT string never be broken. */
2220 ptr = rb_parser_search_nonascii(ptr, e);
2221 return ptr ? RB_PARSER_ENC_CODERANGE_VALID : RB_PARSER_ENC_CODERANGE_7BIT;
2222 }
2223
2224 /* parser string encoding is always asciicompat */
2225 ptr = rb_parser_search_nonascii(ptr, e);
2226 if (!ptr) return RB_PARSER_ENC_CODERANGE_7BIT;
2227 for (;;) {
2228 int ret = rb_enc_precise_mbclen(ptr, e, enc);
2229 if (!MBCLEN_CHARFOUND_P(ret)) return RB_PARSER_ENC_CODERANGE_BROKEN;
2230 ptr += MBCLEN_CHARFOUND_LEN(ret);
2231 if (ptr == e) break;
2232 ptr = rb_parser_search_nonascii(ptr, e);
2233 if (!ptr) break;
2234 }
2235
2236 return RB_PARSER_ENC_CODERANGE_VALID;
2237}
2238
2239static int
2240rb_parser_enc_coderange_scan(struct parser_params *p, rb_parser_string_t *str, rb_encoding *enc)
2241{
2242 return rb_parser_coderange_scan(p, PARSER_STRING_PTR(str), PARSER_STRING_LEN(str), enc);
2243}
2244
2245static int
2246rb_parser_enc_str_coderange(struct parser_params *p, rb_parser_string_t *str)
2247{
2248 int cr = PARSER_ENC_CODERANGE(str);
2249
2250 if (cr == RB_PARSER_ENC_CODERANGE_UNKNOWN) {
2251 cr = rb_parser_enc_coderange_scan(p, str, rb_parser_str_get_encoding(str));
2252 PARSER_ENC_CODERANGE_SET(str, cr);
2253 }
2254
2255 return cr;
2256}
2257
2258static rb_parser_string_t *
2259rb_parser_enc_associate(struct parser_params *p, rb_parser_string_t *str, rb_encoding *enc)
2260{
2261 if (rb_parser_str_get_encoding(str) == enc)
2262 return str;
2263 if (!PARSER_ENC_CODERANGE_ASCIIONLY(str)) {
2264 PARSER_ENC_CODERANGE_CLEAR(str);
2265 }
2266 rb_parser_string_set_encoding(str, enc);
2267 return str;
2268}
2269
2270static bool
2271rb_parser_is_ascii_string(struct parser_params *p, rb_parser_string_t *str)
2272{
2273 return rb_parser_enc_str_coderange(p, str) == RB_PARSER_ENC_CODERANGE_7BIT;
2274}
2275
2276static rb_encoding *
2277rb_parser_enc_compatible(struct parser_params *p, rb_parser_string_t *str1, rb_parser_string_t *str2)
2278{
2279 rb_encoding *enc1 = rb_parser_str_get_encoding(str1);
2280 rb_encoding *enc2 = rb_parser_str_get_encoding(str2);
2281
2282 if (enc1 == NULL || enc2 == NULL)
2283 return 0;
2284
2285 if (enc1 == enc2) {
2286 return enc1;
2287 }
2288
2289 if (PARSER_STRING_LEN(str2) == 0)
2290 return enc1;
2291 if (PARSER_STRING_LEN(str1) == 0)
2292 return rb_parser_is_ascii_string(p, str2) ? enc1 : enc2;
2293
2294 int cr1, cr2;
2295
2296 cr1 = rb_parser_enc_str_coderange(p, str1);
2297 cr2 = rb_parser_enc_str_coderange(p, str2);
2298
2299 if (cr1 != cr2) {
2300 if (cr1 == RB_PARSER_ENC_CODERANGE_7BIT) return enc2;
2301 if (cr2 == RB_PARSER_ENC_CODERANGE_7BIT) return enc1;
2302 }
2303
2304 if (cr2 == RB_PARSER_ENC_CODERANGE_7BIT) {
2305 return enc1;
2306 }
2307
2308 if (cr1 == RB_PARSER_ENC_CODERANGE_7BIT) {
2309 return enc2;
2310 }
2311
2312 return 0;
2313}
2314
2315static void
2316rb_parser_str_modify(rb_parser_string_t *str)
2317{
2318 PARSER_ENC_CODERANGE_CLEAR(str);
2319}
2320
2321static void
2322rb_parser_str_set_len(struct parser_params *p, rb_parser_string_t *str, long len)
2323{
2324 long capa;
2325 const int termlen = STRING_TERM_LEN(str);
2326
2327 if (len > (capa = (long)(rb_parser_str_capacity(str, termlen))) || len < 0) {
2328 rb_bug("probable buffer overflow: %ld for %ld", len, capa);
2329 }
2330
2331 int cr = PARSER_ENC_CODERANGE(str);
2332 if (cr == RB_PARSER_ENC_CODERANGE_UNKNOWN) {
2333 /* Leave unknown. */
2334 }
2335 else if (len > PARSER_STRING_LEN(str)) {
2336 PARSER_ENC_CODERANGE_SET(str, RB_PARSER_ENC_CODERANGE_UNKNOWN);
2337 }
2338 else if (len < PARSER_STRING_LEN(str)) {
2339 if (cr != RB_PARSER_ENC_CODERANGE_7BIT) {
2340 /* ASCII-only string is keeping after truncated. Valid
2341 * and broken may be invalid or valid, leave unknown. */
2342 PARSER_ENC_CODERANGE_SET(str, RB_PARSER_ENC_CODERANGE_UNKNOWN);
2343 }
2344 }
2345
2346 STRING_SET_LEN(str, len);
2347 STRING_TERM_FILL(str);
2348}
2349
2350static rb_parser_string_t *
2351rb_parser_str_buf_cat(struct parser_params *p, rb_parser_string_t *str, const char *ptr, long len)
2352{
2353 rb_parser_str_modify(str);
2354 if (len == 0) return 0;
2355
2356 long total, olen, off = -1;
2357 char *sptr;
2358 const int termlen = STRING_TERM_LEN(str);
2359
2360 PARSER_STRING_GETMEM(str, sptr, olen);
2361 if (ptr >= sptr && ptr <= sptr + olen) {
2362 off = ptr - sptr;
2363 }
2364
2365 if (olen > LONG_MAX - len) {
2366 compile_error(p, "string sizes too big");
2367 return 0;
2368 }
2369 total = olen + len;
2370 PARSER_STRING_RESIZE_CAPA_TERM(p, str, total, termlen);
2371 sptr = PARSER_STRING_PTR(str);
2372 if (off != -1) {
2373 ptr = sptr + off;
2374 }
2375 memcpy(sptr + olen, ptr, len);
2376 STRING_SET_LEN(str, total);
2377 STRING_TERM_FILL(str);
2378
2379 return str;
2380}
2381
2382#define parser_str_cat(str, ptr, len) rb_parser_str_buf_cat(p, str, ptr, len)
2383#define parser_str_cat_cstr(str, lit) rb_parser_str_buf_cat(p, str, lit, strlen(lit))
2384
2385static rb_parser_string_t *
2386rb_parser_enc_cr_str_buf_cat(struct parser_params *p, rb_parser_string_t *str, const char *ptr, long len,
2387 rb_encoding *ptr_enc, int ptr_cr, int *ptr_cr_ret)
2388{
2389 int str_cr, res_cr;
2390 rb_encoding *str_enc, *res_enc;
2391
2392 str_enc = rb_parser_str_get_encoding(str);
2393 str_cr = PARSER_STRING_LEN(str) ? PARSER_ENC_CODERANGE(str) : RB_PARSER_ENC_CODERANGE_7BIT;
2394
2395 if (str_enc == ptr_enc) {
2396 if (str_cr != RB_PARSER_ENC_CODERANGE_UNKNOWN && ptr_cr == RB_PARSER_ENC_CODERANGE_UNKNOWN) {
2397 ptr_cr = rb_parser_coderange_scan(p, ptr, len, ptr_enc);
2398 }
2399 }
2400 else {
2401 /* parser string encoding is always asciicompat */
2402 if (ptr_cr == RB_PARSER_ENC_CODERANGE_UNKNOWN) {
2403 ptr_cr = rb_parser_coderange_scan(p, ptr, len, ptr_enc);
2404 }
2405 if (str_cr == RB_PARSER_ENC_CODERANGE_UNKNOWN) {
2406 if (str_enc == rb_ascii8bit_encoding() || ptr_cr != RB_PARSER_ENC_CODERANGE_7BIT) {
2407 str_cr = rb_parser_enc_str_coderange(p, str);
2408 }
2409 }
2410 }
2411 if (ptr_cr_ret)
2412 *ptr_cr_ret = ptr_cr;
2413
2414 if (str_enc != ptr_enc &&
2415 str_cr != RB_PARSER_ENC_CODERANGE_7BIT &&
2416 ptr_cr != RB_PARSER_ENC_CODERANGE_7BIT) {
2417 goto incompatible;
2418 }
2419
2420 if (str_cr == RB_PARSER_ENC_CODERANGE_UNKNOWN) {
2421 res_enc = str_enc;
2422 res_cr = RB_PARSER_ENC_CODERANGE_UNKNOWN;
2423 }
2424 else if (str_cr == RB_PARSER_ENC_CODERANGE_7BIT) {
2425 if (ptr_cr == RB_PARSER_ENC_CODERANGE_7BIT) {
2426 res_enc = str_enc;
2427 res_cr = RB_PARSER_ENC_CODERANGE_7BIT;
2428 }
2429 else {
2430 res_enc = ptr_enc;
2431 res_cr = ptr_cr;
2432 }
2433 }
2434 else if (str_cr == RB_PARSER_ENC_CODERANGE_VALID) {
2435 res_enc = str_enc;
2436 if (PARSER_ENC_CODERANGE_CLEAN_P(ptr_cr))
2437 res_cr = str_cr;
2438 else
2439 res_cr = ptr_cr;
2440 }
2441 else { /* str_cr == RB_PARSER_ENC_CODERANGE_BROKEN */
2442 res_enc = str_enc;
2443 res_cr = str_cr;
2444 if (0 < len) res_cr = RB_PARSER_ENC_CODERANGE_UNKNOWN;
2445 }
2446
2447 if (len < 0) {
2448 compile_error(p, "negative string size (or size too big)");
2449 }
2450 parser_str_cat(str, ptr, len);
2451 PARSER_ENCODING_CODERANGE_SET(str, res_enc, res_cr);
2452 return str;
2453
2454 incompatible:
2455 compile_error(p, "incompatible character encodings: %s and %s",
2456 rb_enc_name(str_enc), rb_enc_name(ptr_enc));
2457 UNREACHABLE_RETURN(0);
2458
2459}
2460
2461static rb_parser_string_t *
2462rb_parser_enc_str_buf_cat(struct parser_params *p, rb_parser_string_t *str, const char *ptr, long len,
2463 rb_encoding *ptr_enc)
2464{
2465 return rb_parser_enc_cr_str_buf_cat(p, str, ptr, len, ptr_enc, RB_PARSER_ENC_CODERANGE_UNKNOWN, NULL);
2466}
2467
2468static rb_parser_string_t *
2469rb_parser_str_buf_append(struct parser_params *p, rb_parser_string_t *str, rb_parser_string_t *str2)
2470{
2471 int str2_cr = rb_parser_enc_str_coderange(p, str2);
2472
2473 rb_parser_enc_cr_str_buf_cat(p, str, PARSER_STRING_PTR(str2), PARSER_STRING_LEN(str2),
2474 rb_parser_str_get_encoding(str2), str2_cr, &str2_cr);
2475
2476 PARSER_ENC_CODERANGE_SET(str2, str2_cr);
2477
2478 return str;
2479}
2480
2481static rb_parser_string_t *
2482rb_parser_str_resize(struct parser_params *p, rb_parser_string_t *str, long len)
2483{
2484 if (len < 0) {
2485 rb_bug("negative string size (or size too big)");
2486 }
2487
2488 long slen = PARSER_STRING_LEN(str);
2489
2490 if (slen > len && PARSER_ENC_CODERANGE(str) != RB_PARSER_ENC_CODERANGE_7BIT) {
2491 PARSER_ENC_CODERANGE_CLEAR(str);
2492 }
2493
2494 {
2495 long capa;
2496 const int termlen = STRING_TERM_LEN(str);
2497
2498 if ((capa = slen) < len) {
2499 SIZED_REALLOC_N(str->ptr, char, (size_t)len + termlen, STRING_SIZE(str));
2500 }
2501 else if (len == slen) return str;
2502 STRING_SET_LEN(str, len);
2503 STRING_TERM_FILL(str);
2504 }
2505 return str;
2506}
2507
2508# define PARSER_ENC_STRING_GETMEM(str, ptrvar, lenvar, encvar) \
2509 ((ptrvar) = str->ptr, \
2510 (lenvar) = str->len, \
2511 (encvar) = str->enc)
2512
2513static int
2514rb_parser_string_hash_cmp(rb_parser_string_t *str1, rb_parser_string_t *str2)
2515{
2516 long len1, len2;
2517 const char *ptr1, *ptr2;
2518 rb_encoding *enc1, *enc2;
2519
2520 PARSER_ENC_STRING_GETMEM(str1, ptr1, len1, enc1);
2521 PARSER_ENC_STRING_GETMEM(str2, ptr2, len2, enc2);
2522
2523 return (len1 != len2 ||
2524 enc1 != enc2 ||
2525 memcmp(ptr1, ptr2, len1) != 0);
2526}
2527
2528static void
2529rb_parser_ary_extend(rb_parser_t *p, rb_parser_ary_t *ary, long len)
2530{
2531 long i;
2532 if (ary->capa < len) {
2533 ary->capa = len;
2534 ary->data = (rb_parser_ary_data *)xrealloc(ary->data, sizeof(rb_parser_ary_data) * len);
2535 for (i = ary->len; i < len; i++) {
2536 ary->data[i] = 0;
2537 }
2538 }
2539}
2540
2541/*
2542 * Do not call this directly.
2543 * Use rb_parser_ary_new_capa_for_XXX() instead.
2544 */
2545static rb_parser_ary_t *
2546parser_ary_new_capa(rb_parser_t *p, long len)
2547{
2548 if (len < 0) {
2549 rb_bug("negative array size (or size too big): %ld", len);
2550 }
2551 rb_parser_ary_t *ary = xcalloc(1, sizeof(rb_parser_ary_t));
2552 ary->data_type = 0;
2553 ary->len = 0;
2554 ary->capa = len;
2555 if (0 < len) {
2556 ary->data = (rb_parser_ary_data *)xcalloc(len, sizeof(rb_parser_ary_data));
2557 }
2558 else {
2559 ary->data = NULL;
2560 }
2561 return ary;
2562}
2563
2564#ifndef RIPPER
2565static rb_parser_ary_t *
2566rb_parser_ary_new_capa_for_script_line(rb_parser_t *p, long len)
2567{
2568 rb_parser_ary_t *ary = parser_ary_new_capa(p, len);
2569 ary->data_type = PARSER_ARY_DATA_SCRIPT_LINE;
2570 return ary;
2571}
2572
2573static rb_parser_ary_t *
2574rb_parser_ary_new_capa_for_ast_token(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_AST_TOKEN;
2578 return ary;
2579}
2580#endif
2581
2582static rb_parser_ary_t *
2583rb_parser_ary_new_capa_for_node(rb_parser_t *p, long len)
2584{
2585 rb_parser_ary_t *ary = parser_ary_new_capa(p, len);
2586 ary->data_type = PARSER_ARY_DATA_NODE;
2587 return ary;
2588}
2589
2590/*
2591 * Do not call this directly.
2592 * Use rb_parser_ary_push_XXX() instead.
2593 */
2594static rb_parser_ary_t *
2595parser_ary_push(rb_parser_t *p, rb_parser_ary_t *ary, rb_parser_ary_data val)
2596{
2597 if (ary->len == ary->capa) {
2598 rb_parser_ary_extend(p, ary, ary->len == 0 ? 1 : ary->len * 2);
2599 }
2600 ary->data[ary->len++] = val;
2601 return ary;
2602}
2603
2604#ifndef RIPPER
2605static rb_parser_ary_t *
2606rb_parser_ary_push_ast_token(rb_parser_t *p, rb_parser_ary_t *ary, rb_parser_ast_token_t *val)
2607{
2608 if (ary->data_type != PARSER_ARY_DATA_AST_TOKEN) {
2609 rb_bug("unexpected rb_parser_ary_data_type: %d", ary->data_type);
2610 }
2611 return parser_ary_push(p, ary, val);
2612}
2613
2614static rb_parser_ary_t *
2615rb_parser_ary_push_script_line(rb_parser_t *p, rb_parser_ary_t *ary, rb_parser_string_t *val)
2616{
2617 if (ary->data_type != PARSER_ARY_DATA_SCRIPT_LINE) {
2618 rb_bug("unexpected rb_parser_ary_data_type: %d", ary->data_type);
2619 }
2620 return parser_ary_push(p, ary, val);
2621}
2622#endif
2623
2624static rb_parser_ary_t *
2625rb_parser_ary_push_node(rb_parser_t *p, rb_parser_ary_t *ary, NODE *val)
2626{
2627 if (ary->data_type != PARSER_ARY_DATA_NODE) {
2628 rb_bug("unexpected rb_parser_ary_data_type: %d", ary->data_type);
2629 }
2630 return parser_ary_push(p, ary, val);
2631}
2632
2633#ifndef RIPPER
2634static void
2635rb_parser_ast_token_free(rb_parser_t *p, rb_parser_ast_token_t *token)
2636{
2637 if (!token) return;
2638 rb_parser_string_free(p, token->str);
2639 xfree(token);
2640}
2641
2642static void
2643rb_parser_ary_free(rb_parser_t *p, rb_parser_ary_t *ary)
2644{
2645# define foreach_ary(ptr) \
2646 for (rb_parser_ary_data *ptr = ary->data, *const end_ary_data = ptr + ary->len; \
2647 ptr < end_ary_data; ptr++)
2648 switch (ary->data_type) {
2649 case PARSER_ARY_DATA_AST_TOKEN:
2650 foreach_ary(data) {rb_parser_ast_token_free(p, *data);}
2651 break;
2652 case PARSER_ARY_DATA_SCRIPT_LINE:
2653 foreach_ary(data) {rb_parser_string_free(p, *data);}
2654 break;
2655 case PARSER_ARY_DATA_NODE:
2656 /* Do nothing because nodes are freed when rb_ast_t is freed */
2657 break;
2658 default:
2659 rb_bug("unexpected rb_parser_ary_data_type: %d", ary->data_type);
2660 break;
2661 }
2662# undef foreach_ary
2663 xfree(ary->data);
2664 xfree(ary);
2665}
2666
2667#endif /* !RIPPER */
2668
2669#line 2670 "parse.c"
2670
2671# ifndef YY_CAST
2672# ifdef __cplusplus
2673# define YY_CAST(Type, Val) static_cast<Type> (Val)
2674# define YY_REINTERPRET_CAST(Type, Val) reinterpret_cast<Type> (Val)
2675# else
2676# define YY_CAST(Type, Val) ((Type) (Val))
2677# define YY_REINTERPRET_CAST(Type, Val) ((Type) (Val))
2678# endif
2679# endif
2680# ifndef YY_NULLPTR
2681# if defined __cplusplus
2682# if 201103L <= __cplusplus
2683# define YY_NULLPTR nullptr
2684# else
2685# define YY_NULLPTR 0
2686# endif
2687# else
2688# define YY_NULLPTR ((void*)0)
2689# endif
2690# endif
2691
2692#include "parse.h"
2693/* Symbol kind. */
2694enum yysymbol_kind_t
2695{
2696 YYSYMBOL_YYEMPTY = -2,
2697 YYSYMBOL_YYEOF = 0, /* "end-of-input" */
2698 YYSYMBOL_YYerror = 1, /* error */
2699 YYSYMBOL_YYUNDEF = 2, /* "invalid token" */
2700 YYSYMBOL_keyword_class = 3, /* "'class'" */
2701 YYSYMBOL_keyword_module = 4, /* "'module'" */
2702 YYSYMBOL_keyword_def = 5, /* "'def'" */
2703 YYSYMBOL_keyword_undef = 6, /* "'undef'" */
2704 YYSYMBOL_keyword_begin = 7, /* "'begin'" */
2705 YYSYMBOL_keyword_rescue = 8, /* "'rescue'" */
2706 YYSYMBOL_keyword_ensure = 9, /* "'ensure'" */
2707 YYSYMBOL_keyword_end = 10, /* "'end'" */
2708 YYSYMBOL_keyword_if = 11, /* "'if'" */
2709 YYSYMBOL_keyword_unless = 12, /* "'unless'" */
2710 YYSYMBOL_keyword_then = 13, /* "'then'" */
2711 YYSYMBOL_keyword_elsif = 14, /* "'elsif'" */
2712 YYSYMBOL_keyword_else = 15, /* "'else'" */
2713 YYSYMBOL_keyword_case = 16, /* "'case'" */
2714 YYSYMBOL_keyword_when = 17, /* "'when'" */
2715 YYSYMBOL_keyword_while = 18, /* "'while'" */
2716 YYSYMBOL_keyword_until = 19, /* "'until'" */
2717 YYSYMBOL_keyword_for = 20, /* "'for'" */
2718 YYSYMBOL_keyword_break = 21, /* "'break'" */
2719 YYSYMBOL_keyword_next = 22, /* "'next'" */
2720 YYSYMBOL_keyword_redo = 23, /* "'redo'" */
2721 YYSYMBOL_keyword_retry = 24, /* "'retry'" */
2722 YYSYMBOL_keyword_in = 25, /* "'in'" */
2723 YYSYMBOL_keyword_do = 26, /* "'do'" */
2724 YYSYMBOL_keyword_do_cond = 27, /* "'do' for condition" */
2725 YYSYMBOL_keyword_do_block = 28, /* "'do' for block" */
2726 YYSYMBOL_keyword_do_LAMBDA = 29, /* "'do' for lambda" */
2727 YYSYMBOL_keyword_return = 30, /* "'return'" */
2728 YYSYMBOL_keyword_yield = 31, /* "'yield'" */
2729 YYSYMBOL_keyword_super = 32, /* "'super'" */
2730 YYSYMBOL_keyword_self = 33, /* "'self'" */
2731 YYSYMBOL_keyword_nil = 34, /* "'nil'" */
2732 YYSYMBOL_keyword_true = 35, /* "'true'" */
2733 YYSYMBOL_keyword_false = 36, /* "'false'" */
2734 YYSYMBOL_keyword_and = 37, /* "'and'" */
2735 YYSYMBOL_keyword_or = 38, /* "'or'" */
2736 YYSYMBOL_keyword_not = 39, /* "'not'" */
2737 YYSYMBOL_modifier_if = 40, /* "'if' modifier" */
2738 YYSYMBOL_modifier_unless = 41, /* "'unless' modifier" */
2739 YYSYMBOL_modifier_while = 42, /* "'while' modifier" */
2740 YYSYMBOL_modifier_until = 43, /* "'until' modifier" */
2741 YYSYMBOL_modifier_rescue = 44, /* "'rescue' modifier" */
2742 YYSYMBOL_keyword_alias = 45, /* "'alias'" */
2743 YYSYMBOL_keyword_defined = 46, /* "'defined?'" */
2744 YYSYMBOL_keyword_BEGIN = 47, /* "'BEGIN'" */
2745 YYSYMBOL_keyword_END = 48, /* "'END'" */
2746 YYSYMBOL_keyword__LINE__ = 49, /* "'__LINE__'" */
2747 YYSYMBOL_keyword__FILE__ = 50, /* "'__FILE__'" */
2748 YYSYMBOL_keyword__ENCODING__ = 51, /* "'__ENCODING__'" */
2749 YYSYMBOL_tIDENTIFIER = 52, /* "local variable or method" */
2750 YYSYMBOL_tFID = 53, /* "method" */
2751 YYSYMBOL_tGVAR = 54, /* "global variable" */
2752 YYSYMBOL_tIVAR = 55, /* "instance variable" */
2753 YYSYMBOL_tCONSTANT = 56, /* "constant" */
2754 YYSYMBOL_tCVAR = 57, /* "class variable" */
2755 YYSYMBOL_tLABEL = 58, /* "label" */
2756 YYSYMBOL_tINTEGER = 59, /* "integer literal" */
2757 YYSYMBOL_tFLOAT = 60, /* "float literal" */
2758 YYSYMBOL_tRATIONAL = 61, /* "rational literal" */
2759 YYSYMBOL_tIMAGINARY = 62, /* "imaginary literal" */
2760 YYSYMBOL_tCHAR = 63, /* "char literal" */
2761 YYSYMBOL_tNTH_REF = 64, /* "numbered reference" */
2762 YYSYMBOL_tBACK_REF = 65, /* "back reference" */
2763 YYSYMBOL_tSTRING_CONTENT = 66, /* "literal content" */
2764 YYSYMBOL_tREGEXP_END = 67, /* tREGEXP_END */
2765 YYSYMBOL_tDUMNY_END = 68, /* "dummy end" */
2766 YYSYMBOL_69_ = 69, /* '.' */
2767 YYSYMBOL_70_backslash_ = 70, /* "backslash" */
2768 YYSYMBOL_tSP = 71, /* "escaped space" */
2769 YYSYMBOL_72_escaped_horizontal_tab_ = 72, /* "escaped horizontal tab" */
2770 YYSYMBOL_73_escaped_form_feed_ = 73, /* "escaped form feed" */
2771 YYSYMBOL_74_escaped_carriage_return_ = 74, /* "escaped carriage return" */
2772 YYSYMBOL_75_escaped_vertical_tab_ = 75, /* "escaped vertical tab" */
2773 YYSYMBOL_tUPLUS = 76, /* "unary+" */
2774 YYSYMBOL_tUMINUS = 77, /* "unary-" */
2775 YYSYMBOL_tPOW = 78, /* "**" */
2776 YYSYMBOL_tCMP = 79, /* "<=>" */
2777 YYSYMBOL_tEQ = 80, /* "==" */
2778 YYSYMBOL_tEQQ = 81, /* "===" */
2779 YYSYMBOL_tNEQ = 82, /* "!=" */
2780 YYSYMBOL_tGEQ = 83, /* ">=" */
2781 YYSYMBOL_tLEQ = 84, /* "<=" */
2782 YYSYMBOL_tANDOP = 85, /* "&&" */
2783 YYSYMBOL_tOROP = 86, /* "||" */
2784 YYSYMBOL_tMATCH = 87, /* "=~" */
2785 YYSYMBOL_tNMATCH = 88, /* "!~" */
2786 YYSYMBOL_tDOT2 = 89, /* ".." */
2787 YYSYMBOL_tDOT3 = 90, /* "..." */
2788 YYSYMBOL_tBDOT2 = 91, /* "(.." */
2789 YYSYMBOL_tBDOT3 = 92, /* "(..." */
2790 YYSYMBOL_tAREF = 93, /* "[]" */
2791 YYSYMBOL_tASET = 94, /* "[]=" */
2792 YYSYMBOL_tLSHFT = 95, /* "<<" */
2793 YYSYMBOL_tRSHFT = 96, /* ">>" */
2794 YYSYMBOL_tANDDOT = 97, /* "&." */
2795 YYSYMBOL_tCOLON2 = 98, /* "::" */
2796 YYSYMBOL_tCOLON3 = 99, /* ":: at EXPR_BEG" */
2797 YYSYMBOL_tOP_ASGN = 100, /* "operator-assignment" */
2798 YYSYMBOL_tASSOC = 101, /* "=>" */
2799 YYSYMBOL_tLPAREN = 102, /* "(" */
2800 YYSYMBOL_tLPAREN_ARG = 103, /* "( arg" */
2801 YYSYMBOL_tLBRACK = 104, /* "[" */
2802 YYSYMBOL_tLBRACE = 105, /* "{" */
2803 YYSYMBOL_tLBRACE_ARG = 106, /* "{ arg" */
2804 YYSYMBOL_tSTAR = 107, /* "*" */
2805 YYSYMBOL_tDSTAR = 108, /* "**arg" */
2806 YYSYMBOL_tAMPER = 109, /* "&" */
2807 YYSYMBOL_tLAMBDA = 110, /* "->" */
2808 YYSYMBOL_tSYMBEG = 111, /* "symbol literal" */
2809 YYSYMBOL_tSTRING_BEG = 112, /* "string literal" */
2810 YYSYMBOL_tXSTRING_BEG = 113, /* "backtick literal" */
2811 YYSYMBOL_tREGEXP_BEG = 114, /* "regexp literal" */
2812 YYSYMBOL_tWORDS_BEG = 115, /* "word list" */
2813 YYSYMBOL_tQWORDS_BEG = 116, /* "verbatim word list" */
2814 YYSYMBOL_tSYMBOLS_BEG = 117, /* "symbol list" */
2815 YYSYMBOL_tQSYMBOLS_BEG = 118, /* "verbatim symbol list" */
2816 YYSYMBOL_tSTRING_END = 119, /* "terminator" */
2817 YYSYMBOL_tSTRING_DEND = 120, /* "'}'" */
2818 YYSYMBOL_tSTRING_DBEG = 121, /* "'#{'" */
2819 YYSYMBOL_tSTRING_DVAR = 122, /* tSTRING_DVAR */
2820 YYSYMBOL_tLAMBEG = 123, /* tLAMBEG */
2821 YYSYMBOL_tLABEL_END = 124, /* tLABEL_END */
2822 YYSYMBOL_tIGNORED_NL = 125, /* tIGNORED_NL */
2823 YYSYMBOL_tCOMMENT = 126, /* tCOMMENT */
2824 YYSYMBOL_tEMBDOC_BEG = 127, /* tEMBDOC_BEG */
2825 YYSYMBOL_tEMBDOC = 128, /* tEMBDOC */
2826 YYSYMBOL_tEMBDOC_END = 129, /* tEMBDOC_END */
2827 YYSYMBOL_tHEREDOC_BEG = 130, /* tHEREDOC_BEG */
2828 YYSYMBOL_tHEREDOC_END = 131, /* tHEREDOC_END */
2829 YYSYMBOL_k__END__ = 132, /* k__END__ */
2830 YYSYMBOL_tLOWEST = 133, /* tLOWEST */
2831 YYSYMBOL_134_ = 134, /* '=' */
2832 YYSYMBOL_135_ = 135, /* '?' */
2833 YYSYMBOL_136_ = 136, /* ':' */
2834 YYSYMBOL_137_ = 137, /* '>' */
2835 YYSYMBOL_138_ = 138, /* '<' */
2836 YYSYMBOL_139_ = 139, /* '|' */
2837 YYSYMBOL_140_ = 140, /* '^' */
2838 YYSYMBOL_141_ = 141, /* '&' */
2839 YYSYMBOL_142_ = 142, /* '+' */
2840 YYSYMBOL_143_ = 143, /* '-' */
2841 YYSYMBOL_144_ = 144, /* '*' */
2842 YYSYMBOL_145_ = 145, /* '/' */
2843 YYSYMBOL_146_ = 146, /* '%' */
2844 YYSYMBOL_tUMINUS_NUM = 147, /* tUMINUS_NUM */
2845 YYSYMBOL_148_ = 148, /* '!' */
2846 YYSYMBOL_149_ = 149, /* '~' */
2847 YYSYMBOL_tLAST_TOKEN = 150, /* tLAST_TOKEN */
2848 YYSYMBOL_151_ = 151, /* '{' */
2849 YYSYMBOL_152_ = 152, /* '}' */
2850 YYSYMBOL_153_ = 153, /* '[' */
2851 YYSYMBOL_154_n_ = 154, /* '\n' */
2852 YYSYMBOL_155_ = 155, /* ',' */
2853 YYSYMBOL_156_ = 156, /* '`' */
2854 YYSYMBOL_157_ = 157, /* '(' */
2855 YYSYMBOL_158_ = 158, /* ')' */
2856 YYSYMBOL_159_ = 159, /* ']' */
2857 YYSYMBOL_160_ = 160, /* ';' */
2858 YYSYMBOL_161_ = 161, /* ' ' */
2859 YYSYMBOL_YYACCEPT = 162, /* $accept */
2860 YYSYMBOL_option_terms = 163, /* option_terms */
2861 YYSYMBOL_compstmt_top_stmts = 164, /* compstmt_top_stmts */
2862 YYSYMBOL_165_1 = 165, /* $@1 */
2863 YYSYMBOL_program = 166, /* program */
2864 YYSYMBOL_top_stmts = 167, /* top_stmts */
2865 YYSYMBOL_top_stmt = 168, /* top_stmt */
2866 YYSYMBOL_block_open = 169, /* block_open */
2867 YYSYMBOL_begin_block = 170, /* begin_block */
2868 YYSYMBOL_compstmt_stmts = 171, /* compstmt_stmts */
2869 YYSYMBOL_172_2 = 172, /* $@2 */
2870 YYSYMBOL_173_3 = 173, /* $@3 */
2871 YYSYMBOL_bodystmt = 174, /* bodystmt */
2872 YYSYMBOL_175_4 = 175, /* $@4 */
2873 YYSYMBOL_stmts = 176, /* stmts */
2874 YYSYMBOL_stmt_or_begin = 177, /* stmt_or_begin */
2875 YYSYMBOL_178_5 = 178, /* $@5 */
2876 YYSYMBOL_allow_exits = 179, /* allow_exits */
2877 YYSYMBOL_k_END = 180, /* k_END */
2878 YYSYMBOL_181_6 = 181, /* $@6 */
2879 YYSYMBOL_stmt = 182, /* stmt */
2880 YYSYMBOL_asgn_mrhs = 183, /* asgn_mrhs */
2881 YYSYMBOL_asgn_command_rhs = 184, /* asgn_command_rhs */
2882 YYSYMBOL_command_asgn = 185, /* command_asgn */
2883 YYSYMBOL_op_asgn_command_rhs = 186, /* op_asgn_command_rhs */
2884 YYSYMBOL_def_endless_method_endless_command = 187, /* def_endless_method_endless_command */
2885 YYSYMBOL_endless_command = 188, /* endless_command */
2886 YYSYMBOL_option__n_ = 189, /* option_'\n' */
2887 YYSYMBOL_command_rhs = 190, /* command_rhs */
2888 YYSYMBOL_expr = 191, /* expr */
2889 YYSYMBOL_192_7 = 192, /* $@7 */
2890 YYSYMBOL_193_8 = 193, /* $@8 */
2891 YYSYMBOL_def_name = 194, /* def_name */
2892 YYSYMBOL_defn_head = 195, /* defn_head */
2893 YYSYMBOL_196_9 = 196, /* $@9 */
2894 YYSYMBOL_defs_head = 197, /* defs_head */
2895 YYSYMBOL_value_expr_expr = 198, /* value_expr_expr */
2896 YYSYMBOL_expr_value = 199, /* expr_value */
2897 YYSYMBOL_200_10 = 200, /* $@10 */
2898 YYSYMBOL_201_11 = 201, /* $@11 */
2899 YYSYMBOL_expr_value_do = 202, /* expr_value_do */
2900 YYSYMBOL_command_call = 203, /* command_call */
2901 YYSYMBOL_value_expr_command_call = 204, /* value_expr_command_call */
2902 YYSYMBOL_command_call_value = 205, /* command_call_value */
2903 YYSYMBOL_block_command = 206, /* block_command */
2904 YYSYMBOL_cmd_brace_block = 207, /* cmd_brace_block */
2905 YYSYMBOL_fcall = 208, /* fcall */
2906 YYSYMBOL_command = 209, /* command */
2907 YYSYMBOL_mlhs = 210, /* mlhs */
2908 YYSYMBOL_mlhs_inner = 211, /* mlhs_inner */
2909 YYSYMBOL_mlhs_basic = 212, /* mlhs_basic */
2910 YYSYMBOL_mlhs_items_mlhs_item = 213, /* mlhs_items_mlhs_item */
2911 YYSYMBOL_mlhs_item = 214, /* mlhs_item */
2912 YYSYMBOL_mlhs_head = 215, /* mlhs_head */
2913 YYSYMBOL_mlhs_node = 216, /* mlhs_node */
2914 YYSYMBOL_lhs = 217, /* lhs */
2915 YYSYMBOL_cname = 218, /* cname */
2916 YYSYMBOL_cpath = 219, /* cpath */
2917 YYSYMBOL_fname = 220, /* fname */
2918 YYSYMBOL_fitem = 221, /* fitem */
2919 YYSYMBOL_undef_list = 222, /* undef_list */
2920 YYSYMBOL_223_12 = 223, /* $@12 */
2921 YYSYMBOL_op = 224, /* op */
2922 YYSYMBOL_reswords = 225, /* reswords */
2923 YYSYMBOL_asgn_arg_rhs = 226, /* asgn_arg_rhs */
2924 YYSYMBOL_arg = 227, /* arg */
2925 YYSYMBOL_op_asgn_arg_rhs = 228, /* op_asgn_arg_rhs */
2926 YYSYMBOL_range_expr_arg = 229, /* range_expr_arg */
2927 YYSYMBOL_def_endless_method_endless_arg = 230, /* def_endless_method_endless_arg */
2928 YYSYMBOL_ternary = 231, /* ternary */
2929 YYSYMBOL_endless_arg = 232, /* endless_arg */
2930 YYSYMBOL_relop = 233, /* relop */
2931 YYSYMBOL_rel_expr = 234, /* rel_expr */
2932 YYSYMBOL_lex_ctxt = 235, /* lex_ctxt */
2933 YYSYMBOL_begin_defined = 236, /* begin_defined */
2934 YYSYMBOL_after_rescue = 237, /* after_rescue */
2935 YYSYMBOL_value_expr_arg = 238, /* value_expr_arg */
2936 YYSYMBOL_arg_value = 239, /* arg_value */
2937 YYSYMBOL_aref_args = 240, /* aref_args */
2938 YYSYMBOL_arg_rhs = 241, /* arg_rhs */
2939 YYSYMBOL_paren_args = 242, /* paren_args */
2940 YYSYMBOL_opt_paren_args = 243, /* opt_paren_args */
2941 YYSYMBOL_opt_call_args = 244, /* opt_call_args */
2942 YYSYMBOL_value_expr_command = 245, /* value_expr_command */
2943 YYSYMBOL_call_args = 246, /* call_args */
2944 YYSYMBOL_247_13 = 247, /* $@13 */
2945 YYSYMBOL_command_args = 248, /* command_args */
2946 YYSYMBOL_block_arg = 249, /* block_arg */
2947 YYSYMBOL_opt_block_arg = 250, /* opt_block_arg */
2948 YYSYMBOL_args = 251, /* args */
2949 YYSYMBOL_arg_splat = 252, /* arg_splat */
2950 YYSYMBOL_mrhs_arg = 253, /* mrhs_arg */
2951 YYSYMBOL_mrhs = 254, /* mrhs */
2952 YYSYMBOL_primary = 255, /* primary */
2953 YYSYMBOL_256_14 = 256, /* $@14 */
2954 YYSYMBOL_257_15 = 257, /* $@15 */
2955 YYSYMBOL_258_16 = 258, /* @16 */
2956 YYSYMBOL_259_17 = 259, /* @17 */
2957 YYSYMBOL_260_18 = 260, /* $@18 */
2958 YYSYMBOL_261_19 = 261, /* $@19 */
2959 YYSYMBOL_262_20 = 262, /* $@20 */
2960 YYSYMBOL_263_21 = 263, /* $@21 */
2961 YYSYMBOL_264_22 = 264, /* $@22 */
2962 YYSYMBOL_265_23 = 265, /* $@23 */
2963 YYSYMBOL_266_24 = 266, /* $@24 */
2964 YYSYMBOL_value_expr_primary = 267, /* value_expr_primary */
2965 YYSYMBOL_primary_value = 268, /* primary_value */
2966 YYSYMBOL_k_begin = 269, /* k_begin */
2967 YYSYMBOL_k_if = 270, /* k_if */
2968 YYSYMBOL_k_unless = 271, /* k_unless */
2969 YYSYMBOL_k_while = 272, /* k_while */
2970 YYSYMBOL_k_until = 273, /* k_until */
2971 YYSYMBOL_k_case = 274, /* k_case */
2972 YYSYMBOL_k_for = 275, /* k_for */
2973 YYSYMBOL_k_class = 276, /* k_class */
2974 YYSYMBOL_k_module = 277, /* k_module */
2975 YYSYMBOL_k_def = 278, /* k_def */
2976 YYSYMBOL_k_do = 279, /* k_do */
2977 YYSYMBOL_k_do_block = 280, /* k_do_block */
2978 YYSYMBOL_k_rescue = 281, /* k_rescue */
2979 YYSYMBOL_k_ensure = 282, /* k_ensure */
2980 YYSYMBOL_k_when = 283, /* k_when */
2981 YYSYMBOL_k_else = 284, /* k_else */
2982 YYSYMBOL_k_elsif = 285, /* k_elsif */
2983 YYSYMBOL_k_end = 286, /* k_end */
2984 YYSYMBOL_k_return = 287, /* k_return */
2985 YYSYMBOL_k_yield = 288, /* k_yield */
2986 YYSYMBOL_then = 289, /* then */
2987 YYSYMBOL_do = 290, /* do */
2988 YYSYMBOL_if_tail = 291, /* if_tail */
2989 YYSYMBOL_opt_else = 292, /* opt_else */
2990 YYSYMBOL_for_var = 293, /* for_var */
2991 YYSYMBOL_f_marg = 294, /* f_marg */
2992 YYSYMBOL_mlhs_items_f_marg = 295, /* mlhs_items_f_marg */
2993 YYSYMBOL_f_margs = 296, /* f_margs */
2994 YYSYMBOL_f_rest_marg = 297, /* f_rest_marg */
2995 YYSYMBOL_f_any_kwrest = 298, /* f_any_kwrest */
2996 YYSYMBOL_299_25 = 299, /* $@25 */
2997 YYSYMBOL_f_eq = 300, /* f_eq */
2998 YYSYMBOL_f_kw_primary_value = 301, /* f_kw_primary_value */
2999 YYSYMBOL_f_kwarg_primary_value = 302, /* f_kwarg_primary_value */
3000 YYSYMBOL_opt_f_block_arg_none = 303, /* opt_f_block_arg_none */
3001 YYSYMBOL_args_tail_basic_primary_value_none = 304, /* args_tail_basic_primary_value_none */
3002 YYSYMBOL_block_args_tail = 305, /* block_args_tail */
3003 YYSYMBOL_excessed_comma = 306, /* excessed_comma */
3004 YYSYMBOL_f_opt_primary_value = 307, /* f_opt_primary_value */
3005 YYSYMBOL_f_opt_arg_primary_value = 308, /* f_opt_arg_primary_value */
3006 YYSYMBOL_opt_args_tail_block_args_tail_none = 309, /* opt_args_tail_block_args_tail_none */
3007 YYSYMBOL_args_list_primary_value_opt_args_tail_block_args_tail_none = 310, /* args-list_primary_value_opt_args_tail_block_args_tail_none */
3008 YYSYMBOL_block_param = 311, /* block_param */
3009 YYSYMBOL_tail_only_args_block_args_tail = 312, /* tail-only-args_block_args_tail */
3010 YYSYMBOL_opt_block_param_def = 313, /* opt_block_param_def */
3011 YYSYMBOL_block_param_def = 314, /* block_param_def */
3012 YYSYMBOL_opt_block_param = 315, /* opt_block_param */
3013 YYSYMBOL_opt_bv_decl = 316, /* opt_bv_decl */
3014 YYSYMBOL_bv_decls = 317, /* bv_decls */
3015 YYSYMBOL_bvar = 318, /* bvar */
3016 YYSYMBOL_max_numparam = 319, /* max_numparam */
3017 YYSYMBOL_numparam = 320, /* numparam */
3018 YYSYMBOL_it_id = 321, /* it_id */
3019 YYSYMBOL_322_26 = 322, /* @26 */
3020 YYSYMBOL_323_27 = 323, /* $@27 */
3021 YYSYMBOL_lambda = 324, /* lambda */
3022 YYSYMBOL_f_larglist = 325, /* f_larglist */
3023 YYSYMBOL_lambda_body = 326, /* lambda_body */
3024 YYSYMBOL_327_28 = 327, /* $@28 */
3025 YYSYMBOL_do_block = 328, /* do_block */
3026 YYSYMBOL_block_call = 329, /* block_call */
3027 YYSYMBOL_method_call = 330, /* method_call */
3028 YYSYMBOL_brace_block = 331, /* brace_block */
3029 YYSYMBOL_332_29 = 332, /* @29 */
3030 YYSYMBOL_brace_body = 333, /* brace_body */
3031 YYSYMBOL_334_30 = 334, /* @30 */
3032 YYSYMBOL_do_body = 335, /* do_body */
3033 YYSYMBOL_case_args = 336, /* case_args */
3034 YYSYMBOL_case_body = 337, /* case_body */
3035 YYSYMBOL_cases = 338, /* cases */
3036 YYSYMBOL_p_pvtbl = 339, /* p_pvtbl */
3037 YYSYMBOL_p_pktbl = 340, /* p_pktbl */
3038 YYSYMBOL_p_in_kwarg = 341, /* p_in_kwarg */
3039 YYSYMBOL_342_31 = 342, /* $@31 */
3040 YYSYMBOL_p_case_body = 343, /* p_case_body */
3041 YYSYMBOL_p_cases = 344, /* p_cases */
3042 YYSYMBOL_p_top_expr = 345, /* p_top_expr */
3043 YYSYMBOL_p_top_expr_body = 346, /* p_top_expr_body */
3044 YYSYMBOL_p_expr = 347, /* p_expr */
3045 YYSYMBOL_p_as = 348, /* p_as */
3046 YYSYMBOL_349_32 = 349, /* $@32 */
3047 YYSYMBOL_p_alt = 350, /* p_alt */
3048 YYSYMBOL_p_lparen = 351, /* p_lparen */
3049 YYSYMBOL_p_lbracket = 352, /* p_lbracket */
3050 YYSYMBOL_p_expr_basic = 353, /* p_expr_basic */
3051 YYSYMBOL_354_33 = 354, /* $@33 */
3052 YYSYMBOL_p_args = 355, /* p_args */
3053 YYSYMBOL_p_args_head = 356, /* p_args_head */
3054 YYSYMBOL_p_args_tail = 357, /* p_args_tail */
3055 YYSYMBOL_p_find = 358, /* p_find */
3056 YYSYMBOL_p_rest = 359, /* p_rest */
3057 YYSYMBOL_p_args_post = 360, /* p_args_post */
3058 YYSYMBOL_p_arg = 361, /* p_arg */
3059 YYSYMBOL_p_kwargs = 362, /* p_kwargs */
3060 YYSYMBOL_p_kwarg = 363, /* p_kwarg */
3061 YYSYMBOL_p_kw = 364, /* p_kw */
3062 YYSYMBOL_p_kw_label = 365, /* p_kw_label */
3063 YYSYMBOL_p_kwrest = 366, /* p_kwrest */
3064 YYSYMBOL_p_kwnorest = 367, /* p_kwnorest */
3065 YYSYMBOL_p_any_kwrest = 368, /* p_any_kwrest */
3066 YYSYMBOL_p_value = 369, /* p_value */
3067 YYSYMBOL_range_expr_p_primitive = 370, /* range_expr_p_primitive */
3068 YYSYMBOL_p_primitive = 371, /* p_primitive */
3069 YYSYMBOL_p_variable = 372, /* p_variable */
3070 YYSYMBOL_p_var_ref = 373, /* p_var_ref */
3071 YYSYMBOL_p_expr_ref = 374, /* p_expr_ref */
3072 YYSYMBOL_p_const = 375, /* p_const */
3073 YYSYMBOL_opt_rescue = 376, /* opt_rescue */
3074 YYSYMBOL_exc_list = 377, /* exc_list */
3075 YYSYMBOL_exc_var = 378, /* exc_var */
3076 YYSYMBOL_opt_ensure = 379, /* opt_ensure */
3077 YYSYMBOL_literal = 380, /* literal */
3078 YYSYMBOL_strings = 381, /* strings */
3079 YYSYMBOL_string = 382, /* string */
3080 YYSYMBOL_string1 = 383, /* string1 */
3081 YYSYMBOL_xstring = 384, /* xstring */
3082 YYSYMBOL_regexp = 385, /* regexp */
3083 YYSYMBOL_nonempty_list__ = 386, /* nonempty_list_' ' */
3084 YYSYMBOL_words_tWORDS_BEG_word_list = 387, /* words_tWORDS_BEG_word_list */
3085 YYSYMBOL_words = 388, /* words */
3086 YYSYMBOL_word_list = 389, /* word_list */
3087 YYSYMBOL_word = 390, /* word */
3088 YYSYMBOL_words_tSYMBOLS_BEG_symbol_list = 391, /* words_tSYMBOLS_BEG_symbol_list */
3089 YYSYMBOL_symbols = 392, /* symbols */
3090 YYSYMBOL_symbol_list = 393, /* symbol_list */
3091 YYSYMBOL_words_tQWORDS_BEG_qword_list = 394, /* words_tQWORDS_BEG_qword_list */
3092 YYSYMBOL_qwords = 395, /* qwords */
3093 YYSYMBOL_words_tQSYMBOLS_BEG_qsym_list = 396, /* words_tQSYMBOLS_BEG_qsym_list */
3094 YYSYMBOL_qsymbols = 397, /* qsymbols */
3095 YYSYMBOL_qword_list = 398, /* qword_list */
3096 YYSYMBOL_qsym_list = 399, /* qsym_list */
3097 YYSYMBOL_string_contents = 400, /* string_contents */
3098 YYSYMBOL_xstring_contents = 401, /* xstring_contents */
3099 YYSYMBOL_regexp_contents = 402, /* regexp_contents */
3100 YYSYMBOL_string_content = 403, /* string_content */
3101 YYSYMBOL_404_34 = 404, /* @34 */
3102 YYSYMBOL_405_35 = 405, /* @35 */
3103 YYSYMBOL_406_36 = 406, /* @36 */
3104 YYSYMBOL_407_37 = 407, /* @37 */
3105 YYSYMBOL_408_38 = 408, /* @38 */
3106 YYSYMBOL_string_dend = 409, /* string_dend */
3107 YYSYMBOL_string_dvar = 410, /* string_dvar */
3108 YYSYMBOL_symbol = 411, /* symbol */
3109 YYSYMBOL_ssym = 412, /* ssym */
3110 YYSYMBOL_sym = 413, /* sym */
3111 YYSYMBOL_dsym = 414, /* dsym */
3112 YYSYMBOL_numeric = 415, /* numeric */
3113 YYSYMBOL_simple_numeric = 416, /* simple_numeric */
3114 YYSYMBOL_nonlocal_var = 417, /* nonlocal_var */
3115 YYSYMBOL_user_variable = 418, /* user_variable */
3116 YYSYMBOL_keyword_variable = 419, /* keyword_variable */
3117 YYSYMBOL_var_ref = 420, /* var_ref */
3118 YYSYMBOL_var_lhs = 421, /* var_lhs */
3119 YYSYMBOL_backref = 422, /* backref */
3120 YYSYMBOL_423_39 = 423, /* $@39 */
3121 YYSYMBOL_superclass = 424, /* superclass */
3122 YYSYMBOL_f_opt_paren_args = 425, /* f_opt_paren_args */
3123 YYSYMBOL_f_empty_arg = 426, /* f_empty_arg */
3124 YYSYMBOL_f_paren_args = 427, /* f_paren_args */
3125 YYSYMBOL_f_arglist = 428, /* f_arglist */
3126 YYSYMBOL_429_40 = 429, /* @40 */
3127 YYSYMBOL_f_kw_arg_value = 430, /* f_kw_arg_value */
3128 YYSYMBOL_f_kwarg_arg_value = 431, /* f_kwarg_arg_value */
3129 YYSYMBOL_opt_f_block_arg_opt_comma = 432, /* opt_f_block_arg_opt_comma */
3130 YYSYMBOL_args_tail_basic_arg_value_opt_comma = 433, /* args_tail_basic_arg_value_opt_comma */
3131 YYSYMBOL_args_tail = 434, /* args_tail */
3132 YYSYMBOL_args_tail_basic_arg_value_none = 435, /* args_tail_basic_arg_value_none */
3133 YYSYMBOL_largs_tail = 436, /* largs_tail */
3134 YYSYMBOL_f_opt_arg_value = 437, /* f_opt_arg_value */
3135 YYSYMBOL_f_opt_arg_arg_value = 438, /* f_opt_arg_arg_value */
3136 YYSYMBOL_opt_args_tail_args_tail_opt_comma = 439, /* opt_args_tail_args_tail_opt_comma */
3137 YYSYMBOL_args_list_arg_value_opt_args_tail_args_tail_opt_comma = 440, /* args-list_arg_value_opt_args_tail_args_tail_opt_comma */
3138 YYSYMBOL_f_args_list_args_tail_opt_comma = 441, /* f_args-list_args_tail_opt_comma */
3139 YYSYMBOL_tail_only_args_args_tail = 442, /* tail-only-args_args_tail */
3140 YYSYMBOL_f_args = 443, /* f_args */
3141 YYSYMBOL_opt_args_tail_largs_tail_none = 444, /* opt_args_tail_largs_tail_none */
3142 YYSYMBOL_args_list_arg_value_opt_args_tail_largs_tail_none = 445, /* args-list_arg_value_opt_args_tail_largs_tail_none */
3143 YYSYMBOL_f_args_list_largs_tail_none = 446, /* f_args-list_largs_tail_none */
3144 YYSYMBOL_tail_only_args_largs_tail = 447, /* tail-only-args_largs_tail */
3145 YYSYMBOL_f_largs = 448, /* f_largs */
3146 YYSYMBOL_args_forward = 449, /* args_forward */
3147 YYSYMBOL_f_bad_arg = 450, /* f_bad_arg */
3148 YYSYMBOL_f_norm_arg = 451, /* f_norm_arg */
3149 YYSYMBOL_f_arg_asgn = 452, /* f_arg_asgn */
3150 YYSYMBOL_f_arg_item = 453, /* f_arg_item */
3151 YYSYMBOL_f_arg = 454, /* f_arg */
3152 YYSYMBOL_f_label = 455, /* f_label */
3153 YYSYMBOL_kwrest_mark = 456, /* kwrest_mark */
3154 YYSYMBOL_f_no_kwarg = 457, /* f_no_kwarg */
3155 YYSYMBOL_f_kwrest = 458, /* f_kwrest */
3156 YYSYMBOL_restarg_mark = 459, /* restarg_mark */
3157 YYSYMBOL_f_rest_arg = 460, /* f_rest_arg */
3158 YYSYMBOL_blkarg_mark = 461, /* blkarg_mark */
3159 YYSYMBOL_f_block_arg = 462, /* f_block_arg */
3160 YYSYMBOL_option__ = 463, /* option_',' */
3161 YYSYMBOL_opt_comma = 464, /* opt_comma */
3162 YYSYMBOL_value_expr_singleton_expr = 465, /* value_expr_singleton_expr */
3163 YYSYMBOL_singleton = 466, /* singleton */
3164 YYSYMBOL_singleton_expr = 467, /* singleton_expr */
3165 YYSYMBOL_468_41 = 468, /* $@41 */
3166 YYSYMBOL_assoc_list = 469, /* assoc_list */
3167 YYSYMBOL_assocs = 470, /* assocs */
3168 YYSYMBOL_assoc = 471, /* assoc */
3169 YYSYMBOL_operation2 = 472, /* operation2 */
3170 YYSYMBOL_operation3 = 473, /* operation3 */
3171 YYSYMBOL_dot_or_colon = 474, /* dot_or_colon */
3172 YYSYMBOL_call_op = 475, /* call_op */
3173 YYSYMBOL_call_op2 = 476, /* call_op2 */
3174 YYSYMBOL_rparen = 477, /* rparen */
3175 YYSYMBOL_rbracket = 478, /* rbracket */
3176 YYSYMBOL_rbrace = 479, /* rbrace */
3177 YYSYMBOL_trailer = 480, /* trailer */
3178 YYSYMBOL_term = 481, /* term */
3179 YYSYMBOL_terms = 482, /* terms */
3180 YYSYMBOL_none = 483 /* none */
3181};
3182typedef enum yysymbol_kind_t yysymbol_kind_t;
3183
3184
3185
3186
3187#ifdef short
3188# undef short
3189#endif
3190
3191/* On compilers that do not define __PTRDIFF_MAX__ etc., make sure
3192 <limits.h> and (if available) <stdint.h> are included
3193 so that the code can choose integer types of a good width. */
3194
3195#ifndef __PTRDIFF_MAX__
3196# include <limits.h> /* INFRINGES ON USER NAME SPACE */
3197# if defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__
3198# include <stdint.h> /* INFRINGES ON USER NAME SPACE */
3199# define YY_STDINT_H
3200# endif
3201#endif
3202
3203/* Narrow types that promote to a signed type and that can represent a
3204 signed or unsigned integer of at least N bits. In tables they can
3205 save space and decrease cache pressure. Promoting to a signed type
3206 helps avoid bugs in integer arithmetic. */
3207
3208#ifdef __INT_LEAST8_MAX__
3209typedef __INT_LEAST8_TYPE__ yytype_int8;
3210#elif defined YY_STDINT_H
3211typedef int_least8_t yytype_int8;
3212#else
3213typedef signed char yytype_int8;
3214#endif
3215
3216#ifdef __INT_LEAST16_MAX__
3217typedef __INT_LEAST16_TYPE__ yytype_int16;
3218#elif defined YY_STDINT_H
3219typedef int_least16_t yytype_int16;
3220#else
3221typedef short yytype_int16;
3222#endif
3223
3224/* Work around bug in HP-UX 11.23, which defines these macros
3225 incorrectly for preprocessor constants. This workaround can likely
3226 be removed in 2023, as HPE has promised support for HP-UX 11.23
3227 (aka HP-UX 11i v2) only through the end of 2022; see Table 2 of
3228 <https://h20195.www2.hpe.com/V2/getpdf.aspx/4AA4-7673ENW.pdf>. */
3229#ifdef __hpux
3230# undef UINT_LEAST8_MAX
3231# undef UINT_LEAST16_MAX
3232# define UINT_LEAST8_MAX 255
3233# define UINT_LEAST16_MAX 65535
3234#endif
3235
3236#if defined __UINT_LEAST8_MAX__ && __UINT_LEAST8_MAX__ <= __INT_MAX__
3237typedef __UINT_LEAST8_TYPE__ yytype_uint8;
3238#elif (!defined __UINT_LEAST8_MAX__ && defined YY_STDINT_H \
3239 && UINT_LEAST8_MAX <= INT_MAX)
3240typedef uint_least8_t yytype_uint8;
3241#elif !defined __UINT_LEAST8_MAX__ && UCHAR_MAX <= INT_MAX
3242typedef unsigned char yytype_uint8;
3243#else
3244typedef short yytype_uint8;
3245#endif
3246
3247#if defined __UINT_LEAST16_MAX__ && __UINT_LEAST16_MAX__ <= __INT_MAX__
3248typedef __UINT_LEAST16_TYPE__ yytype_uint16;
3249#elif (!defined __UINT_LEAST16_MAX__ && defined YY_STDINT_H \
3250 && UINT_LEAST16_MAX <= INT_MAX)
3251typedef uint_least16_t yytype_uint16;
3252#elif !defined __UINT_LEAST16_MAX__ && USHRT_MAX <= INT_MAX
3253typedef unsigned short yytype_uint16;
3254#else
3255typedef int yytype_uint16;
3256#endif
3257
3258#ifndef YYPTRDIFF_T
3259# if defined __PTRDIFF_TYPE__ && defined __PTRDIFF_MAX__
3260# define YYPTRDIFF_T __PTRDIFF_TYPE__
3261# define YYPTRDIFF_MAXIMUM __PTRDIFF_MAX__
3262# elif defined PTRDIFF_MAX
3263# ifndef ptrdiff_t
3264# include <stddef.h> /* INFRINGES ON USER NAME SPACE */
3265# endif
3266# define YYPTRDIFF_T ptrdiff_t
3267# define YYPTRDIFF_MAXIMUM PTRDIFF_MAX
3268# else
3269# define YYPTRDIFF_T long
3270# define YYPTRDIFF_MAXIMUM LONG_MAX
3271# endif
3272#endif
3273
3274#ifndef YYSIZE_T
3275# ifdef __SIZE_TYPE__
3276# define YYSIZE_T __SIZE_TYPE__
3277# elif defined size_t
3278# define YYSIZE_T size_t
3279# elif defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__
3280# include <stddef.h> /* INFRINGES ON USER NAME SPACE */
3281# define YYSIZE_T size_t
3282# else
3283# define YYSIZE_T unsigned
3284# endif
3285#endif
3286
3287#define YYSIZE_MAXIMUM \
3288 YY_CAST (YYPTRDIFF_T, \
3289 (YYPTRDIFF_MAXIMUM < YY_CAST (YYSIZE_T, -1) \
3290 ? YYPTRDIFF_MAXIMUM \
3291 : YY_CAST (YYSIZE_T, -1)))
3292
3293#define YYSIZEOF(X) YY_CAST (YYPTRDIFF_T, sizeof (X))
3294
3295
3296/* Stored state numbers (used for stacks). */
3297typedef yytype_int16 yy_state_t;
3298
3299/* State numbers in computations. */
3300typedef int yy_state_fast_t;
3301
3302#ifndef YY_
3303# if defined YYENABLE_NLS && YYENABLE_NLS
3304# if ENABLE_NLS
3305# include <libintl.h> /* INFRINGES ON USER NAME SPACE */
3306# define YY_(Msgid) dgettext ("bison-runtime", Msgid)
3307# endif
3308# endif
3309# ifndef YY_
3310# define YY_(Msgid) Msgid
3311# endif
3312#endif
3313
3314
3315#ifndef YY_ATTRIBUTE_PURE
3316# if defined __GNUC__ && 2 < __GNUC__ + (96 <= __GNUC_MINOR__)
3317# define YY_ATTRIBUTE_PURE __attribute__ ((__pure__))
3318# else
3319# define YY_ATTRIBUTE_PURE
3320# endif
3321#endif
3322
3323#ifndef YY_ATTRIBUTE_UNUSED
3324# if defined __GNUC__ && 2 < __GNUC__ + (7 <= __GNUC_MINOR__)
3325# define YY_ATTRIBUTE_UNUSED __attribute__ ((__unused__))
3326# else
3327# define YY_ATTRIBUTE_UNUSED
3328# endif
3329#endif
3330
3331/* Suppress unused-variable warnings by "using" E. */
3332#if ! defined lint || defined __GNUC__
3333# define YY_USE(E) ((void) (E))
3334#else
3335# define YY_USE(E) /* empty */
3336#endif
3337
3338/* Suppress an incorrect diagnostic about yylval being uninitialized. */
3339#if defined __GNUC__ && ! defined __ICC && 406 <= __GNUC__ * 100 + __GNUC_MINOR__
3340# if __GNUC__ * 100 + __GNUC_MINOR__ < 407
3341# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \
3342 _Pragma ("GCC diagnostic push") \
3343 _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")
3344# else
3345# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \
3346 _Pragma ("GCC diagnostic push") \
3347 _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"") \
3348 _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
3349# endif
3350# define YY_IGNORE_MAYBE_UNINITIALIZED_END \
3351 _Pragma ("GCC diagnostic pop")
3352#else
3353# define YY_INITIAL_VALUE(Value) Value
3354#endif
3355#ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
3356# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
3357# define YY_IGNORE_MAYBE_UNINITIALIZED_END
3358#endif
3359#ifndef YY_INITIAL_VALUE
3360# define YY_INITIAL_VALUE(Value) /* Nothing. */
3361#endif
3362
3363#if defined __cplusplus && defined __GNUC__ && ! defined __ICC && 6 <= __GNUC__
3364# define YY_IGNORE_USELESS_CAST_BEGIN \
3365 _Pragma ("GCC diagnostic push") \
3366 _Pragma ("GCC diagnostic ignored \"-Wuseless-cast\"")
3367# define YY_IGNORE_USELESS_CAST_END \
3368 _Pragma ("GCC diagnostic pop")
3369#endif
3370#ifndef YY_IGNORE_USELESS_CAST_BEGIN
3371# define YY_IGNORE_USELESS_CAST_BEGIN
3372# define YY_IGNORE_USELESS_CAST_END
3373#endif
3374
3375
3376#define YY_ASSERT(E) ((void) (0 && (E)))
3377
3378#if 1
3379
3380/* The parser invokes alloca or malloc; define the necessary symbols. */
3381
3382# ifdef YYSTACK_USE_ALLOCA
3383# if YYSTACK_USE_ALLOCA
3384# ifdef __GNUC__
3385# define YYSTACK_ALLOC __builtin_alloca
3386# elif defined __BUILTIN_VA_ARG_INCR
3387# include <alloca.h> /* INFRINGES ON USER NAME SPACE */
3388# elif defined _AIX
3389# define YYSTACK_ALLOC __alloca
3390# elif defined _MSC_VER
3391# include <malloc.h> /* INFRINGES ON USER NAME SPACE */
3392# define alloca _alloca
3393# else
3394# define YYSTACK_ALLOC alloca
3395# if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS
3396# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
3397 /* Use EXIT_SUCCESS as a witness for stdlib.h. */
3398# ifndef EXIT_SUCCESS
3399# define EXIT_SUCCESS 0
3400# endif
3401# endif
3402# endif
3403# endif
3404# endif
3405
3406# ifdef YYSTACK_ALLOC
3407 /* Pacify GCC's 'empty if-body' warning. */
3408# define YYSTACK_FREE(Ptr) do { /* empty */; } while (0)
3409# ifndef YYSTACK_ALLOC_MAXIMUM
3410 /* The OS might guarantee only one guard page at the bottom of the stack,
3411 and a page size can be as small as 4096 bytes. So we cannot safely
3412 invoke alloca (N) if N exceeds 4096. Use a slightly smaller number
3413 to allow for a few compiler-allocated temporary stack slots. */
3414# define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
3415# endif
3416# else
3417# define YYSTACK_ALLOC YYMALLOC
3418# define YYSTACK_FREE YYFREE
3419# ifndef YYSTACK_ALLOC_MAXIMUM
3420# define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
3421# endif
3422# if (defined __cplusplus && ! defined EXIT_SUCCESS \
3423 && ! ((defined YYMALLOC || defined malloc) \
3424 && (defined YYFREE || defined free)))
3425# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
3426# ifndef EXIT_SUCCESS
3427# define EXIT_SUCCESS 0
3428# endif
3429# endif
3430# ifndef YYMALLOC
3431# define YYMALLOC malloc
3432# if ! defined malloc && ! defined EXIT_SUCCESS
3433void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
3434# endif
3435# endif
3436# ifndef YYFREE
3437# define YYFREE free
3438# if ! defined free && ! defined EXIT_SUCCESS
3439void free (void *); /* INFRINGES ON USER NAME SPACE */
3440# endif
3441# endif
3442# endif
3443#endif /* 1 */
3444
3445#if (! defined yyoverflow \
3446 && (! defined __cplusplus \
3447 || (defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL \
3448 && defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
3449
3450/* A type that is properly aligned for any stack member. */
3451union yyalloc
3452{
3453 yy_state_t yyss_alloc;
3454 YYSTYPE yyvs_alloc;
3455 YYLTYPE yyls_alloc;
3456};
3457
3458/* The size of the maximum gap between one aligned stack and the next. */
3459# define YYSTACK_GAP_MAXIMUM (YYSIZEOF (union yyalloc) - 1)
3460
3461/* The size of an array large to enough to hold all stacks, each with
3462 N elements. */
3463# define YYSTACK_BYTES(N) \
3464 ((N) * (YYSIZEOF (yy_state_t) + YYSIZEOF (YYSTYPE) \
3465 + YYSIZEOF (YYLTYPE)) \
3466 + 2 * YYSTACK_GAP_MAXIMUM)
3467
3468# define YYCOPY_NEEDED 1
3469
3470/* Relocate STACK from its old location to the new one. The
3471 local variables YYSIZE and YYSTACKSIZE give the old and new number of
3472 elements in the stack, and YYPTR gives the new location of the
3473 stack. Advance YYPTR to a properly aligned location for the next
3474 stack. */
3475# define YYSTACK_RELOCATE(Stack_alloc, Stack) \
3476 do \
3477 { \
3478 YYPTRDIFF_T yynewbytes; \
3479 YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
3480 Stack = &yyptr->Stack_alloc; \
3481 yynewbytes = yystacksize * YYSIZEOF (*Stack) + YYSTACK_GAP_MAXIMUM; \
3482 yyptr += yynewbytes / YYSIZEOF (*yyptr); \
3483 } \
3484 while (0)
3485
3486#endif
3487
3488#if defined YYCOPY_NEEDED && YYCOPY_NEEDED
3489/* Copy COUNT objects from SRC to DST. The source and destination do
3490 not overlap. */
3491# ifndef YYCOPY
3492# if defined __GNUC__ && 1 < __GNUC__
3493# define YYCOPY(Dst, Src, Count) \
3494 __builtin_memcpy (Dst, Src, YY_CAST (YYSIZE_T, (Count)) * sizeof (*(Src)))
3495# else
3496# define YYCOPY(Dst, Src, Count) \
3497 do \
3498 { \
3499 YYPTRDIFF_T yyi; \
3500 for (yyi = 0; yyi < (Count); yyi++) \
3501 (Dst)[yyi] = (Src)[yyi]; \
3502 } \
3503 while (0)
3504# endif
3505# endif
3506#endif /* !YYCOPY_NEEDED */
3507
3508/* YYFINAL -- State number of the termination state. */
3509#define YYFINAL 143
3510/* YYLAST -- Last index in YYTABLE. */
3511#define YYLAST 16524
3512
3513/* YYNTOKENS -- Number of terminals. */
3514#define YYNTOKENS 162
3515/* YYNNTS -- Number of nonterminals. */
3516#define YYNNTS 322
3517/* YYNRULES -- Number of rules. */
3518#define YYNRULES 854
3519/* YYNSTATES -- Number of states. */
3520#define YYNSTATES 1442
3521
3522/* YYMAXUTOK -- Last valid token kind. */
3523#define YYMAXUTOK 361
3524
3525
3526/* YYTRANSLATE(TOKEN-NUM) -- Symbol number corresponding to TOKEN-NUM
3527 as returned by yylex, with out-of-bounds checking. */
3528#define YYTRANSLATE(YYX) \
3529 (0 <= (YYX) && (YYX) <= YYMAXUTOK \
3530 ? YY_CAST (yysymbol_kind_t, yytranslate[YYX]) \
3531 : YYSYMBOL_YYUNDEF)
3532
3533/* YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM
3534 as returned by yylex. */
3535static const yytype_uint8 yytranslate[] =
3536{
3537 0, 2, 2, 2, 2, 2, 2, 2, 2, 72,
3538 154, 75, 73, 74, 2, 2, 2, 2, 2, 2,
3539 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
3540 2, 2, 161, 148, 2, 2, 2, 146, 141, 2,
3541 157, 158, 144, 142, 155, 143, 69, 145, 2, 2,
3542 2, 2, 2, 2, 2, 2, 2, 2, 136, 160,
3543 138, 134, 137, 135, 2, 2, 2, 2, 2, 2,
3544 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
3545 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
3546 2, 153, 70, 159, 140, 2, 156, 2, 2, 2,
3547 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
3548 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
3549 2, 2, 2, 151, 139, 152, 149, 2, 89, 90,
3550 91, 92, 76, 77, 78, 79, 95, 96, 84, 83,
3551 80, 81, 82, 87, 88, 93, 94, 98, 85, 86,
3552 97, 2, 2, 2, 2, 2, 2, 2, 2, 2,
3553 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
3554 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
3555 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
3556 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
3557 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
3558 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
3559 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
3560 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
3561 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
3562 2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
3563 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
3564 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
3565 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
3566 35, 36, 37, 38, 39, 40, 41, 42, 43, 44,
3567 45, 46, 47, 48, 49, 50, 51, 52, 53, 54,
3568 55, 56, 57, 58, 59, 60, 61, 62, 63, 64,
3569 65, 66, 67, 68, 71, 99, 100, 101, 102, 103,
3570 104, 105, 106, 107, 108, 109, 110, 111, 112, 113,
3571 114, 115, 116, 117, 118, 119, 120, 121, 122, 123,
3572 124, 125, 126, 127, 128, 129, 130, 131, 132, 133,
3573 147, 150
3574};
3575
3576#if YYDEBUG
3577/* YYRLINE[YYN] -- Source line where rule number YYN was defined. */
3578static const yytype_int16 yyrline[] =
3579{
3580 0, 3174, 3168, 3174, 3174, 3174, 3174, 3194, 3199, 3204,
3581 3211, 3216, 3223, 3225, 3243, 3239, 3244, 3243, 3255, 3252,
3582 3265, 3270, 3275, 3282, 3284, 3283, 3293, 3295, 3305, 3305,
3583 3310, 3315, 3323, 3332, 3339, 3345, 3351, 3362, 3373, 3382,
3584 3394, 3395, 3400, 3400, 3401, 3412, 3417, 3418, 3425, 3425,
3585 3426, 3426, 3426, 3426, 3426, 3426, 3426, 3426, 3426, 3427,
3586 3427, 3427, 3430, 3431, 3437, 3437, 3437, 3444, 3445, 3452,
3587 3455, 3456, 3461, 3466, 3471, 3477, 3476, 3492, 3491, 3506,
3588 3509, 3520, 3530, 3529, 3543, 3543, 3544, 3550, 3550, 3550,
3589 3557, 3558, 3561, 3561, 3564, 3565, 3572, 3580, 3580, 3580,
3590 3587, 3594, 3603, 3608, 3613, 3618, 3623, 3629, 3635, 3641,
3591 3646, 3653, 3662, 3663, 3670, 3671, 3678, 3683, 3688, 3693,
3592 3693, 3693, 3698, 3703, 3708, 3713, 3718, 3723, 3730, 3731,
3593 3738, 3743, 3751, 3751, 3756, 3761, 3761, 3767, 3772, 3777,
3594 3782, 3790, 3790, 3795, 3800, 3800, 3805, 3810, 3815, 3820,
3595 3828, 3836, 3839, 3844, 3849, 3856, 3856, 3856, 3857, 3862,
3596 3865, 3870, 3873, 3878, 3878, 3886, 3887, 3888, 3889, 3890,
3597 3891, 3892, 3893, 3894, 3895, 3896, 3897, 3898, 3899, 3900,
3598 3901, 3902, 3903, 3904, 3905, 3906, 3907, 3908, 3909, 3910,
3599 3911, 3912, 3913, 3914, 3915, 3918, 3918, 3918, 3919, 3919,
3600 3920, 3920, 3920, 3921, 3921, 3921, 3921, 3922, 3922, 3922,
3601 3922, 3923, 3923, 3923, 3924, 3924, 3924, 3924, 3925, 3925,
3602 3925, 3925, 3926, 3926, 3926, 3926, 3927, 3927, 3927, 3927,
3603 3928, 3928, 3928, 3928, 3929, 3929, 3932, 3932, 3933, 3933,
3604 3933, 3933, 3933, 3933, 3933, 3933, 3933, 3934, 3934, 3934,
3605 3934, 3934, 3934, 3934, 3935, 3940, 3945, 3950, 3955, 3960,
3606 3965, 3970, 3975, 3980, 3985, 3990, 3995, 4000, 4001, 4006,
3607 4011, 4016, 4021, 4026, 4031, 4036, 4041, 4046, 4051, 4056,
3608 4063, 4063, 4063, 4064, 4065, 4068, 4077, 4078, 4084, 4091,
3609 4092, 4093, 4094, 4097, 4102, 4110, 4116, 4123, 4130, 4130,
3610 4133, 4134, 4135, 4140, 4147, 4152, 4161, 4166, 4176, 4188,
3611 4189, 4195, 4196, 4197, 4198, 4203, 4210, 4210, 4215, 4220,
3612 4225, 4231, 4237, 4241, 4241, 4279, 4284, 4292, 4297, 4305,
3613 4310, 4315, 4320, 4328, 4333, 4342, 4343, 4347, 4352, 4357,
3614 4375, 4375, 4375, 4375, 4375, 4375, 4375, 4375, 4376, 4377,
3615 4378, 4384, 4383, 4396, 4396, 4402, 4408, 4413, 4418, 4423,
3616 4429, 4434, 4439, 4444, 4449, 4456, 4461, 4466, 4471, 4472,
3617 4478, 4480, 4492, 4501, 4510, 4519, 4518, 4533, 4532, 4545,
3618 4553, 4553, 4554, 4598, 4597, 4620, 4619, 4639, 4638, 4657,
3619 4655, 4672, 4670, 4685, 4690, 4695, 4700, 4715, 4715, 4718,
3620 4725, 4743, 4750, 4758, 4766, 4773, 4781, 4790, 4799, 4807,
3621 4814, 4821, 4829, 4836, 4842, 4857, 4864, 4869, 4875, 4882,
3622 4889, 4890, 4891, 4894, 4895, 4898, 4900, 4909, 4910, 4917,
3623 4918, 4921, 4926, 4934, 4934, 4934, 4939, 4944, 4949, 4954,
3624 4961, 4967, 4974, 4975, 4982, 4982, 4984, 4984, 4984, 4984,
3625 4984, 4984, 4984, 4984, 4984, 4984, 4984, 4987, 4995, 4995,
3626 4995, 4995, 4995, 4995, 4995, 4995, 4995, 4995, 4995, 4995,
3627 4995, 4995, 4995, 4995, 4995, 4995, 4996, 5002, 5007, 5007,
3628 5010, 5011, 5017, 5027, 5031, 5034, 5039, 5046, 5048, 5052,
3629 5057, 5060, 5066, 5071, 5078, 5084, 5077, 5111, 5118, 5127,
3630 5134, 5133, 5144, 5152, 5158, 5168, 5174, 5179, 5187, 5194,
3631 5205, 5211, 5216, 5222, 5232, 5237, 5245, 5251, 5259, 5261,
3632 5276, 5276, 5297, 5303, 5308, 5314, 5322, 5331, 5332, 5335,
3633 5336, 5338, 5351, 5358, 5366, 5367, 5370, 5371, 5377, 5385,
3634 5386, 5392, 5398, 5403, 5408, 5415, 5418, 5425, 5429, 5428,
3635 5441, 5444, 5451, 5458, 5459, 5460, 5467, 5474, 5481, 5487,
3636 5494, 5501, 5508, 5514, 5519, 5524, 5531, 5530, 5541, 5547,
3637 5555, 5561, 5566, 5571, 5576, 5581, 5584, 5585, 5592, 5597,
3638 5604, 5612, 5618, 5625, 5626, 5633, 5640, 5645, 5650, 5655,
3639 5662, 5664, 5671, 5677, 5689, 5690, 5705, 5710, 5717, 5723,
3640 5724, 5731, 5732, 5732, 5732, 5732, 5732, 5732, 5732, 5733,
3641 5734, 5735, 5738, 5738, 5738, 5738, 5738, 5738, 5738, 5738,
3642 5739, 5744, 5747, 5755, 5767, 5774, 5781, 5786, 5791, 5799,
3643 5819, 5822, 5827, 5831, 5834, 5839, 5842, 5849, 5852, 5853,
3644 5856, 5868, 5869, 5870, 5877, 5890, 5902, 5909, 5909, 5909,
3645 5909, 5913, 5917, 5924, 5926, 5933, 5933, 5937, 5941, 5948,
3646 5948, 5951, 5951, 5955, 5959, 5967, 5971, 5979, 5983, 5991,
3647 5995, 6003, 6007, 6033, 6036, 6035, 6050, 6058, 6062, 6066,
3648 6070, 6086, 6087, 6090, 6095, 6098, 6099, 6102, 6118, 6119,
3649 6122, 6130, 6131, 6139, 6140, 6141, 6142, 6145, 6146, 6147,
3650 6150, 6150, 6151, 6154, 6155, 6156, 6157, 6158, 6159, 6160,
3651 6163, 6173, 6180, 6180, 6187, 6188, 6192, 6191, 6201, 6204,
3652 6205, 6212, 6219, 6229, 6230, 6230, 6247, 6247, 6247, 6247,
3653 6247, 6247, 6247, 6247, 6247, 6247, 6247, 6248, 6257, 6257,
3654 6257, 6257, 6257, 6258, 6349, 6349, 6349, 6349, 6349, 6349,
3655 6349, 6349, 6349, 6349, 6349, 6349, 6349, 6349, 6349, 6349,
3656 6349, 6349, 6349, 6349, 6349, 6349, 6349, 6352, 6352, 6352,
3657 6352, 6352, 6352, 6352, 6352, 6352, 6352, 6352, 6352, 6352,
3658 6352, 6352, 6352, 6352, 6352, 6352, 6352, 6355, 6362, 6371,
3659 6380, 6389, 6400, 6401, 6411, 6418, 6423, 6442, 6444, 6455,
3660 6475, 6476, 6479, 6485, 6491, 6499, 6500, 6503, 6509, 6517,
3661 6518, 6521, 6527, 6532, 6540, 6540, 6540, 6548, 6548, 6578,
3662 6580, 6579, 6592, 6593, 6600, 6602, 6625, 6630, 6635, 6642,
3663 6648, 6653, 6666, 6666, 6666, 6667, 6670, 6671, 6672, 6675,
3664 6676, 6679, 6680, 6683, 6684, 6687, 6690, 6693, 6696, 6697,
3665 6700, 6708, 6715, 6716, 6720
3666};
3667#endif
3668
3670#define YY_ACCESSING_SYMBOL(State) YY_CAST (yysymbol_kind_t, yystos[State])
3671
3672#if 1
3673/* The user-facing name of the symbol whose (internal) number is
3674 YYSYMBOL. No bounds checking. */
3675static const char *yysymbol_name (yysymbol_kind_t yysymbol) YY_ATTRIBUTE_UNUSED;
3676
3677/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
3678 First, the terminals, then, starting at YYNTOKENS, nonterminals. */
3679static const char *const yytname[] =
3680{
3681 "\"end-of-input\"", "error", "\"invalid token\"", "\"'class'\"",
3682 "\"'module'\"", "\"'def'\"", "\"'undef'\"", "\"'begin'\"",
3683 "\"'rescue'\"", "\"'ensure'\"", "\"'end'\"", "\"'if'\"", "\"'unless'\"",
3684 "\"'then'\"", "\"'elsif'\"", "\"'else'\"", "\"'case'\"", "\"'when'\"",
3685 "\"'while'\"", "\"'until'\"", "\"'for'\"", "\"'break'\"", "\"'next'\"",
3686 "\"'redo'\"", "\"'retry'\"", "\"'in'\"", "\"'do'\"",
3687 "\"'do' for condition\"", "\"'do' for block\"", "\"'do' for lambda\"",
3688 "\"'return'\"", "\"'yield'\"", "\"'super'\"", "\"'self'\"", "\"'nil'\"",
3689 "\"'true'\"", "\"'false'\"", "\"'and'\"", "\"'or'\"", "\"'not'\"",
3690 "\"'if' modifier\"", "\"'unless' modifier\"", "\"'while' modifier\"",
3691 "\"'until' modifier\"", "\"'rescue' modifier\"", "\"'alias'\"",
3692 "\"'defined?'\"", "\"'BEGIN'\"", "\"'END'\"", "\"'__LINE__'\"",
3693 "\"'__FILE__'\"", "\"'__ENCODING__'\"", "\"local variable or method\"",
3694 "\"method\"", "\"global variable\"", "\"instance variable\"",
3695 "\"constant\"", "\"class variable\"", "\"label\"", "\"integer literal\"",
3696 "\"float literal\"", "\"rational literal\"", "\"imaginary literal\"",
3697 "\"char literal\"", "\"numbered reference\"", "\"back reference\"",
3698 "\"literal content\"", "tREGEXP_END", "\"dummy end\"", "'.'",
3699 "\"backslash\"", "\"escaped space\"", "\"escaped horizontal tab\"",
3700 "\"escaped form feed\"", "\"escaped carriage return\"",
3701 "\"escaped vertical tab\"", "\"unary+\"", "\"unary-\"", "\"**\"",
3702 "\"<=>\"", "\"==\"", "\"===\"", "\"!=\"", "\">=\"", "\"<=\"", "\"&&\"",
3703 "\"||\"", "\"=~\"", "\"!~\"", "\"..\"", "\"...\"", "\"(..\"", "\"(...\"",
3704 "\"[]\"", "\"[]=\"", "\"<<\"", "\">>\"", "\"&.\"", "\"::\"",
3705 "\":: at EXPR_BEG\"", "\"operator-assignment\"", "\"=>\"", "\"(\"",
3706 "\"( arg\"", "\"[\"", "\"{\"", "\"{ arg\"", "\"*\"", "\"**arg\"",
3707 "\"&\"", "\"->\"", "\"symbol literal\"", "\"string literal\"",
3708 "\"backtick literal\"", "\"regexp literal\"", "\"word list\"",
3709 "\"verbatim word list\"", "\"symbol list\"", "\"verbatim symbol list\"",
3710 "\"terminator\"", "\"'}'\"", "\"'#{'\"", "tSTRING_DVAR", "tLAMBEG",
3711 "tLABEL_END", "tIGNORED_NL", "tCOMMENT", "tEMBDOC_BEG", "tEMBDOC",
3712 "tEMBDOC_END", "tHEREDOC_BEG", "tHEREDOC_END", "k__END__", "tLOWEST",
3713 "'='", "'?'", "':'", "'>'", "'<'", "'|'", "'^'", "'&'", "'+'", "'-'",
3714 "'*'", "'/'", "'%'", "tUMINUS_NUM", "'!'", "'~'", "tLAST_TOKEN", "'{'",
3715 "'}'", "'['", "'\\n'", "','", "'`'", "'('", "')'", "']'", "';'", "' '",
3716 "$accept", "option_terms", "compstmt_top_stmts", "$@1", "program",
3717 "top_stmts", "top_stmt", "block_open", "begin_block", "compstmt_stmts",
3718 "$@2", "$@3", "bodystmt", "$@4", "stmts", "stmt_or_begin", "$@5",
3719 "allow_exits", "k_END", "$@6", "stmt", "asgn_mrhs", "asgn_command_rhs",
3720 "command_asgn", "op_asgn_command_rhs",
3721 "def_endless_method_endless_command", "endless_command", "option_'\\n'",
3722 "command_rhs", "expr", "$@7", "$@8", "def_name", "defn_head", "$@9",
3723 "defs_head", "value_expr_expr", "expr_value", "$@10", "$@11",
3724 "expr_value_do", "command_call", "value_expr_command_call",
3725 "command_call_value", "block_command", "cmd_brace_block", "fcall",
3726 "command", "mlhs", "mlhs_inner", "mlhs_basic", "mlhs_items_mlhs_item",
3727 "mlhs_item", "mlhs_head", "mlhs_node", "lhs", "cname", "cpath", "fname",
3728 "fitem", "undef_list", "$@12", "op", "reswords", "asgn_arg_rhs", "arg",
3729 "op_asgn_arg_rhs", "range_expr_arg", "def_endless_method_endless_arg",
3730 "ternary", "endless_arg", "relop", "rel_expr", "lex_ctxt",
3731 "begin_defined", "after_rescue", "value_expr_arg", "arg_value",
3732 "aref_args", "arg_rhs", "paren_args", "opt_paren_args", "opt_call_args",
3733 "value_expr_command", "call_args", "$@13", "command_args", "block_arg",
3734 "opt_block_arg", "args", "arg_splat", "mrhs_arg", "mrhs", "primary",
3735 "$@14", "$@15", "@16", "@17", "$@18", "$@19", "$@20", "$@21", "$@22",
3736 "$@23", "$@24", "value_expr_primary", "primary_value", "k_begin", "k_if",
3737 "k_unless", "k_while", "k_until", "k_case", "k_for", "k_class",
3738 "k_module", "k_def", "k_do", "k_do_block", "k_rescue", "k_ensure",
3739 "k_when", "k_else", "k_elsif", "k_end", "k_return", "k_yield", "then",
3740 "do", "if_tail", "opt_else", "for_var", "f_marg", "mlhs_items_f_marg",
3741 "f_margs", "f_rest_marg", "f_any_kwrest", "$@25", "f_eq",
3742 "f_kw_primary_value", "f_kwarg_primary_value", "opt_f_block_arg_none",
3743 "args_tail_basic_primary_value_none", "block_args_tail",
3744 "excessed_comma", "f_opt_primary_value", "f_opt_arg_primary_value",
3745 "opt_args_tail_block_args_tail_none",
3746 "args-list_primary_value_opt_args_tail_block_args_tail_none",
3747 "block_param", "tail-only-args_block_args_tail", "opt_block_param_def",
3748 "block_param_def", "opt_block_param", "opt_bv_decl", "bv_decls", "bvar",
3749 "max_numparam", "numparam", "it_id", "@26", "$@27", "lambda",
3750 "f_larglist", "lambda_body", "$@28", "do_block", "block_call",
3751 "method_call", "brace_block", "@29", "brace_body", "@30", "do_body",
3752 "case_args", "case_body", "cases", "p_pvtbl", "p_pktbl", "p_in_kwarg",
3753 "$@31", "p_case_body", "p_cases", "p_top_expr", "p_top_expr_body",
3754 "p_expr", "p_as", "$@32", "p_alt", "p_lparen", "p_lbracket",
3755 "p_expr_basic", "$@33", "p_args", "p_args_head", "p_args_tail", "p_find",
3756 "p_rest", "p_args_post", "p_arg", "p_kwargs", "p_kwarg", "p_kw",
3757 "p_kw_label", "p_kwrest", "p_kwnorest", "p_any_kwrest", "p_value",
3758 "range_expr_p_primitive", "p_primitive", "p_variable", "p_var_ref",
3759 "p_expr_ref", "p_const", "opt_rescue", "exc_list", "exc_var",
3760 "opt_ensure", "literal", "strings", "string", "string1", "xstring",
3761 "regexp", "nonempty_list_' '", "words_tWORDS_BEG_word_list", "words",
3762 "word_list", "word", "words_tSYMBOLS_BEG_symbol_list", "symbols",
3763 "symbol_list", "words_tQWORDS_BEG_qword_list", "qwords",
3764 "words_tQSYMBOLS_BEG_qsym_list", "qsymbols", "qword_list", "qsym_list",
3765 "string_contents", "xstring_contents", "regexp_contents",
3766 "string_content", "@34", "@35", "@36", "@37", "@38", "string_dend",
3767 "string_dvar", "symbol", "ssym", "sym", "dsym", "numeric",
3768 "simple_numeric", "nonlocal_var", "user_variable", "keyword_variable",
3769 "var_ref", "var_lhs", "backref", "$@39", "superclass",
3770 "f_opt_paren_args", "f_empty_arg", "f_paren_args", "f_arglist", "@40",
3771 "f_kw_arg_value", "f_kwarg_arg_value", "opt_f_block_arg_opt_comma",
3772 "args_tail_basic_arg_value_opt_comma", "args_tail",
3773 "args_tail_basic_arg_value_none", "largs_tail", "f_opt_arg_value",
3774 "f_opt_arg_arg_value", "opt_args_tail_args_tail_opt_comma",
3775 "args-list_arg_value_opt_args_tail_args_tail_opt_comma",
3776 "f_args-list_args_tail_opt_comma", "tail-only-args_args_tail", "f_args",
3777 "opt_args_tail_largs_tail_none",
3778 "args-list_arg_value_opt_args_tail_largs_tail_none",
3779 "f_args-list_largs_tail_none", "tail-only-args_largs_tail", "f_largs",
3780 "args_forward", "f_bad_arg", "f_norm_arg", "f_arg_asgn", "f_arg_item",
3781 "f_arg", "f_label", "kwrest_mark", "f_no_kwarg", "f_kwrest",
3782 "restarg_mark", "f_rest_arg", "blkarg_mark", "f_block_arg", "option_','",
3783 "opt_comma", "value_expr_singleton_expr", "singleton", "singleton_expr",
3784 "$@41", "assoc_list", "assocs", "assoc", "operation2", "operation3",
3785 "dot_or_colon", "call_op", "call_op2", "rparen", "rbracket", "rbrace",
3786 "trailer", "term", "terms", "none", YY_NULLPTR
3787};
3788
3789static const char *
3790yysymbol_name (yysymbol_kind_t yysymbol)
3791{
3792 return yytname[yysymbol];
3793}
3794#endif
3795
3796#define YYPACT_NINF (-1208)
3797
3798#define yypact_value_is_default(Yyn) \
3799 ((Yyn) == YYPACT_NINF)
3800
3801#define YYTABLE_NINF (-855)
3802
3803#define yytable_value_is_error(Yyn) \
3804 ((Yyn) == YYTABLE_NINF)
3805
3806/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
3807 STATE-NUM. */
3808static const yytype_int16 yypact[] =
3809{
3810 -1208, 6236, 149, -1208, -1208, -1208, -1208, 11007, -1208, -1208,
3811 -1208, -1208, -1208, -1208, -1208, 12062, 12062, -1208, -1208, -1208,
3812 -1208, 7296, -1208, -1208, -1208, -1208, 400, 10853, 8, 33,
3813 -1208, -1208, -1208, -1208, 6672, 7452, -1208, -1208, 6828, -1208,
3814 -1208, -1208, -1208, -1208, -1208, -1208, -1208, 13622, 13622, 13622,
3815 13622, 144, 9766, 9924, 12542, 12782, 11308, -1208, 10699, -1208,
3816 -1208, -1208, 163, 163, 163, 163, 1269, 13742, 13622, -1208,
3817 563, -1208, 33, 1167, -1208, -1208, -1208, -1208, -1208, 824,
3818 35, 35, -1208, -1208, 170, 214, 280, -1208, 62, 14342,
3819 -1208, 323, -1208, 3973, -1208, -1208, -1208, -1208, 720, 61,
3820 -1208, 133, -1208, 11942, 11942, -1208, -1208, 10386, 14460, 14578,
3821 14696, 10544, 12062, 7920, -1208, 805, 102, -1208, -1208, 458,
3822 -1208, -1208, -1208, -1208, -1208, -1208, -1208, -1208, -1208, -1208,
3823 -1208, -1208, -1208, -1208, -1208, -1208, -1208, 283, 350, -1208,
3824 374, 418, -1208, -1208, -1208, -1208, -1208, -1208, -1208, -1208,
3825 -1208, -1208, -1208, -1208, -1208, -1208, -1208, -1208, -1208, -1208,
3826 -1208, -1208, -1208, -1208, -1208, -1208, -1208, -1208, -1208, -1208,
3827 -1208, -1208, -1208, -1208, -1208, -1208, -1208, -1208, -1208, -1208,
3828 -1208, -1208, -1208, -1208, -1208, -1208, -1208, -1208, -1208, -1208,
3829 -1208, -1208, -1208, -1208, -1208, -1208, -1208, -1208, -1208, -1208,
3830 -1208, -1208, -1208, -1208, -1208, -1208, -1208, -1208, -1208, -1208,
3831 -1208, -1208, -1208, -1208, -1208, -1208, -1208, -1208, -1208, -1208,
3832 357, -1208, -1208, -1208, -1208, -1208, -1208, 432, 13622, 549,
3833 9924, 13622, 13622, 13622, -1208, 13622, -1208, -1208, 476, 6642,
3834 -1208, 525, -1208, -1208, -1208, 501, -1208, 679, 76, 79,
3835 582, 247, 508, -1208, -1208, 12182, -1208, 12062, -1208, -1208,
3836 11683, 13862, 996, -1208, 546, -1208, 10082, -1208, -1208, -1208,
3837 -1208, -1208, 556, 35, 35, 170, -1208, 713, -1208, 558,
3838 609, 6798, 6798, 601, -1208, 9766, 550, 563, -1208, 1167,
3839 8, 592, -1208, -1208, 584, 770, 785, -1208, 525, 640,
3840 785, -1208, 8, 750, 1269, 14814, 651, 651, 658, -1208,
3841 731, 774, 784, 851, -1208, -1208, 1026, -1208, -1208, 1096,
3842 1136, 540, -1208, 654, 654, 654, 654, 761, -1208, -1208,
3843 -1208, -1208, -1208, -1208, -1208, 6388, 10234, 11942, 11942, 11942,
3844 11942, -1208, 13862, 13862, 1926, 702, -1208, 760, -1208, 1926,
3845 763, -1208, -1208, -1208, -1208, 741, -1208, -1208, -1208, -1208,
3846 -1208, -1208, -1208, 9766, 11426, 744, -1208, -1208, 13622, 13622,
3847 13622, 13622, 13622, -1208, -1208, 13622, 13622, 13622, 13622, 13622,
3848 13622, 13622, 13622, -1208, 13622, -1208, -1208, 13622, 13622, 13622,
3849 13622, 13622, 13622, 13622, 13622, 13622, 13622, -1208, -1208, 4938,
3850 12062, 5402, 556, 8702, -1208, 824, -1208, 110, 110, 11942,
3851 9614, 9614, -1208, 563, 756, 866, -1208, -1208, 869, 908,
3852 81, 108, 122, 936, 1017, 11942, 689, -1208, 808, 895,
3853 -1208, -1208, -1208, -1208, 74, 551, 588, 664, 690, 748,
3854 758, 769, 820, -1208, -1208, -1208, -1208, -1208, 823, -1208,
3855 -1208, 11544, -1208, -1208, -1208, 4515, -1208, -1208, -1208, -1208,
3856 -1208, -1208, 353, -1208, -1208, -1208, 730, -1208, 13622, 12302,
3857 -1208, -1208, 15094, 12062, 15192, -1208, -1208, 12662, -1208, 13622,
3858 8, -1208, 800, 8, 815, -1208, -1208, 822, 189, -1208,
3859 -1208, -1208, -1208, -1208, 11007, -1208, -1208, 13622, 811, 848,
3860 874, 15290, 15192, -1208, 33, 8, -1208, -1208, 5800, 880,
3861 858, -1208, 12542, -1208, -1208, 12782, -1208, -1208, -1208, 546,
3862 903, -1208, 891, -1208, -1208, 14814, 15388, 12062, 15486, -1208,
3863 -1208, -1208, -1208, -1208, -1208, -1208, -1208, -1208, -1208, -1208,
3864 -1208, 1156, 72, 1172, 78, 13622, -1208, -1208, 888, -1208,
3865 -1208, -1208, -1208, -1208, 11822, -1208, -1208, -1208, -1208, -1208,
3866 -1208, -1208, -1208, -1208, -1208, 1311, -1208, -1208, -1208, -1208,
3867 -1208, 900, -1208, -1208, -1208, 907, -1208, -1208, -1208, 919,
3868 -1208, -1208, -1208, 8, -1208, -1208, -1208, 942, -1208, 925,
3869 13622, 378, -1208, -1208, 1025, 927, 415, -1208, 13982, 8702,
3870 563, 13982, 8702, -1208, 931, -1208, -1208, -1208, 164, 164,
3871 12902, 8, 14814, 930, -1208, 13022, -1208, 609, 3213, 3213,
3872 3213, 3213, 4601, 3866, 3213, 3213, 6798, 6798, 576, 576,
3873 -1208, 6486, 1128, 1128, 1033, 59, 59, 609, 609, 609,
3874 1055, 1055, 8076, 6984, 8388, 7140, 556, -1208, 8, 933,
3875 675, -1208, 686, -1208, 7608, -1208, -1208, 164, -1208, 8854,
3876 1082, 9310, 89, 164, 164, 1083, 1076, 123, 15584, 12062,
3877 15682, -1208, -1208, -1208, 903, -1208, -1208, -1208, -1208, 15780,
3878 12062, 15878, 8702, 13862, -1208, -1208, -1208, 8, -1208, -1208,
3879 -1208, -1208, 3459, 14102, 14102, 11007, -1208, 13622, 13622, -1208,
3880 525, -1208, -1208, 508, 6516, 7764, 8, 362, 376, 13622,
3881 13622, -1208, -1208, 12422, -1208, 12662, -1208, -1208, -1208, 13862,
3882 6642, -1208, 14222, 14222, 234, 556, 556, 14102, -1208, 56,
3883 -1208, -1208, 785, 14814, 891, 616, 468, 8, 422, 603,
3884 -1208, -1208, 1350, -1208, 367, -1208, 163, -1208, -1208, 367,
3885 163, -1208, 609, -1208, -1208, 1311, 1437, -1208, 950, 8,
3886 954, -1208, 32, -1208, -1208, -1208, 504, -1208, 1926, -1208,
3887 -1208, -1208, 976, 13622, 1926, -1208, -1208, -1208, -1208, -1208,
3888 1944, -1208, -1208, -1208, 400, 1069, -1208, 6642, 1080, 164,
3889 -1208, 1069, 1080, 164, -1208, -1208, 975, -1208, -1208, -1208,
3890 -1208, -1208, 13622, -1208, -1208, -1208, 977, 987, 1087, -1208,
3891 -1208, 891, 14814, 1088, -1208, -1208, 1095, 1035, 3781, -1208,
3892 -1208, -1208, 905, 424, -1208, -1208, 1024, -1208, -1208, -1208,
3893 -1208, 741, 1008, 889, 12302, -1208, -1208, -1208, -1208, 741,
3894 -1208, 1163, -1208, 871, -1208, 1165, -1208, -1208, -1208, -1208,
3895 -1208, -1208, 13142, 164, -1208, 1083, 164, 80, 143, 8,
3896 127, 138, 11942, 563, 11942, 8702, 1068, 468, -1208, 8,
3897 164, 189, 11161, -1208, 102, 214, -1208, 4110, -1208, -1208,
3898 -1208, -1208, 13622, -1208, -1208, -1208, -1208, 496, -1208, -1208,
3899 8, 1028, 189, 400, -1208, -1208, -1208, -1208, 647, -1208,
3900 -1208, -1208, -1208, -1208, 654, -1208, 654, 654, 654, 8,
3901 -1208, 1311, -1208, 1245, -1208, -1208, 1139, 900, -1208, -1208,
3902 1037, 1038, -1208, -1208, 1048, -1208, 1049, -1208, 1037, 13982,
3903 -1208, -1208, -1208, -1208, -1208, -1208, -1208, 1058, 13262, -1208,
3904 891, 497, -1208, -1208, -1208, 15976, 12062, 16074, -1208, -1208,
3905 13622, 14102, 14102, 1062, -1208, -1208, -1208, 14102, 14102, -1208,
3906 -1208, 13382, 1165, -1208, -1208, -1208, 9614, 11942, 164, -1208,
3907 -1208, 164, -1208, 13622, -1208, 274, -1208, -1208, 164, -1208,
3908 150, 89, 8702, 563, 164, -1208, -1208, -1208, -1208, -1208,
3909 -1208, 13622, 13622, -1208, 13622, 13622, -1208, 12662, -1208, 14222,
3910 1388, -1208, -1208, -1208, 1072, 1073, -1208, 1944, -1208, 1944,
3911 -1208, 1926, -1208, 1944, -1208, -1208, 1069, 1080, 13622, 13622,
3912 -1208, -1208, 13622, 1075, 11822, 11822, 14102, 13622, 8232, 8544,
3913 8, 535, 644, 4819, 4819, 6642, -1208, -1208, -1208, -1208,
3914 -1208, 14102, -1208, -1208, -1208, -1208, 977, -1208, 1133, -1208,
3915 1230, -1208, -1208, 110, -1208, -1208, -1208, 13502, 9006, -1208,
3916 -1208, -1208, 164, -1208, -1208, 13622, 1926, 1085, -1208, -1208,
3917 1089, -1208, -1208, 1098, -1208, -1208, -1208, -1208, -1208, 1104,
3918 1106, -1208, 6084, 1245, 1245, 1037, 1037, 1107, 1037, 6642,
3919 6642, 1103, 1103, 1058, -1208, -1208, 6642, 680, -1208, -1208,
3920 -1208, 3155, 3155, 861, -1208, 2296, 304, 1198, -1208, 1260,
3921 -1208, -1208, 39, -1208, 1112, -1208, -1208, -1208, 1108, -1208,
3922 1124, -1208, 5920, -1208, -1208, -1208, -1208, -1208, 898, -1208,
3923 -1208, -1208, 461, -1208, -1208, -1208, -1208, -1208, -1208, -1208,
3924 -1208, -1208, 643, -1208, -1208, -1208, 14932, 110, -1208, -1208,
3925 9614, -1208, -1208, 9462, 8854, 13622, -1208, 530, 4819, 9614,
3926 -1208, 8, 32, -1208, -1208, 98, 504, -1208, 1926, -1208,
3927 -1208, 1926, -1208, 1944, -1208, 113, 1073, -1208, -1208, 1944,
3928 -1208, -1208, 1482, 10234, -1208, -1208, 8702, -1208, -1208, -1208,
3929 -1208, 5920, 296, 8, 5570, -1208, 8, 1126, -1208, 1115,
3930 -1208, -1208, -1208, 999, -1208, 11942, -1208, 1233, 5570, -1208,
3931 5920, 995, 1181, 3155, 3155, 861, 213, 611, 4819, 4819,
3932 -1208, 1231, -1208, 917, 165, 185, 253, 8702, 563, -1208,
3933 871, -1208, -1208, -1208, -1208, 110, 984, 164, 1130, 1137,
3934 -1208, -1208, 10234, -1208, 1085, -1208, 1131, 1141, 1149, 1153,
3935 1131, -1208, -1208, -1208, 1037, 1085, -1208, 1155, -1208, -1208,
3936 -1208, 1168, -1208, -1208, -1208, 8, 942, 1170, 15050, 1177,
3937 -1208, -1208, -1208, 262, -1208, 1181, 1179, 1180, -1208, -1208,
3938 -1208, -1208, -1208, 8, -1208, -1208, 1184, 5920, 1187, -1208,
3939 -1208, -1208, -1208, -1208, -1208, -1208, -1208, -1208, -1208, -1208,
3940 8, 8, 8, 8, 8, 8, 319, 16172, 12062, 16270,
3941 1163, -1208, 1230, -1208, -1208, 11942, 11942, -1208, 1447, -1208,
3942 8702, 1166, -1208, 1944, -1208, 1944, -1208, 1926, -1208, 1944,
3943 -1208, -1208, -1208, -1208, 504, -1208, 1482, -1208, -1208, 1183,
3944 15050, 1482, -1208, -1208, 1280, 922, 1559, -1208, -1208, 5920,
3945 -1208, 995, -1208, 5920, -1208, 5570, 101, -1208, -1208, -1208,
3946 -1208, -1208, -1208, 153, 288, 8, 346, 375, -1208, -1208,
3947 9158, -1208, -1208, -1208, 877, -1208, -1208, 164, -1208, 1131,
3948 1131, 1191, 1131, -1208, 1085, -1208, -1208, 1195, 1196, -1208,
3949 922, 1199, 1201, -1208, 16368, 1195, 1203, 8, 1203, -1208,
3950 -1208, 427, 445, 1447, -1208, -1208, -1208, -1208, 1944, -1208,
3951 -1208, -1208, 1559, -1208, 1559, -1208, 1482, -1208, 1559, -1208,
3952 1204, 1207, -1208, 5920, -1208, -1208, -1208, -1208, -1208, 1131,
3953 1195, 1195, 1215, 1195, -1208, -1208, -1208, 1559, -1208, -1208,
3954 1195, -1208
3955};
3956
3957/* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM.
3958 Performed when YYTABLE does not specify something else to do. Zero
3959 means the default is an error. */
3960static const yytype_int16 yydefact[] =
3961{
3962 2, 0, 0, 47, 406, 407, 408, 0, 399, 400,
3963 401, 404, 26, 26, 26, 393, 394, 395, 396, 418,
3964 419, 323, 704, 703, 705, 706, 64, 0, 64, 0,
3965 854, 708, 707, 709, 97, 99, 698, 697, 98, 699,
3966 693, 694, 695, 696, 641, 714, 715, 0, 0, 0,
3967 0, 0, 0, 0, 854, 854, 126, 494, 667, 667,
3968 669, 671, 0, 0, 0, 0, 0, 0, 0, 6,
3969 3, 8, 0, 10, 43, 49, 40, 58, 61, 46,
3970 724, 724, 70, 91, 323, 90, 0, 112, 0, 116,
3971 128, 0, 237, 79, 246, 253, 282, 283, 267, 284,
3972 398, 0, 351, 0, 0, 87, 87, 0, 0, 0,
3973 0, 0, 360, 323, 370, 94, 368, 340, 341, 640,
3974 642, 342, 343, 650, 344, 656, 346, 660, 345, 662,
3975 347, 639, 685, 686, 638, 691, 702, 710, 711, 348,
3976 0, 349, 7, 1, 205, 216, 206, 229, 202, 222,
3977 212, 211, 232, 233, 227, 210, 209, 204, 230, 234,
3978 235, 214, 203, 217, 221, 223, 215, 208, 224, 231,
3979 226, 225, 218, 228, 213, 201, 220, 219, 200, 207,
3980 198, 199, 195, 196, 197, 155, 157, 156, 190, 191,
3981 186, 168, 169, 170, 177, 174, 176, 171, 172, 192,
3982 193, 178, 179, 183, 187, 173, 175, 165, 166, 167,
3983 180, 181, 182, 184, 185, 188, 189, 194, 160, 162,
3984 33, 158, 159, 161, 402, 403, 405, 0, 828, 0,
3985 0, 334, 831, 326, 667, 0, 318, 316, 0, 298,
3986 299, 329, 317, 110, 322, 854, 330, 0, 710, 711,
3987 0, 349, 854, 824, 111, 854, 513, 0, 107, 65,
3988 64, 0, 0, 28, 854, 12, 0, 11, 27, 295,
3989 393, 394, 514, 724, 724, 0, 261, 0, 360, 363,
3990 262, 251, 252, 357, 24, 0, 0, 3, 21, 23,
3991 64, 114, 20, 353, 0, 64, 64, 300, 0, 0,
3992 64, 822, 64, 0, 0, 0, 724, 724, 124, 397,
3993 0, 132, 133, 140, 491, 688, 0, 687, 689, 0,
3994 0, 0, 647, 651, 663, 657, 665, 692, 74, 273,
3995 274, 851, 850, 5, 852, 0, 0, 0, 0, 0,
3996 0, 854, 0, 0, 721, 0, 720, 723, 389, 721,
3997 0, 391, 409, 518, 508, 100, 520, 367, 410, 520,
3998 503, 854, 130, 0, 122, 117, 854, 77, 0, 0,
3999 0, 0, 0, 291, 292, 0, 0, 0, 0, 249,
4000 250, 0, 0, 75, 0, 289, 290, 0, 0, 0,
4001 0, 0, 0, 0, 0, 0, 0, 841, 842, 844,
4002 854, 843, 0, 0, 86, 84, 85, 0, 0, 0,
4003 0, 0, 377, 3, 4, 0, 430, 429, 0, 0,
4004 710, 711, 349, 150, 151, 0, 0, 153, 854, 0,
4005 710, 711, 349, 387, 225, 218, 228, 213, 195, 196,
4006 197, 155, 156, 820, 81, 80, 819, 818, 0, 817,
4007 109, 64, 108, 844, 843, 0, 369, 643, 854, 854,
4008 163, 827, 357, 333, 830, 325, 0, 854, 0, 0,
4009 319, 328, 844, 854, 843, 854, 854, 0, 320, 787,
4010 64, 312, 854, 64, 854, 311, 324, 0, 64, 366,
4011 73, 30, 32, 31, 0, 854, 296, 0, 0, 0,
4012 0, 844, 843, 854, 0, 64, 355, 14, 0, 113,
4013 0, 358, 849, 848, 301, 849, 303, 359, 823, 0,
4014 139, 692, 127, 119, 723, 0, 844, 854, 843, 492,
4015 673, 690, 676, 674, 668, 644, 645, 670, 646, 672,
4016 648, 0, 0, 0, 0, 0, 853, 9, 0, 34,
4017 35, 36, 37, 297, 0, 71, 72, 793, 790, 789,
4018 788, 791, 799, 800, 787, 0, 806, 801, 810, 809,
4019 805, 814, 802, 765, 728, 814, 736, 763, 745, 814,
4020 761, 766, 764, 64, 737, 792, 794, 795, 797, 814,
4021 727, 804, 443, 442, 808, 814, 813, 735, 0, 0,
4022 0, 0, 0, 491, 0, 518, 101, 491, 0, 0,
4023 0, 64, 0, 118, 131, 0, 531, 259, 266, 268,
4024 269, 270, 277, 278, 271, 272, 247, 248, 275, 276,
4025 531, 64, 263, 264, 265, 254, 255, 256, 257, 258,
4026 293, 294, 832, 834, 833, 835, 323, 511, 64, 854,
4027 832, 834, 833, 835, 323, 512, 854, 0, 421, 0,
4028 420, 0, 0, 0, 0, 0, 375, 357, 844, 854,
4029 843, 380, 385, 150, 151, 152, 716, 383, 718, 844,
4030 854, 843, 0, 0, 839, 840, 82, 64, 362, 832,
4031 833, 507, 323, 0, 0, 0, 854, 0, 0, 826,
4032 331, 327, 332, 854, 832, 833, 64, 832, 833, 0,
4033 0, 825, 306, 313, 308, 315, 845, 365, 29, 0,
4034 279, 13, 0, 0, 356, 0, 854, 0, 25, 115,
4035 22, 354, 64, 0, 125, 836, 138, 64, 832, 833,
4036 493, 677, 0, 649, 0, 653, 0, 659, 655, 0,
4037 0, 661, 260, 39, 38, 0, 441, 433, 435, 64,
4038 438, 431, 815, 734, 816, 731, 815, 733, 815, 757,
4039 748, 722, 0, 0, 815, 762, 726, 598, 803, 807,
4040 815, 759, 812, 811, 64, 59, 62, 286, 280, 0,
4041 725, 60, 281, 0, 492, 516, 0, 492, 416, 417,
4042 517, 502, 334, 92, 93, 41, 336, 0, 45, 335,
4043 129, 123, 0, 0, 69, 48, 67, 0, 304, 329,
4044 236, 42, 0, 349, 529, 529, 0, 854, 854, 518,
4045 510, 104, 0, 515, 313, 854, 854, 310, 509, 102,
4046 309, 854, 352, 854, 422, 854, 424, 88, 423, 373,
4047 374, 413, 0, 0, 531, 0, 0, 836, 356, 64,
4048 832, 833, 0, 0, 0, 0, 150, 151, 154, 64,
4049 0, 64, 0, 361, 504, 95, 50, 304, 238, 57,
4050 245, 164, 0, 829, 321, 854, 854, 515, 854, 854,
4051 64, 854, 64, 64, 56, 244, 302, 120, 515, 26,
4052 678, 675, 683, 684, 652, 654, 664, 658, 666, 64,
4053 440, 0, 796, 0, 730, 729, 804, 814, 747, 746,
4054 814, 814, 445, 744, 814, 798, 814, 795, 814, 0,
4055 854, 854, 390, 392, 493, 96, 493, 339, 0, 854,
4056 121, 357, 854, 854, 854, 844, 854, 843, 530, 530,
4057 0, 0, 0, 0, 105, 846, 854, 0, 0, 103,
4058 411, 854, 18, 630, 415, 414, 0, 0, 0, 425,
4059 427, 0, 89, 0, 522, 0, 378, 529, 0, 379,
4060 515, 0, 0, 0, 0, 515, 388, 821, 83, 505,
4061 506, 0, 0, 854, 0, 0, 307, 314, 364, 0,
4062 721, 679, 432, 434, 436, 439, 732, 815, 758, 815,
4063 755, 815, 751, 815, 753, 760, 66, 288, 0, 0,
4064 26, 26, 334, 337, 0, 0, 0, 0, 832, 833,
4065 64, 832, 833, 0, 0, 285, 54, 242, 55, 243,
4066 106, 0, 52, 240, 53, 241, 631, 632, 854, 633,
4067 854, 15, 428, 0, 371, 372, 523, 0, 0, 530,
4068 376, 381, 0, 717, 384, 0, 721, 854, 495, 785,
4069 854, 742, 783, 854, 781, 786, 784, 498, 743, 854,
4070 854, 741, 0, 0, 0, 814, 814, 814, 814, 63,
4071 287, 854, 854, 338, 44, 68, 305, 515, 622, 628,
4072 594, 0, 0, 0, 530, 64, 530, 582, 667, 0,
4073 621, 78, 539, 545, 547, 550, 543, 542, 578, 544,
4074 587, 590, 593, 599, 600, 589, 553, 608, 601, 554,
4075 609, 610, 611, 612, 613, 614, 615, 616, 618, 617,
4076 619, 620, 597, 76, 51, 239, 0, 0, 635, 412,
4077 0, 19, 637, 0, 0, 0, 524, 854, 0, 0,
4078 386, 64, 0, 740, 451, 0, 0, 739, 0, 777,
4079 768, 0, 782, 0, 779, 0, 437, 756, 752, 815,
4080 749, 754, 483, 0, 481, 480, 0, 606, 607, 151,
4081 626, 0, 570, 64, 571, 575, 64, 0, 565, 0,
4082 854, 568, 581, 0, 623, 0, 624, 0, 540, 548,
4083 0, 588, 592, 604, 605, 0, 530, 530, 0, 0,
4084 596, 0, 634, 0, 710, 711, 349, 0, 3, 16,
4085 854, 525, 527, 528, 526, 0, 536, 0, 485, 0,
4086 450, 500, 0, 496, 854, 767, 854, 854, 854, 854,
4087 854, 682, 681, 680, 814, 854, 448, 854, 456, 478,
4088 459, 854, 475, 484, 479, 64, 795, 854, 447, 854,
4089 455, 519, 521, 64, 563, 585, 573, 572, 564, 576,
4090 847, 566, 595, 64, 546, 541, 578, 0, 579, 583,
4091 667, 591, 586, 602, 603, 627, 552, 562, 551, 558,
4092 64, 64, 64, 64, 64, 64, 357, 844, 854, 843,
4093 854, 636, 854, 426, 532, 0, 0, 382, 0, 497,
4094 0, 0, 738, 0, 778, 0, 775, 0, 771, 0,
4095 773, 780, 750, 454, 0, 453, 0, 471, 462, 0,
4096 0, 457, 476, 477, 0, 446, 0, 473, 569, 0,
4097 577, 0, 625, 0, 549, 0, 0, 555, 556, 557,
4098 559, 560, 561, 836, 356, 64, 832, 833, 629, 17,
4099 0, 537, 538, 489, 64, 487, 490, 0, 499, 854,
4100 854, 854, 854, 449, 854, 461, 460, 854, 854, 482,
4101 458, 854, 854, 357, 844, 854, 574, 64, 579, 580,
4102 584, 515, 854, 0, 486, 501, 776, 772, 0, 769,
4103 774, 452, 0, 472, 0, 469, 0, 465, 0, 467,
4104 836, 356, 474, 0, 567, 534, 535, 533, 488, 854,
4105 854, 854, 854, 854, 770, 470, 466, 0, 463, 468,
4106 854, 464
4107};
4108
4109/* YYPGOTO[NTERM-NUM]. */
4110static const yytype_int16 yypgoto[] =
4111{
4112 -1208, -98, 1110, -1208, -1208, -1208, 1018, 1301, 870, -37,
4113 -1208, -1208, -557, -1208, 227, 876, -1208, 16, -1208, -1208,
4114 17, -1208, -1208, -133, -1208, -5, -553, 159, -51, 11,
4115 -1208, -1208, 510, 3119, -1208, 3492, -1208, -79, -1208, -1208,
4116 1279, -47, -1208, 778, -1208, -447, 1566, -10, 1281, -151,
4117 48, -442, -17, -1208, 25, 4179, -399, 1285, -46, 10,
4118 -1208, -1208, -3, -1208, -1208, 5056, -1208, -1208, -1208, -1208,
4119 -535, 1294, -1208, 141, 904, 242, -1208, 1282, -1208, 885,
4120 42, 710, -374, -1208, 104, -1208, -27, -395, -217, 24,
4121 -411, -1208, -568, -48, -1208, -1208, -1208, -1208, -1208, -1208,
4122 -1208, -1208, -1208, -1208, -1208, -1208, 1344, -1208, -1208, -1208,
4123 -1208, -1208, -1208, -1208, -1208, -1208, -1208, -1208, -1208, -1208,
4124 -1208, -1208, 441, -1208, -278, 2216, 2729, -401, 425, 178,
4125 -799, -1208, -838, -821, 655, 498, 393, -1208, 146, 82,
4126 -1208, -915, -1208, 237, -1208, -1207, 84, -434, -1208, -1208,
4127 -1208, 328, -1208, -1208, 156, -1208, 19, 368, -157, -168,
4128 -1208, -1208, 676, -1208, -1208, -1208, 548, -1208, -1208, -102,
4129 -1208, -520, -1208, 1067, -1208, -788, -1208, -708, -905, -526,
4130 -1208, 36, -1208, -1208, -924, -235, -1208, -1208, -1208, -1208,
4131 -1208, 140, -1208, -83, -1208, -873, -705, -1099, -336, -1059,
4132 -1062, -1208, 223, -1208, -1208, -943, 224, -1208, -1208, -581,
4133 229, -1208, -1208, -1208, 131, -1208, -1208, 125, 884, 1356,
4134 -1208, 1330, 1386, 1420, 5, -1208, 1654, -1208, 912, -1208,
4135 1698, -1208, -1208, 1756, -1208, 1900, -1208, -1208, -57, -1208,
4136 -1208, -140, -1208, -1208, -1208, -1208, -1208, -1208, -1208, 29,
4137 -1208, -1208, -1208, -1208, 37, -45, 4031, 130, 1346, 4554,
4138 3801, -1208, -1208, 83, -327, 732, 30, -1208, -734, -793,
4139 -511, -1208, 200, -1208, -858, -737, -662, -502, -1208, -1208,
4140 -1208, 1109, -370, -1208, -1208, -1208, 394, -221, -1197, -433,
4141 -273, -652, 779, -486, -668, -1208, -723, -1208, -629, -1208,
4142 305, -1208, -496, -1208, -1208, -1208, -1208, -1208, 34, -418,
4143 -378, -1208, -1208, -82, 1353, 248, -482, 64, -216, -69,
4144 -67, -1
4145};
4146
4147/* YYDEFGOTO[NTERM-NUM]. */
4148static const yytype_int16 yydefgoto[] =
4149{
4150 0, 333, 69, 1, 2, 70, 71, 266, 267, 656,
4151 1153, 1312, 657, 1050, 287, 288, 504, 224, 72, 494,
4152 289, 74, 75, 76, 77, 78, 785, 487, 815, 79,
4153 630, 616, 444, 273, 872, 274, 406, 407, 409, 972,
4154 410, 82, 804, 816, 83, 606, 275, 85, 86, 290,
4155 87, 522, 88, 89, 90, 238, 427, 428, 218, 219,
4156 220, 695, 645, 222, 92, 93, 94, 95, 96, 97,
4157 788, 395, 98, 553, 497, 554, 240, 241, 294, 820,
4158 837, 838, 480, 242, 481, 257, 258, 244, 470, 649,
4159 246, 808, 809, 99, 403, 510, 855, 665, 862, 1159,
4160 865, 863, 682, 599, 602, 100, 277, 102, 103, 104,
4161 105, 106, 107, 108, 109, 110, 111, 356, 359, 961,
4162 1150, 852, 966, 967, 800, 278, 279, 659, 847, 968,
4163 969, 419, 757, 758, 759, 760, 571, 772, 773, 1256,
4164 1257, 1163, 1258, 1385, 1342, 1260, 1261, 1337, 1262, 1263,
4165 1264, 1183, 1184, 1265, 1239, 1374, 1375, 529, 740, 899,
4166 314, 1165, 114, 1068, 1243, 1320, 360, 115, 116, 357,
4167 603, 604, 607, 608, 975, 853, 1234, 948, 1033, 824,
4168 1370, 856, 1427, 1235, 1111, 1275, 1113, 1287, 1114, 1218,
4169 1219, 1115, 1351, 1193, 1194, 1195, 1117, 1118, 1288, 1197,
4170 1119, 1120, 1121, 1122, 1123, 572, 1125, 1126, 1127, 1128,
4171 1129, 1130, 1131, 1132, 962, 1048, 1147, 1151, 117, 118,
4172 119, 120, 121, 122, 323, 123, 124, 541, 744, 125,
4173 126, 543, 127, 128, 129, 130, 542, 544, 316, 320,
4174 321, 534, 742, 741, 900, 1001, 1082, 1253, 901, 131,
4175 132, 317, 133, 134, 135, 136, 248, 249, 139, 250,
4176 251, 864, 677, 345, 346, 347, 348, 349, 574, 575,
4177 763, 576, 918, 1071, 1245, 578, 579, 769, 580, 581,
4178 582, 583, 1169, 1074, 1075, 1076, 1077, 584, 585, 586,
4179 927, 588, 589, 590, 591, 592, 593, 594, 595, 596,
4180 597, 764, 770, 447, 448, 449, 683, 299, 484, 253,
4181 725, 647, 686, 681, 402, 489, 833, 1201, 514, 660,
4182 414, 269
4183};
4184
4185/* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If
4186 positive, shift that token. If negative, reduce the rule whose
4187 number is the opposite. If YYTABLE_NINF, syntax error. */
4188static const yytype_int16 yytable[] =
4189{
4190 142, 334, 319, 335, 221, 237, 237, 661, 309, 412,
4191 236, 236, 315, 318, 456, 286, 293, 573, 73, 401,
4192 328, 646, 573, 654, 221, 408, 648, 675, 413, 225,
4193 226, 919, 915, 454, 483, 478, 223, 263, 334, 245,
4194 245, 309, 789, 917, 1034, 793, 971, 821, 791, 252,
4195 252, 292, 292, 297, 301, 221, 223, 355, 702, 711,
4196 309, 309, 309, 256, 767, 445, 792, 978, 324, 325,
4197 326, 587, 365, 1003, 701, 765, 587, 692, 295, 765,
4198 516, 308, 701, 734, 518, 796, 452, 775, 296, 300,
4199 1124, 1124, 1005, 781, 646, 1276, 654, 711, 916, 706,
4200 291, 702, 237, 327, 825, -146, -141, 236, 221, 1286,
4201 1143, 351, 924, 1251, 405, 405, 846, 949, 405, 243,
4202 254, 1376, 925, 658, 726, 870, 354, 1241, 352, 1386,
4203 -397, 138, 761, -142, 505, 1277, 245, 368, 746, 921,
4204 1207, 568, 1072, -704, 750, 926, 252, -149, -148, 143,
4205 726, 1289, -144, 737, 1158, 1167, 1302, 1305, -397, -397,
4206 1116, 1116, 259, -145, 350, 474, -146, 530, -147, -721,
4207 811, 268, -704, 569, 798, -143, -712, 466, -141, -713,
4208 537, 539, 138, 138, 265, 261, 312, 264, 792, 507,
4209 -113, 747, 344, 286, 1208, 502, 352, 751, -142, 1191,
4210 283, 1200, 397, 392, 393, 394, 1376, 1070, 1072, 1386,
4211 -141, -129, 611, -142, -397, 1124, 450, 362, 334, 312,
4212 508, 1242, 532, 533, 887, 1282, 342, 343, 528, 292,
4213 398, 399, 799, 1252, 1236, -137, -132, -832, 421, 431,
4214 431, 431, 358, 331, 471, 237, 1003, 237, 286, 332,
4215 236, 471, 236, 353, 485, 898, 1399, 309, 549, 550,
4216 551, 552, 1176, -133, 331, 142, -149, 478, 1124, 1059,
4217 332, 488, 490, 1070, 919, 1124, 1124, -140, -139, 482,
4218 868, 245, -135, 73, 292, 1116, 400, 658, 523, 1397,
4219 1289, 252, 726, -136, 1289, 859, 1400, 711, -138, 548,
4220 -833, -147, 702, 726, 351, -134, 869, -146, 984, 953,
4221 -832, 1296, 1298, -146, 256, 666, 309, 354, 701, -141,
4222 701, 353, 761, 910, 322, -141, 286, 255, 977, 1322,
4223 662, 801, -148, 291, 886, 292, 670, 351, 1073, -142,
4224 1333, 521, 1335, 259, 334, -142, 672, 476, 405, 405,
4225 405, 405, 73, 555, 556, 925, 499, 500, 1232, -144,
4226 138, 486, 292, 1207, 1400, 1142, 1142, 259, -147, 1233,
4227 940, 1080, -64, 663, 664, 1070, 1016, 980, 1070, 842,
4228 1070, -149, 1087, -712, 954, 849, 850, 985, -145, 613,
4229 237, -833, 959, 1047, 1017, 236, 138, 1207, 653, 485,
4230 1196, 745, 292, 745, 1073, 496, 1006, -149, 1124, 292,
4231 292, 291, 777, -149, 361, 138, 259, -141, 1008, 1010,
4232 405, 765, 1012, 702, 1014, 1062, 1015, 678, 331, 1057,
4233 778, 919, 915, 530, 332, 312, 405, 1080, -132, 701,
4234 -143, 237, -147, 1244, 655, -833, 236, -135, -147, 782,
4235 -713, -585, 653, 696, 513, 513, -64, 366, 259, 513,
4236 965, 519, 888, 237, 1017, 138, 138, 783, 236, 1411,
4237 854, 653, 485, -148, 458, 245, 889, 309, 761, -148,
4238 761, 471, 814, 471, -142, 252, 884, -148, 532, 533,
4239 1142, 221, 890, 138, 312, 587, -144, 691, 916, 653,
4240 -144, 587, 610, 703, 718, -133, -144, 615, 523, 1248,
4241 -145, 932, 460, 1301, 1304, 933, 896, 237, 459, 925,
4242 1187, 1188, 236, 223, 459, 653, 485, 702, 322, -145,
4243 1070, 790, 1070, 138, 1070, -145, 1070, -356, 509, 1247,
4244 138, 138, 1249, 1142, 577, 965, 732, 851, 1097, 577,
4245 1142, 1142, -149, 1269, 259, 687, -135, 260, -149, 1215,
4246 814, 814, 562, 803, 309, -356, -356, 646, 803, 654,
4247 59, 754, 1030, -140, 1058, 976, -135, -135, 979, 711,
4248 -135, -143, 563, 1177, 1178, 1180, 1181, -143, 786, 260,
4249 919, 786, 986, 848, 814, 523, 993, 503, 292, 693,
4250 694, 292, 701, 1425, 905, 462, 530, 538, 698, 905,
4251 467, 1384, 567, 568, 1216, 1070, 709, 710, 1217, 831,
4252 -703, -356, 843, 1198, 845, -833, 468, 839, -136, 1272,
4253 -143, -148, 1293, 1294, 807, 835, 496, 934, 138, 807,
4254 936, -137, 876, 879, 727, 569, 803, 803, 471, -703,
4255 761, 761, 1154, 840, 368, 312, 469, -705, 292, 237,
4256 292, 532, 533, 477, 236, 875, 916, 653, 485, -144,
4257 237, 925, -134, 1069, 884, 236, 894, 777, 653, 485,
4258 803, 292, 475, 1142, 138, 309, -705, 368, 830, 925,
4259 1054, 840, 221, 1055, 871, 1220, 1268, 902, 1381, 688,
4260 1060, 503, 471, 495, 1190, 881, 1064, 1388, 506, 1172,
4261 1174, 1274, 1392, 255, 1278, 451, 897, 331, 390, 391,
4262 392, 393, 394, 332, 223, 840, -112, 587, 712, 138,
4263 892, 714, 138, -706, 1297, -148, 717, -136, 587, 1069,
4264 947, 673, 312, 511, 836, 674, 1227, 891, 397, 904,
4265 -137, 906, 1332, 729, 907, 908, -139, -136, -136, -708,
4266 925, -136, -706, 1377, 309, 259, 1020, 830, 1021, -64,
4267 -137, -137, 989, -832, -137, 835, 398, 472, -145, 1078,
4268 956, -134, 397, 981, 1160, 983, 836, 1432, -708, 138,
4269 826, 138, 517, 587, 982, 523, 530, 841, 1112, 1112,
4270 397, -134, -134, 373, 374, -134, 520, 832, 344, -144,
4271 398, 501, 138, 525, -143, 540, 1295, -707, 814, 814,
4272 -145, 1360, 1361, 1362, 814, 814, 445, -709, 398, 526,
4273 -135, 771, 473, 1343, 1314, 1347, 598, 882, -700, 545,
4274 963, -136, 970, -710, 970, 1078, -707, 605, 1268, 535,
4275 1268, 532, 533, -711, 697, 1268, -709, 385, 386, 810,
4276 1268, 342, 343, 312, 292, 832, 473, -700, 891, 221,
4277 1192, -710, -710, 405, 397, 405, 1324, 1326, 1328, 1330,
4278 1331, -711, -711, 1401, 527, 964, 965, 1212, 1053, -701,
4279 471, 513, 684, 814, -719, 587, 832, 601, 587, 614,
4280 1036, 1038, 398, 453, 803, 803, 1042, 1044, 814, 1266,
4281 803, 803, 848, 673, 1063, 1000, 546, 1189, -701, 786,
4282 -349, 685, 667, 1112, 259, 512, 1268, -710, 1268, 1052,
4283 1268, 726, 1268, 671, 1365, 873, 237, -711, 397, 259,
4284 515, 236, 312, 929, 653, 485, 676, 1078, -349, -349,
4285 1078, 1268, 1078, 1413, 1415, 713, 1273, 1417, 1419, 1317,
4286 1049, 1422, -97, 721, 397, 292, 398, 668, 951, 952,
4287 715, 794, -357, 1192, 397, 797, 957, 958, 405, 803,
4288 716, 292, 722, 1192, 1192, 807, 397, 1213, 1214, 956,
4289 1144, 397, 398, 679, 803, 138, 1435, 1436, 1438, 1439,
4290 -357, -357, 398, 945, -349, -700, 1441, 912, 723, 1406,
4291 1407, 1409, 1410, 1396, 398, 1307, 731, 1398, 832, 398,
4292 1394, 1157, 669, -143, 1315, 1316, 991, 992, 832, 994,
4293 995, 259, 1403, -700, -700, -129, 1091, 1092, 524, 524,
4294 753, 1094, 1095, -98, -134, 1175, 733, 1148, 680, 1152,
4295 491, 1203, 999, 1100, 587, 762, -357, 292, 946, 1434,
4296 492, 493, 766, 1266, 1206, 530, 1164, 914, 1266, 1164,
4297 1308, 914, 1170, 563, 768, 680, -444, 779, 1170, 1170,
4298 774, 292, 780, 795, 1026, 812, -701, -97, 834, -700,
4299 1185, 1185, 530, -97, -836, 844, 138, 1041, 309, 1405,
4300 851, 854, 1078, 567, 1078, 911, 1078, 1290, 1078, 913,
4301 922, 368, 138, 930, -701, -701, 1229, 1230, 535, 987,
4302 532, 533, 1237, 1282, 931, 1285, 1283, 935, 381, 382,
4303 1311, 939, -329, 368, 1065, 1300, 1303, -836, 996, 942,
4304 998, 1309, 938, 1266, 941, 531, 1271, 532, 533, 292,
4305 381, 382, 292, 292, 138, 138, 970, 1002, 292, 334,
4306 950, 508, 530, 1141, 1141, -836, -836, 955, -98, 943,
4307 -701, 960, 1018, 1019, -98, 390, 391, 392, 393, 394,
4308 965, 1024, 292, 997, 1025, 292, 1027, 1078, 138, 832,
4309 1310, 778, 1007, 1009, 387, 388, 389, 390, 391, 392,
4310 393, 394, 530, 1011, 1013, 1321, 368, 337, 338, 339,
4311 340, 341, 138, -333, 1040, 535, 405, 532, 533, -836,
4312 309, -836, 530, 381, 382, -832, 292, 1083, 1084, 970,
4313 -331, 1141, 1141, 1356, 1146, 1141, 1371, 1372, 530, 1149,
4314 1162, 292, 1182, 1164, 1166, 1170, 1170, 1170, 1170, 1170,
4315 1202, 1209, 1141, 1168, 1164, 536, 1164, 532, 533, 1171,
4316 1338, 1173, 1179, 1210, 832, 1199, 1338, 1280, 1338, 389,
4317 390, 391, 392, 393, 394, 743, 1225, 532, 533, 1211,
4318 138, 1279, 1207, 138, 138, 1098, 1323, 1306, 1141, 138,
4319 1318, 748, 309, 532, 533, 1319, 1325, 557, 237, 558,
4320 559, 560, 561, 236, 1327, 1081, 653, 485, 1329, 963,
4321 1334, 1152, 1204, 138, 36, 37, 138, 39, 1378, 292,
4322 1238, 1141, 1389, 1336, 1141, 1341, 405, 405, 40, 41,
4323 42, 43, 1346, 1402, 1349, 1350, 1393, 298, 1141, 1353,
4324 1141, 1281, 1355, 1141, 1141, 101, 1408, 755, 1141, 1141,
4325 1412, 1414, 832, 547, 1416, 832, 1418, 138, 1423, 247,
4326 247, -832, 1205, 557, -833, 558, 559, 560, 561, 292,
4327 1437, 1081, 138, 336, 728, 832, 498, 1228, 1170, 1170,
4328 1170, 1170, 988, 1164, 730, 411, 1338, 1338, 805, 416,
4329 1338, 1338, 396, 1067, 1338, 433, 101, 101, 431, 719,
4330 310, 970, 874, 1051, 36, 37, 1061, 39, 1313, 1004,
4331 909, 247, 1340, 755, 45, 46, 1383, 1141, 756, 1259,
4332 1186, 1339, 1428, 990, 1238, 1391, 609, 1354, 1170, 1338,
4333 1338, 1338, 1338, 310, 1291, 1292, 1284, 1369, 1426, 1338,
4334 557, 1368, 558, 559, 560, 561, 562, 247, 247, 457,
4335 138, 247, 418, 429, 429, 749, 247, 446, 600, 1067,
4336 1161, 1424, 832, 832, 832, 1299, 563, 1240, 455, 0,
4337 431, 1240, 0, 1081, 0, 0, 1081, 0, 1081, 1141,
4338 564, 0, 0, 1141, 0, 1141, 0, 1270, 0, 557,
4339 565, 558, 559, 560, 561, 566, 567, 568, 0, 1373,
4340 138, 558, 559, 560, 561, 0, 0, 0, 0, 0,
4341 461, 0, 0, 463, 464, 465, 0, 0, 0, 0,
4342 0, 1348, 0, 0, 832, 0, 0, 0, 0, 569,
4343 0, 1352, 570, 1404, 557, 0, 558, 559, 560, 561,
4344 562, 0, 0, 0, 0, 1066, 0, 920, 1357, 1358,
4345 1359, 0, 0, 1141, 0, 0, 1199, 0, 0, 928,
4346 563, 1067, 0, 0, 1067, 0, 1067, 84, 0, 0,
4347 0, 0, 0, 0, 101, 1255, 0, 0, 878, 880,
4348 0, 84, 84, 0, 565, 0, 0, 0, 0, 566,
4349 567, 568, 0, 0, 878, 880, 0, 0, 0, 247,
4350 0, 247, 0, 0, 247, 247, 0, 0, 0, 0,
4351 101, 557, 895, 558, 559, 560, 561, 562, 84, 84,
4352 0, 0, 0, 569, 0, 0, 570, 0, 1081, 101,
4353 1081, 0, 1081, 84, 1081, 0, 0, 563, 0, 1240,
4354 0, 1270, 0, 0, 0, 0, 1270, 0, 0, 310,
4355 0, 1270, 0, 0, 0, 0, 0, 0, 0, 0,
4356 0, 565, 0, 0, 0, 0, 0, 567, 568, 84,
4357 84, 0, 0, 84, 0, 0, 0, 0, 84, 101,
4358 101, 247, 247, 247, 247, 0, 247, 247, 0, 0,
4359 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4360 569, 0, 0, 0, 0, 0, 0, 101, 310, 1110,
4361 1110, 0, 0, 1081, 0, 0, 1067, 1270, 1067, 1270,
4362 1067, 1270, 1067, 1270, 0, 0, 0, 0, 0, 1255,
4363 0, 0, 0, 0, 1255, 0, 0, 0, 0, 1255,
4364 0, 0, 1270, 0, 247, 0, 0, 101, 0, 0,
4365 699, 700, 0, 247, 101, 101, 0, 0, 0, 298,
4366 0, 0, 0, 0, 0, 0, 0, 895, 0, 247,
4367 0, 0, 0, 0, 0, 0, 0, 1110, 1110, 1079,
4368 0, 1110, 0, 0, 0, 0, 0, 0, 1085, 0,
4369 1086, 0, 1088, 0, 700, 247, 84, 298, 1110, 0,
4370 0, 1067, 0, 0, 0, 1255, 0, 1255, 0, 1255,
4371 0, 1255, 0, 0, 0, 0, 0, 247, 0, 0,
4372 0, 84, 0, 84, 0, 0, 84, 84, 0, 0,
4373 1255, 0, 84, 0, 1110, 0, 1037, 1039, 0, 0,
4374 0, 0, 1043, 1045, 0, 1079, 0, 0, 0, 0,
4375 0, 84, 101, 0, 0, 0, 0, 0, 0, 0,
4376 0, 0, 0, 0, 0, 0, 0, 1110, 0, 310,
4377 1110, 247, 776, 0, 0, 0, 1037, 1039, 0, 1043,
4378 1045, 0, 0, 0, 1110, 0, 1110, 0, 0, 1110,
4379 1110, 0, 806, 0, 1110, 1110, 0, 819, 101, 0,
4380 0, 84, 84, 84, 84, 84, 84, 0, 84, 84,
4381 0, 0, 0, 0, 0, 0, 0, 1133, 1133, 0,
4382 0, 0, 0, 0, 0, 0, 1145, 0, 0, 84,
4383 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4384 0, 0, 247, 101, 0, 247, 101, 1246, 0, 0,
4385 1145, 0, 1250, 0, 247, 0, 310, 0, 1254, 822,
4386 0, 1267, 0, 1110, 0, 0, 84, 0, 0, 84,
4387 0, 0, 0, 0, 0, 84, 84, 84, 557, 883,
4388 558, 559, 560, 561, 562, 1133, 1133, 0, 0, 1133,
4389 0, 84, 0, 0, 0, 700, 557, 298, 558, 559,
4390 560, 561, 562, 101, 563, 101, 1133, 0, 0, 0,
4391 0, 0, 0, 247, 0, 0, 0, 84, 564, 0,
4392 0, 0, 563, 0, 247, 1110, 101, 247, 565, 1110,
4393 0, 1110, 0, 566, 567, 568, 564, 822, 822, 84,
4394 0, 0, 1133, 0, 0, 0, 565, 0, 0, 0,
4395 0, 0, 567, 568, 0, 923, 0, 0, 0, 0,
4396 0, 0, 0, 247, 0, 0, 0, 569, 0, 0,
4397 570, 822, 0, 0, 84, 1133, 0, 310, 1133, 0,
4398 0, 0, 0, 0, 937, 569, 0, 0, 0, 0,
4399 0, 0, 1133, 84, 1133, 0, 0, 1133, 1133, 1110,
4400 0, 0, 1133, 1133, 1379, 0, 1380, 0, 1382, 0,
4401 0, 0, 0, 0, 0, 1387, 700, 0, 0, 0,
4402 84, 0, 0, 0, 0, 1395, 0, 0, 0, 0,
4403 0, 0, 0, 0, 974, 0, 0, 0, 0, 0,
4404 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4405 0, 0, 0, 0, 0, 0, 310, 0, 0, 0,
4406 0, 0, 0, 0, 84, 84, 0, 84, 84, 0,
4407 0, 1133, 0, 0, 0, 0, 84, 0, 0, 0,
4408 0, 84, 0, 0, 0, 0, 0, 1429, 0, 0,
4409 0, 0, 0, 1430, 0, 1431, 0, 1433, 0, 0,
4410 0, 0, 0, 0, 0, 0, 247, 0, 247, 101,
4411 0, 0, 0, 0, 0, 0, 1440, 112, 0, 0,
4412 1023, 0, 0, 0, 0, 84, 0, 84, 0, 0,
4413 0, 112, 112, 1133, 0, 84, 0, 1133, 0, 1133,
4414 0, 0, 0, 1046, 0, 0, 84, 0, 84, 84,
4415 0, 0, 0, 0, 0, 1056, 0, 0, 0, 84,
4416 84, 0, 0, 0, 0, 0, 0, 0, 112, 112,
4417 0, 0, 0, 247, 0, 0, 0, 0, 0, 298,
4418 0, 0, 0, 112, 0, 84, 0, 0, 0, 0,
4419 247, 0, 0, 84, 0, 822, 822, 0, 0, 0,
4420 0, 822, 822, 0, 1093, 0, 0, 1133, 0, 0,
4421 101, 247, 0, 0, 0, 0, 0, 0, 0, 112,
4422 112, 0, 0, 112, 0, 0, 101, 0, 112, 22,
4423 23, 24, 25, 0, 0, 0, 0, 0, 0, 1156,
4424 0, 0, 0, 0, 0, 31, 32, 33, 1098, 0,
4425 0, 0, 1099, 0, 0, 40, 41, 42, 43, 44,
4426 0, 0, 0, 0, 0, 0, 0, 0, 101, 101,
4427 822, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4428 0, 0, 0, 0, 0, 822, 0, 1101, 1102, 1134,
4429 1134, 0, 0, 0, 0, 1103, 0, 0, 1104, 0,
4430 1105, 1106, 101, 1107, 0, 0, 57, 58, 59, 60,
4431 61, 62, 63, 64, 65, 0, 0, 0, 0, 1135,
4432 1135, 0, 0, 0, 0, 0, 101, 0, 84, 0,
4433 84, 84, 0, 0, 0, 0, 1109, 1231, 0, 0,
4434 0, 0, 0, 304, 0, 0, 112, 0, 0, 0,
4435 259, 0, 0, 1136, 1136, 0, 0, 1134, 1134, 0,
4436 0, 1134, 0, 0, 0, 0, 0, 0, 0, 0,
4437 0, 112, 0, 112, 0, 0, 112, 112, 1134, 0,
4438 0, 0, 112, 0, 0, 0, 0, 1135, 1135, 0,
4439 1223, 1135, 0, 0, 101, 84, 0, 101, 101, 0,
4440 0, 112, 0, 101, 0, 0, 0, 0, 1135, 0,
4441 0, 0, 84, 0, 1134, 0, 0, 84, 84, 0,
4442 0, 1136, 1136, 84, 84, 1136, 0, 101, 0, 0,
4443 101, 0, 84, 84, 0, 0, 0, 0, 0, 0,
4444 0, 0, 1136, 0, 1135, 0, 0, 1134, 84, 247,
4445 1134, 112, 112, 112, 112, 112, 112, 0, 112, 112,
4446 0, 0, 0, 0, 1134, 0, 1134, 0, 0, 1134,
4447 1134, 101, 0, 0, 1134, 1134, 0, 1135, 1136, 112,
4448 1135, 0, 0, 0, 0, 0, 101, 0, 0, 0,
4449 84, 84, 84, 0, 1135, 0, 1135, 0, 0, 1135,
4450 1135, 0, 0, 0, 1135, 1135, 0, 84, 0, 0,
4451 0, 1136, 1345, 0, 1136, 0, 112, 0, 0, 112,
4452 0, 0, 0, 0, 84, 112, 112, 112, 1136, 0,
4453 1136, 0, 0, 1136, 1136, 0, 0, 0, 1136, 1136,
4454 0, 112, 0, 1134, 0, 0, 0, 0, 84, 0,
4455 0, 0, 247, 0, 0, 0, 0, 0, 0, 247,
4456 247, 0, 0, 0, 101, 0, 0, 112, 0, 0,
4457 0, 0, 0, 1135, 0, 0, 0, 0, 0, 0,
4458 0, 0, 0, 0, 1390, 0, 0, 1137, 1137, 112,
4459 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4460 0, 0, 0, 0, 0, 1134, 0, 1136, 0, 1134,
4461 0, 1134, 0, 0, 101, 0, 84, 0, 0, 84,
4462 84, 0, 0, 0, 112, 84, 0, 0, 0, 0,
4463 113, 1138, 1138, 0, 0, 1135, 0, 0, 0, 1135,
4464 0, 1135, 0, 112, 113, 113, 0, 0, 0, 84,
4465 0, 0, 84, 0, 0, 1137, 1137, 0, 0, 1137,
4466 0, 0, 0, 0, 0, 0, 0, 0, 0, 1136,
4467 112, 84, 0, 1136, 0, 1136, 1137, 0, 0, 1134,
4468 0, 113, 113, 0, 0, 0, 0, 0, 0, 1139,
4469 1139, 0, 0, 84, 0, 0, 113, 0, 0, 1138,
4470 1138, 0, 0, 1138, 0, 0, 0, 0, 84, 1135,
4471 0, 0, 1137, 0, 112, 112, 0, 112, 112, 0,
4472 1138, 0, 0, 0, 0, 0, 112, 0, 0, 0,
4473 0, 112, 113, 113, 0, 0, 113, 0, 0, 0,
4474 0, 113, 0, 1136, 0, 1137, 0, 0, 1137, 0,
4475 0, 0, 0, 0, 0, 0, 1138, 1139, 1139, 0,
4476 0, 1139, 1137, 0, 1137, 0, 0, 1137, 1137, 0,
4477 0, 0, 1137, 1137, 84, 112, 0, 112, 1139, 0,
4478 0, 84, 84, 0, 0, 112, 84, 0, 0, 1138,
4479 0, 0, 1138, 0, 0, 0, 112, 0, 112, 112,
4480 0, 0, 0, 0, 0, 0, 1138, 0, 1138, 112,
4481 112, 1138, 1138, 0, 1139, 0, 1138, 1138, 0, 0,
4482 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4483 0, 0, 0, 1140, 1140, 112, 84, 0, 0, 0,
4484 0, 1137, 0, 112, 0, 0, 0, 1139, 0, 0,
4485 1139, 0, 0, 0, 0, 0, 0, 0, 0, 113,
4486 0, 0, 0, 0, 1139, 0, 1139, 0, 0, 1139,
4487 1139, 0, 0, 0, 1139, 1139, 0, 0, 0, 0,
4488 0, 0, 0, 0, 113, 1138, 113, 0, 0, 113,
4489 113, 0, 0, 0, 0, 113, 0, 0, 0, 0,
4490 0, 1140, 1140, 1137, 0, 1140, 0, 1137, 0, 1137,
4491 0, 0, 0, 0, 113, 0, 0, 0, 0, 0,
4492 0, 0, 1140, 0, 0, 0, 0, 0, 0, 0,
4493 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4494 0, 0, 0, 1139, 0, 0, 0, 1138, 0, 0,
4495 0, 1138, 0, 1138, 0, 0, 0, 0, 1140, 0,
4496 0, 0, 0, 0, 113, 113, 113, 113, 113, 113,
4497 0, 113, 113, 0, 0, 0, 0, 1137, 112, 0,
4498 112, 112, 0, 0, 0, 0, 0, 0, 0, 0,
4499 0, 1140, 113, 0, 1140, 0, 0, 0, 0, 0,
4500 0, 0, 0, 0, 0, 1139, 0, 0, 1140, 1139,
4501 1140, 1139, 0, 1140, 1140, 0, 0, 0, 1140, 1140,
4502 80, 1138, 0, 0, 0, 0, 0, 0, 0, 113,
4503 0, 0, 113, 0, 80, 80, 0, 0, 113, 113,
4504 113, 0, 0, 0, 0, 112, 0, 0, 0, 0,
4505 0, 0, 0, 0, 113, 0, 0, 0, 0, 0,
4506 0, 0, 112, 0, 0, 0, 0, 112, 112, 0,
4507 0, 80, 80, 112, 112, 306, 0, 0, 0, 1139,
4508 113, 0, 112, 112, 0, 0, 0, 1140, 22, 23,
4509 24, 25, 0, 0, 0, 0, 0, 0, 112, 0,
4510 0, 0, 113, 0, 31, 32, 33, 0, 306, 0,
4511 0, 0, 0, 0, 40, 41, 42, 43, 44, 0,
4512 0, 0, 0, 0, 0, 0, 0, 306, 306, 306,
4513 0, 80, 0, 0, 0, 0, 0, 113, 0, 0,
4514 112, 112, 112, 0, 0, 0, 0, 0, 0, 1140,
4515 0, 0, 0, 1140, 0, 1140, 113, 112, 0, 0,
4516 0, 0, 0, 0, 0, 57, 58, 59, 60, 61,
4517 62, 63, 64, 65, 112, 0, 0, 0, 0, 0,
4518 0, 0, 0, 113, 0, 0, 0, 0, 0, 0,
4519 0, 368, -855, -855, -855, -855, 373, 374, 112, 0,
4520 -855, -855, 304, 0, 0, 0, 0, 0, 381, 382,
4521 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4522 0, 0, 0, 1140, 0, 0, 0, 113, 113, 0,
4523 113, 113, 0, 0, 0, 0, 0, 0, 0, 113,
4524 0, 0, 0, 0, 113, 0, 0, 0, 0, 80,
4525 385, 386, 387, 388, 389, 390, 391, 392, 393, 394,
4526 0, 0, 0, 0, 0, 0, 112, 0, 0, 112,
4527 112, 0, 0, 0, 80, 112, 80, 0, 0, 0,
4528 0, 0, 0, 0, 0, 80, 0, 0, 113, 0,
4529 113, 0, 0, 0, 0, 0, 0, 0, 113, 112,
4530 0, 0, 112, 0, 80, 0, 0, 0, 0, 113,
4531 0, 113, 113, 0, 0, 0, 0, 0, 0, 0,
4532 0, 112, 113, 113, 306, 0, 0, 0, 0, 0,
4533 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4534 0, 0, 0, 112, 0, 0, 0, 0, 113, 0,
4535 0, 0, 0, 0, 80, 80, 113, 0, 112, -854,
4536 0, 0, 0, 0, 0, 0, 0, -854, -854, -854,
4537 0, 0, -854, -854, -854, 0, -854, 0, 0, 0,
4538 0, 0, 80, 306, -854, -854, -854, 0, 0, 0,
4539 0, 0, 0, 81, 0, 0, -854, -854, 0, -854,
4540 -854, -854, -854, -854, 0, 0, 0, 81, 81, 0,
4541 0, 0, 0, 0, 0, 0, 0, 0, 0, 80,
4542 0, 0, 80, 0, 112, 0, 0, -854, -854, 80,
4543 80, 112, 112, 0, 0, 0, 112, 0, 0, 0,
4544 0, 0, 0, 0, 81, 81, 0, 0, 307, 0,
4545 0, 0, 0, 0, 0, 0, -854, -854, 0, 0,
4546 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4547 80, 0, 0, 0, 0, 0, 0, 0, 0, -854,
4548 0, 307, 0, 0, 0, 0, 112, 0, 0, 0,
4549 0, 113, 80, 113, 113, 0, 0, 0, 0, 0,
4550 307, 307, 307, 0, 81, 0, 0, 0, 0, 0,
4551 -854, -854, 0, -854, 0, 0, 255, -854, 0, -854,
4552 0, 0, 0, 0, 0, 0, 0, 80, 0, 0,
4553 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4554 0, 0, 0, 0, 306, 0, 80, 0, 0, 0,
4555 0, 0, 0, 0, 0, 0, 0, 0, 113, 0,
4556 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4557 0, 0, 0, 80, 0, 113, 0, 0, 0, 0,
4558 113, 113, 0, 0, 0, 0, 113, 113, 0, 0,
4559 0, 0, 0, 0, 0, 113, 113, 0, 0, 0,
4560 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4561 0, 113, 0, 0, 0, 0, 0, 0, 80, 0,
4562 0, 80, 81, 0, 0, 0, 0, 0, 0, 0,
4563 0, 306, 0, 0, 80, 0, 0, 0, 0, 0,
4564 0, 0, 0, 0, 0, 0, 0, 81, 0, 81,
4565 0, 0, 0, 113, 113, 113, 0, 0, 81, 0,
4566 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4567 113, 0, 0, 0, 0, 0, 0, 81, 80, 0,
4568 80, 0, 0, 0, 0, 0, 0, 113, 80, 0,
4569 0, 0, 0, 0, 0, 0, 0, 307, 0, 80,
4570 0, 80, 141, 0, 0, 0, 0, 0, 0, 0,
4571 0, 113, 80, 80, 0, 0, 0, 0, 0, 0,
4572 0, 0, 0, 0, 0, 944, 0, 81, 81, 0,
4573 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4574 0, 0, 0, 0, 0, 0, 80, 0, 0, 0,
4575 0, 0, 306, 141, 141, 81, 307, 313, 0, 368,
4576 369, 370, 371, 372, 373, 374, 375, 376, 377, 378,
4577 379, 380, 0, 0, 0, 0, 381, 382, 0, 113,
4578 0, 0, 113, 113, 0, 0, 0, 0, 113, 0,
4579 313, 0, 81, 0, 0, 81, 0, 0, 0, 0,
4580 0, 0, 81, 81, 0, 0, 0, 0, 0, 422,
4581 432, 432, 113, 0, 0, 113, 384, 0, 385, 386,
4582 387, 388, 389, 390, 391, 392, 393, 394, 0, 0,
4583 0, 306, 0, 0, 113, 0, -298, 0, 0, 0,
4584 0, 0, 0, 81, 368, 369, 370, 371, 372, 373,
4585 374, 375, 0, 377, 378, 0, 113, 0, 0, 0,
4586 0, 381, 382, 0, 0, 81, 0, 0, 0, 0,
4587 0, 113, 0, 0, 0, 0, 0, 0, 0, 0,
4588 0, 0, 0, 0, 80, 0, 0, 0, 0, 0,
4589 0, 0, 0, 0, 0, 0, 0, 0, 367, 0,
4590 81, 0, 0, 385, 386, 387, 388, 389, 390, 391,
4591 392, 393, 394, 0, 0, 0, 0, 307, 0, 81,
4592 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4593 0, 141, 137, 0, 0, 0, 0, 113, 0, 0,
4594 0, 0, 0, 0, 113, 113, 81, 0, 0, 113,
4595 0, 368, 369, 370, 371, 372, 373, 374, 375, 376,
4596 377, 378, 379, 380, 0, 80, 0, 141, 381, 382,
4597 80, 80, 0, 0, 383, 0, 80, 80, 0, 0,
4598 0, 0, 0, 137, 137, 80, 141, 311, 0, 0,
4599 0, 81, 0, 0, 81, 0, 0, 0, 0, 113,
4600 0, 80, 0, 0, 307, 0, 313, 81, 384, 0,
4601 385, 386, 387, 388, 389, 390, 391, 392, 393, 394,
4602 311, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4603 0, 0, 0, 0, 0, 0, 141, 141, 0, 420,
4604 430, 430, 430, 80, 80, 80, 0, 0, 0, 0,
4605 0, 81, 0, 81, 944, 0, 0, 0, 0, 0,
4606 80, 81, 0, 0, 141, 313, 0, 0, 0, 0,
4607 0, 0, 81, 0, 81, 0, 0, 80, 0, 0,
4608 91, 0, 0, 0, 0, 81, 81, 0, 368, 369,
4609 370, 371, 372, 373, 374, 375, 376, 377, 378, 379,
4610 380, 80, 0, 0, 141, 381, 382, 0, 0, 0,
4611 0, 141, 141, 0, 0, 0, 0, 0, 0, 81,
4612 0, 0, 0, 0, 0, 307, 0, 0, 0, 0,
4613 0, 91, 91, 0, 0, 0, 0, 0, 0, 0,
4614 0, 0, 0, 0, 0, 384, 0, 385, 386, 387,
4615 388, 389, 390, 391, 392, 393, 394, 0, 0, 0,
4616 0, 137, 0, 0, 0, 306, 0, 0, 0, 80,
4617 0, 0, 80, 80, 0, 0, 0, 0, 80, 0,
4618 0, 0, 0, 0, 0, 0, 0, 417, 0, 0,
4619 0, 0, 0, 0, 0, 0, 0, 137, 0, 0,
4620 0, 0, 80, 0, 307, 80, 0, 0, 0, 141,
4621 0, 0, 0, 0, 0, 0, 137, 0, 0, 0,
4622 0, 0, 0, 0, 0, 0, 313, 0, 0, 0,
4623 0, 0, 0, 0, 0, 0, 311, 0, 0, 0,
4624 0, 0, 0, 0, 0, 0, 80, 0, 0, 0,
4625 0, 0, 0, 0, 0, 141, 0, 81, 0, 0,
4626 0, 80, 0, 0, 0, 0, 137, 137, 0, 0,
4627 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4628 0, 0, 0, 0, 0, 0, 0, 306, 0, 0,
4629 0, 0, 0, 0, 137, 311, 0, 0, 0, 0,
4630 141, 0, 0, 141, 0, 0, 0, 0, 0, 91,
4631 0, 0, 0, 313, 0, 0, 823, 0, 0, 0,
4632 0, 0, 0, 0, 0, 0, 0, 80, 0, 0,
4633 0, 0, 0, 0, 137, 0, 0, 0, 81, 80,
4634 0, 137, 137, 81, 81, 91, 0, 0, 0, 81,
4635 81, 0, 0, 0, 0, 0, 0, 0, 81, 306,
4636 141, 0, 141, 0, 91, 0, 0, 0, 0, 0,
4637 0, 0, 0, 0, 81, 0, 0, 0, 0, 0,
4638 0, 0, 0, 141, 0, 0, 0, 0, 0, 80,
4639 0, 0, 0, 0, 823, 823, 0, 0, 0, 0,
4640 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4641 0, 0, 0, 0, 91, 91, 81, 81, 81, 0,
4642 0, 0, 0, 0, 0, 0, 0, 0, 823, 0,
4643 0, 0, 0, 81, 313, 0, 0, 0, 0, 137,
4644 0, 0, 91, 903, 0, 0, 0, 0, 0, 0,
4645 81, 0, 0, 0, 0, 140, 311, 0, 0, 0,
4646 0, 0, 0, 0, 0, 0, 0, 689, 651, 0,
4647 0, 690, 0, 0, 81, 0, 0, 0, 0, 0,
4648 0, 0, 91, 0, 0, 137, 0, 0, 0, 91,
4649 91, 188, 189, 190, 191, 192, 193, 194, 195, 196,
4650 0, 0, 197, 198, 0, 0, 140, 140, 199, 200,
4651 201, 202, 0, 313, 0, 0, 0, 0, 0, 0,
4652 0, 0, 203, 204, 0, 0, 0, 0, 0, 0,
4653 137, 0, 0, 137, 0, 0, 0, 0, 307, 0,
4654 0, 0, 81, 311, 0, 81, 81, 0, 0, 0,
4655 0, 81, 205, 206, 207, 208, 209, 210, 211, 212,
4656 213, 214, 0, 215, 216, 0, 141, 0, 0, 0,
4657 0, 217, 255, 0, 0, 81, 0, 0, 81, 368,
4658 369, 370, 371, 372, 373, 374, 0, 91, 377, 378,
4659 137, 0, 137, 0, 0, 0, 381, 382, 0, 0,
4660 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4661 0, 0, 0, 137, 0, 0, 0, 0, 0, 81,
4662 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4663 0, 0, 0, 91, 81, 0, 0, 0, 385, 386,
4664 387, 388, 389, 390, 391, 392, 393, 394, 0, 0,
4665 0, 0, 823, 823, 0, 0, 0, 0, 823, 823,
4666 307, 0, 0, 0, 311, 0, 0, 141, 0, 0,
4667 0, 0, 0, 0, 0, 0, 0, 0, 91, 0,
4668 0, 91, 0, 141, 140, 0, 0, 0, 0, 0,
4669 0, 0, 0, 0, 817, 0, 0, 0, 0, 0,
4670 81, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4671 0, 0, 81, 0, 0, 0, 0, 0, 0, 0,
4672 140, 0, 0, 0, 0, 141, 141, 823, 0, 0,
4673 0, 0, 307, 0, 0, 0, 0, 0, 91, 140,
4674 91, 0, 823, 311, 0, 0, 0, 0, 0, 0,
4675 0, 0, 22, 23, 24, 25, 0, 0, 0, 141,
4676 0, 91, 81, 0, 0, 0, 0, 0, 31, 32,
4677 33, 1098, 817, 817, 0, 1099, 0, 1100, 40, 41,
4678 42, 43, 44, 141, 0, 0, 0, 0, 0, 140,
4679 140, 0, 0, 0, 0, 0, 137, 563, 0, 0,
4680 0, 0, 0, 0, 0, 0, 817, 0, 0, 0,
4681 1101, 1102, 0, 0, 0, 0, 0, 140, 1103, 0,
4682 0, 1104, 0, 1105, 1106, 0, 1107, 567, 0, 57,
4683 58, 1108, 60, 61, 62, 63, 64, 65, 0, 0,
4684 0, 0, 0, 0, 0, 0, 0, 1226, 0, 0,
4685 0, 141, 0, 0, 141, 141, 0, 140, 0, 1109,
4686 141, 0, 0, 0, 140, 140, 304, 0, 0, 0,
4687 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4688 0, 0, 0, 0, 141, 0, 0, 141, 0, 0,
4689 642, 643, 0, 0, 644, 0, 0, 137, 0, 0,
4690 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4691 0, 0, 0, 137, 188, 189, 190, 191, 192, 193,
4692 194, 195, 196, 0, 0, 197, 198, 0, 141, 0,
4693 0, 199, 200, 201, 202, 0, 0, 0, 0, 0,
4694 0, 0, 0, 141, 91, 203, 204, 0, 0, 0,
4695 0, 0, 0, 0, 0, 137, 137, 0, 0, 0,
4696 0, 0, 140, 0, 0, 0, 0, 0, 0, 432,
4697 0, 239, 239, 0, 0, 205, 206, 207, 208, 209,
4698 210, 211, 212, 213, 214, 0, 215, 216, 0, 137,
4699 0, 0, 0, 0, 217, 0, 0, 0, 0, 0,
4700 0, 0, 0, 276, 280, 281, 282, 0, 140, 0,
4701 239, 239, 0, 137, 0, 0, 0, 0, 0, 0,
4702 0, 141, 0, 329, 330, 0, 0, 0, 0, 0,
4703 817, 817, 0, 0, 0, 0, 817, 817, 0, 0,
4704 0, 432, 0, 0, 0, 91, 0, 0, 0, 0,
4705 0, 0, 0, 140, 0, 0, 140, 0, 0, 0,
4706 0, 91, 0, 0, 0, 0, 0, 0, 239, 140,
4707 0, 141, 0, 0, 0, 0, 0, 1224, 0, 0,
4708 0, 137, 0, 0, 137, 137, 0, 0, 0, 0,
4709 137, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4710 0, 0, 0, 91, 91, 817, 0, 0, 0, 0,
4711 0, 0, 0, 140, 137, 140, 0, 137, 0, 0,
4712 817, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4713 0, 0, 0, 0, 0, 0, 140, 91, 0, 0,
4714 0, 0, 0, 0, 0, 0, 0, 140, 140, 0,
4715 0, 0, 0, 0, 0, 0, 0, 0, 137, 0,
4716 0, 91, 0, 0, 0, 0, 0, 0, 0, 0,
4717 0, 0, 0, 137, 0, 0, 0, 0, 0, 0,
4718 0, 140, 0, 0, 239, 0, 0, 239, 239, 239,
4719 0, 329, 0, 0, 0, 0, 0, 0, 0, 430,
4720 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4721 0, 239, 0, 239, 0, 0, 0, 0, 0, 0,
4722 0, 0, 0, 0, 0, 1222, 0, 0, 0, 91,
4723 0, 0, 91, 91, 0, 0, 0, 0, 91, 0,
4724 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4725 0, 137, 0, 0, 0, 0, 0, 0, 0, 0,
4726 0, 0, 91, 0, 0, 91, 0, 0, 0, 0,
4727 0, 430, 0, 0, 0, 0, 0, 0, 0, 0,
4728 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4729 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4730 0, 137, 0, 0, 0, 0, 91, 0, 0, 0,
4731 0, 0, 0, 0, 0, 0, 0, 0, 0, 140,
4732 0, 91, 0, 0, 617, 618, 619, 620, 621, 0,
4733 0, 622, 623, 624, 625, 626, 627, 628, 629, 0,
4734 631, 0, 0, 632, 633, 634, 635, 636, 637, 638,
4735 639, 640, 641, 0, 650, 651, 239, 0, 652, 0,
4736 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4737 0, 0, 0, 0, 0, 0, 0, 0, 188, 189,
4738 190, 191, 192, 193, 194, 195, 196, 0, 0, 197,
4739 198, 0, 0, 0, 0, 199, 200, 201, 202, 91,
4740 0, 0, 0, 0, 0, 140, 140, 239, 0, 203,
4741 204, 140, 140, 0, 0, 0, 0, 0, 0, 0,
4742 140, 0, 0, 0, 239, 239, 0, 0, 0, 239,
4743 0, 0, 0, 239, 0, 282, 140, 0, 0, 205,
4744 206, 207, 208, 209, 210, 211, 212, 213, 214, 91,
4745 215, 216, 0, 720, 0, 0, 0, 0, 217, 0,
4746 0, 0, 0, 0, 0, 0, 0, 0, 239, 0,
4747 0, 239, 0, 0, 0, 0, 0, 0, 140, 140,
4748 140, 0, 0, 239, 0, 0, 0, 0, 0, 0,
4749 0, 0, 0, 0, 0, 140, 0, 0, 0, 0,
4750 0, 752, 0, 22, 23, 24, 25, 0, 0, 0,
4751 0, 0, 140, 0, 0, 0, 0, 0, 0, 31,
4752 32, 33, 1098, 0, 0, 0, 1099, 0, 0, 40,
4753 41, 42, 43, 44, 0, 0, 140, 0, 0, 0,
4754 0, 0, 0, 0, 0, 0, 239, 0, 0, 0,
4755 0, 0, 0, 0, 787, 0, 0, 787, 0, 0,
4756 0, 1101, 1102, 0, 0, 0, 239, 0, 0, 1103,
4757 0, 818, 1104, 0, 1105, 1106, 0, 1107, 0, 0,
4758 57, 58, 59, 60, 61, 62, 63, 64, 65, 0,
4759 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4760 0, 0, 0, 0, 140, 0, 0, 140, 140, 0,
4761 1109, 0, 0, 140, 0, 0, 0, 304, 0, 0,
4762 0, 0, 0, 0, 0, 239, 0, 0, 0, 0,
4763 0, 0, 0, 0, 0, 0, 239, 140, 0, 0,
4764 140, 0, 0, 0, 0, 0, 0, 0, 0, 877,
4765 877, 0, 0, 239, 877, 0, 0, 0, 0, 0,
4766 0, 0, 0, 0, 0, 877, 877, 0, 0, 239,
4767 0, 239, 0, 0, 0, 0, 0, 0, 787, 787,
4768 0, 140, 0, 877, 0, 0, 0, 0, 0, 0,
4769 0, 0, 0, 0, 0, 0, 140, 0, 0, 0,
4770 -4, 3, 0, 4, 5, 6, 7, 8, -4, -4,
4771 -4, 9, 10, 0, -4, -4, 11, -4, 12, 13,
4772 14, 15, 16, 17, 18, -4, 0, 0, 0, 239,
4773 19, 20, 21, 22, 23, 24, 25, 0, 0, 26,
4774 0, 0, 0, 0, 0, 27, 28, 284, 30, 31,
4775 32, 33, 34, 35, 36, 37, 38, 39, 239, 40,
4776 41, 42, 43, 44, 45, 46, 0, 0, -4, 0,
4777 0, 0, 0, 0, 140, 0, 47, 48, 0, 0,
4778 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4779 239, 49, 50, 0, 0, 0, 0, 0, 0, 51,
4780 0, 0, 52, 53, 54, 55, 0, 56, 239, 0,
4781 57, 58, 59, 60, 61, 62, 63, 64, 65, 0,
4782 -4, 0, 0, 0, 140, 0, 0, 0, 0, 0,
4783 0, 0, 0, 0, 0, 0, 0, 0, 877, 0,
4784 0, 0, 0, 0, 0, 0, 0, 66, 67, 68,
4785 0, 0, -4, 22, 23, 24, 25, 0, -4, 0,
4786 546, 0, 0, 0, 0, 0, 0, 0, 0, 31,
4787 32, 33, 1098, 0, 0, 0, 1099, 0, 0, 40,
4788 41, 42, 43, 44, 0, 787, 0, 0, 0, 0,
4789 0, 0, 0, 0, 239, 0, 0, 0, 0, 0,
4790 0, 0, 239, 0, 0, 0, 1035, 877, 877, 0,
4791 0, 1101, 1102, 877, 877, 0, 0, 239, 0, 1103,
4792 0, 0, 1104, 0, 1105, 1106, 0, 0, 0, 239,
4793 57, 58, 59, 60, 61, 62, 63, 64, 65, 0,
4794 0, 0, 0, 0, 0, 0, 0, 877, 877, 0,
4795 877, 877, 0, 239, 0, 787, 0, 0, 0, 0,
4796 1109, 0, 0, 0, 0, 0, 0, 304, 0, 0,
4797 0, 0, 0, 0, 1089, 1090, 0, 0, 239, 0,
4798 0, 0, 877, 1096, -854, 3, 0, 4, 5, 6,
4799 7, 8, 0, 0, 0, 9, 10, 877, 0, 0,
4800 11, 0, 12, 13, 14, 15, 16, 17, 18, 0,
4801 0, 0, 0, 239, 19, 20, 21, 22, 23, 24,
4802 25, 877, 0, 26, 0, 0, 0, 0, 0, 27,
4803 28, 284, 30, 31, 32, 33, 34, 35, 36, 37,
4804 38, 39, 0, 40, 41, 42, 43, 44, 45, 46,
4805 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4806 47, 48, 0, 0, 0, 0, 0, 0, 0, 0,
4807 0, 0, 0, 0, 0, 49, 50, 0, 0, 0,
4808 0, 0, 0, 51, 0, 0, 52, 53, 54, 55,
4809 0, 56, 0, 0, 57, 58, 59, 60, 61, 62,
4810 63, 64, 65, 0, -854, 0, 0, 0, 0, 0,
4811 0, 239, 0, 0, 0, 0, 0, 0, 0, 0,
4812 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4813 0, 66, 67, 68, 0, 0, -854, 3, -854, 4,
4814 5, 6, 7, 8, -854, 0, 0, 9, 10, 0,
4815 0, 0, 11, 0, 12, 13, 14, 15, 16, 17,
4816 18, 0, 0, 0, 0, 0, 19, 20, 21, 22,
4817 23, 24, 25, 0, 0, 26, 0, 0, 0, 0,
4818 0, 27, 28, 29, 30, 31, 32, 33, 34, 35,
4819 36, 37, 38, 39, 0, 40, 41, 42, 43, 44,
4820 45, 46, 0, 0, 0, 0, 0, 0, 0, 0,
4821 0, 0, 47, 48, 0, 0, 0, 0, 0, 0,
4822 0, 0, 0, 0, 0, 0, 0, 49, 50, 0,
4823 0, 0, 0, 0, 0, 51, 0, 0, 52, 53,
4824 54, 55, 0, 56, 0, 0, 57, 58, 59, 60,
4825 61, 62, 63, 64, 65, 0, 0, 0, 0, 0,
4826 0, 0, 0, 0, 239, 0, 0, 0, 0, 0,
4827 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4828 0, 0, 0, 66, 67, 68, 0, 0, -4, 3,
4829 -854, 4, 5, 6, 7, 8, -854, 0, 0, 9,
4830 10, 0, 0, 0, 11, 0, 12, 13, 14, 15,
4831 16, 17, 18, 0, 0, 0, 0, 0, 19, 20,
4832 21, 22, 23, 24, 25, 0, 0, 26, 0, 0,
4833 0, 0, 0, 27, 28, 29, 30, 31, 32, 33,
4834 34, 35, 36, 37, 38, 39, 0, 40, 41, 42,
4835 43, 44, 45, 46, 0, 0, 0, 0, 0, 0,
4836 0, 0, 0, 0, 47, 48, 0, 0, 0, 0,
4837 0, 0, 0, 0, 0, 0, 0, 0, 0, 49,
4838 50, 0, 0, 0, 0, 0, 0, 51, 0, 0,
4839 52, 53, 54, 55, 0, 56, 0, 0, 57, 58,
4840 59, 60, 61, 62, 63, 64, 65, 0, 0, 0,
4841 0, 0, 0, 0, 0, 0, -836, 0, 0, 0,
4842 0, 0, 0, 0, -836, -836, -836, 0, 0, -836,
4843 -836, -836, 0, -836, 0, 66, 67, 68, 0, 0,
4844 -4, -836, -836, -836, -836, -836, 0, 0, 546, 0,
4845 0, 0, 0, -836, -836, 0, -836, -836, -836, -836,
4846 -836, 0, 0, 0, 368, 369, 370, 371, 372, 373,
4847 374, 375, 376, 377, 378, 379, 380, 0, 0, 0,
4848 0, 381, 382, 0, -836, -836, 0, 0, 0, 0,
4849 0, 0, 0, 0, -836, -836, -836, -836, -836, -836,
4850 -836, -836, -836, -836, -836, -836, -836, 0, 0, 0,
4851 0, -836, -836, -836, -836, 0, 885, -836, 0, 0,
4852 0, 384, -836, 385, 386, 387, 388, 389, 390, 391,
4853 392, 393, 394, 0, 0, 0, -836, 0, 0, -836,
4854 259, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4855 -146, -836, -836, -836, -836, -836, -836, -836, -836, -836,
4856 -836, -836, -836, 0, 0, 0, 0, -836, -836, -836,
4857 -836, -836, -700, 0, -836, -836, -836, 0, 0, 0,
4858 -700, -700, -700, 0, 0, -700, -700, -700, 0, -700,
4859 0, 0, 0, 0, 0, 0, 0, -700, 0, -700,
4860 -700, -700, 0, 0, 0, 0, 0, 0, 0, -700,
4861 -700, 0, -700, -700, -700, -700, -700, 0, 0, 0,
4862 368, 369, 370, 371, 372, 373, 374, 375, 376, 377,
4863 378, 379, 380, 0, 0, 0, 0, 381, 382, 0,
4864 -700, -700, 0, 0, 0, 0, 0, 0, 0, 0,
4865 -700, -700, -700, -700, -700, -700, -700, -700, -700, -700,
4866 -700, -700, -700, 0, 0, 0, 0, -700, -700, -700,
4867 -700, 0, -700, -700, 0, 0, 0, 384, -700, 385,
4868 386, 387, 388, 389, 390, 391, 392, 393, 394, 0,
4869 0, 0, -700, 0, 0, -700, 0, 0, 0, 0,
4870 0, 0, 0, 0, 0, 0, -700, -700, -700, -700,
4871 -700, -700, -700, -700, -700, -700, -700, -700, -700, 0,
4872 0, 0, 0, 0, -700, -700, -700, -700, -701, 0,
4873 -700, -700, -700, 0, 0, 0, -701, -701, -701, 0,
4874 0, -701, -701, -701, 0, -701, 0, 0, 0, 0,
4875 0, 0, 0, -701, 0, -701, -701, -701, 0, 0,
4876 0, 0, 0, 0, 0, -701, -701, 0, -701, -701,
4877 -701, -701, -701, 0, 0, 0, 368, 369, 370, 371,
4878 372, 373, 374, 375, 376, 377, 378, -855, -855, 0,
4879 0, 0, 0, 381, 382, 0, -701, -701, 0, 0,
4880 0, 0, 0, 0, 0, 0, -701, -701, -701, -701,
4881 -701, -701, -701, -701, -701, -701, -701, -701, -701, 0,
4882 0, 0, 0, -701, -701, -701, -701, 0, -701, -701,
4883 0, 0, 0, 0, -701, 385, 386, 387, 388, 389,
4884 390, 391, 392, 393, 394, 0, 0, 0, -701, 0,
4885 0, -701, 0, 0, 0, 0, 0, 0, 0, 0,
4886 0, 0, -701, -701, -701, -701, -701, -701, -701, -701,
4887 -701, -701, -701, -701, -701, 0, 0, 0, 0, 0,
4888 -701, -701, -701, -701, -837, 0, -701, -701, -701, 0,
4889 0, 0, -837, -837, -837, 0, 0, -837, -837, -837,
4890 0, -837, 0, 0, 0, 0, 0, 0, 0, -837,
4891 -837, -837, -837, -837, 0, 0, 0, 0, 0, 0,
4892 0, -837, -837, 0, -837, -837, -837, -837, -837, 0,
4893 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4894 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4895 0, 0, -837, -837, 0, 0, 0, 0, 0, 0,
4896 0, 0, -837, -837, -837, -837, -837, -837, -837, -837,
4897 -837, -837, -837, -837, -837, 0, 0, 0, 0, -837,
4898 -837, -837, -837, 0, 0, -837, 0, 0, 0, 0,
4899 -837, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4900 0, 0, 0, 0, -837, 0, 0, -837, 0, 0,
4901 0, 0, 0, 0, 0, 0, 0, 0, 0, -837,
4902 -837, -837, -837, -837, -837, -837, -837, -837, -837, -837,
4903 -837, 0, 0, 0, 0, -837, -837, -837, -837, -837,
4904 -838, 0, -837, -837, -837, 0, 0, 0, -838, -838,
4905 -838, 0, 0, -838, -838, -838, 0, -838, 0, 0,
4906 0, 0, 0, 0, 0, -838, -838, -838, -838, -838,
4907 0, 0, 0, 0, 0, 0, 0, -838, -838, 0,
4908 -838, -838, -838, -838, -838, 0, 0, 0, 0, 0,
4909 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4910 0, 0, 0, 0, 0, 0, 0, 0, -838, -838,
4911 0, 0, 0, 0, 0, 0, 0, 0, -838, -838,
4912 -838, -838, -838, -838, -838, -838, -838, -838, -838, -838,
4913 -838, 0, 0, 0, 0, -838, -838, -838, -838, 0,
4914 0, -838, 0, 0, 0, 0, -838, 0, 0, 0,
4915 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4916 -838, 0, 0, -838, 0, 0, 0, 0, 0, 0,
4917 0, 0, 0, 0, 0, -838, -838, -838, -838, -838,
4918 -838, -838, -838, -838, -838, -838, -838, 0, 0, 0,
4919 0, -838, -838, -838, -838, -838, -514, 0, -838, -838,
4920 -838, 0, 0, 0, -514, -514, -514, 0, 0, -514,
4921 -514, -514, 0, -514, 0, 0, 0, 0, 0, 0,
4922 0, -514, -514, -514, -514, 0, 0, 0, 0, 0,
4923 0, 0, 0, -514, -514, 0, -514, -514, -514, -514,
4924 -514, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4925 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4926 0, 0, 0, 0, -514, -514, 0, 0, 0, 0,
4927 0, 0, 0, 0, -514, -514, -514, -514, -514, -514,
4928 -514, -514, -514, -514, -514, -514, -514, 0, 0, 0,
4929 0, -514, -514, -514, -514, 0, 0, -514, 0, 0,
4930 0, 0, -514, 0, 0, 0, 0, 0, 0, 0,
4931 0, 0, 0, 0, 0, 0, -514, 0, 0, 0,
4932 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4933 0, -514, 0, -514, -514, -514, -514, -514, -514, -514,
4934 -514, -514, -514, 0, 0, 0, 0, -514, -514, -514,
4935 -514, -514, -350, 255, -514, -514, -514, 0, 0, 0,
4936 -350, -350, -350, 0, 0, -350, -350, -350, 0, -350,
4937 0, 0, 0, 0, 0, 0, 0, -350, 0, -350,
4938 -350, -350, 0, 0, 0, 0, 0, 0, 0, -350,
4939 -350, 0, -350, -350, -350, -350, -350, 0, 0, 0,
4940 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4941 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4942 -350, -350, 0, 0, 0, 0, 0, 0, 0, 0,
4943 -350, -350, -350, -350, -350, -350, -350, -350, -350, -350,
4944 -350, -350, -350, 0, 0, 0, 0, -350, -350, -350,
4945 -350, 0, 0, -350, 0, 0, 0, 0, -350, 0,
4946 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4947 0, 0, -350, 0, 0, -350, 0, 0, 0, 0,
4948 0, 0, 0, 0, 0, 0, 0, -350, -350, -350,
4949 -350, -350, -350, -350, -350, -350, -350, -350, -350, 0,
4950 0, 0, 0, 0, -350, -350, -350, -350, -854, 0,
4951 -350, -350, -350, 0, 0, 0, -854, -854, -854, 0,
4952 0, -854, -854, -854, 0, -854, 0, 0, 0, 0,
4953 0, 0, 0, -854, -854, -854, -854, 0, 0, 0,
4954 0, 0, 0, 0, 0, -854, -854, 0, -854, -854,
4955 -854, -854, -854, 0, 0, 0, 0, 0, 0, 0,
4956 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4957 0, 0, 0, 0, 0, 0, -854, -854, 0, 0,
4958 0, 0, 0, 0, 0, 0, -854, -854, -854, -854,
4959 -854, -854, -854, -854, -854, -854, -854, -854, -854, 0,
4960 0, 0, 0, -854, -854, -854, -854, 0, 0, -854,
4961 0, 0, 0, 0, -854, 0, 0, 0, 0, 0,
4962 0, 0, 0, 0, 0, 0, 0, 0, -854, 0,
4963 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4964 0, 0, 0, -854, 0, -854, -854, -854, -854, -854,
4965 -854, -854, -854, -854, -854, 0, 0, 0, 0, -854,
4966 -854, -854, -854, -854, -356, 255, -854, -854, -854, 0,
4967 0, 0, -356, -356, -356, 0, 0, -356, -356, -356,
4968 0, -356, 0, 0, 0, 0, 0, 0, 0, -356,
4969 0, -356, -356, 0, 0, 0, 0, 0, 0, 0,
4970 0, -356, -356, 0, -356, -356, -356, -356, -356, 0,
4971 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4972 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4973 0, 0, -356, -356, 0, 0, 0, 0, 0, 0,
4974 0, 0, -356, -356, -356, -356, -356, -356, -356, -356,
4975 -356, -356, -356, -356, -356, 0, 0, 0, 0, -356,
4976 -356, -356, -356, 0, 886, -356, 0, 0, 0, 0,
4977 -356, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4978 0, 0, 0, 0, -356, 0, 0, 0, 0, 0,
4979 0, 0, 0, 0, 0, 0, 0, 0, -147, -356,
4980 0, -356, -356, -356, -356, -356, -356, -356, -356, -356,
4981 -356, 0, 0, 0, 0, 829, -356, -356, -356, -356,
4982 -363, 0, -356, -356, -356, 0, 0, 0, -363, -363,
4983 -363, 0, 0, -363, -363, -363, 0, -363, 0, 0,
4984 0, 0, 0, 0, 0, -363, 0, -363, -363, 0,
4985 0, 0, 0, 0, 0, 0, 0, -363, -363, 0,
4986 -363, -363, -363, -363, -363, 0, 0, 0, 0, 0,
4987 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4988 0, 0, 0, 0, 0, 0, 0, 0, -363, -363,
4989 0, 0, 0, 0, 0, 0, 0, 0, -363, -363,
4990 -363, -363, -363, -363, -363, -363, -363, -363, -363, -363,
4991 -363, 0, 0, 0, 0, -363, -363, -363, -363, 0,
4992 0, -363, 0, 0, 0, 0, -363, 0, 0, 0,
4993 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4994 -363, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4995 0, 0, 0, 0, 0, -363, 0, -363, -363, -363,
4996 -363, -363, -363, -363, -363, -363, -363, 0, 0, 0,
4997 0, 0, -363, -363, -363, -363, -836, 451, -363, -363,
4998 -363, 0, 0, 0, -836, -836, -836, 0, 0, 0,
4999 -836, -836, 0, -836, 0, 0, 0, 0, 0, 0,
5000 0, -836, -836, 0, 0, 0, 0, 0, 0, 0,
5001 0, 0, 0, -836, -836, 0, -836, -836, -836, -836,
5002 -836, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5003 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5004 0, 0, 0, 0, -836, -836, 0, 0, 0, 0,
5005 0, 0, 0, 0, -836, -836, -836, -836, -836, -836,
5006 -836, -836, -836, -836, -836, -836, -836, 0, 0, 0,
5007 0, -836, -836, -836, -836, 0, 827, -836, 0, 0,
5008 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5009 0, 0, 0, 0, 0, 0, -836, 0, 0, 0,
5010 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5011 -146, -836, 0, -836, -836, -836, -836, -836, -836, -836,
5012 -836, -836, -836, 0, 0, 0, 0, -836, -836, -836,
5013 -836, -137, -836, 0, -836, 0, -836, 0, 0, 0,
5014 -836, -836, -836, 0, 0, 0, -836, -836, 0, -836,
5015 0, 0, 0, 0, 0, 0, 0, -836, -836, 0,
5016 0, 0, 0, 0, 0, 0, 0, 0, 0, -836,
5017 -836, 0, -836, -836, -836, -836, -836, 0, 0, 0,
5018 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5019 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5020 -836, -836, 0, 0, 0, 0, 0, 0, 0, 0,
5021 -836, -836, -836, -836, -836, -836, -836, -836, -836, -836,
5022 -836, -836, -836, 0, 0, 0, 0, -836, -836, -836,
5023 -836, 0, 827, -836, 0, 0, 0, 0, 0, 0,
5024 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5025 0, 0, -836, 0, 0, 0, 0, 0, 0, 0,
5026 0, 0, 0, 0, 0, 0, -146, -836, 0, -836,
5027 -836, -836, -836, -836, -836, -836, -836, -836, -836, 0,
5028 0, 0, 0, -836, -836, -836, -836, -836, -356, 0,
5029 -836, 0, -836, 0, 0, 0, -356, -356, -356, 0,
5030 0, 0, -356, -356, 0, -356, 0, 0, 0, 0,
5031 0, 0, 0, -356, 0, 0, 0, 0, 0, 0,
5032 0, 0, 0, 0, 0, -356, -356, 0, -356, -356,
5033 -356, -356, -356, 0, 0, 0, 0, 0, 0, 0,
5034 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5035 0, 0, 0, 0, 0, 0, -356, -356, 0, 0,
5036 0, 0, 0, 0, 0, 0, -356, -356, -356, -356,
5037 -356, -356, -356, -356, -356, -356, -356, -356, -356, 0,
5038 0, 0, 0, -356, -356, -356, -356, 0, 828, -356,
5039 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5040 0, 0, 0, 0, 0, 0, 0, 0, -356, 0,
5041 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5042 0, 0, -147, -356, 0, -356, -356, -356, -356, -356,
5043 -356, -356, -356, -356, -356, 0, 0, 0, 0, 829,
5044 -356, -356, -356, -138, -356, 0, -356, 0, -356, 0,
5045 0, 0, -356, -356, -356, 0, 0, 0, -356, -356,
5046 0, -356, 0, 0, 0, 0, 0, 0, 0, -356,
5047 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5048 0, -356, -356, 0, -356, -356, -356, -356, -356, 0,
5049 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5050 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5051 0, 0, -356, -356, 0, 0, 0, 0, 0, 0,
5052 0, 0, -356, -356, -356, -356, -356, -356, -356, -356,
5053 -356, -356, -356, -356, -356, 0, 0, 0, 0, -356,
5054 -356, -356, -356, 0, 828, -356, 0, 0, 0, 0,
5055 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5056 0, 0, 0, 0, -356, 0, 0, 0, 0, 0,
5057 0, 0, 0, 0, 0, 0, 0, 0, -147, -356,
5058 0, -356, -356, -356, -356, -356, -356, -356, -356, -356,
5059 -356, 0, 0, 0, 0, 829, -356, -356, -356, -356,
5060 0, 0, -356, 3, -356, 4, 5, 6, 7, 8,
5061 -854, -854, -854, 9, 10, 0, 0, -854, 11, 0,
5062 12, 13, 14, 15, 16, 17, 18, 0, 0, 0,
5063 0, 0, 19, 20, 21, 22, 23, 24, 25, 0,
5064 0, 26, 0, 0, 0, 0, 0, 27, 28, 284,
5065 30, 31, 32, 33, 34, 35, 36, 37, 38, 39,
5066 0, 40, 41, 42, 43, 44, 45, 46, 0, 0,
5067 -854, 0, 0, 0, 0, 0, 0, 0, 47, 48,
5068 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5069 0, 0, 0, 49, 50, 0, 0, 0, 0, 0,
5070 0, 51, 0, 0, 52, 53, 54, 55, 0, 56,
5071 0, 0, 57, 58, 59, 60, 61, 62, 63, 64,
5072 65, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5073 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5074 0, 0, 0, 0, 0, 0, 0, 0, 0, 66,
5075 67, 68, 0, 0, 0, 3, -854, 4, 5, 6,
5076 7, 8, -854, 0, -854, 9, 10, 0, -854, -854,
5077 11, 0, 12, 13, 14, 15, 16, 17, 18, 0,
5078 0, 0, 0, 0, 19, 20, 21, 22, 23, 24,
5079 25, 0, 0, 26, 0, 0, 0, 0, 0, 27,
5080 28, 284, 30, 31, 32, 33, 34, 35, 36, 37,
5081 38, 39, 0, 40, 41, 42, 43, 44, 45, 46,
5082 0, 0, -854, 0, 0, 0, 0, 0, 0, 0,
5083 47, 48, 0, 0, 0, 0, 0, 0, 0, 0,
5084 0, 0, 0, 0, 0, 49, 50, 0, 0, 0,
5085 0, 0, 0, 51, 0, 0, 52, 53, 54, 55,
5086 0, 56, 0, 0, 57, 58, 59, 60, 61, 62,
5087 63, 64, 65, 0, 0, 0, 0, 0, 0, 0,
5088 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5089 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5090 0, 66, 67, 68, 0, 0, 0, 3, -854, 4,
5091 5, 6, 7, 8, -854, 0, -854, 9, 10, 0,
5092 0, -854, 11, -854, 12, 13, 14, 15, 16, 17,
5093 18, 0, 0, 0, 0, 0, 19, 20, 21, 22,
5094 23, 24, 25, 0, 0, 26, 0, 0, 0, 0,
5095 0, 27, 28, 284, 30, 31, 32, 33, 34, 35,
5096 36, 37, 38, 39, 0, 40, 41, 42, 43, 44,
5097 45, 46, 0, 0, -854, 0, 0, 0, 0, 0,
5098 0, 0, 47, 48, 0, 0, 0, 0, 0, 0,
5099 0, 0, 0, 0, 0, 0, 0, 49, 50, 0,
5100 0, 0, 0, 0, 0, 51, 0, 0, 52, 53,
5101 54, 55, 0, 56, 0, 0, 57, 58, 59, 60,
5102 61, 62, 63, 64, 65, 0, 0, 0, 0, 0,
5103 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5104 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5105 0, 0, 0, 66, 67, 68, 0, 0, 0, 3,
5106 -854, 4, 5, 6, 7, 8, -854, 0, -854, 9,
5107 10, 0, 0, -854, 11, 0, 12, 13, 14, 15,
5108 16, 17, 18, -854, 0, 0, 0, 0, 19, 20,
5109 21, 22, 23, 24, 25, 0, 0, 26, 0, 0,
5110 0, 0, 0, 27, 28, 284, 30, 31, 32, 33,
5111 34, 35, 36, 37, 38, 39, 0, 40, 41, 42,
5112 43, 44, 45, 46, 0, 0, -854, 0, 0, 0,
5113 0, 0, 0, 0, 47, 48, 0, 0, 0, 0,
5114 0, 0, 0, 0, 0, 0, 0, 0, 0, 49,
5115 50, 0, 0, 0, 0, 0, 0, 51, 0, 0,
5116 52, 53, 54, 55, 0, 56, 0, 0, 57, 58,
5117 59, 60, 61, 62, 63, 64, 65, 0, 0, 0,
5118 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5119 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5120 0, 0, 0, 0, 0, 66, 67, 68, 0, 0,
5121 0, 3, -854, 4, 5, 6, 7, 8, -854, 0,
5122 -854, 9, 10, 0, 0, -854, 11, 0, 12, 13,
5123 14, 15, 16, 17, 18, 0, 0, 0, 0, 0,
5124 19, 20, 21, 22, 23, 24, 25, 0, 0, 26,
5125 0, 0, 0, 0, 0, 27, 28, 284, 30, 31,
5126 32, 33, 34, 35, 36, 37, 38, 39, 0, 40,
5127 41, 42, 43, 44, 45, 46, 0, 0, -854, 0,
5128 0, 0, 0, 0, 0, 0, 47, 48, 0, 0,
5129 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5130 0, 49, 50, 0, 0, 0, 0, 0, 0, 51,
5131 0, 0, 52, 53, 54, 55, 0, 56, 0, 0,
5132 57, 58, 59, 60, 61, 62, 63, 64, 65, 0,
5133 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5134 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5135 0, 0, 0, 0, 0, 0, 0, 66, 67, 68,
5136 0, 0, 0, 3, -854, 4, 5, 6, 7, 8,
5137 -854, -854, -854, 9, 10, 0, 0, 0, 11, 0,
5138 12, 13, 14, 15, 16, 17, 18, 0, 0, 0,
5139 0, 0, 19, 20, 21, 22, 23, 24, 25, 0,
5140 0, 26, 0, 0, 0, 0, 0, 27, 28, 284,
5141 30, 31, 32, 33, 34, 35, 36, 37, 38, 39,
5142 0, 40, 41, 42, 43, 44, 45, 46, 0, 0,
5143 -854, 0, 0, 0, 0, 0, 0, 0, 47, 48,
5144 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5145 0, 0, 0, 49, 50, 0, 0, 0, 0, 0,
5146 0, 51, 0, 0, 52, 53, 54, 55, 0, 56,
5147 0, 0, 57, 58, 59, 60, 61, 62, 63, 64,
5148 65, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5149 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5150 0, 0, 0, 0, 0, 0, 0, 0, 0, 66,
5151 67, 68, 0, 0, 0, 3, -854, 4, 5, 6,
5152 7, 8, -854, 0, -854, 9, 10, 0, 0, 0,
5153 11, 0, 12, 13, 14, 15, 16, 17, 18, 0,
5154 0, 0, 0, 0, 19, 20, 21, 22, 23, 24,
5155 25, 0, 0, 26, 0, 0, 0, 0, 0, 27,
5156 28, 284, 30, 31, 32, 33, 34, 35, 36, 37,
5157 38, 39, 0, 40, 41, 42, 43, 44, 45, 46,
5158 0, 0, -854, 0, 0, 0, 0, 0, 0, 0,
5159 47, 48, 0, 0, 0, 0, 0, 0, 0, 0,
5160 0, 0, 0, 0, 0, 49, 50, 0, 0, 0,
5161 0, 0, 0, 51, 0, 0, 52, 53, 54, 55,
5162 0, 56, 0, 0, 57, 58, 59, 60, 61, 62,
5163 63, 64, 65, 0, 0, 0, 0, 0, 0, 0,
5164 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5165 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5166 0, 66, 67, 68, 0, 0, 0, 3, -854, 4,
5167 5, 6, 7, 8, -854, 0, 0, 9, 10, 0,
5168 0, 0, 11, 0, 12, 13, 14, 15, 16, 17,
5169 18, 0, 0, 0, 0, 0, 19, 20, 21, 22,
5170 23, 24, 25, 0, 0, 26, 0, 0, 0, 0,
5171 0, 27, 28, 284, 30, 31, 32, 33, 34, 35,
5172 36, 37, 38, 39, 0, 40, 41, 42, 43, 44,
5173 45, 46, 0, 0, 0, 0, 0, 0, 0, 0,
5174 0, 0, 47, 48, 0, 0, 0, 0, 0, 0,
5175 0, 0, 0, 0, 0, 0, 0, 49, 50, 0,
5176 0, 0, 0, 0, 0, 51, 0, 0, 285, 53,
5177 54, 55, 0, 56, 0, 0, 57, 58, 59, 60,
5178 61, 62, 63, 64, 65, 0, 0, 0, 0, 0,
5179 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5180 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5181 0, 0, 0, 66, 67, 68, 0, 0, 0, 0,
5182 -854, 0, 0, 0, -854, 3, -854, 4, 5, 6,
5183 7, 8, 0, 0, 0, 9, 10, 0, 0, 0,
5184 11, 0, 12, 13, 14, 15, 16, 17, 18, 0,
5185 0, 0, 0, 0, 19, 20, 21, 22, 23, 24,
5186 25, 0, 0, 26, 0, 0, 0, 0, 0, 27,
5187 28, 284, 30, 31, 32, 33, 34, 35, 36, 37,
5188 38, 39, 0, 40, 41, 42, 43, 44, 45, 46,
5189 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5190 47, 48, 0, 0, 0, 0, 0, 0, 0, 0,
5191 0, 0, 0, 0, 0, 49, 50, 0, 0, 0,
5192 0, 0, 0, 51, 0, 0, 52, 53, 54, 55,
5193 0, 56, 0, 0, 57, 58, 59, 60, 61, 62,
5194 63, 64, 65, 0, 0, 0, 0, 0, 0, 0,
5195 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5196 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5197 0, 66, 67, 68, 0, 0, 0, 0, -854, 0,
5198 0, 0, -854, 3, -854, 4, 5, 6, 7, 8,
5199 0, 0, 0, 9, 10, 0, 0, 0, 11, 0,
5200 12, 13, 14, 15, 16, 17, 18, 0, 0, 0,
5201 0, 0, 19, 20, 21, 22, 23, 24, 25, 0,
5202 0, 26, 0, 0, 0, 0, 0, 27, 28, 29,
5203 30, 31, 32, 33, 34, 35, 36, 37, 38, 39,
5204 0, 40, 41, 42, 43, 44, 45, 46, 0, 0,
5205 0, 0, 0, 0, 0, 0, 0, 0, 47, 48,
5206 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5207 0, 0, 0, 49, 50, 0, 0, 0, 0, 0,
5208 0, 51, 0, 0, 52, 53, 54, 55, 0, 56,
5209 0, 0, 57, 58, 59, 60, 61, 62, 63, 64,
5210 65, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5211 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5212 0, 0, 0, 0, 0, 0, 0, 0, 0, 66,
5213 67, 68, 0, 0, -854, 3, -854, 4, 5, 6,
5214 7, 8, -854, 0, 0, 9, 10, 0, 0, 0,
5215 11, 0, 12, 13, 14, 15, 16, 17, 18, 0,
5216 0, 0, 0, 0, 19, 20, 21, 22, 23, 24,
5217 25, 0, 0, 26, 0, 0, 0, 0, 0, 27,
5218 28, 284, 30, 31, 32, 33, 34, 35, 36, 37,
5219 38, 39, 0, 40, 41, 42, 43, 44, 45, 46,
5220 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5221 47, 48, 0, 0, 0, 0, 0, 0, 0, 0,
5222 0, 0, 0, 0, 0, 49, 50, 0, 0, 0,
5223 0, 0, 0, 51, 0, 0, 52, 53, 54, 55,
5224 0, 56, 0, 0, 57, 58, 59, 60, 61, 62,
5225 63, 64, 65, 0, 0, 0, 0, 0, 0, 0,
5226 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5227 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5228 0, 66, 67, 68, 0, 0, -854, 404, -854, 4,
5229 5, 6, 0, 8, -854, 0, 0, 9, 10, 0,
5230 0, 0, 11, -3, 12, 13, 14, 15, 16, 17,
5231 18, 0, 0, 0, 0, 0, 19, 20, 21, 22,
5232 23, 24, 25, 0, 0, 26, 0, 0, 0, 0,
5233 0, 0, 28, 0, 0, 31, 32, 33, 34, 35,
5234 36, 37, 38, 39, 0, 40, 41, 42, 43, 44,
5235 45, 46, 0, 0, 0, 0, 0, 0, 0, 0,
5236 0, 0, 47, 48, 0, 0, 0, 0, 0, 0,
5237 0, 0, 0, 0, 0, 0, 0, 49, 50, 0,
5238 0, 0, 0, 0, 0, 229, 0, 0, 230, 53,
5239 54, 55, 0, 0, 0, 0, 57, 58, 59, 60,
5240 61, 62, 63, 64, 65, 0, 0, 0, 0, 0,
5241 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5242 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5243 0, 0, 0, 66, 67, 68, 0, 0, 0, 0,
5244 331, 0, 0, 0, 0, 0, 332, 144, 145, 146,
5245 147, 148, 149, 150, 151, 152, 153, 154, 155, 156,
5246 157, 158, 159, 160, 161, 162, 163, 164, 165, 166,
5247 167, 0, 0, 0, 168, 169, 170, 434, 435, 436,
5248 437, 175, 176, 177, 0, 0, 0, 0, 0, 178,
5249 179, 180, 181, 438, 439, 440, 441, 186, 36, 37,
5250 442, 39, 0, 0, 0, 0, 0, 0, 0, 0,
5251 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5252 188, 189, 190, 191, 192, 193, 194, 195, 196, 0,
5253 0, 197, 198, 0, 0, 0, 0, 199, 200, 201,
5254 202, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5255 0, 203, 204, 0, 0, 0, 0, 0, 0, 0,
5256 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5257 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5258 0, 205, 206, 207, 208, 209, 210, 211, 212, 213,
5259 214, 0, 215, 216, 0, 0, 0, 0, 0, 0,
5260 217, 443, 144, 145, 146, 147, 148, 149, 150, 151,
5261 152, 153, 154, 155, 156, 157, 158, 159, 160, 161,
5262 162, 163, 164, 165, 166, 167, 0, 0, 0, 168,
5263 169, 170, 171, 172, 173, 174, 175, 176, 177, 0,
5264 0, 0, 0, 0, 178, 179, 180, 181, 182, 183,
5265 184, 185, 186, 36, 37, 187, 39, 0, 0, 0,
5266 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5267 0, 0, 0, 0, 0, 188, 189, 190, 191, 192,
5268 193, 194, 195, 196, 0, 0, 197, 198, 0, 0,
5269 0, 0, 199, 200, 201, 202, 0, 0, 0, 0,
5270 0, 0, 0, 0, 0, 0, 203, 204, 0, 0,
5271 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5272 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5273 0, 0, 0, 0, 0, 0, 205, 206, 207, 208,
5274 209, 210, 211, 212, 213, 214, 0, 215, 216, 0,
5275 0, 0, 0, 0, 0, 217, 144, 145, 146, 147,
5276 148, 149, 150, 151, 152, 153, 154, 155, 156, 157,
5277 158, 159, 160, 161, 162, 163, 164, 165, 166, 167,
5278 0, 0, 0, 168, 169, 170, 171, 172, 173, 174,
5279 175, 176, 177, 0, 0, 0, 0, 0, 178, 179,
5280 180, 181, 182, 183, 184, 185, 186, 262, 0, 187,
5281 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5282 0, 0, 0, 0, 0, 0, 0, 0, 0, 188,
5283 189, 190, 191, 192, 193, 194, 195, 196, 0, 0,
5284 197, 198, 0, 0, 0, 0, 199, 200, 201, 202,
5285 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5286 203, 204, 0, 0, 58, 0, 0, 0, 0, 0,
5287 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5288 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5289 205, 206, 207, 208, 209, 210, 211, 212, 213, 214,
5290 0, 215, 216, 0, 0, 0, 0, 0, 0, 217,
5291 144, 145, 146, 147, 148, 149, 150, 151, 152, 153,
5292 154, 155, 156, 157, 158, 159, 160, 161, 162, 163,
5293 164, 165, 166, 167, 0, 0, 0, 168, 169, 170,
5294 171, 172, 173, 174, 175, 176, 177, 0, 0, 0,
5295 0, 0, 178, 179, 180, 181, 182, 183, 184, 185,
5296 186, 0, 0, 187, 0, 0, 0, 0, 0, 0,
5297 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5298 0, 0, 0, 188, 189, 190, 191, 192, 193, 194,
5299 195, 196, 0, 0, 197, 198, 0, 0, 0, 0,
5300 199, 200, 201, 202, 0, 0, 0, 0, 0, 0,
5301 0, 0, 0, 0, 203, 204, 0, 0, 58, 0,
5302 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5303 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5304 0, 0, 0, 0, 205, 206, 207, 208, 209, 210,
5305 211, 212, 213, 214, 0, 215, 216, 0, 0, 0,
5306 0, 0, 0, 217, 144, 145, 146, 147, 148, 149,
5307 150, 151, 152, 153, 154, 155, 156, 157, 158, 159,
5308 160, 161, 162, 163, 164, 165, 166, 167, 0, 0,
5309 0, 168, 169, 170, 171, 172, 173, 174, 175, 176,
5310 177, 0, 0, 0, 0, 0, 178, 179, 180, 181,
5311 182, 183, 184, 185, 186, 0, 0, 187, 0, 0,
5312 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5313 0, 0, 0, 0, 0, 0, 0, 188, 189, 190,
5314 191, 192, 193, 194, 195, 196, 0, 0, 197, 198,
5315 0, 0, 0, 0, 199, 200, 201, 202, 0, 0,
5316 0, 0, 0, 0, 0, 0, 0, 0, 203, 204,
5317 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5318 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5319 0, 0, 0, 0, 0, 0, 0, 0, 205, 206,
5320 207, 208, 209, 210, 211, 212, 213, 214, 0, 215,
5321 216, 4, 5, 6, 0, 8, 0, 217, 0, 9,
5322 10, 0, 0, 0, 11, 0, 12, 13, 14, 270,
5323 271, 17, 18, 0, 0, 0, 0, 0, 19, 20,
5324 272, 22, 23, 24, 25, 0, 0, 227, 0, 0,
5325 0, 0, 0, 0, 302, 0, 0, 31, 32, 33,
5326 34, 35, 36, 37, 38, 39, 0, 40, 41, 42,
5327 43, 44, 45, 46, 0, 0, 0, 0, 0, 0,
5328 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5329 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5330 0, 0, 0, 0, 0, 0, 0, 303, 0, 0,
5331 230, 53, 54, 55, 0, 0, 0, 0, 57, 58,
5332 59, 60, 61, 62, 63, 64, 65, 0, 0, 4,
5333 5, 6, 0, 8, 0, 0, 0, 9, 10, 0,
5334 0, 0, 11, 0, 12, 13, 14, 270, 271, 17,
5335 18, 0, 0, 0, 0, 304, 19, 20, 272, 22,
5336 23, 24, 25, 305, 0, 227, 0, 0, 0, 0,
5337 0, 0, 302, 0, 0, 31, 32, 33, 34, 35,
5338 36, 37, 38, 39, 0, 40, 41, 42, 43, 44,
5339 45, 46, 0, 0, 0, 0, 0, 0, 0, 0,
5340 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5341 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5342 0, 0, 0, 0, 0, 303, 0, 0, 230, 53,
5343 54, 55, 0, 0, 0, 0, 57, 58, 59, 60,
5344 61, 62, 63, 64, 65, 0, 0, 4, 5, 6,
5345 0, 8, 0, 0, 0, 9, 10, 0, 0, 0,
5346 11, 0, 12, 13, 14, 15, 16, 17, 18, 0,
5347 0, 0, 0, 304, 19, 20, 21, 22, 23, 24,
5348 25, 612, 0, 227, 0, 0, 0, 0, 0, 0,
5349 28, 0, 0, 31, 32, 33, 34, 35, 36, 37,
5350 38, 39, 228, 40, 41, 42, 43, 44, 45, 46,
5351 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5352 47, 48, 0, 0, 0, 0, 0, 0, 0, 0,
5353 0, 0, 0, 0, 0, 49, 50, 0, 0, 0,
5354 0, 0, 0, 229, 0, 0, 230, 53, 54, 55,
5355 0, 231, 232, 233, 57, 58, 234, 60, 61, 62,
5356 63, 64, 65, 0, 0, 0, 0, 0, 0, 0,
5357 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5358 0, 0, 0, 0, 0, 0, 4, 5, 6, 0,
5359 8, 66, 235, 68, 9, 10, 0, 0, 259, 11,
5360 0, 12, 13, 14, 15, 16, 17, 18, 0, 0,
5361 0, 0, 0, 19, 20, 21, 22, 23, 24, 25,
5362 0, 0, 26, 0, 0, 0, 0, 0, 0, 28,
5363 0, 0, 31, 32, 33, 34, 35, 36, 37, 38,
5364 39, 0, 40, 41, 42, 43, 44, 45, 46, 0,
5365 0, 0, 0, 0, 0, 0, 0, 0, 0, 47,
5366 48, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5367 0, 0, 0, 0, 49, 50, 0, 0, 0, 0,
5368 0, 0, 229, 0, 0, 230, 53, 54, 55, 0,
5369 0, 0, 0, 57, 58, 59, 60, 61, 62, 63,
5370 64, 65, 0, 0, 0, 0, 0, 0, 0, 0,
5371 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5372 0, 0, 0, 3, 0, 4, 5, 6, 7, 8,
5373 66, 67, 68, 9, 10, 0, 0, 259, 11, 0,
5374 12, 13, 14, 15, 16, 17, 18, 0, 0, 0,
5375 0, 0, 19, 20, 21, 22, 23, 24, 25, 0,
5376 0, 26, 0, 0, 0, 0, 0, 27, 28, 0,
5377 30, 31, 32, 33, 34, 35, 36, 37, 38, 39,
5378 0, 40, 41, 42, 43, 44, 45, 46, 0, 0,
5379 0, 0, 0, 0, 0, 0, 0, 0, 47, 48,
5380 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5381 0, 0, 0, 49, 50, 0, 0, 0, 0, 0,
5382 0, 51, 0, 0, 52, 53, 54, 55, 0, 56,
5383 0, 0, 57, 58, 59, 60, 61, 62, 63, 64,
5384 65, 0, 0, 404, 0, 4, 5, 6, 0, 8,
5385 0, 0, 0, 9, 10, 0, 0, 0, 11, 0,
5386 12, 13, 14, 15, 16, 17, 18, 0, 0, 66,
5387 67, 68, 19, 20, 21, 22, 23, 24, 25, 0,
5388 0, 26, 0, 0, 0, 0, 0, 0, 28, 0,
5389 0, 31, 32, 33, 34, 35, 36, 37, 38, 39,
5390 0, 40, 41, 42, 43, 44, 45, 46, 0, 0,
5391 0, 0, 0, 0, 0, 0, 0, 0, 47, 48,
5392 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5393 0, 0, 0, 49, 50, 0, 0, 0, 0, 0,
5394 0, 229, 0, 0, 230, 53, 54, 55, 0, 0,
5395 0, 0, 57, 58, 59, 60, 61, 62, 63, 64,
5396 65, 0, 0, 0, 0, 4, 5, 6, 0, 8,
5397 0, 0, 0, 9, 10, 0, 0, 0, 11, 0,
5398 12, 13, 14, 15, 16, 17, 18, 0, 0, 66,
5399 67, 68, 19, 20, 21, 22, 23, 24, 25, 0,
5400 0, 227, 0, 0, 0, 0, 0, 0, 28, 0,
5401 0, 31, 32, 33, 34, 35, 36, 37, 38, 39,
5402 228, 40, 41, 42, 43, 44, 45, 46, 0, 0,
5403 0, 0, 0, 0, 0, 0, 0, 0, 47, 48,
5404 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5405 0, 0, 0, 49, 50, 0, 0, 0, 0, 0,
5406 0, 229, 0, 0, 230, 53, 54, 55, 0, 231,
5407 232, 233, 57, 58, 234, 60, 61, 62, 63, 64,
5408 65, 0, 0, 0, 0, 4, 5, 6, 0, 8,
5409 0, 0, 0, 9, 10, 0, 0, 0, 11, 0,
5410 12, 13, 14, 15, 16, 17, 18, 0, 0, 66,
5411 235, 68, 19, 20, 21, 22, 23, 24, 25, 0,
5412 0, 227, 0, 0, 0, 0, 0, 0, 28, 0,
5413 0, 31, 32, 33, 34, 35, 36, 37, 38, 39,
5414 228, 40, 41, 42, 43, 44, 45, 46, 0, 0,
5415 0, 0, 0, 0, 0, 0, 0, 0, 47, 48,
5416 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5417 0, 0, 0, 49, 479, 0, 0, 0, 0, 0,
5418 0, 229, 0, 0, 230, 53, 54, 55, 0, 231,
5419 232, 233, 57, 58, 234, 60, 61, 62, 63, 64,
5420 65, 0, 0, 0, 0, 4, 5, 6, 0, 8,
5421 0, 0, 0, 9, 10, 0, 0, 0, 11, 0,
5422 12, 13, 14, 270, 271, 17, 18, 0, 0, 66,
5423 235, 68, 19, 20, 272, 22, 23, 24, 25, 0,
5424 0, 227, 0, 0, 0, 0, 0, 0, 28, 0,
5425 0, 31, 32, 33, 34, 35, 36, 37, 38, 39,
5426 228, 40, 41, 42, 43, 44, 45, 46, 0, 0,
5427 0, 0, 0, 0, 0, 0, 0, 0, 47, 48,
5428 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5429 0, 0, 0, 49, 50, 0, 0, 0, 0, 0,
5430 0, 229, 0, 0, 230, 53, 54, 55, 0, 231,
5431 232, 233, 57, 58, 234, 60, 61, 62, 63, 64,
5432 65, 0, 0, 0, 0, 4, 5, 6, 0, 8,
5433 0, 0, 0, 9, 10, 0, 0, 0, 11, 0,
5434 12, 13, 14, 270, 271, 17, 18, 0, 0, 66,
5435 235, 68, 19, 20, 272, 22, 23, 24, 25, 0,
5436 0, 227, 0, 0, 0, 0, 0, 0, 28, 0,
5437 0, 31, 32, 33, 34, 35, 36, 37, 38, 39,
5438 228, 40, 41, 42, 43, 44, 45, 46, 0, 0,
5439 0, 0, 0, 0, 0, 0, 0, 0, 47, 48,
5440 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5441 0, 0, 0, 49, 479, 0, 0, 0, 0, 0,
5442 0, 229, 0, 0, 230, 53, 54, 55, 0, 231,
5443 232, 233, 57, 58, 234, 60, 61, 62, 63, 64,
5444 65, 0, 0, 0, 0, 4, 5, 6, 0, 8,
5445 0, 0, 0, 9, 10, 0, 0, 0, 11, 0,
5446 12, 13, 14, 270, 271, 17, 18, 0, 0, 66,
5447 235, 68, 19, 20, 272, 22, 23, 24, 25, 0,
5448 0, 227, 0, 0, 0, 0, 0, 0, 28, 0,
5449 0, 31, 32, 33, 34, 35, 36, 37, 38, 39,
5450 228, 40, 41, 42, 43, 44, 45, 46, 0, 0,
5451 0, 0, 0, 0, 0, 0, 0, 0, 47, 48,
5452 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5453 0, 0, 0, 49, 50, 0, 0, 0, 0, 0,
5454 0, 229, 0, 0, 230, 53, 54, 55, 0, 231,
5455 232, 0, 57, 58, 234, 60, 61, 62, 63, 64,
5456 65, 0, 0, 0, 0, 4, 5, 6, 0, 8,
5457 0, 0, 0, 9, 10, 0, 0, 0, 11, 0,
5458 12, 13, 14, 270, 271, 17, 18, 0, 0, 66,
5459 235, 68, 19, 20, 272, 22, 23, 24, 25, 0,
5460 0, 227, 0, 0, 0, 0, 0, 0, 28, 0,
5461 0, 31, 32, 33, 34, 35, 36, 37, 38, 39,
5462 228, 40, 41, 42, 43, 44, 45, 46, 0, 0,
5463 0, 0, 0, 0, 0, 0, 0, 0, 47, 48,
5464 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5465 0, 0, 0, 49, 50, 0, 0, 0, 0, 0,
5466 0, 229, 0, 0, 230, 53, 54, 55, 0, 0,
5467 232, 233, 57, 58, 234, 60, 61, 62, 63, 64,
5468 65, 0, 0, 0, 0, 4, 5, 6, 0, 8,
5469 0, 0, 0, 9, 10, 0, 0, 0, 11, 0,
5470 12, 13, 14, 270, 271, 17, 18, 0, 0, 66,
5471 235, 68, 19, 20, 272, 22, 23, 24, 25, 0,
5472 0, 227, 0, 0, 0, 0, 0, 0, 28, 0,
5473 0, 31, 32, 33, 34, 35, 36, 37, 38, 39,
5474 228, 40, 41, 42, 43, 44, 45, 46, 0, 0,
5475 0, 0, 0, 0, 0, 0, 0, 0, 47, 48,
5476 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5477 0, 0, 0, 49, 50, 0, 0, 0, 0, 0,
5478 0, 229, 0, 0, 230, 53, 54, 55, 0, 0,
5479 232, 0, 57, 58, 234, 60, 61, 62, 63, 64,
5480 65, 0, 0, 0, 0, 4, 5, 6, 0, 8,
5481 0, 0, 0, 9, 10, 0, 0, 0, 11, 0,
5482 12, 13, 14, 15, 16, 17, 18, 0, 0, 66,
5483 235, 68, 19, 20, 21, 22, 23, 24, 25, 0,
5484 0, 227, 0, 0, 0, 0, 0, 0, 28, 0,
5485 0, 31, 32, 33, 34, 35, 36, 37, 38, 39,
5486 0, 40, 41, 42, 43, 44, 45, 46, 0, 0,
5487 0, 0, 0, 0, 0, 0, 0, 0, 47, 48,
5488 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5489 0, 0, 0, 49, 50, 0, 0, 0, 0, 0,
5490 0, 229, 0, 0, 230, 53, 54, 55, 0, 802,
5491 0, 0, 57, 58, 59, 60, 61, 62, 63, 64,
5492 65, 0, 0, 0, 0, 4, 5, 6, 0, 8,
5493 0, 0, 0, 9, 10, 0, 0, 0, 11, 0,
5494 12, 13, 14, 15, 16, 17, 18, 0, 0, 66,
5495 235, 68, 19, 20, 21, 22, 23, 24, 25, 0,
5496 0, 227, 0, 0, 0, 0, 0, 0, 28, 0,
5497 0, 31, 32, 33, 34, 35, 36, 37, 38, 39,
5498 0, 40, 41, 42, 43, 44, 45, 46, 0, 0,
5499 0, 0, 0, 0, 0, 0, 0, 0, 47, 48,
5500 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5501 0, 0, 0, 49, 50, 0, 0, 0, 0, 0,
5502 0, 813, 0, 0, 230, 53, 54, 55, 0, 802,
5503 0, 0, 57, 58, 59, 60, 61, 62, 63, 64,
5504 65, 0, 0, 0, 0, 4, 5, 6, 0, 8,
5505 0, 0, 0, 9, 10, 0, 0, 0, 11, 0,
5506 12, 13, 14, 270, 271, 17, 18, 0, 0, 66,
5507 235, 68, 19, 20, 272, 22, 23, 24, 25, 0,
5508 0, 227, 0, 0, 0, 0, 0, 0, 28, 0,
5509 0, 31, 32, 33, 34, 35, 36, 37, 38, 39,
5510 0, 40, 41, 42, 43, 44, 45, 46, 0, 0,
5511 0, 0, 0, 0, 0, 0, 0, 0, 47, 48,
5512 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5513 0, 0, 0, 49, 50, 0, 0, 0, 0, 0,
5514 0, 229, 0, 0, 230, 53, 54, 55, 0, 973,
5515 0, 0, 57, 58, 59, 60, 61, 62, 63, 64,
5516 65, 0, 0, 0, 0, 4, 5, 6, 0, 8,
5517 0, 0, 0, 9, 10, 0, 0, 0, 11, 0,
5518 12, 13, 14, 270, 271, 17, 18, 0, 0, 66,
5519 235, 68, 19, 20, 272, 22, 23, 24, 25, 0,
5520 0, 227, 0, 0, 0, 0, 0, 0, 28, 0,
5521 0, 31, 32, 33, 34, 35, 36, 37, 38, 39,
5522 0, 40, 41, 42, 43, 44, 45, 46, 0, 0,
5523 0, 0, 0, 0, 0, 0, 0, 0, 47, 48,
5524 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5525 0, 0, 0, 49, 50, 0, 0, 0, 0, 0,
5526 0, 229, 0, 0, 230, 53, 54, 55, 0, 1022,
5527 0, 0, 57, 58, 59, 60, 61, 62, 63, 64,
5528 65, 0, 0, 0, 0, 4, 5, 6, 0, 8,
5529 0, 0, 0, 9, 10, 0, 0, 0, 11, 0,
5530 12, 13, 14, 270, 271, 17, 18, 0, 0, 66,
5531 235, 68, 19, 20, 272, 22, 23, 24, 25, 0,
5532 0, 227, 0, 0, 0, 0, 0, 0, 28, 0,
5533 0, 31, 32, 33, 34, 35, 36, 37, 38, 39,
5534 0, 40, 41, 42, 43, 44, 45, 46, 0, 0,
5535 0, 0, 0, 0, 0, 0, 0, 0, 47, 48,
5536 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5537 0, 0, 0, 49, 50, 0, 0, 0, 0, 0,
5538 0, 229, 0, 0, 230, 53, 54, 55, 0, 802,
5539 0, 0, 57, 58, 59, 60, 61, 62, 63, 64,
5540 65, 0, 0, 0, 0, 4, 5, 6, 0, 8,
5541 0, 0, 0, 9, 10, 0, 0, 0, 11, 0,
5542 12, 13, 14, 270, 271, 17, 18, 0, 0, 66,
5543 235, 68, 19, 20, 272, 22, 23, 24, 25, 0,
5544 0, 227, 0, 0, 0, 0, 0, 0, 28, 0,
5545 0, 31, 32, 33, 34, 35, 36, 37, 38, 39,
5546 0, 40, 41, 42, 43, 44, 45, 46, 0, 0,
5547 0, 0, 0, 0, 0, 0, 0, 0, 47, 48,
5548 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5549 0, 0, 0, 49, 50, 0, 0, 0, 0, 0,
5550 0, 229, 0, 0, 230, 53, 54, 55, 0, 1155,
5551 0, 0, 57, 58, 59, 60, 61, 62, 63, 64,
5552 65, 0, 0, 0, 0, 4, 5, 6, 0, 8,
5553 0, 0, 0, 9, 10, 0, 0, 0, 11, 0,
5554 12, 13, 14, 270, 271, 17, 18, 0, 0, 66,
5555 235, 68, 19, 20, 272, 22, 23, 24, 25, 0,
5556 0, 227, 0, 0, 0, 0, 0, 0, 28, 0,
5557 0, 31, 32, 33, 34, 35, 36, 37, 38, 39,
5558 0, 40, 41, 42, 43, 44, 45, 46, 0, 0,
5559 0, 0, 0, 0, 0, 0, 0, 0, 47, 48,
5560 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5561 0, 0, 0, 49, 50, 0, 0, 0, 0, 0,
5562 0, 229, 0, 0, 230, 53, 54, 55, 0, 0,
5563 0, 0, 57, 58, 59, 60, 61, 62, 63, 64,
5564 65, 0, 0, 0, 0, 4, 5, 6, 0, 8,
5565 0, 0, 0, 9, 10, 0, 0, 0, 11, 0,
5566 12, 13, 14, 15, 16, 17, 18, 0, 0, 66,
5567 235, 68, 19, 20, 21, 22, 23, 24, 25, 0,
5568 0, 227, 0, 0, 0, 0, 0, 0, 28, 0,
5569 0, 31, 32, 33, 34, 35, 36, 37, 38, 39,
5570 0, 40, 41, 42, 43, 44, 45, 46, 0, 0,
5571 0, 0, 0, 0, 0, 0, 0, 0, 47, 48,
5572 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5573 0, 0, 0, 49, 50, 0, 0, 0, 0, 0,
5574 0, 229, 0, 0, 230, 53, 54, 55, 0, 0,
5575 0, 0, 57, 58, 59, 60, 61, 62, 63, 64,
5576 65, 0, 0, 0, 0, 4, 5, 6, 0, 8,
5577 0, 0, 0, 9, 10, 0, 0, 0, 11, 0,
5578 12, 13, 14, 15, 16, 17, 18, 0, 0, 66,
5579 235, 68, 19, 20, 21, 22, 23, 24, 25, 0,
5580 0, 26, 0, 0, 0, 0, 0, 0, 28, 0,
5581 0, 31, 32, 33, 34, 35, 36, 37, 38, 39,
5582 0, 40, 41, 42, 43, 44, 45, 46, 0, 0,
5583 0, 0, 0, 0, 0, 0, 0, 0, 47, 48,
5584 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5585 0, 0, 0, 49, 50, 0, 0, 0, 0, 0,
5586 0, 229, 0, 0, 230, 53, 54, 55, 0, 0,
5587 0, 0, 57, 58, 59, 60, 61, 62, 63, 64,
5588 65, 0, 0, 0, 0, 4, 5, 6, 0, 8,
5589 0, 0, 0, 9, 10, 0, 0, 0, 11, 0,
5590 12, 13, 14, 15, 16, 17, 18, 0, 0, 66,
5591 67, 68, 19, 20, 21, 22, 23, 24, 25, 0,
5592 0, 784, 0, 0, 0, 0, 0, 0, 28, 0,
5593 0, 31, 32, 33, 34, 35, 36, 37, 38, 39,
5594 0, 40, 41, 42, 43, 44, 45, 46, 0, 0,
5595 0, 0, 0, 0, 0, 0, 0, 0, 47, 48,
5596 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5597 0, 0, 0, 49, 50, 0, 0, 0, 0, 0,
5598 0, 229, 0, 0, 230, 53, 54, 55, 0, 0,
5599 0, 0, 57, 58, 59, 60, 61, 62, 63, 64,
5600 65, 0, 0, 0, 0, 4, 5, 6, 0, 8,
5601 0, 0, 0, 9, 10, 0, 0, 0, 11, 0,
5602 12, 13, 14, 15, 16, 17, 18, 0, 0, 66,
5603 235, 68, 19, 20, 21, 22, 23, 24, 25, 0,
5604 0, 227, 0, 0, 0, 0, 0, 0, 28, 0,
5605 0, 31, 32, 33, 34, 35, 36, 37, 38, 39,
5606 0, 40, 41, 42, 43, 44, 45, 46, 0, 0,
5607 0, 0, 0, 0, 0, 0, 0, 0, 47, 48,
5608 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5609 0, 0, 0, 49, 50, 0, 0, 0, 0, 0,
5610 0, 813, 0, 0, 230, 53, 54, 55, 0, 0,
5611 0, 0, 57, 58, 59, 60, 61, 62, 63, 64,
5612 65, 0, 0, 0, 0, 4, 5, 6, 0, 8,
5613 0, 0, 0, 9, 10, 0, 0, 0, 11, 0,
5614 12, 13, 14, 270, 271, 17, 18, 0, 0, 66,
5615 235, 68, 19, 20, 272, 22, 23, 24, 25, 0,
5616 0, 893, 0, 0, 0, 0, 0, 0, 28, 0,
5617 0, 31, 32, 33, 34, 35, 36, 37, 38, 39,
5618 0, 40, 41, 42, 43, 44, 45, 46, 0, 0,
5619 0, 0, 0, 0, 0, 0, 0, 0, 47, 48,
5620 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5621 0, 0, 0, 49, 50, 0, 0, 0, 0, 0,
5622 0, 229, 0, 0, 230, 53, 54, 55, 0, 0,
5623 0, 0, 57, 58, 59, 60, 61, 62, 63, 64,
5624 65, 0, 0, 0, 0, 4, 5, 6, 0, 8,
5625 0, 0, 0, 9, 10, 0, 0, 0, 11, 0,
5626 12, 13, 14, 270, 271, 17, 18, 0, 0, 66,
5627 235, 68, 19, 20, 272, 22, 23, 24, 25, 0,
5628 0, 227, 0, 0, 0, 0, 0, 0, 302, 0,
5629 0, 31, 32, 33, 34, 35, 36, 37, 38, 39,
5630 0, 40, 41, 42, 43, 44, 45, 46, 0, 0,
5631 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5632 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5633 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5634 0, 303, 0, 0, 363, 53, 54, 55, 0, 364,
5635 0, 0, 57, 58, 59, 60, 61, 62, 63, 64,
5636 65, 0, 0, 4, 5, 6, 0, 8, 0, 0,
5637 0, 9, 10, 0, 0, 0, 11, 0, 12, 13,
5638 14, 270, 271, 17, 18, 0, 0, 0, 0, 304,
5639 19, 20, 272, 22, 23, 24, 25, 0, 0, 227,
5640 0, 0, 0, 0, 0, 0, 302, 0, 0, 31,
5641 32, 33, 34, 35, 36, 37, 38, 39, 0, 40,
5642 41, 42, 43, 44, 45, 46, 0, 0, 0, 0,
5643 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5644 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5645 0, 0, 0, 0, 0, 0, 0, 0, 0, 415,
5646 0, 0, 52, 53, 54, 55, 0, 56, 0, 0,
5647 57, 58, 59, 60, 61, 62, 63, 64, 65, 0,
5648 0, 4, 5, 6, 0, 8, 0, 0, 0, 9,
5649 10, 0, 0, 0, 11, 0, 12, 13, 14, 270,
5650 271, 17, 18, 0, 0, 0, 0, 304, 19, 20,
5651 272, 22, 23, 24, 25, 0, 0, 227, 0, 0,
5652 0, 0, 0, 0, 302, 0, 0, 31, 32, 33,
5653 423, 35, 36, 37, 424, 39, 0, 40, 41, 42,
5654 43, 44, 45, 46, 0, 0, 0, 0, 0, 0,
5655 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5656 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5657 0, 0, 0, 425, 0, 0, 0, 426, 0, 0,
5658 230, 53, 54, 55, 0, 0, 0, 0, 57, 58,
5659 59, 60, 61, 62, 63, 64, 65, 0, 0, 4,
5660 5, 6, 0, 8, 0, 0, 0, 9, 10, 0,
5661 0, 0, 11, 0, 12, 13, 14, 270, 271, 17,
5662 18, 0, 0, 0, 0, 304, 19, 20, 272, 22,
5663 23, 24, 25, 0, 0, 227, 0, 0, 0, 0,
5664 0, 0, 302, 0, 0, 31, 32, 33, 423, 35,
5665 36, 37, 424, 39, 0, 40, 41, 42, 43, 44,
5666 45, 46, 0, 0, 0, 0, 0, 0, 0, 0,
5667 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5668 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5669 0, 0, 0, 0, 0, 426, 0, 0, 230, 53,
5670 54, 55, 0, 0, 0, 0, 57, 58, 59, 60,
5671 61, 62, 63, 64, 65, 0, 0, 4, 5, 6,
5672 0, 8, 0, 0, 0, 9, 10, 0, 0, 0,
5673 11, 0, 12, 13, 14, 270, 271, 17, 18, 0,
5674 0, 0, 0, 304, 19, 20, 272, 22, 23, 24,
5675 25, 0, 0, 227, 0, 0, 0, 0, 0, 0,
5676 302, 0, 0, 31, 32, 33, 34, 35, 36, 37,
5677 38, 39, 0, 40, 41, 42, 43, 44, 45, 46,
5678 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5679 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5680 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5681 0, 0, 0, 303, 0, 0, 363, 53, 54, 55,
5682 0, 0, 0, 0, 57, 58, 59, 60, 61, 62,
5683 63, 64, 65, 0, 0, 4, 5, 6, 0, 8,
5684 0, 0, 0, 9, 10, 0, 0, 0, 11, 0,
5685 12, 13, 14, 270, 271, 17, 18, 0, 0, 0,
5686 0, 304, 19, 20, 272, 22, 23, 24, 25, 0,
5687 0, 227, 0, 0, 0, 0, 0, 0, 302, 0,
5688 0, 31, 32, 33, 34, 35, 36, 37, 38, 39,
5689 0, 40, 41, 42, 43, 44, 45, 46, 0, 0,
5690 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5691 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5692 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5693 0, 1221, 0, 0, 230, 53, 54, 55, 0, 0,
5694 0, 0, 57, 58, 59, 60, 61, 62, 63, 64,
5695 65, 0, 0, 4, 5, 6, 0, 8, 0, 0,
5696 0, 9, 10, 0, 0, 0, 11, 0, 12, 13,
5697 14, 270, 271, 17, 18, 0, 0, 0, 0, 304,
5698 19, 20, 272, 22, 23, 24, 25, 0, 0, 227,
5699 0, 0, 0, 0, 0, 0, 302, 0, 0, 31,
5700 32, 33, 34, 35, 36, 37, 38, 39, 0, 40,
5701 41, 42, 43, 44, 45, 46, 0, 0, 0, 0,
5702 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5703 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5704 0, 0, 0, 0, 0, 0, 704, 643, 0, 1344,
5705 705, 0, 230, 53, 54, 55, 0, 0, 0, 0,
5706 57, 58, 59, 60, 61, 62, 63, 64, 65, 0,
5707 188, 189, 190, 191, 192, 193, 194, 195, 196, 0,
5708 0, 197, 198, 0, 0, 0, 0, 199, 200, 201,
5709 202, 0, 0, 0, 0, 0, 0, 304, 0, 0,
5710 0, 203, 204, 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, 0, 0, 0, 0,
5713 0, 205, 206, 207, 208, 209, 210, 211, 212, 213,
5714 214, 0, 215, 216, 707, 651, 0, 0, 708, 0,
5715 217, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5716 0, 0, 0, 0, 0, 0, 0, 0, 188, 189,
5717 190, 191, 192, 193, 194, 195, 196, 0, 0, 197,
5718 198, 0, 0, 0, 0, 199, 200, 201, 202, 0,
5719 0, 0, 0, 0, 0, 0, 0, 0, 0, 203,
5720 204, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5721 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5722 0, 0, 0, 0, 0, 0, 0, 0, 0, 205,
5723 206, 207, 208, 209, 210, 211, 212, 213, 214, 0,
5724 215, 216, 704, 643, 0, 0, 724, 0, 217, 0,
5725 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5726 0, 0, 0, 0, 0, 0, 188, 189, 190, 191,
5727 192, 193, 194, 195, 196, 0, 0, 197, 198, 0,
5728 0, 0, 0, 199, 200, 201, 202, 0, 0, 0,
5729 0, 0, 0, 0, 0, 0, 0, 203, 204, 0,
5730 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5731 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5732 0, 0, 0, 0, 0, 0, 0, 205, 206, 207,
5733 208, 209, 210, 211, 212, 213, 214, 0, 215, 216,
5734 735, 643, 0, 0, 736, 0, 217, 0, 0, 0,
5735 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5736 0, 0, 0, 0, 188, 189, 190, 191, 192, 193,
5737 194, 195, 196, 0, 0, 197, 198, 0, 0, 0,
5738 0, 199, 200, 201, 202, 0, 0, 0, 0, 0,
5739 0, 0, 0, 0, 0, 203, 204, 0, 0, 0,
5740 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5741 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5742 0, 0, 0, 0, 0, 205, 206, 207, 208, 209,
5743 210, 211, 212, 213, 214, 0, 215, 216, 738, 651,
5744 0, 0, 739, 0, 217, 0, 0, 0, 0, 0,
5745 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5746 0, 0, 188, 189, 190, 191, 192, 193, 194, 195,
5747 196, 0, 0, 197, 198, 0, 0, 0, 0, 199,
5748 200, 201, 202, 0, 0, 0, 0, 0, 0, 0,
5749 0, 0, 0, 203, 204, 0, 0, 0, 0, 0,
5750 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5751 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5752 0, 0, 0, 205, 206, 207, 208, 209, 210, 211,
5753 212, 213, 214, 0, 215, 216, 857, 643, 0, 0,
5754 858, 0, 217, 0, 0, 0, 0, 0, 0, 0,
5755 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5756 188, 189, 190, 191, 192, 193, 194, 195, 196, 0,
5757 0, 197, 198, 0, 0, 0, 0, 199, 200, 201,
5758 202, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5759 0, 203, 204, 0, 0, 0, 0, 0, 0, 0,
5760 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5761 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5762 0, 205, 206, 207, 208, 209, 210, 211, 212, 213,
5763 214, 0, 215, 216, 860, 651, 0, 0, 861, 0,
5764 217, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5765 0, 0, 0, 0, 0, 0, 0, 0, 188, 189,
5766 190, 191, 192, 193, 194, 195, 196, 0, 0, 197,
5767 198, 0, 0, 0, 0, 199, 200, 201, 202, 0,
5768 0, 0, 0, 0, 0, 0, 0, 0, 0, 203,
5769 204, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5770 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5771 0, 0, 0, 0, 0, 0, 0, 0, 0, 205,
5772 206, 207, 208, 209, 210, 211, 212, 213, 214, 0,
5773 215, 216, 866, 643, 0, 0, 867, 0, 217, 0,
5774 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5775 0, 0, 0, 0, 0, 0, 188, 189, 190, 191,
5776 192, 193, 194, 195, 196, 0, 0, 197, 198, 0,
5777 0, 0, 0, 199, 200, 201, 202, 0, 0, 0,
5778 0, 0, 0, 0, 0, 0, 0, 203, 204, 0,
5779 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5780 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5781 0, 0, 0, 0, 0, 0, 0, 205, 206, 207,
5782 208, 209, 210, 211, 212, 213, 214, 0, 215, 216,
5783 689, 651, 0, 0, 690, 0, 217, 0, 0, 0,
5784 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5785 0, 0, 0, 0, 188, 189, 190, 191, 192, 193,
5786 194, 195, 196, 0, 0, 197, 198, 0, 0, 0,
5787 0, 199, 200, 201, 202, 0, 0, 0, 0, 0,
5788 0, 0, 0, 0, 0, 203, 204, 0, 0, 0,
5789 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5790 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5791 0, 0, 0, 0, 0, 205, 206, 207, 208, 209,
5792 210, 211, 212, 213, 214, 0, 215, 216, 1028, 643,
5793 0, 0, 1029, 0, 217, 0, 0, 0, 0, 0,
5794 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5795 0, 0, 188, 189, 190, 191, 192, 193, 194, 195,
5796 196, 0, 0, 197, 198, 0, 0, 0, 0, 199,
5797 200, 201, 202, 0, 0, 0, 0, 0, 0, 0,
5798 0, 0, 0, 203, 204, 0, 0, 0, 0, 0,
5799 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5800 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5801 0, 0, 0, 205, 206, 207, 208, 209, 210, 211,
5802 212, 213, 214, 0, 215, 216, 1031, 651, 0, 0,
5803 1032, 0, 217, 0, 0, 0, 0, 0, 0, 0,
5804 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5805 188, 189, 190, 191, 192, 193, 194, 195, 196, 0,
5806 0, 197, 198, 0, 0, 0, 0, 199, 200, 201,
5807 202, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5808 0, 203, 204, 0, 0, 0, 0, 0, 0, 0,
5809 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5810 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5811 0, 205, 206, 207, 208, 209, 210, 211, 212, 213,
5812 214, 0, 215, 216, 1363, 643, 0, 0, 1364, 0,
5813 217, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5814 0, 0, 0, 0, 0, 0, 0, 0, 188, 189,
5815 190, 191, 192, 193, 194, 195, 196, 0, 0, 197,
5816 198, 0, 0, 0, 0, 199, 200, 201, 202, 0,
5817 0, 0, 0, 0, 0, 0, 0, 0, 0, 203,
5818 204, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5819 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5820 0, 0, 0, 0, 0, 0, 0, 0, 0, 205,
5821 206, 207, 208, 209, 210, 211, 212, 213, 214, 0,
5822 215, 216, 1366, 651, 0, 0, 1367, 0, 217, 0,
5823 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5824 0, 0, 0, 0, 0, 0, 188, 189, 190, 191,
5825 192, 193, 194, 195, 196, 0, 0, 197, 198, 0,
5826 0, 0, 0, 199, 200, 201, 202, 0, 0, 0,
5827 0, 0, 0, 0, 0, 0, 0, 203, 204, 0,
5828 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5829 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5830 0, 0, 0, 0, 0, 0, 0, 205, 206, 207,
5831 208, 209, 210, 211, 212, 213, 214, 0, 215, 216,
5832 1420, 643, 0, 0, 1421, 0, 217, 0, 0, 0,
5833 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5834 0, 0, 0, 0, 188, 189, 190, 191, 192, 193,
5835 194, 195, 196, 0, 0, 197, 198, 0, 0, 0,
5836 0, 199, 200, 201, 202, 0, 0, 0, 0, 0,
5837 0, 0, 0, 0, 0, 203, 204, 0, 0, 0,
5838 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5839 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5840 0, 0, 0, 0, 0, 205, 206, 207, 208, 209,
5841 210, 211, 212, 213, 214, 0, 215, 216, 0, 0,
5842 0, 0, 0, 0, 217
5843};
5844
5845static const yytype_int16 yycheck[] =
5846{
5847 1, 70, 59, 70, 7, 15, 16, 408, 56, 107,
5848 15, 16, 58, 58, 116, 52, 53, 344, 1, 101,
5849 67, 399, 349, 401, 27, 104, 400, 426, 107, 13,
5850 14, 768, 766, 115, 255, 252, 7, 27, 107, 15,
5851 16, 89, 599, 766, 949, 602, 845, 615, 601, 15,
5852 16, 52, 53, 54, 55, 58, 27, 84, 469, 477,
5853 108, 109, 110, 21, 575, 111, 601, 855, 63, 64,
5854 65, 344, 89, 911, 469, 571, 349, 455, 54, 575,
5855 296, 56, 477, 525, 300, 605, 113, 589, 54, 55,
5856 1033, 1034, 913, 595, 472, 1194, 474, 515, 766, 473,
5857 52, 512, 112, 66, 630, 25, 25, 112, 111, 1208,
5858 1034, 81, 774, 0, 103, 104, 27, 825, 107, 15,
5859 16, 1318, 774, 13, 502, 682, 84, 29, 26, 1336,
5860 69, 1, 565, 25, 285, 1194, 112, 78, 66, 768,
5861 101, 109, 1000, 69, 66, 774, 112, 25, 25, 0,
5862 528, 1210, 25, 527, 1059, 1070, 1218, 1219, 97, 98,
5863 1033, 1034, 154, 25, 81, 247, 13, 66, 25, 134,
5864 612, 30, 98, 141, 10, 25, 100, 234, 13, 100,
5865 320, 321, 52, 53, 151, 26, 56, 28, 723, 287,
5866 134, 119, 157, 230, 155, 277, 26, 119, 13, 1104,
5867 56, 1106, 69, 144, 145, 146, 1403, 1000, 1066, 1416,
5868 134, 155, 363, 134, 153, 1158, 112, 155, 287, 89,
5869 287, 123, 121, 122, 706, 124, 37, 38, 310, 230,
5870 97, 98, 68, 120, 1158, 155, 155, 157, 108, 109,
5871 110, 111, 28, 154, 245, 255, 1084, 257, 285, 160,
5872 255, 252, 257, 151, 255, 737, 1355, 305, 337, 338,
5873 339, 340, 1083, 155, 154, 266, 13, 484, 1211, 977,
5874 160, 260, 261, 1066, 1011, 1218, 1219, 155, 155, 255,
5875 679, 257, 155, 266, 285, 1158, 153, 13, 305, 1351,
5876 1349, 257, 670, 155, 1353, 669, 1355, 715, 155, 336,
5877 157, 13, 713, 681, 274, 155, 680, 154, 865, 829,
5878 157, 1216, 1217, 160, 272, 413, 364, 275, 713, 154,
5879 715, 151, 755, 756, 161, 160, 363, 157, 854, 1244,
5880 409, 609, 13, 285, 100, 336, 418, 307, 1000, 154,
5881 1255, 304, 1257, 154, 413, 160, 425, 100, 337, 338,
5882 339, 340, 335, 342, 343, 1007, 273, 274, 1157, 13,
5883 230, 257, 363, 101, 1423, 1033, 1034, 154, 134, 1157,
5884 812, 1000, 159, 410, 411, 1168, 929, 859, 1171, 657,
5885 1173, 134, 1011, 100, 831, 663, 664, 869, 13, 364,
5886 400, 157, 839, 961, 929, 400, 266, 101, 401, 400,
5887 1105, 541, 403, 543, 1066, 264, 917, 154, 1351, 410,
5888 411, 363, 34, 160, 134, 285, 154, 134, 920, 921,
5889 409, 917, 924, 834, 926, 982, 928, 428, 154, 155,
5890 52, 1168, 1166, 66, 160, 305, 425, 1066, 155, 834,
5891 13, 451, 154, 1166, 402, 157, 451, 25, 160, 34,
5892 100, 155, 455, 100, 295, 296, 152, 134, 154, 300,
5893 15, 302, 100, 473, 999, 335, 336, 52, 473, 1384,
5894 25, 474, 473, 154, 100, 451, 100, 525, 911, 160,
5895 913, 482, 615, 484, 134, 451, 703, 134, 121, 122,
5896 1158, 494, 713, 363, 364, 768, 134, 455, 1166, 502,
5897 154, 774, 361, 469, 494, 155, 160, 366, 525, 1171,
5898 134, 789, 155, 1218, 1219, 793, 732, 527, 100, 1171,
5899 1101, 1102, 527, 494, 100, 528, 527, 938, 161, 154,
5900 1323, 600, 1325, 403, 1327, 160, 1329, 69, 290, 1168,
5901 410, 411, 1171, 1211, 344, 15, 512, 17, 1030, 349,
5902 1218, 1219, 134, 1182, 154, 451, 134, 157, 134, 98,
5903 693, 694, 58, 610, 612, 97, 98, 945, 615, 947,
5904 112, 554, 946, 155, 975, 853, 154, 155, 856, 997,
5905 158, 154, 78, 1085, 1086, 1087, 1088, 160, 598, 157,
5906 1327, 601, 870, 662, 727, 612, 100, 100, 599, 458,
5907 459, 602, 997, 1402, 744, 56, 66, 67, 467, 749,
5908 134, 1334, 108, 109, 153, 1408, 475, 476, 157, 646,
5909 69, 153, 659, 1105, 661, 157, 101, 654, 25, 1186,
5910 134, 134, 1213, 1214, 610, 100, 495, 794, 508, 615,
5911 797, 25, 693, 694, 503, 141, 693, 694, 649, 98,
5912 1083, 1084, 1053, 654, 78, 525, 155, 69, 659, 669,
5913 661, 121, 122, 155, 669, 692, 1334, 670, 669, 134,
5914 680, 1323, 25, 1000, 891, 680, 727, 34, 681, 680,
5915 727, 682, 100, 1351, 554, 733, 98, 78, 646, 1341,
5916 968, 692, 695, 971, 683, 52, 1182, 742, 1327, 451,
5917 978, 100, 703, 157, 1103, 695, 984, 1336, 158, 1079,
5918 1080, 1193, 1341, 157, 1196, 157, 733, 154, 142, 143,
5919 144, 145, 146, 160, 695, 726, 134, 1000, 480, 599,
5920 719, 483, 602, 69, 1216, 134, 488, 134, 1011, 1066,
5921 822, 52, 612, 159, 100, 56, 1147, 713, 69, 744,
5922 134, 746, 1254, 505, 749, 750, 155, 154, 155, 69,
5923 1412, 158, 98, 1320, 812, 154, 934, 725, 936, 158,
5924 154, 155, 874, 157, 158, 100, 97, 98, 134, 1000,
5925 100, 134, 69, 862, 1062, 864, 100, 1416, 98, 659,
5926 631, 661, 152, 1066, 863, 812, 66, 656, 1033, 1034,
5927 69, 154, 155, 83, 84, 158, 56, 648, 157, 134,
5928 97, 98, 682, 155, 134, 161, 1215, 69, 951, 952,
5929 134, 1303, 1304, 1305, 957, 958, 872, 69, 97, 98,
5930 155, 583, 153, 1267, 1235, 1269, 134, 696, 69, 78,
5931 841, 155, 843, 69, 845, 1066, 98, 106, 1334, 119,
5932 1336, 121, 122, 69, 124, 1341, 98, 137, 138, 611,
5933 1346, 37, 38, 733, 865, 706, 153, 98, 834, 872,
5934 1105, 97, 98, 862, 69, 864, 1246, 1247, 1248, 1249,
5935 1250, 97, 98, 1365, 153, 14, 15, 1122, 967, 69,
5936 891, 732, 69, 1026, 134, 1168, 737, 134, 1171, 155,
5937 951, 952, 97, 98, 951, 952, 957, 958, 1041, 1182,
5938 957, 958, 981, 52, 983, 899, 160, 56, 98, 929,
5939 69, 98, 56, 1158, 154, 155, 1412, 153, 1414, 966,
5940 1416, 1309, 1418, 25, 1308, 687, 946, 153, 69, 154,
5941 155, 946, 812, 784, 947, 946, 138, 1168, 97, 98,
5942 1171, 1437, 1173, 1387, 1388, 155, 1191, 1391, 1392, 1237,
5943 961, 1395, 26, 152, 69, 966, 97, 98, 827, 828,
5944 155, 603, 69, 1208, 69, 607, 835, 836, 967, 1026,
5945 158, 982, 134, 1218, 1219, 961, 69, 89, 90, 100,
5946 1041, 69, 97, 98, 1041, 865, 1430, 1431, 1432, 1433,
5947 97, 98, 97, 98, 153, 69, 1440, 759, 134, 1379,
5948 1380, 1381, 1382, 1349, 97, 98, 158, 1353, 859, 97,
5949 98, 1058, 153, 134, 40, 41, 885, 886, 869, 888,
5950 889, 154, 155, 97, 98, 155, 1020, 1021, 306, 307,
5951 152, 1024, 1025, 26, 155, 1082, 155, 1048, 153, 1050,
5952 54, 1108, 893, 58, 1327, 155, 153, 1058, 153, 1429,
5953 64, 65, 155, 1336, 1109, 66, 1067, 762, 1341, 1070,
5954 153, 766, 1073, 78, 155, 153, 134, 52, 1079, 1080,
5955 155, 1082, 155, 152, 943, 155, 69, 151, 155, 153,
5956 1091, 1092, 66, 157, 26, 13, 966, 956, 1146, 1377,
5957 17, 25, 1323, 108, 1325, 155, 1327, 112, 1329, 155,
5958 134, 78, 982, 44, 97, 98, 1153, 1154, 119, 871,
5959 121, 122, 1159, 124, 44, 1208, 1205, 152, 95, 96,
5960 1228, 44, 155, 78, 993, 1218, 1219, 69, 890, 44,
5961 892, 1223, 155, 1416, 56, 119, 1183, 121, 122, 1150,
5962 95, 96, 1153, 1154, 1024, 1025, 1157, 909, 1159, 1228,
5963 136, 1228, 66, 1033, 1034, 97, 98, 159, 151, 134,
5964 153, 8, 930, 931, 157, 142, 143, 144, 145, 146,
5965 15, 939, 1183, 155, 942, 1186, 944, 1408, 1058, 1030,
5966 1227, 52, 155, 155, 139, 140, 141, 142, 143, 144,
5967 145, 146, 66, 155, 155, 1242, 78, 40, 41, 42,
5968 43, 44, 1082, 155, 152, 119, 1205, 121, 122, 151,
5969 1268, 153, 66, 95, 96, 157, 1227, 155, 155, 1230,
5970 155, 1101, 1102, 1290, 101, 1105, 1315, 1316, 66, 9,
5971 155, 1242, 139, 1244, 155, 1246, 1247, 1248, 1249, 1250,
5972 52, 139, 1122, 155, 1255, 119, 1257, 121, 122, 155,
5973 1261, 155, 155, 155, 1105, 1106, 1267, 152, 1269, 141,
5974 142, 143, 144, 145, 146, 119, 1146, 121, 122, 155,
5975 1150, 155, 101, 1153, 1154, 52, 155, 56, 1158, 1159,
5976 160, 119, 1340, 121, 122, 158, 155, 52, 1308, 54,
5977 55, 56, 57, 1308, 155, 1000, 1309, 1308, 155, 1310,
5978 155, 1312, 52, 1183, 54, 55, 1186, 57, 152, 1320,
5979 1161, 1191, 139, 155, 1194, 155, 1315, 1316, 59, 60,
5980 61, 62, 155, 1370, 155, 155, 56, 55, 1208, 155,
5981 1210, 1200, 155, 1213, 1214, 1, 155, 102, 1218, 1219,
5982 155, 155, 1193, 335, 155, 1196, 155, 1227, 155, 15,
5983 16, 157, 102, 52, 157, 54, 55, 56, 57, 1370,
5984 155, 1066, 1242, 72, 504, 1216, 266, 1150, 1379, 1380,
5985 1381, 1382, 872, 1384, 508, 106, 1387, 1388, 610, 108,
5986 1391, 1392, 98, 1000, 1395, 110, 52, 53, 1268, 495,
5987 56, 1402, 692, 962, 54, 55, 981, 57, 1230, 911,
5988 755, 67, 1266, 102, 64, 65, 1334, 1287, 107, 1182,
5989 1092, 1265, 1403, 875, 1265, 1341, 359, 1287, 1429, 1430,
5990 1431, 1432, 1433, 89, 1211, 1211, 1207, 1312, 1402, 1440,
5991 52, 1310, 54, 55, 56, 57, 58, 103, 104, 119,
5992 1320, 107, 108, 109, 110, 543, 112, 111, 349, 1066,
5993 1066, 1397, 1303, 1304, 1305, 1217, 78, 1162, 115, -1,
5994 1340, 1166, -1, 1168, -1, -1, 1171, -1, 1173, 1349,
5995 92, -1, -1, 1353, -1, 1355, -1, 1182, -1, 52,
5996 102, 54, 55, 56, 57, 107, 108, 109, -1, 52,
5997 1370, 54, 55, 56, 57, -1, -1, -1, -1, -1,
5998 228, -1, -1, 231, 232, 233, -1, -1, -1, -1,
5999 -1, 1273, -1, -1, 1365, -1, -1, -1, -1, 141,
6000 -1, 1283, 144, 1374, 52, -1, 54, 55, 56, 57,
6001 58, -1, -1, -1, -1, 157, -1, 768, 1300, 1301,
6002 1302, -1, -1, 1423, -1, -1, 1397, -1, -1, 780,
6003 78, 1168, -1, -1, 1171, -1, 1173, 1, -1, -1,
6004 -1, -1, -1, -1, 230, 1182, -1, -1, 693, 694,
6005 -1, 15, 16, -1, 102, -1, -1, -1, -1, 107,
6006 108, 109, -1, -1, 709, 710, -1, -1, -1, 255,
6007 -1, 257, -1, -1, 260, 261, -1, -1, -1, -1,
6008 266, 52, 727, 54, 55, 56, 57, 58, 52, 53,
6009 -1, -1, -1, 141, -1, -1, 144, -1, 1323, 285,
6010 1325, -1, 1327, 67, 1329, -1, -1, 78, -1, 1334,
6011 -1, 1336, -1, -1, -1, -1, 1341, -1, -1, 305,
6012 -1, 1346, -1, -1, -1, -1, -1, -1, -1, -1,
6013 -1, 102, -1, -1, -1, -1, -1, 108, 109, 103,
6014 104, -1, -1, 107, -1, -1, -1, -1, 112, 335,
6015 336, 337, 338, 339, 340, -1, 342, 343, -1, -1,
6016 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6017 141, -1, -1, -1, -1, -1, -1, 363, 364, 1033,
6018 1034, -1, -1, 1408, -1, -1, 1323, 1412, 1325, 1414,
6019 1327, 1416, 1329, 1418, -1, -1, -1, -1, -1, 1336,
6020 -1, -1, -1, -1, 1341, -1, -1, -1, -1, 1346,
6021 -1, -1, 1437, -1, 400, -1, -1, 403, -1, -1,
6022 468, 469, -1, 409, 410, 411, -1, -1, -1, 477,
6023 -1, -1, -1, -1, -1, -1, -1, 882, -1, 425,
6024 -1, -1, -1, -1, -1, -1, -1, 1101, 1102, 1000,
6025 -1, 1105, -1, -1, -1, -1, -1, -1, 1009, -1,
6026 1011, -1, 1013, -1, 512, 451, 230, 515, 1122, -1,
6027 -1, 1408, -1, -1, -1, 1412, -1, 1414, -1, 1416,
6028 -1, 1418, -1, -1, -1, -1, -1, 473, -1, -1,
6029 -1, 255, -1, 257, -1, -1, 260, 261, -1, -1,
6030 1437, -1, 266, -1, 1158, -1, 951, 952, -1, -1,
6031 -1, -1, 957, 958, -1, 1066, -1, -1, -1, -1,
6032 -1, 285, 508, -1, -1, -1, -1, -1, -1, -1,
6033 -1, -1, -1, -1, -1, -1, -1, 1191, -1, 525,
6034 1194, 527, 590, -1, -1, -1, 991, 992, -1, 994,
6035 995, -1, -1, -1, 1208, -1, 1210, -1, -1, 1213,
6036 1214, -1, 610, -1, 1218, 1219, -1, 615, 554, -1,
6037 -1, 335, 336, 337, 338, 339, 340, -1, 342, 343,
6038 -1, -1, -1, -1, -1, -1, -1, 1033, 1034, -1,
6039 -1, -1, -1, -1, -1, -1, 1041, -1, -1, 363,
6040 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6041 -1, -1, 598, 599, -1, 601, 602, 1168, -1, -1,
6042 1065, -1, 1173, -1, 610, -1, 612, -1, 1179, 615,
6043 -1, 1182, -1, 1287, -1, -1, 400, -1, -1, 403,
6044 -1, -1, -1, -1, -1, 409, 410, 411, 52, 697,
6045 54, 55, 56, 57, 58, 1101, 1102, -1, -1, 1105,
6046 -1, 425, -1, -1, -1, 713, 52, 715, 54, 55,
6047 56, 57, 58, 659, 78, 661, 1122, -1, -1, -1,
6048 -1, -1, -1, 669, -1, -1, -1, 451, 92, -1,
6049 -1, -1, 78, -1, 680, 1349, 682, 683, 102, 1353,
6050 -1, 1355, -1, 107, 108, 109, 92, 693, 694, 473,
6051 -1, -1, 1158, -1, -1, -1, 102, -1, -1, -1,
6052 -1, -1, 108, 109, -1, 773, -1, -1, -1, -1,
6053 -1, -1, -1, 719, -1, -1, -1, 141, -1, -1,
6054 144, 727, -1, -1, 508, 1191, -1, 733, 1194, -1,
6055 -1, -1, -1, -1, 802, 141, -1, -1, -1, -1,
6056 -1, -1, 1208, 527, 1210, -1, -1, 1213, 1214, 1423,
6057 -1, -1, 1218, 1219, 1325, -1, 1327, -1, 1329, -1,
6058 -1, -1, -1, -1, -1, 1336, 834, -1, -1, -1,
6059 554, -1, -1, -1, -1, 1346, -1, -1, -1, -1,
6060 -1, -1, -1, -1, 852, -1, -1, -1, -1, -1,
6061 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6062 -1, -1, -1, -1, -1, -1, 812, -1, -1, -1,
6063 -1, -1, -1, -1, 598, 599, -1, 601, 602, -1,
6064 -1, 1287, -1, -1, -1, -1, 610, -1, -1, -1,
6065 -1, 615, -1, -1, -1, -1, -1, 1408, -1, -1,
6066 -1, -1, -1, 1414, -1, 1416, -1, 1418, -1, -1,
6067 -1, -1, -1, -1, -1, -1, 862, -1, 864, 865,
6068 -1, -1, -1, -1, -1, -1, 1437, 1, -1, -1,
6069 938, -1, -1, -1, -1, 659, -1, 661, -1, -1,
6070 -1, 15, 16, 1349, -1, 669, -1, 1353, -1, 1355,
6071 -1, -1, -1, 961, -1, -1, 680, -1, 682, 683,
6072 -1, -1, -1, -1, -1, 973, -1, -1, -1, 693,
6073 694, -1, -1, -1, -1, -1, -1, -1, 52, 53,
6074 -1, -1, -1, 929, -1, -1, -1, -1, -1, 997,
6075 -1, -1, -1, 67, -1, 719, -1, -1, -1, -1,
6076 946, -1, -1, 727, -1, 951, 952, -1, -1, -1,
6077 -1, 957, 958, -1, 1022, -1, -1, 1423, -1, -1,
6078 966, 967, -1, -1, -1, -1, -1, -1, -1, 103,
6079 104, -1, -1, 107, -1, -1, 982, -1, 112, 33,
6080 34, 35, 36, -1, -1, -1, -1, -1, -1, 1057,
6081 -1, -1, -1, -1, -1, 49, 50, 51, 52, -1,
6082 -1, -1, 56, -1, -1, 59, 60, 61, 62, 63,
6083 -1, -1, -1, -1, -1, -1, -1, -1, 1024, 1025,
6084 1026, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6085 -1, -1, -1, -1, -1, 1041, -1, 91, 92, 1033,
6086 1034, -1, -1, -1, -1, 99, -1, -1, 102, -1,
6087 104, 105, 1058, 107, -1, -1, 110, 111, 112, 113,
6088 114, 115, 116, 117, 118, -1, -1, -1, -1, 1033,
6089 1034, -1, -1, -1, -1, -1, 1082, -1, 862, -1,
6090 864, 865, -1, -1, -1, -1, 140, 1155, -1, -1,
6091 -1, -1, -1, 147, -1, -1, 230, -1, -1, -1,
6092 154, -1, -1, 1033, 1034, -1, -1, 1101, 1102, -1,
6093 -1, 1105, -1, -1, -1, -1, -1, -1, -1, -1,
6094 -1, 255, -1, 257, -1, -1, 260, 261, 1122, -1,
6095 -1, -1, 266, -1, -1, -1, -1, 1101, 1102, -1,
6096 1146, 1105, -1, -1, 1150, 929, -1, 1153, 1154, -1,
6097 -1, 285, -1, 1159, -1, -1, -1, -1, 1122, -1,
6098 -1, -1, 946, -1, 1158, -1, -1, 951, 952, -1,
6099 -1, 1101, 1102, 957, 958, 1105, -1, 1183, -1, -1,
6100 1186, -1, 966, 967, -1, -1, -1, -1, -1, -1,
6101 -1, -1, 1122, -1, 1158, -1, -1, 1191, 982, 1205,
6102 1194, 335, 336, 337, 338, 339, 340, -1, 342, 343,
6103 -1, -1, -1, -1, 1208, -1, 1210, -1, -1, 1213,
6104 1214, 1227, -1, -1, 1218, 1219, -1, 1191, 1158, 363,
6105 1194, -1, -1, -1, -1, -1, 1242, -1, -1, -1,
6106 1024, 1025, 1026, -1, 1208, -1, 1210, -1, -1, 1213,
6107 1214, -1, -1, -1, 1218, 1219, -1, 1041, -1, -1,
6108 -1, 1191, 1268, -1, 1194, -1, 400, -1, -1, 403,
6109 -1, -1, -1, -1, 1058, 409, 410, 411, 1208, -1,
6110 1210, -1, -1, 1213, 1214, -1, -1, -1, 1218, 1219,
6111 -1, 425, -1, 1287, -1, -1, -1, -1, 1082, -1,
6112 -1, -1, 1308, -1, -1, -1, -1, -1, -1, 1315,
6113 1316, -1, -1, -1, 1320, -1, -1, 451, -1, -1,
6114 -1, -1, -1, 1287, -1, -1, -1, -1, -1, -1,
6115 -1, -1, -1, -1, 1340, -1, -1, 1033, 1034, 473,
6116 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6117 -1, -1, -1, -1, -1, 1349, -1, 1287, -1, 1353,
6118 -1, 1355, -1, -1, 1370, -1, 1150, -1, -1, 1153,
6119 1154, -1, -1, -1, 508, 1159, -1, -1, -1, -1,
6120 1, 1033, 1034, -1, -1, 1349, -1, -1, -1, 1353,
6121 -1, 1355, -1, 527, 15, 16, -1, -1, -1, 1183,
6122 -1, -1, 1186, -1, -1, 1101, 1102, -1, -1, 1105,
6123 -1, -1, -1, -1, -1, -1, -1, -1, -1, 1349,
6124 554, 1205, -1, 1353, -1, 1355, 1122, -1, -1, 1423,
6125 -1, 52, 53, -1, -1, -1, -1, -1, -1, 1033,
6126 1034, -1, -1, 1227, -1, -1, 67, -1, -1, 1101,
6127 1102, -1, -1, 1105, -1, -1, -1, -1, 1242, 1423,
6128 -1, -1, 1158, -1, 598, 599, -1, 601, 602, -1,
6129 1122, -1, -1, -1, -1, -1, 610, -1, -1, -1,
6130 -1, 615, 103, 104, -1, -1, 107, -1, -1, -1,
6131 -1, 112, -1, 1423, -1, 1191, -1, -1, 1194, -1,
6132 -1, -1, -1, -1, -1, -1, 1158, 1101, 1102, -1,
6133 -1, 1105, 1208, -1, 1210, -1, -1, 1213, 1214, -1,
6134 -1, -1, 1218, 1219, 1308, 659, -1, 661, 1122, -1,
6135 -1, 1315, 1316, -1, -1, 669, 1320, -1, -1, 1191,
6136 -1, -1, 1194, -1, -1, -1, 680, -1, 682, 683,
6137 -1, -1, -1, -1, -1, -1, 1208, -1, 1210, 693,
6138 694, 1213, 1214, -1, 1158, -1, 1218, 1219, -1, -1,
6139 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6140 -1, -1, -1, 1033, 1034, 719, 1370, -1, -1, -1,
6141 -1, 1287, -1, 727, -1, -1, -1, 1191, -1, -1,
6142 1194, -1, -1, -1, -1, -1, -1, -1, -1, 230,
6143 -1, -1, -1, -1, 1208, -1, 1210, -1, -1, 1213,
6144 1214, -1, -1, -1, 1218, 1219, -1, -1, -1, -1,
6145 -1, -1, -1, -1, 255, 1287, 257, -1, -1, 260,
6146 261, -1, -1, -1, -1, 266, -1, -1, -1, -1,
6147 -1, 1101, 1102, 1349, -1, 1105, -1, 1353, -1, 1355,
6148 -1, -1, -1, -1, 285, -1, -1, -1, -1, -1,
6149 -1, -1, 1122, -1, -1, -1, -1, -1, -1, -1,
6150 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6151 -1, -1, -1, 1287, -1, -1, -1, 1349, -1, -1,
6152 -1, 1353, -1, 1355, -1, -1, -1, -1, 1158, -1,
6153 -1, -1, -1, -1, 335, 336, 337, 338, 339, 340,
6154 -1, 342, 343, -1, -1, -1, -1, 1423, 862, -1,
6155 864, 865, -1, -1, -1, -1, -1, -1, -1, -1,
6156 -1, 1191, 363, -1, 1194, -1, -1, -1, -1, -1,
6157 -1, -1, -1, -1, -1, 1349, -1, -1, 1208, 1353,
6158 1210, 1355, -1, 1213, 1214, -1, -1, -1, 1218, 1219,
6159 1, 1423, -1, -1, -1, -1, -1, -1, -1, 400,
6160 -1, -1, 403, -1, 15, 16, -1, -1, 409, 410,
6161 411, -1, -1, -1, -1, 929, -1, -1, -1, -1,
6162 -1, -1, -1, -1, 425, -1, -1, -1, -1, -1,
6163 -1, -1, 946, -1, -1, -1, -1, 951, 952, -1,
6164 -1, 52, 53, 957, 958, 56, -1, -1, -1, 1423,
6165 451, -1, 966, 967, -1, -1, -1, 1287, 33, 34,
6166 35, 36, -1, -1, -1, -1, -1, -1, 982, -1,
6167 -1, -1, 473, -1, 49, 50, 51, -1, 89, -1,
6168 -1, -1, -1, -1, 59, 60, 61, 62, 63, -1,
6169 -1, -1, -1, -1, -1, -1, -1, 108, 109, 110,
6170 -1, 112, -1, -1, -1, -1, -1, 508, -1, -1,
6171 1024, 1025, 1026, -1, -1, -1, -1, -1, -1, 1349,
6172 -1, -1, -1, 1353, -1, 1355, 527, 1041, -1, -1,
6173 -1, -1, -1, -1, -1, 110, 111, 112, 113, 114,
6174 115, 116, 117, 118, 1058, -1, -1, -1, -1, -1,
6175 -1, -1, -1, 554, -1, -1, -1, -1, -1, -1,
6176 -1, 78, 79, 80, 81, 82, 83, 84, 1082, -1,
6177 87, 88, 147, -1, -1, -1, -1, -1, 95, 96,
6178 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6179 -1, -1, -1, 1423, -1, -1, -1, 598, 599, -1,
6180 601, 602, -1, -1, -1, -1, -1, -1, -1, 610,
6181 -1, -1, -1, -1, 615, -1, -1, -1, -1, 230,
6182 137, 138, 139, 140, 141, 142, 143, 144, 145, 146,
6183 -1, -1, -1, -1, -1, -1, 1150, -1, -1, 1153,
6184 1154, -1, -1, -1, 255, 1159, 257, -1, -1, -1,
6185 -1, -1, -1, -1, -1, 266, -1, -1, 659, -1,
6186 661, -1, -1, -1, -1, -1, -1, -1, 669, 1183,
6187 -1, -1, 1186, -1, 285, -1, -1, -1, -1, 680,
6188 -1, 682, 683, -1, -1, -1, -1, -1, -1, -1,
6189 -1, 1205, 693, 694, 305, -1, -1, -1, -1, -1,
6190 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6191 -1, -1, -1, 1227, -1, -1, -1, -1, 719, -1,
6192 -1, -1, -1, -1, 335, 336, 727, -1, 1242, 0,
6193 -1, -1, -1, -1, -1, -1, -1, 8, 9, 10,
6194 -1, -1, 13, 14, 15, -1, 17, -1, -1, -1,
6195 -1, -1, 363, 364, 25, 26, 27, -1, -1, -1,
6196 -1, -1, -1, 1, -1, -1, 37, 38, -1, 40,
6197 41, 42, 43, 44, -1, -1, -1, 15, 16, -1,
6198 -1, -1, -1, -1, -1, -1, -1, -1, -1, 400,
6199 -1, -1, 403, -1, 1308, -1, -1, 68, 69, 410,
6200 411, 1315, 1316, -1, -1, -1, 1320, -1, -1, -1,
6201 -1, -1, -1, -1, 52, 53, -1, -1, 56, -1,
6202 -1, -1, -1, -1, -1, -1, 97, 98, -1, -1,
6203 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6204 451, -1, -1, -1, -1, -1, -1, -1, -1, 120,
6205 -1, 89, -1, -1, -1, -1, 1370, -1, -1, -1,
6206 -1, 862, 473, 864, 865, -1, -1, -1, -1, -1,
6207 108, 109, 110, -1, 112, -1, -1, -1, -1, -1,
6208 151, 152, -1, 154, -1, -1, 157, 158, -1, 160,
6209 -1, -1, -1, -1, -1, -1, -1, 508, -1, -1,
6210 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6211 -1, -1, -1, -1, 525, -1, 527, -1, -1, -1,
6212 -1, -1, -1, -1, -1, -1, -1, -1, 929, -1,
6213 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6214 -1, -1, -1, 554, -1, 946, -1, -1, -1, -1,
6215 951, 952, -1, -1, -1, -1, 957, 958, -1, -1,
6216 -1, -1, -1, -1, -1, 966, 967, -1, -1, -1,
6217 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6218 -1, 982, -1, -1, -1, -1, -1, -1, 599, -1,
6219 -1, 602, 230, -1, -1, -1, -1, -1, -1, -1,
6220 -1, 612, -1, -1, 615, -1, -1, -1, -1, -1,
6221 -1, -1, -1, -1, -1, -1, -1, 255, -1, 257,
6222 -1, -1, -1, 1024, 1025, 1026, -1, -1, 266, -1,
6223 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6224 1041, -1, -1, -1, -1, -1, -1, 285, 659, -1,
6225 661, -1, -1, -1, -1, -1, -1, 1058, 669, -1,
6226 -1, -1, -1, -1, -1, -1, -1, 305, -1, 680,
6227 -1, 682, 1, -1, -1, -1, -1, -1, -1, -1,
6228 -1, 1082, 693, 694, -1, -1, -1, -1, -1, -1,
6229 -1, -1, -1, -1, -1, 44, -1, 335, 336, -1,
6230 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6231 -1, -1, -1, -1, -1, -1, 727, -1, -1, -1,
6232 -1, -1, 733, 52, 53, 363, 364, 56, -1, 78,
6233 79, 80, 81, 82, 83, 84, 85, 86, 87, 88,
6234 89, 90, -1, -1, -1, -1, 95, 96, -1, 1150,
6235 -1, -1, 1153, 1154, -1, -1, -1, -1, 1159, -1,
6236 89, -1, 400, -1, -1, 403, -1, -1, -1, -1,
6237 -1, -1, 410, 411, -1, -1, -1, -1, -1, 108,
6238 109, 110, 1183, -1, -1, 1186, 135, -1, 137, 138,
6239 139, 140, 141, 142, 143, 144, 145, 146, -1, -1,
6240 -1, 812, -1, -1, 1205, -1, 155, -1, -1, -1,
6241 -1, -1, -1, 451, 78, 79, 80, 81, 82, 83,
6242 84, 85, -1, 87, 88, -1, 1227, -1, -1, -1,
6243 -1, 95, 96, -1, -1, 473, -1, -1, -1, -1,
6244 -1, 1242, -1, -1, -1, -1, -1, -1, -1, -1,
6245 -1, -1, -1, -1, 865, -1, -1, -1, -1, -1,
6246 -1, -1, -1, -1, -1, -1, -1, -1, 25, -1,
6247 508, -1, -1, 137, 138, 139, 140, 141, 142, 143,
6248 144, 145, 146, -1, -1, -1, -1, 525, -1, 527,
6249 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6250 -1, 230, 1, -1, -1, -1, -1, 1308, -1, -1,
6251 -1, -1, -1, -1, 1315, 1316, 554, -1, -1, 1320,
6252 -1, 78, 79, 80, 81, 82, 83, 84, 85, 86,
6253 87, 88, 89, 90, -1, 946, -1, 266, 95, 96,
6254 951, 952, -1, -1, 101, -1, 957, 958, -1, -1,
6255 -1, -1, -1, 52, 53, 966, 285, 56, -1, -1,
6256 -1, 599, -1, -1, 602, -1, -1, -1, -1, 1370,
6257 -1, 982, -1, -1, 612, -1, 305, 615, 135, -1,
6258 137, 138, 139, 140, 141, 142, 143, 144, 145, 146,
6259 89, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6260 -1, -1, -1, -1, -1, -1, 335, 336, -1, 108,
6261 109, 110, 111, 1024, 1025, 1026, -1, -1, -1, -1,
6262 -1, 659, -1, 661, 44, -1, -1, -1, -1, -1,
6263 1041, 669, -1, -1, 363, 364, -1, -1, -1, -1,
6264 -1, -1, 680, -1, 682, -1, -1, 1058, -1, -1,
6265 1, -1, -1, -1, -1, 693, 694, -1, 78, 79,
6266 80, 81, 82, 83, 84, 85, 86, 87, 88, 89,
6267 90, 1082, -1, -1, 403, 95, 96, -1, -1, -1,
6268 -1, 410, 411, -1, -1, -1, -1, -1, -1, 727,
6269 -1, -1, -1, -1, -1, 733, -1, -1, -1, -1,
6270 -1, 52, 53, -1, -1, -1, -1, -1, -1, -1,
6271 -1, -1, -1, -1, -1, 135, -1, 137, 138, 139,
6272 140, 141, 142, 143, 144, 145, 146, -1, -1, -1,
6273 -1, 230, -1, -1, -1, 1146, -1, -1, -1, 1150,
6274 -1, -1, 1153, 1154, -1, -1, -1, -1, 1159, -1,
6275 -1, -1, -1, -1, -1, -1, -1, 108, -1, -1,
6276 -1, -1, -1, -1, -1, -1, -1, 266, -1, -1,
6277 -1, -1, 1183, -1, 812, 1186, -1, -1, -1, 508,
6278 -1, -1, -1, -1, -1, -1, 285, -1, -1, -1,
6279 -1, -1, -1, -1, -1, -1, 525, -1, -1, -1,
6280 -1, -1, -1, -1, -1, -1, 305, -1, -1, -1,
6281 -1, -1, -1, -1, -1, -1, 1227, -1, -1, -1,
6282 -1, -1, -1, -1, -1, 554, -1, 865, -1, -1,
6283 -1, 1242, -1, -1, -1, -1, 335, 336, -1, -1,
6284 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6285 -1, -1, -1, -1, -1, -1, -1, 1268, -1, -1,
6286 -1, -1, -1, -1, 363, 364, -1, -1, -1, -1,
6287 599, -1, -1, 602, -1, -1, -1, -1, -1, 230,
6288 -1, -1, -1, 612, -1, -1, 615, -1, -1, -1,
6289 -1, -1, -1, -1, -1, -1, -1, 1308, -1, -1,
6290 -1, -1, -1, -1, 403, -1, -1, -1, 946, 1320,
6291 -1, 410, 411, 951, 952, 266, -1, -1, -1, 957,
6292 958, -1, -1, -1, -1, -1, -1, -1, 966, 1340,
6293 659, -1, 661, -1, 285, -1, -1, -1, -1, -1,
6294 -1, -1, -1, -1, 982, -1, -1, -1, -1, -1,
6295 -1, -1, -1, 682, -1, -1, -1, -1, -1, 1370,
6296 -1, -1, -1, -1, 693, 694, -1, -1, -1, -1,
6297 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6298 -1, -1, -1, -1, 335, 336, 1024, 1025, 1026, -1,
6299 -1, -1, -1, -1, -1, -1, -1, -1, 727, -1,
6300 -1, -1, -1, 1041, 733, -1, -1, -1, -1, 508,
6301 -1, -1, 363, 742, -1, -1, -1, -1, -1, -1,
6302 1058, -1, -1, -1, -1, 1, 525, -1, -1, -1,
6303 -1, -1, -1, -1, -1, -1, -1, 52, 53, -1,
6304 -1, 56, -1, -1, 1082, -1, -1, -1, -1, -1,
6305 -1, -1, 403, -1, -1, 554, -1, -1, -1, 410,
6306 411, 76, 77, 78, 79, 80, 81, 82, 83, 84,
6307 -1, -1, 87, 88, -1, -1, 52, 53, 93, 94,
6308 95, 96, -1, 812, -1, -1, -1, -1, -1, -1,
6309 -1, -1, 107, 108, -1, -1, -1, -1, -1, -1,
6310 599, -1, -1, 602, -1, -1, -1, -1, 1146, -1,
6311 -1, -1, 1150, 612, -1, 1153, 1154, -1, -1, -1,
6312 -1, 1159, 137, 138, 139, 140, 141, 142, 143, 144,
6313 145, 146, -1, 148, 149, -1, 865, -1, -1, -1,
6314 -1, 156, 157, -1, -1, 1183, -1, -1, 1186, 78,
6315 79, 80, 81, 82, 83, 84, -1, 508, 87, 88,
6316 659, -1, 661, -1, -1, -1, 95, 96, -1, -1,
6317 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6318 -1, -1, -1, 682, -1, -1, -1, -1, -1, 1227,
6319 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6320 -1, -1, -1, 554, 1242, -1, -1, -1, 137, 138,
6321 139, 140, 141, 142, 143, 144, 145, 146, -1, -1,
6322 -1, -1, 951, 952, -1, -1, -1, -1, 957, 958,
6323 1268, -1, -1, -1, 733, -1, -1, 966, -1, -1,
6324 -1, -1, -1, -1, -1, -1, -1, -1, 599, -1,
6325 -1, 602, -1, 982, 230, -1, -1, -1, -1, -1,
6326 -1, -1, -1, -1, 615, -1, -1, -1, -1, -1,
6327 1308, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6328 -1, -1, 1320, -1, -1, -1, -1, -1, -1, -1,
6329 266, -1, -1, -1, -1, 1024, 1025, 1026, -1, -1,
6330 -1, -1, 1340, -1, -1, -1, -1, -1, 659, 285,
6331 661, -1, 1041, 812, -1, -1, -1, -1, -1, -1,
6332 -1, -1, 33, 34, 35, 36, -1, -1, -1, 1058,
6333 -1, 682, 1370, -1, -1, -1, -1, -1, 49, 50,
6334 51, 52, 693, 694, -1, 56, -1, 58, 59, 60,
6335 61, 62, 63, 1082, -1, -1, -1, -1, -1, 335,
6336 336, -1, -1, -1, -1, -1, 865, 78, -1, -1,
6337 -1, -1, -1, -1, -1, -1, 727, -1, -1, -1,
6338 91, 92, -1, -1, -1, -1, -1, 363, 99, -1,
6339 -1, 102, -1, 104, 105, -1, 107, 108, -1, 110,
6340 111, 112, 113, 114, 115, 116, 117, 118, -1, -1,
6341 -1, -1, -1, -1, -1, -1, -1, 1146, -1, -1,
6342 -1, 1150, -1, -1, 1153, 1154, -1, 403, -1, 140,
6343 1159, -1, -1, -1, 410, 411, 147, -1, -1, -1,
6344 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6345 -1, -1, -1, -1, 1183, -1, -1, 1186, -1, -1,
6346 52, 53, -1, -1, 56, -1, -1, 966, -1, -1,
6347 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6348 -1, -1, -1, 982, 76, 77, 78, 79, 80, 81,
6349 82, 83, 84, -1, -1, 87, 88, -1, 1227, -1,
6350 -1, 93, 94, 95, 96, -1, -1, -1, -1, -1,
6351 -1, -1, -1, 1242, 865, 107, 108, -1, -1, -1,
6352 -1, -1, -1, -1, -1, 1024, 1025, -1, -1, -1,
6353 -1, -1, 508, -1, -1, -1, -1, -1, -1, 1268,
6354 -1, 15, 16, -1, -1, 137, 138, 139, 140, 141,
6355 142, 143, 144, 145, 146, -1, 148, 149, -1, 1058,
6356 -1, -1, -1, -1, 156, -1, -1, -1, -1, -1,
6357 -1, -1, -1, 47, 48, 49, 50, -1, 554, -1,
6358 54, 55, -1, 1082, -1, -1, -1, -1, -1, -1,
6359 -1, 1320, -1, 67, 68, -1, -1, -1, -1, -1,
6360 951, 952, -1, -1, -1, -1, 957, 958, -1, -1,
6361 -1, 1340, -1, -1, -1, 966, -1, -1, -1, -1,
6362 -1, -1, -1, 599, -1, -1, 602, -1, -1, -1,
6363 -1, 982, -1, -1, -1, -1, -1, -1, 112, 615,
6364 -1, 1370, -1, -1, -1, -1, -1, 1146, -1, -1,
6365 -1, 1150, -1, -1, 1153, 1154, -1, -1, -1, -1,
6366 1159, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6367 -1, -1, -1, 1024, 1025, 1026, -1, -1, -1, -1,
6368 -1, -1, -1, 659, 1183, 661, -1, 1186, -1, -1,
6369 1041, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6370 -1, -1, -1, -1, -1, -1, 682, 1058, -1, -1,
6371 -1, -1, -1, -1, -1, -1, -1, 693, 694, -1,
6372 -1, -1, -1, -1, -1, -1, -1, -1, 1227, -1,
6373 -1, 1082, -1, -1, -1, -1, -1, -1, -1, -1,
6374 -1, -1, -1, 1242, -1, -1, -1, -1, -1, -1,
6375 -1, 727, -1, -1, 228, -1, -1, 231, 232, 233,
6376 -1, 235, -1, -1, -1, -1, -1, -1, -1, 1268,
6377 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6378 -1, 255, -1, 257, -1, -1, -1, -1, -1, -1,
6379 -1, -1, -1, -1, -1, 1146, -1, -1, -1, 1150,
6380 -1, -1, 1153, 1154, -1, -1, -1, -1, 1159, -1,
6381 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6382 -1, 1320, -1, -1, -1, -1, -1, -1, -1, -1,
6383 -1, -1, 1183, -1, -1, 1186, -1, -1, -1, -1,
6384 -1, 1340, -1, -1, -1, -1, -1, -1, -1, -1,
6385 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6386 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6387 -1, 1370, -1, -1, -1, -1, 1227, -1, -1, -1,
6388 -1, -1, -1, -1, -1, -1, -1, -1, -1, 865,
6389 -1, 1242, -1, -1, 368, 369, 370, 371, 372, -1,
6390 -1, 375, 376, 377, 378, 379, 380, 381, 382, -1,
6391 384, -1, -1, 387, 388, 389, 390, 391, 392, 393,
6392 394, 395, 396, -1, 52, 53, 400, -1, 56, -1,
6393 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6394 -1, -1, -1, -1, -1, -1, -1, -1, 76, 77,
6395 78, 79, 80, 81, 82, 83, 84, -1, -1, 87,
6396 88, -1, -1, -1, -1, 93, 94, 95, 96, 1320,
6397 -1, -1, -1, -1, -1, 951, 952, 451, -1, 107,
6398 108, 957, 958, -1, -1, -1, -1, -1, -1, -1,
6399 966, -1, -1, -1, 468, 469, -1, -1, -1, 473,
6400 -1, -1, -1, 477, -1, 479, 982, -1, -1, 137,
6401 138, 139, 140, 141, 142, 143, 144, 145, 146, 1370,
6402 148, 149, -1, 497, -1, -1, -1, -1, 156, -1,
6403 -1, -1, -1, -1, -1, -1, -1, -1, 512, -1,
6404 -1, 515, -1, -1, -1, -1, -1, -1, 1024, 1025,
6405 1026, -1, -1, 527, -1, -1, -1, -1, -1, -1,
6406 -1, -1, -1, -1, -1, 1041, -1, -1, -1, -1,
6407 -1, 545, -1, 33, 34, 35, 36, -1, -1, -1,
6408 -1, -1, 1058, -1, -1, -1, -1, -1, -1, 49,
6409 50, 51, 52, -1, -1, -1, 56, -1, -1, 59,
6410 60, 61, 62, 63, -1, -1, 1082, -1, -1, -1,
6411 -1, -1, -1, -1, -1, -1, 590, -1, -1, -1,
6412 -1, -1, -1, -1, 598, -1, -1, 601, -1, -1,
6413 -1, 91, 92, -1, -1, -1, 610, -1, -1, 99,
6414 -1, 615, 102, -1, 104, 105, -1, 107, -1, -1,
6415 110, 111, 112, 113, 114, 115, 116, 117, 118, -1,
6416 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6417 -1, -1, -1, -1, 1150, -1, -1, 1153, 1154, -1,
6418 140, -1, -1, 1159, -1, -1, -1, 147, -1, -1,
6419 -1, -1, -1, -1, -1, 669, -1, -1, -1, -1,
6420 -1, -1, -1, -1, -1, -1, 680, 1183, -1, -1,
6421 1186, -1, -1, -1, -1, -1, -1, -1, -1, 693,
6422 694, -1, -1, 697, 698, -1, -1, -1, -1, -1,
6423 -1, -1, -1, -1, -1, 709, 710, -1, -1, 713,
6424 -1, 715, -1, -1, -1, -1, -1, -1, 722, 723,
6425 -1, 1227, -1, 727, -1, -1, -1, -1, -1, -1,
6426 -1, -1, -1, -1, -1, -1, 1242, -1, -1, -1,
6427 0, 1, -1, 3, 4, 5, 6, 7, 8, 9,
6428 10, 11, 12, -1, 14, 15, 16, 17, 18, 19,
6429 20, 21, 22, 23, 24, 25, -1, -1, -1, 773,
6430 30, 31, 32, 33, 34, 35, 36, -1, -1, 39,
6431 -1, -1, -1, -1, -1, 45, 46, 47, 48, 49,
6432 50, 51, 52, 53, 54, 55, 56, 57, 802, 59,
6433 60, 61, 62, 63, 64, 65, -1, -1, 68, -1,
6434 -1, -1, -1, -1, 1320, -1, 76, 77, -1, -1,
6435 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6436 834, 91, 92, -1, -1, -1, -1, -1, -1, 99,
6437 -1, -1, 102, 103, 104, 105, -1, 107, 852, -1,
6438 110, 111, 112, 113, 114, 115, 116, 117, 118, -1,
6439 120, -1, -1, -1, 1370, -1, -1, -1, -1, -1,
6440 -1, -1, -1, -1, -1, -1, -1, -1, 882, -1,
6441 -1, -1, -1, -1, -1, -1, -1, 147, 148, 149,
6442 -1, -1, 152, 33, 34, 35, 36, -1, 158, -1,
6443 160, -1, -1, -1, -1, -1, -1, -1, -1, 49,
6444 50, 51, 52, -1, -1, -1, 56, -1, -1, 59,
6445 60, 61, 62, 63, -1, 929, -1, -1, -1, -1,
6446 -1, -1, -1, -1, 938, -1, -1, -1, -1, -1,
6447 -1, -1, 946, -1, -1, -1, 950, 951, 952, -1,
6448 -1, 91, 92, 957, 958, -1, -1, 961, -1, 99,
6449 -1, -1, 102, -1, 104, 105, -1, -1, -1, 973,
6450 110, 111, 112, 113, 114, 115, 116, 117, 118, -1,
6451 -1, -1, -1, -1, -1, -1, -1, 991, 992, -1,
6452 994, 995, -1, 997, -1, 999, -1, -1, -1, -1,
6453 140, -1, -1, -1, -1, -1, -1, 147, -1, -1,
6454 -1, -1, -1, -1, 1018, 1019, -1, -1, 1022, -1,
6455 -1, -1, 1026, 1027, 0, 1, -1, 3, 4, 5,
6456 6, 7, -1, -1, -1, 11, 12, 1041, -1, -1,
6457 16, -1, 18, 19, 20, 21, 22, 23, 24, -1,
6458 -1, -1, -1, 1057, 30, 31, 32, 33, 34, 35,
6459 36, 1065, -1, 39, -1, -1, -1, -1, -1, 45,
6460 46, 47, 48, 49, 50, 51, 52, 53, 54, 55,
6461 56, 57, -1, 59, 60, 61, 62, 63, 64, 65,
6462 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6463 76, 77, -1, -1, -1, -1, -1, -1, -1, -1,
6464 -1, -1, -1, -1, -1, 91, 92, -1, -1, -1,
6465 -1, -1, -1, 99, -1, -1, 102, 103, 104, 105,
6466 -1, 107, -1, -1, 110, 111, 112, 113, 114, 115,
6467 116, 117, 118, -1, 120, -1, -1, -1, -1, -1,
6468 -1, 1155, -1, -1, -1, -1, -1, -1, -1, -1,
6469 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6470 -1, 147, 148, 149, -1, -1, 0, 1, 154, 3,
6471 4, 5, 6, 7, 160, -1, -1, 11, 12, -1,
6472 -1, -1, 16, -1, 18, 19, 20, 21, 22, 23,
6473 24, -1, -1, -1, -1, -1, 30, 31, 32, 33,
6474 34, 35, 36, -1, -1, 39, -1, -1, -1, -1,
6475 -1, 45, 46, 47, 48, 49, 50, 51, 52, 53,
6476 54, 55, 56, 57, -1, 59, 60, 61, 62, 63,
6477 64, 65, -1, -1, -1, -1, -1, -1, -1, -1,
6478 -1, -1, 76, 77, -1, -1, -1, -1, -1, -1,
6479 -1, -1, -1, -1, -1, -1, -1, 91, 92, -1,
6480 -1, -1, -1, -1, -1, 99, -1, -1, 102, 103,
6481 104, 105, -1, 107, -1, -1, 110, 111, 112, 113,
6482 114, 115, 116, 117, 118, -1, -1, -1, -1, -1,
6483 -1, -1, -1, -1, 1308, -1, -1, -1, -1, -1,
6484 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6485 -1, -1, -1, 147, 148, 149, -1, -1, 0, 1,
6486 154, 3, 4, 5, 6, 7, 160, -1, -1, 11,
6487 12, -1, -1, -1, 16, -1, 18, 19, 20, 21,
6488 22, 23, 24, -1, -1, -1, -1, -1, 30, 31,
6489 32, 33, 34, 35, 36, -1, -1, 39, -1, -1,
6490 -1, -1, -1, 45, 46, 47, 48, 49, 50, 51,
6491 52, 53, 54, 55, 56, 57, -1, 59, 60, 61,
6492 62, 63, 64, 65, -1, -1, -1, -1, -1, -1,
6493 -1, -1, -1, -1, 76, 77, -1, -1, -1, -1,
6494 -1, -1, -1, -1, -1, -1, -1, -1, -1, 91,
6495 92, -1, -1, -1, -1, -1, -1, 99, -1, -1,
6496 102, 103, 104, 105, -1, 107, -1, -1, 110, 111,
6497 112, 113, 114, 115, 116, 117, 118, -1, -1, -1,
6498 -1, -1, -1, -1, -1, -1, 0, -1, -1, -1,
6499 -1, -1, -1, -1, 8, 9, 10, -1, -1, 13,
6500 14, 15, -1, 17, -1, 147, 148, 149, -1, -1,
6501 152, 25, 26, 27, 28, 29, -1, -1, 160, -1,
6502 -1, -1, -1, 37, 38, -1, 40, 41, 42, 43,
6503 44, -1, -1, -1, 78, 79, 80, 81, 82, 83,
6504 84, 85, 86, 87, 88, 89, 90, -1, -1, -1,
6505 -1, 95, 96, -1, 68, 69, -1, -1, -1, -1,
6506 -1, -1, -1, -1, 78, 79, 80, 81, 82, 83,
6507 84, 85, 86, 87, 88, 89, 90, -1, -1, -1,
6508 -1, 95, 96, 97, 98, -1, 100, 101, -1, -1,
6509 -1, 135, 106, 137, 138, 139, 140, 141, 142, 143,
6510 144, 145, 146, -1, -1, -1, 120, -1, -1, 123,
6511 154, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6512 134, 135, 136, 137, 138, 139, 140, 141, 142, 143,
6513 144, 145, 146, -1, -1, -1, -1, 151, 152, 153,
6514 154, 155, 0, -1, 158, 159, 160, -1, -1, -1,
6515 8, 9, 10, -1, -1, 13, 14, 15, -1, 17,
6516 -1, -1, -1, -1, -1, -1, -1, 25, -1, 27,
6517 28, 29, -1, -1, -1, -1, -1, -1, -1, 37,
6518 38, -1, 40, 41, 42, 43, 44, -1, -1, -1,
6519 78, 79, 80, 81, 82, 83, 84, 85, 86, 87,
6520 88, 89, 90, -1, -1, -1, -1, 95, 96, -1,
6521 68, 69, -1, -1, -1, -1, -1, -1, -1, -1,
6522 78, 79, 80, 81, 82, 83, 84, 85, 86, 87,
6523 88, 89, 90, -1, -1, -1, -1, 95, 96, 97,
6524 98, -1, 100, 101, -1, -1, -1, 135, 106, 137,
6525 138, 139, 140, 141, 142, 143, 144, 145, 146, -1,
6526 -1, -1, 120, -1, -1, 123, -1, -1, -1, -1,
6527 -1, -1, -1, -1, -1, -1, 134, 135, 136, 137,
6528 138, 139, 140, 141, 142, 143, 144, 145, 146, -1,
6529 -1, -1, -1, -1, 152, 153, 154, 155, 0, -1,
6530 158, 159, 160, -1, -1, -1, 8, 9, 10, -1,
6531 -1, 13, 14, 15, -1, 17, -1, -1, -1, -1,
6532 -1, -1, -1, 25, -1, 27, 28, 29, -1, -1,
6533 -1, -1, -1, -1, -1, 37, 38, -1, 40, 41,
6534 42, 43, 44, -1, -1, -1, 78, 79, 80, 81,
6535 82, 83, 84, 85, 86, 87, 88, 89, 90, -1,
6536 -1, -1, -1, 95, 96, -1, 68, 69, -1, -1,
6537 -1, -1, -1, -1, -1, -1, 78, 79, 80, 81,
6538 82, 83, 84, 85, 86, 87, 88, 89, 90, -1,
6539 -1, -1, -1, 95, 96, 97, 98, -1, 100, 101,
6540 -1, -1, -1, -1, 106, 137, 138, 139, 140, 141,
6541 142, 143, 144, 145, 146, -1, -1, -1, 120, -1,
6542 -1, 123, -1, -1, -1, -1, -1, -1, -1, -1,
6543 -1, -1, 134, 135, 136, 137, 138, 139, 140, 141,
6544 142, 143, 144, 145, 146, -1, -1, -1, -1, -1,
6545 152, 153, 154, 155, 0, -1, 158, 159, 160, -1,
6546 -1, -1, 8, 9, 10, -1, -1, 13, 14, 15,
6547 -1, 17, -1, -1, -1, -1, -1, -1, -1, 25,
6548 26, 27, 28, 29, -1, -1, -1, -1, -1, -1,
6549 -1, 37, 38, -1, 40, 41, 42, 43, 44, -1,
6550 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6551 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6552 -1, -1, 68, 69, -1, -1, -1, -1, -1, -1,
6553 -1, -1, 78, 79, 80, 81, 82, 83, 84, 85,
6554 86, 87, 88, 89, 90, -1, -1, -1, -1, 95,
6555 96, 97, 98, -1, -1, 101, -1, -1, -1, -1,
6556 106, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6557 -1, -1, -1, -1, 120, -1, -1, 123, -1, -1,
6558 -1, -1, -1, -1, -1, -1, -1, -1, -1, 135,
6559 136, 137, 138, 139, 140, 141, 142, 143, 144, 145,
6560 146, -1, -1, -1, -1, 151, 152, 153, 154, 155,
6561 0, -1, 158, 159, 160, -1, -1, -1, 8, 9,
6562 10, -1, -1, 13, 14, 15, -1, 17, -1, -1,
6563 -1, -1, -1, -1, -1, 25, 26, 27, 28, 29,
6564 -1, -1, -1, -1, -1, -1, -1, 37, 38, -1,
6565 40, 41, 42, 43, 44, -1, -1, -1, -1, -1,
6566 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6567 -1, -1, -1, -1, -1, -1, -1, -1, 68, 69,
6568 -1, -1, -1, -1, -1, -1, -1, -1, 78, 79,
6569 80, 81, 82, 83, 84, 85, 86, 87, 88, 89,
6570 90, -1, -1, -1, -1, 95, 96, 97, 98, -1,
6571 -1, 101, -1, -1, -1, -1, 106, -1, -1, -1,
6572 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6573 120, -1, -1, 123, -1, -1, -1, -1, -1, -1,
6574 -1, -1, -1, -1, -1, 135, 136, 137, 138, 139,
6575 140, 141, 142, 143, 144, 145, 146, -1, -1, -1,
6576 -1, 151, 152, 153, 154, 155, 0, -1, 158, 159,
6577 160, -1, -1, -1, 8, 9, 10, -1, -1, 13,
6578 14, 15, -1, 17, -1, -1, -1, -1, -1, -1,
6579 -1, 25, 26, 27, 28, -1, -1, -1, -1, -1,
6580 -1, -1, -1, 37, 38, -1, 40, 41, 42, 43,
6581 44, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6582 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6583 -1, -1, -1, -1, 68, 69, -1, -1, -1, -1,
6584 -1, -1, -1, -1, 78, 79, 80, 81, 82, 83,
6585 84, 85, 86, 87, 88, 89, 90, -1, -1, -1,
6586 -1, 95, 96, 97, 98, -1, -1, 101, -1, -1,
6587 -1, -1, 106, -1, -1, -1, -1, -1, -1, -1,
6588 -1, -1, -1, -1, -1, -1, 120, -1, -1, -1,
6589 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6590 -1, 135, -1, 137, 138, 139, 140, 141, 142, 143,
6591 144, 145, 146, -1, -1, -1, -1, 151, 152, 153,
6592 154, 155, 0, 157, 158, 159, 160, -1, -1, -1,
6593 8, 9, 10, -1, -1, 13, 14, 15, -1, 17,
6594 -1, -1, -1, -1, -1, -1, -1, 25, -1, 27,
6595 28, 29, -1, -1, -1, -1, -1, -1, -1, 37,
6596 38, -1, 40, 41, 42, 43, 44, -1, -1, -1,
6597 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6598 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6599 68, 69, -1, -1, -1, -1, -1, -1, -1, -1,
6600 78, 79, 80, 81, 82, 83, 84, 85, 86, 87,
6601 88, 89, 90, -1, -1, -1, -1, 95, 96, 97,
6602 98, -1, -1, 101, -1, -1, -1, -1, 106, -1,
6603 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6604 -1, -1, 120, -1, -1, 123, -1, -1, -1, -1,
6605 -1, -1, -1, -1, -1, -1, -1, 135, 136, 137,
6606 138, 139, 140, 141, 142, 143, 144, 145, 146, -1,
6607 -1, -1, -1, -1, 152, 153, 154, 155, 0, -1,
6608 158, 159, 160, -1, -1, -1, 8, 9, 10, -1,
6609 -1, 13, 14, 15, -1, 17, -1, -1, -1, -1,
6610 -1, -1, -1, 25, 26, 27, 28, -1, -1, -1,
6611 -1, -1, -1, -1, -1, 37, 38, -1, 40, 41,
6612 42, 43, 44, -1, -1, -1, -1, -1, -1, -1,
6613 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6614 -1, -1, -1, -1, -1, -1, 68, 69, -1, -1,
6615 -1, -1, -1, -1, -1, -1, 78, 79, 80, 81,
6616 82, 83, 84, 85, 86, 87, 88, 89, 90, -1,
6617 -1, -1, -1, 95, 96, 97, 98, -1, -1, 101,
6618 -1, -1, -1, -1, 106, -1, -1, -1, -1, -1,
6619 -1, -1, -1, -1, -1, -1, -1, -1, 120, -1,
6620 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6621 -1, -1, -1, 135, -1, 137, 138, 139, 140, 141,
6622 142, 143, 144, 145, 146, -1, -1, -1, -1, 151,
6623 152, 153, 154, 155, 0, 157, 158, 159, 160, -1,
6624 -1, -1, 8, 9, 10, -1, -1, 13, 14, 15,
6625 -1, 17, -1, -1, -1, -1, -1, -1, -1, 25,
6626 -1, 27, 28, -1, -1, -1, -1, -1, -1, -1,
6627 -1, 37, 38, -1, 40, 41, 42, 43, 44, -1,
6628 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6629 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6630 -1, -1, 68, 69, -1, -1, -1, -1, -1, -1,
6631 -1, -1, 78, 79, 80, 81, 82, 83, 84, 85,
6632 86, 87, 88, 89, 90, -1, -1, -1, -1, 95,
6633 96, 97, 98, -1, 100, 101, -1, -1, -1, -1,
6634 106, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6635 -1, -1, -1, -1, 120, -1, -1, -1, -1, -1,
6636 -1, -1, -1, -1, -1, -1, -1, -1, 134, 135,
6637 -1, 137, 138, 139, 140, 141, 142, 143, 144, 145,
6638 146, -1, -1, -1, -1, 151, 152, 153, 154, 155,
6639 0, -1, 158, 159, 160, -1, -1, -1, 8, 9,
6640 10, -1, -1, 13, 14, 15, -1, 17, -1, -1,
6641 -1, -1, -1, -1, -1, 25, -1, 27, 28, -1,
6642 -1, -1, -1, -1, -1, -1, -1, 37, 38, -1,
6643 40, 41, 42, 43, 44, -1, -1, -1, -1, -1,
6644 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6645 -1, -1, -1, -1, -1, -1, -1, -1, 68, 69,
6646 -1, -1, -1, -1, -1, -1, -1, -1, 78, 79,
6647 80, 81, 82, 83, 84, 85, 86, 87, 88, 89,
6648 90, -1, -1, -1, -1, 95, 96, 97, 98, -1,
6649 -1, 101, -1, -1, -1, -1, 106, -1, -1, -1,
6650 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6651 120, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6652 -1, -1, -1, -1, -1, 135, -1, 137, 138, 139,
6653 140, 141, 142, 143, 144, 145, 146, -1, -1, -1,
6654 -1, -1, 152, 153, 154, 155, 0, 157, 158, 159,
6655 160, -1, -1, -1, 8, 9, 10, -1, -1, -1,
6656 14, 15, -1, 17, -1, -1, -1, -1, -1, -1,
6657 -1, 25, 26, -1, -1, -1, -1, -1, -1, -1,
6658 -1, -1, -1, 37, 38, -1, 40, 41, 42, 43,
6659 44, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6660 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6661 -1, -1, -1, -1, 68, 69, -1, -1, -1, -1,
6662 -1, -1, -1, -1, 78, 79, 80, 81, 82, 83,
6663 84, 85, 86, 87, 88, 89, 90, -1, -1, -1,
6664 -1, 95, 96, 97, 98, -1, 100, 101, -1, -1,
6665 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6666 -1, -1, -1, -1, -1, -1, 120, -1, -1, -1,
6667 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6668 134, 135, -1, 137, 138, 139, 140, 141, 142, 143,
6669 144, 145, 146, -1, -1, -1, -1, 151, 152, 153,
6670 154, 155, 0, -1, 158, -1, 160, -1, -1, -1,
6671 8, 9, 10, -1, -1, -1, 14, 15, -1, 17,
6672 -1, -1, -1, -1, -1, -1, -1, 25, 26, -1,
6673 -1, -1, -1, -1, -1, -1, -1, -1, -1, 37,
6674 38, -1, 40, 41, 42, 43, 44, -1, -1, -1,
6675 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6676 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6677 68, 69, -1, -1, -1, -1, -1, -1, -1, -1,
6678 78, 79, 80, 81, 82, 83, 84, 85, 86, 87,
6679 88, 89, 90, -1, -1, -1, -1, 95, 96, 97,
6680 98, -1, 100, 101, -1, -1, -1, -1, -1, -1,
6681 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6682 -1, -1, 120, -1, -1, -1, -1, -1, -1, -1,
6683 -1, -1, -1, -1, -1, -1, 134, 135, -1, 137,
6684 138, 139, 140, 141, 142, 143, 144, 145, 146, -1,
6685 -1, -1, -1, 151, 152, 153, 154, 155, 0, -1,
6686 158, -1, 160, -1, -1, -1, 8, 9, 10, -1,
6687 -1, -1, 14, 15, -1, 17, -1, -1, -1, -1,
6688 -1, -1, -1, 25, -1, -1, -1, -1, -1, -1,
6689 -1, -1, -1, -1, -1, 37, 38, -1, 40, 41,
6690 42, 43, 44, -1, -1, -1, -1, -1, -1, -1,
6691 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6692 -1, -1, -1, -1, -1, -1, 68, 69, -1, -1,
6693 -1, -1, -1, -1, -1, -1, 78, 79, 80, 81,
6694 82, 83, 84, 85, 86, 87, 88, 89, 90, -1,
6695 -1, -1, -1, 95, 96, 97, 98, -1, 100, 101,
6696 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6697 -1, -1, -1, -1, -1, -1, -1, -1, 120, -1,
6698 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6699 -1, -1, 134, 135, -1, 137, 138, 139, 140, 141,
6700 142, 143, 144, 145, 146, -1, -1, -1, -1, 151,
6701 152, 153, 154, 155, 0, -1, 158, -1, 160, -1,
6702 -1, -1, 8, 9, 10, -1, -1, -1, 14, 15,
6703 -1, 17, -1, -1, -1, -1, -1, -1, -1, 25,
6704 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6705 -1, 37, 38, -1, 40, 41, 42, 43, 44, -1,
6706 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6707 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6708 -1, -1, 68, 69, -1, -1, -1, -1, -1, -1,
6709 -1, -1, 78, 79, 80, 81, 82, 83, 84, 85,
6710 86, 87, 88, 89, 90, -1, -1, -1, -1, 95,
6711 96, 97, 98, -1, 100, 101, -1, -1, -1, -1,
6712 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6713 -1, -1, -1, -1, 120, -1, -1, -1, -1, -1,
6714 -1, -1, -1, -1, -1, -1, -1, -1, 134, 135,
6715 -1, 137, 138, 139, 140, 141, 142, 143, 144, 145,
6716 146, -1, -1, -1, -1, 151, 152, 153, 154, 155,
6717 -1, -1, 158, 1, 160, 3, 4, 5, 6, 7,
6718 8, 9, 10, 11, 12, -1, -1, 15, 16, -1,
6719 18, 19, 20, 21, 22, 23, 24, -1, -1, -1,
6720 -1, -1, 30, 31, 32, 33, 34, 35, 36, -1,
6721 -1, 39, -1, -1, -1, -1, -1, 45, 46, 47,
6722 48, 49, 50, 51, 52, 53, 54, 55, 56, 57,
6723 -1, 59, 60, 61, 62, 63, 64, 65, -1, -1,
6724 68, -1, -1, -1, -1, -1, -1, -1, 76, 77,
6725 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6726 -1, -1, -1, 91, 92, -1, -1, -1, -1, -1,
6727 -1, 99, -1, -1, 102, 103, 104, 105, -1, 107,
6728 -1, -1, 110, 111, 112, 113, 114, 115, 116, 117,
6729 118, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6730 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6731 -1, -1, -1, -1, -1, -1, -1, -1, -1, 147,
6732 148, 149, -1, -1, -1, 1, 154, 3, 4, 5,
6733 6, 7, 160, -1, 10, 11, 12, -1, 14, 15,
6734 16, -1, 18, 19, 20, 21, 22, 23, 24, -1,
6735 -1, -1, -1, -1, 30, 31, 32, 33, 34, 35,
6736 36, -1, -1, 39, -1, -1, -1, -1, -1, 45,
6737 46, 47, 48, 49, 50, 51, 52, 53, 54, 55,
6738 56, 57, -1, 59, 60, 61, 62, 63, 64, 65,
6739 -1, -1, 68, -1, -1, -1, -1, -1, -1, -1,
6740 76, 77, -1, -1, -1, -1, -1, -1, -1, -1,
6741 -1, -1, -1, -1, -1, 91, 92, -1, -1, -1,
6742 -1, -1, -1, 99, -1, -1, 102, 103, 104, 105,
6743 -1, 107, -1, -1, 110, 111, 112, 113, 114, 115,
6744 116, 117, 118, -1, -1, -1, -1, -1, -1, -1,
6745 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6746 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6747 -1, 147, 148, 149, -1, -1, -1, 1, 154, 3,
6748 4, 5, 6, 7, 160, -1, 10, 11, 12, -1,
6749 -1, 15, 16, 17, 18, 19, 20, 21, 22, 23,
6750 24, -1, -1, -1, -1, -1, 30, 31, 32, 33,
6751 34, 35, 36, -1, -1, 39, -1, -1, -1, -1,
6752 -1, 45, 46, 47, 48, 49, 50, 51, 52, 53,
6753 54, 55, 56, 57, -1, 59, 60, 61, 62, 63,
6754 64, 65, -1, -1, 68, -1, -1, -1, -1, -1,
6755 -1, -1, 76, 77, -1, -1, -1, -1, -1, -1,
6756 -1, -1, -1, -1, -1, -1, -1, 91, 92, -1,
6757 -1, -1, -1, -1, -1, 99, -1, -1, 102, 103,
6758 104, 105, -1, 107, -1, -1, 110, 111, 112, 113,
6759 114, 115, 116, 117, 118, -1, -1, -1, -1, -1,
6760 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6761 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6762 -1, -1, -1, 147, 148, 149, -1, -1, -1, 1,
6763 154, 3, 4, 5, 6, 7, 160, -1, 10, 11,
6764 12, -1, -1, 15, 16, -1, 18, 19, 20, 21,
6765 22, 23, 24, 25, -1, -1, -1, -1, 30, 31,
6766 32, 33, 34, 35, 36, -1, -1, 39, -1, -1,
6767 -1, -1, -1, 45, 46, 47, 48, 49, 50, 51,
6768 52, 53, 54, 55, 56, 57, -1, 59, 60, 61,
6769 62, 63, 64, 65, -1, -1, 68, -1, -1, -1,
6770 -1, -1, -1, -1, 76, 77, -1, -1, -1, -1,
6771 -1, -1, -1, -1, -1, -1, -1, -1, -1, 91,
6772 92, -1, -1, -1, -1, -1, -1, 99, -1, -1,
6773 102, 103, 104, 105, -1, 107, -1, -1, 110, 111,
6774 112, 113, 114, 115, 116, 117, 118, -1, -1, -1,
6775 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6776 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6777 -1, -1, -1, -1, -1, 147, 148, 149, -1, -1,
6778 -1, 1, 154, 3, 4, 5, 6, 7, 160, -1,
6779 10, 11, 12, -1, -1, 15, 16, -1, 18, 19,
6780 20, 21, 22, 23, 24, -1, -1, -1, -1, -1,
6781 30, 31, 32, 33, 34, 35, 36, -1, -1, 39,
6782 -1, -1, -1, -1, -1, 45, 46, 47, 48, 49,
6783 50, 51, 52, 53, 54, 55, 56, 57, -1, 59,
6784 60, 61, 62, 63, 64, 65, -1, -1, 68, -1,
6785 -1, -1, -1, -1, -1, -1, 76, 77, -1, -1,
6786 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6787 -1, 91, 92, -1, -1, -1, -1, -1, -1, 99,
6788 -1, -1, 102, 103, 104, 105, -1, 107, -1, -1,
6789 110, 111, 112, 113, 114, 115, 116, 117, 118, -1,
6790 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6791 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6792 -1, -1, -1, -1, -1, -1, -1, 147, 148, 149,
6793 -1, -1, -1, 1, 154, 3, 4, 5, 6, 7,
6794 160, 9, 10, 11, 12, -1, -1, -1, 16, -1,
6795 18, 19, 20, 21, 22, 23, 24, -1, -1, -1,
6796 -1, -1, 30, 31, 32, 33, 34, 35, 36, -1,
6797 -1, 39, -1, -1, -1, -1, -1, 45, 46, 47,
6798 48, 49, 50, 51, 52, 53, 54, 55, 56, 57,
6799 -1, 59, 60, 61, 62, 63, 64, 65, -1, -1,
6800 68, -1, -1, -1, -1, -1, -1, -1, 76, 77,
6801 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6802 -1, -1, -1, 91, 92, -1, -1, -1, -1, -1,
6803 -1, 99, -1, -1, 102, 103, 104, 105, -1, 107,
6804 -1, -1, 110, 111, 112, 113, 114, 115, 116, 117,
6805 118, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6806 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6807 -1, -1, -1, -1, -1, -1, -1, -1, -1, 147,
6808 148, 149, -1, -1, -1, 1, 154, 3, 4, 5,
6809 6, 7, 160, -1, 10, 11, 12, -1, -1, -1,
6810 16, -1, 18, 19, 20, 21, 22, 23, 24, -1,
6811 -1, -1, -1, -1, 30, 31, 32, 33, 34, 35,
6812 36, -1, -1, 39, -1, -1, -1, -1, -1, 45,
6813 46, 47, 48, 49, 50, 51, 52, 53, 54, 55,
6814 56, 57, -1, 59, 60, 61, 62, 63, 64, 65,
6815 -1, -1, 68, -1, -1, -1, -1, -1, -1, -1,
6816 76, 77, -1, -1, -1, -1, -1, -1, -1, -1,
6817 -1, -1, -1, -1, -1, 91, 92, -1, -1, -1,
6818 -1, -1, -1, 99, -1, -1, 102, 103, 104, 105,
6819 -1, 107, -1, -1, 110, 111, 112, 113, 114, 115,
6820 116, 117, 118, -1, -1, -1, -1, -1, -1, -1,
6821 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6822 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6823 -1, 147, 148, 149, -1, -1, -1, 1, 154, 3,
6824 4, 5, 6, 7, 160, -1, -1, 11, 12, -1,
6825 -1, -1, 16, -1, 18, 19, 20, 21, 22, 23,
6826 24, -1, -1, -1, -1, -1, 30, 31, 32, 33,
6827 34, 35, 36, -1, -1, 39, -1, -1, -1, -1,
6828 -1, 45, 46, 47, 48, 49, 50, 51, 52, 53,
6829 54, 55, 56, 57, -1, 59, 60, 61, 62, 63,
6830 64, 65, -1, -1, -1, -1, -1, -1, -1, -1,
6831 -1, -1, 76, 77, -1, -1, -1, -1, -1, -1,
6832 -1, -1, -1, -1, -1, -1, -1, 91, 92, -1,
6833 -1, -1, -1, -1, -1, 99, -1, -1, 102, 103,
6834 104, 105, -1, 107, -1, -1, 110, 111, 112, 113,
6835 114, 115, 116, 117, 118, -1, -1, -1, -1, -1,
6836 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6837 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6838 -1, -1, -1, 147, 148, 149, -1, -1, -1, -1,
6839 154, -1, -1, -1, 158, 1, 160, 3, 4, 5,
6840 6, 7, -1, -1, -1, 11, 12, -1, -1, -1,
6841 16, -1, 18, 19, 20, 21, 22, 23, 24, -1,
6842 -1, -1, -1, -1, 30, 31, 32, 33, 34, 35,
6843 36, -1, -1, 39, -1, -1, -1, -1, -1, 45,
6844 46, 47, 48, 49, 50, 51, 52, 53, 54, 55,
6845 56, 57, -1, 59, 60, 61, 62, 63, 64, 65,
6846 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6847 76, 77, -1, -1, -1, -1, -1, -1, -1, -1,
6848 -1, -1, -1, -1, -1, 91, 92, -1, -1, -1,
6849 -1, -1, -1, 99, -1, -1, 102, 103, 104, 105,
6850 -1, 107, -1, -1, 110, 111, 112, 113, 114, 115,
6851 116, 117, 118, -1, -1, -1, -1, -1, -1, -1,
6852 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6853 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6854 -1, 147, 148, 149, -1, -1, -1, -1, 154, -1,
6855 -1, -1, 158, 1, 160, 3, 4, 5, 6, 7,
6856 -1, -1, -1, 11, 12, -1, -1, -1, 16, -1,
6857 18, 19, 20, 21, 22, 23, 24, -1, -1, -1,
6858 -1, -1, 30, 31, 32, 33, 34, 35, 36, -1,
6859 -1, 39, -1, -1, -1, -1, -1, 45, 46, 47,
6860 48, 49, 50, 51, 52, 53, 54, 55, 56, 57,
6861 -1, 59, 60, 61, 62, 63, 64, 65, -1, -1,
6862 -1, -1, -1, -1, -1, -1, -1, -1, 76, 77,
6863 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6864 -1, -1, -1, 91, 92, -1, -1, -1, -1, -1,
6865 -1, 99, -1, -1, 102, 103, 104, 105, -1, 107,
6866 -1, -1, 110, 111, 112, 113, 114, 115, 116, 117,
6867 118, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6868 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6869 -1, -1, -1, -1, -1, -1, -1, -1, -1, 147,
6870 148, 149, -1, -1, 152, 1, 154, 3, 4, 5,
6871 6, 7, 160, -1, -1, 11, 12, -1, -1, -1,
6872 16, -1, 18, 19, 20, 21, 22, 23, 24, -1,
6873 -1, -1, -1, -1, 30, 31, 32, 33, 34, 35,
6874 36, -1, -1, 39, -1, -1, -1, -1, -1, 45,
6875 46, 47, 48, 49, 50, 51, 52, 53, 54, 55,
6876 56, 57, -1, 59, 60, 61, 62, 63, 64, 65,
6877 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6878 76, 77, -1, -1, -1, -1, -1, -1, -1, -1,
6879 -1, -1, -1, -1, -1, 91, 92, -1, -1, -1,
6880 -1, -1, -1, 99, -1, -1, 102, 103, 104, 105,
6881 -1, 107, -1, -1, 110, 111, 112, 113, 114, 115,
6882 116, 117, 118, -1, -1, -1, -1, -1, -1, -1,
6883 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6884 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6885 -1, 147, 148, 149, -1, -1, 152, 1, 154, 3,
6886 4, 5, -1, 7, 160, -1, -1, 11, 12, -1,
6887 -1, -1, 16, 17, 18, 19, 20, 21, 22, 23,
6888 24, -1, -1, -1, -1, -1, 30, 31, 32, 33,
6889 34, 35, 36, -1, -1, 39, -1, -1, -1, -1,
6890 -1, -1, 46, -1, -1, 49, 50, 51, 52, 53,
6891 54, 55, 56, 57, -1, 59, 60, 61, 62, 63,
6892 64, 65, -1, -1, -1, -1, -1, -1, -1, -1,
6893 -1, -1, 76, 77, -1, -1, -1, -1, -1, -1,
6894 -1, -1, -1, -1, -1, -1, -1, 91, 92, -1,
6895 -1, -1, -1, -1, -1, 99, -1, -1, 102, 103,
6896 104, 105, -1, -1, -1, -1, 110, 111, 112, 113,
6897 114, 115, 116, 117, 118, -1, -1, -1, -1, -1,
6898 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6899 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6900 -1, -1, -1, 147, 148, 149, -1, -1, -1, -1,
6901 154, -1, -1, -1, -1, -1, 160, 3, 4, 5,
6902 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
6903 16, 17, 18, 19, 20, 21, 22, 23, 24, 25,
6904 26, -1, -1, -1, 30, 31, 32, 33, 34, 35,
6905 36, 37, 38, 39, -1, -1, -1, -1, -1, 45,
6906 46, 47, 48, 49, 50, 51, 52, 53, 54, 55,
6907 56, 57, -1, -1, -1, -1, -1, -1, -1, -1,
6908 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6909 76, 77, 78, 79, 80, 81, 82, 83, 84, -1,
6910 -1, 87, 88, -1, -1, -1, -1, 93, 94, 95,
6911 96, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6912 -1, 107, 108, -1, -1, -1, -1, -1, -1, -1,
6913 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6914 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6915 -1, 137, 138, 139, 140, 141, 142, 143, 144, 145,
6916 146, -1, 148, 149, -1, -1, -1, -1, -1, -1,
6917 156, 157, 3, 4, 5, 6, 7, 8, 9, 10,
6918 11, 12, 13, 14, 15, 16, 17, 18, 19, 20,
6919 21, 22, 23, 24, 25, 26, -1, -1, -1, 30,
6920 31, 32, 33, 34, 35, 36, 37, 38, 39, -1,
6921 -1, -1, -1, -1, 45, 46, 47, 48, 49, 50,
6922 51, 52, 53, 54, 55, 56, 57, -1, -1, -1,
6923 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6924 -1, -1, -1, -1, -1, 76, 77, 78, 79, 80,
6925 81, 82, 83, 84, -1, -1, 87, 88, -1, -1,
6926 -1, -1, 93, 94, 95, 96, -1, -1, -1, -1,
6927 -1, -1, -1, -1, -1, -1, 107, 108, -1, -1,
6928 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6929 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6930 -1, -1, -1, -1, -1, -1, 137, 138, 139, 140,
6931 141, 142, 143, 144, 145, 146, -1, 148, 149, -1,
6932 -1, -1, -1, -1, -1, 156, 3, 4, 5, 6,
6933 7, 8, 9, 10, 11, 12, 13, 14, 15, 16,
6934 17, 18, 19, 20, 21, 22, 23, 24, 25, 26,
6935 -1, -1, -1, 30, 31, 32, 33, 34, 35, 36,
6936 37, 38, 39, -1, -1, -1, -1, -1, 45, 46,
6937 47, 48, 49, 50, 51, 52, 53, 54, -1, 56,
6938 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6939 -1, -1, -1, -1, -1, -1, -1, -1, -1, 76,
6940 77, 78, 79, 80, 81, 82, 83, 84, -1, -1,
6941 87, 88, -1, -1, -1, -1, 93, 94, 95, 96,
6942 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6943 107, 108, -1, -1, 111, -1, -1, -1, -1, -1,
6944 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6945 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6946 137, 138, 139, 140, 141, 142, 143, 144, 145, 146,
6947 -1, 148, 149, -1, -1, -1, -1, -1, -1, 156,
6948 3, 4, 5, 6, 7, 8, 9, 10, 11, 12,
6949 13, 14, 15, 16, 17, 18, 19, 20, 21, 22,
6950 23, 24, 25, 26, -1, -1, -1, 30, 31, 32,
6951 33, 34, 35, 36, 37, 38, 39, -1, -1, -1,
6952 -1, -1, 45, 46, 47, 48, 49, 50, 51, 52,
6953 53, -1, -1, 56, -1, -1, -1, -1, -1, -1,
6954 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6955 -1, -1, -1, 76, 77, 78, 79, 80, 81, 82,
6956 83, 84, -1, -1, 87, 88, -1, -1, -1, -1,
6957 93, 94, 95, 96, -1, -1, -1, -1, -1, -1,
6958 -1, -1, -1, -1, 107, 108, -1, -1, 111, -1,
6959 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6960 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6961 -1, -1, -1, -1, 137, 138, 139, 140, 141, 142,
6962 143, 144, 145, 146, -1, 148, 149, -1, -1, -1,
6963 -1, -1, -1, 156, 3, 4, 5, 6, 7, 8,
6964 9, 10, 11, 12, 13, 14, 15, 16, 17, 18,
6965 19, 20, 21, 22, 23, 24, 25, 26, -1, -1,
6966 -1, 30, 31, 32, 33, 34, 35, 36, 37, 38,
6967 39, -1, -1, -1, -1, -1, 45, 46, 47, 48,
6968 49, 50, 51, 52, 53, -1, -1, 56, -1, -1,
6969 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6970 -1, -1, -1, -1, -1, -1, -1, 76, 77, 78,
6971 79, 80, 81, 82, 83, 84, -1, -1, 87, 88,
6972 -1, -1, -1, -1, 93, 94, 95, 96, -1, -1,
6973 -1, -1, -1, -1, -1, -1, -1, -1, 107, 108,
6974 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6975 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6976 -1, -1, -1, -1, -1, -1, -1, -1, 137, 138,
6977 139, 140, 141, 142, 143, 144, 145, 146, -1, 148,
6978 149, 3, 4, 5, -1, 7, -1, 156, -1, 11,
6979 12, -1, -1, -1, 16, -1, 18, 19, 20, 21,
6980 22, 23, 24, -1, -1, -1, -1, -1, 30, 31,
6981 32, 33, 34, 35, 36, -1, -1, 39, -1, -1,
6982 -1, -1, -1, -1, 46, -1, -1, 49, 50, 51,
6983 52, 53, 54, 55, 56, 57, -1, 59, 60, 61,
6984 62, 63, 64, 65, -1, -1, -1, -1, -1, -1,
6985 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6986 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6987 -1, -1, -1, -1, -1, -1, -1, 99, -1, -1,
6988 102, 103, 104, 105, -1, -1, -1, -1, 110, 111,
6989 112, 113, 114, 115, 116, 117, 118, -1, -1, 3,
6990 4, 5, -1, 7, -1, -1, -1, 11, 12, -1,
6991 -1, -1, 16, -1, 18, 19, 20, 21, 22, 23,
6992 24, -1, -1, -1, -1, 147, 30, 31, 32, 33,
6993 34, 35, 36, 155, -1, 39, -1, -1, -1, -1,
6994 -1, -1, 46, -1, -1, 49, 50, 51, 52, 53,
6995 54, 55, 56, 57, -1, 59, 60, 61, 62, 63,
6996 64, 65, -1, -1, -1, -1, -1, -1, -1, -1,
6997 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6998 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6999 -1, -1, -1, -1, -1, 99, -1, -1, 102, 103,
7000 104, 105, -1, -1, -1, -1, 110, 111, 112, 113,
7001 114, 115, 116, 117, 118, -1, -1, 3, 4, 5,
7002 -1, 7, -1, -1, -1, 11, 12, -1, -1, -1,
7003 16, -1, 18, 19, 20, 21, 22, 23, 24, -1,
7004 -1, -1, -1, 147, 30, 31, 32, 33, 34, 35,
7005 36, 155, -1, 39, -1, -1, -1, -1, -1, -1,
7006 46, -1, -1, 49, 50, 51, 52, 53, 54, 55,
7007 56, 57, 58, 59, 60, 61, 62, 63, 64, 65,
7008 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7009 76, 77, -1, -1, -1, -1, -1, -1, -1, -1,
7010 -1, -1, -1, -1, -1, 91, 92, -1, -1, -1,
7011 -1, -1, -1, 99, -1, -1, 102, 103, 104, 105,
7012 -1, 107, 108, 109, 110, 111, 112, 113, 114, 115,
7013 116, 117, 118, -1, -1, -1, -1, -1, -1, -1,
7014 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7015 -1, -1, -1, -1, -1, -1, 3, 4, 5, -1,
7016 7, 147, 148, 149, 11, 12, -1, -1, 154, 16,
7017 -1, 18, 19, 20, 21, 22, 23, 24, -1, -1,
7018 -1, -1, -1, 30, 31, 32, 33, 34, 35, 36,
7019 -1, -1, 39, -1, -1, -1, -1, -1, -1, 46,
7020 -1, -1, 49, 50, 51, 52, 53, 54, 55, 56,
7021 57, -1, 59, 60, 61, 62, 63, 64, 65, -1,
7022 -1, -1, -1, -1, -1, -1, -1, -1, -1, 76,
7023 77, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7024 -1, -1, -1, -1, 91, 92, -1, -1, -1, -1,
7025 -1, -1, 99, -1, -1, 102, 103, 104, 105, -1,
7026 -1, -1, -1, 110, 111, 112, 113, 114, 115, 116,
7027 117, 118, -1, -1, -1, -1, -1, -1, -1, -1,
7028 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7029 -1, -1, -1, 1, -1, 3, 4, 5, 6, 7,
7030 147, 148, 149, 11, 12, -1, -1, 154, 16, -1,
7031 18, 19, 20, 21, 22, 23, 24, -1, -1, -1,
7032 -1, -1, 30, 31, 32, 33, 34, 35, 36, -1,
7033 -1, 39, -1, -1, -1, -1, -1, 45, 46, -1,
7034 48, 49, 50, 51, 52, 53, 54, 55, 56, 57,
7035 -1, 59, 60, 61, 62, 63, 64, 65, -1, -1,
7036 -1, -1, -1, -1, -1, -1, -1, -1, 76, 77,
7037 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7038 -1, -1, -1, 91, 92, -1, -1, -1, -1, -1,
7039 -1, 99, -1, -1, 102, 103, 104, 105, -1, 107,
7040 -1, -1, 110, 111, 112, 113, 114, 115, 116, 117,
7041 118, -1, -1, 1, -1, 3, 4, 5, -1, 7,
7042 -1, -1, -1, 11, 12, -1, -1, -1, 16, -1,
7043 18, 19, 20, 21, 22, 23, 24, -1, -1, 147,
7044 148, 149, 30, 31, 32, 33, 34, 35, 36, -1,
7045 -1, 39, -1, -1, -1, -1, -1, -1, 46, -1,
7046 -1, 49, 50, 51, 52, 53, 54, 55, 56, 57,
7047 -1, 59, 60, 61, 62, 63, 64, 65, -1, -1,
7048 -1, -1, -1, -1, -1, -1, -1, -1, 76, 77,
7049 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7050 -1, -1, -1, 91, 92, -1, -1, -1, -1, -1,
7051 -1, 99, -1, -1, 102, 103, 104, 105, -1, -1,
7052 -1, -1, 110, 111, 112, 113, 114, 115, 116, 117,
7053 118, -1, -1, -1, -1, 3, 4, 5, -1, 7,
7054 -1, -1, -1, 11, 12, -1, -1, -1, 16, -1,
7055 18, 19, 20, 21, 22, 23, 24, -1, -1, 147,
7056 148, 149, 30, 31, 32, 33, 34, 35, 36, -1,
7057 -1, 39, -1, -1, -1, -1, -1, -1, 46, -1,
7058 -1, 49, 50, 51, 52, 53, 54, 55, 56, 57,
7059 58, 59, 60, 61, 62, 63, 64, 65, -1, -1,
7060 -1, -1, -1, -1, -1, -1, -1, -1, 76, 77,
7061 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7062 -1, -1, -1, 91, 92, -1, -1, -1, -1, -1,
7063 -1, 99, -1, -1, 102, 103, 104, 105, -1, 107,
7064 108, 109, 110, 111, 112, 113, 114, 115, 116, 117,
7065 118, -1, -1, -1, -1, 3, 4, 5, -1, 7,
7066 -1, -1, -1, 11, 12, -1, -1, -1, 16, -1,
7067 18, 19, 20, 21, 22, 23, 24, -1, -1, 147,
7068 148, 149, 30, 31, 32, 33, 34, 35, 36, -1,
7069 -1, 39, -1, -1, -1, -1, -1, -1, 46, -1,
7070 -1, 49, 50, 51, 52, 53, 54, 55, 56, 57,
7071 58, 59, 60, 61, 62, 63, 64, 65, -1, -1,
7072 -1, -1, -1, -1, -1, -1, -1, -1, 76, 77,
7073 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7074 -1, -1, -1, 91, 92, -1, -1, -1, -1, -1,
7075 -1, 99, -1, -1, 102, 103, 104, 105, -1, 107,
7076 108, 109, 110, 111, 112, 113, 114, 115, 116, 117,
7077 118, -1, -1, -1, -1, 3, 4, 5, -1, 7,
7078 -1, -1, -1, 11, 12, -1, -1, -1, 16, -1,
7079 18, 19, 20, 21, 22, 23, 24, -1, -1, 147,
7080 148, 149, 30, 31, 32, 33, 34, 35, 36, -1,
7081 -1, 39, -1, -1, -1, -1, -1, -1, 46, -1,
7082 -1, 49, 50, 51, 52, 53, 54, 55, 56, 57,
7083 58, 59, 60, 61, 62, 63, 64, 65, -1, -1,
7084 -1, -1, -1, -1, -1, -1, -1, -1, 76, 77,
7085 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7086 -1, -1, -1, 91, 92, -1, -1, -1, -1, -1,
7087 -1, 99, -1, -1, 102, 103, 104, 105, -1, 107,
7088 108, 109, 110, 111, 112, 113, 114, 115, 116, 117,
7089 118, -1, -1, -1, -1, 3, 4, 5, -1, 7,
7090 -1, -1, -1, 11, 12, -1, -1, -1, 16, -1,
7091 18, 19, 20, 21, 22, 23, 24, -1, -1, 147,
7092 148, 149, 30, 31, 32, 33, 34, 35, 36, -1,
7093 -1, 39, -1, -1, -1, -1, -1, -1, 46, -1,
7094 -1, 49, 50, 51, 52, 53, 54, 55, 56, 57,
7095 58, 59, 60, 61, 62, 63, 64, 65, -1, -1,
7096 -1, -1, -1, -1, -1, -1, -1, -1, 76, 77,
7097 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7098 -1, -1, -1, 91, 92, -1, -1, -1, -1, -1,
7099 -1, 99, -1, -1, 102, 103, 104, 105, -1, 107,
7100 108, 109, 110, 111, 112, 113, 114, 115, 116, 117,
7101 118, -1, -1, -1, -1, 3, 4, 5, -1, 7,
7102 -1, -1, -1, 11, 12, -1, -1, -1, 16, -1,
7103 18, 19, 20, 21, 22, 23, 24, -1, -1, 147,
7104 148, 149, 30, 31, 32, 33, 34, 35, 36, -1,
7105 -1, 39, -1, -1, -1, -1, -1, -1, 46, -1,
7106 -1, 49, 50, 51, 52, 53, 54, 55, 56, 57,
7107 58, 59, 60, 61, 62, 63, 64, 65, -1, -1,
7108 -1, -1, -1, -1, -1, -1, -1, -1, 76, 77,
7109 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7110 -1, -1, -1, 91, 92, -1, -1, -1, -1, -1,
7111 -1, 99, -1, -1, 102, 103, 104, 105, -1, 107,
7112 108, -1, 110, 111, 112, 113, 114, 115, 116, 117,
7113 118, -1, -1, -1, -1, 3, 4, 5, -1, 7,
7114 -1, -1, -1, 11, 12, -1, -1, -1, 16, -1,
7115 18, 19, 20, 21, 22, 23, 24, -1, -1, 147,
7116 148, 149, 30, 31, 32, 33, 34, 35, 36, -1,
7117 -1, 39, -1, -1, -1, -1, -1, -1, 46, -1,
7118 -1, 49, 50, 51, 52, 53, 54, 55, 56, 57,
7119 58, 59, 60, 61, 62, 63, 64, 65, -1, -1,
7120 -1, -1, -1, -1, -1, -1, -1, -1, 76, 77,
7121 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7122 -1, -1, -1, 91, 92, -1, -1, -1, -1, -1,
7123 -1, 99, -1, -1, 102, 103, 104, 105, -1, -1,
7124 108, 109, 110, 111, 112, 113, 114, 115, 116, 117,
7125 118, -1, -1, -1, -1, 3, 4, 5, -1, 7,
7126 -1, -1, -1, 11, 12, -1, -1, -1, 16, -1,
7127 18, 19, 20, 21, 22, 23, 24, -1, -1, 147,
7128 148, 149, 30, 31, 32, 33, 34, 35, 36, -1,
7129 -1, 39, -1, -1, -1, -1, -1, -1, 46, -1,
7130 -1, 49, 50, 51, 52, 53, 54, 55, 56, 57,
7131 58, 59, 60, 61, 62, 63, 64, 65, -1, -1,
7132 -1, -1, -1, -1, -1, -1, -1, -1, 76, 77,
7133 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7134 -1, -1, -1, 91, 92, -1, -1, -1, -1, -1,
7135 -1, 99, -1, -1, 102, 103, 104, 105, -1, -1,
7136 108, -1, 110, 111, 112, 113, 114, 115, 116, 117,
7137 118, -1, -1, -1, -1, 3, 4, 5, -1, 7,
7138 -1, -1, -1, 11, 12, -1, -1, -1, 16, -1,
7139 18, 19, 20, 21, 22, 23, 24, -1, -1, 147,
7140 148, 149, 30, 31, 32, 33, 34, 35, 36, -1,
7141 -1, 39, -1, -1, -1, -1, -1, -1, 46, -1,
7142 -1, 49, 50, 51, 52, 53, 54, 55, 56, 57,
7143 -1, 59, 60, 61, 62, 63, 64, 65, -1, -1,
7144 -1, -1, -1, -1, -1, -1, -1, -1, 76, 77,
7145 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7146 -1, -1, -1, 91, 92, -1, -1, -1, -1, -1,
7147 -1, 99, -1, -1, 102, 103, 104, 105, -1, 107,
7148 -1, -1, 110, 111, 112, 113, 114, 115, 116, 117,
7149 118, -1, -1, -1, -1, 3, 4, 5, -1, 7,
7150 -1, -1, -1, 11, 12, -1, -1, -1, 16, -1,
7151 18, 19, 20, 21, 22, 23, 24, -1, -1, 147,
7152 148, 149, 30, 31, 32, 33, 34, 35, 36, -1,
7153 -1, 39, -1, -1, -1, -1, -1, -1, 46, -1,
7154 -1, 49, 50, 51, 52, 53, 54, 55, 56, 57,
7155 -1, 59, 60, 61, 62, 63, 64, 65, -1, -1,
7156 -1, -1, -1, -1, -1, -1, -1, -1, 76, 77,
7157 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7158 -1, -1, -1, 91, 92, -1, -1, -1, -1, -1,
7159 -1, 99, -1, -1, 102, 103, 104, 105, -1, 107,
7160 -1, -1, 110, 111, 112, 113, 114, 115, 116, 117,
7161 118, -1, -1, -1, -1, 3, 4, 5, -1, 7,
7162 -1, -1, -1, 11, 12, -1, -1, -1, 16, -1,
7163 18, 19, 20, 21, 22, 23, 24, -1, -1, 147,
7164 148, 149, 30, 31, 32, 33, 34, 35, 36, -1,
7165 -1, 39, -1, -1, -1, -1, -1, -1, 46, -1,
7166 -1, 49, 50, 51, 52, 53, 54, 55, 56, 57,
7167 -1, 59, 60, 61, 62, 63, 64, 65, -1, -1,
7168 -1, -1, -1, -1, -1, -1, -1, -1, 76, 77,
7169 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7170 -1, -1, -1, 91, 92, -1, -1, -1, -1, -1,
7171 -1, 99, -1, -1, 102, 103, 104, 105, -1, 107,
7172 -1, -1, 110, 111, 112, 113, 114, 115, 116, 117,
7173 118, -1, -1, -1, -1, 3, 4, 5, -1, 7,
7174 -1, -1, -1, 11, 12, -1, -1, -1, 16, -1,
7175 18, 19, 20, 21, 22, 23, 24, -1, -1, 147,
7176 148, 149, 30, 31, 32, 33, 34, 35, 36, -1,
7177 -1, 39, -1, -1, -1, -1, -1, -1, 46, -1,
7178 -1, 49, 50, 51, 52, 53, 54, 55, 56, 57,
7179 -1, 59, 60, 61, 62, 63, 64, 65, -1, -1,
7180 -1, -1, -1, -1, -1, -1, -1, -1, 76, 77,
7181 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7182 -1, -1, -1, 91, 92, -1, -1, -1, -1, -1,
7183 -1, 99, -1, -1, 102, 103, 104, 105, -1, 107,
7184 -1, -1, 110, 111, 112, 113, 114, 115, 116, 117,
7185 118, -1, -1, -1, -1, 3, 4, 5, -1, 7,
7186 -1, -1, -1, 11, 12, -1, -1, -1, 16, -1,
7187 18, 19, 20, 21, 22, 23, 24, -1, -1, 147,
7188 148, 149, 30, 31, 32, 33, 34, 35, 36, -1,
7189 -1, 39, -1, -1, -1, -1, -1, -1, 46, -1,
7190 -1, 49, 50, 51, 52, 53, 54, 55, 56, 57,
7191 -1, 59, 60, 61, 62, 63, 64, 65, -1, -1,
7192 -1, -1, -1, -1, -1, -1, -1, -1, 76, 77,
7193 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7194 -1, -1, -1, 91, 92, -1, -1, -1, -1, -1,
7195 -1, 99, -1, -1, 102, 103, 104, 105, -1, 107,
7196 -1, -1, 110, 111, 112, 113, 114, 115, 116, 117,
7197 118, -1, -1, -1, -1, 3, 4, 5, -1, 7,
7198 -1, -1, -1, 11, 12, -1, -1, -1, 16, -1,
7199 18, 19, 20, 21, 22, 23, 24, -1, -1, 147,
7200 148, 149, 30, 31, 32, 33, 34, 35, 36, -1,
7201 -1, 39, -1, -1, -1, -1, -1, -1, 46, -1,
7202 -1, 49, 50, 51, 52, 53, 54, 55, 56, 57,
7203 -1, 59, 60, 61, 62, 63, 64, 65, -1, -1,
7204 -1, -1, -1, -1, -1, -1, -1, -1, 76, 77,
7205 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7206 -1, -1, -1, 91, 92, -1, -1, -1, -1, -1,
7207 -1, 99, -1, -1, 102, 103, 104, 105, -1, 107,
7208 -1, -1, 110, 111, 112, 113, 114, 115, 116, 117,
7209 118, -1, -1, -1, -1, 3, 4, 5, -1, 7,
7210 -1, -1, -1, 11, 12, -1, -1, -1, 16, -1,
7211 18, 19, 20, 21, 22, 23, 24, -1, -1, 147,
7212 148, 149, 30, 31, 32, 33, 34, 35, 36, -1,
7213 -1, 39, -1, -1, -1, -1, -1, -1, 46, -1,
7214 -1, 49, 50, 51, 52, 53, 54, 55, 56, 57,
7215 -1, 59, 60, 61, 62, 63, 64, 65, -1, -1,
7216 -1, -1, -1, -1, -1, -1, -1, -1, 76, 77,
7217 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7218 -1, -1, -1, 91, 92, -1, -1, -1, -1, -1,
7219 -1, 99, -1, -1, 102, 103, 104, 105, -1, -1,
7220 -1, -1, 110, 111, 112, 113, 114, 115, 116, 117,
7221 118, -1, -1, -1, -1, 3, 4, 5, -1, 7,
7222 -1, -1, -1, 11, 12, -1, -1, -1, 16, -1,
7223 18, 19, 20, 21, 22, 23, 24, -1, -1, 147,
7224 148, 149, 30, 31, 32, 33, 34, 35, 36, -1,
7225 -1, 39, -1, -1, -1, -1, -1, -1, 46, -1,
7226 -1, 49, 50, 51, 52, 53, 54, 55, 56, 57,
7227 -1, 59, 60, 61, 62, 63, 64, 65, -1, -1,
7228 -1, -1, -1, -1, -1, -1, -1, -1, 76, 77,
7229 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7230 -1, -1, -1, 91, 92, -1, -1, -1, -1, -1,
7231 -1, 99, -1, -1, 102, 103, 104, 105, -1, -1,
7232 -1, -1, 110, 111, 112, 113, 114, 115, 116, 117,
7233 118, -1, -1, -1, -1, 3, 4, 5, -1, 7,
7234 -1, -1, -1, 11, 12, -1, -1, -1, 16, -1,
7235 18, 19, 20, 21, 22, 23, 24, -1, -1, 147,
7236 148, 149, 30, 31, 32, 33, 34, 35, 36, -1,
7237 -1, 39, -1, -1, -1, -1, -1, -1, 46, -1,
7238 -1, 49, 50, 51, 52, 53, 54, 55, 56, 57,
7239 -1, 59, 60, 61, 62, 63, 64, 65, -1, -1,
7240 -1, -1, -1, -1, -1, -1, -1, -1, 76, 77,
7241 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7242 -1, -1, -1, 91, 92, -1, -1, -1, -1, -1,
7243 -1, 99, -1, -1, 102, 103, 104, 105, -1, -1,
7244 -1, -1, 110, 111, 112, 113, 114, 115, 116, 117,
7245 118, -1, -1, -1, -1, 3, 4, 5, -1, 7,
7246 -1, -1, -1, 11, 12, -1, -1, -1, 16, -1,
7247 18, 19, 20, 21, 22, 23, 24, -1, -1, 147,
7248 148, 149, 30, 31, 32, 33, 34, 35, 36, -1,
7249 -1, 39, -1, -1, -1, -1, -1, -1, 46, -1,
7250 -1, 49, 50, 51, 52, 53, 54, 55, 56, 57,
7251 -1, 59, 60, 61, 62, 63, 64, 65, -1, -1,
7252 -1, -1, -1, -1, -1, -1, -1, -1, 76, 77,
7253 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7254 -1, -1, -1, 91, 92, -1, -1, -1, -1, -1,
7255 -1, 99, -1, -1, 102, 103, 104, 105, -1, -1,
7256 -1, -1, 110, 111, 112, 113, 114, 115, 116, 117,
7257 118, -1, -1, -1, -1, 3, 4, 5, -1, 7,
7258 -1, -1, -1, 11, 12, -1, -1, -1, 16, -1,
7259 18, 19, 20, 21, 22, 23, 24, -1, -1, 147,
7260 148, 149, 30, 31, 32, 33, 34, 35, 36, -1,
7261 -1, 39, -1, -1, -1, -1, -1, -1, 46, -1,
7262 -1, 49, 50, 51, 52, 53, 54, 55, 56, 57,
7263 -1, 59, 60, 61, 62, 63, 64, 65, -1, -1,
7264 -1, -1, -1, -1, -1, -1, -1, -1, 76, 77,
7265 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7266 -1, -1, -1, 91, 92, -1, -1, -1, -1, -1,
7267 -1, 99, -1, -1, 102, 103, 104, 105, -1, -1,
7268 -1, -1, 110, 111, 112, 113, 114, 115, 116, 117,
7269 118, -1, -1, -1, -1, 3, 4, 5, -1, 7,
7270 -1, -1, -1, 11, 12, -1, -1, -1, 16, -1,
7271 18, 19, 20, 21, 22, 23, 24, -1, -1, 147,
7272 148, 149, 30, 31, 32, 33, 34, 35, 36, -1,
7273 -1, 39, -1, -1, -1, -1, -1, -1, 46, -1,
7274 -1, 49, 50, 51, 52, 53, 54, 55, 56, 57,
7275 -1, 59, 60, 61, 62, 63, 64, 65, -1, -1,
7276 -1, -1, -1, -1, -1, -1, -1, -1, 76, 77,
7277 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7278 -1, -1, -1, 91, 92, -1, -1, -1, -1, -1,
7279 -1, 99, -1, -1, 102, 103, 104, 105, -1, -1,
7280 -1, -1, 110, 111, 112, 113, 114, 115, 116, 117,
7281 118, -1, -1, -1, -1, 3, 4, 5, -1, 7,
7282 -1, -1, -1, 11, 12, -1, -1, -1, 16, -1,
7283 18, 19, 20, 21, 22, 23, 24, -1, -1, 147,
7284 148, 149, 30, 31, 32, 33, 34, 35, 36, -1,
7285 -1, 39, -1, -1, -1, -1, -1, -1, 46, -1,
7286 -1, 49, 50, 51, 52, 53, 54, 55, 56, 57,
7287 -1, 59, 60, 61, 62, 63, 64, 65, -1, -1,
7288 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7289 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7290 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7291 -1, 99, -1, -1, 102, 103, 104, 105, -1, 107,
7292 -1, -1, 110, 111, 112, 113, 114, 115, 116, 117,
7293 118, -1, -1, 3, 4, 5, -1, 7, -1, -1,
7294 -1, 11, 12, -1, -1, -1, 16, -1, 18, 19,
7295 20, 21, 22, 23, 24, -1, -1, -1, -1, 147,
7296 30, 31, 32, 33, 34, 35, 36, -1, -1, 39,
7297 -1, -1, -1, -1, -1, -1, 46, -1, -1, 49,
7298 50, 51, 52, 53, 54, 55, 56, 57, -1, 59,
7299 60, 61, 62, 63, 64, 65, -1, -1, -1, -1,
7300 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7301 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7302 -1, -1, -1, -1, -1, -1, -1, -1, -1, 99,
7303 -1, -1, 102, 103, 104, 105, -1, 107, -1, -1,
7304 110, 111, 112, 113, 114, 115, 116, 117, 118, -1,
7305 -1, 3, 4, 5, -1, 7, -1, -1, -1, 11,
7306 12, -1, -1, -1, 16, -1, 18, 19, 20, 21,
7307 22, 23, 24, -1, -1, -1, -1, 147, 30, 31,
7308 32, 33, 34, 35, 36, -1, -1, 39, -1, -1,
7309 -1, -1, -1, -1, 46, -1, -1, 49, 50, 51,
7310 52, 53, 54, 55, 56, 57, -1, 59, 60, 61,
7311 62, 63, 64, 65, -1, -1, -1, -1, -1, -1,
7312 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7313 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7314 -1, -1, -1, 95, -1, -1, -1, 99, -1, -1,
7315 102, 103, 104, 105, -1, -1, -1, -1, 110, 111,
7316 112, 113, 114, 115, 116, 117, 118, -1, -1, 3,
7317 4, 5, -1, 7, -1, -1, -1, 11, 12, -1,
7318 -1, -1, 16, -1, 18, 19, 20, 21, 22, 23,
7319 24, -1, -1, -1, -1, 147, 30, 31, 32, 33,
7320 34, 35, 36, -1, -1, 39, -1, -1, -1, -1,
7321 -1, -1, 46, -1, -1, 49, 50, 51, 52, 53,
7322 54, 55, 56, 57, -1, 59, 60, 61, 62, 63,
7323 64, 65, -1, -1, -1, -1, -1, -1, -1, -1,
7324 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7325 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7326 -1, -1, -1, -1, -1, 99, -1, -1, 102, 103,
7327 104, 105, -1, -1, -1, -1, 110, 111, 112, 113,
7328 114, 115, 116, 117, 118, -1, -1, 3, 4, 5,
7329 -1, 7, -1, -1, -1, 11, 12, -1, -1, -1,
7330 16, -1, 18, 19, 20, 21, 22, 23, 24, -1,
7331 -1, -1, -1, 147, 30, 31, 32, 33, 34, 35,
7332 36, -1, -1, 39, -1, -1, -1, -1, -1, -1,
7333 46, -1, -1, 49, 50, 51, 52, 53, 54, 55,
7334 56, 57, -1, 59, 60, 61, 62, 63, 64, 65,
7335 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7336 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7337 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7338 -1, -1, -1, 99, -1, -1, 102, 103, 104, 105,
7339 -1, -1, -1, -1, 110, 111, 112, 113, 114, 115,
7340 116, 117, 118, -1, -1, 3, 4, 5, -1, 7,
7341 -1, -1, -1, 11, 12, -1, -1, -1, 16, -1,
7342 18, 19, 20, 21, 22, 23, 24, -1, -1, -1,
7343 -1, 147, 30, 31, 32, 33, 34, 35, 36, -1,
7344 -1, 39, -1, -1, -1, -1, -1, -1, 46, -1,
7345 -1, 49, 50, 51, 52, 53, 54, 55, 56, 57,
7346 -1, 59, 60, 61, 62, 63, 64, 65, -1, -1,
7347 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7348 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7349 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7350 -1, 99, -1, -1, 102, 103, 104, 105, -1, -1,
7351 -1, -1, 110, 111, 112, 113, 114, 115, 116, 117,
7352 118, -1, -1, 3, 4, 5, -1, 7, -1, -1,
7353 -1, 11, 12, -1, -1, -1, 16, -1, 18, 19,
7354 20, 21, 22, 23, 24, -1, -1, -1, -1, 147,
7355 30, 31, 32, 33, 34, 35, 36, -1, -1, 39,
7356 -1, -1, -1, -1, -1, -1, 46, -1, -1, 49,
7357 50, 51, 52, 53, 54, 55, 56, 57, -1, 59,
7358 60, 61, 62, 63, 64, 65, -1, -1, -1, -1,
7359 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7360 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7361 -1, -1, -1, -1, -1, -1, 52, 53, -1, 99,
7362 56, -1, 102, 103, 104, 105, -1, -1, -1, -1,
7363 110, 111, 112, 113, 114, 115, 116, 117, 118, -1,
7364 76, 77, 78, 79, 80, 81, 82, 83, 84, -1,
7365 -1, 87, 88, -1, -1, -1, -1, 93, 94, 95,
7366 96, -1, -1, -1, -1, -1, -1, 147, -1, -1,
7367 -1, 107, 108, -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, -1, -1, -1, -1,
7370 -1, 137, 138, 139, 140, 141, 142, 143, 144, 145,
7371 146, -1, 148, 149, 52, 53, -1, -1, 56, -1,
7372 156, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7373 -1, -1, -1, -1, -1, -1, -1, -1, 76, 77,
7374 78, 79, 80, 81, 82, 83, 84, -1, -1, 87,
7375 88, -1, -1, -1, -1, 93, 94, 95, 96, -1,
7376 -1, -1, -1, -1, -1, -1, -1, -1, -1, 107,
7377 108, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7378 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7379 -1, -1, -1, -1, -1, -1, -1, -1, -1, 137,
7380 138, 139, 140, 141, 142, 143, 144, 145, 146, -1,
7381 148, 149, 52, 53, -1, -1, 56, -1, 156, -1,
7382 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7383 -1, -1, -1, -1, -1, -1, 76, 77, 78, 79,
7384 80, 81, 82, 83, 84, -1, -1, 87, 88, -1,
7385 -1, -1, -1, 93, 94, 95, 96, -1, -1, -1,
7386 -1, -1, -1, -1, -1, -1, -1, 107, 108, -1,
7387 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7388 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7389 -1, -1, -1, -1, -1, -1, -1, 137, 138, 139,
7390 140, 141, 142, 143, 144, 145, 146, -1, 148, 149,
7391 52, 53, -1, -1, 56, -1, 156, -1, -1, -1,
7392 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7393 -1, -1, -1, -1, 76, 77, 78, 79, 80, 81,
7394 82, 83, 84, -1, -1, 87, 88, -1, -1, -1,
7395 -1, 93, 94, 95, 96, -1, -1, -1, -1, -1,
7396 -1, -1, -1, -1, -1, 107, 108, -1, -1, -1,
7397 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7398 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7399 -1, -1, -1, -1, -1, 137, 138, 139, 140, 141,
7400 142, 143, 144, 145, 146, -1, 148, 149, 52, 53,
7401 -1, -1, 56, -1, 156, -1, -1, -1, -1, -1,
7402 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7403 -1, -1, 76, 77, 78, 79, 80, 81, 82, 83,
7404 84, -1, -1, 87, 88, -1, -1, -1, -1, 93,
7405 94, 95, 96, -1, -1, -1, -1, -1, -1, -1,
7406 -1, -1, -1, 107, 108, -1, -1, -1, -1, -1,
7407 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7408 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7409 -1, -1, -1, 137, 138, 139, 140, 141, 142, 143,
7410 144, 145, 146, -1, 148, 149, 52, 53, -1, -1,
7411 56, -1, 156, -1, -1, -1, -1, -1, -1, -1,
7412 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7413 76, 77, 78, 79, 80, 81, 82, 83, 84, -1,
7414 -1, 87, 88, -1, -1, -1, -1, 93, 94, 95,
7415 96, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7416 -1, 107, 108, -1, -1, -1, -1, -1, -1, -1,
7417 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7418 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7419 -1, 137, 138, 139, 140, 141, 142, 143, 144, 145,
7420 146, -1, 148, 149, 52, 53, -1, -1, 56, -1,
7421 156, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7422 -1, -1, -1, -1, -1, -1, -1, -1, 76, 77,
7423 78, 79, 80, 81, 82, 83, 84, -1, -1, 87,
7424 88, -1, -1, -1, -1, 93, 94, 95, 96, -1,
7425 -1, -1, -1, -1, -1, -1, -1, -1, -1, 107,
7426 108, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7427 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7428 -1, -1, -1, -1, -1, -1, -1, -1, -1, 137,
7429 138, 139, 140, 141, 142, 143, 144, 145, 146, -1,
7430 148, 149, 52, 53, -1, -1, 56, -1, 156, -1,
7431 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7432 -1, -1, -1, -1, -1, -1, 76, 77, 78, 79,
7433 80, 81, 82, 83, 84, -1, -1, 87, 88, -1,
7434 -1, -1, -1, 93, 94, 95, 96, -1, -1, -1,
7435 -1, -1, -1, -1, -1, -1, -1, 107, 108, -1,
7436 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7437 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7438 -1, -1, -1, -1, -1, -1, -1, 137, 138, 139,
7439 140, 141, 142, 143, 144, 145, 146, -1, 148, 149,
7440 52, 53, -1, -1, 56, -1, 156, -1, -1, -1,
7441 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7442 -1, -1, -1, -1, 76, 77, 78, 79, 80, 81,
7443 82, 83, 84, -1, -1, 87, 88, -1, -1, -1,
7444 -1, 93, 94, 95, 96, -1, -1, -1, -1, -1,
7445 -1, -1, -1, -1, -1, 107, 108, -1, -1, -1,
7446 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7447 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7448 -1, -1, -1, -1, -1, 137, 138, 139, 140, 141,
7449 142, 143, 144, 145, 146, -1, 148, 149, 52, 53,
7450 -1, -1, 56, -1, 156, -1, -1, -1, -1, -1,
7451 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7452 -1, -1, 76, 77, 78, 79, 80, 81, 82, 83,
7453 84, -1, -1, 87, 88, -1, -1, -1, -1, 93,
7454 94, 95, 96, -1, -1, -1, -1, -1, -1, -1,
7455 -1, -1, -1, 107, 108, -1, -1, -1, -1, -1,
7456 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7457 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7458 -1, -1, -1, 137, 138, 139, 140, 141, 142, 143,
7459 144, 145, 146, -1, 148, 149, 52, 53, -1, -1,
7460 56, -1, 156, -1, -1, -1, -1, -1, -1, -1,
7461 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7462 76, 77, 78, 79, 80, 81, 82, 83, 84, -1,
7463 -1, 87, 88, -1, -1, -1, -1, 93, 94, 95,
7464 96, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7465 -1, 107, 108, -1, -1, -1, -1, -1, -1, -1,
7466 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7467 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7468 -1, 137, 138, 139, 140, 141, 142, 143, 144, 145,
7469 146, -1, 148, 149, 52, 53, -1, -1, 56, -1,
7470 156, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7471 -1, -1, -1, -1, -1, -1, -1, -1, 76, 77,
7472 78, 79, 80, 81, 82, 83, 84, -1, -1, 87,
7473 88, -1, -1, -1, -1, 93, 94, 95, 96, -1,
7474 -1, -1, -1, -1, -1, -1, -1, -1, -1, 107,
7475 108, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7476 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7477 -1, -1, -1, -1, -1, -1, -1, -1, -1, 137,
7478 138, 139, 140, 141, 142, 143, 144, 145, 146, -1,
7479 148, 149, 52, 53, -1, -1, 56, -1, 156, -1,
7480 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7481 -1, -1, -1, -1, -1, -1, 76, 77, 78, 79,
7482 80, 81, 82, 83, 84, -1, -1, 87, 88, -1,
7483 -1, -1, -1, 93, 94, 95, 96, -1, -1, -1,
7484 -1, -1, -1, -1, -1, -1, -1, 107, 108, -1,
7485 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7486 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7487 -1, -1, -1, -1, -1, -1, -1, 137, 138, 139,
7488 140, 141, 142, 143, 144, 145, 146, -1, 148, 149,
7489 52, 53, -1, -1, 56, -1, 156, -1, -1, -1,
7490 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7491 -1, -1, -1, -1, 76, 77, 78, 79, 80, 81,
7492 82, 83, 84, -1, -1, 87, 88, -1, -1, -1,
7493 -1, 93, 94, 95, 96, -1, -1, -1, -1, -1,
7494 -1, -1, -1, -1, -1, 107, 108, -1, -1, -1,
7495 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7496 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7497 -1, -1, -1, -1, -1, 137, 138, 139, 140, 141,
7498 142, 143, 144, 145, 146, -1, 148, 149, -1, -1,
7499 -1, -1, -1, -1, 156
7500};
7501
7502/* YYSTOS[STATE-NUM] -- The symbol kind of the accessing symbol of
7503 state STATE-NUM. */
7504static const yytype_int16 yystos[] =
7505{
7506 0, 165, 166, 1, 3, 4, 5, 6, 7, 11,
7507 12, 16, 18, 19, 20, 21, 22, 23, 24, 30,
7508 31, 32, 33, 34, 35, 36, 39, 45, 46, 47,
7509 48, 49, 50, 51, 52, 53, 54, 55, 56, 57,
7510 59, 60, 61, 62, 63, 64, 65, 76, 77, 91,
7511 92, 99, 102, 103, 104, 105, 107, 110, 111, 112,
7512 113, 114, 115, 116, 117, 118, 147, 148, 149, 164,
7513 167, 168, 180, 182, 183, 184, 185, 186, 187, 191,
7514 195, 197, 203, 206, 208, 209, 210, 212, 214, 215,
7515 216, 217, 226, 227, 228, 229, 230, 231, 234, 255,
7516 267, 268, 269, 270, 271, 272, 273, 274, 275, 276,
7517 277, 278, 287, 288, 324, 329, 330, 380, 381, 382,
7518 383, 384, 385, 387, 388, 391, 392, 394, 395, 396,
7519 397, 411, 412, 414, 415, 416, 417, 418, 419, 420,
7520 421, 422, 483, 0, 3, 4, 5, 6, 7, 8,
7521 9, 10, 11, 12, 13, 14, 15, 16, 17, 18,
7522 19, 20, 21, 22, 23, 24, 25, 26, 30, 31,
7523 32, 33, 34, 35, 36, 37, 38, 39, 45, 46,
7524 47, 48, 49, 50, 51, 52, 53, 56, 76, 77,
7525 78, 79, 80, 81, 82, 83, 84, 87, 88, 93,
7526 94, 95, 96, 107, 108, 137, 138, 139, 140, 141,
7527 142, 143, 144, 145, 146, 148, 149, 156, 220, 221,
7528 222, 224, 225, 411, 179, 179, 179, 39, 58, 99,
7529 102, 107, 108, 109, 112, 148, 187, 209, 217, 227,
7530 238, 239, 245, 246, 249, 251, 252, 268, 418, 419,
7531 421, 422, 470, 471, 246, 157, 242, 247, 248, 154,
7532 157, 189, 54, 221, 189, 151, 169, 170, 235, 483,
7533 21, 22, 32, 195, 197, 208, 227, 268, 287, 288,
7534 227, 227, 227, 56, 47, 102, 171, 176, 177, 182,
7535 211, 212, 483, 171, 240, 251, 470, 483, 239, 469,
7536 470, 483, 46, 99, 147, 155, 195, 197, 216, 255,
7537 268, 418, 419, 422, 322, 220, 400, 413, 417, 400,
7538 401, 402, 161, 386, 386, 386, 386, 416, 203, 227,
7539 227, 154, 160, 163, 481, 482, 169, 40, 41, 42,
7540 43, 44, 37, 38, 157, 425, 426, 427, 428, 429,
7541 425, 428, 26, 151, 242, 248, 279, 331, 28, 280,
7542 328, 134, 155, 102, 107, 214, 134, 25, 78, 79,
7543 80, 81, 82, 83, 84, 85, 86, 87, 88, 89,
7544 90, 95, 96, 101, 135, 137, 138, 139, 140, 141,
7545 142, 143, 144, 145, 146, 233, 233, 69, 97, 98,
7546 153, 475, 476, 256, 1, 191, 198, 199, 199, 200,
7547 202, 202, 163, 199, 482, 99, 210, 217, 268, 293,
7548 418, 419, 422, 52, 56, 95, 99, 218, 219, 268,
7549 418, 419, 422, 219, 33, 34, 35, 36, 49, 50,
7550 51, 52, 56, 157, 194, 220, 420, 465, 466, 467,
7551 246, 157, 248, 98, 475, 476, 331, 383, 100, 100,
7552 155, 239, 56, 239, 239, 239, 400, 134, 101, 155,
7553 250, 483, 98, 153, 475, 100, 100, 155, 250, 92,
7554 244, 246, 251, 449, 470, 483, 246, 189, 191, 477,
7555 191, 54, 64, 65, 181, 157, 235, 236, 164, 425,
7556 425, 98, 475, 100, 178, 211, 158, 163, 482, 477,
7557 257, 159, 155, 189, 480, 155, 480, 152, 480, 189,
7558 56, 416, 213, 214, 427, 155, 98, 153, 475, 319,
7559 66, 119, 121, 122, 403, 119, 119, 403, 67, 403,
7560 161, 389, 398, 393, 399, 78, 160, 168, 171, 199,
7561 199, 199, 199, 235, 237, 191, 191, 52, 54, 55,
7562 56, 57, 58, 78, 92, 102, 107, 108, 109, 141,
7563 144, 298, 367, 426, 430, 431, 433, 434, 437, 438,
7564 440, 441, 442, 443, 449, 450, 451, 452, 453, 454,
7565 455, 456, 457, 458, 459, 460, 461, 462, 134, 265,
7566 443, 134, 266, 332, 333, 106, 207, 334, 335, 335,
7567 235, 211, 155, 216, 155, 235, 193, 227, 227, 227,
7568 227, 227, 227, 227, 227, 227, 227, 227, 227, 227,
7569 192, 227, 227, 227, 227, 227, 227, 227, 227, 227,
7570 227, 227, 52, 53, 56, 224, 472, 473, 244, 251,
7571 52, 53, 56, 224, 472, 242, 171, 174, 13, 289,
7572 481, 289, 199, 171, 171, 259, 163, 56, 98, 153,
7573 475, 25, 199, 52, 56, 218, 138, 424, 483, 98,
7574 153, 475, 264, 468, 69, 98, 474, 246, 477, 52,
7575 56, 242, 472, 235, 235, 223, 100, 124, 235, 239,
7576 239, 249, 252, 470, 52, 56, 244, 52, 56, 235,
7577 235, 471, 477, 155, 477, 155, 158, 477, 221, 236,
7578 227, 152, 134, 134, 56, 472, 472, 235, 170, 477,
7579 177, 158, 470, 155, 213, 52, 56, 244, 52, 56,
7580 320, 405, 404, 119, 390, 403, 66, 119, 119, 390,
7581 66, 119, 227, 152, 182, 102, 107, 294, 295, 296,
7582 297, 451, 155, 432, 463, 464, 155, 432, 155, 439,
7583 464, 477, 299, 300, 155, 439, 239, 34, 52, 52,
7584 155, 439, 34, 52, 39, 188, 209, 227, 232, 174,
7585 481, 188, 232, 174, 319, 152, 333, 319, 10, 68,
7586 286, 286, 107, 203, 204, 205, 239, 251, 253, 254,
7587 477, 213, 155, 99, 185, 190, 205, 217, 227, 239,
7588 241, 254, 268, 422, 341, 341, 189, 100, 100, 151,
7589 242, 248, 189, 478, 155, 100, 100, 242, 243, 248,
7590 483, 235, 286, 171, 13, 171, 27, 290, 481, 286,
7591 286, 17, 283, 337, 25, 258, 343, 52, 56, 244,
7592 52, 56, 260, 263, 423, 262, 52, 56, 218, 244,
7593 174, 191, 196, 477, 243, 248, 190, 227, 241, 190,
7594 241, 221, 235, 239, 250, 100, 100, 478, 100, 100,
7595 449, 470, 191, 39, 190, 241, 480, 214, 478, 321,
7596 406, 410, 417, 422, 386, 403, 386, 386, 386, 296,
7597 451, 155, 477, 155, 462, 430, 456, 458, 434, 437,
7598 454, 460, 134, 239, 438, 453, 460, 452, 454, 189,
7599 44, 44, 286, 286, 320, 152, 320, 239, 155, 44,
7600 213, 56, 44, 134, 44, 98, 153, 475, 339, 339,
7601 136, 235, 235, 333, 207, 159, 100, 235, 235, 207,
7602 8, 281, 376, 483, 14, 15, 284, 285, 291, 292,
7603 483, 292, 201, 107, 239, 336, 286, 341, 337, 286,
7604 478, 199, 481, 199, 174, 478, 286, 477, 194, 331,
7605 328, 235, 235, 100, 235, 235, 477, 155, 477, 189,
7606 179, 407, 477, 294, 297, 295, 432, 155, 439, 155,
7607 439, 155, 439, 155, 439, 439, 188, 232, 237, 237,
7608 321, 321, 107, 239, 237, 237, 235, 237, 52, 56,
7609 244, 52, 56, 340, 340, 227, 190, 241, 190, 241,
7610 152, 235, 190, 241, 190, 241, 239, 254, 377, 483,
7611 175, 284, 171, 199, 286, 286, 239, 155, 289, 339,
7612 286, 290, 174, 481, 286, 235, 157, 298, 325, 426,
7613 431, 435, 436, 438, 445, 446, 447, 448, 449, 454,
7614 460, 462, 408, 155, 155, 454, 454, 460, 454, 227,
7615 227, 179, 179, 239, 182, 182, 227, 478, 52, 56,
7616 58, 91, 92, 99, 102, 104, 105, 107, 112, 140,
7617 324, 346, 347, 348, 350, 353, 357, 358, 359, 362,
7618 363, 364, 365, 366, 367, 368, 369, 370, 371, 372,
7619 373, 374, 375, 380, 381, 384, 385, 388, 392, 395,
7620 397, 419, 456, 346, 190, 241, 101, 378, 483, 9,
7621 282, 379, 483, 172, 289, 107, 239, 171, 340, 261,
7622 286, 448, 155, 303, 483, 323, 155, 303, 155, 444,
7623 483, 155, 444, 155, 444, 171, 295, 439, 439, 155,
7624 439, 439, 139, 313, 314, 483, 313, 371, 371, 56,
7625 218, 340, 347, 355, 356, 357, 358, 361, 478, 189,
7626 340, 479, 52, 400, 52, 102, 417, 101, 155, 139,
7627 155, 155, 347, 89, 90, 98, 153, 157, 351, 352,
7628 52, 99, 217, 268, 418, 419, 422, 289, 176, 171,
7629 171, 239, 292, 337, 338, 345, 346, 171, 189, 316,
7630 462, 29, 123, 326, 458, 436, 454, 460, 438, 460,
7631 454, 0, 120, 409, 454, 298, 301, 302, 304, 305,
7632 307, 308, 310, 311, 312, 315, 452, 454, 455, 460,
7633 462, 171, 174, 347, 478, 347, 359, 361, 478, 155,
7634 152, 235, 124, 199, 372, 355, 359, 349, 360, 361,
7635 112, 364, 368, 371, 371, 218, 340, 478, 340, 477,
7636 355, 358, 362, 355, 358, 362, 56, 98, 153, 475,
7637 171, 163, 173, 291, 289, 40, 41, 286, 160, 158,
7638 327, 171, 303, 155, 444, 155, 444, 155, 444, 155,
7639 444, 444, 439, 303, 155, 303, 155, 309, 483, 316,
7640 300, 155, 306, 309, 99, 268, 155, 309, 477, 155,
7641 155, 354, 477, 155, 353, 155, 400, 477, 477, 477,
7642 478, 478, 478, 52, 56, 244, 52, 56, 376, 379,
7643 342, 199, 199, 52, 317, 318, 450, 174, 152, 454,
7644 454, 460, 454, 301, 458, 305, 307, 454, 460, 139,
7645 268, 308, 460, 56, 98, 454, 360, 362, 360, 359,
7646 361, 478, 171, 155, 189, 286, 444, 444, 155, 444,
7647 444, 303, 155, 309, 155, 309, 155, 309, 155, 309,
7648 52, 56, 309, 155, 479, 292, 343, 344, 318, 454,
7649 454, 454, 460, 454, 444, 309, 309, 155, 309, 309,
7650 454, 309
7651};
7652
7653/* YYR1[RULE-NUM] -- Symbol kind of the left-hand side of rule RULE-NUM. */
7654static const yytype_int16 yyr1[] =
7655{
7656 0, 162, 165, 163, 163, 164, 166, 167, 167, 167,
7657 168, 168, 169, 170, 171, 172, 173, 174, 175, 174,
7658 176, 176, 176, 177, 178, 177, 179, 180, 181, 182,
7659 182, 182, 182, 182, 182, 182, 182, 182, 182, 182,
7660 182, 182, 183, 182, 182, 182, 182, 182, 184, 185,
7661 186, 186, 186, 186, 186, 186, 186, 186, 185, 187,
7662 187, 185, 188, 188, 189, 189, 188, 190, 190, 190,
7663 191, 191, 191, 191, 191, 192, 191, 193, 191, 191,
7664 194, 195, 196, 197, 198, 199, 199, 200, 201, 202,
7665 203, 203, 204, 205, 206, 206, 207, 208, 208, 208,
7666 209, 209, 209, 209, 209, 209, 209, 209, 209, 209,
7667 209, 209, 210, 210, 211, 211, 212, 212, 212, 213,
7668 213, 212, 212, 212, 212, 212, 212, 212, 214, 214,
7669 215, 215, 216, 216, 216, 216, 216, 216, 216, 216,
7670 216, 217, 217, 217, 217, 217, 217, 217, 217, 217,
7671 218, 218, 219, 219, 219, 220, 220, 220, 220, 220,
7672 221, 221, 222, 223, 222, 224, 224, 224, 224, 224,
7673 224, 224, 224, 224, 224, 224, 224, 224, 224, 224,
7674 224, 224, 224, 224, 224, 224, 224, 224, 224, 224,
7675 224, 224, 224, 224, 224, 225, 225, 225, 225, 225,
7676 225, 225, 225, 225, 225, 225, 225, 225, 225, 225,
7677 225, 225, 225, 225, 225, 225, 225, 225, 225, 225,
7678 225, 225, 225, 225, 225, 225, 225, 225, 225, 225,
7679 225, 225, 225, 225, 225, 225, 226, 227, 228, 228,
7680 228, 228, 228, 228, 228, 228, 227, 229, 229, 229,
7681 229, 229, 229, 227, 227, 227, 227, 227, 227, 227,
7682 227, 227, 227, 227, 227, 227, 227, 227, 227, 227,
7683 227, 227, 227, 227, 227, 227, 227, 227, 227, 227,
7684 230, 230, 227, 227, 227, 231, 232, 232, 232, 233,
7685 233, 233, 233, 234, 234, 235, 236, 237, 238, 239,
7686 240, 240, 240, 240, 241, 241, 242, 242, 242, 243,
7687 243, 244, 244, 244, 244, 244, 245, 246, 246, 246,
7688 246, 246, 246, 247, 248, 249, 249, 250, 250, 251,
7689 251, 251, 251, 252, 252, 253, 253, 254, 254, 254,
7690 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
7691 255, 256, 255, 257, 255, 255, 255, 255, 255, 255,
7692 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
7693 255, 255, 255, 255, 255, 258, 255, 259, 255, 255,
7694 260, 261, 255, 262, 255, 263, 255, 264, 255, 265,
7695 255, 266, 255, 255, 255, 255, 255, 267, 268, 269,
7696 270, 271, 272, 273, 274, 275, 276, 277, 278, 279,
7697 280, 281, 282, 283, 284, 285, 286, 286, 287, 288,
7698 289, 289, 289, 290, 290, 291, 291, 292, 292, 293,
7699 293, 294, 294, 295, 295, 296, 296, 296, 296, 296,
7700 297, 297, 298, 298, 299, 300, 301, 301, 302, 302,
7701 303, 303, 304, 304, 304, 304, 305, 306, 307, 308,
7702 308, 309, 309, 310, 310, 310, 310, 310, 310, 310,
7703 310, 310, 310, 310, 310, 311, 311, 311, 312, 311,
7704 313, 313, 314, 315, 315, 316, 316, 317, 317, 318,
7705 318, 319, 320, 321, 322, 323, 324, 325, 325, 326,
7706 327, 326, 328, 329, 329, 329, 329, 329, 330, 330,
7707 330, 330, 330, 330, 330, 330, 331, 331, 332, 333,
7708 334, 335, 336, 336, 336, 336, 337, 338, 338, 339,
7709 340, 341, 342, 343, 344, 344, 345, 345, 345, 346,
7710 346, 346, 346, 346, 346, 347, 348, 348, 349, 350,
7711 350, 351, 352, 353, 353, 353, 353, 353, 353, 353,
7712 353, 353, 353, 353, 353, 353, 354, 353, 353, 353,
7713 355, 355, 355, 355, 355, 355, 356, 356, 357, 357,
7714 358, 359, 359, 360, 360, 361, 362, 362, 362, 362,
7715 363, 363, 364, 364, 365, 365, 366, 366, 367, 368,
7716 368, 369, 370, 370, 370, 370, 370, 370, 369, 369,
7717 369, 369, 371, 371, 371, 371, 371, 371, 371, 371,
7718 371, 371, 372, 373, 373, 374, 375, 375, 375, 376,
7719 376, 377, 377, 377, 378, 378, 379, 379, 380, 380,
7720 381, 382, 382, 382, 383, 384, 385, 386, 386, 387,
7721 388, 389, 389, 390, 390, 391, 392, 393, 393, 394,
7722 395, 396, 397, 398, 398, 399, 399, 400, 400, 401,
7723 401, 402, 402, 403, 404, 403, 405, 406, 407, 408,
7724 403, 409, 409, 410, 410, 411, 411, 412, 413, 413,
7725 414, 415, 415, 416, 416, 416, 416, 417, 417, 417,
7726 418, 418, 418, 419, 419, 419, 419, 419, 419, 419,
7727 420, 420, 421, 421, 422, 422, 423, 424, 424, 425,
7728 425, 426, 427, 428, 429, 428, 430, 430, 431, 431,
7729 432, 432, 433, 433, 433, 433, 434, 434, 435, 435,
7730 435, 435, 436, 436, 437, 438, 438, 439, 439, 440,
7731 440, 440, 440, 440, 440, 440, 440, 440, 440, 440,
7732 440, 441, 441, 442, 441, 441, 443, 444, 444, 445,
7733 445, 445, 445, 445, 445, 445, 445, 445, 445, 445,
7734 445, 446, 446, 447, 446, 446, 448, 449, 450, 450,
7735 450, 450, 451, 451, 452, 453, 453, 454, 454, 455,
7736 456, 456, 457, 458, 458, 459, 459, 460, 460, 461,
7737 461, 462, 462, 462, 463, 463, 464, 465, 466, 467,
7738 468, 467, 469, 469, 470, 470, 471, 471, 471, 471,
7739 471, 471, 472, 472, 472, 472, 473, 473, 473, 474,
7740 474, 475, 475, 476, 476, 477, 478, 479, 480, 480,
7741 481, 481, 482, 482, 483
7742};
7743
7744/* YYR2[RULE-NUM] -- Number of symbols on the right-hand side of rule RULE-NUM. */
7745static const yytype_int8 yyr2[] =
7746{
7747 0, 2, 0, 0, 1, 2, 2, 1, 1, 3,
7748 1, 2, 1, 3, 2, 0, 0, 8, 0, 5,
7749 1, 1, 3, 1, 0, 3, 0, 2, 0, 4,
7750 3, 3, 3, 2, 3, 3, 3, 3, 4, 4,
7751 1, 4, 4, 1, 7, 4, 1, 1, 4, 1,
7752 4, 7, 6, 6, 6, 6, 5, 4, 1, 4,
7753 4, 1, 1, 4, 0, 1, 3, 1, 4, 1,
7754 1, 3, 3, 3, 2, 0, 7, 0, 7, 1,
7755 1, 2, 0, 5, 1, 1, 1, 0, 0, 4,
7756 1, 1, 1, 1, 1, 4, 3, 1, 1, 1,
7757 2, 3, 4, 5, 4, 5, 6, 2, 2, 2,
7758 2, 2, 1, 3, 1, 3, 1, 2, 3, 1,
7759 3, 5, 2, 4, 2, 4, 1, 3, 1, 3,
7760 2, 3, 1, 1, 4, 3, 3, 3, 3, 2,
7761 1, 1, 1, 4, 3, 3, 3, 3, 2, 1,
7762 1, 1, 2, 1, 3, 1, 1, 1, 1, 1,
7763 1, 1, 1, 0, 4, 1, 1, 1, 1, 1,
7764 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
7765 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
7766 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
7767 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
7768 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
7769 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
7770 1, 1, 1, 1, 1, 1, 4, 1, 4, 7,
7771 6, 6, 6, 6, 5, 4, 1, 3, 3, 2,
7772 2, 2, 2, 1, 3, 3, 3, 3, 3, 3,
7773 4, 2, 2, 3, 3, 3, 3, 1, 3, 3,
7774 3, 3, 3, 2, 2, 3, 3, 3, 3, 4,
7775 4, 4, 1, 1, 1, 6, 1, 4, 3, 1,
7776 1, 1, 1, 3, 3, 1, 1, 1, 1, 1,
7777 1, 2, 4, 2, 1, 4, 3, 5, 3, 1,
7778 1, 1, 1, 2, 4, 2, 1, 1, 1, 2,
7779 2, 4, 1, 0, 2, 2, 1, 2, 1, 1,
7780 1, 3, 3, 2, 1, 1, 1, 3, 4, 2,
7781 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
7782 1, 0, 4, 0, 4, 3, 3, 2, 3, 3,
7783 1, 4, 3, 1, 6, 4, 3, 2, 1, 2,
7784 1, 6, 6, 4, 4, 0, 6, 0, 5, 5,
7785 0, 0, 9, 0, 6, 0, 7, 0, 5, 0,
7786 5, 0, 5, 1, 1, 1, 1, 1, 1, 1,
7787 1, 1, 2, 2, 1, 2, 1, 1, 1, 1,
7788 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
7789 1, 1, 2, 1, 1, 1, 5, 1, 2, 1,
7790 1, 1, 3, 1, 3, 1, 3, 5, 1, 3,
7791 2, 1, 1, 1, 0, 2, 2, 1, 1, 3,
7792 2, 1, 4, 2, 2, 1, 1, 1, 3, 1,
7793 3, 2, 1, 6, 8, 4, 6, 4, 6, 4,
7794 6, 2, 4, 2, 4, 1, 2, 2, 1, 1,
7795 1, 1, 4, 0, 1, 1, 4, 1, 3, 1,
7796 1, 0, 0, 0, 0, 0, 9, 4, 1, 3,
7797 0, 4, 3, 2, 4, 5, 5, 3, 2, 4,
7798 4, 3, 3, 2, 1, 4, 3, 3, 0, 7,
7799 0, 7, 1, 2, 3, 4, 5, 1, 1, 0,
7800 0, 0, 0, 9, 1, 1, 1, 3, 3, 1,
7801 2, 3, 1, 1, 1, 1, 3, 1, 0, 4,
7802 1, 2, 2, 1, 1, 4, 4, 4, 3, 4,
7803 4, 4, 3, 3, 3, 2, 0, 6, 2, 4,
7804 1, 1, 2, 2, 4, 1, 2, 3, 1, 3,
7805 5, 2, 1, 1, 3, 1, 3, 1, 2, 1,
7806 1, 3, 2, 1, 1, 3, 2, 1, 2, 1,
7807 1, 1, 3, 3, 2, 2, 2, 2, 1, 1,
7808 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
7809 1, 1, 1, 2, 2, 4, 2, 3, 1, 6,
7810 1, 1, 1, 1, 2, 1, 3, 1, 1, 1,
7811 1, 1, 1, 2, 3, 3, 3, 1, 2, 4,
7812 1, 0, 3, 1, 2, 4, 1, 0, 3, 4,
7813 1, 4, 1, 0, 3, 0, 3, 0, 2, 0,
7814 2, 0, 2, 1, 0, 3, 0, 0, 0, 0,
7815 7, 1, 1, 1, 1, 1, 1, 2, 1, 1,
7816 3, 1, 2, 1, 1, 1, 1, 1, 1, 1,
7817 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
7818 1, 1, 1, 1, 1, 1, 0, 4, 1, 1,
7819 1, 0, 3, 1, 0, 3, 2, 1, 1, 3,
7820 2, 1, 4, 2, 2, 1, 1, 1, 4, 2,
7821 2, 1, 1, 1, 3, 1, 3, 2, 1, 6,
7822 8, 4, 6, 4, 6, 4, 6, 2, 4, 2,
7823 4, 1, 2, 1, 1, 1, 1, 2, 1, 6,
7824 8, 4, 6, 4, 6, 4, 6, 2, 4, 2,
7825 4, 1, 2, 1, 1, 1, 1, 1, 1, 1,
7826 1, 1, 1, 1, 1, 1, 3, 1, 3, 1,
7827 1, 1, 1, 2, 1, 1, 1, 2, 1, 1,
7828 1, 2, 2, 1, 0, 1, 1, 1, 1, 1,
7829 0, 4, 1, 2, 1, 3, 3, 2, 1, 4,
7830 2, 1, 1, 1, 1, 1, 1, 1, 1, 1,
7831 1, 1, 1, 1, 1, 2, 2, 2, 1, 1,
7832 1, 1, 1, 2, 0
7833};
7834
7835
7836enum { YYENOMEM = -2 };
7837
7838#define yyerrok (yyerrstatus = 0)
7839#define yyclearin (yychar = YYEMPTY)
7840
7841#define YYACCEPT goto yyacceptlab
7842#define YYABORT goto yyabortlab
7843#define YYERROR goto yyerrorlab
7844#define YYNOMEM goto yyexhaustedlab
7845
7846
7847#define YYRECOVERING() (!!yyerrstatus)
7848
7849#define YYBACKUP(Token, Value) \
7850 do \
7851 if (yychar == YYEMPTY) \
7852 { \
7853 yychar = (Token); \
7854 yylval = (Value); \
7855 YYPOPSTACK (yylen); \
7856 yystate = *yyssp; \
7857 goto yybackup; \
7858 } \
7859 else \
7860 { \
7861 yyerror (&yylloc, p, YY_("syntax error: cannot back up")); \
7862 YYERROR; \
7863 } \
7864 while (0)
7865
7866/* Backward compatibility with an undocumented macro.
7867 Use YYerror or YYUNDEF. */
7868#define YYERRCODE YYUNDEF
7869
7870/* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
7871 If N is 0, then set CURRENT to the empty location which ends
7872 the previous symbol: RHS[0] (always defined). */
7873
7874#ifndef YYLLOC_DEFAULT
7875# define YYLLOC_DEFAULT(Current, Rhs, N) \
7876 do \
7877 if (N) \
7878 { \
7879 (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \
7880 (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \
7881 (Current).last_line = YYRHSLOC (Rhs, N).last_line; \
7882 (Current).last_column = YYRHSLOC (Rhs, N).last_column; \
7883 } \
7884 else \
7885 { \
7886 (Current).first_line = (Current).last_line = \
7887 YYRHSLOC (Rhs, 0).last_line; \
7888 (Current).first_column = (Current).last_column = \
7889 YYRHSLOC (Rhs, 0).last_column; \
7890 } \
7891 while (0)
7892#endif
7893
7894#define YYRHSLOC(Rhs, K) ((Rhs)[K])
7895
7896
7897/* Enable debugging if requested. */
7898#if YYDEBUG
7899
7900# ifndef YYFPRINTF
7901# include <stdio.h> /* INFRINGES ON USER NAME SPACE */
7902# define YYFPRINTF fprintf
7903# endif
7904
7905# define YYDPRINTF(Args) \
7906do { \
7907 if (yydebug) \
7908 YYFPRINTF Args; \
7909} while (0)
7910
7911
7912/* YYLOCATION_PRINT -- Print the location on the stream.
7913 This macro was not mandated originally: define only if we know
7914 we won't break user code: when these are the locations we know. */
7915
7916# ifndef YYLOCATION_PRINT
7917
7918# if defined YY_LOCATION_PRINT
7919
7920 /* Temporary convenience wrapper in case some people defined the
7921 undocumented and private YY_LOCATION_PRINT macros. */
7922# define YYLOCATION_PRINT(File, Loc, p) YY_LOCATION_PRINT(File, *(Loc), p)
7923
7924# elif defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL
7925
7926/* Print *YYLOCP on YYO. Private, do not rely on its existence. */
7927
7928YY_ATTRIBUTE_UNUSED
7929static int
7930yy_location_print_ (FILE *yyo, YYLTYPE const * const yylocp)
7931{
7932 int res = 0;
7933 int end_col = 0 != yylocp->last_column ? yylocp->last_column - 1 : 0;
7934 if (0 <= yylocp->first_line)
7935 {
7936 res += YYFPRINTF (yyo, "%d", yylocp->first_line);
7937 if (0 <= yylocp->first_column)
7938 res += YYFPRINTF (yyo, ".%d", yylocp->first_column);
7939 }
7940 if (0 <= yylocp->last_line)
7941 {
7942 if (yylocp->first_line < yylocp->last_line)
7943 {
7944 res += YYFPRINTF (yyo, "-%d", yylocp->last_line);
7945 if (0 <= end_col)
7946 res += YYFPRINTF (yyo, ".%d", end_col);
7947 }
7948 else if (0 <= end_col && yylocp->first_column < end_col)
7949 res += YYFPRINTF (yyo, "-%d", end_col);
7950 }
7951 return res;
7952}
7953
7954# define YYLOCATION_PRINT yy_location_print_
7955
7956 /* Temporary convenience wrapper in case some people defined the
7957 undocumented and private YY_LOCATION_PRINT macros. */
7958# define YY_LOCATION_PRINT(File, Loc, p) YYLOCATION_PRINT(File, &(Loc), p)
7959
7960# else
7961
7962# define YYLOCATION_PRINT(File, Loc, p) ((void) 0)
7963 /* Temporary convenience wrapper in case some people defined the
7964 undocumented and private YY_LOCATION_PRINT macros. */
7965# define YY_LOCATION_PRINT YYLOCATION_PRINT
7966
7967# endif
7968# endif /* !defined YYLOCATION_PRINT */
7969
7970
7971# define YY_SYMBOL_PRINT(Title, Kind, Value, Location, p) \
7972do { \
7973 if (yydebug) \
7974 { \
7975 YYFPRINTF (stderr, "%s ", Title); \
7976 yy_symbol_print (stderr, \
7977 Kind, Value, Location, p); \
7978 YYFPRINTF (stderr, "\n"); \
7979 } \
7980} while (0)
7981
7982
7983/*-----------------------------------.
7984| Print this symbol's value on YYO. |
7985`-----------------------------------*/
7986
7987static void
7988yy_symbol_value_print (FILE *yyo,
7989 yysymbol_kind_t yykind, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp, struct parser_params *p)
7990{
7991 FILE *yyoutput = yyo;
7992 YY_USE (yyoutput);
7993 YY_USE (yylocationp);
7994 YY_USE (p);
7995 if (!yyvaluep)
7996 return;
7997 YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
7998switch (yykind)
7999 {
8000 case YYSYMBOL_keyword_class: /* "'class'" */
8001#line 2625 "parse.y"
8002 {
8003 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8004}
8005#line 8006 "parse.c"
8006 break;
8007
8008 case YYSYMBOL_keyword_module: /* "'module'" */
8009#line 2625 "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_def: /* "'def'" */
8017#line 2625 "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_undef: /* "'undef'" */
8025#line 2625 "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_begin: /* "'begin'" */
8033#line 2625 "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_rescue: /* "'rescue'" */
8041#line 2625 "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_ensure: /* "'ensure'" */
8049#line 2625 "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_end: /* "'end'" */
8057#line 2625 "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_if: /* "'if'" */
8065#line 2625 "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_unless: /* "'unless'" */
8073#line 2625 "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_then: /* "'then'" */
8081#line 2625 "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_elsif: /* "'elsif'" */
8089#line 2625 "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_else: /* "'else'" */
8097#line 2625 "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_case: /* "'case'" */
8105#line 2625 "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_when: /* "'when'" */
8113#line 2625 "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_while: /* "'while'" */
8121#line 2625 "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_until: /* "'until'" */
8129#line 2625 "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_for: /* "'for'" */
8137#line 2625 "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_break: /* "'break'" */
8145#line 2625 "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_next: /* "'next'" */
8153#line 2625 "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_redo: /* "'redo'" */
8161#line 2625 "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_retry: /* "'retry'" */
8169#line 2625 "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_in: /* "'in'" */
8177#line 2625 "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_do: /* "'do'" */
8185#line 2625 "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_cond: /* "'do' for condition" */
8193#line 2625 "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_block: /* "'do' for block" */
8201#line 2625 "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_LAMBDA: /* "'do' for lambda" */
8209#line 2625 "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_return: /* "'return'" */
8217#line 2625 "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_yield: /* "'yield'" */
8225#line 2625 "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_super: /* "'super'" */
8233#line 2625 "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_self: /* "'self'" */
8241#line 2625 "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_nil: /* "'nil'" */
8249#line 2625 "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_true: /* "'true'" */
8257#line 2625 "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_false: /* "'false'" */
8265#line 2625 "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_and: /* "'and'" */
8273#line 2625 "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_or: /* "'or'" */
8281#line 2625 "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_not: /* "'not'" */
8289#line 2625 "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_modifier_if: /* "'if' modifier" */
8297#line 2625 "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_unless: /* "'unless' modifier" */
8305#line 2625 "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_while: /* "'while' modifier" */
8313#line 2625 "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_until: /* "'until' modifier" */
8321#line 2625 "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_rescue: /* "'rescue' modifier" */
8329#line 2625 "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_keyword_alias: /* "'alias'" */
8337#line 2625 "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_defined: /* "'defined?'" */
8345#line 2625 "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_BEGIN: /* "'BEGIN'" */
8353#line 2625 "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_END: /* "'END'" */
8361#line 2625 "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__LINE__: /* "'__LINE__'" */
8369#line 2625 "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__FILE__: /* "'__FILE__'" */
8377#line 2625 "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__ENCODING__: /* "'__ENCODING__'" */
8385#line 2625 "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_tIDENTIFIER: /* "local variable or method" */
8393#line 2625 "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_tFID: /* "method" */
8401#line 2625 "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_tGVAR: /* "global variable" */
8409#line 2625 "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_tIVAR: /* "instance variable" */
8417#line 2625 "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_tCONSTANT: /* "constant" */
8425#line 2625 "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_tCVAR: /* "class variable" */
8433#line 2625 "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_tLABEL: /* "label" */
8441#line 2625 "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_tINTEGER: /* "integer literal" */
8449#line 2628 "parse.y"
8450 {
8451 switch (nd_type(RNODE(((*yyvaluep).node)))) {
8452 case NODE_INTEGER:
8453 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_integer_literal_val(((*yyvaluep).node)));
8454 break;
8455 case NODE_FLOAT:
8456 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_float_literal_val(((*yyvaluep).node)));
8457 break;
8458 case NODE_RATIONAL:
8459 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_rational_literal_val(((*yyvaluep).node)));
8460 break;
8461 case NODE_IMAGINARY:
8462 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_imaginary_literal_val(((*yyvaluep).node)));
8463 break;
8464 default:
8465 break;
8466 }
8467}
8468#line 8469 "parse.c"
8469 break;
8470
8471 case YYSYMBOL_tFLOAT: /* "float literal" */
8472#line 2628 "parse.y"
8473 {
8474 switch (nd_type(RNODE(((*yyvaluep).node)))) {
8475 case NODE_INTEGER:
8476 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_integer_literal_val(((*yyvaluep).node)));
8477 break;
8478 case NODE_FLOAT:
8479 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_float_literal_val(((*yyvaluep).node)));
8480 break;
8481 case NODE_RATIONAL:
8482 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_rational_literal_val(((*yyvaluep).node)));
8483 break;
8484 case NODE_IMAGINARY:
8485 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_imaginary_literal_val(((*yyvaluep).node)));
8486 break;
8487 default:
8488 break;
8489 }
8490}
8491#line 8492 "parse.c"
8492 break;
8493
8494 case YYSYMBOL_tRATIONAL: /* "rational literal" */
8495#line 2628 "parse.y"
8496 {
8497 switch (nd_type(RNODE(((*yyvaluep).node)))) {
8498 case NODE_INTEGER:
8499 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_integer_literal_val(((*yyvaluep).node)));
8500 break;
8501 case NODE_FLOAT:
8502 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_float_literal_val(((*yyvaluep).node)));
8503 break;
8504 case NODE_RATIONAL:
8505 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_rational_literal_val(((*yyvaluep).node)));
8506 break;
8507 case NODE_IMAGINARY:
8508 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_imaginary_literal_val(((*yyvaluep).node)));
8509 break;
8510 default:
8511 break;
8512 }
8513}
8514#line 8515 "parse.c"
8515 break;
8516
8517 case YYSYMBOL_tIMAGINARY: /* "imaginary literal" */
8518#line 2628 "parse.y"
8519 {
8520 switch (nd_type(RNODE(((*yyvaluep).node)))) {
8521 case NODE_INTEGER:
8522 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_integer_literal_val(((*yyvaluep).node)));
8523 break;
8524 case NODE_FLOAT:
8525 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_float_literal_val(((*yyvaluep).node)));
8526 break;
8527 case NODE_RATIONAL:
8528 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_rational_literal_val(((*yyvaluep).node)));
8529 break;
8530 case NODE_IMAGINARY:
8531 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_imaginary_literal_val(((*yyvaluep).node)));
8532 break;
8533 default:
8534 break;
8535 }
8536}
8537#line 8538 "parse.c"
8538 break;
8539
8540 case YYSYMBOL_tCHAR: /* "char literal" */
8541#line 2628 "parse.y"
8542 {
8543 switch (nd_type(RNODE(((*yyvaluep).node)))) {
8544 case NODE_INTEGER:
8545 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_integer_literal_val(((*yyvaluep).node)));
8546 break;
8547 case NODE_FLOAT:
8548 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_float_literal_val(((*yyvaluep).node)));
8549 break;
8550 case NODE_RATIONAL:
8551 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_rational_literal_val(((*yyvaluep).node)));
8552 break;
8553 case NODE_IMAGINARY:
8554 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_imaginary_literal_val(((*yyvaluep).node)));
8555 break;
8556 default:
8557 break;
8558 }
8559}
8560#line 8561 "parse.c"
8561 break;
8562
8563 case YYSYMBOL_tNTH_REF: /* "numbered reference" */
8564#line 2646 "parse.y"
8565 {
8566 rb_parser_printf(p, "$%ld", RNODE_NTH_REF(((*yyvaluep).node))->nd_nth);
8567}
8568#line 8569 "parse.c"
8569 break;
8570
8571 case YYSYMBOL_tBACK_REF: /* "back reference" */
8572#line 2649 "parse.y"
8573 {
8574 rb_parser_printf(p, "$%c", (int)RNODE_BACK_REF(((*yyvaluep).node))->nd_nth);
8575}
8576#line 8577 "parse.c"
8577 break;
8578
8579 case YYSYMBOL_tSTRING_CONTENT: /* "literal content" */
8580#line 2628 "parse.y"
8581 {
8582 switch (nd_type(RNODE(((*yyvaluep).node)))) {
8583 case NODE_INTEGER:
8584 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_integer_literal_val(((*yyvaluep).node)));
8585 break;
8586 case NODE_FLOAT:
8587 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_float_literal_val(((*yyvaluep).node)));
8588 break;
8589 case NODE_RATIONAL:
8590 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_rational_literal_val(((*yyvaluep).node)));
8591 break;
8592 case NODE_IMAGINARY:
8593 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_imaginary_literal_val(((*yyvaluep).node)));
8594 break;
8595 default:
8596 break;
8597 }
8598}
8599#line 8600 "parse.c"
8600 break;
8601
8602 case YYSYMBOL_69_: /* '.' */
8603#line 2625 "parse.y"
8604 {
8605 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8606}
8607#line 8608 "parse.c"
8608 break;
8609
8610 case YYSYMBOL_70_backslash_: /* "backslash" */
8611#line 2625 "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_72_escaped_horizontal_tab_: /* "escaped horizontal tab" */
8619#line 2625 "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_73_escaped_form_feed_: /* "escaped form feed" */
8627#line 2625 "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_74_escaped_carriage_return_: /* "escaped carriage return" */
8635#line 2625 "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_75_escaped_vertical_tab_: /* "escaped vertical tab" */
8643#line 2625 "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_tANDDOT: /* "&." */
8651#line 2625 "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_tCOLON2: /* "::" */
8659#line 2625 "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_tOP_ASGN: /* "operator-assignment" */
8667#line 2625 "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_compstmt_top_stmts: /* compstmt_top_stmts */
8675#line 2616 "parse.y"
8676 {
8677 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8678 rb_parser_printf(p, "NODE_SPECIAL");
8679 }
8680 else if (((*yyvaluep).node)) {
8681 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8682 }
8683}
8684#line 8685 "parse.c"
8685 break;
8686
8687 case YYSYMBOL_top_stmts: /* top_stmts */
8688#line 2616 "parse.y"
8689 {
8690 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8691 rb_parser_printf(p, "NODE_SPECIAL");
8692 }
8693 else if (((*yyvaluep).node)) {
8694 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8695 }
8696}
8697#line 8698 "parse.c"
8698 break;
8699
8700 case YYSYMBOL_top_stmt: /* top_stmt */
8701#line 2616 "parse.y"
8702 {
8703 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8704 rb_parser_printf(p, "NODE_SPECIAL");
8705 }
8706 else if (((*yyvaluep).node)) {
8707 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8708 }
8709}
8710#line 8711 "parse.c"
8711 break;
8712
8713 case YYSYMBOL_block_open: /* block_open */
8714#line 2616 "parse.y"
8715 {
8716 if ((NODE *)((*yyvaluep).node_exits) == (NODE *)-1) {
8717 rb_parser_printf(p, "NODE_SPECIAL");
8718 }
8719 else if (((*yyvaluep).node_exits)) {
8720 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_exits)))));
8721 }
8722}
8723#line 8724 "parse.c"
8724 break;
8725
8726 case YYSYMBOL_begin_block: /* begin_block */
8727#line 2616 "parse.y"
8728 {
8729 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8730 rb_parser_printf(p, "NODE_SPECIAL");
8731 }
8732 else if (((*yyvaluep).node)) {
8733 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8734 }
8735}
8736#line 8737 "parse.c"
8737 break;
8738
8739 case YYSYMBOL_compstmt_stmts: /* compstmt_stmts */
8740#line 2616 "parse.y"
8741 {
8742 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8743 rb_parser_printf(p, "NODE_SPECIAL");
8744 }
8745 else if (((*yyvaluep).node)) {
8746 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8747 }
8748}
8749#line 8750 "parse.c"
8750 break;
8751
8752 case YYSYMBOL_bodystmt: /* bodystmt */
8753#line 2616 "parse.y"
8754 {
8755 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8756 rb_parser_printf(p, "NODE_SPECIAL");
8757 }
8758 else if (((*yyvaluep).node)) {
8759 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8760 }
8761}
8762#line 8763 "parse.c"
8763 break;
8764
8765 case YYSYMBOL_stmts: /* stmts */
8766#line 2616 "parse.y"
8767 {
8768 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8769 rb_parser_printf(p, "NODE_SPECIAL");
8770 }
8771 else if (((*yyvaluep).node)) {
8772 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8773 }
8774}
8775#line 8776 "parse.c"
8776 break;
8777
8778 case YYSYMBOL_stmt_or_begin: /* stmt_or_begin */
8779#line 2616 "parse.y"
8780 {
8781 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8782 rb_parser_printf(p, "NODE_SPECIAL");
8783 }
8784 else if (((*yyvaluep).node)) {
8785 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8786 }
8787}
8788#line 8789 "parse.c"
8789 break;
8790
8791 case YYSYMBOL_allow_exits: /* allow_exits */
8792#line 2616 "parse.y"
8793 {
8794 if ((NODE *)((*yyvaluep).node_exits) == (NODE *)-1) {
8795 rb_parser_printf(p, "NODE_SPECIAL");
8796 }
8797 else if (((*yyvaluep).node_exits)) {
8798 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_exits)))));
8799 }
8800}
8801#line 8802 "parse.c"
8802 break;
8803
8804 case YYSYMBOL_stmt: /* stmt */
8805#line 2616 "parse.y"
8806 {
8807 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8808 rb_parser_printf(p, "NODE_SPECIAL");
8809 }
8810 else if (((*yyvaluep).node)) {
8811 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8812 }
8813}
8814#line 8815 "parse.c"
8815 break;
8816
8817 case YYSYMBOL_asgn_mrhs: /* asgn_mrhs */
8818#line 2616 "parse.y"
8819 {
8820 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8821 rb_parser_printf(p, "NODE_SPECIAL");
8822 }
8823 else if (((*yyvaluep).node)) {
8824 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8825 }
8826}
8827#line 8828 "parse.c"
8828 break;
8829
8830 case YYSYMBOL_asgn_command_rhs: /* asgn_command_rhs */
8831#line 2616 "parse.y"
8832 {
8833 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8834 rb_parser_printf(p, "NODE_SPECIAL");
8835 }
8836 else if (((*yyvaluep).node)) {
8837 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8838 }
8839}
8840#line 8841 "parse.c"
8841 break;
8842
8843 case YYSYMBOL_command_asgn: /* command_asgn */
8844#line 2616 "parse.y"
8845 {
8846 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8847 rb_parser_printf(p, "NODE_SPECIAL");
8848 }
8849 else if (((*yyvaluep).node)) {
8850 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8851 }
8852}
8853#line 8854 "parse.c"
8854 break;
8855
8856 case YYSYMBOL_op_asgn_command_rhs: /* op_asgn_command_rhs */
8857#line 2616 "parse.y"
8858 {
8859 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8860 rb_parser_printf(p, "NODE_SPECIAL");
8861 }
8862 else if (((*yyvaluep).node)) {
8863 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8864 }
8865}
8866#line 8867 "parse.c"
8867 break;
8868
8869 case YYSYMBOL_def_endless_method_endless_command: /* def_endless_method_endless_command */
8870#line 2616 "parse.y"
8871 {
8872 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8873 rb_parser_printf(p, "NODE_SPECIAL");
8874 }
8875 else if (((*yyvaluep).node)) {
8876 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8877 }
8878}
8879#line 8880 "parse.c"
8880 break;
8881
8882 case YYSYMBOL_endless_command: /* endless_command */
8883#line 2616 "parse.y"
8884 {
8885 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8886 rb_parser_printf(p, "NODE_SPECIAL");
8887 }
8888 else if (((*yyvaluep).node)) {
8889 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8890 }
8891}
8892#line 8893 "parse.c"
8893 break;
8894
8895 case YYSYMBOL_command_rhs: /* command_rhs */
8896#line 2616 "parse.y"
8897 {
8898 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8899 rb_parser_printf(p, "NODE_SPECIAL");
8900 }
8901 else if (((*yyvaluep).node)) {
8902 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8903 }
8904}
8905#line 8906 "parse.c"
8906 break;
8907
8908 case YYSYMBOL_expr: /* expr */
8909#line 2616 "parse.y"
8910 {
8911 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8912 rb_parser_printf(p, "NODE_SPECIAL");
8913 }
8914 else if (((*yyvaluep).node)) {
8915 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8916 }
8917}
8918#line 8919 "parse.c"
8919 break;
8920
8921 case YYSYMBOL_def_name: /* def_name */
8922#line 2625 "parse.y"
8923 {
8924 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8925}
8926#line 8927 "parse.c"
8927 break;
8928
8929 case YYSYMBOL_defn_head: /* defn_head */
8930#line 2616 "parse.y"
8931 {
8932 if ((NODE *)((*yyvaluep).node_def_temp) == (NODE *)-1) {
8933 rb_parser_printf(p, "NODE_SPECIAL");
8934 }
8935 else if (((*yyvaluep).node_def_temp)) {
8936 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_def_temp)))));
8937 }
8938}
8939#line 8940 "parse.c"
8940 break;
8941
8942 case YYSYMBOL_defs_head: /* defs_head */
8943#line 2616 "parse.y"
8944 {
8945 if ((NODE *)((*yyvaluep).node_def_temp) == (NODE *)-1) {
8946 rb_parser_printf(p, "NODE_SPECIAL");
8947 }
8948 else if (((*yyvaluep).node_def_temp)) {
8949 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_def_temp)))));
8950 }
8951}
8952#line 8953 "parse.c"
8953 break;
8954
8955 case YYSYMBOL_value_expr_expr: /* value_expr_expr */
8956#line 2616 "parse.y"
8957 {
8958 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8959 rb_parser_printf(p, "NODE_SPECIAL");
8960 }
8961 else if (((*yyvaluep).node)) {
8962 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8963 }
8964}
8965#line 8966 "parse.c"
8966 break;
8967
8968 case YYSYMBOL_expr_value: /* expr_value */
8969#line 2616 "parse.y"
8970 {
8971 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8972 rb_parser_printf(p, "NODE_SPECIAL");
8973 }
8974 else if (((*yyvaluep).node)) {
8975 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8976 }
8977}
8978#line 8979 "parse.c"
8979 break;
8980
8981 case YYSYMBOL_expr_value_do: /* expr_value_do */
8982#line 2616 "parse.y"
8983 {
8984 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8985 rb_parser_printf(p, "NODE_SPECIAL");
8986 }
8987 else if (((*yyvaluep).node)) {
8988 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8989 }
8990}
8991#line 8992 "parse.c"
8992 break;
8993
8994 case YYSYMBOL_command_call: /* command_call */
8995#line 2616 "parse.y"
8996 {
8997 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8998 rb_parser_printf(p, "NODE_SPECIAL");
8999 }
9000 else if (((*yyvaluep).node)) {
9001 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9002 }
9003}
9004#line 9005 "parse.c"
9005 break;
9006
9007 case YYSYMBOL_value_expr_command_call: /* value_expr_command_call */
9008#line 2616 "parse.y"
9009 {
9010 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9011 rb_parser_printf(p, "NODE_SPECIAL");
9012 }
9013 else if (((*yyvaluep).node)) {
9014 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9015 }
9016}
9017#line 9018 "parse.c"
9018 break;
9019
9020 case YYSYMBOL_command_call_value: /* command_call_value */
9021#line 2616 "parse.y"
9022 {
9023 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9024 rb_parser_printf(p, "NODE_SPECIAL");
9025 }
9026 else if (((*yyvaluep).node)) {
9027 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9028 }
9029}
9030#line 9031 "parse.c"
9031 break;
9032
9033 case YYSYMBOL_block_command: /* block_command */
9034#line 2616 "parse.y"
9035 {
9036 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9037 rb_parser_printf(p, "NODE_SPECIAL");
9038 }
9039 else if (((*yyvaluep).node)) {
9040 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9041 }
9042}
9043#line 9044 "parse.c"
9044 break;
9045
9046 case YYSYMBOL_cmd_brace_block: /* cmd_brace_block */
9047#line 2616 "parse.y"
9048 {
9049 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9050 rb_parser_printf(p, "NODE_SPECIAL");
9051 }
9052 else if (((*yyvaluep).node)) {
9053 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9054 }
9055}
9056#line 9057 "parse.c"
9057 break;
9058
9059 case YYSYMBOL_fcall: /* fcall */
9060#line 2616 "parse.y"
9061 {
9062 if ((NODE *)((*yyvaluep).node_fcall) == (NODE *)-1) {
9063 rb_parser_printf(p, "NODE_SPECIAL");
9064 }
9065 else if (((*yyvaluep).node_fcall)) {
9066 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_fcall)))));
9067 }
9068}
9069#line 9070 "parse.c"
9070 break;
9071
9072 case YYSYMBOL_command: /* command */
9073#line 2616 "parse.y"
9074 {
9075 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9076 rb_parser_printf(p, "NODE_SPECIAL");
9077 }
9078 else if (((*yyvaluep).node)) {
9079 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9080 }
9081}
9082#line 9083 "parse.c"
9083 break;
9084
9085 case YYSYMBOL_mlhs: /* mlhs */
9086#line 2616 "parse.y"
9087 {
9088 if ((NODE *)((*yyvaluep).node_masgn) == (NODE *)-1) {
9089 rb_parser_printf(p, "NODE_SPECIAL");
9090 }
9091 else if (((*yyvaluep).node_masgn)) {
9092 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_masgn)))));
9093 }
9094}
9095#line 9096 "parse.c"
9096 break;
9097
9098 case YYSYMBOL_mlhs_inner: /* mlhs_inner */
9099#line 2616 "parse.y"
9100 {
9101 if ((NODE *)((*yyvaluep).node_masgn) == (NODE *)-1) {
9102 rb_parser_printf(p, "NODE_SPECIAL");
9103 }
9104 else if (((*yyvaluep).node_masgn)) {
9105 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_masgn)))));
9106 }
9107}
9108#line 9109 "parse.c"
9109 break;
9110
9111 case YYSYMBOL_mlhs_basic: /* mlhs_basic */
9112#line 2616 "parse.y"
9113 {
9114 if ((NODE *)((*yyvaluep).node_masgn) == (NODE *)-1) {
9115 rb_parser_printf(p, "NODE_SPECIAL");
9116 }
9117 else if (((*yyvaluep).node_masgn)) {
9118 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_masgn)))));
9119 }
9120}
9121#line 9122 "parse.c"
9122 break;
9123
9124 case YYSYMBOL_mlhs_items_mlhs_item: /* mlhs_items_mlhs_item */
9125#line 2616 "parse.y"
9126 {
9127 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9128 rb_parser_printf(p, "NODE_SPECIAL");
9129 }
9130 else if (((*yyvaluep).node)) {
9131 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9132 }
9133}
9134#line 9135 "parse.c"
9135 break;
9136
9137 case YYSYMBOL_mlhs_item: /* mlhs_item */
9138#line 2616 "parse.y"
9139 {
9140 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9141 rb_parser_printf(p, "NODE_SPECIAL");
9142 }
9143 else if (((*yyvaluep).node)) {
9144 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9145 }
9146}
9147#line 9148 "parse.c"
9148 break;
9149
9150 case YYSYMBOL_mlhs_head: /* mlhs_head */
9151#line 2616 "parse.y"
9152 {
9153 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9154 rb_parser_printf(p, "NODE_SPECIAL");
9155 }
9156 else if (((*yyvaluep).node)) {
9157 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9158 }
9159}
9160#line 9161 "parse.c"
9161 break;
9162
9163 case YYSYMBOL_mlhs_node: /* mlhs_node */
9164#line 2616 "parse.y"
9165 {
9166 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9167 rb_parser_printf(p, "NODE_SPECIAL");
9168 }
9169 else if (((*yyvaluep).node)) {
9170 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9171 }
9172}
9173#line 9174 "parse.c"
9174 break;
9175
9176 case YYSYMBOL_lhs: /* lhs */
9177#line 2616 "parse.y"
9178 {
9179 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9180 rb_parser_printf(p, "NODE_SPECIAL");
9181 }
9182 else if (((*yyvaluep).node)) {
9183 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9184 }
9185}
9186#line 9187 "parse.c"
9187 break;
9188
9189 case YYSYMBOL_cname: /* cname */
9190#line 2625 "parse.y"
9191 {
9192 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
9193}
9194#line 9195 "parse.c"
9195 break;
9196
9197 case YYSYMBOL_cpath: /* cpath */
9198#line 2616 "parse.y"
9199 {
9200 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9201 rb_parser_printf(p, "NODE_SPECIAL");
9202 }
9203 else if (((*yyvaluep).node)) {
9204 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9205 }
9206}
9207#line 9208 "parse.c"
9208 break;
9209
9210 case YYSYMBOL_fname: /* fname */
9211#line 2625 "parse.y"
9212 {
9213 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
9214}
9215#line 9216 "parse.c"
9216 break;
9217
9218 case YYSYMBOL_fitem: /* fitem */
9219#line 2616 "parse.y"
9220 {
9221 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9222 rb_parser_printf(p, "NODE_SPECIAL");
9223 }
9224 else if (((*yyvaluep).node)) {
9225 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9226 }
9227}
9228#line 9229 "parse.c"
9229 break;
9230
9231 case YYSYMBOL_undef_list: /* undef_list */
9232#line 2616 "parse.y"
9233 {
9234 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9235 rb_parser_printf(p, "NODE_SPECIAL");
9236 }
9237 else if (((*yyvaluep).node)) {
9238 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9239 }
9240}
9241#line 9242 "parse.c"
9242 break;
9243
9244 case YYSYMBOL_op: /* op */
9245#line 2625 "parse.y"
9246 {
9247 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
9248}
9249#line 9250 "parse.c"
9250 break;
9251
9252 case YYSYMBOL_reswords: /* reswords */
9253#line 2625 "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_asgn_arg_rhs: /* asgn_arg_rhs */
9261#line 2616 "parse.y"
9262 {
9263 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9264 rb_parser_printf(p, "NODE_SPECIAL");
9265 }
9266 else if (((*yyvaluep).node)) {
9267 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9268 }
9269}
9270#line 9271 "parse.c"
9271 break;
9272
9273 case YYSYMBOL_arg: /* arg */
9274#line 2616 "parse.y"
9275 {
9276 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9277 rb_parser_printf(p, "NODE_SPECIAL");
9278 }
9279 else if (((*yyvaluep).node)) {
9280 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9281 }
9282}
9283#line 9284 "parse.c"
9284 break;
9285
9286 case YYSYMBOL_op_asgn_arg_rhs: /* op_asgn_arg_rhs */
9287#line 2616 "parse.y"
9288 {
9289 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9290 rb_parser_printf(p, "NODE_SPECIAL");
9291 }
9292 else if (((*yyvaluep).node)) {
9293 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9294 }
9295}
9296#line 9297 "parse.c"
9297 break;
9298
9299 case YYSYMBOL_range_expr_arg: /* range_expr_arg */
9300#line 2616 "parse.y"
9301 {
9302 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9303 rb_parser_printf(p, "NODE_SPECIAL");
9304 }
9305 else if (((*yyvaluep).node)) {
9306 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9307 }
9308}
9309#line 9310 "parse.c"
9310 break;
9311
9312 case YYSYMBOL_def_endless_method_endless_arg: /* def_endless_method_endless_arg */
9313#line 2616 "parse.y"
9314 {
9315 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9316 rb_parser_printf(p, "NODE_SPECIAL");
9317 }
9318 else if (((*yyvaluep).node)) {
9319 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9320 }
9321}
9322#line 9323 "parse.c"
9323 break;
9324
9325 case YYSYMBOL_ternary: /* ternary */
9326#line 2616 "parse.y"
9327 {
9328 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9329 rb_parser_printf(p, "NODE_SPECIAL");
9330 }
9331 else if (((*yyvaluep).node)) {
9332 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9333 }
9334}
9335#line 9336 "parse.c"
9336 break;
9337
9338 case YYSYMBOL_endless_arg: /* endless_arg */
9339#line 2616 "parse.y"
9340 {
9341 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9342 rb_parser_printf(p, "NODE_SPECIAL");
9343 }
9344 else if (((*yyvaluep).node)) {
9345 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9346 }
9347}
9348#line 9349 "parse.c"
9349 break;
9350
9351 case YYSYMBOL_relop: /* relop */
9352#line 2625 "parse.y"
9353 {
9354 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
9355}
9356#line 9357 "parse.c"
9357 break;
9358
9359 case YYSYMBOL_rel_expr: /* rel_expr */
9360#line 2616 "parse.y"
9361 {
9362 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9363 rb_parser_printf(p, "NODE_SPECIAL");
9364 }
9365 else if (((*yyvaluep).node)) {
9366 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9367 }
9368}
9369#line 9370 "parse.c"
9370 break;
9371
9372 case YYSYMBOL_value_expr_arg: /* value_expr_arg */
9373#line 2616 "parse.y"
9374 {
9375 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9376 rb_parser_printf(p, "NODE_SPECIAL");
9377 }
9378 else if (((*yyvaluep).node)) {
9379 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9380 }
9381}
9382#line 9383 "parse.c"
9383 break;
9384
9385 case YYSYMBOL_arg_value: /* arg_value */
9386#line 2616 "parse.y"
9387 {
9388 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9389 rb_parser_printf(p, "NODE_SPECIAL");
9390 }
9391 else if (((*yyvaluep).node)) {
9392 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9393 }
9394}
9395#line 9396 "parse.c"
9396 break;
9397
9398 case YYSYMBOL_aref_args: /* aref_args */
9399#line 2616 "parse.y"
9400 {
9401 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9402 rb_parser_printf(p, "NODE_SPECIAL");
9403 }
9404 else if (((*yyvaluep).node)) {
9405 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9406 }
9407}
9408#line 9409 "parse.c"
9409 break;
9410
9411 case YYSYMBOL_arg_rhs: /* arg_rhs */
9412#line 2616 "parse.y"
9413 {
9414 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9415 rb_parser_printf(p, "NODE_SPECIAL");
9416 }
9417 else if (((*yyvaluep).node)) {
9418 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9419 }
9420}
9421#line 9422 "parse.c"
9422 break;
9423
9424 case YYSYMBOL_paren_args: /* paren_args */
9425#line 2616 "parse.y"
9426 {
9427 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9428 rb_parser_printf(p, "NODE_SPECIAL");
9429 }
9430 else if (((*yyvaluep).node)) {
9431 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9432 }
9433}
9434#line 9435 "parse.c"
9435 break;
9436
9437 case YYSYMBOL_opt_paren_args: /* opt_paren_args */
9438#line 2616 "parse.y"
9439 {
9440 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9441 rb_parser_printf(p, "NODE_SPECIAL");
9442 }
9443 else if (((*yyvaluep).node)) {
9444 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9445 }
9446}
9447#line 9448 "parse.c"
9448 break;
9449
9450 case YYSYMBOL_opt_call_args: /* opt_call_args */
9451#line 2616 "parse.y"
9452 {
9453 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9454 rb_parser_printf(p, "NODE_SPECIAL");
9455 }
9456 else if (((*yyvaluep).node)) {
9457 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9458 }
9459}
9460#line 9461 "parse.c"
9461 break;
9462
9463 case YYSYMBOL_value_expr_command: /* value_expr_command */
9464#line 2616 "parse.y"
9465 {
9466 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9467 rb_parser_printf(p, "NODE_SPECIAL");
9468 }
9469 else if (((*yyvaluep).node)) {
9470 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9471 }
9472}
9473#line 9474 "parse.c"
9474 break;
9475
9476 case YYSYMBOL_call_args: /* call_args */
9477#line 2616 "parse.y"
9478 {
9479 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9480 rb_parser_printf(p, "NODE_SPECIAL");
9481 }
9482 else if (((*yyvaluep).node)) {
9483 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9484 }
9485}
9486#line 9487 "parse.c"
9487 break;
9488
9489 case YYSYMBOL_command_args: /* command_args */
9490#line 2616 "parse.y"
9491 {
9492 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9493 rb_parser_printf(p, "NODE_SPECIAL");
9494 }
9495 else if (((*yyvaluep).node)) {
9496 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9497 }
9498}
9499#line 9500 "parse.c"
9500 break;
9501
9502 case YYSYMBOL_block_arg: /* block_arg */
9503#line 2616 "parse.y"
9504 {
9505 if ((NODE *)((*yyvaluep).node_block_pass) == (NODE *)-1) {
9506 rb_parser_printf(p, "NODE_SPECIAL");
9507 }
9508 else if (((*yyvaluep).node_block_pass)) {
9509 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_block_pass)))));
9510 }
9511}
9512#line 9513 "parse.c"
9513 break;
9514
9515 case YYSYMBOL_opt_block_arg: /* opt_block_arg */
9516#line 2616 "parse.y"
9517 {
9518 if ((NODE *)((*yyvaluep).node_block_pass) == (NODE *)-1) {
9519 rb_parser_printf(p, "NODE_SPECIAL");
9520 }
9521 else if (((*yyvaluep).node_block_pass)) {
9522 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_block_pass)))));
9523 }
9524}
9525#line 9526 "parse.c"
9526 break;
9527
9528 case YYSYMBOL_args: /* args */
9529#line 2616 "parse.y"
9530 {
9531 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9532 rb_parser_printf(p, "NODE_SPECIAL");
9533 }
9534 else if (((*yyvaluep).node)) {
9535 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9536 }
9537}
9538#line 9539 "parse.c"
9539 break;
9540
9541 case YYSYMBOL_arg_splat: /* arg_splat */
9542#line 2616 "parse.y"
9543 {
9544 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9545 rb_parser_printf(p, "NODE_SPECIAL");
9546 }
9547 else if (((*yyvaluep).node)) {
9548 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9549 }
9550}
9551#line 9552 "parse.c"
9552 break;
9553
9554 case YYSYMBOL_mrhs_arg: /* mrhs_arg */
9555#line 2616 "parse.y"
9556 {
9557 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9558 rb_parser_printf(p, "NODE_SPECIAL");
9559 }
9560 else if (((*yyvaluep).node)) {
9561 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9562 }
9563}
9564#line 9565 "parse.c"
9565 break;
9566
9567 case YYSYMBOL_mrhs: /* mrhs */
9568#line 2616 "parse.y"
9569 {
9570 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9571 rb_parser_printf(p, "NODE_SPECIAL");
9572 }
9573 else if (((*yyvaluep).node)) {
9574 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9575 }
9576}
9577#line 9578 "parse.c"
9578 break;
9579
9580 case YYSYMBOL_primary: /* primary */
9581#line 2616 "parse.y"
9582 {
9583 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9584 rb_parser_printf(p, "NODE_SPECIAL");
9585 }
9586 else if (((*yyvaluep).node)) {
9587 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9588 }
9589}
9590#line 9591 "parse.c"
9591 break;
9592
9593 case YYSYMBOL_value_expr_primary: /* value_expr_primary */
9594#line 2616 "parse.y"
9595 {
9596 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9597 rb_parser_printf(p, "NODE_SPECIAL");
9598 }
9599 else if (((*yyvaluep).node)) {
9600 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9601 }
9602}
9603#line 9604 "parse.c"
9604 break;
9605
9606 case YYSYMBOL_primary_value: /* primary_value */
9607#line 2616 "parse.y"
9608 {
9609 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9610 rb_parser_printf(p, "NODE_SPECIAL");
9611 }
9612 else if (((*yyvaluep).node)) {
9613 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9614 }
9615}
9616#line 9617 "parse.c"
9617 break;
9618
9619 case YYSYMBOL_k_while: /* k_while */
9620#line 2616 "parse.y"
9621 {
9622 if ((NODE *)((*yyvaluep).node_exits) == (NODE *)-1) {
9623 rb_parser_printf(p, "NODE_SPECIAL");
9624 }
9625 else if (((*yyvaluep).node_exits)) {
9626 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_exits)))));
9627 }
9628}
9629#line 9630 "parse.c"
9630 break;
9631
9632 case YYSYMBOL_k_until: /* k_until */
9633#line 2616 "parse.y"
9634 {
9635 if ((NODE *)((*yyvaluep).node_exits) == (NODE *)-1) {
9636 rb_parser_printf(p, "NODE_SPECIAL");
9637 }
9638 else if (((*yyvaluep).node_exits)) {
9639 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_exits)))));
9640 }
9641}
9642#line 9643 "parse.c"
9643 break;
9644
9645 case YYSYMBOL_k_for: /* k_for */
9646#line 2616 "parse.y"
9647 {
9648 if ((NODE *)((*yyvaluep).node_exits) == (NODE *)-1) {
9649 rb_parser_printf(p, "NODE_SPECIAL");
9650 }
9651 else if (((*yyvaluep).node_exits)) {
9652 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_exits)))));
9653 }
9654}
9655#line 9656 "parse.c"
9656 break;
9657
9658 case YYSYMBOL_k_def: /* k_def */
9659#line 2616 "parse.y"
9660 {
9661 if ((NODE *)((*yyvaluep).node_def_temp) == (NODE *)-1) {
9662 rb_parser_printf(p, "NODE_SPECIAL");
9663 }
9664 else if (((*yyvaluep).node_def_temp)) {
9665 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_def_temp)))));
9666 }
9667}
9668#line 9669 "parse.c"
9669 break;
9670
9671 case YYSYMBOL_do: /* do */
9672#line 2625 "parse.y"
9673 {
9674 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
9675}
9676#line 9677 "parse.c"
9677 break;
9678
9679 case YYSYMBOL_if_tail: /* if_tail */
9680#line 2616 "parse.y"
9681 {
9682 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9683 rb_parser_printf(p, "NODE_SPECIAL");
9684 }
9685 else if (((*yyvaluep).node)) {
9686 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9687 }
9688}
9689#line 9690 "parse.c"
9690 break;
9691
9692 case YYSYMBOL_opt_else: /* opt_else */
9693#line 2616 "parse.y"
9694 {
9695 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9696 rb_parser_printf(p, "NODE_SPECIAL");
9697 }
9698 else if (((*yyvaluep).node)) {
9699 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9700 }
9701}
9702#line 9703 "parse.c"
9703 break;
9704
9705 case YYSYMBOL_for_var: /* for_var */
9706#line 2616 "parse.y"
9707 {
9708 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9709 rb_parser_printf(p, "NODE_SPECIAL");
9710 }
9711 else if (((*yyvaluep).node)) {
9712 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9713 }
9714}
9715#line 9716 "parse.c"
9716 break;
9717
9718 case YYSYMBOL_f_marg: /* f_marg */
9719#line 2616 "parse.y"
9720 {
9721 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9722 rb_parser_printf(p, "NODE_SPECIAL");
9723 }
9724 else if (((*yyvaluep).node)) {
9725 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9726 }
9727}
9728#line 9729 "parse.c"
9729 break;
9730
9731 case YYSYMBOL_mlhs_items_f_marg: /* mlhs_items_f_marg */
9732#line 2616 "parse.y"
9733 {
9734 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9735 rb_parser_printf(p, "NODE_SPECIAL");
9736 }
9737 else if (((*yyvaluep).node)) {
9738 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9739 }
9740}
9741#line 9742 "parse.c"
9742 break;
9743
9744 case YYSYMBOL_f_margs: /* f_margs */
9745#line 2616 "parse.y"
9746 {
9747 if ((NODE *)((*yyvaluep).node_masgn) == (NODE *)-1) {
9748 rb_parser_printf(p, "NODE_SPECIAL");
9749 }
9750 else if (((*yyvaluep).node_masgn)) {
9751 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_masgn)))));
9752 }
9753}
9754#line 9755 "parse.c"
9755 break;
9756
9757 case YYSYMBOL_f_rest_marg: /* f_rest_marg */
9758#line 2616 "parse.y"
9759 {
9760 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9761 rb_parser_printf(p, "NODE_SPECIAL");
9762 }
9763 else if (((*yyvaluep).node)) {
9764 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9765 }
9766}
9767#line 9768 "parse.c"
9768 break;
9769
9770 case YYSYMBOL_f_any_kwrest: /* f_any_kwrest */
9771#line 2625 "parse.y"
9772 {
9773 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
9774}
9775#line 9776 "parse.c"
9776 break;
9777
9778 case YYSYMBOL_f_kw_primary_value: /* f_kw_primary_value */
9779#line 2616 "parse.y"
9780 {
9781 if ((NODE *)((*yyvaluep).node_kw_arg) == (NODE *)-1) {
9782 rb_parser_printf(p, "NODE_SPECIAL");
9783 }
9784 else if (((*yyvaluep).node_kw_arg)) {
9785 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_kw_arg)))));
9786 }
9787}
9788#line 9789 "parse.c"
9789 break;
9790
9791 case YYSYMBOL_f_kwarg_primary_value: /* f_kwarg_primary_value */
9792#line 2616 "parse.y"
9793 {
9794 if ((NODE *)((*yyvaluep).node_kw_arg) == (NODE *)-1) {
9795 rb_parser_printf(p, "NODE_SPECIAL");
9796 }
9797 else if (((*yyvaluep).node_kw_arg)) {
9798 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_kw_arg)))));
9799 }
9800}
9801#line 9802 "parse.c"
9802 break;
9803
9804 case YYSYMBOL_opt_f_block_arg_none: /* opt_f_block_arg_none */
9805#line 2625 "parse.y"
9806 {
9807 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
9808}
9809#line 9810 "parse.c"
9810 break;
9811
9812 case YYSYMBOL_args_tail_basic_primary_value_none: /* args_tail_basic_primary_value_none */
9813#line 2616 "parse.y"
9814 {
9815 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
9816 rb_parser_printf(p, "NODE_SPECIAL");
9817 }
9818 else if (((*yyvaluep).node_args)) {
9819 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
9820 }
9821}
9822#line 9823 "parse.c"
9823 break;
9824
9825 case YYSYMBOL_block_args_tail: /* block_args_tail */
9826#line 2616 "parse.y"
9827 {
9828 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
9829 rb_parser_printf(p, "NODE_SPECIAL");
9830 }
9831 else if (((*yyvaluep).node_args)) {
9832 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
9833 }
9834}
9835#line 9836 "parse.c"
9836 break;
9837
9838 case YYSYMBOL_excessed_comma: /* excessed_comma */
9839#line 2625 "parse.y"
9840 {
9841 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
9842}
9843#line 9844 "parse.c"
9844 break;
9845
9846 case YYSYMBOL_f_opt_primary_value: /* f_opt_primary_value */
9847#line 2616 "parse.y"
9848 {
9849 if ((NODE *)((*yyvaluep).node_opt_arg) == (NODE *)-1) {
9850 rb_parser_printf(p, "NODE_SPECIAL");
9851 }
9852 else if (((*yyvaluep).node_opt_arg)) {
9853 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_opt_arg)))));
9854 }
9855}
9856#line 9857 "parse.c"
9857 break;
9858
9859 case YYSYMBOL_f_opt_arg_primary_value: /* f_opt_arg_primary_value */
9860#line 2616 "parse.y"
9861 {
9862 if ((NODE *)((*yyvaluep).node_opt_arg) == (NODE *)-1) {
9863 rb_parser_printf(p, "NODE_SPECIAL");
9864 }
9865 else if (((*yyvaluep).node_opt_arg)) {
9866 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_opt_arg)))));
9867 }
9868}
9869#line 9870 "parse.c"
9870 break;
9871
9872 case YYSYMBOL_opt_args_tail_block_args_tail_none: /* opt_args_tail_block_args_tail_none */
9873#line 2616 "parse.y"
9874 {
9875 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
9876 rb_parser_printf(p, "NODE_SPECIAL");
9877 }
9878 else if (((*yyvaluep).node_args)) {
9879 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
9880 }
9881}
9882#line 9883 "parse.c"
9883 break;
9884
9885 case YYSYMBOL_args_list_primary_value_opt_args_tail_block_args_tail_none: /* args-list_primary_value_opt_args_tail_block_args_tail_none */
9886#line 2616 "parse.y"
9887 {
9888 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
9889 rb_parser_printf(p, "NODE_SPECIAL");
9890 }
9891 else if (((*yyvaluep).node_args)) {
9892 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
9893 }
9894}
9895#line 9896 "parse.c"
9896 break;
9897
9898 case YYSYMBOL_block_param: /* block_param */
9899#line 2616 "parse.y"
9900 {
9901 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
9902 rb_parser_printf(p, "NODE_SPECIAL");
9903 }
9904 else if (((*yyvaluep).node_args)) {
9905 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
9906 }
9907}
9908#line 9909 "parse.c"
9909 break;
9910
9911 case YYSYMBOL_tail_only_args_block_args_tail: /* tail-only-args_block_args_tail */
9912#line 2616 "parse.y"
9913 {
9914 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
9915 rb_parser_printf(p, "NODE_SPECIAL");
9916 }
9917 else if (((*yyvaluep).node_args)) {
9918 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
9919 }
9920}
9921#line 9922 "parse.c"
9922 break;
9923
9924 case YYSYMBOL_opt_block_param_def: /* opt_block_param_def */
9925#line 2616 "parse.y"
9926 {
9927 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
9928 rb_parser_printf(p, "NODE_SPECIAL");
9929 }
9930 else if (((*yyvaluep).node_args)) {
9931 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
9932 }
9933}
9934#line 9935 "parse.c"
9935 break;
9936
9937 case YYSYMBOL_block_param_def: /* block_param_def */
9938#line 2616 "parse.y"
9939 {
9940 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
9941 rb_parser_printf(p, "NODE_SPECIAL");
9942 }
9943 else if (((*yyvaluep).node_args)) {
9944 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
9945 }
9946}
9947#line 9948 "parse.c"
9948 break;
9949
9950 case YYSYMBOL_opt_block_param: /* opt_block_param */
9951#line 2616 "parse.y"
9952 {
9953 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
9954 rb_parser_printf(p, "NODE_SPECIAL");
9955 }
9956 else if (((*yyvaluep).node_args)) {
9957 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
9958 }
9959}
9960#line 9961 "parse.c"
9961 break;
9962
9963 case YYSYMBOL_opt_bv_decl: /* opt_bv_decl */
9964#line 2625 "parse.y"
9965 {
9966 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
9967}
9968#line 9969 "parse.c"
9969 break;
9970
9971 case YYSYMBOL_bv_decls: /* bv_decls */
9972#line 2625 "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_bvar: /* bvar */
9980#line 2625 "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_numparam: /* numparam */
9988#line 2616 "parse.y"
9989 {
9990 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9991 rb_parser_printf(p, "NODE_SPECIAL");
9992 }
9993 else if (((*yyvaluep).node)) {
9994 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9995 }
9996}
9997#line 9998 "parse.c"
9998 break;
9999
10000 case YYSYMBOL_it_id: /* it_id */
10001#line 2625 "parse.y"
10002 {
10003 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
10004}
10005#line 10006 "parse.c"
10006 break;
10007
10008 case YYSYMBOL_lambda: /* lambda */
10009#line 2616 "parse.y"
10010 {
10011 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10012 rb_parser_printf(p, "NODE_SPECIAL");
10013 }
10014 else if (((*yyvaluep).node)) {
10015 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10016 }
10017}
10018#line 10019 "parse.c"
10019 break;
10020
10021 case YYSYMBOL_f_larglist: /* f_larglist */
10022#line 2616 "parse.y"
10023 {
10024 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
10025 rb_parser_printf(p, "NODE_SPECIAL");
10026 }
10027 else if (((*yyvaluep).node_args)) {
10028 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
10029 }
10030}
10031#line 10032 "parse.c"
10032 break;
10033
10034 case YYSYMBOL_do_block: /* do_block */
10035#line 2616 "parse.y"
10036 {
10037 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10038 rb_parser_printf(p, "NODE_SPECIAL");
10039 }
10040 else if (((*yyvaluep).node)) {
10041 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10042 }
10043}
10044#line 10045 "parse.c"
10045 break;
10046
10047 case YYSYMBOL_block_call: /* block_call */
10048#line 2616 "parse.y"
10049 {
10050 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10051 rb_parser_printf(p, "NODE_SPECIAL");
10052 }
10053 else if (((*yyvaluep).node)) {
10054 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10055 }
10056}
10057#line 10058 "parse.c"
10058 break;
10059
10060 case YYSYMBOL_method_call: /* method_call */
10061#line 2616 "parse.y"
10062 {
10063 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10064 rb_parser_printf(p, "NODE_SPECIAL");
10065 }
10066 else if (((*yyvaluep).node)) {
10067 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10068 }
10069}
10070#line 10071 "parse.c"
10071 break;
10072
10073 case YYSYMBOL_brace_block: /* brace_block */
10074#line 2616 "parse.y"
10075 {
10076 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10077 rb_parser_printf(p, "NODE_SPECIAL");
10078 }
10079 else if (((*yyvaluep).node)) {
10080 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10081 }
10082}
10083#line 10084 "parse.c"
10084 break;
10085
10086 case YYSYMBOL_brace_body: /* brace_body */
10087#line 2616 "parse.y"
10088 {
10089 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10090 rb_parser_printf(p, "NODE_SPECIAL");
10091 }
10092 else if (((*yyvaluep).node)) {
10093 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10094 }
10095}
10096#line 10097 "parse.c"
10097 break;
10098
10099 case YYSYMBOL_do_body: /* do_body */
10100#line 2616 "parse.y"
10101 {
10102 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10103 rb_parser_printf(p, "NODE_SPECIAL");
10104 }
10105 else if (((*yyvaluep).node)) {
10106 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10107 }
10108}
10109#line 10110 "parse.c"
10110 break;
10111
10112 case YYSYMBOL_case_args: /* case_args */
10113#line 2616 "parse.y"
10114 {
10115 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10116 rb_parser_printf(p, "NODE_SPECIAL");
10117 }
10118 else if (((*yyvaluep).node)) {
10119 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10120 }
10121}
10122#line 10123 "parse.c"
10123 break;
10124
10125 case YYSYMBOL_case_body: /* case_body */
10126#line 2616 "parse.y"
10127 {
10128 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10129 rb_parser_printf(p, "NODE_SPECIAL");
10130 }
10131 else if (((*yyvaluep).node)) {
10132 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10133 }
10134}
10135#line 10136 "parse.c"
10136 break;
10137
10138 case YYSYMBOL_cases: /* cases */
10139#line 2616 "parse.y"
10140 {
10141 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10142 rb_parser_printf(p, "NODE_SPECIAL");
10143 }
10144 else if (((*yyvaluep).node)) {
10145 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10146 }
10147}
10148#line 10149 "parse.c"
10149 break;
10150
10151 case YYSYMBOL_p_case_body: /* p_case_body */
10152#line 2616 "parse.y"
10153 {
10154 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10155 rb_parser_printf(p, "NODE_SPECIAL");
10156 }
10157 else if (((*yyvaluep).node)) {
10158 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10159 }
10160}
10161#line 10162 "parse.c"
10162 break;
10163
10164 case YYSYMBOL_p_cases: /* p_cases */
10165#line 2616 "parse.y"
10166 {
10167 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10168 rb_parser_printf(p, "NODE_SPECIAL");
10169 }
10170 else if (((*yyvaluep).node)) {
10171 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10172 }
10173}
10174#line 10175 "parse.c"
10175 break;
10176
10177 case YYSYMBOL_p_top_expr: /* p_top_expr */
10178#line 2616 "parse.y"
10179 {
10180 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10181 rb_parser_printf(p, "NODE_SPECIAL");
10182 }
10183 else if (((*yyvaluep).node)) {
10184 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10185 }
10186}
10187#line 10188 "parse.c"
10188 break;
10189
10190 case YYSYMBOL_p_top_expr_body: /* p_top_expr_body */
10191#line 2616 "parse.y"
10192 {
10193 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10194 rb_parser_printf(p, "NODE_SPECIAL");
10195 }
10196 else if (((*yyvaluep).node)) {
10197 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10198 }
10199}
10200#line 10201 "parse.c"
10201 break;
10202
10203 case YYSYMBOL_p_expr: /* p_expr */
10204#line 2616 "parse.y"
10205 {
10206 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10207 rb_parser_printf(p, "NODE_SPECIAL");
10208 }
10209 else if (((*yyvaluep).node)) {
10210 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10211 }
10212}
10213#line 10214 "parse.c"
10214 break;
10215
10216 case YYSYMBOL_p_as: /* p_as */
10217#line 2616 "parse.y"
10218 {
10219 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10220 rb_parser_printf(p, "NODE_SPECIAL");
10221 }
10222 else if (((*yyvaluep).node)) {
10223 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10224 }
10225}
10226#line 10227 "parse.c"
10227 break;
10228
10229 case YYSYMBOL_p_alt: /* p_alt */
10230#line 2616 "parse.y"
10231 {
10232 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10233 rb_parser_printf(p, "NODE_SPECIAL");
10234 }
10235 else if (((*yyvaluep).node)) {
10236 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10237 }
10238}
10239#line 10240 "parse.c"
10240 break;
10241
10242 case YYSYMBOL_p_expr_basic: /* p_expr_basic */
10243#line 2616 "parse.y"
10244 {
10245 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10246 rb_parser_printf(p, "NODE_SPECIAL");
10247 }
10248 else if (((*yyvaluep).node)) {
10249 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10250 }
10251}
10252#line 10253 "parse.c"
10253 break;
10254
10255 case YYSYMBOL_p_args: /* p_args */
10256#line 2616 "parse.y"
10257 {
10258 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10259 rb_parser_printf(p, "NODE_SPECIAL");
10260 }
10261 else if (((*yyvaluep).node)) {
10262 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10263 }
10264}
10265#line 10266 "parse.c"
10266 break;
10267
10268 case YYSYMBOL_p_args_head: /* p_args_head */
10269#line 2616 "parse.y"
10270 {
10271 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10272 rb_parser_printf(p, "NODE_SPECIAL");
10273 }
10274 else if (((*yyvaluep).node)) {
10275 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10276 }
10277}
10278#line 10279 "parse.c"
10279 break;
10280
10281 case YYSYMBOL_p_args_tail: /* p_args_tail */
10282#line 2616 "parse.y"
10283 {
10284 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10285 rb_parser_printf(p, "NODE_SPECIAL");
10286 }
10287 else if (((*yyvaluep).node)) {
10288 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10289 }
10290}
10291#line 10292 "parse.c"
10292 break;
10293
10294 case YYSYMBOL_p_find: /* p_find */
10295#line 2616 "parse.y"
10296 {
10297 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10298 rb_parser_printf(p, "NODE_SPECIAL");
10299 }
10300 else if (((*yyvaluep).node)) {
10301 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10302 }
10303}
10304#line 10305 "parse.c"
10305 break;
10306
10307 case YYSYMBOL_p_rest: /* p_rest */
10308#line 2616 "parse.y"
10309 {
10310 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10311 rb_parser_printf(p, "NODE_SPECIAL");
10312 }
10313 else if (((*yyvaluep).node)) {
10314 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10315 }
10316}
10317#line 10318 "parse.c"
10318 break;
10319
10320 case YYSYMBOL_p_args_post: /* p_args_post */
10321#line 2616 "parse.y"
10322 {
10323 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10324 rb_parser_printf(p, "NODE_SPECIAL");
10325 }
10326 else if (((*yyvaluep).node)) {
10327 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10328 }
10329}
10330#line 10331 "parse.c"
10331 break;
10332
10333 case YYSYMBOL_p_arg: /* p_arg */
10334#line 2616 "parse.y"
10335 {
10336 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10337 rb_parser_printf(p, "NODE_SPECIAL");
10338 }
10339 else if (((*yyvaluep).node)) {
10340 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10341 }
10342}
10343#line 10344 "parse.c"
10344 break;
10345
10346 case YYSYMBOL_p_kwargs: /* p_kwargs */
10347#line 2616 "parse.y"
10348 {
10349 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10350 rb_parser_printf(p, "NODE_SPECIAL");
10351 }
10352 else if (((*yyvaluep).node)) {
10353 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10354 }
10355}
10356#line 10357 "parse.c"
10357 break;
10358
10359 case YYSYMBOL_p_kwarg: /* p_kwarg */
10360#line 2616 "parse.y"
10361 {
10362 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10363 rb_parser_printf(p, "NODE_SPECIAL");
10364 }
10365 else if (((*yyvaluep).node)) {
10366 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10367 }
10368}
10369#line 10370 "parse.c"
10370 break;
10371
10372 case YYSYMBOL_p_kw: /* p_kw */
10373#line 2616 "parse.y"
10374 {
10375 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10376 rb_parser_printf(p, "NODE_SPECIAL");
10377 }
10378 else if (((*yyvaluep).node)) {
10379 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10380 }
10381}
10382#line 10383 "parse.c"
10383 break;
10384
10385 case YYSYMBOL_p_kw_label: /* p_kw_label */
10386#line 2625 "parse.y"
10387 {
10388 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
10389}
10390#line 10391 "parse.c"
10391 break;
10392
10393 case YYSYMBOL_p_kwrest: /* p_kwrest */
10394#line 2625 "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_kwnorest: /* p_kwnorest */
10402#line 2625 "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_any_kwrest: /* p_any_kwrest */
10410#line 2625 "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_value: /* p_value */
10418#line 2616 "parse.y"
10419 {
10420 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10421 rb_parser_printf(p, "NODE_SPECIAL");
10422 }
10423 else if (((*yyvaluep).node)) {
10424 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10425 }
10426}
10427#line 10428 "parse.c"
10428 break;
10429
10430 case YYSYMBOL_range_expr_p_primitive: /* range_expr_p_primitive */
10431#line 2616 "parse.y"
10432 {
10433 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10434 rb_parser_printf(p, "NODE_SPECIAL");
10435 }
10436 else if (((*yyvaluep).node)) {
10437 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10438 }
10439}
10440#line 10441 "parse.c"
10441 break;
10442
10443 case YYSYMBOL_p_primitive: /* p_primitive */
10444#line 2616 "parse.y"
10445 {
10446 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10447 rb_parser_printf(p, "NODE_SPECIAL");
10448 }
10449 else if (((*yyvaluep).node)) {
10450 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10451 }
10452}
10453#line 10454 "parse.c"
10454 break;
10455
10456 case YYSYMBOL_p_variable: /* p_variable */
10457#line 2616 "parse.y"
10458 {
10459 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10460 rb_parser_printf(p, "NODE_SPECIAL");
10461 }
10462 else if (((*yyvaluep).node)) {
10463 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10464 }
10465}
10466#line 10467 "parse.c"
10467 break;
10468
10469 case YYSYMBOL_p_var_ref: /* p_var_ref */
10470#line 2616 "parse.y"
10471 {
10472 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10473 rb_parser_printf(p, "NODE_SPECIAL");
10474 }
10475 else if (((*yyvaluep).node)) {
10476 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10477 }
10478}
10479#line 10480 "parse.c"
10480 break;
10481
10482 case YYSYMBOL_p_expr_ref: /* p_expr_ref */
10483#line 2616 "parse.y"
10484 {
10485 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10486 rb_parser_printf(p, "NODE_SPECIAL");
10487 }
10488 else if (((*yyvaluep).node)) {
10489 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10490 }
10491}
10492#line 10493 "parse.c"
10493 break;
10494
10495 case YYSYMBOL_p_const: /* p_const */
10496#line 2616 "parse.y"
10497 {
10498 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10499 rb_parser_printf(p, "NODE_SPECIAL");
10500 }
10501 else if (((*yyvaluep).node)) {
10502 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10503 }
10504}
10505#line 10506 "parse.c"
10506 break;
10507
10508 case YYSYMBOL_opt_rescue: /* opt_rescue */
10509#line 2616 "parse.y"
10510 {
10511 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10512 rb_parser_printf(p, "NODE_SPECIAL");
10513 }
10514 else if (((*yyvaluep).node)) {
10515 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10516 }
10517}
10518#line 10519 "parse.c"
10519 break;
10520
10521 case YYSYMBOL_exc_list: /* exc_list */
10522#line 2616 "parse.y"
10523 {
10524 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10525 rb_parser_printf(p, "NODE_SPECIAL");
10526 }
10527 else if (((*yyvaluep).node)) {
10528 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10529 }
10530}
10531#line 10532 "parse.c"
10532 break;
10533
10534 case YYSYMBOL_exc_var: /* exc_var */
10535#line 2616 "parse.y"
10536 {
10537 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10538 rb_parser_printf(p, "NODE_SPECIAL");
10539 }
10540 else if (((*yyvaluep).node)) {
10541 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10542 }
10543}
10544#line 10545 "parse.c"
10545 break;
10546
10547 case YYSYMBOL_opt_ensure: /* opt_ensure */
10548#line 2616 "parse.y"
10549 {
10550 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10551 rb_parser_printf(p, "NODE_SPECIAL");
10552 }
10553 else if (((*yyvaluep).node)) {
10554 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10555 }
10556}
10557#line 10558 "parse.c"
10558 break;
10559
10560 case YYSYMBOL_literal: /* literal */
10561#line 2616 "parse.y"
10562 {
10563 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10564 rb_parser_printf(p, "NODE_SPECIAL");
10565 }
10566 else if (((*yyvaluep).node)) {
10567 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10568 }
10569}
10570#line 10571 "parse.c"
10571 break;
10572
10573 case YYSYMBOL_strings: /* strings */
10574#line 2616 "parse.y"
10575 {
10576 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10577 rb_parser_printf(p, "NODE_SPECIAL");
10578 }
10579 else if (((*yyvaluep).node)) {
10580 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10581 }
10582}
10583#line 10584 "parse.c"
10584 break;
10585
10586 case YYSYMBOL_string: /* string */
10587#line 2616 "parse.y"
10588 {
10589 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10590 rb_parser_printf(p, "NODE_SPECIAL");
10591 }
10592 else if (((*yyvaluep).node)) {
10593 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10594 }
10595}
10596#line 10597 "parse.c"
10597 break;
10598
10599 case YYSYMBOL_string1: /* string1 */
10600#line 2616 "parse.y"
10601 {
10602 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10603 rb_parser_printf(p, "NODE_SPECIAL");
10604 }
10605 else if (((*yyvaluep).node)) {
10606 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10607 }
10608}
10609#line 10610 "parse.c"
10610 break;
10611
10612 case YYSYMBOL_xstring: /* xstring */
10613#line 2616 "parse.y"
10614 {
10615 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10616 rb_parser_printf(p, "NODE_SPECIAL");
10617 }
10618 else if (((*yyvaluep).node)) {
10619 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10620 }
10621}
10622#line 10623 "parse.c"
10623 break;
10624
10625 case YYSYMBOL_regexp: /* regexp */
10626#line 2616 "parse.y"
10627 {
10628 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10629 rb_parser_printf(p, "NODE_SPECIAL");
10630 }
10631 else if (((*yyvaluep).node)) {
10632 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10633 }
10634}
10635#line 10636 "parse.c"
10636 break;
10637
10638 case YYSYMBOL_words_tWORDS_BEG_word_list: /* words_tWORDS_BEG_word_list */
10639#line 2616 "parse.y"
10640 {
10641 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10642 rb_parser_printf(p, "NODE_SPECIAL");
10643 }
10644 else if (((*yyvaluep).node)) {
10645 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10646 }
10647}
10648#line 10649 "parse.c"
10649 break;
10650
10651 case YYSYMBOL_words: /* words */
10652#line 2616 "parse.y"
10653 {
10654 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10655 rb_parser_printf(p, "NODE_SPECIAL");
10656 }
10657 else if (((*yyvaluep).node)) {
10658 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10659 }
10660}
10661#line 10662 "parse.c"
10662 break;
10663
10664 case YYSYMBOL_word_list: /* word_list */
10665#line 2616 "parse.y"
10666 {
10667 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10668 rb_parser_printf(p, "NODE_SPECIAL");
10669 }
10670 else if (((*yyvaluep).node)) {
10671 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10672 }
10673}
10674#line 10675 "parse.c"
10675 break;
10676
10677 case YYSYMBOL_word: /* word */
10678#line 2616 "parse.y"
10679 {
10680 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10681 rb_parser_printf(p, "NODE_SPECIAL");
10682 }
10683 else if (((*yyvaluep).node)) {
10684 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10685 }
10686}
10687#line 10688 "parse.c"
10688 break;
10689
10690 case YYSYMBOL_words_tSYMBOLS_BEG_symbol_list: /* words_tSYMBOLS_BEG_symbol_list */
10691#line 2616 "parse.y"
10692 {
10693 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10694 rb_parser_printf(p, "NODE_SPECIAL");
10695 }
10696 else if (((*yyvaluep).node)) {
10697 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10698 }
10699}
10700#line 10701 "parse.c"
10701 break;
10702
10703 case YYSYMBOL_symbols: /* symbols */
10704#line 2616 "parse.y"
10705 {
10706 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10707 rb_parser_printf(p, "NODE_SPECIAL");
10708 }
10709 else if (((*yyvaluep).node)) {
10710 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10711 }
10712}
10713#line 10714 "parse.c"
10714 break;
10715
10716 case YYSYMBOL_symbol_list: /* symbol_list */
10717#line 2616 "parse.y"
10718 {
10719 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10720 rb_parser_printf(p, "NODE_SPECIAL");
10721 }
10722 else if (((*yyvaluep).node)) {
10723 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10724 }
10725}
10726#line 10727 "parse.c"
10727 break;
10728
10729 case YYSYMBOL_words_tQWORDS_BEG_qword_list: /* words_tQWORDS_BEG_qword_list */
10730#line 2616 "parse.y"
10731 {
10732 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10733 rb_parser_printf(p, "NODE_SPECIAL");
10734 }
10735 else if (((*yyvaluep).node)) {
10736 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10737 }
10738}
10739#line 10740 "parse.c"
10740 break;
10741
10742 case YYSYMBOL_qwords: /* qwords */
10743#line 2616 "parse.y"
10744 {
10745 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10746 rb_parser_printf(p, "NODE_SPECIAL");
10747 }
10748 else if (((*yyvaluep).node)) {
10749 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10750 }
10751}
10752#line 10753 "parse.c"
10753 break;
10754
10755 case YYSYMBOL_words_tQSYMBOLS_BEG_qsym_list: /* words_tQSYMBOLS_BEG_qsym_list */
10756#line 2616 "parse.y"
10757 {
10758 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10759 rb_parser_printf(p, "NODE_SPECIAL");
10760 }
10761 else if (((*yyvaluep).node)) {
10762 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10763 }
10764}
10765#line 10766 "parse.c"
10766 break;
10767
10768 case YYSYMBOL_qsymbols: /* qsymbols */
10769#line 2616 "parse.y"
10770 {
10771 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10772 rb_parser_printf(p, "NODE_SPECIAL");
10773 }
10774 else if (((*yyvaluep).node)) {
10775 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10776 }
10777}
10778#line 10779 "parse.c"
10779 break;
10780
10781 case YYSYMBOL_qword_list: /* qword_list */
10782#line 2616 "parse.y"
10783 {
10784 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10785 rb_parser_printf(p, "NODE_SPECIAL");
10786 }
10787 else if (((*yyvaluep).node)) {
10788 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10789 }
10790}
10791#line 10792 "parse.c"
10792 break;
10793
10794 case YYSYMBOL_qsym_list: /* qsym_list */
10795#line 2616 "parse.y"
10796 {
10797 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10798 rb_parser_printf(p, "NODE_SPECIAL");
10799 }
10800 else if (((*yyvaluep).node)) {
10801 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10802 }
10803}
10804#line 10805 "parse.c"
10805 break;
10806
10807 case YYSYMBOL_string_contents: /* string_contents */
10808#line 2616 "parse.y"
10809 {
10810 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10811 rb_parser_printf(p, "NODE_SPECIAL");
10812 }
10813 else if (((*yyvaluep).node)) {
10814 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10815 }
10816}
10817#line 10818 "parse.c"
10818 break;
10819
10820 case YYSYMBOL_xstring_contents: /* xstring_contents */
10821#line 2616 "parse.y"
10822 {
10823 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10824 rb_parser_printf(p, "NODE_SPECIAL");
10825 }
10826 else if (((*yyvaluep).node)) {
10827 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10828 }
10829}
10830#line 10831 "parse.c"
10831 break;
10832
10833 case YYSYMBOL_regexp_contents: /* regexp_contents */
10834#line 2616 "parse.y"
10835 {
10836 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10837 rb_parser_printf(p, "NODE_SPECIAL");
10838 }
10839 else if (((*yyvaluep).node)) {
10840 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10841 }
10842}
10843#line 10844 "parse.c"
10844 break;
10845
10846 case YYSYMBOL_string_content: /* string_content */
10847#line 2616 "parse.y"
10848 {
10849 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10850 rb_parser_printf(p, "NODE_SPECIAL");
10851 }
10852 else if (((*yyvaluep).node)) {
10853 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10854 }
10855}
10856#line 10857 "parse.c"
10857 break;
10858
10859 case YYSYMBOL_string_dvar: /* string_dvar */
10860#line 2616 "parse.y"
10861 {
10862 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10863 rb_parser_printf(p, "NODE_SPECIAL");
10864 }
10865 else if (((*yyvaluep).node)) {
10866 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10867 }
10868}
10869#line 10870 "parse.c"
10870 break;
10871
10872 case YYSYMBOL_symbol: /* symbol */
10873#line 2616 "parse.y"
10874 {
10875 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10876 rb_parser_printf(p, "NODE_SPECIAL");
10877 }
10878 else if (((*yyvaluep).node)) {
10879 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10880 }
10881}
10882#line 10883 "parse.c"
10883 break;
10884
10885 case YYSYMBOL_ssym: /* ssym */
10886#line 2616 "parse.y"
10887 {
10888 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10889 rb_parser_printf(p, "NODE_SPECIAL");
10890 }
10891 else if (((*yyvaluep).node)) {
10892 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10893 }
10894}
10895#line 10896 "parse.c"
10896 break;
10897
10898 case YYSYMBOL_sym: /* sym */
10899#line 2625 "parse.y"
10900 {
10901 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
10902}
10903#line 10904 "parse.c"
10904 break;
10905
10906 case YYSYMBOL_dsym: /* dsym */
10907#line 2616 "parse.y"
10908 {
10909 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10910 rb_parser_printf(p, "NODE_SPECIAL");
10911 }
10912 else if (((*yyvaluep).node)) {
10913 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10914 }
10915}
10916#line 10917 "parse.c"
10917 break;
10918
10919 case YYSYMBOL_numeric: /* numeric */
10920#line 2616 "parse.y"
10921 {
10922 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10923 rb_parser_printf(p, "NODE_SPECIAL");
10924 }
10925 else if (((*yyvaluep).node)) {
10926 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10927 }
10928}
10929#line 10930 "parse.c"
10930 break;
10931
10932 case YYSYMBOL_simple_numeric: /* simple_numeric */
10933#line 2616 "parse.y"
10934 {
10935 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10936 rb_parser_printf(p, "NODE_SPECIAL");
10937 }
10938 else if (((*yyvaluep).node)) {
10939 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10940 }
10941}
10942#line 10943 "parse.c"
10943 break;
10944
10945 case YYSYMBOL_nonlocal_var: /* nonlocal_var */
10946#line 2625 "parse.y"
10947 {
10948 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
10949}
10950#line 10951 "parse.c"
10951 break;
10952
10953 case YYSYMBOL_user_variable: /* user_variable */
10954#line 2625 "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_keyword_variable: /* keyword_variable */
10962#line 2625 "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_var_ref: /* var_ref */
10970#line 2616 "parse.y"
10971 {
10972 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10973 rb_parser_printf(p, "NODE_SPECIAL");
10974 }
10975 else if (((*yyvaluep).node)) {
10976 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10977 }
10978}
10979#line 10980 "parse.c"
10980 break;
10981
10982 case YYSYMBOL_var_lhs: /* var_lhs */
10983#line 2616 "parse.y"
10984 {
10985 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10986 rb_parser_printf(p, "NODE_SPECIAL");
10987 }
10988 else if (((*yyvaluep).node)) {
10989 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10990 }
10991}
10992#line 10993 "parse.c"
10993 break;
10994
10995 case YYSYMBOL_backref: /* backref */
10996#line 2616 "parse.y"
10997 {
10998 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10999 rb_parser_printf(p, "NODE_SPECIAL");
11000 }
11001 else if (((*yyvaluep).node)) {
11002 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
11003 }
11004}
11005#line 11006 "parse.c"
11006 break;
11007
11008 case YYSYMBOL_superclass: /* superclass */
11009#line 2616 "parse.y"
11010 {
11011 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
11012 rb_parser_printf(p, "NODE_SPECIAL");
11013 }
11014 else if (((*yyvaluep).node)) {
11015 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
11016 }
11017}
11018#line 11019 "parse.c"
11019 break;
11020
11021 case YYSYMBOL_f_opt_paren_args: /* f_opt_paren_args */
11022#line 2616 "parse.y"
11023 {
11024 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
11025 rb_parser_printf(p, "NODE_SPECIAL");
11026 }
11027 else if (((*yyvaluep).node_args)) {
11028 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
11029 }
11030}
11031#line 11032 "parse.c"
11032 break;
11033
11034 case YYSYMBOL_f_empty_arg: /* f_empty_arg */
11035#line 2616 "parse.y"
11036 {
11037 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
11038 rb_parser_printf(p, "NODE_SPECIAL");
11039 }
11040 else if (((*yyvaluep).node_args)) {
11041 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
11042 }
11043}
11044#line 11045 "parse.c"
11045 break;
11046
11047 case YYSYMBOL_f_paren_args: /* f_paren_args */
11048#line 2616 "parse.y"
11049 {
11050 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
11051 rb_parser_printf(p, "NODE_SPECIAL");
11052 }
11053 else if (((*yyvaluep).node_args)) {
11054 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
11055 }
11056}
11057#line 11058 "parse.c"
11058 break;
11059
11060 case YYSYMBOL_f_arglist: /* f_arglist */
11061#line 2616 "parse.y"
11062 {
11063 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
11064 rb_parser_printf(p, "NODE_SPECIAL");
11065 }
11066 else if (((*yyvaluep).node_args)) {
11067 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
11068 }
11069}
11070#line 11071 "parse.c"
11071 break;
11072
11073 case YYSYMBOL_f_kw_arg_value: /* f_kw_arg_value */
11074#line 2616 "parse.y"
11075 {
11076 if ((NODE *)((*yyvaluep).node_kw_arg) == (NODE *)-1) {
11077 rb_parser_printf(p, "NODE_SPECIAL");
11078 }
11079 else if (((*yyvaluep).node_kw_arg)) {
11080 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_kw_arg)))));
11081 }
11082}
11083#line 11084 "parse.c"
11084 break;
11085
11086 case YYSYMBOL_f_kwarg_arg_value: /* f_kwarg_arg_value */
11087#line 2616 "parse.y"
11088 {
11089 if ((NODE *)((*yyvaluep).node_kw_arg) == (NODE *)-1) {
11090 rb_parser_printf(p, "NODE_SPECIAL");
11091 }
11092 else if (((*yyvaluep).node_kw_arg)) {
11093 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_kw_arg)))));
11094 }
11095}
11096#line 11097 "parse.c"
11097 break;
11098
11099 case YYSYMBOL_opt_f_block_arg_opt_comma: /* opt_f_block_arg_opt_comma */
11100#line 2625 "parse.y"
11101 {
11102 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
11103}
11104#line 11105 "parse.c"
11105 break;
11106
11107 case YYSYMBOL_args_tail_basic_arg_value_opt_comma: /* args_tail_basic_arg_value_opt_comma */
11108#line 2616 "parse.y"
11109 {
11110 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
11111 rb_parser_printf(p, "NODE_SPECIAL");
11112 }
11113 else if (((*yyvaluep).node_args)) {
11114 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
11115 }
11116}
11117#line 11118 "parse.c"
11118 break;
11119
11120 case YYSYMBOL_args_tail: /* args_tail */
11121#line 2616 "parse.y"
11122 {
11123 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
11124 rb_parser_printf(p, "NODE_SPECIAL");
11125 }
11126 else if (((*yyvaluep).node_args)) {
11127 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
11128 }
11129}
11130#line 11131 "parse.c"
11131 break;
11132
11133 case YYSYMBOL_args_tail_basic_arg_value_none: /* args_tail_basic_arg_value_none */
11134#line 2616 "parse.y"
11135 {
11136 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
11137 rb_parser_printf(p, "NODE_SPECIAL");
11138 }
11139 else if (((*yyvaluep).node_args)) {
11140 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
11141 }
11142}
11143#line 11144 "parse.c"
11144 break;
11145
11146 case YYSYMBOL_largs_tail: /* largs_tail */
11147#line 2616 "parse.y"
11148 {
11149 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
11150 rb_parser_printf(p, "NODE_SPECIAL");
11151 }
11152 else if (((*yyvaluep).node_args)) {
11153 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
11154 }
11155}
11156#line 11157 "parse.c"
11157 break;
11158
11159 case YYSYMBOL_f_opt_arg_value: /* f_opt_arg_value */
11160#line 2616 "parse.y"
11161 {
11162 if ((NODE *)((*yyvaluep).node_opt_arg) == (NODE *)-1) {
11163 rb_parser_printf(p, "NODE_SPECIAL");
11164 }
11165 else if (((*yyvaluep).node_opt_arg)) {
11166 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_opt_arg)))));
11167 }
11168}
11169#line 11170 "parse.c"
11170 break;
11171
11172 case YYSYMBOL_f_opt_arg_arg_value: /* f_opt_arg_arg_value */
11173#line 2616 "parse.y"
11174 {
11175 if ((NODE *)((*yyvaluep).node_opt_arg) == (NODE *)-1) {
11176 rb_parser_printf(p, "NODE_SPECIAL");
11177 }
11178 else if (((*yyvaluep).node_opt_arg)) {
11179 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_opt_arg)))));
11180 }
11181}
11182#line 11183 "parse.c"
11183 break;
11184
11185 case YYSYMBOL_opt_args_tail_args_tail_opt_comma: /* opt_args_tail_args_tail_opt_comma */
11186#line 2616 "parse.y"
11187 {
11188 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
11189 rb_parser_printf(p, "NODE_SPECIAL");
11190 }
11191 else if (((*yyvaluep).node_args)) {
11192 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
11193 }
11194}
11195#line 11196 "parse.c"
11196 break;
11197
11198 case YYSYMBOL_args_list_arg_value_opt_args_tail_args_tail_opt_comma: /* args-list_arg_value_opt_args_tail_args_tail_opt_comma */
11199#line 2616 "parse.y"
11200 {
11201 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
11202 rb_parser_printf(p, "NODE_SPECIAL");
11203 }
11204 else if (((*yyvaluep).node_args)) {
11205 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
11206 }
11207}
11208#line 11209 "parse.c"
11209 break;
11210
11211 case YYSYMBOL_f_args_list_args_tail_opt_comma: /* f_args-list_args_tail_opt_comma */
11212#line 2616 "parse.y"
11213 {
11214 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
11215 rb_parser_printf(p, "NODE_SPECIAL");
11216 }
11217 else if (((*yyvaluep).node_args)) {
11218 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
11219 }
11220}
11221#line 11222 "parse.c"
11222 break;
11223
11224 case YYSYMBOL_tail_only_args_args_tail: /* tail-only-args_args_tail */
11225#line 2616 "parse.y"
11226 {
11227 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
11228 rb_parser_printf(p, "NODE_SPECIAL");
11229 }
11230 else if (((*yyvaluep).node_args)) {
11231 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
11232 }
11233}
11234#line 11235 "parse.c"
11235 break;
11236
11237 case YYSYMBOL_f_args: /* f_args */
11238#line 2616 "parse.y"
11239 {
11240 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
11241 rb_parser_printf(p, "NODE_SPECIAL");
11242 }
11243 else if (((*yyvaluep).node_args)) {
11244 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
11245 }
11246}
11247#line 11248 "parse.c"
11248 break;
11249
11250 case YYSYMBOL_opt_args_tail_largs_tail_none: /* opt_args_tail_largs_tail_none */
11251#line 2616 "parse.y"
11252 {
11253 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
11254 rb_parser_printf(p, "NODE_SPECIAL");
11255 }
11256 else if (((*yyvaluep).node_args)) {
11257 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
11258 }
11259}
11260#line 11261 "parse.c"
11261 break;
11262
11263 case YYSYMBOL_args_list_arg_value_opt_args_tail_largs_tail_none: /* args-list_arg_value_opt_args_tail_largs_tail_none */
11264#line 2616 "parse.y"
11265 {
11266 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
11267 rb_parser_printf(p, "NODE_SPECIAL");
11268 }
11269 else if (((*yyvaluep).node_args)) {
11270 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
11271 }
11272}
11273#line 11274 "parse.c"
11274 break;
11275
11276 case YYSYMBOL_f_args_list_largs_tail_none: /* f_args-list_largs_tail_none */
11277#line 2616 "parse.y"
11278 {
11279 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
11280 rb_parser_printf(p, "NODE_SPECIAL");
11281 }
11282 else if (((*yyvaluep).node_args)) {
11283 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
11284 }
11285}
11286#line 11287 "parse.c"
11287 break;
11288
11289 case YYSYMBOL_tail_only_args_largs_tail: /* tail-only-args_largs_tail */
11290#line 2616 "parse.y"
11291 {
11292 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
11293 rb_parser_printf(p, "NODE_SPECIAL");
11294 }
11295 else if (((*yyvaluep).node_args)) {
11296 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
11297 }
11298}
11299#line 11300 "parse.c"
11300 break;
11301
11302 case YYSYMBOL_f_largs: /* f_largs */
11303#line 2616 "parse.y"
11304 {
11305 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
11306 rb_parser_printf(p, "NODE_SPECIAL");
11307 }
11308 else if (((*yyvaluep).node_args)) {
11309 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
11310 }
11311}
11312#line 11313 "parse.c"
11313 break;
11314
11315 case YYSYMBOL_args_forward: /* args_forward */
11316#line 2625 "parse.y"
11317 {
11318 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
11319}
11320#line 11321 "parse.c"
11321 break;
11322
11323 case YYSYMBOL_f_bad_arg: /* f_bad_arg */
11324#line 2625 "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_norm_arg: /* f_norm_arg */
11332#line 2625 "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_arg_asgn: /* f_arg_asgn */
11340#line 2625 "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_item: /* f_arg_item */
11348#line 2616 "parse.y"
11349 {
11350 if ((NODE *)((*yyvaluep).node_args_aux) == (NODE *)-1) {
11351 rb_parser_printf(p, "NODE_SPECIAL");
11352 }
11353 else if (((*yyvaluep).node_args_aux)) {
11354 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args_aux)))));
11355 }
11356}
11357#line 11358 "parse.c"
11358 break;
11359
11360 case YYSYMBOL_f_arg: /* f_arg */
11361#line 2616 "parse.y"
11362 {
11363 if ((NODE *)((*yyvaluep).node_args_aux) == (NODE *)-1) {
11364 rb_parser_printf(p, "NODE_SPECIAL");
11365 }
11366 else if (((*yyvaluep).node_args_aux)) {
11367 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args_aux)))));
11368 }
11369}
11370#line 11371 "parse.c"
11371 break;
11372
11373 case YYSYMBOL_f_label: /* f_label */
11374#line 2625 "parse.y"
11375 {
11376 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
11377}
11378#line 11379 "parse.c"
11379 break;
11380
11381 case YYSYMBOL_f_no_kwarg: /* f_no_kwarg */
11382#line 2625 "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_kwrest: /* f_kwrest */
11390#line 2625 "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_rest_arg: /* f_rest_arg */
11398#line 2625 "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_block_arg: /* f_block_arg */
11406#line 2625 "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_opt_comma: /* opt_comma */
11414#line 2625 "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_value_expr_singleton_expr: /* value_expr_singleton_expr */
11422#line 2616 "parse.y"
11423 {
11424 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
11425 rb_parser_printf(p, "NODE_SPECIAL");
11426 }
11427 else if (((*yyvaluep).node)) {
11428 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
11429 }
11430}
11431#line 11432 "parse.c"
11432 break;
11433
11434 case YYSYMBOL_singleton: /* singleton */
11435#line 2616 "parse.y"
11436 {
11437 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
11438 rb_parser_printf(p, "NODE_SPECIAL");
11439 }
11440 else if (((*yyvaluep).node)) {
11441 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
11442 }
11443}
11444#line 11445 "parse.c"
11445 break;
11446
11447 case YYSYMBOL_singleton_expr: /* singleton_expr */
11448#line 2616 "parse.y"
11449 {
11450 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
11451 rb_parser_printf(p, "NODE_SPECIAL");
11452 }
11453 else if (((*yyvaluep).node)) {
11454 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
11455 }
11456}
11457#line 11458 "parse.c"
11458 break;
11459
11460 case YYSYMBOL_assoc_list: /* assoc_list */
11461#line 2616 "parse.y"
11462 {
11463 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
11464 rb_parser_printf(p, "NODE_SPECIAL");
11465 }
11466 else if (((*yyvaluep).node)) {
11467 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
11468 }
11469}
11470#line 11471 "parse.c"
11471 break;
11472
11473 case YYSYMBOL_assocs: /* assocs */
11474#line 2616 "parse.y"
11475 {
11476 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
11477 rb_parser_printf(p, "NODE_SPECIAL");
11478 }
11479 else if (((*yyvaluep).node)) {
11480 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
11481 }
11482}
11483#line 11484 "parse.c"
11484 break;
11485
11486 case YYSYMBOL_assoc: /* assoc */
11487#line 2616 "parse.y"
11488 {
11489 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
11490 rb_parser_printf(p, "NODE_SPECIAL");
11491 }
11492 else if (((*yyvaluep).node)) {
11493 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
11494 }
11495}
11496#line 11497 "parse.c"
11497 break;
11498
11499 case YYSYMBOL_operation2: /* operation2 */
11500#line 2625 "parse.y"
11501 {
11502 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
11503}
11504#line 11505 "parse.c"
11505 break;
11506
11507 case YYSYMBOL_operation3: /* operation3 */
11508#line 2625 "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_dot_or_colon: /* dot_or_colon */
11516#line 2625 "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_call_op: /* call_op */
11524#line 2625 "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_op2: /* call_op2 */
11532#line 2625 "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_none: /* none */
11540#line 2616 "parse.y"
11541 {
11542 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
11543 rb_parser_printf(p, "NODE_SPECIAL");
11544 }
11545 else if (((*yyvaluep).node)) {
11546 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
11547 }
11548}
11549#line 11550 "parse.c"
11550 break;
11551
11552 default:
11553 break;
11554 }
11555 YY_IGNORE_MAYBE_UNINITIALIZED_END
11556}
11557
11558
11559/*---------------------------.
11560| Print this symbol on YYO. |
11561`---------------------------*/
11562
11563static void
11564yy_symbol_print (FILE *yyo,
11565 yysymbol_kind_t yykind, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp, struct parser_params *p)
11566{
11567 YYFPRINTF (yyo, "%s %s (",
11568 yykind < YYNTOKENS ? "token" : "nterm", yysymbol_name (yykind));
11569
11570 YYLOCATION_PRINT (yyo, yylocationp, p);
11571 YYFPRINTF (yyo, ": ");
11572 yy_symbol_value_print (yyo, yykind, yyvaluep, yylocationp, p);
11573 YYFPRINTF (yyo, ")");
11574}
11575
11576/*------------------------------------------------------------------.
11577| yy_stack_print -- Print the state stack from its BOTTOM up to its |
11578| TOP (included). |
11579`------------------------------------------------------------------*/
11580
11581static void
11582yy_stack_print (yy_state_t *yybottom, yy_state_t *yytop, struct parser_params *p)
11583{
11584 YYFPRINTF (stderr, "Stack now");
11585 for (; yybottom <= yytop; yybottom++)
11586 {
11587 int yybot = *yybottom;
11588 YYFPRINTF (stderr, " %d", yybot);
11589 }
11590 YYFPRINTF (stderr, "\n");
11591}
11592
11593# define YY_STACK_PRINT(Bottom, Top, p) \
11594do { \
11595 if (yydebug) \
11596 yy_stack_print ((Bottom), (Top), p); \
11597} while (0)
11598
11599
11600/*------------------------------------------------.
11601| Report that the YYRULE is going to be reduced. |
11602`------------------------------------------------*/
11603
11604static void
11605yy_reduce_print (yy_state_t *yyssp, YYSTYPE *yyvsp, YYLTYPE *yylsp,
11606 int yyrule, struct parser_params *p)
11607{
11608 int yylno = yyrline[yyrule];
11609 int yynrhs = yyr2[yyrule];
11610 int yyi;
11611 YYFPRINTF (stderr, "Reducing stack by rule %d (line %d):\n",
11612 yyrule - 1, yylno);
11613 /* The symbols being reduced. */
11614 for (yyi = 0; yyi < yynrhs; yyi++)
11615 {
11616 YYFPRINTF (stderr, " $%d = ", yyi + 1);
11617 yy_symbol_print (stderr,
11618 YY_ACCESSING_SYMBOL (+yyssp[yyi + 1 - yynrhs]),
11619 &yyvsp[(yyi + 1) - (yynrhs)],
11620 &(yylsp[(yyi + 1) - (yynrhs)]), p);
11621 YYFPRINTF (stderr, "\n");
11622 }
11623}
11624
11625# define YY_REDUCE_PRINT(Rule, p) \
11626do { \
11627 if (yydebug) \
11628 yy_reduce_print (yyssp, yyvsp, yylsp, Rule, p); \
11629} while (0)
11630
11631/* Nonzero means print parse trace. It is left uninitialized so that
11632 multiple parsers can coexist. */
11633#ifndef yydebug
11634int yydebug;
11635#endif
11636#else /* !YYDEBUG */
11637# define YYDPRINTF(Args) ((void) 0)
11638# define YY_SYMBOL_PRINT(Title, Kind, Value, Location, p)
11639# define YY_STACK_PRINT(Bottom, Top, p)
11640# define YY_REDUCE_PRINT(Rule, p)
11641#endif /* !YYDEBUG */
11642
11643
11644/* YYINITDEPTH -- initial size of the parser's stacks. */
11645#ifndef YYINITDEPTH
11646# define YYINITDEPTH 200
11647#endif
11648
11649/* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
11650 if the built-in stack extension method is used).
11651
11652 Do not make this value too large; the results are undefined if
11653 YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
11654 evaluated with infinite-precision integer arithmetic. */
11655
11656#ifndef YYMAXDEPTH
11657# define YYMAXDEPTH 10000
11658#endif
11659
11660
11661/* Context of a parse error. */
11662typedef struct
11663{
11664 yy_state_t *yyssp;
11665 yysymbol_kind_t yytoken;
11666 YYLTYPE *yylloc;
11667} yypcontext_t;
11668
11669/* Put in YYARG at most YYARGN of the expected tokens given the
11670 current YYCTX, and return the number of tokens stored in YYARG. If
11671 YYARG is null, return the number of expected tokens (guaranteed to
11672 be less than YYNTOKENS). Return YYENOMEM on memory exhaustion.
11673 Return 0 if there are more than YYARGN expected tokens, yet fill
11674 YYARG up to YYARGN. */
11675static int
11676yypcontext_expected_tokens (const yypcontext_t *yyctx,
11677 yysymbol_kind_t yyarg[], int yyargn)
11678{
11679 /* Actual size of YYARG. */
11680 int yycount = 0;
11681 int yyn = yypact[+*yyctx->yyssp];
11682 if (!yypact_value_is_default (yyn))
11683 {
11684 /* Start YYX at -YYN if negative to avoid negative indexes in
11685 YYCHECK. In other words, skip the first -YYN actions for
11686 this state because they are default actions. */
11687 int yyxbegin = yyn < 0 ? -yyn : 0;
11688 /* Stay within bounds of both yycheck and yytname. */
11689 int yychecklim = YYLAST - yyn + 1;
11690 int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
11691 int yyx;
11692 for (yyx = yyxbegin; yyx < yyxend; ++yyx)
11693 if (yycheck[yyx + yyn] == yyx && yyx != YYSYMBOL_YYerror
11694 && !yytable_value_is_error (yytable[yyx + yyn]))
11695 {
11696 if (!yyarg)
11697 ++yycount;
11698 else if (yycount == yyargn)
11699 return 0;
11700 else
11701 yyarg[yycount++] = YY_CAST (yysymbol_kind_t, yyx);
11702 }
11703 }
11704 if (yyarg && yycount == 0 && 0 < yyargn)
11705 yyarg[0] = YYSYMBOL_YYEMPTY;
11706 return yycount;
11707}
11708
11709
11710
11711
11712#ifndef yystrlen
11713# if defined __GLIBC__ && defined _STRING_H
11714# define yystrlen(S) (YY_CAST (YYPTRDIFF_T, strlen (S)))
11715# else
11716/* Return the length of YYSTR. */
11717static YYPTRDIFF_T
11718yystrlen (const char *yystr)
11719{
11720 YYPTRDIFF_T yylen;
11721 for (yylen = 0; yystr[yylen]; yylen++)
11722 continue;
11723 return yylen;
11724}
11725# endif
11726#endif
11727
11728#ifndef yystpcpy
11729# if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
11730# define yystpcpy stpcpy
11731# else
11732/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
11733 YYDEST. */
11734static char *
11735yystpcpy (char *yydest, const char *yysrc)
11736{
11737 char *yyd = yydest;
11738 const char *yys = yysrc;
11739
11740 while ((*yyd++ = *yys++) != '\0')
11741 continue;
11742
11743 return yyd - 1;
11744}
11745# endif
11746#endif
11747
11748#ifndef yytnamerr
11749/* Copy to YYRES the contents of YYSTR after stripping away unnecessary
11750 quotes and backslashes, so that it's suitable for yyerror. The
11751 heuristic is that double-quoting is unnecessary unless the string
11752 contains an apostrophe, a comma, or backslash (other than
11753 backslash-backslash). YYSTR is taken from yytname. If YYRES is
11754 null, do not copy; instead, return the length of what the result
11755 would have been. */
11756static YYPTRDIFF_T
11757yytnamerr (char *yyres, const char *yystr)
11758{
11759 if (*yystr == '"')
11760 {
11761 YYPTRDIFF_T yyn = 0;
11762 char const *yyp = yystr;
11763 for (;;)
11764 switch (*++yyp)
11765 {
11766 case '\'':
11767 case ',':
11768 goto do_not_strip_quotes;
11769
11770 case '\\':
11771 if (*++yyp != '\\')
11772 goto do_not_strip_quotes;
11773 else
11774 goto append;
11775
11776 append:
11777 default:
11778 if (yyres)
11779 yyres[yyn] = *yyp;
11780 yyn++;
11781 break;
11782
11783 case '"':
11784 if (yyres)
11785 yyres[yyn] = '\0';
11786 return yyn;
11787 }
11788 do_not_strip_quotes: ;
11789 }
11790
11791 if (yyres)
11792 return yystpcpy (yyres, yystr) - yyres;
11793 else
11794 return yystrlen (yystr);
11795}
11796#endif
11797
11798
11799static int
11800yy_syntax_error_arguments (const yypcontext_t *yyctx,
11801 yysymbol_kind_t yyarg[], int yyargn)
11802{
11803 /* Actual size of YYARG. */
11804 int yycount = 0;
11805 /* There are many possibilities here to consider:
11806 - If this state is a consistent state with a default action, then
11807 the only way this function was invoked is if the default action
11808 is an error action. In that case, don't check for expected
11809 tokens because there are none.
11810 - The only way there can be no lookahead present (in yychar) is if
11811 this state is a consistent state with a default action. Thus,
11812 detecting the absence of a lookahead is sufficient to determine
11813 that there is no unexpected or expected token to report. In that
11814 case, just report a simple "syntax error".
11815 - Don't assume there isn't a lookahead just because this state is a
11816 consistent state with a default action. There might have been a
11817 previous inconsistent state, consistent state with a non-default
11818 action, or user semantic action that manipulated yychar.
11819 - Of course, the expected token list depends on states to have
11820 correct lookahead information, and it depends on the parser not
11821 to perform extra reductions after fetching a lookahead from the
11822 scanner and before detecting a syntax error. Thus, state merging
11823 (from LALR or IELR) and default reductions corrupt the expected
11824 token list. However, the list is correct for canonical LR with
11825 one exception: it will still contain any token that will not be
11826 accepted due to an error action in a later state.
11827 */
11828 if (yyctx->yytoken != YYSYMBOL_YYEMPTY)
11829 {
11830 int yyn;
11831 if (yyarg)
11832 yyarg[yycount] = yyctx->yytoken;
11833 ++yycount;
11834 yyn = yypcontext_expected_tokens (yyctx,
11835 yyarg ? yyarg + 1 : yyarg, yyargn - 1);
11836 if (yyn == YYENOMEM)
11837 return YYENOMEM;
11838 else
11839 yycount += yyn;
11840 }
11841 return yycount;
11842}
11843
11844/* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message
11845 about the unexpected token YYTOKEN for the state stack whose top is
11846 YYSSP.
11847
11848 Return 0 if *YYMSG was successfully written. Return -1 if *YYMSG is
11849 not large enough to hold the message. In that case, also set
11850 *YYMSG_ALLOC to the required number of bytes. Return YYENOMEM if the
11851 required number of bytes is too large to store. */
11852static int
11853yysyntax_error (YYPTRDIFF_T *yymsg_alloc, char **yymsg,
11854 const yypcontext_t *yyctx, struct parser_params *p)
11855{
11856 enum { YYARGS_MAX = 5 };
11857 /* Internationalized format string. */
11858 const char *yyformat = YY_NULLPTR;
11859 /* Arguments of yyformat: reported tokens (one for the "unexpected",
11860 one per "expected"). */
11861 yysymbol_kind_t yyarg[YYARGS_MAX];
11862 /* Cumulated lengths of YYARG. */
11863 YYPTRDIFF_T yysize = 0;
11864
11865 /* Actual size of YYARG. */
11866 int yycount = yy_syntax_error_arguments (yyctx, yyarg, YYARGS_MAX);
11867 if (yycount == YYENOMEM)
11868 return YYENOMEM;
11869
11870 switch (yycount)
11871 {
11872#define YYCASE_(N, S) \
11873 case N: \
11874 yyformat = S; \
11875 break
11876 default: /* Avoid compiler warnings. */
11877 YYCASE_(0, YY_("syntax error"));
11878 YYCASE_(1, YY_("syntax error, unexpected %s"));
11879 YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s"));
11880 YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s"));
11881 YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s"));
11882 YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"));
11883#undef YYCASE_
11884 }
11885
11886 /* Compute error message size. Don't count the "%s"s, but reserve
11887 room for the terminator. */
11888 yysize = yystrlen (yyformat) - 2 * yycount + 1;
11889 {
11890 int yyi;
11891 for (yyi = 0; yyi < yycount; ++yyi)
11892 {
11893 YYPTRDIFF_T yysize1
11894 = yysize + yytnamerr (YY_NULLPTR, yytname[yyarg[yyi]]);
11895 if (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM)
11896 yysize = yysize1;
11897 else
11898 return YYENOMEM;
11899 }
11900 }
11901
11902 if (*yymsg_alloc < yysize)
11903 {
11904 *yymsg_alloc = 2 * yysize;
11905 if (! (yysize <= *yymsg_alloc
11906 && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM))
11907 *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM;
11908 return -1;
11909 }
11910
11911 /* Avoid sprintf, as that infringes on the user's name space.
11912 Don't have undefined behavior even if the translation
11913 produced a string with the wrong number of "%s"s. */
11914 {
11915 char *yyp = *yymsg;
11916 int yyi = 0;
11917 while ((*yyp = *yyformat) != '\0')
11918 if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount)
11919 {
11920 yyp += yytnamerr (yyp, yytname[yyarg[yyi++]]);
11921 yyformat += 2;
11922 }
11923 else
11924 {
11925 ++yyp;
11926 ++yyformat;
11927 }
11928 }
11929 return 0;
11930}
11931
11932
11933/*-----------------------------------------------.
11934| Release the memory associated to this symbol. |
11935`-----------------------------------------------*/
11936
11937static void
11938yydestruct (const char *yymsg,
11939 yysymbol_kind_t yykind, YYSTYPE *yyvaluep, YYLTYPE *yylocationp, struct parser_params *p)
11940{
11941 YY_USE (yyvaluep);
11942 YY_USE (yylocationp);
11943 YY_USE (p);
11944 if (!yymsg)
11945 yymsg = "Deleting";
11946 YY_SYMBOL_PRINT (yymsg, yykind, yyvaluep, yylocationp, p);
11947
11948 YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
11949 switch (yykind)
11950 {
11951 case YYSYMBOL_258_16: /* @16 */
11952#line 2653 "parse.y"
11953 {
11954 if (CASE_LABELS_ENABLED_P(((*yyvaluep).labels))) st_free_table(((*yyvaluep).labels));
11955}
11956#line 11957 "parse.c"
11957 break;
11958
11959 case YYSYMBOL_259_17: /* @17 */
11960#line 2653 "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 default:
11968 break;
11969 }
11970 YY_IGNORE_MAYBE_UNINITIALIZED_END
11971}
11972
11973
11974
11975
11976
11977
11978/*----------.
11979| yyparse. |
11980`----------*/
11981
11982int
11983yyparse (struct parser_params *p)
11984{
11985/* Lookahead token kind. */
11986int yychar;
11987
11988
11989/* The semantic value of the lookahead symbol. */
11990/* Default value used for initialization, for pacifying older GCCs
11991 or non-GCC compilers. */
11992#ifdef __cplusplus
11993static const YYSTYPE yyval_default = {};
11994(void) yyval_default;
11995#else
11996YY_INITIAL_VALUE (static const YYSTYPE yyval_default;)
11997#endif
11998YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default);
11999
12000/* Location data for the lookahead symbol. */
12001static const YYLTYPE yyloc_default
12002# if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL
12003 = { 1, 1, 1, 1 }
12004# endif
12005;
12006YYLTYPE yylloc = yyloc_default;
12007
12008 /* Number of syntax errors so far. */
12009 int yynerrs = 0;
12010 YY_USE (yynerrs); /* Silence compiler warning. */
12011
12012 yy_state_fast_t yystate = 0;
12013 /* Number of tokens to shift before error messages enabled. */
12014 int yyerrstatus = 0;
12015
12016 /* Refer to the stacks through separate pointers, to allow yyoverflow
12017 to reallocate them elsewhere. */
12018
12019 /* Their size. */
12020 YYPTRDIFF_T yystacksize = YYINITDEPTH;
12021
12022 /* The state stack: array, bottom, top. */
12023 yy_state_t yyssa[YYINITDEPTH];
12024 yy_state_t *yyss = yyssa;
12025 yy_state_t *yyssp = yyss;
12026
12027 /* The semantic value stack: array, bottom, top. */
12028 YYSTYPE yyvsa[YYINITDEPTH];
12029 YYSTYPE *yyvs = yyvsa;
12030 YYSTYPE *yyvsp = yyvs;
12031
12032 /* The location stack: array, bottom, top. */
12033 YYLTYPE yylsa[YYINITDEPTH];
12034 YYLTYPE *yyls = yylsa;
12035 YYLTYPE *yylsp = yyls;
12036
12037 int yyn;
12038 /* The return value of yyparse. */
12039 int yyresult;
12040 /* Lookahead symbol kind. */
12041 yysymbol_kind_t yytoken = YYSYMBOL_YYEMPTY;
12042 /* The variables used to return semantic value and location from the
12043 action routines. */
12044 YYSTYPE yyval;
12045 YYLTYPE yyloc;
12046
12047 /* The locations where the error started and ended. */
12048 YYLTYPE yyerror_range[3];
12049
12050 /* Buffer for error messages, and its allocated size. */
12051 char yymsgbuf[128];
12052 char *yymsg = yymsgbuf;
12053 YYPTRDIFF_T yymsg_alloc = sizeof yymsgbuf;
12054
12055#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N), yylsp -= (N))
12056
12057 /* The number of symbols on the RHS of the reduced rule.
12058 Keep to zero when no symbol should be popped. */
12059 int yylen = 0;
12060
12061 YYDPRINTF ((stderr, "Starting parse\n"));
12062
12063 yychar = YYEMPTY; /* Cause a token to be read. */
12064
12065
12066 /* User initialization code. */
12067#line 2660 "parse.y"
12068 {
12069 RUBY_SET_YYLLOC_OF_NONE(yylloc);
12070}
12071
12072#line 12073 "parse.c"
12073
12074 yylsp[0] = yylloc;
12075 goto yysetstate;
12076
12077
12078/*------------------------------------------------------------.
12079| yynewstate -- push a new state, which is found in yystate. |
12080`------------------------------------------------------------*/
12081yynewstate:
12082 /* In all cases, when you get here, the value and location stacks
12083 have just been pushed. So pushing a state here evens the stacks. */
12084 yyssp++;
12085
12086
12087/*--------------------------------------------------------------------.
12088| yysetstate -- set current state (the top of the stack) to yystate. |
12089`--------------------------------------------------------------------*/
12090yysetstate:
12091 YYDPRINTF ((stderr, "Entering state %d\n", yystate));
12092 YY_ASSERT (0 <= yystate && yystate < YYNSTATES);
12093 YY_IGNORE_USELESS_CAST_BEGIN
12094 *yyssp = YY_CAST (yy_state_t, yystate);
12095 YY_IGNORE_USELESS_CAST_END
12096 YY_STACK_PRINT (yyss, yyssp, p);
12097
12098 if (yyss + yystacksize - 1 <= yyssp)
12099#if !defined yyoverflow && !defined YYSTACK_RELOCATE
12100 YYNOMEM;
12101#else
12102 {
12103 /* Get the current used size of the three stacks, in elements. */
12104 YYPTRDIFF_T yysize = yyssp - yyss + 1;
12105
12106# if defined yyoverflow
12107 {
12108 /* Give user a chance to reallocate the stack. Use copies of
12109 these so that the &'s don't force the real ones into
12110 memory. */
12111 yy_state_t *yyss1 = yyss;
12112 YYSTYPE *yyvs1 = yyvs;
12113 YYLTYPE *yyls1 = yyls;
12114
12115 /* Each stack pointer address is followed by the size of the
12116 data in use in that stack, in bytes. This used to be a
12117 conditional around just the two extra args, but that might
12118 be undefined if yyoverflow is a macro. */
12119 yyoverflow (YY_("memory exhausted"),
12120 &yyss1, yysize * YYSIZEOF (*yyssp),
12121 &yyvs1, yysize * YYSIZEOF (*yyvsp),
12122 &yyls1, yysize * YYSIZEOF (*yylsp),
12123 &yystacksize);
12124 yyss = yyss1;
12125 yyvs = yyvs1;
12126 yyls = yyls1;
12127 }
12128# else /* defined YYSTACK_RELOCATE */
12129 /* Extend the stack our own way. */
12130 if (YYMAXDEPTH <= yystacksize)
12131 YYNOMEM;
12132 yystacksize *= 2;
12133 if (YYMAXDEPTH < yystacksize)
12134 yystacksize = YYMAXDEPTH;
12135
12136 {
12137 yy_state_t *yyss1 = yyss;
12138 union yyalloc *yyptr =
12139 YY_CAST (union yyalloc *,
12140 YYSTACK_ALLOC (YY_CAST (YYSIZE_T, YYSTACK_BYTES (yystacksize))));
12141 if (! yyptr)
12142 YYNOMEM;
12143 YYSTACK_RELOCATE (yyss_alloc, yyss);
12144 YYSTACK_RELOCATE (yyvs_alloc, yyvs);
12145 YYSTACK_RELOCATE (yyls_alloc, yyls);
12146# undef YYSTACK_RELOCATE
12147 if (yyss1 != yyssa)
12148 YYSTACK_FREE (yyss1);
12149 }
12150# endif
12151
12152 yyssp = yyss + yysize - 1;
12153 yyvsp = yyvs + yysize - 1;
12154 yylsp = yyls + yysize - 1;
12155
12156 YY_IGNORE_USELESS_CAST_BEGIN
12157 YYDPRINTF ((stderr, "Stack size increased to %ld\n",
12158 YY_CAST (long, yystacksize)));
12159 YY_IGNORE_USELESS_CAST_END
12160
12161 if (yyss + yystacksize - 1 <= yyssp)
12162 YYABORT;
12163 }
12164#endif /* !defined yyoverflow && !defined YYSTACK_RELOCATE */
12165
12166
12167 if (yystate == YYFINAL)
12168 YYACCEPT;
12169
12170 goto yybackup;
12171
12172
12173/*-----------.
12174| yybackup. |
12175`-----------*/
12176yybackup:
12177 /* Do appropriate processing given the current state. Read a
12178 lookahead token if we need one and don't already have one. */
12179
12180 /* First try to decide what to do without reference to lookahead token. */
12181 yyn = yypact[yystate];
12182 if (yypact_value_is_default (yyn))
12183 goto yydefault;
12184
12185 /* Not known => get a lookahead token if don't already have one. */
12186
12187 /* YYCHAR is either empty, or end-of-input, or a valid lookahead. */
12188 if (yychar == YYEMPTY)
12189 {
12190 YYDPRINTF ((stderr, "Reading a token\n"));
12191 yychar = yylex (&yylval, &yylloc, p);
12192 }
12193
12194 if (yychar <= END_OF_INPUT)
12195 {
12196 yychar = END_OF_INPUT;
12197 yytoken = YYSYMBOL_YYEOF;
12198 YYDPRINTF ((stderr, "Now at end of input.\n"));
12199 }
12200 else if (yychar == YYerror)
12201 {
12202 /* The scanner already issued an error message, process directly
12203 to error recovery. But do not keep the error token as
12204 lookahead, it is too special and may lead us to an endless
12205 loop in error recovery. */
12206 yychar = YYUNDEF;
12207 yytoken = YYSYMBOL_YYerror;
12208 yyerror_range[1] = yylloc;
12209 goto yyerrlab1;
12210 }
12211 else
12212 {
12213 yytoken = YYTRANSLATE (yychar);
12214 YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc, p);
12215 }
12216
12217 /* If the proper action on seeing token YYTOKEN is to reduce or to
12218 detect an error, take that action. */
12219 yyn += yytoken;
12220 if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
12221 goto yydefault;
12222 yyn = yytable[yyn];
12223 if (yyn <= 0)
12224 {
12225 if (yytable_value_is_error (yyn))
12226 goto yyerrlab;
12227 yyn = -yyn;
12228 goto yyreduce;
12229 }
12230
12231 /* Count tokens shifted since error; after three, turn off error
12232 status. */
12233 if (yyerrstatus)
12234 yyerrstatus--;
12235
12236 /* Shift the lookahead token. */
12237 YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc, p);
12238 yystate = yyn;
12239 YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
12240 *++yyvsp = yylval;
12241 YY_IGNORE_MAYBE_UNINITIALIZED_END
12242 *++yylsp = yylloc;
12243 /* %after-shift code. */
12244#line 2663 "parse.y"
12245 {after_shift(p);}
12246#line 12247 "parse.c"
12247
12248
12249 /* Discard the shifted token. */
12250 yychar = YYEMPTY;
12251 goto yynewstate;
12252
12253
12254/*-----------------------------------------------------------.
12255| yydefault -- do the default action for the current state. |
12256`-----------------------------------------------------------*/
12257yydefault:
12258 yyn = yydefact[yystate];
12259 if (yyn == 0)
12260 goto yyerrlab;
12261 goto yyreduce;
12262
12263
12264/*-----------------------------.
12265| yyreduce -- do a reduction. |
12266`-----------------------------*/
12267yyreduce:
12268 /* yyn is the number of a rule to reduce with. */
12269 yylen = yyr2[yyn];
12270
12271 /* If YYLEN is nonzero, implement the default value of the action:
12272 '$$ = $1'.
12273
12274 Otherwise, the following line sets YYVAL to garbage.
12275 This behavior is undocumented and Bison
12276 users should not rely upon it. Assigning to YYVAL
12277 unconditionally makes the parser a bit smaller, and it avoids a
12278 GCC warning that YYVAL may be used uninitialized. */
12279 yyval = yyvsp[1-yylen];
12280 /* %before-reduce function. */
12281#line 2664 "parse.y"
12282 {before_reduce(yylen, p);}
12283#line 12284 "parse.c"
12284
12285
12286 /* Default location. */
12287 YYLLOC_DEFAULT (yyloc, (yylsp - yylen), yylen);
12288 yyerror_range[1] = yyloc;
12289 YY_REDUCE_PRINT (yyn, p);
12290 switch (yyn)
12291 {
12292 case 2: /* $@1: %empty */
12293#line 3168 "parse.y"
12294 {
12295 SET_LEX_STATE(EXPR_BEG);
12296 local_push(p, ifndef_ripper(1)+0);
12297 /* jumps are possible in the top-level loop. */
12298 if (!ifndef_ripper(p->do_loop) + 0) init_block_exit(p);
12299 }
12300#line 12301 "parse.c"
12301 break;
12302
12303 case 5: /* compstmt_top_stmts: top_stmts option_terms */
12304#line 2983 "parse.y"
12305 {
12306 void_stmts(p, (yyval.node) = (yyvsp[-1].node));
12307 }
12308#line 12309 "parse.c"
12309 break;
12310
12311 case 6: /* program: $@1 compstmt_top_stmts */
12312#line 3175 "parse.y"
12313 {
12314 if ((yyvsp[0].node) && !compile_for_eval) {
12315 NODE *node = (yyvsp[0].node);
12316 /* last expression should not be void */
12317 if (nd_type_p(node, NODE_BLOCK)) {
12318 while (RNODE_BLOCK(node)->nd_next) {
12319 node = RNODE_BLOCK(node)->nd_next;
12320 }
12321 node = RNODE_BLOCK(node)->nd_head;
12322 }
12323 node = remove_begin(node);
12324 void_expr(p, node);
12325 }
12326 p->eval_tree = NEW_SCOPE(0, block_append(p, p->eval_tree, (yyvsp[0].node)), NULL, &(yyloc));
12327 /*% ripper[final]: program!($:2) %*/
12328 local_pop(p);
12329 }
12330#line 12331 "parse.c"
12331 break;
12332
12333 case 7: /* top_stmts: none */
12334#line 3195 "parse.y"
12335 {
12336 (yyval.node) = NEW_BEGIN(0, &(yyloc));
12337 /*% ripper: stmts_add!(stmts_new!, void_stmt!) %*/
12338 }
12339#line 12340 "parse.c"
12340 break;
12341
12342 case 8: /* top_stmts: top_stmt */
12343#line 3200 "parse.y"
12344 {
12345 (yyval.node) = newline_node((yyvsp[0].node));
12346 /*% ripper: stmts_add!(stmts_new!, $:1) %*/
12347 }
12348#line 12349 "parse.c"
12349 break;
12350
12351 case 9: /* top_stmts: top_stmts terms top_stmt */
12352#line 3205 "parse.y"
12353 {
12354 (yyval.node) = block_append(p, (yyvsp[-2].node), newline_node((yyvsp[0].node)));
12355 /*% ripper: stmts_add!($:1, $:3) %*/
12356 }
12357#line 12358 "parse.c"
12358 break;
12359
12360 case 10: /* top_stmt: stmt */
12361#line 3212 "parse.y"
12362 {
12363 clear_block_exit(p, true);
12364 (yyval.node) = (yyvsp[0].node);
12365 }
12366#line 12367 "parse.c"
12367 break;
12368
12369 case 11: /* top_stmt: "'BEGIN'" begin_block */
12370#line 3217 "parse.y"
12371 {
12372 (yyval.node) = (yyvsp[0].node);
12373 /*% ripper: $:2 %*/
12374 }
12375#line 12376 "parse.c"
12376 break;
12377
12378 case 12: /* block_open: '{' */
12379#line 3223 "parse.y"
12380 {(yyval.node_exits) = init_block_exit(p);}
12381#line 12382 "parse.c"
12382 break;
12383
12384 case 13: /* begin_block: block_open compstmt_top_stmts '}' */
12385#line 3226 "parse.y"
12386 {
12387 restore_block_exit(p, (yyvsp[-2].node_exits));
12388 p->eval_tree_begin = block_append(p, p->eval_tree_begin,
12389 NEW_BEGIN((yyvsp[-1].node), &(yyloc)));
12390 (yyval.node) = NEW_BEGIN(0, &(yyloc));
12391 /*% ripper: BEGIN!($:compstmt) %*/
12392 }
12393#line 12394 "parse.c"
12394 break;
12395
12396 case 14: /* compstmt_stmts: stmts option_terms */
12397#line 2983 "parse.y"
12398 {
12399 void_stmts(p, (yyval.node) = (yyvsp[-1].node));
12400 }
12401#line 12402 "parse.c"
12402 break;
12403
12404 case 15: /* $@2: %empty */
12405#line 3239 "parse.y"
12406 {
12407 if (!(yyvsp[-1].node)) yyerror1(&(yylsp[0]), "else without rescue is useless");
12408 next_rescue_context(&p->ctxt, &(yyvsp[-2].ctxt), after_else);
12409 }
12410#line 12411 "parse.c"
12411 break;
12412
12413 case 16: /* $@3: %empty */
12414#line 3244 "parse.y"
12415 {
12416 next_rescue_context(&p->ctxt, &(yyvsp[-4].ctxt), after_ensure);
12417 }
12418#line 12419 "parse.c"
12419 break;
12420
12421 case 17: /* bodystmt: compstmt_stmts lex_ctxt opt_rescue k_else $@2 compstmt_stmts $@3 opt_ensure */
12422#line 3248 "parse.y"
12423 {
12424 (yyval.node) = new_bodystmt(p, (yyvsp[-7].node), (yyvsp[-5].node), (yyvsp[-2].node), (yyvsp[0].node), &(yyloc));
12425 /*% ripper: bodystmt!($:body, $:opt_rescue, $:elsebody, $:opt_ensure) %*/
12426 }
12427#line 12428 "parse.c"
12428 break;
12429
12430 case 18: /* $@4: %empty */
12431#line 3255 "parse.y"
12432 {
12433 next_rescue_context(&p->ctxt, &(yyvsp[-1].ctxt), after_ensure);
12434 }
12435#line 12436 "parse.c"
12436 break;
12437
12438 case 19: /* bodystmt: compstmt_stmts lex_ctxt opt_rescue $@4 opt_ensure */
12439#line 3259 "parse.y"
12440 {
12441 (yyval.node) = new_bodystmt(p, (yyvsp[-4].node), (yyvsp[-2].node), 0, (yyvsp[0].node), &(yyloc));
12442 /*% ripper: bodystmt!($:body, $:opt_rescue, Qnil, $:opt_ensure) %*/
12443 }
12444#line 12445 "parse.c"
12445 break;
12446
12447 case 20: /* stmts: none */
12448#line 3266 "parse.y"
12449 {
12450 (yyval.node) = NEW_BEGIN(0, &(yyloc));
12451 /*% ripper: stmts_add!(stmts_new!, void_stmt!) %*/
12452 }
12453#line 12454 "parse.c"
12454 break;
12455
12456 case 21: /* stmts: stmt_or_begin */
12457#line 3271 "parse.y"
12458 {
12459 (yyval.node) = newline_node((yyvsp[0].node));
12460 /*% ripper: stmts_add!(stmts_new!, $:1) %*/
12461 }
12462#line 12463 "parse.c"
12463 break;
12464
12465 case 22: /* stmts: stmts terms stmt_or_begin */
12466#line 3276 "parse.y"
12467 {
12468 (yyval.node) = block_append(p, (yyvsp[-2].node), newline_node((yyvsp[0].node)));
12469 /*% ripper: stmts_add!($:1, $:3) %*/
12470 }
12471#line 12472 "parse.c"
12472 break;
12473
12474 case 24: /* $@5: %empty */
12475#line 3284 "parse.y"
12476 {
12477 yyerror1(&(yylsp[0]), "BEGIN is permitted only at toplevel");
12478 }
12479#line 12480 "parse.c"
12480 break;
12481
12482 case 25: /* stmt_or_begin: "'BEGIN'" $@5 begin_block */
12483#line 3288 "parse.y"
12484 {
12485 (yyval.node) = (yyvsp[0].node);
12486 }
12487#line 12488 "parse.c"
12488 break;
12489
12490 case 26: /* allow_exits: %empty */
12491#line 3293 "parse.y"
12492 {(yyval.node_exits) = allow_block_exit(p);}
12493#line 12494 "parse.c"
12494 break;
12495
12496 case 27: /* k_END: "'END'" lex_ctxt */
12497#line 3296 "parse.y"
12498 {
12499 if (p->ctxt.in_def) {
12500 rb_warn0("END in method; use at_exit");
12501 }
12502 (yyval.ctxt) = (yyvsp[0].ctxt);
12503 p->ctxt.in_rescue = before_rescue;
12504 /*% ripper: $:2 %*/
12505 }
12506#line 12507 "parse.c"
12507 break;
12508
12509 case 28: /* $@6: %empty */
12510#line 3305 "parse.y"
12511 {SET_LEX_STATE(EXPR_FNAME|EXPR_FITEM);}
12512#line 12513 "parse.c"
12513 break;
12514
12515 case 29: /* stmt: "'alias'" fitem $@6 fitem */
12516#line 3306 "parse.y"
12517 {
12518 (yyval.node) = NEW_ALIAS((yyvsp[-2].node), (yyvsp[0].node), &(yyloc), &(yylsp[-3]));
12519 /*% ripper: alias!($:new, $:old) %*/
12520 }
12521#line 12522 "parse.c"
12522 break;
12523
12524 case 30: /* stmt: "'alias'" "global variable" "global variable" */
12525#line 3311 "parse.y"
12526 {
12527 (yyval.node) = NEW_VALIAS((yyvsp[-1].id), (yyvsp[0].id), &(yyloc), &(yylsp[-2]));
12528 /*% ripper: var_alias!($:new, $:old) %*/
12529 }
12530#line 12531 "parse.c"
12531 break;
12532
12533 case 31: /* stmt: "'alias'" "global variable" "back reference" */
12534#line 3316 "parse.y"
12535 {
12536 char buf[2];
12537 buf[0] = '$';
12538 buf[1] = (char)RNODE_BACK_REF((yyvsp[0].node))->nd_nth;
12539 (yyval.node) = NEW_VALIAS((yyvsp[-1].id), rb_intern2(buf, 2), &(yyloc), &(yylsp[-2]));
12540 /*% ripper: var_alias!($:new, $:old) %*/
12541 }
12542#line 12543 "parse.c"
12543 break;
12544
12545 case 32: /* stmt: "'alias'" "global variable" "numbered reference" */
12546#line 3324 "parse.y"
12547 {
12548 static const char mesg[] = "can't make alias for the number variables";
12549 /*%%%*/
12550 yyerror1(&(yylsp[0]), mesg);
12551 /*% %*/
12552 (yyval.node) = NEW_ERROR(&(yyloc));
12553 /*% ripper[error]: alias_error!(ERR_MESG(), $:nth) %*/
12554 }
12555#line 12556 "parse.c"
12556 break;
12557
12558 case 33: /* stmt: "'undef'" undef_list */
12559#line 3333 "parse.y"
12560 {
12561 nd_set_first_loc((yyvsp[0].node), (yylsp[-1]).beg_pos);
12562 RNODE_UNDEF((yyvsp[0].node))->keyword_loc = (yylsp[-1]);
12563 (yyval.node) = (yyvsp[0].node);
12564 /*% ripper: undef!($:list) %*/
12565 }
12566#line 12567 "parse.c"
12567 break;
12568
12569 case 34: /* stmt: stmt "'if' modifier" expr_value */
12570#line 3340 "parse.y"
12571 {
12572 (yyval.node) = new_if(p, (yyvsp[0].node), remove_begin((yyvsp[-2].node)), 0, &(yyloc), &(yylsp[-1]), &NULL_LOC, &NULL_LOC);
12573 fixpos((yyval.node), (yyvsp[0].node));
12574 /*% ripper: if_mod!($:cond, $:body) %*/
12575 }
12576#line 12577 "parse.c"
12577 break;
12578
12579 case 35: /* stmt: stmt "'unless' modifier" expr_value */
12580#line 3346 "parse.y"
12581 {
12582 (yyval.node) = new_unless(p, (yyvsp[0].node), remove_begin((yyvsp[-2].node)), 0, &(yyloc), &(yylsp[-1]), &NULL_LOC, &NULL_LOC);
12583 fixpos((yyval.node), (yyvsp[0].node));
12584 /*% ripper: unless_mod!($:cond, $:body) %*/
12585 }
12586#line 12587 "parse.c"
12587 break;
12588
12589 case 36: /* stmt: stmt "'while' modifier" expr_value */
12590#line 3352 "parse.y"
12591 {
12592 clear_block_exit(p, false);
12593 if ((yyvsp[-2].node) && nd_type_p((yyvsp[-2].node), NODE_BEGIN)) {
12594 (yyval.node) = NEW_WHILE(cond(p, (yyvsp[0].node), &(yylsp[0])), RNODE_BEGIN((yyvsp[-2].node))->nd_body, 0, &(yyloc), &(yylsp[-1]), &NULL_LOC);
12595 }
12596 else {
12597 (yyval.node) = NEW_WHILE(cond(p, (yyvsp[0].node), &(yylsp[0])), (yyvsp[-2].node), 1, &(yyloc), &(yylsp[-1]), &NULL_LOC);
12598 }
12599 /*% ripper: while_mod!($:cond_expr, $:body) %*/
12600 }
12601#line 12602 "parse.c"
12602 break;
12603
12604 case 37: /* stmt: stmt "'until' modifier" expr_value */
12605#line 3363 "parse.y"
12606 {
12607 clear_block_exit(p, 0);
12608 if ((yyvsp[-2].node) && nd_type_p((yyvsp[-2].node), NODE_BEGIN)) {
12609 (yyval.node) = NEW_UNTIL(cond(p, (yyvsp[0].node), &(yylsp[0])), RNODE_BEGIN((yyvsp[-2].node))->nd_body, 0, &(yyloc), &(yylsp[-1]), &NULL_LOC);
12610 }
12611 else {
12612 (yyval.node) = NEW_UNTIL(cond(p, (yyvsp[0].node), &(yylsp[0])), (yyvsp[-2].node), 1, &(yyloc), &(yylsp[-1]), &NULL_LOC);
12613 }
12614 /*% ripper: until_mod!($:cond_expr, $:body) %*/
12615 }
12616#line 12617 "parse.c"
12617 break;
12618
12619 case 38: /* stmt: stmt "'rescue' modifier" after_rescue stmt */
12620#line 3374 "parse.y"
12621 {
12622 p->ctxt.in_rescue = (yyvsp[-1].ctxt).in_rescue;
12623 NODE *resq;
12624 YYLTYPE loc = code_loc_gen(&(yylsp[-2]), &(yylsp[0]));
12625 resq = NEW_RESBODY(0, 0, remove_begin((yyvsp[0].node)), 0, &loc);
12626 (yyval.node) = NEW_RESCUE(remove_begin((yyvsp[-3].node)), resq, 0, &(yyloc));
12627 /*% ripper: rescue_mod!($:body, $:resbody) %*/
12628 }
12629#line 12630 "parse.c"
12630 break;
12631
12632 case 39: /* stmt: k_END block_open compstmt_stmts '}' */
12633#line 3383 "parse.y"
12634 {
12635 clear_block_exit(p, true);
12636 restore_block_exit(p, (yyvsp[-2].node_exits));
12637 p->ctxt = (yyvsp[-3].ctxt);
12638 {
12639 NODE *scope = NEW_SCOPE2(0 /* tbl */, 0 /* args */, (yyvsp[-1].node) /* body */, NULL /* parent */, &(yyloc));
12640 (yyval.node) = NEW_POSTEXE(scope, &(yyloc), &(yylsp[-3]), &(yylsp[-2]), &(yylsp[0]));
12641 RNODE_SCOPE(scope)->nd_parent = (yyval.node);
12642 }
12643 /*% ripper: END!($:body) %*/
12644 }
12645#line 12646 "parse.c"
12646 break;
12647
12648 case 41: /* stmt: mlhs '=' lex_ctxt command_call_value */
12649#line 3396 "parse.y"
12650 {
12651 (yyval.node) = node_assign(p, (NODE *)(yyvsp[-3].node_masgn), (yyvsp[0].node), (yyvsp[-1].ctxt), &(yyloc));
12652 /*% ripper: massign!($:lhs, $:rhs) %*/
12653 }
12654#line 12655 "parse.c"
12655 break;
12656
12657 case 42: /* asgn_mrhs: lhs '=' lex_ctxt mrhs */
12658#line 2918 "parse.y"
12659 {
12660 (yyval.node) = node_assign(p, (NODE *)(yyvsp[-3].node), (yyvsp[0].node), (yyvsp[-1].ctxt), &(yyloc));
12661 /*% ripper: assign!($:1, $:4) %*/
12662 }
12663#line 12664 "parse.c"
12664 break;
12665
12666 case 44: /* stmt: mlhs '=' lex_ctxt mrhs_arg "'rescue' modifier" after_rescue stmt */
12667#line 3403 "parse.y"
12668 {
12669 p->ctxt.in_rescue = (yyvsp[-1].ctxt).in_rescue;
12670 YYLTYPE loc = code_loc_gen(&(yylsp[-2]), &(yylsp[0]));
12671 (yyvsp[0].node) = NEW_RESBODY(0, 0, remove_begin((yyvsp[0].node)), 0, &loc);
12672 loc.beg_pos = (yylsp[-3]).beg_pos;
12673 (yyvsp[-3].node) = NEW_RESCUE((yyvsp[-3].node), (yyvsp[0].node), 0, &loc);
12674 (yyval.node) = node_assign(p, (NODE *)(yyvsp[-6].node_masgn), (yyvsp[-3].node), (yyvsp[-4].ctxt), &(yyloc));
12675 /*% ripper: massign!($:lhs, rescue_mod!($:mrhs_arg, $:resbody)) %*/
12676 }
12677#line 12678 "parse.c"
12678 break;
12679
12680 case 45: /* stmt: mlhs '=' lex_ctxt mrhs_arg */
12681#line 3413 "parse.y"
12682 {
12683 (yyval.node) = node_assign(p, (NODE *)(yyvsp[-3].node_masgn), (yyvsp[0].node), (yyvsp[-1].ctxt), &(yyloc));
12684 /*% ripper: massign!($:lhs, $:rhs) %*/
12685 }
12686#line 12687 "parse.c"
12687 break;
12688
12689 case 47: /* stmt: error */
12690#line 3419 "parse.y"
12691 {
12692 (void)yynerrs;
12693 (yyval.node) = NEW_ERROR(&(yyloc));
12694 }
12695#line 12696 "parse.c"
12696 break;
12697
12698 case 48: /* asgn_command_rhs: lhs '=' lex_ctxt command_rhs */
12699#line 2918 "parse.y"
12700 {
12701 (yyval.node) = node_assign(p, (NODE *)(yyvsp[-3].node), (yyvsp[0].node), (yyvsp[-1].ctxt), &(yyloc));
12702 /*% ripper: assign!($:1, $:4) %*/
12703 }
12704#line 12705 "parse.c"
12705 break;
12706
12707 case 50: /* op_asgn_command_rhs: var_lhs "operator-assignment" lex_ctxt command_rhs */
12708#line 3053 "parse.y"
12709 {
12710 (yyval.node) = new_op_assign(p, (yyvsp[-3].node), (yyvsp[-2].id), (yyvsp[0].node), (yyvsp[-1].ctxt), &(yyloc));
12711 /*% ripper: opassign!($:var_lhs, $:tOP_ASGN, $:rhs) %*/
12712 }
12713#line 12714 "parse.c"
12714 break;
12715
12716 case 51: /* op_asgn_command_rhs: primary_value '[' opt_call_args rbracket "operator-assignment" lex_ctxt command_rhs */
12717#line 3058 "parse.y"
12718 {
12719 (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]));
12720 /*% ripper: opassign!(aref_field!($:primary_value, $:opt_call_args), $:tOP_ASGN, $:rhs) %*/
12721 }
12722#line 12723 "parse.c"
12723 break;
12724
12725 case 52: /* op_asgn_command_rhs: primary_value call_op "local variable or method" "operator-assignment" lex_ctxt command_rhs */
12726#line 3063 "parse.y"
12727 {
12728 (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]));
12729 /*% ripper: opassign!(field!($:primary_value, $:call_op, $:tIDENTIFIER), $:tOP_ASGN, $:rhs) %*/
12730 }
12731#line 12732 "parse.c"
12732 break;
12733
12734 case 53: /* op_asgn_command_rhs: primary_value call_op "constant" "operator-assignment" lex_ctxt command_rhs */
12735#line 3068 "parse.y"
12736 {
12737 (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]));
12738 /*% ripper: opassign!(field!($:primary_value, $:call_op, $:tCONSTANT), $:tOP_ASGN, $:rhs) %*/
12739 }
12740#line 12741 "parse.c"
12741 break;
12742
12743 case 54: /* op_asgn_command_rhs: primary_value "::" "local variable or method" "operator-assignment" lex_ctxt command_rhs */
12744#line 3073 "parse.y"
12745 {
12746 (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]));
12747 /*% ripper: opassign!(field!($:primary_value, $:tCOLON2, $:tIDENTIFIER), $:tOP_ASGN, $:rhs) %*/
12748 }
12749#line 12750 "parse.c"
12750 break;
12751
12752 case 55: /* op_asgn_command_rhs: primary_value "::" "constant" "operator-assignment" lex_ctxt command_rhs */
12753#line 3078 "parse.y"
12754 {
12755 YYLTYPE loc = code_loc_gen(&(yylsp[-5]), &(yylsp[-3]));
12756 (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));
12757 /*% ripper: opassign!(const_path_field!($:primary_value, $:tCONSTANT), $:tOP_ASGN, $:rhs) %*/
12758 }
12759#line 12760 "parse.c"
12760 break;
12761
12762 case 56: /* op_asgn_command_rhs: ":: at EXPR_BEG" "constant" "operator-assignment" lex_ctxt command_rhs */
12763#line 3084 "parse.y"
12764 {
12765 YYLTYPE loc = code_loc_gen(&(yylsp[-4]), &(yylsp[-3]));
12766 (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));
12767 /*% ripper: opassign!(top_const_field!($:tCONSTANT), $:tOP_ASGN, $:rhs) %*/
12768 }
12769#line 12770 "parse.c"
12770 break;
12771
12772 case 57: /* op_asgn_command_rhs: backref "operator-assignment" lex_ctxt command_rhs */
12773#line 3090 "parse.y"
12774 {
12775 VALUE MAYBE_UNUSED(e) = rb_backref_error(p, (yyvsp[-3].node));
12776 (yyval.node) = NEW_ERROR(&(yyloc));
12777 /*% ripper[error]: assign_error!(?e, opassign!(var_field!($:backref), $:tOP_ASGN, $:rhs)) %*/
12778 }
12779#line 12780 "parse.c"
12780 break;
12781
12782 case 59: /* def_endless_method_endless_command: defn_head f_opt_paren_args '=' endless_command */
12783#line 2958 "parse.y"
12784 {
12785 endless_method_name(p, (yyvsp[-3].node_def_temp)->nd_mid, &(yylsp[-3]));
12786 restore_defun(p, (yyvsp[-3].node_def_temp));
12787 ((yyval.node) = (yyvsp[-3].node_def_temp)->nd_def)->nd_loc = (yyloc);
12788 (yyvsp[0].node) = new_scope_body(p, (yyvsp[-2].node_args), (yyvsp[0].node), (yyval.node), &(yyloc));
12789 RNODE_DEFN((yyval.node))->nd_defn = (yyvsp[0].node);
12790 /*% ripper: bodystmt!($:bodystmt, Qnil, Qnil, Qnil) %*/
12791 /*% ripper: def!($:head, $:args, $:$) %*/
12792 local_pop(p);
12793 }
12794#line 12795 "parse.c"
12795 break;
12796
12797 case 60: /* def_endless_method_endless_command: defs_head f_opt_paren_args '=' endless_command */
12798#line 2969 "parse.y"
12799 {
12800 endless_method_name(p, (yyvsp[-3].node_def_temp)->nd_mid, &(yylsp[-3]));
12801 restore_defun(p, (yyvsp[-3].node_def_temp));
12802 ((yyval.node) = (yyvsp[-3].node_def_temp)->nd_def)->nd_loc = (yyloc);
12803 (yyvsp[0].node) = new_scope_body(p, (yyvsp[-2].node_args), (yyvsp[0].node), (yyval.node), &(yyloc));
12804 RNODE_DEFS((yyval.node))->nd_defn = (yyvsp[0].node);
12805 /*% ripper: bodystmt!($:bodystmt, Qnil, Qnil, Qnil) %*/
12806 /*% ripper: defs!(*$:head[0..2], $:args, $:$) %*/
12807 local_pop(p);
12808 }
12809#line 12810 "parse.c"
12810 break;
12811
12812 case 63: /* endless_command: endless_command "'rescue' modifier" after_rescue arg */
12813#line 3432 "parse.y"
12814 {
12815 p->ctxt.in_rescue = (yyvsp[-1].ctxt).in_rescue;
12816 (yyval.node) = rescued_expr(p, (yyvsp[-3].node), (yyvsp[0].node), &(yylsp[-3]), &(yylsp[-2]), &(yylsp[0]));
12817 /*% ripper: rescue_mod!($:1, $:4) %*/
12818 }
12819#line 12820 "parse.c"
12820 break;
12821
12822 case 66: /* endless_command: "'not'" option_'\n' endless_command */
12823#line 3438 "parse.y"
12824 {
12825 (yyval.node) = call_uni_op(p, method_cond(p, (yyvsp[0].node), &(yylsp[0])), METHOD_NOT, &(yylsp[-2]), &(yyloc));
12826 /*% ripper: unary!(ID2VAL(idNOT), $:3) %*/
12827 }
12828#line 12829 "parse.c"
12829 break;
12830
12831 case 68: /* command_rhs: command_call_value "'rescue' modifier" after_rescue stmt */
12832#line 3446 "parse.y"
12833 {
12834 p->ctxt.in_rescue = (yyvsp[-1].ctxt).in_rescue;
12835 YYLTYPE loc = code_loc_gen(&(yylsp[-2]), &(yylsp[0]));
12836 (yyval.node) = NEW_RESCUE((yyvsp[-3].node), NEW_RESBODY(0, 0, remove_begin((yyvsp[0].node)), 0, &loc), 0, &(yyloc));
12837 /*% ripper: rescue_mod!($:1, $:4) %*/
12838 }
12839#line 12840 "parse.c"
12840 break;
12841
12842 case 71: /* expr: expr "'and'" expr */
12843#line 3457 "parse.y"
12844 {
12845 (yyval.node) = logop(p, idAND, (yyvsp[-2].node), (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
12846 /*% ripper: binary!($:left, ID2VAL(idAND), $:right) %*/
12847 }
12848#line 12849 "parse.c"
12849 break;
12850
12851 case 72: /* expr: expr "'or'" expr */
12852#line 3462 "parse.y"
12853 {
12854 (yyval.node) = logop(p, idOR, (yyvsp[-2].node), (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
12855 /*% ripper: binary!($:left, ID2VAL(idOR), $:right) %*/
12856 }
12857#line 12858 "parse.c"
12858 break;
12859
12860 case 73: /* expr: "'not'" option_'\n' expr */
12861#line 3467 "parse.y"
12862 {
12863 (yyval.node) = call_uni_op(p, method_cond(p, (yyvsp[0].node), &(yylsp[0])), METHOD_NOT, &(yylsp[-2]), &(yyloc));
12864 /*% ripper: unary!(ID2VAL(idNOT), $:arg) %*/
12865 }
12866#line 12867 "parse.c"
12867 break;
12868
12869 case 74: /* expr: '!' command_call */
12870#line 3472 "parse.y"
12871 {
12872 (yyval.node) = call_uni_op(p, method_cond(p, (yyvsp[0].node), &(yylsp[0])), '!', &(yylsp[-1]), &(yyloc));
12873 /*% ripper: unary!(ID2VAL('\'!\''), $:arg) %*/
12874 }
12875#line 12876 "parse.c"
12876 break;
12877
12878 case 75: /* $@7: %empty */
12879#line 3477 "parse.y"
12880 {
12881 value_expr(p, (yyvsp[-1].node));
12882 }
12883#line 12884 "parse.c"
12884 break;
12885
12886 case 76: /* expr: arg "=>" $@7 p_in_kwarg p_pvtbl p_pktbl p_top_expr_body */
12887#line 3482 "parse.y"
12888 {
12889 pop_pktbl(p, (yyvsp[-1].tbl));
12890 pop_pvtbl(p, (yyvsp[-2].tbl));
12891 p->ctxt.in_kwarg = (yyvsp[-3].ctxt).in_kwarg;
12892 p->ctxt.in_alt_pattern = (yyvsp[-3].ctxt).in_alt_pattern;
12893 p->ctxt.capture_in_pattern = (yyvsp[-3].ctxt).capture_in_pattern;
12894 (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);
12895 /*% ripper: case!($:arg, in!($:body, Qnil, Qnil)) %*/
12896 }
12897#line 12898 "parse.c"
12898 break;
12899
12900 case 77: /* $@8: %empty */
12901#line 3492 "parse.y"
12902 {
12903 value_expr(p, (yyvsp[-1].node));
12904 }
12905#line 12906 "parse.c"
12906 break;
12907
12908 case 78: /* expr: arg "'in'" $@8 p_in_kwarg p_pvtbl p_pktbl p_top_expr_body */
12909#line 3497 "parse.y"
12910 {
12911 pop_pktbl(p, (yyvsp[-1].tbl));
12912 pop_pvtbl(p, (yyvsp[-2].tbl));
12913 p->ctxt.in_kwarg = (yyvsp[-3].ctxt).in_kwarg;
12914 p->ctxt.in_alt_pattern = (yyvsp[-3].ctxt).in_alt_pattern;
12915 p->ctxt.capture_in_pattern = (yyvsp[-3].ctxt).capture_in_pattern;
12916 (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);
12917 /*% ripper: case!($:arg, in!($:body, Qnil, Qnil)) %*/
12918 }
12919#line 12920 "parse.c"
12920 break;
12921
12922 case 80: /* def_name: fname */
12923#line 3510 "parse.y"
12924 {
12925 numparam_name(p, (yyvsp[0].id));
12926 local_push(p, 0);
12927 p->ctxt.in_def = 1;
12928 p->ctxt.in_rescue = before_rescue;
12929 p->ctxt.cant_return = 0;
12930 (yyval.id) = (yyvsp[0].id);
12931 }
12932#line 12933 "parse.c"
12933 break;
12934
12935 case 81: /* defn_head: k_def def_name */
12936#line 3521 "parse.y"
12937 {
12938 (yyval.node_def_temp) = def_head_save(p, (yyvsp[-1].node_def_temp));
12939 (yyval.node_def_temp)->nd_mid = (yyvsp[0].id);
12940 (yyval.node_def_temp)->nd_def = NEW_DEFN((yyvsp[0].id), 0, &(yyloc));
12941 /*% ripper: $:def_name %*/
12942 }
12943#line 12944 "parse.c"
12944 break;
12945
12946 case 82: /* $@9: %empty */
12947#line 3530 "parse.y"
12948 {
12949 SET_LEX_STATE(EXPR_FNAME);
12950 }
12951#line 12952 "parse.c"
12952 break;
12953
12954 case 83: /* defs_head: k_def singleton dot_or_colon $@9 def_name */
12955#line 3534 "parse.y"
12956 {
12957 SET_LEX_STATE(EXPR_ENDFN|EXPR_LABEL); /* force for args */
12958 (yyval.node_def_temp) = def_head_save(p, (yyvsp[-4].node_def_temp));
12959 (yyval.node_def_temp)->nd_mid = (yyvsp[0].id);
12960 (yyval.node_def_temp)->nd_def = NEW_DEFS((yyvsp[-3].node), (yyvsp[0].id), 0, &(yyloc));
12961 /*% ripper: [$:singleton, $:dot_or_colon, $:def_name] %*/
12962 }
12963#line 12964 "parse.c"
12964 break;
12965
12966 case 84: /* value_expr_expr: expr */
12967#line 3153 "parse.y"
12968 {
12969 value_expr(p, (yyvsp[0].node));
12970 (yyval.node) = (yyvsp[0].node);
12971 }
12972#line 12973 "parse.c"
12973 break;
12974
12975 case 86: /* expr_value: error */
12976#line 3545 "parse.y"
12977 {
12978 (yyval.node) = NEW_ERROR(&(yyloc));
12979 }
12980#line 12981 "parse.c"
12981 break;
12982
12983 case 87: /* $@10: %empty */
12984#line 3550 "parse.y"
12985 {COND_PUSH(1);}
12986#line 12987 "parse.c"
12987 break;
12988
12989 case 88: /* $@11: %empty */
12990#line 3550 "parse.y"
12991 {COND_POP();}
12992#line 12993 "parse.c"
12993 break;
12994
12995 case 89: /* expr_value_do: $@10 expr_value do $@11 */
12996#line 3551 "parse.y"
12997 {
12998 (yyval.node) = (yyvsp[-2].node);
12999 /*% ripper: $:2 %*/
13000 }
13001#line 13002 "parse.c"
13002 break;
13003
13004 case 92: /* value_expr_command_call: command_call */
13005#line 3153 "parse.y"
13006 {
13007 value_expr(p, (yyvsp[0].node));
13008 (yyval.node) = (yyvsp[0].node);
13009 }
13010#line 13011 "parse.c"
13011 break;
13012
13013 case 95: /* block_command: block_call call_op2 operation2 command_args */
13014#line 3566 "parse.y"
13015 {
13016 (yyval.node) = new_qcall(p, (yyvsp[-2].id), (yyvsp[-3].node), (yyvsp[-1].id), (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
13017 /*% ripper: method_add_arg!(call!($:1, $:2, $:3), $:4) %*/
13018 }
13019#line 13020 "parse.c"
13020 break;
13021
13022 case 96: /* cmd_brace_block: "{ arg" brace_body '}' */
13023#line 3573 "parse.y"
13024 {
13025 (yyval.node) = (yyvsp[-1].node);
13026 set_embraced_location((yyval.node), &(yylsp[-2]), &(yylsp[0]));
13027 /*% ripper: $:2 %*/
13028 }
13029#line 13030 "parse.c"
13030 break;
13031
13032 case 97: /* fcall: "local variable or method" */
13033#line 3581 "parse.y"
13034 {
13035 (yyval.node_fcall) = NEW_FCALL((yyvsp[0].id), 0, &(yyloc));
13036 /*% ripper: $:1 %*/
13037 }
13038#line 13039 "parse.c"
13039 break;
13040
13041 case 98: /* fcall: "constant" */
13042#line 3581 "parse.y"
13043 {
13044 (yyval.node_fcall) = NEW_FCALL((yyvsp[0].id), 0, &(yyloc));
13045 /*% ripper: $:1 %*/
13046 }
13047#line 13048 "parse.c"
13048 break;
13049
13050 case 99: /* fcall: "method" */
13051#line 3581 "parse.y"
13052 {
13053 (yyval.node_fcall) = NEW_FCALL((yyvsp[0].id), 0, &(yyloc));
13054 /*% ripper: $:1 %*/
13055 }
13056#line 13057 "parse.c"
13057 break;
13058
13059 case 100: /* command: fcall command_args */
13060#line 3588 "parse.y"
13061 {
13062 (yyvsp[-1].node_fcall)->nd_args = (yyvsp[0].node);
13063 nd_set_last_loc((yyvsp[-1].node_fcall), (yylsp[0]).end_pos);
13064 (yyval.node) = (NODE *)(yyvsp[-1].node_fcall);
13065 /*% ripper: command!($:1, $:2) %*/
13066 }
13067#line 13068 "parse.c"
13068 break;
13069
13070 case 101: /* command: fcall command_args cmd_brace_block */
13071#line 3595 "parse.y"
13072 {
13073 block_dup_check(p, (yyvsp[-1].node), (yyvsp[0].node));
13074 (yyvsp[-2].node_fcall)->nd_args = (yyvsp[-1].node);
13075 (yyval.node) = method_add_block(p, (NODE *)(yyvsp[-2].node_fcall), (yyvsp[0].node), &(yyloc));
13076 fixpos((yyval.node), RNODE((yyvsp[-2].node_fcall)));
13077 nd_set_last_loc((yyvsp[-2].node_fcall), (yylsp[-1]).end_pos);
13078 /*% ripper: method_add_block!(command!($:1, $:2), $:3) %*/
13079 }
13080#line 13081 "parse.c"
13081 break;
13082
13083 case 102: /* command: primary_value call_op operation2 command_args */
13084#line 3604 "parse.y"
13085 {
13086 (yyval.node) = new_command_qcall(p, (yyvsp[-2].id), (yyvsp[-3].node), (yyvsp[-1].id), (yyvsp[0].node), 0, &(yylsp[-1]), &(yyloc));
13087 /*% ripper: command_call!($:1, $:2, $:3, $:4) %*/
13088 }
13089#line 13090 "parse.c"
13090 break;
13091
13092 case 103: /* command: primary_value call_op operation2 command_args cmd_brace_block */
13093#line 3609 "parse.y"
13094 {
13095 (yyval.node) = new_command_qcall(p, (yyvsp[-3].id), (yyvsp[-4].node), (yyvsp[-2].id), (yyvsp[-1].node), (yyvsp[0].node), &(yylsp[-2]), &(yyloc));
13096 /*% ripper: method_add_block!(command_call!($:1, $:2, $:3, $:4), $:5) %*/
13097 }
13098#line 13099 "parse.c"
13099 break;
13100
13101 case 104: /* command: primary_value "::" operation2 command_args */
13102#line 3614 "parse.y"
13103 {
13104 (yyval.node) = new_command_qcall(p, idCOLON2, (yyvsp[-3].node), (yyvsp[-1].id), (yyvsp[0].node), 0, &(yylsp[-1]), &(yyloc));
13105 /*% ripper: command_call!($:1, $:2, $:3, $:4) %*/
13106 }
13107#line 13108 "parse.c"
13108 break;
13109
13110 case 105: /* command: primary_value "::" operation2 command_args cmd_brace_block */
13111#line 3619 "parse.y"
13112 {
13113 (yyval.node) = new_command_qcall(p, idCOLON2, (yyvsp[-4].node), (yyvsp[-2].id), (yyvsp[-1].node), (yyvsp[0].node), &(yylsp[-2]), &(yyloc));
13114 /*% ripper: method_add_block!(command_call!($:1, $:2, $:3, $:4), $:5) %*/
13115 }
13116#line 13117 "parse.c"
13117 break;
13118
13119 case 106: /* command: primary_value "::" "constant" '{' brace_body '}' */
13120#line 3624 "parse.y"
13121 {
13122 set_embraced_location((yyvsp[-1].node), &(yylsp[-2]), &(yylsp[0]));
13123 (yyval.node) = new_command_qcall(p, idCOLON2, (yyvsp[-5].node), (yyvsp[-3].id), 0, (yyvsp[-1].node), &(yylsp[-3]), &(yyloc));
13124 /*% ripper: method_add_block!(command_call!($:1, $:2, $:3, Qnil), $:5) %*/
13125 }
13126#line 13127 "parse.c"
13127 break;
13128
13129 case 107: /* command: "'super'" command_args */
13130#line 3630 "parse.y"
13131 {
13132 (yyval.node) = NEW_SUPER((yyvsp[0].node), &(yyloc), &(yylsp[-1]), &NULL_LOC, &NULL_LOC);
13133 fixpos((yyval.node), (yyvsp[0].node));
13134 /*% ripper: super!($:2) %*/
13135 }
13136#line 13137 "parse.c"
13137 break;
13138
13139 case 108: /* command: k_yield command_args */
13140#line 3636 "parse.y"
13141 {
13142 (yyval.node) = NEW_YIELD((yyvsp[0].node), &(yyloc), &(yylsp[-1]), &NULL_LOC, &NULL_LOC);
13143 fixpos((yyval.node), (yyvsp[0].node));
13144 /*% ripper: yield!($:2) %*/
13145 }
13146#line 13147 "parse.c"
13147 break;
13148
13149 case 109: /* command: k_return call_args */
13150#line 3642 "parse.y"
13151 {
13152 (yyval.node) = NEW_RETURN(ret_args(p, (yyvsp[0].node)), &(yyloc), &(yylsp[-1]));
13153 /*% ripper: return!($:2) %*/
13154 }
13155#line 13156 "parse.c"
13156 break;
13157
13158 case 110: /* command: "'break'" call_args */
13159#line 3647 "parse.y"
13160 {
13161 NODE *args = 0;
13162 args = ret_args(p, (yyvsp[0].node));
13163 (yyval.node) = add_block_exit(p, NEW_BREAK(args, &(yyloc), &(yylsp[-1])));
13164 /*% ripper: break!($:2) %*/
13165 }
13166#line 13167 "parse.c"
13167 break;
13168
13169 case 111: /* command: "'next'" call_args */
13170#line 3654 "parse.y"
13171 {
13172 NODE *args = 0;
13173 args = ret_args(p, (yyvsp[0].node));
13174 (yyval.node) = add_block_exit(p, NEW_NEXT(args, &(yyloc), &(yylsp[-1])));
13175 /*% ripper: next!($:2) %*/
13176 }
13177#line 13178 "parse.c"
13178 break;
13179
13180 case 113: /* mlhs: "(" mlhs_inner rparen */
13181#line 3664 "parse.y"
13182 {
13183 (yyval.node_masgn) = (yyvsp[-1].node_masgn);
13184 /*% ripper: mlhs_paren!($:2) %*/
13185 }
13186#line 13187 "parse.c"
13187 break;
13188
13189 case 115: /* mlhs_inner: "(" mlhs_inner rparen */
13190#line 3672 "parse.y"
13191 {
13192 (yyval.node_masgn) = NEW_MASGN(NEW_LIST((NODE *)(yyvsp[-1].node_masgn), &(yyloc)), 0, &(yyloc));
13193 /*% ripper: mlhs_paren!($:2) %*/
13194 }
13195#line 13196 "parse.c"
13196 break;
13197
13198 case 116: /* mlhs_basic: mlhs_head */
13199#line 3679 "parse.y"
13200 {
13201 (yyval.node_masgn) = NEW_MASGN((yyvsp[0].node), 0, &(yyloc));
13202 /*% ripper: $:1 %*/
13203 }
13204#line 13205 "parse.c"
13205 break;
13206
13207 case 117: /* mlhs_basic: mlhs_head mlhs_item */
13208#line 3684 "parse.y"
13209 {
13210 (yyval.node_masgn) = NEW_MASGN(list_append(p, (yyvsp[-1].node), (yyvsp[0].node)), 0, &(yyloc));
13211 /*% ripper: mlhs_add!($:1, $:2) %*/
13212 }
13213#line 13214 "parse.c"
13214 break;
13215
13216 case 118: /* mlhs_basic: mlhs_head "*" mlhs_node */
13217#line 3689 "parse.y"
13218 {
13219 (yyval.node_masgn) = NEW_MASGN((yyvsp[-2].node), (yyvsp[0].node), &(yyloc));
13220 /*% ripper: mlhs_add_star!($:1, $:3) %*/
13221 }
13222#line 13223 "parse.c"
13223 break;
13224
13225 case 119: /* mlhs_items_mlhs_item: mlhs_item */
13226#line 3040 "parse.y"
13227 {
13228 (yyval.node) = NEW_LIST((yyvsp[0].node), &(yyloc));
13229 /*% ripper: mlhs_add!(mlhs_new!, $:1) %*/
13230 }
13231#line 13232 "parse.c"
13232 break;
13233
13234 case 120: /* mlhs_items_mlhs_item: mlhs_items_mlhs_item ',' mlhs_item */
13235#line 3045 "parse.y"
13236 {
13237 (yyval.node) = list_append(p, (yyvsp[-2].node), (yyvsp[0].node));
13238 /*% ripper: mlhs_add!($:1, $:3) %*/
13239 }
13240#line 13241 "parse.c"
13241 break;
13242
13243 case 121: /* mlhs_basic: mlhs_head "*" mlhs_node ',' mlhs_items_mlhs_item */
13244#line 3694 "parse.y"
13245 {
13246 (yyval.node_masgn) = NEW_MASGN((yyvsp[-4].node), NEW_POSTARG((yyvsp[-2].node),(yyvsp[0].node),&(yyloc)), &(yyloc));
13247 /*% ripper: mlhs_add_post!(mlhs_add_star!($:1, $:3), $:5) %*/
13248 }
13249#line 13250 "parse.c"
13250 break;
13251
13252 case 122: /* mlhs_basic: mlhs_head "*" */
13253#line 3699 "parse.y"
13254 {
13255 (yyval.node_masgn) = NEW_MASGN((yyvsp[-1].node), NODE_SPECIAL_NO_NAME_REST, &(yyloc));
13256 /*% ripper: mlhs_add_star!($:1, Qnil) %*/
13257 }
13258#line 13259 "parse.c"
13259 break;
13260
13261 case 123: /* mlhs_basic: mlhs_head "*" ',' mlhs_items_mlhs_item */
13262#line 3704 "parse.y"
13263 {
13264 (yyval.node_masgn) = NEW_MASGN((yyvsp[-3].node), NEW_POSTARG(NODE_SPECIAL_NO_NAME_REST, (yyvsp[0].node), &(yyloc)), &(yyloc));
13265 /*% ripper: mlhs_add_post!(mlhs_add_star!($:1, Qnil), $:4) %*/
13266 }
13267#line 13268 "parse.c"
13268 break;
13269
13270 case 124: /* mlhs_basic: "*" mlhs_node */
13271#line 3709 "parse.y"
13272 {
13273 (yyval.node_masgn) = NEW_MASGN(0, (yyvsp[0].node), &(yyloc));
13274 /*% ripper: mlhs_add_star!(mlhs_new!, $:2) %*/
13275 }
13276#line 13277 "parse.c"
13277 break;
13278
13279 case 125: /* mlhs_basic: "*" mlhs_node ',' mlhs_items_mlhs_item */
13280#line 3714 "parse.y"
13281 {
13282 (yyval.node_masgn) = NEW_MASGN(0, NEW_POSTARG((yyvsp[-2].node),(yyvsp[0].node),&(yyloc)), &(yyloc));
13283 /*% ripper: mlhs_add_post!(mlhs_add_star!(mlhs_new!, $:2), $:4) %*/
13284 }
13285#line 13286 "parse.c"
13286 break;
13287
13288 case 126: /* mlhs_basic: "*" */
13289#line 3719 "parse.y"
13290 {
13291 (yyval.node_masgn) = NEW_MASGN(0, NODE_SPECIAL_NO_NAME_REST, &(yyloc));
13292 /*% ripper: mlhs_add_star!(mlhs_new!, Qnil) %*/
13293 }
13294#line 13295 "parse.c"
13295 break;
13296
13297 case 127: /* mlhs_basic: "*" ',' mlhs_items_mlhs_item */
13298#line 3724 "parse.y"
13299 {
13300 (yyval.node_masgn) = NEW_MASGN(0, NEW_POSTARG(NODE_SPECIAL_NO_NAME_REST, (yyvsp[0].node), &(yyloc)), &(yyloc));
13301 /*% ripper: mlhs_add_post!(mlhs_add_star!(mlhs_new!, Qnil), $:3) %*/
13302 }
13303#line 13304 "parse.c"
13304 break;
13305
13306 case 129: /* mlhs_item: "(" mlhs_inner rparen */
13307#line 3732 "parse.y"
13308 {
13309 (yyval.node) = (NODE *)(yyvsp[-1].node_masgn);
13310 /*% ripper: mlhs_paren!($:2) %*/
13311 }
13312#line 13313 "parse.c"
13313 break;
13314
13315 case 130: /* mlhs_head: mlhs_item ',' */
13316#line 3739 "parse.y"
13317 {
13318 (yyval.node) = NEW_LIST((yyvsp[-1].node), &(yylsp[-1]));
13319 /*% ripper: mlhs_add!(mlhs_new!, $:1) %*/
13320 }
13321#line 13322 "parse.c"
13322 break;
13323
13324 case 131: /* mlhs_head: mlhs_head mlhs_item ',' */
13325#line 3744 "parse.y"
13326 {
13327 (yyval.node) = list_append(p, (yyvsp[-2].node), (yyvsp[-1].node));
13328 /*% ripper: mlhs_add!($:1, $:2) %*/
13329 }
13330#line 13331 "parse.c"
13331 break;
13332
13333 case 132: /* mlhs_node: user_variable */
13334#line 3752 "parse.y"
13335 {
13336 /*% ripper: var_field!($:1) %*/
13337 (yyval.node) = assignable(p, (yyvsp[0].id), 0, &(yyloc));
13338 }
13339#line 13340 "parse.c"
13340 break;
13341
13342 case 133: /* mlhs_node: keyword_variable */
13343#line 3752 "parse.y"
13344 {
13345 /*% ripper: var_field!($:1) %*/
13346 (yyval.node) = assignable(p, (yyvsp[0].id), 0, &(yyloc));
13347 }
13348#line 13349 "parse.c"
13349 break;
13350
13351 case 134: /* mlhs_node: primary_value '[' opt_call_args rbracket */
13352#line 3757 "parse.y"
13353 {
13354 (yyval.node) = aryset(p, (yyvsp[-3].node), (yyvsp[-1].node), &(yyloc));
13355 /*% ripper: aref_field!($:1, $:3) %*/
13356 }
13357#line 13358 "parse.c"
13358 break;
13359
13360 case 135: /* mlhs_node: primary_value call_op "local variable or method" */
13361#line 3762 "parse.y"
13362 {
13363 anddot_multiple_assignment_check(p, &(yylsp[-1]), (yyvsp[-1].id));
13364 (yyval.node) = attrset(p, (yyvsp[-2].node), (yyvsp[-1].id), (yyvsp[0].id), &(yyloc));
13365 /*% ripper: field!($:1, $:2, $:3) %*/
13366 }
13367#line 13368 "parse.c"
13368 break;
13369
13370 case 136: /* mlhs_node: primary_value call_op "constant" */
13371#line 3762 "parse.y"
13372 {
13373 anddot_multiple_assignment_check(p, &(yylsp[-1]), (yyvsp[-1].id));
13374 (yyval.node) = attrset(p, (yyvsp[-2].node), (yyvsp[-1].id), (yyvsp[0].id), &(yyloc));
13375 /*% ripper: field!($:1, $:2, $:3) %*/
13376 }
13377#line 13378 "parse.c"
13378 break;
13379
13380 case 137: /* mlhs_node: primary_value "::" "local variable or method" */
13381#line 3768 "parse.y"
13382 {
13383 (yyval.node) = attrset(p, (yyvsp[-2].node), idCOLON2, (yyvsp[0].id), &(yyloc));
13384 /*% ripper: const_path_field!($:1, $:3) %*/
13385 }
13386#line 13387 "parse.c"
13387 break;
13388
13389 case 138: /* mlhs_node: primary_value "::" "constant" */
13390#line 3773 "parse.y"
13391 {
13392 /*% ripper: const_path_field!($:1, $:3) %*/
13393 (yyval.node) = const_decl(p, NEW_COLON2((yyvsp[-2].node), (yyvsp[0].id), &(yyloc), &(yylsp[-1]), &(yylsp[0])), &(yyloc));
13394 }
13395#line 13396 "parse.c"
13396 break;
13397
13398 case 139: /* mlhs_node: ":: at EXPR_BEG" "constant" */
13399#line 3778 "parse.y"
13400 {
13401 /*% ripper: top_const_field!($:2) %*/
13402 (yyval.node) = const_decl(p, NEW_COLON3((yyvsp[0].id), &(yyloc), &(yylsp[-1]), &(yylsp[0])), &(yyloc));
13403 }
13404#line 13405 "parse.c"
13405 break;
13406
13407 case 140: /* mlhs_node: backref */
13408#line 3783 "parse.y"
13409 {
13410 VALUE MAYBE_UNUSED(e) = rb_backref_error(p, (yyvsp[0].node));
13411 (yyval.node) = NEW_ERROR(&(yyloc));
13412 /*% ripper[error]: assign_error!(?e, var_field!($:1)) %*/
13413 }
13414#line 13415 "parse.c"
13415 break;
13416
13417 case 141: /* lhs: user_variable */
13418#line 3791 "parse.y"
13419 {
13420 /*% ripper: var_field!($:1) %*/
13421 (yyval.node) = assignable(p, (yyvsp[0].id), 0, &(yyloc));
13422 }
13423#line 13424 "parse.c"
13424 break;
13425
13426 case 142: /* lhs: keyword_variable */
13427#line 3791 "parse.y"
13428 {
13429 /*% ripper: var_field!($:1) %*/
13430 (yyval.node) = assignable(p, (yyvsp[0].id), 0, &(yyloc));
13431 }
13432#line 13433 "parse.c"
13433 break;
13434
13435 case 143: /* lhs: primary_value '[' opt_call_args rbracket */
13436#line 3796 "parse.y"
13437 {
13438 (yyval.node) = aryset(p, (yyvsp[-3].node), (yyvsp[-1].node), &(yyloc));
13439 /*% ripper: aref_field!($:1, $:3) %*/
13440 }
13441#line 13442 "parse.c"
13442 break;
13443
13444 case 144: /* lhs: primary_value call_op "local variable or method" */
13445#line 3801 "parse.y"
13446 {
13447 (yyval.node) = attrset(p, (yyvsp[-2].node), (yyvsp[-1].id), (yyvsp[0].id), &(yyloc));
13448 /*% ripper: field!($:1, $:2, $:3) %*/
13449 }
13450#line 13451 "parse.c"
13451 break;
13452
13453 case 145: /* lhs: primary_value call_op "constant" */
13454#line 3801 "parse.y"
13455 {
13456 (yyval.node) = attrset(p, (yyvsp[-2].node), (yyvsp[-1].id), (yyvsp[0].id), &(yyloc));
13457 /*% ripper: field!($:1, $:2, $:3) %*/
13458 }
13459#line 13460 "parse.c"
13460 break;
13461
13462 case 146: /* lhs: primary_value "::" "local variable or method" */
13463#line 3806 "parse.y"
13464 {
13465 (yyval.node) = attrset(p, (yyvsp[-2].node), idCOLON2, (yyvsp[0].id), &(yyloc));
13466 /*% ripper: field!($:1, $:2, $:3) %*/
13467 }
13468#line 13469 "parse.c"
13469 break;
13470
13471 case 147: /* lhs: primary_value "::" "constant" */
13472#line 3811 "parse.y"
13473 {
13474 /*% ripper: const_path_field!($:1, $:3) %*/
13475 (yyval.node) = const_decl(p, NEW_COLON2((yyvsp[-2].node), (yyvsp[0].id), &(yyloc), &(yylsp[-1]), &(yylsp[0])), &(yyloc));
13476 }
13477#line 13478 "parse.c"
13478 break;
13479
13480 case 148: /* lhs: ":: at EXPR_BEG" "constant" */
13481#line 3816 "parse.y"
13482 {
13483 /*% ripper: top_const_field!($:2) %*/
13484 (yyval.node) = const_decl(p, NEW_COLON3((yyvsp[0].id), &(yyloc), &(yylsp[-1]), &(yylsp[0])), &(yyloc));
13485 }
13486#line 13487 "parse.c"
13487 break;
13488
13489 case 149: /* lhs: backref */
13490#line 3821 "parse.y"
13491 {
13492 VALUE MAYBE_UNUSED(e) = rb_backref_error(p, (yyvsp[0].node));
13493 (yyval.node) = NEW_ERROR(&(yyloc));
13494 /*% ripper[error]: assign_error!(?e, var_field!($:1)) %*/
13495 }
13496#line 13497 "parse.c"
13497 break;
13498
13499 case 150: /* cname: "local variable or method" */
13500#line 3829 "parse.y"
13501 {
13502 static const char mesg[] = "class/module name must be CONSTANT";
13503 /*%%%*/
13504 yyerror1(&(yylsp[0]), mesg);
13505 /*% %*/
13506 /*% ripper[error]: class_name_error!(ERR_MESG(), $:1) %*/
13507 }
13508#line 13509 "parse.c"
13509 break;
13510
13511 case 152: /* cpath: ":: at EXPR_BEG" cname */
13512#line 3840 "parse.y"
13513 {
13514 (yyval.node) = NEW_COLON3((yyvsp[0].id), &(yyloc), &(yylsp[-1]), &(yylsp[0]));
13515 /*% ripper: top_const_ref!($:2) %*/
13516 }
13517#line 13518 "parse.c"
13518 break;
13519
13520 case 153: /* cpath: cname */
13521#line 3845 "parse.y"
13522 {
13523 (yyval.node) = NEW_COLON2(0, (yyvsp[0].id), &(yyloc), &NULL_LOC, &(yylsp[0]));
13524 /*% ripper: const_ref!($:1) %*/
13525 }
13526#line 13527 "parse.c"
13527 break;
13528
13529 case 154: /* cpath: primary_value "::" cname */
13530#line 3850 "parse.y"
13531 {
13532 (yyval.node) = NEW_COLON2((yyvsp[-2].node), (yyvsp[0].id), &(yyloc), &(yylsp[-1]), &(yylsp[0]));
13533 /*% ripper: const_path_ref!($:1, $:3) %*/
13534 }
13535#line 13536 "parse.c"
13536 break;
13537
13538 case 158: /* fname: op */
13539#line 3858 "parse.y"
13540 {
13541 SET_LEX_STATE(EXPR_ENDFN);
13542 (yyval.id) = (yyvsp[0].id);
13543 }
13544#line 13545 "parse.c"
13545 break;
13546
13547 case 160: /* fitem: fname */
13548#line 3866 "parse.y"
13549 {
13550 (yyval.node) = NEW_SYM(rb_id2str((yyvsp[0].id)), &(yyloc));
13551 /*% ripper: symbol_literal!($:1) %*/
13552 }
13553#line 13554 "parse.c"
13554 break;
13555
13556 case 162: /* undef_list: fitem */
13557#line 3874 "parse.y"
13558 {
13559 (yyval.node) = NEW_UNDEF((yyvsp[0].node), &(yyloc));
13560 /*% ripper: rb_ary_new3(1, $:1) %*/
13561 }
13562#line 13563 "parse.c"
13563 break;
13564
13565 case 163: /* $@12: %empty */
13566#line 3878 "parse.y"
13567 {SET_LEX_STATE(EXPR_FNAME|EXPR_FITEM);}
13568#line 13569 "parse.c"
13569 break;
13570
13571 case 164: /* undef_list: undef_list ',' $@12 fitem */
13572#line 3879 "parse.y"
13573 {
13574 nd_set_last_loc((yyvsp[-3].node), (yylsp[0]).end_pos);
13575 rb_parser_ary_push_node(p, RNODE_UNDEF((yyvsp[-3].node))->nd_undefs, (yyvsp[0].node));
13576 /*% ripper: rb_ary_push($:1, $:4) %*/
13577 }
13578#line 13579 "parse.c"
13579 break;
13580
13581 case 165: /* op: '|' */
13582#line 3886 "parse.y"
13583 { (yyval.id) = '|'; }
13584#line 13585 "parse.c"
13585 break;
13586
13587 case 166: /* op: '^' */
13588#line 3887 "parse.y"
13589 { (yyval.id) = '^'; }
13590#line 13591 "parse.c"
13591 break;
13592
13593 case 167: /* op: '&' */
13594#line 3888 "parse.y"
13595 { (yyval.id) = '&'; }
13596#line 13597 "parse.c"
13597 break;
13598
13599 case 168: /* op: "<=>" */
13600#line 3889 "parse.y"
13601 { (yyval.id) = tCMP; }
13602#line 13603 "parse.c"
13603 break;
13604
13605 case 169: /* op: "==" */
13606#line 3890 "parse.y"
13607 { (yyval.id) = tEQ; }
13608#line 13609 "parse.c"
13609 break;
13610
13611 case 170: /* op: "===" */
13612#line 3891 "parse.y"
13613 { (yyval.id) = tEQQ; }
13614#line 13615 "parse.c"
13615 break;
13616
13617 case 171: /* op: "=~" */
13618#line 3892 "parse.y"
13619 { (yyval.id) = tMATCH; }
13620#line 13621 "parse.c"
13621 break;
13622
13623 case 172: /* op: "!~" */
13624#line 3893 "parse.y"
13625 { (yyval.id) = tNMATCH; }
13626#line 13627 "parse.c"
13627 break;
13628
13629 case 173: /* op: '>' */
13630#line 3894 "parse.y"
13631 { (yyval.id) = '>'; }
13632#line 13633 "parse.c"
13633 break;
13634
13635 case 174: /* op: ">=" */
13636#line 3895 "parse.y"
13637 { (yyval.id) = tGEQ; }
13638#line 13639 "parse.c"
13639 break;
13640
13641 case 175: /* op: '<' */
13642#line 3896 "parse.y"
13643 { (yyval.id) = '<'; }
13644#line 13645 "parse.c"
13645 break;
13646
13647 case 176: /* op: "<=" */
13648#line 3897 "parse.y"
13649 { (yyval.id) = tLEQ; }
13650#line 13651 "parse.c"
13651 break;
13652
13653 case 177: /* op: "!=" */
13654#line 3898 "parse.y"
13655 { (yyval.id) = tNEQ; }
13656#line 13657 "parse.c"
13657 break;
13658
13659 case 178: /* op: "<<" */
13660#line 3899 "parse.y"
13661 { (yyval.id) = tLSHFT; }
13662#line 13663 "parse.c"
13663 break;
13664
13665 case 179: /* op: ">>" */
13666#line 3900 "parse.y"
13667 { (yyval.id) = tRSHFT; }
13668#line 13669 "parse.c"
13669 break;
13670
13671 case 180: /* op: '+' */
13672#line 3901 "parse.y"
13673 { (yyval.id) = '+'; }
13674#line 13675 "parse.c"
13675 break;
13676
13677 case 181: /* op: '-' */
13678#line 3902 "parse.y"
13679 { (yyval.id) = '-'; }
13680#line 13681 "parse.c"
13681 break;
13682
13683 case 182: /* op: '*' */
13684#line 3903 "parse.y"
13685 { (yyval.id) = '*'; }
13686#line 13687 "parse.c"
13687 break;
13688
13689 case 183: /* op: "*" */
13690#line 3904 "parse.y"
13691 { (yyval.id) = '*'; }
13692#line 13693 "parse.c"
13693 break;
13694
13695 case 184: /* op: '/' */
13696#line 3905 "parse.y"
13697 { (yyval.id) = '/'; }
13698#line 13699 "parse.c"
13699 break;
13700
13701 case 185: /* op: '%' */
13702#line 3906 "parse.y"
13703 { (yyval.id) = '%'; }
13704#line 13705 "parse.c"
13705 break;
13706
13707 case 186: /* op: "**" */
13708#line 3907 "parse.y"
13709 { (yyval.id) = tPOW; }
13710#line 13711 "parse.c"
13711 break;
13712
13713 case 187: /* op: "**arg" */
13714#line 3908 "parse.y"
13715 { (yyval.id) = tDSTAR; }
13716#line 13717 "parse.c"
13717 break;
13718
13719 case 188: /* op: '!' */
13720#line 3909 "parse.y"
13721 { (yyval.id) = '!'; }
13722#line 13723 "parse.c"
13723 break;
13724
13725 case 189: /* op: '~' */
13726#line 3910 "parse.y"
13727 { (yyval.id) = '~'; }
13728#line 13729 "parse.c"
13729 break;
13730
13731 case 190: /* op: "unary+" */
13732#line 3911 "parse.y"
13733 { (yyval.id) = tUPLUS; }
13734#line 13735 "parse.c"
13735 break;
13736
13737 case 191: /* op: "unary-" */
13738#line 3912 "parse.y"
13739 { (yyval.id) = tUMINUS; }
13740#line 13741 "parse.c"
13741 break;
13742
13743 case 192: /* op: "[]" */
13744#line 3913 "parse.y"
13745 { (yyval.id) = tAREF; }
13746#line 13747 "parse.c"
13747 break;
13748
13749 case 193: /* op: "[]=" */
13750#line 3914 "parse.y"
13751 { (yyval.id) = tASET; }
13752#line 13753 "parse.c"
13753 break;
13754
13755 case 194: /* op: '`' */
13756#line 3915 "parse.y"
13757 { (yyval.id) = '`'; }
13758#line 13759 "parse.c"
13759 break;
13760
13761 case 236: /* asgn_arg_rhs: lhs '=' lex_ctxt arg_rhs */
13762#line 2918 "parse.y"
13763 {
13764 (yyval.node) = node_assign(p, (NODE *)(yyvsp[-3].node), (yyvsp[0].node), (yyvsp[-1].ctxt), &(yyloc));
13765 /*% ripper: assign!($:1, $:4) %*/
13766 }
13767#line 13768 "parse.c"
13768 break;
13769
13770 case 238: /* op_asgn_arg_rhs: var_lhs "operator-assignment" lex_ctxt arg_rhs */
13771#line 3053 "parse.y"
13772 {
13773 (yyval.node) = new_op_assign(p, (yyvsp[-3].node), (yyvsp[-2].id), (yyvsp[0].node), (yyvsp[-1].ctxt), &(yyloc));
13774 /*% ripper: opassign!($:var_lhs, $:tOP_ASGN, $:rhs) %*/
13775 }
13776#line 13777 "parse.c"
13777 break;
13778
13779 case 239: /* op_asgn_arg_rhs: primary_value '[' opt_call_args rbracket "operator-assignment" lex_ctxt arg_rhs */
13780#line 3058 "parse.y"
13781 {
13782 (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]));
13783 /*% ripper: opassign!(aref_field!($:primary_value, $:opt_call_args), $:tOP_ASGN, $:rhs) %*/
13784 }
13785#line 13786 "parse.c"
13786 break;
13787
13788 case 240: /* op_asgn_arg_rhs: primary_value call_op "local variable or method" "operator-assignment" lex_ctxt arg_rhs */
13789#line 3063 "parse.y"
13790 {
13791 (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]));
13792 /*% ripper: opassign!(field!($:primary_value, $:call_op, $:tIDENTIFIER), $:tOP_ASGN, $:rhs) %*/
13793 }
13794#line 13795 "parse.c"
13795 break;
13796
13797 case 241: /* op_asgn_arg_rhs: primary_value call_op "constant" "operator-assignment" lex_ctxt arg_rhs */
13798#line 3068 "parse.y"
13799 {
13800 (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]));
13801 /*% ripper: opassign!(field!($:primary_value, $:call_op, $:tCONSTANT), $:tOP_ASGN, $:rhs) %*/
13802 }
13803#line 13804 "parse.c"
13804 break;
13805
13806 case 242: /* op_asgn_arg_rhs: primary_value "::" "local variable or method" "operator-assignment" lex_ctxt arg_rhs */
13807#line 3073 "parse.y"
13808 {
13809 (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]));
13810 /*% ripper: opassign!(field!($:primary_value, $:tCOLON2, $:tIDENTIFIER), $:tOP_ASGN, $:rhs) %*/
13811 }
13812#line 13813 "parse.c"
13813 break;
13814
13815 case 243: /* op_asgn_arg_rhs: primary_value "::" "constant" "operator-assignment" lex_ctxt arg_rhs */
13816#line 3078 "parse.y"
13817 {
13818 YYLTYPE loc = code_loc_gen(&(yylsp[-5]), &(yylsp[-3]));
13819 (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));
13820 /*% ripper: opassign!(const_path_field!($:primary_value, $:tCONSTANT), $:tOP_ASGN, $:rhs) %*/
13821 }
13822#line 13823 "parse.c"
13823 break;
13824
13825 case 244: /* op_asgn_arg_rhs: ":: at EXPR_BEG" "constant" "operator-assignment" lex_ctxt arg_rhs */
13826#line 3084 "parse.y"
13827 {
13828 YYLTYPE loc = code_loc_gen(&(yylsp[-4]), &(yylsp[-3]));
13829 (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));
13830 /*% ripper: opassign!(top_const_field!($:tCONSTANT), $:tOP_ASGN, $:rhs) %*/
13831 }
13832#line 13833 "parse.c"
13833 break;
13834
13835 case 245: /* op_asgn_arg_rhs: backref "operator-assignment" lex_ctxt arg_rhs */
13836#line 3090 "parse.y"
13837 {
13838 VALUE MAYBE_UNUSED(e) = rb_backref_error(p, (yyvsp[-3].node));
13839 (yyval.node) = NEW_ERROR(&(yyloc));
13840 /*% ripper[error]: assign_error!(?e, opassign!(var_field!($:backref), $:tOP_ASGN, $:rhs)) %*/
13841 }
13842#line 13843 "parse.c"
13843 break;
13844
13845 case 247: /* range_expr_arg: arg ".." arg */
13846#line 3112 "parse.y"
13847 {
13848 value_expr(p, (yyvsp[-2].node));
13849 value_expr(p, (yyvsp[0].node));
13850 (yyval.node) = NEW_DOT2((yyvsp[-2].node), (yyvsp[0].node), &(yyloc), &(yylsp[-1]));
13851 /*% ripper: dot2!($:1, $:3) %*/
13852 }
13853#line 13854 "parse.c"
13854 break;
13855
13856 case 248: /* range_expr_arg: arg "..." arg */
13857#line 3119 "parse.y"
13858 {
13859 value_expr(p, (yyvsp[-2].node));
13860 value_expr(p, (yyvsp[0].node));
13861 (yyval.node) = NEW_DOT3((yyvsp[-2].node), (yyvsp[0].node), &(yyloc), &(yylsp[-1]));
13862 /*% ripper: dot3!($:1, $:3) %*/
13863 }
13864#line 13865 "parse.c"
13865 break;
13866
13867 case 249: /* range_expr_arg: arg ".." */
13868#line 3126 "parse.y"
13869 {
13870 value_expr(p, (yyvsp[-1].node));
13871 (yyval.node) = NEW_DOT2((yyvsp[-1].node), new_nil_at(p, &(yylsp[0]).end_pos), &(yyloc), &(yylsp[0]));
13872 /*% ripper: dot2!($:1, Qnil) %*/
13873 }
13874#line 13875 "parse.c"
13875 break;
13876
13877 case 250: /* range_expr_arg: arg "..." */
13878#line 3132 "parse.y"
13879 {
13880 value_expr(p, (yyvsp[-1].node));
13881 (yyval.node) = NEW_DOT3((yyvsp[-1].node), new_nil_at(p, &(yylsp[0]).end_pos), &(yyloc), &(yylsp[0]));
13882 /*% ripper: dot3!($:1, Qnil) %*/
13883 }
13884#line 13885 "parse.c"
13885 break;
13886
13887 case 251: /* range_expr_arg: "(.." arg */
13888#line 3138 "parse.y"
13889 {
13890 value_expr(p, (yyvsp[0].node));
13891 (yyval.node) = NEW_DOT2(new_nil_at(p, &(yylsp[-1]).beg_pos), (yyvsp[0].node), &(yyloc), &(yylsp[-1]));
13892 /*% ripper: dot2!(Qnil, $:2) %*/
13893 }
13894#line 13895 "parse.c"
13895 break;
13896
13897 case 252: /* range_expr_arg: "(..." arg */
13898#line 3144 "parse.y"
13899 {
13900 value_expr(p, (yyvsp[0].node));
13901 (yyval.node) = NEW_DOT3(new_nil_at(p, &(yylsp[-1]).beg_pos), (yyvsp[0].node), &(yyloc), &(yylsp[-1]));
13902 /*% ripper: dot3!(Qnil, $:2) %*/
13903 }
13904#line 13905 "parse.c"
13905 break;
13906
13907 case 254: /* arg: arg '+' arg */
13908#line 3936 "parse.y"
13909 {
13910 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), '+', (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
13911 /*% ripper: binary!($:1, ID2VAL('\'+\''), $:3) %*/
13912 }
13913#line 13914 "parse.c"
13914 break;
13915
13916 case 255: /* arg: arg '-' arg */
13917#line 3941 "parse.y"
13918 {
13919 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), '-', (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
13920 /*% ripper: binary!($:1, ID2VAL('\'-\''), $:3) %*/
13921 }
13922#line 13923 "parse.c"
13923 break;
13924
13925 case 256: /* arg: arg '*' arg */
13926#line 3946 "parse.y"
13927 {
13928 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), '*', (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
13929 /*% ripper: binary!($:1, ID2VAL('\'*\''), $:3) %*/
13930 }
13931#line 13932 "parse.c"
13932 break;
13933
13934 case 257: /* arg: arg '/' arg */
13935#line 3951 "parse.y"
13936 {
13937 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), '/', (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
13938 /*% ripper: binary!($:1, ID2VAL('\'/\''), $:3) %*/
13939 }
13940#line 13941 "parse.c"
13941 break;
13942
13943 case 258: /* arg: arg '%' arg */
13944#line 3956 "parse.y"
13945 {
13946 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), '%', (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
13947 /*% ripper: binary!($:1, ID2VAL('\'%\''), $:3) %*/
13948 }
13949#line 13950 "parse.c"
13950 break;
13951
13952 case 259: /* arg: arg "**" arg */
13953#line 3961 "parse.y"
13954 {
13955 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), idPow, (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
13956 /*% ripper: binary!($:1, ID2VAL(idPow), $:3) %*/
13957 }
13958#line 13959 "parse.c"
13959 break;
13960
13961 case 260: /* arg: tUMINUS_NUM simple_numeric "**" arg */
13962#line 3966 "parse.y"
13963 {
13964 (yyval.node) = call_uni_op(p, call_bin_op(p, (yyvsp[-2].node), idPow, (yyvsp[0].node), &(yylsp[-2]), &(yyloc)), idUMinus, &(yylsp[-3]), &(yyloc));
13965 /*% ripper: unary!(ID2VAL(idUMinus), binary!($:2, ID2VAL(idPow), $:4)) %*/
13966 }
13967#line 13968 "parse.c"
13968 break;
13969
13970 case 261: /* arg: "unary+" arg */
13971#line 3971 "parse.y"
13972 {
13973 (yyval.node) = call_uni_op(p, (yyvsp[0].node), idUPlus, &(yylsp[-1]), &(yyloc));
13974 /*% ripper: unary!(ID2VAL(idUPlus), $:2) %*/
13975 }
13976#line 13977 "parse.c"
13977 break;
13978
13979 case 262: /* arg: "unary-" arg */
13980#line 3976 "parse.y"
13981 {
13982 (yyval.node) = call_uni_op(p, (yyvsp[0].node), idUMinus, &(yylsp[-1]), &(yyloc));
13983 /*% ripper: unary!(ID2VAL(idUMinus), $:2) %*/
13984 }
13985#line 13986 "parse.c"
13986 break;
13987
13988 case 263: /* arg: arg '|' arg */
13989#line 3981 "parse.y"
13990 {
13991 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), '|', (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
13992 /*% ripper: binary!($:1, ID2VAL('\'|\''), $:3) %*/
13993 }
13994#line 13995 "parse.c"
13995 break;
13996
13997 case 264: /* arg: arg '^' arg */
13998#line 3986 "parse.y"
13999 {
14000 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), '^', (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
14001 /*% ripper: binary!($:1, ID2VAL('\'^\''), $:3) %*/
14002 }
14003#line 14004 "parse.c"
14004 break;
14005
14006 case 265: /* arg: arg '&' arg */
14007#line 3991 "parse.y"
14008 {
14009 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), '&', (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
14010 /*% ripper: binary!($:1, ID2VAL('\'&\''), $:3) %*/
14011 }
14012#line 14013 "parse.c"
14013 break;
14014
14015 case 266: /* arg: arg "<=>" arg */
14016#line 3996 "parse.y"
14017 {
14018 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), idCmp, (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
14019 /*% ripper: binary!($:1, ID2VAL(idCmp), $:3) %*/
14020 }
14021#line 14022 "parse.c"
14022 break;
14023
14024 case 268: /* arg: arg "==" arg */
14025#line 4002 "parse.y"
14026 {
14027 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), idEq, (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
14028 /*% ripper: binary!($:1, ID2VAL(idEq), $:3) %*/
14029 }
14030#line 14031 "parse.c"
14031 break;
14032
14033 case 269: /* arg: arg "===" arg */
14034#line 4007 "parse.y"
14035 {
14036 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), idEqq, (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
14037 /*% ripper: binary!($:1, ID2VAL(idEqq), $:3) %*/
14038 }
14039#line 14040 "parse.c"
14040 break;
14041
14042 case 270: /* arg: arg "!=" arg */
14043#line 4012 "parse.y"
14044 {
14045 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), idNeq, (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
14046 /*% ripper: binary!($:1, ID2VAL(idNeq), $:3) %*/
14047 }
14048#line 14049 "parse.c"
14049 break;
14050
14051 case 271: /* arg: arg "=~" arg */
14052#line 4017 "parse.y"
14053 {
14054 (yyval.node) = match_op(p, (yyvsp[-2].node), (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
14055 /*% ripper: binary!($:1, ID2VAL(idEqTilde), $:3) %*/
14056 }
14057#line 14058 "parse.c"
14058 break;
14059
14060 case 272: /* arg: arg "!~" arg */
14061#line 4022 "parse.y"
14062 {
14063 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), idNeqTilde, (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
14064 /*% ripper: binary!($:1, ID2VAL(idNeqTilde), $:3) %*/
14065 }
14066#line 14067 "parse.c"
14067 break;
14068
14069 case 273: /* arg: '!' arg */
14070#line 4027 "parse.y"
14071 {
14072 (yyval.node) = call_uni_op(p, method_cond(p, (yyvsp[0].node), &(yylsp[0])), '!', &(yylsp[-1]), &(yyloc));
14073 /*% ripper: unary!(ID2VAL('\'!\''), $:2) %*/
14074 }
14075#line 14076 "parse.c"
14076 break;
14077
14078 case 274: /* arg: '~' arg */
14079#line 4032 "parse.y"
14080 {
14081 (yyval.node) = call_uni_op(p, (yyvsp[0].node), '~', &(yylsp[-1]), &(yyloc));
14082 /*% ripper: unary!(ID2VAL('\'~\''), $:2) %*/
14083 }
14084#line 14085 "parse.c"
14085 break;
14086
14087 case 275: /* arg: arg "<<" arg */
14088#line 4037 "parse.y"
14089 {
14090 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), idLTLT, (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
14091 /*% ripper: binary!($:1, ID2VAL(idLTLT), $:3) %*/
14092 }
14093#line 14094 "parse.c"
14094 break;
14095
14096 case 276: /* arg: arg ">>" arg */
14097#line 4042 "parse.y"
14098 {
14099 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), idGTGT, (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
14100 /*% ripper: binary!($:1, ID2VAL(idGTGT), $:3) %*/
14101 }
14102#line 14103 "parse.c"
14103 break;
14104
14105 case 277: /* arg: arg "&&" arg */
14106#line 4047 "parse.y"
14107 {
14108 (yyval.node) = logop(p, idANDOP, (yyvsp[-2].node), (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
14109 /*% ripper: binary!($:1, ID2VAL(idANDOP), $:3) %*/
14110 }
14111#line 14112 "parse.c"
14112 break;
14113
14114 case 278: /* arg: arg "||" arg */
14115#line 4052 "parse.y"
14116 {
14117 (yyval.node) = logop(p, idOROP, (yyvsp[-2].node), (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
14118 /*% ripper: binary!($:1, ID2VAL(idOROP), $:3) %*/
14119 }
14120#line 14121 "parse.c"
14121 break;
14122
14123 case 279: /* arg: "'defined?'" option_'\n' begin_defined arg */
14124#line 4057 "parse.y"
14125 {
14126 p->ctxt.in_defined = (yyvsp[-1].ctxt).in_defined;
14127 (yyval.node) = new_defined(p, (yyvsp[0].node), &(yyloc), &(yylsp[-3]));
14128 p->ctxt.has_trailing_semicolon = (yyvsp[-1].ctxt).has_trailing_semicolon;
14129 /*% ripper: defined!($:4) %*/
14130 }
14131#line 14132 "parse.c"
14132 break;
14133
14134 case 280: /* def_endless_method_endless_arg: defn_head f_opt_paren_args '=' endless_arg */
14135#line 2958 "parse.y"
14136 {
14137 endless_method_name(p, (yyvsp[-3].node_def_temp)->nd_mid, &(yylsp[-3]));
14138 restore_defun(p, (yyvsp[-3].node_def_temp));
14139 ((yyval.node) = (yyvsp[-3].node_def_temp)->nd_def)->nd_loc = (yyloc);
14140 (yyvsp[0].node) = new_scope_body(p, (yyvsp[-2].node_args), (yyvsp[0].node), (yyval.node), &(yyloc));
14141 RNODE_DEFN((yyval.node))->nd_defn = (yyvsp[0].node);
14142 /*% ripper: bodystmt!($:bodystmt, Qnil, Qnil, Qnil) %*/
14143 /*% ripper: def!($:head, $:args, $:$) %*/
14144 local_pop(p);
14145 }
14146#line 14147 "parse.c"
14147 break;
14148
14149 case 281: /* def_endless_method_endless_arg: defs_head f_opt_paren_args '=' endless_arg */
14150#line 2969 "parse.y"
14151 {
14152 endless_method_name(p, (yyvsp[-3].node_def_temp)->nd_mid, &(yylsp[-3]));
14153 restore_defun(p, (yyvsp[-3].node_def_temp));
14154 ((yyval.node) = (yyvsp[-3].node_def_temp)->nd_def)->nd_loc = (yyloc);
14155 (yyvsp[0].node) = new_scope_body(p, (yyvsp[-2].node_args), (yyvsp[0].node), (yyval.node), &(yyloc));
14156 RNODE_DEFS((yyval.node))->nd_defn = (yyvsp[0].node);
14157 /*% ripper: bodystmt!($:bodystmt, Qnil, Qnil, Qnil) %*/
14158 /*% ripper: defs!(*$:head[0..2], $:args, $:$) %*/
14159 local_pop(p);
14160 }
14161#line 14162 "parse.c"
14162 break;
14163
14164 case 285: /* ternary: arg '?' arg option_'\n' ':' arg */
14165#line 4069 "parse.y"
14166 {
14167 value_expr(p, (yyvsp[-5].node));
14168 (yyval.node) = new_if(p, (yyvsp[-5].node), (yyvsp[-3].node), (yyvsp[0].node), &(yyloc), &NULL_LOC, &(yylsp[-1]), &NULL_LOC);
14169 fixpos((yyval.node), (yyvsp[-5].node));
14170 /*% ripper: ifop!($:1, $:3, $:6) %*/
14171 }
14172#line 14173 "parse.c"
14173 break;
14174
14175 case 287: /* endless_arg: endless_arg "'rescue' modifier" after_rescue arg */
14176#line 4079 "parse.y"
14177 {
14178 p->ctxt.in_rescue = (yyvsp[-1].ctxt).in_rescue;
14179 (yyval.node) = rescued_expr(p, (yyvsp[-3].node), (yyvsp[0].node), &(yylsp[-3]), &(yylsp[-2]), &(yylsp[0]));
14180 /*% ripper: rescue_mod!($:1, $:4) %*/
14181 }
14182#line 14183 "parse.c"
14183 break;
14184
14185 case 288: /* endless_arg: "'not'" option_'\n' endless_arg */
14186#line 4085 "parse.y"
14187 {
14188 (yyval.node) = call_uni_op(p, method_cond(p, (yyvsp[0].node), &(yylsp[0])), METHOD_NOT, &(yylsp[-2]), &(yyloc));
14189 /*% ripper: unary!(ID2VAL(idNOT), $:3) %*/
14190 }
14191#line 14192 "parse.c"
14192 break;
14193
14194 case 289: /* relop: '>' */
14195#line 4091 "parse.y"
14196 {(yyval.id) = '>';}
14197#line 14198 "parse.c"
14198 break;
14199
14200 case 290: /* relop: '<' */
14201#line 4092 "parse.y"
14202 {(yyval.id) = '<';}
14203#line 14204 "parse.c"
14204 break;
14205
14206 case 291: /* relop: ">=" */
14207#line 4093 "parse.y"
14208 {(yyval.id) = idGE;}
14209#line 14210 "parse.c"
14210 break;
14211
14212 case 292: /* relop: "<=" */
14213#line 4094 "parse.y"
14214 {(yyval.id) = idLE;}
14215#line 14216 "parse.c"
14216 break;
14217
14218 case 293: /* rel_expr: arg relop arg */
14219#line 4098 "parse.y"
14220 {
14221 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), (yyvsp[-1].id), (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
14222 /*% ripper: binary!($:1, ID2VAL($2), $:3) %*/
14223 }
14224#line 14225 "parse.c"
14225 break;
14226
14227 case 294: /* rel_expr: rel_expr relop arg */
14228#line 4103 "parse.y"
14229 {
14230 rb_warning1("comparison '%s' after comparison", WARN_ID((yyvsp[-1].id)));
14231 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), (yyvsp[-1].id), (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
14232 /*% ripper: binary!($:1, ID2VAL($2), $:3) %*/
14233 }
14234#line 14235 "parse.c"
14235 break;
14236
14237 case 295: /* lex_ctxt: none */
14238#line 4111 "parse.y"
14239 {
14240 (yyval.ctxt) = p->ctxt;
14241 }
14242#line 14243 "parse.c"
14243 break;
14244
14245 case 296: /* begin_defined: lex_ctxt */
14246#line 4117 "parse.y"
14247 {
14248 p->ctxt.in_defined = 1;
14249 (yyval.ctxt) = (yyvsp[0].ctxt);
14250 }
14251#line 14252 "parse.c"
14252 break;
14253
14254 case 297: /* after_rescue: lex_ctxt */
14255#line 4124 "parse.y"
14256 {
14257 p->ctxt.in_rescue = after_rescue;
14258 (yyval.ctxt) = (yyvsp[0].ctxt);
14259 }
14260#line 14261 "parse.c"
14261 break;
14262
14263 case 298: /* value_expr_arg: arg */
14264#line 3153 "parse.y"
14265 {
14266 value_expr(p, (yyvsp[0].node));
14267 (yyval.node) = (yyvsp[0].node);
14268 }
14269#line 14270 "parse.c"
14270 break;
14271
14272 case 302: /* aref_args: args ',' assocs trailer */
14273#line 4136 "parse.y"
14274 {
14275 (yyval.node) = (yyvsp[-1].node) ? arg_append(p, (yyvsp[-3].node), new_hash(p, (yyvsp[-1].node), &(yylsp[-1])), &(yyloc)) : (yyvsp[-3].node);
14276 /*% ripper: args_add!($:1, bare_assoc_hash!($:3)) %*/
14277 }
14278#line 14279 "parse.c"
14279 break;
14280
14281 case 303: /* aref_args: assocs trailer */
14282#line 4141 "parse.y"
14283 {
14284 (yyval.node) = (yyvsp[-1].node) ? NEW_LIST(new_hash(p, (yyvsp[-1].node), &(yylsp[-1])), &(yyloc)) : 0;
14285 /*% ripper: args_add!(args_new!, bare_assoc_hash!($:1)) %*/
14286 }
14287#line 14288 "parse.c"
14288 break;
14289
14290 case 304: /* arg_rhs: arg */
14291#line 4148 "parse.y"
14292 {
14293 value_expr(p, (yyvsp[0].node));
14294 (yyval.node) = (yyvsp[0].node);
14295 }
14296#line 14297 "parse.c"
14297 break;
14298
14299 case 305: /* arg_rhs: arg "'rescue' modifier" after_rescue arg */
14300#line 4153 "parse.y"
14301 {
14302 p->ctxt.in_rescue = (yyvsp[-1].ctxt).in_rescue;
14303 value_expr(p, (yyvsp[-3].node));
14304 (yyval.node) = rescued_expr(p, (yyvsp[-3].node), (yyvsp[0].node), &(yylsp[-3]), &(yylsp[-2]), &(yylsp[0]));
14305 /*% ripper: rescue_mod!($:1, $:4) %*/
14306 }
14307#line 14308 "parse.c"
14308 break;
14309
14310 case 306: /* paren_args: '(' opt_call_args rparen */
14311#line 4162 "parse.y"
14312 {
14313 (yyval.node) = (yyvsp[-1].node);
14314 /*% ripper: arg_paren!($:2) %*/
14315 }
14316#line 14317 "parse.c"
14317 break;
14318
14319 case 307: /* paren_args: '(' args ',' args_forward rparen */
14320#line 4167 "parse.y"
14321 {
14322 if (!check_forwarding_args(p)) {
14323 (yyval.node) = 0;
14324 }
14325 else {
14326 (yyval.node) = new_args_forward_call(p, (yyvsp[-3].node), &(yylsp[-1]), &(yyloc));
14327 /*% ripper: arg_paren!(args_add!($:2, $:4)) %*/
14328 }
14329 }
14330#line 14331 "parse.c"
14331 break;
14332
14333 case 308: /* paren_args: '(' args_forward rparen */
14334#line 4177 "parse.y"
14335 {
14336 if (!check_forwarding_args(p)) {
14337 (yyval.node) = 0;
14338 }
14339 else {
14340 (yyval.node) = new_args_forward_call(p, 0, &(yylsp[-1]), &(yyloc));
14341 /*% ripper: arg_paren!($:2) %*/
14342 }
14343 }
14344#line 14345 "parse.c"
14345 break;
14346
14347 case 310: /* opt_paren_args: paren_args */
14348#line 4190 "parse.y"
14349 {
14350 (yyval.node) = (yyvsp[0].node) ? (yyvsp[0].node) : NODE_SPECIAL_EMPTY_ARGS;
14351 }
14352#line 14353 "parse.c"
14353 break;
14354
14355 case 314: /* opt_call_args: args ',' assocs ',' */
14356#line 4199 "parse.y"
14357 {
14358 (yyval.node) = (yyvsp[-1].node) ? arg_append(p, (yyvsp[-3].node), new_hash(p, (yyvsp[-1].node), &(yylsp[-1])), &(yyloc)) : (yyvsp[-3].node);
14359 /*% ripper: args_add!($:1, bare_assoc_hash!($:3)) %*/
14360 }
14361#line 14362 "parse.c"
14362 break;
14363
14364 case 315: /* opt_call_args: assocs ',' */
14365#line 4204 "parse.y"
14366 {
14367 (yyval.node) = (yyvsp[-1].node) ? NEW_LIST(new_hash(p, (yyvsp[-1].node), &(yylsp[-1])), &(yylsp[-1])) : 0;
14368 /*% ripper: args_add!(args_new!, bare_assoc_hash!($:1)) %*/
14369 }
14370#line 14371 "parse.c"
14371 break;
14372
14373 case 316: /* value_expr_command: command */
14374#line 3153 "parse.y"
14375 {
14376 value_expr(p, (yyvsp[0].node));
14377 (yyval.node) = (yyvsp[0].node);
14378 }
14379#line 14380 "parse.c"
14380 break;
14381
14382 case 317: /* call_args: value_expr_command */
14383#line 4211 "parse.y"
14384 {
14385 (yyval.node) = NEW_LIST((yyvsp[0].node), &(yyloc));
14386 /*% ripper: args_add!(args_new!, $:1) %*/
14387 }
14388#line 14389 "parse.c"
14389 break;
14390
14391 case 318: /* call_args: def_endless_method_endless_command */
14392#line 4216 "parse.y"
14393 {
14394 (yyval.node) = NEW_LIST((yyvsp[0].node), &(yyloc));
14395 /*% ripper: args_add!(args_new!, $:1) %*/
14396 }
14397#line 14398 "parse.c"
14398 break;
14399
14400 case 319: /* call_args: args opt_block_arg */
14401#line 4221 "parse.y"
14402 {
14403 (yyval.node) = arg_blk_pass((yyvsp[-1].node), (yyvsp[0].node_block_pass));
14404 /*% ripper: args_add_block!($:1, $:2) %*/
14405 }
14406#line 14407 "parse.c"
14407 break;
14408
14409 case 320: /* call_args: assocs opt_block_arg */
14410#line 4226 "parse.y"
14411 {
14412 (yyval.node) = (yyvsp[-1].node) ? NEW_LIST(new_hash(p, (yyvsp[-1].node), &(yylsp[-1])), &(yylsp[-1])) : 0;
14413 (yyval.node) = arg_blk_pass((yyval.node), (yyvsp[0].node_block_pass));
14414 /*% ripper: args_add_block!(args_add!(args_new!, bare_assoc_hash!($:1)), $:2) %*/
14415 }
14416#line 14417 "parse.c"
14417 break;
14418
14419 case 321: /* call_args: args ',' assocs opt_block_arg */
14420#line 4232 "parse.y"
14421 {
14422 (yyval.node) = (yyvsp[-1].node) ? arg_append(p, (yyvsp[-3].node), new_hash(p, (yyvsp[-1].node), &(yylsp[-1])), &(yyloc)) : (yyvsp[-3].node);
14423 (yyval.node) = arg_blk_pass((yyval.node), (yyvsp[0].node_block_pass));
14424 /*% ripper: args_add_block!(args_add!($:1, bare_assoc_hash!($:3)), $:4) %*/
14425 }
14426#line 14427 "parse.c"
14427 break;
14428
14429 case 323: /* $@13: %empty */
14430#line 4241 "parse.y"
14431 {
14432 /* If call_args starts with a open paren '(' or '[',
14433 * look-ahead reading of the letters calls CMDARG_PUSH(0),
14434 * but the push must be done after CMDARG_PUSH(1).
14435 * So this code makes them consistent by first cancelling
14436 * the premature CMDARG_PUSH(0), doing CMDARG_PUSH(1),
14437 * and finally redoing CMDARG_PUSH(0).
14438 */
14439 int lookahead = 0;
14440 switch (yychar) {
14441 case '(': case tLPAREN: case tLPAREN_ARG: case '[': case tLBRACK:
14442 lookahead = 1;
14443 }
14444 if (lookahead) CMDARG_POP();
14445 CMDARG_PUSH(1);
14446 if (lookahead) CMDARG_PUSH(0);
14447 }
14448#line 14449 "parse.c"
14449 break;
14450
14451 case 324: /* command_args: $@13 call_args */
14452#line 4259 "parse.y"
14453 {
14454 /* call_args can be followed by tLBRACE_ARG (that does CMDARG_PUSH(0) in the lexer)
14455 * but the push must be done after CMDARG_POP() in the parser.
14456 * So this code does CMDARG_POP() to pop 0 pushed by tLBRACE_ARG,
14457 * CMDARG_POP() to pop 1 pushed by command_args,
14458 * and CMDARG_PUSH(0) to restore back the flag set by tLBRACE_ARG.
14459 */
14460 int lookahead = 0;
14461 switch (yychar) {
14462 case tLBRACE_ARG:
14463 lookahead = 1;
14464 }
14465 if (lookahead) CMDARG_POP();
14466 CMDARG_POP();
14467 if (lookahead) CMDARG_PUSH(0);
14468 (yyval.node) = (yyvsp[0].node);
14469 /*% ripper: $:2 %*/
14470 }
14471#line 14472 "parse.c"
14472 break;
14473
14474 case 325: /* block_arg: "&" arg_value */
14475#line 4280 "parse.y"
14476 {
14477 (yyval.node_block_pass) = NEW_BLOCK_PASS((yyvsp[0].node), &(yyloc), &(yylsp[-1]));
14478 /*% ripper: $:2 %*/
14479 }
14480#line 14481 "parse.c"
14481 break;
14482
14483 case 326: /* block_arg: "&" */
14484#line 4285 "parse.y"
14485 {
14486 forwarding_arg_check(p, idFWD_BLOCK, idFWD_ALL, "block");
14487 (yyval.node_block_pass) = NEW_BLOCK_PASS(NEW_LVAR(idFWD_BLOCK, &(yylsp[0])), &(yyloc), &(yylsp[0]));
14488 /*% ripper: Qnil %*/
14489 }
14490#line 14491 "parse.c"
14491 break;
14492
14493 case 327: /* opt_block_arg: ',' block_arg */
14494#line 4293 "parse.y"
14495 {
14496 (yyval.node_block_pass) = (yyvsp[0].node_block_pass);
14497 /*% ripper: $:2 %*/
14498 }
14499#line 14500 "parse.c"
14500 break;
14501
14502 case 328: /* opt_block_arg: none */
14503#line 4298 "parse.y"
14504 {
14505 (yyval.node_block_pass) = 0;
14506 /*% ripper: Qfalse %*/
14507 }
14508#line 14509 "parse.c"
14509 break;
14510
14511 case 329: /* args: arg_value */
14512#line 4306 "parse.y"
14513 {
14514 (yyval.node) = NEW_LIST((yyvsp[0].node), &(yyloc));
14515 /*% ripper: args_add!(args_new!, $:arg_value) %*/
14516 }
14517#line 14518 "parse.c"
14518 break;
14519
14520 case 330: /* args: arg_splat */
14521#line 4311 "parse.y"
14522 {
14523 (yyval.node) = (yyvsp[0].node);
14524 /*% ripper: args_add_star!(args_new!, $:arg_splat) %*/
14525 }
14526#line 14527 "parse.c"
14527 break;
14528
14529 case 331: /* args: args ',' arg_value */
14530#line 4316 "parse.y"
14531 {
14532 (yyval.node) = last_arg_append(p, (yyvsp[-2].node), (yyvsp[0].node), &(yyloc));
14533 /*% ripper: args_add!($:non_last_args, $:arg_value) %*/
14534 }
14535#line 14536 "parse.c"
14536 break;
14537
14538 case 332: /* args: args ',' arg_splat */
14539#line 4321 "parse.y"
14540 {
14541 (yyval.node) = rest_arg_append(p, (yyvsp[-2].node), RNODE_SPLAT((yyvsp[0].node))->nd_head, &(yyloc));
14542 /*% ripper: args_add_star!($:non_last_args, $:arg_splat) %*/
14543 }
14544#line 14545 "parse.c"
14545 break;
14546
14547 case 333: /* arg_splat: "*" arg_value */
14548#line 4329 "parse.y"
14549 {
14550 (yyval.node) = NEW_SPLAT((yyvsp[0].node), &(yyloc), &(yylsp[-1]));
14551 /*% ripper: $:arg_value %*/
14552 }
14553#line 14554 "parse.c"
14554 break;
14555
14556 case 334: /* arg_splat: "*" */
14557#line 4334 "parse.y"
14558 {
14559 forwarding_arg_check(p, idFWD_REST, idFWD_ALL, "rest");
14560 (yyval.node) = NEW_SPLAT(NEW_LVAR(idFWD_REST, &(yylsp[0])), &(yyloc), &(yylsp[0]));
14561 /*% ripper: Qnil %*/
14562 }
14563#line 14564 "parse.c"
14564 break;
14565
14566 case 337: /* mrhs: args ',' arg_value */
14567#line 4348 "parse.y"
14568 {
14569 (yyval.node) = last_arg_append(p, (yyvsp[-2].node), (yyvsp[0].node), &(yyloc));
14570 /*% ripper: mrhs_add!(mrhs_new_from_args!($:args), $:arg_value) %*/
14571 }
14572#line 14573 "parse.c"
14573 break;
14574
14575 case 338: /* mrhs: args ',' "*" arg_value */
14576#line 4353 "parse.y"
14577 {
14578 (yyval.node) = rest_arg_append(p, (yyvsp[-3].node), (yyvsp[0].node), &(yyloc));
14579 /*% ripper: mrhs_add_star!(mrhs_new_from_args!($:args), $:arg_value) %*/
14580 }
14581#line 14582 "parse.c"
14582 break;
14583
14584 case 339: /* mrhs: "*" arg_value */
14585#line 4358 "parse.y"
14586 {
14587 (yyval.node) = NEW_SPLAT((yyvsp[0].node), &(yyloc), &(yylsp[-1]));
14588 /*% ripper: mrhs_add_star!(mrhs_new!, $:arg_value) %*/
14589 }
14590#line 14591 "parse.c"
14591 break;
14592
14593 case 350: /* primary: "method" */
14594#line 4379 "parse.y"
14595 {
14596 (yyval.node) = (NODE *)NEW_FCALL((yyvsp[0].id), 0, &(yyloc));
14597 /*% ripper: method_add_arg!(fcall!($:fid), args_new!) %*/
14598 }
14599#line 14600 "parse.c"
14600 break;
14601
14602 case 351: /* $@14: %empty */
14603#line 4384 "parse.y"
14604 {
14605 CMDARG_PUSH(0);
14606 }
14607#line 14608 "parse.c"
14608 break;
14609
14610 case 352: /* primary: k_begin $@14 bodystmt k_end */
14611#line 4389 "parse.y"
14612 {
14613 CMDARG_POP();
14614 set_line_body((yyvsp[-1].node), (yylsp[-3]).end_pos.lineno);
14615 (yyval.node) = NEW_BEGIN((yyvsp[-1].node), &(yyloc));
14616 nd_set_line((yyval.node), (yylsp[-3]).end_pos.lineno);
14617 /*% ripper: begin!($:body) %*/
14618 }
14619#line 14620 "parse.c"
14620 break;
14621
14622 case 353: /* $@15: %empty */
14623#line 4396 "parse.y"
14624 {SET_LEX_STATE(EXPR_ENDARG);}
14625#line 14626 "parse.c"
14626 break;
14627
14628 case 354: /* primary: "( arg" compstmt_stmts $@15 ')' */
14629#line 4397 "parse.y"
14630 {
14631 if (nd_type_p((yyvsp[-2].node), NODE_SELF)) RNODE_SELF((yyvsp[-2].node))->nd_state = 0;
14632 (yyval.node) = (yyvsp[-2].node);
14633 /*% ripper: paren!($:body) %*/
14634 }
14635#line 14636 "parse.c"
14636 break;
14637
14638 case 355: /* primary: "(" compstmt_stmts ')' */
14639#line 4403 "parse.y"
14640 {
14641 if (nd_type_p((yyvsp[-1].node), NODE_SELF)) RNODE_SELF((yyvsp[-1].node))->nd_state = 0;
14642 (yyval.node) = NEW_BLOCK((yyvsp[-1].node), &(yyloc));
14643 /*% ripper: paren!($:body) %*/
14644 }
14645#line 14646 "parse.c"
14646 break;
14647
14648 case 356: /* primary: primary_value "::" "constant" */
14649#line 4409 "parse.y"
14650 {
14651 (yyval.node) = NEW_COLON2((yyvsp[-2].node), (yyvsp[0].id), &(yyloc), &(yylsp[-1]), &(yylsp[0]));
14652 /*% ripper: const_path_ref!($:recv, $:name) %*/
14653 }
14654#line 14655 "parse.c"
14655 break;
14656
14657 case 357: /* primary: ":: at EXPR_BEG" "constant" */
14658#line 4414 "parse.y"
14659 {
14660 (yyval.node) = NEW_COLON3((yyvsp[0].id), &(yyloc), &(yylsp[-1]), &(yylsp[0]));
14661 /*% ripper: top_const_ref!($:name) %*/
14662 }
14663#line 14664 "parse.c"
14664 break;
14665
14666 case 358: /* primary: "[" aref_args ']' */
14667#line 4419 "parse.y"
14668 {
14669 (yyval.node) = make_list((yyvsp[-1].node), &(yyloc));
14670 /*% ripper: array!($:args) %*/
14671 }
14672#line 14673 "parse.c"
14673 break;
14674
14675 case 359: /* primary: "{" assoc_list '}' */
14676#line 4424 "parse.y"
14677 {
14678 (yyval.node) = new_hash(p, (yyvsp[-1].node), &(yyloc));
14679 RNODE_HASH((yyval.node))->nd_brace = TRUE;
14680 /*% ripper: hash!($:list) %*/
14681 }
14682#line 14683 "parse.c"
14683 break;
14684
14685 case 360: /* primary: k_return */
14686#line 4430 "parse.y"
14687 {
14688 (yyval.node) = NEW_RETURN(0, &(yyloc), &(yylsp[0]));
14689 /*% ripper: return0! %*/
14690 }
14691#line 14692 "parse.c"
14692 break;
14693
14694 case 361: /* primary: k_yield '(' call_args rparen */
14695#line 4435 "parse.y"
14696 {
14697 (yyval.node) = NEW_YIELD((yyvsp[-1].node), &(yyloc), &(yylsp[-3]), &(yylsp[-2]), &(yylsp[0]));
14698 /*% ripper: yield!(paren!($:args)) %*/
14699 }
14700#line 14701 "parse.c"
14701 break;
14702
14703 case 362: /* primary: k_yield '(' rparen */
14704#line 4440 "parse.y"
14705 {
14706 (yyval.node) = NEW_YIELD(0, &(yyloc), &(yylsp[-2]), &(yylsp[-1]), &(yylsp[0]));
14707 /*% ripper: yield!(paren!(args_new!)) %*/
14708 }
14709#line 14710 "parse.c"
14710 break;
14711
14712 case 363: /* primary: k_yield */
14713#line 4445 "parse.y"
14714 {
14715 (yyval.node) = NEW_YIELD(0, &(yyloc), &(yylsp[0]), &NULL_LOC, &NULL_LOC);
14716 /*% ripper: yield0! %*/
14717 }
14718#line 14719 "parse.c"
14719 break;
14720
14721 case 364: /* primary: "'defined?'" option_'\n' '(' begin_defined expr rparen */
14722#line 4450 "parse.y"
14723 {
14724 p->ctxt.in_defined = (yyvsp[-2].ctxt).in_defined;
14725 (yyval.node) = new_defined(p, (yyvsp[-1].node), &(yyloc), &(yylsp[-5]));
14726 p->ctxt.has_trailing_semicolon = (yyvsp[-2].ctxt).has_trailing_semicolon;
14727 /*% ripper: defined!($:arg) %*/
14728 }
14729#line 14730 "parse.c"
14730 break;
14731
14732 case 365: /* primary: "'not'" '(' expr rparen */
14733#line 4457 "parse.y"
14734 {
14735 (yyval.node) = call_uni_op(p, method_cond(p, (yyvsp[-1].node), &(yylsp[-1])), METHOD_NOT, &(yylsp[-3]), &(yyloc));
14736 /*% ripper: unary!(ID2VAL(idNOT), $:arg) %*/
14737 }
14738#line 14739 "parse.c"
14739 break;
14740
14741 case 366: /* primary: "'not'" '(' rparen */
14742#line 4462 "parse.y"
14743 {
14744 (yyval.node) = call_uni_op(p, method_cond(p, NEW_NIL(&(yylsp[-1])), &(yylsp[-1])), METHOD_NOT, &(yylsp[-2]), &(yyloc));
14745 /*% ripper: unary!(ID2VAL(idNOT), Qnil) %*/
14746 }
14747#line 14748 "parse.c"
14748 break;
14749
14750 case 367: /* primary: fcall brace_block */
14751#line 4467 "parse.y"
14752 {
14753 (yyval.node) = method_add_block(p, (NODE *)(yyvsp[-1].node_fcall), (yyvsp[0].node), &(yyloc));
14754 /*% ripper: method_add_block!(method_add_arg!(fcall!($:call), args_new!), $:block) %*/
14755 }
14756#line 14757 "parse.c"
14757 break;
14758
14759 case 369: /* primary: method_call brace_block */
14760#line 4473 "parse.y"
14761 {
14762 block_dup_check(p, get_nd_args(p, (yyvsp[-1].node)), (yyvsp[0].node));
14763 (yyval.node) = method_add_block(p, (yyvsp[-1].node), (yyvsp[0].node), &(yyloc));
14764 /*% ripper: method_add_block!($:call, $:block) %*/
14765 }
14766#line 14767 "parse.c"
14767 break;
14768
14769 case 371: /* primary: k_if expr_value then compstmt_stmts if_tail k_end */
14770#line 4483 "parse.y"
14771 {
14772 if ((yyvsp[-1].node) && nd_type_p((yyvsp[-1].node), NODE_IF))
14773 RNODE_IF((yyvsp[-1].node))->end_keyword_loc = (yylsp[0]);
14774
14775 (yyval.node) = new_if(p, (yyvsp[-4].node), (yyvsp[-2].node), (yyvsp[-1].node), &(yyloc), &(yylsp[-5]), &(yylsp[-3]), &(yylsp[0]));
14776 fixpos((yyval.node), (yyvsp[-4].node));
14777 /*% ripper: if!($:cond, $:body, $:tail) %*/
14778 }
14779#line 14780 "parse.c"
14780 break;
14781
14782 case 372: /* primary: k_unless expr_value then compstmt_stmts opt_else k_end */
14783#line 4495 "parse.y"
14784 {
14785 (yyval.node) = new_unless(p, (yyvsp[-4].node), (yyvsp[-2].node), (yyvsp[-1].node), &(yyloc), &(yylsp[-5]), &(yylsp[-3]), &(yylsp[0]));
14786 fixpos((yyval.node), (yyvsp[-4].node));
14787 /*% ripper: unless!($:cond, $:body, $:tail) %*/
14788 }
14789#line 14790 "parse.c"
14790 break;
14791
14792 case 373: /* primary: k_while expr_value_do compstmt_stmts k_end */
14793#line 4503 "parse.y"
14794 {
14795 restore_block_exit(p, (yyvsp[-3].node_exits));
14796 (yyval.node) = NEW_WHILE(cond(p, (yyvsp[-2].node), &(yylsp[-2])), (yyvsp[-1].node), 1, &(yyloc), &(yylsp[-3]), &(yylsp[0]));
14797 fixpos((yyval.node), (yyvsp[-2].node));
14798 /*% ripper: while!($:cond, $:body) %*/
14799 }
14800#line 14801 "parse.c"
14801 break;
14802
14803 case 374: /* primary: k_until expr_value_do compstmt_stmts k_end */
14804#line 4512 "parse.y"
14805 {
14806 restore_block_exit(p, (yyvsp[-3].node_exits));
14807 (yyval.node) = NEW_UNTIL(cond(p, (yyvsp[-2].node), &(yylsp[-2])), (yyvsp[-1].node), 1, &(yyloc), &(yylsp[-3]), &(yylsp[0]));
14808 fixpos((yyval.node), (yyvsp[-2].node));
14809 /*% ripper: until!($:cond, $:body) %*/
14810 }
14811#line 14812 "parse.c"
14812 break;
14813
14814 case 375: /* @16: %empty */
14815#line 4519 "parse.y"
14816 {
14817 (yyval.labels) = p->case_labels;
14818 p->case_labels = CHECK_LITERAL_WHEN;
14819 }
14820#line 14821 "parse.c"
14821 break;
14822
14823 case 376: /* primary: k_case expr_value option_terms @16 case_body k_end */
14824#line 4525 "parse.y"
14825 {
14826 if (CASE_LABELS_ENABLED_P(p->case_labels)) st_free_table(p->case_labels);
14827 p->case_labels = (yyvsp[-2].labels);
14828 (yyval.node) = NEW_CASE((yyvsp[-4].node), (yyvsp[-1].node), &(yyloc), &(yylsp[-5]), &(yylsp[0]));
14829 fixpos((yyval.node), (yyvsp[-4].node));
14830 /*% ripper: case!($:expr, $:body) %*/
14831 }
14832#line 14833 "parse.c"
14833 break;
14834
14835 case 377: /* @17: %empty */
14836#line 4533 "parse.y"
14837 {
14838 (yyval.labels) = p->case_labels;
14839 p->case_labels = 0;
14840 }
14841#line 14842 "parse.c"
14842 break;
14843
14844 case 378: /* primary: k_case option_terms @17 case_body k_end */
14845#line 4539 "parse.y"
14846 {
14847 if (p->case_labels) st_free_table(p->case_labels);
14848 p->case_labels = (yyvsp[-2].labels);
14849 (yyval.node) = NEW_CASE2((yyvsp[-1].node), &(yyloc), &(yylsp[-4]), &(yylsp[0]));
14850 /*% ripper: case!(Qnil, $:body) %*/
14851 }
14852#line 14853 "parse.c"
14853 break;
14854
14855 case 379: /* primary: k_case expr_value option_terms p_case_body k_end */
14856#line 4548 "parse.y"
14857 {
14858 (yyval.node) = NEW_CASE3((yyvsp[-3].node), (yyvsp[-1].node), &(yyloc), &(yylsp[-4]), &(yylsp[0]));
14859 /*% ripper: case!($:expr, $:body) %*/
14860 }
14861#line 14862 "parse.c"
14862 break;
14863
14864 case 380: /* $@18: %empty */
14865#line 4553 "parse.y"
14866 {COND_PUSH(1);}
14867#line 14868 "parse.c"
14868 break;
14869
14870 case 381: /* $@19: %empty */
14871#line 4553 "parse.y"
14872 {COND_POP();}
14873#line 14874 "parse.c"
14874 break;
14875
14876 case 382: /* primary: k_for for_var "'in'" $@18 expr_value do $@19 compstmt_stmts k_end */
14877#line 4556 "parse.y"
14878 {
14879 restore_block_exit(p, (yyvsp[-8].node_exits));
14880 /*
14881 * for a, b, c in e
14882 * #=>
14883 * e.each{|*x| a, b, c = x}
14884 *
14885 * for a in e
14886 * #=>
14887 * e.each{|x| a, = x}
14888 */
14889 ID id = internal_id(p);
14890 rb_node_args_aux_t *m = NEW_ARGS_AUX(0, 0, &NULL_LOC);
14891 rb_node_args_t *args;
14892 NODE *scope, *internal_var = NEW_DVAR(id, &(yylsp[-7]));
14893 rb_ast_id_table_t *tbl = rb_ast_new_local_table(p->ast, 1);
14894 tbl->ids[0] = id; /* internal id */
14895
14896 switch (nd_type((yyvsp[-7].node))) {
14897 case NODE_LASGN:
14898 case NODE_DASGN: /* e.each {|internal_var| a = internal_var; ... } */
14899 set_nd_value(p, (yyvsp[-7].node), internal_var);
14900 id = 0;
14901 m->nd_plen = 1;
14902 m->nd_next = (yyvsp[-7].node);
14903 break;
14904 case NODE_MASGN: /* e.each {|*internal_var| a, b, c = (internal_var.length == 1 && Array === (tmp = internal_var[0]) ? tmp : internal_var); ... } */
14905 m->nd_next = node_assign(p, (yyvsp[-7].node), NEW_FOR_MASGN(internal_var, &(yylsp[-7])), NO_LEX_CTXT, &(yylsp[-7]));
14906 break;
14907 default: /* e.each {|*internal_var| @a, B, c[1], d.attr = internal_val; ... } */
14908 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]));
14909 }
14910 /* {|*internal_id| <m> = internal_id; ... } */
14911 args = new_args(p, m, 0, id, 0, new_empty_args_tail(p, &(yylsp[-7])), &(yylsp[-7]));
14912 scope = NEW_SCOPE2(tbl, args, (yyvsp[-1].node), NULL, &(yyloc));
14913 YYLTYPE do_keyword_loc = (yyvsp[-3].id) == keyword_do_cond ? (yylsp[-3]) : NULL_LOC;
14914 (yyval.node) = NEW_FOR((yyvsp[-4].node), scope, &(yyloc), &(yylsp[-8]), &(yylsp[-6]), &do_keyword_loc, &(yylsp[0]));
14915 RNODE_SCOPE(scope)->nd_parent = (yyval.node);
14916 fixpos((yyval.node), (yyvsp[-7].node));
14917 /*% ripper: for!($:for_var, $:expr_value, $:compstmt) %*/
14918 }
14919#line 14920 "parse.c"
14920 break;
14921
14922 case 383: /* $@20: %empty */
14923#line 4598 "parse.y"
14924 {
14925 begin_definition("class", &(yylsp[-2]), &(yylsp[-1]));
14926 }
14927#line 14928 "parse.c"
14928 break;
14929
14930 case 384: /* primary: k_class cpath superclass $@20 bodystmt k_end */
14931#line 4603 "parse.y"
14932 {
14933 YYLTYPE inheritance_operator_loc = NULL_LOC;
14934 if ((yyvsp[-3].node)) {
14935 inheritance_operator_loc = (yylsp[-3]);
14936 inheritance_operator_loc.end_pos.column = inheritance_operator_loc.beg_pos.column + 1;
14937 }
14938 (yyval.node) = NEW_CLASS((yyvsp[-4].node), (yyvsp[-1].node), (yyvsp[-3].node), &(yyloc), &(yylsp[-5]), &inheritance_operator_loc, &(yylsp[0]));
14939 nd_set_line(RNODE_CLASS((yyval.node))->nd_body, (yylsp[0]).end_pos.lineno);
14940 set_line_body((yyvsp[-1].node), (yylsp[-3]).end_pos.lineno);
14941 nd_set_line((yyval.node), (yylsp[-3]).end_pos.lineno);
14942 /*% ripper: class!($:cpath, $:superclass, $:bodystmt) %*/
14943 local_pop(p);
14944 p->ctxt.in_class = (yyvsp[-5].ctxt).in_class;
14945 p->ctxt.cant_return = (yyvsp[-5].ctxt).cant_return;
14946 p->ctxt.shareable_constant_value = (yyvsp[-5].ctxt).shareable_constant_value;
14947 }
14948#line 14949 "parse.c"
14949 break;
14950
14951 case 385: /* $@21: %empty */
14952#line 4620 "parse.y"
14953 {
14954 begin_definition("", &(yylsp[-2]), &(yylsp[-1]));
14955 }
14956#line 14957 "parse.c"
14957 break;
14958
14959 case 386: /* primary: k_class "<<" expr_value $@21 term bodystmt k_end */
14960#line 4626 "parse.y"
14961 {
14962 (yyval.node) = NEW_SCLASS((yyvsp[-4].node), (yyvsp[-1].node), &(yyloc), &(yylsp[-6]), &(yylsp[-5]), &(yylsp[0]));
14963 nd_set_line(RNODE_SCLASS((yyval.node))->nd_body, (yylsp[0]).end_pos.lineno);
14964 set_line_body((yyvsp[-1].node), nd_line((yyvsp[-4].node)));
14965 fixpos((yyval.node), (yyvsp[-4].node));
14966 /*% ripper: sclass!($:expr_value, $:bodystmt) %*/
14967 local_pop(p);
14968 p->ctxt.in_def = (yyvsp[-6].ctxt).in_def;
14969 p->ctxt.in_class = (yyvsp[-6].ctxt).in_class;
14970 p->ctxt.cant_return = (yyvsp[-6].ctxt).cant_return;
14971 p->ctxt.shareable_constant_value = (yyvsp[-6].ctxt).shareable_constant_value;
14972 }
14973#line 14974 "parse.c"
14974 break;
14975
14976 case 387: /* $@22: %empty */
14977#line 4639 "parse.y"
14978 {
14979 begin_definition("module", &(yylsp[-1]), &(yylsp[0]));
14980 }
14981#line 14982 "parse.c"
14982 break;
14983
14984 case 388: /* primary: k_module cpath $@22 bodystmt k_end */
14985#line 4644 "parse.y"
14986 {
14987 (yyval.node) = NEW_MODULE((yyvsp[-3].node), (yyvsp[-1].node), &(yyloc), &(yylsp[-4]), &(yylsp[0]));
14988 nd_set_line(RNODE_MODULE((yyval.node))->nd_body, (yylsp[0]).end_pos.lineno);
14989 set_line_body((yyvsp[-1].node), (yylsp[-3]).end_pos.lineno);
14990 nd_set_line((yyval.node), (yylsp[-3]).end_pos.lineno);
14991 /*% ripper: module!($:cpath, $:bodystmt) %*/
14992 local_pop(p);
14993 p->ctxt.in_class = (yyvsp[-4].ctxt).in_class;
14994 p->ctxt.cant_return = (yyvsp[-4].ctxt).cant_return;
14995 p->ctxt.shareable_constant_value = (yyvsp[-4].ctxt).shareable_constant_value;
14996 }
14997#line 14998 "parse.c"
14998 break;
14999
15000 case 389: /* $@23: %empty */
15001#line 4657 "parse.y"
15002 {
15003 push_end_expect_token_locations(p, &(yylsp[-1]).beg_pos);
15004 }
15005#line 15006 "parse.c"
15006 break;
15007
15008 case 390: /* primary: defn_head f_arglist $@23 bodystmt k_end */
15009#line 4662 "parse.y"
15010 {
15011 restore_defun(p, (yyvsp[-4].node_def_temp));
15012 ((yyval.node) = (yyvsp[-4].node_def_temp)->nd_def)->nd_loc = (yyloc);
15013 (yyvsp[-1].node) = new_scope_body(p, (yyvsp[-3].node_args), (yyvsp[-1].node), (yyval.node), &(yyloc));
15014 RNODE_DEFN((yyval.node))->nd_defn = (yyvsp[-1].node);
15015 /*% ripper: def!($:head, $:args, $:bodystmt) %*/
15016 local_pop(p);
15017 }
15018#line 15019 "parse.c"
15019 break;
15020
15021 case 391: /* $@24: %empty */
15022#line 4672 "parse.y"
15023 {
15024 push_end_expect_token_locations(p, &(yylsp[-1]).beg_pos);
15025 }
15026#line 15027 "parse.c"
15027 break;
15028
15029 case 392: /* primary: defs_head f_arglist $@24 bodystmt k_end */
15030#line 4677 "parse.y"
15031 {
15032 restore_defun(p, (yyvsp[-4].node_def_temp));
15033 ((yyval.node) = (yyvsp[-4].node_def_temp)->nd_def)->nd_loc = (yyloc);
15034 (yyvsp[-1].node) = new_scope_body(p, (yyvsp[-3].node_args), (yyvsp[-1].node), (yyval.node), &(yyloc));
15035 RNODE_DEFS((yyval.node))->nd_defn = (yyvsp[-1].node);
15036 /*% ripper: defs!(*$:head[0..2], $:args, $:bodystmt) %*/
15037 local_pop(p);
15038 }
15039#line 15040 "parse.c"
15040 break;
15041
15042 case 393: /* primary: "'break'" */
15043#line 4686 "parse.y"
15044 {
15045 (yyval.node) = add_block_exit(p, NEW_BREAK(0, &(yyloc), &(yylsp[0])));
15046 /*% ripper: break!(args_new!) %*/
15047 }
15048#line 15049 "parse.c"
15049 break;
15050
15051 case 394: /* primary: "'next'" */
15052#line 4691 "parse.y"
15053 {
15054 (yyval.node) = add_block_exit(p, NEW_NEXT(0, &(yyloc), &(yylsp[0])));
15055 /*% ripper: next!(args_new!) %*/
15056 }
15057#line 15058 "parse.c"
15058 break;
15059
15060 case 395: /* primary: "'redo'" */
15061#line 4696 "parse.y"
15062 {
15063 (yyval.node) = add_block_exit(p, NEW_REDO(&(yyloc), &(yylsp[0])));
15064 /*% ripper: redo! %*/
15065 }
15066#line 15067 "parse.c"
15067 break;
15068
15069 case 396: /* primary: "'retry'" */
15070#line 4701 "parse.y"
15071 {
15072 if (!p->ctxt.in_defined) {
15073 switch (p->ctxt.in_rescue) {
15074 case before_rescue: yyerror1(&(yylsp[0]), "Invalid retry without rescue"); break;
15075 case after_rescue: /* ok */ break;
15076 case after_else: yyerror1(&(yylsp[0]), "Invalid retry after else"); break;
15077 case after_ensure: yyerror1(&(yylsp[0]), "Invalid retry after ensure"); break;
15078 }
15079 }
15080 (yyval.node) = NEW_RETRY(&(yyloc));
15081 /*% ripper: retry! %*/
15082 }
15083#line 15084 "parse.c"
15084 break;
15085
15086 case 397: /* value_expr_primary: primary */
15087#line 3153 "parse.y"
15088 {
15089 value_expr(p, (yyvsp[0].node));
15090 (yyval.node) = (yyvsp[0].node);
15091 }
15092#line 15093 "parse.c"
15093 break;
15094
15095 case 399: /* k_begin: "'begin'" */
15096#line 4719 "parse.y"
15097 {
15098 token_info_push(p, "begin", &(yyloc));
15099 push_end_expect_token_locations(p, &(yylsp[0]).beg_pos);
15100 }
15101#line 15102 "parse.c"
15102 break;
15103
15104 case 400: /* k_if: "'if'" */
15105#line 4726 "parse.y"
15106 {
15107 WARN_EOL("if");
15108 token_info_push(p, "if", &(yyloc));
15109 if (p->token_info && p->token_info->nonspc &&
15110 p->token_info->next && !strcmp(p->token_info->next->token, "else")) {
15111 const char *tok = p->lex.ptok - rb_strlen_lit("if");
15112 const char *beg = p->lex.pbeg + p->token_info->next->beg.column;
15113 beg += rb_strlen_lit("else");
15114 while (beg < tok && ISSPACE(*beg)) beg++;
15115 if (beg == tok) {
15116 p->token_info->nonspc = 0;
15117 }
15118 }
15119 push_end_expect_token_locations(p, &(yylsp[0]).beg_pos);
15120 }
15121#line 15122 "parse.c"
15122 break;
15123
15124 case 401: /* k_unless: "'unless'" */
15125#line 4744 "parse.y"
15126 {
15127 token_info_push(p, "unless", &(yyloc));
15128 push_end_expect_token_locations(p, &(yylsp[0]).beg_pos);
15129 }
15130#line 15131 "parse.c"
15131 break;
15132
15133 case 402: /* k_while: "'while'" allow_exits */
15134#line 4751 "parse.y"
15135 {
15136 (yyval.node_exits) = (yyvsp[0].node_exits);
15137 token_info_push(p, "while", &(yyloc));
15138 push_end_expect_token_locations(p, &(yylsp[-1]).beg_pos);
15139 }
15140#line 15141 "parse.c"
15141 break;
15142
15143 case 403: /* k_until: "'until'" allow_exits */
15144#line 4759 "parse.y"
15145 {
15146 (yyval.node_exits) = (yyvsp[0].node_exits);
15147 token_info_push(p, "until", &(yyloc));
15148 push_end_expect_token_locations(p, &(yylsp[-1]).beg_pos);
15149 }
15150#line 15151 "parse.c"
15151 break;
15152
15153 case 404: /* k_case: "'case'" */
15154#line 4767 "parse.y"
15155 {
15156 token_info_push(p, "case", &(yyloc));
15157 push_end_expect_token_locations(p, &(yylsp[0]).beg_pos);
15158 }
15159#line 15160 "parse.c"
15160 break;
15161
15162 case 405: /* k_for: "'for'" allow_exits */
15163#line 4774 "parse.y"
15164 {
15165 (yyval.node_exits) = (yyvsp[0].node_exits);
15166 token_info_push(p, "for", &(yyloc));
15167 push_end_expect_token_locations(p, &(yylsp[-1]).beg_pos);
15168 }
15169#line 15170 "parse.c"
15170 break;
15171
15172 case 406: /* k_class: "'class'" */
15173#line 4782 "parse.y"
15174 {
15175 token_info_push(p, "class", &(yyloc));
15176 (yyval.ctxt) = p->ctxt;
15177 p->ctxt.in_rescue = before_rescue;
15178 push_end_expect_token_locations(p, &(yylsp[0]).beg_pos);
15179 }
15180#line 15181 "parse.c"
15181 break;
15182
15183 case 407: /* k_module: "'module'" */
15184#line 4791 "parse.y"
15185 {
15186 token_info_push(p, "module", &(yyloc));
15187 (yyval.ctxt) = p->ctxt;
15188 p->ctxt.in_rescue = before_rescue;
15189 push_end_expect_token_locations(p, &(yylsp[0]).beg_pos);
15190 }
15191#line 15192 "parse.c"
15192 break;
15193
15194 case 408: /* k_def: "'def'" */
15195#line 4800 "parse.y"
15196 {
15197 token_info_push(p, "def", &(yyloc));
15198 (yyval.node_def_temp) = NEW_DEF_TEMP(&(yyloc));
15199 p->ctxt.in_argdef = 1;
15200 }
15201#line 15202 "parse.c"
15202 break;
15203
15204 case 409: /* k_do: "'do'" */
15205#line 4808 "parse.y"
15206 {
15207 token_info_push(p, "do", &(yyloc));
15208 push_end_expect_token_locations(p, &(yylsp[0]).beg_pos);
15209 }
15210#line 15211 "parse.c"
15211 break;
15212
15213 case 410: /* k_do_block: "'do' for block" */
15214#line 4815 "parse.y"
15215 {
15216 token_info_push(p, "do", &(yyloc));
15217 push_end_expect_token_locations(p, &(yylsp[0]).beg_pos);
15218 }
15219#line 15220 "parse.c"
15220 break;
15221
15222 case 411: /* k_rescue: "'rescue'" */
15223#line 4822 "parse.y"
15224 {
15225 token_info_warn(p, "rescue", p->token_info, 1, &(yyloc));
15226 (yyval.ctxt) = p->ctxt;
15227 p->ctxt.in_rescue = after_rescue;
15228 }
15229#line 15230 "parse.c"
15230 break;
15231
15232 case 412: /* k_ensure: "'ensure'" */
15233#line 4830 "parse.y"
15234 {
15235 token_info_warn(p, "ensure", p->token_info, 1, &(yyloc));
15236 (yyval.ctxt) = p->ctxt;
15237 }
15238#line 15239 "parse.c"
15239 break;
15240
15241 case 413: /* k_when: "'when'" */
15242#line 4837 "parse.y"
15243 {
15244 token_info_warn(p, "when", p->token_info, 0, &(yyloc));
15245 }
15246#line 15247 "parse.c"
15247 break;
15248
15249 case 414: /* k_else: "'else'" */
15250#line 4843 "parse.y"
15251 {
15252 token_info *ptinfo_beg = p->token_info;
15253 int same = ptinfo_beg && strcmp(ptinfo_beg->token, "case") != 0;
15254 token_info_warn(p, "else", p->token_info, same, &(yyloc));
15255 if (same) {
15256 token_info e;
15257 e.next = ptinfo_beg->next;
15258 e.token = "else";
15259 token_info_setup(&e, p->lex.pbeg, &(yyloc));
15260 if (!e.nonspc) *ptinfo_beg = e;
15261 }
15262 }
15263#line 15264 "parse.c"
15264 break;
15265
15266 case 415: /* k_elsif: "'elsif'" */
15267#line 4858 "parse.y"
15268 {
15269 WARN_EOL("elsif");
15270 token_info_warn(p, "elsif", p->token_info, 1, &(yyloc));
15271 }
15272#line 15273 "parse.c"
15273 break;
15274
15275 case 416: /* k_end: "'end'" */
15276#line 4865 "parse.y"
15277 {
15278 token_info_pop(p, "end", &(yyloc));
15279 pop_end_expect_token_locations(p);
15280 }
15281#line 15282 "parse.c"
15282 break;
15283
15284 case 417: /* k_end: "dummy end" */
15285#line 4870 "parse.y"
15286 {
15287 compile_error(p, "syntax error, unexpected end-of-input");
15288 }
15289#line 15290 "parse.c"
15290 break;
15291
15292 case 418: /* k_return: "'return'" */
15293#line 4876 "parse.y"
15294 {
15295 if (p->ctxt.cant_return && !dyna_in_block(p))
15296 yyerror1(&(yylsp[0]), "Invalid return in class/module body");
15297 }
15298#line 15299 "parse.c"
15299 break;
15300
15301 case 419: /* k_yield: "'yield'" */
15302#line 4883 "parse.y"
15303 {
15304 if (!p->ctxt.in_defined && !p->ctxt.in_def && !compile_for_eval)
15305 yyerror1(&(yylsp[0]), "Invalid yield");
15306 }
15307#line 15308 "parse.c"
15308 break;
15309
15310 case 424: /* do: "'do' for condition" */
15311#line 4895 "parse.y"
15312 { (yyval.id) = keyword_do_cond; }
15313#line 15314 "parse.c"
15314 break;
15315
15316 case 426: /* if_tail: k_elsif expr_value then compstmt_stmts if_tail */
15317#line 4902 "parse.y"
15318 {
15319 (yyval.node) = new_if(p, (yyvsp[-3].node), (yyvsp[-1].node), (yyvsp[0].node), &(yyloc), &(yylsp[-4]), &(yylsp[-2]), &NULL_LOC);
15320 fixpos((yyval.node), (yyvsp[-3].node));
15321 /*% ripper: elsif!($:2, $:4, $:5) %*/
15322 }
15323#line 15324 "parse.c"
15324 break;
15325
15326 case 428: /* opt_else: k_else compstmt_stmts */
15327#line 4911 "parse.y"
15328 {
15329 (yyval.node) = (yyvsp[0].node);
15330 /*% ripper: else!($:2) %*/
15331 }
15332#line 15333 "parse.c"
15333 break;
15334
15335 case 431: /* f_marg: f_norm_arg */
15336#line 4922 "parse.y"
15337 {
15338 (yyval.node) = assignable(p, (yyvsp[0].id), 0, &(yyloc));
15339 mark_lvar_used(p, (yyval.node));
15340 }
15341#line 15342 "parse.c"
15342 break;
15343
15344 case 432: /* f_marg: "(" f_margs rparen */
15345#line 4927 "parse.y"
15346 {
15347 (yyval.node) = (NODE *)(yyvsp[-1].node_masgn);
15348 /*% ripper: mlhs_paren!($:2) %*/
15349 }
15350#line 15351 "parse.c"
15351 break;
15352
15353 case 433: /* mlhs_items_f_marg: f_marg */
15354#line 3040 "parse.y"
15355 {
15356 (yyval.node) = NEW_LIST((yyvsp[0].node), &(yyloc));
15357 /*% ripper: mlhs_add!(mlhs_new!, $:1) %*/
15358 }
15359#line 15360 "parse.c"
15360 break;
15361
15362 case 434: /* mlhs_items_f_marg: mlhs_items_f_marg ',' f_marg */
15363#line 3045 "parse.y"
15364 {
15365 (yyval.node) = list_append(p, (yyvsp[-2].node), (yyvsp[0].node));
15366 /*% ripper: mlhs_add!($:1, $:3) %*/
15367 }
15368#line 15369 "parse.c"
15369 break;
15370
15371 case 435: /* f_margs: mlhs_items_f_marg */
15372#line 4935 "parse.y"
15373 {
15374 (yyval.node_masgn) = NEW_MASGN((yyvsp[0].node), 0, &(yyloc));
15375 /*% ripper: $:1 %*/
15376 }
15377#line 15378 "parse.c"
15378 break;
15379
15380 case 436: /* f_margs: mlhs_items_f_marg ',' f_rest_marg */
15381#line 4940 "parse.y"
15382 {
15383 (yyval.node_masgn) = NEW_MASGN((yyvsp[-2].node), (yyvsp[0].node), &(yyloc));
15384 /*% ripper: mlhs_add_star!($:1, $:3) %*/
15385 }
15386#line 15387 "parse.c"
15387 break;
15388
15389 case 437: /* f_margs: mlhs_items_f_marg ',' f_rest_marg ',' mlhs_items_f_marg */
15390#line 4945 "parse.y"
15391 {
15392 (yyval.node_masgn) = NEW_MASGN((yyvsp[-4].node), NEW_POSTARG((yyvsp[-2].node), (yyvsp[0].node), &(yyloc)), &(yyloc));
15393 /*% ripper: mlhs_add_post!(mlhs_add_star!($:1, $:3), $:5) %*/
15394 }
15395#line 15396 "parse.c"
15396 break;
15397
15398 case 438: /* f_margs: f_rest_marg */
15399#line 4950 "parse.y"
15400 {
15401 (yyval.node_masgn) = NEW_MASGN(0, (yyvsp[0].node), &(yyloc));
15402 /*% ripper: mlhs_add_star!(mlhs_new!, $:1) %*/
15403 }
15404#line 15405 "parse.c"
15405 break;
15406
15407 case 439: /* f_margs: f_rest_marg ',' mlhs_items_f_marg */
15408#line 4955 "parse.y"
15409 {
15410 (yyval.node_masgn) = NEW_MASGN(0, NEW_POSTARG((yyvsp[-2].node), (yyvsp[0].node), &(yyloc)), &(yyloc));
15411 /*% ripper: mlhs_add_post!(mlhs_add_star!(mlhs_new!, $:1), $:3) %*/
15412 }
15413#line 15414 "parse.c"
15414 break;
15415
15416 case 440: /* f_rest_marg: "*" f_norm_arg */
15417#line 4962 "parse.y"
15418 {
15419 /*% ripper: $:2 %*/
15420 (yyval.node) = assignable(p, (yyvsp[0].id), 0, &(yyloc));
15421 mark_lvar_used(p, (yyval.node));
15422 }
15423#line 15424 "parse.c"
15424 break;
15425
15426 case 441: /* f_rest_marg: "*" */
15427#line 4968 "parse.y"
15428 {
15429 (yyval.node) = NODE_SPECIAL_NO_NAME_REST;
15430 /*% ripper: Qnil %*/
15431 }
15432#line 15433 "parse.c"
15433 break;
15434
15435 case 443: /* f_any_kwrest: f_no_kwarg */
15436#line 4976 "parse.y"
15437 {
15438 (yyval.id) = idNil;
15439 /*% ripper: ID2VAL(idNil) %*/
15440 }
15441#line 15442 "parse.c"
15442 break;
15443
15444 case 444: /* $@25: %empty */
15445#line 4982 "parse.y"
15446 {p->ctxt.in_argdef = 0;}
15447#line 15448 "parse.c"
15448 break;
15449
15450 case 446: /* f_kw_primary_value: f_label primary_value */
15451#line 3012 "parse.y"
15452 {
15453 p->ctxt.in_argdef = 1;
15454 (yyval.node_kw_arg) = new_kw_arg(p, assignable(p, (yyvsp[-1].id), (yyvsp[0].node), &(yyloc)), &(yyloc));
15455 /*% ripper: [$:$, $:value] %*/
15456 }
15457#line 15458 "parse.c"
15458 break;
15459
15460 case 447: /* f_kw_primary_value: f_label */
15461#line 3018 "parse.y"
15462 {
15463 p->ctxt.in_argdef = 1;
15464 (yyval.node_kw_arg) = new_kw_arg(p, assignable(p, (yyvsp[0].id), NODE_SPECIAL_REQUIRED_KEYWORD, &(yyloc)), &(yyloc));
15465 /*% ripper: [$:$, 0] %*/
15466 }
15467#line 15468 "parse.c"
15468 break;
15469
15470 case 448: /* f_kwarg_primary_value: f_kw_primary_value */
15471#line 3027 "parse.y"
15472 {
15473 (yyval.node_kw_arg) = (yyvsp[0].node_kw_arg);
15474 /*% ripper: rb_ary_new3(1, $:1) %*/
15475 }
15476#line 15477 "parse.c"
15477 break;
15478
15479 case 449: /* f_kwarg_primary_value: f_kwarg_primary_value ',' f_kw_primary_value */
15480#line 3032 "parse.y"
15481 {
15482 (yyval.node_kw_arg) = kwd_append((yyvsp[-2].node_kw_arg), (yyvsp[0].node_kw_arg));
15483 /*% ripper: rb_ary_push($:1, $:3) %*/
15484 }
15485#line 15486 "parse.c"
15486 break;
15487
15488 case 450: /* opt_f_block_arg_none: ',' f_block_arg */
15489#line 2949 "parse.y"
15490 {
15491 (yyval.id) = (yyvsp[0].id);
15492 /*% ripper: $:2 %*/
15493 }
15494#line 15495 "parse.c"
15495 break;
15496
15497 case 452: /* args_tail_basic_primary_value_none: f_kwarg_primary_value ',' f_kwrest opt_f_block_arg_none */
15498#line 2926 "parse.y"
15499 {
15500 (yyval.node_args) = new_args_tail(p, (yyvsp[-3].node_kw_arg), (yyvsp[-1].id), (yyvsp[0].id), &(yylsp[-1]));
15501 /*% ripper: [$:1, $:3, $:4] %*/
15502 }
15503#line 15504 "parse.c"
15504 break;
15505
15506 case 453: /* args_tail_basic_primary_value_none: f_kwarg_primary_value opt_f_block_arg_none */
15507#line 2931 "parse.y"
15508 {
15509 (yyval.node_args) = new_args_tail(p, (yyvsp[-1].node_kw_arg), 0, (yyvsp[0].id), &(yylsp[-1]));
15510 /*% ripper: [$:1, Qnil, $:2] %*/
15511 }
15512#line 15513 "parse.c"
15513 break;
15514
15515 case 454: /* args_tail_basic_primary_value_none: f_any_kwrest opt_f_block_arg_none */
15516#line 2936 "parse.y"
15517 {
15518 (yyval.node_args) = new_args_tail(p, 0, (yyvsp[-1].id), (yyvsp[0].id), &(yylsp[-1]));
15519 /*% ripper: [Qnil, $:1, $:2] %*/
15520 }
15521#line 15522 "parse.c"
15522 break;
15523
15524 case 455: /* args_tail_basic_primary_value_none: f_block_arg */
15525#line 2941 "parse.y"
15526 {
15527 (yyval.node_args) = new_args_tail(p, 0, 0, (yyvsp[0].id), &(yylsp[0]));
15528 /*% ripper: [Qnil, Qnil, $:1] %*/
15529 }
15530#line 15531 "parse.c"
15531 break;
15532
15533 case 457: /* excessed_comma: ',' */
15534#line 4988 "parse.y"
15535 {
15536 /* magic number for rest_id in iseq_set_arguments() */
15537 (yyval.id) = NODE_SPECIAL_EXCESSIVE_COMMA;
15538 /*% ripper: excessed_comma! %*/
15539 }
15540#line 15541 "parse.c"
15541 break;
15542
15543 case 458: /* f_opt_primary_value: f_arg_asgn f_eq primary_value */
15544#line 2990 "parse.y"
15545 {
15546 p->ctxt.in_argdef = 1;
15547 (yyval.node_opt_arg) = NEW_OPT_ARG(assignable(p, (yyvsp[-2].id), (yyvsp[0].node), &(yyloc)), &(yyloc));
15548 /*% ripper: [$:$, $:3] %*/
15549 }
15550#line 15551 "parse.c"
15551 break;
15552
15553 case 459: /* f_opt_arg_primary_value: f_opt_primary_value */
15554#line 2999 "parse.y"
15555 {
15556 (yyval.node_opt_arg) = (yyvsp[0].node_opt_arg);
15557 /*% ripper: rb_ary_new3(1, $:1) %*/
15558 }
15559#line 15560 "parse.c"
15560 break;
15561
15562 case 460: /* f_opt_arg_primary_value: f_opt_arg_primary_value ',' f_opt_primary_value */
15563#line 3004 "parse.y"
15564 {
15565 (yyval.node_opt_arg) = opt_arg_append((yyvsp[-2].node_opt_arg), (yyvsp[0].node_opt_arg));
15566 /*% ripper: rb_ary_push($:1, $:3) %*/
15567 }
15568#line 15569 "parse.c"
15569 break;
15570
15571 case 461: /* opt_args_tail_block_args_tail_none: ',' block_args_tail */
15572#line 3099 "parse.y"
15573 {
15574 (yyval.node_args) = (yyvsp[0].node_args);
15575 /*% ripper: $:tail %*/
15576 }
15577#line 15578 "parse.c"
15578 break;
15579
15580 case 462: /* opt_args_tail_block_args_tail_none: none */
15581#line 3104 "parse.y"
15582 {
15583 (yyval.node_args) = new_empty_args_tail(p, &(yyloc));
15584 /*% ripper: [Qnil, Qnil, Qnil] %*/
15585 }
15586#line 15587 "parse.c"
15587 break;
15588
15589 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 */
15590#line 6269 "parse.y"
15591 {
15592 (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));
15593 /*% ripper: params!($:pre, $:opt, $:rest, Qnil, *$:tail[0..2]) %*/
15594 }
15595#line 15596 "parse.c"
15596 break;
15597
15598 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 */
15599#line 6274 "parse.y"
15600 {
15601 (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));
15602 /*% ripper: params!($:pre, $:opt, $:rest, $:post, *$:tail[0..2]) %*/
15603 }
15604#line 15605 "parse.c"
15605 break;
15606
15607 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 */
15608#line 6279 "parse.y"
15609 {
15610 (yyval.node_args) = new_args(p, (yyvsp[-3].node_args_aux), (yyvsp[-1].node_opt_arg), 0, 0, (yyvsp[0].node_args), &(yyloc));
15611 /*% ripper: params!($:pre, $:opt, Qnil, Qnil, *$:tail[0..2]) %*/
15612 }
15613#line 15614 "parse.c"
15614 break;
15615
15616 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 */
15617#line 6284 "parse.y"
15618 {
15619 (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));
15620 /*% ripper: params!($:pre, $:opt, Qnil, $:post, *$:tail[0..2]) %*/
15621 }
15622#line 15623 "parse.c"
15623 break;
15624
15625 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 */
15626#line 6289 "parse.y"
15627 {
15628 (yyval.node_args) = new_args(p, (yyvsp[-3].node_args_aux), 0, (yyvsp[-1].id), 0, (yyvsp[0].node_args), &(yyloc));
15629 /*% ripper: params!($:pre, Qnil, $:rest, Qnil, *$:tail[0..2]) %*/
15630 }
15631#line 15632 "parse.c"
15632 break;
15633
15634 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 */
15635#line 6294 "parse.y"
15636 {
15637 (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));
15638 /*% ripper: params!($:pre, Qnil, $:rest, $:post, *$:tail[0..2]) %*/
15639 }
15640#line 15641 "parse.c"
15641 break;
15642
15643 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 */
15644#line 6299 "parse.y"
15645 {
15646 (yyval.node_args) = new_args(p, 0, (yyvsp[-3].node_opt_arg), (yyvsp[-1].id), 0, (yyvsp[0].node_args), &(yyloc));
15647 /*% ripper: params!(Qnil, $:opt, $:rest, Qnil, *$:tail[0..2]) %*/
15648 }
15649#line 15650 "parse.c"
15650 break;
15651
15652 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 */
15653#line 6304 "parse.y"
15654 {
15655 (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));
15656 /*% ripper: params!(Qnil, $:opt, $:rest, $:post, *$:tail[0..2]) %*/
15657 }
15658#line 15659 "parse.c"
15659 break;
15660
15661 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 */
15662#line 6309 "parse.y"
15663 {
15664 (yyval.node_args) = new_args(p, 0, (yyvsp[-1].node_opt_arg), 0, 0, (yyvsp[0].node_args), &(yyloc));
15665 /*% ripper: params!(Qnil, $:opt, Qnil, Qnil, *$:tail[0..2]) %*/
15666 }
15667#line 15668 "parse.c"
15668 break;
15669
15670 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 */
15671#line 6314 "parse.y"
15672 {
15673 (yyval.node_args) = new_args(p, 0, (yyvsp[-3].node_opt_arg), 0, (yyvsp[-1].node_args_aux), (yyvsp[0].node_args), &(yyloc));
15674 /*% ripper: params!(Qnil, $:opt, Qnil, $:post, *$:tail[0..2]) %*/
15675 }
15676#line 15677 "parse.c"
15677 break;
15678
15679 case 473: /* args-list_primary_value_opt_args_tail_block_args_tail_none: f_rest_arg opt_args_tail_block_args_tail_none */
15680#line 6319 "parse.y"
15681 {
15682 (yyval.node_args) = new_args(p, 0, 0, (yyvsp[-1].id), 0, (yyvsp[0].node_args), &(yyloc));
15683 /*% ripper: params!(Qnil, Qnil, $:rest, Qnil, *$:tail[0..2]) %*/
15684 }
15685#line 15686 "parse.c"
15686 break;
15687
15688 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 */
15689#line 6324 "parse.y"
15690 {
15691 (yyval.node_args) = new_args(p, 0, 0, (yyvsp[-3].id), (yyvsp[-1].node_args_aux), (yyvsp[0].node_args), &(yyloc));
15692 /*% ripper: params!(Qnil, Qnil, $:rest, $:post, *$:tail[0..2]) %*/
15693 }
15694#line 15695 "parse.c"
15695 break;
15696
15697 case 476: /* block_param: f_arg excessed_comma */
15698#line 4997 "parse.y"
15699 {
15700 (yyval.node_args) = new_empty_args_tail(p, &(yylsp[0]));
15701 (yyval.node_args) = new_args(p, (yyvsp[-1].node_args_aux), 0, (yyvsp[0].id), 0, (yyval.node_args), &(yyloc));
15702 /*% ripper: params!($:pre, Qnil, $:excessed_comma, Qnil, Qnil, Qnil, Qnil) %*/
15703 }
15704#line 15705 "parse.c"
15705 break;
15706
15707 case 477: /* block_param: f_arg opt_args_tail_block_args_tail_none */
15708#line 5003 "parse.y"
15709 {
15710 (yyval.node_args) = new_args(p, (yyvsp[-1].node_args_aux), 0, 0, 0, (yyvsp[0].node_args), &(yyloc));
15711 /*% ripper: params!($:pre, Qnil, Qnil, Qnil, *$:tail[0..2]) %*/
15712 }
15713#line 15714 "parse.c"
15714 break;
15715
15716 case 478: /* tail-only-args_block_args_tail: block_args_tail */
15717#line 6332 "parse.y"
15718 {
15719 (yyval.node_args) = new_args(p, 0, 0, 0, 0, (yyvsp[0].node_args), &(yyloc));
15720 /*% ripper: params!(Qnil, Qnil, Qnil, Qnil, *$:tail[0..2]) %*/
15721 }
15722#line 15723 "parse.c"
15723 break;
15724
15725 case 481: /* opt_block_param_def: block_param_def */
15726#line 5012 "parse.y"
15727 {
15728 p->command_start = TRUE;
15729 }
15730#line 15731 "parse.c"
15731 break;
15732
15733 case 482: /* block_param_def: '|' opt_block_param opt_bv_decl '|' */
15734#line 5018 "parse.y"
15735 {
15736 p->max_numparam = ORDINAL_PARAM;
15737 p->ctxt.in_argdef = 0;
15738 (yyval.node_args) = (yyvsp[-2].node_args);
15739 /*% ripper: block_var!($:2, $:3) %*/
15740 }
15741#line 15742 "parse.c"
15742 break;
15743
15744 case 483: /* opt_block_param: %empty */
15745#line 5027 "parse.y"
15746 {
15747 (yyval.node_args) = 0;
15748 /*% ripper: params!(Qnil,Qnil,Qnil,Qnil,Qnil,Qnil,Qnil) %*/
15749 }
15750#line 15751 "parse.c"
15751 break;
15752
15753 case 485: /* opt_bv_decl: option_'\n' */
15754#line 5035 "parse.y"
15755 {
15756 (yyval.id) = 0;
15757 /*% ripper: Qfalse %*/
15758 }
15759#line 15760 "parse.c"
15760 break;
15761
15762 case 486: /* opt_bv_decl: option_'\n' ';' bv_decls option_'\n' */
15763#line 5040 "parse.y"
15764 {
15765 (yyval.id) = 0;
15766 /*% ripper: $:3 %*/
15767 }
15768#line 15769 "parse.c"
15769 break;
15770
15771 case 489: /* bvar: "local variable or method" */
15772#line 5053 "parse.y"
15773 {
15774 new_bv(p, (yyvsp[0].id));
15775 /*% ripper: $:1 %*/
15776 }
15777#line 15778 "parse.c"
15778 break;
15779
15780 case 491: /* max_numparam: %empty */
15781#line 5060 "parse.y"
15782 {
15783 (yyval.num) = p->max_numparam;
15784 p->max_numparam = 0;
15785 }
15786#line 15787 "parse.c"
15787 break;
15788
15789 case 492: /* numparam: %empty */
15790#line 5066 "parse.y"
15791 {
15792 (yyval.node) = numparam_push(p);
15793 }
15794#line 15795 "parse.c"
15795 break;
15796
15797 case 493: /* it_id: %empty */
15798#line 5071 "parse.y"
15799 {
15800 (yyval.id) = p->it_id;
15801 p->it_id = 0;
15802 }
15803#line 15804 "parse.c"
15804 break;
15805
15806 case 494: /* @26: %empty */
15807#line 5078 "parse.y"
15808 {
15809 token_info_push(p, "->", &(yylsp[0]));
15810 (yyval.vars) = dyna_push(p);
15811 }
15812#line 15813 "parse.c"
15813 break;
15814
15815 case 495: /* $@27: %empty */
15816#line 5084 "parse.y"
15817 {
15818 CMDARG_PUSH(0);
15819 }
15820#line 15821 "parse.c"
15821 break;
15822
15823 case 496: /* lambda: "->" @26 max_numparam numparam it_id allow_exits f_larglist $@27 lambda_body */
15824#line 5088 "parse.y"
15825 {
15826 int max_numparam = p->max_numparam;
15827 ID it_id = p->it_id;
15828 p->lex.lpar_beg = (yyvsp[-8].num);
15829 p->max_numparam = (yyvsp[-6].num);
15830 p->it_id = (yyvsp[-4].id);
15831 restore_block_exit(p, (yyvsp[-3].node_exits));
15832 CMDARG_POP();
15833 (yyvsp[-2].node_args) = args_with_numbered(p, (yyvsp[-2].node_args), max_numparam, it_id);
15834 {
15835 YYLTYPE loc = code_loc_gen(&(yylsp[-8]), &(yylsp[0]));
15836 (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);
15837 nd_set_line(RNODE_LAMBDA((yyval.node))->nd_body, (yylsp[0]).end_pos.lineno);
15838 nd_set_line((yyval.node), (yylsp[-2]).end_pos.lineno);
15839 nd_set_first_loc((yyval.node), (yylsp[-8]).beg_pos);
15840 xfree((yyvsp[0].locations_lambda_body));
15841 }
15842 /*% ripper: lambda!($:args, $:body) %*/
15843 numparam_pop(p, (yyvsp[-5].node));
15844 dyna_pop(p, (yyvsp[-7].vars));
15845 }
15846#line 15847 "parse.c"
15847 break;
15848
15849 case 497: /* f_larglist: '(' f_largs opt_bv_decl ')' */
15850#line 5112 "parse.y"
15851 {
15852 p->ctxt.in_argdef = 0;
15853 (yyval.node_args) = (yyvsp[-2].node_args);
15854 p->max_numparam = ORDINAL_PARAM;
15855 /*% ripper: paren!($:args) %*/
15856 }
15857#line 15858 "parse.c"
15858 break;
15859
15860 case 498: /* f_larglist: f_largs */
15861#line 5119 "parse.y"
15862 {
15863 p->ctxt.in_argdef = 0;
15864 if (!args_info_empty_p(&(yyvsp[0].node_args)->nd_ainfo))
15865 p->max_numparam = ORDINAL_PARAM;
15866 (yyval.node_args) = (yyvsp[0].node_args);
15867 }
15868#line 15869 "parse.c"
15869 break;
15870
15871 case 499: /* lambda_body: tLAMBEG compstmt_stmts '}' */
15872#line 5128 "parse.y"
15873 {
15874 token_info_pop(p, "}", &(yylsp[0]));
15875 (yyval.locations_lambda_body) = new_locations_lambda_body(p, (yyvsp[-1].node), &(yylsp[-1]), &(yylsp[-2]), &(yylsp[0]));
15876 /*% ripper: $:2 %*/
15877 }
15878#line 15879 "parse.c"
15879 break;
15880
15881 case 500: /* $@28: %empty */
15882#line 5134 "parse.y"
15883 {
15884 push_end_expect_token_locations(p, &(yylsp[0]).beg_pos);
15885 }
15886#line 15887 "parse.c"
15887 break;
15888
15889 case 501: /* lambda_body: "'do' for lambda" $@28 bodystmt k_end */
15890#line 5138 "parse.y"
15891 {
15892 (yyval.locations_lambda_body) = new_locations_lambda_body(p, (yyvsp[-1].node), &(yylsp[-1]), &(yylsp[-3]), &(yylsp[0]));
15893 /*% ripper: $:3 %*/
15894 }
15895#line 15896 "parse.c"
15896 break;
15897
15898 case 502: /* do_block: k_do_block do_body k_end */
15899#line 5145 "parse.y"
15900 {
15901 (yyval.node) = (yyvsp[-1].node);
15902 set_embraced_location((yyval.node), &(yylsp[-2]), &(yylsp[0]));
15903 /*% ripper: $:2 %*/
15904 }
15905#line 15906 "parse.c"
15906 break;
15907
15908 case 503: /* block_call: command do_block */
15909#line 5153 "parse.y"
15910 {
15911 (yyval.node) = command_add_block(p, (yyvsp[-1].node), (yyvsp[0].node), &(yyloc));
15912 fixpos((yyval.node), (yyvsp[-1].node));
15913 /*% ripper: method_add_block!($:1, $:2) %*/
15914 }
15915#line 15916 "parse.c"
15916 break;
15917
15918 case 504: /* block_call: block_call call_op2 operation2 opt_paren_args */
15919#line 5159 "parse.y"
15920 {
15921 bool has_args = (yyvsp[0].node) != 0;
15922 if (NODE_EMPTY_ARGS_P((yyvsp[0].node))) (yyvsp[0].node) = 0;
15923 (yyval.node) = new_qcall(p, (yyvsp[-2].id), (yyvsp[-3].node), (yyvsp[-1].id), (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
15924 /*% ripper: call!($:1, $:2, $:3) %*/
15925 if (has_args) {
15926 /*% ripper: method_add_arg!($:$, $:4) %*/
15927 }
15928 }
15929#line 15930 "parse.c"
15930 break;
15931
15932 case 505: /* block_call: block_call call_op2 operation2 opt_paren_args brace_block */
15933#line 5169 "parse.y"
15934 {
15935 if (NODE_EMPTY_ARGS_P((yyvsp[-1].node))) (yyvsp[-1].node) = 0;
15936 (yyval.node) = new_command_qcall(p, (yyvsp[-3].id), (yyvsp[-4].node), (yyvsp[-2].id), (yyvsp[-1].node), (yyvsp[0].node), &(yylsp[-2]), &(yyloc));
15937 /*% ripper: method_add_block!(command_call!($:1, $:2, $:3, $:4), $:5) %*/
15938 }
15939#line 15940 "parse.c"
15940 break;
15941
15942 case 506: /* block_call: block_call call_op2 operation2 command_args do_block */
15943#line 5175 "parse.y"
15944 {
15945 (yyval.node) = new_command_qcall(p, (yyvsp[-3].id), (yyvsp[-4].node), (yyvsp[-2].id), (yyvsp[-1].node), (yyvsp[0].node), &(yylsp[-2]), &(yyloc));
15946 /*% ripper: method_add_block!(command_call!($:1, $:2, $:3, $:4), $:5) %*/
15947 }
15948#line 15949 "parse.c"
15949 break;
15950
15951 case 507: /* block_call: block_call call_op2 paren_args */
15952#line 5180 "parse.y"
15953 {
15954 (yyval.node) = new_qcall(p, (yyvsp[-1].id), (yyvsp[-2].node), idCall, (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
15955 nd_set_line((yyval.node), (yylsp[-1]).end_pos.lineno);
15956 /*% ripper: method_add_arg!(call!($:1, $:2, ID2VAL(idCall)), $:3) %*/
15957 }
15958#line 15959 "parse.c"
15959 break;
15960
15961 case 508: /* method_call: fcall paren_args */
15962#line 5188 "parse.y"
15963 {
15964 (yyvsp[-1].node_fcall)->nd_args = (yyvsp[0].node);
15965 (yyval.node) = (NODE *)(yyvsp[-1].node_fcall);
15966 nd_set_last_loc((yyvsp[-1].node_fcall), (yylsp[0]).end_pos);
15967 /*% ripper: method_add_arg!(fcall!($:1), $:2) %*/
15968 }
15969#line 15970 "parse.c"
15970 break;
15971
15972 case 509: /* method_call: primary_value call_op operation2 opt_paren_args */
15973#line 5195 "parse.y"
15974 {
15975 bool has_args = (yyvsp[0].node) != 0;
15976 if (NODE_EMPTY_ARGS_P((yyvsp[0].node))) (yyvsp[0].node) = 0;
15977 (yyval.node) = new_qcall(p, (yyvsp[-2].id), (yyvsp[-3].node), (yyvsp[-1].id), (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
15978 nd_set_line((yyval.node), (yylsp[-1]).end_pos.lineno);
15979 /*% ripper: call!($:1, $:2, $:3) %*/
15980 if (has_args) {
15981 /*% ripper: method_add_arg!($:$, $:4) %*/
15982 }
15983 }
15984#line 15985 "parse.c"
15985 break;
15986
15987 case 510: /* method_call: primary_value "::" operation2 paren_args */
15988#line 5206 "parse.y"
15989 {
15990 (yyval.node) = new_qcall(p, idCOLON2, (yyvsp[-3].node), (yyvsp[-1].id), (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
15991 nd_set_line((yyval.node), (yylsp[-1]).end_pos.lineno);
15992 /*% ripper: method_add_arg!(call!($:1, $:2, $:3), $:4) %*/
15993 }
15994#line 15995 "parse.c"
15995 break;
15996
15997 case 511: /* method_call: primary_value "::" operation3 */
15998#line 5212 "parse.y"
15999 {
16000 (yyval.node) = new_qcall(p, idCOLON2, (yyvsp[-2].node), (yyvsp[0].id), 0, &(yylsp[0]), &(yyloc));
16001 /*% ripper: call!($:1, $:2, $:3) %*/
16002 }
16003#line 16004 "parse.c"
16004 break;
16005
16006 case 512: /* method_call: primary_value call_op2 paren_args */
16007#line 5217 "parse.y"
16008 {
16009 (yyval.node) = new_qcall(p, (yyvsp[-1].id), (yyvsp[-2].node), idCall, (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
16010 nd_set_line((yyval.node), (yylsp[-1]).end_pos.lineno);
16011 /*% ripper: method_add_arg!(call!($:1, $:2, ID2VAL(idCall)), $:3) %*/
16012 }
16013#line 16014 "parse.c"
16014 break;
16015
16016 case 513: /* method_call: "'super'" paren_args */
16017#line 5223 "parse.y"
16018 {
16019 rb_code_location_t lparen_loc = (yylsp[0]);
16020 rb_code_location_t rparen_loc = (yylsp[0]);
16021 lparen_loc.end_pos.column = lparen_loc.beg_pos.column + 1;
16022 rparen_loc.beg_pos.column = rparen_loc.end_pos.column - 1;
16023
16024 (yyval.node) = NEW_SUPER((yyvsp[0].node), &(yyloc), &(yylsp[-1]), &lparen_loc, &rparen_loc);
16025 /*% ripper: super!($:2) %*/
16026 }
16027#line 16028 "parse.c"
16028 break;
16029
16030 case 514: /* method_call: "'super'" */
16031#line 5233 "parse.y"
16032 {
16033 (yyval.node) = NEW_ZSUPER(&(yyloc));
16034 /*% ripper: zsuper! %*/
16035 }
16036#line 16037 "parse.c"
16037 break;
16038
16039 case 515: /* method_call: primary_value '[' opt_call_args rbracket */
16040#line 5238 "parse.y"
16041 {
16042 (yyval.node) = NEW_CALL((yyvsp[-3].node), tAREF, (yyvsp[-1].node), &(yyloc));
16043 fixpos((yyval.node), (yyvsp[-3].node));
16044 /*% ripper: aref!($:1, $:3) %*/
16045 }
16046#line 16047 "parse.c"
16047 break;
16048
16049 case 516: /* brace_block: '{' brace_body '}' */
16050#line 5246 "parse.y"
16051 {
16052 (yyval.node) = (yyvsp[-1].node);
16053 set_embraced_location((yyval.node), &(yylsp[-2]), &(yylsp[0]));
16054 /*% ripper: $:2 %*/
16055 }
16056#line 16057 "parse.c"
16057 break;
16058
16059 case 517: /* brace_block: k_do do_body k_end */
16060#line 5252 "parse.y"
16061 {
16062 (yyval.node) = (yyvsp[-1].node);
16063 set_embraced_location((yyval.node), &(yylsp[-2]), &(yylsp[0]));
16064 /*% ripper: $:2 %*/
16065 }
16066#line 16067 "parse.c"
16067 break;
16068
16069 case 518: /* @29: %empty */
16070#line 5259 "parse.y"
16071 {(yyval.vars) = dyna_push(p);}
16072#line 16073 "parse.c"
16073 break;
16074
16075 case 519: /* brace_body: @29 max_numparam numparam it_id allow_exits opt_block_param_def compstmt_stmts */
16076#line 5262 "parse.y"
16077 {
16078 int max_numparam = p->max_numparam;
16079 ID it_id = p->it_id;
16080 p->max_numparam = (yyvsp[-5].num);
16081 p->it_id = (yyvsp[-3].id);
16082 (yyvsp[-1].node_args) = args_with_numbered(p, (yyvsp[-1].node_args), max_numparam, it_id);
16083 (yyval.node) = NEW_ITER((yyvsp[-1].node_args), (yyvsp[0].node), &(yyloc));
16084 /*% ripper: brace_block!($:args, $:compstmt) %*/
16085 restore_block_exit(p, (yyvsp[-2].node_exits));
16086 numparam_pop(p, (yyvsp[-4].node));
16087 dyna_pop(p, (yyvsp[-6].vars));
16088 }
16089#line 16090 "parse.c"
16090 break;
16091
16092 case 520: /* @30: %empty */
16093#line 5276 "parse.y"
16094 {
16095 (yyval.vars) = dyna_push(p);
16096 CMDARG_PUSH(0);
16097 }
16098#line 16099 "parse.c"
16099 break;
16100
16101 case 521: /* do_body: @30 max_numparam numparam it_id allow_exits opt_block_param_def bodystmt */
16102#line 5282 "parse.y"
16103 {
16104 int max_numparam = p->max_numparam;
16105 ID it_id = p->it_id;
16106 p->max_numparam = (yyvsp[-5].num);
16107 p->it_id = (yyvsp[-3].id);
16108 (yyvsp[-1].node_args) = args_with_numbered(p, (yyvsp[-1].node_args), max_numparam, it_id);
16109 (yyval.node) = NEW_ITER((yyvsp[-1].node_args), (yyvsp[0].node), &(yyloc));
16110 /*% ripper: do_block!($:args, $:bodystmt) %*/
16111 CMDARG_POP();
16112 restore_block_exit(p, (yyvsp[-2].node_exits));
16113 numparam_pop(p, (yyvsp[-4].node));
16114 dyna_pop(p, (yyvsp[-6].vars));
16115 }
16116#line 16117 "parse.c"
16117 break;
16118
16119 case 522: /* case_args: arg_value */
16120#line 5298 "parse.y"
16121 {
16122 check_literal_when(p, (yyvsp[0].node), &(yylsp[0]));
16123 (yyval.node) = NEW_LIST((yyvsp[0].node), &(yyloc));
16124 /*% ripper: args_add!(args_new!, $:arg_value) %*/
16125 }
16126#line 16127 "parse.c"
16127 break;
16128
16129 case 523: /* case_args: "*" arg_value */
16130#line 5304 "parse.y"
16131 {
16132 (yyval.node) = NEW_SPLAT((yyvsp[0].node), &(yyloc), &(yylsp[-1]));
16133 /*% ripper: args_add_star!(args_new!, $:arg_value) %*/
16134 }
16135#line 16136 "parse.c"
16136 break;
16137
16138 case 524: /* case_args: case_args ',' arg_value */
16139#line 5309 "parse.y"
16140 {
16141 check_literal_when(p, (yyvsp[0].node), &(yylsp[0]));
16142 (yyval.node) = last_arg_append(p, (yyvsp[-2].node), (yyvsp[0].node), &(yyloc));
16143 /*% ripper: args_add!($:non_last_args, $:arg_value) %*/
16144 }
16145#line 16146 "parse.c"
16146 break;
16147
16148 case 525: /* case_args: case_args ',' "*" arg_value */
16149#line 5315 "parse.y"
16150 {
16151 (yyval.node) = rest_arg_append(p, (yyvsp[-3].node), (yyvsp[0].node), &(yyloc));
16152 /*% ripper: args_add_star!($:non_last_args, $:arg_value) %*/
16153 }
16154#line 16155 "parse.c"
16155 break;
16156
16157 case 526: /* case_body: k_when case_args then compstmt_stmts cases */
16158#line 5324 "parse.y"
16159 {
16160 (yyval.node) = NEW_WHEN((yyvsp[-3].node), (yyvsp[-1].node), (yyvsp[0].node), &(yyloc), &(yylsp[-4]), &(yylsp[-2]));
16161 fixpos((yyval.node), (yyvsp[-3].node));
16162 /*% ripper: when!($:2, $:4, $:5) %*/
16163 }
16164#line 16165 "parse.c"
16165 break;
16166
16167 case 529: /* p_pvtbl: %empty */
16168#line 5335 "parse.y"
16169 {(yyval.tbl) = p->pvtbl; p->pvtbl = st_init_numtable();}
16170#line 16171 "parse.c"
16171 break;
16172
16173 case 530: /* p_pktbl: %empty */
16174#line 5336 "parse.y"
16175 {(yyval.tbl) = p->pktbl; p->pktbl = 0;}
16176#line 16177 "parse.c"
16177 break;
16178
16179 case 531: /* p_in_kwarg: %empty */
16180#line 5338 "parse.y"
16181 {
16182 (yyval.ctxt) = p->ctxt;
16183 SET_LEX_STATE(EXPR_BEG|EXPR_LABEL);
16184 p->command_start = FALSE;
16185 p->ctxt.in_kwarg = 1;
16186 p->ctxt.in_alt_pattern = 0;
16187 p->ctxt.capture_in_pattern = 0;
16188 }
16189#line 16190 "parse.c"
16190 break;
16191
16192 case 532: /* $@31: %empty */
16193#line 5351 "parse.y"
16194 {
16195 pop_pktbl(p, (yyvsp[-2].tbl));
16196 pop_pvtbl(p, (yyvsp[-3].tbl));
16197 p->ctxt.in_kwarg = (yyvsp[-4].ctxt).in_kwarg;
16198 p->ctxt.in_alt_pattern = (yyvsp[-4].ctxt).in_alt_pattern;
16199 p->ctxt.capture_in_pattern = (yyvsp[-4].ctxt).capture_in_pattern;
16200 }
16201#line 16202 "parse.c"
16202 break;
16203
16204 case 533: /* p_case_body: "'in'" p_in_kwarg p_pvtbl p_pktbl p_top_expr then $@31 compstmt_stmts p_cases */
16205#line 5360 "parse.y"
16206 {
16207 (yyval.node) = NEW_IN((yyvsp[-4].node), (yyvsp[-1].node), (yyvsp[0].node), &(yyloc), &(yylsp[-8]), &(yylsp[-3]), &NULL_LOC);
16208 /*% ripper: in!($:expr, $:compstmt, $:cases) %*/
16209 }
16210#line 16211 "parse.c"
16211 break;
16212
16213 case 537: /* p_top_expr: p_top_expr_body "'if' modifier" expr_value */
16214#line 5372 "parse.y"
16215 {
16216 (yyval.node) = new_if(p, (yyvsp[0].node), (yyvsp[-2].node), 0, &(yyloc), &(yylsp[-1]), &NULL_LOC, &NULL_LOC);
16217 fixpos((yyval.node), (yyvsp[0].node));
16218 /*% ripper: if_mod!($:3, $:1) %*/
16219 }
16220#line 16221 "parse.c"
16221 break;
16222
16223 case 538: /* p_top_expr: p_top_expr_body "'unless' modifier" expr_value */
16224#line 5378 "parse.y"
16225 {
16226 (yyval.node) = new_unless(p, (yyvsp[0].node), (yyvsp[-2].node), 0, &(yyloc), &(yylsp[-1]), &NULL_LOC, &NULL_LOC);
16227 fixpos((yyval.node), (yyvsp[0].node));
16228 /*% ripper: unless_mod!($:3, $:1) %*/
16229 }
16230#line 16231 "parse.c"
16231 break;
16232
16233 case 540: /* p_top_expr_body: p_expr ',' */
16234#line 5387 "parse.y"
16235 {
16236 (yyval.node) = new_array_pattern_tail(p, 0, 1, 0, 0, &(yyloc));
16237 (yyval.node) = new_array_pattern(p, 0, (yyvsp[-1].node), (yyval.node), &(yyloc));
16238 /*% ripper: aryptn!(Qnil, [$:1], Qnil, Qnil) %*/
16239 }
16240#line 16241 "parse.c"
16241 break;
16242
16243 case 541: /* p_top_expr_body: p_expr ',' p_args */
16244#line 5393 "parse.y"
16245 {
16246 (yyval.node) = new_array_pattern(p, 0, (yyvsp[-2].node), (yyvsp[0].node), &(yyloc));
16247 nd_set_first_loc((yyval.node), (yylsp[-2]).beg_pos);
16248 /*% ripper: aryptn!(Qnil, aryptn_pre_args(p, $:1, $:3[0]), *$:3[1..2]) %*/
16249 }
16250#line 16251 "parse.c"
16251 break;
16252
16253 case 542: /* p_top_expr_body: p_find */
16254#line 5399 "parse.y"
16255 {
16256 (yyval.node) = new_find_pattern(p, 0, (yyvsp[0].node), &(yyloc));
16257 /*% ripper: fndptn!(Qnil, *$:1[0..2]) %*/
16258 }
16259#line 16260 "parse.c"
16260 break;
16261
16262 case 543: /* p_top_expr_body: p_args_tail */
16263#line 5404 "parse.y"
16264 {
16265 (yyval.node) = new_array_pattern(p, 0, 0, (yyvsp[0].node), &(yyloc));
16266 /*% ripper: aryptn!(Qnil, *$:1[0..2]) %*/
16267 }
16268#line 16269 "parse.c"
16269 break;
16270
16271 case 544: /* p_top_expr_body: p_kwargs */
16272#line 5409 "parse.y"
16273 {
16274 (yyval.node) = new_hash_pattern(p, 0, (yyvsp[0].node), &(yyloc));
16275 /*% ripper: hshptn!(Qnil, *$:1[0..1]) %*/
16276 }
16277#line 16278 "parse.c"
16278 break;
16279
16280 case 546: /* p_as: p_expr "=>" p_variable */
16281#line 5419 "parse.y"
16282 {
16283 NODE *n = NEW_LIST((yyvsp[-2].node), &(yyloc));
16284 n = list_append(p, n, (yyvsp[0].node));
16285 (yyval.node) = new_hash(p, n, &(yyloc));
16286 /*% ripper: binary!($:1, ID2VAL((id_assoc)), $:3) %*/
16287 }
16288#line 16289 "parse.c"
16289 break;
16290
16291 case 548: /* $@32: %empty */
16292#line 5429 "parse.y"
16293 {
16294 p->ctxt.in_alt_pattern = 1;
16295 }
16296#line 16297 "parse.c"
16297 break;
16298
16299 case 549: /* p_alt: p_alt '|' $@32 p_expr_basic */
16300#line 5433 "parse.y"
16301 {
16302 if (p->ctxt.capture_in_pattern) {
16303 yyerror1(&(yylsp[-2]), "alternative pattern after variable capture");
16304 }
16305 p->ctxt.in_alt_pattern = 0;
16306 (yyval.node) = NEW_OR((yyvsp[-3].node), (yyvsp[0].node), &(yyloc), &(yylsp[-2]));
16307 /*% ripper: binary!($:left, ID2VAL(idOr), $:right) %*/
16308 }
16309#line 16310 "parse.c"
16310 break;
16311
16312 case 551: /* p_lparen: '(' p_pktbl */
16313#line 5445 "parse.y"
16314 {
16315 (yyval.tbl) = (yyvsp[0].tbl);
16316 /*% ripper: $:2 %*/
16317 }
16318#line 16319 "parse.c"
16319 break;
16320
16321 case 552: /* p_lbracket: '[' p_pktbl */
16322#line 5452 "parse.y"
16323 {
16324 (yyval.tbl) = (yyvsp[0].tbl);
16325 /*% ripper: $:2 %*/
16326 }
16327#line 16328 "parse.c"
16328 break;
16329
16330 case 555: /* p_expr_basic: p_const p_lparen p_args rparen */
16331#line 5461 "parse.y"
16332 {
16333 pop_pktbl(p, (yyvsp[-2].tbl));
16334 (yyval.node) = new_array_pattern(p, (yyvsp[-3].node), 0, (yyvsp[-1].node), &(yyloc));
16335 nd_set_first_loc((yyval.node), (yylsp[-3]).beg_pos);
16336 /*% ripper: aryptn!($:p_const, *$:p_args[0..2]) %*/
16337 }
16338#line 16339 "parse.c"
16339 break;
16340
16341 case 556: /* p_expr_basic: p_const p_lparen p_find rparen */
16342#line 5468 "parse.y"
16343 {
16344 pop_pktbl(p, (yyvsp[-2].tbl));
16345 (yyval.node) = new_find_pattern(p, (yyvsp[-3].node), (yyvsp[-1].node), &(yyloc));
16346 nd_set_first_loc((yyval.node), (yylsp[-3]).beg_pos);
16347 /*% ripper: fndptn!($:p_const, *$:p_find[0..2]) %*/
16348 }
16349#line 16350 "parse.c"
16350 break;
16351
16352 case 557: /* p_expr_basic: p_const p_lparen p_kwargs rparen */
16353#line 5475 "parse.y"
16354 {
16355 pop_pktbl(p, (yyvsp[-2].tbl));
16356 (yyval.node) = new_hash_pattern(p, (yyvsp[-3].node), (yyvsp[-1].node), &(yyloc));
16357 nd_set_first_loc((yyval.node), (yylsp[-3]).beg_pos);
16358 /*% ripper: hshptn!($:p_const, *$:p_kwargs[0..1]) %*/
16359 }
16360#line 16361 "parse.c"
16361 break;
16362
16363 case 558: /* p_expr_basic: p_const '(' rparen */
16364#line 5482 "parse.y"
16365 {
16366 (yyval.node) = new_array_pattern_tail(p, 0, 0, 0, 0, &(yyloc));
16367 (yyval.node) = new_array_pattern(p, (yyvsp[-2].node), 0, (yyval.node), &(yyloc));
16368 /*% ripper: aryptn!($:p_const, Qnil, Qnil, Qnil) %*/
16369 }
16370#line 16371 "parse.c"
16371 break;
16372
16373 case 559: /* p_expr_basic: p_const p_lbracket p_args rbracket */
16374#line 5488 "parse.y"
16375 {
16376 pop_pktbl(p, (yyvsp[-2].tbl));
16377 (yyval.node) = new_array_pattern(p, (yyvsp[-3].node), 0, (yyvsp[-1].node), &(yyloc));
16378 nd_set_first_loc((yyval.node), (yylsp[-3]).beg_pos);
16379 /*% ripper: aryptn!($:p_const, *$:p_args[0..2]) %*/
16380 }
16381#line 16382 "parse.c"
16382 break;
16383
16384 case 560: /* p_expr_basic: p_const p_lbracket p_find rbracket */
16385#line 5495 "parse.y"
16386 {
16387 pop_pktbl(p, (yyvsp[-2].tbl));
16388 (yyval.node) = new_find_pattern(p, (yyvsp[-3].node), (yyvsp[-1].node), &(yyloc));
16389 nd_set_first_loc((yyval.node), (yylsp[-3]).beg_pos);
16390 /*% ripper: fndptn!($:p_const, *$:p_find[0..2]) %*/
16391 }
16392#line 16393 "parse.c"
16393 break;
16394
16395 case 561: /* p_expr_basic: p_const p_lbracket p_kwargs rbracket */
16396#line 5502 "parse.y"
16397 {
16398 pop_pktbl(p, (yyvsp[-2].tbl));
16399 (yyval.node) = new_hash_pattern(p, (yyvsp[-3].node), (yyvsp[-1].node), &(yyloc));
16400 nd_set_first_loc((yyval.node), (yylsp[-3]).beg_pos);
16401 /*% ripper: hshptn!($:p_const, *$:p_kwargs[0..1]) %*/
16402 }
16403#line 16404 "parse.c"
16404 break;
16405
16406 case 562: /* p_expr_basic: p_const '[' rbracket */
16407#line 5509 "parse.y"
16408 {
16409 (yyval.node) = new_array_pattern_tail(p, 0, 0, 0, 0, &(yyloc));
16410 (yyval.node) = new_array_pattern(p, (yyvsp[-2].node), 0, (yyval.node), &(yyloc));
16411 /*% ripper: aryptn!($:p_const, Qnil, Qnil, Qnil) %*/
16412 }
16413#line 16414 "parse.c"
16414 break;
16415
16416 case 563: /* p_expr_basic: "[" p_args rbracket */
16417#line 5515 "parse.y"
16418 {
16419 (yyval.node) = new_array_pattern(p, 0, 0, (yyvsp[-1].node), &(yyloc));
16420 /*% ripper: aryptn!(Qnil, *$:p_args[0..2]) %*/
16421 }
16422#line 16423 "parse.c"
16423 break;
16424
16425 case 564: /* p_expr_basic: "[" p_find rbracket */
16426#line 5520 "parse.y"
16427 {
16428 (yyval.node) = new_find_pattern(p, 0, (yyvsp[-1].node), &(yyloc));
16429 /*% ripper: fndptn!(Qnil, *$:p_find[0..2]) %*/
16430 }
16431#line 16432 "parse.c"
16432 break;
16433
16434 case 565: /* p_expr_basic: "[" rbracket */
16435#line 5525 "parse.y"
16436 {
16437 (yyval.node) = new_array_pattern_tail(p, 0, 0, 0, 0, &(yyloc));
16438 (yyval.node) = new_array_pattern(p, 0, 0, (yyval.node), &(yyloc));
16439 /*% ripper: aryptn!(Qnil, Qnil, Qnil, Qnil) %*/
16440 }
16441#line 16442 "parse.c"
16442 break;
16443
16444 case 566: /* $@33: %empty */
16445#line 5531 "parse.y"
16446 {
16447 p->ctxt.in_kwarg = 0;
16448 }
16449#line 16450 "parse.c"
16450 break;
16451
16452 case 567: /* p_expr_basic: "{" p_pktbl lex_ctxt $@33 p_kwargs rbrace */
16453#line 5535 "parse.y"
16454 {
16455 pop_pktbl(p, (yyvsp[-4].tbl));
16456 p->ctxt.in_kwarg = (yyvsp[-3].ctxt).in_kwarg;
16457 (yyval.node) = new_hash_pattern(p, 0, (yyvsp[-1].node), &(yyloc));
16458 /*% ripper: hshptn!(Qnil, *$:p_kwargs[0..1]) %*/
16459 }
16460#line 16461 "parse.c"
16461 break;
16462
16463 case 568: /* p_expr_basic: "{" rbrace */
16464#line 5542 "parse.y"
16465 {
16466 (yyval.node) = new_hash_pattern_tail(p, 0, 0, &(yyloc));
16467 (yyval.node) = new_hash_pattern(p, 0, (yyval.node), &(yyloc));
16468 /*% ripper: hshptn!(Qnil, Qnil, Qnil) %*/
16469 }
16470#line 16471 "parse.c"
16471 break;
16472
16473 case 569: /* p_expr_basic: "(" p_pktbl p_expr rparen */
16474#line 5548 "parse.y"
16475 {
16476 pop_pktbl(p, (yyvsp[-2].tbl));
16477 (yyval.node) = (yyvsp[-1].node);
16478 /*% ripper: $:p_expr %*/
16479 }
16480#line 16481 "parse.c"
16481 break;
16482
16483 case 570: /* p_args: p_expr */
16484#line 5556 "parse.y"
16485 {
16486 NODE *pre_args = NEW_LIST((yyvsp[0].node), &(yyloc));
16487 (yyval.node) = new_array_pattern_tail(p, pre_args, 0, 0, 0, &(yyloc));
16488 /*% ripper: [[$:1], Qnil, Qnil] %*/
16489 }
16490#line 16491 "parse.c"
16491 break;
16492
16493 case 571: /* p_args: p_args_head */
16494#line 5562 "parse.y"
16495 {
16496 (yyval.node) = new_array_pattern_tail(p, (yyvsp[0].node), 1, 0, 0, &(yyloc));
16497 /*% ripper: [$:1, Qnil, Qnil] %*/
16498 }
16499#line 16500 "parse.c"
16500 break;
16501
16502 case 572: /* p_args: p_args_head p_arg */
16503#line 5567 "parse.y"
16504 {
16505 (yyval.node) = new_array_pattern_tail(p, list_concat((yyvsp[-1].node), (yyvsp[0].node)), 0, 0, 0, &(yyloc));
16506 /*% ripper: [rb_ary_concat($:1, $:2), Qnil, Qnil] %*/
16507 }
16508#line 16509 "parse.c"
16509 break;
16510
16511 case 573: /* p_args: p_args_head p_rest */
16512#line 5572 "parse.y"
16513 {
16514 (yyval.node) = new_array_pattern_tail(p, (yyvsp[-1].node), 1, (yyvsp[0].node), 0, &(yyloc));
16515 /*% ripper: [$:1, $:2, Qnil] %*/
16516 }
16517#line 16518 "parse.c"
16518 break;
16519
16520 case 574: /* p_args: p_args_head p_rest ',' p_args_post */
16521#line 5577 "parse.y"
16522 {
16523 (yyval.node) = new_array_pattern_tail(p, (yyvsp[-3].node), 1, (yyvsp[-2].node), (yyvsp[0].node), &(yyloc));
16524 /*% ripper: [$:1, $:2, $:4] %*/
16525 }
16526#line 16527 "parse.c"
16527 break;
16528
16529 case 577: /* p_args_head: p_args_head p_arg ',' */
16530#line 5586 "parse.y"
16531 {
16532 (yyval.node) = list_concat((yyvsp[-2].node), (yyvsp[-1].node));
16533 /*% ripper: rb_ary_concat($:1, $:2) %*/
16534 }
16535#line 16536 "parse.c"
16536 break;
16537
16538 case 578: /* p_args_tail: p_rest */
16539#line 5593 "parse.y"
16540 {
16541 (yyval.node) = new_array_pattern_tail(p, 0, 1, (yyvsp[0].node), 0, &(yyloc));
16542 /*% ripper: [Qnil, $:1, Qnil] %*/
16543 }
16544#line 16545 "parse.c"
16545 break;
16546
16547 case 579: /* p_args_tail: p_rest ',' p_args_post */
16548#line 5598 "parse.y"
16549 {
16550 (yyval.node) = new_array_pattern_tail(p, 0, 1, (yyvsp[-2].node), (yyvsp[0].node), &(yyloc));
16551 /*% ripper: [Qnil, $:1, $:3] %*/
16552 }
16553#line 16554 "parse.c"
16554 break;
16555
16556 case 580: /* p_find: p_rest ',' p_args_post ',' p_rest */
16557#line 5605 "parse.y"
16558 {
16559 (yyval.node) = new_find_pattern_tail(p, (yyvsp[-4].node), (yyvsp[-2].node), (yyvsp[0].node), &(yyloc));
16560 /*% ripper: [$:1, $:3, $:5] %*/
16561 }
16562#line 16563 "parse.c"
16563 break;
16564
16565 case 581: /* p_rest: "*" "local variable or method" */
16566#line 5613 "parse.y"
16567 {
16568 error_duplicate_pattern_variable(p, (yyvsp[0].id), &(yylsp[0]));
16569 /*% ripper: var_field!($:2) %*/
16570 (yyval.node) = assignable(p, (yyvsp[0].id), 0, &(yyloc));
16571 }
16572#line 16573 "parse.c"
16573 break;
16574
16575 case 582: /* p_rest: "*" */
16576#line 5619 "parse.y"
16577 {
16578 (yyval.node) = 0;
16579 /*% ripper: var_field!(Qnil) %*/
16580 }
16581#line 16582 "parse.c"
16582 break;
16583
16584 case 584: /* p_args_post: p_args_post ',' p_arg */
16585#line 5627 "parse.y"
16586 {
16587 (yyval.node) = list_concat((yyvsp[-2].node), (yyvsp[0].node));
16588 /*% ripper: rb_ary_concat($:1, $:3) %*/
16589 }
16590#line 16591 "parse.c"
16591 break;
16592
16593 case 585: /* p_arg: p_expr */
16594#line 5634 "parse.y"
16595 {
16596 (yyval.node) = NEW_LIST((yyvsp[0].node), &(yyloc));
16597 /*% ripper: [$:1] %*/
16598 }
16599#line 16600 "parse.c"
16600 break;
16601
16602 case 586: /* p_kwargs: p_kwarg ',' p_any_kwrest */
16603#line 5641 "parse.y"
16604 {
16605 (yyval.node) = new_hash_pattern_tail(p, new_unique_key_hash(p, (yyvsp[-2].node), &(yyloc)), (yyvsp[0].id), &(yyloc));
16606 /*% ripper: [$:1, $:3] %*/
16607 }
16608#line 16609 "parse.c"
16609 break;
16610
16611 case 587: /* p_kwargs: p_kwarg */
16612#line 5646 "parse.y"
16613 {
16614 (yyval.node) = new_hash_pattern_tail(p, new_unique_key_hash(p, (yyvsp[0].node), &(yyloc)), 0, &(yyloc));
16615 /*% ripper: [$:1, Qnil] %*/
16616 }
16617#line 16618 "parse.c"
16618 break;
16619
16620 case 588: /* p_kwargs: p_kwarg ',' */
16621#line 5651 "parse.y"
16622 {
16623 (yyval.node) = new_hash_pattern_tail(p, new_unique_key_hash(p, (yyvsp[-1].node), &(yyloc)), 0, &(yyloc));
16624 /*% ripper: [$:1, Qnil] %*/
16625 }
16626#line 16627 "parse.c"
16627 break;
16628
16629 case 589: /* p_kwargs: p_any_kwrest */
16630#line 5656 "parse.y"
16631 {
16632 (yyval.node) = new_hash_pattern_tail(p, new_hash(p, 0, &(yyloc)), (yyvsp[0].id), &(yyloc));
16633 /*% ripper: [[], $:1] %*/
16634 }
16635#line 16636 "parse.c"
16636 break;
16637
16638 case 591: /* p_kwarg: p_kwarg ',' p_kw */
16639#line 5665 "parse.y"
16640 {
16641 (yyval.node) = list_concat((yyvsp[-2].node), (yyvsp[0].node));
16642 /*% ripper: rb_ary_push($:1, $:3) %*/
16643 }
16644#line 16645 "parse.c"
16645 break;
16646
16647 case 592: /* p_kw: p_kw_label p_expr */
16648#line 5672 "parse.y"
16649 {
16650 error_duplicate_pattern_key(p, (yyvsp[-1].id), &(yylsp[-1]));
16651 (yyval.node) = list_append(p, NEW_LIST(NEW_SYM(rb_id2str((yyvsp[-1].id)), &(yylsp[-1])), &(yyloc)), (yyvsp[0].node));
16652 /*% ripper: [$:1, $:2] %*/
16653 }
16654#line 16655 "parse.c"
16655 break;
16656
16657 case 593: /* p_kw: p_kw_label */
16658#line 5678 "parse.y"
16659 {
16660 error_duplicate_pattern_key(p, (yyvsp[0].id), &(yylsp[0]));
16661 if ((yyvsp[0].id) && !is_local_id((yyvsp[0].id))) {
16662 yyerror1(&(yylsp[0]), "key must be valid as local variables");
16663 }
16664 error_duplicate_pattern_variable(p, (yyvsp[0].id), &(yylsp[0]));
16665 (yyval.node) = list_append(p, NEW_LIST(NEW_SYM(rb_id2str((yyvsp[0].id)), &(yyloc)), &(yyloc)), assignable(p, (yyvsp[0].id), 0, &(yyloc)));
16666 /*% ripper: [$:1, Qnil] %*/
16667 }
16668#line 16669 "parse.c"
16669 break;
16670
16671 case 595: /* p_kw_label: "string literal" string_contents tLABEL_END */
16672#line 5691 "parse.y"
16673 {
16674 YYLTYPE loc = code_loc_gen(&(yylsp[-2]), &(yylsp[0]));
16675 if (!(yyvsp[-1].node) || nd_type_p((yyvsp[-1].node), NODE_STR)) {
16676 NODE *node = dsym_node(p, (yyvsp[-1].node), &loc);
16677 (yyval.id) = rb_sym2id(rb_node_sym_string_val(node));
16678 }
16679 else {
16680 yyerror1(&loc, "symbol literal with interpolation is not allowed");
16681 (yyval.id) = rb_intern_str(STR_NEW0());
16682 }
16683 /*% ripper: $:2 %*/
16684 }
16685#line 16686 "parse.c"
16686 break;
16687
16688 case 596: /* p_kwrest: kwrest_mark "local variable or method" */
16689#line 5706 "parse.y"
16690 {
16691 (yyval.id) = (yyvsp[0].id);
16692 /*% ripper: var_field!($:2) %*/
16693 }
16694#line 16695 "parse.c"
16695 break;
16696
16697 case 597: /* p_kwrest: kwrest_mark */
16698#line 5711 "parse.y"
16699 {
16700 (yyval.id) = 0;
16701 /*% ripper: Qnil %*/
16702 }
16703#line 16704 "parse.c"
16704 break;
16705
16706 case 598: /* p_kwnorest: kwrest_mark "'nil'" */
16707#line 5718 "parse.y"
16708 {
16709 (yyval.id) = 0;
16710 }
16711#line 16712 "parse.c"
16712 break;
16713
16714 case 600: /* p_any_kwrest: p_kwnorest */
16715#line 5725 "parse.y"
16716 {
16717 (yyval.id) = idNil;
16718 /*% ripper: var_field!(ID2VAL(idNil)) %*/
16719 }
16720#line 16721 "parse.c"
16721 break;
16722
16723 case 602: /* range_expr_p_primitive: p_primitive ".." p_primitive */
16724#line 3112 "parse.y"
16725 {
16726 value_expr(p, (yyvsp[-2].node));
16727 value_expr(p, (yyvsp[0].node));
16728 (yyval.node) = NEW_DOT2((yyvsp[-2].node), (yyvsp[0].node), &(yyloc), &(yylsp[-1]));
16729 /*% ripper: dot2!($:1, $:3) %*/
16730 }
16731#line 16732 "parse.c"
16732 break;
16733
16734 case 603: /* range_expr_p_primitive: p_primitive "..." p_primitive */
16735#line 3119 "parse.y"
16736 {
16737 value_expr(p, (yyvsp[-2].node));
16738 value_expr(p, (yyvsp[0].node));
16739 (yyval.node) = NEW_DOT3((yyvsp[-2].node), (yyvsp[0].node), &(yyloc), &(yylsp[-1]));
16740 /*% ripper: dot3!($:1, $:3) %*/
16741 }
16742#line 16743 "parse.c"
16743 break;
16744
16745 case 604: /* range_expr_p_primitive: p_primitive ".." */
16746#line 3126 "parse.y"
16747 {
16748 value_expr(p, (yyvsp[-1].node));
16749 (yyval.node) = NEW_DOT2((yyvsp[-1].node), new_nil_at(p, &(yylsp[0]).end_pos), &(yyloc), &(yylsp[0]));
16750 /*% ripper: dot2!($:1, Qnil) %*/
16751 }
16752#line 16753 "parse.c"
16753 break;
16754
16755 case 605: /* range_expr_p_primitive: p_primitive "..." */
16756#line 3132 "parse.y"
16757 {
16758 value_expr(p, (yyvsp[-1].node));
16759 (yyval.node) = NEW_DOT3((yyvsp[-1].node), new_nil_at(p, &(yylsp[0]).end_pos), &(yyloc), &(yylsp[0]));
16760 /*% ripper: dot3!($:1, Qnil) %*/
16761 }
16762#line 16763 "parse.c"
16763 break;
16764
16765 case 606: /* range_expr_p_primitive: "(.." p_primitive */
16766#line 3138 "parse.y"
16767 {
16768 value_expr(p, (yyvsp[0].node));
16769 (yyval.node) = NEW_DOT2(new_nil_at(p, &(yylsp[-1]).beg_pos), (yyvsp[0].node), &(yyloc), &(yylsp[-1]));
16770 /*% ripper: dot2!(Qnil, $:2) %*/
16771 }
16772#line 16773 "parse.c"
16773 break;
16774
16775 case 607: /* range_expr_p_primitive: "(..." p_primitive */
16776#line 3144 "parse.y"
16777 {
16778 value_expr(p, (yyvsp[0].node));
16779 (yyval.node) = NEW_DOT3(new_nil_at(p, &(yylsp[-1]).beg_pos), (yyvsp[0].node), &(yyloc), &(yylsp[-1]));
16780 /*% ripper: dot3!(Qnil, $:2) %*/
16781 }
16782#line 16783 "parse.c"
16783 break;
16784
16785 case 620: /* p_primitive: keyword_variable */
16786#line 5740 "parse.y"
16787 {
16788 if (!((yyval.node) = gettable(p, (yyvsp[0].id), &(yyloc)))) (yyval.node) = NEW_ERROR(&(yyloc));
16789 /*% ripper: var_ref!($:1) %*/
16790 }
16791#line 16792 "parse.c"
16792 break;
16793
16794 case 622: /* p_variable: "local variable or method" */
16795#line 5748 "parse.y"
16796 {
16797 error_duplicate_pattern_variable(p, (yyvsp[0].id), &(yylsp[0]));
16798 /*% ripper: var_field!($:1) %*/
16799 (yyval.node) = assignable(p, (yyvsp[0].id), 0, &(yyloc));
16800 }
16801#line 16802 "parse.c"
16802 break;
16803
16804 case 623: /* p_var_ref: '^' "local variable or method" */
16805#line 5756 "parse.y"
16806 {
16807 NODE *n = gettable(p, (yyvsp[0].id), &(yyloc));
16808 if (!n) {
16809 n = NEW_ERROR(&(yyloc));
16810 }
16811 else if (!(nd_type_p(n, NODE_LVAR) || nd_type_p(n, NODE_DVAR))) {
16812 compile_error(p, "%"PRIsVALUE": no such local variable", rb_id2str((yyvsp[0].id)));
16813 }
16814 (yyval.node) = n;
16815 /*% ripper: var_ref!($:2) %*/
16816 }
16817#line 16818 "parse.c"
16818 break;
16819
16820 case 624: /* p_var_ref: '^' nonlocal_var */
16821#line 5768 "parse.y"
16822 {
16823 if (!((yyval.node) = gettable(p, (yyvsp[0].id), &(yyloc)))) (yyval.node) = NEW_ERROR(&(yyloc));
16824 /*% ripper: var_ref!($:2) %*/
16825 }
16826#line 16827 "parse.c"
16827 break;
16828
16829 case 625: /* p_expr_ref: '^' "(" expr_value rparen */
16830#line 5775 "parse.y"
16831 {
16832 (yyval.node) = NEW_BLOCK((yyvsp[-1].node), &(yyloc));
16833 /*% ripper: begin!($:3) %*/
16834 }
16835#line 16836 "parse.c"
16836 break;
16837
16838 case 626: /* p_const: ":: at EXPR_BEG" cname */
16839#line 5782 "parse.y"
16840 {
16841 (yyval.node) = NEW_COLON3((yyvsp[0].id), &(yyloc), &(yylsp[-1]), &(yylsp[0]));
16842 /*% ripper: top_const_ref!($:2) %*/
16843 }
16844#line 16845 "parse.c"
16845 break;
16846
16847 case 627: /* p_const: p_const "::" cname */
16848#line 5787 "parse.y"
16849 {
16850 (yyval.node) = NEW_COLON2((yyvsp[-2].node), (yyvsp[0].id), &(yyloc), &(yylsp[-1]), &(yylsp[0]));
16851 /*% ripper: const_path_ref!($:1, $:3) %*/
16852 }
16853#line 16854 "parse.c"
16854 break;
16855
16856 case 628: /* p_const: "constant" */
16857#line 5792 "parse.y"
16858 {
16859 (yyval.node) = gettable(p, (yyvsp[0].id), &(yyloc));
16860 /*% ripper: var_ref!($:1) %*/
16861 }
16862#line 16863 "parse.c"
16863 break;
16864
16865 case 629: /* opt_rescue: k_rescue exc_list exc_var then compstmt_stmts opt_rescue */
16866#line 5801 "parse.y"
16867 {
16868 NODE *err = (yyvsp[-3].node);
16869 if ((yyvsp[-3].node)) {
16870 err = NEW_ERRINFO(&(yylsp[-3]));
16871 err = node_assign(p, (yyvsp[-3].node), err, NO_LEX_CTXT, &(yylsp[-3]));
16872 }
16873 (yyval.node) = NEW_RESBODY((yyvsp[-4].node), (yyvsp[-3].node), (yyvsp[-1].node), (yyvsp[0].node), &(yyloc));
16874 if ((yyvsp[-4].node)) {
16875 fixpos((yyval.node), (yyvsp[-4].node));
16876 }
16877 else if ((yyvsp[-3].node)) {
16878 fixpos((yyval.node), (yyvsp[-3].node));
16879 }
16880 else {
16881 fixpos((yyval.node), (yyvsp[-1].node));
16882 }
16883 /*% ripper: rescue!($:2, $:3, $:5, $:6) %*/
16884 }
16885#line 16886 "parse.c"
16886 break;
16887
16888 case 631: /* exc_list: arg_value */
16889#line 5823 "parse.y"
16890 {
16891 (yyval.node) = NEW_LIST((yyvsp[0].node), &(yyloc));
16892 /*% ripper: rb_ary_new3(1, $:1) %*/
16893 }
16894#line 16895 "parse.c"
16895 break;
16896
16897 case 632: /* exc_list: mrhs */
16898#line 5828 "parse.y"
16899 {
16900 if (!((yyval.node) = splat_array((yyvsp[0].node)))) (yyval.node) = (yyvsp[0].node);
16901 }
16902#line 16903 "parse.c"
16903 break;
16904
16905 case 634: /* exc_var: "=>" lhs */
16906#line 5835 "parse.y"
16907 {
16908 (yyval.node) = (yyvsp[0].node);
16909 /*% ripper: $:2 %*/
16910 }
16911#line 16912 "parse.c"
16912 break;
16913
16914 case 636: /* opt_ensure: k_ensure stmts option_terms */
16915#line 5843 "parse.y"
16916 {
16917 p->ctxt.in_rescue = (yyvsp[-2].ctxt).in_rescue;
16918 (yyval.node) = (yyvsp[-1].node);
16919 void_expr(p, void_stmts(p, (yyval.node)));
16920 /*% ripper: ensure!($:2) %*/
16921 }
16922#line 16923 "parse.c"
16923 break;
16924
16925 case 640: /* strings: string */
16926#line 5857 "parse.y"
16927 {
16928 if (!(yyvsp[0].node)) {
16929 (yyval.node) = NEW_STR(STRING_NEW0(), &(yyloc));
16930 }
16931 else {
16932 (yyval.node) = evstr2dstr(p, (yyvsp[0].node));
16933 }
16934 /*% ripper: $:1 %*/
16935 }
16936#line 16937 "parse.c"
16937 break;
16938
16939 case 643: /* string: string string1 */
16940#line 5871 "parse.y"
16941 {
16942 (yyval.node) = literal_concat(p, (yyvsp[-1].node), (yyvsp[0].node), &(yyloc));
16943 /*% ripper: string_concat!($:1, $:2) %*/
16944 }
16945#line 16946 "parse.c"
16946 break;
16947
16948 case 644: /* string1: "string literal" string_contents "terminator" */
16949#line 5878 "parse.y"
16950 {
16951 (yyval.node) = heredoc_dedent(p, (yyvsp[-1].node));
16952 if ((yyval.node)) nd_set_loc((yyval.node), &(yyloc));
16953 /*% ripper: $:2 %*/
16954 if (p->heredoc_indent > 0) {
16955 /*% ripper: heredoc_dedent!($:$, INT2NUM(%{p->heredoc_indent})) %*/
16956 p->heredoc_indent = 0;
16957 }
16958 /*% ripper: string_literal!($:$) %*/
16959 }
16960#line 16961 "parse.c"
16961 break;
16962
16963 case 645: /* xstring: "backtick literal" xstring_contents "terminator" */
16964#line 5891 "parse.y"
16965 {
16966 (yyval.node) = new_xstring(p, heredoc_dedent(p, (yyvsp[-1].node)), &(yyloc));
16967 /*% ripper: $:2 %*/
16968 if (p->heredoc_indent > 0) {
16969 /*% ripper: heredoc_dedent!($:$, INT2NUM(%{p->heredoc_indent})) %*/
16970 p->heredoc_indent = 0;
16971 }
16972 /*% ripper: xstring_literal!($:$) %*/
16973 }
16974#line 16975 "parse.c"
16975 break;
16976
16977 case 646: /* regexp: "regexp literal" regexp_contents tREGEXP_END */
16978#line 5903 "parse.y"
16979 {
16980 (yyval.node) = new_regexp(p, (yyvsp[-1].node), (yyvsp[0].num), &(yyloc), &(yylsp[-2]), &(yylsp[-1]), &(yylsp[0]));
16981 /*% ripper: regexp_literal!($:2, $:3) %*/
16982 }
16983#line 16984 "parse.c"
16984 break;
16985
16986 case 649: /* words_tWORDS_BEG_word_list: "word list" nonempty_list_' ' word_list "terminator" */
16987#line 3161 "parse.y"
16988 {
16989 (yyval.node) = make_list((yyvsp[-1].node), &(yyloc));
16990 /*% ripper: array!($:word_list) %*/
16991 }
16992#line 16993 "parse.c"
16993 break;
16994
16995 case 651: /* word_list: %empty */
16996#line 5913 "parse.y"
16997 {
16998 (yyval.node) = 0;
16999 /*% ripper: words_new! %*/
17000 }
17001#line 17002 "parse.c"
17002 break;
17003
17004 case 652: /* word_list: word_list word nonempty_list_' ' */
17005#line 5918 "parse.y"
17006 {
17007 (yyval.node) = list_append(p, (yyvsp[-2].node), evstr2dstr(p, (yyvsp[-1].node)));
17008 /*% ripper: words_add!($:1, $:2) %*/
17009 }
17010#line 17011 "parse.c"
17011 break;
17012
17013 case 654: /* word: word string_content */
17014#line 5927 "parse.y"
17015 {
17016 (yyval.node) = literal_concat(p, (yyvsp[-1].node), (yyvsp[0].node), &(yyloc));
17017 /*% ripper: word_add!($:1, $:2) %*/
17018 }
17019#line 17020 "parse.c"
17020 break;
17021
17022 case 655: /* words_tSYMBOLS_BEG_symbol_list: "symbol list" nonempty_list_' ' symbol_list "terminator" */
17023#line 3161 "parse.y"
17024 {
17025 (yyval.node) = make_list((yyvsp[-1].node), &(yyloc));
17026 /*% ripper: array!($:word_list) %*/
17027 }
17028#line 17029 "parse.c"
17029 break;
17030
17031 case 657: /* symbol_list: %empty */
17032#line 5937 "parse.y"
17033 {
17034 (yyval.node) = 0;
17035 /*% ripper: symbols_new! %*/
17036 }
17037#line 17038 "parse.c"
17038 break;
17039
17040 case 658: /* symbol_list: symbol_list word nonempty_list_' ' */
17041#line 5942 "parse.y"
17042 {
17043 (yyval.node) = symbol_append(p, (yyvsp[-2].node), evstr2dstr(p, (yyvsp[-1].node)));
17044 /*% ripper: symbols_add!($:1, $:2) %*/
17045 }
17046#line 17047 "parse.c"
17047 break;
17048
17049 case 659: /* words_tQWORDS_BEG_qword_list: "verbatim word list" nonempty_list_' ' qword_list "terminator" */
17050#line 3161 "parse.y"
17051 {
17052 (yyval.node) = make_list((yyvsp[-1].node), &(yyloc));
17053 /*% ripper: array!($:word_list) %*/
17054 }
17055#line 17056 "parse.c"
17056 break;
17057
17058 case 661: /* words_tQSYMBOLS_BEG_qsym_list: "verbatim symbol list" nonempty_list_' ' qsym_list "terminator" */
17059#line 3161 "parse.y"
17060 {
17061 (yyval.node) = make_list((yyvsp[-1].node), &(yyloc));
17062 /*% ripper: array!($:word_list) %*/
17063 }
17064#line 17065 "parse.c"
17065 break;
17066
17067 case 663: /* qword_list: %empty */
17068#line 5955 "parse.y"
17069 {
17070 (yyval.node) = 0;
17071 /*% ripper: qwords_new! %*/
17072 }
17073#line 17074 "parse.c"
17074 break;
17075
17076 case 664: /* qword_list: qword_list "literal content" nonempty_list_' ' */
17077#line 5960 "parse.y"
17078 {
17079 (yyval.node) = list_append(p, (yyvsp[-2].node), (yyvsp[-1].node));
17080 /*% ripper: qwords_add!($:1, $:2) %*/
17081 }
17082#line 17083 "parse.c"
17083 break;
17084
17085 case 665: /* qsym_list: %empty */
17086#line 5967 "parse.y"
17087 {
17088 (yyval.node) = 0;
17089 /*% ripper: qsymbols_new! %*/
17090 }
17091#line 17092 "parse.c"
17092 break;
17093
17094 case 666: /* qsym_list: qsym_list "literal content" nonempty_list_' ' */
17095#line 5972 "parse.y"
17096 {
17097 (yyval.node) = symbol_append(p, (yyvsp[-2].node), (yyvsp[-1].node));
17098 /*% ripper: qsymbols_add!($:1, $:2) %*/
17099 }
17100#line 17101 "parse.c"
17101 break;
17102
17103 case 667: /* string_contents: %empty */
17104#line 5979 "parse.y"
17105 {
17106 (yyval.node) = 0;
17107 /*% ripper: string_content! %*/
17108 }
17109#line 17110 "parse.c"
17110 break;
17111
17112 case 668: /* string_contents: string_contents string_content */
17113#line 5984 "parse.y"
17114 {
17115 (yyval.node) = literal_concat(p, (yyvsp[-1].node), (yyvsp[0].node), &(yyloc));
17116 /*% ripper: string_add!($:1, $:2) %*/
17117 }
17118#line 17119 "parse.c"
17119 break;
17120
17121 case 669: /* xstring_contents: %empty */
17122#line 5991 "parse.y"
17123 {
17124 (yyval.node) = 0;
17125 /*% ripper: xstring_new! %*/
17126 }
17127#line 17128 "parse.c"
17128 break;
17129
17130 case 670: /* xstring_contents: xstring_contents string_content */
17131#line 5996 "parse.y"
17132 {
17133 (yyval.node) = literal_concat(p, (yyvsp[-1].node), (yyvsp[0].node), &(yyloc));
17134 /*% ripper: xstring_add!($:1, $:2) %*/
17135 }
17136#line 17137 "parse.c"
17137 break;
17138
17139 case 671: /* regexp_contents: %empty */
17140#line 6003 "parse.y"
17141 {
17142 (yyval.node) = 0;
17143 /*% ripper: regexp_new! %*/
17144 }
17145#line 17146 "parse.c"
17146 break;
17147
17148 case 672: /* regexp_contents: regexp_contents string_content */
17149#line 6008 "parse.y"
17150 {
17151 NODE *head = (yyvsp[-1].node), *tail = (yyvsp[0].node);
17152 if (!head) {
17153 (yyval.node) = tail;
17154 }
17155 else if (!tail) {
17156 (yyval.node) = head;
17157 }
17158 else {
17159 switch (nd_type(head)) {
17160 case NODE_STR:
17161 head = str2dstr(p, head);
17162 break;
17163 case NODE_DSTR:
17164 break;
17165 default:
17166 head = list_append(p, NEW_DSTR(0, &(yyloc)), head);
17167 break;
17168 }
17169 (yyval.node) = list_append(p, head, tail);
17170 }
17171 /*% ripper: regexp_add!($:1, $:2) %*/
17172 }
17173#line 17174 "parse.c"
17174 break;
17175
17176 case 674: /* @34: %empty */
17177#line 6036 "parse.y"
17178 {
17179 /* need to backup p->lex.strterm so that a string literal `%&foo,#$&,bar&` can be parsed */
17180 (yyval.strterm) = p->lex.strterm;
17181 p->lex.strterm = 0;
17182 SET_LEX_STATE(EXPR_BEG);
17183 }
17184#line 17185 "parse.c"
17185 break;
17186
17187 case 675: /* string_content: tSTRING_DVAR @34 string_dvar */
17188#line 6043 "parse.y"
17189 {
17190 p->lex.strterm = (yyvsp[-1].strterm);
17191 (yyval.node) = NEW_EVSTR((yyvsp[0].node), &(yyloc), &(yylsp[-2]), &NULL_LOC);
17192 nd_set_line((yyval.node), (yylsp[0]).end_pos.lineno);
17193 /*% ripper: string_dvar!($:dvar) %*/
17194 }
17195#line 17196 "parse.c"
17196 break;
17197
17198 case 676: /* @35: %empty */
17199#line 6050 "parse.y"
17200 {
17201 CMDARG_PUSH(0);
17202 COND_PUSH(0);
17203 /* need to backup p->lex.strterm so that a string literal `%!foo,#{ !0 },bar!` can be parsed */
17204 (yyval.strterm) = p->lex.strterm;
17205 p->lex.strterm = 0;
17206 SET_LEX_STATE(EXPR_BEG);
17207 }
17208#line 17209 "parse.c"
17209 break;
17210
17211 case 677: /* @36: %empty */
17212#line 6058 "parse.y"
17213 {
17214 (yyval.num) = p->lex.brace_nest;
17215 p->lex.brace_nest = 0;
17216 }
17217#line 17218 "parse.c"
17218 break;
17219
17220 case 678: /* @37: %empty */
17221#line 6062 "parse.y"
17222 {
17223 (yyval.num) = p->lex.lpar_beg;
17224 p->lex.lpar_beg = -1;
17225 }
17226#line 17227 "parse.c"
17227 break;
17228
17229 case 679: /* @38: %empty */
17230#line 6066 "parse.y"
17231 {
17232 (yyval.num) = p->heredoc_indent;
17233 p->heredoc_indent = 0;
17234 }
17235#line 17236 "parse.c"
17236 break;
17237
17238 case 680: /* string_content: "'#{'" @35 @36 @37 @38 compstmt_stmts string_dend */
17239#line 6071 "parse.y"
17240 {
17241 COND_POP();
17242 CMDARG_POP();
17243 p->lex.strterm = (yyvsp[-5].strterm);
17244 SET_LEX_STATE((yyvsp[-6].state));
17245 p->lex.brace_nest = (yyvsp[-4].num);
17246 p->lex.lpar_beg = (yyvsp[-3].num);
17247 p->heredoc_indent = (yyvsp[-2].num);
17248 p->heredoc_line_indent = -1;
17249 if ((yyvsp[-1].node)) nd_unset_fl_newline((yyvsp[-1].node));
17250 (yyval.node) = new_evstr(p, (yyvsp[-1].node), &(yyloc), &(yylsp[-6]), &(yylsp[0]));
17251 /*% ripper: string_embexpr!($:compstmt) %*/
17252 }
17253#line 17254 "parse.c"
17254 break;
17255
17256 case 683: /* string_dvar: nonlocal_var */
17257#line 6091 "parse.y"
17258 {
17259 if (!((yyval.node) = gettable(p, (yyvsp[0].id), &(yyloc)))) (yyval.node) = NEW_ERROR(&(yyloc));
17260 /*% ripper: var_ref!($:1) %*/
17261 }
17262#line 17263 "parse.c"
17263 break;
17264
17265 case 687: /* ssym: "symbol literal" sym */
17266#line 6103 "parse.y"
17267 {
17268 SET_LEX_STATE(EXPR_END);
17269 VALUE str = rb_id2str((yyvsp[0].id));
17270 /*
17271 * TODO:
17272 * set_yylval_noname sets invalid id to yylval.
17273 * This branch can be removed once yylval is changed to
17274 * hold lexed string.
17275 */
17276 if (!str) str = STR_NEW0();
17277 (yyval.node) = NEW_SYM(str, &(yyloc));
17278 /*% ripper: symbol_literal!(symbol!($:2)) %*/
17279 }
17280#line 17281 "parse.c"
17281 break;
17282
17283 case 690: /* dsym: "symbol literal" string_contents "terminator" */
17284#line 6123 "parse.y"
17285 {
17286 SET_LEX_STATE(EXPR_END);
17287 (yyval.node) = dsym_node(p, (yyvsp[-1].node), &(yyloc));
17288 /*% ripper: dyna_symbol!($:2) %*/
17289 }
17290#line 17291 "parse.c"
17291 break;
17292
17293 case 692: /* numeric: tUMINUS_NUM simple_numeric */
17294#line 6132 "parse.y"
17295 {
17296 (yyval.node) = (yyvsp[0].node);
17297 negate_lit(p, (yyval.node), &(yyloc));
17298 /*% ripper: unary!(ID2VAL(idUMinus), $:2) %*/
17299 }
17300#line 17301 "parse.c"
17301 break;
17302
17303 case 703: /* keyword_variable: "'nil'" */
17304#line 6154 "parse.y"
17305 {(yyval.id) = KWD2EID(nil, (yyvsp[0].id));}
17306#line 17307 "parse.c"
17307 break;
17308
17309 case 704: /* keyword_variable: "'self'" */
17310#line 6155 "parse.y"
17311 {(yyval.id) = KWD2EID(self, (yyvsp[0].id));}
17312#line 17313 "parse.c"
17313 break;
17314
17315 case 705: /* keyword_variable: "'true'" */
17316#line 6156 "parse.y"
17317 {(yyval.id) = KWD2EID(true, (yyvsp[0].id));}
17318#line 17319 "parse.c"
17319 break;
17320
17321 case 706: /* keyword_variable: "'false'" */
17322#line 6157 "parse.y"
17323 {(yyval.id) = KWD2EID(false, (yyvsp[0].id));}
17324#line 17325 "parse.c"
17325 break;
17326
17327 case 707: /* keyword_variable: "'__FILE__'" */
17328#line 6158 "parse.y"
17329 {(yyval.id) = KWD2EID(_FILE__, (yyvsp[0].id));}
17330#line 17331 "parse.c"
17331 break;
17332
17333 case 708: /* keyword_variable: "'__LINE__'" */
17334#line 6159 "parse.y"
17335 {(yyval.id) = KWD2EID(_LINE__, (yyvsp[0].id));}
17336#line 17337 "parse.c"
17337 break;
17338
17339 case 709: /* keyword_variable: "'__ENCODING__'" */
17340#line 6160 "parse.y"
17341 {(yyval.id) = KWD2EID(_ENCODING__, (yyvsp[0].id));}
17342#line 17343 "parse.c"
17343 break;
17344
17345 case 710: /* var_ref: user_variable */
17346#line 6164 "parse.y"
17347 {
17348 if (!((yyval.node) = gettable(p, (yyvsp[0].id), &(yyloc)))) (yyval.node) = NEW_ERROR(&(yyloc));
17349 if (ifdef_ripper(id_is_var(p, (yyvsp[0].id)), false)) {
17350 /*% ripper: var_ref!($:1) %*/
17351 }
17352 else {
17353 /*% ripper: vcall!($:1) %*/
17354 }
17355 }
17356#line 17357 "parse.c"
17357 break;
17358
17359 case 711: /* var_ref: keyword_variable */
17360#line 6174 "parse.y"
17361 {
17362 if (!((yyval.node) = gettable(p, (yyvsp[0].id), &(yyloc)))) (yyval.node) = NEW_ERROR(&(yyloc));
17363 /*% ripper: var_ref!($:1) %*/
17364 }
17365#line 17366 "parse.c"
17366 break;
17367
17368 case 712: /* var_lhs: user_variable */
17369#line 6181 "parse.y"
17370 {
17371 /*% ripper: var_field!($:1) %*/
17372 (yyval.node) = assignable(p, (yyvsp[0].id), 0, &(yyloc));
17373 }
17374#line 17375 "parse.c"
17375 break;
17376
17377 case 713: /* var_lhs: keyword_variable */
17378#line 6181 "parse.y"
17379 {
17380 /*% ripper: var_field!($:1) %*/
17381 (yyval.node) = assignable(p, (yyvsp[0].id), 0, &(yyloc));
17382 }
17383#line 17384 "parse.c"
17384 break;
17385
17386 case 716: /* $@39: %empty */
17387#line 6192 "parse.y"
17388 {
17389 SET_LEX_STATE(EXPR_BEG);
17390 p->command_start = TRUE;
17391 }
17392#line 17393 "parse.c"
17393 break;
17394
17395 case 717: /* superclass: '<' $@39 expr_value term */
17396#line 6197 "parse.y"
17397 {
17398 (yyval.node) = (yyvsp[-1].node);
17399 /*% ripper: $:3 %*/
17400 }
17401#line 17402 "parse.c"
17402 break;
17403
17404 case 720: /* f_opt_paren_args: f_empty_arg */
17405#line 6206 "parse.y"
17406 {
17407 p->ctxt.in_argdef = 0;
17408 }
17409#line 17410 "parse.c"
17410 break;
17411
17412 case 721: /* f_empty_arg: %empty */
17413#line 6212 "parse.y"
17414 {
17415 (yyval.node_args) = new_empty_args_tail(p, &(yyloc));
17416 (yyval.node_args) = new_args(p, 0, 0, 0, 0, (yyval.node_args), &(yyloc));
17417 /*% ripper: params!(Qnil, Qnil, Qnil, Qnil, Qnil, Qnil, Qnil) %*/
17418 }
17419#line 17420 "parse.c"
17420 break;
17421
17422 case 722: /* f_paren_args: '(' f_args rparen */
17423#line 6220 "parse.y"
17424 {
17425 (yyval.node_args) = (yyvsp[-1].node_args);
17426 /*% ripper: paren!($:2) %*/
17427 SET_LEX_STATE(EXPR_BEG);
17428 p->command_start = TRUE;
17429 p->ctxt.in_argdef = 0;
17430 }
17431#line 17432 "parse.c"
17432 break;
17433
17434 case 724: /* @40: %empty */
17435#line 6230 "parse.y"
17436 {
17437 (yyval.ctxt) = p->ctxt;
17438 p->ctxt.in_kwarg = 1;
17439 p->ctxt.in_argdef = 1;
17440 SET_LEX_STATE(p->lex.state|EXPR_LABEL); /* force for args */
17441 }
17442#line 17443 "parse.c"
17443 break;
17444
17445 case 725: /* f_arglist: @40 f_args term */
17446#line 6237 "parse.y"
17447 {
17448 p->ctxt.in_kwarg = (yyvsp[-2].ctxt).in_kwarg;
17449 p->ctxt.in_argdef = 0;
17450 (yyval.node_args) = (yyvsp[-1].node_args);
17451 SET_LEX_STATE(EXPR_BEG);
17452 p->command_start = TRUE;
17453 /*% ripper: $:2 %*/
17454 }
17455#line 17456 "parse.c"
17456 break;
17457
17458 case 726: /* f_kw_arg_value: f_label arg_value */
17459#line 3012 "parse.y"
17460 {
17461 p->ctxt.in_argdef = 1;
17462 (yyval.node_kw_arg) = new_kw_arg(p, assignable(p, (yyvsp[-1].id), (yyvsp[0].node), &(yyloc)), &(yyloc));
17463 /*% ripper: [$:$, $:value] %*/
17464 }
17465#line 17466 "parse.c"
17466 break;
17467
17468 case 727: /* f_kw_arg_value: f_label */
17469#line 3018 "parse.y"
17470 {
17471 p->ctxt.in_argdef = 1;
17472 (yyval.node_kw_arg) = new_kw_arg(p, assignable(p, (yyvsp[0].id), NODE_SPECIAL_REQUIRED_KEYWORD, &(yyloc)), &(yyloc));
17473 /*% ripper: [$:$, 0] %*/
17474 }
17475#line 17476 "parse.c"
17476 break;
17477
17478 case 728: /* f_kwarg_arg_value: f_kw_arg_value */
17479#line 3027 "parse.y"
17480 {
17481 (yyval.node_kw_arg) = (yyvsp[0].node_kw_arg);
17482 /*% ripper: rb_ary_new3(1, $:1) %*/
17483 }
17484#line 17485 "parse.c"
17485 break;
17486
17487 case 729: /* f_kwarg_arg_value: f_kwarg_arg_value ',' f_kw_arg_value */
17488#line 3032 "parse.y"
17489 {
17490 (yyval.node_kw_arg) = kwd_append((yyvsp[-2].node_kw_arg), (yyvsp[0].node_kw_arg));
17491 /*% ripper: rb_ary_push($:1, $:3) %*/
17492 }
17493#line 17494 "parse.c"
17494 break;
17495
17496 case 730: /* opt_f_block_arg_opt_comma: ',' f_block_arg */
17497#line 2949 "parse.y"
17498 {
17499 (yyval.id) = (yyvsp[0].id);
17500 /*% ripper: $:2 %*/
17501 }
17502#line 17503 "parse.c"
17503 break;
17504
17505 case 732: /* args_tail_basic_arg_value_opt_comma: f_kwarg_arg_value ',' f_kwrest opt_f_block_arg_opt_comma */
17506#line 2926 "parse.y"
17507 {
17508 (yyval.node_args) = new_args_tail(p, (yyvsp[-3].node_kw_arg), (yyvsp[-1].id), (yyvsp[0].id), &(yylsp[-1]));
17509 /*% ripper: [$:1, $:3, $:4] %*/
17510 }
17511#line 17512 "parse.c"
17512 break;
17513
17514 case 733: /* args_tail_basic_arg_value_opt_comma: f_kwarg_arg_value opt_f_block_arg_opt_comma */
17515#line 2931 "parse.y"
17516 {
17517 (yyval.node_args) = new_args_tail(p, (yyvsp[-1].node_kw_arg), 0, (yyvsp[0].id), &(yylsp[-1]));
17518 /*% ripper: [$:1, Qnil, $:2] %*/
17519 }
17520#line 17521 "parse.c"
17521 break;
17522
17523 case 734: /* args_tail_basic_arg_value_opt_comma: f_any_kwrest opt_f_block_arg_opt_comma */
17524#line 2936 "parse.y"
17525 {
17526 (yyval.node_args) = new_args_tail(p, 0, (yyvsp[-1].id), (yyvsp[0].id), &(yylsp[-1]));
17527 /*% ripper: [Qnil, $:1, $:2] %*/
17528 }
17529#line 17530 "parse.c"
17530 break;
17531
17532 case 735: /* args_tail_basic_arg_value_opt_comma: f_block_arg */
17533#line 2941 "parse.y"
17534 {
17535 (yyval.node_args) = new_args_tail(p, 0, 0, (yyvsp[0].id), &(yylsp[0]));
17536 /*% ripper: [Qnil, Qnil, $:1] %*/
17537 }
17538#line 17539 "parse.c"
17539 break;
17540
17541 case 737: /* args_tail: args_forward */
17542#line 6249 "parse.y"
17543 {
17544 add_forwarding_args(p);
17545 (yyval.node_args) = new_args_tail(p, 0, (yyvsp[0].id), arg_FWD_BLOCK, &(yylsp[0]));
17546 (yyval.node_args)->nd_ainfo.forwarding = 1;
17547 /*% ripper: [Qnil, $:args_forward, Qnil] %*/
17548 }
17549#line 17550 "parse.c"
17550 break;
17551
17552 case 738: /* args_tail_basic_arg_value_none: f_kwarg_arg_value ',' f_kwrest opt_f_block_arg_none */
17553#line 2926 "parse.y"
17554 {
17555 (yyval.node_args) = new_args_tail(p, (yyvsp[-3].node_kw_arg), (yyvsp[-1].id), (yyvsp[0].id), &(yylsp[-1]));
17556 /*% ripper: [$:1, $:3, $:4] %*/
17557 }
17558#line 17559 "parse.c"
17559 break;
17560
17561 case 739: /* args_tail_basic_arg_value_none: f_kwarg_arg_value opt_f_block_arg_none */
17562#line 2931 "parse.y"
17563 {
17564 (yyval.node_args) = new_args_tail(p, (yyvsp[-1].node_kw_arg), 0, (yyvsp[0].id), &(yylsp[-1]));
17565 /*% ripper: [$:1, Qnil, $:2] %*/
17566 }
17567#line 17568 "parse.c"
17568 break;
17569
17570 case 740: /* args_tail_basic_arg_value_none: f_any_kwrest opt_f_block_arg_none */
17571#line 2936 "parse.y"
17572 {
17573 (yyval.node_args) = new_args_tail(p, 0, (yyvsp[-1].id), (yyvsp[0].id), &(yylsp[-1]));
17574 /*% ripper: [Qnil, $:1, $:2] %*/
17575 }
17576#line 17577 "parse.c"
17577 break;
17578
17579 case 741: /* args_tail_basic_arg_value_none: f_block_arg */
17580#line 2941 "parse.y"
17581 {
17582 (yyval.node_args) = new_args_tail(p, 0, 0, (yyvsp[0].id), &(yylsp[0]));
17583 /*% ripper: [Qnil, Qnil, $:1] %*/
17584 }
17585#line 17586 "parse.c"
17586 break;
17587
17588 case 743: /* largs_tail: args_forward */
17589#line 6259 "parse.y"
17590 {
17591 yyerror1(&(yylsp[0]), "unexpected ... in lambda argument");
17592 (yyval.node_args) = new_args_tail(p, 0, 0, 0, &(yylsp[0]));
17593 (yyval.node_args)->nd_ainfo.forwarding = 1;
17594 /*% ripper: [Qnil, $:args_forward, Qnil] %*/
17595 }
17596#line 17597 "parse.c"
17597 break;
17598
17599 case 744: /* f_opt_arg_value: f_arg_asgn f_eq arg_value */
17600#line 2990 "parse.y"
17601 {
17602 p->ctxt.in_argdef = 1;
17603 (yyval.node_opt_arg) = NEW_OPT_ARG(assignable(p, (yyvsp[-2].id), (yyvsp[0].node), &(yyloc)), &(yyloc));
17604 /*% ripper: [$:$, $:3] %*/
17605 }
17606#line 17607 "parse.c"
17607 break;
17608
17609 case 745: /* f_opt_arg_arg_value: f_opt_arg_value */
17610#line 2999 "parse.y"
17611 {
17612 (yyval.node_opt_arg) = (yyvsp[0].node_opt_arg);
17613 /*% ripper: rb_ary_new3(1, $:1) %*/
17614 }
17615#line 17616 "parse.c"
17616 break;
17617
17618 case 746: /* f_opt_arg_arg_value: f_opt_arg_arg_value ',' f_opt_arg_value */
17619#line 3004 "parse.y"
17620 {
17621 (yyval.node_opt_arg) = opt_arg_append((yyvsp[-2].node_opt_arg), (yyvsp[0].node_opt_arg));
17622 /*% ripper: rb_ary_push($:1, $:3) %*/
17623 }
17624#line 17625 "parse.c"
17625 break;
17626
17627 case 747: /* opt_args_tail_args_tail_opt_comma: ',' args_tail */
17628#line 3099 "parse.y"
17629 {
17630 (yyval.node_args) = (yyvsp[0].node_args);
17631 /*% ripper: $:tail %*/
17632 }
17633#line 17634 "parse.c"
17634 break;
17635
17636 case 748: /* opt_args_tail_args_tail_opt_comma: opt_comma */
17637#line 3104 "parse.y"
17638 {
17639 (yyval.node_args) = new_empty_args_tail(p, &(yyloc));
17640 /*% ripper: [Qnil, Qnil, Qnil] %*/
17641 }
17642#line 17643 "parse.c"
17643 break;
17644
17645 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 */
17646#line 6269 "parse.y"
17647 {
17648 (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));
17649 /*% ripper: params!($:pre, $:opt, $:rest, Qnil, *$:tail[0..2]) %*/
17650 }
17651#line 17652 "parse.c"
17652 break;
17653
17654 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 */
17655#line 6274 "parse.y"
17656 {
17657 (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));
17658 /*% ripper: params!($:pre, $:opt, $:rest, $:post, *$:tail[0..2]) %*/
17659 }
17660#line 17661 "parse.c"
17661 break;
17662
17663 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 */
17664#line 6279 "parse.y"
17665 {
17666 (yyval.node_args) = new_args(p, (yyvsp[-3].node_args_aux), (yyvsp[-1].node_opt_arg), 0, 0, (yyvsp[0].node_args), &(yyloc));
17667 /*% ripper: params!($:pre, $:opt, Qnil, Qnil, *$:tail[0..2]) %*/
17668 }
17669#line 17670 "parse.c"
17670 break;
17671
17672 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 */
17673#line 6284 "parse.y"
17674 {
17675 (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));
17676 /*% ripper: params!($:pre, $:opt, Qnil, $:post, *$:tail[0..2]) %*/
17677 }
17678#line 17679 "parse.c"
17679 break;
17680
17681 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 */
17682#line 6289 "parse.y"
17683 {
17684 (yyval.node_args) = new_args(p, (yyvsp[-3].node_args_aux), 0, (yyvsp[-1].id), 0, (yyvsp[0].node_args), &(yyloc));
17685 /*% ripper: params!($:pre, Qnil, $:rest, Qnil, *$:tail[0..2]) %*/
17686 }
17687#line 17688 "parse.c"
17688 break;
17689
17690 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 */
17691#line 6294 "parse.y"
17692 {
17693 (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));
17694 /*% ripper: params!($:pre, Qnil, $:rest, $:post, *$:tail[0..2]) %*/
17695 }
17696#line 17697 "parse.c"
17697 break;
17698
17699 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 */
17700#line 6299 "parse.y"
17701 {
17702 (yyval.node_args) = new_args(p, 0, (yyvsp[-3].node_opt_arg), (yyvsp[-1].id), 0, (yyvsp[0].node_args), &(yyloc));
17703 /*% ripper: params!(Qnil, $:opt, $:rest, Qnil, *$:tail[0..2]) %*/
17704 }
17705#line 17706 "parse.c"
17706 break;
17707
17708 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 */
17709#line 6304 "parse.y"
17710 {
17711 (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));
17712 /*% ripper: params!(Qnil, $:opt, $:rest, $:post, *$:tail[0..2]) %*/
17713 }
17714#line 17715 "parse.c"
17715 break;
17716
17717 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 */
17718#line 6309 "parse.y"
17719 {
17720 (yyval.node_args) = new_args(p, 0, (yyvsp[-1].node_opt_arg), 0, 0, (yyvsp[0].node_args), &(yyloc));
17721 /*% ripper: params!(Qnil, $:opt, Qnil, Qnil, *$:tail[0..2]) %*/
17722 }
17723#line 17724 "parse.c"
17724 break;
17725
17726 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 */
17727#line 6314 "parse.y"
17728 {
17729 (yyval.node_args) = new_args(p, 0, (yyvsp[-3].node_opt_arg), 0, (yyvsp[-1].node_args_aux), (yyvsp[0].node_args), &(yyloc));
17730 /*% ripper: params!(Qnil, $:opt, Qnil, $:post, *$:tail[0..2]) %*/
17731 }
17732#line 17733 "parse.c"
17733 break;
17734
17735 case 759: /* args-list_arg_value_opt_args_tail_args_tail_opt_comma: f_rest_arg opt_args_tail_args_tail_opt_comma */
17736#line 6319 "parse.y"
17737 {
17738 (yyval.node_args) = new_args(p, 0, 0, (yyvsp[-1].id), 0, (yyvsp[0].node_args), &(yyloc));
17739 /*% ripper: params!(Qnil, Qnil, $:rest, Qnil, *$:tail[0..2]) %*/
17740 }
17741#line 17742 "parse.c"
17742 break;
17743
17744 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 */
17745#line 6324 "parse.y"
17746 {
17747 (yyval.node_args) = new_args(p, 0, 0, (yyvsp[-3].id), (yyvsp[-1].node_args_aux), (yyvsp[0].node_args), &(yyloc));
17748 /*% ripper: params!(Qnil, Qnil, $:rest, $:post, *$:tail[0..2]) %*/
17749 }
17750#line 17751 "parse.c"
17751 break;
17752
17753 case 762: /* f_args-list_args_tail_opt_comma: f_arg opt_args_tail_args_tail_opt_comma */
17754#line 6341 "parse.y"
17755 {
17756 (yyval.node_args) = new_args(p, (yyvsp[-1].node_args_aux), 0, 0, 0, (yyvsp[0].node_args), &(yyloc));
17757 /*% ripper: params!($:pre, Qnil, Qnil, Qnil, *$:tail[0..2]) %*/
17758 }
17759#line 17760 "parse.c"
17760 break;
17761
17762 case 763: /* tail-only-args_args_tail: args_tail */
17763#line 6332 "parse.y"
17764 {
17765 (yyval.node_args) = new_args(p, 0, 0, 0, 0, (yyvsp[0].node_args), &(yyloc));
17766 /*% ripper: params!(Qnil, Qnil, Qnil, Qnil, *$:tail[0..2]) %*/
17767 }
17768#line 17769 "parse.c"
17769 break;
17770
17771 case 767: /* opt_args_tail_largs_tail_none: ',' largs_tail */
17772#line 3099 "parse.y"
17773 {
17774 (yyval.node_args) = (yyvsp[0].node_args);
17775 /*% ripper: $:tail %*/
17776 }
17777#line 17778 "parse.c"
17778 break;
17779
17780 case 768: /* opt_args_tail_largs_tail_none: none */
17781#line 3104 "parse.y"
17782 {
17783 (yyval.node_args) = new_empty_args_tail(p, &(yyloc));
17784 /*% ripper: [Qnil, Qnil, Qnil] %*/
17785 }
17786#line 17787 "parse.c"
17787 break;
17788
17789 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 */
17790#line 6269 "parse.y"
17791 {
17792 (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));
17793 /*% ripper: params!($:pre, $:opt, $:rest, Qnil, *$:tail[0..2]) %*/
17794 }
17795#line 17796 "parse.c"
17796 break;
17797
17798 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 */
17799#line 6274 "parse.y"
17800 {
17801 (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));
17802 /*% ripper: params!($:pre, $:opt, $:rest, $:post, *$:tail[0..2]) %*/
17803 }
17804#line 17805 "parse.c"
17805 break;
17806
17807 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 */
17808#line 6279 "parse.y"
17809 {
17810 (yyval.node_args) = new_args(p, (yyvsp[-3].node_args_aux), (yyvsp[-1].node_opt_arg), 0, 0, (yyvsp[0].node_args), &(yyloc));
17811 /*% ripper: params!($:pre, $:opt, Qnil, Qnil, *$:tail[0..2]) %*/
17812 }
17813#line 17814 "parse.c"
17814 break;
17815
17816 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 */
17817#line 6284 "parse.y"
17818 {
17819 (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));
17820 /*% ripper: params!($:pre, $:opt, Qnil, $:post, *$:tail[0..2]) %*/
17821 }
17822#line 17823 "parse.c"
17823 break;
17824
17825 case 773: /* args-list_arg_value_opt_args_tail_largs_tail_none: f_arg ',' f_rest_arg opt_args_tail_largs_tail_none */
17826#line 6289 "parse.y"
17827 {
17828 (yyval.node_args) = new_args(p, (yyvsp[-3].node_args_aux), 0, (yyvsp[-1].id), 0, (yyvsp[0].node_args), &(yyloc));
17829 /*% ripper: params!($:pre, Qnil, $:rest, Qnil, *$:tail[0..2]) %*/
17830 }
17831#line 17832 "parse.c"
17832 break;
17833
17834 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 */
17835#line 6294 "parse.y"
17836 {
17837 (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));
17838 /*% ripper: params!($:pre, Qnil, $:rest, $:post, *$:tail[0..2]) %*/
17839 }
17840#line 17841 "parse.c"
17841 break;
17842
17843 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 */
17844#line 6299 "parse.y"
17845 {
17846 (yyval.node_args) = new_args(p, 0, (yyvsp[-3].node_opt_arg), (yyvsp[-1].id), 0, (yyvsp[0].node_args), &(yyloc));
17847 /*% ripper: params!(Qnil, $:opt, $:rest, Qnil, *$:tail[0..2]) %*/
17848 }
17849#line 17850 "parse.c"
17850 break;
17851
17852 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 */
17853#line 6304 "parse.y"
17854 {
17855 (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));
17856 /*% ripper: params!(Qnil, $:opt, $:rest, $:post, *$:tail[0..2]) %*/
17857 }
17858#line 17859 "parse.c"
17859 break;
17860
17861 case 777: /* args-list_arg_value_opt_args_tail_largs_tail_none: f_opt_arg_arg_value opt_args_tail_largs_tail_none */
17862#line 6309 "parse.y"
17863 {
17864 (yyval.node_args) = new_args(p, 0, (yyvsp[-1].node_opt_arg), 0, 0, (yyvsp[0].node_args), &(yyloc));
17865 /*% ripper: params!(Qnil, $:opt, Qnil, Qnil, *$:tail[0..2]) %*/
17866 }
17867#line 17868 "parse.c"
17868 break;
17869
17870 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 */
17871#line 6314 "parse.y"
17872 {
17873 (yyval.node_args) = new_args(p, 0, (yyvsp[-3].node_opt_arg), 0, (yyvsp[-1].node_args_aux), (yyvsp[0].node_args), &(yyloc));
17874 /*% ripper: params!(Qnil, $:opt, Qnil, $:post, *$:tail[0..2]) %*/
17875 }
17876#line 17877 "parse.c"
17877 break;
17878
17879 case 779: /* args-list_arg_value_opt_args_tail_largs_tail_none: f_rest_arg opt_args_tail_largs_tail_none */
17880#line 6319 "parse.y"
17881 {
17882 (yyval.node_args) = new_args(p, 0, 0, (yyvsp[-1].id), 0, (yyvsp[0].node_args), &(yyloc));
17883 /*% ripper: params!(Qnil, Qnil, $:rest, Qnil, *$:tail[0..2]) %*/
17884 }
17885#line 17886 "parse.c"
17886 break;
17887
17888 case 780: /* args-list_arg_value_opt_args_tail_largs_tail_none: f_rest_arg ',' f_arg opt_args_tail_largs_tail_none */
17889#line 6324 "parse.y"
17890 {
17891 (yyval.node_args) = new_args(p, 0, 0, (yyvsp[-3].id), (yyvsp[-1].node_args_aux), (yyvsp[0].node_args), &(yyloc));
17892 /*% ripper: params!(Qnil, Qnil, $:rest, $:post, *$:tail[0..2]) %*/
17893 }
17894#line 17895 "parse.c"
17895 break;
17896
17897 case 782: /* f_args-list_largs_tail_none: f_arg opt_args_tail_largs_tail_none */
17898#line 6341 "parse.y"
17899 {
17900 (yyval.node_args) = new_args(p, (yyvsp[-1].node_args_aux), 0, 0, 0, (yyvsp[0].node_args), &(yyloc));
17901 /*% ripper: params!($:pre, Qnil, Qnil, Qnil, *$:tail[0..2]) %*/
17902 }
17903#line 17904 "parse.c"
17904 break;
17905
17906 case 783: /* tail-only-args_largs_tail: largs_tail */
17907#line 6332 "parse.y"
17908 {
17909 (yyval.node_args) = new_args(p, 0, 0, 0, 0, (yyvsp[0].node_args), &(yyloc));
17910 /*% ripper: params!(Qnil, Qnil, Qnil, Qnil, *$:tail[0..2]) %*/
17911 }
17912#line 17913 "parse.c"
17913 break;
17914
17915 case 787: /* args_forward: "(..." */
17916#line 6356 "parse.y"
17917 {
17918 (yyval.id) = idFWD_KWREST;
17919 /*% ripper: args_forward! %*/
17920 }
17921#line 17922 "parse.c"
17922 break;
17923
17924 case 788: /* f_bad_arg: "constant" */
17925#line 6363 "parse.y"
17926 {
17927 static const char mesg[] = "formal argument cannot be a constant";
17928 /*%%%*/
17929 yyerror1(&(yylsp[0]), mesg);
17930 /*% %*/
17931 (yyval.id) = 0;
17932 /*% ripper[error]: param_error!(ERR_MESG(), $:1) %*/
17933 }
17934#line 17935 "parse.c"
17935 break;
17936
17937 case 789: /* f_bad_arg: "instance variable" */
17938#line 6372 "parse.y"
17939 {
17940 static const char mesg[] = "formal argument cannot be an instance variable";
17941 /*%%%*/
17942 yyerror1(&(yylsp[0]), mesg);
17943 /*% %*/
17944 (yyval.id) = 0;
17945 /*% ripper[error]: param_error!(ERR_MESG(), $:1) %*/
17946 }
17947#line 17948 "parse.c"
17948 break;
17949
17950 case 790: /* f_bad_arg: "global variable" */
17951#line 6381 "parse.y"
17952 {
17953 static const char mesg[] = "formal argument cannot be a global variable";
17954 /*%%%*/
17955 yyerror1(&(yylsp[0]), mesg);
17956 /*% %*/
17957 (yyval.id) = 0;
17958 /*% ripper[error]: param_error!(ERR_MESG(), $:1) %*/
17959 }
17960#line 17961 "parse.c"
17961 break;
17962
17963 case 791: /* f_bad_arg: "class variable" */
17964#line 6390 "parse.y"
17965 {
17966 static const char mesg[] = "formal argument cannot be a class variable";
17967 /*%%%*/
17968 yyerror1(&(yylsp[0]), mesg);
17969 /*% %*/
17970 (yyval.id) = 0;
17971 /*% ripper[error]: param_error!(ERR_MESG(), $:1) %*/
17972 }
17973#line 17974 "parse.c"
17974 break;
17975
17976 case 793: /* f_norm_arg: "local variable or method" */
17977#line 6402 "parse.y"
17978 {
17979 VALUE e = formal_argument_error(p, (yyval.id) = (yyvsp[0].id));
17980 if (e) {
17981 /*% ripper[error]: param_error!(?e, $:1) %*/
17982 }
17983 p->max_numparam = ORDINAL_PARAM;
17984 }
17985#line 17986 "parse.c"
17986 break;
17987
17988 case 794: /* f_arg_asgn: f_norm_arg */
17989#line 6412 "parse.y"
17990 {
17991 arg_var(p, (yyvsp[0].id));
17992 (yyval.id) = (yyvsp[0].id);
17993 }
17994#line 17995 "parse.c"
17995 break;
17996
17997 case 795: /* f_arg_item: f_arg_asgn */
17998#line 6419 "parse.y"
17999 {
18000 (yyval.node_args_aux) = NEW_ARGS_AUX((yyvsp[0].id), 1, &NULL_LOC);
18001 /*% ripper: $:1 %*/
18002 }
18003#line 18004 "parse.c"
18004 break;
18005
18006 case 796: /* f_arg_item: "(" f_margs rparen */
18007#line 6424 "parse.y"
18008 {
18009 ID tid = internal_id(p);
18010 YYLTYPE loc;
18011 loc.beg_pos = (yylsp[-1]).beg_pos;
18012 loc.end_pos = (yylsp[-1]).beg_pos;
18013 arg_var(p, tid);
18014 if (dyna_in_block(p)) {
18015 (yyvsp[-1].node_masgn)->nd_value = NEW_DVAR(tid, &loc);
18016 }
18017 else {
18018 (yyvsp[-1].node_masgn)->nd_value = NEW_LVAR(tid, &loc);
18019 }
18020 (yyval.node_args_aux) = NEW_ARGS_AUX(tid, 1, &NULL_LOC);
18021 (yyval.node_args_aux)->nd_next = (NODE *)(yyvsp[-1].node_masgn);
18022 /*% ripper: mlhs_paren!($:2) %*/
18023 }
18024#line 18025 "parse.c"
18025 break;
18026
18027 case 798: /* f_arg: f_arg ',' f_arg_item */
18028#line 6445 "parse.y"
18029 {
18030 (yyval.node_args_aux) = (yyvsp[-2].node_args_aux);
18031 (yyval.node_args_aux)->nd_plen++;
18032 (yyval.node_args_aux)->nd_next = block_append(p, (yyval.node_args_aux)->nd_next, (yyvsp[0].node_args_aux)->nd_next);
18033 rb_discard_node(p, (NODE *)(yyvsp[0].node_args_aux));
18034 /*% ripper: rb_ary_push($:1, $:3) %*/
18035 }
18036#line 18037 "parse.c"
18037 break;
18038
18039 case 799: /* f_label: "label" */
18040#line 6456 "parse.y"
18041 {
18042 VALUE e = formal_argument_error(p, (yyval.id) = (yyvsp[0].id));
18043 if (e) {
18044 (yyval.id) = 0;
18045 /*% ripper[error]: param_error!(?e, $:1) %*/
18046 }
18047 /*
18048 * Workaround for Prism::ParseTest#test_filepath for
18049 * "unparser/corpus/literal/def.txt"
18050 *
18051 * See the discussion on https://github.com/ruby/ruby/pull/9923
18052 */
18053 arg_var(p, ifdef_ripper(0, (yyvsp[0].id)));
18054 /*% ripper: $:1 %*/
18055 p->max_numparam = ORDINAL_PARAM;
18056 p->ctxt.in_argdef = 0;
18057 }
18058#line 18059 "parse.c"
18059 break;
18060
18061 case 802: /* f_no_kwarg: p_kwnorest */
18062#line 6480 "parse.y"
18063 {
18064 /*% ripper: nokw_param!(Qnil) %*/
18065 }
18066#line 18067 "parse.c"
18067 break;
18068
18069 case 803: /* f_kwrest: kwrest_mark "local variable or method" */
18070#line 6486 "parse.y"
18071 {
18072 arg_var(p, shadowing_lvar(p, (yyvsp[0].id)));
18073 (yyval.id) = (yyvsp[0].id);
18074 /*% ripper: kwrest_param!($:2) %*/
18075 }
18076#line 18077 "parse.c"
18077 break;
18078
18079 case 804: /* f_kwrest: kwrest_mark */
18080#line 6492 "parse.y"
18081 {
18082 arg_var(p, idFWD_KWREST);
18083 (yyval.id) = idFWD_KWREST;
18084 /*% ripper: kwrest_param!(Qnil) %*/
18085 }
18086#line 18087 "parse.c"
18087 break;
18088
18089 case 807: /* f_rest_arg: restarg_mark "local variable or method" */
18090#line 6504 "parse.y"
18091 {
18092 arg_var(p, shadowing_lvar(p, (yyvsp[0].id)));
18093 (yyval.id) = (yyvsp[0].id);
18094 /*% ripper: rest_param!($:2) %*/
18095 }
18096#line 18097 "parse.c"
18097 break;
18098
18099 case 808: /* f_rest_arg: restarg_mark */
18100#line 6510 "parse.y"
18101 {
18102 arg_var(p, idFWD_REST);
18103 (yyval.id) = idFWD_REST;
18104 /*% ripper: rest_param!(Qnil) %*/
18105 }
18106#line 18107 "parse.c"
18107 break;
18108
18109 case 811: /* f_block_arg: blkarg_mark "local variable or method" */
18110#line 6522 "parse.y"
18111 {
18112 arg_var(p, shadowing_lvar(p, (yyvsp[0].id)));
18113 (yyval.id) = (yyvsp[0].id);
18114 /*% ripper: blockarg!($:2) %*/
18115 }
18116#line 18117 "parse.c"
18117 break;
18118
18119 case 812: /* f_block_arg: blkarg_mark "'nil'" */
18120#line 6528 "parse.y"
18121 {
18122 (yyval.id) = idNil;
18123 /*% ripper: blockarg!(ID2VAL(idNil)) %*/
18124 }
18125#line 18126 "parse.c"
18126 break;
18127
18128 case 813: /* f_block_arg: blkarg_mark */
18129#line 6533 "parse.y"
18130 {
18131 arg_var(p, idFWD_BLOCK);
18132 (yyval.id) = idFWD_BLOCK;
18133 /*% ripper: blockarg!(Qnil) %*/
18134 }
18135#line 18136 "parse.c"
18136 break;
18137
18138 case 816: /* opt_comma: option_',' */
18139#line 6541 "parse.y"
18140 {
18141 (yyval.id) = 0;
18142 /*% ripper: Qnil %*/
18143 }
18144#line 18145 "parse.c"
18145 break;
18146
18147 case 817: /* value_expr_singleton_expr: singleton_expr */
18148#line 3153 "parse.y"
18149 {
18150 value_expr(p, (yyvsp[0].node));
18151 (yyval.node) = (yyvsp[0].node);
18152 }
18153#line 18154 "parse.c"
18154 break;
18155
18156 case 818: /* singleton: value_expr_singleton_expr */
18157#line 6549 "parse.y"
18158 {
18159 NODE *expr = last_expr_node((yyvsp[0].node));
18160 switch (nd_type(expr)) {
18161 case NODE_STR:
18162 case NODE_DSTR:
18163 case NODE_XSTR:
18164 case NODE_DXSTR:
18165 case NODE_REGX:
18166 case NODE_DREGX:
18167 case NODE_SYM:
18168 case NODE_LINE:
18169 case NODE_FILE:
18170 case NODE_ENCODING:
18171 case NODE_INTEGER:
18172 case NODE_FLOAT:
18173 case NODE_RATIONAL:
18174 case NODE_IMAGINARY:
18175 case NODE_DSYM:
18176 case NODE_LIST:
18177 case NODE_ZLIST:
18178 yyerror1(&expr->nd_loc, "can't define singleton method for literals");
18179 break;
18180 default:
18181 break;
18182 }
18183 (yyval.node) = (yyvsp[0].node);
18184 }
18185#line 18186 "parse.c"
18186 break;
18187
18188 case 820: /* $@41: %empty */
18189#line 6580 "parse.y"
18190 {
18191 SET_LEX_STATE(EXPR_BEG);
18192 p->ctxt.in_argdef = 0;
18193 }
18194#line 18195 "parse.c"
18195 break;
18196
18197 case 821: /* singleton_expr: '(' $@41 expr rparen */
18198#line 6585 "parse.y"
18199 {
18200 p->ctxt.in_argdef = 1;
18201 (yyval.node) = (yyvsp[-1].node);
18202 /*% ripper: paren!($:3) %*/
18203 }
18204#line 18205 "parse.c"
18205 break;
18206
18207 case 823: /* assoc_list: assocs trailer */
18208#line 6594 "parse.y"
18209 {
18210 (yyval.node) = (yyvsp[-1].node);
18211 /*% ripper: assoclist_from_args!($:1) %*/
18212 }
18213#line 18214 "parse.c"
18214 break;
18215
18216 case 825: /* assocs: assocs ',' assoc */
18217#line 6603 "parse.y"
18218 {
18219 NODE *assocs = (yyvsp[-2].node);
18220 NODE *tail = (yyvsp[0].node);
18221 if (!assocs) {
18222 assocs = tail;
18223 }
18224 else if (tail) {
18225 NODE *n = RNODE_LIST(tail)->nd_next;
18226 if (!RNODE_LIST(tail)->nd_head && nd_type_p(n, NODE_LIST) &&
18227 nd_type_p((n = RNODE_LIST(n)->nd_head), NODE_HASH)) {
18228 /* DSTAR */
18229 tail = RNODE_HASH(n)->nd_head;
18230 }
18231 if (tail) {
18232 assocs = list_concat(assocs, tail);
18233 }
18234 }
18235 (yyval.node) = assocs;
18236 /*% ripper: rb_ary_push($:1, $:3) %*/
18237 }
18238#line 18239 "parse.c"
18239 break;
18240
18241 case 826: /* assoc: arg_value "=>" arg_value */
18242#line 6626 "parse.y"
18243 {
18244 (yyval.node) = list_append(p, NEW_LIST((yyvsp[-2].node), &(yyloc)), (yyvsp[0].node));
18245 /*% ripper: assoc_new!($:1, $:3) %*/
18246 }
18247#line 18248 "parse.c"
18248 break;
18249
18250 case 827: /* assoc: "label" arg_value */
18251#line 6631 "parse.y"
18252 {
18253 (yyval.node) = list_append(p, NEW_LIST(NEW_SYM(rb_id2str((yyvsp[-1].id)), &(yylsp[-1])), &(yyloc)), (yyvsp[0].node));
18254 /*% ripper: assoc_new!($:1, $:2) %*/
18255 }
18256#line 18257 "parse.c"
18257 break;
18258
18259 case 828: /* assoc: "label" */
18260#line 6636 "parse.y"
18261 {
18262 NODE *val = gettable(p, (yyvsp[0].id), &(yyloc));
18263 if (!val) val = NEW_ERROR(&(yyloc));
18264 (yyval.node) = list_append(p, NEW_LIST(NEW_SYM(rb_id2str((yyvsp[0].id)), &(yylsp[0])), &(yyloc)), val);
18265 /*% ripper: assoc_new!($:1, Qnil) %*/
18266 }
18267#line 18268 "parse.c"
18268 break;
18269
18270 case 829: /* assoc: "string literal" string_contents tLABEL_END arg_value */
18271#line 6643 "parse.y"
18272 {
18273 YYLTYPE loc = code_loc_gen(&(yylsp[-3]), &(yylsp[-1]));
18274 (yyval.node) = list_append(p, NEW_LIST(dsym_node(p, (yyvsp[-2].node), &loc), &loc), (yyvsp[0].node));
18275 /*% ripper: assoc_new!(dyna_symbol!($:2), $:4) %*/
18276 }
18277#line 18278 "parse.c"
18278 break;
18279
18280 case 830: /* assoc: "**arg" arg_value */
18281#line 6649 "parse.y"
18282 {
18283 (yyval.node) = list_append(p, NEW_LIST(0, &(yyloc)), (yyvsp[0].node));
18284 /*% ripper: assoc_splat!($:2) %*/
18285 }
18286#line 18287 "parse.c"
18287 break;
18288
18289 case 831: /* assoc: "**arg" */
18290#line 6654 "parse.y"
18291 {
18292 forwarding_arg_check(p, idFWD_KWREST, idFWD_ALL, "keyword rest");
18293 (yyval.node) = list_append(p, NEW_LIST(0, &(yyloc)),
18294 NEW_LVAR(idFWD_KWREST, &(yyloc)));
18295 /*% ripper: assoc_splat!(Qnil) %*/
18296 }
18297#line 18298 "parse.c"
18298 break;
18299
18300 case 850: /* term: ';' */
18301#line 6701 "parse.y"
18302 {
18303 yyerrok;
18304 token_flush(p);
18305 if (p->ctxt.in_defined) {
18306 p->ctxt.has_trailing_semicolon = 1;
18307 }
18308 }
18309#line 18310 "parse.c"
18310 break;
18311
18312 case 851: /* term: '\n' */
18313#line 6709 "parse.y"
18314 {
18315 (yyloc).end_pos = (yyloc).beg_pos;
18316 token_flush(p);
18317 }
18318#line 18319 "parse.c"
18319 break;
18320
18321 case 853: /* terms: terms ';' */
18322#line 6716 "parse.y"
18323 {yyerrok;}
18324#line 18325 "parse.c"
18325 break;
18326
18327 case 854: /* none: %empty */
18328#line 6720 "parse.y"
18329 {
18330 (yyval.node) = 0;
18331 /*% ripper: Qnil %*/
18332 }
18333#line 18334 "parse.c"
18334 break;
18335
18336
18337#line 18338 "parse.c"
18338
18339 default: break;
18340 }
18341 /* User semantic actions sometimes alter yychar, and that requires
18342 that yytoken be updated with the new translation. We take the
18343 approach of translating immediately before every use of yytoken.
18344 One alternative is translating here after every semantic action,
18345 but that translation would be missed if the semantic action invokes
18346 YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or
18347 if it invokes YYBACKUP. In the case of YYABORT or YYACCEPT, an
18348 incorrect destructor might then be invoked immediately. In the
18349 case of YYERROR or YYBACKUP, subsequent parser actions might lead
18350 to an incorrect destructor call or verbose syntax error message
18351 before the lookahead is translated. */
18352 YY_SYMBOL_PRINT ("-> $$ =", YY_CAST (yysymbol_kind_t, yyr1[yyn]), &yyval, &yyloc, p);
18353
18354 YYPOPSTACK (yylen);
18355 /* %after-reduce function. */
18356#line 2665 "parse.y"
18357 {after_reduce(yylen, p);}
18358#line 18359 "parse.c"
18359
18360 yylen = 0;
18361
18362 *++yyvsp = yyval;
18363 *++yylsp = yyloc;
18364
18365 /* Now 'shift' the result of the reduction. Determine what state
18366 that goes to, based on the state we popped back to and the rule
18367 number reduced by. */
18368 {
18369 const int yylhs = yyr1[yyn] - YYNTOKENS;
18370 const int yyi = yypgoto[yylhs] + *yyssp;
18371 yystate = (0 <= yyi && yyi <= YYLAST && yycheck[yyi] == *yyssp
18372 ? yytable[yyi]
18373 : yydefgoto[yylhs]);
18374 }
18375
18376 goto yynewstate;
18377
18378
18379/*--------------------------------------.
18380| yyerrlab -- here on detecting error. |
18381`--------------------------------------*/
18382yyerrlab:
18383 /* Make sure we have latest lookahead translation. See comments at
18384 user semantic actions for why this is necessary. */
18385 yytoken = yychar == YYEMPTY ? YYSYMBOL_YYEMPTY : YYTRANSLATE (yychar);
18386 /* If not already recovering from an error, report this error. */
18387 if (!yyerrstatus)
18388 {
18389 ++yynerrs;
18390 {
18391 yypcontext_t yyctx
18392 = {yyssp, yytoken, &yylloc};
18393 char const *yymsgp = YY_("syntax error");
18394 int yysyntax_error_status;
18395 yysyntax_error_status = yysyntax_error (&yymsg_alloc, &yymsg, &yyctx, p);
18396 if (yysyntax_error_status == 0)
18397 yymsgp = yymsg;
18398 else if (yysyntax_error_status == -1)
18399 {
18400 if (yymsg != yymsgbuf)
18401 YYSTACK_FREE (yymsg);
18402 yymsg = YY_CAST (char *,
18403 YYSTACK_ALLOC (YY_CAST (YYSIZE_T, yymsg_alloc)));
18404 if (yymsg)
18405 {
18406 yysyntax_error_status
18407 = yysyntax_error (&yymsg_alloc, &yymsg, &yyctx, p);
18408 yymsgp = yymsg;
18409 }
18410 else
18411 {
18412 yymsg = yymsgbuf;
18413 yymsg_alloc = sizeof yymsgbuf;
18414 yysyntax_error_status = YYENOMEM;
18415 }
18416 }
18417 yyerror (&yylloc, p, yymsgp);
18418 if (yysyntax_error_status == YYENOMEM)
18419 YYNOMEM;
18420 }
18421 }
18422
18423 yyerror_range[1] = yylloc;
18424 if (yyerrstatus == 3)
18425 {
18426 /* If just tried and failed to reuse lookahead token after an
18427 error, discard it. */
18428
18429 if (yychar <= END_OF_INPUT)
18430 {
18431 /* Return failure if at end of input. */
18432 if (yychar == END_OF_INPUT)
18433 YYABORT;
18434 }
18435 else
18436 {
18437 yydestruct ("Error: discarding",
18438 yytoken, &yylval, &yylloc, p);
18439 yychar = YYEMPTY;
18440 }
18441 }
18442
18443 /* Else will try to reuse lookahead token after shifting the error
18444 token. */
18445 goto yyerrlab1;
18446
18447
18448/*---------------------------------------------------.
18449| yyerrorlab -- error raised explicitly by YYERROR. |
18450`---------------------------------------------------*/
18451yyerrorlab:
18452 /* Pacify compilers when the user code never invokes YYERROR and the
18453 label yyerrorlab therefore never appears in user code. */
18454 if (0)
18455 YYERROR;
18456 ++yynerrs;
18457
18458 /* Do not reclaim the symbols of the rule whose action triggered
18459 this YYERROR. */
18460 YYPOPSTACK (yylen);
18461 /* %after-pop-stack function. */
18462#line 2667 "parse.y"
18463 {after_pop_stack(yylen, p);}
18464#line 18465 "parse.c"
18465
18466 yylen = 0;
18467 YY_STACK_PRINT (yyss, yyssp, p);
18468 yystate = *yyssp;
18469 goto yyerrlab1;
18470
18471
18472/*-------------------------------------------------------------.
18473| yyerrlab1 -- common code for both syntax error and YYERROR. |
18474`-------------------------------------------------------------*/
18475yyerrlab1:
18476 yyerrstatus = 3; /* Each real token shifted decrements this. */
18477
18478 /* Pop stack until we find a state that shifts the error token. */
18479 for (;;)
18480 {
18481 yyn = yypact[yystate];
18482 if (!yypact_value_is_default (yyn))
18483 {
18484 yyn += YYSYMBOL_YYerror;
18485 if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror)
18486 {
18487 yyn = yytable[yyn];
18488 if (0 < yyn)
18489 break;
18490 }
18491 }
18492
18493 /* Pop the current state because it cannot handle the error token. */
18494 if (yyssp == yyss)
18495 YYABORT;
18496
18497 yyerror_range[1] = *yylsp;
18498 yydestruct ("Error: popping",
18499 YY_ACCESSING_SYMBOL (yystate), yyvsp, yylsp, p);
18500 YYPOPSTACK (1);
18501 /* %after-pop-stack function. */
18502#line 2667 "parse.y"
18503 {after_pop_stack(1, p);}
18504#line 18505 "parse.c"
18505
18506 yystate = *yyssp;
18507 YY_STACK_PRINT (yyss, yyssp, p);
18508 }
18509
18510 YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
18511 *++yyvsp = yylval;
18512 YY_IGNORE_MAYBE_UNINITIALIZED_END
18513
18514 yyerror_range[2] = yylloc;
18515 ++yylsp;
18516 YYLLOC_DEFAULT (*yylsp, yyerror_range, 2);
18517
18518 /* Shift the error token. */
18519 YY_SYMBOL_PRINT ("Shifting", YY_ACCESSING_SYMBOL (yyn), yyvsp, yylsp, p);
18520 /* %after-shift-error-token code. */
18521#line 2666 "parse.y"
18522 {after_shift_error_token(p);}
18523#line 18524 "parse.c"
18524
18525
18526 yystate = yyn;
18527 goto yynewstate;
18528
18529
18530/*-------------------------------------.
18531| yyacceptlab -- YYACCEPT comes here. |
18532`-------------------------------------*/
18533yyacceptlab:
18534 yyresult = 0;
18535 goto yyreturnlab;
18536
18537
18538/*-----------------------------------.
18539| yyabortlab -- YYABORT comes here. |
18540`-----------------------------------*/
18541yyabortlab:
18542 yyresult = 1;
18543 goto yyreturnlab;
18544
18545
18546/*-----------------------------------------------------------.
18547| yyexhaustedlab -- YYNOMEM (memory exhaustion) comes here. |
18548`-----------------------------------------------------------*/
18549yyexhaustedlab:
18550 yyerror (&yylloc, p, YY_("memory exhausted"));
18551 yyresult = 2;
18552 goto yyreturnlab;
18553
18554
18555/*----------------------------------------------------------.
18556| yyreturnlab -- parsing is finished, clean up and return. |
18557`----------------------------------------------------------*/
18558yyreturnlab:
18559 if (yychar != YYEMPTY)
18560 {
18561 /* Make sure we have latest lookahead translation. See comments at
18562 user semantic actions for why this is necessary. */
18563 yytoken = YYTRANSLATE (yychar);
18564 yydestruct ("Cleanup: discarding lookahead",
18565 yytoken, &yylval, &yylloc, p);
18566 }
18567 /* Do not reclaim the symbols of the rule whose action triggered
18568 this YYABORT or YYACCEPT. */
18569 YYPOPSTACK (yylen);
18570 YY_STACK_PRINT (yyss, yyssp, p);
18571 while (yyssp != yyss)
18572 {
18573 yydestruct ("Cleanup: popping",
18574 YY_ACCESSING_SYMBOL (+*yyssp), yyvsp, yylsp, p);
18575 YYPOPSTACK (1);
18576 }
18577#ifndef yyoverflow
18578 if (yyss != yyssa)
18579 YYSTACK_FREE (yyss);
18580#endif
18581 if (yymsg != yymsgbuf)
18582 YYSTACK_FREE (yymsg);
18583 return yyresult;
18584}
18585
18586#line 6725 "parse.y"
18587
18588# undef p
18589# undef yylex
18590# undef yylval
18591# define yylval (*p->lval)
18592
18593static int regx_options(struct parser_params*);
18594static int tokadd_string(struct parser_params*,int,int,int,long*,rb_encoding**,rb_encoding**);
18595static void tokaddmbc(struct parser_params *p, int c, rb_encoding *enc);
18596static enum yytokentype parse_string(struct parser_params*,rb_strterm_literal_t*);
18597static enum yytokentype here_document(struct parser_params*,rb_strterm_heredoc_t*);
18598
18599#define set_parser_s_value(x) (ifdef_ripper(p->s_value = (x), (void)0))
18600
18601# define set_yylval_node(x) { \
18602 YYLTYPE _cur_loc; \
18603 rb_parser_set_location(p, &_cur_loc); \
18604 yylval.node = (x); \
18605 set_parser_s_value(STR_NEW(p->lex.ptok, p->lex.pcur-p->lex.ptok)); \
18606}
18607# define set_yylval_str(x) \
18608do { \
18609 set_yylval_node(NEW_STR(x, &_cur_loc)); \
18610 set_parser_s_value(rb_str_new_mutable_parser_string(x)); \
18611} while(0)
18612# define set_yylval_num(x) { \
18613 yylval.num = (x); \
18614 set_parser_s_value(x); \
18615}
18616# define set_yylval_id(x) (yylval.id = (x))
18617# define set_yylval_name(x) { \
18618 (yylval.id = (x)); \
18619 set_parser_s_value(ID2SYM(x)); \
18620}
18621# define yylval_id() (yylval.id)
18622
18623#define set_yylval_noname() set_yylval_id(keyword_nil)
18624#define has_delayed_token(p) (p->delayed.token != NULL)
18625
18626#ifndef RIPPER
18627#define literal_flush(p, ptr) ((p)->lex.ptok = (ptr))
18628#define dispatch_scan_event(p, t) parser_dispatch_scan_event(p, t, __LINE__)
18629
18630static bool
18631parser_has_token(struct parser_params *p)
18632{
18633 const char *const pcur = p->lex.pcur;
18634 const char *const ptok = p->lex.ptok;
18635 if (p->keep_tokens && (pcur < ptok)) {
18636 rb_bug("lex.pcur < lex.ptok. (line: %d) %"PRIdPTRDIFF"|%"PRIdPTRDIFF"|%"PRIdPTRDIFF"",
18637 p->ruby_sourceline, ptok - p->lex.pbeg, pcur - ptok, p->lex.pend - pcur);
18638 }
18639 return pcur > ptok;
18640}
18641
18642static const char *
18643escaped_char(int c)
18644{
18645 switch (c) {
18646 case '"': return "\\\"";
18647 case '\\': return "\\\\";
18648 case '\0': return "\\0";
18649 case '\n': return "\\n";
18650 case '\r': return "\\r";
18651 case '\t': return "\\t";
18652 case '\f': return "\\f";
18653 case '\013': return "\\v";
18654 case '\010': return "\\b";
18655 case '\007': return "\\a";
18656 case '\033': return "\\e";
18657 case '\x7f': return "\\c?";
18658 }
18659 return NULL;
18660}
18661
18662static rb_parser_string_t *
18663rb_parser_str_escape(struct parser_params *p, rb_parser_string_t *str)
18664{
18665 rb_encoding *enc = p->enc;
18666 const char *ptr = str->ptr;
18667 const char *pend = ptr + str->len;
18668 const char *prev = ptr;
18669 char charbuf[5] = {'\\', 'x', 0, 0, 0};
18670 rb_parser_string_t * result = rb_parser_string_new(p, 0, 0);
18671
18672 while (ptr < pend) {
18673 unsigned int c;
18674 const char *cc;
18675 int n = rb_enc_precise_mbclen(ptr, pend, enc);
18676 if (!MBCLEN_CHARFOUND_P(n)) {
18677 if (ptr > prev) parser_str_cat(result, prev, ptr - prev);
18678 n = rb_enc_mbminlen(enc);
18679 if (pend < ptr + n)
18680 n = (int)(pend - ptr);
18681 while (n--) {
18682 c = ((unsigned char)*ptr >> 4) & 0x0f;
18683 charbuf[2] = (c < 10) ? '0' + c : 'A' + c - 10;
18684 c = *ptr & 0x0f;
18685 charbuf[3] = (c < 10) ? '0' + c : 'A' + c - 10;
18686 parser_str_cat(result, charbuf, 4);
18687 prev = ++ptr;
18688 }
18689 continue;
18690 }
18691 n = MBCLEN_CHARFOUND_LEN(n);
18692 c = rb_enc_mbc_to_codepoint(ptr, pend, enc);
18693 ptr += n;
18694 cc = escaped_char(c);
18695 if (cc) {
18696 if (ptr - n > prev) parser_str_cat(result, prev, ptr - n - prev);
18697 parser_str_cat_cstr(result, cc);
18698 prev = ptr;
18699 }
18700 else if (rb_enc_isascii(c, enc) && ISPRINT(c)) {
18701 }
18702 else {
18703 if (ptr - n > prev) {
18704 parser_str_cat(result, prev, ptr - n - prev);
18705 prev = ptr - n;
18706 }
18707 parser_str_cat(result, prev, ptr - prev);
18708 prev = ptr;
18709 }
18710 }
18711 if (ptr > prev) parser_str_cat(result, prev, ptr - prev);
18712
18713 return result;
18714}
18715
18716static void
18717parser_append_tokens(struct parser_params *p, rb_parser_string_t *str, enum yytokentype t, int line)
18718{
18720 token->id = p->token_id;
18721 token->type_name = parser_token2char(p, t);
18722 token->str = str;
18723 token->loc.beg_pos = p->yylloc->beg_pos;
18724 token->loc.end_pos = p->yylloc->end_pos;
18725 rb_parser_ary_push_ast_token(p, p->tokens, token);
18726 p->token_id++;
18727
18728 if (p->debug) {
18729 rb_parser_string_t *str_escaped = rb_parser_str_escape(p, str);
18730 rb_parser_printf(p, "Append tokens (line: %d) [%d, :%s, \"%s\", [%d, %d, %d, %d]]\n",
18731 line, token->id, token->type_name, str_escaped->ptr,
18732 token->loc.beg_pos.lineno, token->loc.beg_pos.column,
18733 token->loc.end_pos.lineno, token->loc.end_pos.column);
18734 rb_parser_string_free(p, str_escaped);
18735 }
18736}
18737
18738static void
18739parser_dispatch_scan_event(struct parser_params *p, enum yytokentype t, int line)
18740{
18741 debug_token_line(p, "parser_dispatch_scan_event", line);
18742
18743 if (!parser_has_token(p)) return;
18744
18745 RUBY_SET_YYLLOC(*p->yylloc);
18746
18747 if (p->keep_tokens) {
18748 rb_parser_string_t *str = rb_parser_encoding_string_new(p, p->lex.ptok, p->lex.pcur - p->lex.ptok, p->enc);
18749 parser_append_tokens(p, str, t, line);
18750 }
18751
18752 token_flush(p);
18753}
18754
18755#define dispatch_delayed_token(p, t) parser_dispatch_delayed_token(p, t, __LINE__)
18756static void
18757parser_dispatch_delayed_token(struct parser_params *p, enum yytokentype t, int line)
18758{
18759 debug_token_line(p, "parser_dispatch_delayed_token", line);
18760
18761 if (!has_delayed_token(p)) return;
18762
18763 RUBY_SET_YYLLOC_OF_DELAYED_TOKEN(*p->yylloc);
18764
18765 if (p->keep_tokens) {
18766 /* p->delayed.token is freed by rb_parser_tokens_free */
18767 parser_append_tokens(p, p->delayed.token, t, line);
18768 }
18769 else {
18770 rb_parser_string_free(p, p->delayed.token);
18771 }
18772
18773 p->delayed.token = NULL;
18774}
18775#else
18776#define literal_flush(p, ptr) ((void)(ptr))
18777
18778static int
18779ripper_has_scan_event(struct parser_params *p)
18780{
18781 if (p->lex.pcur < p->lex.ptok) rb_raise(rb_eRuntimeError, "lex.pcur < lex.ptok");
18782 return p->lex.pcur > p->lex.ptok;
18783}
18784
18785static VALUE
18786ripper_scan_event_val(struct parser_params *p, enum yytokentype t)
18787{
18788 VALUE str = STR_NEW(p->lex.ptok, p->lex.pcur - p->lex.ptok);
18789 VALUE rval = ripper_dispatch1(p, ripper_token2eventid(t), str);
18790 RUBY_SET_YYLLOC(*p->yylloc);
18791 token_flush(p);
18792 return rval;
18793}
18794
18795static void
18796ripper_dispatch_scan_event(struct parser_params *p, enum yytokentype t)
18797{
18798 if (!ripper_has_scan_event(p)) return;
18799
18800 set_parser_s_value(ripper_scan_event_val(p, t));
18801}
18802#define dispatch_scan_event(p, t) ripper_dispatch_scan_event(p, t)
18803
18804static void
18805ripper_dispatch_delayed_token(struct parser_params *p, enum yytokentype t)
18806{
18807 /* save and adjust the location to delayed token for callbacks */
18808 int saved_line = p->ruby_sourceline;
18809 const char *saved_tokp = p->lex.ptok;
18810 VALUE s_value, str;
18811
18812 if (!has_delayed_token(p)) return;
18813 p->ruby_sourceline = p->delayed.beg_line;
18814 p->lex.ptok = p->lex.pbeg + p->delayed.beg_col;
18815 str = rb_str_new_mutable_parser_string(p->delayed.token);
18816 rb_parser_string_free(p, p->delayed.token);
18817 s_value = ripper_dispatch1(p, ripper_token2eventid(t), str);
18818 set_parser_s_value(s_value);
18819 p->delayed.token = NULL;
18820 p->ruby_sourceline = saved_line;
18821 p->lex.ptok = saved_tokp;
18822}
18823#define dispatch_delayed_token(p, t) ripper_dispatch_delayed_token(p, t)
18824#endif /* RIPPER */
18825
18826static inline int
18827is_identchar(struct parser_params *p, const char *ptr, const char *MAYBE_UNUSED(ptr_end), rb_encoding *enc)
18828{
18829 return rb_enc_isalnum((unsigned char)*ptr, enc) || *ptr == '_' || !ISASCII(*ptr);
18830}
18831
18832static inline bool
18833peek_word_at(struct parser_params *p, const char *str, size_t len, int at)
18834{
18835 const char *ptr = p->lex.pcur + at;
18836 if (lex_eol_ptr_n_p(p, ptr, len-1)) return false;
18837 if (memcmp(ptr, str, len)) return false;
18838 if (lex_eol_ptr_n_p(p, ptr, len)) return true;
18839 switch (ptr[len]) {
18840 case '!': case '?': return false;
18841 }
18842 return !is_identchar(p, ptr+len, p->lex.pend, p->enc);
18843}
18844
18845static inline int
18846parser_is_identchar(struct parser_params *p)
18847{
18848 return !(p)->eofp && is_identchar(p, p->lex.pcur-1, p->lex.pend, p->enc);
18849}
18850
18851static inline int
18852parser_isascii(struct parser_params *p)
18853{
18854 return ISASCII(*(p->lex.pcur-1));
18855}
18856
18857static void
18858token_info_setup(token_info *ptinfo, const char *ptr, const rb_code_location_t *loc)
18859{
18860 int column = 1, nonspc = 0, i;
18861 for (i = 0; i < loc->beg_pos.column; i++, ptr++) {
18862 if (*ptr == '\t') {
18863 column = (((column - 1) / TAB_WIDTH) + 1) * TAB_WIDTH;
18864 }
18865 column++;
18866 if (*ptr != ' ' && *ptr != '\t') {
18867 nonspc = 1;
18868 }
18869 }
18870
18871 ptinfo->beg = loc->beg_pos;
18872 ptinfo->indent = column;
18873 ptinfo->nonspc = nonspc;
18874}
18875
18876static void
18877token_info_push(struct parser_params *p, const char *token, const rb_code_location_t *loc)
18878{
18879 token_info *ptinfo;
18880
18881 if (!p->token_info_enabled) return;
18882 ptinfo = ALLOC(token_info);
18883 ptinfo->token = token;
18884 ptinfo->next = p->token_info;
18885 token_info_setup(ptinfo, p->lex.pbeg, loc);
18886
18887 p->token_info = ptinfo;
18888}
18889
18890static void
18891token_info_pop(struct parser_params *p, const char *token, const rb_code_location_t *loc)
18892{
18893 token_info *ptinfo_beg = p->token_info;
18894
18895 if (!ptinfo_beg) return;
18896
18897 /* indentation check of matched keywords (begin..end, if..end, etc.) */
18898 token_info_warn(p, token, ptinfo_beg, 1, loc);
18899
18900 p->token_info = ptinfo_beg->next;
18901 ruby_xfree_sized(ptinfo_beg, sizeof(*ptinfo_beg));
18902}
18903
18904static void
18905token_info_drop(struct parser_params *p, const char *token, rb_code_position_t beg_pos)
18906{
18907 token_info *ptinfo_beg = p->token_info;
18908
18909 if (!ptinfo_beg) return;
18910 p->token_info = ptinfo_beg->next;
18911
18912 if (ptinfo_beg->beg.lineno != beg_pos.lineno ||
18913 ptinfo_beg->beg.column != beg_pos.column ||
18914 strcmp(ptinfo_beg->token, token)) {
18915 compile_error(p, "token position mismatch: %d:%d:%s expected but %d:%d:%s",
18916 beg_pos.lineno, beg_pos.column, token,
18917 ptinfo_beg->beg.lineno, ptinfo_beg->beg.column,
18918 ptinfo_beg->token);
18919 }
18920
18921 ruby_xfree_sized(ptinfo_beg, sizeof(*ptinfo_beg));
18922}
18923
18924static void
18925token_info_warn(struct parser_params *p, const char *token, token_info *ptinfo_beg, int same, const rb_code_location_t *loc)
18926{
18927 token_info ptinfo_end_body, *ptinfo_end = &ptinfo_end_body;
18928 if (!p->token_info_enabled) return;
18929 if (!ptinfo_beg) return;
18930 token_info_setup(ptinfo_end, p->lex.pbeg, loc);
18931 if (ptinfo_beg->beg.lineno == ptinfo_end->beg.lineno) return; /* ignore one-line block */
18932 if (ptinfo_beg->nonspc || ptinfo_end->nonspc) return; /* ignore keyword in the middle of a line */
18933 if (ptinfo_beg->indent == ptinfo_end->indent) return; /* the indents are matched */
18934 if (!same && ptinfo_beg->indent < ptinfo_end->indent) return;
18935 rb_warn3L(ptinfo_end->beg.lineno,
18936 "mismatched indentations at '%s' with '%s' at %d",
18937 WARN_S(token), WARN_S(ptinfo_beg->token), WARN_I(ptinfo_beg->beg.lineno));
18938}
18939
18940static int
18941parser_precise_mbclen(struct parser_params *p, const char *ptr)
18942{
18943 int len = rb_enc_precise_mbclen(ptr, p->lex.pend, p->enc);
18944 if (!MBCLEN_CHARFOUND_P(len)) {
18945 compile_error(p, "invalid multibyte char (%s)", rb_enc_name(p->enc));
18946 return -1;
18947 }
18948 return len;
18949}
18950
18951#ifndef RIPPER
18952static inline void
18953parser_show_error_line(struct parser_params *p, const YYLTYPE *yylloc)
18954{
18955 rb_parser_string_t *str;
18956 int lineno = p->ruby_sourceline;
18957 if (!yylloc) {
18958 return;
18959 }
18960 else if (yylloc->beg_pos.lineno == lineno) {
18961 str = p->lex.lastline;
18962 }
18963 else {
18964 return;
18965 }
18966 ruby_show_error_line(p, p->error_buffer, yylloc, lineno, str);
18967}
18968
18969static int
18970parser_yyerror(struct parser_params *p, const rb_code_location_t *yylloc, const char *msg)
18971{
18972#if 0
18973 YYLTYPE current;
18974
18975 if (!yylloc) {
18976 yylloc = RUBY_SET_YYLLOC(current);
18977 }
18978 else if ((p->ruby_sourceline != yylloc->beg_pos.lineno &&
18979 p->ruby_sourceline != yylloc->end_pos.lineno)) {
18980 yylloc = 0;
18981 }
18982#endif
18983 parser_compile_error(p, yylloc, "%s", msg);
18984 parser_show_error_line(p, yylloc);
18985 return 0;
18986}
18987
18988static int
18989parser_yyerror0(struct parser_params *p, const char *msg)
18990{
18991 YYLTYPE current;
18992 return parser_yyerror(p, RUBY_SET_YYLLOC(current), msg);
18993}
18994
18995void
18996ruby_show_error_line(struct parser_params *p, VALUE errbuf, const YYLTYPE *yylloc, int lineno, rb_parser_string_t *str)
18997{
18998 VALUE mesg;
18999 const int max_line_margin = 30;
19000 const char *ptr, *ptr_end, *pt, *pb;
19001 const char *pre = "", *post = "", *pend;
19002 const char *code = "", *caret = "";
19003 const char *lim;
19004 const char *const pbeg = PARSER_STRING_PTR(str);
19005 char *buf;
19006 long len;
19007 int i;
19008
19009 if (!yylloc) return;
19010 pend = rb_parser_string_end(str);
19011 if (pend > pbeg && pend[-1] == '\n') {
19012 if (--pend > pbeg && pend[-1] == '\r') --pend;
19013 }
19014
19015 pt = pend;
19016 if (lineno == yylloc->end_pos.lineno &&
19017 (pend - pbeg) > yylloc->end_pos.column) {
19018 pt = pbeg + yylloc->end_pos.column;
19019 }
19020
19021 ptr = ptr_end = pt;
19022 lim = ptr - pbeg > max_line_margin ? ptr - max_line_margin : pbeg;
19023 while ((lim < ptr) && (*(ptr-1) != '\n')) ptr--;
19024
19025 lim = pend - ptr_end > max_line_margin ? ptr_end + max_line_margin : pend;
19026 while ((ptr_end < lim) && (*ptr_end != '\n') && (*ptr_end != '\r')) ptr_end++;
19027
19028 len = ptr_end - ptr;
19029 if (len > 4) {
19030 if (ptr > pbeg) {
19031 ptr = rb_enc_prev_char(pbeg, ptr, pt, rb_parser_str_get_encoding(str));
19032 if (ptr > pbeg) pre = "...";
19033 }
19034 if (ptr_end < pend) {
19035 ptr_end = rb_enc_prev_char(pt, ptr_end, pend, rb_parser_str_get_encoding(str));
19036 if (ptr_end < pend) post = "...";
19037 }
19038 }
19039 pb = pbeg;
19040 if (lineno == yylloc->beg_pos.lineno) {
19041 pb += yylloc->beg_pos.column;
19042 if (pb > pt) pb = pt;
19043 }
19044 if (pb < ptr) pb = ptr;
19045 if (len <= 4 && yylloc->beg_pos.lineno == yylloc->end_pos.lineno) {
19046 return;
19047 }
19048 if (RTEST(errbuf)) {
19049 mesg = rb_attr_get(errbuf, idMesg);
19050 if (char_at_end(p, mesg, '\n') != '\n')
19051 rb_str_cat_cstr(mesg, "\n");
19052 }
19053 else {
19054 mesg = rb_enc_str_new(0, 0, rb_parser_str_get_encoding(str));
19055 }
19056 if (!errbuf && rb_stderr_tty_p()) {
19057#define CSI_BEGIN "\033["
19058#define CSI_SGR "m"
19059 rb_str_catf(mesg,
19060 CSI_BEGIN""CSI_SGR"%s" /* pre */
19061 CSI_BEGIN"1"CSI_SGR"%.*s"
19062 CSI_BEGIN"1;4"CSI_SGR"%.*s"
19063 CSI_BEGIN";1"CSI_SGR"%.*s"
19064 CSI_BEGIN""CSI_SGR"%s" /* post */
19065 "\n",
19066 pre,
19067 (int)(pb - ptr), ptr,
19068 (int)(pt - pb), pb,
19069 (int)(ptr_end - pt), pt,
19070 post);
19071 }
19072 else {
19073 char *p2;
19074
19075 len = ptr_end - ptr;
19076 lim = pt < pend ? pt : pend;
19077 i = (int)(lim - ptr);
19078 buf = ALLOCA_N(char, i+2);
19079 code = ptr;
19080 caret = p2 = buf;
19081 if (ptr <= pb) {
19082 while (ptr < pb) {
19083 *p2++ = *ptr++ == '\t' ? '\t' : ' ';
19084 }
19085 *p2++ = '^';
19086 ptr++;
19087 }
19088 if (lim > ptr) {
19089 memset(p2, '~', (lim - ptr));
19090 p2 += (lim - ptr);
19091 }
19092 *p2 = '\0';
19093 rb_str_catf(mesg, "%s%.*s%s\n""%s%s\n",
19094 pre, (int)len, code, post,
19095 pre, caret);
19096 }
19097 if (!errbuf) rb_write_error_str(mesg);
19098}
19099#else
19100
19101static int
19102parser_yyerror(struct parser_params *p, const YYLTYPE *yylloc, const char *msg)
19103{
19104 const char *pcur = 0, *ptok = 0;
19105 if (p->ruby_sourceline == yylloc->beg_pos.lineno &&
19106 p->ruby_sourceline == yylloc->end_pos.lineno) {
19107 pcur = p->lex.pcur;
19108 ptok = p->lex.ptok;
19109 p->lex.ptok = p->lex.pbeg + yylloc->beg_pos.column;
19110 p->lex.pcur = p->lex.pbeg + yylloc->end_pos.column;
19111 }
19112 parser_yyerror0(p, msg);
19113 if (pcur) {
19114 p->lex.ptok = ptok;
19115 p->lex.pcur = pcur;
19116 }
19117 return 0;
19118}
19119
19120static int
19121parser_yyerror0(struct parser_params *p, const char *msg)
19122{
19123 dispatch1(parse_error, STR_NEW2(msg));
19124 ripper_error(p);
19125 return 0;
19126}
19127
19128static inline void
19129parser_show_error_line(struct parser_params *p, const YYLTYPE *yylloc)
19130{
19131}
19132#endif /* !RIPPER */
19133
19134static int
19135vtable_size(const struct vtable *tbl)
19136{
19137 if (!DVARS_TERMINAL_P(tbl)) {
19138 return tbl->pos;
19139 }
19140 else {
19141 return 0;
19142 }
19143}
19144
19145static struct vtable *
19146vtable_alloc_gen(struct parser_params *p, int line, struct vtable *prev)
19147{
19148 struct vtable *tbl = ALLOC(struct vtable);
19149 tbl->pos = 0;
19150 tbl->capa = 8;
19151 tbl->tbl = ALLOC_N(ID, tbl->capa);
19152 tbl->prev = prev;
19153#ifndef RIPPER
19154 if (p->debug) {
19155 rb_parser_printf(p, "vtable_alloc:%d: %p\n", line, (void *)tbl);
19156 }
19157#endif
19158 return tbl;
19159}
19160#define vtable_alloc(prev) vtable_alloc_gen(p, __LINE__, prev)
19161
19162static void
19163vtable_free_gen(struct parser_params *p, int line, const char *name,
19164 struct vtable *tbl)
19165{
19166#ifndef RIPPER
19167 if (p->debug) {
19168 rb_parser_printf(p, "vtable_free:%d: %s(%p)\n", line, name, (void *)tbl);
19169 }
19170#endif
19171 if (!DVARS_TERMINAL_P(tbl)) {
19172 if (tbl->tbl) {
19173 ruby_xfree_sized(tbl->tbl, tbl->capa * sizeof(ID));
19174 }
19175 ruby_xfree_sized(tbl, sizeof(*tbl));
19176 }
19177}
19178#define vtable_free(tbl) vtable_free_gen(p, __LINE__, #tbl, tbl)
19179
19180static void
19181vtable_add_gen(struct parser_params *p, int line, const char *name,
19182 struct vtable *tbl, ID id)
19183{
19184#ifndef RIPPER
19185 if (p->debug) {
19186 rb_parser_printf(p, "vtable_add:%d: %s(%p), %s\n",
19187 line, name, (void *)tbl, rb_id2name(id));
19188 }
19189#endif
19190 if (DVARS_TERMINAL_P(tbl)) {
19191 rb_parser_fatal(p, "vtable_add: vtable is not allocated (%p)", (void *)tbl);
19192 return;
19193 }
19194 if (tbl->pos == tbl->capa) {
19195 tbl->capa = tbl->capa * 2;
19196 SIZED_REALLOC_N(tbl->tbl, ID, tbl->capa, tbl->pos);
19197 }
19198 tbl->tbl[tbl->pos++] = id;
19199}
19200#define vtable_add(tbl, id) vtable_add_gen(p, __LINE__, #tbl, tbl, id)
19201
19202static void
19203vtable_pop_gen(struct parser_params *p, int line, const char *name,
19204 struct vtable *tbl, int n)
19205{
19206 if (p->debug) {
19207 rb_parser_printf(p, "vtable_pop:%d: %s(%p), %d\n",
19208 line, name, (void *)tbl, n);
19209 }
19210 if (tbl->pos < n) {
19211 rb_parser_fatal(p, "vtable_pop: unreachable (%d < %d)", tbl->pos, n);
19212 return;
19213 }
19214 tbl->pos -= n;
19215}
19216#define vtable_pop(tbl, n) vtable_pop_gen(p, __LINE__, #tbl, tbl, n)
19217
19218static int
19219vtable_included(const struct vtable * tbl, ID id)
19220{
19221 int i;
19222
19223 if (!DVARS_TERMINAL_P(tbl)) {
19224 for (i = 0; i < tbl->pos; i++) {
19225 if (tbl->tbl[i] == id) {
19226 return i+1;
19227 }
19228 }
19229 }
19230 return 0;
19231}
19232
19233static void parser_prepare(struct parser_params *p);
19234
19235static int
19236e_option_supplied(struct parser_params *p)
19237{
19238 return strcmp(p->ruby_sourcefile, "-e") == 0;
19239}
19240
19241#ifndef RIPPER
19242static NODE *parser_append_options(struct parser_params *p, NODE *node);
19243
19244static VALUE
19245yycompile0(VALUE arg)
19246{
19247 int n;
19248 NODE *tree;
19249 struct parser_params *p = (struct parser_params *)arg;
19250 int cov = FALSE;
19251
19252 if (!compile_for_eval && !NIL_P(p->ruby_sourcefile_string) && !e_option_supplied(p)) {
19253 cov = TRUE;
19254 }
19255
19256 if (p->debug_lines) {
19257 p->ast->body.script_lines = p->debug_lines;
19258 }
19259
19260 parser_prepare(p);
19261#define RUBY_DTRACE_PARSE_HOOK(name) \
19262 if (RUBY_DTRACE_PARSE_##name##_ENABLED()) { \
19263 RUBY_DTRACE_PARSE_##name(p->ruby_sourcefile, p->ruby_sourceline); \
19264 }
19265 RUBY_DTRACE_PARSE_HOOK(BEGIN);
19266 n = yyparse(p);
19267 RUBY_DTRACE_PARSE_HOOK(END);
19268
19269 p->debug_lines = 0;
19270
19271 xfree(p->lex.strterm);
19272 p->lex.strterm = 0;
19273 p->lex.pcur = p->lex.pbeg = p->lex.pend = 0;
19274 if (n || p->error_p) {
19275 VALUE mesg = p->error_buffer;
19276 if (!mesg) {
19277 mesg = syntax_error_new();
19278 }
19279 if (!p->error_tolerant) {
19280 rb_set_errinfo(mesg);
19281 return FALSE;
19282 }
19283 }
19284 tree = p->eval_tree;
19285 if (!tree) {
19286 tree = NEW_NIL(&NULL_LOC);
19287 }
19288 else {
19289 rb_parser_ary_t *tokens = p->tokens;
19290 NODE *prelude;
19291 NODE *body = parser_append_options(p, RNODE_SCOPE(tree)->nd_body);
19292 prelude = block_append(p, p->eval_tree_begin, body);
19293 RNODE_SCOPE(tree)->nd_body = prelude;
19294 p->ast->body.frozen_string_literal = p->frozen_string_literal;
19295 p->ast->body.coverage_enabled = cov;
19296 if (p->keep_tokens) {
19297 p->ast->node_buffer->tokens = tokens;
19298 p->tokens = NULL;
19299 }
19300 }
19301 p->ast->body.root = tree;
19302 p->ast->body.line_count = p->line_count;
19303 return TRUE;
19304}
19305
19306static rb_ast_t *
19307yycompile(struct parser_params *p, VALUE fname, int line)
19308{
19309 rb_ast_t *ast;
19310 if (NIL_P(fname)) {
19311 p->ruby_sourcefile_string = Qnil;
19312 p->ruby_sourcefile = "(none)";
19313 }
19314 else {
19315 p->ruby_sourcefile_string = rb_str_to_interned_str(fname);
19316 p->ruby_sourcefile = StringValueCStr(fname);
19317 }
19318 p->ruby_sourceline = line - 1;
19319
19320 p->lvtbl = NULL;
19321
19322 p->ast = ast = rb_ast_new();
19323 compile_callback(yycompile0, (VALUE)p);
19324 ast->body.source_hash = rb_source_hash_finalize(&p->source_hash);
19325 ast->body.has_source_hash = 1;
19326 p->ast = 0;
19327
19328 while (p->lvtbl) {
19329 local_pop(p);
19330 }
19331
19332 return ast;
19333}
19334#endif /* !RIPPER */
19335
19336static rb_encoding *
19337must_be_ascii_compatible(struct parser_params *p, rb_parser_string_t *s)
19338{
19339 rb_encoding *enc = rb_parser_str_get_encoding(s);
19340 if (!rb_enc_asciicompat(enc)) {
19341 rb_raise(rb_eArgError, "invalid source encoding");
19342 }
19343 return enc;
19344}
19345
19346static rb_parser_string_t *
19347lex_getline(struct parser_params *p)
19348{
19349 rb_parser_string_t *line = (*p->lex.gets)(p, p->lex.input, p->line_count);
19350 if (!line) return 0;
19351 p->line_count++;
19352 rb_source_hash_update(&p->source_hash, (const uint8_t *)line->ptr, (size_t)line->len);
19353 string_buffer_append(p, line);
19354 must_be_ascii_compatible(p, line);
19355 return line;
19356}
19357
19358#ifndef RIPPER
19359rb_ast_t*
19360rb_parser_compile(rb_parser_t *p, rb_parser_lex_gets_func *gets, VALUE fname, rb_parser_input_data input, int line)
19361{
19362 p->lex.gets = gets;
19363 p->lex.input = input;
19364 p->lex.pbeg = p->lex.pcur = p->lex.pend = 0;
19365
19366 return yycompile(p, fname, line);
19367}
19368#endif /* !RIPPER */
19369
19370#define STR_FUNC_ESCAPE 0x01
19371#define STR_FUNC_EXPAND 0x02
19372#define STR_FUNC_REGEXP 0x04
19373#define STR_FUNC_QWORDS 0x08
19374#define STR_FUNC_SYMBOL 0x10
19375#define STR_FUNC_INDENT 0x20
19376#define STR_FUNC_LABEL 0x40
19377#define STR_FUNC_LIST 0x4000
19378#define STR_FUNC_TERM 0x8000
19379
19380enum string_type {
19381 str_label = STR_FUNC_LABEL,
19382 str_squote = (0),
19383 str_dquote = (STR_FUNC_EXPAND),
19384 str_xquote = (STR_FUNC_EXPAND),
19385 str_regexp = (STR_FUNC_REGEXP|STR_FUNC_ESCAPE|STR_FUNC_EXPAND),
19386 str_sword = (STR_FUNC_QWORDS|STR_FUNC_LIST),
19387 str_dword = (STR_FUNC_QWORDS|STR_FUNC_EXPAND|STR_FUNC_LIST),
19388 str_ssym = (STR_FUNC_SYMBOL),
19389 str_dsym = (STR_FUNC_SYMBOL|STR_FUNC_EXPAND)
19390};
19391
19392static rb_parser_string_t *
19393parser_str_new(struct parser_params *p, const char *ptr, long len, rb_encoding *enc, int func, rb_encoding *enc0)
19394{
19395 rb_parser_string_t *pstr;
19396
19397 pstr = rb_parser_encoding_string_new(p, ptr, len, enc);
19398
19399 if (!(func & STR_FUNC_REGEXP)) {
19400 if (rb_parser_is_ascii_string(p, pstr)) {
19401 }
19402 else if (rb_is_usascii_enc((void *)enc0) && enc != rb_utf8_encoding()) {
19403 /* everything is valid in ASCII-8BIT */
19404 enc = rb_ascii8bit_encoding();
19405 PARSER_ENCODING_CODERANGE_SET(pstr, enc, RB_PARSER_ENC_CODERANGE_VALID);
19406 }
19407 }
19408
19409 return pstr;
19410}
19411
19412static int
19413strterm_is_heredoc(rb_strterm_t *strterm)
19414{
19415 return strterm->heredoc;
19416}
19417
19418static rb_strterm_t *
19419new_strterm(struct parser_params *p, int func, int term, int paren)
19420{
19421 rb_strterm_t *strterm = ZALLOC(rb_strterm_t);
19422 strterm->u.literal.func = func;
19423 strterm->u.literal.term = term;
19424 strterm->u.literal.paren = paren;
19425 return strterm;
19426}
19427
19428static rb_strterm_t *
19429new_heredoc(struct parser_params *p)
19430{
19431 rb_strterm_t *strterm = ZALLOC(rb_strterm_t);
19432 strterm->heredoc = true;
19433 return strterm;
19434}
19435
19436#define peek(p,c) peek_n(p, (c), 0)
19437#define peek_n(p,c,n) (!lex_eol_n_p(p, n) && (c) == (unsigned char)(p)->lex.pcur[n])
19438#define peekc(p) peekc_n(p, 0)
19439#define peekc_n(p,n) (lex_eol_n_p(p, n) ? -1 : (unsigned char)(p)->lex.pcur[n])
19440
19441#define add_delayed_token(p, tok, end) parser_add_delayed_token(p, tok, end, __LINE__)
19442static void
19443parser_add_delayed_token(struct parser_params *p, const char *tok, const char *end, int line)
19444{
19445 debug_token_line(p, "add_delayed_token", line);
19446
19447 if (tok < end) {
19448 if (has_delayed_token(p)) {
19449 bool next_line = parser_string_char_at_end(p, p->delayed.token, 0) == '\n';
19450 int end_line = (next_line ? 1 : 0) + p->delayed.end_line;
19451 int end_col = (next_line ? 0 : p->delayed.end_col);
19452 if (end_line != p->ruby_sourceline || end_col != tok - p->lex.pbeg) {
19453 dispatch_delayed_token(p, tSTRING_CONTENT);
19454 }
19455 }
19456 if (!has_delayed_token(p)) {
19457 p->delayed.token = rb_parser_string_new(p, 0, 0);
19458 rb_parser_enc_associate(p, p->delayed.token, p->enc);
19459 p->delayed.beg_line = p->ruby_sourceline;
19460 p->delayed.beg_col = rb_long2int(tok - p->lex.pbeg);
19461 }
19462 parser_str_cat(p->delayed.token, tok, end - tok);
19463 p->delayed.end_line = p->ruby_sourceline;
19464 p->delayed.end_col = rb_long2int(end - p->lex.pbeg);
19465 p->lex.ptok = end;
19466 }
19467}
19468
19469static void
19470set_lastline(struct parser_params *p, rb_parser_string_t *str)
19471{
19472 p->lex.pbeg = p->lex.pcur = PARSER_STRING_PTR(str);
19473 p->lex.pend = p->lex.pcur + PARSER_STRING_LEN(str);
19474 p->lex.lastline = str;
19475}
19476
19477static int
19478nextline(struct parser_params *p, int set_encoding)
19479{
19480 rb_parser_string_t *str = p->lex.nextline;
19481 p->lex.nextline = 0;
19482 if (!str) {
19483 if (p->eofp)
19484 return -1;
19485
19486 if (!lex_eol_ptr_p(p, p->lex.pbeg) && *(p->lex.pend-1) != '\n') {
19487 goto end_of_input;
19488 }
19489
19490 if (!p->lex.input || !(str = lex_getline(p))) {
19491 end_of_input:
19492 p->eofp = 1;
19493 lex_goto_eol(p);
19494 return -1;
19495 }
19496#ifndef RIPPER
19497 if (p->debug_lines) {
19498 if (set_encoding) rb_parser_enc_associate(p, str, p->enc);
19499 rb_parser_string_t *copy = rb_parser_string_deep_copy(p, str);
19500 rb_parser_ary_push_script_line(p, p->debug_lines, copy);
19501 }
19502#endif
19503 p->cr_seen = FALSE;
19504 }
19505 else if (str == AFTER_HEREDOC_WITHOUT_TERMINATOR) {
19506 /* after here-document without terminator */
19507 goto end_of_input;
19508 }
19509 add_delayed_token(p, p->lex.ptok, p->lex.pend);
19510 if (p->heredoc_end > 0) {
19511 p->ruby_sourceline = p->heredoc_end;
19512 p->heredoc_end = 0;
19513 }
19514 p->ruby_sourceline++;
19515 set_lastline(p, str);
19516 token_flush(p);
19517 return 0;
19518}
19519
19520static int
19521parser_cr(struct parser_params *p, int c)
19522{
19523 if (peek(p, '\n')) {
19524 p->lex.pcur++;
19525 c = '\n';
19526 }
19527 return c;
19528}
19529
19530static inline int
19531nextc0(struct parser_params *p, int set_encoding)
19532{
19533 int c;
19534
19535 if (UNLIKELY(lex_eol_p(p) || p->eofp || p->lex.nextline > AFTER_HEREDOC_WITHOUT_TERMINATOR)) {
19536 if (nextline(p, set_encoding)) return -1;
19537 }
19538 c = (unsigned char)*p->lex.pcur++;
19539 if (UNLIKELY(c == '\r')) {
19540 c = parser_cr(p, c);
19541 }
19542
19543 return c;
19544}
19545#define nextc(p) nextc0(p, TRUE)
19546
19547static void
19548pushback(struct parser_params *p, int c)
19549{
19550 if (c == -1) return;
19551 p->eofp = 0;
19552 p->lex.pcur--;
19553 if (p->lex.pcur > p->lex.pbeg && p->lex.pcur[0] == '\n' && p->lex.pcur[-1] == '\r') {
19554 p->lex.pcur--;
19555 }
19556}
19557
19558#define was_bol(p) ((p)->lex.pcur == (p)->lex.pbeg + 1)
19559
19560#define tokfix(p) ((p)->tokenbuf[(p)->tokidx]='\0')
19561#define tok(p) (p)->tokenbuf
19562#define toklen(p) (p)->tokidx
19563
19564static int
19565looking_at_eol_p(struct parser_params *p)
19566{
19567 const char *ptr = p->lex.pcur;
19568 while (!lex_eol_ptr_p(p, ptr)) {
19569 int c = (unsigned char)*ptr++;
19570 int eol = (c == '\n' || c == '#');
19571 if (eol || !ISSPACE(c)) {
19572 return eol;
19573 }
19574 }
19575 return TRUE;
19576}
19577
19578static char*
19579newtok(struct parser_params *p)
19580{
19581 p->tokidx = 0;
19582 if (!p->tokenbuf) {
19583 p->toksiz = 60;
19584 p->tokenbuf = ALLOC_N(char, 60);
19585 }
19586 if (p->toksiz > 4096) {
19587 p->toksiz = 60;
19588 REALLOC_N(p->tokenbuf, char, 60);
19589 }
19590 return p->tokenbuf;
19591}
19592
19593static char *
19594tokspace(struct parser_params *p, int n)
19595{
19596 p->tokidx += n;
19597
19598 if (p->tokidx >= p->toksiz) {
19599 do {p->toksiz *= 2;} while (p->toksiz <= p->tokidx);
19600 REALLOC_N(p->tokenbuf, char, p->toksiz);
19601 }
19602 return &p->tokenbuf[p->tokidx-n];
19603}
19604
19605static void
19606tokadd(struct parser_params *p, int c)
19607{
19608 p->tokenbuf[p->tokidx++] = (char)c;
19609 if (p->tokidx >= p->toksiz) {
19610 p->toksiz *= 2;
19611 REALLOC_N(p->tokenbuf, char, p->toksiz);
19612 }
19613}
19614
19615static int
19616tok_hex(struct parser_params *p, size_t *numlen)
19617{
19618 int c;
19619
19620 c = (int)ruby_scan_hex(p->lex.pcur, 2, numlen);
19621 if (!*numlen) {
19622 flush_string_content(p, p->enc, rb_strlen_lit("\\x"));
19623 yyerror0("invalid hex escape");
19624 dispatch_scan_event(p, tSTRING_CONTENT);
19625 return 0;
19626 }
19627 p->lex.pcur += *numlen;
19628 return c;
19629}
19630
19631#define tokcopy(p, n) memcpy(tokspace(p, n), (p)->lex.pcur - (n), (n))
19632
19633static int
19634escaped_control_code(int c)
19635{
19636 int c2 = 0;
19637 switch (c) {
19638 case ' ':
19639 c2 = 's';
19640 break;
19641 case '\n':
19642 c2 = 'n';
19643 break;
19644 case '\t':
19645 c2 = 't';
19646 break;
19647 case '\v':
19648 c2 = 'v';
19649 break;
19650 case '\r':
19651 c2 = 'r';
19652 break;
19653 case '\f':
19654 c2 = 'f';
19655 break;
19656 }
19657 return c2;
19658}
19659
19660#define WARN_SPACE_CHAR(c, prefix) \
19661 rb_warn1("invalid character syntax; use "prefix"\\%c", WARN_I(c))
19662
19663static int
19664tokadd_codepoint(struct parser_params *p, rb_encoding **encp,
19665 int regexp_literal, const char *begin)
19666{
19667 const int wide = !begin;
19668 size_t numlen;
19669 int codepoint = (int)ruby_scan_hex(p->lex.pcur, wide ? p->lex.pend - p->lex.pcur : 4, &numlen);
19670
19671 p->lex.pcur += numlen;
19672 if (p->lex.strterm == NULL ||
19673 strterm_is_heredoc(p->lex.strterm) ||
19674 (p->lex.strterm->u.literal.func != str_regexp)) {
19675 if (!begin) begin = p->lex.pcur;
19676 if (wide ? (numlen == 0 || numlen > 6) : (numlen < 4)) {
19677 flush_string_content(p, rb_utf8_encoding(), p->lex.pcur - begin);
19678 yyerror0("invalid Unicode escape");
19679 dispatch_scan_event(p, tSTRING_CONTENT);
19680 return wide && numlen > 0;
19681 }
19682 if (codepoint > 0x10ffff) {
19683 flush_string_content(p, rb_utf8_encoding(), p->lex.pcur - begin);
19684 yyerror0("invalid Unicode codepoint (too large)");
19685 dispatch_scan_event(p, tSTRING_CONTENT);
19686 return wide;
19687 }
19688 if ((codepoint & 0xfffff800) == 0xd800) {
19689 flush_string_content(p, rb_utf8_encoding(), p->lex.pcur - begin);
19690 yyerror0("invalid Unicode codepoint");
19691 dispatch_scan_event(p, tSTRING_CONTENT);
19692 return wide;
19693 }
19694 }
19695 if (regexp_literal) {
19696 tokcopy(p, (int)numlen);
19697 }
19698 else if (codepoint >= 0x80) {
19699 rb_encoding *utf8 = rb_utf8_encoding();
19700 if (*encp && utf8 != *encp) {
19701 YYLTYPE loc = RUBY_INIT_YYLLOC();
19702 compile_error(p, "UTF-8 mixed within %s source", rb_enc_name(*encp));
19703 parser_show_error_line(p, &loc);
19704 return wide;
19705 }
19706 *encp = utf8;
19707 tokaddmbc(p, codepoint, *encp);
19708 }
19709 else {
19710 tokadd(p, codepoint);
19711 }
19712 return TRUE;
19713}
19714
19715static int tokadd_mbchar(struct parser_params *p, int c);
19716
19717static int
19718tokskip_mbchar(struct parser_params *p)
19719{
19720 int len = parser_precise_mbclen(p, p->lex.pcur-1);
19721 if (len > 0) {
19722 p->lex.pcur += len - 1;
19723 }
19724 return len;
19725}
19726
19727/* return value is for ?\u3042 */
19728static void
19729tokadd_utf8(struct parser_params *p, rb_encoding **encp,
19730 int term, int symbol_literal, int regexp_literal)
19731{
19732 /*
19733 * If `term` is not -1, then we allow multiple codepoints in \u{}
19734 * upto `term` byte, otherwise we're parsing a character literal.
19735 * And then add the codepoints to the current token.
19736 */
19737 static const char multiple_codepoints[] = "Multiple codepoints at single character literal";
19738
19739 const int open_brace = '{', close_brace = '}';
19740
19741 if (regexp_literal) { tokadd(p, '\\'); tokadd(p, 'u'); }
19742
19743 if (peek(p, open_brace)) { /* handle \u{...} form */
19744 if (regexp_literal && p->lex.strterm->u.literal.func == str_regexp) {
19745 /*
19746 * Skip parsing validation code and copy bytes as-is until term or
19747 * closing brace, in order to correctly handle extended regexps where
19748 * invalid unicode escapes are allowed in comments. The regexp parser
19749 * does its own validation and will catch any issues.
19750 */
19751 tokadd(p, open_brace);
19752 while (!lex_eol_ptr_p(p, ++p->lex.pcur)) {
19753 int c = peekc(p);
19754 if (c == close_brace) {
19755 tokadd(p, c);
19756 ++p->lex.pcur;
19757 break;
19758 }
19759 else if (c == term) {
19760 break;
19761 }
19762 if (c == '\\' && !lex_eol_n_p(p, 1)) {
19763 tokadd(p, c);
19764 c = *++p->lex.pcur;
19765 }
19766 tokadd_mbchar(p, c);
19767 }
19768 }
19769 else {
19770 const char *second = NULL;
19771 int c, last = nextc(p);
19772 if (lex_eol_p(p)) goto unterminated;
19773 while (ISSPACE(c = peekc(p)) && !lex_eol_ptr_p(p, ++p->lex.pcur));
19774 while (c != close_brace) {
19775 if (c == term) goto unterminated;
19776 if (second == multiple_codepoints)
19777 second = p->lex.pcur;
19778 if (regexp_literal) tokadd(p, last);
19779 if (!tokadd_codepoint(p, encp, regexp_literal, NULL)) {
19780 break;
19781 }
19782 while (ISSPACE(c = peekc(p))) {
19783 if (lex_eol_ptr_p(p, ++p->lex.pcur)) goto unterminated;
19784 last = c;
19785 }
19786 if (term == -1 && !second)
19787 second = multiple_codepoints;
19788 }
19789
19790 if (c != close_brace) {
19791 unterminated:
19792 flush_string_content(p, rb_utf8_encoding(), 0);
19793 yyerror0("unterminated Unicode escape");
19794 dispatch_scan_event(p, tSTRING_CONTENT);
19795 return;
19796 }
19797 if (second && second != multiple_codepoints) {
19798 const char *pcur = p->lex.pcur;
19799 p->lex.pcur = second;
19800 dispatch_scan_event(p, tSTRING_CONTENT);
19801 token_flush(p);
19802 p->lex.pcur = pcur;
19803 yyerror0(multiple_codepoints);
19804 token_flush(p);
19805 }
19806
19807 if (regexp_literal) tokadd(p, close_brace);
19808 nextc(p);
19809 }
19810 }
19811 else { /* handle \uxxxx form */
19812 if (!tokadd_codepoint(p, encp, regexp_literal, p->lex.pcur - rb_strlen_lit("\\u"))) {
19813 token_flush(p);
19814 return;
19815 }
19816 }
19817}
19818
19819#define ESCAPE_CONTROL 1
19820#define ESCAPE_META 2
19821
19822static int
19823read_escape(struct parser_params *p, int flags, const char *begin)
19824{
19825 int c;
19826 size_t numlen;
19827
19828 switch (c = nextc(p)) {
19829 case '\\': /* Backslash */
19830 return c;
19831
19832 case 'n': /* newline */
19833 return '\n';
19834
19835 case 't': /* horizontal tab */
19836 return '\t';
19837
19838 case 'r': /* carriage-return */
19839 return '\r';
19840
19841 case 'f': /* form-feed */
19842 return '\f';
19843
19844 case 'v': /* vertical tab */
19845 return '\13';
19846
19847 case 'a': /* alarm(bell) */
19848 return '\007';
19849
19850 case 'e': /* escape */
19851 return 033;
19852
19853 case '0': case '1': case '2': case '3': /* octal constant */
19854 case '4': case '5': case '6': case '7':
19855 pushback(p, c);
19856 c = (int)ruby_scan_oct(p->lex.pcur, 3, &numlen);
19857 p->lex.pcur += numlen;
19858 return c;
19859
19860 case 'x': /* hex constant */
19861 c = tok_hex(p, &numlen);
19862 if (numlen == 0) return 0;
19863 return c;
19864
19865 case 'b': /* backspace */
19866 return '\010';
19867
19868 case 's': /* space */
19869 return ' ';
19870
19871 case 'M':
19872 if (flags & ESCAPE_META) goto eof;
19873 if ((c = nextc(p)) != '-') {
19874 goto eof;
19875 }
19876 if ((c = nextc(p)) == '\\') {
19877 switch (peekc(p)) {
19878 case 'u': case 'U':
19879 nextc(p);
19880 goto eof;
19881 }
19882 return read_escape(p, flags|ESCAPE_META, begin) | 0x80;
19883 }
19884 else if (c == -1) goto eof;
19885 else if (!ISASCII(c)) {
19886 tokskip_mbchar(p);
19887 goto eof;
19888 }
19889 else {
19890 int c2 = escaped_control_code(c);
19891 if (c2) {
19892 if (ISCNTRL(c) || !(flags & ESCAPE_CONTROL)) {
19893 WARN_SPACE_CHAR(c2, "\\M-");
19894 }
19895 else {
19896 WARN_SPACE_CHAR(c2, "\\C-\\M-");
19897 }
19898 }
19899 else if (ISCNTRL(c)) goto eof;
19900 return ((c & 0xff) | 0x80);
19901 }
19902
19903 case 'C':
19904 if ((c = nextc(p)) != '-') {
19905 goto eof;
19906 }
19907 case 'c':
19908 if (flags & ESCAPE_CONTROL) goto eof;
19909 if ((c = nextc(p))== '\\') {
19910 switch (peekc(p)) {
19911 case 'u': case 'U':
19912 nextc(p);
19913 goto eof;
19914 }
19915 c = read_escape(p, flags|ESCAPE_CONTROL, begin);
19916 }
19917 else if (c == '?')
19918 return 0177;
19919 else if (c == -1) goto eof;
19920 else if (!ISASCII(c)) {
19921 tokskip_mbchar(p);
19922 goto eof;
19923 }
19924 else {
19925 int c2 = escaped_control_code(c);
19926 if (c2) {
19927 if (ISCNTRL(c)) {
19928 if (flags & ESCAPE_META) {
19929 WARN_SPACE_CHAR(c2, "\\M-");
19930 }
19931 else {
19932 WARN_SPACE_CHAR(c2, "");
19933 }
19934 }
19935 else {
19936 if (flags & ESCAPE_META) {
19937 WARN_SPACE_CHAR(c2, "\\M-\\C-");
19938 }
19939 else {
19940 WARN_SPACE_CHAR(c2, "\\C-");
19941 }
19942 }
19943 }
19944 else if (ISCNTRL(c)) goto eof;
19945 }
19946 return c & 0x9f;
19947
19948 eof:
19949 case -1:
19950 flush_string_content(p, p->enc, p->lex.pcur - begin);
19951 yyerror0("Invalid escape character syntax");
19952 dispatch_scan_event(p, tSTRING_CONTENT);
19953 return '\0';
19954
19955 default:
19956 if (!ISASCII(c)) {
19957 tokskip_mbchar(p);
19958 goto eof;
19959 }
19960 return c;
19961 }
19962}
19963
19964static void
19965tokaddmbc(struct parser_params *p, int c, rb_encoding *enc)
19966{
19967 int len = rb_enc_codelen(c, enc);
19968 rb_enc_mbcput(c, tokspace(p, len), enc);
19969}
19970
19971static int
19972tokadd_escape(struct parser_params *p)
19973{
19974 int c;
19975 size_t numlen;
19976 const char *begin = p->lex.pcur;
19977
19978 switch (c = nextc(p)) {
19979 case '\n':
19980 return 0; /* just ignore */
19981
19982 case '0': case '1': case '2': case '3': /* octal constant */
19983 case '4': case '5': case '6': case '7':
19984 {
19985 ruby_scan_oct(--p->lex.pcur, 3, &numlen);
19986 if (numlen == 0) goto eof;
19987 p->lex.pcur += numlen;
19988 tokcopy(p, (int)numlen + 1);
19989 }
19990 return 0;
19991
19992 case 'x': /* hex constant */
19993 {
19994 tok_hex(p, &numlen);
19995 if (numlen == 0) return -1;
19996 tokcopy(p, (int)numlen + 2);
19997 }
19998 return 0;
19999
20000 eof:
20001 case -1:
20002 flush_string_content(p, p->enc, p->lex.pcur - begin);
20003 yyerror0("Invalid escape character syntax");
20004 token_flush(p);
20005 return -1;
20006
20007 default:
20008 tokadd(p, '\\');
20009 tokadd(p, c);
20010 }
20011 return 0;
20012}
20013
20014static int
20015char_to_option(int c)
20016{
20017 int val;
20018
20019 switch (c) {
20020 case 'i':
20021 val = RE_ONIG_OPTION_IGNORECASE;
20022 break;
20023 case 'x':
20024 val = RE_ONIG_OPTION_EXTEND;
20025 break;
20026 case 'm':
20027 val = RE_ONIG_OPTION_MULTILINE;
20028 break;
20029 default:
20030 val = 0;
20031 break;
20032 }
20033 return val;
20034}
20035
20036#define ARG_ENCODING_FIXED 16
20037#define ARG_ENCODING_NONE 32
20038#define ENC_ASCII8BIT 1
20039#define ENC_EUC_JP 2
20040#define ENC_Windows_31J 3
20041#define ENC_UTF8 4
20042
20043static int
20044char_to_option_kcode(int c, int *option, int *kcode)
20045{
20046 *option = 0;
20047
20048 switch (c) {
20049 case 'n':
20050 *kcode = ENC_ASCII8BIT;
20051 return (*option = ARG_ENCODING_NONE);
20052 case 'e':
20053 *kcode = ENC_EUC_JP;
20054 break;
20055 case 's':
20056 *kcode = ENC_Windows_31J;
20057 break;
20058 case 'u':
20059 *kcode = ENC_UTF8;
20060 break;
20061 default:
20062 *kcode = -1;
20063 return (*option = char_to_option(c));
20064 }
20065 *option = ARG_ENCODING_FIXED;
20066 return 1;
20067}
20068
20069static int
20070regx_options(struct parser_params *p)
20071{
20072 int kcode = 0;
20073 int kopt = 0;
20074 int options = 0;
20075 int c, opt, kc;
20076
20077 newtok(p);
20078 while (c = nextc(p), ISALPHA(c)) {
20079 if (c == 'o') {
20080 options |= RE_OPTION_ONCE;
20081 }
20082 else if (char_to_option_kcode(c, &opt, &kc)) {
20083 if (kc >= 0) {
20084 if (kc != ENC_ASCII8BIT) kcode = c;
20085 kopt = opt;
20086 }
20087 else {
20088 options |= opt;
20089 }
20090 }
20091 else {
20092 tokadd(p, c);
20093 }
20094 }
20095 options |= kopt;
20096 pushback(p, c);
20097 if (toklen(p)) {
20098 YYLTYPE loc = RUBY_INIT_YYLLOC();
20099 tokfix(p);
20100 compile_error(p, "unknown regexp option%s - %*s",
20101 toklen(p) > 1 ? "s" : "", toklen(p), tok(p));
20102 parser_show_error_line(p, &loc);
20103 }
20104 return options | RE_OPTION_ENCODING(kcode);
20105}
20106
20107static int
20108tokadd_mbchar(struct parser_params *p, int c)
20109{
20110 int len = parser_precise_mbclen(p, p->lex.pcur-1);
20111 if (len < 0) return -1;
20112 tokadd(p, c);
20113 p->lex.pcur += --len;
20114 if (len > 0) tokcopy(p, len);
20115 return c;
20116}
20117
20118static inline int
20119simple_re_meta(int c)
20120{
20121 switch (c) {
20122 case '$': case '*': case '+': case '.':
20123 case '?': case '^': case '|':
20124 case ')': case ']': case '}': case '>':
20125 return TRUE;
20126 default:
20127 return FALSE;
20128 }
20129}
20130
20131static int
20132parser_update_heredoc_indent(struct parser_params *p, int c)
20133{
20134 if (p->heredoc_line_indent == -1) {
20135 if (c == '\n') p->heredoc_line_indent = 0;
20136 }
20137 else {
20138 if (c == ' ') {
20139 p->heredoc_line_indent++;
20140 return TRUE;
20141 }
20142 else if (c == '\t') {
20143 int w = (p->heredoc_line_indent / TAB_WIDTH) + 1;
20144 p->heredoc_line_indent = w * TAB_WIDTH;
20145 return TRUE;
20146 }
20147 else if (c != '\n') {
20148 if (p->heredoc_indent > p->heredoc_line_indent) {
20149 p->heredoc_indent = p->heredoc_line_indent;
20150 }
20151 p->heredoc_line_indent = -1;
20152 }
20153 else {
20154 /* Whitespace only line has no indentation */
20155 p->heredoc_line_indent = 0;
20156 }
20157 }
20158 return FALSE;
20159}
20160
20161static void
20162parser_mixed_error(struct parser_params *p, rb_encoding *enc1, rb_encoding *enc2)
20163{
20164 YYLTYPE loc = RUBY_INIT_YYLLOC();
20165 const char *n1 = rb_enc_name(enc1), *n2 = rb_enc_name(enc2);
20166 compile_error(p, "%s mixed within %s source", n1, n2);
20167 parser_show_error_line(p, &loc);
20168}
20169
20170static void
20171parser_mixed_escape(struct parser_params *p, const char *beg, rb_encoding *enc1, rb_encoding *enc2)
20172{
20173 const char *pos = p->lex.pcur;
20174 p->lex.pcur = beg;
20175 parser_mixed_error(p, enc1, enc2);
20176 p->lex.pcur = pos;
20177}
20178
20179static inline char
20180nibble_char_upper(unsigned int c)
20181{
20182 c &= 0xf;
20183 return c + (c < 10 ? '0' : 'A' - 10);
20184}
20185
20186static int
20187tokadd_string(struct parser_params *p,
20188 int func, int term, int paren, long *nest,
20189 rb_encoding **encp, rb_encoding **enc)
20190{
20191 int c;
20192 bool erred = false;
20193#ifdef RIPPER
20194 const int heredoc_end = (p->heredoc_end ? p->heredoc_end + 1 : 0);
20195 int top_of_line = FALSE;
20196#endif
20197
20198#define mixed_error(enc1, enc2) \
20199 (void)(erred || (parser_mixed_error(p, enc1, enc2), erred = true))
20200#define mixed_escape(beg, enc1, enc2) \
20201 (void)(erred || (parser_mixed_escape(p, beg, enc1, enc2), erred = true))
20202
20203 while ((c = nextc(p)) != -1) {
20204 if (p->heredoc_indent > 0) {
20205 parser_update_heredoc_indent(p, c);
20206 }
20207#ifdef RIPPER
20208 if (top_of_line && heredoc_end == p->ruby_sourceline) {
20209 pushback(p, c);
20210 break;
20211 }
20212#endif
20213
20214 if (paren && c == paren) {
20215 ++*nest;
20216 }
20217 else if (c == term) {
20218 if (!nest || !*nest) {
20219 pushback(p, c);
20220 break;
20221 }
20222 --*nest;
20223 }
20224 else if ((func & STR_FUNC_EXPAND) && c == '#' && !lex_eol_p(p)) {
20225 unsigned char c2 = *p->lex.pcur;
20226 if (c2 == '$' || c2 == '@' || c2 == '{') {
20227 pushback(p, c);
20228 break;
20229 }
20230 }
20231 else if (c == '\\') {
20232 c = nextc(p);
20233 switch (c) {
20234 case '\n':
20235 if (func & STR_FUNC_QWORDS) break;
20236 if (func & STR_FUNC_EXPAND) {
20237 if (!(func & STR_FUNC_INDENT) || (p->heredoc_indent < 0))
20238 continue;
20239 if (c == term) {
20240 c = '\\';
20241 goto terminate;
20242 }
20243 }
20244 tokadd(p, '\\');
20245 break;
20246
20247 case '\\':
20248 if (func & STR_FUNC_ESCAPE) tokadd(p, c);
20249 break;
20250
20251 case 'u':
20252 if ((func & STR_FUNC_EXPAND) == 0) {
20253 tokadd(p, '\\');
20254 break;
20255 }
20256 tokadd_utf8(p, enc, term,
20257 func & STR_FUNC_SYMBOL,
20258 func & STR_FUNC_REGEXP);
20259 continue;
20260
20261 default:
20262 if (c == -1) return -1;
20263 if (!ISASCII(c)) {
20264 if ((func & STR_FUNC_EXPAND) == 0) tokadd(p, '\\');
20265 goto non_ascii;
20266 }
20267 if (func & STR_FUNC_REGEXP) {
20268 switch (c) {
20269 case 'c':
20270 case 'C':
20271 case 'M': {
20272 pushback(p, c);
20273 c = read_escape(p, 0, p->lex.pcur - 1);
20274
20275 char *t = tokspace(p, rb_strlen_lit("\\x00"));
20276 *t++ = '\\';
20277 *t++ = 'x';
20278 *t++ = nibble_char_upper(c >> 4);
20279 *t++ = nibble_char_upper(c);
20280 continue;
20281 }
20282 }
20283
20284 if (c == term && !simple_re_meta(c)) {
20285 tokadd(p, c);
20286 continue;
20287 }
20288 pushback(p, c);
20289 if ((c = tokadd_escape(p)) < 0)
20290 return -1;
20291 if (*enc && *enc != *encp) {
20292 mixed_escape(p->lex.ptok+2, *enc, *encp);
20293 }
20294 continue;
20295 }
20296 else if (func & STR_FUNC_EXPAND) {
20297 pushback(p, c);
20298 if (func & STR_FUNC_ESCAPE) tokadd(p, '\\');
20299 c = read_escape(p, 0, p->lex.pcur - 1);
20300 }
20301 else if ((func & STR_FUNC_QWORDS) && ISSPACE(c)) {
20302 /* ignore backslashed spaces in %w */
20303 }
20304 else if (c != term && !(paren && c == paren)) {
20305 tokadd(p, '\\');
20306 pushback(p, c);
20307 continue;
20308 }
20309 }
20310 }
20311 else if (!parser_isascii(p)) {
20312 non_ascii:
20313 if (!*enc) {
20314 *enc = *encp;
20315 }
20316 else if (*enc != *encp) {
20317 mixed_error(*enc, *encp);
20318 continue;
20319 }
20320 if (tokadd_mbchar(p, c) == -1) return -1;
20321 continue;
20322 }
20323 else if ((func & STR_FUNC_QWORDS) && ISSPACE(c)) {
20324 pushback(p, c);
20325 break;
20326 }
20327 if (c & 0x80) {
20328 if (!*enc) {
20329 *enc = *encp;
20330 }
20331 else if (*enc != *encp) {
20332 mixed_error(*enc, *encp);
20333 continue;
20334 }
20335 }
20336 tokadd(p, c);
20337#ifdef RIPPER
20338 top_of_line = (c == '\n');
20339#endif
20340 }
20341 terminate:
20342 if (*enc) *encp = *enc;
20343 return c;
20344}
20345
20346#define NEW_STRTERM(func, term, paren) new_strterm(p, func, term, paren)
20347
20348static void
20349flush_string_content(struct parser_params *p, rb_encoding *enc, size_t back)
20350{
20351 p->lex.pcur -= back;
20352 if (has_delayed_token(p)) {
20353 ptrdiff_t len = p->lex.pcur - p->lex.ptok;
20354 if (len > 0) {
20355 rb_parser_enc_str_buf_cat(p, p->delayed.token, p->lex.ptok, len, enc);
20356 p->delayed.end_line = p->ruby_sourceline;
20357 p->delayed.end_col = rb_long2int(p->lex.pcur - p->lex.pbeg);
20358 }
20359 dispatch_delayed_token(p, tSTRING_CONTENT);
20360 p->lex.ptok = p->lex.pcur;
20361 }
20362 dispatch_scan_event(p, tSTRING_CONTENT);
20363 p->lex.pcur += back;
20364}
20365
20366/* this can be shared with ripper, since it's independent from struct
20367 * parser_params. */
20368#ifndef RIPPER
20369#define BIT(c, idx) (((c) / 32 - 1 == idx) ? (1U << ((c) % 32)) : 0)
20370#define SPECIAL_PUNCT(idx) ( \
20371 BIT('~', idx) | BIT('*', idx) | BIT('$', idx) | BIT('?', idx) | \
20372 BIT('!', idx) | BIT('@', idx) | BIT('/', idx) | BIT('\\', idx) | \
20373 BIT(';', idx) | BIT(',', idx) | BIT('.', idx) | BIT('=', idx) | \
20374 BIT(':', idx) | BIT('<', idx) | BIT('>', idx) | BIT('\"', idx) | \
20375 BIT('&', idx) | BIT('`', idx) | BIT('\'', idx) | BIT('+', idx) | \
20376 BIT('0', idx))
20377const uint_least32_t ruby_global_name_punct_bits[] = {
20378 SPECIAL_PUNCT(0),
20379 SPECIAL_PUNCT(1),
20380 SPECIAL_PUNCT(2),
20381};
20382#undef BIT
20383#undef SPECIAL_PUNCT
20384#endif
20385
20386static enum yytokentype
20387parser_peek_variable_name(struct parser_params *p)
20388{
20389 int c;
20390 const char *ptr = p->lex.pcur;
20391
20392 if (lex_eol_ptr_n_p(p, ptr, 1)) return 0;
20393 c = *ptr++;
20394 switch (c) {
20395 case '$':
20396 if ((c = *ptr) == '-') {
20397 if (lex_eol_ptr_p(p, ++ptr)) return 0;
20398 c = *ptr;
20399 }
20400 else if (is_global_name_punct(c) || ISDIGIT(c)) {
20401 return tSTRING_DVAR;
20402 }
20403 break;
20404 case '@':
20405 if ((c = *ptr) == '@') {
20406 if (lex_eol_ptr_p(p, ++ptr)) return 0;
20407 c = *ptr;
20408 }
20409 break;
20410 case '{':
20411 p->lex.pcur = ptr;
20412 p->command_start = TRUE;
20413 yylval.state = p->lex.state;
20414 return tSTRING_DBEG;
20415 default:
20416 return 0;
20417 }
20418 if (!ISASCII(c) || c == '_' || ISALPHA(c))
20419 return tSTRING_DVAR;
20420 return 0;
20421}
20422
20423#define IS_ARG() IS_lex_state(EXPR_ARG_ANY)
20424#define IS_END() IS_lex_state(EXPR_END_ANY)
20425#define IS_BEG() (IS_lex_state(EXPR_BEG_ANY) || IS_lex_state_all(EXPR_ARG|EXPR_LABELED))
20426#define IS_SPCARG(c) (IS_ARG() && space_seen && !ISSPACE(c))
20427#define IS_LABEL_POSSIBLE() (\
20428 (IS_lex_state(EXPR_LABEL|EXPR_ENDFN) && !cmd_state) || \
20429 IS_ARG())
20430#define IS_LABEL_SUFFIX(n) (peek_n(p, ':',(n)) && !peek_n(p, ':', (n)+1))
20431#define IS_AFTER_OPERATOR() IS_lex_state(EXPR_FNAME | EXPR_DOT)
20432
20433static inline enum yytokentype
20434parser_string_term(struct parser_params *p, int func)
20435{
20436 xfree(p->lex.strterm);
20437 p->lex.strterm = 0;
20438 if (func & STR_FUNC_REGEXP) {
20439 set_yylval_num(regx_options(p));
20440 dispatch_scan_event(p, tREGEXP_END);
20441 SET_LEX_STATE(EXPR_END);
20442 return tREGEXP_END;
20443 }
20444 if ((func & STR_FUNC_LABEL) && IS_LABEL_SUFFIX(0)) {
20445 nextc(p);
20446 SET_LEX_STATE(EXPR_ARG|EXPR_LABELED);
20447 return tLABEL_END;
20448 }
20449 SET_LEX_STATE(EXPR_END);
20450 return tSTRING_END;
20451}
20452
20453static enum yytokentype
20454parse_string(struct parser_params *p, rb_strterm_literal_t *quote)
20455{
20456 int func = quote->func;
20457 int term = quote->term;
20458 int paren = quote->paren;
20459 int c, space = 0;
20460 rb_encoding *enc = p->enc;
20461 rb_encoding *base_enc = 0;
20462 rb_parser_string_t *lit;
20463
20464 if (func & STR_FUNC_TERM) {
20465 if (func & STR_FUNC_QWORDS) nextc(p); /* delayed term */
20466 SET_LEX_STATE(EXPR_END);
20467 xfree(p->lex.strterm);
20468 p->lex.strterm = 0;
20469 return func & STR_FUNC_REGEXP ? tREGEXP_END : tSTRING_END;
20470 }
20471 c = nextc(p);
20472 if ((func & STR_FUNC_QWORDS) && ISSPACE(c)) {
20473 while (c != '\n' && ISSPACE(c = nextc(p)));
20474 space = 1;
20475 }
20476 if (func & STR_FUNC_LIST) {
20477 quote->func &= ~STR_FUNC_LIST;
20478 space = 1;
20479 }
20480 if (c == term && !quote->nest) {
20481 if (func & STR_FUNC_QWORDS) {
20482 quote->func |= STR_FUNC_TERM;
20483 pushback(p, c); /* dispatch the term at tSTRING_END */
20484 add_delayed_token(p, p->lex.ptok, p->lex.pcur);
20485 return ' ';
20486 }
20487 return parser_string_term(p, func);
20488 }
20489 if (space) {
20490 if (!ISSPACE(c)) pushback(p, c);
20491 add_delayed_token(p, p->lex.ptok, p->lex.pcur);
20492 return ' ';
20493 }
20494 newtok(p);
20495 if ((func & STR_FUNC_EXPAND) && c == '#') {
20496 enum yytokentype t = parser_peek_variable_name(p);
20497 if (t) return t;
20498 tokadd(p, '#');
20499 c = nextc(p);
20500 }
20501 pushback(p, c);
20502 if (tokadd_string(p, func, term, paren, &quote->nest,
20503 &enc, &base_enc) == -1) {
20504 if (p->eofp) {
20505#ifndef RIPPER
20506# define unterminated_literal(mesg) yyerror0(mesg)
20507#else
20508# define unterminated_literal(mesg) compile_error(p, mesg)
20509#endif
20510 literal_flush(p, p->lex.pcur);
20511 if (func & STR_FUNC_QWORDS) {
20512 /* no content to add, bailing out here */
20513 unterminated_literal("unterminated list meets end of file");
20514 xfree(p->lex.strterm);
20515 p->lex.strterm = 0;
20516 return tSTRING_END;
20517 }
20518 if (func & STR_FUNC_REGEXP) {
20519 unterminated_literal("unterminated regexp meets end of file");
20520 }
20521 else {
20522 unterminated_literal("unterminated string meets end of file");
20523 }
20524 quote->func |= STR_FUNC_TERM;
20525 }
20526 }
20527
20528 tokfix(p);
20529 lit = STR_NEW3(tok(p), toklen(p), enc, func);
20530 set_yylval_str(lit);
20531 flush_string_content(p, enc, 0);
20532
20533 return tSTRING_CONTENT;
20534}
20535
20536static enum yytokentype
20537heredoc_identifier(struct parser_params *p)
20538{
20539 /*
20540 * term_len is length of `<<"END"` except `END`,
20541 * in this case term_len is 4 (<, <, " and ").
20542 */
20543 long len, offset = p->lex.pcur - p->lex.pbeg;
20544 int c = nextc(p), term, func = 0, quote = 0;
20545 enum yytokentype token = tSTRING_BEG;
20546 int indent = 0;
20547
20548 if (c == '-') {
20549 c = nextc(p);
20550 func = STR_FUNC_INDENT;
20551 offset++;
20552 }
20553 else if (c == '~') {
20554 c = nextc(p);
20555 func = STR_FUNC_INDENT;
20556 offset++;
20557 indent = INT_MAX;
20558 }
20559 switch (c) {
20560 case '\'':
20561 func |= str_squote; goto quoted;
20562 case '"':
20563 func |= str_dquote; goto quoted;
20564 case '`':
20565 token = tXSTRING_BEG;
20566 func |= str_xquote; goto quoted;
20567
20568 quoted:
20569 quote++;
20570 offset++;
20571 term = c;
20572 len = 0;
20573 while ((c = nextc(p)) != term) {
20574 if (c == -1 || c == '\r' || c == '\n') {
20575 yyerror0("unterminated here document identifier");
20576 return -1;
20577 }
20578 }
20579 break;
20580
20581 default:
20582 if (!parser_is_identchar(p)) {
20583 pushback(p, c);
20584 if (func & STR_FUNC_INDENT) {
20585 pushback(p, indent > 0 ? '~' : '-');
20586 }
20587 return 0;
20588 }
20589 func |= str_dquote;
20590 do {
20591 int n = parser_precise_mbclen(p, p->lex.pcur-1);
20592 if (n < 0) return 0;
20593 p->lex.pcur += --n;
20594 } while ((c = nextc(p)) != -1 && parser_is_identchar(p));
20595 pushback(p, c);
20596 break;
20597 }
20598
20599 len = p->lex.pcur - (p->lex.pbeg + offset) - quote;
20600 if ((unsigned long)len >= HERETERM_LENGTH_MAX)
20601 yyerror0("too long here document identifier");
20602 dispatch_scan_event(p, tHEREDOC_BEG);
20603 lex_goto_eol(p);
20604
20605 p->lex.strterm = new_heredoc(p);
20606 rb_strterm_heredoc_t *here = &p->lex.strterm->u.heredoc;
20607 here->offset = offset;
20608 here->sourceline = p->ruby_sourceline;
20609 here->length = (unsigned)len;
20610 here->quote = quote;
20611 here->func = func;
20612 here->lastline = p->lex.lastline;
20613
20614 token_flush(p);
20615 p->heredoc_indent = indent;
20616 p->heredoc_line_indent = 0;
20617 return token;
20618}
20619
20620static void
20621heredoc_restore(struct parser_params *p, rb_strterm_heredoc_t *here)
20622{
20623 rb_parser_string_t *line;
20624 rb_strterm_t *term = p->lex.strterm;
20625
20626 p->lex.strterm = 0;
20627 line = here->lastline;
20628 p->lex.lastline = line;
20629 p->lex.pbeg = PARSER_STRING_PTR(line);
20630 p->lex.pend = p->lex.pbeg + PARSER_STRING_LEN(line);
20631 p->lex.pcur = p->lex.pbeg + here->offset + here->length + here->quote;
20632 p->lex.ptok = p->lex.pbeg + here->offset - here->quote;
20633 p->heredoc_end = p->ruby_sourceline;
20634 p->ruby_sourceline = (int)here->sourceline;
20635 if (p->eofp) p->lex.nextline = AFTER_HEREDOC_WITHOUT_TERMINATOR;
20636 p->eofp = 0;
20637 xfree(term);
20638}
20639
20640static int
20641dedent_string_column(const char *str, long len, int width)
20642{
20643 int i, col = 0;
20644
20645 for (i = 0; i < len && col < width; i++) {
20646 if (str[i] == ' ') {
20647 col++;
20648 }
20649 else if (str[i] == '\t') {
20650 int n = TAB_WIDTH * (col / TAB_WIDTH + 1);
20651 if (n > width) break;
20652 col = n;
20653 }
20654 else {
20655 break;
20656 }
20657 }
20658
20659 return i;
20660}
20661
20662static int
20663dedent_string(struct parser_params *p, rb_parser_string_t *string, int width)
20664{
20665 char *str;
20666 long len;
20667 int i;
20668
20669 len = PARSER_STRING_LEN(string);
20670 str = PARSER_STRING_PTR(string);
20671
20672 i = dedent_string_column(str, len, width);
20673 if (!i) return 0;
20674
20675 rb_parser_str_modify(string);
20676 str = PARSER_STRING_PTR(string);
20677 if (PARSER_STRING_LEN(string) != len)
20678 rb_fatal("literal string changed: %s", PARSER_STRING_PTR(string));
20679 MEMMOVE(str, str + i, char, len - i);
20680 rb_parser_str_set_len(p, string, len - i);
20681 return i;
20682}
20683
20684static NODE *
20685heredoc_dedent(struct parser_params *p, NODE *root)
20686{
20687 NODE *node, *str_node, *prev_node;
20688 int indent = p->heredoc_indent;
20689 rb_parser_string_t *prev_lit = 0;
20690
20691 if (indent <= 0) return root;
20692 if (!root) return root;
20693
20694 prev_node = node = str_node = root;
20695 if (nd_type_p(root, NODE_LIST)) str_node = RNODE_LIST(root)->nd_head;
20696
20697 while (str_node) {
20698 rb_parser_string_t *lit = RNODE_STR(str_node)->string;
20699 if (nd_fl_newline(str_node)) {
20700 dedent_string(p, lit, indent);
20701 }
20702 if (!prev_lit) {
20703 prev_lit = lit;
20704 }
20705 else if (!literal_concat0(p, prev_lit, lit)) {
20706 return 0;
20707 }
20708 else {
20709 NODE *end = RNODE_LIST(node)->as.nd_end;
20710 node = RNODE_LIST(prev_node)->nd_next = RNODE_LIST(node)->nd_next;
20711 if (!node) {
20712 if (nd_type_p(prev_node, NODE_DSTR))
20713 nd_set_type(prev_node, NODE_STR);
20714 break;
20715 }
20716 RNODE_LIST(node)->as.nd_end = end;
20717 goto next_str;
20718 }
20719
20720 str_node = 0;
20721 while ((nd_type_p(node, NODE_LIST) || nd_type_p(node, NODE_DSTR)) && (node = RNODE_LIST(prev_node = node)->nd_next) != 0) {
20722 next_str:
20723 if (!nd_type_p(node, NODE_LIST)) break;
20724 if ((str_node = RNODE_LIST(node)->nd_head) != 0) {
20725 enum node_type type = nd_type(str_node);
20726 if (type == NODE_STR || type == NODE_DSTR) break;
20727 prev_lit = 0;
20728 str_node = 0;
20729 }
20730 }
20731 }
20732 return root;
20733}
20734
20735static int
20736whole_match_p(struct parser_params *p, const char *eos, long len, int indent)
20737{
20738 const char *beg = p->lex.pbeg;
20739 const char *ptr = p->lex.pend;
20740
20741 if (ptr - beg < len) return FALSE;
20742 if (ptr > beg && ptr[-1] == '\n') {
20743 if (--ptr > beg && ptr[-1] == '\r') --ptr;
20744 if (ptr - beg < len) return FALSE;
20745 }
20746 if (strncmp(eos, ptr -= len, len)) return FALSE;
20747 if (indent) {
20748 while (beg < ptr && ISSPACE(*beg)) beg++;
20749 }
20750 return beg == ptr;
20751}
20752
20753static int
20754word_match_p(struct parser_params *p, const char *word, long len)
20755{
20756 if (strncmp(p->lex.pcur, word, len)) return 0;
20757 if (lex_eol_n_p(p, len)) return 1;
20758 int c = (unsigned char)p->lex.pcur[len];
20759 if (ISSPACE(c)) return 1;
20760 switch (c) {
20761 case '\0': case '\004': case '\032': return 1;
20762 }
20763 return 0;
20764}
20765
20766#define NUM_SUFFIX_R (1<<0)
20767#define NUM_SUFFIX_I (1<<1)
20768#define NUM_SUFFIX_ALL 3
20769
20770static int
20771number_literal_suffix(struct parser_params *p, int mask)
20772{
20773 int c, result = 0;
20774 const char *lastp = p->lex.pcur;
20775
20776 while ((c = nextc(p)) != -1) {
20777 if ((mask & NUM_SUFFIX_I) && c == 'i') {
20778 result |= (mask & NUM_SUFFIX_I);
20779 mask &= ~NUM_SUFFIX_I;
20780 /* r after i, rational of complex is disallowed */
20781 mask &= ~NUM_SUFFIX_R;
20782 continue;
20783 }
20784 if ((mask & NUM_SUFFIX_R) && c == 'r') {
20785 result |= (mask & NUM_SUFFIX_R);
20786 mask &= ~NUM_SUFFIX_R;
20787 continue;
20788 }
20789 if (!ISASCII(c) || ISALPHA(c) || c == '_') {
20790 p->lex.pcur = lastp;
20791 return 0;
20792 }
20793 pushback(p, c);
20794 break;
20795 }
20796 return result;
20797}
20798
20799static enum yytokentype
20800set_number_literal(struct parser_params *p, enum yytokentype type, int suffix, int base, int seen_point)
20801{
20802 enum rb_numeric_type numeric_type = integer_literal;
20803
20804 if (type == tFLOAT) {
20805 numeric_type = float_literal;
20806 }
20807
20808 if (suffix & NUM_SUFFIX_R) {
20809 type = tRATIONAL;
20810 numeric_type = rational_literal;
20811 }
20812 if (suffix & NUM_SUFFIX_I) {
20813 type = tIMAGINARY;
20814 }
20815
20816 switch (type) {
20817 case tINTEGER:
20818 set_yylval_node(NEW_INTEGER(strdup(tok(p)), base, &_cur_loc));
20819 break;
20820 case tFLOAT:
20821 set_yylval_node(NEW_FLOAT(strdup(tok(p)), &_cur_loc));
20822 break;
20823 case tRATIONAL:
20824 set_yylval_node(NEW_RATIONAL(strdup(tok(p)), base, seen_point, &_cur_loc));
20825 break;
20826 case tIMAGINARY:
20827 set_yylval_node(NEW_IMAGINARY(strdup(tok(p)), base, seen_point, numeric_type, &_cur_loc));
20828 (void)numeric_type; /* for ripper */
20829 break;
20830 default:
20831 rb_bug("unexpected token: %d", type);
20832 }
20833 SET_LEX_STATE(EXPR_END);
20834 return type;
20835}
20836
20837#define dispatch_heredoc_end(p) parser_dispatch_heredoc_end(p, __LINE__)
20838static void
20839parser_dispatch_heredoc_end(struct parser_params *p, int line)
20840{
20841 if (has_delayed_token(p))
20842 dispatch_delayed_token(p, tSTRING_CONTENT);
20843
20844#ifdef RIPPER
20845 VALUE str = STR_NEW(p->lex.ptok, p->lex.pend - p->lex.ptok);
20846 ripper_dispatch1(p, ripper_token2eventid(tHEREDOC_END), str);
20847#else
20848 if (p->keep_tokens) {
20849 rb_parser_string_t *str = rb_parser_encoding_string_new(p, p->lex.ptok, p->lex.pend - p->lex.ptok, p->enc);
20850 RUBY_SET_YYLLOC_OF_HEREDOC_END(*p->yylloc);
20851 parser_append_tokens(p, str, tHEREDOC_END, line);
20852 }
20853#endif
20854
20855 RUBY_SET_YYLLOC_FROM_STRTERM_HEREDOC(*p->yylloc);
20856 lex_goto_eol(p);
20857 token_flush(p);
20858}
20859
20860static enum yytokentype
20861here_document(struct parser_params *p, rb_strterm_heredoc_t *here)
20862{
20863 int c, func, indent = 0;
20864 const char *eos, *ptr, *ptr_end;
20865 long len;
20866 rb_parser_string_t *str = 0;
20867 rb_encoding *enc = p->enc;
20868 rb_encoding *base_enc = 0;
20869 int bol;
20870#ifdef RIPPER
20871 VALUE s_value;
20872#endif
20873
20874 eos = PARSER_STRING_PTR(here->lastline) + here->offset;
20875 len = here->length;
20876 indent = (func = here->func) & STR_FUNC_INDENT;
20877
20878 if ((c = nextc(p)) == -1) {
20879 error:
20880#ifdef RIPPER
20881 if (!has_delayed_token(p)) {
20882 dispatch_scan_event(p, tSTRING_CONTENT);
20883 }
20884 else if (p->delayed.end_line + 1 == p->ruby_sourceline) {
20885 if ((len = p->lex.pcur - p->lex.ptok) > 0) {
20886 if (!(func & STR_FUNC_REGEXP)) {
20887 int cr = ENC_CODERANGE_UNKNOWN;
20888 rb_str_coderange_scan_restartable(p->lex.ptok, p->lex.pcur, enc, &cr);
20889 if (cr != ENC_CODERANGE_7BIT &&
20890 rb_is_usascii_enc(p->enc) &&
20891 enc != rb_utf8_encoding()) {
20892 enc = rb_ascii8bit_encoding();
20893 }
20894 }
20895 rb_parser_enc_str_buf_cat(p, p->delayed.token, p->lex.ptok, len, enc);
20896 }
20897 dispatch_delayed_token(p, tSTRING_CONTENT);
20898 }
20899 else {
20900 dispatch_delayed_token(p, tSTRING_CONTENT);
20901 dispatch_scan_event(p, tSTRING_CONTENT);
20902 }
20903 lex_goto_eol(p);
20904#endif
20905 heredoc_restore(p, &p->lex.strterm->u.heredoc);
20906 compile_error(p, "can't find string \"%.*s\" anywhere before EOF",
20907 (int)len, eos);
20908 token_flush(p);
20909 SET_LEX_STATE(EXPR_END);
20910 return tSTRING_END;
20911 }
20912 bol = was_bol(p);
20913 if (!bol) {
20914 /* not beginning of line, cannot be the terminator */
20915 }
20916 else if (p->heredoc_line_indent == -1) {
20917 /* `heredoc_line_indent == -1` means
20918 * - "after an interpolation in the same line", or
20919 * - "in a continuing line"
20920 */
20921 p->heredoc_line_indent = 0;
20922 }
20923 else if (whole_match_p(p, eos, len, indent)) {
20924 dispatch_heredoc_end(p);
20925 restore:
20926 heredoc_restore(p, &p->lex.strterm->u.heredoc);
20927 token_flush(p);
20928 SET_LEX_STATE(EXPR_END);
20929 return tSTRING_END;
20930 }
20931
20932 if (!(func & STR_FUNC_EXPAND)) {
20933 do {
20934 ptr = PARSER_STRING_PTR(p->lex.lastline);
20935 ptr_end = p->lex.pend;
20936 if (ptr_end > ptr) {
20937 switch (ptr_end[-1]) {
20938 case '\n':
20939 if (--ptr_end == ptr || ptr_end[-1] != '\r') {
20940 ptr_end++;
20941 break;
20942 }
20943 case '\r':
20944 --ptr_end;
20945 }
20946 }
20947
20948 if (p->heredoc_indent > 0) {
20949 long i = 0;
20950 while (ptr + i < ptr_end && parser_update_heredoc_indent(p, ptr[i]))
20951 i++;
20952 p->heredoc_line_indent = 0;
20953 }
20954
20955 if (str)
20956 parser_str_cat(str, ptr, ptr_end - ptr);
20957 else
20958 str = rb_parser_encoding_string_new(p, ptr, ptr_end - ptr, enc);
20959 if (!lex_eol_ptr_p(p, ptr_end)) parser_str_cat_cstr(str, "\n");
20960 lex_goto_eol(p);
20961 if (p->heredoc_indent > 0) {
20962 goto flush_str;
20963 }
20964 if (nextc(p) == -1) {
20965 if (str) {
20966 rb_parser_string_free(p, str);
20967 str = 0;
20968 }
20969 goto error;
20970 }
20971 } while (!whole_match_p(p, eos, len, indent));
20972 }
20973 else {
20974 /* int mb = ENC_CODERANGE_7BIT, *mbp = &mb;*/
20975 newtok(p);
20976 if (c == '#') {
20977 enum yytokentype t = parser_peek_variable_name(p);
20978 if (p->heredoc_line_indent != -1) {
20979 if (p->heredoc_indent > p->heredoc_line_indent) {
20980 p->heredoc_indent = p->heredoc_line_indent;
20981 }
20982 p->heredoc_line_indent = -1;
20983 }
20984 if (t) return t;
20985 tokadd(p, '#');
20986 c = nextc(p);
20987 }
20988 do {
20989 pushback(p, c);
20990 enc = p->enc;
20991 if ((c = tokadd_string(p, func, '\n', 0, NULL, &enc, &base_enc)) == -1) {
20992 if (p->eofp) goto error;
20993 goto restore;
20994 }
20995 if (c != '\n') {
20996 if (c == '\\') p->heredoc_line_indent = -1;
20997 flush:
20998 str = STR_NEW3(tok(p), toklen(p), enc, func);
20999 flush_str:
21000 set_yylval_str(str);
21001#ifndef RIPPER
21002 if (bol) nd_set_fl_newline(yylval.node);
21003#endif
21004 flush_string_content(p, enc, 0);
21005 return tSTRING_CONTENT;
21006 }
21007 tokadd(p, nextc(p));
21008 if (p->heredoc_indent > 0) {
21009 lex_goto_eol(p);
21010 goto flush;
21011 }
21012 /* if (mbp && mb == ENC_CODERANGE_UNKNOWN) mbp = 0;*/
21013 if ((c = nextc(p)) == -1) goto error;
21014 } while (!whole_match_p(p, eos, len, indent));
21015 str = STR_NEW3(tok(p), toklen(p), enc, func);
21016 }
21017 dispatch_heredoc_end(p);
21018 heredoc_restore(p, &p->lex.strterm->u.heredoc);
21019 token_flush(p);
21020 p->lex.strterm = NEW_STRTERM(func | STR_FUNC_TERM, 0, 0);
21021#ifdef RIPPER
21022 /* Preserve s_value for set_yylval_str */
21023 s_value = p->s_value;
21024#endif
21025 set_yylval_str(str);
21026#ifdef RIPPER
21027 set_parser_s_value(s_value);
21028#endif
21029
21030#ifndef RIPPER
21031 if (bol) nd_set_fl_newline(yylval.node);
21032#endif
21033 return tSTRING_CONTENT;
21034}
21035
21036#include "lex.c"
21037
21038static int
21039arg_ambiguous(struct parser_params *p, char c)
21040{
21041#ifndef RIPPER
21042 rb_warning1("ambiguous first argument; put parentheses or a space even after '%c' operator", WARN_I(c));
21043#else
21044 dispatch1(arg_ambiguous, rb_usascii_str_new(&c, 1));
21045#endif
21046 return TRUE;
21047}
21048
21049/* returns true value if formal argument error;
21050 * Qtrue, or error message if ripper */
21051static VALUE
21052formal_argument_error(struct parser_params *p, ID id)
21053{
21054 switch (id_type(id)) {
21055 case ID_LOCAL:
21056 break;
21057#ifndef RIPPER
21058# define ERR(mesg) (yyerror0(mesg), Qtrue)
21059#else
21060# define ERR(mesg) WARN_S(mesg)
21061#endif
21062 case ID_CONST:
21063 return ERR("formal argument cannot be a constant");
21064 case ID_INSTANCE:
21065 return ERR("formal argument cannot be an instance variable");
21066 case ID_GLOBAL:
21067 return ERR("formal argument cannot be a global variable");
21068 case ID_CLASS:
21069 return ERR("formal argument cannot be a class variable");
21070 default:
21071 return ERR("formal argument must be local variable");
21072#undef ERR
21073 }
21074 shadowing_lvar(p, id);
21075
21076 return Qfalse;
21077}
21078
21079static int
21080lvar_defined(struct parser_params *p, ID id)
21081{
21082 return (dyna_in_block(p) && dvar_defined(p, id)) || local_id(p, id);
21083}
21084
21085/* emacsen -*- hack */
21086static long
21087parser_encode_length(struct parser_params *p, const char *name, long len)
21088{
21089 long nlen;
21090
21091 if (len > 5 && name[nlen = len - 5] == '-') {
21092 if (rb_memcicmp(name + nlen + 1, "unix", 4) == 0)
21093 return nlen;
21094 }
21095 if (len > 4 && name[nlen = len - 4] == '-') {
21096 if (rb_memcicmp(name + nlen + 1, "dos", 3) == 0)
21097 return nlen;
21098 if (rb_memcicmp(name + nlen + 1, "mac", 3) == 0 &&
21099 !(len == 8 && rb_memcicmp(name, "utf8-mac", len) == 0))
21100 /* exclude UTF8-MAC because the encoding named "UTF8" doesn't exist in Ruby */
21101 return nlen;
21102 }
21103 return len;
21104}
21105
21106static void
21107parser_set_encode(struct parser_params *p, const char *name)
21108{
21109 rb_encoding *enc;
21110 VALUE excargs[3];
21111 int idx = 0;
21112
21113 const char *wrong = 0;
21114 switch (*name) {
21115 case 'e': case 'E': wrong = "external"; break;
21116 case 'i': case 'I': wrong = "internal"; break;
21117 case 'f': case 'F': wrong = "filesystem"; break;
21118 case 'l': case 'L': wrong = "locale"; break;
21119 }
21120 if (wrong && STRCASECMP(name, wrong) == 0) goto unknown;
21121 idx = rb_enc_find_index(name);
21122 if (idx < 0) {
21123 unknown:
21124 excargs[1] = rb_sprintf("unknown encoding name: %s", name);
21125 error:
21126 excargs[0] = rb_eArgError;
21127 excargs[2] = rb_make_backtrace();
21128 rb_ary_unshift(excargs[2], rb_sprintf("%"PRIsVALUE":%d", p->ruby_sourcefile_string, p->ruby_sourceline));
21129 VALUE exc = rb_make_exception(3, excargs);
21130 ruby_show_error_line(p, exc, &(YYLTYPE)RUBY_INIT_YYLLOC(), p->ruby_sourceline, p->lex.lastline);
21131
21132 rb_ast_free(p->ast);
21133 p->ast = NULL;
21134
21135 rb_exc_raise(exc);
21136 }
21137 enc = rb_enc_from_index(idx);
21138 if (!rb_enc_asciicompat(enc)) {
21139 excargs[1] = rb_sprintf("%s is not ASCII compatible", rb_enc_name(enc));
21140 goto error;
21141 }
21142 p->enc = enc;
21143#ifndef RIPPER
21144 if (p->debug_lines) {
21145 long i;
21146 for (i = 0; i < p->debug_lines->len; i++) {
21147 rb_parser_enc_associate(p, p->debug_lines->data[i], enc);
21148 }
21149 }
21150#endif
21151}
21152
21153static bool
21154comment_at_top(struct parser_params *p)
21155{
21156 if (p->token_seen) return false;
21157 return (p->line_count == (p->has_shebang ? 2 : 1));
21158}
21159
21160typedef long (*rb_magic_comment_length_t)(struct parser_params *p, const char *name, long len);
21161typedef void (*rb_magic_comment_setter_t)(struct parser_params *p, const char *name, const char *val);
21162
21163static int parser_invalid_pragma_value(struct parser_params *p, const char *name, const char *val);
21164
21165static void
21166magic_comment_encoding(struct parser_params *p, const char *name, const char *val)
21167{
21168 if (!comment_at_top(p)) {
21169 return;
21170 }
21171 parser_set_encode(p, val);
21172}
21173
21174static int
21175parser_get_bool(struct parser_params *p, const char *name, const char *val)
21176{
21177 switch (*val) {
21178 case 't': case 'T':
21179 if (STRCASECMP(val, "true") == 0) {
21180 return TRUE;
21181 }
21182 break;
21183 case 'f': case 'F':
21184 if (STRCASECMP(val, "false") == 0) {
21185 return FALSE;
21186 }
21187 break;
21188 }
21189 return parser_invalid_pragma_value(p, name, val);
21190}
21191
21192static int
21193parser_invalid_pragma_value(struct parser_params *p, const char *name, const char *val)
21194{
21195 rb_warning2("invalid value for %s: %s", WARN_S(name), WARN_S(val));
21196 return -1;
21197}
21198
21199static void
21200parser_set_token_info(struct parser_params *p, const char *name, const char *val)
21201{
21202 int b = parser_get_bool(p, name, val);
21203 if (b >= 0) p->token_info_enabled = b;
21204}
21205
21206static void
21207parser_set_frozen_string_literal(struct parser_params *p, const char *name, const char *val)
21208{
21209 int b;
21210
21211 if (p->token_seen) {
21212 rb_warning1("'%s' is ignored after any tokens", WARN_S(name));
21213 return;
21214 }
21215
21216 b = parser_get_bool(p, name, val);
21217 if (b < 0) return;
21218
21219 p->frozen_string_literal = b;
21220}
21221
21222static void
21223parser_set_shareable_constant_value(struct parser_params *p, const char *name, const char *val)
21224{
21225 for (const char *s = p->lex.pbeg, *e = p->lex.pcur; s < e; ++s) {
21226 if (*s == ' ' || *s == '\t') continue;
21227 if (*s == '#') break;
21228 rb_warning1("'%s' is ignored unless in comment-only line", WARN_S(name));
21229 return;
21230 }
21231
21232 switch (*val) {
21233 case 'n': case 'N':
21234 if (STRCASECMP(val, "none") == 0) {
21235 p->ctxt.shareable_constant_value = rb_parser_shareable_none;
21236 return;
21237 }
21238 break;
21239 case 'l': case 'L':
21240 if (STRCASECMP(val, "literal") == 0) {
21241 p->ctxt.shareable_constant_value = rb_parser_shareable_literal;
21242 return;
21243 }
21244 break;
21245 case 'e': case 'E':
21246 if (STRCASECMP(val, "experimental_copy") == 0) {
21247 p->ctxt.shareable_constant_value = rb_parser_shareable_copy;
21248 return;
21249 }
21250 if (STRCASECMP(val, "experimental_everything") == 0) {
21251 p->ctxt.shareable_constant_value = rb_parser_shareable_everything;
21252 return;
21253 }
21254 break;
21255 }
21256 parser_invalid_pragma_value(p, name, val);
21257}
21258
21259# if WARN_PAST_SCOPE
21260static void
21261parser_set_past_scope(struct parser_params *p, const char *name, const char *val)
21262{
21263 int b = parser_get_bool(p, name, val);
21264 if (b >= 0) p->past_scope_enabled = b;
21265}
21266# endif
21267
21269 const char *name;
21270 rb_magic_comment_setter_t func;
21271 rb_magic_comment_length_t length;
21272};
21273
21274static const struct magic_comment magic_comments[] = {
21275 {"coding", magic_comment_encoding, parser_encode_length},
21276 {"encoding", magic_comment_encoding, parser_encode_length},
21277 {"frozen_string_literal", parser_set_frozen_string_literal},
21278 {"shareable_constant_value", parser_set_shareable_constant_value},
21279 {"warn_indent", parser_set_token_info},
21280# if WARN_PAST_SCOPE
21281 {"warn_past_scope", parser_set_past_scope},
21282# endif
21283};
21284
21285static const char *
21286magic_comment_marker(const char *str, long len)
21287{
21288 long i = 2;
21289
21290 while (i < len) {
21291 switch (str[i]) {
21292 case '-':
21293 if (str[i-1] == '*' && str[i-2] == '-') {
21294 return str + i + 1;
21295 }
21296 i += 2;
21297 break;
21298 case '*':
21299 if (i + 1 >= len) return 0;
21300 if (str[i+1] != '-') {
21301 i += 4;
21302 }
21303 else if (str[i-1] != '-') {
21304 i += 2;
21305 }
21306 else {
21307 return str + i + 2;
21308 }
21309 break;
21310 default:
21311 i += 3;
21312 break;
21313 }
21314 }
21315 return 0;
21316}
21317
21318static int
21319parser_magic_comment(struct parser_params *p, const char *str, long len)
21320{
21321 int indicator = 0;
21322 VALUE name = 0, val = 0;
21323 const char *beg, *end, *vbeg, *vend;
21324#define str_copy(_s, _p, _n) ((_s) \
21325 ? (void)(rb_str_resize((_s), (_n)), \
21326 MEMCPY(RSTRING_PTR(_s), (_p), char, (_n)), (_s)) \
21327 : (void)((_s) = STR_NEW((_p), (_n))))
21328
21329 if (len <= 7) return FALSE;
21330 if (!!(beg = magic_comment_marker(str, len))) {
21331 if (!(end = magic_comment_marker(beg, str + len - beg)))
21332 return FALSE;
21333 indicator = TRUE;
21334 str = beg;
21335 len = end - beg - 3;
21336 }
21337
21338 /* %r"([^\\s\'\":;]+)\\s*:\\s*(\"(?:\\\\.|[^\"])*\"|[^\"\\s;]+)[\\s;]*" */
21339 while (len > 0) {
21340 const struct magic_comment *mc = magic_comments;
21341 char *s;
21342 int i;
21343 long n = 0;
21344
21345 for (; len > 0 && *str; str++, --len) {
21346 switch (*str) {
21347 case '\'': case '"': case ':': case ';':
21348 continue;
21349 }
21350 if (!ISSPACE(*str)) break;
21351 }
21352 for (beg = str; len > 0; str++, --len) {
21353 switch (*str) {
21354 case '\'': case '"': case ':': case ';':
21355 break;
21356 default:
21357 if (ISSPACE(*str)) break;
21358 continue;
21359 }
21360 break;
21361 }
21362 for (end = str; len > 0 && ISSPACE(*str); str++, --len);
21363 if (!len) break;
21364 if (*str != ':') {
21365 if (!indicator) return FALSE;
21366 continue;
21367 }
21368
21369 do str++; while (--len > 0 && ISSPACE(*str));
21370 if (!len) break;
21371 const char *tok_beg = str;
21372 if (*str == '"') {
21373 for (vbeg = ++str; --len > 0 && *str != '"'; str++) {
21374 if (*str == '\\') {
21375 --len;
21376 ++str;
21377 }
21378 }
21379 vend = str;
21380 if (len) {
21381 --len;
21382 ++str;
21383 }
21384 }
21385 else {
21386 for (vbeg = str; len > 0 && *str != '"' && *str != ';' && !ISSPACE(*str); --len, str++);
21387 vend = str;
21388 }
21389 const char *tok_end = str;
21390 if (indicator) {
21391 while (len > 0 && (*str == ';' || ISSPACE(*str))) --len, str++;
21392 }
21393 else {
21394 while (len > 0 && (ISSPACE(*str))) --len, str++;
21395 if (len) return FALSE;
21396 }
21397
21398 n = end - beg;
21399 str_copy(name, beg, n);
21400 s = RSTRING_PTR(name);
21401 for (i = 0; i < n; ++i) {
21402 if (s[i] == '-') s[i] = '_';
21403 }
21404 do {
21405 if (STRNCASECMP(mc->name, s, n) == 0 && !mc->name[n]) {
21406 n = vend - vbeg;
21407 if (mc->length) {
21408 n = (*mc->length)(p, vbeg, n);
21409 }
21410 str_copy(val, vbeg, n);
21411 p->lex.ptok = tok_beg;
21412 p->lex.pcur = tok_end;
21413 (*mc->func)(p, mc->name, RSTRING_PTR(val));
21414 break;
21415 }
21416 } while (++mc < magic_comments + numberof(magic_comments));
21417#ifdef RIPPER
21418 str_copy(val, vbeg, vend - vbeg);
21419 dispatch2(magic_comment, name, val);
21420#endif
21421 }
21422
21423 return TRUE;
21424}
21425
21426static void
21427set_file_encoding(struct parser_params *p, const char *str, const char *send)
21428{
21429 int sep = 0;
21430 const char *beg = str;
21431 VALUE s;
21432
21433 for (;;) {
21434 if (send - str <= 6) return;
21435 switch (str[6]) {
21436 case 'C': case 'c': str += 6; continue;
21437 case 'O': case 'o': str += 5; continue;
21438 case 'D': case 'd': str += 4; continue;
21439 case 'I': case 'i': str += 3; continue;
21440 case 'N': case 'n': str += 2; continue;
21441 case 'G': case 'g': str += 1; continue;
21442 case '=': case ':':
21443 sep = 1;
21444 str += 6;
21445 break;
21446 default:
21447 str += 6;
21448 if (ISSPACE(*str)) break;
21449 continue;
21450 }
21451 if (STRNCASECMP(str-6, "coding", 6) == 0) break;
21452 sep = 0;
21453 }
21454 for (;;) {
21455 do {
21456 if (++str >= send) return;
21457 } while (ISSPACE(*str));
21458 if (sep) break;
21459 if (*str != '=' && *str != ':') return;
21460 sep = 1;
21461 str++;
21462 }
21463 beg = str;
21464 while ((*str == '-' || *str == '_' || ISALNUM(*str)) && ++str < send);
21465 s = rb_str_new(beg, parser_encode_length(p, beg, str - beg));
21466 p->lex.ptok = beg;
21467 p->lex.pcur = str;
21468 parser_set_encode(p, RSTRING_PTR(s));
21469 rb_str_resize(s, 0);
21470}
21471
21472static void
21473parser_prepare(struct parser_params *p)
21474{
21475 int c = nextc0(p, FALSE);
21476 p->token_info_enabled = !compile_for_eval && RTEST(ruby_verbose);
21477 switch (c) {
21478 case '#':
21479 if (peek(p, '!')) p->has_shebang = 1;
21480 break;
21481 case 0xef: /* UTF-8 BOM marker */
21482 if (!lex_eol_n_p(p, 2) &&
21483 (unsigned char)p->lex.pcur[0] == 0xbb &&
21484 (unsigned char)p->lex.pcur[1] == 0xbf) {
21485 p->enc = rb_utf8_encoding();
21486 p->lex.pcur += 2;
21487#ifndef RIPPER
21488 if (p->debug_lines) {
21489 rb_parser_string_set_encoding(p->lex.lastline, p->enc);
21490 }
21491#endif
21492 p->lex.pbeg = p->lex.pcur;
21493 token_flush(p);
21494 return;
21495 }
21496 break;
21497 case -1: /* end of script. */
21498 return;
21499 }
21500 pushback(p, c);
21501 p->enc = rb_parser_str_get_encoding(p->lex.lastline);
21502}
21503
21504#ifndef RIPPER
21505#define ambiguous_operator(tok, op, syn) ( \
21506 rb_warning0("'"op"' after local variable or literal is interpreted as binary operator"), \
21507 rb_warning0("even though it seems like "syn""))
21508#else
21509#define ambiguous_operator(tok, op, syn) \
21510 dispatch2(operator_ambiguous, TOKEN2VAL(tok), rb_str_new_cstr(syn))
21511#endif
21512#define warn_balanced(tok, op, syn) ((void) \
21513 (!IS_lex_state_for(last_state, EXPR_CLASS|EXPR_DOT|EXPR_FNAME|EXPR_ENDFN) && \
21514 space_seen && !ISSPACE(c) && \
21515 (ambiguous_operator(tok, op, syn), 0)), \
21516 (enum yytokentype)(tok))
21517
21518static enum yytokentype
21519no_digits(struct parser_params *p)
21520{
21521 yyerror0("numeric literal without digits");
21522 if (peek(p, '_')) nextc(p);
21523 /* dummy 0, for tUMINUS_NUM at numeric */
21524 return set_number_literal(p, tINTEGER, 0, 10, 0);
21525}
21526
21527static enum yytokentype
21528parse_numeric(struct parser_params *p, int c)
21529{
21530 int is_float, seen_point, seen_e, nondigit;
21531 int suffix;
21532
21533 is_float = seen_point = seen_e = nondigit = 0;
21534 SET_LEX_STATE(EXPR_END);
21535 newtok(p);
21536 if (c == '-' || c == '+') {
21537 tokadd(p, c);
21538 c = nextc(p);
21539 }
21540 if (c == '0') {
21541 int start = toklen(p);
21542 c = nextc(p);
21543 if (c == 'x' || c == 'X') {
21544 /* hexadecimal */
21545 c = nextc(p);
21546 if (c != -1 && ISXDIGIT(c)) {
21547 do {
21548 if (c == '_') {
21549 if (nondigit) break;
21550 nondigit = c;
21551 continue;
21552 }
21553 if (!ISXDIGIT(c)) break;
21554 nondigit = 0;
21555 tokadd(p, c);
21556 } while ((c = nextc(p)) != -1);
21557 }
21558 pushback(p, c);
21559 tokfix(p);
21560 if (toklen(p) == start) {
21561 return no_digits(p);
21562 }
21563 else if (nondigit) goto trailing_uc;
21564 suffix = number_literal_suffix(p, NUM_SUFFIX_ALL);
21565 return set_number_literal(p, tINTEGER, suffix, 16, 0);
21566 }
21567 if (c == 'b' || c == 'B') {
21568 /* binary */
21569 c = nextc(p);
21570 if (c == '0' || c == '1') {
21571 do {
21572 if (c == '_') {
21573 if (nondigit) break;
21574 nondigit = c;
21575 continue;
21576 }
21577 if (c != '0' && c != '1') break;
21578 nondigit = 0;
21579 tokadd(p, c);
21580 } while ((c = nextc(p)) != -1);
21581 }
21582 pushback(p, c);
21583 tokfix(p);
21584 if (toklen(p) == start) {
21585 return no_digits(p);
21586 }
21587 else if (nondigit) goto trailing_uc;
21588 suffix = number_literal_suffix(p, NUM_SUFFIX_ALL);
21589 return set_number_literal(p, tINTEGER, suffix, 2, 0);
21590 }
21591 if (c == 'd' || c == 'D') {
21592 /* decimal */
21593 c = nextc(p);
21594 if (c != -1 && ISDIGIT(c)) {
21595 do {
21596 if (c == '_') {
21597 if (nondigit) break;
21598 nondigit = c;
21599 continue;
21600 }
21601 if (!ISDIGIT(c)) break;
21602 nondigit = 0;
21603 tokadd(p, c);
21604 } while ((c = nextc(p)) != -1);
21605 }
21606 pushback(p, c);
21607 tokfix(p);
21608 if (toklen(p) == start) {
21609 return no_digits(p);
21610 }
21611 else if (nondigit) goto trailing_uc;
21612 suffix = number_literal_suffix(p, NUM_SUFFIX_ALL);
21613 return set_number_literal(p, tINTEGER, suffix, 10, 0);
21614 }
21615 if (c == '_') {
21616 /* 0_0 */
21617 goto octal_number;
21618 }
21619 if (c == 'o' || c == 'O') {
21620 /* prefixed octal */
21621 c = nextc(p);
21622 if (c == -1 || c == '_' || !ISDIGIT(c)) {
21623 tokfix(p);
21624 return no_digits(p);
21625 }
21626 }
21627 if (c >= '0' && c <= '7') {
21628 /* octal */
21629 octal_number:
21630 do {
21631 if (c == '_') {
21632 if (nondigit) break;
21633 nondigit = c;
21634 continue;
21635 }
21636 if (c < '0' || c > '9') break;
21637 if (c > '7') goto invalid_octal;
21638 nondigit = 0;
21639 tokadd(p, c);
21640 } while ((c = nextc(p)) != -1);
21641 if (toklen(p) > start) {
21642 pushback(p, c);
21643 tokfix(p);
21644 if (nondigit) goto trailing_uc;
21645 suffix = number_literal_suffix(p, NUM_SUFFIX_ALL);
21646 return set_number_literal(p, tINTEGER, suffix, 8, 0);
21647 }
21648 if (nondigit) {
21649 pushback(p, c);
21650 goto trailing_uc;
21651 }
21652 }
21653 if (c > '7' && c <= '9') {
21654 invalid_octal:
21655 yyerror0("Invalid octal digit");
21656 }
21657 else if (c == '.' || c == 'e' || c == 'E') {
21658 tokadd(p, '0');
21659 }
21660 else {
21661 pushback(p, c);
21662 tokfix(p);
21663 suffix = number_literal_suffix(p, NUM_SUFFIX_ALL);
21664 return set_number_literal(p, tINTEGER, suffix, 10, 0);
21665 }
21666 }
21667
21668 for (;;) {
21669 switch (c) {
21670 case '0': case '1': case '2': case '3': case '4':
21671 case '5': case '6': case '7': case '8': case '9':
21672 nondigit = 0;
21673 tokadd(p, c);
21674 break;
21675
21676 case '.':
21677 if (nondigit) goto trailing_uc;
21678 if (seen_point || seen_e) {
21679 goto decode_num;
21680 }
21681 else {
21682 int c0 = nextc(p);
21683 if (c0 == -1 || !ISDIGIT(c0)) {
21684 pushback(p, c0);
21685 goto decode_num;
21686 }
21687 c = c0;
21688 }
21689 seen_point = toklen(p);
21690 tokadd(p, '.');
21691 tokadd(p, c);
21692 is_float++;
21693 nondigit = 0;
21694 break;
21695
21696 case 'e':
21697 case 'E':
21698 if (nondigit) {
21699 pushback(p, c);
21700 c = nondigit;
21701 goto decode_num;
21702 }
21703 if (seen_e) {
21704 goto decode_num;
21705 }
21706 nondigit = c;
21707 c = nextc(p);
21708 if (c != '-' && c != '+' && !ISDIGIT(c)) {
21709 pushback(p, c);
21710 c = nondigit;
21711 nondigit = 0;
21712 goto decode_num;
21713 }
21714 tokadd(p, nondigit);
21715 seen_e++;
21716 is_float++;
21717 tokadd(p, c);
21718 nondigit = (c == '-' || c == '+') ? c : 0;
21719 break;
21720
21721 case '_': /* `_' in number just ignored */
21722 if (nondigit) goto decode_num;
21723 nondigit = c;
21724 break;
21725
21726 default:
21727 goto decode_num;
21728 }
21729 c = nextc(p);
21730 }
21731
21732 decode_num:
21733 pushback(p, c);
21734 if (nondigit) {
21735 trailing_uc:
21736 literal_flush(p, p->lex.pcur - 1);
21737 YYLTYPE loc = RUBY_INIT_YYLLOC();
21738 compile_error(p, "trailing '%c' in number", nondigit);
21739 parser_show_error_line(p, &loc);
21740 }
21741 tokfix(p);
21742 if (is_float) {
21743 enum yytokentype type = tFLOAT;
21744
21745 suffix = number_literal_suffix(p, seen_e ? NUM_SUFFIX_I : NUM_SUFFIX_ALL);
21746 if (suffix & NUM_SUFFIX_R) {
21747 type = tRATIONAL;
21748 }
21749 else {
21750 errno = 0;
21751 strtod(tok(p), 0);
21752 if (errno == ERANGE) {
21753 rb_warning1("Float %s out of range", WARN_S(tok(p)));
21754 errno = 0;
21755 }
21756 }
21757 return set_number_literal(p, type, suffix, 0, seen_point);
21758 }
21759 suffix = number_literal_suffix(p, NUM_SUFFIX_ALL);
21760 return set_number_literal(p, tINTEGER, suffix, 10, 0);
21761}
21762
21763static enum yytokentype
21764parse_qmark(struct parser_params *p, int space_seen)
21765{
21766 rb_encoding *enc;
21767 register int c;
21768 rb_parser_string_t *lit;
21769 const char *start = p->lex.pcur;
21770
21771 if (IS_END()) {
21772 SET_LEX_STATE(EXPR_VALUE);
21773 return '?';
21774 }
21775 c = nextc(p);
21776 if (c == -1) {
21777 compile_error(p, "incomplete character syntax");
21778 return 0;
21779 }
21780 if (rb_enc_isspace(c, p->enc)) {
21781 if (!IS_ARG()) {
21782 int c2 = escaped_control_code(c);
21783 if (c2) {
21784 WARN_SPACE_CHAR(c2, "?");
21785 }
21786 }
21787 ternary:
21788 pushback(p, c);
21789 SET_LEX_STATE(EXPR_VALUE);
21790 return '?';
21791 }
21792 newtok(p);
21793 enc = p->enc;
21794 int w = parser_precise_mbclen(p, start);
21795 if (is_identchar(p, start, p->lex.pend, p->enc) &&
21796 !(lex_eol_ptr_n_p(p, start, w) || !is_identchar(p, start + w, p->lex.pend, p->enc))) {
21797 if (space_seen) {
21798 const char *ptr = start;
21799 do {
21800 int n = parser_precise_mbclen(p, ptr);
21801 if (n < 0) return -1;
21802 ptr += n;
21803 } while (!lex_eol_ptr_p(p, ptr) && is_identchar(p, ptr, p->lex.pend, p->enc));
21804 rb_warn2("'?' just followed by '%.*s' is interpreted as" \
21805 " a conditional operator, put a space after '?'",
21806 WARN_I((int)(ptr - start)), WARN_S_L(start, (ptr - start)));
21807 }
21808 goto ternary;
21809 }
21810 else if (c == '\\') {
21811 if (peek(p, 'u')) {
21812 nextc(p);
21813 enc = rb_utf8_encoding();
21814 tokadd_utf8(p, &enc, -1, 0, 0);
21815 }
21816 else if (!ISASCII(c = peekc(p)) && c != -1) {
21817 nextc(p);
21818 if (tokadd_mbchar(p, c) == -1) return 0;
21819 }
21820 else {
21821 c = read_escape(p, 0, p->lex.pcur - rb_strlen_lit("?\\"));
21822 tokadd(p, c);
21823 }
21824 }
21825 else {
21826 if (tokadd_mbchar(p, c) == -1) return 0;
21827 }
21828 tokfix(p);
21829 lit = STR_NEW3(tok(p), toklen(p), enc, 0);
21830 set_yylval_str(lit);
21831 SET_LEX_STATE(EXPR_END);
21832 return tCHAR;
21833}
21834
21835static enum yytokentype
21836parse_percent(struct parser_params *p, const int space_seen, const enum lex_state_e last_state)
21837{
21838 register int c;
21839 const char *ptok = p->lex.pcur;
21840
21841 if (IS_BEG()) {
21842 int term;
21843 int paren;
21844
21845 c = nextc(p);
21846 quotation:
21847 if (c == -1) goto unterminated;
21848 if (!ISALNUM(c)) {
21849 term = c;
21850 if (!ISASCII(c)) goto unknown;
21851 c = 'Q';
21852 }
21853 else {
21854 term = nextc(p);
21855 if (rb_enc_isalnum(term, p->enc) || !parser_isascii(p)) {
21856 unknown:
21857 pushback(p, term);
21858 c = parser_precise_mbclen(p, p->lex.pcur);
21859 if (c < 0) return 0;
21860 p->lex.pcur += c;
21861 yyerror0("unknown type of %string");
21862 return 0;
21863 }
21864 }
21865 if (term == -1) {
21866 unterminated:
21867 compile_error(p, "unterminated quoted string meets end of file");
21868 return 0;
21869 }
21870 paren = term;
21871 if (term == '(') term = ')';
21872 else if (term == '[') term = ']';
21873 else if (term == '{') term = '}';
21874 else if (term == '<') term = '>';
21875 else paren = 0;
21876
21877 p->lex.ptok = ptok-1;
21878 switch (c) {
21879 case 'Q':
21880 p->lex.strterm = NEW_STRTERM(str_dquote, term, paren);
21881 return tSTRING_BEG;
21882
21883 case 'q':
21884 p->lex.strterm = NEW_STRTERM(str_squote, term, paren);
21885 return tSTRING_BEG;
21886
21887 case 'W':
21888 p->lex.strterm = NEW_STRTERM(str_dword, term, paren);
21889 return tWORDS_BEG;
21890
21891 case 'w':
21892 p->lex.strterm = NEW_STRTERM(str_sword, term, paren);
21893 return tQWORDS_BEG;
21894
21895 case 'I':
21896 p->lex.strterm = NEW_STRTERM(str_dword, term, paren);
21897 return tSYMBOLS_BEG;
21898
21899 case 'i':
21900 p->lex.strterm = NEW_STRTERM(str_sword, term, paren);
21901 return tQSYMBOLS_BEG;
21902
21903 case 'x':
21904 p->lex.strterm = NEW_STRTERM(str_xquote, term, paren);
21905 return tXSTRING_BEG;
21906
21907 case 'r':
21908 p->lex.strterm = NEW_STRTERM(str_regexp, term, paren);
21909 return tREGEXP_BEG;
21910
21911 case 's':
21912 p->lex.strterm = NEW_STRTERM(str_ssym, term, paren);
21913 SET_LEX_STATE(EXPR_FNAME|EXPR_FITEM);
21914 return tSYMBEG;
21915
21916 default:
21917 yyerror0("unknown type of %string");
21918 return 0;
21919 }
21920 }
21921 if ((c = nextc(p)) == '=') {
21922 set_yylval_id('%');
21923 SET_LEX_STATE(EXPR_BEG);
21924 return tOP_ASGN;
21925 }
21926 if (IS_SPCARG(c) || (IS_lex_state(EXPR_FITEM) && c == 's')) {
21927 goto quotation;
21928 }
21929 SET_LEX_STATE(IS_AFTER_OPERATOR() ? EXPR_ARG : EXPR_BEG);
21930 pushback(p, c);
21931 return warn_balanced('%', "%%", "string literal");
21932}
21933
21934static int
21935tokadd_ident(struct parser_params *p, int c)
21936{
21937 do {
21938 if (tokadd_mbchar(p, c) == -1) return -1;
21939 c = nextc(p);
21940 } while (parser_is_identchar(p));
21941 pushback(p, c);
21942 return 0;
21943}
21944
21945static ID
21946tokenize_ident(struct parser_params *p)
21947{
21948 ID ident = TOK_INTERN();
21949
21950 set_yylval_name(ident);
21951
21952 return ident;
21953}
21954
21955static int
21956parse_numvar(struct parser_params *p)
21957{
21958 size_t len;
21959 int overflow;
21960 unsigned long n = ruby_scan_digits(tok(p)+1, toklen(p)-1, 10, &len, &overflow);
21961 const unsigned long nth_ref_max =
21962 ((FIXNUM_MAX < INT_MAX) ? FIXNUM_MAX : INT_MAX) >> 1;
21963 /* NTH_REF is left-shifted to be ORed with back-ref flag and
21964 * turned into a Fixnum, in compile.c */
21965
21966 if (overflow || n > nth_ref_max) {
21967 /* compile_error()? */
21968 rb_warn1("'%s' is too big for a number variable, always nil", WARN_S(tok(p)));
21969 return 0; /* $0 is $PROGRAM_NAME, not NTH_REF */
21970 }
21971 else {
21972 return (int)n;
21973 }
21974}
21975
21976static enum yytokentype
21977parse_gvar(struct parser_params *p, const enum lex_state_e last_state)
21978{
21979 const char *ptr = p->lex.pcur;
21980 register int c;
21981
21982 SET_LEX_STATE(EXPR_END);
21983 p->lex.ptok = ptr - 1; /* from '$' */
21984 newtok(p);
21985 c = nextc(p);
21986 switch (c) {
21987 case '_': /* $_: last read line string */
21988 c = nextc(p);
21989 if (parser_is_identchar(p)) {
21990 tokadd(p, '$');
21991 tokadd(p, '_');
21992 break;
21993 }
21994 pushback(p, c);
21995 c = '_';
21996 /* fall through */
21997 case '~': /* $~: match-data */
21998 case '*': /* $*: argv */
21999 case '$': /* $$: pid */
22000 case '?': /* $?: last status */
22001 case '!': /* $!: error string */
22002 case '@': /* $@: error position */
22003 case '/': /* $/: input record separator */
22004 case '\\': /* $\: output record separator */
22005 case ';': /* $;: field separator */
22006 case ',': /* $,: output field separator */
22007 case '.': /* $.: last read line number */
22008 case '=': /* $=: ignorecase */
22009 case ':': /* $:: load path */
22010 case '<': /* $<: default input handle */
22011 case '>': /* $>: default output handle */
22012 case '\"': /* $": already loaded files */
22013 tokadd(p, '$');
22014 tokadd(p, c);
22015 goto gvar;
22016
22017 case '-':
22018 tokadd(p, '$');
22019 tokadd(p, c);
22020 c = nextc(p);
22021 if (parser_is_identchar(p)) {
22022 if (tokadd_mbchar(p, c) == -1) return 0;
22023 }
22024 else {
22025 pushback(p, c);
22026 pushback(p, '-');
22027 return '$';
22028 }
22029 gvar:
22030 tokenize_ident(p);
22031 return tGVAR;
22032
22033 case '&': /* $&: last match */
22034 case '`': /* $`: string before last match */
22035 case '\'': /* $': string after last match */
22036 case '+': /* $+: string matches last paren. */
22037 if (IS_lex_state_for(last_state, EXPR_FNAME)) {
22038 tokadd(p, '$');
22039 tokadd(p, c);
22040 goto gvar;
22041 }
22042 set_yylval_node(NEW_BACK_REF(c, &_cur_loc));
22043 return tBACK_REF;
22044
22045 case '1': case '2': case '3':
22046 case '4': case '5': case '6':
22047 case '7': case '8': case '9':
22048 tokadd(p, '$');
22049 do {
22050 tokadd(p, c);
22051 c = nextc(p);
22052 } while (c != -1 && ISDIGIT(c));
22053 pushback(p, c);
22054 if (IS_lex_state_for(last_state, EXPR_FNAME)) goto gvar;
22055 tokfix(p);
22056 c = parse_numvar(p);
22057 set_yylval_node(NEW_NTH_REF(c, &_cur_loc));
22058 return tNTH_REF;
22059
22060 default:
22061 if (!parser_is_identchar(p)) {
22062 YYLTYPE loc = RUBY_INIT_YYLLOC();
22063 if (c == -1 || ISSPACE(c)) {
22064 compile_error(p, "'$' without identifiers is not allowed as a global variable name");
22065 }
22066 else {
22067 pushback(p, c);
22068 compile_error(p, "'$%c' is not allowed as a global variable name", c);
22069 }
22070 parser_show_error_line(p, &loc);
22071 set_yylval_noname();
22072 return tGVAR;
22073 }
22074 /* fall through */
22075 case '0':
22076 tokadd(p, '$');
22077 }
22078
22079 if (tokadd_ident(p, c)) return 0;
22080 SET_LEX_STATE(EXPR_END);
22081 if (VALID_SYMNAME_P(tok(p), toklen(p), p->enc, ID_GLOBAL)) {
22082 tokenize_ident(p);
22083 }
22084 else {
22085 compile_error(p, "'%.*s' is not allowed as a global variable name", toklen(p), tok(p));
22086 set_yylval_noname();
22087 }
22088 return tGVAR;
22089}
22090
22091static bool
22092parser_numbered_param(struct parser_params *p, int n)
22093{
22094 if (n < 0) return false;
22095
22096 if (DVARS_TERMINAL_P(p->lvtbl->args) || DVARS_TERMINAL_P(p->lvtbl->args->prev)) {
22097 return false;
22098 }
22099 if (p->max_numparam == ORDINAL_PARAM) {
22100 compile_error(p, "ordinary parameter is defined");
22101 return false;
22102 }
22103 struct vtable *args = p->lvtbl->args;
22104 if (p->max_numparam < n) {
22105 p->max_numparam = n;
22106 }
22107 while (n > args->pos) {
22108 vtable_add(args, NUMPARAM_IDX_TO_ID(args->pos+1));
22109 }
22110 return true;
22111}
22112
22113static enum yytokentype
22114parse_atmark(struct parser_params *p, const enum lex_state_e last_state)
22115{
22116 const char *ptr = p->lex.pcur;
22117 enum yytokentype result = tIVAR;
22118 register int c = nextc(p);
22119 YYLTYPE loc;
22120
22121 p->lex.ptok = ptr - 1; /* from '@' */
22122 newtok(p);
22123 tokadd(p, '@');
22124 if (c == '@') {
22125 result = tCVAR;
22126 tokadd(p, '@');
22127 c = nextc(p);
22128 }
22129 SET_LEX_STATE(IS_lex_state_for(last_state, EXPR_FNAME) ? EXPR_ENDFN : EXPR_END);
22130 if (c == -1 || !parser_is_identchar(p)) {
22131 pushback(p, c);
22132 RUBY_SET_YYLLOC(loc);
22133 if (result == tIVAR) {
22134 compile_error(p, "'@' without identifiers is not allowed as an instance variable name");
22135 }
22136 else {
22137 compile_error(p, "'@@' without identifiers is not allowed as a class variable name");
22138 }
22139 parser_show_error_line(p, &loc);
22140 set_yylval_noname();
22141 SET_LEX_STATE(EXPR_END);
22142 return result;
22143 }
22144 else if (ISDIGIT(c)) {
22145 pushback(p, c);
22146 RUBY_SET_YYLLOC(loc);
22147 if (result == tIVAR) {
22148 compile_error(p, "'@%c' is not allowed as an instance variable name", c);
22149 }
22150 else {
22151 compile_error(p, "'@@%c' is not allowed as a class variable name", c);
22152 }
22153 parser_show_error_line(p, &loc);
22154 set_yylval_noname();
22155 SET_LEX_STATE(EXPR_END);
22156 return result;
22157 }
22158
22159 if (tokadd_ident(p, c)) return 0;
22160 tokenize_ident(p);
22161 return result;
22162}
22163
22164static enum yytokentype
22165parse_ident(struct parser_params *p, int c, int cmd_state)
22166{
22167 enum yytokentype result;
22168 bool is_ascii = true;
22169 const enum lex_state_e last_state = p->lex.state;
22170 ID ident;
22171 int enforce_keyword_end = 0;
22172
22173 do {
22174 if (!ISASCII(c)) is_ascii = false;
22175 if (tokadd_mbchar(p, c) == -1) return 0;
22176 c = nextc(p);
22177 } while (parser_is_identchar(p));
22178 if ((c == '!' || c == '?') && !peek(p, '=')) {
22179 result = tFID;
22180 tokadd(p, c);
22181 }
22182 else if (c == '=' && IS_lex_state(EXPR_FNAME) &&
22183 (!peek(p, '~') && !peek(p, '>') && (!peek(p, '=') || (peek_n(p, '>', 1))))) {
22184 result = tIDENTIFIER;
22185 tokadd(p, c);
22186 }
22187 else {
22188 result = tCONSTANT; /* assume provisionally */
22189 pushback(p, c);
22190 }
22191 tokfix(p);
22192
22193 if (IS_LABEL_POSSIBLE()) {
22194 if (IS_LABEL_SUFFIX(0)) {
22195 SET_LEX_STATE(EXPR_ARG|EXPR_LABELED);
22196 nextc(p);
22197 tokenize_ident(p);
22198 return tLABEL;
22199 }
22200 }
22201
22202#ifndef RIPPER
22203 if (peek_end_expect_token_locations(p)) {
22204 const rb_code_position_t *end_pos;
22205 int lineno, column;
22206 int beg_pos = (int)(p->lex.ptok - p->lex.pbeg);
22207
22208 end_pos = peek_end_expect_token_locations(p)->pos;
22209 lineno = end_pos->lineno;
22210 column = end_pos->column;
22211
22212 if (p->debug) {
22213 rb_parser_printf(p, "enforce_keyword_end check. current: (%d, %d), peek: (%d, %d)\n",
22214 p->ruby_sourceline, beg_pos, lineno, column);
22215 }
22216
22217 if ((p->ruby_sourceline > lineno) && (beg_pos <= column)) {
22218 const struct kwtable *kw;
22219
22220 if ((IS_lex_state(EXPR_DOT)) && (kw = rb_reserved_word(tok(p), toklen(p))) && (kw && kw->id[0] == keyword_end)) {
22221 if (p->debug) rb_parser_printf(p, "enforce_keyword_end is enabled\n");
22222 enforce_keyword_end = 1;
22223 }
22224 }
22225 }
22226#endif
22227
22228 if (is_ascii && (!IS_lex_state(EXPR_DOT) || enforce_keyword_end)) {
22229 const struct kwtable *kw;
22230
22231 /* See if it is a reserved word. */
22232 kw = rb_reserved_word(tok(p), toklen(p));
22233 if (kw) {
22234 enum lex_state_e state = p->lex.state;
22235 if (IS_lex_state_for(state, EXPR_FNAME)) {
22236 SET_LEX_STATE(EXPR_ENDFN);
22237 set_yylval_name(rb_intern2(tok(p), toklen(p)));
22238 return kw->id[0];
22239 }
22240 SET_LEX_STATE(kw->state);
22241 if (IS_lex_state(EXPR_BEG)) {
22242 p->command_start = TRUE;
22243 }
22244 if (kw->id[0] == keyword_do) {
22245 if (lambda_beginning_p()) {
22246 p->lex.lpar_beg = -1; /* make lambda_beginning_p() == FALSE in the body of "-> do ... end" */
22247 return keyword_do_LAMBDA;
22248 }
22249 if (COND_P()) return keyword_do_cond;
22250 if (CMDARG_P() && !IS_lex_state_for(state, EXPR_CMDARG))
22251 return keyword_do_block;
22252 return keyword_do;
22253 }
22254 if (IS_lex_state_for(state, (EXPR_BEG | EXPR_LABELED | EXPR_CLASS)))
22255 return kw->id[0];
22256 else {
22257 if (kw->id[0] != kw->id[1])
22258 SET_LEX_STATE(EXPR_BEG | EXPR_LABEL);
22259 return kw->id[1];
22260 }
22261 }
22262 }
22263
22264 if (IS_lex_state(EXPR_BEG_ANY | EXPR_ARG_ANY | EXPR_DOT)) {
22265 if (cmd_state) {
22266 SET_LEX_STATE(EXPR_CMDARG);
22267 }
22268 else {
22269 SET_LEX_STATE(EXPR_ARG);
22270 }
22271 }
22272 else if (p->lex.state == EXPR_FNAME) {
22273 SET_LEX_STATE(EXPR_ENDFN);
22274 }
22275 else {
22276 SET_LEX_STATE(EXPR_END);
22277 }
22278
22279 ident = tokenize_ident(p);
22280 if (result == tCONSTANT && is_local_id(ident)) result = tIDENTIFIER;
22281 if (!IS_lex_state_for(last_state, EXPR_DOT|EXPR_FNAME) &&
22282 (result == tIDENTIFIER) && /* not EXPR_FNAME, not attrasgn */
22283 (lvar_defined(p, ident) || NUMPARAM_ID_P(ident))) {
22284 SET_LEX_STATE(EXPR_END|EXPR_LABEL);
22285 }
22286 return result;
22287}
22288
22289static void
22290warn_cr(struct parser_params *p)
22291{
22292 if (!p->cr_seen) {
22293 p->cr_seen = TRUE;
22294 /* carried over with p->lex.nextline for nextc() */
22295 rb_warn0("encountered \\r in middle of line, treated as a mere space");
22296 }
22297}
22298
22299static enum yytokentype
22300parser_yylex(struct parser_params *p)
22301{
22302 register int c;
22303 int space_seen = 0;
22304 int cmd_state;
22305 int label;
22306 enum lex_state_e last_state;
22307 int fallthru = FALSE;
22308 int token_seen = p->token_seen;
22309
22310 if (p->lex.strterm) {
22311 if (strterm_is_heredoc(p->lex.strterm)) {
22312 token_flush(p);
22313 return here_document(p, &p->lex.strterm->u.heredoc);
22314 }
22315 else {
22316 token_flush(p);
22317 return parse_string(p, &p->lex.strterm->u.literal);
22318 }
22319 }
22320 cmd_state = p->command_start;
22321 p->command_start = FALSE;
22322 p->token_seen = TRUE;
22323#ifndef RIPPER
22324 token_flush(p);
22325#endif
22326 retry:
22327 last_state = p->lex.state;
22328 switch (c = nextc(p)) {
22329 case '\0': /* NUL */
22330 case '\004': /* ^D */
22331 case '\032': /* ^Z */
22332 case -1: /* end of script. */
22333 p->eofp = 1;
22334#ifndef RIPPER
22335 if (p->end_expect_token_locations) {
22336 pop_end_expect_token_locations(p);
22337 RUBY_SET_YYLLOC_OF_DUMMY_END(*p->yylloc);
22338 return tDUMNY_END;
22339 }
22340#endif
22341 /* Set location for end-of-input because dispatch_scan_event is not called. */
22342 RUBY_SET_YYLLOC(*p->yylloc);
22343 return END_OF_INPUT;
22344
22345 /* white spaces */
22346 case '\r':
22347 warn_cr(p);
22348 /* fall through */
22349 case ' ': case '\t': case '\f':
22350 case '\13': /* '\v' */
22351 space_seen = 1;
22352 while ((c = nextc(p))) {
22353 switch (c) {
22354 case '\r':
22355 warn_cr(p);
22356 /* fall through */
22357 case ' ': case '\t': case '\f':
22358 case '\13': /* '\v' */
22359 break;
22360 default:
22361 goto outofloop;
22362 }
22363 }
22364 outofloop:
22365 pushback(p, c);
22366 dispatch_scan_event(p, tSP);
22367#ifndef RIPPER
22368 token_flush(p);
22369#endif
22370 goto retry;
22371
22372 case '#': /* it's a comment */
22373 p->token_seen = token_seen;
22374 const char *const pcur = p->lex.pcur, *const ptok = p->lex.ptok;
22375 /* no magic_comment in shebang line */
22376 if (!parser_magic_comment(p, p->lex.pcur, p->lex.pend - p->lex.pcur)) {
22377 if (comment_at_top(p)) {
22378 set_file_encoding(p, p->lex.pcur, p->lex.pend);
22379 }
22380 }
22381 p->lex.pcur = pcur, p->lex.ptok = ptok;
22382 lex_goto_eol(p);
22383 dispatch_scan_event(p, tCOMMENT);
22384 fallthru = TRUE;
22385 /* fall through */
22386 case '\n':
22387 p->token_seen = token_seen;
22388 rb_parser_string_t *prevline = p->lex.lastline;
22389 c = (IS_lex_state(EXPR_BEG|EXPR_CLASS|EXPR_FNAME|EXPR_DOT) &&
22390 !IS_lex_state(EXPR_LABELED));
22391 if (c || IS_lex_state_all(EXPR_ARG|EXPR_LABELED)) {
22392 if (!fallthru) {
22393 dispatch_scan_event(p, tIGNORED_NL);
22394 }
22395 fallthru = FALSE;
22396 if (!c && p->ctxt.in_kwarg) {
22397 goto normal_newline;
22398 }
22399 goto retry;
22400 }
22401 while (1) {
22402 switch (c = nextc(p)) {
22403 case ' ': case '\t': case '\f': case '\r':
22404 case '\13': /* '\v' */
22405 space_seen = 1;
22406 break;
22407 case '#':
22408 pushback(p, c);
22409 if (space_seen) {
22410 dispatch_scan_event(p, tSP);
22411 token_flush(p);
22412 }
22413 goto retry;
22414 case 'a':
22415 if (peek_word_at(p, "nd", 2, 0)) goto leading_logical;
22416 goto bol;
22417 case 'o':
22418 if (peek_word_at(p, "r", 1, 0)) goto leading_logical;
22419 goto bol;
22420 case '|':
22421 if (peek(p, '|')) goto leading_logical;
22422 goto bol;
22423 case '&':
22424 if (peek(p, '&')) {
22425 leading_logical:
22426 pushback(p, c);
22427 dispatch_delayed_token(p, tIGNORED_NL);
22428 cmd_state = FALSE;
22429 goto retry;
22430 }
22431 /* fall through */
22432 case '.': {
22433 dispatch_delayed_token(p, tIGNORED_NL);
22434 if (peek(p, '.') == (c == '&')) {
22435 pushback(p, c);
22436 dispatch_scan_event(p, tSP);
22437 goto retry;
22438 }
22439 }
22440 bol:
22441 default:
22442 p->ruby_sourceline--;
22443 p->lex.nextline = p->lex.lastline;
22444 set_lastline(p, prevline);
22445 case -1: /* EOF no decrement*/
22446 if (c == -1 && space_seen) {
22447 dispatch_scan_event(p, tSP);
22448 }
22449 lex_goto_eol(p);
22450 if (c != -1) {
22451 token_flush(p);
22452 RUBY_SET_YYLLOC(*p->yylloc);
22453 }
22454 goto normal_newline;
22455 }
22456 }
22457 normal_newline:
22458 p->command_start = TRUE;
22459 SET_LEX_STATE(EXPR_BEG);
22460 return '\n';
22461
22462 case '*':
22463 if ((c = nextc(p)) == '*') {
22464 if ((c = nextc(p)) == '=') {
22465 set_yylval_id(idPow);
22466 SET_LEX_STATE(EXPR_BEG);
22467 return tOP_ASGN;
22468 }
22469 pushback(p, c);
22470 if (IS_SPCARG(c)) {
22471 rb_warning0("'**' interpreted as argument prefix");
22472 c = tDSTAR;
22473 }
22474 else if (IS_BEG()) {
22475 c = tDSTAR;
22476 }
22477 else {
22478 c = warn_balanced((enum ruby_method_ids)tPOW, "**", "argument prefix");
22479 }
22480 }
22481 else {
22482 if (c == '=') {
22483 set_yylval_id('*');
22484 SET_LEX_STATE(EXPR_BEG);
22485 return tOP_ASGN;
22486 }
22487 pushback(p, c);
22488 if (IS_SPCARG(c)) {
22489 rb_warning0("'*' interpreted as argument prefix");
22490 c = tSTAR;
22491 }
22492 else if (IS_BEG()) {
22493 c = tSTAR;
22494 }
22495 else {
22496 c = warn_balanced('*', "*", "argument prefix");
22497 }
22498 }
22499 SET_LEX_STATE(IS_AFTER_OPERATOR() ? EXPR_ARG : EXPR_BEG);
22500 return c;
22501
22502 case '!':
22503 c = nextc(p);
22504 if (IS_AFTER_OPERATOR()) {
22505 SET_LEX_STATE(EXPR_ARG);
22506 if (c == '@') {
22507 return '!';
22508 }
22509 }
22510 else {
22511 SET_LEX_STATE(EXPR_BEG);
22512 }
22513 if (c == '=') {
22514 return tNEQ;
22515 }
22516 if (c == '~') {
22517 return tNMATCH;
22518 }
22519 pushback(p, c);
22520 return '!';
22521
22522 case '=':
22523 if (was_bol(p)) {
22524 /* skip embedded rd document */
22525 if (word_match_p(p, "begin", 5)) {
22526 int first_p = TRUE;
22527
22528 lex_goto_eol(p);
22529 dispatch_scan_event(p, tEMBDOC_BEG);
22530 for (;;) {
22531 lex_goto_eol(p);
22532 if (!first_p) {
22533 dispatch_scan_event(p, tEMBDOC);
22534 }
22535 first_p = FALSE;
22536 c = nextc(p);
22537 if (c == -1) {
22538 compile_error(p, "embedded document meets end of file");
22539 return END_OF_INPUT;
22540 }
22541 if (c == '=' && word_match_p(p, "end", 3)) {
22542 break;
22543 }
22544 pushback(p, c);
22545 }
22546 lex_goto_eol(p);
22547 dispatch_scan_event(p, tEMBDOC_END);
22548 goto retry;
22549 }
22550 }
22551
22552 SET_LEX_STATE(IS_AFTER_OPERATOR() ? EXPR_ARG : EXPR_BEG);
22553 if ((c = nextc(p)) == '=') {
22554 if ((c = nextc(p)) == '=') {
22555 return tEQQ;
22556 }
22557 pushback(p, c);
22558 return tEQ;
22559 }
22560 if (c == '~') {
22561 return tMATCH;
22562 }
22563 else if (c == '>') {
22564 return tASSOC;
22565 }
22566 pushback(p, c);
22567 return '=';
22568
22569 case '<':
22570 c = nextc(p);
22571 if (c == '<' &&
22572 !IS_lex_state(EXPR_DOT | EXPR_CLASS) &&
22573 !IS_END() &&
22574 (!IS_ARG() || IS_lex_state(EXPR_LABELED) || space_seen)) {
22575 enum yytokentype token = heredoc_identifier(p);
22576 if (token) return token < 0 ? 0 : token;
22577 }
22578 if (IS_AFTER_OPERATOR()) {
22579 SET_LEX_STATE(EXPR_ARG);
22580 }
22581 else {
22582 if (IS_lex_state(EXPR_CLASS))
22583 p->command_start = TRUE;
22584 SET_LEX_STATE(EXPR_BEG);
22585 }
22586 if (c == '=') {
22587 if ((c = nextc(p)) == '>') {
22588 return tCMP;
22589 }
22590 pushback(p, c);
22591 return tLEQ;
22592 }
22593 if (c == '<') {
22594 if ((c = nextc(p)) == '=') {
22595 set_yylval_id(idLTLT);
22596 SET_LEX_STATE(EXPR_BEG);
22597 return tOP_ASGN;
22598 }
22599 pushback(p, c);
22600 return warn_balanced((enum ruby_method_ids)tLSHFT, "<<", "here document");
22601 }
22602 pushback(p, c);
22603 return '<';
22604
22605 case '>':
22606 SET_LEX_STATE(IS_AFTER_OPERATOR() ? EXPR_ARG : EXPR_BEG);
22607 if ((c = nextc(p)) == '=') {
22608 return tGEQ;
22609 }
22610 if (c == '>') {
22611 if ((c = nextc(p)) == '=') {
22612 set_yylval_id(idGTGT);
22613 SET_LEX_STATE(EXPR_BEG);
22614 return tOP_ASGN;
22615 }
22616 pushback(p, c);
22617 return tRSHFT;
22618 }
22619 pushback(p, c);
22620 return '>';
22621
22622 case '"':
22623 label = (IS_LABEL_POSSIBLE() ? str_label : 0);
22624 p->lex.strterm = NEW_STRTERM(str_dquote | label, '"', 0);
22625 p->lex.ptok = p->lex.pcur-1;
22626 return tSTRING_BEG;
22627
22628 case '`':
22629 if (IS_lex_state(EXPR_FNAME)) {
22630 SET_LEX_STATE(EXPR_ENDFN);
22631 return c;
22632 }
22633 if (IS_lex_state(EXPR_DOT)) {
22634 if (cmd_state)
22635 SET_LEX_STATE(EXPR_CMDARG);
22636 else
22637 SET_LEX_STATE(EXPR_ARG);
22638 return c;
22639 }
22640 p->lex.strterm = NEW_STRTERM(str_xquote, '`', 0);
22641 return tXSTRING_BEG;
22642
22643 case '\'':
22644 label = (IS_LABEL_POSSIBLE() ? str_label : 0);
22645 p->lex.strterm = NEW_STRTERM(str_squote | label, '\'', 0);
22646 p->lex.ptok = p->lex.pcur-1;
22647 return tSTRING_BEG;
22648
22649 case '?':
22650 return parse_qmark(p, space_seen);
22651
22652 case '&':
22653 if ((c = nextc(p)) == '&') {
22654 SET_LEX_STATE(EXPR_BEG);
22655 if ((c = nextc(p)) == '=') {
22656 set_yylval_id(idANDOP);
22657 SET_LEX_STATE(EXPR_BEG);
22658 return tOP_ASGN;
22659 }
22660 pushback(p, c);
22661 return tANDOP;
22662 }
22663 else if (c == '=') {
22664 set_yylval_id('&');
22665 SET_LEX_STATE(EXPR_BEG);
22666 return tOP_ASGN;
22667 }
22668 else if (c == '.') {
22669 set_yylval_id(idANDDOT);
22670 SET_LEX_STATE(EXPR_DOT);
22671 return tANDDOT;
22672 }
22673 pushback(p, c);
22674 if (IS_SPCARG(c)) {
22675 if ((c != ':') ||
22676 (c = peekc_n(p, 1)) == -1 ||
22677 !(c == '\'' || c == '"' ||
22678 is_identchar(p, (p->lex.pcur+1), p->lex.pend, p->enc))) {
22679 rb_warning0("'&' interpreted as argument prefix");
22680 }
22681 c = tAMPER;
22682 }
22683 else if (IS_BEG()) {
22684 c = tAMPER;
22685 }
22686 else {
22687 c = warn_balanced('&', "&", "argument prefix");
22688 }
22689 SET_LEX_STATE(IS_AFTER_OPERATOR() ? EXPR_ARG : EXPR_BEG);
22690 return c;
22691
22692 case '|':
22693 if ((c = nextc(p)) == '|') {
22694 SET_LEX_STATE(EXPR_BEG);
22695 if ((c = nextc(p)) == '=') {
22696 set_yylval_id(idOROP);
22697 SET_LEX_STATE(EXPR_BEG);
22698 return tOP_ASGN;
22699 }
22700 pushback(p, c);
22701 if (IS_lex_state_for(last_state, EXPR_BEG)) {
22702 c = '|';
22703 pushback(p, '|');
22704 return c;
22705 }
22706 return tOROP;
22707 }
22708 if (c == '=') {
22709 set_yylval_id('|');
22710 SET_LEX_STATE(EXPR_BEG);
22711 return tOP_ASGN;
22712 }
22713 SET_LEX_STATE(IS_AFTER_OPERATOR() ? EXPR_ARG : EXPR_BEG|EXPR_LABEL);
22714 pushback(p, c);
22715 return '|';
22716
22717 case '+':
22718 c = nextc(p);
22719 if (IS_AFTER_OPERATOR()) {
22720 SET_LEX_STATE(EXPR_ARG);
22721 if (c == '@') {
22722 return tUPLUS;
22723 }
22724 pushback(p, c);
22725 return '+';
22726 }
22727 if (c == '=') {
22728 set_yylval_id('+');
22729 SET_LEX_STATE(EXPR_BEG);
22730 return tOP_ASGN;
22731 }
22732 if (IS_BEG() || (IS_SPCARG(c) && arg_ambiguous(p, '+'))) {
22733 SET_LEX_STATE(EXPR_BEG);
22734 pushback(p, c);
22735 if (c != -1 && ISDIGIT(c)) {
22736 return parse_numeric(p, '+');
22737 }
22738 return tUPLUS;
22739 }
22740 SET_LEX_STATE(EXPR_BEG);
22741 pushback(p, c);
22742 return warn_balanced('+', "+", "unary operator");
22743
22744 case '-':
22745 c = nextc(p);
22746 if (IS_AFTER_OPERATOR()) {
22747 SET_LEX_STATE(EXPR_ARG);
22748 if (c == '@') {
22749 return tUMINUS;
22750 }
22751 pushback(p, c);
22752 return '-';
22753 }
22754 if (c == '=') {
22755 set_yylval_id('-');
22756 SET_LEX_STATE(EXPR_BEG);
22757 return tOP_ASGN;
22758 }
22759 if (c == '>') {
22760 SET_LEX_STATE(EXPR_ENDFN);
22761 yylval.num = p->lex.lpar_beg;
22762 p->lex.lpar_beg = p->lex.paren_nest;
22763 return tLAMBDA;
22764 }
22765 if (IS_BEG() || (IS_SPCARG(c) && arg_ambiguous(p, '-'))) {
22766 SET_LEX_STATE(EXPR_BEG);
22767 pushback(p, c);
22768 if (c != -1 && ISDIGIT(c)) {
22769 return tUMINUS_NUM;
22770 }
22771 return tUMINUS;
22772 }
22773 SET_LEX_STATE(EXPR_BEG);
22774 pushback(p, c);
22775 return warn_balanced('-', "-", "unary operator");
22776
22777 case '.': {
22778 int is_beg = IS_BEG();
22779 SET_LEX_STATE(EXPR_BEG);
22780 if ((c = nextc(p)) == '.') {
22781 if ((c = nextc(p)) == '.') {
22782 if (p->ctxt.in_argdef || IS_LABEL_POSSIBLE()) {
22783 SET_LEX_STATE(EXPR_ENDARG);
22784 return tBDOT3;
22785 }
22786 if (p->lex.paren_nest == 0 && looking_at_eol_p(p)) {
22787 rb_warn0("... at EOL, should be parenthesized?");
22788 }
22789 return is_beg ? tBDOT3 : tDOT3;
22790 }
22791 pushback(p, c);
22792 return is_beg ? tBDOT2 : tDOT2;
22793 }
22794 pushback(p, c);
22795 if (c != -1 && ISDIGIT(c)) {
22796 char prev = p->lex.pcur-1 > p->lex.pbeg ? *(p->lex.pcur-2) : 0;
22797 parse_numeric(p, '.');
22798 if (ISDIGIT(prev)) {
22799 yyerror0("unexpected fraction part after numeric literal");
22800 }
22801 else {
22802 yyerror0("no .<digit> floating literal anymore; put 0 before dot");
22803 }
22804 SET_LEX_STATE(EXPR_END);
22805 p->lex.ptok = p->lex.pcur;
22806 goto retry;
22807 }
22808 set_yylval_id('.');
22809 SET_LEX_STATE(EXPR_DOT);
22810 return '.';
22811 }
22812
22813 case '0': case '1': case '2': case '3': case '4':
22814 case '5': case '6': case '7': case '8': case '9':
22815 return parse_numeric(p, c);
22816
22817 case ')':
22818 COND_POP();
22819 CMDARG_POP();
22820 SET_LEX_STATE(EXPR_ENDFN);
22821 p->lex.paren_nest--;
22822 return c;
22823
22824 case ']':
22825 COND_POP();
22826 CMDARG_POP();
22827 SET_LEX_STATE(EXPR_END);
22828 p->lex.paren_nest--;
22829 return c;
22830
22831 case '}':
22832 /* tSTRING_DEND does COND_POP and CMDARG_POP in the yacc's rule */
22833 if (!p->lex.brace_nest--) return tSTRING_DEND;
22834 COND_POP();
22835 CMDARG_POP();
22836 SET_LEX_STATE(EXPR_END);
22837 p->lex.paren_nest--;
22838 return c;
22839
22840 case ':':
22841 c = nextc(p);
22842 if (c == ':') {
22843 if (IS_BEG() || IS_lex_state(EXPR_CLASS) || IS_SPCARG(-1)) {
22844 SET_LEX_STATE(EXPR_BEG);
22845 return tCOLON3;
22846 }
22847 set_yylval_id(idCOLON2);
22848 SET_LEX_STATE(EXPR_DOT);
22849 return tCOLON2;
22850 }
22851 if (IS_END() || ISSPACE(c) || c == '#') {
22852 pushback(p, c);
22853 c = warn_balanced(':', ":", "symbol literal");
22854 SET_LEX_STATE(EXPR_BEG);
22855 return c;
22856 }
22857 switch (c) {
22858 case '\'':
22859 p->lex.strterm = NEW_STRTERM(str_ssym, c, 0);
22860 break;
22861 case '"':
22862 p->lex.strterm = NEW_STRTERM(str_dsym, c, 0);
22863 break;
22864 default:
22865 pushback(p, c);
22866 break;
22867 }
22868 SET_LEX_STATE(EXPR_FNAME);
22869 return tSYMBEG;
22870
22871 case '/':
22872 if (IS_BEG()) {
22873 p->lex.strterm = NEW_STRTERM(str_regexp, '/', 0);
22874 return tREGEXP_BEG;
22875 }
22876 if ((c = nextc(p)) == '=') {
22877 set_yylval_id('/');
22878 SET_LEX_STATE(EXPR_BEG);
22879 return tOP_ASGN;
22880 }
22881 pushback(p, c);
22882 if (IS_SPCARG(c)) {
22883 p->lex.strterm = NEW_STRTERM(str_regexp, '/', 0);
22884 return tREGEXP_BEG;
22885 }
22886 SET_LEX_STATE(IS_AFTER_OPERATOR() ? EXPR_ARG : EXPR_BEG);
22887 return warn_balanced('/', "/", "regexp literal");
22888
22889 case '^':
22890 if ((c = nextc(p)) == '=') {
22891 set_yylval_id('^');
22892 SET_LEX_STATE(EXPR_BEG);
22893 return tOP_ASGN;
22894 }
22895 SET_LEX_STATE(IS_AFTER_OPERATOR() ? EXPR_ARG : EXPR_BEG);
22896 pushback(p, c);
22897 return '^';
22898
22899 case ';':
22900 SET_LEX_STATE(EXPR_BEG);
22901 p->command_start = TRUE;
22902 return ';';
22903
22904 case ',':
22905 SET_LEX_STATE(EXPR_BEG|EXPR_LABEL);
22906 return ',';
22907
22908 case '~':
22909 if (IS_AFTER_OPERATOR()) {
22910 if ((c = nextc(p)) != '@') {
22911 pushback(p, c);
22912 }
22913 SET_LEX_STATE(EXPR_ARG);
22914 }
22915 else {
22916 SET_LEX_STATE(EXPR_BEG);
22917 }
22918 return '~';
22919
22920 case '(':
22921 if (IS_BEG()) {
22922 c = tLPAREN;
22923 }
22924 else if (!space_seen) {
22925 /* foo( ... ) => method call, no ambiguity */
22926 }
22927 else if (IS_ARG() || IS_lex_state_all(EXPR_END|EXPR_LABEL)) {
22928 c = tLPAREN_ARG;
22929 }
22930 else if (IS_lex_state(EXPR_ENDFN) && !lambda_beginning_p()) {
22931 rb_warning0("parentheses after method name is interpreted as "
22932 "an argument list, not a decomposed argument");
22933 }
22934 p->lex.paren_nest++;
22935 COND_PUSH(0);
22936 CMDARG_PUSH(0);
22937 SET_LEX_STATE(EXPR_BEG|EXPR_LABEL);
22938 return c;
22939
22940 case '[':
22941 p->lex.paren_nest++;
22942 if (IS_AFTER_OPERATOR()) {
22943 if ((c = nextc(p)) == ']') {
22944 p->lex.paren_nest--;
22945 SET_LEX_STATE(EXPR_ARG);
22946 if ((c = nextc(p)) == '=') {
22947 return tASET;
22948 }
22949 pushback(p, c);
22950 return tAREF;
22951 }
22952 pushback(p, c);
22953 SET_LEX_STATE(EXPR_ARG|EXPR_LABEL);
22954 return '[';
22955 }
22956 else if (IS_BEG()) {
22957 c = tLBRACK;
22958 }
22959 else if (IS_ARG() && (space_seen || IS_lex_state(EXPR_LABELED))) {
22960 c = tLBRACK;
22961 }
22962 SET_LEX_STATE(EXPR_BEG|EXPR_LABEL);
22963 COND_PUSH(0);
22964 CMDARG_PUSH(0);
22965 return c;
22966
22967 case '{':
22968 ++p->lex.brace_nest;
22969 if (lambda_beginning_p())
22970 c = tLAMBEG;
22971 else if (IS_lex_state(EXPR_LABELED))
22972 c = tLBRACE; /* hash */
22973 else if (IS_lex_state(EXPR_ARG_ANY | EXPR_END | EXPR_ENDFN))
22974 c = '{'; /* block (primary) */
22975 else if (IS_lex_state(EXPR_ENDARG))
22976 c = tLBRACE_ARG; /* block (expr) */
22977 else
22978 c = tLBRACE; /* hash */
22979 if (c != tLBRACE) {
22980 p->command_start = TRUE;
22981 SET_LEX_STATE(EXPR_BEG);
22982 }
22983 else {
22984 SET_LEX_STATE(EXPR_BEG|EXPR_LABEL);
22985 }
22986 ++p->lex.paren_nest; /* after lambda_beginning_p() */
22987 COND_PUSH(0);
22988 CMDARG_PUSH(0);
22989 return c;
22990
22991 case '\\':
22992 c = nextc(p);
22993 if (c == '\n') {
22994 space_seen = 1;
22995 dispatch_scan_event(p, tSP);
22996 goto retry; /* skip \\n */
22997 }
22998 if (c == ' ') return tSP;
22999 if (ISSPACE(c)) return c;
23000 pushback(p, c);
23001 return '\\';
23002
23003 case '%':
23004 return parse_percent(p, space_seen, last_state);
23005
23006 case '$':
23007 return parse_gvar(p, last_state);
23008
23009 case '@':
23010 return parse_atmark(p, last_state);
23011
23012 case '_':
23013 if (was_bol(p) && whole_match_p(p, "__END__", 7, 0)) {
23014 p->ruby__end__seen = 1;
23015 p->eofp = 1;
23016#ifdef RIPPER
23017 lex_goto_eol(p);
23018 dispatch_scan_event(p, k__END__);
23019#endif
23020 return END_OF_INPUT;
23021 }
23022 newtok(p);
23023 break;
23024
23025 default:
23026 if (!parser_is_identchar(p)) {
23027 compile_error(p, "Invalid char '\\x%02X' in expression", c);
23028 token_flush(p);
23029 goto retry;
23030 }
23031
23032 newtok(p);
23033 break;
23034 }
23035
23036 return parse_ident(p, c, cmd_state);
23037}
23038
23039static enum yytokentype
23040yylex(YYSTYPE *lval, YYLTYPE *yylloc, struct parser_params *p)
23041{
23042 enum yytokentype t;
23043
23044 p->lval = lval;
23045 lval->node = 0;
23046 p->yylloc = yylloc;
23047
23048 t = parser_yylex(p);
23049
23050 if (has_delayed_token(p))
23051 dispatch_delayed_token(p, t);
23052 else if (t != END_OF_INPUT)
23053 dispatch_scan_event(p, t);
23054
23055 return t;
23056}
23057
23058#define LVAR_USED ((ID)1 << (sizeof(ID) * CHAR_BIT - 1))
23059
23060static NODE*
23061node_new_internal(struct parser_params *p, enum node_type type, size_t size, size_t alignment)
23062{
23063 NODE *n = rb_ast_newnode(p->ast, type, size, alignment);
23064
23065 rb_node_init(n, type);
23066 return n;
23067}
23068
23069static NODE *
23070nd_set_loc(NODE *nd, const YYLTYPE *loc)
23071{
23072 nd->nd_loc = *loc;
23073 nd_set_line(nd, loc->beg_pos.lineno);
23074 return nd;
23075}
23076
23077static NODE*
23078node_newnode(struct parser_params *p, enum node_type type, size_t size, size_t alignment, const rb_code_location_t *loc)
23079{
23080 NODE *n = node_new_internal(p, type, size, alignment);
23081
23082 nd_set_loc(n, loc);
23083 nd_set_node_id(n, parser_get_node_id(p));
23084 return n;
23085}
23086
23087#define NODE_NEWNODE(node_type, type, loc) (type *)(node_newnode(p, node_type, sizeof(type), RUBY_ALIGNOF(type), loc))
23088
23089static rb_node_scope_t *
23090rb_node_scope_new(struct parser_params *p, rb_node_args_t *nd_args, NODE *nd_body, NODE *nd_parent, const YYLTYPE *loc)
23091{
23092 rb_ast_id_table_t *nd_tbl;
23093 nd_tbl = local_tbl(p);
23094 rb_node_scope_t *n = NODE_NEWNODE(NODE_SCOPE, rb_node_scope_t, loc);
23095 n->nd_tbl = nd_tbl;
23096 n->nd_body = nd_body;
23097 n->nd_parent = nd_parent;
23098 n->nd_args = nd_args;
23099
23100 return n;
23101}
23102
23103static rb_node_scope_t *
23104rb_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)
23105{
23106 rb_node_scope_t *n = NODE_NEWNODE(NODE_SCOPE, rb_node_scope_t, loc);
23107 n->nd_tbl = nd_tbl;
23108 n->nd_body = nd_body;
23109 n->nd_parent = nd_parent;
23110 n->nd_args = nd_args;
23111
23112 return n;
23113}
23114
23115static rb_node_defn_t *
23116rb_node_defn_new(struct parser_params *p, ID nd_mid, NODE *nd_defn, const YYLTYPE *loc)
23117{
23118 rb_node_defn_t *n = NODE_NEWNODE(NODE_DEFN, rb_node_defn_t, loc);
23119 n->nd_mid = nd_mid;
23120 n->nd_defn = nd_defn;
23121
23122 return n;
23123}
23124
23125static rb_node_defs_t *
23126rb_node_defs_new(struct parser_params *p, NODE *nd_recv, ID nd_mid, NODE *nd_defn, const YYLTYPE *loc)
23127{
23128 rb_node_defs_t *n = NODE_NEWNODE(NODE_DEFS, rb_node_defs_t, loc);
23129 n->nd_recv = nd_recv;
23130 n->nd_mid = nd_mid;
23131 n->nd_defn = nd_defn;
23132
23133 return n;
23134}
23135
23136static rb_node_block_t *
23137rb_node_block_new(struct parser_params *p, NODE *nd_head, const YYLTYPE *loc)
23138{
23139 rb_node_block_t *n = NODE_NEWNODE(NODE_BLOCK, rb_node_block_t, loc);
23140 n->nd_head = nd_head;
23141 n->nd_end = (NODE *)n;
23142 n->nd_next = 0;
23143
23144 return n;
23145}
23146
23147static rb_node_for_t *
23148rb_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)
23149{
23150 rb_node_for_t *n = NODE_NEWNODE(NODE_FOR, rb_node_for_t, loc);
23151 n->nd_body = nd_body;
23152 n->nd_iter = nd_iter;
23153 n->for_keyword_loc = *for_keyword_loc;
23154 n->in_keyword_loc = *in_keyword_loc;
23155 n->do_keyword_loc = *do_keyword_loc;
23156 n->end_keyword_loc = *end_keyword_loc;
23157
23158 return n;
23159}
23160
23161static rb_node_for_masgn_t *
23162rb_node_for_masgn_new(struct parser_params *p, NODE *nd_var, const YYLTYPE *loc)
23163{
23164 rb_node_for_masgn_t *n = NODE_NEWNODE(NODE_FOR_MASGN, rb_node_for_masgn_t, loc);
23165 n->nd_var = nd_var;
23166
23167 return n;
23168}
23169
23170static rb_node_retry_t *
23171rb_node_retry_new(struct parser_params *p, const YYLTYPE *loc)
23172{
23173 rb_node_retry_t *n = NODE_NEWNODE(NODE_RETRY, rb_node_retry_t, loc);
23174
23175 return n;
23176}
23177
23178static rb_node_begin_t *
23179rb_node_begin_new(struct parser_params *p, NODE *nd_body, const YYLTYPE *loc)
23180{
23181 rb_node_begin_t *n = NODE_NEWNODE(NODE_BEGIN, rb_node_begin_t, loc);
23182 n->nd_body = nd_body;
23183
23184 return n;
23185}
23186
23187static rb_node_rescue_t *
23188rb_node_rescue_new(struct parser_params *p, NODE *nd_head, NODE *nd_resq, NODE *nd_else, const YYLTYPE *loc)
23189{
23190 rb_node_rescue_t *n = NODE_NEWNODE(NODE_RESCUE, rb_node_rescue_t, loc);
23191 n->nd_head = nd_head;
23192 n->nd_resq = nd_resq;
23193 n->nd_else = nd_else;
23194
23195 return n;
23196}
23197
23198static rb_node_resbody_t *
23199rb_node_resbody_new(struct parser_params *p, NODE *nd_args, NODE *nd_exc_var, NODE *nd_body, NODE *nd_next, const YYLTYPE *loc)
23200{
23201 rb_node_resbody_t *n = NODE_NEWNODE(NODE_RESBODY, rb_node_resbody_t, loc);
23202 n->nd_args = nd_args;
23203 n->nd_exc_var = nd_exc_var;
23204 n->nd_body = nd_body;
23205 n->nd_next = nd_next;
23206
23207 return n;
23208}
23209
23210static rb_node_ensure_t *
23211rb_node_ensure_new(struct parser_params *p, NODE *nd_head, NODE *nd_ensr, const YYLTYPE *loc)
23212{
23213 rb_node_ensure_t *n = NODE_NEWNODE(NODE_ENSURE, rb_node_ensure_t, loc);
23214 n->nd_head = nd_head;
23215 n->nd_ensr = nd_ensr;
23216
23217 return n;
23218}
23219
23220static rb_node_and_t *
23221rb_node_and_new(struct parser_params *p, NODE *nd_1st, NODE *nd_2nd, const YYLTYPE *loc, const YYLTYPE *operator_loc)
23222{
23223 rb_node_and_t *n = NODE_NEWNODE(NODE_AND, rb_node_and_t, loc);
23224 n->nd_1st = nd_1st;
23225 n->nd_2nd = nd_2nd;
23226 n->operator_loc = *operator_loc;
23227
23228 return n;
23229}
23230
23231static rb_node_or_t *
23232rb_node_or_new(struct parser_params *p, NODE *nd_1st, NODE *nd_2nd, const YYLTYPE *loc, const YYLTYPE *operator_loc)
23233{
23234 rb_node_or_t *n = NODE_NEWNODE(NODE_OR, rb_node_or_t, loc);
23235 n->nd_1st = nd_1st;
23236 n->nd_2nd = nd_2nd;
23237 n->operator_loc = *operator_loc;
23238
23239 return n;
23240}
23241
23242static rb_node_return_t *
23243rb_node_return_new(struct parser_params *p, NODE *nd_stts, const YYLTYPE *loc, const YYLTYPE *keyword_loc)
23244{
23245 rb_node_return_t *n = NODE_NEWNODE(NODE_RETURN, rb_node_return_t, loc);
23246 n->nd_stts = nd_stts;
23247 n->keyword_loc = *keyword_loc;
23248 return n;
23249}
23250
23251static rb_node_yield_t *
23252rb_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)
23253{
23254 if (nd_head) no_blockarg(p, nd_head);
23255
23256 rb_node_yield_t *n = NODE_NEWNODE(NODE_YIELD, rb_node_yield_t, loc);
23257 n->nd_head = nd_head;
23258 n->keyword_loc = *keyword_loc;
23259 n->lparen_loc = *lparen_loc;
23260 n->rparen_loc = *rparen_loc;
23261
23262 return n;
23263}
23264
23265static rb_node_if_t *
23266rb_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)
23267{
23268 rb_node_if_t *n = NODE_NEWNODE(NODE_IF, rb_node_if_t, loc);
23269 n->nd_cond = nd_cond;
23270 n->nd_body = nd_body;
23271 n->nd_else = nd_else;
23272 n->if_keyword_loc = *if_keyword_loc;
23273 n->then_keyword_loc = *then_keyword_loc;
23274 n->end_keyword_loc = *end_keyword_loc;
23275
23276 return n;
23277}
23278
23279static rb_node_unless_t *
23280rb_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)
23281{
23282 rb_node_unless_t *n = NODE_NEWNODE(NODE_UNLESS, rb_node_unless_t, loc);
23283 n->nd_cond = nd_cond;
23284 n->nd_body = nd_body;
23285 n->nd_else = nd_else;
23286 n->keyword_loc = *keyword_loc;
23287 n->then_keyword_loc = *then_keyword_loc;
23288 n->end_keyword_loc = *end_keyword_loc;
23289
23290 return n;
23291}
23292
23293static rb_node_class_t *
23294rb_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)
23295{
23296 /* Keep the order of node creation */
23297 NODE *scope = NEW_SCOPE(0, nd_body, NULL, loc);
23298 rb_node_class_t *n = NODE_NEWNODE(NODE_CLASS, rb_node_class_t, loc);
23299 RNODE_SCOPE(scope)->nd_parent = &n->node;
23300 n->nd_cpath = nd_cpath;
23301 n->nd_body = scope;
23302 n->nd_super = nd_super;
23303 n->class_keyword_loc = *class_keyword_loc;
23304 n->inheritance_operator_loc = *inheritance_operator_loc;
23305 n->end_keyword_loc = *end_keyword_loc;
23306
23307 return n;
23308}
23309
23310static rb_node_sclass_t *
23311rb_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)
23312{
23313 /* Keep the order of node creation */
23314 NODE *scope = NEW_SCOPE(0, nd_body, NULL, loc);
23315 rb_node_sclass_t *n = NODE_NEWNODE(NODE_SCLASS, rb_node_sclass_t, loc);
23316 RNODE_SCOPE(scope)->nd_parent = &n->node;
23317 n->nd_recv = nd_recv;
23318 n->nd_body = scope;
23319 n->class_keyword_loc = *class_keyword_loc;
23320 n->operator_loc = *operator_loc;
23321 n->end_keyword_loc = *end_keyword_loc;
23322
23323 return n;
23324}
23325
23326static rb_node_module_t *
23327rb_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)
23328{
23329 /* Keep the order of node creation */
23330 NODE *scope = NEW_SCOPE(0, nd_body, NULL, loc);
23331 rb_node_module_t *n = NODE_NEWNODE(NODE_MODULE, rb_node_module_t, loc);
23332 RNODE_SCOPE(scope)->nd_parent = &n->node;
23333 n->nd_cpath = nd_cpath;
23334 n->nd_body = scope;
23335 n->module_keyword_loc = *module_keyword_loc;
23336 n->end_keyword_loc = *end_keyword_loc;
23337
23338 return n;
23339}
23340
23341static rb_node_iter_t *
23342rb_node_iter_new(struct parser_params *p, rb_node_args_t *nd_args, NODE *nd_body, const YYLTYPE *loc)
23343{
23344 /* Keep the order of node creation */
23345 NODE *scope = NEW_SCOPE(nd_args, nd_body, NULL, loc);
23346 rb_node_iter_t *n = NODE_NEWNODE(NODE_ITER, rb_node_iter_t, loc);
23347 RNODE_SCOPE(scope)->nd_parent = &n->node;
23348 n->nd_body = scope;
23349 n->nd_iter = 0;
23350
23351 return n;
23352}
23353
23354static rb_node_lambda_t *
23355rb_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)
23356{
23357 /* Keep the order of node creation */
23358 NODE *scope = NEW_SCOPE(nd_args, nd_body, NULL, loc);
23359 YYLTYPE lambda_loc = code_loc_gen(operator_loc, closing_loc);
23360 rb_node_lambda_t *n = NODE_NEWNODE(NODE_LAMBDA, rb_node_lambda_t, &lambda_loc);
23361 RNODE_SCOPE(scope)->nd_parent = &n->node;
23362 n->nd_body = scope;
23363 n->operator_loc = *operator_loc;
23364 n->opening_loc = *opening_loc;
23365 n->closing_loc = *closing_loc;
23366
23367 return n;
23368}
23369
23370static rb_node_case_t *
23371rb_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)
23372{
23373 rb_node_case_t *n = NODE_NEWNODE(NODE_CASE, rb_node_case_t, loc);
23374 n->nd_head = nd_head;
23375 n->nd_body = nd_body;
23376 n->case_keyword_loc = *case_keyword_loc;
23377 n->end_keyword_loc = *end_keyword_loc;
23378
23379 return n;
23380}
23381
23382static rb_node_case2_t *
23383rb_node_case2_new(struct parser_params *p, NODE *nd_body, const YYLTYPE *loc, const YYLTYPE *case_keyword_loc, const YYLTYPE *end_keyword_loc)
23384{
23385 rb_node_case2_t *n = NODE_NEWNODE(NODE_CASE2, rb_node_case2_t, loc);
23386 n->nd_head = 0;
23387 n->nd_body = nd_body;
23388 n->case_keyword_loc = *case_keyword_loc;
23389 n->end_keyword_loc = *end_keyword_loc;
23390
23391 return n;
23392}
23393
23394static rb_node_case3_t *
23395rb_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)
23396{
23397 rb_node_case3_t *n = NODE_NEWNODE(NODE_CASE3, rb_node_case3_t, loc);
23398 n->nd_head = nd_head;
23399 n->nd_body = nd_body;
23400 n->case_keyword_loc = *case_keyword_loc;
23401 n->end_keyword_loc = *end_keyword_loc;
23402
23403 return n;
23404}
23405
23406static rb_node_when_t *
23407rb_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)
23408{
23409 rb_node_when_t *n = NODE_NEWNODE(NODE_WHEN, rb_node_when_t, loc);
23410 n->nd_head = nd_head;
23411 n->nd_body = nd_body;
23412 n->nd_next = nd_next;
23413 n->keyword_loc = *keyword_loc;
23414 n->then_keyword_loc = *then_keyword_loc;
23415
23416 return n;
23417}
23418
23419static rb_node_in_t *
23420rb_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)
23421{
23422 rb_node_in_t *n = NODE_NEWNODE(NODE_IN, rb_node_in_t, loc);
23423 n->nd_head = nd_head;
23424 n->nd_body = nd_body;
23425 n->nd_next = nd_next;
23426 n->in_keyword_loc = *in_keyword_loc;
23427 n->then_keyword_loc = *then_keyword_loc;
23428 n->operator_loc = *operator_loc;
23429
23430 return n;
23431}
23432
23433static rb_node_while_t *
23434rb_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)
23435{
23436 rb_node_while_t *n = NODE_NEWNODE(NODE_WHILE, rb_node_while_t, loc);
23437 n->nd_cond = nd_cond;
23438 n->nd_body = nd_body;
23439 n->nd_state = nd_state;
23440 n->keyword_loc = *keyword_loc;
23441 n->closing_loc = *closing_loc;
23442
23443 return n;
23444}
23445
23446static rb_node_until_t *
23447rb_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)
23448{
23449 rb_node_until_t *n = NODE_NEWNODE(NODE_UNTIL, rb_node_until_t, loc);
23450 n->nd_cond = nd_cond;
23451 n->nd_body = nd_body;
23452 n->nd_state = nd_state;
23453 n->keyword_loc = *keyword_loc;
23454 n->closing_loc = *closing_loc;
23455
23456 return n;
23457}
23458
23459static rb_node_colon2_t *
23460rb_node_colon2_new(struct parser_params *p, NODE *nd_head, ID nd_mid, const YYLTYPE *loc, const YYLTYPE *delimiter_loc, const YYLTYPE *name_loc)
23461{
23462 rb_node_colon2_t *n = NODE_NEWNODE(NODE_COLON2, rb_node_colon2_t, loc);
23463 n->nd_head = nd_head;
23464 n->nd_mid = nd_mid;
23465 n->delimiter_loc = *delimiter_loc;
23466 n->name_loc = *name_loc;
23467
23468 return n;
23469}
23470
23471static rb_node_colon3_t *
23472rb_node_colon3_new(struct parser_params *p, ID nd_mid, const YYLTYPE *loc, const YYLTYPE *delimiter_loc, const YYLTYPE *name_loc)
23473{
23474 rb_node_colon3_t *n = NODE_NEWNODE(NODE_COLON3, rb_node_colon3_t, loc);
23475 n->nd_mid = nd_mid;
23476 n->delimiter_loc = *delimiter_loc;
23477 n->name_loc = *name_loc;
23478
23479 return n;
23480}
23481
23482static rb_node_dot2_t *
23483rb_node_dot2_new(struct parser_params *p, NODE *nd_beg, NODE *nd_end, const YYLTYPE *loc, const YYLTYPE *operator_loc)
23484{
23485 rb_node_dot2_t *n = NODE_NEWNODE(NODE_DOT2, rb_node_dot2_t, loc);
23486 n->nd_beg = nd_beg;
23487 n->nd_end = nd_end;
23488 n->operator_loc = *operator_loc;
23489
23490 return n;
23491}
23492
23493static rb_node_dot3_t *
23494rb_node_dot3_new(struct parser_params *p, NODE *nd_beg, NODE *nd_end, const YYLTYPE *loc, const YYLTYPE *operator_loc)
23495{
23496 rb_node_dot3_t *n = NODE_NEWNODE(NODE_DOT3, rb_node_dot3_t, loc);
23497 n->nd_beg = nd_beg;
23498 n->nd_end = nd_end;
23499 n->operator_loc = *operator_loc;
23500
23501 return n;
23502}
23503
23504static rb_node_self_t *
23505rb_node_self_new(struct parser_params *p, const YYLTYPE *loc)
23506{
23507 rb_node_self_t *n = NODE_NEWNODE(NODE_SELF, rb_node_self_t, loc);
23508 n->nd_state = 1;
23509
23510 return n;
23511}
23512
23513static rb_node_nil_t *
23514rb_node_nil_new(struct parser_params *p, const YYLTYPE *loc)
23515{
23516 rb_node_nil_t *n = NODE_NEWNODE(NODE_NIL, rb_node_nil_t, loc);
23517
23518 return n;
23519}
23520
23521static rb_node_true_t *
23522rb_node_true_new(struct parser_params *p, const YYLTYPE *loc)
23523{
23524 rb_node_true_t *n = NODE_NEWNODE(NODE_TRUE, rb_node_true_t, loc);
23525
23526 return n;
23527}
23528
23529static rb_node_false_t *
23530rb_node_false_new(struct parser_params *p, const YYLTYPE *loc)
23531{
23532 rb_node_false_t *n = NODE_NEWNODE(NODE_FALSE, rb_node_false_t, loc);
23533
23534 return n;
23535}
23536
23537static rb_node_super_t *
23538rb_node_super_new(struct parser_params *p, NODE *nd_args, const YYLTYPE *loc,
23539 const YYLTYPE *keyword_loc, const YYLTYPE *lparen_loc, const YYLTYPE *rparen_loc)
23540{
23541 rb_node_super_t *n = NODE_NEWNODE(NODE_SUPER, rb_node_super_t, loc);
23542 n->nd_args = nd_args;
23543 n->keyword_loc = *keyword_loc;
23544 n->lparen_loc = *lparen_loc;
23545 n->rparen_loc = *rparen_loc;
23546
23547 return n;
23548}
23549
23550static rb_node_zsuper_t *
23551rb_node_zsuper_new(struct parser_params *p, const YYLTYPE *loc)
23552{
23553 rb_node_zsuper_t *n = NODE_NEWNODE(NODE_ZSUPER, rb_node_zsuper_t, loc);
23554
23555 return n;
23556}
23557
23558static rb_node_match2_t *
23559rb_node_match2_new(struct parser_params *p, NODE *nd_recv, NODE *nd_value, const YYLTYPE *loc)
23560{
23561 rb_node_match2_t *n = NODE_NEWNODE(NODE_MATCH2, rb_node_match2_t, loc);
23562 n->nd_recv = nd_recv;
23563 n->nd_value = nd_value;
23564 n->nd_args = 0;
23565
23566 return n;
23567}
23568
23569static rb_node_match3_t *
23570rb_node_match3_new(struct parser_params *p, NODE *nd_recv, NODE *nd_value, const YYLTYPE *loc)
23571{
23572 rb_node_match3_t *n = NODE_NEWNODE(NODE_MATCH3, rb_node_match3_t, loc);
23573 n->nd_recv = nd_recv;
23574 n->nd_value = nd_value;
23575
23576 return n;
23577}
23578
23579static rb_node_list_t *
23580rb_node_list_new(struct parser_params *p, NODE *nd_head, const YYLTYPE *loc)
23581{
23582 return rb_node_list_new2(p, nd_head, 1, 0, loc);
23583}
23584
23585static rb_node_list_t *
23586rb_node_list_new2(struct parser_params *p, NODE *nd_head, long nd_alen, NODE *nd_next, const YYLTYPE *loc)
23587{
23588 rb_node_list_t *n = NODE_NEWNODE(NODE_LIST, rb_node_list_t, loc);
23589 n->nd_head = nd_head;
23590 n->as.nd_alen = nd_alen;
23591 n->nd_next = nd_next;
23592
23593 return n;
23594}
23595
23596static rb_node_zlist_t *
23597rb_node_zlist_new(struct parser_params *p, const YYLTYPE *loc)
23598{
23599 rb_node_zlist_t *n = NODE_NEWNODE(NODE_ZLIST, rb_node_zlist_t, loc);
23600
23601 return n;
23602}
23603
23604static rb_node_hash_t *
23605rb_node_hash_new(struct parser_params *p, NODE *nd_head, const YYLTYPE *loc)
23606{
23607 rb_node_hash_t *n = NODE_NEWNODE(NODE_HASH, rb_node_hash_t, loc);
23608 n->nd_head = nd_head;
23609 n->nd_brace = 0;
23610
23611 return n;
23612}
23613
23614static rb_node_masgn_t *
23615rb_node_masgn_new(struct parser_params *p, NODE *nd_head, NODE *nd_args, const YYLTYPE *loc)
23616{
23617 rb_node_masgn_t *n = NODE_NEWNODE(NODE_MASGN, rb_node_masgn_t, loc);
23618 n->nd_head = nd_head;
23619 n->nd_value = 0;
23620 n->nd_args = nd_args;
23621
23622 return n;
23623}
23624
23625static rb_node_gasgn_t *
23626rb_node_gasgn_new(struct parser_params *p, ID nd_vid, NODE *nd_value, const YYLTYPE *loc)
23627{
23628 rb_node_gasgn_t *n = NODE_NEWNODE(NODE_GASGN, rb_node_gasgn_t, loc);
23629 n->nd_vid = nd_vid;
23630 n->nd_value = nd_value;
23631
23632 return n;
23633}
23634
23635static rb_node_lasgn_t *
23636rb_node_lasgn_new(struct parser_params *p, ID nd_vid, NODE *nd_value, const YYLTYPE *loc)
23637{
23638 rb_node_lasgn_t *n = NODE_NEWNODE(NODE_LASGN, rb_node_lasgn_t, loc);
23639 n->nd_vid = nd_vid;
23640 n->nd_value = nd_value;
23641
23642 return n;
23643}
23644
23645static rb_node_dasgn_t *
23646rb_node_dasgn_new(struct parser_params *p, ID nd_vid, NODE *nd_value, const YYLTYPE *loc)
23647{
23648 rb_node_dasgn_t *n = NODE_NEWNODE(NODE_DASGN, rb_node_dasgn_t, loc);
23649 n->nd_vid = nd_vid;
23650 n->nd_value = nd_value;
23651
23652 return n;
23653}
23654
23655static rb_node_iasgn_t *
23656rb_node_iasgn_new(struct parser_params *p, ID nd_vid, NODE *nd_value, const YYLTYPE *loc)
23657{
23658 rb_node_iasgn_t *n = NODE_NEWNODE(NODE_IASGN, rb_node_iasgn_t, loc);
23659 n->nd_vid = nd_vid;
23660 n->nd_value = nd_value;
23661
23662 return n;
23663}
23664
23665static rb_node_cvasgn_t *
23666rb_node_cvasgn_new(struct parser_params *p, ID nd_vid, NODE *nd_value, const YYLTYPE *loc)
23667{
23668 rb_node_cvasgn_t *n = NODE_NEWNODE(NODE_CVASGN, rb_node_cvasgn_t, loc);
23669 n->nd_vid = nd_vid;
23670 n->nd_value = nd_value;
23671
23672 return n;
23673}
23674
23675static rb_node_op_asgn1_t *
23676rb_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)
23677{
23678 rb_node_op_asgn1_t *n = NODE_NEWNODE(NODE_OP_ASGN1, rb_node_op_asgn1_t, loc);
23679 n->nd_recv = nd_recv;
23680 n->nd_mid = nd_mid;
23681 n->nd_index = index;
23682 n->nd_rvalue = rvalue;
23683 n->call_operator_loc = *call_operator_loc;
23684 n->opening_loc = *opening_loc;
23685 n->closing_loc = *closing_loc;
23686 n->binary_operator_loc = *binary_operator_loc;
23687
23688 return n;
23689}
23690
23691static rb_node_op_asgn2_t *
23692rb_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)
23693{
23694 rb_node_op_asgn2_t *n = NODE_NEWNODE(NODE_OP_ASGN2, rb_node_op_asgn2_t, loc);
23695 n->nd_recv = nd_recv;
23696 n->nd_value = nd_value;
23697 n->nd_vid = nd_vid;
23698 n->nd_mid = nd_mid;
23699 n->nd_aid = nd_aid;
23700 n->call_operator_loc = *call_operator_loc;
23701 n->message_loc = *message_loc;
23702 n->binary_operator_loc = *binary_operator_loc;
23703
23704 return n;
23705}
23706
23707static rb_node_op_asgn_or_t *
23708rb_node_op_asgn_or_new(struct parser_params *p, NODE *nd_head, NODE *nd_value, const YYLTYPE *loc)
23709{
23710 rb_node_op_asgn_or_t *n = NODE_NEWNODE(NODE_OP_ASGN_OR, rb_node_op_asgn_or_t, loc);
23711 n->nd_head = nd_head;
23712 n->nd_value = nd_value;
23713
23714 return n;
23715}
23716
23717static rb_node_op_asgn_and_t *
23718rb_node_op_asgn_and_new(struct parser_params *p, NODE *nd_head, NODE *nd_value, const YYLTYPE *loc)
23719{
23720 rb_node_op_asgn_and_t *n = NODE_NEWNODE(NODE_OP_ASGN_AND, rb_node_op_asgn_and_t, loc);
23721 n->nd_head = nd_head;
23722 n->nd_value = nd_value;
23723
23724 return n;
23725}
23726
23727static rb_node_gvar_t *
23728rb_node_gvar_new(struct parser_params *p, ID nd_vid, const YYLTYPE *loc)
23729{
23730 rb_node_gvar_t *n = NODE_NEWNODE(NODE_GVAR, rb_node_gvar_t, loc);
23731 n->nd_vid = nd_vid;
23732
23733 return n;
23734}
23735
23736static rb_node_lvar_t *
23737rb_node_lvar_new(struct parser_params *p, ID nd_vid, const YYLTYPE *loc)
23738{
23739 rb_node_lvar_t *n = NODE_NEWNODE(NODE_LVAR, rb_node_lvar_t, loc);
23740 n->nd_vid = nd_vid;
23741
23742 return n;
23743}
23744
23745static rb_node_dvar_t *
23746rb_node_dvar_new(struct parser_params *p, ID nd_vid, const YYLTYPE *loc)
23747{
23748 rb_node_dvar_t *n = NODE_NEWNODE(NODE_DVAR, rb_node_dvar_t, loc);
23749 n->nd_vid = nd_vid;
23750
23751 return n;
23752}
23753
23754static rb_node_ivar_t *
23755rb_node_ivar_new(struct parser_params *p, ID nd_vid, const YYLTYPE *loc)
23756{
23757 rb_node_ivar_t *n = NODE_NEWNODE(NODE_IVAR, rb_node_ivar_t, loc);
23758 n->nd_vid = nd_vid;
23759
23760 return n;
23761}
23762
23763static rb_node_const_t *
23764rb_node_const_new(struct parser_params *p, ID nd_vid, const YYLTYPE *loc)
23765{
23766 rb_node_const_t *n = NODE_NEWNODE(NODE_CONST, rb_node_const_t, loc);
23767 n->nd_vid = nd_vid;
23768
23769 return n;
23770}
23771
23772static rb_node_cvar_t *
23773rb_node_cvar_new(struct parser_params *p, ID nd_vid, const YYLTYPE *loc)
23774{
23775 rb_node_cvar_t *n = NODE_NEWNODE(NODE_CVAR, rb_node_cvar_t, loc);
23776 n->nd_vid = nd_vid;
23777
23778 return n;
23779}
23780
23781static rb_node_nth_ref_t *
23782rb_node_nth_ref_new(struct parser_params *p, long nd_nth, const YYLTYPE *loc)
23783{
23784 rb_node_nth_ref_t *n = NODE_NEWNODE(NODE_NTH_REF, rb_node_nth_ref_t, loc);
23785 n->nd_nth = nd_nth;
23786
23787 return n;
23788}
23789
23790static rb_node_back_ref_t *
23791rb_node_back_ref_new(struct parser_params *p, long nd_nth, const YYLTYPE *loc)
23792{
23793 rb_node_back_ref_t *n = NODE_NEWNODE(NODE_BACK_REF, rb_node_back_ref_t, loc);
23794 n->nd_nth = nd_nth;
23795
23796 return n;
23797}
23798
23799static rb_node_integer_t *
23800rb_node_integer_new(struct parser_params *p, char* val, int base, const YYLTYPE *loc)
23801{
23802 rb_node_integer_t *n = NODE_NEWNODE(NODE_INTEGER, rb_node_integer_t, loc);
23803 n->val = val;
23804 n->minus = FALSE;
23805 n->base = base;
23806
23807 return n;
23808}
23809
23810static rb_node_float_t *
23811rb_node_float_new(struct parser_params *p, char* val, const YYLTYPE *loc)
23812{
23813 rb_node_float_t *n = NODE_NEWNODE(NODE_FLOAT, rb_node_float_t, loc);
23814 n->val = val;
23815 n->minus = FALSE;
23816
23817 return n;
23818}
23819
23820static rb_node_rational_t *
23821rb_node_rational_new(struct parser_params *p, char* val, int base, int seen_point, const YYLTYPE *loc)
23822{
23823 rb_node_rational_t *n = NODE_NEWNODE(NODE_RATIONAL, rb_node_rational_t, loc);
23824 n->val = val;
23825 n->minus = FALSE;
23826 n->base = base;
23827 n->seen_point = seen_point;
23828
23829 return n;
23830}
23831
23832static rb_node_imaginary_t *
23833rb_node_imaginary_new(struct parser_params *p, char* val, int base, int seen_point, enum rb_numeric_type numeric_type, const YYLTYPE *loc)
23834{
23835 rb_node_imaginary_t *n = NODE_NEWNODE(NODE_IMAGINARY, rb_node_imaginary_t, loc);
23836 n->val = val;
23837 n->minus = FALSE;
23838 n->base = base;
23839 n->seen_point = seen_point;
23840 n->type = numeric_type;
23841
23842 return n;
23843}
23844
23845static rb_node_str_t *
23846rb_node_str_new(struct parser_params *p, rb_parser_string_t *string, const YYLTYPE *loc)
23847{
23848 rb_node_str_t *n = NODE_NEWNODE(NODE_STR, rb_node_str_t, loc);
23849 n->string = string;
23850
23851 return n;
23852}
23853
23854/* TODO; Use union for NODE_DSTR2 */
23855static rb_node_dstr_t *
23856rb_node_dstr_new0(struct parser_params *p, rb_parser_string_t *string, long nd_alen, NODE *nd_next, const YYLTYPE *loc)
23857{
23858 rb_node_dstr_t *n = NODE_NEWNODE(NODE_DSTR, rb_node_dstr_t, loc);
23859 n->string = string;
23860 n->as.nd_alen = nd_alen;
23861 n->nd_next = (rb_node_list_t *)nd_next;
23862
23863 return n;
23864}
23865
23866static rb_node_dstr_t *
23867rb_node_dstr_new(struct parser_params *p, rb_parser_string_t *string, const YYLTYPE *loc)
23868{
23869 return rb_node_dstr_new0(p, string, 1, 0, loc);
23870}
23871
23872static rb_node_xstr_t *
23873rb_node_xstr_new(struct parser_params *p, rb_parser_string_t *string, const YYLTYPE *loc)
23874{
23875 rb_node_xstr_t *n = NODE_NEWNODE(NODE_XSTR, rb_node_xstr_t, loc);
23876 n->string = string;
23877
23878 return n;
23879}
23880
23881static rb_node_dxstr_t *
23882rb_node_dxstr_new(struct parser_params *p, rb_parser_string_t *string, long nd_alen, NODE *nd_next, const YYLTYPE *loc)
23883{
23884 rb_node_dxstr_t *n = NODE_NEWNODE(NODE_DXSTR, rb_node_dxstr_t, loc);
23885 n->string = string;
23886 n->as.nd_alen = nd_alen;
23887 n->nd_next = (rb_node_list_t *)nd_next;
23888
23889 return n;
23890}
23891
23892static rb_node_sym_t *
23893rb_node_sym_new(struct parser_params *p, VALUE str, const YYLTYPE *loc)
23894{
23895 rb_node_sym_t *n = NODE_NEWNODE(NODE_SYM, rb_node_sym_t, loc);
23896 n->string = rb_str_to_parser_string(p, str);
23897
23898 return n;
23899}
23900
23901static rb_node_dsym_t *
23902rb_node_dsym_new(struct parser_params *p, rb_parser_string_t *string, long nd_alen, NODE *nd_next, const YYLTYPE *loc)
23903{
23904 rb_node_dsym_t *n = NODE_NEWNODE(NODE_DSYM, rb_node_dsym_t, loc);
23905 n->string = string;
23906 n->as.nd_alen = nd_alen;
23907 n->nd_next = (rb_node_list_t *)nd_next;
23908
23909 return n;
23910}
23911
23912static rb_node_evstr_t *
23913rb_node_evstr_new(struct parser_params *p, NODE *nd_body, const YYLTYPE *loc, const YYLTYPE *opening_loc, const YYLTYPE *closing_loc)
23914{
23915 rb_node_evstr_t *n = NODE_NEWNODE(NODE_EVSTR, rb_node_evstr_t, loc);
23916 n->nd_body = nd_body;
23917 n->opening_loc = *opening_loc;
23918 n->closing_loc = *closing_loc;
23919
23920 return n;
23921}
23922
23923static rb_node_regx_t *
23924rb_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)
23925{
23926 rb_node_regx_t *n = NODE_NEWNODE(NODE_REGX, rb_node_regx_t, loc);
23927 n->string = string;
23928 n->options = options & RE_OPTION_MASK;
23929 n->opening_loc = *opening_loc;
23930 n->content_loc = *content_loc;
23931 n->closing_loc = *closing_loc;
23932
23933 return n;
23934}
23935
23936static rb_node_call_t *
23937rb_node_call_new(struct parser_params *p, NODE *nd_recv, ID nd_mid, NODE *nd_args, const YYLTYPE *loc)
23938{
23939 rb_node_call_t *n = NODE_NEWNODE(NODE_CALL, rb_node_call_t, loc);
23940 n->nd_recv = nd_recv;
23941 n->nd_mid = nd_mid;
23942 n->nd_args = nd_args;
23943
23944 return n;
23945}
23946
23947static rb_node_opcall_t *
23948rb_node_opcall_new(struct parser_params *p, NODE *nd_recv, ID nd_mid, NODE *nd_args, const YYLTYPE *loc)
23949{
23950 rb_node_opcall_t *n = NODE_NEWNODE(NODE_OPCALL, rb_node_opcall_t, loc);
23951 n->nd_recv = nd_recv;
23952 n->nd_mid = nd_mid;
23953 n->nd_args = nd_args;
23954
23955 return n;
23956}
23957
23958static rb_node_fcall_t *
23959rb_node_fcall_new(struct parser_params *p, ID nd_mid, NODE *nd_args, const YYLTYPE *loc)
23960{
23961 rb_node_fcall_t *n = NODE_NEWNODE(NODE_FCALL, rb_node_fcall_t, loc);
23962 n->nd_mid = nd_mid;
23963 n->nd_args = nd_args;
23964
23965 return n;
23966}
23967
23968static rb_node_qcall_t *
23969rb_node_qcall_new(struct parser_params *p, NODE *nd_recv, ID nd_mid, NODE *nd_args, const YYLTYPE *loc)
23970{
23971 rb_node_qcall_t *n = NODE_NEWNODE(NODE_QCALL, rb_node_qcall_t, loc);
23972 n->nd_recv = nd_recv;
23973 n->nd_mid = nd_mid;
23974 n->nd_args = nd_args;
23975
23976 return n;
23977}
23978
23979static rb_node_vcall_t *
23980rb_node_vcall_new(struct parser_params *p, ID nd_mid, const YYLTYPE *loc)
23981{
23982 rb_node_vcall_t *n = NODE_NEWNODE(NODE_VCALL, rb_node_vcall_t, loc);
23983 n->nd_mid = nd_mid;
23984
23985 return n;
23986}
23987
23988static rb_node_once_t *
23989rb_node_once_new(struct parser_params *p, NODE *nd_body, const YYLTYPE *loc)
23990{
23991 rb_node_once_t *n = NODE_NEWNODE(NODE_ONCE, rb_node_once_t, loc);
23992 n->nd_body = nd_body;
23993
23994 return n;
23995}
23996
23997static rb_node_args_t *
23998rb_node_args_new(struct parser_params *p, const YYLTYPE *loc)
23999{
24000 rb_node_args_t *n = NODE_NEWNODE(NODE_ARGS, rb_node_args_t, loc);
24001 MEMZERO(&n->nd_ainfo, struct rb_args_info, 1);
24002
24003 return n;
24004}
24005
24006static rb_node_args_aux_t *
24007rb_node_args_aux_new(struct parser_params *p, ID nd_pid, int nd_plen, const YYLTYPE *loc)
24008{
24009 rb_node_args_aux_t *n = NODE_NEWNODE(NODE_ARGS_AUX, rb_node_args_aux_t, loc);
24010 n->nd_pid = nd_pid;
24011 n->nd_plen = nd_plen;
24012 n->nd_next = 0;
24013
24014 return n;
24015}
24016
24017static rb_node_opt_arg_t *
24018rb_node_opt_arg_new(struct parser_params *p, NODE *nd_body, const YYLTYPE *loc)
24019{
24020 rb_node_opt_arg_t *n = NODE_NEWNODE(NODE_OPT_ARG, rb_node_opt_arg_t, loc);
24021 n->nd_body = nd_body;
24022 n->nd_next = 0;
24023
24024 return n;
24025}
24026
24027static rb_node_kw_arg_t *
24028rb_node_kw_arg_new(struct parser_params *p, NODE *nd_body, const YYLTYPE *loc)
24029{
24030 rb_node_kw_arg_t *n = NODE_NEWNODE(NODE_KW_ARG, rb_node_kw_arg_t, loc);
24031 n->nd_body = nd_body;
24032 n->nd_next = 0;
24033
24034 return n;
24035}
24036
24037static rb_node_postarg_t *
24038rb_node_postarg_new(struct parser_params *p, NODE *nd_1st, NODE *nd_2nd, const YYLTYPE *loc)
24039{
24040 rb_node_postarg_t *n = NODE_NEWNODE(NODE_POSTARG, rb_node_postarg_t, loc);
24041 n->nd_1st = nd_1st;
24042 n->nd_2nd = nd_2nd;
24043
24044 return n;
24045}
24046
24047static rb_node_argscat_t *
24048rb_node_argscat_new(struct parser_params *p, NODE *nd_head, NODE *nd_body, const YYLTYPE *loc)
24049{
24050 rb_node_argscat_t *n = NODE_NEWNODE(NODE_ARGSCAT, rb_node_argscat_t, loc);
24051 n->nd_head = nd_head;
24052 n->nd_body = nd_body;
24053
24054 return n;
24055}
24056
24057static rb_node_argspush_t *
24058rb_node_argspush_new(struct parser_params *p, NODE *nd_head, NODE *nd_body, const YYLTYPE *loc)
24059{
24060 rb_node_argspush_t *n = NODE_NEWNODE(NODE_ARGSPUSH, rb_node_argspush_t, loc);
24061 n->nd_head = nd_head;
24062 n->nd_body = nd_body;
24063
24064 return n;
24065}
24066
24067static rb_node_splat_t *
24068rb_node_splat_new(struct parser_params *p, NODE *nd_head, const YYLTYPE *loc, const YYLTYPE *operator_loc)
24069{
24070 rb_node_splat_t *n = NODE_NEWNODE(NODE_SPLAT, rb_node_splat_t, loc);
24071 n->nd_head = nd_head;
24072 n->operator_loc = *operator_loc;
24073
24074 return n;
24075}
24076
24077static rb_node_block_pass_t *
24078rb_node_block_pass_new(struct parser_params *p, NODE *nd_body, const YYLTYPE *loc, const YYLTYPE *operator_loc)
24079{
24080 rb_node_block_pass_t *n = NODE_NEWNODE(NODE_BLOCK_PASS, rb_node_block_pass_t, loc);
24081 n->forwarding = 0;
24082 n->nd_head = 0;
24083 n->nd_body = nd_body;
24084 n->operator_loc = *operator_loc;
24085
24086 return n;
24087}
24088
24089static rb_node_alias_t *
24090rb_node_alias_new(struct parser_params *p, NODE *nd_1st, NODE *nd_2nd, const YYLTYPE *loc, const YYLTYPE *keyword_loc)
24091{
24092 rb_node_alias_t *n = NODE_NEWNODE(NODE_ALIAS, rb_node_alias_t, loc);
24093 n->nd_1st = nd_1st;
24094 n->nd_2nd = nd_2nd;
24095 n->keyword_loc = *keyword_loc;
24096
24097 return n;
24098}
24099
24100static rb_node_valias_t *
24101rb_node_valias_new(struct parser_params *p, ID nd_alias, ID nd_orig, const YYLTYPE *loc, const YYLTYPE *keyword_loc)
24102{
24103 rb_node_valias_t *n = NODE_NEWNODE(NODE_VALIAS, rb_node_valias_t, loc);
24104 n->nd_alias = nd_alias;
24105 n->nd_orig = nd_orig;
24106 n->keyword_loc = *keyword_loc;
24107
24108 return n;
24109}
24110
24111static rb_node_undef_t *
24112rb_node_undef_new(struct parser_params *p, NODE *nd_undef, const YYLTYPE *loc)
24113{
24114 rb_node_undef_t *n = NODE_NEWNODE(NODE_UNDEF, rb_node_undef_t, loc);
24115 n->nd_undefs = rb_parser_ary_new_capa_for_node(p, 1);
24116 n->keyword_loc = NULL_LOC;
24117 rb_parser_ary_push_node(p, n->nd_undefs, nd_undef);
24118
24119 return n;
24120}
24121
24122static rb_node_errinfo_t *
24123rb_node_errinfo_new(struct parser_params *p, const YYLTYPE *loc)
24124{
24125 rb_node_errinfo_t *n = NODE_NEWNODE(NODE_ERRINFO, rb_node_errinfo_t, loc);
24126
24127 return n;
24128}
24129
24130static rb_node_defined_t *
24131rb_node_defined_new(struct parser_params *p, NODE *nd_head, const YYLTYPE *loc, const YYLTYPE *keyword_loc)
24132{
24133 rb_node_defined_t *n = NODE_NEWNODE(NODE_DEFINED, rb_node_defined_t, loc);
24134 n->nd_head = nd_head;
24135 n->keyword_loc = *keyword_loc;
24136
24137 return n;
24138}
24139
24140static rb_node_postexe_t *
24141rb_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)
24142{
24143 rb_node_postexe_t *n = NODE_NEWNODE(NODE_POSTEXE, rb_node_postexe_t, loc);
24144 n->nd_body = nd_body;
24145 n->keyword_loc = *keyword_loc;
24146 n->opening_loc = *opening_loc;
24147 n->closing_loc = *closing_loc;
24148
24149 return n;
24150}
24151
24152static rb_node_attrasgn_t *
24153rb_node_attrasgn_new(struct parser_params *p, NODE *nd_recv, ID nd_mid, NODE *nd_args, const YYLTYPE *loc)
24154{
24155 rb_node_attrasgn_t *n = NODE_NEWNODE(NODE_ATTRASGN, rb_node_attrasgn_t, loc);
24156 n->nd_recv = nd_recv;
24157 n->nd_mid = nd_mid;
24158 n->nd_args = nd_args;
24159
24160 return n;
24161}
24162
24163static rb_node_aryptn_t *
24164rb_node_aryptn_new(struct parser_params *p, NODE *pre_args, NODE *rest_arg, NODE *post_args, const YYLTYPE *loc)
24165{
24166 rb_node_aryptn_t *n = NODE_NEWNODE(NODE_ARYPTN, rb_node_aryptn_t, loc);
24167 n->nd_pconst = 0;
24168 n->pre_args = pre_args;
24169 n->rest_arg = rest_arg;
24170 n->post_args = post_args;
24171
24172 return n;
24173}
24174
24175static rb_node_hshptn_t *
24176rb_node_hshptn_new(struct parser_params *p, NODE *nd_pconst, NODE *nd_pkwargs, NODE *nd_pkwrestarg, const YYLTYPE *loc)
24177{
24178 rb_node_hshptn_t *n = NODE_NEWNODE(NODE_HSHPTN, rb_node_hshptn_t, loc);
24179 n->nd_pconst = nd_pconst;
24180 n->nd_pkwargs = nd_pkwargs;
24181 n->nd_pkwrestarg = nd_pkwrestarg;
24182
24183 return n;
24184}
24185
24186static rb_node_fndptn_t *
24187rb_node_fndptn_new(struct parser_params *p, NODE *pre_rest_arg, NODE *args, NODE *post_rest_arg, const YYLTYPE *loc)
24188{
24189 rb_node_fndptn_t *n = NODE_NEWNODE(NODE_FNDPTN, rb_node_fndptn_t, loc);
24190 n->nd_pconst = 0;
24191 n->pre_rest_arg = pre_rest_arg;
24192 n->args = args;
24193 n->post_rest_arg = post_rest_arg;
24194
24195 return n;
24196}
24197
24198static rb_node_line_t *
24199rb_node_line_new(struct parser_params *p, const YYLTYPE *loc)
24200{
24201 rb_node_line_t *n = NODE_NEWNODE(NODE_LINE, rb_node_line_t, loc);
24202
24203 return n;
24204}
24205
24206static rb_node_file_t *
24207rb_node_file_new(struct parser_params *p, VALUE str, const YYLTYPE *loc)
24208{
24209 rb_node_file_t *n = NODE_NEWNODE(NODE_FILE, rb_node_file_t, loc);
24210 n->path = rb_str_to_parser_string(p, str);
24211
24212 return n;
24213}
24214
24215static rb_node_encoding_t *
24216rb_node_encoding_new(struct parser_params *p, const YYLTYPE *loc)
24217{
24218 rb_node_encoding_t *n = NODE_NEWNODE(NODE_ENCODING, rb_node_encoding_t, loc);
24219 n->enc = p->enc;
24220
24221 return n;
24222}
24223
24224static rb_node_cdecl_t *
24225rb_node_cdecl_new(struct parser_params *p, ID nd_vid, NODE *nd_value, NODE *nd_else, enum rb_parser_shareability shareability, const YYLTYPE *loc)
24226{
24227 rb_node_cdecl_t *n = NODE_NEWNODE(NODE_CDECL, rb_node_cdecl_t, loc);
24228 n->nd_vid = nd_vid;
24229 n->nd_value = nd_value;
24230 n->nd_else = nd_else;
24231 n->shareability = shareability;
24232
24233 return n;
24234}
24235
24236static rb_node_op_cdecl_t *
24237rb_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)
24238{
24239 rb_node_op_cdecl_t *n = NODE_NEWNODE(NODE_OP_CDECL, rb_node_op_cdecl_t, loc);
24240 n->nd_head = nd_head;
24241 n->nd_value = nd_value;
24242 n->nd_aid = nd_aid;
24243 n->shareability = shareability;
24244
24245 return n;
24246}
24247
24248static rb_node_error_t *
24249rb_node_error_new(struct parser_params *p, const YYLTYPE *loc)
24250{
24251 rb_node_error_t *n = NODE_NEWNODE(NODE_ERROR, rb_node_error_t, loc);
24252
24253 return n;
24254}
24255
24256static rb_node_break_t *
24257rb_node_break_new(struct parser_params *p, NODE *nd_stts, const YYLTYPE *loc, const YYLTYPE *keyword_loc)
24258{
24259 rb_node_break_t *n = NODE_NEWNODE(NODE_BREAK, rb_node_break_t, loc);
24260 n->nd_stts = nd_stts;
24261 n->nd_chain = 0;
24262 n->keyword_loc = *keyword_loc;
24263
24264 return n;
24265}
24266
24267static rb_node_next_t *
24268rb_node_next_new(struct parser_params *p, NODE *nd_stts, const YYLTYPE *loc, const YYLTYPE *keyword_loc)
24269{
24270 rb_node_next_t *n = NODE_NEWNODE(NODE_NEXT, rb_node_next_t, loc);
24271 n->nd_stts = nd_stts;
24272 n->nd_chain = 0;
24273 n->keyword_loc = *keyword_loc;
24274
24275 return n;
24276}
24277
24278static rb_node_redo_t *
24279rb_node_redo_new(struct parser_params *p, const YYLTYPE *loc, const YYLTYPE *keyword_loc)
24280{
24281 rb_node_redo_t *n = NODE_NEWNODE(NODE_REDO, rb_node_redo_t, loc);
24282 n->nd_chain = 0;
24283 n->keyword_loc = *keyword_loc;
24284
24285 return n;
24286}
24287
24288static rb_node_def_temp_t *
24289rb_node_def_temp_new(struct parser_params *p, const YYLTYPE *loc)
24290{
24291 rb_node_def_temp_t *n = NODE_NEWNODE((enum node_type)NODE_DEF_TEMP, rb_node_def_temp_t, loc);
24292 n->save.numparam_save = 0;
24293 n->save.max_numparam = 0;
24294 n->save.ctxt = p->ctxt;
24295 n->nd_def = 0;
24296 n->nd_mid = 0;
24297
24298 return n;
24299}
24300
24301static rb_node_def_temp_t *
24302def_head_save(struct parser_params *p, rb_node_def_temp_t *n)
24303{
24304 n->save.numparam_save = numparam_push(p);
24305 n->save.max_numparam = p->max_numparam;
24306 return n;
24307}
24308
24309#ifndef RIPPER
24310static enum node_type
24311nodetype(NODE *node) /* for debug */
24312{
24313 return (enum node_type)nd_type(node);
24314}
24315
24316static int
24317nodeline(NODE *node)
24318{
24319 return nd_line(node);
24320}
24321#endif
24322
24323static NODE*
24324newline_node(NODE *node)
24325{
24326 if (node) {
24327 node = remove_begin(node);
24328 nd_set_fl_newline(node);
24329 }
24330 return node;
24331}
24332
24333static void
24334fixpos(NODE *node, NODE *orig)
24335{
24336 if (!node) return;
24337 if (!orig) return;
24338 nd_set_line(node, nd_line(orig));
24339}
24340
24341static NODE*
24342block_append(struct parser_params *p, NODE *head, NODE *tail)
24343{
24344 NODE *end, *h = head, *nd;
24345
24346 if (tail == 0) return head;
24347
24348 if (h == 0) return tail;
24349 switch (nd_type(h)) {
24350 default:
24351 h = end = NEW_BLOCK(head, &head->nd_loc);
24352 head = end;
24353 break;
24354 case NODE_BLOCK:
24355 end = RNODE_BLOCK(h)->nd_end;
24356 break;
24357 }
24358
24359 nd = RNODE_BLOCK(end)->nd_head;
24360 switch (nd_type(nd)) {
24361 case NODE_RETURN:
24362 case NODE_BREAK:
24363 case NODE_NEXT:
24364 case NODE_REDO:
24365 case NODE_RETRY:
24366 rb_warning0L(nd_line(tail), "statement not reached");
24367 break;
24368
24369 default:
24370 break;
24371 }
24372
24373 if (!nd_type_p(tail, NODE_BLOCK)) {
24374 tail = NEW_BLOCK(tail, &tail->nd_loc);
24375 }
24376 RNODE_BLOCK(end)->nd_next = tail;
24377 RNODE_BLOCK(h)->nd_end = RNODE_BLOCK(tail)->nd_end;
24378 nd_set_last_loc(head, nd_last_loc(tail));
24379 return head;
24380}
24381
24382/* append item to the list */
24383static NODE*
24384list_append(struct parser_params *p, NODE *list, NODE *item)
24385{
24386 NODE *last;
24387
24388 if (list == 0) return NEW_LIST(item, &item->nd_loc);
24389 if (RNODE_LIST(list)->nd_next) {
24390 last = RNODE_LIST(RNODE_LIST(list)->nd_next)->as.nd_end;
24391 }
24392 else {
24393 last = list;
24394 }
24395
24396 RNODE_LIST(list)->as.nd_alen += 1;
24397 RNODE_LIST(last)->nd_next = NEW_LIST(item, &item->nd_loc);
24398 RNODE_LIST(RNODE_LIST(list)->nd_next)->as.nd_end = RNODE_LIST(last)->nd_next;
24399
24400 nd_set_last_loc(list, nd_last_loc(item));
24401
24402 return list;
24403}
24404
24405/* concat two lists */
24406static NODE*
24407list_concat(NODE *head, NODE *tail)
24408{
24409 NODE *last;
24410
24411 if (RNODE_LIST(head)->nd_next) {
24412 last = RNODE_LIST(RNODE_LIST(head)->nd_next)->as.nd_end;
24413 }
24414 else {
24415 last = head;
24416 }
24417
24418 RNODE_LIST(head)->as.nd_alen += RNODE_LIST(tail)->as.nd_alen;
24419 RNODE_LIST(last)->nd_next = tail;
24420 if (RNODE_LIST(tail)->nd_next) {
24421 RNODE_LIST(RNODE_LIST(head)->nd_next)->as.nd_end = RNODE_LIST(RNODE_LIST(tail)->nd_next)->as.nd_end;
24422 }
24423 else {
24424 RNODE_LIST(RNODE_LIST(head)->nd_next)->as.nd_end = tail;
24425 }
24426
24427 nd_set_last_loc(head, nd_last_loc(tail));
24428
24429 return head;
24430}
24431
24432static int
24433literal_concat0(struct parser_params *p, rb_parser_string_t *head, rb_parser_string_t *tail)
24434{
24435 if (!tail) return 1;
24436 if (!rb_parser_enc_compatible(p, head, tail)) {
24437 compile_error(p, "string literal encodings differ (%s / %s)",
24438 rb_enc_name(rb_parser_str_get_encoding(head)),
24439 rb_enc_name(rb_parser_str_get_encoding(tail)));
24440 rb_parser_str_resize(p, head, 0);
24441 rb_parser_str_resize(p, tail, 0);
24442 return 0;
24443 }
24444 rb_parser_str_buf_append(p, head, tail);
24445 return 1;
24446}
24447
24448static rb_parser_string_t *
24449string_literal_head(struct parser_params *p, enum node_type htype, NODE *head)
24450{
24451 if (htype != NODE_DSTR) return NULL;
24452 if (RNODE_DSTR(head)->nd_next) {
24453 head = RNODE_LIST(RNODE_LIST(RNODE_DSTR(head)->nd_next)->as.nd_end)->nd_head;
24454 if (!head || !nd_type_p(head, NODE_STR)) return NULL;
24455 }
24456 rb_parser_string_t *lit = RNODE_DSTR(head)->string;
24457 ASSUME(lit);
24458 return lit;
24459}
24460
24461#ifndef RIPPER
24462static rb_parser_string_t *
24463rb_parser_string_deep_copy(struct parser_params *p, const rb_parser_string_t *orig)
24464{
24465 rb_parser_string_t *copy;
24466 if (!orig) return NULL;
24467 copy = rb_parser_string_new(p, PARSER_STRING_PTR(orig), PARSER_STRING_LEN(orig));
24468 copy->coderange = orig->coderange;
24469 copy->enc = orig->enc;
24470 return copy;
24471}
24472#endif
24473
24474/* concat two string literals */
24475static NODE *
24476literal_concat(struct parser_params *p, NODE *head, NODE *tail, const YYLTYPE *loc)
24477{
24478 enum node_type htype;
24479 rb_parser_string_t *lit;
24480
24481 if (!head) return tail;
24482 if (!tail) return head;
24483
24484 htype = nd_type(head);
24485 if (htype == NODE_EVSTR) {
24486 head = new_dstr(p, head, loc);
24487 htype = NODE_DSTR;
24488 }
24489 if (p->heredoc_indent > 0) {
24490 switch (htype) {
24491 case NODE_STR:
24492 head = str2dstr(p, head);
24493 case NODE_DSTR:
24494 return list_append(p, head, tail);
24495 default:
24496 break;
24497 }
24498 }
24499 switch (nd_type(tail)) {
24500 case NODE_STR:
24501 if ((lit = string_literal_head(p, htype, head)) != false) {
24502 htype = NODE_STR;
24503 }
24504 else {
24505 lit = RNODE_DSTR(head)->string;
24506 }
24507 if (htype == NODE_STR) {
24508 if (!literal_concat0(p, lit, RNODE_STR(tail)->string)) {
24509 error:
24510 rb_discard_node(p, head);
24511 rb_discard_node(p, tail);
24512 return 0;
24513 }
24514 rb_discard_node(p, tail);
24515 }
24516 else {
24517 list_append(p, head, tail);
24518 }
24519 break;
24520
24521 case NODE_DSTR:
24522 if (htype == NODE_STR) {
24523 if (!literal_concat0(p, RNODE_STR(head)->string, RNODE_DSTR(tail)->string))
24524 goto error;
24525 rb_parser_string_free(p, RNODE_DSTR(tail)->string);
24526 RNODE_DSTR(tail)->string = RNODE_STR(head)->string;
24527 RNODE_STR(head)->string = NULL;
24528 rb_discard_node(p, head);
24529 head = tail;
24530 }
24531 else if (!RNODE_DSTR(tail)->string) {
24532 append:
24533 RNODE_DSTR(head)->as.nd_alen += RNODE_DSTR(tail)->as.nd_alen - 1;
24534 if (!RNODE_DSTR(head)->nd_next) {
24535 RNODE_DSTR(head)->nd_next = RNODE_DSTR(tail)->nd_next;
24536 }
24537 else if (RNODE_DSTR(tail)->nd_next) {
24538 RNODE_DSTR(RNODE_DSTR(RNODE_DSTR(head)->nd_next)->as.nd_end)->nd_next = RNODE_DSTR(tail)->nd_next;
24539 RNODE_DSTR(RNODE_DSTR(head)->nd_next)->as.nd_end = RNODE_DSTR(RNODE_DSTR(tail)->nd_next)->as.nd_end;
24540 }
24541 rb_discard_node(p, tail);
24542 }
24543 else if ((lit = string_literal_head(p, htype, head)) != false) {
24544 if (!literal_concat0(p, lit, RNODE_DSTR(tail)->string))
24545 goto error;
24546 rb_parser_string_free(p, RNODE_DSTR(tail)->string);
24547 RNODE_DSTR(tail)->string = 0;
24548 goto append;
24549 }
24550 else {
24551 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));
24552 RNODE_DSTR(tail)->string = 0;
24553 }
24554 break;
24555
24556 case NODE_EVSTR:
24557 if (htype == NODE_STR) {
24558 head = str2dstr(p, head);
24559 RNODE_DSTR(head)->as.nd_alen = 1;
24560 }
24561 list_append(p, head, tail);
24562 break;
24563 }
24564 return head;
24565}
24566
24567static void
24568nd_copy_flag(NODE *new_node, NODE *old_node)
24569{
24570 if (nd_fl_newline(old_node)) nd_set_fl_newline(new_node);
24571 nd_set_line(new_node, nd_line(old_node));
24572 new_node->nd_loc = old_node->nd_loc;
24573 new_node->node_id = old_node->node_id;
24574}
24575
24576static NODE *
24577str2dstr(struct parser_params *p, NODE *node)
24578{
24579 NODE *new_node = (NODE *)NODE_NEW_INTERNAL(NODE_DSTR, rb_node_dstr_t);
24580 nd_copy_flag(new_node, node);
24581 RNODE_DSTR(new_node)->string = RNODE_STR(node)->string;
24582 RNODE_DSTR(new_node)->as.nd_alen = 0;
24583 RNODE_DSTR(new_node)->nd_next = 0;
24584 RNODE_STR(node)->string = 0;
24585
24586 return new_node;
24587}
24588
24589static NODE *
24590str2regx(struct parser_params *p, NODE *node, int options, const YYLTYPE *loc, const YYLTYPE *opening_loc, const YYLTYPE *content_loc, const YYLTYPE *closing_loc)
24591{
24592 NODE *new_node = (NODE *)NODE_NEW_INTERNAL(NODE_REGX, rb_node_regx_t);
24593 nd_copy_flag(new_node, node);
24594 RNODE_REGX(new_node)->string = RNODE_STR(node)->string;
24595 RNODE_REGX(new_node)->options = options;
24596 nd_set_loc(new_node, loc);
24597 RNODE_REGX(new_node)->opening_loc = *opening_loc;
24598 RNODE_REGX(new_node)->content_loc = *content_loc;
24599 RNODE_REGX(new_node)->closing_loc = *closing_loc;
24600 RNODE_STR(node)->string = 0;
24601
24602 return new_node;
24603}
24604
24605static NODE *
24606evstr2dstr(struct parser_params *p, NODE *node)
24607{
24608 if (nd_type_p(node, NODE_EVSTR)) {
24609 node = new_dstr(p, node, &node->nd_loc);
24610 }
24611 return node;
24612}
24613
24614static NODE *
24615new_evstr(struct parser_params *p, NODE *node, const YYLTYPE *loc, const YYLTYPE *opening_loc, const YYLTYPE *closing_loc)
24616{
24617 NODE *head = node;
24618
24619 if (node) {
24620 switch (nd_type(node)) {
24621 case NODE_STR:
24622 return str2dstr(p, node);
24623 case NODE_DSTR:
24624 break;
24625 case NODE_EVSTR:
24626 return node;
24627 }
24628 }
24629 return NEW_EVSTR(head, loc, opening_loc, closing_loc);
24630}
24631
24632static NODE *
24633new_dstr(struct parser_params *p, NODE *node, const YYLTYPE *loc)
24634{
24635 NODE *dstr = NEW_DSTR(STRING_NEW0(), loc);
24636 return list_append(p, dstr, node);
24637}
24638
24639static NODE *
24640call_bin_op(struct parser_params *p, NODE *recv, ID id, NODE *arg1,
24641 const YYLTYPE *op_loc, const YYLTYPE *loc)
24642{
24643 NODE *expr;
24644 value_expr(p, recv);
24645 value_expr(p, arg1);
24646 expr = NEW_OPCALL(recv, id, NEW_LIST(arg1, &arg1->nd_loc), loc);
24647 nd_set_line(expr, op_loc->beg_pos.lineno);
24648 return expr;
24649}
24650
24651static NODE *
24652call_uni_op(struct parser_params *p, NODE *recv, ID id, const YYLTYPE *op_loc, const YYLTYPE *loc)
24653{
24654 NODE *opcall;
24655 value_expr(p, recv);
24656 opcall = NEW_OPCALL(recv, id, 0, loc);
24657 nd_set_line(opcall, op_loc->beg_pos.lineno);
24658 return opcall;
24659}
24660
24661static NODE *
24662new_qcall(struct parser_params* p, ID atype, NODE *recv, ID mid, NODE *args, const YYLTYPE *op_loc, const YYLTYPE *loc)
24663{
24664 NODE *qcall = NEW_QCALL(atype, recv, mid, args, loc);
24665 nd_set_line(qcall, op_loc->beg_pos.lineno);
24666 return qcall;
24667}
24668
24669static NODE*
24670new_command_qcall(struct parser_params* p, ID atype, NODE *recv, ID mid, NODE *args, NODE *block, const YYLTYPE *op_loc, const YYLTYPE *loc)
24671{
24672 NODE *ret;
24673 if (block) block_dup_check(p, args, block);
24674 ret = new_qcall(p, atype, recv, mid, args, op_loc, loc);
24675 if (block) ret = method_add_block(p, ret, block, loc);
24676 fixpos(ret, recv);
24677 return ret;
24678}
24679
24681new_locations_lambda_body(struct parser_params* p, NODE *node, const YYLTYPE *loc, const YYLTYPE *opening_loc, const YYLTYPE *closing_loc)
24682{
24684 body->node = node;
24685 body->opening_loc = *opening_loc;
24686 body->closing_loc = *closing_loc;
24687 return body;
24688}
24689
24690static NODE *
24691command_add_block(struct parser_params*p, NODE *m, NODE *b, const YYLTYPE *loc)
24692{
24693 NODE **body;
24694 enum node_type type = nd_type(m);
24695 switch (type) {
24696 case NODE_YIELD:
24697 compile_error(p, "block given to yield");
24698 return m;
24699 case NODE_RETURN:
24700 body = &RNODE_RETURN(m)->nd_stts;
24701 break;
24702 case NODE_BREAK:
24703 case NODE_NEXT:
24704 body = &RNODE_EXITS(m)->nd_stts;
24705 break;
24706 case NODE_REDO: /* `redo` has no argument */
24707 compile_error(p, "command_add_block: unexpected node: NODE_REDO");
24708 return m;
24709 case NODE_RETRY: /* `retry` has no argument */
24710 compile_error(p, "command_add_block: unexpected node: NODE_RETRY");
24711 return m;
24712 default:
24713 block_dup_check(p, get_nd_args(p, m), b);
24714 return method_add_block(p, m, b, loc);
24715 }
24716 RUBY_ASSERT(*body, "no argument %s with do_block", parser_node_name(type));
24717 YYLTYPE b_loc = code_loc_gen(&(*body)->nd_loc, loc);
24718 *body = command_add_block(p, *body, b, &b_loc);
24719 m->nd_loc.end_pos = loc->end_pos;
24720 return m;
24721}
24722
24723#define nd_once_body(node) (nd_type_p((node), NODE_ONCE) ? RNODE_ONCE(node)->nd_body : node)
24724
24725static NODE*
24726last_expr_once_body(NODE *node)
24727{
24728 if (!node) return 0;
24729 return nd_once_body(node);
24730}
24731
24732static NODE*
24733match_op(struct parser_params *p, NODE *node1, NODE *node2, const YYLTYPE *op_loc, const YYLTYPE *loc)
24734{
24735 NODE *n;
24736 int line = op_loc->beg_pos.lineno;
24737
24738 value_expr(p, node1);
24739 value_expr(p, node2);
24740
24741 if ((n = last_expr_once_body(node1)) != 0) {
24742 switch (nd_type(n)) {
24743 case NODE_DREGX:
24744 {
24745 NODE *match = NEW_MATCH2(node1, node2, loc);
24746 nd_set_line(match, line);
24747 return match;
24748 }
24749
24750 case NODE_REGX:
24751 {
24752 const VALUE lit = rb_node_regx_string_val(n);
24753 if (!NIL_P(lit)) {
24754 NODE *match = NEW_MATCH2(node1, node2, loc);
24755 RNODE_MATCH2(match)->nd_args = reg_named_capture_assign(p, lit, loc, assignable);
24756 nd_set_line(match, line);
24757 return match;
24758 }
24759 }
24760 }
24761 }
24762
24763 if ((n = last_expr_once_body(node2)) != 0) {
24764 NODE *match3;
24765
24766 switch (nd_type(n)) {
24767 case NODE_DREGX:
24768 match3 = NEW_MATCH3(node2, node1, loc);
24769 return match3;
24770 }
24771 }
24772
24773 n = NEW_CALL(node1, tMATCH, NEW_LIST(node2, &node2->nd_loc), loc);
24774 nd_set_line(n, line);
24775 return n;
24776}
24777
24778# if WARN_PAST_SCOPE
24779static int
24780past_dvar_p(struct parser_params *p, ID id)
24781{
24782 struct vtable *past = p->lvtbl->past;
24783 while (past) {
24784 if (vtable_included(past, id)) return 1;
24785 past = past->prev;
24786 }
24787 return 0;
24788}
24789# endif
24790
24791static int
24792numparam_nested_p(struct parser_params *p)
24793{
24794 struct local_vars *local = p->lvtbl;
24795 NODE *outer = local->numparam.outer;
24796 NODE *inner = local->numparam.inner;
24797 if (outer || inner) {
24798 NODE *used = outer ? outer : inner;
24799 compile_error(p, "numbered parameter is already used in %s block\n"
24800 "%s:%d: numbered parameter is already used here",
24801 outer ? "outer" : "inner",
24802 p->ruby_sourcefile, nd_line(used));
24803 parser_show_error_line(p, &used->nd_loc);
24804 return 1;
24805 }
24806 return 0;
24807}
24808
24809static int
24810numparam_used_p(struct parser_params *p)
24811{
24812 NODE *numparam = p->lvtbl->numparam.current;
24813 if (numparam) {
24814 compile_error(p, "'it' is not allowed when a numbered parameter is already used\n"
24815 "%s:%d: numbered parameter is already used here",
24816 p->ruby_sourcefile, nd_line(numparam));
24817 parser_show_error_line(p, &numparam->nd_loc);
24818 return 1;
24819 }
24820 return 0;
24821}
24822
24823static int
24824it_used_p(struct parser_params *p)
24825{
24826 NODE *it = p->lvtbl->it;
24827 if (it) {
24828 compile_error(p, "numbered parameters are not allowed when 'it' is already used\n"
24829 "%s:%d: 'it' is already used here",
24830 p->ruby_sourcefile, nd_line(it));
24831 parser_show_error_line(p, &it->nd_loc);
24832 return 1;
24833 }
24834 return 0;
24835}
24836
24837static NODE*
24838gettable(struct parser_params *p, ID id, const YYLTYPE *loc)
24839{
24840 ID *vidp = NULL;
24841 NODE *node;
24842 switch (id) {
24843 case keyword_self:
24844 return NEW_SELF(loc);
24845 case keyword_nil:
24846 return NEW_NIL(loc);
24847 case keyword_true:
24848 return NEW_TRUE(loc);
24849 case keyword_false:
24850 return NEW_FALSE(loc);
24851 case keyword__FILE__:
24852 {
24853 VALUE file = p->ruby_sourcefile_string;
24854 if (NIL_P(file))
24855 file = rb_str_new(0, 0);
24856 node = NEW_FILE(file, loc);
24857 }
24858 return node;
24859 case keyword__LINE__:
24860 return NEW_LINE(loc);
24861 case keyword__ENCODING__:
24862 return NEW_ENCODING(loc);
24863
24864 }
24865 switch (id_type(id)) {
24866 case ID_LOCAL:
24867 if (dyna_in_block(p) && dvar_defined_ref(p, id, &vidp)) {
24868 if (NUMPARAM_ID_P(id) && (numparam_nested_p(p) || it_used_p(p))) return 0;
24869 if (vidp) *vidp |= LVAR_USED;
24870 node = NEW_DVAR(id, loc);
24871 return node;
24872 }
24873 if (local_id_ref(p, id, &vidp)) {
24874 if (vidp) *vidp |= LVAR_USED;
24875 node = NEW_LVAR(id, loc);
24876 return node;
24877 }
24878 if (dyna_in_block(p) && NUMPARAM_ID_P(id) &&
24879 parser_numbered_param(p, NUMPARAM_ID_TO_IDX(id))) {
24880 if (numparam_nested_p(p) || it_used_p(p)) return 0;
24881 node = NEW_DVAR(id, loc);
24882 struct local_vars *local = p->lvtbl;
24883 if (!local->numparam.current) local->numparam.current = node;
24884 return node;
24885 }
24886# if WARN_PAST_SCOPE
24887 if (!p->ctxt.in_defined && RTEST(ruby_verbose) && past_dvar_p(p, id)) {
24888 rb_warning1("possible reference to past scope - %"PRIsWARN, rb_id2str(id));
24889 }
24890# endif
24891 /* method call without arguments */
24892 if (dyna_in_block(p) && id == idIt && !(DVARS_TERMINAL_P(p->lvtbl->args) || DVARS_TERMINAL_P(p->lvtbl->args->prev))) {
24893 if (numparam_used_p(p)) return 0;
24894 if (p->max_numparam == ORDINAL_PARAM) {
24895 compile_error(p, "ordinary parameter is defined");
24896 return 0;
24897 }
24898 if (!p->it_id) {
24899 p->it_id = idItImplicit;
24900 vtable_add(p->lvtbl->args, p->it_id);
24901 }
24902 NODE *node = NEW_DVAR(p->it_id, loc);
24903 if (!p->lvtbl->it) p->lvtbl->it = node;
24904 return node;
24905 }
24906 return NEW_VCALL(id, loc);
24907 case ID_GLOBAL:
24908 return NEW_GVAR(id, loc);
24909 case ID_INSTANCE:
24910 return NEW_IVAR(id, loc);
24911 case ID_CONST:
24912 return NEW_CONST(id, loc);
24913 case ID_CLASS:
24914 return NEW_CVAR(id, loc);
24915 }
24916 compile_error(p, "identifier %"PRIsVALUE" is not valid to get", rb_id2str(id));
24917 return 0;
24918}
24919
24920static rb_node_opt_arg_t *
24921opt_arg_append(rb_node_opt_arg_t *opt_list, rb_node_opt_arg_t *opt)
24922{
24923 rb_node_opt_arg_t *opts = opt_list;
24924 RNODE(opts)->nd_loc.end_pos = RNODE(opt)->nd_loc.end_pos;
24925
24926 while (opts->nd_next) {
24927 opts = opts->nd_next;
24928 RNODE(opts)->nd_loc.end_pos = RNODE(opt)->nd_loc.end_pos;
24929 }
24930 opts->nd_next = opt;
24931
24932 return opt_list;
24933}
24934
24935static rb_node_kw_arg_t *
24936kwd_append(rb_node_kw_arg_t *kwlist, rb_node_kw_arg_t *kw)
24937{
24938 if (kwlist) {
24939 /* Assume rb_node_kw_arg_t and rb_node_opt_arg_t has same structure */
24940 opt_arg_append(RNODE_OPT_ARG(kwlist), RNODE_OPT_ARG(kw));
24941 }
24942 return kwlist;
24943}
24944
24945static NODE *
24946new_defined(struct parser_params *p, NODE *expr, const YYLTYPE *loc, const YYLTYPE *keyword_loc)
24947{
24948 int had_trailing_semicolon = p->ctxt.has_trailing_semicolon;
24949 p->ctxt.has_trailing_semicolon = 0;
24950
24951 NODE *n = expr;
24952 while (n) {
24953 if (nd_type_p(n, NODE_BEGIN)) {
24954 n = RNODE_BEGIN(n)->nd_body;
24955 }
24956 else if (nd_type_p(n, NODE_BLOCK) && RNODE_BLOCK(n)->nd_end == n) {
24957 n = RNODE_BLOCK(n)->nd_head;
24958 }
24959 else {
24960 break;
24961 }
24962 }
24963
24964 if (had_trailing_semicolon && !nd_type_p(expr, NODE_BLOCK)) {
24965 NODE *block = NEW_BLOCK(expr, loc);
24966 return NEW_DEFINED(block, loc, keyword_loc);
24967 }
24968
24969 return NEW_DEFINED(n, loc, keyword_loc);
24970}
24971
24972static NODE*
24973str_to_sym_node(struct parser_params *p, NODE *node, const YYLTYPE *loc)
24974{
24975 VALUE lit;
24976 rb_parser_string_t *str = RNODE_STR(node)->string;
24977 if (rb_parser_enc_str_coderange(p, str) == RB_PARSER_ENC_CODERANGE_BROKEN) {
24978 yyerror1(loc, "invalid symbol");
24979 lit = STR_NEW0();
24980 }
24981 else {
24982 lit = rb_str_new_parser_string(str);
24983 }
24984 return NEW_SYM(lit, loc);
24985}
24986
24987static NODE*
24988symbol_append(struct parser_params *p, NODE *symbols, NODE *symbol)
24989{
24990 enum node_type type = nd_type(symbol);
24991 switch (type) {
24992 case NODE_DSTR:
24993 nd_set_type(symbol, NODE_DSYM);
24994 break;
24995 case NODE_STR:
24996 symbol = str_to_sym_node(p, symbol, &RNODE(symbol)->nd_loc);
24997 break;
24998 default:
24999 compile_error(p, "unexpected node as symbol: %s", parser_node_name(type));
25000 }
25001 return list_append(p, symbols, symbol);
25002}
25003
25004static void
25005dregex_fragment_setenc(struct parser_params *p, rb_node_dregx_t *const dreg, int options)
25006{
25007 if (dreg->string) {
25008 reg_fragment_setenc(p, dreg->string, options);
25009 }
25010 for (struct RNode_LIST *list = dreg->nd_next; list; list = RNODE_LIST(list->nd_next)) {
25011 NODE *frag = list->nd_head;
25012 if (nd_type_p(frag, NODE_STR)) {
25013 reg_fragment_setenc(p, RNODE_STR(frag)->string, options);
25014 }
25015 else if (nd_type_p(frag, NODE_DSTR)) {
25016 dregex_fragment_setenc(p, RNODE_DSTR(frag), options);
25017 }
25018 }
25019}
25020
25021static NODE *
25022new_regexp(struct parser_params *p, NODE *node, int options, const YYLTYPE *loc, const YYLTYPE *opening_loc, const YYLTYPE *content_loc, const YYLTYPE *closing_loc)
25023{
25024 if (!node) {
25025 /* Check string is valid regex */
25026 rb_parser_string_t *str = STRING_NEW0();
25027 reg_compile(p, str, options);
25028 node = NEW_REGX(str, options, loc, opening_loc, content_loc, closing_loc);
25029 return node;
25030 }
25031 switch (nd_type(node)) {
25032 case NODE_STR:
25033 {
25034 /* Check string is valid regex */
25035 reg_compile(p, RNODE_STR(node)->string, options);
25036 node = str2regx(p, node, options, loc, opening_loc, content_loc, closing_loc);
25037 }
25038 break;
25039 default:
25040 node = NEW_DSTR0(STRING_NEW0(), 1, NEW_LIST(node, loc), loc);
25041 /* fall through */
25042 case NODE_DSTR:
25043 nd_set_type(node, NODE_DREGX);
25044 nd_set_loc(node, loc);
25045 rb_node_dregx_t *const dreg = RNODE_DREGX(node);
25046 dreg->as.nd_cflag = options & RE_OPTION_MASK;
25047 if (dreg->nd_next) {
25048 dregex_fragment_setenc(p, dreg, options);
25049 }
25050 if (options & RE_OPTION_ONCE) {
25051 node = NEW_ONCE(node, loc);
25052 }
25053 break;
25054 }
25055 return node;
25056}
25057
25058static rb_node_kw_arg_t *
25059new_kw_arg(struct parser_params *p, NODE *k, const YYLTYPE *loc)
25060{
25061 if (!k) return 0;
25062 return NEW_KW_ARG((k), loc);
25063}
25064
25065static NODE *
25066new_xstring(struct parser_params *p, NODE *node, const YYLTYPE *loc)
25067{
25068 if (!node) {
25069 NODE *xstr = NEW_XSTR(STRING_NEW0(), loc);
25070 return xstr;
25071 }
25072 switch (nd_type(node)) {
25073 case NODE_STR:
25074 nd_set_type(node, NODE_XSTR);
25075 nd_set_loc(node, loc);
25076 break;
25077 case NODE_DSTR:
25078 nd_set_type(node, NODE_DXSTR);
25079 nd_set_loc(node, loc);
25080 break;
25081 default:
25082 node = NEW_DXSTR(0, 1, NEW_LIST(node, loc), loc);
25083 break;
25084 }
25085 return node;
25086}
25087
25088static const
25089struct st_hash_type literal_type = {
25090 literal_cmp,
25091 literal_hash,
25092};
25093
25094static int nd_type_st_key_enable_p(NODE *node);
25095
25096static void
25097check_literal_when(struct parser_params *p, NODE *arg, const YYLTYPE *loc)
25098{
25099 /* See https://bugs.ruby-lang.org/issues/20331 for discussion about what is warned. */
25100 if (!arg || !p->case_labels) return;
25101 if (!nd_type_st_key_enable_p(arg)) return;
25102
25103 if (p->case_labels == CHECK_LITERAL_WHEN) {
25104 p->case_labels = st_init_table(&literal_type);
25105 }
25106 else {
25107 st_data_t line;
25108 if (st_lookup(p->case_labels, (st_data_t)arg, &line)) {
25109 rb_warning2("'when' clause on line %d duplicates 'when' clause on line %d and is ignored",
25110 WARN_I((int)nd_line(arg)), WARN_I((int)line));
25111 return;
25112 }
25113 }
25114 st_insert(p->case_labels, (st_data_t)arg, (st_data_t)p->ruby_sourceline);
25115}
25116
25117#ifdef RIPPER
25118static int
25119id_is_var(struct parser_params *p, ID id)
25120{
25121 if (is_notop_id(id)) {
25122 switch (id & ID_SCOPE_MASK) {
25123 case ID_GLOBAL: case ID_INSTANCE: case ID_CONST: case ID_CLASS:
25124 return 1;
25125 case ID_LOCAL:
25126 if (dyna_in_block(p)) {
25127 if (NUMPARAM_ID_P(id) || dvar_defined(p, id)) return 1;
25128 }
25129 if (local_id(p, id)) return 1;
25130 /* method call without arguments */
25131 return 0;
25132 }
25133 }
25134 compile_error(p, "identifier %"PRIsVALUE" is not valid to get", rb_id2str(id));
25135 return 0;
25136}
25137#endif
25138
25139static inline enum lex_state_e
25140parser_set_lex_state(struct parser_params *p, enum lex_state_e ls, int line)
25141{
25142 if (p->debug) {
25143 ls = rb_parser_trace_lex_state(p, p->lex.state, ls, line);
25144 }
25145 return p->lex.state = ls;
25146}
25147
25148#ifndef RIPPER
25149static void
25150flush_debug_buffer(struct parser_params *p, VALUE out, VALUE str)
25151{
25152 VALUE mesg = p->debug_buffer;
25153
25154 if (!NIL_P(mesg) && RSTRING_LEN(mesg)) {
25155 p->debug_buffer = Qnil;
25156 rb_io_puts(1, &mesg, out);
25157 }
25158 if (!NIL_P(str) && RSTRING_LEN(str)) {
25159 rb_io_write(p->debug_output, str);
25160 }
25161}
25162
25163static const char rb_parser_lex_state_names[][8] = {
25164 "BEG", "END", "ENDARG", "ENDFN", "ARG",
25165 "CMDARG", "MID", "FNAME", "DOT", "CLASS",
25166 "LABEL", "LABELED","FITEM",
25167};
25168
25169static VALUE
25170append_lex_state_name(struct parser_params *p, enum lex_state_e state, VALUE buf)
25171{
25172 int i, sep = 0;
25173 unsigned int mask = 1;
25174 static const char none[] = "NONE";
25175
25176 for (i = 0; i < EXPR_MAX_STATE; ++i, mask <<= 1) {
25177 if ((unsigned)state & mask) {
25178 if (sep) {
25179 rb_str_cat(buf, "|", 1);
25180 }
25181 sep = 1;
25182 rb_str_cat_cstr(buf, rb_parser_lex_state_names[i]);
25183 }
25184 }
25185 if (!sep) {
25186 rb_str_cat(buf, none, sizeof(none)-1);
25187 }
25188 return buf;
25189}
25190
25191enum lex_state_e
25192rb_parser_trace_lex_state(struct parser_params *p, enum lex_state_e from,
25193 enum lex_state_e to, int line)
25194{
25195 VALUE mesg;
25196 mesg = rb_str_new_cstr("lex_state: ");
25197 append_lex_state_name(p, from, mesg);
25198 rb_str_cat_cstr(mesg, " -> ");
25199 append_lex_state_name(p, to, mesg);
25200 rb_str_catf(mesg, " at line %d\n", line);
25201 flush_debug_buffer(p, p->debug_output, mesg);
25202 return to;
25203}
25204
25205VALUE
25206rb_parser_lex_state_name(struct parser_params *p, enum lex_state_e state)
25207{
25208 return rb_str_to_interned_str(append_lex_state_name(p, state, rb_str_new(0, 0)));
25209}
25210
25211static void
25212append_bitstack_value(struct parser_params *p, stack_type stack, VALUE mesg)
25213{
25214 if (stack == 0) {
25215 rb_str_cat_cstr(mesg, "0");
25216 }
25217 else {
25218 stack_type mask = (stack_type)1U << (CHAR_BIT * sizeof(stack_type) - 1);
25219 for (; mask && !(stack & mask); mask >>= 1) continue;
25220 for (; mask; mask >>= 1) rb_str_cat(mesg, stack & mask ? "1" : "0", 1);
25221 }
25222}
25223
25224void
25225rb_parser_show_bitstack(struct parser_params *p, stack_type stack,
25226 const char *name, int line)
25227{
25228 VALUE mesg = rb_sprintf("%s: ", name);
25229 append_bitstack_value(p, stack, mesg);
25230 rb_str_catf(mesg, " at line %d\n", line);
25231 flush_debug_buffer(p, p->debug_output, mesg);
25232}
25233
25234void
25235rb_parser_fatal(struct parser_params *p, const char *fmt, ...)
25236{
25237 va_list ap;
25238 VALUE mesg = rb_str_new_cstr("internal parser error: ");
25239
25240 va_start(ap, fmt);
25241 rb_str_vcatf(mesg, fmt, ap);
25242 va_end(ap);
25243 yyerror0(RSTRING_PTR(mesg));
25244 RB_GC_GUARD(mesg);
25245
25246 mesg = rb_str_new(0, 0);
25247 append_lex_state_name(p, p->lex.state, mesg);
25248 compile_error(p, "lex.state: %"PRIsVALUE, mesg);
25249 rb_str_resize(mesg, 0);
25250 append_bitstack_value(p, p->cond_stack, mesg);
25251 compile_error(p, "cond_stack: %"PRIsVALUE, mesg);
25252 rb_str_resize(mesg, 0);
25253 append_bitstack_value(p, p->cmdarg_stack, mesg);
25254 compile_error(p, "cmdarg_stack: %"PRIsVALUE, mesg);
25255 if (p->debug_output == rb_ractor_stdout())
25256 p->debug_output = rb_ractor_stderr();
25257 p->debug = TRUE;
25258}
25259
25260static YYLTYPE *
25261rb_parser_set_pos(YYLTYPE *yylloc, int sourceline, int beg_pos, int end_pos)
25262{
25263 yylloc->beg_pos.lineno = sourceline;
25264 yylloc->beg_pos.column = beg_pos;
25265 yylloc->end_pos.lineno = sourceline;
25266 yylloc->end_pos.column = end_pos;
25267 return yylloc;
25268}
25269
25270YYLTYPE *
25271rb_parser_set_location_from_strterm_heredoc(struct parser_params *p, rb_strterm_heredoc_t *here, YYLTYPE *yylloc)
25272{
25273 int sourceline = here->sourceline;
25274 int beg_pos = (int)here->offset - here->quote
25275 - (rb_strlen_lit("<<-") - !(here->func & STR_FUNC_INDENT));
25276 int end_pos = (int)here->offset + here->length + here->quote;
25277
25278 return rb_parser_set_pos(yylloc, sourceline, beg_pos, end_pos);
25279}
25280
25281YYLTYPE *
25282rb_parser_set_location_of_delayed_token(struct parser_params *p, YYLTYPE *yylloc)
25283{
25284 yylloc->beg_pos.lineno = p->delayed.beg_line;
25285 yylloc->beg_pos.column = p->delayed.beg_col;
25286 yylloc->end_pos.lineno = p->delayed.end_line;
25287 yylloc->end_pos.column = p->delayed.end_col;
25288
25289 return yylloc;
25290}
25291
25292YYLTYPE *
25293rb_parser_set_location_of_heredoc_end(struct parser_params *p, YYLTYPE *yylloc)
25294{
25295 int sourceline = p->ruby_sourceline;
25296 int beg_pos = (int)(p->lex.ptok - p->lex.pbeg);
25297 int end_pos = (int)(p->lex.pend - p->lex.pbeg);
25298 return rb_parser_set_pos(yylloc, sourceline, beg_pos, end_pos);
25299}
25300
25301YYLTYPE *
25302rb_parser_set_location_of_dummy_end(struct parser_params *p, YYLTYPE *yylloc)
25303{
25304 yylloc->end_pos = yylloc->beg_pos;
25305
25306 return yylloc;
25307}
25308
25309YYLTYPE *
25310rb_parser_set_location_of_none(struct parser_params *p, YYLTYPE *yylloc)
25311{
25312 int sourceline = p->ruby_sourceline;
25313 int beg_pos = (int)(p->lex.ptok - p->lex.pbeg);
25314 int end_pos = (int)(p->lex.ptok - p->lex.pbeg);
25315 return rb_parser_set_pos(yylloc, sourceline, beg_pos, end_pos);
25316}
25317
25318YYLTYPE *
25319rb_parser_set_location(struct parser_params *p, YYLTYPE *yylloc)
25320{
25321 int sourceline = p->ruby_sourceline;
25322 int beg_pos = (int)(p->lex.ptok - p->lex.pbeg);
25323 int end_pos = (int)(p->lex.pcur - p->lex.pbeg);
25324 return rb_parser_set_pos(yylloc, sourceline, beg_pos, end_pos);
25325}
25326#endif /* !RIPPER */
25327
25328static int
25329assignable0(struct parser_params *p, ID id, const char **err)
25330{
25331 if (!id) return -1;
25332 switch (id) {
25333 case keyword_self:
25334 *err = "Can't change the value of self";
25335 return -1;
25336 case keyword_nil:
25337 *err = "Can't assign to nil";
25338 return -1;
25339 case keyword_true:
25340 *err = "Can't assign to true";
25341 return -1;
25342 case keyword_false:
25343 *err = "Can't assign to false";
25344 return -1;
25345 case keyword__FILE__:
25346 *err = "Can't assign to __FILE__";
25347 return -1;
25348 case keyword__LINE__:
25349 *err = "Can't assign to __LINE__";
25350 return -1;
25351 case keyword__ENCODING__:
25352 *err = "Can't assign to __ENCODING__";
25353 return -1;
25354 }
25355 switch (id_type(id)) {
25356 case ID_LOCAL:
25357 if (dyna_in_block(p)) {
25358 if (p->max_numparam > NO_PARAM && NUMPARAM_ID_P(id)) {
25359 compile_error(p, "Can't assign to numbered parameter _%d",
25360 NUMPARAM_ID_TO_IDX(id));
25361 return -1;
25362 }
25363 if (dvar_curr(p, id)) return NODE_DASGN;
25364 if (dvar_defined(p, id)) return NODE_DASGN;
25365 if (local_id(p, id)) return NODE_LASGN;
25366 dyna_var(p, id);
25367 return NODE_DASGN;
25368 }
25369 else {
25370 if (!local_id(p, id)) local_var(p, id);
25371 return NODE_LASGN;
25372 }
25373 break;
25374 case ID_GLOBAL: return NODE_GASGN;
25375 case ID_INSTANCE: return NODE_IASGN;
25376 case ID_CONST:
25377 if (!p->ctxt.in_def) return NODE_CDECL;
25378 *err = "dynamic constant assignment";
25379 return -1;
25380 case ID_CLASS: return NODE_CVASGN;
25381 default:
25382 compile_error(p, "identifier %"PRIsVALUE" is not valid to set", rb_id2str(id));
25383 }
25384 return -1;
25385}
25386
25387static NODE*
25388assignable(struct parser_params *p, ID id, NODE *val, const YYLTYPE *loc)
25389{
25390 const char *err = 0;
25391 int node_type = assignable0(p, id, &err);
25392 switch (node_type) {
25393 case NODE_DASGN: return NEW_DASGN(id, val, loc);
25394 case NODE_LASGN: return NEW_LASGN(id, val, loc);
25395 case NODE_GASGN: return NEW_GASGN(id, val, loc);
25396 case NODE_IASGN: return NEW_IASGN(id, val, loc);
25397 case NODE_CDECL: return NEW_CDECL(id, val, 0, p->ctxt.shareable_constant_value, loc);
25398 case NODE_CVASGN: return NEW_CVASGN(id, val, loc);
25399 }
25400/* TODO: FIXME */
25401#ifndef RIPPER
25402 if (err) yyerror1(loc, err);
25403#else
25404 if (err) set_value(assign_error(p, err, p->s_lvalue));
25405#endif
25406 return NEW_ERROR(loc);
25407}
25408
25409static int
25410is_private_local_id(struct parser_params *p, ID name)
25411{
25412 VALUE s;
25413 if (name == idUScore) return 1;
25414 if (!is_local_id(name)) return 0;
25415 s = rb_id2str(name);
25416 if (!s) return 0;
25417 return RSTRING_PTR(s)[0] == '_';
25418}
25419
25420static int
25421shadowing_lvar_0(struct parser_params *p, ID name)
25422{
25423 if (dyna_in_block(p)) {
25424 if (dvar_curr(p, name)) {
25425 if (is_private_local_id(p, name)) return 1;
25426 yyerror0("duplicated argument name");
25427 }
25428 else if (dvar_defined(p, name) || local_id(p, name)) {
25429 vtable_add(p->lvtbl->vars, name);
25430 if (p->lvtbl->used) {
25431 vtable_add(p->lvtbl->used, (ID)p->ruby_sourceline | LVAR_USED);
25432 }
25433 return 0;
25434 }
25435 }
25436 else {
25437 if (local_id(p, name)) {
25438 if (is_private_local_id(p, name)) return 1;
25439 yyerror0("duplicated argument name");
25440 }
25441 }
25442 return 1;
25443}
25444
25445static ID
25446shadowing_lvar(struct parser_params *p, ID name)
25447{
25448 shadowing_lvar_0(p, name);
25449 return name;
25450}
25451
25452static void
25453new_bv(struct parser_params *p, ID name)
25454{
25455 if (!name) return;
25456 if (!is_local_id(name)) {
25457 compile_error(p, "invalid local variable - %"PRIsVALUE,
25458 rb_id2str(name));
25459 return;
25460 }
25461 if (!shadowing_lvar_0(p, name)) return;
25462 dyna_var(p, name);
25463 ID *vidp = 0;
25464 if (dvar_defined_ref(p, name, &vidp)) {
25465 if (vidp) *vidp |= LVAR_USED;
25466 }
25467}
25468
25469static void
25470aryset_check(struct parser_params *p, NODE *args)
25471{
25472 NODE *block = 0, *kwds = 0;
25473 if (args && nd_type_p(args, NODE_BLOCK_PASS)) {
25474 block = RNODE_BLOCK_PASS(args)->nd_body;
25475 args = RNODE_BLOCK_PASS(args)->nd_head;
25476 }
25477 if (args && nd_type_p(args, NODE_ARGSCAT)) {
25478 args = RNODE_ARGSCAT(args)->nd_body;
25479 }
25480 if (args && nd_type_p(args, NODE_ARGSPUSH)) {
25481 kwds = RNODE_ARGSPUSH(args)->nd_body;
25482 }
25483 else {
25484 for (NODE *next = args; next && nd_type_p(next, NODE_LIST);
25485 next = RNODE_LIST(next)->nd_next) {
25486 kwds = RNODE_LIST(next)->nd_head;
25487 }
25488 }
25489 if (kwds && nd_type_p(kwds, NODE_HASH) && !RNODE_HASH(kwds)->nd_brace) {
25490 yyerror1(&kwds->nd_loc, "keyword arg given in index assignment");
25491 }
25492 if (block) {
25493 yyerror1(&block->nd_loc, "block arg given in index assignment");
25494 }
25495}
25496
25497static NODE *
25498aryset(struct parser_params *p, NODE *recv, NODE *idx, const YYLTYPE *loc)
25499{
25500 aryset_check(p, idx);
25501 return NEW_ATTRASGN(recv, tASET, idx, loc);
25502}
25503
25504static void
25505block_dup_check(struct parser_params *p, NODE *node1, NODE *node2)
25506{
25507 if (node2 && node1 && nd_type_p(node1, NODE_BLOCK_PASS)) {
25508 compile_error(p, "both block arg and actual block given");
25509 }
25510}
25511
25512static NODE *
25513attrset(struct parser_params *p, NODE *recv, ID atype, ID id, const YYLTYPE *loc)
25514{
25515 if (!CALL_Q_P(atype)) id = rb_id_attrset(id);
25516 return NEW_ATTRASGN(recv, id, 0, loc);
25517}
25518
25519static VALUE
25520rb_backref_error(struct parser_params *p, NODE *node)
25521{
25522#ifndef RIPPER
25523# define ERR(...) (compile_error(p, __VA_ARGS__), Qtrue)
25524#else
25525# define ERR(...) rb_sprintf(__VA_ARGS__)
25526#endif
25527 switch (nd_type(node)) {
25528 case NODE_NTH_REF:
25529 return ERR("Can't set variable $%ld", RNODE_NTH_REF(node)->nd_nth);
25530 case NODE_BACK_REF:
25531 return ERR("Can't set variable $%c", (int)RNODE_BACK_REF(node)->nd_nth);
25532 }
25533#undef ERR
25534 UNREACHABLE_RETURN(Qfalse); /* only called on syntax error */
25535}
25536
25537static NODE *
25538arg_append(struct parser_params *p, NODE *node1, NODE *node2, const YYLTYPE *loc)
25539{
25540 if (!node1) return NEW_LIST(node2, &node2->nd_loc);
25541 switch (nd_type(node1)) {
25542 case NODE_LIST:
25543 return list_append(p, node1, node2);
25544 case NODE_BLOCK_PASS:
25545 RNODE_BLOCK_PASS(node1)->nd_head = arg_append(p, RNODE_BLOCK_PASS(node1)->nd_head, node2, loc);
25546 node1->nd_loc.end_pos = RNODE_BLOCK_PASS(node1)->nd_head->nd_loc.end_pos;
25547 return node1;
25548 case NODE_ARGSPUSH:
25549 RNODE_ARGSPUSH(node1)->nd_body = list_append(p, NEW_LIST(RNODE_ARGSPUSH(node1)->nd_body, &RNODE_ARGSPUSH(node1)->nd_body->nd_loc), node2);
25550 node1->nd_loc.end_pos = RNODE_ARGSPUSH(node1)->nd_body->nd_loc.end_pos;
25551 nd_set_type(node1, NODE_ARGSCAT);
25552 return node1;
25553 case NODE_ARGSCAT:
25554 if (!nd_type_p(RNODE_ARGSCAT(node1)->nd_body, NODE_LIST)) break;
25555 RNODE_ARGSCAT(node1)->nd_body = list_append(p, RNODE_ARGSCAT(node1)->nd_body, node2);
25556 node1->nd_loc.end_pos = RNODE_ARGSCAT(node1)->nd_body->nd_loc.end_pos;
25557 return node1;
25558 }
25559 return NEW_ARGSPUSH(node1, node2, loc);
25560}
25561
25562static NODE *
25563arg_concat(struct parser_params *p, NODE *node1, NODE *node2, const YYLTYPE *loc)
25564{
25565 if (!node2) return node1;
25566 switch (nd_type(node1)) {
25567 case NODE_BLOCK_PASS:
25568 if (RNODE_BLOCK_PASS(node1)->nd_head)
25569 RNODE_BLOCK_PASS(node1)->nd_head = arg_concat(p, RNODE_BLOCK_PASS(node1)->nd_head, node2, loc);
25570 else
25571 RNODE_LIST(node1)->nd_head = NEW_LIST(node2, loc);
25572 return node1;
25573 case NODE_ARGSPUSH:
25574 if (!nd_type_p(node2, NODE_LIST)) break;
25575 RNODE_ARGSPUSH(node1)->nd_body = list_concat(NEW_LIST(RNODE_ARGSPUSH(node1)->nd_body, loc), node2);
25576 nd_set_type(node1, NODE_ARGSCAT);
25577 return node1;
25578 case NODE_ARGSCAT:
25579 if (!nd_type_p(node2, NODE_LIST) ||
25580 !nd_type_p(RNODE_ARGSCAT(node1)->nd_body, NODE_LIST)) break;
25581 RNODE_ARGSCAT(node1)->nd_body = list_concat(RNODE_ARGSCAT(node1)->nd_body, node2);
25582 return node1;
25583 }
25584 return NEW_ARGSCAT(node1, node2, loc);
25585}
25586
25587static NODE *
25588last_arg_append(struct parser_params *p, NODE *args, NODE *last_arg, const YYLTYPE *loc)
25589{
25590 NODE *n1;
25591 if ((n1 = splat_array(args)) != 0) {
25592 return list_append(p, n1, last_arg);
25593 }
25594 return arg_append(p, args, last_arg, loc);
25595}
25596
25597static NODE *
25598rest_arg_append(struct parser_params *p, NODE *args, NODE *rest_arg, const YYLTYPE *loc)
25599{
25600 NODE *n1;
25601 if ((nd_type_p(rest_arg, NODE_LIST)) && (n1 = splat_array(args)) != 0) {
25602 return list_concat(n1, rest_arg);
25603 }
25604 return arg_concat(p, args, rest_arg, loc);
25605}
25606
25607static NODE *
25608splat_array(NODE* node)
25609{
25610 if (nd_type_p(node, NODE_SPLAT)) node = RNODE_SPLAT(node)->nd_head;
25611 if (nd_type_p(node, NODE_LIST)) return node;
25612 return 0;
25613}
25614
25615static void
25616mark_lvar_used(struct parser_params *p, NODE *rhs)
25617{
25618 ID *vidp = NULL;
25619 if (!rhs) return;
25620 switch (nd_type(rhs)) {
25621 case NODE_LASGN:
25622 if (local_id_ref(p, RNODE_LASGN(rhs)->nd_vid, &vidp)) {
25623 if (vidp) *vidp |= LVAR_USED;
25624 }
25625 break;
25626 case NODE_DASGN:
25627 if (dvar_defined_ref(p, RNODE_DASGN(rhs)->nd_vid, &vidp)) {
25628 if (vidp) *vidp |= LVAR_USED;
25629 }
25630 break;
25631#if 0
25632 case NODE_MASGN:
25633 for (rhs = rhs->nd_head; rhs; rhs = rhs->nd_next) {
25634 mark_lvar_used(p, rhs->nd_head);
25635 }
25636 break;
25637#endif
25638 }
25639}
25640
25641static int is_static_content(NODE *node);
25642
25643static NODE *
25644node_assign(struct parser_params *p, NODE *lhs, NODE *rhs, struct lex_context ctxt, const YYLTYPE *loc)
25645{
25646 if (!lhs) return 0;
25647
25648 switch (nd_type(lhs)) {
25649 case NODE_CDECL:
25650 case NODE_GASGN:
25651 case NODE_IASGN:
25652 case NODE_LASGN:
25653 case NODE_DASGN:
25654 case NODE_MASGN:
25655 case NODE_CVASGN:
25656 set_nd_value(p, lhs, rhs);
25657 nd_set_loc(lhs, loc);
25658 break;
25659
25660 case NODE_ATTRASGN:
25661 RNODE_ATTRASGN(lhs)->nd_args = arg_append(p, RNODE_ATTRASGN(lhs)->nd_args, rhs, loc);
25662 nd_set_loc(lhs, loc);
25663 break;
25664
25665 default:
25666 /* should not happen */
25667 break;
25668 }
25669
25670 return lhs;
25671}
25672
25673static NODE *
25674value_expr_check(struct parser_params *p, NODE *node)
25675{
25676 NODE *void_node = 0, *vn;
25677
25678 if (!node) {
25679 rb_warning0("empty expression");
25680 }
25681 while (node) {
25682 switch (nd_type(node)) {
25683 case NODE_ENSURE:
25684 vn = RNODE_ENSURE(node)->nd_head;
25685 node = RNODE_ENSURE(node)->nd_ensr;
25686 /* nd_ensr should not be NULL, check it out next */
25687 if (vn && (vn = value_expr_check(p, vn))) {
25688 goto found;
25689 }
25690 break;
25691
25692 case NODE_RESCUE:
25693 /* void only if all children are void */
25694 vn = RNODE_RESCUE(node)->nd_head;
25695 if (!vn || !(vn = value_expr_check(p, vn))) {
25696 if (!RNODE_RESCUE(node)->nd_else) return NULL;
25697 }
25698 if (!void_node) void_node = vn;
25699 for (NODE *r = RNODE_RESCUE(node)->nd_resq; r; r = RNODE_RESBODY(r)->nd_next) {
25700 if (!nd_type_p(r, NODE_RESBODY)) {
25701 compile_error(p, "unexpected node");
25702 return NULL;
25703 }
25704 if (!(vn = value_expr_check(p, RNODE_RESBODY(r)->nd_body))) {
25705 return NULL;
25706 }
25707 if (!void_node) void_node = vn;
25708 }
25709 node = RNODE_RESCUE(node)->nd_else;
25710 if (!node) return void_node;
25711 break;
25712
25713 case NODE_RETURN:
25714 case NODE_BREAK:
25715 case NODE_NEXT:
25716 case NODE_REDO:
25717 case NODE_RETRY:
25718 goto found;
25719
25720 case NODE_CASE:
25721 case NODE_CASE2:
25722 for (node = RNODE_CASE(node)->nd_body;
25723 node && nd_type_p(node, NODE_WHEN);
25724 node = RNODE_WHEN(node)->nd_next) {
25725 if (!(vn = value_expr_check(p, RNODE_WHEN(node)->nd_body))) {
25726 return NULL;
25727 }
25728 if (!void_node) void_node = vn;
25729 }
25730 break;
25731
25732 case NODE_CASE3:
25733 {
25734 NODE *in = RNODE_CASE3(node)->nd_body;
25735 if (!in || !nd_type_p(in, NODE_IN)) {
25736 compile_error(p, "unexpected node");
25737 return NULL;
25738 }
25739 if (!RNODE_IN(in)->nd_body) {
25740 /* single line pattern matching with "=>" operator */
25741 goto found;
25742 }
25743 do {
25744 vn = value_expr_check(p, RNODE_IN(in)->nd_body);
25745 if (!vn) return NULL;
25746 if (!void_node) void_node = vn;
25747 in = RNODE_IN(in)->nd_next;
25748 } while (in && nd_type_p(in, NODE_IN));
25749 node = in; /* else */
25750 }
25751 break;
25752
25753 case NODE_BLOCK:
25754 while (RNODE_BLOCK(node)->nd_next) {
25755 vn = value_expr_check(p, RNODE_BLOCK(node)->nd_head);
25756 if (vn) return vn;
25757 node = RNODE_BLOCK(node)->nd_next;
25758 }
25759 node = RNODE_BLOCK(node)->nd_head;
25760 break;
25761
25762 case NODE_BEGIN:
25763 node = RNODE_BEGIN(node)->nd_body;
25764 break;
25765
25766 case NODE_IF:
25767 case NODE_UNLESS:
25768 if (!RNODE_IF(node)->nd_body) {
25769 return NULL;
25770 }
25771 else if (!RNODE_IF(node)->nd_else) {
25772 return NULL;
25773 }
25774 vn = value_expr_check(p, RNODE_IF(node)->nd_body);
25775 if (!vn) return NULL;
25776 if (!void_node) void_node = vn;
25777 node = RNODE_IF(node)->nd_else;
25778 break;
25779
25780 case NODE_AND:
25781 case NODE_OR:
25782 /* The left operand was already checked for a value when logop()
25783 * built this node, so stop here instead of re-reporting the same
25784 * void value once per operator in a chain. */
25785 return NULL;
25786
25787 case NODE_LASGN:
25788 case NODE_DASGN:
25789 case NODE_MASGN:
25790 mark_lvar_used(p, node);
25791 return NULL;
25792
25793 default:
25794 return NULL;
25795 }
25796 }
25797
25798 return NULL;
25799
25800 found:
25801 /* return the first found node */
25802 return void_node ? void_node : node;
25803}
25804
25805static int
25806value_expr(struct parser_params *p, NODE *node)
25807{
25808 NODE *void_node = value_expr_check(p, node);
25809 if (void_node) {
25810 yyerror1(&void_node->nd_loc, "void value expression");
25811 /* or "control never reach"? */
25812 return FALSE;
25813 }
25814 return TRUE;
25815}
25816
25817static void
25818void_expr(struct parser_params *p, NODE *node)
25819{
25820 const char *useless = 0;
25821
25822 if (!RTEST(ruby_verbose)) return;
25823
25824 if (!node || !(node = nd_once_body(node))) return;
25825 switch (nd_type(node)) {
25826 case NODE_OPCALL:
25827 switch (RNODE_OPCALL(node)->nd_mid) {
25828 case '+':
25829 case '-':
25830 case '*':
25831 case '/':
25832 case '%':
25833 case tPOW:
25834 case tUPLUS:
25835 case tUMINUS:
25836 case '|':
25837 case '^':
25838 case '&':
25839 case tCMP:
25840 case '>':
25841 case tGEQ:
25842 case '<':
25843 case tLEQ:
25844 case tEQ:
25845 case tNEQ:
25846 useless = rb_id2name(RNODE_OPCALL(node)->nd_mid);
25847 break;
25848 }
25849 break;
25850
25851 case NODE_LVAR:
25852 case NODE_DVAR:
25853 case NODE_GVAR:
25854 case NODE_IVAR:
25855 case NODE_CVAR:
25856 case NODE_NTH_REF:
25857 case NODE_BACK_REF:
25858 useless = "a variable";
25859 break;
25860 case NODE_CONST:
25861 useless = "a constant";
25862 break;
25863 case NODE_SYM:
25864 case NODE_LINE:
25865 case NODE_FILE:
25866 case NODE_ENCODING:
25867 case NODE_INTEGER:
25868 case NODE_FLOAT:
25869 case NODE_RATIONAL:
25870 case NODE_IMAGINARY:
25871 case NODE_STR:
25872 case NODE_DSTR:
25873 case NODE_REGX:
25874 case NODE_DREGX:
25875 useless = "a literal";
25876 break;
25877 case NODE_COLON2:
25878 case NODE_COLON3:
25879 useless = "::";
25880 break;
25881 case NODE_DOT2:
25882 useless = "..";
25883 break;
25884 case NODE_DOT3:
25885 useless = "...";
25886 break;
25887 case NODE_SELF:
25888 useless = "self";
25889 break;
25890 case NODE_NIL:
25891 useless = "nil";
25892 break;
25893 case NODE_TRUE:
25894 useless = "true";
25895 break;
25896 case NODE_FALSE:
25897 useless = "false";
25898 break;
25899 case NODE_DEFINED:
25900 useless = "defined?";
25901 break;
25902 }
25903
25904 if (useless) {
25905 rb_warn1L(nd_line(node), "possibly useless use of %s in void context", WARN_S(useless));
25906 }
25907}
25908
25909/* warns useless use of block and returns the last statement node */
25910static NODE *
25911void_stmts(struct parser_params *p, NODE *node)
25912{
25913 NODE *const n = node;
25914 if (!RTEST(ruby_verbose)) return n;
25915 if (!node) return n;
25916 if (!nd_type_p(node, NODE_BLOCK)) return n;
25917
25918 while (RNODE_BLOCK(node)->nd_next) {
25919 void_expr(p, RNODE_BLOCK(node)->nd_head);
25920 node = RNODE_BLOCK(node)->nd_next;
25921 }
25922 return RNODE_BLOCK(node)->nd_head;
25923}
25924
25925static NODE *
25926remove_begin(NODE *node)
25927{
25928 NODE **n = &node, *n1 = node;
25929 while (n1 && nd_type_p(n1, NODE_BEGIN) && RNODE_BEGIN(n1)->nd_body) {
25930 *n = n1 = RNODE_BEGIN(n1)->nd_body;
25931 }
25932 return node;
25933}
25934
25935static void
25936reduce_nodes(struct parser_params *p, NODE **body)
25937{
25938 NODE *node = *body;
25939
25940 if (!node) {
25941 *body = NEW_NIL(&NULL_LOC);
25942 return;
25943 }
25944#define subnodes(type, n1, n2) \
25945 ((!type(node)->n1) ? (type(node)->n2 ? (body = &type(node)->n2, 1) : 0) : \
25946 (!type(node)->n2) ? (body = &type(node)->n1, 1) : \
25947 (reduce_nodes(p, &type(node)->n1), body = &type(node)->n2, 1))
25948
25949 while (node) {
25950 int newline = (int)nd_fl_newline(node);
25951 switch (nd_type(node)) {
25952 end:
25953 case NODE_NIL:
25954 *body = 0;
25955 return;
25956 case NODE_BEGIN:
25957 *body = node = RNODE_BEGIN(node)->nd_body;
25958 if (newline && node) nd_set_fl_newline(node);
25959 continue;
25960 case NODE_BLOCK:
25961 body = &RNODE_BLOCK(RNODE_BLOCK(node)->nd_end)->nd_head;
25962 break;
25963 case NODE_IF:
25964 case NODE_UNLESS:
25965 if (subnodes(RNODE_IF, nd_body, nd_else)) break;
25966 return;
25967 case NODE_CASE:
25968 body = &RNODE_CASE(node)->nd_body;
25969 break;
25970 case NODE_WHEN:
25971 if (!subnodes(RNODE_WHEN, nd_body, nd_next)) goto end;
25972 break;
25973 case NODE_ENSURE:
25974 body = &RNODE_ENSURE(node)->nd_head;
25975 break;
25976 case NODE_RESCUE:
25977 newline = 0; // RESBODY should not be a NEWLINE
25978 if (RNODE_RESCUE(node)->nd_else) {
25979 body = &RNODE_RESCUE(node)->nd_resq;
25980 break;
25981 }
25982 if (!subnodes(RNODE_RESCUE, nd_head, nd_resq)) goto end;
25983 break;
25984 default:
25985 return;
25986 }
25987 node = *body;
25988 if (newline && node) nd_set_fl_newline(node);
25989 }
25990
25991#undef subnodes
25992}
25993
25994static int
25995is_static_content(NODE *node)
25996{
25997 if (!node) return 1;
25998 switch (nd_type(node)) {
25999 case NODE_HASH:
26000 if (!(node = RNODE_HASH(node)->nd_head)) break;
26001 case NODE_LIST:
26002 do {
26003 if (!is_static_content(RNODE_LIST(node)->nd_head)) return 0;
26004 } while ((node = RNODE_LIST(node)->nd_next) != 0);
26005 case NODE_SYM:
26006 case NODE_REGX:
26007 case NODE_LINE:
26008 case NODE_FILE:
26009 case NODE_ENCODING:
26010 case NODE_INTEGER:
26011 case NODE_FLOAT:
26012 case NODE_RATIONAL:
26013 case NODE_IMAGINARY:
26014 case NODE_STR:
26015 case NODE_NIL:
26016 case NODE_TRUE:
26017 case NODE_FALSE:
26018 case NODE_ZLIST:
26019 break;
26020 default:
26021 return 0;
26022 }
26023 return 1;
26024}
26025
26026static int
26027assign_in_cond(struct parser_params *p, NODE *node)
26028{
26029 switch (nd_type(node)) {
26030 case NODE_MASGN:
26031 case NODE_LASGN:
26032 case NODE_DASGN:
26033 case NODE_GASGN:
26034 case NODE_IASGN:
26035 case NODE_CVASGN:
26036 case NODE_CDECL:
26037 break;
26038
26039 default:
26040 return 0;
26041 }
26042
26043 if (!get_nd_value(p, node)) return 1;
26044 if (is_static_content(get_nd_value(p, node))) {
26045 /* reports always */
26046 rb_warn0L(nd_line(get_nd_value(p, node)), "found '= literal' in conditional, should be ==");
26047 }
26048 return 1;
26049}
26050
26051enum cond_type {
26052 COND_IN_OP,
26053 COND_IN_COND,
26054 COND_IN_FF
26055};
26056
26057#define SWITCH_BY_COND_TYPE(t, w, arg) do { \
26058 switch (t) { \
26059 case COND_IN_OP: break; \
26060 case COND_IN_COND: rb_##w##0(arg "literal in condition"); break; \
26061 case COND_IN_FF: rb_##w##0(arg "literal in flip-flop"); break; \
26062 } \
26063} while (0)
26064
26065static NODE *cond0(struct parser_params*,NODE*,enum cond_type,const YYLTYPE*,bool);
26066
26067static NODE*
26068range_op(struct parser_params *p, NODE *node, const YYLTYPE *loc)
26069{
26070 enum node_type type;
26071
26072 if (node == 0) return 0;
26073
26074 type = nd_type(node);
26075 value_expr(p, node);
26076 if (type == NODE_INTEGER) {
26077 if (!e_option_supplied(p)) rb_warn0L(nd_line(node), "integer literal in flip-flop");
26078 ID lineno = rb_intern("$.");
26079 return NEW_CALL(node, tEQ, NEW_LIST(NEW_GVAR(lineno, loc), loc), loc);
26080 }
26081 return cond0(p, node, COND_IN_FF, loc, true);
26082}
26083
26084static NODE*
26085cond0(struct parser_params *p, NODE *node, enum cond_type type, const YYLTYPE *loc, bool top)
26086{
26087 if (node == 0) return 0;
26088 if (!(node = nd_once_body(node))) return 0;
26089 assign_in_cond(p, node);
26090
26091 switch (nd_type(node)) {
26092 case NODE_BEGIN:
26093 RNODE_BEGIN(node)->nd_body = cond0(p, RNODE_BEGIN(node)->nd_body, type, loc, top);
26094 break;
26095
26096 case NODE_DSTR:
26097 case NODE_EVSTR:
26098 case NODE_STR:
26099 case NODE_FILE:
26100 SWITCH_BY_COND_TYPE(type, warn, "string ");
26101 break;
26102
26103 case NODE_REGX:
26104 if (!e_option_supplied(p)) SWITCH_BY_COND_TYPE(type, warn, "regex ");
26105 nd_set_type(node, NODE_MATCH);
26106 break;
26107
26108 case NODE_DREGX:
26109 if (!e_option_supplied(p)) SWITCH_BY_COND_TYPE(type, warning, "regex ");
26110
26111 return NEW_MATCH2(node, NEW_GVAR(idLASTLINE, loc), loc);
26112
26113 case NODE_BLOCK:
26114 {
26115 NODE *end = RNODE_BLOCK(node)->nd_end;
26116 NODE **expr = &RNODE_BLOCK(end)->nd_head;
26117 if (top) top = node == end;
26118 *expr = cond0(p, *expr, type, loc, top);
26119 }
26120 break;
26121
26122 case NODE_AND:
26123 case NODE_OR:
26124 RNODE_AND(node)->nd_1st = cond0(p, RNODE_AND(node)->nd_1st, COND_IN_COND, loc, true);
26125 RNODE_AND(node)->nd_2nd = cond0(p, RNODE_AND(node)->nd_2nd, COND_IN_COND, loc, true);
26126 break;
26127
26128 case NODE_DOT2:
26129 case NODE_DOT3:
26130 if (!top) break;
26131 RNODE_DOT2(node)->nd_beg = range_op(p, RNODE_DOT2(node)->nd_beg, loc);
26132 RNODE_DOT2(node)->nd_end = range_op(p, RNODE_DOT2(node)->nd_end, loc);
26133 switch (nd_type(node)) {
26134 case NODE_DOT2:
26135 nd_set_type(node,NODE_FLIP2);
26136 rb_node_flip2_t *flip2 = RNODE_FLIP2(node); /* for debug info */
26137 (void)flip2;
26138 break;
26139 case NODE_DOT3:
26140 nd_set_type(node, NODE_FLIP3);
26141 rb_node_flip3_t *flip3 = RNODE_FLIP3(node); /* for debug info */
26142 (void)flip3;
26143 break;
26144 }
26145 break;
26146
26147 case NODE_SYM:
26148 case NODE_DSYM:
26149 SWITCH_BY_COND_TYPE(type, warning, "symbol ");
26150 break;
26151
26152 case NODE_LINE:
26153 case NODE_ENCODING:
26154 case NODE_INTEGER:
26155 case NODE_FLOAT:
26156 case NODE_RATIONAL:
26157 case NODE_IMAGINARY:
26158 SWITCH_BY_COND_TYPE(type, warning, "");
26159 break;
26160
26161 default:
26162 break;
26163 }
26164 return node;
26165}
26166
26167static NODE*
26168cond(struct parser_params *p, NODE *node, const YYLTYPE *loc)
26169{
26170 if (node == 0) return 0;
26171 return cond0(p, node, COND_IN_COND, loc, true);
26172}
26173
26174static NODE*
26175method_cond(struct parser_params *p, NODE *node, const YYLTYPE *loc)
26176{
26177 if (node == 0) return 0;
26178 return cond0(p, node, COND_IN_OP, loc, true);
26179}
26180
26181static NODE*
26182new_nil_at(struct parser_params *p, const rb_code_position_t *pos)
26183{
26184 YYLTYPE loc = {*pos, *pos};
26185 return NEW_NIL(&loc);
26186}
26187
26188static NODE*
26189new_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)
26190{
26191 if (!cc) return right;
26192 cc = cond0(p, cc, COND_IN_COND, loc, true);
26193 return newline_node(NEW_IF(cc, left, right, loc, if_keyword_loc, then_keyword_loc, end_keyword_loc));
26194}
26195
26196static NODE*
26197new_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)
26198{
26199 if (!cc) return right;
26200 cc = cond0(p, cc, COND_IN_COND, loc, true);
26201 return newline_node(NEW_UNLESS(cc, left, right, loc, keyword_loc, then_keyword_loc, end_keyword_loc));
26202}
26203
26204#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))
26205
26206static NODE*
26207logop(struct parser_params *p, ID id, NODE *left, NODE *right,
26208 const YYLTYPE *op_loc, const YYLTYPE *loc)
26209{
26210 enum node_type type = id == idAND || id == idANDOP ? NODE_AND : NODE_OR;
26211 NODE *op;
26212 value_expr(p, left);
26213 if (left && nd_type_p(left, type)) {
26214 NODE *node = left, *second;
26215 while ((second = RNODE_AND(node)->nd_2nd) != 0 && nd_type_p(second, type)) {
26216 node = second;
26217 }
26218 RNODE_AND(node)->nd_2nd = NEW_AND_OR(type, second, right, loc, op_loc);
26219 nd_set_line(RNODE_AND(node)->nd_2nd, op_loc->beg_pos.lineno);
26220 left->nd_loc.end_pos = loc->end_pos;
26221 return left;
26222 }
26223 op = NEW_AND_OR(type, left, right, loc, op_loc);
26224 nd_set_line(op, op_loc->beg_pos.lineno);
26225 return op;
26226}
26227
26228#undef NEW_AND_OR
26229
26230static void
26231no_blockarg(struct parser_params *p, NODE *node)
26232{
26233 if (nd_type_p(node, NODE_BLOCK_PASS)) {
26234 compile_error(p, "block argument should not be given");
26235 }
26236}
26237
26238static NODE *
26239ret_args(struct parser_params *p, NODE *node)
26240{
26241 if (node) {
26242 no_blockarg(p, node);
26243 if (nd_type_p(node, NODE_LIST) && !RNODE_LIST(node)->nd_next) {
26244 node = RNODE_LIST(node)->nd_head;
26245 }
26246 }
26247 return node;
26248}
26249
26250static NODE*
26251negate_lit(struct parser_params *p, NODE* node, const YYLTYPE *loc)
26252{
26253 switch (nd_type(node)) {
26254 case NODE_INTEGER:
26255 RNODE_INTEGER(node)->minus = TRUE;
26256 break;
26257 case NODE_FLOAT:
26258 RNODE_FLOAT(node)->minus = TRUE;
26259 break;
26260 case NODE_RATIONAL:
26261 RNODE_RATIONAL(node)->minus = TRUE;
26262 break;
26263 case NODE_IMAGINARY:
26264 RNODE_IMAGINARY(node)->minus = TRUE;
26265 break;
26266 }
26267 node->nd_loc = *loc;
26268 return node;
26269}
26270
26271static NODE *
26272arg_blk_pass(NODE *node1, rb_node_block_pass_t *node2)
26273{
26274 if (node2) {
26275 if (!node1) return (NODE *)node2;
26276 node2->nd_head = node1;
26277 nd_set_first_lineno(node2, nd_first_lineno(node1));
26278 nd_set_first_column(node2, nd_first_column(node1));
26279 return (NODE *)node2;
26280 }
26281 return node1;
26282}
26283
26284static bool
26285args_info_empty_p(struct rb_args_info *args)
26286{
26287 if (args->pre_args_num) return false;
26288 if (args->post_args_num) return false;
26289 if (args->rest_arg) return false;
26290 if (args->opt_args) return false;
26291 if (args->block_arg) return false;
26292 if (args->kw_args) return false;
26293 if (args->kw_rest_arg) return false;
26294 return true;
26295}
26296
26297static rb_node_args_t *
26298new_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)
26299{
26300 struct rb_args_info *args = &tail->nd_ainfo;
26301
26302 if (args->forwarding) {
26303 if (rest_arg) {
26304 yyerror1(&RNODE(tail)->nd_loc, "... after rest argument");
26305 return tail;
26306 }
26307 rest_arg = idFWD_REST;
26308 }
26309
26310 args->pre_args_num = pre_args ? pre_args->nd_plen : 0;
26311 args->pre_init = pre_args ? pre_args->nd_next : 0;
26312
26313 args->post_args_num = post_args ? post_args->nd_plen : 0;
26314 args->post_init = post_args ? post_args->nd_next : 0;
26315 args->first_post_arg = post_args ? post_args->nd_pid : 0;
26316
26317 args->rest_arg = rest_arg;
26318
26319 args->opt_args = opt_args;
26320
26321 nd_set_loc(RNODE(tail), loc);
26322
26323 return tail;
26324}
26325
26326static rb_node_args_t *
26327new_args_tail(struct parser_params *p, rb_node_kw_arg_t *kw_args, ID kw_rest_arg, ID block, const YYLTYPE *kw_rest_loc)
26328{
26329 rb_node_args_t *node = NEW_ARGS(&NULL_LOC);
26330 struct rb_args_info *args = &node->nd_ainfo;
26331 if (p->error_p) return node;
26332
26333 if (block == idNil) {
26334 block = 0;
26335 args->no_blockarg = TRUE;
26336 }
26337 args->block_arg = block;
26338 args->kw_args = kw_args;
26339
26340 if (kw_args) {
26341 /*
26342 * def foo(k1: 1, kr1:, k2: 2, **krest, &b)
26343 * variable order: k1, kr1, k2, &b, internal_id, krest
26344 * #=> <reorder>
26345 * variable order: kr1, k1, k2, internal_id, krest, &b
26346 */
26347 ID kw_bits = internal_id(p), *required_kw_vars, *kw_vars;
26348 struct vtable *vtargs = p->lvtbl->args;
26349 rb_node_kw_arg_t *kwn = kw_args;
26350
26351 if (block) block = vtargs->tbl[vtargs->pos-1];
26352 vtable_pop(vtargs, !!block + !!kw_rest_arg);
26353 required_kw_vars = kw_vars = &vtargs->tbl[vtargs->pos];
26354 while (kwn) {
26355 if (!NODE_REQUIRED_KEYWORD_P(get_nd_value(p, kwn->nd_body)))
26356 --kw_vars;
26357 --required_kw_vars;
26358 kwn = kwn->nd_next;
26359 }
26360
26361 for (kwn = kw_args; kwn; kwn = kwn->nd_next) {
26362 ID vid = get_nd_vid(p, kwn->nd_body);
26363 if (NODE_REQUIRED_KEYWORD_P(get_nd_value(p, kwn->nd_body))) {
26364 *required_kw_vars++ = vid;
26365 }
26366 else {
26367 *kw_vars++ = vid;
26368 }
26369 }
26370
26371 arg_var(p, kw_bits);
26372 if (kw_rest_arg) arg_var(p, kw_rest_arg);
26373 if (block) arg_var(p, block);
26374
26375 args->kw_rest_arg = NEW_DVAR(kw_rest_arg, kw_rest_loc);
26376 }
26377 else if (kw_rest_arg == idNil) {
26378 args->no_kwarg = 1;
26379 }
26380 else if (kw_rest_arg) {
26381 args->kw_rest_arg = NEW_DVAR(kw_rest_arg, kw_rest_loc);
26382 }
26383
26384 return node;
26385}
26386
26387static rb_node_args_t *
26388args_with_numbered(struct parser_params *p, rb_node_args_t *args, int max_numparam, ID it_id)
26389{
26390 if (max_numparam > NO_PARAM || it_id) {
26391 if (!args) {
26392 YYLTYPE loc = RUBY_INIT_YYLLOC();
26393 args = new_empty_args_tail(p, 0);
26394 nd_set_loc(RNODE(args), &loc);
26395 }
26396 args->nd_ainfo.pre_args_num = it_id ? 1 : max_numparam;
26397 }
26398 return args;
26399}
26400
26401static NODE*
26402new_array_pattern(struct parser_params *p, NODE *constant, NODE *pre_arg, NODE *aryptn, const YYLTYPE *loc)
26403{
26404 RNODE_ARYPTN(aryptn)->nd_pconst = constant;
26405
26406 if (pre_arg) {
26407 NODE *pre_args = NEW_LIST(pre_arg, loc);
26408 if (RNODE_ARYPTN(aryptn)->pre_args) {
26409 RNODE_ARYPTN(aryptn)->pre_args = list_concat(pre_args, RNODE_ARYPTN(aryptn)->pre_args);
26410 }
26411 else {
26412 RNODE_ARYPTN(aryptn)->pre_args = pre_args;
26413 }
26414 }
26415 return aryptn;
26416}
26417
26418static NODE*
26419new_array_pattern_tail(struct parser_params *p, NODE *pre_args, int has_rest, NODE *rest_arg, NODE *post_args, const YYLTYPE *loc)
26420{
26421 if (has_rest) {
26422 rest_arg = rest_arg ? rest_arg : NODE_SPECIAL_NO_NAME_REST;
26423 }
26424 else {
26425 rest_arg = NULL;
26426 }
26427 NODE *node = NEW_ARYPTN(pre_args, rest_arg, post_args, loc);
26428
26429 return node;
26430}
26431
26432static NODE*
26433new_find_pattern(struct parser_params *p, NODE *constant, NODE *fndptn, const YYLTYPE *loc)
26434{
26435 RNODE_FNDPTN(fndptn)->nd_pconst = constant;
26436
26437 return fndptn;
26438}
26439
26440static NODE*
26441new_find_pattern_tail(struct parser_params *p, NODE *pre_rest_arg, NODE *args, NODE *post_rest_arg, const YYLTYPE *loc)
26442{
26443 pre_rest_arg = pre_rest_arg ? pre_rest_arg : NODE_SPECIAL_NO_NAME_REST;
26444 post_rest_arg = post_rest_arg ? post_rest_arg : NODE_SPECIAL_NO_NAME_REST;
26445 NODE *node = NEW_FNDPTN(pre_rest_arg, args, post_rest_arg, loc);
26446
26447 return node;
26448}
26449
26450static NODE*
26451new_hash_pattern(struct parser_params *p, NODE *constant, NODE *hshptn, const YYLTYPE *loc)
26452{
26453 RNODE_HSHPTN(hshptn)->nd_pconst = constant;
26454 return hshptn;
26455}
26456
26457static NODE*
26458new_hash_pattern_tail(struct parser_params *p, NODE *kw_args, ID kw_rest_arg, const YYLTYPE *loc)
26459{
26460 NODE *node, *kw_rest_arg_node;
26461
26462 if (kw_rest_arg == idNil) {
26463 kw_rest_arg_node = NODE_SPECIAL_NO_REST_KEYWORD;
26464 }
26465 else if (kw_rest_arg) {
26466 kw_rest_arg_node = assignable(p, kw_rest_arg, 0, loc);
26467 }
26468 else {
26469 kw_rest_arg_node = NULL;
26470 }
26471
26472 node = NEW_HSHPTN(0, kw_args, kw_rest_arg_node, loc);
26473
26474 return node;
26475}
26476
26477static NODE*
26478dsym_node(struct parser_params *p, NODE *node, const YYLTYPE *loc)
26479{
26480 if (!node) {
26481 return NEW_SYM(STR_NEW0(), loc);
26482 }
26483
26484 switch (nd_type(node)) {
26485 case NODE_DSTR:
26486 nd_set_type(node, NODE_DSYM);
26487 nd_set_loc(node, loc);
26488 break;
26489 case NODE_STR:
26490 node = str_to_sym_node(p, node, loc);
26491 break;
26492 default:
26493 node = NEW_DSYM(0, 1, NEW_LIST(node, loc), loc);
26494 break;
26495 }
26496 return node;
26497}
26498
26499static int
26500nd_type_st_key_enable_p(NODE *node)
26501{
26502 switch (nd_type(node)) {
26503 case NODE_INTEGER:
26504 case NODE_FLOAT:
26505 case NODE_RATIONAL:
26506 case NODE_IMAGINARY:
26507 case NODE_STR:
26508 case NODE_SYM:
26509 case NODE_REGX:
26510 case NODE_LINE:
26511 case NODE_FILE:
26512 case NODE_ENCODING:
26513 return true;
26514 default:
26515 return false;
26516 }
26517}
26518
26519static VALUE
26520nd_value(struct parser_params *p, NODE *node)
26521{
26522 switch (nd_type(node)) {
26523 case NODE_STR:
26524 return rb_node_str_string_val(node);
26525 case NODE_INTEGER:
26526 return rb_node_integer_literal_val(node);
26527 case NODE_FLOAT:
26528 return rb_node_float_literal_val(node);
26529 case NODE_RATIONAL:
26530 return rb_node_rational_literal_val(node);
26531 case NODE_IMAGINARY:
26532 return rb_node_imaginary_literal_val(node);
26533 case NODE_SYM:
26534 return rb_node_sym_string_val(node);
26535 case NODE_REGX:
26536 return rb_node_regx_string_val(node);
26537 case NODE_LINE:
26538 return rb_node_line_lineno_val(node);
26539 case NODE_ENCODING:
26540 return rb_node_encoding_val(node);
26541 case NODE_FILE:
26542 return rb_node_file_path_val(node);
26543 default:
26544 rb_bug("unexpected node: %s", ruby_node_name(nd_type(node)));
26546 }
26547}
26548
26549static void
26550warn_duplicate_keys(struct parser_params *p, NODE *hash)
26551{
26552 /* See https://bugs.ruby-lang.org/issues/20331 for discussion about what is warned. */
26553 p->warn_duplicate_keys_table = st_init_table_with_size(&literal_type, RNODE_LIST(hash)->as.nd_alen / 2);
26554 while (hash && RNODE_LIST(hash)->nd_next) {
26555 NODE *head = RNODE_LIST(hash)->nd_head;
26556 NODE *value = RNODE_LIST(hash)->nd_next;
26557 NODE *next = RNODE_LIST(value)->nd_next;
26558 st_data_t key;
26559 st_data_t data;
26560
26561 /* keyword splat, e.g. {k: 1, **z, k: 2} */
26562 if (!head) {
26563 head = value;
26564 }
26565
26566 if (nd_type_st_key_enable_p(head)) {
26567 key = (st_data_t)head;
26568
26569 if (st_delete(p->warn_duplicate_keys_table, &key, &data)) {
26570 rb_warn2L(nd_line((NODE *)data),
26571 "key %+"PRIsWARN" is duplicated and overwritten on line %d",
26572 nd_value(p, head), WARN_I(nd_line(head)));
26573 }
26574 st_insert(p->warn_duplicate_keys_table, (st_data_t)key, (st_data_t)hash);
26575 }
26576 hash = next;
26577 }
26578 st_free_table(p->warn_duplicate_keys_table);
26579 p->warn_duplicate_keys_table = NULL;
26580}
26581
26582static NODE *
26583new_hash(struct parser_params *p, NODE *hash, const YYLTYPE *loc)
26584{
26585 if (hash) warn_duplicate_keys(p, hash);
26586 return NEW_HASH(hash, loc);
26587}
26588
26589static void
26590error_duplicate_pattern_variable(struct parser_params *p, ID id, const YYLTYPE *loc)
26591{
26592 if (is_private_local_id(p, id)) {
26593 return;
26594 }
26595 if (st_is_member(p->pvtbl, id)) {
26596 yyerror1(loc, "duplicated variable name");
26597 }
26598 else if (p->ctxt.in_alt_pattern && id) {
26599 yyerror1(loc, "variable capture in alternative pattern");
26600 }
26601 else {
26602 p->ctxt.capture_in_pattern = 1;
26603 st_insert(p->pvtbl, (st_data_t)id, 0);
26604 }
26605}
26606
26607static void
26608error_duplicate_pattern_key(struct parser_params *p, VALUE key, const YYLTYPE *loc)
26609{
26610 if (!p->pktbl) {
26611 p->pktbl = st_init_numtable();
26612 }
26613 else if (st_is_member(p->pktbl, key)) {
26614 yyerror1(loc, "duplicated key name");
26615 return;
26616 }
26617 st_insert(p->pktbl, (st_data_t)key, 0);
26618}
26619
26620static NODE *
26621new_unique_key_hash(struct parser_params *p, NODE *hash, const YYLTYPE *loc)
26622{
26623 return NEW_HASH(hash, loc);
26624}
26625
26626static NODE *
26627new_op_assign(struct parser_params *p, NODE *lhs, ID op, NODE *rhs, struct lex_context ctxt, const YYLTYPE *loc)
26628{
26629 NODE *asgn;
26630
26631 if (lhs) {
26632 ID vid = get_nd_vid(p, lhs);
26633 YYLTYPE lhs_loc = lhs->nd_loc;
26634 if (op == tOROP) {
26635 set_nd_value(p, lhs, rhs);
26636 nd_set_loc(lhs, loc);
26637 asgn = NEW_OP_ASGN_OR(gettable(p, vid, &lhs_loc), lhs, loc);
26638 }
26639 else if (op == tANDOP) {
26640 set_nd_value(p, lhs, rhs);
26641 nd_set_loc(lhs, loc);
26642 asgn = NEW_OP_ASGN_AND(gettable(p, vid, &lhs_loc), lhs, loc);
26643 }
26644 else {
26645 asgn = lhs;
26646 rhs = NEW_CALL(gettable(p, vid, &lhs_loc), op, NEW_LIST(rhs, &rhs->nd_loc), loc);
26647 set_nd_value(p, asgn, rhs);
26648 nd_set_loc(asgn, loc);
26649 }
26650 }
26651 else {
26652 asgn = NEW_ERROR(loc);
26653 }
26654 return asgn;
26655}
26656
26657static NODE *
26658new_ary_op_assign(struct parser_params *p, NODE *ary,
26659 NODE *args, ID op, NODE *rhs, const YYLTYPE *args_loc, const YYLTYPE *loc,
26660 const YYLTYPE *call_operator_loc, const YYLTYPE *opening_loc, const YYLTYPE *closing_loc, const YYLTYPE *binary_operator_loc)
26661{
26662 NODE *asgn;
26663
26664 aryset_check(p, args);
26665 args = make_list(args, args_loc);
26666 asgn = NEW_OP_ASGN1(ary, op, args, rhs, loc, call_operator_loc, opening_loc, closing_loc, binary_operator_loc);
26667 fixpos(asgn, ary);
26668 return asgn;
26669}
26670
26671static NODE *
26672new_attr_op_assign(struct parser_params *p, NODE *lhs,
26673 ID atype, ID attr, ID op, NODE *rhs, const YYLTYPE *loc,
26674 const YYLTYPE *call_operator_loc, const YYLTYPE *message_loc, const YYLTYPE *binary_operator_loc)
26675{
26676 NODE *asgn;
26677
26678 asgn = NEW_OP_ASGN2(lhs, CALL_Q_P(atype), attr, op, rhs, loc, call_operator_loc, message_loc, binary_operator_loc);
26679 fixpos(asgn, lhs);
26680 return asgn;
26681}
26682
26683static NODE *
26684new_const_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 asgn = NEW_OP_CDECL(lhs, op, rhs, ctxt.shareable_constant_value, loc);
26690 }
26691 else {
26692 asgn = NEW_ERROR(loc);
26693 }
26694 fixpos(asgn, lhs);
26695 return asgn;
26696}
26697
26698static NODE *
26699const_decl(struct parser_params *p, NODE *path, const YYLTYPE *loc)
26700{
26701 if (p->ctxt.in_def) {
26702#ifndef RIPPER
26703 yyerror1(loc, "dynamic constant assignment");
26704#else
26705 set_value(assign_error(p, "dynamic constant assignment", p->s_lvalue));
26706#endif
26707 }
26708 return NEW_CDECL(0, 0, (path), p->ctxt.shareable_constant_value, loc);
26709}
26710
26711#ifdef RIPPER
26712static VALUE
26713assign_error(struct parser_params *p, const char *mesg, VALUE a)
26714{
26715 a = dispatch2(assign_error, ERR_MESG(), a);
26716 ripper_error(p);
26717 return a;
26718}
26719#endif
26720
26721static NODE *
26722new_bodystmt(struct parser_params *p, NODE *head, NODE *rescue, NODE *rescue_else, NODE *ensure, const YYLTYPE *loc)
26723{
26724 NODE *result = head;
26725 if (rescue) {
26726 NODE *tmp = rescue_else ? rescue_else : rescue;
26727 YYLTYPE rescue_loc = code_loc_gen(&head->nd_loc, &tmp->nd_loc);
26728
26729 result = NEW_RESCUE(head, rescue, rescue_else, &rescue_loc);
26730 nd_set_line(result, rescue->nd_loc.beg_pos.lineno);
26731 }
26732 if (ensure) {
26733 result = NEW_ENSURE(result, ensure, loc);
26734 }
26735 fixpos(result, head);
26736 return result;
26737}
26738
26739static void
26740warn_unused_var(struct parser_params *p, struct local_vars *local)
26741{
26742 int cnt;
26743
26744 if (!local->used) return;
26745 cnt = local->used->pos;
26746 if (cnt != local->vars->pos) {
26747 rb_parser_fatal(p, "local->used->pos != local->vars->pos");
26748 }
26749#ifndef RIPPER
26750 ID *v = local->vars->tbl;
26751 ID *u = local->used->tbl;
26752 for (int i = 0; i < cnt; ++i) {
26753 if (!v[i] || (u[i] & LVAR_USED)) continue;
26754 if (is_private_local_id(p, v[i])) continue;
26755 rb_warn1L((int)u[i], "assigned but unused variable - %"PRIsWARN, rb_id2str(v[i]));
26756 }
26757#endif
26758}
26759
26760static void
26761local_push(struct parser_params *p, int toplevel_scope)
26762{
26763 struct local_vars *local;
26764 int inherits_dvars = toplevel_scope && compile_for_eval;
26765 int warn_unused_vars = RTEST(ruby_verbose);
26766
26767 local = ALLOC(struct local_vars);
26768 local->prev = p->lvtbl;
26769 local->args = vtable_alloc(0);
26770 local->vars = vtable_alloc(inherits_dvars ? DVARS_INHERIT : DVARS_TOPSCOPE);
26771#ifndef RIPPER
26772 if (toplevel_scope && compile_for_eval) warn_unused_vars = 0;
26773 if (toplevel_scope && e_option_supplied(p)) warn_unused_vars = 0;
26774#endif
26775 local->numparam.outer = 0;
26776 local->numparam.inner = 0;
26777 local->numparam.current = 0;
26778 local->it = 0;
26779 local->used = warn_unused_vars ? vtable_alloc(0) : 0;
26780
26781# if WARN_PAST_SCOPE
26782 local->past = 0;
26783# endif
26784 CMDARG_PUSH(0);
26785 COND_PUSH(0);
26786 p->lvtbl = local;
26787}
26788
26789static void
26790vtable_chain_free(struct parser_params *p, struct vtable *table)
26791{
26792 while (!DVARS_TERMINAL_P(table)) {
26793 struct vtable *cur_table = table;
26794 table = cur_table->prev;
26795 vtable_free(cur_table);
26796 }
26797}
26798
26799static void
26800local_free(struct parser_params *p, struct local_vars *local)
26801{
26802 vtable_chain_free(p, local->used);
26803
26804# if WARN_PAST_SCOPE
26805 vtable_chain_free(p, local->past);
26806# endif
26807
26808 vtable_chain_free(p, local->args);
26809 vtable_chain_free(p, local->vars);
26810
26811 ruby_xfree_sized(local, sizeof(struct local_vars));
26812}
26813
26814static void
26815local_pop(struct parser_params *p)
26816{
26817 struct local_vars *local = p->lvtbl->prev;
26818 if (p->lvtbl->used) {
26819 warn_unused_var(p, p->lvtbl);
26820 }
26821
26822 local_free(p, p->lvtbl);
26823 p->lvtbl = local;
26824
26825 CMDARG_POP();
26826 COND_POP();
26827}
26828
26829static rb_ast_id_table_t *
26830local_tbl(struct parser_params *p)
26831{
26832 int cnt_args = vtable_size(p->lvtbl->args);
26833 int cnt_vars = vtable_size(p->lvtbl->vars);
26834 int cnt = cnt_args + cnt_vars;
26835 int i, j;
26836 rb_ast_id_table_t *tbl;
26837
26838 if (cnt <= 0) return 0;
26839 tbl = rb_ast_new_local_table(p->ast, cnt);
26840 MEMCPY(tbl->ids, p->lvtbl->args->tbl, ID, cnt_args);
26841 /* remove IDs duplicated to warn shadowing */
26842 for (i = 0, j = cnt_args; i < cnt_vars; ++i) {
26843 ID id = p->lvtbl->vars->tbl[i];
26844 if (!vtable_included(p->lvtbl->args, id)) {
26845 tbl->ids[j++] = id;
26846 }
26847 }
26848 if (j < cnt) {
26849 tbl = rb_ast_resize_latest_local_table(p->ast, j);
26850 }
26851
26852 return tbl;
26853}
26854
26855static void
26856numparam_name(struct parser_params *p, ID id)
26857{
26858 if (!NUMPARAM_ID_P(id)) return;
26859 compile_error(p, "_%d is reserved for numbered parameter",
26860 NUMPARAM_ID_TO_IDX(id));
26861}
26862
26863static void
26864arg_var(struct parser_params *p, ID id)
26865{
26866 numparam_name(p, id);
26867 vtable_add(p->lvtbl->args, id);
26868}
26869
26870static void
26871local_var(struct parser_params *p, ID id)
26872{
26873 numparam_name(p, id);
26874 vtable_add(p->lvtbl->vars, id);
26875 if (p->lvtbl->used) {
26876 vtable_add(p->lvtbl->used, (ID)p->ruby_sourceline);
26877 }
26878}
26879
26880#ifndef RIPPER
26881int
26882rb_parser_local_defined(struct parser_params *p, ID id, const struct rb_iseq_struct *iseq)
26883{
26884 return rb_local_defined(id, iseq);
26885}
26886#endif
26887
26888static int
26889local_id_ref(struct parser_params *p, ID id, ID **vidrefp)
26890{
26891 struct vtable *vars, *args, *used;
26892
26893 vars = p->lvtbl->vars;
26894 args = p->lvtbl->args;
26895 used = p->lvtbl->used;
26896
26897 while (vars && !DVARS_TERMINAL_P(vars->prev)) {
26898 vars = vars->prev;
26899 args = args->prev;
26900 if (used) used = used->prev;
26901 }
26902
26903 if (vars && vars->prev == DVARS_INHERIT) {
26904 return rb_parser_local_defined(p, id, p->parent_iseq);
26905 }
26906 else if (vtable_included(args, id)) {
26907 return 1;
26908 }
26909 else {
26910 int i = vtable_included(vars, id);
26911 if (i && used && vidrefp) *vidrefp = &used->tbl[i-1];
26912 return i != 0;
26913 }
26914}
26915
26916static int
26917local_id(struct parser_params *p, ID id)
26918{
26919 return local_id_ref(p, id, NULL);
26920}
26921
26922static int
26923check_forwarding_args(struct parser_params *p)
26924{
26925 if (local_id(p, idFWD_ALL)) return TRUE;
26926 compile_error(p, "unexpected ...");
26927 return FALSE;
26928}
26929
26930static void
26931add_forwarding_args(struct parser_params *p)
26932{
26933 arg_var(p, idFWD_REST);
26934 arg_var(p, idFWD_KWREST);
26935 arg_var(p, idFWD_BLOCK);
26936 arg_var(p, idFWD_ALL);
26937}
26938
26939static void
26940forwarding_arg_check(struct parser_params *p, ID arg, ID all, const char *var)
26941{
26942 bool conflict = false;
26943
26944 struct vtable *vars, *args;
26945
26946 vars = p->lvtbl->vars;
26947 args = p->lvtbl->args;
26948
26949 while (vars && !DVARS_TERMINAL_P(vars->prev)) {
26950 conflict |= (vtable_included(args, arg) && !(all && vtable_included(args, all)));
26951 vars = vars->prev;
26952 args = args->prev;
26953 }
26954
26955 bool found = false;
26956 if (vars && vars->prev == DVARS_INHERIT && !found) {
26957 found = (rb_parser_local_defined(p, arg, p->parent_iseq) &&
26958 !(all && rb_parser_local_defined(p, all, p->parent_iseq)));
26959 }
26960 else {
26961 found = (vtable_included(args, arg) &&
26962 !(all && vtable_included(args, all)));
26963 }
26964
26965 if (!found) {
26966 compile_error(p, "no anonymous %s parameter", var);
26967 }
26968 else if (conflict) {
26969 compile_error(p, "anonymous %s parameter is also used within block", var);
26970 }
26971}
26972
26973static NODE *
26974new_args_forward_call(struct parser_params *p, NODE *leading, const YYLTYPE *loc, const YYLTYPE *argsloc)
26975{
26976 NODE *rest = NEW_LVAR(idFWD_REST, loc);
26977 NODE *kwrest = list_append(p, NEW_LIST(0, loc), NEW_LVAR(idFWD_KWREST, loc));
26978 rb_node_block_pass_t *block = NEW_BLOCK_PASS(NEW_LVAR(idFWD_BLOCK, loc), argsloc, &NULL_LOC);
26979 NODE *args = leading ? rest_arg_append(p, leading, rest, argsloc) : NEW_SPLAT(rest, loc, &NULL_LOC);
26980 block->forwarding = TRUE;
26981 args = arg_append(p, args, new_hash(p, kwrest, loc), argsloc);
26982 return arg_blk_pass(args, block);
26983}
26984
26985static NODE *
26986numparam_push(struct parser_params *p)
26987{
26988 struct local_vars *local = p->lvtbl;
26989 NODE *inner = local->numparam.inner;
26990 if (!local->numparam.outer) {
26991 local->numparam.outer = local->numparam.current;
26992 }
26993 local->numparam.inner = 0;
26994 local->numparam.current = 0;
26995 local->it = 0;
26996 return inner;
26997}
26998
26999static void
27000numparam_pop(struct parser_params *p, NODE *prev_inner)
27001{
27002 struct local_vars *local = p->lvtbl;
27003 if (prev_inner) {
27004 /* prefer first one */
27005 local->numparam.inner = prev_inner;
27006 }
27007 else if (local->numparam.current) {
27008 /* current and inner are exclusive */
27009 local->numparam.inner = local->numparam.current;
27010 }
27011 if (p->max_numparam > NO_PARAM) {
27012 /* current and outer are exclusive */
27013 local->numparam.current = local->numparam.outer;
27014 local->numparam.outer = 0;
27015 }
27016 else {
27017 /* no numbered parameter */
27018 local->numparam.current = 0;
27019 }
27020 local->it = 0;
27021}
27022
27023static const struct vtable *
27024dyna_push(struct parser_params *p)
27025{
27026 p->lvtbl->args = vtable_alloc(p->lvtbl->args);
27027 p->lvtbl->vars = vtable_alloc(p->lvtbl->vars);
27028 if (p->lvtbl->used) {
27029 p->lvtbl->used = vtable_alloc(p->lvtbl->used);
27030 }
27031 return p->lvtbl->args;
27032}
27033
27034static void
27035dyna_pop_vtable(struct parser_params *p, struct vtable **vtblp)
27036{
27037 struct vtable *tmp = *vtblp;
27038 *vtblp = tmp->prev;
27039# if WARN_PAST_SCOPE
27040 if (p->past_scope_enabled) {
27041 tmp->prev = p->lvtbl->past;
27042 p->lvtbl->past = tmp;
27043 return;
27044 }
27045# endif
27046 vtable_free(tmp);
27047}
27048
27049static void
27050dyna_pop_1(struct parser_params *p)
27051{
27052 struct vtable *tmp;
27053
27054 if ((tmp = p->lvtbl->used) != 0) {
27055 warn_unused_var(p, p->lvtbl);
27056 p->lvtbl->used = p->lvtbl->used->prev;
27057 vtable_free(tmp);
27058 }
27059 dyna_pop_vtable(p, &p->lvtbl->args);
27060 dyna_pop_vtable(p, &p->lvtbl->vars);
27061}
27062
27063static void
27064dyna_pop(struct parser_params *p, const struct vtable *lvargs)
27065{
27066 while (p->lvtbl->args != lvargs) {
27067 dyna_pop_1(p);
27068 if (!p->lvtbl->args) {
27069 struct local_vars *local = p->lvtbl->prev;
27070 ruby_xfree_sized(p->lvtbl, sizeof(*p->lvtbl));
27071 p->lvtbl = local;
27072 }
27073 }
27074 dyna_pop_1(p);
27075}
27076
27077static int
27078dyna_in_block(struct parser_params *p)
27079{
27080 return !DVARS_TERMINAL_P(p->lvtbl->vars) && p->lvtbl->vars->prev != DVARS_TOPSCOPE;
27081}
27082
27083#ifndef RIPPER
27084int
27085dvar_defined_ref(struct parser_params *p, ID id, ID **vidrefp)
27086{
27087 struct vtable *vars, *args, *used;
27088 int i;
27089
27090 args = p->lvtbl->args;
27091 vars = p->lvtbl->vars;
27092 used = p->lvtbl->used;
27093
27094 while (!DVARS_TERMINAL_P(vars)) {
27095 if (vtable_included(args, id)) {
27096 return 1;
27097 }
27098 if ((i = vtable_included(vars, id)) != 0) {
27099 if (used && vidrefp) *vidrefp = &used->tbl[i-1];
27100 return 1;
27101 }
27102 args = args->prev;
27103 vars = vars->prev;
27104 if (!vidrefp) used = 0;
27105 if (used) used = used->prev;
27106 }
27107
27108 if (vars == DVARS_INHERIT && !NUMPARAM_ID_P(id)) {
27109 return rb_dvar_defined(id, p->parent_iseq);
27110 }
27111
27112 return 0;
27113}
27114#endif
27115
27116static int
27117dvar_defined(struct parser_params *p, ID id)
27118{
27119 return dvar_defined_ref(p, id, NULL);
27120}
27121
27122static int
27123dvar_curr(struct parser_params *p, ID id)
27124{
27125 return (vtable_included(p->lvtbl->args, id) ||
27126 vtable_included(p->lvtbl->vars, id));
27127}
27128
27129static void
27130reg_fragment_enc_error(struct parser_params* p, rb_parser_string_t *str, int c)
27131{
27132 compile_error(p,
27133 "regexp encoding option '%c' differs from source encoding '%s'",
27134 c, rb_enc_name(rb_parser_str_get_encoding(str)));
27135}
27136
27137#ifndef RIPPER
27138static rb_encoding *
27139find_enc(struct parser_params* p, const char *name)
27140{
27141 int idx = rb_enc_find_index(name);
27142 if (idx < 0) {
27143 rb_bug("unknown encoding name: %s", name);
27144 }
27145
27146 return rb_enc_from_index(idx);
27147}
27148
27149static rb_encoding *
27150kcode_to_enc(struct parser_params* p, int kcode)
27151{
27152 rb_encoding *enc;
27153
27154 switch (kcode) {
27155 case ENC_ASCII8BIT:
27156 enc = rb_ascii8bit_encoding();
27157 break;
27158 case ENC_EUC_JP:
27159 enc = find_enc(p, "EUC-JP");
27160 break;
27161 case ENC_Windows_31J:
27162 enc = find_enc(p, "Windows-31J");
27163 break;
27164 case ENC_UTF8:
27165 enc = rb_utf8_encoding();
27166 break;
27167 default:
27168 enc = NULL;
27169 break;
27170 }
27171
27172 return enc;
27173}
27174
27175int
27176rb_reg_fragment_setenc(struct parser_params* p, rb_parser_string_t *str, int options)
27177{
27178 int c = RE_OPTION_ENCODING_IDX(options);
27179
27180 if (c) {
27181 int opt, idx;
27182 rb_encoding *enc;
27183
27184 char_to_option_kcode(c, &opt, &idx);
27185 enc = kcode_to_enc(p, idx);
27186 if (enc != rb_parser_str_get_encoding(str) &&
27187 !rb_parser_is_ascii_string(p, str)) {
27188 goto error;
27189 }
27190 rb_parser_string_set_encoding(str, enc);
27191 }
27192 else if (RE_OPTION_ENCODING_NONE(options)) {
27193 if (!PARSER_ENCODING_IS_ASCII8BIT(p, str) &&
27194 !rb_parser_is_ascii_string(p, str)) {
27195 c = 'n';
27196 goto error;
27197 }
27198 rb_parser_enc_associate(p, str, rb_ascii8bit_encoding());
27199 }
27200 else if (rb_is_usascii_enc(p->enc)) {
27201 rb_parser_enc_associate(p, str, rb_ascii8bit_encoding());
27202 }
27203 return 0;
27204
27205 error:
27206 return c;
27207}
27208#endif
27209
27210static void
27211reg_fragment_setenc(struct parser_params* p, rb_parser_string_t *str, int options)
27212{
27213 int c = rb_reg_fragment_setenc(p, str, options);
27214 if (c) reg_fragment_enc_error(p, str, c);
27215}
27216
27217#ifndef UNIVERSAL_PARSER
27218typedef struct {
27219 struct parser_params* parser;
27220 rb_encoding *enc;
27221 NODE *succ_block;
27222 const YYLTYPE *loc;
27223 rb_parser_assignable_func assignable;
27225
27226static int
27227reg_named_capture_assign_iter(const OnigUChar *name, const OnigUChar *name_end,
27228 int back_num, int *back_refs, OnigRegex regex, void *arg0)
27229{
27231 struct parser_params* p = arg->parser;
27232 rb_encoding *enc = arg->enc;
27233 long len = name_end - name;
27234 const char *s = (const char *)name;
27235
27236 return rb_reg_named_capture_assign_iter_impl(p, s, len, enc, &arg->succ_block, arg->loc, arg->assignable);
27237}
27238
27239static NODE *
27240reg_named_capture_assign(struct parser_params* p, VALUE regexp, const YYLTYPE *loc, rb_parser_assignable_func assignable)
27241{
27243
27244 arg.parser = p;
27245 arg.enc = rb_enc_get(regexp);
27246 arg.succ_block = 0;
27247 arg.loc = loc;
27248 arg.assignable = assignable;
27249 onig_foreach_name(RREGEXP_PTR(regexp), reg_named_capture_assign_iter, &arg);
27250
27251 if (!arg.succ_block) return 0;
27252 return RNODE_BLOCK(arg.succ_block)->nd_next;
27253}
27254#endif
27255
27256#ifndef RIPPER
27257NODE *
27258rb_parser_assignable(struct parser_params *p, ID id, NODE *val, const YYLTYPE *loc)
27259{
27260 return assignable(p, id, val, loc);
27261}
27262
27263int
27264rb_reg_named_capture_assign_iter_impl(struct parser_params *p, const char *s, long len,
27265 rb_encoding *enc, NODE **succ_block, const rb_code_location_t *loc, rb_parser_assignable_func assignable)
27266{
27267 ID var;
27268 NODE *node, *succ;
27269
27270 if (!len) return ST_CONTINUE;
27271 if (!VALID_SYMNAME_P(s, len, enc, ID_LOCAL))
27272 return ST_CONTINUE;
27273
27274 var = intern_cstr(s, len, enc);
27275 if (len < MAX_WORD_LENGTH && rb_reserved_word(s, (int)len)) {
27276 if (!lvar_defined(p, var)) return ST_CONTINUE;
27277 }
27278 node = node_assign(p, assignable(p, var, 0, loc), NEW_SYM(rb_id2str(var), loc), NO_LEX_CTXT, loc);
27279 succ = *succ_block;
27280 if (!succ) succ = NEW_ERROR(loc);
27281 succ = block_append(p, succ, node);
27282 *succ_block = succ;
27283 return ST_CONTINUE;
27284}
27285#endif
27286
27287static VALUE
27288parser_reg_compile(struct parser_params* p, rb_parser_string_t *str, int options)
27289{
27290 VALUE str2;
27291 reg_fragment_setenc(p, str, options);
27292 str2 = rb_str_new_parser_string(str);
27293 return rb_parser_reg_compile(p, str2, options);
27294}
27295
27296#ifndef RIPPER
27297VALUE
27298rb_parser_reg_compile(struct parser_params* p, VALUE str, int options)
27299{
27300 return rb_reg_compile(str, options & RE_OPTION_MASK, p->ruby_sourcefile, p->ruby_sourceline);
27301}
27302#endif
27303
27304static VALUE
27305reg_compile(struct parser_params* p, rb_parser_string_t *str, int options)
27306{
27307 VALUE re;
27308 VALUE err;
27309
27310 err = rb_errinfo();
27311 re = parser_reg_compile(p, str, options);
27312 if (NIL_P(re)) {
27313 VALUE m = rb_attr_get(rb_errinfo(), idMesg);
27314 rb_set_errinfo(err);
27315 compile_error(p, "%"PRIsVALUE, m);
27316 return Qnil;
27317 }
27318 return re;
27319}
27320
27321#ifndef RIPPER
27322void
27323rb_ruby_parser_set_options(struct parser_params *p, int print, int loop, int chomp, int split)
27324{
27325 p->do_print = print;
27326 p->do_loop = loop;
27327 p->do_chomp = chomp;
27328 p->do_split = split;
27329}
27330
27331static NODE *
27332parser_append_options(struct parser_params *p, NODE *node)
27333{
27334 static const YYLTYPE default_location = {{1, 0}, {1, 0}};
27335 const YYLTYPE *const LOC = &default_location;
27336
27337 if (p->do_print) {
27338 NODE *print = (NODE *)NEW_FCALL(rb_intern("print"),
27339 NEW_LIST(NEW_GVAR(idLASTLINE, LOC), LOC),
27340 LOC);
27341 node = block_append(p, node, print);
27342 }
27343
27344 if (p->do_loop) {
27345 NODE *irs = NEW_LIST(NEW_GVAR(rb_intern("$/"), LOC), LOC);
27346
27347 if (p->do_split) {
27348 ID ifs = rb_intern("$;");
27349 ID fields = rb_intern("$F");
27350 NODE *args = NEW_LIST(NEW_GVAR(ifs, LOC), LOC);
27351 NODE *split = NEW_GASGN(fields,
27352 NEW_CALL(NEW_GVAR(idLASTLINE, LOC),
27353 rb_intern("split"), args, LOC),
27354 LOC);
27355 node = block_append(p, split, node);
27356 }
27357 if (p->do_chomp) {
27358 NODE *chomp = NEW_SYM(rb_str_new_cstr("chomp"), LOC);
27359 chomp = list_append(p, NEW_LIST(chomp, LOC), NEW_TRUE(LOC));
27360 irs = list_append(p, irs, NEW_HASH(chomp, LOC));
27361 }
27362
27363 node = NEW_WHILE((NODE *)NEW_FCALL(idGets, irs, LOC), node, 1, LOC, &NULL_LOC, &NULL_LOC);
27364 }
27365
27366 return node;
27367}
27368
27369void
27370rb_init_parse(void)
27371{
27372 /* just to suppress unused-function warnings */
27373 (void)nodetype;
27374 (void)nodeline;
27375}
27376
27377ID
27378internal_id(struct parser_params *p)
27379{
27380 return rb_make_temporary_id(vtable_size(p->lvtbl->args) + vtable_size(p->lvtbl->vars));
27381}
27382#endif /* !RIPPER */
27383
27384static void
27385parser_initialize(struct parser_params *p)
27386{
27387 /* note: we rely on TypedData_Make_Struct to set most fields to 0 */
27388 p->command_start = TRUE;
27389 p->ruby_sourcefile_string = Qnil;
27390 p->lex.lpar_beg = -1; /* make lambda_beginning_p() == FALSE at first */
27391 string_buffer_init(p);
27392 p->node_id = 0;
27393 p->delayed.token = NULL;
27394 p->frozen_string_literal = -1; /* not specified */
27395 rb_source_hash_init(&p->source_hash);
27396#ifndef RIPPER
27397 p->error_buffer = Qfalse;
27398 p->end_expect_token_locations = NULL;
27399 p->token_id = 0;
27400 p->tokens = NULL;
27401#else
27402 p->result = Qnil;
27403 p->parsing_thread = Qnil;
27404 p->s_value = Qnil;
27405 p->s_lvalue = Qnil;
27406 p->s_value_stack = rb_ary_new();
27407#endif
27408 p->debug_buffer = Qnil;
27409 p->debug_output = rb_ractor_stdout();
27410 p->enc = rb_utf8_encoding();
27411 p->exits = 0;
27412}
27413
27414#ifdef RIPPER
27415#define rb_ruby_parser_mark ripper_parser_mark
27416#define rb_ruby_parser_free ripper_parser_free
27417#define rb_ruby_parser_memsize ripper_parser_memsize
27418#endif
27419
27420void
27421rb_ruby_parser_mark(void *ptr)
27422{
27423 struct parser_params *p = (struct parser_params*)ptr;
27424
27425 rb_gc_mark(p->ruby_sourcefile_string);
27426#ifndef RIPPER
27427 rb_gc_mark(p->error_buffer);
27428#else
27429 rb_gc_mark(p->value);
27430 rb_gc_mark(p->result);
27431 rb_gc_mark(p->parsing_thread);
27432 rb_gc_mark(p->s_value);
27433 rb_gc_mark(p->s_lvalue);
27434 rb_gc_mark(p->s_value_stack);
27435#endif
27436 rb_gc_mark(p->debug_buffer);
27437 rb_gc_mark(p->debug_output);
27438}
27439
27440void
27441rb_ruby_parser_free(void *ptr)
27442{
27443 struct parser_params *p = (struct parser_params*)ptr;
27444 struct local_vars *local, *prev;
27445
27446 if (p->ast) {
27447 rb_ast_free(p->ast);
27448 }
27449
27450 if (p->warn_duplicate_keys_table) {
27451 st_free_table(p->warn_duplicate_keys_table);
27452 }
27453
27454#ifndef RIPPER
27455 if (p->tokens) {
27456 rb_parser_ary_free(p, p->tokens);
27457 }
27458#endif
27459
27460 if (p->tokenbuf) {
27461 ruby_xfree_sized(p->tokenbuf, p->toksiz);
27462 }
27463
27464 for (local = p->lvtbl; local; local = prev) {
27465 prev = local->prev;
27466 local_free(p, local);
27467 }
27468
27469 {
27470 token_info *ptinfo;
27471 while ((ptinfo = p->token_info) != 0) {
27472 p->token_info = ptinfo->next;
27473 xfree(ptinfo);
27474 }
27475 }
27476 string_buffer_free(p);
27477
27478 if (p->pvtbl) {
27479 st_free_table(p->pvtbl);
27480 }
27481
27482 if (CASE_LABELS_ENABLED_P(p->case_labels)) {
27483 st_free_table(p->case_labels);
27484 }
27485
27486 xfree(p->lex.strterm);
27487 p->lex.strterm = 0;
27488
27489 xfree(ptr);
27490}
27491
27492size_t
27493rb_ruby_parser_memsize(const void *ptr)
27494{
27495 struct parser_params *p = (struct parser_params*)ptr;
27496 struct local_vars *local;
27497 size_t size = sizeof(*p);
27498
27499 size += p->toksiz;
27500 for (local = p->lvtbl; local; local = local->prev) {
27501 size += sizeof(*local);
27502 if (local->vars) size += local->vars->capa * sizeof(ID);
27503 }
27504 return size;
27505}
27506
27507#ifndef RIPPER
27508#undef rb_reserved_word
27509
27510const struct kwtable *
27511rb_reserved_word(const char *str, unsigned int len)
27512{
27513 return reserved_word(str, len);
27514}
27515
27516#ifdef UNIVERSAL_PARSER
27518rb_ruby_parser_allocate(const rb_parser_config_t *config)
27519{
27520 /* parser_initialize expects fields to be set to 0 */
27521 rb_parser_t *p = (rb_parser_t *)config->calloc(1, sizeof(rb_parser_t));
27522 p->config = config;
27523 return p;
27524}
27525
27527rb_ruby_parser_new(const rb_parser_config_t *config)
27528{
27529 /* parser_initialize expects fields to be set to 0 */
27530 rb_parser_t *p = rb_ruby_parser_allocate(config);
27531 parser_initialize(p);
27532 return p;
27533}
27534#else
27536rb_ruby_parser_allocate(void)
27537{
27538 /* parser_initialize expects fields to be set to 0 */
27539 rb_parser_t *p = (rb_parser_t *)ruby_xcalloc(1, sizeof(rb_parser_t));
27540 return p;
27541}
27542
27544rb_ruby_parser_new(void)
27545{
27546 /* parser_initialize expects fields to be set to 0 */
27547 rb_parser_t *p = rb_ruby_parser_allocate();
27548 parser_initialize(p);
27549 return p;
27550}
27551#endif
27552
27554rb_ruby_parser_set_context(rb_parser_t *p, const struct rb_iseq_struct *base, int main)
27555{
27556 p->error_buffer = main ? Qfalse : Qnil;
27557 p->parent_iseq = base;
27558 return p;
27559}
27560
27561void
27562rb_ruby_parser_set_script_lines(rb_parser_t *p)
27563{
27564 p->debug_lines = rb_parser_ary_new_capa_for_script_line(p, 10);
27565}
27566
27567void
27568rb_ruby_parser_error_tolerant(rb_parser_t *p)
27569{
27570 p->error_tolerant = 1;
27571}
27572
27573void
27574rb_ruby_parser_keep_tokens(rb_parser_t *p)
27575{
27576 p->keep_tokens = 1;
27577 p->tokens = rb_parser_ary_new_capa_for_ast_token(p, 10);
27578}
27579
27581rb_ruby_parser_encoding(rb_parser_t *p)
27582{
27583 return p->enc;
27584}
27585
27586int
27587rb_ruby_parser_end_seen_p(rb_parser_t *p)
27588{
27589 return p->ruby__end__seen;
27590}
27591
27592int
27593rb_ruby_parser_set_yydebug(rb_parser_t *p, int flag)
27594{
27595 p->debug = flag;
27596 return flag;
27597}
27598#endif /* !RIPPER */
27599
27600#ifdef RIPPER
27601int
27602rb_ruby_parser_get_yydebug(rb_parser_t *p)
27603{
27604 return p->debug;
27605}
27606
27607void
27608rb_ruby_parser_set_value(rb_parser_t *p, VALUE value)
27609{
27610 p->value = value;
27611}
27612
27613int
27614rb_ruby_parser_error_p(rb_parser_t *p)
27615{
27616 return p->error_p;
27617}
27618
27619VALUE
27620rb_ruby_parser_debug_output(rb_parser_t *p)
27621{
27622 return p->debug_output;
27623}
27624
27625void
27626rb_ruby_parser_set_debug_output(rb_parser_t *p, VALUE output)
27627{
27628 p->debug_output = output;
27629}
27630
27631VALUE
27632rb_ruby_parser_parsing_thread(rb_parser_t *p)
27633{
27634 return p->parsing_thread;
27635}
27636
27637void
27638rb_ruby_parser_set_parsing_thread(rb_parser_t *p, VALUE parsing_thread)
27639{
27640 p->parsing_thread = parsing_thread;
27641}
27642
27643void
27644rb_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)
27645{
27646 p->lex.gets = gets;
27647 p->lex.input = input;
27648 p->eofp = 0;
27649 p->ruby_sourcefile_string = sourcefile_string;
27650 p->ruby_sourcefile = sourcefile;
27651 p->ruby_sourceline = sourceline;
27652}
27653
27654VALUE
27655rb_ruby_parser_result(rb_parser_t *p)
27656{
27657 return p->result;
27658}
27659
27661rb_ruby_parser_enc(rb_parser_t *p)
27662{
27663 return p->enc;
27664}
27665
27666VALUE
27667rb_ruby_parser_ruby_sourcefile_string(rb_parser_t *p)
27668{
27669 return p->ruby_sourcefile_string;
27670}
27671
27672int
27673rb_ruby_parser_ruby_sourceline(rb_parser_t *p)
27674{
27675 return p->ruby_sourceline;
27676}
27677
27678int
27679rb_ruby_parser_lex_state(rb_parser_t *p)
27680{
27681 return p->lex.state;
27682}
27683
27684void
27685rb_ruby_ripper_parse0(rb_parser_t *p)
27686{
27687 parser_prepare(p);
27688 p->ast = rb_ast_new();
27689 ripper_yyparse((void*)p);
27690 rb_ast_free(p->ast);
27691 p->ast = 0;
27692 p->eval_tree = 0;
27693 p->eval_tree_begin = 0;
27694}
27695
27696int
27697rb_ruby_ripper_dedent_string(rb_parser_t *p, rb_parser_string_t *string, int width)
27698{
27699 return dedent_string(p, string, width);
27700}
27701
27702int
27703rb_ruby_ripper_initialized_p(rb_parser_t *p)
27704{
27705 return p->lex.input != 0;
27706}
27707
27708void
27709rb_ruby_ripper_parser_initialize(rb_parser_t *p)
27710{
27711 parser_initialize(p);
27712}
27713
27714long
27715rb_ruby_ripper_column(rb_parser_t *p)
27716{
27717 return p->lex.ptok - p->lex.pbeg;
27718}
27719
27720long
27721rb_ruby_ripper_token_len(rb_parser_t *p)
27722{
27723 return p->lex.pcur - p->lex.ptok;
27724}
27725
27727rb_ruby_ripper_lex_lastline(rb_parser_t *p)
27728{
27729 return p->lex.lastline;
27730}
27731
27732VALUE
27733rb_ruby_ripper_lex_state_name(struct parser_params *p, int state)
27734{
27735 return rb_parser_lex_state_name(p, (enum lex_state_e)state);
27736}
27737
27738#ifdef UNIVERSAL_PARSER
27740rb_ripper_parser_params_allocate(const rb_parser_config_t *config)
27741{
27742 rb_parser_t *p = (rb_parser_t *)config->calloc(1, sizeof(rb_parser_t));
27743 p->config = config;
27744 return p;
27745}
27746#endif
27747
27748struct parser_params*
27749rb_ruby_ripper_parser_allocate(void)
27750{
27751 return (struct parser_params *)ruby_xcalloc(1, sizeof(struct parser_params));
27752}
27753#endif /* RIPPER */
27754
27755#ifndef RIPPER
27756void
27757rb_parser_printf(struct parser_params *p, const char *fmt, ...)
27758{
27759 va_list ap;
27760 VALUE mesg = p->debug_buffer;
27761
27762 if (NIL_P(mesg)) p->debug_buffer = mesg = rb_str_new(0, 0);
27763 va_start(ap, fmt);
27764 rb_str_vcatf(mesg, fmt, ap);
27765 va_end(ap);
27766 if (char_at_end(p, mesg, 0) == '\n') {
27767 rb_io_write(p->debug_output, mesg);
27768 p->debug_buffer = Qnil;
27769 }
27770}
27771
27772static void
27773parser_compile_error(struct parser_params *p, const rb_code_location_t *loc, const char *fmt, ...)
27774{
27775 va_list ap;
27776 int lineno, column;
27777
27778 if (loc) {
27779 lineno = loc->end_pos.lineno;
27780 column = loc->end_pos.column;
27781 }
27782 else {
27783 lineno = p->ruby_sourceline;
27784 column = rb_long2int(p->lex.pcur - p->lex.pbeg);
27785 }
27786
27787 rb_io_flush(p->debug_output);
27788 p->error_p = 1;
27789 va_start(ap, fmt);
27790 p->error_buffer =
27791 rb_syntax_error_append(p->error_buffer,
27792 p->ruby_sourcefile_string,
27793 lineno, column,
27794 p->enc, fmt, ap);
27795 va_end(ap);
27796}
27797
27798static size_t
27799count_char(const char *str, int c)
27800{
27801 int n = 0;
27802 while (str[n] == c) ++n;
27803 return n;
27804}
27805
27806/*
27807 * strip enclosing double-quotes, same as the default yytnamerr except
27808 * for that single-quotes matching back-quotes do not stop stripping.
27809 *
27810 * "\"`class' keyword\"" => "`class' keyword"
27811 */
27812size_t
27813rb_yytnamerr(struct parser_params *p, char *yyres, const char *yystr)
27814{
27815 if (*yystr == '"') {
27816 size_t yyn = 0, bquote = 0;
27817 const char *yyp = yystr;
27818
27819 while (*++yyp) {
27820 switch (*yyp) {
27821 case '\'':
27822 if (!bquote) {
27823 bquote = count_char(yyp+1, '\'') + 1;
27824 if (yyres) memcpy(&yyres[yyn], yyp, bquote);
27825 yyn += bquote;
27826 yyp += bquote - 1;
27827 break;
27828 }
27829 else {
27830 if (bquote && count_char(yyp+1, '\'') + 1 == bquote) {
27831 if (yyres) memcpy(yyres + yyn, yyp, bquote);
27832 yyn += bquote;
27833 yyp += bquote - 1;
27834 bquote = 0;
27835 break;
27836 }
27837 if (yyp[1] && yyp[1] != '\'' && yyp[2] == '\'') {
27838 if (yyres) memcpy(yyres + yyn, yyp, 3);
27839 yyn += 3;
27840 yyp += 2;
27841 break;
27842 }
27843 goto do_not_strip_quotes;
27844 }
27845
27846 case ',':
27847 goto do_not_strip_quotes;
27848
27849 case '\\':
27850 if (*++yyp != '\\')
27851 goto do_not_strip_quotes;
27852 /* Fall through. */
27853 default:
27854 if (yyres)
27855 yyres[yyn] = *yyp;
27856 yyn++;
27857 break;
27858
27859 case '"':
27860 case '\0':
27861 if (yyres)
27862 yyres[yyn] = '\0';
27863 return yyn;
27864 }
27865 }
27866 do_not_strip_quotes: ;
27867 }
27868
27869 if (!yyres) return strlen(yystr);
27870
27871 return (YYSIZE_T)(yystpcpy(yyres, yystr) - yyres);
27872}
27873#endif
27874
27875#ifdef RIPPER
27876#define validate(x) (void)(x)
27877
27878static VALUE
27879ripper_dispatch0(struct parser_params *p, ID mid)
27880{
27881 return rb_funcall(p->value, mid, 0);
27882}
27883
27884static VALUE
27885ripper_dispatch1(struct parser_params *p, ID mid, VALUE a)
27886{
27887 validate(a);
27888 return rb_funcall(p->value, mid, 1, a);
27889}
27890
27891static VALUE
27892ripper_dispatch2(struct parser_params *p, ID mid, VALUE a, VALUE b)
27893{
27894 validate(a);
27895 validate(b);
27896 return rb_funcall(p->value, mid, 2, a, b);
27897}
27898
27899static VALUE
27900ripper_dispatch3(struct parser_params *p, ID mid, VALUE a, VALUE b, VALUE c)
27901{
27902 validate(a);
27903 validate(b);
27904 validate(c);
27905 return rb_funcall(p->value, mid, 3, a, b, c);
27906}
27907
27908static VALUE
27909ripper_dispatch4(struct parser_params *p, ID mid, VALUE a, VALUE b, VALUE c, VALUE d)
27910{
27911 validate(a);
27912 validate(b);
27913 validate(c);
27914 validate(d);
27915 return rb_funcall(p->value, mid, 4, a, b, c, d);
27916}
27917
27918static VALUE
27919ripper_dispatch5(struct parser_params *p, ID mid, VALUE a, VALUE b, VALUE c, VALUE d, VALUE e)
27920{
27921 validate(a);
27922 validate(b);
27923 validate(c);
27924 validate(d);
27925 validate(e);
27926 return rb_funcall(p->value, mid, 5, a, b, c, d, e);
27927}
27928
27929static VALUE
27930ripper_dispatch7(struct parser_params *p, ID mid, VALUE a, VALUE b, VALUE c, VALUE d, VALUE e, VALUE f, VALUE g)
27931{
27932 validate(a);
27933 validate(b);
27934 validate(c);
27935 validate(d);
27936 validate(e);
27937 validate(f);
27938 validate(g);
27939 return rb_funcall(p->value, mid, 7, a, b, c, d, e, f, g);
27940}
27941
27942void
27943ripper_error(struct parser_params *p)
27944{
27945 p->error_p = TRUE;
27946}
27947
27948VALUE
27949ripper_value(struct parser_params *p)
27950{
27951 (void)yystpcpy; /* may not used in newer bison */
27952
27953 return p->value;
27954}
27955
27956#endif /* RIPPER */
27957/*
27958 * Local variables:
27959 * mode: c
27960 * c-file-style: "ruby"
27961 * End:
27962 */
#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:676
#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:1429
VALUE rb_eSyntaxError
SyntaxError exception.
Definition error.c:1448
VALUE rb_class_new_instance(int argc, const VALUE *argv, VALUE klass)
Allocates, then initialises an instance of the given class.
Definition object.c:2291
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.