Ruby 3.5.0dev (2025-10-10 revision 4bf14758336fd51c3c45a714c944b7d69ec9bed3)
parse.c
1/* A Bison parser, made by Lrama 0.7.0. */
2
3/* Bison implementation for Yacc-like parsers in C
4
5 Copyright (C) 1984, 1989-1990, 2000-2015, 2018-2021 Free Software Foundation,
6 Inc.
7
8 This program is free software: you can redistribute it and/or modify
9 it under the terms of the GNU General Public License as published by
10 the Free Software Foundation, either version 3 of the License, or
11 (at your option) any later version.
12
13 This program is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU General Public License for more details.
17
18 You should have received a copy of the GNU General Public License
19 along with this program. If not, see <https://www.gnu.org/licenses/>. */
20
21/* As a special exception, you may create a larger work that contains
22 part or all of the Bison parser skeleton and distribute that work
23 under terms of your choice, so long as that work isn't itself a
24 parser generator using the skeleton or a modified version thereof
25 as a parser skeleton. Alternatively, if you modify or redistribute
26 the parser skeleton itself, you may (at your option) remove this
27 special exception, which will cause the skeleton and the resulting
28 Bison output files to be licensed under the GNU General Public
29 License without this special exception.
30
31 This special exception was added by the Free Software Foundation in
32 version 2.2 of Bison. */
33
34/* C LALR(1) parser skeleton written by Richard Stallman, by
35 simplifying the original so-called "semantic" parser. */
36
37/* DO NOT RELY ON FEATURES THAT ARE NOT DOCUMENTED in the manual,
38 especially those whose name start with YY_ or yy_. They are
39 private implementation details that can be changed or removed. */
40
41/* All symbols defined below should begin with yy or YY, to avoid
42 infringing on user name space. This should be done even for local
43 variables, as they might otherwise be expanded by user macros.
44 There are some unavoidable exceptions within include files to
45 define necessary library symbols; they are noted "INFRINGES ON
46 USER NAME SPACE" below. */
47
48/* Identify Bison output, and Bison version. */
49#define YYBISON 30802
50
51/* Bison version string. */
52#define YYBISON_VERSION "3.8.2"
53
54/* Skeleton name. */
55#define YYSKELETON_NAME "yacc.c"
56
57/* Pure parsers. */
58#define YYPURE 1
59
60/* Push parsers. */
61#define YYPUSH 0
62
63/* Pull parsers. */
64#define YYPULL 1
65
66
67/* First part of user prologue. */
68#line 12 "parse.y"
69
70
71#if !YYPURE
72# error needs pure parser
73#endif
74#define YYDEBUG 1
75#define YYERROR_VERBOSE 1
76#define YYSTACK_USE_ALLOCA 0
77
78/* For Ripper */
79#ifdef RUBY_EXTCONF_H
80# include RUBY_EXTCONF_H
81#endif
82
83#include "ruby/internal/config.h"
84
85#include <errno.h>
86
87#ifdef UNIVERSAL_PARSER
88
89#include "internal/ruby_parser.h"
90#include "parser_node.h"
91#include "universal_parser.c"
92
93#ifdef RIPPER
94#define STATIC_ID2SYM p->config->static_id2sym
95#define rb_str_coderange_scan_restartable p->config->str_coderange_scan_restartable
96#endif
97
98#else
99
100#include "internal.h"
101#include "internal/compile.h"
102#include "internal/compilers.h"
103#include "internal/complex.h"
104#include "internal/encoding.h"
105#include "internal/error.h"
106#include "internal/hash.h"
107#include "internal/io.h"
108#include "internal/numeric.h"
109#include "internal/parse.h"
110#include "internal/rational.h"
111#include "internal/re.h"
112#include "internal/ruby_parser.h"
113#include "internal/symbol.h"
114#include "internal/thread.h"
115#include "internal/variable.h"
116#include "node.h"
117#include "parser_node.h"
118#include "probes.h"
119#include "regenc.h"
120#include "ruby/encoding.h"
121#include "ruby/regex.h"
122#include "ruby/ruby.h"
123#include "ruby/st.h"
124#include "ruby/util.h"
125#include "ruby/ractor.h"
126#include "symbol.h"
127
128#ifndef RIPPER
129static VALUE
130syntax_error_new(void)
131{
133}
134#endif
135
136static NODE *reg_named_capture_assign(struct parser_params* p, VALUE regexp, const YYLTYPE *loc, rb_parser_assignable_func assignable);
137
138#define compile_callback rb_suppress_tracing
139#endif /* !UNIVERSAL_PARSER */
140
141#define NODE_SPECIAL_EMPTY_ARGS ((NODE *)-1)
142#define NODE_EMPTY_ARGS_P(node) ((node) == NODE_SPECIAL_EMPTY_ARGS)
143
144static int rb_parser_string_hash_cmp(rb_parser_string_t *str1, rb_parser_string_t *str2);
145
146#ifndef RIPPER
147static rb_parser_string_t *rb_parser_string_deep_copy(struct parser_params *p, const rb_parser_string_t *original);
148#endif
149
150static int
151node_integer_cmp(rb_node_integer_t *n1, rb_node_integer_t *n2)
152{
153 return (n1->minus != n2->minus ||
154 n1->base != n2->base ||
155 strcmp(n1->val, n2->val));
156}
157
158static int
159node_float_cmp(rb_node_float_t *n1, rb_node_float_t *n2)
160{
161 return (n1->minus != n2->minus ||
162 strcmp(n1->val, n2->val));
163}
164
165static int
166node_rational_cmp(rb_node_rational_t *n1, rb_node_rational_t *n2)
167{
168 return (n1->minus != n2->minus ||
169 n1->base != n2->base ||
170 n1->seen_point != n2->seen_point ||
171 strcmp(n1->val, n2->val));
172}
173
174static int
175node_imaginary_cmp(rb_node_imaginary_t *n1, rb_node_imaginary_t *n2)
176{
177 return (n1->minus != n2->minus ||
178 n1->base != n2->base ||
179 n1->seen_point != n2->seen_point ||
180 n1->type != n2->type ||
181 strcmp(n1->val, n2->val));
182}
183
184static int
185rb_parser_regx_hash_cmp(rb_node_regx_t *n1, rb_node_regx_t *n2)
186{
187 return (n1->options != n2->options ||
188 rb_parser_string_hash_cmp(n1->string, n2->string));
189}
190
191static st_index_t rb_parser_str_hash(rb_parser_string_t *str);
192static st_index_t rb_char_p_hash(const char *c);
193
194static int
195literal_cmp(st_data_t val, st_data_t lit)
196{
197 if (val == lit) return 0;
198
199 NODE *node_val = RNODE(val);
200 NODE *node_lit = RNODE(lit);
201 enum node_type type_val = nd_type(node_val);
202 enum node_type type_lit = nd_type(node_lit);
203
204 if (type_val != type_lit) {
205 return -1;
206 }
207
208 switch (type_lit) {
209 case NODE_INTEGER:
210 return node_integer_cmp(RNODE_INTEGER(node_val), RNODE_INTEGER(node_lit));
211 case NODE_FLOAT:
212 return node_float_cmp(RNODE_FLOAT(node_val), RNODE_FLOAT(node_lit));
213 case NODE_RATIONAL:
214 return node_rational_cmp(RNODE_RATIONAL(node_val), RNODE_RATIONAL(node_lit));
215 case NODE_IMAGINARY:
216 return node_imaginary_cmp(RNODE_IMAGINARY(node_val), RNODE_IMAGINARY(node_lit));
217 case NODE_STR:
218 return rb_parser_string_hash_cmp(RNODE_STR(node_val)->string, RNODE_STR(node_lit)->string);
219 case NODE_SYM:
220 return rb_parser_string_hash_cmp(RNODE_SYM(node_val)->string, RNODE_SYM(node_lit)->string);
221 case NODE_REGX:
222 return rb_parser_regx_hash_cmp(RNODE_REGX(node_val), RNODE_REGX(node_lit));
223 case NODE_LINE:
224 return node_val->nd_loc.beg_pos.lineno != node_lit->nd_loc.beg_pos.lineno;
225 case NODE_FILE:
226 return rb_parser_string_hash_cmp(RNODE_FILE(node_val)->path, RNODE_FILE(node_lit)->path);
227 case NODE_ENCODING:
228 return RNODE_ENCODING(node_val)->enc != RNODE_ENCODING(node_lit)->enc;
229 default:
230#ifdef UNIVERSAL_PARSER
231 abort();
232#else
233 rb_bug("unexpected node: %s, %s", ruby_node_name(type_val), ruby_node_name(type_lit));
234#endif
235 }
236}
237
238static st_index_t
239literal_hash(st_data_t a)
240{
241 NODE *node = (NODE *)a;
242 enum node_type type = nd_type(node);
243
244 switch (type) {
245 case NODE_INTEGER:
246 return rb_char_p_hash(RNODE_INTEGER(node)->val);
247 case NODE_FLOAT:
248 return rb_char_p_hash(RNODE_FLOAT(node)->val);
249 case NODE_RATIONAL:
250 return rb_char_p_hash(RNODE_RATIONAL(node)->val);
251 case NODE_IMAGINARY:
252 return rb_char_p_hash(RNODE_IMAGINARY(node)->val);
253 case NODE_STR:
254 return rb_parser_str_hash(RNODE_STR(node)->string);
255 case NODE_SYM:
256 return rb_parser_str_hash(RNODE_SYM(node)->string);
257 case NODE_REGX:
258 return rb_parser_str_hash(RNODE_REGX(node)->string);
259 case NODE_LINE:
260 return (st_index_t)node->nd_loc.beg_pos.lineno;
261 case NODE_FILE:
262 return rb_parser_str_hash(RNODE_FILE(node)->path);
263 case NODE_ENCODING:
264 return (st_index_t)RNODE_ENCODING(node)->enc;
265 default:
266#ifdef UNIVERSAL_PARSER
267 abort();
268#else
269 rb_bug("unexpected node: %s", ruby_node_name(type));
270#endif
271 }
272}
273
274static inline int
275parse_isascii(int c)
276{
277 return '\0' <= c && c <= '\x7f';
278}
279
280#undef ISASCII
281#define ISASCII parse_isascii
282
283static inline int
284parse_isspace(int c)
285{
286 return c == ' ' || ('\t' <= c && c <= '\r');
287}
288
289#undef ISSPACE
290#define ISSPACE parse_isspace
291
292static inline int
293parse_iscntrl(int c)
294{
295 return ('\0' <= c && c < ' ') || c == '\x7f';
296}
297
298#undef ISCNTRL
299#define ISCNTRL(c) parse_iscntrl(c)
300
301static inline int
302parse_isupper(int c)
303{
304 return 'A' <= c && c <= 'Z';
305}
306
307static inline int
308parse_islower(int c)
309{
310 return 'a' <= c && c <= 'z';
311}
312
313static inline int
314parse_isalpha(int c)
315{
316 return parse_isupper(c) || parse_islower(c);
317}
318
319#undef ISALPHA
320#define ISALPHA(c) parse_isalpha(c)
321
322static inline int
323parse_isdigit(int c)
324{
325 return '0' <= c && c <= '9';
326}
327
328#undef ISDIGIT
329#define ISDIGIT(c) parse_isdigit(c)
330
331static inline int
332parse_isalnum(int c)
333{
334 return ISALPHA(c) || ISDIGIT(c);
335}
336
337#undef ISALNUM
338#define ISALNUM(c) parse_isalnum(c)
339
340static inline int
341parse_isxdigit(int c)
342{
343 return ISDIGIT(c) || ('A' <= c && c <= 'F') || ('a' <= c && c <= 'f');
344}
345
346#undef ISXDIGIT
347#define ISXDIGIT(c) parse_isxdigit(c)
348
349#include "parser_st.h"
350
351#undef STRCASECMP
352#define STRCASECMP rb_parser_st_locale_insensitive_strcasecmp
353
354#undef STRNCASECMP
355#define STRNCASECMP rb_parser_st_locale_insensitive_strncasecmp
356
357#ifdef RIPPER
358#include "ripper_init.h"
359#endif
360
361enum rescue_context {
362 before_rescue,
363 after_rescue,
364 after_else,
365 after_ensure,
366};
367
369 unsigned int in_defined: 1;
370 unsigned int in_kwarg: 1;
371 unsigned int in_argdef: 1;
372 unsigned int in_def: 1;
373 unsigned int in_class: 1;
374 unsigned int has_trailing_semicolon: 1;
375 BITFIELD(enum rb_parser_shareability, shareable_constant_value, 2);
376 BITFIELD(enum rescue_context, in_rescue, 2);
377 unsigned int cant_return: 1;
378};
379
381
382#if defined(__GNUC__) && !defined(__clang__)
383// Suppress "parameter passing for argument of type 'struct
384// lex_context' changed" notes. `struct lex_context` is file scope,
385// and has no ABI compatibility issue.
389// Not sure why effective even after popped.
390#endif
391
392#include "parse.h"
393
394#define NO_LEX_CTXT (struct lex_context){0}
395
396#ifndef WARN_PAST_SCOPE
397# define WARN_PAST_SCOPE 0
398#endif
399
400#define TAB_WIDTH 8
401
402#define yydebug (p->debug) /* disable the global variable definition */
403
404#define YYFPRINTF(out, ...) rb_parser_printf(p, __VA_ARGS__)
405#define YY_LOCATION_PRINT(File, loc, p) \
406 rb_parser_printf(p, "%d.%d-%d.%d", \
407 (loc).beg_pos.lineno, (loc).beg_pos.column,\
408 (loc).end_pos.lineno, (loc).end_pos.column)
409#define YYLLOC_DEFAULT(Current, Rhs, N) \
410 do \
411 if (N) \
412 { \
413 (Current).beg_pos = YYRHSLOC(Rhs, 1).beg_pos; \
414 (Current).end_pos = YYRHSLOC(Rhs, N).end_pos; \
415 } \
416 else \
417 { \
418 (Current).beg_pos = YYRHSLOC(Rhs, 0).end_pos; \
419 (Current).end_pos = YYRHSLOC(Rhs, 0).end_pos; \
420 } \
421 while (0)
422#define YY_(Msgid) \
423 (((Msgid)[0] == 'm') && (strcmp((Msgid), "memory exhausted") == 0) ? \
424 "nesting too deep" : (Msgid))
425
426#define RUBY_SET_YYLLOC_FROM_STRTERM_HEREDOC(Current) \
427 rb_parser_set_location_from_strterm_heredoc(p, &p->lex.strterm->u.heredoc, &(Current))
428#define RUBY_SET_YYLLOC_OF_DELAYED_TOKEN(Current) \
429 rb_parser_set_location_of_delayed_token(p, &(Current))
430#define RUBY_SET_YYLLOC_OF_HEREDOC_END(Current) \
431 rb_parser_set_location_of_heredoc_end(p, &(Current))
432#define RUBY_SET_YYLLOC_OF_DUMMY_END(Current) \
433 rb_parser_set_location_of_dummy_end(p, &(Current))
434#define RUBY_SET_YYLLOC_OF_NONE(Current) \
435 rb_parser_set_location_of_none(p, &(Current))
436#define RUBY_SET_YYLLOC(Current) \
437 rb_parser_set_location(p, &(Current))
438#define RUBY_INIT_YYLLOC() \
439 { \
440 {p->ruby_sourceline, (int)(p->lex.ptok - p->lex.pbeg)}, \
441 {p->ruby_sourceline, (int)(p->lex.pcur - p->lex.pbeg)}, \
442 }
443
444#define IS_lex_state_for(x, ls) ((x) & (ls))
445#define IS_lex_state_all_for(x, ls) (((x) & (ls)) == (ls))
446#define IS_lex_state(ls) IS_lex_state_for(p->lex.state, (ls))
447#define IS_lex_state_all(ls) IS_lex_state_all_for(p->lex.state, (ls))
448
449# define SET_LEX_STATE(ls) \
450 parser_set_lex_state(p, ls, __LINE__)
451static inline enum lex_state_e parser_set_lex_state(struct parser_params *p, enum lex_state_e ls, int line);
452
453typedef VALUE stack_type;
454
455static const rb_code_location_t NULL_LOC = { {0, -1}, {0, -1} };
456
457# define SHOW_BITSTACK(stack, name) (p->debug ? rb_parser_show_bitstack(p, stack, name, __LINE__) : (void)0)
458# define BITSTACK_PUSH(stack, n) (((p->stack) = ((p->stack)<<1)|((n)&1)), SHOW_BITSTACK(p->stack, #stack"(push)"))
459# define BITSTACK_POP(stack) (((p->stack) = (p->stack) >> 1), SHOW_BITSTACK(p->stack, #stack"(pop)"))
460# define BITSTACK_SET_P(stack) (SHOW_BITSTACK(p->stack, #stack), (p->stack)&1)
461# define BITSTACK_SET(stack, n) ((p->stack)=(n), SHOW_BITSTACK(p->stack, #stack"(set)"))
462
463/* A flag to identify keyword_do_cond, "do" keyword after condition expression.
464 Examples: `while ... do`, `until ... do`, and `for ... in ... do` */
465#define COND_PUSH(n) BITSTACK_PUSH(cond_stack, (n))
466#define COND_POP() BITSTACK_POP(cond_stack)
467#define COND_P() BITSTACK_SET_P(cond_stack)
468#define COND_SET(n) BITSTACK_SET(cond_stack, (n))
469
470/* A flag to identify keyword_do_block; "do" keyword after command_call.
471 Example: `foo 1, 2 do`. */
472#define CMDARG_PUSH(n) BITSTACK_PUSH(cmdarg_stack, (n))
473#define CMDARG_POP() BITSTACK_POP(cmdarg_stack)
474#define CMDARG_P() BITSTACK_SET_P(cmdarg_stack)
475#define CMDARG_SET(n) BITSTACK_SET(cmdarg_stack, (n))
476
477struct vtable {
478 ID *tbl;
479 int pos;
480 int capa;
481 struct vtable *prev;
482};
483
485 struct vtable *args;
486 struct vtable *vars;
487 struct vtable *used;
488# if WARN_PAST_SCOPE
489 struct vtable *past;
490# endif
491 struct local_vars *prev;
492 struct {
493 NODE *outer, *inner, *current;
494 } numparam;
495 NODE *it;
496};
497
499 NODE *node;
500 YYLTYPE opening_loc;
501 YYLTYPE closing_loc;
503
504enum {
505 ORDINAL_PARAM = -1,
506 NO_PARAM = 0,
507 NUMPARAM_MAX = 9,
508};
509
510#define DVARS_INHERIT ((void*)1)
511#define DVARS_TOPSCOPE NULL
512#define DVARS_TERMINAL_P(tbl) ((tbl) == DVARS_INHERIT || (tbl) == DVARS_TOPSCOPE)
513
514typedef struct token_info {
515 const char *token;
517 int indent;
518 int nonspc;
519 struct token_info *next;
520} token_info;
521
526
528 struct parser_string_buffer_elem *next;
529 long len; /* Total length of allocated buf */
530 long used; /* Current usage of buf */
531 rb_parser_string_t *buf[FLEX_ARY_LEN];
533
538
539#define AFTER_HEREDOC_WITHOUT_TERMINATOR ((rb_parser_string_t *)1)
540
541/*
542 Structure of Lexer Buffer:
543
544 lex.pbeg lex.ptok lex.pcur lex.pend
545 | | | |
546 |------------+------------+------------|
547 |<---------->|
548 token
549*/
551 YYSTYPE *lval;
552 YYLTYPE *yylloc;
553
554 struct {
555 rb_strterm_t *strterm;
556 rb_parser_lex_gets_func *gets;
557 rb_parser_input_data input;
558 parser_string_buffer_t string_buffer;
559 rb_parser_string_t *lastline;
560 rb_parser_string_t *nextline;
561 const char *pbeg;
562 const char *pcur;
563 const char *pend;
564 const char *ptok;
565 enum lex_state_e state;
566 /* track the nest level of any parens "()[]{}" */
567 int paren_nest;
568 /* keep p->lex.paren_nest at the beginning of lambda "->" to detect tLAMBEG and keyword_do_LAMBDA */
569 int lpar_beg;
570 /* track the nest level of only braces "{}" */
571 int brace_nest;
572 } lex;
573 stack_type cond_stack;
574 stack_type cmdarg_stack;
575 int tokidx;
576 int toksiz;
577 int heredoc_end;
578 int heredoc_indent;
579 int heredoc_line_indent;
580 char *tokenbuf;
581 struct local_vars *lvtbl;
582 st_table *pvtbl;
583 st_table *pktbl;
584 int line_count;
585 int ruby_sourceline; /* current line no. */
586 const char *ruby_sourcefile; /* current source file */
587 VALUE ruby_sourcefile_string;
588 rb_encoding *enc;
590 st_table *case_labels;
591 rb_node_exits_t *exits;
592
593 VALUE debug_buffer;
594 VALUE debug_output;
595
596 struct {
597 rb_parser_string_t *token;
598 int beg_line;
599 int beg_col;
600 int end_line;
601 int end_col;
602 } delayed;
603
604 rb_ast_t *ast;
605 int node_id;
606
607 st_table *warn_duplicate_keys_table;
608
609 int max_numparam;
610 ID it_id;
611
612 struct lex_context ctxt;
613
614 NODE *eval_tree_begin;
615 NODE *eval_tree;
616 const struct rb_iseq_struct *parent_iseq;
617
618#ifdef UNIVERSAL_PARSER
619 const rb_parser_config_t *config;
620#endif
621 /* compile_option */
622 signed int frozen_string_literal:2; /* -1: not specified, 0: false, 1: true */
623
624 unsigned int command_start:1;
625 unsigned int eofp: 1;
626 unsigned int ruby__end__seen: 1;
627 unsigned int debug: 1;
628 unsigned int has_shebang: 1;
629 unsigned int token_seen: 1;
630 unsigned int token_info_enabled: 1;
631# if WARN_PAST_SCOPE
632 unsigned int past_scope_enabled: 1;
633# endif
634 unsigned int error_p: 1;
635 unsigned int cr_seen: 1;
636
637#ifndef RIPPER
638 /* Ruby core only */
639
640 unsigned int do_print: 1;
641 unsigned int do_loop: 1;
642 unsigned int do_chomp: 1;
643 unsigned int do_split: 1;
644 unsigned int error_tolerant: 1;
645 unsigned int keep_tokens: 1;
646
647 VALUE error_buffer;
648 rb_parser_ary_t *debug_lines;
649 /*
650 * Store specific keyword locations to generate dummy end token.
651 * Refer to the tail of list element.
652 */
654 /* id for terms */
655 int token_id;
656 /* Array for term tokens */
657 rb_parser_ary_t *tokens;
658#else
659 /* Ripper only */
660
661 VALUE value;
662 VALUE result;
663 VALUE parsing_thread;
664 VALUE s_value; /* Token VALUE */
665 VALUE s_lvalue; /* VALUE generated by rule action (reduce) */
666 VALUE s_value_stack;
667#endif
668};
669
670#define NUMPARAM_ID_P(id) numparam_id_p(p, id)
671#define NUMPARAM_ID_TO_IDX(id) (unsigned int)(((id) >> ID_SCOPE_SHIFT) - (tNUMPARAM_1 - 1))
672#define NUMPARAM_IDX_TO_ID(idx) TOKEN2LOCALID((tNUMPARAM_1 - 1 + (idx)))
673static int
674numparam_id_p(struct parser_params *p, ID id)
675{
676 if (!is_local_id(id) || id < (tNUMPARAM_1 << ID_SCOPE_SHIFT)) return 0;
677 unsigned int idx = NUMPARAM_ID_TO_IDX(id);
678 return idx > 0 && idx <= NUMPARAM_MAX;
679}
680static void numparam_name(struct parser_params *p, ID id);
681
682#ifdef RIPPER
683static void
684after_shift(struct parser_params *p)
685{
686 if (p->debug) {
687 rb_parser_printf(p, "after-shift: %+"PRIsVALUE"\n", p->s_value);
688 }
689 rb_ary_push(p->s_value_stack, p->s_value);
690 p->s_value = Qnil;
691}
692
693static void
694before_reduce(int len, struct parser_params *p)
695{
696 // Initialize $$ with $1.
697 if (len) p->s_lvalue = rb_ary_entry(p->s_value_stack, -len);
698}
699
700static void
701after_reduce(int len, struct parser_params *p)
702{
703 for (int i = 0; i < len; i++) {
704 VALUE tos = rb_ary_pop(p->s_value_stack);
705 if (p->debug) {
706 rb_parser_printf(p, "after-reduce pop: %+"PRIsVALUE"\n", tos);
707 }
708 }
709 if (p->debug) {
710 rb_parser_printf(p, "after-reduce push: %+"PRIsVALUE"\n", p->s_lvalue);
711 }
712 rb_ary_push(p->s_value_stack, p->s_lvalue);
713 p->s_lvalue = Qnil;
714}
715
716static void
717after_shift_error_token(struct parser_params *p)
718{
719 if (p->debug) {
720 rb_parser_printf(p, "after-shift-error-token:\n");
721 }
722 rb_ary_push(p->s_value_stack, Qnil);
723}
724
725static void
726after_pop_stack(int len, struct parser_params *p)
727{
728 for (int i = 0; i < len; i++) {
729 VALUE tos = rb_ary_pop(p->s_value_stack);
730 if (p->debug) {
731 rb_parser_printf(p, "after-pop-stack pop: %+"PRIsVALUE"\n", tos);
732 }
733 }
734}
735#else
736static void
737after_shift(struct parser_params *p)
738{
739}
740
741static void
742before_reduce(int len, struct parser_params *p)
743{
744}
745
746static void
747after_reduce(int len, struct parser_params *p)
748{
749}
750
751static void
752after_shift_error_token(struct parser_params *p)
753{
754}
755
756static void
757after_pop_stack(int len, struct parser_params *p)
758{
759}
760#endif
761
762#define intern_cstr(n,l,en) rb_intern3(n,l,en)
763
764#define STRING_NEW0() rb_parser_encoding_string_new(p,0,0,p->enc)
765
766#define STR_NEW(ptr,len) rb_enc_str_new((ptr),(len),p->enc)
767#define STR_NEW0() rb_enc_str_new(0,0,p->enc)
768#define STR_NEW2(ptr) rb_enc_str_new((ptr),strlen(ptr),p->enc)
769#define STR_NEW3(ptr,len,e,func) parser_str_new(p, (ptr),(len),(e),(func),p->enc)
770#define TOK_INTERN() intern_cstr(tok(p), toklen(p), p->enc)
771#define VALID_SYMNAME_P(s, l, enc, type) (rb_enc_symname_type(s, l, enc, (1U<<(type))) == (int)(type))
772
773#ifndef RIPPER
774static inline int
775char_at_end(struct parser_params *p, VALUE str, int when_empty)
776{
777 long len = RSTRING_LEN(str);
778 return len > 0 ? (unsigned char)RSTRING_PTR(str)[len-1] : when_empty;
779}
780#endif
781
782static void
783pop_pvtbl(struct parser_params *p, st_table *tbl)
784{
785 st_free_table(p->pvtbl);
786 p->pvtbl = tbl;
787}
788
789static void
790pop_pktbl(struct parser_params *p, st_table *tbl)
791{
792 if (p->pktbl) st_free_table(p->pktbl);
793 p->pktbl = tbl;
794}
795
796#define STRING_BUF_DEFAULT_LEN 16
797
798static void
799string_buffer_init(struct parser_params *p)
800{
801 parser_string_buffer_t *buf = &p->lex.string_buffer;
802 const size_t size = offsetof(parser_string_buffer_elem_t, buf) + sizeof(rb_parser_string_t *) * STRING_BUF_DEFAULT_LEN;
803
804 buf->head = buf->last = xmalloc(size);
805 buf->head->len = STRING_BUF_DEFAULT_LEN;
806 buf->head->used = 0;
807 buf->head->next = NULL;
808}
809
810static void
811string_buffer_append(struct parser_params *p, rb_parser_string_t *str)
812{
813 parser_string_buffer_t *buf = &p->lex.string_buffer;
814
815 if (buf->head->used >= buf->head->len) {
817 long n = buf->head->len * 2;
818 const size_t size = offsetof(parser_string_buffer_elem_t, buf) + sizeof(rb_parser_string_t *) * n;
819
820 elem = xmalloc(size);
821 elem->len = n;
822 elem->used = 0;
823 elem->next = NULL;
824 buf->last->next = elem;
825 buf->last = elem;
826 }
827 buf->last->buf[buf->last->used++] = str;
828}
829
830static void
831string_buffer_free(struct parser_params *p)
832{
833 parser_string_buffer_elem_t *elem = p->lex.string_buffer.head;
834
835 while (elem) {
836 parser_string_buffer_elem_t *next_elem = elem->next;
837
838 for (long i = 0; i < elem->used; i++) {
839 rb_parser_string_free(p, elem->buf[i]);
840 }
841
842 xfree(elem);
843 elem = next_elem;
844 }
845}
846
847#ifndef RIPPER
848static void flush_debug_buffer(struct parser_params *p, VALUE out, VALUE str);
849
850static void
851debug_end_expect_token_locations(struct parser_params *p, const char *name)
852{
853 if(p->debug) {
854 VALUE mesg = rb_sprintf("%s: [", name);
855 int i = 0;
856 for (end_expect_token_locations_t *loc = p->end_expect_token_locations; loc; loc = loc->prev) {
857 if (i > 0)
858 rb_str_cat_cstr(mesg, ", ");
859 rb_str_catf(mesg, "[%d, %d]", loc->pos->lineno, loc->pos->column);
860 i++;
861 }
862 rb_str_cat_cstr(mesg, "]\n");
863 flush_debug_buffer(p, p->debug_output, mesg);
864 }
865}
866
867static void
868push_end_expect_token_locations(struct parser_params *p, const rb_code_position_t *pos)
869{
870 if(!p->error_tolerant) return;
871
874 locations->pos = pos;
875 locations->prev = p->end_expect_token_locations;
876 p->end_expect_token_locations = locations;
877
878 debug_end_expect_token_locations(p, "push_end_expect_token_locations");
879}
880
881static void
882pop_end_expect_token_locations(struct parser_params *p)
883{
884 if(!p->end_expect_token_locations) return;
885
886 end_expect_token_locations_t *locations = p->end_expect_token_locations->prev;
887 ruby_sized_xfree(p->end_expect_token_locations, sizeof(end_expect_token_locations_t));
888 p->end_expect_token_locations = locations;
889
890 debug_end_expect_token_locations(p, "pop_end_expect_token_locations");
891}
892
894peek_end_expect_token_locations(struct parser_params *p)
895{
896 return p->end_expect_token_locations;
897}
898
899static const char *
900parser_token2char(struct parser_params *p, enum yytokentype tok)
901{
902 switch ((int) tok) {
903#define TOKEN2CHAR(tok) case tok: return (#tok);
904#define TOKEN2CHAR2(tok, name) case tok: return (name);
905 TOKEN2CHAR2(' ', "word_sep");
906 TOKEN2CHAR2('!', "!")
907 TOKEN2CHAR2('%', "%");
908 TOKEN2CHAR2('&', "&");
909 TOKEN2CHAR2('*', "*");
910 TOKEN2CHAR2('+', "+");
911 TOKEN2CHAR2('-', "-");
912 TOKEN2CHAR2('/', "/");
913 TOKEN2CHAR2('<', "<");
914 TOKEN2CHAR2('=', "=");
915 TOKEN2CHAR2('>', ">");
916 TOKEN2CHAR2('?', "?");
917 TOKEN2CHAR2('^', "^");
918 TOKEN2CHAR2('|', "|");
919 TOKEN2CHAR2('~', "~");
920 TOKEN2CHAR2(':', ":");
921 TOKEN2CHAR2(',', ",");
922 TOKEN2CHAR2('.', ".");
923 TOKEN2CHAR2(';', ";");
924 TOKEN2CHAR2('`', "`");
925 TOKEN2CHAR2('\n', "nl");
926 TOKEN2CHAR2('{', "\"{\"");
927 TOKEN2CHAR2('}', "\"}\"");
928 TOKEN2CHAR2('[', "\"[\"");
929 TOKEN2CHAR2(']', "\"]\"");
930 TOKEN2CHAR2('(', "\"(\"");
931 TOKEN2CHAR2(')', "\")\"");
932 TOKEN2CHAR2('\\', "backslash");
933 TOKEN2CHAR(keyword_class);
934 TOKEN2CHAR(keyword_module);
935 TOKEN2CHAR(keyword_def);
936 TOKEN2CHAR(keyword_undef);
937 TOKEN2CHAR(keyword_begin);
938 TOKEN2CHAR(keyword_rescue);
939 TOKEN2CHAR(keyword_ensure);
940 TOKEN2CHAR(keyword_end);
941 TOKEN2CHAR(keyword_if);
942 TOKEN2CHAR(keyword_unless);
943 TOKEN2CHAR(keyword_then);
944 TOKEN2CHAR(keyword_elsif);
945 TOKEN2CHAR(keyword_else);
946 TOKEN2CHAR(keyword_case);
947 TOKEN2CHAR(keyword_when);
948 TOKEN2CHAR(keyword_while);
949 TOKEN2CHAR(keyword_until);
950 TOKEN2CHAR(keyword_for);
951 TOKEN2CHAR(keyword_break);
952 TOKEN2CHAR(keyword_next);
953 TOKEN2CHAR(keyword_redo);
954 TOKEN2CHAR(keyword_retry);
955 TOKEN2CHAR(keyword_in);
956 TOKEN2CHAR(keyword_do);
957 TOKEN2CHAR(keyword_do_cond);
958 TOKEN2CHAR(keyword_do_block);
959 TOKEN2CHAR(keyword_do_LAMBDA);
960 TOKEN2CHAR(keyword_return);
961 TOKEN2CHAR(keyword_yield);
962 TOKEN2CHAR(keyword_super);
963 TOKEN2CHAR(keyword_self);
964 TOKEN2CHAR(keyword_nil);
965 TOKEN2CHAR(keyword_true);
966 TOKEN2CHAR(keyword_false);
967 TOKEN2CHAR(keyword_and);
968 TOKEN2CHAR(keyword_or);
969 TOKEN2CHAR(keyword_not);
970 TOKEN2CHAR(modifier_if);
971 TOKEN2CHAR(modifier_unless);
972 TOKEN2CHAR(modifier_while);
973 TOKEN2CHAR(modifier_until);
974 TOKEN2CHAR(modifier_rescue);
975 TOKEN2CHAR(keyword_alias);
976 TOKEN2CHAR(keyword_defined);
977 TOKEN2CHAR(keyword_BEGIN);
978 TOKEN2CHAR(keyword_END);
979 TOKEN2CHAR(keyword__LINE__);
980 TOKEN2CHAR(keyword__FILE__);
981 TOKEN2CHAR(keyword__ENCODING__);
982 TOKEN2CHAR(tIDENTIFIER);
983 TOKEN2CHAR(tFID);
984 TOKEN2CHAR(tGVAR);
985 TOKEN2CHAR(tIVAR);
986 TOKEN2CHAR(tCONSTANT);
987 TOKEN2CHAR(tCVAR);
988 TOKEN2CHAR(tLABEL);
989 TOKEN2CHAR(tINTEGER);
990 TOKEN2CHAR(tFLOAT);
991 TOKEN2CHAR(tRATIONAL);
992 TOKEN2CHAR(tIMAGINARY);
993 TOKEN2CHAR(tCHAR);
994 TOKEN2CHAR(tNTH_REF);
995 TOKEN2CHAR(tBACK_REF);
996 TOKEN2CHAR(tSTRING_CONTENT);
997 TOKEN2CHAR(tREGEXP_END);
998 TOKEN2CHAR(tDUMNY_END);
999 TOKEN2CHAR(tSP);
1000 TOKEN2CHAR(tUPLUS);
1001 TOKEN2CHAR(tUMINUS);
1002 TOKEN2CHAR(tPOW);
1003 TOKEN2CHAR(tCMP);
1004 TOKEN2CHAR(tEQ);
1005 TOKEN2CHAR(tEQQ);
1006 TOKEN2CHAR(tNEQ);
1007 TOKEN2CHAR(tGEQ);
1008 TOKEN2CHAR(tLEQ);
1009 TOKEN2CHAR(tANDOP);
1010 TOKEN2CHAR(tOROP);
1011 TOKEN2CHAR(tMATCH);
1012 TOKEN2CHAR(tNMATCH);
1013 TOKEN2CHAR(tDOT2);
1014 TOKEN2CHAR(tDOT3);
1015 TOKEN2CHAR(tBDOT2);
1016 TOKEN2CHAR(tBDOT3);
1017 TOKEN2CHAR(tAREF);
1018 TOKEN2CHAR(tASET);
1019 TOKEN2CHAR(tLSHFT);
1020 TOKEN2CHAR(tRSHFT);
1021 TOKEN2CHAR(tANDDOT);
1022 TOKEN2CHAR(tCOLON2);
1023 TOKEN2CHAR(tCOLON3);
1024 TOKEN2CHAR(tOP_ASGN);
1025 TOKEN2CHAR(tASSOC);
1026 TOKEN2CHAR(tLPAREN);
1027 TOKEN2CHAR(tLPAREN_ARG);
1028 TOKEN2CHAR(tLBRACK);
1029 TOKEN2CHAR(tLBRACE);
1030 TOKEN2CHAR(tLBRACE_ARG);
1031 TOKEN2CHAR(tSTAR);
1032 TOKEN2CHAR(tDSTAR);
1033 TOKEN2CHAR(tAMPER);
1034 TOKEN2CHAR(tLAMBDA);
1035 TOKEN2CHAR(tSYMBEG);
1036 TOKEN2CHAR(tSTRING_BEG);
1037 TOKEN2CHAR(tXSTRING_BEG);
1038 TOKEN2CHAR(tREGEXP_BEG);
1039 TOKEN2CHAR(tWORDS_BEG);
1040 TOKEN2CHAR(tQWORDS_BEG);
1041 TOKEN2CHAR(tSYMBOLS_BEG);
1042 TOKEN2CHAR(tQSYMBOLS_BEG);
1043 TOKEN2CHAR(tSTRING_END);
1044 TOKEN2CHAR(tSTRING_DEND);
1045 TOKEN2CHAR(tSTRING_DBEG);
1046 TOKEN2CHAR(tSTRING_DVAR);
1047 TOKEN2CHAR(tLAMBEG);
1048 TOKEN2CHAR(tLABEL_END);
1049 TOKEN2CHAR(tIGNORED_NL);
1050 TOKEN2CHAR(tCOMMENT);
1051 TOKEN2CHAR(tEMBDOC_BEG);
1052 TOKEN2CHAR(tEMBDOC);
1053 TOKEN2CHAR(tEMBDOC_END);
1054 TOKEN2CHAR(tHEREDOC_BEG);
1055 TOKEN2CHAR(tHEREDOC_END);
1056 TOKEN2CHAR(k__END__);
1057 TOKEN2CHAR(tLOWEST);
1058 TOKEN2CHAR(tUMINUS_NUM);
1059 TOKEN2CHAR(tLAST_TOKEN);
1060#undef TOKEN2CHAR
1061#undef TOKEN2CHAR2
1062 }
1063
1064 rb_bug("parser_token2id: unknown token %d", tok);
1065
1066 UNREACHABLE_RETURN(0);
1067}
1068#else
1069static void
1070push_end_expect_token_locations(struct parser_params *p, const rb_code_position_t *pos)
1071{
1072}
1073
1074static void
1075pop_end_expect_token_locations(struct parser_params *p)
1076{
1077}
1078#endif
1079
1080RBIMPL_ATTR_NONNULL((1, 2, 3))
1081static int parser_yyerror(struct parser_params*, const YYLTYPE *yylloc, const char*);
1082RBIMPL_ATTR_NONNULL((1, 2))
1083static int parser_yyerror0(struct parser_params*, const char*);
1084#define yyerror0(msg) parser_yyerror0(p, (msg))
1085#define yyerror1(loc, msg) parser_yyerror(p, (loc), (msg))
1086#define yyerror(yylloc, p, msg) parser_yyerror(p, yylloc, msg)
1087#define token_flush(ptr) ((ptr)->lex.ptok = (ptr)->lex.pcur)
1088#define lex_goto_eol(p) ((p)->lex.pcur = (p)->lex.pend)
1089#define lex_eol_p(p) lex_eol_n_p(p, 0)
1090#define lex_eol_n_p(p,n) lex_eol_ptr_n_p(p, (p)->lex.pcur, n)
1091#define lex_eol_ptr_p(p,ptr) lex_eol_ptr_n_p(p,ptr,0)
1092#define lex_eol_ptr_n_p(p,ptr,n) ((ptr)+(n) >= (p)->lex.pend)
1093
1094static void token_info_setup(token_info *ptinfo, const char *ptr, const rb_code_location_t *loc);
1095static void token_info_push(struct parser_params*, const char *token, const rb_code_location_t *loc);
1096static void token_info_pop(struct parser_params*, const char *token, const rb_code_location_t *loc);
1097static void token_info_warn(struct parser_params *p, const char *token, token_info *ptinfo_beg, int same, const rb_code_location_t *loc);
1098static void token_info_drop(struct parser_params *p, const char *token, rb_code_position_t beg_pos);
1099
1100#ifdef RIPPER
1101#define compile_for_eval (0)
1102#else
1103#define compile_for_eval (p->parent_iseq != 0)
1104#endif
1105
1106#define token_column ((int)(p->lex.ptok - p->lex.pbeg))
1107
1108#define CALL_Q_P(q) ((q) == tANDDOT)
1109#define NEW_QCALL(q,r,m,a,loc) (CALL_Q_P(q) ? NEW_QCALL0(r,m,a,loc) : NEW_CALL(r,m,a,loc))
1110
1111#define lambda_beginning_p() (p->lex.lpar_beg == p->lex.paren_nest)
1112
1113static enum yytokentype yylex(YYSTYPE*, YYLTYPE*, struct parser_params*);
1114
1115static inline void
1116rb_discard_node(struct parser_params *p, NODE *n)
1117{
1118 rb_ast_delete_node(p->ast, n);
1119}
1120
1121static 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);
1122static 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);
1123static rb_node_block_t *rb_node_block_new(struct parser_params *p, NODE *nd_head, const YYLTYPE *loc);
1124static 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);
1125static 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);
1126static 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);
1127static 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);
1128static 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);
1129static 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);
1130static 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);
1131static 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);
1132static 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);
1133static rb_node_iter_t *rb_node_iter_new(struct parser_params *p, rb_node_args_t *nd_args, NODE *nd_body, const YYLTYPE *loc);
1134static 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);
1135static rb_node_for_masgn_t *rb_node_for_masgn_new(struct parser_params *p, NODE *nd_var, const YYLTYPE *loc);
1136static rb_node_retry_t *rb_node_retry_new(struct parser_params *p, const YYLTYPE *loc);
1137static rb_node_begin_t *rb_node_begin_new(struct parser_params *p, NODE *nd_body, const YYLTYPE *loc);
1138static rb_node_rescue_t *rb_node_rescue_new(struct parser_params *p, NODE *nd_head, NODE *nd_resq, NODE *nd_else, const YYLTYPE *loc);
1139static 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);
1140static rb_node_ensure_t *rb_node_ensure_new(struct parser_params *p, NODE *nd_head, NODE *nd_ensr, const YYLTYPE *loc);
1141static 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);
1142static 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);
1143static rb_node_masgn_t *rb_node_masgn_new(struct parser_params *p, NODE *nd_head, NODE *nd_args, const YYLTYPE *loc);
1144static rb_node_lasgn_t *rb_node_lasgn_new(struct parser_params *p, ID nd_vid, NODE *nd_value, const YYLTYPE *loc);
1145static rb_node_dasgn_t *rb_node_dasgn_new(struct parser_params *p, ID nd_vid, NODE *nd_value, const YYLTYPE *loc);
1146static rb_node_gasgn_t *rb_node_gasgn_new(struct parser_params *p, ID nd_vid, NODE *nd_value, const YYLTYPE *loc);
1147static rb_node_iasgn_t *rb_node_iasgn_new(struct parser_params *p, ID nd_vid, NODE *nd_value, const YYLTYPE *loc);
1148static 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);
1149static rb_node_cvasgn_t *rb_node_cvasgn_new(struct parser_params *p, ID nd_vid, NODE *nd_value, const YYLTYPE *loc);
1150static 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);
1151static 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);
1152static 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);
1153static 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);
1154static 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);
1155static rb_node_call_t *rb_node_call_new(struct parser_params *p, NODE *nd_recv, ID nd_mid, NODE *nd_args, const YYLTYPE *loc);
1156static rb_node_opcall_t *rb_node_opcall_new(struct parser_params *p, NODE *nd_recv, ID nd_mid, NODE *nd_args, const YYLTYPE *loc);
1157static rb_node_fcall_t *rb_node_fcall_new(struct parser_params *p, ID nd_mid, NODE *nd_args, const YYLTYPE *loc);
1158static rb_node_vcall_t *rb_node_vcall_new(struct parser_params *p, ID nd_mid, const YYLTYPE *loc);
1159static rb_node_qcall_t *rb_node_qcall_new(struct parser_params *p, NODE *nd_recv, ID nd_mid, NODE *nd_args, const YYLTYPE *loc);
1160static 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);
1161static rb_node_zsuper_t * rb_node_zsuper_new(struct parser_params *p, const YYLTYPE *loc);
1162static rb_node_list_t *rb_node_list_new(struct parser_params *p, NODE *nd_head, const YYLTYPE *loc);
1163static rb_node_list_t *rb_node_list_new2(struct parser_params *p, NODE *nd_head, long nd_alen, NODE *nd_next, const YYLTYPE *loc);
1164static rb_node_zlist_t *rb_node_zlist_new(struct parser_params *p, const YYLTYPE *loc);
1165static rb_node_hash_t *rb_node_hash_new(struct parser_params *p, NODE *nd_head, const YYLTYPE *loc);
1166static rb_node_return_t *rb_node_return_new(struct parser_params *p, NODE *nd_stts, const YYLTYPE *loc, const YYLTYPE *keyword_loc);
1167static 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);
1168static rb_node_lvar_t *rb_node_lvar_new(struct parser_params *p, ID nd_vid, const YYLTYPE *loc);
1169static rb_node_dvar_t *rb_node_dvar_new(struct parser_params *p, ID nd_vid, const YYLTYPE *loc);
1170static rb_node_gvar_t *rb_node_gvar_new(struct parser_params *p, ID nd_vid, const YYLTYPE *loc);
1171static rb_node_ivar_t *rb_node_ivar_new(struct parser_params *p, ID nd_vid, const YYLTYPE *loc);
1172static rb_node_const_t *rb_node_const_new(struct parser_params *p, ID nd_vid, const YYLTYPE *loc);
1173static rb_node_cvar_t *rb_node_cvar_new(struct parser_params *p, ID nd_vid, const YYLTYPE *loc);
1174static rb_node_nth_ref_t *rb_node_nth_ref_new(struct parser_params *p, long nd_nth, const YYLTYPE *loc);
1175static rb_node_back_ref_t *rb_node_back_ref_new(struct parser_params *p, long nd_nth, const YYLTYPE *loc);
1176static rb_node_match2_t *rb_node_match2_new(struct parser_params *p, NODE *nd_recv, NODE *nd_value, const YYLTYPE *loc);
1177static rb_node_match3_t *rb_node_match3_new(struct parser_params *p, NODE *nd_recv, NODE *nd_value, const YYLTYPE *loc);
1178static rb_node_integer_t * rb_node_integer_new(struct parser_params *p, char* val, int base, const YYLTYPE *loc);
1179static rb_node_float_t * rb_node_float_new(struct parser_params *p, char* val, const YYLTYPE *loc);
1180static rb_node_rational_t * rb_node_rational_new(struct parser_params *p, char* val, int base, int seen_point, const YYLTYPE *loc);
1181static 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);
1182static rb_node_str_t *rb_node_str_new(struct parser_params *p, rb_parser_string_t *string, const YYLTYPE *loc);
1183static 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);
1184static rb_node_dstr_t *rb_node_dstr_new(struct parser_params *p, rb_parser_string_t *string, const YYLTYPE *loc);
1185static rb_node_xstr_t *rb_node_xstr_new(struct parser_params *p, rb_parser_string_t *string, const YYLTYPE *loc);
1186static 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);
1187static 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);
1188static 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);
1189static rb_node_once_t *rb_node_once_new(struct parser_params *p, NODE *nd_body, const YYLTYPE *loc);
1190static rb_node_args_t *rb_node_args_new(struct parser_params *p, const YYLTYPE *loc);
1191static rb_node_args_aux_t *rb_node_args_aux_new(struct parser_params *p, ID nd_pid, int nd_plen, const YYLTYPE *loc);
1192static rb_node_opt_arg_t *rb_node_opt_arg_new(struct parser_params *p, NODE *nd_body, const YYLTYPE *loc);
1193static rb_node_kw_arg_t *rb_node_kw_arg_new(struct parser_params *p, NODE *nd_body, const YYLTYPE *loc);
1194static rb_node_postarg_t *rb_node_postarg_new(struct parser_params *p, NODE *nd_1st, NODE *nd_2nd, const YYLTYPE *loc);
1195static rb_node_argscat_t *rb_node_argscat_new(struct parser_params *p, NODE *nd_head, NODE *nd_body, const YYLTYPE *loc);
1196static rb_node_argspush_t *rb_node_argspush_new(struct parser_params *p, NODE *nd_head, NODE *nd_body, const YYLTYPE *loc);
1197static rb_node_splat_t *rb_node_splat_new(struct parser_params *p, NODE *nd_head, const YYLTYPE *loc, const YYLTYPE *operator_loc);
1198static rb_node_block_pass_t *rb_node_block_pass_new(struct parser_params *p, NODE *nd_body, const YYLTYPE *loc, const YYLTYPE *operator_loc);
1199static rb_node_defn_t *rb_node_defn_new(struct parser_params *p, ID nd_mid, NODE *nd_defn, const YYLTYPE *loc);
1200static rb_node_defs_t *rb_node_defs_new(struct parser_params *p, NODE *nd_recv, ID nd_mid, NODE *nd_defn, const YYLTYPE *loc);
1201static 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);
1202static 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);
1203static rb_node_undef_t *rb_node_undef_new(struct parser_params *p, NODE *nd_undef, const YYLTYPE *loc);
1204static 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);
1205static 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);
1206static 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);
1207static 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);
1208static 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);
1209static 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);
1210static 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);
1211static rb_node_self_t *rb_node_self_new(struct parser_params *p, const YYLTYPE *loc);
1212static rb_node_nil_t *rb_node_nil_new(struct parser_params *p, const YYLTYPE *loc);
1213static rb_node_true_t *rb_node_true_new(struct parser_params *p, const YYLTYPE *loc);
1214static rb_node_false_t *rb_node_false_new(struct parser_params *p, const YYLTYPE *loc);
1215static rb_node_errinfo_t *rb_node_errinfo_new(struct parser_params *p, const YYLTYPE *loc);
1216static rb_node_defined_t *rb_node_defined_new(struct parser_params *p, NODE *nd_head, const YYLTYPE *loc, const YYLTYPE *keyword_loc);
1217static 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);
1218static rb_node_sym_t *rb_node_sym_new(struct parser_params *p, VALUE str, const YYLTYPE *loc);
1219static 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);
1220static rb_node_attrasgn_t *rb_node_attrasgn_new(struct parser_params *p, NODE *nd_recv, ID nd_mid, NODE *nd_args, const YYLTYPE *loc);
1221static 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);
1222static rb_node_aryptn_t *rb_node_aryptn_new(struct parser_params *p, NODE *pre_args, NODE *rest_arg, NODE *post_args, const YYLTYPE *loc);
1223static rb_node_hshptn_t *rb_node_hshptn_new(struct parser_params *p, NODE *nd_pconst, NODE *nd_pkwargs, NODE *nd_pkwrestarg, const YYLTYPE *loc);
1224static 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);
1225static rb_node_line_t *rb_node_line_new(struct parser_params *p, const YYLTYPE *loc);
1226static rb_node_file_t *rb_node_file_new(struct parser_params *p, VALUE str, const YYLTYPE *loc);
1227static rb_node_error_t *rb_node_error_new(struct parser_params *p, const YYLTYPE *loc);
1228
1229#define NEW_SCOPE(a,b,c,loc) (NODE *)rb_node_scope_new(p,a,b,c,loc)
1230#define NEW_SCOPE2(t,a,b,c,loc) (NODE *)rb_node_scope_new2(p,t,a,b,c,loc)
1231#define NEW_BLOCK(a,loc) (NODE *)rb_node_block_new(p,a,loc)
1232#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)
1233#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)
1234#define NEW_CASE(h,b,loc,ck_loc,ek_loc) (NODE *)rb_node_case_new(p,h,b,loc,ck_loc,ek_loc)
1235#define NEW_CASE2(b,loc,ck_loc,ek_loc) (NODE *)rb_node_case2_new(p,b,loc,ck_loc,ek_loc)
1236#define NEW_CASE3(h,b,loc,ck_loc,ek_loc) (NODE *)rb_node_case3_new(p,h,b,loc,ck_loc,ek_loc)
1237#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)
1238#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)
1239#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)
1240#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)
1241#define NEW_ITER(a,b,loc) (NODE *)rb_node_iter_new(p,a,b,loc)
1242#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)
1243#define NEW_FOR_MASGN(v,loc) (NODE *)rb_node_for_masgn_new(p,v,loc)
1244#define NEW_RETRY(loc) (NODE *)rb_node_retry_new(p,loc)
1245#define NEW_BEGIN(b,loc) (NODE *)rb_node_begin_new(p,b,loc)
1246#define NEW_RESCUE(b,res,e,loc) (NODE *)rb_node_rescue_new(p,b,res,e,loc)
1247#define NEW_RESBODY(a,v,ex,n,loc) (NODE *)rb_node_resbody_new(p,a,v,ex,n,loc)
1248#define NEW_ENSURE(b,en,loc) (NODE *)rb_node_ensure_new(p,b,en,loc)
1249#define NEW_AND(f,s,loc,op_loc) (NODE *)rb_node_and_new(p,f,s,loc,op_loc)
1250#define NEW_OR(f,s,loc,op_loc) (NODE *)rb_node_or_new(p,f,s,loc,op_loc)
1251#define NEW_MASGN(l,r,loc) rb_node_masgn_new(p,l,r,loc)
1252#define NEW_LASGN(v,val,loc) (NODE *)rb_node_lasgn_new(p,v,val,loc)
1253#define NEW_DASGN(v,val,loc) (NODE *)rb_node_dasgn_new(p,v,val,loc)
1254#define NEW_GASGN(v,val,loc) (NODE *)rb_node_gasgn_new(p,v,val,loc)
1255#define NEW_IASGN(v,val,loc) (NODE *)rb_node_iasgn_new(p,v,val,loc)
1256#define NEW_CDECL(v,val,path,share,loc) (NODE *)rb_node_cdecl_new(p,v,val,path,share,loc)
1257#define NEW_CVASGN(v,val,loc) (NODE *)rb_node_cvasgn_new(p,v,val,loc)
1258#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)
1259#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)
1260#define NEW_OP_ASGN_OR(i,val,loc) (NODE *)rb_node_op_asgn_or_new(p,i,val,loc)
1261#define NEW_OP_ASGN_AND(i,val,loc) (NODE *)rb_node_op_asgn_and_new(p,i,val,loc)
1262#define NEW_OP_CDECL(v,op,val,share,loc) (NODE *)rb_node_op_cdecl_new(p,v,val,op,share,loc)
1263#define NEW_CALL(r,m,a,loc) (NODE *)rb_node_call_new(p,r,m,a,loc)
1264#define NEW_OPCALL(r,m,a,loc) (NODE *)rb_node_opcall_new(p,r,m,a,loc)
1265#define NEW_FCALL(m,a,loc) rb_node_fcall_new(p,m,a,loc)
1266#define NEW_VCALL(m,loc) (NODE *)rb_node_vcall_new(p,m,loc)
1267#define NEW_QCALL0(r,m,a,loc) (NODE *)rb_node_qcall_new(p,r,m,a,loc)
1268#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)
1269#define NEW_ZSUPER(loc) (NODE *)rb_node_zsuper_new(p,loc)
1270#define NEW_LIST(a,loc) (NODE *)rb_node_list_new(p,a,loc)
1271#define NEW_LIST2(h,l,n,loc) (NODE *)rb_node_list_new2(p,h,l,n,loc)
1272#define NEW_ZLIST(loc) (NODE *)rb_node_zlist_new(p,loc)
1273#define NEW_HASH(a,loc) (NODE *)rb_node_hash_new(p,a,loc)
1274#define NEW_RETURN(s,loc,k_loc) (NODE *)rb_node_return_new(p,s,loc,k_loc)
1275#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)
1276#define NEW_LVAR(v,loc) (NODE *)rb_node_lvar_new(p,v,loc)
1277#define NEW_DVAR(v,loc) (NODE *)rb_node_dvar_new(p,v,loc)
1278#define NEW_GVAR(v,loc) (NODE *)rb_node_gvar_new(p,v,loc)
1279#define NEW_IVAR(v,loc) (NODE *)rb_node_ivar_new(p,v,loc)
1280#define NEW_CONST(v,loc) (NODE *)rb_node_const_new(p,v,loc)
1281#define NEW_CVAR(v,loc) (NODE *)rb_node_cvar_new(p,v,loc)
1282#define NEW_NTH_REF(n,loc) (NODE *)rb_node_nth_ref_new(p,n,loc)
1283#define NEW_BACK_REF(n,loc) (NODE *)rb_node_back_ref_new(p,n,loc)
1284#define NEW_MATCH2(n1,n2,loc) (NODE *)rb_node_match2_new(p,n1,n2,loc)
1285#define NEW_MATCH3(r,n2,loc) (NODE *)rb_node_match3_new(p,r,n2,loc)
1286#define NEW_INTEGER(val, base,loc) (NODE *)rb_node_integer_new(p,val,base,loc)
1287#define NEW_FLOAT(val,loc) (NODE *)rb_node_float_new(p,val,loc)
1288#define NEW_RATIONAL(val,base,seen_point,loc) (NODE *)rb_node_rational_new(p,val,base,seen_point,loc)
1289#define NEW_IMAGINARY(val,base,seen_point,numeric_type,loc) (NODE *)rb_node_imaginary_new(p,val,base,seen_point,numeric_type,loc)
1290#define NEW_STR(s,loc) (NODE *)rb_node_str_new(p,s,loc)
1291#define NEW_DSTR0(s,l,n,loc) (NODE *)rb_node_dstr_new0(p,s,l,n,loc)
1292#define NEW_DSTR(s,loc) (NODE *)rb_node_dstr_new(p,s,loc)
1293#define NEW_XSTR(s,loc) (NODE *)rb_node_xstr_new(p,s,loc)
1294#define NEW_DXSTR(s,l,n,loc) (NODE *)rb_node_dxstr_new(p,s,l,n,loc)
1295#define NEW_EVSTR(n,loc,o_loc,c_loc) (NODE *)rb_node_evstr_new(p,n,loc,o_loc,c_loc)
1296#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)
1297#define NEW_ONCE(b,loc) (NODE *)rb_node_once_new(p,b,loc)
1298#define NEW_ARGS(loc) rb_node_args_new(p,loc)
1299#define NEW_ARGS_AUX(r,b,loc) rb_node_args_aux_new(p,r,b,loc)
1300#define NEW_OPT_ARG(v,loc) rb_node_opt_arg_new(p,v,loc)
1301#define NEW_KW_ARG(v,loc) rb_node_kw_arg_new(p,v,loc)
1302#define NEW_POSTARG(i,v,loc) (NODE *)rb_node_postarg_new(p,i,v,loc)
1303#define NEW_ARGSCAT(a,b,loc) (NODE *)rb_node_argscat_new(p,a,b,loc)
1304#define NEW_ARGSPUSH(a,b,loc) (NODE *)rb_node_argspush_new(p,a,b,loc)
1305#define NEW_SPLAT(a,loc,op_loc) (NODE *)rb_node_splat_new(p,a,loc,op_loc)
1306#define NEW_BLOCK_PASS(b,loc,o_loc) rb_node_block_pass_new(p,b,loc,o_loc)
1307#define NEW_DEFN(i,s,loc) (NODE *)rb_node_defn_new(p,i,s,loc)
1308#define NEW_DEFS(r,i,s,loc) (NODE *)rb_node_defs_new(p,r,i,s,loc)
1309#define NEW_ALIAS(n,o,loc,k_loc) (NODE *)rb_node_alias_new(p,n,o,loc,k_loc)
1310#define NEW_VALIAS(n,o,loc,k_loc) (NODE *)rb_node_valias_new(p,n,o,loc,k_loc)
1311#define NEW_UNDEF(i,loc) (NODE *)rb_node_undef_new(p,i,loc)
1312#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)
1313#define NEW_MODULE(n,b,loc,mk_loc,ek_loc) (NODE *)rb_node_module_new(p,n,b,loc,mk_loc,ek_loc)
1314#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)
1315#define NEW_COLON2(c,i,loc,d_loc,n_loc) (NODE *)rb_node_colon2_new(p,c,i,loc,d_loc,n_loc)
1316#define NEW_COLON3(i,loc,d_loc,n_loc) (NODE *)rb_node_colon3_new(p,i,loc,d_loc,n_loc)
1317#define NEW_DOT2(b,e,loc,op_loc) (NODE *)rb_node_dot2_new(p,b,e,loc,op_loc)
1318#define NEW_DOT3(b,e,loc,op_loc) (NODE *)rb_node_dot3_new(p,b,e,loc,op_loc)
1319#define NEW_SELF(loc) (NODE *)rb_node_self_new(p,loc)
1320#define NEW_NIL(loc) (NODE *)rb_node_nil_new(p,loc)
1321#define NEW_TRUE(loc) (NODE *)rb_node_true_new(p,loc)
1322#define NEW_FALSE(loc) (NODE *)rb_node_false_new(p,loc)
1323#define NEW_ERRINFO(loc) (NODE *)rb_node_errinfo_new(p,loc)
1324#define NEW_DEFINED(e,loc,k_loc) (NODE *)rb_node_defined_new(p,e,loc, k_loc)
1325#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)
1326#define NEW_SYM(str,loc) (NODE *)rb_node_sym_new(p,str,loc)
1327#define NEW_DSYM(s,l,n,loc) (NODE *)rb_node_dsym_new(p,s,l,n,loc)
1328#define NEW_ATTRASGN(r,m,a,loc) (NODE *)rb_node_attrasgn_new(p,r,m,a,loc)
1329#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)
1330#define NEW_ARYPTN(pre,r,post,loc) (NODE *)rb_node_aryptn_new(p,pre,r,post,loc)
1331#define NEW_HSHPTN(c,kw,kwrest,loc) (NODE *)rb_node_hshptn_new(p,c,kw,kwrest,loc)
1332#define NEW_FNDPTN(pre,a,post,loc) (NODE *)rb_node_fndptn_new(p,pre,a,post,loc)
1333#define NEW_LINE(loc) (NODE *)rb_node_line_new(p,loc)
1334#define NEW_FILE(str,loc) (NODE *)rb_node_file_new(p,str,loc)
1335#define NEW_ENCODING(loc) (NODE *)rb_node_encoding_new(p,loc)
1336#define NEW_ERROR(loc) (NODE *)rb_node_error_new(p,loc)
1337
1338enum internal_node_type {
1339 NODE_INTERNAL_ONLY = NODE_LAST,
1340 NODE_DEF_TEMP,
1341 NODE_EXITS,
1342 NODE_INTERNAL_LAST
1343};
1344
1345static const char *
1346parser_node_name(int node)
1347{
1348 switch (node) {
1349 case NODE_DEF_TEMP:
1350 return "NODE_DEF_TEMP";
1351 case NODE_EXITS:
1352 return "NODE_EXITS";
1353 default:
1354 return ruby_node_name(node);
1355 }
1356}
1357
1358/* This node is parse.y internal */
1359struct RNode_DEF_TEMP {
1360 NODE node;
1361
1362 /* for NODE_DEFN/NODE_DEFS */
1363
1364 struct RNode *nd_def;
1365 ID nd_mid;
1366
1367 struct {
1368 int max_numparam;
1369 NODE *numparam_save;
1370 struct lex_context ctxt;
1371 } save;
1372};
1373
1374#define RNODE_DEF_TEMP(node) ((struct RNode_DEF_TEMP *)(node))
1375
1376static rb_node_break_t *rb_node_break_new(struct parser_params *p, NODE *nd_stts, const YYLTYPE *loc, const YYLTYPE *keyword_loc);
1377static rb_node_next_t *rb_node_next_new(struct parser_params *p, NODE *nd_stts, const YYLTYPE *loc, const YYLTYPE *keyword_loc);
1378static rb_node_redo_t *rb_node_redo_new(struct parser_params *p, const YYLTYPE *loc, const YYLTYPE *keyword_loc);
1379static rb_node_def_temp_t *rb_node_def_temp_new(struct parser_params *p, const YYLTYPE *loc);
1380static rb_node_def_temp_t *def_head_save(struct parser_params *p, rb_node_def_temp_t *n);
1381
1382#define NEW_BREAK(s,loc,k_loc) (NODE *)rb_node_break_new(p,s,loc,k_loc)
1383#define NEW_NEXT(s,loc,k_loc) (NODE *)rb_node_next_new(p,s,loc,k_loc)
1384#define NEW_REDO(loc,k_loc) (NODE *)rb_node_redo_new(p,loc,k_loc)
1385#define NEW_DEF_TEMP(loc) rb_node_def_temp_new(p,loc)
1386
1387/* Make a new internal node, which should not be appeared in the
1388 * result AST and does not have node_id and location. */
1389static NODE* node_new_internal(struct parser_params *p, enum node_type type, size_t size, size_t alignment);
1390#define NODE_NEW_INTERNAL(ndtype, type) (type *)node_new_internal(p, (enum node_type)(ndtype), sizeof(type), RUBY_ALIGNOF(type))
1391
1392static NODE *nd_set_loc(NODE *nd, const YYLTYPE *loc);
1393
1394static int
1395parser_get_node_id(struct parser_params *p)
1396{
1397 int node_id = p->node_id;
1398 p->node_id++;
1399 return node_id;
1400}
1401
1402static void
1403anddot_multiple_assignment_check(struct parser_params* p, const YYLTYPE *loc, ID id)
1404{
1405 if (id == tANDDOT) {
1406 yyerror1(loc, "&. inside multiple assignment destination");
1407 }
1408}
1409
1410static inline void
1411set_line_body(NODE *body, int line)
1412{
1413 if (!body) return;
1414 switch (nd_type(body)) {
1415 case NODE_RESCUE:
1416 case NODE_ENSURE:
1417 nd_set_line(body, line);
1418 }
1419}
1420
1421static void
1422set_embraced_location(NODE *node, const rb_code_location_t *beg, const rb_code_location_t *end)
1423{
1424 RNODE_ITER(node)->nd_body->nd_loc = code_loc_gen(beg, end);
1425 nd_set_line(node, beg->end_pos.lineno);
1426}
1427
1428static NODE *
1429last_expr_node(NODE *expr)
1430{
1431 while (expr) {
1432 if (nd_type_p(expr, NODE_BLOCK)) {
1433 expr = RNODE_BLOCK(RNODE_BLOCK(expr)->nd_end)->nd_head;
1434 }
1435 else if (nd_type_p(expr, NODE_BEGIN) && RNODE_BEGIN(expr)->nd_body) {
1436 expr = RNODE_BEGIN(expr)->nd_body;
1437 }
1438 else {
1439 break;
1440 }
1441 }
1442 return expr;
1443}
1444
1445#ifndef RIPPER
1446#define yyparse ruby_yyparse
1447#endif
1448
1449static NODE* cond(struct parser_params *p, NODE *node, const YYLTYPE *loc);
1450static NODE* method_cond(struct parser_params *p, NODE *node, const YYLTYPE *loc);
1451#define new_nil(loc) NEW_NIL(loc)
1452static NODE *new_nil_at(struct parser_params *p, const rb_code_position_t *pos);
1453static NODE *new_if(struct parser_params*,NODE*,NODE*,NODE*,const YYLTYPE*,const YYLTYPE*,const YYLTYPE*,const YYLTYPE*);
1454static NODE *new_unless(struct parser_params*,NODE*,NODE*,NODE*,const YYLTYPE*,const YYLTYPE*,const YYLTYPE*,const YYLTYPE*);
1455static NODE *logop(struct parser_params*,ID,NODE*,NODE*,const YYLTYPE*,const YYLTYPE*);
1456
1457static NODE *newline_node(NODE*);
1458static void fixpos(NODE*,NODE*);
1459
1460static int value_expr_gen(struct parser_params*,NODE*);
1461static void void_expr(struct parser_params*,NODE*);
1462static NODE *remove_begin(NODE*);
1463#define value_expr(node) value_expr_gen(p, (node))
1464static NODE *void_stmts(struct parser_params*,NODE*);
1465static void reduce_nodes(struct parser_params*,NODE**);
1466static void block_dup_check(struct parser_params*,NODE*,NODE*);
1467
1468static NODE *block_append(struct parser_params*,NODE*,NODE*);
1469static NODE *list_append(struct parser_params*,NODE*,NODE*);
1470static NODE *list_concat(NODE*,NODE*);
1471static NODE *arg_append(struct parser_params*,NODE*,NODE*,const YYLTYPE*);
1472static NODE *last_arg_append(struct parser_params *p, NODE *args, NODE *last_arg, const YYLTYPE *loc);
1473static NODE *rest_arg_append(struct parser_params *p, NODE *args, NODE *rest_arg, const YYLTYPE *loc);
1474static NODE *literal_concat(struct parser_params*,NODE*,NODE*,const YYLTYPE*);
1475static NODE *new_evstr(struct parser_params*,NODE*,const YYLTYPE*,const YYLTYPE*,const YYLTYPE*);
1476static NODE *new_dstr(struct parser_params*,NODE*,const YYLTYPE*);
1477static NODE *str2dstr(struct parser_params*,NODE*);
1478static NODE *evstr2dstr(struct parser_params*,NODE*);
1479static NODE *splat_array(NODE*);
1480static void mark_lvar_used(struct parser_params *p, NODE *rhs);
1481
1482static NODE *call_bin_op(struct parser_params*,NODE*,ID,NODE*,const YYLTYPE*,const YYLTYPE*);
1483static NODE *call_uni_op(struct parser_params*,NODE*,ID,const YYLTYPE*,const YYLTYPE*);
1484static NODE *new_qcall(struct parser_params* p, ID atype, NODE *recv, ID mid, NODE *args, const YYLTYPE *op_loc, const YYLTYPE *loc);
1485static NODE *new_command_qcall(struct parser_params* p, ID atype, NODE *recv, ID mid, NODE *args, NODE *block, const YYLTYPE *op_loc, const YYLTYPE *loc);
1486static NODE *method_add_block(struct parser_params*p, NODE *m, NODE *b, const YYLTYPE *loc) {RNODE_ITER(b)->nd_iter = m; b->nd_loc = *loc; return b;}
1487
1488static bool args_info_empty_p(struct rb_args_info *args);
1489static rb_node_args_t *new_args(struct parser_params*,rb_node_args_aux_t*,rb_node_opt_arg_t*,ID,rb_node_args_aux_t*,rb_node_args_t*,const YYLTYPE*);
1490static rb_node_args_t *new_args_tail(struct parser_params*,rb_node_kw_arg_t*,ID,ID,const YYLTYPE*);
1491static NODE *new_array_pattern(struct parser_params *p, NODE *constant, NODE *pre_arg, NODE *aryptn, const YYLTYPE *loc);
1492static NODE *new_array_pattern_tail(struct parser_params *p, NODE *pre_args, int has_rest, NODE *rest_arg, NODE *post_args, const YYLTYPE *loc);
1493static NODE *new_find_pattern(struct parser_params *p, NODE *constant, NODE *fndptn, const YYLTYPE *loc);
1494static NODE *new_find_pattern_tail(struct parser_params *p, NODE *pre_rest_arg, NODE *args, NODE *post_rest_arg, const YYLTYPE *loc);
1495static NODE *new_hash_pattern(struct parser_params *p, NODE *constant, NODE *hshptn, const YYLTYPE *loc);
1496static NODE *new_hash_pattern_tail(struct parser_params *p, NODE *kw_args, ID kw_rest_arg, const YYLTYPE *loc);
1497
1498static rb_node_kw_arg_t *new_kw_arg(struct parser_params *p, NODE *k, const YYLTYPE *loc);
1499static rb_node_args_t *args_with_numbered(struct parser_params*,rb_node_args_t*,int,ID);
1500
1501static NODE* negate_lit(struct parser_params*, NODE*);
1502static void no_blockarg(struct parser_params*,NODE*);
1503static NODE *ret_args(struct parser_params*,NODE*);
1504static NODE *arg_blk_pass(NODE*,rb_node_block_pass_t*);
1505static NODE *dsym_node(struct parser_params*,NODE*,const YYLTYPE*);
1506
1507static NODE *gettable(struct parser_params*,ID,const YYLTYPE*);
1508static NODE *assignable(struct parser_params*,ID,NODE*,const YYLTYPE*);
1509
1510static NODE *aryset(struct parser_params*,NODE*,NODE*,const YYLTYPE*);
1511static NODE *attrset(struct parser_params*,NODE*,ID,ID,const YYLTYPE*);
1512
1513static VALUE rb_backref_error(struct parser_params*,NODE*);
1514static NODE *node_assign(struct parser_params*,NODE*,NODE*,struct lex_context,const YYLTYPE*);
1515
1516static NODE *new_op_assign(struct parser_params *p, NODE *lhs, ID op, NODE *rhs, struct lex_context, const YYLTYPE *loc);
1517static NODE *new_ary_op_assign(struct parser_params *p, NODE *ary, NODE *args, ID op, NODE *rhs, const YYLTYPE *args_loc, const YYLTYPE *loc, const YYLTYPE *call_operator_loc, const YYLTYPE *opening_loc, const YYLTYPE *closing_loc, const YYLTYPE *binary_operator_loc);
1518static NODE *new_attr_op_assign(struct parser_params *p, NODE *lhs, ID atype, ID attr, ID op, NODE *rhs, const YYLTYPE *loc, const YYLTYPE *call_operator_loc, const YYLTYPE *message_loc, const YYLTYPE *binary_operator_loc);
1519static NODE *new_const_op_assign(struct parser_params *p, NODE *lhs, ID op, NODE *rhs, struct lex_context, const YYLTYPE *loc);
1520static NODE *new_bodystmt(struct parser_params *p, NODE *head, NODE *rescue, NODE *rescue_else, NODE *ensure, const YYLTYPE *loc);
1521
1522static NODE *const_decl(struct parser_params *p, NODE* path, const YYLTYPE *loc);
1523
1524static rb_node_opt_arg_t *opt_arg_append(rb_node_opt_arg_t*, rb_node_opt_arg_t*);
1525static rb_node_kw_arg_t *kwd_append(rb_node_kw_arg_t*, rb_node_kw_arg_t*);
1526
1527static NODE *new_hash(struct parser_params *p, NODE *hash, const YYLTYPE *loc);
1528static NODE *new_unique_key_hash(struct parser_params *p, NODE *hash, const YYLTYPE *loc);
1529
1530static NODE *new_defined(struct parser_params *p, NODE *expr, const YYLTYPE *loc, const YYLTYPE *keyword_loc);
1531
1532static NODE *new_regexp(struct parser_params *, NODE *, int, const YYLTYPE *, const YYLTYPE *, const YYLTYPE *, const YYLTYPE *);
1533
1534#define make_list(list, loc) ((list) ? (nd_set_loc(list, loc), list) : NEW_ZLIST(loc))
1535
1536static NODE *new_xstring(struct parser_params *, NODE *, const YYLTYPE *loc);
1537
1538static NODE *symbol_append(struct parser_params *p, NODE *symbols, NODE *symbol);
1539
1540static NODE *match_op(struct parser_params*,NODE*,NODE*,const YYLTYPE*,const YYLTYPE*);
1541
1542static rb_ast_id_table_t *local_tbl(struct parser_params*);
1543
1544static VALUE reg_compile(struct parser_params*, rb_parser_string_t*, int);
1545static void reg_fragment_setenc(struct parser_params*, rb_parser_string_t*, int);
1546
1547static int literal_concat0(struct parser_params *p, rb_parser_string_t *head, rb_parser_string_t *tail);
1548static NODE *heredoc_dedent(struct parser_params*,NODE*);
1549
1550static void check_literal_when(struct parser_params *p, NODE *args, const YYLTYPE *loc);
1551
1552static rb_locations_lambda_body_t* new_locations_lambda_body(struct parser_params *p, NODE *node, const YYLTYPE *loc, const YYLTYPE *opening_loc, const YYLTYPE *closing_loc);
1553
1554#ifdef RIPPER
1555#define get_value(idx) (rb_ary_entry(p->s_value_stack, idx))
1556#define set_value(val) (p->s_lvalue = val)
1557static VALUE assign_error(struct parser_params *p, const char *mesg, VALUE a);
1558static int id_is_var(struct parser_params *p, ID id);
1559#endif
1560
1561RUBY_SYMBOL_EXPORT_BEGIN
1562VALUE rb_parser_reg_compile(struct parser_params* p, VALUE str, int options);
1563int rb_reg_fragment_setenc(struct parser_params*, rb_parser_string_t *, int);
1564enum lex_state_e rb_parser_trace_lex_state(struct parser_params *, enum lex_state_e, enum lex_state_e, int);
1565VALUE rb_parser_lex_state_name(struct parser_params *p, enum lex_state_e state);
1566void rb_parser_show_bitstack(struct parser_params *, stack_type, const char *, int);
1567PRINTF_ARGS(void rb_parser_fatal(struct parser_params *p, const char *fmt, ...), 2, 3);
1568YYLTYPE *rb_parser_set_location_from_strterm_heredoc(struct parser_params *p, rb_strterm_heredoc_t *here, YYLTYPE *yylloc);
1569YYLTYPE *rb_parser_set_location_of_delayed_token(struct parser_params *p, YYLTYPE *yylloc);
1570YYLTYPE *rb_parser_set_location_of_heredoc_end(struct parser_params *p, YYLTYPE *yylloc);
1571YYLTYPE *rb_parser_set_location_of_dummy_end(struct parser_params *p, YYLTYPE *yylloc);
1572YYLTYPE *rb_parser_set_location_of_none(struct parser_params *p, YYLTYPE *yylloc);
1573YYLTYPE *rb_parser_set_location(struct parser_params *p, YYLTYPE *yylloc);
1574void ruby_show_error_line(struct parser_params *p, VALUE errbuf, const YYLTYPE *yylloc, int lineno, rb_parser_string_t *str);
1575RUBY_SYMBOL_EXPORT_END
1576
1577static void flush_string_content(struct parser_params *p, rb_encoding *enc, size_t back);
1578static void error_duplicate_pattern_variable(struct parser_params *p, ID id, const YYLTYPE *loc);
1579static void error_duplicate_pattern_key(struct parser_params *p, ID id, const YYLTYPE *loc);
1580static VALUE formal_argument_error(struct parser_params*, ID);
1581static ID shadowing_lvar(struct parser_params*,ID);
1582static void new_bv(struct parser_params*,ID);
1583
1584static void local_push(struct parser_params*,int);
1585static void local_pop(struct parser_params*);
1586static void local_var(struct parser_params*, ID);
1587static void arg_var(struct parser_params*, ID);
1588static int local_id(struct parser_params *p, ID id);
1589static int local_id_ref(struct parser_params*, ID, ID **);
1590#define internal_id rb_parser_internal_id
1591ID internal_id(struct parser_params*);
1592static NODE *new_args_forward_call(struct parser_params*, NODE*, const YYLTYPE*, const YYLTYPE*);
1593static int check_forwarding_args(struct parser_params*);
1594static void add_forwarding_args(struct parser_params *p);
1595static void forwarding_arg_check(struct parser_params *p, ID arg, ID all, const char *var);
1596
1597static const struct vtable *dyna_push(struct parser_params *);
1598static void dyna_pop(struct parser_params*, const struct vtable *);
1599static int dyna_in_block(struct parser_params*);
1600#define dyna_var(p, id) local_var(p, id)
1601static int dvar_defined(struct parser_params*, ID);
1602#define dvar_defined_ref rb_parser_dvar_defined_ref
1603int dvar_defined_ref(struct parser_params*, ID, ID**);
1604static int dvar_curr(struct parser_params*,ID);
1605
1606static int lvar_defined(struct parser_params*, ID);
1607
1608static NODE *numparam_push(struct parser_params *p);
1609static void numparam_pop(struct parser_params *p, NODE *prev_inner);
1610
1611#define METHOD_NOT '!'
1612
1613#define idFWD_REST '*'
1614#define idFWD_KWREST idPow /* Use simple "**", as tDSTAR is "**arg" */
1615#define idFWD_BLOCK '&'
1616#define idFWD_ALL idDot3
1617#define arg_FWD_BLOCK idFWD_BLOCK
1618
1619#define RE_ONIG_OPTION_IGNORECASE 1
1620#define RE_ONIG_OPTION_EXTEND (RE_ONIG_OPTION_IGNORECASE<<1)
1621#define RE_ONIG_OPTION_MULTILINE (RE_ONIG_OPTION_EXTEND<<1)
1622#define RE_OPTION_ONCE (1<<16)
1623#define RE_OPTION_ENCODING_SHIFT 8
1624#define RE_OPTION_ENCODING(e) (((e)&0xff)<<RE_OPTION_ENCODING_SHIFT)
1625#define RE_OPTION_ENCODING_IDX(o) (((o)>>RE_OPTION_ENCODING_SHIFT)&0xff)
1626#define RE_OPTION_ENCODING_NONE(o) ((o)&RE_OPTION_ARG_ENCODING_NONE)
1627#define RE_OPTION_MASK 0xff
1628#define RE_OPTION_ARG_ENCODING_NONE 32
1629
1630#define CHECK_LITERAL_WHEN (st_table *)1
1631#define CASE_LABELS_ENABLED_P(case_labels) (case_labels && case_labels != CHECK_LITERAL_WHEN)
1632
1633#define yytnamerr(yyres, yystr) (YYSIZE_T)rb_yytnamerr(p, yyres, yystr)
1634RUBY_FUNC_EXPORTED size_t rb_yytnamerr(struct parser_params *p, char *yyres, const char *yystr);
1635
1636#define TOKEN2ID(tok) ( \
1637 tTOKEN_LOCAL_BEGIN<(tok)&&(tok)<tTOKEN_LOCAL_END ? TOKEN2LOCALID(tok) : \
1638 tTOKEN_INSTANCE_BEGIN<(tok)&&(tok)<tTOKEN_INSTANCE_END ? TOKEN2INSTANCEID(tok) : \
1639 tTOKEN_GLOBAL_BEGIN<(tok)&&(tok)<tTOKEN_GLOBAL_END ? TOKEN2GLOBALID(tok) : \
1640 tTOKEN_CONST_BEGIN<(tok)&&(tok)<tTOKEN_CONST_END ? TOKEN2CONSTID(tok) : \
1641 tTOKEN_CLASS_BEGIN<(tok)&&(tok)<tTOKEN_CLASS_END ? TOKEN2CLASSID(tok) : \
1642 tTOKEN_ATTRSET_BEGIN<(tok)&&(tok)<tTOKEN_ATTRSET_END ? TOKEN2ATTRSETID(tok) : \
1643 ((tok) / ((tok)<tPRESERVED_ID_END && ((tok)>=128 || rb_ispunct(tok)))))
1644
1645/****** Ripper *******/
1646
1647#ifdef RIPPER
1648
1649#include "eventids1.h"
1650#include "eventids2.h"
1651
1652extern const struct ripper_parser_ids ripper_parser_ids;
1653
1654static VALUE ripper_dispatch0(struct parser_params*,ID);
1655static VALUE ripper_dispatch1(struct parser_params*,ID,VALUE);
1656static VALUE ripper_dispatch2(struct parser_params*,ID,VALUE,VALUE);
1657static VALUE ripper_dispatch3(struct parser_params*,ID,VALUE,VALUE,VALUE);
1658static VALUE ripper_dispatch4(struct parser_params*,ID,VALUE,VALUE,VALUE,VALUE);
1659static VALUE ripper_dispatch5(struct parser_params*,ID,VALUE,VALUE,VALUE,VALUE,VALUE);
1660static VALUE ripper_dispatch7(struct parser_params*,ID,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE);
1661void ripper_error(struct parser_params *p);
1662
1663#define dispatch0(n) ripper_dispatch0(p, RIPPER_ID(n))
1664#define dispatch1(n,a) ripper_dispatch1(p, RIPPER_ID(n), (a))
1665#define dispatch2(n,a,b) ripper_dispatch2(p, RIPPER_ID(n), (a), (b))
1666#define dispatch3(n,a,b,c) ripper_dispatch3(p, RIPPER_ID(n), (a), (b), (c))
1667#define dispatch4(n,a,b,c,d) ripper_dispatch4(p, RIPPER_ID(n), (a), (b), (c), (d))
1668#define dispatch5(n,a,b,c,d,e) ripper_dispatch5(p, RIPPER_ID(n), (a), (b), (c), (d), (e))
1669#define dispatch7(n,a,b,c,d,e,f,g) ripper_dispatch7(p, RIPPER_ID(n), (a), (b), (c), (d), (e), (f), (g))
1670
1671#define yyparse ripper_yyparse
1672
1673static VALUE
1674aryptn_pre_args(struct parser_params *p, VALUE pre_arg, VALUE pre_args)
1675{
1676 if (!NIL_P(pre_arg)) {
1677 if (!NIL_P(pre_args)) {
1678 rb_ary_unshift(pre_args, pre_arg);
1679 }
1680 else {
1681 pre_args = rb_ary_new_from_args(1, pre_arg);
1682 }
1683 }
1684 return pre_args;
1685}
1686
1687#define ID2VAL(id) STATIC_ID2SYM(id)
1688#define TOKEN2VAL(t) ID2VAL(TOKEN2ID(t))
1689#endif /* RIPPER */
1690
1691#define KWD2EID(t, v) keyword_##t
1692
1693static NODE *
1694new_scope_body(struct parser_params *p, rb_node_args_t *args, NODE *body, NODE *parent, const YYLTYPE *loc)
1695{
1696 body = remove_begin(body);
1697 reduce_nodes(p, &body);
1698 NODE *n = NEW_SCOPE(args, body, parent, loc);
1699 nd_set_line(n, loc->end_pos.lineno);
1700 set_line_body(body, loc->beg_pos.lineno);
1701 return n;
1702}
1703
1704static NODE *
1705rescued_expr(struct parser_params *p, NODE *arg, NODE *rescue,
1706 const YYLTYPE *arg_loc, const YYLTYPE *mod_loc, const YYLTYPE *res_loc)
1707{
1708 YYLTYPE loc = code_loc_gen(mod_loc, res_loc);
1709 rescue = NEW_RESBODY(0, 0, remove_begin(rescue), 0, &loc);
1710 loc.beg_pos = arg_loc->beg_pos;
1711 return NEW_RESCUE(arg, rescue, 0, &loc);
1712}
1713
1714static NODE *add_block_exit(struct parser_params *p, NODE *node);
1715static rb_node_exits_t *init_block_exit(struct parser_params *p);
1716static rb_node_exits_t *allow_block_exit(struct parser_params *p);
1717static void restore_block_exit(struct parser_params *p, rb_node_exits_t *exits);
1718static void clear_block_exit(struct parser_params *p, bool error);
1719
1720static void
1721next_rescue_context(struct lex_context *next, const struct lex_context *outer, enum rescue_context def)
1722{
1723 next->in_rescue = outer->in_rescue == after_rescue ? after_rescue : def;
1724}
1725
1726static void
1727restore_defun(struct parser_params *p, rb_node_def_temp_t *temp)
1728{
1729 /* See: def_name action */
1730 struct lex_context ctxt = temp->save.ctxt;
1731 p->ctxt.in_def = ctxt.in_def;
1732 p->ctxt.shareable_constant_value = ctxt.shareable_constant_value;
1733 p->ctxt.in_rescue = ctxt.in_rescue;
1734 p->max_numparam = temp->save.max_numparam;
1735 numparam_pop(p, temp->save.numparam_save);
1736 clear_block_exit(p, true);
1737}
1738
1739static void
1740endless_method_name(struct parser_params *p, ID mid, const YYLTYPE *loc)
1741{
1742 if (is_attrset_id(mid)) {
1743 yyerror1(loc, "setter method cannot be defined in an endless method definition");
1744 }
1745 token_info_drop(p, "def", loc->beg_pos);
1746}
1747
1748#define debug_token_line(p, name, line) do { \
1749 if (p->debug) { \
1750 const char *const pcur = p->lex.pcur; \
1751 const char *const ptok = p->lex.ptok; \
1752 rb_parser_printf(p, name ":%d (%d: %"PRIdPTRDIFF"|%"PRIdPTRDIFF"|%"PRIdPTRDIFF")\n", \
1753 line, p->ruby_sourceline, \
1754 ptok - p->lex.pbeg, pcur - ptok, p->lex.pend - pcur); \
1755 } \
1756 } while (0)
1757
1758#define begin_definition(k, loc_beg, loc_end) \
1759 do { \
1760 if (!(p->ctxt.in_class = (k)[0] != 0)) { \
1761 /* singleton class */ \
1762 p->ctxt.cant_return = !p->ctxt.in_def; \
1763 p->ctxt.in_def = 0; \
1764 } \
1765 else if (p->ctxt.in_def) { \
1766 YYLTYPE loc = code_loc_gen(loc_beg, loc_end); \
1767 yyerror1(&loc, k " definition in method body"); \
1768 } \
1769 else { \
1770 p->ctxt.cant_return = 1; \
1771 } \
1772 local_push(p, 0); \
1773 } while (0)
1774
1775#ifndef RIPPER
1776# define ifndef_ripper(x) (x)
1777# define ifdef_ripper(r,x) (x)
1778#else
1779# define ifndef_ripper(x)
1780# define ifdef_ripper(r,x) (r)
1781#endif
1782
1783# define rb_warn0(fmt) WARN_CALL(WARN_ARGS(fmt, 1))
1784# define rb_warn1(fmt,a) WARN_CALL(WARN_ARGS(fmt, 2), (a))
1785# define rb_warn2(fmt,a,b) WARN_CALL(WARN_ARGS(fmt, 3), (a), (b))
1786# define rb_warn3(fmt,a,b,c) WARN_CALL(WARN_ARGS(fmt, 4), (a), (b), (c))
1787# define rb_warn4(fmt,a,b,c,d) WARN_CALL(WARN_ARGS(fmt, 5), (a), (b), (c), (d))
1788# define rb_warning0(fmt) WARNING_CALL(WARNING_ARGS(fmt, 1))
1789# define rb_warning1(fmt,a) WARNING_CALL(WARNING_ARGS(fmt, 2), (a))
1790# define rb_warning2(fmt,a,b) WARNING_CALL(WARNING_ARGS(fmt, 3), (a), (b))
1791# define rb_warning3(fmt,a,b,c) WARNING_CALL(WARNING_ARGS(fmt, 4), (a), (b), (c))
1792# define rb_warning4(fmt,a,b,c,d) WARNING_CALL(WARNING_ARGS(fmt, 5), (a), (b), (c), (d))
1793# define rb_warn0L(l,fmt) WARN_CALL(WARN_ARGS_L(l, fmt, 1))
1794# define rb_warn1L(l,fmt,a) WARN_CALL(WARN_ARGS_L(l, fmt, 2), (a))
1795# define rb_warn2L(l,fmt,a,b) WARN_CALL(WARN_ARGS_L(l, fmt, 3), (a), (b))
1796# define rb_warn3L(l,fmt,a,b,c) WARN_CALL(WARN_ARGS_L(l, fmt, 4), (a), (b), (c))
1797# define rb_warn4L(l,fmt,a,b,c,d) WARN_CALL(WARN_ARGS_L(l, fmt, 5), (a), (b), (c), (d))
1798# define rb_warning0L(l,fmt) WARNING_CALL(WARNING_ARGS_L(l, fmt, 1))
1799# define rb_warning1L(l,fmt,a) WARNING_CALL(WARNING_ARGS_L(l, fmt, 2), (a))
1800# define rb_warning2L(l,fmt,a,b) WARNING_CALL(WARNING_ARGS_L(l, fmt, 3), (a), (b))
1801# define rb_warning3L(l,fmt,a,b,c) WARNING_CALL(WARNING_ARGS_L(l, fmt, 4), (a), (b), (c))
1802# define rb_warning4L(l,fmt,a,b,c,d) WARNING_CALL(WARNING_ARGS_L(l, fmt, 5), (a), (b), (c), (d))
1803#ifdef RIPPER
1804extern const ID id_warn, id_warning, id_gets, id_assoc;
1805# define ERR_MESG() STR_NEW2(mesg) /* to bypass Ripper DSL */
1806# define WARN_S_L(s,l) STR_NEW(s,l)
1807# define WARN_S(s) STR_NEW2(s)
1808# define WARN_I(i) INT2NUM(i)
1809# define WARN_ID(i) rb_id2str(i)
1810# define PRIsWARN PRIsVALUE
1811# define WARN_ARGS(fmt,n) p->value, id_warn, n, rb_usascii_str_new_lit(fmt)
1812# define WARN_ARGS_L(l,fmt,n) WARN_ARGS(fmt,n)
1813# ifdef HAVE_VA_ARGS_MACRO
1814# define WARN_CALL(...) rb_funcall(__VA_ARGS__)
1815# else
1816# define WARN_CALL rb_funcall
1817# endif
1818# define WARNING_ARGS(fmt,n) p->value, id_warning, n, rb_usascii_str_new_lit(fmt)
1819# define WARNING_ARGS_L(l, fmt,n) WARNING_ARGS(fmt,n)
1820# ifdef HAVE_VA_ARGS_MACRO
1821# define WARNING_CALL(...) rb_funcall(__VA_ARGS__)
1822# else
1823# define WARNING_CALL rb_funcall
1824# endif
1825# define compile_error ripper_compile_error
1826#else
1827# define WARN_S_L(s,l) s
1828# define WARN_S(s) s
1829# define WARN_I(i) i
1830# define WARN_ID(i) rb_id2name(i)
1831# define PRIsWARN PRIsVALUE
1832# define WARN_ARGS(fmt,n) WARN_ARGS_L(p->ruby_sourceline,fmt,n)
1833# define WARN_ARGS_L(l,fmt,n) p->ruby_sourcefile, (l), (fmt)
1834# define WARN_CALL rb_compile_warn
1835# define WARNING_ARGS(fmt,n) WARN_ARGS(fmt,n)
1836# define WARNING_ARGS_L(l,fmt,n) WARN_ARGS_L(l,fmt,n)
1837# define WARNING_CALL rb_compile_warning
1838PRINTF_ARGS(static void parser_compile_error(struct parser_params*, const rb_code_location_t *loc, const char *fmt, ...), 3, 4);
1839# define compile_error(p, ...) parser_compile_error(p, NULL, __VA_ARGS__)
1840#endif
1841
1842#define RNODE_EXITS(node) ((rb_node_exits_t*)(node))
1843
1844static NODE *
1845add_block_exit(struct parser_params *p, NODE *node)
1846{
1847 if (!node) {
1848 compile_error(p, "unexpected null node");
1849 return 0;
1850 }
1851 switch (nd_type(node)) {
1852 case NODE_BREAK: case NODE_NEXT: case NODE_REDO: break;
1853 default:
1854 compile_error(p, "add_block_exit: unexpected node: %s", parser_node_name(nd_type(node)));
1855 return node;
1856 }
1857 if (!p->ctxt.in_defined) {
1858 rb_node_exits_t *exits = p->exits;
1859 if (exits) {
1860 RNODE_EXITS(exits->nd_stts)->nd_chain = node;
1861 exits->nd_stts = node;
1862 }
1863 }
1864 return node;
1865}
1866
1867static rb_node_exits_t *
1868init_block_exit(struct parser_params *p)
1869{
1870 rb_node_exits_t *old = p->exits;
1871 rb_node_exits_t *exits = NODE_NEW_INTERNAL(NODE_EXITS, rb_node_exits_t);
1872 exits->nd_chain = 0;
1873 exits->nd_stts = RNODE(exits);
1874 p->exits = exits;
1875 return old;
1876}
1877
1878static rb_node_exits_t *
1879allow_block_exit(struct parser_params *p)
1880{
1881 rb_node_exits_t *exits = p->exits;
1882 p->exits = 0;
1883 return exits;
1884}
1885
1886static void
1887restore_block_exit(struct parser_params *p, rb_node_exits_t *exits)
1888{
1889 p->exits = exits;
1890}
1891
1892static void
1893clear_block_exit(struct parser_params *p, bool error)
1894{
1895 rb_node_exits_t *exits = p->exits;
1896 if (!exits) return;
1897 if (error) {
1898 for (NODE *e = RNODE(exits); (e = RNODE_EXITS(e)->nd_chain) != 0; ) {
1899 switch (nd_type(e)) {
1900 case NODE_BREAK:
1901 yyerror1(&e->nd_loc, "Invalid break");
1902 break;
1903 case NODE_NEXT:
1904 yyerror1(&e->nd_loc, "Invalid next");
1905 break;
1906 case NODE_REDO:
1907 yyerror1(&e->nd_loc, "Invalid redo");
1908 break;
1909 default:
1910 yyerror1(&e->nd_loc, "unexpected node");
1911 goto end_checks; /* no nd_chain */
1912 }
1913 }
1914 end_checks:;
1915 }
1916 exits->nd_stts = RNODE(exits);
1917 exits->nd_chain = 0;
1918}
1919
1920#define WARN_EOL(tok) \
1921 (looking_at_eol_p(p) ? \
1922 (void)rb_warning0("'" tok "' at the end of line without an expression") : \
1923 (void)0)
1924static int looking_at_eol_p(struct parser_params *p);
1925
1926static NODE *
1927get_nd_value(struct parser_params *p, NODE *node)
1928{
1929 switch (nd_type(node)) {
1930 case NODE_GASGN:
1931 return RNODE_GASGN(node)->nd_value;
1932 case NODE_IASGN:
1933 return RNODE_IASGN(node)->nd_value;
1934 case NODE_LASGN:
1935 return RNODE_LASGN(node)->nd_value;
1936 case NODE_DASGN:
1937 return RNODE_DASGN(node)->nd_value;
1938 case NODE_MASGN:
1939 return RNODE_MASGN(node)->nd_value;
1940 case NODE_CVASGN:
1941 return RNODE_CVASGN(node)->nd_value;
1942 case NODE_CDECL:
1943 return RNODE_CDECL(node)->nd_value;
1944 default:
1945 compile_error(p, "get_nd_value: unexpected node: %s", parser_node_name(nd_type(node)));
1946 return 0;
1947 }
1948}
1949
1950static void
1951set_nd_value(struct parser_params *p, NODE *node, NODE *rhs)
1952{
1953 switch (nd_type(node)) {
1954 case NODE_CDECL:
1955 RNODE_CDECL(node)->nd_value = rhs;
1956 break;
1957 case NODE_GASGN:
1958 RNODE_GASGN(node)->nd_value = rhs;
1959 break;
1960 case NODE_IASGN:
1961 RNODE_IASGN(node)->nd_value = rhs;
1962 break;
1963 case NODE_LASGN:
1964 RNODE_LASGN(node)->nd_value = rhs;
1965 break;
1966 case NODE_DASGN:
1967 RNODE_DASGN(node)->nd_value = rhs;
1968 break;
1969 case NODE_MASGN:
1970 RNODE_MASGN(node)->nd_value = rhs;
1971 break;
1972 case NODE_CVASGN:
1973 RNODE_CVASGN(node)->nd_value = rhs;
1974 break;
1975 default:
1976 compile_error(p, "set_nd_value: unexpected node: %s", parser_node_name(nd_type(node)));
1977 break;
1978 }
1979}
1980
1981static ID
1982get_nd_vid(struct parser_params *p, NODE *node)
1983{
1984 switch (nd_type(node)) {
1985 case NODE_CDECL:
1986 return RNODE_CDECL(node)->nd_vid;
1987 case NODE_GASGN:
1988 return RNODE_GASGN(node)->nd_vid;
1989 case NODE_IASGN:
1990 return RNODE_IASGN(node)->nd_vid;
1991 case NODE_LASGN:
1992 return RNODE_LASGN(node)->nd_vid;
1993 case NODE_DASGN:
1994 return RNODE_DASGN(node)->nd_vid;
1995 case NODE_CVASGN:
1996 return RNODE_CVASGN(node)->nd_vid;
1997 default:
1998 compile_error(p, "get_nd_vid: unexpected node: %s", parser_node_name(nd_type(node)));
1999 return 0;
2000 }
2001}
2002
2003static NODE *
2004get_nd_args(struct parser_params *p, NODE *node)
2005{
2006 switch (nd_type(node)) {
2007 case NODE_CALL:
2008 return RNODE_CALL(node)->nd_args;
2009 case NODE_OPCALL:
2010 return RNODE_OPCALL(node)->nd_args;
2011 case NODE_FCALL:
2012 return RNODE_FCALL(node)->nd_args;
2013 case NODE_QCALL:
2014 return RNODE_QCALL(node)->nd_args;
2015 case NODE_SUPER:
2016 return RNODE_SUPER(node)->nd_args;
2017 case NODE_VCALL:
2018 case NODE_ZSUPER:
2019 case NODE_YIELD:
2020 case NODE_RETURN:
2021 case NODE_BREAK:
2022 case NODE_NEXT:
2023 return 0;
2024 default:
2025 compile_error(p, "get_nd_args: unexpected node: %s", parser_node_name(nd_type(node)));
2026 return 0;
2027 }
2028}
2029
2030static st_index_t
2031djb2(const uint8_t *str, size_t len)
2032{
2033 st_index_t hash = 5381;
2034
2035 for (size_t i = 0; i < len; i++) {
2036 hash = ((hash << 5) + hash) + str[i];
2037 }
2038
2039 return hash;
2040}
2041
2042static st_index_t
2043parser_memhash(const void *ptr, long len)
2044{
2045 return djb2(ptr, len);
2046}
2047
2048#define PARSER_STRING_PTR(str) (str->ptr)
2049#define PARSER_STRING_LEN(str) (str->len)
2050#define PARSER_STRING_END(str) (&str->ptr[str->len])
2051#define STRING_SIZE(str) ((size_t)str->len + 1)
2052#define STRING_TERM_LEN(str) (1)
2053#define STRING_TERM_FILL(str) (str->ptr[str->len] = '\0')
2054#define PARSER_STRING_RESIZE_CAPA_TERM(p,str,capacity,termlen) do {\
2055 SIZED_REALLOC_N(str->ptr, char, (size_t)total + termlen, STRING_SIZE(str)); \
2056 str->len = total; \
2057} while (0)
2058#define STRING_SET_LEN(str, n) do { \
2059 (str)->len = (n); \
2060} while (0)
2061#define PARSER_STRING_GETMEM(str, ptrvar, lenvar) \
2062 ((ptrvar) = str->ptr, \
2063 (lenvar) = str->len)
2064
2065static inline int
2066parser_string_char_at_end(struct parser_params *p, rb_parser_string_t *str, int when_empty)
2067{
2068 return PARSER_STRING_LEN(str) > 0 ? (unsigned char)PARSER_STRING_END(str)[-1] : when_empty;
2069}
2070
2071static rb_parser_string_t *
2072rb_parser_string_new(rb_parser_t *p, const char *ptr, long len)
2073{
2074 rb_parser_string_t *str;
2075
2076 if (len < 0) {
2077 rb_bug("negative string size (or size too big): %ld", len);
2078 }
2079
2080 str = xcalloc(1, sizeof(rb_parser_string_t));
2081 str->ptr = xcalloc(len + 1, sizeof(char));
2082
2083 if (ptr) {
2084 memcpy(PARSER_STRING_PTR(str), ptr, len);
2085 }
2086 STRING_SET_LEN(str, len);
2087 STRING_TERM_FILL(str);
2088 return str;
2089}
2090
2091static rb_parser_string_t *
2092rb_parser_encoding_string_new(rb_parser_t *p, const char *ptr, long len, rb_encoding *enc)
2093{
2094 rb_parser_string_t *str = rb_parser_string_new(p, ptr, len);
2095 str->coderange = RB_PARSER_ENC_CODERANGE_UNKNOWN;
2096 str->enc = enc;
2097 return str;
2098}
2099
2100#ifndef RIPPER
2101rb_parser_string_t *
2102rb_str_to_parser_string(rb_parser_t *p, VALUE str)
2103{
2104 /* Type check */
2105 rb_parser_string_t *ret = rb_parser_encoding_string_new(p, RSTRING_PTR(str), RSTRING_LEN(str), rb_enc_get(str));
2106 RB_GC_GUARD(str);
2107 return ret;
2108}
2109
2110void
2111rb_parser_string_free(rb_parser_t *p, rb_parser_string_t *str)
2112{
2113 if (!str) return;
2114 xfree(PARSER_STRING_PTR(str));
2115 xfree(str);
2116}
2117#endif
2118
2119static st_index_t
2120rb_parser_str_hash(rb_parser_string_t *str)
2121{
2122 return parser_memhash((const void *)PARSER_STRING_PTR(str), PARSER_STRING_LEN(str));
2123}
2124
2125static st_index_t
2126rb_char_p_hash(const char *c)
2127{
2128 return parser_memhash((const void *)c, strlen(c));
2129}
2130
2131static size_t
2132rb_parser_str_capacity(rb_parser_string_t *str, const int termlen)
2133{
2134 return PARSER_STRING_LEN(str);
2135}
2136
2137#ifndef RIPPER
2138static char *
2139rb_parser_string_end(rb_parser_string_t *str)
2140{
2141 return &str->ptr[str->len];
2142}
2143#endif
2144
2145static void
2146rb_parser_string_set_encoding(rb_parser_string_t *str, rb_encoding *enc)
2147{
2148 str->enc = enc;
2149}
2150
2151static rb_encoding *
2152rb_parser_str_get_encoding(rb_parser_string_t *str)
2153{
2154 return str->enc;
2155}
2156
2157#ifndef RIPPER
2158static bool
2159PARSER_ENCODING_IS_ASCII8BIT(struct parser_params *p, rb_parser_string_t *str)
2160{
2161 return rb_parser_str_get_encoding(str) == rb_ascii8bit_encoding();
2162}
2163#endif
2164
2165static int
2166PARSER_ENC_CODERANGE(rb_parser_string_t *str)
2167{
2168 return str->coderange;
2169}
2170
2171static void
2172PARSER_ENC_CODERANGE_SET(rb_parser_string_t *str, int coderange)
2173{
2174 str->coderange = coderange;
2175}
2176
2177static void
2178PARSER_ENCODING_CODERANGE_SET(rb_parser_string_t *str, rb_encoding *enc, enum rb_parser_string_coderange_type cr)
2179{
2180 rb_parser_string_set_encoding(str, enc);
2181 PARSER_ENC_CODERANGE_SET(str, cr);
2182}
2183
2184static void
2185PARSER_ENC_CODERANGE_CLEAR(rb_parser_string_t *str)
2186{
2187 str->coderange = RB_PARSER_ENC_CODERANGE_UNKNOWN;
2188}
2189
2190static bool
2191PARSER_ENC_CODERANGE_ASCIIONLY(rb_parser_string_t *str)
2192{
2193 return PARSER_ENC_CODERANGE(str) == RB_PARSER_ENC_CODERANGE_7BIT;
2194}
2195
2196static bool
2197PARSER_ENC_CODERANGE_CLEAN_P(int cr)
2198{
2199 return cr == RB_PARSER_ENC_CODERANGE_7BIT || cr == RB_PARSER_ENC_CODERANGE_VALID;
2200}
2201
2202static const char *
2203rb_parser_search_nonascii(const char *p, const char *e)
2204{
2205 const char *s = p;
2206
2207 for (; s < e; s++) {
2208 if (*s & 0x80) return s;
2209 }
2210
2211 return NULL;
2212}
2213
2214static int
2215rb_parser_coderange_scan(struct parser_params *p, const char *ptr, long len, rb_encoding *enc)
2216{
2217 const char *e = ptr + len;
2218
2219 if (enc == rb_ascii8bit_encoding()) {
2220 /* enc is ASCII-8BIT. ASCII-8BIT string never be broken. */
2221 ptr = rb_parser_search_nonascii(ptr, e);
2222 return ptr ? RB_PARSER_ENC_CODERANGE_VALID : RB_PARSER_ENC_CODERANGE_7BIT;
2223 }
2224
2225 /* parser string encoding is always asciicompat */
2226 ptr = rb_parser_search_nonascii(ptr, e);
2227 if (!ptr) return RB_PARSER_ENC_CODERANGE_7BIT;
2228 for (;;) {
2229 int ret = rb_enc_precise_mbclen(ptr, e, enc);
2230 if (!MBCLEN_CHARFOUND_P(ret)) return RB_PARSER_ENC_CODERANGE_BROKEN;
2231 ptr += MBCLEN_CHARFOUND_LEN(ret);
2232 if (ptr == e) break;
2233 ptr = rb_parser_search_nonascii(ptr, e);
2234 if (!ptr) break;
2235 }
2236
2237 return RB_PARSER_ENC_CODERANGE_VALID;
2238}
2239
2240static int
2241rb_parser_enc_coderange_scan(struct parser_params *p, rb_parser_string_t *str, rb_encoding *enc)
2242{
2243 return rb_parser_coderange_scan(p, PARSER_STRING_PTR(str), PARSER_STRING_LEN(str), enc);
2244}
2245
2246static int
2247rb_parser_enc_str_coderange(struct parser_params *p, rb_parser_string_t *str)
2248{
2249 int cr = PARSER_ENC_CODERANGE(str);
2250
2251 if (cr == RB_PARSER_ENC_CODERANGE_UNKNOWN) {
2252 cr = rb_parser_enc_coderange_scan(p, str, rb_parser_str_get_encoding(str));
2253 PARSER_ENC_CODERANGE_SET(str, cr);
2254 }
2255
2256 return cr;
2257}
2258
2259static rb_parser_string_t *
2260rb_parser_enc_associate(struct parser_params *p, rb_parser_string_t *str, rb_encoding *enc)
2261{
2262 if (rb_parser_str_get_encoding(str) == enc)
2263 return str;
2264 if (!PARSER_ENC_CODERANGE_ASCIIONLY(str)) {
2265 PARSER_ENC_CODERANGE_CLEAR(str);
2266 }
2267 rb_parser_string_set_encoding(str, enc);
2268 return str;
2269}
2270
2271static bool
2272rb_parser_is_ascii_string(struct parser_params *p, rb_parser_string_t *str)
2273{
2274 return rb_parser_enc_str_coderange(p, str) == RB_PARSER_ENC_CODERANGE_7BIT;
2275}
2276
2277static rb_encoding *
2278rb_parser_enc_compatible(struct parser_params *p, rb_parser_string_t *str1, rb_parser_string_t *str2)
2279{
2280 rb_encoding *enc1 = rb_parser_str_get_encoding(str1);
2281 rb_encoding *enc2 = rb_parser_str_get_encoding(str2);
2282
2283 if (enc1 == NULL || enc2 == NULL)
2284 return 0;
2285
2286 if (enc1 == enc2) {
2287 return enc1;
2288 }
2289
2290 if (PARSER_STRING_LEN(str2) == 0)
2291 return enc1;
2292 if (PARSER_STRING_LEN(str1) == 0)
2293 return rb_parser_is_ascii_string(p, str2) ? enc1 : enc2;
2294
2295 int cr1, cr2;
2296
2297 cr1 = rb_parser_enc_str_coderange(p, str1);
2298 cr2 = rb_parser_enc_str_coderange(p, str2);
2299
2300 if (cr1 != cr2) {
2301 if (cr1 == RB_PARSER_ENC_CODERANGE_7BIT) return enc2;
2302 if (cr2 == RB_PARSER_ENC_CODERANGE_7BIT) return enc1;
2303 }
2304
2305 if (cr2 == RB_PARSER_ENC_CODERANGE_7BIT) {
2306 return enc1;
2307 }
2308
2309 if (cr1 == RB_PARSER_ENC_CODERANGE_7BIT) {
2310 return enc2;
2311 }
2312
2313 return 0;
2314}
2315
2316static void
2317rb_parser_str_modify(rb_parser_string_t *str)
2318{
2319 PARSER_ENC_CODERANGE_CLEAR(str);
2320}
2321
2322static void
2323rb_parser_str_set_len(struct parser_params *p, rb_parser_string_t *str, long len)
2324{
2325 long capa;
2326 const int termlen = STRING_TERM_LEN(str);
2327
2328 if (len > (capa = (long)(rb_parser_str_capacity(str, termlen))) || len < 0) {
2329 rb_bug("probable buffer overflow: %ld for %ld", len, capa);
2330 }
2331
2332 int cr = PARSER_ENC_CODERANGE(str);
2333 if (cr == RB_PARSER_ENC_CODERANGE_UNKNOWN) {
2334 /* Leave unknown. */
2335 }
2336 else if (len > PARSER_STRING_LEN(str)) {
2337 PARSER_ENC_CODERANGE_SET(str, RB_PARSER_ENC_CODERANGE_UNKNOWN);
2338 }
2339 else if (len < PARSER_STRING_LEN(str)) {
2340 if (cr != RB_PARSER_ENC_CODERANGE_7BIT) {
2341 /* ASCII-only string is keeping after truncated. Valid
2342 * and broken may be invalid or valid, leave unknown. */
2343 PARSER_ENC_CODERANGE_SET(str, RB_PARSER_ENC_CODERANGE_UNKNOWN);
2344 }
2345 }
2346
2347 STRING_SET_LEN(str, len);
2348 STRING_TERM_FILL(str);
2349}
2350
2351static rb_parser_string_t *
2352rb_parser_str_buf_cat(struct parser_params *p, rb_parser_string_t *str, const char *ptr, long len)
2353{
2354 rb_parser_str_modify(str);
2355 if (len == 0) return 0;
2356
2357 long total, olen, off = -1;
2358 char *sptr;
2359 const int termlen = STRING_TERM_LEN(str);
2360
2361 PARSER_STRING_GETMEM(str, sptr, olen);
2362 if (ptr >= sptr && ptr <= sptr + olen) {
2363 off = ptr - sptr;
2364 }
2365
2366 if (olen > LONG_MAX - len) {
2367 compile_error(p, "string sizes too big");
2368 return 0;
2369 }
2370 total = olen + len;
2371 PARSER_STRING_RESIZE_CAPA_TERM(p, str, total, termlen);
2372 sptr = PARSER_STRING_PTR(str);
2373 if (off != -1) {
2374 ptr = sptr + off;
2375 }
2376 memcpy(sptr + olen, ptr, len);
2377 STRING_SET_LEN(str, total);
2378 STRING_TERM_FILL(str);
2379
2380 return str;
2381}
2382
2383#define parser_str_cat(str, ptr, len) rb_parser_str_buf_cat(p, str, ptr, len)
2384#define parser_str_cat_cstr(str, lit) rb_parser_str_buf_cat(p, str, lit, strlen(lit))
2385
2386static rb_parser_string_t *
2387rb_parser_enc_cr_str_buf_cat(struct parser_params *p, rb_parser_string_t *str, const char *ptr, long len,
2388 rb_encoding *ptr_enc, int ptr_cr, int *ptr_cr_ret)
2389{
2390 int str_cr, res_cr;
2391 rb_encoding *str_enc, *res_enc;
2392
2393 str_enc = rb_parser_str_get_encoding(str);
2394 str_cr = PARSER_STRING_LEN(str) ? PARSER_ENC_CODERANGE(str) : RB_PARSER_ENC_CODERANGE_7BIT;
2395
2396 if (str_enc == ptr_enc) {
2397 if (str_cr != RB_PARSER_ENC_CODERANGE_UNKNOWN && ptr_cr == RB_PARSER_ENC_CODERANGE_UNKNOWN) {
2398 ptr_cr = rb_parser_coderange_scan(p, ptr, len, ptr_enc);
2399 }
2400 }
2401 else {
2402 /* parser string encoding is always asciicompat */
2403 if (ptr_cr == RB_PARSER_ENC_CODERANGE_UNKNOWN) {
2404 ptr_cr = rb_parser_coderange_scan(p, ptr, len, ptr_enc);
2405 }
2406 if (str_cr == RB_PARSER_ENC_CODERANGE_UNKNOWN) {
2407 if (str_enc == rb_ascii8bit_encoding() || ptr_cr != RB_PARSER_ENC_CODERANGE_7BIT) {
2408 str_cr = rb_parser_enc_str_coderange(p, str);
2409 }
2410 }
2411 }
2412 if (ptr_cr_ret)
2413 *ptr_cr_ret = ptr_cr;
2414
2415 if (str_enc != ptr_enc &&
2416 str_cr != RB_PARSER_ENC_CODERANGE_7BIT &&
2417 ptr_cr != RB_PARSER_ENC_CODERANGE_7BIT) {
2418 goto incompatible;
2419 }
2420
2421 if (str_cr == RB_PARSER_ENC_CODERANGE_UNKNOWN) {
2422 res_enc = str_enc;
2423 res_cr = RB_PARSER_ENC_CODERANGE_UNKNOWN;
2424 }
2425 else if (str_cr == RB_PARSER_ENC_CODERANGE_7BIT) {
2426 if (ptr_cr == RB_PARSER_ENC_CODERANGE_7BIT) {
2427 res_enc = str_enc;
2428 res_cr = RB_PARSER_ENC_CODERANGE_7BIT;
2429 }
2430 else {
2431 res_enc = ptr_enc;
2432 res_cr = ptr_cr;
2433 }
2434 }
2435 else if (str_cr == RB_PARSER_ENC_CODERANGE_VALID) {
2436 res_enc = str_enc;
2437 if (PARSER_ENC_CODERANGE_CLEAN_P(ptr_cr))
2438 res_cr = str_cr;
2439 else
2440 res_cr = ptr_cr;
2441 }
2442 else { /* str_cr == RB_PARSER_ENC_CODERANGE_BROKEN */
2443 res_enc = str_enc;
2444 res_cr = str_cr;
2445 if (0 < len) res_cr = RB_PARSER_ENC_CODERANGE_UNKNOWN;
2446 }
2447
2448 if (len < 0) {
2449 compile_error(p, "negative string size (or size too big)");
2450 }
2451 parser_str_cat(str, ptr, len);
2452 PARSER_ENCODING_CODERANGE_SET(str, res_enc, res_cr);
2453 return str;
2454
2455 incompatible:
2456 compile_error(p, "incompatible character encodings: %s and %s",
2457 rb_enc_name(str_enc), rb_enc_name(ptr_enc));
2458 UNREACHABLE_RETURN(0);
2459
2460}
2461
2462static rb_parser_string_t *
2463rb_parser_enc_str_buf_cat(struct parser_params *p, rb_parser_string_t *str, const char *ptr, long len,
2464 rb_encoding *ptr_enc)
2465{
2466 return rb_parser_enc_cr_str_buf_cat(p, str, ptr, len, ptr_enc, RB_PARSER_ENC_CODERANGE_UNKNOWN, NULL);
2467}
2468
2469static rb_parser_string_t *
2470rb_parser_str_buf_append(struct parser_params *p, rb_parser_string_t *str, rb_parser_string_t *str2)
2471{
2472 int str2_cr = rb_parser_enc_str_coderange(p, str2);
2473
2474 rb_parser_enc_cr_str_buf_cat(p, str, PARSER_STRING_PTR(str2), PARSER_STRING_LEN(str2),
2475 rb_parser_str_get_encoding(str2), str2_cr, &str2_cr);
2476
2477 PARSER_ENC_CODERANGE_SET(str2, str2_cr);
2478
2479 return str;
2480}
2481
2482static rb_parser_string_t *
2483rb_parser_str_resize(struct parser_params *p, rb_parser_string_t *str, long len)
2484{
2485 if (len < 0) {
2486 rb_bug("negative string size (or size too big)");
2487 }
2488
2489 long slen = PARSER_STRING_LEN(str);
2490
2491 if (slen > len && PARSER_ENC_CODERANGE(str) != RB_PARSER_ENC_CODERANGE_7BIT) {
2492 PARSER_ENC_CODERANGE_CLEAR(str);
2493 }
2494
2495 {
2496 long capa;
2497 const int termlen = STRING_TERM_LEN(str);
2498
2499 if ((capa = slen) < len) {
2500 SIZED_REALLOC_N(str->ptr, char, (size_t)len + termlen, STRING_SIZE(str));
2501 }
2502 else if (len == slen) return str;
2503 STRING_SET_LEN(str, len);
2504 STRING_TERM_FILL(str);
2505 }
2506 return str;
2507}
2508
2509# define PARSER_ENC_STRING_GETMEM(str, ptrvar, lenvar, encvar) \
2510 ((ptrvar) = str->ptr, \
2511 (lenvar) = str->len, \
2512 (encvar) = str->enc)
2513
2514static int
2515rb_parser_string_hash_cmp(rb_parser_string_t *str1, rb_parser_string_t *str2)
2516{
2517 long len1, len2;
2518 const char *ptr1, *ptr2;
2519 rb_encoding *enc1, *enc2;
2520
2521 PARSER_ENC_STRING_GETMEM(str1, ptr1, len1, enc1);
2522 PARSER_ENC_STRING_GETMEM(str2, ptr2, len2, enc2);
2523
2524 return (len1 != len2 ||
2525 enc1 != enc2 ||
2526 memcmp(ptr1, ptr2, len1) != 0);
2527}
2528
2529static void
2530rb_parser_ary_extend(rb_parser_t *p, rb_parser_ary_t *ary, long len)
2531{
2532 long i;
2533 if (ary->capa < len) {
2534 ary->capa = len;
2535 ary->data = (rb_parser_ary_data *)xrealloc(ary->data, sizeof(rb_parser_ary_data) * len);
2536 for (i = ary->len; i < len; i++) {
2537 ary->data[i] = 0;
2538 }
2539 }
2540}
2541
2542/*
2543 * Do not call this directly.
2544 * Use rb_parser_ary_new_capa_for_XXX() instead.
2545 */
2546static rb_parser_ary_t *
2547parser_ary_new_capa(rb_parser_t *p, long len)
2548{
2549 if (len < 0) {
2550 rb_bug("negative array size (or size too big): %ld", len);
2551 }
2552 rb_parser_ary_t *ary = xcalloc(1, sizeof(rb_parser_ary_t));
2553 ary->data_type = 0;
2554 ary->len = 0;
2555 ary->capa = len;
2556 if (0 < len) {
2557 ary->data = (rb_parser_ary_data *)xcalloc(len, sizeof(rb_parser_ary_data));
2558 }
2559 else {
2560 ary->data = NULL;
2561 }
2562 return ary;
2563}
2564
2565#ifndef RIPPER
2566static rb_parser_ary_t *
2567rb_parser_ary_new_capa_for_script_line(rb_parser_t *p, long len)
2568{
2569 rb_parser_ary_t *ary = parser_ary_new_capa(p, len);
2570 ary->data_type = PARSER_ARY_DATA_SCRIPT_LINE;
2571 return ary;
2572}
2573
2574static rb_parser_ary_t *
2575rb_parser_ary_new_capa_for_ast_token(rb_parser_t *p, long len)
2576{
2577 rb_parser_ary_t *ary = parser_ary_new_capa(p, len);
2578 ary->data_type = PARSER_ARY_DATA_AST_TOKEN;
2579 return ary;
2580}
2581#endif
2582
2583static rb_parser_ary_t *
2584rb_parser_ary_new_capa_for_node(rb_parser_t *p, long len)
2585{
2586 rb_parser_ary_t *ary = parser_ary_new_capa(p, len);
2587 ary->data_type = PARSER_ARY_DATA_NODE;
2588 return ary;
2589}
2590
2591/*
2592 * Do not call this directly.
2593 * Use rb_parser_ary_push_XXX() instead.
2594 */
2595static rb_parser_ary_t *
2596parser_ary_push(rb_parser_t *p, rb_parser_ary_t *ary, rb_parser_ary_data val)
2597{
2598 if (ary->len == ary->capa) {
2599 rb_parser_ary_extend(p, ary, ary->len == 0 ? 1 : ary->len * 2);
2600 }
2601 ary->data[ary->len++] = val;
2602 return ary;
2603}
2604
2605#ifndef RIPPER
2606static rb_parser_ary_t *
2607rb_parser_ary_push_ast_token(rb_parser_t *p, rb_parser_ary_t *ary, rb_parser_ast_token_t *val)
2608{
2609 if (ary->data_type != PARSER_ARY_DATA_AST_TOKEN) {
2610 rb_bug("unexpected rb_parser_ary_data_type: %d", ary->data_type);
2611 }
2612 return parser_ary_push(p, ary, val);
2613}
2614
2615static rb_parser_ary_t *
2616rb_parser_ary_push_script_line(rb_parser_t *p, rb_parser_ary_t *ary, rb_parser_string_t *val)
2617{
2618 if (ary->data_type != PARSER_ARY_DATA_SCRIPT_LINE) {
2619 rb_bug("unexpected rb_parser_ary_data_type: %d", ary->data_type);
2620 }
2621 return parser_ary_push(p, ary, val);
2622}
2623#endif
2624
2625static rb_parser_ary_t *
2626rb_parser_ary_push_node(rb_parser_t *p, rb_parser_ary_t *ary, NODE *val)
2627{
2628 if (ary->data_type != PARSER_ARY_DATA_NODE) {
2629 rb_bug("unexpected rb_parser_ary_data_type: %d", ary->data_type);
2630 }
2631 return parser_ary_push(p, ary, val);
2632}
2633
2634#ifndef RIPPER
2635static void
2636rb_parser_ast_token_free(rb_parser_t *p, rb_parser_ast_token_t *token)
2637{
2638 if (!token) return;
2639 rb_parser_string_free(p, token->str);
2640 xfree(token);
2641}
2642
2643static void
2644rb_parser_ary_free(rb_parser_t *p, rb_parser_ary_t *ary)
2645{
2646# define foreach_ary(ptr) \
2647 for (rb_parser_ary_data *ptr = ary->data, *const end_ary_data = ptr + ary->len; \
2648 ptr < end_ary_data; ptr++)
2649 switch (ary->data_type) {
2650 case PARSER_ARY_DATA_AST_TOKEN:
2651 foreach_ary(data) {rb_parser_ast_token_free(p, *data);}
2652 break;
2653 case PARSER_ARY_DATA_SCRIPT_LINE:
2654 foreach_ary(data) {rb_parser_string_free(p, *data);}
2655 break;
2656 case PARSER_ARY_DATA_NODE:
2657 /* Do nothing because nodes are freed when rb_ast_t is freed */
2658 break;
2659 default:
2660 rb_bug("unexpected rb_parser_ary_data_type: %d", ary->data_type);
2661 break;
2662 }
2663# undef foreach_ary
2664 xfree(ary->data);
2665 xfree(ary);
2666}
2667
2668#endif /* !RIPPER */
2669
2670#line 2671 "parse.c"
2671
2672# ifndef YY_CAST
2673# ifdef __cplusplus
2674# define YY_CAST(Type, Val) static_cast<Type> (Val)
2675# define YY_REINTERPRET_CAST(Type, Val) reinterpret_cast<Type> (Val)
2676# else
2677# define YY_CAST(Type, Val) ((Type) (Val))
2678# define YY_REINTERPRET_CAST(Type, Val) ((Type) (Val))
2679# endif
2680# endif
2681# ifndef YY_NULLPTR
2682# if defined __cplusplus
2683# if 201103L <= __cplusplus
2684# define YY_NULLPTR nullptr
2685# else
2686# define YY_NULLPTR 0
2687# endif
2688# else
2689# define YY_NULLPTR ((void*)0)
2690# endif
2691# endif
2692
2693#include "parse.h"
2694/* Symbol kind. */
2695enum yysymbol_kind_t
2696{
2697 YYSYMBOL_YYEMPTY = -2,
2698 YYSYMBOL_YYEOF = 0, /* "end-of-input" */
2699 YYSYMBOL_YYerror = 1, /* error */
2700 YYSYMBOL_YYUNDEF = 2, /* "invalid token" */
2701 YYSYMBOL_keyword_class = 3, /* "'class'" */
2702 YYSYMBOL_keyword_module = 4, /* "'module'" */
2703 YYSYMBOL_keyword_def = 5, /* "'def'" */
2704 YYSYMBOL_keyword_undef = 6, /* "'undef'" */
2705 YYSYMBOL_keyword_begin = 7, /* "'begin'" */
2706 YYSYMBOL_keyword_rescue = 8, /* "'rescue'" */
2707 YYSYMBOL_keyword_ensure = 9, /* "'ensure'" */
2708 YYSYMBOL_keyword_end = 10, /* "'end'" */
2709 YYSYMBOL_keyword_if = 11, /* "'if'" */
2710 YYSYMBOL_keyword_unless = 12, /* "'unless'" */
2711 YYSYMBOL_keyword_then = 13, /* "'then'" */
2712 YYSYMBOL_keyword_elsif = 14, /* "'elsif'" */
2713 YYSYMBOL_keyword_else = 15, /* "'else'" */
2714 YYSYMBOL_keyword_case = 16, /* "'case'" */
2715 YYSYMBOL_keyword_when = 17, /* "'when'" */
2716 YYSYMBOL_keyword_while = 18, /* "'while'" */
2717 YYSYMBOL_keyword_until = 19, /* "'until'" */
2718 YYSYMBOL_keyword_for = 20, /* "'for'" */
2719 YYSYMBOL_keyword_break = 21, /* "'break'" */
2720 YYSYMBOL_keyword_next = 22, /* "'next'" */
2721 YYSYMBOL_keyword_redo = 23, /* "'redo'" */
2722 YYSYMBOL_keyword_retry = 24, /* "'retry'" */
2723 YYSYMBOL_keyword_in = 25, /* "'in'" */
2724 YYSYMBOL_keyword_do = 26, /* "'do'" */
2725 YYSYMBOL_keyword_do_cond = 27, /* "'do' for condition" */
2726 YYSYMBOL_keyword_do_block = 28, /* "'do' for block" */
2727 YYSYMBOL_keyword_do_LAMBDA = 29, /* "'do' for lambda" */
2728 YYSYMBOL_keyword_return = 30, /* "'return'" */
2729 YYSYMBOL_keyword_yield = 31, /* "'yield'" */
2730 YYSYMBOL_keyword_super = 32, /* "'super'" */
2731 YYSYMBOL_keyword_self = 33, /* "'self'" */
2732 YYSYMBOL_keyword_nil = 34, /* "'nil'" */
2733 YYSYMBOL_keyword_true = 35, /* "'true'" */
2734 YYSYMBOL_keyword_false = 36, /* "'false'" */
2735 YYSYMBOL_keyword_and = 37, /* "'and'" */
2736 YYSYMBOL_keyword_or = 38, /* "'or'" */
2737 YYSYMBOL_keyword_not = 39, /* "'not'" */
2738 YYSYMBOL_modifier_if = 40, /* "'if' modifier" */
2739 YYSYMBOL_modifier_unless = 41, /* "'unless' modifier" */
2740 YYSYMBOL_modifier_while = 42, /* "'while' modifier" */
2741 YYSYMBOL_modifier_until = 43, /* "'until' modifier" */
2742 YYSYMBOL_modifier_rescue = 44, /* "'rescue' modifier" */
2743 YYSYMBOL_keyword_alias = 45, /* "'alias'" */
2744 YYSYMBOL_keyword_defined = 46, /* "'defined?'" */
2745 YYSYMBOL_keyword_BEGIN = 47, /* "'BEGIN'" */
2746 YYSYMBOL_keyword_END = 48, /* "'END'" */
2747 YYSYMBOL_keyword__LINE__ = 49, /* "'__LINE__'" */
2748 YYSYMBOL_keyword__FILE__ = 50, /* "'__FILE__'" */
2749 YYSYMBOL_keyword__ENCODING__ = 51, /* "'__ENCODING__'" */
2750 YYSYMBOL_tIDENTIFIER = 52, /* "local variable or method" */
2751 YYSYMBOL_tFID = 53, /* "method" */
2752 YYSYMBOL_tGVAR = 54, /* "global variable" */
2753 YYSYMBOL_tIVAR = 55, /* "instance variable" */
2754 YYSYMBOL_tCONSTANT = 56, /* "constant" */
2755 YYSYMBOL_tCVAR = 57, /* "class variable" */
2756 YYSYMBOL_tLABEL = 58, /* "label" */
2757 YYSYMBOL_tINTEGER = 59, /* "integer literal" */
2758 YYSYMBOL_tFLOAT = 60, /* "float literal" */
2759 YYSYMBOL_tRATIONAL = 61, /* "rational literal" */
2760 YYSYMBOL_tIMAGINARY = 62, /* "imaginary literal" */
2761 YYSYMBOL_tCHAR = 63, /* "char literal" */
2762 YYSYMBOL_tNTH_REF = 64, /* "numbered reference" */
2763 YYSYMBOL_tBACK_REF = 65, /* "back reference" */
2764 YYSYMBOL_tSTRING_CONTENT = 66, /* "literal content" */
2765 YYSYMBOL_tREGEXP_END = 67, /* tREGEXP_END */
2766 YYSYMBOL_tDUMNY_END = 68, /* "dummy end" */
2767 YYSYMBOL_69_ = 69, /* '.' */
2768 YYSYMBOL_70_backslash_ = 70, /* "backslash" */
2769 YYSYMBOL_tSP = 71, /* "escaped space" */
2770 YYSYMBOL_72_escaped_horizontal_tab_ = 72, /* "escaped horizontal tab" */
2771 YYSYMBOL_73_escaped_form_feed_ = 73, /* "escaped form feed" */
2772 YYSYMBOL_74_escaped_carriage_return_ = 74, /* "escaped carriage return" */
2773 YYSYMBOL_75_escaped_vertical_tab_ = 75, /* "escaped vertical tab" */
2774 YYSYMBOL_tUPLUS = 76, /* "unary+" */
2775 YYSYMBOL_tUMINUS = 77, /* "unary-" */
2776 YYSYMBOL_tPOW = 78, /* "**" */
2777 YYSYMBOL_tCMP = 79, /* "<=>" */
2778 YYSYMBOL_tEQ = 80, /* "==" */
2779 YYSYMBOL_tEQQ = 81, /* "===" */
2780 YYSYMBOL_tNEQ = 82, /* "!=" */
2781 YYSYMBOL_tGEQ = 83, /* ">=" */
2782 YYSYMBOL_tLEQ = 84, /* "<=" */
2783 YYSYMBOL_tANDOP = 85, /* "&&" */
2784 YYSYMBOL_tOROP = 86, /* "||" */
2785 YYSYMBOL_tMATCH = 87, /* "=~" */
2786 YYSYMBOL_tNMATCH = 88, /* "!~" */
2787 YYSYMBOL_tDOT2 = 89, /* ".." */
2788 YYSYMBOL_tDOT3 = 90, /* "..." */
2789 YYSYMBOL_tBDOT2 = 91, /* "(.." */
2790 YYSYMBOL_tBDOT3 = 92, /* "(..." */
2791 YYSYMBOL_tAREF = 93, /* "[]" */
2792 YYSYMBOL_tASET = 94, /* "[]=" */
2793 YYSYMBOL_tLSHFT = 95, /* "<<" */
2794 YYSYMBOL_tRSHFT = 96, /* ">>" */
2795 YYSYMBOL_tANDDOT = 97, /* "&." */
2796 YYSYMBOL_tCOLON2 = 98, /* "::" */
2797 YYSYMBOL_tCOLON3 = 99, /* ":: at EXPR_BEG" */
2798 YYSYMBOL_tOP_ASGN = 100, /* "operator-assignment" */
2799 YYSYMBOL_tASSOC = 101, /* "=>" */
2800 YYSYMBOL_tLPAREN = 102, /* "(" */
2801 YYSYMBOL_tLPAREN_ARG = 103, /* "( arg" */
2802 YYSYMBOL_tLBRACK = 104, /* "[" */
2803 YYSYMBOL_tLBRACE = 105, /* "{" */
2804 YYSYMBOL_tLBRACE_ARG = 106, /* "{ arg" */
2805 YYSYMBOL_tSTAR = 107, /* "*" */
2806 YYSYMBOL_tDSTAR = 108, /* "**arg" */
2807 YYSYMBOL_tAMPER = 109, /* "&" */
2808 YYSYMBOL_tLAMBDA = 110, /* "->" */
2809 YYSYMBOL_tSYMBEG = 111, /* "symbol literal" */
2810 YYSYMBOL_tSTRING_BEG = 112, /* "string literal" */
2811 YYSYMBOL_tXSTRING_BEG = 113, /* "backtick literal" */
2812 YYSYMBOL_tREGEXP_BEG = 114, /* "regexp literal" */
2813 YYSYMBOL_tWORDS_BEG = 115, /* "word list" */
2814 YYSYMBOL_tQWORDS_BEG = 116, /* "verbatim word list" */
2815 YYSYMBOL_tSYMBOLS_BEG = 117, /* "symbol list" */
2816 YYSYMBOL_tQSYMBOLS_BEG = 118, /* "verbatim symbol list" */
2817 YYSYMBOL_tSTRING_END = 119, /* "terminator" */
2818 YYSYMBOL_tSTRING_DEND = 120, /* "'}'" */
2819 YYSYMBOL_tSTRING_DBEG = 121, /* "'#{'" */
2820 YYSYMBOL_tSTRING_DVAR = 122, /* tSTRING_DVAR */
2821 YYSYMBOL_tLAMBEG = 123, /* tLAMBEG */
2822 YYSYMBOL_tLABEL_END = 124, /* tLABEL_END */
2823 YYSYMBOL_tIGNORED_NL = 125, /* tIGNORED_NL */
2824 YYSYMBOL_tCOMMENT = 126, /* tCOMMENT */
2825 YYSYMBOL_tEMBDOC_BEG = 127, /* tEMBDOC_BEG */
2826 YYSYMBOL_tEMBDOC = 128, /* tEMBDOC */
2827 YYSYMBOL_tEMBDOC_END = 129, /* tEMBDOC_END */
2828 YYSYMBOL_tHEREDOC_BEG = 130, /* tHEREDOC_BEG */
2829 YYSYMBOL_tHEREDOC_END = 131, /* tHEREDOC_END */
2830 YYSYMBOL_k__END__ = 132, /* k__END__ */
2831 YYSYMBOL_tLOWEST = 133, /* tLOWEST */
2832 YYSYMBOL_134_ = 134, /* '=' */
2833 YYSYMBOL_135_ = 135, /* '?' */
2834 YYSYMBOL_136_ = 136, /* ':' */
2835 YYSYMBOL_137_ = 137, /* '>' */
2836 YYSYMBOL_138_ = 138, /* '<' */
2837 YYSYMBOL_139_ = 139, /* '|' */
2838 YYSYMBOL_140_ = 140, /* '^' */
2839 YYSYMBOL_141_ = 141, /* '&' */
2840 YYSYMBOL_142_ = 142, /* '+' */
2841 YYSYMBOL_143_ = 143, /* '-' */
2842 YYSYMBOL_144_ = 144, /* '*' */
2843 YYSYMBOL_145_ = 145, /* '/' */
2844 YYSYMBOL_146_ = 146, /* '%' */
2845 YYSYMBOL_tUMINUS_NUM = 147, /* tUMINUS_NUM */
2846 YYSYMBOL_148_ = 148, /* '!' */
2847 YYSYMBOL_149_ = 149, /* '~' */
2848 YYSYMBOL_tLAST_TOKEN = 150, /* tLAST_TOKEN */
2849 YYSYMBOL_151_ = 151, /* '{' */
2850 YYSYMBOL_152_ = 152, /* '}' */
2851 YYSYMBOL_153_ = 153, /* '[' */
2852 YYSYMBOL_154_n_ = 154, /* '\n' */
2853 YYSYMBOL_155_ = 155, /* ',' */
2854 YYSYMBOL_156_ = 156, /* '`' */
2855 YYSYMBOL_157_ = 157, /* '(' */
2856 YYSYMBOL_158_ = 158, /* ')' */
2857 YYSYMBOL_159_ = 159, /* ']' */
2858 YYSYMBOL_160_ = 160, /* ';' */
2859 YYSYMBOL_161_ = 161, /* ' ' */
2860 YYSYMBOL_YYACCEPT = 162, /* $accept */
2861 YYSYMBOL_option_terms = 163, /* option_terms */
2862 YYSYMBOL_compstmt_top_stmts = 164, /* compstmt_top_stmts */
2863 YYSYMBOL_165_1 = 165, /* $@1 */
2864 YYSYMBOL_program = 166, /* program */
2865 YYSYMBOL_top_stmts = 167, /* top_stmts */
2866 YYSYMBOL_top_stmt = 168, /* top_stmt */
2867 YYSYMBOL_block_open = 169, /* block_open */
2868 YYSYMBOL_begin_block = 170, /* begin_block */
2869 YYSYMBOL_compstmt_stmts = 171, /* compstmt_stmts */
2870 YYSYMBOL_172_2 = 172, /* $@2 */
2871 YYSYMBOL_173_3 = 173, /* $@3 */
2872 YYSYMBOL_bodystmt = 174, /* bodystmt */
2873 YYSYMBOL_175_4 = 175, /* $@4 */
2874 YYSYMBOL_stmts = 176, /* stmts */
2875 YYSYMBOL_stmt_or_begin = 177, /* stmt_or_begin */
2876 YYSYMBOL_178_5 = 178, /* $@5 */
2877 YYSYMBOL_allow_exits = 179, /* allow_exits */
2878 YYSYMBOL_k_END = 180, /* k_END */
2879 YYSYMBOL_181_6 = 181, /* $@6 */
2880 YYSYMBOL_stmt = 182, /* stmt */
2881 YYSYMBOL_asgn_mrhs = 183, /* asgn_mrhs */
2882 YYSYMBOL_asgn_command_rhs = 184, /* asgn_command_rhs */
2883 YYSYMBOL_command_asgn = 185, /* command_asgn */
2884 YYSYMBOL_op_asgn_command_rhs = 186, /* op_asgn_command_rhs */
2885 YYSYMBOL_def_endless_method_endless_command = 187, /* def_endless_method_endless_command */
2886 YYSYMBOL_endless_command = 188, /* endless_command */
2887 YYSYMBOL_option__n_ = 189, /* option_'\n' */
2888 YYSYMBOL_command_rhs = 190, /* command_rhs */
2889 YYSYMBOL_expr = 191, /* expr */
2890 YYSYMBOL_192_7 = 192, /* $@7 */
2891 YYSYMBOL_193_8 = 193, /* $@8 */
2892 YYSYMBOL_def_name = 194, /* def_name */
2893 YYSYMBOL_defn_head = 195, /* defn_head */
2894 YYSYMBOL_196_9 = 196, /* $@9 */
2895 YYSYMBOL_defs_head = 197, /* defs_head */
2896 YYSYMBOL_value_expr_expr = 198, /* value_expr_expr */
2897 YYSYMBOL_expr_value = 199, /* expr_value */
2898 YYSYMBOL_200_10 = 200, /* $@10 */
2899 YYSYMBOL_201_11 = 201, /* $@11 */
2900 YYSYMBOL_expr_value_do = 202, /* expr_value_do */
2901 YYSYMBOL_command_call = 203, /* command_call */
2902 YYSYMBOL_value_expr_command_call = 204, /* value_expr_command_call */
2903 YYSYMBOL_command_call_value = 205, /* command_call_value */
2904 YYSYMBOL_block_command = 206, /* block_command */
2905 YYSYMBOL_cmd_brace_block = 207, /* cmd_brace_block */
2906 YYSYMBOL_fcall = 208, /* fcall */
2907 YYSYMBOL_command = 209, /* command */
2908 YYSYMBOL_mlhs = 210, /* mlhs */
2909 YYSYMBOL_mlhs_inner = 211, /* mlhs_inner */
2910 YYSYMBOL_mlhs_basic = 212, /* mlhs_basic */
2911 YYSYMBOL_mlhs_items_mlhs_item = 213, /* mlhs_items_mlhs_item */
2912 YYSYMBOL_mlhs_item = 214, /* mlhs_item */
2913 YYSYMBOL_mlhs_head = 215, /* mlhs_head */
2914 YYSYMBOL_mlhs_node = 216, /* mlhs_node */
2915 YYSYMBOL_lhs = 217, /* lhs */
2916 YYSYMBOL_cname = 218, /* cname */
2917 YYSYMBOL_cpath = 219, /* cpath */
2918 YYSYMBOL_fname = 220, /* fname */
2919 YYSYMBOL_fitem = 221, /* fitem */
2920 YYSYMBOL_undef_list = 222, /* undef_list */
2921 YYSYMBOL_223_12 = 223, /* $@12 */
2922 YYSYMBOL_op = 224, /* op */
2923 YYSYMBOL_reswords = 225, /* reswords */
2924 YYSYMBOL_asgn_arg_rhs = 226, /* asgn_arg_rhs */
2925 YYSYMBOL_arg = 227, /* arg */
2926 YYSYMBOL_op_asgn_arg_rhs = 228, /* op_asgn_arg_rhs */
2927 YYSYMBOL_range_expr_arg = 229, /* range_expr_arg */
2928 YYSYMBOL_def_endless_method_endless_arg = 230, /* def_endless_method_endless_arg */
2929 YYSYMBOL_ternary = 231, /* ternary */
2930 YYSYMBOL_endless_arg = 232, /* endless_arg */
2931 YYSYMBOL_relop = 233, /* relop */
2932 YYSYMBOL_rel_expr = 234, /* rel_expr */
2933 YYSYMBOL_lex_ctxt = 235, /* lex_ctxt */
2934 YYSYMBOL_begin_defined = 236, /* begin_defined */
2935 YYSYMBOL_after_rescue = 237, /* after_rescue */
2936 YYSYMBOL_value_expr_arg = 238, /* value_expr_arg */
2937 YYSYMBOL_arg_value = 239, /* arg_value */
2938 YYSYMBOL_aref_args = 240, /* aref_args */
2939 YYSYMBOL_arg_rhs = 241, /* arg_rhs */
2940 YYSYMBOL_paren_args = 242, /* paren_args */
2941 YYSYMBOL_opt_paren_args = 243, /* opt_paren_args */
2942 YYSYMBOL_opt_call_args = 244, /* opt_call_args */
2943 YYSYMBOL_value_expr_command = 245, /* value_expr_command */
2944 YYSYMBOL_call_args = 246, /* call_args */
2945 YYSYMBOL_247_13 = 247, /* $@13 */
2946 YYSYMBOL_command_args = 248, /* command_args */
2947 YYSYMBOL_block_arg = 249, /* block_arg */
2948 YYSYMBOL_opt_block_arg = 250, /* opt_block_arg */
2949 YYSYMBOL_args = 251, /* args */
2950 YYSYMBOL_arg_splat = 252, /* arg_splat */
2951 YYSYMBOL_mrhs_arg = 253, /* mrhs_arg */
2952 YYSYMBOL_mrhs = 254, /* mrhs */
2953 YYSYMBOL_primary = 255, /* primary */
2954 YYSYMBOL_256_14 = 256, /* $@14 */
2955 YYSYMBOL_257_15 = 257, /* $@15 */
2956 YYSYMBOL_258_16 = 258, /* @16 */
2957 YYSYMBOL_259_17 = 259, /* @17 */
2958 YYSYMBOL_260_18 = 260, /* $@18 */
2959 YYSYMBOL_261_19 = 261, /* $@19 */
2960 YYSYMBOL_262_20 = 262, /* $@20 */
2961 YYSYMBOL_263_21 = 263, /* $@21 */
2962 YYSYMBOL_264_22 = 264, /* $@22 */
2963 YYSYMBOL_265_23 = 265, /* $@23 */
2964 YYSYMBOL_266_24 = 266, /* $@24 */
2965 YYSYMBOL_value_expr_primary = 267, /* value_expr_primary */
2966 YYSYMBOL_primary_value = 268, /* primary_value */
2967 YYSYMBOL_k_begin = 269, /* k_begin */
2968 YYSYMBOL_k_if = 270, /* k_if */
2969 YYSYMBOL_k_unless = 271, /* k_unless */
2970 YYSYMBOL_k_while = 272, /* k_while */
2971 YYSYMBOL_k_until = 273, /* k_until */
2972 YYSYMBOL_k_case = 274, /* k_case */
2973 YYSYMBOL_k_for = 275, /* k_for */
2974 YYSYMBOL_k_class = 276, /* k_class */
2975 YYSYMBOL_k_module = 277, /* k_module */
2976 YYSYMBOL_k_def = 278, /* k_def */
2977 YYSYMBOL_k_do = 279, /* k_do */
2978 YYSYMBOL_k_do_block = 280, /* k_do_block */
2979 YYSYMBOL_k_rescue = 281, /* k_rescue */
2980 YYSYMBOL_k_ensure = 282, /* k_ensure */
2981 YYSYMBOL_k_when = 283, /* k_when */
2982 YYSYMBOL_k_else = 284, /* k_else */
2983 YYSYMBOL_k_elsif = 285, /* k_elsif */
2984 YYSYMBOL_k_end = 286, /* k_end */
2985 YYSYMBOL_k_return = 287, /* k_return */
2986 YYSYMBOL_k_yield = 288, /* k_yield */
2987 YYSYMBOL_then = 289, /* then */
2988 YYSYMBOL_do = 290, /* do */
2989 YYSYMBOL_if_tail = 291, /* if_tail */
2990 YYSYMBOL_opt_else = 292, /* opt_else */
2991 YYSYMBOL_for_var = 293, /* for_var */
2992 YYSYMBOL_f_marg = 294, /* f_marg */
2993 YYSYMBOL_mlhs_items_f_marg = 295, /* mlhs_items_f_marg */
2994 YYSYMBOL_f_margs = 296, /* f_margs */
2995 YYSYMBOL_f_rest_marg = 297, /* f_rest_marg */
2996 YYSYMBOL_f_any_kwrest = 298, /* f_any_kwrest */
2997 YYSYMBOL_299_25 = 299, /* $@25 */
2998 YYSYMBOL_f_eq = 300, /* f_eq */
2999 YYSYMBOL_f_kw_primary_value = 301, /* f_kw_primary_value */
3000 YYSYMBOL_f_kwarg_primary_value = 302, /* f_kwarg_primary_value */
3001 YYSYMBOL_args_tail_basic_primary_value = 303, /* args_tail_basic_primary_value */
3002 YYSYMBOL_block_args_tail = 304, /* block_args_tail */
3003 YYSYMBOL_excessed_comma = 305, /* excessed_comma */
3004 YYSYMBOL_f_opt_primary_value = 306, /* f_opt_primary_value */
3005 YYSYMBOL_f_opt_arg_primary_value = 307, /* f_opt_arg_primary_value */
3006 YYSYMBOL_opt_args_tail_block_args_tail = 308, /* opt_args_tail_block_args_tail */
3007 YYSYMBOL_block_param = 309, /* block_param */
3008 YYSYMBOL_opt_block_param_def = 310, /* opt_block_param_def */
3009 YYSYMBOL_block_param_def = 311, /* block_param_def */
3010 YYSYMBOL_opt_block_param = 312, /* opt_block_param */
3011 YYSYMBOL_opt_bv_decl = 313, /* opt_bv_decl */
3012 YYSYMBOL_bv_decls = 314, /* bv_decls */
3013 YYSYMBOL_bvar = 315, /* bvar */
3014 YYSYMBOL_max_numparam = 316, /* max_numparam */
3015 YYSYMBOL_numparam = 317, /* numparam */
3016 YYSYMBOL_it_id = 318, /* it_id */
3017 YYSYMBOL_319_26 = 319, /* @26 */
3018 YYSYMBOL_320_27 = 320, /* $@27 */
3019 YYSYMBOL_lambda = 321, /* lambda */
3020 YYSYMBOL_f_larglist = 322, /* f_larglist */
3021 YYSYMBOL_lambda_body = 323, /* lambda_body */
3022 YYSYMBOL_324_28 = 324, /* $@28 */
3023 YYSYMBOL_do_block = 325, /* do_block */
3024 YYSYMBOL_block_call = 326, /* block_call */
3025 YYSYMBOL_method_call = 327, /* method_call */
3026 YYSYMBOL_brace_block = 328, /* brace_block */
3027 YYSYMBOL_329_29 = 329, /* @29 */
3028 YYSYMBOL_brace_body = 330, /* brace_body */
3029 YYSYMBOL_331_30 = 331, /* @30 */
3030 YYSYMBOL_do_body = 332, /* do_body */
3031 YYSYMBOL_case_args = 333, /* case_args */
3032 YYSYMBOL_case_body = 334, /* case_body */
3033 YYSYMBOL_cases = 335, /* cases */
3034 YYSYMBOL_p_pvtbl = 336, /* p_pvtbl */
3035 YYSYMBOL_p_pktbl = 337, /* p_pktbl */
3036 YYSYMBOL_p_in_kwarg = 338, /* p_in_kwarg */
3037 YYSYMBOL_339_31 = 339, /* $@31 */
3038 YYSYMBOL_p_case_body = 340, /* p_case_body */
3039 YYSYMBOL_p_cases = 341, /* p_cases */
3040 YYSYMBOL_p_top_expr = 342, /* p_top_expr */
3041 YYSYMBOL_p_top_expr_body = 343, /* p_top_expr_body */
3042 YYSYMBOL_p_expr = 344, /* p_expr */
3043 YYSYMBOL_p_as = 345, /* p_as */
3044 YYSYMBOL_p_alt = 346, /* p_alt */
3045 YYSYMBOL_p_lparen = 347, /* p_lparen */
3046 YYSYMBOL_p_lbracket = 348, /* p_lbracket */
3047 YYSYMBOL_p_expr_basic = 349, /* p_expr_basic */
3048 YYSYMBOL_350_32 = 350, /* $@32 */
3049 YYSYMBOL_p_args = 351, /* p_args */
3050 YYSYMBOL_p_args_head = 352, /* p_args_head */
3051 YYSYMBOL_p_args_tail = 353, /* p_args_tail */
3052 YYSYMBOL_p_find = 354, /* p_find */
3053 YYSYMBOL_p_rest = 355, /* p_rest */
3054 YYSYMBOL_p_args_post = 356, /* p_args_post */
3055 YYSYMBOL_p_arg = 357, /* p_arg */
3056 YYSYMBOL_p_kwargs = 358, /* p_kwargs */
3057 YYSYMBOL_p_kwarg = 359, /* p_kwarg */
3058 YYSYMBOL_p_kw = 360, /* p_kw */
3059 YYSYMBOL_p_kw_label = 361, /* p_kw_label */
3060 YYSYMBOL_p_kwrest = 362, /* p_kwrest */
3061 YYSYMBOL_p_kwnorest = 363, /* p_kwnorest */
3062 YYSYMBOL_p_any_kwrest = 364, /* p_any_kwrest */
3063 YYSYMBOL_p_value = 365, /* p_value */
3064 YYSYMBOL_range_expr_p_primitive = 366, /* range_expr_p_primitive */
3065 YYSYMBOL_p_primitive = 367, /* p_primitive */
3066 YYSYMBOL_p_variable = 368, /* p_variable */
3067 YYSYMBOL_p_var_ref = 369, /* p_var_ref */
3068 YYSYMBOL_p_expr_ref = 370, /* p_expr_ref */
3069 YYSYMBOL_p_const = 371, /* p_const */
3070 YYSYMBOL_opt_rescue = 372, /* opt_rescue */
3071 YYSYMBOL_exc_list = 373, /* exc_list */
3072 YYSYMBOL_exc_var = 374, /* exc_var */
3073 YYSYMBOL_opt_ensure = 375, /* opt_ensure */
3074 YYSYMBOL_literal = 376, /* literal */
3075 YYSYMBOL_strings = 377, /* strings */
3076 YYSYMBOL_string = 378, /* string */
3077 YYSYMBOL_string1 = 379, /* string1 */
3078 YYSYMBOL_xstring = 380, /* xstring */
3079 YYSYMBOL_regexp = 381, /* regexp */
3080 YYSYMBOL_nonempty_list__ = 382, /* nonempty_list_' ' */
3081 YYSYMBOL_words_tWORDS_BEG_word_list = 383, /* words_tWORDS_BEG_word_list */
3082 YYSYMBOL_words = 384, /* words */
3083 YYSYMBOL_word_list = 385, /* word_list */
3084 YYSYMBOL_word = 386, /* word */
3085 YYSYMBOL_words_tSYMBOLS_BEG_symbol_list = 387, /* words_tSYMBOLS_BEG_symbol_list */
3086 YYSYMBOL_symbols = 388, /* symbols */
3087 YYSYMBOL_symbol_list = 389, /* symbol_list */
3088 YYSYMBOL_words_tQWORDS_BEG_qword_list = 390, /* words_tQWORDS_BEG_qword_list */
3089 YYSYMBOL_qwords = 391, /* qwords */
3090 YYSYMBOL_words_tQSYMBOLS_BEG_qsym_list = 392, /* words_tQSYMBOLS_BEG_qsym_list */
3091 YYSYMBOL_qsymbols = 393, /* qsymbols */
3092 YYSYMBOL_qword_list = 394, /* qword_list */
3093 YYSYMBOL_qsym_list = 395, /* qsym_list */
3094 YYSYMBOL_string_contents = 396, /* string_contents */
3095 YYSYMBOL_xstring_contents = 397, /* xstring_contents */
3096 YYSYMBOL_regexp_contents = 398, /* regexp_contents */
3097 YYSYMBOL_string_content = 399, /* string_content */
3098 YYSYMBOL_400_33 = 400, /* @33 */
3099 YYSYMBOL_401_34 = 401, /* @34 */
3100 YYSYMBOL_402_35 = 402, /* @35 */
3101 YYSYMBOL_403_36 = 403, /* @36 */
3102 YYSYMBOL_string_dend = 404, /* string_dend */
3103 YYSYMBOL_string_dvar = 405, /* string_dvar */
3104 YYSYMBOL_symbol = 406, /* symbol */
3105 YYSYMBOL_ssym = 407, /* ssym */
3106 YYSYMBOL_sym = 408, /* sym */
3107 YYSYMBOL_dsym = 409, /* dsym */
3108 YYSYMBOL_numeric = 410, /* numeric */
3109 YYSYMBOL_simple_numeric = 411, /* simple_numeric */
3110 YYSYMBOL_nonlocal_var = 412, /* nonlocal_var */
3111 YYSYMBOL_user_variable = 413, /* user_variable */
3112 YYSYMBOL_keyword_variable = 414, /* keyword_variable */
3113 YYSYMBOL_var_ref = 415, /* var_ref */
3114 YYSYMBOL_var_lhs = 416, /* var_lhs */
3115 YYSYMBOL_backref = 417, /* backref */
3116 YYSYMBOL_418_37 = 418, /* $@37 */
3117 YYSYMBOL_superclass = 419, /* superclass */
3118 YYSYMBOL_f_opt_paren_args = 420, /* f_opt_paren_args */
3119 YYSYMBOL_f_paren_args = 421, /* f_paren_args */
3120 YYSYMBOL_f_arglist = 422, /* f_arglist */
3121 YYSYMBOL_423_38 = 423, /* @38 */
3122 YYSYMBOL_f_kw_arg_value = 424, /* f_kw_arg_value */
3123 YYSYMBOL_f_kwarg_arg_value = 425, /* f_kwarg_arg_value */
3124 YYSYMBOL_args_tail_basic_arg_value = 426, /* args_tail_basic_arg_value */
3125 YYSYMBOL_args_tail = 427, /* args_tail */
3126 YYSYMBOL_f_opt_arg_value = 428, /* f_opt_arg_value */
3127 YYSYMBOL_f_opt_arg_arg_value = 429, /* f_opt_arg_arg_value */
3128 YYSYMBOL_opt_args_tail_args_tail = 430, /* opt_args_tail_args_tail */
3129 YYSYMBOL_f_args = 431, /* f_args */
3130 YYSYMBOL_args_forward = 432, /* args_forward */
3131 YYSYMBOL_f_bad_arg = 433, /* f_bad_arg */
3132 YYSYMBOL_f_norm_arg = 434, /* f_norm_arg */
3133 YYSYMBOL_f_arg_asgn = 435, /* f_arg_asgn */
3134 YYSYMBOL_f_arg_item = 436, /* f_arg_item */
3135 YYSYMBOL_f_arg = 437, /* f_arg */
3136 YYSYMBOL_f_label = 438, /* f_label */
3137 YYSYMBOL_kwrest_mark = 439, /* kwrest_mark */
3138 YYSYMBOL_f_no_kwarg = 440, /* f_no_kwarg */
3139 YYSYMBOL_f_kwrest = 441, /* f_kwrest */
3140 YYSYMBOL_restarg_mark = 442, /* restarg_mark */
3141 YYSYMBOL_f_rest_arg = 443, /* f_rest_arg */
3142 YYSYMBOL_blkarg_mark = 444, /* blkarg_mark */
3143 YYSYMBOL_f_block_arg = 445, /* f_block_arg */
3144 YYSYMBOL_opt_f_block_arg = 446, /* opt_f_block_arg */
3145 YYSYMBOL_value_expr_singleton_expr = 447, /* value_expr_singleton_expr */
3146 YYSYMBOL_singleton = 448, /* singleton */
3147 YYSYMBOL_singleton_expr = 449, /* singleton_expr */
3148 YYSYMBOL_450_39 = 450, /* $@39 */
3149 YYSYMBOL_assoc_list = 451, /* assoc_list */
3150 YYSYMBOL_assocs = 452, /* assocs */
3151 YYSYMBOL_assoc = 453, /* assoc */
3152 YYSYMBOL_operation2 = 454, /* operation2 */
3153 YYSYMBOL_operation3 = 455, /* operation3 */
3154 YYSYMBOL_dot_or_colon = 456, /* dot_or_colon */
3155 YYSYMBOL_call_op = 457, /* call_op */
3156 YYSYMBOL_call_op2 = 458, /* call_op2 */
3157 YYSYMBOL_rparen = 459, /* rparen */
3158 YYSYMBOL_rbracket = 460, /* rbracket */
3159 YYSYMBOL_rbrace = 461, /* rbrace */
3160 YYSYMBOL_trailer = 462, /* trailer */
3161 YYSYMBOL_term = 463, /* term */
3162 YYSYMBOL_terms = 464, /* terms */
3163 YYSYMBOL_none = 465 /* none */
3164};
3165typedef enum yysymbol_kind_t yysymbol_kind_t;
3166
3167
3168
3169
3170#ifdef short
3171# undef short
3172#endif
3173
3174/* On compilers that do not define __PTRDIFF_MAX__ etc., make sure
3175 <limits.h> and (if available) <stdint.h> are included
3176 so that the code can choose integer types of a good width. */
3177
3178#ifndef __PTRDIFF_MAX__
3179# include <limits.h> /* INFRINGES ON USER NAME SPACE */
3180# if defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__
3181# include <stdint.h> /* INFRINGES ON USER NAME SPACE */
3182# define YY_STDINT_H
3183# endif
3184#endif
3185
3186/* Narrow types that promote to a signed type and that can represent a
3187 signed or unsigned integer of at least N bits. In tables they can
3188 save space and decrease cache pressure. Promoting to a signed type
3189 helps avoid bugs in integer arithmetic. */
3190
3191#ifdef __INT_LEAST8_MAX__
3192typedef __INT_LEAST8_TYPE__ yytype_int8;
3193#elif defined YY_STDINT_H
3194typedef int_least8_t yytype_int8;
3195#else
3196typedef signed char yytype_int8;
3197#endif
3198
3199#ifdef __INT_LEAST16_MAX__
3200typedef __INT_LEAST16_TYPE__ yytype_int16;
3201#elif defined YY_STDINT_H
3202typedef int_least16_t yytype_int16;
3203#else
3204typedef short yytype_int16;
3205#endif
3206
3207/* Work around bug in HP-UX 11.23, which defines these macros
3208 incorrectly for preprocessor constants. This workaround can likely
3209 be removed in 2023, as HPE has promised support for HP-UX 11.23
3210 (aka HP-UX 11i v2) only through the end of 2022; see Table 2 of
3211 <https://h20195.www2.hpe.com/V2/getpdf.aspx/4AA4-7673ENW.pdf>. */
3212#ifdef __hpux
3213# undef UINT_LEAST8_MAX
3214# undef UINT_LEAST16_MAX
3215# define UINT_LEAST8_MAX 255
3216# define UINT_LEAST16_MAX 65535
3217#endif
3218
3219#if defined __UINT_LEAST8_MAX__ && __UINT_LEAST8_MAX__ <= __INT_MAX__
3220typedef __UINT_LEAST8_TYPE__ yytype_uint8;
3221#elif (!defined __UINT_LEAST8_MAX__ && defined YY_STDINT_H \
3222 && UINT_LEAST8_MAX <= INT_MAX)
3223typedef uint_least8_t yytype_uint8;
3224#elif !defined __UINT_LEAST8_MAX__ && UCHAR_MAX <= INT_MAX
3225typedef unsigned char yytype_uint8;
3226#else
3227typedef short yytype_uint8;
3228#endif
3229
3230#if defined __UINT_LEAST16_MAX__ && __UINT_LEAST16_MAX__ <= __INT_MAX__
3231typedef __UINT_LEAST16_TYPE__ yytype_uint16;
3232#elif (!defined __UINT_LEAST16_MAX__ && defined YY_STDINT_H \
3233 && UINT_LEAST16_MAX <= INT_MAX)
3234typedef uint_least16_t yytype_uint16;
3235#elif !defined __UINT_LEAST16_MAX__ && USHRT_MAX <= INT_MAX
3236typedef unsigned short yytype_uint16;
3237#else
3238typedef int yytype_uint16;
3239#endif
3240
3241#ifndef YYPTRDIFF_T
3242# if defined __PTRDIFF_TYPE__ && defined __PTRDIFF_MAX__
3243# define YYPTRDIFF_T __PTRDIFF_TYPE__
3244# define YYPTRDIFF_MAXIMUM __PTRDIFF_MAX__
3245# elif defined PTRDIFF_MAX
3246# ifndef ptrdiff_t
3247# include <stddef.h> /* INFRINGES ON USER NAME SPACE */
3248# endif
3249# define YYPTRDIFF_T ptrdiff_t
3250# define YYPTRDIFF_MAXIMUM PTRDIFF_MAX
3251# else
3252# define YYPTRDIFF_T long
3253# define YYPTRDIFF_MAXIMUM LONG_MAX
3254# endif
3255#endif
3256
3257#ifndef YYSIZE_T
3258# ifdef __SIZE_TYPE__
3259# define YYSIZE_T __SIZE_TYPE__
3260# elif defined size_t
3261# define YYSIZE_T size_t
3262# elif defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__
3263# include <stddef.h> /* INFRINGES ON USER NAME SPACE */
3264# define YYSIZE_T size_t
3265# else
3266# define YYSIZE_T unsigned
3267# endif
3268#endif
3269
3270#define YYSIZE_MAXIMUM \
3271 YY_CAST (YYPTRDIFF_T, \
3272 (YYPTRDIFF_MAXIMUM < YY_CAST (YYSIZE_T, -1) \
3273 ? YYPTRDIFF_MAXIMUM \
3274 : YY_CAST (YYSIZE_T, -1)))
3275
3276#define YYSIZEOF(X) YY_CAST (YYPTRDIFF_T, sizeof (X))
3277
3278
3279/* Stored state numbers (used for stacks). */
3280typedef yytype_int16 yy_state_t;
3281
3282/* State numbers in computations. */
3283typedef int yy_state_fast_t;
3284
3285#ifndef YY_
3286# if defined YYENABLE_NLS && YYENABLE_NLS
3287# if ENABLE_NLS
3288# include <libintl.h> /* INFRINGES ON USER NAME SPACE */
3289# define YY_(Msgid) dgettext ("bison-runtime", Msgid)
3290# endif
3291# endif
3292# ifndef YY_
3293# define YY_(Msgid) Msgid
3294# endif
3295#endif
3296
3297
3298#ifndef YY_ATTRIBUTE_PURE
3299# if defined __GNUC__ && 2 < __GNUC__ + (96 <= __GNUC_MINOR__)
3300# define YY_ATTRIBUTE_PURE __attribute__ ((__pure__))
3301# else
3302# define YY_ATTRIBUTE_PURE
3303# endif
3304#endif
3305
3306#ifndef YY_ATTRIBUTE_UNUSED
3307# if defined __GNUC__ && 2 < __GNUC__ + (7 <= __GNUC_MINOR__)
3308# define YY_ATTRIBUTE_UNUSED __attribute__ ((__unused__))
3309# else
3310# define YY_ATTRIBUTE_UNUSED
3311# endif
3312#endif
3313
3314/* Suppress unused-variable warnings by "using" E. */
3315#if ! defined lint || defined __GNUC__
3316# define YY_USE(E) ((void) (E))
3317#else
3318# define YY_USE(E) /* empty */
3319#endif
3320
3321/* Suppress an incorrect diagnostic about yylval being uninitialized. */
3322#if defined __GNUC__ && ! defined __ICC && 406 <= __GNUC__ * 100 + __GNUC_MINOR__
3323# if __GNUC__ * 100 + __GNUC_MINOR__ < 407
3324# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \
3325 _Pragma ("GCC diagnostic push") \
3326 _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")
3327# else
3328# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \
3329 _Pragma ("GCC diagnostic push") \
3330 _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"") \
3331 _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
3332# endif
3333# define YY_IGNORE_MAYBE_UNINITIALIZED_END \
3334 _Pragma ("GCC diagnostic pop")
3335#else
3336# define YY_INITIAL_VALUE(Value) Value
3337#endif
3338#ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
3339# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
3340# define YY_IGNORE_MAYBE_UNINITIALIZED_END
3341#endif
3342#ifndef YY_INITIAL_VALUE
3343# define YY_INITIAL_VALUE(Value) /* Nothing. */
3344#endif
3345
3346#if defined __cplusplus && defined __GNUC__ && ! defined __ICC && 6 <= __GNUC__
3347# define YY_IGNORE_USELESS_CAST_BEGIN \
3348 _Pragma ("GCC diagnostic push") \
3349 _Pragma ("GCC diagnostic ignored \"-Wuseless-cast\"")
3350# define YY_IGNORE_USELESS_CAST_END \
3351 _Pragma ("GCC diagnostic pop")
3352#endif
3353#ifndef YY_IGNORE_USELESS_CAST_BEGIN
3354# define YY_IGNORE_USELESS_CAST_BEGIN
3355# define YY_IGNORE_USELESS_CAST_END
3356#endif
3357
3358
3359#define YY_ASSERT(E) ((void) (0 && (E)))
3360
3361#if 1
3362
3363/* The parser invokes alloca or malloc; define the necessary symbols. */
3364
3365# ifdef YYSTACK_USE_ALLOCA
3366# if YYSTACK_USE_ALLOCA
3367# ifdef __GNUC__
3368# define YYSTACK_ALLOC __builtin_alloca
3369# elif defined __BUILTIN_VA_ARG_INCR
3370# include <alloca.h> /* INFRINGES ON USER NAME SPACE */
3371# elif defined _AIX
3372# define YYSTACK_ALLOC __alloca
3373# elif defined _MSC_VER
3374# include <malloc.h> /* INFRINGES ON USER NAME SPACE */
3375# define alloca _alloca
3376# else
3377# define YYSTACK_ALLOC alloca
3378# if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS
3379# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
3380 /* Use EXIT_SUCCESS as a witness for stdlib.h. */
3381# ifndef EXIT_SUCCESS
3382# define EXIT_SUCCESS 0
3383# endif
3384# endif
3385# endif
3386# endif
3387# endif
3388
3389# ifdef YYSTACK_ALLOC
3390 /* Pacify GCC's 'empty if-body' warning. */
3391# define YYSTACK_FREE(Ptr) do { /* empty */; } while (0)
3392# ifndef YYSTACK_ALLOC_MAXIMUM
3393 /* The OS might guarantee only one guard page at the bottom of the stack,
3394 and a page size can be as small as 4096 bytes. So we cannot safely
3395 invoke alloca (N) if N exceeds 4096. Use a slightly smaller number
3396 to allow for a few compiler-allocated temporary stack slots. */
3397# define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
3398# endif
3399# else
3400# define YYSTACK_ALLOC YYMALLOC
3401# define YYSTACK_FREE YYFREE
3402# ifndef YYSTACK_ALLOC_MAXIMUM
3403# define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
3404# endif
3405# if (defined __cplusplus && ! defined EXIT_SUCCESS \
3406 && ! ((defined YYMALLOC || defined malloc) \
3407 && (defined YYFREE || defined free)))
3408# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
3409# ifndef EXIT_SUCCESS
3410# define EXIT_SUCCESS 0
3411# endif
3412# endif
3413# ifndef YYMALLOC
3414# define YYMALLOC malloc
3415# if ! defined malloc && ! defined EXIT_SUCCESS
3416void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
3417# endif
3418# endif
3419# ifndef YYFREE
3420# define YYFREE free
3421# if ! defined free && ! defined EXIT_SUCCESS
3422void free (void *); /* INFRINGES ON USER NAME SPACE */
3423# endif
3424# endif
3425# endif
3426#endif /* 1 */
3427
3428#if (! defined yyoverflow \
3429 && (! defined __cplusplus \
3430 || (defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL \
3431 && defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
3432
3433/* A type that is properly aligned for any stack member. */
3434union yyalloc
3435{
3436 yy_state_t yyss_alloc;
3437 YYSTYPE yyvs_alloc;
3438 YYLTYPE yyls_alloc;
3439};
3440
3441/* The size of the maximum gap between one aligned stack and the next. */
3442# define YYSTACK_GAP_MAXIMUM (YYSIZEOF (union yyalloc) - 1)
3443
3444/* The size of an array large to enough to hold all stacks, each with
3445 N elements. */
3446# define YYSTACK_BYTES(N) \
3447 ((N) * (YYSIZEOF (yy_state_t) + YYSIZEOF (YYSTYPE) \
3448 + YYSIZEOF (YYLTYPE)) \
3449 + 2 * YYSTACK_GAP_MAXIMUM)
3450
3451# define YYCOPY_NEEDED 1
3452
3453/* Relocate STACK from its old location to the new one. The
3454 local variables YYSIZE and YYSTACKSIZE give the old and new number of
3455 elements in the stack, and YYPTR gives the new location of the
3456 stack. Advance YYPTR to a properly aligned location for the next
3457 stack. */
3458# define YYSTACK_RELOCATE(Stack_alloc, Stack) \
3459 do \
3460 { \
3461 YYPTRDIFF_T yynewbytes; \
3462 YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
3463 Stack = &yyptr->Stack_alloc; \
3464 yynewbytes = yystacksize * YYSIZEOF (*Stack) + YYSTACK_GAP_MAXIMUM; \
3465 yyptr += yynewbytes / YYSIZEOF (*yyptr); \
3466 } \
3467 while (0)
3468
3469#endif
3470
3471#if defined YYCOPY_NEEDED && YYCOPY_NEEDED
3472/* Copy COUNT objects from SRC to DST. The source and destination do
3473 not overlap. */
3474# ifndef YYCOPY
3475# if defined __GNUC__ && 1 < __GNUC__
3476# define YYCOPY(Dst, Src, Count) \
3477 __builtin_memcpy (Dst, Src, YY_CAST (YYSIZE_T, (Count)) * sizeof (*(Src)))
3478# else
3479# define YYCOPY(Dst, Src, Count) \
3480 do \
3481 { \
3482 YYPTRDIFF_T yyi; \
3483 for (yyi = 0; yyi < (Count); yyi++) \
3484 (Dst)[yyi] = (Src)[yyi]; \
3485 } \
3486 while (0)
3487# endif
3488# endif
3489#endif /* !YYCOPY_NEEDED */
3490
3491/* YYFINAL -- State number of the termination state. */
3492#define YYFINAL 143
3493/* YYLAST -- Last index in YYTABLE. */
3494#define YYLAST 16265
3495
3496/* YYNTOKENS -- Number of terminals. */
3497#define YYNTOKENS 162
3498/* YYNNTS -- Number of nonterminals. */
3499#define YYNNTS 304
3500/* YYNRULES -- Number of rules. */
3501#define YYNRULES 813
3502/* YYNSTATES -- Number of states. */
3503#define YYNSTATES 1376
3504
3505/* YYMAXUTOK -- Last valid token kind. */
3506#define YYMAXUTOK 361
3507
3508
3509/* YYTRANSLATE(TOKEN-NUM) -- Symbol number corresponding to TOKEN-NUM
3510 as returned by yylex, with out-of-bounds checking. */
3511#define YYTRANSLATE(YYX) \
3512 (0 <= (YYX) && (YYX) <= YYMAXUTOK \
3513 ? YY_CAST (yysymbol_kind_t, yytranslate[YYX]) \
3514 : YYSYMBOL_YYUNDEF)
3515
3516/* YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM
3517 as returned by yylex. */
3518static const yytype_uint8 yytranslate[] =
3519{
3520 0, 2, 2, 2, 2, 2, 2, 2, 2, 72,
3521 154, 75, 73, 74, 2, 2, 2, 2, 2, 2,
3522 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
3523 2, 2, 161, 148, 2, 2, 2, 146, 141, 2,
3524 157, 158, 144, 142, 155, 143, 69, 145, 2, 2,
3525 2, 2, 2, 2, 2, 2, 2, 2, 136, 160,
3526 138, 134, 137, 135, 2, 2, 2, 2, 2, 2,
3527 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
3528 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
3529 2, 153, 70, 159, 140, 2, 156, 2, 2, 2,
3530 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
3531 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
3532 2, 2, 2, 151, 139, 152, 149, 2, 89, 90,
3533 91, 92, 76, 77, 78, 79, 95, 96, 84, 83,
3534 80, 81, 82, 87, 88, 93, 94, 98, 85, 86,
3535 97, 2, 2, 2, 2, 2, 2, 2, 2, 2,
3536 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
3537 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
3538 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
3539 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
3540 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
3541 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
3542 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
3543 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
3544 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
3545 2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
3546 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
3547 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
3548 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
3549 35, 36, 37, 38, 39, 40, 41, 42, 43, 44,
3550 45, 46, 47, 48, 49, 50, 51, 52, 53, 54,
3551 55, 56, 57, 58, 59, 60, 61, 62, 63, 64,
3552 65, 66, 67, 68, 71, 99, 100, 101, 102, 103,
3553 104, 105, 106, 107, 108, 109, 110, 111, 112, 113,
3554 114, 115, 116, 117, 118, 119, 120, 121, 122, 123,
3555 124, 125, 126, 127, 128, 129, 130, 131, 132, 133,
3556 147, 150
3557};
3558
3559#if YYDEBUG
3560/* YYRLINE[YYN] -- Source line where rule number YYN was defined. */
3561static const yytype_int16 yyrline[] =
3562{
3563 0, 3165, 3159, 3165, 3165, 3165, 3165, 3185, 3190, 3195,
3564 3202, 3207, 3214, 3216, 3234, 3230, 3235, 3234, 3246, 3243,
3565 3256, 3261, 3266, 3273, 3275, 3274, 3284, 3286, 3293, 3293,
3566 3298, 3303, 3311, 3320, 3327, 3333, 3339, 3350, 3361, 3370,
3567 3384, 3385, 3390, 3390, 3391, 3402, 3407, 3408, 3415, 3415,
3568 3416, 3416, 3416, 3416, 3416, 3416, 3416, 3416, 3416, 3417,
3569 3417, 3417, 3420, 3421, 3427, 3427, 3427, 3434, 3435, 3442,
3570 3445, 3446, 3451, 3456, 3461, 3467, 3466, 3480, 3479, 3492,
3571 3495, 3506, 3516, 3515, 3529, 3529, 3530, 3536, 3536, 3536,
3572 3543, 3544, 3547, 3547, 3550, 3551, 3558, 3566, 3566, 3566,
3573 3573, 3580, 3589, 3594, 3599, 3604, 3609, 3615, 3621, 3627,
3574 3632, 3639, 3648, 3649, 3656, 3657, 3664, 3669, 3674, 3679,
3575 3679, 3679, 3684, 3689, 3694, 3699, 3704, 3709, 3716, 3717,
3576 3724, 3729, 3737, 3737, 3742, 3747, 3747, 3753, 3758, 3763,
3577 3768, 3776, 3776, 3781, 3786, 3786, 3791, 3796, 3801, 3806,
3578 3814, 3822, 3825, 3830, 3835, 3842, 3842, 3842, 3843, 3848,
3579 3851, 3856, 3859, 3864, 3864, 3872, 3873, 3874, 3875, 3876,
3580 3877, 3878, 3879, 3880, 3881, 3882, 3883, 3884, 3885, 3886,
3581 3887, 3888, 3889, 3890, 3891, 3892, 3893, 3894, 3895, 3896,
3582 3897, 3898, 3899, 3900, 3901, 3904, 3904, 3904, 3905, 3905,
3583 3906, 3906, 3906, 3907, 3907, 3907, 3907, 3908, 3908, 3908,
3584 3908, 3909, 3909, 3909, 3910, 3910, 3910, 3910, 3911, 3911,
3585 3911, 3911, 3912, 3912, 3912, 3912, 3913, 3913, 3913, 3913,
3586 3914, 3914, 3914, 3914, 3915, 3915, 3918, 3918, 3919, 3919,
3587 3919, 3919, 3919, 3919, 3919, 3919, 3919, 3920, 3920, 3920,
3588 3920, 3920, 3920, 3920, 3921, 3926, 3931, 3936, 3941, 3946,
3589 3951, 3956, 3961, 3966, 3971, 3976, 3981, 3986, 3987, 3992,
3590 3997, 4002, 4007, 4012, 4017, 4022, 4027, 4032, 4037, 4042,
3591 4049, 4049, 4049, 4050, 4051, 4054, 4063, 4064, 4070, 4077,
3592 4078, 4079, 4080, 4083, 4088, 4096, 4102, 4109, 4116, 4116,
3593 4119, 4120, 4121, 4126, 4133, 4138, 4147, 4152, 4162, 4174,
3594 4175, 4181, 4182, 4183, 4184, 4189, 4196, 4196, 4201, 4206,
3595 4211, 4217, 4223, 4227, 4227, 4265, 4270, 4278, 4283, 4291,
3596 4296, 4301, 4306, 4314, 4319, 4328, 4329, 4333, 4338, 4343,
3597 4361, 4361, 4361, 4361, 4361, 4361, 4361, 4361, 4362, 4363,
3598 4364, 4370, 4369, 4382, 4382, 4388, 4394, 4399, 4404, 4409,
3599 4415, 4420, 4425, 4430, 4435, 4442, 4447, 4452, 4457, 4458,
3600 4464, 4466, 4478, 4487, 4496, 4505, 4504, 4519, 4518, 4531,
3601 4539, 4539, 4540, 4584, 4583, 4606, 4605, 4625, 4624, 4643,
3602 4641, 4658, 4656, 4671, 4676, 4681, 4686, 4701, 4701, 4704,
3603 4711, 4729, 4736, 4744, 4752, 4759, 4767, 4776, 4785, 4793,
3604 4800, 4807, 4815, 4822, 4828, 4843, 4850, 4855, 4861, 4868,
3605 4875, 4876, 4877, 4880, 4881, 4884, 4886, 4895, 4896, 4903,
3606 4904, 4907, 4912, 4920, 4920, 4920, 4925, 4930, 4935, 4940,
3607 4947, 4953, 4960, 4961, 4968, 4968, 4970, 4970, 4970, 4970,
3608 4970, 4970, 4970, 4970, 4970, 4973, 4981, 4981, 4981, 4981,
3609 4981, 4981, 4986, 4991, 4996, 5001, 5006, 5012, 5017, 5022,
3610 5027, 5032, 5037, 5042, 5047, 5052, 5059, 5060, 5066, 5076,
3611 5080, 5083, 5088, 5095, 5097, 5101, 5106, 5109, 5115, 5120,
3612 5127, 5133, 5126, 5160, 5167, 5176, 5183, 5182, 5193, 5201,
3613 5213, 5223, 5232, 5239, 5246, 5257, 5263, 5268, 5274, 5284,
3614 5289, 5297, 5303, 5311, 5313, 5328, 5328, 5349, 5355, 5360,
3615 5366, 5374, 5383, 5384, 5387, 5388, 5390, 5401, 5406, 5414,
3616 5415, 5418, 5419, 5425, 5433, 5434, 5440, 5446, 5451, 5456,
3617 5463, 5466, 5473, 5476, 5481, 5484, 5491, 5498, 5499, 5500,
3618 5507, 5514, 5521, 5527, 5534, 5541, 5548, 5554, 5559, 5564,
3619 5571, 5570, 5581, 5587, 5595, 5601, 5606, 5611, 5616, 5621,
3620 5624, 5625, 5632, 5637, 5644, 5652, 5658, 5665, 5666, 5673,
3621 5680, 5685, 5690, 5695, 5702, 5704, 5711, 5717, 5729, 5730,
3622 5745, 5750, 5757, 5763, 5764, 5771, 5772, 5772, 5772, 5772,
3623 5772, 5772, 5772, 5773, 5774, 5775, 5778, 5778, 5778, 5778,
3624 5778, 5778, 5778, 5778, 5779, 5784, 5787, 5795, 5807, 5814,
3625 5821, 5826, 5831, 5839, 5859, 5862, 5867, 5871, 5874, 5879,
3626 5882, 5889, 5892, 5893, 5896, 5908, 5909, 5910, 5917, 5930,
3627 5942, 5949, 5949, 5949, 5949, 5953, 5957, 5964, 5966, 5973,
3628 5973, 5977, 5981, 5988, 5988, 5991, 5991, 5995, 5999, 6007,
3629 6011, 6019, 6023, 6031, 6035, 6043, 6047, 6073, 6076, 6075,
3630 6090, 6098, 6102, 6106, 6121, 6122, 6125, 6130, 6133, 6134,
3631 6137, 6153, 6154, 6157, 6165, 6166, 6174, 6175, 6176, 6177,
3632 6180, 6181, 6182, 6185, 6185, 6186, 6189, 6190, 6191, 6192,
3633 6193, 6194, 6195, 6198, 6208, 6215, 6215, 6222, 6223, 6227,
3634 6226, 6236, 6239, 6240, 6249, 6259, 6260, 6260, 6277, 6277,
3635 6277, 6277, 6277, 6277, 6277, 6277, 6277, 6278, 6295, 6295,
3636 6295, 6295, 6295, 6295, 6300, 6305, 6310, 6315, 6320, 6325,
3637 6330, 6335, 6340, 6345, 6350, 6355, 6360, 6366, 6373, 6384,
3638 6393, 6402, 6411, 6422, 6423, 6433, 6440, 6445, 6464, 6466,
3639 6477, 6497, 6498, 6501, 6507, 6513, 6521, 6522, 6525, 6531,
3640 6539, 6540, 6543, 6549, 6557, 6562, 6566, 6566, 6596, 6598,
3641 6597, 6610, 6611, 6618, 6620, 6645, 6650, 6655, 6662, 6668,
3642 6673, 6686, 6686, 6686, 6687, 6690, 6691, 6692, 6695, 6696,
3643 6699, 6700, 6703, 6704, 6707, 6710, 6713, 6716, 6717, 6720,
3644 6728, 6735, 6736, 6740
3645};
3646#endif
3647
3649#define YY_ACCESSING_SYMBOL(State) YY_CAST (yysymbol_kind_t, yystos[State])
3650
3651#if 1
3652/* The user-facing name of the symbol whose (internal) number is
3653 YYSYMBOL. No bounds checking. */
3654static const char *yysymbol_name (yysymbol_kind_t yysymbol) YY_ATTRIBUTE_UNUSED;
3655
3656/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
3657 First, the terminals, then, starting at YYNTOKENS, nonterminals. */
3658static const char *const yytname[] =
3659{
3660 "\"end-of-input\"", "error", "\"invalid token\"", "\"'class'\"",
3661 "\"'module'\"", "\"'def'\"", "\"'undef'\"", "\"'begin'\"",
3662 "\"'rescue'\"", "\"'ensure'\"", "\"'end'\"", "\"'if'\"", "\"'unless'\"",
3663 "\"'then'\"", "\"'elsif'\"", "\"'else'\"", "\"'case'\"", "\"'when'\"",
3664 "\"'while'\"", "\"'until'\"", "\"'for'\"", "\"'break'\"", "\"'next'\"",
3665 "\"'redo'\"", "\"'retry'\"", "\"'in'\"", "\"'do'\"",
3666 "\"'do' for condition\"", "\"'do' for block\"", "\"'do' for lambda\"",
3667 "\"'return'\"", "\"'yield'\"", "\"'super'\"", "\"'self'\"", "\"'nil'\"",
3668 "\"'true'\"", "\"'false'\"", "\"'and'\"", "\"'or'\"", "\"'not'\"",
3669 "\"'if' modifier\"", "\"'unless' modifier\"", "\"'while' modifier\"",
3670 "\"'until' modifier\"", "\"'rescue' modifier\"", "\"'alias'\"",
3671 "\"'defined?'\"", "\"'BEGIN'\"", "\"'END'\"", "\"'__LINE__'\"",
3672 "\"'__FILE__'\"", "\"'__ENCODING__'\"", "\"local variable or method\"",
3673 "\"method\"", "\"global variable\"", "\"instance variable\"",
3674 "\"constant\"", "\"class variable\"", "\"label\"", "\"integer literal\"",
3675 "\"float literal\"", "\"rational literal\"", "\"imaginary literal\"",
3676 "\"char literal\"", "\"numbered reference\"", "\"back reference\"",
3677 "\"literal content\"", "tREGEXP_END", "\"dummy end\"", "'.'",
3678 "\"backslash\"", "\"escaped space\"", "\"escaped horizontal tab\"",
3679 "\"escaped form feed\"", "\"escaped carriage return\"",
3680 "\"escaped vertical tab\"", "\"unary+\"", "\"unary-\"", "\"**\"",
3681 "\"<=>\"", "\"==\"", "\"===\"", "\"!=\"", "\">=\"", "\"<=\"", "\"&&\"",
3682 "\"||\"", "\"=~\"", "\"!~\"", "\"..\"", "\"...\"", "\"(..\"", "\"(...\"",
3683 "\"[]\"", "\"[]=\"", "\"<<\"", "\">>\"", "\"&.\"", "\"::\"",
3684 "\":: at EXPR_BEG\"", "\"operator-assignment\"", "\"=>\"", "\"(\"",
3685 "\"( arg\"", "\"[\"", "\"{\"", "\"{ arg\"", "\"*\"", "\"**arg\"",
3686 "\"&\"", "\"->\"", "\"symbol literal\"", "\"string literal\"",
3687 "\"backtick literal\"", "\"regexp literal\"", "\"word list\"",
3688 "\"verbatim word list\"", "\"symbol list\"", "\"verbatim symbol list\"",
3689 "\"terminator\"", "\"'}'\"", "\"'#{'\"", "tSTRING_DVAR", "tLAMBEG",
3690 "tLABEL_END", "tIGNORED_NL", "tCOMMENT", "tEMBDOC_BEG", "tEMBDOC",
3691 "tEMBDOC_END", "tHEREDOC_BEG", "tHEREDOC_END", "k__END__", "tLOWEST",
3692 "'='", "'?'", "':'", "'>'", "'<'", "'|'", "'^'", "'&'", "'+'", "'-'",
3693 "'*'", "'/'", "'%'", "tUMINUS_NUM", "'!'", "'~'", "tLAST_TOKEN", "'{'",
3694 "'}'", "'['", "'\\n'", "','", "'`'", "'('", "')'", "']'", "';'", "' '",
3695 "$accept", "option_terms", "compstmt_top_stmts", "$@1", "program",
3696 "top_stmts", "top_stmt", "block_open", "begin_block", "compstmt_stmts",
3697 "$@2", "$@3", "bodystmt", "$@4", "stmts", "stmt_or_begin", "$@5",
3698 "allow_exits", "k_END", "$@6", "stmt", "asgn_mrhs", "asgn_command_rhs",
3699 "command_asgn", "op_asgn_command_rhs",
3700 "def_endless_method_endless_command", "endless_command", "option_'\\n'",
3701 "command_rhs", "expr", "$@7", "$@8", "def_name", "defn_head", "$@9",
3702 "defs_head", "value_expr_expr", "expr_value", "$@10", "$@11",
3703 "expr_value_do", "command_call", "value_expr_command_call",
3704 "command_call_value", "block_command", "cmd_brace_block", "fcall",
3705 "command", "mlhs", "mlhs_inner", "mlhs_basic", "mlhs_items_mlhs_item",
3706 "mlhs_item", "mlhs_head", "mlhs_node", "lhs", "cname", "cpath", "fname",
3707 "fitem", "undef_list", "$@12", "op", "reswords", "asgn_arg_rhs", "arg",
3708 "op_asgn_arg_rhs", "range_expr_arg", "def_endless_method_endless_arg",
3709 "ternary", "endless_arg", "relop", "rel_expr", "lex_ctxt",
3710 "begin_defined", "after_rescue", "value_expr_arg", "arg_value",
3711 "aref_args", "arg_rhs", "paren_args", "opt_paren_args", "opt_call_args",
3712 "value_expr_command", "call_args", "$@13", "command_args", "block_arg",
3713 "opt_block_arg", "args", "arg_splat", "mrhs_arg", "mrhs", "primary",
3714 "$@14", "$@15", "@16", "@17", "$@18", "$@19", "$@20", "$@21", "$@22",
3715 "$@23", "$@24", "value_expr_primary", "primary_value", "k_begin", "k_if",
3716 "k_unless", "k_while", "k_until", "k_case", "k_for", "k_class",
3717 "k_module", "k_def", "k_do", "k_do_block", "k_rescue", "k_ensure",
3718 "k_when", "k_else", "k_elsif", "k_end", "k_return", "k_yield", "then",
3719 "do", "if_tail", "opt_else", "for_var", "f_marg", "mlhs_items_f_marg",
3720 "f_margs", "f_rest_marg", "f_any_kwrest", "$@25", "f_eq",
3721 "f_kw_primary_value", "f_kwarg_primary_value",
3722 "args_tail_basic_primary_value", "block_args_tail", "excessed_comma",
3723 "f_opt_primary_value", "f_opt_arg_primary_value",
3724 "opt_args_tail_block_args_tail", "block_param", "opt_block_param_def",
3725 "block_param_def", "opt_block_param", "opt_bv_decl", "bv_decls", "bvar",
3726 "max_numparam", "numparam", "it_id", "@26", "$@27", "lambda",
3727 "f_larglist", "lambda_body", "$@28", "do_block", "block_call",
3728 "method_call", "brace_block", "@29", "brace_body", "@30", "do_body",
3729 "case_args", "case_body", "cases", "p_pvtbl", "p_pktbl", "p_in_kwarg",
3730 "$@31", "p_case_body", "p_cases", "p_top_expr", "p_top_expr_body",
3731 "p_expr", "p_as", "p_alt", "p_lparen", "p_lbracket", "p_expr_basic",
3732 "$@32", "p_args", "p_args_head", "p_args_tail", "p_find", "p_rest",
3733 "p_args_post", "p_arg", "p_kwargs", "p_kwarg", "p_kw", "p_kw_label",
3734 "p_kwrest", "p_kwnorest", "p_any_kwrest", "p_value",
3735 "range_expr_p_primitive", "p_primitive", "p_variable", "p_var_ref",
3736 "p_expr_ref", "p_const", "opt_rescue", "exc_list", "exc_var",
3737 "opt_ensure", "literal", "strings", "string", "string1", "xstring",
3738 "regexp", "nonempty_list_' '", "words_tWORDS_BEG_word_list", "words",
3739 "word_list", "word", "words_tSYMBOLS_BEG_symbol_list", "symbols",
3740 "symbol_list", "words_tQWORDS_BEG_qword_list", "qwords",
3741 "words_tQSYMBOLS_BEG_qsym_list", "qsymbols", "qword_list", "qsym_list",
3742 "string_contents", "xstring_contents", "regexp_contents",
3743 "string_content", "@33", "@34", "@35", "@36", "string_dend",
3744 "string_dvar", "symbol", "ssym", "sym", "dsym", "numeric",
3745 "simple_numeric", "nonlocal_var", "user_variable", "keyword_variable",
3746 "var_ref", "var_lhs", "backref", "$@37", "superclass",
3747 "f_opt_paren_args", "f_paren_args", "f_arglist", "@38", "f_kw_arg_value",
3748 "f_kwarg_arg_value", "args_tail_basic_arg_value", "args_tail",
3749 "f_opt_arg_value", "f_opt_arg_arg_value", "opt_args_tail_args_tail",
3750 "f_args", "args_forward", "f_bad_arg", "f_norm_arg", "f_arg_asgn",
3751 "f_arg_item", "f_arg", "f_label", "kwrest_mark", "f_no_kwarg",
3752 "f_kwrest", "restarg_mark", "f_rest_arg", "blkarg_mark", "f_block_arg",
3753 "opt_f_block_arg", "value_expr_singleton_expr", "singleton",
3754 "singleton_expr", "$@39", "assoc_list", "assocs", "assoc", "operation2",
3755 "operation3", "dot_or_colon", "call_op", "call_op2", "rparen",
3756 "rbracket", "rbrace", "trailer", "term", "terms", "none", YY_NULLPTR
3757};
3758
3759static const char *
3760yysymbol_name (yysymbol_kind_t yysymbol)
3761{
3762 return yytname[yysymbol];
3763}
3764#endif
3765
3766#define YYPACT_NINF (-1155)
3767
3768#define yypact_value_is_default(Yyn) \
3769 ((Yyn) == YYPACT_NINF)
3770
3771#define YYTABLE_NINF (-814)
3772
3773#define yytable_value_is_error(Yyn) \
3774 ((Yyn) == YYTABLE_NINF)
3775
3776/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
3777 STATE-NUM. */
3778static const yytype_int16 yypact[] =
3779{
3780 -1155, 5836, 138, -1155, -1155, -1155, -1155, 10451, -1155, -1155,
3781 -1155, -1155, -1155, -1155, -1155, 11506, 11506, -1155, -1155, -1155,
3782 -1155, 6896, -1155, -1155, -1155, -1155, 25, 10297, 11, 3,
3783 -1155, -1155, -1155, -1155, 6272, 7052, -1155, -1155, 6428, -1155,
3784 -1155, -1155, -1155, -1155, -1155, -1155, -1155, 13066, 13066, 13066,
3785 13066, 131, 9210, 9368, 11986, 12226, 10752, -1155, 10143, -1155,
3786 -1155, -1155, 42, 42, 42, 42, 885, 13186, 13066, -1155,
3787 6, -1155, -1155, 1195, -1155, -1155, -1155, -1155, -1155, 874,
3788 91, 91, -1155, -1155, 282, 184, 111, -1155, 150, 13786,
3789 -1155, 203, -1155, 3425, -1155, -1155, -1155, -1155, 812, 532,
3790 -1155, 597, -1155, 11386, 11386, -1155, -1155, 9830, 13904, 14022,
3791 14140, 9988, 11506, 7520, -1155, 921, 99, -1155, -1155, 264,
3792 -1155, -1155, -1155, -1155, -1155, -1155, -1155, -1155, -1155, -1155,
3793 -1155, -1155, -1155, -1155, -1155, -1155, -1155, 306, 388, -1155,
3794 296, 423, -1155, -1155, -1155, -1155, -1155, -1155, -1155, -1155,
3795 -1155, -1155, -1155, -1155, -1155, -1155, -1155, -1155, -1155, -1155,
3796 -1155, -1155, -1155, -1155, -1155, -1155, -1155, -1155, -1155, -1155,
3797 -1155, -1155, -1155, -1155, -1155, -1155, -1155, -1155, -1155, -1155,
3798 -1155, -1155, -1155, -1155, -1155, -1155, -1155, -1155, -1155, -1155,
3799 -1155, -1155, -1155, -1155, -1155, -1155, -1155, -1155, -1155, -1155,
3800 -1155, -1155, -1155, -1155, -1155, -1155, -1155, -1155, -1155, -1155,
3801 -1155, -1155, -1155, -1155, -1155, -1155, -1155, -1155, -1155, -1155,
3802 324, -1155, -1155, -1155, -1155, -1155, -1155, 265, 13066, 454,
3803 9368, 13066, 13066, 13066, -1155, 13066, -1155, -1155, 384, 6242,
3804 -1155, 424, -1155, -1155, -1155, 396, -1155, 659, 52, 101,
3805 493, 393, 443, -1155, -1155, 11626, -1155, 11506, -1155, -1155,
3806 11127, 13306, 354, -1155, 456, -1155, 9526, -1155, -1155, -1155,
3807 -1155, -1155, 478, 91, 91, 282, -1155, 689, -1155, 481,
3808 563, 1810, 1810, 518, -1155, 9210, 490, 6, -1155, 1195,
3809 11, 524, -1155, -1155, 517, 843, 855, -1155, 424, 529,
3810 855, -1155, 11, 637, 885, 14258, 546, 546, 551, -1155,
3811 795, 829, 835, 882, -1155, -1155, 704, -1155, -1155, 1147,
3812 1196, 778, -1155, 559, 559, 559, 559, 652, -1155, -1155,
3813 -1155, -1155, -1155, -1155, -1155, 5988, 572, 11386, 11386, 11386,
3814 11386, -1155, 13306, 13306, 1674, 635, 649, -1155, 1674, -1155,
3815 673, -1155, -1155, -1155, -1155, 707, -1155, -1155, -1155, -1155,
3816 -1155, -1155, -1155, 9210, 10870, 695, -1155, -1155, 13066, 13066,
3817 13066, 13066, 13066, -1155, -1155, 13066, 13066, 13066, 13066, 13066,
3818 13066, 13066, 13066, -1155, 13066, -1155, -1155, 13066, 13066, 13066,
3819 13066, 13066, 13066, 13066, 13066, 13066, 13066, -1155, -1155, 14639,
3820 11506, 14737, 478, 8146, -1155, 874, -1155, 233, 233, 11386,
3821 9058, 9058, -1155, 6, 700, 771, -1155, -1155, 898, 830,
3822 139, 145, 168, 765, 804, 11386, 408, -1155, 730, 909,
3823 -1155, -1155, -1155, -1155, 75, 406, 498, 576, 726, 748,
3824 779, 789, 805, -1155, -1155, -1155, -1155, -1155, 840, -1155,
3825 -1155, 10988, -1155, -1155, -1155, 14835, -1155, -1155, -1155, -1155,
3826 -1155, -1155, 399, -1155, -1155, -1155, 937, -1155, 13066, 11746,
3827 -1155, -1155, 14933, 11506, 15031, -1155, -1155, 12106, -1155, 13066,
3828 11, -1155, 723, 11, 753, -1155, -1155, 714, 143, -1155,
3829 -1155, -1155, -1155, -1155, 10451, -1155, -1155, 13066, 761, 791,
3830 800, 15129, 15031, -1155, 3, 11, -1155, -1155, 5443, 774,
3831 781, -1155, 11986, -1155, -1155, 12226, -1155, -1155, -1155, 456,
3832 914, -1155, 786, -1155, -1155, 14258, 15227, 11506, 15325, -1155,
3833 -1155, -1155, -1155, -1155, -1155, -1155, -1155, -1155, -1155, -1155,
3834 -1155, 1211, 96, 1216, 105, 13066, -1155, -1155, 9678, -1155,
3835 -1155, -1155, -1155, -1155, 11266, -1155, -1155, -1155, -1155, -1155,
3836 -1155, -1155, -1155, -1155, -1155, 1349, -1155, -1155, -1155, -1155,
3837 -1155, 801, -1155, -1155, 836, -1155, -1155, -1155, 839, 11,
3838 -1155, -1155, -1155, 850, -1155, 844, 13066, 382, -1155, -1155,
3839 935, 847, 963, -1155, 13426, 8146, 6, 13426, 8146, -1155,
3840 853, -1155, -1155, -1155, 141, 141, 12346, 11, 14258, 867,
3841 -1155, 12466, -1155, 563, 3651, 3651, 3651, 3651, 3841, 2025,
3842 3651, 3651, 1810, 1810, 926, 926, -1155, 6086, 1357, 1357,
3843 1217, 648, 648, 563, 563, 563, 1165, 1165, 5135, 6584,
3844 7832, 6740, 478, -1155, 11, 881, 536, -1155, 553, -1155,
3845 7208, -1155, -1155, 141, -1155, 8298, 1053, 8754, 78, 141,
3846 141, 1056, 1050, 175, 15423, 11506, 15521, -1155, -1155, -1155,
3847 914, -1155, -1155, -1155, -1155, 15619, 11506, 14835, 8146, 13306,
3848 -1155, -1155, -1155, 11, -1155, -1155, -1155, 3815, 13546, 13546,
3849 10451, -1155, 13066, 13066, -1155, 424, -1155, -1155, 443, 6116,
3850 7364, 11, 434, 461, 13066, 13066, -1155, -1155, 11866, -1155,
3851 12106, -1155, -1155, -1155, 13306, 6242, -1155, 13666, 13666, 320,
3852 478, 478, 13546, -1155, 239, -1155, -1155, 855, 14258, 786,
3853 609, 486, 11, 674, 685, -1155, -1155, 1162, -1155, 369,
3854 -1155, 42, -1155, -1155, 369, 42, -1155, 563, 927, -1155,
3855 1349, 1405, -1155, 932, 11, 936, -1155, 142, -1155, -1155,
3856 81, -1155, 1674, -1155, -1155, 948, 13066, 1674, -1155, -1155,
3857 -1155, -1155, -1155, 1500, -1155, -1155, 25, 1046, -1155, 6242,
3858 1066, 141, -1155, 1046, 1066, 141, -1155, -1155, 959, -1155,
3859 -1155, -1155, -1155, -1155, 13066, -1155, -1155, -1155, 945, 957,
3860 1069, -1155, -1155, 786, 14258, 1059, -1155, -1155, 1077, 989,
3861 4910, -1155, -1155, -1155, 1008, 472, -1155, -1155, 988, -1155,
3862 -1155, -1155, -1155, 707, 969, 598, 11746, -1155, -1155, -1155,
3863 -1155, 707, -1155, 1123, -1155, 1013, -1155, 1125, -1155, -1155,
3864 -1155, -1155, -1155, -1155, 12586, 141, -1155, 1056, 141, 159,
3865 209, 11, 191, 198, 11386, 6, 11386, 8146, 1136, 486,
3866 -1155, 11, 141, 143, 10605, -1155, 99, 184, -1155, 7643,
3867 -1155, -1155, -1155, -1155, 13066, -1155, -1155, -1155, -1155, 533,
3868 -1155, -1155, 11, 986, 143, 25, -1155, -1155, -1155, -1155,
3869 699, -1155, -1155, -1155, -1155, -1155, 559, -1155, 559, 559,
3870 559, -1155, 11, -1155, 1349, -1155, 1369, -1155, -1155, 1094,
3871 801, -1155, -1155, 994, 995, -1155, -1155, 999, -1155, 1001,
3872 -1155, 994, 13426, -1155, -1155, -1155, -1155, -1155, -1155, -1155,
3873 1003, 12706, -1155, 786, 639, -1155, -1155, -1155, 15717, 11506,
3874 15815, -1155, -1155, 13066, 13546, 13546, 1007, -1155, -1155, -1155,
3875 13546, 13546, -1155, -1155, 12826, 1125, -1155, -1155, -1155, 9058,
3876 11386, 141, -1155, -1155, 141, -1155, 13066, -1155, 98, -1155,
3877 -1155, 141, -1155, 235, 78, 8146, 6, 141, -1155, -1155,
3878 -1155, -1155, -1155, -1155, 13066, 13066, -1155, 13066, 13066, -1155,
3879 12106, -1155, 13666, 828, 5684, -1155, -1155, 1009, 1010, -1155,
3880 1500, -1155, 1500, -1155, 1674, -1155, 1500, -1155, -1155, 1046,
3881 1066, 13066, 13066, -1155, -1155, 13066, 1014, 11266, 11266, 13546,
3882 13066, 7676, 7988, 11, 672, 675, 4723, 4723, 6242, -1155,
3883 -1155, -1155, -1155, -1155, 13546, -1155, -1155, -1155, -1155, 945,
3884 -1155, 1070, -1155, 1163, -1155, -1155, 233, -1155, -1155, -1155,
3885 12946, 8450, -1155, -1155, -1155, 141, -1155, -1155, 13066, 1674,
3886 -1155, -1155, 116, 1369, 1369, 994, 994, 1026, 994, 6242,
3887 6242, 1047, 1047, 1003, -1155, -1155, 6242, 677, -1155, -1155,
3888 -1155, 1414, 1414, 535, -1155, 4481, 645, 1133, -1155, 1288,
3889 -1155, -1155, 40, -1155, 1061, -1155, -1155, -1155, 1040, -1155,
3890 1048, -1155, 14567, -1155, -1155, -1155, -1155, -1155, 953, -1155,
3891 -1155, -1155, 291, -1155, -1155, -1155, -1155, -1155, -1155, -1155,
3892 -1155, -1155, 449, -1155, -1155, -1155, 14376, 233, -1155, -1155,
3893 9058, -1155, -1155, 8906, 8298, 13066, -1155, 803, 4723, 9058,
3894 -1155, 11, 90, -1155, -1155, -1155, 1010, -1155, -1155, 1500,
3895 -1155, -1155, 1767, 9678, -1155, -1155, 8146, -1155, -1155, -1155,
3896 -1155, 14567, 82, 11, 5264, -1155, 11, 1054, -1155, 1071,
3897 -1155, -1155, -1155, 1128, -1155, 11386, -1155, 1156, 5264, 14567,
3898 14567, 757, 1117, 1414, 1414, 535, 9, 492, 4723, 4723,
3899 -1155, 1166, -1155, 1045, 243, 251, 272, 8146, 6, -1155,
3900 1013, -1155, -1155, -1155, -1155, 233, 1006, 141, 1072, 1063,
3901 -1155, 9678, -1155, 994, 801, -1155, 1086, -1155, -1155, -1155,
3902 1089, -1155, 11, 850, 1093, 14494, 1098, -1155, -1155, -1155,
3903 303, -1155, 1117, 1101, 1104, -1155, -1155, -1155, -1155, -1155,
3904 11, -1155, -1155, 1110, -1155, 1112, -1155, -1155, -1155, -1155,
3905 -1155, -1155, -1155, -1155, -1155, -1155, -1155, 11, 11, 11,
3906 11, 11, 11, 322, 15913, 11506, 16011, 1123, -1155, 1163,
3907 -1155, -1155, 11386, 11386, -1155, 1452, -1155, 8146, 1079, -1155,
3908 -1155, 81, -1155, 1767, -1155, 1132, 14494, 1767, -1155, -1155,
3909 1219, 1076, 1567, -1155, -1155, 14567, -1155, 757, -1155, 14567,
3910 5264, 70, -1155, -1155, -1155, -1155, -1155, -1155, 201, 218,
3911 11, 361, 372, -1155, -1155, 8602, -1155, -1155, -1155, 894,
3912 -1155, -1155, 141, -1155, -1155, 801, -1155, -1155, 1118, 1137,
3913 -1155, 1076, 1141, 1142, -1155, 16109, 1118, 1145, 11, 1145,
3914 -1155, -1155, 375, 521, 1452, -1155, -1155, -1155, 1567, -1155,
3915 1567, -1155, 1767, -1155, 1567, -1155, 1131, 1144, -1155, 14567,
3916 -1155, -1155, -1155, -1155, -1155, 1118, 1118, 1148, 1118, -1155,
3917 -1155, 1567, -1155, -1155, 1118, -1155
3918};
3919
3920/* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM.
3921 Performed when YYTABLE does not specify something else to do. Zero
3922 means the default is an error. */
3923static const yytype_int16 yydefact[] =
3924{
3925 2, 0, 0, 47, 406, 407, 408, 0, 399, 400,
3926 401, 404, 26, 26, 26, 393, 394, 395, 396, 418,
3927 419, 323, 697, 696, 698, 699, 64, 0, 64, 0,
3928 813, 701, 700, 702, 97, 99, 691, 690, 98, 692,
3929 686, 687, 688, 689, 635, 707, 708, 0, 0, 0,
3930 0, 0, 0, 0, 813, 813, 126, 490, 661, 661,
3931 663, 665, 0, 0, 0, 0, 0, 0, 0, 6,
3932 3, 8, 26, 10, 43, 49, 40, 58, 61, 46,
3933 716, 716, 70, 91, 323, 90, 0, 112, 0, 116,
3934 128, 0, 237, 79, 246, 253, 282, 283, 267, 284,
3935 398, 0, 351, 0, 0, 87, 87, 0, 0, 0,
3936 0, 0, 360, 323, 370, 94, 368, 340, 341, 634,
3937 636, 342, 343, 644, 344, 650, 346, 654, 345, 656,
3938 347, 633, 678, 679, 632, 684, 695, 703, 704, 348,
3939 0, 349, 7, 1, 205, 216, 206, 229, 202, 222,
3940 212, 211, 232, 233, 227, 210, 209, 204, 230, 234,
3941 235, 214, 203, 217, 221, 223, 215, 208, 224, 231,
3942 226, 225, 218, 228, 213, 201, 220, 219, 200, 207,
3943 198, 199, 195, 196, 197, 155, 157, 156, 190, 191,
3944 186, 168, 169, 170, 177, 174, 176, 171, 172, 192,
3945 193, 178, 179, 183, 187, 173, 175, 165, 166, 167,
3946 180, 181, 182, 184, 185, 188, 189, 194, 160, 162,
3947 33, 158, 159, 161, 402, 403, 405, 0, 787, 0,
3948 0, 334, 790, 326, 661, 0, 318, 316, 0, 298,
3949 299, 329, 317, 110, 322, 813, 330, 0, 703, 704,
3950 0, 349, 813, 783, 111, 813, 508, 0, 107, 65,
3951 64, 0, 0, 28, 813, 12, 0, 11, 27, 295,
3952 393, 394, 509, 716, 716, 0, 261, 0, 360, 363,
3953 262, 251, 252, 357, 24, 0, 0, 3, 21, 23,
3954 64, 114, 20, 353, 0, 64, 64, 300, 0, 0,
3955 64, 781, 64, 0, 0, 0, 716, 716, 124, 397,
3956 0, 132, 133, 140, 487, 681, 0, 680, 682, 0,
3957 0, 0, 641, 645, 657, 651, 659, 685, 74, 273,
3958 274, 810, 809, 5, 811, 0, 0, 0, 0, 0,
3959 0, 813, 0, 0, 747, 0, 715, 389, 747, 713,
3960 0, 391, 409, 513, 503, 100, 515, 367, 410, 515,
3961 499, 813, 130, 0, 122, 117, 813, 77, 0, 0,
3962 0, 0, 0, 291, 292, 0, 0, 0, 0, 249,
3963 250, 0, 0, 75, 0, 289, 290, 0, 0, 0,
3964 0, 0, 0, 0, 0, 0, 0, 800, 801, 803,
3965 813, 802, 0, 0, 86, 84, 85, 0, 0, 0,
3966 0, 0, 377, 3, 4, 0, 430, 429, 0, 0,
3967 703, 704, 349, 150, 151, 0, 0, 153, 813, 0,
3968 703, 704, 349, 387, 225, 218, 228, 213, 195, 196,
3969 197, 155, 156, 779, 81, 80, 778, 777, 0, 776,
3970 109, 64, 108, 803, 802, 0, 369, 637, 813, 813,
3971 163, 786, 357, 333, 789, 325, 0, 813, 0, 0,
3972 319, 328, 803, 813, 802, 813, 813, 0, 320, 748,
3973 64, 312, 813, 64, 813, 311, 324, 0, 64, 366,
3974 73, 30, 32, 31, 0, 813, 296, 0, 0, 0,
3975 0, 803, 802, 813, 0, 64, 355, 14, 0, 113,
3976 0, 358, 808, 807, 301, 808, 303, 359, 782, 0,
3977 139, 685, 127, 119, 715, 0, 803, 813, 802, 488,
3978 667, 683, 670, 668, 662, 638, 639, 664, 640, 666,
3979 642, 0, 0, 0, 0, 0, 812, 9, 0, 34,
3980 35, 36, 37, 297, 0, 71, 72, 754, 751, 750,
3981 749, 752, 760, 761, 748, 0, 767, 762, 771, 770,
3982 766, 813, 763, 720, 813, 726, 746, 729, 732, 64,
3983 727, 753, 755, 756, 758, 732, 719, 765, 443, 442,
3984 769, 732, 773, 725, 0, 0, 0, 0, 0, 487,
3985 0, 513, 101, 487, 0, 0, 0, 64, 0, 118,
3986 131, 0, 526, 259, 266, 268, 269, 270, 277, 278,
3987 271, 272, 247, 248, 275, 276, 526, 64, 263, 264,
3988 265, 254, 255, 256, 257, 258, 293, 294, 791, 793,
3989 792, 794, 323, 506, 64, 813, 791, 793, 792, 794,
3990 323, 507, 813, 0, 421, 0, 420, 0, 0, 0,
3991 0, 0, 375, 357, 803, 813, 802, 380, 385, 150,
3992 151, 152, 709, 383, 711, 803, 813, 802, 0, 0,
3993 798, 799, 82, 64, 362, 791, 792, 323, 0, 0,
3994 0, 813, 0, 0, 785, 331, 327, 332, 813, 791,
3995 792, 64, 791, 792, 0, 0, 784, 306, 313, 308,
3996 315, 804, 365, 29, 0, 279, 13, 0, 0, 356,
3997 0, 813, 0, 25, 115, 22, 354, 64, 0, 125,
3998 795, 138, 64, 791, 792, 489, 671, 0, 643, 0,
3999 647, 0, 653, 649, 0, 0, 655, 260, 0, 38,
4000 0, 441, 433, 435, 64, 438, 431, 0, 724, 775,
4001 0, 723, 0, 742, 714, 0, 0, 0, 739, 718,
4002 592, 764, 768, 0, 744, 772, 64, 59, 62, 286,
4003 280, 0, 717, 60, 281, 0, 488, 511, 0, 488,
4004 416, 417, 512, 498, 334, 92, 93, 41, 336, 0,
4005 45, 335, 129, 123, 0, 0, 69, 48, 67, 0,
4006 304, 329, 236, 42, 0, 349, 524, 524, 0, 813,
4007 813, 513, 505, 104, 0, 510, 313, 813, 813, 310,
4008 504, 102, 309, 813, 352, 813, 422, 813, 424, 88,
4009 423, 373, 374, 413, 0, 0, 526, 0, 0, 795,
4010 356, 64, 791, 792, 0, 0, 0, 0, 150, 151,
4011 154, 64, 0, 64, 0, 361, 500, 95, 50, 304,
4012 238, 57, 245, 164, 0, 788, 321, 813, 813, 510,
4013 813, 813, 64, 813, 64, 64, 56, 244, 302, 120,
4014 510, 26, 672, 669, 676, 677, 646, 648, 658, 652,
4015 660, 39, 64, 440, 0, 757, 0, 774, 721, 765,
4016 813, 731, 730, 732, 732, 445, 728, 732, 759, 732,
4017 756, 732, 0, 813, 813, 390, 392, 489, 96, 489,
4018 339, 0, 813, 121, 357, 813, 813, 813, 803, 813,
4019 802, 525, 525, 0, 0, 0, 0, 105, 805, 813,
4020 0, 0, 103, 411, 813, 18, 624, 415, 414, 0,
4021 0, 0, 425, 427, 0, 89, 0, 517, 0, 378,
4022 524, 0, 379, 510, 0, 0, 0, 0, 510, 388,
4023 780, 83, 501, 502, 0, 0, 813, 0, 0, 307,
4024 314, 364, 0, 747, 0, 432, 434, 436, 439, 722,
4025 0, 743, 0, 740, 0, 735, 0, 737, 745, 66,
4026 288, 0, 0, 26, 26, 334, 337, 0, 0, 0,
4027 0, 791, 792, 64, 791, 792, 0, 0, 285, 54,
4028 242, 55, 243, 106, 0, 52, 240, 53, 241, 625,
4029 626, 813, 627, 813, 15, 428, 0, 371, 372, 518,
4030 0, 0, 525, 376, 381, 0, 710, 384, 0, 747,
4031 491, 494, 0, 0, 0, 732, 732, 732, 732, 63,
4032 287, 813, 813, 338, 44, 68, 305, 510, 616, 622,
4033 588, 0, 0, 0, 525, 64, 525, 576, 661, 0,
4034 615, 78, 534, 540, 542, 544, 538, 537, 572, 539,
4035 581, 584, 587, 593, 594, 583, 547, 602, 595, 548,
4036 603, 604, 605, 606, 607, 608, 609, 610, 612, 611,
4037 613, 614, 591, 76, 51, 239, 0, 0, 629, 412,
4038 0, 19, 631, 0, 0, 0, 519, 813, 0, 0,
4039 386, 64, 0, 675, 674, 673, 437, 741, 736, 0,
4040 733, 738, 479, 0, 477, 476, 0, 600, 601, 151,
4041 620, 0, 564, 64, 565, 569, 64, 0, 559, 0,
4042 813, 562, 575, 0, 617, 0, 618, 0, 535, 0,
4043 0, 582, 586, 598, 599, 0, 525, 525, 0, 0,
4044 590, 0, 628, 0, 703, 704, 349, 0, 3, 16,
4045 813, 520, 522, 523, 521, 0, 531, 0, 481, 0,
4046 496, 0, 492, 732, 813, 448, 813, 454, 475, 457,
4047 460, 480, 64, 756, 460, 447, 460, 453, 514, 516,
4048 64, 557, 579, 567, 566, 558, 570, 806, 560, 589,
4049 64, 541, 536, 572, 543, 573, 577, 661, 585, 580,
4050 596, 597, 621, 546, 556, 545, 552, 64, 64, 64,
4051 64, 64, 64, 357, 803, 813, 802, 813, 630, 813,
4052 426, 527, 0, 0, 382, 0, 493, 0, 0, 734,
4053 452, 0, 451, 0, 471, 0, 0, 455, 466, 468,
4054 0, 446, 0, 473, 563, 0, 571, 0, 619, 0,
4055 0, 0, 549, 550, 551, 553, 554, 555, 795, 356,
4056 64, 791, 792, 623, 17, 0, 532, 533, 485, 64,
4057 483, 486, 0, 495, 449, 813, 459, 458, 460, 460,
4058 478, 456, 460, 460, 357, 803, 460, 568, 64, 573,
4059 574, 578, 510, 813, 0, 482, 497, 450, 0, 472,
4060 0, 469, 0, 463, 0, 465, 795, 356, 474, 0,
4061 561, 529, 530, 528, 484, 460, 460, 460, 460, 470,
4062 464, 0, 461, 467, 460, 462
4063};
4064
4065/* YYPGOTO[NTERM-NUM]. */
4066static const yytype_int16 yypgoto[] =
4067{
4068 -1155, -102, 1036, -1155, -1155, -1155, 981, -1155, 776, -31,
4069 -1155, -1155, -548, -1155, 196, 813, -1155, 0, -1155, -1155,
4070 15, -1155, -1155, -514, -1155, 21, -539, 178, -492, -18,
4071 -1155, -1155, 467, 2330, -1155, 3088, -1155, -66, -1155, -1155,
4072 1228, 26, -1155, 740, -1155, -674, 1377, -8, 1239, -161,
4073 32, -491, -44, -1155, 20, 3727, -420, 1226, -54, -2,
4074 -1155, -1155, 12, -1155, -1155, 4643, -1155, -1155, -1155, -1155,
4075 -541, 1252, -1155, 717, 856, 267, -1155, 2405, -1155, 667,
4076 69, 665, -390, -1155, 49, -1155, -22, -398, -243, 38,
4077 -357, -1155, -568, -28, -1155, -1155, -1155, -1155, -1155, -1155,
4078 -1155, -1155, -1155, -1155, -1155, -1155, 985, -1155, -1155, -1155,
4079 -1155, -1155, -1155, -1155, -1155, -1155, -1155, -1155, -1155, -1155,
4080 -1155, -1155, 398, -1155, -433, 1815, 2207, -391, 380, 165,
4081 -804, -1155, -802, -761, 616, 463, -570, -1155, 147, 87,
4082 -1155, -1155, 221, -1155, -1154, 88, 48, -1155, 302, -1155,
4083 -1155, 157, -1155, 39, 182, -186, -39, -1155, -1155, 385,
4084 -1155, -1155, -1155, 515, -1155, -1155, -98, -1155, -523, -1155,
4085 1027, -1155, -798, -1155, -730, -737, -506, -1155, 54, -1155,
4086 -1155, -905, -62, -1155, -1155, -1155, -1155, 208, -1155, -444,
4087 -1155, -626, -686, -1043, -458, -1032, -971, -1155, 210, -1155,
4088 -1155, -899, 217, -1155, -1155, -573, 222, -1155, -1155, -1155,
4089 135, -1155, -1155, 140, 668, 832, -1155, 1298, 1266, 1662,
4090 10, -1155, 1795, -1155, 864, -1155, 1861, -1155, -1155, 2250,
4091 -1155, 2364, -1155, -1155, -58, -1155, -1155, -174, -1155, -1155,
4092 -1155, -1155, -1155, -1155, 17, -1155, -1155, -1155, -1155, 34,
4093 -55, 3596, -1, 1307, 3951, 3211, -1155, -1155, 97, 747,
4094 -4, -1155, 660, -1155, -1155, -313, -659, 661, -451, -318,
4095 -223, -1133, -459, -321, -721, -431, -729, -322, -1155, -731,
4096 -1155, -636, -1155, -550, -554, -1155, -1155, -1155, -1155, -1155,
4097 44, -414, -359, -1155, -1155, -89, 1304, -123, -142, 89,
4098 -182, -59, -68, 14
4099};
4100
4101/* YYDEFGOTO[NTERM-NUM]. */
4102static const yytype_int16 yydefgoto[] =
4103{
4104 0, 333, 69, 1, 2, 70, 71, 266, 267, 652,
4105 1133, 1269, 653, 1043, 287, 288, 504, 224, 72, 494,
4106 289, 74, 75, 76, 77, 78, 777, 487, 807, 79,
4107 626, 612, 444, 273, 864, 274, 406, 407, 409, 965,
4108 410, 82, 796, 808, 83, 602, 275, 85, 86, 290,
4109 87, 522, 88, 89, 90, 238, 427, 428, 218, 219,
4110 220, 690, 641, 222, 92, 93, 94, 95, 96, 97,
4111 780, 395, 98, 553, 497, 554, 240, 241, 294, 812,
4112 829, 830, 480, 242, 481, 257, 258, 244, 470, 645,
4113 246, 800, 801, 99, 403, 510, 847, 661, 854, 1139,
4114 857, 855, 678, 595, 598, 100, 277, 102, 103, 104,
4115 105, 106, 107, 108, 109, 110, 111, 356, 359, 954,
4116 1130, 844, 959, 960, 792, 278, 279, 655, 839, 961,
4117 962, 419, 752, 753, 754, 755, 571, 765, 766, 1215,
4118 1216, 1217, 1326, 1288, 1219, 1220, 1284, 1221, 1153, 1154,
4119 1222, 1209, 1319, 1320, 529, 735, 891, 314, 1142, 114,
4120 1060, 1212, 1277, 360, 115, 116, 357, 599, 600, 603,
4121 604, 968, 845, 1204, 941, 1026, 816, 1315, 848, 1363,
4122 1205, 1091, 1232, 1093, 1094, 1188, 1189, 1095, 1297, 1163,
4123 1164, 1165, 1097, 1098, 1245, 1167, 1099, 1100, 1101, 1102,
4124 1103, 572, 1105, 1106, 1107, 1108, 1109, 1110, 1111, 1112,
4125 955, 1041, 1127, 1131, 117, 118, 119, 120, 121, 122,
4126 323, 123, 124, 541, 739, 125, 126, 543, 127, 128,
4127 129, 130, 542, 544, 316, 320, 321, 534, 737, 736,
4128 892, 994, 1145, 893, 131, 132, 317, 133, 134, 135,
4129 136, 248, 249, 139, 250, 251, 856, 673, 345, 346,
4130 347, 348, 573, 574, 575, 911, 577, 578, 763, 579,
4131 580, 581, 582, 920, 584, 585, 586, 587, 588, 589,
4132 590, 591, 592, 593, 758, 447, 448, 449, 679, 299,
4133 484, 253, 720, 643, 682, 677, 402, 489, 825, 1171,
4134 514, 656, 414, 269
4135};
4136
4137/* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If
4138 positive, shift that token. If negative, reduce the rule whose
4139 number is the opposite. If YYTABLE_NINF, syntax error. */
4140static const yytype_int16 yytable[] =
4141{
4142 138, 319, 335, 318, 315, 412, 671, 237, 237, 478,
4143 644, 334, 401, 225, 226, 142, 73, 657, 456, 221,
4144 761, 286, 293, 583, 223, 263, 454, 583, 309, 910,
4145 596, 576, 483, 964, 729, 576, 236, 236, 408, 221,
4146 642, 413, 650, 813, 223, 365, 918, 781, 334, 971,
4147 785, 138, 138, 245, 245, 312, 784, 445, 783, 252,
4148 252, 309, 355, 706, 243, 254, 292, 292, 297, 301,
4149 221, 696, 336, 324, 325, 326, 308, 351, 788, 696,
4150 309, 309, 309, 701, 291, 405, 405, 942, 312, 405,
4151 256, 452, 295, 328, 349, 349, 687, 806, 296, 300,
4152 327, 706, 996, 912, 237, 838, 756, 421, 431, 431,
4153 431, 654, 697, 642, 516, 650, 1143, 803, 518, 1210,
4154 817, 1233, 1123, 221, 505, 352, 914, 1104, 1104, 1327,
4155 862, 919, 1234, 236, 768, 1243, 530, 732, 143, 562,
4156 774, 1177, 1321, 721, -697, 998, 537, 539, 1246, 947,
4157 245, 790, -705, 354, 265, 697, 252, 952, 474, 563,
4158 331, 450, 741, 259, -141, 259, 332, 509, -64, 721,
4159 -142, 745, 793, -697, 806, 806, 466, 784, 350, 259,
4160 342, 343, 260, 1177, -146, 507, -141, 283, 502, 567,
4161 568, 532, 533, -149, 1239, 1178, 868, 871, 1327, 286,
4162 -148, -706, 607, 322, 261, 1027, 264, 907, 806, 791,
4163 907, 1321, 358, 1211, -146, 742, -144, 1259, 1262, 508,
4164 834, 528, 569, -145, 746, -813, 841, 842, 334, 138,
4165 886, -147, 331, 1206, -147, -142, 1144, -579, 332, 1104,
4166 1052, 478, 488, 490, 292, 361, 654, 237, 344, 237,
4167 353, 568, 331, 1050, 286, 860, -141, 1340, 332, 471,
4168 -143, 523, 996, 1246, -142, 138, 471, 1246, 1341, 485,
4169 351, 549, 550, 551, 552, 851, 236, 309, 236, 918,
4170 142, 73, 1104, 569, 138, -149, 861, 349, 349, 1104,
4171 1104, 756, 903, 482, -132, 245, 706, 259, 946, 292,
4172 -133, 252, 1146, 351, 312, 362, 486, 721, 352, 977,
4173 696, 662, 696, 933, -137, 1138, -791, 291, 721, 405,
4174 405, 405, 405, -140, 555, 556, 1338, 1341, 684, 666,
4175 -139, 913, 286, 1202, 138, -148, 309, 366, 521, 1203,
4176 970, 256, 921, 658, 354, 912, -135, 1161, 925, 1170,
4177 73, 697, 926, -136, 334, -146, 999, 707, -791, 668,
4178 709, -146, 138, 312, -138, 712, -792, 740, 1067, 740,
4179 499, 500, -147, -113, -144, -792, 59, 292, -147, 659,
4180 660, 1010, 724, 1009, 609, -145, 1040, 331, -143, 1185,
4181 -134, 405, 237, 332, -129, 291, 458, -141, 1104, 1166,
4182 1096, 1096, 138, -141, 1177, -142, -705, 405, 491, 138,
4183 138, -142, 969, 649, 485, 972, 770, 292, 492, 493,
4184 878, 236, 260, 1225, 292, 292, -149, 1055, 696, 979,
4185 806, 806, -149, 353, 771, 530, 806, 806, 909, 255,
4186 -141, 583, 674, 237, 1186, 756, 583, 756, 1187, 1253,
4187 1255, 1010, 1029, 1031, -147, 876, 764, 259, 1035, 1037,
4188 669, -132, 1001, 1003, 670, 237, 1005, 649, 1007, 697,
4189 1008, 651, 236, 513, 513, -696, -148, -792, 513, 460,
4190 519, 523, -148, 770, 802, 882, 649, 485, -706, 245,
4191 532, 533, 713, 476, 236, 252, 471, 309, 471, 691,
4192 683, 1190, 1258, 1261, -696, 806, 221, 138, 1157, 1158,
4193 462, 223, 1096, 698, 649, -144, 1226, 748, 467, 237,
4194 806, -144, -142, 459, 312, 468, -145, -149, 1047, -143,
4195 322, 1048, -145, -148, 880, -143, 958, 782, 1053, 1361,
4196 649, 485, 1124, -133, 1057, 888, 846, 138, 236, 1023,
4197 1325, 469, 1225, 138, 1225, -356, 727, -149, 1225, 879,
4198 865, 881, 292, 1225, 523, 897, 918, -698, -144, 749,
4199 897, 1065, 459, 1066, 697, 1068, 706, 1051, -140, 642,
4200 309, 650, 1214, -356, -356, 759, 778, 669, 759, 778,
4201 890, 1159, 696, 475, 138, -145, -698, 138, 477, 840,
4202 927, -397, 1227, 929, 756, 756, -149, 312, 1229, 292,
4203 1250, 1251, 292, 495, 1147, 1148, 1150, 1151, 503, 1225,
4204 823, 1225, 1140, 1225, 835, 1225, 837, 918, 831, -397,
4205 -397, 905, 795, 986, -137, 255, 827, 795, 451, -356,
4206 876, 368, 1225, -792, 799, -699, 259, 1329, 506, 799,
4207 -64, 1333, -148, 828, 138, 1134, 138, 237, -112, 471,
4208 1280, 863, 1282, 1160, 832, 867, 397, -143, 237, 292,
4209 -144, 292, 583, -139, -699, 1061, 511, 138, 649, 485,
4210 576, 517, 894, 583, 889, -397, 236, -145, 873, 649,
4211 485, -135, 292, 520, 398, 399, 884, 236, 949, -135,
4212 309, 832, 221, 344, 1122, 1122, 525, 223, -136, 973,
4213 -136, 822, 471, 1214, 795, 795, 1367, 1214, 1213, 978,
4214 540, 1224, 1214, 548, -134, 940, 368, 312, 397, 1322,
4215 545, 907, -143, 1227, 1242, 832, 1197, 1227, 583, 503,
4216 980, 1141, 1227, -137, 1257, 1260, 576, 268, 795, 896,
4217 400, 898, 883, -134, 899, 900, 398, 472, 397, 989,
4218 523, 991, 1279, -137, -137, 1252, -791, -137, 982, 594,
4219 530, 1347, 827, -148, 1274, 828, 309, 949, 1214, 995,
4220 1214, 786, 1214, -712, 1214, 789, 398, 501, 974, 822,
4221 976, -97, 392, 393, 394, -701, 975, -64, 1227, 259,
4222 1227, 1214, 1227, 312, 1227, 818, -144, 597, -135, -145,
4223 445, -143, 473, 601, 1271, 1080, 1122, -700, 958, -136,
4224 843, 1227, 824, 531, -701, 532, 533, 663, -135, -135,
4225 -98, 1223, -135, -134, -693, 563, 405, 1337, 405, -136,
4226 -136, 1339, 473, -136, 530, 538, -700, 956, -702, 963,
4227 610, 963, 1328, -134, -134, 667, 138, -134, -693, 1122,
4228 546, 1336, -693, -693, 397, 567, 1122, 1122, 672, 1247,
4229 883, 292, 711, -694, -694, 1310, 221, -702, 708, 824,
4230 557, 1077, 558, 559, 560, 561, 562, -693, 1013, 1346,
4231 1014, 993, 398, 526, 1046, 373, 374, 471, -703, 532,
4232 533, -694, -694, -694, -704, 513, 563, 721, 710, 680,
4233 824, 342, 343, 716, 778, 840, -97, 1056, -693, 1365,
4234 564, 1366, -97, 1368, 759, 717, -703, -703, 1045, -129,
4235 565, 237, -704, -704, 718, 566, 567, 568, 681, 726,
4236 1374, 728, 405, 1168, 40, 41, 42, 43, 527, 385,
4237 386, -349, 649, 485, 922, -98, 757, -694, 138, 909,
4238 236, -98, 1223, 1062, 1092, 1092, 1223, 397, 1042, 569,
4239 795, 795, 570, 292, 138, 1122, 795, 795, 397, -349,
4240 -349, 496, -703, -357, -444, 1059, 101, 772, -704, 292,
4241 397, 760, 799, 138, 762, 398, 664, 259, 512, 767,
4242 247, 247, 773, 530, 368, 787, 398, 675, 292, 259,
4243 515, -357, -357, 1071, 1072, 775, 138, 138, 398, 453,
4244 1137, 1231, 804, 1162, 1235, 1121, 1121, 957, 958, 824,
4245 1173, 1223, 1074, 1075, 1176, -349, 826, 101, 101, 824,
4246 1182, 310, 1183, 1184, 1254, 795, 1272, 1273, 259, 1344,
4247 138, 665, 247, 524, 524, 1128, 535, 1132, 532, 533,
4248 795, 692, 676, 992, 1256, 292, 836, -357, 390, 391,
4249 392, 393, 394, 843, 310, 846, 1092, 397, 606, 901,
4250 1121, 1121, 915, 611, 1121, 1155, 1155, 904, 247, 247,
4251 923, 906, 247, 418, 429, 429, 1268, 247, 309, 1230,
4252 -329, 1121, 1199, 1200, 1266, 398, 938, 1294, 1207, 1240,
4253 924, 928, 931, 932, 397, 934, 1162, 1298, 1305, 1306,
4254 1307, 935, 1228, 936, 943, 1195, 1162, 1162, 948, 138,
4255 508, 953, 138, 138, 1302, 1303, 1304, 1121, 138, 334,
4256 958, 990, 398, 1264, 292, 397, 771, 292, 292, 1000,
4257 1002, 963, 138, 292, 1004, 138, 1006, 405, -333, 1033,
4258 1121, 939, -795, 1121, 1063, 1064, 1267, 292, 1342, -331,
4259 292, 1126, 1129, 398, 1335, 688, 689, 1121, 1121, 1121,
4260 1278, 1149, 1121, 1121, 693, 1172, 1152, 1121, 1121, 1301,
4261 1011, 1012, 704, 705, 530, 1180, 138, 309, 1265, 1017,
4262 1179, 824, 1018, 1181, 1020, -795, 1316, 1317, 1078, 1236,
4263 138, 292, 496, 530, 963, 101, 36, 37, 1177, 39,
4264 722, 1276, 1263, 1237, 431, 292, 45, 46, 759, 676,
4265 759, 1323, 1275, -795, -795, 337, 338, 339, 340, 341,
4266 247, 1281, 247, 368, 1283, 247, 247, 535, 1287, 532,
4267 533, 101, 1239, 1292, 405, 405, 1295, 237, 309, 1296,
4268 381, 382, 530, 824, 1169, 1299, 535, 1300, 532, 533,
4269 101, 1330, 1289, 1348, 1293, 1334, 138, 530, 649, 485,
4270 723, 956, 530, 1132, 1343, 431, 236, -795, -791, -795,
4271 310, 292, 1350, -791, 1121, 368, 1352, 1354, 1121, 1121,
4272 1359, -792, 498, 1371, 387, 388, 389, 390, 391, 392,
4273 393, 394, 381, 382, 138, 536, 547, 532, 533, 1208,
4274 101, 725, 247, 247, 247, 247, 1198, 247, 247, 292,
4275 738, 981, 532, 533, 411, 743, 433, 532, 533, 759,
4276 1174, 824, 36, 37, 824, 39, 797, 416, 101, 310,
4277 396, 714, 866, 1044, 1054, 870, 872, 963, 1121, 390,
4278 391, 392, 393, 394, 824, 1270, 902, 997, 1324, 833,
4279 1286, 870, 872, 1218, 1156, 1332, 1349, 1351, 84, 1285,
4280 1353, 1355, 983, 1364, 1358, 247, 605, 1244, 101, 887,
4281 1175, 1248, 84, 84, 247, 101, 101, 1362, 1249, 1241,
4282 1208, 557, 1313, 558, 559, 560, 561, 744, 874, 1314,
4283 247, 1090, 1090, 1369, 1370, 1372, 1373, 457, 446, 455,
4284 908, 557, 1375, 558, 559, 560, 561, 1360, 917, 84,
4285 84, 0, 0, 0, 0, 368, 247, 0, 824, 824,
4286 824, 0, 0, 0, 84, 0, 0, 22, 23, 24,
4287 25, 750, 381, 382, 0, 0, 751, 557, 247, 558,
4288 559, 560, 561, 31, 32, 33, 1090, 1090, 0, 0,
4289 1090, 750, 0, 40, 41, 42, 43, 44, 0, 0,
4290 84, 84, 0, 0, 84, 0, 0, 1090, 824, 84,
4291 0, 0, 0, 101, 0, 0, 0, 1345, 389, 390,
4292 391, 392, 393, 394, 1318, 0, 558, 559, 560, 561,
4293 310, 0, 247, 0, 0, 0, 1169, 0, 0, 0,
4294 0, 0, 0, 1090, 57, 58, 59, 60, 61, 62,
4295 63, 64, 65, 101, 0, 0, 944, 945, 0, 101,
4296 0, 887, 0, 0, 950, 951, 1090, 0, 0, 1090,
4297 0, 0, 557, 0, 558, 559, 560, 561, 562, 0,
4298 0, 304, 0, 1090, 1090, 1090, 0, 0, 1090, 1090,
4299 0, 0, 0, 1090, 1090, 0, 0, 0, 563, 247,
4300 101, 0, 247, 101, 0, 0, 0, 0, 0, 0,
4301 0, 247, 564, 310, 984, 985, 814, 987, 988, 0,
4302 0, 0, 565, 0, 0, 0, 0, 84, 567, 568,
4303 0, 1030, 1032, 0, 0, 0, 0, 1036, 1038, 557,
4304 0, 558, 559, 560, 561, 562, 0, 0, 0, 0,
4305 0, 0, 84, 0, 84, 0, 0, 84, 84, 0,
4306 101, 569, 101, 84, 0, 563, 0, 0, 0, 0,
4307 247, 1030, 1032, 1019, 1036, 1038, 0, 0, 0, 0,
4308 0, 247, 84, 101, 247, 0, 1034, 0, 0, 565,
4309 0, 0, 0, 814, 814, 567, 568, 0, 0, 0,
4310 1090, 0, 0, 0, 1090, 1090, 0, 0, 0, 0,
4311 0, 0, 0, 0, 1113, 1113, 0, 0, 0, 247,
4312 0, 1125, 0, 1058, 0, 0, 0, 814, 569, 0,
4313 0, 0, 84, 310, 84, 84, 84, 84, 0, 84,
4314 84, 0, 0, 0, 0, 1125, 557, 0, 558, 559,
4315 560, 561, 562, 0, 0, 0, 0, 0, 0, 0,
4316 84, 0, 0, 0, 1090, 0, 0, 0, 0, 1113,
4317 1113, 0, 563, 1113, 0, 0, 0, 0, 0, 0,
4318 0, 0, 0, 0, 0, 0, 564, 0, 0, 0,
4319 1113, 0, 0, 0, 0, 0, 565, 84, 0, 0,
4320 84, 566, 567, 568, 0, 0, 84, 84, 84, 310,
4321 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4322 0, 0, 84, 0, 0, 0, 1113, 0, 0, 0,
4323 0, 0, 0, 0, 0, 569, 112, 0, 570, 557,
4324 0, 558, 559, 560, 561, 562, 0, 0, 84, 1113,
4325 112, 112, 1113, 0, 0, 0, 0, 0, 0, 247,
4326 0, 247, 101, 0, 0, 563, 1113, 1113, 1113, 0,
4327 84, 1113, 1113, 0, 0, 0, 1113, 1113, 1114, 1114,
4328 0, 0, 0, 0, 0, 0, 0, 112, 112, 565,
4329 0, 0, 0, 0, 566, 567, 568, 0, 0, 0,
4330 0, 0, 112, 0, 0, 84, 0, 1238, 368, 369,
4331 370, 371, 372, 373, 374, 375, 376, 377, 378, -814,
4332 -814, 0, 0, 0, 84, 381, 382, 247, 569, 0,
4333 0, 570, 0, 1114, 1114, 0, 0, 1114, 112, 112,
4334 0, 0, 112, 0, 247, 84, 0, 112, 0, 814,
4335 814, 84, 0, 0, 1114, 814, 814, 0, 0, 0,
4336 0, 0, 0, 0, 101, 247, 0, 385, 386, 387,
4337 388, 389, 390, 391, 392, 393, 394, 0, 0, 0,
4338 101, 0, 0, 1113, 0, 0, 0, 1113, 1113, 0,
4339 1114, 84, 84, 0, 84, 84, 0, 0, 0, 101,
4340 0, 0, 0, 84, 0, 0, 0, 0, 84, 0,
4341 0, 0, 0, 1114, 0, 0, 1114, 0, 0, 0,
4342 0, 0, 101, 101, 814, 0, 0, 0, 0, 0,
4343 1114, 1114, 1114, 0, 0, 1114, 1114, 0, 0, 814,
4344 1114, 1114, 0, 0, 0, 0, 0, 1113, 0, 0,
4345 0, 0, 84, 0, 84, 0, 101, 0, 0, 0,
4346 0, 0, 84, 0, 0, 112, 0, 0, 0, 0,
4347 0, 0, 0, 84, 0, 84, 84, 0, 0, 0,
4348 0, 0, 0, 0, 0, 84, 84, 0, 0, 0,
4349 112, 0, 112, 0, 0, 112, 112, 0, 0, 0,
4350 0, 112, 0, 0, 0, 0, 0, 0, 0, 0,
4351 0, 84, 0, 0, 0, 0, 0, 0, 0, 84,
4352 112, 0, 0, 368, 369, 370, 371, 372, 373, 374,
4353 375, 1193, 377, 378, 0, 101, 0, 0, 101, 101,
4354 381, 382, 0, 0, 101, 0, 0, 1114, 0, 0,
4355 0, 1114, 1114, 0, 0, 0, 0, 0, 101, 0,
4356 0, 101, 0, 0, 0, 0, 0, 0, 0, 0,
4357 112, 0, 112, 112, 112, 112, 0, 112, 112, 0,
4358 247, 0, 385, 386, 387, 388, 389, 390, 391, 392,
4359 393, 394, 0, 0, 0, 0, 0, 0, 112, 0,
4360 0, 0, 101, 0, 0, 0, 0, 0, 0, 0,
4361 0, 1114, 0, 0, 0, 0, 101, 0, 0, 0,
4362 0, 0, 0, 0, 0, 0, 0, 0, 113, 0,
4363 1291, 0, 0, 0, 0, 112, 0, 0, 112, 0,
4364 0, 0, 113, 113, 112, 112, 112, 0, 0, 0,
4365 0, 84, 0, 84, 84, 0, 0, 0, 0, 0,
4366 112, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4367 247, 0, 0, 0, 0, 0, 0, 247, 247, 113,
4368 113, 0, 101, 0, 0, 0, 112, 0, 0, 0,
4369 0, 1331, 0, 0, 113, 0, 0, 0, 0, 0,
4370 0, 0, 0, 0, 0, 0, 0, 0, 112, 0,
4371 0, 0, 1115, 1115, 0, 0, 0, 0, 0, 84,
4372 101, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4373 113, 113, 0, 0, 113, 0, 84, 0, 0, 113,
4374 0, 84, 84, 112, 0, 0, 0, 84, 84, 0,
4375 0, 80, 0, 0, 0, 0, 84, 84, 0, 0,
4376 0, 0, 112, 0, 0, 80, 80, 1115, 1115, 0,
4377 0, 1115, 84, 0, 0, 0, 0, 0, 0, 0,
4378 0, 0, 0, 112, 0, 0, 0, 0, 1115, 112,
4379 0, 84, 0, 0, 0, 0, 0, 0, 0, 0,
4380 0, 0, 80, 80, 0, 0, 306, 0, 0, 0,
4381 0, 0, 0, 0, 84, 84, 84, 0, 0, 0,
4382 0, 0, 0, 0, 1115, 0, 0, 0, 0, 112,
4383 112, 84, 112, 112, 0, 0, 0, 0, 0, 306,
4384 0, 112, 0, 0, 0, 0, 112, 1115, 84, 0,
4385 1115, 0, 0, 0, 0, 0, 0, 113, 306, 306,
4386 306, 0, 80, 0, 1115, 1115, 1115, 0, 0, 1115,
4387 1115, 0, 0, 0, 1115, 1115, 0, 0, 0, 0,
4388 298, 0, 113, 0, 113, 0, 0, 113, 113, 0,
4389 112, 0, 112, 113, 0, 0, 0, 0, 0, 0,
4390 112, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4391 0, 112, 113, 112, 112, 0, 0, 0, 0, 0,
4392 0, 0, 0, 112, 112, 0, 0, 84, 0, 0,
4393 84, 84, 0, 0, 0, 0, 84, 0, 0, 0,
4394 0, 0, 0, 0, 0, 0, 0, 0, 0, 112,
4395 84, 0, 0, 84, 0, 0, 0, 112, 0, 0,
4396 0, 0, 113, 0, 113, 113, 113, 113, 0, 113,
4397 113, 0, 84, 0, 0, 0, 0, 0, 0, 0,
4398 80, 1115, 0, 0, 0, 1115, 1115, 0, 0, 0,
4399 113, 0, 0, 0, 84, 0, 0, 0, 0, 0,
4400 0, 0, 0, 0, 0, 80, 0, 80, 84, 0,
4401 0, 0, 0, 0, 0, 0, 80, 0, 0, 0,
4402 0, 0, 0, 0, 0, 0, 0, 113, 0, 0,
4403 113, 0, 0, 0, 0, 80, 113, 113, 113, 0,
4404 0, 0, 0, 0, 0, 1115, 0, 0, 0, 0,
4405 0, 0, 113, 461, 0, 306, 463, 464, 465, 0,
4406 0, 0, 84, 0, 0, 0, 0, 0, 0, 84,
4407 84, 0, 0, 0, 84, 0, 0, 0, 113, 0,
4408 0, 0, 0, 0, 0, 80, 0, 0, 0, 112,
4409 0, 112, 112, 0, 0, 0, 0, 0, 0, 0,
4410 113, 0, 0, 0, 0, 0, 0, 0, 1116, 1116,
4411 0, 0, 84, 80, 306, 0, 0, 0, 0, 0,
4412 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4413 0, 0, 0, 0, 0, 113, 0, 0, 0, 0,
4414 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4415 80, 0, 0, 80, 113, 0, 0, 112, 0, 0,
4416 80, 80, 0, 1116, 1116, 0, 0, 1116, 0, 0,
4417 0, 0, 0, 0, 112, 113, 0, 0, 0, 112,
4418 112, 113, 0, 0, 1116, 112, 112, 0, 0, 0,
4419 0, 0, 0, 0, 112, 112, 0, 0, 0, 0,
4420 0, 80, 0, 0, 0, 0, 0, 0, 0, 0,
4421 112, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4422 1116, 113, 113, 80, 113, 113, 0, 0, 0, 112,
4423 0, 0, 0, 113, 0, 0, 0, 0, 113, 0,
4424 0, 1117, 1117, 1116, 0, 0, 1116, 0, 0, 0,
4425 0, 0, 112, 112, 112, 0, 0, 0, 80, 0,
4426 1116, 1116, 1116, 0, 0, 1116, 1116, 0, 0, 112,
4427 1116, 1116, 0, 0, 0, 306, 0, 80, 0, 0,
4428 0, 0, 113, 0, 113, 0, 112, 0, 0, 0,
4429 0, 0, 113, 694, 695, 0, 1117, 1117, 80, 0,
4430 1117, 0, 298, 113, 80, 113, 113, 1118, 1118, 0,
4431 0, 0, 0, 0, 0, 113, 113, 1117, 0, 0,
4432 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4433 0, 0, 0, 0, 0, 0, 0, 695, 0, 0,
4434 298, 113, 0, 0, 0, 80, 0, 0, 80, 113,
4435 0, 0, 0, 1117, 0, 0, 0, 0, 306, 0,
4436 0, 80, 1118, 1118, 0, 112, 1118, 0, 112, 112,
4437 0, 0, 0, 0, 112, 0, 1117, 1116, 0, 1117,
4438 0, 1116, 1116, 1118, 0, 0, 0, 0, 112, 0,
4439 0, 112, 0, 1117, 1117, 1117, 0, 0, 1117, 1117,
4440 0, 0, 0, 1117, 1117, 80, 0, 80, 0, 0,
4441 112, 769, 0, 0, 0, 80, 0, 0, 0, 1118,
4442 0, 0, 0, 0, 0, 0, 80, 0, 80, 0,
4443 0, 798, 112, 0, 0, 0, 811, 0, 80, 80,
4444 0, 1116, 1118, 0, 0, 1118, 112, 0, 0, 0,
4445 0, 0, 0, 0, 0, 0, 0, 0, 0, 1118,
4446 1118, 1118, 0, 0, 1118, 1118, 0, 0, 0, 1118,
4447 1118, 0, 80, 0, 0, 0, 0, 0, 306, 0,
4448 0, 113, 0, 113, 113, 0, 0, 0, 0, 0,
4449 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4450 112, 0, 0, 0, 0, 0, 0, 112, 112, 81,
4451 1117, 0, 112, 0, 1117, 1117, 0, 875, 0, 0,
4452 0, 0, 0, 81, 81, 0, 0, 0, 0, 0,
4453 0, 0, 0, 695, 0, 298, 0, 0, 0, 0,
4454 0, 0, 0, 0, 0, 0, 0, 0, 0, 113,
4455 112, 0, 0, 0, 306, 0, 0, 0, 0, 0,
4456 81, 81, 0, 0, 307, 0, 113, 0, 0, 0,
4457 0, 113, 113, 0, 1117, 0, 1118, 113, 113, 0,
4458 1118, 1118, 0, 0, 0, 0, 113, 113, 0, 0,
4459 0, 916, 0, 0, 0, 0, 0, 307, 0, 0,
4460 0, 0, 113, 0, 0, 0, 0, 80, 0, 0,
4461 0, 0, 0, 0, 0, 0, 307, 307, 307, 930,
4462 81, 113, 0, 0, 0, 0, 0, 0, 0, 0,
4463 0, 0, 141, 0, 0, 0, 0, 0, 0, 0,
4464 1118, 0, 0, 0, 113, 113, 113, 0, 0, 0,
4465 0, 695, 0, 0, 0, 0, 0, 0, 0, 0,
4466 0, 113, 0, 0, 0, 0, 0, 0, 0, 967,
4467 0, 0, 0, 0, 0, 0, 0, 0, 113, 0,
4468 0, 0, 0, 141, 141, 0, 0, 313, 0, 80,
4469 0, 0, 0, 0, 80, 80, 1119, 1119, 0, 0,
4470 80, 80, 0, 0, 0, 0, 0, 0, 0, 80,
4471 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4472 313, 0, 0, 0, 0, 80, 0, 0, 0, 0,
4473 0, 0, 0, 0, 0, 0, 0, 0, 81, 422,
4474 432, 432, 0, 0, 80, 0, 0, 0, 0, 0,
4475 0, 1119, 1119, 0, 0, 1119, 1016, 113, 0, 0,
4476 113, 113, 0, 81, 0, 81, 113, 80, 80, 80,
4477 0, 0, 1119, 0, 81, 0, 0, 0, 0, 1039,
4478 113, 0, 0, 113, 80, 0, 0, 0, 0, 0,
4479 0, 1049, 0, 81, 0, 0, 0, 0, 0, 0,
4480 0, 80, 113, 0, 0, 0, 0, 0, 1119, 0,
4481 1120, 1120, 0, 307, 0, 298, 0, 0, 0, 0,
4482 0, 0, 0, 0, 113, 0, 0, 0, 0, 0,
4483 0, 1119, 0, 0, 1119, 0, 0, 0, 113, 0,
4484 1073, 0, 0, 81, 0, 0, 0, 0, 1119, 1119,
4485 1119, 0, 0, 1119, 1119, 0, 0, 0, 1119, 1119,
4486 0, 141, 0, 0, 0, 1120, 1120, 0, 0, 1120,
4487 367, 81, 307, 0, 0, 1136, 306, 0, 0, 0,
4488 80, 0, 0, 80, 80, 0, 1120, 0, 0, 80,
4489 0, 0, 113, 0, 0, 0, 0, 141, 0, 113,
4490 113, 0, 0, 80, 113, 0, 80, 0, 81, 0,
4491 0, 81, 0, 0, 0, 0, 141, 0, 81, 81,
4492 0, 0, 1120, 368, 369, 370, 371, 372, 373, 374,
4493 375, 376, 377, 378, 379, 380, 313, 0, 0, 0,
4494 381, 382, 113, 0, 0, 1120, 383, 80, 1120, 0,
4495 0, 0, 0, 0, 0, 0, 0, 0, 0, 81,
4496 1201, 80, 1120, 1120, 1120, 1119, 141, 1120, 1120, 1119,
4497 1119, 0, 1120, 1120, 0, 306, 0, 0, 0, 0,
4498 384, 81, 385, 386, 387, 388, 389, 390, 391, 392,
4499 393, 394, 0, 0, 141, 313, 0, 0, 0, 0,
4500 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4501 0, 0, 0, 0, 0, 80, 81, 137, 0, 0,
4502 0, 0, 0, 0, 0, 0, 0, 80, 0, 1119,
4503 0, 0, 0, 307, 141, 81, 306, 0, 0, 0,
4504 0, 141, 141, 0, 0, 0, 0, 0, 0, 0,
4505 0, 0, 0, 0, 0, 0, 81, 0, 0, 0,
4506 0, 0, 81, 0, 0, 80, 0, 0, 137, 137,
4507 0, 0, 311, 0, 0, 0, 0, 0, 0, 1120,
4508 0, 0, 0, 1120, 1120, 0, 0, 0, 0, 0,
4509 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4510 0, 0, 0, 81, 0, 311, 81, 0, 0, 0,
4511 0, 0, 0, 0, 0, 0, 307, 0, 0, 81,
4512 0, 0, 0, 0, 420, 430, 430, 430, 0, 0,
4513 0, 0, 0, 0, 0, 0, 0, 0, 0, 141,
4514 0, 0, 0, 1120, 0, 0, 0, 0, 91, 368,
4515 -814, -814, -814, -814, 373, 374, 313, 0, -814, -814,
4516 0, 0, 0, 81, 0, 81, 381, 382, 0, 0,
4517 0, 0, 0, 81, 0, 0, 0, 0, 0, 141,
4518 0, 0, 0, 0, 81, 141, 81, 0, 0, 0,
4519 0, 0, 0, 0, 0, 0, 81, 81, 0, 91,
4520 91, 0, 0, 0, 0, 0, 0, 0, 385, 386,
4521 387, 388, 389, 390, 391, 392, 393, 394, 0, 0,
4522 0, 0, 0, 0, 0, 0, 141, 0, 0, 141,
4523 81, 0, 0, 0, 0, -813, 307, 0, 0, 313,
4524 0, 0, 815, -813, -813, -813, 137, 0, -813, -813,
4525 -813, 0, -813, 0, 0, 417, 0, 0, 0, 0,
4526 -813, -813, -813, 0, 0, 0, 0, 0, 0, 0,
4527 0, 0, -813, -813, 0, -813, -813, -813, -813, -813,
4528 0, 0, 137, 0, 0, 0, 141, 0, 141, 0,
4529 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4530 0, 137, 0, -813, -813, 0, 0, 0, 0, 141,
4531 0, 0, 307, 0, 0, 0, 0, 0, 0, 815,
4532 815, 311, 0, 0, 0, 0, 0, 0, 0, 0,
4533 0, 0, -813, -813, 0, 0, 0, 0, 0, 368,
4534 369, 370, 371, 372, 373, 374, 0, 0, 377, 378,
4535 0, 137, 0, 815, 0, -813, 381, 382, 0, 313,
4536 0, 0, 0, 0, 0, 81, 0, 0, 895, 0,
4537 0, 0, 140, 0, 0, 0, 0, 91, 0, 137,
4538 311, 0, 0, 0, 0, 0, -813, -813, 0, -813,
4539 0, 0, 255, -813, 0, -813, 0, 0, 385, 386,
4540 387, 388, 389, 390, 391, 392, 393, 394, 0, 0,
4541 0, 0, 0, 91, 0, 0, 0, 0, 0, 137,
4542 0, 0, 0, 140, 140, 0, 137, 137, 0, 0,
4543 0, 0, 91, 0, 0, 313, 0, 0, 0, 0,
4544 0, 0, 0, 0, 0, 0, 0, 81, 0, 0,
4545 0, 0, 81, 81, 0, 0, 0, 0, 81, 81,
4546 0, 0, 0, 0, 0, 0, 0, 81, 0, 0,
4547 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4548 0, 0, 91, 81, 0, 0, 0, 0, 141, 0,
4549 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4550 0, 0, 81, 0, 0, 0, 0, 0, 0, 0,
4551 91, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4552 0, 0, 0, 0, 137, 81, 81, 81, 0, 0,
4553 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4554 0, 311, 81, 0, 0, 0, 0, 0, 0, 0,
4555 91, 0, 0, 0, 0, 0, 0, 91, 91, 81,
4556 0, 0, 0, 0, 137, 0, 0, 0, 0, 0,
4557 137, 0, 0, 0, 0, 815, 815, 0, 0, 0,
4558 0, 815, 815, 0, 0, 0, 0, 0, 0, 0,
4559 141, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4560 0, 140, 0, 0, 0, 0, 141, 0, 0, 0,
4561 0, 137, 0, 0, 137, 0, 0, 0, 0, 0,
4562 0, 0, 0, 0, 311, 141, 0, 0, 0, 0,
4563 0, 0, 0, 0, 307, 0, 0, 140, 81, 0,
4564 0, 81, 81, 0, 0, 0, 0, 81, 141, 141,
4565 815, 0, 0, 0, 0, 91, 140, 0, 0, 0,
4566 0, 81, 0, 0, 81, 815, 0, 0, 0, 0,
4567 0, 137, 0, 137, 0, 0, 0, 0, 0, 0,
4568 0, 0, 141, 0, 0, 0, 0, 0, 0, 0,
4569 0, 0, 0, 0, 137, 91, 0, 0, 0, 0,
4570 0, 91, 0, 0, 0, 81, 140, 0, 0, 0,
4571 0, 0, 0, 0, 0, 0, 0, 0, 0, 81,
4572 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4573 0, 0, 0, 307, 140, 0, 0, 0, 0, 0,
4574 0, 0, 91, 0, 311, 91, 0, 0, 0, 0,
4575 0, 0, 0, 0, 0, 0, 0, 1196, 809, 0,
4576 0, 141, 0, 0, 141, 141, 0, 0, 0, 0,
4577 141, 0, 0, 81, 140, 0, 0, 0, 0, 0,
4578 0, 140, 140, 0, 141, 81, 0, 141, 0, 0,
4579 0, 0, 0, 0, 307, 0, 0, 0, 0, 0,
4580 0, 0, 91, 0, 91, 0, 0, 0, 0, 0,
4581 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4582 311, 0, 0, 81, 0, 91, 0, 0, 141, 0,
4583 0, 0, 0, 0, 0, 809, 809, 0, 0, 0,
4584 0, 0, 141, 0, 0, 0, 0, 0, 0, 0,
4585 0, 0, 0, 0, 0, 0, 432, 0, 0, 0,
4586 0, 0, 0, 0, 0, 0, 0, 0, 0, 809,
4587 0, 0, 0, 137, 0, 0, 0, 0, 0, 140,
4588 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4589 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4590 0, 0, 0, 0, 0, 0, 0, 0, 141, 0,
4591 0, 0, 0, 0, 0, 0, 0, 432, 0, 140,
4592 0, 0, 0, 0, 0, 140, 0, 0, 0, 0,
4593 0, 0, 0, 0, 22, 23, 24, 25, 0, 0,
4594 0, 0, 0, 0, 0, 0, 141, 0, 0, 0,
4595 31, 32, 33, 1078, 0, 0, 0, 1079, 0, 0,
4596 40, 41, 42, 43, 44, 0, 140, 0, 0, 140,
4597 0, 0, 0, 0, 0, 137, 0, 0, 0, 0,
4598 0, 0, 140, 0, 0, 0, 0, 0, 0, 0,
4599 0, 137, 1081, 1082, 0, 0, 0, 0, 0, 0,
4600 1083, 0, 0, 1084, 91, 1085, 1086, 0, 1087, 0,
4601 137, 57, 58, 59, 60, 61, 62, 63, 64, 65,
4602 0, 0, 0, 0, 0, 0, 140, 0, 140, 0,
4603 0, 0, 0, 137, 137, 0, 0, 0, 0, 0,
4604 0, 1089, 0, 0, 0, 0, 0, 0, 304, 140,
4605 0, 0, 0, 0, 0, 259, 0, 0, 0, 140,
4606 140, 0, 0, 0, 0, 0, 0, 137, 0, 0,
4607 0, 0, 0, 0, 0, 0, 0, 0, 239, 239,
4608 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4609 0, 809, 809, 140, 0, 0, 0, 809, 809, 0,
4610 0, 0, 0, 0, 0, 0, 91, 0, 0, 0,
4611 276, 280, 281, 282, 0, 0, 0, 239, 239, 0,
4612 0, 0, 91, 0, 0, 0, 0, 0, 0, 0,
4613 329, 330, 0, 0, 0, 0, 0, 0, 0, 0,
4614 0, 91, 1194, 0, 0, 0, 137, 0, 0, 137,
4615 137, 0, 0, 0, 0, 137, 0, 0, 0, 0,
4616 0, 0, 0, 0, 91, 91, 809, 0, 0, 137,
4617 0, 0, 137, 0, 0, 239, 22, 23, 24, 25,
4618 0, 809, 0, 0, 0, 0, 0, 0, 0, 0,
4619 0, 0, 31, 32, 33, 1078, 0, 0, 91, 1079,
4620 0, 1080, 40, 41, 42, 43, 44, 0, 0, 0,
4621 0, 0, 0, 137, 0, 0, 0, 0, 0, 0,
4622 0, 563, 0, 0, 0, 0, 0, 137, 140, 0,
4623 0, 0, 0, 0, 1081, 1082, 0, 0, 0, 0,
4624 0, 430, 1083, 0, 0, 1084, 0, 1085, 1086, 0,
4625 1087, 567, 0, 57, 58, 1088, 60, 61, 62, 63,
4626 64, 65, 0, 0, 0, 0, 0, 0, 0, 0,
4627 0, 0, 0, 1192, 0, 0, 0, 91, 0, 0,
4628 91, 91, 0, 1089, 0, 0, 91, 0, 0, 0,
4629 304, 239, 0, 137, 239, 239, 239, 0, 329, 0,
4630 91, 0, 430, 91, 0, 0, 0, 0, 0, 0,
4631 0, 0, 0, 0, 0, 140, 140, 0, 239, 0,
4632 239, 140, 140, 0, 0, 0, 0, 0, 0, 0,
4633 140, 137, 0, 0, 0, 0, 0, 0, 0, 0,
4634 0, 0, 0, 0, 91, 0, 140, 0, 0, 0,
4635 0, 0, 0, 0, 0, 0, 0, 0, 91, 0,
4636 0, 0, 0, 0, 0, 140, 0, 0, 0, 0,
4637 0, 0, 0, 0, 937, 0, 0, 0, 0, 0,
4638 0, 0, 0, 0, 0, 0, 0, 0, 140, 140,
4639 140, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4640 0, 0, 0, 0, 0, 140, 0, 0, 368, 369,
4641 370, 371, 372, 373, 374, 375, 376, 377, 378, 379,
4642 380, 0, 140, 0, 91, 381, 382, 0, 0, 0,
4643 0, 613, 614, 615, 616, 617, 0, 0, 618, 619,
4644 620, 621, 622, 623, 624, 625, 0, 627, 0, 0,
4645 628, 629, 630, 631, 632, 633, 634, 635, 636, 637,
4646 0, 0, 91, 239, 0, 384, 0, 385, 386, 387,
4647 388, 389, 390, 391, 392, 393, 394, 0, 0, 0,
4648 0, 0, 0, 0, 0, -298, 0, 0, 0, 0,
4649 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4650 0, 140, 0, 0, 140, 140, 0, 0, 0, 0,
4651 140, 0, 0, 0, 239, 0, 0, 0, 0, 0,
4652 0, 0, 0, 0, 140, 0, 0, 140, 0, 0,
4653 0, 239, 239, 0, 0, 0, 239, 0, 0, 0,
4654 239, 0, 282, 0, 0, 0, 0, 0, 0, 0,
4655 0, 0, 0, 0, 0, -795, 0, 0, 0, 0,
4656 715, 0, 0, -795, -795, -795, 0, 0, 140, -795,
4657 -795, 0, -795, 0, 0, 239, 0, 0, 239, 0,
4658 -795, -795, 140, 0, 0, 0, 0, 0, 0, 0,
4659 239, 0, -795, -795, 0, -795, -795, -795, -795, -795,
4660 0, 0, 0, 0, 0, 0, 0, 0, 747, 0,
4661 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4662 0, 0, 0, -795, -795, 0, 0, 0, 0, 0,
4663 0, 0, 0, -795, -795, -795, -795, -795, -795, -795,
4664 -795, -795, -795, -795, -795, -795, 0, 0, 140, 239,
4665 -795, -795, -795, -795, 0, 819, -795, 779, 0, 0,
4666 779, 0, 0, 0, 0, 0, 0, 0, 0, 239,
4667 0, 0, 0, 0, 810, -795, 0, 0, 0, 0,
4668 0, 0, 0, 0, 0, 0, 140, 0, 0, -146,
4669 -795, 0, -795, -795, -795, -795, -795, -795, -795, -795,
4670 -795, -795, 0, 0, 0, 0, -795, -795, -795, -795,
4671 -137, 0, 0, -795, 0, -795, 0, 22, 23, 24,
4672 25, 0, 0, 0, 0, 0, 0, 0, 239, 0,
4673 0, 0, 0, 31, 32, 33, 1078, 0, 0, 239,
4674 1079, 0, 0, 40, 41, 42, 43, 44, 0, 0,
4675 0, 869, 869, 0, 0, 239, 869, 0, 0, 0,
4676 0, 0, 0, 0, 0, 0, 0, 869, 869, 0,
4677 0, 239, 0, 239, 0, 1081, 1082, 0, 0, 0,
4678 779, 779, 0, 1083, 0, 869, 1084, 0, 1085, 1086,
4679 0, 1087, 0, 0, 57, 58, 59, 60, 61, 62,
4680 63, 64, 65, 0, 0, 0, 0, 0, 0, 0,
4681 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4682 0, 0, 0, 0, 1089, 0, 0, 0, 0, 239,
4683 0, 304, 0, 0, 0, 0, 0, 0, 0, 0,
4684 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4685 0, 0, 0, 0, 0, 0, 0, 239, 0, 0,
4686 0, 0, 0, -4, 3, 0, 4, 5, 6, 7,
4687 8, -4, -4, -4, 9, 10, 0, -4, -4, 11,
4688 -4, 12, 13, 14, 15, 16, 17, 18, -4, 239,
4689 0, 0, 0, 19, 20, 21, 22, 23, 24, 25,
4690 0, 0, 26, 0, 0, 0, 0, 239, 27, 28,
4691 284, 30, 31, 32, 33, 34, 35, 36, 37, 38,
4692 39, 0, 40, 41, 42, 43, 44, 45, 46, 0,
4693 0, -4, 0, 0, 0, 0, 0, 869, 0, 47,
4694 48, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4695 0, 0, 0, 0, 49, 50, 0, 0, 0, 0,
4696 0, 0, 51, 0, 0, 52, 53, 54, 55, 0,
4697 56, 0, 0, 57, 58, 59, 60, 61, 62, 63,
4698 64, 65, 0, -4, 0, 779, 0, 0, 0, 0,
4699 0, 0, 0, 0, 239, 0, 0, 0, 0, 0,
4700 0, 0, 239, 0, 0, 0, 1028, 869, 869, 0,
4701 66, 67, 68, 869, 869, -4, 0, 239, 0, 0,
4702 0, -4, 0, 546, 0, 0, 0, 0, 0, 239,
4703 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4704 0, 0, 0, 0, 0, 0, 0, 869, 869, 0,
4705 869, 869, 0, 239, 0, 779, 0, 0, 0, 0,
4706 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4707 0, 0, 0, 0, 1069, 1070, 0, 0, 239, 0,
4708 0, 0, 869, 1076, 0, 0, 0, 0, 0, 0,
4709 0, 0, 0, 0, 0, 0, 0, 869, 0, 0,
4710 0, 0, 0, 0, -813, 3, 0, 4, 5, 6,
4711 7, 8, 0, 239, 0, 9, 10, 0, 0, 0,
4712 11, 869, 12, 13, 14, 15, 16, 17, 18, 0,
4713 0, 0, 0, 0, 19, 20, 21, 22, 23, 24,
4714 25, 0, 0, 26, 0, 0, 0, 0, 0, 27,
4715 28, 284, 30, 31, 32, 33, 34, 35, 36, 37,
4716 38, 39, 0, 40, 41, 42, 43, 44, 45, 46,
4717 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4718 47, 48, 0, 0, 0, 0, 0, 0, 0, 0,
4719 0, 0, 0, 0, 0, 49, 50, 0, 239, 0,
4720 0, 0, 0, 51, 0, 0, 52, 53, 54, 55,
4721 0, 56, 0, 0, 57, 58, 59, 60, 61, 62,
4722 63, 64, 65, 0, -813, 0, 0, 0, 0, 0,
4723 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4724 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4725 0, 66, 67, 68, 0, 0, -813, 3, -813, 4,
4726 5, 6, 7, 8, -813, 0, 0, 9, 10, 0,
4727 0, 0, 11, 0, 12, 13, 14, 15, 16, 17,
4728 18, 0, 0, 0, 0, 0, 19, 20, 21, 22,
4729 23, 24, 25, 0, 0, 26, 0, 0, 0, 0,
4730 0, 27, 28, 29, 30, 31, 32, 33, 34, 35,
4731 36, 37, 38, 39, 0, 40, 41, 42, 43, 44,
4732 45, 46, 0, 0, 0, 0, 0, 0, 239, 0,
4733 0, 0, 47, 48, 0, 0, 0, 0, 0, 0,
4734 0, 0, 0, 0, 0, 0, 0, 49, 50, 0,
4735 0, 0, 0, 0, 0, 51, 0, 0, 52, 53,
4736 54, 55, 0, 56, 0, 0, 57, 58, 59, 60,
4737 61, 62, 63, 64, 65, 0, 0, 0, 0, 0,
4738 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4739 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4740 0, 0, 0, 66, 67, 68, 0, 0, -4, 3,
4741 -813, 4, 5, 6, 7, 8, -813, 0, 0, 9,
4742 10, 0, 0, 0, 11, 0, 12, 13, 14, 15,
4743 16, 17, 18, 0, 0, 0, 0, 0, 19, 20,
4744 21, 22, 23, 24, 25, 0, 0, 26, 0, 0,
4745 0, 0, 0, 27, 28, 29, 30, 31, 32, 33,
4746 34, 35, 36, 37, 38, 39, 0, 40, 41, 42,
4747 43, 44, 45, 46, 0, 0, 0, 0, 0, 0,
4748 0, 0, 0, 0, 47, 48, 0, 0, 0, 0,
4749 0, 0, 0, 0, 0, 0, 0, 0, 0, 49,
4750 50, 0, 0, 0, 0, 0, 0, 51, 0, 0,
4751 52, 53, 54, 55, 0, 56, 0, 0, 57, 58,
4752 59, 60, 61, 62, 63, 64, 65, 0, 0, 0,
4753 0, 0, 0, 0, 0, 0, -795, 0, 0, 0,
4754 0, 0, 0, 0, -795, -795, -795, 0, 0, -795,
4755 -795, -795, 0, -795, 0, 66, 67, 68, 0, 0,
4756 -4, -795, -795, -795, -795, -795, 0, 0, 546, 0,
4757 0, 0, 0, -795, -795, 0, -795, -795, -795, -795,
4758 -795, 0, 0, 0, 368, 369, 370, 371, 372, 373,
4759 374, 375, 376, 377, 378, 379, 380, 0, 0, 0,
4760 0, 381, 382, 0, -795, -795, 0, 0, 0, 0,
4761 0, 0, 0, 0, -795, -795, -795, -795, -795, -795,
4762 -795, -795, -795, -795, -795, -795, -795, 0, 0, 0,
4763 0, -795, -795, -795, -795, 0, 877, -795, 0, 0,
4764 0, 384, -795, 385, 386, 387, 388, 389, 390, 391,
4765 392, 393, 394, 0, 0, 0, -795, 0, 0, -795,
4766 259, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4767 -146, -795, -795, -795, -795, -795, -795, -795, -795, -795,
4768 -795, -795, -795, 0, 0, 0, 0, -795, -795, -795,
4769 -795, -795, -693, 0, -795, -795, -795, 0, 0, 0,
4770 -693, -693, -693, 0, 0, -693, -693, -693, 0, -693,
4771 0, 0, 0, 0, 0, 0, 0, -693, 0, -693,
4772 -693, -693, 0, 0, 0, 0, 0, 0, 0, -693,
4773 -693, 0, -693, -693, -693, -693, -693, 0, 0, 0,
4774 368, 369, 370, 371, 372, 373, 374, 375, 376, 377,
4775 378, 379, 380, 0, 0, 0, 0, 381, 382, 0,
4776 -693, -693, 0, 0, 0, 0, 0, 0, 0, 0,
4777 -693, -693, -693, -693, -693, -693, -693, -693, -693, -693,
4778 -693, -693, -693, 0, 0, 0, 0, -693, -693, -693,
4779 -693, 0, -693, -693, 0, 0, 0, 384, -693, 385,
4780 386, 387, 388, 389, 390, 391, 392, 393, 394, 0,
4781 0, 0, -693, 0, 0, -693, 0, 0, 0, 0,
4782 0, 0, 0, 0, 0, 0, -693, -693, -693, -693,
4783 -693, -693, -693, -693, -693, -693, -693, -693, -693, 0,
4784 0, 0, 0, 0, -693, -693, -693, -693, -694, 0,
4785 -693, -693, -693, 0, 0, 0, -694, -694, -694, 0,
4786 0, -694, -694, -694, 0, -694, 0, 0, 0, 0,
4787 0, 0, 0, -694, 0, -694, -694, -694, 0, 0,
4788 0, 0, 0, 0, 0, -694, -694, 0, -694, -694,
4789 -694, -694, -694, 0, 0, 0, 0, 0, 0, 0,
4790 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4791 0, 0, 0, 0, 0, 0, -694, -694, 0, 0,
4792 0, 0, 0, 0, 0, 0, -694, -694, -694, -694,
4793 -694, -694, -694, -694, -694, -694, -694, -694, -694, 0,
4794 0, 0, 0, -694, -694, -694, -694, 0, -694, -694,
4795 0, 0, 0, 0, -694, 0, 0, 0, 0, 0,
4796 0, 0, 0, 0, 0, 0, 0, 0, -694, 0,
4797 0, -694, 0, 0, 0, 0, 0, 0, 0, 0,
4798 0, 0, -694, -694, -694, -694, -694, -694, -694, -694,
4799 -694, -694, -694, -694, -694, 0, 0, 0, 0, 0,
4800 -694, -694, -694, -694, -796, 0, -694, -694, -694, 0,
4801 0, 0, -796, -796, -796, 0, 0, -796, -796, -796,
4802 0, -796, 0, 0, 0, 0, 0, 0, 0, -796,
4803 -796, -796, -796, -796, 0, 0, 0, 0, 0, 0,
4804 0, -796, -796, 0, -796, -796, -796, -796, -796, 0,
4805 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4806 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4807 0, 0, -796, -796, 0, 0, 0, 0, 0, 0,
4808 0, 0, -796, -796, -796, -796, -796, -796, -796, -796,
4809 -796, -796, -796, -796, -796, 0, 0, 0, 0, -796,
4810 -796, -796, -796, 0, 0, -796, 0, 0, 0, 0,
4811 -796, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4812 0, 0, 0, 0, -796, 0, 0, -796, 0, 0,
4813 0, 0, 0, 0, 0, 0, 0, 0, 0, -796,
4814 -796, -796, -796, -796, -796, -796, -796, -796, -796, -796,
4815 -796, 0, 0, 0, 0, -796, -796, -796, -796, -796,
4816 -797, 0, -796, -796, -796, 0, 0, 0, -797, -797,
4817 -797, 0, 0, -797, -797, -797, 0, -797, 0, 0,
4818 0, 0, 0, 0, 0, -797, -797, -797, -797, -797,
4819 0, 0, 0, 0, 0, 0, 0, -797, -797, 0,
4820 -797, -797, -797, -797, -797, 0, 0, 0, 0, 0,
4821 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4822 0, 0, 0, 0, 0, 0, 0, 0, -797, -797,
4823 0, 0, 0, 0, 0, 0, 0, 0, -797, -797,
4824 -797, -797, -797, -797, -797, -797, -797, -797, -797, -797,
4825 -797, 0, 0, 0, 0, -797, -797, -797, -797, 0,
4826 0, -797, 0, 0, 0, 0, -797, 0, 0, 0,
4827 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4828 -797, 0, 0, -797, 0, 0, 0, 0, 0, 0,
4829 0, 0, 0, 0, 0, -797, -797, -797, -797, -797,
4830 -797, -797, -797, -797, -797, -797, -797, 0, 0, 0,
4831 0, -797, -797, -797, -797, -797, -509, 0, -797, -797,
4832 -797, 0, 0, 0, -509, -509, -509, 0, 0, -509,
4833 -509, -509, 0, -509, 0, 0, 0, 0, 0, 0,
4834 0, -509, -509, -509, -509, 0, 0, 0, 0, 0,
4835 0, 0, 0, -509, -509, 0, -509, -509, -509, -509,
4836 -509, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4837 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4838 0, 0, 0, 0, -509, -509, 0, 0, 0, 0,
4839 0, 0, 0, 0, -509, -509, -509, -509, -509, -509,
4840 -509, -509, -509, -509, -509, -509, -509, 0, 0, 0,
4841 0, -509, -509, -509, -509, 0, 0, -509, 0, 0,
4842 0, 0, -509, 0, 0, 0, 0, 0, 0, 0,
4843 0, 0, 0, 0, 0, 0, -509, 0, 0, 0,
4844 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4845 0, -509, 0, -509, -509, -509, -509, -509, -509, -509,
4846 -509, -509, -509, 0, 0, 0, 0, -509, -509, -509,
4847 -509, -509, -350, 255, -509, -509, -509, 0, 0, 0,
4848 -350, -350, -350, 0, 0, -350, -350, -350, 0, -350,
4849 0, 0, 0, 0, 0, 0, 0, -350, 0, -350,
4850 -350, -350, 0, 0, 0, 0, 0, 0, 0, -350,
4851 -350, 0, -350, -350, -350, -350, -350, 0, 0, 0,
4852 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4853 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4854 -350, -350, 0, 0, 0, 0, 0, 0, 0, 0,
4855 -350, -350, -350, -350, -350, -350, -350, -350, -350, -350,
4856 -350, -350, -350, 0, 0, 0, 0, -350, -350, -350,
4857 -350, 0, 0, -350, 0, 0, 0, 0, -350, 0,
4858 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4859 0, 0, -350, 0, 0, -350, 0, 0, 0, 0,
4860 0, 0, 0, 0, 0, 0, 0, -350, -350, -350,
4861 -350, -350, -350, -350, -350, -350, -350, -350, -350, 0,
4862 0, 0, 0, 0, -350, -350, -350, -350, -813, 0,
4863 -350, -350, -350, 0, 0, 0, -813, -813, -813, 0,
4864 0, -813, -813, -813, 0, -813, 0, 0, 0, 0,
4865 0, 0, 0, -813, -813, -813, -813, 0, 0, 0,
4866 0, 0, 0, 0, 0, -813, -813, 0, -813, -813,
4867 -813, -813, -813, 0, 0, 0, 0, 0, 0, 0,
4868 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4869 0, 0, 0, 0, 0, 0, -813, -813, 0, 0,
4870 0, 0, 0, 0, 0, 0, -813, -813, -813, -813,
4871 -813, -813, -813, -813, -813, -813, -813, -813, -813, 0,
4872 0, 0, 0, -813, -813, -813, -813, 0, 0, -813,
4873 0, 0, 0, 0, -813, 0, 0, 0, 0, 0,
4874 0, 0, 0, 0, 0, 0, 0, 0, -813, 0,
4875 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4876 0, 0, 0, -813, 0, -813, -813, -813, -813, -813,
4877 -813, -813, -813, -813, -813, 0, 0, 0, 0, -813,
4878 -813, -813, -813, -813, -356, 255, -813, -813, -813, 0,
4879 0, 0, -356, -356, -356, 0, 0, -356, -356, -356,
4880 0, -356, 0, 0, 0, 0, 0, 0, 0, -356,
4881 0, -356, -356, 0, 0, 0, 0, 0, 0, 0,
4882 0, -356, -356, 0, -356, -356, -356, -356, -356, 0,
4883 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4884 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4885 0, 0, -356, -356, 0, 0, 0, 0, 0, 0,
4886 0, 0, -356, -356, -356, -356, -356, -356, -356, -356,
4887 -356, -356, -356, -356, -356, 0, 0, 0, 0, -356,
4888 -356, -356, -356, 0, 878, -356, 0, 0, 0, 0,
4889 -356, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4890 0, 0, 0, 0, -356, 0, 0, 0, 0, 0,
4891 0, 0, 0, 0, 0, 0, 0, 0, -147, -356,
4892 0, -356, -356, -356, -356, -356, -356, -356, -356, -356,
4893 -356, 0, 0, 0, 0, 821, -356, -356, -356, -356,
4894 -363, 0, -356, -356, -356, 0, 0, 0, -363, -363,
4895 -363, 0, 0, -363, -363, -363, 0, -363, 0, 0,
4896 0, 0, 0, 0, 0, -363, 0, -363, -363, 0,
4897 0, 0, 0, 0, 0, 0, 0, -363, -363, 0,
4898 -363, -363, -363, -363, -363, 0, 0, 0, 0, 0,
4899 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4900 0, 0, 0, 0, 0, 0, 0, 0, -363, -363,
4901 0, 0, 0, 0, 0, 0, 0, 0, -363, -363,
4902 -363, -363, -363, -363, -363, -363, -363, -363, -363, -363,
4903 -363, 0, 0, 0, 0, -363, -363, -363, -363, 0,
4904 0, -363, 0, 0, 0, 0, -363, 0, 0, 0,
4905 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4906 -363, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4907 0, 0, 0, 0, 0, -363, 0, -363, -363, -363,
4908 -363, -363, -363, -363, -363, -363, -363, 0, 0, 0,
4909 0, 0, -363, -363, -363, -363, -795, 451, -363, -363,
4910 -363, 0, 0, 0, -795, -795, -795, 937, 0, 0,
4911 -795, -795, 0, -795, 0, 0, 0, 0, 0, 0,
4912 0, -795, -795, 0, 0, 0, 0, 0, 0, 0,
4913 0, 0, 0, -795, -795, 0, -795, -795, -795, -795,
4914 -795, 368, 369, 370, 371, 372, 373, 374, 375, 376,
4915 377, 378, 379, 380, 0, 0, 0, 0, 381, 382,
4916 0, 0, 0, 0, -795, -795, 0, 0, 0, 0,
4917 0, 0, 0, 0, -795, -795, -795, -795, -795, -795,
4918 -795, -795, -795, -795, -795, -795, -795, 0, 0, 0,
4919 0, -795, -795, -795, -795, 0, 819, -795, 384, 0,
4920 385, 386, 387, 388, 389, 390, 391, 392, 393, 394,
4921 0, 0, 0, 0, 0, 0, -795, 0, 0, 0,
4922 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4923 -146, -795, 0, -795, -795, -795, -795, -795, -795, -795,
4924 -795, -795, -795, 0, 0, 0, 0, -795, -795, -795,
4925 -795, -795, -356, 0, -795, 0, -795, 0, 0, 0,
4926 -356, -356, -356, 0, 0, 0, -356, -356, 0, -356,
4927 0, 0, 0, 0, 0, 0, 0, -356, 0, 0,
4928 0, 0, 0, 0, 0, 0, 0, 0, 0, -356,
4929 -356, 0, -356, -356, -356, -356, -356, 0, 0, 0,
4930 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4931 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4932 -356, -356, 0, 0, 0, 0, 0, 0, 0, 0,
4933 -356, -356, -356, -356, -356, -356, -356, -356, -356, -356,
4934 -356, -356, -356, 0, 0, 0, 0, -356, -356, -356,
4935 -356, 0, 820, -356, 0, 0, 0, 0, 0, 0,
4936 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4937 0, 0, -356, 0, 0, 0, 0, 0, 0, 0,
4938 0, 0, 0, 0, 0, 0, -147, -356, 0, -356,
4939 -356, -356, -356, -356, -356, -356, -356, -356, -356, 0,
4940 0, 0, 0, 821, -356, -356, -356, -138, -356, 0,
4941 -356, 0, -356, 0, 0, 0, -356, -356, -356, 0,
4942 0, 0, -356, -356, 0, -356, 0, 0, 0, 0,
4943 0, 0, 0, -356, 0, 0, 0, 0, 0, 0,
4944 0, 0, 0, 0, 0, -356, -356, 0, -356, -356,
4945 -356, -356, -356, 0, 0, 0, 0, 0, 0, 0,
4946 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4947 0, 0, 0, 0, 0, 0, -356, -356, 0, 0,
4948 0, 0, 0, 0, 0, 0, -356, -356, -356, -356,
4949 -356, -356, -356, -356, -356, -356, -356, -356, -356, 0,
4950 0, 0, 0, -356, -356, -356, -356, 0, 820, -356,
4951 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4952 0, 0, 0, 0, 0, 0, 0, 0, -356, 0,
4953 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4954 0, 0, -147, -356, 0, -356, -356, -356, -356, -356,
4955 -356, -356, -356, -356, -356, 0, 0, 0, 0, 821,
4956 -356, -356, -356, -356, 0, 0, -356, 3, -356, 4,
4957 5, 6, 7, 8, -813, -813, -813, 9, 10, 0,
4958 0, -813, 11, 0, 12, 13, 14, 15, 16, 17,
4959 18, 0, 0, 0, 0, 0, 19, 20, 21, 22,
4960 23, 24, 25, 0, 0, 26, 0, 0, 0, 0,
4961 0, 27, 28, 284, 30, 31, 32, 33, 34, 35,
4962 36, 37, 38, 39, 0, 40, 41, 42, 43, 44,
4963 45, 46, 0, 0, -813, 0, 0, 0, 0, 0,
4964 0, 0, 47, 48, 0, 0, 0, 0, 0, 0,
4965 0, 0, 0, 0, 0, 0, 0, 49, 50, 0,
4966 0, 0, 0, 0, 0, 51, 0, 0, 52, 53,
4967 54, 55, 0, 56, 0, 0, 57, 58, 59, 60,
4968 61, 62, 63, 64, 65, 0, 0, 0, 0, 0,
4969 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4970 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4971 0, 0, 0, 66, 67, 68, 0, 0, 0, 3,
4972 -813, 4, 5, 6, 7, 8, -813, 0, -813, 9,
4973 10, 0, -813, -813, 11, 0, 12, 13, 14, 15,
4974 16, 17, 18, 0, 0, 0, 0, 0, 19, 20,
4975 21, 22, 23, 24, 25, 0, 0, 26, 0, 0,
4976 0, 0, 0, 27, 28, 284, 30, 31, 32, 33,
4977 34, 35, 36, 37, 38, 39, 0, 40, 41, 42,
4978 43, 44, 45, 46, 0, 0, -813, 0, 0, 0,
4979 0, 0, 0, 0, 47, 48, 0, 0, 0, 0,
4980 0, 0, 0, 0, 0, 0, 0, 0, 0, 49,
4981 50, 0, 0, 0, 0, 0, 0, 51, 0, 0,
4982 52, 53, 54, 55, 0, 56, 0, 0, 57, 58,
4983 59, 60, 61, 62, 63, 64, 65, 0, 0, 0,
4984 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4985 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4986 0, 0, 0, 0, 0, 66, 67, 68, 0, 0,
4987 0, 3, -813, 4, 5, 6, 7, 8, -813, 0,
4988 -813, 9, 10, 0, 0, -813, 11, -813, 12, 13,
4989 14, 15, 16, 17, 18, 0, 0, 0, 0, 0,
4990 19, 20, 21, 22, 23, 24, 25, 0, 0, 26,
4991 0, 0, 0, 0, 0, 27, 28, 284, 30, 31,
4992 32, 33, 34, 35, 36, 37, 38, 39, 0, 40,
4993 41, 42, 43, 44, 45, 46, 0, 0, -813, 0,
4994 0, 0, 0, 0, 0, 0, 47, 48, 0, 0,
4995 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4996 0, 49, 50, 0, 0, 0, 0, 0, 0, 51,
4997 0, 0, 52, 53, 54, 55, 0, 56, 0, 0,
4998 57, 58, 59, 60, 61, 62, 63, 64, 65, 0,
4999 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5000 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5001 0, 0, 0, 0, 0, 0, 0, 66, 67, 68,
5002 0, 0, 0, 3, -813, 4, 5, 6, 7, 8,
5003 -813, 0, -813, 9, 10, 0, 0, -813, 11, 0,
5004 12, 13, 14, 15, 16, 17, 18, -813, 0, 0,
5005 0, 0, 19, 20, 21, 22, 23, 24, 25, 0,
5006 0, 26, 0, 0, 0, 0, 0, 27, 28, 284,
5007 30, 31, 32, 33, 34, 35, 36, 37, 38, 39,
5008 0, 40, 41, 42, 43, 44, 45, 46, 0, 0,
5009 -813, 0, 0, 0, 0, 0, 0, 0, 47, 48,
5010 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5011 0, 0, 0, 49, 50, 0, 0, 0, 0, 0,
5012 0, 51, 0, 0, 52, 53, 54, 55, 0, 56,
5013 0, 0, 57, 58, 59, 60, 61, 62, 63, 64,
5014 65, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5015 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5016 0, 0, 0, 0, 0, 0, 0, 0, 0, 66,
5017 67, 68, 0, 0, 0, 3, -813, 4, 5, 6,
5018 7, 8, -813, 0, -813, 9, 10, 0, 0, -813,
5019 11, 0, 12, 13, 14, 15, 16, 17, 18, 0,
5020 0, 0, 0, 0, 19, 20, 21, 22, 23, 24,
5021 25, 0, 0, 26, 0, 0, 0, 0, 0, 27,
5022 28, 284, 30, 31, 32, 33, 34, 35, 36, 37,
5023 38, 39, 0, 40, 41, 42, 43, 44, 45, 46,
5024 0, 0, -813, 0, 0, 0, 0, 0, 0, 0,
5025 47, 48, 0, 0, 0, 0, 0, 0, 0, 0,
5026 0, 0, 0, 0, 0, 49, 50, 0, 0, 0,
5027 0, 0, 0, 51, 0, 0, 52, 53, 54, 55,
5028 0, 56, 0, 0, 57, 58, 59, 60, 61, 62,
5029 63, 64, 65, 0, 0, 0, 0, 0, 0, 0,
5030 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5031 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5032 0, 66, 67, 68, 0, 0, 0, 3, -813, 4,
5033 5, 6, 7, 8, -813, -813, -813, 9, 10, 0,
5034 0, 0, 11, 0, 12, 13, 14, 15, 16, 17,
5035 18, 0, 0, 0, 0, 0, 19, 20, 21, 22,
5036 23, 24, 25, 0, 0, 26, 0, 0, 0, 0,
5037 0, 27, 28, 284, 30, 31, 32, 33, 34, 35,
5038 36, 37, 38, 39, 0, 40, 41, 42, 43, 44,
5039 45, 46, 0, 0, -813, 0, 0, 0, 0, 0,
5040 0, 0, 47, 48, 0, 0, 0, 0, 0, 0,
5041 0, 0, 0, 0, 0, 0, 0, 49, 50, 0,
5042 0, 0, 0, 0, 0, 51, 0, 0, 52, 53,
5043 54, 55, 0, 56, 0, 0, 57, 58, 59, 60,
5044 61, 62, 63, 64, 65, 0, 0, 0, 0, 0,
5045 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5046 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5047 0, 0, 0, 66, 67, 68, 0, 0, 0, 3,
5048 -813, 4, 5, 6, 7, 8, -813, 0, -813, 9,
5049 10, 0, 0, 0, 11, 0, 12, 13, 14, 15,
5050 16, 17, 18, 0, 0, 0, 0, 0, 19, 20,
5051 21, 22, 23, 24, 25, 0, 0, 26, 0, 0,
5052 0, 0, 0, 27, 28, 284, 30, 31, 32, 33,
5053 34, 35, 36, 37, 38, 39, 0, 40, 41, 42,
5054 43, 44, 45, 46, 0, 0, -813, 0, 0, 0,
5055 0, 0, 0, 0, 47, 48, 0, 0, 0, 0,
5056 0, 0, 0, 0, 0, 0, 0, 0, 0, 49,
5057 50, 0, 0, 0, 0, 0, 0, 51, 0, 0,
5058 52, 53, 54, 55, 0, 56, 0, 0, 57, 58,
5059 59, 60, 61, 62, 63, 64, 65, 0, 0, 0,
5060 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5061 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5062 0, 0, 0, 0, 0, 66, 67, 68, 0, 0,
5063 0, 3, -813, 4, 5, 6, 7, 8, -813, 0,
5064 0, 9, 10, 0, 0, 0, 11, 0, 12, 13,
5065 14, 15, 16, 17, 18, 0, 0, 0, 0, 0,
5066 19, 20, 21, 22, 23, 24, 25, 0, 0, 26,
5067 0, 0, 0, 0, 0, 27, 28, 284, 30, 31,
5068 32, 33, 34, 35, 36, 37, 38, 39, 0, 40,
5069 41, 42, 43, 44, 45, 46, 0, 0, 0, 0,
5070 0, 0, 0, 0, 0, 0, 47, 48, 0, 0,
5071 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5072 0, 49, 50, 0, 0, 0, 0, 0, 0, 51,
5073 0, 0, 285, 53, 54, 55, 0, 56, 0, 0,
5074 57, 58, 59, 60, 61, 62, 63, 64, 65, 0,
5075 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5076 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5077 0, 0, 0, 0, 0, 0, 0, 66, 67, 68,
5078 0, 0, 0, 0, -813, 0, 0, 0, -813, 3,
5079 -813, 4, 5, 6, 7, 8, 0, 0, 0, 9,
5080 10, 0, 0, 0, 11, 0, 12, 13, 14, 15,
5081 16, 17, 18, 0, 0, 0, 0, 0, 19, 20,
5082 21, 22, 23, 24, 25, 0, 0, 26, 0, 0,
5083 0, 0, 0, 27, 28, 284, 30, 31, 32, 33,
5084 34, 35, 36, 37, 38, 39, 0, 40, 41, 42,
5085 43, 44, 45, 46, 0, 0, 0, 0, 0, 0,
5086 0, 0, 0, 0, 47, 48, 0, 0, 0, 0,
5087 0, 0, 0, 0, 0, 0, 0, 0, 0, 49,
5088 50, 0, 0, 0, 0, 0, 0, 51, 0, 0,
5089 52, 53, 54, 55, 0, 56, 0, 0, 57, 58,
5090 59, 60, 61, 62, 63, 64, 65, 0, 0, 0,
5091 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5092 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5093 0, 0, 0, 0, 0, 66, 67, 68, 0, 0,
5094 0, 0, -813, 0, 0, 0, -813, 3, -813, 4,
5095 5, 6, 7, 8, 0, 0, 0, 9, 10, 0,
5096 0, 0, 11, 0, 12, 13, 14, 15, 16, 17,
5097 18, 0, 0, 0, 0, 0, 19, 20, 21, 22,
5098 23, 24, 25, 0, 0, 26, 0, 0, 0, 0,
5099 0, 27, 28, 29, 30, 31, 32, 33, 34, 35,
5100 36, 37, 38, 39, 0, 40, 41, 42, 43, 44,
5101 45, 46, 0, 0, 0, 0, 0, 0, 0, 0,
5102 0, 0, 47, 48, 0, 0, 0, 0, 0, 0,
5103 0, 0, 0, 0, 0, 0, 0, 49, 50, 0,
5104 0, 0, 0, 0, 0, 51, 0, 0, 52, 53,
5105 54, 55, 0, 56, 0, 0, 57, 58, 59, 60,
5106 61, 62, 63, 64, 65, 0, 0, 0, 0, 0,
5107 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5108 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5109 0, 0, 0, 66, 67, 68, 0, 0, -813, 3,
5110 -813, 4, 5, 6, 7, 8, -813, 0, 0, 9,
5111 10, 0, 0, 0, 11, 0, 12, 13, 14, 15,
5112 16, 17, 18, 0, 0, 0, 0, 0, 19, 20,
5113 21, 22, 23, 24, 25, 0, 0, 26, 0, 0,
5114 0, 0, 0, 27, 28, 284, 30, 31, 32, 33,
5115 34, 35, 36, 37, 38, 39, 0, 40, 41, 42,
5116 43, 44, 45, 46, 0, 0, 0, 0, 0, 0,
5117 0, 0, 0, 0, 47, 48, 0, 0, 0, 0,
5118 0, 0, 0, 0, 0, 0, 0, 0, 0, 49,
5119 50, 0, 0, 0, 0, 0, 0, 51, 0, 0,
5120 52, 53, 54, 55, 0, 56, 0, 0, 57, 58,
5121 59, 60, 61, 62, 63, 64, 65, 0, 0, 0,
5122 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5123 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5124 0, 0, 0, 0, 0, 66, 67, 68, 0, 0,
5125 -813, 404, -813, 4, 5, 6, 0, 8, -813, 0,
5126 0, 9, 10, 0, 0, 0, 11, -3, 12, 13,
5127 14, 15, 16, 17, 18, 0, 0, 0, 0, 0,
5128 19, 20, 21, 22, 23, 24, 25, 0, 0, 26,
5129 0, 0, 0, 0, 0, 0, 28, 0, 0, 31,
5130 32, 33, 34, 35, 36, 37, 38, 39, 0, 40,
5131 41, 42, 43, 44, 45, 46, 0, 0, 0, 0,
5132 0, 0, 0, 0, 0, 0, 47, 48, 0, 0,
5133 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5134 0, 49, 50, 0, 0, 0, 0, 0, 0, 229,
5135 0, 0, 230, 53, 54, 55, 0, 0, 0, 0,
5136 57, 58, 59, 60, 61, 62, 63, 64, 65, 0,
5137 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5138 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5139 0, 0, 0, 0, 0, 0, 0, 66, 67, 68,
5140 0, 0, 0, 0, 331, 0, 0, 0, 0, 0,
5141 332, 144, 145, 146, 147, 148, 149, 150, 151, 152,
5142 153, 154, 155, 156, 157, 158, 159, 160, 161, 162,
5143 163, 164, 165, 166, 167, 0, 0, 0, 168, 169,
5144 170, 434, 435, 436, 437, 175, 176, 177, 0, 0,
5145 0, 0, 0, 178, 179, 180, 181, 438, 439, 440,
5146 441, 186, 36, 37, 442, 39, 0, 0, 0, 0,
5147 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5148 0, 0, 0, 0, 188, 189, 190, 191, 192, 193,
5149 194, 195, 196, 0, 0, 197, 198, 0, 0, 0,
5150 0, 199, 200, 201, 202, 0, 0, 0, 0, 0,
5151 0, 0, 0, 0, 0, 203, 204, 0, 0, 0,
5152 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5153 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5154 0, 0, 0, 0, 0, 205, 206, 207, 208, 209,
5155 210, 211, 212, 213, 214, 0, 215, 216, 0, 0,
5156 0, 0, 0, 0, 217, 443, 144, 145, 146, 147,
5157 148, 149, 150, 151, 152, 153, 154, 155, 156, 157,
5158 158, 159, 160, 161, 162, 163, 164, 165, 166, 167,
5159 0, 0, 0, 168, 169, 170, 171, 172, 173, 174,
5160 175, 176, 177, 0, 0, 0, 0, 0, 178, 179,
5161 180, 181, 182, 183, 184, 185, 186, 36, 37, 187,
5162 39, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5163 0, 0, 0, 0, 0, 0, 0, 0, 0, 188,
5164 189, 190, 191, 192, 193, 194, 195, 196, 0, 0,
5165 197, 198, 0, 0, 0, 0, 199, 200, 201, 202,
5166 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5167 203, 204, 0, 0, 0, 0, 0, 0, 0, 0,
5168 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5169 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5170 205, 206, 207, 208, 209, 210, 211, 212, 213, 214,
5171 0, 215, 216, 0, 0, 0, 0, 0, 0, 217,
5172 144, 145, 146, 147, 148, 149, 150, 151, 152, 153,
5173 154, 155, 156, 157, 158, 159, 160, 161, 162, 163,
5174 164, 165, 166, 167, 0, 0, 0, 168, 169, 170,
5175 171, 172, 173, 174, 175, 176, 177, 0, 0, 0,
5176 0, 0, 178, 179, 180, 181, 182, 183, 184, 185,
5177 186, 262, 0, 187, 0, 0, 0, 0, 0, 0,
5178 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5179 0, 0, 0, 188, 189, 190, 191, 192, 193, 194,
5180 195, 196, 0, 0, 197, 198, 0, 0, 0, 0,
5181 199, 200, 201, 202, 0, 0, 0, 0, 0, 0,
5182 0, 0, 0, 0, 203, 204, 0, 0, 58, 0,
5183 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5184 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5185 0, 0, 0, 0, 205, 206, 207, 208, 209, 210,
5186 211, 212, 213, 214, 0, 215, 216, 0, 0, 0,
5187 0, 0, 0, 217, 144, 145, 146, 147, 148, 149,
5188 150, 151, 152, 153, 154, 155, 156, 157, 158, 159,
5189 160, 161, 162, 163, 164, 165, 166, 167, 0, 0,
5190 0, 168, 169, 170, 171, 172, 173, 174, 175, 176,
5191 177, 0, 0, 0, 0, 0, 178, 179, 180, 181,
5192 182, 183, 184, 185, 186, 0, 0, 187, 0, 0,
5193 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5194 0, 0, 0, 0, 0, 0, 0, 188, 189, 190,
5195 191, 192, 193, 194, 195, 196, 0, 0, 197, 198,
5196 0, 0, 0, 0, 199, 200, 201, 202, 0, 0,
5197 0, 0, 0, 0, 0, 0, 0, 0, 203, 204,
5198 0, 0, 58, 0, 0, 0, 0, 0, 0, 0,
5199 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5200 0, 0, 0, 0, 0, 0, 0, 0, 205, 206,
5201 207, 208, 209, 210, 211, 212, 213, 214, 0, 215,
5202 216, 0, 0, 0, 0, 0, 0, 217, 144, 145,
5203 146, 147, 148, 149, 150, 151, 152, 153, 154, 155,
5204 156, 157, 158, 159, 160, 161, 162, 163, 164, 165,
5205 166, 167, 0, 0, 0, 168, 169, 170, 171, 172,
5206 173, 174, 175, 176, 177, 0, 0, 0, 0, 0,
5207 178, 179, 180, 181, 182, 183, 184, 185, 186, 0,
5208 0, 187, 0, 0, 0, 0, 0, 0, 0, 0,
5209 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5210 0, 188, 189, 190, 191, 192, 193, 194, 195, 196,
5211 0, 0, 197, 198, 0, 0, 0, 0, 199, 200,
5212 201, 202, 0, 0, 0, 0, 0, 0, 0, 0,
5213 0, 0, 203, 204, 0, 0, 0, 0, 0, 0,
5214 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5215 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5216 0, 0, 205, 206, 207, 208, 209, 210, 211, 212,
5217 213, 214, 0, 215, 216, 4, 5, 6, 0, 8,
5218 0, 217, 0, 9, 10, 0, 0, 0, 11, 0,
5219 12, 13, 14, 270, 271, 17, 18, 0, 0, 0,
5220 0, 0, 19, 20, 272, 22, 23, 24, 25, 0,
5221 0, 227, 0, 0, 0, 0, 0, 0, 302, 0,
5222 0, 31, 32, 33, 34, 35, 36, 37, 38, 39,
5223 0, 40, 41, 42, 43, 44, 45, 46, 0, 0,
5224 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5225 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5226 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5227 0, 303, 0, 0, 230, 53, 54, 55, 0, 0,
5228 0, 0, 57, 58, 59, 60, 61, 62, 63, 64,
5229 65, 0, 0, 4, 5, 6, 0, 8, 0, 0,
5230 0, 9, 10, 0, 0, 0, 11, 0, 12, 13,
5231 14, 270, 271, 17, 18, 0, 0, 0, 0, 304,
5232 19, 20, 272, 22, 23, 24, 25, 305, 0, 227,
5233 0, 0, 0, 0, 0, 0, 302, 0, 0, 31,
5234 32, 33, 34, 35, 36, 37, 38, 39, 0, 40,
5235 41, 42, 43, 44, 45, 46, 0, 0, 0, 0,
5236 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5237 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5238 0, 0, 0, 0, 0, 0, 0, 0, 0, 303,
5239 0, 0, 230, 53, 54, 55, 0, 0, 0, 0,
5240 57, 58, 59, 60, 61, 62, 63, 64, 65, 0,
5241 0, 4, 5, 6, 0, 8, 0, 0, 0, 9,
5242 10, 0, 0, 0, 11, 0, 12, 13, 14, 15,
5243 16, 17, 18, 0, 0, 0, 0, 304, 19, 20,
5244 21, 22, 23, 24, 25, 608, 0, 227, 0, 0,
5245 0, 0, 0, 0, 28, 0, 0, 31, 32, 33,
5246 34, 35, 36, 37, 38, 39, 228, 40, 41, 42,
5247 43, 44, 45, 46, 0, 0, 0, 0, 0, 0,
5248 0, 0, 0, 0, 47, 48, 0, 0, 0, 0,
5249 0, 0, 0, 0, 0, 0, 0, 0, 0, 49,
5250 50, 0, 0, 0, 0, 0, 0, 229, 0, 0,
5251 230, 53, 54, 55, 0, 231, 232, 233, 57, 58,
5252 234, 60, 61, 62, 63, 64, 65, 0, 0, 0,
5253 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5254 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5255 4, 5, 6, 0, 8, 66, 235, 68, 9, 10,
5256 0, 0, 259, 11, 0, 12, 13, 14, 15, 16,
5257 17, 18, 0, 0, 0, 0, 0, 19, 20, 21,
5258 22, 23, 24, 25, 0, 0, 26, 0, 0, 0,
5259 0, 0, 0, 28, 0, 0, 31, 32, 33, 34,
5260 35, 36, 37, 38, 39, 0, 40, 41, 42, 43,
5261 44, 45, 46, 0, 0, 0, 0, 0, 0, 0,
5262 0, 0, 0, 47, 48, 0, 0, 0, 0, 0,
5263 0, 0, 0, 0, 0, 0, 0, 0, 49, 50,
5264 0, 0, 0, 0, 0, 0, 229, 0, 0, 230,
5265 53, 54, 55, 0, 0, 0, 0, 57, 58, 59,
5266 60, 61, 62, 63, 64, 65, 0, 0, 0, 0,
5267 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5268 0, 0, 0, 0, 0, 0, 0, 3, 0, 4,
5269 5, 6, 7, 8, 66, 67, 68, 9, 10, 0,
5270 0, 259, 11, 0, 12, 13, 14, 15, 16, 17,
5271 18, 0, 0, 0, 0, 0, 19, 20, 21, 22,
5272 23, 24, 25, 0, 0, 26, 0, 0, 0, 0,
5273 0, 27, 28, 0, 30, 31, 32, 33, 34, 35,
5274 36, 37, 38, 39, 0, 40, 41, 42, 43, 44,
5275 45, 46, 0, 0, 0, 0, 0, 0, 0, 0,
5276 0, 0, 47, 48, 0, 0, 0, 0, 0, 0,
5277 0, 0, 0, 0, 0, 0, 0, 49, 50, 0,
5278 0, 0, 0, 0, 0, 51, 0, 0, 52, 53,
5279 54, 55, 0, 56, 0, 0, 57, 58, 59, 60,
5280 61, 62, 63, 64, 65, 0, 0, 404, 0, 4,
5281 5, 6, 0, 8, 0, 0, 0, 9, 10, 0,
5282 0, 0, 11, 0, 12, 13, 14, 15, 16, 17,
5283 18, 0, 0, 66, 67, 68, 19, 20, 21, 22,
5284 23, 24, 25, 0, 0, 26, 0, 0, 0, 0,
5285 0, 0, 28, 0, 0, 31, 32, 33, 34, 35,
5286 36, 37, 38, 39, 0, 40, 41, 42, 43, 44,
5287 45, 46, 0, 0, 0, 0, 0, 0, 0, 0,
5288 0, 0, 47, 48, 0, 0, 0, 0, 0, 0,
5289 0, 0, 0, 0, 0, 0, 0, 49, 50, 0,
5290 0, 0, 0, 0, 0, 229, 0, 0, 230, 53,
5291 54, 55, 0, 0, 0, 0, 57, 58, 59, 60,
5292 61, 62, 63, 64, 65, 0, 0, 0, 0, 4,
5293 5, 6, 0, 8, 0, 0, 0, 9, 10, 0,
5294 0, 0, 11, 0, 12, 13, 14, 15, 16, 17,
5295 18, 0, 0, 66, 67, 68, 19, 20, 21, 22,
5296 23, 24, 25, 0, 0, 227, 0, 0, 0, 0,
5297 0, 0, 28, 0, 0, 31, 32, 33, 34, 35,
5298 36, 37, 38, 39, 228, 40, 41, 42, 43, 44,
5299 45, 46, 0, 0, 0, 0, 0, 0, 0, 0,
5300 0, 0, 47, 48, 0, 0, 0, 0, 0, 0,
5301 0, 0, 0, 0, 0, 0, 0, 49, 50, 0,
5302 0, 0, 0, 0, 0, 229, 0, 0, 230, 53,
5303 54, 55, 0, 231, 232, 233, 57, 58, 234, 60,
5304 61, 62, 63, 64, 65, 0, 0, 0, 0, 4,
5305 5, 6, 0, 8, 0, 0, 0, 9, 10, 0,
5306 0, 0, 11, 0, 12, 13, 14, 15, 16, 17,
5307 18, 0, 0, 66, 235, 68, 19, 20, 21, 22,
5308 23, 24, 25, 0, 0, 227, 0, 0, 0, 0,
5309 0, 0, 28, 0, 0, 31, 32, 33, 34, 35,
5310 36, 37, 38, 39, 228, 40, 41, 42, 43, 44,
5311 45, 46, 0, 0, 0, 0, 0, 0, 0, 0,
5312 0, 0, 47, 48, 0, 0, 0, 0, 0, 0,
5313 0, 0, 0, 0, 0, 0, 0, 49, 479, 0,
5314 0, 0, 0, 0, 0, 229, 0, 0, 230, 53,
5315 54, 55, 0, 231, 232, 233, 57, 58, 234, 60,
5316 61, 62, 63, 64, 65, 0, 0, 0, 0, 4,
5317 5, 6, 0, 8, 0, 0, 0, 9, 10, 0,
5318 0, 0, 11, 0, 12, 13, 14, 270, 271, 17,
5319 18, 0, 0, 66, 235, 68, 19, 20, 272, 22,
5320 23, 24, 25, 0, 0, 227, 0, 0, 0, 0,
5321 0, 0, 28, 0, 0, 31, 32, 33, 34, 35,
5322 36, 37, 38, 39, 228, 40, 41, 42, 43, 44,
5323 45, 46, 0, 0, 0, 0, 0, 0, 0, 0,
5324 0, 0, 47, 48, 0, 0, 0, 0, 0, 0,
5325 0, 0, 0, 0, 0, 0, 0, 49, 50, 0,
5326 0, 0, 0, 0, 0, 229, 0, 0, 230, 53,
5327 54, 55, 0, 231, 232, 233, 57, 58, 234, 60,
5328 61, 62, 63, 64, 65, 0, 0, 0, 0, 4,
5329 5, 6, 0, 8, 0, 0, 0, 9, 10, 0,
5330 0, 0, 11, 0, 12, 13, 14, 270, 271, 17,
5331 18, 0, 0, 66, 235, 68, 19, 20, 272, 22,
5332 23, 24, 25, 0, 0, 227, 0, 0, 0, 0,
5333 0, 0, 28, 0, 0, 31, 32, 33, 34, 35,
5334 36, 37, 38, 39, 228, 40, 41, 42, 43, 44,
5335 45, 46, 0, 0, 0, 0, 0, 0, 0, 0,
5336 0, 0, 47, 48, 0, 0, 0, 0, 0, 0,
5337 0, 0, 0, 0, 0, 0, 0, 49, 479, 0,
5338 0, 0, 0, 0, 0, 229, 0, 0, 230, 53,
5339 54, 55, 0, 231, 232, 233, 57, 58, 234, 60,
5340 61, 62, 63, 64, 65, 0, 0, 0, 0, 4,
5341 5, 6, 0, 8, 0, 0, 0, 9, 10, 0,
5342 0, 0, 11, 0, 12, 13, 14, 270, 271, 17,
5343 18, 0, 0, 66, 235, 68, 19, 20, 272, 22,
5344 23, 24, 25, 0, 0, 227, 0, 0, 0, 0,
5345 0, 0, 28, 0, 0, 31, 32, 33, 34, 35,
5346 36, 37, 38, 39, 228, 40, 41, 42, 43, 44,
5347 45, 46, 0, 0, 0, 0, 0, 0, 0, 0,
5348 0, 0, 47, 48, 0, 0, 0, 0, 0, 0,
5349 0, 0, 0, 0, 0, 0, 0, 49, 50, 0,
5350 0, 0, 0, 0, 0, 229, 0, 0, 230, 53,
5351 54, 55, 0, 231, 232, 0, 57, 58, 234, 60,
5352 61, 62, 63, 64, 65, 0, 0, 0, 0, 4,
5353 5, 6, 0, 8, 0, 0, 0, 9, 10, 0,
5354 0, 0, 11, 0, 12, 13, 14, 270, 271, 17,
5355 18, 0, 0, 66, 235, 68, 19, 20, 272, 22,
5356 23, 24, 25, 0, 0, 227, 0, 0, 0, 0,
5357 0, 0, 28, 0, 0, 31, 32, 33, 34, 35,
5358 36, 37, 38, 39, 228, 40, 41, 42, 43, 44,
5359 45, 46, 0, 0, 0, 0, 0, 0, 0, 0,
5360 0, 0, 47, 48, 0, 0, 0, 0, 0, 0,
5361 0, 0, 0, 0, 0, 0, 0, 49, 50, 0,
5362 0, 0, 0, 0, 0, 229, 0, 0, 230, 53,
5363 54, 55, 0, 0, 232, 233, 57, 58, 234, 60,
5364 61, 62, 63, 64, 65, 0, 0, 0, 0, 4,
5365 5, 6, 0, 8, 0, 0, 0, 9, 10, 0,
5366 0, 0, 11, 0, 12, 13, 14, 270, 271, 17,
5367 18, 0, 0, 66, 235, 68, 19, 20, 272, 22,
5368 23, 24, 25, 0, 0, 227, 0, 0, 0, 0,
5369 0, 0, 28, 0, 0, 31, 32, 33, 34, 35,
5370 36, 37, 38, 39, 228, 40, 41, 42, 43, 44,
5371 45, 46, 0, 0, 0, 0, 0, 0, 0, 0,
5372 0, 0, 47, 48, 0, 0, 0, 0, 0, 0,
5373 0, 0, 0, 0, 0, 0, 0, 49, 50, 0,
5374 0, 0, 0, 0, 0, 229, 0, 0, 230, 53,
5375 54, 55, 0, 0, 232, 0, 57, 58, 234, 60,
5376 61, 62, 63, 64, 65, 0, 0, 0, 0, 4,
5377 5, 6, 0, 8, 0, 0, 0, 9, 10, 0,
5378 0, 0, 11, 0, 12, 13, 14, 15, 16, 17,
5379 18, 0, 0, 66, 235, 68, 19, 20, 21, 22,
5380 23, 24, 25, 0, 0, 227, 0, 0, 0, 0,
5381 0, 0, 28, 0, 0, 31, 32, 33, 34, 35,
5382 36, 37, 38, 39, 0, 40, 41, 42, 43, 44,
5383 45, 46, 0, 0, 0, 0, 0, 0, 0, 0,
5384 0, 0, 47, 48, 0, 0, 0, 0, 0, 0,
5385 0, 0, 0, 0, 0, 0, 0, 49, 50, 0,
5386 0, 0, 0, 0, 0, 229, 0, 0, 230, 53,
5387 54, 55, 0, 794, 0, 0, 57, 58, 59, 60,
5388 61, 62, 63, 64, 65, 0, 0, 0, 0, 4,
5389 5, 6, 0, 8, 0, 0, 0, 9, 10, 0,
5390 0, 0, 11, 0, 12, 13, 14, 15, 16, 17,
5391 18, 0, 0, 66, 235, 68, 19, 20, 21, 22,
5392 23, 24, 25, 0, 0, 227, 0, 0, 0, 0,
5393 0, 0, 28, 0, 0, 31, 32, 33, 34, 35,
5394 36, 37, 38, 39, 0, 40, 41, 42, 43, 44,
5395 45, 46, 0, 0, 0, 0, 0, 0, 0, 0,
5396 0, 0, 47, 48, 0, 0, 0, 0, 0, 0,
5397 0, 0, 0, 0, 0, 0, 0, 49, 50, 0,
5398 0, 0, 0, 0, 0, 805, 0, 0, 230, 53,
5399 54, 55, 0, 794, 0, 0, 57, 58, 59, 60,
5400 61, 62, 63, 64, 65, 0, 0, 0, 0, 4,
5401 5, 6, 0, 8, 0, 0, 0, 9, 10, 0,
5402 0, 0, 11, 0, 12, 13, 14, 270, 271, 17,
5403 18, 0, 0, 66, 235, 68, 19, 20, 272, 22,
5404 23, 24, 25, 0, 0, 227, 0, 0, 0, 0,
5405 0, 0, 28, 0, 0, 31, 32, 33, 34, 35,
5406 36, 37, 38, 39, 0, 40, 41, 42, 43, 44,
5407 45, 46, 0, 0, 0, 0, 0, 0, 0, 0,
5408 0, 0, 47, 48, 0, 0, 0, 0, 0, 0,
5409 0, 0, 0, 0, 0, 0, 0, 49, 50, 0,
5410 0, 0, 0, 0, 0, 229, 0, 0, 230, 53,
5411 54, 55, 0, 966, 0, 0, 57, 58, 59, 60,
5412 61, 62, 63, 64, 65, 0, 0, 0, 0, 4,
5413 5, 6, 0, 8, 0, 0, 0, 9, 10, 0,
5414 0, 0, 11, 0, 12, 13, 14, 270, 271, 17,
5415 18, 0, 0, 66, 235, 68, 19, 20, 272, 22,
5416 23, 24, 25, 0, 0, 227, 0, 0, 0, 0,
5417 0, 0, 28, 0, 0, 31, 32, 33, 34, 35,
5418 36, 37, 38, 39, 0, 40, 41, 42, 43, 44,
5419 45, 46, 0, 0, 0, 0, 0, 0, 0, 0,
5420 0, 0, 47, 48, 0, 0, 0, 0, 0, 0,
5421 0, 0, 0, 0, 0, 0, 0, 49, 50, 0,
5422 0, 0, 0, 0, 0, 229, 0, 0, 230, 53,
5423 54, 55, 0, 1015, 0, 0, 57, 58, 59, 60,
5424 61, 62, 63, 64, 65, 0, 0, 0, 0, 4,
5425 5, 6, 0, 8, 0, 0, 0, 9, 10, 0,
5426 0, 0, 11, 0, 12, 13, 14, 270, 271, 17,
5427 18, 0, 0, 66, 235, 68, 19, 20, 272, 22,
5428 23, 24, 25, 0, 0, 227, 0, 0, 0, 0,
5429 0, 0, 28, 0, 0, 31, 32, 33, 34, 35,
5430 36, 37, 38, 39, 0, 40, 41, 42, 43, 44,
5431 45, 46, 0, 0, 0, 0, 0, 0, 0, 0,
5432 0, 0, 47, 48, 0, 0, 0, 0, 0, 0,
5433 0, 0, 0, 0, 0, 0, 0, 49, 50, 0,
5434 0, 0, 0, 0, 0, 229, 0, 0, 230, 53,
5435 54, 55, 0, 794, 0, 0, 57, 58, 59, 60,
5436 61, 62, 63, 64, 65, 0, 0, 0, 0, 4,
5437 5, 6, 0, 8, 0, 0, 0, 9, 10, 0,
5438 0, 0, 11, 0, 12, 13, 14, 270, 271, 17,
5439 18, 0, 0, 66, 235, 68, 19, 20, 272, 22,
5440 23, 24, 25, 0, 0, 227, 0, 0, 0, 0,
5441 0, 0, 28, 0, 0, 31, 32, 33, 34, 35,
5442 36, 37, 38, 39, 0, 40, 41, 42, 43, 44,
5443 45, 46, 0, 0, 0, 0, 0, 0, 0, 0,
5444 0, 0, 47, 48, 0, 0, 0, 0, 0, 0,
5445 0, 0, 0, 0, 0, 0, 0, 49, 50, 0,
5446 0, 0, 0, 0, 0, 229, 0, 0, 230, 53,
5447 54, 55, 0, 1135, 0, 0, 57, 58, 59, 60,
5448 61, 62, 63, 64, 65, 0, 0, 0, 0, 4,
5449 5, 6, 0, 8, 0, 0, 0, 9, 10, 0,
5450 0, 0, 11, 0, 12, 13, 14, 270, 271, 17,
5451 18, 0, 0, 66, 235, 68, 19, 20, 272, 22,
5452 23, 24, 25, 0, 0, 227, 0, 0, 0, 0,
5453 0, 0, 28, 0, 0, 31, 32, 33, 34, 35,
5454 36, 37, 38, 39, 0, 40, 41, 42, 43, 44,
5455 45, 46, 0, 0, 0, 0, 0, 0, 0, 0,
5456 0, 0, 47, 48, 0, 0, 0, 0, 0, 0,
5457 0, 0, 0, 0, 0, 0, 0, 49, 50, 0,
5458 0, 0, 0, 0, 0, 229, 0, 0, 230, 53,
5459 54, 55, 0, 0, 0, 0, 57, 58, 59, 60,
5460 61, 62, 63, 64, 65, 0, 0, 0, 0, 4,
5461 5, 6, 0, 8, 0, 0, 0, 9, 10, 0,
5462 0, 0, 11, 0, 12, 13, 14, 15, 16, 17,
5463 18, 0, 0, 66, 235, 68, 19, 20, 21, 22,
5464 23, 24, 25, 0, 0, 227, 0, 0, 0, 0,
5465 0, 0, 28, 0, 0, 31, 32, 33, 34, 35,
5466 36, 37, 38, 39, 0, 40, 41, 42, 43, 44,
5467 45, 46, 0, 0, 0, 0, 0, 0, 0, 0,
5468 0, 0, 47, 48, 0, 0, 0, 0, 0, 0,
5469 0, 0, 0, 0, 0, 0, 0, 49, 50, 0,
5470 0, 0, 0, 0, 0, 229, 0, 0, 230, 53,
5471 54, 55, 0, 0, 0, 0, 57, 58, 59, 60,
5472 61, 62, 63, 64, 65, 0, 0, 0, 0, 4,
5473 5, 6, 0, 8, 0, 0, 0, 9, 10, 0,
5474 0, 0, 11, 0, 12, 13, 14, 15, 16, 17,
5475 18, 0, 0, 66, 235, 68, 19, 20, 21, 22,
5476 23, 24, 25, 0, 0, 26, 0, 0, 0, 0,
5477 0, 0, 28, 0, 0, 31, 32, 33, 34, 35,
5478 36, 37, 38, 39, 0, 40, 41, 42, 43, 44,
5479 45, 46, 0, 0, 0, 0, 0, 0, 0, 0,
5480 0, 0, 47, 48, 0, 0, 0, 0, 0, 0,
5481 0, 0, 0, 0, 0, 0, 0, 49, 50, 0,
5482 0, 0, 0, 0, 0, 229, 0, 0, 230, 53,
5483 54, 55, 0, 0, 0, 0, 57, 58, 59, 60,
5484 61, 62, 63, 64, 65, 0, 0, 0, 0, 4,
5485 5, 6, 0, 8, 0, 0, 0, 9, 10, 0,
5486 0, 0, 11, 0, 12, 13, 14, 15, 16, 17,
5487 18, 0, 0, 66, 67, 68, 19, 20, 21, 22,
5488 23, 24, 25, 0, 0, 776, 0, 0, 0, 0,
5489 0, 0, 28, 0, 0, 31, 32, 33, 34, 35,
5490 36, 37, 38, 39, 0, 40, 41, 42, 43, 44,
5491 45, 46, 0, 0, 0, 0, 0, 0, 0, 0,
5492 0, 0, 47, 48, 0, 0, 0, 0, 0, 0,
5493 0, 0, 0, 0, 0, 0, 0, 49, 50, 0,
5494 0, 0, 0, 0, 0, 229, 0, 0, 230, 53,
5495 54, 55, 0, 0, 0, 0, 57, 58, 59, 60,
5496 61, 62, 63, 64, 65, 0, 0, 0, 0, 4,
5497 5, 6, 0, 8, 0, 0, 0, 9, 10, 0,
5498 0, 0, 11, 0, 12, 13, 14, 15, 16, 17,
5499 18, 0, 0, 66, 235, 68, 19, 20, 21, 22,
5500 23, 24, 25, 0, 0, 227, 0, 0, 0, 0,
5501 0, 0, 28, 0, 0, 31, 32, 33, 34, 35,
5502 36, 37, 38, 39, 0, 40, 41, 42, 43, 44,
5503 45, 46, 0, 0, 0, 0, 0, 0, 0, 0,
5504 0, 0, 47, 48, 0, 0, 0, 0, 0, 0,
5505 0, 0, 0, 0, 0, 0, 0, 49, 50, 0,
5506 0, 0, 0, 0, 0, 805, 0, 0, 230, 53,
5507 54, 55, 0, 0, 0, 0, 57, 58, 59, 60,
5508 61, 62, 63, 64, 65, 0, 0, 0, 0, 4,
5509 5, 6, 0, 8, 0, 0, 0, 9, 10, 0,
5510 0, 0, 11, 0, 12, 13, 14, 270, 271, 17,
5511 18, 0, 0, 66, 235, 68, 19, 20, 272, 22,
5512 23, 24, 25, 0, 0, 885, 0, 0, 0, 0,
5513 0, 0, 28, 0, 0, 31, 32, 33, 34, 35,
5514 36, 37, 38, 39, 0, 40, 41, 42, 43, 44,
5515 45, 46, 0, 0, 0, 0, 0, 0, 0, 0,
5516 0, 0, 47, 48, 0, 0, 0, 0, 0, 0,
5517 0, 0, 0, 0, 0, 0, 0, 49, 50, 0,
5518 0, 0, 0, 0, 0, 229, 0, 0, 230, 53,
5519 54, 55, 0, 0, 0, 0, 57, 58, 59, 60,
5520 61, 62, 63, 64, 65, 0, 0, 0, 0, 4,
5521 5, 6, 0, 8, 0, 0, 0, 9, 10, 0,
5522 0, 0, 11, 0, 12, 13, 14, 270, 271, 17,
5523 18, 0, 0, 66, 235, 68, 19, 20, 272, 22,
5524 23, 24, 25, 0, 0, 227, 0, 0, 0, 0,
5525 0, 0, 302, 0, 0, 31, 32, 33, 34, 35,
5526 36, 37, 38, 39, 0, 40, 41, 42, 43, 44,
5527 45, 46, 0, 0, 0, 0, 0, 0, 0, 0,
5528 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5529 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5530 0, 0, 0, 0, 0, 303, 0, 0, 363, 53,
5531 54, 55, 0, 364, 0, 0, 57, 58, 59, 60,
5532 61, 62, 63, 64, 65, 0, 0, 4, 5, 6,
5533 0, 8, 0, 0, 0, 9, 10, 0, 0, 0,
5534 11, 0, 12, 13, 14, 270, 271, 17, 18, 0,
5535 0, 0, 0, 304, 19, 20, 272, 22, 23, 24,
5536 25, 0, 0, 227, 0, 0, 0, 0, 0, 0,
5537 302, 0, 0, 31, 32, 33, 34, 35, 36, 37,
5538 38, 39, 0, 40, 41, 42, 43, 44, 45, 46,
5539 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5540 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5541 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5542 0, 0, 0, 415, 0, 0, 52, 53, 54, 55,
5543 0, 56, 0, 0, 57, 58, 59, 60, 61, 62,
5544 63, 64, 65, 0, 0, 4, 5, 6, 0, 8,
5545 0, 0, 0, 9, 10, 0, 0, 0, 11, 0,
5546 12, 13, 14, 270, 271, 17, 18, 0, 0, 0,
5547 0, 304, 19, 20, 272, 22, 23, 24, 25, 0,
5548 0, 227, 0, 0, 0, 0, 0, 0, 302, 0,
5549 0, 31, 32, 33, 423, 35, 36, 37, 424, 39,
5550 0, 40, 41, 42, 43, 44, 45, 46, 0, 0,
5551 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5552 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5553 0, 0, 0, 0, 0, 0, 0, 425, 0, 0,
5554 0, 426, 0, 0, 230, 53, 54, 55, 0, 0,
5555 0, 0, 57, 58, 59, 60, 61, 62, 63, 64,
5556 65, 0, 0, 4, 5, 6, 0, 8, 0, 0,
5557 0, 9, 10, 0, 0, 0, 11, 0, 12, 13,
5558 14, 270, 271, 17, 18, 0, 0, 0, 0, 304,
5559 19, 20, 272, 22, 23, 24, 25, 0, 0, 227,
5560 0, 0, 0, 0, 0, 0, 302, 0, 0, 31,
5561 32, 33, 423, 35, 36, 37, 424, 39, 0, 40,
5562 41, 42, 43, 44, 45, 46, 0, 0, 0, 0,
5563 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5564 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5565 0, 0, 0, 0, 0, 0, 0, 0, 0, 426,
5566 0, 0, 230, 53, 54, 55, 0, 0, 0, 0,
5567 57, 58, 59, 60, 61, 62, 63, 64, 65, 0,
5568 0, 4, 5, 6, 0, 8, 0, 0, 0, 9,
5569 10, 0, 0, 0, 11, 0, 12, 13, 14, 270,
5570 271, 17, 18, 0, 0, 0, 0, 304, 19, 20,
5571 272, 22, 23, 24, 25, 0, 0, 227, 0, 0,
5572 0, 0, 0, 0, 302, 0, 0, 31, 32, 33,
5573 34, 35, 36, 37, 38, 39, 0, 40, 41, 42,
5574 43, 44, 45, 46, 0, 0, 0, 0, 0, 0,
5575 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5576 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5577 0, 0, 0, 0, 0, 0, 0, 303, 0, 0,
5578 363, 53, 54, 55, 0, 0, 0, 0, 57, 58,
5579 59, 60, 61, 62, 63, 64, 65, 0, 0, 4,
5580 5, 6, 0, 8, 0, 0, 0, 9, 10, 0,
5581 0, 0, 11, 0, 12, 13, 14, 270, 271, 17,
5582 18, 0, 0, 0, 0, 304, 19, 20, 272, 22,
5583 23, 24, 25, 0, 0, 227, 0, 0, 0, 0,
5584 0, 0, 302, 0, 0, 31, 32, 33, 34, 35,
5585 36, 37, 38, 39, 0, 40, 41, 42, 43, 44,
5586 45, 46, 0, 0, 0, 0, 0, 0, 0, 0,
5587 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5588 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5589 0, 0, 0, 0, 0, 1191, 0, 0, 230, 53,
5590 54, 55, 0, 0, 0, 0, 57, 58, 59, 60,
5591 61, 62, 63, 64, 65, 0, 0, 4, 5, 6,
5592 0, 8, 0, 0, 0, 9, 10, 0, 0, 0,
5593 11, 0, 12, 13, 14, 270, 271, 17, 18, 0,
5594 0, 0, 0, 304, 19, 20, 272, 22, 23, 24,
5595 25, 0, 0, 227, 0, 0, 0, 0, 0, 0,
5596 302, 0, 0, 31, 32, 33, 34, 35, 36, 37,
5597 38, 39, 0, 40, 41, 42, 43, 44, 45, 46,
5598 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5599 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5600 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5601 0, 0, 0, 1290, 0, 0, 230, 53, 54, 55,
5602 22, 23, 24, 25, 57, 58, 59, 60, 61, 62,
5603 63, 64, 65, 0, 0, 0, 31, 32, 33, 1078,
5604 0, 0, 0, 1079, 0, 0, 40, 41, 42, 43,
5605 44, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5606 0, 304, 0, 0, 0, 0, 0, 0, 0, 0,
5607 0, 0, 0, 0, 0, 0, 0, 0, 1081, 1082,
5608 0, 0, 0, 0, 0, 0, 1083, 0, 0, 1084,
5609 0, 1085, 1086, 0, 0, 0, 0, 57, 58, 59,
5610 60, 61, 62, 63, 64, 65, 0, 0, 0, 0,
5611 0, 638, 639, 0, 0, 640, 0, 0, 0, 0,
5612 0, 0, 0, 0, 0, 0, 0, 1089, 0, 0,
5613 0, 0, 0, 0, 304, 188, 189, 190, 191, 192,
5614 193, 194, 195, 196, 0, 0, 197, 198, 0, 0,
5615 0, 0, 199, 200, 201, 202, 0, 0, 0, 0,
5616 0, 0, 0, 0, 0, 0, 203, 204, 0, 0,
5617 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5618 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5619 0, 0, 0, 0, 0, 0, 205, 206, 207, 208,
5620 209, 210, 211, 212, 213, 214, 0, 215, 216, 646,
5621 647, 0, 0, 648, 0, 217, 0, 0, 0, 0,
5622 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5623 0, 0, 0, 188, 189, 190, 191, 192, 193, 194,
5624 195, 196, 0, 0, 197, 198, 0, 0, 0, 0,
5625 199, 200, 201, 202, 0, 0, 0, 0, 0, 0,
5626 0, 0, 0, 0, 203, 204, 0, 0, 0, 0,
5627 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5628 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5629 0, 0, 0, 0, 205, 206, 207, 208, 209, 210,
5630 211, 212, 213, 214, 0, 215, 216, 685, 647, 0,
5631 0, 686, 0, 217, 0, 0, 0, 0, 0, 0,
5632 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5633 0, 188, 189, 190, 191, 192, 193, 194, 195, 196,
5634 0, 0, 197, 198, 0, 0, 0, 0, 199, 200,
5635 201, 202, 0, 0, 0, 0, 0, 0, 0, 0,
5636 0, 0, 203, 204, 0, 0, 0, 0, 0, 0,
5637 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5638 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5639 0, 0, 205, 206, 207, 208, 209, 210, 211, 212,
5640 213, 214, 0, 215, 216, 699, 639, 0, 0, 700,
5641 0, 217, 0, 0, 0, 0, 0, 0, 0, 0,
5642 0, 0, 0, 0, 0, 0, 0, 0, 0, 188,
5643 189, 190, 191, 192, 193, 194, 195, 196, 0, 0,
5644 197, 198, 0, 0, 0, 0, 199, 200, 201, 202,
5645 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5646 203, 204, 0, 0, 0, 0, 0, 0, 0, 0,
5647 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5648 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5649 205, 206, 207, 208, 209, 210, 211, 212, 213, 214,
5650 0, 215, 216, 702, 647, 0, 0, 703, 0, 217,
5651 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5652 0, 0, 0, 0, 0, 0, 0, 188, 189, 190,
5653 191, 192, 193, 194, 195, 196, 0, 0, 197, 198,
5654 0, 0, 0, 0, 199, 200, 201, 202, 0, 0,
5655 0, 0, 0, 0, 0, 0, 0, 0, 203, 204,
5656 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5657 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5658 0, 0, 0, 0, 0, 0, 0, 0, 205, 206,
5659 207, 208, 209, 210, 211, 212, 213, 214, 0, 215,
5660 216, 699, 639, 0, 0, 719, 0, 217, 0, 0,
5661 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5662 0, 0, 0, 0, 0, 188, 189, 190, 191, 192,
5663 193, 194, 195, 196, 0, 0, 197, 198, 0, 0,
5664 0, 0, 199, 200, 201, 202, 0, 0, 0, 0,
5665 0, 0, 0, 0, 0, 0, 203, 204, 0, 0,
5666 0, 0, 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, 205, 206, 207, 208,
5669 209, 210, 211, 212, 213, 214, 0, 215, 216, 730,
5670 639, 0, 0, 731, 0, 217, 0, 0, 0, 0,
5671 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5672 0, 0, 0, 188, 189, 190, 191, 192, 193, 194,
5673 195, 196, 0, 0, 197, 198, 0, 0, 0, 0,
5674 199, 200, 201, 202, 0, 0, 0, 0, 0, 0,
5675 0, 0, 0, 0, 203, 204, 0, 0, 0, 0,
5676 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5677 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5678 0, 0, 0, 0, 205, 206, 207, 208, 209, 210,
5679 211, 212, 213, 214, 0, 215, 216, 733, 647, 0,
5680 0, 734, 0, 217, 0, 0, 0, 0, 0, 0,
5681 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5682 0, 188, 189, 190, 191, 192, 193, 194, 195, 196,
5683 0, 0, 197, 198, 0, 0, 0, 0, 199, 200,
5684 201, 202, 0, 0, 0, 0, 0, 0, 0, 0,
5685 0, 0, 203, 204, 0, 0, 0, 0, 0, 0,
5686 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5687 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5688 0, 0, 205, 206, 207, 208, 209, 210, 211, 212,
5689 213, 214, 0, 215, 216, 849, 639, 0, 0, 850,
5690 0, 217, 0, 0, 0, 0, 0, 0, 0, 0,
5691 0, 0, 0, 0, 0, 0, 0, 0, 0, 188,
5692 189, 190, 191, 192, 193, 194, 195, 196, 0, 0,
5693 197, 198, 0, 0, 0, 0, 199, 200, 201, 202,
5694 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5695 203, 204, 0, 0, 0, 0, 0, 0, 0, 0,
5696 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5697 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5698 205, 206, 207, 208, 209, 210, 211, 212, 213, 214,
5699 0, 215, 216, 852, 647, 0, 0, 853, 0, 217,
5700 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5701 0, 0, 0, 0, 0, 0, 0, 188, 189, 190,
5702 191, 192, 193, 194, 195, 196, 0, 0, 197, 198,
5703 0, 0, 0, 0, 199, 200, 201, 202, 0, 0,
5704 0, 0, 0, 0, 0, 0, 0, 0, 203, 204,
5705 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5706 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5707 0, 0, 0, 0, 0, 0, 0, 0, 205, 206,
5708 207, 208, 209, 210, 211, 212, 213, 214, 0, 215,
5709 216, 858, 639, 0, 0, 859, 0, 217, 0, 0,
5710 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5711 0, 0, 0, 0, 0, 188, 189, 190, 191, 192,
5712 193, 194, 195, 196, 0, 0, 197, 198, 0, 0,
5713 0, 0, 199, 200, 201, 202, 0, 0, 0, 0,
5714 0, 0, 0, 0, 0, 0, 203, 204, 0, 0,
5715 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5716 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5717 0, 0, 0, 0, 0, 0, 205, 206, 207, 208,
5718 209, 210, 211, 212, 213, 214, 0, 215, 216, 1021,
5719 639, 0, 0, 1022, 0, 217, 0, 0, 0, 0,
5720 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5721 0, 0, 0, 188, 189, 190, 191, 192, 193, 194,
5722 195, 196, 0, 0, 197, 198, 0, 0, 0, 0,
5723 199, 200, 201, 202, 0, 0, 0, 0, 0, 0,
5724 0, 0, 0, 0, 203, 204, 0, 0, 0, 0,
5725 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5726 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5727 0, 0, 0, 0, 205, 206, 207, 208, 209, 210,
5728 211, 212, 213, 214, 0, 215, 216, 1024, 647, 0,
5729 0, 1025, 0, 217, 0, 0, 0, 0, 0, 0,
5730 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5731 0, 188, 189, 190, 191, 192, 193, 194, 195, 196,
5732 0, 0, 197, 198, 0, 0, 0, 0, 199, 200,
5733 201, 202, 0, 0, 0, 0, 0, 0, 0, 0,
5734 0, 0, 203, 204, 0, 0, 0, 0, 0, 0,
5735 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5736 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5737 0, 0, 205, 206, 207, 208, 209, 210, 211, 212,
5738 213, 214, 0, 215, 216, 1308, 639, 0, 0, 1309,
5739 0, 217, 0, 0, 0, 0, 0, 0, 0, 0,
5740 0, 0, 0, 0, 0, 0, 0, 0, 0, 188,
5741 189, 190, 191, 192, 193, 194, 195, 196, 0, 0,
5742 197, 198, 0, 0, 0, 0, 199, 200, 201, 202,
5743 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5744 203, 204, 0, 0, 0, 0, 0, 0, 0, 0,
5745 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5746 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5747 205, 206, 207, 208, 209, 210, 211, 212, 213, 214,
5748 0, 215, 216, 1311, 647, 0, 0, 1312, 0, 217,
5749 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5750 0, 0, 0, 0, 0, 0, 0, 188, 189, 190,
5751 191, 192, 193, 194, 195, 196, 0, 0, 197, 198,
5752 0, 0, 0, 0, 199, 200, 201, 202, 0, 0,
5753 0, 0, 0, 0, 0, 0, 0, 0, 203, 204,
5754 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5755 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5756 0, 0, 0, 0, 0, 0, 0, 0, 205, 206,
5757 207, 208, 209, 210, 211, 212, 213, 214, 0, 215,
5758 216, 1356, 639, 0, 0, 1357, 0, 217, 0, 0,
5759 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5760 0, 0, 0, 0, 0, 188, 189, 190, 191, 192,
5761 193, 194, 195, 196, 0, 0, 197, 198, 0, 0,
5762 0, 0, 199, 200, 201, 202, 0, 0, 0, 0,
5763 0, 0, 0, 0, 0, 0, 203, 204, 0, 0,
5764 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5765 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5766 0, 0, 0, 0, 0, 0, 205, 206, 207, 208,
5767 209, 210, 211, 212, 213, 214, 0, 215, 216, 0,
5768 0, 0, 0, 0, 0, 217
5769};
5770
5771static const yytype_int16 yycheck[] =
5772{
5773 1, 59, 70, 58, 58, 107, 426, 15, 16, 252,
5774 400, 70, 101, 13, 14, 1, 1, 408, 116, 7,
5775 574, 52, 53, 344, 7, 27, 115, 348, 56, 760,
5776 348, 344, 255, 837, 525, 348, 15, 16, 104, 27,
5777 399, 107, 401, 611, 27, 89, 767, 595, 107, 847,
5778 598, 52, 53, 15, 16, 56, 597, 111, 597, 15,
5779 16, 89, 84, 477, 15, 16, 52, 53, 54, 55,
5780 58, 469, 72, 63, 64, 65, 56, 81, 601, 477,
5781 108, 109, 110, 473, 52, 103, 104, 817, 89, 107,
5782 21, 113, 54, 67, 80, 81, 455, 611, 54, 55,
5783 66, 515, 904, 762, 112, 27, 565, 108, 109, 110,
5784 111, 13, 469, 472, 296, 474, 0, 608, 300, 29,
5785 626, 1164, 1027, 111, 285, 26, 762, 1026, 1027, 1283,
5786 678, 767, 1164, 112, 585, 1178, 66, 527, 0, 58,
5787 591, 101, 1275, 502, 69, 906, 320, 321, 1180, 823,
5788 112, 10, 100, 84, 151, 512, 112, 831, 247, 78,
5789 154, 112, 66, 154, 25, 154, 160, 290, 159, 528,
5790 25, 66, 605, 98, 688, 689, 234, 718, 81, 154,
5791 37, 38, 157, 101, 25, 287, 134, 56, 277, 108,
5792 109, 121, 122, 25, 124, 155, 688, 689, 1352, 230,
5793 25, 100, 363, 161, 26, 942, 28, 757, 722, 68,
5794 760, 1344, 28, 123, 13, 119, 25, 1188, 1189, 287,
5795 653, 310, 141, 25, 119, 134, 659, 660, 287, 230,
5796 722, 13, 154, 1138, 25, 134, 120, 155, 160, 1138,
5797 970, 484, 260, 261, 230, 134, 13, 255, 157, 257,
5798 151, 109, 154, 155, 285, 675, 13, 1300, 160, 245,
5799 25, 305, 1064, 1295, 13, 266, 252, 1299, 1300, 255,
5800 274, 337, 338, 339, 340, 665, 255, 305, 257, 1000,
5801 266, 266, 1181, 141, 285, 13, 676, 273, 274, 1188,
5802 1189, 750, 751, 255, 155, 257, 710, 154, 821, 285,
5803 155, 257, 1063, 307, 305, 155, 257, 666, 26, 857,
5804 708, 413, 710, 804, 155, 1052, 157, 285, 677, 337,
5805 338, 339, 340, 155, 342, 343, 1297, 1359, 451, 418,
5806 155, 762, 363, 1137, 335, 13, 364, 134, 304, 1137,
5807 846, 272, 773, 409, 275, 1004, 155, 1084, 781, 1086,
5808 335, 708, 785, 155, 413, 154, 910, 480, 157, 425,
5809 483, 160, 363, 364, 155, 488, 157, 541, 1004, 543,
5810 273, 274, 154, 134, 13, 157, 112, 363, 160, 410,
5811 411, 922, 505, 922, 364, 13, 954, 154, 13, 98,
5812 155, 409, 400, 160, 155, 363, 100, 154, 1297, 1085,
5813 1026, 1027, 403, 160, 101, 154, 100, 425, 54, 410,
5814 411, 160, 845, 401, 400, 848, 34, 403, 64, 65,
5815 100, 400, 157, 1152, 410, 411, 154, 975, 826, 862,
5816 944, 945, 160, 151, 52, 66, 950, 951, 760, 157,
5817 134, 762, 428, 451, 153, 904, 767, 906, 157, 1186,
5818 1187, 992, 944, 945, 134, 698, 579, 154, 950, 951,
5819 52, 155, 913, 914, 56, 473, 917, 455, 919, 826,
5820 921, 402, 451, 295, 296, 69, 154, 157, 300, 155,
5821 302, 525, 160, 34, 607, 708, 474, 473, 100, 451,
5822 121, 122, 494, 100, 473, 451, 482, 525, 484, 100,
5823 451, 52, 1188, 1189, 98, 1019, 494, 508, 1081, 1082,
5824 56, 494, 1138, 469, 502, 154, 1152, 548, 134, 527,
5825 1034, 160, 134, 100, 525, 101, 154, 134, 961, 154,
5826 161, 964, 160, 134, 100, 160, 15, 596, 971, 1343,
5827 528, 527, 1034, 155, 977, 727, 25, 548, 527, 939,
5828 1281, 155, 1281, 554, 1283, 69, 512, 134, 1287, 701,
5829 683, 100, 548, 1292, 608, 739, 1287, 69, 134, 554,
5830 744, 1002, 100, 1004, 931, 1006, 990, 968, 155, 938,
5831 608, 940, 1152, 97, 98, 571, 594, 52, 574, 597,
5832 732, 56, 990, 100, 595, 134, 98, 598, 155, 658,
5833 786, 69, 1152, 789, 1063, 1064, 134, 608, 1156, 595,
5834 1183, 1184, 598, 157, 1065, 1066, 1067, 1068, 100, 1348,
5835 642, 1350, 1055, 1352, 655, 1354, 657, 1348, 650, 97,
5836 98, 754, 606, 100, 25, 157, 100, 611, 157, 153,
5837 883, 78, 1371, 157, 606, 69, 154, 1283, 158, 611,
5838 158, 1287, 134, 100, 655, 1046, 657, 665, 134, 645,
5839 1214, 679, 1216, 1083, 650, 687, 69, 134, 676, 655,
5840 134, 657, 993, 155, 98, 993, 159, 678, 666, 665,
5841 993, 152, 737, 1004, 728, 153, 665, 134, 690, 677,
5842 676, 155, 678, 56, 97, 98, 714, 676, 100, 25,
5843 728, 687, 690, 157, 1026, 1027, 155, 690, 155, 851,
5844 25, 642, 698, 1283, 688, 689, 1352, 1287, 1149, 861,
5845 161, 1152, 1292, 151, 25, 814, 78, 728, 69, 1277,
5846 78, 1281, 134, 1283, 1178, 721, 1127, 1287, 1059, 100,
5847 863, 1059, 1292, 134, 1188, 1189, 1059, 30, 722, 739,
5848 153, 741, 708, 155, 744, 745, 97, 98, 69, 882,
5849 804, 884, 1213, 154, 155, 1185, 157, 158, 866, 134,
5850 66, 1325, 100, 134, 1207, 100, 804, 100, 1348, 902,
5851 1350, 599, 1352, 134, 1354, 603, 97, 98, 854, 720,
5852 856, 26, 144, 145, 146, 69, 855, 152, 1348, 154,
5853 1350, 1371, 1352, 804, 1354, 627, 134, 134, 134, 134,
5854 864, 134, 153, 106, 1205, 58, 1138, 69, 15, 134,
5855 17, 1371, 644, 119, 98, 121, 122, 56, 154, 155,
5856 26, 1152, 158, 134, 69, 78, 854, 1295, 856, 154,
5857 155, 1299, 153, 158, 66, 67, 98, 833, 69, 835,
5858 155, 837, 1283, 154, 155, 25, 857, 158, 69, 1181,
5859 160, 1292, 97, 98, 69, 108, 1188, 1189, 138, 112,
5860 826, 857, 158, 69, 69, 1265, 864, 98, 155, 701,
5861 52, 1023, 54, 55, 56, 57, 58, 98, 927, 1322,
5862 929, 891, 97, 98, 960, 83, 84, 883, 69, 121,
5863 122, 97, 98, 98, 69, 727, 78, 1266, 155, 69,
5864 732, 37, 38, 152, 922, 974, 151, 976, 153, 1350,
5865 92, 1352, 157, 1354, 910, 134, 97, 98, 959, 155,
5866 102, 939, 97, 98, 134, 107, 108, 109, 98, 158,
5867 1371, 155, 960, 1085, 59, 60, 61, 62, 153, 137,
5868 138, 69, 940, 939, 776, 151, 155, 153, 959, 1281,
5869 939, 157, 1283, 994, 1026, 1027, 1287, 69, 954, 141,
5870 944, 945, 144, 959, 975, 1297, 950, 951, 69, 97,
5871 98, 264, 153, 69, 134, 157, 1, 52, 153, 975,
5872 69, 155, 954, 994, 155, 97, 98, 154, 155, 155,
5873 15, 16, 155, 66, 78, 152, 97, 98, 994, 154,
5874 155, 97, 98, 1013, 1014, 52, 1017, 1018, 97, 98,
5875 1051, 1163, 155, 1085, 1166, 1026, 1027, 14, 15, 851,
5876 1088, 1352, 1017, 1018, 1089, 153, 155, 52, 53, 861,
5877 1102, 56, 89, 90, 1186, 1019, 40, 41, 154, 155,
5878 1051, 153, 67, 306, 307, 1041, 119, 1043, 121, 122,
5879 1034, 124, 153, 885, 1187, 1051, 13, 153, 142, 143,
5880 144, 145, 146, 17, 89, 25, 1138, 69, 361, 152,
5881 1081, 1082, 134, 366, 1085, 1071, 1072, 155, 103, 104,
5882 44, 155, 107, 108, 109, 110, 1198, 112, 1126, 1161,
5883 155, 1102, 1133, 1134, 1193, 97, 98, 1230, 1139, 1175,
5884 44, 152, 155, 44, 69, 56, 1178, 1240, 1260, 1261,
5885 1262, 44, 1153, 134, 136, 1126, 1188, 1189, 159, 1130,
5886 1198, 8, 1133, 1134, 1257, 1258, 1259, 1138, 1139, 1198,
5887 15, 155, 97, 98, 1130, 69, 52, 1133, 1134, 155,
5888 155, 1137, 1153, 1139, 155, 1156, 155, 1175, 155, 152,
5889 1161, 153, 26, 1164, 155, 155, 1197, 1153, 1310, 155,
5890 1156, 101, 9, 97, 98, 458, 459, 1178, 1179, 1180,
5891 1211, 155, 1183, 1184, 467, 52, 139, 1188, 1189, 1247,
5892 923, 924, 475, 476, 66, 155, 1197, 1225, 153, 932,
5893 139, 1023, 935, 155, 937, 69, 1272, 1273, 52, 155,
5894 1211, 1197, 495, 66, 1200, 230, 54, 55, 101, 57,
5895 503, 158, 56, 152, 1225, 1211, 64, 65, 1214, 153,
5896 1216, 152, 160, 97, 98, 40, 41, 42, 43, 44,
5897 255, 155, 257, 78, 155, 260, 261, 119, 155, 121,
5898 122, 266, 124, 155, 1272, 1273, 155, 1265, 1286, 155,
5899 95, 96, 66, 1085, 1086, 155, 119, 155, 121, 122,
5900 285, 139, 1224, 155, 1226, 56, 1277, 66, 1266, 1265,
5901 504, 1267, 66, 1269, 1315, 1286, 1265, 151, 157, 153,
5902 305, 1277, 155, 157, 1295, 78, 155, 155, 1299, 1300,
5903 155, 157, 266, 155, 139, 140, 141, 142, 143, 144,
5904 145, 146, 95, 96, 1315, 119, 335, 121, 122, 1141,
5905 335, 508, 337, 338, 339, 340, 1130, 342, 343, 1315,
5906 119, 864, 121, 122, 106, 119, 110, 121, 122, 1325,
5907 52, 1163, 54, 55, 1166, 57, 606, 108, 363, 364,
5908 98, 495, 687, 955, 974, 688, 689, 1343, 1359, 142,
5909 143, 144, 145, 146, 1186, 1200, 750, 904, 1281, 652,
5910 1223, 704, 705, 1152, 1072, 1287, 1328, 1329, 1, 1222,
5911 1332, 1333, 867, 1344, 1336, 400, 359, 1179, 403, 722,
5912 102, 1181, 15, 16, 409, 410, 411, 1343, 1181, 1177,
5913 1222, 52, 1267, 54, 55, 56, 57, 543, 691, 1269,
5914 425, 1026, 1027, 1365, 1366, 1367, 1368, 119, 111, 115,
5915 760, 52, 1374, 54, 55, 56, 57, 1338, 767, 52,
5916 53, -1, -1, -1, -1, 78, 451, -1, 1260, 1261,
5917 1262, -1, -1, -1, 67, -1, -1, 33, 34, 35,
5918 36, 102, 95, 96, -1, -1, 107, 52, 473, 54,
5919 55, 56, 57, 49, 50, 51, 1081, 1082, -1, -1,
5920 1085, 102, -1, 59, 60, 61, 62, 63, -1, -1,
5921 103, 104, -1, -1, 107, -1, -1, 1102, 1310, 112,
5922 -1, -1, -1, 508, -1, -1, -1, 1319, 141, 142,
5923 143, 144, 145, 146, 52, -1, 54, 55, 56, 57,
5924 525, -1, 527, -1, -1, -1, 1338, -1, -1, -1,
5925 -1, -1, -1, 1138, 110, 111, 112, 113, 114, 115,
5926 116, 117, 118, 548, -1, -1, 819, 820, -1, 554,
5927 -1, 874, -1, -1, 827, 828, 1161, -1, -1, 1164,
5928 -1, -1, 52, -1, 54, 55, 56, 57, 58, -1,
5929 -1, 147, -1, 1178, 1179, 1180, -1, -1, 1183, 1184,
5930 -1, -1, -1, 1188, 1189, -1, -1, -1, 78, 594,
5931 595, -1, 597, 598, -1, -1, -1, -1, -1, -1,
5932 -1, 606, 92, 608, 877, 878, 611, 880, 881, -1,
5933 -1, -1, 102, -1, -1, -1, -1, 230, 108, 109,
5934 -1, 944, 945, -1, -1, -1, -1, 950, 951, 52,
5935 -1, 54, 55, 56, 57, 58, -1, -1, -1, -1,
5936 -1, -1, 255, -1, 257, -1, -1, 260, 261, -1,
5937 655, 141, 657, 266, -1, 78, -1, -1, -1, -1,
5938 665, 984, 985, 936, 987, 988, -1, -1, -1, -1,
5939 -1, 676, 285, 678, 679, -1, 949, -1, -1, 102,
5940 -1, -1, -1, 688, 689, 108, 109, -1, -1, -1,
5941 1295, -1, -1, -1, 1299, 1300, -1, -1, -1, -1,
5942 -1, -1, -1, -1, 1026, 1027, -1, -1, -1, 714,
5943 -1, 1034, -1, 986, -1, -1, -1, 722, 141, -1,
5944 -1, -1, 335, 728, 337, 338, 339, 340, -1, 342,
5945 343, -1, -1, -1, -1, 1058, 52, -1, 54, 55,
5946 56, 57, 58, -1, -1, -1, -1, -1, -1, -1,
5947 363, -1, -1, -1, 1359, -1, -1, -1, -1, 1081,
5948 1082, -1, 78, 1085, -1, -1, -1, -1, -1, -1,
5949 -1, -1, -1, -1, -1, -1, 92, -1, -1, -1,
5950 1102, -1, -1, -1, -1, -1, 102, 400, -1, -1,
5951 403, 107, 108, 109, -1, -1, 409, 410, 411, 804,
5952 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
5953 -1, -1, 425, -1, -1, -1, 1138, -1, -1, -1,
5954 -1, -1, -1, -1, -1, 141, 1, -1, 144, 52,
5955 -1, 54, 55, 56, 57, 58, -1, -1, 451, 1161,
5956 15, 16, 1164, -1, -1, -1, -1, -1, -1, 854,
5957 -1, 856, 857, -1, -1, 78, 1178, 1179, 1180, -1,
5958 473, 1183, 1184, -1, -1, -1, 1188, 1189, 1026, 1027,
5959 -1, -1, -1, -1, -1, -1, -1, 52, 53, 102,
5960 -1, -1, -1, -1, 107, 108, 109, -1, -1, -1,
5961 -1, -1, 67, -1, -1, 508, -1, 1170, 78, 79,
5962 80, 81, 82, 83, 84, 85, 86, 87, 88, 89,
5963 90, -1, -1, -1, 527, 95, 96, 922, 141, -1,
5964 -1, 144, -1, 1081, 1082, -1, -1, 1085, 103, 104,
5965 -1, -1, 107, -1, 939, 548, -1, 112, -1, 944,
5966 945, 554, -1, -1, 1102, 950, 951, -1, -1, -1,
5967 -1, -1, -1, -1, 959, 960, -1, 137, 138, 139,
5968 140, 141, 142, 143, 144, 145, 146, -1, -1, -1,
5969 975, -1, -1, 1295, -1, -1, -1, 1299, 1300, -1,
5970 1138, 594, 595, -1, 597, 598, -1, -1, -1, 994,
5971 -1, -1, -1, 606, -1, -1, -1, -1, 611, -1,
5972 -1, -1, -1, 1161, -1, -1, 1164, -1, -1, -1,
5973 -1, -1, 1017, 1018, 1019, -1, -1, -1, -1, -1,
5974 1178, 1179, 1180, -1, -1, 1183, 1184, -1, -1, 1034,
5975 1188, 1189, -1, -1, -1, -1, -1, 1359, -1, -1,
5976 -1, -1, 655, -1, 657, -1, 1051, -1, -1, -1,
5977 -1, -1, 665, -1, -1, 230, -1, -1, -1, -1,
5978 -1, -1, -1, 676, -1, 678, 679, -1, -1, -1,
5979 -1, -1, -1, -1, -1, 688, 689, -1, -1, -1,
5980 255, -1, 257, -1, -1, 260, 261, -1, -1, -1,
5981 -1, 266, -1, -1, -1, -1, -1, -1, -1, -1,
5982 -1, 714, -1, -1, -1, -1, -1, -1, -1, 722,
5983 285, -1, -1, 78, 79, 80, 81, 82, 83, 84,
5984 85, 1126, 87, 88, -1, 1130, -1, -1, 1133, 1134,
5985 95, 96, -1, -1, 1139, -1, -1, 1295, -1, -1,
5986 -1, 1299, 1300, -1, -1, -1, -1, -1, 1153, -1,
5987 -1, 1156, -1, -1, -1, -1, -1, -1, -1, -1,
5988 335, -1, 337, 338, 339, 340, -1, 342, 343, -1,
5989 1175, -1, 137, 138, 139, 140, 141, 142, 143, 144,
5990 145, 146, -1, -1, -1, -1, -1, -1, 363, -1,
5991 -1, -1, 1197, -1, -1, -1, -1, -1, -1, -1,
5992 -1, 1359, -1, -1, -1, -1, 1211, -1, -1, -1,
5993 -1, -1, -1, -1, -1, -1, -1, -1, 1, -1,
5994 1225, -1, -1, -1, -1, 400, -1, -1, 403, -1,
5995 -1, -1, 15, 16, 409, 410, 411, -1, -1, -1,
5996 -1, 854, -1, 856, 857, -1, -1, -1, -1, -1,
5997 425, -1, -1, -1, -1, -1, -1, -1, -1, -1,
5998 1265, -1, -1, -1, -1, -1, -1, 1272, 1273, 52,
5999 53, -1, 1277, -1, -1, -1, 451, -1, -1, -1,
6000 -1, 1286, -1, -1, 67, -1, -1, -1, -1, -1,
6001 -1, -1, -1, -1, -1, -1, -1, -1, 473, -1,
6002 -1, -1, 1026, 1027, -1, -1, -1, -1, -1, 922,
6003 1315, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6004 103, 104, -1, -1, 107, -1, 939, -1, -1, 112,
6005 -1, 944, 945, 508, -1, -1, -1, 950, 951, -1,
6006 -1, 1, -1, -1, -1, -1, 959, 960, -1, -1,
6007 -1, -1, 527, -1, -1, 15, 16, 1081, 1082, -1,
6008 -1, 1085, 975, -1, -1, -1, -1, -1, -1, -1,
6009 -1, -1, -1, 548, -1, -1, -1, -1, 1102, 554,
6010 -1, 994, -1, -1, -1, -1, -1, -1, -1, -1,
6011 -1, -1, 52, 53, -1, -1, 56, -1, -1, -1,
6012 -1, -1, -1, -1, 1017, 1018, 1019, -1, -1, -1,
6013 -1, -1, -1, -1, 1138, -1, -1, -1, -1, 594,
6014 595, 1034, 597, 598, -1, -1, -1, -1, -1, 89,
6015 -1, 606, -1, -1, -1, -1, 611, 1161, 1051, -1,
6016 1164, -1, -1, -1, -1, -1, -1, 230, 108, 109,
6017 110, -1, 112, -1, 1178, 1179, 1180, -1, -1, 1183,
6018 1184, -1, -1, -1, 1188, 1189, -1, -1, -1, -1,
6019 55, -1, 255, -1, 257, -1, -1, 260, 261, -1,
6020 655, -1, 657, 266, -1, -1, -1, -1, -1, -1,
6021 665, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6022 -1, 676, 285, 678, 679, -1, -1, -1, -1, -1,
6023 -1, -1, -1, 688, 689, -1, -1, 1130, -1, -1,
6024 1133, 1134, -1, -1, -1, -1, 1139, -1, -1, -1,
6025 -1, -1, -1, -1, -1, -1, -1, -1, -1, 714,
6026 1153, -1, -1, 1156, -1, -1, -1, 722, -1, -1,
6027 -1, -1, 335, -1, 337, 338, 339, 340, -1, 342,
6028 343, -1, 1175, -1, -1, -1, -1, -1, -1, -1,
6029 230, 1295, -1, -1, -1, 1299, 1300, -1, -1, -1,
6030 363, -1, -1, -1, 1197, -1, -1, -1, -1, -1,
6031 -1, -1, -1, -1, -1, 255, -1, 257, 1211, -1,
6032 -1, -1, -1, -1, -1, -1, 266, -1, -1, -1,
6033 -1, -1, -1, -1, -1, -1, -1, 400, -1, -1,
6034 403, -1, -1, -1, -1, 285, 409, 410, 411, -1,
6035 -1, -1, -1, -1, -1, 1359, -1, -1, -1, -1,
6036 -1, -1, 425, 228, -1, 305, 231, 232, 233, -1,
6037 -1, -1, 1265, -1, -1, -1, -1, -1, -1, 1272,
6038 1273, -1, -1, -1, 1277, -1, -1, -1, 451, -1,
6039 -1, -1, -1, -1, -1, 335, -1, -1, -1, 854,
6040 -1, 856, 857, -1, -1, -1, -1, -1, -1, -1,
6041 473, -1, -1, -1, -1, -1, -1, -1, 1026, 1027,
6042 -1, -1, 1315, 363, 364, -1, -1, -1, -1, -1,
6043 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6044 -1, -1, -1, -1, -1, 508, -1, -1, -1, -1,
6045 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6046 400, -1, -1, 403, 527, -1, -1, 922, -1, -1,
6047 410, 411, -1, 1081, 1082, -1, -1, 1085, -1, -1,
6048 -1, -1, -1, -1, 939, 548, -1, -1, -1, 944,
6049 945, 554, -1, -1, 1102, 950, 951, -1, -1, -1,
6050 -1, -1, -1, -1, 959, 960, -1, -1, -1, -1,
6051 -1, 451, -1, -1, -1, -1, -1, -1, -1, -1,
6052 975, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6053 1138, 594, 595, 473, 597, 598, -1, -1, -1, 994,
6054 -1, -1, -1, 606, -1, -1, -1, -1, 611, -1,
6055 -1, 1026, 1027, 1161, -1, -1, 1164, -1, -1, -1,
6056 -1, -1, 1017, 1018, 1019, -1, -1, -1, 508, -1,
6057 1178, 1179, 1180, -1, -1, 1183, 1184, -1, -1, 1034,
6058 1188, 1189, -1, -1, -1, 525, -1, 527, -1, -1,
6059 -1, -1, 655, -1, 657, -1, 1051, -1, -1, -1,
6060 -1, -1, 665, 468, 469, -1, 1081, 1082, 548, -1,
6061 1085, -1, 477, 676, 554, 678, 679, 1026, 1027, -1,
6062 -1, -1, -1, -1, -1, 688, 689, 1102, -1, -1,
6063 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6064 -1, -1, -1, -1, -1, -1, -1, 512, -1, -1,
6065 515, 714, -1, -1, -1, 595, -1, -1, 598, 722,
6066 -1, -1, -1, 1138, -1, -1, -1, -1, 608, -1,
6067 -1, 611, 1081, 1082, -1, 1130, 1085, -1, 1133, 1134,
6068 -1, -1, -1, -1, 1139, -1, 1161, 1295, -1, 1164,
6069 -1, 1299, 1300, 1102, -1, -1, -1, -1, 1153, -1,
6070 -1, 1156, -1, 1178, 1179, 1180, -1, -1, 1183, 1184,
6071 -1, -1, -1, 1188, 1189, 655, -1, 657, -1, -1,
6072 1175, 586, -1, -1, -1, 665, -1, -1, -1, 1138,
6073 -1, -1, -1, -1, -1, -1, 676, -1, 678, -1,
6074 -1, 606, 1197, -1, -1, -1, 611, -1, 688, 689,
6075 -1, 1359, 1161, -1, -1, 1164, 1211, -1, -1, -1,
6076 -1, -1, -1, -1, -1, -1, -1, -1, -1, 1178,
6077 1179, 1180, -1, -1, 1183, 1184, -1, -1, -1, 1188,
6078 1189, -1, 722, -1, -1, -1, -1, -1, 728, -1,
6079 -1, 854, -1, 856, 857, -1, -1, -1, -1, -1,
6080 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6081 1265, -1, -1, -1, -1, -1, -1, 1272, 1273, 1,
6082 1295, -1, 1277, -1, 1299, 1300, -1, 692, -1, -1,
6083 -1, -1, -1, 15, 16, -1, -1, -1, -1, -1,
6084 -1, -1, -1, 708, -1, 710, -1, -1, -1, -1,
6085 -1, -1, -1, -1, -1, -1, -1, -1, -1, 922,
6086 1315, -1, -1, -1, 804, -1, -1, -1, -1, -1,
6087 52, 53, -1, -1, 56, -1, 939, -1, -1, -1,
6088 -1, 944, 945, -1, 1359, -1, 1295, 950, 951, -1,
6089 1299, 1300, -1, -1, -1, -1, 959, 960, -1, -1,
6090 -1, 766, -1, -1, -1, -1, -1, 89, -1, -1,
6091 -1, -1, 975, -1, -1, -1, -1, 857, -1, -1,
6092 -1, -1, -1, -1, -1, -1, 108, 109, 110, 794,
6093 112, 994, -1, -1, -1, -1, -1, -1, -1, -1,
6094 -1, -1, 1, -1, -1, -1, -1, -1, -1, -1,
6095 1359, -1, -1, -1, 1017, 1018, 1019, -1, -1, -1,
6096 -1, 826, -1, -1, -1, -1, -1, -1, -1, -1,
6097 -1, 1034, -1, -1, -1, -1, -1, -1, -1, 844,
6098 -1, -1, -1, -1, -1, -1, -1, -1, 1051, -1,
6099 -1, -1, -1, 52, 53, -1, -1, 56, -1, 939,
6100 -1, -1, -1, -1, 944, 945, 1026, 1027, -1, -1,
6101 950, 951, -1, -1, -1, -1, -1, -1, -1, 959,
6102 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6103 89, -1, -1, -1, -1, 975, -1, -1, -1, -1,
6104 -1, -1, -1, -1, -1, -1, -1, -1, 230, 108,
6105 109, 110, -1, -1, 994, -1, -1, -1, -1, -1,
6106 -1, 1081, 1082, -1, -1, 1085, 931, 1130, -1, -1,
6107 1133, 1134, -1, 255, -1, 257, 1139, 1017, 1018, 1019,
6108 -1, -1, 1102, -1, 266, -1, -1, -1, -1, 954,
6109 1153, -1, -1, 1156, 1034, -1, -1, -1, -1, -1,
6110 -1, 966, -1, 285, -1, -1, -1, -1, -1, -1,
6111 -1, 1051, 1175, -1, -1, -1, -1, -1, 1138, -1,
6112 1026, 1027, -1, 305, -1, 990, -1, -1, -1, -1,
6113 -1, -1, -1, -1, 1197, -1, -1, -1, -1, -1,
6114 -1, 1161, -1, -1, 1164, -1, -1, -1, 1211, -1,
6115 1015, -1, -1, 335, -1, -1, -1, -1, 1178, 1179,
6116 1180, -1, -1, 1183, 1184, -1, -1, -1, 1188, 1189,
6117 -1, 230, -1, -1, -1, 1081, 1082, -1, -1, 1085,
6118 25, 363, 364, -1, -1, 1050, 1126, -1, -1, -1,
6119 1130, -1, -1, 1133, 1134, -1, 1102, -1, -1, 1139,
6120 -1, -1, 1265, -1, -1, -1, -1, 266, -1, 1272,
6121 1273, -1, -1, 1153, 1277, -1, 1156, -1, 400, -1,
6122 -1, 403, -1, -1, -1, -1, 285, -1, 410, 411,
6123 -1, -1, 1138, 78, 79, 80, 81, 82, 83, 84,
6124 85, 86, 87, 88, 89, 90, 305, -1, -1, -1,
6125 95, 96, 1315, -1, -1, 1161, 101, 1197, 1164, -1,
6126 -1, -1, -1, -1, -1, -1, -1, -1, -1, 451,
6127 1135, 1211, 1178, 1179, 1180, 1295, 335, 1183, 1184, 1299,
6128 1300, -1, 1188, 1189, -1, 1225, -1, -1, -1, -1,
6129 135, 473, 137, 138, 139, 140, 141, 142, 143, 144,
6130 145, 146, -1, -1, 363, 364, -1, -1, -1, -1,
6131 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6132 -1, -1, -1, -1, -1, 1265, 508, 1, -1, -1,
6133 -1, -1, -1, -1, -1, -1, -1, 1277, -1, 1359,
6134 -1, -1, -1, 525, 403, 527, 1286, -1, -1, -1,
6135 -1, 410, 411, -1, -1, -1, -1, -1, -1, -1,
6136 -1, -1, -1, -1, -1, -1, 548, -1, -1, -1,
6137 -1, -1, 554, -1, -1, 1315, -1, -1, 52, 53,
6138 -1, -1, 56, -1, -1, -1, -1, -1, -1, 1295,
6139 -1, -1, -1, 1299, 1300, -1, -1, -1, -1, -1,
6140 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6141 -1, -1, -1, 595, -1, 89, 598, -1, -1, -1,
6142 -1, -1, -1, -1, -1, -1, 608, -1, -1, 611,
6143 -1, -1, -1, -1, 108, 109, 110, 111, -1, -1,
6144 -1, -1, -1, -1, -1, -1, -1, -1, -1, 508,
6145 -1, -1, -1, 1359, -1, -1, -1, -1, 1, 78,
6146 79, 80, 81, 82, 83, 84, 525, -1, 87, 88,
6147 -1, -1, -1, 655, -1, 657, 95, 96, -1, -1,
6148 -1, -1, -1, 665, -1, -1, -1, -1, -1, 548,
6149 -1, -1, -1, -1, 676, 554, 678, -1, -1, -1,
6150 -1, -1, -1, -1, -1, -1, 688, 689, -1, 52,
6151 53, -1, -1, -1, -1, -1, -1, -1, 137, 138,
6152 139, 140, 141, 142, 143, 144, 145, 146, -1, -1,
6153 -1, -1, -1, -1, -1, -1, 595, -1, -1, 598,
6154 722, -1, -1, -1, -1, 0, 728, -1, -1, 608,
6155 -1, -1, 611, 8, 9, 10, 230, -1, 13, 14,
6156 15, -1, 17, -1, -1, 108, -1, -1, -1, -1,
6157 25, 26, 27, -1, -1, -1, -1, -1, -1, -1,
6158 -1, -1, 37, 38, -1, 40, 41, 42, 43, 44,
6159 -1, -1, 266, -1, -1, -1, 655, -1, 657, -1,
6160 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6161 -1, 285, -1, 68, 69, -1, -1, -1, -1, 678,
6162 -1, -1, 804, -1, -1, -1, -1, -1, -1, 688,
6163 689, 305, -1, -1, -1, -1, -1, -1, -1, -1,
6164 -1, -1, 97, 98, -1, -1, -1, -1, -1, 78,
6165 79, 80, 81, 82, 83, 84, -1, -1, 87, 88,
6166 -1, 335, -1, 722, -1, 120, 95, 96, -1, 728,
6167 -1, -1, -1, -1, -1, 857, -1, -1, 737, -1,
6168 -1, -1, 1, -1, -1, -1, -1, 230, -1, 363,
6169 364, -1, -1, -1, -1, -1, 151, 152, -1, 154,
6170 -1, -1, 157, 158, -1, 160, -1, -1, 137, 138,
6171 139, 140, 141, 142, 143, 144, 145, 146, -1, -1,
6172 -1, -1, -1, 266, -1, -1, -1, -1, -1, 403,
6173 -1, -1, -1, 52, 53, -1, 410, 411, -1, -1,
6174 -1, -1, 285, -1, -1, 804, -1, -1, -1, -1,
6175 -1, -1, -1, -1, -1, -1, -1, 939, -1, -1,
6176 -1, -1, 944, 945, -1, -1, -1, -1, 950, 951,
6177 -1, -1, -1, -1, -1, -1, -1, 959, -1, -1,
6178 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6179 -1, -1, 335, 975, -1, -1, -1, -1, 857, -1,
6180 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6181 -1, -1, 994, -1, -1, -1, -1, -1, -1, -1,
6182 363, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6183 -1, -1, -1, -1, 508, 1017, 1018, 1019, -1, -1,
6184 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6185 -1, 525, 1034, -1, -1, -1, -1, -1, -1, -1,
6186 403, -1, -1, -1, -1, -1, -1, 410, 411, 1051,
6187 -1, -1, -1, -1, 548, -1, -1, -1, -1, -1,
6188 554, -1, -1, -1, -1, 944, 945, -1, -1, -1,
6189 -1, 950, 951, -1, -1, -1, -1, -1, -1, -1,
6190 959, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6191 -1, 230, -1, -1, -1, -1, 975, -1, -1, -1,
6192 -1, 595, -1, -1, 598, -1, -1, -1, -1, -1,
6193 -1, -1, -1, -1, 608, 994, -1, -1, -1, -1,
6194 -1, -1, -1, -1, 1126, -1, -1, 266, 1130, -1,
6195 -1, 1133, 1134, -1, -1, -1, -1, 1139, 1017, 1018,
6196 1019, -1, -1, -1, -1, 508, 285, -1, -1, -1,
6197 -1, 1153, -1, -1, 1156, 1034, -1, -1, -1, -1,
6198 -1, 655, -1, 657, -1, -1, -1, -1, -1, -1,
6199 -1, -1, 1051, -1, -1, -1, -1, -1, -1, -1,
6200 -1, -1, -1, -1, 678, 548, -1, -1, -1, -1,
6201 -1, 554, -1, -1, -1, 1197, 335, -1, -1, -1,
6202 -1, -1, -1, -1, -1, -1, -1, -1, -1, 1211,
6203 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6204 -1, -1, -1, 1225, 363, -1, -1, -1, -1, -1,
6205 -1, -1, 595, -1, 728, 598, -1, -1, -1, -1,
6206 -1, -1, -1, -1, -1, -1, -1, 1126, 611, -1,
6207 -1, 1130, -1, -1, 1133, 1134, -1, -1, -1, -1,
6208 1139, -1, -1, 1265, 403, -1, -1, -1, -1, -1,
6209 -1, 410, 411, -1, 1153, 1277, -1, 1156, -1, -1,
6210 -1, -1, -1, -1, 1286, -1, -1, -1, -1, -1,
6211 -1, -1, 655, -1, 657, -1, -1, -1, -1, -1,
6212 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6213 804, -1, -1, 1315, -1, 678, -1, -1, 1197, -1,
6214 -1, -1, -1, -1, -1, 688, 689, -1, -1, -1,
6215 -1, -1, 1211, -1, -1, -1, -1, -1, -1, -1,
6216 -1, -1, -1, -1, -1, -1, 1225, -1, -1, -1,
6217 -1, -1, -1, -1, -1, -1, -1, -1, -1, 722,
6218 -1, -1, -1, 857, -1, -1, -1, -1, -1, 508,
6219 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6220 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6221 -1, -1, -1, -1, -1, -1, -1, -1, 1277, -1,
6222 -1, -1, -1, -1, -1, -1, -1, 1286, -1, 548,
6223 -1, -1, -1, -1, -1, 554, -1, -1, -1, -1,
6224 -1, -1, -1, -1, 33, 34, 35, 36, -1, -1,
6225 -1, -1, -1, -1, -1, -1, 1315, -1, -1, -1,
6226 49, 50, 51, 52, -1, -1, -1, 56, -1, -1,
6227 59, 60, 61, 62, 63, -1, 595, -1, -1, 598,
6228 -1, -1, -1, -1, -1, 959, -1, -1, -1, -1,
6229 -1, -1, 611, -1, -1, -1, -1, -1, -1, -1,
6230 -1, 975, 91, 92, -1, -1, -1, -1, -1, -1,
6231 99, -1, -1, 102, 857, 104, 105, -1, 107, -1,
6232 994, 110, 111, 112, 113, 114, 115, 116, 117, 118,
6233 -1, -1, -1, -1, -1, -1, 655, -1, 657, -1,
6234 -1, -1, -1, 1017, 1018, -1, -1, -1, -1, -1,
6235 -1, 140, -1, -1, -1, -1, -1, -1, 147, 678,
6236 -1, -1, -1, -1, -1, 154, -1, -1, -1, 688,
6237 689, -1, -1, -1, -1, -1, -1, 1051, -1, -1,
6238 -1, -1, -1, -1, -1, -1, -1, -1, 15, 16,
6239 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6240 -1, 944, 945, 722, -1, -1, -1, 950, 951, -1,
6241 -1, -1, -1, -1, -1, -1, 959, -1, -1, -1,
6242 47, 48, 49, 50, -1, -1, -1, 54, 55, -1,
6243 -1, -1, 975, -1, -1, -1, -1, -1, -1, -1,
6244 67, 68, -1, -1, -1, -1, -1, -1, -1, -1,
6245 -1, 994, 1126, -1, -1, -1, 1130, -1, -1, 1133,
6246 1134, -1, -1, -1, -1, 1139, -1, -1, -1, -1,
6247 -1, -1, -1, -1, 1017, 1018, 1019, -1, -1, 1153,
6248 -1, -1, 1156, -1, -1, 112, 33, 34, 35, 36,
6249 -1, 1034, -1, -1, -1, -1, -1, -1, -1, -1,
6250 -1, -1, 49, 50, 51, 52, -1, -1, 1051, 56,
6251 -1, 58, 59, 60, 61, 62, 63, -1, -1, -1,
6252 -1, -1, -1, 1197, -1, -1, -1, -1, -1, -1,
6253 -1, 78, -1, -1, -1, -1, -1, 1211, 857, -1,
6254 -1, -1, -1, -1, 91, 92, -1, -1, -1, -1,
6255 -1, 1225, 99, -1, -1, 102, -1, 104, 105, -1,
6256 107, 108, -1, 110, 111, 112, 113, 114, 115, 116,
6257 117, 118, -1, -1, -1, -1, -1, -1, -1, -1,
6258 -1, -1, -1, 1126, -1, -1, -1, 1130, -1, -1,
6259 1133, 1134, -1, 140, -1, -1, 1139, -1, -1, -1,
6260 147, 228, -1, 1277, 231, 232, 233, -1, 235, -1,
6261 1153, -1, 1286, 1156, -1, -1, -1, -1, -1, -1,
6262 -1, -1, -1, -1, -1, 944, 945, -1, 255, -1,
6263 257, 950, 951, -1, -1, -1, -1, -1, -1, -1,
6264 959, 1315, -1, -1, -1, -1, -1, -1, -1, -1,
6265 -1, -1, -1, -1, 1197, -1, 975, -1, -1, -1,
6266 -1, -1, -1, -1, -1, -1, -1, -1, 1211, -1,
6267 -1, -1, -1, -1, -1, 994, -1, -1, -1, -1,
6268 -1, -1, -1, -1, 44, -1, -1, -1, -1, -1,
6269 -1, -1, -1, -1, -1, -1, -1, -1, 1017, 1018,
6270 1019, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6271 -1, -1, -1, -1, -1, 1034, -1, -1, 78, 79,
6272 80, 81, 82, 83, 84, 85, 86, 87, 88, 89,
6273 90, -1, 1051, -1, 1277, 95, 96, -1, -1, -1,
6274 -1, 368, 369, 370, 371, 372, -1, -1, 375, 376,
6275 377, 378, 379, 380, 381, 382, -1, 384, -1, -1,
6276 387, 388, 389, 390, 391, 392, 393, 394, 395, 396,
6277 -1, -1, 1315, 400, -1, 135, -1, 137, 138, 139,
6278 140, 141, 142, 143, 144, 145, 146, -1, -1, -1,
6279 -1, -1, -1, -1, -1, 155, -1, -1, -1, -1,
6280 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6281 -1, 1130, -1, -1, 1133, 1134, -1, -1, -1, -1,
6282 1139, -1, -1, -1, 451, -1, -1, -1, -1, -1,
6283 -1, -1, -1, -1, 1153, -1, -1, 1156, -1, -1,
6284 -1, 468, 469, -1, -1, -1, 473, -1, -1, -1,
6285 477, -1, 479, -1, -1, -1, -1, -1, -1, -1,
6286 -1, -1, -1, -1, -1, 0, -1, -1, -1, -1,
6287 497, -1, -1, 8, 9, 10, -1, -1, 1197, 14,
6288 15, -1, 17, -1, -1, 512, -1, -1, 515, -1,
6289 25, 26, 1211, -1, -1, -1, -1, -1, -1, -1,
6290 527, -1, 37, 38, -1, 40, 41, 42, 43, 44,
6291 -1, -1, -1, -1, -1, -1, -1, -1, 545, -1,
6292 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6293 -1, -1, -1, 68, 69, -1, -1, -1, -1, -1,
6294 -1, -1, -1, 78, 79, 80, 81, 82, 83, 84,
6295 85, 86, 87, 88, 89, 90, -1, -1, 1277, 586,
6296 95, 96, 97, 98, -1, 100, 101, 594, -1, -1,
6297 597, -1, -1, -1, -1, -1, -1, -1, -1, 606,
6298 -1, -1, -1, -1, 611, 120, -1, -1, -1, -1,
6299 -1, -1, -1, -1, -1, -1, 1315, -1, -1, 134,
6300 135, -1, 137, 138, 139, 140, 141, 142, 143, 144,
6301 145, 146, -1, -1, -1, -1, 151, 152, 153, 154,
6302 155, -1, -1, 158, -1, 160, -1, 33, 34, 35,
6303 36, -1, -1, -1, -1, -1, -1, -1, 665, -1,
6304 -1, -1, -1, 49, 50, 51, 52, -1, -1, 676,
6305 56, -1, -1, 59, 60, 61, 62, 63, -1, -1,
6306 -1, 688, 689, -1, -1, 692, 693, -1, -1, -1,
6307 -1, -1, -1, -1, -1, -1, -1, 704, 705, -1,
6308 -1, 708, -1, 710, -1, 91, 92, -1, -1, -1,
6309 717, 718, -1, 99, -1, 722, 102, -1, 104, 105,
6310 -1, 107, -1, -1, 110, 111, 112, 113, 114, 115,
6311 116, 117, 118, -1, -1, -1, -1, -1, -1, -1,
6312 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6313 -1, -1, -1, -1, 140, -1, -1, -1, -1, 766,
6314 -1, 147, -1, -1, -1, -1, -1, -1, -1, -1,
6315 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6316 -1, -1, -1, -1, -1, -1, -1, 794, -1, -1,
6317 -1, -1, -1, 0, 1, -1, 3, 4, 5, 6,
6318 7, 8, 9, 10, 11, 12, -1, 14, 15, 16,
6319 17, 18, 19, 20, 21, 22, 23, 24, 25, 826,
6320 -1, -1, -1, 30, 31, 32, 33, 34, 35, 36,
6321 -1, -1, 39, -1, -1, -1, -1, 844, 45, 46,
6322 47, 48, 49, 50, 51, 52, 53, 54, 55, 56,
6323 57, -1, 59, 60, 61, 62, 63, 64, 65, -1,
6324 -1, 68, -1, -1, -1, -1, -1, 874, -1, 76,
6325 77, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6326 -1, -1, -1, -1, 91, 92, -1, -1, -1, -1,
6327 -1, -1, 99, -1, -1, 102, 103, 104, 105, -1,
6328 107, -1, -1, 110, 111, 112, 113, 114, 115, 116,
6329 117, 118, -1, 120, -1, 922, -1, -1, -1, -1,
6330 -1, -1, -1, -1, 931, -1, -1, -1, -1, -1,
6331 -1, -1, 939, -1, -1, -1, 943, 944, 945, -1,
6332 147, 148, 149, 950, 951, 152, -1, 954, -1, -1,
6333 -1, 158, -1, 160, -1, -1, -1, -1, -1, 966,
6334 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6335 -1, -1, -1, -1, -1, -1, -1, 984, 985, -1,
6336 987, 988, -1, 990, -1, 992, -1, -1, -1, -1,
6337 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6338 -1, -1, -1, -1, 1011, 1012, -1, -1, 1015, -1,
6339 -1, -1, 1019, 1020, -1, -1, -1, -1, -1, -1,
6340 -1, -1, -1, -1, -1, -1, -1, 1034, -1, -1,
6341 -1, -1, -1, -1, 0, 1, -1, 3, 4, 5,
6342 6, 7, -1, 1050, -1, 11, 12, -1, -1, -1,
6343 16, 1058, 18, 19, 20, 21, 22, 23, 24, -1,
6344 -1, -1, -1, -1, 30, 31, 32, 33, 34, 35,
6345 36, -1, -1, 39, -1, -1, -1, -1, -1, 45,
6346 46, 47, 48, 49, 50, 51, 52, 53, 54, 55,
6347 56, 57, -1, 59, 60, 61, 62, 63, 64, 65,
6348 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6349 76, 77, -1, -1, -1, -1, -1, -1, -1, -1,
6350 -1, -1, -1, -1, -1, 91, 92, -1, 1135, -1,
6351 -1, -1, -1, 99, -1, -1, 102, 103, 104, 105,
6352 -1, 107, -1, -1, 110, 111, 112, 113, 114, 115,
6353 116, 117, 118, -1, 120, -1, -1, -1, -1, -1,
6354 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6355 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6356 -1, 147, 148, 149, -1, -1, 0, 1, 154, 3,
6357 4, 5, 6, 7, 160, -1, -1, 11, 12, -1,
6358 -1, -1, 16, -1, 18, 19, 20, 21, 22, 23,
6359 24, -1, -1, -1, -1, -1, 30, 31, 32, 33,
6360 34, 35, 36, -1, -1, 39, -1, -1, -1, -1,
6361 -1, 45, 46, 47, 48, 49, 50, 51, 52, 53,
6362 54, 55, 56, 57, -1, 59, 60, 61, 62, 63,
6363 64, 65, -1, -1, -1, -1, -1, -1, 1265, -1,
6364 -1, -1, 76, 77, -1, -1, -1, -1, -1, -1,
6365 -1, -1, -1, -1, -1, -1, -1, 91, 92, -1,
6366 -1, -1, -1, -1, -1, 99, -1, -1, 102, 103,
6367 104, 105, -1, 107, -1, -1, 110, 111, 112, 113,
6368 114, 115, 116, 117, 118, -1, -1, -1, -1, -1,
6369 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6370 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6371 -1, -1, -1, 147, 148, 149, -1, -1, 0, 1,
6372 154, 3, 4, 5, 6, 7, 160, -1, -1, 11,
6373 12, -1, -1, -1, 16, -1, 18, 19, 20, 21,
6374 22, 23, 24, -1, -1, -1, -1, -1, 30, 31,
6375 32, 33, 34, 35, 36, -1, -1, 39, -1, -1,
6376 -1, -1, -1, 45, 46, 47, 48, 49, 50, 51,
6377 52, 53, 54, 55, 56, 57, -1, 59, 60, 61,
6378 62, 63, 64, 65, -1, -1, -1, -1, -1, -1,
6379 -1, -1, -1, -1, 76, 77, -1, -1, -1, -1,
6380 -1, -1, -1, -1, -1, -1, -1, -1, -1, 91,
6381 92, -1, -1, -1, -1, -1, -1, 99, -1, -1,
6382 102, 103, 104, 105, -1, 107, -1, -1, 110, 111,
6383 112, 113, 114, 115, 116, 117, 118, -1, -1, -1,
6384 -1, -1, -1, -1, -1, -1, 0, -1, -1, -1,
6385 -1, -1, -1, -1, 8, 9, 10, -1, -1, 13,
6386 14, 15, -1, 17, -1, 147, 148, 149, -1, -1,
6387 152, 25, 26, 27, 28, 29, -1, -1, 160, -1,
6388 -1, -1, -1, 37, 38, -1, 40, 41, 42, 43,
6389 44, -1, -1, -1, 78, 79, 80, 81, 82, 83,
6390 84, 85, 86, 87, 88, 89, 90, -1, -1, -1,
6391 -1, 95, 96, -1, 68, 69, -1, -1, -1, -1,
6392 -1, -1, -1, -1, 78, 79, 80, 81, 82, 83,
6393 84, 85, 86, 87, 88, 89, 90, -1, -1, -1,
6394 -1, 95, 96, 97, 98, -1, 100, 101, -1, -1,
6395 -1, 135, 106, 137, 138, 139, 140, 141, 142, 143,
6396 144, 145, 146, -1, -1, -1, 120, -1, -1, 123,
6397 154, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6398 134, 135, 136, 137, 138, 139, 140, 141, 142, 143,
6399 144, 145, 146, -1, -1, -1, -1, 151, 152, 153,
6400 154, 155, 0, -1, 158, 159, 160, -1, -1, -1,
6401 8, 9, 10, -1, -1, 13, 14, 15, -1, 17,
6402 -1, -1, -1, -1, -1, -1, -1, 25, -1, 27,
6403 28, 29, -1, -1, -1, -1, -1, -1, -1, 37,
6404 38, -1, 40, 41, 42, 43, 44, -1, -1, -1,
6405 78, 79, 80, 81, 82, 83, 84, 85, 86, 87,
6406 88, 89, 90, -1, -1, -1, -1, 95, 96, -1,
6407 68, 69, -1, -1, -1, -1, -1, -1, -1, -1,
6408 78, 79, 80, 81, 82, 83, 84, 85, 86, 87,
6409 88, 89, 90, -1, -1, -1, -1, 95, 96, 97,
6410 98, -1, 100, 101, -1, -1, -1, 135, 106, 137,
6411 138, 139, 140, 141, 142, 143, 144, 145, 146, -1,
6412 -1, -1, 120, -1, -1, 123, -1, -1, -1, -1,
6413 -1, -1, -1, -1, -1, -1, 134, 135, 136, 137,
6414 138, 139, 140, 141, 142, 143, 144, 145, 146, -1,
6415 -1, -1, -1, -1, 152, 153, 154, 155, 0, -1,
6416 158, 159, 160, -1, -1, -1, 8, 9, 10, -1,
6417 -1, 13, 14, 15, -1, 17, -1, -1, -1, -1,
6418 -1, -1, -1, 25, -1, 27, 28, 29, -1, -1,
6419 -1, -1, -1, -1, -1, 37, 38, -1, 40, 41,
6420 42, 43, 44, -1, -1, -1, -1, -1, -1, -1,
6421 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6422 -1, -1, -1, -1, -1, -1, 68, 69, -1, -1,
6423 -1, -1, -1, -1, -1, -1, 78, 79, 80, 81,
6424 82, 83, 84, 85, 86, 87, 88, 89, 90, -1,
6425 -1, -1, -1, 95, 96, 97, 98, -1, 100, 101,
6426 -1, -1, -1, -1, 106, -1, -1, -1, -1, -1,
6427 -1, -1, -1, -1, -1, -1, -1, -1, 120, -1,
6428 -1, 123, -1, -1, -1, -1, -1, -1, -1, -1,
6429 -1, -1, 134, 135, 136, 137, 138, 139, 140, 141,
6430 142, 143, 144, 145, 146, -1, -1, -1, -1, -1,
6431 152, 153, 154, 155, 0, -1, 158, 159, 160, -1,
6432 -1, -1, 8, 9, 10, -1, -1, 13, 14, 15,
6433 -1, 17, -1, -1, -1, -1, -1, -1, -1, 25,
6434 26, 27, 28, 29, -1, -1, -1, -1, -1, -1,
6435 -1, 37, 38, -1, 40, 41, 42, 43, 44, -1,
6436 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6437 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6438 -1, -1, 68, 69, -1, -1, -1, -1, -1, -1,
6439 -1, -1, 78, 79, 80, 81, 82, 83, 84, 85,
6440 86, 87, 88, 89, 90, -1, -1, -1, -1, 95,
6441 96, 97, 98, -1, -1, 101, -1, -1, -1, -1,
6442 106, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6443 -1, -1, -1, -1, 120, -1, -1, 123, -1, -1,
6444 -1, -1, -1, -1, -1, -1, -1, -1, -1, 135,
6445 136, 137, 138, 139, 140, 141, 142, 143, 144, 145,
6446 146, -1, -1, -1, -1, 151, 152, 153, 154, 155,
6447 0, -1, 158, 159, 160, -1, -1, -1, 8, 9,
6448 10, -1, -1, 13, 14, 15, -1, 17, -1, -1,
6449 -1, -1, -1, -1, -1, 25, 26, 27, 28, 29,
6450 -1, -1, -1, -1, -1, -1, -1, 37, 38, -1,
6451 40, 41, 42, 43, 44, -1, -1, -1, -1, -1,
6452 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6453 -1, -1, -1, -1, -1, -1, -1, -1, 68, 69,
6454 -1, -1, -1, -1, -1, -1, -1, -1, 78, 79,
6455 80, 81, 82, 83, 84, 85, 86, 87, 88, 89,
6456 90, -1, -1, -1, -1, 95, 96, 97, 98, -1,
6457 -1, 101, -1, -1, -1, -1, 106, -1, -1, -1,
6458 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6459 120, -1, -1, 123, -1, -1, -1, -1, -1, -1,
6460 -1, -1, -1, -1, -1, 135, 136, 137, 138, 139,
6461 140, 141, 142, 143, 144, 145, 146, -1, -1, -1,
6462 -1, 151, 152, 153, 154, 155, 0, -1, 158, 159,
6463 160, -1, -1, -1, 8, 9, 10, -1, -1, 13,
6464 14, 15, -1, 17, -1, -1, -1, -1, -1, -1,
6465 -1, 25, 26, 27, 28, -1, -1, -1, -1, -1,
6466 -1, -1, -1, 37, 38, -1, 40, 41, 42, 43,
6467 44, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6468 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6469 -1, -1, -1, -1, 68, 69, -1, -1, -1, -1,
6470 -1, -1, -1, -1, 78, 79, 80, 81, 82, 83,
6471 84, 85, 86, 87, 88, 89, 90, -1, -1, -1,
6472 -1, 95, 96, 97, 98, -1, -1, 101, -1, -1,
6473 -1, -1, 106, -1, -1, -1, -1, -1, -1, -1,
6474 -1, -1, -1, -1, -1, -1, 120, -1, -1, -1,
6475 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6476 -1, 135, -1, 137, 138, 139, 140, 141, 142, 143,
6477 144, 145, 146, -1, -1, -1, -1, 151, 152, 153,
6478 154, 155, 0, 157, 158, 159, 160, -1, -1, -1,
6479 8, 9, 10, -1, -1, 13, 14, 15, -1, 17,
6480 -1, -1, -1, -1, -1, -1, -1, 25, -1, 27,
6481 28, 29, -1, -1, -1, -1, -1, -1, -1, 37,
6482 38, -1, 40, 41, 42, 43, 44, -1, -1, -1,
6483 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6484 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6485 68, 69, -1, -1, -1, -1, -1, -1, -1, -1,
6486 78, 79, 80, 81, 82, 83, 84, 85, 86, 87,
6487 88, 89, 90, -1, -1, -1, -1, 95, 96, 97,
6488 98, -1, -1, 101, -1, -1, -1, -1, 106, -1,
6489 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6490 -1, -1, 120, -1, -1, 123, -1, -1, -1, -1,
6491 -1, -1, -1, -1, -1, -1, -1, 135, 136, 137,
6492 138, 139, 140, 141, 142, 143, 144, 145, 146, -1,
6493 -1, -1, -1, -1, 152, 153, 154, 155, 0, -1,
6494 158, 159, 160, -1, -1, -1, 8, 9, 10, -1,
6495 -1, 13, 14, 15, -1, 17, -1, -1, -1, -1,
6496 -1, -1, -1, 25, 26, 27, 28, -1, -1, -1,
6497 -1, -1, -1, -1, -1, 37, 38, -1, 40, 41,
6498 42, 43, 44, -1, -1, -1, -1, -1, -1, -1,
6499 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6500 -1, -1, -1, -1, -1, -1, 68, 69, -1, -1,
6501 -1, -1, -1, -1, -1, -1, 78, 79, 80, 81,
6502 82, 83, 84, 85, 86, 87, 88, 89, 90, -1,
6503 -1, -1, -1, 95, 96, 97, 98, -1, -1, 101,
6504 -1, -1, -1, -1, 106, -1, -1, -1, -1, -1,
6505 -1, -1, -1, -1, -1, -1, -1, -1, 120, -1,
6506 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6507 -1, -1, -1, 135, -1, 137, 138, 139, 140, 141,
6508 142, 143, 144, 145, 146, -1, -1, -1, -1, 151,
6509 152, 153, 154, 155, 0, 157, 158, 159, 160, -1,
6510 -1, -1, 8, 9, 10, -1, -1, 13, 14, 15,
6511 -1, 17, -1, -1, -1, -1, -1, -1, -1, 25,
6512 -1, 27, 28, -1, -1, -1, -1, -1, -1, -1,
6513 -1, 37, 38, -1, 40, 41, 42, 43, 44, -1,
6514 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6515 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6516 -1, -1, 68, 69, -1, -1, -1, -1, -1, -1,
6517 -1, -1, 78, 79, 80, 81, 82, 83, 84, 85,
6518 86, 87, 88, 89, 90, -1, -1, -1, -1, 95,
6519 96, 97, 98, -1, 100, 101, -1, -1, -1, -1,
6520 106, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6521 -1, -1, -1, -1, 120, -1, -1, -1, -1, -1,
6522 -1, -1, -1, -1, -1, -1, -1, -1, 134, 135,
6523 -1, 137, 138, 139, 140, 141, 142, 143, 144, 145,
6524 146, -1, -1, -1, -1, 151, 152, 153, 154, 155,
6525 0, -1, 158, 159, 160, -1, -1, -1, 8, 9,
6526 10, -1, -1, 13, 14, 15, -1, 17, -1, -1,
6527 -1, -1, -1, -1, -1, 25, -1, 27, 28, -1,
6528 -1, -1, -1, -1, -1, -1, -1, 37, 38, -1,
6529 40, 41, 42, 43, 44, -1, -1, -1, -1, -1,
6530 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6531 -1, -1, -1, -1, -1, -1, -1, -1, 68, 69,
6532 -1, -1, -1, -1, -1, -1, -1, -1, 78, 79,
6533 80, 81, 82, 83, 84, 85, 86, 87, 88, 89,
6534 90, -1, -1, -1, -1, 95, 96, 97, 98, -1,
6535 -1, 101, -1, -1, -1, -1, 106, -1, -1, -1,
6536 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6537 120, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6538 -1, -1, -1, -1, -1, 135, -1, 137, 138, 139,
6539 140, 141, 142, 143, 144, 145, 146, -1, -1, -1,
6540 -1, -1, 152, 153, 154, 155, 0, 157, 158, 159,
6541 160, -1, -1, -1, 8, 9, 10, 44, -1, -1,
6542 14, 15, -1, 17, -1, -1, -1, -1, -1, -1,
6543 -1, 25, 26, -1, -1, -1, -1, -1, -1, -1,
6544 -1, -1, -1, 37, 38, -1, 40, 41, 42, 43,
6545 44, 78, 79, 80, 81, 82, 83, 84, 85, 86,
6546 87, 88, 89, 90, -1, -1, -1, -1, 95, 96,
6547 -1, -1, -1, -1, 68, 69, -1, -1, -1, -1,
6548 -1, -1, -1, -1, 78, 79, 80, 81, 82, 83,
6549 84, 85, 86, 87, 88, 89, 90, -1, -1, -1,
6550 -1, 95, 96, 97, 98, -1, 100, 101, 135, -1,
6551 137, 138, 139, 140, 141, 142, 143, 144, 145, 146,
6552 -1, -1, -1, -1, -1, -1, 120, -1, -1, -1,
6553 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6554 134, 135, -1, 137, 138, 139, 140, 141, 142, 143,
6555 144, 145, 146, -1, -1, -1, -1, 151, 152, 153,
6556 154, 155, 0, -1, 158, -1, 160, -1, -1, -1,
6557 8, 9, 10, -1, -1, -1, 14, 15, -1, 17,
6558 -1, -1, -1, -1, -1, -1, -1, 25, -1, -1,
6559 -1, -1, -1, -1, -1, -1, -1, -1, -1, 37,
6560 38, -1, 40, 41, 42, 43, 44, -1, -1, -1,
6561 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6562 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6563 68, 69, -1, -1, -1, -1, -1, -1, -1, -1,
6564 78, 79, 80, 81, 82, 83, 84, 85, 86, 87,
6565 88, 89, 90, -1, -1, -1, -1, 95, 96, 97,
6566 98, -1, 100, 101, -1, -1, -1, -1, -1, -1,
6567 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6568 -1, -1, 120, -1, -1, -1, -1, -1, -1, -1,
6569 -1, -1, -1, -1, -1, -1, 134, 135, -1, 137,
6570 138, 139, 140, 141, 142, 143, 144, 145, 146, -1,
6571 -1, -1, -1, 151, 152, 153, 154, 155, 0, -1,
6572 158, -1, 160, -1, -1, -1, 8, 9, 10, -1,
6573 -1, -1, 14, 15, -1, 17, -1, -1, -1, -1,
6574 -1, -1, -1, 25, -1, -1, -1, -1, -1, -1,
6575 -1, -1, -1, -1, -1, 37, 38, -1, 40, 41,
6576 42, 43, 44, -1, -1, -1, -1, -1, -1, -1,
6577 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6578 -1, -1, -1, -1, -1, -1, 68, 69, -1, -1,
6579 -1, -1, -1, -1, -1, -1, 78, 79, 80, 81,
6580 82, 83, 84, 85, 86, 87, 88, 89, 90, -1,
6581 -1, -1, -1, 95, 96, 97, 98, -1, 100, 101,
6582 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6583 -1, -1, -1, -1, -1, -1, -1, -1, 120, -1,
6584 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6585 -1, -1, 134, 135, -1, 137, 138, 139, 140, 141,
6586 142, 143, 144, 145, 146, -1, -1, -1, -1, 151,
6587 152, 153, 154, 155, -1, -1, 158, 1, 160, 3,
6588 4, 5, 6, 7, 8, 9, 10, 11, 12, -1,
6589 -1, 15, 16, -1, 18, 19, 20, 21, 22, 23,
6590 24, -1, -1, -1, -1, -1, 30, 31, 32, 33,
6591 34, 35, 36, -1, -1, 39, -1, -1, -1, -1,
6592 -1, 45, 46, 47, 48, 49, 50, 51, 52, 53,
6593 54, 55, 56, 57, -1, 59, 60, 61, 62, 63,
6594 64, 65, -1, -1, 68, -1, -1, -1, -1, -1,
6595 -1, -1, 76, 77, -1, -1, -1, -1, -1, -1,
6596 -1, -1, -1, -1, -1, -1, -1, 91, 92, -1,
6597 -1, -1, -1, -1, -1, 99, -1, -1, 102, 103,
6598 104, 105, -1, 107, -1, -1, 110, 111, 112, 113,
6599 114, 115, 116, 117, 118, -1, -1, -1, -1, -1,
6600 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6601 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6602 -1, -1, -1, 147, 148, 149, -1, -1, -1, 1,
6603 154, 3, 4, 5, 6, 7, 160, -1, 10, 11,
6604 12, -1, 14, 15, 16, -1, 18, 19, 20, 21,
6605 22, 23, 24, -1, -1, -1, -1, -1, 30, 31,
6606 32, 33, 34, 35, 36, -1, -1, 39, -1, -1,
6607 -1, -1, -1, 45, 46, 47, 48, 49, 50, 51,
6608 52, 53, 54, 55, 56, 57, -1, 59, 60, 61,
6609 62, 63, 64, 65, -1, -1, 68, -1, -1, -1,
6610 -1, -1, -1, -1, 76, 77, -1, -1, -1, -1,
6611 -1, -1, -1, -1, -1, -1, -1, -1, -1, 91,
6612 92, -1, -1, -1, -1, -1, -1, 99, -1, -1,
6613 102, 103, 104, 105, -1, 107, -1, -1, 110, 111,
6614 112, 113, 114, 115, 116, 117, 118, -1, -1, -1,
6615 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6616 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6617 -1, -1, -1, -1, -1, 147, 148, 149, -1, -1,
6618 -1, 1, 154, 3, 4, 5, 6, 7, 160, -1,
6619 10, 11, 12, -1, -1, 15, 16, 17, 18, 19,
6620 20, 21, 22, 23, 24, -1, -1, -1, -1, -1,
6621 30, 31, 32, 33, 34, 35, 36, -1, -1, 39,
6622 -1, -1, -1, -1, -1, 45, 46, 47, 48, 49,
6623 50, 51, 52, 53, 54, 55, 56, 57, -1, 59,
6624 60, 61, 62, 63, 64, 65, -1, -1, 68, -1,
6625 -1, -1, -1, -1, -1, -1, 76, 77, -1, -1,
6626 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6627 -1, 91, 92, -1, -1, -1, -1, -1, -1, 99,
6628 -1, -1, 102, 103, 104, 105, -1, 107, -1, -1,
6629 110, 111, 112, 113, 114, 115, 116, 117, 118, -1,
6630 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6631 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6632 -1, -1, -1, -1, -1, -1, -1, 147, 148, 149,
6633 -1, -1, -1, 1, 154, 3, 4, 5, 6, 7,
6634 160, -1, 10, 11, 12, -1, -1, 15, 16, -1,
6635 18, 19, 20, 21, 22, 23, 24, 25, -1, -1,
6636 -1, -1, 30, 31, 32, 33, 34, 35, 36, -1,
6637 -1, 39, -1, -1, -1, -1, -1, 45, 46, 47,
6638 48, 49, 50, 51, 52, 53, 54, 55, 56, 57,
6639 -1, 59, 60, 61, 62, 63, 64, 65, -1, -1,
6640 68, -1, -1, -1, -1, -1, -1, -1, 76, 77,
6641 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6642 -1, -1, -1, 91, 92, -1, -1, -1, -1, -1,
6643 -1, 99, -1, -1, 102, 103, 104, 105, -1, 107,
6644 -1, -1, 110, 111, 112, 113, 114, 115, 116, 117,
6645 118, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6646 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6647 -1, -1, -1, -1, -1, -1, -1, -1, -1, 147,
6648 148, 149, -1, -1, -1, 1, 154, 3, 4, 5,
6649 6, 7, 160, -1, 10, 11, 12, -1, -1, 15,
6650 16, -1, 18, 19, 20, 21, 22, 23, 24, -1,
6651 -1, -1, -1, -1, 30, 31, 32, 33, 34, 35,
6652 36, -1, -1, 39, -1, -1, -1, -1, -1, 45,
6653 46, 47, 48, 49, 50, 51, 52, 53, 54, 55,
6654 56, 57, -1, 59, 60, 61, 62, 63, 64, 65,
6655 -1, -1, 68, -1, -1, -1, -1, -1, -1, -1,
6656 76, 77, -1, -1, -1, -1, -1, -1, -1, -1,
6657 -1, -1, -1, -1, -1, 91, 92, -1, -1, -1,
6658 -1, -1, -1, 99, -1, -1, 102, 103, 104, 105,
6659 -1, 107, -1, -1, 110, 111, 112, 113, 114, 115,
6660 116, 117, 118, -1, -1, -1, -1, -1, -1, -1,
6661 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6662 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6663 -1, 147, 148, 149, -1, -1, -1, 1, 154, 3,
6664 4, 5, 6, 7, 160, 9, 10, 11, 12, -1,
6665 -1, -1, 16, -1, 18, 19, 20, 21, 22, 23,
6666 24, -1, -1, -1, -1, -1, 30, 31, 32, 33,
6667 34, 35, 36, -1, -1, 39, -1, -1, -1, -1,
6668 -1, 45, 46, 47, 48, 49, 50, 51, 52, 53,
6669 54, 55, 56, 57, -1, 59, 60, 61, 62, 63,
6670 64, 65, -1, -1, 68, -1, -1, -1, -1, -1,
6671 -1, -1, 76, 77, -1, -1, -1, -1, -1, -1,
6672 -1, -1, -1, -1, -1, -1, -1, 91, 92, -1,
6673 -1, -1, -1, -1, -1, 99, -1, -1, 102, 103,
6674 104, 105, -1, 107, -1, -1, 110, 111, 112, 113,
6675 114, 115, 116, 117, 118, -1, -1, -1, -1, -1,
6676 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6677 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6678 -1, -1, -1, 147, 148, 149, -1, -1, -1, 1,
6679 154, 3, 4, 5, 6, 7, 160, -1, 10, 11,
6680 12, -1, -1, -1, 16, -1, 18, 19, 20, 21,
6681 22, 23, 24, -1, -1, -1, -1, -1, 30, 31,
6682 32, 33, 34, 35, 36, -1, -1, 39, -1, -1,
6683 -1, -1, -1, 45, 46, 47, 48, 49, 50, 51,
6684 52, 53, 54, 55, 56, 57, -1, 59, 60, 61,
6685 62, 63, 64, 65, -1, -1, 68, -1, -1, -1,
6686 -1, -1, -1, -1, 76, 77, -1, -1, -1, -1,
6687 -1, -1, -1, -1, -1, -1, -1, -1, -1, 91,
6688 92, -1, -1, -1, -1, -1, -1, 99, -1, -1,
6689 102, 103, 104, 105, -1, 107, -1, -1, 110, 111,
6690 112, 113, 114, 115, 116, 117, 118, -1, -1, -1,
6691 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6692 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6693 -1, -1, -1, -1, -1, 147, 148, 149, -1, -1,
6694 -1, 1, 154, 3, 4, 5, 6, 7, 160, -1,
6695 -1, 11, 12, -1, -1, -1, 16, -1, 18, 19,
6696 20, 21, 22, 23, 24, -1, -1, -1, -1, -1,
6697 30, 31, 32, 33, 34, 35, 36, -1, -1, 39,
6698 -1, -1, -1, -1, -1, 45, 46, 47, 48, 49,
6699 50, 51, 52, 53, 54, 55, 56, 57, -1, 59,
6700 60, 61, 62, 63, 64, 65, -1, -1, -1, -1,
6701 -1, -1, -1, -1, -1, -1, 76, 77, -1, -1,
6702 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6703 -1, 91, 92, -1, -1, -1, -1, -1, -1, 99,
6704 -1, -1, 102, 103, 104, 105, -1, 107, -1, -1,
6705 110, 111, 112, 113, 114, 115, 116, 117, 118, -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, -1, -1, -1, -1, -1, 147, 148, 149,
6709 -1, -1, -1, -1, 154, -1, -1, -1, 158, 1,
6710 160, 3, 4, 5, 6, 7, -1, -1, -1, 11,
6711 12, -1, -1, -1, 16, -1, 18, 19, 20, 21,
6712 22, 23, 24, -1, -1, -1, -1, -1, 30, 31,
6713 32, 33, 34, 35, 36, -1, -1, 39, -1, -1,
6714 -1, -1, -1, 45, 46, 47, 48, 49, 50, 51,
6715 52, 53, 54, 55, 56, 57, -1, 59, 60, 61,
6716 62, 63, 64, 65, -1, -1, -1, -1, -1, -1,
6717 -1, -1, -1, -1, 76, 77, -1, -1, -1, -1,
6718 -1, -1, -1, -1, -1, -1, -1, -1, -1, 91,
6719 92, -1, -1, -1, -1, -1, -1, 99, -1, -1,
6720 102, 103, 104, 105, -1, 107, -1, -1, 110, 111,
6721 112, 113, 114, 115, 116, 117, 118, -1, -1, -1,
6722 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6723 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6724 -1, -1, -1, -1, -1, 147, 148, 149, -1, -1,
6725 -1, -1, 154, -1, -1, -1, 158, 1, 160, 3,
6726 4, 5, 6, 7, -1, -1, -1, 11, 12, -1,
6727 -1, -1, 16, -1, 18, 19, 20, 21, 22, 23,
6728 24, -1, -1, -1, -1, -1, 30, 31, 32, 33,
6729 34, 35, 36, -1, -1, 39, -1, -1, -1, -1,
6730 -1, 45, 46, 47, 48, 49, 50, 51, 52, 53,
6731 54, 55, 56, 57, -1, 59, 60, 61, 62, 63,
6732 64, 65, -1, -1, -1, -1, -1, -1, -1, -1,
6733 -1, -1, 76, 77, -1, -1, -1, -1, -1, -1,
6734 -1, -1, -1, -1, -1, -1, -1, 91, 92, -1,
6735 -1, -1, -1, -1, -1, 99, -1, -1, 102, 103,
6736 104, 105, -1, 107, -1, -1, 110, 111, 112, 113,
6737 114, 115, 116, 117, 118, -1, -1, -1, -1, -1,
6738 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6739 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6740 -1, -1, -1, 147, 148, 149, -1, -1, 152, 1,
6741 154, 3, 4, 5, 6, 7, 160, -1, -1, 11,
6742 12, -1, -1, -1, 16, -1, 18, 19, 20, 21,
6743 22, 23, 24, -1, -1, -1, -1, -1, 30, 31,
6744 32, 33, 34, 35, 36, -1, -1, 39, -1, -1,
6745 -1, -1, -1, 45, 46, 47, 48, 49, 50, 51,
6746 52, 53, 54, 55, 56, 57, -1, 59, 60, 61,
6747 62, 63, 64, 65, -1, -1, -1, -1, -1, -1,
6748 -1, -1, -1, -1, 76, 77, -1, -1, -1, -1,
6749 -1, -1, -1, -1, -1, -1, -1, -1, -1, 91,
6750 92, -1, -1, -1, -1, -1, -1, 99, -1, -1,
6751 102, 103, 104, 105, -1, 107, -1, -1, 110, 111,
6752 112, 113, 114, 115, 116, 117, 118, -1, -1, -1,
6753 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6754 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6755 -1, -1, -1, -1, -1, 147, 148, 149, -1, -1,
6756 152, 1, 154, 3, 4, 5, -1, 7, 160, -1,
6757 -1, 11, 12, -1, -1, -1, 16, 17, 18, 19,
6758 20, 21, 22, 23, 24, -1, -1, -1, -1, -1,
6759 30, 31, 32, 33, 34, 35, 36, -1, -1, 39,
6760 -1, -1, -1, -1, -1, -1, 46, -1, -1, 49,
6761 50, 51, 52, 53, 54, 55, 56, 57, -1, 59,
6762 60, 61, 62, 63, 64, 65, -1, -1, -1, -1,
6763 -1, -1, -1, -1, -1, -1, 76, 77, -1, -1,
6764 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6765 -1, 91, 92, -1, -1, -1, -1, -1, -1, 99,
6766 -1, -1, 102, 103, 104, 105, -1, -1, -1, -1,
6767 110, 111, 112, 113, 114, 115, 116, 117, 118, -1,
6768 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6769 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6770 -1, -1, -1, -1, -1, -1, -1, 147, 148, 149,
6771 -1, -1, -1, -1, 154, -1, -1, -1, -1, -1,
6772 160, 3, 4, 5, 6, 7, 8, 9, 10, 11,
6773 12, 13, 14, 15, 16, 17, 18, 19, 20, 21,
6774 22, 23, 24, 25, 26, -1, -1, -1, 30, 31,
6775 32, 33, 34, 35, 36, 37, 38, 39, -1, -1,
6776 -1, -1, -1, 45, 46, 47, 48, 49, 50, 51,
6777 52, 53, 54, 55, 56, 57, -1, -1, -1, -1,
6778 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6779 -1, -1, -1, -1, 76, 77, 78, 79, 80, 81,
6780 82, 83, 84, -1, -1, 87, 88, -1, -1, -1,
6781 -1, 93, 94, 95, 96, -1, -1, -1, -1, -1,
6782 -1, -1, -1, -1, -1, 107, 108, -1, -1, -1,
6783 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6784 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6785 -1, -1, -1, -1, -1, 137, 138, 139, 140, 141,
6786 142, 143, 144, 145, 146, -1, 148, 149, -1, -1,
6787 -1, -1, -1, -1, 156, 157, 3, 4, 5, 6,
6788 7, 8, 9, 10, 11, 12, 13, 14, 15, 16,
6789 17, 18, 19, 20, 21, 22, 23, 24, 25, 26,
6790 -1, -1, -1, 30, 31, 32, 33, 34, 35, 36,
6791 37, 38, 39, -1, -1, -1, -1, -1, 45, 46,
6792 47, 48, 49, 50, 51, 52, 53, 54, 55, 56,
6793 57, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6794 -1, -1, -1, -1, -1, -1, -1, -1, -1, 76,
6795 77, 78, 79, 80, 81, 82, 83, 84, -1, -1,
6796 87, 88, -1, -1, -1, -1, 93, 94, 95, 96,
6797 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6798 107, 108, -1, -1, -1, -1, -1, -1, -1, -1,
6799 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6800 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6801 137, 138, 139, 140, 141, 142, 143, 144, 145, 146,
6802 -1, 148, 149, -1, -1, -1, -1, -1, -1, 156,
6803 3, 4, 5, 6, 7, 8, 9, 10, 11, 12,
6804 13, 14, 15, 16, 17, 18, 19, 20, 21, 22,
6805 23, 24, 25, 26, -1, -1, -1, 30, 31, 32,
6806 33, 34, 35, 36, 37, 38, 39, -1, -1, -1,
6807 -1, -1, 45, 46, 47, 48, 49, 50, 51, 52,
6808 53, 54, -1, 56, -1, -1, -1, -1, -1, -1,
6809 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6810 -1, -1, -1, 76, 77, 78, 79, 80, 81, 82,
6811 83, 84, -1, -1, 87, 88, -1, -1, -1, -1,
6812 93, 94, 95, 96, -1, -1, -1, -1, -1, -1,
6813 -1, -1, -1, -1, 107, 108, -1, -1, 111, -1,
6814 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6815 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6816 -1, -1, -1, -1, 137, 138, 139, 140, 141, 142,
6817 143, 144, 145, 146, -1, 148, 149, -1, -1, -1,
6818 -1, -1, -1, 156, 3, 4, 5, 6, 7, 8,
6819 9, 10, 11, 12, 13, 14, 15, 16, 17, 18,
6820 19, 20, 21, 22, 23, 24, 25, 26, -1, -1,
6821 -1, 30, 31, 32, 33, 34, 35, 36, 37, 38,
6822 39, -1, -1, -1, -1, -1, 45, 46, 47, 48,
6823 49, 50, 51, 52, 53, -1, -1, 56, -1, -1,
6824 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6825 -1, -1, -1, -1, -1, -1, -1, 76, 77, 78,
6826 79, 80, 81, 82, 83, 84, -1, -1, 87, 88,
6827 -1, -1, -1, -1, 93, 94, 95, 96, -1, -1,
6828 -1, -1, -1, -1, -1, -1, -1, -1, 107, 108,
6829 -1, -1, 111, -1, -1, -1, -1, -1, -1, -1,
6830 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6831 -1, -1, -1, -1, -1, -1, -1, -1, 137, 138,
6832 139, 140, 141, 142, 143, 144, 145, 146, -1, 148,
6833 149, -1, -1, -1, -1, -1, -1, 156, 3, 4,
6834 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
6835 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
6836 25, 26, -1, -1, -1, 30, 31, 32, 33, 34,
6837 35, 36, 37, 38, 39, -1, -1, -1, -1, -1,
6838 45, 46, 47, 48, 49, 50, 51, 52, 53, -1,
6839 -1, 56, -1, -1, -1, -1, -1, -1, -1, -1,
6840 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6841 -1, 76, 77, 78, 79, 80, 81, 82, 83, 84,
6842 -1, -1, 87, 88, -1, -1, -1, -1, 93, 94,
6843 95, 96, -1, -1, -1, -1, -1, -1, -1, -1,
6844 -1, -1, 107, 108, -1, -1, -1, -1, -1, -1,
6845 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6846 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6847 -1, -1, 137, 138, 139, 140, 141, 142, 143, 144,
6848 145, 146, -1, 148, 149, 3, 4, 5, -1, 7,
6849 -1, 156, -1, 11, 12, -1, -1, -1, 16, -1,
6850 18, 19, 20, 21, 22, 23, 24, -1, -1, -1,
6851 -1, -1, 30, 31, 32, 33, 34, 35, 36, -1,
6852 -1, 39, -1, -1, -1, -1, -1, -1, 46, -1,
6853 -1, 49, 50, 51, 52, 53, 54, 55, 56, 57,
6854 -1, 59, 60, 61, 62, 63, 64, 65, -1, -1,
6855 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6856 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6857 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6858 -1, 99, -1, -1, 102, 103, 104, 105, -1, -1,
6859 -1, -1, 110, 111, 112, 113, 114, 115, 116, 117,
6860 118, -1, -1, 3, 4, 5, -1, 7, -1, -1,
6861 -1, 11, 12, -1, -1, -1, 16, -1, 18, 19,
6862 20, 21, 22, 23, 24, -1, -1, -1, -1, 147,
6863 30, 31, 32, 33, 34, 35, 36, 155, -1, 39,
6864 -1, -1, -1, -1, -1, -1, 46, -1, -1, 49,
6865 50, 51, 52, 53, 54, 55, 56, 57, -1, 59,
6866 60, 61, 62, 63, 64, 65, -1, -1, -1, -1,
6867 -1, -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, 99,
6870 -1, -1, 102, 103, 104, 105, -1, -1, -1, -1,
6871 110, 111, 112, 113, 114, 115, 116, 117, 118, -1,
6872 -1, 3, 4, 5, -1, 7, -1, -1, -1, 11,
6873 12, -1, -1, -1, 16, -1, 18, 19, 20, 21,
6874 22, 23, 24, -1, -1, -1, -1, 147, 30, 31,
6875 32, 33, 34, 35, 36, 155, -1, 39, -1, -1,
6876 -1, -1, -1, -1, 46, -1, -1, 49, 50, 51,
6877 52, 53, 54, 55, 56, 57, 58, 59, 60, 61,
6878 62, 63, 64, 65, -1, -1, -1, -1, -1, -1,
6879 -1, -1, -1, -1, 76, 77, -1, -1, -1, -1,
6880 -1, -1, -1, -1, -1, -1, -1, -1, -1, 91,
6881 92, -1, -1, -1, -1, -1, -1, 99, -1, -1,
6882 102, 103, 104, 105, -1, 107, 108, 109, 110, 111,
6883 112, 113, 114, 115, 116, 117, 118, -1, -1, -1,
6884 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6885 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6886 3, 4, 5, -1, 7, 147, 148, 149, 11, 12,
6887 -1, -1, 154, 16, -1, 18, 19, 20, 21, 22,
6888 23, 24, -1, -1, -1, -1, -1, 30, 31, 32,
6889 33, 34, 35, 36, -1, -1, 39, -1, -1, -1,
6890 -1, -1, -1, 46, -1, -1, 49, 50, 51, 52,
6891 53, 54, 55, 56, 57, -1, 59, 60, 61, 62,
6892 63, 64, 65, -1, -1, -1, -1, -1, -1, -1,
6893 -1, -1, -1, 76, 77, -1, -1, -1, -1, -1,
6894 -1, -1, -1, -1, -1, -1, -1, -1, 91, 92,
6895 -1, -1, -1, -1, -1, -1, 99, -1, -1, 102,
6896 103, 104, 105, -1, -1, -1, -1, 110, 111, 112,
6897 113, 114, 115, 116, 117, 118, -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, 3,
6900 4, 5, 6, 7, 147, 148, 149, 11, 12, -1,
6901 -1, 154, 16, -1, 18, 19, 20, 21, 22, 23,
6902 24, -1, -1, -1, -1, -1, 30, 31, 32, 33,
6903 34, 35, 36, -1, -1, 39, -1, -1, -1, -1,
6904 -1, 45, 46, -1, 48, 49, 50, 51, 52, 53,
6905 54, 55, 56, 57, -1, 59, 60, 61, 62, 63,
6906 64, 65, -1, -1, -1, -1, -1, -1, -1, -1,
6907 -1, -1, 76, 77, -1, -1, -1, -1, -1, -1,
6908 -1, -1, -1, -1, -1, -1, -1, 91, 92, -1,
6909 -1, -1, -1, -1, -1, 99, -1, -1, 102, 103,
6910 104, 105, -1, 107, -1, -1, 110, 111, 112, 113,
6911 114, 115, 116, 117, 118, -1, -1, 1, -1, 3,
6912 4, 5, -1, 7, -1, -1, -1, 11, 12, -1,
6913 -1, -1, 16, -1, 18, 19, 20, 21, 22, 23,
6914 24, -1, -1, 147, 148, 149, 30, 31, 32, 33,
6915 34, 35, 36, -1, -1, 39, -1, -1, -1, -1,
6916 -1, -1, 46, -1, -1, 49, 50, 51, 52, 53,
6917 54, 55, 56, 57, -1, 59, 60, 61, 62, 63,
6918 64, 65, -1, -1, -1, -1, -1, -1, -1, -1,
6919 -1, -1, 76, 77, -1, -1, -1, -1, -1, -1,
6920 -1, -1, -1, -1, -1, -1, -1, 91, 92, -1,
6921 -1, -1, -1, -1, -1, 99, -1, -1, 102, 103,
6922 104, 105, -1, -1, -1, -1, 110, 111, 112, 113,
6923 114, 115, 116, 117, 118, -1, -1, -1, -1, 3,
6924 4, 5, -1, 7, -1, -1, -1, 11, 12, -1,
6925 -1, -1, 16, -1, 18, 19, 20, 21, 22, 23,
6926 24, -1, -1, 147, 148, 149, 30, 31, 32, 33,
6927 34, 35, 36, -1, -1, 39, -1, -1, -1, -1,
6928 -1, -1, 46, -1, -1, 49, 50, 51, 52, 53,
6929 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
6930 64, 65, -1, -1, -1, -1, -1, -1, -1, -1,
6931 -1, -1, 76, 77, -1, -1, -1, -1, -1, -1,
6932 -1, -1, -1, -1, -1, -1, -1, 91, 92, -1,
6933 -1, -1, -1, -1, -1, 99, -1, -1, 102, 103,
6934 104, 105, -1, 107, 108, 109, 110, 111, 112, 113,
6935 114, 115, 116, 117, 118, -1, -1, -1, -1, 3,
6936 4, 5, -1, 7, -1, -1, -1, 11, 12, -1,
6937 -1, -1, 16, -1, 18, 19, 20, 21, 22, 23,
6938 24, -1, -1, 147, 148, 149, 30, 31, 32, 33,
6939 34, 35, 36, -1, -1, 39, -1, -1, -1, -1,
6940 -1, -1, 46, -1, -1, 49, 50, 51, 52, 53,
6941 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
6942 64, 65, -1, -1, -1, -1, -1, -1, -1, -1,
6943 -1, -1, 76, 77, -1, -1, -1, -1, -1, -1,
6944 -1, -1, -1, -1, -1, -1, -1, 91, 92, -1,
6945 -1, -1, -1, -1, -1, 99, -1, -1, 102, 103,
6946 104, 105, -1, 107, 108, 109, 110, 111, 112, 113,
6947 114, 115, 116, 117, 118, -1, -1, -1, -1, 3,
6948 4, 5, -1, 7, -1, -1, -1, 11, 12, -1,
6949 -1, -1, 16, -1, 18, 19, 20, 21, 22, 23,
6950 24, -1, -1, 147, 148, 149, 30, 31, 32, 33,
6951 34, 35, 36, -1, -1, 39, -1, -1, -1, -1,
6952 -1, -1, 46, -1, -1, 49, 50, 51, 52, 53,
6953 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
6954 64, 65, -1, -1, -1, -1, -1, -1, -1, -1,
6955 -1, -1, 76, 77, -1, -1, -1, -1, -1, -1,
6956 -1, -1, -1, -1, -1, -1, -1, 91, 92, -1,
6957 -1, -1, -1, -1, -1, 99, -1, -1, 102, 103,
6958 104, 105, -1, 107, 108, 109, 110, 111, 112, 113,
6959 114, 115, 116, 117, 118, -1, -1, -1, -1, 3,
6960 4, 5, -1, 7, -1, -1, -1, 11, 12, -1,
6961 -1, -1, 16, -1, 18, 19, 20, 21, 22, 23,
6962 24, -1, -1, 147, 148, 149, 30, 31, 32, 33,
6963 34, 35, 36, -1, -1, 39, -1, -1, -1, -1,
6964 -1, -1, 46, -1, -1, 49, 50, 51, 52, 53,
6965 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
6966 64, 65, -1, -1, -1, -1, -1, -1, -1, -1,
6967 -1, -1, 76, 77, -1, -1, -1, -1, -1, -1,
6968 -1, -1, -1, -1, -1, -1, -1, 91, 92, -1,
6969 -1, -1, -1, -1, -1, 99, -1, -1, 102, 103,
6970 104, 105, -1, 107, 108, 109, 110, 111, 112, 113,
6971 114, 115, 116, 117, 118, -1, -1, -1, -1, 3,
6972 4, 5, -1, 7, -1, -1, -1, 11, 12, -1,
6973 -1, -1, 16, -1, 18, 19, 20, 21, 22, 23,
6974 24, -1, -1, 147, 148, 149, 30, 31, 32, 33,
6975 34, 35, 36, -1, -1, 39, -1, -1, -1, -1,
6976 -1, -1, 46, -1, -1, 49, 50, 51, 52, 53,
6977 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
6978 64, 65, -1, -1, -1, -1, -1, -1, -1, -1,
6979 -1, -1, 76, 77, -1, -1, -1, -1, -1, -1,
6980 -1, -1, -1, -1, -1, -1, -1, 91, 92, -1,
6981 -1, -1, -1, -1, -1, 99, -1, -1, 102, 103,
6982 104, 105, -1, 107, 108, -1, 110, 111, 112, 113,
6983 114, 115, 116, 117, 118, -1, -1, -1, -1, 3,
6984 4, 5, -1, 7, -1, -1, -1, 11, 12, -1,
6985 -1, -1, 16, -1, 18, 19, 20, 21, 22, 23,
6986 24, -1, -1, 147, 148, 149, 30, 31, 32, 33,
6987 34, 35, 36, -1, -1, 39, -1, -1, -1, -1,
6988 -1, -1, 46, -1, -1, 49, 50, 51, 52, 53,
6989 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
6990 64, 65, -1, -1, -1, -1, -1, -1, -1, -1,
6991 -1, -1, 76, 77, -1, -1, -1, -1, -1, -1,
6992 -1, -1, -1, -1, -1, -1, -1, 91, 92, -1,
6993 -1, -1, -1, -1, -1, 99, -1, -1, 102, 103,
6994 104, 105, -1, -1, 108, 109, 110, 111, 112, 113,
6995 114, 115, 116, 117, 118, -1, -1, -1, -1, 3,
6996 4, 5, -1, 7, -1, -1, -1, 11, 12, -1,
6997 -1, -1, 16, -1, 18, 19, 20, 21, 22, 23,
6998 24, -1, -1, 147, 148, 149, 30, 31, 32, 33,
6999 34, 35, 36, -1, -1, 39, -1, -1, -1, -1,
7000 -1, -1, 46, -1, -1, 49, 50, 51, 52, 53,
7001 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
7002 64, 65, -1, -1, -1, -1, -1, -1, -1, -1,
7003 -1, -1, 76, 77, -1, -1, -1, -1, -1, -1,
7004 -1, -1, -1, -1, -1, -1, -1, 91, 92, -1,
7005 -1, -1, -1, -1, -1, 99, -1, -1, 102, 103,
7006 104, 105, -1, -1, 108, -1, 110, 111, 112, 113,
7007 114, 115, 116, 117, 118, -1, -1, -1, -1, 3,
7008 4, 5, -1, 7, -1, -1, -1, 11, 12, -1,
7009 -1, -1, 16, -1, 18, 19, 20, 21, 22, 23,
7010 24, -1, -1, 147, 148, 149, 30, 31, 32, 33,
7011 34, 35, 36, -1, -1, 39, -1, -1, -1, -1,
7012 -1, -1, 46, -1, -1, 49, 50, 51, 52, 53,
7013 54, 55, 56, 57, -1, 59, 60, 61, 62, 63,
7014 64, 65, -1, -1, -1, -1, -1, -1, -1, -1,
7015 -1, -1, 76, 77, -1, -1, -1, -1, -1, -1,
7016 -1, -1, -1, -1, -1, -1, -1, 91, 92, -1,
7017 -1, -1, -1, -1, -1, 99, -1, -1, 102, 103,
7018 104, 105, -1, 107, -1, -1, 110, 111, 112, 113,
7019 114, 115, 116, 117, 118, -1, -1, -1, -1, 3,
7020 4, 5, -1, 7, -1, -1, -1, 11, 12, -1,
7021 -1, -1, 16, -1, 18, 19, 20, 21, 22, 23,
7022 24, -1, -1, 147, 148, 149, 30, 31, 32, 33,
7023 34, 35, 36, -1, -1, 39, -1, -1, -1, -1,
7024 -1, -1, 46, -1, -1, 49, 50, 51, 52, 53,
7025 54, 55, 56, 57, -1, 59, 60, 61, 62, 63,
7026 64, 65, -1, -1, -1, -1, -1, -1, -1, -1,
7027 -1, -1, 76, 77, -1, -1, -1, -1, -1, -1,
7028 -1, -1, -1, -1, -1, -1, -1, 91, 92, -1,
7029 -1, -1, -1, -1, -1, 99, -1, -1, 102, 103,
7030 104, 105, -1, 107, -1, -1, 110, 111, 112, 113,
7031 114, 115, 116, 117, 118, -1, -1, -1, -1, 3,
7032 4, 5, -1, 7, -1, -1, -1, 11, 12, -1,
7033 -1, -1, 16, -1, 18, 19, 20, 21, 22, 23,
7034 24, -1, -1, 147, 148, 149, 30, 31, 32, 33,
7035 34, 35, 36, -1, -1, 39, -1, -1, -1, -1,
7036 -1, -1, 46, -1, -1, 49, 50, 51, 52, 53,
7037 54, 55, 56, 57, -1, 59, 60, 61, 62, 63,
7038 64, 65, -1, -1, -1, -1, -1, -1, -1, -1,
7039 -1, -1, 76, 77, -1, -1, -1, -1, -1, -1,
7040 -1, -1, -1, -1, -1, -1, -1, 91, 92, -1,
7041 -1, -1, -1, -1, -1, 99, -1, -1, 102, 103,
7042 104, 105, -1, 107, -1, -1, 110, 111, 112, 113,
7043 114, 115, 116, 117, 118, -1, -1, -1, -1, 3,
7044 4, 5, -1, 7, -1, -1, -1, 11, 12, -1,
7045 -1, -1, 16, -1, 18, 19, 20, 21, 22, 23,
7046 24, -1, -1, 147, 148, 149, 30, 31, 32, 33,
7047 34, 35, 36, -1, -1, 39, -1, -1, -1, -1,
7048 -1, -1, 46, -1, -1, 49, 50, 51, 52, 53,
7049 54, 55, 56, 57, -1, 59, 60, 61, 62, 63,
7050 64, 65, -1, -1, -1, -1, -1, -1, -1, -1,
7051 -1, -1, 76, 77, -1, -1, -1, -1, -1, -1,
7052 -1, -1, -1, -1, -1, -1, -1, 91, 92, -1,
7053 -1, -1, -1, -1, -1, 99, -1, -1, 102, 103,
7054 104, 105, -1, 107, -1, -1, 110, 111, 112, 113,
7055 114, 115, 116, 117, 118, -1, -1, -1, -1, 3,
7056 4, 5, -1, 7, -1, -1, -1, 11, 12, -1,
7057 -1, -1, 16, -1, 18, 19, 20, 21, 22, 23,
7058 24, -1, -1, 147, 148, 149, 30, 31, 32, 33,
7059 34, 35, 36, -1, -1, 39, -1, -1, -1, -1,
7060 -1, -1, 46, -1, -1, 49, 50, 51, 52, 53,
7061 54, 55, 56, 57, -1, 59, 60, 61, 62, 63,
7062 64, 65, -1, -1, -1, -1, -1, -1, -1, -1,
7063 -1, -1, 76, 77, -1, -1, -1, -1, -1, -1,
7064 -1, -1, -1, -1, -1, -1, -1, 91, 92, -1,
7065 -1, -1, -1, -1, -1, 99, -1, -1, 102, 103,
7066 104, 105, -1, 107, -1, -1, 110, 111, 112, 113,
7067 114, 115, 116, 117, 118, -1, -1, -1, -1, 3,
7068 4, 5, -1, 7, -1, -1, -1, 11, 12, -1,
7069 -1, -1, 16, -1, 18, 19, 20, 21, 22, 23,
7070 24, -1, -1, 147, 148, 149, 30, 31, 32, 33,
7071 34, 35, 36, -1, -1, 39, -1, -1, -1, -1,
7072 -1, -1, 46, -1, -1, 49, 50, 51, 52, 53,
7073 54, 55, 56, 57, -1, 59, 60, 61, 62, 63,
7074 64, 65, -1, -1, -1, -1, -1, -1, -1, -1,
7075 -1, -1, 76, 77, -1, -1, -1, -1, -1, -1,
7076 -1, -1, -1, -1, -1, -1, -1, 91, 92, -1,
7077 -1, -1, -1, -1, -1, 99, -1, -1, 102, 103,
7078 104, 105, -1, 107, -1, -1, 110, 111, 112, 113,
7079 114, 115, 116, 117, 118, -1, -1, -1, -1, 3,
7080 4, 5, -1, 7, -1, -1, -1, 11, 12, -1,
7081 -1, -1, 16, -1, 18, 19, 20, 21, 22, 23,
7082 24, -1, -1, 147, 148, 149, 30, 31, 32, 33,
7083 34, 35, 36, -1, -1, 39, -1, -1, -1, -1,
7084 -1, -1, 46, -1, -1, 49, 50, 51, 52, 53,
7085 54, 55, 56, 57, -1, 59, 60, 61, 62, 63,
7086 64, 65, -1, -1, -1, -1, -1, -1, -1, -1,
7087 -1, -1, 76, 77, -1, -1, -1, -1, -1, -1,
7088 -1, -1, -1, -1, -1, -1, -1, 91, 92, -1,
7089 -1, -1, -1, -1, -1, 99, -1, -1, 102, 103,
7090 104, 105, -1, -1, -1, -1, 110, 111, 112, 113,
7091 114, 115, 116, 117, 118, -1, -1, -1, -1, 3,
7092 4, 5, -1, 7, -1, -1, -1, 11, 12, -1,
7093 -1, -1, 16, -1, 18, 19, 20, 21, 22, 23,
7094 24, -1, -1, 147, 148, 149, 30, 31, 32, 33,
7095 34, 35, 36, -1, -1, 39, -1, -1, -1, -1,
7096 -1, -1, 46, -1, -1, 49, 50, 51, 52, 53,
7097 54, 55, 56, 57, -1, 59, 60, 61, 62, 63,
7098 64, 65, -1, -1, -1, -1, -1, -1, -1, -1,
7099 -1, -1, 76, 77, -1, -1, -1, -1, -1, -1,
7100 -1, -1, -1, -1, -1, -1, -1, 91, 92, -1,
7101 -1, -1, -1, -1, -1, 99, -1, -1, 102, 103,
7102 104, 105, -1, -1, -1, -1, 110, 111, 112, 113,
7103 114, 115, 116, 117, 118, -1, -1, -1, -1, 3,
7104 4, 5, -1, 7, -1, -1, -1, 11, 12, -1,
7105 -1, -1, 16, -1, 18, 19, 20, 21, 22, 23,
7106 24, -1, -1, 147, 148, 149, 30, 31, 32, 33,
7107 34, 35, 36, -1, -1, 39, -1, -1, -1, -1,
7108 -1, -1, 46, -1, -1, 49, 50, 51, 52, 53,
7109 54, 55, 56, 57, -1, 59, 60, 61, 62, 63,
7110 64, 65, -1, -1, -1, -1, -1, -1, -1, -1,
7111 -1, -1, 76, 77, -1, -1, -1, -1, -1, -1,
7112 -1, -1, -1, -1, -1, -1, -1, 91, 92, -1,
7113 -1, -1, -1, -1, -1, 99, -1, -1, 102, 103,
7114 104, 105, -1, -1, -1, -1, 110, 111, 112, 113,
7115 114, 115, 116, 117, 118, -1, -1, -1, -1, 3,
7116 4, 5, -1, 7, -1, -1, -1, 11, 12, -1,
7117 -1, -1, 16, -1, 18, 19, 20, 21, 22, 23,
7118 24, -1, -1, 147, 148, 149, 30, 31, 32, 33,
7119 34, 35, 36, -1, -1, 39, -1, -1, -1, -1,
7120 -1, -1, 46, -1, -1, 49, 50, 51, 52, 53,
7121 54, 55, 56, 57, -1, 59, 60, 61, 62, 63,
7122 64, 65, -1, -1, -1, -1, -1, -1, -1, -1,
7123 -1, -1, 76, 77, -1, -1, -1, -1, -1, -1,
7124 -1, -1, -1, -1, -1, -1, -1, 91, 92, -1,
7125 -1, -1, -1, -1, -1, 99, -1, -1, 102, 103,
7126 104, 105, -1, -1, -1, -1, 110, 111, 112, 113,
7127 114, 115, 116, 117, 118, -1, -1, -1, -1, 3,
7128 4, 5, -1, 7, -1, -1, -1, 11, 12, -1,
7129 -1, -1, 16, -1, 18, 19, 20, 21, 22, 23,
7130 24, -1, -1, 147, 148, 149, 30, 31, 32, 33,
7131 34, 35, 36, -1, -1, 39, -1, -1, -1, -1,
7132 -1, -1, 46, -1, -1, 49, 50, 51, 52, 53,
7133 54, 55, 56, 57, -1, 59, 60, 61, 62, 63,
7134 64, 65, -1, -1, -1, -1, -1, -1, -1, -1,
7135 -1, -1, 76, 77, -1, -1, -1, -1, -1, -1,
7136 -1, -1, -1, -1, -1, -1, -1, 91, 92, -1,
7137 -1, -1, -1, -1, -1, 99, -1, -1, 102, 103,
7138 104, 105, -1, -1, -1, -1, 110, 111, 112, 113,
7139 114, 115, 116, 117, 118, -1, -1, -1, -1, 3,
7140 4, 5, -1, 7, -1, -1, -1, 11, 12, -1,
7141 -1, -1, 16, -1, 18, 19, 20, 21, 22, 23,
7142 24, -1, -1, 147, 148, 149, 30, 31, 32, 33,
7143 34, 35, 36, -1, -1, 39, -1, -1, -1, -1,
7144 -1, -1, 46, -1, -1, 49, 50, 51, 52, 53,
7145 54, 55, 56, 57, -1, 59, 60, 61, 62, 63,
7146 64, 65, -1, -1, -1, -1, -1, -1, -1, -1,
7147 -1, -1, 76, 77, -1, -1, -1, -1, -1, -1,
7148 -1, -1, -1, -1, -1, -1, -1, 91, 92, -1,
7149 -1, -1, -1, -1, -1, 99, -1, -1, 102, 103,
7150 104, 105, -1, -1, -1, -1, 110, 111, 112, 113,
7151 114, 115, 116, 117, 118, -1, -1, -1, -1, 3,
7152 4, 5, -1, 7, -1, -1, -1, 11, 12, -1,
7153 -1, -1, 16, -1, 18, 19, 20, 21, 22, 23,
7154 24, -1, -1, 147, 148, 149, 30, 31, 32, 33,
7155 34, 35, 36, -1, -1, 39, -1, -1, -1, -1,
7156 -1, -1, 46, -1, -1, 49, 50, 51, 52, 53,
7157 54, 55, 56, 57, -1, 59, 60, 61, 62, 63,
7158 64, 65, -1, -1, -1, -1, -1, -1, -1, -1,
7159 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7160 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7161 -1, -1, -1, -1, -1, 99, -1, -1, 102, 103,
7162 104, 105, -1, 107, -1, -1, 110, 111, 112, 113,
7163 114, 115, 116, 117, 118, -1, -1, 3, 4, 5,
7164 -1, 7, -1, -1, -1, 11, 12, -1, -1, -1,
7165 16, -1, 18, 19, 20, 21, 22, 23, 24, -1,
7166 -1, -1, -1, 147, 30, 31, 32, 33, 34, 35,
7167 36, -1, -1, 39, -1, -1, -1, -1, -1, -1,
7168 46, -1, -1, 49, 50, 51, 52, 53, 54, 55,
7169 56, 57, -1, 59, 60, 61, 62, 63, 64, 65,
7170 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7171 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7172 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7173 -1, -1, -1, 99, -1, -1, 102, 103, 104, 105,
7174 -1, 107, -1, -1, 110, 111, 112, 113, 114, 115,
7175 116, 117, 118, -1, -1, 3, 4, 5, -1, 7,
7176 -1, -1, -1, 11, 12, -1, -1, -1, 16, -1,
7177 18, 19, 20, 21, 22, 23, 24, -1, -1, -1,
7178 -1, 147, 30, 31, 32, 33, 34, 35, 36, -1,
7179 -1, 39, -1, -1, -1, -1, -1, -1, 46, -1,
7180 -1, 49, 50, 51, 52, 53, 54, 55, 56, 57,
7181 -1, 59, 60, 61, 62, 63, 64, 65, -1, -1,
7182 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7183 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7184 -1, -1, -1, -1, -1, -1, -1, 95, -1, -1,
7185 -1, 99, -1, -1, 102, 103, 104, 105, -1, -1,
7186 -1, -1, 110, 111, 112, 113, 114, 115, 116, 117,
7187 118, -1, -1, 3, 4, 5, -1, 7, -1, -1,
7188 -1, 11, 12, -1, -1, -1, 16, -1, 18, 19,
7189 20, 21, 22, 23, 24, -1, -1, -1, -1, 147,
7190 30, 31, 32, 33, 34, 35, 36, -1, -1, 39,
7191 -1, -1, -1, -1, -1, -1, 46, -1, -1, 49,
7192 50, 51, 52, 53, 54, 55, 56, 57, -1, 59,
7193 60, 61, 62, 63, 64, 65, -1, -1, -1, -1,
7194 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7195 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7196 -1, -1, -1, -1, -1, -1, -1, -1, -1, 99,
7197 -1, -1, 102, 103, 104, 105, -1, -1, -1, -1,
7198 110, 111, 112, 113, 114, 115, 116, 117, 118, -1,
7199 -1, 3, 4, 5, -1, 7, -1, -1, -1, 11,
7200 12, -1, -1, -1, 16, -1, 18, 19, 20, 21,
7201 22, 23, 24, -1, -1, -1, -1, 147, 30, 31,
7202 32, 33, 34, 35, 36, -1, -1, 39, -1, -1,
7203 -1, -1, -1, -1, 46, -1, -1, 49, 50, 51,
7204 52, 53, 54, 55, 56, 57, -1, 59, 60, 61,
7205 62, 63, 64, 65, -1, -1, -1, -1, -1, -1,
7206 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7207 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7208 -1, -1, -1, -1, -1, -1, -1, 99, -1, -1,
7209 102, 103, 104, 105, -1, -1, -1, -1, 110, 111,
7210 112, 113, 114, 115, 116, 117, 118, -1, -1, 3,
7211 4, 5, -1, 7, -1, -1, -1, 11, 12, -1,
7212 -1, -1, 16, -1, 18, 19, 20, 21, 22, 23,
7213 24, -1, -1, -1, -1, 147, 30, 31, 32, 33,
7214 34, 35, 36, -1, -1, 39, -1, -1, -1, -1,
7215 -1, -1, 46, -1, -1, 49, 50, 51, 52, 53,
7216 54, 55, 56, 57, -1, 59, 60, 61, 62, 63,
7217 64, 65, -1, -1, -1, -1, -1, -1, -1, -1,
7218 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7219 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7220 -1, -1, -1, -1, -1, 99, -1, -1, 102, 103,
7221 104, 105, -1, -1, -1, -1, 110, 111, 112, 113,
7222 114, 115, 116, 117, 118, -1, -1, 3, 4, 5,
7223 -1, 7, -1, -1, -1, 11, 12, -1, -1, -1,
7224 16, -1, 18, 19, 20, 21, 22, 23, 24, -1,
7225 -1, -1, -1, 147, 30, 31, 32, 33, 34, 35,
7226 36, -1, -1, 39, -1, -1, -1, -1, -1, -1,
7227 46, -1, -1, 49, 50, 51, 52, 53, 54, 55,
7228 56, 57, -1, 59, 60, 61, 62, 63, 64, 65,
7229 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7230 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7231 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7232 -1, -1, -1, 99, -1, -1, 102, 103, 104, 105,
7233 33, 34, 35, 36, 110, 111, 112, 113, 114, 115,
7234 116, 117, 118, -1, -1, -1, 49, 50, 51, 52,
7235 -1, -1, -1, 56, -1, -1, 59, 60, 61, 62,
7236 63, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7237 -1, 147, -1, -1, -1, -1, -1, -1, -1, -1,
7238 -1, -1, -1, -1, -1, -1, -1, -1, 91, 92,
7239 -1, -1, -1, -1, -1, -1, 99, -1, -1, 102,
7240 -1, 104, 105, -1, -1, -1, -1, 110, 111, 112,
7241 113, 114, 115, 116, 117, 118, -1, -1, -1, -1,
7242 -1, 52, 53, -1, -1, 56, -1, -1, -1, -1,
7243 -1, -1, -1, -1, -1, -1, -1, 140, -1, -1,
7244 -1, -1, -1, -1, 147, 76, 77, 78, 79, 80,
7245 81, 82, 83, 84, -1, -1, 87, 88, -1, -1,
7246 -1, -1, 93, 94, 95, 96, -1, -1, -1, -1,
7247 -1, -1, -1, -1, -1, -1, 107, 108, -1, -1,
7248 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7249 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7250 -1, -1, -1, -1, -1, -1, 137, 138, 139, 140,
7251 141, 142, 143, 144, 145, 146, -1, 148, 149, 52,
7252 53, -1, -1, 56, -1, 156, -1, -1, -1, -1,
7253 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7254 -1, -1, -1, 76, 77, 78, 79, 80, 81, 82,
7255 83, 84, -1, -1, 87, 88, -1, -1, -1, -1,
7256 93, 94, 95, 96, -1, -1, -1, -1, -1, -1,
7257 -1, -1, -1, -1, 107, 108, -1, -1, -1, -1,
7258 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7259 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7260 -1, -1, -1, -1, 137, 138, 139, 140, 141, 142,
7261 143, 144, 145, 146, -1, 148, 149, 52, 53, -1,
7262 -1, 56, -1, 156, -1, -1, -1, -1, -1, -1,
7263 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7264 -1, 76, 77, 78, 79, 80, 81, 82, 83, 84,
7265 -1, -1, 87, 88, -1, -1, -1, -1, 93, 94,
7266 95, 96, -1, -1, -1, -1, -1, -1, -1, -1,
7267 -1, -1, 107, 108, -1, -1, -1, -1, -1, -1,
7268 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7269 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7270 -1, -1, 137, 138, 139, 140, 141, 142, 143, 144,
7271 145, 146, -1, 148, 149, 52, 53, -1, -1, 56,
7272 -1, 156, -1, -1, -1, -1, -1, -1, -1, -1,
7273 -1, -1, -1, -1, -1, -1, -1, -1, -1, 76,
7274 77, 78, 79, 80, 81, 82, 83, 84, -1, -1,
7275 87, 88, -1, -1, -1, -1, 93, 94, 95, 96,
7276 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7277 107, 108, -1, -1, -1, -1, -1, -1, -1, -1,
7278 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7279 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7280 137, 138, 139, 140, 141, 142, 143, 144, 145, 146,
7281 -1, 148, 149, 52, 53, -1, -1, 56, -1, 156,
7282 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7283 -1, -1, -1, -1, -1, -1, -1, 76, 77, 78,
7284 79, 80, 81, 82, 83, 84, -1, -1, 87, 88,
7285 -1, -1, -1, -1, 93, 94, 95, 96, -1, -1,
7286 -1, -1, -1, -1, -1, -1, -1, -1, 107, 108,
7287 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7288 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7289 -1, -1, -1, -1, -1, -1, -1, -1, 137, 138,
7290 139, 140, 141, 142, 143, 144, 145, 146, -1, 148,
7291 149, 52, 53, -1, -1, 56, -1, 156, -1, -1,
7292 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7293 -1, -1, -1, -1, -1, 76, 77, 78, 79, 80,
7294 81, 82, 83, 84, -1, -1, 87, 88, -1, -1,
7295 -1, -1, 93, 94, 95, 96, -1, -1, -1, -1,
7296 -1, -1, -1, -1, -1, -1, 107, 108, -1, -1,
7297 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7298 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7299 -1, -1, -1, -1, -1, -1, 137, 138, 139, 140,
7300 141, 142, 143, 144, 145, 146, -1, 148, 149, 52,
7301 53, -1, -1, 56, -1, 156, -1, -1, -1, -1,
7302 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7303 -1, -1, -1, 76, 77, 78, 79, 80, 81, 82,
7304 83, 84, -1, -1, 87, 88, -1, -1, -1, -1,
7305 93, 94, 95, 96, -1, -1, -1, -1, -1, -1,
7306 -1, -1, -1, -1, 107, 108, -1, -1, -1, -1,
7307 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7308 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7309 -1, -1, -1, -1, 137, 138, 139, 140, 141, 142,
7310 143, 144, 145, 146, -1, 148, 149, 52, 53, -1,
7311 -1, 56, -1, 156, -1, -1, -1, -1, -1, -1,
7312 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7313 -1, 76, 77, 78, 79, 80, 81, 82, 83, 84,
7314 -1, -1, 87, 88, -1, -1, -1, -1, 93, 94,
7315 95, 96, -1, -1, -1, -1, -1, -1, -1, -1,
7316 -1, -1, 107, 108, -1, -1, -1, -1, -1, -1,
7317 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7318 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7319 -1, -1, 137, 138, 139, 140, 141, 142, 143, 144,
7320 145, 146, -1, 148, 149, 52, 53, -1, -1, 56,
7321 -1, 156, -1, -1, -1, -1, -1, -1, -1, -1,
7322 -1, -1, -1, -1, -1, -1, -1, -1, -1, 76,
7323 77, 78, 79, 80, 81, 82, 83, 84, -1, -1,
7324 87, 88, -1, -1, -1, -1, 93, 94, 95, 96,
7325 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7326 107, 108, -1, -1, -1, -1, -1, -1, -1, -1,
7327 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7328 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7329 137, 138, 139, 140, 141, 142, 143, 144, 145, 146,
7330 -1, 148, 149, 52, 53, -1, -1, 56, -1, 156,
7331 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7332 -1, -1, -1, -1, -1, -1, -1, 76, 77, 78,
7333 79, 80, 81, 82, 83, 84, -1, -1, 87, 88,
7334 -1, -1, -1, -1, 93, 94, 95, 96, -1, -1,
7335 -1, -1, -1, -1, -1, -1, -1, -1, 107, 108,
7336 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7337 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7338 -1, -1, -1, -1, -1, -1, -1, -1, 137, 138,
7339 139, 140, 141, 142, 143, 144, 145, 146, -1, 148,
7340 149, 52, 53, -1, -1, 56, -1, 156, -1, -1,
7341 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7342 -1, -1, -1, -1, -1, 76, 77, 78, 79, 80,
7343 81, 82, 83, 84, -1, -1, 87, 88, -1, -1,
7344 -1, -1, 93, 94, 95, 96, -1, -1, -1, -1,
7345 -1, -1, -1, -1, -1, -1, 107, 108, -1, -1,
7346 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7347 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7348 -1, -1, -1, -1, -1, -1, 137, 138, 139, 140,
7349 141, 142, 143, 144, 145, 146, -1, 148, 149, 52,
7350 53, -1, -1, 56, -1, 156, -1, -1, -1, -1,
7351 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7352 -1, -1, -1, 76, 77, 78, 79, 80, 81, 82,
7353 83, 84, -1, -1, 87, 88, -1, -1, -1, -1,
7354 93, 94, 95, 96, -1, -1, -1, -1, -1, -1,
7355 -1, -1, -1, -1, 107, 108, -1, -1, -1, -1,
7356 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7357 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7358 -1, -1, -1, -1, 137, 138, 139, 140, 141, 142,
7359 143, 144, 145, 146, -1, 148, 149, 52, 53, -1,
7360 -1, 56, -1, 156, -1, -1, -1, -1, -1, -1,
7361 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7362 -1, 76, 77, 78, 79, 80, 81, 82, 83, 84,
7363 -1, -1, 87, 88, -1, -1, -1, -1, 93, 94,
7364 95, 96, -1, -1, -1, -1, -1, -1, -1, -1,
7365 -1, -1, 107, 108, -1, -1, -1, -1, -1, -1,
7366 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7367 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7368 -1, -1, 137, 138, 139, 140, 141, 142, 143, 144,
7369 145, 146, -1, 148, 149, 52, 53, -1, -1, 56,
7370 -1, 156, -1, -1, -1, -1, -1, -1, -1, -1,
7371 -1, -1, -1, -1, -1, -1, -1, -1, -1, 76,
7372 77, 78, 79, 80, 81, 82, 83, 84, -1, -1,
7373 87, 88, -1, -1, -1, -1, 93, 94, 95, 96,
7374 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7375 107, 108, -1, -1, -1, -1, -1, -1, -1, -1,
7376 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7377 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7378 137, 138, 139, 140, 141, 142, 143, 144, 145, 146,
7379 -1, 148, 149, 52, 53, -1, -1, 56, -1, 156,
7380 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7381 -1, -1, -1, -1, -1, -1, -1, 76, 77, 78,
7382 79, 80, 81, 82, 83, 84, -1, -1, 87, 88,
7383 -1, -1, -1, -1, 93, 94, 95, 96, -1, -1,
7384 -1, -1, -1, -1, -1, -1, -1, -1, 107, 108,
7385 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7386 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7387 -1, -1, -1, -1, -1, -1, -1, -1, 137, 138,
7388 139, 140, 141, 142, 143, 144, 145, 146, -1, 148,
7389 149, 52, 53, -1, -1, 56, -1, 156, -1, -1,
7390 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7391 -1, -1, -1, -1, -1, 76, 77, 78, 79, 80,
7392 81, 82, 83, 84, -1, -1, 87, 88, -1, -1,
7393 -1, -1, 93, 94, 95, 96, -1, -1, -1, -1,
7394 -1, -1, -1, -1, -1, -1, 107, 108, -1, -1,
7395 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7396 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7397 -1, -1, -1, -1, -1, -1, 137, 138, 139, 140,
7398 141, 142, 143, 144, 145, 146, -1, 148, 149, -1,
7399 -1, -1, -1, -1, -1, 156
7400};
7401
7402/* YYSTOS[STATE-NUM] -- The symbol kind of the accessing symbol of
7403 state STATE-NUM. */
7404static const yytype_int16 yystos[] =
7405{
7406 0, 165, 166, 1, 3, 4, 5, 6, 7, 11,
7407 12, 16, 18, 19, 20, 21, 22, 23, 24, 30,
7408 31, 32, 33, 34, 35, 36, 39, 45, 46, 47,
7409 48, 49, 50, 51, 52, 53, 54, 55, 56, 57,
7410 59, 60, 61, 62, 63, 64, 65, 76, 77, 91,
7411 92, 99, 102, 103, 104, 105, 107, 110, 111, 112,
7412 113, 114, 115, 116, 117, 118, 147, 148, 149, 164,
7413 167, 168, 180, 182, 183, 184, 185, 186, 187, 191,
7414 195, 197, 203, 206, 208, 209, 210, 212, 214, 215,
7415 216, 217, 226, 227, 228, 229, 230, 231, 234, 255,
7416 267, 268, 269, 270, 271, 272, 273, 274, 275, 276,
7417 277, 278, 287, 288, 321, 326, 327, 376, 377, 378,
7418 379, 380, 381, 383, 384, 387, 388, 390, 391, 392,
7419 393, 406, 407, 409, 410, 411, 412, 413, 414, 415,
7420 416, 417, 465, 0, 3, 4, 5, 6, 7, 8,
7421 9, 10, 11, 12, 13, 14, 15, 16, 17, 18,
7422 19, 20, 21, 22, 23, 24, 25, 26, 30, 31,
7423 32, 33, 34, 35, 36, 37, 38, 39, 45, 46,
7424 47, 48, 49, 50, 51, 52, 53, 56, 76, 77,
7425 78, 79, 80, 81, 82, 83, 84, 87, 88, 93,
7426 94, 95, 96, 107, 108, 137, 138, 139, 140, 141,
7427 142, 143, 144, 145, 146, 148, 149, 156, 220, 221,
7428 222, 224, 225, 406, 179, 179, 179, 39, 58, 99,
7429 102, 107, 108, 109, 112, 148, 187, 209, 217, 227,
7430 238, 239, 245, 246, 249, 251, 252, 268, 413, 414,
7431 416, 417, 452, 453, 246, 157, 242, 247, 248, 154,
7432 157, 189, 54, 221, 189, 151, 169, 170, 235, 465,
7433 21, 22, 32, 195, 197, 208, 227, 268, 287, 288,
7434 227, 227, 227, 56, 47, 102, 171, 176, 177, 182,
7435 211, 212, 465, 171, 240, 251, 452, 465, 239, 451,
7436 452, 465, 46, 99, 147, 155, 195, 197, 216, 255,
7437 268, 413, 414, 417, 319, 220, 396, 408, 412, 396,
7438 397, 398, 161, 382, 382, 382, 382, 411, 203, 227,
7439 227, 154, 160, 163, 463, 464, 179, 40, 41, 42,
7440 43, 44, 37, 38, 157, 420, 421, 422, 423, 465,
7441 420, 422, 26, 151, 242, 248, 279, 328, 28, 280,
7442 325, 134, 155, 102, 107, 214, 134, 25, 78, 79,
7443 80, 81, 82, 83, 84, 85, 86, 87, 88, 89,
7444 90, 95, 96, 101, 135, 137, 138, 139, 140, 141,
7445 142, 143, 144, 145, 146, 233, 233, 69, 97, 98,
7446 153, 457, 458, 256, 1, 191, 198, 199, 199, 200,
7447 202, 202, 163, 199, 464, 99, 210, 217, 268, 293,
7448 413, 414, 417, 52, 56, 95, 99, 218, 219, 268,
7449 413, 414, 417, 219, 33, 34, 35, 36, 49, 50,
7450 51, 52, 56, 157, 194, 220, 415, 447, 448, 449,
7451 246, 157, 248, 98, 457, 458, 328, 379, 100, 100,
7452 155, 239, 56, 239, 239, 239, 396, 134, 101, 155,
7453 250, 465, 98, 153, 457, 100, 100, 155, 250, 92,
7454 244, 246, 251, 432, 452, 465, 246, 189, 191, 459,
7455 191, 54, 64, 65, 181, 157, 235, 236, 164, 420,
7456 420, 98, 457, 100, 178, 211, 158, 163, 464, 459,
7457 257, 159, 155, 189, 462, 155, 462, 152, 462, 189,
7458 56, 411, 213, 214, 421, 155, 98, 153, 457, 316,
7459 66, 119, 121, 122, 399, 119, 119, 399, 67, 399,
7460 161, 385, 394, 389, 395, 78, 160, 168, 151, 199,
7461 199, 199, 199, 235, 237, 191, 191, 52, 54, 55,
7462 56, 57, 58, 78, 92, 102, 107, 108, 109, 141,
7463 144, 298, 363, 424, 425, 426, 427, 428, 429, 431,
7464 432, 433, 434, 435, 436, 437, 438, 439, 440, 441,
7465 442, 443, 444, 445, 134, 265, 431, 134, 266, 329,
7466 330, 106, 207, 331, 332, 332, 235, 211, 155, 216,
7467 155, 235, 193, 227, 227, 227, 227, 227, 227, 227,
7468 227, 227, 227, 227, 227, 227, 192, 227, 227, 227,
7469 227, 227, 227, 227, 227, 227, 227, 227, 52, 53,
7470 56, 224, 454, 455, 244, 251, 52, 53, 56, 224,
7471 454, 242, 171, 174, 13, 289, 463, 289, 199, 171,
7472 171, 259, 163, 56, 98, 153, 457, 25, 199, 52,
7473 56, 218, 138, 419, 465, 98, 153, 457, 264, 450,
7474 69, 98, 456, 246, 459, 52, 56, 454, 235, 235,
7475 223, 100, 124, 235, 239, 239, 249, 252, 452, 52,
7476 56, 244, 52, 56, 235, 235, 453, 459, 155, 459,
7477 155, 158, 459, 221, 236, 227, 152, 134, 134, 56,
7478 454, 454, 235, 170, 459, 177, 158, 452, 155, 213,
7479 52, 56, 244, 52, 56, 317, 401, 400, 119, 386,
7480 399, 66, 119, 119, 386, 66, 119, 227, 171, 182,
7481 102, 107, 294, 295, 296, 297, 434, 155, 446, 465,
7482 155, 446, 155, 430, 459, 299, 300, 155, 430, 239,
7483 34, 52, 52, 155, 430, 52, 39, 188, 209, 227,
7484 232, 174, 463, 188, 232, 174, 316, 152, 330, 316,
7485 10, 68, 286, 286, 107, 203, 204, 205, 239, 251,
7486 253, 254, 459, 213, 155, 99, 185, 190, 205, 217,
7487 227, 239, 241, 254, 268, 417, 338, 338, 189, 100,
7488 100, 151, 242, 248, 189, 460, 155, 100, 100, 242,
7489 243, 248, 465, 235, 286, 171, 13, 171, 27, 290,
7490 463, 286, 286, 17, 283, 334, 25, 258, 340, 52,
7491 56, 244, 52, 56, 260, 263, 418, 262, 52, 56,
7492 218, 244, 174, 191, 196, 459, 243, 248, 190, 227,
7493 241, 190, 241, 221, 235, 239, 250, 100, 100, 460,
7494 100, 100, 432, 452, 191, 39, 190, 241, 462, 214,
7495 460, 318, 402, 405, 412, 417, 382, 399, 382, 382,
7496 382, 152, 296, 434, 155, 459, 155, 445, 424, 439,
7497 441, 427, 428, 437, 443, 134, 239, 429, 436, 443,
7498 435, 437, 189, 44, 44, 286, 286, 317, 152, 317,
7499 239, 155, 44, 213, 56, 44, 134, 44, 98, 153,
7500 457, 336, 336, 136, 235, 235, 330, 207, 159, 100,
7501 235, 235, 207, 8, 281, 372, 465, 14, 15, 284,
7502 285, 291, 292, 465, 292, 201, 107, 239, 333, 286,
7503 338, 334, 286, 460, 199, 463, 199, 174, 460, 286,
7504 459, 194, 328, 325, 235, 235, 100, 235, 235, 459,
7505 155, 459, 189, 179, 403, 459, 294, 297, 295, 446,
7506 155, 430, 155, 430, 155, 430, 155, 430, 430, 188,
7507 232, 237, 237, 318, 318, 107, 239, 237, 237, 235,
7508 237, 52, 56, 244, 52, 56, 337, 337, 227, 190,
7509 241, 190, 241, 152, 235, 190, 241, 190, 241, 239,
7510 254, 373, 465, 175, 284, 171, 199, 286, 286, 239,
7511 155, 289, 336, 286, 290, 174, 463, 286, 235, 157,
7512 322, 431, 171, 155, 155, 437, 437, 443, 437, 227,
7513 227, 179, 179, 239, 182, 182, 227, 460, 52, 56,
7514 58, 91, 92, 99, 102, 104, 105, 107, 112, 140,
7515 321, 343, 344, 345, 346, 349, 353, 354, 355, 358,
7516 359, 360, 361, 362, 363, 364, 365, 366, 367, 368,
7517 369, 370, 371, 376, 377, 380, 381, 384, 388, 391,
7518 393, 414, 439, 343, 190, 241, 101, 374, 465, 9,
7519 282, 375, 465, 172, 289, 107, 239, 171, 337, 261,
7520 286, 431, 320, 0, 120, 404, 295, 430, 430, 155,
7521 430, 430, 139, 310, 311, 465, 310, 367, 367, 56,
7522 218, 337, 344, 351, 352, 353, 354, 357, 460, 189,
7523 337, 461, 52, 396, 52, 102, 412, 101, 155, 139,
7524 155, 155, 344, 89, 90, 98, 153, 157, 347, 348,
7525 52, 99, 217, 268, 413, 414, 417, 289, 176, 171,
7526 171, 239, 292, 334, 335, 342, 343, 171, 189, 313,
7527 29, 123, 323, 437, 298, 301, 302, 303, 304, 306,
7528 307, 309, 312, 435, 437, 438, 443, 445, 171, 174,
7529 344, 460, 344, 355, 357, 460, 155, 152, 235, 124,
7530 199, 368, 351, 355, 349, 356, 357, 112, 360, 364,
7531 367, 367, 218, 337, 460, 337, 459, 351, 354, 358,
7532 351, 354, 358, 56, 98, 153, 457, 171, 163, 173,
7533 291, 289, 40, 41, 286, 160, 158, 324, 171, 430,
7534 446, 155, 446, 155, 308, 313, 300, 155, 305, 308,
7535 99, 268, 155, 308, 459, 155, 155, 350, 459, 155,
7536 155, 396, 459, 459, 459, 460, 460, 460, 52, 56,
7537 244, 52, 56, 372, 375, 339, 199, 199, 52, 314,
7538 315, 433, 174, 152, 301, 441, 304, 306, 437, 443,
7539 139, 268, 307, 443, 56, 98, 437, 356, 358, 356,
7540 355, 357, 460, 171, 155, 189, 286, 446, 155, 308,
7541 155, 308, 155, 308, 155, 308, 52, 56, 308, 155,
7542 461, 292, 340, 341, 315, 437, 437, 443, 437, 308,
7543 308, 155, 308, 308, 437, 308
7544};
7545
7546/* YYR1[RULE-NUM] -- Symbol kind of the left-hand side of rule RULE-NUM. */
7547static const yytype_int16 yyr1[] =
7548{
7549 0, 162, 165, 163, 163, 164, 166, 167, 167, 167,
7550 168, 168, 169, 170, 171, 172, 173, 174, 175, 174,
7551 176, 176, 176, 177, 178, 177, 179, 180, 181, 182,
7552 182, 182, 182, 182, 182, 182, 182, 182, 182, 182,
7553 182, 182, 183, 182, 182, 182, 182, 182, 184, 185,
7554 186, 186, 186, 186, 186, 186, 186, 186, 185, 187,
7555 187, 185, 188, 188, 189, 189, 188, 190, 190, 190,
7556 191, 191, 191, 191, 191, 192, 191, 193, 191, 191,
7557 194, 195, 196, 197, 198, 199, 199, 200, 201, 202,
7558 203, 203, 204, 205, 206, 206, 207, 208, 208, 208,
7559 209, 209, 209, 209, 209, 209, 209, 209, 209, 209,
7560 209, 209, 210, 210, 211, 211, 212, 212, 212, 213,
7561 213, 212, 212, 212, 212, 212, 212, 212, 214, 214,
7562 215, 215, 216, 216, 216, 216, 216, 216, 216, 216,
7563 216, 217, 217, 217, 217, 217, 217, 217, 217, 217,
7564 218, 218, 219, 219, 219, 220, 220, 220, 220, 220,
7565 221, 221, 222, 223, 222, 224, 224, 224, 224, 224,
7566 224, 224, 224, 224, 224, 224, 224, 224, 224, 224,
7567 224, 224, 224, 224, 224, 224, 224, 224, 224, 224,
7568 224, 224, 224, 224, 224, 225, 225, 225, 225, 225,
7569 225, 225, 225, 225, 225, 225, 225, 225, 225, 225,
7570 225, 225, 225, 225, 225, 225, 225, 225, 225, 225,
7571 225, 225, 225, 225, 225, 225, 225, 225, 225, 225,
7572 225, 225, 225, 225, 225, 225, 226, 227, 228, 228,
7573 228, 228, 228, 228, 228, 228, 227, 229, 229, 229,
7574 229, 229, 229, 227, 227, 227, 227, 227, 227, 227,
7575 227, 227, 227, 227, 227, 227, 227, 227, 227, 227,
7576 227, 227, 227, 227, 227, 227, 227, 227, 227, 227,
7577 230, 230, 227, 227, 227, 231, 232, 232, 232, 233,
7578 233, 233, 233, 234, 234, 235, 236, 237, 238, 239,
7579 240, 240, 240, 240, 241, 241, 242, 242, 242, 243,
7580 243, 244, 244, 244, 244, 244, 245, 246, 246, 246,
7581 246, 246, 246, 247, 248, 249, 249, 250, 250, 251,
7582 251, 251, 251, 252, 252, 253, 253, 254, 254, 254,
7583 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
7584 255, 256, 255, 257, 255, 255, 255, 255, 255, 255,
7585 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
7586 255, 255, 255, 255, 255, 258, 255, 259, 255, 255,
7587 260, 261, 255, 262, 255, 263, 255, 264, 255, 265,
7588 255, 266, 255, 255, 255, 255, 255, 267, 268, 269,
7589 270, 271, 272, 273, 274, 275, 276, 277, 278, 279,
7590 280, 281, 282, 283, 284, 285, 286, 286, 287, 288,
7591 289, 289, 289, 290, 290, 291, 291, 292, 292, 293,
7592 293, 294, 294, 295, 295, 296, 296, 296, 296, 296,
7593 297, 297, 298, 298, 299, 300, 301, 301, 302, 302,
7594 303, 303, 303, 303, 304, 305, 306, 307, 307, 308,
7595 308, 309, 309, 309, 309, 309, 309, 309, 309, 309,
7596 309, 309, 309, 309, 309, 309, 310, 310, 311, 312,
7597 312, 313, 313, 314, 314, 315, 315, 316, 317, 318,
7598 319, 320, 321, 322, 322, 323, 324, 323, 325, 326,
7599 326, 326, 326, 327, 327, 327, 327, 327, 327, 327,
7600 327, 328, 328, 329, 330, 331, 332, 333, 333, 333,
7601 333, 334, 335, 335, 336, 337, 338, 339, 340, 341,
7602 341, 342, 342, 342, 343, 343, 343, 343, 343, 343,
7603 344, 345, 345, 346, 346, 347, 348, 349, 349, 349,
7604 349, 349, 349, 349, 349, 349, 349, 349, 349, 349,
7605 350, 349, 349, 349, 351, 351, 351, 351, 351, 351,
7606 352, 352, 353, 353, 354, 355, 355, 356, 356, 357,
7607 358, 358, 358, 358, 359, 359, 360, 360, 361, 361,
7608 362, 362, 363, 364, 364, 365, 366, 366, 366, 366,
7609 366, 366, 365, 365, 365, 365, 367, 367, 367, 367,
7610 367, 367, 367, 367, 367, 367, 368, 369, 369, 370,
7611 371, 371, 371, 372, 372, 373, 373, 373, 374, 374,
7612 375, 375, 376, 376, 377, 378, 378, 378, 379, 380,
7613 381, 382, 382, 383, 384, 385, 385, 386, 386, 387,
7614 388, 389, 389, 390, 391, 392, 393, 394, 394, 395,
7615 395, 396, 396, 397, 397, 398, 398, 399, 400, 399,
7616 401, 402, 403, 399, 404, 404, 405, 405, 406, 406,
7617 407, 408, 408, 409, 410, 410, 411, 411, 411, 411,
7618 412, 412, 412, 413, 413, 413, 414, 414, 414, 414,
7619 414, 414, 414, 415, 415, 416, 416, 417, 417, 418,
7620 419, 419, 420, 420, 421, 422, 423, 422, 424, 424,
7621 425, 425, 426, 426, 426, 426, 427, 427, 428, 429,
7622 429, 430, 430, 431, 431, 431, 431, 431, 431, 431,
7623 431, 431, 431, 431, 431, 431, 431, 431, 432, 433,
7624 433, 433, 433, 434, 434, 435, 436, 436, 437, 437,
7625 438, 439, 439, 440, 441, 441, 442, 442, 443, 443,
7626 444, 444, 445, 445, 446, 446, 447, 448, 449, 450,
7627 449, 451, 451, 452, 452, 453, 453, 453, 453, 453,
7628 453, 454, 454, 454, 454, 455, 455, 455, 456, 456,
7629 457, 457, 458, 458, 459, 460, 461, 462, 462, 463,
7630 463, 464, 464, 465
7631};
7632
7633/* YYR2[RULE-NUM] -- Number of symbols on the right-hand side of rule RULE-NUM. */
7634static const yytype_int8 yyr2[] =
7635{
7636 0, 2, 0, 0, 1, 2, 2, 1, 1, 3,
7637 1, 2, 1, 3, 2, 0, 0, 8, 0, 5,
7638 1, 1, 3, 1, 0, 3, 0, 2, 0, 4,
7639 3, 3, 3, 2, 3, 3, 3, 3, 4, 5,
7640 1, 4, 4, 1, 7, 4, 1, 1, 4, 1,
7641 4, 7, 6, 6, 6, 6, 5, 4, 1, 4,
7642 4, 1, 1, 4, 0, 1, 3, 1, 4, 1,
7643 1, 3, 3, 3, 2, 0, 7, 0, 7, 1,
7644 1, 2, 0, 5, 1, 1, 1, 0, 0, 4,
7645 1, 1, 1, 1, 1, 4, 3, 1, 1, 1,
7646 2, 3, 4, 5, 4, 5, 6, 2, 2, 2,
7647 2, 2, 1, 3, 1, 3, 1, 2, 3, 1,
7648 3, 5, 2, 4, 2, 4, 1, 3, 1, 3,
7649 2, 3, 1, 1, 4, 3, 3, 3, 3, 2,
7650 1, 1, 1, 4, 3, 3, 3, 3, 2, 1,
7651 1, 1, 2, 1, 3, 1, 1, 1, 1, 1,
7652 1, 1, 1, 0, 4, 1, 1, 1, 1, 1,
7653 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
7654 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
7655 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
7656 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
7657 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
7658 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
7659 1, 1, 1, 1, 1, 1, 4, 1, 4, 7,
7660 6, 6, 6, 6, 5, 4, 1, 3, 3, 2,
7661 2, 2, 2, 1, 3, 3, 3, 3, 3, 3,
7662 4, 2, 2, 3, 3, 3, 3, 1, 3, 3,
7663 3, 3, 3, 2, 2, 3, 3, 3, 3, 4,
7664 4, 4, 1, 1, 1, 6, 1, 4, 3, 1,
7665 1, 1, 1, 3, 3, 1, 1, 1, 1, 1,
7666 1, 2, 4, 2, 1, 4, 3, 5, 3, 1,
7667 1, 1, 1, 2, 4, 2, 1, 1, 1, 2,
7668 2, 4, 1, 0, 2, 2, 1, 2, 1, 1,
7669 1, 3, 3, 2, 1, 1, 1, 3, 4, 2,
7670 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
7671 1, 0, 4, 0, 4, 3, 3, 2, 3, 3,
7672 1, 4, 3, 1, 6, 4, 3, 2, 1, 2,
7673 1, 6, 6, 4, 4, 0, 6, 0, 5, 5,
7674 0, 0, 9, 0, 6, 0, 7, 0, 5, 0,
7675 5, 0, 5, 1, 1, 1, 1, 1, 1, 1,
7676 1, 1, 2, 2, 1, 2, 1, 1, 1, 1,
7677 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
7678 1, 1, 2, 1, 1, 1, 5, 1, 2, 1,
7679 1, 1, 3, 1, 3, 1, 3, 5, 1, 3,
7680 2, 1, 1, 1, 0, 2, 2, 1, 1, 3,
7681 4, 2, 2, 1, 1, 1, 3, 1, 3, 2,
7682 0, 6, 8, 4, 6, 4, 2, 6, 2, 4,
7683 6, 2, 4, 2, 4, 1, 1, 1, 4, 0,
7684 1, 1, 4, 1, 3, 1, 1, 0, 0, 0,
7685 0, 0, 9, 4, 1, 3, 0, 4, 3, 2,
7686 4, 5, 5, 2, 4, 4, 3, 3, 2, 1,
7687 4, 3, 3, 0, 7, 0, 7, 1, 2, 3,
7688 4, 5, 1, 1, 0, 0, 0, 0, 9, 1,
7689 1, 1, 3, 3, 1, 2, 3, 1, 1, 1,
7690 1, 3, 1, 3, 1, 2, 2, 1, 1, 4,
7691 4, 4, 3, 4, 4, 4, 3, 3, 3, 2,
7692 0, 6, 2, 4, 1, 1, 2, 2, 4, 1,
7693 2, 3, 1, 3, 5, 2, 1, 1, 3, 1,
7694 3, 1, 2, 1, 1, 3, 2, 1, 1, 3,
7695 2, 1, 2, 1, 1, 1, 3, 3, 2, 2,
7696 2, 2, 1, 1, 1, 1, 1, 1, 1, 1,
7697 1, 1, 1, 1, 1, 1, 1, 2, 2, 4,
7698 2, 3, 1, 6, 1, 1, 1, 1, 2, 1,
7699 3, 1, 1, 1, 1, 1, 1, 2, 3, 3,
7700 3, 1, 2, 4, 1, 0, 3, 1, 2, 4,
7701 1, 0, 3, 4, 1, 4, 1, 0, 3, 0,
7702 3, 0, 2, 0, 2, 0, 2, 1, 0, 3,
7703 0, 0, 0, 6, 1, 1, 1, 1, 1, 1,
7704 2, 1, 1, 3, 1, 2, 1, 1, 1, 1,
7705 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
7706 1, 1, 1, 1, 1, 1, 1, 1, 1, 0,
7707 4, 1, 1, 1, 3, 1, 0, 3, 2, 1,
7708 1, 3, 4, 2, 2, 1, 1, 1, 3, 1,
7709 3, 2, 0, 6, 8, 4, 6, 4, 6, 2,
7710 4, 6, 2, 4, 2, 4, 1, 0, 1, 1,
7711 1, 1, 1, 1, 1, 1, 1, 3, 1, 3,
7712 1, 1, 1, 1, 2, 1, 1, 1, 2, 1,
7713 1, 1, 2, 1, 2, 1, 1, 1, 1, 0,
7714 4, 1, 2, 1, 3, 3, 2, 1, 4, 2,
7715 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
7716 1, 1, 1, 1, 2, 2, 2, 1, 1, 1,
7717 1, 1, 2, 0
7718};
7719
7720
7721enum { YYENOMEM = -2 };
7722
7723#define yyerrok (yyerrstatus = 0)
7724#define yyclearin (yychar = YYEMPTY)
7725
7726#define YYACCEPT goto yyacceptlab
7727#define YYABORT goto yyabortlab
7728#define YYERROR goto yyerrorlab
7729#define YYNOMEM goto yyexhaustedlab
7730
7731
7732#define YYRECOVERING() (!!yyerrstatus)
7733
7734#define YYBACKUP(Token, Value) \
7735 do \
7736 if (yychar == YYEMPTY) \
7737 { \
7738 yychar = (Token); \
7739 yylval = (Value); \
7740 YYPOPSTACK (yylen); \
7741 yystate = *yyssp; \
7742 goto yybackup; \
7743 } \
7744 else \
7745 { \
7746 yyerror (&yylloc, p, YY_("syntax error: cannot back up")); \
7747 YYERROR; \
7748 } \
7749 while (0)
7750
7751/* Backward compatibility with an undocumented macro.
7752 Use YYerror or YYUNDEF. */
7753#define YYERRCODE YYUNDEF
7754
7755/* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
7756 If N is 0, then set CURRENT to the empty location which ends
7757 the previous symbol: RHS[0] (always defined). */
7758
7759#ifndef YYLLOC_DEFAULT
7760# define YYLLOC_DEFAULT(Current, Rhs, N) \
7761 do \
7762 if (N) \
7763 { \
7764 (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \
7765 (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \
7766 (Current).last_line = YYRHSLOC (Rhs, N).last_line; \
7767 (Current).last_column = YYRHSLOC (Rhs, N).last_column; \
7768 } \
7769 else \
7770 { \
7771 (Current).first_line = (Current).last_line = \
7772 YYRHSLOC (Rhs, 0).last_line; \
7773 (Current).first_column = (Current).last_column = \
7774 YYRHSLOC (Rhs, 0).last_column; \
7775 } \
7776 while (0)
7777#endif
7778
7779#define YYRHSLOC(Rhs, K) ((Rhs)[K])
7780
7781
7782/* Enable debugging if requested. */
7783#if YYDEBUG
7784
7785# ifndef YYFPRINTF
7786# include <stdio.h> /* INFRINGES ON USER NAME SPACE */
7787# define YYFPRINTF fprintf
7788# endif
7789
7790# define YYDPRINTF(Args) \
7791do { \
7792 if (yydebug) \
7793 YYFPRINTF Args; \
7794} while (0)
7795
7796
7797/* YYLOCATION_PRINT -- Print the location on the stream.
7798 This macro was not mandated originally: define only if we know
7799 we won't break user code: when these are the locations we know. */
7800
7801# ifndef YYLOCATION_PRINT
7802
7803# if defined YY_LOCATION_PRINT
7804
7805 /* Temporary convenience wrapper in case some people defined the
7806 undocumented and private YY_LOCATION_PRINT macros. */
7807# define YYLOCATION_PRINT(File, Loc, p) YY_LOCATION_PRINT(File, *(Loc), p)
7808
7809# elif defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL
7810
7811/* Print *YYLOCP on YYO. Private, do not rely on its existence. */
7812
7813YY_ATTRIBUTE_UNUSED
7814static int
7815yy_location_print_ (FILE *yyo, YYLTYPE const * const yylocp)
7816{
7817 int res = 0;
7818 int end_col = 0 != yylocp->last_column ? yylocp->last_column - 1 : 0;
7819 if (0 <= yylocp->first_line)
7820 {
7821 res += YYFPRINTF (yyo, "%d", yylocp->first_line);
7822 if (0 <= yylocp->first_column)
7823 res += YYFPRINTF (yyo, ".%d", yylocp->first_column);
7824 }
7825 if (0 <= yylocp->last_line)
7826 {
7827 if (yylocp->first_line < yylocp->last_line)
7828 {
7829 res += YYFPRINTF (yyo, "-%d", yylocp->last_line);
7830 if (0 <= end_col)
7831 res += YYFPRINTF (yyo, ".%d", end_col);
7832 }
7833 else if (0 <= end_col && yylocp->first_column < end_col)
7834 res += YYFPRINTF (yyo, "-%d", end_col);
7835 }
7836 return res;
7837}
7838
7839# define YYLOCATION_PRINT yy_location_print_
7840
7841 /* Temporary convenience wrapper in case some people defined the
7842 undocumented and private YY_LOCATION_PRINT macros. */
7843# define YY_LOCATION_PRINT(File, Loc, p) YYLOCATION_PRINT(File, &(Loc), p)
7844
7845# else
7846
7847# define YYLOCATION_PRINT(File, Loc, p) ((void) 0)
7848 /* Temporary convenience wrapper in case some people defined the
7849 undocumented and private YY_LOCATION_PRINT macros. */
7850# define YY_LOCATION_PRINT YYLOCATION_PRINT
7851
7852# endif
7853# endif /* !defined YYLOCATION_PRINT */
7854
7855
7856# define YY_SYMBOL_PRINT(Title, Kind, Value, Location, p) \
7857do { \
7858 if (yydebug) \
7859 { \
7860 YYFPRINTF (stderr, "%s ", Title); \
7861 yy_symbol_print (stderr, \
7862 Kind, Value, Location, p); \
7863 YYFPRINTF (stderr, "\n"); \
7864 } \
7865} while (0)
7866
7867
7868/*-----------------------------------.
7869| Print this symbol's value on YYO. |
7870`-----------------------------------*/
7871
7872static void
7873yy_symbol_value_print (FILE *yyo,
7874 yysymbol_kind_t yykind, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp, struct parser_params *p)
7875{
7876 FILE *yyoutput = yyo;
7877 YY_USE (yyoutput);
7878 YY_USE (yylocationp);
7879 YY_USE (p);
7880 if (!yyvaluep)
7881 return;
7882 YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
7883switch (yykind)
7884 {
7885 case YYSYMBOL_keyword_class: /* "'class'" */
7886#line 2626 "parse.y"
7887 {
7888 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
7889}
7890#line 7891 "parse.c"
7891 break;
7892
7893 case YYSYMBOL_keyword_module: /* "'module'" */
7894#line 2626 "parse.y"
7895 {
7896 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
7897}
7898#line 7899 "parse.c"
7899 break;
7900
7901 case YYSYMBOL_keyword_def: /* "'def'" */
7902#line 2626 "parse.y"
7903 {
7904 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
7905}
7906#line 7907 "parse.c"
7907 break;
7908
7909 case YYSYMBOL_keyword_undef: /* "'undef'" */
7910#line 2626 "parse.y"
7911 {
7912 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
7913}
7914#line 7915 "parse.c"
7915 break;
7916
7917 case YYSYMBOL_keyword_begin: /* "'begin'" */
7918#line 2626 "parse.y"
7919 {
7920 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
7921}
7922#line 7923 "parse.c"
7923 break;
7924
7925 case YYSYMBOL_keyword_rescue: /* "'rescue'" */
7926#line 2626 "parse.y"
7927 {
7928 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
7929}
7930#line 7931 "parse.c"
7931 break;
7932
7933 case YYSYMBOL_keyword_ensure: /* "'ensure'" */
7934#line 2626 "parse.y"
7935 {
7936 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
7937}
7938#line 7939 "parse.c"
7939 break;
7940
7941 case YYSYMBOL_keyword_end: /* "'end'" */
7942#line 2626 "parse.y"
7943 {
7944 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
7945}
7946#line 7947 "parse.c"
7947 break;
7948
7949 case YYSYMBOL_keyword_if: /* "'if'" */
7950#line 2626 "parse.y"
7951 {
7952 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
7953}
7954#line 7955 "parse.c"
7955 break;
7956
7957 case YYSYMBOL_keyword_unless: /* "'unless'" */
7958#line 2626 "parse.y"
7959 {
7960 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
7961}
7962#line 7963 "parse.c"
7963 break;
7964
7965 case YYSYMBOL_keyword_then: /* "'then'" */
7966#line 2626 "parse.y"
7967 {
7968 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
7969}
7970#line 7971 "parse.c"
7971 break;
7972
7973 case YYSYMBOL_keyword_elsif: /* "'elsif'" */
7974#line 2626 "parse.y"
7975 {
7976 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
7977}
7978#line 7979 "parse.c"
7979 break;
7980
7981 case YYSYMBOL_keyword_else: /* "'else'" */
7982#line 2626 "parse.y"
7983 {
7984 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
7985}
7986#line 7987 "parse.c"
7987 break;
7988
7989 case YYSYMBOL_keyword_case: /* "'case'" */
7990#line 2626 "parse.y"
7991 {
7992 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
7993}
7994#line 7995 "parse.c"
7995 break;
7996
7997 case YYSYMBOL_keyword_when: /* "'when'" */
7998#line 2626 "parse.y"
7999 {
8000 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8001}
8002#line 8003 "parse.c"
8003 break;
8004
8005 case YYSYMBOL_keyword_while: /* "'while'" */
8006#line 2626 "parse.y"
8007 {
8008 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8009}
8010#line 8011 "parse.c"
8011 break;
8012
8013 case YYSYMBOL_keyword_until: /* "'until'" */
8014#line 2626 "parse.y"
8015 {
8016 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8017}
8018#line 8019 "parse.c"
8019 break;
8020
8021 case YYSYMBOL_keyword_for: /* "'for'" */
8022#line 2626 "parse.y"
8023 {
8024 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8025}
8026#line 8027 "parse.c"
8027 break;
8028
8029 case YYSYMBOL_keyword_break: /* "'break'" */
8030#line 2626 "parse.y"
8031 {
8032 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8033}
8034#line 8035 "parse.c"
8035 break;
8036
8037 case YYSYMBOL_keyword_next: /* "'next'" */
8038#line 2626 "parse.y"
8039 {
8040 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8041}
8042#line 8043 "parse.c"
8043 break;
8044
8045 case YYSYMBOL_keyword_redo: /* "'redo'" */
8046#line 2626 "parse.y"
8047 {
8048 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8049}
8050#line 8051 "parse.c"
8051 break;
8052
8053 case YYSYMBOL_keyword_retry: /* "'retry'" */
8054#line 2626 "parse.y"
8055 {
8056 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8057}
8058#line 8059 "parse.c"
8059 break;
8060
8061 case YYSYMBOL_keyword_in: /* "'in'" */
8062#line 2626 "parse.y"
8063 {
8064 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8065}
8066#line 8067 "parse.c"
8067 break;
8068
8069 case YYSYMBOL_keyword_do: /* "'do'" */
8070#line 2626 "parse.y"
8071 {
8072 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8073}
8074#line 8075 "parse.c"
8075 break;
8076
8077 case YYSYMBOL_keyword_do_cond: /* "'do' for condition" */
8078#line 2626 "parse.y"
8079 {
8080 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8081}
8082#line 8083 "parse.c"
8083 break;
8084
8085 case YYSYMBOL_keyword_do_block: /* "'do' for block" */
8086#line 2626 "parse.y"
8087 {
8088 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8089}
8090#line 8091 "parse.c"
8091 break;
8092
8093 case YYSYMBOL_keyword_do_LAMBDA: /* "'do' for lambda" */
8094#line 2626 "parse.y"
8095 {
8096 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8097}
8098#line 8099 "parse.c"
8099 break;
8100
8101 case YYSYMBOL_keyword_return: /* "'return'" */
8102#line 2626 "parse.y"
8103 {
8104 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8105}
8106#line 8107 "parse.c"
8107 break;
8108
8109 case YYSYMBOL_keyword_yield: /* "'yield'" */
8110#line 2626 "parse.y"
8111 {
8112 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8113}
8114#line 8115 "parse.c"
8115 break;
8116
8117 case YYSYMBOL_keyword_super: /* "'super'" */
8118#line 2626 "parse.y"
8119 {
8120 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8121}
8122#line 8123 "parse.c"
8123 break;
8124
8125 case YYSYMBOL_keyword_self: /* "'self'" */
8126#line 2626 "parse.y"
8127 {
8128 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8129}
8130#line 8131 "parse.c"
8131 break;
8132
8133 case YYSYMBOL_keyword_nil: /* "'nil'" */
8134#line 2626 "parse.y"
8135 {
8136 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8137}
8138#line 8139 "parse.c"
8139 break;
8140
8141 case YYSYMBOL_keyword_true: /* "'true'" */
8142#line 2626 "parse.y"
8143 {
8144 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8145}
8146#line 8147 "parse.c"
8147 break;
8148
8149 case YYSYMBOL_keyword_false: /* "'false'" */
8150#line 2626 "parse.y"
8151 {
8152 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8153}
8154#line 8155 "parse.c"
8155 break;
8156
8157 case YYSYMBOL_keyword_and: /* "'and'" */
8158#line 2626 "parse.y"
8159 {
8160 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8161}
8162#line 8163 "parse.c"
8163 break;
8164
8165 case YYSYMBOL_keyword_or: /* "'or'" */
8166#line 2626 "parse.y"
8167 {
8168 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8169}
8170#line 8171 "parse.c"
8171 break;
8172
8173 case YYSYMBOL_keyword_not: /* "'not'" */
8174#line 2626 "parse.y"
8175 {
8176 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8177}
8178#line 8179 "parse.c"
8179 break;
8180
8181 case YYSYMBOL_modifier_if: /* "'if' modifier" */
8182#line 2626 "parse.y"
8183 {
8184 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8185}
8186#line 8187 "parse.c"
8187 break;
8188
8189 case YYSYMBOL_modifier_unless: /* "'unless' modifier" */
8190#line 2626 "parse.y"
8191 {
8192 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8193}
8194#line 8195 "parse.c"
8195 break;
8196
8197 case YYSYMBOL_modifier_while: /* "'while' modifier" */
8198#line 2626 "parse.y"
8199 {
8200 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8201}
8202#line 8203 "parse.c"
8203 break;
8204
8205 case YYSYMBOL_modifier_until: /* "'until' modifier" */
8206#line 2626 "parse.y"
8207 {
8208 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8209}
8210#line 8211 "parse.c"
8211 break;
8212
8213 case YYSYMBOL_modifier_rescue: /* "'rescue' modifier" */
8214#line 2626 "parse.y"
8215 {
8216 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8217}
8218#line 8219 "parse.c"
8219 break;
8220
8221 case YYSYMBOL_keyword_alias: /* "'alias'" */
8222#line 2626 "parse.y"
8223 {
8224 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8225}
8226#line 8227 "parse.c"
8227 break;
8228
8229 case YYSYMBOL_keyword_defined: /* "'defined?'" */
8230#line 2626 "parse.y"
8231 {
8232 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8233}
8234#line 8235 "parse.c"
8235 break;
8236
8237 case YYSYMBOL_keyword_BEGIN: /* "'BEGIN'" */
8238#line 2626 "parse.y"
8239 {
8240 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8241}
8242#line 8243 "parse.c"
8243 break;
8244
8245 case YYSYMBOL_keyword_END: /* "'END'" */
8246#line 2626 "parse.y"
8247 {
8248 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8249}
8250#line 8251 "parse.c"
8251 break;
8252
8253 case YYSYMBOL_keyword__LINE__: /* "'__LINE__'" */
8254#line 2626 "parse.y"
8255 {
8256 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8257}
8258#line 8259 "parse.c"
8259 break;
8260
8261 case YYSYMBOL_keyword__FILE__: /* "'__FILE__'" */
8262#line 2626 "parse.y"
8263 {
8264 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8265}
8266#line 8267 "parse.c"
8267 break;
8268
8269 case YYSYMBOL_keyword__ENCODING__: /* "'__ENCODING__'" */
8270#line 2626 "parse.y"
8271 {
8272 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8273}
8274#line 8275 "parse.c"
8275 break;
8276
8277 case YYSYMBOL_tIDENTIFIER: /* "local variable or method" */
8278#line 2626 "parse.y"
8279 {
8280 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8281}
8282#line 8283 "parse.c"
8283 break;
8284
8285 case YYSYMBOL_tFID: /* "method" */
8286#line 2626 "parse.y"
8287 {
8288 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8289}
8290#line 8291 "parse.c"
8291 break;
8292
8293 case YYSYMBOL_tGVAR: /* "global variable" */
8294#line 2626 "parse.y"
8295 {
8296 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8297}
8298#line 8299 "parse.c"
8299 break;
8300
8301 case YYSYMBOL_tIVAR: /* "instance variable" */
8302#line 2626 "parse.y"
8303 {
8304 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8305}
8306#line 8307 "parse.c"
8307 break;
8308
8309 case YYSYMBOL_tCONSTANT: /* "constant" */
8310#line 2626 "parse.y"
8311 {
8312 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8313}
8314#line 8315 "parse.c"
8315 break;
8316
8317 case YYSYMBOL_tCVAR: /* "class variable" */
8318#line 2626 "parse.y"
8319 {
8320 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8321}
8322#line 8323 "parse.c"
8323 break;
8324
8325 case YYSYMBOL_tLABEL: /* "label" */
8326#line 2626 "parse.y"
8327 {
8328 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8329}
8330#line 8331 "parse.c"
8331 break;
8332
8333 case YYSYMBOL_tINTEGER: /* "integer literal" */
8334#line 2629 "parse.y"
8335 {
8336 switch (nd_type(RNODE(((*yyvaluep).node)))) {
8337 case NODE_INTEGER:
8338 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_integer_literal_val(((*yyvaluep).node)));
8339 break;
8340 case NODE_FLOAT:
8341 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_float_literal_val(((*yyvaluep).node)));
8342 break;
8343 case NODE_RATIONAL:
8344 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_rational_literal_val(((*yyvaluep).node)));
8345 break;
8346 case NODE_IMAGINARY:
8347 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_imaginary_literal_val(((*yyvaluep).node)));
8348 break;
8349 default:
8350 break;
8351 }
8352}
8353#line 8354 "parse.c"
8354 break;
8355
8356 case YYSYMBOL_tFLOAT: /* "float literal" */
8357#line 2629 "parse.y"
8358 {
8359 switch (nd_type(RNODE(((*yyvaluep).node)))) {
8360 case NODE_INTEGER:
8361 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_integer_literal_val(((*yyvaluep).node)));
8362 break;
8363 case NODE_FLOAT:
8364 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_float_literal_val(((*yyvaluep).node)));
8365 break;
8366 case NODE_RATIONAL:
8367 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_rational_literal_val(((*yyvaluep).node)));
8368 break;
8369 case NODE_IMAGINARY:
8370 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_imaginary_literal_val(((*yyvaluep).node)));
8371 break;
8372 default:
8373 break;
8374 }
8375}
8376#line 8377 "parse.c"
8377 break;
8378
8379 case YYSYMBOL_tRATIONAL: /* "rational literal" */
8380#line 2629 "parse.y"
8381 {
8382 switch (nd_type(RNODE(((*yyvaluep).node)))) {
8383 case NODE_INTEGER:
8384 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_integer_literal_val(((*yyvaluep).node)));
8385 break;
8386 case NODE_FLOAT:
8387 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_float_literal_val(((*yyvaluep).node)));
8388 break;
8389 case NODE_RATIONAL:
8390 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_rational_literal_val(((*yyvaluep).node)));
8391 break;
8392 case NODE_IMAGINARY:
8393 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_imaginary_literal_val(((*yyvaluep).node)));
8394 break;
8395 default:
8396 break;
8397 }
8398}
8399#line 8400 "parse.c"
8400 break;
8401
8402 case YYSYMBOL_tIMAGINARY: /* "imaginary literal" */
8403#line 2629 "parse.y"
8404 {
8405 switch (nd_type(RNODE(((*yyvaluep).node)))) {
8406 case NODE_INTEGER:
8407 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_integer_literal_val(((*yyvaluep).node)));
8408 break;
8409 case NODE_FLOAT:
8410 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_float_literal_val(((*yyvaluep).node)));
8411 break;
8412 case NODE_RATIONAL:
8413 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_rational_literal_val(((*yyvaluep).node)));
8414 break;
8415 case NODE_IMAGINARY:
8416 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_imaginary_literal_val(((*yyvaluep).node)));
8417 break;
8418 default:
8419 break;
8420 }
8421}
8422#line 8423 "parse.c"
8423 break;
8424
8425 case YYSYMBOL_tCHAR: /* "char literal" */
8426#line 2629 "parse.y"
8427 {
8428 switch (nd_type(RNODE(((*yyvaluep).node)))) {
8429 case NODE_INTEGER:
8430 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_integer_literal_val(((*yyvaluep).node)));
8431 break;
8432 case NODE_FLOAT:
8433 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_float_literal_val(((*yyvaluep).node)));
8434 break;
8435 case NODE_RATIONAL:
8436 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_rational_literal_val(((*yyvaluep).node)));
8437 break;
8438 case NODE_IMAGINARY:
8439 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_imaginary_literal_val(((*yyvaluep).node)));
8440 break;
8441 default:
8442 break;
8443 }
8444}
8445#line 8446 "parse.c"
8446 break;
8447
8448 case YYSYMBOL_tNTH_REF: /* "numbered reference" */
8449#line 2647 "parse.y"
8450 {
8451 rb_parser_printf(p, "$%ld", RNODE_NTH_REF(((*yyvaluep).node))->nd_nth);
8452}
8453#line 8454 "parse.c"
8454 break;
8455
8456 case YYSYMBOL_tBACK_REF: /* "back reference" */
8457#line 2650 "parse.y"
8458 {
8459 rb_parser_printf(p, "$%c", (int)RNODE_BACK_REF(((*yyvaluep).node))->nd_nth);
8460}
8461#line 8462 "parse.c"
8462 break;
8463
8464 case YYSYMBOL_tSTRING_CONTENT: /* "literal content" */
8465#line 2629 "parse.y"
8466 {
8467 switch (nd_type(RNODE(((*yyvaluep).node)))) {
8468 case NODE_INTEGER:
8469 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_integer_literal_val(((*yyvaluep).node)));
8470 break;
8471 case NODE_FLOAT:
8472 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_float_literal_val(((*yyvaluep).node)));
8473 break;
8474 case NODE_RATIONAL:
8475 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_rational_literal_val(((*yyvaluep).node)));
8476 break;
8477 case NODE_IMAGINARY:
8478 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_imaginary_literal_val(((*yyvaluep).node)));
8479 break;
8480 default:
8481 break;
8482 }
8483}
8484#line 8485 "parse.c"
8485 break;
8486
8487 case YYSYMBOL_69_: /* '.' */
8488#line 2626 "parse.y"
8489 {
8490 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8491}
8492#line 8493 "parse.c"
8493 break;
8494
8495 case YYSYMBOL_70_backslash_: /* "backslash" */
8496#line 2626 "parse.y"
8497 {
8498 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8499}
8500#line 8501 "parse.c"
8501 break;
8502
8503 case YYSYMBOL_72_escaped_horizontal_tab_: /* "escaped horizontal tab" */
8504#line 2626 "parse.y"
8505 {
8506 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8507}
8508#line 8509 "parse.c"
8509 break;
8510
8511 case YYSYMBOL_73_escaped_form_feed_: /* "escaped form feed" */
8512#line 2626 "parse.y"
8513 {
8514 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8515}
8516#line 8517 "parse.c"
8517 break;
8518
8519 case YYSYMBOL_74_escaped_carriage_return_: /* "escaped carriage return" */
8520#line 2626 "parse.y"
8521 {
8522 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8523}
8524#line 8525 "parse.c"
8525 break;
8526
8527 case YYSYMBOL_75_escaped_vertical_tab_: /* "escaped vertical tab" */
8528#line 2626 "parse.y"
8529 {
8530 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8531}
8532#line 8533 "parse.c"
8533 break;
8534
8535 case YYSYMBOL_tANDDOT: /* "&." */
8536#line 2626 "parse.y"
8537 {
8538 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8539}
8540#line 8541 "parse.c"
8541 break;
8542
8543 case YYSYMBOL_tCOLON2: /* "::" */
8544#line 2626 "parse.y"
8545 {
8546 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8547}
8548#line 8549 "parse.c"
8549 break;
8550
8551 case YYSYMBOL_tOP_ASGN: /* "operator-assignment" */
8552#line 2626 "parse.y"
8553 {
8554 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8555}
8556#line 8557 "parse.c"
8557 break;
8558
8559 case YYSYMBOL_compstmt_top_stmts: /* compstmt_top_stmts */
8560#line 2617 "parse.y"
8561 {
8562 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8563 rb_parser_printf(p, "NODE_SPECIAL");
8564 }
8565 else if (((*yyvaluep).node)) {
8566 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8567 }
8568}
8569#line 8570 "parse.c"
8570 break;
8571
8572 case YYSYMBOL_top_stmts: /* top_stmts */
8573#line 2617 "parse.y"
8574 {
8575 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8576 rb_parser_printf(p, "NODE_SPECIAL");
8577 }
8578 else if (((*yyvaluep).node)) {
8579 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8580 }
8581}
8582#line 8583 "parse.c"
8583 break;
8584
8585 case YYSYMBOL_top_stmt: /* top_stmt */
8586#line 2617 "parse.y"
8587 {
8588 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8589 rb_parser_printf(p, "NODE_SPECIAL");
8590 }
8591 else if (((*yyvaluep).node)) {
8592 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8593 }
8594}
8595#line 8596 "parse.c"
8596 break;
8597
8598 case YYSYMBOL_block_open: /* block_open */
8599#line 2617 "parse.y"
8600 {
8601 if ((NODE *)((*yyvaluep).node_exits) == (NODE *)-1) {
8602 rb_parser_printf(p, "NODE_SPECIAL");
8603 }
8604 else if (((*yyvaluep).node_exits)) {
8605 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_exits)))));
8606 }
8607}
8608#line 8609 "parse.c"
8609 break;
8610
8611 case YYSYMBOL_begin_block: /* begin_block */
8612#line 2617 "parse.y"
8613 {
8614 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8615 rb_parser_printf(p, "NODE_SPECIAL");
8616 }
8617 else if (((*yyvaluep).node)) {
8618 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8619 }
8620}
8621#line 8622 "parse.c"
8622 break;
8623
8624 case YYSYMBOL_compstmt_stmts: /* compstmt_stmts */
8625#line 2617 "parse.y"
8626 {
8627 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8628 rb_parser_printf(p, "NODE_SPECIAL");
8629 }
8630 else if (((*yyvaluep).node)) {
8631 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8632 }
8633}
8634#line 8635 "parse.c"
8635 break;
8636
8637 case YYSYMBOL_bodystmt: /* bodystmt */
8638#line 2617 "parse.y"
8639 {
8640 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8641 rb_parser_printf(p, "NODE_SPECIAL");
8642 }
8643 else if (((*yyvaluep).node)) {
8644 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8645 }
8646}
8647#line 8648 "parse.c"
8648 break;
8649
8650 case YYSYMBOL_stmts: /* stmts */
8651#line 2617 "parse.y"
8652 {
8653 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8654 rb_parser_printf(p, "NODE_SPECIAL");
8655 }
8656 else if (((*yyvaluep).node)) {
8657 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8658 }
8659}
8660#line 8661 "parse.c"
8661 break;
8662
8663 case YYSYMBOL_stmt_or_begin: /* stmt_or_begin */
8664#line 2617 "parse.y"
8665 {
8666 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8667 rb_parser_printf(p, "NODE_SPECIAL");
8668 }
8669 else if (((*yyvaluep).node)) {
8670 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8671 }
8672}
8673#line 8674 "parse.c"
8674 break;
8675
8676 case YYSYMBOL_allow_exits: /* allow_exits */
8677#line 2617 "parse.y"
8678 {
8679 if ((NODE *)((*yyvaluep).node_exits) == (NODE *)-1) {
8680 rb_parser_printf(p, "NODE_SPECIAL");
8681 }
8682 else if (((*yyvaluep).node_exits)) {
8683 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_exits)))));
8684 }
8685}
8686#line 8687 "parse.c"
8687 break;
8688
8689 case YYSYMBOL_stmt: /* stmt */
8690#line 2617 "parse.y"
8691 {
8692 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8693 rb_parser_printf(p, "NODE_SPECIAL");
8694 }
8695 else if (((*yyvaluep).node)) {
8696 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8697 }
8698}
8699#line 8700 "parse.c"
8700 break;
8701
8702 case YYSYMBOL_asgn_mrhs: /* asgn_mrhs */
8703#line 2617 "parse.y"
8704 {
8705 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8706 rb_parser_printf(p, "NODE_SPECIAL");
8707 }
8708 else if (((*yyvaluep).node)) {
8709 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8710 }
8711}
8712#line 8713 "parse.c"
8713 break;
8714
8715 case YYSYMBOL_asgn_command_rhs: /* asgn_command_rhs */
8716#line 2617 "parse.y"
8717 {
8718 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8719 rb_parser_printf(p, "NODE_SPECIAL");
8720 }
8721 else if (((*yyvaluep).node)) {
8722 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8723 }
8724}
8725#line 8726 "parse.c"
8726 break;
8727
8728 case YYSYMBOL_command_asgn: /* command_asgn */
8729#line 2617 "parse.y"
8730 {
8731 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8732 rb_parser_printf(p, "NODE_SPECIAL");
8733 }
8734 else if (((*yyvaluep).node)) {
8735 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8736 }
8737}
8738#line 8739 "parse.c"
8739 break;
8740
8741 case YYSYMBOL_op_asgn_command_rhs: /* op_asgn_command_rhs */
8742#line 2617 "parse.y"
8743 {
8744 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8745 rb_parser_printf(p, "NODE_SPECIAL");
8746 }
8747 else if (((*yyvaluep).node)) {
8748 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8749 }
8750}
8751#line 8752 "parse.c"
8752 break;
8753
8754 case YYSYMBOL_def_endless_method_endless_command: /* def_endless_method_endless_command */
8755#line 2617 "parse.y"
8756 {
8757 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8758 rb_parser_printf(p, "NODE_SPECIAL");
8759 }
8760 else if (((*yyvaluep).node)) {
8761 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8762 }
8763}
8764#line 8765 "parse.c"
8765 break;
8766
8767 case YYSYMBOL_endless_command: /* endless_command */
8768#line 2617 "parse.y"
8769 {
8770 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8771 rb_parser_printf(p, "NODE_SPECIAL");
8772 }
8773 else if (((*yyvaluep).node)) {
8774 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8775 }
8776}
8777#line 8778 "parse.c"
8778 break;
8779
8780 case YYSYMBOL_command_rhs: /* command_rhs */
8781#line 2617 "parse.y"
8782 {
8783 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8784 rb_parser_printf(p, "NODE_SPECIAL");
8785 }
8786 else if (((*yyvaluep).node)) {
8787 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8788 }
8789}
8790#line 8791 "parse.c"
8791 break;
8792
8793 case YYSYMBOL_expr: /* expr */
8794#line 2617 "parse.y"
8795 {
8796 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8797 rb_parser_printf(p, "NODE_SPECIAL");
8798 }
8799 else if (((*yyvaluep).node)) {
8800 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8801 }
8802}
8803#line 8804 "parse.c"
8804 break;
8805
8806 case YYSYMBOL_def_name: /* def_name */
8807#line 2626 "parse.y"
8808 {
8809 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8810}
8811#line 8812 "parse.c"
8812 break;
8813
8814 case YYSYMBOL_defn_head: /* defn_head */
8815#line 2617 "parse.y"
8816 {
8817 if ((NODE *)((*yyvaluep).node_def_temp) == (NODE *)-1) {
8818 rb_parser_printf(p, "NODE_SPECIAL");
8819 }
8820 else if (((*yyvaluep).node_def_temp)) {
8821 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_def_temp)))));
8822 }
8823}
8824#line 8825 "parse.c"
8825 break;
8826
8827 case YYSYMBOL_defs_head: /* defs_head */
8828#line 2617 "parse.y"
8829 {
8830 if ((NODE *)((*yyvaluep).node_def_temp) == (NODE *)-1) {
8831 rb_parser_printf(p, "NODE_SPECIAL");
8832 }
8833 else if (((*yyvaluep).node_def_temp)) {
8834 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_def_temp)))));
8835 }
8836}
8837#line 8838 "parse.c"
8838 break;
8839
8840 case YYSYMBOL_value_expr_expr: /* value_expr_expr */
8841#line 2617 "parse.y"
8842 {
8843 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8844 rb_parser_printf(p, "NODE_SPECIAL");
8845 }
8846 else if (((*yyvaluep).node)) {
8847 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8848 }
8849}
8850#line 8851 "parse.c"
8851 break;
8852
8853 case YYSYMBOL_expr_value: /* expr_value */
8854#line 2617 "parse.y"
8855 {
8856 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8857 rb_parser_printf(p, "NODE_SPECIAL");
8858 }
8859 else if (((*yyvaluep).node)) {
8860 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8861 }
8862}
8863#line 8864 "parse.c"
8864 break;
8865
8866 case YYSYMBOL_expr_value_do: /* expr_value_do */
8867#line 2617 "parse.y"
8868 {
8869 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8870 rb_parser_printf(p, "NODE_SPECIAL");
8871 }
8872 else if (((*yyvaluep).node)) {
8873 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8874 }
8875}
8876#line 8877 "parse.c"
8877 break;
8878
8879 case YYSYMBOL_command_call: /* command_call */
8880#line 2617 "parse.y"
8881 {
8882 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8883 rb_parser_printf(p, "NODE_SPECIAL");
8884 }
8885 else if (((*yyvaluep).node)) {
8886 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8887 }
8888}
8889#line 8890 "parse.c"
8890 break;
8891
8892 case YYSYMBOL_value_expr_command_call: /* value_expr_command_call */
8893#line 2617 "parse.y"
8894 {
8895 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8896 rb_parser_printf(p, "NODE_SPECIAL");
8897 }
8898 else if (((*yyvaluep).node)) {
8899 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8900 }
8901}
8902#line 8903 "parse.c"
8903 break;
8904
8905 case YYSYMBOL_command_call_value: /* command_call_value */
8906#line 2617 "parse.y"
8907 {
8908 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8909 rb_parser_printf(p, "NODE_SPECIAL");
8910 }
8911 else if (((*yyvaluep).node)) {
8912 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8913 }
8914}
8915#line 8916 "parse.c"
8916 break;
8917
8918 case YYSYMBOL_block_command: /* block_command */
8919#line 2617 "parse.y"
8920 {
8921 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8922 rb_parser_printf(p, "NODE_SPECIAL");
8923 }
8924 else if (((*yyvaluep).node)) {
8925 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8926 }
8927}
8928#line 8929 "parse.c"
8929 break;
8930
8931 case YYSYMBOL_cmd_brace_block: /* cmd_brace_block */
8932#line 2617 "parse.y"
8933 {
8934 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8935 rb_parser_printf(p, "NODE_SPECIAL");
8936 }
8937 else if (((*yyvaluep).node)) {
8938 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8939 }
8940}
8941#line 8942 "parse.c"
8942 break;
8943
8944 case YYSYMBOL_fcall: /* fcall */
8945#line 2617 "parse.y"
8946 {
8947 if ((NODE *)((*yyvaluep).node_fcall) == (NODE *)-1) {
8948 rb_parser_printf(p, "NODE_SPECIAL");
8949 }
8950 else if (((*yyvaluep).node_fcall)) {
8951 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_fcall)))));
8952 }
8953}
8954#line 8955 "parse.c"
8955 break;
8956
8957 case YYSYMBOL_command: /* command */
8958#line 2617 "parse.y"
8959 {
8960 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8961 rb_parser_printf(p, "NODE_SPECIAL");
8962 }
8963 else if (((*yyvaluep).node)) {
8964 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8965 }
8966}
8967#line 8968 "parse.c"
8968 break;
8969
8970 case YYSYMBOL_mlhs: /* mlhs */
8971#line 2617 "parse.y"
8972 {
8973 if ((NODE *)((*yyvaluep).node_masgn) == (NODE *)-1) {
8974 rb_parser_printf(p, "NODE_SPECIAL");
8975 }
8976 else if (((*yyvaluep).node_masgn)) {
8977 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_masgn)))));
8978 }
8979}
8980#line 8981 "parse.c"
8981 break;
8982
8983 case YYSYMBOL_mlhs_inner: /* mlhs_inner */
8984#line 2617 "parse.y"
8985 {
8986 if ((NODE *)((*yyvaluep).node_masgn) == (NODE *)-1) {
8987 rb_parser_printf(p, "NODE_SPECIAL");
8988 }
8989 else if (((*yyvaluep).node_masgn)) {
8990 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_masgn)))));
8991 }
8992}
8993#line 8994 "parse.c"
8994 break;
8995
8996 case YYSYMBOL_mlhs_basic: /* mlhs_basic */
8997#line 2617 "parse.y"
8998 {
8999 if ((NODE *)((*yyvaluep).node_masgn) == (NODE *)-1) {
9000 rb_parser_printf(p, "NODE_SPECIAL");
9001 }
9002 else if (((*yyvaluep).node_masgn)) {
9003 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_masgn)))));
9004 }
9005}
9006#line 9007 "parse.c"
9007 break;
9008
9009 case YYSYMBOL_mlhs_items_mlhs_item: /* mlhs_items_mlhs_item */
9010#line 2617 "parse.y"
9011 {
9012 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9013 rb_parser_printf(p, "NODE_SPECIAL");
9014 }
9015 else if (((*yyvaluep).node)) {
9016 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9017 }
9018}
9019#line 9020 "parse.c"
9020 break;
9021
9022 case YYSYMBOL_mlhs_item: /* mlhs_item */
9023#line 2617 "parse.y"
9024 {
9025 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9026 rb_parser_printf(p, "NODE_SPECIAL");
9027 }
9028 else if (((*yyvaluep).node)) {
9029 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9030 }
9031}
9032#line 9033 "parse.c"
9033 break;
9034
9035 case YYSYMBOL_mlhs_head: /* mlhs_head */
9036#line 2617 "parse.y"
9037 {
9038 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9039 rb_parser_printf(p, "NODE_SPECIAL");
9040 }
9041 else if (((*yyvaluep).node)) {
9042 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9043 }
9044}
9045#line 9046 "parse.c"
9046 break;
9047
9048 case YYSYMBOL_mlhs_node: /* mlhs_node */
9049#line 2617 "parse.y"
9050 {
9051 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9052 rb_parser_printf(p, "NODE_SPECIAL");
9053 }
9054 else if (((*yyvaluep).node)) {
9055 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9056 }
9057}
9058#line 9059 "parse.c"
9059 break;
9060
9061 case YYSYMBOL_lhs: /* lhs */
9062#line 2617 "parse.y"
9063 {
9064 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9065 rb_parser_printf(p, "NODE_SPECIAL");
9066 }
9067 else if (((*yyvaluep).node)) {
9068 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9069 }
9070}
9071#line 9072 "parse.c"
9072 break;
9073
9074 case YYSYMBOL_cname: /* cname */
9075#line 2626 "parse.y"
9076 {
9077 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
9078}
9079#line 9080 "parse.c"
9080 break;
9081
9082 case YYSYMBOL_cpath: /* cpath */
9083#line 2617 "parse.y"
9084 {
9085 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9086 rb_parser_printf(p, "NODE_SPECIAL");
9087 }
9088 else if (((*yyvaluep).node)) {
9089 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9090 }
9091}
9092#line 9093 "parse.c"
9093 break;
9094
9095 case YYSYMBOL_fname: /* fname */
9096#line 2626 "parse.y"
9097 {
9098 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
9099}
9100#line 9101 "parse.c"
9101 break;
9102
9103 case YYSYMBOL_fitem: /* fitem */
9104#line 2617 "parse.y"
9105 {
9106 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9107 rb_parser_printf(p, "NODE_SPECIAL");
9108 }
9109 else if (((*yyvaluep).node)) {
9110 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9111 }
9112}
9113#line 9114 "parse.c"
9114 break;
9115
9116 case YYSYMBOL_undef_list: /* undef_list */
9117#line 2617 "parse.y"
9118 {
9119 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9120 rb_parser_printf(p, "NODE_SPECIAL");
9121 }
9122 else if (((*yyvaluep).node)) {
9123 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9124 }
9125}
9126#line 9127 "parse.c"
9127 break;
9128
9129 case YYSYMBOL_op: /* op */
9130#line 2626 "parse.y"
9131 {
9132 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
9133}
9134#line 9135 "parse.c"
9135 break;
9136
9137 case YYSYMBOL_reswords: /* reswords */
9138#line 2626 "parse.y"
9139 {
9140 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
9141}
9142#line 9143 "parse.c"
9143 break;
9144
9145 case YYSYMBOL_asgn_arg_rhs: /* asgn_arg_rhs */
9146#line 2617 "parse.y"
9147 {
9148 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9149 rb_parser_printf(p, "NODE_SPECIAL");
9150 }
9151 else if (((*yyvaluep).node)) {
9152 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9153 }
9154}
9155#line 9156 "parse.c"
9156 break;
9157
9158 case YYSYMBOL_arg: /* arg */
9159#line 2617 "parse.y"
9160 {
9161 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9162 rb_parser_printf(p, "NODE_SPECIAL");
9163 }
9164 else if (((*yyvaluep).node)) {
9165 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9166 }
9167}
9168#line 9169 "parse.c"
9169 break;
9170
9171 case YYSYMBOL_op_asgn_arg_rhs: /* op_asgn_arg_rhs */
9172#line 2617 "parse.y"
9173 {
9174 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9175 rb_parser_printf(p, "NODE_SPECIAL");
9176 }
9177 else if (((*yyvaluep).node)) {
9178 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9179 }
9180}
9181#line 9182 "parse.c"
9182 break;
9183
9184 case YYSYMBOL_range_expr_arg: /* range_expr_arg */
9185#line 2617 "parse.y"
9186 {
9187 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9188 rb_parser_printf(p, "NODE_SPECIAL");
9189 }
9190 else if (((*yyvaluep).node)) {
9191 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9192 }
9193}
9194#line 9195 "parse.c"
9195 break;
9196
9197 case YYSYMBOL_def_endless_method_endless_arg: /* def_endless_method_endless_arg */
9198#line 2617 "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_ternary: /* ternary */
9211#line 2617 "parse.y"
9212 {
9213 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9214 rb_parser_printf(p, "NODE_SPECIAL");
9215 }
9216 else if (((*yyvaluep).node)) {
9217 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9218 }
9219}
9220#line 9221 "parse.c"
9221 break;
9222
9223 case YYSYMBOL_endless_arg: /* endless_arg */
9224#line 2617 "parse.y"
9225 {
9226 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9227 rb_parser_printf(p, "NODE_SPECIAL");
9228 }
9229 else if (((*yyvaluep).node)) {
9230 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9231 }
9232}
9233#line 9234 "parse.c"
9234 break;
9235
9236 case YYSYMBOL_relop: /* relop */
9237#line 2626 "parse.y"
9238 {
9239 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
9240}
9241#line 9242 "parse.c"
9242 break;
9243
9244 case YYSYMBOL_rel_expr: /* rel_expr */
9245#line 2617 "parse.y"
9246 {
9247 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9248 rb_parser_printf(p, "NODE_SPECIAL");
9249 }
9250 else if (((*yyvaluep).node)) {
9251 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9252 }
9253}
9254#line 9255 "parse.c"
9255 break;
9256
9257 case YYSYMBOL_value_expr_arg: /* value_expr_arg */
9258#line 2617 "parse.y"
9259 {
9260 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9261 rb_parser_printf(p, "NODE_SPECIAL");
9262 }
9263 else if (((*yyvaluep).node)) {
9264 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9265 }
9266}
9267#line 9268 "parse.c"
9268 break;
9269
9270 case YYSYMBOL_arg_value: /* arg_value */
9271#line 2617 "parse.y"
9272 {
9273 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9274 rb_parser_printf(p, "NODE_SPECIAL");
9275 }
9276 else if (((*yyvaluep).node)) {
9277 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9278 }
9279}
9280#line 9281 "parse.c"
9281 break;
9282
9283 case YYSYMBOL_aref_args: /* aref_args */
9284#line 2617 "parse.y"
9285 {
9286 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9287 rb_parser_printf(p, "NODE_SPECIAL");
9288 }
9289 else if (((*yyvaluep).node)) {
9290 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9291 }
9292}
9293#line 9294 "parse.c"
9294 break;
9295
9296 case YYSYMBOL_arg_rhs: /* arg_rhs */
9297#line 2617 "parse.y"
9298 {
9299 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9300 rb_parser_printf(p, "NODE_SPECIAL");
9301 }
9302 else if (((*yyvaluep).node)) {
9303 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9304 }
9305}
9306#line 9307 "parse.c"
9307 break;
9308
9309 case YYSYMBOL_paren_args: /* paren_args */
9310#line 2617 "parse.y"
9311 {
9312 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9313 rb_parser_printf(p, "NODE_SPECIAL");
9314 }
9315 else if (((*yyvaluep).node)) {
9316 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9317 }
9318}
9319#line 9320 "parse.c"
9320 break;
9321
9322 case YYSYMBOL_opt_paren_args: /* opt_paren_args */
9323#line 2617 "parse.y"
9324 {
9325 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9326 rb_parser_printf(p, "NODE_SPECIAL");
9327 }
9328 else if (((*yyvaluep).node)) {
9329 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9330 }
9331}
9332#line 9333 "parse.c"
9333 break;
9334
9335 case YYSYMBOL_opt_call_args: /* opt_call_args */
9336#line 2617 "parse.y"
9337 {
9338 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9339 rb_parser_printf(p, "NODE_SPECIAL");
9340 }
9341 else if (((*yyvaluep).node)) {
9342 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9343 }
9344}
9345#line 9346 "parse.c"
9346 break;
9347
9348 case YYSYMBOL_value_expr_command: /* value_expr_command */
9349#line 2617 "parse.y"
9350 {
9351 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9352 rb_parser_printf(p, "NODE_SPECIAL");
9353 }
9354 else if (((*yyvaluep).node)) {
9355 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9356 }
9357}
9358#line 9359 "parse.c"
9359 break;
9360
9361 case YYSYMBOL_call_args: /* call_args */
9362#line 2617 "parse.y"
9363 {
9364 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9365 rb_parser_printf(p, "NODE_SPECIAL");
9366 }
9367 else if (((*yyvaluep).node)) {
9368 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9369 }
9370}
9371#line 9372 "parse.c"
9372 break;
9373
9374 case YYSYMBOL_command_args: /* command_args */
9375#line 2617 "parse.y"
9376 {
9377 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9378 rb_parser_printf(p, "NODE_SPECIAL");
9379 }
9380 else if (((*yyvaluep).node)) {
9381 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9382 }
9383}
9384#line 9385 "parse.c"
9385 break;
9386
9387 case YYSYMBOL_block_arg: /* block_arg */
9388#line 2617 "parse.y"
9389 {
9390 if ((NODE *)((*yyvaluep).node_block_pass) == (NODE *)-1) {
9391 rb_parser_printf(p, "NODE_SPECIAL");
9392 }
9393 else if (((*yyvaluep).node_block_pass)) {
9394 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_block_pass)))));
9395 }
9396}
9397#line 9398 "parse.c"
9398 break;
9399
9400 case YYSYMBOL_opt_block_arg: /* opt_block_arg */
9401#line 2617 "parse.y"
9402 {
9403 if ((NODE *)((*yyvaluep).node_block_pass) == (NODE *)-1) {
9404 rb_parser_printf(p, "NODE_SPECIAL");
9405 }
9406 else if (((*yyvaluep).node_block_pass)) {
9407 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_block_pass)))));
9408 }
9409}
9410#line 9411 "parse.c"
9411 break;
9412
9413 case YYSYMBOL_args: /* args */
9414#line 2617 "parse.y"
9415 {
9416 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9417 rb_parser_printf(p, "NODE_SPECIAL");
9418 }
9419 else if (((*yyvaluep).node)) {
9420 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9421 }
9422}
9423#line 9424 "parse.c"
9424 break;
9425
9426 case YYSYMBOL_arg_splat: /* arg_splat */
9427#line 2617 "parse.y"
9428 {
9429 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9430 rb_parser_printf(p, "NODE_SPECIAL");
9431 }
9432 else if (((*yyvaluep).node)) {
9433 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9434 }
9435}
9436#line 9437 "parse.c"
9437 break;
9438
9439 case YYSYMBOL_mrhs_arg: /* mrhs_arg */
9440#line 2617 "parse.y"
9441 {
9442 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9443 rb_parser_printf(p, "NODE_SPECIAL");
9444 }
9445 else if (((*yyvaluep).node)) {
9446 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9447 }
9448}
9449#line 9450 "parse.c"
9450 break;
9451
9452 case YYSYMBOL_mrhs: /* mrhs */
9453#line 2617 "parse.y"
9454 {
9455 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9456 rb_parser_printf(p, "NODE_SPECIAL");
9457 }
9458 else if (((*yyvaluep).node)) {
9459 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9460 }
9461}
9462#line 9463 "parse.c"
9463 break;
9464
9465 case YYSYMBOL_primary: /* primary */
9466#line 2617 "parse.y"
9467 {
9468 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9469 rb_parser_printf(p, "NODE_SPECIAL");
9470 }
9471 else if (((*yyvaluep).node)) {
9472 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9473 }
9474}
9475#line 9476 "parse.c"
9476 break;
9477
9478 case YYSYMBOL_value_expr_primary: /* value_expr_primary */
9479#line 2617 "parse.y"
9480 {
9481 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9482 rb_parser_printf(p, "NODE_SPECIAL");
9483 }
9484 else if (((*yyvaluep).node)) {
9485 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9486 }
9487}
9488#line 9489 "parse.c"
9489 break;
9490
9491 case YYSYMBOL_primary_value: /* primary_value */
9492#line 2617 "parse.y"
9493 {
9494 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9495 rb_parser_printf(p, "NODE_SPECIAL");
9496 }
9497 else if (((*yyvaluep).node)) {
9498 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9499 }
9500}
9501#line 9502 "parse.c"
9502 break;
9503
9504 case YYSYMBOL_k_while: /* k_while */
9505#line 2617 "parse.y"
9506 {
9507 if ((NODE *)((*yyvaluep).node_exits) == (NODE *)-1) {
9508 rb_parser_printf(p, "NODE_SPECIAL");
9509 }
9510 else if (((*yyvaluep).node_exits)) {
9511 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_exits)))));
9512 }
9513}
9514#line 9515 "parse.c"
9515 break;
9516
9517 case YYSYMBOL_k_until: /* k_until */
9518#line 2617 "parse.y"
9519 {
9520 if ((NODE *)((*yyvaluep).node_exits) == (NODE *)-1) {
9521 rb_parser_printf(p, "NODE_SPECIAL");
9522 }
9523 else if (((*yyvaluep).node_exits)) {
9524 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_exits)))));
9525 }
9526}
9527#line 9528 "parse.c"
9528 break;
9529
9530 case YYSYMBOL_k_for: /* k_for */
9531#line 2617 "parse.y"
9532 {
9533 if ((NODE *)((*yyvaluep).node_exits) == (NODE *)-1) {
9534 rb_parser_printf(p, "NODE_SPECIAL");
9535 }
9536 else if (((*yyvaluep).node_exits)) {
9537 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_exits)))));
9538 }
9539}
9540#line 9541 "parse.c"
9541 break;
9542
9543 case YYSYMBOL_k_def: /* k_def */
9544#line 2617 "parse.y"
9545 {
9546 if ((NODE *)((*yyvaluep).node_def_temp) == (NODE *)-1) {
9547 rb_parser_printf(p, "NODE_SPECIAL");
9548 }
9549 else if (((*yyvaluep).node_def_temp)) {
9550 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_def_temp)))));
9551 }
9552}
9553#line 9554 "parse.c"
9554 break;
9555
9556 case YYSYMBOL_do: /* do */
9557#line 2626 "parse.y"
9558 {
9559 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
9560}
9561#line 9562 "parse.c"
9562 break;
9563
9564 case YYSYMBOL_if_tail: /* if_tail */
9565#line 2617 "parse.y"
9566 {
9567 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9568 rb_parser_printf(p, "NODE_SPECIAL");
9569 }
9570 else if (((*yyvaluep).node)) {
9571 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9572 }
9573}
9574#line 9575 "parse.c"
9575 break;
9576
9577 case YYSYMBOL_opt_else: /* opt_else */
9578#line 2617 "parse.y"
9579 {
9580 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9581 rb_parser_printf(p, "NODE_SPECIAL");
9582 }
9583 else if (((*yyvaluep).node)) {
9584 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9585 }
9586}
9587#line 9588 "parse.c"
9588 break;
9589
9590 case YYSYMBOL_for_var: /* for_var */
9591#line 2617 "parse.y"
9592 {
9593 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9594 rb_parser_printf(p, "NODE_SPECIAL");
9595 }
9596 else if (((*yyvaluep).node)) {
9597 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9598 }
9599}
9600#line 9601 "parse.c"
9601 break;
9602
9603 case YYSYMBOL_f_marg: /* f_marg */
9604#line 2617 "parse.y"
9605 {
9606 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9607 rb_parser_printf(p, "NODE_SPECIAL");
9608 }
9609 else if (((*yyvaluep).node)) {
9610 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9611 }
9612}
9613#line 9614 "parse.c"
9614 break;
9615
9616 case YYSYMBOL_mlhs_items_f_marg: /* mlhs_items_f_marg */
9617#line 2617 "parse.y"
9618 {
9619 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9620 rb_parser_printf(p, "NODE_SPECIAL");
9621 }
9622 else if (((*yyvaluep).node)) {
9623 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9624 }
9625}
9626#line 9627 "parse.c"
9627 break;
9628
9629 case YYSYMBOL_f_margs: /* f_margs */
9630#line 2617 "parse.y"
9631 {
9632 if ((NODE *)((*yyvaluep).node_masgn) == (NODE *)-1) {
9633 rb_parser_printf(p, "NODE_SPECIAL");
9634 }
9635 else if (((*yyvaluep).node_masgn)) {
9636 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_masgn)))));
9637 }
9638}
9639#line 9640 "parse.c"
9640 break;
9641
9642 case YYSYMBOL_f_rest_marg: /* f_rest_marg */
9643#line 2617 "parse.y"
9644 {
9645 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9646 rb_parser_printf(p, "NODE_SPECIAL");
9647 }
9648 else if (((*yyvaluep).node)) {
9649 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9650 }
9651}
9652#line 9653 "parse.c"
9653 break;
9654
9655 case YYSYMBOL_f_any_kwrest: /* f_any_kwrest */
9656#line 2626 "parse.y"
9657 {
9658 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
9659}
9660#line 9661 "parse.c"
9661 break;
9662
9663 case YYSYMBOL_f_kw_primary_value: /* f_kw_primary_value */
9664#line 2617 "parse.y"
9665 {
9666 if ((NODE *)((*yyvaluep).node_kw_arg) == (NODE *)-1) {
9667 rb_parser_printf(p, "NODE_SPECIAL");
9668 }
9669 else if (((*yyvaluep).node_kw_arg)) {
9670 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_kw_arg)))));
9671 }
9672}
9673#line 9674 "parse.c"
9674 break;
9675
9676 case YYSYMBOL_f_kwarg_primary_value: /* f_kwarg_primary_value */
9677#line 2617 "parse.y"
9678 {
9679 if ((NODE *)((*yyvaluep).node_kw_arg) == (NODE *)-1) {
9680 rb_parser_printf(p, "NODE_SPECIAL");
9681 }
9682 else if (((*yyvaluep).node_kw_arg)) {
9683 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_kw_arg)))));
9684 }
9685}
9686#line 9687 "parse.c"
9687 break;
9688
9689 case YYSYMBOL_args_tail_basic_primary_value: /* args_tail_basic_primary_value */
9690#line 2617 "parse.y"
9691 {
9692 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
9693 rb_parser_printf(p, "NODE_SPECIAL");
9694 }
9695 else if (((*yyvaluep).node_args)) {
9696 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
9697 }
9698}
9699#line 9700 "parse.c"
9700 break;
9701
9702 case YYSYMBOL_block_args_tail: /* block_args_tail */
9703#line 2617 "parse.y"
9704 {
9705 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
9706 rb_parser_printf(p, "NODE_SPECIAL");
9707 }
9708 else if (((*yyvaluep).node_args)) {
9709 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
9710 }
9711}
9712#line 9713 "parse.c"
9713 break;
9714
9715 case YYSYMBOL_excessed_comma: /* excessed_comma */
9716#line 2626 "parse.y"
9717 {
9718 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
9719}
9720#line 9721 "parse.c"
9721 break;
9722
9723 case YYSYMBOL_f_opt_primary_value: /* f_opt_primary_value */
9724#line 2617 "parse.y"
9725 {
9726 if ((NODE *)((*yyvaluep).node_opt_arg) == (NODE *)-1) {
9727 rb_parser_printf(p, "NODE_SPECIAL");
9728 }
9729 else if (((*yyvaluep).node_opt_arg)) {
9730 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_opt_arg)))));
9731 }
9732}
9733#line 9734 "parse.c"
9734 break;
9735
9736 case YYSYMBOL_f_opt_arg_primary_value: /* f_opt_arg_primary_value */
9737#line 2617 "parse.y"
9738 {
9739 if ((NODE *)((*yyvaluep).node_opt_arg) == (NODE *)-1) {
9740 rb_parser_printf(p, "NODE_SPECIAL");
9741 }
9742 else if (((*yyvaluep).node_opt_arg)) {
9743 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_opt_arg)))));
9744 }
9745}
9746#line 9747 "parse.c"
9747 break;
9748
9749 case YYSYMBOL_opt_args_tail_block_args_tail: /* opt_args_tail_block_args_tail */
9750#line 2617 "parse.y"
9751 {
9752 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
9753 rb_parser_printf(p, "NODE_SPECIAL");
9754 }
9755 else if (((*yyvaluep).node_args)) {
9756 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
9757 }
9758}
9759#line 9760 "parse.c"
9760 break;
9761
9762 case YYSYMBOL_block_param: /* block_param */
9763#line 2617 "parse.y"
9764 {
9765 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
9766 rb_parser_printf(p, "NODE_SPECIAL");
9767 }
9768 else if (((*yyvaluep).node_args)) {
9769 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
9770 }
9771}
9772#line 9773 "parse.c"
9773 break;
9774
9775 case YYSYMBOL_opt_block_param_def: /* opt_block_param_def */
9776#line 2617 "parse.y"
9777 {
9778 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
9779 rb_parser_printf(p, "NODE_SPECIAL");
9780 }
9781 else if (((*yyvaluep).node_args)) {
9782 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
9783 }
9784}
9785#line 9786 "parse.c"
9786 break;
9787
9788 case YYSYMBOL_block_param_def: /* block_param_def */
9789#line 2617 "parse.y"
9790 {
9791 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
9792 rb_parser_printf(p, "NODE_SPECIAL");
9793 }
9794 else if (((*yyvaluep).node_args)) {
9795 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
9796 }
9797}
9798#line 9799 "parse.c"
9799 break;
9800
9801 case YYSYMBOL_opt_block_param: /* opt_block_param */
9802#line 2617 "parse.y"
9803 {
9804 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
9805 rb_parser_printf(p, "NODE_SPECIAL");
9806 }
9807 else if (((*yyvaluep).node_args)) {
9808 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
9809 }
9810}
9811#line 9812 "parse.c"
9812 break;
9813
9814 case YYSYMBOL_opt_bv_decl: /* opt_bv_decl */
9815#line 2626 "parse.y"
9816 {
9817 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
9818}
9819#line 9820 "parse.c"
9820 break;
9821
9822 case YYSYMBOL_bv_decls: /* bv_decls */
9823#line 2626 "parse.y"
9824 {
9825 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
9826}
9827#line 9828 "parse.c"
9828 break;
9829
9830 case YYSYMBOL_bvar: /* bvar */
9831#line 2626 "parse.y"
9832 {
9833 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
9834}
9835#line 9836 "parse.c"
9836 break;
9837
9838 case YYSYMBOL_numparam: /* numparam */
9839#line 2617 "parse.y"
9840 {
9841 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9842 rb_parser_printf(p, "NODE_SPECIAL");
9843 }
9844 else if (((*yyvaluep).node)) {
9845 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9846 }
9847}
9848#line 9849 "parse.c"
9849 break;
9850
9851 case YYSYMBOL_it_id: /* it_id */
9852#line 2626 "parse.y"
9853 {
9854 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
9855}
9856#line 9857 "parse.c"
9857 break;
9858
9859 case YYSYMBOL_lambda: /* lambda */
9860#line 2617 "parse.y"
9861 {
9862 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9863 rb_parser_printf(p, "NODE_SPECIAL");
9864 }
9865 else if (((*yyvaluep).node)) {
9866 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9867 }
9868}
9869#line 9870 "parse.c"
9870 break;
9871
9872 case YYSYMBOL_f_larglist: /* f_larglist */
9873#line 2617 "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_do_block: /* do_block */
9886#line 2617 "parse.y"
9887 {
9888 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9889 rb_parser_printf(p, "NODE_SPECIAL");
9890 }
9891 else if (((*yyvaluep).node)) {
9892 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9893 }
9894}
9895#line 9896 "parse.c"
9896 break;
9897
9898 case YYSYMBOL_block_call: /* block_call */
9899#line 2617 "parse.y"
9900 {
9901 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9902 rb_parser_printf(p, "NODE_SPECIAL");
9903 }
9904 else if (((*yyvaluep).node)) {
9905 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9906 }
9907}
9908#line 9909 "parse.c"
9909 break;
9910
9911 case YYSYMBOL_method_call: /* method_call */
9912#line 2617 "parse.y"
9913 {
9914 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9915 rb_parser_printf(p, "NODE_SPECIAL");
9916 }
9917 else if (((*yyvaluep).node)) {
9918 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9919 }
9920}
9921#line 9922 "parse.c"
9922 break;
9923
9924 case YYSYMBOL_brace_block: /* brace_block */
9925#line 2617 "parse.y"
9926 {
9927 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9928 rb_parser_printf(p, "NODE_SPECIAL");
9929 }
9930 else if (((*yyvaluep).node)) {
9931 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9932 }
9933}
9934#line 9935 "parse.c"
9935 break;
9936
9937 case YYSYMBOL_brace_body: /* brace_body */
9938#line 2617 "parse.y"
9939 {
9940 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9941 rb_parser_printf(p, "NODE_SPECIAL");
9942 }
9943 else if (((*yyvaluep).node)) {
9944 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9945 }
9946}
9947#line 9948 "parse.c"
9948 break;
9949
9950 case YYSYMBOL_do_body: /* do_body */
9951#line 2617 "parse.y"
9952 {
9953 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9954 rb_parser_printf(p, "NODE_SPECIAL");
9955 }
9956 else if (((*yyvaluep).node)) {
9957 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9958 }
9959}
9960#line 9961 "parse.c"
9961 break;
9962
9963 case YYSYMBOL_case_args: /* case_args */
9964#line 2617 "parse.y"
9965 {
9966 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9967 rb_parser_printf(p, "NODE_SPECIAL");
9968 }
9969 else if (((*yyvaluep).node)) {
9970 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9971 }
9972}
9973#line 9974 "parse.c"
9974 break;
9975
9976 case YYSYMBOL_case_body: /* case_body */
9977#line 2617 "parse.y"
9978 {
9979 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9980 rb_parser_printf(p, "NODE_SPECIAL");
9981 }
9982 else if (((*yyvaluep).node)) {
9983 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9984 }
9985}
9986#line 9987 "parse.c"
9987 break;
9988
9989 case YYSYMBOL_cases: /* cases */
9990#line 2617 "parse.y"
9991 {
9992 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9993 rb_parser_printf(p, "NODE_SPECIAL");
9994 }
9995 else if (((*yyvaluep).node)) {
9996 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9997 }
9998}
9999#line 10000 "parse.c"
10000 break;
10001
10002 case YYSYMBOL_p_case_body: /* p_case_body */
10003#line 2617 "parse.y"
10004 {
10005 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10006 rb_parser_printf(p, "NODE_SPECIAL");
10007 }
10008 else if (((*yyvaluep).node)) {
10009 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10010 }
10011}
10012#line 10013 "parse.c"
10013 break;
10014
10015 case YYSYMBOL_p_cases: /* p_cases */
10016#line 2617 "parse.y"
10017 {
10018 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10019 rb_parser_printf(p, "NODE_SPECIAL");
10020 }
10021 else if (((*yyvaluep).node)) {
10022 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10023 }
10024}
10025#line 10026 "parse.c"
10026 break;
10027
10028 case YYSYMBOL_p_top_expr: /* p_top_expr */
10029#line 2617 "parse.y"
10030 {
10031 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10032 rb_parser_printf(p, "NODE_SPECIAL");
10033 }
10034 else if (((*yyvaluep).node)) {
10035 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10036 }
10037}
10038#line 10039 "parse.c"
10039 break;
10040
10041 case YYSYMBOL_p_top_expr_body: /* p_top_expr_body */
10042#line 2617 "parse.y"
10043 {
10044 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10045 rb_parser_printf(p, "NODE_SPECIAL");
10046 }
10047 else if (((*yyvaluep).node)) {
10048 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10049 }
10050}
10051#line 10052 "parse.c"
10052 break;
10053
10054 case YYSYMBOL_p_expr: /* p_expr */
10055#line 2617 "parse.y"
10056 {
10057 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10058 rb_parser_printf(p, "NODE_SPECIAL");
10059 }
10060 else if (((*yyvaluep).node)) {
10061 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10062 }
10063}
10064#line 10065 "parse.c"
10065 break;
10066
10067 case YYSYMBOL_p_as: /* p_as */
10068#line 2617 "parse.y"
10069 {
10070 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10071 rb_parser_printf(p, "NODE_SPECIAL");
10072 }
10073 else if (((*yyvaluep).node)) {
10074 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10075 }
10076}
10077#line 10078 "parse.c"
10078 break;
10079
10080 case YYSYMBOL_p_alt: /* p_alt */
10081#line 2617 "parse.y"
10082 {
10083 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10084 rb_parser_printf(p, "NODE_SPECIAL");
10085 }
10086 else if (((*yyvaluep).node)) {
10087 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10088 }
10089}
10090#line 10091 "parse.c"
10091 break;
10092
10093 case YYSYMBOL_p_expr_basic: /* p_expr_basic */
10094#line 2617 "parse.y"
10095 {
10096 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10097 rb_parser_printf(p, "NODE_SPECIAL");
10098 }
10099 else if (((*yyvaluep).node)) {
10100 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10101 }
10102}
10103#line 10104 "parse.c"
10104 break;
10105
10106 case YYSYMBOL_p_args: /* p_args */
10107#line 2617 "parse.y"
10108 {
10109 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10110 rb_parser_printf(p, "NODE_SPECIAL");
10111 }
10112 else if (((*yyvaluep).node)) {
10113 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10114 }
10115}
10116#line 10117 "parse.c"
10117 break;
10118
10119 case YYSYMBOL_p_args_head: /* p_args_head */
10120#line 2617 "parse.y"
10121 {
10122 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10123 rb_parser_printf(p, "NODE_SPECIAL");
10124 }
10125 else if (((*yyvaluep).node)) {
10126 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10127 }
10128}
10129#line 10130 "parse.c"
10130 break;
10131
10132 case YYSYMBOL_p_args_tail: /* p_args_tail */
10133#line 2617 "parse.y"
10134 {
10135 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10136 rb_parser_printf(p, "NODE_SPECIAL");
10137 }
10138 else if (((*yyvaluep).node)) {
10139 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10140 }
10141}
10142#line 10143 "parse.c"
10143 break;
10144
10145 case YYSYMBOL_p_find: /* p_find */
10146#line 2617 "parse.y"
10147 {
10148 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10149 rb_parser_printf(p, "NODE_SPECIAL");
10150 }
10151 else if (((*yyvaluep).node)) {
10152 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10153 }
10154}
10155#line 10156 "parse.c"
10156 break;
10157
10158 case YYSYMBOL_p_rest: /* p_rest */
10159#line 2617 "parse.y"
10160 {
10161 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10162 rb_parser_printf(p, "NODE_SPECIAL");
10163 }
10164 else if (((*yyvaluep).node)) {
10165 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10166 }
10167}
10168#line 10169 "parse.c"
10169 break;
10170
10171 case YYSYMBOL_p_args_post: /* p_args_post */
10172#line 2617 "parse.y"
10173 {
10174 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10175 rb_parser_printf(p, "NODE_SPECIAL");
10176 }
10177 else if (((*yyvaluep).node)) {
10178 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10179 }
10180}
10181#line 10182 "parse.c"
10182 break;
10183
10184 case YYSYMBOL_p_arg: /* p_arg */
10185#line 2617 "parse.y"
10186 {
10187 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10188 rb_parser_printf(p, "NODE_SPECIAL");
10189 }
10190 else if (((*yyvaluep).node)) {
10191 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10192 }
10193}
10194#line 10195 "parse.c"
10195 break;
10196
10197 case YYSYMBOL_p_kwargs: /* p_kwargs */
10198#line 2617 "parse.y"
10199 {
10200 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10201 rb_parser_printf(p, "NODE_SPECIAL");
10202 }
10203 else if (((*yyvaluep).node)) {
10204 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10205 }
10206}
10207#line 10208 "parse.c"
10208 break;
10209
10210 case YYSYMBOL_p_kwarg: /* p_kwarg */
10211#line 2617 "parse.y"
10212 {
10213 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10214 rb_parser_printf(p, "NODE_SPECIAL");
10215 }
10216 else if (((*yyvaluep).node)) {
10217 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10218 }
10219}
10220#line 10221 "parse.c"
10221 break;
10222
10223 case YYSYMBOL_p_kw: /* p_kw */
10224#line 2617 "parse.y"
10225 {
10226 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10227 rb_parser_printf(p, "NODE_SPECIAL");
10228 }
10229 else if (((*yyvaluep).node)) {
10230 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10231 }
10232}
10233#line 10234 "parse.c"
10234 break;
10235
10236 case YYSYMBOL_p_kw_label: /* p_kw_label */
10237#line 2626 "parse.y"
10238 {
10239 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
10240}
10241#line 10242 "parse.c"
10242 break;
10243
10244 case YYSYMBOL_p_kwrest: /* p_kwrest */
10245#line 2626 "parse.y"
10246 {
10247 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
10248}
10249#line 10250 "parse.c"
10250 break;
10251
10252 case YYSYMBOL_p_kwnorest: /* p_kwnorest */
10253#line 2626 "parse.y"
10254 {
10255 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
10256}
10257#line 10258 "parse.c"
10258 break;
10259
10260 case YYSYMBOL_p_any_kwrest: /* p_any_kwrest */
10261#line 2626 "parse.y"
10262 {
10263 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
10264}
10265#line 10266 "parse.c"
10266 break;
10267
10268 case YYSYMBOL_p_value: /* p_value */
10269#line 2617 "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_range_expr_p_primitive: /* range_expr_p_primitive */
10282#line 2617 "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_primitive: /* p_primitive */
10295#line 2617 "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_variable: /* p_variable */
10308#line 2617 "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_var_ref: /* p_var_ref */
10321#line 2617 "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_expr_ref: /* p_expr_ref */
10334#line 2617 "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_const: /* p_const */
10347#line 2617 "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_opt_rescue: /* opt_rescue */
10360#line 2617 "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_exc_list: /* exc_list */
10373#line 2617 "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_exc_var: /* exc_var */
10386#line 2617 "parse.y"
10387 {
10388 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10389 rb_parser_printf(p, "NODE_SPECIAL");
10390 }
10391 else if (((*yyvaluep).node)) {
10392 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10393 }
10394}
10395#line 10396 "parse.c"
10396 break;
10397
10398 case YYSYMBOL_opt_ensure: /* opt_ensure */
10399#line 2617 "parse.y"
10400 {
10401 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10402 rb_parser_printf(p, "NODE_SPECIAL");
10403 }
10404 else if (((*yyvaluep).node)) {
10405 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10406 }
10407}
10408#line 10409 "parse.c"
10409 break;
10410
10411 case YYSYMBOL_literal: /* literal */
10412#line 2617 "parse.y"
10413 {
10414 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10415 rb_parser_printf(p, "NODE_SPECIAL");
10416 }
10417 else if (((*yyvaluep).node)) {
10418 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10419 }
10420}
10421#line 10422 "parse.c"
10422 break;
10423
10424 case YYSYMBOL_strings: /* strings */
10425#line 2617 "parse.y"
10426 {
10427 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10428 rb_parser_printf(p, "NODE_SPECIAL");
10429 }
10430 else if (((*yyvaluep).node)) {
10431 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10432 }
10433}
10434#line 10435 "parse.c"
10435 break;
10436
10437 case YYSYMBOL_string: /* string */
10438#line 2617 "parse.y"
10439 {
10440 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10441 rb_parser_printf(p, "NODE_SPECIAL");
10442 }
10443 else if (((*yyvaluep).node)) {
10444 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10445 }
10446}
10447#line 10448 "parse.c"
10448 break;
10449
10450 case YYSYMBOL_string1: /* string1 */
10451#line 2617 "parse.y"
10452 {
10453 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10454 rb_parser_printf(p, "NODE_SPECIAL");
10455 }
10456 else if (((*yyvaluep).node)) {
10457 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10458 }
10459}
10460#line 10461 "parse.c"
10461 break;
10462
10463 case YYSYMBOL_xstring: /* xstring */
10464#line 2617 "parse.y"
10465 {
10466 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10467 rb_parser_printf(p, "NODE_SPECIAL");
10468 }
10469 else if (((*yyvaluep).node)) {
10470 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10471 }
10472}
10473#line 10474 "parse.c"
10474 break;
10475
10476 case YYSYMBOL_regexp: /* regexp */
10477#line 2617 "parse.y"
10478 {
10479 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10480 rb_parser_printf(p, "NODE_SPECIAL");
10481 }
10482 else if (((*yyvaluep).node)) {
10483 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10484 }
10485}
10486#line 10487 "parse.c"
10487 break;
10488
10489 case YYSYMBOL_words_tWORDS_BEG_word_list: /* words_tWORDS_BEG_word_list */
10490#line 2617 "parse.y"
10491 {
10492 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10493 rb_parser_printf(p, "NODE_SPECIAL");
10494 }
10495 else if (((*yyvaluep).node)) {
10496 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10497 }
10498}
10499#line 10500 "parse.c"
10500 break;
10501
10502 case YYSYMBOL_words: /* words */
10503#line 2617 "parse.y"
10504 {
10505 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10506 rb_parser_printf(p, "NODE_SPECIAL");
10507 }
10508 else if (((*yyvaluep).node)) {
10509 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10510 }
10511}
10512#line 10513 "parse.c"
10513 break;
10514
10515 case YYSYMBOL_word_list: /* word_list */
10516#line 2617 "parse.y"
10517 {
10518 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10519 rb_parser_printf(p, "NODE_SPECIAL");
10520 }
10521 else if (((*yyvaluep).node)) {
10522 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10523 }
10524}
10525#line 10526 "parse.c"
10526 break;
10527
10528 case YYSYMBOL_word: /* word */
10529#line 2617 "parse.y"
10530 {
10531 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10532 rb_parser_printf(p, "NODE_SPECIAL");
10533 }
10534 else if (((*yyvaluep).node)) {
10535 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10536 }
10537}
10538#line 10539 "parse.c"
10539 break;
10540
10541 case YYSYMBOL_words_tSYMBOLS_BEG_symbol_list: /* words_tSYMBOLS_BEG_symbol_list */
10542#line 2617 "parse.y"
10543 {
10544 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10545 rb_parser_printf(p, "NODE_SPECIAL");
10546 }
10547 else if (((*yyvaluep).node)) {
10548 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10549 }
10550}
10551#line 10552 "parse.c"
10552 break;
10553
10554 case YYSYMBOL_symbols: /* symbols */
10555#line 2617 "parse.y"
10556 {
10557 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10558 rb_parser_printf(p, "NODE_SPECIAL");
10559 }
10560 else if (((*yyvaluep).node)) {
10561 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10562 }
10563}
10564#line 10565 "parse.c"
10565 break;
10566
10567 case YYSYMBOL_symbol_list: /* symbol_list */
10568#line 2617 "parse.y"
10569 {
10570 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10571 rb_parser_printf(p, "NODE_SPECIAL");
10572 }
10573 else if (((*yyvaluep).node)) {
10574 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10575 }
10576}
10577#line 10578 "parse.c"
10578 break;
10579
10580 case YYSYMBOL_words_tQWORDS_BEG_qword_list: /* words_tQWORDS_BEG_qword_list */
10581#line 2617 "parse.y"
10582 {
10583 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10584 rb_parser_printf(p, "NODE_SPECIAL");
10585 }
10586 else if (((*yyvaluep).node)) {
10587 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10588 }
10589}
10590#line 10591 "parse.c"
10591 break;
10592
10593 case YYSYMBOL_qwords: /* qwords */
10594#line 2617 "parse.y"
10595 {
10596 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10597 rb_parser_printf(p, "NODE_SPECIAL");
10598 }
10599 else if (((*yyvaluep).node)) {
10600 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10601 }
10602}
10603#line 10604 "parse.c"
10604 break;
10605
10606 case YYSYMBOL_words_tQSYMBOLS_BEG_qsym_list: /* words_tQSYMBOLS_BEG_qsym_list */
10607#line 2617 "parse.y"
10608 {
10609 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10610 rb_parser_printf(p, "NODE_SPECIAL");
10611 }
10612 else if (((*yyvaluep).node)) {
10613 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10614 }
10615}
10616#line 10617 "parse.c"
10617 break;
10618
10619 case YYSYMBOL_qsymbols: /* qsymbols */
10620#line 2617 "parse.y"
10621 {
10622 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10623 rb_parser_printf(p, "NODE_SPECIAL");
10624 }
10625 else if (((*yyvaluep).node)) {
10626 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10627 }
10628}
10629#line 10630 "parse.c"
10630 break;
10631
10632 case YYSYMBOL_qword_list: /* qword_list */
10633#line 2617 "parse.y"
10634 {
10635 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10636 rb_parser_printf(p, "NODE_SPECIAL");
10637 }
10638 else if (((*yyvaluep).node)) {
10639 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10640 }
10641}
10642#line 10643 "parse.c"
10643 break;
10644
10645 case YYSYMBOL_qsym_list: /* qsym_list */
10646#line 2617 "parse.y"
10647 {
10648 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10649 rb_parser_printf(p, "NODE_SPECIAL");
10650 }
10651 else if (((*yyvaluep).node)) {
10652 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10653 }
10654}
10655#line 10656 "parse.c"
10656 break;
10657
10658 case YYSYMBOL_string_contents: /* string_contents */
10659#line 2617 "parse.y"
10660 {
10661 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10662 rb_parser_printf(p, "NODE_SPECIAL");
10663 }
10664 else if (((*yyvaluep).node)) {
10665 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10666 }
10667}
10668#line 10669 "parse.c"
10669 break;
10670
10671 case YYSYMBOL_xstring_contents: /* xstring_contents */
10672#line 2617 "parse.y"
10673 {
10674 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10675 rb_parser_printf(p, "NODE_SPECIAL");
10676 }
10677 else if (((*yyvaluep).node)) {
10678 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10679 }
10680}
10681#line 10682 "parse.c"
10682 break;
10683
10684 case YYSYMBOL_regexp_contents: /* regexp_contents */
10685#line 2617 "parse.y"
10686 {
10687 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10688 rb_parser_printf(p, "NODE_SPECIAL");
10689 }
10690 else if (((*yyvaluep).node)) {
10691 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10692 }
10693}
10694#line 10695 "parse.c"
10695 break;
10696
10697 case YYSYMBOL_string_content: /* string_content */
10698#line 2617 "parse.y"
10699 {
10700 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10701 rb_parser_printf(p, "NODE_SPECIAL");
10702 }
10703 else if (((*yyvaluep).node)) {
10704 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10705 }
10706}
10707#line 10708 "parse.c"
10708 break;
10709
10710 case YYSYMBOL_string_dvar: /* string_dvar */
10711#line 2617 "parse.y"
10712 {
10713 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10714 rb_parser_printf(p, "NODE_SPECIAL");
10715 }
10716 else if (((*yyvaluep).node)) {
10717 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10718 }
10719}
10720#line 10721 "parse.c"
10721 break;
10722
10723 case YYSYMBOL_symbol: /* symbol */
10724#line 2617 "parse.y"
10725 {
10726 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10727 rb_parser_printf(p, "NODE_SPECIAL");
10728 }
10729 else if (((*yyvaluep).node)) {
10730 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10731 }
10732}
10733#line 10734 "parse.c"
10734 break;
10735
10736 case YYSYMBOL_ssym: /* ssym */
10737#line 2617 "parse.y"
10738 {
10739 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10740 rb_parser_printf(p, "NODE_SPECIAL");
10741 }
10742 else if (((*yyvaluep).node)) {
10743 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10744 }
10745}
10746#line 10747 "parse.c"
10747 break;
10748
10749 case YYSYMBOL_sym: /* sym */
10750#line 2626 "parse.y"
10751 {
10752 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
10753}
10754#line 10755 "parse.c"
10755 break;
10756
10757 case YYSYMBOL_dsym: /* dsym */
10758#line 2617 "parse.y"
10759 {
10760 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10761 rb_parser_printf(p, "NODE_SPECIAL");
10762 }
10763 else if (((*yyvaluep).node)) {
10764 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10765 }
10766}
10767#line 10768 "parse.c"
10768 break;
10769
10770 case YYSYMBOL_numeric: /* numeric */
10771#line 2617 "parse.y"
10772 {
10773 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10774 rb_parser_printf(p, "NODE_SPECIAL");
10775 }
10776 else if (((*yyvaluep).node)) {
10777 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10778 }
10779}
10780#line 10781 "parse.c"
10781 break;
10782
10783 case YYSYMBOL_simple_numeric: /* simple_numeric */
10784#line 2617 "parse.y"
10785 {
10786 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10787 rb_parser_printf(p, "NODE_SPECIAL");
10788 }
10789 else if (((*yyvaluep).node)) {
10790 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10791 }
10792}
10793#line 10794 "parse.c"
10794 break;
10795
10796 case YYSYMBOL_nonlocal_var: /* nonlocal_var */
10797#line 2626 "parse.y"
10798 {
10799 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
10800}
10801#line 10802 "parse.c"
10802 break;
10803
10804 case YYSYMBOL_user_variable: /* user_variable */
10805#line 2626 "parse.y"
10806 {
10807 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
10808}
10809#line 10810 "parse.c"
10810 break;
10811
10812 case YYSYMBOL_keyword_variable: /* keyword_variable */
10813#line 2626 "parse.y"
10814 {
10815 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
10816}
10817#line 10818 "parse.c"
10818 break;
10819
10820 case YYSYMBOL_var_ref: /* var_ref */
10821#line 2617 "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_var_lhs: /* var_lhs */
10834#line 2617 "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_backref: /* backref */
10847#line 2617 "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_superclass: /* superclass */
10860#line 2617 "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_f_opt_paren_args: /* f_opt_paren_args */
10873#line 2617 "parse.y"
10874 {
10875 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
10876 rb_parser_printf(p, "NODE_SPECIAL");
10877 }
10878 else if (((*yyvaluep).node_args)) {
10879 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
10880 }
10881}
10882#line 10883 "parse.c"
10883 break;
10884
10885 case YYSYMBOL_f_paren_args: /* f_paren_args */
10886#line 2617 "parse.y"
10887 {
10888 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
10889 rb_parser_printf(p, "NODE_SPECIAL");
10890 }
10891 else if (((*yyvaluep).node_args)) {
10892 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
10893 }
10894}
10895#line 10896 "parse.c"
10896 break;
10897
10898 case YYSYMBOL_f_arglist: /* f_arglist */
10899#line 2617 "parse.y"
10900 {
10901 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
10902 rb_parser_printf(p, "NODE_SPECIAL");
10903 }
10904 else if (((*yyvaluep).node_args)) {
10905 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
10906 }
10907}
10908#line 10909 "parse.c"
10909 break;
10910
10911 case YYSYMBOL_f_kw_arg_value: /* f_kw_arg_value */
10912#line 2617 "parse.y"
10913 {
10914 if ((NODE *)((*yyvaluep).node_kw_arg) == (NODE *)-1) {
10915 rb_parser_printf(p, "NODE_SPECIAL");
10916 }
10917 else if (((*yyvaluep).node_kw_arg)) {
10918 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_kw_arg)))));
10919 }
10920}
10921#line 10922 "parse.c"
10922 break;
10923
10924 case YYSYMBOL_f_kwarg_arg_value: /* f_kwarg_arg_value */
10925#line 2617 "parse.y"
10926 {
10927 if ((NODE *)((*yyvaluep).node_kw_arg) == (NODE *)-1) {
10928 rb_parser_printf(p, "NODE_SPECIAL");
10929 }
10930 else if (((*yyvaluep).node_kw_arg)) {
10931 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_kw_arg)))));
10932 }
10933}
10934#line 10935 "parse.c"
10935 break;
10936
10937 case YYSYMBOL_args_tail_basic_arg_value: /* args_tail_basic_arg_value */
10938#line 2617 "parse.y"
10939 {
10940 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
10941 rb_parser_printf(p, "NODE_SPECIAL");
10942 }
10943 else if (((*yyvaluep).node_args)) {
10944 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
10945 }
10946}
10947#line 10948 "parse.c"
10948 break;
10949
10950 case YYSYMBOL_args_tail: /* args_tail */
10951#line 2617 "parse.y"
10952 {
10953 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
10954 rb_parser_printf(p, "NODE_SPECIAL");
10955 }
10956 else if (((*yyvaluep).node_args)) {
10957 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
10958 }
10959}
10960#line 10961 "parse.c"
10961 break;
10962
10963 case YYSYMBOL_f_opt_arg_value: /* f_opt_arg_value */
10964#line 2617 "parse.y"
10965 {
10966 if ((NODE *)((*yyvaluep).node_opt_arg) == (NODE *)-1) {
10967 rb_parser_printf(p, "NODE_SPECIAL");
10968 }
10969 else if (((*yyvaluep).node_opt_arg)) {
10970 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_opt_arg)))));
10971 }
10972}
10973#line 10974 "parse.c"
10974 break;
10975
10976 case YYSYMBOL_f_opt_arg_arg_value: /* f_opt_arg_arg_value */
10977#line 2617 "parse.y"
10978 {
10979 if ((NODE *)((*yyvaluep).node_opt_arg) == (NODE *)-1) {
10980 rb_parser_printf(p, "NODE_SPECIAL");
10981 }
10982 else if (((*yyvaluep).node_opt_arg)) {
10983 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_opt_arg)))));
10984 }
10985}
10986#line 10987 "parse.c"
10987 break;
10988
10989 case YYSYMBOL_opt_args_tail_args_tail: /* opt_args_tail_args_tail */
10990#line 2617 "parse.y"
10991 {
10992 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
10993 rb_parser_printf(p, "NODE_SPECIAL");
10994 }
10995 else if (((*yyvaluep).node_args)) {
10996 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
10997 }
10998}
10999#line 11000 "parse.c"
11000 break;
11001
11002 case YYSYMBOL_f_args: /* f_args */
11003#line 2617 "parse.y"
11004 {
11005 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
11006 rb_parser_printf(p, "NODE_SPECIAL");
11007 }
11008 else if (((*yyvaluep).node_args)) {
11009 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
11010 }
11011}
11012#line 11013 "parse.c"
11013 break;
11014
11015 case YYSYMBOL_args_forward: /* args_forward */
11016#line 2626 "parse.y"
11017 {
11018 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
11019}
11020#line 11021 "parse.c"
11021 break;
11022
11023 case YYSYMBOL_f_bad_arg: /* f_bad_arg */
11024#line 2626 "parse.y"
11025 {
11026 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
11027}
11028#line 11029 "parse.c"
11029 break;
11030
11031 case YYSYMBOL_f_norm_arg: /* f_norm_arg */
11032#line 2626 "parse.y"
11033 {
11034 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
11035}
11036#line 11037 "parse.c"
11037 break;
11038
11039 case YYSYMBOL_f_arg_asgn: /* f_arg_asgn */
11040#line 2626 "parse.y"
11041 {
11042 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
11043}
11044#line 11045 "parse.c"
11045 break;
11046
11047 case YYSYMBOL_f_arg_item: /* f_arg_item */
11048#line 2617 "parse.y"
11049 {
11050 if ((NODE *)((*yyvaluep).node_args_aux) == (NODE *)-1) {
11051 rb_parser_printf(p, "NODE_SPECIAL");
11052 }
11053 else if (((*yyvaluep).node_args_aux)) {
11054 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args_aux)))));
11055 }
11056}
11057#line 11058 "parse.c"
11058 break;
11059
11060 case YYSYMBOL_f_arg: /* f_arg */
11061#line 2617 "parse.y"
11062 {
11063 if ((NODE *)((*yyvaluep).node_args_aux) == (NODE *)-1) {
11064 rb_parser_printf(p, "NODE_SPECIAL");
11065 }
11066 else if (((*yyvaluep).node_args_aux)) {
11067 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args_aux)))));
11068 }
11069}
11070#line 11071 "parse.c"
11071 break;
11072
11073 case YYSYMBOL_f_label: /* f_label */
11074#line 2626 "parse.y"
11075 {
11076 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
11077}
11078#line 11079 "parse.c"
11079 break;
11080
11081 case YYSYMBOL_f_no_kwarg: /* f_no_kwarg */
11082#line 2626 "parse.y"
11083 {
11084 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
11085}
11086#line 11087 "parse.c"
11087 break;
11088
11089 case YYSYMBOL_f_kwrest: /* f_kwrest */
11090#line 2626 "parse.y"
11091 {
11092 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
11093}
11094#line 11095 "parse.c"
11095 break;
11096
11097 case YYSYMBOL_f_rest_arg: /* f_rest_arg */
11098#line 2626 "parse.y"
11099 {
11100 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
11101}
11102#line 11103 "parse.c"
11103 break;
11104
11105 case YYSYMBOL_f_block_arg: /* f_block_arg */
11106#line 2626 "parse.y"
11107 {
11108 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
11109}
11110#line 11111 "parse.c"
11111 break;
11112
11113 case YYSYMBOL_opt_f_block_arg: /* opt_f_block_arg */
11114#line 2626 "parse.y"
11115 {
11116 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
11117}
11118#line 11119 "parse.c"
11119 break;
11120
11121 case YYSYMBOL_value_expr_singleton_expr: /* value_expr_singleton_expr */
11122#line 2617 "parse.y"
11123 {
11124 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
11125 rb_parser_printf(p, "NODE_SPECIAL");
11126 }
11127 else if (((*yyvaluep).node)) {
11128 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
11129 }
11130}
11131#line 11132 "parse.c"
11132 break;
11133
11134 case YYSYMBOL_singleton: /* singleton */
11135#line 2617 "parse.y"
11136 {
11137 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
11138 rb_parser_printf(p, "NODE_SPECIAL");
11139 }
11140 else if (((*yyvaluep).node)) {
11141 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
11142 }
11143}
11144#line 11145 "parse.c"
11145 break;
11146
11147 case YYSYMBOL_singleton_expr: /* singleton_expr */
11148#line 2617 "parse.y"
11149 {
11150 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
11151 rb_parser_printf(p, "NODE_SPECIAL");
11152 }
11153 else if (((*yyvaluep).node)) {
11154 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
11155 }
11156}
11157#line 11158 "parse.c"
11158 break;
11159
11160 case YYSYMBOL_assoc_list: /* assoc_list */
11161#line 2617 "parse.y"
11162 {
11163 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
11164 rb_parser_printf(p, "NODE_SPECIAL");
11165 }
11166 else if (((*yyvaluep).node)) {
11167 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
11168 }
11169}
11170#line 11171 "parse.c"
11171 break;
11172
11173 case YYSYMBOL_assocs: /* assocs */
11174#line 2617 "parse.y"
11175 {
11176 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
11177 rb_parser_printf(p, "NODE_SPECIAL");
11178 }
11179 else if (((*yyvaluep).node)) {
11180 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
11181 }
11182}
11183#line 11184 "parse.c"
11184 break;
11185
11186 case YYSYMBOL_assoc: /* assoc */
11187#line 2617 "parse.y"
11188 {
11189 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
11190 rb_parser_printf(p, "NODE_SPECIAL");
11191 }
11192 else if (((*yyvaluep).node)) {
11193 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
11194 }
11195}
11196#line 11197 "parse.c"
11197 break;
11198
11199 case YYSYMBOL_operation2: /* operation2 */
11200#line 2626 "parse.y"
11201 {
11202 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
11203}
11204#line 11205 "parse.c"
11205 break;
11206
11207 case YYSYMBOL_operation3: /* operation3 */
11208#line 2626 "parse.y"
11209 {
11210 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
11211}
11212#line 11213 "parse.c"
11213 break;
11214
11215 case YYSYMBOL_dot_or_colon: /* dot_or_colon */
11216#line 2626 "parse.y"
11217 {
11218 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
11219}
11220#line 11221 "parse.c"
11221 break;
11222
11223 case YYSYMBOL_call_op: /* call_op */
11224#line 2626 "parse.y"
11225 {
11226 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
11227}
11228#line 11229 "parse.c"
11229 break;
11230
11231 case YYSYMBOL_call_op2: /* call_op2 */
11232#line 2626 "parse.y"
11233 {
11234 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
11235}
11236#line 11237 "parse.c"
11237 break;
11238
11239 case YYSYMBOL_none: /* none */
11240#line 2617 "parse.y"
11241 {
11242 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
11243 rb_parser_printf(p, "NODE_SPECIAL");
11244 }
11245 else if (((*yyvaluep).node)) {
11246 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
11247 }
11248}
11249#line 11250 "parse.c"
11250 break;
11251
11252 default:
11253 break;
11254 }
11255 YY_IGNORE_MAYBE_UNINITIALIZED_END
11256}
11257
11258
11259/*---------------------------.
11260| Print this symbol on YYO. |
11261`---------------------------*/
11262
11263static void
11264yy_symbol_print (FILE *yyo,
11265 yysymbol_kind_t yykind, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp, struct parser_params *p)
11266{
11267 YYFPRINTF (yyo, "%s %s (",
11268 yykind < YYNTOKENS ? "token" : "nterm", yysymbol_name (yykind));
11269
11270 YYLOCATION_PRINT (yyo, yylocationp, p);
11271 YYFPRINTF (yyo, ": ");
11272 yy_symbol_value_print (yyo, yykind, yyvaluep, yylocationp, p);
11273 YYFPRINTF (yyo, ")");
11274}
11275
11276/*------------------------------------------------------------------.
11277| yy_stack_print -- Print the state stack from its BOTTOM up to its |
11278| TOP (included). |
11279`------------------------------------------------------------------*/
11280
11281static void
11282yy_stack_print (yy_state_t *yybottom, yy_state_t *yytop, struct parser_params *p)
11283{
11284 YYFPRINTF (stderr, "Stack now");
11285 for (; yybottom <= yytop; yybottom++)
11286 {
11287 int yybot = *yybottom;
11288 YYFPRINTF (stderr, " %d", yybot);
11289 }
11290 YYFPRINTF (stderr, "\n");
11291}
11292
11293# define YY_STACK_PRINT(Bottom, Top, p) \
11294do { \
11295 if (yydebug) \
11296 yy_stack_print ((Bottom), (Top), p); \
11297} while (0)
11298
11299
11300/*------------------------------------------------.
11301| Report that the YYRULE is going to be reduced. |
11302`------------------------------------------------*/
11303
11304static void
11305yy_reduce_print (yy_state_t *yyssp, YYSTYPE *yyvsp, YYLTYPE *yylsp,
11306 int yyrule, struct parser_params *p)
11307{
11308 int yylno = yyrline[yyrule];
11309 int yynrhs = yyr2[yyrule];
11310 int yyi;
11311 YYFPRINTF (stderr, "Reducing stack by rule %d (line %d):\n",
11312 yyrule - 1, yylno);
11313 /* The symbols being reduced. */
11314 for (yyi = 0; yyi < yynrhs; yyi++)
11315 {
11316 YYFPRINTF (stderr, " $%d = ", yyi + 1);
11317 yy_symbol_print (stderr,
11318 YY_ACCESSING_SYMBOL (+yyssp[yyi + 1 - yynrhs]),
11319 &yyvsp[(yyi + 1) - (yynrhs)],
11320 &(yylsp[(yyi + 1) - (yynrhs)]), p);
11321 YYFPRINTF (stderr, "\n");
11322 }
11323}
11324
11325# define YY_REDUCE_PRINT(Rule, p) \
11326do { \
11327 if (yydebug) \
11328 yy_reduce_print (yyssp, yyvsp, yylsp, Rule, p); \
11329} while (0)
11330
11331/* Nonzero means print parse trace. It is left uninitialized so that
11332 multiple parsers can coexist. */
11333#ifndef yydebug
11334int yydebug;
11335#endif
11336#else /* !YYDEBUG */
11337# define YYDPRINTF(Args) ((void) 0)
11338# define YY_SYMBOL_PRINT(Title, Kind, Value, Location, p)
11339# define YY_STACK_PRINT(Bottom, Top, p)
11340# define YY_REDUCE_PRINT(Rule, p)
11341#endif /* !YYDEBUG */
11342
11343
11344/* YYINITDEPTH -- initial size of the parser's stacks. */
11345#ifndef YYINITDEPTH
11346# define YYINITDEPTH 200
11347#endif
11348
11349/* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
11350 if the built-in stack extension method is used).
11351
11352 Do not make this value too large; the results are undefined if
11353 YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
11354 evaluated with infinite-precision integer arithmetic. */
11355
11356#ifndef YYMAXDEPTH
11357# define YYMAXDEPTH 10000
11358#endif
11359
11360
11361/* Context of a parse error. */
11362typedef struct
11363{
11364 yy_state_t *yyssp;
11365 yysymbol_kind_t yytoken;
11366 YYLTYPE *yylloc;
11367} yypcontext_t;
11368
11369/* Put in YYARG at most YYARGN of the expected tokens given the
11370 current YYCTX, and return the number of tokens stored in YYARG. If
11371 YYARG is null, return the number of expected tokens (guaranteed to
11372 be less than YYNTOKENS). Return YYENOMEM on memory exhaustion.
11373 Return 0 if there are more than YYARGN expected tokens, yet fill
11374 YYARG up to YYARGN. */
11375static int
11376yypcontext_expected_tokens (const yypcontext_t *yyctx,
11377 yysymbol_kind_t yyarg[], int yyargn)
11378{
11379 /* Actual size of YYARG. */
11380 int yycount = 0;
11381 int yyn = yypact[+*yyctx->yyssp];
11382 if (!yypact_value_is_default (yyn))
11383 {
11384 /* Start YYX at -YYN if negative to avoid negative indexes in
11385 YYCHECK. In other words, skip the first -YYN actions for
11386 this state because they are default actions. */
11387 int yyxbegin = yyn < 0 ? -yyn : 0;
11388 /* Stay within bounds of both yycheck and yytname. */
11389 int yychecklim = YYLAST - yyn + 1;
11390 int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
11391 int yyx;
11392 for (yyx = yyxbegin; yyx < yyxend; ++yyx)
11393 if (yycheck[yyx + yyn] == yyx && yyx != YYSYMBOL_YYerror
11394 && !yytable_value_is_error (yytable[yyx + yyn]))
11395 {
11396 if (!yyarg)
11397 ++yycount;
11398 else if (yycount == yyargn)
11399 return 0;
11400 else
11401 yyarg[yycount++] = YY_CAST (yysymbol_kind_t, yyx);
11402 }
11403 }
11404 if (yyarg && yycount == 0 && 0 < yyargn)
11405 yyarg[0] = YYSYMBOL_YYEMPTY;
11406 return yycount;
11407}
11408
11409
11410
11411
11412#ifndef yystrlen
11413# if defined __GLIBC__ && defined _STRING_H
11414# define yystrlen(S) (YY_CAST (YYPTRDIFF_T, strlen (S)))
11415# else
11416/* Return the length of YYSTR. */
11417static YYPTRDIFF_T
11418yystrlen (const char *yystr)
11419{
11420 YYPTRDIFF_T yylen;
11421 for (yylen = 0; yystr[yylen]; yylen++)
11422 continue;
11423 return yylen;
11424}
11425# endif
11426#endif
11427
11428#ifndef yystpcpy
11429# if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
11430# define yystpcpy stpcpy
11431# else
11432/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
11433 YYDEST. */
11434static char *
11435yystpcpy (char *yydest, const char *yysrc)
11436{
11437 char *yyd = yydest;
11438 const char *yys = yysrc;
11439
11440 while ((*yyd++ = *yys++) != '\0')
11441 continue;
11442
11443 return yyd - 1;
11444}
11445# endif
11446#endif
11447
11448#ifndef yytnamerr
11449/* Copy to YYRES the contents of YYSTR after stripping away unnecessary
11450 quotes and backslashes, so that it's suitable for yyerror. The
11451 heuristic is that double-quoting is unnecessary unless the string
11452 contains an apostrophe, a comma, or backslash (other than
11453 backslash-backslash). YYSTR is taken from yytname. If YYRES is
11454 null, do not copy; instead, return the length of what the result
11455 would have been. */
11456static YYPTRDIFF_T
11457yytnamerr (char *yyres, const char *yystr)
11458{
11459 if (*yystr == '"')
11460 {
11461 YYPTRDIFF_T yyn = 0;
11462 char const *yyp = yystr;
11463 for (;;)
11464 switch (*++yyp)
11465 {
11466 case '\'':
11467 case ',':
11468 goto do_not_strip_quotes;
11469
11470 case '\\':
11471 if (*++yyp != '\\')
11472 goto do_not_strip_quotes;
11473 else
11474 goto append;
11475
11476 append:
11477 default:
11478 if (yyres)
11479 yyres[yyn] = *yyp;
11480 yyn++;
11481 break;
11482
11483 case '"':
11484 if (yyres)
11485 yyres[yyn] = '\0';
11486 return yyn;
11487 }
11488 do_not_strip_quotes: ;
11489 }
11490
11491 if (yyres)
11492 return yystpcpy (yyres, yystr) - yyres;
11493 else
11494 return yystrlen (yystr);
11495}
11496#endif
11497
11498
11499static int
11500yy_syntax_error_arguments (const yypcontext_t *yyctx,
11501 yysymbol_kind_t yyarg[], int yyargn)
11502{
11503 /* Actual size of YYARG. */
11504 int yycount = 0;
11505 /* There are many possibilities here to consider:
11506 - If this state is a consistent state with a default action, then
11507 the only way this function was invoked is if the default action
11508 is an error action. In that case, don't check for expected
11509 tokens because there are none.
11510 - The only way there can be no lookahead present (in yychar) is if
11511 this state is a consistent state with a default action. Thus,
11512 detecting the absence of a lookahead is sufficient to determine
11513 that there is no unexpected or expected token to report. In that
11514 case, just report a simple "syntax error".
11515 - Don't assume there isn't a lookahead just because this state is a
11516 consistent state with a default action. There might have been a
11517 previous inconsistent state, consistent state with a non-default
11518 action, or user semantic action that manipulated yychar.
11519 - Of course, the expected token list depends on states to have
11520 correct lookahead information, and it depends on the parser not
11521 to perform extra reductions after fetching a lookahead from the
11522 scanner and before detecting a syntax error. Thus, state merging
11523 (from LALR or IELR) and default reductions corrupt the expected
11524 token list. However, the list is correct for canonical LR with
11525 one exception: it will still contain any token that will not be
11526 accepted due to an error action in a later state.
11527 */
11528 if (yyctx->yytoken != YYSYMBOL_YYEMPTY)
11529 {
11530 int yyn;
11531 if (yyarg)
11532 yyarg[yycount] = yyctx->yytoken;
11533 ++yycount;
11534 yyn = yypcontext_expected_tokens (yyctx,
11535 yyarg ? yyarg + 1 : yyarg, yyargn - 1);
11536 if (yyn == YYENOMEM)
11537 return YYENOMEM;
11538 else
11539 yycount += yyn;
11540 }
11541 return yycount;
11542}
11543
11544/* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message
11545 about the unexpected token YYTOKEN for the state stack whose top is
11546 YYSSP.
11547
11548 Return 0 if *YYMSG was successfully written. Return -1 if *YYMSG is
11549 not large enough to hold the message. In that case, also set
11550 *YYMSG_ALLOC to the required number of bytes. Return YYENOMEM if the
11551 required number of bytes is too large to store. */
11552static int
11553yysyntax_error (YYPTRDIFF_T *yymsg_alloc, char **yymsg,
11554 const yypcontext_t *yyctx, struct parser_params *p)
11555{
11556 enum { YYARGS_MAX = 5 };
11557 /* Internationalized format string. */
11558 const char *yyformat = YY_NULLPTR;
11559 /* Arguments of yyformat: reported tokens (one for the "unexpected",
11560 one per "expected"). */
11561 yysymbol_kind_t yyarg[YYARGS_MAX];
11562 /* Cumulated lengths of YYARG. */
11563 YYPTRDIFF_T yysize = 0;
11564
11565 /* Actual size of YYARG. */
11566 int yycount = yy_syntax_error_arguments (yyctx, yyarg, YYARGS_MAX);
11567 if (yycount == YYENOMEM)
11568 return YYENOMEM;
11569
11570 switch (yycount)
11571 {
11572#define YYCASE_(N, S) \
11573 case N: \
11574 yyformat = S; \
11575 break
11576 default: /* Avoid compiler warnings. */
11577 YYCASE_(0, YY_("syntax error"));
11578 YYCASE_(1, YY_("syntax error, unexpected %s"));
11579 YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s"));
11580 YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s"));
11581 YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s"));
11582 YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"));
11583#undef YYCASE_
11584 }
11585
11586 /* Compute error message size. Don't count the "%s"s, but reserve
11587 room for the terminator. */
11588 yysize = yystrlen (yyformat) - 2 * yycount + 1;
11589 {
11590 int yyi;
11591 for (yyi = 0; yyi < yycount; ++yyi)
11592 {
11593 YYPTRDIFF_T yysize1
11594 = yysize + yytnamerr (YY_NULLPTR, yytname[yyarg[yyi]]);
11595 if (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM)
11596 yysize = yysize1;
11597 else
11598 return YYENOMEM;
11599 }
11600 }
11601
11602 if (*yymsg_alloc < yysize)
11603 {
11604 *yymsg_alloc = 2 * yysize;
11605 if (! (yysize <= *yymsg_alloc
11606 && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM))
11607 *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM;
11608 return -1;
11609 }
11610
11611 /* Avoid sprintf, as that infringes on the user's name space.
11612 Don't have undefined behavior even if the translation
11613 produced a string with the wrong number of "%s"s. */
11614 {
11615 char *yyp = *yymsg;
11616 int yyi = 0;
11617 while ((*yyp = *yyformat) != '\0')
11618 if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount)
11619 {
11620 yyp += yytnamerr (yyp, yytname[yyarg[yyi++]]);
11621 yyformat += 2;
11622 }
11623 else
11624 {
11625 ++yyp;
11626 ++yyformat;
11627 }
11628 }
11629 return 0;
11630}
11631
11632
11633/*-----------------------------------------------.
11634| Release the memory associated to this symbol. |
11635`-----------------------------------------------*/
11636
11637static void
11638yydestruct (const char *yymsg,
11639 yysymbol_kind_t yykind, YYSTYPE *yyvaluep, YYLTYPE *yylocationp, struct parser_params *p)
11640{
11641 YY_USE (yyvaluep);
11642 YY_USE (yylocationp);
11643 YY_USE (p);
11644 if (!yymsg)
11645 yymsg = "Deleting";
11646 YY_SYMBOL_PRINT (yymsg, yykind, yyvaluep, yylocationp, p);
11647
11648 YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
11649 switch (yykind)
11650 {
11651 case YYSYMBOL_258_16: /* @16 */
11652#line 2654 "parse.y"
11653 {
11654 if (CASE_LABELS_ENABLED_P(((*yyvaluep).labels))) st_free_table(((*yyvaluep).labels));
11655}
11656#line 11657 "parse.c"
11657 break;
11658
11659 case YYSYMBOL_259_17: /* @17 */
11660#line 2654 "parse.y"
11661 {
11662 if (CASE_LABELS_ENABLED_P(((*yyvaluep).labels))) st_free_table(((*yyvaluep).labels));
11663}
11664#line 11665 "parse.c"
11665 break;
11666
11667 default:
11668 break;
11669 }
11670 YY_IGNORE_MAYBE_UNINITIALIZED_END
11671}
11672
11673
11674
11675
11676
11677
11678/*----------.
11679| yyparse. |
11680`----------*/
11681
11682int
11683yyparse (struct parser_params *p)
11684{
11685/* Lookahead token kind. */
11686int yychar;
11687
11688
11689/* The semantic value of the lookahead symbol. */
11690/* Default value used for initialization, for pacifying older GCCs
11691 or non-GCC compilers. */
11692#ifdef __cplusplus
11693static const YYSTYPE yyval_default = {};
11694(void) yyval_default;
11695#else
11696YY_INITIAL_VALUE (static const YYSTYPE yyval_default;)
11697#endif
11698YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default);
11699
11700/* Location data for the lookahead symbol. */
11701static const YYLTYPE yyloc_default
11702# if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL
11703 = { 1, 1, 1, 1 }
11704# endif
11705;
11706YYLTYPE yylloc = yyloc_default;
11707
11708 /* Number of syntax errors so far. */
11709 int yynerrs = 0;
11710 YY_USE (yynerrs); /* Silence compiler warning. */
11711
11712 yy_state_fast_t yystate = 0;
11713 /* Number of tokens to shift before error messages enabled. */
11714 int yyerrstatus = 0;
11715
11716 /* Refer to the stacks through separate pointers, to allow yyoverflow
11717 to reallocate them elsewhere. */
11718
11719 /* Their size. */
11720 YYPTRDIFF_T yystacksize = YYINITDEPTH;
11721
11722 /* The state stack: array, bottom, top. */
11723 yy_state_t yyssa[YYINITDEPTH];
11724 yy_state_t *yyss = yyssa;
11725 yy_state_t *yyssp = yyss;
11726
11727 /* The semantic value stack: array, bottom, top. */
11728 YYSTYPE yyvsa[YYINITDEPTH];
11729 YYSTYPE *yyvs = yyvsa;
11730 YYSTYPE *yyvsp = yyvs;
11731
11732 /* The location stack: array, bottom, top. */
11733 YYLTYPE yylsa[YYINITDEPTH];
11734 YYLTYPE *yyls = yylsa;
11735 YYLTYPE *yylsp = yyls;
11736
11737 int yyn;
11738 /* The return value of yyparse. */
11739 int yyresult;
11740 /* Lookahead symbol kind. */
11741 yysymbol_kind_t yytoken = YYSYMBOL_YYEMPTY;
11742 /* The variables used to return semantic value and location from the
11743 action routines. */
11744 YYSTYPE yyval;
11745 YYLTYPE yyloc;
11746
11747 /* The locations where the error started and ended. */
11748 YYLTYPE yyerror_range[3];
11749
11750 /* Buffer for error messages, and its allocated size. */
11751 char yymsgbuf[128];
11752 char *yymsg = yymsgbuf;
11753 YYPTRDIFF_T yymsg_alloc = sizeof yymsgbuf;
11754
11755#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N), yylsp -= (N))
11756
11757 /* The number of symbols on the RHS of the reduced rule.
11758 Keep to zero when no symbol should be popped. */
11759 int yylen = 0;
11760
11761 YYDPRINTF ((stderr, "Starting parse\n"));
11762
11763 yychar = YYEMPTY; /* Cause a token to be read. */
11764
11765
11766 /* User initialization code. */
11767#line 2661 "parse.y"
11768 {
11769 RUBY_SET_YYLLOC_OF_NONE(yylloc);
11770}
11771
11772#line 11773 "parse.c"
11773
11774 yylsp[0] = yylloc;
11775 goto yysetstate;
11776
11777
11778/*------------------------------------------------------------.
11779| yynewstate -- push a new state, which is found in yystate. |
11780`------------------------------------------------------------*/
11781yynewstate:
11782 /* In all cases, when you get here, the value and location stacks
11783 have just been pushed. So pushing a state here evens the stacks. */
11784 yyssp++;
11785
11786
11787/*--------------------------------------------------------------------.
11788| yysetstate -- set current state (the top of the stack) to yystate. |
11789`--------------------------------------------------------------------*/
11790yysetstate:
11791 YYDPRINTF ((stderr, "Entering state %d\n", yystate));
11792 YY_ASSERT (0 <= yystate && yystate < YYNSTATES);
11793 YY_IGNORE_USELESS_CAST_BEGIN
11794 *yyssp = YY_CAST (yy_state_t, yystate);
11795 YY_IGNORE_USELESS_CAST_END
11796 YY_STACK_PRINT (yyss, yyssp, p);
11797
11798 if (yyss + yystacksize - 1 <= yyssp)
11799#if !defined yyoverflow && !defined YYSTACK_RELOCATE
11800 YYNOMEM;
11801#else
11802 {
11803 /* Get the current used size of the three stacks, in elements. */
11804 YYPTRDIFF_T yysize = yyssp - yyss + 1;
11805
11806# if defined yyoverflow
11807 {
11808 /* Give user a chance to reallocate the stack. Use copies of
11809 these so that the &'s don't force the real ones into
11810 memory. */
11811 yy_state_t *yyss1 = yyss;
11812 YYSTYPE *yyvs1 = yyvs;
11813 YYLTYPE *yyls1 = yyls;
11814
11815 /* Each stack pointer address is followed by the size of the
11816 data in use in that stack, in bytes. This used to be a
11817 conditional around just the two extra args, but that might
11818 be undefined if yyoverflow is a macro. */
11819 yyoverflow (YY_("memory exhausted"),
11820 &yyss1, yysize * YYSIZEOF (*yyssp),
11821 &yyvs1, yysize * YYSIZEOF (*yyvsp),
11822 &yyls1, yysize * YYSIZEOF (*yylsp),
11823 &yystacksize);
11824 yyss = yyss1;
11825 yyvs = yyvs1;
11826 yyls = yyls1;
11827 }
11828# else /* defined YYSTACK_RELOCATE */
11829 /* Extend the stack our own way. */
11830 if (YYMAXDEPTH <= yystacksize)
11831 YYNOMEM;
11832 yystacksize *= 2;
11833 if (YYMAXDEPTH < yystacksize)
11834 yystacksize = YYMAXDEPTH;
11835
11836 {
11837 yy_state_t *yyss1 = yyss;
11838 union yyalloc *yyptr =
11839 YY_CAST (union yyalloc *,
11840 YYSTACK_ALLOC (YY_CAST (YYSIZE_T, YYSTACK_BYTES (yystacksize))));
11841 if (! yyptr)
11842 YYNOMEM;
11843 YYSTACK_RELOCATE (yyss_alloc, yyss);
11844 YYSTACK_RELOCATE (yyvs_alloc, yyvs);
11845 YYSTACK_RELOCATE (yyls_alloc, yyls);
11846# undef YYSTACK_RELOCATE
11847 if (yyss1 != yyssa)
11848 YYSTACK_FREE (yyss1);
11849 }
11850# endif
11851
11852 yyssp = yyss + yysize - 1;
11853 yyvsp = yyvs + yysize - 1;
11854 yylsp = yyls + yysize - 1;
11855
11856 YY_IGNORE_USELESS_CAST_BEGIN
11857 YYDPRINTF ((stderr, "Stack size increased to %ld\n",
11858 YY_CAST (long, yystacksize)));
11859 YY_IGNORE_USELESS_CAST_END
11860
11861 if (yyss + yystacksize - 1 <= yyssp)
11862 YYABORT;
11863 }
11864#endif /* !defined yyoverflow && !defined YYSTACK_RELOCATE */
11865
11866
11867 if (yystate == YYFINAL)
11868 YYACCEPT;
11869
11870 goto yybackup;
11871
11872
11873/*-----------.
11874| yybackup. |
11875`-----------*/
11876yybackup:
11877 /* Do appropriate processing given the current state. Read a
11878 lookahead token if we need one and don't already have one. */
11879
11880 /* First try to decide what to do without reference to lookahead token. */
11881 yyn = yypact[yystate];
11882 if (yypact_value_is_default (yyn))
11883 goto yydefault;
11884
11885 /* Not known => get a lookahead token if don't already have one. */
11886
11887 /* YYCHAR is either empty, or end-of-input, or a valid lookahead. */
11888 if (yychar == YYEMPTY)
11889 {
11890 YYDPRINTF ((stderr, "Reading a token\n"));
11891 yychar = yylex (&yylval, &yylloc, p);
11892 }
11893
11894 if (yychar <= END_OF_INPUT)
11895 {
11896 yychar = END_OF_INPUT;
11897 yytoken = YYSYMBOL_YYEOF;
11898 YYDPRINTF ((stderr, "Now at end of input.\n"));
11899 }
11900 else if (yychar == YYerror)
11901 {
11902 /* The scanner already issued an error message, process directly
11903 to error recovery. But do not keep the error token as
11904 lookahead, it is too special and may lead us to an endless
11905 loop in error recovery. */
11906 yychar = YYUNDEF;
11907 yytoken = YYSYMBOL_YYerror;
11908 yyerror_range[1] = yylloc;
11909 goto yyerrlab1;
11910 }
11911 else
11912 {
11913 yytoken = YYTRANSLATE (yychar);
11914 YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc, p);
11915 }
11916
11917 /* If the proper action on seeing token YYTOKEN is to reduce or to
11918 detect an error, take that action. */
11919 yyn += yytoken;
11920 if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
11921 goto yydefault;
11922 yyn = yytable[yyn];
11923 if (yyn <= 0)
11924 {
11925 if (yytable_value_is_error (yyn))
11926 goto yyerrlab;
11927 yyn = -yyn;
11928 goto yyreduce;
11929 }
11930
11931 /* Count tokens shifted since error; after three, turn off error
11932 status. */
11933 if (yyerrstatus)
11934 yyerrstatus--;
11935
11936 /* Shift the lookahead token. */
11937 YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc, p);
11938 yystate = yyn;
11939 YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
11940 *++yyvsp = yylval;
11941 YY_IGNORE_MAYBE_UNINITIALIZED_END
11942 *++yylsp = yylloc;
11943 /* %after-shift code. */
11944#line 2664 "parse.y"
11945 {after_shift(p);}
11946#line 11947 "parse.c"
11947
11948
11949 /* Discard the shifted token. */
11950 yychar = YYEMPTY;
11951 goto yynewstate;
11952
11953
11954/*-----------------------------------------------------------.
11955| yydefault -- do the default action for the current state. |
11956`-----------------------------------------------------------*/
11957yydefault:
11958 yyn = yydefact[yystate];
11959 if (yyn == 0)
11960 goto yyerrlab;
11961 goto yyreduce;
11962
11963
11964/*-----------------------------.
11965| yyreduce -- do a reduction. |
11966`-----------------------------*/
11967yyreduce:
11968 /* yyn is the number of a rule to reduce with. */
11969 yylen = yyr2[yyn];
11970
11971 /* If YYLEN is nonzero, implement the default value of the action:
11972 '$$ = $1'.
11973
11974 Otherwise, the following line sets YYVAL to garbage.
11975 This behavior is undocumented and Bison
11976 users should not rely upon it. Assigning to YYVAL
11977 unconditionally makes the parser a bit smaller, and it avoids a
11978 GCC warning that YYVAL may be used uninitialized. */
11979 yyval = yyvsp[1-yylen];
11980 /* %before-reduce function. */
11981#line 2665 "parse.y"
11982 {before_reduce(yylen, p);}
11983#line 11984 "parse.c"
11984
11985
11986 /* Default location. */
11987 YYLLOC_DEFAULT (yyloc, (yylsp - yylen), yylen);
11988 yyerror_range[1] = yyloc;
11989 YY_REDUCE_PRINT (yyn, p);
11990 switch (yyn)
11991 {
11992 case 2: /* $@1: %empty */
11993#line 3159 "parse.y"
11994 {
11995 SET_LEX_STATE(EXPR_BEG);
11996 local_push(p, ifndef_ripper(1)+0);
11997 /* jumps are possible in the top-level loop. */
11998 if (!ifndef_ripper(p->do_loop) + 0) init_block_exit(p);
11999 }
12000#line 12001 "parse.c"
12001 break;
12002
12003 case 5: /* compstmt_top_stmts: top_stmts option_terms */
12004#line 2974 "parse.y"
12005 {
12006 void_stmts(p, (yyval.node) = (yyvsp[-1].node));
12007 }
12008#line 12009 "parse.c"
12009 break;
12010
12011 case 6: /* program: $@1 compstmt_top_stmts */
12012#line 3166 "parse.y"
12013 {
12014 if ((yyvsp[0].node) && !compile_for_eval) {
12015 NODE *node = (yyvsp[0].node);
12016 /* last expression should not be void */
12017 if (nd_type_p(node, NODE_BLOCK)) {
12018 while (RNODE_BLOCK(node)->nd_next) {
12019 node = RNODE_BLOCK(node)->nd_next;
12020 }
12021 node = RNODE_BLOCK(node)->nd_head;
12022 }
12023 node = remove_begin(node);
12024 void_expr(p, node);
12025 }
12026 p->eval_tree = NEW_SCOPE(0, block_append(p, p->eval_tree, (yyvsp[0].node)), NULL, &(yyloc));
12027 /*% ripper[final]: program!($:2) %*/
12028 local_pop(p);
12029 }
12030#line 12031 "parse.c"
12031 break;
12032
12033 case 7: /* top_stmts: none */
12034#line 3186 "parse.y"
12035 {
12036 (yyval.node) = NEW_BEGIN(0, &(yyloc));
12037 /*% ripper: stmts_add!(stmts_new!, void_stmt!) %*/
12038 }
12039#line 12040 "parse.c"
12040 break;
12041
12042 case 8: /* top_stmts: top_stmt */
12043#line 3191 "parse.y"
12044 {
12045 (yyval.node) = newline_node((yyvsp[0].node));
12046 /*% ripper: stmts_add!(stmts_new!, $:1) %*/
12047 }
12048#line 12049 "parse.c"
12049 break;
12050
12051 case 9: /* top_stmts: top_stmts terms top_stmt */
12052#line 3196 "parse.y"
12053 {
12054 (yyval.node) = block_append(p, (yyvsp[-2].node), newline_node((yyvsp[0].node)));
12055 /*% ripper: stmts_add!($:1, $:3) %*/
12056 }
12057#line 12058 "parse.c"
12058 break;
12059
12060 case 10: /* top_stmt: stmt */
12061#line 3203 "parse.y"
12062 {
12063 clear_block_exit(p, true);
12064 (yyval.node) = (yyvsp[0].node);
12065 }
12066#line 12067 "parse.c"
12067 break;
12068
12069 case 11: /* top_stmt: "'BEGIN'" begin_block */
12070#line 3208 "parse.y"
12071 {
12072 (yyval.node) = (yyvsp[0].node);
12073 /*% ripper: $:2 %*/
12074 }
12075#line 12076 "parse.c"
12076 break;
12077
12078 case 12: /* block_open: '{' */
12079#line 3214 "parse.y"
12080 {(yyval.node_exits) = init_block_exit(p);}
12081#line 12082 "parse.c"
12082 break;
12083
12084 case 13: /* begin_block: block_open compstmt_top_stmts '}' */
12085#line 3217 "parse.y"
12086 {
12087 restore_block_exit(p, (yyvsp[-2].node_exits));
12088 p->eval_tree_begin = block_append(p, p->eval_tree_begin,
12089 NEW_BEGIN((yyvsp[-1].node), &(yyloc)));
12090 (yyval.node) = NEW_BEGIN(0, &(yyloc));
12091 /*% ripper: BEGIN!($:2) %*/
12092 }
12093#line 12094 "parse.c"
12094 break;
12095
12096 case 14: /* compstmt_stmts: stmts option_terms */
12097#line 2974 "parse.y"
12098 {
12099 void_stmts(p, (yyval.node) = (yyvsp[-1].node));
12100 }
12101#line 12102 "parse.c"
12102 break;
12103
12104 case 15: /* $@2: %empty */
12105#line 3230 "parse.y"
12106 {
12107 if (!(yyvsp[-1].node)) yyerror1(&(yylsp[0]), "else without rescue is useless");
12108 next_rescue_context(&p->ctxt, &(yyvsp[-2].ctxt), after_else);
12109 }
12110#line 12111 "parse.c"
12111 break;
12112
12113 case 16: /* $@3: %empty */
12114#line 3235 "parse.y"
12115 {
12116 next_rescue_context(&p->ctxt, &(yyvsp[-4].ctxt), after_ensure);
12117 }
12118#line 12119 "parse.c"
12119 break;
12120
12121 case 17: /* bodystmt: compstmt_stmts lex_ctxt opt_rescue k_else $@2 compstmt_stmts $@3 opt_ensure */
12122#line 3239 "parse.y"
12123 {
12124 (yyval.node) = new_bodystmt(p, (yyvsp[-7].node), (yyvsp[-5].node), (yyvsp[-2].node), (yyvsp[0].node), &(yyloc));
12125 /*% ripper: bodystmt!($:body, $:opt_rescue, $:elsebody, $:opt_ensure) %*/
12126 }
12127#line 12128 "parse.c"
12128 break;
12129
12130 case 18: /* $@4: %empty */
12131#line 3246 "parse.y"
12132 {
12133 next_rescue_context(&p->ctxt, &(yyvsp[-1].ctxt), after_ensure);
12134 }
12135#line 12136 "parse.c"
12136 break;
12137
12138 case 19: /* bodystmt: compstmt_stmts lex_ctxt opt_rescue $@4 opt_ensure */
12139#line 3250 "parse.y"
12140 {
12141 (yyval.node) = new_bodystmt(p, (yyvsp[-4].node), (yyvsp[-2].node), 0, (yyvsp[0].node), &(yyloc));
12142 /*% ripper: bodystmt!($:body, $:opt_rescue, Qnil, $:opt_ensure) %*/
12143 }
12144#line 12145 "parse.c"
12145 break;
12146
12147 case 20: /* stmts: none */
12148#line 3257 "parse.y"
12149 {
12150 (yyval.node) = NEW_BEGIN(0, &(yyloc));
12151 /*% ripper: stmts_add!(stmts_new!, void_stmt!) %*/
12152 }
12153#line 12154 "parse.c"
12154 break;
12155
12156 case 21: /* stmts: stmt_or_begin */
12157#line 3262 "parse.y"
12158 {
12159 (yyval.node) = newline_node((yyvsp[0].node));
12160 /*% ripper: stmts_add!(stmts_new!, $:1) %*/
12161 }
12162#line 12163 "parse.c"
12163 break;
12164
12165 case 22: /* stmts: stmts terms stmt_or_begin */
12166#line 3267 "parse.y"
12167 {
12168 (yyval.node) = block_append(p, (yyvsp[-2].node), newline_node((yyvsp[0].node)));
12169 /*% ripper: stmts_add!($:1, $:3) %*/
12170 }
12171#line 12172 "parse.c"
12172 break;
12173
12174 case 24: /* $@5: %empty */
12175#line 3275 "parse.y"
12176 {
12177 yyerror1(&(yylsp[0]), "BEGIN is permitted only at toplevel");
12178 }
12179#line 12180 "parse.c"
12180 break;
12181
12182 case 25: /* stmt_or_begin: "'BEGIN'" $@5 begin_block */
12183#line 3279 "parse.y"
12184 {
12185 (yyval.node) = (yyvsp[0].node);
12186 }
12187#line 12188 "parse.c"
12188 break;
12189
12190 case 26: /* allow_exits: %empty */
12191#line 3284 "parse.y"
12192 {(yyval.node_exits) = allow_block_exit(p);}
12193#line 12194 "parse.c"
12194 break;
12195
12196 case 27: /* k_END: "'END'" lex_ctxt */
12197#line 3287 "parse.y"
12198 {
12199 (yyval.ctxt) = (yyvsp[0].ctxt);
12200 p->ctxt.in_rescue = before_rescue;
12201 /*% ripper: $:2 %*/
12202 }
12203#line 12204 "parse.c"
12204 break;
12205
12206 case 28: /* $@6: %empty */
12207#line 3293 "parse.y"
12208 {SET_LEX_STATE(EXPR_FNAME|EXPR_FITEM);}
12209#line 12210 "parse.c"
12210 break;
12211
12212 case 29: /* stmt: "'alias'" fitem $@6 fitem */
12213#line 3294 "parse.y"
12214 {
12215 (yyval.node) = NEW_ALIAS((yyvsp[-2].node), (yyvsp[0].node), &(yyloc), &(yylsp[-3]));
12216 /*% ripper: alias!($:2, $:4) %*/
12217 }
12218#line 12219 "parse.c"
12219 break;
12220
12221 case 30: /* stmt: "'alias'" "global variable" "global variable" */
12222#line 3299 "parse.y"
12223 {
12224 (yyval.node) = NEW_VALIAS((yyvsp[-1].id), (yyvsp[0].id), &(yyloc), &(yylsp[-2]));
12225 /*% ripper: var_alias!($:2, $:3) %*/
12226 }
12227#line 12228 "parse.c"
12228 break;
12229
12230 case 31: /* stmt: "'alias'" "global variable" "back reference" */
12231#line 3304 "parse.y"
12232 {
12233 char buf[2];
12234 buf[0] = '$';
12235 buf[1] = (char)RNODE_BACK_REF((yyvsp[0].node))->nd_nth;
12236 (yyval.node) = NEW_VALIAS((yyvsp[-1].id), rb_intern2(buf, 2), &(yyloc), &(yylsp[-2]));
12237 /*% ripper: var_alias!($:2, $:3) %*/
12238 }
12239#line 12240 "parse.c"
12240 break;
12241
12242 case 32: /* stmt: "'alias'" "global variable" "numbered reference" */
12243#line 3312 "parse.y"
12244 {
12245 static const char mesg[] = "can't make alias for the number variables";
12246 /*%%%*/
12247 yyerror1(&(yylsp[0]), mesg);
12248 /*% %*/
12249 (yyval.node) = NEW_ERROR(&(yyloc));
12250 /*% ripper[error]: alias_error!(ERR_MESG(), $:3) %*/
12251 }
12252#line 12253 "parse.c"
12253 break;
12254
12255 case 33: /* stmt: "'undef'" undef_list */
12256#line 3321 "parse.y"
12257 {
12258 nd_set_first_loc((yyvsp[0].node), (yylsp[-1]).beg_pos);
12259 RNODE_UNDEF((yyvsp[0].node))->keyword_loc = (yylsp[-1]);
12260 (yyval.node) = (yyvsp[0].node);
12261 /*% ripper: undef!($:2) %*/
12262 }
12263#line 12264 "parse.c"
12264 break;
12265
12266 case 34: /* stmt: stmt "'if' modifier" expr_value */
12267#line 3328 "parse.y"
12268 {
12269 (yyval.node) = new_if(p, (yyvsp[0].node), remove_begin((yyvsp[-2].node)), 0, &(yyloc), &(yylsp[-1]), &NULL_LOC, &NULL_LOC);
12270 fixpos((yyval.node), (yyvsp[0].node));
12271 /*% ripper: if_mod!($:3, $:1) %*/
12272 }
12273#line 12274 "parse.c"
12274 break;
12275
12276 case 35: /* stmt: stmt "'unless' modifier" expr_value */
12277#line 3334 "parse.y"
12278 {
12279 (yyval.node) = new_unless(p, (yyvsp[0].node), remove_begin((yyvsp[-2].node)), 0, &(yyloc), &(yylsp[-1]), &NULL_LOC, &NULL_LOC);
12280 fixpos((yyval.node), (yyvsp[0].node));
12281 /*% ripper: unless_mod!($:3, $:1) %*/
12282 }
12283#line 12284 "parse.c"
12284 break;
12285
12286 case 36: /* stmt: stmt "'while' modifier" expr_value */
12287#line 3340 "parse.y"
12288 {
12289 clear_block_exit(p, false);
12290 if ((yyvsp[-2].node) && nd_type_p((yyvsp[-2].node), NODE_BEGIN)) {
12291 (yyval.node) = NEW_WHILE(cond(p, (yyvsp[0].node), &(yylsp[0])), RNODE_BEGIN((yyvsp[-2].node))->nd_body, 0, &(yyloc), &(yylsp[-1]), &NULL_LOC);
12292 }
12293 else {
12294 (yyval.node) = NEW_WHILE(cond(p, (yyvsp[0].node), &(yylsp[0])), (yyvsp[-2].node), 1, &(yyloc), &(yylsp[-1]), &NULL_LOC);
12295 }
12296 /*% ripper: while_mod!($:3, $:1) %*/
12297 }
12298#line 12299 "parse.c"
12299 break;
12300
12301 case 37: /* stmt: stmt "'until' modifier" expr_value */
12302#line 3351 "parse.y"
12303 {
12304 clear_block_exit(p, false);
12305 if ((yyvsp[-2].node) && nd_type_p((yyvsp[-2].node), NODE_BEGIN)) {
12306 (yyval.node) = NEW_UNTIL(cond(p, (yyvsp[0].node), &(yylsp[0])), RNODE_BEGIN((yyvsp[-2].node))->nd_body, 0, &(yyloc), &(yylsp[-1]), &NULL_LOC);
12307 }
12308 else {
12309 (yyval.node) = NEW_UNTIL(cond(p, (yyvsp[0].node), &(yylsp[0])), (yyvsp[-2].node), 1, &(yyloc), &(yylsp[-1]), &NULL_LOC);
12310 }
12311 /*% ripper: until_mod!($:3, $:1) %*/
12312 }
12313#line 12314 "parse.c"
12314 break;
12315
12316 case 38: /* stmt: stmt "'rescue' modifier" after_rescue stmt */
12317#line 3362 "parse.y"
12318 {
12319 p->ctxt.in_rescue = (yyvsp[-1].ctxt).in_rescue;
12320 NODE *resq;
12321 YYLTYPE loc = code_loc_gen(&(yylsp[-2]), &(yylsp[0]));
12322 resq = NEW_RESBODY(0, 0, remove_begin((yyvsp[0].node)), 0, &loc);
12323 (yyval.node) = NEW_RESCUE(remove_begin((yyvsp[-3].node)), resq, 0, &(yyloc));
12324 /*% ripper: rescue_mod!($:1, $:4) %*/
12325 }
12326#line 12327 "parse.c"
12327 break;
12328
12329 case 39: /* stmt: k_END allow_exits '{' compstmt_stmts '}' */
12330#line 3371 "parse.y"
12331 {
12332 if (p->ctxt.in_def) {
12333 rb_warn0("END in method; use at_exit");
12334 }
12335 restore_block_exit(p, (yyvsp[-3].node_exits));
12336 p->ctxt = (yyvsp[-4].ctxt);
12337 {
12338 NODE *scope = NEW_SCOPE2(0 /* tbl */, 0 /* args */, (yyvsp[-1].node) /* body */, NULL /* parent */, &(yyloc));
12339 (yyval.node) = NEW_POSTEXE(scope, &(yyloc), &(yylsp[-4]), &(yylsp[-2]), &(yylsp[0]));
12340 RNODE_SCOPE(scope)->nd_parent = (yyval.node);
12341 }
12342 /*% ripper: END!($:compstmt) %*/
12343 }
12344#line 12345 "parse.c"
12345 break;
12346
12347 case 41: /* stmt: mlhs '=' lex_ctxt command_call_value */
12348#line 3386 "parse.y"
12349 {
12350 (yyval.node) = node_assign(p, (NODE *)(yyvsp[-3].node_masgn), (yyvsp[0].node), (yyvsp[-1].ctxt), &(yyloc));
12351 /*% ripper: massign!($:1, $:4) %*/
12352 }
12353#line 12354 "parse.c"
12354 break;
12355
12356 case 42: /* asgn_mrhs: lhs '=' lex_ctxt mrhs */
12357#line 2919 "parse.y"
12358 {
12359 (yyval.node) = node_assign(p, (NODE *)(yyvsp[-3].node), (yyvsp[0].node), (yyvsp[-1].ctxt), &(yyloc));
12360 /*% ripper: assign!($:1, $:4) %*/
12361 }
12362#line 12363 "parse.c"
12363 break;
12364
12365 case 44: /* stmt: mlhs '=' lex_ctxt mrhs_arg "'rescue' modifier" after_rescue stmt */
12366#line 3393 "parse.y"
12367 {
12368 p->ctxt.in_rescue = (yyvsp[-4].ctxt).in_rescue;
12369 YYLTYPE loc = code_loc_gen(&(yylsp[-2]), &(yylsp[0]));
12370 (yyvsp[0].node) = NEW_RESBODY(0, 0, remove_begin((yyvsp[0].node)), 0, &loc);
12371 loc.beg_pos = (yylsp[-3]).beg_pos;
12372 (yyvsp[-3].node) = NEW_RESCUE((yyvsp[-3].node), (yyvsp[0].node), 0, &loc);
12373 (yyval.node) = node_assign(p, (NODE *)(yyvsp[-6].node_masgn), (yyvsp[-3].node), (yyvsp[-4].ctxt), &(yyloc));
12374 /*% ripper: massign!($:1, rescue_mod!($:4, $:7)) %*/
12375 }
12376#line 12377 "parse.c"
12377 break;
12378
12379 case 45: /* stmt: mlhs '=' lex_ctxt mrhs_arg */
12380#line 3403 "parse.y"
12381 {
12382 (yyval.node) = node_assign(p, (NODE *)(yyvsp[-3].node_masgn), (yyvsp[0].node), (yyvsp[-1].ctxt), &(yyloc));
12383 /*% ripper: massign!($:1, $:4) %*/
12384 }
12385#line 12386 "parse.c"
12386 break;
12387
12388 case 47: /* stmt: error */
12389#line 3409 "parse.y"
12390 {
12391 (void)yynerrs;
12392 (yyval.node) = NEW_ERROR(&(yyloc));
12393 }
12394#line 12395 "parse.c"
12395 break;
12396
12397 case 48: /* asgn_command_rhs: lhs '=' lex_ctxt command_rhs */
12398#line 2919 "parse.y"
12399 {
12400 (yyval.node) = node_assign(p, (NODE *)(yyvsp[-3].node), (yyvsp[0].node), (yyvsp[-1].ctxt), &(yyloc));
12401 /*% ripper: assign!($:1, $:4) %*/
12402 }
12403#line 12404 "parse.c"
12404 break;
12405
12406 case 50: /* op_asgn_command_rhs: var_lhs "operator-assignment" lex_ctxt command_rhs */
12407#line 3044 "parse.y"
12408 {
12409 (yyval.node) = new_op_assign(p, (yyvsp[-3].node), (yyvsp[-2].id), (yyvsp[0].node), (yyvsp[-1].ctxt), &(yyloc));
12410 /*% ripper: opassign!($:1, $:2, $:4) %*/
12411 }
12412#line 12413 "parse.c"
12413 break;
12414
12415 case 51: /* op_asgn_command_rhs: primary_value '[' opt_call_args rbracket "operator-assignment" lex_ctxt command_rhs */
12416#line 3049 "parse.y"
12417 {
12418 (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]));
12419 /*% ripper: opassign!(aref_field!($:1, $:3), $:5, $:7) %*/
12420 }
12421#line 12422 "parse.c"
12422 break;
12423
12424 case 52: /* op_asgn_command_rhs: primary_value call_op "local variable or method" "operator-assignment" lex_ctxt command_rhs */
12425#line 3054 "parse.y"
12426 {
12427 (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]));
12428 /*% ripper: opassign!(field!($:1, $:2, $:3), $:4, $:6) %*/
12429 }
12430#line 12431 "parse.c"
12431 break;
12432
12433 case 53: /* op_asgn_command_rhs: primary_value call_op "constant" "operator-assignment" lex_ctxt command_rhs */
12434#line 3059 "parse.y"
12435 {
12436 (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]));
12437 /*% ripper: opassign!(field!($:1, $:2, $:3), $:4, $:6) %*/
12438 }
12439#line 12440 "parse.c"
12440 break;
12441
12442 case 54: /* op_asgn_command_rhs: primary_value "::" "local variable or method" "operator-assignment" lex_ctxt command_rhs */
12443#line 3064 "parse.y"
12444 {
12445 (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]));
12446 /*% ripper: opassign!(field!($:1, $:2, $:3), $:4, $:6) %*/
12447 }
12448#line 12449 "parse.c"
12449 break;
12450
12451 case 55: /* op_asgn_command_rhs: primary_value "::" "constant" "operator-assignment" lex_ctxt command_rhs */
12452#line 3069 "parse.y"
12453 {
12454 YYLTYPE loc = code_loc_gen(&(yylsp[-5]), &(yylsp[-3]));
12455 (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));
12456 /*% ripper: opassign!(const_path_field!($:1, $:3), $:4, $:6) %*/
12457 }
12458#line 12459 "parse.c"
12459 break;
12460
12461 case 56: /* op_asgn_command_rhs: ":: at EXPR_BEG" "constant" "operator-assignment" lex_ctxt command_rhs */
12462#line 3075 "parse.y"
12463 {
12464 YYLTYPE loc = code_loc_gen(&(yylsp[-4]), &(yylsp[-3]));
12465 (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));
12466 /*% ripper: opassign!(top_const_field!($:2), $:3, $:5) %*/
12467 }
12468#line 12469 "parse.c"
12469 break;
12470
12471 case 57: /* op_asgn_command_rhs: backref "operator-assignment" lex_ctxt command_rhs */
12472#line 3081 "parse.y"
12473 {
12474 VALUE MAYBE_UNUSED(e) = rb_backref_error(p, (yyvsp[-3].node));
12475 (yyval.node) = NEW_ERROR(&(yyloc));
12476 /*% ripper[error]: assign_error!(?e, opassign!(var_field!($:1), $:2, $:4)) %*/
12477 }
12478#line 12479 "parse.c"
12479 break;
12480
12481 case 59: /* def_endless_method_endless_command: defn_head f_opt_paren_args '=' endless_command */
12482#line 2949 "parse.y"
12483 {
12484 endless_method_name(p, (yyvsp[-3].node_def_temp)->nd_mid, &(yylsp[-3]));
12485 restore_defun(p, (yyvsp[-3].node_def_temp));
12486 ((yyval.node) = (yyvsp[-3].node_def_temp)->nd_def)->nd_loc = (yyloc);
12487 (yyvsp[0].node) = new_scope_body(p, (yyvsp[-2].node_args), (yyvsp[0].node), (yyval.node), &(yyloc));
12488 RNODE_DEFN((yyval.node))->nd_defn = (yyvsp[0].node);
12489 /*% ripper: bodystmt!($:bodystmt, Qnil, Qnil, Qnil) %*/
12490 /*% ripper: def!($:head, $:args, $:$) %*/
12491 local_pop(p);
12492 }
12493#line 12494 "parse.c"
12494 break;
12495
12496 case 60: /* def_endless_method_endless_command: defs_head f_opt_paren_args '=' endless_command */
12497#line 2960 "parse.y"
12498 {
12499 endless_method_name(p, (yyvsp[-3].node_def_temp)->nd_mid, &(yylsp[-3]));
12500 restore_defun(p, (yyvsp[-3].node_def_temp));
12501 ((yyval.node) = (yyvsp[-3].node_def_temp)->nd_def)->nd_loc = (yyloc);
12502 (yyvsp[0].node) = new_scope_body(p, (yyvsp[-2].node_args), (yyvsp[0].node), (yyval.node), &(yyloc));
12503 RNODE_DEFS((yyval.node))->nd_defn = (yyvsp[0].node);
12504 /*% ripper: bodystmt!($:bodystmt, Qnil, Qnil, Qnil) %*/
12505 /*% ripper: defs!(*$:head[0..2], $:args, $:$) %*/
12506 local_pop(p);
12507 }
12508#line 12509 "parse.c"
12509 break;
12510
12511 case 63: /* endless_command: endless_command "'rescue' modifier" after_rescue arg */
12512#line 3422 "parse.y"
12513 {
12514 p->ctxt.in_rescue = (yyvsp[-1].ctxt).in_rescue;
12515 (yyval.node) = rescued_expr(p, (yyvsp[-3].node), (yyvsp[0].node), &(yylsp[-3]), &(yylsp[-2]), &(yylsp[0]));
12516 /*% ripper: rescue_mod!($:1, $:4) %*/
12517 }
12518#line 12519 "parse.c"
12519 break;
12520
12521 case 66: /* endless_command: "'not'" option_'\n' endless_command */
12522#line 3428 "parse.y"
12523 {
12524 (yyval.node) = call_uni_op(p, method_cond(p, (yyvsp[0].node), &(yylsp[0])), METHOD_NOT, &(yylsp[-2]), &(yyloc));
12525 /*% ripper: unary!(ID2VAL(idNOT), $:3) %*/
12526 }
12527#line 12528 "parse.c"
12528 break;
12529
12530 case 68: /* command_rhs: command_call_value "'rescue' modifier" after_rescue stmt */
12531#line 3436 "parse.y"
12532 {
12533 p->ctxt.in_rescue = (yyvsp[-1].ctxt).in_rescue;
12534 YYLTYPE loc = code_loc_gen(&(yylsp[-2]), &(yylsp[0]));
12535 (yyval.node) = NEW_RESCUE((yyvsp[-3].node), NEW_RESBODY(0, 0, remove_begin((yyvsp[0].node)), 0, &loc), 0, &(yyloc));
12536 /*% ripper: rescue_mod!($:1, $:4) %*/
12537 }
12538#line 12539 "parse.c"
12539 break;
12540
12541 case 71: /* expr: expr "'and'" expr */
12542#line 3447 "parse.y"
12543 {
12544 (yyval.node) = logop(p, idAND, (yyvsp[-2].node), (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
12545 /*% ripper: binary!($:1, ID2VAL(idAND), $:3) %*/
12546 }
12547#line 12548 "parse.c"
12548 break;
12549
12550 case 72: /* expr: expr "'or'" expr */
12551#line 3452 "parse.y"
12552 {
12553 (yyval.node) = logop(p, idOR, (yyvsp[-2].node), (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
12554 /*% ripper: binary!($:1, ID2VAL(idOR), $:3) %*/
12555 }
12556#line 12557 "parse.c"
12557 break;
12558
12559 case 73: /* expr: "'not'" option_'\n' expr */
12560#line 3457 "parse.y"
12561 {
12562 (yyval.node) = call_uni_op(p, method_cond(p, (yyvsp[0].node), &(yylsp[0])), METHOD_NOT, &(yylsp[-2]), &(yyloc));
12563 /*% ripper: unary!(ID2VAL(idNOT), $:3) %*/
12564 }
12565#line 12566 "parse.c"
12566 break;
12567
12568 case 74: /* expr: '!' command_call */
12569#line 3462 "parse.y"
12570 {
12571 (yyval.node) = call_uni_op(p, method_cond(p, (yyvsp[0].node), &(yylsp[0])), '!', &(yylsp[-1]), &(yyloc));
12572 /*% ripper: unary!(ID2VAL('\'!\''), $:2) %*/
12573 }
12574#line 12575 "parse.c"
12575 break;
12576
12577 case 75: /* $@7: %empty */
12578#line 3467 "parse.y"
12579 {
12580 value_expr((yyvsp[-1].node));
12581 }
12582#line 12583 "parse.c"
12583 break;
12584
12585 case 76: /* expr: arg "=>" $@7 p_in_kwarg p_pvtbl p_pktbl p_top_expr_body */
12586#line 3472 "parse.y"
12587 {
12588 pop_pktbl(p, (yyvsp[-1].tbl));
12589 pop_pvtbl(p, (yyvsp[-2].tbl));
12590 p->ctxt.in_kwarg = (yyvsp[-3].ctxt).in_kwarg;
12591 (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);
12592 /*% ripper: case!($:arg, in!($:body, Qnil, Qnil)) %*/
12593 }
12594#line 12595 "parse.c"
12595 break;
12596
12597 case 77: /* $@8: %empty */
12598#line 3480 "parse.y"
12599 {
12600 value_expr((yyvsp[-1].node));
12601 }
12602#line 12603 "parse.c"
12603 break;
12604
12605 case 78: /* expr: arg "'in'" $@8 p_in_kwarg p_pvtbl p_pktbl p_top_expr_body */
12606#line 3485 "parse.y"
12607 {
12608 pop_pktbl(p, (yyvsp[-1].tbl));
12609 pop_pvtbl(p, (yyvsp[-2].tbl));
12610 p->ctxt.in_kwarg = (yyvsp[-3].ctxt).in_kwarg;
12611 (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);
12612 /*% ripper: case!($:arg, in!($:body, Qnil, Qnil)) %*/
12613 }
12614#line 12615 "parse.c"
12615 break;
12616
12617 case 80: /* def_name: fname */
12618#line 3496 "parse.y"
12619 {
12620 numparam_name(p, (yyvsp[0].id));
12621 local_push(p, 0);
12622 p->ctxt.in_def = 1;
12623 p->ctxt.in_rescue = before_rescue;
12624 p->ctxt.cant_return = 0;
12625 (yyval.id) = (yyvsp[0].id);
12626 }
12627#line 12628 "parse.c"
12628 break;
12629
12630 case 81: /* defn_head: k_def def_name */
12631#line 3507 "parse.y"
12632 {
12633 (yyval.node_def_temp) = def_head_save(p, (yyvsp[-1].node_def_temp));
12634 (yyval.node_def_temp)->nd_mid = (yyvsp[0].id);
12635 (yyval.node_def_temp)->nd_def = NEW_DEFN((yyvsp[0].id), 0, &(yyloc));
12636 /*% ripper: $:def_name %*/
12637 }
12638#line 12639 "parse.c"
12639 break;
12640
12641 case 82: /* $@9: %empty */
12642#line 3516 "parse.y"
12643 {
12644 SET_LEX_STATE(EXPR_FNAME);
12645 }
12646#line 12647 "parse.c"
12647 break;
12648
12649 case 83: /* defs_head: k_def singleton dot_or_colon $@9 def_name */
12650#line 3520 "parse.y"
12651 {
12652 SET_LEX_STATE(EXPR_ENDFN|EXPR_LABEL); /* force for args */
12653 (yyval.node_def_temp) = def_head_save(p, (yyvsp[-4].node_def_temp));
12654 (yyval.node_def_temp)->nd_mid = (yyvsp[0].id);
12655 (yyval.node_def_temp)->nd_def = NEW_DEFS((yyvsp[-3].node), (yyvsp[0].id), 0, &(yyloc));
12656 /*% ripper: [$:singleton, $:dot_or_colon, $:def_name] %*/
12657 }
12658#line 12659 "parse.c"
12659 break;
12660
12661 case 84: /* value_expr_expr: expr */
12662#line 3144 "parse.y"
12663 {
12664 value_expr((yyvsp[0].node));
12665 (yyval.node) = (yyvsp[0].node);
12666 }
12667#line 12668 "parse.c"
12668 break;
12669
12670 case 86: /* expr_value: error */
12671#line 3531 "parse.y"
12672 {
12673 (yyval.node) = NEW_ERROR(&(yyloc));
12674 }
12675#line 12676 "parse.c"
12676 break;
12677
12678 case 87: /* $@10: %empty */
12679#line 3536 "parse.y"
12680 {COND_PUSH(1);}
12681#line 12682 "parse.c"
12682 break;
12683
12684 case 88: /* $@11: %empty */
12685#line 3536 "parse.y"
12686 {COND_POP();}
12687#line 12688 "parse.c"
12688 break;
12689
12690 case 89: /* expr_value_do: $@10 expr_value do $@11 */
12691#line 3537 "parse.y"
12692 {
12693 (yyval.node) = (yyvsp[-2].node);
12694 /*% ripper: $:2 %*/
12695 }
12696#line 12697 "parse.c"
12697 break;
12698
12699 case 92: /* value_expr_command_call: command_call */
12700#line 3144 "parse.y"
12701 {
12702 value_expr((yyvsp[0].node));
12703 (yyval.node) = (yyvsp[0].node);
12704 }
12705#line 12706 "parse.c"
12706 break;
12707
12708 case 95: /* block_command: block_call call_op2 operation2 command_args */
12709#line 3552 "parse.y"
12710 {
12711 (yyval.node) = new_qcall(p, (yyvsp[-2].id), (yyvsp[-3].node), (yyvsp[-1].id), (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
12712 /*% ripper: method_add_arg!(call!($:1, $:2, $:3), $:4) %*/
12713 }
12714#line 12715 "parse.c"
12715 break;
12716
12717 case 96: /* cmd_brace_block: "{ arg" brace_body '}' */
12718#line 3559 "parse.y"
12719 {
12720 (yyval.node) = (yyvsp[-1].node);
12721 set_embraced_location((yyval.node), &(yylsp[-2]), &(yylsp[0]));
12722 /*% ripper: $:2 %*/
12723 }
12724#line 12725 "parse.c"
12725 break;
12726
12727 case 97: /* fcall: "local variable or method" */
12728#line 3567 "parse.y"
12729 {
12730 (yyval.node_fcall) = NEW_FCALL((yyvsp[0].id), 0, &(yyloc));
12731 /*% ripper: $:1 %*/
12732 }
12733#line 12734 "parse.c"
12734 break;
12735
12736 case 98: /* fcall: "constant" */
12737#line 3567 "parse.y"
12738 {
12739 (yyval.node_fcall) = NEW_FCALL((yyvsp[0].id), 0, &(yyloc));
12740 /*% ripper: $:1 %*/
12741 }
12742#line 12743 "parse.c"
12743 break;
12744
12745 case 99: /* fcall: "method" */
12746#line 3567 "parse.y"
12747 {
12748 (yyval.node_fcall) = NEW_FCALL((yyvsp[0].id), 0, &(yyloc));
12749 /*% ripper: $:1 %*/
12750 }
12751#line 12752 "parse.c"
12752 break;
12753
12754 case 100: /* command: fcall command_args */
12755#line 3574 "parse.y"
12756 {
12757 (yyvsp[-1].node_fcall)->nd_args = (yyvsp[0].node);
12758 nd_set_last_loc((yyvsp[-1].node_fcall), (yylsp[0]).end_pos);
12759 (yyval.node) = (NODE *)(yyvsp[-1].node_fcall);
12760 /*% ripper: command!($:1, $:2) %*/
12761 }
12762#line 12763 "parse.c"
12763 break;
12764
12765 case 101: /* command: fcall command_args cmd_brace_block */
12766#line 3581 "parse.y"
12767 {
12768 block_dup_check(p, (yyvsp[-1].node), (yyvsp[0].node));
12769 (yyvsp[-2].node_fcall)->nd_args = (yyvsp[-1].node);
12770 (yyval.node) = method_add_block(p, (NODE *)(yyvsp[-2].node_fcall), (yyvsp[0].node), &(yyloc));
12771 fixpos((yyval.node), RNODE((yyvsp[-2].node_fcall)));
12772 nd_set_last_loc((yyvsp[-2].node_fcall), (yylsp[-1]).end_pos);
12773 /*% ripper: method_add_block!(command!($:1, $:2), $:3) %*/
12774 }
12775#line 12776 "parse.c"
12776 break;
12777
12778 case 102: /* command: primary_value call_op operation2 command_args */
12779#line 3590 "parse.y"
12780 {
12781 (yyval.node) = new_command_qcall(p, (yyvsp[-2].id), (yyvsp[-3].node), (yyvsp[-1].id), (yyvsp[0].node), 0, &(yylsp[-1]), &(yyloc));
12782 /*% ripper: command_call!($:1, $:2, $:3, $:4) %*/
12783 }
12784#line 12785 "parse.c"
12785 break;
12786
12787 case 103: /* command: primary_value call_op operation2 command_args cmd_brace_block */
12788#line 3595 "parse.y"
12789 {
12790 (yyval.node) = new_command_qcall(p, (yyvsp[-3].id), (yyvsp[-4].node), (yyvsp[-2].id), (yyvsp[-1].node), (yyvsp[0].node), &(yylsp[-2]), &(yyloc));
12791 /*% ripper: method_add_block!(command_call!($:1, $:2, $:3, $:4), $:5) %*/
12792 }
12793#line 12794 "parse.c"
12794 break;
12795
12796 case 104: /* command: primary_value "::" operation2 command_args */
12797#line 3600 "parse.y"
12798 {
12799 (yyval.node) = new_command_qcall(p, idCOLON2, (yyvsp[-3].node), (yyvsp[-1].id), (yyvsp[0].node), 0, &(yylsp[-1]), &(yyloc));
12800 /*% ripper: command_call!($:1, $:2, $:3, $:4) %*/
12801 }
12802#line 12803 "parse.c"
12803 break;
12804
12805 case 105: /* command: primary_value "::" operation2 command_args cmd_brace_block */
12806#line 3605 "parse.y"
12807 {
12808 (yyval.node) = new_command_qcall(p, idCOLON2, (yyvsp[-4].node), (yyvsp[-2].id), (yyvsp[-1].node), (yyvsp[0].node), &(yylsp[-2]), &(yyloc));
12809 /*% ripper: method_add_block!(command_call!($:1, $:2, $:3, $:4), $:5) %*/
12810 }
12811#line 12812 "parse.c"
12812 break;
12813
12814 case 106: /* command: primary_value "::" "constant" '{' brace_body '}' */
12815#line 3610 "parse.y"
12816 {
12817 set_embraced_location((yyvsp[-1].node), &(yylsp[-2]), &(yylsp[0]));
12818 (yyval.node) = new_command_qcall(p, idCOLON2, (yyvsp[-5].node), (yyvsp[-3].id), 0, (yyvsp[-1].node), &(yylsp[-3]), &(yyloc));
12819 /*% ripper: method_add_block!(command_call!($:1, $:2, $:3, Qnil), $:5) %*/
12820 }
12821#line 12822 "parse.c"
12822 break;
12823
12824 case 107: /* command: "'super'" command_args */
12825#line 3616 "parse.y"
12826 {
12827 (yyval.node) = NEW_SUPER((yyvsp[0].node), &(yyloc), &(yylsp[-1]), &NULL_LOC, &NULL_LOC);
12828 fixpos((yyval.node), (yyvsp[0].node));
12829 /*% ripper: super!($:2) %*/
12830 }
12831#line 12832 "parse.c"
12832 break;
12833
12834 case 108: /* command: k_yield command_args */
12835#line 3622 "parse.y"
12836 {
12837 (yyval.node) = NEW_YIELD((yyvsp[0].node), &(yyloc), &(yylsp[-1]), &NULL_LOC, &NULL_LOC);
12838 fixpos((yyval.node), (yyvsp[0].node));
12839 /*% ripper: yield!($:2) %*/
12840 }
12841#line 12842 "parse.c"
12842 break;
12843
12844 case 109: /* command: k_return call_args */
12845#line 3628 "parse.y"
12846 {
12847 (yyval.node) = NEW_RETURN(ret_args(p, (yyvsp[0].node)), &(yyloc), &(yylsp[-1]));
12848 /*% ripper: return!($:2) %*/
12849 }
12850#line 12851 "parse.c"
12851 break;
12852
12853 case 110: /* command: "'break'" call_args */
12854#line 3633 "parse.y"
12855 {
12856 NODE *args = 0;
12857 args = ret_args(p, (yyvsp[0].node));
12858 (yyval.node) = add_block_exit(p, NEW_BREAK(args, &(yyloc), &(yylsp[-1])));
12859 /*% ripper: break!($:2) %*/
12860 }
12861#line 12862 "parse.c"
12862 break;
12863
12864 case 111: /* command: "'next'" call_args */
12865#line 3640 "parse.y"
12866 {
12867 NODE *args = 0;
12868 args = ret_args(p, (yyvsp[0].node));
12869 (yyval.node) = add_block_exit(p, NEW_NEXT(args, &(yyloc), &(yylsp[-1])));
12870 /*% ripper: next!($:2) %*/
12871 }
12872#line 12873 "parse.c"
12873 break;
12874
12875 case 113: /* mlhs: "(" mlhs_inner rparen */
12876#line 3650 "parse.y"
12877 {
12878 (yyval.node_masgn) = (yyvsp[-1].node_masgn);
12879 /*% ripper: mlhs_paren!($:2) %*/
12880 }
12881#line 12882 "parse.c"
12882 break;
12883
12884 case 115: /* mlhs_inner: "(" mlhs_inner rparen */
12885#line 3658 "parse.y"
12886 {
12887 (yyval.node_masgn) = NEW_MASGN(NEW_LIST((NODE *)(yyvsp[-1].node_masgn), &(yyloc)), 0, &(yyloc));
12888 /*% ripper: mlhs_paren!($:2) %*/
12889 }
12890#line 12891 "parse.c"
12891 break;
12892
12893 case 116: /* mlhs_basic: mlhs_head */
12894#line 3665 "parse.y"
12895 {
12896 (yyval.node_masgn) = NEW_MASGN((yyvsp[0].node), 0, &(yyloc));
12897 /*% ripper: $:1 %*/
12898 }
12899#line 12900 "parse.c"
12900 break;
12901
12902 case 117: /* mlhs_basic: mlhs_head mlhs_item */
12903#line 3670 "parse.y"
12904 {
12905 (yyval.node_masgn) = NEW_MASGN(list_append(p, (yyvsp[-1].node), (yyvsp[0].node)), 0, &(yyloc));
12906 /*% ripper: mlhs_add!($:1, $:2) %*/
12907 }
12908#line 12909 "parse.c"
12909 break;
12910
12911 case 118: /* mlhs_basic: mlhs_head "*" mlhs_node */
12912#line 3675 "parse.y"
12913 {
12914 (yyval.node_masgn) = NEW_MASGN((yyvsp[-2].node), (yyvsp[0].node), &(yyloc));
12915 /*% ripper: mlhs_add_star!($:1, $:3) %*/
12916 }
12917#line 12918 "parse.c"
12918 break;
12919
12920 case 119: /* mlhs_items_mlhs_item: mlhs_item */
12921#line 3031 "parse.y"
12922 {
12923 (yyval.node) = NEW_LIST((yyvsp[0].node), &(yyloc));
12924 /*% ripper: mlhs_add!(mlhs_new!, $:1) %*/
12925 }
12926#line 12927 "parse.c"
12927 break;
12928
12929 case 120: /* mlhs_items_mlhs_item: mlhs_items_mlhs_item ',' mlhs_item */
12930#line 3036 "parse.y"
12931 {
12932 (yyval.node) = list_append(p, (yyvsp[-2].node), (yyvsp[0].node));
12933 /*% ripper: mlhs_add!($:1, $:3) %*/
12934 }
12935#line 12936 "parse.c"
12936 break;
12937
12938 case 121: /* mlhs_basic: mlhs_head "*" mlhs_node ',' mlhs_items_mlhs_item */
12939#line 3680 "parse.y"
12940 {
12941 (yyval.node_masgn) = NEW_MASGN((yyvsp[-4].node), NEW_POSTARG((yyvsp[-2].node),(yyvsp[0].node),&(yyloc)), &(yyloc));
12942 /*% ripper: mlhs_add_post!(mlhs_add_star!($:1, $:3), $:5) %*/
12943 }
12944#line 12945 "parse.c"
12945 break;
12946
12947 case 122: /* mlhs_basic: mlhs_head "*" */
12948#line 3685 "parse.y"
12949 {
12950 (yyval.node_masgn) = NEW_MASGN((yyvsp[-1].node), NODE_SPECIAL_NO_NAME_REST, &(yyloc));
12951 /*% ripper: mlhs_add_star!($:1, Qnil) %*/
12952 }
12953#line 12954 "parse.c"
12954 break;
12955
12956 case 123: /* mlhs_basic: mlhs_head "*" ',' mlhs_items_mlhs_item */
12957#line 3690 "parse.y"
12958 {
12959 (yyval.node_masgn) = NEW_MASGN((yyvsp[-3].node), NEW_POSTARG(NODE_SPECIAL_NO_NAME_REST, (yyvsp[0].node), &(yyloc)), &(yyloc));
12960 /*% ripper: mlhs_add_post!(mlhs_add_star!($:1, Qnil), $:4) %*/
12961 }
12962#line 12963 "parse.c"
12963 break;
12964
12965 case 124: /* mlhs_basic: "*" mlhs_node */
12966#line 3695 "parse.y"
12967 {
12968 (yyval.node_masgn) = NEW_MASGN(0, (yyvsp[0].node), &(yyloc));
12969 /*% ripper: mlhs_add_star!(mlhs_new!, $:2) %*/
12970 }
12971#line 12972 "parse.c"
12972 break;
12973
12974 case 125: /* mlhs_basic: "*" mlhs_node ',' mlhs_items_mlhs_item */
12975#line 3700 "parse.y"
12976 {
12977 (yyval.node_masgn) = NEW_MASGN(0, NEW_POSTARG((yyvsp[-2].node),(yyvsp[0].node),&(yyloc)), &(yyloc));
12978 /*% ripper: mlhs_add_post!(mlhs_add_star!(mlhs_new!, $:2), $:4) %*/
12979 }
12980#line 12981 "parse.c"
12981 break;
12982
12983 case 126: /* mlhs_basic: "*" */
12984#line 3705 "parse.y"
12985 {
12986 (yyval.node_masgn) = NEW_MASGN(0, NODE_SPECIAL_NO_NAME_REST, &(yyloc));
12987 /*% ripper: mlhs_add_star!(mlhs_new!, Qnil) %*/
12988 }
12989#line 12990 "parse.c"
12990 break;
12991
12992 case 127: /* mlhs_basic: "*" ',' mlhs_items_mlhs_item */
12993#line 3710 "parse.y"
12994 {
12995 (yyval.node_masgn) = NEW_MASGN(0, NEW_POSTARG(NODE_SPECIAL_NO_NAME_REST, (yyvsp[0].node), &(yyloc)), &(yyloc));
12996 /*% ripper: mlhs_add_post!(mlhs_add_star!(mlhs_new!, Qnil), $:3) %*/
12997 }
12998#line 12999 "parse.c"
12999 break;
13000
13001 case 129: /* mlhs_item: "(" mlhs_inner rparen */
13002#line 3718 "parse.y"
13003 {
13004 (yyval.node) = (NODE *)(yyvsp[-1].node_masgn);
13005 /*% ripper: mlhs_paren!($:2) %*/
13006 }
13007#line 13008 "parse.c"
13008 break;
13009
13010 case 130: /* mlhs_head: mlhs_item ',' */
13011#line 3725 "parse.y"
13012 {
13013 (yyval.node) = NEW_LIST((yyvsp[-1].node), &(yylsp[-1]));
13014 /*% ripper: mlhs_add!(mlhs_new!, $:1) %*/
13015 }
13016#line 13017 "parse.c"
13017 break;
13018
13019 case 131: /* mlhs_head: mlhs_head mlhs_item ',' */
13020#line 3730 "parse.y"
13021 {
13022 (yyval.node) = list_append(p, (yyvsp[-2].node), (yyvsp[-1].node));
13023 /*% ripper: mlhs_add!($:1, $:2) %*/
13024 }
13025#line 13026 "parse.c"
13026 break;
13027
13028 case 132: /* mlhs_node: user_variable */
13029#line 3738 "parse.y"
13030 {
13031 /*% ripper: var_field!($:1) %*/
13032 (yyval.node) = assignable(p, (yyvsp[0].id), 0, &(yyloc));
13033 }
13034#line 13035 "parse.c"
13035 break;
13036
13037 case 133: /* mlhs_node: keyword_variable */
13038#line 3738 "parse.y"
13039 {
13040 /*% ripper: var_field!($:1) %*/
13041 (yyval.node) = assignable(p, (yyvsp[0].id), 0, &(yyloc));
13042 }
13043#line 13044 "parse.c"
13044 break;
13045
13046 case 134: /* mlhs_node: primary_value '[' opt_call_args rbracket */
13047#line 3743 "parse.y"
13048 {
13049 (yyval.node) = aryset(p, (yyvsp[-3].node), (yyvsp[-1].node), &(yyloc));
13050 /*% ripper: aref_field!($:1, $:3) %*/
13051 }
13052#line 13053 "parse.c"
13053 break;
13054
13055 case 135: /* mlhs_node: primary_value call_op "local variable or method" */
13056#line 3748 "parse.y"
13057 {
13058 anddot_multiple_assignment_check(p, &(yylsp[-1]), (yyvsp[-1].id));
13059 (yyval.node) = attrset(p, (yyvsp[-2].node), (yyvsp[-1].id), (yyvsp[0].id), &(yyloc));
13060 /*% ripper: field!($:1, $:2, $:3) %*/
13061 }
13062#line 13063 "parse.c"
13063 break;
13064
13065 case 136: /* mlhs_node: primary_value call_op "constant" */
13066#line 3748 "parse.y"
13067 {
13068 anddot_multiple_assignment_check(p, &(yylsp[-1]), (yyvsp[-1].id));
13069 (yyval.node) = attrset(p, (yyvsp[-2].node), (yyvsp[-1].id), (yyvsp[0].id), &(yyloc));
13070 /*% ripper: field!($:1, $:2, $:3) %*/
13071 }
13072#line 13073 "parse.c"
13073 break;
13074
13075 case 137: /* mlhs_node: primary_value "::" "local variable or method" */
13076#line 3754 "parse.y"
13077 {
13078 (yyval.node) = attrset(p, (yyvsp[-2].node), idCOLON2, (yyvsp[0].id), &(yyloc));
13079 /*% ripper: const_path_field!($:1, $:3) %*/
13080 }
13081#line 13082 "parse.c"
13082 break;
13083
13084 case 138: /* mlhs_node: primary_value "::" "constant" */
13085#line 3759 "parse.y"
13086 {
13087 /*% ripper: const_path_field!($:1, $:3) %*/
13088 (yyval.node) = const_decl(p, NEW_COLON2((yyvsp[-2].node), (yyvsp[0].id), &(yyloc), &(yylsp[-1]), &(yylsp[0])), &(yyloc));
13089 }
13090#line 13091 "parse.c"
13091 break;
13092
13093 case 139: /* mlhs_node: ":: at EXPR_BEG" "constant" */
13094#line 3764 "parse.y"
13095 {
13096 /*% ripper: top_const_field!($:2) %*/
13097 (yyval.node) = const_decl(p, NEW_COLON3((yyvsp[0].id), &(yyloc), &(yylsp[-1]), &(yylsp[0])), &(yyloc));
13098 }
13099#line 13100 "parse.c"
13100 break;
13101
13102 case 140: /* mlhs_node: backref */
13103#line 3769 "parse.y"
13104 {
13105 VALUE MAYBE_UNUSED(e) = rb_backref_error(p, (yyvsp[0].node));
13106 (yyval.node) = NEW_ERROR(&(yyloc));
13107 /*% ripper[error]: assign_error!(?e, var_field!($:1)) %*/
13108 }
13109#line 13110 "parse.c"
13110 break;
13111
13112 case 141: /* lhs: user_variable */
13113#line 3777 "parse.y"
13114 {
13115 /*% ripper: var_field!($:1) %*/
13116 (yyval.node) = assignable(p, (yyvsp[0].id), 0, &(yyloc));
13117 }
13118#line 13119 "parse.c"
13119 break;
13120
13121 case 142: /* lhs: keyword_variable */
13122#line 3777 "parse.y"
13123 {
13124 /*% ripper: var_field!($:1) %*/
13125 (yyval.node) = assignable(p, (yyvsp[0].id), 0, &(yyloc));
13126 }
13127#line 13128 "parse.c"
13128 break;
13129
13130 case 143: /* lhs: primary_value '[' opt_call_args rbracket */
13131#line 3782 "parse.y"
13132 {
13133 (yyval.node) = aryset(p, (yyvsp[-3].node), (yyvsp[-1].node), &(yyloc));
13134 /*% ripper: aref_field!($:1, $:3) %*/
13135 }
13136#line 13137 "parse.c"
13137 break;
13138
13139 case 144: /* lhs: primary_value call_op "local variable or method" */
13140#line 3787 "parse.y"
13141 {
13142 (yyval.node) = attrset(p, (yyvsp[-2].node), (yyvsp[-1].id), (yyvsp[0].id), &(yyloc));
13143 /*% ripper: field!($:1, $:2, $:3) %*/
13144 }
13145#line 13146 "parse.c"
13146 break;
13147
13148 case 145: /* lhs: primary_value call_op "constant" */
13149#line 3787 "parse.y"
13150 {
13151 (yyval.node) = attrset(p, (yyvsp[-2].node), (yyvsp[-1].id), (yyvsp[0].id), &(yyloc));
13152 /*% ripper: field!($:1, $:2, $:3) %*/
13153 }
13154#line 13155 "parse.c"
13155 break;
13156
13157 case 146: /* lhs: primary_value "::" "local variable or method" */
13158#line 3792 "parse.y"
13159 {
13160 (yyval.node) = attrset(p, (yyvsp[-2].node), idCOLON2, (yyvsp[0].id), &(yyloc));
13161 /*% ripper: field!($:1, $:2, $:3) %*/
13162 }
13163#line 13164 "parse.c"
13164 break;
13165
13166 case 147: /* lhs: primary_value "::" "constant" */
13167#line 3797 "parse.y"
13168 {
13169 /*% ripper: const_path_field!($:1, $:3) %*/
13170 (yyval.node) = const_decl(p, NEW_COLON2((yyvsp[-2].node), (yyvsp[0].id), &(yyloc), &(yylsp[-1]), &(yylsp[0])), &(yyloc));
13171 }
13172#line 13173 "parse.c"
13173 break;
13174
13175 case 148: /* lhs: ":: at EXPR_BEG" "constant" */
13176#line 3802 "parse.y"
13177 {
13178 /*% ripper: top_const_field!($:2) %*/
13179 (yyval.node) = const_decl(p, NEW_COLON3((yyvsp[0].id), &(yyloc), &(yylsp[-1]), &(yylsp[0])), &(yyloc));
13180 }
13181#line 13182 "parse.c"
13182 break;
13183
13184 case 149: /* lhs: backref */
13185#line 3807 "parse.y"
13186 {
13187 VALUE MAYBE_UNUSED(e) = rb_backref_error(p, (yyvsp[0].node));
13188 (yyval.node) = NEW_ERROR(&(yyloc));
13189 /*% ripper[error]: assign_error!(?e, var_field!($:1)) %*/
13190 }
13191#line 13192 "parse.c"
13192 break;
13193
13194 case 150: /* cname: "local variable or method" */
13195#line 3815 "parse.y"
13196 {
13197 static const char mesg[] = "class/module name must be CONSTANT";
13198 /*%%%*/
13199 yyerror1(&(yylsp[0]), mesg);
13200 /*% %*/
13201 /*% ripper[error]: class_name_error!(ERR_MESG(), $:1) %*/
13202 }
13203#line 13204 "parse.c"
13204 break;
13205
13206 case 152: /* cpath: ":: at EXPR_BEG" cname */
13207#line 3826 "parse.y"
13208 {
13209 (yyval.node) = NEW_COLON3((yyvsp[0].id), &(yyloc), &(yylsp[-1]), &(yylsp[0]));
13210 /*% ripper: top_const_ref!($:2) %*/
13211 }
13212#line 13213 "parse.c"
13213 break;
13214
13215 case 153: /* cpath: cname */
13216#line 3831 "parse.y"
13217 {
13218 (yyval.node) = NEW_COLON2(0, (yyvsp[0].id), &(yyloc), &NULL_LOC, &(yylsp[0]));
13219 /*% ripper: const_ref!($:1) %*/
13220 }
13221#line 13222 "parse.c"
13222 break;
13223
13224 case 154: /* cpath: primary_value "::" cname */
13225#line 3836 "parse.y"
13226 {
13227 (yyval.node) = NEW_COLON2((yyvsp[-2].node), (yyvsp[0].id), &(yyloc), &(yylsp[-1]), &(yylsp[0]));
13228 /*% ripper: const_path_ref!($:1, $:3) %*/
13229 }
13230#line 13231 "parse.c"
13231 break;
13232
13233 case 158: /* fname: op */
13234#line 3844 "parse.y"
13235 {
13236 SET_LEX_STATE(EXPR_ENDFN);
13237 (yyval.id) = (yyvsp[0].id);
13238 }
13239#line 13240 "parse.c"
13240 break;
13241
13242 case 160: /* fitem: fname */
13243#line 3852 "parse.y"
13244 {
13245 (yyval.node) = NEW_SYM(rb_id2str((yyvsp[0].id)), &(yyloc));
13246 /*% ripper: symbol_literal!($:1) %*/
13247 }
13248#line 13249 "parse.c"
13249 break;
13250
13251 case 162: /* undef_list: fitem */
13252#line 3860 "parse.y"
13253 {
13254 (yyval.node) = NEW_UNDEF((yyvsp[0].node), &(yyloc));
13255 /*% ripper: rb_ary_new3(1, $:1) %*/
13256 }
13257#line 13258 "parse.c"
13258 break;
13259
13260 case 163: /* $@12: %empty */
13261#line 3864 "parse.y"
13262 {SET_LEX_STATE(EXPR_FNAME|EXPR_FITEM);}
13263#line 13264 "parse.c"
13264 break;
13265
13266 case 164: /* undef_list: undef_list ',' $@12 fitem */
13267#line 3865 "parse.y"
13268 {
13269 nd_set_last_loc((yyvsp[-3].node), (yylsp[0]).end_pos);
13270 rb_parser_ary_push_node(p, RNODE_UNDEF((yyvsp[-3].node))->nd_undefs, (yyvsp[0].node));
13271 /*% ripper: rb_ary_push($:1, $:4) %*/
13272 }
13273#line 13274 "parse.c"
13274 break;
13275
13276 case 165: /* op: '|' */
13277#line 3872 "parse.y"
13278 { (yyval.id) = '|'; }
13279#line 13280 "parse.c"
13280 break;
13281
13282 case 166: /* op: '^' */
13283#line 3873 "parse.y"
13284 { (yyval.id) = '^'; }
13285#line 13286 "parse.c"
13286 break;
13287
13288 case 167: /* op: '&' */
13289#line 3874 "parse.y"
13290 { (yyval.id) = '&'; }
13291#line 13292 "parse.c"
13292 break;
13293
13294 case 168: /* op: "<=>" */
13295#line 3875 "parse.y"
13296 { (yyval.id) = tCMP; }
13297#line 13298 "parse.c"
13298 break;
13299
13300 case 169: /* op: "==" */
13301#line 3876 "parse.y"
13302 { (yyval.id) = tEQ; }
13303#line 13304 "parse.c"
13304 break;
13305
13306 case 170: /* op: "===" */
13307#line 3877 "parse.y"
13308 { (yyval.id) = tEQQ; }
13309#line 13310 "parse.c"
13310 break;
13311
13312 case 171: /* op: "=~" */
13313#line 3878 "parse.y"
13314 { (yyval.id) = tMATCH; }
13315#line 13316 "parse.c"
13316 break;
13317
13318 case 172: /* op: "!~" */
13319#line 3879 "parse.y"
13320 { (yyval.id) = tNMATCH; }
13321#line 13322 "parse.c"
13322 break;
13323
13324 case 173: /* op: '>' */
13325#line 3880 "parse.y"
13326 { (yyval.id) = '>'; }
13327#line 13328 "parse.c"
13328 break;
13329
13330 case 174: /* op: ">=" */
13331#line 3881 "parse.y"
13332 { (yyval.id) = tGEQ; }
13333#line 13334 "parse.c"
13334 break;
13335
13336 case 175: /* op: '<' */
13337#line 3882 "parse.y"
13338 { (yyval.id) = '<'; }
13339#line 13340 "parse.c"
13340 break;
13341
13342 case 176: /* op: "<=" */
13343#line 3883 "parse.y"
13344 { (yyval.id) = tLEQ; }
13345#line 13346 "parse.c"
13346 break;
13347
13348 case 177: /* op: "!=" */
13349#line 3884 "parse.y"
13350 { (yyval.id) = tNEQ; }
13351#line 13352 "parse.c"
13352 break;
13353
13354 case 178: /* op: "<<" */
13355#line 3885 "parse.y"
13356 { (yyval.id) = tLSHFT; }
13357#line 13358 "parse.c"
13358 break;
13359
13360 case 179: /* op: ">>" */
13361#line 3886 "parse.y"
13362 { (yyval.id) = tRSHFT; }
13363#line 13364 "parse.c"
13364 break;
13365
13366 case 180: /* op: '+' */
13367#line 3887 "parse.y"
13368 { (yyval.id) = '+'; }
13369#line 13370 "parse.c"
13370 break;
13371
13372 case 181: /* op: '-' */
13373#line 3888 "parse.y"
13374 { (yyval.id) = '-'; }
13375#line 13376 "parse.c"
13376 break;
13377
13378 case 182: /* op: '*' */
13379#line 3889 "parse.y"
13380 { (yyval.id) = '*'; }
13381#line 13382 "parse.c"
13382 break;
13383
13384 case 183: /* op: "*" */
13385#line 3890 "parse.y"
13386 { (yyval.id) = '*'; }
13387#line 13388 "parse.c"
13388 break;
13389
13390 case 184: /* op: '/' */
13391#line 3891 "parse.y"
13392 { (yyval.id) = '/'; }
13393#line 13394 "parse.c"
13394 break;
13395
13396 case 185: /* op: '%' */
13397#line 3892 "parse.y"
13398 { (yyval.id) = '%'; }
13399#line 13400 "parse.c"
13400 break;
13401
13402 case 186: /* op: "**" */
13403#line 3893 "parse.y"
13404 { (yyval.id) = tPOW; }
13405#line 13406 "parse.c"
13406 break;
13407
13408 case 187: /* op: "**arg" */
13409#line 3894 "parse.y"
13410 { (yyval.id) = tDSTAR; }
13411#line 13412 "parse.c"
13412 break;
13413
13414 case 188: /* op: '!' */
13415#line 3895 "parse.y"
13416 { (yyval.id) = '!'; }
13417#line 13418 "parse.c"
13418 break;
13419
13420 case 189: /* op: '~' */
13421#line 3896 "parse.y"
13422 { (yyval.id) = '~'; }
13423#line 13424 "parse.c"
13424 break;
13425
13426 case 190: /* op: "unary+" */
13427#line 3897 "parse.y"
13428 { (yyval.id) = tUPLUS; }
13429#line 13430 "parse.c"
13430 break;
13431
13432 case 191: /* op: "unary-" */
13433#line 3898 "parse.y"
13434 { (yyval.id) = tUMINUS; }
13435#line 13436 "parse.c"
13436 break;
13437
13438 case 192: /* op: "[]" */
13439#line 3899 "parse.y"
13440 { (yyval.id) = tAREF; }
13441#line 13442 "parse.c"
13442 break;
13443
13444 case 193: /* op: "[]=" */
13445#line 3900 "parse.y"
13446 { (yyval.id) = tASET; }
13447#line 13448 "parse.c"
13448 break;
13449
13450 case 194: /* op: '`' */
13451#line 3901 "parse.y"
13452 { (yyval.id) = '`'; }
13453#line 13454 "parse.c"
13454 break;
13455
13456 case 236: /* asgn_arg_rhs: lhs '=' lex_ctxt arg_rhs */
13457#line 2919 "parse.y"
13458 {
13459 (yyval.node) = node_assign(p, (NODE *)(yyvsp[-3].node), (yyvsp[0].node), (yyvsp[-1].ctxt), &(yyloc));
13460 /*% ripper: assign!($:1, $:4) %*/
13461 }
13462#line 13463 "parse.c"
13463 break;
13464
13465 case 238: /* op_asgn_arg_rhs: var_lhs "operator-assignment" lex_ctxt arg_rhs */
13466#line 3044 "parse.y"
13467 {
13468 (yyval.node) = new_op_assign(p, (yyvsp[-3].node), (yyvsp[-2].id), (yyvsp[0].node), (yyvsp[-1].ctxt), &(yyloc));
13469 /*% ripper: opassign!($:1, $:2, $:4) %*/
13470 }
13471#line 13472 "parse.c"
13472 break;
13473
13474 case 239: /* op_asgn_arg_rhs: primary_value '[' opt_call_args rbracket "operator-assignment" lex_ctxt arg_rhs */
13475#line 3049 "parse.y"
13476 {
13477 (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]));
13478 /*% ripper: opassign!(aref_field!($:1, $:3), $:5, $:7) %*/
13479 }
13480#line 13481 "parse.c"
13481 break;
13482
13483 case 240: /* op_asgn_arg_rhs: primary_value call_op "local variable or method" "operator-assignment" lex_ctxt arg_rhs */
13484#line 3054 "parse.y"
13485 {
13486 (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]));
13487 /*% ripper: opassign!(field!($:1, $:2, $:3), $:4, $:6) %*/
13488 }
13489#line 13490 "parse.c"
13490 break;
13491
13492 case 241: /* op_asgn_arg_rhs: primary_value call_op "constant" "operator-assignment" lex_ctxt arg_rhs */
13493#line 3059 "parse.y"
13494 {
13495 (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]));
13496 /*% ripper: opassign!(field!($:1, $:2, $:3), $:4, $:6) %*/
13497 }
13498#line 13499 "parse.c"
13499 break;
13500
13501 case 242: /* op_asgn_arg_rhs: primary_value "::" "local variable or method" "operator-assignment" lex_ctxt arg_rhs */
13502#line 3064 "parse.y"
13503 {
13504 (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]));
13505 /*% ripper: opassign!(field!($:1, $:2, $:3), $:4, $:6) %*/
13506 }
13507#line 13508 "parse.c"
13508 break;
13509
13510 case 243: /* op_asgn_arg_rhs: primary_value "::" "constant" "operator-assignment" lex_ctxt arg_rhs */
13511#line 3069 "parse.y"
13512 {
13513 YYLTYPE loc = code_loc_gen(&(yylsp[-5]), &(yylsp[-3]));
13514 (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));
13515 /*% ripper: opassign!(const_path_field!($:1, $:3), $:4, $:6) %*/
13516 }
13517#line 13518 "parse.c"
13518 break;
13519
13520 case 244: /* op_asgn_arg_rhs: ":: at EXPR_BEG" "constant" "operator-assignment" lex_ctxt arg_rhs */
13521#line 3075 "parse.y"
13522 {
13523 YYLTYPE loc = code_loc_gen(&(yylsp[-4]), &(yylsp[-3]));
13524 (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));
13525 /*% ripper: opassign!(top_const_field!($:2), $:3, $:5) %*/
13526 }
13527#line 13528 "parse.c"
13528 break;
13529
13530 case 245: /* op_asgn_arg_rhs: backref "operator-assignment" lex_ctxt arg_rhs */
13531#line 3081 "parse.y"
13532 {
13533 VALUE MAYBE_UNUSED(e) = rb_backref_error(p, (yyvsp[-3].node));
13534 (yyval.node) = NEW_ERROR(&(yyloc));
13535 /*% ripper[error]: assign_error!(?e, opassign!(var_field!($:1), $:2, $:4)) %*/
13536 }
13537#line 13538 "parse.c"
13538 break;
13539
13540 case 247: /* range_expr_arg: arg ".." arg */
13541#line 3103 "parse.y"
13542 {
13543 value_expr((yyvsp[-2].node));
13544 value_expr((yyvsp[0].node));
13545 (yyval.node) = NEW_DOT2((yyvsp[-2].node), (yyvsp[0].node), &(yyloc), &(yylsp[-1]));
13546 /*% ripper: dot2!($:1, $:3) %*/
13547 }
13548#line 13549 "parse.c"
13549 break;
13550
13551 case 248: /* range_expr_arg: arg "..." arg */
13552#line 3110 "parse.y"
13553 {
13554 value_expr((yyvsp[-2].node));
13555 value_expr((yyvsp[0].node));
13556 (yyval.node) = NEW_DOT3((yyvsp[-2].node), (yyvsp[0].node), &(yyloc), &(yylsp[-1]));
13557 /*% ripper: dot3!($:1, $:3) %*/
13558 }
13559#line 13560 "parse.c"
13560 break;
13561
13562 case 249: /* range_expr_arg: arg ".." */
13563#line 3117 "parse.y"
13564 {
13565 value_expr((yyvsp[-1].node));
13566 (yyval.node) = NEW_DOT2((yyvsp[-1].node), new_nil_at(p, &(yylsp[0]).end_pos), &(yyloc), &(yylsp[0]));
13567 /*% ripper: dot2!($:1, Qnil) %*/
13568 }
13569#line 13570 "parse.c"
13570 break;
13571
13572 case 250: /* range_expr_arg: arg "..." */
13573#line 3123 "parse.y"
13574 {
13575 value_expr((yyvsp[-1].node));
13576 (yyval.node) = NEW_DOT3((yyvsp[-1].node), new_nil_at(p, &(yylsp[0]).end_pos), &(yyloc), &(yylsp[0]));
13577 /*% ripper: dot3!($:1, Qnil) %*/
13578 }
13579#line 13580 "parse.c"
13580 break;
13581
13582 case 251: /* range_expr_arg: "(.." arg */
13583#line 3129 "parse.y"
13584 {
13585 value_expr((yyvsp[0].node));
13586 (yyval.node) = NEW_DOT2(new_nil_at(p, &(yylsp[-1]).beg_pos), (yyvsp[0].node), &(yyloc), &(yylsp[-1]));
13587 /*% ripper: dot2!(Qnil, $:2) %*/
13588 }
13589#line 13590 "parse.c"
13590 break;
13591
13592 case 252: /* range_expr_arg: "(..." arg */
13593#line 3135 "parse.y"
13594 {
13595 value_expr((yyvsp[0].node));
13596 (yyval.node) = NEW_DOT3(new_nil_at(p, &(yylsp[-1]).beg_pos), (yyvsp[0].node), &(yyloc), &(yylsp[-1]));
13597 /*% ripper: dot3!(Qnil, $:2) %*/
13598 }
13599#line 13600 "parse.c"
13600 break;
13601
13602 case 254: /* arg: arg '+' arg */
13603#line 3922 "parse.y"
13604 {
13605 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), '+', (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
13606 /*% ripper: binary!($:1, ID2VAL('\'+\''), $:3) %*/
13607 }
13608#line 13609 "parse.c"
13609 break;
13610
13611 case 255: /* arg: arg '-' arg */
13612#line 3927 "parse.y"
13613 {
13614 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), '-', (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
13615 /*% ripper: binary!($:1, ID2VAL('\'-\''), $:3) %*/
13616 }
13617#line 13618 "parse.c"
13618 break;
13619
13620 case 256: /* arg: arg '*' arg */
13621#line 3932 "parse.y"
13622 {
13623 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), '*', (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
13624 /*% ripper: binary!($:1, ID2VAL('\'*\''), $:3) %*/
13625 }
13626#line 13627 "parse.c"
13627 break;
13628
13629 case 257: /* arg: arg '/' arg */
13630#line 3937 "parse.y"
13631 {
13632 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), '/', (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
13633 /*% ripper: binary!($:1, ID2VAL('\'/\''), $:3) %*/
13634 }
13635#line 13636 "parse.c"
13636 break;
13637
13638 case 258: /* arg: arg '%' arg */
13639#line 3942 "parse.y"
13640 {
13641 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), '%', (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
13642 /*% ripper: binary!($:1, ID2VAL('\'%\''), $:3) %*/
13643 }
13644#line 13645 "parse.c"
13645 break;
13646
13647 case 259: /* arg: arg "**" arg */
13648#line 3947 "parse.y"
13649 {
13650 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), idPow, (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
13651 /*% ripper: binary!($:1, ID2VAL(idPow), $:3) %*/
13652 }
13653#line 13654 "parse.c"
13654 break;
13655
13656 case 260: /* arg: tUMINUS_NUM simple_numeric "**" arg */
13657#line 3952 "parse.y"
13658 {
13659 (yyval.node) = call_uni_op(p, call_bin_op(p, (yyvsp[-2].node), idPow, (yyvsp[0].node), &(yylsp[-2]), &(yyloc)), idUMinus, &(yylsp[-3]), &(yyloc));
13660 /*% ripper: unary!(ID2VAL(idUMinus), binary!($:2, ID2VAL(idPow), $:4)) %*/
13661 }
13662#line 13663 "parse.c"
13663 break;
13664
13665 case 261: /* arg: "unary+" arg */
13666#line 3957 "parse.y"
13667 {
13668 (yyval.node) = call_uni_op(p, (yyvsp[0].node), idUPlus, &(yylsp[-1]), &(yyloc));
13669 /*% ripper: unary!(ID2VAL(idUPlus), $:2) %*/
13670 }
13671#line 13672 "parse.c"
13672 break;
13673
13674 case 262: /* arg: "unary-" arg */
13675#line 3962 "parse.y"
13676 {
13677 (yyval.node) = call_uni_op(p, (yyvsp[0].node), idUMinus, &(yylsp[-1]), &(yyloc));
13678 /*% ripper: unary!(ID2VAL(idUMinus), $:2) %*/
13679 }
13680#line 13681 "parse.c"
13681 break;
13682
13683 case 263: /* arg: arg '|' arg */
13684#line 3967 "parse.y"
13685 {
13686 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), '|', (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
13687 /*% ripper: binary!($:1, ID2VAL('\'|\''), $:3) %*/
13688 }
13689#line 13690 "parse.c"
13690 break;
13691
13692 case 264: /* arg: arg '^' arg */
13693#line 3972 "parse.y"
13694 {
13695 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), '^', (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
13696 /*% ripper: binary!($:1, ID2VAL('\'^\''), $:3) %*/
13697 }
13698#line 13699 "parse.c"
13699 break;
13700
13701 case 265: /* arg: arg '&' arg */
13702#line 3977 "parse.y"
13703 {
13704 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), '&', (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
13705 /*% ripper: binary!($:1, ID2VAL('\'&\''), $:3) %*/
13706 }
13707#line 13708 "parse.c"
13708 break;
13709
13710 case 266: /* arg: arg "<=>" arg */
13711#line 3982 "parse.y"
13712 {
13713 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), idCmp, (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
13714 /*% ripper: binary!($:1, ID2VAL(idCmp), $:3) %*/
13715 }
13716#line 13717 "parse.c"
13717 break;
13718
13719 case 268: /* arg: arg "==" arg */
13720#line 3988 "parse.y"
13721 {
13722 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), idEq, (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
13723 /*% ripper: binary!($:1, ID2VAL(idEq), $:3) %*/
13724 }
13725#line 13726 "parse.c"
13726 break;
13727
13728 case 269: /* arg: arg "===" arg */
13729#line 3993 "parse.y"
13730 {
13731 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), idEqq, (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
13732 /*% ripper: binary!($:1, ID2VAL(idEqq), $:3) %*/
13733 }
13734#line 13735 "parse.c"
13735 break;
13736
13737 case 270: /* arg: arg "!=" arg */
13738#line 3998 "parse.y"
13739 {
13740 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), idNeq, (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
13741 /*% ripper: binary!($:1, ID2VAL(idNeq), $:3) %*/
13742 }
13743#line 13744 "parse.c"
13744 break;
13745
13746 case 271: /* arg: arg "=~" arg */
13747#line 4003 "parse.y"
13748 {
13749 (yyval.node) = match_op(p, (yyvsp[-2].node), (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
13750 /*% ripper: binary!($:1, ID2VAL(idEqTilde), $:3) %*/
13751 }
13752#line 13753 "parse.c"
13753 break;
13754
13755 case 272: /* arg: arg "!~" arg */
13756#line 4008 "parse.y"
13757 {
13758 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), idNeqTilde, (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
13759 /*% ripper: binary!($:1, ID2VAL(idNeqTilde), $:3) %*/
13760 }
13761#line 13762 "parse.c"
13762 break;
13763
13764 case 273: /* arg: '!' arg */
13765#line 4013 "parse.y"
13766 {
13767 (yyval.node) = call_uni_op(p, method_cond(p, (yyvsp[0].node), &(yylsp[0])), '!', &(yylsp[-1]), &(yyloc));
13768 /*% ripper: unary!(ID2VAL('\'!\''), $:2) %*/
13769 }
13770#line 13771 "parse.c"
13771 break;
13772
13773 case 274: /* arg: '~' arg */
13774#line 4018 "parse.y"
13775 {
13776 (yyval.node) = call_uni_op(p, (yyvsp[0].node), '~', &(yylsp[-1]), &(yyloc));
13777 /*% ripper: unary!(ID2VAL('\'~\''), $:2) %*/
13778 }
13779#line 13780 "parse.c"
13780 break;
13781
13782 case 275: /* arg: arg "<<" arg */
13783#line 4023 "parse.y"
13784 {
13785 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), idLTLT, (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
13786 /*% ripper: binary!($:1, ID2VAL(idLTLT), $:3) %*/
13787 }
13788#line 13789 "parse.c"
13789 break;
13790
13791 case 276: /* arg: arg ">>" arg */
13792#line 4028 "parse.y"
13793 {
13794 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), idGTGT, (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
13795 /*% ripper: binary!($:1, ID2VAL(idGTGT), $:3) %*/
13796 }
13797#line 13798 "parse.c"
13798 break;
13799
13800 case 277: /* arg: arg "&&" arg */
13801#line 4033 "parse.y"
13802 {
13803 (yyval.node) = logop(p, idANDOP, (yyvsp[-2].node), (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
13804 /*% ripper: binary!($:1, ID2VAL(idANDOP), $:3) %*/
13805 }
13806#line 13807 "parse.c"
13807 break;
13808
13809 case 278: /* arg: arg "||" arg */
13810#line 4038 "parse.y"
13811 {
13812 (yyval.node) = logop(p, idOROP, (yyvsp[-2].node), (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
13813 /*% ripper: binary!($:1, ID2VAL(idOROP), $:3) %*/
13814 }
13815#line 13816 "parse.c"
13816 break;
13817
13818 case 279: /* arg: "'defined?'" option_'\n' begin_defined arg */
13819#line 4043 "parse.y"
13820 {
13821 p->ctxt.in_defined = (yyvsp[-1].ctxt).in_defined;
13822 (yyval.node) = new_defined(p, (yyvsp[0].node), &(yyloc), &(yylsp[-3]));
13823 p->ctxt.has_trailing_semicolon = (yyvsp[-1].ctxt).has_trailing_semicolon;
13824 /*% ripper: defined!($:4) %*/
13825 }
13826#line 13827 "parse.c"
13827 break;
13828
13829 case 280: /* def_endless_method_endless_arg: defn_head f_opt_paren_args '=' endless_arg */
13830#line 2949 "parse.y"
13831 {
13832 endless_method_name(p, (yyvsp[-3].node_def_temp)->nd_mid, &(yylsp[-3]));
13833 restore_defun(p, (yyvsp[-3].node_def_temp));
13834 ((yyval.node) = (yyvsp[-3].node_def_temp)->nd_def)->nd_loc = (yyloc);
13835 (yyvsp[0].node) = new_scope_body(p, (yyvsp[-2].node_args), (yyvsp[0].node), (yyval.node), &(yyloc));
13836 RNODE_DEFN((yyval.node))->nd_defn = (yyvsp[0].node);
13837 /*% ripper: bodystmt!($:bodystmt, Qnil, Qnil, Qnil) %*/
13838 /*% ripper: def!($:head, $:args, $:$) %*/
13839 local_pop(p);
13840 }
13841#line 13842 "parse.c"
13842 break;
13843
13844 case 281: /* def_endless_method_endless_arg: defs_head f_opt_paren_args '=' endless_arg */
13845#line 2960 "parse.y"
13846 {
13847 endless_method_name(p, (yyvsp[-3].node_def_temp)->nd_mid, &(yylsp[-3]));
13848 restore_defun(p, (yyvsp[-3].node_def_temp));
13849 ((yyval.node) = (yyvsp[-3].node_def_temp)->nd_def)->nd_loc = (yyloc);
13850 (yyvsp[0].node) = new_scope_body(p, (yyvsp[-2].node_args), (yyvsp[0].node), (yyval.node), &(yyloc));
13851 RNODE_DEFS((yyval.node))->nd_defn = (yyvsp[0].node);
13852 /*% ripper: bodystmt!($:bodystmt, Qnil, Qnil, Qnil) %*/
13853 /*% ripper: defs!(*$:head[0..2], $:args, $:$) %*/
13854 local_pop(p);
13855 }
13856#line 13857 "parse.c"
13857 break;
13858
13859 case 285: /* ternary: arg '?' arg option_'\n' ':' arg */
13860#line 4055 "parse.y"
13861 {
13862 value_expr((yyvsp[-5].node));
13863 (yyval.node) = new_if(p, (yyvsp[-5].node), (yyvsp[-3].node), (yyvsp[0].node), &(yyloc), &NULL_LOC, &(yylsp[-1]), &NULL_LOC);
13864 fixpos((yyval.node), (yyvsp[-5].node));
13865 /*% ripper: ifop!($:1, $:3, $:6) %*/
13866 }
13867#line 13868 "parse.c"
13868 break;
13869
13870 case 287: /* endless_arg: endless_arg "'rescue' modifier" after_rescue arg */
13871#line 4065 "parse.y"
13872 {
13873 p->ctxt.in_rescue = (yyvsp[-1].ctxt).in_rescue;
13874 (yyval.node) = rescued_expr(p, (yyvsp[-3].node), (yyvsp[0].node), &(yylsp[-3]), &(yylsp[-2]), &(yylsp[0]));
13875 /*% ripper: rescue_mod!($:1, $:4) %*/
13876 }
13877#line 13878 "parse.c"
13878 break;
13879
13880 case 288: /* endless_arg: "'not'" option_'\n' endless_arg */
13881#line 4071 "parse.y"
13882 {
13883 (yyval.node) = call_uni_op(p, method_cond(p, (yyvsp[0].node), &(yylsp[0])), METHOD_NOT, &(yylsp[-2]), &(yyloc));
13884 /*% ripper: unary!(ID2VAL(idNOT), $:3) %*/
13885 }
13886#line 13887 "parse.c"
13887 break;
13888
13889 case 289: /* relop: '>' */
13890#line 4077 "parse.y"
13891 {(yyval.id) = '>';}
13892#line 13893 "parse.c"
13893 break;
13894
13895 case 290: /* relop: '<' */
13896#line 4078 "parse.y"
13897 {(yyval.id) = '<';}
13898#line 13899 "parse.c"
13899 break;
13900
13901 case 291: /* relop: ">=" */
13902#line 4079 "parse.y"
13903 {(yyval.id) = idGE;}
13904#line 13905 "parse.c"
13905 break;
13906
13907 case 292: /* relop: "<=" */
13908#line 4080 "parse.y"
13909 {(yyval.id) = idLE;}
13910#line 13911 "parse.c"
13911 break;
13912
13913 case 293: /* rel_expr: arg relop arg */
13914#line 4084 "parse.y"
13915 {
13916 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), (yyvsp[-1].id), (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
13917 /*% ripper: binary!($:1, ID2VAL($2), $:3) %*/
13918 }
13919#line 13920 "parse.c"
13920 break;
13921
13922 case 294: /* rel_expr: rel_expr relop arg */
13923#line 4089 "parse.y"
13924 {
13925 rb_warning1("comparison '%s' after comparison", WARN_ID((yyvsp[-1].id)));
13926 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), (yyvsp[-1].id), (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
13927 /*% ripper: binary!($:1, ID2VAL($2), $:3) %*/
13928 }
13929#line 13930 "parse.c"
13930 break;
13931
13932 case 295: /* lex_ctxt: none */
13933#line 4097 "parse.y"
13934 {
13935 (yyval.ctxt) = p->ctxt;
13936 }
13937#line 13938 "parse.c"
13938 break;
13939
13940 case 296: /* begin_defined: lex_ctxt */
13941#line 4103 "parse.y"
13942 {
13943 p->ctxt.in_defined = 1;
13944 (yyval.ctxt) = (yyvsp[0].ctxt);
13945 }
13946#line 13947 "parse.c"
13947 break;
13948
13949 case 297: /* after_rescue: lex_ctxt */
13950#line 4110 "parse.y"
13951 {
13952 p->ctxt.in_rescue = after_rescue;
13953 (yyval.ctxt) = (yyvsp[0].ctxt);
13954 }
13955#line 13956 "parse.c"
13956 break;
13957
13958 case 298: /* value_expr_arg: arg */
13959#line 3144 "parse.y"
13960 {
13961 value_expr((yyvsp[0].node));
13962 (yyval.node) = (yyvsp[0].node);
13963 }
13964#line 13965 "parse.c"
13965 break;
13966
13967 case 302: /* aref_args: args ',' assocs trailer */
13968#line 4122 "parse.y"
13969 {
13970 (yyval.node) = (yyvsp[-1].node) ? arg_append(p, (yyvsp[-3].node), new_hash(p, (yyvsp[-1].node), &(yylsp[-1])), &(yyloc)) : (yyvsp[-3].node);
13971 /*% ripper: args_add!($:1, bare_assoc_hash!($:3)) %*/
13972 }
13973#line 13974 "parse.c"
13974 break;
13975
13976 case 303: /* aref_args: assocs trailer */
13977#line 4127 "parse.y"
13978 {
13979 (yyval.node) = (yyvsp[-1].node) ? NEW_LIST(new_hash(p, (yyvsp[-1].node), &(yylsp[-1])), &(yyloc)) : 0;
13980 /*% ripper: args_add!(args_new!, bare_assoc_hash!($:1)) %*/
13981 }
13982#line 13983 "parse.c"
13983 break;
13984
13985 case 304: /* arg_rhs: arg */
13986#line 4134 "parse.y"
13987 {
13988 value_expr((yyvsp[0].node));
13989 (yyval.node) = (yyvsp[0].node);
13990 }
13991#line 13992 "parse.c"
13992 break;
13993
13994 case 305: /* arg_rhs: arg "'rescue' modifier" after_rescue arg */
13995#line 4139 "parse.y"
13996 {
13997 p->ctxt.in_rescue = (yyvsp[-1].ctxt).in_rescue;
13998 value_expr((yyvsp[-3].node));
13999 (yyval.node) = rescued_expr(p, (yyvsp[-3].node), (yyvsp[0].node), &(yylsp[-3]), &(yylsp[-2]), &(yylsp[0]));
14000 /*% ripper: rescue_mod!($:1, $:4) %*/
14001 }
14002#line 14003 "parse.c"
14003 break;
14004
14005 case 306: /* paren_args: '(' opt_call_args rparen */
14006#line 4148 "parse.y"
14007 {
14008 (yyval.node) = (yyvsp[-1].node);
14009 /*% ripper: arg_paren!($:2) %*/
14010 }
14011#line 14012 "parse.c"
14012 break;
14013
14014 case 307: /* paren_args: '(' args ',' args_forward rparen */
14015#line 4153 "parse.y"
14016 {
14017 if (!check_forwarding_args(p)) {
14018 (yyval.node) = 0;
14019 }
14020 else {
14021 (yyval.node) = new_args_forward_call(p, (yyvsp[-3].node), &(yylsp[-1]), &(yyloc));
14022 /*% ripper: arg_paren!(args_add!($:2, $:4)) %*/
14023 }
14024 }
14025#line 14026 "parse.c"
14026 break;
14027
14028 case 308: /* paren_args: '(' args_forward rparen */
14029#line 4163 "parse.y"
14030 {
14031 if (!check_forwarding_args(p)) {
14032 (yyval.node) = 0;
14033 }
14034 else {
14035 (yyval.node) = new_args_forward_call(p, 0, &(yylsp[-1]), &(yyloc));
14036 /*% ripper: arg_paren!($:2) %*/
14037 }
14038 }
14039#line 14040 "parse.c"
14040 break;
14041
14042 case 310: /* opt_paren_args: paren_args */
14043#line 4176 "parse.y"
14044 {
14045 (yyval.node) = (yyvsp[0].node) ? (yyvsp[0].node) : NODE_SPECIAL_EMPTY_ARGS;
14046 }
14047#line 14048 "parse.c"
14048 break;
14049
14050 case 314: /* opt_call_args: args ',' assocs ',' */
14051#line 4185 "parse.y"
14052 {
14053 (yyval.node) = (yyvsp[-1].node) ? arg_append(p, (yyvsp[-3].node), new_hash(p, (yyvsp[-1].node), &(yylsp[-1])), &(yyloc)) : (yyvsp[-3].node);
14054 /*% ripper: args_add!($:1, bare_assoc_hash!($:3)) %*/
14055 }
14056#line 14057 "parse.c"
14057 break;
14058
14059 case 315: /* opt_call_args: assocs ',' */
14060#line 4190 "parse.y"
14061 {
14062 (yyval.node) = (yyvsp[-1].node) ? NEW_LIST(new_hash(p, (yyvsp[-1].node), &(yylsp[-1])), &(yylsp[-1])) : 0;
14063 /*% ripper: args_add!(args_new!, bare_assoc_hash!($:1)) %*/
14064 }
14065#line 14066 "parse.c"
14066 break;
14067
14068 case 316: /* value_expr_command: command */
14069#line 3144 "parse.y"
14070 {
14071 value_expr((yyvsp[0].node));
14072 (yyval.node) = (yyvsp[0].node);
14073 }
14074#line 14075 "parse.c"
14075 break;
14076
14077 case 317: /* call_args: value_expr_command */
14078#line 4197 "parse.y"
14079 {
14080 (yyval.node) = NEW_LIST((yyvsp[0].node), &(yyloc));
14081 /*% ripper: args_add!(args_new!, $:1) %*/
14082 }
14083#line 14084 "parse.c"
14084 break;
14085
14086 case 318: /* call_args: def_endless_method_endless_command */
14087#line 4202 "parse.y"
14088 {
14089 (yyval.node) = NEW_LIST((yyvsp[0].node), &(yyloc));
14090 /*% ripper: args_add!(args_new!, $:1) %*/
14091 }
14092#line 14093 "parse.c"
14093 break;
14094
14095 case 319: /* call_args: args opt_block_arg */
14096#line 4207 "parse.y"
14097 {
14098 (yyval.node) = arg_blk_pass((yyvsp[-1].node), (yyvsp[0].node_block_pass));
14099 /*% ripper: args_add_block!($:1, $:2) %*/
14100 }
14101#line 14102 "parse.c"
14102 break;
14103
14104 case 320: /* call_args: assocs opt_block_arg */
14105#line 4212 "parse.y"
14106 {
14107 (yyval.node) = (yyvsp[-1].node) ? NEW_LIST(new_hash(p, (yyvsp[-1].node), &(yylsp[-1])), &(yylsp[-1])) : 0;
14108 (yyval.node) = arg_blk_pass((yyval.node), (yyvsp[0].node_block_pass));
14109 /*% ripper: args_add_block!(args_add!(args_new!, bare_assoc_hash!($:1)), $:2) %*/
14110 }
14111#line 14112 "parse.c"
14112 break;
14113
14114 case 321: /* call_args: args ',' assocs opt_block_arg */
14115#line 4218 "parse.y"
14116 {
14117 (yyval.node) = (yyvsp[-1].node) ? arg_append(p, (yyvsp[-3].node), new_hash(p, (yyvsp[-1].node), &(yylsp[-1])), &(yyloc)) : (yyvsp[-3].node);
14118 (yyval.node) = arg_blk_pass((yyval.node), (yyvsp[0].node_block_pass));
14119 /*% ripper: args_add_block!(args_add!($:1, bare_assoc_hash!($:3)), $:4) %*/
14120 }
14121#line 14122 "parse.c"
14122 break;
14123
14124 case 323: /* $@13: %empty */
14125#line 4227 "parse.y"
14126 {
14127 /* If call_args starts with a open paren '(' or '[',
14128 * look-ahead reading of the letters calls CMDARG_PUSH(0),
14129 * but the push must be done after CMDARG_PUSH(1).
14130 * So this code makes them consistent by first cancelling
14131 * the premature CMDARG_PUSH(0), doing CMDARG_PUSH(1),
14132 * and finally redoing CMDARG_PUSH(0).
14133 */
14134 int lookahead = 0;
14135 switch (yychar) {
14136 case '(': case tLPAREN: case tLPAREN_ARG: case '[': case tLBRACK:
14137 lookahead = 1;
14138 }
14139 if (lookahead) CMDARG_POP();
14140 CMDARG_PUSH(1);
14141 if (lookahead) CMDARG_PUSH(0);
14142 }
14143#line 14144 "parse.c"
14144 break;
14145
14146 case 324: /* command_args: $@13 call_args */
14147#line 4245 "parse.y"
14148 {
14149 /* call_args can be followed by tLBRACE_ARG (that does CMDARG_PUSH(0) in the lexer)
14150 * but the push must be done after CMDARG_POP() in the parser.
14151 * So this code does CMDARG_POP() to pop 0 pushed by tLBRACE_ARG,
14152 * CMDARG_POP() to pop 1 pushed by command_args,
14153 * and CMDARG_PUSH(0) to restore back the flag set by tLBRACE_ARG.
14154 */
14155 int lookahead = 0;
14156 switch (yychar) {
14157 case tLBRACE_ARG:
14158 lookahead = 1;
14159 }
14160 if (lookahead) CMDARG_POP();
14161 CMDARG_POP();
14162 if (lookahead) CMDARG_PUSH(0);
14163 (yyval.node) = (yyvsp[0].node);
14164 /*% ripper: $:2 %*/
14165 }
14166#line 14167 "parse.c"
14167 break;
14168
14169 case 325: /* block_arg: "&" arg_value */
14170#line 4266 "parse.y"
14171 {
14172 (yyval.node_block_pass) = NEW_BLOCK_PASS((yyvsp[0].node), &(yyloc), &(yylsp[-1]));
14173 /*% ripper: $:2 %*/
14174 }
14175#line 14176 "parse.c"
14176 break;
14177
14178 case 326: /* block_arg: "&" */
14179#line 4271 "parse.y"
14180 {
14181 forwarding_arg_check(p, idFWD_BLOCK, idFWD_ALL, "block");
14182 (yyval.node_block_pass) = NEW_BLOCK_PASS(NEW_LVAR(idFWD_BLOCK, &(yylsp[0])), &(yyloc), &(yylsp[0]));
14183 /*% ripper: Qnil %*/
14184 }
14185#line 14186 "parse.c"
14186 break;
14187
14188 case 327: /* opt_block_arg: ',' block_arg */
14189#line 4279 "parse.y"
14190 {
14191 (yyval.node_block_pass) = (yyvsp[0].node_block_pass);
14192 /*% ripper: $:2 %*/
14193 }
14194#line 14195 "parse.c"
14195 break;
14196
14197 case 328: /* opt_block_arg: none */
14198#line 4284 "parse.y"
14199 {
14200 (yyval.node_block_pass) = 0;
14201 /*% ripper: Qfalse %*/
14202 }
14203#line 14204 "parse.c"
14204 break;
14205
14206 case 329: /* args: arg_value */
14207#line 4292 "parse.y"
14208 {
14209 (yyval.node) = NEW_LIST((yyvsp[0].node), &(yyloc));
14210 /*% ripper: args_add!(args_new!, $:arg_value) %*/
14211 }
14212#line 14213 "parse.c"
14213 break;
14214
14215 case 330: /* args: arg_splat */
14216#line 4297 "parse.y"
14217 {
14218 (yyval.node) = (yyvsp[0].node);
14219 /*% ripper: args_add_star!(args_new!, $:arg_splat) %*/
14220 }
14221#line 14222 "parse.c"
14222 break;
14223
14224 case 331: /* args: args ',' arg_value */
14225#line 4302 "parse.y"
14226 {
14227 (yyval.node) = last_arg_append(p, (yyvsp[-2].node), (yyvsp[0].node), &(yyloc));
14228 /*% ripper: args_add!($:non_last_args, $:arg_value) %*/
14229 }
14230#line 14231 "parse.c"
14231 break;
14232
14233 case 332: /* args: args ',' arg_splat */
14234#line 4307 "parse.y"
14235 {
14236 (yyval.node) = rest_arg_append(p, (yyvsp[-2].node), RNODE_SPLAT((yyvsp[0].node))->nd_head, &(yyloc));
14237 /*% ripper: args_add_star!($:non_last_args, $:arg_splat) %*/
14238 }
14239#line 14240 "parse.c"
14240 break;
14241
14242 case 333: /* arg_splat: "*" arg_value */
14243#line 4315 "parse.y"
14244 {
14245 (yyval.node) = NEW_SPLAT((yyvsp[0].node), &(yyloc), &(yylsp[-1]));
14246 /*% ripper: $:arg_value %*/
14247 }
14248#line 14249 "parse.c"
14249 break;
14250
14251 case 334: /* arg_splat: "*" */
14252#line 4320 "parse.y"
14253 {
14254 forwarding_arg_check(p, idFWD_REST, idFWD_ALL, "rest");
14255 (yyval.node) = NEW_SPLAT(NEW_LVAR(idFWD_REST, &(yylsp[0])), &(yyloc), &(yylsp[0]));
14256 /*% ripper: Qnil %*/
14257 }
14258#line 14259 "parse.c"
14259 break;
14260
14261 case 337: /* mrhs: args ',' arg_value */
14262#line 4334 "parse.y"
14263 {
14264 (yyval.node) = last_arg_append(p, (yyvsp[-2].node), (yyvsp[0].node), &(yyloc));
14265 /*% ripper: mrhs_add!(mrhs_new_from_args!($:args), $:arg_value) %*/
14266 }
14267#line 14268 "parse.c"
14268 break;
14269
14270 case 338: /* mrhs: args ',' "*" arg_value */
14271#line 4339 "parse.y"
14272 {
14273 (yyval.node) = rest_arg_append(p, (yyvsp[-3].node), (yyvsp[0].node), &(yyloc));
14274 /*% ripper: mrhs_add_star!(mrhs_new_from_args!($:args), $:arg_value) %*/
14275 }
14276#line 14277 "parse.c"
14277 break;
14278
14279 case 339: /* mrhs: "*" arg_value */
14280#line 4344 "parse.y"
14281 {
14282 (yyval.node) = NEW_SPLAT((yyvsp[0].node), &(yyloc), &(yylsp[-1]));
14283 /*% ripper: mrhs_add_star!(mrhs_new!, $:arg_value) %*/
14284 }
14285#line 14286 "parse.c"
14286 break;
14287
14288 case 350: /* primary: "method" */
14289#line 4365 "parse.y"
14290 {
14291 (yyval.node) = (NODE *)NEW_FCALL((yyvsp[0].id), 0, &(yyloc));
14292 /*% ripper: method_add_arg!(fcall!($:1), args_new!) %*/
14293 }
14294#line 14295 "parse.c"
14295 break;
14296
14297 case 351: /* $@14: %empty */
14298#line 4370 "parse.y"
14299 {
14300 CMDARG_PUSH(0);
14301 }
14302#line 14303 "parse.c"
14303 break;
14304
14305 case 352: /* primary: k_begin $@14 bodystmt k_end */
14306#line 4375 "parse.y"
14307 {
14308 CMDARG_POP();
14309 set_line_body((yyvsp[-1].node), (yylsp[-3]).end_pos.lineno);
14310 (yyval.node) = NEW_BEGIN((yyvsp[-1].node), &(yyloc));
14311 nd_set_line((yyval.node), (yylsp[-3]).end_pos.lineno);
14312 /*% ripper: begin!($:3) %*/
14313 }
14314#line 14315 "parse.c"
14315 break;
14316
14317 case 353: /* $@15: %empty */
14318#line 4382 "parse.y"
14319 {SET_LEX_STATE(EXPR_ENDARG);}
14320#line 14321 "parse.c"
14321 break;
14322
14323 case 354: /* primary: "( arg" compstmt_stmts $@15 ')' */
14324#line 4383 "parse.y"
14325 {
14326 if (nd_type_p((yyvsp[-2].node), NODE_SELF)) RNODE_SELF((yyvsp[-2].node))->nd_state = 0;
14327 (yyval.node) = (yyvsp[-2].node);
14328 /*% ripper: paren!($:2) %*/
14329 }
14330#line 14331 "parse.c"
14331 break;
14332
14333 case 355: /* primary: "(" compstmt_stmts ')' */
14334#line 4389 "parse.y"
14335 {
14336 if (nd_type_p((yyvsp[-1].node), NODE_SELF)) RNODE_SELF((yyvsp[-1].node))->nd_state = 0;
14337 (yyval.node) = NEW_BLOCK((yyvsp[-1].node), &(yyloc));
14338 /*% ripper: paren!($:2) %*/
14339 }
14340#line 14341 "parse.c"
14341 break;
14342
14343 case 356: /* primary: primary_value "::" "constant" */
14344#line 4395 "parse.y"
14345 {
14346 (yyval.node) = NEW_COLON2((yyvsp[-2].node), (yyvsp[0].id), &(yyloc), &(yylsp[-1]), &(yylsp[0]));
14347 /*% ripper: const_path_ref!($:1, $:3) %*/
14348 }
14349#line 14350 "parse.c"
14350 break;
14351
14352 case 357: /* primary: ":: at EXPR_BEG" "constant" */
14353#line 4400 "parse.y"
14354 {
14355 (yyval.node) = NEW_COLON3((yyvsp[0].id), &(yyloc), &(yylsp[-1]), &(yylsp[0]));
14356 /*% ripper: top_const_ref!($:2) %*/
14357 }
14358#line 14359 "parse.c"
14359 break;
14360
14361 case 358: /* primary: "[" aref_args ']' */
14362#line 4405 "parse.y"
14363 {
14364 (yyval.node) = make_list((yyvsp[-1].node), &(yyloc));
14365 /*% ripper: array!($:2) %*/
14366 }
14367#line 14368 "parse.c"
14368 break;
14369
14370 case 359: /* primary: "{" assoc_list '}' */
14371#line 4410 "parse.y"
14372 {
14373 (yyval.node) = new_hash(p, (yyvsp[-1].node), &(yyloc));
14374 RNODE_HASH((yyval.node))->nd_brace = TRUE;
14375 /*% ripper: hash!($:2) %*/
14376 }
14377#line 14378 "parse.c"
14378 break;
14379
14380 case 360: /* primary: k_return */
14381#line 4416 "parse.y"
14382 {
14383 (yyval.node) = NEW_RETURN(0, &(yyloc), &(yylsp[0]));
14384 /*% ripper: return0! %*/
14385 }
14386#line 14387 "parse.c"
14387 break;
14388
14389 case 361: /* primary: k_yield '(' call_args rparen */
14390#line 4421 "parse.y"
14391 {
14392 (yyval.node) = NEW_YIELD((yyvsp[-1].node), &(yyloc), &(yylsp[-3]), &(yylsp[-2]), &(yylsp[0]));
14393 /*% ripper: yield!(paren!($:3)) %*/
14394 }
14395#line 14396 "parse.c"
14396 break;
14397
14398 case 362: /* primary: k_yield '(' rparen */
14399#line 4426 "parse.y"
14400 {
14401 (yyval.node) = NEW_YIELD(0, &(yyloc), &(yylsp[-2]), &(yylsp[-1]), &(yylsp[0]));
14402 /*% ripper: yield!(paren!(args_new!)) %*/
14403 }
14404#line 14405 "parse.c"
14405 break;
14406
14407 case 363: /* primary: k_yield */
14408#line 4431 "parse.y"
14409 {
14410 (yyval.node) = NEW_YIELD(0, &(yyloc), &(yylsp[0]), &NULL_LOC, &NULL_LOC);
14411 /*% ripper: yield0! %*/
14412 }
14413#line 14414 "parse.c"
14414 break;
14415
14416 case 364: /* primary: "'defined?'" option_'\n' '(' begin_defined expr rparen */
14417#line 4436 "parse.y"
14418 {
14419 p->ctxt.in_defined = (yyvsp[-2].ctxt).in_defined;
14420 (yyval.node) = new_defined(p, (yyvsp[-1].node), &(yyloc), &(yylsp[-5]));
14421 p->ctxt.has_trailing_semicolon = (yyvsp[-2].ctxt).has_trailing_semicolon;
14422 /*% ripper: defined!($:5) %*/
14423 }
14424#line 14425 "parse.c"
14425 break;
14426
14427 case 365: /* primary: "'not'" '(' expr rparen */
14428#line 4443 "parse.y"
14429 {
14430 (yyval.node) = call_uni_op(p, method_cond(p, (yyvsp[-1].node), &(yylsp[-1])), METHOD_NOT, &(yylsp[-3]), &(yyloc));
14431 /*% ripper: unary!(ID2VAL(idNOT), $:3) %*/
14432 }
14433#line 14434 "parse.c"
14434 break;
14435
14436 case 366: /* primary: "'not'" '(' rparen */
14437#line 4448 "parse.y"
14438 {
14439 (yyval.node) = call_uni_op(p, method_cond(p, new_nil(&(yylsp[-1])), &(yylsp[-1])), METHOD_NOT, &(yylsp[-2]), &(yyloc));
14440 /*% ripper: unary!(ID2VAL(idNOT), Qnil) %*/
14441 }
14442#line 14443 "parse.c"
14443 break;
14444
14445 case 367: /* primary: fcall brace_block */
14446#line 4453 "parse.y"
14447 {
14448 (yyval.node) = method_add_block(p, (NODE *)(yyvsp[-1].node_fcall), (yyvsp[0].node), &(yyloc));
14449 /*% ripper: method_add_block!(method_add_arg!(fcall!($:1), args_new!), $:2) %*/
14450 }
14451#line 14452 "parse.c"
14452 break;
14453
14454 case 369: /* primary: method_call brace_block */
14455#line 4459 "parse.y"
14456 {
14457 block_dup_check(p, get_nd_args(p, (yyvsp[-1].node)), (yyvsp[0].node));
14458 (yyval.node) = method_add_block(p, (yyvsp[-1].node), (yyvsp[0].node), &(yyloc));
14459 /*% ripper: method_add_block!($:1, $:2) %*/
14460 }
14461#line 14462 "parse.c"
14462 break;
14463
14464 case 371: /* primary: k_if expr_value then compstmt_stmts if_tail k_end */
14465#line 4469 "parse.y"
14466 {
14467 if ((yyvsp[-1].node) && nd_type_p((yyvsp[-1].node), NODE_IF))
14468 RNODE_IF((yyvsp[-1].node))->end_keyword_loc = (yylsp[0]);
14469
14470 (yyval.node) = new_if(p, (yyvsp[-4].node), (yyvsp[-2].node), (yyvsp[-1].node), &(yyloc), &(yylsp[-5]), &(yylsp[-3]), &(yylsp[0]));
14471 fixpos((yyval.node), (yyvsp[-4].node));
14472 /*% ripper: if!($:2, $:4, $:5) %*/
14473 }
14474#line 14475 "parse.c"
14475 break;
14476
14477 case 372: /* primary: k_unless expr_value then compstmt_stmts opt_else k_end */
14478#line 4481 "parse.y"
14479 {
14480 (yyval.node) = new_unless(p, (yyvsp[-4].node), (yyvsp[-2].node), (yyvsp[-1].node), &(yyloc), &(yylsp[-5]), &(yylsp[-3]), &(yylsp[0]));
14481 fixpos((yyval.node), (yyvsp[-4].node));
14482 /*% ripper: unless!($:2, $:4, $:5) %*/
14483 }
14484#line 14485 "parse.c"
14485 break;
14486
14487 case 373: /* primary: k_while expr_value_do compstmt_stmts k_end */
14488#line 4489 "parse.y"
14489 {
14490 restore_block_exit(p, (yyvsp[-3].node_exits));
14491 (yyval.node) = NEW_WHILE(cond(p, (yyvsp[-2].node), &(yylsp[-2])), (yyvsp[-1].node), 1, &(yyloc), &(yylsp[-3]), &(yylsp[0]));
14492 fixpos((yyval.node), (yyvsp[-2].node));
14493 /*% ripper: while!($:2, $:3) %*/
14494 }
14495#line 14496 "parse.c"
14496 break;
14497
14498 case 374: /* primary: k_until expr_value_do compstmt_stmts k_end */
14499#line 4498 "parse.y"
14500 {
14501 restore_block_exit(p, (yyvsp[-3].node_exits));
14502 (yyval.node) = NEW_UNTIL(cond(p, (yyvsp[-2].node), &(yylsp[-2])), (yyvsp[-1].node), 1, &(yyloc), &(yylsp[-3]), &(yylsp[0]));
14503 fixpos((yyval.node), (yyvsp[-2].node));
14504 /*% ripper: until!($:2, $:3) %*/
14505 }
14506#line 14507 "parse.c"
14507 break;
14508
14509 case 375: /* @16: %empty */
14510#line 4505 "parse.y"
14511 {
14512 (yyval.labels) = p->case_labels;
14513 p->case_labels = CHECK_LITERAL_WHEN;
14514 }
14515#line 14516 "parse.c"
14516 break;
14517
14518 case 376: /* primary: k_case expr_value option_terms @16 case_body k_end */
14519#line 4511 "parse.y"
14520 {
14521 if (CASE_LABELS_ENABLED_P(p->case_labels)) st_free_table(p->case_labels);
14522 p->case_labels = (yyvsp[-2].labels);
14523 (yyval.node) = NEW_CASE((yyvsp[-4].node), (yyvsp[-1].node), &(yyloc), &(yylsp[-5]), &(yylsp[0]));
14524 fixpos((yyval.node), (yyvsp[-4].node));
14525 /*% ripper: case!($:2, $:5) %*/
14526 }
14527#line 14528 "parse.c"
14528 break;
14529
14530 case 377: /* @17: %empty */
14531#line 4519 "parse.y"
14532 {
14533 (yyval.labels) = p->case_labels;
14534 p->case_labels = 0;
14535 }
14536#line 14537 "parse.c"
14537 break;
14538
14539 case 378: /* primary: k_case option_terms @17 case_body k_end */
14540#line 4525 "parse.y"
14541 {
14542 if (p->case_labels) st_free_table(p->case_labels);
14543 p->case_labels = (yyvsp[-2].labels);
14544 (yyval.node) = NEW_CASE2((yyvsp[-1].node), &(yyloc), &(yylsp[-4]), &(yylsp[0]));
14545 /*% ripper: case!(Qnil, $:4) %*/
14546 }
14547#line 14548 "parse.c"
14548 break;
14549
14550 case 379: /* primary: k_case expr_value option_terms p_case_body k_end */
14551#line 4534 "parse.y"
14552 {
14553 (yyval.node) = NEW_CASE3((yyvsp[-3].node), (yyvsp[-1].node), &(yyloc), &(yylsp[-4]), &(yylsp[0]));
14554 /*% ripper: case!($:2, $:4) %*/
14555 }
14556#line 14557 "parse.c"
14557 break;
14558
14559 case 380: /* $@18: %empty */
14560#line 4539 "parse.y"
14561 {COND_PUSH(1);}
14562#line 14563 "parse.c"
14563 break;
14564
14565 case 381: /* $@19: %empty */
14566#line 4539 "parse.y"
14567 {COND_POP();}
14568#line 14569 "parse.c"
14569 break;
14570
14571 case 382: /* primary: k_for for_var "'in'" $@18 expr_value do $@19 compstmt_stmts k_end */
14572#line 4542 "parse.y"
14573 {
14574 restore_block_exit(p, (yyvsp[-8].node_exits));
14575 /*
14576 * for a, b, c in e
14577 * #=>
14578 * e.each{|*x| a, b, c = x}
14579 *
14580 * for a in e
14581 * #=>
14582 * e.each{|x| a, = x}
14583 */
14584 ID id = internal_id(p);
14585 rb_node_args_aux_t *m = NEW_ARGS_AUX(0, 0, &NULL_LOC);
14586 rb_node_args_t *args;
14587 NODE *scope, *internal_var = NEW_DVAR(id, &(yylsp[-7]));
14588 rb_ast_id_table_t *tbl = rb_ast_new_local_table(p->ast, 1);
14589 tbl->ids[0] = id; /* internal id */
14590
14591 switch (nd_type((yyvsp[-7].node))) {
14592 case NODE_LASGN:
14593 case NODE_DASGN: /* e.each {|internal_var| a = internal_var; ... } */
14594 set_nd_value(p, (yyvsp[-7].node), internal_var);
14595 id = 0;
14596 m->nd_plen = 1;
14597 m->nd_next = (yyvsp[-7].node);
14598 break;
14599 case NODE_MASGN: /* e.each {|*internal_var| a, b, c = (internal_var.length == 1 && Array === (tmp = internal_var[0]) ? tmp : internal_var); ... } */
14600 m->nd_next = node_assign(p, (yyvsp[-7].node), NEW_FOR_MASGN(internal_var, &(yylsp[-7])), NO_LEX_CTXT, &(yylsp[-7]));
14601 break;
14602 default: /* e.each {|*internal_var| @a, B, c[1], d.attr = internal_val; ... } */
14603 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]));
14604 }
14605 /* {|*internal_id| <m> = internal_id; ... } */
14606 args = new_args(p, m, 0, id, 0, new_args_tail(p, 0, 0, 0, &(yylsp[-7])), &(yylsp[-7]));
14607 scope = NEW_SCOPE2(tbl, args, (yyvsp[-1].node), NULL, &(yyloc));
14608 YYLTYPE do_keyword_loc = (yyvsp[-3].id) == keyword_do_cond ? (yylsp[-3]) : NULL_LOC;
14609 (yyval.node) = NEW_FOR((yyvsp[-4].node), scope, &(yyloc), &(yylsp[-8]), &(yylsp[-6]), &do_keyword_loc, &(yylsp[0]));
14610 RNODE_SCOPE(scope)->nd_parent = (yyval.node);
14611 fixpos((yyval.node), (yyvsp[-7].node));
14612 /*% ripper: for!($:for_var, $:expr_value, $:compstmt) %*/
14613 }
14614#line 14615 "parse.c"
14615 break;
14616
14617 case 383: /* $@20: %empty */
14618#line 4584 "parse.y"
14619 {
14620 begin_definition("class", &(yylsp[-2]), &(yylsp[-1]));
14621 }
14622#line 14623 "parse.c"
14623 break;
14624
14625 case 384: /* primary: k_class cpath superclass $@20 bodystmt k_end */
14626#line 4589 "parse.y"
14627 {
14628 YYLTYPE inheritance_operator_loc = NULL_LOC;
14629 if ((yyvsp[-3].node)) {
14630 inheritance_operator_loc = (yylsp[-3]);
14631 inheritance_operator_loc.end_pos.column = inheritance_operator_loc.beg_pos.column + 1;
14632 }
14633 (yyval.node) = NEW_CLASS((yyvsp[-4].node), (yyvsp[-1].node), (yyvsp[-3].node), &(yyloc), &(yylsp[-5]), &inheritance_operator_loc, &(yylsp[0]));
14634 nd_set_line(RNODE_CLASS((yyval.node))->nd_body, (yylsp[0]).end_pos.lineno);
14635 set_line_body((yyvsp[-1].node), (yylsp[-3]).end_pos.lineno);
14636 nd_set_line((yyval.node), (yylsp[-3]).end_pos.lineno);
14637 /*% ripper: class!($:cpath, $:superclass, $:bodystmt) %*/
14638 local_pop(p);
14639 p->ctxt.in_class = (yyvsp[-5].ctxt).in_class;
14640 p->ctxt.cant_return = (yyvsp[-5].ctxt).cant_return;
14641 p->ctxt.shareable_constant_value = (yyvsp[-5].ctxt).shareable_constant_value;
14642 }
14643#line 14644 "parse.c"
14644 break;
14645
14646 case 385: /* $@21: %empty */
14647#line 4606 "parse.y"
14648 {
14649 begin_definition("", &(yylsp[-2]), &(yylsp[-1]));
14650 }
14651#line 14652 "parse.c"
14652 break;
14653
14654 case 386: /* primary: k_class "<<" expr_value $@21 term bodystmt k_end */
14655#line 4612 "parse.y"
14656 {
14657 (yyval.node) = NEW_SCLASS((yyvsp[-4].node), (yyvsp[-1].node), &(yyloc), &(yylsp[-6]), &(yylsp[-5]), &(yylsp[0]));
14658 nd_set_line(RNODE_SCLASS((yyval.node))->nd_body, (yylsp[0]).end_pos.lineno);
14659 set_line_body((yyvsp[-1].node), nd_line((yyvsp[-4].node)));
14660 fixpos((yyval.node), (yyvsp[-4].node));
14661 /*% ripper: sclass!($:expr_value, $:bodystmt) %*/
14662 local_pop(p);
14663 p->ctxt.in_def = (yyvsp[-6].ctxt).in_def;
14664 p->ctxt.in_class = (yyvsp[-6].ctxt).in_class;
14665 p->ctxt.cant_return = (yyvsp[-6].ctxt).cant_return;
14666 p->ctxt.shareable_constant_value = (yyvsp[-6].ctxt).shareable_constant_value;
14667 }
14668#line 14669 "parse.c"
14669 break;
14670
14671 case 387: /* $@22: %empty */
14672#line 4625 "parse.y"
14673 {
14674 begin_definition("module", &(yylsp[-1]), &(yylsp[0]));
14675 }
14676#line 14677 "parse.c"
14677 break;
14678
14679 case 388: /* primary: k_module cpath $@22 bodystmt k_end */
14680#line 4630 "parse.y"
14681 {
14682 (yyval.node) = NEW_MODULE((yyvsp[-3].node), (yyvsp[-1].node), &(yyloc), &(yylsp[-4]), &(yylsp[0]));
14683 nd_set_line(RNODE_MODULE((yyval.node))->nd_body, (yylsp[0]).end_pos.lineno);
14684 set_line_body((yyvsp[-1].node), (yylsp[-3]).end_pos.lineno);
14685 nd_set_line((yyval.node), (yylsp[-3]).end_pos.lineno);
14686 /*% ripper: module!($:cpath, $:bodystmt) %*/
14687 local_pop(p);
14688 p->ctxt.in_class = (yyvsp[-4].ctxt).in_class;
14689 p->ctxt.cant_return = (yyvsp[-4].ctxt).cant_return;
14690 p->ctxt.shareable_constant_value = (yyvsp[-4].ctxt).shareable_constant_value;
14691 }
14692#line 14693 "parse.c"
14693 break;
14694
14695 case 389: /* $@23: %empty */
14696#line 4643 "parse.y"
14697 {
14698 push_end_expect_token_locations(p, &(yylsp[-1]).beg_pos);
14699 }
14700#line 14701 "parse.c"
14701 break;
14702
14703 case 390: /* primary: defn_head f_arglist $@23 bodystmt k_end */
14704#line 4648 "parse.y"
14705 {
14706 restore_defun(p, (yyvsp[-4].node_def_temp));
14707 ((yyval.node) = (yyvsp[-4].node_def_temp)->nd_def)->nd_loc = (yyloc);
14708 (yyvsp[-1].node) = new_scope_body(p, (yyvsp[-3].node_args), (yyvsp[-1].node), (yyval.node), &(yyloc));
14709 RNODE_DEFN((yyval.node))->nd_defn = (yyvsp[-1].node);
14710 /*% ripper: def!($:head, $:args, $:bodystmt) %*/
14711 local_pop(p);
14712 }
14713#line 14714 "parse.c"
14714 break;
14715
14716 case 391: /* $@24: %empty */
14717#line 4658 "parse.y"
14718 {
14719 push_end_expect_token_locations(p, &(yylsp[-1]).beg_pos);
14720 }
14721#line 14722 "parse.c"
14722 break;
14723
14724 case 392: /* primary: defs_head f_arglist $@24 bodystmt k_end */
14725#line 4663 "parse.y"
14726 {
14727 restore_defun(p, (yyvsp[-4].node_def_temp));
14728 ((yyval.node) = (yyvsp[-4].node_def_temp)->nd_def)->nd_loc = (yyloc);
14729 (yyvsp[-1].node) = new_scope_body(p, (yyvsp[-3].node_args), (yyvsp[-1].node), (yyval.node), &(yyloc));
14730 RNODE_DEFS((yyval.node))->nd_defn = (yyvsp[-1].node);
14731 /*% ripper: defs!(*$:head[0..2], $:args, $:bodystmt) %*/
14732 local_pop(p);
14733 }
14734#line 14735 "parse.c"
14735 break;
14736
14737 case 393: /* primary: "'break'" */
14738#line 4672 "parse.y"
14739 {
14740 (yyval.node) = add_block_exit(p, NEW_BREAK(0, &(yyloc), &(yylsp[0])));
14741 /*% ripper: break!(args_new!) %*/
14742 }
14743#line 14744 "parse.c"
14744 break;
14745
14746 case 394: /* primary: "'next'" */
14747#line 4677 "parse.y"
14748 {
14749 (yyval.node) = add_block_exit(p, NEW_NEXT(0, &(yyloc), &(yylsp[0])));
14750 /*% ripper: next!(args_new!) %*/
14751 }
14752#line 14753 "parse.c"
14753 break;
14754
14755 case 395: /* primary: "'redo'" */
14756#line 4682 "parse.y"
14757 {
14758 (yyval.node) = add_block_exit(p, NEW_REDO(&(yyloc), &(yylsp[0])));
14759 /*% ripper: redo! %*/
14760 }
14761#line 14762 "parse.c"
14762 break;
14763
14764 case 396: /* primary: "'retry'" */
14765#line 4687 "parse.y"
14766 {
14767 if (!p->ctxt.in_defined) {
14768 switch (p->ctxt.in_rescue) {
14769 case before_rescue: yyerror1(&(yylsp[0]), "Invalid retry without rescue"); break;
14770 case after_rescue: /* ok */ break;
14771 case after_else: yyerror1(&(yylsp[0]), "Invalid retry after else"); break;
14772 case after_ensure: yyerror1(&(yylsp[0]), "Invalid retry after ensure"); break;
14773 }
14774 }
14775 (yyval.node) = NEW_RETRY(&(yyloc));
14776 /*% ripper: retry! %*/
14777 }
14778#line 14779 "parse.c"
14779 break;
14780
14781 case 397: /* value_expr_primary: primary */
14782#line 3144 "parse.y"
14783 {
14784 value_expr((yyvsp[0].node));
14785 (yyval.node) = (yyvsp[0].node);
14786 }
14787#line 14788 "parse.c"
14788 break;
14789
14790 case 399: /* k_begin: "'begin'" */
14791#line 4705 "parse.y"
14792 {
14793 token_info_push(p, "begin", &(yyloc));
14794 push_end_expect_token_locations(p, &(yylsp[0]).beg_pos);
14795 }
14796#line 14797 "parse.c"
14797 break;
14798
14799 case 400: /* k_if: "'if'" */
14800#line 4712 "parse.y"
14801 {
14802 WARN_EOL("if");
14803 token_info_push(p, "if", &(yyloc));
14804 if (p->token_info && p->token_info->nonspc &&
14805 p->token_info->next && !strcmp(p->token_info->next->token, "else")) {
14806 const char *tok = p->lex.ptok - rb_strlen_lit("if");
14807 const char *beg = p->lex.pbeg + p->token_info->next->beg.column;
14808 beg += rb_strlen_lit("else");
14809 while (beg < tok && ISSPACE(*beg)) beg++;
14810 if (beg == tok) {
14811 p->token_info->nonspc = 0;
14812 }
14813 }
14814 push_end_expect_token_locations(p, &(yylsp[0]).beg_pos);
14815 }
14816#line 14817 "parse.c"
14817 break;
14818
14819 case 401: /* k_unless: "'unless'" */
14820#line 4730 "parse.y"
14821 {
14822 token_info_push(p, "unless", &(yyloc));
14823 push_end_expect_token_locations(p, &(yylsp[0]).beg_pos);
14824 }
14825#line 14826 "parse.c"
14826 break;
14827
14828 case 402: /* k_while: "'while'" allow_exits */
14829#line 4737 "parse.y"
14830 {
14831 (yyval.node_exits) = (yyvsp[0].node_exits);
14832 token_info_push(p, "while", &(yyloc));
14833 push_end_expect_token_locations(p, &(yylsp[-1]).beg_pos);
14834 }
14835#line 14836 "parse.c"
14836 break;
14837
14838 case 403: /* k_until: "'until'" allow_exits */
14839#line 4745 "parse.y"
14840 {
14841 (yyval.node_exits) = (yyvsp[0].node_exits);
14842 token_info_push(p, "until", &(yyloc));
14843 push_end_expect_token_locations(p, &(yylsp[-1]).beg_pos);
14844 }
14845#line 14846 "parse.c"
14846 break;
14847
14848 case 404: /* k_case: "'case'" */
14849#line 4753 "parse.y"
14850 {
14851 token_info_push(p, "case", &(yyloc));
14852 push_end_expect_token_locations(p, &(yylsp[0]).beg_pos);
14853 }
14854#line 14855 "parse.c"
14855 break;
14856
14857 case 405: /* k_for: "'for'" allow_exits */
14858#line 4760 "parse.y"
14859 {
14860 (yyval.node_exits) = (yyvsp[0].node_exits);
14861 token_info_push(p, "for", &(yyloc));
14862 push_end_expect_token_locations(p, &(yylsp[-1]).beg_pos);
14863 }
14864#line 14865 "parse.c"
14865 break;
14866
14867 case 406: /* k_class: "'class'" */
14868#line 4768 "parse.y"
14869 {
14870 token_info_push(p, "class", &(yyloc));
14871 (yyval.ctxt) = p->ctxt;
14872 p->ctxt.in_rescue = before_rescue;
14873 push_end_expect_token_locations(p, &(yylsp[0]).beg_pos);
14874 }
14875#line 14876 "parse.c"
14876 break;
14877
14878 case 407: /* k_module: "'module'" */
14879#line 4777 "parse.y"
14880 {
14881 token_info_push(p, "module", &(yyloc));
14882 (yyval.ctxt) = p->ctxt;
14883 p->ctxt.in_rescue = before_rescue;
14884 push_end_expect_token_locations(p, &(yylsp[0]).beg_pos);
14885 }
14886#line 14887 "parse.c"
14887 break;
14888
14889 case 408: /* k_def: "'def'" */
14890#line 4786 "parse.y"
14891 {
14892 token_info_push(p, "def", &(yyloc));
14893 (yyval.node_def_temp) = NEW_DEF_TEMP(&(yyloc));
14894 p->ctxt.in_argdef = 1;
14895 }
14896#line 14897 "parse.c"
14897 break;
14898
14899 case 409: /* k_do: "'do'" */
14900#line 4794 "parse.y"
14901 {
14902 token_info_push(p, "do", &(yyloc));
14903 push_end_expect_token_locations(p, &(yylsp[0]).beg_pos);
14904 }
14905#line 14906 "parse.c"
14906 break;
14907
14908 case 410: /* k_do_block: "'do' for block" */
14909#line 4801 "parse.y"
14910 {
14911 token_info_push(p, "do", &(yyloc));
14912 push_end_expect_token_locations(p, &(yylsp[0]).beg_pos);
14913 }
14914#line 14915 "parse.c"
14915 break;
14916
14917 case 411: /* k_rescue: "'rescue'" */
14918#line 4808 "parse.y"
14919 {
14920 token_info_warn(p, "rescue", p->token_info, 1, &(yyloc));
14921 (yyval.ctxt) = p->ctxt;
14922 p->ctxt.in_rescue = after_rescue;
14923 }
14924#line 14925 "parse.c"
14925 break;
14926
14927 case 412: /* k_ensure: "'ensure'" */
14928#line 4816 "parse.y"
14929 {
14930 token_info_warn(p, "ensure", p->token_info, 1, &(yyloc));
14931 (yyval.ctxt) = p->ctxt;
14932 }
14933#line 14934 "parse.c"
14934 break;
14935
14936 case 413: /* k_when: "'when'" */
14937#line 4823 "parse.y"
14938 {
14939 token_info_warn(p, "when", p->token_info, 0, &(yyloc));
14940 }
14941#line 14942 "parse.c"
14942 break;
14943
14944 case 414: /* k_else: "'else'" */
14945#line 4829 "parse.y"
14946 {
14947 token_info *ptinfo_beg = p->token_info;
14948 int same = ptinfo_beg && strcmp(ptinfo_beg->token, "case") != 0;
14949 token_info_warn(p, "else", p->token_info, same, &(yyloc));
14950 if (same) {
14951 token_info e;
14952 e.next = ptinfo_beg->next;
14953 e.token = "else";
14954 token_info_setup(&e, p->lex.pbeg, &(yyloc));
14955 if (!e.nonspc) *ptinfo_beg = e;
14956 }
14957 }
14958#line 14959 "parse.c"
14959 break;
14960
14961 case 415: /* k_elsif: "'elsif'" */
14962#line 4844 "parse.y"
14963 {
14964 WARN_EOL("elsif");
14965 token_info_warn(p, "elsif", p->token_info, 1, &(yyloc));
14966 }
14967#line 14968 "parse.c"
14968 break;
14969
14970 case 416: /* k_end: "'end'" */
14971#line 4851 "parse.y"
14972 {
14973 token_info_pop(p, "end", &(yyloc));
14974 pop_end_expect_token_locations(p);
14975 }
14976#line 14977 "parse.c"
14977 break;
14978
14979 case 417: /* k_end: "dummy end" */
14980#line 4856 "parse.y"
14981 {
14982 compile_error(p, "syntax error, unexpected end-of-input");
14983 }
14984#line 14985 "parse.c"
14985 break;
14986
14987 case 418: /* k_return: "'return'" */
14988#line 4862 "parse.y"
14989 {
14990 if (p->ctxt.cant_return && !dyna_in_block(p))
14991 yyerror1(&(yylsp[0]), "Invalid return in class/module body");
14992 }
14993#line 14994 "parse.c"
14994 break;
14995
14996 case 419: /* k_yield: "'yield'" */
14997#line 4869 "parse.y"
14998 {
14999 if (!p->ctxt.in_defined && !p->ctxt.in_def && !compile_for_eval)
15000 yyerror1(&(yylsp[0]), "Invalid yield");
15001 }
15002#line 15003 "parse.c"
15003 break;
15004
15005 case 424: /* do: "'do' for condition" */
15006#line 4881 "parse.y"
15007 { (yyval.id) = keyword_do_cond; }
15008#line 15009 "parse.c"
15009 break;
15010
15011 case 426: /* if_tail: k_elsif expr_value then compstmt_stmts if_tail */
15012#line 4888 "parse.y"
15013 {
15014 (yyval.node) = new_if(p, (yyvsp[-3].node), (yyvsp[-1].node), (yyvsp[0].node), &(yyloc), &(yylsp[-4]), &(yylsp[-2]), &NULL_LOC);
15015 fixpos((yyval.node), (yyvsp[-3].node));
15016 /*% ripper: elsif!($:2, $:4, $:5) %*/
15017 }
15018#line 15019 "parse.c"
15019 break;
15020
15021 case 428: /* opt_else: k_else compstmt_stmts */
15022#line 4897 "parse.y"
15023 {
15024 (yyval.node) = (yyvsp[0].node);
15025 /*% ripper: else!($:2) %*/
15026 }
15027#line 15028 "parse.c"
15028 break;
15029
15030 case 431: /* f_marg: f_norm_arg */
15031#line 4908 "parse.y"
15032 {
15033 (yyval.node) = assignable(p, (yyvsp[0].id), 0, &(yyloc));
15034 mark_lvar_used(p, (yyval.node));
15035 }
15036#line 15037 "parse.c"
15037 break;
15038
15039 case 432: /* f_marg: "(" f_margs rparen */
15040#line 4913 "parse.y"
15041 {
15042 (yyval.node) = (NODE *)(yyvsp[-1].node_masgn);
15043 /*% ripper: mlhs_paren!($:2) %*/
15044 }
15045#line 15046 "parse.c"
15046 break;
15047
15048 case 433: /* mlhs_items_f_marg: f_marg */
15049#line 3031 "parse.y"
15050 {
15051 (yyval.node) = NEW_LIST((yyvsp[0].node), &(yyloc));
15052 /*% ripper: mlhs_add!(mlhs_new!, $:1) %*/
15053 }
15054#line 15055 "parse.c"
15055 break;
15056
15057 case 434: /* mlhs_items_f_marg: mlhs_items_f_marg ',' f_marg */
15058#line 3036 "parse.y"
15059 {
15060 (yyval.node) = list_append(p, (yyvsp[-2].node), (yyvsp[0].node));
15061 /*% ripper: mlhs_add!($:1, $:3) %*/
15062 }
15063#line 15064 "parse.c"
15064 break;
15065
15066 case 435: /* f_margs: mlhs_items_f_marg */
15067#line 4921 "parse.y"
15068 {
15069 (yyval.node_masgn) = NEW_MASGN((yyvsp[0].node), 0, &(yyloc));
15070 /*% ripper: $:1 %*/
15071 }
15072#line 15073 "parse.c"
15073 break;
15074
15075 case 436: /* f_margs: mlhs_items_f_marg ',' f_rest_marg */
15076#line 4926 "parse.y"
15077 {
15078 (yyval.node_masgn) = NEW_MASGN((yyvsp[-2].node), (yyvsp[0].node), &(yyloc));
15079 /*% ripper: mlhs_add_star!($:1, $:3) %*/
15080 }
15081#line 15082 "parse.c"
15082 break;
15083
15084 case 437: /* f_margs: mlhs_items_f_marg ',' f_rest_marg ',' mlhs_items_f_marg */
15085#line 4931 "parse.y"
15086 {
15087 (yyval.node_masgn) = NEW_MASGN((yyvsp[-4].node), NEW_POSTARG((yyvsp[-2].node), (yyvsp[0].node), &(yyloc)), &(yyloc));
15088 /*% ripper: mlhs_add_post!(mlhs_add_star!($:1, $:3), $:5) %*/
15089 }
15090#line 15091 "parse.c"
15091 break;
15092
15093 case 438: /* f_margs: f_rest_marg */
15094#line 4936 "parse.y"
15095 {
15096 (yyval.node_masgn) = NEW_MASGN(0, (yyvsp[0].node), &(yyloc));
15097 /*% ripper: mlhs_add_star!(mlhs_new!, $:1) %*/
15098 }
15099#line 15100 "parse.c"
15100 break;
15101
15102 case 439: /* f_margs: f_rest_marg ',' mlhs_items_f_marg */
15103#line 4941 "parse.y"
15104 {
15105 (yyval.node_masgn) = NEW_MASGN(0, NEW_POSTARG((yyvsp[-2].node), (yyvsp[0].node), &(yyloc)), &(yyloc));
15106 /*% ripper: mlhs_add_post!(mlhs_add_star!(mlhs_new!, $:1), $:3) %*/
15107 }
15108#line 15109 "parse.c"
15109 break;
15110
15111 case 440: /* f_rest_marg: "*" f_norm_arg */
15112#line 4948 "parse.y"
15113 {
15114 /*% ripper: $:2 %*/
15115 (yyval.node) = assignable(p, (yyvsp[0].id), 0, &(yyloc));
15116 mark_lvar_used(p, (yyval.node));
15117 }
15118#line 15119 "parse.c"
15119 break;
15120
15121 case 441: /* f_rest_marg: "*" */
15122#line 4954 "parse.y"
15123 {
15124 (yyval.node) = NODE_SPECIAL_NO_NAME_REST;
15125 /*% ripper: Qnil %*/
15126 }
15127#line 15128 "parse.c"
15128 break;
15129
15130 case 443: /* f_any_kwrest: f_no_kwarg */
15131#line 4962 "parse.y"
15132 {
15133 (yyval.id) = idNil;
15134 /*% ripper: ID2VAL(idNil) %*/
15135 }
15136#line 15137 "parse.c"
15137 break;
15138
15139 case 444: /* $@25: %empty */
15140#line 4968 "parse.y"
15141 {p->ctxt.in_argdef = 0;}
15142#line 15143 "parse.c"
15143 break;
15144
15145 case 446: /* f_kw_primary_value: f_label primary_value */
15146#line 3003 "parse.y"
15147 {
15148 p->ctxt.in_argdef = 1;
15149 (yyval.node_kw_arg) = new_kw_arg(p, assignable(p, (yyvsp[-1].id), (yyvsp[0].node), &(yyloc)), &(yyloc));
15150 /*% ripper: [$:$, $:value] %*/
15151 }
15152#line 15153 "parse.c"
15153 break;
15154
15155 case 447: /* f_kw_primary_value: f_label */
15156#line 3009 "parse.y"
15157 {
15158 p->ctxt.in_argdef = 1;
15159 (yyval.node_kw_arg) = new_kw_arg(p, assignable(p, (yyvsp[0].id), NODE_SPECIAL_REQUIRED_KEYWORD, &(yyloc)), &(yyloc));
15160 /*% ripper: [$:$, 0] %*/
15161 }
15162#line 15163 "parse.c"
15163 break;
15164
15165 case 448: /* f_kwarg_primary_value: f_kw_primary_value */
15166#line 3018 "parse.y"
15167 {
15168 (yyval.node_kw_arg) = (yyvsp[0].node_kw_arg);
15169 /*% ripper: rb_ary_new3(1, $:1) %*/
15170 }
15171#line 15172 "parse.c"
15172 break;
15173
15174 case 449: /* f_kwarg_primary_value: f_kwarg_primary_value ',' f_kw_primary_value */
15175#line 3023 "parse.y"
15176 {
15177 (yyval.node_kw_arg) = kwd_append((yyvsp[-2].node_kw_arg), (yyvsp[0].node_kw_arg));
15178 /*% ripper: rb_ary_push($:1, $:3) %*/
15179 }
15180#line 15181 "parse.c"
15181 break;
15182
15183 case 450: /* args_tail_basic_primary_value: f_kwarg_primary_value ',' f_kwrest opt_f_block_arg */
15184#line 2927 "parse.y"
15185 {
15186 (yyval.node_args) = new_args_tail(p, (yyvsp[-3].node_kw_arg), (yyvsp[-1].id), (yyvsp[0].id), &(yylsp[-1]));
15187 /*% ripper: [$:1, $:3, $:4] %*/
15188 }
15189#line 15190 "parse.c"
15190 break;
15191
15192 case 451: /* args_tail_basic_primary_value: f_kwarg_primary_value opt_f_block_arg */
15193#line 2932 "parse.y"
15194 {
15195 (yyval.node_args) = new_args_tail(p, (yyvsp[-1].node_kw_arg), 0, (yyvsp[0].id), &(yylsp[-1]));
15196 /*% ripper: [$:1, Qnil, $:2] %*/
15197 }
15198#line 15199 "parse.c"
15199 break;
15200
15201 case 452: /* args_tail_basic_primary_value: f_any_kwrest opt_f_block_arg */
15202#line 2937 "parse.y"
15203 {
15204 (yyval.node_args) = new_args_tail(p, 0, (yyvsp[-1].id), (yyvsp[0].id), &(yylsp[-1]));
15205 /*% ripper: [Qnil, $:1, $:2] %*/
15206 }
15207#line 15208 "parse.c"
15208 break;
15209
15210 case 453: /* args_tail_basic_primary_value: f_block_arg */
15211#line 2942 "parse.y"
15212 {
15213 (yyval.node_args) = new_args_tail(p, 0, 0, (yyvsp[0].id), &(yylsp[0]));
15214 /*% ripper: [Qnil, Qnil, $:1] %*/
15215 }
15216#line 15217 "parse.c"
15217 break;
15218
15219 case 455: /* excessed_comma: ',' */
15220#line 4974 "parse.y"
15221 {
15222 /* magic number for rest_id in iseq_set_arguments() */
15223 (yyval.id) = NODE_SPECIAL_EXCESSIVE_COMMA;
15224 /*% ripper: excessed_comma! %*/
15225 }
15226#line 15227 "parse.c"
15227 break;
15228
15229 case 456: /* f_opt_primary_value: f_arg_asgn f_eq primary_value */
15230#line 2981 "parse.y"
15231 {
15232 p->ctxt.in_argdef = 1;
15233 (yyval.node_opt_arg) = NEW_OPT_ARG(assignable(p, (yyvsp[-2].id), (yyvsp[0].node), &(yyloc)), &(yyloc));
15234 /*% ripper: [$:$, $:3] %*/
15235 }
15236#line 15237 "parse.c"
15237 break;
15238
15239 case 457: /* f_opt_arg_primary_value: f_opt_primary_value */
15240#line 2990 "parse.y"
15241 {
15242 (yyval.node_opt_arg) = (yyvsp[0].node_opt_arg);
15243 /*% ripper: rb_ary_new3(1, $:1) %*/
15244 }
15245#line 15246 "parse.c"
15246 break;
15247
15248 case 458: /* f_opt_arg_primary_value: f_opt_arg_primary_value ',' f_opt_primary_value */
15249#line 2995 "parse.y"
15250 {
15251 (yyval.node_opt_arg) = opt_arg_append((yyvsp[-2].node_opt_arg), (yyvsp[0].node_opt_arg));
15252 /*% ripper: rb_ary_push($:1, $:3) %*/
15253 }
15254#line 15255 "parse.c"
15255 break;
15256
15257 case 459: /* opt_args_tail_block_args_tail: ',' block_args_tail */
15258#line 3090 "parse.y"
15259 {
15260 (yyval.node_args) = (yyvsp[0].node_args);
15261 /*% ripper: $:2 %*/
15262 }
15263#line 15264 "parse.c"
15264 break;
15265
15266 case 460: /* opt_args_tail_block_args_tail: %empty */
15267#line 3095 "parse.y"
15268 {
15269 (yyval.node_args) = new_args_tail(p, 0, 0, 0, &(yylsp[0]));
15270 /*% ripper: [Qnil, Qnil, Qnil] %*/
15271 }
15272#line 15273 "parse.c"
15273 break;
15274
15275 case 461: /* block_param: f_arg ',' f_opt_arg_primary_value ',' f_rest_arg opt_args_tail_block_args_tail */
15276#line 4982 "parse.y"
15277 {
15278 (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));
15279 /*% ripper: params!($:1, $:3, $:5, Qnil, *$:6[0..2]) %*/
15280 }
15281#line 15282 "parse.c"
15282 break;
15283
15284 case 462: /* block_param: f_arg ',' f_opt_arg_primary_value ',' f_rest_arg ',' f_arg opt_args_tail_block_args_tail */
15285#line 4987 "parse.y"
15286 {
15287 (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));
15288 /*% ripper: params!($:1, $:3, $:5, $:7, *$:8[0..2]) %*/
15289 }
15290#line 15291 "parse.c"
15291 break;
15292
15293 case 463: /* block_param: f_arg ',' f_opt_arg_primary_value opt_args_tail_block_args_tail */
15294#line 4992 "parse.y"
15295 {
15296 (yyval.node_args) = new_args(p, (yyvsp[-3].node_args_aux), (yyvsp[-1].node_opt_arg), 0, 0, (yyvsp[0].node_args), &(yyloc));
15297 /*% ripper: params!($:1, $:3, Qnil, Qnil, *$:4[0..2]) %*/
15298 }
15299#line 15300 "parse.c"
15300 break;
15301
15302 case 464: /* block_param: f_arg ',' f_opt_arg_primary_value ',' f_arg opt_args_tail_block_args_tail */
15303#line 4997 "parse.y"
15304 {
15305 (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));
15306 /*% ripper: params!($:1, $:3, Qnil, $:5, *$:6[0..2]) %*/
15307 }
15308#line 15309 "parse.c"
15309 break;
15310
15311 case 465: /* block_param: f_arg ',' f_rest_arg opt_args_tail_block_args_tail */
15312#line 5002 "parse.y"
15313 {
15314 (yyval.node_args) = new_args(p, (yyvsp[-3].node_args_aux), 0, (yyvsp[-1].id), 0, (yyvsp[0].node_args), &(yyloc));
15315 /*% ripper: params!($:1, Qnil, $:3, Qnil, *$:4[0..2]) %*/
15316 }
15317#line 15318 "parse.c"
15318 break;
15319
15320 case 466: /* block_param: f_arg excessed_comma */
15321#line 5007 "parse.y"
15322 {
15323 (yyval.node_args) = new_args_tail(p, 0, 0, 0, &(yylsp[0]));
15324 (yyval.node_args) = new_args(p, (yyvsp[-1].node_args_aux), 0, (yyvsp[0].id), 0, (yyval.node_args), &(yyloc));
15325 /*% ripper: params!($:1, Qnil, $:2, Qnil, Qnil, Qnil, Qnil) %*/
15326 }
15327#line 15328 "parse.c"
15328 break;
15329
15330 case 467: /* block_param: f_arg ',' f_rest_arg ',' f_arg opt_args_tail_block_args_tail */
15331#line 5013 "parse.y"
15332 {
15333 (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));
15334 /*% ripper: params!($:1, Qnil, $:3, $:5, *$:6[0..2]) %*/
15335 }
15336#line 15337 "parse.c"
15337 break;
15338
15339 case 468: /* block_param: f_arg opt_args_tail_block_args_tail */
15340#line 5018 "parse.y"
15341 {
15342 (yyval.node_args) = new_args(p, (yyvsp[-1].node_args_aux), 0, 0, 0, (yyvsp[0].node_args), &(yyloc));
15343 /*% ripper: params!($:1, Qnil, Qnil, Qnil, *$:2[0..2]) %*/
15344 }
15345#line 15346 "parse.c"
15346 break;
15347
15348 case 469: /* block_param: f_opt_arg_primary_value ',' f_rest_arg opt_args_tail_block_args_tail */
15349#line 5023 "parse.y"
15350 {
15351 (yyval.node_args) = new_args(p, 0, (yyvsp[-3].node_opt_arg), (yyvsp[-1].id), 0, (yyvsp[0].node_args), &(yyloc));
15352 /*% ripper: params!(Qnil, $:1, $:3, Qnil, *$:4[0..2]) %*/
15353 }
15354#line 15355 "parse.c"
15355 break;
15356
15357 case 470: /* block_param: f_opt_arg_primary_value ',' f_rest_arg ',' f_arg opt_args_tail_block_args_tail */
15358#line 5028 "parse.y"
15359 {
15360 (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));
15361 /*% ripper: params!(Qnil, $:1, $:3, $:5, *$:6[0..2]) %*/
15362 }
15363#line 15364 "parse.c"
15364 break;
15365
15366 case 471: /* block_param: f_opt_arg_primary_value opt_args_tail_block_args_tail */
15367#line 5033 "parse.y"
15368 {
15369 (yyval.node_args) = new_args(p, 0, (yyvsp[-1].node_opt_arg), 0, 0, (yyvsp[0].node_args), &(yyloc));
15370 /*% ripper: params!(Qnil, $:1, Qnil, Qnil, *$:2[0..2]) %*/
15371 }
15372#line 15373 "parse.c"
15373 break;
15374
15375 case 472: /* block_param: f_opt_arg_primary_value ',' f_arg opt_args_tail_block_args_tail */
15376#line 5038 "parse.y"
15377 {
15378 (yyval.node_args) = new_args(p, 0, (yyvsp[-3].node_opt_arg), 0, (yyvsp[-1].node_args_aux), (yyvsp[0].node_args), &(yyloc));
15379 /*% ripper: params!(Qnil, $:1, Qnil, $:3, *$:4[0..2]) %*/
15380 }
15381#line 15382 "parse.c"
15382 break;
15383
15384 case 473: /* block_param: f_rest_arg opt_args_tail_block_args_tail */
15385#line 5043 "parse.y"
15386 {
15387 (yyval.node_args) = new_args(p, 0, 0, (yyvsp[-1].id), 0, (yyvsp[0].node_args), &(yyloc));
15388 /*% ripper: params!(Qnil, Qnil, $:1, Qnil, *$:2[0..2]) %*/
15389 }
15390#line 15391 "parse.c"
15391 break;
15392
15393 case 474: /* block_param: f_rest_arg ',' f_arg opt_args_tail_block_args_tail */
15394#line 5048 "parse.y"
15395 {
15396 (yyval.node_args) = new_args(p, 0, 0, (yyvsp[-3].id), (yyvsp[-1].node_args_aux), (yyvsp[0].node_args), &(yyloc));
15397 /*% ripper: params!(Qnil, Qnil, $:1, $:3, *$:4[0..2]) %*/
15398 }
15399#line 15400 "parse.c"
15400 break;
15401
15402 case 475: /* block_param: block_args_tail */
15403#line 5053 "parse.y"
15404 {
15405 (yyval.node_args) = new_args(p, 0, 0, 0, 0, (yyvsp[0].node_args), &(yyloc));
15406 /*% ripper: params!(Qnil, Qnil, Qnil, Qnil, *$:1[0..2]) %*/
15407 }
15408#line 15409 "parse.c"
15409 break;
15410
15411 case 477: /* opt_block_param_def: block_param_def */
15412#line 5061 "parse.y"
15413 {
15414 p->command_start = TRUE;
15415 }
15416#line 15417 "parse.c"
15417 break;
15418
15419 case 478: /* block_param_def: '|' opt_block_param opt_bv_decl '|' */
15420#line 5067 "parse.y"
15421 {
15422 p->max_numparam = ORDINAL_PARAM;
15423 p->ctxt.in_argdef = 0;
15424 (yyval.node_args) = (yyvsp[-2].node_args);
15425 /*% ripper: block_var!($:2, $:3) %*/
15426 }
15427#line 15428 "parse.c"
15428 break;
15429
15430 case 479: /* opt_block_param: %empty */
15431#line 5076 "parse.y"
15432 {
15433 (yyval.node_args) = 0;
15434 /*% ripper: params!(Qnil,Qnil,Qnil,Qnil,Qnil,Qnil,Qnil) %*/
15435 }
15436#line 15437 "parse.c"
15437 break;
15438
15439 case 481: /* opt_bv_decl: option_'\n' */
15440#line 5084 "parse.y"
15441 {
15442 (yyval.id) = 0;
15443 /*% ripper: Qfalse %*/
15444 }
15445#line 15446 "parse.c"
15446 break;
15447
15448 case 482: /* opt_bv_decl: option_'\n' ';' bv_decls option_'\n' */
15449#line 5089 "parse.y"
15450 {
15451 (yyval.id) = 0;
15452 /*% ripper: $:3 %*/
15453 }
15454#line 15455 "parse.c"
15455 break;
15456
15457 case 485: /* bvar: "local variable or method" */
15458#line 5102 "parse.y"
15459 {
15460 new_bv(p, (yyvsp[0].id));
15461 /*% ripper: $:1 %*/
15462 }
15463#line 15464 "parse.c"
15464 break;
15465
15466 case 487: /* max_numparam: %empty */
15467#line 5109 "parse.y"
15468 {
15469 (yyval.num) = p->max_numparam;
15470 p->max_numparam = 0;
15471 }
15472#line 15473 "parse.c"
15473 break;
15474
15475 case 488: /* numparam: %empty */
15476#line 5115 "parse.y"
15477 {
15478 (yyval.node) = numparam_push(p);
15479 }
15480#line 15481 "parse.c"
15481 break;
15482
15483 case 489: /* it_id: %empty */
15484#line 5120 "parse.y"
15485 {
15486 (yyval.id) = p->it_id;
15487 p->it_id = 0;
15488 }
15489#line 15490 "parse.c"
15490 break;
15491
15492 case 490: /* @26: %empty */
15493#line 5127 "parse.y"
15494 {
15495 token_info_push(p, "->", &(yylsp[0]));
15496 (yyval.vars) = dyna_push(p);
15497 }
15498#line 15499 "parse.c"
15499 break;
15500
15501 case 491: /* $@27: %empty */
15502#line 5133 "parse.y"
15503 {
15504 CMDARG_PUSH(0);
15505 }
15506#line 15507 "parse.c"
15507 break;
15508
15509 case 492: /* lambda: "->" @26 max_numparam numparam it_id allow_exits f_larglist $@27 lambda_body */
15510#line 5137 "parse.y"
15511 {
15512 int max_numparam = p->max_numparam;
15513 ID it_id = p->it_id;
15514 p->lex.lpar_beg = (yyvsp[-8].num);
15515 p->max_numparam = (yyvsp[-6].num);
15516 p->it_id = (yyvsp[-4].id);
15517 restore_block_exit(p, (yyvsp[-3].node_exits));
15518 CMDARG_POP();
15519 (yyvsp[-2].node_args) = args_with_numbered(p, (yyvsp[-2].node_args), max_numparam, it_id);
15520 {
15521 YYLTYPE loc = code_loc_gen(&(yylsp[-2]), &(yylsp[0]));
15522 (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);
15523 nd_set_line(RNODE_LAMBDA((yyval.node))->nd_body, (yylsp[0]).end_pos.lineno);
15524 nd_set_line((yyval.node), (yylsp[-2]).end_pos.lineno);
15525 nd_set_first_loc((yyval.node), (yylsp[-8]).beg_pos);
15526 xfree((yyvsp[0].locations_lambda_body));
15527 }
15528 /*% ripper: lambda!($:args, $:body) %*/
15529 numparam_pop(p, (yyvsp[-5].node));
15530 dyna_pop(p, (yyvsp[-7].vars));
15531 }
15532#line 15533 "parse.c"
15533 break;
15534
15535 case 493: /* f_larglist: '(' f_args opt_bv_decl ')' */
15536#line 5161 "parse.y"
15537 {
15538 p->ctxt.in_argdef = 0;
15539 (yyval.node_args) = (yyvsp[-2].node_args);
15540 p->max_numparam = ORDINAL_PARAM;
15541 /*% ripper: paren!($:2) %*/
15542 }
15543#line 15544 "parse.c"
15544 break;
15545
15546 case 494: /* f_larglist: f_args */
15547#line 5168 "parse.y"
15548 {
15549 p->ctxt.in_argdef = 0;
15550 if (!args_info_empty_p(&(yyvsp[0].node_args)->nd_ainfo))
15551 p->max_numparam = ORDINAL_PARAM;
15552 (yyval.node_args) = (yyvsp[0].node_args);
15553 }
15554#line 15555 "parse.c"
15555 break;
15556
15557 case 495: /* lambda_body: tLAMBEG compstmt_stmts '}' */
15558#line 5177 "parse.y"
15559 {
15560 token_info_pop(p, "}", &(yylsp[0]));
15561 (yyval.locations_lambda_body) = new_locations_lambda_body(p, (yyvsp[-1].node), &(yylsp[-1]), &(yylsp[-2]), &(yylsp[0]));
15562 /*% ripper: $:2 %*/
15563 }
15564#line 15565 "parse.c"
15565 break;
15566
15567 case 496: /* $@28: %empty */
15568#line 5183 "parse.y"
15569 {
15570 push_end_expect_token_locations(p, &(yylsp[0]).beg_pos);
15571 }
15572#line 15573 "parse.c"
15573 break;
15574
15575 case 497: /* lambda_body: "'do' for lambda" $@28 bodystmt k_end */
15576#line 5187 "parse.y"
15577 {
15578 (yyval.locations_lambda_body) = new_locations_lambda_body(p, (yyvsp[-1].node), &(yylsp[-1]), &(yylsp[-3]), &(yylsp[0]));
15579 /*% ripper: $:3 %*/
15580 }
15581#line 15582 "parse.c"
15582 break;
15583
15584 case 498: /* do_block: k_do_block do_body k_end */
15585#line 5194 "parse.y"
15586 {
15587 (yyval.node) = (yyvsp[-1].node);
15588 set_embraced_location((yyval.node), &(yylsp[-2]), &(yylsp[0]));
15589 /*% ripper: $:2 %*/
15590 }
15591#line 15592 "parse.c"
15592 break;
15593
15594 case 499: /* block_call: command do_block */
15595#line 5202 "parse.y"
15596 {
15597 if (nd_type_p((yyvsp[-1].node), NODE_YIELD)) {
15598 compile_error(p, "block given to yield");
15599 }
15600 else {
15601 block_dup_check(p, get_nd_args(p, (yyvsp[-1].node)), (yyvsp[0].node));
15602 }
15603 (yyval.node) = method_add_block(p, (yyvsp[-1].node), (yyvsp[0].node), &(yyloc));
15604 fixpos((yyval.node), (yyvsp[-1].node));
15605 /*% ripper: method_add_block!($:1, $:2) %*/
15606 }
15607#line 15608 "parse.c"
15608 break;
15609
15610 case 500: /* block_call: block_call call_op2 operation2 opt_paren_args */
15611#line 5214 "parse.y"
15612 {
15613 bool has_args = (yyvsp[0].node) != 0;
15614 if (NODE_EMPTY_ARGS_P((yyvsp[0].node))) (yyvsp[0].node) = 0;
15615 (yyval.node) = new_qcall(p, (yyvsp[-2].id), (yyvsp[-3].node), (yyvsp[-1].id), (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
15616 /*% ripper: call!($:1, $:2, $:3) %*/
15617 if (has_args) {
15618 /*% ripper: method_add_arg!($:$, $:4) %*/
15619 }
15620 }
15621#line 15622 "parse.c"
15622 break;
15623
15624 case 501: /* block_call: block_call call_op2 operation2 opt_paren_args brace_block */
15625#line 5224 "parse.y"
15626 {
15627 if (NODE_EMPTY_ARGS_P((yyvsp[-1].node))) (yyvsp[-1].node) = 0;
15628 (yyval.node) = new_command_qcall(p, (yyvsp[-3].id), (yyvsp[-4].node), (yyvsp[-2].id), (yyvsp[-1].node), (yyvsp[0].node), &(yylsp[-2]), &(yyloc));
15629 /*% ripper: command_call!($:1, $:2, $:3, $:4) %*/
15630 if ((yyvsp[0].node)) {
15631 /*% ripper: method_add_block!($:$, $:5) %*/
15632 }
15633 }
15634#line 15635 "parse.c"
15635 break;
15636
15637 case 502: /* block_call: block_call call_op2 operation2 command_args do_block */
15638#line 5233 "parse.y"
15639 {
15640 (yyval.node) = new_command_qcall(p, (yyvsp[-3].id), (yyvsp[-4].node), (yyvsp[-2].id), (yyvsp[-1].node), (yyvsp[0].node), &(yylsp[-2]), &(yyloc));
15641 /*% ripper: method_add_block!(command_call!($:1, $:2, $:3, $:4), $:5) %*/
15642 }
15643#line 15644 "parse.c"
15644 break;
15645
15646 case 503: /* method_call: fcall paren_args */
15647#line 5240 "parse.y"
15648 {
15649 (yyvsp[-1].node_fcall)->nd_args = (yyvsp[0].node);
15650 (yyval.node) = (NODE *)(yyvsp[-1].node_fcall);
15651 nd_set_last_loc((yyvsp[-1].node_fcall), (yylsp[0]).end_pos);
15652 /*% ripper: method_add_arg!(fcall!($:1), $:2) %*/
15653 }
15654#line 15655 "parse.c"
15655 break;
15656
15657 case 504: /* method_call: primary_value call_op operation2 opt_paren_args */
15658#line 5247 "parse.y"
15659 {
15660 bool has_args = (yyvsp[0].node) != 0;
15661 if (NODE_EMPTY_ARGS_P((yyvsp[0].node))) (yyvsp[0].node) = 0;
15662 (yyval.node) = new_qcall(p, (yyvsp[-2].id), (yyvsp[-3].node), (yyvsp[-1].id), (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
15663 nd_set_line((yyval.node), (yylsp[-1]).end_pos.lineno);
15664 /*% ripper: call!($:1, $:2, $:3) %*/
15665 if (has_args) {
15666 /*% ripper: method_add_arg!($:$, $:4) %*/
15667 }
15668 }
15669#line 15670 "parse.c"
15670 break;
15671
15672 case 505: /* method_call: primary_value "::" operation2 paren_args */
15673#line 5258 "parse.y"
15674 {
15675 (yyval.node) = new_qcall(p, idCOLON2, (yyvsp[-3].node), (yyvsp[-1].id), (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
15676 nd_set_line((yyval.node), (yylsp[-1]).end_pos.lineno);
15677 /*% ripper: method_add_arg!(call!($:1, $:2, $:3), $:4) %*/
15678 }
15679#line 15680 "parse.c"
15680 break;
15681
15682 case 506: /* method_call: primary_value "::" operation3 */
15683#line 5264 "parse.y"
15684 {
15685 (yyval.node) = new_qcall(p, idCOLON2, (yyvsp[-2].node), (yyvsp[0].id), 0, &(yylsp[0]), &(yyloc));
15686 /*% ripper: call!($:1, $:2, $:3) %*/
15687 }
15688#line 15689 "parse.c"
15689 break;
15690
15691 case 507: /* method_call: primary_value call_op2 paren_args */
15692#line 5269 "parse.y"
15693 {
15694 (yyval.node) = new_qcall(p, (yyvsp[-1].id), (yyvsp[-2].node), idCall, (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
15695 nd_set_line((yyval.node), (yylsp[-1]).end_pos.lineno);
15696 /*% ripper: method_add_arg!(call!($:1, $:2, ID2VAL(idCall)), $:3) %*/
15697 }
15698#line 15699 "parse.c"
15699 break;
15700
15701 case 508: /* method_call: "'super'" paren_args */
15702#line 5275 "parse.y"
15703 {
15704 rb_code_location_t lparen_loc = (yylsp[0]);
15705 rb_code_location_t rparen_loc = (yylsp[0]);
15706 lparen_loc.end_pos.column = lparen_loc.beg_pos.column + 1;
15707 rparen_loc.beg_pos.column = rparen_loc.end_pos.column - 1;
15708
15709 (yyval.node) = NEW_SUPER((yyvsp[0].node), &(yyloc), &(yylsp[-1]), &lparen_loc, &rparen_loc);
15710 /*% ripper: super!($:2) %*/
15711 }
15712#line 15713 "parse.c"
15713 break;
15714
15715 case 509: /* method_call: "'super'" */
15716#line 5285 "parse.y"
15717 {
15718 (yyval.node) = NEW_ZSUPER(&(yyloc));
15719 /*% ripper: zsuper! %*/
15720 }
15721#line 15722 "parse.c"
15722 break;
15723
15724 case 510: /* method_call: primary_value '[' opt_call_args rbracket */
15725#line 5290 "parse.y"
15726 {
15727 (yyval.node) = NEW_CALL((yyvsp[-3].node), tAREF, (yyvsp[-1].node), &(yyloc));
15728 fixpos((yyval.node), (yyvsp[-3].node));
15729 /*% ripper: aref!($:1, $:3) %*/
15730 }
15731#line 15732 "parse.c"
15732 break;
15733
15734 case 511: /* brace_block: '{' brace_body '}' */
15735#line 5298 "parse.y"
15736 {
15737 (yyval.node) = (yyvsp[-1].node);
15738 set_embraced_location((yyval.node), &(yylsp[-2]), &(yylsp[0]));
15739 /*% ripper: $:2 %*/
15740 }
15741#line 15742 "parse.c"
15742 break;
15743
15744 case 512: /* brace_block: k_do do_body k_end */
15745#line 5304 "parse.y"
15746 {
15747 (yyval.node) = (yyvsp[-1].node);
15748 set_embraced_location((yyval.node), &(yylsp[-2]), &(yylsp[0]));
15749 /*% ripper: $:2 %*/
15750 }
15751#line 15752 "parse.c"
15752 break;
15753
15754 case 513: /* @29: %empty */
15755#line 5311 "parse.y"
15756 {(yyval.vars) = dyna_push(p);}
15757#line 15758 "parse.c"
15758 break;
15759
15760 case 514: /* brace_body: @29 max_numparam numparam it_id allow_exits opt_block_param_def compstmt_stmts */
15761#line 5314 "parse.y"
15762 {
15763 int max_numparam = p->max_numparam;
15764 ID it_id = p->it_id;
15765 p->max_numparam = (yyvsp[-5].num);
15766 p->it_id = (yyvsp[-3].id);
15767 (yyvsp[-1].node_args) = args_with_numbered(p, (yyvsp[-1].node_args), max_numparam, it_id);
15768 (yyval.node) = NEW_ITER((yyvsp[-1].node_args), (yyvsp[0].node), &(yyloc));
15769 /*% ripper: brace_block!($:args, $:compstmt) %*/
15770 restore_block_exit(p, (yyvsp[-2].node_exits));
15771 numparam_pop(p, (yyvsp[-4].node));
15772 dyna_pop(p, (yyvsp[-6].vars));
15773 }
15774#line 15775 "parse.c"
15775 break;
15776
15777 case 515: /* @30: %empty */
15778#line 5328 "parse.y"
15779 {
15780 (yyval.vars) = dyna_push(p);
15781 CMDARG_PUSH(0);
15782 }
15783#line 15784 "parse.c"
15784 break;
15785
15786 case 516: /* do_body: @30 max_numparam numparam it_id allow_exits opt_block_param_def bodystmt */
15787#line 5334 "parse.y"
15788 {
15789 int max_numparam = p->max_numparam;
15790 ID it_id = p->it_id;
15791 p->max_numparam = (yyvsp[-5].num);
15792 p->it_id = (yyvsp[-3].id);
15793 (yyvsp[-1].node_args) = args_with_numbered(p, (yyvsp[-1].node_args), max_numparam, it_id);
15794 (yyval.node) = NEW_ITER((yyvsp[-1].node_args), (yyvsp[0].node), &(yyloc));
15795 /*% ripper: do_block!($:args, $:bodystmt) %*/
15796 CMDARG_POP();
15797 restore_block_exit(p, (yyvsp[-2].node_exits));
15798 numparam_pop(p, (yyvsp[-4].node));
15799 dyna_pop(p, (yyvsp[-6].vars));
15800 }
15801#line 15802 "parse.c"
15802 break;
15803
15804 case 517: /* case_args: arg_value */
15805#line 5350 "parse.y"
15806 {
15807 check_literal_when(p, (yyvsp[0].node), &(yylsp[0]));
15808 (yyval.node) = NEW_LIST((yyvsp[0].node), &(yyloc));
15809 /*% ripper: args_add!(args_new!, $:arg_value) %*/
15810 }
15811#line 15812 "parse.c"
15812 break;
15813
15814 case 518: /* case_args: "*" arg_value */
15815#line 5356 "parse.y"
15816 {
15817 (yyval.node) = NEW_SPLAT((yyvsp[0].node), &(yyloc), &(yylsp[-1]));
15818 /*% ripper: args_add_star!(args_new!, $:arg_value) %*/
15819 }
15820#line 15821 "parse.c"
15821 break;
15822
15823 case 519: /* case_args: case_args ',' arg_value */
15824#line 5361 "parse.y"
15825 {
15826 check_literal_when(p, (yyvsp[0].node), &(yylsp[0]));
15827 (yyval.node) = last_arg_append(p, (yyvsp[-2].node), (yyvsp[0].node), &(yyloc));
15828 /*% ripper: args_add!($:non_last_args, $:arg_value) %*/
15829 }
15830#line 15831 "parse.c"
15831 break;
15832
15833 case 520: /* case_args: case_args ',' "*" arg_value */
15834#line 5367 "parse.y"
15835 {
15836 (yyval.node) = rest_arg_append(p, (yyvsp[-3].node), (yyvsp[0].node), &(yyloc));
15837 /*% ripper: args_add_star!($:non_last_args, $:arg_value) %*/
15838 }
15839#line 15840 "parse.c"
15840 break;
15841
15842 case 521: /* case_body: k_when case_args then compstmt_stmts cases */
15843#line 5376 "parse.y"
15844 {
15845 (yyval.node) = NEW_WHEN((yyvsp[-3].node), (yyvsp[-1].node), (yyvsp[0].node), &(yyloc), &(yylsp[-4]), &(yylsp[-2]));
15846 fixpos((yyval.node), (yyvsp[-3].node));
15847 /*% ripper: when!($:2, $:4, $:5) %*/
15848 }
15849#line 15850 "parse.c"
15850 break;
15851
15852 case 524: /* p_pvtbl: %empty */
15853#line 5387 "parse.y"
15854 {(yyval.tbl) = p->pvtbl; p->pvtbl = st_init_numtable();}
15855#line 15856 "parse.c"
15856 break;
15857
15858 case 525: /* p_pktbl: %empty */
15859#line 5388 "parse.y"
15860 {(yyval.tbl) = p->pktbl; p->pktbl = 0;}
15861#line 15862 "parse.c"
15862 break;
15863
15864 case 526: /* p_in_kwarg: %empty */
15865#line 5390 "parse.y"
15866 {
15867 (yyval.ctxt) = p->ctxt;
15868 SET_LEX_STATE(EXPR_BEG|EXPR_LABEL);
15869 p->command_start = FALSE;
15870 p->ctxt.in_kwarg = 1;
15871 }
15872#line 15873 "parse.c"
15873 break;
15874
15875 case 527: /* $@31: %empty */
15876#line 5401 "parse.y"
15877 {
15878 pop_pktbl(p, (yyvsp[-2].tbl));
15879 pop_pvtbl(p, (yyvsp[-3].tbl));
15880 p->ctxt.in_kwarg = (yyvsp[-4].ctxt).in_kwarg;
15881 }
15882#line 15883 "parse.c"
15883 break;
15884
15885 case 528: /* p_case_body: "'in'" p_in_kwarg p_pvtbl p_pktbl p_top_expr then $@31 compstmt_stmts p_cases */
15886#line 5408 "parse.y"
15887 {
15888 (yyval.node) = NEW_IN((yyvsp[-4].node), (yyvsp[-1].node), (yyvsp[0].node), &(yyloc), &(yylsp[-8]), &(yylsp[-3]), &NULL_LOC);
15889 /*% ripper: in!($:expr, $:compstmt, $:cases) %*/
15890 }
15891#line 15892 "parse.c"
15892 break;
15893
15894 case 532: /* p_top_expr: p_top_expr_body "'if' modifier" expr_value */
15895#line 5420 "parse.y"
15896 {
15897 (yyval.node) = new_if(p, (yyvsp[0].node), (yyvsp[-2].node), 0, &(yyloc), &(yylsp[-1]), &NULL_LOC, &NULL_LOC);
15898 fixpos((yyval.node), (yyvsp[0].node));
15899 /*% ripper: if_mod!($:3, $:1) %*/
15900 }
15901#line 15902 "parse.c"
15902 break;
15903
15904 case 533: /* p_top_expr: p_top_expr_body "'unless' modifier" expr_value */
15905#line 5426 "parse.y"
15906 {
15907 (yyval.node) = new_unless(p, (yyvsp[0].node), (yyvsp[-2].node), 0, &(yyloc), &(yylsp[-1]), &NULL_LOC, &NULL_LOC);
15908 fixpos((yyval.node), (yyvsp[0].node));
15909 /*% ripper: unless_mod!($:3, $:1) %*/
15910 }
15911#line 15912 "parse.c"
15912 break;
15913
15914 case 535: /* p_top_expr_body: p_expr ',' */
15915#line 5435 "parse.y"
15916 {
15917 (yyval.node) = new_array_pattern_tail(p, 0, 1, 0, 0, &(yyloc));
15918 (yyval.node) = new_array_pattern(p, 0, (yyvsp[-1].node), (yyval.node), &(yyloc));
15919 /*% ripper: aryptn!(Qnil, [$:1], Qnil, Qnil) %*/
15920 }
15921#line 15922 "parse.c"
15922 break;
15923
15924 case 536: /* p_top_expr_body: p_expr ',' p_args */
15925#line 5441 "parse.y"
15926 {
15927 (yyval.node) = new_array_pattern(p, 0, (yyvsp[-2].node), (yyvsp[0].node), &(yyloc));
15928 nd_set_first_loc((yyval.node), (yylsp[-2]).beg_pos);
15929 /*% ripper: aryptn!(Qnil, aryptn_pre_args(p, $:1, $:3[0]), *$:3[1..2]) %*/
15930 }
15931#line 15932 "parse.c"
15932 break;
15933
15934 case 537: /* p_top_expr_body: p_find */
15935#line 5447 "parse.y"
15936 {
15937 (yyval.node) = new_find_pattern(p, 0, (yyvsp[0].node), &(yyloc));
15938 /*% ripper: fndptn!(Qnil, *$:1[0..2]) %*/
15939 }
15940#line 15941 "parse.c"
15941 break;
15942
15943 case 538: /* p_top_expr_body: p_args_tail */
15944#line 5452 "parse.y"
15945 {
15946 (yyval.node) = new_array_pattern(p, 0, 0, (yyvsp[0].node), &(yyloc));
15947 /*% ripper: aryptn!(Qnil, *$:1[0..2]) %*/
15948 }
15949#line 15950 "parse.c"
15950 break;
15951
15952 case 539: /* p_top_expr_body: p_kwargs */
15953#line 5457 "parse.y"
15954 {
15955 (yyval.node) = new_hash_pattern(p, 0, (yyvsp[0].node), &(yyloc));
15956 /*% ripper: hshptn!(Qnil, *$:1[0..1]) %*/
15957 }
15958#line 15959 "parse.c"
15959 break;
15960
15961 case 541: /* p_as: p_expr "=>" p_variable */
15962#line 5467 "parse.y"
15963 {
15964 NODE *n = NEW_LIST((yyvsp[-2].node), &(yyloc));
15965 n = list_append(p, n, (yyvsp[0].node));
15966 (yyval.node) = new_hash(p, n, &(yyloc));
15967 /*% ripper: binary!($:1, ID2VAL((id_assoc)), $:3) %*/
15968 }
15969#line 15970 "parse.c"
15970 break;
15971
15972 case 543: /* p_alt: p_alt '|' p_expr_basic */
15973#line 5477 "parse.y"
15974 {
15975 (yyval.node) = NEW_OR((yyvsp[-2].node), (yyvsp[0].node), &(yyloc), &(yylsp[-1]));
15976 /*% ripper: binary!($:1, ID2VAL(idOr), $:3) %*/
15977 }
15978#line 15979 "parse.c"
15979 break;
15980
15981 case 545: /* p_lparen: '(' p_pktbl */
15982#line 5485 "parse.y"
15983 {
15984 (yyval.tbl) = (yyvsp[0].tbl);
15985 /*% ripper: $:2 %*/
15986 }
15987#line 15988 "parse.c"
15988 break;
15989
15990 case 546: /* p_lbracket: '[' p_pktbl */
15991#line 5492 "parse.y"
15992 {
15993 (yyval.tbl) = (yyvsp[0].tbl);
15994 /*% ripper: $:2 %*/
15995 }
15996#line 15997 "parse.c"
15997 break;
15998
15999 case 549: /* p_expr_basic: p_const p_lparen p_args rparen */
16000#line 5501 "parse.y"
16001 {
16002 pop_pktbl(p, (yyvsp[-2].tbl));
16003 (yyval.node) = new_array_pattern(p, (yyvsp[-3].node), 0, (yyvsp[-1].node), &(yyloc));
16004 nd_set_first_loc((yyval.node), (yylsp[-3]).beg_pos);
16005 /*% ripper: aryptn!($:p_const, *$:p_args[0..2]) %*/
16006 }
16007#line 16008 "parse.c"
16008 break;
16009
16010 case 550: /* p_expr_basic: p_const p_lparen p_find rparen */
16011#line 5508 "parse.y"
16012 {
16013 pop_pktbl(p, (yyvsp[-2].tbl));
16014 (yyval.node) = new_find_pattern(p, (yyvsp[-3].node), (yyvsp[-1].node), &(yyloc));
16015 nd_set_first_loc((yyval.node), (yylsp[-3]).beg_pos);
16016 /*% ripper: fndptn!($:p_const, *$:p_find[0..2]) %*/
16017 }
16018#line 16019 "parse.c"
16019 break;
16020
16021 case 551: /* p_expr_basic: p_const p_lparen p_kwargs rparen */
16022#line 5515 "parse.y"
16023 {
16024 pop_pktbl(p, (yyvsp[-2].tbl));
16025 (yyval.node) = new_hash_pattern(p, (yyvsp[-3].node), (yyvsp[-1].node), &(yyloc));
16026 nd_set_first_loc((yyval.node), (yylsp[-3]).beg_pos);
16027 /*% ripper: hshptn!($:p_const, *$:p_kwargs[0..1]) %*/
16028 }
16029#line 16030 "parse.c"
16030 break;
16031
16032 case 552: /* p_expr_basic: p_const '(' rparen */
16033#line 5522 "parse.y"
16034 {
16035 (yyval.node) = new_array_pattern_tail(p, 0, 0, 0, 0, &(yyloc));
16036 (yyval.node) = new_array_pattern(p, (yyvsp[-2].node), 0, (yyval.node), &(yyloc));
16037 /*% ripper: aryptn!($:p_const, Qnil, Qnil, Qnil) %*/
16038 }
16039#line 16040 "parse.c"
16040 break;
16041
16042 case 553: /* p_expr_basic: p_const p_lbracket p_args rbracket */
16043#line 5528 "parse.y"
16044 {
16045 pop_pktbl(p, (yyvsp[-2].tbl));
16046 (yyval.node) = new_array_pattern(p, (yyvsp[-3].node), 0, (yyvsp[-1].node), &(yyloc));
16047 nd_set_first_loc((yyval.node), (yylsp[-3]).beg_pos);
16048 /*% ripper: aryptn!($:p_const, *$:p_args[0..2]) %*/
16049 }
16050#line 16051 "parse.c"
16051 break;
16052
16053 case 554: /* p_expr_basic: p_const p_lbracket p_find rbracket */
16054#line 5535 "parse.y"
16055 {
16056 pop_pktbl(p, (yyvsp[-2].tbl));
16057 (yyval.node) = new_find_pattern(p, (yyvsp[-3].node), (yyvsp[-1].node), &(yyloc));
16058 nd_set_first_loc((yyval.node), (yylsp[-3]).beg_pos);
16059 /*% ripper: fndptn!($:p_const, *$:p_find[0..2]) %*/
16060 }
16061#line 16062 "parse.c"
16062 break;
16063
16064 case 555: /* p_expr_basic: p_const p_lbracket p_kwargs rbracket */
16065#line 5542 "parse.y"
16066 {
16067 pop_pktbl(p, (yyvsp[-2].tbl));
16068 (yyval.node) = new_hash_pattern(p, (yyvsp[-3].node), (yyvsp[-1].node), &(yyloc));
16069 nd_set_first_loc((yyval.node), (yylsp[-3]).beg_pos);
16070 /*% ripper: hshptn!($:p_const, *$:p_kwargs[0..1]) %*/
16071 }
16072#line 16073 "parse.c"
16073 break;
16074
16075 case 556: /* p_expr_basic: p_const '[' rbracket */
16076#line 5549 "parse.y"
16077 {
16078 (yyval.node) = new_array_pattern_tail(p, 0, 0, 0, 0, &(yyloc));
16079 (yyval.node) = new_array_pattern(p, (yyvsp[-2].node), 0, (yyval.node), &(yyloc));
16080 /*% ripper: aryptn!($:1, Qnil, Qnil, Qnil) %*/
16081 }
16082#line 16083 "parse.c"
16083 break;
16084
16085 case 557: /* p_expr_basic: "[" p_args rbracket */
16086#line 5555 "parse.y"
16087 {
16088 (yyval.node) = new_array_pattern(p, 0, 0, (yyvsp[-1].node), &(yyloc));
16089 /*% ripper: aryptn!(Qnil, *$:p_args[0..2]) %*/
16090 }
16091#line 16092 "parse.c"
16092 break;
16093
16094 case 558: /* p_expr_basic: "[" p_find rbracket */
16095#line 5560 "parse.y"
16096 {
16097 (yyval.node) = new_find_pattern(p, 0, (yyvsp[-1].node), &(yyloc));
16098 /*% ripper: fndptn!(Qnil, *$:p_find[0..2]) %*/
16099 }
16100#line 16101 "parse.c"
16101 break;
16102
16103 case 559: /* p_expr_basic: "[" rbracket */
16104#line 5565 "parse.y"
16105 {
16106 (yyval.node) = new_array_pattern_tail(p, 0, 0, 0, 0, &(yyloc));
16107 (yyval.node) = new_array_pattern(p, 0, 0, (yyval.node), &(yyloc));
16108 /*% ripper: aryptn!(Qnil, Qnil, Qnil, Qnil) %*/
16109 }
16110#line 16111 "parse.c"
16111 break;
16112
16113 case 560: /* $@32: %empty */
16114#line 5571 "parse.y"
16115 {
16116 p->ctxt.in_kwarg = 0;
16117 }
16118#line 16119 "parse.c"
16119 break;
16120
16121 case 561: /* p_expr_basic: "{" p_pktbl lex_ctxt $@32 p_kwargs rbrace */
16122#line 5575 "parse.y"
16123 {
16124 pop_pktbl(p, (yyvsp[-4].tbl));
16125 p->ctxt.in_kwarg = (yyvsp[-3].ctxt).in_kwarg;
16126 (yyval.node) = new_hash_pattern(p, 0, (yyvsp[-1].node), &(yyloc));
16127 /*% ripper: hshptn!(Qnil, *$:p_kwargs[0..1]) %*/
16128 }
16129#line 16130 "parse.c"
16130 break;
16131
16132 case 562: /* p_expr_basic: "{" rbrace */
16133#line 5582 "parse.y"
16134 {
16135 (yyval.node) = new_hash_pattern_tail(p, 0, 0, &(yyloc));
16136 (yyval.node) = new_hash_pattern(p, 0, (yyval.node), &(yyloc));
16137 /*% ripper: hshptn!(Qnil, Qnil, Qnil) %*/
16138 }
16139#line 16140 "parse.c"
16140 break;
16141
16142 case 563: /* p_expr_basic: "(" p_pktbl p_expr rparen */
16143#line 5588 "parse.y"
16144 {
16145 pop_pktbl(p, (yyvsp[-2].tbl));
16146 (yyval.node) = (yyvsp[-1].node);
16147 /*% ripper: $:p_expr %*/
16148 }
16149#line 16150 "parse.c"
16150 break;
16151
16152 case 564: /* p_args: p_expr */
16153#line 5596 "parse.y"
16154 {
16155 NODE *pre_args = NEW_LIST((yyvsp[0].node), &(yyloc));
16156 (yyval.node) = new_array_pattern_tail(p, pre_args, 0, 0, 0, &(yyloc));
16157 /*% ripper: [[$:1], Qnil, Qnil] %*/
16158 }
16159#line 16160 "parse.c"
16160 break;
16161
16162 case 565: /* p_args: p_args_head */
16163#line 5602 "parse.y"
16164 {
16165 (yyval.node) = new_array_pattern_tail(p, (yyvsp[0].node), 1, 0, 0, &(yyloc));
16166 /*% ripper: [$:1, Qnil, Qnil] %*/
16167 }
16168#line 16169 "parse.c"
16169 break;
16170
16171 case 566: /* p_args: p_args_head p_arg */
16172#line 5607 "parse.y"
16173 {
16174 (yyval.node) = new_array_pattern_tail(p, list_concat((yyvsp[-1].node), (yyvsp[0].node)), 0, 0, 0, &(yyloc));
16175 /*% ripper: [rb_ary_concat($:1, $:2), Qnil, Qnil] %*/
16176 }
16177#line 16178 "parse.c"
16178 break;
16179
16180 case 567: /* p_args: p_args_head p_rest */
16181#line 5612 "parse.y"
16182 {
16183 (yyval.node) = new_array_pattern_tail(p, (yyvsp[-1].node), 1, (yyvsp[0].node), 0, &(yyloc));
16184 /*% ripper: [$:1, $:2, Qnil] %*/
16185 }
16186#line 16187 "parse.c"
16187 break;
16188
16189 case 568: /* p_args: p_args_head p_rest ',' p_args_post */
16190#line 5617 "parse.y"
16191 {
16192 (yyval.node) = new_array_pattern_tail(p, (yyvsp[-3].node), 1, (yyvsp[-2].node), (yyvsp[0].node), &(yyloc));
16193 /*% ripper: [$:1, $:2, $:4] %*/
16194 }
16195#line 16196 "parse.c"
16196 break;
16197
16198 case 571: /* p_args_head: p_args_head p_arg ',' */
16199#line 5626 "parse.y"
16200 {
16201 (yyval.node) = list_concat((yyvsp[-2].node), (yyvsp[-1].node));
16202 /*% ripper: rb_ary_concat($:1, $:2) %*/
16203 }
16204#line 16205 "parse.c"
16205 break;
16206
16207 case 572: /* p_args_tail: p_rest */
16208#line 5633 "parse.y"
16209 {
16210 (yyval.node) = new_array_pattern_tail(p, 0, 1, (yyvsp[0].node), 0, &(yyloc));
16211 /*% ripper: [Qnil, $:1, Qnil] %*/
16212 }
16213#line 16214 "parse.c"
16214 break;
16215
16216 case 573: /* p_args_tail: p_rest ',' p_args_post */
16217#line 5638 "parse.y"
16218 {
16219 (yyval.node) = new_array_pattern_tail(p, 0, 1, (yyvsp[-2].node), (yyvsp[0].node), &(yyloc));
16220 /*% ripper: [Qnil, $:1, $:3] %*/
16221 }
16222#line 16223 "parse.c"
16223 break;
16224
16225 case 574: /* p_find: p_rest ',' p_args_post ',' p_rest */
16226#line 5645 "parse.y"
16227 {
16228 (yyval.node) = new_find_pattern_tail(p, (yyvsp[-4].node), (yyvsp[-2].node), (yyvsp[0].node), &(yyloc));
16229 /*% ripper: [$:1, $:3, $:5] %*/
16230 }
16231#line 16232 "parse.c"
16232 break;
16233
16234 case 575: /* p_rest: "*" "local variable or method" */
16235#line 5653 "parse.y"
16236 {
16237 error_duplicate_pattern_variable(p, (yyvsp[0].id), &(yylsp[0]));
16238 /*% ripper: var_field!($:2) %*/
16239 (yyval.node) = assignable(p, (yyvsp[0].id), 0, &(yyloc));
16240 }
16241#line 16242 "parse.c"
16242 break;
16243
16244 case 576: /* p_rest: "*" */
16245#line 5659 "parse.y"
16246 {
16247 (yyval.node) = 0;
16248 /*% ripper: var_field!(Qnil) %*/
16249 }
16250#line 16251 "parse.c"
16251 break;
16252
16253 case 578: /* p_args_post: p_args_post ',' p_arg */
16254#line 5667 "parse.y"
16255 {
16256 (yyval.node) = list_concat((yyvsp[-2].node), (yyvsp[0].node));
16257 /*% ripper: rb_ary_concat($:1, $:3) %*/
16258 }
16259#line 16260 "parse.c"
16260 break;
16261
16262 case 579: /* p_arg: p_expr */
16263#line 5674 "parse.y"
16264 {
16265 (yyval.node) = NEW_LIST((yyvsp[0].node), &(yyloc));
16266 /*% ripper: [$:1] %*/
16267 }
16268#line 16269 "parse.c"
16269 break;
16270
16271 case 580: /* p_kwargs: p_kwarg ',' p_any_kwrest */
16272#line 5681 "parse.y"
16273 {
16274 (yyval.node) = new_hash_pattern_tail(p, new_unique_key_hash(p, (yyvsp[-2].node), &(yyloc)), (yyvsp[0].id), &(yyloc));
16275 /*% ripper: [$:1, $:3] %*/
16276 }
16277#line 16278 "parse.c"
16278 break;
16279
16280 case 581: /* p_kwargs: p_kwarg */
16281#line 5686 "parse.y"
16282 {
16283 (yyval.node) = new_hash_pattern_tail(p, new_unique_key_hash(p, (yyvsp[0].node), &(yyloc)), 0, &(yyloc));
16284 /*% ripper: [$:1, Qnil] %*/
16285 }
16286#line 16287 "parse.c"
16287 break;
16288
16289 case 582: /* p_kwargs: p_kwarg ',' */
16290#line 5691 "parse.y"
16291 {
16292 (yyval.node) = new_hash_pattern_tail(p, new_unique_key_hash(p, (yyvsp[-1].node), &(yyloc)), 0, &(yyloc));
16293 /*% ripper: [$:1, Qnil] %*/
16294 }
16295#line 16296 "parse.c"
16296 break;
16297
16298 case 583: /* p_kwargs: p_any_kwrest */
16299#line 5696 "parse.y"
16300 {
16301 (yyval.node) = new_hash_pattern_tail(p, new_hash(p, 0, &(yyloc)), (yyvsp[0].id), &(yyloc));
16302 /*% ripper: [[], $:1] %*/
16303 }
16304#line 16305 "parse.c"
16305 break;
16306
16307 case 585: /* p_kwarg: p_kwarg ',' p_kw */
16308#line 5705 "parse.y"
16309 {
16310 (yyval.node) = list_concat((yyvsp[-2].node), (yyvsp[0].node));
16311 /*% ripper: rb_ary_push($:1, $:3) %*/
16312 }
16313#line 16314 "parse.c"
16314 break;
16315
16316 case 586: /* p_kw: p_kw_label p_expr */
16317#line 5712 "parse.y"
16318 {
16319 error_duplicate_pattern_key(p, (yyvsp[-1].id), &(yylsp[-1]));
16320 (yyval.node) = list_append(p, NEW_LIST(NEW_SYM(rb_id2str((yyvsp[-1].id)), &(yylsp[-1])), &(yyloc)), (yyvsp[0].node));
16321 /*% ripper: [$:1, $:2] %*/
16322 }
16323#line 16324 "parse.c"
16324 break;
16325
16326 case 587: /* p_kw: p_kw_label */
16327#line 5718 "parse.y"
16328 {
16329 error_duplicate_pattern_key(p, (yyvsp[0].id), &(yylsp[0]));
16330 if ((yyvsp[0].id) && !is_local_id((yyvsp[0].id))) {
16331 yyerror1(&(yylsp[0]), "key must be valid as local variables");
16332 }
16333 error_duplicate_pattern_variable(p, (yyvsp[0].id), &(yylsp[0]));
16334 (yyval.node) = list_append(p, NEW_LIST(NEW_SYM(rb_id2str((yyvsp[0].id)), &(yyloc)), &(yyloc)), assignable(p, (yyvsp[0].id), 0, &(yyloc)));
16335 /*% ripper: [$:1, Qnil] %*/
16336 }
16337#line 16338 "parse.c"
16338 break;
16339
16340 case 589: /* p_kw_label: "string literal" string_contents tLABEL_END */
16341#line 5731 "parse.y"
16342 {
16343 YYLTYPE loc = code_loc_gen(&(yylsp[-2]), &(yylsp[0]));
16344 if (!(yyvsp[-1].node) || nd_type_p((yyvsp[-1].node), NODE_STR)) {
16345 NODE *node = dsym_node(p, (yyvsp[-1].node), &loc);
16346 (yyval.id) = rb_sym2id(rb_node_sym_string_val(node));
16347 }
16348 else {
16349 yyerror1(&loc, "symbol literal with interpolation is not allowed");
16350 (yyval.id) = rb_intern_str(STR_NEW0());
16351 }
16352 /*% ripper: $:2 %*/
16353 }
16354#line 16355 "parse.c"
16355 break;
16356
16357 case 590: /* p_kwrest: kwrest_mark "local variable or method" */
16358#line 5746 "parse.y"
16359 {
16360 (yyval.id) = (yyvsp[0].id);
16361 /*% ripper: var_field!($:2) %*/
16362 }
16363#line 16364 "parse.c"
16364 break;
16365
16366 case 591: /* p_kwrest: kwrest_mark */
16367#line 5751 "parse.y"
16368 {
16369 (yyval.id) = 0;
16370 /*% ripper: Qnil %*/
16371 }
16372#line 16373 "parse.c"
16373 break;
16374
16375 case 592: /* p_kwnorest: kwrest_mark "'nil'" */
16376#line 5758 "parse.y"
16377 {
16378 (yyval.id) = 0;
16379 }
16380#line 16381 "parse.c"
16381 break;
16382
16383 case 594: /* p_any_kwrest: p_kwnorest */
16384#line 5765 "parse.y"
16385 {
16386 (yyval.id) = idNil;
16387 /*% ripper: var_field!(ID2VAL(idNil)) %*/
16388 }
16389#line 16390 "parse.c"
16390 break;
16391
16392 case 596: /* range_expr_p_primitive: p_primitive ".." p_primitive */
16393#line 3103 "parse.y"
16394 {
16395 value_expr((yyvsp[-2].node));
16396 value_expr((yyvsp[0].node));
16397 (yyval.node) = NEW_DOT2((yyvsp[-2].node), (yyvsp[0].node), &(yyloc), &(yylsp[-1]));
16398 /*% ripper: dot2!($:1, $:3) %*/
16399 }
16400#line 16401 "parse.c"
16401 break;
16402
16403 case 597: /* range_expr_p_primitive: p_primitive "..." p_primitive */
16404#line 3110 "parse.y"
16405 {
16406 value_expr((yyvsp[-2].node));
16407 value_expr((yyvsp[0].node));
16408 (yyval.node) = NEW_DOT3((yyvsp[-2].node), (yyvsp[0].node), &(yyloc), &(yylsp[-1]));
16409 /*% ripper: dot3!($:1, $:3) %*/
16410 }
16411#line 16412 "parse.c"
16412 break;
16413
16414 case 598: /* range_expr_p_primitive: p_primitive ".." */
16415#line 3117 "parse.y"
16416 {
16417 value_expr((yyvsp[-1].node));
16418 (yyval.node) = NEW_DOT2((yyvsp[-1].node), new_nil_at(p, &(yylsp[0]).end_pos), &(yyloc), &(yylsp[0]));
16419 /*% ripper: dot2!($:1, Qnil) %*/
16420 }
16421#line 16422 "parse.c"
16422 break;
16423
16424 case 599: /* range_expr_p_primitive: p_primitive "..." */
16425#line 3123 "parse.y"
16426 {
16427 value_expr((yyvsp[-1].node));
16428 (yyval.node) = NEW_DOT3((yyvsp[-1].node), new_nil_at(p, &(yylsp[0]).end_pos), &(yyloc), &(yylsp[0]));
16429 /*% ripper: dot3!($:1, Qnil) %*/
16430 }
16431#line 16432 "parse.c"
16432 break;
16433
16434 case 600: /* range_expr_p_primitive: "(.." p_primitive */
16435#line 3129 "parse.y"
16436 {
16437 value_expr((yyvsp[0].node));
16438 (yyval.node) = NEW_DOT2(new_nil_at(p, &(yylsp[-1]).beg_pos), (yyvsp[0].node), &(yyloc), &(yylsp[-1]));
16439 /*% ripper: dot2!(Qnil, $:2) %*/
16440 }
16441#line 16442 "parse.c"
16442 break;
16443
16444 case 601: /* range_expr_p_primitive: "(..." p_primitive */
16445#line 3135 "parse.y"
16446 {
16447 value_expr((yyvsp[0].node));
16448 (yyval.node) = NEW_DOT3(new_nil_at(p, &(yylsp[-1]).beg_pos), (yyvsp[0].node), &(yyloc), &(yylsp[-1]));
16449 /*% ripper: dot3!(Qnil, $:2) %*/
16450 }
16451#line 16452 "parse.c"
16452 break;
16453
16454 case 614: /* p_primitive: keyword_variable */
16455#line 5780 "parse.y"
16456 {
16457 if (!((yyval.node) = gettable(p, (yyvsp[0].id), &(yyloc)))) (yyval.node) = NEW_ERROR(&(yyloc));
16458 /*% ripper: var_ref!($:1) %*/
16459 }
16460#line 16461 "parse.c"
16461 break;
16462
16463 case 616: /* p_variable: "local variable or method" */
16464#line 5788 "parse.y"
16465 {
16466 error_duplicate_pattern_variable(p, (yyvsp[0].id), &(yylsp[0]));
16467 /*% ripper: var_field!($:1) %*/
16468 (yyval.node) = assignable(p, (yyvsp[0].id), 0, &(yyloc));
16469 }
16470#line 16471 "parse.c"
16471 break;
16472
16473 case 617: /* p_var_ref: '^' "local variable or method" */
16474#line 5796 "parse.y"
16475 {
16476 NODE *n = gettable(p, (yyvsp[0].id), &(yyloc));
16477 if (!n) {
16478 n = NEW_ERROR(&(yyloc));
16479 }
16480 else if (!(nd_type_p(n, NODE_LVAR) || nd_type_p(n, NODE_DVAR))) {
16481 compile_error(p, "%"PRIsVALUE": no such local variable", rb_id2str((yyvsp[0].id)));
16482 }
16483 (yyval.node) = n;
16484 /*% ripper: var_ref!($:2) %*/
16485 }
16486#line 16487 "parse.c"
16487 break;
16488
16489 case 618: /* p_var_ref: '^' nonlocal_var */
16490#line 5808 "parse.y"
16491 {
16492 if (!((yyval.node) = gettable(p, (yyvsp[0].id), &(yyloc)))) (yyval.node) = NEW_ERROR(&(yyloc));
16493 /*% ripper: var_ref!($:2) %*/
16494 }
16495#line 16496 "parse.c"
16496 break;
16497
16498 case 619: /* p_expr_ref: '^' "(" expr_value rparen */
16499#line 5815 "parse.y"
16500 {
16501 (yyval.node) = NEW_BLOCK((yyvsp[-1].node), &(yyloc));
16502 /*% ripper: begin!($:3) %*/
16503 }
16504#line 16505 "parse.c"
16505 break;
16506
16507 case 620: /* p_const: ":: at EXPR_BEG" cname */
16508#line 5822 "parse.y"
16509 {
16510 (yyval.node) = NEW_COLON3((yyvsp[0].id), &(yyloc), &(yylsp[-1]), &(yylsp[0]));
16511 /*% ripper: top_const_ref!($:2) %*/
16512 }
16513#line 16514 "parse.c"
16514 break;
16515
16516 case 621: /* p_const: p_const "::" cname */
16517#line 5827 "parse.y"
16518 {
16519 (yyval.node) = NEW_COLON2((yyvsp[-2].node), (yyvsp[0].id), &(yyloc), &(yylsp[-1]), &(yylsp[0]));
16520 /*% ripper: const_path_ref!($:1, $:3) %*/
16521 }
16522#line 16523 "parse.c"
16523 break;
16524
16525 case 622: /* p_const: "constant" */
16526#line 5832 "parse.y"
16527 {
16528 (yyval.node) = gettable(p, (yyvsp[0].id), &(yyloc));
16529 /*% ripper: var_ref!($:1) %*/
16530 }
16531#line 16532 "parse.c"
16532 break;
16533
16534 case 623: /* opt_rescue: k_rescue exc_list exc_var then compstmt_stmts opt_rescue */
16535#line 5841 "parse.y"
16536 {
16537 NODE *err = (yyvsp[-3].node);
16538 if ((yyvsp[-3].node)) {
16539 err = NEW_ERRINFO(&(yylsp[-3]));
16540 err = node_assign(p, (yyvsp[-3].node), err, NO_LEX_CTXT, &(yylsp[-3]));
16541 }
16542 (yyval.node) = NEW_RESBODY((yyvsp[-4].node), (yyvsp[-3].node), (yyvsp[-1].node), (yyvsp[0].node), &(yyloc));
16543 if ((yyvsp[-4].node)) {
16544 fixpos((yyval.node), (yyvsp[-4].node));
16545 }
16546 else if ((yyvsp[-3].node)) {
16547 fixpos((yyval.node), (yyvsp[-3].node));
16548 }
16549 else {
16550 fixpos((yyval.node), (yyvsp[-1].node));
16551 }
16552 /*% ripper: rescue!($:2, $:3, $:5, $:6) %*/
16553 }
16554#line 16555 "parse.c"
16555 break;
16556
16557 case 625: /* exc_list: arg_value */
16558#line 5863 "parse.y"
16559 {
16560 (yyval.node) = NEW_LIST((yyvsp[0].node), &(yyloc));
16561 /*% ripper: rb_ary_new3(1, $:1) %*/
16562 }
16563#line 16564 "parse.c"
16564 break;
16565
16566 case 626: /* exc_list: mrhs */
16567#line 5868 "parse.y"
16568 {
16569 if (!((yyval.node) = splat_array((yyvsp[0].node)))) (yyval.node) = (yyvsp[0].node);
16570 }
16571#line 16572 "parse.c"
16572 break;
16573
16574 case 628: /* exc_var: "=>" lhs */
16575#line 5875 "parse.y"
16576 {
16577 (yyval.node) = (yyvsp[0].node);
16578 /*% ripper: $:2 %*/
16579 }
16580#line 16581 "parse.c"
16581 break;
16582
16583 case 630: /* opt_ensure: k_ensure stmts option_terms */
16584#line 5883 "parse.y"
16585 {
16586 p->ctxt.in_rescue = (yyvsp[-2].ctxt).in_rescue;
16587 (yyval.node) = (yyvsp[-1].node);
16588 void_expr(p, void_stmts(p, (yyval.node)));
16589 /*% ripper: ensure!($:2) %*/
16590 }
16591#line 16592 "parse.c"
16592 break;
16593
16594 case 634: /* strings: string */
16595#line 5897 "parse.y"
16596 {
16597 if (!(yyvsp[0].node)) {
16598 (yyval.node) = NEW_STR(STRING_NEW0(), &(yyloc));
16599 }
16600 else {
16601 (yyval.node) = evstr2dstr(p, (yyvsp[0].node));
16602 }
16603 /*% ripper: $:1 %*/
16604 }
16605#line 16606 "parse.c"
16606 break;
16607
16608 case 637: /* string: string string1 */
16609#line 5911 "parse.y"
16610 {
16611 (yyval.node) = literal_concat(p, (yyvsp[-1].node), (yyvsp[0].node), &(yyloc));
16612 /*% ripper: string_concat!($:1, $:2) %*/
16613 }
16614#line 16615 "parse.c"
16615 break;
16616
16617 case 638: /* string1: "string literal" string_contents "terminator" */
16618#line 5918 "parse.y"
16619 {
16620 (yyval.node) = heredoc_dedent(p, (yyvsp[-1].node));
16621 if ((yyval.node)) nd_set_loc((yyval.node), &(yyloc));
16622 /*% ripper: $:2 %*/
16623 if (p->heredoc_indent > 0) {
16624 /*% ripper: heredoc_dedent!($:$, INT2NUM(%{p->heredoc_indent})) %*/
16625 p->heredoc_indent = 0;
16626 }
16627 /*% ripper: string_literal!($:$) %*/
16628 }
16629#line 16630 "parse.c"
16630 break;
16631
16632 case 639: /* xstring: "backtick literal" xstring_contents "terminator" */
16633#line 5931 "parse.y"
16634 {
16635 (yyval.node) = new_xstring(p, heredoc_dedent(p, (yyvsp[-1].node)), &(yyloc));
16636 /*% ripper: $:2 %*/
16637 if (p->heredoc_indent > 0) {
16638 /*% ripper: heredoc_dedent!($:$, INT2NUM(%{p->heredoc_indent})) %*/
16639 p->heredoc_indent = 0;
16640 }
16641 /*% ripper: xstring_literal!($:$) %*/
16642 }
16643#line 16644 "parse.c"
16644 break;
16645
16646 case 640: /* regexp: "regexp literal" regexp_contents tREGEXP_END */
16647#line 5943 "parse.y"
16648 {
16649 (yyval.node) = new_regexp(p, (yyvsp[-1].node), (yyvsp[0].num), &(yyloc), &(yylsp[-2]), &(yylsp[-1]), &(yylsp[0]));
16650 /*% ripper: regexp_literal!($:2, $:3) %*/
16651 }
16652#line 16653 "parse.c"
16653 break;
16654
16655 case 643: /* words_tWORDS_BEG_word_list: "word list" nonempty_list_' ' word_list "terminator" */
16656#line 3152 "parse.y"
16657 {
16658 (yyval.node) = make_list((yyvsp[-1].node), &(yyloc));
16659 /*% ripper: array!($:3) %*/
16660 }
16661#line 16662 "parse.c"
16662 break;
16663
16664 case 645: /* word_list: %empty */
16665#line 5953 "parse.y"
16666 {
16667 (yyval.node) = 0;
16668 /*% ripper: words_new! %*/
16669 }
16670#line 16671 "parse.c"
16671 break;
16672
16673 case 646: /* word_list: word_list word nonempty_list_' ' */
16674#line 5958 "parse.y"
16675 {
16676 (yyval.node) = list_append(p, (yyvsp[-2].node), evstr2dstr(p, (yyvsp[-1].node)));
16677 /*% ripper: words_add!($:1, $:2) %*/
16678 }
16679#line 16680 "parse.c"
16680 break;
16681
16682 case 648: /* word: word string_content */
16683#line 5967 "parse.y"
16684 {
16685 (yyval.node) = literal_concat(p, (yyvsp[-1].node), (yyvsp[0].node), &(yyloc));
16686 /*% ripper: word_add!($:1, $:2) %*/
16687 }
16688#line 16689 "parse.c"
16689 break;
16690
16691 case 649: /* words_tSYMBOLS_BEG_symbol_list: "symbol list" nonempty_list_' ' symbol_list "terminator" */
16692#line 3152 "parse.y"
16693 {
16694 (yyval.node) = make_list((yyvsp[-1].node), &(yyloc));
16695 /*% ripper: array!($:3) %*/
16696 }
16697#line 16698 "parse.c"
16698 break;
16699
16700 case 651: /* symbol_list: %empty */
16701#line 5977 "parse.y"
16702 {
16703 (yyval.node) = 0;
16704 /*% ripper: symbols_new! %*/
16705 }
16706#line 16707 "parse.c"
16707 break;
16708
16709 case 652: /* symbol_list: symbol_list word nonempty_list_' ' */
16710#line 5982 "parse.y"
16711 {
16712 (yyval.node) = symbol_append(p, (yyvsp[-2].node), evstr2dstr(p, (yyvsp[-1].node)));
16713 /*% ripper: symbols_add!($:1, $:2) %*/
16714 }
16715#line 16716 "parse.c"
16716 break;
16717
16718 case 653: /* words_tQWORDS_BEG_qword_list: "verbatim word list" nonempty_list_' ' qword_list "terminator" */
16719#line 3152 "parse.y"
16720 {
16721 (yyval.node) = make_list((yyvsp[-1].node), &(yyloc));
16722 /*% ripper: array!($:3) %*/
16723 }
16724#line 16725 "parse.c"
16725 break;
16726
16727 case 655: /* words_tQSYMBOLS_BEG_qsym_list: "verbatim symbol list" nonempty_list_' ' qsym_list "terminator" */
16728#line 3152 "parse.y"
16729 {
16730 (yyval.node) = make_list((yyvsp[-1].node), &(yyloc));
16731 /*% ripper: array!($:3) %*/
16732 }
16733#line 16734 "parse.c"
16734 break;
16735
16736 case 657: /* qword_list: %empty */
16737#line 5995 "parse.y"
16738 {
16739 (yyval.node) = 0;
16740 /*% ripper: qwords_new! %*/
16741 }
16742#line 16743 "parse.c"
16743 break;
16744
16745 case 658: /* qword_list: qword_list "literal content" nonempty_list_' ' */
16746#line 6000 "parse.y"
16747 {
16748 (yyval.node) = list_append(p, (yyvsp[-2].node), (yyvsp[-1].node));
16749 /*% ripper: qwords_add!($:1, $:2) %*/
16750 }
16751#line 16752 "parse.c"
16752 break;
16753
16754 case 659: /* qsym_list: %empty */
16755#line 6007 "parse.y"
16756 {
16757 (yyval.node) = 0;
16758 /*% ripper: qsymbols_new! %*/
16759 }
16760#line 16761 "parse.c"
16761 break;
16762
16763 case 660: /* qsym_list: qsym_list "literal content" nonempty_list_' ' */
16764#line 6012 "parse.y"
16765 {
16766 (yyval.node) = symbol_append(p, (yyvsp[-2].node), (yyvsp[-1].node));
16767 /*% ripper: qsymbols_add!($:1, $:2) %*/
16768 }
16769#line 16770 "parse.c"
16770 break;
16771
16772 case 661: /* string_contents: %empty */
16773#line 6019 "parse.y"
16774 {
16775 (yyval.node) = 0;
16776 /*% ripper: string_content! %*/
16777 }
16778#line 16779 "parse.c"
16779 break;
16780
16781 case 662: /* string_contents: string_contents string_content */
16782#line 6024 "parse.y"
16783 {
16784 (yyval.node) = literal_concat(p, (yyvsp[-1].node), (yyvsp[0].node), &(yyloc));
16785 /*% ripper: string_add!($:1, $:2) %*/
16786 }
16787#line 16788 "parse.c"
16788 break;
16789
16790 case 663: /* xstring_contents: %empty */
16791#line 6031 "parse.y"
16792 {
16793 (yyval.node) = 0;
16794 /*% ripper: xstring_new! %*/
16795 }
16796#line 16797 "parse.c"
16797 break;
16798
16799 case 664: /* xstring_contents: xstring_contents string_content */
16800#line 6036 "parse.y"
16801 {
16802 (yyval.node) = literal_concat(p, (yyvsp[-1].node), (yyvsp[0].node), &(yyloc));
16803 /*% ripper: xstring_add!($:1, $:2) %*/
16804 }
16805#line 16806 "parse.c"
16806 break;
16807
16808 case 665: /* regexp_contents: %empty */
16809#line 6043 "parse.y"
16810 {
16811 (yyval.node) = 0;
16812 /*% ripper: regexp_new! %*/
16813 }
16814#line 16815 "parse.c"
16815 break;
16816
16817 case 666: /* regexp_contents: regexp_contents string_content */
16818#line 6048 "parse.y"
16819 {
16820 NODE *head = (yyvsp[-1].node), *tail = (yyvsp[0].node);
16821 if (!head) {
16822 (yyval.node) = tail;
16823 }
16824 else if (!tail) {
16825 (yyval.node) = head;
16826 }
16827 else {
16828 switch (nd_type(head)) {
16829 case NODE_STR:
16830 head = str2dstr(p, head);
16831 break;
16832 case NODE_DSTR:
16833 break;
16834 default:
16835 head = list_append(p, NEW_DSTR(0, &(yyloc)), head);
16836 break;
16837 }
16838 (yyval.node) = list_append(p, head, tail);
16839 }
16840 /*% ripper: regexp_add!($:1, $:2) %*/
16841 }
16842#line 16843 "parse.c"
16843 break;
16844
16845 case 668: /* @33: %empty */
16846#line 6076 "parse.y"
16847 {
16848 /* need to backup p->lex.strterm so that a string literal `%&foo,#$&,bar&` can be parsed */
16849 (yyval.strterm) = p->lex.strterm;
16850 p->lex.strterm = 0;
16851 SET_LEX_STATE(EXPR_BEG);
16852 }
16853#line 16854 "parse.c"
16854 break;
16855
16856 case 669: /* string_content: tSTRING_DVAR @33 string_dvar */
16857#line 6083 "parse.y"
16858 {
16859 p->lex.strterm = (yyvsp[-1].strterm);
16860 (yyval.node) = NEW_EVSTR((yyvsp[0].node), &(yyloc), &(yylsp[-2]), &NULL_LOC);
16861 nd_set_line((yyval.node), (yylsp[0]).end_pos.lineno);
16862 /*% ripper: string_dvar!($:3) %*/
16863 }
16864#line 16865 "parse.c"
16865 break;
16866
16867 case 670: /* @34: %empty */
16868#line 6090 "parse.y"
16869 {
16870 CMDARG_PUSH(0);
16871 COND_PUSH(0);
16872 /* need to backup p->lex.strterm so that a string literal `%!foo,#{ !0 },bar!` can be parsed */
16873 (yyval.strterm) = p->lex.strterm;
16874 p->lex.strterm = 0;
16875 SET_LEX_STATE(EXPR_BEG);
16876 }
16877#line 16878 "parse.c"
16878 break;
16879
16880 case 671: /* @35: %empty */
16881#line 6098 "parse.y"
16882 {
16883 (yyval.num) = p->lex.brace_nest;
16884 p->lex.brace_nest = 0;
16885 }
16886#line 16887 "parse.c"
16887 break;
16888
16889 case 672: /* @36: %empty */
16890#line 6102 "parse.y"
16891 {
16892 (yyval.num) = p->heredoc_indent;
16893 p->heredoc_indent = 0;
16894 }
16895#line 16896 "parse.c"
16896 break;
16897
16898 case 673: /* string_content: "'#{'" @34 @35 @36 compstmt_stmts string_dend */
16899#line 6107 "parse.y"
16900 {
16901 COND_POP();
16902 CMDARG_POP();
16903 p->lex.strterm = (yyvsp[-4].strterm);
16904 SET_LEX_STATE((yyvsp[-5].state));
16905 p->lex.brace_nest = (yyvsp[-3].num);
16906 p->heredoc_indent = (yyvsp[-2].num);
16907 p->heredoc_line_indent = -1;
16908 if ((yyvsp[-1].node)) nd_unset_fl_newline((yyvsp[-1].node));
16909 (yyval.node) = new_evstr(p, (yyvsp[-1].node), &(yyloc), &(yylsp[-5]), &(yylsp[0]));
16910 /*% ripper: string_embexpr!($:compstmt) %*/
16911 }
16912#line 16913 "parse.c"
16913 break;
16914
16915 case 676: /* string_dvar: nonlocal_var */
16916#line 6126 "parse.y"
16917 {
16918 if (!((yyval.node) = gettable(p, (yyvsp[0].id), &(yyloc)))) (yyval.node) = NEW_ERROR(&(yyloc));
16919 /*% ripper: var_ref!($:1) %*/
16920 }
16921#line 16922 "parse.c"
16922 break;
16923
16924 case 680: /* ssym: "symbol literal" sym */
16925#line 6138 "parse.y"
16926 {
16927 SET_LEX_STATE(EXPR_END);
16928 VALUE str = rb_id2str((yyvsp[0].id));
16929 /*
16930 * TODO:
16931 * set_yylval_noname sets invalid id to yylval.
16932 * This branch can be removed once yylval is changed to
16933 * hold lexed string.
16934 */
16935 if (!str) str = STR_NEW0();
16936 (yyval.node) = NEW_SYM(str, &(yyloc));
16937 /*% ripper: symbol_literal!(symbol!($:2)) %*/
16938 }
16939#line 16940 "parse.c"
16940 break;
16941
16942 case 683: /* dsym: "symbol literal" string_contents "terminator" */
16943#line 6158 "parse.y"
16944 {
16945 SET_LEX_STATE(EXPR_END);
16946 (yyval.node) = dsym_node(p, (yyvsp[-1].node), &(yyloc));
16947 /*% ripper: dyna_symbol!($:2) %*/
16948 }
16949#line 16950 "parse.c"
16950 break;
16951
16952 case 685: /* numeric: tUMINUS_NUM simple_numeric */
16953#line 6167 "parse.y"
16954 {
16955 (yyval.node) = (yyvsp[0].node);
16956 negate_lit(p, (yyval.node));
16957 /*% ripper: unary!(ID2VAL(idUMinus), $:2) %*/
16958 }
16959#line 16960 "parse.c"
16960 break;
16961
16962 case 696: /* keyword_variable: "'nil'" */
16963#line 6189 "parse.y"
16964 {(yyval.id) = KWD2EID(nil, (yyvsp[0].id));}
16965#line 16966 "parse.c"
16966 break;
16967
16968 case 697: /* keyword_variable: "'self'" */
16969#line 6190 "parse.y"
16970 {(yyval.id) = KWD2EID(self, (yyvsp[0].id));}
16971#line 16972 "parse.c"
16972 break;
16973
16974 case 698: /* keyword_variable: "'true'" */
16975#line 6191 "parse.y"
16976 {(yyval.id) = KWD2EID(true, (yyvsp[0].id));}
16977#line 16978 "parse.c"
16978 break;
16979
16980 case 699: /* keyword_variable: "'false'" */
16981#line 6192 "parse.y"
16982 {(yyval.id) = KWD2EID(false, (yyvsp[0].id));}
16983#line 16984 "parse.c"
16984 break;
16985
16986 case 700: /* keyword_variable: "'__FILE__'" */
16987#line 6193 "parse.y"
16988 {(yyval.id) = KWD2EID(_FILE__, (yyvsp[0].id));}
16989#line 16990 "parse.c"
16990 break;
16991
16992 case 701: /* keyword_variable: "'__LINE__'" */
16993#line 6194 "parse.y"
16994 {(yyval.id) = KWD2EID(_LINE__, (yyvsp[0].id));}
16995#line 16996 "parse.c"
16996 break;
16997
16998 case 702: /* keyword_variable: "'__ENCODING__'" */
16999#line 6195 "parse.y"
17000 {(yyval.id) = KWD2EID(_ENCODING__, (yyvsp[0].id));}
17001#line 17002 "parse.c"
17002 break;
17003
17004 case 703: /* var_ref: user_variable */
17005#line 6199 "parse.y"
17006 {
17007 if (!((yyval.node) = gettable(p, (yyvsp[0].id), &(yyloc)))) (yyval.node) = NEW_ERROR(&(yyloc));
17008 if (ifdef_ripper(id_is_var(p, (yyvsp[0].id)), false)) {
17009 /*% ripper: var_ref!($:1) %*/
17010 }
17011 else {
17012 /*% ripper: vcall!($:1) %*/
17013 }
17014 }
17015#line 17016 "parse.c"
17016 break;
17017
17018 case 704: /* var_ref: keyword_variable */
17019#line 6209 "parse.y"
17020 {
17021 if (!((yyval.node) = gettable(p, (yyvsp[0].id), &(yyloc)))) (yyval.node) = NEW_ERROR(&(yyloc));
17022 /*% ripper: var_ref!($:1) %*/
17023 }
17024#line 17025 "parse.c"
17025 break;
17026
17027 case 705: /* var_lhs: user_variable */
17028#line 6216 "parse.y"
17029 {
17030 /*% ripper: var_field!($:1) %*/
17031 (yyval.node) = assignable(p, (yyvsp[0].id), 0, &(yyloc));
17032 }
17033#line 17034 "parse.c"
17034 break;
17035
17036 case 706: /* var_lhs: keyword_variable */
17037#line 6216 "parse.y"
17038 {
17039 /*% ripper: var_field!($:1) %*/
17040 (yyval.node) = assignable(p, (yyvsp[0].id), 0, &(yyloc));
17041 }
17042#line 17043 "parse.c"
17043 break;
17044
17045 case 709: /* $@37: %empty */
17046#line 6227 "parse.y"
17047 {
17048 SET_LEX_STATE(EXPR_BEG);
17049 p->command_start = TRUE;
17050 }
17051#line 17052 "parse.c"
17052 break;
17053
17054 case 710: /* superclass: '<' $@37 expr_value term */
17055#line 6232 "parse.y"
17056 {
17057 (yyval.node) = (yyvsp[-1].node);
17058 /*% ripper: $:3 %*/
17059 }
17060#line 17061 "parse.c"
17061 break;
17062
17063 case 713: /* f_opt_paren_args: none */
17064#line 6241 "parse.y"
17065 {
17066 p->ctxt.in_argdef = 0;
17067 (yyval.node_args) = new_args_tail(p, 0, 0, 0, &(yylsp[-1]));
17068 (yyval.node_args) = new_args(p, 0, 0, 0, 0, (yyval.node_args), &(yylsp[-1]));
17069 /*% ripper: params!(Qnil, Qnil, Qnil, Qnil, Qnil, Qnil, Qnil) %*/
17070 }
17071#line 17072 "parse.c"
17072 break;
17073
17074 case 714: /* f_paren_args: '(' f_args rparen */
17075#line 6250 "parse.y"
17076 {
17077 (yyval.node_args) = (yyvsp[-1].node_args);
17078 /*% ripper: paren!($:2) %*/
17079 SET_LEX_STATE(EXPR_BEG);
17080 p->command_start = TRUE;
17081 p->ctxt.in_argdef = 0;
17082 }
17083#line 17084 "parse.c"
17084 break;
17085
17086 case 716: /* @38: %empty */
17087#line 6260 "parse.y"
17088 {
17089 (yyval.ctxt) = p->ctxt;
17090 p->ctxt.in_kwarg = 1;
17091 p->ctxt.in_argdef = 1;
17092 SET_LEX_STATE(p->lex.state|EXPR_LABEL); /* force for args */
17093 }
17094#line 17095 "parse.c"
17095 break;
17096
17097 case 717: /* f_arglist: @38 f_args term */
17098#line 6267 "parse.y"
17099 {
17100 p->ctxt.in_kwarg = (yyvsp[-2].ctxt).in_kwarg;
17101 p->ctxt.in_argdef = 0;
17102 (yyval.node_args) = (yyvsp[-1].node_args);
17103 SET_LEX_STATE(EXPR_BEG);
17104 p->command_start = TRUE;
17105 /*% ripper: $:2 %*/
17106 }
17107#line 17108 "parse.c"
17108 break;
17109
17110 case 718: /* f_kw_arg_value: f_label arg_value */
17111#line 3003 "parse.y"
17112 {
17113 p->ctxt.in_argdef = 1;
17114 (yyval.node_kw_arg) = new_kw_arg(p, assignable(p, (yyvsp[-1].id), (yyvsp[0].node), &(yyloc)), &(yyloc));
17115 /*% ripper: [$:$, $:value] %*/
17116 }
17117#line 17118 "parse.c"
17118 break;
17119
17120 case 719: /* f_kw_arg_value: f_label */
17121#line 3009 "parse.y"
17122 {
17123 p->ctxt.in_argdef = 1;
17124 (yyval.node_kw_arg) = new_kw_arg(p, assignable(p, (yyvsp[0].id), NODE_SPECIAL_REQUIRED_KEYWORD, &(yyloc)), &(yyloc));
17125 /*% ripper: [$:$, 0] %*/
17126 }
17127#line 17128 "parse.c"
17128 break;
17129
17130 case 720: /* f_kwarg_arg_value: f_kw_arg_value */
17131#line 3018 "parse.y"
17132 {
17133 (yyval.node_kw_arg) = (yyvsp[0].node_kw_arg);
17134 /*% ripper: rb_ary_new3(1, $:1) %*/
17135 }
17136#line 17137 "parse.c"
17137 break;
17138
17139 case 721: /* f_kwarg_arg_value: f_kwarg_arg_value ',' f_kw_arg_value */
17140#line 3023 "parse.y"
17141 {
17142 (yyval.node_kw_arg) = kwd_append((yyvsp[-2].node_kw_arg), (yyvsp[0].node_kw_arg));
17143 /*% ripper: rb_ary_push($:1, $:3) %*/
17144 }
17145#line 17146 "parse.c"
17146 break;
17147
17148 case 722: /* args_tail_basic_arg_value: f_kwarg_arg_value ',' f_kwrest opt_f_block_arg */
17149#line 2927 "parse.y"
17150 {
17151 (yyval.node_args) = new_args_tail(p, (yyvsp[-3].node_kw_arg), (yyvsp[-1].id), (yyvsp[0].id), &(yylsp[-1]));
17152 /*% ripper: [$:1, $:3, $:4] %*/
17153 }
17154#line 17155 "parse.c"
17155 break;
17156
17157 case 723: /* args_tail_basic_arg_value: f_kwarg_arg_value opt_f_block_arg */
17158#line 2932 "parse.y"
17159 {
17160 (yyval.node_args) = new_args_tail(p, (yyvsp[-1].node_kw_arg), 0, (yyvsp[0].id), &(yylsp[-1]));
17161 /*% ripper: [$:1, Qnil, $:2] %*/
17162 }
17163#line 17164 "parse.c"
17164 break;
17165
17166 case 724: /* args_tail_basic_arg_value: f_any_kwrest opt_f_block_arg */
17167#line 2937 "parse.y"
17168 {
17169 (yyval.node_args) = new_args_tail(p, 0, (yyvsp[-1].id), (yyvsp[0].id), &(yylsp[-1]));
17170 /*% ripper: [Qnil, $:1, $:2] %*/
17171 }
17172#line 17173 "parse.c"
17173 break;
17174
17175 case 725: /* args_tail_basic_arg_value: f_block_arg */
17176#line 2942 "parse.y"
17177 {
17178 (yyval.node_args) = new_args_tail(p, 0, 0, (yyvsp[0].id), &(yylsp[0]));
17179 /*% ripper: [Qnil, Qnil, $:1] %*/
17180 }
17181#line 17182 "parse.c"
17182 break;
17183
17184 case 727: /* args_tail: args_forward */
17185#line 6279 "parse.y"
17186 {
17187 ID fwd = (yyvsp[0].id);
17188 if (lambda_beginning_p() ||
17189 (p->lex.lpar_beg >= 0 && p->lex.lpar_beg+1 == p->lex.paren_nest)) {
17190 yyerror0("unexpected ... in lambda argument");
17191 fwd = 0;
17192 }
17193 else {
17194 add_forwarding_args(p);
17195 }
17196 (yyval.node_args) = new_args_tail(p, 0, fwd, arg_FWD_BLOCK, &(yylsp[0]));
17197 (yyval.node_args)->nd_ainfo.forwarding = 1;
17198 /*% ripper: [Qnil, $:1, Qnil] %*/
17199 }
17200#line 17201 "parse.c"
17201 break;
17202
17203 case 728: /* f_opt_arg_value: f_arg_asgn f_eq arg_value */
17204#line 2981 "parse.y"
17205 {
17206 p->ctxt.in_argdef = 1;
17207 (yyval.node_opt_arg) = NEW_OPT_ARG(assignable(p, (yyvsp[-2].id), (yyvsp[0].node), &(yyloc)), &(yyloc));
17208 /*% ripper: [$:$, $:3] %*/
17209 }
17210#line 17211 "parse.c"
17211 break;
17212
17213 case 729: /* f_opt_arg_arg_value: f_opt_arg_value */
17214#line 2990 "parse.y"
17215 {
17216 (yyval.node_opt_arg) = (yyvsp[0].node_opt_arg);
17217 /*% ripper: rb_ary_new3(1, $:1) %*/
17218 }
17219#line 17220 "parse.c"
17220 break;
17221
17222 case 730: /* f_opt_arg_arg_value: f_opt_arg_arg_value ',' f_opt_arg_value */
17223#line 2995 "parse.y"
17224 {
17225 (yyval.node_opt_arg) = opt_arg_append((yyvsp[-2].node_opt_arg), (yyvsp[0].node_opt_arg));
17226 /*% ripper: rb_ary_push($:1, $:3) %*/
17227 }
17228#line 17229 "parse.c"
17229 break;
17230
17231 case 731: /* opt_args_tail_args_tail: ',' args_tail */
17232#line 3090 "parse.y"
17233 {
17234 (yyval.node_args) = (yyvsp[0].node_args);
17235 /*% ripper: $:2 %*/
17236 }
17237#line 17238 "parse.c"
17238 break;
17239
17240 case 732: /* opt_args_tail_args_tail: %empty */
17241#line 3095 "parse.y"
17242 {
17243 (yyval.node_args) = new_args_tail(p, 0, 0, 0, &(yylsp[0]));
17244 /*% ripper: [Qnil, Qnil, Qnil] %*/
17245 }
17246#line 17247 "parse.c"
17247 break;
17248
17249 case 733: /* f_args: f_arg ',' f_opt_arg_arg_value ',' f_rest_arg opt_args_tail_args_tail */
17250#line 6296 "parse.y"
17251 {
17252 (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));
17253 /*% ripper: params!($:1, $:3, $:5, Qnil, *$:6[0..2]) %*/
17254 }
17255#line 17256 "parse.c"
17256 break;
17257
17258 case 734: /* f_args: f_arg ',' f_opt_arg_arg_value ',' f_rest_arg ',' f_arg opt_args_tail_args_tail */
17259#line 6301 "parse.y"
17260 {
17261 (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));
17262 /*% ripper: params!($:1, $:3, $:5, $:7, *$:8[0..2]) %*/
17263 }
17264#line 17265 "parse.c"
17265 break;
17266
17267 case 735: /* f_args: f_arg ',' f_opt_arg_arg_value opt_args_tail_args_tail */
17268#line 6306 "parse.y"
17269 {
17270 (yyval.node_args) = new_args(p, (yyvsp[-3].node_args_aux), (yyvsp[-1].node_opt_arg), 0, 0, (yyvsp[0].node_args), &(yyloc));
17271 /*% ripper: params!($:1, $:3, Qnil, Qnil, *$:4[0..2]) %*/
17272 }
17273#line 17274 "parse.c"
17274 break;
17275
17276 case 736: /* f_args: f_arg ',' f_opt_arg_arg_value ',' f_arg opt_args_tail_args_tail */
17277#line 6311 "parse.y"
17278 {
17279 (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));
17280 /*% ripper: params!($:1, $:3, Qnil, $:5, *$:6[0..2]) %*/
17281 }
17282#line 17283 "parse.c"
17283 break;
17284
17285 case 737: /* f_args: f_arg ',' f_rest_arg opt_args_tail_args_tail */
17286#line 6316 "parse.y"
17287 {
17288 (yyval.node_args) = new_args(p, (yyvsp[-3].node_args_aux), 0, (yyvsp[-1].id), 0, (yyvsp[0].node_args), &(yyloc));
17289 /*% ripper: params!($:1, Qnil, $:3, Qnil, *$:4[0..2]) %*/
17290 }
17291#line 17292 "parse.c"
17292 break;
17293
17294 case 738: /* f_args: f_arg ',' f_rest_arg ',' f_arg opt_args_tail_args_tail */
17295#line 6321 "parse.y"
17296 {
17297 (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));
17298 /*% ripper: params!($:1, Qnil, $:3, $:5, *$:6[0..2]) %*/
17299 }
17300#line 17301 "parse.c"
17301 break;
17302
17303 case 739: /* f_args: f_arg opt_args_tail_args_tail */
17304#line 6326 "parse.y"
17305 {
17306 (yyval.node_args) = new_args(p, (yyvsp[-1].node_args_aux), 0, 0, 0, (yyvsp[0].node_args), &(yyloc));
17307 /*% ripper: params!($:1, Qnil, Qnil, Qnil, *$:2[0..2]) %*/
17308 }
17309#line 17310 "parse.c"
17310 break;
17311
17312 case 740: /* f_args: f_opt_arg_arg_value ',' f_rest_arg opt_args_tail_args_tail */
17313#line 6331 "parse.y"
17314 {
17315 (yyval.node_args) = new_args(p, 0, (yyvsp[-3].node_opt_arg), (yyvsp[-1].id), 0, (yyvsp[0].node_args), &(yyloc));
17316 /*% ripper: params!(Qnil, $:1, $:3, Qnil, *$:4[0..2]) %*/
17317 }
17318#line 17319 "parse.c"
17319 break;
17320
17321 case 741: /* f_args: f_opt_arg_arg_value ',' f_rest_arg ',' f_arg opt_args_tail_args_tail */
17322#line 6336 "parse.y"
17323 {
17324 (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));
17325 /*% ripper: params!(Qnil, $:1, $:3, $:5, *$:6[0..2]) %*/
17326 }
17327#line 17328 "parse.c"
17328 break;
17329
17330 case 742: /* f_args: f_opt_arg_arg_value opt_args_tail_args_tail */
17331#line 6341 "parse.y"
17332 {
17333 (yyval.node_args) = new_args(p, 0, (yyvsp[-1].node_opt_arg), 0, 0, (yyvsp[0].node_args), &(yyloc));
17334 /*% ripper: params!(Qnil, $:1, Qnil, Qnil, *$:2[0..2]) %*/
17335 }
17336#line 17337 "parse.c"
17337 break;
17338
17339 case 743: /* f_args: f_opt_arg_arg_value ',' f_arg opt_args_tail_args_tail */
17340#line 6346 "parse.y"
17341 {
17342 (yyval.node_args) = new_args(p, 0, (yyvsp[-3].node_opt_arg), 0, (yyvsp[-1].node_args_aux), (yyvsp[0].node_args), &(yyloc));
17343 /*% ripper: params!(Qnil, $:1, Qnil, $:3, *$:4[0..2]) %*/
17344 }
17345#line 17346 "parse.c"
17346 break;
17347
17348 case 744: /* f_args: f_rest_arg opt_args_tail_args_tail */
17349#line 6351 "parse.y"
17350 {
17351 (yyval.node_args) = new_args(p, 0, 0, (yyvsp[-1].id), 0, (yyvsp[0].node_args), &(yyloc));
17352 /*% ripper: params!(Qnil, Qnil, $:1, Qnil, *$:2[0..2]) %*/
17353 }
17354#line 17355 "parse.c"
17355 break;
17356
17357 case 745: /* f_args: f_rest_arg ',' f_arg opt_args_tail_args_tail */
17358#line 6356 "parse.y"
17359 {
17360 (yyval.node_args) = new_args(p, 0, 0, (yyvsp[-3].id), (yyvsp[-1].node_args_aux), (yyvsp[0].node_args), &(yyloc));
17361 /*% ripper: params!(Qnil, Qnil, $:1, $:3, *$:4[0..2]) %*/
17362 }
17363#line 17364 "parse.c"
17364 break;
17365
17366 case 746: /* f_args: args_tail */
17367#line 6361 "parse.y"
17368 {
17369 (yyval.node_args) = new_args(p, 0, 0, 0, 0, (yyvsp[0].node_args), &(yyloc));
17370 /*% ripper: params!(Qnil, Qnil, Qnil, Qnil, *$:1[0..2]) %*/
17371 }
17372#line 17373 "parse.c"
17373 break;
17374
17375 case 747: /* f_args: %empty */
17376#line 6366 "parse.y"
17377 {
17378 (yyval.node_args) = new_args_tail(p, 0, 0, 0, &(yylsp[0]));
17379 (yyval.node_args) = new_args(p, 0, 0, 0, 0, (yyval.node_args), &(yylsp[0]));
17380 /*% ripper: params!(Qnil, Qnil, Qnil, Qnil, Qnil, Qnil, Qnil) %*/
17381 }
17382#line 17383 "parse.c"
17383 break;
17384
17385 case 748: /* args_forward: "(..." */
17386#line 6374 "parse.y"
17387 {
17388#ifdef FORWARD_ARGS_WITH_RUBY2_KEYWORDS
17389 (yyval.id) = 0;
17390#else
17391 (yyval.id) = idFWD_KWREST;
17392#endif
17393 /*% ripper: args_forward! %*/
17394 }
17395#line 17396 "parse.c"
17396 break;
17397
17398 case 749: /* f_bad_arg: "constant" */
17399#line 6385 "parse.y"
17400 {
17401 static const char mesg[] = "formal argument cannot be a constant";
17402 /*%%%*/
17403 yyerror1(&(yylsp[0]), mesg);
17404 /*% %*/
17405 (yyval.id) = 0;
17406 /*% ripper[error]: param_error!(ERR_MESG(), $:1) %*/
17407 }
17408#line 17409 "parse.c"
17409 break;
17410
17411 case 750: /* f_bad_arg: "instance variable" */
17412#line 6394 "parse.y"
17413 {
17414 static const char mesg[] = "formal argument cannot be an instance variable";
17415 /*%%%*/
17416 yyerror1(&(yylsp[0]), mesg);
17417 /*% %*/
17418 (yyval.id) = 0;
17419 /*% ripper[error]: param_error!(ERR_MESG(), $:1) %*/
17420 }
17421#line 17422 "parse.c"
17422 break;
17423
17424 case 751: /* f_bad_arg: "global variable" */
17425#line 6403 "parse.y"
17426 {
17427 static const char mesg[] = "formal argument cannot be a global variable";
17428 /*%%%*/
17429 yyerror1(&(yylsp[0]), mesg);
17430 /*% %*/
17431 (yyval.id) = 0;
17432 /*% ripper[error]: param_error!(ERR_MESG(), $:1) %*/
17433 }
17434#line 17435 "parse.c"
17435 break;
17436
17437 case 752: /* f_bad_arg: "class variable" */
17438#line 6412 "parse.y"
17439 {
17440 static const char mesg[] = "formal argument cannot be a class variable";
17441 /*%%%*/
17442 yyerror1(&(yylsp[0]), mesg);
17443 /*% %*/
17444 (yyval.id) = 0;
17445 /*% ripper[error]: param_error!(ERR_MESG(), $:1) %*/
17446 }
17447#line 17448 "parse.c"
17448 break;
17449
17450 case 754: /* f_norm_arg: "local variable or method" */
17451#line 6424 "parse.y"
17452 {
17453 VALUE e = formal_argument_error(p, (yyval.id) = (yyvsp[0].id));
17454 if (e) {
17455 /*% ripper[error]: param_error!(?e, $:1) %*/
17456 }
17457 p->max_numparam = ORDINAL_PARAM;
17458 }
17459#line 17460 "parse.c"
17460 break;
17461
17462 case 755: /* f_arg_asgn: f_norm_arg */
17463#line 6434 "parse.y"
17464 {
17465 arg_var(p, (yyvsp[0].id));
17466 (yyval.id) = (yyvsp[0].id);
17467 }
17468#line 17469 "parse.c"
17469 break;
17470
17471 case 756: /* f_arg_item: f_arg_asgn */
17472#line 6441 "parse.y"
17473 {
17474 (yyval.node_args_aux) = NEW_ARGS_AUX((yyvsp[0].id), 1, &NULL_LOC);
17475 /*% ripper: $:1 %*/
17476 }
17477#line 17478 "parse.c"
17478 break;
17479
17480 case 757: /* f_arg_item: "(" f_margs rparen */
17481#line 6446 "parse.y"
17482 {
17483 ID tid = internal_id(p);
17484 YYLTYPE loc;
17485 loc.beg_pos = (yylsp[-1]).beg_pos;
17486 loc.end_pos = (yylsp[-1]).beg_pos;
17487 arg_var(p, tid);
17488 if (dyna_in_block(p)) {
17489 (yyvsp[-1].node_masgn)->nd_value = NEW_DVAR(tid, &loc);
17490 }
17491 else {
17492 (yyvsp[-1].node_masgn)->nd_value = NEW_LVAR(tid, &loc);
17493 }
17494 (yyval.node_args_aux) = NEW_ARGS_AUX(tid, 1, &NULL_LOC);
17495 (yyval.node_args_aux)->nd_next = (NODE *)(yyvsp[-1].node_masgn);
17496 /*% ripper: mlhs_paren!($:2) %*/
17497 }
17498#line 17499 "parse.c"
17499 break;
17500
17501 case 759: /* f_arg: f_arg ',' f_arg_item */
17502#line 6467 "parse.y"
17503 {
17504 (yyval.node_args_aux) = (yyvsp[-2].node_args_aux);
17505 (yyval.node_args_aux)->nd_plen++;
17506 (yyval.node_args_aux)->nd_next = block_append(p, (yyval.node_args_aux)->nd_next, (yyvsp[0].node_args_aux)->nd_next);
17507 rb_discard_node(p, (NODE *)(yyvsp[0].node_args_aux));
17508 /*% ripper: rb_ary_push($:1, $:3) %*/
17509 }
17510#line 17511 "parse.c"
17511 break;
17512
17513 case 760: /* f_label: "label" */
17514#line 6478 "parse.y"
17515 {
17516 VALUE e = formal_argument_error(p, (yyval.id) = (yyvsp[0].id));
17517 if (e) {
17518 (yyval.id) = 0;
17519 /*% ripper[error]: param_error!(?e, $:1) %*/
17520 }
17521 /*
17522 * Workaround for Prism::ParseTest#test_filepath for
17523 * "unparser/corpus/literal/def.txt"
17524 *
17525 * See the discussion on https://github.com/ruby/ruby/pull/9923
17526 */
17527 arg_var(p, ifdef_ripper(0, (yyvsp[0].id)));
17528 /*% ripper: $:1 %*/
17529 p->max_numparam = ORDINAL_PARAM;
17530 p->ctxt.in_argdef = 0;
17531 }
17532#line 17533 "parse.c"
17533 break;
17534
17535 case 763: /* f_no_kwarg: p_kwnorest */
17536#line 6502 "parse.y"
17537 {
17538 /*% ripper: nokw_param!(Qnil) %*/
17539 }
17540#line 17541 "parse.c"
17541 break;
17542
17543 case 764: /* f_kwrest: kwrest_mark "local variable or method" */
17544#line 6508 "parse.y"
17545 {
17546 arg_var(p, shadowing_lvar(p, (yyvsp[0].id)));
17547 (yyval.id) = (yyvsp[0].id);
17548 /*% ripper: kwrest_param!($:2) %*/
17549 }
17550#line 17551 "parse.c"
17551 break;
17552
17553 case 765: /* f_kwrest: kwrest_mark */
17554#line 6514 "parse.y"
17555 {
17556 arg_var(p, idFWD_KWREST);
17557 (yyval.id) = idFWD_KWREST;
17558 /*% ripper: kwrest_param!(Qnil) %*/
17559 }
17560#line 17561 "parse.c"
17561 break;
17562
17563 case 768: /* f_rest_arg: restarg_mark "local variable or method" */
17564#line 6526 "parse.y"
17565 {
17566 arg_var(p, shadowing_lvar(p, (yyvsp[0].id)));
17567 (yyval.id) = (yyvsp[0].id);
17568 /*% ripper: rest_param!($:2) %*/
17569 }
17570#line 17571 "parse.c"
17571 break;
17572
17573 case 769: /* f_rest_arg: restarg_mark */
17574#line 6532 "parse.y"
17575 {
17576 arg_var(p, idFWD_REST);
17577 (yyval.id) = idFWD_REST;
17578 /*% ripper: rest_param!(Qnil) %*/
17579 }
17580#line 17581 "parse.c"
17581 break;
17582
17583 case 772: /* f_block_arg: blkarg_mark "local variable or method" */
17584#line 6544 "parse.y"
17585 {
17586 arg_var(p, shadowing_lvar(p, (yyvsp[0].id)));
17587 (yyval.id) = (yyvsp[0].id);
17588 /*% ripper: blockarg!($:2) %*/
17589 }
17590#line 17591 "parse.c"
17591 break;
17592
17593 case 773: /* f_block_arg: blkarg_mark */
17594#line 6550 "parse.y"
17595 {
17596 arg_var(p, idFWD_BLOCK);
17597 (yyval.id) = idFWD_BLOCK;
17598 /*% ripper: blockarg!(Qnil) %*/
17599 }
17600#line 17601 "parse.c"
17601 break;
17602
17603 case 774: /* opt_f_block_arg: ',' f_block_arg */
17604#line 6558 "parse.y"
17605 {
17606 (yyval.id) = (yyvsp[0].id);
17607 /*% ripper: $:2 %*/
17608 }
17609#line 17610 "parse.c"
17610 break;
17611
17612 case 776: /* value_expr_singleton_expr: singleton_expr */
17613#line 3144 "parse.y"
17614 {
17615 value_expr((yyvsp[0].node));
17616 (yyval.node) = (yyvsp[0].node);
17617 }
17618#line 17619 "parse.c"
17619 break;
17620
17621 case 777: /* singleton: value_expr_singleton_expr */
17622#line 6567 "parse.y"
17623 {
17624 NODE *expr = last_expr_node((yyvsp[0].node));
17625 switch (nd_type(expr)) {
17626 case NODE_STR:
17627 case NODE_DSTR:
17628 case NODE_XSTR:
17629 case NODE_DXSTR:
17630 case NODE_REGX:
17631 case NODE_DREGX:
17632 case NODE_SYM:
17633 case NODE_LINE:
17634 case NODE_FILE:
17635 case NODE_ENCODING:
17636 case NODE_INTEGER:
17637 case NODE_FLOAT:
17638 case NODE_RATIONAL:
17639 case NODE_IMAGINARY:
17640 case NODE_DSYM:
17641 case NODE_LIST:
17642 case NODE_ZLIST:
17643 yyerror1(&expr->nd_loc, "can't define singleton method for literals");
17644 break;
17645 default:
17646 break;
17647 }
17648 (yyval.node) = (yyvsp[0].node);
17649 }
17650#line 17651 "parse.c"
17651 break;
17652
17653 case 779: /* $@39: %empty */
17654#line 6598 "parse.y"
17655 {
17656 SET_LEX_STATE(EXPR_BEG);
17657 p->ctxt.in_argdef = 0;
17658 }
17659#line 17660 "parse.c"
17660 break;
17661
17662 case 780: /* singleton_expr: '(' $@39 expr rparen */
17663#line 6603 "parse.y"
17664 {
17665 p->ctxt.in_argdef = 1;
17666 (yyval.node) = (yyvsp[-1].node);
17667 /*% ripper: paren!($:3) %*/
17668 }
17669#line 17670 "parse.c"
17670 break;
17671
17672 case 782: /* assoc_list: assocs trailer */
17673#line 6612 "parse.y"
17674 {
17675 (yyval.node) = (yyvsp[-1].node);
17676 /*% ripper: assoclist_from_args!($:1) %*/
17677 }
17678#line 17679 "parse.c"
17679 break;
17680
17681 case 784: /* assocs: assocs ',' assoc */
17682#line 6621 "parse.y"
17683 {
17684 NODE *assocs = (yyvsp[-2].node);
17685 NODE *tail = (yyvsp[0].node);
17686 if (!assocs) {
17687 assocs = tail;
17688 }
17689 else if (tail) {
17690 if (RNODE_LIST(assocs)->nd_head) {
17691 NODE *n = RNODE_LIST(tail)->nd_next;
17692 if (!RNODE_LIST(tail)->nd_head && nd_type_p(n, NODE_LIST) &&
17693 nd_type_p((n = RNODE_LIST(n)->nd_head), NODE_HASH)) {
17694 /* DSTAR */
17695 tail = RNODE_HASH(n)->nd_head;
17696 }
17697 }
17698 if (tail) {
17699 assocs = list_concat(assocs, tail);
17700 }
17701 }
17702 (yyval.node) = assocs;
17703 /*% ripper: rb_ary_push($:1, $:3) %*/
17704 }
17705#line 17706 "parse.c"
17706 break;
17707
17708 case 785: /* assoc: arg_value "=>" arg_value */
17709#line 6646 "parse.y"
17710 {
17711 (yyval.node) = list_append(p, NEW_LIST((yyvsp[-2].node), &(yyloc)), (yyvsp[0].node));
17712 /*% ripper: assoc_new!($:1, $:3) %*/
17713 }
17714#line 17715 "parse.c"
17715 break;
17716
17717 case 786: /* assoc: "label" arg_value */
17718#line 6651 "parse.y"
17719 {
17720 (yyval.node) = list_append(p, NEW_LIST(NEW_SYM(rb_id2str((yyvsp[-1].id)), &(yylsp[-1])), &(yyloc)), (yyvsp[0].node));
17721 /*% ripper: assoc_new!($:1, $:2) %*/
17722 }
17723#line 17724 "parse.c"
17724 break;
17725
17726 case 787: /* assoc: "label" */
17727#line 6656 "parse.y"
17728 {
17729 NODE *val = gettable(p, (yyvsp[0].id), &(yyloc));
17730 if (!val) val = NEW_ERROR(&(yyloc));
17731 (yyval.node) = list_append(p, NEW_LIST(NEW_SYM(rb_id2str((yyvsp[0].id)), &(yylsp[0])), &(yyloc)), val);
17732 /*% ripper: assoc_new!($:1, Qnil) %*/
17733 }
17734#line 17735 "parse.c"
17735 break;
17736
17737 case 788: /* assoc: "string literal" string_contents tLABEL_END arg_value */
17738#line 6663 "parse.y"
17739 {
17740 YYLTYPE loc = code_loc_gen(&(yylsp[-3]), &(yylsp[-1]));
17741 (yyval.node) = list_append(p, NEW_LIST(dsym_node(p, (yyvsp[-2].node), &loc), &loc), (yyvsp[0].node));
17742 /*% ripper: assoc_new!(dyna_symbol!($:2), $:4) %*/
17743 }
17744#line 17745 "parse.c"
17745 break;
17746
17747 case 789: /* assoc: "**arg" arg_value */
17748#line 6669 "parse.y"
17749 {
17750 (yyval.node) = list_append(p, NEW_LIST(0, &(yyloc)), (yyvsp[0].node));
17751 /*% ripper: assoc_splat!($:2) %*/
17752 }
17753#line 17754 "parse.c"
17754 break;
17755
17756 case 790: /* assoc: "**arg" */
17757#line 6674 "parse.y"
17758 {
17759 forwarding_arg_check(p, idFWD_KWREST, idFWD_ALL, "keyword rest");
17760 (yyval.node) = list_append(p, NEW_LIST(0, &(yyloc)),
17761 NEW_LVAR(idFWD_KWREST, &(yyloc)));
17762 /*% ripper: assoc_splat!(Qnil) %*/
17763 }
17764#line 17765 "parse.c"
17765 break;
17766
17767 case 809: /* term: ';' */
17768#line 6721 "parse.y"
17769 {
17770 yyerrok;
17771 token_flush(p);
17772 if (p->ctxt.in_defined) {
17773 p->ctxt.has_trailing_semicolon = 1;
17774 }
17775 }
17776#line 17777 "parse.c"
17777 break;
17778
17779 case 810: /* term: '\n' */
17780#line 6729 "parse.y"
17781 {
17782 (yyloc).end_pos = (yyloc).beg_pos;
17783 token_flush(p);
17784 }
17785#line 17786 "parse.c"
17786 break;
17787
17788 case 812: /* terms: terms ';' */
17789#line 6736 "parse.y"
17790 {yyerrok;}
17791#line 17792 "parse.c"
17792 break;
17793
17794 case 813: /* none: %empty */
17795#line 6740 "parse.y"
17796 {
17797 (yyval.node) = 0;
17798 /*% ripper: Qnil %*/
17799 }
17800#line 17801 "parse.c"
17801 break;
17802
17803
17804#line 17805 "parse.c"
17805
17806 default: break;
17807 }
17808 /* User semantic actions sometimes alter yychar, and that requires
17809 that yytoken be updated with the new translation. We take the
17810 approach of translating immediately before every use of yytoken.
17811 One alternative is translating here after every semantic action,
17812 but that translation would be missed if the semantic action invokes
17813 YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or
17814 if it invokes YYBACKUP. In the case of YYABORT or YYACCEPT, an
17815 incorrect destructor might then be invoked immediately. In the
17816 case of YYERROR or YYBACKUP, subsequent parser actions might lead
17817 to an incorrect destructor call or verbose syntax error message
17818 before the lookahead is translated. */
17819 YY_SYMBOL_PRINT ("-> $$ =", YY_CAST (yysymbol_kind_t, yyr1[yyn]), &yyval, &yyloc, p);
17820
17821 YYPOPSTACK (yylen);
17822 /* %after-reduce function. */
17823#line 2666 "parse.y"
17824 {after_reduce(yylen, p);}
17825#line 17826 "parse.c"
17826
17827 yylen = 0;
17828
17829 *++yyvsp = yyval;
17830 *++yylsp = yyloc;
17831
17832 /* Now 'shift' the result of the reduction. Determine what state
17833 that goes to, based on the state we popped back to and the rule
17834 number reduced by. */
17835 {
17836 const int yylhs = yyr1[yyn] - YYNTOKENS;
17837 const int yyi = yypgoto[yylhs] + *yyssp;
17838 yystate = (0 <= yyi && yyi <= YYLAST && yycheck[yyi] == *yyssp
17839 ? yytable[yyi]
17840 : yydefgoto[yylhs]);
17841 }
17842
17843 goto yynewstate;
17844
17845
17846/*--------------------------------------.
17847| yyerrlab -- here on detecting error. |
17848`--------------------------------------*/
17849yyerrlab:
17850 /* Make sure we have latest lookahead translation. See comments at
17851 user semantic actions for why this is necessary. */
17852 yytoken = yychar == YYEMPTY ? YYSYMBOL_YYEMPTY : YYTRANSLATE (yychar);
17853 /* If not already recovering from an error, report this error. */
17854 if (!yyerrstatus)
17855 {
17856 ++yynerrs;
17857 {
17858 yypcontext_t yyctx
17859 = {yyssp, yytoken, &yylloc};
17860 char const *yymsgp = YY_("syntax error");
17861 int yysyntax_error_status;
17862 yysyntax_error_status = yysyntax_error (&yymsg_alloc, &yymsg, &yyctx, p);
17863 if (yysyntax_error_status == 0)
17864 yymsgp = yymsg;
17865 else if (yysyntax_error_status == -1)
17866 {
17867 if (yymsg != yymsgbuf)
17868 YYSTACK_FREE (yymsg);
17869 yymsg = YY_CAST (char *,
17870 YYSTACK_ALLOC (YY_CAST (YYSIZE_T, yymsg_alloc)));
17871 if (yymsg)
17872 {
17873 yysyntax_error_status
17874 = yysyntax_error (&yymsg_alloc, &yymsg, &yyctx, p);
17875 yymsgp = yymsg;
17876 }
17877 else
17878 {
17879 yymsg = yymsgbuf;
17880 yymsg_alloc = sizeof yymsgbuf;
17881 yysyntax_error_status = YYENOMEM;
17882 }
17883 }
17884 yyerror (&yylloc, p, yymsgp);
17885 if (yysyntax_error_status == YYENOMEM)
17886 YYNOMEM;
17887 }
17888 }
17889
17890 yyerror_range[1] = yylloc;
17891 if (yyerrstatus == 3)
17892 {
17893 /* If just tried and failed to reuse lookahead token after an
17894 error, discard it. */
17895
17896 if (yychar <= END_OF_INPUT)
17897 {
17898 /* Return failure if at end of input. */
17899 if (yychar == END_OF_INPUT)
17900 YYABORT;
17901 }
17902 else
17903 {
17904 yydestruct ("Error: discarding",
17905 yytoken, &yylval, &yylloc, p);
17906 yychar = YYEMPTY;
17907 }
17908 }
17909
17910 /* Else will try to reuse lookahead token after shifting the error
17911 token. */
17912 goto yyerrlab1;
17913
17914
17915/*---------------------------------------------------.
17916| yyerrorlab -- error raised explicitly by YYERROR. |
17917`---------------------------------------------------*/
17918yyerrorlab:
17919 /* Pacify compilers when the user code never invokes YYERROR and the
17920 label yyerrorlab therefore never appears in user code. */
17921 if (0)
17922 YYERROR;
17923 ++yynerrs;
17924
17925 /* Do not reclaim the symbols of the rule whose action triggered
17926 this YYERROR. */
17927 YYPOPSTACK (yylen);
17928 /* %after-pop-stack function. */
17929#line 2668 "parse.y"
17930 {after_pop_stack(yylen, p);}
17931#line 17932 "parse.c"
17932
17933 yylen = 0;
17934 YY_STACK_PRINT (yyss, yyssp, p);
17935 yystate = *yyssp;
17936 goto yyerrlab1;
17937
17938
17939/*-------------------------------------------------------------.
17940| yyerrlab1 -- common code for both syntax error and YYERROR. |
17941`-------------------------------------------------------------*/
17942yyerrlab1:
17943 yyerrstatus = 3; /* Each real token shifted decrements this. */
17944
17945 /* Pop stack until we find a state that shifts the error token. */
17946 for (;;)
17947 {
17948 yyn = yypact[yystate];
17949 if (!yypact_value_is_default (yyn))
17950 {
17951 yyn += YYSYMBOL_YYerror;
17952 if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror)
17953 {
17954 yyn = yytable[yyn];
17955 if (0 < yyn)
17956 break;
17957 }
17958 }
17959
17960 /* Pop the current state because it cannot handle the error token. */
17961 if (yyssp == yyss)
17962 YYABORT;
17963
17964 yyerror_range[1] = *yylsp;
17965 yydestruct ("Error: popping",
17966 YY_ACCESSING_SYMBOL (yystate), yyvsp, yylsp, p);
17967 YYPOPSTACK (1);
17968 /* %after-pop-stack function. */
17969#line 2668 "parse.y"
17970 {after_pop_stack(1, p);}
17971#line 17972 "parse.c"
17972
17973 yystate = *yyssp;
17974 YY_STACK_PRINT (yyss, yyssp, p);
17975 }
17976
17977 YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
17978 *++yyvsp = yylval;
17979 YY_IGNORE_MAYBE_UNINITIALIZED_END
17980
17981 yyerror_range[2] = yylloc;
17982 ++yylsp;
17983 YYLLOC_DEFAULT (*yylsp, yyerror_range, 2);
17984
17985 /* Shift the error token. */
17986 YY_SYMBOL_PRINT ("Shifting", YY_ACCESSING_SYMBOL (yyn), yyvsp, yylsp, p);
17987 /* %after-shift-error-token code. */
17988#line 2667 "parse.y"
17989 {after_shift_error_token(p);}
17990#line 17991 "parse.c"
17991
17992
17993 yystate = yyn;
17994 goto yynewstate;
17995
17996
17997/*-------------------------------------.
17998| yyacceptlab -- YYACCEPT comes here. |
17999`-------------------------------------*/
18000yyacceptlab:
18001 yyresult = 0;
18002 goto yyreturnlab;
18003
18004
18005/*-----------------------------------.
18006| yyabortlab -- YYABORT comes here. |
18007`-----------------------------------*/
18008yyabortlab:
18009 yyresult = 1;
18010 goto yyreturnlab;
18011
18012
18013/*-----------------------------------------------------------.
18014| yyexhaustedlab -- YYNOMEM (memory exhaustion) comes here. |
18015`-----------------------------------------------------------*/
18016yyexhaustedlab:
18017 yyerror (&yylloc, p, YY_("memory exhausted"));
18018 yyresult = 2;
18019 goto yyreturnlab;
18020
18021
18022/*----------------------------------------------------------.
18023| yyreturnlab -- parsing is finished, clean up and return. |
18024`----------------------------------------------------------*/
18025yyreturnlab:
18026 if (yychar != YYEMPTY)
18027 {
18028 /* Make sure we have latest lookahead translation. See comments at
18029 user semantic actions for why this is necessary. */
18030 yytoken = YYTRANSLATE (yychar);
18031 yydestruct ("Cleanup: discarding lookahead",
18032 yytoken, &yylval, &yylloc, p);
18033 }
18034 /* Do not reclaim the symbols of the rule whose action triggered
18035 this YYABORT or YYACCEPT. */
18036 YYPOPSTACK (yylen);
18037 YY_STACK_PRINT (yyss, yyssp, p);
18038 while (yyssp != yyss)
18039 {
18040 yydestruct ("Cleanup: popping",
18041 YY_ACCESSING_SYMBOL (+*yyssp), yyvsp, yylsp, p);
18042 YYPOPSTACK (1);
18043 }
18044#ifndef yyoverflow
18045 if (yyss != yyssa)
18046 YYSTACK_FREE (yyss);
18047#endif
18048 if (yymsg != yymsgbuf)
18049 YYSTACK_FREE (yymsg);
18050 return yyresult;
18051}
18052
18053#line 6745 "parse.y"
18054
18055# undef p
18056# undef yylex
18057# undef yylval
18058# define yylval (*p->lval)
18059
18060static int regx_options(struct parser_params*);
18061static int tokadd_string(struct parser_params*,int,int,int,long*,rb_encoding**,rb_encoding**);
18062static void tokaddmbc(struct parser_params *p, int c, rb_encoding *enc);
18063static enum yytokentype parse_string(struct parser_params*,rb_strterm_literal_t*);
18064static enum yytokentype here_document(struct parser_params*,rb_strterm_heredoc_t*);
18065
18066#define set_parser_s_value(x) (ifdef_ripper(p->s_value = (x), (void)0))
18067
18068# define set_yylval_node(x) { \
18069 YYLTYPE _cur_loc; \
18070 rb_parser_set_location(p, &_cur_loc); \
18071 yylval.node = (x); \
18072 set_parser_s_value(STR_NEW(p->lex.ptok, p->lex.pcur-p->lex.ptok)); \
18073}
18074# define set_yylval_str(x) \
18075do { \
18076 set_yylval_node(NEW_STR(x, &_cur_loc)); \
18077 set_parser_s_value(rb_str_new_mutable_parser_string(x)); \
18078} while(0)
18079# define set_yylval_num(x) { \
18080 yylval.num = (x); \
18081 set_parser_s_value(x); \
18082}
18083# define set_yylval_id(x) (yylval.id = (x))
18084# define set_yylval_name(x) { \
18085 (yylval.id = (x)); \
18086 set_parser_s_value(ID2SYM(x)); \
18087}
18088# define yylval_id() (yylval.id)
18089
18090#define set_yylval_noname() set_yylval_id(keyword_nil)
18091#define has_delayed_token(p) (p->delayed.token != NULL)
18092
18093#ifndef RIPPER
18094#define literal_flush(p, ptr) ((p)->lex.ptok = (ptr))
18095#define dispatch_scan_event(p, t) parser_dispatch_scan_event(p, t, __LINE__)
18096
18097static bool
18098parser_has_token(struct parser_params *p)
18099{
18100 const char *const pcur = p->lex.pcur;
18101 const char *const ptok = p->lex.ptok;
18102 if (p->keep_tokens && (pcur < ptok)) {
18103 rb_bug("lex.pcur < lex.ptok. (line: %d) %"PRIdPTRDIFF"|%"PRIdPTRDIFF"|%"PRIdPTRDIFF"",
18104 p->ruby_sourceline, ptok - p->lex.pbeg, pcur - ptok, p->lex.pend - pcur);
18105 }
18106 return pcur > ptok;
18107}
18108
18109static const char *
18110escaped_char(int c)
18111{
18112 switch (c) {
18113 case '"': return "\\\"";
18114 case '\\': return "\\\\";
18115 case '\0': return "\\0";
18116 case '\n': return "\\n";
18117 case '\r': return "\\r";
18118 case '\t': return "\\t";
18119 case '\f': return "\\f";
18120 case '\013': return "\\v";
18121 case '\010': return "\\b";
18122 case '\007': return "\\a";
18123 case '\033': return "\\e";
18124 case '\x7f': return "\\c?";
18125 }
18126 return NULL;
18127}
18128
18129static rb_parser_string_t *
18130rb_parser_str_escape(struct parser_params *p, rb_parser_string_t *str)
18131{
18132 rb_encoding *enc = p->enc;
18133 const char *ptr = str->ptr;
18134 const char *pend = ptr + str->len;
18135 const char *prev = ptr;
18136 char charbuf[5] = {'\\', 'x', 0, 0, 0};
18137 rb_parser_string_t * result = rb_parser_string_new(p, 0, 0);
18138
18139 while (ptr < pend) {
18140 unsigned int c;
18141 const char *cc;
18142 int n = rb_enc_precise_mbclen(ptr, pend, enc);
18143 if (!MBCLEN_CHARFOUND_P(n)) {
18144 if (ptr > prev) parser_str_cat(result, prev, ptr - prev);
18145 n = rb_enc_mbminlen(enc);
18146 if (pend < ptr + n)
18147 n = (int)(pend - ptr);
18148 while (n--) {
18149 c = *ptr & 0xf0 >> 4;
18150 charbuf[2] = (c < 10) ? '0' + c : 'A' + c - 10;
18151 c = *ptr & 0x0f;
18152 charbuf[3] = (c < 10) ? '0' + c : 'A' + c - 10;
18153 parser_str_cat(result, charbuf, 4);
18154 prev = ++ptr;
18155 }
18156 continue;
18157 }
18158 n = MBCLEN_CHARFOUND_LEN(n);
18159 c = rb_enc_mbc_to_codepoint(ptr, pend, enc);
18160 ptr += n;
18161 cc = escaped_char(c);
18162 if (cc) {
18163 if (ptr - n > prev) parser_str_cat(result, prev, ptr - n - prev);
18164 parser_str_cat_cstr(result, cc);
18165 prev = ptr;
18166 }
18167 else if (rb_enc_isascii(c, enc) && ISPRINT(c)) {
18168 }
18169 else {
18170 if (ptr - n > prev) {
18171 parser_str_cat(result, prev, ptr - n - prev);
18172 prev = ptr - n;
18173 }
18174 parser_str_cat(result, prev, ptr - prev);
18175 prev = ptr;
18176 }
18177 }
18178 if (ptr > prev) parser_str_cat(result, prev, ptr - prev);
18179
18180 return result;
18181}
18182
18183static void
18184parser_append_tokens(struct parser_params *p, rb_parser_string_t *str, enum yytokentype t, int line)
18185{
18187 token->id = p->token_id;
18188 token->type_name = parser_token2char(p, t);
18189 token->str = str;
18190 token->loc.beg_pos = p->yylloc->beg_pos;
18191 token->loc.end_pos = p->yylloc->end_pos;
18192 rb_parser_ary_push_ast_token(p, p->tokens, token);
18193 p->token_id++;
18194
18195 if (p->debug) {
18196 rb_parser_string_t *str_escaped = rb_parser_str_escape(p, str);
18197 rb_parser_printf(p, "Append tokens (line: %d) [%d, :%s, \"%s\", [%d, %d, %d, %d]]\n",
18198 line, token->id, token->type_name, str_escaped->ptr,
18199 token->loc.beg_pos.lineno, token->loc.beg_pos.column,
18200 token->loc.end_pos.lineno, token->loc.end_pos.column);
18201 rb_parser_string_free(p, str_escaped);
18202 }
18203}
18204
18205static void
18206parser_dispatch_scan_event(struct parser_params *p, enum yytokentype t, int line)
18207{
18208 debug_token_line(p, "parser_dispatch_scan_event", line);
18209
18210 if (!parser_has_token(p)) return;
18211
18212 RUBY_SET_YYLLOC(*p->yylloc);
18213
18214 if (p->keep_tokens) {
18215 rb_parser_string_t *str = rb_parser_encoding_string_new(p, p->lex.ptok, p->lex.pcur - p->lex.ptok, p->enc);
18216 parser_append_tokens(p, str, t, line);
18217 }
18218
18219 token_flush(p);
18220}
18221
18222#define dispatch_delayed_token(p, t) parser_dispatch_delayed_token(p, t, __LINE__)
18223static void
18224parser_dispatch_delayed_token(struct parser_params *p, enum yytokentype t, int line)
18225{
18226 debug_token_line(p, "parser_dispatch_delayed_token", line);
18227
18228 if (!has_delayed_token(p)) return;
18229
18230 RUBY_SET_YYLLOC_OF_DELAYED_TOKEN(*p->yylloc);
18231
18232 if (p->keep_tokens) {
18233 /* p->delayed.token is freed by rb_parser_tokens_free */
18234 parser_append_tokens(p, p->delayed.token, t, line);
18235 }
18236 else {
18237 rb_parser_string_free(p, p->delayed.token);
18238 }
18239
18240 p->delayed.token = NULL;
18241}
18242#else
18243#define literal_flush(p, ptr) ((void)(ptr))
18244
18245static int
18246ripper_has_scan_event(struct parser_params *p)
18247{
18248 if (p->lex.pcur < p->lex.ptok) rb_raise(rb_eRuntimeError, "lex.pcur < lex.ptok");
18249 return p->lex.pcur > p->lex.ptok;
18250}
18251
18252static VALUE
18253ripper_scan_event_val(struct parser_params *p, enum yytokentype t)
18254{
18255 VALUE str = STR_NEW(p->lex.ptok, p->lex.pcur - p->lex.ptok);
18256 VALUE rval = ripper_dispatch1(p, ripper_token2eventid(t), str);
18257 RUBY_SET_YYLLOC(*p->yylloc);
18258 token_flush(p);
18259 return rval;
18260}
18261
18262static void
18263ripper_dispatch_scan_event(struct parser_params *p, enum yytokentype t)
18264{
18265 if (!ripper_has_scan_event(p)) return;
18266
18267 set_parser_s_value(ripper_scan_event_val(p, t));
18268}
18269#define dispatch_scan_event(p, t) ripper_dispatch_scan_event(p, t)
18270
18271static void
18272ripper_dispatch_delayed_token(struct parser_params *p, enum yytokentype t)
18273{
18274 /* save and adjust the location to delayed token for callbacks */
18275 int saved_line = p->ruby_sourceline;
18276 const char *saved_tokp = p->lex.ptok;
18277 VALUE s_value, str;
18278
18279 if (!has_delayed_token(p)) return;
18280 p->ruby_sourceline = p->delayed.beg_line;
18281 p->lex.ptok = p->lex.pbeg + p->delayed.beg_col;
18282 str = rb_str_new_mutable_parser_string(p->delayed.token);
18283 rb_parser_string_free(p, p->delayed.token);
18284 s_value = ripper_dispatch1(p, ripper_token2eventid(t), str);
18285 set_parser_s_value(s_value);
18286 p->delayed.token = NULL;
18287 p->ruby_sourceline = saved_line;
18288 p->lex.ptok = saved_tokp;
18289}
18290#define dispatch_delayed_token(p, t) ripper_dispatch_delayed_token(p, t)
18291#endif /* RIPPER */
18292
18293static inline int
18294is_identchar(struct parser_params *p, const char *ptr, const char *MAYBE_UNUSED(ptr_end), rb_encoding *enc)
18295{
18296 return rb_enc_isalnum((unsigned char)*ptr, enc) || *ptr == '_' || !ISASCII(*ptr);
18297}
18298
18299static inline bool
18300peek_word_at(struct parser_params *p, const char *str, size_t len, int at)
18301{
18302 const char *ptr = p->lex.pcur + at;
18303 if (lex_eol_ptr_n_p(p, ptr, len-1)) return false;
18304 if (memcmp(ptr, str, len)) return false;
18305 if (lex_eol_ptr_n_p(p, ptr, len)) return true;
18306 return !is_identchar(p, ptr+len, p->lex.pend, p->enc);
18307}
18308
18309static inline int
18310parser_is_identchar(struct parser_params *p)
18311{
18312 return !(p)->eofp && is_identchar(p, p->lex.pcur-1, p->lex.pend, p->enc);
18313}
18314
18315static inline int
18316parser_isascii(struct parser_params *p)
18317{
18318 return ISASCII(*(p->lex.pcur-1));
18319}
18320
18321static void
18322token_info_setup(token_info *ptinfo, const char *ptr, const rb_code_location_t *loc)
18323{
18324 int column = 1, nonspc = 0, i;
18325 for (i = 0; i < loc->beg_pos.column; i++, ptr++) {
18326 if (*ptr == '\t') {
18327 column = (((column - 1) / TAB_WIDTH) + 1) * TAB_WIDTH;
18328 }
18329 column++;
18330 if (*ptr != ' ' && *ptr != '\t') {
18331 nonspc = 1;
18332 }
18333 }
18334
18335 ptinfo->beg = loc->beg_pos;
18336 ptinfo->indent = column;
18337 ptinfo->nonspc = nonspc;
18338}
18339
18340static void
18341token_info_push(struct parser_params *p, const char *token, const rb_code_location_t *loc)
18342{
18343 token_info *ptinfo;
18344
18345 if (!p->token_info_enabled) return;
18346 ptinfo = ALLOC(token_info);
18347 ptinfo->token = token;
18348 ptinfo->next = p->token_info;
18349 token_info_setup(ptinfo, p->lex.pbeg, loc);
18350
18351 p->token_info = ptinfo;
18352}
18353
18354static void
18355token_info_pop(struct parser_params *p, const char *token, const rb_code_location_t *loc)
18356{
18357 token_info *ptinfo_beg = p->token_info;
18358
18359 if (!ptinfo_beg) return;
18360
18361 /* indentation check of matched keywords (begin..end, if..end, etc.) */
18362 token_info_warn(p, token, ptinfo_beg, 1, loc);
18363
18364 p->token_info = ptinfo_beg->next;
18365 ruby_sized_xfree(ptinfo_beg, sizeof(*ptinfo_beg));
18366}
18367
18368static void
18369token_info_drop(struct parser_params *p, const char *token, rb_code_position_t beg_pos)
18370{
18371 token_info *ptinfo_beg = p->token_info;
18372
18373 if (!ptinfo_beg) return;
18374 p->token_info = ptinfo_beg->next;
18375
18376 if (ptinfo_beg->beg.lineno != beg_pos.lineno ||
18377 ptinfo_beg->beg.column != beg_pos.column ||
18378 strcmp(ptinfo_beg->token, token)) {
18379 compile_error(p, "token position mismatch: %d:%d:%s expected but %d:%d:%s",
18380 beg_pos.lineno, beg_pos.column, token,
18381 ptinfo_beg->beg.lineno, ptinfo_beg->beg.column,
18382 ptinfo_beg->token);
18383 }
18384
18385 ruby_sized_xfree(ptinfo_beg, sizeof(*ptinfo_beg));
18386}
18387
18388static void
18389token_info_warn(struct parser_params *p, const char *token, token_info *ptinfo_beg, int same, const rb_code_location_t *loc)
18390{
18391 token_info ptinfo_end_body, *ptinfo_end = &ptinfo_end_body;
18392 if (!p->token_info_enabled) return;
18393 if (!ptinfo_beg) return;
18394 token_info_setup(ptinfo_end, p->lex.pbeg, loc);
18395 if (ptinfo_beg->beg.lineno == ptinfo_end->beg.lineno) return; /* ignore one-line block */
18396 if (ptinfo_beg->nonspc || ptinfo_end->nonspc) return; /* ignore keyword in the middle of a line */
18397 if (ptinfo_beg->indent == ptinfo_end->indent) return; /* the indents are matched */
18398 if (!same && ptinfo_beg->indent < ptinfo_end->indent) return;
18399 rb_warn3L(ptinfo_end->beg.lineno,
18400 "mismatched indentations at '%s' with '%s' at %d",
18401 WARN_S(token), WARN_S(ptinfo_beg->token), WARN_I(ptinfo_beg->beg.lineno));
18402}
18403
18404static int
18405parser_precise_mbclen(struct parser_params *p, const char *ptr)
18406{
18407 int len = rb_enc_precise_mbclen(ptr, p->lex.pend, p->enc);
18408 if (!MBCLEN_CHARFOUND_P(len)) {
18409 compile_error(p, "invalid multibyte char (%s)", rb_enc_name(p->enc));
18410 return -1;
18411 }
18412 return len;
18413}
18414
18415#ifndef RIPPER
18416static inline void
18417parser_show_error_line(struct parser_params *p, const YYLTYPE *yylloc)
18418{
18419 rb_parser_string_t *str;
18420 int lineno = p->ruby_sourceline;
18421 if (!yylloc) {
18422 return;
18423 }
18424 else if (yylloc->beg_pos.lineno == lineno) {
18425 str = p->lex.lastline;
18426 }
18427 else {
18428 return;
18429 }
18430 ruby_show_error_line(p, p->error_buffer, yylloc, lineno, str);
18431}
18432
18433static int
18434parser_yyerror(struct parser_params *p, const rb_code_location_t *yylloc, const char *msg)
18435{
18436#if 0
18437 YYLTYPE current;
18438
18439 if (!yylloc) {
18440 yylloc = RUBY_SET_YYLLOC(current);
18441 }
18442 else if ((p->ruby_sourceline != yylloc->beg_pos.lineno &&
18443 p->ruby_sourceline != yylloc->end_pos.lineno)) {
18444 yylloc = 0;
18445 }
18446#endif
18447 parser_compile_error(p, yylloc, "%s", msg);
18448 parser_show_error_line(p, yylloc);
18449 return 0;
18450}
18451
18452static int
18453parser_yyerror0(struct parser_params *p, const char *msg)
18454{
18455 YYLTYPE current;
18456 return parser_yyerror(p, RUBY_SET_YYLLOC(current), msg);
18457}
18458
18459void
18460ruby_show_error_line(struct parser_params *p, VALUE errbuf, const YYLTYPE *yylloc, int lineno, rb_parser_string_t *str)
18461{
18462 VALUE mesg;
18463 const int max_line_margin = 30;
18464 const char *ptr, *ptr_end, *pt, *pb;
18465 const char *pre = "", *post = "", *pend;
18466 const char *code = "", *caret = "";
18467 const char *lim;
18468 const char *const pbeg = PARSER_STRING_PTR(str);
18469 char *buf;
18470 long len;
18471 int i;
18472
18473 if (!yylloc) return;
18474 pend = rb_parser_string_end(str);
18475 if (pend > pbeg && pend[-1] == '\n') {
18476 if (--pend > pbeg && pend[-1] == '\r') --pend;
18477 }
18478
18479 pt = pend;
18480 if (lineno == yylloc->end_pos.lineno &&
18481 (pend - pbeg) > yylloc->end_pos.column) {
18482 pt = pbeg + yylloc->end_pos.column;
18483 }
18484
18485 ptr = ptr_end = pt;
18486 lim = ptr - pbeg > max_line_margin ? ptr - max_line_margin : pbeg;
18487 while ((lim < ptr) && (*(ptr-1) != '\n')) ptr--;
18488
18489 lim = pend - ptr_end > max_line_margin ? ptr_end + max_line_margin : pend;
18490 while ((ptr_end < lim) && (*ptr_end != '\n') && (*ptr_end != '\r')) ptr_end++;
18491
18492 len = ptr_end - ptr;
18493 if (len > 4) {
18494 if (ptr > pbeg) {
18495 ptr = rb_enc_prev_char(pbeg, ptr, pt, rb_parser_str_get_encoding(str));
18496 if (ptr > pbeg) pre = "...";
18497 }
18498 if (ptr_end < pend) {
18499 ptr_end = rb_enc_prev_char(pt, ptr_end, pend, rb_parser_str_get_encoding(str));
18500 if (ptr_end < pend) post = "...";
18501 }
18502 }
18503 pb = pbeg;
18504 if (lineno == yylloc->beg_pos.lineno) {
18505 pb += yylloc->beg_pos.column;
18506 if (pb > pt) pb = pt;
18507 }
18508 if (pb < ptr) pb = ptr;
18509 if (len <= 4 && yylloc->beg_pos.lineno == yylloc->end_pos.lineno) {
18510 return;
18511 }
18512 if (RTEST(errbuf)) {
18513 mesg = rb_attr_get(errbuf, idMesg);
18514 if (char_at_end(p, mesg, '\n') != '\n')
18515 rb_str_cat_cstr(mesg, "\n");
18516 }
18517 else {
18518 mesg = rb_enc_str_new(0, 0, rb_parser_str_get_encoding(str));
18519 }
18520 if (!errbuf && rb_stderr_tty_p()) {
18521#define CSI_BEGIN "\033["
18522#define CSI_SGR "m"
18523 rb_str_catf(mesg,
18524 CSI_BEGIN""CSI_SGR"%s" /* pre */
18525 CSI_BEGIN"1"CSI_SGR"%.*s"
18526 CSI_BEGIN"1;4"CSI_SGR"%.*s"
18527 CSI_BEGIN";1"CSI_SGR"%.*s"
18528 CSI_BEGIN""CSI_SGR"%s" /* post */
18529 "\n",
18530 pre,
18531 (int)(pb - ptr), ptr,
18532 (int)(pt - pb), pb,
18533 (int)(ptr_end - pt), pt,
18534 post);
18535 }
18536 else {
18537 char *p2;
18538
18539 len = ptr_end - ptr;
18540 lim = pt < pend ? pt : pend;
18541 i = (int)(lim - ptr);
18542 buf = ALLOCA_N(char, i+2);
18543 code = ptr;
18544 caret = p2 = buf;
18545 if (ptr <= pb) {
18546 while (ptr < pb) {
18547 *p2++ = *ptr++ == '\t' ? '\t' : ' ';
18548 }
18549 *p2++ = '^';
18550 ptr++;
18551 }
18552 if (lim > ptr) {
18553 memset(p2, '~', (lim - ptr));
18554 p2 += (lim - ptr);
18555 }
18556 *p2 = '\0';
18557 rb_str_catf(mesg, "%s%.*s%s\n""%s%s\n",
18558 pre, (int)len, code, post,
18559 pre, caret);
18560 }
18561 if (!errbuf) rb_write_error_str(mesg);
18562}
18563#else
18564
18565static int
18566parser_yyerror(struct parser_params *p, const YYLTYPE *yylloc, const char *msg)
18567{
18568 const char *pcur = 0, *ptok = 0;
18569 if (p->ruby_sourceline == yylloc->beg_pos.lineno &&
18570 p->ruby_sourceline == yylloc->end_pos.lineno) {
18571 pcur = p->lex.pcur;
18572 ptok = p->lex.ptok;
18573 p->lex.ptok = p->lex.pbeg + yylloc->beg_pos.column;
18574 p->lex.pcur = p->lex.pbeg + yylloc->end_pos.column;
18575 }
18576 parser_yyerror0(p, msg);
18577 if (pcur) {
18578 p->lex.ptok = ptok;
18579 p->lex.pcur = pcur;
18580 }
18581 return 0;
18582}
18583
18584static int
18585parser_yyerror0(struct parser_params *p, const char *msg)
18586{
18587 dispatch1(parse_error, STR_NEW2(msg));
18588 ripper_error(p);
18589 return 0;
18590}
18591
18592static inline void
18593parser_show_error_line(struct parser_params *p, const YYLTYPE *yylloc)
18594{
18595}
18596#endif /* !RIPPER */
18597
18598static int
18599vtable_size(const struct vtable *tbl)
18600{
18601 if (!DVARS_TERMINAL_P(tbl)) {
18602 return tbl->pos;
18603 }
18604 else {
18605 return 0;
18606 }
18607}
18608
18609static struct vtable *
18610vtable_alloc_gen(struct parser_params *p, int line, struct vtable *prev)
18611{
18612 struct vtable *tbl = ALLOC(struct vtable);
18613 tbl->pos = 0;
18614 tbl->capa = 8;
18615 tbl->tbl = ALLOC_N(ID, tbl->capa);
18616 tbl->prev = prev;
18617#ifndef RIPPER
18618 if (p->debug) {
18619 rb_parser_printf(p, "vtable_alloc:%d: %p\n", line, (void *)tbl);
18620 }
18621#endif
18622 return tbl;
18623}
18624#define vtable_alloc(prev) vtable_alloc_gen(p, __LINE__, prev)
18625
18626static void
18627vtable_free_gen(struct parser_params *p, int line, const char *name,
18628 struct vtable *tbl)
18629{
18630#ifndef RIPPER
18631 if (p->debug) {
18632 rb_parser_printf(p, "vtable_free:%d: %s(%p)\n", line, name, (void *)tbl);
18633 }
18634#endif
18635 if (!DVARS_TERMINAL_P(tbl)) {
18636 if (tbl->tbl) {
18637 ruby_sized_xfree(tbl->tbl, tbl->capa * sizeof(ID));
18638 }
18639 ruby_sized_xfree(tbl, sizeof(*tbl));
18640 }
18641}
18642#define vtable_free(tbl) vtable_free_gen(p, __LINE__, #tbl, tbl)
18643
18644static void
18645vtable_add_gen(struct parser_params *p, int line, const char *name,
18646 struct vtable *tbl, ID id)
18647{
18648#ifndef RIPPER
18649 if (p->debug) {
18650 rb_parser_printf(p, "vtable_add:%d: %s(%p), %s\n",
18651 line, name, (void *)tbl, rb_id2name(id));
18652 }
18653#endif
18654 if (DVARS_TERMINAL_P(tbl)) {
18655 rb_parser_fatal(p, "vtable_add: vtable is not allocated (%p)", (void *)tbl);
18656 return;
18657 }
18658 if (tbl->pos == tbl->capa) {
18659 tbl->capa = tbl->capa * 2;
18660 SIZED_REALLOC_N(tbl->tbl, ID, tbl->capa, tbl->pos);
18661 }
18662 tbl->tbl[tbl->pos++] = id;
18663}
18664#define vtable_add(tbl, id) vtable_add_gen(p, __LINE__, #tbl, tbl, id)
18665
18666static void
18667vtable_pop_gen(struct parser_params *p, int line, const char *name,
18668 struct vtable *tbl, int n)
18669{
18670 if (p->debug) {
18671 rb_parser_printf(p, "vtable_pop:%d: %s(%p), %d\n",
18672 line, name, (void *)tbl, n);
18673 }
18674 if (tbl->pos < n) {
18675 rb_parser_fatal(p, "vtable_pop: unreachable (%d < %d)", tbl->pos, n);
18676 return;
18677 }
18678 tbl->pos -= n;
18679}
18680#define vtable_pop(tbl, n) vtable_pop_gen(p, __LINE__, #tbl, tbl, n)
18681
18682static int
18683vtable_included(const struct vtable * tbl, ID id)
18684{
18685 int i;
18686
18687 if (!DVARS_TERMINAL_P(tbl)) {
18688 for (i = 0; i < tbl->pos; i++) {
18689 if (tbl->tbl[i] == id) {
18690 return i+1;
18691 }
18692 }
18693 }
18694 return 0;
18695}
18696
18697static void parser_prepare(struct parser_params *p);
18698
18699static int
18700e_option_supplied(struct parser_params *p)
18701{
18702 return strcmp(p->ruby_sourcefile, "-e") == 0;
18703}
18704
18705#ifndef RIPPER
18706static NODE *parser_append_options(struct parser_params *p, NODE *node);
18707
18708static VALUE
18709yycompile0(VALUE arg)
18710{
18711 int n;
18712 NODE *tree;
18713 struct parser_params *p = (struct parser_params *)arg;
18714 int cov = FALSE;
18715
18716 if (!compile_for_eval && !NIL_P(p->ruby_sourcefile_string) && !e_option_supplied(p)) {
18717 cov = TRUE;
18718 }
18719
18720 if (p->debug_lines) {
18721 p->ast->body.script_lines = p->debug_lines;
18722 }
18723
18724 parser_prepare(p);
18725#define RUBY_DTRACE_PARSE_HOOK(name) \
18726 if (RUBY_DTRACE_PARSE_##name##_ENABLED()) { \
18727 RUBY_DTRACE_PARSE_##name(p->ruby_sourcefile, p->ruby_sourceline); \
18728 }
18729 RUBY_DTRACE_PARSE_HOOK(BEGIN);
18730 n = yyparse(p);
18731 RUBY_DTRACE_PARSE_HOOK(END);
18732
18733 p->debug_lines = 0;
18734
18735 xfree(p->lex.strterm);
18736 p->lex.strterm = 0;
18737 p->lex.pcur = p->lex.pbeg = p->lex.pend = 0;
18738 if (n || p->error_p) {
18739 VALUE mesg = p->error_buffer;
18740 if (!mesg) {
18741 mesg = syntax_error_new();
18742 }
18743 if (!p->error_tolerant) {
18744 rb_set_errinfo(mesg);
18745 return FALSE;
18746 }
18747 }
18748 tree = p->eval_tree;
18749 if (!tree) {
18750 tree = NEW_NIL(&NULL_LOC);
18751 }
18752 else {
18753 rb_parser_ary_t *tokens = p->tokens;
18754 NODE *prelude;
18755 NODE *body = parser_append_options(p, RNODE_SCOPE(tree)->nd_body);
18756 prelude = block_append(p, p->eval_tree_begin, body);
18757 RNODE_SCOPE(tree)->nd_body = prelude;
18758 p->ast->body.frozen_string_literal = p->frozen_string_literal;
18759 p->ast->body.coverage_enabled = cov;
18760 if (p->keep_tokens) {
18761 p->ast->node_buffer->tokens = tokens;
18762 p->tokens = NULL;
18763 }
18764 }
18765 p->ast->body.root = tree;
18766 p->ast->body.line_count = p->line_count;
18767 return TRUE;
18768}
18769
18770static rb_ast_t *
18771yycompile(struct parser_params *p, VALUE fname, int line)
18772{
18773 rb_ast_t *ast;
18774 if (NIL_P(fname)) {
18775 p->ruby_sourcefile_string = Qnil;
18776 p->ruby_sourcefile = "(none)";
18777 }
18778 else {
18779 p->ruby_sourcefile_string = rb_str_to_interned_str(fname);
18780 p->ruby_sourcefile = StringValueCStr(fname);
18781 }
18782 p->ruby_sourceline = line - 1;
18783
18784 p->lvtbl = NULL;
18785
18786 p->ast = ast = rb_ast_new();
18787 compile_callback(yycompile0, (VALUE)p);
18788 p->ast = 0;
18789
18790 while (p->lvtbl) {
18791 local_pop(p);
18792 }
18793
18794 return ast;
18795}
18796#endif /* !RIPPER */
18797
18798static rb_encoding *
18799must_be_ascii_compatible(struct parser_params *p, rb_parser_string_t *s)
18800{
18801 rb_encoding *enc = rb_parser_str_get_encoding(s);
18802 if (!rb_enc_asciicompat(enc)) {
18803 rb_raise(rb_eArgError, "invalid source encoding");
18804 }
18805 return enc;
18806}
18807
18808static rb_parser_string_t *
18809lex_getline(struct parser_params *p)
18810{
18811 rb_parser_string_t *line = (*p->lex.gets)(p, p->lex.input, p->line_count);
18812 if (!line) return 0;
18813 p->line_count++;
18814 string_buffer_append(p, line);
18815 must_be_ascii_compatible(p, line);
18816 return line;
18817}
18818
18819#ifndef RIPPER
18820rb_ast_t*
18821rb_parser_compile(rb_parser_t *p, rb_parser_lex_gets_func *gets, VALUE fname, rb_parser_input_data input, int line)
18822{
18823 p->lex.gets = gets;
18824 p->lex.input = input;
18825 p->lex.pbeg = p->lex.pcur = p->lex.pend = 0;
18826
18827 return yycompile(p, fname, line);
18828}
18829#endif /* !RIPPER */
18830
18831#define STR_FUNC_ESCAPE 0x01
18832#define STR_FUNC_EXPAND 0x02
18833#define STR_FUNC_REGEXP 0x04
18834#define STR_FUNC_QWORDS 0x08
18835#define STR_FUNC_SYMBOL 0x10
18836#define STR_FUNC_INDENT 0x20
18837#define STR_FUNC_LABEL 0x40
18838#define STR_FUNC_LIST 0x4000
18839#define STR_FUNC_TERM 0x8000
18840
18841enum string_type {
18842 str_label = STR_FUNC_LABEL,
18843 str_squote = (0),
18844 str_dquote = (STR_FUNC_EXPAND),
18845 str_xquote = (STR_FUNC_EXPAND),
18846 str_regexp = (STR_FUNC_REGEXP|STR_FUNC_ESCAPE|STR_FUNC_EXPAND),
18847 str_sword = (STR_FUNC_QWORDS|STR_FUNC_LIST),
18848 str_dword = (STR_FUNC_QWORDS|STR_FUNC_EXPAND|STR_FUNC_LIST),
18849 str_ssym = (STR_FUNC_SYMBOL),
18850 str_dsym = (STR_FUNC_SYMBOL|STR_FUNC_EXPAND)
18851};
18852
18853static rb_parser_string_t *
18854parser_str_new(struct parser_params *p, const char *ptr, long len, rb_encoding *enc, int func, rb_encoding *enc0)
18855{
18856 rb_parser_string_t *pstr;
18857
18858 pstr = rb_parser_encoding_string_new(p, ptr, len, enc);
18859
18860 if (!(func & STR_FUNC_REGEXP)) {
18861 if (rb_parser_is_ascii_string(p, pstr)) {
18862 }
18863 else if (rb_is_usascii_enc((void *)enc0) && enc != rb_utf8_encoding()) {
18864 /* everything is valid in ASCII-8BIT */
18865 enc = rb_ascii8bit_encoding();
18866 PARSER_ENCODING_CODERANGE_SET(pstr, enc, RB_PARSER_ENC_CODERANGE_VALID);
18867 }
18868 }
18869
18870 return pstr;
18871}
18872
18873static int
18874strterm_is_heredoc(rb_strterm_t *strterm)
18875{
18876 return strterm->heredoc;
18877}
18878
18879static rb_strterm_t *
18880new_strterm(struct parser_params *p, int func, int term, int paren)
18881{
18882 rb_strterm_t *strterm = ZALLOC(rb_strterm_t);
18883 strterm->u.literal.func = func;
18884 strterm->u.literal.term = term;
18885 strterm->u.literal.paren = paren;
18886 return strterm;
18887}
18888
18889static rb_strterm_t *
18890new_heredoc(struct parser_params *p)
18891{
18892 rb_strterm_t *strterm = ZALLOC(rb_strterm_t);
18893 strterm->heredoc = true;
18894 return strterm;
18895}
18896
18897#define peek(p,c) peek_n(p, (c), 0)
18898#define peek_n(p,c,n) (!lex_eol_n_p(p, n) && (c) == (unsigned char)(p)->lex.pcur[n])
18899#define peekc(p) peekc_n(p, 0)
18900#define peekc_n(p,n) (lex_eol_n_p(p, n) ? -1 : (unsigned char)(p)->lex.pcur[n])
18901
18902#define add_delayed_token(p, tok, end) parser_add_delayed_token(p, tok, end, __LINE__)
18903static void
18904parser_add_delayed_token(struct parser_params *p, const char *tok, const char *end, int line)
18905{
18906 debug_token_line(p, "add_delayed_token", line);
18907
18908 if (tok < end) {
18909 if (has_delayed_token(p)) {
18910 bool next_line = parser_string_char_at_end(p, p->delayed.token, 0) == '\n';
18911 int end_line = (next_line ? 1 : 0) + p->delayed.end_line;
18912 int end_col = (next_line ? 0 : p->delayed.end_col);
18913 if (end_line != p->ruby_sourceline || end_col != tok - p->lex.pbeg) {
18914 dispatch_delayed_token(p, tSTRING_CONTENT);
18915 }
18916 }
18917 if (!has_delayed_token(p)) {
18918 p->delayed.token = rb_parser_string_new(p, 0, 0);
18919 rb_parser_enc_associate(p, p->delayed.token, p->enc);
18920 p->delayed.beg_line = p->ruby_sourceline;
18921 p->delayed.beg_col = rb_long2int(tok - p->lex.pbeg);
18922 }
18923 parser_str_cat(p->delayed.token, tok, end - tok);
18924 p->delayed.end_line = p->ruby_sourceline;
18925 p->delayed.end_col = rb_long2int(end - p->lex.pbeg);
18926 p->lex.ptok = end;
18927 }
18928}
18929
18930static void
18931set_lastline(struct parser_params *p, rb_parser_string_t *str)
18932{
18933 p->lex.pbeg = p->lex.pcur = PARSER_STRING_PTR(str);
18934 p->lex.pend = p->lex.pcur + PARSER_STRING_LEN(str);
18935 p->lex.lastline = str;
18936}
18937
18938static int
18939nextline(struct parser_params *p, int set_encoding)
18940{
18941 rb_parser_string_t *str = p->lex.nextline;
18942 p->lex.nextline = 0;
18943 if (!str) {
18944 if (p->eofp)
18945 return -1;
18946
18947 if (!lex_eol_ptr_p(p, p->lex.pbeg) && *(p->lex.pend-1) != '\n') {
18948 goto end_of_input;
18949 }
18950
18951 if (!p->lex.input || !(str = lex_getline(p))) {
18952 end_of_input:
18953 p->eofp = 1;
18954 lex_goto_eol(p);
18955 return -1;
18956 }
18957#ifndef RIPPER
18958 if (p->debug_lines) {
18959 if (set_encoding) rb_parser_enc_associate(p, str, p->enc);
18960 rb_parser_string_t *copy = rb_parser_string_deep_copy(p, str);
18961 rb_parser_ary_push_script_line(p, p->debug_lines, copy);
18962 }
18963#endif
18964 p->cr_seen = FALSE;
18965 }
18966 else if (str == AFTER_HEREDOC_WITHOUT_TERMINATOR) {
18967 /* after here-document without terminator */
18968 goto end_of_input;
18969 }
18970 add_delayed_token(p, p->lex.ptok, p->lex.pend);
18971 if (p->heredoc_end > 0) {
18972 p->ruby_sourceline = p->heredoc_end;
18973 p->heredoc_end = 0;
18974 }
18975 p->ruby_sourceline++;
18976 set_lastline(p, str);
18977 token_flush(p);
18978 return 0;
18979}
18980
18981static int
18982parser_cr(struct parser_params *p, int c)
18983{
18984 if (peek(p, '\n')) {
18985 p->lex.pcur++;
18986 c = '\n';
18987 }
18988 return c;
18989}
18990
18991static inline int
18992nextc0(struct parser_params *p, int set_encoding)
18993{
18994 int c;
18995
18996 if (UNLIKELY(lex_eol_p(p) || p->eofp || p->lex.nextline > AFTER_HEREDOC_WITHOUT_TERMINATOR)) {
18997 if (nextline(p, set_encoding)) return -1;
18998 }
18999 c = (unsigned char)*p->lex.pcur++;
19000 if (UNLIKELY(c == '\r')) {
19001 c = parser_cr(p, c);
19002 }
19003
19004 return c;
19005}
19006#define nextc(p) nextc0(p, TRUE)
19007
19008static void
19009pushback(struct parser_params *p, int c)
19010{
19011 if (c == -1) return;
19012 p->eofp = 0;
19013 p->lex.pcur--;
19014 if (p->lex.pcur > p->lex.pbeg && p->lex.pcur[0] == '\n' && p->lex.pcur[-1] == '\r') {
19015 p->lex.pcur--;
19016 }
19017}
19018
19019#define was_bol(p) ((p)->lex.pcur == (p)->lex.pbeg + 1)
19020
19021#define tokfix(p) ((p)->tokenbuf[(p)->tokidx]='\0')
19022#define tok(p) (p)->tokenbuf
19023#define toklen(p) (p)->tokidx
19024
19025static int
19026looking_at_eol_p(struct parser_params *p)
19027{
19028 const char *ptr = p->lex.pcur;
19029 while (!lex_eol_ptr_p(p, ptr)) {
19030 int c = (unsigned char)*ptr++;
19031 int eol = (c == '\n' || c == '#');
19032 if (eol || !ISSPACE(c)) {
19033 return eol;
19034 }
19035 }
19036 return TRUE;
19037}
19038
19039static char*
19040newtok(struct parser_params *p)
19041{
19042 p->tokidx = 0;
19043 if (!p->tokenbuf) {
19044 p->toksiz = 60;
19045 p->tokenbuf = ALLOC_N(char, 60);
19046 }
19047 if (p->toksiz > 4096) {
19048 p->toksiz = 60;
19049 REALLOC_N(p->tokenbuf, char, 60);
19050 }
19051 return p->tokenbuf;
19052}
19053
19054static char *
19055tokspace(struct parser_params *p, int n)
19056{
19057 p->tokidx += n;
19058
19059 if (p->tokidx >= p->toksiz) {
19060 do {p->toksiz *= 2;} while (p->toksiz < p->tokidx);
19061 REALLOC_N(p->tokenbuf, char, p->toksiz);
19062 }
19063 return &p->tokenbuf[p->tokidx-n];
19064}
19065
19066static void
19067tokadd(struct parser_params *p, int c)
19068{
19069 p->tokenbuf[p->tokidx++] = (char)c;
19070 if (p->tokidx >= p->toksiz) {
19071 p->toksiz *= 2;
19072 REALLOC_N(p->tokenbuf, char, p->toksiz);
19073 }
19074}
19075
19076static int
19077tok_hex(struct parser_params *p, size_t *numlen)
19078{
19079 int c;
19080
19081 c = (int)ruby_scan_hex(p->lex.pcur, 2, numlen);
19082 if (!*numlen) {
19083 flush_string_content(p, p->enc, rb_strlen_lit("\\x"));
19084 yyerror0("invalid hex escape");
19085 dispatch_scan_event(p, tSTRING_CONTENT);
19086 return 0;
19087 }
19088 p->lex.pcur += *numlen;
19089 return c;
19090}
19091
19092#define tokcopy(p, n) memcpy(tokspace(p, n), (p)->lex.pcur - (n), (n))
19093
19094static int
19095escaped_control_code(int c)
19096{
19097 int c2 = 0;
19098 switch (c) {
19099 case ' ':
19100 c2 = 's';
19101 break;
19102 case '\n':
19103 c2 = 'n';
19104 break;
19105 case '\t':
19106 c2 = 't';
19107 break;
19108 case '\v':
19109 c2 = 'v';
19110 break;
19111 case '\r':
19112 c2 = 'r';
19113 break;
19114 case '\f':
19115 c2 = 'f';
19116 break;
19117 }
19118 return c2;
19119}
19120
19121#define WARN_SPACE_CHAR(c, prefix) \
19122 rb_warn1("invalid character syntax; use "prefix"\\%c", WARN_I(c))
19123
19124static int
19125tokadd_codepoint(struct parser_params *p, rb_encoding **encp,
19126 int regexp_literal, const char *begin)
19127{
19128 const int wide = !begin;
19129 size_t numlen;
19130 int codepoint = (int)ruby_scan_hex(p->lex.pcur, wide ? p->lex.pend - p->lex.pcur : 4, &numlen);
19131
19132 p->lex.pcur += numlen;
19133 if (p->lex.strterm == NULL ||
19134 strterm_is_heredoc(p->lex.strterm) ||
19135 (p->lex.strterm->u.literal.func != str_regexp)) {
19136 if (!begin) begin = p->lex.pcur;
19137 if (wide ? (numlen == 0 || numlen > 6) : (numlen < 4)) {
19138 flush_string_content(p, rb_utf8_encoding(), p->lex.pcur - begin);
19139 yyerror0("invalid Unicode escape");
19140 dispatch_scan_event(p, tSTRING_CONTENT);
19141 return wide && numlen > 0;
19142 }
19143 if (codepoint > 0x10ffff) {
19144 flush_string_content(p, rb_utf8_encoding(), p->lex.pcur - begin);
19145 yyerror0("invalid Unicode codepoint (too large)");
19146 dispatch_scan_event(p, tSTRING_CONTENT);
19147 return wide;
19148 }
19149 if ((codepoint & 0xfffff800) == 0xd800) {
19150 flush_string_content(p, rb_utf8_encoding(), p->lex.pcur - begin);
19151 yyerror0("invalid Unicode codepoint");
19152 dispatch_scan_event(p, tSTRING_CONTENT);
19153 return wide;
19154 }
19155 }
19156 if (regexp_literal) {
19157 tokcopy(p, (int)numlen);
19158 }
19159 else if (codepoint >= 0x80) {
19160 rb_encoding *utf8 = rb_utf8_encoding();
19161 if (*encp && utf8 != *encp) {
19162 YYLTYPE loc = RUBY_INIT_YYLLOC();
19163 compile_error(p, "UTF-8 mixed within %s source", rb_enc_name(*encp));
19164 parser_show_error_line(p, &loc);
19165 return wide;
19166 }
19167 *encp = utf8;
19168 tokaddmbc(p, codepoint, *encp);
19169 }
19170 else {
19171 tokadd(p, codepoint);
19172 }
19173 return TRUE;
19174}
19175
19176static int tokadd_mbchar(struct parser_params *p, int c);
19177
19178static int
19179tokskip_mbchar(struct parser_params *p)
19180{
19181 int len = parser_precise_mbclen(p, p->lex.pcur-1);
19182 if (len > 0) {
19183 p->lex.pcur += len - 1;
19184 }
19185 return len;
19186}
19187
19188/* return value is for ?\u3042 */
19189static void
19190tokadd_utf8(struct parser_params *p, rb_encoding **encp,
19191 int term, int symbol_literal, int regexp_literal)
19192{
19193 /*
19194 * If `term` is not -1, then we allow multiple codepoints in \u{}
19195 * upto `term` byte, otherwise we're parsing a character literal.
19196 * And then add the codepoints to the current token.
19197 */
19198 static const char multiple_codepoints[] = "Multiple codepoints at single character literal";
19199
19200 const int open_brace = '{', close_brace = '}';
19201
19202 if (regexp_literal) { tokadd(p, '\\'); tokadd(p, 'u'); }
19203
19204 if (peek(p, open_brace)) { /* handle \u{...} form */
19205 if (regexp_literal && p->lex.strterm->u.literal.func == str_regexp) {
19206 /*
19207 * Skip parsing validation code and copy bytes as-is until term or
19208 * closing brace, in order to correctly handle extended regexps where
19209 * invalid unicode escapes are allowed in comments. The regexp parser
19210 * does its own validation and will catch any issues.
19211 */
19212 tokadd(p, open_brace);
19213 while (!lex_eol_ptr_p(p, ++p->lex.pcur)) {
19214 int c = peekc(p);
19215 if (c == close_brace) {
19216 tokadd(p, c);
19217 ++p->lex.pcur;
19218 break;
19219 }
19220 else if (c == term) {
19221 break;
19222 }
19223 if (c == '\\' && !lex_eol_n_p(p, 1)) {
19224 tokadd(p, c);
19225 c = *++p->lex.pcur;
19226 }
19227 tokadd_mbchar(p, c);
19228 }
19229 }
19230 else {
19231 const char *second = NULL;
19232 int c, last = nextc(p);
19233 if (lex_eol_p(p)) goto unterminated;
19234 while (ISSPACE(c = peekc(p)) && !lex_eol_ptr_p(p, ++p->lex.pcur));
19235 while (c != close_brace) {
19236 if (c == term) goto unterminated;
19237 if (second == multiple_codepoints)
19238 second = p->lex.pcur;
19239 if (regexp_literal) tokadd(p, last);
19240 if (!tokadd_codepoint(p, encp, regexp_literal, NULL)) {
19241 break;
19242 }
19243 while (ISSPACE(c = peekc(p))) {
19244 if (lex_eol_ptr_p(p, ++p->lex.pcur)) goto unterminated;
19245 last = c;
19246 }
19247 if (term == -1 && !second)
19248 second = multiple_codepoints;
19249 }
19250
19251 if (c != close_brace) {
19252 unterminated:
19253 flush_string_content(p, rb_utf8_encoding(), 0);
19254 yyerror0("unterminated Unicode escape");
19255 dispatch_scan_event(p, tSTRING_CONTENT);
19256 return;
19257 }
19258 if (second && second != multiple_codepoints) {
19259 const char *pcur = p->lex.pcur;
19260 p->lex.pcur = second;
19261 dispatch_scan_event(p, tSTRING_CONTENT);
19262 token_flush(p);
19263 p->lex.pcur = pcur;
19264 yyerror0(multiple_codepoints);
19265 token_flush(p);
19266 }
19267
19268 if (regexp_literal) tokadd(p, close_brace);
19269 nextc(p);
19270 }
19271 }
19272 else { /* handle \uxxxx form */
19273 if (!tokadd_codepoint(p, encp, regexp_literal, p->lex.pcur - rb_strlen_lit("\\u"))) {
19274 token_flush(p);
19275 return;
19276 }
19277 }
19278}
19279
19280#define ESCAPE_CONTROL 1
19281#define ESCAPE_META 2
19282
19283static int
19284read_escape(struct parser_params *p, int flags, const char *begin)
19285{
19286 int c;
19287 size_t numlen;
19288
19289 switch (c = nextc(p)) {
19290 case '\\': /* Backslash */
19291 return c;
19292
19293 case 'n': /* newline */
19294 return '\n';
19295
19296 case 't': /* horizontal tab */
19297 return '\t';
19298
19299 case 'r': /* carriage-return */
19300 return '\r';
19301
19302 case 'f': /* form-feed */
19303 return '\f';
19304
19305 case 'v': /* vertical tab */
19306 return '\13';
19307
19308 case 'a': /* alarm(bell) */
19309 return '\007';
19310
19311 case 'e': /* escape */
19312 return 033;
19313
19314 case '0': case '1': case '2': case '3': /* octal constant */
19315 case '4': case '5': case '6': case '7':
19316 pushback(p, c);
19317 c = (int)ruby_scan_oct(p->lex.pcur, 3, &numlen);
19318 p->lex.pcur += numlen;
19319 return c;
19320
19321 case 'x': /* hex constant */
19322 c = tok_hex(p, &numlen);
19323 if (numlen == 0) return 0;
19324 return c;
19325
19326 case 'b': /* backspace */
19327 return '\010';
19328
19329 case 's': /* space */
19330 return ' ';
19331
19332 case 'M':
19333 if (flags & ESCAPE_META) goto eof;
19334 if ((c = nextc(p)) != '-') {
19335 goto eof;
19336 }
19337 if ((c = nextc(p)) == '\\') {
19338 switch (peekc(p)) {
19339 case 'u': case 'U':
19340 nextc(p);
19341 goto eof;
19342 }
19343 return read_escape(p, flags|ESCAPE_META, begin) | 0x80;
19344 }
19345 else if (c == -1) goto eof;
19346 else if (!ISASCII(c)) {
19347 tokskip_mbchar(p);
19348 goto eof;
19349 }
19350 else {
19351 int c2 = escaped_control_code(c);
19352 if (c2) {
19353 if (ISCNTRL(c) || !(flags & ESCAPE_CONTROL)) {
19354 WARN_SPACE_CHAR(c2, "\\M-");
19355 }
19356 else {
19357 WARN_SPACE_CHAR(c2, "\\C-\\M-");
19358 }
19359 }
19360 else if (ISCNTRL(c)) goto eof;
19361 return ((c & 0xff) | 0x80);
19362 }
19363
19364 case 'C':
19365 if ((c = nextc(p)) != '-') {
19366 goto eof;
19367 }
19368 case 'c':
19369 if (flags & ESCAPE_CONTROL) goto eof;
19370 if ((c = nextc(p))== '\\') {
19371 switch (peekc(p)) {
19372 case 'u': case 'U':
19373 nextc(p);
19374 goto eof;
19375 }
19376 c = read_escape(p, flags|ESCAPE_CONTROL, begin);
19377 }
19378 else if (c == '?')
19379 return 0177;
19380 else if (c == -1) goto eof;
19381 else if (!ISASCII(c)) {
19382 tokskip_mbchar(p);
19383 goto eof;
19384 }
19385 else {
19386 int c2 = escaped_control_code(c);
19387 if (c2) {
19388 if (ISCNTRL(c)) {
19389 if (flags & ESCAPE_META) {
19390 WARN_SPACE_CHAR(c2, "\\M-");
19391 }
19392 else {
19393 WARN_SPACE_CHAR(c2, "");
19394 }
19395 }
19396 else {
19397 if (flags & ESCAPE_META) {
19398 WARN_SPACE_CHAR(c2, "\\M-\\C-");
19399 }
19400 else {
19401 WARN_SPACE_CHAR(c2, "\\C-");
19402 }
19403 }
19404 }
19405 else if (ISCNTRL(c)) goto eof;
19406 }
19407 return c & 0x9f;
19408
19409 eof:
19410 case -1:
19411 flush_string_content(p, p->enc, p->lex.pcur - begin);
19412 yyerror0("Invalid escape character syntax");
19413 dispatch_scan_event(p, tSTRING_CONTENT);
19414 return '\0';
19415
19416 default:
19417 if (!ISASCII(c)) {
19418 tokskip_mbchar(p);
19419 goto eof;
19420 }
19421 return c;
19422 }
19423}
19424
19425static void
19426tokaddmbc(struct parser_params *p, int c, rb_encoding *enc)
19427{
19428 int len = rb_enc_codelen(c, enc);
19429 rb_enc_mbcput(c, tokspace(p, len), enc);
19430}
19431
19432static int
19433tokadd_escape(struct parser_params *p)
19434{
19435 int c;
19436 size_t numlen;
19437 const char *begin = p->lex.pcur;
19438
19439 switch (c = nextc(p)) {
19440 case '\n':
19441 return 0; /* just ignore */
19442
19443 case '0': case '1': case '2': case '3': /* octal constant */
19444 case '4': case '5': case '6': case '7':
19445 {
19446 ruby_scan_oct(--p->lex.pcur, 3, &numlen);
19447 if (numlen == 0) goto eof;
19448 p->lex.pcur += numlen;
19449 tokcopy(p, (int)numlen + 1);
19450 }
19451 return 0;
19452
19453 case 'x': /* hex constant */
19454 {
19455 tok_hex(p, &numlen);
19456 if (numlen == 0) return -1;
19457 tokcopy(p, (int)numlen + 2);
19458 }
19459 return 0;
19460
19461 eof:
19462 case -1:
19463 flush_string_content(p, p->enc, p->lex.pcur - begin);
19464 yyerror0("Invalid escape character syntax");
19465 token_flush(p);
19466 return -1;
19467
19468 default:
19469 tokadd(p, '\\');
19470 tokadd(p, c);
19471 }
19472 return 0;
19473}
19474
19475static int
19476char_to_option(int c)
19477{
19478 int val;
19479
19480 switch (c) {
19481 case 'i':
19482 val = RE_ONIG_OPTION_IGNORECASE;
19483 break;
19484 case 'x':
19485 val = RE_ONIG_OPTION_EXTEND;
19486 break;
19487 case 'm':
19488 val = RE_ONIG_OPTION_MULTILINE;
19489 break;
19490 default:
19491 val = 0;
19492 break;
19493 }
19494 return val;
19495}
19496
19497#define ARG_ENCODING_FIXED 16
19498#define ARG_ENCODING_NONE 32
19499#define ENC_ASCII8BIT 1
19500#define ENC_EUC_JP 2
19501#define ENC_Windows_31J 3
19502#define ENC_UTF8 4
19503
19504static int
19505char_to_option_kcode(int c, int *option, int *kcode)
19506{
19507 *option = 0;
19508
19509 switch (c) {
19510 case 'n':
19511 *kcode = ENC_ASCII8BIT;
19512 return (*option = ARG_ENCODING_NONE);
19513 case 'e':
19514 *kcode = ENC_EUC_JP;
19515 break;
19516 case 's':
19517 *kcode = ENC_Windows_31J;
19518 break;
19519 case 'u':
19520 *kcode = ENC_UTF8;
19521 break;
19522 default:
19523 *kcode = -1;
19524 return (*option = char_to_option(c));
19525 }
19526 *option = ARG_ENCODING_FIXED;
19527 return 1;
19528}
19529
19530static int
19531regx_options(struct parser_params *p)
19532{
19533 int kcode = 0;
19534 int kopt = 0;
19535 int options = 0;
19536 int c, opt, kc;
19537
19538 newtok(p);
19539 while (c = nextc(p), ISALPHA(c)) {
19540 if (c == 'o') {
19541 options |= RE_OPTION_ONCE;
19542 }
19543 else if (char_to_option_kcode(c, &opt, &kc)) {
19544 if (kc >= 0) {
19545 if (kc != ENC_ASCII8BIT) kcode = c;
19546 kopt = opt;
19547 }
19548 else {
19549 options |= opt;
19550 }
19551 }
19552 else {
19553 tokadd(p, c);
19554 }
19555 }
19556 options |= kopt;
19557 pushback(p, c);
19558 if (toklen(p)) {
19559 YYLTYPE loc = RUBY_INIT_YYLLOC();
19560 tokfix(p);
19561 compile_error(p, "unknown regexp option%s - %*s",
19562 toklen(p) > 1 ? "s" : "", toklen(p), tok(p));
19563 parser_show_error_line(p, &loc);
19564 }
19565 return options | RE_OPTION_ENCODING(kcode);
19566}
19567
19568static int
19569tokadd_mbchar(struct parser_params *p, int c)
19570{
19571 int len = parser_precise_mbclen(p, p->lex.pcur-1);
19572 if (len < 0) return -1;
19573 tokadd(p, c);
19574 p->lex.pcur += --len;
19575 if (len > 0) tokcopy(p, len);
19576 return c;
19577}
19578
19579static inline int
19580simple_re_meta(int c)
19581{
19582 switch (c) {
19583 case '$': case '*': case '+': case '.':
19584 case '?': case '^': case '|':
19585 case ')': case ']': case '}': case '>':
19586 return TRUE;
19587 default:
19588 return FALSE;
19589 }
19590}
19591
19592static int
19593parser_update_heredoc_indent(struct parser_params *p, int c)
19594{
19595 if (p->heredoc_line_indent == -1) {
19596 if (c == '\n') p->heredoc_line_indent = 0;
19597 }
19598 else {
19599 if (c == ' ') {
19600 p->heredoc_line_indent++;
19601 return TRUE;
19602 }
19603 else if (c == '\t') {
19604 int w = (p->heredoc_line_indent / TAB_WIDTH) + 1;
19605 p->heredoc_line_indent = w * TAB_WIDTH;
19606 return TRUE;
19607 }
19608 else if (c != '\n') {
19609 if (p->heredoc_indent > p->heredoc_line_indent) {
19610 p->heredoc_indent = p->heredoc_line_indent;
19611 }
19612 p->heredoc_line_indent = -1;
19613 }
19614 else {
19615 /* Whitespace only line has no indentation */
19616 p->heredoc_line_indent = 0;
19617 }
19618 }
19619 return FALSE;
19620}
19621
19622static void
19623parser_mixed_error(struct parser_params *p, rb_encoding *enc1, rb_encoding *enc2)
19624{
19625 YYLTYPE loc = RUBY_INIT_YYLLOC();
19626 const char *n1 = rb_enc_name(enc1), *n2 = rb_enc_name(enc2);
19627 compile_error(p, "%s mixed within %s source", n1, n2);
19628 parser_show_error_line(p, &loc);
19629}
19630
19631static void
19632parser_mixed_escape(struct parser_params *p, const char *beg, rb_encoding *enc1, rb_encoding *enc2)
19633{
19634 const char *pos = p->lex.pcur;
19635 p->lex.pcur = beg;
19636 parser_mixed_error(p, enc1, enc2);
19637 p->lex.pcur = pos;
19638}
19639
19640static inline char
19641nibble_char_upper(unsigned int c)
19642{
19643 c &= 0xf;
19644 return c + (c < 10 ? '0' : 'A' - 10);
19645}
19646
19647static int
19648tokadd_string(struct parser_params *p,
19649 int func, int term, int paren, long *nest,
19650 rb_encoding **encp, rb_encoding **enc)
19651{
19652 int c;
19653 bool erred = false;
19654#ifdef RIPPER
19655 const int heredoc_end = (p->heredoc_end ? p->heredoc_end + 1 : 0);
19656 int top_of_line = FALSE;
19657#endif
19658
19659#define mixed_error(enc1, enc2) \
19660 (void)(erred || (parser_mixed_error(p, enc1, enc2), erred = true))
19661#define mixed_escape(beg, enc1, enc2) \
19662 (void)(erred || (parser_mixed_escape(p, beg, enc1, enc2), erred = true))
19663
19664 while ((c = nextc(p)) != -1) {
19665 if (p->heredoc_indent > 0) {
19666 parser_update_heredoc_indent(p, c);
19667 }
19668#ifdef RIPPER
19669 if (top_of_line && heredoc_end == p->ruby_sourceline) {
19670 pushback(p, c);
19671 break;
19672 }
19673#endif
19674
19675 if (paren && c == paren) {
19676 ++*nest;
19677 }
19678 else if (c == term) {
19679 if (!nest || !*nest) {
19680 pushback(p, c);
19681 break;
19682 }
19683 --*nest;
19684 }
19685 else if ((func & STR_FUNC_EXPAND) && c == '#' && !lex_eol_p(p)) {
19686 unsigned char c2 = *p->lex.pcur;
19687 if (c2 == '$' || c2 == '@' || c2 == '{') {
19688 pushback(p, c);
19689 break;
19690 }
19691 }
19692 else if (c == '\\') {
19693 c = nextc(p);
19694 switch (c) {
19695 case '\n':
19696 if (func & STR_FUNC_QWORDS) break;
19697 if (func & STR_FUNC_EXPAND) {
19698 if (!(func & STR_FUNC_INDENT) || (p->heredoc_indent < 0))
19699 continue;
19700 if (c == term) {
19701 c = '\\';
19702 goto terminate;
19703 }
19704 }
19705 tokadd(p, '\\');
19706 break;
19707
19708 case '\\':
19709 if (func & STR_FUNC_ESCAPE) tokadd(p, c);
19710 break;
19711
19712 case 'u':
19713 if ((func & STR_FUNC_EXPAND) == 0) {
19714 tokadd(p, '\\');
19715 break;
19716 }
19717 tokadd_utf8(p, enc, term,
19718 func & STR_FUNC_SYMBOL,
19719 func & STR_FUNC_REGEXP);
19720 continue;
19721
19722 default:
19723 if (c == -1) return -1;
19724 if (!ISASCII(c)) {
19725 if ((func & STR_FUNC_EXPAND) == 0) tokadd(p, '\\');
19726 goto non_ascii;
19727 }
19728 if (func & STR_FUNC_REGEXP) {
19729 switch (c) {
19730 case 'c':
19731 case 'C':
19732 case 'M': {
19733 pushback(p, c);
19734 c = read_escape(p, 0, p->lex.pcur - 1);
19735
19736 char *t = tokspace(p, rb_strlen_lit("\\x00"));
19737 *t++ = '\\';
19738 *t++ = 'x';
19739 *t++ = nibble_char_upper(c >> 4);
19740 *t++ = nibble_char_upper(c);
19741 continue;
19742 }
19743 }
19744
19745 if (c == term && !simple_re_meta(c)) {
19746 tokadd(p, c);
19747 continue;
19748 }
19749 pushback(p, c);
19750 if ((c = tokadd_escape(p)) < 0)
19751 return -1;
19752 if (*enc && *enc != *encp) {
19753 mixed_escape(p->lex.ptok+2, *enc, *encp);
19754 }
19755 continue;
19756 }
19757 else if (func & STR_FUNC_EXPAND) {
19758 pushback(p, c);
19759 if (func & STR_FUNC_ESCAPE) tokadd(p, '\\');
19760 c = read_escape(p, 0, p->lex.pcur - 1);
19761 }
19762 else if ((func & STR_FUNC_QWORDS) && ISSPACE(c)) {
19763 /* ignore backslashed spaces in %w */
19764 }
19765 else if (c != term && !(paren && c == paren)) {
19766 tokadd(p, '\\');
19767 pushback(p, c);
19768 continue;
19769 }
19770 }
19771 }
19772 else if (!parser_isascii(p)) {
19773 non_ascii:
19774 if (!*enc) {
19775 *enc = *encp;
19776 }
19777 else if (*enc != *encp) {
19778 mixed_error(*enc, *encp);
19779 continue;
19780 }
19781 if (tokadd_mbchar(p, c) == -1) return -1;
19782 continue;
19783 }
19784 else if ((func & STR_FUNC_QWORDS) && ISSPACE(c)) {
19785 pushback(p, c);
19786 break;
19787 }
19788 if (c & 0x80) {
19789 if (!*enc) {
19790 *enc = *encp;
19791 }
19792 else if (*enc != *encp) {
19793 mixed_error(*enc, *encp);
19794 continue;
19795 }
19796 }
19797 tokadd(p, c);
19798#ifdef RIPPER
19799 top_of_line = (c == '\n');
19800#endif
19801 }
19802 terminate:
19803 if (*enc) *encp = *enc;
19804 return c;
19805}
19806
19807#define NEW_STRTERM(func, term, paren) new_strterm(p, func, term, paren)
19808
19809static void
19810flush_string_content(struct parser_params *p, rb_encoding *enc, size_t back)
19811{
19812 p->lex.pcur -= back;
19813 if (has_delayed_token(p)) {
19814 ptrdiff_t len = p->lex.pcur - p->lex.ptok;
19815 if (len > 0) {
19816 rb_parser_enc_str_buf_cat(p, p->delayed.token, p->lex.ptok, len, enc);
19817 p->delayed.end_line = p->ruby_sourceline;
19818 p->delayed.end_col = rb_long2int(p->lex.pcur - p->lex.pbeg);
19819 }
19820 dispatch_delayed_token(p, tSTRING_CONTENT);
19821 p->lex.ptok = p->lex.pcur;
19822 }
19823 dispatch_scan_event(p, tSTRING_CONTENT);
19824 p->lex.pcur += back;
19825}
19826
19827/* this can be shared with ripper, since it's independent from struct
19828 * parser_params. */
19829#ifndef RIPPER
19830#define BIT(c, idx) (((c) / 32 - 1 == idx) ? (1U << ((c) % 32)) : 0)
19831#define SPECIAL_PUNCT(idx) ( \
19832 BIT('~', idx) | BIT('*', idx) | BIT('$', idx) | BIT('?', idx) | \
19833 BIT('!', idx) | BIT('@', idx) | BIT('/', idx) | BIT('\\', idx) | \
19834 BIT(';', idx) | BIT(',', idx) | BIT('.', idx) | BIT('=', idx) | \
19835 BIT(':', idx) | BIT('<', idx) | BIT('>', idx) | BIT('\"', idx) | \
19836 BIT('&', idx) | BIT('`', idx) | BIT('\'', idx) | BIT('+', idx) | \
19837 BIT('0', idx))
19838const uint_least32_t ruby_global_name_punct_bits[] = {
19839 SPECIAL_PUNCT(0),
19840 SPECIAL_PUNCT(1),
19841 SPECIAL_PUNCT(2),
19842};
19843#undef BIT
19844#undef SPECIAL_PUNCT
19845#endif
19846
19847static enum yytokentype
19848parser_peek_variable_name(struct parser_params *p)
19849{
19850 int c;
19851 const char *ptr = p->lex.pcur;
19852
19853 if (lex_eol_ptr_n_p(p, ptr, 1)) return 0;
19854 c = *ptr++;
19855 switch (c) {
19856 case '$':
19857 if ((c = *ptr) == '-') {
19858 if (lex_eol_ptr_p(p, ++ptr)) return 0;
19859 c = *ptr;
19860 }
19861 else if (is_global_name_punct(c) || ISDIGIT(c)) {
19862 return tSTRING_DVAR;
19863 }
19864 break;
19865 case '@':
19866 if ((c = *ptr) == '@') {
19867 if (lex_eol_ptr_p(p, ++ptr)) return 0;
19868 c = *ptr;
19869 }
19870 break;
19871 case '{':
19872 p->lex.pcur = ptr;
19873 p->command_start = TRUE;
19874 yylval.state = p->lex.state;
19875 return tSTRING_DBEG;
19876 default:
19877 return 0;
19878 }
19879 if (!ISASCII(c) || c == '_' || ISALPHA(c))
19880 return tSTRING_DVAR;
19881 return 0;
19882}
19883
19884#define IS_ARG() IS_lex_state(EXPR_ARG_ANY)
19885#define IS_END() IS_lex_state(EXPR_END_ANY)
19886#define IS_BEG() (IS_lex_state(EXPR_BEG_ANY) || IS_lex_state_all(EXPR_ARG|EXPR_LABELED))
19887#define IS_SPCARG(c) (IS_ARG() && space_seen && !ISSPACE(c))
19888#define IS_LABEL_POSSIBLE() (\
19889 (IS_lex_state(EXPR_LABEL|EXPR_ENDFN) && !cmd_state) || \
19890 IS_ARG())
19891#define IS_LABEL_SUFFIX(n) (peek_n(p, ':',(n)) && !peek_n(p, ':', (n)+1))
19892#define IS_AFTER_OPERATOR() IS_lex_state(EXPR_FNAME | EXPR_DOT)
19893
19894static inline enum yytokentype
19895parser_string_term(struct parser_params *p, int func)
19896{
19897 xfree(p->lex.strterm);
19898 p->lex.strterm = 0;
19899 if (func & STR_FUNC_REGEXP) {
19900 set_yylval_num(regx_options(p));
19901 dispatch_scan_event(p, tREGEXP_END);
19902 SET_LEX_STATE(EXPR_END);
19903 return tREGEXP_END;
19904 }
19905 if ((func & STR_FUNC_LABEL) && IS_LABEL_SUFFIX(0)) {
19906 nextc(p);
19907 SET_LEX_STATE(EXPR_ARG|EXPR_LABELED);
19908 return tLABEL_END;
19909 }
19910 SET_LEX_STATE(EXPR_END);
19911 return tSTRING_END;
19912}
19913
19914static enum yytokentype
19915parse_string(struct parser_params *p, rb_strterm_literal_t *quote)
19916{
19917 int func = quote->func;
19918 int term = quote->term;
19919 int paren = quote->paren;
19920 int c, space = 0;
19921 rb_encoding *enc = p->enc;
19922 rb_encoding *base_enc = 0;
19923 rb_parser_string_t *lit;
19924
19925 if (func & STR_FUNC_TERM) {
19926 if (func & STR_FUNC_QWORDS) nextc(p); /* delayed term */
19927 SET_LEX_STATE(EXPR_END);
19928 xfree(p->lex.strterm);
19929 p->lex.strterm = 0;
19930 return func & STR_FUNC_REGEXP ? tREGEXP_END : tSTRING_END;
19931 }
19932 c = nextc(p);
19933 if ((func & STR_FUNC_QWORDS) && ISSPACE(c)) {
19934 while (c != '\n' && ISSPACE(c = nextc(p)));
19935 space = 1;
19936 }
19937 if (func & STR_FUNC_LIST) {
19938 quote->func &= ~STR_FUNC_LIST;
19939 space = 1;
19940 }
19941 if (c == term && !quote->nest) {
19942 if (func & STR_FUNC_QWORDS) {
19943 quote->func |= STR_FUNC_TERM;
19944 pushback(p, c); /* dispatch the term at tSTRING_END */
19945 add_delayed_token(p, p->lex.ptok, p->lex.pcur);
19946 return ' ';
19947 }
19948 return parser_string_term(p, func);
19949 }
19950 if (space) {
19951 if (!ISSPACE(c)) pushback(p, c);
19952 add_delayed_token(p, p->lex.ptok, p->lex.pcur);
19953 return ' ';
19954 }
19955 newtok(p);
19956 if ((func & STR_FUNC_EXPAND) && c == '#') {
19957 enum yytokentype t = parser_peek_variable_name(p);
19958 if (t) return t;
19959 tokadd(p, '#');
19960 c = nextc(p);
19961 }
19962 pushback(p, c);
19963 if (tokadd_string(p, func, term, paren, &quote->nest,
19964 &enc, &base_enc) == -1) {
19965 if (p->eofp) {
19966#ifndef RIPPER
19967# define unterminated_literal(mesg) yyerror0(mesg)
19968#else
19969# define unterminated_literal(mesg) compile_error(p, mesg)
19970#endif
19971 literal_flush(p, p->lex.pcur);
19972 if (func & STR_FUNC_QWORDS) {
19973 /* no content to add, bailing out here */
19974 unterminated_literal("unterminated list meets end of file");
19975 xfree(p->lex.strterm);
19976 p->lex.strterm = 0;
19977 return tSTRING_END;
19978 }
19979 if (func & STR_FUNC_REGEXP) {
19980 unterminated_literal("unterminated regexp meets end of file");
19981 }
19982 else {
19983 unterminated_literal("unterminated string meets end of file");
19984 }
19985 quote->func |= STR_FUNC_TERM;
19986 }
19987 }
19988
19989 tokfix(p);
19990 lit = STR_NEW3(tok(p), toklen(p), enc, func);
19991 set_yylval_str(lit);
19992 flush_string_content(p, enc, 0);
19993
19994 return tSTRING_CONTENT;
19995}
19996
19997static enum yytokentype
19998heredoc_identifier(struct parser_params *p)
19999{
20000 /*
20001 * term_len is length of `<<"END"` except `END`,
20002 * in this case term_len is 4 (<, <, " and ").
20003 */
20004 long len, offset = p->lex.pcur - p->lex.pbeg;
20005 int c = nextc(p), term, func = 0, quote = 0;
20006 enum yytokentype token = tSTRING_BEG;
20007 int indent = 0;
20008
20009 if (c == '-') {
20010 c = nextc(p);
20011 func = STR_FUNC_INDENT;
20012 offset++;
20013 }
20014 else if (c == '~') {
20015 c = nextc(p);
20016 func = STR_FUNC_INDENT;
20017 offset++;
20018 indent = INT_MAX;
20019 }
20020 switch (c) {
20021 case '\'':
20022 func |= str_squote; goto quoted;
20023 case '"':
20024 func |= str_dquote; goto quoted;
20025 case '`':
20026 token = tXSTRING_BEG;
20027 func |= str_xquote; goto quoted;
20028
20029 quoted:
20030 quote++;
20031 offset++;
20032 term = c;
20033 len = 0;
20034 while ((c = nextc(p)) != term) {
20035 if (c == -1 || c == '\r' || c == '\n') {
20036 yyerror0("unterminated here document identifier");
20037 return -1;
20038 }
20039 }
20040 break;
20041
20042 default:
20043 if (!parser_is_identchar(p)) {
20044 pushback(p, c);
20045 if (func & STR_FUNC_INDENT) {
20046 pushback(p, indent > 0 ? '~' : '-');
20047 }
20048 return 0;
20049 }
20050 func |= str_dquote;
20051 do {
20052 int n = parser_precise_mbclen(p, p->lex.pcur-1);
20053 if (n < 0) return 0;
20054 p->lex.pcur += --n;
20055 } while ((c = nextc(p)) != -1 && parser_is_identchar(p));
20056 pushback(p, c);
20057 break;
20058 }
20059
20060 len = p->lex.pcur - (p->lex.pbeg + offset) - quote;
20061 if ((unsigned long)len >= HERETERM_LENGTH_MAX)
20062 yyerror0("too long here document identifier");
20063 dispatch_scan_event(p, tHEREDOC_BEG);
20064 lex_goto_eol(p);
20065
20066 p->lex.strterm = new_heredoc(p);
20067 rb_strterm_heredoc_t *here = &p->lex.strterm->u.heredoc;
20068 here->offset = offset;
20069 here->sourceline = p->ruby_sourceline;
20070 here->length = (unsigned)len;
20071 here->quote = quote;
20072 here->func = func;
20073 here->lastline = p->lex.lastline;
20074
20075 token_flush(p);
20076 p->heredoc_indent = indent;
20077 p->heredoc_line_indent = 0;
20078 return token;
20079}
20080
20081static void
20082heredoc_restore(struct parser_params *p, rb_strterm_heredoc_t *here)
20083{
20084 rb_parser_string_t *line;
20085 rb_strterm_t *term = p->lex.strterm;
20086
20087 p->lex.strterm = 0;
20088 line = here->lastline;
20089 p->lex.lastline = line;
20090 p->lex.pbeg = PARSER_STRING_PTR(line);
20091 p->lex.pend = p->lex.pbeg + PARSER_STRING_LEN(line);
20092 p->lex.pcur = p->lex.pbeg + here->offset + here->length + here->quote;
20093 p->lex.ptok = p->lex.pbeg + here->offset - here->quote;
20094 p->heredoc_end = p->ruby_sourceline;
20095 p->ruby_sourceline = (int)here->sourceline;
20096 if (p->eofp) p->lex.nextline = AFTER_HEREDOC_WITHOUT_TERMINATOR;
20097 p->eofp = 0;
20098 xfree(term);
20099}
20100
20101static int
20102dedent_string_column(const char *str, long len, int width)
20103{
20104 int i, col = 0;
20105
20106 for (i = 0; i < len && col < width; i++) {
20107 if (str[i] == ' ') {
20108 col++;
20109 }
20110 else if (str[i] == '\t') {
20111 int n = TAB_WIDTH * (col / TAB_WIDTH + 1);
20112 if (n > width) break;
20113 col = n;
20114 }
20115 else {
20116 break;
20117 }
20118 }
20119
20120 return i;
20121}
20122
20123static int
20124dedent_string(struct parser_params *p, rb_parser_string_t *string, int width)
20125{
20126 char *str;
20127 long len;
20128 int i;
20129
20130 len = PARSER_STRING_LEN(string);
20131 str = PARSER_STRING_PTR(string);
20132
20133 i = dedent_string_column(str, len, width);
20134 if (!i) return 0;
20135
20136 rb_parser_str_modify(string);
20137 str = PARSER_STRING_PTR(string);
20138 if (PARSER_STRING_LEN(string) != len)
20139 rb_fatal("literal string changed: %s", PARSER_STRING_PTR(string));
20140 MEMMOVE(str, str + i, char, len - i);
20141 rb_parser_str_set_len(p, string, len - i);
20142 return i;
20143}
20144
20145static NODE *
20146heredoc_dedent(struct parser_params *p, NODE *root)
20147{
20148 NODE *node, *str_node, *prev_node;
20149 int indent = p->heredoc_indent;
20150 rb_parser_string_t *prev_lit = 0;
20151
20152 if (indent <= 0) return root;
20153 if (!root) return root;
20154
20155 prev_node = node = str_node = root;
20156 if (nd_type_p(root, NODE_LIST)) str_node = RNODE_LIST(root)->nd_head;
20157
20158 while (str_node) {
20159 rb_parser_string_t *lit = RNODE_STR(str_node)->string;
20160 if (nd_fl_newline(str_node)) {
20161 dedent_string(p, lit, indent);
20162 }
20163 if (!prev_lit) {
20164 prev_lit = lit;
20165 }
20166 else if (!literal_concat0(p, prev_lit, lit)) {
20167 return 0;
20168 }
20169 else {
20170 NODE *end = RNODE_LIST(node)->as.nd_end;
20171 node = RNODE_LIST(prev_node)->nd_next = RNODE_LIST(node)->nd_next;
20172 if (!node) {
20173 if (nd_type_p(prev_node, NODE_DSTR))
20174 nd_set_type(prev_node, NODE_STR);
20175 break;
20176 }
20177 RNODE_LIST(node)->as.nd_end = end;
20178 goto next_str;
20179 }
20180
20181 str_node = 0;
20182 while ((nd_type_p(node, NODE_LIST) || nd_type_p(node, NODE_DSTR)) && (node = RNODE_LIST(prev_node = node)->nd_next) != 0) {
20183 next_str:
20184 if (!nd_type_p(node, NODE_LIST)) break;
20185 if ((str_node = RNODE_LIST(node)->nd_head) != 0) {
20186 enum node_type type = nd_type(str_node);
20187 if (type == NODE_STR || type == NODE_DSTR) break;
20188 prev_lit = 0;
20189 str_node = 0;
20190 }
20191 }
20192 }
20193 return root;
20194}
20195
20196static int
20197whole_match_p(struct parser_params *p, const char *eos, long len, int indent)
20198{
20199 const char *beg = p->lex.pbeg;
20200 const char *ptr = p->lex.pend;
20201
20202 if (ptr - beg < len) return FALSE;
20203 if (ptr > beg && ptr[-1] == '\n') {
20204 if (--ptr > beg && ptr[-1] == '\r') --ptr;
20205 if (ptr - beg < len) return FALSE;
20206 }
20207 if (strncmp(eos, ptr -= len, len)) return FALSE;
20208 if (indent) {
20209 while (beg < ptr && ISSPACE(*beg)) beg++;
20210 }
20211 return beg == ptr;
20212}
20213
20214static int
20215word_match_p(struct parser_params *p, const char *word, long len)
20216{
20217 if (strncmp(p->lex.pcur, word, len)) return 0;
20218 if (lex_eol_n_p(p, len)) return 1;
20219 int c = (unsigned char)p->lex.pcur[len];
20220 if (ISSPACE(c)) return 1;
20221 switch (c) {
20222 case '\0': case '\004': case '\032': return 1;
20223 }
20224 return 0;
20225}
20226
20227#define NUM_SUFFIX_R (1<<0)
20228#define NUM_SUFFIX_I (1<<1)
20229#define NUM_SUFFIX_ALL 3
20230
20231static int
20232number_literal_suffix(struct parser_params *p, int mask)
20233{
20234 int c, result = 0;
20235 const char *lastp = p->lex.pcur;
20236
20237 while ((c = nextc(p)) != -1) {
20238 if ((mask & NUM_SUFFIX_I) && c == 'i') {
20239 result |= (mask & NUM_SUFFIX_I);
20240 mask &= ~NUM_SUFFIX_I;
20241 /* r after i, rational of complex is disallowed */
20242 mask &= ~NUM_SUFFIX_R;
20243 continue;
20244 }
20245 if ((mask & NUM_SUFFIX_R) && c == 'r') {
20246 result |= (mask & NUM_SUFFIX_R);
20247 mask &= ~NUM_SUFFIX_R;
20248 continue;
20249 }
20250 if (!ISASCII(c) || ISALPHA(c) || c == '_') {
20251 p->lex.pcur = lastp;
20252 literal_flush(p, p->lex.pcur);
20253 return 0;
20254 }
20255 pushback(p, c);
20256 break;
20257 }
20258 return result;
20259}
20260
20261static enum yytokentype
20262set_number_literal(struct parser_params *p, enum yytokentype type, int suffix, int base, int seen_point)
20263{
20264 enum rb_numeric_type numeric_type = integer_literal;
20265
20266 if (type == tFLOAT) {
20267 numeric_type = float_literal;
20268 }
20269
20270 if (suffix & NUM_SUFFIX_R) {
20271 type = tRATIONAL;
20272 numeric_type = rational_literal;
20273 }
20274 if (suffix & NUM_SUFFIX_I) {
20275 type = tIMAGINARY;
20276 }
20277
20278 switch (type) {
20279 case tINTEGER:
20280 set_yylval_node(NEW_INTEGER(strdup(tok(p)), base, &_cur_loc));
20281 break;
20282 case tFLOAT:
20283 set_yylval_node(NEW_FLOAT(strdup(tok(p)), &_cur_loc));
20284 break;
20285 case tRATIONAL:
20286 set_yylval_node(NEW_RATIONAL(strdup(tok(p)), base, seen_point, &_cur_loc));
20287 break;
20288 case tIMAGINARY:
20289 set_yylval_node(NEW_IMAGINARY(strdup(tok(p)), base, seen_point, numeric_type, &_cur_loc));
20290 (void)numeric_type; /* for ripper */
20291 break;
20292 default:
20293 rb_bug("unexpected token: %d", type);
20294 }
20295 SET_LEX_STATE(EXPR_END);
20296 return type;
20297}
20298
20299#define dispatch_heredoc_end(p) parser_dispatch_heredoc_end(p, __LINE__)
20300static void
20301parser_dispatch_heredoc_end(struct parser_params *p, int line)
20302{
20303 if (has_delayed_token(p))
20304 dispatch_delayed_token(p, tSTRING_CONTENT);
20305
20306#ifdef RIPPER
20307 VALUE str = STR_NEW(p->lex.ptok, p->lex.pend - p->lex.ptok);
20308 ripper_dispatch1(p, ripper_token2eventid(tHEREDOC_END), str);
20309#else
20310 if (p->keep_tokens) {
20311 rb_parser_string_t *str = rb_parser_encoding_string_new(p, p->lex.ptok, p->lex.pend - p->lex.ptok, p->enc);
20312 RUBY_SET_YYLLOC_OF_HEREDOC_END(*p->yylloc);
20313 parser_append_tokens(p, str, tHEREDOC_END, line);
20314 }
20315#endif
20316
20317 RUBY_SET_YYLLOC_FROM_STRTERM_HEREDOC(*p->yylloc);
20318 lex_goto_eol(p);
20319 token_flush(p);
20320}
20321
20322static enum yytokentype
20323here_document(struct parser_params *p, rb_strterm_heredoc_t *here)
20324{
20325 int c, func, indent = 0;
20326 const char *eos, *ptr, *ptr_end;
20327 long len;
20328 rb_parser_string_t *str = 0;
20329 rb_encoding *enc = p->enc;
20330 rb_encoding *base_enc = 0;
20331 int bol;
20332#ifdef RIPPER
20333 VALUE s_value;
20334#endif
20335
20336 eos = PARSER_STRING_PTR(here->lastline) + here->offset;
20337 len = here->length;
20338 indent = (func = here->func) & STR_FUNC_INDENT;
20339
20340 if ((c = nextc(p)) == -1) {
20341 error:
20342#ifdef RIPPER
20343 if (!has_delayed_token(p)) {
20344 dispatch_scan_event(p, tSTRING_CONTENT);
20345 }
20346 else if (p->delayed.end_line + 1 == p->ruby_sourceline) {
20347 if ((len = p->lex.pcur - p->lex.ptok) > 0) {
20348 if (!(func & STR_FUNC_REGEXP)) {
20349 int cr = ENC_CODERANGE_UNKNOWN;
20350 rb_str_coderange_scan_restartable(p->lex.ptok, p->lex.pcur, enc, &cr);
20351 if (cr != ENC_CODERANGE_7BIT &&
20352 rb_is_usascii_enc(p->enc) &&
20353 enc != rb_utf8_encoding()) {
20354 enc = rb_ascii8bit_encoding();
20355 }
20356 }
20357 rb_parser_enc_str_buf_cat(p, p->delayed.token, p->lex.ptok, len, enc);
20358 }
20359 dispatch_delayed_token(p, tSTRING_CONTENT);
20360 }
20361 else {
20362 dispatch_delayed_token(p, tSTRING_CONTENT);
20363 dispatch_scan_event(p, tSTRING_CONTENT);
20364 }
20365 lex_goto_eol(p);
20366#endif
20367 heredoc_restore(p, &p->lex.strterm->u.heredoc);
20368 compile_error(p, "can't find string \"%.*s\" anywhere before EOF",
20369 (int)len, eos);
20370 token_flush(p);
20371 SET_LEX_STATE(EXPR_END);
20372 return tSTRING_END;
20373 }
20374 bol = was_bol(p);
20375 if (!bol) {
20376 /* not beginning of line, cannot be the terminator */
20377 }
20378 else if (p->heredoc_line_indent == -1) {
20379 /* `heredoc_line_indent == -1` means
20380 * - "after an interpolation in the same line", or
20381 * - "in a continuing line"
20382 */
20383 p->heredoc_line_indent = 0;
20384 }
20385 else if (whole_match_p(p, eos, len, indent)) {
20386 dispatch_heredoc_end(p);
20387 restore:
20388 heredoc_restore(p, &p->lex.strterm->u.heredoc);
20389 token_flush(p);
20390 SET_LEX_STATE(EXPR_END);
20391 return tSTRING_END;
20392 }
20393
20394 if (!(func & STR_FUNC_EXPAND)) {
20395 do {
20396 ptr = PARSER_STRING_PTR(p->lex.lastline);
20397 ptr_end = p->lex.pend;
20398 if (ptr_end > ptr) {
20399 switch (ptr_end[-1]) {
20400 case '\n':
20401 if (--ptr_end == ptr || ptr_end[-1] != '\r') {
20402 ptr_end++;
20403 break;
20404 }
20405 case '\r':
20406 --ptr_end;
20407 }
20408 }
20409
20410 if (p->heredoc_indent > 0) {
20411 long i = 0;
20412 while (ptr + i < ptr_end && parser_update_heredoc_indent(p, ptr[i]))
20413 i++;
20414 p->heredoc_line_indent = 0;
20415 }
20416
20417 if (str)
20418 parser_str_cat(str, ptr, ptr_end - ptr);
20419 else
20420 str = rb_parser_encoding_string_new(p, ptr, ptr_end - ptr, enc);
20421 if (!lex_eol_ptr_p(p, ptr_end)) parser_str_cat_cstr(str, "\n");
20422 lex_goto_eol(p);
20423 if (p->heredoc_indent > 0) {
20424 goto flush_str;
20425 }
20426 if (nextc(p) == -1) {
20427 if (str) {
20428 rb_parser_string_free(p, str);
20429 str = 0;
20430 }
20431 goto error;
20432 }
20433 } while (!whole_match_p(p, eos, len, indent));
20434 }
20435 else {
20436 /* int mb = ENC_CODERANGE_7BIT, *mbp = &mb;*/
20437 newtok(p);
20438 if (c == '#') {
20439 enum yytokentype t = parser_peek_variable_name(p);
20440 if (p->heredoc_line_indent != -1) {
20441 if (p->heredoc_indent > p->heredoc_line_indent) {
20442 p->heredoc_indent = p->heredoc_line_indent;
20443 }
20444 p->heredoc_line_indent = -1;
20445 }
20446 if (t) return t;
20447 tokadd(p, '#');
20448 c = nextc(p);
20449 }
20450 do {
20451 pushback(p, c);
20452 enc = p->enc;
20453 if ((c = tokadd_string(p, func, '\n', 0, NULL, &enc, &base_enc)) == -1) {
20454 if (p->eofp) goto error;
20455 goto restore;
20456 }
20457 if (c != '\n') {
20458 if (c == '\\') p->heredoc_line_indent = -1;
20459 flush:
20460 str = STR_NEW3(tok(p), toklen(p), enc, func);
20461 flush_str:
20462 set_yylval_str(str);
20463#ifndef RIPPER
20464 if (bol) nd_set_fl_newline(yylval.node);
20465#endif
20466 flush_string_content(p, enc, 0);
20467 return tSTRING_CONTENT;
20468 }
20469 tokadd(p, nextc(p));
20470 if (p->heredoc_indent > 0) {
20471 lex_goto_eol(p);
20472 goto flush;
20473 }
20474 /* if (mbp && mb == ENC_CODERANGE_UNKNOWN) mbp = 0;*/
20475 if ((c = nextc(p)) == -1) goto error;
20476 } while (!whole_match_p(p, eos, len, indent));
20477 str = STR_NEW3(tok(p), toklen(p), enc, func);
20478 }
20479 dispatch_heredoc_end(p);
20480 heredoc_restore(p, &p->lex.strterm->u.heredoc);
20481 token_flush(p);
20482 p->lex.strterm = NEW_STRTERM(func | STR_FUNC_TERM, 0, 0);
20483#ifdef RIPPER
20484 /* Preserve s_value for set_yylval_str */
20485 s_value = p->s_value;
20486#endif
20487 set_yylval_str(str);
20488#ifdef RIPPER
20489 set_parser_s_value(s_value);
20490#endif
20491
20492#ifndef RIPPER
20493 if (bol) nd_set_fl_newline(yylval.node);
20494#endif
20495 return tSTRING_CONTENT;
20496}
20497
20498#include "lex.c"
20499
20500static int
20501arg_ambiguous(struct parser_params *p, char c)
20502{
20503#ifndef RIPPER
20504 if (c == '/') {
20505 rb_warning1("ambiguity between regexp and two divisions: wrap regexp in parentheses or add a space after '%c' operator", WARN_I(c));
20506 }
20507 else {
20508 rb_warning1("ambiguous first argument; put parentheses or a space even after '%c' operator", WARN_I(c));
20509 }
20510#else
20511 dispatch1(arg_ambiguous, rb_usascii_str_new(&c, 1));
20512#endif
20513 return TRUE;
20514}
20515
20516/* returns true value if formal argument error;
20517 * Qtrue, or error message if ripper */
20518static VALUE
20519formal_argument_error(struct parser_params *p, ID id)
20520{
20521 switch (id_type(id)) {
20522 case ID_LOCAL:
20523 break;
20524#ifndef RIPPER
20525# define ERR(mesg) (yyerror0(mesg), Qtrue)
20526#else
20527# define ERR(mesg) WARN_S(mesg)
20528#endif
20529 case ID_CONST:
20530 return ERR("formal argument cannot be a constant");
20531 case ID_INSTANCE:
20532 return ERR("formal argument cannot be an instance variable");
20533 case ID_GLOBAL:
20534 return ERR("formal argument cannot be a global variable");
20535 case ID_CLASS:
20536 return ERR("formal argument cannot be a class variable");
20537 default:
20538 return ERR("formal argument must be local variable");
20539#undef ERR
20540 }
20541 shadowing_lvar(p, id);
20542
20543 return Qfalse;
20544}
20545
20546static int
20547lvar_defined(struct parser_params *p, ID id)
20548{
20549 return (dyna_in_block(p) && dvar_defined(p, id)) || local_id(p, id);
20550}
20551
20552/* emacsen -*- hack */
20553static long
20554parser_encode_length(struct parser_params *p, const char *name, long len)
20555{
20556 long nlen;
20557
20558 if (len > 5 && name[nlen = len - 5] == '-') {
20559 if (rb_memcicmp(name + nlen + 1, "unix", 4) == 0)
20560 return nlen;
20561 }
20562 if (len > 4 && name[nlen = len - 4] == '-') {
20563 if (rb_memcicmp(name + nlen + 1, "dos", 3) == 0)
20564 return nlen;
20565 if (rb_memcicmp(name + nlen + 1, "mac", 3) == 0 &&
20566 !(len == 8 && rb_memcicmp(name, "utf8-mac", len) == 0))
20567 /* exclude UTF8-MAC because the encoding named "UTF8" doesn't exist in Ruby */
20568 return nlen;
20569 }
20570 return len;
20571}
20572
20573static void
20574parser_set_encode(struct parser_params *p, const char *name)
20575{
20576 rb_encoding *enc;
20577 VALUE excargs[3];
20578 int idx = 0;
20579
20580 const char *wrong = 0;
20581 switch (*name) {
20582 case 'e': case 'E': wrong = "external"; break;
20583 case 'i': case 'I': wrong = "internal"; break;
20584 case 'f': case 'F': wrong = "filesystem"; break;
20585 case 'l': case 'L': wrong = "locale"; break;
20586 }
20587 if (wrong && STRCASECMP(name, wrong) == 0) goto unknown;
20588 idx = rb_enc_find_index(name);
20589 if (idx < 0) {
20590 unknown:
20591 excargs[1] = rb_sprintf("unknown encoding name: %s", name);
20592 error:
20593 excargs[0] = rb_eArgError;
20594 excargs[2] = rb_make_backtrace();
20595 rb_ary_unshift(excargs[2], rb_sprintf("%"PRIsVALUE":%d", p->ruby_sourcefile_string, p->ruby_sourceline));
20596 VALUE exc = rb_make_exception(3, excargs);
20597 ruby_show_error_line(p, exc, &(YYLTYPE)RUBY_INIT_YYLLOC(), p->ruby_sourceline, p->lex.lastline);
20598
20599 rb_ast_free(p->ast);
20600 p->ast = NULL;
20601
20602 rb_exc_raise(exc);
20603 }
20604 enc = rb_enc_from_index(idx);
20605 if (!rb_enc_asciicompat(enc)) {
20606 excargs[1] = rb_sprintf("%s is not ASCII compatible", rb_enc_name(enc));
20607 goto error;
20608 }
20609 p->enc = enc;
20610#ifndef RIPPER
20611 if (p->debug_lines) {
20612 long i;
20613 for (i = 0; i < p->debug_lines->len; i++) {
20614 rb_parser_enc_associate(p, p->debug_lines->data[i], enc);
20615 }
20616 }
20617#endif
20618}
20619
20620static bool
20621comment_at_top(struct parser_params *p)
20622{
20623 if (p->token_seen) return false;
20624 return (p->line_count == (p->has_shebang ? 2 : 1));
20625}
20626
20627typedef long (*rb_magic_comment_length_t)(struct parser_params *p, const char *name, long len);
20628typedef void (*rb_magic_comment_setter_t)(struct parser_params *p, const char *name, const char *val);
20629
20630static int parser_invalid_pragma_value(struct parser_params *p, const char *name, const char *val);
20631
20632static void
20633magic_comment_encoding(struct parser_params *p, const char *name, const char *val)
20634{
20635 if (!comment_at_top(p)) {
20636 return;
20637 }
20638 parser_set_encode(p, val);
20639}
20640
20641static int
20642parser_get_bool(struct parser_params *p, const char *name, const char *val)
20643{
20644 switch (*val) {
20645 case 't': case 'T':
20646 if (STRCASECMP(val, "true") == 0) {
20647 return TRUE;
20648 }
20649 break;
20650 case 'f': case 'F':
20651 if (STRCASECMP(val, "false") == 0) {
20652 return FALSE;
20653 }
20654 break;
20655 }
20656 return parser_invalid_pragma_value(p, name, val);
20657}
20658
20659static int
20660parser_invalid_pragma_value(struct parser_params *p, const char *name, const char *val)
20661{
20662 rb_warning2("invalid value for %s: %s", WARN_S(name), WARN_S(val));
20663 return -1;
20664}
20665
20666static void
20667parser_set_token_info(struct parser_params *p, const char *name, const char *val)
20668{
20669 int b = parser_get_bool(p, name, val);
20670 if (b >= 0) p->token_info_enabled = b;
20671}
20672
20673static void
20674parser_set_frozen_string_literal(struct parser_params *p, const char *name, const char *val)
20675{
20676 int b;
20677
20678 if (p->token_seen) {
20679 rb_warning1("'%s' is ignored after any tokens", WARN_S(name));
20680 return;
20681 }
20682
20683 b = parser_get_bool(p, name, val);
20684 if (b < 0) return;
20685
20686 p->frozen_string_literal = b;
20687}
20688
20689static void
20690parser_set_shareable_constant_value(struct parser_params *p, const char *name, const char *val)
20691{
20692 for (const char *s = p->lex.pbeg, *e = p->lex.pcur; s < e; ++s) {
20693 if (*s == ' ' || *s == '\t') continue;
20694 if (*s == '#') break;
20695 rb_warning1("'%s' is ignored unless in comment-only line", WARN_S(name));
20696 return;
20697 }
20698
20699 switch (*val) {
20700 case 'n': case 'N':
20701 if (STRCASECMP(val, "none") == 0) {
20702 p->ctxt.shareable_constant_value = rb_parser_shareable_none;
20703 return;
20704 }
20705 break;
20706 case 'l': case 'L':
20707 if (STRCASECMP(val, "literal") == 0) {
20708 p->ctxt.shareable_constant_value = rb_parser_shareable_literal;
20709 return;
20710 }
20711 break;
20712 case 'e': case 'E':
20713 if (STRCASECMP(val, "experimental_copy") == 0) {
20714 p->ctxt.shareable_constant_value = rb_parser_shareable_copy;
20715 return;
20716 }
20717 if (STRCASECMP(val, "experimental_everything") == 0) {
20718 p->ctxt.shareable_constant_value = rb_parser_shareable_everything;
20719 return;
20720 }
20721 break;
20722 }
20723 parser_invalid_pragma_value(p, name, val);
20724}
20725
20726# if WARN_PAST_SCOPE
20727static void
20728parser_set_past_scope(struct parser_params *p, const char *name, const char *val)
20729{
20730 int b = parser_get_bool(p, name, val);
20731 if (b >= 0) p->past_scope_enabled = b;
20732}
20733# endif
20734
20736 const char *name;
20737 rb_magic_comment_setter_t func;
20738 rb_magic_comment_length_t length;
20739};
20740
20741static const struct magic_comment magic_comments[] = {
20742 {"coding", magic_comment_encoding, parser_encode_length},
20743 {"encoding", magic_comment_encoding, parser_encode_length},
20744 {"frozen_string_literal", parser_set_frozen_string_literal},
20745 {"shareable_constant_value", parser_set_shareable_constant_value},
20746 {"warn_indent", parser_set_token_info},
20747# if WARN_PAST_SCOPE
20748 {"warn_past_scope", parser_set_past_scope},
20749# endif
20750};
20751
20752static const char *
20753magic_comment_marker(const char *str, long len)
20754{
20755 long i = 2;
20756
20757 while (i < len) {
20758 switch (str[i]) {
20759 case '-':
20760 if (str[i-1] == '*' && str[i-2] == '-') {
20761 return str + i + 1;
20762 }
20763 i += 2;
20764 break;
20765 case '*':
20766 if (i + 1 >= len) return 0;
20767 if (str[i+1] != '-') {
20768 i += 4;
20769 }
20770 else if (str[i-1] != '-') {
20771 i += 2;
20772 }
20773 else {
20774 return str + i + 2;
20775 }
20776 break;
20777 default:
20778 i += 3;
20779 break;
20780 }
20781 }
20782 return 0;
20783}
20784
20785static int
20786parser_magic_comment(struct parser_params *p, const char *str, long len)
20787{
20788 int indicator = 0;
20789 VALUE name = 0, val = 0;
20790 const char *beg, *end, *vbeg, *vend;
20791#define str_copy(_s, _p, _n) ((_s) \
20792 ? (void)(rb_str_resize((_s), (_n)), \
20793 MEMCPY(RSTRING_PTR(_s), (_p), char, (_n)), (_s)) \
20794 : (void)((_s) = STR_NEW((_p), (_n))))
20795
20796 if (len <= 7) return FALSE;
20797 if (!!(beg = magic_comment_marker(str, len))) {
20798 if (!(end = magic_comment_marker(beg, str + len - beg)))
20799 return FALSE;
20800 indicator = TRUE;
20801 str = beg;
20802 len = end - beg - 3;
20803 }
20804
20805 /* %r"([^\\s\'\":;]+)\\s*:\\s*(\"(?:\\\\.|[^\"])*\"|[^\"\\s;]+)[\\s;]*" */
20806 while (len > 0) {
20807 const struct magic_comment *mc = magic_comments;
20808 char *s;
20809 int i;
20810 long n = 0;
20811
20812 for (; len > 0 && *str; str++, --len) {
20813 switch (*str) {
20814 case '\'': case '"': case ':': case ';':
20815 continue;
20816 }
20817 if (!ISSPACE(*str)) break;
20818 }
20819 for (beg = str; len > 0; str++, --len) {
20820 switch (*str) {
20821 case '\'': case '"': case ':': case ';':
20822 break;
20823 default:
20824 if (ISSPACE(*str)) break;
20825 continue;
20826 }
20827 break;
20828 }
20829 for (end = str; len > 0 && ISSPACE(*str); str++, --len);
20830 if (!len) break;
20831 if (*str != ':') {
20832 if (!indicator) return FALSE;
20833 continue;
20834 }
20835
20836 do str++; while (--len > 0 && ISSPACE(*str));
20837 if (!len) break;
20838 const char *tok_beg = str;
20839 if (*str == '"') {
20840 for (vbeg = ++str; --len > 0 && *str != '"'; str++) {
20841 if (*str == '\\') {
20842 --len;
20843 ++str;
20844 }
20845 }
20846 vend = str;
20847 if (len) {
20848 --len;
20849 ++str;
20850 }
20851 }
20852 else {
20853 for (vbeg = str; len > 0 && *str != '"' && *str != ';' && !ISSPACE(*str); --len, str++);
20854 vend = str;
20855 }
20856 const char *tok_end = str;
20857 if (indicator) {
20858 while (len > 0 && (*str == ';' || ISSPACE(*str))) --len, str++;
20859 }
20860 else {
20861 while (len > 0 && (ISSPACE(*str))) --len, str++;
20862 if (len) return FALSE;
20863 }
20864
20865 n = end - beg;
20866 str_copy(name, beg, n);
20867 s = RSTRING_PTR(name);
20868 for (i = 0; i < n; ++i) {
20869 if (s[i] == '-') s[i] = '_';
20870 }
20871 do {
20872 if (STRNCASECMP(mc->name, s, n) == 0 && !mc->name[n]) {
20873 n = vend - vbeg;
20874 if (mc->length) {
20875 n = (*mc->length)(p, vbeg, n);
20876 }
20877 str_copy(val, vbeg, n);
20878 p->lex.ptok = tok_beg;
20879 p->lex.pcur = tok_end;
20880 (*mc->func)(p, mc->name, RSTRING_PTR(val));
20881 break;
20882 }
20883 } while (++mc < magic_comments + numberof(magic_comments));
20884#ifdef RIPPER
20885 str_copy(val, vbeg, vend - vbeg);
20886 dispatch2(magic_comment, name, val);
20887#endif
20888 }
20889
20890 return TRUE;
20891}
20892
20893static void
20894set_file_encoding(struct parser_params *p, const char *str, const char *send)
20895{
20896 int sep = 0;
20897 const char *beg = str;
20898 VALUE s;
20899
20900 for (;;) {
20901 if (send - str <= 6) return;
20902 switch (str[6]) {
20903 case 'C': case 'c': str += 6; continue;
20904 case 'O': case 'o': str += 5; continue;
20905 case 'D': case 'd': str += 4; continue;
20906 case 'I': case 'i': str += 3; continue;
20907 case 'N': case 'n': str += 2; continue;
20908 case 'G': case 'g': str += 1; continue;
20909 case '=': case ':':
20910 sep = 1;
20911 str += 6;
20912 break;
20913 default:
20914 str += 6;
20915 if (ISSPACE(*str)) break;
20916 continue;
20917 }
20918 if (STRNCASECMP(str-6, "coding", 6) == 0) break;
20919 sep = 0;
20920 }
20921 for (;;) {
20922 do {
20923 if (++str >= send) return;
20924 } while (ISSPACE(*str));
20925 if (sep) break;
20926 if (*str != '=' && *str != ':') return;
20927 sep = 1;
20928 str++;
20929 }
20930 beg = str;
20931 while ((*str == '-' || *str == '_' || ISALNUM(*str)) && ++str < send);
20932 s = rb_str_new(beg, parser_encode_length(p, beg, str - beg));
20933 p->lex.ptok = beg;
20934 p->lex.pcur = str;
20935 parser_set_encode(p, RSTRING_PTR(s));
20936 rb_str_resize(s, 0);
20937}
20938
20939static void
20940parser_prepare(struct parser_params *p)
20941{
20942 int c = nextc0(p, FALSE);
20943 p->token_info_enabled = !compile_for_eval && RTEST(ruby_verbose);
20944 switch (c) {
20945 case '#':
20946 if (peek(p, '!')) p->has_shebang = 1;
20947 break;
20948 case 0xef: /* UTF-8 BOM marker */
20949 if (!lex_eol_n_p(p, 2) &&
20950 (unsigned char)p->lex.pcur[0] == 0xbb &&
20951 (unsigned char)p->lex.pcur[1] == 0xbf) {
20952 p->enc = rb_utf8_encoding();
20953 p->lex.pcur += 2;
20954#ifndef RIPPER
20955 if (p->debug_lines) {
20956 rb_parser_string_set_encoding(p->lex.lastline, p->enc);
20957 }
20958#endif
20959 p->lex.pbeg = p->lex.pcur;
20960 token_flush(p);
20961 return;
20962 }
20963 break;
20964 case -1: /* end of script. */
20965 return;
20966 }
20967 pushback(p, c);
20968 p->enc = rb_parser_str_get_encoding(p->lex.lastline);
20969}
20970
20971#ifndef RIPPER
20972#define ambiguous_operator(tok, op, syn) ( \
20973 rb_warning0("'"op"' after local variable or literal is interpreted as binary operator"), \
20974 rb_warning0("even though it seems like "syn""))
20975#else
20976#define ambiguous_operator(tok, op, syn) \
20977 dispatch2(operator_ambiguous, TOKEN2VAL(tok), rb_str_new_cstr(syn))
20978#endif
20979#define warn_balanced(tok, op, syn) ((void) \
20980 (!IS_lex_state_for(last_state, EXPR_CLASS|EXPR_DOT|EXPR_FNAME|EXPR_ENDFN) && \
20981 space_seen && !ISSPACE(c) && \
20982 (ambiguous_operator(tok, op, syn), 0)), \
20983 (enum yytokentype)(tok))
20984
20985static enum yytokentype
20986no_digits(struct parser_params *p)
20987{
20988 yyerror0("numeric literal without digits");
20989 if (peek(p, '_')) nextc(p);
20990 /* dummy 0, for tUMINUS_NUM at numeric */
20991 return set_number_literal(p, tINTEGER, 0, 10, 0);
20992}
20993
20994static enum yytokentype
20995parse_numeric(struct parser_params *p, int c)
20996{
20997 int is_float, seen_point, seen_e, nondigit;
20998 int suffix;
20999
21000 is_float = seen_point = seen_e = nondigit = 0;
21001 SET_LEX_STATE(EXPR_END);
21002 newtok(p);
21003 if (c == '-' || c == '+') {
21004 tokadd(p, c);
21005 c = nextc(p);
21006 }
21007 if (c == '0') {
21008 int start = toklen(p);
21009 c = nextc(p);
21010 if (c == 'x' || c == 'X') {
21011 /* hexadecimal */
21012 c = nextc(p);
21013 if (c != -1 && ISXDIGIT(c)) {
21014 do {
21015 if (c == '_') {
21016 if (nondigit) break;
21017 nondigit = c;
21018 continue;
21019 }
21020 if (!ISXDIGIT(c)) break;
21021 nondigit = 0;
21022 tokadd(p, c);
21023 } while ((c = nextc(p)) != -1);
21024 }
21025 pushback(p, c);
21026 tokfix(p);
21027 if (toklen(p) == start) {
21028 return no_digits(p);
21029 }
21030 else if (nondigit) goto trailing_uc;
21031 suffix = number_literal_suffix(p, NUM_SUFFIX_ALL);
21032 return set_number_literal(p, tINTEGER, suffix, 16, 0);
21033 }
21034 if (c == 'b' || c == 'B') {
21035 /* binary */
21036 c = nextc(p);
21037 if (c == '0' || c == '1') {
21038 do {
21039 if (c == '_') {
21040 if (nondigit) break;
21041 nondigit = c;
21042 continue;
21043 }
21044 if (c != '0' && c != '1') break;
21045 nondigit = 0;
21046 tokadd(p, c);
21047 } while ((c = nextc(p)) != -1);
21048 }
21049 pushback(p, c);
21050 tokfix(p);
21051 if (toklen(p) == start) {
21052 return no_digits(p);
21053 }
21054 else if (nondigit) goto trailing_uc;
21055 suffix = number_literal_suffix(p, NUM_SUFFIX_ALL);
21056 return set_number_literal(p, tINTEGER, suffix, 2, 0);
21057 }
21058 if (c == 'd' || c == 'D') {
21059 /* decimal */
21060 c = nextc(p);
21061 if (c != -1 && ISDIGIT(c)) {
21062 do {
21063 if (c == '_') {
21064 if (nondigit) break;
21065 nondigit = c;
21066 continue;
21067 }
21068 if (!ISDIGIT(c)) break;
21069 nondigit = 0;
21070 tokadd(p, c);
21071 } while ((c = nextc(p)) != -1);
21072 }
21073 pushback(p, c);
21074 tokfix(p);
21075 if (toklen(p) == start) {
21076 return no_digits(p);
21077 }
21078 else if (nondigit) goto trailing_uc;
21079 suffix = number_literal_suffix(p, NUM_SUFFIX_ALL);
21080 return set_number_literal(p, tINTEGER, suffix, 10, 0);
21081 }
21082 if (c == '_') {
21083 /* 0_0 */
21084 goto octal_number;
21085 }
21086 if (c == 'o' || c == 'O') {
21087 /* prefixed octal */
21088 c = nextc(p);
21089 if (c == -1 || c == '_' || !ISDIGIT(c)) {
21090 tokfix(p);
21091 return no_digits(p);
21092 }
21093 }
21094 if (c >= '0' && c <= '7') {
21095 /* octal */
21096 octal_number:
21097 do {
21098 if (c == '_') {
21099 if (nondigit) break;
21100 nondigit = c;
21101 continue;
21102 }
21103 if (c < '0' || c > '9') break;
21104 if (c > '7') goto invalid_octal;
21105 nondigit = 0;
21106 tokadd(p, c);
21107 } while ((c = nextc(p)) != -1);
21108 if (toklen(p) > start) {
21109 pushback(p, c);
21110 tokfix(p);
21111 if (nondigit) goto trailing_uc;
21112 suffix = number_literal_suffix(p, NUM_SUFFIX_ALL);
21113 return set_number_literal(p, tINTEGER, suffix, 8, 0);
21114 }
21115 if (nondigit) {
21116 pushback(p, c);
21117 goto trailing_uc;
21118 }
21119 }
21120 if (c > '7' && c <= '9') {
21121 invalid_octal:
21122 yyerror0("Invalid octal digit");
21123 }
21124 else if (c == '.' || c == 'e' || c == 'E') {
21125 tokadd(p, '0');
21126 }
21127 else {
21128 pushback(p, c);
21129 tokfix(p);
21130 suffix = number_literal_suffix(p, NUM_SUFFIX_ALL);
21131 return set_number_literal(p, tINTEGER, suffix, 10, 0);
21132 }
21133 }
21134
21135 for (;;) {
21136 switch (c) {
21137 case '0': case '1': case '2': case '3': case '4':
21138 case '5': case '6': case '7': case '8': case '9':
21139 nondigit = 0;
21140 tokadd(p, c);
21141 break;
21142
21143 case '.':
21144 if (nondigit) goto trailing_uc;
21145 if (seen_point || seen_e) {
21146 goto decode_num;
21147 }
21148 else {
21149 int c0 = nextc(p);
21150 if (c0 == -1 || !ISDIGIT(c0)) {
21151 pushback(p, c0);
21152 goto decode_num;
21153 }
21154 c = c0;
21155 }
21156 seen_point = toklen(p);
21157 tokadd(p, '.');
21158 tokadd(p, c);
21159 is_float++;
21160 nondigit = 0;
21161 break;
21162
21163 case 'e':
21164 case 'E':
21165 if (nondigit) {
21166 pushback(p, c);
21167 c = nondigit;
21168 goto decode_num;
21169 }
21170 if (seen_e) {
21171 goto decode_num;
21172 }
21173 nondigit = c;
21174 c = nextc(p);
21175 if (c != '-' && c != '+' && !ISDIGIT(c)) {
21176 pushback(p, c);
21177 c = nondigit;
21178 nondigit = 0;
21179 goto decode_num;
21180 }
21181 tokadd(p, nondigit);
21182 seen_e++;
21183 is_float++;
21184 tokadd(p, c);
21185 nondigit = (c == '-' || c == '+') ? c : 0;
21186 break;
21187
21188 case '_': /* `_' in number just ignored */
21189 if (nondigit) goto decode_num;
21190 nondigit = c;
21191 break;
21192
21193 default:
21194 goto decode_num;
21195 }
21196 c = nextc(p);
21197 }
21198
21199 decode_num:
21200 pushback(p, c);
21201 if (nondigit) {
21202 trailing_uc:
21203 literal_flush(p, p->lex.pcur - 1);
21204 YYLTYPE loc = RUBY_INIT_YYLLOC();
21205 compile_error(p, "trailing '%c' in number", nondigit);
21206 parser_show_error_line(p, &loc);
21207 }
21208 tokfix(p);
21209 if (is_float) {
21210 enum yytokentype type = tFLOAT;
21211
21212 suffix = number_literal_suffix(p, seen_e ? NUM_SUFFIX_I : NUM_SUFFIX_ALL);
21213 if (suffix & NUM_SUFFIX_R) {
21214 type = tRATIONAL;
21215 }
21216 else {
21217 strtod(tok(p), 0);
21218 if (errno == ERANGE) {
21219 rb_warning1("Float %s out of range", WARN_S(tok(p)));
21220 errno = 0;
21221 }
21222 }
21223 return set_number_literal(p, type, suffix, 0, seen_point);
21224 }
21225 suffix = number_literal_suffix(p, NUM_SUFFIX_ALL);
21226 return set_number_literal(p, tINTEGER, suffix, 10, 0);
21227}
21228
21229static enum yytokentype
21230parse_qmark(struct parser_params *p, int space_seen)
21231{
21232 rb_encoding *enc;
21233 register int c;
21234 rb_parser_string_t *lit;
21235 const char *start = p->lex.pcur;
21236
21237 if (IS_END()) {
21238 SET_LEX_STATE(EXPR_VALUE);
21239 return '?';
21240 }
21241 c = nextc(p);
21242 if (c == -1) {
21243 compile_error(p, "incomplete character syntax");
21244 return 0;
21245 }
21246 if (rb_enc_isspace(c, p->enc)) {
21247 if (!IS_ARG()) {
21248 int c2 = escaped_control_code(c);
21249 if (c2) {
21250 WARN_SPACE_CHAR(c2, "?");
21251 }
21252 }
21253 ternary:
21254 pushback(p, c);
21255 SET_LEX_STATE(EXPR_VALUE);
21256 return '?';
21257 }
21258 newtok(p);
21259 enc = p->enc;
21260 int w = parser_precise_mbclen(p, start);
21261 if (is_identchar(p, start, p->lex.pend, p->enc) &&
21262 !(lex_eol_ptr_n_p(p, start, w) || !is_identchar(p, start + w, p->lex.pend, p->enc))) {
21263 if (space_seen) {
21264 const char *ptr = start;
21265 do {
21266 int n = parser_precise_mbclen(p, ptr);
21267 if (n < 0) return -1;
21268 ptr += n;
21269 } while (!lex_eol_ptr_p(p, ptr) && is_identchar(p, ptr, p->lex.pend, p->enc));
21270 rb_warn2("'?' just followed by '%.*s' is interpreted as" \
21271 " a conditional operator, put a space after '?'",
21272 WARN_I((int)(ptr - start)), WARN_S_L(start, (ptr - start)));
21273 }
21274 goto ternary;
21275 }
21276 else if (c == '\\') {
21277 if (peek(p, 'u')) {
21278 nextc(p);
21279 enc = rb_utf8_encoding();
21280 tokadd_utf8(p, &enc, -1, 0, 0);
21281 }
21282 else if (!ISASCII(c = peekc(p)) && c != -1) {
21283 nextc(p);
21284 if (tokadd_mbchar(p, c) == -1) return 0;
21285 }
21286 else {
21287 c = read_escape(p, 0, p->lex.pcur - rb_strlen_lit("?\\"));
21288 tokadd(p, c);
21289 }
21290 }
21291 else {
21292 if (tokadd_mbchar(p, c) == -1) return 0;
21293 }
21294 tokfix(p);
21295 lit = STR_NEW3(tok(p), toklen(p), enc, 0);
21296 set_yylval_str(lit);
21297 SET_LEX_STATE(EXPR_END);
21298 return tCHAR;
21299}
21300
21301static enum yytokentype
21302parse_percent(struct parser_params *p, const int space_seen, const enum lex_state_e last_state)
21303{
21304 register int c;
21305 const char *ptok = p->lex.pcur;
21306
21307 if (IS_BEG()) {
21308 int term;
21309 int paren;
21310
21311 c = nextc(p);
21312 quotation:
21313 if (c == -1) goto unterminated;
21314 if (!ISALNUM(c)) {
21315 term = c;
21316 if (!ISASCII(c)) goto unknown;
21317 c = 'Q';
21318 }
21319 else {
21320 term = nextc(p);
21321 if (rb_enc_isalnum(term, p->enc) || !parser_isascii(p)) {
21322 unknown:
21323 pushback(p, term);
21324 c = parser_precise_mbclen(p, p->lex.pcur);
21325 if (c < 0) return 0;
21326 p->lex.pcur += c;
21327 yyerror0("unknown type of %string");
21328 return 0;
21329 }
21330 }
21331 if (term == -1) {
21332 unterminated:
21333 compile_error(p, "unterminated quoted string meets end of file");
21334 return 0;
21335 }
21336 paren = term;
21337 if (term == '(') term = ')';
21338 else if (term == '[') term = ']';
21339 else if (term == '{') term = '}';
21340 else if (term == '<') term = '>';
21341 else paren = 0;
21342
21343 p->lex.ptok = ptok-1;
21344 switch (c) {
21345 case 'Q':
21346 p->lex.strterm = NEW_STRTERM(str_dquote, term, paren);
21347 return tSTRING_BEG;
21348
21349 case 'q':
21350 p->lex.strterm = NEW_STRTERM(str_squote, term, paren);
21351 return tSTRING_BEG;
21352
21353 case 'W':
21354 p->lex.strterm = NEW_STRTERM(str_dword, term, paren);
21355 return tWORDS_BEG;
21356
21357 case 'w':
21358 p->lex.strterm = NEW_STRTERM(str_sword, term, paren);
21359 return tQWORDS_BEG;
21360
21361 case 'I':
21362 p->lex.strterm = NEW_STRTERM(str_dword, term, paren);
21363 return tSYMBOLS_BEG;
21364
21365 case 'i':
21366 p->lex.strterm = NEW_STRTERM(str_sword, term, paren);
21367 return tQSYMBOLS_BEG;
21368
21369 case 'x':
21370 p->lex.strterm = NEW_STRTERM(str_xquote, term, paren);
21371 return tXSTRING_BEG;
21372
21373 case 'r':
21374 p->lex.strterm = NEW_STRTERM(str_regexp, term, paren);
21375 return tREGEXP_BEG;
21376
21377 case 's':
21378 p->lex.strterm = NEW_STRTERM(str_ssym, term, paren);
21379 SET_LEX_STATE(EXPR_FNAME|EXPR_FITEM);
21380 return tSYMBEG;
21381
21382 default:
21383 yyerror0("unknown type of %string");
21384 return 0;
21385 }
21386 }
21387 if ((c = nextc(p)) == '=') {
21388 set_yylval_id('%');
21389 SET_LEX_STATE(EXPR_BEG);
21390 return tOP_ASGN;
21391 }
21392 if (IS_SPCARG(c) || (IS_lex_state(EXPR_FITEM) && c == 's')) {
21393 goto quotation;
21394 }
21395 SET_LEX_STATE(IS_AFTER_OPERATOR() ? EXPR_ARG : EXPR_BEG);
21396 pushback(p, c);
21397 return warn_balanced('%', "%%", "string literal");
21398}
21399
21400static int
21401tokadd_ident(struct parser_params *p, int c)
21402{
21403 do {
21404 if (tokadd_mbchar(p, c) == -1) return -1;
21405 c = nextc(p);
21406 } while (parser_is_identchar(p));
21407 pushback(p, c);
21408 return 0;
21409}
21410
21411static ID
21412tokenize_ident(struct parser_params *p)
21413{
21414 ID ident = TOK_INTERN();
21415
21416 set_yylval_name(ident);
21417
21418 return ident;
21419}
21420
21421static int
21422parse_numvar(struct parser_params *p)
21423{
21424 size_t len;
21425 int overflow;
21426 unsigned long n = ruby_scan_digits(tok(p)+1, toklen(p)-1, 10, &len, &overflow);
21427 const unsigned long nth_ref_max =
21428 ((FIXNUM_MAX < INT_MAX) ? FIXNUM_MAX : INT_MAX) >> 1;
21429 /* NTH_REF is left-shifted to be ORed with back-ref flag and
21430 * turned into a Fixnum, in compile.c */
21431
21432 if (overflow || n > nth_ref_max) {
21433 /* compile_error()? */
21434 rb_warn1("'%s' is too big for a number variable, always nil", WARN_S(tok(p)));
21435 return 0; /* $0 is $PROGRAM_NAME, not NTH_REF */
21436 }
21437 else {
21438 return (int)n;
21439 }
21440}
21441
21442static enum yytokentype
21443parse_gvar(struct parser_params *p, const enum lex_state_e last_state)
21444{
21445 const char *ptr = p->lex.pcur;
21446 register int c;
21447
21448 SET_LEX_STATE(EXPR_END);
21449 p->lex.ptok = ptr - 1; /* from '$' */
21450 newtok(p);
21451 c = nextc(p);
21452 switch (c) {
21453 case '_': /* $_: last read line string */
21454 c = nextc(p);
21455 if (parser_is_identchar(p)) {
21456 tokadd(p, '$');
21457 tokadd(p, '_');
21458 break;
21459 }
21460 pushback(p, c);
21461 c = '_';
21462 /* fall through */
21463 case '~': /* $~: match-data */
21464 case '*': /* $*: argv */
21465 case '$': /* $$: pid */
21466 case '?': /* $?: last status */
21467 case '!': /* $!: error string */
21468 case '@': /* $@: error position */
21469 case '/': /* $/: input record separator */
21470 case '\\': /* $\: output record separator */
21471 case ';': /* $;: field separator */
21472 case ',': /* $,: output field separator */
21473 case '.': /* $.: last read line number */
21474 case '=': /* $=: ignorecase */
21475 case ':': /* $:: load path */
21476 case '<': /* $<: default input handle */
21477 case '>': /* $>: default output handle */
21478 case '\"': /* $": already loaded files */
21479 tokadd(p, '$');
21480 tokadd(p, c);
21481 goto gvar;
21482
21483 case '-':
21484 tokadd(p, '$');
21485 tokadd(p, c);
21486 c = nextc(p);
21487 if (parser_is_identchar(p)) {
21488 if (tokadd_mbchar(p, c) == -1) return 0;
21489 }
21490 else {
21491 pushback(p, c);
21492 pushback(p, '-');
21493 return '$';
21494 }
21495 gvar:
21496 tokenize_ident(p);
21497 return tGVAR;
21498
21499 case '&': /* $&: last match */
21500 case '`': /* $`: string before last match */
21501 case '\'': /* $': string after last match */
21502 case '+': /* $+: string matches last paren. */
21503 if (IS_lex_state_for(last_state, EXPR_FNAME)) {
21504 tokadd(p, '$');
21505 tokadd(p, c);
21506 goto gvar;
21507 }
21508 set_yylval_node(NEW_BACK_REF(c, &_cur_loc));
21509 return tBACK_REF;
21510
21511 case '1': case '2': case '3':
21512 case '4': case '5': case '6':
21513 case '7': case '8': case '9':
21514 tokadd(p, '$');
21515 do {
21516 tokadd(p, c);
21517 c = nextc(p);
21518 } while (c != -1 && ISDIGIT(c));
21519 pushback(p, c);
21520 if (IS_lex_state_for(last_state, EXPR_FNAME)) goto gvar;
21521 tokfix(p);
21522 c = parse_numvar(p);
21523 set_yylval_node(NEW_NTH_REF(c, &_cur_loc));
21524 return tNTH_REF;
21525
21526 default:
21527 if (!parser_is_identchar(p)) {
21528 YYLTYPE loc = RUBY_INIT_YYLLOC();
21529 if (c == -1 || ISSPACE(c)) {
21530 compile_error(p, "'$' without identifiers is not allowed as a global variable name");
21531 }
21532 else {
21533 pushback(p, c);
21534 compile_error(p, "'$%c' is not allowed as a global variable name", c);
21535 }
21536 parser_show_error_line(p, &loc);
21537 set_yylval_noname();
21538 return tGVAR;
21539 }
21540 /* fall through */
21541 case '0':
21542 tokadd(p, '$');
21543 }
21544
21545 if (tokadd_ident(p, c)) return 0;
21546 SET_LEX_STATE(EXPR_END);
21547 if (VALID_SYMNAME_P(tok(p), toklen(p), p->enc, ID_GLOBAL)) {
21548 tokenize_ident(p);
21549 }
21550 else {
21551 compile_error(p, "'%.*s' is not allowed as a global variable name", toklen(p), tok(p));
21552 set_yylval_noname();
21553 }
21554 return tGVAR;
21555}
21556
21557static bool
21558parser_numbered_param(struct parser_params *p, int n)
21559{
21560 if (n < 0) return false;
21561
21562 if (DVARS_TERMINAL_P(p->lvtbl->args) || DVARS_TERMINAL_P(p->lvtbl->args->prev)) {
21563 return false;
21564 }
21565 if (p->max_numparam == ORDINAL_PARAM) {
21566 compile_error(p, "ordinary parameter is defined");
21567 return false;
21568 }
21569 struct vtable *args = p->lvtbl->args;
21570 if (p->max_numparam < n) {
21571 p->max_numparam = n;
21572 }
21573 while (n > args->pos) {
21574 vtable_add(args, NUMPARAM_IDX_TO_ID(args->pos+1));
21575 }
21576 return true;
21577}
21578
21579static enum yytokentype
21580parse_atmark(struct parser_params *p, const enum lex_state_e last_state)
21581{
21582 const char *ptr = p->lex.pcur;
21583 enum yytokentype result = tIVAR;
21584 register int c = nextc(p);
21585 YYLTYPE loc;
21586
21587 p->lex.ptok = ptr - 1; /* from '@' */
21588 newtok(p);
21589 tokadd(p, '@');
21590 if (c == '@') {
21591 result = tCVAR;
21592 tokadd(p, '@');
21593 c = nextc(p);
21594 }
21595 SET_LEX_STATE(IS_lex_state_for(last_state, EXPR_FNAME) ? EXPR_ENDFN : EXPR_END);
21596 if (c == -1 || !parser_is_identchar(p)) {
21597 pushback(p, c);
21598 RUBY_SET_YYLLOC(loc);
21599 if (result == tIVAR) {
21600 compile_error(p, "'@' without identifiers is not allowed as an instance variable name");
21601 }
21602 else {
21603 compile_error(p, "'@@' without identifiers is not allowed as a class variable name");
21604 }
21605 parser_show_error_line(p, &loc);
21606 set_yylval_noname();
21607 SET_LEX_STATE(EXPR_END);
21608 return result;
21609 }
21610 else if (ISDIGIT(c)) {
21611 pushback(p, c);
21612 RUBY_SET_YYLLOC(loc);
21613 if (result == tIVAR) {
21614 compile_error(p, "'@%c' is not allowed as an instance variable name", c);
21615 }
21616 else {
21617 compile_error(p, "'@@%c' is not allowed as a class variable name", c);
21618 }
21619 parser_show_error_line(p, &loc);
21620 set_yylval_noname();
21621 SET_LEX_STATE(EXPR_END);
21622 return result;
21623 }
21624
21625 if (tokadd_ident(p, c)) return 0;
21626 tokenize_ident(p);
21627 return result;
21628}
21629
21630static enum yytokentype
21631parse_ident(struct parser_params *p, int c, int cmd_state)
21632{
21633 enum yytokentype result;
21634 bool is_ascii = true;
21635 const enum lex_state_e last_state = p->lex.state;
21636 ID ident;
21637 int enforce_keyword_end = 0;
21638
21639 do {
21640 if (!ISASCII(c)) is_ascii = false;
21641 if (tokadd_mbchar(p, c) == -1) return 0;
21642 c = nextc(p);
21643 } while (parser_is_identchar(p));
21644 if ((c == '!' || c == '?') && !peek(p, '=')) {
21645 result = tFID;
21646 tokadd(p, c);
21647 }
21648 else if (c == '=' && IS_lex_state(EXPR_FNAME) &&
21649 (!peek(p, '~') && !peek(p, '>') && (!peek(p, '=') || (peek_n(p, '>', 1))))) {
21650 result = tIDENTIFIER;
21651 tokadd(p, c);
21652 }
21653 else {
21654 result = tCONSTANT; /* assume provisionally */
21655 pushback(p, c);
21656 }
21657 tokfix(p);
21658
21659 if (IS_LABEL_POSSIBLE()) {
21660 if (IS_LABEL_SUFFIX(0)) {
21661 SET_LEX_STATE(EXPR_ARG|EXPR_LABELED);
21662 nextc(p);
21663 tokenize_ident(p);
21664 return tLABEL;
21665 }
21666 }
21667
21668#ifndef RIPPER
21669 if (peek_end_expect_token_locations(p)) {
21670 const rb_code_position_t *end_pos;
21671 int lineno, column;
21672 int beg_pos = (int)(p->lex.ptok - p->lex.pbeg);
21673
21674 end_pos = peek_end_expect_token_locations(p)->pos;
21675 lineno = end_pos->lineno;
21676 column = end_pos->column;
21677
21678 if (p->debug) {
21679 rb_parser_printf(p, "enforce_keyword_end check. current: (%d, %d), peek: (%d, %d)\n",
21680 p->ruby_sourceline, beg_pos, lineno, column);
21681 }
21682
21683 if ((p->ruby_sourceline > lineno) && (beg_pos <= column)) {
21684 const struct kwtable *kw;
21685
21686 if ((IS_lex_state(EXPR_DOT)) && (kw = rb_reserved_word(tok(p), toklen(p))) && (kw && kw->id[0] == keyword_end)) {
21687 if (p->debug) rb_parser_printf(p, "enforce_keyword_end is enabled\n");
21688 enforce_keyword_end = 1;
21689 }
21690 }
21691 }
21692#endif
21693
21694 if (is_ascii && (!IS_lex_state(EXPR_DOT) || enforce_keyword_end)) {
21695 const struct kwtable *kw;
21696
21697 /* See if it is a reserved word. */
21698 kw = rb_reserved_word(tok(p), toklen(p));
21699 if (kw) {
21700 enum lex_state_e state = p->lex.state;
21701 if (IS_lex_state_for(state, EXPR_FNAME)) {
21702 SET_LEX_STATE(EXPR_ENDFN);
21703 set_yylval_name(rb_intern2(tok(p), toklen(p)));
21704 return kw->id[0];
21705 }
21706 SET_LEX_STATE(kw->state);
21707 if (IS_lex_state(EXPR_BEG)) {
21708 p->command_start = TRUE;
21709 }
21710 if (kw->id[0] == keyword_do) {
21711 if (lambda_beginning_p()) {
21712 p->lex.lpar_beg = -1; /* make lambda_beginning_p() == FALSE in the body of "-> do ... end" */
21713 return keyword_do_LAMBDA;
21714 }
21715 if (COND_P()) return keyword_do_cond;
21716 if (CMDARG_P() && !IS_lex_state_for(state, EXPR_CMDARG))
21717 return keyword_do_block;
21718 return keyword_do;
21719 }
21720 if (IS_lex_state_for(state, (EXPR_BEG | EXPR_LABELED | EXPR_CLASS)))
21721 return kw->id[0];
21722 else {
21723 if (kw->id[0] != kw->id[1])
21724 SET_LEX_STATE(EXPR_BEG | EXPR_LABEL);
21725 return kw->id[1];
21726 }
21727 }
21728 }
21729
21730 if (IS_lex_state(EXPR_BEG_ANY | EXPR_ARG_ANY | EXPR_DOT)) {
21731 if (cmd_state) {
21732 SET_LEX_STATE(EXPR_CMDARG);
21733 }
21734 else {
21735 SET_LEX_STATE(EXPR_ARG);
21736 }
21737 }
21738 else if (p->lex.state == EXPR_FNAME) {
21739 SET_LEX_STATE(EXPR_ENDFN);
21740 }
21741 else {
21742 SET_LEX_STATE(EXPR_END);
21743 }
21744
21745 ident = tokenize_ident(p);
21746 if (result == tCONSTANT && is_local_id(ident)) result = tIDENTIFIER;
21747 if (!IS_lex_state_for(last_state, EXPR_DOT|EXPR_FNAME) &&
21748 (result == tIDENTIFIER) && /* not EXPR_FNAME, not attrasgn */
21749 (lvar_defined(p, ident) || NUMPARAM_ID_P(ident))) {
21750 SET_LEX_STATE(EXPR_END|EXPR_LABEL);
21751 }
21752 return result;
21753}
21754
21755static void
21756warn_cr(struct parser_params *p)
21757{
21758 if (!p->cr_seen) {
21759 p->cr_seen = TRUE;
21760 /* carried over with p->lex.nextline for nextc() */
21761 rb_warn0("encountered \\r in middle of line, treated as a mere space");
21762 }
21763}
21764
21765static enum yytokentype
21766parser_yylex(struct parser_params *p)
21767{
21768 register int c;
21769 int space_seen = 0;
21770 int cmd_state;
21771 int label;
21772 enum lex_state_e last_state;
21773 int fallthru = FALSE;
21774 int token_seen = p->token_seen;
21775
21776 if (p->lex.strterm) {
21777 if (strterm_is_heredoc(p->lex.strterm)) {
21778 token_flush(p);
21779 return here_document(p, &p->lex.strterm->u.heredoc);
21780 }
21781 else {
21782 token_flush(p);
21783 return parse_string(p, &p->lex.strterm->u.literal);
21784 }
21785 }
21786 cmd_state = p->command_start;
21787 p->command_start = FALSE;
21788 p->token_seen = TRUE;
21789#ifndef RIPPER
21790 token_flush(p);
21791#endif
21792 retry:
21793 last_state = p->lex.state;
21794 switch (c = nextc(p)) {
21795 case '\0': /* NUL */
21796 case '\004': /* ^D */
21797 case '\032': /* ^Z */
21798 case -1: /* end of script. */
21799 p->eofp = 1;
21800#ifndef RIPPER
21801 if (p->end_expect_token_locations) {
21802 pop_end_expect_token_locations(p);
21803 RUBY_SET_YYLLOC_OF_DUMMY_END(*p->yylloc);
21804 return tDUMNY_END;
21805 }
21806#endif
21807 /* Set location for end-of-input because dispatch_scan_event is not called. */
21808 RUBY_SET_YYLLOC(*p->yylloc);
21809 return END_OF_INPUT;
21810
21811 /* white spaces */
21812 case '\r':
21813 warn_cr(p);
21814 /* fall through */
21815 case ' ': case '\t': case '\f':
21816 case '\13': /* '\v' */
21817 space_seen = 1;
21818 while ((c = nextc(p))) {
21819 switch (c) {
21820 case '\r':
21821 warn_cr(p);
21822 /* fall through */
21823 case ' ': case '\t': case '\f':
21824 case '\13': /* '\v' */
21825 break;
21826 default:
21827 goto outofloop;
21828 }
21829 }
21830 outofloop:
21831 pushback(p, c);
21832 dispatch_scan_event(p, tSP);
21833#ifndef RIPPER
21834 token_flush(p);
21835#endif
21836 goto retry;
21837
21838 case '#': /* it's a comment */
21839 p->token_seen = token_seen;
21840 const char *const pcur = p->lex.pcur, *const ptok = p->lex.ptok;
21841 /* no magic_comment in shebang line */
21842 if (!parser_magic_comment(p, p->lex.pcur, p->lex.pend - p->lex.pcur)) {
21843 if (comment_at_top(p)) {
21844 set_file_encoding(p, p->lex.pcur, p->lex.pend);
21845 }
21846 }
21847 p->lex.pcur = pcur, p->lex.ptok = ptok;
21848 lex_goto_eol(p);
21849 dispatch_scan_event(p, tCOMMENT);
21850 fallthru = TRUE;
21851 /* fall through */
21852 case '\n':
21853 p->token_seen = token_seen;
21854 rb_parser_string_t *prevline = p->lex.lastline;
21855 c = (IS_lex_state(EXPR_BEG|EXPR_CLASS|EXPR_FNAME|EXPR_DOT) &&
21856 !IS_lex_state(EXPR_LABELED));
21857 if (c || IS_lex_state_all(EXPR_ARG|EXPR_LABELED)) {
21858 if (!fallthru) {
21859 dispatch_scan_event(p, tIGNORED_NL);
21860 }
21861 fallthru = FALSE;
21862 if (!c && p->ctxt.in_kwarg) {
21863 goto normal_newline;
21864 }
21865 goto retry;
21866 }
21867 while (1) {
21868 switch (c = nextc(p)) {
21869 case ' ': case '\t': case '\f': case '\r':
21870 case '\13': /* '\v' */
21871 space_seen = 1;
21872 break;
21873 case '#':
21874 pushback(p, c);
21875 if (space_seen) {
21876 dispatch_scan_event(p, tSP);
21877 token_flush(p);
21878 }
21879 goto retry;
21880 case 'a':
21881 if (peek_word_at(p, "nd", 2, 0)) goto leading_logical;
21882 goto bol;
21883 case 'o':
21884 if (peek_word_at(p, "r", 1, 0)) goto leading_logical;
21885 goto bol;
21886 case '|':
21887 if (peek(p, '|')) goto leading_logical;
21888 goto bol;
21889 case '&':
21890 if (peek(p, '&')) {
21891 leading_logical:
21892 pushback(p, c);
21893 dispatch_delayed_token(p, tIGNORED_NL);
21894 cmd_state = FALSE;
21895 goto retry;
21896 }
21897 /* fall through */
21898 case '.': {
21899 dispatch_delayed_token(p, tIGNORED_NL);
21900 if (peek(p, '.') == (c == '&')) {
21901 pushback(p, c);
21902 dispatch_scan_event(p, tSP);
21903 goto retry;
21904 }
21905 }
21906 bol:
21907 default:
21908 p->ruby_sourceline--;
21909 p->lex.nextline = p->lex.lastline;
21910 set_lastline(p, prevline);
21911 case -1: /* EOF no decrement*/
21912 if (c == -1 && space_seen) {
21913 dispatch_scan_event(p, tSP);
21914 }
21915 lex_goto_eol(p);
21916 if (c != -1) {
21917 token_flush(p);
21918 RUBY_SET_YYLLOC(*p->yylloc);
21919 }
21920 goto normal_newline;
21921 }
21922 }
21923 normal_newline:
21924 p->command_start = TRUE;
21925 SET_LEX_STATE(EXPR_BEG);
21926 return '\n';
21927
21928 case '*':
21929 if ((c = nextc(p)) == '*') {
21930 if ((c = nextc(p)) == '=') {
21931 set_yylval_id(idPow);
21932 SET_LEX_STATE(EXPR_BEG);
21933 return tOP_ASGN;
21934 }
21935 pushback(p, c);
21936 if (IS_SPCARG(c)) {
21937 rb_warning0("'**' interpreted as argument prefix");
21938 c = tDSTAR;
21939 }
21940 else if (IS_BEG()) {
21941 c = tDSTAR;
21942 }
21943 else {
21944 c = warn_balanced((enum ruby_method_ids)tPOW, "**", "argument prefix");
21945 }
21946 }
21947 else {
21948 if (c == '=') {
21949 set_yylval_id('*');
21950 SET_LEX_STATE(EXPR_BEG);
21951 return tOP_ASGN;
21952 }
21953 pushback(p, c);
21954 if (IS_SPCARG(c)) {
21955 rb_warning0("'*' interpreted as argument prefix");
21956 c = tSTAR;
21957 }
21958 else if (IS_BEG()) {
21959 c = tSTAR;
21960 }
21961 else {
21962 c = warn_balanced('*', "*", "argument prefix");
21963 }
21964 }
21965 SET_LEX_STATE(IS_AFTER_OPERATOR() ? EXPR_ARG : EXPR_BEG);
21966 return c;
21967
21968 case '!':
21969 c = nextc(p);
21970 if (IS_AFTER_OPERATOR()) {
21971 SET_LEX_STATE(EXPR_ARG);
21972 if (c == '@') {
21973 return '!';
21974 }
21975 }
21976 else {
21977 SET_LEX_STATE(EXPR_BEG);
21978 }
21979 if (c == '=') {
21980 return tNEQ;
21981 }
21982 if (c == '~') {
21983 return tNMATCH;
21984 }
21985 pushback(p, c);
21986 return '!';
21987
21988 case '=':
21989 if (was_bol(p)) {
21990 /* skip embedded rd document */
21991 if (word_match_p(p, "begin", 5)) {
21992 int first_p = TRUE;
21993
21994 lex_goto_eol(p);
21995 dispatch_scan_event(p, tEMBDOC_BEG);
21996 for (;;) {
21997 lex_goto_eol(p);
21998 if (!first_p) {
21999 dispatch_scan_event(p, tEMBDOC);
22000 }
22001 first_p = FALSE;
22002 c = nextc(p);
22003 if (c == -1) {
22004 compile_error(p, "embedded document meets end of file");
22005 return END_OF_INPUT;
22006 }
22007 if (c == '=' && word_match_p(p, "end", 3)) {
22008 break;
22009 }
22010 pushback(p, c);
22011 }
22012 lex_goto_eol(p);
22013 dispatch_scan_event(p, tEMBDOC_END);
22014 goto retry;
22015 }
22016 }
22017
22018 SET_LEX_STATE(IS_AFTER_OPERATOR() ? EXPR_ARG : EXPR_BEG);
22019 if ((c = nextc(p)) == '=') {
22020 if ((c = nextc(p)) == '=') {
22021 return tEQQ;
22022 }
22023 pushback(p, c);
22024 return tEQ;
22025 }
22026 if (c == '~') {
22027 return tMATCH;
22028 }
22029 else if (c == '>') {
22030 return tASSOC;
22031 }
22032 pushback(p, c);
22033 return '=';
22034
22035 case '<':
22036 c = nextc(p);
22037 if (c == '<' &&
22038 !IS_lex_state(EXPR_DOT | EXPR_CLASS) &&
22039 !IS_END() &&
22040 (!IS_ARG() || IS_lex_state(EXPR_LABELED) || space_seen)) {
22041 enum yytokentype token = heredoc_identifier(p);
22042 if (token) return token < 0 ? 0 : token;
22043 }
22044 if (IS_AFTER_OPERATOR()) {
22045 SET_LEX_STATE(EXPR_ARG);
22046 }
22047 else {
22048 if (IS_lex_state(EXPR_CLASS))
22049 p->command_start = TRUE;
22050 SET_LEX_STATE(EXPR_BEG);
22051 }
22052 if (c == '=') {
22053 if ((c = nextc(p)) == '>') {
22054 return tCMP;
22055 }
22056 pushback(p, c);
22057 return tLEQ;
22058 }
22059 if (c == '<') {
22060 if ((c = nextc(p)) == '=') {
22061 set_yylval_id(idLTLT);
22062 SET_LEX_STATE(EXPR_BEG);
22063 return tOP_ASGN;
22064 }
22065 pushback(p, c);
22066 return warn_balanced((enum ruby_method_ids)tLSHFT, "<<", "here document");
22067 }
22068 pushback(p, c);
22069 return '<';
22070
22071 case '>':
22072 SET_LEX_STATE(IS_AFTER_OPERATOR() ? EXPR_ARG : EXPR_BEG);
22073 if ((c = nextc(p)) == '=') {
22074 return tGEQ;
22075 }
22076 if (c == '>') {
22077 if ((c = nextc(p)) == '=') {
22078 set_yylval_id(idGTGT);
22079 SET_LEX_STATE(EXPR_BEG);
22080 return tOP_ASGN;
22081 }
22082 pushback(p, c);
22083 return tRSHFT;
22084 }
22085 pushback(p, c);
22086 return '>';
22087
22088 case '"':
22089 label = (IS_LABEL_POSSIBLE() ? str_label : 0);
22090 p->lex.strterm = NEW_STRTERM(str_dquote | label, '"', 0);
22091 p->lex.ptok = p->lex.pcur-1;
22092 return tSTRING_BEG;
22093
22094 case '`':
22095 if (IS_lex_state(EXPR_FNAME)) {
22096 SET_LEX_STATE(EXPR_ENDFN);
22097 return c;
22098 }
22099 if (IS_lex_state(EXPR_DOT)) {
22100 if (cmd_state)
22101 SET_LEX_STATE(EXPR_CMDARG);
22102 else
22103 SET_LEX_STATE(EXPR_ARG);
22104 return c;
22105 }
22106 p->lex.strterm = NEW_STRTERM(str_xquote, '`', 0);
22107 return tXSTRING_BEG;
22108
22109 case '\'':
22110 label = (IS_LABEL_POSSIBLE() ? str_label : 0);
22111 p->lex.strterm = NEW_STRTERM(str_squote | label, '\'', 0);
22112 p->lex.ptok = p->lex.pcur-1;
22113 return tSTRING_BEG;
22114
22115 case '?':
22116 return parse_qmark(p, space_seen);
22117
22118 case '&':
22119 if ((c = nextc(p)) == '&') {
22120 SET_LEX_STATE(EXPR_BEG);
22121 if ((c = nextc(p)) == '=') {
22122 set_yylval_id(idANDOP);
22123 SET_LEX_STATE(EXPR_BEG);
22124 return tOP_ASGN;
22125 }
22126 pushback(p, c);
22127 return tANDOP;
22128 }
22129 else if (c == '=') {
22130 set_yylval_id('&');
22131 SET_LEX_STATE(EXPR_BEG);
22132 return tOP_ASGN;
22133 }
22134 else if (c == '.') {
22135 set_yylval_id(idANDDOT);
22136 SET_LEX_STATE(EXPR_DOT);
22137 return tANDDOT;
22138 }
22139 pushback(p, c);
22140 if (IS_SPCARG(c)) {
22141 if ((c != ':') ||
22142 (c = peekc_n(p, 1)) == -1 ||
22143 !(c == '\'' || c == '"' ||
22144 is_identchar(p, (p->lex.pcur+1), p->lex.pend, p->enc))) {
22145 rb_warning0("'&' interpreted as argument prefix");
22146 }
22147 c = tAMPER;
22148 }
22149 else if (IS_BEG()) {
22150 c = tAMPER;
22151 }
22152 else {
22153 c = warn_balanced('&', "&", "argument prefix");
22154 }
22155 SET_LEX_STATE(IS_AFTER_OPERATOR() ? EXPR_ARG : EXPR_BEG);
22156 return c;
22157
22158 case '|':
22159 if ((c = nextc(p)) == '|') {
22160 SET_LEX_STATE(EXPR_BEG);
22161 if ((c = nextc(p)) == '=') {
22162 set_yylval_id(idOROP);
22163 SET_LEX_STATE(EXPR_BEG);
22164 return tOP_ASGN;
22165 }
22166 pushback(p, c);
22167 if (IS_lex_state_for(last_state, EXPR_BEG)) {
22168 c = '|';
22169 pushback(p, '|');
22170 return c;
22171 }
22172 return tOROP;
22173 }
22174 if (c == '=') {
22175 set_yylval_id('|');
22176 SET_LEX_STATE(EXPR_BEG);
22177 return tOP_ASGN;
22178 }
22179 SET_LEX_STATE(IS_AFTER_OPERATOR() ? EXPR_ARG : EXPR_BEG|EXPR_LABEL);
22180 pushback(p, c);
22181 return '|';
22182
22183 case '+':
22184 c = nextc(p);
22185 if (IS_AFTER_OPERATOR()) {
22186 SET_LEX_STATE(EXPR_ARG);
22187 if (c == '@') {
22188 return tUPLUS;
22189 }
22190 pushback(p, c);
22191 return '+';
22192 }
22193 if (c == '=') {
22194 set_yylval_id('+');
22195 SET_LEX_STATE(EXPR_BEG);
22196 return tOP_ASGN;
22197 }
22198 if (IS_BEG() || (IS_SPCARG(c) && arg_ambiguous(p, '+'))) {
22199 SET_LEX_STATE(EXPR_BEG);
22200 pushback(p, c);
22201 if (c != -1 && ISDIGIT(c)) {
22202 return parse_numeric(p, '+');
22203 }
22204 return tUPLUS;
22205 }
22206 SET_LEX_STATE(EXPR_BEG);
22207 pushback(p, c);
22208 return warn_balanced('+', "+", "unary operator");
22209
22210 case '-':
22211 c = nextc(p);
22212 if (IS_AFTER_OPERATOR()) {
22213 SET_LEX_STATE(EXPR_ARG);
22214 if (c == '@') {
22215 return tUMINUS;
22216 }
22217 pushback(p, c);
22218 return '-';
22219 }
22220 if (c == '=') {
22221 set_yylval_id('-');
22222 SET_LEX_STATE(EXPR_BEG);
22223 return tOP_ASGN;
22224 }
22225 if (c == '>') {
22226 SET_LEX_STATE(EXPR_ENDFN);
22227 yylval.num = p->lex.lpar_beg;
22228 p->lex.lpar_beg = p->lex.paren_nest;
22229 return tLAMBDA;
22230 }
22231 if (IS_BEG() || (IS_SPCARG(c) && arg_ambiguous(p, '-'))) {
22232 SET_LEX_STATE(EXPR_BEG);
22233 pushback(p, c);
22234 if (c != -1 && ISDIGIT(c)) {
22235 return tUMINUS_NUM;
22236 }
22237 return tUMINUS;
22238 }
22239 SET_LEX_STATE(EXPR_BEG);
22240 pushback(p, c);
22241 return warn_balanced('-', "-", "unary operator");
22242
22243 case '.': {
22244 int is_beg = IS_BEG();
22245 SET_LEX_STATE(EXPR_BEG);
22246 if ((c = nextc(p)) == '.') {
22247 if ((c = nextc(p)) == '.') {
22248 if (p->ctxt.in_argdef || IS_LABEL_POSSIBLE()) {
22249 SET_LEX_STATE(EXPR_ENDARG);
22250 return tBDOT3;
22251 }
22252 if (p->lex.paren_nest == 0 && looking_at_eol_p(p)) {
22253 rb_warn0("... at EOL, should be parenthesized?");
22254 }
22255 return is_beg ? tBDOT3 : tDOT3;
22256 }
22257 pushback(p, c);
22258 return is_beg ? tBDOT2 : tDOT2;
22259 }
22260 pushback(p, c);
22261 if (c != -1 && ISDIGIT(c)) {
22262 char prev = p->lex.pcur-1 > p->lex.pbeg ? *(p->lex.pcur-2) : 0;
22263 parse_numeric(p, '.');
22264 if (ISDIGIT(prev)) {
22265 yyerror0("unexpected fraction part after numeric literal");
22266 }
22267 else {
22268 yyerror0("no .<digit> floating literal anymore; put 0 before dot");
22269 }
22270 SET_LEX_STATE(EXPR_END);
22271 p->lex.ptok = p->lex.pcur;
22272 goto retry;
22273 }
22274 set_yylval_id('.');
22275 SET_LEX_STATE(EXPR_DOT);
22276 return '.';
22277 }
22278
22279 case '0': case '1': case '2': case '3': case '4':
22280 case '5': case '6': case '7': case '8': case '9':
22281 return parse_numeric(p, c);
22282
22283 case ')':
22284 COND_POP();
22285 CMDARG_POP();
22286 SET_LEX_STATE(EXPR_ENDFN);
22287 p->lex.paren_nest--;
22288 return c;
22289
22290 case ']':
22291 COND_POP();
22292 CMDARG_POP();
22293 SET_LEX_STATE(EXPR_END);
22294 p->lex.paren_nest--;
22295 return c;
22296
22297 case '}':
22298 /* tSTRING_DEND does COND_POP and CMDARG_POP in the yacc's rule */
22299 if (!p->lex.brace_nest--) return tSTRING_DEND;
22300 COND_POP();
22301 CMDARG_POP();
22302 SET_LEX_STATE(EXPR_END);
22303 p->lex.paren_nest--;
22304 return c;
22305
22306 case ':':
22307 c = nextc(p);
22308 if (c == ':') {
22309 if (IS_BEG() || IS_lex_state(EXPR_CLASS) || IS_SPCARG(-1)) {
22310 SET_LEX_STATE(EXPR_BEG);
22311 return tCOLON3;
22312 }
22313 set_yylval_id(idCOLON2);
22314 SET_LEX_STATE(EXPR_DOT);
22315 return tCOLON2;
22316 }
22317 if (IS_END() || ISSPACE(c) || c == '#') {
22318 pushback(p, c);
22319 c = warn_balanced(':', ":", "symbol literal");
22320 SET_LEX_STATE(EXPR_BEG);
22321 return c;
22322 }
22323 switch (c) {
22324 case '\'':
22325 p->lex.strterm = NEW_STRTERM(str_ssym, c, 0);
22326 break;
22327 case '"':
22328 p->lex.strterm = NEW_STRTERM(str_dsym, c, 0);
22329 break;
22330 default:
22331 pushback(p, c);
22332 break;
22333 }
22334 SET_LEX_STATE(EXPR_FNAME);
22335 return tSYMBEG;
22336
22337 case '/':
22338 if (IS_BEG()) {
22339 p->lex.strterm = NEW_STRTERM(str_regexp, '/', 0);
22340 return tREGEXP_BEG;
22341 }
22342 if ((c = nextc(p)) == '=') {
22343 set_yylval_id('/');
22344 SET_LEX_STATE(EXPR_BEG);
22345 return tOP_ASGN;
22346 }
22347 pushback(p, c);
22348 if (IS_SPCARG(c)) {
22349 arg_ambiguous(p, '/');
22350 p->lex.strterm = NEW_STRTERM(str_regexp, '/', 0);
22351 return tREGEXP_BEG;
22352 }
22353 SET_LEX_STATE(IS_AFTER_OPERATOR() ? EXPR_ARG : EXPR_BEG);
22354 return warn_balanced('/', "/", "regexp literal");
22355
22356 case '^':
22357 if ((c = nextc(p)) == '=') {
22358 set_yylval_id('^');
22359 SET_LEX_STATE(EXPR_BEG);
22360 return tOP_ASGN;
22361 }
22362 SET_LEX_STATE(IS_AFTER_OPERATOR() ? EXPR_ARG : EXPR_BEG);
22363 pushback(p, c);
22364 return '^';
22365
22366 case ';':
22367 SET_LEX_STATE(EXPR_BEG);
22368 p->command_start = TRUE;
22369 return ';';
22370
22371 case ',':
22372 SET_LEX_STATE(EXPR_BEG|EXPR_LABEL);
22373 return ',';
22374
22375 case '~':
22376 if (IS_AFTER_OPERATOR()) {
22377 if ((c = nextc(p)) != '@') {
22378 pushback(p, c);
22379 }
22380 SET_LEX_STATE(EXPR_ARG);
22381 }
22382 else {
22383 SET_LEX_STATE(EXPR_BEG);
22384 }
22385 return '~';
22386
22387 case '(':
22388 if (IS_BEG()) {
22389 c = tLPAREN;
22390 }
22391 else if (!space_seen) {
22392 /* foo( ... ) => method call, no ambiguity */
22393 }
22394 else if (IS_ARG() || IS_lex_state_all(EXPR_END|EXPR_LABEL)) {
22395 c = tLPAREN_ARG;
22396 }
22397 else if (IS_lex_state(EXPR_ENDFN) && !lambda_beginning_p()) {
22398 rb_warning0("parentheses after method name is interpreted as "
22399 "an argument list, not a decomposed argument");
22400 }
22401 p->lex.paren_nest++;
22402 COND_PUSH(0);
22403 CMDARG_PUSH(0);
22404 SET_LEX_STATE(EXPR_BEG|EXPR_LABEL);
22405 return c;
22406
22407 case '[':
22408 p->lex.paren_nest++;
22409 if (IS_AFTER_OPERATOR()) {
22410 if ((c = nextc(p)) == ']') {
22411 p->lex.paren_nest--;
22412 SET_LEX_STATE(EXPR_ARG);
22413 if ((c = nextc(p)) == '=') {
22414 return tASET;
22415 }
22416 pushback(p, c);
22417 return tAREF;
22418 }
22419 pushback(p, c);
22420 SET_LEX_STATE(EXPR_ARG|EXPR_LABEL);
22421 return '[';
22422 }
22423 else if (IS_BEG()) {
22424 c = tLBRACK;
22425 }
22426 else if (IS_ARG() && (space_seen || IS_lex_state(EXPR_LABELED))) {
22427 c = tLBRACK;
22428 }
22429 SET_LEX_STATE(EXPR_BEG|EXPR_LABEL);
22430 COND_PUSH(0);
22431 CMDARG_PUSH(0);
22432 return c;
22433
22434 case '{':
22435 ++p->lex.brace_nest;
22436 if (lambda_beginning_p())
22437 c = tLAMBEG;
22438 else if (IS_lex_state(EXPR_LABELED))
22439 c = tLBRACE; /* hash */
22440 else if (IS_lex_state(EXPR_ARG_ANY | EXPR_END | EXPR_ENDFN))
22441 c = '{'; /* block (primary) */
22442 else if (IS_lex_state(EXPR_ENDARG))
22443 c = tLBRACE_ARG; /* block (expr) */
22444 else
22445 c = tLBRACE; /* hash */
22446 if (c != tLBRACE) {
22447 p->command_start = TRUE;
22448 SET_LEX_STATE(EXPR_BEG);
22449 }
22450 else {
22451 SET_LEX_STATE(EXPR_BEG|EXPR_LABEL);
22452 }
22453 ++p->lex.paren_nest; /* after lambda_beginning_p() */
22454 COND_PUSH(0);
22455 CMDARG_PUSH(0);
22456 return c;
22457
22458 case '\\':
22459 c = nextc(p);
22460 if (c == '\n') {
22461 space_seen = 1;
22462 dispatch_scan_event(p, tSP);
22463 goto retry; /* skip \\n */
22464 }
22465 if (c == ' ') return tSP;
22466 if (ISSPACE(c)) return c;
22467 pushback(p, c);
22468 return '\\';
22469
22470 case '%':
22471 return parse_percent(p, space_seen, last_state);
22472
22473 case '$':
22474 return parse_gvar(p, last_state);
22475
22476 case '@':
22477 return parse_atmark(p, last_state);
22478
22479 case '_':
22480 if (was_bol(p) && whole_match_p(p, "__END__", 7, 0)) {
22481 p->ruby__end__seen = 1;
22482 p->eofp = 1;
22483#ifdef RIPPER
22484 lex_goto_eol(p);
22485 dispatch_scan_event(p, k__END__);
22486#endif
22487 return END_OF_INPUT;
22488 }
22489 newtok(p);
22490 break;
22491
22492 default:
22493 if (!parser_is_identchar(p)) {
22494 compile_error(p, "Invalid char '\\x%02X' in expression", c);
22495 token_flush(p);
22496 goto retry;
22497 }
22498
22499 newtok(p);
22500 break;
22501 }
22502
22503 return parse_ident(p, c, cmd_state);
22504}
22505
22506static enum yytokentype
22507yylex(YYSTYPE *lval, YYLTYPE *yylloc, struct parser_params *p)
22508{
22509 enum yytokentype t;
22510
22511 p->lval = lval;
22512 lval->node = 0;
22513 p->yylloc = yylloc;
22514
22515 t = parser_yylex(p);
22516
22517 if (has_delayed_token(p))
22518 dispatch_delayed_token(p, t);
22519 else if (t != END_OF_INPUT)
22520 dispatch_scan_event(p, t);
22521
22522 return t;
22523}
22524
22525#define LVAR_USED ((ID)1 << (sizeof(ID) * CHAR_BIT - 1))
22526
22527static NODE*
22528node_new_internal(struct parser_params *p, enum node_type type, size_t size, size_t alignment)
22529{
22530 NODE *n = rb_ast_newnode(p->ast, type, size, alignment);
22531
22532 rb_node_init(n, type);
22533 return n;
22534}
22535
22536static NODE *
22537nd_set_loc(NODE *nd, const YYLTYPE *loc)
22538{
22539 nd->nd_loc = *loc;
22540 nd_set_line(nd, loc->beg_pos.lineno);
22541 return nd;
22542}
22543
22544static NODE*
22545node_newnode(struct parser_params *p, enum node_type type, size_t size, size_t alignment, const rb_code_location_t *loc)
22546{
22547 NODE *n = node_new_internal(p, type, size, alignment);
22548
22549 nd_set_loc(n, loc);
22550 nd_set_node_id(n, parser_get_node_id(p));
22551 return n;
22552}
22553
22554#define NODE_NEWNODE(node_type, type, loc) (type *)(node_newnode(p, node_type, sizeof(type), RUBY_ALIGNOF(type), loc))
22555
22556static rb_node_scope_t *
22557rb_node_scope_new(struct parser_params *p, rb_node_args_t *nd_args, NODE *nd_body, NODE *nd_parent, const YYLTYPE *loc)
22558{
22559 rb_ast_id_table_t *nd_tbl;
22560 nd_tbl = local_tbl(p);
22561 rb_node_scope_t *n = NODE_NEWNODE(NODE_SCOPE, rb_node_scope_t, loc);
22562 n->nd_tbl = nd_tbl;
22563 n->nd_body = nd_body;
22564 n->nd_parent = nd_parent;
22565 n->nd_args = nd_args;
22566
22567 return n;
22568}
22569
22570static rb_node_scope_t *
22571rb_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)
22572{
22573 rb_node_scope_t *n = NODE_NEWNODE(NODE_SCOPE, rb_node_scope_t, loc);
22574 n->nd_tbl = nd_tbl;
22575 n->nd_body = nd_body;
22576 n->nd_parent = nd_parent;
22577 n->nd_args = nd_args;
22578
22579 return n;
22580}
22581
22582static rb_node_defn_t *
22583rb_node_defn_new(struct parser_params *p, ID nd_mid, NODE *nd_defn, const YYLTYPE *loc)
22584{
22585 rb_node_defn_t *n = NODE_NEWNODE(NODE_DEFN, rb_node_defn_t, loc);
22586 n->nd_mid = nd_mid;
22587 n->nd_defn = nd_defn;
22588
22589 return n;
22590}
22591
22592static rb_node_defs_t *
22593rb_node_defs_new(struct parser_params *p, NODE *nd_recv, ID nd_mid, NODE *nd_defn, const YYLTYPE *loc)
22594{
22595 rb_node_defs_t *n = NODE_NEWNODE(NODE_DEFS, rb_node_defs_t, loc);
22596 n->nd_recv = nd_recv;
22597 n->nd_mid = nd_mid;
22598 n->nd_defn = nd_defn;
22599
22600 return n;
22601}
22602
22603static rb_node_block_t *
22604rb_node_block_new(struct parser_params *p, NODE *nd_head, const YYLTYPE *loc)
22605{
22606 rb_node_block_t *n = NODE_NEWNODE(NODE_BLOCK, rb_node_block_t, loc);
22607 n->nd_head = nd_head;
22608 n->nd_end = (NODE *)n;
22609 n->nd_next = 0;
22610
22611 return n;
22612}
22613
22614static rb_node_for_t *
22615rb_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)
22616{
22617 rb_node_for_t *n = NODE_NEWNODE(NODE_FOR, rb_node_for_t, loc);
22618 n->nd_body = nd_body;
22619 n->nd_iter = nd_iter;
22620 n->for_keyword_loc = *for_keyword_loc;
22621 n->in_keyword_loc = *in_keyword_loc;
22622 n->do_keyword_loc = *do_keyword_loc;
22623 n->end_keyword_loc = *end_keyword_loc;
22624
22625 return n;
22626}
22627
22628static rb_node_for_masgn_t *
22629rb_node_for_masgn_new(struct parser_params *p, NODE *nd_var, const YYLTYPE *loc)
22630{
22631 rb_node_for_masgn_t *n = NODE_NEWNODE(NODE_FOR_MASGN, rb_node_for_masgn_t, loc);
22632 n->nd_var = nd_var;
22633
22634 return n;
22635}
22636
22637static rb_node_retry_t *
22638rb_node_retry_new(struct parser_params *p, const YYLTYPE *loc)
22639{
22640 rb_node_retry_t *n = NODE_NEWNODE(NODE_RETRY, rb_node_retry_t, loc);
22641
22642 return n;
22643}
22644
22645static rb_node_begin_t *
22646rb_node_begin_new(struct parser_params *p, NODE *nd_body, const YYLTYPE *loc)
22647{
22648 rb_node_begin_t *n = NODE_NEWNODE(NODE_BEGIN, rb_node_begin_t, loc);
22649 n->nd_body = nd_body;
22650
22651 return n;
22652}
22653
22654static rb_node_rescue_t *
22655rb_node_rescue_new(struct parser_params *p, NODE *nd_head, NODE *nd_resq, NODE *nd_else, const YYLTYPE *loc)
22656{
22657 rb_node_rescue_t *n = NODE_NEWNODE(NODE_RESCUE, rb_node_rescue_t, loc);
22658 n->nd_head = nd_head;
22659 n->nd_resq = nd_resq;
22660 n->nd_else = nd_else;
22661
22662 return n;
22663}
22664
22665static rb_node_resbody_t *
22666rb_node_resbody_new(struct parser_params *p, NODE *nd_args, NODE *nd_exc_var, NODE *nd_body, NODE *nd_next, const YYLTYPE *loc)
22667{
22668 rb_node_resbody_t *n = NODE_NEWNODE(NODE_RESBODY, rb_node_resbody_t, loc);
22669 n->nd_args = nd_args;
22670 n->nd_exc_var = nd_exc_var;
22671 n->nd_body = nd_body;
22672 n->nd_next = nd_next;
22673
22674 return n;
22675}
22676
22677static rb_node_ensure_t *
22678rb_node_ensure_new(struct parser_params *p, NODE *nd_head, NODE *nd_ensr, const YYLTYPE *loc)
22679{
22680 rb_node_ensure_t *n = NODE_NEWNODE(NODE_ENSURE, rb_node_ensure_t, loc);
22681 n->nd_head = nd_head;
22682 n->nd_ensr = nd_ensr;
22683
22684 return n;
22685}
22686
22687static rb_node_and_t *
22688rb_node_and_new(struct parser_params *p, NODE *nd_1st, NODE *nd_2nd, const YYLTYPE *loc, const YYLTYPE *operator_loc)
22689{
22690 rb_node_and_t *n = NODE_NEWNODE(NODE_AND, rb_node_and_t, loc);
22691 n->nd_1st = nd_1st;
22692 n->nd_2nd = nd_2nd;
22693 n->operator_loc = *operator_loc;
22694
22695 return n;
22696}
22697
22698static rb_node_or_t *
22699rb_node_or_new(struct parser_params *p, NODE *nd_1st, NODE *nd_2nd, const YYLTYPE *loc, const YYLTYPE *operator_loc)
22700{
22701 rb_node_or_t *n = NODE_NEWNODE(NODE_OR, rb_node_or_t, loc);
22702 n->nd_1st = nd_1st;
22703 n->nd_2nd = nd_2nd;
22704 n->operator_loc = *operator_loc;
22705
22706 return n;
22707}
22708
22709static rb_node_return_t *
22710rb_node_return_new(struct parser_params *p, NODE *nd_stts, const YYLTYPE *loc, const YYLTYPE *keyword_loc)
22711{
22712 rb_node_return_t *n = NODE_NEWNODE(NODE_RETURN, rb_node_return_t, loc);
22713 n->nd_stts = nd_stts;
22714 n->keyword_loc = *keyword_loc;
22715 return n;
22716}
22717
22718static rb_node_yield_t *
22719rb_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)
22720{
22721 if (nd_head) no_blockarg(p, nd_head);
22722
22723 rb_node_yield_t *n = NODE_NEWNODE(NODE_YIELD, rb_node_yield_t, loc);
22724 n->nd_head = nd_head;
22725 n->keyword_loc = *keyword_loc;
22726 n->lparen_loc = *lparen_loc;
22727 n->rparen_loc = *rparen_loc;
22728
22729 return n;
22730}
22731
22732static rb_node_if_t *
22733rb_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)
22734{
22735 rb_node_if_t *n = NODE_NEWNODE(NODE_IF, rb_node_if_t, loc);
22736 n->nd_cond = nd_cond;
22737 n->nd_body = nd_body;
22738 n->nd_else = nd_else;
22739 n->if_keyword_loc = *if_keyword_loc;
22740 n->then_keyword_loc = *then_keyword_loc;
22741 n->end_keyword_loc = *end_keyword_loc;
22742
22743 return n;
22744}
22745
22746static rb_node_unless_t *
22747rb_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)
22748{
22749 rb_node_unless_t *n = NODE_NEWNODE(NODE_UNLESS, rb_node_unless_t, loc);
22750 n->nd_cond = nd_cond;
22751 n->nd_body = nd_body;
22752 n->nd_else = nd_else;
22753 n->keyword_loc = *keyword_loc;
22754 n->then_keyword_loc = *then_keyword_loc;
22755 n->end_keyword_loc = *end_keyword_loc;
22756
22757 return n;
22758}
22759
22760static rb_node_class_t *
22761rb_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)
22762{
22763 /* Keep the order of node creation */
22764 NODE *scope = NEW_SCOPE(0, nd_body, NULL, loc);
22765 rb_node_class_t *n = NODE_NEWNODE(NODE_CLASS, rb_node_class_t, loc);
22766 RNODE_SCOPE(scope)->nd_parent = &n->node;
22767 n->nd_cpath = nd_cpath;
22768 n->nd_body = scope;
22769 n->nd_super = nd_super;
22770 n->class_keyword_loc = *class_keyword_loc;
22771 n->inheritance_operator_loc = *inheritance_operator_loc;
22772 n->end_keyword_loc = *end_keyword_loc;
22773
22774 return n;
22775}
22776
22777static rb_node_sclass_t *
22778rb_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)
22779{
22780 /* Keep the order of node creation */
22781 NODE *scope = NEW_SCOPE(0, nd_body, NULL, loc);
22782 rb_node_sclass_t *n = NODE_NEWNODE(NODE_SCLASS, rb_node_sclass_t, loc);
22783 RNODE_SCOPE(scope)->nd_parent = &n->node;
22784 n->nd_recv = nd_recv;
22785 n->nd_body = scope;
22786 n->class_keyword_loc = *class_keyword_loc;
22787 n->operator_loc = *operator_loc;
22788 n->end_keyword_loc = *end_keyword_loc;
22789
22790 return n;
22791}
22792
22793static rb_node_module_t *
22794rb_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)
22795{
22796 /* Keep the order of node creation */
22797 NODE *scope = NEW_SCOPE(0, nd_body, NULL, loc);
22798 rb_node_module_t *n = NODE_NEWNODE(NODE_MODULE, rb_node_module_t, loc);
22799 RNODE_SCOPE(scope)->nd_parent = &n->node;
22800 n->nd_cpath = nd_cpath;
22801 n->nd_body = scope;
22802 n->module_keyword_loc = *module_keyword_loc;
22803 n->end_keyword_loc = *end_keyword_loc;
22804
22805 return n;
22806}
22807
22808static rb_node_iter_t *
22809rb_node_iter_new(struct parser_params *p, rb_node_args_t *nd_args, NODE *nd_body, const YYLTYPE *loc)
22810{
22811 /* Keep the order of node creation */
22812 NODE *scope = NEW_SCOPE(nd_args, nd_body, NULL, loc);
22813 rb_node_iter_t *n = NODE_NEWNODE(NODE_ITER, rb_node_iter_t, loc);
22814 RNODE_SCOPE(scope)->nd_parent = &n->node;
22815 n->nd_body = scope;
22816 n->nd_iter = 0;
22817
22818 return n;
22819}
22820
22821static rb_node_lambda_t *
22822rb_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)
22823{
22824 /* Keep the order of node creation */
22825 NODE *scope = NEW_SCOPE(nd_args, nd_body, NULL, loc);
22826 YYLTYPE lambda_loc = code_loc_gen(operator_loc, closing_loc);
22827 rb_node_lambda_t *n = NODE_NEWNODE(NODE_LAMBDA, rb_node_lambda_t, &lambda_loc);
22828 RNODE_SCOPE(scope)->nd_parent = &n->node;
22829 n->nd_body = scope;
22830 n->operator_loc = *operator_loc;
22831 n->opening_loc = *opening_loc;
22832 n->closing_loc = *closing_loc;
22833
22834 return n;
22835}
22836
22837static rb_node_case_t *
22838rb_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)
22839{
22840 rb_node_case_t *n = NODE_NEWNODE(NODE_CASE, rb_node_case_t, loc);
22841 n->nd_head = nd_head;
22842 n->nd_body = nd_body;
22843 n->case_keyword_loc = *case_keyword_loc;
22844 n->end_keyword_loc = *end_keyword_loc;
22845
22846 return n;
22847}
22848
22849static rb_node_case2_t *
22850rb_node_case2_new(struct parser_params *p, NODE *nd_body, const YYLTYPE *loc, const YYLTYPE *case_keyword_loc, const YYLTYPE *end_keyword_loc)
22851{
22852 rb_node_case2_t *n = NODE_NEWNODE(NODE_CASE2, rb_node_case2_t, loc);
22853 n->nd_head = 0;
22854 n->nd_body = nd_body;
22855 n->case_keyword_loc = *case_keyword_loc;
22856 n->end_keyword_loc = *end_keyword_loc;
22857
22858 return n;
22859}
22860
22861static rb_node_case3_t *
22862rb_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)
22863{
22864 rb_node_case3_t *n = NODE_NEWNODE(NODE_CASE3, rb_node_case3_t, loc);
22865 n->nd_head = nd_head;
22866 n->nd_body = nd_body;
22867 n->case_keyword_loc = *case_keyword_loc;
22868 n->end_keyword_loc = *end_keyword_loc;
22869
22870 return n;
22871}
22872
22873static rb_node_when_t *
22874rb_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)
22875{
22876 rb_node_when_t *n = NODE_NEWNODE(NODE_WHEN, rb_node_when_t, loc);
22877 n->nd_head = nd_head;
22878 n->nd_body = nd_body;
22879 n->nd_next = nd_next;
22880 n->keyword_loc = *keyword_loc;
22881 n->then_keyword_loc = *then_keyword_loc;
22882
22883 return n;
22884}
22885
22886static rb_node_in_t *
22887rb_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)
22888{
22889 rb_node_in_t *n = NODE_NEWNODE(NODE_IN, rb_node_in_t, loc);
22890 n->nd_head = nd_head;
22891 n->nd_body = nd_body;
22892 n->nd_next = nd_next;
22893 n->in_keyword_loc = *in_keyword_loc;
22894 n->then_keyword_loc = *then_keyword_loc;
22895 n->operator_loc = *operator_loc;
22896
22897 return n;
22898}
22899
22900static rb_node_while_t *
22901rb_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)
22902{
22903 rb_node_while_t *n = NODE_NEWNODE(NODE_WHILE, rb_node_while_t, loc);
22904 n->nd_cond = nd_cond;
22905 n->nd_body = nd_body;
22906 n->nd_state = nd_state;
22907 n->keyword_loc = *keyword_loc;
22908 n->closing_loc = *closing_loc;
22909
22910 return n;
22911}
22912
22913static rb_node_until_t *
22914rb_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)
22915{
22916 rb_node_until_t *n = NODE_NEWNODE(NODE_UNTIL, rb_node_until_t, loc);
22917 n->nd_cond = nd_cond;
22918 n->nd_body = nd_body;
22919 n->nd_state = nd_state;
22920 n->keyword_loc = *keyword_loc;
22921 n->closing_loc = *closing_loc;
22922
22923 return n;
22924}
22925
22926static rb_node_colon2_t *
22927rb_node_colon2_new(struct parser_params *p, NODE *nd_head, ID nd_mid, const YYLTYPE *loc, const YYLTYPE *delimiter_loc, const YYLTYPE *name_loc)
22928{
22929 rb_node_colon2_t *n = NODE_NEWNODE(NODE_COLON2, rb_node_colon2_t, loc);
22930 n->nd_head = nd_head;
22931 n->nd_mid = nd_mid;
22932 n->delimiter_loc = *delimiter_loc;
22933 n->name_loc = *name_loc;
22934
22935 return n;
22936}
22937
22938static rb_node_colon3_t *
22939rb_node_colon3_new(struct parser_params *p, ID nd_mid, const YYLTYPE *loc, const YYLTYPE *delimiter_loc, const YYLTYPE *name_loc)
22940{
22941 rb_node_colon3_t *n = NODE_NEWNODE(NODE_COLON3, rb_node_colon3_t, loc);
22942 n->nd_mid = nd_mid;
22943 n->delimiter_loc = *delimiter_loc;
22944 n->name_loc = *name_loc;
22945
22946 return n;
22947}
22948
22949static rb_node_dot2_t *
22950rb_node_dot2_new(struct parser_params *p, NODE *nd_beg, NODE *nd_end, const YYLTYPE *loc, const YYLTYPE *operator_loc)
22951{
22952 rb_node_dot2_t *n = NODE_NEWNODE(NODE_DOT2, rb_node_dot2_t, loc);
22953 n->nd_beg = nd_beg;
22954 n->nd_end = nd_end;
22955 n->operator_loc = *operator_loc;
22956
22957 return n;
22958}
22959
22960static rb_node_dot3_t *
22961rb_node_dot3_new(struct parser_params *p, NODE *nd_beg, NODE *nd_end, const YYLTYPE *loc, const YYLTYPE *operator_loc)
22962{
22963 rb_node_dot3_t *n = NODE_NEWNODE(NODE_DOT3, rb_node_dot3_t, loc);
22964 n->nd_beg = nd_beg;
22965 n->nd_end = nd_end;
22966 n->operator_loc = *operator_loc;
22967
22968 return n;
22969}
22970
22971static rb_node_self_t *
22972rb_node_self_new(struct parser_params *p, const YYLTYPE *loc)
22973{
22974 rb_node_self_t *n = NODE_NEWNODE(NODE_SELF, rb_node_self_t, loc);
22975 n->nd_state = 1;
22976
22977 return n;
22978}
22979
22980static rb_node_nil_t *
22981rb_node_nil_new(struct parser_params *p, const YYLTYPE *loc)
22982{
22983 rb_node_nil_t *n = NODE_NEWNODE(NODE_NIL, rb_node_nil_t, loc);
22984
22985 return n;
22986}
22987
22988static rb_node_true_t *
22989rb_node_true_new(struct parser_params *p, const YYLTYPE *loc)
22990{
22991 rb_node_true_t *n = NODE_NEWNODE(NODE_TRUE, rb_node_true_t, loc);
22992
22993 return n;
22994}
22995
22996static rb_node_false_t *
22997rb_node_false_new(struct parser_params *p, const YYLTYPE *loc)
22998{
22999 rb_node_false_t *n = NODE_NEWNODE(NODE_FALSE, rb_node_false_t, loc);
23000
23001 return n;
23002}
23003
23004static rb_node_super_t *
23005rb_node_super_new(struct parser_params *p, NODE *nd_args, const YYLTYPE *loc,
23006 const YYLTYPE *keyword_loc, const YYLTYPE *lparen_loc, const YYLTYPE *rparen_loc)
23007{
23008 rb_node_super_t *n = NODE_NEWNODE(NODE_SUPER, rb_node_super_t, loc);
23009 n->nd_args = nd_args;
23010 n->keyword_loc = *keyword_loc;
23011 n->lparen_loc = *lparen_loc;
23012 n->rparen_loc = *rparen_loc;
23013
23014 return n;
23015}
23016
23017static rb_node_zsuper_t *
23018rb_node_zsuper_new(struct parser_params *p, const YYLTYPE *loc)
23019{
23020 rb_node_zsuper_t *n = NODE_NEWNODE(NODE_ZSUPER, rb_node_zsuper_t, loc);
23021
23022 return n;
23023}
23024
23025static rb_node_match2_t *
23026rb_node_match2_new(struct parser_params *p, NODE *nd_recv, NODE *nd_value, const YYLTYPE *loc)
23027{
23028 rb_node_match2_t *n = NODE_NEWNODE(NODE_MATCH2, rb_node_match2_t, loc);
23029 n->nd_recv = nd_recv;
23030 n->nd_value = nd_value;
23031 n->nd_args = 0;
23032
23033 return n;
23034}
23035
23036static rb_node_match3_t *
23037rb_node_match3_new(struct parser_params *p, NODE *nd_recv, NODE *nd_value, const YYLTYPE *loc)
23038{
23039 rb_node_match3_t *n = NODE_NEWNODE(NODE_MATCH3, rb_node_match3_t, loc);
23040 n->nd_recv = nd_recv;
23041 n->nd_value = nd_value;
23042
23043 return n;
23044}
23045
23046/* TODO: Use union for NODE_LIST2 */
23047static rb_node_list_t *
23048rb_node_list_new(struct parser_params *p, NODE *nd_head, const YYLTYPE *loc)
23049{
23050 rb_node_list_t *n = NODE_NEWNODE(NODE_LIST, rb_node_list_t, loc);
23051 n->nd_head = nd_head;
23052 n->as.nd_alen = 1;
23053 n->nd_next = 0;
23054
23055 return n;
23056}
23057
23058static rb_node_list_t *
23059rb_node_list_new2(struct parser_params *p, NODE *nd_head, long nd_alen, NODE *nd_next, const YYLTYPE *loc)
23060{
23061 rb_node_list_t *n = NODE_NEWNODE(NODE_LIST, rb_node_list_t, loc);
23062 n->nd_head = nd_head;
23063 n->as.nd_alen = nd_alen;
23064 n->nd_next = nd_next;
23065
23066 return n;
23067}
23068
23069static rb_node_zlist_t *
23070rb_node_zlist_new(struct parser_params *p, const YYLTYPE *loc)
23071{
23072 rb_node_zlist_t *n = NODE_NEWNODE(NODE_ZLIST, rb_node_zlist_t, loc);
23073
23074 return n;
23075}
23076
23077static rb_node_hash_t *
23078rb_node_hash_new(struct parser_params *p, NODE *nd_head, const YYLTYPE *loc)
23079{
23080 rb_node_hash_t *n = NODE_NEWNODE(NODE_HASH, rb_node_hash_t, loc);
23081 n->nd_head = nd_head;
23082 n->nd_brace = 0;
23083
23084 return n;
23085}
23086
23087static rb_node_masgn_t *
23088rb_node_masgn_new(struct parser_params *p, NODE *nd_head, NODE *nd_args, const YYLTYPE *loc)
23089{
23090 rb_node_masgn_t *n = NODE_NEWNODE(NODE_MASGN, rb_node_masgn_t, loc);
23091 n->nd_head = nd_head;
23092 n->nd_value = 0;
23093 n->nd_args = nd_args;
23094
23095 return n;
23096}
23097
23098static rb_node_gasgn_t *
23099rb_node_gasgn_new(struct parser_params *p, ID nd_vid, NODE *nd_value, const YYLTYPE *loc)
23100{
23101 rb_node_gasgn_t *n = NODE_NEWNODE(NODE_GASGN, rb_node_gasgn_t, loc);
23102 n->nd_vid = nd_vid;
23103 n->nd_value = nd_value;
23104
23105 return n;
23106}
23107
23108static rb_node_lasgn_t *
23109rb_node_lasgn_new(struct parser_params *p, ID nd_vid, NODE *nd_value, const YYLTYPE *loc)
23110{
23111 rb_node_lasgn_t *n = NODE_NEWNODE(NODE_LASGN, rb_node_lasgn_t, loc);
23112 n->nd_vid = nd_vid;
23113 n->nd_value = nd_value;
23114
23115 return n;
23116}
23117
23118static rb_node_dasgn_t *
23119rb_node_dasgn_new(struct parser_params *p, ID nd_vid, NODE *nd_value, const YYLTYPE *loc)
23120{
23121 rb_node_dasgn_t *n = NODE_NEWNODE(NODE_DASGN, rb_node_dasgn_t, loc);
23122 n->nd_vid = nd_vid;
23123 n->nd_value = nd_value;
23124
23125 return n;
23126}
23127
23128static rb_node_iasgn_t *
23129rb_node_iasgn_new(struct parser_params *p, ID nd_vid, NODE *nd_value, const YYLTYPE *loc)
23130{
23131 rb_node_iasgn_t *n = NODE_NEWNODE(NODE_IASGN, rb_node_iasgn_t, loc);
23132 n->nd_vid = nd_vid;
23133 n->nd_value = nd_value;
23134
23135 return n;
23136}
23137
23138static rb_node_cvasgn_t *
23139rb_node_cvasgn_new(struct parser_params *p, ID nd_vid, NODE *nd_value, const YYLTYPE *loc)
23140{
23141 rb_node_cvasgn_t *n = NODE_NEWNODE(NODE_CVASGN, rb_node_cvasgn_t, loc);
23142 n->nd_vid = nd_vid;
23143 n->nd_value = nd_value;
23144
23145 return n;
23146}
23147
23148static rb_node_op_asgn1_t *
23149rb_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)
23150{
23151 rb_node_op_asgn1_t *n = NODE_NEWNODE(NODE_OP_ASGN1, rb_node_op_asgn1_t, loc);
23152 n->nd_recv = nd_recv;
23153 n->nd_mid = nd_mid;
23154 n->nd_index = index;
23155 n->nd_rvalue = rvalue;
23156 n->call_operator_loc = *call_operator_loc;
23157 n->opening_loc = *opening_loc;
23158 n->closing_loc = *closing_loc;
23159 n->binary_operator_loc = *binary_operator_loc;
23160
23161 return n;
23162}
23163
23164static rb_node_op_asgn2_t *
23165rb_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)
23166{
23167 rb_node_op_asgn2_t *n = NODE_NEWNODE(NODE_OP_ASGN2, rb_node_op_asgn2_t, loc);
23168 n->nd_recv = nd_recv;
23169 n->nd_value = nd_value;
23170 n->nd_vid = nd_vid;
23171 n->nd_mid = nd_mid;
23172 n->nd_aid = nd_aid;
23173 n->call_operator_loc = *call_operator_loc;
23174 n->message_loc = *message_loc;
23175 n->binary_operator_loc = *binary_operator_loc;
23176
23177 return n;
23178}
23179
23180static rb_node_op_asgn_or_t *
23181rb_node_op_asgn_or_new(struct parser_params *p, NODE *nd_head, NODE *nd_value, const YYLTYPE *loc)
23182{
23183 rb_node_op_asgn_or_t *n = NODE_NEWNODE(NODE_OP_ASGN_OR, rb_node_op_asgn_or_t, loc);
23184 n->nd_head = nd_head;
23185 n->nd_value = nd_value;
23186
23187 return n;
23188}
23189
23190static rb_node_op_asgn_and_t *
23191rb_node_op_asgn_and_new(struct parser_params *p, NODE *nd_head, NODE *nd_value, const YYLTYPE *loc)
23192{
23193 rb_node_op_asgn_and_t *n = NODE_NEWNODE(NODE_OP_ASGN_AND, rb_node_op_asgn_and_t, loc);
23194 n->nd_head = nd_head;
23195 n->nd_value = nd_value;
23196
23197 return n;
23198}
23199
23200static rb_node_gvar_t *
23201rb_node_gvar_new(struct parser_params *p, ID nd_vid, const YYLTYPE *loc)
23202{
23203 rb_node_gvar_t *n = NODE_NEWNODE(NODE_GVAR, rb_node_gvar_t, loc);
23204 n->nd_vid = nd_vid;
23205
23206 return n;
23207}
23208
23209static rb_node_lvar_t *
23210rb_node_lvar_new(struct parser_params *p, ID nd_vid, const YYLTYPE *loc)
23211{
23212 rb_node_lvar_t *n = NODE_NEWNODE(NODE_LVAR, rb_node_lvar_t, loc);
23213 n->nd_vid = nd_vid;
23214
23215 return n;
23216}
23217
23218static rb_node_dvar_t *
23219rb_node_dvar_new(struct parser_params *p, ID nd_vid, const YYLTYPE *loc)
23220{
23221 rb_node_dvar_t *n = NODE_NEWNODE(NODE_DVAR, rb_node_dvar_t, loc);
23222 n->nd_vid = nd_vid;
23223
23224 return n;
23225}
23226
23227static rb_node_ivar_t *
23228rb_node_ivar_new(struct parser_params *p, ID nd_vid, const YYLTYPE *loc)
23229{
23230 rb_node_ivar_t *n = NODE_NEWNODE(NODE_IVAR, rb_node_ivar_t, loc);
23231 n->nd_vid = nd_vid;
23232
23233 return n;
23234}
23235
23236static rb_node_const_t *
23237rb_node_const_new(struct parser_params *p, ID nd_vid, const YYLTYPE *loc)
23238{
23239 rb_node_const_t *n = NODE_NEWNODE(NODE_CONST, rb_node_const_t, loc);
23240 n->nd_vid = nd_vid;
23241
23242 return n;
23243}
23244
23245static rb_node_cvar_t *
23246rb_node_cvar_new(struct parser_params *p, ID nd_vid, const YYLTYPE *loc)
23247{
23248 rb_node_cvar_t *n = NODE_NEWNODE(NODE_CVAR, rb_node_cvar_t, loc);
23249 n->nd_vid = nd_vid;
23250
23251 return n;
23252}
23253
23254static rb_node_nth_ref_t *
23255rb_node_nth_ref_new(struct parser_params *p, long nd_nth, const YYLTYPE *loc)
23256{
23257 rb_node_nth_ref_t *n = NODE_NEWNODE(NODE_NTH_REF, rb_node_nth_ref_t, loc);
23258 n->nd_nth = nd_nth;
23259
23260 return n;
23261}
23262
23263static rb_node_back_ref_t *
23264rb_node_back_ref_new(struct parser_params *p, long nd_nth, const YYLTYPE *loc)
23265{
23266 rb_node_back_ref_t *n = NODE_NEWNODE(NODE_BACK_REF, rb_node_back_ref_t, loc);
23267 n->nd_nth = nd_nth;
23268
23269 return n;
23270}
23271
23272static rb_node_integer_t *
23273rb_node_integer_new(struct parser_params *p, char* val, int base, const YYLTYPE *loc)
23274{
23275 rb_node_integer_t *n = NODE_NEWNODE(NODE_INTEGER, rb_node_integer_t, loc);
23276 n->val = val;
23277 n->minus = FALSE;
23278 n->base = base;
23279
23280 return n;
23281}
23282
23283static rb_node_float_t *
23284rb_node_float_new(struct parser_params *p, char* val, const YYLTYPE *loc)
23285{
23286 rb_node_float_t *n = NODE_NEWNODE(NODE_FLOAT, rb_node_float_t, loc);
23287 n->val = val;
23288 n->minus = FALSE;
23289
23290 return n;
23291}
23292
23293static rb_node_rational_t *
23294rb_node_rational_new(struct parser_params *p, char* val, int base, int seen_point, const YYLTYPE *loc)
23295{
23296 rb_node_rational_t *n = NODE_NEWNODE(NODE_RATIONAL, rb_node_rational_t, loc);
23297 n->val = val;
23298 n->minus = FALSE;
23299 n->base = base;
23300 n->seen_point = seen_point;
23301
23302 return n;
23303}
23304
23305static rb_node_imaginary_t *
23306rb_node_imaginary_new(struct parser_params *p, char* val, int base, int seen_point, enum rb_numeric_type numeric_type, const YYLTYPE *loc)
23307{
23308 rb_node_imaginary_t *n = NODE_NEWNODE(NODE_IMAGINARY, rb_node_imaginary_t, loc);
23309 n->val = val;
23310 n->minus = FALSE;
23311 n->base = base;
23312 n->seen_point = seen_point;
23313 n->type = numeric_type;
23314
23315 return n;
23316}
23317
23318static rb_node_str_t *
23319rb_node_str_new(struct parser_params *p, rb_parser_string_t *string, const YYLTYPE *loc)
23320{
23321 rb_node_str_t *n = NODE_NEWNODE(NODE_STR, rb_node_str_t, loc);
23322 n->string = string;
23323
23324 return n;
23325}
23326
23327/* TODO; Use union for NODE_DSTR2 */
23328static rb_node_dstr_t *
23329rb_node_dstr_new0(struct parser_params *p, rb_parser_string_t *string, long nd_alen, NODE *nd_next, const YYLTYPE *loc)
23330{
23331 rb_node_dstr_t *n = NODE_NEWNODE(NODE_DSTR, rb_node_dstr_t, loc);
23332 n->string = string;
23333 n->as.nd_alen = nd_alen;
23334 n->nd_next = (rb_node_list_t *)nd_next;
23335
23336 return n;
23337}
23338
23339static rb_node_dstr_t *
23340rb_node_dstr_new(struct parser_params *p, rb_parser_string_t *string, const YYLTYPE *loc)
23341{
23342 return rb_node_dstr_new0(p, string, 1, 0, loc);
23343}
23344
23345static rb_node_xstr_t *
23346rb_node_xstr_new(struct parser_params *p, rb_parser_string_t *string, const YYLTYPE *loc)
23347{
23348 rb_node_xstr_t *n = NODE_NEWNODE(NODE_XSTR, rb_node_xstr_t, loc);
23349 n->string = string;
23350
23351 return n;
23352}
23353
23354static rb_node_dxstr_t *
23355rb_node_dxstr_new(struct parser_params *p, rb_parser_string_t *string, long nd_alen, NODE *nd_next, const YYLTYPE *loc)
23356{
23357 rb_node_dxstr_t *n = NODE_NEWNODE(NODE_DXSTR, rb_node_dxstr_t, loc);
23358 n->string = string;
23359 n->as.nd_alen = nd_alen;
23360 n->nd_next = (rb_node_list_t *)nd_next;
23361
23362 return n;
23363}
23364
23365static rb_node_sym_t *
23366rb_node_sym_new(struct parser_params *p, VALUE str, const YYLTYPE *loc)
23367{
23368 rb_node_sym_t *n = NODE_NEWNODE(NODE_SYM, rb_node_sym_t, loc);
23369 n->string = rb_str_to_parser_string(p, str);
23370
23371 return n;
23372}
23373
23374static rb_node_dsym_t *
23375rb_node_dsym_new(struct parser_params *p, rb_parser_string_t *string, long nd_alen, NODE *nd_next, const YYLTYPE *loc)
23376{
23377 rb_node_dsym_t *n = NODE_NEWNODE(NODE_DSYM, rb_node_dsym_t, loc);
23378 n->string = string;
23379 n->as.nd_alen = nd_alen;
23380 n->nd_next = (rb_node_list_t *)nd_next;
23381
23382 return n;
23383}
23384
23385static rb_node_evstr_t *
23386rb_node_evstr_new(struct parser_params *p, NODE *nd_body, const YYLTYPE *loc, const YYLTYPE *opening_loc, const YYLTYPE *closing_loc)
23387{
23388 rb_node_evstr_t *n = NODE_NEWNODE(NODE_EVSTR, rb_node_evstr_t, loc);
23389 n->nd_body = nd_body;
23390 n->opening_loc = *opening_loc;
23391 n->closing_loc = *closing_loc;
23392
23393 return n;
23394}
23395
23396static rb_node_regx_t *
23397rb_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)
23398{
23399 rb_node_regx_t *n = NODE_NEWNODE(NODE_REGX, rb_node_regx_t, loc);
23400 n->string = string;
23401 n->options = options & RE_OPTION_MASK;
23402 n->opening_loc = *opening_loc;
23403 n->content_loc = *content_loc;
23404 n->closing_loc = *closing_loc;
23405
23406 return n;
23407}
23408
23409static rb_node_call_t *
23410rb_node_call_new(struct parser_params *p, NODE *nd_recv, ID nd_mid, NODE *nd_args, const YYLTYPE *loc)
23411{
23412 rb_node_call_t *n = NODE_NEWNODE(NODE_CALL, rb_node_call_t, loc);
23413 n->nd_recv = nd_recv;
23414 n->nd_mid = nd_mid;
23415 n->nd_args = nd_args;
23416
23417 return n;
23418}
23419
23420static rb_node_opcall_t *
23421rb_node_opcall_new(struct parser_params *p, NODE *nd_recv, ID nd_mid, NODE *nd_args, const YYLTYPE *loc)
23422{
23423 rb_node_opcall_t *n = NODE_NEWNODE(NODE_OPCALL, rb_node_opcall_t, loc);
23424 n->nd_recv = nd_recv;
23425 n->nd_mid = nd_mid;
23426 n->nd_args = nd_args;
23427
23428 return n;
23429}
23430
23431static rb_node_fcall_t *
23432rb_node_fcall_new(struct parser_params *p, ID nd_mid, NODE *nd_args, const YYLTYPE *loc)
23433{
23434 rb_node_fcall_t *n = NODE_NEWNODE(NODE_FCALL, rb_node_fcall_t, loc);
23435 n->nd_mid = nd_mid;
23436 n->nd_args = nd_args;
23437
23438 return n;
23439}
23440
23441static rb_node_qcall_t *
23442rb_node_qcall_new(struct parser_params *p, NODE *nd_recv, ID nd_mid, NODE *nd_args, const YYLTYPE *loc)
23443{
23444 rb_node_qcall_t *n = NODE_NEWNODE(NODE_QCALL, rb_node_qcall_t, loc);
23445 n->nd_recv = nd_recv;
23446 n->nd_mid = nd_mid;
23447 n->nd_args = nd_args;
23448
23449 return n;
23450}
23451
23452static rb_node_vcall_t *
23453rb_node_vcall_new(struct parser_params *p, ID nd_mid, const YYLTYPE *loc)
23454{
23455 rb_node_vcall_t *n = NODE_NEWNODE(NODE_VCALL, rb_node_vcall_t, loc);
23456 n->nd_mid = nd_mid;
23457
23458 return n;
23459}
23460
23461static rb_node_once_t *
23462rb_node_once_new(struct parser_params *p, NODE *nd_body, const YYLTYPE *loc)
23463{
23464 rb_node_once_t *n = NODE_NEWNODE(NODE_ONCE, rb_node_once_t, loc);
23465 n->nd_body = nd_body;
23466
23467 return n;
23468}
23469
23470static rb_node_args_t *
23471rb_node_args_new(struct parser_params *p, const YYLTYPE *loc)
23472{
23473 rb_node_args_t *n = NODE_NEWNODE(NODE_ARGS, rb_node_args_t, loc);
23474 MEMZERO(&n->nd_ainfo, struct rb_args_info, 1);
23475
23476 return n;
23477}
23478
23479static rb_node_args_aux_t *
23480rb_node_args_aux_new(struct parser_params *p, ID nd_pid, int nd_plen, const YYLTYPE *loc)
23481{
23482 rb_node_args_aux_t *n = NODE_NEWNODE(NODE_ARGS_AUX, rb_node_args_aux_t, loc);
23483 n->nd_pid = nd_pid;
23484 n->nd_plen = nd_plen;
23485 n->nd_next = 0;
23486
23487 return n;
23488}
23489
23490static rb_node_opt_arg_t *
23491rb_node_opt_arg_new(struct parser_params *p, NODE *nd_body, const YYLTYPE *loc)
23492{
23493 rb_node_opt_arg_t *n = NODE_NEWNODE(NODE_OPT_ARG, rb_node_opt_arg_t, loc);
23494 n->nd_body = nd_body;
23495 n->nd_next = 0;
23496
23497 return n;
23498}
23499
23500static rb_node_kw_arg_t *
23501rb_node_kw_arg_new(struct parser_params *p, NODE *nd_body, const YYLTYPE *loc)
23502{
23503 rb_node_kw_arg_t *n = NODE_NEWNODE(NODE_KW_ARG, rb_node_kw_arg_t, loc);
23504 n->nd_body = nd_body;
23505 n->nd_next = 0;
23506
23507 return n;
23508}
23509
23510static rb_node_postarg_t *
23511rb_node_postarg_new(struct parser_params *p, NODE *nd_1st, NODE *nd_2nd, const YYLTYPE *loc)
23512{
23513 rb_node_postarg_t *n = NODE_NEWNODE(NODE_POSTARG, rb_node_postarg_t, loc);
23514 n->nd_1st = nd_1st;
23515 n->nd_2nd = nd_2nd;
23516
23517 return n;
23518}
23519
23520static rb_node_argscat_t *
23521rb_node_argscat_new(struct parser_params *p, NODE *nd_head, NODE *nd_body, const YYLTYPE *loc)
23522{
23523 rb_node_argscat_t *n = NODE_NEWNODE(NODE_ARGSCAT, rb_node_argscat_t, loc);
23524 n->nd_head = nd_head;
23525 n->nd_body = nd_body;
23526
23527 return n;
23528}
23529
23530static rb_node_argspush_t *
23531rb_node_argspush_new(struct parser_params *p, NODE *nd_head, NODE *nd_body, const YYLTYPE *loc)
23532{
23533 rb_node_argspush_t *n = NODE_NEWNODE(NODE_ARGSPUSH, rb_node_argspush_t, loc);
23534 n->nd_head = nd_head;
23535 n->nd_body = nd_body;
23536
23537 return n;
23538}
23539
23540static rb_node_splat_t *
23541rb_node_splat_new(struct parser_params *p, NODE *nd_head, const YYLTYPE *loc, const YYLTYPE *operator_loc)
23542{
23543 rb_node_splat_t *n = NODE_NEWNODE(NODE_SPLAT, rb_node_splat_t, loc);
23544 n->nd_head = nd_head;
23545 n->operator_loc = *operator_loc;
23546
23547 return n;
23548}
23549
23550static rb_node_block_pass_t *
23551rb_node_block_pass_new(struct parser_params *p, NODE *nd_body, const YYLTYPE *loc, const YYLTYPE *operator_loc)
23552{
23553 rb_node_block_pass_t *n = NODE_NEWNODE(NODE_BLOCK_PASS, rb_node_block_pass_t, loc);
23554 n->forwarding = 0;
23555 n->nd_head = 0;
23556 n->nd_body = nd_body;
23557 n->operator_loc = *operator_loc;
23558
23559 return n;
23560}
23561
23562static rb_node_alias_t *
23563rb_node_alias_new(struct parser_params *p, NODE *nd_1st, NODE *nd_2nd, const YYLTYPE *loc, const YYLTYPE *keyword_loc)
23564{
23565 rb_node_alias_t *n = NODE_NEWNODE(NODE_ALIAS, rb_node_alias_t, loc);
23566 n->nd_1st = nd_1st;
23567 n->nd_2nd = nd_2nd;
23568 n->keyword_loc = *keyword_loc;
23569
23570 return n;
23571}
23572
23573static rb_node_valias_t *
23574rb_node_valias_new(struct parser_params *p, ID nd_alias, ID nd_orig, const YYLTYPE *loc, const YYLTYPE *keyword_loc)
23575{
23576 rb_node_valias_t *n = NODE_NEWNODE(NODE_VALIAS, rb_node_valias_t, loc);
23577 n->nd_alias = nd_alias;
23578 n->nd_orig = nd_orig;
23579 n->keyword_loc = *keyword_loc;
23580
23581 return n;
23582}
23583
23584static rb_node_undef_t *
23585rb_node_undef_new(struct parser_params *p, NODE *nd_undef, const YYLTYPE *loc)
23586{
23587 rb_node_undef_t *n = NODE_NEWNODE(NODE_UNDEF, rb_node_undef_t, loc);
23588 n->nd_undefs = rb_parser_ary_new_capa_for_node(p, 1);
23589 n->keyword_loc = NULL_LOC;
23590 rb_parser_ary_push_node(p, n->nd_undefs, nd_undef);
23591
23592 return n;
23593}
23594
23595static rb_node_errinfo_t *
23596rb_node_errinfo_new(struct parser_params *p, const YYLTYPE *loc)
23597{
23598 rb_node_errinfo_t *n = NODE_NEWNODE(NODE_ERRINFO, rb_node_errinfo_t, loc);
23599
23600 return n;
23601}
23602
23603static rb_node_defined_t *
23604rb_node_defined_new(struct parser_params *p, NODE *nd_head, const YYLTYPE *loc, const YYLTYPE *keyword_loc)
23605{
23606 rb_node_defined_t *n = NODE_NEWNODE(NODE_DEFINED, rb_node_defined_t, loc);
23607 n->nd_head = nd_head;
23608 n->keyword_loc = *keyword_loc;
23609
23610 return n;
23611}
23612
23613static rb_node_postexe_t *
23614rb_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)
23615{
23616 rb_node_postexe_t *n = NODE_NEWNODE(NODE_POSTEXE, rb_node_postexe_t, loc);
23617 n->nd_body = nd_body;
23618 n->keyword_loc = *keyword_loc;
23619 n->opening_loc = *opening_loc;
23620 n->closing_loc = *closing_loc;
23621
23622 return n;
23623}
23624
23625static rb_node_attrasgn_t *
23626rb_node_attrasgn_new(struct parser_params *p, NODE *nd_recv, ID nd_mid, NODE *nd_args, const YYLTYPE *loc)
23627{
23628 rb_node_attrasgn_t *n = NODE_NEWNODE(NODE_ATTRASGN, rb_node_attrasgn_t, loc);
23629 n->nd_recv = nd_recv;
23630 n->nd_mid = nd_mid;
23631 n->nd_args = nd_args;
23632
23633 return n;
23634}
23635
23636static rb_node_aryptn_t *
23637rb_node_aryptn_new(struct parser_params *p, NODE *pre_args, NODE *rest_arg, NODE *post_args, const YYLTYPE *loc)
23638{
23639 rb_node_aryptn_t *n = NODE_NEWNODE(NODE_ARYPTN, rb_node_aryptn_t, loc);
23640 n->nd_pconst = 0;
23641 n->pre_args = pre_args;
23642 n->rest_arg = rest_arg;
23643 n->post_args = post_args;
23644
23645 return n;
23646}
23647
23648static rb_node_hshptn_t *
23649rb_node_hshptn_new(struct parser_params *p, NODE *nd_pconst, NODE *nd_pkwargs, NODE *nd_pkwrestarg, const YYLTYPE *loc)
23650{
23651 rb_node_hshptn_t *n = NODE_NEWNODE(NODE_HSHPTN, rb_node_hshptn_t, loc);
23652 n->nd_pconst = nd_pconst;
23653 n->nd_pkwargs = nd_pkwargs;
23654 n->nd_pkwrestarg = nd_pkwrestarg;
23655
23656 return n;
23657}
23658
23659static rb_node_fndptn_t *
23660rb_node_fndptn_new(struct parser_params *p, NODE *pre_rest_arg, NODE *args, NODE *post_rest_arg, const YYLTYPE *loc)
23661{
23662 rb_node_fndptn_t *n = NODE_NEWNODE(NODE_FNDPTN, rb_node_fndptn_t, loc);
23663 n->nd_pconst = 0;
23664 n->pre_rest_arg = pre_rest_arg;
23665 n->args = args;
23666 n->post_rest_arg = post_rest_arg;
23667
23668 return n;
23669}
23670
23671static rb_node_line_t *
23672rb_node_line_new(struct parser_params *p, const YYLTYPE *loc)
23673{
23674 rb_node_line_t *n = NODE_NEWNODE(NODE_LINE, rb_node_line_t, loc);
23675
23676 return n;
23677}
23678
23679static rb_node_file_t *
23680rb_node_file_new(struct parser_params *p, VALUE str, const YYLTYPE *loc)
23681{
23682 rb_node_file_t *n = NODE_NEWNODE(NODE_FILE, rb_node_file_t, loc);
23683 n->path = rb_str_to_parser_string(p, str);
23684
23685 return n;
23686}
23687
23688static rb_node_encoding_t *
23689rb_node_encoding_new(struct parser_params *p, const YYLTYPE *loc)
23690{
23691 rb_node_encoding_t *n = NODE_NEWNODE(NODE_ENCODING, rb_node_encoding_t, loc);
23692 n->enc = p->enc;
23693
23694 return n;
23695}
23696
23697static rb_node_cdecl_t *
23698rb_node_cdecl_new(struct parser_params *p, ID nd_vid, NODE *nd_value, NODE *nd_else, enum rb_parser_shareability shareability, const YYLTYPE *loc)
23699{
23700 rb_node_cdecl_t *n = NODE_NEWNODE(NODE_CDECL, rb_node_cdecl_t, loc);
23701 n->nd_vid = nd_vid;
23702 n->nd_value = nd_value;
23703 n->nd_else = nd_else;
23704 n->shareability = shareability;
23705
23706 return n;
23707}
23708
23709static rb_node_op_cdecl_t *
23710rb_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)
23711{
23712 rb_node_op_cdecl_t *n = NODE_NEWNODE(NODE_OP_CDECL, rb_node_op_cdecl_t, loc);
23713 n->nd_head = nd_head;
23714 n->nd_value = nd_value;
23715 n->nd_aid = nd_aid;
23716 n->shareability = shareability;
23717
23718 return n;
23719}
23720
23721static rb_node_error_t *
23722rb_node_error_new(struct parser_params *p, const YYLTYPE *loc)
23723{
23724 rb_node_error_t *n = NODE_NEWNODE(NODE_ERROR, rb_node_error_t, loc);
23725
23726 return n;
23727}
23728
23729static rb_node_break_t *
23730rb_node_break_new(struct parser_params *p, NODE *nd_stts, const YYLTYPE *loc, const YYLTYPE *keyword_loc)
23731{
23732 rb_node_break_t *n = NODE_NEWNODE(NODE_BREAK, rb_node_break_t, loc);
23733 n->nd_stts = nd_stts;
23734 n->nd_chain = 0;
23735 n->keyword_loc = *keyword_loc;
23736
23737 return n;
23738}
23739
23740static rb_node_next_t *
23741rb_node_next_new(struct parser_params *p, NODE *nd_stts, const YYLTYPE *loc, const YYLTYPE *keyword_loc)
23742{
23743 rb_node_next_t *n = NODE_NEWNODE(NODE_NEXT, rb_node_next_t, loc);
23744 n->nd_stts = nd_stts;
23745 n->nd_chain = 0;
23746 n->keyword_loc = *keyword_loc;
23747
23748 return n;
23749}
23750
23751static rb_node_redo_t *
23752rb_node_redo_new(struct parser_params *p, const YYLTYPE *loc, const YYLTYPE *keyword_loc)
23753{
23754 rb_node_redo_t *n = NODE_NEWNODE(NODE_REDO, rb_node_redo_t, loc);
23755 n->nd_chain = 0;
23756 n->keyword_loc = *keyword_loc;
23757
23758 return n;
23759}
23760
23761static rb_node_def_temp_t *
23762rb_node_def_temp_new(struct parser_params *p, const YYLTYPE *loc)
23763{
23764 rb_node_def_temp_t *n = NODE_NEWNODE((enum node_type)NODE_DEF_TEMP, rb_node_def_temp_t, loc);
23765 n->save.numparam_save = 0;
23766 n->save.max_numparam = 0;
23767 n->save.ctxt = p->ctxt;
23768 n->nd_def = 0;
23769 n->nd_mid = 0;
23770
23771 return n;
23772}
23773
23774static rb_node_def_temp_t *
23775def_head_save(struct parser_params *p, rb_node_def_temp_t *n)
23776{
23777 n->save.numparam_save = numparam_push(p);
23778 n->save.max_numparam = p->max_numparam;
23779 return n;
23780}
23781
23782#ifndef RIPPER
23783static enum node_type
23784nodetype(NODE *node) /* for debug */
23785{
23786 return (enum node_type)nd_type(node);
23787}
23788
23789static int
23790nodeline(NODE *node)
23791{
23792 return nd_line(node);
23793}
23794#endif
23795
23796static NODE*
23797newline_node(NODE *node)
23798{
23799 if (node) {
23800 node = remove_begin(node);
23801 nd_set_fl_newline(node);
23802 }
23803 return node;
23804}
23805
23806static void
23807fixpos(NODE *node, NODE *orig)
23808{
23809 if (!node) return;
23810 if (!orig) return;
23811 nd_set_line(node, nd_line(orig));
23812}
23813
23814static NODE*
23815block_append(struct parser_params *p, NODE *head, NODE *tail)
23816{
23817 NODE *end, *h = head, *nd;
23818
23819 if (tail == 0) return head;
23820
23821 if (h == 0) return tail;
23822 switch (nd_type(h)) {
23823 default:
23824 h = end = NEW_BLOCK(head, &head->nd_loc);
23825 head = end;
23826 break;
23827 case NODE_BLOCK:
23828 end = RNODE_BLOCK(h)->nd_end;
23829 break;
23830 }
23831
23832 nd = RNODE_BLOCK(end)->nd_head;
23833 switch (nd_type(nd)) {
23834 case NODE_RETURN:
23835 case NODE_BREAK:
23836 case NODE_NEXT:
23837 case NODE_REDO:
23838 case NODE_RETRY:
23839 rb_warning0L(nd_line(tail), "statement not reached");
23840 break;
23841
23842 default:
23843 break;
23844 }
23845
23846 if (!nd_type_p(tail, NODE_BLOCK)) {
23847 tail = NEW_BLOCK(tail, &tail->nd_loc);
23848 }
23849 RNODE_BLOCK(end)->nd_next = tail;
23850 RNODE_BLOCK(h)->nd_end = RNODE_BLOCK(tail)->nd_end;
23851 nd_set_last_loc(head, nd_last_loc(tail));
23852 return head;
23853}
23854
23855/* append item to the list */
23856static NODE*
23857list_append(struct parser_params *p, NODE *list, NODE *item)
23858{
23859 NODE *last;
23860
23861 if (list == 0) return NEW_LIST(item, &item->nd_loc);
23862 if (RNODE_LIST(list)->nd_next) {
23863 last = RNODE_LIST(RNODE_LIST(list)->nd_next)->as.nd_end;
23864 }
23865 else {
23866 last = list;
23867 }
23868
23869 RNODE_LIST(list)->as.nd_alen += 1;
23870 RNODE_LIST(last)->nd_next = NEW_LIST(item, &item->nd_loc);
23871 RNODE_LIST(RNODE_LIST(list)->nd_next)->as.nd_end = RNODE_LIST(last)->nd_next;
23872
23873 nd_set_last_loc(list, nd_last_loc(item));
23874
23875 return list;
23876}
23877
23878/* concat two lists */
23879static NODE*
23880list_concat(NODE *head, NODE *tail)
23881{
23882 NODE *last;
23883
23884 if (RNODE_LIST(head)->nd_next) {
23885 last = RNODE_LIST(RNODE_LIST(head)->nd_next)->as.nd_end;
23886 }
23887 else {
23888 last = head;
23889 }
23890
23891 RNODE_LIST(head)->as.nd_alen += RNODE_LIST(tail)->as.nd_alen;
23892 RNODE_LIST(last)->nd_next = tail;
23893 if (RNODE_LIST(tail)->nd_next) {
23894 RNODE_LIST(RNODE_LIST(head)->nd_next)->as.nd_end = RNODE_LIST(RNODE_LIST(tail)->nd_next)->as.nd_end;
23895 }
23896 else {
23897 RNODE_LIST(RNODE_LIST(head)->nd_next)->as.nd_end = tail;
23898 }
23899
23900 nd_set_last_loc(head, nd_last_loc(tail));
23901
23902 return head;
23903}
23904
23905static int
23906literal_concat0(struct parser_params *p, rb_parser_string_t *head, rb_parser_string_t *tail)
23907{
23908 if (!tail) return 1;
23909 if (!rb_parser_enc_compatible(p, head, tail)) {
23910 compile_error(p, "string literal encodings differ (%s / %s)",
23911 rb_enc_name(rb_parser_str_get_encoding(head)),
23912 rb_enc_name(rb_parser_str_get_encoding(tail)));
23913 rb_parser_str_resize(p, head, 0);
23914 rb_parser_str_resize(p, tail, 0);
23915 return 0;
23916 }
23917 rb_parser_str_buf_append(p, head, tail);
23918 return 1;
23919}
23920
23921static rb_parser_string_t *
23922string_literal_head(struct parser_params *p, enum node_type htype, NODE *head)
23923{
23924 if (htype != NODE_DSTR) return NULL;
23925 if (RNODE_DSTR(head)->nd_next) {
23926 head = RNODE_LIST(RNODE_LIST(RNODE_DSTR(head)->nd_next)->as.nd_end)->nd_head;
23927 if (!head || !nd_type_p(head, NODE_STR)) return NULL;
23928 }
23929 rb_parser_string_t *lit = RNODE_DSTR(head)->string;
23930 ASSUME(lit);
23931 return lit;
23932}
23933
23934#ifndef RIPPER
23935static rb_parser_string_t *
23936rb_parser_string_deep_copy(struct parser_params *p, const rb_parser_string_t *orig)
23937{
23938 rb_parser_string_t *copy;
23939 if (!orig) return NULL;
23940 copy = rb_parser_string_new(p, PARSER_STRING_PTR(orig), PARSER_STRING_LEN(orig));
23941 copy->coderange = orig->coderange;
23942 copy->enc = orig->enc;
23943 return copy;
23944}
23945#endif
23946
23947/* concat two string literals */
23948static NODE *
23949literal_concat(struct parser_params *p, NODE *head, NODE *tail, const YYLTYPE *loc)
23950{
23951 enum node_type htype;
23952 rb_parser_string_t *lit;
23953
23954 if (!head) return tail;
23955 if (!tail) return head;
23956
23957 htype = nd_type(head);
23958 if (htype == NODE_EVSTR) {
23959 head = new_dstr(p, head, loc);
23960 htype = NODE_DSTR;
23961 }
23962 if (p->heredoc_indent > 0) {
23963 switch (htype) {
23964 case NODE_STR:
23965 head = str2dstr(p, head);
23966 case NODE_DSTR:
23967 return list_append(p, head, tail);
23968 default:
23969 break;
23970 }
23971 }
23972 switch (nd_type(tail)) {
23973 case NODE_STR:
23974 if ((lit = string_literal_head(p, htype, head)) != false) {
23975 htype = NODE_STR;
23976 }
23977 else {
23978 lit = RNODE_DSTR(head)->string;
23979 }
23980 if (htype == NODE_STR) {
23981 if (!literal_concat0(p, lit, RNODE_STR(tail)->string)) {
23982 error:
23983 rb_discard_node(p, head);
23984 rb_discard_node(p, tail);
23985 return 0;
23986 }
23987 rb_discard_node(p, tail);
23988 }
23989 else {
23990 list_append(p, head, tail);
23991 }
23992 break;
23993
23994 case NODE_DSTR:
23995 if (htype == NODE_STR) {
23996 if (!literal_concat0(p, RNODE_STR(head)->string, RNODE_DSTR(tail)->string))
23997 goto error;
23998 rb_parser_string_free(p, RNODE_DSTR(tail)->string);
23999 RNODE_DSTR(tail)->string = RNODE_STR(head)->string;
24000 RNODE_STR(head)->string = NULL;
24001 rb_discard_node(p, head);
24002 head = tail;
24003 }
24004 else if (!RNODE_DSTR(tail)->string) {
24005 append:
24006 RNODE_DSTR(head)->as.nd_alen += RNODE_DSTR(tail)->as.nd_alen - 1;
24007 if (!RNODE_DSTR(head)->nd_next) {
24008 RNODE_DSTR(head)->nd_next = RNODE_DSTR(tail)->nd_next;
24009 }
24010 else if (RNODE_DSTR(tail)->nd_next) {
24011 RNODE_DSTR(RNODE_DSTR(RNODE_DSTR(head)->nd_next)->as.nd_end)->nd_next = RNODE_DSTR(tail)->nd_next;
24012 RNODE_DSTR(RNODE_DSTR(head)->nd_next)->as.nd_end = RNODE_DSTR(RNODE_DSTR(tail)->nd_next)->as.nd_end;
24013 }
24014 rb_discard_node(p, tail);
24015 }
24016 else if ((lit = string_literal_head(p, htype, head)) != false) {
24017 if (!literal_concat0(p, lit, RNODE_DSTR(tail)->string))
24018 goto error;
24019 rb_parser_string_free(p, RNODE_DSTR(tail)->string);
24020 RNODE_DSTR(tail)->string = 0;
24021 goto append;
24022 }
24023 else {
24024 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));
24025 RNODE_DSTR(tail)->string = 0;
24026 }
24027 break;
24028
24029 case NODE_EVSTR:
24030 if (htype == NODE_STR) {
24031 head = str2dstr(p, head);
24032 RNODE_DSTR(head)->as.nd_alen = 1;
24033 }
24034 list_append(p, head, tail);
24035 break;
24036 }
24037 return head;
24038}
24039
24040static void
24041nd_copy_flag(NODE *new_node, NODE *old_node)
24042{
24043 if (nd_fl_newline(old_node)) nd_set_fl_newline(new_node);
24044 nd_set_line(new_node, nd_line(old_node));
24045 new_node->nd_loc = old_node->nd_loc;
24046 new_node->node_id = old_node->node_id;
24047}
24048
24049static NODE *
24050str2dstr(struct parser_params *p, NODE *node)
24051{
24052 NODE *new_node = (NODE *)NODE_NEW_INTERNAL(NODE_DSTR, rb_node_dstr_t);
24053 nd_copy_flag(new_node, node);
24054 RNODE_DSTR(new_node)->string = RNODE_STR(node)->string;
24055 RNODE_DSTR(new_node)->as.nd_alen = 0;
24056 RNODE_DSTR(new_node)->nd_next = 0;
24057 RNODE_STR(node)->string = 0;
24058
24059 return new_node;
24060}
24061
24062static NODE *
24063str2regx(struct parser_params *p, NODE *node, int options, const YYLTYPE *loc, const YYLTYPE *opening_loc, const YYLTYPE *content_loc, const YYLTYPE *closing_loc)
24064{
24065 NODE *new_node = (NODE *)NODE_NEW_INTERNAL(NODE_REGX, rb_node_regx_t);
24066 nd_copy_flag(new_node, node);
24067 RNODE_REGX(new_node)->string = RNODE_STR(node)->string;
24068 RNODE_REGX(new_node)->options = options;
24069 nd_set_loc(new_node, loc);
24070 RNODE_REGX(new_node)->opening_loc = *opening_loc;
24071 RNODE_REGX(new_node)->content_loc = *content_loc;
24072 RNODE_REGX(new_node)->closing_loc = *closing_loc;
24073 RNODE_STR(node)->string = 0;
24074
24075 return new_node;
24076}
24077
24078static NODE *
24079evstr2dstr(struct parser_params *p, NODE *node)
24080{
24081 if (nd_type_p(node, NODE_EVSTR)) {
24082 node = new_dstr(p, node, &node->nd_loc);
24083 }
24084 return node;
24085}
24086
24087static NODE *
24088new_evstr(struct parser_params *p, NODE *node, const YYLTYPE *loc, const YYLTYPE *opening_loc, const YYLTYPE *closing_loc)
24089{
24090 NODE *head = node;
24091
24092 if (node) {
24093 switch (nd_type(node)) {
24094 case NODE_STR:
24095 return str2dstr(p, node);
24096 case NODE_DSTR:
24097 break;
24098 case NODE_EVSTR:
24099 return node;
24100 }
24101 }
24102 return NEW_EVSTR(head, loc, opening_loc, closing_loc);
24103}
24104
24105static NODE *
24106new_dstr(struct parser_params *p, NODE *node, const YYLTYPE *loc)
24107{
24108 NODE *dstr = NEW_DSTR(STRING_NEW0(), loc);
24109 return list_append(p, dstr, node);
24110}
24111
24112static NODE *
24113call_bin_op(struct parser_params *p, NODE *recv, ID id, NODE *arg1,
24114 const YYLTYPE *op_loc, const YYLTYPE *loc)
24115{
24116 NODE *expr;
24117 value_expr(recv);
24118 value_expr(arg1);
24119 expr = NEW_OPCALL(recv, id, NEW_LIST(arg1, &arg1->nd_loc), loc);
24120 nd_set_line(expr, op_loc->beg_pos.lineno);
24121 return expr;
24122}
24123
24124static NODE *
24125call_uni_op(struct parser_params *p, NODE *recv, ID id, const YYLTYPE *op_loc, const YYLTYPE *loc)
24126{
24127 NODE *opcall;
24128 value_expr(recv);
24129 opcall = NEW_OPCALL(recv, id, 0, loc);
24130 nd_set_line(opcall, op_loc->beg_pos.lineno);
24131 return opcall;
24132}
24133
24134static NODE *
24135new_qcall(struct parser_params* p, ID atype, NODE *recv, ID mid, NODE *args, const YYLTYPE *op_loc, const YYLTYPE *loc)
24136{
24137 NODE *qcall = NEW_QCALL(atype, recv, mid, args, loc);
24138 nd_set_line(qcall, op_loc->beg_pos.lineno);
24139 return qcall;
24140}
24141
24142static NODE*
24143new_command_qcall(struct parser_params* p, ID atype, NODE *recv, ID mid, NODE *args, NODE *block, const YYLTYPE *op_loc, const YYLTYPE *loc)
24144{
24145 NODE *ret;
24146 if (block) block_dup_check(p, args, block);
24147 ret = new_qcall(p, atype, recv, mid, args, op_loc, loc);
24148 if (block) ret = method_add_block(p, ret, block, loc);
24149 fixpos(ret, recv);
24150 return ret;
24151}
24152
24154new_locations_lambda_body(struct parser_params* p, NODE *node, const YYLTYPE *loc, const YYLTYPE *opening_loc, const YYLTYPE *closing_loc)
24155{
24157 body->node = node;
24158 body->opening_loc = *opening_loc;
24159 body->closing_loc = *closing_loc;
24160 return body;
24161}
24162
24163#define nd_once_body(node) (nd_type_p((node), NODE_ONCE) ? RNODE_ONCE(node)->nd_body : node)
24164
24165static NODE*
24166last_expr_once_body(NODE *node)
24167{
24168 if (!node) return 0;
24169 return nd_once_body(node);
24170}
24171
24172static NODE*
24173match_op(struct parser_params *p, NODE *node1, NODE *node2, const YYLTYPE *op_loc, const YYLTYPE *loc)
24174{
24175 NODE *n;
24176 int line = op_loc->beg_pos.lineno;
24177
24178 value_expr(node1);
24179 value_expr(node2);
24180
24181 if ((n = last_expr_once_body(node1)) != 0) {
24182 switch (nd_type(n)) {
24183 case NODE_DREGX:
24184 {
24185 NODE *match = NEW_MATCH2(node1, node2, loc);
24186 nd_set_line(match, line);
24187 return match;
24188 }
24189
24190 case NODE_REGX:
24191 {
24192 const VALUE lit = rb_node_regx_string_val(n);
24193 if (!NIL_P(lit)) {
24194 NODE *match = NEW_MATCH2(node1, node2, loc);
24195 RNODE_MATCH2(match)->nd_args = reg_named_capture_assign(p, lit, loc, assignable);
24196 nd_set_line(match, line);
24197 return match;
24198 }
24199 }
24200 }
24201 }
24202
24203 if ((n = last_expr_once_body(node2)) != 0) {
24204 NODE *match3;
24205
24206 switch (nd_type(n)) {
24207 case NODE_DREGX:
24208 match3 = NEW_MATCH3(node2, node1, loc);
24209 return match3;
24210 }
24211 }
24212
24213 n = NEW_CALL(node1, tMATCH, NEW_LIST(node2, &node2->nd_loc), loc);
24214 nd_set_line(n, line);
24215 return n;
24216}
24217
24218# if WARN_PAST_SCOPE
24219static int
24220past_dvar_p(struct parser_params *p, ID id)
24221{
24222 struct vtable *past = p->lvtbl->past;
24223 while (past) {
24224 if (vtable_included(past, id)) return 1;
24225 past = past->prev;
24226 }
24227 return 0;
24228}
24229# endif
24230
24231static int
24232numparam_nested_p(struct parser_params *p)
24233{
24234 struct local_vars *local = p->lvtbl;
24235 NODE *outer = local->numparam.outer;
24236 NODE *inner = local->numparam.inner;
24237 if (outer || inner) {
24238 NODE *used = outer ? outer : inner;
24239 compile_error(p, "numbered parameter is already used in %s block\n"
24240 "%s:%d: numbered parameter is already used here",
24241 outer ? "outer" : "inner",
24242 p->ruby_sourcefile, nd_line(used));
24243 parser_show_error_line(p, &used->nd_loc);
24244 return 1;
24245 }
24246 return 0;
24247}
24248
24249static int
24250numparam_used_p(struct parser_params *p)
24251{
24252 NODE *numparam = p->lvtbl->numparam.current;
24253 if (numparam) {
24254 compile_error(p, "'it' is not allowed when a numbered parameter is already used\n"
24255 "%s:%d: numbered parameter is already used here",
24256 p->ruby_sourcefile, nd_line(numparam));
24257 parser_show_error_line(p, &numparam->nd_loc);
24258 return 1;
24259 }
24260 return 0;
24261}
24262
24263static int
24264it_used_p(struct parser_params *p)
24265{
24266 NODE *it = p->lvtbl->it;
24267 if (it) {
24268 compile_error(p, "numbered parameters are not allowed when 'it' is already used\n"
24269 "%s:%d: 'it' is already used here",
24270 p->ruby_sourcefile, nd_line(it));
24271 parser_show_error_line(p, &it->nd_loc);
24272 return 1;
24273 }
24274 return 0;
24275}
24276
24277static NODE*
24278gettable(struct parser_params *p, ID id, const YYLTYPE *loc)
24279{
24280 ID *vidp = NULL;
24281 NODE *node;
24282 switch (id) {
24283 case keyword_self:
24284 return NEW_SELF(loc);
24285 case keyword_nil:
24286 return NEW_NIL(loc);
24287 case keyword_true:
24288 return NEW_TRUE(loc);
24289 case keyword_false:
24290 return NEW_FALSE(loc);
24291 case keyword__FILE__:
24292 {
24293 VALUE file = p->ruby_sourcefile_string;
24294 if (NIL_P(file))
24295 file = rb_str_new(0, 0);
24296 node = NEW_FILE(file, loc);
24297 }
24298 return node;
24299 case keyword__LINE__:
24300 return NEW_LINE(loc);
24301 case keyword__ENCODING__:
24302 return NEW_ENCODING(loc);
24303
24304 }
24305 switch (id_type(id)) {
24306 case ID_LOCAL:
24307 if (dyna_in_block(p) && dvar_defined_ref(p, id, &vidp)) {
24308 if (NUMPARAM_ID_P(id) && (numparam_nested_p(p) || it_used_p(p))) return 0;
24309 if (vidp) *vidp |= LVAR_USED;
24310 node = NEW_DVAR(id, loc);
24311 return node;
24312 }
24313 if (local_id_ref(p, id, &vidp)) {
24314 if (vidp) *vidp |= LVAR_USED;
24315 node = NEW_LVAR(id, loc);
24316 return node;
24317 }
24318 if (dyna_in_block(p) && NUMPARAM_ID_P(id) &&
24319 parser_numbered_param(p, NUMPARAM_ID_TO_IDX(id))) {
24320 if (numparam_nested_p(p) || it_used_p(p)) return 0;
24321 node = NEW_DVAR(id, loc);
24322 struct local_vars *local = p->lvtbl;
24323 if (!local->numparam.current) local->numparam.current = node;
24324 return node;
24325 }
24326# if WARN_PAST_SCOPE
24327 if (!p->ctxt.in_defined && RTEST(ruby_verbose) && past_dvar_p(p, id)) {
24328 rb_warning1("possible reference to past scope - %"PRIsWARN, rb_id2str(id));
24329 }
24330# endif
24331 /* method call without arguments */
24332 if (dyna_in_block(p) && id == rb_intern("it") && !(DVARS_TERMINAL_P(p->lvtbl->args) || DVARS_TERMINAL_P(p->lvtbl->args->prev))) {
24333 if (numparam_used_p(p)) return 0;
24334 if (p->max_numparam == ORDINAL_PARAM) {
24335 compile_error(p, "ordinary parameter is defined");
24336 return 0;
24337 }
24338 if (!p->it_id) {
24339 p->it_id = internal_id(p);
24340 vtable_add(p->lvtbl->args, p->it_id);
24341 }
24342 NODE *node = NEW_DVAR(p->it_id, loc);
24343 if (!p->lvtbl->it) p->lvtbl->it = node;
24344 return node;
24345 }
24346 return NEW_VCALL(id, loc);
24347 case ID_GLOBAL:
24348 return NEW_GVAR(id, loc);
24349 case ID_INSTANCE:
24350 return NEW_IVAR(id, loc);
24351 case ID_CONST:
24352 return NEW_CONST(id, loc);
24353 case ID_CLASS:
24354 return NEW_CVAR(id, loc);
24355 }
24356 compile_error(p, "identifier %"PRIsVALUE" is not valid to get", rb_id2str(id));
24357 return 0;
24358}
24359
24360static rb_node_opt_arg_t *
24361opt_arg_append(rb_node_opt_arg_t *opt_list, rb_node_opt_arg_t *opt)
24362{
24363 rb_node_opt_arg_t *opts = opt_list;
24364 RNODE(opts)->nd_loc.end_pos = RNODE(opt)->nd_loc.end_pos;
24365
24366 while (opts->nd_next) {
24367 opts = opts->nd_next;
24368 RNODE(opts)->nd_loc.end_pos = RNODE(opt)->nd_loc.end_pos;
24369 }
24370 opts->nd_next = opt;
24371
24372 return opt_list;
24373}
24374
24375static rb_node_kw_arg_t *
24376kwd_append(rb_node_kw_arg_t *kwlist, rb_node_kw_arg_t *kw)
24377{
24378 if (kwlist) {
24379 /* Assume rb_node_kw_arg_t and rb_node_opt_arg_t has same structure */
24380 opt_arg_append(RNODE_OPT_ARG(kwlist), RNODE_OPT_ARG(kw));
24381 }
24382 return kwlist;
24383}
24384
24385static NODE *
24386new_defined(struct parser_params *p, NODE *expr, const YYLTYPE *loc, const YYLTYPE *keyword_loc)
24387{
24388 int had_trailing_semicolon = p->ctxt.has_trailing_semicolon;
24389 p->ctxt.has_trailing_semicolon = 0;
24390
24391 NODE *n = expr;
24392 while (n) {
24393 if (nd_type_p(n, NODE_BEGIN)) {
24394 n = RNODE_BEGIN(n)->nd_body;
24395 }
24396 else if (nd_type_p(n, NODE_BLOCK) && RNODE_BLOCK(n)->nd_end == n) {
24397 n = RNODE_BLOCK(n)->nd_head;
24398 }
24399 else {
24400 break;
24401 }
24402 }
24403
24404 if (had_trailing_semicolon && !nd_type_p(expr, NODE_BLOCK)) {
24405 NODE *block = NEW_BLOCK(expr, loc);
24406 return NEW_DEFINED(block, loc, keyword_loc);
24407 }
24408
24409 return NEW_DEFINED(n, loc, keyword_loc);
24410}
24411
24412static NODE*
24413str_to_sym_node(struct parser_params *p, NODE *node, const YYLTYPE *loc)
24414{
24415 VALUE lit;
24416 rb_parser_string_t *str = RNODE_STR(node)->string;
24417 if (rb_parser_enc_str_coderange(p, str) == RB_PARSER_ENC_CODERANGE_BROKEN) {
24418 yyerror1(loc, "invalid symbol");
24419 lit = STR_NEW0();
24420 }
24421 else {
24422 lit = rb_str_new_parser_string(str);
24423 }
24424 return NEW_SYM(lit, loc);
24425}
24426
24427static NODE*
24428symbol_append(struct parser_params *p, NODE *symbols, NODE *symbol)
24429{
24430 enum node_type type = nd_type(symbol);
24431 switch (type) {
24432 case NODE_DSTR:
24433 nd_set_type(symbol, NODE_DSYM);
24434 break;
24435 case NODE_STR:
24436 symbol = str_to_sym_node(p, symbol, &RNODE(symbol)->nd_loc);
24437 break;
24438 default:
24439 compile_error(p, "unexpected node as symbol: %s", parser_node_name(type));
24440 }
24441 return list_append(p, symbols, symbol);
24442}
24443
24444static void
24445dregex_fragment_setenc(struct parser_params *p, rb_node_dregx_t *const dreg, int options)
24446{
24447 if (dreg->string) {
24448 reg_fragment_setenc(p, dreg->string, options);
24449 }
24450 for (struct RNode_LIST *list = dreg->nd_next; list; list = RNODE_LIST(list->nd_next)) {
24451 NODE *frag = list->nd_head;
24452 if (nd_type_p(frag, NODE_STR)) {
24453 reg_fragment_setenc(p, RNODE_STR(frag)->string, options);
24454 }
24455 else if (nd_type_p(frag, NODE_DSTR)) {
24456 dregex_fragment_setenc(p, RNODE_DSTR(frag), options);
24457 }
24458 }
24459}
24460
24461static NODE *
24462new_regexp(struct parser_params *p, NODE *node, int options, const YYLTYPE *loc, const YYLTYPE *opening_loc, const YYLTYPE *content_loc, const YYLTYPE *closing_loc)
24463{
24464 if (!node) {
24465 /* Check string is valid regex */
24466 rb_parser_string_t *str = STRING_NEW0();
24467 reg_compile(p, str, options);
24468 node = NEW_REGX(str, options, loc, opening_loc, content_loc, closing_loc);
24469 return node;
24470 }
24471 switch (nd_type(node)) {
24472 case NODE_STR:
24473 {
24474 /* Check string is valid regex */
24475 reg_compile(p, RNODE_STR(node)->string, options);
24476 node = str2regx(p, node, options, loc, opening_loc, content_loc, closing_loc);
24477 }
24478 break;
24479 default:
24480 node = NEW_DSTR0(STRING_NEW0(), 1, NEW_LIST(node, loc), loc);
24481 /* fall through */
24482 case NODE_DSTR:
24483 nd_set_type(node, NODE_DREGX);
24484 nd_set_loc(node, loc);
24485 rb_node_dregx_t *const dreg = RNODE_DREGX(node);
24486 dreg->as.nd_cflag = options & RE_OPTION_MASK;
24487 if (dreg->nd_next) {
24488 dregex_fragment_setenc(p, dreg, options);
24489 }
24490 if (options & RE_OPTION_ONCE) {
24491 node = NEW_ONCE(node, loc);
24492 }
24493 break;
24494 }
24495 return node;
24496}
24497
24498static rb_node_kw_arg_t *
24499new_kw_arg(struct parser_params *p, NODE *k, const YYLTYPE *loc)
24500{
24501 if (!k) return 0;
24502 return NEW_KW_ARG((k), loc);
24503}
24504
24505static NODE *
24506new_xstring(struct parser_params *p, NODE *node, const YYLTYPE *loc)
24507{
24508 if (!node) {
24509 NODE *xstr = NEW_XSTR(STRING_NEW0(), loc);
24510 return xstr;
24511 }
24512 switch (nd_type(node)) {
24513 case NODE_STR:
24514 nd_set_type(node, NODE_XSTR);
24515 nd_set_loc(node, loc);
24516 break;
24517 case NODE_DSTR:
24518 nd_set_type(node, NODE_DXSTR);
24519 nd_set_loc(node, loc);
24520 break;
24521 default:
24522 node = NEW_DXSTR(0, 1, NEW_LIST(node, loc), loc);
24523 break;
24524 }
24525 return node;
24526}
24527
24528static const
24529struct st_hash_type literal_type = {
24530 literal_cmp,
24531 literal_hash,
24532};
24533
24534static int nd_type_st_key_enable_p(NODE *node);
24535
24536static void
24537check_literal_when(struct parser_params *p, NODE *arg, const YYLTYPE *loc)
24538{
24539 /* See https://bugs.ruby-lang.org/issues/20331 for discussion about what is warned. */
24540 if (!arg || !p->case_labels) return;
24541 if (!nd_type_st_key_enable_p(arg)) return;
24542
24543 if (p->case_labels == CHECK_LITERAL_WHEN) {
24544 p->case_labels = st_init_table(&literal_type);
24545 }
24546 else {
24547 st_data_t line;
24548 if (st_lookup(p->case_labels, (st_data_t)arg, &line)) {
24549 rb_warning2("'when' clause on line %d duplicates 'when' clause on line %d and is ignored",
24550 WARN_I((int)nd_line(arg)), WARN_I((int)line));
24551 return;
24552 }
24553 }
24554 st_insert(p->case_labels, (st_data_t)arg, (st_data_t)p->ruby_sourceline);
24555}
24556
24557#ifdef RIPPER
24558static int
24559id_is_var(struct parser_params *p, ID id)
24560{
24561 if (is_notop_id(id)) {
24562 switch (id & ID_SCOPE_MASK) {
24563 case ID_GLOBAL: case ID_INSTANCE: case ID_CONST: case ID_CLASS:
24564 return 1;
24565 case ID_LOCAL:
24566 if (dyna_in_block(p)) {
24567 if (NUMPARAM_ID_P(id) || dvar_defined(p, id)) return 1;
24568 }
24569 if (local_id(p, id)) return 1;
24570 /* method call without arguments */
24571 return 0;
24572 }
24573 }
24574 compile_error(p, "identifier %"PRIsVALUE" is not valid to get", rb_id2str(id));
24575 return 0;
24576}
24577#endif
24578
24579static inline enum lex_state_e
24580parser_set_lex_state(struct parser_params *p, enum lex_state_e ls, int line)
24581{
24582 if (p->debug) {
24583 ls = rb_parser_trace_lex_state(p, p->lex.state, ls, line);
24584 }
24585 return p->lex.state = ls;
24586}
24587
24588#ifndef RIPPER
24589static void
24590flush_debug_buffer(struct parser_params *p, VALUE out, VALUE str)
24591{
24592 VALUE mesg = p->debug_buffer;
24593
24594 if (!NIL_P(mesg) && RSTRING_LEN(mesg)) {
24595 p->debug_buffer = Qnil;
24596 rb_io_puts(1, &mesg, out);
24597 }
24598 if (!NIL_P(str) && RSTRING_LEN(str)) {
24599 rb_io_write(p->debug_output, str);
24600 }
24601}
24602
24603static const char rb_parser_lex_state_names[][8] = {
24604 "BEG", "END", "ENDARG", "ENDFN", "ARG",
24605 "CMDARG", "MID", "FNAME", "DOT", "CLASS",
24606 "LABEL", "LABELED","FITEM",
24607};
24608
24609static VALUE
24610append_lex_state_name(struct parser_params *p, enum lex_state_e state, VALUE buf)
24611{
24612 int i, sep = 0;
24613 unsigned int mask = 1;
24614 static const char none[] = "NONE";
24615
24616 for (i = 0; i < EXPR_MAX_STATE; ++i, mask <<= 1) {
24617 if ((unsigned)state & mask) {
24618 if (sep) {
24619 rb_str_cat(buf, "|", 1);
24620 }
24621 sep = 1;
24622 rb_str_cat_cstr(buf, rb_parser_lex_state_names[i]);
24623 }
24624 }
24625 if (!sep) {
24626 rb_str_cat(buf, none, sizeof(none)-1);
24627 }
24628 return buf;
24629}
24630
24631enum lex_state_e
24632rb_parser_trace_lex_state(struct parser_params *p, enum lex_state_e from,
24633 enum lex_state_e to, int line)
24634{
24635 VALUE mesg;
24636 mesg = rb_str_new_cstr("lex_state: ");
24637 append_lex_state_name(p, from, mesg);
24638 rb_str_cat_cstr(mesg, " -> ");
24639 append_lex_state_name(p, to, mesg);
24640 rb_str_catf(mesg, " at line %d\n", line);
24641 flush_debug_buffer(p, p->debug_output, mesg);
24642 return to;
24643}
24644
24645VALUE
24646rb_parser_lex_state_name(struct parser_params *p, enum lex_state_e state)
24647{
24648 return rb_str_to_interned_str(append_lex_state_name(p, state, rb_str_new(0, 0)));
24649}
24650
24651static void
24652append_bitstack_value(struct parser_params *p, stack_type stack, VALUE mesg)
24653{
24654 if (stack == 0) {
24655 rb_str_cat_cstr(mesg, "0");
24656 }
24657 else {
24658 stack_type mask = (stack_type)1U << (CHAR_BIT * sizeof(stack_type) - 1);
24659 for (; mask && !(stack & mask); mask >>= 1) continue;
24660 for (; mask; mask >>= 1) rb_str_cat(mesg, stack & mask ? "1" : "0", 1);
24661 }
24662}
24663
24664void
24665rb_parser_show_bitstack(struct parser_params *p, stack_type stack,
24666 const char *name, int line)
24667{
24668 VALUE mesg = rb_sprintf("%s: ", name);
24669 append_bitstack_value(p, stack, mesg);
24670 rb_str_catf(mesg, " at line %d\n", line);
24671 flush_debug_buffer(p, p->debug_output, mesg);
24672}
24673
24674void
24675rb_parser_fatal(struct parser_params *p, const char *fmt, ...)
24676{
24677 va_list ap;
24678 VALUE mesg = rb_str_new_cstr("internal parser error: ");
24679
24680 va_start(ap, fmt);
24681 rb_str_vcatf(mesg, fmt, ap);
24682 va_end(ap);
24683 yyerror0(RSTRING_PTR(mesg));
24684 RB_GC_GUARD(mesg);
24685
24686 mesg = rb_str_new(0, 0);
24687 append_lex_state_name(p, p->lex.state, mesg);
24688 compile_error(p, "lex.state: %"PRIsVALUE, mesg);
24689 rb_str_resize(mesg, 0);
24690 append_bitstack_value(p, p->cond_stack, mesg);
24691 compile_error(p, "cond_stack: %"PRIsVALUE, mesg);
24692 rb_str_resize(mesg, 0);
24693 append_bitstack_value(p, p->cmdarg_stack, mesg);
24694 compile_error(p, "cmdarg_stack: %"PRIsVALUE, mesg);
24695 if (p->debug_output == rb_ractor_stdout())
24696 p->debug_output = rb_ractor_stderr();
24697 p->debug = TRUE;
24698}
24699
24700static YYLTYPE *
24701rb_parser_set_pos(YYLTYPE *yylloc, int sourceline, int beg_pos, int end_pos)
24702{
24703 yylloc->beg_pos.lineno = sourceline;
24704 yylloc->beg_pos.column = beg_pos;
24705 yylloc->end_pos.lineno = sourceline;
24706 yylloc->end_pos.column = end_pos;
24707 return yylloc;
24708}
24709
24710YYLTYPE *
24711rb_parser_set_location_from_strterm_heredoc(struct parser_params *p, rb_strterm_heredoc_t *here, YYLTYPE *yylloc)
24712{
24713 int sourceline = here->sourceline;
24714 int beg_pos = (int)here->offset - here->quote
24715 - (rb_strlen_lit("<<-") - !(here->func & STR_FUNC_INDENT));
24716 int end_pos = (int)here->offset + here->length + here->quote;
24717
24718 return rb_parser_set_pos(yylloc, sourceline, beg_pos, end_pos);
24719}
24720
24721YYLTYPE *
24722rb_parser_set_location_of_delayed_token(struct parser_params *p, YYLTYPE *yylloc)
24723{
24724 yylloc->beg_pos.lineno = p->delayed.beg_line;
24725 yylloc->beg_pos.column = p->delayed.beg_col;
24726 yylloc->end_pos.lineno = p->delayed.end_line;
24727 yylloc->end_pos.column = p->delayed.end_col;
24728
24729 return yylloc;
24730}
24731
24732YYLTYPE *
24733rb_parser_set_location_of_heredoc_end(struct parser_params *p, YYLTYPE *yylloc)
24734{
24735 int sourceline = p->ruby_sourceline;
24736 int beg_pos = (int)(p->lex.ptok - p->lex.pbeg);
24737 int end_pos = (int)(p->lex.pend - p->lex.pbeg);
24738 return rb_parser_set_pos(yylloc, sourceline, beg_pos, end_pos);
24739}
24740
24741YYLTYPE *
24742rb_parser_set_location_of_dummy_end(struct parser_params *p, YYLTYPE *yylloc)
24743{
24744 yylloc->end_pos = yylloc->beg_pos;
24745
24746 return yylloc;
24747}
24748
24749YYLTYPE *
24750rb_parser_set_location_of_none(struct parser_params *p, YYLTYPE *yylloc)
24751{
24752 int sourceline = p->ruby_sourceline;
24753 int beg_pos = (int)(p->lex.ptok - p->lex.pbeg);
24754 int end_pos = (int)(p->lex.ptok - p->lex.pbeg);
24755 return rb_parser_set_pos(yylloc, sourceline, beg_pos, end_pos);
24756}
24757
24758YYLTYPE *
24759rb_parser_set_location(struct parser_params *p, YYLTYPE *yylloc)
24760{
24761 int sourceline = p->ruby_sourceline;
24762 int beg_pos = (int)(p->lex.ptok - p->lex.pbeg);
24763 int end_pos = (int)(p->lex.pcur - p->lex.pbeg);
24764 return rb_parser_set_pos(yylloc, sourceline, beg_pos, end_pos);
24765}
24766#endif /* !RIPPER */
24767
24768static int
24769assignable0(struct parser_params *p, ID id, const char **err)
24770{
24771 if (!id) return -1;
24772 switch (id) {
24773 case keyword_self:
24774 *err = "Can't change the value of self";
24775 return -1;
24776 case keyword_nil:
24777 *err = "Can't assign to nil";
24778 return -1;
24779 case keyword_true:
24780 *err = "Can't assign to true";
24781 return -1;
24782 case keyword_false:
24783 *err = "Can't assign to false";
24784 return -1;
24785 case keyword__FILE__:
24786 *err = "Can't assign to __FILE__";
24787 return -1;
24788 case keyword__LINE__:
24789 *err = "Can't assign to __LINE__";
24790 return -1;
24791 case keyword__ENCODING__:
24792 *err = "Can't assign to __ENCODING__";
24793 return -1;
24794 }
24795 switch (id_type(id)) {
24796 case ID_LOCAL:
24797 if (dyna_in_block(p)) {
24798 if (p->max_numparam > NO_PARAM && NUMPARAM_ID_P(id)) {
24799 compile_error(p, "Can't assign to numbered parameter _%d",
24800 NUMPARAM_ID_TO_IDX(id));
24801 return -1;
24802 }
24803 if (dvar_curr(p, id)) return NODE_DASGN;
24804 if (dvar_defined(p, id)) return NODE_DASGN;
24805 if (local_id(p, id)) return NODE_LASGN;
24806 dyna_var(p, id);
24807 return NODE_DASGN;
24808 }
24809 else {
24810 if (!local_id(p, id)) local_var(p, id);
24811 return NODE_LASGN;
24812 }
24813 break;
24814 case ID_GLOBAL: return NODE_GASGN;
24815 case ID_INSTANCE: return NODE_IASGN;
24816 case ID_CONST:
24817 if (!p->ctxt.in_def) return NODE_CDECL;
24818 *err = "dynamic constant assignment";
24819 return -1;
24820 case ID_CLASS: return NODE_CVASGN;
24821 default:
24822 compile_error(p, "identifier %"PRIsVALUE" is not valid to set", rb_id2str(id));
24823 }
24824 return -1;
24825}
24826
24827static NODE*
24828assignable(struct parser_params *p, ID id, NODE *val, const YYLTYPE *loc)
24829{
24830 const char *err = 0;
24831 int node_type = assignable0(p, id, &err);
24832 switch (node_type) {
24833 case NODE_DASGN: return NEW_DASGN(id, val, loc);
24834 case NODE_LASGN: return NEW_LASGN(id, val, loc);
24835 case NODE_GASGN: return NEW_GASGN(id, val, loc);
24836 case NODE_IASGN: return NEW_IASGN(id, val, loc);
24837 case NODE_CDECL: return NEW_CDECL(id, val, 0, p->ctxt.shareable_constant_value, loc);
24838 case NODE_CVASGN: return NEW_CVASGN(id, val, loc);
24839 }
24840/* TODO: FIXME */
24841#ifndef RIPPER
24842 if (err) yyerror1(loc, err);
24843#else
24844 if (err) set_value(assign_error(p, err, p->s_lvalue));
24845#endif
24846 return NEW_ERROR(loc);
24847}
24848
24849static int
24850is_private_local_id(struct parser_params *p, ID name)
24851{
24852 VALUE s;
24853 if (name == idUScore) return 1;
24854 if (!is_local_id(name)) return 0;
24855 s = rb_id2str(name);
24856 if (!s) return 0;
24857 return RSTRING_PTR(s)[0] == '_';
24858}
24859
24860static int
24861shadowing_lvar_0(struct parser_params *p, ID name)
24862{
24863 if (dyna_in_block(p)) {
24864 if (dvar_curr(p, name)) {
24865 if (is_private_local_id(p, name)) return 1;
24866 yyerror0("duplicated argument name");
24867 }
24868 else if (dvar_defined(p, name) || local_id(p, name)) {
24869 vtable_add(p->lvtbl->vars, name);
24870 if (p->lvtbl->used) {
24871 vtable_add(p->lvtbl->used, (ID)p->ruby_sourceline | LVAR_USED);
24872 }
24873 return 0;
24874 }
24875 }
24876 else {
24877 if (local_id(p, name)) {
24878 if (is_private_local_id(p, name)) return 1;
24879 yyerror0("duplicated argument name");
24880 }
24881 }
24882 return 1;
24883}
24884
24885static ID
24886shadowing_lvar(struct parser_params *p, ID name)
24887{
24888 shadowing_lvar_0(p, name);
24889 return name;
24890}
24891
24892static void
24893new_bv(struct parser_params *p, ID name)
24894{
24895 if (!name) return;
24896 if (!is_local_id(name)) {
24897 compile_error(p, "invalid local variable - %"PRIsVALUE,
24898 rb_id2str(name));
24899 return;
24900 }
24901 if (!shadowing_lvar_0(p, name)) return;
24902 dyna_var(p, name);
24903 ID *vidp = 0;
24904 if (dvar_defined_ref(p, name, &vidp)) {
24905 if (vidp) *vidp |= LVAR_USED;
24906 }
24907}
24908
24909static void
24910aryset_check(struct parser_params *p, NODE *args)
24911{
24912 NODE *block = 0, *kwds = 0;
24913 if (args && nd_type_p(args, NODE_BLOCK_PASS)) {
24914 block = RNODE_BLOCK_PASS(args)->nd_body;
24915 args = RNODE_BLOCK_PASS(args)->nd_head;
24916 }
24917 if (args && nd_type_p(args, NODE_ARGSCAT)) {
24918 args = RNODE_ARGSCAT(args)->nd_body;
24919 }
24920 if (args && nd_type_p(args, NODE_ARGSPUSH)) {
24921 kwds = RNODE_ARGSPUSH(args)->nd_body;
24922 }
24923 else {
24924 for (NODE *next = args; next && nd_type_p(next, NODE_LIST);
24925 next = RNODE_LIST(next)->nd_next) {
24926 kwds = RNODE_LIST(next)->nd_head;
24927 }
24928 }
24929 if (kwds && nd_type_p(kwds, NODE_HASH) && !RNODE_HASH(kwds)->nd_brace) {
24930 yyerror1(&kwds->nd_loc, "keyword arg given in index assignment");
24931 }
24932 if (block) {
24933 yyerror1(&block->nd_loc, "block arg given in index assignment");
24934 }
24935}
24936
24937static NODE *
24938aryset(struct parser_params *p, NODE *recv, NODE *idx, const YYLTYPE *loc)
24939{
24940 aryset_check(p, idx);
24941 return NEW_ATTRASGN(recv, tASET, idx, loc);
24942}
24943
24944static void
24945block_dup_check(struct parser_params *p, NODE *node1, NODE *node2)
24946{
24947 if (node2 && node1 && nd_type_p(node1, NODE_BLOCK_PASS)) {
24948 compile_error(p, "both block arg and actual block given");
24949 }
24950}
24951
24952static NODE *
24953attrset(struct parser_params *p, NODE *recv, ID atype, ID id, const YYLTYPE *loc)
24954{
24955 if (!CALL_Q_P(atype)) id = rb_id_attrset(id);
24956 return NEW_ATTRASGN(recv, id, 0, loc);
24957}
24958
24959static VALUE
24960rb_backref_error(struct parser_params *p, NODE *node)
24961{
24962#ifndef RIPPER
24963# define ERR(...) (compile_error(p, __VA_ARGS__), Qtrue)
24964#else
24965# define ERR(...) rb_sprintf(__VA_ARGS__)
24966#endif
24967 switch (nd_type(node)) {
24968 case NODE_NTH_REF:
24969 return ERR("Can't set variable $%ld", RNODE_NTH_REF(node)->nd_nth);
24970 case NODE_BACK_REF:
24971 return ERR("Can't set variable $%c", (int)RNODE_BACK_REF(node)->nd_nth);
24972 }
24973#undef ERR
24974 UNREACHABLE_RETURN(Qfalse); /* only called on syntax error */
24975}
24976
24977static NODE *
24978arg_append(struct parser_params *p, NODE *node1, NODE *node2, const YYLTYPE *loc)
24979{
24980 if (!node1) return NEW_LIST(node2, &node2->nd_loc);
24981 switch (nd_type(node1)) {
24982 case NODE_LIST:
24983 return list_append(p, node1, node2);
24984 case NODE_BLOCK_PASS:
24985 RNODE_BLOCK_PASS(node1)->nd_head = arg_append(p, RNODE_BLOCK_PASS(node1)->nd_head, node2, loc);
24986 node1->nd_loc.end_pos = RNODE_BLOCK_PASS(node1)->nd_head->nd_loc.end_pos;
24987 return node1;
24988 case NODE_ARGSPUSH:
24989 RNODE_ARGSPUSH(node1)->nd_body = list_append(p, NEW_LIST(RNODE_ARGSPUSH(node1)->nd_body, &RNODE_ARGSPUSH(node1)->nd_body->nd_loc), node2);
24990 node1->nd_loc.end_pos = RNODE_ARGSPUSH(node1)->nd_body->nd_loc.end_pos;
24991 nd_set_type(node1, NODE_ARGSCAT);
24992 return node1;
24993 case NODE_ARGSCAT:
24994 if (!nd_type_p(RNODE_ARGSCAT(node1)->nd_body, NODE_LIST)) break;
24995 RNODE_ARGSCAT(node1)->nd_body = list_append(p, RNODE_ARGSCAT(node1)->nd_body, node2);
24996 node1->nd_loc.end_pos = RNODE_ARGSCAT(node1)->nd_body->nd_loc.end_pos;
24997 return node1;
24998 }
24999 return NEW_ARGSPUSH(node1, node2, loc);
25000}
25001
25002static NODE *
25003arg_concat(struct parser_params *p, NODE *node1, NODE *node2, const YYLTYPE *loc)
25004{
25005 if (!node2) return node1;
25006 switch (nd_type(node1)) {
25007 case NODE_BLOCK_PASS:
25008 if (RNODE_BLOCK_PASS(node1)->nd_head)
25009 RNODE_BLOCK_PASS(node1)->nd_head = arg_concat(p, RNODE_BLOCK_PASS(node1)->nd_head, node2, loc);
25010 else
25011 RNODE_LIST(node1)->nd_head = NEW_LIST(node2, loc);
25012 return node1;
25013 case NODE_ARGSPUSH:
25014 if (!nd_type_p(node2, NODE_LIST)) break;
25015 RNODE_ARGSPUSH(node1)->nd_body = list_concat(NEW_LIST(RNODE_ARGSPUSH(node1)->nd_body, loc), node2);
25016 nd_set_type(node1, NODE_ARGSCAT);
25017 return node1;
25018 case NODE_ARGSCAT:
25019 if (!nd_type_p(node2, NODE_LIST) ||
25020 !nd_type_p(RNODE_ARGSCAT(node1)->nd_body, NODE_LIST)) break;
25021 RNODE_ARGSCAT(node1)->nd_body = list_concat(RNODE_ARGSCAT(node1)->nd_body, node2);
25022 return node1;
25023 }
25024 return NEW_ARGSCAT(node1, node2, loc);
25025}
25026
25027static NODE *
25028last_arg_append(struct parser_params *p, NODE *args, NODE *last_arg, const YYLTYPE *loc)
25029{
25030 NODE *n1;
25031 if ((n1 = splat_array(args)) != 0) {
25032 return list_append(p, n1, last_arg);
25033 }
25034 return arg_append(p, args, last_arg, loc);
25035}
25036
25037static NODE *
25038rest_arg_append(struct parser_params *p, NODE *args, NODE *rest_arg, const YYLTYPE *loc)
25039{
25040 NODE *n1;
25041 if ((nd_type_p(rest_arg, NODE_LIST)) && (n1 = splat_array(args)) != 0) {
25042 return list_concat(n1, rest_arg);
25043 }
25044 return arg_concat(p, args, rest_arg, loc);
25045}
25046
25047static NODE *
25048splat_array(NODE* node)
25049{
25050 if (nd_type_p(node, NODE_SPLAT)) node = RNODE_SPLAT(node)->nd_head;
25051 if (nd_type_p(node, NODE_LIST)) return node;
25052 return 0;
25053}
25054
25055static void
25056mark_lvar_used(struct parser_params *p, NODE *rhs)
25057{
25058 ID *vidp = NULL;
25059 if (!rhs) return;
25060 switch (nd_type(rhs)) {
25061 case NODE_LASGN:
25062 if (local_id_ref(p, RNODE_LASGN(rhs)->nd_vid, &vidp)) {
25063 if (vidp) *vidp |= LVAR_USED;
25064 }
25065 break;
25066 case NODE_DASGN:
25067 if (dvar_defined_ref(p, RNODE_DASGN(rhs)->nd_vid, &vidp)) {
25068 if (vidp) *vidp |= LVAR_USED;
25069 }
25070 break;
25071#if 0
25072 case NODE_MASGN:
25073 for (rhs = rhs->nd_head; rhs; rhs = rhs->nd_next) {
25074 mark_lvar_used(p, rhs->nd_head);
25075 }
25076 break;
25077#endif
25078 }
25079}
25080
25081static int is_static_content(NODE *node);
25082
25083static NODE *
25084node_assign(struct parser_params *p, NODE *lhs, NODE *rhs, struct lex_context ctxt, const YYLTYPE *loc)
25085{
25086 if (!lhs) return 0;
25087
25088 switch (nd_type(lhs)) {
25089 case NODE_CDECL:
25090 case NODE_GASGN:
25091 case NODE_IASGN:
25092 case NODE_LASGN:
25093 case NODE_DASGN:
25094 case NODE_MASGN:
25095 case NODE_CVASGN:
25096 set_nd_value(p, lhs, rhs);
25097 nd_set_loc(lhs, loc);
25098 break;
25099
25100 case NODE_ATTRASGN:
25101 RNODE_ATTRASGN(lhs)->nd_args = arg_append(p, RNODE_ATTRASGN(lhs)->nd_args, rhs, loc);
25102 nd_set_loc(lhs, loc);
25103 break;
25104
25105 default:
25106 /* should not happen */
25107 break;
25108 }
25109
25110 return lhs;
25111}
25112
25113static NODE *
25114value_expr_check(struct parser_params *p, NODE *node)
25115{
25116 NODE *void_node = 0, *vn;
25117
25118 if (!node) {
25119 rb_warning0("empty expression");
25120 }
25121 while (node) {
25122 switch (nd_type(node)) {
25123 case NODE_ENSURE:
25124 vn = RNODE_ENSURE(node)->nd_head;
25125 node = RNODE_ENSURE(node)->nd_ensr;
25126 /* nd_ensr should not be NULL, check it out next */
25127 if (vn && (vn = value_expr_check(p, vn))) {
25128 goto found;
25129 }
25130 break;
25131
25132 case NODE_RESCUE:
25133 /* void only if all children are void */
25134 vn = RNODE_RESCUE(node)->nd_head;
25135 if (!vn || !(vn = value_expr_check(p, vn))) return NULL;
25136 if (!void_node) void_node = vn;
25137 for (NODE *r = RNODE_RESCUE(node)->nd_resq; r; r = RNODE_RESBODY(r)->nd_next) {
25138 if (!nd_type_p(r, NODE_RESBODY)) {
25139 compile_error(p, "unexpected node");
25140 return NULL;
25141 }
25142 if (!(vn = value_expr_check(p, RNODE_RESBODY(r)->nd_body))) {
25143 void_node = 0;
25144 break;
25145 }
25146 if (!void_node) void_node = vn;
25147 }
25148 node = RNODE_RESCUE(node)->nd_else;
25149 if (!node) return void_node;
25150 break;
25151
25152 case NODE_RETURN:
25153 case NODE_BREAK:
25154 case NODE_NEXT:
25155 case NODE_REDO:
25156 case NODE_RETRY:
25157 goto found;
25158
25159 case NODE_CASE3:
25160 if (!RNODE_CASE3(node)->nd_body || !nd_type_p(RNODE_CASE3(node)->nd_body, NODE_IN)) {
25161 compile_error(p, "unexpected node");
25162 return NULL;
25163 }
25164 if (RNODE_IN(RNODE_CASE3(node)->nd_body)->nd_body) {
25165 return NULL;
25166 }
25167 /* single line pattern matching with "=>" operator */
25168 goto found;
25169
25170 case NODE_BLOCK:
25171 while (RNODE_BLOCK(node)->nd_next) {
25172 node = RNODE_BLOCK(node)->nd_next;
25173 }
25174 node = RNODE_BLOCK(node)->nd_head;
25175 break;
25176
25177 case NODE_BEGIN:
25178 node = RNODE_BEGIN(node)->nd_body;
25179 break;
25180
25181 case NODE_IF:
25182 case NODE_UNLESS:
25183 if (!RNODE_IF(node)->nd_body) {
25184 return NULL;
25185 }
25186 else if (!RNODE_IF(node)->nd_else) {
25187 return NULL;
25188 }
25189 vn = value_expr_check(p, RNODE_IF(node)->nd_body);
25190 if (!vn) return NULL;
25191 if (!void_node) void_node = vn;
25192 node = RNODE_IF(node)->nd_else;
25193 break;
25194
25195 case NODE_AND:
25196 case NODE_OR:
25197 node = RNODE_AND(node)->nd_1st;
25198 break;
25199
25200 case NODE_LASGN:
25201 case NODE_DASGN:
25202 case NODE_MASGN:
25203 mark_lvar_used(p, node);
25204 return NULL;
25205
25206 default:
25207 return NULL;
25208 }
25209 }
25210
25211 return NULL;
25212
25213 found:
25214 /* return the first found node */
25215 return void_node ? void_node : node;
25216}
25217
25218static int
25219value_expr_gen(struct parser_params *p, NODE *node)
25220{
25221 NODE *void_node = value_expr_check(p, node);
25222 if (void_node) {
25223 yyerror1(&void_node->nd_loc, "void value expression");
25224 /* or "control never reach"? */
25225 return FALSE;
25226 }
25227 return TRUE;
25228}
25229
25230static void
25231void_expr(struct parser_params *p, NODE *node)
25232{
25233 const char *useless = 0;
25234
25235 if (!RTEST(ruby_verbose)) return;
25236
25237 if (!node || !(node = nd_once_body(node))) return;
25238 switch (nd_type(node)) {
25239 case NODE_OPCALL:
25240 switch (RNODE_OPCALL(node)->nd_mid) {
25241 case '+':
25242 case '-':
25243 case '*':
25244 case '/':
25245 case '%':
25246 case tPOW:
25247 case tUPLUS:
25248 case tUMINUS:
25249 case '|':
25250 case '^':
25251 case '&':
25252 case tCMP:
25253 case '>':
25254 case tGEQ:
25255 case '<':
25256 case tLEQ:
25257 case tEQ:
25258 case tNEQ:
25259 useless = rb_id2name(RNODE_OPCALL(node)->nd_mid);
25260 break;
25261 }
25262 break;
25263
25264 case NODE_LVAR:
25265 case NODE_DVAR:
25266 case NODE_GVAR:
25267 case NODE_IVAR:
25268 case NODE_CVAR:
25269 case NODE_NTH_REF:
25270 case NODE_BACK_REF:
25271 useless = "a variable";
25272 break;
25273 case NODE_CONST:
25274 useless = "a constant";
25275 break;
25276 case NODE_SYM:
25277 case NODE_LINE:
25278 case NODE_FILE:
25279 case NODE_ENCODING:
25280 case NODE_INTEGER:
25281 case NODE_FLOAT:
25282 case NODE_RATIONAL:
25283 case NODE_IMAGINARY:
25284 case NODE_STR:
25285 case NODE_DSTR:
25286 case NODE_REGX:
25287 case NODE_DREGX:
25288 useless = "a literal";
25289 break;
25290 case NODE_COLON2:
25291 case NODE_COLON3:
25292 useless = "::";
25293 break;
25294 case NODE_DOT2:
25295 useless = "..";
25296 break;
25297 case NODE_DOT3:
25298 useless = "...";
25299 break;
25300 case NODE_SELF:
25301 useless = "self";
25302 break;
25303 case NODE_NIL:
25304 useless = "nil";
25305 break;
25306 case NODE_TRUE:
25307 useless = "true";
25308 break;
25309 case NODE_FALSE:
25310 useless = "false";
25311 break;
25312 case NODE_DEFINED:
25313 useless = "defined?";
25314 break;
25315 }
25316
25317 if (useless) {
25318 rb_warn1L(nd_line(node), "possibly useless use of %s in void context", WARN_S(useless));
25319 }
25320}
25321
25322/* warns useless use of block and returns the last statement node */
25323static NODE *
25324void_stmts(struct parser_params *p, NODE *node)
25325{
25326 NODE *const n = node;
25327 if (!RTEST(ruby_verbose)) return n;
25328 if (!node) return n;
25329 if (!nd_type_p(node, NODE_BLOCK)) return n;
25330
25331 while (RNODE_BLOCK(node)->nd_next) {
25332 void_expr(p, RNODE_BLOCK(node)->nd_head);
25333 node = RNODE_BLOCK(node)->nd_next;
25334 }
25335 return RNODE_BLOCK(node)->nd_head;
25336}
25337
25338static NODE *
25339remove_begin(NODE *node)
25340{
25341 NODE **n = &node, *n1 = node;
25342 while (n1 && nd_type_p(n1, NODE_BEGIN) && RNODE_BEGIN(n1)->nd_body) {
25343 *n = n1 = RNODE_BEGIN(n1)->nd_body;
25344 }
25345 return node;
25346}
25347
25348static void
25349reduce_nodes(struct parser_params *p, NODE **body)
25350{
25351 NODE *node = *body;
25352
25353 if (!node) {
25354 *body = NEW_NIL(&NULL_LOC);
25355 return;
25356 }
25357#define subnodes(type, n1, n2) \
25358 ((!type(node)->n1) ? (type(node)->n2 ? (body = &type(node)->n2, 1) : 0) : \
25359 (!type(node)->n2) ? (body = &type(node)->n1, 1) : \
25360 (reduce_nodes(p, &type(node)->n1), body = &type(node)->n2, 1))
25361
25362 while (node) {
25363 int newline = (int)nd_fl_newline(node);
25364 switch (nd_type(node)) {
25365 end:
25366 case NODE_NIL:
25367 *body = 0;
25368 return;
25369 case NODE_BEGIN:
25370 *body = node = RNODE_BEGIN(node)->nd_body;
25371 if (newline && node) nd_set_fl_newline(node);
25372 continue;
25373 case NODE_BLOCK:
25374 body = &RNODE_BLOCK(RNODE_BLOCK(node)->nd_end)->nd_head;
25375 break;
25376 case NODE_IF:
25377 case NODE_UNLESS:
25378 if (subnodes(RNODE_IF, nd_body, nd_else)) break;
25379 return;
25380 case NODE_CASE:
25381 body = &RNODE_CASE(node)->nd_body;
25382 break;
25383 case NODE_WHEN:
25384 if (!subnodes(RNODE_WHEN, nd_body, nd_next)) goto end;
25385 break;
25386 case NODE_ENSURE:
25387 body = &RNODE_ENSURE(node)->nd_head;
25388 break;
25389 case NODE_RESCUE:
25390 newline = 0; // RESBODY should not be a NEWLINE
25391 if (RNODE_RESCUE(node)->nd_else) {
25392 body = &RNODE_RESCUE(node)->nd_resq;
25393 break;
25394 }
25395 if (!subnodes(RNODE_RESCUE, nd_head, nd_resq)) goto end;
25396 break;
25397 default:
25398 return;
25399 }
25400 node = *body;
25401 if (newline && node) nd_set_fl_newline(node);
25402 }
25403
25404#undef subnodes
25405}
25406
25407static int
25408is_static_content(NODE *node)
25409{
25410 if (!node) return 1;
25411 switch (nd_type(node)) {
25412 case NODE_HASH:
25413 if (!(node = RNODE_HASH(node)->nd_head)) break;
25414 case NODE_LIST:
25415 do {
25416 if (!is_static_content(RNODE_LIST(node)->nd_head)) return 0;
25417 } while ((node = RNODE_LIST(node)->nd_next) != 0);
25418 case NODE_SYM:
25419 case NODE_REGX:
25420 case NODE_LINE:
25421 case NODE_FILE:
25422 case NODE_ENCODING:
25423 case NODE_INTEGER:
25424 case NODE_FLOAT:
25425 case NODE_RATIONAL:
25426 case NODE_IMAGINARY:
25427 case NODE_STR:
25428 case NODE_NIL:
25429 case NODE_TRUE:
25430 case NODE_FALSE:
25431 case NODE_ZLIST:
25432 break;
25433 default:
25434 return 0;
25435 }
25436 return 1;
25437}
25438
25439static int
25440assign_in_cond(struct parser_params *p, NODE *node)
25441{
25442 switch (nd_type(node)) {
25443 case NODE_MASGN:
25444 case NODE_LASGN:
25445 case NODE_DASGN:
25446 case NODE_GASGN:
25447 case NODE_IASGN:
25448 case NODE_CVASGN:
25449 case NODE_CDECL:
25450 break;
25451
25452 default:
25453 return 0;
25454 }
25455
25456 if (!get_nd_value(p, node)) return 1;
25457 if (is_static_content(get_nd_value(p, node))) {
25458 /* reports always */
25459 rb_warn0L(nd_line(get_nd_value(p, node)), "found '= literal' in conditional, should be ==");
25460 }
25461 return 1;
25462}
25463
25464enum cond_type {
25465 COND_IN_OP,
25466 COND_IN_COND,
25467 COND_IN_FF
25468};
25469
25470#define SWITCH_BY_COND_TYPE(t, w, arg) do { \
25471 switch (t) { \
25472 case COND_IN_OP: break; \
25473 case COND_IN_COND: rb_##w##0(arg "literal in condition"); break; \
25474 case COND_IN_FF: rb_##w##0(arg "literal in flip-flop"); break; \
25475 } \
25476} while (0)
25477
25478static NODE *cond0(struct parser_params*,NODE*,enum cond_type,const YYLTYPE*,bool);
25479
25480static NODE*
25481range_op(struct parser_params *p, NODE *node, const YYLTYPE *loc)
25482{
25483 enum node_type type;
25484
25485 if (node == 0) return 0;
25486
25487 type = nd_type(node);
25488 value_expr(node);
25489 if (type == NODE_INTEGER) {
25490 if (!e_option_supplied(p)) rb_warn0L(nd_line(node), "integer literal in flip-flop");
25491 ID lineno = rb_intern("$.");
25492 return NEW_CALL(node, tEQ, NEW_LIST(NEW_GVAR(lineno, loc), loc), loc);
25493 }
25494 return cond0(p, node, COND_IN_FF, loc, true);
25495}
25496
25497static NODE*
25498cond0(struct parser_params *p, NODE *node, enum cond_type type, const YYLTYPE *loc, bool top)
25499{
25500 if (node == 0) return 0;
25501 if (!(node = nd_once_body(node))) return 0;
25502 assign_in_cond(p, node);
25503
25504 switch (nd_type(node)) {
25505 case NODE_BEGIN:
25506 RNODE_BEGIN(node)->nd_body = cond0(p, RNODE_BEGIN(node)->nd_body, type, loc, top);
25507 break;
25508
25509 case NODE_DSTR:
25510 case NODE_EVSTR:
25511 case NODE_STR:
25512 case NODE_FILE:
25513 SWITCH_BY_COND_TYPE(type, warn, "string ");
25514 break;
25515
25516 case NODE_REGX:
25517 if (!e_option_supplied(p)) SWITCH_BY_COND_TYPE(type, warn, "regex ");
25518 nd_set_type(node, NODE_MATCH);
25519 break;
25520
25521 case NODE_DREGX:
25522 if (!e_option_supplied(p)) SWITCH_BY_COND_TYPE(type, warning, "regex ");
25523
25524 return NEW_MATCH2(node, NEW_GVAR(idLASTLINE, loc), loc);
25525
25526 case NODE_BLOCK:
25527 {
25528 NODE *end = RNODE_BLOCK(node)->nd_end;
25529 NODE **expr = &RNODE_BLOCK(end)->nd_head;
25530 if (top) top = node == end;
25531 *expr = cond0(p, *expr, type, loc, top);
25532 }
25533 break;
25534
25535 case NODE_AND:
25536 case NODE_OR:
25537 RNODE_AND(node)->nd_1st = cond0(p, RNODE_AND(node)->nd_1st, COND_IN_COND, loc, true);
25538 RNODE_AND(node)->nd_2nd = cond0(p, RNODE_AND(node)->nd_2nd, COND_IN_COND, loc, true);
25539 break;
25540
25541 case NODE_DOT2:
25542 case NODE_DOT3:
25543 if (!top) break;
25544 RNODE_DOT2(node)->nd_beg = range_op(p, RNODE_DOT2(node)->nd_beg, loc);
25545 RNODE_DOT2(node)->nd_end = range_op(p, RNODE_DOT2(node)->nd_end, loc);
25546 switch (nd_type(node)) {
25547 case NODE_DOT2:
25548 nd_set_type(node,NODE_FLIP2);
25549 rb_node_flip2_t *flip2 = RNODE_FLIP2(node); /* for debug info */
25550 (void)flip2;
25551 break;
25552 case NODE_DOT3:
25553 nd_set_type(node, NODE_FLIP3);
25554 rb_node_flip3_t *flip3 = RNODE_FLIP3(node); /* for debug info */
25555 (void)flip3;
25556 break;
25557 }
25558 break;
25559
25560 case NODE_SYM:
25561 case NODE_DSYM:
25562 SWITCH_BY_COND_TYPE(type, warning, "symbol ");
25563 break;
25564
25565 case NODE_LINE:
25566 case NODE_ENCODING:
25567 case NODE_INTEGER:
25568 case NODE_FLOAT:
25569 case NODE_RATIONAL:
25570 case NODE_IMAGINARY:
25571 SWITCH_BY_COND_TYPE(type, warning, "");
25572 break;
25573
25574 default:
25575 break;
25576 }
25577 return node;
25578}
25579
25580static NODE*
25581cond(struct parser_params *p, NODE *node, const YYLTYPE *loc)
25582{
25583 if (node == 0) return 0;
25584 return cond0(p, node, COND_IN_COND, loc, true);
25585}
25586
25587static NODE*
25588method_cond(struct parser_params *p, NODE *node, const YYLTYPE *loc)
25589{
25590 if (node == 0) return 0;
25591 return cond0(p, node, COND_IN_OP, loc, true);
25592}
25593
25594static NODE*
25595new_nil_at(struct parser_params *p, const rb_code_position_t *pos)
25596{
25597 YYLTYPE loc = {*pos, *pos};
25598 return NEW_NIL(&loc);
25599}
25600
25601static NODE*
25602new_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)
25603{
25604 if (!cc) return right;
25605 cc = cond0(p, cc, COND_IN_COND, loc, true);
25606 return newline_node(NEW_IF(cc, left, right, loc, if_keyword_loc, then_keyword_loc, end_keyword_loc));
25607}
25608
25609static NODE*
25610new_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)
25611{
25612 if (!cc) return right;
25613 cc = cond0(p, cc, COND_IN_COND, loc, true);
25614 return newline_node(NEW_UNLESS(cc, left, right, loc, keyword_loc, then_keyword_loc, end_keyword_loc));
25615}
25616
25617#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))
25618
25619static NODE*
25620logop(struct parser_params *p, ID id, NODE *left, NODE *right,
25621 const YYLTYPE *op_loc, const YYLTYPE *loc)
25622{
25623 enum node_type type = id == idAND || id == idANDOP ? NODE_AND : NODE_OR;
25624 NODE *op;
25625 value_expr(left);
25626 if (left && nd_type_p(left, type)) {
25627 NODE *node = left, *second;
25628 while ((second = RNODE_AND(node)->nd_2nd) != 0 && nd_type_p(second, type)) {
25629 node = second;
25630 }
25631 RNODE_AND(node)->nd_2nd = NEW_AND_OR(type, second, right, loc, op_loc);
25632 nd_set_line(RNODE_AND(node)->nd_2nd, op_loc->beg_pos.lineno);
25633 left->nd_loc.end_pos = loc->end_pos;
25634 return left;
25635 }
25636 op = NEW_AND_OR(type, left, right, loc, op_loc);
25637 nd_set_line(op, op_loc->beg_pos.lineno);
25638 return op;
25639}
25640
25641#undef NEW_AND_OR
25642
25643static void
25644no_blockarg(struct parser_params *p, NODE *node)
25645{
25646 if (nd_type_p(node, NODE_BLOCK_PASS)) {
25647 compile_error(p, "block argument should not be given");
25648 }
25649}
25650
25651static NODE *
25652ret_args(struct parser_params *p, NODE *node)
25653{
25654 if (node) {
25655 no_blockarg(p, node);
25656 if (nd_type_p(node, NODE_LIST) && !RNODE_LIST(node)->nd_next) {
25657 node = RNODE_LIST(node)->nd_head;
25658 }
25659 }
25660 return node;
25661}
25662
25663static NODE*
25664negate_lit(struct parser_params *p, NODE* node)
25665{
25666 switch (nd_type(node)) {
25667 case NODE_INTEGER:
25668 RNODE_INTEGER(node)->minus = TRUE;
25669 break;
25670 case NODE_FLOAT:
25671 RNODE_FLOAT(node)->minus = TRUE;
25672 break;
25673 case NODE_RATIONAL:
25674 RNODE_RATIONAL(node)->minus = TRUE;
25675 break;
25676 case NODE_IMAGINARY:
25677 RNODE_IMAGINARY(node)->minus = TRUE;
25678 break;
25679 }
25680 return node;
25681}
25682
25683static NODE *
25684arg_blk_pass(NODE *node1, rb_node_block_pass_t *node2)
25685{
25686 if (node2) {
25687 if (!node1) return (NODE *)node2;
25688 node2->nd_head = node1;
25689 nd_set_first_lineno(node2, nd_first_lineno(node1));
25690 nd_set_first_column(node2, nd_first_column(node1));
25691 return (NODE *)node2;
25692 }
25693 return node1;
25694}
25695
25696static bool
25697args_info_empty_p(struct rb_args_info *args)
25698{
25699 if (args->pre_args_num) return false;
25700 if (args->post_args_num) return false;
25701 if (args->rest_arg) return false;
25702 if (args->opt_args) return false;
25703 if (args->block_arg) return false;
25704 if (args->kw_args) return false;
25705 if (args->kw_rest_arg) return false;
25706 return true;
25707}
25708
25709static rb_node_args_t *
25710new_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)
25711{
25712 struct rb_args_info *args = &tail->nd_ainfo;
25713
25714 if (args->forwarding) {
25715 if (rest_arg) {
25716 yyerror1(&RNODE(tail)->nd_loc, "... after rest argument");
25717 return tail;
25718 }
25719 rest_arg = idFWD_REST;
25720 }
25721
25722 args->pre_args_num = pre_args ? pre_args->nd_plen : 0;
25723 args->pre_init = pre_args ? pre_args->nd_next : 0;
25724
25725 args->post_args_num = post_args ? post_args->nd_plen : 0;
25726 args->post_init = post_args ? post_args->nd_next : 0;
25727 args->first_post_arg = post_args ? post_args->nd_pid : 0;
25728
25729 args->rest_arg = rest_arg;
25730
25731 args->opt_args = opt_args;
25732
25733#ifdef FORWARD_ARGS_WITH_RUBY2_KEYWORDS
25734 args->ruby2_keywords = args->forwarding;
25735#else
25736 args->ruby2_keywords = 0;
25737#endif
25738
25739 nd_set_loc(RNODE(tail), loc);
25740
25741 return tail;
25742}
25743
25744static rb_node_args_t *
25745new_args_tail(struct parser_params *p, rb_node_kw_arg_t *kw_args, ID kw_rest_arg, ID block, const YYLTYPE *kw_rest_loc)
25746{
25747 rb_node_args_t *node = NEW_ARGS(&NULL_LOC);
25748 struct rb_args_info *args = &node->nd_ainfo;
25749 if (p->error_p) return node;
25750
25751 args->block_arg = block;
25752 args->kw_args = kw_args;
25753
25754 if (kw_args) {
25755 /*
25756 * def foo(k1: 1, kr1:, k2: 2, **krest, &b)
25757 * variable order: k1, kr1, k2, &b, internal_id, krest
25758 * #=> <reorder>
25759 * variable order: kr1, k1, k2, internal_id, krest, &b
25760 */
25761 ID kw_bits = internal_id(p), *required_kw_vars, *kw_vars;
25762 struct vtable *vtargs = p->lvtbl->args;
25763 rb_node_kw_arg_t *kwn = kw_args;
25764
25765 if (block) block = vtargs->tbl[vtargs->pos-1];
25766 vtable_pop(vtargs, !!block + !!kw_rest_arg);
25767 required_kw_vars = kw_vars = &vtargs->tbl[vtargs->pos];
25768 while (kwn) {
25769 if (!NODE_REQUIRED_KEYWORD_P(get_nd_value(p, kwn->nd_body)))
25770 --kw_vars;
25771 --required_kw_vars;
25772 kwn = kwn->nd_next;
25773 }
25774
25775 for (kwn = kw_args; kwn; kwn = kwn->nd_next) {
25776 ID vid = get_nd_vid(p, kwn->nd_body);
25777 if (NODE_REQUIRED_KEYWORD_P(get_nd_value(p, kwn->nd_body))) {
25778 *required_kw_vars++ = vid;
25779 }
25780 else {
25781 *kw_vars++ = vid;
25782 }
25783 }
25784
25785 arg_var(p, kw_bits);
25786 if (kw_rest_arg) arg_var(p, kw_rest_arg);
25787 if (block) arg_var(p, block);
25788
25789 args->kw_rest_arg = NEW_DVAR(kw_rest_arg, kw_rest_loc);
25790 }
25791 else if (kw_rest_arg == idNil) {
25792 args->no_kwarg = 1;
25793 }
25794 else if (kw_rest_arg) {
25795 args->kw_rest_arg = NEW_DVAR(kw_rest_arg, kw_rest_loc);
25796 }
25797
25798 return node;
25799}
25800
25801static rb_node_args_t *
25802args_with_numbered(struct parser_params *p, rb_node_args_t *args, int max_numparam, ID it_id)
25803{
25804 if (max_numparam > NO_PARAM || it_id) {
25805 if (!args) {
25806 YYLTYPE loc = RUBY_INIT_YYLLOC();
25807 args = new_args_tail(p, 0, 0, 0, 0);
25808 nd_set_loc(RNODE(args), &loc);
25809 }
25810 args->nd_ainfo.pre_args_num = it_id ? 1 : max_numparam;
25811 }
25812 return args;
25813}
25814
25815static NODE*
25816new_array_pattern(struct parser_params *p, NODE *constant, NODE *pre_arg, NODE *aryptn, const YYLTYPE *loc)
25817{
25818 RNODE_ARYPTN(aryptn)->nd_pconst = constant;
25819
25820 if (pre_arg) {
25821 NODE *pre_args = NEW_LIST(pre_arg, loc);
25822 if (RNODE_ARYPTN(aryptn)->pre_args) {
25823 RNODE_ARYPTN(aryptn)->pre_args = list_concat(pre_args, RNODE_ARYPTN(aryptn)->pre_args);
25824 }
25825 else {
25826 RNODE_ARYPTN(aryptn)->pre_args = pre_args;
25827 }
25828 }
25829 return aryptn;
25830}
25831
25832static NODE*
25833new_array_pattern_tail(struct parser_params *p, NODE *pre_args, int has_rest, NODE *rest_arg, NODE *post_args, const YYLTYPE *loc)
25834{
25835 if (has_rest) {
25836 rest_arg = rest_arg ? rest_arg : NODE_SPECIAL_NO_NAME_REST;
25837 }
25838 else {
25839 rest_arg = NULL;
25840 }
25841 NODE *node = NEW_ARYPTN(pre_args, rest_arg, post_args, loc);
25842
25843 return node;
25844}
25845
25846static NODE*
25847new_find_pattern(struct parser_params *p, NODE *constant, NODE *fndptn, const YYLTYPE *loc)
25848{
25849 RNODE_FNDPTN(fndptn)->nd_pconst = constant;
25850
25851 return fndptn;
25852}
25853
25854static NODE*
25855new_find_pattern_tail(struct parser_params *p, NODE *pre_rest_arg, NODE *args, NODE *post_rest_arg, const YYLTYPE *loc)
25856{
25857 pre_rest_arg = pre_rest_arg ? pre_rest_arg : NODE_SPECIAL_NO_NAME_REST;
25858 post_rest_arg = post_rest_arg ? post_rest_arg : NODE_SPECIAL_NO_NAME_REST;
25859 NODE *node = NEW_FNDPTN(pre_rest_arg, args, post_rest_arg, loc);
25860
25861 return node;
25862}
25863
25864static NODE*
25865new_hash_pattern(struct parser_params *p, NODE *constant, NODE *hshptn, const YYLTYPE *loc)
25866{
25867 RNODE_HSHPTN(hshptn)->nd_pconst = constant;
25868 return hshptn;
25869}
25870
25871static NODE*
25872new_hash_pattern_tail(struct parser_params *p, NODE *kw_args, ID kw_rest_arg, const YYLTYPE *loc)
25873{
25874 NODE *node, *kw_rest_arg_node;
25875
25876 if (kw_rest_arg == idNil) {
25877 kw_rest_arg_node = NODE_SPECIAL_NO_REST_KEYWORD;
25878 }
25879 else if (kw_rest_arg) {
25880 kw_rest_arg_node = assignable(p, kw_rest_arg, 0, loc);
25881 }
25882 else {
25883 kw_rest_arg_node = NULL;
25884 }
25885
25886 node = NEW_HSHPTN(0, kw_args, kw_rest_arg_node, loc);
25887
25888 return node;
25889}
25890
25891static NODE*
25892dsym_node(struct parser_params *p, NODE *node, const YYLTYPE *loc)
25893{
25894 if (!node) {
25895 return NEW_SYM(STR_NEW0(), loc);
25896 }
25897
25898 switch (nd_type(node)) {
25899 case NODE_DSTR:
25900 nd_set_type(node, NODE_DSYM);
25901 nd_set_loc(node, loc);
25902 break;
25903 case NODE_STR:
25904 node = str_to_sym_node(p, node, loc);
25905 break;
25906 default:
25907 node = NEW_DSYM(0, 1, NEW_LIST(node, loc), loc);
25908 break;
25909 }
25910 return node;
25911}
25912
25913static int
25914nd_type_st_key_enable_p(NODE *node)
25915{
25916 switch (nd_type(node)) {
25917 case NODE_INTEGER:
25918 case NODE_FLOAT:
25919 case NODE_RATIONAL:
25920 case NODE_IMAGINARY:
25921 case NODE_STR:
25922 case NODE_SYM:
25923 case NODE_REGX:
25924 case NODE_LINE:
25925 case NODE_FILE:
25926 case NODE_ENCODING:
25927 return true;
25928 default:
25929 return false;
25930 }
25931}
25932
25933static VALUE
25934nd_value(struct parser_params *p, NODE *node)
25935{
25936 switch (nd_type(node)) {
25937 case NODE_STR:
25938 return rb_node_str_string_val(node);
25939 case NODE_INTEGER:
25940 return rb_node_integer_literal_val(node);
25941 case NODE_FLOAT:
25942 return rb_node_float_literal_val(node);
25943 case NODE_RATIONAL:
25944 return rb_node_rational_literal_val(node);
25945 case NODE_IMAGINARY:
25946 return rb_node_imaginary_literal_val(node);
25947 case NODE_SYM:
25948 return rb_node_sym_string_val(node);
25949 case NODE_REGX:
25950 return rb_node_regx_string_val(node);
25951 case NODE_LINE:
25952 return rb_node_line_lineno_val(node);
25953 case NODE_ENCODING:
25954 return rb_node_encoding_val(node);
25955 case NODE_FILE:
25956 return rb_node_file_path_val(node);
25957 default:
25958 rb_bug("unexpected node: %s", ruby_node_name(nd_type(node)));
25960 }
25961}
25962
25963static void
25964warn_duplicate_keys(struct parser_params *p, NODE *hash)
25965{
25966 /* See https://bugs.ruby-lang.org/issues/20331 for discussion about what is warned. */
25967 p->warn_duplicate_keys_table = st_init_table_with_size(&literal_type, RNODE_LIST(hash)->as.nd_alen / 2);
25968 while (hash && RNODE_LIST(hash)->nd_next) {
25969 NODE *head = RNODE_LIST(hash)->nd_head;
25970 NODE *value = RNODE_LIST(hash)->nd_next;
25971 NODE *next = RNODE_LIST(value)->nd_next;
25972 st_data_t key;
25973 st_data_t data;
25974
25975 /* keyword splat, e.g. {k: 1, **z, k: 2} */
25976 if (!head) {
25977 head = value;
25978 }
25979
25980 if (nd_type_st_key_enable_p(head)) {
25981 key = (st_data_t)head;
25982
25983 if (st_delete(p->warn_duplicate_keys_table, &key, &data)) {
25984 rb_warn2L(nd_line((NODE *)data),
25985 "key %+"PRIsWARN" is duplicated and overwritten on line %d",
25986 nd_value(p, head), WARN_I(nd_line(head)));
25987 }
25988 st_insert(p->warn_duplicate_keys_table, (st_data_t)key, (st_data_t)hash);
25989 }
25990 hash = next;
25991 }
25992 st_free_table(p->warn_duplicate_keys_table);
25993 p->warn_duplicate_keys_table = NULL;
25994}
25995
25996static NODE *
25997new_hash(struct parser_params *p, NODE *hash, const YYLTYPE *loc)
25998{
25999 if (hash) warn_duplicate_keys(p, hash);
26000 return NEW_HASH(hash, loc);
26001}
26002
26003static void
26004error_duplicate_pattern_variable(struct parser_params *p, ID id, const YYLTYPE *loc)
26005{
26006 if (is_private_local_id(p, id)) {
26007 return;
26008 }
26009 if (st_is_member(p->pvtbl, id)) {
26010 yyerror1(loc, "duplicated variable name");
26011 }
26012 else {
26013 st_insert(p->pvtbl, (st_data_t)id, 0);
26014 }
26015}
26016
26017static void
26018error_duplicate_pattern_key(struct parser_params *p, VALUE key, const YYLTYPE *loc)
26019{
26020 if (!p->pktbl) {
26021 p->pktbl = st_init_numtable();
26022 }
26023 else if (st_is_member(p->pktbl, key)) {
26024 yyerror1(loc, "duplicated key name");
26025 return;
26026 }
26027 st_insert(p->pktbl, (st_data_t)key, 0);
26028}
26029
26030static NODE *
26031new_unique_key_hash(struct parser_params *p, NODE *hash, const YYLTYPE *loc)
26032{
26033 return NEW_HASH(hash, loc);
26034}
26035
26036static NODE *
26037new_op_assign(struct parser_params *p, NODE *lhs, ID op, NODE *rhs, struct lex_context ctxt, const YYLTYPE *loc)
26038{
26039 NODE *asgn;
26040
26041 if (lhs) {
26042 ID vid = get_nd_vid(p, lhs);
26043 YYLTYPE lhs_loc = lhs->nd_loc;
26044 if (op == tOROP) {
26045 set_nd_value(p, lhs, rhs);
26046 nd_set_loc(lhs, loc);
26047 asgn = NEW_OP_ASGN_OR(gettable(p, vid, &lhs_loc), lhs, loc);
26048 }
26049 else if (op == tANDOP) {
26050 set_nd_value(p, lhs, rhs);
26051 nd_set_loc(lhs, loc);
26052 asgn = NEW_OP_ASGN_AND(gettable(p, vid, &lhs_loc), lhs, loc);
26053 }
26054 else {
26055 asgn = lhs;
26056 rhs = NEW_CALL(gettable(p, vid, &lhs_loc), op, NEW_LIST(rhs, &rhs->nd_loc), loc);
26057 set_nd_value(p, asgn, rhs);
26058 nd_set_loc(asgn, loc);
26059 }
26060 }
26061 else {
26062 asgn = NEW_ERROR(loc);
26063 }
26064 return asgn;
26065}
26066
26067static NODE *
26068new_ary_op_assign(struct parser_params *p, NODE *ary,
26069 NODE *args, ID op, NODE *rhs, const YYLTYPE *args_loc, const YYLTYPE *loc,
26070 const YYLTYPE *call_operator_loc, const YYLTYPE *opening_loc, const YYLTYPE *closing_loc, const YYLTYPE *binary_operator_loc)
26071{
26072 NODE *asgn;
26073
26074 aryset_check(p, args);
26075 args = make_list(args, args_loc);
26076 asgn = NEW_OP_ASGN1(ary, op, args, rhs, loc, call_operator_loc, opening_loc, closing_loc, binary_operator_loc);
26077 fixpos(asgn, ary);
26078 return asgn;
26079}
26080
26081static NODE *
26082new_attr_op_assign(struct parser_params *p, NODE *lhs,
26083 ID atype, ID attr, ID op, NODE *rhs, const YYLTYPE *loc,
26084 const YYLTYPE *call_operator_loc, const YYLTYPE *message_loc, const YYLTYPE *binary_operator_loc)
26085{
26086 NODE *asgn;
26087
26088 asgn = NEW_OP_ASGN2(lhs, CALL_Q_P(atype), attr, op, rhs, loc, call_operator_loc, message_loc, binary_operator_loc);
26089 fixpos(asgn, lhs);
26090 return asgn;
26091}
26092
26093static NODE *
26094new_const_op_assign(struct parser_params *p, NODE *lhs, ID op, NODE *rhs, struct lex_context ctxt, const YYLTYPE *loc)
26095{
26096 NODE *asgn;
26097
26098 if (lhs) {
26099 asgn = NEW_OP_CDECL(lhs, op, rhs, ctxt.shareable_constant_value, loc);
26100 }
26101 else {
26102 asgn = NEW_ERROR(loc);
26103 }
26104 fixpos(asgn, lhs);
26105 return asgn;
26106}
26107
26108static NODE *
26109const_decl(struct parser_params *p, NODE *path, const YYLTYPE *loc)
26110{
26111 if (p->ctxt.in_def) {
26112#ifndef RIPPER
26113 yyerror1(loc, "dynamic constant assignment");
26114#else
26115 set_value(assign_error(p, "dynamic constant assignment", p->s_lvalue));
26116#endif
26117 }
26118 return NEW_CDECL(0, 0, (path), p->ctxt.shareable_constant_value, loc);
26119}
26120
26121#ifdef RIPPER
26122static VALUE
26123assign_error(struct parser_params *p, const char *mesg, VALUE a)
26124{
26125 a = dispatch2(assign_error, ERR_MESG(), a);
26126 ripper_error(p);
26127 return a;
26128}
26129#endif
26130
26131static NODE *
26132new_bodystmt(struct parser_params *p, NODE *head, NODE *rescue, NODE *rescue_else, NODE *ensure, const YYLTYPE *loc)
26133{
26134 NODE *result = head;
26135 if (rescue) {
26136 NODE *tmp = rescue_else ? rescue_else : rescue;
26137 YYLTYPE rescue_loc = code_loc_gen(&head->nd_loc, &tmp->nd_loc);
26138
26139 result = NEW_RESCUE(head, rescue, rescue_else, &rescue_loc);
26140 nd_set_line(result, rescue->nd_loc.beg_pos.lineno);
26141 }
26142 if (ensure) {
26143 result = NEW_ENSURE(result, ensure, loc);
26144 }
26145 fixpos(result, head);
26146 return result;
26147}
26148
26149static void
26150warn_unused_var(struct parser_params *p, struct local_vars *local)
26151{
26152 int cnt;
26153
26154 if (!local->used) return;
26155 cnt = local->used->pos;
26156 if (cnt != local->vars->pos) {
26157 rb_parser_fatal(p, "local->used->pos != local->vars->pos");
26158 }
26159#ifndef RIPPER
26160 ID *v = local->vars->tbl;
26161 ID *u = local->used->tbl;
26162 for (int i = 0; i < cnt; ++i) {
26163 if (!v[i] || (u[i] & LVAR_USED)) continue;
26164 if (is_private_local_id(p, v[i])) continue;
26165 rb_warn1L((int)u[i], "assigned but unused variable - %"PRIsWARN, rb_id2str(v[i]));
26166 }
26167#endif
26168}
26169
26170static void
26171local_push(struct parser_params *p, int toplevel_scope)
26172{
26173 struct local_vars *local;
26174 int inherits_dvars = toplevel_scope && compile_for_eval;
26175 int warn_unused_vars = RTEST(ruby_verbose);
26176
26177 local = ALLOC(struct local_vars);
26178 local->prev = p->lvtbl;
26179 local->args = vtable_alloc(0);
26180 local->vars = vtable_alloc(inherits_dvars ? DVARS_INHERIT : DVARS_TOPSCOPE);
26181#ifndef RIPPER
26182 if (toplevel_scope && compile_for_eval) warn_unused_vars = 0;
26183 if (toplevel_scope && e_option_supplied(p)) warn_unused_vars = 0;
26184#endif
26185 local->numparam.outer = 0;
26186 local->numparam.inner = 0;
26187 local->numparam.current = 0;
26188 local->it = 0;
26189 local->used = warn_unused_vars ? vtable_alloc(0) : 0;
26190
26191# if WARN_PAST_SCOPE
26192 local->past = 0;
26193# endif
26194 CMDARG_PUSH(0);
26195 COND_PUSH(0);
26196 p->lvtbl = local;
26197}
26198
26199static void
26200vtable_chain_free(struct parser_params *p, struct vtable *table)
26201{
26202 while (!DVARS_TERMINAL_P(table)) {
26203 struct vtable *cur_table = table;
26204 table = cur_table->prev;
26205 vtable_free(cur_table);
26206 }
26207}
26208
26209static void
26210local_free(struct parser_params *p, struct local_vars *local)
26211{
26212 vtable_chain_free(p, local->used);
26213
26214# if WARN_PAST_SCOPE
26215 vtable_chain_free(p, local->past);
26216# endif
26217
26218 vtable_chain_free(p, local->args);
26219 vtable_chain_free(p, local->vars);
26220
26221 ruby_sized_xfree(local, sizeof(struct local_vars));
26222}
26223
26224static void
26225local_pop(struct parser_params *p)
26226{
26227 struct local_vars *local = p->lvtbl->prev;
26228 if (p->lvtbl->used) {
26229 warn_unused_var(p, p->lvtbl);
26230 }
26231
26232 local_free(p, p->lvtbl);
26233 p->lvtbl = local;
26234
26235 CMDARG_POP();
26236 COND_POP();
26237}
26238
26239static rb_ast_id_table_t *
26240local_tbl(struct parser_params *p)
26241{
26242 int cnt_args = vtable_size(p->lvtbl->args);
26243 int cnt_vars = vtable_size(p->lvtbl->vars);
26244 int cnt = cnt_args + cnt_vars;
26245 int i, j;
26246 rb_ast_id_table_t *tbl;
26247
26248 if (cnt <= 0) return 0;
26249 tbl = rb_ast_new_local_table(p->ast, cnt);
26250 MEMCPY(tbl->ids, p->lvtbl->args->tbl, ID, cnt_args);
26251 /* remove IDs duplicated to warn shadowing */
26252 for (i = 0, j = cnt_args; i < cnt_vars; ++i) {
26253 ID id = p->lvtbl->vars->tbl[i];
26254 if (!vtable_included(p->lvtbl->args, id)) {
26255 tbl->ids[j++] = id;
26256 }
26257 }
26258 if (j < cnt) {
26259 tbl = rb_ast_resize_latest_local_table(p->ast, j);
26260 }
26261
26262 return tbl;
26263}
26264
26265static void
26266numparam_name(struct parser_params *p, ID id)
26267{
26268 if (!NUMPARAM_ID_P(id)) return;
26269 compile_error(p, "_%d is reserved for numbered parameter",
26270 NUMPARAM_ID_TO_IDX(id));
26271}
26272
26273static void
26274arg_var(struct parser_params *p, ID id)
26275{
26276 numparam_name(p, id);
26277 vtable_add(p->lvtbl->args, id);
26278}
26279
26280static void
26281local_var(struct parser_params *p, ID id)
26282{
26283 numparam_name(p, id);
26284 vtable_add(p->lvtbl->vars, id);
26285 if (p->lvtbl->used) {
26286 vtable_add(p->lvtbl->used, (ID)p->ruby_sourceline);
26287 }
26288}
26289
26290#ifndef RIPPER
26291int
26292rb_parser_local_defined(struct parser_params *p, ID id, const struct rb_iseq_struct *iseq)
26293{
26294 return rb_local_defined(id, iseq);
26295}
26296#endif
26297
26298static int
26299local_id_ref(struct parser_params *p, ID id, ID **vidrefp)
26300{
26301 struct vtable *vars, *args, *used;
26302
26303 vars = p->lvtbl->vars;
26304 args = p->lvtbl->args;
26305 used = p->lvtbl->used;
26306
26307 while (vars && !DVARS_TERMINAL_P(vars->prev)) {
26308 vars = vars->prev;
26309 args = args->prev;
26310 if (used) used = used->prev;
26311 }
26312
26313 if (vars && vars->prev == DVARS_INHERIT) {
26314 return rb_parser_local_defined(p, id, p->parent_iseq);
26315 }
26316 else if (vtable_included(args, id)) {
26317 return 1;
26318 }
26319 else {
26320 int i = vtable_included(vars, id);
26321 if (i && used && vidrefp) *vidrefp = &used->tbl[i-1];
26322 return i != 0;
26323 }
26324}
26325
26326static int
26327local_id(struct parser_params *p, ID id)
26328{
26329 return local_id_ref(p, id, NULL);
26330}
26331
26332static int
26333check_forwarding_args(struct parser_params *p)
26334{
26335 if (local_id(p, idFWD_ALL)) return TRUE;
26336 compile_error(p, "unexpected ...");
26337 return FALSE;
26338}
26339
26340static void
26341add_forwarding_args(struct parser_params *p)
26342{
26343 arg_var(p, idFWD_REST);
26344#ifndef FORWARD_ARGS_WITH_RUBY2_KEYWORDS
26345 arg_var(p, idFWD_KWREST);
26346#endif
26347 arg_var(p, idFWD_BLOCK);
26348 arg_var(p, idFWD_ALL);
26349}
26350
26351static void
26352forwarding_arg_check(struct parser_params *p, ID arg, ID all, const char *var)
26353{
26354 bool conflict = false;
26355
26356 struct vtable *vars, *args;
26357
26358 vars = p->lvtbl->vars;
26359 args = p->lvtbl->args;
26360
26361 while (vars && !DVARS_TERMINAL_P(vars->prev)) {
26362 conflict |= (vtable_included(args, arg) && !(all && vtable_included(args, all)));
26363 vars = vars->prev;
26364 args = args->prev;
26365 }
26366
26367 bool found = false;
26368 if (vars && vars->prev == DVARS_INHERIT && !found) {
26369 found = (rb_parser_local_defined(p, arg, p->parent_iseq) &&
26370 !(all && rb_parser_local_defined(p, all, p->parent_iseq)));
26371 }
26372 else {
26373 found = (vtable_included(args, arg) &&
26374 !(all && vtable_included(args, all)));
26375 }
26376
26377 if (!found) {
26378 compile_error(p, "no anonymous %s parameter", var);
26379 }
26380 else if (conflict) {
26381 compile_error(p, "anonymous %s parameter is also used within block", var);
26382 }
26383}
26384
26385static NODE *
26386new_args_forward_call(struct parser_params *p, NODE *leading, const YYLTYPE *loc, const YYLTYPE *argsloc)
26387{
26388 NODE *rest = NEW_LVAR(idFWD_REST, loc);
26389#ifndef FORWARD_ARGS_WITH_RUBY2_KEYWORDS
26390 NODE *kwrest = list_append(p, NEW_LIST(0, loc), NEW_LVAR(idFWD_KWREST, loc));
26391#endif
26392 rb_node_block_pass_t *block = NEW_BLOCK_PASS(NEW_LVAR(idFWD_BLOCK, loc), argsloc, &NULL_LOC);
26393 NODE *args = leading ? rest_arg_append(p, leading, rest, argsloc) : NEW_SPLAT(rest, loc, &NULL_LOC);
26394 block->forwarding = TRUE;
26395#ifndef FORWARD_ARGS_WITH_RUBY2_KEYWORDS
26396 args = arg_append(p, args, new_hash(p, kwrest, loc), argsloc);
26397#endif
26398 return arg_blk_pass(args, block);
26399}
26400
26401static NODE *
26402numparam_push(struct parser_params *p)
26403{
26404 struct local_vars *local = p->lvtbl;
26405 NODE *inner = local->numparam.inner;
26406 if (!local->numparam.outer) {
26407 local->numparam.outer = local->numparam.current;
26408 }
26409 local->numparam.inner = 0;
26410 local->numparam.current = 0;
26411 local->it = 0;
26412 return inner;
26413}
26414
26415static void
26416numparam_pop(struct parser_params *p, NODE *prev_inner)
26417{
26418 struct local_vars *local = p->lvtbl;
26419 if (prev_inner) {
26420 /* prefer first one */
26421 local->numparam.inner = prev_inner;
26422 }
26423 else if (local->numparam.current) {
26424 /* current and inner are exclusive */
26425 local->numparam.inner = local->numparam.current;
26426 }
26427 if (p->max_numparam > NO_PARAM) {
26428 /* current and outer are exclusive */
26429 local->numparam.current = local->numparam.outer;
26430 local->numparam.outer = 0;
26431 }
26432 else {
26433 /* no numbered parameter */
26434 local->numparam.current = 0;
26435 }
26436 local->it = 0;
26437}
26438
26439static const struct vtable *
26440dyna_push(struct parser_params *p)
26441{
26442 p->lvtbl->args = vtable_alloc(p->lvtbl->args);
26443 p->lvtbl->vars = vtable_alloc(p->lvtbl->vars);
26444 if (p->lvtbl->used) {
26445 p->lvtbl->used = vtable_alloc(p->lvtbl->used);
26446 }
26447 return p->lvtbl->args;
26448}
26449
26450static void
26451dyna_pop_vtable(struct parser_params *p, struct vtable **vtblp)
26452{
26453 struct vtable *tmp = *vtblp;
26454 *vtblp = tmp->prev;
26455# if WARN_PAST_SCOPE
26456 if (p->past_scope_enabled) {
26457 tmp->prev = p->lvtbl->past;
26458 p->lvtbl->past = tmp;
26459 return;
26460 }
26461# endif
26462 vtable_free(tmp);
26463}
26464
26465static void
26466dyna_pop_1(struct parser_params *p)
26467{
26468 struct vtable *tmp;
26469
26470 if ((tmp = p->lvtbl->used) != 0) {
26471 warn_unused_var(p, p->lvtbl);
26472 p->lvtbl->used = p->lvtbl->used->prev;
26473 vtable_free(tmp);
26474 }
26475 dyna_pop_vtable(p, &p->lvtbl->args);
26476 dyna_pop_vtable(p, &p->lvtbl->vars);
26477}
26478
26479static void
26480dyna_pop(struct parser_params *p, const struct vtable *lvargs)
26481{
26482 while (p->lvtbl->args != lvargs) {
26483 dyna_pop_1(p);
26484 if (!p->lvtbl->args) {
26485 struct local_vars *local = p->lvtbl->prev;
26486 ruby_sized_xfree(p->lvtbl, sizeof(*p->lvtbl));
26487 p->lvtbl = local;
26488 }
26489 }
26490 dyna_pop_1(p);
26491}
26492
26493static int
26494dyna_in_block(struct parser_params *p)
26495{
26496 return !DVARS_TERMINAL_P(p->lvtbl->vars) && p->lvtbl->vars->prev != DVARS_TOPSCOPE;
26497}
26498
26499#ifndef RIPPER
26500int
26501dvar_defined_ref(struct parser_params *p, ID id, ID **vidrefp)
26502{
26503 struct vtable *vars, *args, *used;
26504 int i;
26505
26506 args = p->lvtbl->args;
26507 vars = p->lvtbl->vars;
26508 used = p->lvtbl->used;
26509
26510 while (!DVARS_TERMINAL_P(vars)) {
26511 if (vtable_included(args, id)) {
26512 return 1;
26513 }
26514 if ((i = vtable_included(vars, id)) != 0) {
26515 if (used && vidrefp) *vidrefp = &used->tbl[i-1];
26516 return 1;
26517 }
26518 args = args->prev;
26519 vars = vars->prev;
26520 if (!vidrefp) used = 0;
26521 if (used) used = used->prev;
26522 }
26523
26524 if (vars == DVARS_INHERIT && !NUMPARAM_ID_P(id)) {
26525 return rb_dvar_defined(id, p->parent_iseq);
26526 }
26527
26528 return 0;
26529}
26530#endif
26531
26532static int
26533dvar_defined(struct parser_params *p, ID id)
26534{
26535 return dvar_defined_ref(p, id, NULL);
26536}
26537
26538static int
26539dvar_curr(struct parser_params *p, ID id)
26540{
26541 return (vtable_included(p->lvtbl->args, id) ||
26542 vtable_included(p->lvtbl->vars, id));
26543}
26544
26545static void
26546reg_fragment_enc_error(struct parser_params* p, rb_parser_string_t *str, int c)
26547{
26548 compile_error(p,
26549 "regexp encoding option '%c' differs from source encoding '%s'",
26550 c, rb_enc_name(rb_parser_str_get_encoding(str)));
26551}
26552
26553#ifndef RIPPER
26554static rb_encoding *
26555find_enc(struct parser_params* p, const char *name)
26556{
26557 int idx = rb_enc_find_index(name);
26558 if (idx < 0) {
26559 rb_bug("unknown encoding name: %s", name);
26560 }
26561
26562 return rb_enc_from_index(idx);
26563}
26564
26565static rb_encoding *
26566kcode_to_enc(struct parser_params* p, int kcode)
26567{
26568 rb_encoding *enc;
26569
26570 switch (kcode) {
26571 case ENC_ASCII8BIT:
26572 enc = rb_ascii8bit_encoding();
26573 break;
26574 case ENC_EUC_JP:
26575 enc = find_enc(p, "EUC-JP");
26576 break;
26577 case ENC_Windows_31J:
26578 enc = find_enc(p, "Windows-31J");
26579 break;
26580 case ENC_UTF8:
26581 enc = rb_utf8_encoding();
26582 break;
26583 default:
26584 enc = NULL;
26585 break;
26586 }
26587
26588 return enc;
26589}
26590
26591int
26592rb_reg_fragment_setenc(struct parser_params* p, rb_parser_string_t *str, int options)
26593{
26594 int c = RE_OPTION_ENCODING_IDX(options);
26595
26596 if (c) {
26597 int opt, idx;
26598 rb_encoding *enc;
26599
26600 char_to_option_kcode(c, &opt, &idx);
26601 enc = kcode_to_enc(p, idx);
26602 if (enc != rb_parser_str_get_encoding(str) &&
26603 !rb_parser_is_ascii_string(p, str)) {
26604 goto error;
26605 }
26606 rb_parser_string_set_encoding(str, enc);
26607 }
26608 else if (RE_OPTION_ENCODING_NONE(options)) {
26609 if (!PARSER_ENCODING_IS_ASCII8BIT(p, str) &&
26610 !rb_parser_is_ascii_string(p, str)) {
26611 c = 'n';
26612 goto error;
26613 }
26614 rb_parser_enc_associate(p, str, rb_ascii8bit_encoding());
26615 }
26616 else if (rb_is_usascii_enc(p->enc)) {
26617 rb_parser_enc_associate(p, str, rb_ascii8bit_encoding());
26618 }
26619 return 0;
26620
26621 error:
26622 return c;
26623}
26624#endif
26625
26626static void
26627reg_fragment_setenc(struct parser_params* p, rb_parser_string_t *str, int options)
26628{
26629 int c = rb_reg_fragment_setenc(p, str, options);
26630 if (c) reg_fragment_enc_error(p, str, c);
26631}
26632
26633#ifndef UNIVERSAL_PARSER
26634typedef struct {
26635 struct parser_params* parser;
26636 rb_encoding *enc;
26637 NODE *succ_block;
26638 const YYLTYPE *loc;
26639 rb_parser_assignable_func assignable;
26641
26642static int
26643reg_named_capture_assign_iter(const OnigUChar *name, const OnigUChar *name_end,
26644 int back_num, int *back_refs, OnigRegex regex, void *arg0)
26645{
26647 struct parser_params* p = arg->parser;
26648 rb_encoding *enc = arg->enc;
26649 long len = name_end - name;
26650 const char *s = (const char *)name;
26651
26652 return rb_reg_named_capture_assign_iter_impl(p, s, len, enc, &arg->succ_block, arg->loc, arg->assignable);
26653}
26654
26655static NODE *
26656reg_named_capture_assign(struct parser_params* p, VALUE regexp, const YYLTYPE *loc, rb_parser_assignable_func assignable)
26657{
26659
26660 arg.parser = p;
26661 arg.enc = rb_enc_get(regexp);
26662 arg.succ_block = 0;
26663 arg.loc = loc;
26664 arg.assignable = assignable;
26665 onig_foreach_name(RREGEXP_PTR(regexp), reg_named_capture_assign_iter, &arg);
26666
26667 if (!arg.succ_block) return 0;
26668 return RNODE_BLOCK(arg.succ_block)->nd_next;
26669}
26670#endif
26671
26672#ifndef RIPPER
26673NODE *
26674rb_parser_assignable(struct parser_params *p, ID id, NODE *val, const YYLTYPE *loc)
26675{
26676 return assignable(p, id, val, loc);
26677}
26678
26679int
26680rb_reg_named_capture_assign_iter_impl(struct parser_params *p, const char *s, long len,
26681 rb_encoding *enc, NODE **succ_block, const rb_code_location_t *loc, rb_parser_assignable_func assignable)
26682{
26683 ID var;
26684 NODE *node, *succ;
26685
26686 if (!len) return ST_CONTINUE;
26687 if (!VALID_SYMNAME_P(s, len, enc, ID_LOCAL))
26688 return ST_CONTINUE;
26689
26690 var = intern_cstr(s, len, enc);
26691 if (len < MAX_WORD_LENGTH && rb_reserved_word(s, (int)len)) {
26692 if (!lvar_defined(p, var)) return ST_CONTINUE;
26693 }
26694 node = node_assign(p, assignable(p, var, 0, loc), NEW_SYM(rb_id2str(var), loc), NO_LEX_CTXT, loc);
26695 succ = *succ_block;
26696 if (!succ) succ = NEW_ERROR(loc);
26697 succ = block_append(p, succ, node);
26698 *succ_block = succ;
26699 return ST_CONTINUE;
26700}
26701#endif
26702
26703static VALUE
26704parser_reg_compile(struct parser_params* p, rb_parser_string_t *str, int options)
26705{
26706 VALUE str2;
26707 reg_fragment_setenc(p, str, options);
26708 str2 = rb_str_new_parser_string(str);
26709 return rb_parser_reg_compile(p, str2, options);
26710}
26711
26712#ifndef RIPPER
26713VALUE
26714rb_parser_reg_compile(struct parser_params* p, VALUE str, int options)
26715{
26716 return rb_reg_compile(str, options & RE_OPTION_MASK, p->ruby_sourcefile, p->ruby_sourceline);
26717}
26718#endif
26719
26720static VALUE
26721reg_compile(struct parser_params* p, rb_parser_string_t *str, int options)
26722{
26723 VALUE re;
26724 VALUE err;
26725
26726 err = rb_errinfo();
26727 re = parser_reg_compile(p, str, options);
26728 if (NIL_P(re)) {
26729 VALUE m = rb_attr_get(rb_errinfo(), idMesg);
26730 rb_set_errinfo(err);
26731 compile_error(p, "%"PRIsVALUE, m);
26732 return Qnil;
26733 }
26734 return re;
26735}
26736
26737#ifndef RIPPER
26738void
26739rb_ruby_parser_set_options(struct parser_params *p, int print, int loop, int chomp, int split)
26740{
26741 p->do_print = print;
26742 p->do_loop = loop;
26743 p->do_chomp = chomp;
26744 p->do_split = split;
26745}
26746
26747static NODE *
26748parser_append_options(struct parser_params *p, NODE *node)
26749{
26750 static const YYLTYPE default_location = {{1, 0}, {1, 0}};
26751 const YYLTYPE *const LOC = &default_location;
26752
26753 if (p->do_print) {
26754 NODE *print = (NODE *)NEW_FCALL(rb_intern("print"),
26755 NEW_LIST(NEW_GVAR(idLASTLINE, LOC), LOC),
26756 LOC);
26757 node = block_append(p, node, print);
26758 }
26759
26760 if (p->do_loop) {
26761 NODE *irs = NEW_LIST(NEW_GVAR(rb_intern("$/"), LOC), LOC);
26762
26763 if (p->do_split) {
26764 ID ifs = rb_intern("$;");
26765 ID fields = rb_intern("$F");
26766 NODE *args = NEW_LIST(NEW_GVAR(ifs, LOC), LOC);
26767 NODE *split = NEW_GASGN(fields,
26768 NEW_CALL(NEW_GVAR(idLASTLINE, LOC),
26769 rb_intern("split"), args, LOC),
26770 LOC);
26771 node = block_append(p, split, node);
26772 }
26773 if (p->do_chomp) {
26774 NODE *chomp = NEW_SYM(rb_str_new_cstr("chomp"), LOC);
26775 chomp = list_append(p, NEW_LIST(chomp, LOC), NEW_TRUE(LOC));
26776 irs = list_append(p, irs, NEW_HASH(chomp, LOC));
26777 }
26778
26779 node = NEW_WHILE((NODE *)NEW_FCALL(idGets, irs, LOC), node, 1, LOC, &NULL_LOC, &NULL_LOC);
26780 }
26781
26782 return node;
26783}
26784
26785void
26786rb_init_parse(void)
26787{
26788 /* just to suppress unused-function warnings */
26789 (void)nodetype;
26790 (void)nodeline;
26791}
26792
26793ID
26794internal_id(struct parser_params *p)
26795{
26796 return rb_make_temporary_id(vtable_size(p->lvtbl->args) + vtable_size(p->lvtbl->vars));
26797}
26798#endif /* !RIPPER */
26799
26800static void
26801parser_initialize(struct parser_params *p)
26802{
26803 /* note: we rely on TypedData_Make_Struct to set most fields to 0 */
26804 p->command_start = TRUE;
26805 p->ruby_sourcefile_string = Qnil;
26806 p->lex.lpar_beg = -1; /* make lambda_beginning_p() == FALSE at first */
26807 string_buffer_init(p);
26808 p->node_id = 0;
26809 p->delayed.token = NULL;
26810 p->frozen_string_literal = -1; /* not specified */
26811#ifndef RIPPER
26812 p->error_buffer = Qfalse;
26813 p->end_expect_token_locations = NULL;
26814 p->token_id = 0;
26815 p->tokens = NULL;
26816#else
26817 p->result = Qnil;
26818 p->parsing_thread = Qnil;
26819 p->s_value = Qnil;
26820 p->s_lvalue = Qnil;
26821 p->s_value_stack = rb_ary_new();
26822#endif
26823 p->debug_buffer = Qnil;
26824 p->debug_output = rb_ractor_stdout();
26825 p->enc = rb_utf8_encoding();
26826 p->exits = 0;
26827}
26828
26829#ifdef RIPPER
26830#define rb_ruby_parser_mark ripper_parser_mark
26831#define rb_ruby_parser_free ripper_parser_free
26832#define rb_ruby_parser_memsize ripper_parser_memsize
26833#endif
26834
26835void
26836rb_ruby_parser_mark(void *ptr)
26837{
26838 struct parser_params *p = (struct parser_params*)ptr;
26839
26840 rb_gc_mark(p->ruby_sourcefile_string);
26841#ifndef RIPPER
26842 rb_gc_mark(p->error_buffer);
26843#else
26844 rb_gc_mark(p->value);
26845 rb_gc_mark(p->result);
26846 rb_gc_mark(p->parsing_thread);
26847 rb_gc_mark(p->s_value);
26848 rb_gc_mark(p->s_lvalue);
26849 rb_gc_mark(p->s_value_stack);
26850#endif
26851 rb_gc_mark(p->debug_buffer);
26852 rb_gc_mark(p->debug_output);
26853}
26854
26855void
26856rb_ruby_parser_free(void *ptr)
26857{
26858 struct parser_params *p = (struct parser_params*)ptr;
26859 struct local_vars *local, *prev;
26860
26861 if (p->ast) {
26862 rb_ast_free(p->ast);
26863 }
26864
26865 if (p->warn_duplicate_keys_table) {
26866 st_free_table(p->warn_duplicate_keys_table);
26867 }
26868
26869#ifndef RIPPER
26870 if (p->tokens) {
26871 rb_parser_ary_free(p, p->tokens);
26872 }
26873#endif
26874
26875 if (p->tokenbuf) {
26876 ruby_sized_xfree(p->tokenbuf, p->toksiz);
26877 }
26878
26879 for (local = p->lvtbl; local; local = prev) {
26880 prev = local->prev;
26881 local_free(p, local);
26882 }
26883
26884 {
26885 token_info *ptinfo;
26886 while ((ptinfo = p->token_info) != 0) {
26887 p->token_info = ptinfo->next;
26888 xfree(ptinfo);
26889 }
26890 }
26891 string_buffer_free(p);
26892
26893 if (p->pvtbl) {
26894 st_free_table(p->pvtbl);
26895 }
26896
26897 if (CASE_LABELS_ENABLED_P(p->case_labels)) {
26898 st_free_table(p->case_labels);
26899 }
26900
26901 xfree(p->lex.strterm);
26902 p->lex.strterm = 0;
26903
26904 xfree(ptr);
26905}
26906
26907size_t
26908rb_ruby_parser_memsize(const void *ptr)
26909{
26910 struct parser_params *p = (struct parser_params*)ptr;
26911 struct local_vars *local;
26912 size_t size = sizeof(*p);
26913
26914 size += p->toksiz;
26915 for (local = p->lvtbl; local; local = local->prev) {
26916 size += sizeof(*local);
26917 if (local->vars) size += local->vars->capa * sizeof(ID);
26918 }
26919 return size;
26920}
26921
26922#ifndef RIPPER
26923#undef rb_reserved_word
26924
26925const struct kwtable *
26926rb_reserved_word(const char *str, unsigned int len)
26927{
26928 return reserved_word(str, len);
26929}
26930
26931#ifdef UNIVERSAL_PARSER
26933rb_ruby_parser_allocate(const rb_parser_config_t *config)
26934{
26935 /* parser_initialize expects fields to be set to 0 */
26936 rb_parser_t *p = (rb_parser_t *)config->calloc(1, sizeof(rb_parser_t));
26937 p->config = config;
26938 return p;
26939}
26940
26942rb_ruby_parser_new(const rb_parser_config_t *config)
26943{
26944 /* parser_initialize expects fields to be set to 0 */
26945 rb_parser_t *p = rb_ruby_parser_allocate(config);
26946 parser_initialize(p);
26947 return p;
26948}
26949#else
26951rb_ruby_parser_allocate(void)
26952{
26953 /* parser_initialize expects fields to be set to 0 */
26954 rb_parser_t *p = (rb_parser_t *)ruby_xcalloc(1, sizeof(rb_parser_t));
26955 return p;
26956}
26957
26959rb_ruby_parser_new(void)
26960{
26961 /* parser_initialize expects fields to be set to 0 */
26962 rb_parser_t *p = rb_ruby_parser_allocate();
26963 parser_initialize(p);
26964 return p;
26965}
26966#endif
26967
26969rb_ruby_parser_set_context(rb_parser_t *p, const struct rb_iseq_struct *base, int main)
26970{
26971 p->error_buffer = main ? Qfalse : Qnil;
26972 p->parent_iseq = base;
26973 return p;
26974}
26975
26976void
26977rb_ruby_parser_set_script_lines(rb_parser_t *p)
26978{
26979 p->debug_lines = rb_parser_ary_new_capa_for_script_line(p, 10);
26980}
26981
26982void
26983rb_ruby_parser_error_tolerant(rb_parser_t *p)
26984{
26985 p->error_tolerant = 1;
26986}
26987
26988void
26989rb_ruby_parser_keep_tokens(rb_parser_t *p)
26990{
26991 p->keep_tokens = 1;
26992 p->tokens = rb_parser_ary_new_capa_for_ast_token(p, 10);
26993}
26994
26996rb_ruby_parser_encoding(rb_parser_t *p)
26997{
26998 return p->enc;
26999}
27000
27001int
27002rb_ruby_parser_end_seen_p(rb_parser_t *p)
27003{
27004 return p->ruby__end__seen;
27005}
27006
27007int
27008rb_ruby_parser_set_yydebug(rb_parser_t *p, int flag)
27009{
27010 p->debug = flag;
27011 return flag;
27012}
27013#endif /* !RIPPER */
27014
27015#ifdef RIPPER
27016int
27017rb_ruby_parser_get_yydebug(rb_parser_t *p)
27018{
27019 return p->debug;
27020}
27021
27022void
27023rb_ruby_parser_set_value(rb_parser_t *p, VALUE value)
27024{
27025 p->value = value;
27026}
27027
27028int
27029rb_ruby_parser_error_p(rb_parser_t *p)
27030{
27031 return p->error_p;
27032}
27033
27034VALUE
27035rb_ruby_parser_debug_output(rb_parser_t *p)
27036{
27037 return p->debug_output;
27038}
27039
27040void
27041rb_ruby_parser_set_debug_output(rb_parser_t *p, VALUE output)
27042{
27043 p->debug_output = output;
27044}
27045
27046VALUE
27047rb_ruby_parser_parsing_thread(rb_parser_t *p)
27048{
27049 return p->parsing_thread;
27050}
27051
27052void
27053rb_ruby_parser_set_parsing_thread(rb_parser_t *p, VALUE parsing_thread)
27054{
27055 p->parsing_thread = parsing_thread;
27056}
27057
27058void
27059rb_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)
27060{
27061 p->lex.gets = gets;
27062 p->lex.input = input;
27063 p->eofp = 0;
27064 p->ruby_sourcefile_string = sourcefile_string;
27065 p->ruby_sourcefile = sourcefile;
27066 p->ruby_sourceline = sourceline;
27067}
27068
27069VALUE
27070rb_ruby_parser_result(rb_parser_t *p)
27071{
27072 return p->result;
27073}
27074
27076rb_ruby_parser_enc(rb_parser_t *p)
27077{
27078 return p->enc;
27079}
27080
27081VALUE
27082rb_ruby_parser_ruby_sourcefile_string(rb_parser_t *p)
27083{
27084 return p->ruby_sourcefile_string;
27085}
27086
27087int
27088rb_ruby_parser_ruby_sourceline(rb_parser_t *p)
27089{
27090 return p->ruby_sourceline;
27091}
27092
27093int
27094rb_ruby_parser_lex_state(rb_parser_t *p)
27095{
27096 return p->lex.state;
27097}
27098
27099void
27100rb_ruby_ripper_parse0(rb_parser_t *p)
27101{
27102 parser_prepare(p);
27103 p->ast = rb_ast_new();
27104 ripper_yyparse((void*)p);
27105 rb_ast_free(p->ast);
27106 p->ast = 0;
27107 p->eval_tree = 0;
27108 p->eval_tree_begin = 0;
27109}
27110
27111int
27112rb_ruby_ripper_dedent_string(rb_parser_t *p, rb_parser_string_t *string, int width)
27113{
27114 return dedent_string(p, string, width);
27115}
27116
27117int
27118rb_ruby_ripper_initialized_p(rb_parser_t *p)
27119{
27120 return p->lex.input != 0;
27121}
27122
27123void
27124rb_ruby_ripper_parser_initialize(rb_parser_t *p)
27125{
27126 parser_initialize(p);
27127}
27128
27129long
27130rb_ruby_ripper_column(rb_parser_t *p)
27131{
27132 return p->lex.ptok - p->lex.pbeg;
27133}
27134
27135long
27136rb_ruby_ripper_token_len(rb_parser_t *p)
27137{
27138 return p->lex.pcur - p->lex.ptok;
27139}
27140
27142rb_ruby_ripper_lex_lastline(rb_parser_t *p)
27143{
27144 return p->lex.lastline;
27145}
27146
27147VALUE
27148rb_ruby_ripper_lex_state_name(struct parser_params *p, int state)
27149{
27150 return rb_parser_lex_state_name(p, (enum lex_state_e)state);
27151}
27152
27153#ifdef UNIVERSAL_PARSER
27155rb_ripper_parser_params_allocate(const rb_parser_config_t *config)
27156{
27157 rb_parser_t *p = (rb_parser_t *)config->calloc(1, sizeof(rb_parser_t));
27158 p->config = config;
27159 return p;
27160}
27161#endif
27162
27163struct parser_params*
27164rb_ruby_ripper_parser_allocate(void)
27165{
27166 return (struct parser_params *)ruby_xcalloc(1, sizeof(struct parser_params));
27167}
27168#endif /* RIPPER */
27169
27170#ifndef RIPPER
27171void
27172rb_parser_printf(struct parser_params *p, const char *fmt, ...)
27173{
27174 va_list ap;
27175 VALUE mesg = p->debug_buffer;
27176
27177 if (NIL_P(mesg)) p->debug_buffer = mesg = rb_str_new(0, 0);
27178 va_start(ap, fmt);
27179 rb_str_vcatf(mesg, fmt, ap);
27180 va_end(ap);
27181 if (char_at_end(p, mesg, 0) == '\n') {
27182 rb_io_write(p->debug_output, mesg);
27183 p->debug_buffer = Qnil;
27184 }
27185}
27186
27187static void
27188parser_compile_error(struct parser_params *p, const rb_code_location_t *loc, const char *fmt, ...)
27189{
27190 va_list ap;
27191 int lineno, column;
27192
27193 if (loc) {
27194 lineno = loc->end_pos.lineno;
27195 column = loc->end_pos.column;
27196 }
27197 else {
27198 lineno = p->ruby_sourceline;
27199 column = rb_long2int(p->lex.pcur - p->lex.pbeg);
27200 }
27201
27202 rb_io_flush(p->debug_output);
27203 p->error_p = 1;
27204 va_start(ap, fmt);
27205 p->error_buffer =
27206 rb_syntax_error_append(p->error_buffer,
27207 p->ruby_sourcefile_string,
27208 lineno, column,
27209 p->enc, fmt, ap);
27210 va_end(ap);
27211}
27212
27213static size_t
27214count_char(const char *str, int c)
27215{
27216 int n = 0;
27217 while (str[n] == c) ++n;
27218 return n;
27219}
27220
27221/*
27222 * strip enclosing double-quotes, same as the default yytnamerr except
27223 * for that single-quotes matching back-quotes do not stop stripping.
27224 *
27225 * "\"`class' keyword\"" => "`class' keyword"
27226 */
27227size_t
27228rb_yytnamerr(struct parser_params *p, char *yyres, const char *yystr)
27229{
27230 if (*yystr == '"') {
27231 size_t yyn = 0, bquote = 0;
27232 const char *yyp = yystr;
27233
27234 while (*++yyp) {
27235 switch (*yyp) {
27236 case '\'':
27237 if (!bquote) {
27238 bquote = count_char(yyp+1, '\'') + 1;
27239 if (yyres) memcpy(&yyres[yyn], yyp, bquote);
27240 yyn += bquote;
27241 yyp += bquote - 1;
27242 break;
27243 }
27244 else {
27245 if (bquote && count_char(yyp+1, '\'') + 1 == bquote) {
27246 if (yyres) memcpy(yyres + yyn, yyp, bquote);
27247 yyn += bquote;
27248 yyp += bquote - 1;
27249 bquote = 0;
27250 break;
27251 }
27252 if (yyp[1] && yyp[1] != '\'' && yyp[2] == '\'') {
27253 if (yyres) memcpy(yyres + yyn, yyp, 3);
27254 yyn += 3;
27255 yyp += 2;
27256 break;
27257 }
27258 goto do_not_strip_quotes;
27259 }
27260
27261 case ',':
27262 goto do_not_strip_quotes;
27263
27264 case '\\':
27265 if (*++yyp != '\\')
27266 goto do_not_strip_quotes;
27267 /* Fall through. */
27268 default:
27269 if (yyres)
27270 yyres[yyn] = *yyp;
27271 yyn++;
27272 break;
27273
27274 case '"':
27275 case '\0':
27276 if (yyres)
27277 yyres[yyn] = '\0';
27278 return yyn;
27279 }
27280 }
27281 do_not_strip_quotes: ;
27282 }
27283
27284 if (!yyres) return strlen(yystr);
27285
27286 return (YYSIZE_T)(yystpcpy(yyres, yystr) - yyres);
27287}
27288#endif
27289
27290#ifdef RIPPER
27291#define validate(x) (void)(x)
27292
27293static VALUE
27294ripper_dispatch0(struct parser_params *p, ID mid)
27295{
27296 return rb_funcall(p->value, mid, 0);
27297}
27298
27299static VALUE
27300ripper_dispatch1(struct parser_params *p, ID mid, VALUE a)
27301{
27302 validate(a);
27303 return rb_funcall(p->value, mid, 1, a);
27304}
27305
27306static VALUE
27307ripper_dispatch2(struct parser_params *p, ID mid, VALUE a, VALUE b)
27308{
27309 validate(a);
27310 validate(b);
27311 return rb_funcall(p->value, mid, 2, a, b);
27312}
27313
27314static VALUE
27315ripper_dispatch3(struct parser_params *p, ID mid, VALUE a, VALUE b, VALUE c)
27316{
27317 validate(a);
27318 validate(b);
27319 validate(c);
27320 return rb_funcall(p->value, mid, 3, a, b, c);
27321}
27322
27323static VALUE
27324ripper_dispatch4(struct parser_params *p, ID mid, VALUE a, VALUE b, VALUE c, VALUE d)
27325{
27326 validate(a);
27327 validate(b);
27328 validate(c);
27329 validate(d);
27330 return rb_funcall(p->value, mid, 4, a, b, c, d);
27331}
27332
27333static VALUE
27334ripper_dispatch5(struct parser_params *p, ID mid, VALUE a, VALUE b, VALUE c, VALUE d, VALUE e)
27335{
27336 validate(a);
27337 validate(b);
27338 validate(c);
27339 validate(d);
27340 validate(e);
27341 return rb_funcall(p->value, mid, 5, a, b, c, d, e);
27342}
27343
27344static VALUE
27345ripper_dispatch7(struct parser_params *p, ID mid, VALUE a, VALUE b, VALUE c, VALUE d, VALUE e, VALUE f, VALUE g)
27346{
27347 validate(a);
27348 validate(b);
27349 validate(c);
27350 validate(d);
27351 validate(e);
27352 validate(f);
27353 validate(g);
27354 return rb_funcall(p->value, mid, 7, a, b, c, d, e, f, g);
27355}
27356
27357void
27358ripper_error(struct parser_params *p)
27359{
27360 p->error_p = TRUE;
27361}
27362
27363VALUE
27364ripper_value(struct parser_params *p)
27365{
27366 (void)yystpcpy; /* may not used in newer bison */
27367
27368 return p->value;
27369}
27370
27371#endif /* RIPPER */
27372/*
27373 * Local variables:
27374 * mode: c
27375 * c-file-style: "ruby"
27376 * End:
27377 */
#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:683
#define ruby_verbose
This variable controls whether the interpreter is in debug mode.
Definition error.h:475
VALUE rb_eRuntimeError
RuntimeError exception.
Definition error.c:1428
VALUE rb_eSyntaxError
SyntaxError exception.
Definition error.c:1447
VALUE rb_class_new_instance(int argc, const VALUE *argv, VALUE klass)
Allocates, then initialises an instance of the given class.
Definition object.c:2205
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:816
VALUE rb_funcall(VALUE recv, ID mid, int n,...)
Calls a method.
Definition vm_eval.c:1117
VALUE rb_ary_new(void)
Allocates a new, empty array.
VALUE rb_ary_pop(VALUE ary)
Destructively deletes an element from the end of the passed array and returns what was deleted.
VALUE rb_ary_push(VALUE ary, VALUE elem)
Special case of rb_ary_cat() that it adds only one element.
VALUE rb_ary_entry(VALUE ary, long off)
Queries an element of an array.
#define rb_str_new(str, len)
Allocates an instance of rb_cString.
Definition string.h:1497
#define rb_usascii_str_new(str, len)
Identical to rb_str_new, except it generates a string of "US ASCII" encoding.
Definition string.h:1531
VALUE rb_str_cat(VALUE dst, const char *src, long srclen)
Destructively appends the passed contents to the string.
Definition string.c:3540
#define rb_strlen_lit(str)
Length of a string literal.
Definition string.h:1691
#define rb_str_cat_cstr(buf, str)
Identical to rb_str_cat(), except it assumes the passed pointer is a pointer to a C string.
Definition string.h:1655
#define rb_str_new_cstr(str)
Identical to rb_str_new, except it assumes the passed pointer is a pointer to a C string.
Definition string.h:1513
ID rb_sym2id(VALUE obj)
Converts an instance of rb_cSymbol into an ID.
Definition symbol.c:943
int len
Length of the buffer.
Definition io.h:8
#define strtod(s, e)
Just another name of ruby_strtod.
Definition util.h:223
#define strdup(s)
Just another name of ruby_strdup.
Definition util.h:187
#define rb_long2int
Just another name of rb_long2int_inline.
Definition long.h:62
#define MEMCPY(p1, p2, type, n)
Handy macro to call memcpy.
Definition memory.h:372
#define ALLOCA_N(type, n)
Definition memory.h:292
#define MEMZERO(p, type, n)
Handy macro to erase a region of memory.
Definition memory.h:360
#define RB_GC_GUARD(v)
Prevents premature destruction of local objects.
Definition memory.h:167
#define MEMMOVE(p1, p2, type, n)
Handy macro to call memmove.
Definition memory.h:384
VALUE type(ANYARGS)
ANYARGS-ed function type.
Functions related to nodes in the AST.
#define RREGEXP_PTR(obj)
Convenient accessor macro.
Definition rregexp.h:45
#define StringValueCStr(v)
Identical to StringValuePtr, except it additionally checks for the contents for viability as a C stri...
Definition rstring.h:89
#define errno
Ractor-aware version of errno.
Definition ruby.h:388
#define RTEST
This is an old name of RB_TEST.
Definition lex.c:33
Definition st.h:79
uintptr_t ID
Type that represents a Ruby identifier such as a variable name.
Definition value.h:52
uintptr_t VALUE
Type that represents a Ruby object.
Definition value.h:40
#define RBIMPL_WARNING_IGNORED(flag)
Suppresses a warning.
#define RBIMPL_WARNING_PUSH()
Pushes compiler warning state.
#define RBIMPL_WARNING_POP()
Pops compiler warning state.