Ruby 4.0.10p0 (2026-11-19 revision a704b7cd95a42cc0cf5f307137bf3aac0285b915)
parse.c
1/* A Bison parser, made by Lrama 0.7.1. */
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#endif
96
97#else
98
99#include "internal.h"
100#include "internal/compile.h"
101#include "internal/compilers.h"
102#include "internal/complex.h"
103#include "internal/encoding.h"
104#include "internal/error.h"
105#include "internal/hash.h"
106#include "internal/io.h"
107#include "internal/numeric.h"
108#include "internal/parse.h"
109#include "internal/rational.h"
110#include "internal/re.h"
111#include "internal/ruby_parser.h"
112#include "internal/symbol.h"
113#include "internal/thread.h"
114#include "internal/variable.h"
115#include "node.h"
116#include "parser_node.h"
117#include "probes.h"
118#include "regenc.h"
119#include "ruby/encoding.h"
120#include "ruby/regex.h"
121#include "ruby/ruby.h"
122#include "ruby/st.h"
123#include "ruby/util.h"
124#include "ruby/ractor.h"
125#include "symbol.h"
126
127#ifndef RIPPER
128static VALUE
129syntax_error_new(void)
130{
132}
133#endif
134
135static NODE *reg_named_capture_assign(struct parser_params* p, VALUE regexp, const YYLTYPE *loc, rb_parser_assignable_func assignable);
136
137#define compile_callback rb_suppress_tracing
138#endif /* !UNIVERSAL_PARSER */
139
140#define NODE_SPECIAL_EMPTY_ARGS ((NODE *)-1)
141#define NODE_EMPTY_ARGS_P(node) ((node) == NODE_SPECIAL_EMPTY_ARGS)
142
143static int rb_parser_string_hash_cmp(rb_parser_string_t *str1, rb_parser_string_t *str2);
144
145#ifndef RIPPER
146static rb_parser_string_t *rb_parser_string_deep_copy(struct parser_params *p, const rb_parser_string_t *original);
147#endif
148
149static int
150node_integer_cmp(rb_node_integer_t *n1, rb_node_integer_t *n2)
151{
152 return (n1->minus != n2->minus ||
153 n1->base != n2->base ||
154 strcmp(n1->val, n2->val));
155}
156
157static int
158node_float_cmp(rb_node_float_t *n1, rb_node_float_t *n2)
159{
160 return (n1->minus != n2->minus ||
161 strcmp(n1->val, n2->val));
162}
163
164static int
165node_rational_cmp(rb_node_rational_t *n1, rb_node_rational_t *n2)
166{
167 return (n1->minus != n2->minus ||
168 n1->base != n2->base ||
169 n1->seen_point != n2->seen_point ||
170 strcmp(n1->val, n2->val));
171}
172
173static int
174node_imaginary_cmp(rb_node_imaginary_t *n1, rb_node_imaginary_t *n2)
175{
176 return (n1->minus != n2->minus ||
177 n1->base != n2->base ||
178 n1->seen_point != n2->seen_point ||
179 n1->type != n2->type ||
180 strcmp(n1->val, n2->val));
181}
182
183static int
184rb_parser_regx_hash_cmp(rb_node_regx_t *n1, rb_node_regx_t *n2)
185{
186 return (n1->options != n2->options ||
187 rb_parser_string_hash_cmp(n1->string, n2->string));
188}
189
190static st_index_t rb_parser_str_hash(rb_parser_string_t *str);
191static st_index_t rb_char_p_hash(const char *c);
192
193static int
194literal_cmp(st_data_t val, st_data_t lit)
195{
196 if (val == lit) return 0;
197
198 NODE *node_val = RNODE(val);
199 NODE *node_lit = RNODE(lit);
200 enum node_type type_val = nd_type(node_val);
201 enum node_type type_lit = nd_type(node_lit);
202
203 if (type_val != type_lit) {
204 return -1;
205 }
206
207 switch (type_lit) {
208 case NODE_INTEGER:
209 return node_integer_cmp(RNODE_INTEGER(node_val), RNODE_INTEGER(node_lit));
210 case NODE_FLOAT:
211 return node_float_cmp(RNODE_FLOAT(node_val), RNODE_FLOAT(node_lit));
212 case NODE_RATIONAL:
213 return node_rational_cmp(RNODE_RATIONAL(node_val), RNODE_RATIONAL(node_lit));
214 case NODE_IMAGINARY:
215 return node_imaginary_cmp(RNODE_IMAGINARY(node_val), RNODE_IMAGINARY(node_lit));
216 case NODE_STR:
217 return rb_parser_string_hash_cmp(RNODE_STR(node_val)->string, RNODE_STR(node_lit)->string);
218 case NODE_SYM:
219 return rb_parser_string_hash_cmp(RNODE_SYM(node_val)->string, RNODE_SYM(node_lit)->string);
220 case NODE_REGX:
221 return rb_parser_regx_hash_cmp(RNODE_REGX(node_val), RNODE_REGX(node_lit));
222 case NODE_LINE:
223 return node_val->nd_loc.beg_pos.lineno != node_lit->nd_loc.beg_pos.lineno;
224 case NODE_FILE:
225 return rb_parser_string_hash_cmp(RNODE_FILE(node_val)->path, RNODE_FILE(node_lit)->path);
226 case NODE_ENCODING:
227 return RNODE_ENCODING(node_val)->enc != RNODE_ENCODING(node_lit)->enc;
228 default:
229#ifdef UNIVERSAL_PARSER
230 abort();
231#else
232 rb_bug("unexpected node: %s, %s", ruby_node_name(type_val), ruby_node_name(type_lit));
233#endif
234 }
235}
236
237static st_index_t
238literal_hash(st_data_t a)
239{
240 NODE *node = (NODE *)a;
241 enum node_type type = nd_type(node);
242
243 switch (type) {
244 case NODE_INTEGER:
245 return rb_char_p_hash(RNODE_INTEGER(node)->val);
246 case NODE_FLOAT:
247 return rb_char_p_hash(RNODE_FLOAT(node)->val);
248 case NODE_RATIONAL:
249 return rb_char_p_hash(RNODE_RATIONAL(node)->val);
250 case NODE_IMAGINARY:
251 return rb_char_p_hash(RNODE_IMAGINARY(node)->val);
252 case NODE_STR:
253 return rb_parser_str_hash(RNODE_STR(node)->string);
254 case NODE_SYM:
255 return rb_parser_str_hash(RNODE_SYM(node)->string);
256 case NODE_REGX:
257 return rb_parser_str_hash(RNODE_REGX(node)->string);
258 case NODE_LINE:
259 return (st_index_t)node->nd_loc.beg_pos.lineno;
260 case NODE_FILE:
261 return rb_parser_str_hash(RNODE_FILE(node)->path);
262 case NODE_ENCODING:
263 return (st_index_t)RNODE_ENCODING(node)->enc;
264 default:
265#ifdef UNIVERSAL_PARSER
266 abort();
267#else
268 rb_bug("unexpected node: %s", ruby_node_name(type));
269#endif
270 }
271}
272
273static inline int
274parse_isascii(int c)
275{
276 return '\0' <= c && c <= '\x7f';
277}
278
279#undef ISASCII
280#define ISASCII parse_isascii
281
282static inline int
283parse_isspace(int c)
284{
285 return c == ' ' || ('\t' <= c && c <= '\r');
286}
287
288#undef ISSPACE
289#define ISSPACE parse_isspace
290
291static inline int
292parse_iscntrl(int c)
293{
294 return ('\0' <= c && c < ' ') || c == '\x7f';
295}
296
297#undef ISCNTRL
298#define ISCNTRL(c) parse_iscntrl(c)
299
300static inline int
301parse_isupper(int c)
302{
303 return 'A' <= c && c <= 'Z';
304}
305
306static inline int
307parse_islower(int c)
308{
309 return 'a' <= c && c <= 'z';
310}
311
312static inline int
313parse_isalpha(int c)
314{
315 return parse_isupper(c) || parse_islower(c);
316}
317
318#undef ISALPHA
319#define ISALPHA(c) parse_isalpha(c)
320
321static inline int
322parse_isdigit(int c)
323{
324 return '0' <= c && c <= '9';
325}
326
327#undef ISDIGIT
328#define ISDIGIT(c) parse_isdigit(c)
329
330static inline int
331parse_isalnum(int c)
332{
333 return ISALPHA(c) || ISDIGIT(c);
334}
335
336#undef ISALNUM
337#define ISALNUM(c) parse_isalnum(c)
338
339static inline int
340parse_isxdigit(int c)
341{
342 return ISDIGIT(c) || ('A' <= c && c <= 'F') || ('a' <= c && c <= 'f');
343}
344
345#undef ISXDIGIT
346#define ISXDIGIT(c) parse_isxdigit(c)
347
348#include "parser_st.h"
349
350#undef STRCASECMP
351#define STRCASECMP rb_parser_st_locale_insensitive_strcasecmp
352
353#undef STRNCASECMP
354#define STRNCASECMP rb_parser_st_locale_insensitive_strncasecmp
355
356#ifdef RIPPER
357#include "ripper_init.h"
358#endif
359
360enum rescue_context {
361 before_rescue,
362 after_rescue,
363 after_else,
364 after_ensure,
365};
366
368 unsigned int in_defined: 1;
369 unsigned int in_kwarg: 1;
370 unsigned int in_argdef: 1;
371 unsigned int in_def: 1;
372 unsigned int in_class: 1;
373 unsigned int has_trailing_semicolon: 1;
374 BITFIELD(enum rb_parser_shareability, shareable_constant_value, 2);
375 BITFIELD(enum rescue_context, in_rescue, 2);
376 unsigned int cant_return: 1;
377 unsigned int in_alt_pattern: 1;
378 unsigned int capture_in_pattern: 1;
379};
380
381typedef struct RNode_DEF_TEMP rb_node_def_temp_t;
382
383#if defined(__GNUC__) && !defined(__clang__)
384// Suppress "parameter passing for argument of type 'struct
385// lex_context' changed" notes. `struct lex_context` is file scope,
386// and has no ABI compatibility issue.
390// Not sure why effective even after popped.
391#endif
392
393#include "parse.h"
394
395#define NO_LEX_CTXT (struct lex_context){0}
396
397#ifndef WARN_PAST_SCOPE
398# define WARN_PAST_SCOPE 0
399#endif
400
401#define TAB_WIDTH 8
402
403#define yydebug (p->debug) /* disable the global variable definition */
404
405#define YYFPRINTF(out, ...) rb_parser_printf(p, __VA_ARGS__)
406#define YY_LOCATION_PRINT(File, loc, p) \
407 rb_parser_printf(p, "%d.%d-%d.%d", \
408 (loc).beg_pos.lineno, (loc).beg_pos.column,\
409 (loc).end_pos.lineno, (loc).end_pos.column)
410#define YYLLOC_DEFAULT(Current, Rhs, N) \
411 do \
412 if (N) \
413 { \
414 (Current).beg_pos = YYRHSLOC(Rhs, 1).beg_pos; \
415 (Current).end_pos = YYRHSLOC(Rhs, N).end_pos; \
416 } \
417 else \
418 { \
419 (Current).beg_pos = YYRHSLOC(Rhs, 0).end_pos; \
420 (Current).end_pos = YYRHSLOC(Rhs, 0).end_pos; \
421 } \
422 while (0)
423#define YY_(Msgid) \
424 (((Msgid)[0] == 'm') && (strcmp((Msgid), "memory exhausted") == 0) ? \
425 "nesting too deep" : (Msgid))
426
427#define RUBY_SET_YYLLOC_FROM_STRTERM_HEREDOC(Current) \
428 rb_parser_set_location_from_strterm_heredoc(p, &p->lex.strterm->u.heredoc, &(Current))
429#define RUBY_SET_YYLLOC_OF_DELAYED_TOKEN(Current) \
430 rb_parser_set_location_of_delayed_token(p, &(Current))
431#define RUBY_SET_YYLLOC_OF_HEREDOC_END(Current) \
432 rb_parser_set_location_of_heredoc_end(p, &(Current))
433#define RUBY_SET_YYLLOC_OF_DUMMY_END(Current) \
434 rb_parser_set_location_of_dummy_end(p, &(Current))
435#define RUBY_SET_YYLLOC_OF_NONE(Current) \
436 rb_parser_set_location_of_none(p, &(Current))
437#define RUBY_SET_YYLLOC(Current) \
438 rb_parser_set_location(p, &(Current))
439#define RUBY_INIT_YYLLOC() \
440 { \
441 {p->ruby_sourceline, parser_column(p->lex.ptok - p->lex.pbeg)}, \
442 {p->ruby_sourceline, parser_column(p->lex.pcur - p->lex.pbeg)}, \
443 }
444
445/* Saturate instead of wrapping to a column before the line. */
446static inline int
447parser_column(long pos)
448{
449#if SIZEOF_INT < SIZEOF_LONG
450 if (pos > INT_MAX) return INT_MAX;
451#endif
452 return (int)pos;
453}
454
455#define IS_lex_state_for(x, ls) ((x) & (ls))
456#define IS_lex_state_all_for(x, ls) (((x) & (ls)) == (ls))
457#define IS_lex_state(ls) IS_lex_state_for(p->lex.state, (ls))
458#define IS_lex_state_all(ls) IS_lex_state_all_for(p->lex.state, (ls))
459
460# define SET_LEX_STATE(ls) \
461 parser_set_lex_state(p, ls, __LINE__)
462static inline enum lex_state_e parser_set_lex_state(struct parser_params *p, enum lex_state_e ls, int line);
463
464typedef VALUE stack_type;
465
466static const rb_code_location_t NULL_LOC = { {0, -1}, {0, -1} };
467
468# define SHOW_BITSTACK(stack, name) (p->debug ? rb_parser_show_bitstack(p, stack, name, __LINE__) : (void)0)
469# define BITSTACK_PUSH(stack, n) (((p->stack) = ((p->stack)<<1)|((n)&1)), SHOW_BITSTACK(p->stack, #stack"(push)"))
470# define BITSTACK_POP(stack) (((p->stack) = (p->stack) >> 1), SHOW_BITSTACK(p->stack, #stack"(pop)"))
471# define BITSTACK_SET_P(stack) (SHOW_BITSTACK(p->stack, #stack), (p->stack)&1)
472# define BITSTACK_SET(stack, n) ((p->stack)=(n), SHOW_BITSTACK(p->stack, #stack"(set)"))
473
474/* A flag to identify keyword_do_cond, "do" keyword after condition expression.
475 Examples: `while ... do`, `until ... do`, and `for ... in ... do` */
476#define COND_PUSH(n) BITSTACK_PUSH(cond_stack, (n))
477#define COND_POP() BITSTACK_POP(cond_stack)
478#define COND_P() BITSTACK_SET_P(cond_stack)
479#define COND_SET(n) BITSTACK_SET(cond_stack, (n))
480
481/* A flag to identify keyword_do_block; "do" keyword after command_call.
482 Example: `foo 1, 2 do`. */
483#define CMDARG_PUSH(n) BITSTACK_PUSH(cmdarg_stack, (n))
484#define CMDARG_POP() BITSTACK_POP(cmdarg_stack)
485#define CMDARG_P() BITSTACK_SET_P(cmdarg_stack)
486#define CMDARG_SET(n) BITSTACK_SET(cmdarg_stack, (n))
487
488struct vtable {
489 ID *tbl;
490 int pos;
491 int capa;
492 struct vtable *prev;
493};
494
496 struct vtable *args;
497 struct vtable *vars;
498 struct vtable *used;
499# if WARN_PAST_SCOPE
500 struct vtable *past;
501# endif
502 struct local_vars *prev;
503 struct {
504 NODE *outer, *inner, *current;
505 } numparam;
506 NODE *it;
507};
508
510 NODE *node;
511 YYLTYPE opening_loc;
512 YYLTYPE closing_loc;
514
515enum {
516 ORDINAL_PARAM = -1,
517 NO_PARAM = 0,
518 NUMPARAM_MAX = 9,
519};
520
521#define DVARS_INHERIT ((void*)1)
522#define DVARS_TOPSCOPE NULL
523#define DVARS_TERMINAL_P(tbl) ((tbl) == DVARS_INHERIT || (tbl) == DVARS_TOPSCOPE)
524
525typedef struct token_info {
526 const char *token;
527 rb_code_position_t beg;
528 int indent;
529 int nonspc;
530 struct token_info *next;
531} token_info;
532
534 const rb_code_position_t *pos;
535 struct end_expect_token_locations *prev;
536} end_expect_token_locations_t;
537
539 struct parser_string_buffer_elem *next;
540 long len; /* Total length of allocated buf */
541 long used; /* Current usage of buf */
542 rb_parser_string_t *buf[FLEX_ARY_LEN];
543} parser_string_buffer_elem_t;
544
545typedef struct parser_string_buffer {
546 parser_string_buffer_elem_t *head;
547 parser_string_buffer_elem_t *last;
548} parser_string_buffer_t;
549
550#define AFTER_HEREDOC_WITHOUT_TERMINATOR ((rb_parser_string_t *)1)
551
552/*
553 Structure of Lexer Buffer:
554
555 lex.pbeg lex.ptok lex.pcur lex.pend
556 | | | |
557 |------------+------------+------------|
558 |<---------->|
559 token
560*/
562 YYSTYPE *lval;
563 YYLTYPE *yylloc;
564
565 struct {
566 rb_strterm_t *strterm;
567 rb_parser_lex_gets_func *gets;
568 rb_parser_input_data input;
569 parser_string_buffer_t string_buffer;
570 rb_parser_string_t *lastline;
571 rb_parser_string_t *nextline;
572 const char *pbeg;
573 const char *pcur;
574 const char *pend;
575 const char *ptok;
576 enum lex_state_e state;
577 /* track the nest level of any parens "()[]{}" */
578 int paren_nest;
579 /* keep p->lex.paren_nest at the beginning of lambda "->" to detect tLAMBEG and keyword_do_LAMBDA */
580 int lpar_beg;
581 /* track the nest level of only braces "{}" */
582 int brace_nest;
583 } lex;
584 stack_type cond_stack;
585 stack_type cmdarg_stack;
586 int tokidx;
587 int toksiz;
588 int heredoc_end;
589 int heredoc_indent;
590 int heredoc_line_indent;
591 char *tokenbuf;
592 struct local_vars *lvtbl;
593 st_table *pvtbl;
594 st_table *pktbl;
595 int line_count;
596 int ruby_sourceline; /* current line no. */
597 const char *ruby_sourcefile; /* current source file */
598 VALUE ruby_sourcefile_string;
599 rb_encoding *enc;
600 token_info *token_info;
601 st_table *case_labels;
602 rb_node_exits_t *exits;
603
604 VALUE debug_buffer;
605 VALUE debug_output;
606
607 struct {
608 rb_parser_string_t *token;
609 int beg_line;
610 int beg_col;
611 int end_line;
612 int end_col;
613 } delayed;
614
615 rb_ast_t *ast;
616 int node_id;
617
618 st_table *warn_duplicate_keys_table;
619
620 int max_numparam;
621 ID it_id;
622
623 struct lex_context ctxt;
624
625 NODE *eval_tree_begin;
626 NODE *eval_tree;
627 const struct rb_iseq_struct *parent_iseq;
628
629#ifdef UNIVERSAL_PARSER
630 const rb_parser_config_t *config;
631#endif
632 /* compile_option */
633 signed int frozen_string_literal:2; /* -1: not specified, 0: false, 1: true */
634
635 unsigned int command_start:1;
636 unsigned int eofp: 1;
637 unsigned int ruby__end__seen: 1;
638 unsigned int debug: 1;
639 unsigned int has_shebang: 1;
640 unsigned int token_seen: 1;
641 unsigned int token_info_enabled: 1;
642# if WARN_PAST_SCOPE
643 unsigned int past_scope_enabled: 1;
644# endif
645 unsigned int error_p: 1;
646 unsigned int cr_seen: 1;
647
648#ifndef RIPPER
649 /* Ruby core only */
650
651 unsigned int do_print: 1;
652 unsigned int do_loop: 1;
653 unsigned int do_chomp: 1;
654 unsigned int do_split: 1;
655 unsigned int error_tolerant: 1;
656 unsigned int keep_tokens: 1;
657
658 VALUE error_buffer;
659 rb_parser_ary_t *debug_lines;
660 /*
661 * Store specific keyword locations to generate dummy end token.
662 * Refer to the tail of list element.
663 */
664 end_expect_token_locations_t *end_expect_token_locations;
665 /* id for terms */
666 int token_id;
667 /* Array for term tokens */
668 rb_parser_ary_t *tokens;
669#else
670 /* Ripper only */
671
672 VALUE value;
673 VALUE result;
674 VALUE parsing_thread;
675 VALUE s_value; /* Token VALUE */
676 VALUE s_lvalue; /* VALUE generated by rule action (reduce) */
677 VALUE s_value_stack;
678#endif
679};
680
681#define NUMPARAM_ID_P(id) numparam_id_p(p, id)
682#define NUMPARAM_ID_TO_IDX(id) (unsigned int)(((id) >> ID_SCOPE_SHIFT) - (tNUMPARAM_1 - 1))
683#define NUMPARAM_IDX_TO_ID(idx) TOKEN2LOCALID((tNUMPARAM_1 - 1 + (idx)))
684static int
685numparam_id_p(struct parser_params *p, ID id)
686{
687 if (!is_local_id(id) || id < (tNUMPARAM_1 << ID_SCOPE_SHIFT)) return 0;
688 unsigned int idx = NUMPARAM_ID_TO_IDX(id);
689 return idx > 0 && idx <= NUMPARAM_MAX;
690}
691static void numparam_name(struct parser_params *p, ID id);
692
693#ifdef RIPPER
694static void
695after_shift(struct parser_params *p)
696{
697 if (p->debug) {
698 rb_parser_printf(p, "after-shift: %+"PRIsVALUE"\n", p->s_value);
699 }
700 rb_ary_push(p->s_value_stack, p->s_value);
701 p->s_value = Qnil;
702}
703
704static void
705before_reduce(int len, struct parser_params *p)
706{
707 // Initialize $$ with $1.
708 if (len) p->s_lvalue = rb_ary_entry(p->s_value_stack, -len);
709}
710
711static void
712after_reduce(int len, struct parser_params *p)
713{
714 for (int i = 0; i < len; i++) {
715 VALUE tos = rb_ary_pop(p->s_value_stack);
716 if (p->debug) {
717 rb_parser_printf(p, "after-reduce pop: %+"PRIsVALUE"\n", tos);
718 }
719 }
720 if (p->debug) {
721 rb_parser_printf(p, "after-reduce push: %+"PRIsVALUE"\n", p->s_lvalue);
722 }
723 rb_ary_push(p->s_value_stack, p->s_lvalue);
724 p->s_lvalue = Qnil;
725}
726
727static void
728after_shift_error_token(struct parser_params *p)
729{
730 if (p->debug) {
731 rb_parser_printf(p, "after-shift-error-token:\n");
732 }
733 rb_ary_push(p->s_value_stack, Qnil);
734}
735
736static void
737after_pop_stack(int len, struct parser_params *p)
738{
739 for (int i = 0; i < len; i++) {
740 VALUE tos = rb_ary_pop(p->s_value_stack);
741 if (p->debug) {
742 rb_parser_printf(p, "after-pop-stack pop: %+"PRIsVALUE"\n", tos);
743 }
744 }
745}
746#else
747static void
748after_shift(struct parser_params *p)
749{
750}
751
752static void
753before_reduce(int len, struct parser_params *p)
754{
755}
756
757static void
758after_reduce(int len, struct parser_params *p)
759{
760}
761
762static void
763after_shift_error_token(struct parser_params *p)
764{
765}
766
767static void
768after_pop_stack(int len, struct parser_params *p)
769{
770}
771#endif
772
773#define intern_cstr(n,l,en) rb_intern3(n,l,en)
774
775#define STRING_NEW0() rb_parser_encoding_string_new(p,0,0,p->enc)
776
777#define STR_NEW(ptr,len) rb_enc_str_new((ptr),(len),p->enc)
778#define STR_NEW0() rb_enc_str_new(0,0,p->enc)
779#define STR_NEW2(ptr) rb_enc_str_new((ptr),strlen(ptr),p->enc)
780#define STR_NEW3(ptr,len,e,func) parser_str_new(p, (ptr),(len),(e),(func),p->enc)
781#define TOK_INTERN() intern_cstr(tok(p), toklen(p), p->enc)
782#define VALID_SYMNAME_P(s, l, enc, type) (rb_enc_symname_type(s, l, enc, (1U<<(type))) == (int)(type))
783
784#ifndef RIPPER
785static inline int
786char_at_end(struct parser_params *p, VALUE str, int when_empty)
787{
788 long len = RSTRING_LEN(str);
789 return len > 0 ? (unsigned char)RSTRING_PTR(str)[len-1] : when_empty;
790}
791#endif
792
793static void
794pop_pvtbl(struct parser_params *p, st_table *tbl)
795{
796 st_free_table(p->pvtbl);
797 p->pvtbl = tbl;
798}
799
800static void
801pop_pktbl(struct parser_params *p, st_table *tbl)
802{
803 if (p->pktbl) st_free_table(p->pktbl);
804 p->pktbl = tbl;
805}
806
807#define STRING_BUF_DEFAULT_LEN 16
808
809static void
810string_buffer_init(struct parser_params *p)
811{
812 parser_string_buffer_t *buf = &p->lex.string_buffer;
813 const size_t size = offsetof(parser_string_buffer_elem_t, buf) + sizeof(rb_parser_string_t *) * STRING_BUF_DEFAULT_LEN;
814
815 buf->head = buf->last = xmalloc(size);
816 buf->head->len = STRING_BUF_DEFAULT_LEN;
817 buf->head->used = 0;
818 buf->head->next = NULL;
819}
820
821static void
822string_buffer_append(struct parser_params *p, rb_parser_string_t *str)
823{
824 parser_string_buffer_t *buf = &p->lex.string_buffer;
825
826 if (buf->head->used >= buf->head->len) {
827 parser_string_buffer_elem_t *elem;
828 long n = buf->head->len * 2;
829 const size_t size = offsetof(parser_string_buffer_elem_t, buf) + sizeof(rb_parser_string_t *) * n;
830
831 elem = xmalloc(size);
832 elem->len = n;
833 elem->used = 0;
834 elem->next = NULL;
835 buf->last->next = elem;
836 buf->last = elem;
837 }
838 buf->last->buf[buf->last->used++] = str;
839}
840
841static void
842string_buffer_free(struct parser_params *p)
843{
844 parser_string_buffer_elem_t *elem = p->lex.string_buffer.head;
845
846 while (elem) {
847 parser_string_buffer_elem_t *next_elem = elem->next;
848
849 for (long i = 0; i < elem->used; i++) {
850 rb_parser_string_free(p, elem->buf[i]);
851 }
852
853 xfree(elem);
854 elem = next_elem;
855 }
856}
857
858#ifndef RIPPER
859static void flush_debug_buffer(struct parser_params *p, VALUE out, VALUE str);
860
861static void
862debug_end_expect_token_locations(struct parser_params *p, const char *name)
863{
864 if(p->debug) {
865 VALUE mesg = rb_sprintf("%s: [", name);
866 int i = 0;
867 for (end_expect_token_locations_t *loc = p->end_expect_token_locations; loc; loc = loc->prev) {
868 if (i > 0)
869 rb_str_cat_cstr(mesg, ", ");
870 rb_str_catf(mesg, "[%d, %d]", loc->pos->lineno, loc->pos->column);
871 i++;
872 }
873 rb_str_cat_cstr(mesg, "]\n");
874 flush_debug_buffer(p, p->debug_output, mesg);
875 }
876}
877
878static void
879push_end_expect_token_locations(struct parser_params *p, const rb_code_position_t *pos)
880{
881 if(!p->error_tolerant) return;
882
883 end_expect_token_locations_t *locations;
884 locations = ALLOC(end_expect_token_locations_t);
885 locations->pos = pos;
886 locations->prev = p->end_expect_token_locations;
887 p->end_expect_token_locations = locations;
888
889 debug_end_expect_token_locations(p, "push_end_expect_token_locations");
890}
891
892static void
893pop_end_expect_token_locations(struct parser_params *p)
894{
895 if(!p->end_expect_token_locations) return;
896
897 end_expect_token_locations_t *locations = p->end_expect_token_locations->prev;
898 ruby_sized_xfree(p->end_expect_token_locations, sizeof(end_expect_token_locations_t));
899 p->end_expect_token_locations = locations;
900
901 debug_end_expect_token_locations(p, "pop_end_expect_token_locations");
902}
903
904static end_expect_token_locations_t *
905peek_end_expect_token_locations(struct parser_params *p)
906{
907 return p->end_expect_token_locations;
908}
909
910static const char *
911parser_token2char(struct parser_params *p, enum yytokentype tok)
912{
913 switch ((int) tok) {
914#define TOKEN2CHAR(tok) case tok: return (#tok);
915#define TOKEN2CHAR2(tok, name) case tok: return (name);
916 TOKEN2CHAR2(' ', "word_sep");
917 TOKEN2CHAR2('!', "!")
918 TOKEN2CHAR2('%', "%");
919 TOKEN2CHAR2('&', "&");
920 TOKEN2CHAR2('*', "*");
921 TOKEN2CHAR2('+', "+");
922 TOKEN2CHAR2('-', "-");
923 TOKEN2CHAR2('/', "/");
924 TOKEN2CHAR2('<', "<");
925 TOKEN2CHAR2('=', "=");
926 TOKEN2CHAR2('>', ">");
927 TOKEN2CHAR2('?', "?");
928 TOKEN2CHAR2('^', "^");
929 TOKEN2CHAR2('|', "|");
930 TOKEN2CHAR2('~', "~");
931 TOKEN2CHAR2(':', ":");
932 TOKEN2CHAR2(',', ",");
933 TOKEN2CHAR2('.', ".");
934 TOKEN2CHAR2(';', ";");
935 TOKEN2CHAR2('`', "`");
936 TOKEN2CHAR2('\n', "nl");
937 TOKEN2CHAR2('{', "\"{\"");
938 TOKEN2CHAR2('}', "\"}\"");
939 TOKEN2CHAR2('[', "\"[\"");
940 TOKEN2CHAR2(']', "\"]\"");
941 TOKEN2CHAR2('(', "\"(\"");
942 TOKEN2CHAR2(')', "\")\"");
943 TOKEN2CHAR2('\\', "backslash");
944 TOKEN2CHAR(keyword_class);
945 TOKEN2CHAR(keyword_module);
946 TOKEN2CHAR(keyword_def);
947 TOKEN2CHAR(keyword_undef);
948 TOKEN2CHAR(keyword_begin);
949 TOKEN2CHAR(keyword_rescue);
950 TOKEN2CHAR(keyword_ensure);
951 TOKEN2CHAR(keyword_end);
952 TOKEN2CHAR(keyword_if);
953 TOKEN2CHAR(keyword_unless);
954 TOKEN2CHAR(keyword_then);
955 TOKEN2CHAR(keyword_elsif);
956 TOKEN2CHAR(keyword_else);
957 TOKEN2CHAR(keyword_case);
958 TOKEN2CHAR(keyword_when);
959 TOKEN2CHAR(keyword_while);
960 TOKEN2CHAR(keyword_until);
961 TOKEN2CHAR(keyword_for);
962 TOKEN2CHAR(keyword_break);
963 TOKEN2CHAR(keyword_next);
964 TOKEN2CHAR(keyword_redo);
965 TOKEN2CHAR(keyword_retry);
966 TOKEN2CHAR(keyword_in);
967 TOKEN2CHAR(keyword_do);
968 TOKEN2CHAR(keyword_do_cond);
969 TOKEN2CHAR(keyword_do_block);
970 TOKEN2CHAR(keyword_do_LAMBDA);
971 TOKEN2CHAR(keyword_return);
972 TOKEN2CHAR(keyword_yield);
973 TOKEN2CHAR(keyword_super);
974 TOKEN2CHAR(keyword_self);
975 TOKEN2CHAR(keyword_nil);
976 TOKEN2CHAR(keyword_true);
977 TOKEN2CHAR(keyword_false);
978 TOKEN2CHAR(keyword_and);
979 TOKEN2CHAR(keyword_or);
980 TOKEN2CHAR(keyword_not);
981 TOKEN2CHAR(modifier_if);
982 TOKEN2CHAR(modifier_unless);
983 TOKEN2CHAR(modifier_while);
984 TOKEN2CHAR(modifier_until);
985 TOKEN2CHAR(modifier_rescue);
986 TOKEN2CHAR(keyword_alias);
987 TOKEN2CHAR(keyword_defined);
988 TOKEN2CHAR(keyword_BEGIN);
989 TOKEN2CHAR(keyword_END);
990 TOKEN2CHAR(keyword__LINE__);
991 TOKEN2CHAR(keyword__FILE__);
992 TOKEN2CHAR(keyword__ENCODING__);
993 TOKEN2CHAR(tIDENTIFIER);
994 TOKEN2CHAR(tFID);
995 TOKEN2CHAR(tGVAR);
996 TOKEN2CHAR(tIVAR);
997 TOKEN2CHAR(tCONSTANT);
998 TOKEN2CHAR(tCVAR);
999 TOKEN2CHAR(tLABEL);
1000 TOKEN2CHAR(tINTEGER);
1001 TOKEN2CHAR(tFLOAT);
1002 TOKEN2CHAR(tRATIONAL);
1003 TOKEN2CHAR(tIMAGINARY);
1004 TOKEN2CHAR(tCHAR);
1005 TOKEN2CHAR(tNTH_REF);
1006 TOKEN2CHAR(tBACK_REF);
1007 TOKEN2CHAR(tSTRING_CONTENT);
1008 TOKEN2CHAR(tREGEXP_END);
1009 TOKEN2CHAR(tDUMNY_END);
1010 TOKEN2CHAR(tSP);
1011 TOKEN2CHAR(tUPLUS);
1012 TOKEN2CHAR(tUMINUS);
1013 TOKEN2CHAR(tPOW);
1014 TOKEN2CHAR(tCMP);
1015 TOKEN2CHAR(tEQ);
1016 TOKEN2CHAR(tEQQ);
1017 TOKEN2CHAR(tNEQ);
1018 TOKEN2CHAR(tGEQ);
1019 TOKEN2CHAR(tLEQ);
1020 TOKEN2CHAR(tANDOP);
1021 TOKEN2CHAR(tOROP);
1022 TOKEN2CHAR(tMATCH);
1023 TOKEN2CHAR(tNMATCH);
1024 TOKEN2CHAR(tDOT2);
1025 TOKEN2CHAR(tDOT3);
1026 TOKEN2CHAR(tBDOT2);
1027 TOKEN2CHAR(tBDOT3);
1028 TOKEN2CHAR(tAREF);
1029 TOKEN2CHAR(tASET);
1030 TOKEN2CHAR(tLSHFT);
1031 TOKEN2CHAR(tRSHFT);
1032 TOKEN2CHAR(tANDDOT);
1033 TOKEN2CHAR(tCOLON2);
1034 TOKEN2CHAR(tCOLON3);
1035 TOKEN2CHAR(tOP_ASGN);
1036 TOKEN2CHAR(tASSOC);
1037 TOKEN2CHAR(tLPAREN);
1038 TOKEN2CHAR(tLPAREN_ARG);
1039 TOKEN2CHAR(tLBRACK);
1040 TOKEN2CHAR(tLBRACE);
1041 TOKEN2CHAR(tLBRACE_ARG);
1042 TOKEN2CHAR(tSTAR);
1043 TOKEN2CHAR(tDSTAR);
1044 TOKEN2CHAR(tAMPER);
1045 TOKEN2CHAR(tLAMBDA);
1046 TOKEN2CHAR(tSYMBEG);
1047 TOKEN2CHAR(tSTRING_BEG);
1048 TOKEN2CHAR(tXSTRING_BEG);
1049 TOKEN2CHAR(tREGEXP_BEG);
1050 TOKEN2CHAR(tWORDS_BEG);
1051 TOKEN2CHAR(tQWORDS_BEG);
1052 TOKEN2CHAR(tSYMBOLS_BEG);
1053 TOKEN2CHAR(tQSYMBOLS_BEG);
1054 TOKEN2CHAR(tSTRING_END);
1055 TOKEN2CHAR(tSTRING_DEND);
1056 TOKEN2CHAR(tSTRING_DBEG);
1057 TOKEN2CHAR(tSTRING_DVAR);
1058 TOKEN2CHAR(tLAMBEG);
1059 TOKEN2CHAR(tLABEL_END);
1060 TOKEN2CHAR(tIGNORED_NL);
1061 TOKEN2CHAR(tCOMMENT);
1062 TOKEN2CHAR(tEMBDOC_BEG);
1063 TOKEN2CHAR(tEMBDOC);
1064 TOKEN2CHAR(tEMBDOC_END);
1065 TOKEN2CHAR(tHEREDOC_BEG);
1066 TOKEN2CHAR(tHEREDOC_END);
1067 TOKEN2CHAR(k__END__);
1068 TOKEN2CHAR(tLOWEST);
1069 TOKEN2CHAR(tUMINUS_NUM);
1070 TOKEN2CHAR(tLAST_TOKEN);
1071#undef TOKEN2CHAR
1072#undef TOKEN2CHAR2
1073 }
1074
1075 rb_bug("parser_token2id: unknown token %d", tok);
1076
1078}
1079#else
1080static void
1081push_end_expect_token_locations(struct parser_params *p, const rb_code_position_t *pos)
1082{
1083}
1084
1085static void
1086pop_end_expect_token_locations(struct parser_params *p)
1087{
1088}
1089#endif
1090
1091RBIMPL_ATTR_NONNULL((1, 2, 3))
1092static int parser_yyerror(struct parser_params*, const YYLTYPE *yylloc, const char*);
1093RBIMPL_ATTR_NONNULL((1, 2))
1094static int parser_yyerror0(struct parser_params*, const char*);
1095#define yyerror0(msg) parser_yyerror0(p, (msg))
1096#define yyerror1(loc, msg) parser_yyerror(p, (loc), (msg))
1097#define yyerror(yylloc, p, msg) parser_yyerror(p, yylloc, msg)
1098#define token_flush(ptr) ((ptr)->lex.ptok = (ptr)->lex.pcur)
1099#define lex_goto_eol(p) ((p)->lex.pcur = (p)->lex.pend)
1100#define lex_eol_p(p) lex_eol_n_p(p, 0)
1101#define lex_eol_n_p(p,n) lex_eol_ptr_n_p(p, (p)->lex.pcur, n)
1102#define lex_eol_ptr_p(p,ptr) lex_eol_ptr_n_p(p,ptr,0)
1103#define lex_eol_ptr_n_p(p,ptr,n) ((ptr)+(n) >= (p)->lex.pend)
1104
1105static void token_info_setup(token_info *ptinfo, const char *ptr, const rb_code_location_t *loc);
1106static void token_info_push(struct parser_params*, const char *token, const rb_code_location_t *loc);
1107static void token_info_pop(struct parser_params*, const char *token, const rb_code_location_t *loc);
1108static void token_info_warn(struct parser_params *p, const char *token, token_info *ptinfo_beg, int same, const rb_code_location_t *loc);
1109static void token_info_drop(struct parser_params *p, const char *token, rb_code_position_t beg_pos);
1110
1111#ifdef RIPPER
1112#define compile_for_eval (0)
1113#else
1114#define compile_for_eval (p->parent_iseq != 0)
1115#endif
1116
1117#define token_column ((int)(p->lex.ptok - p->lex.pbeg))
1118
1119#define CALL_Q_P(q) ((q) == tANDDOT)
1120#define NEW_QCALL(q,r,m,a,loc) (CALL_Q_P(q) ? NEW_QCALL0(r,m,a,loc) : NEW_CALL(r,m,a,loc))
1121
1122#define lambda_beginning_p() (p->lex.lpar_beg == p->lex.paren_nest)
1123
1124static enum yytokentype yylex(YYSTYPE*, YYLTYPE*, struct parser_params*);
1125
1126static inline void
1127rb_discard_node(struct parser_params *p, NODE *n)
1128{
1129 rb_ast_delete_node(p->ast, n);
1130}
1131
1132static 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);
1133static 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);
1134static rb_node_block_t *rb_node_block_new(struct parser_params *p, NODE *nd_head, const YYLTYPE *loc);
1135static 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);
1136static 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);
1137static 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);
1138static 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);
1139static 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);
1140static 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);
1141static 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);
1142static 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);
1143static 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);
1144static rb_node_iter_t *rb_node_iter_new(struct parser_params *p, rb_node_args_t *nd_args, NODE *nd_body, const YYLTYPE *loc);
1145static 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);
1146static rb_node_for_masgn_t *rb_node_for_masgn_new(struct parser_params *p, NODE *nd_var, const YYLTYPE *loc);
1147static rb_node_retry_t *rb_node_retry_new(struct parser_params *p, const YYLTYPE *loc);
1148static rb_node_begin_t *rb_node_begin_new(struct parser_params *p, NODE *nd_body, const YYLTYPE *loc);
1149static rb_node_rescue_t *rb_node_rescue_new(struct parser_params *p, NODE *nd_head, NODE *nd_resq, NODE *nd_else, const YYLTYPE *loc);
1150static 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);
1151static rb_node_ensure_t *rb_node_ensure_new(struct parser_params *p, NODE *nd_head, NODE *nd_ensr, const YYLTYPE *loc);
1152static 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);
1153static 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);
1154static rb_node_masgn_t *rb_node_masgn_new(struct parser_params *p, NODE *nd_head, NODE *nd_args, const YYLTYPE *loc);
1155static rb_node_lasgn_t *rb_node_lasgn_new(struct parser_params *p, ID nd_vid, NODE *nd_value, const YYLTYPE *loc);
1156static rb_node_dasgn_t *rb_node_dasgn_new(struct parser_params *p, ID nd_vid, NODE *nd_value, const YYLTYPE *loc);
1157static rb_node_gasgn_t *rb_node_gasgn_new(struct parser_params *p, ID nd_vid, NODE *nd_value, const YYLTYPE *loc);
1158static rb_node_iasgn_t *rb_node_iasgn_new(struct parser_params *p, ID nd_vid, NODE *nd_value, const YYLTYPE *loc);
1159static 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);
1160static rb_node_cvasgn_t *rb_node_cvasgn_new(struct parser_params *p, ID nd_vid, NODE *nd_value, const YYLTYPE *loc);
1161static 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);
1162static 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);
1163static 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);
1164static 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);
1165static 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);
1166static rb_node_call_t *rb_node_call_new(struct parser_params *p, NODE *nd_recv, ID nd_mid, NODE *nd_args, const YYLTYPE *loc);
1167static rb_node_opcall_t *rb_node_opcall_new(struct parser_params *p, NODE *nd_recv, ID nd_mid, NODE *nd_args, const YYLTYPE *loc);
1168static rb_node_fcall_t *rb_node_fcall_new(struct parser_params *p, ID nd_mid, NODE *nd_args, const YYLTYPE *loc);
1169static rb_node_vcall_t *rb_node_vcall_new(struct parser_params *p, ID nd_mid, const YYLTYPE *loc);
1170static rb_node_qcall_t *rb_node_qcall_new(struct parser_params *p, NODE *nd_recv, ID nd_mid, NODE *nd_args, const YYLTYPE *loc);
1171static 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);
1172static rb_node_zsuper_t * rb_node_zsuper_new(struct parser_params *p, const YYLTYPE *loc);
1173static rb_node_list_t *rb_node_list_new(struct parser_params *p, NODE *nd_head, const YYLTYPE *loc);
1174static rb_node_list_t *rb_node_list_new2(struct parser_params *p, NODE *nd_head, long nd_alen, NODE *nd_next, const YYLTYPE *loc);
1175static rb_node_zlist_t *rb_node_zlist_new(struct parser_params *p, const YYLTYPE *loc);
1176static rb_node_hash_t *rb_node_hash_new(struct parser_params *p, NODE *nd_head, const YYLTYPE *loc);
1177static rb_node_return_t *rb_node_return_new(struct parser_params *p, NODE *nd_stts, const YYLTYPE *loc, const YYLTYPE *keyword_loc);
1178static 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);
1179static rb_node_lvar_t *rb_node_lvar_new(struct parser_params *p, ID nd_vid, const YYLTYPE *loc);
1180static rb_node_dvar_t *rb_node_dvar_new(struct parser_params *p, ID nd_vid, const YYLTYPE *loc);
1181static rb_node_gvar_t *rb_node_gvar_new(struct parser_params *p, ID nd_vid, const YYLTYPE *loc);
1182static rb_node_ivar_t *rb_node_ivar_new(struct parser_params *p, ID nd_vid, const YYLTYPE *loc);
1183static rb_node_const_t *rb_node_const_new(struct parser_params *p, ID nd_vid, const YYLTYPE *loc);
1184static rb_node_cvar_t *rb_node_cvar_new(struct parser_params *p, ID nd_vid, const YYLTYPE *loc);
1185static rb_node_nth_ref_t *rb_node_nth_ref_new(struct parser_params *p, long nd_nth, const YYLTYPE *loc);
1186static rb_node_back_ref_t *rb_node_back_ref_new(struct parser_params *p, long nd_nth, const YYLTYPE *loc);
1187static rb_node_match2_t *rb_node_match2_new(struct parser_params *p, NODE *nd_recv, NODE *nd_value, const YYLTYPE *loc);
1188static rb_node_match3_t *rb_node_match3_new(struct parser_params *p, NODE *nd_recv, NODE *nd_value, const YYLTYPE *loc);
1189static rb_node_integer_t * rb_node_integer_new(struct parser_params *p, char* val, int base, const YYLTYPE *loc);
1190static rb_node_float_t * rb_node_float_new(struct parser_params *p, char* val, const YYLTYPE *loc);
1191static rb_node_rational_t * rb_node_rational_new(struct parser_params *p, char* val, int base, int seen_point, const YYLTYPE *loc);
1192static 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);
1193static rb_node_str_t *rb_node_str_new(struct parser_params *p, rb_parser_string_t *string, const YYLTYPE *loc);
1194static 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);
1195static rb_node_dstr_t *rb_node_dstr_new(struct parser_params *p, rb_parser_string_t *string, const YYLTYPE *loc);
1196static rb_node_xstr_t *rb_node_xstr_new(struct parser_params *p, rb_parser_string_t *string, const YYLTYPE *loc);
1197static 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);
1198static 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);
1199static 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);
1200static rb_node_once_t *rb_node_once_new(struct parser_params *p, NODE *nd_body, const YYLTYPE *loc);
1201static rb_node_args_t *rb_node_args_new(struct parser_params *p, const YYLTYPE *loc);
1202static rb_node_args_aux_t *rb_node_args_aux_new(struct parser_params *p, ID nd_pid, int nd_plen, const YYLTYPE *loc);
1203static rb_node_opt_arg_t *rb_node_opt_arg_new(struct parser_params *p, NODE *nd_body, const YYLTYPE *loc);
1204static rb_node_kw_arg_t *rb_node_kw_arg_new(struct parser_params *p, NODE *nd_body, const YYLTYPE *loc);
1205static rb_node_postarg_t *rb_node_postarg_new(struct parser_params *p, NODE *nd_1st, NODE *nd_2nd, const YYLTYPE *loc);
1206static rb_node_argscat_t *rb_node_argscat_new(struct parser_params *p, NODE *nd_head, NODE *nd_body, const YYLTYPE *loc);
1207static rb_node_argspush_t *rb_node_argspush_new(struct parser_params *p, NODE *nd_head, NODE *nd_body, const YYLTYPE *loc);
1208static rb_node_splat_t *rb_node_splat_new(struct parser_params *p, NODE *nd_head, const YYLTYPE *loc, const YYLTYPE *operator_loc);
1209static rb_node_block_pass_t *rb_node_block_pass_new(struct parser_params *p, NODE *nd_body, const YYLTYPE *loc, const YYLTYPE *operator_loc);
1210static rb_node_defn_t *rb_node_defn_new(struct parser_params *p, ID nd_mid, NODE *nd_defn, const YYLTYPE *loc);
1211static rb_node_defs_t *rb_node_defs_new(struct parser_params *p, NODE *nd_recv, ID nd_mid, NODE *nd_defn, const YYLTYPE *loc);
1212static 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);
1213static 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);
1214static rb_node_undef_t *rb_node_undef_new(struct parser_params *p, NODE *nd_undef, const YYLTYPE *loc);
1215static 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);
1216static 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);
1217static 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);
1218static 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);
1219static 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);
1220static 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);
1221static 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);
1222static rb_node_self_t *rb_node_self_new(struct parser_params *p, const YYLTYPE *loc);
1223static rb_node_nil_t *rb_node_nil_new(struct parser_params *p, const YYLTYPE *loc);
1224static rb_node_true_t *rb_node_true_new(struct parser_params *p, const YYLTYPE *loc);
1225static rb_node_false_t *rb_node_false_new(struct parser_params *p, const YYLTYPE *loc);
1226static rb_node_errinfo_t *rb_node_errinfo_new(struct parser_params *p, const YYLTYPE *loc);
1227static rb_node_defined_t *rb_node_defined_new(struct parser_params *p, NODE *nd_head, const YYLTYPE *loc, const YYLTYPE *keyword_loc);
1228static 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);
1229static rb_node_sym_t *rb_node_sym_new(struct parser_params *p, VALUE str, const YYLTYPE *loc);
1230static 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);
1231static rb_node_attrasgn_t *rb_node_attrasgn_new(struct parser_params *p, NODE *nd_recv, ID nd_mid, NODE *nd_args, const YYLTYPE *loc);
1232static 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);
1233static rb_node_aryptn_t *rb_node_aryptn_new(struct parser_params *p, NODE *pre_args, NODE *rest_arg, NODE *post_args, const YYLTYPE *loc);
1234static rb_node_hshptn_t *rb_node_hshptn_new(struct parser_params *p, NODE *nd_pconst, NODE *nd_pkwargs, NODE *nd_pkwrestarg, const YYLTYPE *loc);
1235static 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);
1236static rb_node_line_t *rb_node_line_new(struct parser_params *p, const YYLTYPE *loc);
1237static rb_node_file_t *rb_node_file_new(struct parser_params *p, VALUE str, const YYLTYPE *loc);
1238static rb_node_error_t *rb_node_error_new(struct parser_params *p, const YYLTYPE *loc);
1239
1240#define NEW_SCOPE(a,b,c,loc) (NODE *)rb_node_scope_new(p,a,b,c,loc)
1241#define NEW_SCOPE2(t,a,b,c,loc) (NODE *)rb_node_scope_new2(p,t,a,b,c,loc)
1242#define NEW_BLOCK(a,loc) (NODE *)rb_node_block_new(p,a,loc)
1243#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)
1244#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)
1245#define NEW_CASE(h,b,loc,ck_loc,ek_loc) (NODE *)rb_node_case_new(p,h,b,loc,ck_loc,ek_loc)
1246#define NEW_CASE2(b,loc,ck_loc,ek_loc) (NODE *)rb_node_case2_new(p,b,loc,ck_loc,ek_loc)
1247#define NEW_CASE3(h,b,loc,ck_loc,ek_loc) (NODE *)rb_node_case3_new(p,h,b,loc,ck_loc,ek_loc)
1248#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)
1249#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)
1250#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)
1251#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)
1252#define NEW_ITER(a,b,loc) (NODE *)rb_node_iter_new(p,a,b,loc)
1253#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)
1254#define NEW_FOR_MASGN(v,loc) (NODE *)rb_node_for_masgn_new(p,v,loc)
1255#define NEW_RETRY(loc) (NODE *)rb_node_retry_new(p,loc)
1256#define NEW_BEGIN(b,loc) (NODE *)rb_node_begin_new(p,b,loc)
1257#define NEW_RESCUE(b,res,e,loc) (NODE *)rb_node_rescue_new(p,b,res,e,loc)
1258#define NEW_RESBODY(a,v,ex,n,loc) (NODE *)rb_node_resbody_new(p,a,v,ex,n,loc)
1259#define NEW_ENSURE(b,en,loc) (NODE *)rb_node_ensure_new(p,b,en,loc)
1260#define NEW_AND(f,s,loc,op_loc) (NODE *)rb_node_and_new(p,f,s,loc,op_loc)
1261#define NEW_OR(f,s,loc,op_loc) (NODE *)rb_node_or_new(p,f,s,loc,op_loc)
1262#define NEW_MASGN(l,r,loc) rb_node_masgn_new(p,l,r,loc)
1263#define NEW_LASGN(v,val,loc) (NODE *)rb_node_lasgn_new(p,v,val,loc)
1264#define NEW_DASGN(v,val,loc) (NODE *)rb_node_dasgn_new(p,v,val,loc)
1265#define NEW_GASGN(v,val,loc) (NODE *)rb_node_gasgn_new(p,v,val,loc)
1266#define NEW_IASGN(v,val,loc) (NODE *)rb_node_iasgn_new(p,v,val,loc)
1267#define NEW_CDECL(v,val,path,share,loc) (NODE *)rb_node_cdecl_new(p,v,val,path,share,loc)
1268#define NEW_CVASGN(v,val,loc) (NODE *)rb_node_cvasgn_new(p,v,val,loc)
1269#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)
1270#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)
1271#define NEW_OP_ASGN_OR(i,val,loc) (NODE *)rb_node_op_asgn_or_new(p,i,val,loc)
1272#define NEW_OP_ASGN_AND(i,val,loc) (NODE *)rb_node_op_asgn_and_new(p,i,val,loc)
1273#define NEW_OP_CDECL(v,op,val,share,loc) (NODE *)rb_node_op_cdecl_new(p,v,val,op,share,loc)
1274#define NEW_CALL(r,m,a,loc) (NODE *)rb_node_call_new(p,r,m,a,loc)
1275#define NEW_OPCALL(r,m,a,loc) (NODE *)rb_node_opcall_new(p,r,m,a,loc)
1276#define NEW_FCALL(m,a,loc) rb_node_fcall_new(p,m,a,loc)
1277#define NEW_VCALL(m,loc) (NODE *)rb_node_vcall_new(p,m,loc)
1278#define NEW_QCALL0(r,m,a,loc) (NODE *)rb_node_qcall_new(p,r,m,a,loc)
1279#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)
1280#define NEW_ZSUPER(loc) (NODE *)rb_node_zsuper_new(p,loc)
1281#define NEW_LIST(a,loc) (NODE *)rb_node_list_new(p,a,loc)
1282#define NEW_LIST2(h,l,n,loc) (NODE *)rb_node_list_new2(p,h,l,n,loc)
1283#define NEW_ZLIST(loc) (NODE *)rb_node_zlist_new(p,loc)
1284#define NEW_HASH(a,loc) (NODE *)rb_node_hash_new(p,a,loc)
1285#define NEW_RETURN(s,loc,k_loc) (NODE *)rb_node_return_new(p,s,loc,k_loc)
1286#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)
1287#define NEW_LVAR(v,loc) (NODE *)rb_node_lvar_new(p,v,loc)
1288#define NEW_DVAR(v,loc) (NODE *)rb_node_dvar_new(p,v,loc)
1289#define NEW_GVAR(v,loc) (NODE *)rb_node_gvar_new(p,v,loc)
1290#define NEW_IVAR(v,loc) (NODE *)rb_node_ivar_new(p,v,loc)
1291#define NEW_CONST(v,loc) (NODE *)rb_node_const_new(p,v,loc)
1292#define NEW_CVAR(v,loc) (NODE *)rb_node_cvar_new(p,v,loc)
1293#define NEW_NTH_REF(n,loc) (NODE *)rb_node_nth_ref_new(p,n,loc)
1294#define NEW_BACK_REF(n,loc) (NODE *)rb_node_back_ref_new(p,n,loc)
1295#define NEW_MATCH2(n1,n2,loc) (NODE *)rb_node_match2_new(p,n1,n2,loc)
1296#define NEW_MATCH3(r,n2,loc) (NODE *)rb_node_match3_new(p,r,n2,loc)
1297#define NEW_INTEGER(val, base,loc) (NODE *)rb_node_integer_new(p,val,base,loc)
1298#define NEW_FLOAT(val,loc) (NODE *)rb_node_float_new(p,val,loc)
1299#define NEW_RATIONAL(val,base,seen_point,loc) (NODE *)rb_node_rational_new(p,val,base,seen_point,loc)
1300#define NEW_IMAGINARY(val,base,seen_point,numeric_type,loc) (NODE *)rb_node_imaginary_new(p,val,base,seen_point,numeric_type,loc)
1301#define NEW_STR(s,loc) (NODE *)rb_node_str_new(p,s,loc)
1302#define NEW_DSTR0(s,l,n,loc) (NODE *)rb_node_dstr_new0(p,s,l,n,loc)
1303#define NEW_DSTR(s,loc) (NODE *)rb_node_dstr_new(p,s,loc)
1304#define NEW_XSTR(s,loc) (NODE *)rb_node_xstr_new(p,s,loc)
1305#define NEW_DXSTR(s,l,n,loc) (NODE *)rb_node_dxstr_new(p,s,l,n,loc)
1306#define NEW_EVSTR(n,loc,o_loc,c_loc) (NODE *)rb_node_evstr_new(p,n,loc,o_loc,c_loc)
1307#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)
1308#define NEW_ONCE(b,loc) (NODE *)rb_node_once_new(p,b,loc)
1309#define NEW_ARGS(loc) rb_node_args_new(p,loc)
1310#define NEW_ARGS_AUX(r,b,loc) rb_node_args_aux_new(p,r,b,loc)
1311#define NEW_OPT_ARG(v,loc) rb_node_opt_arg_new(p,v,loc)
1312#define NEW_KW_ARG(v,loc) rb_node_kw_arg_new(p,v,loc)
1313#define NEW_POSTARG(i,v,loc) (NODE *)rb_node_postarg_new(p,i,v,loc)
1314#define NEW_ARGSCAT(a,b,loc) (NODE *)rb_node_argscat_new(p,a,b,loc)
1315#define NEW_ARGSPUSH(a,b,loc) (NODE *)rb_node_argspush_new(p,a,b,loc)
1316#define NEW_SPLAT(a,loc,op_loc) (NODE *)rb_node_splat_new(p,a,loc,op_loc)
1317#define NEW_BLOCK_PASS(b,loc,o_loc) rb_node_block_pass_new(p,b,loc,o_loc)
1318#define NEW_DEFN(i,s,loc) (NODE *)rb_node_defn_new(p,i,s,loc)
1319#define NEW_DEFS(r,i,s,loc) (NODE *)rb_node_defs_new(p,r,i,s,loc)
1320#define NEW_ALIAS(n,o,loc,k_loc) (NODE *)rb_node_alias_new(p,n,o,loc,k_loc)
1321#define NEW_VALIAS(n,o,loc,k_loc) (NODE *)rb_node_valias_new(p,n,o,loc,k_loc)
1322#define NEW_UNDEF(i,loc) (NODE *)rb_node_undef_new(p,i,loc)
1323#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)
1324#define NEW_MODULE(n,b,loc,mk_loc,ek_loc) (NODE *)rb_node_module_new(p,n,b,loc,mk_loc,ek_loc)
1325#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)
1326#define NEW_COLON2(c,i,loc,d_loc,n_loc) (NODE *)rb_node_colon2_new(p,c,i,loc,d_loc,n_loc)
1327#define NEW_COLON3(i,loc,d_loc,n_loc) (NODE *)rb_node_colon3_new(p,i,loc,d_loc,n_loc)
1328#define NEW_DOT2(b,e,loc,op_loc) (NODE *)rb_node_dot2_new(p,b,e,loc,op_loc)
1329#define NEW_DOT3(b,e,loc,op_loc) (NODE *)rb_node_dot3_new(p,b,e,loc,op_loc)
1330#define NEW_SELF(loc) (NODE *)rb_node_self_new(p,loc)
1331#define NEW_NIL(loc) (NODE *)rb_node_nil_new(p,loc)
1332#define NEW_TRUE(loc) (NODE *)rb_node_true_new(p,loc)
1333#define NEW_FALSE(loc) (NODE *)rb_node_false_new(p,loc)
1334#define NEW_ERRINFO(loc) (NODE *)rb_node_errinfo_new(p,loc)
1335#define NEW_DEFINED(e,loc,k_loc) (NODE *)rb_node_defined_new(p,e,loc, k_loc)
1336#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)
1337#define NEW_SYM(str,loc) (NODE *)rb_node_sym_new(p,str,loc)
1338#define NEW_DSYM(s,l,n,loc) (NODE *)rb_node_dsym_new(p,s,l,n,loc)
1339#define NEW_ATTRASGN(r,m,a,loc) (NODE *)rb_node_attrasgn_new(p,r,m,a,loc)
1340#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)
1341#define NEW_ARYPTN(pre,r,post,loc) (NODE *)rb_node_aryptn_new(p,pre,r,post,loc)
1342#define NEW_HSHPTN(c,kw,kwrest,loc) (NODE *)rb_node_hshptn_new(p,c,kw,kwrest,loc)
1343#define NEW_FNDPTN(pre,a,post,loc) (NODE *)rb_node_fndptn_new(p,pre,a,post,loc)
1344#define NEW_LINE(loc) (NODE *)rb_node_line_new(p,loc)
1345#define NEW_FILE(str,loc) (NODE *)rb_node_file_new(p,str,loc)
1346#define NEW_ENCODING(loc) (NODE *)rb_node_encoding_new(p,loc)
1347#define NEW_ERROR(loc) (NODE *)rb_node_error_new(p,loc)
1348
1349enum internal_node_type {
1350 NODE_INTERNAL_ONLY = NODE_LAST,
1351 NODE_DEF_TEMP,
1352 NODE_EXITS,
1353 NODE_INTERNAL_LAST
1354};
1355
1356static const char *
1357parser_node_name(int node)
1358{
1359 switch (node) {
1360 case NODE_DEF_TEMP:
1361 return "NODE_DEF_TEMP";
1362 case NODE_EXITS:
1363 return "NODE_EXITS";
1364 default:
1365 return ruby_node_name(node);
1366 }
1367}
1368
1369/* This node is parse.y internal */
1371 NODE node;
1372
1373 /* for NODE_DEFN/NODE_DEFS */
1374
1375 struct RNode *nd_def;
1376 ID nd_mid;
1377
1378 struct {
1379 int max_numparam;
1380 NODE *numparam_save;
1381 struct lex_context ctxt;
1382 } save;
1383};
1384
1385#define RNODE_DEF_TEMP(node) ((struct RNode_DEF_TEMP *)(node))
1386
1387static rb_node_break_t *rb_node_break_new(struct parser_params *p, NODE *nd_stts, const YYLTYPE *loc, const YYLTYPE *keyword_loc);
1388static rb_node_next_t *rb_node_next_new(struct parser_params *p, NODE *nd_stts, const YYLTYPE *loc, const YYLTYPE *keyword_loc);
1389static rb_node_redo_t *rb_node_redo_new(struct parser_params *p, const YYLTYPE *loc, const YYLTYPE *keyword_loc);
1390static rb_node_def_temp_t *rb_node_def_temp_new(struct parser_params *p, const YYLTYPE *loc);
1391static rb_node_def_temp_t *def_head_save(struct parser_params *p, rb_node_def_temp_t *n);
1392
1393#define NEW_BREAK(s,loc,k_loc) (NODE *)rb_node_break_new(p,s,loc,k_loc)
1394#define NEW_NEXT(s,loc,k_loc) (NODE *)rb_node_next_new(p,s,loc,k_loc)
1395#define NEW_REDO(loc,k_loc) (NODE *)rb_node_redo_new(p,loc,k_loc)
1396#define NEW_DEF_TEMP(loc) rb_node_def_temp_new(p,loc)
1397
1398/* Make a new internal node, which should not be appeared in the
1399 * result AST and does not have node_id and location. */
1400static NODE* node_new_internal(struct parser_params *p, enum node_type type, size_t size, size_t alignment);
1401#define NODE_NEW_INTERNAL(ndtype, type) (type *)node_new_internal(p, (enum node_type)(ndtype), sizeof(type), RUBY_ALIGNOF(type))
1402
1403static NODE *nd_set_loc(NODE *nd, const YYLTYPE *loc);
1404
1405static int
1406parser_get_node_id(struct parser_params *p)
1407{
1408 int node_id = p->node_id;
1409 p->node_id++;
1410 return node_id;
1411}
1412
1413static void
1414anddot_multiple_assignment_check(struct parser_params* p, const YYLTYPE *loc, ID id)
1415{
1416 if (id == tANDDOT) {
1417 yyerror1(loc, "&. inside multiple assignment destination");
1418 }
1419}
1420
1421static inline void
1422set_line_body(NODE *body, int line)
1423{
1424 if (!body) return;
1425 switch (nd_type(body)) {
1426 case NODE_RESCUE:
1427 case NODE_ENSURE:
1428 nd_set_line(body, line);
1429 }
1430}
1431
1432static void
1433set_embraced_location(NODE *node, const rb_code_location_t *beg, const rb_code_location_t *end)
1434{
1435 RNODE_ITER(node)->nd_body->nd_loc = code_loc_gen(beg, end);
1436 nd_set_line(node, beg->end_pos.lineno);
1437}
1438
1439static NODE *
1440last_expr_node(NODE *expr)
1441{
1442 while (expr) {
1443 if (nd_type_p(expr, NODE_BLOCK)) {
1444 expr = RNODE_BLOCK(RNODE_BLOCK(expr)->nd_end)->nd_head;
1445 }
1446 else if (nd_type_p(expr, NODE_BEGIN) && RNODE_BEGIN(expr)->nd_body) {
1447 expr = RNODE_BEGIN(expr)->nd_body;
1448 }
1449 else {
1450 break;
1451 }
1452 }
1453 return expr;
1454}
1455
1456#ifndef RIPPER
1457#define yyparse ruby_yyparse
1458#endif
1459
1460static NODE* cond(struct parser_params *p, NODE *node, const YYLTYPE *loc);
1461static NODE* method_cond(struct parser_params *p, NODE *node, const YYLTYPE *loc);
1462static NODE *new_nil_at(struct parser_params *p, const rb_code_position_t *pos);
1463static NODE *new_if(struct parser_params*,NODE*,NODE*,NODE*,const YYLTYPE*,const YYLTYPE*,const YYLTYPE*,const YYLTYPE*);
1464static NODE *new_unless(struct parser_params*,NODE*,NODE*,NODE*,const YYLTYPE*,const YYLTYPE*,const YYLTYPE*,const YYLTYPE*);
1465static NODE *logop(struct parser_params*,ID,NODE*,NODE*,const YYLTYPE*,const YYLTYPE*);
1466
1467static NODE *newline_node(NODE*);
1468static void fixpos(NODE*,NODE*);
1469
1470static int value_expr(struct parser_params*,NODE*);
1471static void void_expr(struct parser_params*,NODE*);
1472static NODE *remove_begin(NODE*);
1473static NODE *void_stmts(struct parser_params*,NODE*);
1474static void reduce_nodes(struct parser_params*,NODE**);
1475static void block_dup_check(struct parser_params*,NODE*,NODE*);
1476
1477static NODE *block_append(struct parser_params*,NODE*,NODE*);
1478static NODE *list_append(struct parser_params*,NODE*,NODE*);
1479static NODE *list_concat(NODE*,NODE*);
1480static NODE *arg_append(struct parser_params*,NODE*,NODE*,const YYLTYPE*);
1481static NODE *last_arg_append(struct parser_params *p, NODE *args, NODE *last_arg, const YYLTYPE *loc);
1482static NODE *rest_arg_append(struct parser_params *p, NODE *args, NODE *rest_arg, const YYLTYPE *loc);
1483static NODE *literal_concat(struct parser_params*,NODE*,NODE*,const YYLTYPE*);
1484static NODE *new_evstr(struct parser_params*,NODE*,const YYLTYPE*,const YYLTYPE*,const YYLTYPE*);
1485static NODE *new_dstr(struct parser_params*,NODE*,const YYLTYPE*);
1486static NODE *str2dstr(struct parser_params*,NODE*);
1487static NODE *evstr2dstr(struct parser_params*,NODE*);
1488static NODE *splat_array(NODE*);
1489static void mark_lvar_used(struct parser_params *p, NODE *rhs);
1490
1491static NODE *call_bin_op(struct parser_params*,NODE*,ID,NODE*,const YYLTYPE*,const YYLTYPE*);
1492static NODE *call_uni_op(struct parser_params*,NODE*,ID,const YYLTYPE*,const YYLTYPE*);
1493static NODE *new_qcall(struct parser_params* p, ID atype, NODE *recv, ID mid, NODE *args, const YYLTYPE *op_loc, const YYLTYPE *loc);
1494static 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);
1495static 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;}
1496static NODE *command_add_block(struct parser_params*p, NODE *m, NODE *b, const YYLTYPE *loc);
1497
1498static bool args_info_empty_p(struct rb_args_info *args);
1499static 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*);
1500static rb_node_args_t *new_args_tail(struct parser_params*,rb_node_kw_arg_t*,ID,ID,const YYLTYPE*);
1501static NODE *new_array_pattern(struct parser_params *p, NODE *constant, NODE *pre_arg, NODE *aryptn, const YYLTYPE *loc);
1502static NODE *new_array_pattern_tail(struct parser_params *p, NODE *pre_args, int has_rest, NODE *rest_arg, NODE *post_args, const YYLTYPE *loc);
1503static NODE *new_find_pattern(struct parser_params *p, NODE *constant, NODE *fndptn, const YYLTYPE *loc);
1504static NODE *new_find_pattern_tail(struct parser_params *p, NODE *pre_rest_arg, NODE *args, NODE *post_rest_arg, const YYLTYPE *loc);
1505static NODE *new_hash_pattern(struct parser_params *p, NODE *constant, NODE *hshptn, const YYLTYPE *loc);
1506static NODE *new_hash_pattern_tail(struct parser_params *p, NODE *kw_args, ID kw_rest_arg, const YYLTYPE *loc);
1507
1508static rb_node_kw_arg_t *new_kw_arg(struct parser_params *p, NODE *k, const YYLTYPE *loc);
1509static rb_node_args_t *args_with_numbered(struct parser_params*,rb_node_args_t*,int,ID);
1510
1511static NODE* negate_lit(struct parser_params*, NODE*,const YYLTYPE*);
1512static void no_blockarg(struct parser_params*,NODE*);
1513static NODE *ret_args(struct parser_params*,NODE*);
1514static NODE *arg_blk_pass(NODE*,rb_node_block_pass_t*);
1515static NODE *dsym_node(struct parser_params*,NODE*,const YYLTYPE*);
1516
1517static NODE *gettable(struct parser_params*,ID,const YYLTYPE*);
1518static NODE *assignable(struct parser_params*,ID,NODE*,const YYLTYPE*);
1519
1520static NODE *aryset(struct parser_params*,NODE*,NODE*,const YYLTYPE*);
1521static NODE *attrset(struct parser_params*,NODE*,ID,ID,const YYLTYPE*);
1522
1523static VALUE rb_backref_error(struct parser_params*,NODE*);
1524static NODE *node_assign(struct parser_params*,NODE*,NODE*,struct lex_context,const YYLTYPE*);
1525
1526static NODE *new_op_assign(struct parser_params *p, NODE *lhs, ID op, NODE *rhs, struct lex_context, const YYLTYPE *loc);
1527static 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);
1528static 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);
1529static NODE *new_const_op_assign(struct parser_params *p, NODE *lhs, ID op, NODE *rhs, struct lex_context, const YYLTYPE *loc);
1530static NODE *new_bodystmt(struct parser_params *p, NODE *head, NODE *rescue, NODE *rescue_else, NODE *ensure, const YYLTYPE *loc);
1531
1532static NODE *const_decl(struct parser_params *p, NODE* path, const YYLTYPE *loc);
1533
1534static rb_node_opt_arg_t *opt_arg_append(rb_node_opt_arg_t*, rb_node_opt_arg_t*);
1535static rb_node_kw_arg_t *kwd_append(rb_node_kw_arg_t*, rb_node_kw_arg_t*);
1536
1537static NODE *new_hash(struct parser_params *p, NODE *hash, const YYLTYPE *loc);
1538static NODE *new_unique_key_hash(struct parser_params *p, NODE *hash, const YYLTYPE *loc);
1539
1540static NODE *new_defined(struct parser_params *p, NODE *expr, const YYLTYPE *loc, const YYLTYPE *keyword_loc);
1541
1542static NODE *new_regexp(struct parser_params *, NODE *, int, const YYLTYPE *, const YYLTYPE *, const YYLTYPE *, const YYLTYPE *);
1543
1544#define make_list(list, loc) ((list) ? (nd_set_loc(list, loc), list) : NEW_ZLIST(loc))
1545
1546static NODE *new_xstring(struct parser_params *, NODE *, const YYLTYPE *loc);
1547
1548static NODE *symbol_append(struct parser_params *p, NODE *symbols, NODE *symbol);
1549
1550static NODE *match_op(struct parser_params*,NODE*,NODE*,const YYLTYPE*,const YYLTYPE*);
1551
1552static rb_ast_id_table_t *local_tbl(struct parser_params*);
1553
1554static VALUE reg_compile(struct parser_params*, rb_parser_string_t*, int);
1555static void reg_fragment_setenc(struct parser_params*, rb_parser_string_t*, int);
1556
1557static int literal_concat0(struct parser_params *p, rb_parser_string_t *head, rb_parser_string_t *tail);
1558static NODE *heredoc_dedent(struct parser_params*,NODE*);
1559
1560static void check_literal_when(struct parser_params *p, NODE *args, const YYLTYPE *loc);
1561
1562static 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);
1563
1564#ifdef RIPPER
1565#define get_value(idx) (rb_ary_entry(p->s_value_stack, idx))
1566#define set_value(val) (p->s_lvalue = val)
1567static VALUE assign_error(struct parser_params *p, const char *mesg, VALUE a);
1568static int id_is_var(struct parser_params *p, ID id);
1569#endif
1570
1571RUBY_SYMBOL_EXPORT_BEGIN
1572VALUE rb_parser_reg_compile(struct parser_params* p, VALUE str, int options);
1573int rb_reg_fragment_setenc(struct parser_params*, rb_parser_string_t *, int);
1574enum lex_state_e rb_parser_trace_lex_state(struct parser_params *, enum lex_state_e, enum lex_state_e, int);
1575VALUE rb_parser_lex_state_name(struct parser_params *p, enum lex_state_e state);
1576void rb_parser_show_bitstack(struct parser_params *, stack_type, const char *, int);
1577PRINTF_ARGS(void rb_parser_fatal(struct parser_params *p, const char *fmt, ...), 2, 3);
1578YYLTYPE *rb_parser_set_location_from_strterm_heredoc(struct parser_params *p, rb_strterm_heredoc_t *here, YYLTYPE *yylloc);
1579YYLTYPE *rb_parser_set_location_of_delayed_token(struct parser_params *p, YYLTYPE *yylloc);
1580YYLTYPE *rb_parser_set_location_of_heredoc_end(struct parser_params *p, YYLTYPE *yylloc);
1581YYLTYPE *rb_parser_set_location_of_dummy_end(struct parser_params *p, YYLTYPE *yylloc);
1582YYLTYPE *rb_parser_set_location_of_none(struct parser_params *p, YYLTYPE *yylloc);
1583YYLTYPE *rb_parser_set_location(struct parser_params *p, YYLTYPE *yylloc);
1584void ruby_show_error_line(struct parser_params *p, VALUE errbuf, const YYLTYPE *yylloc, int lineno, rb_parser_string_t *str);
1585RUBY_SYMBOL_EXPORT_END
1586
1587static void flush_string_content(struct parser_params *p, rb_encoding *enc, size_t back);
1588static void error_duplicate_pattern_variable(struct parser_params *p, ID id, const YYLTYPE *loc);
1589static void error_duplicate_pattern_key(struct parser_params *p, ID id, const YYLTYPE *loc);
1590static VALUE formal_argument_error(struct parser_params*, ID);
1591static ID shadowing_lvar(struct parser_params*,ID);
1592static void new_bv(struct parser_params*,ID);
1593
1594static void local_push(struct parser_params*,int);
1595static void local_pop(struct parser_params*);
1596static void local_var(struct parser_params*, ID);
1597static void arg_var(struct parser_params*, ID);
1598static int local_id(struct parser_params *p, ID id);
1599static int local_id_ref(struct parser_params*, ID, ID **);
1600#define internal_id rb_parser_internal_id
1601ID internal_id(struct parser_params*);
1602static NODE *new_args_forward_call(struct parser_params*, NODE*, const YYLTYPE*, const YYLTYPE*);
1603static int check_forwarding_args(struct parser_params*);
1604static void add_forwarding_args(struct parser_params *p);
1605static void forwarding_arg_check(struct parser_params *p, ID arg, ID all, const char *var);
1606
1607static const struct vtable *dyna_push(struct parser_params *);
1608static void dyna_pop(struct parser_params*, const struct vtable *);
1609static int dyna_in_block(struct parser_params*);
1610#define dyna_var(p, id) local_var(p, id)
1611static int dvar_defined(struct parser_params*, ID);
1612#define dvar_defined_ref rb_parser_dvar_defined_ref
1613int dvar_defined_ref(struct parser_params*, ID, ID**);
1614static int dvar_curr(struct parser_params*,ID);
1615
1616static int lvar_defined(struct parser_params*, ID);
1617
1618static NODE *numparam_push(struct parser_params *p);
1619static void numparam_pop(struct parser_params *p, NODE *prev_inner);
1620
1621#define METHOD_NOT '!'
1622
1623#define idFWD_REST '*'
1624#define idFWD_KWREST idPow /* Use simple "**", as tDSTAR is "**arg" */
1625#define idFWD_BLOCK '&'
1626#define idFWD_ALL idDot3
1627#define arg_FWD_BLOCK idFWD_BLOCK
1628
1629#define RE_ONIG_OPTION_IGNORECASE 1
1630#define RE_ONIG_OPTION_EXTEND (RE_ONIG_OPTION_IGNORECASE<<1)
1631#define RE_ONIG_OPTION_MULTILINE (RE_ONIG_OPTION_EXTEND<<1)
1632#define RE_OPTION_ONCE (1<<16)
1633#define RE_OPTION_ENCODING_SHIFT 8
1634#define RE_OPTION_ENCODING(e) (((e)&0xff)<<RE_OPTION_ENCODING_SHIFT)
1635#define RE_OPTION_ENCODING_IDX(o) (((o)>>RE_OPTION_ENCODING_SHIFT)&0xff)
1636#define RE_OPTION_ENCODING_NONE(o) ((o)&RE_OPTION_ARG_ENCODING_NONE)
1637#define RE_OPTION_MASK 0xff
1638#define RE_OPTION_ARG_ENCODING_NONE 32
1639
1640#define CHECK_LITERAL_WHEN (st_table *)1
1641#define CASE_LABELS_ENABLED_P(case_labels) (case_labels && case_labels != CHECK_LITERAL_WHEN)
1642
1643#define yytnamerr(yyres, yystr) (YYSIZE_T)rb_yytnamerr(p, yyres, yystr)
1644RUBY_FUNC_EXPORTED size_t rb_yytnamerr(struct parser_params *p, char *yyres, const char *yystr);
1645
1646#define TOKEN2ID(tok) ( \
1647 tTOKEN_LOCAL_BEGIN<(tok)&&(tok)<tTOKEN_LOCAL_END ? TOKEN2LOCALID(tok) : \
1648 tTOKEN_INSTANCE_BEGIN<(tok)&&(tok)<tTOKEN_INSTANCE_END ? TOKEN2INSTANCEID(tok) : \
1649 tTOKEN_GLOBAL_BEGIN<(tok)&&(tok)<tTOKEN_GLOBAL_END ? TOKEN2GLOBALID(tok) : \
1650 tTOKEN_CONST_BEGIN<(tok)&&(tok)<tTOKEN_CONST_END ? TOKEN2CONSTID(tok) : \
1651 tTOKEN_CLASS_BEGIN<(tok)&&(tok)<tTOKEN_CLASS_END ? TOKEN2CLASSID(tok) : \
1652 tTOKEN_ATTRSET_BEGIN<(tok)&&(tok)<tTOKEN_ATTRSET_END ? TOKEN2ATTRSETID(tok) : \
1653 ((tok) / ((tok)<tPRESERVED_ID_END && ((tok)>=128 || rb_ispunct(tok)))))
1654
1655/****** Ripper *******/
1656
1657#ifdef RIPPER
1658
1659#include "eventids1.h"
1660#include "eventids2.h"
1661
1662extern const struct ripper_parser_ids ripper_parser_ids;
1663
1664static VALUE ripper_dispatch0(struct parser_params*,ID);
1665static VALUE ripper_dispatch1(struct parser_params*,ID,VALUE);
1666static VALUE ripper_dispatch2(struct parser_params*,ID,VALUE,VALUE);
1667static VALUE ripper_dispatch3(struct parser_params*,ID,VALUE,VALUE,VALUE);
1668static VALUE ripper_dispatch4(struct parser_params*,ID,VALUE,VALUE,VALUE,VALUE);
1669static VALUE ripper_dispatch5(struct parser_params*,ID,VALUE,VALUE,VALUE,VALUE,VALUE);
1670static VALUE ripper_dispatch7(struct parser_params*,ID,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE);
1671void ripper_error(struct parser_params *p);
1672
1673#define dispatch0(n) ripper_dispatch0(p, RIPPER_ID(n))
1674#define dispatch1(n,a) ripper_dispatch1(p, RIPPER_ID(n), (a))
1675#define dispatch2(n,a,b) ripper_dispatch2(p, RIPPER_ID(n), (a), (b))
1676#define dispatch3(n,a,b,c) ripper_dispatch3(p, RIPPER_ID(n), (a), (b), (c))
1677#define dispatch4(n,a,b,c,d) ripper_dispatch4(p, RIPPER_ID(n), (a), (b), (c), (d))
1678#define dispatch5(n,a,b,c,d,e) ripper_dispatch5(p, RIPPER_ID(n), (a), (b), (c), (d), (e))
1679#define dispatch7(n,a,b,c,d,e,f,g) ripper_dispatch7(p, RIPPER_ID(n), (a), (b), (c), (d), (e), (f), (g))
1680
1681#define yyparse ripper_yyparse
1682
1683static VALUE
1684aryptn_pre_args(struct parser_params *p, VALUE pre_arg, VALUE pre_args)
1685{
1686 if (!NIL_P(pre_arg)) {
1687 if (!NIL_P(pre_args)) {
1688 rb_ary_unshift(pre_args, pre_arg);
1689 }
1690 else {
1691 pre_args = rb_ary_new_from_args(1, pre_arg);
1692 }
1693 }
1694 return pre_args;
1695}
1696
1697#define ID2VAL(id) STATIC_ID2SYM(id)
1698#define TOKEN2VAL(t) ID2VAL(TOKEN2ID(t))
1699#endif /* RIPPER */
1700
1701#define KWD2EID(t, v) keyword_##t
1702
1703static NODE *
1704new_scope_body(struct parser_params *p, rb_node_args_t *args, NODE *body, NODE *parent, const YYLTYPE *loc)
1705{
1706 body = remove_begin(body);
1707 reduce_nodes(p, &body);
1708 NODE *n = NEW_SCOPE(args, body, parent, loc);
1709 nd_set_line(n, loc->end_pos.lineno);
1710 set_line_body(body, loc->beg_pos.lineno);
1711 return n;
1712}
1713
1714static NODE *
1715rescued_expr(struct parser_params *p, NODE *arg, NODE *rescue,
1716 const YYLTYPE *arg_loc, const YYLTYPE *mod_loc, const YYLTYPE *res_loc)
1717{
1718 YYLTYPE loc = code_loc_gen(mod_loc, res_loc);
1719 rescue = NEW_RESBODY(0, 0, remove_begin(rescue), 0, &loc);
1720 loc.beg_pos = arg_loc->beg_pos;
1721 return NEW_RESCUE(arg, rescue, 0, &loc);
1722}
1723
1724static NODE *add_block_exit(struct parser_params *p, NODE *node);
1725static rb_node_exits_t *init_block_exit(struct parser_params *p);
1726static rb_node_exits_t *allow_block_exit(struct parser_params *p);
1727static void restore_block_exit(struct parser_params *p, rb_node_exits_t *exits);
1728static void clear_block_exit(struct parser_params *p, bool error);
1729
1730static void
1731next_rescue_context(struct lex_context *next, const struct lex_context *outer, enum rescue_context def)
1732{
1733 next->in_rescue = outer->in_rescue == after_rescue ? after_rescue : def;
1734}
1735
1736static void
1737restore_defun(struct parser_params *p, rb_node_def_temp_t *temp)
1738{
1739 /* See: def_name action */
1740 struct lex_context ctxt = temp->save.ctxt;
1741 p->ctxt.in_def = ctxt.in_def;
1742 p->ctxt.shareable_constant_value = ctxt.shareable_constant_value;
1743 p->ctxt.in_rescue = ctxt.in_rescue;
1744 p->max_numparam = temp->save.max_numparam;
1745 numparam_pop(p, temp->save.numparam_save);
1746 clear_block_exit(p, true);
1747}
1748
1749static void
1750endless_method_name(struct parser_params *p, ID mid, const YYLTYPE *loc)
1751{
1752 if (is_attrset_id(mid)) {
1753 yyerror1(loc, "setter method cannot be defined in an endless method definition");
1754 }
1755 token_info_drop(p, "def", loc->beg_pos);
1756}
1757
1758#define debug_token_line(p, name, line) do { \
1759 if (p->debug) { \
1760 const char *const pcur = p->lex.pcur; \
1761 const char *const ptok = p->lex.ptok; \
1762 rb_parser_printf(p, name ":%d (%d: %"PRIdPTRDIFF"|%"PRIdPTRDIFF"|%"PRIdPTRDIFF")\n", \
1763 line, p->ruby_sourceline, \
1764 ptok - p->lex.pbeg, pcur - ptok, p->lex.pend - pcur); \
1765 } \
1766 } while (0)
1767
1768#define begin_definition(k, loc_beg, loc_end) \
1769 do { \
1770 if (!(p->ctxt.in_class = (k)[0] != 0)) { \
1771 /* singleton class */ \
1772 p->ctxt.cant_return = !p->ctxt.in_def; \
1773 p->ctxt.in_def = 0; \
1774 } \
1775 else if (p->ctxt.in_def) { \
1776 YYLTYPE loc = code_loc_gen(loc_beg, loc_end); \
1777 yyerror1(&loc, k " definition in method body"); \
1778 } \
1779 else { \
1780 p->ctxt.cant_return = 1; \
1781 } \
1782 local_push(p, 0); \
1783 } while (0)
1784
1785#ifndef RIPPER
1786# define ifndef_ripper(x) (x)
1787# define ifdef_ripper(r,x) (x)
1788#else
1789# define ifndef_ripper(x)
1790# define ifdef_ripper(r,x) (r)
1791#endif
1792
1793# define rb_warn0(fmt) WARN_CALL(WARN_ARGS(fmt, 1))
1794# define rb_warn1(fmt,a) WARN_CALL(WARN_ARGS(fmt, 2), (a))
1795# define rb_warn2(fmt,a,b) WARN_CALL(WARN_ARGS(fmt, 3), (a), (b))
1796# define rb_warn3(fmt,a,b,c) WARN_CALL(WARN_ARGS(fmt, 4), (a), (b), (c))
1797# define rb_warn4(fmt,a,b,c,d) WARN_CALL(WARN_ARGS(fmt, 5), (a), (b), (c), (d))
1798# define rb_warning0(fmt) WARNING_CALL(WARNING_ARGS(fmt, 1))
1799# define rb_warning1(fmt,a) WARNING_CALL(WARNING_ARGS(fmt, 2), (a))
1800# define rb_warning2(fmt,a,b) WARNING_CALL(WARNING_ARGS(fmt, 3), (a), (b))
1801# define rb_warning3(fmt,a,b,c) WARNING_CALL(WARNING_ARGS(fmt, 4), (a), (b), (c))
1802# define rb_warning4(fmt,a,b,c,d) WARNING_CALL(WARNING_ARGS(fmt, 5), (a), (b), (c), (d))
1803# define rb_warn0L(l,fmt) WARN_CALL(WARN_ARGS_L(l, fmt, 1))
1804# define rb_warn1L(l,fmt,a) WARN_CALL(WARN_ARGS_L(l, fmt, 2), (a))
1805# define rb_warn2L(l,fmt,a,b) WARN_CALL(WARN_ARGS_L(l, fmt, 3), (a), (b))
1806# define rb_warn3L(l,fmt,a,b,c) WARN_CALL(WARN_ARGS_L(l, fmt, 4), (a), (b), (c))
1807# define rb_warn4L(l,fmt,a,b,c,d) WARN_CALL(WARN_ARGS_L(l, fmt, 5), (a), (b), (c), (d))
1808# define rb_warning0L(l,fmt) WARNING_CALL(WARNING_ARGS_L(l, fmt, 1))
1809# define rb_warning1L(l,fmt,a) WARNING_CALL(WARNING_ARGS_L(l, fmt, 2), (a))
1810# define rb_warning2L(l,fmt,a,b) WARNING_CALL(WARNING_ARGS_L(l, fmt, 3), (a), (b))
1811# define rb_warning3L(l,fmt,a,b,c) WARNING_CALL(WARNING_ARGS_L(l, fmt, 4), (a), (b), (c))
1812# define rb_warning4L(l,fmt,a,b,c,d) WARNING_CALL(WARNING_ARGS_L(l, fmt, 5), (a), (b), (c), (d))
1813#ifdef RIPPER
1814extern const ID id_warn, id_warning, id_gets, id_assoc;
1815# define ERR_MESG() STR_NEW2(mesg) /* to bypass Ripper DSL */
1816# define WARN_S_L(s,l) STR_NEW(s,l)
1817# define WARN_S(s) STR_NEW2(s)
1818# define WARN_I(i) INT2NUM(i)
1819# define WARN_ID(i) rb_id2str(i)
1820# define PRIsWARN PRIsVALUE
1821# define WARN_ARGS(fmt,n) p->value, id_warn, n, rb_usascii_str_new_lit(fmt)
1822# define WARN_ARGS_L(l,fmt,n) WARN_ARGS(fmt,n)
1823# ifdef HAVE_VA_ARGS_MACRO
1824# define WARN_CALL(...) rb_funcall(__VA_ARGS__)
1825# else
1826# define WARN_CALL rb_funcall
1827# endif
1828# define WARNING_ARGS(fmt,n) p->value, id_warning, n, rb_usascii_str_new_lit(fmt)
1829# define WARNING_ARGS_L(l, fmt,n) WARNING_ARGS(fmt,n)
1830# ifdef HAVE_VA_ARGS_MACRO
1831# define WARNING_CALL(...) rb_funcall(__VA_ARGS__)
1832# else
1833# define WARNING_CALL rb_funcall
1834# endif
1835# define compile_error ripper_compile_error
1836#else
1837# define WARN_S_L(s,l) s
1838# define WARN_S(s) s
1839# define WARN_I(i) i
1840# define WARN_ID(i) rb_id2name(i)
1841# define PRIsWARN PRIsVALUE
1842# define WARN_ARGS(fmt,n) WARN_ARGS_L(p->ruby_sourceline,fmt,n)
1843# define WARN_ARGS_L(l,fmt,n) p->ruby_sourcefile, (l), (fmt)
1844# define WARN_CALL rb_compile_warn
1845# define WARNING_ARGS(fmt,n) WARN_ARGS(fmt,n)
1846# define WARNING_ARGS_L(l,fmt,n) WARN_ARGS_L(l,fmt,n)
1847# define WARNING_CALL rb_compile_warning
1848PRINTF_ARGS(static void parser_compile_error(struct parser_params*, const rb_code_location_t *loc, const char *fmt, ...), 3, 4);
1849# define compile_error(p, ...) parser_compile_error(p, NULL, __VA_ARGS__)
1850#endif
1851
1852#define RNODE_EXITS(node) ((rb_node_exits_t*)(node))
1853
1854static NODE *
1855add_block_exit(struct parser_params *p, NODE *node)
1856{
1857 if (!node) {
1858 compile_error(p, "unexpected null node");
1859 return 0;
1860 }
1861 switch (nd_type(node)) {
1862 case NODE_BREAK: case NODE_NEXT: case NODE_REDO: break;
1863 default:
1864 compile_error(p, "add_block_exit: unexpected node: %s", parser_node_name(nd_type(node)));
1865 return node;
1866 }
1867 if (!p->ctxt.in_defined) {
1868 rb_node_exits_t *exits = p->exits;
1869 if (exits) {
1870 RNODE_EXITS(exits->nd_stts)->nd_chain = node;
1871 exits->nd_stts = node;
1872 }
1873 }
1874 return node;
1875}
1876
1877static rb_node_exits_t *
1878init_block_exit(struct parser_params *p)
1879{
1880 rb_node_exits_t *old = p->exits;
1881 rb_node_exits_t *exits = NODE_NEW_INTERNAL(NODE_EXITS, rb_node_exits_t);
1882 exits->nd_chain = 0;
1883 exits->nd_stts = RNODE(exits);
1884 p->exits = exits;
1885 return old;
1886}
1887
1888static rb_node_exits_t *
1889allow_block_exit(struct parser_params *p)
1890{
1891 rb_node_exits_t *exits = p->exits;
1892 p->exits = 0;
1893 return exits;
1894}
1895
1896static void
1897restore_block_exit(struct parser_params *p, rb_node_exits_t *exits)
1898{
1899 p->exits = exits;
1900}
1901
1902static void
1903clear_block_exit(struct parser_params *p, bool error)
1904{
1905 rb_node_exits_t *exits = p->exits;
1906 if (!exits) return;
1907 if (error) {
1908 for (NODE *e = RNODE(exits); (e = RNODE_EXITS(e)->nd_chain) != 0; ) {
1909 switch (nd_type(e)) {
1910 case NODE_BREAK:
1911 yyerror1(&e->nd_loc, "Invalid break");
1912 break;
1913 case NODE_NEXT:
1914 yyerror1(&e->nd_loc, "Invalid next");
1915 break;
1916 case NODE_REDO:
1917 yyerror1(&e->nd_loc, "Invalid redo");
1918 break;
1919 default:
1920 yyerror1(&e->nd_loc, "unexpected node");
1921 goto end_checks; /* no nd_chain */
1922 }
1923 }
1924 end_checks:;
1925 }
1926 exits->nd_stts = RNODE(exits);
1927 exits->nd_chain = 0;
1928}
1929
1930#define WARN_EOL(tok) \
1931 (looking_at_eol_p(p) ? \
1932 (void)rb_warning0("'" tok "' at the end of line without an expression") : \
1933 (void)0)
1934static int looking_at_eol_p(struct parser_params *p);
1935
1936static NODE *
1937get_nd_value(struct parser_params *p, NODE *node)
1938{
1939 switch (nd_type(node)) {
1940 case NODE_GASGN:
1941 return RNODE_GASGN(node)->nd_value;
1942 case NODE_IASGN:
1943 return RNODE_IASGN(node)->nd_value;
1944 case NODE_LASGN:
1945 return RNODE_LASGN(node)->nd_value;
1946 case NODE_DASGN:
1947 return RNODE_DASGN(node)->nd_value;
1948 case NODE_MASGN:
1949 return RNODE_MASGN(node)->nd_value;
1950 case NODE_CVASGN:
1951 return RNODE_CVASGN(node)->nd_value;
1952 case NODE_CDECL:
1953 return RNODE_CDECL(node)->nd_value;
1954 default:
1955 compile_error(p, "get_nd_value: unexpected node: %s", parser_node_name(nd_type(node)));
1956 return 0;
1957 }
1958}
1959
1960static void
1961set_nd_value(struct parser_params *p, NODE *node, NODE *rhs)
1962{
1963 switch (nd_type(node)) {
1964 case NODE_CDECL:
1965 RNODE_CDECL(node)->nd_value = rhs;
1966 break;
1967 case NODE_GASGN:
1968 RNODE_GASGN(node)->nd_value = rhs;
1969 break;
1970 case NODE_IASGN:
1971 RNODE_IASGN(node)->nd_value = rhs;
1972 break;
1973 case NODE_LASGN:
1974 RNODE_LASGN(node)->nd_value = rhs;
1975 break;
1976 case NODE_DASGN:
1977 RNODE_DASGN(node)->nd_value = rhs;
1978 break;
1979 case NODE_MASGN:
1980 RNODE_MASGN(node)->nd_value = rhs;
1981 break;
1982 case NODE_CVASGN:
1983 RNODE_CVASGN(node)->nd_value = rhs;
1984 break;
1985 default:
1986 compile_error(p, "set_nd_value: unexpected node: %s", parser_node_name(nd_type(node)));
1987 break;
1988 }
1989}
1990
1991static ID
1992get_nd_vid(struct parser_params *p, NODE *node)
1993{
1994 switch (nd_type(node)) {
1995 case NODE_CDECL:
1996 return RNODE_CDECL(node)->nd_vid;
1997 case NODE_GASGN:
1998 return RNODE_GASGN(node)->nd_vid;
1999 case NODE_IASGN:
2000 return RNODE_IASGN(node)->nd_vid;
2001 case NODE_LASGN:
2002 return RNODE_LASGN(node)->nd_vid;
2003 case NODE_DASGN:
2004 return RNODE_DASGN(node)->nd_vid;
2005 case NODE_CVASGN:
2006 return RNODE_CVASGN(node)->nd_vid;
2007 default:
2008 compile_error(p, "get_nd_vid: unexpected node: %s", parser_node_name(nd_type(node)));
2009 return 0;
2010 }
2011}
2012
2013static NODE *
2014get_nd_args(struct parser_params *p, NODE *node)
2015{
2016 switch (nd_type(node)) {
2017 case NODE_CALL:
2018 return RNODE_CALL(node)->nd_args;
2019 case NODE_OPCALL:
2020 return RNODE_OPCALL(node)->nd_args;
2021 case NODE_FCALL:
2022 return RNODE_FCALL(node)->nd_args;
2023 case NODE_QCALL:
2024 return RNODE_QCALL(node)->nd_args;
2025 case NODE_SUPER:
2026 return RNODE_SUPER(node)->nd_args;
2027 case NODE_VCALL:
2028 case NODE_ZSUPER:
2029 case NODE_YIELD:
2030 case NODE_RETURN:
2031 case NODE_BREAK:
2032 case NODE_NEXT:
2033 return 0;
2034 default:
2035 compile_error(p, "get_nd_args: unexpected node: %s", parser_node_name(nd_type(node)));
2036 return 0;
2037 }
2038}
2039
2040static st_index_t
2041djb2(const uint8_t *str, size_t len)
2042{
2043 st_index_t hash = 5381;
2044
2045 for (size_t i = 0; i < len; i++) {
2046 hash = ((hash << 5) + hash) + str[i];
2047 }
2048
2049 return hash;
2050}
2051
2052static st_index_t
2053parser_memhash(const void *ptr, long len)
2054{
2055 return djb2(ptr, len);
2056}
2057
2058#define PARSER_STRING_PTR(str) (str->ptr)
2059#define PARSER_STRING_LEN(str) (str->len)
2060#define PARSER_STRING_END(str) (&str->ptr[str->len])
2061#define STRING_SIZE(str) ((size_t)str->len + 1)
2062#define STRING_TERM_LEN(str) (1)
2063#define STRING_TERM_FILL(str) (str->ptr[str->len] = '\0')
2064#define PARSER_STRING_RESIZE_CAPA_TERM(p,str,capacity,termlen) do {\
2065 SIZED_REALLOC_N(str->ptr, char, (size_t)total + termlen, STRING_SIZE(str)); \
2066 str->len = total; \
2067} while (0)
2068#define STRING_SET_LEN(str, n) do { \
2069 (str)->len = (n); \
2070} while (0)
2071#define PARSER_STRING_GETMEM(str, ptrvar, lenvar) \
2072 ((ptrvar) = str->ptr, \
2073 (lenvar) = str->len)
2074
2075static inline int
2076parser_string_char_at_end(struct parser_params *p, rb_parser_string_t *str, int when_empty)
2077{
2078 return PARSER_STRING_LEN(str) > 0 ? (unsigned char)PARSER_STRING_END(str)[-1] : when_empty;
2079}
2080
2081static rb_parser_string_t *
2082rb_parser_string_new(rb_parser_t *p, const char *ptr, long len)
2083{
2084 rb_parser_string_t *str;
2085
2086 if (len < 0) {
2087 rb_bug("negative string size (or size too big): %ld", len);
2088 }
2089
2090 str = xcalloc(1, sizeof(rb_parser_string_t));
2091 str->ptr = xcalloc(len + 1, sizeof(char));
2092
2093 if (ptr) {
2094 memcpy(PARSER_STRING_PTR(str), ptr, len);
2095 }
2096 STRING_SET_LEN(str, len);
2097 STRING_TERM_FILL(str);
2098 return str;
2099}
2100
2101static rb_parser_string_t *
2102rb_parser_encoding_string_new(rb_parser_t *p, const char *ptr, long len, rb_encoding *enc)
2103{
2104 rb_parser_string_t *str = rb_parser_string_new(p, ptr, len);
2105 str->coderange = RB_PARSER_ENC_CODERANGE_UNKNOWN;
2106 str->enc = enc;
2107 return str;
2108}
2109
2110#ifndef RIPPER
2111rb_parser_string_t *
2112rb_str_to_parser_string(rb_parser_t *p, VALUE str)
2113{
2114 /* Type check */
2115 rb_parser_string_t *ret = rb_parser_encoding_string_new(p, RSTRING_PTR(str), RSTRING_LEN(str), rb_enc_get(str));
2116 RB_GC_GUARD(str);
2117 return ret;
2118}
2119
2120void
2121rb_parser_string_free(rb_parser_t *p, rb_parser_string_t *str)
2122{
2123 if (!str) return;
2124 xfree(PARSER_STRING_PTR(str));
2125 xfree(str);
2126}
2127#endif
2128
2129static st_index_t
2130rb_parser_str_hash(rb_parser_string_t *str)
2131{
2132 return parser_memhash((const void *)PARSER_STRING_PTR(str), PARSER_STRING_LEN(str));
2133}
2134
2135static st_index_t
2136rb_char_p_hash(const char *c)
2137{
2138 return parser_memhash((const void *)c, strlen(c));
2139}
2140
2141static size_t
2142rb_parser_str_capacity(rb_parser_string_t *str, const int termlen)
2143{
2144 return PARSER_STRING_LEN(str);
2145}
2146
2147#ifndef RIPPER
2148static char *
2149rb_parser_string_end(rb_parser_string_t *str)
2150{
2151 return &str->ptr[str->len];
2152}
2153#endif
2154
2155static void
2156rb_parser_string_set_encoding(rb_parser_string_t *str, rb_encoding *enc)
2157{
2158 str->enc = enc;
2159}
2160
2161static rb_encoding *
2162rb_parser_str_get_encoding(rb_parser_string_t *str)
2163{
2164 return str->enc;
2165}
2166
2167#ifndef RIPPER
2168static bool
2169PARSER_ENCODING_IS_ASCII8BIT(struct parser_params *p, rb_parser_string_t *str)
2170{
2171 return rb_parser_str_get_encoding(str) == rb_ascii8bit_encoding();
2172}
2173#endif
2174
2175static int
2176PARSER_ENC_CODERANGE(rb_parser_string_t *str)
2177{
2178 return str->coderange;
2179}
2180
2181static void
2182PARSER_ENC_CODERANGE_SET(rb_parser_string_t *str, int coderange)
2183{
2184 str->coderange = coderange;
2185}
2186
2187static void
2188PARSER_ENCODING_CODERANGE_SET(rb_parser_string_t *str, rb_encoding *enc, enum rb_parser_string_coderange_type cr)
2189{
2190 rb_parser_string_set_encoding(str, enc);
2191 PARSER_ENC_CODERANGE_SET(str, cr);
2192}
2193
2194static void
2195PARSER_ENC_CODERANGE_CLEAR(rb_parser_string_t *str)
2196{
2197 str->coderange = RB_PARSER_ENC_CODERANGE_UNKNOWN;
2198}
2199
2200static bool
2201PARSER_ENC_CODERANGE_ASCIIONLY(rb_parser_string_t *str)
2202{
2203 return PARSER_ENC_CODERANGE(str) == RB_PARSER_ENC_CODERANGE_7BIT;
2204}
2205
2206static bool
2207PARSER_ENC_CODERANGE_CLEAN_P(int cr)
2208{
2209 return cr == RB_PARSER_ENC_CODERANGE_7BIT || cr == RB_PARSER_ENC_CODERANGE_VALID;
2210}
2211
2212static const char *
2213rb_parser_search_nonascii(const char *p, const char *e)
2214{
2215 const char *s = p;
2216
2217 for (; s < e; s++) {
2218 if (*s & 0x80) return s;
2219 }
2220
2221 return NULL;
2222}
2223
2224static int
2225rb_parser_coderange_scan(struct parser_params *p, const char *ptr, long len, rb_encoding *enc)
2226{
2227 const char *e = ptr + len;
2228
2229 if (enc == rb_ascii8bit_encoding()) {
2230 /* enc is ASCII-8BIT. ASCII-8BIT string never be broken. */
2231 ptr = rb_parser_search_nonascii(ptr, e);
2232 return ptr ? RB_PARSER_ENC_CODERANGE_VALID : RB_PARSER_ENC_CODERANGE_7BIT;
2233 }
2234
2235 /* parser string encoding is always asciicompat */
2236 ptr = rb_parser_search_nonascii(ptr, e);
2237 if (!ptr) return RB_PARSER_ENC_CODERANGE_7BIT;
2238 for (;;) {
2239 int ret = rb_enc_precise_mbclen(ptr, e, enc);
2240 if (!MBCLEN_CHARFOUND_P(ret)) return RB_PARSER_ENC_CODERANGE_BROKEN;
2241 ptr += MBCLEN_CHARFOUND_LEN(ret);
2242 if (ptr == e) break;
2243 ptr = rb_parser_search_nonascii(ptr, e);
2244 if (!ptr) break;
2245 }
2246
2247 return RB_PARSER_ENC_CODERANGE_VALID;
2248}
2249
2250static int
2251rb_parser_enc_coderange_scan(struct parser_params *p, rb_parser_string_t *str, rb_encoding *enc)
2252{
2253 return rb_parser_coderange_scan(p, PARSER_STRING_PTR(str), PARSER_STRING_LEN(str), enc);
2254}
2255
2256static int
2257rb_parser_enc_str_coderange(struct parser_params *p, rb_parser_string_t *str)
2258{
2259 int cr = PARSER_ENC_CODERANGE(str);
2260
2261 if (cr == RB_PARSER_ENC_CODERANGE_UNKNOWN) {
2262 cr = rb_parser_enc_coderange_scan(p, str, rb_parser_str_get_encoding(str));
2263 PARSER_ENC_CODERANGE_SET(str, cr);
2264 }
2265
2266 return cr;
2267}
2268
2269static rb_parser_string_t *
2270rb_parser_enc_associate(struct parser_params *p, rb_parser_string_t *str, rb_encoding *enc)
2271{
2272 if (rb_parser_str_get_encoding(str) == enc)
2273 return str;
2274 if (!PARSER_ENC_CODERANGE_ASCIIONLY(str)) {
2275 PARSER_ENC_CODERANGE_CLEAR(str);
2276 }
2277 rb_parser_string_set_encoding(str, enc);
2278 return str;
2279}
2280
2281static bool
2282rb_parser_is_ascii_string(struct parser_params *p, rb_parser_string_t *str)
2283{
2284 return rb_parser_enc_str_coderange(p, str) == RB_PARSER_ENC_CODERANGE_7BIT;
2285}
2286
2287static rb_encoding *
2288rb_parser_enc_compatible(struct parser_params *p, rb_parser_string_t *str1, rb_parser_string_t *str2)
2289{
2290 rb_encoding *enc1 = rb_parser_str_get_encoding(str1);
2291 rb_encoding *enc2 = rb_parser_str_get_encoding(str2);
2292
2293 if (enc1 == NULL || enc2 == NULL)
2294 return 0;
2295
2296 if (enc1 == enc2) {
2297 return enc1;
2298 }
2299
2300 if (PARSER_STRING_LEN(str2) == 0)
2301 return enc1;
2302 if (PARSER_STRING_LEN(str1) == 0)
2303 return rb_parser_is_ascii_string(p, str2) ? enc1 : enc2;
2304
2305 int cr1, cr2;
2306
2307 cr1 = rb_parser_enc_str_coderange(p, str1);
2308 cr2 = rb_parser_enc_str_coderange(p, str2);
2309
2310 if (cr1 != cr2) {
2311 if (cr1 == RB_PARSER_ENC_CODERANGE_7BIT) return enc2;
2312 if (cr2 == RB_PARSER_ENC_CODERANGE_7BIT) return enc1;
2313 }
2314
2315 if (cr2 == RB_PARSER_ENC_CODERANGE_7BIT) {
2316 return enc1;
2317 }
2318
2319 if (cr1 == RB_PARSER_ENC_CODERANGE_7BIT) {
2320 return enc2;
2321 }
2322
2323 return 0;
2324}
2325
2326static void
2327rb_parser_str_modify(rb_parser_string_t *str)
2328{
2329 PARSER_ENC_CODERANGE_CLEAR(str);
2330}
2331
2332static void
2333rb_parser_str_set_len(struct parser_params *p, rb_parser_string_t *str, long len)
2334{
2335 long capa;
2336 const int termlen = STRING_TERM_LEN(str);
2337
2338 if (len > (capa = (long)(rb_parser_str_capacity(str, termlen))) || len < 0) {
2339 rb_bug("probable buffer overflow: %ld for %ld", len, capa);
2340 }
2341
2342 int cr = PARSER_ENC_CODERANGE(str);
2343 if (cr == RB_PARSER_ENC_CODERANGE_UNKNOWN) {
2344 /* Leave unknown. */
2345 }
2346 else if (len > PARSER_STRING_LEN(str)) {
2347 PARSER_ENC_CODERANGE_SET(str, RB_PARSER_ENC_CODERANGE_UNKNOWN);
2348 }
2349 else if (len < PARSER_STRING_LEN(str)) {
2350 if (cr != RB_PARSER_ENC_CODERANGE_7BIT) {
2351 /* ASCII-only string is keeping after truncated. Valid
2352 * and broken may be invalid or valid, leave unknown. */
2353 PARSER_ENC_CODERANGE_SET(str, RB_PARSER_ENC_CODERANGE_UNKNOWN);
2354 }
2355 }
2356
2357 STRING_SET_LEN(str, len);
2358 STRING_TERM_FILL(str);
2359}
2360
2361static rb_parser_string_t *
2362rb_parser_str_buf_cat(struct parser_params *p, rb_parser_string_t *str, const char *ptr, long len)
2363{
2364 rb_parser_str_modify(str);
2365 if (len == 0) return 0;
2366
2367 long total, olen, off = -1;
2368 char *sptr;
2369 const int termlen = STRING_TERM_LEN(str);
2370
2371 PARSER_STRING_GETMEM(str, sptr, olen);
2372 if (ptr >= sptr && ptr <= sptr + olen) {
2373 off = ptr - sptr;
2374 }
2375
2376 if (olen > LONG_MAX - len) {
2377 compile_error(p, "string sizes too big");
2378 return 0;
2379 }
2380 total = olen + len;
2381 PARSER_STRING_RESIZE_CAPA_TERM(p, str, total, termlen);
2382 sptr = PARSER_STRING_PTR(str);
2383 if (off != -1) {
2384 ptr = sptr + off;
2385 }
2386 memcpy(sptr + olen, ptr, len);
2387 STRING_SET_LEN(str, total);
2388 STRING_TERM_FILL(str);
2389
2390 return str;
2391}
2392
2393#define parser_str_cat(str, ptr, len) rb_parser_str_buf_cat(p, str, ptr, len)
2394#define parser_str_cat_cstr(str, lit) rb_parser_str_buf_cat(p, str, lit, strlen(lit))
2395
2396static rb_parser_string_t *
2397rb_parser_enc_cr_str_buf_cat(struct parser_params *p, rb_parser_string_t *str, const char *ptr, long len,
2398 rb_encoding *ptr_enc, int ptr_cr, int *ptr_cr_ret)
2399{
2400 int str_cr, res_cr;
2401 rb_encoding *str_enc, *res_enc;
2402
2403 str_enc = rb_parser_str_get_encoding(str);
2404 str_cr = PARSER_STRING_LEN(str) ? PARSER_ENC_CODERANGE(str) : RB_PARSER_ENC_CODERANGE_7BIT;
2405
2406 if (str_enc == ptr_enc) {
2407 if (str_cr != RB_PARSER_ENC_CODERANGE_UNKNOWN && ptr_cr == RB_PARSER_ENC_CODERANGE_UNKNOWN) {
2408 ptr_cr = rb_parser_coderange_scan(p, ptr, len, ptr_enc);
2409 }
2410 }
2411 else {
2412 /* parser string encoding is always asciicompat */
2413 if (ptr_cr == RB_PARSER_ENC_CODERANGE_UNKNOWN) {
2414 ptr_cr = rb_parser_coderange_scan(p, ptr, len, ptr_enc);
2415 }
2416 if (str_cr == RB_PARSER_ENC_CODERANGE_UNKNOWN) {
2417 if (str_enc == rb_ascii8bit_encoding() || ptr_cr != RB_PARSER_ENC_CODERANGE_7BIT) {
2418 str_cr = rb_parser_enc_str_coderange(p, str);
2419 }
2420 }
2421 }
2422 if (ptr_cr_ret)
2423 *ptr_cr_ret = ptr_cr;
2424
2425 if (str_enc != ptr_enc &&
2426 str_cr != RB_PARSER_ENC_CODERANGE_7BIT &&
2427 ptr_cr != RB_PARSER_ENC_CODERANGE_7BIT) {
2428 goto incompatible;
2429 }
2430
2431 if (str_cr == RB_PARSER_ENC_CODERANGE_UNKNOWN) {
2432 res_enc = str_enc;
2433 res_cr = RB_PARSER_ENC_CODERANGE_UNKNOWN;
2434 }
2435 else if (str_cr == RB_PARSER_ENC_CODERANGE_7BIT) {
2436 if (ptr_cr == RB_PARSER_ENC_CODERANGE_7BIT) {
2437 res_enc = str_enc;
2438 res_cr = RB_PARSER_ENC_CODERANGE_7BIT;
2439 }
2440 else {
2441 res_enc = ptr_enc;
2442 res_cr = ptr_cr;
2443 }
2444 }
2445 else if (str_cr == RB_PARSER_ENC_CODERANGE_VALID) {
2446 res_enc = str_enc;
2447 if (PARSER_ENC_CODERANGE_CLEAN_P(ptr_cr))
2448 res_cr = str_cr;
2449 else
2450 res_cr = ptr_cr;
2451 }
2452 else { /* str_cr == RB_PARSER_ENC_CODERANGE_BROKEN */
2453 res_enc = str_enc;
2454 res_cr = str_cr;
2455 if (0 < len) res_cr = RB_PARSER_ENC_CODERANGE_UNKNOWN;
2456 }
2457
2458 if (len < 0) {
2459 compile_error(p, "negative string size (or size too big)");
2460 return 0;
2461 }
2462 parser_str_cat(str, ptr, len);
2463 PARSER_ENCODING_CODERANGE_SET(str, res_enc, res_cr);
2464 return str;
2465
2466 incompatible:
2467 compile_error(p, "incompatible character encodings: %s and %s",
2468 rb_enc_name(str_enc), rb_enc_name(ptr_enc));
2469 return 0;
2470}
2471
2472static rb_parser_string_t *
2473rb_parser_enc_str_buf_cat(struct parser_params *p, rb_parser_string_t *str, const char *ptr, long len,
2474 rb_encoding *ptr_enc)
2475{
2476 return rb_parser_enc_cr_str_buf_cat(p, str, ptr, len, ptr_enc, RB_PARSER_ENC_CODERANGE_UNKNOWN, NULL);
2477}
2478
2479static rb_parser_string_t *
2480rb_parser_str_buf_append(struct parser_params *p, rb_parser_string_t *str, rb_parser_string_t *str2)
2481{
2482 int str2_cr = rb_parser_enc_str_coderange(p, str2);
2483
2484 rb_parser_enc_cr_str_buf_cat(p, str, PARSER_STRING_PTR(str2), PARSER_STRING_LEN(str2),
2485 rb_parser_str_get_encoding(str2), str2_cr, &str2_cr);
2486
2487 PARSER_ENC_CODERANGE_SET(str2, str2_cr);
2488
2489 return str;
2490}
2491
2492static rb_parser_string_t *
2493rb_parser_str_resize(struct parser_params *p, rb_parser_string_t *str, long len)
2494{
2495 if (len < 0) {
2496 rb_bug("negative string size (or size too big)");
2497 }
2498
2499 long slen = PARSER_STRING_LEN(str);
2500
2501 if (slen > len && PARSER_ENC_CODERANGE(str) != RB_PARSER_ENC_CODERANGE_7BIT) {
2502 PARSER_ENC_CODERANGE_CLEAR(str);
2503 }
2504
2505 {
2506 long capa;
2507 const int termlen = STRING_TERM_LEN(str);
2508
2509 if ((capa = slen) < len) {
2510 SIZED_REALLOC_N(str->ptr, char, (size_t)len + termlen, STRING_SIZE(str));
2511 }
2512 else if (len == slen) return str;
2513 STRING_SET_LEN(str, len);
2514 STRING_TERM_FILL(str);
2515 }
2516 return str;
2517}
2518
2519# define PARSER_ENC_STRING_GETMEM(str, ptrvar, lenvar, encvar) \
2520 ((ptrvar) = str->ptr, \
2521 (lenvar) = str->len, \
2522 (encvar) = str->enc)
2523
2524static int
2525rb_parser_string_hash_cmp(rb_parser_string_t *str1, rb_parser_string_t *str2)
2526{
2527 long len1, len2;
2528 const char *ptr1, *ptr2;
2529 rb_encoding *enc1, *enc2;
2530
2531 PARSER_ENC_STRING_GETMEM(str1, ptr1, len1, enc1);
2532 PARSER_ENC_STRING_GETMEM(str2, ptr2, len2, enc2);
2533
2534 return (len1 != len2 ||
2535 enc1 != enc2 ||
2536 memcmp(ptr1, ptr2, len1) != 0);
2537}
2538
2539static void
2540rb_parser_ary_extend(rb_parser_t *p, rb_parser_ary_t *ary, long len)
2541{
2542 long i;
2543 if (ary->capa < len) {
2544 ary->capa = len;
2545 ary->data = (rb_parser_ary_data *)xrealloc(ary->data, sizeof(rb_parser_ary_data) * len);
2546 for (i = ary->len; i < len; i++) {
2547 ary->data[i] = 0;
2548 }
2549 }
2550}
2551
2552/*
2553 * Do not call this directly.
2554 * Use rb_parser_ary_new_capa_for_XXX() instead.
2555 */
2556static rb_parser_ary_t *
2557parser_ary_new_capa(rb_parser_t *p, long len)
2558{
2559 if (len < 0) {
2560 rb_bug("negative array size (or size too big): %ld", len);
2561 }
2562 rb_parser_ary_t *ary = xcalloc(1, sizeof(rb_parser_ary_t));
2563 ary->data_type = 0;
2564 ary->len = 0;
2565 ary->capa = len;
2566 if (0 < len) {
2567 ary->data = (rb_parser_ary_data *)xcalloc(len, sizeof(rb_parser_ary_data));
2568 }
2569 else {
2570 ary->data = NULL;
2571 }
2572 return ary;
2573}
2574
2575#ifndef RIPPER
2576static rb_parser_ary_t *
2577rb_parser_ary_new_capa_for_script_line(rb_parser_t *p, long len)
2578{
2579 rb_parser_ary_t *ary = parser_ary_new_capa(p, len);
2580 ary->data_type = PARSER_ARY_DATA_SCRIPT_LINE;
2581 return ary;
2582}
2583
2584static rb_parser_ary_t *
2585rb_parser_ary_new_capa_for_ast_token(rb_parser_t *p, long len)
2586{
2587 rb_parser_ary_t *ary = parser_ary_new_capa(p, len);
2588 ary->data_type = PARSER_ARY_DATA_AST_TOKEN;
2589 return ary;
2590}
2591#endif
2592
2593static rb_parser_ary_t *
2594rb_parser_ary_new_capa_for_node(rb_parser_t *p, long len)
2595{
2596 rb_parser_ary_t *ary = parser_ary_new_capa(p, len);
2597 ary->data_type = PARSER_ARY_DATA_NODE;
2598 return ary;
2599}
2600
2601/*
2602 * Do not call this directly.
2603 * Use rb_parser_ary_push_XXX() instead.
2604 */
2605static rb_parser_ary_t *
2606parser_ary_push(rb_parser_t *p, rb_parser_ary_t *ary, rb_parser_ary_data val)
2607{
2608 if (ary->len == ary->capa) {
2609 rb_parser_ary_extend(p, ary, ary->len == 0 ? 1 : ary->len * 2);
2610 }
2611 ary->data[ary->len++] = val;
2612 return ary;
2613}
2614
2615#ifndef RIPPER
2616static rb_parser_ary_t *
2617rb_parser_ary_push_ast_token(rb_parser_t *p, rb_parser_ary_t *ary, rb_parser_ast_token_t *val)
2618{
2619 if (ary->data_type != PARSER_ARY_DATA_AST_TOKEN) {
2620 rb_bug("unexpected rb_parser_ary_data_type: %d", ary->data_type);
2621 }
2622 return parser_ary_push(p, ary, val);
2623}
2624
2625static rb_parser_ary_t *
2626rb_parser_ary_push_script_line(rb_parser_t *p, rb_parser_ary_t *ary, rb_parser_string_t *val)
2627{
2628 if (ary->data_type != PARSER_ARY_DATA_SCRIPT_LINE) {
2629 rb_bug("unexpected rb_parser_ary_data_type: %d", ary->data_type);
2630 }
2631 return parser_ary_push(p, ary, val);
2632}
2633#endif
2634
2635static rb_parser_ary_t *
2636rb_parser_ary_push_node(rb_parser_t *p, rb_parser_ary_t *ary, NODE *val)
2637{
2638 if (ary->data_type != PARSER_ARY_DATA_NODE) {
2639 rb_bug("unexpected rb_parser_ary_data_type: %d", ary->data_type);
2640 }
2641 return parser_ary_push(p, ary, val);
2642}
2643
2644#ifndef RIPPER
2645static void
2646rb_parser_ast_token_free(rb_parser_t *p, rb_parser_ast_token_t *token)
2647{
2648 if (!token) return;
2649 rb_parser_string_free(p, token->str);
2650 xfree(token);
2651}
2652
2653static void
2654rb_parser_ary_free(rb_parser_t *p, rb_parser_ary_t *ary)
2655{
2656# define foreach_ary(ptr) \
2657 for (rb_parser_ary_data *ptr = ary->data, *const end_ary_data = ptr + ary->len; \
2658 ptr < end_ary_data; ptr++)
2659 switch (ary->data_type) {
2660 case PARSER_ARY_DATA_AST_TOKEN:
2661 foreach_ary(data) {rb_parser_ast_token_free(p, *data);}
2662 break;
2663 case PARSER_ARY_DATA_SCRIPT_LINE:
2664 foreach_ary(data) {rb_parser_string_free(p, *data);}
2665 break;
2666 case PARSER_ARY_DATA_NODE:
2667 /* Do nothing because nodes are freed when rb_ast_t is freed */
2668 break;
2669 default:
2670 rb_bug("unexpected rb_parser_ary_data_type: %d", ary->data_type);
2671 break;
2672 }
2673# undef foreach_ary
2674 xfree(ary->data);
2675 xfree(ary);
2676}
2677
2678#endif /* !RIPPER */
2679
2680#line 2681 "parse.c"
2681
2682# ifndef YY_CAST
2683# ifdef __cplusplus
2684# define YY_CAST(Type, Val) static_cast<Type> (Val)
2685# define YY_REINTERPRET_CAST(Type, Val) reinterpret_cast<Type> (Val)
2686# else
2687# define YY_CAST(Type, Val) ((Type) (Val))
2688# define YY_REINTERPRET_CAST(Type, Val) ((Type) (Val))
2689# endif
2690# endif
2691# ifndef YY_NULLPTR
2692# if defined __cplusplus
2693# if 201103L <= __cplusplus
2694# define YY_NULLPTR nullptr
2695# else
2696# define YY_NULLPTR 0
2697# endif
2698# else
2699# define YY_NULLPTR ((void*)0)
2700# endif
2701# endif
2702
2703#include "parse.h"
2704/* Symbol kind. */
2705enum yysymbol_kind_t
2706{
2707 YYSYMBOL_YYEMPTY = -2,
2708 YYSYMBOL_YYEOF = 0, /* "end-of-input" */
2709 YYSYMBOL_YYerror = 1, /* error */
2710 YYSYMBOL_YYUNDEF = 2, /* "invalid token" */
2711 YYSYMBOL_keyword_class = 3, /* "'class'" */
2712 YYSYMBOL_keyword_module = 4, /* "'module'" */
2713 YYSYMBOL_keyword_def = 5, /* "'def'" */
2714 YYSYMBOL_keyword_undef = 6, /* "'undef'" */
2715 YYSYMBOL_keyword_begin = 7, /* "'begin'" */
2716 YYSYMBOL_keyword_rescue = 8, /* "'rescue'" */
2717 YYSYMBOL_keyword_ensure = 9, /* "'ensure'" */
2718 YYSYMBOL_keyword_end = 10, /* "'end'" */
2719 YYSYMBOL_keyword_if = 11, /* "'if'" */
2720 YYSYMBOL_keyword_unless = 12, /* "'unless'" */
2721 YYSYMBOL_keyword_then = 13, /* "'then'" */
2722 YYSYMBOL_keyword_elsif = 14, /* "'elsif'" */
2723 YYSYMBOL_keyword_else = 15, /* "'else'" */
2724 YYSYMBOL_keyword_case = 16, /* "'case'" */
2725 YYSYMBOL_keyword_when = 17, /* "'when'" */
2726 YYSYMBOL_keyword_while = 18, /* "'while'" */
2727 YYSYMBOL_keyword_until = 19, /* "'until'" */
2728 YYSYMBOL_keyword_for = 20, /* "'for'" */
2729 YYSYMBOL_keyword_break = 21, /* "'break'" */
2730 YYSYMBOL_keyword_next = 22, /* "'next'" */
2731 YYSYMBOL_keyword_redo = 23, /* "'redo'" */
2732 YYSYMBOL_keyword_retry = 24, /* "'retry'" */
2733 YYSYMBOL_keyword_in = 25, /* "'in'" */
2734 YYSYMBOL_keyword_do = 26, /* "'do'" */
2735 YYSYMBOL_keyword_do_cond = 27, /* "'do' for condition" */
2736 YYSYMBOL_keyword_do_block = 28, /* "'do' for block" */
2737 YYSYMBOL_keyword_do_LAMBDA = 29, /* "'do' for lambda" */
2738 YYSYMBOL_keyword_return = 30, /* "'return'" */
2739 YYSYMBOL_keyword_yield = 31, /* "'yield'" */
2740 YYSYMBOL_keyword_super = 32, /* "'super'" */
2741 YYSYMBOL_keyword_self = 33, /* "'self'" */
2742 YYSYMBOL_keyword_nil = 34, /* "'nil'" */
2743 YYSYMBOL_keyword_true = 35, /* "'true'" */
2744 YYSYMBOL_keyword_false = 36, /* "'false'" */
2745 YYSYMBOL_keyword_and = 37, /* "'and'" */
2746 YYSYMBOL_keyword_or = 38, /* "'or'" */
2747 YYSYMBOL_keyword_not = 39, /* "'not'" */
2748 YYSYMBOL_modifier_if = 40, /* "'if' modifier" */
2749 YYSYMBOL_modifier_unless = 41, /* "'unless' modifier" */
2750 YYSYMBOL_modifier_while = 42, /* "'while' modifier" */
2751 YYSYMBOL_modifier_until = 43, /* "'until' modifier" */
2752 YYSYMBOL_modifier_rescue = 44, /* "'rescue' modifier" */
2753 YYSYMBOL_keyword_alias = 45, /* "'alias'" */
2754 YYSYMBOL_keyword_defined = 46, /* "'defined?'" */
2755 YYSYMBOL_keyword_BEGIN = 47, /* "'BEGIN'" */
2756 YYSYMBOL_keyword_END = 48, /* "'END'" */
2757 YYSYMBOL_keyword__LINE__ = 49, /* "'__LINE__'" */
2758 YYSYMBOL_keyword__FILE__ = 50, /* "'__FILE__'" */
2759 YYSYMBOL_keyword__ENCODING__ = 51, /* "'__ENCODING__'" */
2760 YYSYMBOL_tIDENTIFIER = 52, /* "local variable or method" */
2761 YYSYMBOL_tFID = 53, /* "method" */
2762 YYSYMBOL_tGVAR = 54, /* "global variable" */
2763 YYSYMBOL_tIVAR = 55, /* "instance variable" */
2764 YYSYMBOL_tCONSTANT = 56, /* "constant" */
2765 YYSYMBOL_tCVAR = 57, /* "class variable" */
2766 YYSYMBOL_tLABEL = 58, /* "label" */
2767 YYSYMBOL_tINTEGER = 59, /* "integer literal" */
2768 YYSYMBOL_tFLOAT = 60, /* "float literal" */
2769 YYSYMBOL_tRATIONAL = 61, /* "rational literal" */
2770 YYSYMBOL_tIMAGINARY = 62, /* "imaginary literal" */
2771 YYSYMBOL_tCHAR = 63, /* "char literal" */
2772 YYSYMBOL_tNTH_REF = 64, /* "numbered reference" */
2773 YYSYMBOL_tBACK_REF = 65, /* "back reference" */
2774 YYSYMBOL_tSTRING_CONTENT = 66, /* "literal content" */
2775 YYSYMBOL_tREGEXP_END = 67, /* tREGEXP_END */
2776 YYSYMBOL_tDUMNY_END = 68, /* "dummy end" */
2777 YYSYMBOL_69_ = 69, /* '.' */
2778 YYSYMBOL_70_backslash_ = 70, /* "backslash" */
2779 YYSYMBOL_tSP = 71, /* "escaped space" */
2780 YYSYMBOL_72_escaped_horizontal_tab_ = 72, /* "escaped horizontal tab" */
2781 YYSYMBOL_73_escaped_form_feed_ = 73, /* "escaped form feed" */
2782 YYSYMBOL_74_escaped_carriage_return_ = 74, /* "escaped carriage return" */
2783 YYSYMBOL_75_escaped_vertical_tab_ = 75, /* "escaped vertical tab" */
2784 YYSYMBOL_tUPLUS = 76, /* "unary+" */
2785 YYSYMBOL_tUMINUS = 77, /* "unary-" */
2786 YYSYMBOL_tPOW = 78, /* "**" */
2787 YYSYMBOL_tCMP = 79, /* "<=>" */
2788 YYSYMBOL_tEQ = 80, /* "==" */
2789 YYSYMBOL_tEQQ = 81, /* "===" */
2790 YYSYMBOL_tNEQ = 82, /* "!=" */
2791 YYSYMBOL_tGEQ = 83, /* ">=" */
2792 YYSYMBOL_tLEQ = 84, /* "<=" */
2793 YYSYMBOL_tANDOP = 85, /* "&&" */
2794 YYSYMBOL_tOROP = 86, /* "||" */
2795 YYSYMBOL_tMATCH = 87, /* "=~" */
2796 YYSYMBOL_tNMATCH = 88, /* "!~" */
2797 YYSYMBOL_tDOT2 = 89, /* ".." */
2798 YYSYMBOL_tDOT3 = 90, /* "..." */
2799 YYSYMBOL_tBDOT2 = 91, /* "(.." */
2800 YYSYMBOL_tBDOT3 = 92, /* "(..." */
2801 YYSYMBOL_tAREF = 93, /* "[]" */
2802 YYSYMBOL_tASET = 94, /* "[]=" */
2803 YYSYMBOL_tLSHFT = 95, /* "<<" */
2804 YYSYMBOL_tRSHFT = 96, /* ">>" */
2805 YYSYMBOL_tANDDOT = 97, /* "&." */
2806 YYSYMBOL_tCOLON2 = 98, /* "::" */
2807 YYSYMBOL_tCOLON3 = 99, /* ":: at EXPR_BEG" */
2808 YYSYMBOL_tOP_ASGN = 100, /* "operator-assignment" */
2809 YYSYMBOL_tASSOC = 101, /* "=>" */
2810 YYSYMBOL_tLPAREN = 102, /* "(" */
2811 YYSYMBOL_tLPAREN_ARG = 103, /* "( arg" */
2812 YYSYMBOL_tLBRACK = 104, /* "[" */
2813 YYSYMBOL_tLBRACE = 105, /* "{" */
2814 YYSYMBOL_tLBRACE_ARG = 106, /* "{ arg" */
2815 YYSYMBOL_tSTAR = 107, /* "*" */
2816 YYSYMBOL_tDSTAR = 108, /* "**arg" */
2817 YYSYMBOL_tAMPER = 109, /* "&" */
2818 YYSYMBOL_tLAMBDA = 110, /* "->" */
2819 YYSYMBOL_tSYMBEG = 111, /* "symbol literal" */
2820 YYSYMBOL_tSTRING_BEG = 112, /* "string literal" */
2821 YYSYMBOL_tXSTRING_BEG = 113, /* "backtick literal" */
2822 YYSYMBOL_tREGEXP_BEG = 114, /* "regexp literal" */
2823 YYSYMBOL_tWORDS_BEG = 115, /* "word list" */
2824 YYSYMBOL_tQWORDS_BEG = 116, /* "verbatim word list" */
2825 YYSYMBOL_tSYMBOLS_BEG = 117, /* "symbol list" */
2826 YYSYMBOL_tQSYMBOLS_BEG = 118, /* "verbatim symbol list" */
2827 YYSYMBOL_tSTRING_END = 119, /* "terminator" */
2828 YYSYMBOL_tSTRING_DEND = 120, /* "'}'" */
2829 YYSYMBOL_tSTRING_DBEG = 121, /* "'#{'" */
2830 YYSYMBOL_tSTRING_DVAR = 122, /* tSTRING_DVAR */
2831 YYSYMBOL_tLAMBEG = 123, /* tLAMBEG */
2832 YYSYMBOL_tLABEL_END = 124, /* tLABEL_END */
2833 YYSYMBOL_tIGNORED_NL = 125, /* tIGNORED_NL */
2834 YYSYMBOL_tCOMMENT = 126, /* tCOMMENT */
2835 YYSYMBOL_tEMBDOC_BEG = 127, /* tEMBDOC_BEG */
2836 YYSYMBOL_tEMBDOC = 128, /* tEMBDOC */
2837 YYSYMBOL_tEMBDOC_END = 129, /* tEMBDOC_END */
2838 YYSYMBOL_tHEREDOC_BEG = 130, /* tHEREDOC_BEG */
2839 YYSYMBOL_tHEREDOC_END = 131, /* tHEREDOC_END */
2840 YYSYMBOL_k__END__ = 132, /* k__END__ */
2841 YYSYMBOL_tLOWEST = 133, /* tLOWEST */
2842 YYSYMBOL_134_ = 134, /* '=' */
2843 YYSYMBOL_135_ = 135, /* '?' */
2844 YYSYMBOL_136_ = 136, /* ':' */
2845 YYSYMBOL_137_ = 137, /* '>' */
2846 YYSYMBOL_138_ = 138, /* '<' */
2847 YYSYMBOL_139_ = 139, /* '|' */
2848 YYSYMBOL_140_ = 140, /* '^' */
2849 YYSYMBOL_141_ = 141, /* '&' */
2850 YYSYMBOL_142_ = 142, /* '+' */
2851 YYSYMBOL_143_ = 143, /* '-' */
2852 YYSYMBOL_144_ = 144, /* '*' */
2853 YYSYMBOL_145_ = 145, /* '/' */
2854 YYSYMBOL_146_ = 146, /* '%' */
2855 YYSYMBOL_tUMINUS_NUM = 147, /* tUMINUS_NUM */
2856 YYSYMBOL_148_ = 148, /* '!' */
2857 YYSYMBOL_149_ = 149, /* '~' */
2858 YYSYMBOL_tLAST_TOKEN = 150, /* tLAST_TOKEN */
2859 YYSYMBOL_151_ = 151, /* '{' */
2860 YYSYMBOL_152_ = 152, /* '}' */
2861 YYSYMBOL_153_ = 153, /* '[' */
2862 YYSYMBOL_154_n_ = 154, /* '\n' */
2863 YYSYMBOL_155_ = 155, /* ',' */
2864 YYSYMBOL_156_ = 156, /* '`' */
2865 YYSYMBOL_157_ = 157, /* '(' */
2866 YYSYMBOL_158_ = 158, /* ')' */
2867 YYSYMBOL_159_ = 159, /* ']' */
2868 YYSYMBOL_160_ = 160, /* ';' */
2869 YYSYMBOL_161_ = 161, /* ' ' */
2870 YYSYMBOL_YYACCEPT = 162, /* $accept */
2871 YYSYMBOL_option_terms = 163, /* option_terms */
2872 YYSYMBOL_compstmt_top_stmts = 164, /* compstmt_top_stmts */
2873 YYSYMBOL_165_1 = 165, /* $@1 */
2874 YYSYMBOL_program = 166, /* program */
2875 YYSYMBOL_top_stmts = 167, /* top_stmts */
2876 YYSYMBOL_top_stmt = 168, /* top_stmt */
2877 YYSYMBOL_block_open = 169, /* block_open */
2878 YYSYMBOL_begin_block = 170, /* begin_block */
2879 YYSYMBOL_compstmt_stmts = 171, /* compstmt_stmts */
2880 YYSYMBOL_172_2 = 172, /* $@2 */
2881 YYSYMBOL_173_3 = 173, /* $@3 */
2882 YYSYMBOL_bodystmt = 174, /* bodystmt */
2883 YYSYMBOL_175_4 = 175, /* $@4 */
2884 YYSYMBOL_stmts = 176, /* stmts */
2885 YYSYMBOL_stmt_or_begin = 177, /* stmt_or_begin */
2886 YYSYMBOL_178_5 = 178, /* $@5 */
2887 YYSYMBOL_allow_exits = 179, /* allow_exits */
2888 YYSYMBOL_k_END = 180, /* k_END */
2889 YYSYMBOL_181_6 = 181, /* $@6 */
2890 YYSYMBOL_stmt = 182, /* stmt */
2891 YYSYMBOL_asgn_mrhs = 183, /* asgn_mrhs */
2892 YYSYMBOL_asgn_command_rhs = 184, /* asgn_command_rhs */
2893 YYSYMBOL_command_asgn = 185, /* command_asgn */
2894 YYSYMBOL_op_asgn_command_rhs = 186, /* op_asgn_command_rhs */
2895 YYSYMBOL_def_endless_method_endless_command = 187, /* def_endless_method_endless_command */
2896 YYSYMBOL_endless_command = 188, /* endless_command */
2897 YYSYMBOL_option__n_ = 189, /* option_'\n' */
2898 YYSYMBOL_command_rhs = 190, /* command_rhs */
2899 YYSYMBOL_expr = 191, /* expr */
2900 YYSYMBOL_192_7 = 192, /* $@7 */
2901 YYSYMBOL_193_8 = 193, /* $@8 */
2902 YYSYMBOL_def_name = 194, /* def_name */
2903 YYSYMBOL_defn_head = 195, /* defn_head */
2904 YYSYMBOL_196_9 = 196, /* $@9 */
2905 YYSYMBOL_defs_head = 197, /* defs_head */
2906 YYSYMBOL_value_expr_expr = 198, /* value_expr_expr */
2907 YYSYMBOL_expr_value = 199, /* expr_value */
2908 YYSYMBOL_200_10 = 200, /* $@10 */
2909 YYSYMBOL_201_11 = 201, /* $@11 */
2910 YYSYMBOL_expr_value_do = 202, /* expr_value_do */
2911 YYSYMBOL_command_call = 203, /* command_call */
2912 YYSYMBOL_value_expr_command_call = 204, /* value_expr_command_call */
2913 YYSYMBOL_command_call_value = 205, /* command_call_value */
2914 YYSYMBOL_block_command = 206, /* block_command */
2915 YYSYMBOL_cmd_brace_block = 207, /* cmd_brace_block */
2916 YYSYMBOL_fcall = 208, /* fcall */
2917 YYSYMBOL_command = 209, /* command */
2918 YYSYMBOL_mlhs = 210, /* mlhs */
2919 YYSYMBOL_mlhs_inner = 211, /* mlhs_inner */
2920 YYSYMBOL_mlhs_basic = 212, /* mlhs_basic */
2921 YYSYMBOL_mlhs_items_mlhs_item = 213, /* mlhs_items_mlhs_item */
2922 YYSYMBOL_mlhs_item = 214, /* mlhs_item */
2923 YYSYMBOL_mlhs_head = 215, /* mlhs_head */
2924 YYSYMBOL_mlhs_node = 216, /* mlhs_node */
2925 YYSYMBOL_lhs = 217, /* lhs */
2926 YYSYMBOL_cname = 218, /* cname */
2927 YYSYMBOL_cpath = 219, /* cpath */
2928 YYSYMBOL_fname = 220, /* fname */
2929 YYSYMBOL_fitem = 221, /* fitem */
2930 YYSYMBOL_undef_list = 222, /* undef_list */
2931 YYSYMBOL_223_12 = 223, /* $@12 */
2932 YYSYMBOL_op = 224, /* op */
2933 YYSYMBOL_reswords = 225, /* reswords */
2934 YYSYMBOL_asgn_arg_rhs = 226, /* asgn_arg_rhs */
2935 YYSYMBOL_arg = 227, /* arg */
2936 YYSYMBOL_op_asgn_arg_rhs = 228, /* op_asgn_arg_rhs */
2937 YYSYMBOL_range_expr_arg = 229, /* range_expr_arg */
2938 YYSYMBOL_def_endless_method_endless_arg = 230, /* def_endless_method_endless_arg */
2939 YYSYMBOL_ternary = 231, /* ternary */
2940 YYSYMBOL_endless_arg = 232, /* endless_arg */
2941 YYSYMBOL_relop = 233, /* relop */
2942 YYSYMBOL_rel_expr = 234, /* rel_expr */
2943 YYSYMBOL_lex_ctxt = 235, /* lex_ctxt */
2944 YYSYMBOL_begin_defined = 236, /* begin_defined */
2945 YYSYMBOL_after_rescue = 237, /* after_rescue */
2946 YYSYMBOL_value_expr_arg = 238, /* value_expr_arg */
2947 YYSYMBOL_arg_value = 239, /* arg_value */
2948 YYSYMBOL_aref_args = 240, /* aref_args */
2949 YYSYMBOL_arg_rhs = 241, /* arg_rhs */
2950 YYSYMBOL_paren_args = 242, /* paren_args */
2951 YYSYMBOL_opt_paren_args = 243, /* opt_paren_args */
2952 YYSYMBOL_opt_call_args = 244, /* opt_call_args */
2953 YYSYMBOL_value_expr_command = 245, /* value_expr_command */
2954 YYSYMBOL_call_args = 246, /* call_args */
2955 YYSYMBOL_247_13 = 247, /* $@13 */
2956 YYSYMBOL_command_args = 248, /* command_args */
2957 YYSYMBOL_block_arg = 249, /* block_arg */
2958 YYSYMBOL_opt_block_arg = 250, /* opt_block_arg */
2959 YYSYMBOL_args = 251, /* args */
2960 YYSYMBOL_arg_splat = 252, /* arg_splat */
2961 YYSYMBOL_mrhs_arg = 253, /* mrhs_arg */
2962 YYSYMBOL_mrhs = 254, /* mrhs */
2963 YYSYMBOL_primary = 255, /* primary */
2964 YYSYMBOL_256_14 = 256, /* $@14 */
2965 YYSYMBOL_257_15 = 257, /* $@15 */
2966 YYSYMBOL_258_16 = 258, /* @16 */
2967 YYSYMBOL_259_17 = 259, /* @17 */
2968 YYSYMBOL_260_18 = 260, /* $@18 */
2969 YYSYMBOL_261_19 = 261, /* $@19 */
2970 YYSYMBOL_262_20 = 262, /* $@20 */
2971 YYSYMBOL_263_21 = 263, /* $@21 */
2972 YYSYMBOL_264_22 = 264, /* $@22 */
2973 YYSYMBOL_265_23 = 265, /* $@23 */
2974 YYSYMBOL_266_24 = 266, /* $@24 */
2975 YYSYMBOL_value_expr_primary = 267, /* value_expr_primary */
2976 YYSYMBOL_primary_value = 268, /* primary_value */
2977 YYSYMBOL_k_begin = 269, /* k_begin */
2978 YYSYMBOL_k_if = 270, /* k_if */
2979 YYSYMBOL_k_unless = 271, /* k_unless */
2980 YYSYMBOL_k_while = 272, /* k_while */
2981 YYSYMBOL_k_until = 273, /* k_until */
2982 YYSYMBOL_k_case = 274, /* k_case */
2983 YYSYMBOL_k_for = 275, /* k_for */
2984 YYSYMBOL_k_class = 276, /* k_class */
2985 YYSYMBOL_k_module = 277, /* k_module */
2986 YYSYMBOL_k_def = 278, /* k_def */
2987 YYSYMBOL_k_do = 279, /* k_do */
2988 YYSYMBOL_k_do_block = 280, /* k_do_block */
2989 YYSYMBOL_k_rescue = 281, /* k_rescue */
2990 YYSYMBOL_k_ensure = 282, /* k_ensure */
2991 YYSYMBOL_k_when = 283, /* k_when */
2992 YYSYMBOL_k_else = 284, /* k_else */
2993 YYSYMBOL_k_elsif = 285, /* k_elsif */
2994 YYSYMBOL_k_end = 286, /* k_end */
2995 YYSYMBOL_k_return = 287, /* k_return */
2996 YYSYMBOL_k_return_arg = 288, /* k_return_arg */
2997 YYSYMBOL_k_break_arg = 289, /* k_break_arg */
2998 YYSYMBOL_k_next_arg = 290, /* k_next_arg */
2999 YYSYMBOL_k_yield = 291, /* k_yield */
3000 YYSYMBOL_then = 292, /* then */
3001 YYSYMBOL_do = 293, /* do */
3002 YYSYMBOL_if_tail = 294, /* if_tail */
3003 YYSYMBOL_opt_else = 295, /* opt_else */
3004 YYSYMBOL_for_var = 296, /* for_var */
3005 YYSYMBOL_f_marg = 297, /* f_marg */
3006 YYSYMBOL_mlhs_items_f_marg = 298, /* mlhs_items_f_marg */
3007 YYSYMBOL_f_margs = 299, /* f_margs */
3008 YYSYMBOL_f_rest_marg = 300, /* f_rest_marg */
3009 YYSYMBOL_f_any_kwrest = 301, /* f_any_kwrest */
3010 YYSYMBOL_302_25 = 302, /* $@25 */
3011 YYSYMBOL_f_eq = 303, /* f_eq */
3012 YYSYMBOL_f_kw_primary_value = 304, /* f_kw_primary_value */
3013 YYSYMBOL_f_kwarg_primary_value = 305, /* f_kwarg_primary_value */
3014 YYSYMBOL_args_tail_basic_primary_value = 306, /* args_tail_basic_primary_value */
3015 YYSYMBOL_block_args_tail = 307, /* block_args_tail */
3016 YYSYMBOL_excessed_comma = 308, /* excessed_comma */
3017 YYSYMBOL_f_opt_primary_value = 309, /* f_opt_primary_value */
3018 YYSYMBOL_f_opt_arg_primary_value = 310, /* f_opt_arg_primary_value */
3019 YYSYMBOL_opt_args_tail_block_args_tail = 311, /* opt_args_tail_block_args_tail */
3020 YYSYMBOL_block_param = 312, /* block_param */
3021 YYSYMBOL_opt_block_param_def = 313, /* opt_block_param_def */
3022 YYSYMBOL_block_param_def = 314, /* block_param_def */
3023 YYSYMBOL_opt_block_param = 315, /* opt_block_param */
3024 YYSYMBOL_opt_bv_decl = 316, /* opt_bv_decl */
3025 YYSYMBOL_bv_decls = 317, /* bv_decls */
3026 YYSYMBOL_bvar = 318, /* bvar */
3027 YYSYMBOL_max_numparam = 319, /* max_numparam */
3028 YYSYMBOL_numparam = 320, /* numparam */
3029 YYSYMBOL_it_id = 321, /* it_id */
3030 YYSYMBOL_322_26 = 322, /* @26 */
3031 YYSYMBOL_323_27 = 323, /* $@27 */
3032 YYSYMBOL_lambda = 324, /* lambda */
3033 YYSYMBOL_f_larglist = 325, /* f_larglist */
3034 YYSYMBOL_lambda_body = 326, /* lambda_body */
3035 YYSYMBOL_327_28 = 327, /* $@28 */
3036 YYSYMBOL_do_block = 328, /* do_block */
3037 YYSYMBOL_block_call = 329, /* block_call */
3038 YYSYMBOL_method_call = 330, /* method_call */
3039 YYSYMBOL_brace_block = 331, /* brace_block */
3040 YYSYMBOL_332_29 = 332, /* @29 */
3041 YYSYMBOL_brace_body = 333, /* brace_body */
3042 YYSYMBOL_334_30 = 334, /* @30 */
3043 YYSYMBOL_do_body = 335, /* do_body */
3044 YYSYMBOL_case_args = 336, /* case_args */
3045 YYSYMBOL_case_body = 337, /* case_body */
3046 YYSYMBOL_cases = 338, /* cases */
3047 YYSYMBOL_p_pvtbl = 339, /* p_pvtbl */
3048 YYSYMBOL_p_pktbl = 340, /* p_pktbl */
3049 YYSYMBOL_p_in_kwarg = 341, /* p_in_kwarg */
3050 YYSYMBOL_342_31 = 342, /* $@31 */
3051 YYSYMBOL_p_case_body = 343, /* p_case_body */
3052 YYSYMBOL_p_cases = 344, /* p_cases */
3053 YYSYMBOL_p_top_expr = 345, /* p_top_expr */
3054 YYSYMBOL_p_top_expr_body = 346, /* p_top_expr_body */
3055 YYSYMBOL_p_expr = 347, /* p_expr */
3056 YYSYMBOL_p_as = 348, /* p_as */
3057 YYSYMBOL_349_32 = 349, /* $@32 */
3058 YYSYMBOL_p_alt = 350, /* p_alt */
3059 YYSYMBOL_p_lparen = 351, /* p_lparen */
3060 YYSYMBOL_p_lbracket = 352, /* p_lbracket */
3061 YYSYMBOL_p_expr_basic = 353, /* p_expr_basic */
3062 YYSYMBOL_354_33 = 354, /* $@33 */
3063 YYSYMBOL_p_args = 355, /* p_args */
3064 YYSYMBOL_p_args_head = 356, /* p_args_head */
3065 YYSYMBOL_p_args_tail = 357, /* p_args_tail */
3066 YYSYMBOL_p_find = 358, /* p_find */
3067 YYSYMBOL_p_rest = 359, /* p_rest */
3068 YYSYMBOL_p_args_post = 360, /* p_args_post */
3069 YYSYMBOL_p_arg = 361, /* p_arg */
3070 YYSYMBOL_p_kwargs = 362, /* p_kwargs */
3071 YYSYMBOL_p_kwarg = 363, /* p_kwarg */
3072 YYSYMBOL_p_kw = 364, /* p_kw */
3073 YYSYMBOL_p_kw_label = 365, /* p_kw_label */
3074 YYSYMBOL_p_kwrest = 366, /* p_kwrest */
3075 YYSYMBOL_p_kwnorest = 367, /* p_kwnorest */
3076 YYSYMBOL_p_any_kwrest = 368, /* p_any_kwrest */
3077 YYSYMBOL_p_value = 369, /* p_value */
3078 YYSYMBOL_range_expr_p_primitive = 370, /* range_expr_p_primitive */
3079 YYSYMBOL_p_primitive = 371, /* p_primitive */
3080 YYSYMBOL_p_variable = 372, /* p_variable */
3081 YYSYMBOL_p_var_ref = 373, /* p_var_ref */
3082 YYSYMBOL_p_expr_ref = 374, /* p_expr_ref */
3083 YYSYMBOL_p_const = 375, /* p_const */
3084 YYSYMBOL_opt_rescue = 376, /* opt_rescue */
3085 YYSYMBOL_exc_list = 377, /* exc_list */
3086 YYSYMBOL_exc_var = 378, /* exc_var */
3087 YYSYMBOL_opt_ensure = 379, /* opt_ensure */
3088 YYSYMBOL_literal = 380, /* literal */
3089 YYSYMBOL_strings = 381, /* strings */
3090 YYSYMBOL_string = 382, /* string */
3091 YYSYMBOL_string1 = 383, /* string1 */
3092 YYSYMBOL_xstring = 384, /* xstring */
3093 YYSYMBOL_regexp = 385, /* regexp */
3094 YYSYMBOL_nonempty_list__ = 386, /* nonempty_list_' ' */
3095 YYSYMBOL_words_tWORDS_BEG_word_list = 387, /* words_tWORDS_BEG_word_list */
3096 YYSYMBOL_words = 388, /* words */
3097 YYSYMBOL_word_list = 389, /* word_list */
3098 YYSYMBOL_word = 390, /* word */
3099 YYSYMBOL_words_tSYMBOLS_BEG_symbol_list = 391, /* words_tSYMBOLS_BEG_symbol_list */
3100 YYSYMBOL_symbols = 392, /* symbols */
3101 YYSYMBOL_symbol_list = 393, /* symbol_list */
3102 YYSYMBOL_words_tQWORDS_BEG_qword_list = 394, /* words_tQWORDS_BEG_qword_list */
3103 YYSYMBOL_qwords = 395, /* qwords */
3104 YYSYMBOL_words_tQSYMBOLS_BEG_qsym_list = 396, /* words_tQSYMBOLS_BEG_qsym_list */
3105 YYSYMBOL_qsymbols = 397, /* qsymbols */
3106 YYSYMBOL_qword_list = 398, /* qword_list */
3107 YYSYMBOL_qsym_list = 399, /* qsym_list */
3108 YYSYMBOL_string_contents = 400, /* string_contents */
3109 YYSYMBOL_xstring_contents = 401, /* xstring_contents */
3110 YYSYMBOL_regexp_contents = 402, /* regexp_contents */
3111 YYSYMBOL_string_content = 403, /* string_content */
3112 YYSYMBOL_404_34 = 404, /* @34 */
3113 YYSYMBOL_405_35 = 405, /* @35 */
3114 YYSYMBOL_406_36 = 406, /* @36 */
3115 YYSYMBOL_407_37 = 407, /* @37 */
3116 YYSYMBOL_408_38 = 408, /* @38 */
3117 YYSYMBOL_string_dend = 409, /* string_dend */
3118 YYSYMBOL_string_dvar = 410, /* string_dvar */
3119 YYSYMBOL_symbol = 411, /* symbol */
3120 YYSYMBOL_ssym = 412, /* ssym */
3121 YYSYMBOL_sym = 413, /* sym */
3122 YYSYMBOL_dsym = 414, /* dsym */
3123 YYSYMBOL_numeric = 415, /* numeric */
3124 YYSYMBOL_simple_numeric = 416, /* simple_numeric */
3125 YYSYMBOL_nonlocal_var = 417, /* nonlocal_var */
3126 YYSYMBOL_user_variable = 418, /* user_variable */
3127 YYSYMBOL_keyword_variable = 419, /* keyword_variable */
3128 YYSYMBOL_var_ref = 420, /* var_ref */
3129 YYSYMBOL_var_lhs = 421, /* var_lhs */
3130 YYSYMBOL_backref = 422, /* backref */
3131 YYSYMBOL_423_39 = 423, /* $@39 */
3132 YYSYMBOL_superclass = 424, /* superclass */
3133 YYSYMBOL_f_opt_paren_args = 425, /* f_opt_paren_args */
3134 YYSYMBOL_f_paren_args = 426, /* f_paren_args */
3135 YYSYMBOL_f_arglist = 427, /* f_arglist */
3136 YYSYMBOL_428_40 = 428, /* @40 */
3137 YYSYMBOL_f_kw_arg_value = 429, /* f_kw_arg_value */
3138 YYSYMBOL_f_kwarg_arg_value = 430, /* f_kwarg_arg_value */
3139 YYSYMBOL_args_tail_basic_arg_value = 431, /* args_tail_basic_arg_value */
3140 YYSYMBOL_args_tail = 432, /* args_tail */
3141 YYSYMBOL_f_opt_arg_value = 433, /* f_opt_arg_value */
3142 YYSYMBOL_f_opt_arg_arg_value = 434, /* f_opt_arg_arg_value */
3143 YYSYMBOL_opt_args_tail_args_tail = 435, /* opt_args_tail_args_tail */
3144 YYSYMBOL_f_args = 436, /* f_args */
3145 YYSYMBOL_args_forward = 437, /* args_forward */
3146 YYSYMBOL_f_bad_arg = 438, /* f_bad_arg */
3147 YYSYMBOL_f_norm_arg = 439, /* f_norm_arg */
3148 YYSYMBOL_f_arg_asgn = 440, /* f_arg_asgn */
3149 YYSYMBOL_f_arg_item = 441, /* f_arg_item */
3150 YYSYMBOL_f_arg = 442, /* f_arg */
3151 YYSYMBOL_f_label = 443, /* f_label */
3152 YYSYMBOL_kwrest_mark = 444, /* kwrest_mark */
3153 YYSYMBOL_f_no_kwarg = 445, /* f_no_kwarg */
3154 YYSYMBOL_f_kwrest = 446, /* f_kwrest */
3155 YYSYMBOL_restarg_mark = 447, /* restarg_mark */
3156 YYSYMBOL_f_rest_arg = 448, /* f_rest_arg */
3157 YYSYMBOL_blkarg_mark = 449, /* blkarg_mark */
3158 YYSYMBOL_f_block_arg = 450, /* f_block_arg */
3159 YYSYMBOL_opt_f_block_arg = 451, /* opt_f_block_arg */
3160 YYSYMBOL_value_expr_singleton_expr = 452, /* value_expr_singleton_expr */
3161 YYSYMBOL_singleton = 453, /* singleton */
3162 YYSYMBOL_singleton_expr = 454, /* singleton_expr */
3163 YYSYMBOL_455_41 = 455, /* $@41 */
3164 YYSYMBOL_assoc_list = 456, /* assoc_list */
3165 YYSYMBOL_assocs = 457, /* assocs */
3166 YYSYMBOL_assoc = 458, /* assoc */
3167 YYSYMBOL_operation2 = 459, /* operation2 */
3168 YYSYMBOL_operation3 = 460, /* operation3 */
3169 YYSYMBOL_dot_or_colon = 461, /* dot_or_colon */
3170 YYSYMBOL_call_op = 462, /* call_op */
3171 YYSYMBOL_call_op2 = 463, /* call_op2 */
3172 YYSYMBOL_rparen = 464, /* rparen */
3173 YYSYMBOL_rbracket = 465, /* rbracket */
3174 YYSYMBOL_rbrace = 466, /* rbrace */
3175 YYSYMBOL_trailer = 467, /* trailer */
3176 YYSYMBOL_term = 468, /* term */
3177 YYSYMBOL_terms = 469, /* terms */
3178 YYSYMBOL_none = 470 /* none */
3179};
3180typedef enum yysymbol_kind_t yysymbol_kind_t;
3181
3182
3183
3184
3185#ifdef short
3186# undef short
3187#endif
3188
3189/* On compilers that do not define __PTRDIFF_MAX__ etc., make sure
3190 <limits.h> and (if available) <stdint.h> are included
3191 so that the code can choose integer types of a good width. */
3192
3193#ifndef __PTRDIFF_MAX__
3194# include <limits.h> /* INFRINGES ON USER NAME SPACE */
3195# if defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__
3196# include <stdint.h> /* INFRINGES ON USER NAME SPACE */
3197# define YY_STDINT_H
3198# endif
3199#endif
3200
3201/* Narrow types that promote to a signed type and that can represent a
3202 signed or unsigned integer of at least N bits. In tables they can
3203 save space and decrease cache pressure. Promoting to a signed type
3204 helps avoid bugs in integer arithmetic. */
3205
3206#ifdef __INT_LEAST8_MAX__
3207typedef __INT_LEAST8_TYPE__ yytype_int8;
3208#elif defined YY_STDINT_H
3209typedef int_least8_t yytype_int8;
3210#else
3211typedef signed char yytype_int8;
3212#endif
3213
3214#ifdef __INT_LEAST16_MAX__
3215typedef __INT_LEAST16_TYPE__ yytype_int16;
3216#elif defined YY_STDINT_H
3217typedef int_least16_t yytype_int16;
3218#else
3219typedef short yytype_int16;
3220#endif
3221
3222/* Work around bug in HP-UX 11.23, which defines these macros
3223 incorrectly for preprocessor constants. This workaround can likely
3224 be removed in 2023, as HPE has promised support for HP-UX 11.23
3225 (aka HP-UX 11i v2) only through the end of 2022; see Table 2 of
3226 <https://h20195.www2.hpe.com/V2/getpdf.aspx/4AA4-7673ENW.pdf>. */
3227#ifdef __hpux
3228# undef UINT_LEAST8_MAX
3229# undef UINT_LEAST16_MAX
3230# define UINT_LEAST8_MAX 255
3231# define UINT_LEAST16_MAX 65535
3232#endif
3233
3234#if defined __UINT_LEAST8_MAX__ && __UINT_LEAST8_MAX__ <= __INT_MAX__
3235typedef __UINT_LEAST8_TYPE__ yytype_uint8;
3236#elif (!defined __UINT_LEAST8_MAX__ && defined YY_STDINT_H \
3237 && UINT_LEAST8_MAX <= INT_MAX)
3238typedef uint_least8_t yytype_uint8;
3239#elif !defined __UINT_LEAST8_MAX__ && UCHAR_MAX <= INT_MAX
3240typedef unsigned char yytype_uint8;
3241#else
3242typedef short yytype_uint8;
3243#endif
3244
3245#if defined __UINT_LEAST16_MAX__ && __UINT_LEAST16_MAX__ <= __INT_MAX__
3246typedef __UINT_LEAST16_TYPE__ yytype_uint16;
3247#elif (!defined __UINT_LEAST16_MAX__ && defined YY_STDINT_H \
3248 && UINT_LEAST16_MAX <= INT_MAX)
3249typedef uint_least16_t yytype_uint16;
3250#elif !defined __UINT_LEAST16_MAX__ && USHRT_MAX <= INT_MAX
3251typedef unsigned short yytype_uint16;
3252#else
3253typedef int yytype_uint16;
3254#endif
3255
3256#ifndef YYPTRDIFF_T
3257# if defined __PTRDIFF_TYPE__ && defined __PTRDIFF_MAX__
3258# define YYPTRDIFF_T __PTRDIFF_TYPE__
3259# define YYPTRDIFF_MAXIMUM __PTRDIFF_MAX__
3260# elif defined PTRDIFF_MAX
3261# ifndef ptrdiff_t
3262# include <stddef.h> /* INFRINGES ON USER NAME SPACE */
3263# endif
3264# define YYPTRDIFF_T ptrdiff_t
3265# define YYPTRDIFF_MAXIMUM PTRDIFF_MAX
3266# else
3267# define YYPTRDIFF_T long
3268# define YYPTRDIFF_MAXIMUM LONG_MAX
3269# endif
3270#endif
3271
3272#ifndef YYSIZE_T
3273# ifdef __SIZE_TYPE__
3274# define YYSIZE_T __SIZE_TYPE__
3275# elif defined size_t
3276# define YYSIZE_T size_t
3277# elif defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__
3278# include <stddef.h> /* INFRINGES ON USER NAME SPACE */
3279# define YYSIZE_T size_t
3280# else
3281# define YYSIZE_T unsigned
3282# endif
3283#endif
3284
3285#define YYSIZE_MAXIMUM \
3286 YY_CAST (YYPTRDIFF_T, \
3287 (YYPTRDIFF_MAXIMUM < YY_CAST (YYSIZE_T, -1) \
3288 ? YYPTRDIFF_MAXIMUM \
3289 : YY_CAST (YYSIZE_T, -1)))
3290
3291#define YYSIZEOF(X) YY_CAST (YYPTRDIFF_T, sizeof (X))
3292
3293
3294/* Stored state numbers (used for stacks). */
3295typedef yytype_int16 yy_state_t;
3296
3297/* State numbers in computations. */
3298typedef int yy_state_fast_t;
3299
3300#ifndef YY_
3301# if defined YYENABLE_NLS && YYENABLE_NLS
3302# if ENABLE_NLS
3303# include <libintl.h> /* INFRINGES ON USER NAME SPACE */
3304# define YY_(Msgid) dgettext ("bison-runtime", Msgid)
3305# endif
3306# endif
3307# ifndef YY_
3308# define YY_(Msgid) Msgid
3309# endif
3310#endif
3311
3312
3313#ifndef YY_ATTRIBUTE_PURE
3314# if defined __GNUC__ && 2 < __GNUC__ + (96 <= __GNUC_MINOR__)
3315# define YY_ATTRIBUTE_PURE __attribute__ ((__pure__))
3316# else
3317# define YY_ATTRIBUTE_PURE
3318# endif
3319#endif
3320
3321#ifndef YY_ATTRIBUTE_UNUSED
3322# if defined __GNUC__ && 2 < __GNUC__ + (7 <= __GNUC_MINOR__)
3323# define YY_ATTRIBUTE_UNUSED __attribute__ ((__unused__))
3324# else
3325# define YY_ATTRIBUTE_UNUSED
3326# endif
3327#endif
3328
3329/* Suppress unused-variable warnings by "using" E. */
3330#if ! defined lint || defined __GNUC__
3331# define YY_USE(E) ((void) (E))
3332#else
3333# define YY_USE(E) /* empty */
3334#endif
3335
3336/* Suppress an incorrect diagnostic about yylval being uninitialized. */
3337#if defined __GNUC__ && ! defined __ICC && 406 <= __GNUC__ * 100 + __GNUC_MINOR__
3338# if __GNUC__ * 100 + __GNUC_MINOR__ < 407
3339# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \
3340 _Pragma ("GCC diagnostic push") \
3341 _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")
3342# else
3343# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \
3344 _Pragma ("GCC diagnostic push") \
3345 _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"") \
3346 _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
3347# endif
3348# define YY_IGNORE_MAYBE_UNINITIALIZED_END \
3349 _Pragma ("GCC diagnostic pop")
3350#else
3351# define YY_INITIAL_VALUE(Value) Value
3352#endif
3353#ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
3354# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
3355# define YY_IGNORE_MAYBE_UNINITIALIZED_END
3356#endif
3357#ifndef YY_INITIAL_VALUE
3358# define YY_INITIAL_VALUE(Value) /* Nothing. */
3359#endif
3360
3361#if defined __cplusplus && defined __GNUC__ && ! defined __ICC && 6 <= __GNUC__
3362# define YY_IGNORE_USELESS_CAST_BEGIN \
3363 _Pragma ("GCC diagnostic push") \
3364 _Pragma ("GCC diagnostic ignored \"-Wuseless-cast\"")
3365# define YY_IGNORE_USELESS_CAST_END \
3366 _Pragma ("GCC diagnostic pop")
3367#endif
3368#ifndef YY_IGNORE_USELESS_CAST_BEGIN
3369# define YY_IGNORE_USELESS_CAST_BEGIN
3370# define YY_IGNORE_USELESS_CAST_END
3371#endif
3372
3373
3374#define YY_ASSERT(E) ((void) (0 && (E)))
3375
3376#if 1
3377
3378/* The parser invokes alloca or malloc; define the necessary symbols. */
3379
3380# ifdef YYSTACK_USE_ALLOCA
3381# if YYSTACK_USE_ALLOCA
3382# ifdef __GNUC__
3383# define YYSTACK_ALLOC __builtin_alloca
3384# elif defined __BUILTIN_VA_ARG_INCR
3385# include <alloca.h> /* INFRINGES ON USER NAME SPACE */
3386# elif defined _AIX
3387# define YYSTACK_ALLOC __alloca
3388# elif defined _MSC_VER
3389# include <malloc.h> /* INFRINGES ON USER NAME SPACE */
3390# define alloca _alloca
3391# else
3392# define YYSTACK_ALLOC alloca
3393# if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS
3394# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
3395 /* Use EXIT_SUCCESS as a witness for stdlib.h. */
3396# ifndef EXIT_SUCCESS
3397# define EXIT_SUCCESS 0
3398# endif
3399# endif
3400# endif
3401# endif
3402# endif
3403
3404# ifdef YYSTACK_ALLOC
3405 /* Pacify GCC's 'empty if-body' warning. */
3406# define YYSTACK_FREE(Ptr) do { /* empty */; } while (0)
3407# ifndef YYSTACK_ALLOC_MAXIMUM
3408 /* The OS might guarantee only one guard page at the bottom of the stack,
3409 and a page size can be as small as 4096 bytes. So we cannot safely
3410 invoke alloca (N) if N exceeds 4096. Use a slightly smaller number
3411 to allow for a few compiler-allocated temporary stack slots. */
3412# define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
3413# endif
3414# else
3415# define YYSTACK_ALLOC YYMALLOC
3416# define YYSTACK_FREE YYFREE
3417# ifndef YYSTACK_ALLOC_MAXIMUM
3418# define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
3419# endif
3420# if (defined __cplusplus && ! defined EXIT_SUCCESS \
3421 && ! ((defined YYMALLOC || defined malloc) \
3422 && (defined YYFREE || defined free)))
3423# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
3424# ifndef EXIT_SUCCESS
3425# define EXIT_SUCCESS 0
3426# endif
3427# endif
3428# ifndef YYMALLOC
3429# define YYMALLOC malloc
3430# if ! defined malloc && ! defined EXIT_SUCCESS
3431void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
3432# endif
3433# endif
3434# ifndef YYFREE
3435# define YYFREE free
3436# if ! defined free && ! defined EXIT_SUCCESS
3437void free (void *); /* INFRINGES ON USER NAME SPACE */
3438# endif
3439# endif
3440# endif
3441#endif /* 1 */
3442
3443#if (! defined yyoverflow \
3444 && (! defined __cplusplus \
3445 || (defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL \
3446 && defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
3447
3448/* A type that is properly aligned for any stack member. */
3449union yyalloc
3450{
3451 yy_state_t yyss_alloc;
3452 YYSTYPE yyvs_alloc;
3453 YYLTYPE yyls_alloc;
3454};
3455
3456/* The size of the maximum gap between one aligned stack and the next. */
3457# define YYSTACK_GAP_MAXIMUM (YYSIZEOF (union yyalloc) - 1)
3458
3459/* The size of an array large to enough to hold all stacks, each with
3460 N elements. */
3461# define YYSTACK_BYTES(N) \
3462 ((N) * (YYSIZEOF (yy_state_t) + YYSIZEOF (YYSTYPE) \
3463 + YYSIZEOF (YYLTYPE)) \
3464 + 2 * YYSTACK_GAP_MAXIMUM)
3465
3466# define YYCOPY_NEEDED 1
3467
3468/* Relocate STACK from its old location to the new one. The
3469 local variables YYSIZE and YYSTACKSIZE give the old and new number of
3470 elements in the stack, and YYPTR gives the new location of the
3471 stack. Advance YYPTR to a properly aligned location for the next
3472 stack. */
3473# define YYSTACK_RELOCATE(Stack_alloc, Stack) \
3474 do \
3475 { \
3476 YYPTRDIFF_T yynewbytes; \
3477 YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
3478 Stack = &yyptr->Stack_alloc; \
3479 yynewbytes = yystacksize * YYSIZEOF (*Stack) + YYSTACK_GAP_MAXIMUM; \
3480 yyptr += yynewbytes / YYSIZEOF (*yyptr); \
3481 } \
3482 while (0)
3483
3484#endif
3485
3486#if defined YYCOPY_NEEDED && YYCOPY_NEEDED
3487/* Copy COUNT objects from SRC to DST. The source and destination do
3488 not overlap. */
3489# ifndef YYCOPY
3490# if defined __GNUC__ && 1 < __GNUC__
3491# define YYCOPY(Dst, Src, Count) \
3492 __builtin_memcpy (Dst, Src, YY_CAST (YYSIZE_T, (Count)) * sizeof (*(Src)))
3493# else
3494# define YYCOPY(Dst, Src, Count) \
3495 do \
3496 { \
3497 YYPTRDIFF_T yyi; \
3498 for (yyi = 0; yyi < (Count); yyi++) \
3499 (Dst)[yyi] = (Src)[yyi]; \
3500 } \
3501 while (0)
3502# endif
3503# endif
3504#endif /* !YYCOPY_NEEDED */
3505
3506/* YYFINAL -- State number of the termination state. */
3507#define YYFINAL 146
3508/* YYLAST -- Last index in YYTABLE. */
3509#define YYLAST 16911
3510
3511/* YYNTOKENS -- Number of terminals. */
3512#define YYNTOKENS 162
3513/* YYNNTS -- Number of nonterminals. */
3514#define YYNNTS 309
3515/* YYNRULES -- Number of rules. */
3516#define YYNRULES 819
3517/* YYNSTATES -- Number of states. */
3518#define YYNSTATES 1382
3519
3520/* YYMAXUTOK -- Last valid token kind. */
3521#define YYMAXUTOK 361
3522
3523
3524/* YYTRANSLATE(TOKEN-NUM) -- Symbol number corresponding to TOKEN-NUM
3525 as returned by yylex, with out-of-bounds checking. */
3526#define YYTRANSLATE(YYX) \
3527 (0 <= (YYX) && (YYX) <= YYMAXUTOK \
3528 ? YY_CAST (yysymbol_kind_t, yytranslate[YYX]) \
3529 : YYSYMBOL_YYUNDEF)
3530
3531/* YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM
3532 as returned by yylex. */
3533static const yytype_uint8 yytranslate[] =
3534{
3535 0, 2, 2, 2, 2, 2, 2, 2, 2, 72,
3536 154, 75, 73, 74, 2, 2, 2, 2, 2, 2,
3537 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
3538 2, 2, 161, 148, 2, 2, 2, 146, 141, 2,
3539 157, 158, 144, 142, 155, 143, 69, 145, 2, 2,
3540 2, 2, 2, 2, 2, 2, 2, 2, 136, 160,
3541 138, 134, 137, 135, 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, 153, 70, 159, 140, 2, 156, 2, 2, 2,
3545 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
3546 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
3547 2, 2, 2, 151, 139, 152, 149, 2, 89, 90,
3548 91, 92, 76, 77, 78, 79, 95, 96, 84, 83,
3549 80, 81, 82, 87, 88, 93, 94, 98, 85, 86,
3550 97, 2, 2, 2, 2, 2, 2, 2, 2, 2,
3551 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
3552 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
3553 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
3554 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
3555 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
3556 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
3557 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
3558 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
3559 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
3560 2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
3561 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
3562 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
3563 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
3564 35, 36, 37, 38, 39, 40, 41, 42, 43, 44,
3565 45, 46, 47, 48, 49, 50, 51, 52, 53, 54,
3566 55, 56, 57, 58, 59, 60, 61, 62, 63, 64,
3567 65, 66, 67, 68, 71, 99, 100, 101, 102, 103,
3568 104, 105, 106, 107, 108, 109, 110, 111, 112, 113,
3569 114, 115, 116, 117, 118, 119, 120, 121, 122, 123,
3570 124, 125, 126, 127, 128, 129, 130, 131, 132, 133,
3571 147, 150
3572};
3573
3574#if YYDEBUG
3575/* YYRLINE[YYN] -- Source line where rule number YYN was defined. */
3576static const yytype_int16 yyrline[] =
3577{
3578 0, 3176, 3170, 3176, 3176, 3176, 3176, 3196, 3201, 3206,
3579 3213, 3218, 3225, 3227, 3245, 3241, 3246, 3245, 3257, 3254,
3580 3267, 3272, 3277, 3284, 3286, 3285, 3295, 3297, 3304, 3304,
3581 3309, 3314, 3322, 3331, 3338, 3344, 3350, 3361, 3372, 3381,
3582 3395, 3396, 3401, 3401, 3402, 3413, 3418, 3419, 3426, 3426,
3583 3427, 3427, 3427, 3427, 3427, 3427, 3427, 3427, 3427, 3428,
3584 3428, 3428, 3431, 3432, 3438, 3438, 3438, 3445, 3446, 3453,
3585 3456, 3457, 3462, 3467, 3472, 3478, 3477, 3493, 3492, 3507,
3586 3510, 3521, 3531, 3530, 3544, 3544, 3545, 3551, 3551, 3551,
3587 3558, 3559, 3562, 3562, 3565, 3566, 3573, 3581, 3581, 3581,
3588 3588, 3595, 3604, 3609, 3614, 3619, 3624, 3630, 3636, 3642,
3589 3648, 3656, 3666, 3667, 3674, 3675, 3682, 3687, 3692, 3697,
3590 3697, 3697, 3702, 3707, 3712, 3717, 3722, 3727, 3734, 3735,
3591 3742, 3747, 3755, 3755, 3760, 3765, 3765, 3771, 3776, 3781,
3592 3786, 3794, 3794, 3799, 3804, 3804, 3809, 3814, 3819, 3824,
3593 3832, 3840, 3843, 3848, 3853, 3860, 3860, 3860, 3861, 3866,
3594 3869, 3874, 3877, 3882, 3882, 3890, 3891, 3892, 3893, 3894,
3595 3895, 3896, 3897, 3898, 3899, 3900, 3901, 3902, 3903, 3904,
3596 3905, 3906, 3907, 3908, 3909, 3910, 3911, 3912, 3913, 3914,
3597 3915, 3916, 3917, 3918, 3919, 3922, 3922, 3922, 3923, 3923,
3598 3924, 3924, 3924, 3925, 3925, 3925, 3925, 3926, 3926, 3926,
3599 3926, 3927, 3927, 3927, 3928, 3928, 3928, 3928, 3929, 3929,
3600 3929, 3929, 3930, 3930, 3930, 3930, 3931, 3931, 3931, 3931,
3601 3932, 3932, 3932, 3932, 3933, 3933, 3936, 3936, 3937, 3937,
3602 3937, 3937, 3937, 3937, 3937, 3937, 3937, 3938, 3938, 3938,
3603 3938, 3938, 3938, 3938, 3939, 3944, 3949, 3954, 3959, 3964,
3604 3969, 3974, 3979, 3984, 3989, 3994, 3999, 4004, 4005, 4010,
3605 4015, 4020, 4025, 4030, 4035, 4040, 4045, 4050, 4055, 4060,
3606 4067, 4067, 4067, 4068, 4069, 4072, 4081, 4082, 4088, 4095,
3607 4096, 4097, 4098, 4101, 4106, 4114, 4120, 4127, 4134, 4134,
3608 4137, 4138, 4139, 4144, 4151, 4156, 4165, 4170, 4180, 4192,
3609 4193, 4199, 4200, 4201, 4202, 4207, 4214, 4214, 4219, 4224,
3610 4229, 4235, 4241, 4245, 4245, 4283, 4288, 4296, 4301, 4309,
3611 4314, 4319, 4324, 4332, 4337, 4346, 4347, 4351, 4356, 4361,
3612 4379, 4379, 4379, 4379, 4379, 4379, 4379, 4379, 4380, 4381,
3613 4382, 4388, 4387, 4400, 4400, 4406, 4412, 4417, 4422, 4427,
3614 4433, 4438, 4443, 4448, 4453, 4460, 4465, 4470, 4475, 4476,
3615 4482, 4484, 4496, 4505, 4514, 4523, 4522, 4537, 4536, 4549,
3616 4557, 4557, 4558, 4602, 4601, 4625, 4624, 4645, 4644, 4664,
3617 4662, 4679, 4677, 4692, 4697, 4702, 4707, 4722, 4722, 4725,
3618 4732, 4750, 4757, 4765, 4773, 4780, 4788, 4797, 4806, 4814,
3619 4821, 4828, 4836, 4843, 4849, 4864, 4871, 4876, 4882, 4889,
3620 4895, 4901, 4907, 4914, 4915, 4916, 4919, 4920, 4923, 4925,
3621 4934, 4935, 4942, 4943, 4946, 4951, 4959, 4959, 4959, 4964,
3622 4969, 4974, 4979, 4986, 4992, 4999, 5000, 5007, 5007, 5009,
3623 5009, 5009, 5009, 5009, 5009, 5009, 5009, 5009, 5012, 5020,
3624 5020, 5020, 5020, 5020, 5020, 5025, 5030, 5035, 5040, 5045,
3625 5051, 5056, 5061, 5066, 5071, 5076, 5081, 5086, 5091, 5098,
3626 5099, 5105, 5115, 5119, 5122, 5127, 5134, 5136, 5140, 5145,
3627 5148, 5154, 5159, 5166, 5172, 5165, 5199, 5206, 5215, 5222,
3628 5221, 5232, 5240, 5246, 5256, 5262, 5267, 5275, 5282, 5293,
3629 5299, 5304, 5310, 5320, 5325, 5333, 5339, 5347, 5349, 5364,
3630 5364, 5385, 5391, 5396, 5402, 5410, 5419, 5420, 5423, 5424,
3631 5426, 5439, 5446, 5454, 5455, 5458, 5459, 5465, 5473, 5474,
3632 5480, 5486, 5491, 5496, 5503, 5506, 5513, 5517, 5516, 5529,
3633 5532, 5539, 5546, 5547, 5548, 5555, 5562, 5569, 5575, 5582,
3634 5589, 5596, 5602, 5607, 5612, 5619, 5618, 5629, 5635, 5643,
3635 5649, 5654, 5659, 5664, 5669, 5672, 5673, 5680, 5685, 5692,
3636 5700, 5706, 5713, 5714, 5721, 5728, 5733, 5738, 5743, 5750,
3637 5752, 5759, 5765, 5777, 5778, 5793, 5798, 5805, 5811, 5812,
3638 5819, 5820, 5820, 5820, 5820, 5820, 5820, 5820, 5821, 5822,
3639 5823, 5826, 5826, 5826, 5826, 5826, 5826, 5826, 5826, 5827,
3640 5832, 5835, 5843, 5855, 5862, 5869, 5874, 5879, 5887, 5907,
3641 5910, 5915, 5919, 5922, 5927, 5930, 5937, 5940, 5941, 5944,
3642 5956, 5957, 5958, 5965, 5978, 5990, 5997, 5997, 5997, 5997,
3643 6001, 6005, 6012, 6014, 6021, 6021, 6025, 6029, 6036, 6036,
3644 6039, 6039, 6043, 6047, 6055, 6059, 6067, 6071, 6079, 6083,
3645 6091, 6095, 6121, 6124, 6123, 6138, 6146, 6150, 6154, 6158,
3646 6174, 6175, 6178, 6183, 6186, 6187, 6190, 6206, 6207, 6210,
3647 6218, 6219, 6227, 6228, 6229, 6230, 6233, 6234, 6235, 6238,
3648 6238, 6239, 6242, 6243, 6244, 6245, 6246, 6247, 6248, 6251,
3649 6261, 6268, 6268, 6275, 6276, 6280, 6279, 6289, 6292, 6293,
3650 6302, 6312, 6313, 6313, 6330, 6330, 6330, 6330, 6330, 6330,
3651 6330, 6330, 6330, 6331, 6348, 6348, 6348, 6348, 6348, 6348,
3652 6353, 6358, 6363, 6368, 6373, 6378, 6383, 6388, 6393, 6398,
3653 6403, 6408, 6413, 6419, 6426, 6433, 6442, 6451, 6460, 6471,
3654 6472, 6482, 6489, 6494, 6513, 6515, 6526, 6546, 6547, 6550,
3655 6556, 6562, 6570, 6571, 6574, 6580, 6588, 6589, 6592, 6598,
3656 6606, 6611, 6615, 6615, 6645, 6647, 6646, 6659, 6660, 6667,
3657 6669, 6692, 6697, 6702, 6709, 6715, 6720, 6733, 6733, 6733,
3658 6734, 6737, 6738, 6739, 6742, 6743, 6746, 6747, 6750, 6751,
3659 6754, 6757, 6760, 6763, 6764, 6767, 6775, 6782, 6783, 6787
3660};
3661#endif
3662
3664#define YY_ACCESSING_SYMBOL(State) YY_CAST (yysymbol_kind_t, yystos[State])
3665
3666#if 1
3667/* The user-facing name of the symbol whose (internal) number is
3668 YYSYMBOL. No bounds checking. */
3669static const char *yysymbol_name (yysymbol_kind_t yysymbol) YY_ATTRIBUTE_UNUSED;
3670
3671/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
3672 First, the terminals, then, starting at YYNTOKENS, nonterminals. */
3673static const char *const yytname[] =
3674{
3675 "\"end-of-input\"", "error", "\"invalid token\"", "\"'class'\"",
3676 "\"'module'\"", "\"'def'\"", "\"'undef'\"", "\"'begin'\"",
3677 "\"'rescue'\"", "\"'ensure'\"", "\"'end'\"", "\"'if'\"", "\"'unless'\"",
3678 "\"'then'\"", "\"'elsif'\"", "\"'else'\"", "\"'case'\"", "\"'when'\"",
3679 "\"'while'\"", "\"'until'\"", "\"'for'\"", "\"'break'\"", "\"'next'\"",
3680 "\"'redo'\"", "\"'retry'\"", "\"'in'\"", "\"'do'\"",
3681 "\"'do' for condition\"", "\"'do' for block\"", "\"'do' for lambda\"",
3682 "\"'return'\"", "\"'yield'\"", "\"'super'\"", "\"'self'\"", "\"'nil'\"",
3683 "\"'true'\"", "\"'false'\"", "\"'and'\"", "\"'or'\"", "\"'not'\"",
3684 "\"'if' modifier\"", "\"'unless' modifier\"", "\"'while' modifier\"",
3685 "\"'until' modifier\"", "\"'rescue' modifier\"", "\"'alias'\"",
3686 "\"'defined?'\"", "\"'BEGIN'\"", "\"'END'\"", "\"'__LINE__'\"",
3687 "\"'__FILE__'\"", "\"'__ENCODING__'\"", "\"local variable or method\"",
3688 "\"method\"", "\"global variable\"", "\"instance variable\"",
3689 "\"constant\"", "\"class variable\"", "\"label\"", "\"integer literal\"",
3690 "\"float literal\"", "\"rational literal\"", "\"imaginary literal\"",
3691 "\"char literal\"", "\"numbered reference\"", "\"back reference\"",
3692 "\"literal content\"", "tREGEXP_END", "\"dummy end\"", "'.'",
3693 "\"backslash\"", "\"escaped space\"", "\"escaped horizontal tab\"",
3694 "\"escaped form feed\"", "\"escaped carriage return\"",
3695 "\"escaped vertical tab\"", "\"unary+\"", "\"unary-\"", "\"**\"",
3696 "\"<=>\"", "\"==\"", "\"===\"", "\"!=\"", "\">=\"", "\"<=\"", "\"&&\"",
3697 "\"||\"", "\"=~\"", "\"!~\"", "\"..\"", "\"...\"", "\"(..\"", "\"(...\"",
3698 "\"[]\"", "\"[]=\"", "\"<<\"", "\">>\"", "\"&.\"", "\"::\"",
3699 "\":: at EXPR_BEG\"", "\"operator-assignment\"", "\"=>\"", "\"(\"",
3700 "\"( arg\"", "\"[\"", "\"{\"", "\"{ arg\"", "\"*\"", "\"**arg\"",
3701 "\"&\"", "\"->\"", "\"symbol literal\"", "\"string literal\"",
3702 "\"backtick literal\"", "\"regexp literal\"", "\"word list\"",
3703 "\"verbatim word list\"", "\"symbol list\"", "\"verbatim symbol list\"",
3704 "\"terminator\"", "\"'}'\"", "\"'#{'\"", "tSTRING_DVAR", "tLAMBEG",
3705 "tLABEL_END", "tIGNORED_NL", "tCOMMENT", "tEMBDOC_BEG", "tEMBDOC",
3706 "tEMBDOC_END", "tHEREDOC_BEG", "tHEREDOC_END", "k__END__", "tLOWEST",
3707 "'='", "'?'", "':'", "'>'", "'<'", "'|'", "'^'", "'&'", "'+'", "'-'",
3708 "'*'", "'/'", "'%'", "tUMINUS_NUM", "'!'", "'~'", "tLAST_TOKEN", "'{'",
3709 "'}'", "'['", "'\\n'", "','", "'`'", "'('", "')'", "']'", "';'", "' '",
3710 "$accept", "option_terms", "compstmt_top_stmts", "$@1", "program",
3711 "top_stmts", "top_stmt", "block_open", "begin_block", "compstmt_stmts",
3712 "$@2", "$@3", "bodystmt", "$@4", "stmts", "stmt_or_begin", "$@5",
3713 "allow_exits", "k_END", "$@6", "stmt", "asgn_mrhs", "asgn_command_rhs",
3714 "command_asgn", "op_asgn_command_rhs",
3715 "def_endless_method_endless_command", "endless_command", "option_'\\n'",
3716 "command_rhs", "expr", "$@7", "$@8", "def_name", "defn_head", "$@9",
3717 "defs_head", "value_expr_expr", "expr_value", "$@10", "$@11",
3718 "expr_value_do", "command_call", "value_expr_command_call",
3719 "command_call_value", "block_command", "cmd_brace_block", "fcall",
3720 "command", "mlhs", "mlhs_inner", "mlhs_basic", "mlhs_items_mlhs_item",
3721 "mlhs_item", "mlhs_head", "mlhs_node", "lhs", "cname", "cpath", "fname",
3722 "fitem", "undef_list", "$@12", "op", "reswords", "asgn_arg_rhs", "arg",
3723 "op_asgn_arg_rhs", "range_expr_arg", "def_endless_method_endless_arg",
3724 "ternary", "endless_arg", "relop", "rel_expr", "lex_ctxt",
3725 "begin_defined", "after_rescue", "value_expr_arg", "arg_value",
3726 "aref_args", "arg_rhs", "paren_args", "opt_paren_args", "opt_call_args",
3727 "value_expr_command", "call_args", "$@13", "command_args", "block_arg",
3728 "opt_block_arg", "args", "arg_splat", "mrhs_arg", "mrhs", "primary",
3729 "$@14", "$@15", "@16", "@17", "$@18", "$@19", "$@20", "$@21", "$@22",
3730 "$@23", "$@24", "value_expr_primary", "primary_value", "k_begin", "k_if",
3731 "k_unless", "k_while", "k_until", "k_case", "k_for", "k_class",
3732 "k_module", "k_def", "k_do", "k_do_block", "k_rescue", "k_ensure",
3733 "k_when", "k_else", "k_elsif", "k_end", "k_return", "k_return_arg",
3734 "k_break_arg", "k_next_arg", "k_yield", "then", "do", "if_tail",
3735 "opt_else", "for_var", "f_marg", "mlhs_items_f_marg", "f_margs",
3736 "f_rest_marg", "f_any_kwrest", "$@25", "f_eq", "f_kw_primary_value",
3737 "f_kwarg_primary_value", "args_tail_basic_primary_value",
3738 "block_args_tail", "excessed_comma", "f_opt_primary_value",
3739 "f_opt_arg_primary_value", "opt_args_tail_block_args_tail",
3740 "block_param", "opt_block_param_def", "block_param_def",
3741 "opt_block_param", "opt_bv_decl", "bv_decls", "bvar", "max_numparam",
3742 "numparam", "it_id", "@26", "$@27", "lambda", "f_larglist",
3743 "lambda_body", "$@28", "do_block", "block_call", "method_call",
3744 "brace_block", "@29", "brace_body", "@30", "do_body", "case_args",
3745 "case_body", "cases", "p_pvtbl", "p_pktbl", "p_in_kwarg", "$@31",
3746 "p_case_body", "p_cases", "p_top_expr", "p_top_expr_body", "p_expr",
3747 "p_as", "$@32", "p_alt", "p_lparen", "p_lbracket", "p_expr_basic",
3748 "$@33", "p_args", "p_args_head", "p_args_tail", "p_find", "p_rest",
3749 "p_args_post", "p_arg", "p_kwargs", "p_kwarg", "p_kw", "p_kw_label",
3750 "p_kwrest", "p_kwnorest", "p_any_kwrest", "p_value",
3751 "range_expr_p_primitive", "p_primitive", "p_variable", "p_var_ref",
3752 "p_expr_ref", "p_const", "opt_rescue", "exc_list", "exc_var",
3753 "opt_ensure", "literal", "strings", "string", "string1", "xstring",
3754 "regexp", "nonempty_list_' '", "words_tWORDS_BEG_word_list", "words",
3755 "word_list", "word", "words_tSYMBOLS_BEG_symbol_list", "symbols",
3756 "symbol_list", "words_tQWORDS_BEG_qword_list", "qwords",
3757 "words_tQSYMBOLS_BEG_qsym_list", "qsymbols", "qword_list", "qsym_list",
3758 "string_contents", "xstring_contents", "regexp_contents",
3759 "string_content", "@34", "@35", "@36", "@37", "@38", "string_dend",
3760 "string_dvar", "symbol", "ssym", "sym", "dsym", "numeric",
3761 "simple_numeric", "nonlocal_var", "user_variable", "keyword_variable",
3762 "var_ref", "var_lhs", "backref", "$@39", "superclass",
3763 "f_opt_paren_args", "f_paren_args", "f_arglist", "@40", "f_kw_arg_value",
3764 "f_kwarg_arg_value", "args_tail_basic_arg_value", "args_tail",
3765 "f_opt_arg_value", "f_opt_arg_arg_value", "opt_args_tail_args_tail",
3766 "f_args", "args_forward", "f_bad_arg", "f_norm_arg", "f_arg_asgn",
3767 "f_arg_item", "f_arg", "f_label", "kwrest_mark", "f_no_kwarg",
3768 "f_kwrest", "restarg_mark", "f_rest_arg", "blkarg_mark", "f_block_arg",
3769 "opt_f_block_arg", "value_expr_singleton_expr", "singleton",
3770 "singleton_expr", "$@41", "assoc_list", "assocs", "assoc", "operation2",
3771 "operation3", "dot_or_colon", "call_op", "call_op2", "rparen",
3772 "rbracket", "rbrace", "trailer", "term", "terms", "none", YY_NULLPTR
3773};
3774
3775static const char *
3776yysymbol_name (yysymbol_kind_t yysymbol)
3777{
3778 return yytname[yysymbol];
3779}
3780#endif
3781
3782#define YYPACT_NINF (-1161)
3783
3784#define yypact_value_is_default(Yyn) \
3785 ((Yyn) == YYPACT_NINF)
3786
3787#define YYTABLE_NINF (-820)
3788
3789#define yytable_value_is_error(Yyn) \
3790 ((Yyn) == YYTABLE_NINF)
3791
3792/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
3793 STATE-NUM. */
3794static const yytype_int16 yypact[] =
3795{
3796 -1161, 6233, 139, -1161, -1161, -1161, -1161, 11316, -1161, -1161,
3797 -1161, -1161, -1161, -1161, -1161, 8073, 8229, -1161, -1161, -1161,
3798 -1161, 7293, -1161, -1161, -1161, -1161, 259, 11162, 37, 24,
3799 -1161, -1161, -1161, -1161, 6669, 7449, -1161, -1161, 6825, -1161,
3800 -1161, -1161, -1161, -1161, -1161, -1161, -1161, 13813, 13813, 13813,
3801 13813, 154, 10075, 10233, 12733, 12973, 5330, -1161, 11008, -1161,
3802 -1161, -1161, 216, 216, 216, 216, 1176, 13933, 13813, -1161,
3803 113, -1161, -1161, 1327, -1161, -1161, -1161, -1161, -1161, 770,
3804 481, 481, -1161, -1161, 372, 225, 281, -1161, 246, 14533,
3805 -1161, 353, -1161, 2214, -1161, -1161, -1161, -1161, 83, 519,
3806 -1161, 573, -1161, 12133, 12133, -1161, -1161, 10695, 14651, 14769,
3807 14887, 10853, 8385, 12253, 12253, 12253, 7917, -1161, 588, 75,
3808 -1161, -1161, 390, -1161, -1161, -1161, -1161, -1161, -1161, -1161,
3809 -1161, -1161, -1161, -1161, -1161, -1161, -1161, -1161, -1161, -1161,
3810 302, 381, -1161, 463, 443, -1161, -1161, -1161, -1161, -1161,
3811 -1161, -1161, -1161, -1161, -1161, -1161, -1161, -1161, -1161, -1161,
3812 -1161, -1161, -1161, -1161, -1161, -1161, -1161, -1161, -1161, -1161,
3813 -1161, -1161, -1161, -1161, -1161, -1161, -1161, -1161, -1161, -1161,
3814 -1161, -1161, -1161, -1161, -1161, -1161, -1161, -1161, -1161, -1161,
3815 -1161, -1161, -1161, -1161, -1161, -1161, -1161, -1161, -1161, -1161,
3816 -1161, -1161, -1161, -1161, -1161, -1161, -1161, -1161, -1161, -1161,
3817 -1161, -1161, -1161, -1161, -1161, -1161, -1161, -1161, -1161, -1161,
3818 -1161, -1161, -1161, 435, -1161, -1161, -1161, -1161, -1161, -1161,
3819 12373, -1161, 12253, -1161, -1161, 11874, 14053, 836, -1161, 439,
3820 -1161, 10391, -1161, -1161, -1161, -1161, -1161, 475, 484, 619,
3821 10233, 13813, 481, 481, 372, 591, -1161, 604, -1161, 524,
3822 46, 48, 632, 320, 666, 6639, 6639, 479, -1161, 10075,
3823 625, 113, -1161, 1327, 37, 643, -1161, -1161, 13813, 13813,
3824 13813, -1161, 6483, -1161, 693, 637, 662, -1161, 684, -1161,
3825 -1161, 693, 647, 684, -1161, 37, 746, 1176, 15005, 665,
3826 665, 692, -1161, 689, 721, 729, 731, -1161, -1161, 810,
3827 -1161, -1161, 960, 1072, 814, -1161, 696, 696, 696, 696,
3828 781, -1161, -1161, 780, -1161, -1161, -1161, -1161, -1161, 6385,
3829 732, 12133, 12133, 12133, 12133, -1161, 14053, 14053, 1850, 753,
3830 762, -1161, 1850, -1161, 772, -1161, -1161, -1161, -1161, 802,
3831 -1161, -1161, -1161, -1161, -1161, -1161, -1161, 10075, 11617, 758,
3832 -1161, -1161, 13813, 13813, 13813, 13813, 13813, -1161, -1161, 13813,
3833 13813, 13813, 13813, 13813, 13813, 13813, 13813, -1161, 13813, -1161,
3834 -1161, 13813, 13813, 13813, 13813, 13813, 13813, 13813, 13813, 13813,
3835 13813, -1161, -1161, 15285, 12253, 15383, 475, 9011, -1161, 770,
3836 -1161, 121, 121, 12133, 9923, 9923, -1161, 113, 761, 871,
3837 -1161, -1161, 859, 905, 92, 108, 111, 638, 653, 12133,
3838 411, -1161, 801, 894, -1161, -1161, -1161, -1161, 66, 86,
3839 341, 409, 495, 505, 645, 703, 745, -1161, -1161, -1161,
3840 -1161, -1161, 825, -1161, 13813, -1161, -1161, -1161, -1161, -1161,
3841 795, 798, -1161, -1161, 11735, -1161, -1161, -1161, 4452, -1161,
3842 -1161, -1161, -1161, -1161, 13813, 37, -1161, 800, 37, 803,
3843 -1161, -1161, 784, 135, -1161, -1161, -1161, -1161, -1161, 11316,
3844 -1161, -1161, 13813, 812, 343, 828, 835, -1161, 15481, 12253,
3845 15579, -1161, -1161, -1161, 24, 37, -1161, -1161, 5763, 816,
3846 818, -1161, -1161, -1161, 712, 13813, -1161, 12733, -1161, -1161,
3847 12973, -1161, -1161, -1161, 439, 906, -1161, 831, -1161, -1161,
3848 15005, 15677, 12253, 15775, -1161, -1161, -1161, -1161, -1161, -1161,
3849 -1161, -1161, -1161, -1161, -1161, -1161, 1179, 110, 1203, 287,
3850 13813, 15873, 15579, -1161, -1161, 10543, -1161, -1161, -1161, -1161,
3851 -1161, 12013, -1161, -1161, -1161, -1161, -1161, -1161, -1161, -1161,
3852 -1161, -1161, 1418, -1161, -1161, -1161, -1161, -1161, 838, -1161,
3853 -1161, 847, -1161, -1161, -1161, 850, 37, -1161, -1161, -1161,
3854 849, -1161, 855, 13813, 587, -1161, -1161, 964, 863, 976,
3855 -1161, 14173, 9011, 113, 14173, 9011, -1161, 881, -1161, -1161,
3856 -1161, 144, 144, 13093, 37, 15005, 886, -1161, 13213, -1161,
3857 666, 4278, 4278, 4278, 4278, 4577, 3442, 4278, 4278, 6639,
3858 6639, 970, 970, -1161, 4841, 1165, 1165, 1184, 425, 425,
3859 666, 666, 666, 1550, 1550, 5512, 6981, 8697, 7137, 475,
3860 -1161, 37, 898, 556, -1161, 621, -1161, 7605, -1161, -1161,
3861 144, -1161, 9163, 1051, 9619, 221, 144, 144, 1053, 1048,
3862 127, 15971, 12253, 16069, -1161, -1161, -1161, 906, -1161, -1161,
3863 -1161, -1161, 16167, 12253, 16265, 9011, 14053, -1161, -1161, -1161,
3864 -1161, 12493, -1161, -1161, 12853, -1161, 37, -1161, -1161, -1161,
3865 -1161, 3988, 14293, 14293, 11316, -1161, 12613, -1161, 12853, -1161,
3866 -1161, -1161, 14053, 6483, -1161, -1161, 14413, 14413, 13813, 6513,
3867 291, 475, 37, 362, 365, 475, 13813, 13813, 14293, -1161,
3868 203, -1161, -1161, 13813, -1161, 693, -1161, 684, -1161, 15005,
3869 831, 283, 52, 37, 354, 387, -1161, -1161, 1290, -1161,
3870 339, -1161, 216, -1161, -1161, 339, 216, -1161, 666, 7761,
3871 923, -1161, 1418, 1152, -1161, 922, 37, 928, -1161, 451,
3872 -1161, -1161, 651, -1161, 1850, -1161, -1161, 955, 13813, 1850,
3873 -1161, -1161, -1161, -1161, -1161, 1359, -1161, -1161, 259, 1057,
3874 -1161, 6483, 1063, 144, -1161, 1057, 1063, 144, -1161, -1161,
3875 940, -1161, -1161, -1161, -1161, -1161, 13813, -1161, -1161, -1161,
3876 967, 972, 1075, -1161, -1161, 831, 15005, 1069, -1161, -1161,
3877 1088, 1000, 3724, -1161, -1161, -1161, 910, 406, -1161, -1161,
3878 1003, -1161, -1161, -1161, -1161, 802, 984, 648, 12493, -1161,
3879 -1161, -1161, -1161, 802, -1161, 1136, -1161, 959, -1161, 1134,
3880 -1161, -1161, -1161, -1161, -1161, -1161, 13333, 144, -1161, 1053,
3881 144, 179, 227, 37, 128, 169, 12133, 113, 12133, 9011,
3882 715, 52, -1161, 37, 144, 135, 11470, -1161, 798, -1161,
3883 75, 225, -1161, 5806, -1161, -1161, -1161, -1161, 37, 1006,
3884 135, 13813, 259, -1161, -1161, 431, -1161, -1161, -1161, -1161,
3885 -1161, -1161, -1161, 404, -1161, -1161, -1161, -1161, -1161, 696,
3886 -1161, 696, 696, 696, -1161, 37, -1161, 1418, -1161, 1232,
3887 -1161, -1161, 1114, 838, -1161, -1161, 1012, 1013, -1161, -1161,
3888 1015, -1161, 1016, -1161, 1012, 14173, -1161, -1161, -1161, -1161,
3889 -1161, -1161, -1161, 1018, 13453, -1161, 831, 455, -1161, -1161,
3890 -1161, 16363, 12253, 16461, -1161, -1161, 13813, 14293, 14293, 1024,
3891 -1161, -1161, -1161, 14293, 14293, -1161, -1161, 13573, 1134, -1161,
3892 -1161, -1161, 9923, 12133, 144, -1161, -1161, 144, -1161, 13813,
3893 -1161, 209, -1161, -1161, 144, -1161, 186, 221, 9011, 113,
3894 144, -1161, -1161, -1161, -1161, -1161, -1161, -1161, -1161, 12853,
3895 -1161, 14413, 13813, 13813, -1161, 13813, 13813, 1791, -1161, -1161,
3896 -1161, 1022, 1025, -1161, 1359, -1161, 1359, -1161, 1850, -1161,
3897 1359, -1161, -1161, 1057, 1063, 13813, 13813, -1161, -1161, 13813,
3898 1028, 12013, 12013, 14293, 13813, 8541, 8853, 37, 478, 480,
3899 4767, 4767, 6483, -1161, -1161, -1161, -1161, -1161, 14293, -1161,
3900 -1161, -1161, -1161, 967, -1161, 1086, -1161, 1188, -1161, -1161,
3901 121, -1161, -1161, -1161, 13693, 9315, -1161, -1161, -1161, 144,
3902 -1161, -1161, 13813, 1850, -1161, -1161, 6081, 1232, 1232, 1012,
3903 1012, 1033, 1012, 6483, 6483, 1074, 1074, 1018, -1161, -1161,
3904 6483, 518, -1161, -1161, -1161, 1520, 1520, 664, -1161, 4223,
3905 84, 1150, -1161, 988, -1161, -1161, 31, -1161, 1079, -1161,
3906 -1161, -1161, 1064, -1161, 1071, -1161, 3272, -1161, -1161, -1161,
3907 -1161, -1161, 891, -1161, -1161, -1161, 43, -1161, -1161, -1161,
3908 -1161, -1161, -1161, -1161, -1161, -1161, 672, -1161, -1161, -1161,
3909 15123, 121, -1161, -1161, 9923, -1161, -1161, 9771, 9163, 13813,
3910 -1161, 722, 4767, 9923, -1161, 37, 74, 98, 1025, -1161,
3911 -1161, 1359, -1161, -1161, 1955, 10543, -1161, -1161, 9011, -1161,
3912 -1161, -1161, -1161, 3272, 69, 37, 5144, -1161, 37, 1073,
3913 -1161, 1089, -1161, -1161, -1161, 1029, -1161, 12133, -1161, 1172,
3914 5144, -1161, 3272, 547, 1141, 1520, 1520, 664, 559, 598,
3915 4767, 4767, -1161, 1191, -1161, 927, 130, 165, 190, 9011,
3916 113, -1161, 959, -1161, -1161, -1161, -1161, 121, 948, 144,
3917 1090, 1093, -1161, 10543, -1161, -1161, -1161, -1161, 1012, 838,
3918 -1161, 1097, -1161, -1161, -1161, 1103, -1161, 37, 849, 1104,
3919 15241, 1109, -1161, -1161, -1161, 73, -1161, 1141, 1110, 1112,
3920 -1161, -1161, -1161, -1161, -1161, 37, -1161, -1161, 1113, 3272,
3921 1115, -1161, -1161, -1161, -1161, -1161, -1161, -1161, -1161, -1161,
3922 -1161, -1161, 37, 37, 37, 37, 37, 37, 267, 16559,
3923 12253, 16657, 1136, -1161, 1188, -1161, -1161, 12133, 12133, -1161,
3924 1304, -1161, 9011, 1119, -1161, -1161, 651, -1161, 1955, -1161,
3925 1137, 15241, 1955, -1161, -1161, 1219, 1005, 1562, -1161, -1161,
3926 3272, -1161, 547, -1161, 3272, -1161, 5144, 743, -1161, -1161,
3927 -1161, -1161, -1161, -1161, 147, 229, 37, 296, 319, -1161,
3928 -1161, 9467, -1161, -1161, -1161, 877, -1161, -1161, 144, -1161,
3929 -1161, 838, -1161, -1161, 1123, 1127, -1161, 1005, 1139, 1140,
3930 -1161, 16755, 1123, 1149, 37, 1149, -1161, -1161, 326, 551,
3931 1304, -1161, -1161, -1161, 1562, -1161, 1562, -1161, 1955, -1161,
3932 1562, -1161, 1156, 1157, -1161, 3272, -1161, -1161, -1161, -1161,
3933 -1161, 1123, 1123, 1162, 1123, -1161, -1161, 1562, -1161, -1161,
3934 1123, -1161
3935};
3936
3937/* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM.
3938 Performed when YYTABLE does not specify something else to do. Zero
3939 means the default is an error. */
3940static const yytype_int16 yydefact[] =
3941{
3942 2, 0, 0, 47, 406, 407, 408, 0, 399, 400,
3943 401, 404, 26, 26, 26, 420, 421, 395, 396, 418,
3944 422, 323, 703, 702, 704, 705, 64, 0, 64, 0,
3945 819, 707, 706, 708, 97, 99, 697, 696, 98, 698,
3946 692, 693, 694, 695, 640, 713, 714, 0, 0, 0,
3947 0, 0, 0, 0, 819, 819, 126, 493, 666, 666,
3948 668, 670, 0, 0, 0, 0, 0, 0, 0, 6,
3949 3, 8, 26, 10, 43, 49, 40, 58, 61, 46,
3950 722, 722, 70, 91, 323, 90, 0, 112, 0, 116,
3951 128, 0, 237, 79, 246, 253, 282, 283, 267, 284,
3952 398, 0, 351, 0, 0, 87, 87, 0, 0, 0,
3953 0, 0, 419, 0, 0, 0, 323, 370, 94, 368,
3954 340, 341, 639, 641, 342, 343, 649, 344, 655, 346,
3955 659, 345, 661, 347, 638, 684, 685, 637, 690, 701,
3956 709, 710, 348, 0, 349, 7, 1, 205, 216, 206,
3957 229, 202, 222, 212, 211, 232, 233, 227, 210, 209,
3958 204, 230, 234, 235, 214, 203, 217, 221, 223, 215,
3959 208, 224, 231, 226, 225, 218, 228, 213, 201, 220,
3960 219, 200, 207, 198, 199, 195, 196, 197, 155, 157,
3961 156, 190, 191, 186, 168, 169, 170, 177, 174, 176,
3962 171, 172, 192, 193, 178, 179, 183, 187, 173, 175,
3963 165, 166, 167, 180, 181, 182, 184, 185, 188, 189,
3964 194, 160, 162, 33, 158, 159, 161, 402, 403, 405,
3965 819, 512, 0, 107, 65, 64, 0, 0, 28, 819,
3966 12, 0, 11, 27, 295, 393, 394, 513, 0, 0,
3967 0, 0, 722, 722, 0, 0, 261, 0, 360, 363,
3968 709, 710, 0, 349, 262, 251, 252, 357, 24, 0,
3969 0, 3, 21, 23, 64, 114, 20, 353, 793, 334,
3970 796, 666, 298, 299, 329, 0, 64, 330, 64, 789,
3971 300, 0, 0, 64, 787, 64, 0, 0, 0, 722,
3972 722, 124, 397, 0, 132, 133, 140, 490, 687, 0,
3973 686, 688, 0, 0, 0, 646, 650, 662, 656, 664,
3974 691, 74, 273, 0, 274, 816, 815, 5, 817, 0,
3975 0, 0, 0, 0, 0, 819, 0, 0, 753, 0,
3976 721, 389, 753, 719, 0, 391, 409, 517, 507, 100,
3977 519, 367, 410, 519, 502, 819, 130, 0, 122, 117,
3978 819, 77, 0, 0, 0, 0, 0, 291, 292, 0,
3979 0, 0, 0, 249, 250, 0, 0, 75, 0, 289,
3980 290, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3981 0, 806, 807, 809, 819, 808, 0, 0, 86, 84,
3982 85, 0, 0, 0, 0, 0, 377, 3, 4, 0,
3983 433, 432, 0, 0, 709, 710, 349, 150, 151, 0,
3984 0, 153, 819, 0, 709, 710, 349, 387, 225, 218,
3985 228, 213, 195, 196, 197, 155, 156, 785, 81, 80,
3986 784, 783, 0, 782, 326, 318, 316, 317, 109, 322,
3987 819, 819, 110, 111, 64, 108, 809, 808, 0, 369,
3988 642, 819, 819, 163, 754, 64, 312, 819, 64, 819,
3989 311, 324, 0, 64, 366, 73, 30, 32, 31, 0,
3990 819, 296, 0, 0, 357, 0, 0, 819, 809, 819,
3991 808, 819, 819, 819, 0, 64, 355, 14, 0, 113,
3992 0, 792, 333, 795, 0, 0, 358, 814, 813, 301,
3993 814, 303, 359, 788, 0, 139, 691, 127, 119, 721,
3994 0, 809, 819, 808, 491, 672, 689, 675, 673, 667,
3995 643, 644, 669, 645, 671, 647, 0, 0, 0, 0,
3996 0, 809, 808, 818, 9, 0, 34, 35, 36, 37,
3997 297, 0, 71, 72, 760, 757, 756, 755, 758, 766,
3998 767, 754, 0, 773, 768, 777, 776, 772, 819, 769,
3999 726, 819, 732, 752, 735, 738, 64, 733, 759, 761,
4000 762, 764, 738, 725, 771, 446, 445, 775, 738, 779,
4001 731, 0, 0, 0, 0, 0, 490, 0, 517, 101,
4002 490, 0, 0, 0, 64, 0, 118, 131, 0, 530,
4003 259, 266, 268, 269, 270, 277, 278, 271, 272, 247,
4004 248, 275, 276, 530, 64, 263, 264, 265, 254, 255,
4005 256, 257, 258, 293, 294, 797, 799, 798, 800, 323,
4006 510, 64, 819, 797, 799, 798, 800, 323, 511, 819,
4007 0, 424, 0, 423, 0, 0, 0, 0, 0, 375,
4008 357, 809, 819, 808, 380, 385, 150, 151, 152, 715,
4009 383, 717, 809, 819, 808, 0, 0, 804, 805, 82,
4010 325, 0, 319, 328, 0, 320, 64, 362, 797, 798,
4011 506, 323, 0, 0, 0, 306, 313, 308, 315, 810,
4012 365, 29, 0, 279, 13, 819, 0, 0, 0, 797,
4013 356, 0, 64, 797, 798, 819, 0, 0, 0, 25,
4014 115, 22, 354, 0, 791, 331, 332, 64, 790, 0,
4015 125, 801, 138, 64, 797, 798, 492, 676, 0, 648,
4016 0, 652, 0, 658, 654, 0, 0, 660, 260, 798,
4017 0, 38, 0, 444, 436, 438, 64, 441, 434, 0,
4018 730, 781, 0, 729, 0, 748, 720, 0, 0, 0,
4019 745, 724, 597, 770, 774, 0, 750, 778, 64, 59,
4020 62, 286, 280, 0, 723, 60, 281, 0, 491, 515,
4021 0, 491, 416, 417, 516, 501, 334, 92, 93, 41,
4022 336, 0, 45, 335, 129, 123, 0, 0, 69, 48,
4023 67, 0, 304, 329, 236, 42, 0, 349, 528, 528,
4024 0, 819, 819, 517, 509, 104, 0, 514, 313, 819,
4025 819, 310, 508, 102, 309, 819, 352, 819, 425, 819,
4026 427, 88, 426, 373, 374, 413, 0, 0, 530, 0,
4027 0, 801, 356, 64, 797, 798, 0, 0, 0, 0,
4028 150, 151, 154, 64, 0, 64, 0, 327, 819, 361,
4029 503, 95, 50, 304, 238, 57, 245, 164, 64, 819,
4030 64, 0, 64, 819, 819, 514, 819, 819, 56, 244,
4031 794, 302, 120, 514, 26, 677, 674, 682, 683, 651,
4032 653, 663, 657, 665, 39, 64, 443, 0, 763, 0,
4033 780, 727, 771, 819, 737, 736, 738, 738, 448, 734,
4034 738, 765, 738, 762, 738, 0, 819, 819, 390, 392,
4035 492, 96, 492, 339, 0, 819, 121, 357, 819, 819,
4036 819, 809, 819, 808, 529, 529, 0, 0, 0, 0,
4037 105, 811, 819, 0, 0, 103, 411, 819, 18, 629,
4038 415, 414, 0, 0, 0, 428, 430, 0, 89, 0,
4039 521, 0, 378, 528, 0, 379, 514, 0, 0, 0,
4040 0, 514, 388, 786, 83, 321, 504, 505, 307, 314,
4041 364, 0, 0, 0, 819, 0, 0, 753, 678, 435,
4042 437, 439, 442, 728, 0, 749, 0, 746, 0, 741,
4043 0, 743, 751, 66, 288, 0, 0, 26, 26, 334,
4044 337, 0, 0, 0, 0, 797, 798, 64, 797, 798,
4045 0, 0, 285, 54, 242, 55, 243, 106, 0, 52,
4046 240, 53, 241, 630, 631, 819, 632, 819, 15, 431,
4047 0, 371, 372, 522, 0, 0, 529, 376, 381, 0,
4048 716, 384, 0, 753, 494, 497, 0, 0, 0, 738,
4049 738, 738, 738, 63, 287, 819, 819, 338, 44, 68,
4050 305, 514, 621, 627, 593, 0, 0, 0, 529, 64,
4051 529, 581, 666, 0, 620, 78, 538, 544, 546, 549,
4052 542, 541, 577, 543, 586, 589, 592, 598, 599, 588,
4053 552, 607, 600, 553, 608, 609, 610, 611, 612, 613,
4054 614, 615, 617, 616, 618, 619, 596, 76, 51, 239,
4055 0, 0, 634, 412, 0, 19, 636, 0, 0, 0,
4056 523, 819, 0, 0, 386, 64, 0, 0, 440, 747,
4057 742, 0, 739, 744, 482, 0, 480, 479, 0, 605,
4058 606, 151, 625, 0, 569, 64, 570, 574, 64, 0,
4059 564, 0, 819, 567, 580, 0, 622, 0, 623, 0,
4060 539, 547, 0, 587, 591, 603, 604, 0, 529, 529,
4061 0, 0, 595, 0, 633, 0, 709, 710, 349, 0,
4062 3, 16, 819, 524, 526, 527, 525, 0, 535, 0,
4063 484, 0, 499, 0, 495, 681, 680, 679, 738, 819,
4064 451, 819, 457, 478, 460, 463, 483, 64, 762, 463,
4065 450, 463, 456, 518, 520, 64, 562, 584, 572, 571,
4066 563, 575, 812, 565, 594, 64, 545, 540, 577, 0,
4067 578, 582, 666, 590, 585, 601, 602, 626, 551, 561,
4068 550, 557, 64, 64, 64, 64, 64, 64, 357, 809,
4069 819, 808, 819, 635, 819, 429, 531, 0, 0, 382,
4070 0, 496, 0, 0, 740, 455, 0, 454, 0, 474,
4071 0, 0, 458, 469, 471, 0, 449, 0, 476, 568,
4072 0, 576, 0, 624, 0, 548, 0, 0, 554, 555,
4073 556, 558, 559, 560, 801, 356, 64, 797, 798, 628,
4074 17, 0, 536, 537, 488, 64, 486, 489, 0, 498,
4075 452, 819, 462, 461, 463, 463, 481, 459, 463, 463,
4076 357, 809, 463, 573, 64, 578, 579, 583, 514, 819,
4077 0, 485, 500, 453, 0, 475, 0, 472, 0, 466,
4078 0, 468, 801, 356, 477, 0, 566, 533, 534, 532,
4079 487, 463, 463, 463, 463, 473, 467, 0, 464, 470,
4080 463, 465
4081};
4082
4083/* YYPGOTO[NTERM-NUM]. */
4084static const yytype_int16 yypgoto[] =
4085{
4086 -1161, -102, 1050, -1161, -1161, -1161, 989, -1161, 837, -44,
4087 -1161, -1161, -514, -1161, 162, 840, -1161, 51, -1161, -1161,
4088 30, -1161, -1161, 12, -1161, -67, -540, 7, -580, 15,
4089 -1161, -1161, 469, 2822, -1161, 3021, -1161, -77, -1161, -1161,
4090 1234, -56, -1161, 738, -1161, -374, 1484, -40, 1238, -138,
4091 8, -434, -75, -1161, 20, 4054, -407, 1239, -42, -10,
4092 -1161, -1161, -5, -1161, -1161, 5036, -1161, -1161, -1161, -1161,
4093 -545, 1252, -1161, 33, 872, 183, -1161, -35, -1161, 539,
4094 56, 671, -375, -1161, 44, -1161, 21, -554, -340, -47,
4095 -417, -1161, -565, -52, -1161, -1161, -1161, -1161, -1161, -1161,
4096 -1161, -1161, -1161, -1161, -1161, -1161, 1107, -1161, -1161, -1161,
4097 -1161, -1161, -1161, -1161, -1161, -1161, -1161, -1161, -1161, -1161,
4098 -1161, -1161, 395, -1161, 399, 1872, -1161, -1161, -1161, 2510,
4099 -384, 388, 170, -803, -1161, -827, -807, 622, 468, -230,
4100 -1161, 155, 96, -1161, -1161, 230, -1161, -1160, 93, 54,
4101 -1161, 310, -1161, -1161, 160, -1161, 40, 344, -148, -168,
4102 -1161, -1161, 377, -1161, -1161, -1161, 523, -1161, -1161, -104,
4103 -1161, -511, -1161, 1042, -1161, -779, -1161, -734, -794, -534,
4104 -1161, 49, -1161, -1161, -698, -119, -1161, -1161, -1161, -1161,
4105 -1161, 151, -1161, -276, -1161, -843, -974, -985, -352, -989,
4106 -791, -1161, 219, -1161, -1161, -905, 220, -1161, -1161, -653,
4107 231, -1161, -1161, -1161, 132, -1161, -1161, 138, 580, 861,
4108 -1161, 1287, 1008, 1302, 29, -1161, 1467, -1161, 880, -1161,
4109 1776, -1161, -1161, 2010, -1161, 2102, -1161, -1161, -53, -1161,
4110 -1161, -218, -1161, -1161, -1161, -1161, -1161, -1161, -1161, 14,
4111 -1161, -1161, -1161, -1161, 25, -55, 3834, -1, 1311, 4076,
4112 3549, -1161, -1161, 39, 787, 35, -1161, 661, -1161, -1161,
4113 -300, -692, 655, -72, -310, -191, -1135, -483, -298, -743,
4114 -409, -451, -700, -1161, -752, -1161, -665, -1161, -662, -543,
4115 -1161, -1161, -1161, -1161, -1161, -31, -485, -334, -1161, -1161,
4116 -89, 1312, 541, 213, 85, -243, -36, -69, 178
4117};
4118
4119/* YYDEFGOTO[NTERM-NUM]. */
4120static const yytype_int16 yydefgoto[] =
4121{
4122 0, 327, 69, 1, 2, 70, 71, 241, 242, 649,
4123 1137, 1274, 650, 1047, 271, 272, 494, 227, 72, 479,
4124 273, 74, 75, 76, 77, 78, 779, 472, 809, 79,
4125 623, 609, 438, 252, 866, 253, 400, 401, 403, 968,
4126 404, 82, 798, 810, 83, 599, 254, 85, 86, 274,
4127 87, 517, 88, 89, 90, 255, 421, 422, 221, 222,
4128 223, 694, 638, 225, 92, 93, 94, 95, 96, 97,
4129 782, 389, 98, 550, 482, 551, 283, 284, 285, 814,
4130 831, 832, 465, 447, 466, 232, 233, 449, 682, 642,
4131 287, 802, 803, 99, 397, 500, 849, 658, 856, 1143,
4132 859, 857, 675, 592, 595, 100, 257, 102, 103, 104,
4133 105, 106, 107, 108, 109, 110, 111, 350, 353, 957,
4134 1134, 846, 962, 963, 794, 258, 113, 114, 115, 259,
4135 652, 841, 964, 965, 413, 754, 755, 756, 757, 568,
4136 767, 768, 1220, 1221, 1222, 1332, 1293, 1224, 1225, 1289,
4137 1226, 1155, 1156, 1227, 1211, 1325, 1326, 524, 736, 894,
4138 307, 1146, 117, 1064, 1214, 1282, 354, 118, 119, 351,
4139 596, 597, 600, 601, 971, 847, 1206, 944, 1030, 818,
4140 1321, 850, 1369, 1207, 1095, 1237, 1097, 1249, 1098, 1190,
4141 1191, 1099, 1302, 1165, 1166, 1167, 1101, 1102, 1250, 1169,
4142 1103, 1104, 1105, 1106, 1107, 569, 1109, 1110, 1111, 1112,
4143 1113, 1114, 1115, 1116, 958, 1045, 1131, 1135, 120, 121,
4144 122, 123, 124, 125, 316, 126, 127, 536, 740, 128,
4145 129, 538, 130, 131, 132, 133, 537, 539, 309, 313,
4146 314, 529, 738, 737, 895, 998, 1066, 1217, 896, 134,
4147 135, 310, 136, 137, 138, 139, 260, 261, 142, 262,
4148 263, 858, 670, 339, 340, 341, 342, 570, 571, 572,
4149 914, 574, 575, 765, 576, 577, 578, 579, 923, 581,
4150 582, 583, 584, 585, 586, 587, 588, 589, 590, 760,
4151 441, 442, 443, 676, 292, 469, 289, 711, 640, 679,
4152 674, 396, 474, 827, 1173, 509, 653, 408, 244
4153};
4154
4155/* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If
4156 positive, shift that token. If negative, reduce the rule whose
4157 number is the opposite. If YYTABLE_NINF, syntax error. */
4158static const yytype_int16 yytable[] =
4159{
4160 141, 329, 224, 311, 302, 406, 312, 286, 270, 277,
4161 913, 321, 395, 668, 359, 459, 308, 238, 654, 641,
4162 291, 226, 224, 288, 293, 728, 921, 402, 763, 457,
4163 407, 73, 593, 236, 328, 239, 967, 302, 573, 468,
4164 580, 226, 573, 815, 580, 511, 445, 445, 445, 786,
4165 513, 141, 141, 224, 785, 305, 302, 302, 302, 639,
4166 275, 647, 912, 243, 228, 229, 450, 450, 450, 439,
4167 974, 328, 915, 446, 446, 446, 301, 231, 783, 758,
4168 1000, 787, 451, 451, 451, 945, 730, 790, 305, 819,
4169 726, 320, 317, 318, 319, 532, 534, 910, 1215, 917,
4170 910, 346, 1002, 1212, 922, 349, 224, 415, 425, 425,
4171 425, 685, 872, 875, 712, 1168, 345, -141, 399, 399,
4172 344, -356, 399, 330, 691, 1108, 1108, 867, 1333, 685,
4173 867, 495, 1179, -142, 651, -703, -149, 455, 888, 146,
4174 348, 1187, 867, -141, 867, 1327, -711, 733, -712, -356,
4175 -356, 1031, -148, -144, 792, -702, 715, 448, 452, 453,
4176 -146, 864, 786, 445, -703, 445, 367, 368, 490, 497,
4177 1179, 805, 336, 337, 1179, 240, 742, 1239, -142, 145,
4178 -141, 1238, -142, 467, -702, 450, 1180, 1100, 1100, 715,
4179 446, 234, 446, 1251, -145, 1248, 1188, 1213, 1333, 728,
4180 1189, 451, 498, -149, -146, -356, 270, 639, 647, -798,
4181 267, -143, 793, 728, 523, 1327, 1263, 1266, 1216, 604,
4182 379, 380, 651, 518, -584, 270, 347, 234, 504, 743,
4183 276, 276, 290, 294, 542, 328, -64, 1108, 234, 1056,
4184 141, 1000, -147, 501, 502, 503, 302, -132, 840, 141,
4185 473, 475, -147, 352, 546, 547, 548, 549, 343, 343,
4186 1148, 921, 1142, -133, 726, 862, -140, 325, 141, 758,
4187 906, 73, 481, 326, 867, 325, 471, 275, 1108, 726,
4188 -148, 326, -139, -135, -141, 1108, 1108, 853, 345, 234,
4189 -141, 485, 486, 508, 1163, 508, 1172, 305, 863, 1100,
4190 508, -146, 514, 231, -797, 659, 302, -146, -137, -144,
4191 348, 1251, 949, 270, 973, 1251, 915, 1347, 741, -142,
4192 741, 1346, 516, 663, -136, -142, 655, 445, 141, 715,
4193 1126, 1126, -145, 1127, -137, 345, -797, -113, 1204, -143,
4194 715, -134, 665, 1071, -149, 980, 399, 399, 399, 399,
4195 -149, 552, 553, 746, 446, 916, 141, 305, -129, 73,
4196 656, 657, 1205, 325, 1054, 275, 924, 1033, 1035, 326,
4197 1003, 328, 936, 1039, 1041, 325, 1347, 315, 606, -135,
4198 1014, 326, -138, -147, -798, 1013, -798, 445, 603, -147,
4199 646, 884, 1044, 608, 1258, 1260, 141, 1108, 346, 1264,
4200 1267, 356, -711, 141, 141, 525, 747, 450, 470, 680,
4201 -704, 726, -136, 234, 446, 355, 235, -137, 399, 145,
4202 492, -148, 445, 451, 758, -147, 758, -148, 276, -134,
4203 343, 343, 1159, 1160, 399, 867, -141, -137, -137, -704,
4204 -797, -137, 1126, 705, 1208, 518, 1014, 276, -798, 446,
4205 -144, 950, 648, 646, -149, 445, -144, -132, 1128, 955,
4206 527, 528, 886, 666, 1059, 887, 580, 667, 302, 701,
4207 724, 580, 725, -145, 224, 291, 727, -148, -705, -145,
4208 -143, -712, 446, 1126, 891, 646, -143, 360, -135, 1231,
4209 1126, 1126, 1232, 226, 692, 693, -144, 141, 686, -145,
4210 315, 750, 59, 362, 728, 878, 462, -705, -135, -135,
4211 770, 1344, -135, 481, 690, -142, 776, 726, 646, 305,
4212 708, -136, 900, 347, 716, 717, 718, 900, 985, 230,
4213 518, 994, 1255, 1256, 1331, 276, -133, 646, -134, 985,
4214 -149, -136, -136, 462, 141, -136, 1367, 797, 771, 921,
4215 141, 780, 797, 302, 780, 493, 801, 784, -134, -134,
4216 565, 801, -134, 461, -707, -143, 961, 1027, 800, 386,
4217 387, 388, 470, 813, -706, 276, 848, -149, 829, 493,
4218 830, 751, 276, 276, 758, 758, 912, 1055, -397, -148,
4219 463, 141, 566, -707, 141, 445, 480, 1069, -140, 1070,
4220 671, 1072, 1126, -706, 305, 1084, 445, 639, 837, 647,
4221 839, 921, -144, -148, -145, -819, -397, -397, 952, 842,
4222 808, 772, 446, 1335, 910, 560, 1232, 1339, 683, 683,
4223 1232, 820, 230, 446, -139, 1232, 797, 797, 338, 773,
4224 930, 235, 391, 932, 1234, 683, 725, 683, 826, 291,
4225 868, 141, -143, 141, 892, 564, 829, 391, 646, 1252,
4226 825, 725, 797, 291, -97, 879, 1138, 470, 833, 646,
4227 392, 393, -397, 391, 141, 484, 1285, 302, 1287, -98,
4228 1162, 454, 835, 897, 877, 392, 456, 1065, 890, 224,
4229 -144, 865, 1232, 1373, 1232, 824, 1232, 573, 1232, 580,
4230 470, 392, 488, 1230, 808, 808, 772, -699, 226, 559,
4231 580, -135, 871, 234, -708, 1232, 666, 880, -64, 826,
4232 1161, 830, -700, 276, 1192, 487, 394, 943, 305, 560,
4233 808, 518, 491, 919, 508, -699, -699, 961, 881, 845,
4234 826, -801, 1218, -708, 362, 1229, 761, 1199, 952, 761,
4235 -700, -700, 234, 1145, 302, -145, -64, 489, 391, 564,
4236 565, 933, 1017, 573, 1018, 580, 986, 824, 1328, 899,
4237 276, 901, -699, 276, 902, 903, -136, -112, 525, 977,
4238 1257, 979, -143, 496, -801, 925, 392, 521, 1353, -97,
4239 -709, -699, 566, 725, 505, -97, 506, 879, -710, 512,
4240 -349, -699, 515, -134, -98, 305, -700, 336, 337, 525,
4241 -98, 970, -801, -801, -700, 499, 234, 507, -709, -709,
4242 683, 978, 338, 1276, 439, 834, -710, -710, -349, -349,
4243 276, 530, 276, 527, 528, 1230, 723, 1230, 234, 510,
4244 470, 1230, 522, -700, 1005, 1007, 1230, 520, 1009, 391,
4245 1011, 470, 1012, 276, 947, 948, 1228, 535, 141, 540,
4246 826, 224, 953, 954, 527, 528, -801, 1244, -801, 834,
4247 826, 399, -797, 399, -709, 445, 525, 392, 541, 1334,
4248 525, 533, -710, 545, -349, 780, 1050, 591, 1342, 991,
4249 476, 797, 797, 834, 677, 1316, -718, 797, 797, 1020,
4250 477, 478, 446, 1230, 1247, 1230, 594, 1230, 598, 1230,
4251 801, 1096, 1096, 607, 1262, 1265, 992, 993, 1049, 995,
4252 996, 543, 1043, 678, 1219, 885, 1230, 660, 391, 526,
4253 664, 527, 528, 489, 1053, 527, 528, 715, 646, 669,
4254 788, 842, 699, 1060, 791, 997, 893, 1371, 1343, 1372,
4255 681, 1374, 1345, 684, 291, 696, 392, 661, 698, 808,
4256 808, 141, 706, 391, 704, 808, 808, 797, 1380, 707,
4257 1164, -129, 1023, 960, 961, -357, 722, 141, 399, 391,
4258 1185, 1186, 797, -447, 1077, 1038, 729, 1184, 1277, 1278,
4259 1228, 392, 672, 759, 1228, 687, 391, 1149, 1150, 1152,
4260 1153, 795, 762, -357, -357, 764, 695, 392, 941, 697,
4261 769, 1141, 662, 959, 700, 966, 774, 966, 775, 1140,
4262 141, 141, 1147, 1096, 392, 1269, 525, 1062, 777, 1125,
4263 1125, 234, 1350, 789, 826, 808, 720, 276, 1178, 1175,
4264 1176, 806, 36, 37, 1235, 39, 683, 673, 362, 836,
4265 808, 1078, 1079, 828, 141, 843, 844, 683, 1219, -357,
4266 1228, 1164, 1219, 942, 838, 141, 976, 1219, 1075, 1076,
4267 845, 1164, 1164, 848, 391, 904, 981, 907, 302, 530,
4268 1270, 527, 528, 909, 1125, 1125, 519, 519, 1125, 918,
4269 1177, 761, 931, 1201, 1202, 525, 826, 1171, 1273, 1209,
4270 1245, 926, 392, 1341, 1203, 1125, 1271, 927, 101, 1015,
4271 1016, 1233, 384, 385, 386, 387, 388, 766, 1021, 935,
4272 470, 1022, -329, 1024, 1219, 937, 1219, 934, 1219, 1197,
4273 1219, 498, 938, 141, 939, 1046, 141, 141, 525, 946,
4274 276, 1125, 141, 951, 956, 804, 1284, 1219, 530, 961,
4275 527, 528, 1210, 1244, 141, 1272, 276, 141, 673, 101,
4276 101, 989, 1125, 303, 328, 1125, 773, 1004, 1006, 1283,
4277 1008, 1010, 826, -333, 323, 826, 1037, 1067, 302, 1125,
4278 1068, 1125, 928, -331, 1125, 1125, 929, 1130, 1151, 1125,
4279 1125, 531, 399, 527, 528, 826, 303, 1133, 141, 1307,
4280 1322, 1323, 1174, 445, 554, 1243, 555, 556, 557, 558,
4281 323, 323, 141, 1154, 323, 412, 423, 423, 1181, 1182,
4282 323, 323, 323, 1132, 1082, 1136, 1183, 869, 1241, 425,
4283 446, 874, 876, 276, 1210, 40, 41, 42, 43, 302,
4284 1081, 1242, 1179, 362, 276, 525, 972, 1268, 1125, 975,
4285 1280, 1281, 1286, 1157, 1157, 874, 876, 889, 1288, 1292,
4286 375, 376, 362, 982, 1297, 1300, 646, 1301, 1304, 525,
4287 1306, 1329, 826, 826, 826, 1340, 1336, 1349, 1354, 375,
4288 376, 141, 1356, 1294, 554, 1298, 555, 556, 557, 558,
4289 425, 483, 399, 399, 1358, 1360, 1200, 908, 739, 1125,
4290 527, 528, 1170, 1125, 1365, 1125, 383, 384, 385, 386,
4291 387, 388, 276, -797, -798, 276, 276, 1377, 544, 966,
4292 141, 276, 744, 826, 527, 528, 384, 385, 386, 387,
4293 388, 719, 1351, 276, 752, 984, 276, 323, 721, 323,
4294 405, 799, 323, 323, 36, 37, 410, 39, 101, 427,
4295 390, 1171, 702, 1048, 45, 46, 1324, 101, 555, 556,
4296 557, 558, 870, 1051, 1125, 1058, 1052, 331, 332, 333,
4297 334, 335, 1275, 1057, 905, 1001, 101, 276, 1236, 1061,
4298 966, 1240, 1330, 1291, 1223, 1338, 1158, 1290, 1355, 1357,
4299 1370, 276, 1359, 1361, 987, 602, 1364, 761, 1368, 761,
4300 1305, 1259, 1253, 1254, 1319, 303, 983, 1094, 1094, 460,
4301 1246, 554, 1320, 555, 556, 557, 558, 559, 745, 988,
4302 889, 990, 440, 911, 920, 1375, 1376, 1378, 1379, 1366,
4303 458, 0, 0, 0, 1381, 0, 101, 560, 323, 323,
4304 323, 323, 0, 323, 323, 0, 999, 0, 470, 0,
4305 959, 561, 1136, 0, 0, 0, 0, 0, 1144, 0,
4306 276, 562, 1094, 1094, 101, 303, 1094, 564, 565, 0,
4307 554, 0, 555, 556, 557, 558, 0, 0, 1311, 1312,
4308 1313, 0, 0, 1094, 0, 84, 1034, 1036, 0, 0,
4309 0, 0, 1040, 1042, 0, 0, 0, 0, 0, 276,
4310 566, 323, 0, 0, 101, 0, 0, 0, 0, 761,
4311 323, 101, 101, 0, 0, 0, 0, 0, 0, 1094,
4312 752, 0, 0, 0, 0, 753, 323, 966, 0, 1348,
4313 0, 1034, 1036, 0, 1040, 1042, 84, 84, 0, 0,
4314 1094, 0, 0, 1094, 0, 0, 0, 0, 0, 0,
4315 0, 84, 0, 22, 23, 24, 25, 1094, 0, 1094,
4316 0, 323, 1094, 1094, 0, 0, 0, 1094, 1094, 31,
4317 32, 33, 0, 0, 0, 0, 0, 1129, 0, 40,
4318 41, 42, 43, 44, 0, 0, 0, 84, 84, 0,
4319 0, 84, 0, 0, 0, 0, 323, 84, 84, 84,
4320 0, 1129, 0, 0, 0, 101, 0, 0, 1279, 0,
4321 1117, 1117, 0, 0, 554, 0, 555, 556, 557, 558,
4322 559, 0, 0, 0, 0, 0, 1094, 303, 362, 323,
4323 57, 58, 59, 60, 61, 62, 63, 64, 65, 0,
4324 560, 0, 0, 0, 0, 375, 376, 0, 0, 0,
4325 0, 0, 101, 0, 0, 0, 0, 0, 101, 0,
4326 0, 0, 0, 0, 562, 1117, 1117, 297, 0, 1117,
4327 564, 565, 0, 0, 0, 0, 0, 1094, 0, 0,
4328 0, 1094, 0, 1094, 0, 0, 1117, 0, 0, 381,
4329 382, 383, 384, 385, 386, 387, 388, 0, 323, 101,
4330 0, 323, 101, 566, 0, 0, 0, 0, 0, 0,
4331 323, 0, 303, 0, 84, 816, 84, 0, 0, 84,
4332 84, 0, 1117, 0, 0, 84, 0, 1352, 0, 0,
4333 1261, 0, 0, 0, 84, 0, 0, 0, 0, 0,
4334 0, 0, 1094, 1117, 0, 0, 1117, 0, 0, 0,
4335 0, 0, 0, 84, 0, 0, 0, 0, 0, 101,
4336 1117, 101, 1117, 0, 0, 1117, 1117, 0, 0, 323,
4337 1117, 1117, 0, 0, 0, 0, 1299, 0, 0, 0,
4338 323, 0, 101, 323, 0, 0, 1303, 0, 0, 0,
4339 0, 0, 0, 0, 0, 0, 0, 0, 0, 816,
4340 816, 0, 0, 1308, 1309, 1310, 0, 0, 0, 323,
4341 0, 0, 0, 84, 0, 84, 84, 84, 84, 0,
4342 84, 84, 0, 0, 0, 816, 0, 0, 0, 1117,
4343 0, 0, 0, 0, 0, 0, 303, 0, 0, 0,
4344 0, 84, 0, 554, 0, 555, 556, 557, 558, 559,
4345 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4346 0, 0, 0, 0, 0, 0, 0, 0, 0, 560,
4347 0, 0, 0, 112, 0, 0, 0, 0, 84, 0,
4348 1117, 84, 0, 561, 1117, 0, 1117, 84, 84, 84,
4349 0, 1118, 1118, 562, 0, 0, 0, 0, 563, 564,
4350 565, 0, 554, 84, 555, 556, 557, 558, 559, 0,
4351 0, 0, 0, 303, 0, 0, 0, 0, 0, 0,
4352 0, 0, 0, 0, 112, 112, 0, 0, 560, 0,
4353 0, 0, 566, 0, 0, 567, 0, 0, 84, 112,
4354 0, 0, 561, 0, 0, 1117, 1118, 1118, 1063, 0,
4355 1118, 0, 562, 0, 0, 0, 0, 563, 564, 565,
4356 0, 0, 0, 323, 0, 323, 101, 1118, 0, 0,
4357 0, 0, 0, 84, 0, 112, 112, 0, 0, 112,
4358 0, 0, 84, 0, 0, 112, 112, 112, 0, 0,
4359 0, 566, 0, 0, 567, 0, 0, 0, 0, 0,
4360 0, 0, 0, 1118, 0, 0, 84, 554, 0, 555,
4361 556, 557, 558, 559, 0, 0, 0, 0, 0, 0,
4362 0, 0, 0, 0, 1118, 0, 0, 1118, 0, 84,
4363 0, 0, 323, 560, 0, 84, 0, 0, 1119, 1119,
4364 0, 1118, 0, 1118, 0, 0, 1118, 1118, 0, 323,
4365 0, 1118, 1118, 0, 816, 816, 0, 562, 0, 0,
4366 816, 816, 563, 564, 565, 0, 0, 0, 0, 101,
4367 323, 0, 0, 0, 0, 84, 84, 0, 84, 84,
4368 0, 0, 0, 0, 0, 101, 0, 84, 0, 0,
4369 0, 0, 84, 1119, 1119, 0, 566, 1119, 0, 567,
4370 0, 0, 112, 0, 112, 0, 0, 112, 112, 0,
4371 1118, 0, 0, 112, 1119, 0, 0, 0, 0, 0,
4372 0, 0, 112, 0, 0, 0, 0, 0, 101, 101,
4373 816, 0, 0, 0, 0, 0, 84, 0, 84, 0,
4374 0, 112, 0, 0, 0, 816, 84, 0, 0, 0,
4375 1119, 0, 0, 0, 0, 0, 0, 84, 0, 84,
4376 84, 1118, 101, 0, 0, 1118, 0, 1118, 0, 0,
4377 0, 1119, 0, 101, 1119, 0, 84, 84, 0, 0,
4378 0, 0, 0, 0, 0, 0, 84, 0, 1119, 0,
4379 1119, 0, 0, 1119, 1119, 0, 0, 0, 1119, 1119,
4380 0, 112, 84, 112, 112, 112, 112, 0, 112, 112,
4381 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4382 0, 0, 0, 0, 0, 0, 1118, 0, 0, 112,
4383 0, 0, 0, 0, 0, 0, 0, 1195, 0, 361,
4384 0, 101, 0, 0, 101, 101, 0, 0, 0, 0,
4385 101, 0, 0, 0, 0, 0, 0, 1119, 0, 0,
4386 0, 0, 101, 0, 0, 101, 112, 0, 0, 112,
4387 0, 0, 0, 0, 0, 112, 112, 112, 0, 0,
4388 0, 0, 0, 0, 323, 0, 0, 0, 0, 0,
4389 0, 112, 362, 363, 364, 365, 366, 367, 368, 369,
4390 370, 371, 372, 373, 374, 0, 101, 0, 1119, 375,
4391 376, 0, 1119, 0, 1119, 377, 0, 0, 0, 0,
4392 101, 0, 0, 0, 0, 0, 112, 0, 0, 0,
4393 0, 0, 1120, 1120, 0, 0, 0, 1296, 0, 0,
4394 84, 0, 84, 84, 0, 0, 0, 0, 0, 378,
4395 0, 379, 380, 381, 382, 383, 384, 385, 386, 387,
4396 388, 112, 0, 0, 0, 0, 0, 0, 0, 0,
4397 112, 0, 0, 1119, 0, 0, 0, 323, 0, 0,
4398 0, 0, 0, 0, 323, 323, 0, 1120, 1120, 101,
4399 0, 1120, 0, 0, 112, 0, 0, 0, 1337, 0,
4400 0, 0, 0, 0, 0, 0, 0, 0, 1120, 84,
4401 0, 0, 0, 0, 0, 0, 0, 112, 0, 0,
4402 0, 0, 0, 112, 0, 0, 84, 0, 101, 0,
4403 0, 84, 84, 0, 0, 0, 0, 84, 84, 0,
4404 0, 0, 0, 0, 1120, 0, 84, 84, 0, 0,
4405 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4406 0, 0, 84, 112, 112, 1120, 112, 112, 1120, 0,
4407 0, 0, 0, 0, 0, 112, 0, 0, 0, 0,
4408 112, 0, 1120, 0, 1120, 0, 0, 1120, 1120, 0,
4409 0, 0, 1120, 1120, 0, 0, 0, 1121, 1121, 0,
4410 0, 0, 0, 0, 0, 84, 84, 84, 0, 0,
4411 0, 116, 0, 0, 0, 0, 0, 0, 0, 0,
4412 0, 0, 84, 0, 112, 0, 112, 0, 0, 0,
4413 0, 0, 0, 0, 112, 0, 0, 0, 0, 84,
4414 0, 0, 0, 0, 0, 112, 0, 112, 112, 0,
4415 84, 1120, 1121, 1121, 0, 0, 1121, 0, 0, 0,
4416 0, 0, 116, 116, 112, 112, 0, 0, 0, 0,
4417 0, 0, 0, 1121, 112, 0, 0, 116, 0, 0,
4418 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4419 112, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4420 0, 0, 1120, 0, 0, 0, 1120, 0, 1120, 1121,
4421 0, 0, 0, 116, 116, 0, 0, 116, 84, 0,
4422 0, 84, 84, 116, 116, 116, 0, 84, 0, 0,
4423 1121, 0, 0, 1121, 0, 0, 0, 0, 0, 84,
4424 0, 0, 84, 0, 0, 0, 0, 1121, 0, 1121,
4425 0, 0, 1121, 1121, 0, 0, 0, 1121, 1121, 0,
4426 0, 84, 0, 0, 0, 0, 0, 1120, 0, 0,
4427 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4428 0, 0, 0, 84, 0, 0, 0, 0, 0, 0,
4429 0, 0, 0, 0, 0, 0, 0, 84, 0, 0,
4430 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4431 0, 0, 0, 0, 0, 0, 1121, 0, 0, 0,
4432 0, 0, 0, 0, 0, 0, 0, 0, 112, 0,
4433 112, 112, 0, 0, 0, 0, 0, 0, 0, 0,
4434 116, 0, 116, 0, 0, 116, 116, 0, 0, 0,
4435 0, 116, 0, 0, 84, 0, 0, 0, 0, 0,
4436 116, 84, 84, 0, 0, 0, 84, 1121, 0, 0,
4437 0, 1121, 0, 1121, 0, 0, 0, 0, 0, 116,
4438 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4439 0, 0, 0, 0, 0, 0, 0, 112, 0, 0,
4440 0, 0, 0, 0, 0, 84, 1122, 1122, 0, 0,
4441 0, 0, 0, 0, 112, 0, 0, 0, 0, 112,
4442 112, 0, 0, 80, 0, 112, 112, 0, 0, 0,
4443 0, 0, 1121, 0, 112, 112, 0, 0, 0, 116,
4444 0, 116, 116, 116, 116, 0, 116, 116, 0, 0,
4445 112, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4446 0, 1122, 1122, 0, 0, 1122, 0, 116, 0, 0,
4447 0, 0, 0, 0, 80, 80, 0, 0, 299, 0,
4448 0, 0, 1122, 0, 0, 0, 0, 0, 0, 0,
4449 0, 0, 0, 112, 112, 112, 0, 0, 0, 0,
4450 0, 0, 0, 0, 116, 0, 0, 116, 0, 0,
4451 112, 299, 0, 116, 116, 116, 0, 0, 1122, 0,
4452 0, 0, 0, 0, 0, 0, 0, 112, 0, 116,
4453 299, 299, 299, 0, 0, 80, 80, 80, 112, 1122,
4454 0, 0, 1122, 0, 0, 0, 0, 0, 0, 0,
4455 0, 0, 0, 0, 0, 0, 1122, 0, 1122, 0,
4456 0, 1122, 1122, 0, 116, 0, 1122, 1122, 0, 0,
4457 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4458 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4459 0, 0, 0, 0, 0, 0, 0, 0, 0, 116,
4460 0, 0, 0, 0, 0, 0, 112, 0, 116, 112,
4461 112, 0, 0, 0, 0, 112, 0, 0, 0, 0,
4462 0, 0, 81, 0, 0, 1122, 0, 112, 0, 0,
4463 112, 0, 116, 0, 0, 0, 0, 0, 0, 0,
4464 1123, 1123, 0, 0, 0, 0, 0, 0, 0, 112,
4465 0, 0, 80, 0, 80, 116, 0, 0, 0, 0,
4466 0, 116, 0, 80, 0, 0, 0, 0, 0, 0,
4467 0, 112, 80, 81, 81, 0, 1122, 300, 0, 0,
4468 1122, 0, 1122, 0, 0, 112, 0, 0, 0, 0,
4469 0, 80, 0, 0, 0, 1123, 1123, 0, 0, 1123,
4470 0, 116, 116, 0, 116, 116, 0, 0, 0, 0,
4471 300, 0, 0, 116, 0, 0, 1123, 0, 116, 0,
4472 299, 0, 0, 0, 0, 0, 0, 0, 0, 300,
4473 300, 300, 1124, 1124, 81, 81, 81, 0, 0, 0,
4474 0, 1122, 112, 0, 0, 0, 0, 0, 0, 112,
4475 112, 80, 1123, 0, 112, 0, 0, 0, 0, 0,
4476 0, 0, 116, 0, 116, 0, 0, 0, 0, 0,
4477 0, 0, 116, 1123, 0, 0, 1123, 0, 0, 80,
4478 299, 0, 0, 116, 0, 116, 116, 1124, 1124, 0,
4479 1123, 1124, 1123, 112, 0, 1123, 1123, 0, 0, 0,
4480 1123, 1123, 116, 116, 0, 0, 0, 0, 1124, 0,
4481 0, 0, 116, 0, 0, 0, 80, 0, 0, 80,
4482 0, 0, 0, 0, 0, 0, 80, 80, 116, 0,
4483 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4484 0, 0, 0, 0, 1124, 0, 0, 0, 0, 0,
4485 0, 81, 0, 81, 0, 0, 0, 0, 0, 1123,
4486 0, 0, 81, 0, 0, 1124, 0, 0, 1124, 0,
4487 0, 81, 0, 0, 0, 0, 80, 0, 0, 0,
4488 0, 0, 1124, 0, 1124, 0, 0, 1124, 1124, 0,
4489 81, 0, 1124, 1124, 0, 0, 0, 0, 0, 0,
4490 0, 0, 0, 0, 0, 22, 23, 24, 25, 0,
4491 1123, 80, 0, 0, 1123, 0, 1123, 0, 0, 300,
4492 80, 31, 32, 33, 1082, 0, 0, 0, 1083, 0,
4493 0, 40, 41, 42, 43, 44, 0, 0, 0, 0,
4494 0, 0, 299, 0, 80, 0, 0, 0, 0, 0,
4495 81, 1124, 0, 0, 0, 0, 0, 0, 0, 0,
4496 0, 0, 0, 1085, 1086, 0, 116, 80, 116, 116,
4497 0, 1087, 0, 80, 1088, 1123, 1089, 1090, 81, 300,
4498 0, 0, 57, 58, 59, 60, 61, 62, 63, 64,
4499 65, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4500 0, 0, 1124, 0, 0, 0, 1124, 0, 1124, 0,
4501 0, 0, 1093, 0, 80, 81, 0, 80, 81, 297,
4502 0, 0, 0, 0, 0, 81, 81, 299, 0, 0,
4503 80, 0, 0, 0, 0, 116, 0, 0, 0, 0,
4504 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4505 0, 0, 116, 0, 0, 0, 0, 116, 116, 0,
4506 0, 0, 0, 116, 116, 0, 0, 1124, 0, 0,
4507 0, 0, 116, 116, 80, 81, 80, 0, 0, 0,
4508 0, 0, 0, 0, 80, 0, 0, 0, 116, 0,
4509 0, 0, 0, 0, 0, 80, 0, 80, 0, 0,
4510 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4511 81, 0, 0, 0, 80, 80, 0, 0, 0, 81,
4512 362, 363, 364, 365, 366, 367, 368, 369, 0, 371,
4513 372, 116, 116, 116, 0, 0, 0, 375, 376, 0,
4514 80, 300, 0, 81, 0, 0, 0, 0, 116, 0,
4515 144, 299, 0, 0, 0, 0, 0, 0, 0, 0,
4516 0, 0, 0, 0, 0, 116, 81, 0, 0, 0,
4517 0, 0, 81, 0, 0, 0, 116, 0, 0, 379,
4518 380, 381, 382, 383, 384, 385, 386, 387, 388, 0,
4519 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4520 0, 144, 144, 0, 0, 306, 0, 0, 0, 0,
4521 0, 0, 0, 81, 0, 0, 81, 0, 0, 0,
4522 0, 0, 0, 0, 0, 0, 300, 0, 299, 81,
4523 0, 0, 0, 0, 0, 0, 0, 0, 306, 0,
4524 0, 0, 0, 0, 116, 0, 0, 116, 116, 0,
4525 0, 0, 0, 116, 0, 0, 0, 416, 426, 426,
4526 0, 0, 0, 0, 0, 116, 0, 0, 116, 0,
4527 0, 0, 0, 81, 0, 81, 0, 0, 0, 0,
4528 0, 80, 0, 81, 0, 0, 0, 116, 0, 0,
4529 0, 0, 0, 0, 81, 0, 81, 0, 0, 0,
4530 0, 0, 0, 0, 0, 0, 0, 0, 0, 116,
4531 0, 0, 0, 81, 81, 0, 0, 0, 0, 0,
4532 0, 0, 0, 116, 0, 0, 0, 0, 0, 0,
4533 0, 0, 0, 0, 0, 0, 0, 0, 0, 81,
4534 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4535 300, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4536 0, 0, 0, 0, 80, 0, 0, 0, 940, 80,
4537 80, 0, 0, 0, 0, 80, 80, 0, 0, 0,
4538 116, 0, 0, 0, 80, 0, 0, 116, 116, 0,
4539 144, 0, 116, 0, 0, 0, 0, 0, 0, 144,
4540 80, 0, 362, 363, 364, 365, 366, 367, 368, 369,
4541 370, 371, 372, 373, 374, 0, 0, 0, 144, 375,
4542 376, 0, 0, 0, 0, 0, 0, 300, 0, 0,
4543 0, 116, 0, 0, 0, 140, 0, 0, 0, 0,
4544 0, 0, 0, 80, 80, 80, 0, 306, 0, 0,
4545 0, 0, 0, 0, 0, 0, 0, 0, 0, 378,
4546 80, 379, 380, 381, 382, 383, 384, 385, 386, 387,
4547 388, 0, 0, 0, 0, 0, 0, 80, 144, -298,
4548 81, 0, 0, 0, 0, 0, 140, 140, 80, 0,
4549 304, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4550 0, 0, 0, 0, 0, 0, 144, 306, 0, 0,
4551 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4552 0, 0, 0, 304, 0, 0, 0, 0, 0, 0,
4553 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4554 0, 0, 414, 424, 424, 424, 144, 0, 0, 0,
4555 0, 0, 299, 144, 144, 0, 80, 0, 0, 80,
4556 80, 0, 0, 81, 0, 80, 0, 0, 81, 81,
4557 0, 0, 0, 0, 81, 81, 0, 80, 0, 0,
4558 80, 0, 0, 81, 0, 0, 0, 0, -819, 0,
4559 0, 0, 0, 0, 0, 0, -819, -819, -819, 81,
4560 0, -819, -819, -819, 0, -819, 0, 0, 0, 0,
4561 0, 0, 0, -819, -819, -819, 0, 0, 0, 0,
4562 0, 80, 0, 0, 0, -819, -819, 0, -819, -819,
4563 -819, -819, -819, 0, 0, 80, 0, 0, 0, 0,
4564 0, 0, 81, 81, 81, 0, 0, 144, 0, 0,
4565 0, 0, 299, 0, 0, 91, -819, -819, 0, 81,
4566 0, 0, 0, 0, 0, 0, 0, 0, 0, 306,
4567 0, 0, 0, 0, 0, 140, 81, 143, 0, 0,
4568 0, 0, 0, 0, 140, -819, -819, 81, 0, 0,
4569 0, 0, 80, 0, 144, 0, 0, 0, 0, 0,
4570 144, 0, 0, 140, 80, 0, 91, 91, -819, 0,
4571 0, 0, 0, 299, 0, 0, 0, 0, 0, 0,
4572 0, 0, 0, 0, 0, 0, 0, 0, 143, 143,
4573 0, 0, 304, 0, 0, 0, 0, 0, 0, -819,
4574 -819, 144, -819, 80, 144, 230, -819, 0, -819, 0,
4575 0, 300, 0, 0, 306, 81, 0, 817, 81, 81,
4576 0, 0, 411, 140, 81, 0, 0, 0, 0, 0,
4577 0, 0, 0, 0, 0, 0, 81, 0, 0, 81,
4578 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4579 0, 140, 304, 0, 0, 0, 0, 0, 0, 0,
4580 0, 144, 0, 144, 0, 0, 0, 0, 0, 0,
4581 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4582 81, 0, 0, 0, 144, 0, 0, 0, 0, 0,
4583 0, 140, 0, 0, 81, 0, 0, 0, 140, 140,
4584 0, 817, 817, 0, 0, 0, 0, 0, 0, 0,
4585 0, 300, 0, 0, 0, 0, 22, 23, 24, 25,
4586 0, 0, 0, 0, 0, 0, 0, 817, 0, 0,
4587 0, 0, 31, 32, 33, 1082, 0, 0, 306, 1083,
4588 0, 0, 40, 41, 42, 43, 44, 898, 0, 0,
4589 0, 81, 0, 0, 0, 91, 0, 0, 0, 0,
4590 0, 0, 0, 81, 91, 0, 0, 0, 0, 0,
4591 0, 0, 300, 0, 1085, 1086, 0, 143, 0, 0,
4592 0, 0, 1087, 91, 0, 1088, 143, 1089, 1090, 0,
4593 1091, 0, 140, 57, 58, 59, 60, 61, 62, 63,
4594 64, 65, 81, 0, 0, 143, 0, 0, 0, 0,
4595 0, 0, 0, 0, 304, 306, 362, -820, -820, -820,
4596 -820, 367, 368, 1093, 0, -820, -820, 0, 0, 0,
4597 297, 0, 0, 375, 376, 0, 0, 234, 0, 140,
4598 0, 0, 0, 91, 0, 140, 0, 0, 0, 0,
4599 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4600 0, 0, 0, 0, 0, 143, 0, 0, 144, 0,
4601 0, 91, 0, 0, 0, 379, 380, 381, 382, 383,
4602 384, 385, 386, 387, 388, 0, 140, 0, 0, 140,
4603 0, 0, 0, 143, 0, 0, 0, 0, 0, 304,
4604 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4605 0, 91, 0, 0, 0, 0, 0, 0, 91, 91,
4606 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4607 0, 0, 0, 143, 0, 0, 0, 0, 0, 0,
4608 143, 143, 0, 0, 0, 0, 140, 0, 140, 0,
4609 0, 0, 0, 0, 0, 0, 817, 817, 0, 0,
4610 0, 0, 817, 817, 688, 644, 0, 0, 689, 140,
4611 0, 144, 0, 0, 0, 0, 0, 0, 0, 0,
4612 0, 0, 0, 0, 0, 0, 0, 144, 191, 192,
4613 193, 194, 195, 196, 197, 198, 199, 0, 0, 200,
4614 201, 0, 0, 0, 0, 202, 203, 204, 205, 0,
4615 0, 0, 91, 0, 0, 0, 0, 0, 0, 206,
4616 207, 0, 0, 304, 0, 0, 0, 0, 0, 0,
4617 144, 144, 817, 0, 143, 0, 0, 0, 0, 0,
4618 0, 0, 0, 0, 0, 0, 0, 817, 0, 208,
4619 209, 210, 211, 212, 213, 214, 215, 216, 217, 91,
4620 218, 219, 0, 0, 144, 91, 0, 0, 220, 230,
4621 0, 0, 0, 0, 0, 144, 0, 0, 0, 0,
4622 0, 143, 0, 0, 0, 0, 0, 143, 0, 0,
4623 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4624 304, 0, 0, 0, 0, 0, 91, 0, 0, 91,
4625 0, 0, 0, 0, 0, 362, 363, 364, 365, 366,
4626 367, 368, 811, 0, 371, 372, 0, 0, 143, 0,
4627 0, 143, 375, 376, 0, 0, 0, 0, 0, 1198,
4628 0, 0, 0, 144, 143, 0, 144, 144, 0, 0,
4629 0, 0, 144, 140, 0, 0, 0, 0, 0, 0,
4630 0, 0, 0, 0, 144, 0, 91, 144, 91, 0,
4631 0, 0, 0, 0, 379, 380, 381, 382, 383, 384,
4632 385, 386, 387, 388, 0, 0, 0, 0, 143, 91,
4633 143, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4634 0, 0, 0, 0, 0, 0, 811, 811, 144, 0,
4635 0, 143, 0, 0, 0, 0, 0, 0, 0, 0,
4636 0, 0, 144, 0, 0, 0, 0, 0, 143, 143,
4637 0, 0, 811, 0, 0, 0, 0, 0, 0, 426,
4638 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4639 0, 0, 0, 0, 143, 0, 140, 0, 0, 0,
4640 22, 23, 24, 25, 0, 0, 0, 0, 0, 0,
4641 0, 0, 140, 0, 0, 0, 31, 32, 33, 1082,
4642 0, 0, 0, 1083, 0, 1084, 40, 41, 42, 43,
4643 44, 144, 0, 0, 0, 0, 0, 0, 0, 0,
4644 426, 0, 0, 0, 0, 560, 0, 0, 0, 0,
4645 0, 0, 0, 0, 0, 140, 140, 0, 1085, 1086,
4646 0, 0, 0, 0, 0, 0, 1087, 0, 0, 1088,
4647 144, 1089, 1090, 0, 1091, 564, 0, 57, 58, 1092,
4648 60, 61, 62, 63, 64, 65, 0, 0, 0, 140,
4649 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4650 140, 0, 0, 0, 0, 0, 0, 1093, 0, 0,
4651 0, 0, 0, 91, 297, 0, 0, 0, 0, 362,
4652 363, 364, 365, 366, 367, 368, 369, 370, 371, 372,
4653 373, 374, 0, 0, 0, 143, 375, 376, 0, 0,
4654 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4655 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4656 0, 0, 0, 0, 1196, 0, 0, 0, 140, 0,
4657 0, 140, 140, 0, 0, 0, 378, 140, 379, 380,
4658 381, 382, 383, 384, 385, 386, 387, 388, 0, 140,
4659 0, 0, 140, 0, 0, 234, 0, 0, 0, 0,
4660 0, 811, 811, 0, 0, 0, 0, 811, 811, 0,
4661 0, 0, 0, 0, 0, 0, 91, 0, 0, 0,
4662 0, 0, 0, 143, 143, 0, 0, 0, 0, 143,
4663 143, 0, 91, 140, 0, 0, 0, 0, 143, 0,
4664 0, 0, 0, 0, 0, 0, 0, 140, 0, 0,
4665 0, 0, 0, 0, 143, 0, 0, 0, 0, 0,
4666 0, 0, 0, 0, 424, 0, 0, 0, 0, 0,
4667 0, 0, 0, 0, 0, 91, 91, 811, 0, 0,
4668 0, 0, 0, 256, 264, 265, 266, 0, 0, 0,
4669 282, 282, 811, 0, 0, 0, 0, 143, 143, 143,
4670 0, 0, 0, 322, 324, 0, 0, 0, 0, 91,
4671 0, 0, 0, 0, 143, 0, 140, 0, 0, 0,
4672 91, 0, 0, 0, 0, 424, 0, 0, 0, 0,
4673 0, 143, 0, 0, 0, 0, 0, 0, 0, 0,
4674 0, 0, 143, 0, 0, 0, 0, 0, 0, 282,
4675 282, 282, 0, 0, 0, 140, 0, 0, 0, 0,
4676 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4677 0, 0, 0, 0, 0, 0, 0, 22, 23, 24,
4678 25, 0, 0, 0, 1194, 0, 0, 0, 91, 0,
4679 0, 91, 91, 31, 32, 33, 1082, 91, 0, 0,
4680 1083, 0, 0, 40, 41, 42, 43, 44, 0, 91,
4681 143, 0, 91, 143, 143, 0, 0, 0, 0, 143,
4682 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4683 0, 143, 0, 0, 143, 1085, 1086, 0, 0, 0,
4684 0, 0, 0, 1087, 0, 0, 1088, 0, 1089, 1090,
4685 0, 1091, 0, 91, 57, 58, 59, 60, 61, 62,
4686 63, 64, 65, 0, 0, 0, 282, 91, 282, 0,
4687 0, 0, 0, 0, 0, 143, 0, 0, 0, 0,
4688 0, 0, 0, 0, 1093, 0, 0, 322, 0, 143,
4689 0, 297, 0, 0, 0, 0, 0, 0, 0, 0,
4690 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4691 0, 0, 0, 0, 282, 282, 282, 0, 0, 0,
4692 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4693 0, 0, 0, 4, 5, 6, 91, 8, 0, 0,
4694 0, 9, 10, 0, 0, 0, 11, 0, 12, 13,
4695 14, 245, 246, 17, 18, 0, 0, 0, 143, 0,
4696 19, 20, 247, 22, 23, 24, 25, 0, 0, 248,
4697 0, 0, 0, 0, 0, 91, 295, 0, 0, 31,
4698 32, 33, 34, 35, 36, 37, 38, 39, 0, 40,
4699 41, 42, 43, 44, 45, 46, 0, 143, 610, 611,
4700 612, 613, 614, 0, 0, 615, 616, 617, 618, 619,
4701 620, 621, 622, 0, 624, 0, 0, 625, 626, 627,
4702 628, 629, 630, 631, 632, 633, 634, 0, 0, 296,
4703 282, 0, 250, 53, 54, 55, 0, 0, 0, 0,
4704 57, 58, 59, 60, 61, 62, 63, 64, 65, 0,
4705 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4706 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4707 0, 0, 0, 0, 0, 0, 0, 297, 0, 0,
4708 282, 0, 0, 0, 0, 298, 0, 0, 0, 0,
4709 282, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4710 266, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4711 0, 0, -801, 0, 0, 0, 0, 0, 703, 0,
4712 -801, -801, -801, 0, 0, 282, -801, -801, 0, -801,
4713 0, 0, 0, 0, 0, 0, 0, -801, -801, 0,
4714 0, 282, 0, 282, 0, 0, 282, 0, 0, -801,
4715 -801, 0, -801, -801, -801, -801, -801, 0, 282, 0,
4716 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4717 0, 0, 0, 0, 0, 0, 748, 0, 0, 0,
4718 -801, -801, 0, 0, 0, 0, 0, 0, 0, 0,
4719 -801, -801, -801, -801, -801, -801, -801, -801, -801, -801,
4720 -801, -801, -801, 0, 0, 0, 0, -801, -801, -801,
4721 -801, 0, 821, -801, 0, 0, 0, 0, 0, 282,
4722 0, 0, 0, 0, 0, 0, 0, 781, 0, 0,
4723 781, 0, -801, 0, 0, 0, 0, 0, 0, 282,
4724 0, 0, 0, 0, 812, 0, -146, -801, 0, -801,
4725 -801, -801, -801, -801, -801, -801, -801, -801, -801, 0,
4726 0, 0, 0, -801, -801, -801, -801, -137, 0, 0,
4727 -801, 0, -801, 0, 0, 0, 0, 0, 0, 0,
4728 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4729 0, 0, 0, 0, 0, 0, 0, 0, 282, 0,
4730 0, 0, 0, 0, 0, 0, 0, 0, 0, 282,
4731 0, 0, 0, 0, 0, 0, 0, 282, 0, 0,
4732 282, 0, 0, 0, 0, 0, 0, 0, 873, 873,
4733 0, 0, 282, 0, 282, 0, 0, 0, 0, 0,
4734 0, 0, 781, 781, 873, 0, 0, 0, 0, 0,
4735 0, 0, 873, 873, 873, 0, 0, 0, 0, 282,
4736 0, 0, 0, -4, 3, 0, 4, 5, 6, 7,
4737 8, -4, -4, -4, 9, 10, 0, -4, -4, 11,
4738 -4, 12, 13, 14, 15, 16, 17, 18, -4, 0,
4739 0, 0, 0, 19, 20, 21, 22, 23, 24, 25,
4740 0, 0, 26, 0, 282, 0, 0, 0, 27, 28,
4741 268, 30, 31, 32, 33, 34, 35, 36, 37, 38,
4742 39, 0, 40, 41, 42, 43, 44, 45, 46, 0,
4743 0, -4, 282, 0, 0, 0, 0, 0, 0, 47,
4744 48, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4745 940, 0, 0, 0, 49, 50, 0, 0, 0, 0,
4746 0, 0, 51, 0, 282, 52, 53, 54, 55, 0,
4747 56, 0, 0, 57, 58, 59, 60, 61, 62, 63,
4748 64, 65, 282, -4, 362, 363, 364, 365, 366, 367,
4749 368, 369, 370, 371, 372, 373, 374, 0, 0, 0,
4750 0, 375, 376, 0, 0, 0, 0, 0, 0, 0,
4751 66, 67, 68, 0, 0, -4, 0, 873, 0, 0,
4752 0, -4, 0, 543, 0, 0, 0, 0, 0, 0,
4753 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4754 0, 378, 0, 379, 380, 381, 382, 383, 384, 385,
4755 386, 387, 388, 0, 0, 0, 0, 0, 0, 0,
4756 0, 781, 0, 0, 0, 0, 0, 0, 0, 0,
4757 282, 0, 0, 0, 0, 0, 0, 0, 282, 0,
4758 0, 0, 1032, 873, 873, 0, 0, 0, 0, 873,
4759 873, 0, 0, 282, 0, 0, 0, 0, 0, 0,
4760 0, 0, 0, 0, 0, 282, 0, 0, 0, 0,
4761 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4762 0, 0, 0, 0, 0, 282, 0, 781, 873, 873,
4763 0, 873, 873, 0, 0, 0, 0, 0, 0, 0,
4764 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4765 0, 1073, 1074, 0, 0, 282, 0, 0, 0, 873,
4766 1080, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4767 0, 0, 0, 0, 873, 0, 0, 0, 0, 0,
4768 0, -819, 3, 0, 4, 5, 6, 7, 8, 0,
4769 282, 0, 9, 10, 0, 0, 0, 11, 873, 12,
4770 13, 14, 15, 16, 17, 18, 0, 0, 0, 0,
4771 0, 19, 20, 21, 22, 23, 24, 25, 0, 0,
4772 26, 0, 0, 0, 0, 0, 27, 28, 268, 30,
4773 31, 32, 33, 34, 35, 36, 37, 38, 39, 0,
4774 40, 41, 42, 43, 44, 45, 46, 0, 0, 0,
4775 0, 0, 0, 0, 0, 0, 0, 47, 48, 0,
4776 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4777 0, 0, 49, 50, 0, 282, 0, 0, 0, 0,
4778 51, 0, 0, 52, 53, 54, 55, 0, 56, 0,
4779 0, 57, 58, 59, 60, 61, 62, 63, 64, 65,
4780 0, -819, 0, 0, 0, 0, 0, 0, 0, 0,
4781 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4782 0, 0, 0, 0, 0, 0, 0, 0, 66, 67,
4783 68, 0, 0, -819, 3, -819, 4, 5, 6, 7,
4784 8, -819, 0, 0, 9, 10, 0, 0, 0, 11,
4785 0, 12, 13, 14, 15, 16, 17, 18, 0, 0,
4786 0, 0, 0, 19, 20, 21, 22, 23, 24, 25,
4787 0, 0, 26, 0, 0, 0, 0, 0, 27, 28,
4788 29, 30, 31, 32, 33, 34, 35, 36, 37, 38,
4789 39, 0, 40, 41, 42, 43, 44, 45, 46, 0,
4790 0, 0, 0, 0, 0, 0, 282, 0, 0, 47,
4791 48, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4792 0, 0, 0, 0, 49, 50, 0, 0, 0, 0,
4793 0, 0, 51, 0, 0, 52, 53, 54, 55, 0,
4794 56, 0, 0, 57, 58, 59, 60, 61, 62, 63,
4795 64, 65, 0, 0, 0, 0, 0, 0, 0, 0,
4796 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4797 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4798 66, 67, 68, 0, 0, -4, 3, -819, 4, 5,
4799 6, 7, 8, -819, 0, 0, 9, 10, 0, 0,
4800 0, 11, 0, 12, 13, 14, 15, 16, 17, 18,
4801 0, 0, 0, 0, 0, 19, 20, 21, 22, 23,
4802 24, 25, 0, 0, 26, 0, 0, 0, 0, 0,
4803 27, 28, 29, 30, 31, 32, 33, 34, 35, 36,
4804 37, 38, 39, 0, 40, 41, 42, 43, 44, 45,
4805 46, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4806 0, 47, 48, 0, 0, 0, 0, 0, 0, 0,
4807 0, 0, 0, 0, 0, 0, 49, 50, 0, 0,
4808 0, 0, 0, 0, 51, 0, 0, 52, 53, 54,
4809 55, 0, 56, 0, 0, 57, 58, 59, 60, 61,
4810 62, 63, 64, 65, 0, 0, 0, 0, 0, 0,
4811 0, 0, 0, -801, 0, 0, 0, 0, 0, 0,
4812 0, -801, -801, -801, 0, 0, -801, -801, -801, 0,
4813 -801, 0, 66, 67, 68, 0, 0, -4, -801, -801,
4814 -801, -801, -801, 0, 0, 543, 0, 0, 0, 0,
4815 -801, -801, 0, -801, -801, -801, -801, -801, 0, 0,
4816 0, 362, 363, 364, 365, 366, 367, 368, 369, 370,
4817 371, 372, 373, 374, 0, 0, 0, 0, 375, 376,
4818 0, -801, -801, 0, 0, 0, 0, 0, 0, 0,
4819 0, -801, -801, -801, -801, -801, -801, -801, -801, -801,
4820 -801, -801, -801, -801, 0, 0, 0, 0, -801, -801,
4821 -801, -801, 0, 883, -801, 0, 0, 0, 378, -801,
4822 379, 380, 381, 382, 383, 384, 385, 386, 387, 388,
4823 0, 0, 0, -801, 0, 0, -801, 0, 0, 0,
4824 0, 0, 0, 0, 0, 0, 0, -146, -801, -801,
4825 -801, -801, -801, -801, -801, -801, -801, -801, -801, -801,
4826 0, 0, 0, 0, -801, -801, -801, -801, -801, -699,
4827 0, -801, -801, -801, 0, 0, 0, -699, -699, -699,
4828 0, 0, -699, -699, -699, 0, -699, 0, 0, 0,
4829 0, 0, 0, 0, -699, 0, -699, -699, -699, 0,
4830 0, 0, 0, 0, 0, 0, -699, -699, 0, -699,
4831 -699, -699, -699, -699, 0, 0, 0, 362, 363, 364,
4832 365, 366, 367, 368, 369, 370, 371, 372, -820, -820,
4833 0, 0, 0, 0, 375, 376, 0, -699, -699, 0,
4834 0, 0, 0, 0, 0, 0, 0, -699, -699, -699,
4835 -699, -699, -699, -699, -699, -699, -699, -699, -699, -699,
4836 0, 0, 0, 0, -699, -699, -699, -699, 0, -699,
4837 -699, 0, 0, 0, 0, -699, 379, 380, 381, 382,
4838 383, 384, 385, 386, 387, 388, 0, 0, 0, -699,
4839 0, 0, -699, 0, 0, 0, 0, 0, 0, 0,
4840 0, 0, 0, -699, -699, -699, -699, -699, -699, -699,
4841 -699, -699, -699, -699, -699, -699, 0, 0, 0, 0,
4842 0, -699, -699, -699, -699, -700, 0, -699, -699, -699,
4843 0, 0, 0, -700, -700, -700, 0, 0, -700, -700,
4844 -700, 0, -700, 0, 0, 0, 0, 0, 0, 0,
4845 -700, 0, -700, -700, -700, 0, 0, 0, 0, 0,
4846 0, 0, -700, -700, 0, -700, -700, -700, -700, -700,
4847 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4848 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4849 0, 0, 0, -700, -700, 0, 0, 0, 0, 0,
4850 0, 0, 0, -700, -700, -700, -700, -700, -700, -700,
4851 -700, -700, -700, -700, -700, -700, 0, 0, 0, 0,
4852 -700, -700, -700, -700, 0, -700, -700, 0, 0, 0,
4853 0, -700, 0, 0, 0, 0, 0, 0, 0, 0,
4854 0, 0, 0, 0, 0, -700, 0, 0, -700, 0,
4855 0, 0, 0, 0, 0, 0, 0, 0, 0, -700,
4856 -700, -700, -700, -700, -700, -700, -700, -700, -700, -700,
4857 -700, -700, 0, 0, 0, 0, 0, -700, -700, -700,
4858 -700, -802, 0, -700, -700, -700, 0, 0, 0, -802,
4859 -802, -802, 0, 0, -802, -802, -802, 0, -802, 0,
4860 0, 0, 0, 0, 0, 0, -802, -802, -802, -802,
4861 -802, 0, 0, 0, 0, 0, 0, 0, -802, -802,
4862 0, -802, -802, -802, -802, -802, 0, 0, 0, 0,
4863 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4864 0, 0, 0, 0, 0, 0, 0, 0, 0, -802,
4865 -802, 0, 0, 0, 0, 0, 0, 0, 0, -802,
4866 -802, -802, -802, -802, -802, -802, -802, -802, -802, -802,
4867 -802, -802, 0, 0, 0, 0, -802, -802, -802, -802,
4868 0, 0, -802, 0, 0, 0, 0, -802, 0, 0,
4869 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4870 0, -802, 0, 0, -802, 0, 0, 0, 0, 0,
4871 0, 0, 0, 0, 0, 0, -802, -802, -802, -802,
4872 -802, -802, -802, -802, -802, -802, -802, -802, 0, 0,
4873 0, 0, -802, -802, -802, -802, -802, -803, 0, -802,
4874 -802, -802, 0, 0, 0, -803, -803, -803, 0, 0,
4875 -803, -803, -803, 0, -803, 0, 0, 0, 0, 0,
4876 0, 0, -803, -803, -803, -803, -803, 0, 0, 0,
4877 0, 0, 0, 0, -803, -803, 0, -803, -803, -803,
4878 -803, -803, 0, 0, 0, 0, 0, 0, 0, 0,
4879 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4880 0, 0, 0, 0, 0, -803, -803, 0, 0, 0,
4881 0, 0, 0, 0, 0, -803, -803, -803, -803, -803,
4882 -803, -803, -803, -803, -803, -803, -803, -803, 0, 0,
4883 0, 0, -803, -803, -803, -803, 0, 0, -803, 0,
4884 0, 0, 0, -803, 0, 0, 0, 0, 0, 0,
4885 0, 0, 0, 0, 0, 0, 0, -803, 0, 0,
4886 -803, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4887 0, 0, -803, -803, -803, -803, -803, -803, -803, -803,
4888 -803, -803, -803, -803, 0, 0, 0, 0, -803, -803,
4889 -803, -803, -803, -513, 0, -803, -803, -803, 0, 0,
4890 0, -513, -513, -513, 0, 0, -513, -513, -513, 0,
4891 -513, 0, 0, 0, 0, 0, 0, 0, -513, -513,
4892 -513, -513, 0, 0, 0, 0, 0, 0, 0, 0,
4893 -513, -513, 0, -513, -513, -513, -513, -513, 0, 0,
4894 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4895 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4896 0, -513, -513, 0, 0, 0, 0, 0, 0, 0,
4897 0, -513, -513, -513, -513, -513, -513, -513, -513, -513,
4898 -513, -513, -513, -513, 0, 0, 0, 0, -513, -513,
4899 -513, -513, 0, 0, -513, 0, 0, 0, 0, -513,
4900 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4901 0, 0, 0, -513, 0, 0, 0, 0, 0, 0,
4902 0, 0, 0, 0, 0, 0, 0, 0, -513, 0,
4903 -513, -513, -513, -513, -513, -513, -513, -513, -513, -513,
4904 0, 0, 0, 0, -513, -513, -513, -513, -513, -350,
4905 230, -513, -513, -513, 0, 0, 0, -350, -350, -350,
4906 0, 0, -350, -350, -350, 0, -350, 0, 0, 0,
4907 0, 0, 0, 0, -350, 0, -350, -350, -350, 0,
4908 0, 0, 0, 0, 0, 0, -350, -350, 0, -350,
4909 -350, -350, -350, -350, 0, 0, 0, 0, 0, 0,
4910 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4911 0, 0, 0, 0, 0, 0, 0, -350, -350, 0,
4912 0, 0, 0, 0, 0, 0, 0, -350, -350, -350,
4913 -350, -350, -350, -350, -350, -350, -350, -350, -350, -350,
4914 0, 0, 0, 0, -350, -350, -350, -350, 0, 0,
4915 -350, 0, 0, 0, 0, -350, 0, 0, 0, 0,
4916 0, 0, 0, 0, 0, 0, 0, 0, 0, -350,
4917 0, 0, -350, 0, 0, 0, 0, 0, 0, 0,
4918 0, 0, 0, 0, -350, -350, -350, -350, -350, -350,
4919 -350, -350, -350, -350, -350, -350, 0, 0, 0, 0,
4920 0, -350, -350, -350, -350, -819, 0, -350, -350, -350,
4921 0, 0, 0, -819, -819, -819, 0, 0, -819, -819,
4922 -819, 0, -819, 0, 0, 0, 0, 0, 0, 0,
4923 -819, -819, -819, -819, 0, 0, 0, 0, 0, 0,
4924 0, 0, -819, -819, 0, -819, -819, -819, -819, -819,
4925 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4926 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4927 0, 0, 0, -819, -819, 0, 0, 0, 0, 0,
4928 0, 0, 0, -819, -819, -819, -819, -819, -819, -819,
4929 -819, -819, -819, -819, -819, -819, 0, 0, 0, 0,
4930 -819, -819, -819, -819, 0, 0, -819, 0, 0, 0,
4931 0, -819, 0, 0, 0, 0, 0, 0, 0, 0,
4932 0, 0, 0, 0, 0, -819, 0, 0, 0, 0,
4933 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4934 -819, 0, -819, -819, -819, -819, -819, -819, -819, -819,
4935 -819, -819, 0, 0, 0, 0, -819, -819, -819, -819,
4936 -819, -356, 230, -819, -819, -819, 0, 0, 0, -356,
4937 -356, -356, 0, 0, -356, -356, -356, 0, -356, 0,
4938 0, 0, 0, 0, 0, 0, -356, 0, -356, -356,
4939 0, 0, 0, 0, 0, 0, 0, 0, -356, -356,
4940 0, -356, -356, -356, -356, -356, 0, 0, 0, 0,
4941 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4942 0, 0, 0, 0, 0, 0, 0, 0, 0, -356,
4943 -356, 0, 0, 0, 0, 0, 0, 0, 0, -356,
4944 -356, -356, -356, -356, -356, -356, -356, -356, -356, -356,
4945 -356, -356, 0, 0, 0, 0, -356, -356, -356, -356,
4946 0, 884, -356, 0, 0, 0, 0, -356, 0, 0,
4947 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4948 0, -356, 0, 0, 0, 0, 0, 0, 0, 0,
4949 0, 0, 0, 0, 0, -147, -356, 0, -356, -356,
4950 -356, -356, -356, -356, -356, -356, -356, -356, 0, 0,
4951 0, 0, 823, -356, -356, -356, -356, -363, 0, -356,
4952 -356, -356, 0, 0, 0, -363, -363, -363, 0, 0,
4953 -363, -363, -363, 0, -363, 0, 0, 0, 0, 0,
4954 0, 0, -363, 0, -363, -363, 0, 0, 0, 0,
4955 0, 0, 0, 0, -363, -363, 0, -363, -363, -363,
4956 -363, -363, 0, 0, 0, 0, 0, 0, 0, 0,
4957 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4958 0, 0, 0, 0, 0, -363, -363, 0, 0, 0,
4959 0, 0, 0, 0, 0, -363, -363, -363, -363, -363,
4960 -363, -363, -363, -363, -363, -363, -363, -363, 0, 0,
4961 0, 0, -363, -363, -363, -363, 0, 0, -363, 0,
4962 0, 0, 0, -363, 0, 0, 0, 0, 0, 0,
4963 0, 0, 0, 0, 0, 0, 0, -363, 0, 0,
4964 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4965 0, 0, -363, 0, -363, -363, -363, -363, -363, -363,
4966 -363, -363, -363, -363, 0, 0, 0, 0, 0, -363,
4967 -363, -363, -363, -393, 454, -363, -363, -363, 0, 0,
4968 0, -393, -393, -393, 0, 0, -393, -393, -393, 0,
4969 -393, 0, 0, 0, 0, 0, 0, 0, -393, 0,
4970 -393, -393, 0, 0, 0, 0, 0, 0, 0, 0,
4971 -393, -393, 0, -393, -393, -393, -393, -393, 0, 0,
4972 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4973 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4974 0, -393, -393, 0, 0, 0, 0, 0, 0, 0,
4975 0, -393, -393, -393, -393, -393, -393, -393, -393, -393,
4976 -393, -393, -393, -393, 0, 0, 0, 0, -393, -393,
4977 -393, -393, 0, 0, -393, 0, 0, 0, 0, -393,
4978 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4979 0, 0, 0, -393, 0, 0, 0, 0, 0, 0,
4980 0, 0, 0, 0, 0, 0, 0, 0, -393, 0,
4981 -393, -393, -393, -393, -393, -393, -393, -393, -393, -393,
4982 0, 0, 0, 0, 0, -393, -393, -393, -393, -394,
4983 0, -393, -393, -393, 0, 0, 0, -394, -394, -394,
4984 0, 0, -394, -394, -394, 0, -394, 0, 0, 0,
4985 0, 0, 0, 0, -394, 0, -394, -394, 0, 0,
4986 0, 0, 0, 0, 0, 0, -394, -394, 0, -394,
4987 -394, -394, -394, -394, 0, 0, 0, 0, 0, 0,
4988 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4989 0, 0, 0, 0, 0, 0, 0, -394, -394, 0,
4990 0, 0, 0, 0, 0, 0, 0, -394, -394, -394,
4991 -394, -394, -394, -394, -394, -394, -394, -394, -394, -394,
4992 0, 0, 0, 0, -394, -394, -394, -394, 0, 0,
4993 -394, 0, 0, 0, 0, -394, 0, 0, 0, 0,
4994 0, 0, 0, 0, 0, 0, 0, 0, 0, -394,
4995 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4996 0, 0, 0, 0, -394, 0, -394, -394, -394, -394,
4997 -394, -394, -394, -394, -394, -394, 0, 0, 0, 0,
4998 0, -394, -394, -394, -394, -360, 0, -394, -394, -394,
4999 0, 0, 0, -360, -360, -360, 0, 0, -360, -360,
5000 -360, 0, -360, 0, 0, 0, 0, 0, 0, 0,
5001 -360, 0, -360, -360, 0, 0, 0, 0, 0, 0,
5002 0, 0, -360, -360, 0, -360, -360, -360, -360, -360,
5003 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5004 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5005 0, 0, 0, -360, -360, 0, 0, 0, 0, 0,
5006 0, 0, 0, -360, -360, -360, -360, -360, -360, -360,
5007 -360, -360, -360, -360, -360, -360, 0, 0, 0, 0,
5008 -360, -360, -360, -360, 0, 0, -360, 0, 0, 0,
5009 0, -360, 0, 0, 0, 0, 0, 0, 0, 0,
5010 0, 0, 0, 0, 0, -360, 0, 0, 0, 0,
5011 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5012 -360, 0, -360, -360, -360, -360, -360, -360, -360, -360,
5013 -360, -360, 0, 0, 0, 0, 0, -360, -360, -360,
5014 -360, -801, 0, -360, -360, -360, 0, 0, 0, -801,
5015 -801, -801, 0, 0, 0, -801, -801, 0, -801, 0,
5016 0, 0, 0, 0, 0, 0, -801, -801, 0, 0,
5017 0, 0, 0, 0, 0, 0, 0, 0, -801, -801,
5018 0, -801, -801, -801, -801, -801, 0, 0, 0, 0,
5019 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5020 0, 0, 0, 0, 0, 0, 0, 0, 0, -801,
5021 -801, 0, 0, 0, 0, 0, 0, 0, 0, -801,
5022 -801, -801, -801, -801, -801, -801, -801, -801, -801, -801,
5023 -801, -801, 0, 0, 0, 0, -801, -801, -801, -801,
5024 0, 821, -801, 0, 0, 0, 0, 0, 0, 0,
5025 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5026 0, -801, 0, 0, 0, 0, 0, 0, 0, 0,
5027 0, 0, 0, 0, 0, -146, -801, 0, -801, -801,
5028 -801, -801, -801, -801, -801, -801, -801, -801, 0, 0,
5029 0, 0, -801, -801, -801, -801, -801, -356, 0, -801,
5030 0, -801, 0, 0, 0, -356, -356, -356, 0, 0,
5031 0, -356, -356, 0, -356, 0, 0, 0, 0, 0,
5032 0, 0, -356, 0, 0, 0, 0, 0, 0, 0,
5033 0, 0, 0, 0, -356, -356, 0, -356, -356, -356,
5034 -356, -356, 0, 0, 0, 0, 0, 0, 0, 0,
5035 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5036 0, 0, 0, 0, 0, -356, -356, 0, 0, 0,
5037 0, 0, 0, 0, 0, -356, -356, -356, -356, -356,
5038 -356, -356, -356, -356, -356, -356, -356, -356, 0, 0,
5039 0, 0, -356, -356, -356, -356, 0, 822, -356, 0,
5040 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5041 0, 0, 0, 0, 0, 0, 0, -356, 0, 0,
5042 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5043 0, -147, -356, 0, -356, -356, -356, -356, -356, -356,
5044 -356, -356, -356, -356, 0, 0, 0, 0, 823, -356,
5045 -356, -356, -138, -356, 0, -356, 0, -356, 0, 0,
5046 0, -356, -356, -356, 0, 0, 0, -356, -356, 0,
5047 -356, 0, 0, 0, 0, 0, 0, 0, -356, 0,
5048 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5049 -356, -356, 0, -356, -356, -356, -356, -356, 0, 0,
5050 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5051 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5052 0, -356, -356, 0, 0, 0, 0, 0, 0, 0,
5053 0, -356, -356, -356, -356, -356, -356, -356, -356, -356,
5054 -356, -356, -356, -356, 0, 0, 0, 0, -356, -356,
5055 -356, -356, 0, 822, -356, 0, 0, 0, 0, 0,
5056 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5057 0, 0, 0, -356, 0, 0, 0, 0, 0, 0,
5058 0, 0, 0, 0, 0, 0, 0, -147, -356, 0,
5059 -356, -356, -356, -356, -356, -356, -356, -356, -356, -356,
5060 0, 0, 0, 0, 823, -356, -356, -356, -356, 0,
5061 0, -356, 3, -356, 4, 5, 6, 7, 8, -819,
5062 -819, -819, 9, 10, 0, 0, -819, 11, 0, 12,
5063 13, 14, 15, 16, 17, 18, 0, 0, 0, 0,
5064 0, 19, 20, 21, 22, 23, 24, 25, 0, 0,
5065 26, 0, 0, 0, 0, 0, 27, 28, 268, 30,
5066 31, 32, 33, 34, 35, 36, 37, 38, 39, 0,
5067 40, 41, 42, 43, 44, 45, 46, 0, 0, -819,
5068 0, 0, 0, 0, 0, 0, 0, 47, 48, 0,
5069 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5070 0, 0, 49, 50, 0, 0, 0, 0, 0, 0,
5071 51, 0, 0, 52, 53, 54, 55, 0, 56, 0,
5072 0, 57, 58, 59, 60, 61, 62, 63, 64, 65,
5073 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5074 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5075 0, 0, 0, 0, 0, 0, 0, 0, 66, 67,
5076 68, 0, 0, 0, 3, -819, 4, 5, 6, 7,
5077 8, -819, 0, -819, 9, 10, 0, -819, -819, 11,
5078 0, 12, 13, 14, 15, 16, 17, 18, 0, 0,
5079 0, 0, 0, 19, 20, 21, 22, 23, 24, 25,
5080 0, 0, 26, 0, 0, 0, 0, 0, 27, 28,
5081 268, 30, 31, 32, 33, 34, 35, 36, 37, 38,
5082 39, 0, 40, 41, 42, 43, 44, 45, 46, 0,
5083 0, -819, 0, 0, 0, 0, 0, 0, 0, 47,
5084 48, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5085 0, 0, 0, 0, 49, 50, 0, 0, 0, 0,
5086 0, 0, 51, 0, 0, 52, 53, 54, 55, 0,
5087 56, 0, 0, 57, 58, 59, 60, 61, 62, 63,
5088 64, 65, 0, 0, 0, 0, 0, 0, 0, 0,
5089 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5090 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5091 66, 67, 68, 0, 0, 0, 3, -819, 4, 5,
5092 6, 7, 8, -819, 0, -819, 9, 10, 0, 0,
5093 -819, 11, -819, 12, 13, 14, 15, 16, 17, 18,
5094 0, 0, 0, 0, 0, 19, 20, 21, 22, 23,
5095 24, 25, 0, 0, 26, 0, 0, 0, 0, 0,
5096 27, 28, 268, 30, 31, 32, 33, 34, 35, 36,
5097 37, 38, 39, 0, 40, 41, 42, 43, 44, 45,
5098 46, 0, 0, -819, 0, 0, 0, 0, 0, 0,
5099 0, 47, 48, 0, 0, 0, 0, 0, 0, 0,
5100 0, 0, 0, 0, 0, 0, 49, 50, 0, 0,
5101 0, 0, 0, 0, 51, 0, 0, 52, 53, 54,
5102 55, 0, 56, 0, 0, 57, 58, 59, 60, 61,
5103 62, 63, 64, 65, 0, 0, 0, 0, 0, 0,
5104 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5105 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5106 0, 0, 66, 67, 68, 0, 0, 0, 3, -819,
5107 4, 5, 6, 7, 8, -819, 0, -819, 9, 10,
5108 0, 0, -819, 11, 0, 12, 13, 14, 15, 16,
5109 17, 18, -819, 0, 0, 0, 0, 19, 20, 21,
5110 22, 23, 24, 25, 0, 0, 26, 0, 0, 0,
5111 0, 0, 27, 28, 268, 30, 31, 32, 33, 34,
5112 35, 36, 37, 38, 39, 0, 40, 41, 42, 43,
5113 44, 45, 46, 0, 0, -819, 0, 0, 0, 0,
5114 0, 0, 0, 47, 48, 0, 0, 0, 0, 0,
5115 0, 0, 0, 0, 0, 0, 0, 0, 49, 50,
5116 0, 0, 0, 0, 0, 0, 51, 0, 0, 52,
5117 53, 54, 55, 0, 56, 0, 0, 57, 58, 59,
5118 60, 61, 62, 63, 64, 65, 0, 0, 0, 0,
5119 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5120 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5121 0, 0, 0, 0, 66, 67, 68, 0, 0, 0,
5122 3, -819, 4, 5, 6, 7, 8, -819, 0, -819,
5123 9, 10, 0, 0, -819, 11, 0, 12, 13, 14,
5124 15, 16, 17, 18, 0, 0, 0, 0, 0, 19,
5125 20, 21, 22, 23, 24, 25, 0, 0, 26, 0,
5126 0, 0, 0, 0, 27, 28, 268, 30, 31, 32,
5127 33, 34, 35, 36, 37, 38, 39, 0, 40, 41,
5128 42, 43, 44, 45, 46, 0, 0, -819, 0, 0,
5129 0, 0, 0, 0, 0, 47, 48, 0, 0, 0,
5130 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5131 49, 50, 0, 0, 0, 0, 0, 0, 51, 0,
5132 0, 52, 53, 54, 55, 0, 56, 0, 0, 57,
5133 58, 59, 60, 61, 62, 63, 64, 65, 0, 0,
5134 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5135 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5136 0, 0, 0, 0, 0, 0, 66, 67, 68, 0,
5137 0, 0, 3, -819, 4, 5, 6, 7, 8, -819,
5138 -819, -819, 9, 10, 0, 0, 0, 11, 0, 12,
5139 13, 14, 15, 16, 17, 18, 0, 0, 0, 0,
5140 0, 19, 20, 21, 22, 23, 24, 25, 0, 0,
5141 26, 0, 0, 0, 0, 0, 27, 28, 268, 30,
5142 31, 32, 33, 34, 35, 36, 37, 38, 39, 0,
5143 40, 41, 42, 43, 44, 45, 46, 0, 0, -819,
5144 0, 0, 0, 0, 0, 0, 0, 47, 48, 0,
5145 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5146 0, 0, 49, 50, 0, 0, 0, 0, 0, 0,
5147 51, 0, 0, 52, 53, 54, 55, 0, 56, 0,
5148 0, 57, 58, 59, 60, 61, 62, 63, 64, 65,
5149 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5150 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5151 0, 0, 0, 0, 0, 0, 0, 0, 66, 67,
5152 68, 0, 0, 0, 3, -819, 4, 5, 6, 7,
5153 8, -819, 0, -819, 9, 10, 0, 0, 0, 11,
5154 0, 12, 13, 14, 15, 16, 17, 18, 0, 0,
5155 0, 0, 0, 19, 20, 21, 22, 23, 24, 25,
5156 0, 0, 26, 0, 0, 0, 0, 0, 27, 28,
5157 268, 30, 31, 32, 33, 34, 35, 36, 37, 38,
5158 39, 0, 40, 41, 42, 43, 44, 45, 46, 0,
5159 0, -819, 0, 0, 0, 0, 0, 0, 0, 47,
5160 48, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5161 0, 0, 0, 0, 49, 50, 0, 0, 0, 0,
5162 0, 0, 51, 0, 0, 52, 53, 54, 55, 0,
5163 56, 0, 0, 57, 58, 59, 60, 61, 62, 63,
5164 64, 65, 0, 0, 0, 0, 0, 0, 0, 0,
5165 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5166 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5167 66, 67, 68, 0, 0, 0, 3, -819, 4, 5,
5168 6, 7, 8, -819, 0, 0, 9, 10, 0, 0,
5169 0, 11, 0, 12, 13, 14, 15, 16, 17, 18,
5170 0, 0, 0, 0, 0, 19, 20, 21, 22, 23,
5171 24, 25, 0, 0, 26, 0, 0, 0, 0, 0,
5172 27, 28, 268, 30, 31, 32, 33, 34, 35, 36,
5173 37, 38, 39, 0, 40, 41, 42, 43, 44, 45,
5174 46, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5175 0, 47, 48, 0, 0, 0, 0, 0, 0, 0,
5176 0, 0, 0, 0, 0, 0, 49, 50, 0, 0,
5177 0, 0, 0, 0, 51, 0, 0, 269, 53, 54,
5178 55, 0, 56, 0, 0, 57, 58, 59, 60, 61,
5179 62, 63, 64, 65, 0, 0, 0, 0, 0, 0,
5180 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5181 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5182 0, 0, 66, 67, 68, 0, 0, 0, 0, -819,
5183 0, 0, 0, -819, 3, -819, 4, 5, 6, 7,
5184 8, 0, 0, 0, 9, 10, 0, 0, 0, 11,
5185 0, 12, 13, 14, 15, 16, 17, 18, 0, 0,
5186 0, 0, 0, 19, 20, 21, 22, 23, 24, 25,
5187 0, 0, 26, 0, 0, 0, 0, 0, 27, 28,
5188 268, 30, 31, 32, 33, 34, 35, 36, 37, 38,
5189 39, 0, 40, 41, 42, 43, 44, 45, 46, 0,
5190 0, 0, 0, 0, 0, 0, 0, 0, 0, 47,
5191 48, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5192 0, 0, 0, 0, 49, 50, 0, 0, 0, 0,
5193 0, 0, 51, 0, 0, 52, 53, 54, 55, 0,
5194 56, 0, 0, 57, 58, 59, 60, 61, 62, 63,
5195 64, 65, 0, 0, 0, 0, 0, 0, 0, 0,
5196 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5197 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5198 66, 67, 68, 0, 0, 0, 0, -819, 0, 0,
5199 0, -819, 3, -819, 4, 5, 6, 7, 8, 0,
5200 0, 0, 9, 10, 0, 0, 0, 11, 0, 12,
5201 13, 14, 15, 16, 17, 18, 0, 0, 0, 0,
5202 0, 19, 20, 21, 22, 23, 24, 25, 0, 0,
5203 26, 0, 0, 0, 0, 0, 27, 28, 29, 30,
5204 31, 32, 33, 34, 35, 36, 37, 38, 39, 0,
5205 40, 41, 42, 43, 44, 45, 46, 0, 0, 0,
5206 0, 0, 0, 0, 0, 0, 0, 47, 48, 0,
5207 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5208 0, 0, 49, 50, 0, 0, 0, 0, 0, 0,
5209 51, 0, 0, 52, 53, 54, 55, 0, 56, 0,
5210 0, 57, 58, 59, 60, 61, 62, 63, 64, 65,
5211 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5212 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5213 0, 0, 0, 0, 0, 0, 0, 0, 66, 67,
5214 68, 0, 0, -819, 3, -819, 4, 5, 6, 7,
5215 8, -819, 0, 0, 9, 10, 0, 0, 0, 11,
5216 0, 12, 13, 14, 15, 16, 17, 18, 0, 0,
5217 0, 0, 0, 19, 20, 21, 22, 23, 24, 25,
5218 0, 0, 26, 0, 0, 0, 0, 0, 27, 28,
5219 268, 30, 31, 32, 33, 34, 35, 36, 37, 38,
5220 39, 0, 40, 41, 42, 43, 44, 45, 46, 0,
5221 0, 0, 0, 0, 0, 0, 0, 0, 0, 47,
5222 48, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5223 0, 0, 0, 0, 49, 50, 0, 0, 0, 0,
5224 0, 0, 51, 0, 0, 52, 53, 54, 55, 0,
5225 56, 0, 0, 57, 58, 59, 60, 61, 62, 63,
5226 64, 65, 0, 0, 0, 0, 0, 0, 0, 0,
5227 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5228 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5229 66, 67, 68, 0, 0, -819, 398, -819, 4, 5,
5230 6, 0, 8, -819, 0, 0, 9, 10, 0, 0,
5231 0, 11, -3, 12, 13, 14, 15, 16, 17, 18,
5232 0, 0, 0, 0, 0, 19, 20, 21, 22, 23,
5233 24, 25, 0, 0, 26, 0, 0, 0, 0, 0,
5234 0, 28, 0, 0, 31, 32, 33, 34, 35, 36,
5235 37, 38, 39, 0, 40, 41, 42, 43, 44, 45,
5236 46, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5237 0, 47, 48, 0, 0, 0, 0, 0, 0, 0,
5238 0, 0, 0, 0, 0, 0, 49, 50, 0, 0,
5239 0, 0, 0, 0, 249, 0, 0, 250, 53, 54,
5240 55, 0, 0, 0, 0, 57, 58, 59, 60, 61,
5241 62, 63, 64, 65, 0, 0, 0, 0, 0, 0,
5242 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5243 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5244 0, 0, 66, 67, 68, 0, 0, 0, 0, 325,
5245 0, 0, 0, 0, 0, 326, 147, 148, 149, 150,
5246 151, 152, 153, 154, 155, 156, 157, 158, 159, 160,
5247 161, 162, 163, 164, 165, 166, 167, 168, 169, 170,
5248 0, 0, 0, 171, 172, 173, 428, 429, 430, 431,
5249 178, 179, 180, 0, 0, 0, 0, 0, 181, 182,
5250 183, 184, 432, 433, 434, 435, 189, 36, 37, 436,
5251 39, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5252 0, 0, 0, 0, 0, 0, 0, 0, 0, 191,
5253 192, 193, 194, 195, 196, 197, 198, 199, 0, 0,
5254 200, 201, 0, 0, 0, 0, 202, 203, 204, 205,
5255 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5256 206, 207, 0, 0, 0, 0, 0, 0, 0, 0,
5257 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5258 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5259 208, 209, 210, 211, 212, 213, 214, 215, 216, 217,
5260 0, 218, 219, 0, 0, 0, 0, 0, 0, 220,
5261 437, 147, 148, 149, 150, 151, 152, 153, 154, 155,
5262 156, 157, 158, 159, 160, 161, 162, 163, 164, 165,
5263 166, 167, 168, 169, 170, 0, 0, 0, 171, 172,
5264 173, 174, 175, 176, 177, 178, 179, 180, 0, 0,
5265 0, 0, 0, 181, 182, 183, 184, 185, 186, 187,
5266 188, 189, 36, 37, 190, 39, 0, 0, 0, 0,
5267 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5268 0, 0, 0, 0, 191, 192, 193, 194, 195, 196,
5269 197, 198, 199, 0, 0, 200, 201, 0, 0, 0,
5270 0, 202, 203, 204, 205, 0, 0, 0, 0, 0,
5271 0, 0, 0, 0, 0, 206, 207, 0, 0, 0,
5272 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5273 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5274 0, 0, 0, 0, 0, 208, 209, 210, 211, 212,
5275 213, 214, 215, 216, 217, 0, 218, 219, 0, 0,
5276 0, 0, 0, 0, 220, 147, 148, 149, 150, 151,
5277 152, 153, 154, 155, 156, 157, 158, 159, 160, 161,
5278 162, 163, 164, 165, 166, 167, 168, 169, 170, 0,
5279 0, 0, 171, 172, 173, 174, 175, 176, 177, 178,
5280 179, 180, 0, 0, 0, 0, 0, 181, 182, 183,
5281 184, 185, 186, 187, 188, 189, 237, 0, 190, 0,
5282 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5283 0, 0, 0, 0, 0, 0, 0, 0, 191, 192,
5284 193, 194, 195, 196, 197, 198, 199, 0, 0, 200,
5285 201, 0, 0, 0, 0, 202, 203, 204, 205, 0,
5286 0, 0, 0, 0, 0, 0, 0, 0, 0, 206,
5287 207, 0, 0, 58, 0, 0, 0, 0, 0, 0,
5288 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5289 0, 0, 0, 0, 0, 0, 0, 0, 0, 208,
5290 209, 210, 211, 212, 213, 214, 215, 216, 217, 0,
5291 218, 219, 0, 0, 0, 0, 0, 0, 220, 147,
5292 148, 149, 150, 151, 152, 153, 154, 155, 156, 157,
5293 158, 159, 160, 161, 162, 163, 164, 165, 166, 167,
5294 168, 169, 170, 0, 0, 0, 171, 172, 173, 174,
5295 175, 176, 177, 178, 179, 180, 0, 0, 0, 0,
5296 0, 181, 182, 183, 184, 185, 186, 187, 188, 189,
5297 0, 0, 190, 0, 0, 0, 0, 0, 0, 0,
5298 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5299 0, 0, 191, 192, 193, 194, 195, 196, 197, 198,
5300 199, 0, 0, 200, 201, 0, 0, 0, 0, 202,
5301 203, 204, 205, 0, 0, 0, 0, 0, 0, 0,
5302 0, 0, 0, 206, 207, 0, 0, 58, 0, 0,
5303 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5304 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5305 0, 0, 0, 208, 209, 210, 211, 212, 213, 214,
5306 215, 216, 217, 0, 218, 219, 0, 0, 0, 0,
5307 0, 0, 220, 147, 148, 149, 150, 151, 152, 153,
5308 154, 155, 156, 157, 158, 159, 160, 161, 162, 163,
5309 164, 165, 166, 167, 168, 169, 170, 0, 0, 0,
5310 171, 172, 173, 174, 175, 176, 177, 178, 179, 180,
5311 0, 0, 0, 0, 0, 181, 182, 183, 184, 185,
5312 186, 187, 188, 189, 0, 0, 190, 0, 0, 0,
5313 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5314 0, 0, 0, 0, 0, 0, 191, 192, 193, 194,
5315 195, 196, 197, 198, 199, 0, 0, 200, 201, 0,
5316 0, 0, 0, 202, 203, 204, 205, 0, 0, 0,
5317 0, 0, 0, 0, 0, 0, 0, 206, 207, 0,
5318 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5319 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5320 0, 0, 0, 0, 0, 0, 0, 208, 209, 210,
5321 211, 212, 213, 214, 215, 216, 217, 0, 218, 219,
5322 4, 5, 6, 0, 8, 0, 220, 0, 9, 10,
5323 0, 0, 0, 11, 0, 12, 13, 14, 245, 246,
5324 17, 18, 0, 0, 0, 0, 0, 19, 20, 247,
5325 22, 23, 24, 25, 0, 0, 248, 0, 0, 0,
5326 0, 0, 0, 295, 0, 0, 31, 32, 33, 34,
5327 35, 36, 37, 38, 39, 0, 40, 41, 42, 43,
5328 44, 45, 46, 0, 0, 0, 0, 0, 0, 0,
5329 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5330 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5331 0, 0, 0, 0, 0, 0, 296, 0, 0, 250,
5332 53, 54, 55, 0, 0, 0, 0, 57, 58, 59,
5333 60, 61, 62, 63, 64, 65, 0, 0, 4, 5,
5334 6, 0, 8, 0, 0, 0, 9, 10, 0, 0,
5335 0, 11, 0, 12, 13, 14, 15, 16, 17, 18,
5336 0, 0, 0, 0, 297, 19, 20, 21, 22, 23,
5337 24, 25, 605, 0, 248, 0, 0, 0, 0, 0,
5338 0, 28, 0, 0, 31, 32, 33, 34, 35, 36,
5339 37, 38, 39, 278, 40, 41, 42, 43, 44, 45,
5340 46, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5341 0, 47, 48, 0, 0, 0, 0, 0, 0, 0,
5342 0, 0, 0, 0, 0, 0, 49, 50, 0, 0,
5343 0, 0, 0, 0, 249, 0, 0, 250, 53, 54,
5344 55, 0, 279, 280, 444, 57, 58, 281, 60, 61,
5345 62, 63, 64, 65, 0, 0, 0, 0, 0, 0,
5346 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5347 0, 0, 0, 0, 0, 0, 0, 4, 5, 6,
5348 0, 8, 66, 251, 68, 9, 10, 0, 0, 234,
5349 11, 0, 12, 13, 14, 15, 16, 17, 18, 0,
5350 0, 0, 0, 0, 19, 20, 21, 22, 23, 24,
5351 25, 0, 0, 26, 0, 0, 0, 0, 0, 0,
5352 28, 0, 0, 31, 32, 33, 34, 35, 36, 37,
5353 38, 39, 0, 40, 41, 42, 43, 44, 45, 46,
5354 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5355 47, 48, 0, 0, 0, 0, 0, 0, 0, 0,
5356 0, 0, 0, 0, 0, 49, 50, 0, 0, 0,
5357 0, 0, 0, 249, 0, 0, 250, 53, 54, 55,
5358 0, 0, 0, 0, 57, 58, 59, 60, 61, 62,
5359 63, 64, 65, 0, 0, 0, 0, 0, 0, 0,
5360 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5361 0, 0, 0, 0, 3, 0, 4, 5, 6, 7,
5362 8, 66, 67, 68, 9, 10, 0, 0, 234, 11,
5363 0, 12, 13, 14, 15, 16, 17, 18, 0, 0,
5364 0, 0, 0, 19, 20, 21, 22, 23, 24, 25,
5365 0, 0, 26, 0, 0, 0, 0, 0, 27, 28,
5366 0, 30, 31, 32, 33, 34, 35, 36, 37, 38,
5367 39, 0, 40, 41, 42, 43, 44, 45, 46, 0,
5368 0, 0, 0, 0, 0, 0, 0, 0, 0, 47,
5369 48, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5370 0, 0, 0, 0, 49, 50, 0, 0, 0, 0,
5371 0, 0, 51, 0, 0, 52, 53, 54, 55, 0,
5372 56, 0, 0, 57, 58, 59, 60, 61, 62, 63,
5373 64, 65, 0, 0, 398, 0, 4, 5, 6, 0,
5374 8, 0, 0, 0, 9, 10, 0, 0, 0, 11,
5375 0, 12, 13, 14, 15, 16, 17, 18, 0, 0,
5376 66, 67, 68, 19, 20, 21, 22, 23, 24, 25,
5377 0, 0, 26, 0, 0, 0, 0, 0, 0, 28,
5378 0, 0, 31, 32, 33, 34, 35, 36, 37, 38,
5379 39, 0, 40, 41, 42, 43, 44, 45, 46, 0,
5380 0, 0, 0, 0, 0, 0, 0, 0, 0, 47,
5381 48, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5382 0, 0, 0, 0, 49, 50, 0, 0, 0, 0,
5383 0, 0, 249, 0, 0, 250, 53, 54, 55, 0,
5384 0, 0, 0, 57, 58, 59, 60, 61, 62, 63,
5385 64, 65, 0, 0, 0, 0, 4, 5, 6, 0,
5386 8, 0, 0, 0, 9, 10, 0, 0, 0, 11,
5387 0, 12, 13, 14, 15, 16, 17, 18, 0, 0,
5388 66, 67, 68, 19, 20, 21, 22, 23, 24, 25,
5389 0, 0, 248, 0, 0, 0, 0, 0, 0, 28,
5390 0, 0, 31, 32, 33, 34, 35, 36, 37, 38,
5391 39, 278, 40, 41, 42, 43, 44, 45, 46, 0,
5392 0, 0, 0, 0, 0, 0, 0, 0, 0, 47,
5393 48, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5394 0, 0, 0, 0, 49, 50, 0, 0, 0, 0,
5395 0, 0, 249, 0, 0, 250, 53, 54, 55, 0,
5396 279, 280, 444, 57, 58, 281, 60, 61, 62, 63,
5397 64, 65, 0, 0, 0, 0, 4, 5, 6, 0,
5398 8, 0, 0, 0, 9, 10, 0, 0, 0, 11,
5399 0, 12, 13, 14, 15, 16, 17, 18, 0, 0,
5400 66, 251, 68, 19, 20, 21, 22, 23, 24, 25,
5401 0, 0, 248, 0, 0, 0, 0, 0, 0, 28,
5402 0, 0, 31, 32, 33, 34, 35, 36, 37, 38,
5403 39, 278, 40, 41, 42, 43, 44, 45, 46, 0,
5404 0, 0, 0, 0, 0, 0, 0, 0, 0, 47,
5405 48, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5406 0, 0, 0, 0, 49, 464, 0, 0, 0, 0,
5407 0, 0, 249, 0, 0, 250, 53, 54, 55, 0,
5408 279, 280, 444, 57, 58, 281, 60, 61, 62, 63,
5409 64, 65, 0, 0, 0, 0, 4, 5, 6, 0,
5410 8, 0, 0, 0, 9, 10, 0, 0, 0, 11,
5411 0, 12, 13, 14, 245, 246, 17, 18, 0, 0,
5412 66, 251, 68, 19, 20, 247, 22, 23, 24, 25,
5413 0, 0, 248, 0, 0, 0, 0, 0, 0, 28,
5414 0, 0, 31, 32, 33, 34, 35, 36, 37, 38,
5415 39, 278, 40, 41, 42, 43, 44, 45, 46, 0,
5416 0, 0, 0, 0, 0, 0, 0, 0, 0, 47,
5417 48, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5418 0, 0, 0, 0, 49, 50, 0, 0, 0, 0,
5419 0, 0, 249, 0, 0, 250, 53, 54, 55, 0,
5420 279, 280, 444, 57, 58, 281, 60, 61, 62, 63,
5421 64, 65, 0, 0, 0, 0, 4, 5, 6, 0,
5422 8, 0, 0, 0, 9, 10, 0, 0, 0, 11,
5423 0, 12, 13, 14, 245, 246, 17, 18, 0, 0,
5424 66, 251, 68, 19, 20, 247, 22, 23, 24, 25,
5425 0, 0, 248, 0, 0, 0, 0, 0, 0, 28,
5426 0, 0, 31, 32, 33, 34, 35, 36, 37, 38,
5427 39, 278, 40, 41, 42, 43, 44, 45, 46, 0,
5428 0, 0, 0, 0, 0, 0, 0, 0, 0, 47,
5429 48, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5430 0, 0, 0, 0, 49, 464, 0, 0, 0, 0,
5431 0, 0, 249, 0, 0, 250, 53, 54, 55, 0,
5432 279, 280, 444, 57, 58, 281, 60, 61, 62, 63,
5433 64, 65, 0, 0, 0, 0, 4, 5, 6, 0,
5434 8, 0, 0, 0, 9, 10, 0, 0, 0, 11,
5435 0, 12, 13, 14, 245, 246, 17, 18, 0, 0,
5436 66, 251, 68, 19, 20, 247, 22, 23, 24, 25,
5437 0, 0, 248, 0, 0, 0, 0, 0, 0, 28,
5438 0, 0, 31, 32, 33, 34, 35, 36, 37, 38,
5439 39, 278, 40, 41, 42, 43, 44, 45, 46, 0,
5440 0, 0, 0, 0, 0, 0, 0, 0, 0, 47,
5441 48, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5442 0, 0, 0, 0, 49, 50, 0, 0, 0, 0,
5443 0, 0, 249, 0, 0, 250, 53, 54, 55, 0,
5444 279, 280, 0, 57, 58, 281, 60, 61, 62, 63,
5445 64, 65, 0, 0, 0, 0, 4, 5, 6, 0,
5446 8, 0, 0, 0, 9, 10, 0, 0, 0, 11,
5447 0, 12, 13, 14, 245, 246, 17, 18, 0, 0,
5448 66, 251, 68, 19, 20, 247, 22, 23, 24, 25,
5449 0, 0, 248, 0, 0, 0, 0, 0, 0, 28,
5450 0, 0, 31, 32, 33, 34, 35, 36, 37, 38,
5451 39, 278, 40, 41, 42, 43, 44, 45, 46, 0,
5452 0, 0, 0, 0, 0, 0, 0, 0, 0, 47,
5453 48, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5454 0, 0, 0, 0, 49, 50, 0, 0, 0, 0,
5455 0, 0, 249, 0, 0, 250, 53, 54, 55, 0,
5456 0, 280, 444, 57, 58, 281, 60, 61, 62, 63,
5457 64, 65, 0, 0, 0, 0, 4, 5, 6, 0,
5458 8, 0, 0, 0, 9, 10, 0, 0, 0, 11,
5459 0, 12, 13, 14, 245, 246, 17, 18, 0, 0,
5460 66, 251, 68, 19, 20, 247, 22, 23, 24, 25,
5461 0, 0, 248, 0, 0, 0, 0, 0, 0, 28,
5462 0, 0, 31, 32, 33, 34, 35, 36, 37, 38,
5463 39, 278, 40, 41, 42, 43, 44, 45, 46, 0,
5464 0, 0, 0, 0, 0, 0, 0, 0, 0, 47,
5465 48, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5466 0, 0, 0, 0, 49, 50, 0, 0, 0, 0,
5467 0, 0, 249, 0, 0, 250, 53, 54, 55, 0,
5468 0, 280, 0, 57, 58, 281, 60, 61, 62, 63,
5469 64, 65, 0, 0, 0, 0, 4, 5, 6, 0,
5470 8, 0, 0, 0, 9, 10, 0, 0, 0, 11,
5471 0, 12, 13, 14, 15, 16, 17, 18, 0, 0,
5472 66, 251, 68, 19, 20, 21, 22, 23, 24, 25,
5473 0, 0, 248, 0, 0, 0, 0, 0, 0, 28,
5474 0, 0, 31, 32, 33, 34, 35, 36, 37, 38,
5475 39, 0, 40, 41, 42, 43, 44, 45, 46, 0,
5476 0, 0, 0, 0, 0, 0, 0, 0, 0, 47,
5477 48, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5478 0, 0, 0, 0, 49, 50, 0, 0, 0, 0,
5479 0, 0, 249, 0, 0, 250, 53, 54, 55, 0,
5480 796, 0, 0, 57, 58, 59, 60, 61, 62, 63,
5481 64, 65, 0, 0, 0, 0, 4, 5, 6, 0,
5482 8, 0, 0, 0, 9, 10, 0, 0, 0, 11,
5483 0, 12, 13, 14, 15, 16, 17, 18, 0, 0,
5484 66, 251, 68, 19, 20, 21, 22, 23, 24, 25,
5485 0, 0, 248, 0, 0, 0, 0, 0, 0, 28,
5486 0, 0, 31, 32, 33, 34, 35, 36, 37, 38,
5487 39, 0, 40, 41, 42, 43, 44, 45, 46, 0,
5488 0, 0, 0, 0, 0, 0, 0, 0, 0, 47,
5489 48, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5490 0, 0, 0, 0, 49, 50, 0, 0, 0, 0,
5491 0, 0, 807, 0, 0, 250, 53, 54, 55, 0,
5492 796, 0, 0, 57, 58, 59, 60, 61, 62, 63,
5493 64, 65, 0, 0, 0, 0, 4, 5, 6, 0,
5494 8, 0, 0, 0, 9, 10, 0, 0, 0, 11,
5495 0, 12, 13, 14, 245, 246, 17, 18, 0, 0,
5496 66, 251, 68, 19, 20, 247, 22, 23, 24, 25,
5497 0, 0, 248, 0, 0, 0, 0, 0, 0, 28,
5498 0, 0, 31, 32, 33, 34, 35, 36, 37, 38,
5499 39, 0, 40, 41, 42, 43, 44, 45, 46, 0,
5500 0, 0, 0, 0, 0, 0, 0, 0, 0, 47,
5501 48, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5502 0, 0, 0, 0, 49, 50, 0, 0, 0, 0,
5503 0, 0, 249, 0, 0, 250, 53, 54, 55, 0,
5504 969, 0, 0, 57, 58, 59, 60, 61, 62, 63,
5505 64, 65, 0, 0, 0, 0, 4, 5, 6, 0,
5506 8, 0, 0, 0, 9, 10, 0, 0, 0, 11,
5507 0, 12, 13, 14, 245, 246, 17, 18, 0, 0,
5508 66, 251, 68, 19, 20, 247, 22, 23, 24, 25,
5509 0, 0, 248, 0, 0, 0, 0, 0, 0, 28,
5510 0, 0, 31, 32, 33, 34, 35, 36, 37, 38,
5511 39, 0, 40, 41, 42, 43, 44, 45, 46, 0,
5512 0, 0, 0, 0, 0, 0, 0, 0, 0, 47,
5513 48, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5514 0, 0, 0, 0, 49, 50, 0, 0, 0, 0,
5515 0, 0, 249, 0, 0, 250, 53, 54, 55, 0,
5516 1019, 0, 0, 57, 58, 59, 60, 61, 62, 63,
5517 64, 65, 0, 0, 0, 0, 4, 5, 6, 0,
5518 8, 0, 0, 0, 9, 10, 0, 0, 0, 11,
5519 0, 12, 13, 14, 245, 246, 17, 18, 0, 0,
5520 66, 251, 68, 19, 20, 247, 22, 23, 24, 25,
5521 0, 0, 248, 0, 0, 0, 0, 0, 0, 28,
5522 0, 0, 31, 32, 33, 34, 35, 36, 37, 38,
5523 39, 0, 40, 41, 42, 43, 44, 45, 46, 0,
5524 0, 0, 0, 0, 0, 0, 0, 0, 0, 47,
5525 48, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5526 0, 0, 0, 0, 49, 50, 0, 0, 0, 0,
5527 0, 0, 249, 0, 0, 250, 53, 54, 55, 0,
5528 796, 0, 0, 57, 58, 59, 60, 61, 62, 63,
5529 64, 65, 0, 0, 0, 0, 4, 5, 6, 0,
5530 8, 0, 0, 0, 9, 10, 0, 0, 0, 11,
5531 0, 12, 13, 14, 245, 246, 17, 18, 0, 0,
5532 66, 251, 68, 19, 20, 247, 22, 23, 24, 25,
5533 0, 0, 248, 0, 0, 0, 0, 0, 0, 28,
5534 0, 0, 31, 32, 33, 34, 35, 36, 37, 38,
5535 39, 0, 40, 41, 42, 43, 44, 45, 46, 0,
5536 0, 0, 0, 0, 0, 0, 0, 0, 0, 47,
5537 48, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5538 0, 0, 0, 0, 49, 50, 0, 0, 0, 0,
5539 0, 0, 249, 0, 0, 250, 53, 54, 55, 0,
5540 1139, 0, 0, 57, 58, 59, 60, 61, 62, 63,
5541 64, 65, 0, 0, 0, 0, 4, 5, 6, 0,
5542 8, 0, 0, 0, 9, 10, 0, 0, 0, 11,
5543 0, 12, 13, 14, 245, 246, 17, 18, 0, 0,
5544 66, 251, 68, 19, 20, 247, 22, 23, 24, 25,
5545 0, 0, 248, 0, 0, 0, 0, 0, 0, 28,
5546 0, 0, 31, 32, 33, 34, 35, 36, 37, 38,
5547 39, 0, 40, 41, 42, 43, 44, 45, 46, 0,
5548 0, 0, 0, 0, 0, 0, 0, 0, 0, 47,
5549 48, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5550 0, 0, 0, 0, 49, 50, 0, 0, 0, 0,
5551 0, 0, 249, 0, 0, 250, 53, 54, 55, 0,
5552 0, 0, 0, 57, 58, 59, 60, 61, 62, 63,
5553 64, 65, 0, 0, 0, 0, 4, 5, 6, 0,
5554 8, 0, 0, 0, 9, 10, 0, 0, 0, 11,
5555 0, 12, 13, 14, 15, 16, 17, 18, 0, 0,
5556 66, 251, 68, 19, 20, 21, 22, 23, 24, 25,
5557 0, 0, 248, 0, 0, 0, 0, 0, 0, 28,
5558 0, 0, 31, 32, 33, 34, 35, 36, 37, 38,
5559 39, 0, 40, 41, 42, 43, 44, 45, 46, 0,
5560 0, 0, 0, 0, 0, 0, 0, 0, 0, 47,
5561 48, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5562 0, 0, 0, 0, 49, 50, 0, 0, 0, 0,
5563 0, 0, 249, 0, 0, 250, 53, 54, 55, 0,
5564 0, 0, 0, 57, 58, 59, 60, 61, 62, 63,
5565 64, 65, 0, 0, 0, 0, 4, 5, 6, 0,
5566 8, 0, 0, 0, 9, 10, 0, 0, 0, 11,
5567 0, 12, 13, 14, 15, 16, 17, 18, 0, 0,
5568 66, 251, 68, 19, 20, 21, 22, 23, 24, 25,
5569 0, 0, 26, 0, 0, 0, 0, 0, 0, 28,
5570 0, 0, 31, 32, 33, 34, 35, 36, 37, 38,
5571 39, 0, 40, 41, 42, 43, 44, 45, 46, 0,
5572 0, 0, 0, 0, 0, 0, 0, 0, 0, 47,
5573 48, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5574 0, 0, 0, 0, 49, 50, 0, 0, 0, 0,
5575 0, 0, 249, 0, 0, 250, 53, 54, 55, 0,
5576 0, 0, 0, 57, 58, 59, 60, 61, 62, 63,
5577 64, 65, 0, 0, 0, 0, 4, 5, 6, 0,
5578 8, 0, 0, 0, 9, 10, 0, 0, 0, 11,
5579 0, 12, 13, 14, 15, 16, 17, 18, 0, 0,
5580 66, 67, 68, 19, 20, 21, 22, 23, 24, 25,
5581 0, 0, 778, 0, 0, 0, 0, 0, 0, 28,
5582 0, 0, 31, 32, 33, 34, 35, 36, 37, 38,
5583 39, 0, 40, 41, 42, 43, 44, 45, 46, 0,
5584 0, 0, 0, 0, 0, 0, 0, 0, 0, 47,
5585 48, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5586 0, 0, 0, 0, 49, 50, 0, 0, 0, 0,
5587 0, 0, 249, 0, 0, 250, 53, 54, 55, 0,
5588 0, 0, 0, 57, 58, 59, 60, 61, 62, 63,
5589 64, 65, 0, 0, 0, 0, 4, 5, 6, 0,
5590 8, 0, 0, 0, 9, 10, 0, 0, 0, 11,
5591 0, 12, 13, 14, 15, 16, 17, 18, 0, 0,
5592 66, 251, 68, 19, 20, 21, 22, 23, 24, 25,
5593 0, 0, 248, 0, 0, 0, 0, 0, 0, 28,
5594 0, 0, 31, 32, 33, 34, 35, 36, 37, 38,
5595 39, 0, 40, 41, 42, 43, 44, 45, 46, 0,
5596 0, 0, 0, 0, 0, 0, 0, 0, 0, 47,
5597 48, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5598 0, 0, 0, 0, 49, 50, 0, 0, 0, 0,
5599 0, 0, 807, 0, 0, 250, 53, 54, 55, 0,
5600 0, 0, 0, 57, 58, 59, 60, 61, 62, 63,
5601 64, 65, 0, 0, 0, 0, 4, 5, 6, 0,
5602 8, 0, 0, 0, 9, 10, 0, 0, 0, 11,
5603 0, 12, 13, 14, 245, 246, 17, 18, 0, 0,
5604 66, 251, 68, 19, 20, 247, 22, 23, 24, 25,
5605 0, 0, 882, 0, 0, 0, 0, 0, 0, 28,
5606 0, 0, 31, 32, 33, 34, 35, 36, 37, 38,
5607 39, 0, 40, 41, 42, 43, 44, 45, 46, 0,
5608 0, 0, 0, 0, 0, 0, 0, 0, 0, 47,
5609 48, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5610 0, 0, 0, 0, 49, 50, 0, 0, 0, 0,
5611 0, 0, 249, 0, 0, 250, 53, 54, 55, 0,
5612 0, 0, 0, 57, 58, 59, 60, 61, 62, 63,
5613 64, 65, 0, 0, 0, 0, 4, 5, 6, 0,
5614 8, 0, 0, 0, 9, 10, 0, 0, 0, 11,
5615 0, 12, 13, 14, 245, 246, 17, 18, 0, 0,
5616 66, 251, 68, 19, 20, 247, 22, 23, 24, 25,
5617 0, 0, 248, 0, 0, 0, 0, 0, 0, 295,
5618 0, 0, 31, 32, 33, 34, 35, 36, 37, 38,
5619 39, 0, 40, 41, 42, 43, 44, 45, 46, 0,
5620 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5621 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5622 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5623 0, 0, 296, 0, 0, 357, 53, 54, 55, 0,
5624 358, 0, 0, 57, 58, 59, 60, 61, 62, 63,
5625 64, 65, 0, 0, 4, 5, 6, 0, 8, 0,
5626 0, 0, 9, 10, 0, 0, 0, 11, 0, 12,
5627 13, 14, 245, 246, 17, 18, 0, 0, 0, 0,
5628 297, 19, 20, 247, 22, 23, 24, 25, 0, 0,
5629 248, 0, 0, 0, 0, 0, 0, 295, 0, 0,
5630 31, 32, 33, 34, 35, 36, 37, 38, 39, 0,
5631 40, 41, 42, 43, 44, 45, 46, 0, 0, 0,
5632 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5633 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5634 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5635 409, 0, 0, 52, 53, 54, 55, 0, 56, 0,
5636 0, 57, 58, 59, 60, 61, 62, 63, 64, 65,
5637 0, 0, 4, 5, 6, 0, 8, 0, 0, 0,
5638 9, 10, 0, 0, 0, 11, 0, 12, 13, 14,
5639 245, 246, 17, 18, 0, 0, 0, 0, 297, 19,
5640 20, 247, 22, 23, 24, 25, 0, 0, 248, 0,
5641 0, 0, 0, 0, 0, 295, 0, 0, 31, 32,
5642 33, 417, 35, 36, 37, 418, 39, 0, 40, 41,
5643 42, 43, 44, 45, 46, 0, 0, 0, 0, 0,
5644 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5645 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5646 0, 0, 0, 0, 419, 0, 0, 0, 420, 0,
5647 0, 250, 53, 54, 55, 0, 0, 0, 0, 57,
5648 58, 59, 60, 61, 62, 63, 64, 65, 0, 0,
5649 4, 5, 6, 0, 8, 0, 0, 0, 9, 10,
5650 0, 0, 0, 11, 0, 12, 13, 14, 245, 246,
5651 17, 18, 0, 0, 0, 0, 297, 19, 20, 247,
5652 22, 23, 24, 25, 0, 0, 248, 0, 0, 0,
5653 0, 0, 0, 295, 0, 0, 31, 32, 33, 417,
5654 35, 36, 37, 418, 39, 0, 40, 41, 42, 43,
5655 44, 45, 46, 0, 0, 0, 0, 0, 0, 0,
5656 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5657 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5658 0, 0, 0, 0, 0, 0, 420, 0, 0, 250,
5659 53, 54, 55, 0, 0, 0, 0, 57, 58, 59,
5660 60, 61, 62, 63, 64, 65, 0, 0, 4, 5,
5661 6, 0, 8, 0, 0, 0, 9, 10, 0, 0,
5662 0, 11, 0, 12, 13, 14, 245, 246, 17, 18,
5663 0, 0, 0, 0, 297, 19, 20, 247, 22, 23,
5664 24, 25, 0, 0, 248, 0, 0, 0, 0, 0,
5665 0, 295, 0, 0, 31, 32, 33, 34, 35, 36,
5666 37, 38, 39, 0, 40, 41, 42, 43, 44, 45,
5667 46, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5668 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5669 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5670 0, 0, 0, 0, 296, 0, 0, 357, 53, 54,
5671 55, 0, 0, 0, 0, 57, 58, 59, 60, 61,
5672 62, 63, 64, 65, 0, 0, 4, 5, 6, 0,
5673 8, 0, 0, 0, 9, 10, 0, 0, 0, 11,
5674 0, 12, 13, 14, 245, 246, 17, 18, 0, 0,
5675 0, 0, 297, 19, 20, 247, 22, 23, 24, 25,
5676 0, 0, 248, 0, 0, 0, 0, 0, 0, 295,
5677 0, 0, 31, 32, 33, 34, 35, 36, 37, 38,
5678 39, 0, 40, 41, 42, 43, 44, 45, 46, 0,
5679 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5680 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5681 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5682 0, 0, 1193, 0, 0, 250, 53, 54, 55, 0,
5683 0, 0, 0, 57, 58, 59, 60, 61, 62, 63,
5684 64, 65, 0, 0, 4, 5, 6, 0, 8, 0,
5685 0, 0, 9, 10, 0, 0, 0, 11, 0, 12,
5686 13, 14, 245, 246, 17, 18, 0, 0, 0, 0,
5687 297, 19, 20, 247, 22, 23, 24, 25, 0, 0,
5688 248, 0, 0, 0, 0, 0, 0, 295, 0, 0,
5689 31, 32, 33, 34, 35, 36, 37, 38, 39, 0,
5690 40, 41, 42, 43, 44, 45, 46, 0, 0, 0,
5691 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5692 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5693 0, 0, 0, 0, 0, 0, 0, 635, 636, 0,
5694 1295, 637, 0, 250, 53, 54, 55, 0, 0, 0,
5695 0, 57, 58, 59, 60, 61, 62, 63, 64, 65,
5696 0, 191, 192, 193, 194, 195, 196, 197, 198, 199,
5697 0, 0, 200, 201, 0, 0, 0, 0, 202, 203,
5698 204, 205, 0, 0, 0, 0, 0, 0, 297, 0,
5699 0, 0, 206, 207, 0, 0, 0, 0, 0, 0,
5700 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5701 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5702 0, 0, 208, 209, 210, 211, 212, 213, 214, 215,
5703 216, 217, 0, 218, 219, 643, 644, 0, 0, 645,
5704 0, 220, 0, 0, 0, 0, 0, 0, 0, 0,
5705 0, 0, 0, 0, 0, 0, 0, 0, 0, 191,
5706 192, 193, 194, 195, 196, 197, 198, 199, 0, 0,
5707 200, 201, 0, 0, 0, 0, 202, 203, 204, 205,
5708 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5709 206, 207, 0, 0, 0, 0, 0, 0, 0, 0,
5710 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5711 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5712 208, 209, 210, 211, 212, 213, 214, 215, 216, 217,
5713 0, 218, 219, 709, 636, 0, 0, 710, 0, 220,
5714 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5715 0, 0, 0, 0, 0, 0, 0, 191, 192, 193,
5716 194, 195, 196, 197, 198, 199, 0, 0, 200, 201,
5717 0, 0, 0, 0, 202, 203, 204, 205, 0, 0,
5718 0, 0, 0, 0, 0, 0, 0, 0, 206, 207,
5719 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5720 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5721 0, 0, 0, 0, 0, 0, 0, 0, 208, 209,
5722 210, 211, 212, 213, 214, 215, 216, 217, 0, 218,
5723 219, 713, 644, 0, 0, 714, 0, 220, 0, 0,
5724 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5725 0, 0, 0, 0, 0, 191, 192, 193, 194, 195,
5726 196, 197, 198, 199, 0, 0, 200, 201, 0, 0,
5727 0, 0, 202, 203, 204, 205, 0, 0, 0, 0,
5728 0, 0, 0, 0, 0, 0, 206, 207, 0, 0,
5729 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5730 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5731 0, 0, 0, 0, 0, 0, 208, 209, 210, 211,
5732 212, 213, 214, 215, 216, 217, 0, 218, 219, 731,
5733 636, 0, 0, 732, 0, 220, 0, 0, 0, 0,
5734 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5735 0, 0, 0, 191, 192, 193, 194, 195, 196, 197,
5736 198, 199, 0, 0, 200, 201, 0, 0, 0, 0,
5737 202, 203, 204, 205, 0, 0, 0, 0, 0, 0,
5738 0, 0, 0, 0, 206, 207, 0, 0, 0, 0,
5739 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5740 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5741 0, 0, 0, 0, 208, 209, 210, 211, 212, 213,
5742 214, 215, 216, 217, 0, 218, 219, 734, 644, 0,
5743 0, 735, 0, 220, 0, 0, 0, 0, 0, 0,
5744 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5745 0, 191, 192, 193, 194, 195, 196, 197, 198, 199,
5746 0, 0, 200, 201, 0, 0, 0, 0, 202, 203,
5747 204, 205, 0, 0, 0, 0, 0, 0, 0, 0,
5748 0, 0, 206, 207, 0, 0, 0, 0, 0, 0,
5749 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5750 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5751 0, 0, 208, 209, 210, 211, 212, 213, 214, 215,
5752 216, 217, 0, 218, 219, 709, 636, 0, 0, 749,
5753 0, 220, 0, 0, 0, 0, 0, 0, 0, 0,
5754 0, 0, 0, 0, 0, 0, 0, 0, 0, 191,
5755 192, 193, 194, 195, 196, 197, 198, 199, 0, 0,
5756 200, 201, 0, 0, 0, 0, 202, 203, 204, 205,
5757 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5758 206, 207, 0, 0, 0, 0, 0, 0, 0, 0,
5759 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5760 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5761 208, 209, 210, 211, 212, 213, 214, 215, 216, 217,
5762 0, 218, 219, 851, 636, 0, 0, 852, 0, 220,
5763 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5764 0, 0, 0, 0, 0, 0, 0, 191, 192, 193,
5765 194, 195, 196, 197, 198, 199, 0, 0, 200, 201,
5766 0, 0, 0, 0, 202, 203, 204, 205, 0, 0,
5767 0, 0, 0, 0, 0, 0, 0, 0, 206, 207,
5768 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5769 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5770 0, 0, 0, 0, 0, 0, 0, 0, 208, 209,
5771 210, 211, 212, 213, 214, 215, 216, 217, 0, 218,
5772 219, 854, 644, 0, 0, 855, 0, 220, 0, 0,
5773 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5774 0, 0, 0, 0, 0, 191, 192, 193, 194, 195,
5775 196, 197, 198, 199, 0, 0, 200, 201, 0, 0,
5776 0, 0, 202, 203, 204, 205, 0, 0, 0, 0,
5777 0, 0, 0, 0, 0, 0, 206, 207, 0, 0,
5778 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5779 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5780 0, 0, 0, 0, 0, 0, 208, 209, 210, 211,
5781 212, 213, 214, 215, 216, 217, 0, 218, 219, 860,
5782 636, 0, 0, 861, 0, 220, 0, 0, 0, 0,
5783 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5784 0, 0, 0, 191, 192, 193, 194, 195, 196, 197,
5785 198, 199, 0, 0, 200, 201, 0, 0, 0, 0,
5786 202, 203, 204, 205, 0, 0, 0, 0, 0, 0,
5787 0, 0, 0, 0, 206, 207, 0, 0, 0, 0,
5788 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5789 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5790 0, 0, 0, 0, 208, 209, 210, 211, 212, 213,
5791 214, 215, 216, 217, 0, 218, 219, 688, 644, 0,
5792 0, 689, 0, 220, 0, 0, 0, 0, 0, 0,
5793 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5794 0, 191, 192, 193, 194, 195, 196, 197, 198, 199,
5795 0, 0, 200, 201, 0, 0, 0, 0, 202, 203,
5796 204, 205, 0, 0, 0, 0, 0, 0, 0, 0,
5797 0, 0, 206, 207, 0, 0, 0, 0, 0, 0,
5798 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5799 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5800 0, 0, 208, 209, 210, 211, 212, 213, 214, 215,
5801 216, 217, 0, 218, 219, 1025, 636, 0, 0, 1026,
5802 0, 220, 0, 0, 0, 0, 0, 0, 0, 0,
5803 0, 0, 0, 0, 0, 0, 0, 0, 0, 191,
5804 192, 193, 194, 195, 196, 197, 198, 199, 0, 0,
5805 200, 201, 0, 0, 0, 0, 202, 203, 204, 205,
5806 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5807 206, 207, 0, 0, 0, 0, 0, 0, 0, 0,
5808 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5809 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5810 208, 209, 210, 211, 212, 213, 214, 215, 216, 217,
5811 0, 218, 219, 1028, 644, 0, 0, 1029, 0, 220,
5812 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5813 0, 0, 0, 0, 0, 0, 0, 191, 192, 193,
5814 194, 195, 196, 197, 198, 199, 0, 0, 200, 201,
5815 0, 0, 0, 0, 202, 203, 204, 205, 0, 0,
5816 0, 0, 0, 0, 0, 0, 0, 0, 206, 207,
5817 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5818 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5819 0, 0, 0, 0, 0, 0, 0, 0, 208, 209,
5820 210, 211, 212, 213, 214, 215, 216, 217, 0, 218,
5821 219, 1314, 636, 0, 0, 1315, 0, 220, 0, 0,
5822 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5823 0, 0, 0, 0, 0, 191, 192, 193, 194, 195,
5824 196, 197, 198, 199, 0, 0, 200, 201, 0, 0,
5825 0, 0, 202, 203, 204, 205, 0, 0, 0, 0,
5826 0, 0, 0, 0, 0, 0, 206, 207, 0, 0,
5827 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5828 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5829 0, 0, 0, 0, 0, 0, 208, 209, 210, 211,
5830 212, 213, 214, 215, 216, 217, 0, 218, 219, 1317,
5831 644, 0, 0, 1318, 0, 220, 0, 0, 0, 0,
5832 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5833 0, 0, 0, 191, 192, 193, 194, 195, 196, 197,
5834 198, 199, 0, 0, 200, 201, 0, 0, 0, 0,
5835 202, 203, 204, 205, 0, 0, 0, 0, 0, 0,
5836 0, 0, 0, 0, 206, 207, 0, 0, 0, 0,
5837 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5838 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5839 0, 0, 0, 0, 208, 209, 210, 211, 212, 213,
5840 214, 215, 216, 217, 0, 218, 219, 1362, 636, 0,
5841 0, 1363, 0, 220, 0, 0, 0, 0, 0, 0,
5842 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5843 0, 191, 192, 193, 194, 195, 196, 197, 198, 199,
5844 0, 0, 200, 201, 0, 0, 0, 0, 202, 203,
5845 204, 205, 0, 0, 0, 0, 0, 0, 0, 0,
5846 0, 0, 206, 207, 0, 0, 0, 0, 0, 0,
5847 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5848 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5849 0, 0, 208, 209, 210, 211, 212, 213, 214, 215,
5850 216, 217, 0, 218, 219, 0, 0, 0, 0, 0,
5851 0, 220
5852};
5853
5854static const yytype_int16 yycheck[] =
5855{
5856 1, 70, 7, 58, 56, 107, 59, 54, 52, 53,
5857 762, 67, 101, 420, 89, 119, 58, 27, 402, 394,
5858 55, 7, 27, 54, 55, 510, 769, 104, 571, 118,
5859 107, 1, 342, 26, 70, 28, 839, 89, 338, 230,
5860 338, 27, 342, 608, 342, 288, 113, 114, 115, 594,
5861 293, 52, 53, 58, 594, 56, 108, 109, 110, 393,
5862 52, 395, 762, 30, 13, 14, 113, 114, 115, 111,
5863 849, 107, 764, 113, 114, 115, 56, 21, 592, 562,
5864 907, 595, 113, 114, 115, 819, 520, 598, 89, 623,
5865 507, 66, 63, 64, 65, 313, 314, 759, 0, 764,
5866 762, 26, 909, 29, 769, 84, 111, 108, 109, 110,
5867 111, 451, 692, 693, 489, 1089, 81, 25, 103, 104,
5868 81, 69, 107, 72, 458, 1030, 1031, 681, 1288, 469,
5869 684, 269, 101, 25, 13, 69, 25, 116, 718, 0,
5870 84, 98, 696, 13, 698, 1280, 100, 522, 100, 97,
5871 98, 945, 25, 25, 10, 69, 490, 113, 114, 115,
5872 13, 675, 707, 230, 98, 232, 83, 84, 257, 271,
5873 101, 605, 37, 38, 101, 151, 66, 1166, 13, 1,
5874 134, 1166, 134, 230, 98, 232, 155, 1030, 1031, 523,
5875 230, 154, 232, 1182, 25, 1180, 153, 123, 1358, 684,
5876 157, 232, 271, 13, 25, 153, 250, 541, 542, 157,
5877 56, 25, 68, 698, 303, 1350, 1190, 1191, 120, 357,
5878 137, 138, 13, 298, 155, 269, 151, 154, 281, 119,
5879 52, 53, 54, 55, 323, 271, 152, 1142, 154, 973,
5880 241, 1068, 13, 278, 279, 280, 298, 155, 27, 250,
5881 235, 236, 25, 28, 331, 332, 333, 334, 80, 81,
5882 1067, 1004, 1056, 155, 681, 672, 155, 154, 269, 752,
5883 753, 241, 239, 160, 828, 154, 232, 269, 1183, 696,
5884 13, 160, 155, 155, 154, 1190, 1191, 662, 253, 154,
5885 160, 252, 253, 286, 1088, 288, 1090, 298, 673, 1142,
5886 293, 154, 295, 247, 157, 407, 358, 160, 25, 13,
5887 254, 1300, 823, 357, 848, 1304, 1008, 1306, 536, 154,
5888 538, 1306, 297, 412, 155, 160, 403, 394, 329, 663,
5889 1030, 1031, 13, 1031, 155, 300, 157, 134, 1141, 13,
5890 674, 155, 419, 1008, 154, 859, 331, 332, 333, 334,
5891 160, 336, 337, 66, 394, 764, 357, 358, 155, 329,
5892 404, 405, 1141, 154, 155, 357, 775, 947, 948, 160,
5893 913, 407, 806, 953, 954, 154, 1365, 161, 358, 25,
5894 925, 160, 155, 154, 157, 925, 157, 454, 355, 160,
5895 395, 100, 957, 360, 1188, 1189, 397, 1302, 26, 1190,
5896 1191, 155, 100, 404, 405, 66, 119, 454, 230, 444,
5897 69, 828, 25, 154, 454, 134, 157, 134, 403, 241,
5898 100, 154, 489, 454, 907, 134, 909, 160, 250, 25,
5899 252, 253, 1085, 1086, 419, 989, 134, 154, 155, 98,
5900 157, 158, 1142, 100, 1142, 520, 991, 269, 157, 489,
5901 154, 825, 396, 458, 134, 522, 160, 155, 1038, 833,
5902 121, 122, 100, 52, 978, 100, 764, 56, 520, 479,
5903 505, 769, 507, 154, 479, 510, 507, 134, 69, 160,
5904 154, 100, 522, 1183, 727, 490, 160, 134, 134, 1154,
5905 1190, 1191, 1154, 479, 461, 462, 134, 498, 454, 134,
5906 161, 545, 112, 78, 989, 696, 100, 98, 154, 155,
5907 582, 1302, 158, 480, 458, 134, 588, 934, 523, 520,
5908 487, 134, 740, 151, 491, 492, 493, 745, 868, 157,
5909 605, 100, 1185, 1186, 1286, 357, 155, 542, 134, 879,
5910 134, 154, 155, 100, 545, 158, 1349, 603, 583, 1292,
5911 551, 591, 608, 605, 594, 100, 603, 593, 154, 155,
5912 109, 608, 158, 100, 69, 134, 15, 942, 603, 144,
5913 145, 146, 394, 608, 69, 397, 25, 134, 100, 100,
5914 100, 551, 404, 405, 1067, 1068, 1286, 971, 69, 134,
5915 155, 592, 141, 98, 595, 662, 157, 1006, 155, 1008,
5916 422, 1010, 1302, 98, 605, 58, 673, 941, 652, 943,
5917 654, 1354, 134, 134, 134, 134, 97, 98, 100, 655,
5918 608, 34, 662, 1288, 1286, 78, 1288, 1292, 450, 451,
5919 1292, 624, 157, 673, 155, 1297, 692, 693, 157, 52,
5920 788, 157, 69, 791, 1158, 467, 681, 469, 641, 684,
5921 681, 652, 134, 654, 729, 108, 100, 69, 663, 112,
5922 639, 696, 718, 698, 26, 696, 1050, 489, 647, 674,
5923 97, 98, 153, 69, 675, 56, 1219, 729, 1221, 26,
5924 1087, 157, 649, 738, 694, 97, 98, 997, 723, 694,
5925 134, 676, 1354, 1358, 1356, 639, 1358, 997, 1360, 997,
5926 522, 97, 98, 1154, 692, 693, 34, 69, 694, 58,
5927 1008, 155, 691, 154, 69, 1377, 52, 702, 159, 712,
5928 56, 100, 69, 545, 52, 134, 153, 816, 729, 78,
5929 718, 806, 100, 768, 727, 97, 98, 15, 705, 17,
5930 733, 26, 1151, 98, 78, 1154, 568, 1131, 100, 571,
5931 97, 98, 154, 1063, 806, 134, 158, 153, 69, 108,
5932 109, 796, 930, 1063, 932, 1063, 870, 711, 1282, 740,
5933 592, 742, 69, 595, 745, 746, 155, 134, 66, 856,
5934 1187, 858, 134, 158, 69, 778, 97, 98, 1331, 151,
5935 69, 153, 141, 828, 101, 157, 159, 828, 69, 152,
5936 69, 98, 56, 155, 151, 806, 153, 37, 38, 66,
5937 157, 846, 97, 98, 69, 274, 154, 155, 97, 98,
5938 642, 857, 157, 1207, 866, 647, 97, 98, 97, 98,
5939 652, 119, 654, 121, 122, 1286, 124, 1288, 154, 155,
5940 662, 1292, 153, 98, 916, 917, 1297, 155, 920, 69,
5941 922, 673, 924, 675, 821, 822, 1154, 161, 859, 78,
5942 853, 866, 829, 830, 121, 122, 151, 124, 153, 691,
5943 863, 856, 157, 858, 153, 942, 66, 97, 98, 1288,
5944 66, 67, 153, 151, 153, 925, 963, 134, 1297, 882,
5945 54, 947, 948, 715, 69, 1270, 134, 953, 954, 934,
5946 64, 65, 942, 1354, 1180, 1356, 134, 1358, 106, 1360,
5947 957, 1030, 1031, 155, 1190, 1191, 883, 884, 962, 886,
5948 887, 160, 957, 98, 1154, 712, 1377, 56, 69, 119,
5949 25, 121, 122, 153, 969, 121, 122, 1271, 943, 138,
5950 596, 977, 158, 979, 600, 894, 733, 1356, 1300, 1358,
5951 155, 1360, 1304, 155, 989, 155, 97, 98, 155, 947,
5952 948, 962, 134, 69, 152, 953, 954, 1023, 1377, 134,
5953 1089, 155, 939, 14, 15, 69, 158, 978, 963, 69,
5954 89, 90, 1038, 134, 1019, 952, 155, 1106, 40, 41,
5955 1288, 97, 98, 155, 1292, 454, 69, 1069, 1070, 1071,
5956 1072, 602, 155, 97, 98, 155, 465, 97, 98, 468,
5957 155, 1055, 153, 835, 473, 837, 52, 839, 155, 1054,
5958 1021, 1022, 1066, 1142, 97, 98, 66, 994, 52, 1030,
5959 1031, 154, 155, 152, 1027, 1023, 495, 859, 1093, 1092,
5960 52, 155, 54, 55, 1163, 57, 868, 153, 78, 650,
5961 1038, 1021, 1022, 155, 1055, 656, 657, 879, 1288, 153,
5962 1358, 1180, 1292, 153, 13, 1066, 853, 1297, 1017, 1018,
5963 17, 1190, 1191, 25, 69, 152, 863, 155, 1130, 119,
5964 153, 121, 122, 155, 1085, 1086, 299, 300, 1089, 134,
5965 102, 913, 152, 1137, 1138, 66, 1089, 1090, 1200, 1143,
5966 1177, 44, 97, 98, 1139, 1106, 1195, 44, 1, 926,
5967 927, 1155, 142, 143, 144, 145, 146, 576, 935, 44,
5968 942, 938, 155, 940, 1354, 56, 1356, 155, 1358, 1130,
5969 1360, 1200, 44, 1134, 134, 957, 1137, 1138, 66, 136,
5970 962, 1142, 1143, 159, 8, 604, 1218, 1377, 119, 15,
5971 121, 122, 1145, 124, 1155, 1199, 978, 1158, 153, 52,
5972 53, 155, 1163, 56, 1200, 1166, 52, 155, 155, 1213,
5973 155, 155, 1165, 155, 67, 1168, 152, 155, 1230, 1180,
5974 155, 1182, 783, 155, 1185, 1186, 787, 101, 155, 1190,
5975 1191, 119, 1177, 121, 122, 1188, 89, 9, 1199, 1252,
5976 1277, 1278, 52, 1270, 52, 1172, 54, 55, 56, 57,
5977 103, 104, 1213, 139, 107, 108, 109, 110, 139, 155,
5978 113, 114, 115, 1045, 52, 1047, 155, 686, 155, 1230,
5979 1270, 692, 693, 1055, 1227, 59, 60, 61, 62, 1291,
5980 1027, 152, 101, 78, 1066, 66, 847, 56, 1249, 850,
5981 160, 158, 155, 1075, 1076, 716, 717, 718, 155, 155,
5982 95, 96, 78, 864, 155, 155, 1271, 155, 155, 66,
5983 155, 152, 1265, 1266, 1267, 56, 139, 1321, 155, 95,
5984 96, 1282, 155, 1229, 52, 1231, 54, 55, 56, 57,
5985 1291, 241, 1277, 1278, 155, 155, 1134, 756, 119, 1300,
5986 121, 122, 1089, 1304, 155, 1306, 141, 142, 143, 144,
5987 145, 146, 1134, 157, 157, 1137, 1138, 155, 329, 1141,
5988 1321, 1143, 119, 1316, 121, 122, 142, 143, 144, 145,
5989 146, 494, 1325, 1155, 102, 866, 1158, 230, 498, 232,
5990 106, 603, 235, 236, 54, 55, 108, 57, 241, 110,
5991 98, 1344, 480, 958, 64, 65, 52, 250, 54, 55,
5992 56, 57, 691, 964, 1365, 977, 967, 40, 41, 42,
5993 43, 44, 1202, 974, 752, 907, 269, 1199, 1165, 980,
5994 1202, 1168, 1286, 1228, 1154, 1292, 1076, 1227, 1334, 1335,
5995 1350, 1213, 1338, 1339, 871, 353, 1342, 1219, 1349, 1221,
5996 1249, 1188, 1183, 1183, 1272, 298, 865, 1030, 1031, 122,
5997 1179, 52, 1274, 54, 55, 56, 57, 58, 538, 878,
5998 881, 880, 111, 762, 769, 1371, 1372, 1373, 1374, 1344,
5999 118, -1, -1, -1, 1380, -1, 329, 78, 331, 332,
6000 333, 334, -1, 336, 337, -1, 905, -1, 1270, -1,
6001 1272, 92, 1274, -1, -1, -1, -1, -1, 1059, -1,
6002 1282, 102, 1085, 1086, 357, 358, 1089, 108, 109, -1,
6003 52, -1, 54, 55, 56, 57, -1, -1, 1265, 1266,
6004 1267, -1, -1, 1106, -1, 1, 947, 948, -1, -1,
6005 -1, -1, 953, 954, -1, -1, -1, -1, -1, 1321,
6006 141, 394, -1, -1, 397, -1, -1, -1, -1, 1331,
6007 403, 404, 405, -1, -1, -1, -1, -1, -1, 1142,
6008 102, -1, -1, -1, -1, 107, 419, 1349, -1, 1316,
6009 -1, 992, 993, -1, 995, 996, 52, 53, -1, -1,
6010 1163, -1, -1, 1166, -1, -1, -1, -1, -1, -1,
6011 -1, 67, -1, 33, 34, 35, 36, 1180, -1, 1182,
6012 -1, 454, 1185, 1186, -1, -1, -1, 1190, 1191, 49,
6013 50, 51, -1, -1, -1, -1, -1, 1038, -1, 59,
6014 60, 61, 62, 63, -1, -1, -1, 103, 104, -1,
6015 -1, 107, -1, -1, -1, -1, 489, 113, 114, 115,
6016 -1, 1062, -1, -1, -1, 498, -1, -1, 1209, -1,
6017 1030, 1031, -1, -1, 52, -1, 54, 55, 56, 57,
6018 58, -1, -1, -1, -1, -1, 1249, 520, 78, 522,
6019 110, 111, 112, 113, 114, 115, 116, 117, 118, -1,
6020 78, -1, -1, -1, -1, 95, 96, -1, -1, -1,
6021 -1, -1, 545, -1, -1, -1, -1, -1, 551, -1,
6022 -1, -1, -1, -1, 102, 1085, 1086, 147, -1, 1089,
6023 108, 109, -1, -1, -1, -1, -1, 1300, -1, -1,
6024 -1, 1304, -1, 1306, -1, -1, 1106, -1, -1, 139,
6025 140, 141, 142, 143, 144, 145, 146, -1, 591, 592,
6026 -1, 594, 595, 141, -1, -1, -1, -1, -1, -1,
6027 603, -1, 605, -1, 230, 608, 232, -1, -1, 235,
6028 236, -1, 1142, -1, -1, 241, -1, 1328, -1, -1,
6029 1189, -1, -1, -1, 250, -1, -1, -1, -1, -1,
6030 -1, -1, 1365, 1163, -1, -1, 1166, -1, -1, -1,
6031 -1, -1, -1, 269, -1, -1, -1, -1, -1, 652,
6032 1180, 654, 1182, -1, -1, 1185, 1186, -1, -1, 662,
6033 1190, 1191, -1, -1, -1, -1, 1235, -1, -1, -1,
6034 673, -1, 675, 676, -1, -1, 1245, -1, -1, -1,
6035 -1, -1, -1, -1, -1, -1, -1, -1, -1, 692,
6036 693, -1, -1, 1262, 1263, 1264, -1, -1, -1, 702,
6037 -1, -1, -1, 329, -1, 331, 332, 333, 334, -1,
6038 336, 337, -1, -1, -1, 718, -1, -1, -1, 1249,
6039 -1, -1, -1, -1, -1, -1, 729, -1, -1, -1,
6040 -1, 357, -1, 52, -1, 54, 55, 56, 57, 58,
6041 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6042 -1, -1, -1, -1, -1, -1, -1, -1, -1, 78,
6043 -1, -1, -1, 1, -1, -1, -1, -1, 394, -1,
6044 1300, 397, -1, 92, 1304, -1, 1306, 403, 404, 405,
6045 -1, 1030, 1031, 102, -1, -1, -1, -1, 107, 108,
6046 109, -1, 52, 419, 54, 55, 56, 57, 58, -1,
6047 -1, -1, -1, 806, -1, -1, -1, -1, -1, -1,
6048 -1, -1, -1, -1, 52, 53, -1, -1, 78, -1,
6049 -1, -1, 141, -1, -1, 144, -1, -1, 454, 67,
6050 -1, -1, 92, -1, -1, 1365, 1085, 1086, 157, -1,
6051 1089, -1, 102, -1, -1, -1, -1, 107, 108, 109,
6052 -1, -1, -1, 856, -1, 858, 859, 1106, -1, -1,
6053 -1, -1, -1, 489, -1, 103, 104, -1, -1, 107,
6054 -1, -1, 498, -1, -1, 113, 114, 115, -1, -1,
6055 -1, 141, -1, -1, 144, -1, -1, -1, -1, -1,
6056 -1, -1, -1, 1142, -1, -1, 522, 52, -1, 54,
6057 55, 56, 57, 58, -1, -1, -1, -1, -1, -1,
6058 -1, -1, -1, -1, 1163, -1, -1, 1166, -1, 545,
6059 -1, -1, 925, 78, -1, 551, -1, -1, 1030, 1031,
6060 -1, 1180, -1, 1182, -1, -1, 1185, 1186, -1, 942,
6061 -1, 1190, 1191, -1, 947, 948, -1, 102, -1, -1,
6062 953, 954, 107, 108, 109, -1, -1, -1, -1, 962,
6063 963, -1, -1, -1, -1, 591, 592, -1, 594, 595,
6064 -1, -1, -1, -1, -1, 978, -1, 603, -1, -1,
6065 -1, -1, 608, 1085, 1086, -1, 141, 1089, -1, 144,
6066 -1, -1, 230, -1, 232, -1, -1, 235, 236, -1,
6067 1249, -1, -1, 241, 1106, -1, -1, -1, -1, -1,
6068 -1, -1, 250, -1, -1, -1, -1, -1, 1021, 1022,
6069 1023, -1, -1, -1, -1, -1, 652, -1, 654, -1,
6070 -1, 269, -1, -1, -1, 1038, 662, -1, -1, -1,
6071 1142, -1, -1, -1, -1, -1, -1, 673, -1, 675,
6072 676, 1300, 1055, -1, -1, 1304, -1, 1306, -1, -1,
6073 -1, 1163, -1, 1066, 1166, -1, 692, 693, -1, -1,
6074 -1, -1, -1, -1, -1, -1, 702, -1, 1180, -1,
6075 1182, -1, -1, 1185, 1186, -1, -1, -1, 1190, 1191,
6076 -1, 329, 718, 331, 332, 333, 334, -1, 336, 337,
6077 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6078 -1, -1, -1, -1, -1, -1, 1365, -1, -1, 357,
6079 -1, -1, -1, -1, -1, -1, -1, 1130, -1, 25,
6080 -1, 1134, -1, -1, 1137, 1138, -1, -1, -1, -1,
6081 1143, -1, -1, -1, -1, -1, -1, 1249, -1, -1,
6082 -1, -1, 1155, -1, -1, 1158, 394, -1, -1, 397,
6083 -1, -1, -1, -1, -1, 403, 404, 405, -1, -1,
6084 -1, -1, -1, -1, 1177, -1, -1, -1, -1, -1,
6085 -1, 419, 78, 79, 80, 81, 82, 83, 84, 85,
6086 86, 87, 88, 89, 90, -1, 1199, -1, 1300, 95,
6087 96, -1, 1304, -1, 1306, 101, -1, -1, -1, -1,
6088 1213, -1, -1, -1, -1, -1, 454, -1, -1, -1,
6089 -1, -1, 1030, 1031, -1, -1, -1, 1230, -1, -1,
6090 856, -1, 858, 859, -1, -1, -1, -1, -1, 135,
6091 -1, 137, 138, 139, 140, 141, 142, 143, 144, 145,
6092 146, 489, -1, -1, -1, -1, -1, -1, -1, -1,
6093 498, -1, -1, 1365, -1, -1, -1, 1270, -1, -1,
6094 -1, -1, -1, -1, 1277, 1278, -1, 1085, 1086, 1282,
6095 -1, 1089, -1, -1, 522, -1, -1, -1, 1291, -1,
6096 -1, -1, -1, -1, -1, -1, -1, -1, 1106, 925,
6097 -1, -1, -1, -1, -1, -1, -1, 545, -1, -1,
6098 -1, -1, -1, 551, -1, -1, 942, -1, 1321, -1,
6099 -1, 947, 948, -1, -1, -1, -1, 953, 954, -1,
6100 -1, -1, -1, -1, 1142, -1, 962, 963, -1, -1,
6101 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6102 -1, -1, 978, 591, 592, 1163, 594, 595, 1166, -1,
6103 -1, -1, -1, -1, -1, 603, -1, -1, -1, -1,
6104 608, -1, 1180, -1, 1182, -1, -1, 1185, 1186, -1,
6105 -1, -1, 1190, 1191, -1, -1, -1, 1030, 1031, -1,
6106 -1, -1, -1, -1, -1, 1021, 1022, 1023, -1, -1,
6107 -1, 1, -1, -1, -1, -1, -1, -1, -1, -1,
6108 -1, -1, 1038, -1, 652, -1, 654, -1, -1, -1,
6109 -1, -1, -1, -1, 662, -1, -1, -1, -1, 1055,
6110 -1, -1, -1, -1, -1, 673, -1, 675, 676, -1,
6111 1066, 1249, 1085, 1086, -1, -1, 1089, -1, -1, -1,
6112 -1, -1, 52, 53, 692, 693, -1, -1, -1, -1,
6113 -1, -1, -1, 1106, 702, -1, -1, 67, -1, -1,
6114 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6115 718, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6116 -1, -1, 1300, -1, -1, -1, 1304, -1, 1306, 1142,
6117 -1, -1, -1, 103, 104, -1, -1, 107, 1134, -1,
6118 -1, 1137, 1138, 113, 114, 115, -1, 1143, -1, -1,
6119 1163, -1, -1, 1166, -1, -1, -1, -1, -1, 1155,
6120 -1, -1, 1158, -1, -1, -1, -1, 1180, -1, 1182,
6121 -1, -1, 1185, 1186, -1, -1, -1, 1190, 1191, -1,
6122 -1, 1177, -1, -1, -1, -1, -1, 1365, -1, -1,
6123 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6124 -1, -1, -1, 1199, -1, -1, -1, -1, -1, -1,
6125 -1, -1, -1, -1, -1, -1, -1, 1213, -1, -1,
6126 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6127 -1, -1, -1, -1, -1, -1, 1249, -1, -1, -1,
6128 -1, -1, -1, -1, -1, -1, -1, -1, 856, -1,
6129 858, 859, -1, -1, -1, -1, -1, -1, -1, -1,
6130 230, -1, 232, -1, -1, 235, 236, -1, -1, -1,
6131 -1, 241, -1, -1, 1270, -1, -1, -1, -1, -1,
6132 250, 1277, 1278, -1, -1, -1, 1282, 1300, -1, -1,
6133 -1, 1304, -1, 1306, -1, -1, -1, -1, -1, 269,
6134 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6135 -1, -1, -1, -1, -1, -1, -1, 925, -1, -1,
6136 -1, -1, -1, -1, -1, 1321, 1030, 1031, -1, -1,
6137 -1, -1, -1, -1, 942, -1, -1, -1, -1, 947,
6138 948, -1, -1, 1, -1, 953, 954, -1, -1, -1,
6139 -1, -1, 1365, -1, 962, 963, -1, -1, -1, 329,
6140 -1, 331, 332, 333, 334, -1, 336, 337, -1, -1,
6141 978, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6142 -1, 1085, 1086, -1, -1, 1089, -1, 357, -1, -1,
6143 -1, -1, -1, -1, 52, 53, -1, -1, 56, -1,
6144 -1, -1, 1106, -1, -1, -1, -1, -1, -1, -1,
6145 -1, -1, -1, 1021, 1022, 1023, -1, -1, -1, -1,
6146 -1, -1, -1, -1, 394, -1, -1, 397, -1, -1,
6147 1038, 89, -1, 403, 404, 405, -1, -1, 1142, -1,
6148 -1, -1, -1, -1, -1, -1, -1, 1055, -1, 419,
6149 108, 109, 110, -1, -1, 113, 114, 115, 1066, 1163,
6150 -1, -1, 1166, -1, -1, -1, -1, -1, -1, -1,
6151 -1, -1, -1, -1, -1, -1, 1180, -1, 1182, -1,
6152 -1, 1185, 1186, -1, 454, -1, 1190, 1191, -1, -1,
6153 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6154 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6155 -1, -1, -1, -1, -1, -1, -1, -1, -1, 489,
6156 -1, -1, -1, -1, -1, -1, 1134, -1, 498, 1137,
6157 1138, -1, -1, -1, -1, 1143, -1, -1, -1, -1,
6158 -1, -1, 1, -1, -1, 1249, -1, 1155, -1, -1,
6159 1158, -1, 522, -1, -1, -1, -1, -1, -1, -1,
6160 1030, 1031, -1, -1, -1, -1, -1, -1, -1, 1177,
6161 -1, -1, 230, -1, 232, 545, -1, -1, -1, -1,
6162 -1, 551, -1, 241, -1, -1, -1, -1, -1, -1,
6163 -1, 1199, 250, 52, 53, -1, 1300, 56, -1, -1,
6164 1304, -1, 1306, -1, -1, 1213, -1, -1, -1, -1,
6165 -1, 269, -1, -1, -1, 1085, 1086, -1, -1, 1089,
6166 -1, 591, 592, -1, 594, 595, -1, -1, -1, -1,
6167 89, -1, -1, 603, -1, -1, 1106, -1, 608, -1,
6168 298, -1, -1, -1, -1, -1, -1, -1, -1, 108,
6169 109, 110, 1030, 1031, 113, 114, 115, -1, -1, -1,
6170 -1, 1365, 1270, -1, -1, -1, -1, -1, -1, 1277,
6171 1278, 329, 1142, -1, 1282, -1, -1, -1, -1, -1,
6172 -1, -1, 652, -1, 654, -1, -1, -1, -1, -1,
6173 -1, -1, 662, 1163, -1, -1, 1166, -1, -1, 357,
6174 358, -1, -1, 673, -1, 675, 676, 1085, 1086, -1,
6175 1180, 1089, 1182, 1321, -1, 1185, 1186, -1, -1, -1,
6176 1190, 1191, 692, 693, -1, -1, -1, -1, 1106, -1,
6177 -1, -1, 702, -1, -1, -1, 394, -1, -1, 397,
6178 -1, -1, -1, -1, -1, -1, 404, 405, 718, -1,
6179 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6180 -1, -1, -1, -1, 1142, -1, -1, -1, -1, -1,
6181 -1, 230, -1, 232, -1, -1, -1, -1, -1, 1249,
6182 -1, -1, 241, -1, -1, 1163, -1, -1, 1166, -1,
6183 -1, 250, -1, -1, -1, -1, 454, -1, -1, -1,
6184 -1, -1, 1180, -1, 1182, -1, -1, 1185, 1186, -1,
6185 269, -1, 1190, 1191, -1, -1, -1, -1, -1, -1,
6186 -1, -1, -1, -1, -1, 33, 34, 35, 36, -1,
6187 1300, 489, -1, -1, 1304, -1, 1306, -1, -1, 298,
6188 498, 49, 50, 51, 52, -1, -1, -1, 56, -1,
6189 -1, 59, 60, 61, 62, 63, -1, -1, -1, -1,
6190 -1, -1, 520, -1, 522, -1, -1, -1, -1, -1,
6191 329, 1249, -1, -1, -1, -1, -1, -1, -1, -1,
6192 -1, -1, -1, 91, 92, -1, 856, 545, 858, 859,
6193 -1, 99, -1, 551, 102, 1365, 104, 105, 357, 358,
6194 -1, -1, 110, 111, 112, 113, 114, 115, 116, 117,
6195 118, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6196 -1, -1, 1300, -1, -1, -1, 1304, -1, 1306, -1,
6197 -1, -1, 140, -1, 592, 394, -1, 595, 397, 147,
6198 -1, -1, -1, -1, -1, 404, 405, 605, -1, -1,
6199 608, -1, -1, -1, -1, 925, -1, -1, -1, -1,
6200 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6201 -1, -1, 942, -1, -1, -1, -1, 947, 948, -1,
6202 -1, -1, -1, 953, 954, -1, -1, 1365, -1, -1,
6203 -1, -1, 962, 963, 652, 454, 654, -1, -1, -1,
6204 -1, -1, -1, -1, 662, -1, -1, -1, 978, -1,
6205 -1, -1, -1, -1, -1, 673, -1, 675, -1, -1,
6206 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6207 489, -1, -1, -1, 692, 693, -1, -1, -1, 498,
6208 78, 79, 80, 81, 82, 83, 84, 85, -1, 87,
6209 88, 1021, 1022, 1023, -1, -1, -1, 95, 96, -1,
6210 718, 520, -1, 522, -1, -1, -1, -1, 1038, -1,
6211 1, 729, -1, -1, -1, -1, -1, -1, -1, -1,
6212 -1, -1, -1, -1, -1, 1055, 545, -1, -1, -1,
6213 -1, -1, 551, -1, -1, -1, 1066, -1, -1, 137,
6214 138, 139, 140, 141, 142, 143, 144, 145, 146, -1,
6215 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6216 -1, 52, 53, -1, -1, 56, -1, -1, -1, -1,
6217 -1, -1, -1, 592, -1, -1, 595, -1, -1, -1,
6218 -1, -1, -1, -1, -1, -1, 605, -1, 806, 608,
6219 -1, -1, -1, -1, -1, -1, -1, -1, 89, -1,
6220 -1, -1, -1, -1, 1134, -1, -1, 1137, 1138, -1,
6221 -1, -1, -1, 1143, -1, -1, -1, 108, 109, 110,
6222 -1, -1, -1, -1, -1, 1155, -1, -1, 1158, -1,
6223 -1, -1, -1, 652, -1, 654, -1, -1, -1, -1,
6224 -1, 859, -1, 662, -1, -1, -1, 1177, -1, -1,
6225 -1, -1, -1, -1, 673, -1, 675, -1, -1, -1,
6226 -1, -1, -1, -1, -1, -1, -1, -1, -1, 1199,
6227 -1, -1, -1, 692, 693, -1, -1, -1, -1, -1,
6228 -1, -1, -1, 1213, -1, -1, -1, -1, -1, -1,
6229 -1, -1, -1, -1, -1, -1, -1, -1, -1, 718,
6230 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6231 729, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6232 -1, -1, -1, -1, 942, -1, -1, -1, 44, 947,
6233 948, -1, -1, -1, -1, 953, 954, -1, -1, -1,
6234 1270, -1, -1, -1, 962, -1, -1, 1277, 1278, -1,
6235 241, -1, 1282, -1, -1, -1, -1, -1, -1, 250,
6236 978, -1, 78, 79, 80, 81, 82, 83, 84, 85,
6237 86, 87, 88, 89, 90, -1, -1, -1, 269, 95,
6238 96, -1, -1, -1, -1, -1, -1, 806, -1, -1,
6239 -1, 1321, -1, -1, -1, 1, -1, -1, -1, -1,
6240 -1, -1, -1, 1021, 1022, 1023, -1, 298, -1, -1,
6241 -1, -1, -1, -1, -1, -1, -1, -1, -1, 135,
6242 1038, 137, 138, 139, 140, 141, 142, 143, 144, 145,
6243 146, -1, -1, -1, -1, -1, -1, 1055, 329, 155,
6244 859, -1, -1, -1, -1, -1, 52, 53, 1066, -1,
6245 56, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6246 -1, -1, -1, -1, -1, -1, 357, 358, -1, -1,
6247 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6248 -1, -1, -1, 89, -1, -1, -1, -1, -1, -1,
6249 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6250 -1, -1, 108, 109, 110, 111, 397, -1, -1, -1,
6251 -1, -1, 1130, 404, 405, -1, 1134, -1, -1, 1137,
6252 1138, -1, -1, 942, -1, 1143, -1, -1, 947, 948,
6253 -1, -1, -1, -1, 953, 954, -1, 1155, -1, -1,
6254 1158, -1, -1, 962, -1, -1, -1, -1, 0, -1,
6255 -1, -1, -1, -1, -1, -1, 8, 9, 10, 978,
6256 -1, 13, 14, 15, -1, 17, -1, -1, -1, -1,
6257 -1, -1, -1, 25, 26, 27, -1, -1, -1, -1,
6258 -1, 1199, -1, -1, -1, 37, 38, -1, 40, 41,
6259 42, 43, 44, -1, -1, 1213, -1, -1, -1, -1,
6260 -1, -1, 1021, 1022, 1023, -1, -1, 498, -1, -1,
6261 -1, -1, 1230, -1, -1, 1, 68, 69, -1, 1038,
6262 -1, -1, -1, -1, -1, -1, -1, -1, -1, 520,
6263 -1, -1, -1, -1, -1, 241, 1055, 1, -1, -1,
6264 -1, -1, -1, -1, 250, 97, 98, 1066, -1, -1,
6265 -1, -1, 1270, -1, 545, -1, -1, -1, -1, -1,
6266 551, -1, -1, 269, 1282, -1, 52, 53, 120, -1,
6267 -1, -1, -1, 1291, -1, -1, -1, -1, -1, -1,
6268 -1, -1, -1, -1, -1, -1, -1, -1, 52, 53,
6269 -1, -1, 298, -1, -1, -1, -1, -1, -1, 151,
6270 152, 592, 154, 1321, 595, 157, 158, -1, 160, -1,
6271 -1, 1130, -1, -1, 605, 1134, -1, 608, 1137, 1138,
6272 -1, -1, 108, 329, 1143, -1, -1, -1, -1, -1,
6273 -1, -1, -1, -1, -1, -1, 1155, -1, -1, 1158,
6274 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6275 -1, 357, 358, -1, -1, -1, -1, -1, -1, -1,
6276 -1, 652, -1, 654, -1, -1, -1, -1, -1, -1,
6277 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6278 1199, -1, -1, -1, 675, -1, -1, -1, -1, -1,
6279 -1, 397, -1, -1, 1213, -1, -1, -1, 404, 405,
6280 -1, 692, 693, -1, -1, -1, -1, -1, -1, -1,
6281 -1, 1230, -1, -1, -1, -1, 33, 34, 35, 36,
6282 -1, -1, -1, -1, -1, -1, -1, 718, -1, -1,
6283 -1, -1, 49, 50, 51, 52, -1, -1, 729, 56,
6284 -1, -1, 59, 60, 61, 62, 63, 738, -1, -1,
6285 -1, 1270, -1, -1, -1, 241, -1, -1, -1, -1,
6286 -1, -1, -1, 1282, 250, -1, -1, -1, -1, -1,
6287 -1, -1, 1291, -1, 91, 92, -1, 241, -1, -1,
6288 -1, -1, 99, 269, -1, 102, 250, 104, 105, -1,
6289 107, -1, 498, 110, 111, 112, 113, 114, 115, 116,
6290 117, 118, 1321, -1, -1, 269, -1, -1, -1, -1,
6291 -1, -1, -1, -1, 520, 806, 78, 79, 80, 81,
6292 82, 83, 84, 140, -1, 87, 88, -1, -1, -1,
6293 147, -1, -1, 95, 96, -1, -1, 154, -1, 545,
6294 -1, -1, -1, 329, -1, 551, -1, -1, -1, -1,
6295 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6296 -1, -1, -1, -1, -1, 329, -1, -1, 859, -1,
6297 -1, 357, -1, -1, -1, 137, 138, 139, 140, 141,
6298 142, 143, 144, 145, 146, -1, 592, -1, -1, 595,
6299 -1, -1, -1, 357, -1, -1, -1, -1, -1, 605,
6300 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6301 -1, 397, -1, -1, -1, -1, -1, -1, 404, 405,
6302 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6303 -1, -1, -1, 397, -1, -1, -1, -1, -1, -1,
6304 404, 405, -1, -1, -1, -1, 652, -1, 654, -1,
6305 -1, -1, -1, -1, -1, -1, 947, 948, -1, -1,
6306 -1, -1, 953, 954, 52, 53, -1, -1, 56, 675,
6307 -1, 962, -1, -1, -1, -1, -1, -1, -1, -1,
6308 -1, -1, -1, -1, -1, -1, -1, 978, 76, 77,
6309 78, 79, 80, 81, 82, 83, 84, -1, -1, 87,
6310 88, -1, -1, -1, -1, 93, 94, 95, 96, -1,
6311 -1, -1, 498, -1, -1, -1, -1, -1, -1, 107,
6312 108, -1, -1, 729, -1, -1, -1, -1, -1, -1,
6313 1021, 1022, 1023, -1, 498, -1, -1, -1, -1, -1,
6314 -1, -1, -1, -1, -1, -1, -1, 1038, -1, 137,
6315 138, 139, 140, 141, 142, 143, 144, 145, 146, 545,
6316 148, 149, -1, -1, 1055, 551, -1, -1, 156, 157,
6317 -1, -1, -1, -1, -1, 1066, -1, -1, -1, -1,
6318 -1, 545, -1, -1, -1, -1, -1, 551, -1, -1,
6319 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6320 806, -1, -1, -1, -1, -1, 592, -1, -1, 595,
6321 -1, -1, -1, -1, -1, 78, 79, 80, 81, 82,
6322 83, 84, 608, -1, 87, 88, -1, -1, 592, -1,
6323 -1, 595, 95, 96, -1, -1, -1, -1, -1, 1130,
6324 -1, -1, -1, 1134, 608, -1, 1137, 1138, -1, -1,
6325 -1, -1, 1143, 859, -1, -1, -1, -1, -1, -1,
6326 -1, -1, -1, -1, 1155, -1, 652, 1158, 654, -1,
6327 -1, -1, -1, -1, 137, 138, 139, 140, 141, 142,
6328 143, 144, 145, 146, -1, -1, -1, -1, 652, 675,
6329 654, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6330 -1, -1, -1, -1, -1, -1, 692, 693, 1199, -1,
6331 -1, 675, -1, -1, -1, -1, -1, -1, -1, -1,
6332 -1, -1, 1213, -1, -1, -1, -1, -1, 692, 693,
6333 -1, -1, 718, -1, -1, -1, -1, -1, -1, 1230,
6334 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6335 -1, -1, -1, -1, 718, -1, 962, -1, -1, -1,
6336 33, 34, 35, 36, -1, -1, -1, -1, -1, -1,
6337 -1, -1, 978, -1, -1, -1, 49, 50, 51, 52,
6338 -1, -1, -1, 56, -1, 58, 59, 60, 61, 62,
6339 63, 1282, -1, -1, -1, -1, -1, -1, -1, -1,
6340 1291, -1, -1, -1, -1, 78, -1, -1, -1, -1,
6341 -1, -1, -1, -1, -1, 1021, 1022, -1, 91, 92,
6342 -1, -1, -1, -1, -1, -1, 99, -1, -1, 102,
6343 1321, 104, 105, -1, 107, 108, -1, 110, 111, 112,
6344 113, 114, 115, 116, 117, 118, -1, -1, -1, 1055,
6345 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6346 1066, -1, -1, -1, -1, -1, -1, 140, -1, -1,
6347 -1, -1, -1, 859, 147, -1, -1, -1, -1, 78,
6348 79, 80, 81, 82, 83, 84, 85, 86, 87, 88,
6349 89, 90, -1, -1, -1, 859, 95, 96, -1, -1,
6350 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6351 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6352 -1, -1, -1, -1, 1130, -1, -1, -1, 1134, -1,
6353 -1, 1137, 1138, -1, -1, -1, 135, 1143, 137, 138,
6354 139, 140, 141, 142, 143, 144, 145, 146, -1, 1155,
6355 -1, -1, 1158, -1, -1, 154, -1, -1, -1, -1,
6356 -1, 947, 948, -1, -1, -1, -1, 953, 954, -1,
6357 -1, -1, -1, -1, -1, -1, 962, -1, -1, -1,
6358 -1, -1, -1, 947, 948, -1, -1, -1, -1, 953,
6359 954, -1, 978, 1199, -1, -1, -1, -1, 962, -1,
6360 -1, -1, -1, -1, -1, -1, -1, 1213, -1, -1,
6361 -1, -1, -1, -1, 978, -1, -1, -1, -1, -1,
6362 -1, -1, -1, -1, 1230, -1, -1, -1, -1, -1,
6363 -1, -1, -1, -1, -1, 1021, 1022, 1023, -1, -1,
6364 -1, -1, -1, 47, 48, 49, 50, -1, -1, -1,
6365 54, 55, 1038, -1, -1, -1, -1, 1021, 1022, 1023,
6366 -1, -1, -1, 67, 68, -1, -1, -1, -1, 1055,
6367 -1, -1, -1, -1, 1038, -1, 1282, -1, -1, -1,
6368 1066, -1, -1, -1, -1, 1291, -1, -1, -1, -1,
6369 -1, 1055, -1, -1, -1, -1, -1, -1, -1, -1,
6370 -1, -1, 1066, -1, -1, -1, -1, -1, -1, 113,
6371 114, 115, -1, -1, -1, 1321, -1, -1, -1, -1,
6372 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6373 -1, -1, -1, -1, -1, -1, -1, 33, 34, 35,
6374 36, -1, -1, -1, 1130, -1, -1, -1, 1134, -1,
6375 -1, 1137, 1138, 49, 50, 51, 52, 1143, -1, -1,
6376 56, -1, -1, 59, 60, 61, 62, 63, -1, 1155,
6377 1134, -1, 1158, 1137, 1138, -1, -1, -1, -1, 1143,
6378 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6379 -1, 1155, -1, -1, 1158, 91, 92, -1, -1, -1,
6380 -1, -1, -1, 99, -1, -1, 102, -1, 104, 105,
6381 -1, 107, -1, 1199, 110, 111, 112, 113, 114, 115,
6382 116, 117, 118, -1, -1, -1, 230, 1213, 232, -1,
6383 -1, -1, -1, -1, -1, 1199, -1, -1, -1, -1,
6384 -1, -1, -1, -1, 140, -1, -1, 251, -1, 1213,
6385 -1, 147, -1, -1, -1, -1, -1, -1, -1, -1,
6386 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6387 -1, -1, -1, -1, 278, 279, 280, -1, -1, -1,
6388 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6389 -1, -1, -1, 3, 4, 5, 1282, 7, -1, -1,
6390 -1, 11, 12, -1, -1, -1, 16, -1, 18, 19,
6391 20, 21, 22, 23, 24, -1, -1, -1, 1282, -1,
6392 30, 31, 32, 33, 34, 35, 36, -1, -1, 39,
6393 -1, -1, -1, -1, -1, 1321, 46, -1, -1, 49,
6394 50, 51, 52, 53, 54, 55, 56, 57, -1, 59,
6395 60, 61, 62, 63, 64, 65, -1, 1321, 362, 363,
6396 364, 365, 366, -1, -1, 369, 370, 371, 372, 373,
6397 374, 375, 376, -1, 378, -1, -1, 381, 382, 383,
6398 384, 385, 386, 387, 388, 389, 390, -1, -1, 99,
6399 394, -1, 102, 103, 104, 105, -1, -1, -1, -1,
6400 110, 111, 112, 113, 114, 115, 116, 117, 118, -1,
6401 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6402 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6403 -1, -1, -1, -1, -1, -1, -1, 147, -1, -1,
6404 444, -1, -1, -1, -1, 155, -1, -1, -1, -1,
6405 454, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6406 464, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6407 -1, -1, 0, -1, -1, -1, -1, -1, 482, -1,
6408 8, 9, 10, -1, -1, 489, 14, 15, -1, 17,
6409 -1, -1, -1, -1, -1, -1, -1, 25, 26, -1,
6410 -1, 505, -1, 507, -1, -1, 510, -1, -1, 37,
6411 38, -1, 40, 41, 42, 43, 44, -1, 522, -1,
6412 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6413 -1, -1, -1, -1, -1, -1, 540, -1, -1, -1,
6414 68, 69, -1, -1, -1, -1, -1, -1, -1, -1,
6415 78, 79, 80, 81, 82, 83, 84, 85, 86, 87,
6416 88, 89, 90, -1, -1, -1, -1, 95, 96, 97,
6417 98, -1, 100, 101, -1, -1, -1, -1, -1, 583,
6418 -1, -1, -1, -1, -1, -1, -1, 591, -1, -1,
6419 594, -1, 120, -1, -1, -1, -1, -1, -1, 603,
6420 -1, -1, -1, -1, 608, -1, 134, 135, -1, 137,
6421 138, 139, 140, 141, 142, 143, 144, 145, 146, -1,
6422 -1, -1, -1, 151, 152, 153, 154, 155, -1, -1,
6423 158, -1, 160, -1, -1, -1, -1, -1, -1, -1,
6424 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6425 -1, -1, -1, -1, -1, -1, -1, -1, 662, -1,
6426 -1, -1, -1, -1, -1, -1, -1, -1, -1, 673,
6427 -1, -1, -1, -1, -1, -1, -1, 681, -1, -1,
6428 684, -1, -1, -1, -1, -1, -1, -1, 692, 693,
6429 -1, -1, 696, -1, 698, -1, -1, -1, -1, -1,
6430 -1, -1, 706, 707, 708, -1, -1, -1, -1, -1,
6431 -1, -1, 716, 717, 718, -1, -1, -1, -1, 723,
6432 -1, -1, -1, 0, 1, -1, 3, 4, 5, 6,
6433 7, 8, 9, 10, 11, 12, -1, 14, 15, 16,
6434 17, 18, 19, 20, 21, 22, 23, 24, 25, -1,
6435 -1, -1, -1, 30, 31, 32, 33, 34, 35, 36,
6436 -1, -1, 39, -1, 768, -1, -1, -1, 45, 46,
6437 47, 48, 49, 50, 51, 52, 53, 54, 55, 56,
6438 57, -1, 59, 60, 61, 62, 63, 64, 65, -1,
6439 -1, 68, 796, -1, -1, -1, -1, -1, -1, 76,
6440 77, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6441 44, -1, -1, -1, 91, 92, -1, -1, -1, -1,
6442 -1, -1, 99, -1, 828, 102, 103, 104, 105, -1,
6443 107, -1, -1, 110, 111, 112, 113, 114, 115, 116,
6444 117, 118, 846, 120, 78, 79, 80, 81, 82, 83,
6445 84, 85, 86, 87, 88, 89, 90, -1, -1, -1,
6446 -1, 95, 96, -1, -1, -1, -1, -1, -1, -1,
6447 147, 148, 149, -1, -1, 152, -1, 881, -1, -1,
6448 -1, 158, -1, 160, -1, -1, -1, -1, -1, -1,
6449 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6450 -1, 135, -1, 137, 138, 139, 140, 141, 142, 143,
6451 144, 145, 146, -1, -1, -1, -1, -1, -1, -1,
6452 -1, 925, -1, -1, -1, -1, -1, -1, -1, -1,
6453 934, -1, -1, -1, -1, -1, -1, -1, 942, -1,
6454 -1, -1, 946, 947, 948, -1, -1, -1, -1, 953,
6455 954, -1, -1, 957, -1, -1, -1, -1, -1, -1,
6456 -1, -1, -1, -1, -1, 969, -1, -1, -1, -1,
6457 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6458 -1, -1, -1, -1, -1, 989, -1, 991, 992, 993,
6459 -1, 995, 996, -1, -1, -1, -1, -1, -1, -1,
6460 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6461 -1, 1015, 1016, -1, -1, 1019, -1, -1, -1, 1023,
6462 1024, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6463 -1, -1, -1, -1, 1038, -1, -1, -1, -1, -1,
6464 -1, 0, 1, -1, 3, 4, 5, 6, 7, -1,
6465 1054, -1, 11, 12, -1, -1, -1, 16, 1062, 18,
6466 19, 20, 21, 22, 23, 24, -1, -1, -1, -1,
6467 -1, 30, 31, 32, 33, 34, 35, 36, -1, -1,
6468 39, -1, -1, -1, -1, -1, 45, 46, 47, 48,
6469 49, 50, 51, 52, 53, 54, 55, 56, 57, -1,
6470 59, 60, 61, 62, 63, 64, 65, -1, -1, -1,
6471 -1, -1, -1, -1, -1, -1, -1, 76, 77, -1,
6472 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6473 -1, -1, 91, 92, -1, 1139, -1, -1, -1, -1,
6474 99, -1, -1, 102, 103, 104, 105, -1, 107, -1,
6475 -1, 110, 111, 112, 113, 114, 115, 116, 117, 118,
6476 -1, 120, -1, -1, -1, -1, -1, -1, -1, -1,
6477 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6478 -1, -1, -1, -1, -1, -1, -1, -1, 147, 148,
6479 149, -1, -1, 0, 1, 154, 3, 4, 5, 6,
6480 7, 160, -1, -1, 11, 12, -1, -1, -1, 16,
6481 -1, 18, 19, 20, 21, 22, 23, 24, -1, -1,
6482 -1, -1, -1, 30, 31, 32, 33, 34, 35, 36,
6483 -1, -1, 39, -1, -1, -1, -1, -1, 45, 46,
6484 47, 48, 49, 50, 51, 52, 53, 54, 55, 56,
6485 57, -1, 59, 60, 61, 62, 63, 64, 65, -1,
6486 -1, -1, -1, -1, -1, -1, 1270, -1, -1, 76,
6487 77, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6488 -1, -1, -1, -1, 91, 92, -1, -1, -1, -1,
6489 -1, -1, 99, -1, -1, 102, 103, 104, 105, -1,
6490 107, -1, -1, 110, 111, 112, 113, 114, 115, 116,
6491 117, 118, -1, -1, -1, -1, -1, -1, -1, -1,
6492 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6493 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6494 147, 148, 149, -1, -1, 0, 1, 154, 3, 4,
6495 5, 6, 7, 160, -1, -1, 11, 12, -1, -1,
6496 -1, 16, -1, 18, 19, 20, 21, 22, 23, 24,
6497 -1, -1, -1, -1, -1, 30, 31, 32, 33, 34,
6498 35, 36, -1, -1, 39, -1, -1, -1, -1, -1,
6499 45, 46, 47, 48, 49, 50, 51, 52, 53, 54,
6500 55, 56, 57, -1, 59, 60, 61, 62, 63, 64,
6501 65, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6502 -1, 76, 77, -1, -1, -1, -1, -1, -1, -1,
6503 -1, -1, -1, -1, -1, -1, 91, 92, -1, -1,
6504 -1, -1, -1, -1, 99, -1, -1, 102, 103, 104,
6505 105, -1, 107, -1, -1, 110, 111, 112, 113, 114,
6506 115, 116, 117, 118, -1, -1, -1, -1, -1, -1,
6507 -1, -1, -1, 0, -1, -1, -1, -1, -1, -1,
6508 -1, 8, 9, 10, -1, -1, 13, 14, 15, -1,
6509 17, -1, 147, 148, 149, -1, -1, 152, 25, 26,
6510 27, 28, 29, -1, -1, 160, -1, -1, -1, -1,
6511 37, 38, -1, 40, 41, 42, 43, 44, -1, -1,
6512 -1, 78, 79, 80, 81, 82, 83, 84, 85, 86,
6513 87, 88, 89, 90, -1, -1, -1, -1, 95, 96,
6514 -1, 68, 69, -1, -1, -1, -1, -1, -1, -1,
6515 -1, 78, 79, 80, 81, 82, 83, 84, 85, 86,
6516 87, 88, 89, 90, -1, -1, -1, -1, 95, 96,
6517 97, 98, -1, 100, 101, -1, -1, -1, 135, 106,
6518 137, 138, 139, 140, 141, 142, 143, 144, 145, 146,
6519 -1, -1, -1, 120, -1, -1, 123, -1, -1, -1,
6520 -1, -1, -1, -1, -1, -1, -1, 134, 135, 136,
6521 137, 138, 139, 140, 141, 142, 143, 144, 145, 146,
6522 -1, -1, -1, -1, 151, 152, 153, 154, 155, 0,
6523 -1, 158, 159, 160, -1, -1, -1, 8, 9, 10,
6524 -1, -1, 13, 14, 15, -1, 17, -1, -1, -1,
6525 -1, -1, -1, -1, 25, -1, 27, 28, 29, -1,
6526 -1, -1, -1, -1, -1, -1, 37, 38, -1, 40,
6527 41, 42, 43, 44, -1, -1, -1, 78, 79, 80,
6528 81, 82, 83, 84, 85, 86, 87, 88, 89, 90,
6529 -1, -1, -1, -1, 95, 96, -1, 68, 69, -1,
6530 -1, -1, -1, -1, -1, -1, -1, 78, 79, 80,
6531 81, 82, 83, 84, 85, 86, 87, 88, 89, 90,
6532 -1, -1, -1, -1, 95, 96, 97, 98, -1, 100,
6533 101, -1, -1, -1, -1, 106, 137, 138, 139, 140,
6534 141, 142, 143, 144, 145, 146, -1, -1, -1, 120,
6535 -1, -1, 123, -1, -1, -1, -1, -1, -1, -1,
6536 -1, -1, -1, 134, 135, 136, 137, 138, 139, 140,
6537 141, 142, 143, 144, 145, 146, -1, -1, -1, -1,
6538 -1, 152, 153, 154, 155, 0, -1, 158, 159, 160,
6539 -1, -1, -1, 8, 9, 10, -1, -1, 13, 14,
6540 15, -1, 17, -1, -1, -1, -1, -1, -1, -1,
6541 25, -1, 27, 28, 29, -1, -1, -1, -1, -1,
6542 -1, -1, 37, 38, -1, 40, 41, 42, 43, 44,
6543 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6544 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6545 -1, -1, -1, 68, 69, -1, -1, -1, -1, -1,
6546 -1, -1, -1, 78, 79, 80, 81, 82, 83, 84,
6547 85, 86, 87, 88, 89, 90, -1, -1, -1, -1,
6548 95, 96, 97, 98, -1, 100, 101, -1, -1, -1,
6549 -1, 106, -1, -1, -1, -1, -1, -1, -1, -1,
6550 -1, -1, -1, -1, -1, 120, -1, -1, 123, -1,
6551 -1, -1, -1, -1, -1, -1, -1, -1, -1, 134,
6552 135, 136, 137, 138, 139, 140, 141, 142, 143, 144,
6553 145, 146, -1, -1, -1, -1, -1, 152, 153, 154,
6554 155, 0, -1, 158, 159, 160, -1, -1, -1, 8,
6555 9, 10, -1, -1, 13, 14, 15, -1, 17, -1,
6556 -1, -1, -1, -1, -1, -1, 25, 26, 27, 28,
6557 29, -1, -1, -1, -1, -1, -1, -1, 37, 38,
6558 -1, 40, 41, 42, 43, 44, -1, -1, -1, -1,
6559 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6560 -1, -1, -1, -1, -1, -1, -1, -1, -1, 68,
6561 69, -1, -1, -1, -1, -1, -1, -1, -1, 78,
6562 79, 80, 81, 82, 83, 84, 85, 86, 87, 88,
6563 89, 90, -1, -1, -1, -1, 95, 96, 97, 98,
6564 -1, -1, 101, -1, -1, -1, -1, 106, -1, -1,
6565 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6566 -1, 120, -1, -1, 123, -1, -1, -1, -1, -1,
6567 -1, -1, -1, -1, -1, -1, 135, 136, 137, 138,
6568 139, 140, 141, 142, 143, 144, 145, 146, -1, -1,
6569 -1, -1, 151, 152, 153, 154, 155, 0, -1, 158,
6570 159, 160, -1, -1, -1, 8, 9, 10, -1, -1,
6571 13, 14, 15, -1, 17, -1, -1, -1, -1, -1,
6572 -1, -1, 25, 26, 27, 28, 29, -1, -1, -1,
6573 -1, -1, -1, -1, 37, 38, -1, 40, 41, 42,
6574 43, 44, -1, -1, -1, -1, -1, -1, -1, -1,
6575 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6576 -1, -1, -1, -1, -1, 68, 69, -1, -1, -1,
6577 -1, -1, -1, -1, -1, 78, 79, 80, 81, 82,
6578 83, 84, 85, 86, 87, 88, 89, 90, -1, -1,
6579 -1, -1, 95, 96, 97, 98, -1, -1, 101, -1,
6580 -1, -1, -1, 106, -1, -1, -1, -1, -1, -1,
6581 -1, -1, -1, -1, -1, -1, -1, 120, -1, -1,
6582 123, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6583 -1, -1, 135, 136, 137, 138, 139, 140, 141, 142,
6584 143, 144, 145, 146, -1, -1, -1, -1, 151, 152,
6585 153, 154, 155, 0, -1, 158, 159, 160, -1, -1,
6586 -1, 8, 9, 10, -1, -1, 13, 14, 15, -1,
6587 17, -1, -1, -1, -1, -1, -1, -1, 25, 26,
6588 27, 28, -1, -1, -1, -1, -1, -1, -1, -1,
6589 37, 38, -1, 40, 41, 42, 43, 44, -1, -1,
6590 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6591 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6592 -1, 68, 69, -1, -1, -1, -1, -1, -1, -1,
6593 -1, 78, 79, 80, 81, 82, 83, 84, 85, 86,
6594 87, 88, 89, 90, -1, -1, -1, -1, 95, 96,
6595 97, 98, -1, -1, 101, -1, -1, -1, -1, 106,
6596 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6597 -1, -1, -1, 120, -1, -1, -1, -1, -1, -1,
6598 -1, -1, -1, -1, -1, -1, -1, -1, 135, -1,
6599 137, 138, 139, 140, 141, 142, 143, 144, 145, 146,
6600 -1, -1, -1, -1, 151, 152, 153, 154, 155, 0,
6601 157, 158, 159, 160, -1, -1, -1, 8, 9, 10,
6602 -1, -1, 13, 14, 15, -1, 17, -1, -1, -1,
6603 -1, -1, -1, -1, 25, -1, 27, 28, 29, -1,
6604 -1, -1, -1, -1, -1, -1, 37, 38, -1, 40,
6605 41, 42, 43, 44, -1, -1, -1, -1, -1, -1,
6606 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6607 -1, -1, -1, -1, -1, -1, -1, 68, 69, -1,
6608 -1, -1, -1, -1, -1, -1, -1, 78, 79, 80,
6609 81, 82, 83, 84, 85, 86, 87, 88, 89, 90,
6610 -1, -1, -1, -1, 95, 96, 97, 98, -1, -1,
6611 101, -1, -1, -1, -1, 106, -1, -1, -1, -1,
6612 -1, -1, -1, -1, -1, -1, -1, -1, -1, 120,
6613 -1, -1, 123, -1, -1, -1, -1, -1, -1, -1,
6614 -1, -1, -1, -1, 135, 136, 137, 138, 139, 140,
6615 141, 142, 143, 144, 145, 146, -1, -1, -1, -1,
6616 -1, 152, 153, 154, 155, 0, -1, 158, 159, 160,
6617 -1, -1, -1, 8, 9, 10, -1, -1, 13, 14,
6618 15, -1, 17, -1, -1, -1, -1, -1, -1, -1,
6619 25, 26, 27, 28, -1, -1, -1, -1, -1, -1,
6620 -1, -1, 37, 38, -1, 40, 41, 42, 43, 44,
6621 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6622 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6623 -1, -1, -1, 68, 69, -1, -1, -1, -1, -1,
6624 -1, -1, -1, 78, 79, 80, 81, 82, 83, 84,
6625 85, 86, 87, 88, 89, 90, -1, -1, -1, -1,
6626 95, 96, 97, 98, -1, -1, 101, -1, -1, -1,
6627 -1, 106, -1, -1, -1, -1, -1, -1, -1, -1,
6628 -1, -1, -1, -1, -1, 120, -1, -1, -1, -1,
6629 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6630 135, -1, 137, 138, 139, 140, 141, 142, 143, 144,
6631 145, 146, -1, -1, -1, -1, 151, 152, 153, 154,
6632 155, 0, 157, 158, 159, 160, -1, -1, -1, 8,
6633 9, 10, -1, -1, 13, 14, 15, -1, 17, -1,
6634 -1, -1, -1, -1, -1, -1, 25, -1, 27, 28,
6635 -1, -1, -1, -1, -1, -1, -1, -1, 37, 38,
6636 -1, 40, 41, 42, 43, 44, -1, -1, -1, -1,
6637 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6638 -1, -1, -1, -1, -1, -1, -1, -1, -1, 68,
6639 69, -1, -1, -1, -1, -1, -1, -1, -1, 78,
6640 79, 80, 81, 82, 83, 84, 85, 86, 87, 88,
6641 89, 90, -1, -1, -1, -1, 95, 96, 97, 98,
6642 -1, 100, 101, -1, -1, -1, -1, 106, -1, -1,
6643 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6644 -1, 120, -1, -1, -1, -1, -1, -1, -1, -1,
6645 -1, -1, -1, -1, -1, 134, 135, -1, 137, 138,
6646 139, 140, 141, 142, 143, 144, 145, 146, -1, -1,
6647 -1, -1, 151, 152, 153, 154, 155, 0, -1, 158,
6648 159, 160, -1, -1, -1, 8, 9, 10, -1, -1,
6649 13, 14, 15, -1, 17, -1, -1, -1, -1, -1,
6650 -1, -1, 25, -1, 27, 28, -1, -1, -1, -1,
6651 -1, -1, -1, -1, 37, 38, -1, 40, 41, 42,
6652 43, 44, -1, -1, -1, -1, -1, -1, -1, -1,
6653 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6654 -1, -1, -1, -1, -1, 68, 69, -1, -1, -1,
6655 -1, -1, -1, -1, -1, 78, 79, 80, 81, 82,
6656 83, 84, 85, 86, 87, 88, 89, 90, -1, -1,
6657 -1, -1, 95, 96, 97, 98, -1, -1, 101, -1,
6658 -1, -1, -1, 106, -1, -1, -1, -1, -1, -1,
6659 -1, -1, -1, -1, -1, -1, -1, 120, -1, -1,
6660 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6661 -1, -1, 135, -1, 137, 138, 139, 140, 141, 142,
6662 143, 144, 145, 146, -1, -1, -1, -1, -1, 152,
6663 153, 154, 155, 0, 157, 158, 159, 160, -1, -1,
6664 -1, 8, 9, 10, -1, -1, 13, 14, 15, -1,
6665 17, -1, -1, -1, -1, -1, -1, -1, 25, -1,
6666 27, 28, -1, -1, -1, -1, -1, -1, -1, -1,
6667 37, 38, -1, 40, 41, 42, 43, 44, -1, -1,
6668 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6669 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6670 -1, 68, 69, -1, -1, -1, -1, -1, -1, -1,
6671 -1, 78, 79, 80, 81, 82, 83, 84, 85, 86,
6672 87, 88, 89, 90, -1, -1, -1, -1, 95, 96,
6673 97, 98, -1, -1, 101, -1, -1, -1, -1, 106,
6674 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6675 -1, -1, -1, 120, -1, -1, -1, -1, -1, -1,
6676 -1, -1, -1, -1, -1, -1, -1, -1, 135, -1,
6677 137, 138, 139, 140, 141, 142, 143, 144, 145, 146,
6678 -1, -1, -1, -1, -1, 152, 153, 154, 155, 0,
6679 -1, 158, 159, 160, -1, -1, -1, 8, 9, 10,
6680 -1, -1, 13, 14, 15, -1, 17, -1, -1, -1,
6681 -1, -1, -1, -1, 25, -1, 27, 28, -1, -1,
6682 -1, -1, -1, -1, -1, -1, 37, 38, -1, 40,
6683 41, 42, 43, 44, -1, -1, -1, -1, -1, -1,
6684 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6685 -1, -1, -1, -1, -1, -1, -1, 68, 69, -1,
6686 -1, -1, -1, -1, -1, -1, -1, 78, 79, 80,
6687 81, 82, 83, 84, 85, 86, 87, 88, 89, 90,
6688 -1, -1, -1, -1, 95, 96, 97, 98, -1, -1,
6689 101, -1, -1, -1, -1, 106, -1, -1, -1, -1,
6690 -1, -1, -1, -1, -1, -1, -1, -1, -1, 120,
6691 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6692 -1, -1, -1, -1, 135, -1, 137, 138, 139, 140,
6693 141, 142, 143, 144, 145, 146, -1, -1, -1, -1,
6694 -1, 152, 153, 154, 155, 0, -1, 158, 159, 160,
6695 -1, -1, -1, 8, 9, 10, -1, -1, 13, 14,
6696 15, -1, 17, -1, -1, -1, -1, -1, -1, -1,
6697 25, -1, 27, 28, -1, -1, -1, -1, -1, -1,
6698 -1, -1, 37, 38, -1, 40, 41, 42, 43, 44,
6699 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6700 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6701 -1, -1, -1, 68, 69, -1, -1, -1, -1, -1,
6702 -1, -1, -1, 78, 79, 80, 81, 82, 83, 84,
6703 85, 86, 87, 88, 89, 90, -1, -1, -1, -1,
6704 95, 96, 97, 98, -1, -1, 101, -1, -1, -1,
6705 -1, 106, -1, -1, -1, -1, -1, -1, -1, -1,
6706 -1, -1, -1, -1, -1, 120, -1, -1, -1, -1,
6707 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6708 135, -1, 137, 138, 139, 140, 141, 142, 143, 144,
6709 145, 146, -1, -1, -1, -1, -1, 152, 153, 154,
6710 155, 0, -1, 158, 159, 160, -1, -1, -1, 8,
6711 9, 10, -1, -1, -1, 14, 15, -1, 17, -1,
6712 -1, -1, -1, -1, -1, -1, 25, 26, -1, -1,
6713 -1, -1, -1, -1, -1, -1, -1, -1, 37, 38,
6714 -1, 40, 41, 42, 43, 44, -1, -1, -1, -1,
6715 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6716 -1, -1, -1, -1, -1, -1, -1, -1, -1, 68,
6717 69, -1, -1, -1, -1, -1, -1, -1, -1, 78,
6718 79, 80, 81, 82, 83, 84, 85, 86, 87, 88,
6719 89, 90, -1, -1, -1, -1, 95, 96, 97, 98,
6720 -1, 100, 101, -1, -1, -1, -1, -1, -1, -1,
6721 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6722 -1, 120, -1, -1, -1, -1, -1, -1, -1, -1,
6723 -1, -1, -1, -1, -1, 134, 135, -1, 137, 138,
6724 139, 140, 141, 142, 143, 144, 145, 146, -1, -1,
6725 -1, -1, 151, 152, 153, 154, 155, 0, -1, 158,
6726 -1, 160, -1, -1, -1, 8, 9, 10, -1, -1,
6727 -1, 14, 15, -1, 17, -1, -1, -1, -1, -1,
6728 -1, -1, 25, -1, -1, -1, -1, -1, -1, -1,
6729 -1, -1, -1, -1, 37, 38, -1, 40, 41, 42,
6730 43, 44, -1, -1, -1, -1, -1, -1, -1, -1,
6731 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6732 -1, -1, -1, -1, -1, 68, 69, -1, -1, -1,
6733 -1, -1, -1, -1, -1, 78, 79, 80, 81, 82,
6734 83, 84, 85, 86, 87, 88, 89, 90, -1, -1,
6735 -1, -1, 95, 96, 97, 98, -1, 100, 101, -1,
6736 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6737 -1, -1, -1, -1, -1, -1, -1, 120, -1, -1,
6738 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6739 -1, 134, 135, -1, 137, 138, 139, 140, 141, 142,
6740 143, 144, 145, 146, -1, -1, -1, -1, 151, 152,
6741 153, 154, 155, 0, -1, 158, -1, 160, -1, -1,
6742 -1, 8, 9, 10, -1, -1, -1, 14, 15, -1,
6743 17, -1, -1, -1, -1, -1, -1, -1, 25, -1,
6744 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6745 37, 38, -1, 40, 41, 42, 43, 44, -1, -1,
6746 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6747 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6748 -1, 68, 69, -1, -1, -1, -1, -1, -1, -1,
6749 -1, 78, 79, 80, 81, 82, 83, 84, 85, 86,
6750 87, 88, 89, 90, -1, -1, -1, -1, 95, 96,
6751 97, 98, -1, 100, 101, -1, -1, -1, -1, -1,
6752 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6753 -1, -1, -1, 120, -1, -1, -1, -1, -1, -1,
6754 -1, -1, -1, -1, -1, -1, -1, 134, 135, -1,
6755 137, 138, 139, 140, 141, 142, 143, 144, 145, 146,
6756 -1, -1, -1, -1, 151, 152, 153, 154, 155, -1,
6757 -1, 158, 1, 160, 3, 4, 5, 6, 7, 8,
6758 9, 10, 11, 12, -1, -1, 15, 16, -1, 18,
6759 19, 20, 21, 22, 23, 24, -1, -1, -1, -1,
6760 -1, 30, 31, 32, 33, 34, 35, 36, -1, -1,
6761 39, -1, -1, -1, -1, -1, 45, 46, 47, 48,
6762 49, 50, 51, 52, 53, 54, 55, 56, 57, -1,
6763 59, 60, 61, 62, 63, 64, 65, -1, -1, 68,
6764 -1, -1, -1, -1, -1, -1, -1, 76, 77, -1,
6765 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6766 -1, -1, 91, 92, -1, -1, -1, -1, -1, -1,
6767 99, -1, -1, 102, 103, 104, 105, -1, 107, -1,
6768 -1, 110, 111, 112, 113, 114, 115, 116, 117, 118,
6769 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6770 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6771 -1, -1, -1, -1, -1, -1, -1, -1, 147, 148,
6772 149, -1, -1, -1, 1, 154, 3, 4, 5, 6,
6773 7, 160, -1, 10, 11, 12, -1, 14, 15, 16,
6774 -1, 18, 19, 20, 21, 22, 23, 24, -1, -1,
6775 -1, -1, -1, 30, 31, 32, 33, 34, 35, 36,
6776 -1, -1, 39, -1, -1, -1, -1, -1, 45, 46,
6777 47, 48, 49, 50, 51, 52, 53, 54, 55, 56,
6778 57, -1, 59, 60, 61, 62, 63, 64, 65, -1,
6779 -1, 68, -1, -1, -1, -1, -1, -1, -1, 76,
6780 77, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6781 -1, -1, -1, -1, 91, 92, -1, -1, -1, -1,
6782 -1, -1, 99, -1, -1, 102, 103, 104, 105, -1,
6783 107, -1, -1, 110, 111, 112, 113, 114, 115, 116,
6784 117, 118, -1, -1, -1, -1, -1, -1, -1, -1,
6785 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6786 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6787 147, 148, 149, -1, -1, -1, 1, 154, 3, 4,
6788 5, 6, 7, 160, -1, 10, 11, 12, -1, -1,
6789 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
6790 -1, -1, -1, -1, -1, 30, 31, 32, 33, 34,
6791 35, 36, -1, -1, 39, -1, -1, -1, -1, -1,
6792 45, 46, 47, 48, 49, 50, 51, 52, 53, 54,
6793 55, 56, 57, -1, 59, 60, 61, 62, 63, 64,
6794 65, -1, -1, 68, -1, -1, -1, -1, -1, -1,
6795 -1, 76, 77, -1, -1, -1, -1, -1, -1, -1,
6796 -1, -1, -1, -1, -1, -1, 91, 92, -1, -1,
6797 -1, -1, -1, -1, 99, -1, -1, 102, 103, 104,
6798 105, -1, 107, -1, -1, 110, 111, 112, 113, 114,
6799 115, 116, 117, 118, -1, -1, -1, -1, -1, -1,
6800 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6801 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6802 -1, -1, 147, 148, 149, -1, -1, -1, 1, 154,
6803 3, 4, 5, 6, 7, 160, -1, 10, 11, 12,
6804 -1, -1, 15, 16, -1, 18, 19, 20, 21, 22,
6805 23, 24, 25, -1, -1, -1, -1, 30, 31, 32,
6806 33, 34, 35, 36, -1, -1, 39, -1, -1, -1,
6807 -1, -1, 45, 46, 47, 48, 49, 50, 51, 52,
6808 53, 54, 55, 56, 57, -1, 59, 60, 61, 62,
6809 63, 64, 65, -1, -1, 68, -1, -1, -1, -1,
6810 -1, -1, -1, 76, 77, -1, -1, -1, -1, -1,
6811 -1, -1, -1, -1, -1, -1, -1, -1, 91, 92,
6812 -1, -1, -1, -1, -1, -1, 99, -1, -1, 102,
6813 103, 104, 105, -1, 107, -1, -1, 110, 111, 112,
6814 113, 114, 115, 116, 117, 118, -1, -1, -1, -1,
6815 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6816 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6817 -1, -1, -1, -1, 147, 148, 149, -1, -1, -1,
6818 1, 154, 3, 4, 5, 6, 7, 160, -1, 10,
6819 11, 12, -1, -1, 15, 16, -1, 18, 19, 20,
6820 21, 22, 23, 24, -1, -1, -1, -1, -1, 30,
6821 31, 32, 33, 34, 35, 36, -1, -1, 39, -1,
6822 -1, -1, -1, -1, 45, 46, 47, 48, 49, 50,
6823 51, 52, 53, 54, 55, 56, 57, -1, 59, 60,
6824 61, 62, 63, 64, 65, -1, -1, 68, -1, -1,
6825 -1, -1, -1, -1, -1, 76, 77, -1, -1, -1,
6826 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6827 91, 92, -1, -1, -1, -1, -1, -1, 99, -1,
6828 -1, 102, 103, 104, 105, -1, 107, -1, -1, 110,
6829 111, 112, 113, 114, 115, 116, 117, 118, -1, -1,
6830 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6831 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6832 -1, -1, -1, -1, -1, -1, 147, 148, 149, -1,
6833 -1, -1, 1, 154, 3, 4, 5, 6, 7, 160,
6834 9, 10, 11, 12, -1, -1, -1, 16, -1, 18,
6835 19, 20, 21, 22, 23, 24, -1, -1, -1, -1,
6836 -1, 30, 31, 32, 33, 34, 35, 36, -1, -1,
6837 39, -1, -1, -1, -1, -1, 45, 46, 47, 48,
6838 49, 50, 51, 52, 53, 54, 55, 56, 57, -1,
6839 59, 60, 61, 62, 63, 64, 65, -1, -1, 68,
6840 -1, -1, -1, -1, -1, -1, -1, 76, 77, -1,
6841 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6842 -1, -1, 91, 92, -1, -1, -1, -1, -1, -1,
6843 99, -1, -1, 102, 103, 104, 105, -1, 107, -1,
6844 -1, 110, 111, 112, 113, 114, 115, 116, 117, 118,
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, -1, -1, -1, -1, -1, -1, 147, 148,
6848 149, -1, -1, -1, 1, 154, 3, 4, 5, 6,
6849 7, 160, -1, 10, 11, 12, -1, -1, -1, 16,
6850 -1, 18, 19, 20, 21, 22, 23, 24, -1, -1,
6851 -1, -1, -1, 30, 31, 32, 33, 34, 35, 36,
6852 -1, -1, 39, -1, -1, -1, -1, -1, 45, 46,
6853 47, 48, 49, 50, 51, 52, 53, 54, 55, 56,
6854 57, -1, 59, 60, 61, 62, 63, 64, 65, -1,
6855 -1, 68, -1, -1, -1, -1, -1, -1, -1, 76,
6856 77, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6857 -1, -1, -1, -1, 91, 92, -1, -1, -1, -1,
6858 -1, -1, 99, -1, -1, 102, 103, 104, 105, -1,
6859 107, -1, -1, 110, 111, 112, 113, 114, 115, 116,
6860 117, 118, -1, -1, -1, -1, -1, -1, -1, -1,
6861 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6862 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6863 147, 148, 149, -1, -1, -1, 1, 154, 3, 4,
6864 5, 6, 7, 160, -1, -1, 11, 12, -1, -1,
6865 -1, 16, -1, 18, 19, 20, 21, 22, 23, 24,
6866 -1, -1, -1, -1, -1, 30, 31, 32, 33, 34,
6867 35, 36, -1, -1, 39, -1, -1, -1, -1, -1,
6868 45, 46, 47, 48, 49, 50, 51, 52, 53, 54,
6869 55, 56, 57, -1, 59, 60, 61, 62, 63, 64,
6870 65, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6871 -1, 76, 77, -1, -1, -1, -1, -1, -1, -1,
6872 -1, -1, -1, -1, -1, -1, 91, 92, -1, -1,
6873 -1, -1, -1, -1, 99, -1, -1, 102, 103, 104,
6874 105, -1, 107, -1, -1, 110, 111, 112, 113, 114,
6875 115, 116, 117, 118, -1, -1, -1, -1, -1, -1,
6876 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6877 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6878 -1, -1, 147, 148, 149, -1, -1, -1, -1, 154,
6879 -1, -1, -1, 158, 1, 160, 3, 4, 5, 6,
6880 7, -1, -1, -1, 11, 12, -1, -1, -1, 16,
6881 -1, 18, 19, 20, 21, 22, 23, 24, -1, -1,
6882 -1, -1, -1, 30, 31, 32, 33, 34, 35, 36,
6883 -1, -1, 39, -1, -1, -1, -1, -1, 45, 46,
6884 47, 48, 49, 50, 51, 52, 53, 54, 55, 56,
6885 57, -1, 59, 60, 61, 62, 63, 64, 65, -1,
6886 -1, -1, -1, -1, -1, -1, -1, -1, -1, 76,
6887 77, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6888 -1, -1, -1, -1, 91, 92, -1, -1, -1, -1,
6889 -1, -1, 99, -1, -1, 102, 103, 104, 105, -1,
6890 107, -1, -1, 110, 111, 112, 113, 114, 115, 116,
6891 117, 118, -1, -1, -1, -1, -1, -1, -1, -1,
6892 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6893 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6894 147, 148, 149, -1, -1, -1, -1, 154, -1, -1,
6895 -1, 158, 1, 160, 3, 4, 5, 6, 7, -1,
6896 -1, -1, 11, 12, -1, -1, -1, 16, -1, 18,
6897 19, 20, 21, 22, 23, 24, -1, -1, -1, -1,
6898 -1, 30, 31, 32, 33, 34, 35, 36, -1, -1,
6899 39, -1, -1, -1, -1, -1, 45, 46, 47, 48,
6900 49, 50, 51, 52, 53, 54, 55, 56, 57, -1,
6901 59, 60, 61, 62, 63, 64, 65, -1, -1, -1,
6902 -1, -1, -1, -1, -1, -1, -1, 76, 77, -1,
6903 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6904 -1, -1, 91, 92, -1, -1, -1, -1, -1, -1,
6905 99, -1, -1, 102, 103, 104, 105, -1, 107, -1,
6906 -1, 110, 111, 112, 113, 114, 115, 116, 117, 118,
6907 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6908 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6909 -1, -1, -1, -1, -1, -1, -1, -1, 147, 148,
6910 149, -1, -1, 152, 1, 154, 3, 4, 5, 6,
6911 7, 160, -1, -1, 11, 12, -1, -1, -1, 16,
6912 -1, 18, 19, 20, 21, 22, 23, 24, -1, -1,
6913 -1, -1, -1, 30, 31, 32, 33, 34, 35, 36,
6914 -1, -1, 39, -1, -1, -1, -1, -1, 45, 46,
6915 47, 48, 49, 50, 51, 52, 53, 54, 55, 56,
6916 57, -1, 59, 60, 61, 62, 63, 64, 65, -1,
6917 -1, -1, -1, -1, -1, -1, -1, -1, -1, 76,
6918 77, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6919 -1, -1, -1, -1, 91, 92, -1, -1, -1, -1,
6920 -1, -1, 99, -1, -1, 102, 103, 104, 105, -1,
6921 107, -1, -1, 110, 111, 112, 113, 114, 115, 116,
6922 117, 118, -1, -1, -1, -1, -1, -1, -1, -1,
6923 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6924 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6925 147, 148, 149, -1, -1, 152, 1, 154, 3, 4,
6926 5, -1, 7, 160, -1, -1, 11, 12, -1, -1,
6927 -1, 16, 17, 18, 19, 20, 21, 22, 23, 24,
6928 -1, -1, -1, -1, -1, 30, 31, 32, 33, 34,
6929 35, 36, -1, -1, 39, -1, -1, -1, -1, -1,
6930 -1, 46, -1, -1, 49, 50, 51, 52, 53, 54,
6931 55, 56, 57, -1, 59, 60, 61, 62, 63, 64,
6932 65, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6933 -1, 76, 77, -1, -1, -1, -1, -1, -1, -1,
6934 -1, -1, -1, -1, -1, -1, 91, 92, -1, -1,
6935 -1, -1, -1, -1, 99, -1, -1, 102, 103, 104,
6936 105, -1, -1, -1, -1, 110, 111, 112, 113, 114,
6937 115, 116, 117, 118, -1, -1, -1, -1, -1, -1,
6938 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6939 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6940 -1, -1, 147, 148, 149, -1, -1, -1, -1, 154,
6941 -1, -1, -1, -1, -1, 160, 3, 4, 5, 6,
6942 7, 8, 9, 10, 11, 12, 13, 14, 15, 16,
6943 17, 18, 19, 20, 21, 22, 23, 24, 25, 26,
6944 -1, -1, -1, 30, 31, 32, 33, 34, 35, 36,
6945 37, 38, 39, -1, -1, -1, -1, -1, 45, 46,
6946 47, 48, 49, 50, 51, 52, 53, 54, 55, 56,
6947 57, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6948 -1, -1, -1, -1, -1, -1, -1, -1, -1, 76,
6949 77, 78, 79, 80, 81, 82, 83, 84, -1, -1,
6950 87, 88, -1, -1, -1, -1, 93, 94, 95, 96,
6951 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6952 107, 108, -1, -1, -1, -1, -1, -1, -1, -1,
6953 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6954 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6955 137, 138, 139, 140, 141, 142, 143, 144, 145, 146,
6956 -1, 148, 149, -1, -1, -1, -1, -1, -1, 156,
6957 157, 3, 4, 5, 6, 7, 8, 9, 10, 11,
6958 12, 13, 14, 15, 16, 17, 18, 19, 20, 21,
6959 22, 23, 24, 25, 26, -1, -1, -1, 30, 31,
6960 32, 33, 34, 35, 36, 37, 38, 39, -1, -1,
6961 -1, -1, -1, 45, 46, 47, 48, 49, 50, 51,
6962 52, 53, 54, 55, 56, 57, -1, -1, -1, -1,
6963 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6964 -1, -1, -1, -1, 76, 77, 78, 79, 80, 81,
6965 82, 83, 84, -1, -1, 87, 88, -1, -1, -1,
6966 -1, 93, 94, 95, 96, -1, -1, -1, -1, -1,
6967 -1, -1, -1, -1, -1, 107, 108, -1, -1, -1,
6968 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6969 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6970 -1, -1, -1, -1, -1, 137, 138, 139, 140, 141,
6971 142, 143, 144, 145, 146, -1, 148, 149, -1, -1,
6972 -1, -1, -1, -1, 156, 3, 4, 5, 6, 7,
6973 8, 9, 10, 11, 12, 13, 14, 15, 16, 17,
6974 18, 19, 20, 21, 22, 23, 24, 25, 26, -1,
6975 -1, -1, 30, 31, 32, 33, 34, 35, 36, 37,
6976 38, 39, -1, -1, -1, -1, -1, 45, 46, 47,
6977 48, 49, 50, 51, 52, 53, 54, -1, 56, -1,
6978 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6979 -1, -1, -1, -1, -1, -1, -1, -1, 76, 77,
6980 78, 79, 80, 81, 82, 83, 84, -1, -1, 87,
6981 88, -1, -1, -1, -1, 93, 94, 95, 96, -1,
6982 -1, -1, -1, -1, -1, -1, -1, -1, -1, 107,
6983 108, -1, -1, 111, -1, -1, -1, -1, -1, -1,
6984 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6985 -1, -1, -1, -1, -1, -1, -1, -1, -1, 137,
6986 138, 139, 140, 141, 142, 143, 144, 145, 146, -1,
6987 148, 149, -1, -1, -1, -1, -1, -1, 156, 3,
6988 4, 5, 6, 7, 8, 9, 10, 11, 12, 13,
6989 14, 15, 16, 17, 18, 19, 20, 21, 22, 23,
6990 24, 25, 26, -1, -1, -1, 30, 31, 32, 33,
6991 34, 35, 36, 37, 38, 39, -1, -1, -1, -1,
6992 -1, 45, 46, 47, 48, 49, 50, 51, 52, 53,
6993 -1, -1, 56, -1, -1, -1, -1, -1, -1, -1,
6994 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6995 -1, -1, 76, 77, 78, 79, 80, 81, 82, 83,
6996 84, -1, -1, 87, 88, -1, -1, -1, -1, 93,
6997 94, 95, 96, -1, -1, -1, -1, -1, -1, -1,
6998 -1, -1, -1, 107, 108, -1, -1, 111, -1, -1,
6999 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7000 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7001 -1, -1, -1, 137, 138, 139, 140, 141, 142, 143,
7002 144, 145, 146, -1, 148, 149, -1, -1, -1, -1,
7003 -1, -1, 156, 3, 4, 5, 6, 7, 8, 9,
7004 10, 11, 12, 13, 14, 15, 16, 17, 18, 19,
7005 20, 21, 22, 23, 24, 25, 26, -1, -1, -1,
7006 30, 31, 32, 33, 34, 35, 36, 37, 38, 39,
7007 -1, -1, -1, -1, -1, 45, 46, 47, 48, 49,
7008 50, 51, 52, 53, -1, -1, 56, -1, -1, -1,
7009 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7010 -1, -1, -1, -1, -1, -1, 76, 77, 78, 79,
7011 80, 81, 82, 83, 84, -1, -1, 87, 88, -1,
7012 -1, -1, -1, 93, 94, 95, 96, -1, -1, -1,
7013 -1, -1, -1, -1, -1, -1, -1, 107, 108, -1,
7014 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7015 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7016 -1, -1, -1, -1, -1, -1, -1, 137, 138, 139,
7017 140, 141, 142, 143, 144, 145, 146, -1, 148, 149,
7018 3, 4, 5, -1, 7, -1, 156, -1, 11, 12,
7019 -1, -1, -1, 16, -1, 18, 19, 20, 21, 22,
7020 23, 24, -1, -1, -1, -1, -1, 30, 31, 32,
7021 33, 34, 35, 36, -1, -1, 39, -1, -1, -1,
7022 -1, -1, -1, 46, -1, -1, 49, 50, 51, 52,
7023 53, 54, 55, 56, 57, -1, 59, 60, 61, 62,
7024 63, 64, 65, -1, -1, -1, -1, -1, -1, -1,
7025 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7026 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7027 -1, -1, -1, -1, -1, -1, 99, -1, -1, 102,
7028 103, 104, 105, -1, -1, -1, -1, 110, 111, 112,
7029 113, 114, 115, 116, 117, 118, -1, -1, 3, 4,
7030 5, -1, 7, -1, -1, -1, 11, 12, -1, -1,
7031 -1, 16, -1, 18, 19, 20, 21, 22, 23, 24,
7032 -1, -1, -1, -1, 147, 30, 31, 32, 33, 34,
7033 35, 36, 155, -1, 39, -1, -1, -1, -1, -1,
7034 -1, 46, -1, -1, 49, 50, 51, 52, 53, 54,
7035 55, 56, 57, 58, 59, 60, 61, 62, 63, 64,
7036 65, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7037 -1, 76, 77, -1, -1, -1, -1, -1, -1, -1,
7038 -1, -1, -1, -1, -1, -1, 91, 92, -1, -1,
7039 -1, -1, -1, -1, 99, -1, -1, 102, 103, 104,
7040 105, -1, 107, 108, 109, 110, 111, 112, 113, 114,
7041 115, 116, 117, 118, -1, -1, -1, -1, -1, -1,
7042 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7043 -1, -1, -1, -1, -1, -1, -1, 3, 4, 5,
7044 -1, 7, 147, 148, 149, 11, 12, -1, -1, 154,
7045 16, -1, 18, 19, 20, 21, 22, 23, 24, -1,
7046 -1, -1, -1, -1, 30, 31, 32, 33, 34, 35,
7047 36, -1, -1, 39, -1, -1, -1, -1, -1, -1,
7048 46, -1, -1, 49, 50, 51, 52, 53, 54, 55,
7049 56, 57, -1, 59, 60, 61, 62, 63, 64, 65,
7050 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7051 76, 77, -1, -1, -1, -1, -1, -1, -1, -1,
7052 -1, -1, -1, -1, -1, 91, 92, -1, -1, -1,
7053 -1, -1, -1, 99, -1, -1, 102, 103, 104, 105,
7054 -1, -1, -1, -1, 110, 111, 112, 113, 114, 115,
7055 116, 117, 118, -1, -1, -1, -1, -1, -1, -1,
7056 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7057 -1, -1, -1, -1, 1, -1, 3, 4, 5, 6,
7058 7, 147, 148, 149, 11, 12, -1, -1, 154, 16,
7059 -1, 18, 19, 20, 21, 22, 23, 24, -1, -1,
7060 -1, -1, -1, 30, 31, 32, 33, 34, 35, 36,
7061 -1, -1, 39, -1, -1, -1, -1, -1, 45, 46,
7062 -1, 48, 49, 50, 51, 52, 53, 54, 55, 56,
7063 57, -1, 59, 60, 61, 62, 63, 64, 65, -1,
7064 -1, -1, -1, -1, -1, -1, -1, -1, -1, 76,
7065 77, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7066 -1, -1, -1, -1, 91, 92, -1, -1, -1, -1,
7067 -1, -1, 99, -1, -1, 102, 103, 104, 105, -1,
7068 107, -1, -1, 110, 111, 112, 113, 114, 115, 116,
7069 117, 118, -1, -1, 1, -1, 3, 4, 5, -1,
7070 7, -1, -1, -1, 11, 12, -1, -1, -1, 16,
7071 -1, 18, 19, 20, 21, 22, 23, 24, -1, -1,
7072 147, 148, 149, 30, 31, 32, 33, 34, 35, 36,
7073 -1, -1, 39, -1, -1, -1, -1, -1, -1, 46,
7074 -1, -1, 49, 50, 51, 52, 53, 54, 55, 56,
7075 57, -1, 59, 60, 61, 62, 63, 64, 65, -1,
7076 -1, -1, -1, -1, -1, -1, -1, -1, -1, 76,
7077 77, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7078 -1, -1, -1, -1, 91, 92, -1, -1, -1, -1,
7079 -1, -1, 99, -1, -1, 102, 103, 104, 105, -1,
7080 -1, -1, -1, 110, 111, 112, 113, 114, 115, 116,
7081 117, 118, -1, -1, -1, -1, 3, 4, 5, -1,
7082 7, -1, -1, -1, 11, 12, -1, -1, -1, 16,
7083 -1, 18, 19, 20, 21, 22, 23, 24, -1, -1,
7084 147, 148, 149, 30, 31, 32, 33, 34, 35, 36,
7085 -1, -1, 39, -1, -1, -1, -1, -1, -1, 46,
7086 -1, -1, 49, 50, 51, 52, 53, 54, 55, 56,
7087 57, 58, 59, 60, 61, 62, 63, 64, 65, -1,
7088 -1, -1, -1, -1, -1, -1, -1, -1, -1, 76,
7089 77, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7090 -1, -1, -1, -1, 91, 92, -1, -1, -1, -1,
7091 -1, -1, 99, -1, -1, 102, 103, 104, 105, -1,
7092 107, 108, 109, 110, 111, 112, 113, 114, 115, 116,
7093 117, 118, -1, -1, -1, -1, 3, 4, 5, -1,
7094 7, -1, -1, -1, 11, 12, -1, -1, -1, 16,
7095 -1, 18, 19, 20, 21, 22, 23, 24, -1, -1,
7096 147, 148, 149, 30, 31, 32, 33, 34, 35, 36,
7097 -1, -1, 39, -1, -1, -1, -1, -1, -1, 46,
7098 -1, -1, 49, 50, 51, 52, 53, 54, 55, 56,
7099 57, 58, 59, 60, 61, 62, 63, 64, 65, -1,
7100 -1, -1, -1, -1, -1, -1, -1, -1, -1, 76,
7101 77, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7102 -1, -1, -1, -1, 91, 92, -1, -1, -1, -1,
7103 -1, -1, 99, -1, -1, 102, 103, 104, 105, -1,
7104 107, 108, 109, 110, 111, 112, 113, 114, 115, 116,
7105 117, 118, -1, -1, -1, -1, 3, 4, 5, -1,
7106 7, -1, -1, -1, 11, 12, -1, -1, -1, 16,
7107 -1, 18, 19, 20, 21, 22, 23, 24, -1, -1,
7108 147, 148, 149, 30, 31, 32, 33, 34, 35, 36,
7109 -1, -1, 39, -1, -1, -1, -1, -1, -1, 46,
7110 -1, -1, 49, 50, 51, 52, 53, 54, 55, 56,
7111 57, 58, 59, 60, 61, 62, 63, 64, 65, -1,
7112 -1, -1, -1, -1, -1, -1, -1, -1, -1, 76,
7113 77, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7114 -1, -1, -1, -1, 91, 92, -1, -1, -1, -1,
7115 -1, -1, 99, -1, -1, 102, 103, 104, 105, -1,
7116 107, 108, 109, 110, 111, 112, 113, 114, 115, 116,
7117 117, 118, -1, -1, -1, -1, 3, 4, 5, -1,
7118 7, -1, -1, -1, 11, 12, -1, -1, -1, 16,
7119 -1, 18, 19, 20, 21, 22, 23, 24, -1, -1,
7120 147, 148, 149, 30, 31, 32, 33, 34, 35, 36,
7121 -1, -1, 39, -1, -1, -1, -1, -1, -1, 46,
7122 -1, -1, 49, 50, 51, 52, 53, 54, 55, 56,
7123 57, 58, 59, 60, 61, 62, 63, 64, 65, -1,
7124 -1, -1, -1, -1, -1, -1, -1, -1, -1, 76,
7125 77, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7126 -1, -1, -1, -1, 91, 92, -1, -1, -1, -1,
7127 -1, -1, 99, -1, -1, 102, 103, 104, 105, -1,
7128 107, 108, 109, 110, 111, 112, 113, 114, 115, 116,
7129 117, 118, -1, -1, -1, -1, 3, 4, 5, -1,
7130 7, -1, -1, -1, 11, 12, -1, -1, -1, 16,
7131 -1, 18, 19, 20, 21, 22, 23, 24, -1, -1,
7132 147, 148, 149, 30, 31, 32, 33, 34, 35, 36,
7133 -1, -1, 39, -1, -1, -1, -1, -1, -1, 46,
7134 -1, -1, 49, 50, 51, 52, 53, 54, 55, 56,
7135 57, 58, 59, 60, 61, 62, 63, 64, 65, -1,
7136 -1, -1, -1, -1, -1, -1, -1, -1, -1, 76,
7137 77, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7138 -1, -1, -1, -1, 91, 92, -1, -1, -1, -1,
7139 -1, -1, 99, -1, -1, 102, 103, 104, 105, -1,
7140 107, 108, -1, 110, 111, 112, 113, 114, 115, 116,
7141 117, 118, -1, -1, -1, -1, 3, 4, 5, -1,
7142 7, -1, -1, -1, 11, 12, -1, -1, -1, 16,
7143 -1, 18, 19, 20, 21, 22, 23, 24, -1, -1,
7144 147, 148, 149, 30, 31, 32, 33, 34, 35, 36,
7145 -1, -1, 39, -1, -1, -1, -1, -1, -1, 46,
7146 -1, -1, 49, 50, 51, 52, 53, 54, 55, 56,
7147 57, 58, 59, 60, 61, 62, 63, 64, 65, -1,
7148 -1, -1, -1, -1, -1, -1, -1, -1, -1, 76,
7149 77, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7150 -1, -1, -1, -1, 91, 92, -1, -1, -1, -1,
7151 -1, -1, 99, -1, -1, 102, 103, 104, 105, -1,
7152 -1, 108, 109, 110, 111, 112, 113, 114, 115, 116,
7153 117, 118, -1, -1, -1, -1, 3, 4, 5, -1,
7154 7, -1, -1, -1, 11, 12, -1, -1, -1, 16,
7155 -1, 18, 19, 20, 21, 22, 23, 24, -1, -1,
7156 147, 148, 149, 30, 31, 32, 33, 34, 35, 36,
7157 -1, -1, 39, -1, -1, -1, -1, -1, -1, 46,
7158 -1, -1, 49, 50, 51, 52, 53, 54, 55, 56,
7159 57, 58, 59, 60, 61, 62, 63, 64, 65, -1,
7160 -1, -1, -1, -1, -1, -1, -1, -1, -1, 76,
7161 77, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7162 -1, -1, -1, -1, 91, 92, -1, -1, -1, -1,
7163 -1, -1, 99, -1, -1, 102, 103, 104, 105, -1,
7164 -1, 108, -1, 110, 111, 112, 113, 114, 115, 116,
7165 117, 118, -1, -1, -1, -1, 3, 4, 5, -1,
7166 7, -1, -1, -1, 11, 12, -1, -1, -1, 16,
7167 -1, 18, 19, 20, 21, 22, 23, 24, -1, -1,
7168 147, 148, 149, 30, 31, 32, 33, 34, 35, 36,
7169 -1, -1, 39, -1, -1, -1, -1, -1, -1, 46,
7170 -1, -1, 49, 50, 51, 52, 53, 54, 55, 56,
7171 57, -1, 59, 60, 61, 62, 63, 64, 65, -1,
7172 -1, -1, -1, -1, -1, -1, -1, -1, -1, 76,
7173 77, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7174 -1, -1, -1, -1, 91, 92, -1, -1, -1, -1,
7175 -1, -1, 99, -1, -1, 102, 103, 104, 105, -1,
7176 107, -1, -1, 110, 111, 112, 113, 114, 115, 116,
7177 117, 118, -1, -1, -1, -1, 3, 4, 5, -1,
7178 7, -1, -1, -1, 11, 12, -1, -1, -1, 16,
7179 -1, 18, 19, 20, 21, 22, 23, 24, -1, -1,
7180 147, 148, 149, 30, 31, 32, 33, 34, 35, 36,
7181 -1, -1, 39, -1, -1, -1, -1, -1, -1, 46,
7182 -1, -1, 49, 50, 51, 52, 53, 54, 55, 56,
7183 57, -1, 59, 60, 61, 62, 63, 64, 65, -1,
7184 -1, -1, -1, -1, -1, -1, -1, -1, -1, 76,
7185 77, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7186 -1, -1, -1, -1, 91, 92, -1, -1, -1, -1,
7187 -1, -1, 99, -1, -1, 102, 103, 104, 105, -1,
7188 107, -1, -1, 110, 111, 112, 113, 114, 115, 116,
7189 117, 118, -1, -1, -1, -1, 3, 4, 5, -1,
7190 7, -1, -1, -1, 11, 12, -1, -1, -1, 16,
7191 -1, 18, 19, 20, 21, 22, 23, 24, -1, -1,
7192 147, 148, 149, 30, 31, 32, 33, 34, 35, 36,
7193 -1, -1, 39, -1, -1, -1, -1, -1, -1, 46,
7194 -1, -1, 49, 50, 51, 52, 53, 54, 55, 56,
7195 57, -1, 59, 60, 61, 62, 63, 64, 65, -1,
7196 -1, -1, -1, -1, -1, -1, -1, -1, -1, 76,
7197 77, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7198 -1, -1, -1, -1, 91, 92, -1, -1, -1, -1,
7199 -1, -1, 99, -1, -1, 102, 103, 104, 105, -1,
7200 107, -1, -1, 110, 111, 112, 113, 114, 115, 116,
7201 117, 118, -1, -1, -1, -1, 3, 4, 5, -1,
7202 7, -1, -1, -1, 11, 12, -1, -1, -1, 16,
7203 -1, 18, 19, 20, 21, 22, 23, 24, -1, -1,
7204 147, 148, 149, 30, 31, 32, 33, 34, 35, 36,
7205 -1, -1, 39, -1, -1, -1, -1, -1, -1, 46,
7206 -1, -1, 49, 50, 51, 52, 53, 54, 55, 56,
7207 57, -1, 59, 60, 61, 62, 63, 64, 65, -1,
7208 -1, -1, -1, -1, -1, -1, -1, -1, -1, 76,
7209 77, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7210 -1, -1, -1, -1, 91, 92, -1, -1, -1, -1,
7211 -1, -1, 99, -1, -1, 102, 103, 104, 105, -1,
7212 107, -1, -1, 110, 111, 112, 113, 114, 115, 116,
7213 117, 118, -1, -1, -1, -1, 3, 4, 5, -1,
7214 7, -1, -1, -1, 11, 12, -1, -1, -1, 16,
7215 -1, 18, 19, 20, 21, 22, 23, 24, -1, -1,
7216 147, 148, 149, 30, 31, 32, 33, 34, 35, 36,
7217 -1, -1, 39, -1, -1, -1, -1, -1, -1, 46,
7218 -1, -1, 49, 50, 51, 52, 53, 54, 55, 56,
7219 57, -1, 59, 60, 61, 62, 63, 64, 65, -1,
7220 -1, -1, -1, -1, -1, -1, -1, -1, -1, 76,
7221 77, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7222 -1, -1, -1, -1, 91, 92, -1, -1, -1, -1,
7223 -1, -1, 99, -1, -1, 102, 103, 104, 105, -1,
7224 107, -1, -1, 110, 111, 112, 113, 114, 115, 116,
7225 117, 118, -1, -1, -1, -1, 3, 4, 5, -1,
7226 7, -1, -1, -1, 11, 12, -1, -1, -1, 16,
7227 -1, 18, 19, 20, 21, 22, 23, 24, -1, -1,
7228 147, 148, 149, 30, 31, 32, 33, 34, 35, 36,
7229 -1, -1, 39, -1, -1, -1, -1, -1, -1, 46,
7230 -1, -1, 49, 50, 51, 52, 53, 54, 55, 56,
7231 57, -1, 59, 60, 61, 62, 63, 64, 65, -1,
7232 -1, -1, -1, -1, -1, -1, -1, -1, -1, 76,
7233 77, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7234 -1, -1, -1, -1, 91, 92, -1, -1, -1, -1,
7235 -1, -1, 99, -1, -1, 102, 103, 104, 105, -1,
7236 107, -1, -1, 110, 111, 112, 113, 114, 115, 116,
7237 117, 118, -1, -1, -1, -1, 3, 4, 5, -1,
7238 7, -1, -1, -1, 11, 12, -1, -1, -1, 16,
7239 -1, 18, 19, 20, 21, 22, 23, 24, -1, -1,
7240 147, 148, 149, 30, 31, 32, 33, 34, 35, 36,
7241 -1, -1, 39, -1, -1, -1, -1, -1, -1, 46,
7242 -1, -1, 49, 50, 51, 52, 53, 54, 55, 56,
7243 57, -1, 59, 60, 61, 62, 63, 64, 65, -1,
7244 -1, -1, -1, -1, -1, -1, -1, -1, -1, 76,
7245 77, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7246 -1, -1, -1, -1, 91, 92, -1, -1, -1, -1,
7247 -1, -1, 99, -1, -1, 102, 103, 104, 105, -1,
7248 -1, -1, -1, 110, 111, 112, 113, 114, 115, 116,
7249 117, 118, -1, -1, -1, -1, 3, 4, 5, -1,
7250 7, -1, -1, -1, 11, 12, -1, -1, -1, 16,
7251 -1, 18, 19, 20, 21, 22, 23, 24, -1, -1,
7252 147, 148, 149, 30, 31, 32, 33, 34, 35, 36,
7253 -1, -1, 39, -1, -1, -1, -1, -1, -1, 46,
7254 -1, -1, 49, 50, 51, 52, 53, 54, 55, 56,
7255 57, -1, 59, 60, 61, 62, 63, 64, 65, -1,
7256 -1, -1, -1, -1, -1, -1, -1, -1, -1, 76,
7257 77, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7258 -1, -1, -1, -1, 91, 92, -1, -1, -1, -1,
7259 -1, -1, 99, -1, -1, 102, 103, 104, 105, -1,
7260 -1, -1, -1, 110, 111, 112, 113, 114, 115, 116,
7261 117, 118, -1, -1, -1, -1, 3, 4, 5, -1,
7262 7, -1, -1, -1, 11, 12, -1, -1, -1, 16,
7263 -1, 18, 19, 20, 21, 22, 23, 24, -1, -1,
7264 147, 148, 149, 30, 31, 32, 33, 34, 35, 36,
7265 -1, -1, 39, -1, -1, -1, -1, -1, -1, 46,
7266 -1, -1, 49, 50, 51, 52, 53, 54, 55, 56,
7267 57, -1, 59, 60, 61, 62, 63, 64, 65, -1,
7268 -1, -1, -1, -1, -1, -1, -1, -1, -1, 76,
7269 77, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7270 -1, -1, -1, -1, 91, 92, -1, -1, -1, -1,
7271 -1, -1, 99, -1, -1, 102, 103, 104, 105, -1,
7272 -1, -1, -1, 110, 111, 112, 113, 114, 115, 116,
7273 117, 118, -1, -1, -1, -1, 3, 4, 5, -1,
7274 7, -1, -1, -1, 11, 12, -1, -1, -1, 16,
7275 -1, 18, 19, 20, 21, 22, 23, 24, -1, -1,
7276 147, 148, 149, 30, 31, 32, 33, 34, 35, 36,
7277 -1, -1, 39, -1, -1, -1, -1, -1, -1, 46,
7278 -1, -1, 49, 50, 51, 52, 53, 54, 55, 56,
7279 57, -1, 59, 60, 61, 62, 63, 64, 65, -1,
7280 -1, -1, -1, -1, -1, -1, -1, -1, -1, 76,
7281 77, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7282 -1, -1, -1, -1, 91, 92, -1, -1, -1, -1,
7283 -1, -1, 99, -1, -1, 102, 103, 104, 105, -1,
7284 -1, -1, -1, 110, 111, 112, 113, 114, 115, 116,
7285 117, 118, -1, -1, -1, -1, 3, 4, 5, -1,
7286 7, -1, -1, -1, 11, 12, -1, -1, -1, 16,
7287 -1, 18, 19, 20, 21, 22, 23, 24, -1, -1,
7288 147, 148, 149, 30, 31, 32, 33, 34, 35, 36,
7289 -1, -1, 39, -1, -1, -1, -1, -1, -1, 46,
7290 -1, -1, 49, 50, 51, 52, 53, 54, 55, 56,
7291 57, -1, 59, 60, 61, 62, 63, 64, 65, -1,
7292 -1, -1, -1, -1, -1, -1, -1, -1, -1, 76,
7293 77, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7294 -1, -1, -1, -1, 91, 92, -1, -1, -1, -1,
7295 -1, -1, 99, -1, -1, 102, 103, 104, 105, -1,
7296 -1, -1, -1, 110, 111, 112, 113, 114, 115, 116,
7297 117, 118, -1, -1, -1, -1, 3, 4, 5, -1,
7298 7, -1, -1, -1, 11, 12, -1, -1, -1, 16,
7299 -1, 18, 19, 20, 21, 22, 23, 24, -1, -1,
7300 147, 148, 149, 30, 31, 32, 33, 34, 35, 36,
7301 -1, -1, 39, -1, -1, -1, -1, -1, -1, 46,
7302 -1, -1, 49, 50, 51, 52, 53, 54, 55, 56,
7303 57, -1, 59, 60, 61, 62, 63, 64, 65, -1,
7304 -1, -1, -1, -1, -1, -1, -1, -1, -1, 76,
7305 77, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7306 -1, -1, -1, -1, 91, 92, -1, -1, -1, -1,
7307 -1, -1, 99, -1, -1, 102, 103, 104, 105, -1,
7308 -1, -1, -1, 110, 111, 112, 113, 114, 115, 116,
7309 117, 118, -1, -1, -1, -1, 3, 4, 5, -1,
7310 7, -1, -1, -1, 11, 12, -1, -1, -1, 16,
7311 -1, 18, 19, 20, 21, 22, 23, 24, -1, -1,
7312 147, 148, 149, 30, 31, 32, 33, 34, 35, 36,
7313 -1, -1, 39, -1, -1, -1, -1, -1, -1, 46,
7314 -1, -1, 49, 50, 51, 52, 53, 54, 55, 56,
7315 57, -1, 59, 60, 61, 62, 63, 64, 65, -1,
7316 -1, -1, -1, -1, -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, 99, -1, -1, 102, 103, 104, 105, -1,
7320 107, -1, -1, 110, 111, 112, 113, 114, 115, 116,
7321 117, 118, -1, -1, 3, 4, 5, -1, 7, -1,
7322 -1, -1, 11, 12, -1, -1, -1, 16, -1, 18,
7323 19, 20, 21, 22, 23, 24, -1, -1, -1, -1,
7324 147, 30, 31, 32, 33, 34, 35, 36, -1, -1,
7325 39, -1, -1, -1, -1, -1, -1, 46, -1, -1,
7326 49, 50, 51, 52, 53, 54, 55, 56, 57, -1,
7327 59, 60, 61, 62, 63, 64, 65, -1, -1, -1,
7328 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7329 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7330 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7331 99, -1, -1, 102, 103, 104, 105, -1, 107, -1,
7332 -1, 110, 111, 112, 113, 114, 115, 116, 117, 118,
7333 -1, -1, 3, 4, 5, -1, 7, -1, -1, -1,
7334 11, 12, -1, -1, -1, 16, -1, 18, 19, 20,
7335 21, 22, 23, 24, -1, -1, -1, -1, 147, 30,
7336 31, 32, 33, 34, 35, 36, -1, -1, 39, -1,
7337 -1, -1, -1, -1, -1, 46, -1, -1, 49, 50,
7338 51, 52, 53, 54, 55, 56, 57, -1, 59, 60,
7339 61, 62, 63, 64, 65, -1, -1, -1, -1, -1,
7340 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7341 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7342 -1, -1, -1, -1, 95, -1, -1, -1, 99, -1,
7343 -1, 102, 103, 104, 105, -1, -1, -1, -1, 110,
7344 111, 112, 113, 114, 115, 116, 117, 118, -1, -1,
7345 3, 4, 5, -1, 7, -1, -1, -1, 11, 12,
7346 -1, -1, -1, 16, -1, 18, 19, 20, 21, 22,
7347 23, 24, -1, -1, -1, -1, 147, 30, 31, 32,
7348 33, 34, 35, 36, -1, -1, 39, -1, -1, -1,
7349 -1, -1, -1, 46, -1, -1, 49, 50, 51, 52,
7350 53, 54, 55, 56, 57, -1, 59, 60, 61, 62,
7351 63, 64, 65, -1, -1, -1, -1, -1, -1, -1,
7352 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7353 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7354 -1, -1, -1, -1, -1, -1, 99, -1, -1, 102,
7355 103, 104, 105, -1, -1, -1, -1, 110, 111, 112,
7356 113, 114, 115, 116, 117, 118, -1, -1, 3, 4,
7357 5, -1, 7, -1, -1, -1, 11, 12, -1, -1,
7358 -1, 16, -1, 18, 19, 20, 21, 22, 23, 24,
7359 -1, -1, -1, -1, 147, 30, 31, 32, 33, 34,
7360 35, 36, -1, -1, 39, -1, -1, -1, -1, -1,
7361 -1, 46, -1, -1, 49, 50, 51, 52, 53, 54,
7362 55, 56, 57, -1, 59, 60, 61, 62, 63, 64,
7363 65, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7364 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7365 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7366 -1, -1, -1, -1, 99, -1, -1, 102, 103, 104,
7367 105, -1, -1, -1, -1, 110, 111, 112, 113, 114,
7368 115, 116, 117, 118, -1, -1, 3, 4, 5, -1,
7369 7, -1, -1, -1, 11, 12, -1, -1, -1, 16,
7370 -1, 18, 19, 20, 21, 22, 23, 24, -1, -1,
7371 -1, -1, 147, 30, 31, 32, 33, 34, 35, 36,
7372 -1, -1, 39, -1, -1, -1, -1, -1, -1, 46,
7373 -1, -1, 49, 50, 51, 52, 53, 54, 55, 56,
7374 57, -1, 59, 60, 61, 62, 63, 64, 65, -1,
7375 -1, -1, -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 -1, -1, 99, -1, -1, 102, 103, 104, 105, -1,
7379 -1, -1, -1, 110, 111, 112, 113, 114, 115, 116,
7380 117, 118, -1, -1, 3, 4, 5, -1, 7, -1,
7381 -1, -1, 11, 12, -1, -1, -1, 16, -1, 18,
7382 19, 20, 21, 22, 23, 24, -1, -1, -1, -1,
7383 147, 30, 31, 32, 33, 34, 35, 36, -1, -1,
7384 39, -1, -1, -1, -1, -1, -1, 46, -1, -1,
7385 49, 50, 51, 52, 53, 54, 55, 56, 57, -1,
7386 59, 60, 61, 62, 63, 64, 65, -1, -1, -1,
7387 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7388 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7389 -1, -1, -1, -1, -1, -1, -1, 52, 53, -1,
7390 99, 56, -1, 102, 103, 104, 105, -1, -1, -1,
7391 -1, 110, 111, 112, 113, 114, 115, 116, 117, 118,
7392 -1, 76, 77, 78, 79, 80, 81, 82, 83, 84,
7393 -1, -1, 87, 88, -1, -1, -1, -1, 93, 94,
7394 95, 96, -1, -1, -1, -1, -1, -1, 147, -1,
7395 -1, -1, 107, 108, -1, -1, -1, -1, -1, -1,
7396 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7397 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7398 -1, -1, 137, 138, 139, 140, 141, 142, 143, 144,
7399 145, 146, -1, 148, 149, 52, 53, -1, -1, 56,
7400 -1, 156, -1, -1, -1, -1, -1, -1, -1, -1,
7401 -1, -1, -1, -1, -1, -1, -1, -1, -1, 76,
7402 77, 78, 79, 80, 81, 82, 83, 84, -1, -1,
7403 87, 88, -1, -1, -1, -1, 93, 94, 95, 96,
7404 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7405 107, 108, -1, -1, -1, -1, -1, -1, -1, -1,
7406 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7407 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7408 137, 138, 139, 140, 141, 142, 143, 144, 145, 146,
7409 -1, 148, 149, 52, 53, -1, -1, 56, -1, 156,
7410 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7411 -1, -1, -1, -1, -1, -1, -1, 76, 77, 78,
7412 79, 80, 81, 82, 83, 84, -1, -1, 87, 88,
7413 -1, -1, -1, -1, 93, 94, 95, 96, -1, -1,
7414 -1, -1, -1, -1, -1, -1, -1, -1, 107, 108,
7415 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7416 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7417 -1, -1, -1, -1, -1, -1, -1, -1, 137, 138,
7418 139, 140, 141, 142, 143, 144, 145, 146, -1, 148,
7419 149, 52, 53, -1, -1, 56, -1, 156, -1, -1,
7420 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7421 -1, -1, -1, -1, -1, 76, 77, 78, 79, 80,
7422 81, 82, 83, 84, -1, -1, 87, 88, -1, -1,
7423 -1, -1, 93, 94, 95, 96, -1, -1, -1, -1,
7424 -1, -1, -1, -1, -1, -1, 107, 108, -1, -1,
7425 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7426 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7427 -1, -1, -1, -1, -1, -1, 137, 138, 139, 140,
7428 141, 142, 143, 144, 145, 146, -1, 148, 149, 52,
7429 53, -1, -1, 56, -1, 156, -1, -1, -1, -1,
7430 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7431 -1, -1, -1, 76, 77, 78, 79, 80, 81, 82,
7432 83, 84, -1, -1, 87, 88, -1, -1, -1, -1,
7433 93, 94, 95, 96, -1, -1, -1, -1, -1, -1,
7434 -1, -1, -1, -1, 107, 108, -1, -1, -1, -1,
7435 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7436 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7437 -1, -1, -1, -1, 137, 138, 139, 140, 141, 142,
7438 143, 144, 145, 146, -1, 148, 149, 52, 53, -1,
7439 -1, 56, -1, 156, -1, -1, -1, -1, -1, -1,
7440 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7441 -1, 76, 77, 78, 79, 80, 81, 82, 83, 84,
7442 -1, -1, 87, 88, -1, -1, -1, -1, 93, 94,
7443 95, 96, -1, -1, -1, -1, -1, -1, -1, -1,
7444 -1, -1, 107, 108, -1, -1, -1, -1, -1, -1,
7445 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7446 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7447 -1, -1, 137, 138, 139, 140, 141, 142, 143, 144,
7448 145, 146, -1, 148, 149, 52, 53, -1, -1, 56,
7449 -1, 156, -1, -1, -1, -1, -1, -1, -1, -1,
7450 -1, -1, -1, -1, -1, -1, -1, -1, -1, 76,
7451 77, 78, 79, 80, 81, 82, 83, 84, -1, -1,
7452 87, 88, -1, -1, -1, -1, 93, 94, 95, 96,
7453 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7454 107, 108, -1, -1, -1, -1, -1, -1, -1, -1,
7455 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7456 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7457 137, 138, 139, 140, 141, 142, 143, 144, 145, 146,
7458 -1, 148, 149, 52, 53, -1, -1, 56, -1, 156,
7459 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7460 -1, -1, -1, -1, -1, -1, -1, 76, 77, 78,
7461 79, 80, 81, 82, 83, 84, -1, -1, 87, 88,
7462 -1, -1, -1, -1, 93, 94, 95, 96, -1, -1,
7463 -1, -1, -1, -1, -1, -1, -1, -1, 107, 108,
7464 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7465 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7466 -1, -1, -1, -1, -1, -1, -1, -1, 137, 138,
7467 139, 140, 141, 142, 143, 144, 145, 146, -1, 148,
7468 149, 52, 53, -1, -1, 56, -1, 156, -1, -1,
7469 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7470 -1, -1, -1, -1, -1, 76, 77, 78, 79, 80,
7471 81, 82, 83, 84, -1, -1, 87, 88, -1, -1,
7472 -1, -1, 93, 94, 95, 96, -1, -1, -1, -1,
7473 -1, -1, -1, -1, -1, -1, 107, 108, -1, -1,
7474 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7475 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7476 -1, -1, -1, -1, -1, -1, 137, 138, 139, 140,
7477 141, 142, 143, 144, 145, 146, -1, 148, 149, 52,
7478 53, -1, -1, 56, -1, 156, -1, -1, -1, -1,
7479 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7480 -1, -1, -1, 76, 77, 78, 79, 80, 81, 82,
7481 83, 84, -1, -1, 87, 88, -1, -1, -1, -1,
7482 93, 94, 95, 96, -1, -1, -1, -1, -1, -1,
7483 -1, -1, -1, -1, 107, 108, -1, -1, -1, -1,
7484 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7485 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7486 -1, -1, -1, -1, 137, 138, 139, 140, 141, 142,
7487 143, 144, 145, 146, -1, 148, 149, 52, 53, -1,
7488 -1, 56, -1, 156, -1, -1, -1, -1, -1, -1,
7489 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7490 -1, 76, 77, 78, 79, 80, 81, 82, 83, 84,
7491 -1, -1, 87, 88, -1, -1, -1, -1, 93, 94,
7492 95, 96, -1, -1, -1, -1, -1, -1, -1, -1,
7493 -1, -1, 107, 108, -1, -1, -1, -1, -1, -1,
7494 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7495 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7496 -1, -1, 137, 138, 139, 140, 141, 142, 143, 144,
7497 145, 146, -1, 148, 149, 52, 53, -1, -1, 56,
7498 -1, 156, -1, -1, -1, -1, -1, -1, -1, -1,
7499 -1, -1, -1, -1, -1, -1, -1, -1, -1, 76,
7500 77, 78, 79, 80, 81, 82, 83, 84, -1, -1,
7501 87, 88, -1, -1, -1, -1, 93, 94, 95, 96,
7502 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7503 107, 108, -1, -1, -1, -1, -1, -1, -1, -1,
7504 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7505 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7506 137, 138, 139, 140, 141, 142, 143, 144, 145, 146,
7507 -1, 148, 149, 52, 53, -1, -1, 56, -1, 156,
7508 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7509 -1, -1, -1, -1, -1, -1, -1, 76, 77, 78,
7510 79, 80, 81, 82, 83, 84, -1, -1, 87, 88,
7511 -1, -1, -1, -1, 93, 94, 95, 96, -1, -1,
7512 -1, -1, -1, -1, -1, -1, -1, -1, 107, 108,
7513 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7514 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7515 -1, -1, -1, -1, -1, -1, -1, -1, 137, 138,
7516 139, 140, 141, 142, 143, 144, 145, 146, -1, 148,
7517 149, 52, 53, -1, -1, 56, -1, 156, -1, -1,
7518 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7519 -1, -1, -1, -1, -1, 76, 77, 78, 79, 80,
7520 81, 82, 83, 84, -1, -1, 87, 88, -1, -1,
7521 -1, -1, 93, 94, 95, 96, -1, -1, -1, -1,
7522 -1, -1, -1, -1, -1, -1, 107, 108, -1, -1,
7523 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7524 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7525 -1, -1, -1, -1, -1, -1, 137, 138, 139, 140,
7526 141, 142, 143, 144, 145, 146, -1, 148, 149, 52,
7527 53, -1, -1, 56, -1, 156, -1, -1, -1, -1,
7528 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7529 -1, -1, -1, 76, 77, 78, 79, 80, 81, 82,
7530 83, 84, -1, -1, 87, 88, -1, -1, -1, -1,
7531 93, 94, 95, 96, -1, -1, -1, -1, -1, -1,
7532 -1, -1, -1, -1, 107, 108, -1, -1, -1, -1,
7533 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7534 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7535 -1, -1, -1, -1, 137, 138, 139, 140, 141, 142,
7536 143, 144, 145, 146, -1, 148, 149, 52, 53, -1,
7537 -1, 56, -1, 156, -1, -1, -1, -1, -1, -1,
7538 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7539 -1, 76, 77, 78, 79, 80, 81, 82, 83, 84,
7540 -1, -1, 87, 88, -1, -1, -1, -1, 93, 94,
7541 95, 96, -1, -1, -1, -1, -1, -1, -1, -1,
7542 -1, -1, 107, 108, -1, -1, -1, -1, -1, -1,
7543 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7544 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7545 -1, -1, 137, 138, 139, 140, 141, 142, 143, 144,
7546 145, 146, -1, 148, 149, -1, -1, -1, -1, -1,
7547 -1, 156
7548};
7549
7550/* YYSTOS[STATE-NUM] -- The symbol kind of the accessing symbol of
7551 state STATE-NUM. */
7552static const yytype_int16 yystos[] =
7553{
7554 0, 165, 166, 1, 3, 4, 5, 6, 7, 11,
7555 12, 16, 18, 19, 20, 21, 22, 23, 24, 30,
7556 31, 32, 33, 34, 35, 36, 39, 45, 46, 47,
7557 48, 49, 50, 51, 52, 53, 54, 55, 56, 57,
7558 59, 60, 61, 62, 63, 64, 65, 76, 77, 91,
7559 92, 99, 102, 103, 104, 105, 107, 110, 111, 112,
7560 113, 114, 115, 116, 117, 118, 147, 148, 149, 164,
7561 167, 168, 180, 182, 183, 184, 185, 186, 187, 191,
7562 195, 197, 203, 206, 208, 209, 210, 212, 214, 215,
7563 216, 217, 226, 227, 228, 229, 230, 231, 234, 255,
7564 267, 268, 269, 270, 271, 272, 273, 274, 275, 276,
7565 277, 278, 287, 288, 289, 290, 291, 324, 329, 330,
7566 380, 381, 382, 383, 384, 385, 387, 388, 391, 392,
7567 394, 395, 396, 397, 411, 412, 414, 415, 416, 417,
7568 418, 419, 420, 421, 422, 470, 0, 3, 4, 5,
7569 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
7570 16, 17, 18, 19, 20, 21, 22, 23, 24, 25,
7571 26, 30, 31, 32, 33, 34, 35, 36, 37, 38,
7572 39, 45, 46, 47, 48, 49, 50, 51, 52, 53,
7573 56, 76, 77, 78, 79, 80, 81, 82, 83, 84,
7574 87, 88, 93, 94, 95, 96, 107, 108, 137, 138,
7575 139, 140, 141, 142, 143, 144, 145, 146, 148, 149,
7576 156, 220, 221, 222, 224, 225, 411, 179, 179, 179,
7577 157, 242, 247, 248, 154, 157, 189, 54, 221, 189,
7578 151, 169, 170, 235, 470, 21, 22, 32, 39, 99,
7579 102, 148, 195, 197, 208, 217, 227, 268, 287, 291,
7580 418, 419, 421, 422, 227, 227, 227, 56, 47, 102,
7581 171, 176, 177, 182, 211, 212, 470, 171, 58, 107,
7582 108, 112, 227, 238, 239, 240, 251, 252, 457, 458,
7583 470, 239, 456, 457, 470, 46, 99, 147, 155, 195,
7584 197, 216, 255, 268, 418, 419, 422, 322, 220, 400,
7585 413, 417, 400, 401, 402, 161, 386, 386, 386, 386,
7586 416, 203, 227, 268, 227, 154, 160, 163, 468, 469,
7587 179, 40, 41, 42, 43, 44, 37, 38, 157, 425,
7588 426, 427, 428, 470, 425, 427, 26, 151, 242, 248,
7589 279, 331, 28, 280, 328, 134, 155, 102, 107, 214,
7590 134, 25, 78, 79, 80, 81, 82, 83, 84, 85,
7591 86, 87, 88, 89, 90, 95, 96, 101, 135, 137,
7592 138, 139, 140, 141, 142, 143, 144, 145, 146, 233,
7593 233, 69, 97, 98, 153, 462, 463, 256, 1, 191,
7594 198, 199, 199, 200, 202, 202, 163, 199, 469, 99,
7595 210, 217, 268, 296, 418, 419, 422, 52, 56, 95,
7596 99, 218, 219, 268, 418, 419, 422, 219, 33, 34,
7597 35, 36, 49, 50, 51, 52, 56, 157, 194, 220,
7598 420, 452, 453, 454, 109, 187, 209, 245, 246, 249,
7599 251, 457, 246, 246, 157, 248, 98, 462, 463, 331,
7600 383, 100, 100, 155, 92, 244, 246, 251, 437, 457,
7601 470, 246, 189, 191, 464, 191, 54, 64, 65, 181,
7602 157, 235, 236, 164, 56, 425, 425, 134, 98, 153,
7603 462, 100, 100, 100, 178, 211, 158, 163, 469, 464,
7604 257, 239, 239, 239, 400, 101, 159, 155, 189, 467,
7605 155, 467, 152, 467, 189, 56, 416, 213, 214, 426,
7606 155, 98, 153, 462, 319, 66, 119, 121, 122, 403,
7607 119, 119, 403, 67, 403, 161, 389, 398, 393, 399,
7608 78, 98, 462, 160, 168, 151, 199, 199, 199, 199,
7609 235, 237, 191, 191, 52, 54, 55, 56, 57, 58,
7610 78, 92, 102, 107, 108, 109, 141, 144, 301, 367,
7611 429, 430, 431, 432, 433, 434, 436, 437, 438, 439,
7612 440, 441, 442, 443, 444, 445, 446, 447, 448, 449,
7613 450, 134, 265, 436, 134, 266, 332, 333, 106, 207,
7614 334, 335, 335, 235, 211, 155, 216, 155, 235, 193,
7615 227, 227, 227, 227, 227, 227, 227, 227, 227, 227,
7616 227, 227, 227, 192, 227, 227, 227, 227, 227, 227,
7617 227, 227, 227, 227, 227, 52, 53, 56, 224, 459,
7618 460, 244, 251, 52, 53, 56, 224, 459, 242, 171,
7619 174, 13, 292, 468, 292, 199, 171, 171, 259, 163,
7620 56, 98, 153, 462, 25, 199, 52, 56, 218, 138,
7621 424, 470, 98, 153, 462, 264, 455, 69, 98, 461,
7622 239, 155, 250, 470, 155, 250, 246, 464, 52, 56,
7623 242, 459, 235, 235, 223, 464, 155, 464, 155, 158,
7624 464, 221, 236, 227, 152, 100, 134, 134, 235, 52,
7625 56, 459, 244, 52, 56, 459, 235, 235, 235, 170,
7626 464, 177, 158, 124, 239, 239, 252, 457, 458, 155,
7627 213, 52, 56, 244, 52, 56, 320, 405, 404, 119,
7628 390, 403, 66, 119, 119, 390, 66, 119, 227, 56,
7629 171, 182, 102, 107, 297, 298, 299, 300, 439, 155,
7630 451, 470, 155, 451, 155, 435, 464, 302, 303, 155,
7631 435, 239, 34, 52, 52, 155, 435, 52, 39, 188,
7632 209, 227, 232, 174, 468, 188, 232, 174, 319, 152,
7633 333, 319, 10, 68, 286, 286, 107, 203, 204, 205,
7634 239, 251, 253, 254, 464, 213, 155, 99, 185, 190,
7635 205, 217, 227, 239, 241, 254, 268, 422, 341, 341,
7636 189, 100, 100, 151, 242, 248, 189, 465, 155, 100,
7637 100, 242, 243, 248, 470, 235, 286, 171, 13, 171,
7638 27, 293, 468, 286, 286, 17, 283, 337, 25, 258,
7639 343, 52, 56, 244, 52, 56, 260, 263, 423, 262,
7640 52, 56, 218, 244, 174, 191, 196, 249, 457, 464,
7641 243, 248, 190, 227, 241, 190, 241, 221, 437, 457,
7642 191, 235, 39, 100, 100, 465, 100, 100, 190, 241,
7643 239, 467, 214, 465, 321, 406, 410, 417, 422, 386,
7644 403, 386, 386, 386, 152, 299, 439, 155, 464, 155,
7645 450, 429, 444, 446, 432, 433, 442, 448, 134, 239,
7646 434, 441, 448, 440, 442, 189, 44, 44, 286, 286,
7647 320, 152, 320, 239, 155, 44, 213, 56, 44, 134,
7648 44, 98, 153, 462, 339, 339, 136, 235, 235, 333,
7649 207, 159, 100, 235, 235, 207, 8, 281, 376, 470,
7650 14, 15, 284, 285, 294, 295, 470, 295, 201, 107,
7651 239, 336, 286, 341, 337, 286, 465, 199, 468, 199,
7652 174, 465, 286, 464, 194, 250, 331, 328, 464, 155,
7653 464, 189, 235, 235, 100, 235, 235, 179, 407, 464,
7654 297, 300, 298, 451, 155, 435, 155, 435, 155, 435,
7655 155, 435, 435, 188, 232, 237, 237, 321, 321, 107,
7656 239, 237, 237, 235, 237, 52, 56, 244, 52, 56,
7657 340, 340, 227, 190, 241, 190, 241, 152, 235, 190,
7658 241, 190, 241, 239, 254, 377, 470, 175, 284, 171,
7659 199, 286, 286, 239, 155, 292, 339, 286, 293, 174,
7660 468, 286, 235, 157, 325, 436, 408, 155, 155, 442,
7661 442, 448, 442, 227, 227, 179, 179, 239, 182, 182,
7662 227, 465, 52, 56, 58, 91, 92, 99, 102, 104,
7663 105, 107, 112, 140, 324, 346, 347, 348, 350, 353,
7664 357, 358, 359, 362, 363, 364, 365, 366, 367, 368,
7665 369, 370, 371, 372, 373, 374, 375, 380, 381, 384,
7666 385, 388, 392, 395, 397, 419, 444, 346, 190, 241,
7667 101, 378, 470, 9, 282, 379, 470, 172, 292, 107,
7668 239, 171, 340, 261, 286, 436, 323, 171, 298, 435,
7669 435, 155, 435, 435, 139, 313, 314, 470, 313, 371,
7670 371, 56, 218, 340, 347, 355, 356, 357, 358, 361,
7671 465, 189, 340, 466, 52, 400, 52, 102, 417, 101,
7672 155, 139, 155, 155, 347, 89, 90, 98, 153, 157,
7673 351, 352, 52, 99, 217, 268, 418, 419, 422, 292,
7674 176, 171, 171, 239, 295, 337, 338, 345, 346, 171,
7675 189, 316, 29, 123, 326, 0, 120, 409, 442, 301,
7676 304, 305, 306, 307, 309, 310, 312, 315, 440, 442,
7677 443, 448, 450, 171, 174, 347, 465, 347, 359, 361,
7678 465, 155, 152, 235, 124, 199, 372, 355, 359, 349,
7679 360, 361, 112, 364, 368, 371, 371, 218, 340, 465,
7680 340, 464, 355, 358, 362, 355, 358, 362, 56, 98,
7681 153, 462, 171, 163, 173, 294, 292, 40, 41, 286,
7682 160, 158, 327, 171, 435, 451, 155, 451, 155, 311,
7683 316, 303, 155, 308, 311, 99, 268, 155, 311, 464,
7684 155, 155, 354, 464, 155, 353, 155, 400, 464, 464,
7685 464, 465, 465, 465, 52, 56, 244, 52, 56, 376,
7686 379, 342, 199, 199, 52, 317, 318, 438, 174, 152,
7687 304, 446, 307, 309, 442, 448, 139, 268, 310, 448,
7688 56, 98, 442, 360, 362, 360, 359, 361, 465, 171,
7689 155, 189, 286, 451, 155, 311, 155, 311, 155, 311,
7690 155, 311, 52, 56, 311, 155, 466, 295, 343, 344,
7691 318, 442, 442, 448, 442, 311, 311, 155, 311, 311,
7692 442, 311
7693};
7694
7695/* YYR1[RULE-NUM] -- Symbol kind of the left-hand side of rule RULE-NUM. */
7696static const yytype_int16 yyr1[] =
7697{
7698 0, 162, 165, 163, 163, 164, 166, 167, 167, 167,
7699 168, 168, 169, 170, 171, 172, 173, 174, 175, 174,
7700 176, 176, 176, 177, 178, 177, 179, 180, 181, 182,
7701 182, 182, 182, 182, 182, 182, 182, 182, 182, 182,
7702 182, 182, 183, 182, 182, 182, 182, 182, 184, 185,
7703 186, 186, 186, 186, 186, 186, 186, 186, 185, 187,
7704 187, 185, 188, 188, 189, 189, 188, 190, 190, 190,
7705 191, 191, 191, 191, 191, 192, 191, 193, 191, 191,
7706 194, 195, 196, 197, 198, 199, 199, 200, 201, 202,
7707 203, 203, 204, 205, 206, 206, 207, 208, 208, 208,
7708 209, 209, 209, 209, 209, 209, 209, 209, 209, 209,
7709 209, 209, 210, 210, 211, 211, 212, 212, 212, 213,
7710 213, 212, 212, 212, 212, 212, 212, 212, 214, 214,
7711 215, 215, 216, 216, 216, 216, 216, 216, 216, 216,
7712 216, 217, 217, 217, 217, 217, 217, 217, 217, 217,
7713 218, 218, 219, 219, 219, 220, 220, 220, 220, 220,
7714 221, 221, 222, 223, 222, 224, 224, 224, 224, 224,
7715 224, 224, 224, 224, 224, 224, 224, 224, 224, 224,
7716 224, 224, 224, 224, 224, 224, 224, 224, 224, 224,
7717 224, 224, 224, 224, 224, 225, 225, 225, 225, 225,
7718 225, 225, 225, 225, 225, 225, 225, 225, 225, 225,
7719 225, 225, 225, 225, 225, 225, 225, 225, 225, 225,
7720 225, 225, 225, 225, 225, 225, 225, 225, 225, 225,
7721 225, 225, 225, 225, 225, 225, 226, 227, 228, 228,
7722 228, 228, 228, 228, 228, 228, 227, 229, 229, 229,
7723 229, 229, 229, 227, 227, 227, 227, 227, 227, 227,
7724 227, 227, 227, 227, 227, 227, 227, 227, 227, 227,
7725 227, 227, 227, 227, 227, 227, 227, 227, 227, 227,
7726 230, 230, 227, 227, 227, 231, 232, 232, 232, 233,
7727 233, 233, 233, 234, 234, 235, 236, 237, 238, 239,
7728 240, 240, 240, 240, 241, 241, 242, 242, 242, 243,
7729 243, 244, 244, 244, 244, 244, 245, 246, 246, 246,
7730 246, 246, 246, 247, 248, 249, 249, 250, 250, 251,
7731 251, 251, 251, 252, 252, 253, 253, 254, 254, 254,
7732 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
7733 255, 256, 255, 257, 255, 255, 255, 255, 255, 255,
7734 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
7735 255, 255, 255, 255, 255, 258, 255, 259, 255, 255,
7736 260, 261, 255, 262, 255, 263, 255, 264, 255, 265,
7737 255, 266, 255, 255, 255, 255, 255, 267, 268, 269,
7738 270, 271, 272, 273, 274, 275, 276, 277, 278, 279,
7739 280, 281, 282, 283, 284, 285, 286, 286, 287, 288,
7740 289, 290, 291, 292, 292, 292, 293, 293, 294, 294,
7741 295, 295, 296, 296, 297, 297, 298, 298, 299, 299,
7742 299, 299, 299, 300, 300, 301, 301, 302, 303, 304,
7743 304, 305, 305, 306, 306, 306, 306, 307, 308, 309,
7744 310, 310, 311, 311, 312, 312, 312, 312, 312, 312,
7745 312, 312, 312, 312, 312, 312, 312, 312, 312, 313,
7746 313, 314, 315, 315, 316, 316, 317, 317, 318, 318,
7747 319, 320, 321, 322, 323, 324, 325, 325, 326, 327,
7748 326, 328, 329, 329, 329, 329, 329, 330, 330, 330,
7749 330, 330, 330, 330, 330, 331, 331, 332, 333, 334,
7750 335, 336, 336, 336, 336, 337, 338, 338, 339, 340,
7751 341, 342, 343, 344, 344, 345, 345, 345, 346, 346,
7752 346, 346, 346, 346, 347, 348, 348, 349, 350, 350,
7753 351, 352, 353, 353, 353, 353, 353, 353, 353, 353,
7754 353, 353, 353, 353, 353, 354, 353, 353, 353, 355,
7755 355, 355, 355, 355, 355, 356, 356, 357, 357, 358,
7756 359, 359, 360, 360, 361, 362, 362, 362, 362, 363,
7757 363, 364, 364, 365, 365, 366, 366, 367, 368, 368,
7758 369, 370, 370, 370, 370, 370, 370, 369, 369, 369,
7759 369, 371, 371, 371, 371, 371, 371, 371, 371, 371,
7760 371, 372, 373, 373, 374, 375, 375, 375, 376, 376,
7761 377, 377, 377, 378, 378, 379, 379, 380, 380, 381,
7762 382, 382, 382, 383, 384, 385, 386, 386, 387, 388,
7763 389, 389, 390, 390, 391, 392, 393, 393, 394, 395,
7764 396, 397, 398, 398, 399, 399, 400, 400, 401, 401,
7765 402, 402, 403, 404, 403, 405, 406, 407, 408, 403,
7766 409, 409, 410, 410, 411, 411, 412, 413, 413, 414,
7767 415, 415, 416, 416, 416, 416, 417, 417, 417, 418,
7768 418, 418, 419, 419, 419, 419, 419, 419, 419, 420,
7769 420, 421, 421, 422, 422, 423, 424, 424, 425, 425,
7770 426, 427, 428, 427, 429, 429, 430, 430, 431, 431,
7771 431, 431, 432, 432, 433, 434, 434, 435, 435, 436,
7772 436, 436, 436, 436, 436, 436, 436, 436, 436, 436,
7773 436, 436, 436, 436, 437, 438, 438, 438, 438, 439,
7774 439, 440, 441, 441, 442, 442, 443, 444, 444, 445,
7775 446, 446, 447, 447, 448, 448, 449, 449, 450, 450,
7776 451, 451, 452, 453, 454, 455, 454, 456, 456, 457,
7777 457, 458, 458, 458, 458, 458, 458, 459, 459, 459,
7778 459, 460, 460, 460, 461, 461, 462, 462, 463, 463,
7779 464, 465, 466, 467, 467, 468, 468, 469, 469, 470
7780};
7781
7782/* YYR2[RULE-NUM] -- Number of symbols on the right-hand side of rule RULE-NUM. */
7783static const yytype_int8 yyr2[] =
7784{
7785 0, 2, 0, 0, 1, 2, 2, 1, 1, 3,
7786 1, 2, 1, 3, 2, 0, 0, 8, 0, 5,
7787 1, 1, 3, 1, 0, 3, 0, 2, 0, 4,
7788 3, 3, 3, 2, 3, 3, 3, 3, 4, 5,
7789 1, 4, 4, 1, 7, 4, 1, 1, 4, 1,
7790 4, 7, 6, 6, 6, 6, 5, 4, 1, 4,
7791 4, 1, 1, 4, 0, 1, 3, 1, 4, 1,
7792 1, 3, 3, 3, 2, 0, 7, 0, 7, 1,
7793 1, 2, 0, 5, 1, 1, 1, 0, 0, 4,
7794 1, 1, 1, 1, 1, 4, 3, 1, 1, 1,
7795 2, 3, 4, 5, 4, 5, 6, 2, 2, 2,
7796 2, 2, 1, 3, 1, 3, 1, 2, 3, 1,
7797 3, 5, 2, 4, 2, 4, 1, 3, 1, 3,
7798 2, 3, 1, 1, 4, 3, 3, 3, 3, 2,
7799 1, 1, 1, 4, 3, 3, 3, 3, 2, 1,
7800 1, 1, 2, 1, 3, 1, 1, 1, 1, 1,
7801 1, 1, 1, 0, 4, 1, 1, 1, 1, 1,
7802 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
7803 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
7804 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
7805 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
7806 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
7807 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
7808 1, 1, 1, 1, 1, 1, 4, 1, 4, 7,
7809 6, 6, 6, 6, 5, 4, 1, 3, 3, 2,
7810 2, 2, 2, 1, 3, 3, 3, 3, 3, 3,
7811 4, 2, 2, 3, 3, 3, 3, 1, 3, 3,
7812 3, 3, 3, 2, 2, 3, 3, 3, 3, 4,
7813 4, 4, 1, 1, 1, 6, 1, 4, 3, 1,
7814 1, 1, 1, 3, 3, 1, 1, 1, 1, 1,
7815 1, 2, 4, 2, 1, 4, 3, 5, 3, 1,
7816 1, 1, 1, 2, 4, 2, 1, 1, 1, 2,
7817 2, 4, 1, 0, 2, 2, 1, 2, 1, 1,
7818 1, 3, 3, 2, 1, 1, 1, 3, 4, 2,
7819 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
7820 1, 0, 4, 0, 4, 3, 3, 2, 3, 3,
7821 1, 4, 3, 1, 6, 4, 3, 2, 1, 2,
7822 1, 6, 6, 4, 4, 0, 6, 0, 5, 5,
7823 0, 0, 9, 0, 6, 0, 7, 0, 5, 0,
7824 5, 0, 5, 1, 1, 1, 1, 1, 1, 1,
7825 1, 1, 2, 2, 1, 2, 1, 1, 1, 1,
7826 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
7827 1, 1, 1, 1, 1, 2, 1, 1, 1, 5,
7828 1, 2, 1, 1, 1, 3, 1, 3, 1, 3,
7829 5, 1, 3, 2, 1, 1, 1, 0, 2, 2,
7830 1, 1, 3, 4, 2, 2, 1, 1, 1, 3,
7831 1, 3, 2, 0, 6, 8, 4, 6, 4, 2,
7832 6, 2, 4, 6, 2, 4, 2, 4, 1, 1,
7833 1, 4, 0, 1, 1, 4, 1, 3, 1, 1,
7834 0, 0, 0, 0, 0, 9, 4, 1, 3, 0,
7835 4, 3, 2, 4, 5, 5, 3, 2, 4, 4,
7836 3, 3, 2, 1, 4, 3, 3, 0, 7, 0,
7837 7, 1, 2, 3, 4, 5, 1, 1, 0, 0,
7838 0, 0, 9, 1, 1, 1, 3, 3, 1, 2,
7839 3, 1, 1, 1, 1, 3, 1, 0, 4, 1,
7840 2, 2, 1, 1, 4, 4, 4, 3, 4, 4,
7841 4, 3, 3, 3, 2, 0, 6, 2, 4, 1,
7842 1, 2, 2, 4, 1, 2, 3, 1, 3, 5,
7843 2, 1, 1, 3, 1, 3, 1, 2, 1, 1,
7844 3, 2, 1, 1, 3, 2, 1, 2, 1, 1,
7845 1, 3, 3, 2, 2, 2, 2, 1, 1, 1,
7846 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
7847 1, 1, 2, 2, 4, 2, 3, 1, 6, 1,
7848 1, 1, 1, 2, 1, 3, 1, 1, 1, 1,
7849 1, 1, 2, 3, 3, 3, 1, 2, 4, 1,
7850 0, 3, 1, 2, 4, 1, 0, 3, 4, 1,
7851 4, 1, 0, 3, 0, 3, 0, 2, 0, 2,
7852 0, 2, 1, 0, 3, 0, 0, 0, 0, 7,
7853 1, 1, 1, 1, 1, 1, 2, 1, 1, 3,
7854 1, 2, 1, 1, 1, 1, 1, 1, 1, 1,
7855 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
7856 1, 1, 1, 1, 1, 0, 4, 1, 1, 1,
7857 3, 1, 0, 3, 2, 1, 1, 3, 4, 2,
7858 2, 1, 1, 1, 3, 1, 3, 2, 0, 6,
7859 8, 4, 6, 4, 6, 2, 4, 6, 2, 4,
7860 2, 4, 1, 0, 1, 1, 1, 1, 1, 1,
7861 1, 1, 1, 3, 1, 3, 1, 1, 1, 1,
7862 2, 1, 1, 1, 2, 1, 1, 1, 2, 1,
7863 2, 1, 1, 1, 1, 0, 4, 1, 2, 1,
7864 3, 3, 2, 1, 4, 2, 1, 1, 1, 1,
7865 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
7866 2, 2, 2, 1, 1, 1, 1, 1, 2, 0
7867};
7868
7869
7870enum { YYENOMEM = -2 };
7871
7872#define yyerrok (yyerrstatus = 0)
7873#define yyclearin (yychar = YYEMPTY)
7874
7875#define YYACCEPT goto yyacceptlab
7876#define YYABORT goto yyabortlab
7877#define YYERROR goto yyerrorlab
7878#define YYNOMEM goto yyexhaustedlab
7879
7880
7881#define YYRECOVERING() (!!yyerrstatus)
7882
7883#define YYBACKUP(Token, Value) \
7884 do \
7885 if (yychar == YYEMPTY) \
7886 { \
7887 yychar = (Token); \
7888 yylval = (Value); \
7889 YYPOPSTACK (yylen); \
7890 yystate = *yyssp; \
7891 goto yybackup; \
7892 } \
7893 else \
7894 { \
7895 yyerror (&yylloc, p, YY_("syntax error: cannot back up")); \
7896 YYERROR; \
7897 } \
7898 while (0)
7899
7900/* Backward compatibility with an undocumented macro.
7901 Use YYerror or YYUNDEF. */
7902#define YYERRCODE YYUNDEF
7903
7904/* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
7905 If N is 0, then set CURRENT to the empty location which ends
7906 the previous symbol: RHS[0] (always defined). */
7907
7908#ifndef YYLLOC_DEFAULT
7909# define YYLLOC_DEFAULT(Current, Rhs, N) \
7910 do \
7911 if (N) \
7912 { \
7913 (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \
7914 (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \
7915 (Current).last_line = YYRHSLOC (Rhs, N).last_line; \
7916 (Current).last_column = YYRHSLOC (Rhs, N).last_column; \
7917 } \
7918 else \
7919 { \
7920 (Current).first_line = (Current).last_line = \
7921 YYRHSLOC (Rhs, 0).last_line; \
7922 (Current).first_column = (Current).last_column = \
7923 YYRHSLOC (Rhs, 0).last_column; \
7924 } \
7925 while (0)
7926#endif
7927
7928#define YYRHSLOC(Rhs, K) ((Rhs)[K])
7929
7930
7931/* Enable debugging if requested. */
7932#if YYDEBUG
7933
7934# ifndef YYFPRINTF
7935# include <stdio.h> /* INFRINGES ON USER NAME SPACE */
7936# define YYFPRINTF fprintf
7937# endif
7938
7939# define YYDPRINTF(Args) \
7940do { \
7941 if (yydebug) \
7942 YYFPRINTF Args; \
7943} while (0)
7944
7945
7946/* YYLOCATION_PRINT -- Print the location on the stream.
7947 This macro was not mandated originally: define only if we know
7948 we won't break user code: when these are the locations we know. */
7949
7950# ifndef YYLOCATION_PRINT
7951
7952# if defined YY_LOCATION_PRINT
7953
7954 /* Temporary convenience wrapper in case some people defined the
7955 undocumented and private YY_LOCATION_PRINT macros. */
7956# define YYLOCATION_PRINT(File, Loc, p) YY_LOCATION_PRINT(File, *(Loc), p)
7957
7958# elif defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL
7959
7960/* Print *YYLOCP on YYO. Private, do not rely on its existence. */
7961
7962YY_ATTRIBUTE_UNUSED
7963static int
7964yy_location_print_ (FILE *yyo, YYLTYPE const * const yylocp)
7965{
7966 int res = 0;
7967 int end_col = 0 != yylocp->last_column ? yylocp->last_column - 1 : 0;
7968 if (0 <= yylocp->first_line)
7969 {
7970 res += YYFPRINTF (yyo, "%d", yylocp->first_line);
7971 if (0 <= yylocp->first_column)
7972 res += YYFPRINTF (yyo, ".%d", yylocp->first_column);
7973 }
7974 if (0 <= yylocp->last_line)
7975 {
7976 if (yylocp->first_line < yylocp->last_line)
7977 {
7978 res += YYFPRINTF (yyo, "-%d", yylocp->last_line);
7979 if (0 <= end_col)
7980 res += YYFPRINTF (yyo, ".%d", end_col);
7981 }
7982 else if (0 <= end_col && yylocp->first_column < end_col)
7983 res += YYFPRINTF (yyo, "-%d", end_col);
7984 }
7985 return res;
7986}
7987
7988# define YYLOCATION_PRINT yy_location_print_
7989
7990 /* Temporary convenience wrapper in case some people defined the
7991 undocumented and private YY_LOCATION_PRINT macros. */
7992# define YY_LOCATION_PRINT(File, Loc, p) YYLOCATION_PRINT(File, &(Loc), p)
7993
7994# else
7995
7996# define YYLOCATION_PRINT(File, Loc, p) ((void) 0)
7997 /* Temporary convenience wrapper in case some people defined the
7998 undocumented and private YY_LOCATION_PRINT macros. */
7999# define YY_LOCATION_PRINT YYLOCATION_PRINT
8000
8001# endif
8002# endif /* !defined YYLOCATION_PRINT */
8003
8004
8005# define YY_SYMBOL_PRINT(Title, Kind, Value, Location, p) \
8006do { \
8007 if (yydebug) \
8008 { \
8009 YYFPRINTF (stderr, "%s ", Title); \
8010 yy_symbol_print (stderr, \
8011 Kind, Value, Location, p); \
8012 YYFPRINTF (stderr, "\n"); \
8013 } \
8014} while (0)
8015
8016
8017/*-----------------------------------.
8018| Print this symbol's value on YYO. |
8019`-----------------------------------*/
8020
8021static void
8022yy_symbol_value_print (FILE *yyo,
8023 yysymbol_kind_t yykind, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp, struct parser_params *p)
8024{
8025 FILE *yyoutput = yyo;
8026 YY_USE (yyoutput);
8027 YY_USE (yylocationp);
8028 YY_USE (p);
8029 if (!yyvaluep)
8030 return;
8031 YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
8032switch (yykind)
8033 {
8034 case YYSYMBOL_keyword_class: /* "'class'" */
8035#line 2636 "parse.y"
8036 {
8037 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8038}
8039#line 8040 "parse.c"
8040 break;
8041
8042 case YYSYMBOL_keyword_module: /* "'module'" */
8043#line 2636 "parse.y"
8044 {
8045 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8046}
8047#line 8048 "parse.c"
8048 break;
8049
8050 case YYSYMBOL_keyword_def: /* "'def'" */
8051#line 2636 "parse.y"
8052 {
8053 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8054}
8055#line 8056 "parse.c"
8056 break;
8057
8058 case YYSYMBOL_keyword_undef: /* "'undef'" */
8059#line 2636 "parse.y"
8060 {
8061 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8062}
8063#line 8064 "parse.c"
8064 break;
8065
8066 case YYSYMBOL_keyword_begin: /* "'begin'" */
8067#line 2636 "parse.y"
8068 {
8069 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8070}
8071#line 8072 "parse.c"
8072 break;
8073
8074 case YYSYMBOL_keyword_rescue: /* "'rescue'" */
8075#line 2636 "parse.y"
8076 {
8077 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8078}
8079#line 8080 "parse.c"
8080 break;
8081
8082 case YYSYMBOL_keyword_ensure: /* "'ensure'" */
8083#line 2636 "parse.y"
8084 {
8085 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8086}
8087#line 8088 "parse.c"
8088 break;
8089
8090 case YYSYMBOL_keyword_end: /* "'end'" */
8091#line 2636 "parse.y"
8092 {
8093 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8094}
8095#line 8096 "parse.c"
8096 break;
8097
8098 case YYSYMBOL_keyword_if: /* "'if'" */
8099#line 2636 "parse.y"
8100 {
8101 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8102}
8103#line 8104 "parse.c"
8104 break;
8105
8106 case YYSYMBOL_keyword_unless: /* "'unless'" */
8107#line 2636 "parse.y"
8108 {
8109 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8110}
8111#line 8112 "parse.c"
8112 break;
8113
8114 case YYSYMBOL_keyword_then: /* "'then'" */
8115#line 2636 "parse.y"
8116 {
8117 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8118}
8119#line 8120 "parse.c"
8120 break;
8121
8122 case YYSYMBOL_keyword_elsif: /* "'elsif'" */
8123#line 2636 "parse.y"
8124 {
8125 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8126}
8127#line 8128 "parse.c"
8128 break;
8129
8130 case YYSYMBOL_keyword_else: /* "'else'" */
8131#line 2636 "parse.y"
8132 {
8133 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8134}
8135#line 8136 "parse.c"
8136 break;
8137
8138 case YYSYMBOL_keyword_case: /* "'case'" */
8139#line 2636 "parse.y"
8140 {
8141 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8142}
8143#line 8144 "parse.c"
8144 break;
8145
8146 case YYSYMBOL_keyword_when: /* "'when'" */
8147#line 2636 "parse.y"
8148 {
8149 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8150}
8151#line 8152 "parse.c"
8152 break;
8153
8154 case YYSYMBOL_keyword_while: /* "'while'" */
8155#line 2636 "parse.y"
8156 {
8157 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8158}
8159#line 8160 "parse.c"
8160 break;
8161
8162 case YYSYMBOL_keyword_until: /* "'until'" */
8163#line 2636 "parse.y"
8164 {
8165 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8166}
8167#line 8168 "parse.c"
8168 break;
8169
8170 case YYSYMBOL_keyword_for: /* "'for'" */
8171#line 2636 "parse.y"
8172 {
8173 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8174}
8175#line 8176 "parse.c"
8176 break;
8177
8178 case YYSYMBOL_keyword_break: /* "'break'" */
8179#line 2636 "parse.y"
8180 {
8181 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8182}
8183#line 8184 "parse.c"
8184 break;
8185
8186 case YYSYMBOL_keyword_next: /* "'next'" */
8187#line 2636 "parse.y"
8188 {
8189 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8190}
8191#line 8192 "parse.c"
8192 break;
8193
8194 case YYSYMBOL_keyword_redo: /* "'redo'" */
8195#line 2636 "parse.y"
8196 {
8197 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8198}
8199#line 8200 "parse.c"
8200 break;
8201
8202 case YYSYMBOL_keyword_retry: /* "'retry'" */
8203#line 2636 "parse.y"
8204 {
8205 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8206}
8207#line 8208 "parse.c"
8208 break;
8209
8210 case YYSYMBOL_keyword_in: /* "'in'" */
8211#line 2636 "parse.y"
8212 {
8213 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8214}
8215#line 8216 "parse.c"
8216 break;
8217
8218 case YYSYMBOL_keyword_do: /* "'do'" */
8219#line 2636 "parse.y"
8220 {
8221 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8222}
8223#line 8224 "parse.c"
8224 break;
8225
8226 case YYSYMBOL_keyword_do_cond: /* "'do' for condition" */
8227#line 2636 "parse.y"
8228 {
8229 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8230}
8231#line 8232 "parse.c"
8232 break;
8233
8234 case YYSYMBOL_keyword_do_block: /* "'do' for block" */
8235#line 2636 "parse.y"
8236 {
8237 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8238}
8239#line 8240 "parse.c"
8240 break;
8241
8242 case YYSYMBOL_keyword_do_LAMBDA: /* "'do' for lambda" */
8243#line 2636 "parse.y"
8244 {
8245 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8246}
8247#line 8248 "parse.c"
8248 break;
8249
8250 case YYSYMBOL_keyword_return: /* "'return'" */
8251#line 2636 "parse.y"
8252 {
8253 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8254}
8255#line 8256 "parse.c"
8256 break;
8257
8258 case YYSYMBOL_keyword_yield: /* "'yield'" */
8259#line 2636 "parse.y"
8260 {
8261 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8262}
8263#line 8264 "parse.c"
8264 break;
8265
8266 case YYSYMBOL_keyword_super: /* "'super'" */
8267#line 2636 "parse.y"
8268 {
8269 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8270}
8271#line 8272 "parse.c"
8272 break;
8273
8274 case YYSYMBOL_keyword_self: /* "'self'" */
8275#line 2636 "parse.y"
8276 {
8277 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8278}
8279#line 8280 "parse.c"
8280 break;
8281
8282 case YYSYMBOL_keyword_nil: /* "'nil'" */
8283#line 2636 "parse.y"
8284 {
8285 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8286}
8287#line 8288 "parse.c"
8288 break;
8289
8290 case YYSYMBOL_keyword_true: /* "'true'" */
8291#line 2636 "parse.y"
8292 {
8293 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8294}
8295#line 8296 "parse.c"
8296 break;
8297
8298 case YYSYMBOL_keyword_false: /* "'false'" */
8299#line 2636 "parse.y"
8300 {
8301 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8302}
8303#line 8304 "parse.c"
8304 break;
8305
8306 case YYSYMBOL_keyword_and: /* "'and'" */
8307#line 2636 "parse.y"
8308 {
8309 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8310}
8311#line 8312 "parse.c"
8312 break;
8313
8314 case YYSYMBOL_keyword_or: /* "'or'" */
8315#line 2636 "parse.y"
8316 {
8317 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8318}
8319#line 8320 "parse.c"
8320 break;
8321
8322 case YYSYMBOL_keyword_not: /* "'not'" */
8323#line 2636 "parse.y"
8324 {
8325 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8326}
8327#line 8328 "parse.c"
8328 break;
8329
8330 case YYSYMBOL_modifier_if: /* "'if' modifier" */
8331#line 2636 "parse.y"
8332 {
8333 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8334}
8335#line 8336 "parse.c"
8336 break;
8337
8338 case YYSYMBOL_modifier_unless: /* "'unless' modifier" */
8339#line 2636 "parse.y"
8340 {
8341 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8342}
8343#line 8344 "parse.c"
8344 break;
8345
8346 case YYSYMBOL_modifier_while: /* "'while' modifier" */
8347#line 2636 "parse.y"
8348 {
8349 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8350}
8351#line 8352 "parse.c"
8352 break;
8353
8354 case YYSYMBOL_modifier_until: /* "'until' modifier" */
8355#line 2636 "parse.y"
8356 {
8357 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8358}
8359#line 8360 "parse.c"
8360 break;
8361
8362 case YYSYMBOL_modifier_rescue: /* "'rescue' modifier" */
8363#line 2636 "parse.y"
8364 {
8365 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8366}
8367#line 8368 "parse.c"
8368 break;
8369
8370 case YYSYMBOL_keyword_alias: /* "'alias'" */
8371#line 2636 "parse.y"
8372 {
8373 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8374}
8375#line 8376 "parse.c"
8376 break;
8377
8378 case YYSYMBOL_keyword_defined: /* "'defined?'" */
8379#line 2636 "parse.y"
8380 {
8381 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8382}
8383#line 8384 "parse.c"
8384 break;
8385
8386 case YYSYMBOL_keyword_BEGIN: /* "'BEGIN'" */
8387#line 2636 "parse.y"
8388 {
8389 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8390}
8391#line 8392 "parse.c"
8392 break;
8393
8394 case YYSYMBOL_keyword_END: /* "'END'" */
8395#line 2636 "parse.y"
8396 {
8397 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8398}
8399#line 8400 "parse.c"
8400 break;
8401
8402 case YYSYMBOL_keyword__LINE__: /* "'__LINE__'" */
8403#line 2636 "parse.y"
8404 {
8405 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8406}
8407#line 8408 "parse.c"
8408 break;
8409
8410 case YYSYMBOL_keyword__FILE__: /* "'__FILE__'" */
8411#line 2636 "parse.y"
8412 {
8413 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8414}
8415#line 8416 "parse.c"
8416 break;
8417
8418 case YYSYMBOL_keyword__ENCODING__: /* "'__ENCODING__'" */
8419#line 2636 "parse.y"
8420 {
8421 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8422}
8423#line 8424 "parse.c"
8424 break;
8425
8426 case YYSYMBOL_tIDENTIFIER: /* "local variable or method" */
8427#line 2636 "parse.y"
8428 {
8429 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8430}
8431#line 8432 "parse.c"
8432 break;
8433
8434 case YYSYMBOL_tFID: /* "method" */
8435#line 2636 "parse.y"
8436 {
8437 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8438}
8439#line 8440 "parse.c"
8440 break;
8441
8442 case YYSYMBOL_tGVAR: /* "global variable" */
8443#line 2636 "parse.y"
8444 {
8445 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8446}
8447#line 8448 "parse.c"
8448 break;
8449
8450 case YYSYMBOL_tIVAR: /* "instance variable" */
8451#line 2636 "parse.y"
8452 {
8453 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8454}
8455#line 8456 "parse.c"
8456 break;
8457
8458 case YYSYMBOL_tCONSTANT: /* "constant" */
8459#line 2636 "parse.y"
8460 {
8461 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8462}
8463#line 8464 "parse.c"
8464 break;
8465
8466 case YYSYMBOL_tCVAR: /* "class variable" */
8467#line 2636 "parse.y"
8468 {
8469 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8470}
8471#line 8472 "parse.c"
8472 break;
8473
8474 case YYSYMBOL_tLABEL: /* "label" */
8475#line 2636 "parse.y"
8476 {
8477 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8478}
8479#line 8480 "parse.c"
8480 break;
8481
8482 case YYSYMBOL_tINTEGER: /* "integer literal" */
8483#line 2639 "parse.y"
8484 {
8485 switch (nd_type(RNODE(((*yyvaluep).node)))) {
8486 case NODE_INTEGER:
8487 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_integer_literal_val(((*yyvaluep).node)));
8488 break;
8489 case NODE_FLOAT:
8490 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_float_literal_val(((*yyvaluep).node)));
8491 break;
8492 case NODE_RATIONAL:
8493 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_rational_literal_val(((*yyvaluep).node)));
8494 break;
8495 case NODE_IMAGINARY:
8496 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_imaginary_literal_val(((*yyvaluep).node)));
8497 break;
8498 default:
8499 break;
8500 }
8501}
8502#line 8503 "parse.c"
8503 break;
8504
8505 case YYSYMBOL_tFLOAT: /* "float literal" */
8506#line 2639 "parse.y"
8507 {
8508 switch (nd_type(RNODE(((*yyvaluep).node)))) {
8509 case NODE_INTEGER:
8510 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_integer_literal_val(((*yyvaluep).node)));
8511 break;
8512 case NODE_FLOAT:
8513 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_float_literal_val(((*yyvaluep).node)));
8514 break;
8515 case NODE_RATIONAL:
8516 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_rational_literal_val(((*yyvaluep).node)));
8517 break;
8518 case NODE_IMAGINARY:
8519 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_imaginary_literal_val(((*yyvaluep).node)));
8520 break;
8521 default:
8522 break;
8523 }
8524}
8525#line 8526 "parse.c"
8526 break;
8527
8528 case YYSYMBOL_tRATIONAL: /* "rational literal" */
8529#line 2639 "parse.y"
8530 {
8531 switch (nd_type(RNODE(((*yyvaluep).node)))) {
8532 case NODE_INTEGER:
8533 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_integer_literal_val(((*yyvaluep).node)));
8534 break;
8535 case NODE_FLOAT:
8536 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_float_literal_val(((*yyvaluep).node)));
8537 break;
8538 case NODE_RATIONAL:
8539 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_rational_literal_val(((*yyvaluep).node)));
8540 break;
8541 case NODE_IMAGINARY:
8542 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_imaginary_literal_val(((*yyvaluep).node)));
8543 break;
8544 default:
8545 break;
8546 }
8547}
8548#line 8549 "parse.c"
8549 break;
8550
8551 case YYSYMBOL_tIMAGINARY: /* "imaginary literal" */
8552#line 2639 "parse.y"
8553 {
8554 switch (nd_type(RNODE(((*yyvaluep).node)))) {
8555 case NODE_INTEGER:
8556 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_integer_literal_val(((*yyvaluep).node)));
8557 break;
8558 case NODE_FLOAT:
8559 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_float_literal_val(((*yyvaluep).node)));
8560 break;
8561 case NODE_RATIONAL:
8562 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_rational_literal_val(((*yyvaluep).node)));
8563 break;
8564 case NODE_IMAGINARY:
8565 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_imaginary_literal_val(((*yyvaluep).node)));
8566 break;
8567 default:
8568 break;
8569 }
8570}
8571#line 8572 "parse.c"
8572 break;
8573
8574 case YYSYMBOL_tCHAR: /* "char literal" */
8575#line 2639 "parse.y"
8576 {
8577 switch (nd_type(RNODE(((*yyvaluep).node)))) {
8578 case NODE_INTEGER:
8579 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_integer_literal_val(((*yyvaluep).node)));
8580 break;
8581 case NODE_FLOAT:
8582 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_float_literal_val(((*yyvaluep).node)));
8583 break;
8584 case NODE_RATIONAL:
8585 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_rational_literal_val(((*yyvaluep).node)));
8586 break;
8587 case NODE_IMAGINARY:
8588 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_imaginary_literal_val(((*yyvaluep).node)));
8589 break;
8590 default:
8591 break;
8592 }
8593}
8594#line 8595 "parse.c"
8595 break;
8596
8597 case YYSYMBOL_tNTH_REF: /* "numbered reference" */
8598#line 2657 "parse.y"
8599 {
8600 rb_parser_printf(p, "$%ld", RNODE_NTH_REF(((*yyvaluep).node))->nd_nth);
8601}
8602#line 8603 "parse.c"
8603 break;
8604
8605 case YYSYMBOL_tBACK_REF: /* "back reference" */
8606#line 2660 "parse.y"
8607 {
8608 rb_parser_printf(p, "$%c", (int)RNODE_BACK_REF(((*yyvaluep).node))->nd_nth);
8609}
8610#line 8611 "parse.c"
8611 break;
8612
8613 case YYSYMBOL_tSTRING_CONTENT: /* "literal content" */
8614#line 2639 "parse.y"
8615 {
8616 switch (nd_type(RNODE(((*yyvaluep).node)))) {
8617 case NODE_INTEGER:
8618 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_integer_literal_val(((*yyvaluep).node)));
8619 break;
8620 case NODE_FLOAT:
8621 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_float_literal_val(((*yyvaluep).node)));
8622 break;
8623 case NODE_RATIONAL:
8624 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_rational_literal_val(((*yyvaluep).node)));
8625 break;
8626 case NODE_IMAGINARY:
8627 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_imaginary_literal_val(((*yyvaluep).node)));
8628 break;
8629 default:
8630 break;
8631 }
8632}
8633#line 8634 "parse.c"
8634 break;
8635
8636 case YYSYMBOL_69_: /* '.' */
8637#line 2636 "parse.y"
8638 {
8639 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8640}
8641#line 8642 "parse.c"
8642 break;
8643
8644 case YYSYMBOL_70_backslash_: /* "backslash" */
8645#line 2636 "parse.y"
8646 {
8647 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8648}
8649#line 8650 "parse.c"
8650 break;
8651
8652 case YYSYMBOL_72_escaped_horizontal_tab_: /* "escaped horizontal tab" */
8653#line 2636 "parse.y"
8654 {
8655 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8656}
8657#line 8658 "parse.c"
8658 break;
8659
8660 case YYSYMBOL_73_escaped_form_feed_: /* "escaped form feed" */
8661#line 2636 "parse.y"
8662 {
8663 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8664}
8665#line 8666 "parse.c"
8666 break;
8667
8668 case YYSYMBOL_74_escaped_carriage_return_: /* "escaped carriage return" */
8669#line 2636 "parse.y"
8670 {
8671 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8672}
8673#line 8674 "parse.c"
8674 break;
8675
8676 case YYSYMBOL_75_escaped_vertical_tab_: /* "escaped vertical tab" */
8677#line 2636 "parse.y"
8678 {
8679 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8680}
8681#line 8682 "parse.c"
8682 break;
8683
8684 case YYSYMBOL_tANDDOT: /* "&." */
8685#line 2636 "parse.y"
8686 {
8687 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8688}
8689#line 8690 "parse.c"
8690 break;
8691
8692 case YYSYMBOL_tCOLON2: /* "::" */
8693#line 2636 "parse.y"
8694 {
8695 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8696}
8697#line 8698 "parse.c"
8698 break;
8699
8700 case YYSYMBOL_tOP_ASGN: /* "operator-assignment" */
8701#line 2636 "parse.y"
8702 {
8703 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8704}
8705#line 8706 "parse.c"
8706 break;
8707
8708 case YYSYMBOL_compstmt_top_stmts: /* compstmt_top_stmts */
8709#line 2627 "parse.y"
8710 {
8711 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8712 rb_parser_printf(p, "NODE_SPECIAL");
8713 }
8714 else if (((*yyvaluep).node)) {
8715 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8716 }
8717}
8718#line 8719 "parse.c"
8719 break;
8720
8721 case YYSYMBOL_top_stmts: /* top_stmts */
8722#line 2627 "parse.y"
8723 {
8724 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8725 rb_parser_printf(p, "NODE_SPECIAL");
8726 }
8727 else if (((*yyvaluep).node)) {
8728 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8729 }
8730}
8731#line 8732 "parse.c"
8732 break;
8733
8734 case YYSYMBOL_top_stmt: /* top_stmt */
8735#line 2627 "parse.y"
8736 {
8737 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8738 rb_parser_printf(p, "NODE_SPECIAL");
8739 }
8740 else if (((*yyvaluep).node)) {
8741 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8742 }
8743}
8744#line 8745 "parse.c"
8745 break;
8746
8747 case YYSYMBOL_block_open: /* block_open */
8748#line 2627 "parse.y"
8749 {
8750 if ((NODE *)((*yyvaluep).node_exits) == (NODE *)-1) {
8751 rb_parser_printf(p, "NODE_SPECIAL");
8752 }
8753 else if (((*yyvaluep).node_exits)) {
8754 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_exits)))));
8755 }
8756}
8757#line 8758 "parse.c"
8758 break;
8759
8760 case YYSYMBOL_begin_block: /* begin_block */
8761#line 2627 "parse.y"
8762 {
8763 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8764 rb_parser_printf(p, "NODE_SPECIAL");
8765 }
8766 else if (((*yyvaluep).node)) {
8767 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8768 }
8769}
8770#line 8771 "parse.c"
8771 break;
8772
8773 case YYSYMBOL_compstmt_stmts: /* compstmt_stmts */
8774#line 2627 "parse.y"
8775 {
8776 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8777 rb_parser_printf(p, "NODE_SPECIAL");
8778 }
8779 else if (((*yyvaluep).node)) {
8780 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8781 }
8782}
8783#line 8784 "parse.c"
8784 break;
8785
8786 case YYSYMBOL_bodystmt: /* bodystmt */
8787#line 2627 "parse.y"
8788 {
8789 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8790 rb_parser_printf(p, "NODE_SPECIAL");
8791 }
8792 else if (((*yyvaluep).node)) {
8793 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8794 }
8795}
8796#line 8797 "parse.c"
8797 break;
8798
8799 case YYSYMBOL_stmts: /* stmts */
8800#line 2627 "parse.y"
8801 {
8802 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8803 rb_parser_printf(p, "NODE_SPECIAL");
8804 }
8805 else if (((*yyvaluep).node)) {
8806 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8807 }
8808}
8809#line 8810 "parse.c"
8810 break;
8811
8812 case YYSYMBOL_stmt_or_begin: /* stmt_or_begin */
8813#line 2627 "parse.y"
8814 {
8815 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8816 rb_parser_printf(p, "NODE_SPECIAL");
8817 }
8818 else if (((*yyvaluep).node)) {
8819 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8820 }
8821}
8822#line 8823 "parse.c"
8823 break;
8824
8825 case YYSYMBOL_allow_exits: /* allow_exits */
8826#line 2627 "parse.y"
8827 {
8828 if ((NODE *)((*yyvaluep).node_exits) == (NODE *)-1) {
8829 rb_parser_printf(p, "NODE_SPECIAL");
8830 }
8831 else if (((*yyvaluep).node_exits)) {
8832 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_exits)))));
8833 }
8834}
8835#line 8836 "parse.c"
8836 break;
8837
8838 case YYSYMBOL_stmt: /* stmt */
8839#line 2627 "parse.y"
8840 {
8841 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8842 rb_parser_printf(p, "NODE_SPECIAL");
8843 }
8844 else if (((*yyvaluep).node)) {
8845 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8846 }
8847}
8848#line 8849 "parse.c"
8849 break;
8850
8851 case YYSYMBOL_asgn_mrhs: /* asgn_mrhs */
8852#line 2627 "parse.y"
8853 {
8854 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8855 rb_parser_printf(p, "NODE_SPECIAL");
8856 }
8857 else if (((*yyvaluep).node)) {
8858 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8859 }
8860}
8861#line 8862 "parse.c"
8862 break;
8863
8864 case YYSYMBOL_asgn_command_rhs: /* asgn_command_rhs */
8865#line 2627 "parse.y"
8866 {
8867 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8868 rb_parser_printf(p, "NODE_SPECIAL");
8869 }
8870 else if (((*yyvaluep).node)) {
8871 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8872 }
8873}
8874#line 8875 "parse.c"
8875 break;
8876
8877 case YYSYMBOL_command_asgn: /* command_asgn */
8878#line 2627 "parse.y"
8879 {
8880 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8881 rb_parser_printf(p, "NODE_SPECIAL");
8882 }
8883 else if (((*yyvaluep).node)) {
8884 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8885 }
8886}
8887#line 8888 "parse.c"
8888 break;
8889
8890 case YYSYMBOL_op_asgn_command_rhs: /* op_asgn_command_rhs */
8891#line 2627 "parse.y"
8892 {
8893 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8894 rb_parser_printf(p, "NODE_SPECIAL");
8895 }
8896 else if (((*yyvaluep).node)) {
8897 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8898 }
8899}
8900#line 8901 "parse.c"
8901 break;
8902
8903 case YYSYMBOL_def_endless_method_endless_command: /* def_endless_method_endless_command */
8904#line 2627 "parse.y"
8905 {
8906 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8907 rb_parser_printf(p, "NODE_SPECIAL");
8908 }
8909 else if (((*yyvaluep).node)) {
8910 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8911 }
8912}
8913#line 8914 "parse.c"
8914 break;
8915
8916 case YYSYMBOL_endless_command: /* endless_command */
8917#line 2627 "parse.y"
8918 {
8919 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8920 rb_parser_printf(p, "NODE_SPECIAL");
8921 }
8922 else if (((*yyvaluep).node)) {
8923 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8924 }
8925}
8926#line 8927 "parse.c"
8927 break;
8928
8929 case YYSYMBOL_command_rhs: /* command_rhs */
8930#line 2627 "parse.y"
8931 {
8932 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8933 rb_parser_printf(p, "NODE_SPECIAL");
8934 }
8935 else if (((*yyvaluep).node)) {
8936 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8937 }
8938}
8939#line 8940 "parse.c"
8940 break;
8941
8942 case YYSYMBOL_expr: /* expr */
8943#line 2627 "parse.y"
8944 {
8945 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8946 rb_parser_printf(p, "NODE_SPECIAL");
8947 }
8948 else if (((*yyvaluep).node)) {
8949 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8950 }
8951}
8952#line 8953 "parse.c"
8953 break;
8954
8955 case YYSYMBOL_def_name: /* def_name */
8956#line 2636 "parse.y"
8957 {
8958 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8959}
8960#line 8961 "parse.c"
8961 break;
8962
8963 case YYSYMBOL_defn_head: /* defn_head */
8964#line 2627 "parse.y"
8965 {
8966 if ((NODE *)((*yyvaluep).node_def_temp) == (NODE *)-1) {
8967 rb_parser_printf(p, "NODE_SPECIAL");
8968 }
8969 else if (((*yyvaluep).node_def_temp)) {
8970 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_def_temp)))));
8971 }
8972}
8973#line 8974 "parse.c"
8974 break;
8975
8976 case YYSYMBOL_defs_head: /* defs_head */
8977#line 2627 "parse.y"
8978 {
8979 if ((NODE *)((*yyvaluep).node_def_temp) == (NODE *)-1) {
8980 rb_parser_printf(p, "NODE_SPECIAL");
8981 }
8982 else if (((*yyvaluep).node_def_temp)) {
8983 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_def_temp)))));
8984 }
8985}
8986#line 8987 "parse.c"
8987 break;
8988
8989 case YYSYMBOL_value_expr_expr: /* value_expr_expr */
8990#line 2627 "parse.y"
8991 {
8992 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8993 rb_parser_printf(p, "NODE_SPECIAL");
8994 }
8995 else if (((*yyvaluep).node)) {
8996 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8997 }
8998}
8999#line 9000 "parse.c"
9000 break;
9001
9002 case YYSYMBOL_expr_value: /* expr_value */
9003#line 2627 "parse.y"
9004 {
9005 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9006 rb_parser_printf(p, "NODE_SPECIAL");
9007 }
9008 else if (((*yyvaluep).node)) {
9009 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9010 }
9011}
9012#line 9013 "parse.c"
9013 break;
9014
9015 case YYSYMBOL_expr_value_do: /* expr_value_do */
9016#line 2627 "parse.y"
9017 {
9018 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9019 rb_parser_printf(p, "NODE_SPECIAL");
9020 }
9021 else if (((*yyvaluep).node)) {
9022 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9023 }
9024}
9025#line 9026 "parse.c"
9026 break;
9027
9028 case YYSYMBOL_command_call: /* command_call */
9029#line 2627 "parse.y"
9030 {
9031 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9032 rb_parser_printf(p, "NODE_SPECIAL");
9033 }
9034 else if (((*yyvaluep).node)) {
9035 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9036 }
9037}
9038#line 9039 "parse.c"
9039 break;
9040
9041 case YYSYMBOL_value_expr_command_call: /* value_expr_command_call */
9042#line 2627 "parse.y"
9043 {
9044 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9045 rb_parser_printf(p, "NODE_SPECIAL");
9046 }
9047 else if (((*yyvaluep).node)) {
9048 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9049 }
9050}
9051#line 9052 "parse.c"
9052 break;
9053
9054 case YYSYMBOL_command_call_value: /* command_call_value */
9055#line 2627 "parse.y"
9056 {
9057 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9058 rb_parser_printf(p, "NODE_SPECIAL");
9059 }
9060 else if (((*yyvaluep).node)) {
9061 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9062 }
9063}
9064#line 9065 "parse.c"
9065 break;
9066
9067 case YYSYMBOL_block_command: /* block_command */
9068#line 2627 "parse.y"
9069 {
9070 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9071 rb_parser_printf(p, "NODE_SPECIAL");
9072 }
9073 else if (((*yyvaluep).node)) {
9074 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9075 }
9076}
9077#line 9078 "parse.c"
9078 break;
9079
9080 case YYSYMBOL_cmd_brace_block: /* cmd_brace_block */
9081#line 2627 "parse.y"
9082 {
9083 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9084 rb_parser_printf(p, "NODE_SPECIAL");
9085 }
9086 else if (((*yyvaluep).node)) {
9087 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9088 }
9089}
9090#line 9091 "parse.c"
9091 break;
9092
9093 case YYSYMBOL_fcall: /* fcall */
9094#line 2627 "parse.y"
9095 {
9096 if ((NODE *)((*yyvaluep).node_fcall) == (NODE *)-1) {
9097 rb_parser_printf(p, "NODE_SPECIAL");
9098 }
9099 else if (((*yyvaluep).node_fcall)) {
9100 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_fcall)))));
9101 }
9102}
9103#line 9104 "parse.c"
9104 break;
9105
9106 case YYSYMBOL_command: /* command */
9107#line 2627 "parse.y"
9108 {
9109 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9110 rb_parser_printf(p, "NODE_SPECIAL");
9111 }
9112 else if (((*yyvaluep).node)) {
9113 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9114 }
9115}
9116#line 9117 "parse.c"
9117 break;
9118
9119 case YYSYMBOL_mlhs: /* mlhs */
9120#line 2627 "parse.y"
9121 {
9122 if ((NODE *)((*yyvaluep).node_masgn) == (NODE *)-1) {
9123 rb_parser_printf(p, "NODE_SPECIAL");
9124 }
9125 else if (((*yyvaluep).node_masgn)) {
9126 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_masgn)))));
9127 }
9128}
9129#line 9130 "parse.c"
9130 break;
9131
9132 case YYSYMBOL_mlhs_inner: /* mlhs_inner */
9133#line 2627 "parse.y"
9134 {
9135 if ((NODE *)((*yyvaluep).node_masgn) == (NODE *)-1) {
9136 rb_parser_printf(p, "NODE_SPECIAL");
9137 }
9138 else if (((*yyvaluep).node_masgn)) {
9139 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_masgn)))));
9140 }
9141}
9142#line 9143 "parse.c"
9143 break;
9144
9145 case YYSYMBOL_mlhs_basic: /* mlhs_basic */
9146#line 2627 "parse.y"
9147 {
9148 if ((NODE *)((*yyvaluep).node_masgn) == (NODE *)-1) {
9149 rb_parser_printf(p, "NODE_SPECIAL");
9150 }
9151 else if (((*yyvaluep).node_masgn)) {
9152 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_masgn)))));
9153 }
9154}
9155#line 9156 "parse.c"
9156 break;
9157
9158 case YYSYMBOL_mlhs_items_mlhs_item: /* mlhs_items_mlhs_item */
9159#line 2627 "parse.y"
9160 {
9161 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9162 rb_parser_printf(p, "NODE_SPECIAL");
9163 }
9164 else if (((*yyvaluep).node)) {
9165 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9166 }
9167}
9168#line 9169 "parse.c"
9169 break;
9170
9171 case YYSYMBOL_mlhs_item: /* mlhs_item */
9172#line 2627 "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_mlhs_head: /* mlhs_head */
9185#line 2627 "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_mlhs_node: /* mlhs_node */
9198#line 2627 "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_lhs: /* lhs */
9211#line 2627 "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_cname: /* cname */
9224#line 2636 "parse.y"
9225 {
9226 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
9227}
9228#line 9229 "parse.c"
9229 break;
9230
9231 case YYSYMBOL_cpath: /* cpath */
9232#line 2627 "parse.y"
9233 {
9234 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9235 rb_parser_printf(p, "NODE_SPECIAL");
9236 }
9237 else if (((*yyvaluep).node)) {
9238 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9239 }
9240}
9241#line 9242 "parse.c"
9242 break;
9243
9244 case YYSYMBOL_fname: /* fname */
9245#line 2636 "parse.y"
9246 {
9247 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
9248}
9249#line 9250 "parse.c"
9250 break;
9251
9252 case YYSYMBOL_fitem: /* fitem */
9253#line 2627 "parse.y"
9254 {
9255 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9256 rb_parser_printf(p, "NODE_SPECIAL");
9257 }
9258 else if (((*yyvaluep).node)) {
9259 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9260 }
9261}
9262#line 9263 "parse.c"
9263 break;
9264
9265 case YYSYMBOL_undef_list: /* undef_list */
9266#line 2627 "parse.y"
9267 {
9268 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9269 rb_parser_printf(p, "NODE_SPECIAL");
9270 }
9271 else if (((*yyvaluep).node)) {
9272 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9273 }
9274}
9275#line 9276 "parse.c"
9276 break;
9277
9278 case YYSYMBOL_op: /* op */
9279#line 2636 "parse.y"
9280 {
9281 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
9282}
9283#line 9284 "parse.c"
9284 break;
9285
9286 case YYSYMBOL_reswords: /* reswords */
9287#line 2636 "parse.y"
9288 {
9289 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
9290}
9291#line 9292 "parse.c"
9292 break;
9293
9294 case YYSYMBOL_asgn_arg_rhs: /* asgn_arg_rhs */
9295#line 2627 "parse.y"
9296 {
9297 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9298 rb_parser_printf(p, "NODE_SPECIAL");
9299 }
9300 else if (((*yyvaluep).node)) {
9301 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9302 }
9303}
9304#line 9305 "parse.c"
9305 break;
9306
9307 case YYSYMBOL_arg: /* arg */
9308#line 2627 "parse.y"
9309 {
9310 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9311 rb_parser_printf(p, "NODE_SPECIAL");
9312 }
9313 else if (((*yyvaluep).node)) {
9314 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9315 }
9316}
9317#line 9318 "parse.c"
9318 break;
9319
9320 case YYSYMBOL_op_asgn_arg_rhs: /* op_asgn_arg_rhs */
9321#line 2627 "parse.y"
9322 {
9323 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9324 rb_parser_printf(p, "NODE_SPECIAL");
9325 }
9326 else if (((*yyvaluep).node)) {
9327 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9328 }
9329}
9330#line 9331 "parse.c"
9331 break;
9332
9333 case YYSYMBOL_range_expr_arg: /* range_expr_arg */
9334#line 2627 "parse.y"
9335 {
9336 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9337 rb_parser_printf(p, "NODE_SPECIAL");
9338 }
9339 else if (((*yyvaluep).node)) {
9340 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9341 }
9342}
9343#line 9344 "parse.c"
9344 break;
9345
9346 case YYSYMBOL_def_endless_method_endless_arg: /* def_endless_method_endless_arg */
9347#line 2627 "parse.y"
9348 {
9349 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9350 rb_parser_printf(p, "NODE_SPECIAL");
9351 }
9352 else if (((*yyvaluep).node)) {
9353 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9354 }
9355}
9356#line 9357 "parse.c"
9357 break;
9358
9359 case YYSYMBOL_ternary: /* ternary */
9360#line 2627 "parse.y"
9361 {
9362 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9363 rb_parser_printf(p, "NODE_SPECIAL");
9364 }
9365 else if (((*yyvaluep).node)) {
9366 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9367 }
9368}
9369#line 9370 "parse.c"
9370 break;
9371
9372 case YYSYMBOL_endless_arg: /* endless_arg */
9373#line 2627 "parse.y"
9374 {
9375 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9376 rb_parser_printf(p, "NODE_SPECIAL");
9377 }
9378 else if (((*yyvaluep).node)) {
9379 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9380 }
9381}
9382#line 9383 "parse.c"
9383 break;
9384
9385 case YYSYMBOL_relop: /* relop */
9386#line 2636 "parse.y"
9387 {
9388 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
9389}
9390#line 9391 "parse.c"
9391 break;
9392
9393 case YYSYMBOL_rel_expr: /* rel_expr */
9394#line 2627 "parse.y"
9395 {
9396 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9397 rb_parser_printf(p, "NODE_SPECIAL");
9398 }
9399 else if (((*yyvaluep).node)) {
9400 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9401 }
9402}
9403#line 9404 "parse.c"
9404 break;
9405
9406 case YYSYMBOL_value_expr_arg: /* value_expr_arg */
9407#line 2627 "parse.y"
9408 {
9409 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9410 rb_parser_printf(p, "NODE_SPECIAL");
9411 }
9412 else if (((*yyvaluep).node)) {
9413 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9414 }
9415}
9416#line 9417 "parse.c"
9417 break;
9418
9419 case YYSYMBOL_arg_value: /* arg_value */
9420#line 2627 "parse.y"
9421 {
9422 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9423 rb_parser_printf(p, "NODE_SPECIAL");
9424 }
9425 else if (((*yyvaluep).node)) {
9426 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9427 }
9428}
9429#line 9430 "parse.c"
9430 break;
9431
9432 case YYSYMBOL_aref_args: /* aref_args */
9433#line 2627 "parse.y"
9434 {
9435 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9436 rb_parser_printf(p, "NODE_SPECIAL");
9437 }
9438 else if (((*yyvaluep).node)) {
9439 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9440 }
9441}
9442#line 9443 "parse.c"
9443 break;
9444
9445 case YYSYMBOL_arg_rhs: /* arg_rhs */
9446#line 2627 "parse.y"
9447 {
9448 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9449 rb_parser_printf(p, "NODE_SPECIAL");
9450 }
9451 else if (((*yyvaluep).node)) {
9452 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9453 }
9454}
9455#line 9456 "parse.c"
9456 break;
9457
9458 case YYSYMBOL_paren_args: /* paren_args */
9459#line 2627 "parse.y"
9460 {
9461 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9462 rb_parser_printf(p, "NODE_SPECIAL");
9463 }
9464 else if (((*yyvaluep).node)) {
9465 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9466 }
9467}
9468#line 9469 "parse.c"
9469 break;
9470
9471 case YYSYMBOL_opt_paren_args: /* opt_paren_args */
9472#line 2627 "parse.y"
9473 {
9474 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9475 rb_parser_printf(p, "NODE_SPECIAL");
9476 }
9477 else if (((*yyvaluep).node)) {
9478 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9479 }
9480}
9481#line 9482 "parse.c"
9482 break;
9483
9484 case YYSYMBOL_opt_call_args: /* opt_call_args */
9485#line 2627 "parse.y"
9486 {
9487 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9488 rb_parser_printf(p, "NODE_SPECIAL");
9489 }
9490 else if (((*yyvaluep).node)) {
9491 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9492 }
9493}
9494#line 9495 "parse.c"
9495 break;
9496
9497 case YYSYMBOL_value_expr_command: /* value_expr_command */
9498#line 2627 "parse.y"
9499 {
9500 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9501 rb_parser_printf(p, "NODE_SPECIAL");
9502 }
9503 else if (((*yyvaluep).node)) {
9504 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9505 }
9506}
9507#line 9508 "parse.c"
9508 break;
9509
9510 case YYSYMBOL_call_args: /* call_args */
9511#line 2627 "parse.y"
9512 {
9513 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9514 rb_parser_printf(p, "NODE_SPECIAL");
9515 }
9516 else if (((*yyvaluep).node)) {
9517 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9518 }
9519}
9520#line 9521 "parse.c"
9521 break;
9522
9523 case YYSYMBOL_command_args: /* command_args */
9524#line 2627 "parse.y"
9525 {
9526 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9527 rb_parser_printf(p, "NODE_SPECIAL");
9528 }
9529 else if (((*yyvaluep).node)) {
9530 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9531 }
9532}
9533#line 9534 "parse.c"
9534 break;
9535
9536 case YYSYMBOL_block_arg: /* block_arg */
9537#line 2627 "parse.y"
9538 {
9539 if ((NODE *)((*yyvaluep).node_block_pass) == (NODE *)-1) {
9540 rb_parser_printf(p, "NODE_SPECIAL");
9541 }
9542 else if (((*yyvaluep).node_block_pass)) {
9543 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_block_pass)))));
9544 }
9545}
9546#line 9547 "parse.c"
9547 break;
9548
9549 case YYSYMBOL_opt_block_arg: /* opt_block_arg */
9550#line 2627 "parse.y"
9551 {
9552 if ((NODE *)((*yyvaluep).node_block_pass) == (NODE *)-1) {
9553 rb_parser_printf(p, "NODE_SPECIAL");
9554 }
9555 else if (((*yyvaluep).node_block_pass)) {
9556 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_block_pass)))));
9557 }
9558}
9559#line 9560 "parse.c"
9560 break;
9561
9562 case YYSYMBOL_args: /* args */
9563#line 2627 "parse.y"
9564 {
9565 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9566 rb_parser_printf(p, "NODE_SPECIAL");
9567 }
9568 else if (((*yyvaluep).node)) {
9569 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9570 }
9571}
9572#line 9573 "parse.c"
9573 break;
9574
9575 case YYSYMBOL_arg_splat: /* arg_splat */
9576#line 2627 "parse.y"
9577 {
9578 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9579 rb_parser_printf(p, "NODE_SPECIAL");
9580 }
9581 else if (((*yyvaluep).node)) {
9582 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9583 }
9584}
9585#line 9586 "parse.c"
9586 break;
9587
9588 case YYSYMBOL_mrhs_arg: /* mrhs_arg */
9589#line 2627 "parse.y"
9590 {
9591 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9592 rb_parser_printf(p, "NODE_SPECIAL");
9593 }
9594 else if (((*yyvaluep).node)) {
9595 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9596 }
9597}
9598#line 9599 "parse.c"
9599 break;
9600
9601 case YYSYMBOL_mrhs: /* mrhs */
9602#line 2627 "parse.y"
9603 {
9604 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9605 rb_parser_printf(p, "NODE_SPECIAL");
9606 }
9607 else if (((*yyvaluep).node)) {
9608 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9609 }
9610}
9611#line 9612 "parse.c"
9612 break;
9613
9614 case YYSYMBOL_primary: /* primary */
9615#line 2627 "parse.y"
9616 {
9617 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9618 rb_parser_printf(p, "NODE_SPECIAL");
9619 }
9620 else if (((*yyvaluep).node)) {
9621 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9622 }
9623}
9624#line 9625 "parse.c"
9625 break;
9626
9627 case YYSYMBOL_value_expr_primary: /* value_expr_primary */
9628#line 2627 "parse.y"
9629 {
9630 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9631 rb_parser_printf(p, "NODE_SPECIAL");
9632 }
9633 else if (((*yyvaluep).node)) {
9634 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9635 }
9636}
9637#line 9638 "parse.c"
9638 break;
9639
9640 case YYSYMBOL_primary_value: /* primary_value */
9641#line 2627 "parse.y"
9642 {
9643 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9644 rb_parser_printf(p, "NODE_SPECIAL");
9645 }
9646 else if (((*yyvaluep).node)) {
9647 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9648 }
9649}
9650#line 9651 "parse.c"
9651 break;
9652
9653 case YYSYMBOL_k_while: /* k_while */
9654#line 2627 "parse.y"
9655 {
9656 if ((NODE *)((*yyvaluep).node_exits) == (NODE *)-1) {
9657 rb_parser_printf(p, "NODE_SPECIAL");
9658 }
9659 else if (((*yyvaluep).node_exits)) {
9660 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_exits)))));
9661 }
9662}
9663#line 9664 "parse.c"
9664 break;
9665
9666 case YYSYMBOL_k_until: /* k_until */
9667#line 2627 "parse.y"
9668 {
9669 if ((NODE *)((*yyvaluep).node_exits) == (NODE *)-1) {
9670 rb_parser_printf(p, "NODE_SPECIAL");
9671 }
9672 else if (((*yyvaluep).node_exits)) {
9673 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_exits)))));
9674 }
9675}
9676#line 9677 "parse.c"
9677 break;
9678
9679 case YYSYMBOL_k_for: /* k_for */
9680#line 2627 "parse.y"
9681 {
9682 if ((NODE *)((*yyvaluep).node_exits) == (NODE *)-1) {
9683 rb_parser_printf(p, "NODE_SPECIAL");
9684 }
9685 else if (((*yyvaluep).node_exits)) {
9686 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_exits)))));
9687 }
9688}
9689#line 9690 "parse.c"
9690 break;
9691
9692 case YYSYMBOL_k_def: /* k_def */
9693#line 2627 "parse.y"
9694 {
9695 if ((NODE *)((*yyvaluep).node_def_temp) == (NODE *)-1) {
9696 rb_parser_printf(p, "NODE_SPECIAL");
9697 }
9698 else if (((*yyvaluep).node_def_temp)) {
9699 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_def_temp)))));
9700 }
9701}
9702#line 9703 "parse.c"
9703 break;
9704
9705 case YYSYMBOL_do: /* do */
9706#line 2636 "parse.y"
9707 {
9708 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
9709}
9710#line 9711 "parse.c"
9711 break;
9712
9713 case YYSYMBOL_if_tail: /* if_tail */
9714#line 2627 "parse.y"
9715 {
9716 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9717 rb_parser_printf(p, "NODE_SPECIAL");
9718 }
9719 else if (((*yyvaluep).node)) {
9720 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9721 }
9722}
9723#line 9724 "parse.c"
9724 break;
9725
9726 case YYSYMBOL_opt_else: /* opt_else */
9727#line 2627 "parse.y"
9728 {
9729 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9730 rb_parser_printf(p, "NODE_SPECIAL");
9731 }
9732 else if (((*yyvaluep).node)) {
9733 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9734 }
9735}
9736#line 9737 "parse.c"
9737 break;
9738
9739 case YYSYMBOL_for_var: /* for_var */
9740#line 2627 "parse.y"
9741 {
9742 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9743 rb_parser_printf(p, "NODE_SPECIAL");
9744 }
9745 else if (((*yyvaluep).node)) {
9746 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9747 }
9748}
9749#line 9750 "parse.c"
9750 break;
9751
9752 case YYSYMBOL_f_marg: /* f_marg */
9753#line 2627 "parse.y"
9754 {
9755 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9756 rb_parser_printf(p, "NODE_SPECIAL");
9757 }
9758 else if (((*yyvaluep).node)) {
9759 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9760 }
9761}
9762#line 9763 "parse.c"
9763 break;
9764
9765 case YYSYMBOL_mlhs_items_f_marg: /* mlhs_items_f_marg */
9766#line 2627 "parse.y"
9767 {
9768 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9769 rb_parser_printf(p, "NODE_SPECIAL");
9770 }
9771 else if (((*yyvaluep).node)) {
9772 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9773 }
9774}
9775#line 9776 "parse.c"
9776 break;
9777
9778 case YYSYMBOL_f_margs: /* f_margs */
9779#line 2627 "parse.y"
9780 {
9781 if ((NODE *)((*yyvaluep).node_masgn) == (NODE *)-1) {
9782 rb_parser_printf(p, "NODE_SPECIAL");
9783 }
9784 else if (((*yyvaluep).node_masgn)) {
9785 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_masgn)))));
9786 }
9787}
9788#line 9789 "parse.c"
9789 break;
9790
9791 case YYSYMBOL_f_rest_marg: /* f_rest_marg */
9792#line 2627 "parse.y"
9793 {
9794 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9795 rb_parser_printf(p, "NODE_SPECIAL");
9796 }
9797 else if (((*yyvaluep).node)) {
9798 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9799 }
9800}
9801#line 9802 "parse.c"
9802 break;
9803
9804 case YYSYMBOL_f_any_kwrest: /* f_any_kwrest */
9805#line 2636 "parse.y"
9806 {
9807 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
9808}
9809#line 9810 "parse.c"
9810 break;
9811
9812 case YYSYMBOL_f_kw_primary_value: /* f_kw_primary_value */
9813#line 2627 "parse.y"
9814 {
9815 if ((NODE *)((*yyvaluep).node_kw_arg) == (NODE *)-1) {
9816 rb_parser_printf(p, "NODE_SPECIAL");
9817 }
9818 else if (((*yyvaluep).node_kw_arg)) {
9819 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_kw_arg)))));
9820 }
9821}
9822#line 9823 "parse.c"
9823 break;
9824
9825 case YYSYMBOL_f_kwarg_primary_value: /* f_kwarg_primary_value */
9826#line 2627 "parse.y"
9827 {
9828 if ((NODE *)((*yyvaluep).node_kw_arg) == (NODE *)-1) {
9829 rb_parser_printf(p, "NODE_SPECIAL");
9830 }
9831 else if (((*yyvaluep).node_kw_arg)) {
9832 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_kw_arg)))));
9833 }
9834}
9835#line 9836 "parse.c"
9836 break;
9837
9838 case YYSYMBOL_args_tail_basic_primary_value: /* args_tail_basic_primary_value */
9839#line 2627 "parse.y"
9840 {
9841 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
9842 rb_parser_printf(p, "NODE_SPECIAL");
9843 }
9844 else if (((*yyvaluep).node_args)) {
9845 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
9846 }
9847}
9848#line 9849 "parse.c"
9849 break;
9850
9851 case YYSYMBOL_block_args_tail: /* block_args_tail */
9852#line 2627 "parse.y"
9853 {
9854 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
9855 rb_parser_printf(p, "NODE_SPECIAL");
9856 }
9857 else if (((*yyvaluep).node_args)) {
9858 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
9859 }
9860}
9861#line 9862 "parse.c"
9862 break;
9863
9864 case YYSYMBOL_excessed_comma: /* excessed_comma */
9865#line 2636 "parse.y"
9866 {
9867 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
9868}
9869#line 9870 "parse.c"
9870 break;
9871
9872 case YYSYMBOL_f_opt_primary_value: /* f_opt_primary_value */
9873#line 2627 "parse.y"
9874 {
9875 if ((NODE *)((*yyvaluep).node_opt_arg) == (NODE *)-1) {
9876 rb_parser_printf(p, "NODE_SPECIAL");
9877 }
9878 else if (((*yyvaluep).node_opt_arg)) {
9879 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_opt_arg)))));
9880 }
9881}
9882#line 9883 "parse.c"
9883 break;
9884
9885 case YYSYMBOL_f_opt_arg_primary_value: /* f_opt_arg_primary_value */
9886#line 2627 "parse.y"
9887 {
9888 if ((NODE *)((*yyvaluep).node_opt_arg) == (NODE *)-1) {
9889 rb_parser_printf(p, "NODE_SPECIAL");
9890 }
9891 else if (((*yyvaluep).node_opt_arg)) {
9892 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_opt_arg)))));
9893 }
9894}
9895#line 9896 "parse.c"
9896 break;
9897
9898 case YYSYMBOL_opt_args_tail_block_args_tail: /* opt_args_tail_block_args_tail */
9899#line 2627 "parse.y"
9900 {
9901 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
9902 rb_parser_printf(p, "NODE_SPECIAL");
9903 }
9904 else if (((*yyvaluep).node_args)) {
9905 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
9906 }
9907}
9908#line 9909 "parse.c"
9909 break;
9910
9911 case YYSYMBOL_block_param: /* block_param */
9912#line 2627 "parse.y"
9913 {
9914 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
9915 rb_parser_printf(p, "NODE_SPECIAL");
9916 }
9917 else if (((*yyvaluep).node_args)) {
9918 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
9919 }
9920}
9921#line 9922 "parse.c"
9922 break;
9923
9924 case YYSYMBOL_opt_block_param_def: /* opt_block_param_def */
9925#line 2627 "parse.y"
9926 {
9927 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
9928 rb_parser_printf(p, "NODE_SPECIAL");
9929 }
9930 else if (((*yyvaluep).node_args)) {
9931 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
9932 }
9933}
9934#line 9935 "parse.c"
9935 break;
9936
9937 case YYSYMBOL_block_param_def: /* block_param_def */
9938#line 2627 "parse.y"
9939 {
9940 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
9941 rb_parser_printf(p, "NODE_SPECIAL");
9942 }
9943 else if (((*yyvaluep).node_args)) {
9944 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
9945 }
9946}
9947#line 9948 "parse.c"
9948 break;
9949
9950 case YYSYMBOL_opt_block_param: /* opt_block_param */
9951#line 2627 "parse.y"
9952 {
9953 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
9954 rb_parser_printf(p, "NODE_SPECIAL");
9955 }
9956 else if (((*yyvaluep).node_args)) {
9957 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
9958 }
9959}
9960#line 9961 "parse.c"
9961 break;
9962
9963 case YYSYMBOL_opt_bv_decl: /* opt_bv_decl */
9964#line 2636 "parse.y"
9965 {
9966 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
9967}
9968#line 9969 "parse.c"
9969 break;
9970
9971 case YYSYMBOL_bv_decls: /* bv_decls */
9972#line 2636 "parse.y"
9973 {
9974 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
9975}
9976#line 9977 "parse.c"
9977 break;
9978
9979 case YYSYMBOL_bvar: /* bvar */
9980#line 2636 "parse.y"
9981 {
9982 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
9983}
9984#line 9985 "parse.c"
9985 break;
9986
9987 case YYSYMBOL_numparam: /* numparam */
9988#line 2627 "parse.y"
9989 {
9990 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9991 rb_parser_printf(p, "NODE_SPECIAL");
9992 }
9993 else if (((*yyvaluep).node)) {
9994 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9995 }
9996}
9997#line 9998 "parse.c"
9998 break;
9999
10000 case YYSYMBOL_it_id: /* it_id */
10001#line 2636 "parse.y"
10002 {
10003 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
10004}
10005#line 10006 "parse.c"
10006 break;
10007
10008 case YYSYMBOL_lambda: /* lambda */
10009#line 2627 "parse.y"
10010 {
10011 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10012 rb_parser_printf(p, "NODE_SPECIAL");
10013 }
10014 else if (((*yyvaluep).node)) {
10015 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10016 }
10017}
10018#line 10019 "parse.c"
10019 break;
10020
10021 case YYSYMBOL_f_larglist: /* f_larglist */
10022#line 2627 "parse.y"
10023 {
10024 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
10025 rb_parser_printf(p, "NODE_SPECIAL");
10026 }
10027 else if (((*yyvaluep).node_args)) {
10028 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
10029 }
10030}
10031#line 10032 "parse.c"
10032 break;
10033
10034 case YYSYMBOL_do_block: /* do_block */
10035#line 2627 "parse.y"
10036 {
10037 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10038 rb_parser_printf(p, "NODE_SPECIAL");
10039 }
10040 else if (((*yyvaluep).node)) {
10041 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10042 }
10043}
10044#line 10045 "parse.c"
10045 break;
10046
10047 case YYSYMBOL_block_call: /* block_call */
10048#line 2627 "parse.y"
10049 {
10050 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10051 rb_parser_printf(p, "NODE_SPECIAL");
10052 }
10053 else if (((*yyvaluep).node)) {
10054 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10055 }
10056}
10057#line 10058 "parse.c"
10058 break;
10059
10060 case YYSYMBOL_method_call: /* method_call */
10061#line 2627 "parse.y"
10062 {
10063 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10064 rb_parser_printf(p, "NODE_SPECIAL");
10065 }
10066 else if (((*yyvaluep).node)) {
10067 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10068 }
10069}
10070#line 10071 "parse.c"
10071 break;
10072
10073 case YYSYMBOL_brace_block: /* brace_block */
10074#line 2627 "parse.y"
10075 {
10076 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10077 rb_parser_printf(p, "NODE_SPECIAL");
10078 }
10079 else if (((*yyvaluep).node)) {
10080 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10081 }
10082}
10083#line 10084 "parse.c"
10084 break;
10085
10086 case YYSYMBOL_brace_body: /* brace_body */
10087#line 2627 "parse.y"
10088 {
10089 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10090 rb_parser_printf(p, "NODE_SPECIAL");
10091 }
10092 else if (((*yyvaluep).node)) {
10093 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10094 }
10095}
10096#line 10097 "parse.c"
10097 break;
10098
10099 case YYSYMBOL_do_body: /* do_body */
10100#line 2627 "parse.y"
10101 {
10102 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10103 rb_parser_printf(p, "NODE_SPECIAL");
10104 }
10105 else if (((*yyvaluep).node)) {
10106 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10107 }
10108}
10109#line 10110 "parse.c"
10110 break;
10111
10112 case YYSYMBOL_case_args: /* case_args */
10113#line 2627 "parse.y"
10114 {
10115 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10116 rb_parser_printf(p, "NODE_SPECIAL");
10117 }
10118 else if (((*yyvaluep).node)) {
10119 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10120 }
10121}
10122#line 10123 "parse.c"
10123 break;
10124
10125 case YYSYMBOL_case_body: /* case_body */
10126#line 2627 "parse.y"
10127 {
10128 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10129 rb_parser_printf(p, "NODE_SPECIAL");
10130 }
10131 else if (((*yyvaluep).node)) {
10132 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10133 }
10134}
10135#line 10136 "parse.c"
10136 break;
10137
10138 case YYSYMBOL_cases: /* cases */
10139#line 2627 "parse.y"
10140 {
10141 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10142 rb_parser_printf(p, "NODE_SPECIAL");
10143 }
10144 else if (((*yyvaluep).node)) {
10145 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10146 }
10147}
10148#line 10149 "parse.c"
10149 break;
10150
10151 case YYSYMBOL_p_case_body: /* p_case_body */
10152#line 2627 "parse.y"
10153 {
10154 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10155 rb_parser_printf(p, "NODE_SPECIAL");
10156 }
10157 else if (((*yyvaluep).node)) {
10158 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10159 }
10160}
10161#line 10162 "parse.c"
10162 break;
10163
10164 case YYSYMBOL_p_cases: /* p_cases */
10165#line 2627 "parse.y"
10166 {
10167 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10168 rb_parser_printf(p, "NODE_SPECIAL");
10169 }
10170 else if (((*yyvaluep).node)) {
10171 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10172 }
10173}
10174#line 10175 "parse.c"
10175 break;
10176
10177 case YYSYMBOL_p_top_expr: /* p_top_expr */
10178#line 2627 "parse.y"
10179 {
10180 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10181 rb_parser_printf(p, "NODE_SPECIAL");
10182 }
10183 else if (((*yyvaluep).node)) {
10184 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10185 }
10186}
10187#line 10188 "parse.c"
10188 break;
10189
10190 case YYSYMBOL_p_top_expr_body: /* p_top_expr_body */
10191#line 2627 "parse.y"
10192 {
10193 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10194 rb_parser_printf(p, "NODE_SPECIAL");
10195 }
10196 else if (((*yyvaluep).node)) {
10197 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10198 }
10199}
10200#line 10201 "parse.c"
10201 break;
10202
10203 case YYSYMBOL_p_expr: /* p_expr */
10204#line 2627 "parse.y"
10205 {
10206 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10207 rb_parser_printf(p, "NODE_SPECIAL");
10208 }
10209 else if (((*yyvaluep).node)) {
10210 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10211 }
10212}
10213#line 10214 "parse.c"
10214 break;
10215
10216 case YYSYMBOL_p_as: /* p_as */
10217#line 2627 "parse.y"
10218 {
10219 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10220 rb_parser_printf(p, "NODE_SPECIAL");
10221 }
10222 else if (((*yyvaluep).node)) {
10223 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10224 }
10225}
10226#line 10227 "parse.c"
10227 break;
10228
10229 case YYSYMBOL_p_alt: /* p_alt */
10230#line 2627 "parse.y"
10231 {
10232 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10233 rb_parser_printf(p, "NODE_SPECIAL");
10234 }
10235 else if (((*yyvaluep).node)) {
10236 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10237 }
10238}
10239#line 10240 "parse.c"
10240 break;
10241
10242 case YYSYMBOL_p_expr_basic: /* p_expr_basic */
10243#line 2627 "parse.y"
10244 {
10245 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10246 rb_parser_printf(p, "NODE_SPECIAL");
10247 }
10248 else if (((*yyvaluep).node)) {
10249 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10250 }
10251}
10252#line 10253 "parse.c"
10253 break;
10254
10255 case YYSYMBOL_p_args: /* p_args */
10256#line 2627 "parse.y"
10257 {
10258 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10259 rb_parser_printf(p, "NODE_SPECIAL");
10260 }
10261 else if (((*yyvaluep).node)) {
10262 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10263 }
10264}
10265#line 10266 "parse.c"
10266 break;
10267
10268 case YYSYMBOL_p_args_head: /* p_args_head */
10269#line 2627 "parse.y"
10270 {
10271 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10272 rb_parser_printf(p, "NODE_SPECIAL");
10273 }
10274 else if (((*yyvaluep).node)) {
10275 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10276 }
10277}
10278#line 10279 "parse.c"
10279 break;
10280
10281 case YYSYMBOL_p_args_tail: /* p_args_tail */
10282#line 2627 "parse.y"
10283 {
10284 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10285 rb_parser_printf(p, "NODE_SPECIAL");
10286 }
10287 else if (((*yyvaluep).node)) {
10288 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10289 }
10290}
10291#line 10292 "parse.c"
10292 break;
10293
10294 case YYSYMBOL_p_find: /* p_find */
10295#line 2627 "parse.y"
10296 {
10297 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10298 rb_parser_printf(p, "NODE_SPECIAL");
10299 }
10300 else if (((*yyvaluep).node)) {
10301 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10302 }
10303}
10304#line 10305 "parse.c"
10305 break;
10306
10307 case YYSYMBOL_p_rest: /* p_rest */
10308#line 2627 "parse.y"
10309 {
10310 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10311 rb_parser_printf(p, "NODE_SPECIAL");
10312 }
10313 else if (((*yyvaluep).node)) {
10314 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10315 }
10316}
10317#line 10318 "parse.c"
10318 break;
10319
10320 case YYSYMBOL_p_args_post: /* p_args_post */
10321#line 2627 "parse.y"
10322 {
10323 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10324 rb_parser_printf(p, "NODE_SPECIAL");
10325 }
10326 else if (((*yyvaluep).node)) {
10327 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10328 }
10329}
10330#line 10331 "parse.c"
10331 break;
10332
10333 case YYSYMBOL_p_arg: /* p_arg */
10334#line 2627 "parse.y"
10335 {
10336 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10337 rb_parser_printf(p, "NODE_SPECIAL");
10338 }
10339 else if (((*yyvaluep).node)) {
10340 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10341 }
10342}
10343#line 10344 "parse.c"
10344 break;
10345
10346 case YYSYMBOL_p_kwargs: /* p_kwargs */
10347#line 2627 "parse.y"
10348 {
10349 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10350 rb_parser_printf(p, "NODE_SPECIAL");
10351 }
10352 else if (((*yyvaluep).node)) {
10353 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10354 }
10355}
10356#line 10357 "parse.c"
10357 break;
10358
10359 case YYSYMBOL_p_kwarg: /* p_kwarg */
10360#line 2627 "parse.y"
10361 {
10362 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10363 rb_parser_printf(p, "NODE_SPECIAL");
10364 }
10365 else if (((*yyvaluep).node)) {
10366 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10367 }
10368}
10369#line 10370 "parse.c"
10370 break;
10371
10372 case YYSYMBOL_p_kw: /* p_kw */
10373#line 2627 "parse.y"
10374 {
10375 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10376 rb_parser_printf(p, "NODE_SPECIAL");
10377 }
10378 else if (((*yyvaluep).node)) {
10379 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10380 }
10381}
10382#line 10383 "parse.c"
10383 break;
10384
10385 case YYSYMBOL_p_kw_label: /* p_kw_label */
10386#line 2636 "parse.y"
10387 {
10388 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
10389}
10390#line 10391 "parse.c"
10391 break;
10392
10393 case YYSYMBOL_p_kwrest: /* p_kwrest */
10394#line 2636 "parse.y"
10395 {
10396 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
10397}
10398#line 10399 "parse.c"
10399 break;
10400
10401 case YYSYMBOL_p_kwnorest: /* p_kwnorest */
10402#line 2636 "parse.y"
10403 {
10404 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
10405}
10406#line 10407 "parse.c"
10407 break;
10408
10409 case YYSYMBOL_p_any_kwrest: /* p_any_kwrest */
10410#line 2636 "parse.y"
10411 {
10412 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
10413}
10414#line 10415 "parse.c"
10415 break;
10416
10417 case YYSYMBOL_p_value: /* p_value */
10418#line 2627 "parse.y"
10419 {
10420 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10421 rb_parser_printf(p, "NODE_SPECIAL");
10422 }
10423 else if (((*yyvaluep).node)) {
10424 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10425 }
10426}
10427#line 10428 "parse.c"
10428 break;
10429
10430 case YYSYMBOL_range_expr_p_primitive: /* range_expr_p_primitive */
10431#line 2627 "parse.y"
10432 {
10433 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10434 rb_parser_printf(p, "NODE_SPECIAL");
10435 }
10436 else if (((*yyvaluep).node)) {
10437 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10438 }
10439}
10440#line 10441 "parse.c"
10441 break;
10442
10443 case YYSYMBOL_p_primitive: /* p_primitive */
10444#line 2627 "parse.y"
10445 {
10446 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10447 rb_parser_printf(p, "NODE_SPECIAL");
10448 }
10449 else if (((*yyvaluep).node)) {
10450 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10451 }
10452}
10453#line 10454 "parse.c"
10454 break;
10455
10456 case YYSYMBOL_p_variable: /* p_variable */
10457#line 2627 "parse.y"
10458 {
10459 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10460 rb_parser_printf(p, "NODE_SPECIAL");
10461 }
10462 else if (((*yyvaluep).node)) {
10463 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10464 }
10465}
10466#line 10467 "parse.c"
10467 break;
10468
10469 case YYSYMBOL_p_var_ref: /* p_var_ref */
10470#line 2627 "parse.y"
10471 {
10472 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10473 rb_parser_printf(p, "NODE_SPECIAL");
10474 }
10475 else if (((*yyvaluep).node)) {
10476 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10477 }
10478}
10479#line 10480 "parse.c"
10480 break;
10481
10482 case YYSYMBOL_p_expr_ref: /* p_expr_ref */
10483#line 2627 "parse.y"
10484 {
10485 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10486 rb_parser_printf(p, "NODE_SPECIAL");
10487 }
10488 else if (((*yyvaluep).node)) {
10489 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10490 }
10491}
10492#line 10493 "parse.c"
10493 break;
10494
10495 case YYSYMBOL_p_const: /* p_const */
10496#line 2627 "parse.y"
10497 {
10498 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10499 rb_parser_printf(p, "NODE_SPECIAL");
10500 }
10501 else if (((*yyvaluep).node)) {
10502 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10503 }
10504}
10505#line 10506 "parse.c"
10506 break;
10507
10508 case YYSYMBOL_opt_rescue: /* opt_rescue */
10509#line 2627 "parse.y"
10510 {
10511 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10512 rb_parser_printf(p, "NODE_SPECIAL");
10513 }
10514 else if (((*yyvaluep).node)) {
10515 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10516 }
10517}
10518#line 10519 "parse.c"
10519 break;
10520
10521 case YYSYMBOL_exc_list: /* exc_list */
10522#line 2627 "parse.y"
10523 {
10524 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10525 rb_parser_printf(p, "NODE_SPECIAL");
10526 }
10527 else if (((*yyvaluep).node)) {
10528 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10529 }
10530}
10531#line 10532 "parse.c"
10532 break;
10533
10534 case YYSYMBOL_exc_var: /* exc_var */
10535#line 2627 "parse.y"
10536 {
10537 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10538 rb_parser_printf(p, "NODE_SPECIAL");
10539 }
10540 else if (((*yyvaluep).node)) {
10541 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10542 }
10543}
10544#line 10545 "parse.c"
10545 break;
10546
10547 case YYSYMBOL_opt_ensure: /* opt_ensure */
10548#line 2627 "parse.y"
10549 {
10550 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10551 rb_parser_printf(p, "NODE_SPECIAL");
10552 }
10553 else if (((*yyvaluep).node)) {
10554 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10555 }
10556}
10557#line 10558 "parse.c"
10558 break;
10559
10560 case YYSYMBOL_literal: /* literal */
10561#line 2627 "parse.y"
10562 {
10563 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10564 rb_parser_printf(p, "NODE_SPECIAL");
10565 }
10566 else if (((*yyvaluep).node)) {
10567 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10568 }
10569}
10570#line 10571 "parse.c"
10571 break;
10572
10573 case YYSYMBOL_strings: /* strings */
10574#line 2627 "parse.y"
10575 {
10576 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10577 rb_parser_printf(p, "NODE_SPECIAL");
10578 }
10579 else if (((*yyvaluep).node)) {
10580 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10581 }
10582}
10583#line 10584 "parse.c"
10584 break;
10585
10586 case YYSYMBOL_string: /* string */
10587#line 2627 "parse.y"
10588 {
10589 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10590 rb_parser_printf(p, "NODE_SPECIAL");
10591 }
10592 else if (((*yyvaluep).node)) {
10593 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10594 }
10595}
10596#line 10597 "parse.c"
10597 break;
10598
10599 case YYSYMBOL_string1: /* string1 */
10600#line 2627 "parse.y"
10601 {
10602 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10603 rb_parser_printf(p, "NODE_SPECIAL");
10604 }
10605 else if (((*yyvaluep).node)) {
10606 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10607 }
10608}
10609#line 10610 "parse.c"
10610 break;
10611
10612 case YYSYMBOL_xstring: /* xstring */
10613#line 2627 "parse.y"
10614 {
10615 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10616 rb_parser_printf(p, "NODE_SPECIAL");
10617 }
10618 else if (((*yyvaluep).node)) {
10619 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10620 }
10621}
10622#line 10623 "parse.c"
10623 break;
10624
10625 case YYSYMBOL_regexp: /* regexp */
10626#line 2627 "parse.y"
10627 {
10628 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10629 rb_parser_printf(p, "NODE_SPECIAL");
10630 }
10631 else if (((*yyvaluep).node)) {
10632 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10633 }
10634}
10635#line 10636 "parse.c"
10636 break;
10637
10638 case YYSYMBOL_words_tWORDS_BEG_word_list: /* words_tWORDS_BEG_word_list */
10639#line 2627 "parse.y"
10640 {
10641 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10642 rb_parser_printf(p, "NODE_SPECIAL");
10643 }
10644 else if (((*yyvaluep).node)) {
10645 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10646 }
10647}
10648#line 10649 "parse.c"
10649 break;
10650
10651 case YYSYMBOL_words: /* words */
10652#line 2627 "parse.y"
10653 {
10654 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10655 rb_parser_printf(p, "NODE_SPECIAL");
10656 }
10657 else if (((*yyvaluep).node)) {
10658 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10659 }
10660}
10661#line 10662 "parse.c"
10662 break;
10663
10664 case YYSYMBOL_word_list: /* word_list */
10665#line 2627 "parse.y"
10666 {
10667 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10668 rb_parser_printf(p, "NODE_SPECIAL");
10669 }
10670 else if (((*yyvaluep).node)) {
10671 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10672 }
10673}
10674#line 10675 "parse.c"
10675 break;
10676
10677 case YYSYMBOL_word: /* word */
10678#line 2627 "parse.y"
10679 {
10680 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10681 rb_parser_printf(p, "NODE_SPECIAL");
10682 }
10683 else if (((*yyvaluep).node)) {
10684 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10685 }
10686}
10687#line 10688 "parse.c"
10688 break;
10689
10690 case YYSYMBOL_words_tSYMBOLS_BEG_symbol_list: /* words_tSYMBOLS_BEG_symbol_list */
10691#line 2627 "parse.y"
10692 {
10693 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10694 rb_parser_printf(p, "NODE_SPECIAL");
10695 }
10696 else if (((*yyvaluep).node)) {
10697 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10698 }
10699}
10700#line 10701 "parse.c"
10701 break;
10702
10703 case YYSYMBOL_symbols: /* symbols */
10704#line 2627 "parse.y"
10705 {
10706 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10707 rb_parser_printf(p, "NODE_SPECIAL");
10708 }
10709 else if (((*yyvaluep).node)) {
10710 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10711 }
10712}
10713#line 10714 "parse.c"
10714 break;
10715
10716 case YYSYMBOL_symbol_list: /* symbol_list */
10717#line 2627 "parse.y"
10718 {
10719 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10720 rb_parser_printf(p, "NODE_SPECIAL");
10721 }
10722 else if (((*yyvaluep).node)) {
10723 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10724 }
10725}
10726#line 10727 "parse.c"
10727 break;
10728
10729 case YYSYMBOL_words_tQWORDS_BEG_qword_list: /* words_tQWORDS_BEG_qword_list */
10730#line 2627 "parse.y"
10731 {
10732 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10733 rb_parser_printf(p, "NODE_SPECIAL");
10734 }
10735 else if (((*yyvaluep).node)) {
10736 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10737 }
10738}
10739#line 10740 "parse.c"
10740 break;
10741
10742 case YYSYMBOL_qwords: /* qwords */
10743#line 2627 "parse.y"
10744 {
10745 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10746 rb_parser_printf(p, "NODE_SPECIAL");
10747 }
10748 else if (((*yyvaluep).node)) {
10749 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10750 }
10751}
10752#line 10753 "parse.c"
10753 break;
10754
10755 case YYSYMBOL_words_tQSYMBOLS_BEG_qsym_list: /* words_tQSYMBOLS_BEG_qsym_list */
10756#line 2627 "parse.y"
10757 {
10758 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10759 rb_parser_printf(p, "NODE_SPECIAL");
10760 }
10761 else if (((*yyvaluep).node)) {
10762 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10763 }
10764}
10765#line 10766 "parse.c"
10766 break;
10767
10768 case YYSYMBOL_qsymbols: /* qsymbols */
10769#line 2627 "parse.y"
10770 {
10771 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10772 rb_parser_printf(p, "NODE_SPECIAL");
10773 }
10774 else if (((*yyvaluep).node)) {
10775 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10776 }
10777}
10778#line 10779 "parse.c"
10779 break;
10780
10781 case YYSYMBOL_qword_list: /* qword_list */
10782#line 2627 "parse.y"
10783 {
10784 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10785 rb_parser_printf(p, "NODE_SPECIAL");
10786 }
10787 else if (((*yyvaluep).node)) {
10788 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10789 }
10790}
10791#line 10792 "parse.c"
10792 break;
10793
10794 case YYSYMBOL_qsym_list: /* qsym_list */
10795#line 2627 "parse.y"
10796 {
10797 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10798 rb_parser_printf(p, "NODE_SPECIAL");
10799 }
10800 else if (((*yyvaluep).node)) {
10801 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10802 }
10803}
10804#line 10805 "parse.c"
10805 break;
10806
10807 case YYSYMBOL_string_contents: /* string_contents */
10808#line 2627 "parse.y"
10809 {
10810 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10811 rb_parser_printf(p, "NODE_SPECIAL");
10812 }
10813 else if (((*yyvaluep).node)) {
10814 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10815 }
10816}
10817#line 10818 "parse.c"
10818 break;
10819
10820 case YYSYMBOL_xstring_contents: /* xstring_contents */
10821#line 2627 "parse.y"
10822 {
10823 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10824 rb_parser_printf(p, "NODE_SPECIAL");
10825 }
10826 else if (((*yyvaluep).node)) {
10827 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10828 }
10829}
10830#line 10831 "parse.c"
10831 break;
10832
10833 case YYSYMBOL_regexp_contents: /* regexp_contents */
10834#line 2627 "parse.y"
10835 {
10836 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10837 rb_parser_printf(p, "NODE_SPECIAL");
10838 }
10839 else if (((*yyvaluep).node)) {
10840 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10841 }
10842}
10843#line 10844 "parse.c"
10844 break;
10845
10846 case YYSYMBOL_string_content: /* string_content */
10847#line 2627 "parse.y"
10848 {
10849 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10850 rb_parser_printf(p, "NODE_SPECIAL");
10851 }
10852 else if (((*yyvaluep).node)) {
10853 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10854 }
10855}
10856#line 10857 "parse.c"
10857 break;
10858
10859 case YYSYMBOL_string_dvar: /* string_dvar */
10860#line 2627 "parse.y"
10861 {
10862 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10863 rb_parser_printf(p, "NODE_SPECIAL");
10864 }
10865 else if (((*yyvaluep).node)) {
10866 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10867 }
10868}
10869#line 10870 "parse.c"
10870 break;
10871
10872 case YYSYMBOL_symbol: /* symbol */
10873#line 2627 "parse.y"
10874 {
10875 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10876 rb_parser_printf(p, "NODE_SPECIAL");
10877 }
10878 else if (((*yyvaluep).node)) {
10879 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10880 }
10881}
10882#line 10883 "parse.c"
10883 break;
10884
10885 case YYSYMBOL_ssym: /* ssym */
10886#line 2627 "parse.y"
10887 {
10888 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10889 rb_parser_printf(p, "NODE_SPECIAL");
10890 }
10891 else if (((*yyvaluep).node)) {
10892 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10893 }
10894}
10895#line 10896 "parse.c"
10896 break;
10897
10898 case YYSYMBOL_sym: /* sym */
10899#line 2636 "parse.y"
10900 {
10901 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
10902}
10903#line 10904 "parse.c"
10904 break;
10905
10906 case YYSYMBOL_dsym: /* dsym */
10907#line 2627 "parse.y"
10908 {
10909 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10910 rb_parser_printf(p, "NODE_SPECIAL");
10911 }
10912 else if (((*yyvaluep).node)) {
10913 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10914 }
10915}
10916#line 10917 "parse.c"
10917 break;
10918
10919 case YYSYMBOL_numeric: /* numeric */
10920#line 2627 "parse.y"
10921 {
10922 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10923 rb_parser_printf(p, "NODE_SPECIAL");
10924 }
10925 else if (((*yyvaluep).node)) {
10926 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10927 }
10928}
10929#line 10930 "parse.c"
10930 break;
10931
10932 case YYSYMBOL_simple_numeric: /* simple_numeric */
10933#line 2627 "parse.y"
10934 {
10935 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10936 rb_parser_printf(p, "NODE_SPECIAL");
10937 }
10938 else if (((*yyvaluep).node)) {
10939 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10940 }
10941}
10942#line 10943 "parse.c"
10943 break;
10944
10945 case YYSYMBOL_nonlocal_var: /* nonlocal_var */
10946#line 2636 "parse.y"
10947 {
10948 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
10949}
10950#line 10951 "parse.c"
10951 break;
10952
10953 case YYSYMBOL_user_variable: /* user_variable */
10954#line 2636 "parse.y"
10955 {
10956 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
10957}
10958#line 10959 "parse.c"
10959 break;
10960
10961 case YYSYMBOL_keyword_variable: /* keyword_variable */
10962#line 2636 "parse.y"
10963 {
10964 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
10965}
10966#line 10967 "parse.c"
10967 break;
10968
10969 case YYSYMBOL_var_ref: /* var_ref */
10970#line 2627 "parse.y"
10971 {
10972 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10973 rb_parser_printf(p, "NODE_SPECIAL");
10974 }
10975 else if (((*yyvaluep).node)) {
10976 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10977 }
10978}
10979#line 10980 "parse.c"
10980 break;
10981
10982 case YYSYMBOL_var_lhs: /* var_lhs */
10983#line 2627 "parse.y"
10984 {
10985 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10986 rb_parser_printf(p, "NODE_SPECIAL");
10987 }
10988 else if (((*yyvaluep).node)) {
10989 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10990 }
10991}
10992#line 10993 "parse.c"
10993 break;
10994
10995 case YYSYMBOL_backref: /* backref */
10996#line 2627 "parse.y"
10997 {
10998 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10999 rb_parser_printf(p, "NODE_SPECIAL");
11000 }
11001 else if (((*yyvaluep).node)) {
11002 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
11003 }
11004}
11005#line 11006 "parse.c"
11006 break;
11007
11008 case YYSYMBOL_superclass: /* superclass */
11009#line 2627 "parse.y"
11010 {
11011 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
11012 rb_parser_printf(p, "NODE_SPECIAL");
11013 }
11014 else if (((*yyvaluep).node)) {
11015 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
11016 }
11017}
11018#line 11019 "parse.c"
11019 break;
11020
11021 case YYSYMBOL_f_opt_paren_args: /* f_opt_paren_args */
11022#line 2627 "parse.y"
11023 {
11024 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
11025 rb_parser_printf(p, "NODE_SPECIAL");
11026 }
11027 else if (((*yyvaluep).node_args)) {
11028 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
11029 }
11030}
11031#line 11032 "parse.c"
11032 break;
11033
11034 case YYSYMBOL_f_paren_args: /* f_paren_args */
11035#line 2627 "parse.y"
11036 {
11037 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
11038 rb_parser_printf(p, "NODE_SPECIAL");
11039 }
11040 else if (((*yyvaluep).node_args)) {
11041 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
11042 }
11043}
11044#line 11045 "parse.c"
11045 break;
11046
11047 case YYSYMBOL_f_arglist: /* f_arglist */
11048#line 2627 "parse.y"
11049 {
11050 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
11051 rb_parser_printf(p, "NODE_SPECIAL");
11052 }
11053 else if (((*yyvaluep).node_args)) {
11054 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
11055 }
11056}
11057#line 11058 "parse.c"
11058 break;
11059
11060 case YYSYMBOL_f_kw_arg_value: /* f_kw_arg_value */
11061#line 2627 "parse.y"
11062 {
11063 if ((NODE *)((*yyvaluep).node_kw_arg) == (NODE *)-1) {
11064 rb_parser_printf(p, "NODE_SPECIAL");
11065 }
11066 else if (((*yyvaluep).node_kw_arg)) {
11067 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_kw_arg)))));
11068 }
11069}
11070#line 11071 "parse.c"
11071 break;
11072
11073 case YYSYMBOL_f_kwarg_arg_value: /* f_kwarg_arg_value */
11074#line 2627 "parse.y"
11075 {
11076 if ((NODE *)((*yyvaluep).node_kw_arg) == (NODE *)-1) {
11077 rb_parser_printf(p, "NODE_SPECIAL");
11078 }
11079 else if (((*yyvaluep).node_kw_arg)) {
11080 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_kw_arg)))));
11081 }
11082}
11083#line 11084 "parse.c"
11084 break;
11085
11086 case YYSYMBOL_args_tail_basic_arg_value: /* args_tail_basic_arg_value */
11087#line 2627 "parse.y"
11088 {
11089 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
11090 rb_parser_printf(p, "NODE_SPECIAL");
11091 }
11092 else if (((*yyvaluep).node_args)) {
11093 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
11094 }
11095}
11096#line 11097 "parse.c"
11097 break;
11098
11099 case YYSYMBOL_args_tail: /* args_tail */
11100#line 2627 "parse.y"
11101 {
11102 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
11103 rb_parser_printf(p, "NODE_SPECIAL");
11104 }
11105 else if (((*yyvaluep).node_args)) {
11106 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
11107 }
11108}
11109#line 11110 "parse.c"
11110 break;
11111
11112 case YYSYMBOL_f_opt_arg_value: /* f_opt_arg_value */
11113#line 2627 "parse.y"
11114 {
11115 if ((NODE *)((*yyvaluep).node_opt_arg) == (NODE *)-1) {
11116 rb_parser_printf(p, "NODE_SPECIAL");
11117 }
11118 else if (((*yyvaluep).node_opt_arg)) {
11119 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_opt_arg)))));
11120 }
11121}
11122#line 11123 "parse.c"
11123 break;
11124
11125 case YYSYMBOL_f_opt_arg_arg_value: /* f_opt_arg_arg_value */
11126#line 2627 "parse.y"
11127 {
11128 if ((NODE *)((*yyvaluep).node_opt_arg) == (NODE *)-1) {
11129 rb_parser_printf(p, "NODE_SPECIAL");
11130 }
11131 else if (((*yyvaluep).node_opt_arg)) {
11132 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_opt_arg)))));
11133 }
11134}
11135#line 11136 "parse.c"
11136 break;
11137
11138 case YYSYMBOL_opt_args_tail_args_tail: /* opt_args_tail_args_tail */
11139#line 2627 "parse.y"
11140 {
11141 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
11142 rb_parser_printf(p, "NODE_SPECIAL");
11143 }
11144 else if (((*yyvaluep).node_args)) {
11145 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
11146 }
11147}
11148#line 11149 "parse.c"
11149 break;
11150
11151 case YYSYMBOL_f_args: /* f_args */
11152#line 2627 "parse.y"
11153 {
11154 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
11155 rb_parser_printf(p, "NODE_SPECIAL");
11156 }
11157 else if (((*yyvaluep).node_args)) {
11158 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
11159 }
11160}
11161#line 11162 "parse.c"
11162 break;
11163
11164 case YYSYMBOL_args_forward: /* args_forward */
11165#line 2636 "parse.y"
11166 {
11167 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
11168}
11169#line 11170 "parse.c"
11170 break;
11171
11172 case YYSYMBOL_f_bad_arg: /* f_bad_arg */
11173#line 2636 "parse.y"
11174 {
11175 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
11176}
11177#line 11178 "parse.c"
11178 break;
11179
11180 case YYSYMBOL_f_norm_arg: /* f_norm_arg */
11181#line 2636 "parse.y"
11182 {
11183 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
11184}
11185#line 11186 "parse.c"
11186 break;
11187
11188 case YYSYMBOL_f_arg_asgn: /* f_arg_asgn */
11189#line 2636 "parse.y"
11190 {
11191 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
11192}
11193#line 11194 "parse.c"
11194 break;
11195
11196 case YYSYMBOL_f_arg_item: /* f_arg_item */
11197#line 2627 "parse.y"
11198 {
11199 if ((NODE *)((*yyvaluep).node_args_aux) == (NODE *)-1) {
11200 rb_parser_printf(p, "NODE_SPECIAL");
11201 }
11202 else if (((*yyvaluep).node_args_aux)) {
11203 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args_aux)))));
11204 }
11205}
11206#line 11207 "parse.c"
11207 break;
11208
11209 case YYSYMBOL_f_arg: /* f_arg */
11210#line 2627 "parse.y"
11211 {
11212 if ((NODE *)((*yyvaluep).node_args_aux) == (NODE *)-1) {
11213 rb_parser_printf(p, "NODE_SPECIAL");
11214 }
11215 else if (((*yyvaluep).node_args_aux)) {
11216 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args_aux)))));
11217 }
11218}
11219#line 11220 "parse.c"
11220 break;
11221
11222 case YYSYMBOL_f_label: /* f_label */
11223#line 2636 "parse.y"
11224 {
11225 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
11226}
11227#line 11228 "parse.c"
11228 break;
11229
11230 case YYSYMBOL_f_no_kwarg: /* f_no_kwarg */
11231#line 2636 "parse.y"
11232 {
11233 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
11234}
11235#line 11236 "parse.c"
11236 break;
11237
11238 case YYSYMBOL_f_kwrest: /* f_kwrest */
11239#line 2636 "parse.y"
11240 {
11241 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
11242}
11243#line 11244 "parse.c"
11244 break;
11245
11246 case YYSYMBOL_f_rest_arg: /* f_rest_arg */
11247#line 2636 "parse.y"
11248 {
11249 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
11250}
11251#line 11252 "parse.c"
11252 break;
11253
11254 case YYSYMBOL_f_block_arg: /* f_block_arg */
11255#line 2636 "parse.y"
11256 {
11257 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
11258}
11259#line 11260 "parse.c"
11260 break;
11261
11262 case YYSYMBOL_opt_f_block_arg: /* opt_f_block_arg */
11263#line 2636 "parse.y"
11264 {
11265 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
11266}
11267#line 11268 "parse.c"
11268 break;
11269
11270 case YYSYMBOL_value_expr_singleton_expr: /* value_expr_singleton_expr */
11271#line 2627 "parse.y"
11272 {
11273 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
11274 rb_parser_printf(p, "NODE_SPECIAL");
11275 }
11276 else if (((*yyvaluep).node)) {
11277 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
11278 }
11279}
11280#line 11281 "parse.c"
11281 break;
11282
11283 case YYSYMBOL_singleton: /* singleton */
11284#line 2627 "parse.y"
11285 {
11286 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
11287 rb_parser_printf(p, "NODE_SPECIAL");
11288 }
11289 else if (((*yyvaluep).node)) {
11290 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
11291 }
11292}
11293#line 11294 "parse.c"
11294 break;
11295
11296 case YYSYMBOL_singleton_expr: /* singleton_expr */
11297#line 2627 "parse.y"
11298 {
11299 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
11300 rb_parser_printf(p, "NODE_SPECIAL");
11301 }
11302 else if (((*yyvaluep).node)) {
11303 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
11304 }
11305}
11306#line 11307 "parse.c"
11307 break;
11308
11309 case YYSYMBOL_assoc_list: /* assoc_list */
11310#line 2627 "parse.y"
11311 {
11312 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
11313 rb_parser_printf(p, "NODE_SPECIAL");
11314 }
11315 else if (((*yyvaluep).node)) {
11316 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
11317 }
11318}
11319#line 11320 "parse.c"
11320 break;
11321
11322 case YYSYMBOL_assocs: /* assocs */
11323#line 2627 "parse.y"
11324 {
11325 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
11326 rb_parser_printf(p, "NODE_SPECIAL");
11327 }
11328 else if (((*yyvaluep).node)) {
11329 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
11330 }
11331}
11332#line 11333 "parse.c"
11333 break;
11334
11335 case YYSYMBOL_assoc: /* assoc */
11336#line 2627 "parse.y"
11337 {
11338 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
11339 rb_parser_printf(p, "NODE_SPECIAL");
11340 }
11341 else if (((*yyvaluep).node)) {
11342 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
11343 }
11344}
11345#line 11346 "parse.c"
11346 break;
11347
11348 case YYSYMBOL_operation2: /* operation2 */
11349#line 2636 "parse.y"
11350 {
11351 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
11352}
11353#line 11354 "parse.c"
11354 break;
11355
11356 case YYSYMBOL_operation3: /* operation3 */
11357#line 2636 "parse.y"
11358 {
11359 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
11360}
11361#line 11362 "parse.c"
11362 break;
11363
11364 case YYSYMBOL_dot_or_colon: /* dot_or_colon */
11365#line 2636 "parse.y"
11366 {
11367 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
11368}
11369#line 11370 "parse.c"
11370 break;
11371
11372 case YYSYMBOL_call_op: /* call_op */
11373#line 2636 "parse.y"
11374 {
11375 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
11376}
11377#line 11378 "parse.c"
11378 break;
11379
11380 case YYSYMBOL_call_op2: /* call_op2 */
11381#line 2636 "parse.y"
11382 {
11383 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
11384}
11385#line 11386 "parse.c"
11386 break;
11387
11388 case YYSYMBOL_none: /* none */
11389#line 2627 "parse.y"
11390 {
11391 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
11392 rb_parser_printf(p, "NODE_SPECIAL");
11393 }
11394 else if (((*yyvaluep).node)) {
11395 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
11396 }
11397}
11398#line 11399 "parse.c"
11399 break;
11400
11401 default:
11402 break;
11403 }
11404 YY_IGNORE_MAYBE_UNINITIALIZED_END
11405}
11406
11407
11408/*---------------------------.
11409| Print this symbol on YYO. |
11410`---------------------------*/
11411
11412static void
11413yy_symbol_print (FILE *yyo,
11414 yysymbol_kind_t yykind, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp, struct parser_params *p)
11415{
11416 YYFPRINTF (yyo, "%s %s (",
11417 yykind < YYNTOKENS ? "token" : "nterm", yysymbol_name (yykind));
11418
11419 YYLOCATION_PRINT (yyo, yylocationp, p);
11420 YYFPRINTF (yyo, ": ");
11421 yy_symbol_value_print (yyo, yykind, yyvaluep, yylocationp, p);
11422 YYFPRINTF (yyo, ")");
11423}
11424
11425/*------------------------------------------------------------------.
11426| yy_stack_print -- Print the state stack from its BOTTOM up to its |
11427| TOP (included). |
11428`------------------------------------------------------------------*/
11429
11430static void
11431yy_stack_print (yy_state_t *yybottom, yy_state_t *yytop, struct parser_params *p)
11432{
11433 YYFPRINTF (stderr, "Stack now");
11434 for (; yybottom <= yytop; yybottom++)
11435 {
11436 int yybot = *yybottom;
11437 YYFPRINTF (stderr, " %d", yybot);
11438 }
11439 YYFPRINTF (stderr, "\n");
11440}
11441
11442# define YY_STACK_PRINT(Bottom, Top, p) \
11443do { \
11444 if (yydebug) \
11445 yy_stack_print ((Bottom), (Top), p); \
11446} while (0)
11447
11448
11449/*------------------------------------------------.
11450| Report that the YYRULE is going to be reduced. |
11451`------------------------------------------------*/
11452
11453static void
11454yy_reduce_print (yy_state_t *yyssp, YYSTYPE *yyvsp, YYLTYPE *yylsp,
11455 int yyrule, struct parser_params *p)
11456{
11457 int yylno = yyrline[yyrule];
11458 int yynrhs = yyr2[yyrule];
11459 int yyi;
11460 YYFPRINTF (stderr, "Reducing stack by rule %d (line %d):\n",
11461 yyrule - 1, yylno);
11462 /* The symbols being reduced. */
11463 for (yyi = 0; yyi < yynrhs; yyi++)
11464 {
11465 YYFPRINTF (stderr, " $%d = ", yyi + 1);
11466 yy_symbol_print (stderr,
11467 YY_ACCESSING_SYMBOL (+yyssp[yyi + 1 - yynrhs]),
11468 &yyvsp[(yyi + 1) - (yynrhs)],
11469 &(yylsp[(yyi + 1) - (yynrhs)]), p);
11470 YYFPRINTF (stderr, "\n");
11471 }
11472}
11473
11474# define YY_REDUCE_PRINT(Rule, p) \
11475do { \
11476 if (yydebug) \
11477 yy_reduce_print (yyssp, yyvsp, yylsp, Rule, p); \
11478} while (0)
11479
11480/* Nonzero means print parse trace. It is left uninitialized so that
11481 multiple parsers can coexist. */
11482#ifndef yydebug
11483int yydebug;
11484#endif
11485#else /* !YYDEBUG */
11486# define YYDPRINTF(Args) ((void) 0)
11487# define YY_SYMBOL_PRINT(Title, Kind, Value, Location, p)
11488# define YY_STACK_PRINT(Bottom, Top, p)
11489# define YY_REDUCE_PRINT(Rule, p)
11490#endif /* !YYDEBUG */
11491
11492
11493/* YYINITDEPTH -- initial size of the parser's stacks. */
11494#ifndef YYINITDEPTH
11495# define YYINITDEPTH 200
11496#endif
11497
11498/* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
11499 if the built-in stack extension method is used).
11500
11501 Do not make this value too large; the results are undefined if
11502 YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
11503 evaluated with infinite-precision integer arithmetic. */
11504
11505#ifndef YYMAXDEPTH
11506# define YYMAXDEPTH 10000
11507#endif
11508
11509
11510/* Context of a parse error. */
11511typedef struct
11512{
11513 yy_state_t *yyssp;
11514 yysymbol_kind_t yytoken;
11515 YYLTYPE *yylloc;
11516} yypcontext_t;
11517
11518/* Put in YYARG at most YYARGN of the expected tokens given the
11519 current YYCTX, and return the number of tokens stored in YYARG. If
11520 YYARG is null, return the number of expected tokens (guaranteed to
11521 be less than YYNTOKENS). Return YYENOMEM on memory exhaustion.
11522 Return 0 if there are more than YYARGN expected tokens, yet fill
11523 YYARG up to YYARGN. */
11524static int
11525yypcontext_expected_tokens (const yypcontext_t *yyctx,
11526 yysymbol_kind_t yyarg[], int yyargn)
11527{
11528 /* Actual size of YYARG. */
11529 int yycount = 0;
11530 int yyn = yypact[+*yyctx->yyssp];
11531 if (!yypact_value_is_default (yyn))
11532 {
11533 /* Start YYX at -YYN if negative to avoid negative indexes in
11534 YYCHECK. In other words, skip the first -YYN actions for
11535 this state because they are default actions. */
11536 int yyxbegin = yyn < 0 ? -yyn : 0;
11537 /* Stay within bounds of both yycheck and yytname. */
11538 int yychecklim = YYLAST - yyn + 1;
11539 int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
11540 int yyx;
11541 for (yyx = yyxbegin; yyx < yyxend; ++yyx)
11542 if (yycheck[yyx + yyn] == yyx && yyx != YYSYMBOL_YYerror
11543 && !yytable_value_is_error (yytable[yyx + yyn]))
11544 {
11545 if (!yyarg)
11546 ++yycount;
11547 else if (yycount == yyargn)
11548 return 0;
11549 else
11550 yyarg[yycount++] = YY_CAST (yysymbol_kind_t, yyx);
11551 }
11552 }
11553 if (yyarg && yycount == 0 && 0 < yyargn)
11554 yyarg[0] = YYSYMBOL_YYEMPTY;
11555 return yycount;
11556}
11557
11558
11559
11560
11561#ifndef yystrlen
11562# if defined __GLIBC__ && defined _STRING_H
11563# define yystrlen(S) (YY_CAST (YYPTRDIFF_T, strlen (S)))
11564# else
11565/* Return the length of YYSTR. */
11566static YYPTRDIFF_T
11567yystrlen (const char *yystr)
11568{
11569 YYPTRDIFF_T yylen;
11570 for (yylen = 0; yystr[yylen]; yylen++)
11571 continue;
11572 return yylen;
11573}
11574# endif
11575#endif
11576
11577#ifndef yystpcpy
11578# if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
11579# define yystpcpy stpcpy
11580# else
11581/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
11582 YYDEST. */
11583static char *
11584yystpcpy (char *yydest, const char *yysrc)
11585{
11586 char *yyd = yydest;
11587 const char *yys = yysrc;
11588
11589 while ((*yyd++ = *yys++) != '\0')
11590 continue;
11591
11592 return yyd - 1;
11593}
11594# endif
11595#endif
11596
11597#ifndef yytnamerr
11598/* Copy to YYRES the contents of YYSTR after stripping away unnecessary
11599 quotes and backslashes, so that it's suitable for yyerror. The
11600 heuristic is that double-quoting is unnecessary unless the string
11601 contains an apostrophe, a comma, or backslash (other than
11602 backslash-backslash). YYSTR is taken from yytname. If YYRES is
11603 null, do not copy; instead, return the length of what the result
11604 would have been. */
11605static YYPTRDIFF_T
11606yytnamerr (char *yyres, const char *yystr)
11607{
11608 if (*yystr == '"')
11609 {
11610 YYPTRDIFF_T yyn = 0;
11611 char const *yyp = yystr;
11612 for (;;)
11613 switch (*++yyp)
11614 {
11615 case '\'':
11616 case ',':
11617 goto do_not_strip_quotes;
11618
11619 case '\\':
11620 if (*++yyp != '\\')
11621 goto do_not_strip_quotes;
11622 else
11623 goto append;
11624
11625 append:
11626 default:
11627 if (yyres)
11628 yyres[yyn] = *yyp;
11629 yyn++;
11630 break;
11631
11632 case '"':
11633 if (yyres)
11634 yyres[yyn] = '\0';
11635 return yyn;
11636 }
11637 do_not_strip_quotes: ;
11638 }
11639
11640 if (yyres)
11641 return yystpcpy (yyres, yystr) - yyres;
11642 else
11643 return yystrlen (yystr);
11644}
11645#endif
11646
11647
11648static int
11649yy_syntax_error_arguments (const yypcontext_t *yyctx,
11650 yysymbol_kind_t yyarg[], int yyargn)
11651{
11652 /* Actual size of YYARG. */
11653 int yycount = 0;
11654 /* There are many possibilities here to consider:
11655 - If this state is a consistent state with a default action, then
11656 the only way this function was invoked is if the default action
11657 is an error action. In that case, don't check for expected
11658 tokens because there are none.
11659 - The only way there can be no lookahead present (in yychar) is if
11660 this state is a consistent state with a default action. Thus,
11661 detecting the absence of a lookahead is sufficient to determine
11662 that there is no unexpected or expected token to report. In that
11663 case, just report a simple "syntax error".
11664 - Don't assume there isn't a lookahead just because this state is a
11665 consistent state with a default action. There might have been a
11666 previous inconsistent state, consistent state with a non-default
11667 action, or user semantic action that manipulated yychar.
11668 - Of course, the expected token list depends on states to have
11669 correct lookahead information, and it depends on the parser not
11670 to perform extra reductions after fetching a lookahead from the
11671 scanner and before detecting a syntax error. Thus, state merging
11672 (from LALR or IELR) and default reductions corrupt the expected
11673 token list. However, the list is correct for canonical LR with
11674 one exception: it will still contain any token that will not be
11675 accepted due to an error action in a later state.
11676 */
11677 if (yyctx->yytoken != YYSYMBOL_YYEMPTY)
11678 {
11679 int yyn;
11680 if (yyarg)
11681 yyarg[yycount] = yyctx->yytoken;
11682 ++yycount;
11683 yyn = yypcontext_expected_tokens (yyctx,
11684 yyarg ? yyarg + 1 : yyarg, yyargn - 1);
11685 if (yyn == YYENOMEM)
11686 return YYENOMEM;
11687 else
11688 yycount += yyn;
11689 }
11690 return yycount;
11691}
11692
11693/* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message
11694 about the unexpected token YYTOKEN for the state stack whose top is
11695 YYSSP.
11696
11697 Return 0 if *YYMSG was successfully written. Return -1 if *YYMSG is
11698 not large enough to hold the message. In that case, also set
11699 *YYMSG_ALLOC to the required number of bytes. Return YYENOMEM if the
11700 required number of bytes is too large to store. */
11701static int
11702yysyntax_error (YYPTRDIFF_T *yymsg_alloc, char **yymsg,
11703 const yypcontext_t *yyctx, struct parser_params *p)
11704{
11705 enum { YYARGS_MAX = 5 };
11706 /* Internationalized format string. */
11707 const char *yyformat = YY_NULLPTR;
11708 /* Arguments of yyformat: reported tokens (one for the "unexpected",
11709 one per "expected"). */
11710 yysymbol_kind_t yyarg[YYARGS_MAX];
11711 /* Cumulated lengths of YYARG. */
11712 YYPTRDIFF_T yysize = 0;
11713
11714 /* Actual size of YYARG. */
11715 int yycount = yy_syntax_error_arguments (yyctx, yyarg, YYARGS_MAX);
11716 if (yycount == YYENOMEM)
11717 return YYENOMEM;
11718
11719 switch (yycount)
11720 {
11721#define YYCASE_(N, S) \
11722 case N: \
11723 yyformat = S; \
11724 break
11725 default: /* Avoid compiler warnings. */
11726 YYCASE_(0, YY_("syntax error"));
11727 YYCASE_(1, YY_("syntax error, unexpected %s"));
11728 YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s"));
11729 YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s"));
11730 YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s"));
11731 YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"));
11732#undef YYCASE_
11733 }
11734
11735 /* Compute error message size. Don't count the "%s"s, but reserve
11736 room for the terminator. */
11737 yysize = yystrlen (yyformat) - 2 * yycount + 1;
11738 {
11739 int yyi;
11740 for (yyi = 0; yyi < yycount; ++yyi)
11741 {
11742 YYPTRDIFF_T yysize1
11743 = yysize + yytnamerr (YY_NULLPTR, yytname[yyarg[yyi]]);
11744 if (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM)
11745 yysize = yysize1;
11746 else
11747 return YYENOMEM;
11748 }
11749 }
11750
11751 if (*yymsg_alloc < yysize)
11752 {
11753 *yymsg_alloc = 2 * yysize;
11754 if (! (yysize <= *yymsg_alloc
11755 && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM))
11756 *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM;
11757 return -1;
11758 }
11759
11760 /* Avoid sprintf, as that infringes on the user's name space.
11761 Don't have undefined behavior even if the translation
11762 produced a string with the wrong number of "%s"s. */
11763 {
11764 char *yyp = *yymsg;
11765 int yyi = 0;
11766 while ((*yyp = *yyformat) != '\0')
11767 if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount)
11768 {
11769 yyp += yytnamerr (yyp, yytname[yyarg[yyi++]]);
11770 yyformat += 2;
11771 }
11772 else
11773 {
11774 ++yyp;
11775 ++yyformat;
11776 }
11777 }
11778 return 0;
11779}
11780
11781
11782/*-----------------------------------------------.
11783| Release the memory associated to this symbol. |
11784`-----------------------------------------------*/
11785
11786static void
11787yydestruct (const char *yymsg,
11788 yysymbol_kind_t yykind, YYSTYPE *yyvaluep, YYLTYPE *yylocationp, struct parser_params *p)
11789{
11790 YY_USE (yyvaluep);
11791 YY_USE (yylocationp);
11792 YY_USE (p);
11793 if (!yymsg)
11794 yymsg = "Deleting";
11795 YY_SYMBOL_PRINT (yymsg, yykind, yyvaluep, yylocationp, p);
11796
11797 YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
11798 switch (yykind)
11799 {
11800 case YYSYMBOL_258_16: /* @16 */
11801#line 2664 "parse.y"
11802 {
11803 if (CASE_LABELS_ENABLED_P(((*yyvaluep).labels))) st_free_table(((*yyvaluep).labels));
11804}
11805#line 11806 "parse.c"
11806 break;
11807
11808 case YYSYMBOL_259_17: /* @17 */
11809#line 2664 "parse.y"
11810 {
11811 if (CASE_LABELS_ENABLED_P(((*yyvaluep).labels))) st_free_table(((*yyvaluep).labels));
11812}
11813#line 11814 "parse.c"
11814 break;
11815
11816 default:
11817 break;
11818 }
11819 YY_IGNORE_MAYBE_UNINITIALIZED_END
11820}
11821
11822
11823
11824
11825
11826
11827/*----------.
11828| yyparse. |
11829`----------*/
11830
11831int
11832yyparse (struct parser_params *p)
11833{
11834/* Lookahead token kind. */
11835int yychar;
11836
11837
11838/* The semantic value of the lookahead symbol. */
11839/* Default value used for initialization, for pacifying older GCCs
11840 or non-GCC compilers. */
11841#ifdef __cplusplus
11842static const YYSTYPE yyval_default = {};
11843(void) yyval_default;
11844#else
11845YY_INITIAL_VALUE (static const YYSTYPE yyval_default;)
11846#endif
11847YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default);
11848
11849/* Location data for the lookahead symbol. */
11850static const YYLTYPE yyloc_default
11851# if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL
11852 = { 1, 1, 1, 1 }
11853# endif
11854;
11855YYLTYPE yylloc = yyloc_default;
11856
11857 /* Number of syntax errors so far. */
11858 int yynerrs = 0;
11859 YY_USE (yynerrs); /* Silence compiler warning. */
11860
11861 yy_state_fast_t yystate = 0;
11862 /* Number of tokens to shift before error messages enabled. */
11863 int yyerrstatus = 0;
11864
11865 /* Refer to the stacks through separate pointers, to allow yyoverflow
11866 to reallocate them elsewhere. */
11867
11868 /* Their size. */
11869 YYPTRDIFF_T yystacksize = YYINITDEPTH;
11870
11871 /* The state stack: array, bottom, top. */
11872 yy_state_t yyssa[YYINITDEPTH];
11873 yy_state_t *yyss = yyssa;
11874 yy_state_t *yyssp = yyss;
11875
11876 /* The semantic value stack: array, bottom, top. */
11877 YYSTYPE yyvsa[YYINITDEPTH];
11878 YYSTYPE *yyvs = yyvsa;
11879 YYSTYPE *yyvsp = yyvs;
11880
11881 /* The location stack: array, bottom, top. */
11882 YYLTYPE yylsa[YYINITDEPTH];
11883 YYLTYPE *yyls = yylsa;
11884 YYLTYPE *yylsp = yyls;
11885
11886 int yyn;
11887 /* The return value of yyparse. */
11888 int yyresult;
11889 /* Lookahead symbol kind. */
11890 yysymbol_kind_t yytoken = YYSYMBOL_YYEMPTY;
11891 /* The variables used to return semantic value and location from the
11892 action routines. */
11893 YYSTYPE yyval;
11894 YYLTYPE yyloc;
11895
11896 /* The locations where the error started and ended. */
11897 YYLTYPE yyerror_range[3];
11898
11899 /* Buffer for error messages, and its allocated size. */
11900 char yymsgbuf[128];
11901 char *yymsg = yymsgbuf;
11902 YYPTRDIFF_T yymsg_alloc = sizeof yymsgbuf;
11903
11904#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N), yylsp -= (N))
11905
11906 /* The number of symbols on the RHS of the reduced rule.
11907 Keep to zero when no symbol should be popped. */
11908 int yylen = 0;
11909
11910 YYDPRINTF ((stderr, "Starting parse\n"));
11911
11912 yychar = YYEMPTY; /* Cause a token to be read. */
11913
11914
11915 /* User initialization code. */
11916#line 2671 "parse.y"
11917 {
11918 RUBY_SET_YYLLOC_OF_NONE(yylloc);
11919}
11920
11921#line 11922 "parse.c"
11922
11923 yylsp[0] = yylloc;
11924 goto yysetstate;
11925
11926
11927/*------------------------------------------------------------.
11928| yynewstate -- push a new state, which is found in yystate. |
11929`------------------------------------------------------------*/
11930yynewstate:
11931 /* In all cases, when you get here, the value and location stacks
11932 have just been pushed. So pushing a state here evens the stacks. */
11933 yyssp++;
11934
11935
11936/*--------------------------------------------------------------------.
11937| yysetstate -- set current state (the top of the stack) to yystate. |
11938`--------------------------------------------------------------------*/
11939yysetstate:
11940 YYDPRINTF ((stderr, "Entering state %d\n", yystate));
11941 YY_ASSERT (0 <= yystate && yystate < YYNSTATES);
11942 YY_IGNORE_USELESS_CAST_BEGIN
11943 *yyssp = YY_CAST (yy_state_t, yystate);
11944 YY_IGNORE_USELESS_CAST_END
11945 YY_STACK_PRINT (yyss, yyssp, p);
11946
11947 if (yyss + yystacksize - 1 <= yyssp)
11948#if !defined yyoverflow && !defined YYSTACK_RELOCATE
11949 YYNOMEM;
11950#else
11951 {
11952 /* Get the current used size of the three stacks, in elements. */
11953 YYPTRDIFF_T yysize = yyssp - yyss + 1;
11954
11955# if defined yyoverflow
11956 {
11957 /* Give user a chance to reallocate the stack. Use copies of
11958 these so that the &'s don't force the real ones into
11959 memory. */
11960 yy_state_t *yyss1 = yyss;
11961 YYSTYPE *yyvs1 = yyvs;
11962 YYLTYPE *yyls1 = yyls;
11963
11964 /* Each stack pointer address is followed by the size of the
11965 data in use in that stack, in bytes. This used to be a
11966 conditional around just the two extra args, but that might
11967 be undefined if yyoverflow is a macro. */
11968 yyoverflow (YY_("memory exhausted"),
11969 &yyss1, yysize * YYSIZEOF (*yyssp),
11970 &yyvs1, yysize * YYSIZEOF (*yyvsp),
11971 &yyls1, yysize * YYSIZEOF (*yylsp),
11972 &yystacksize);
11973 yyss = yyss1;
11974 yyvs = yyvs1;
11975 yyls = yyls1;
11976 }
11977# else /* defined YYSTACK_RELOCATE */
11978 /* Extend the stack our own way. */
11979 if (YYMAXDEPTH <= yystacksize)
11980 YYNOMEM;
11981 yystacksize *= 2;
11982 if (YYMAXDEPTH < yystacksize)
11983 yystacksize = YYMAXDEPTH;
11984
11985 {
11986 yy_state_t *yyss1 = yyss;
11987 union yyalloc *yyptr =
11988 YY_CAST (union yyalloc *,
11989 YYSTACK_ALLOC (YY_CAST (YYSIZE_T, YYSTACK_BYTES (yystacksize))));
11990 if (! yyptr)
11991 YYNOMEM;
11992 YYSTACK_RELOCATE (yyss_alloc, yyss);
11993 YYSTACK_RELOCATE (yyvs_alloc, yyvs);
11994 YYSTACK_RELOCATE (yyls_alloc, yyls);
11995# undef YYSTACK_RELOCATE
11996 if (yyss1 != yyssa)
11997 YYSTACK_FREE (yyss1);
11998 }
11999# endif
12000
12001 yyssp = yyss + yysize - 1;
12002 yyvsp = yyvs + yysize - 1;
12003 yylsp = yyls + yysize - 1;
12004
12005 YY_IGNORE_USELESS_CAST_BEGIN
12006 YYDPRINTF ((stderr, "Stack size increased to %ld\n",
12007 YY_CAST (long, yystacksize)));
12008 YY_IGNORE_USELESS_CAST_END
12009
12010 if (yyss + yystacksize - 1 <= yyssp)
12011 YYABORT;
12012 }
12013#endif /* !defined yyoverflow && !defined YYSTACK_RELOCATE */
12014
12015
12016 if (yystate == YYFINAL)
12017 YYACCEPT;
12018
12019 goto yybackup;
12020
12021
12022/*-----------.
12023| yybackup. |
12024`-----------*/
12025yybackup:
12026 /* Do appropriate processing given the current state. Read a
12027 lookahead token if we need one and don't already have one. */
12028
12029 /* First try to decide what to do without reference to lookahead token. */
12030 yyn = yypact[yystate];
12031 if (yypact_value_is_default (yyn))
12032 goto yydefault;
12033
12034 /* Not known => get a lookahead token if don't already have one. */
12035
12036 /* YYCHAR is either empty, or end-of-input, or a valid lookahead. */
12037 if (yychar == YYEMPTY)
12038 {
12039 YYDPRINTF ((stderr, "Reading a token\n"));
12040 yychar = yylex (&yylval, &yylloc, p);
12041 }
12042
12043 if (yychar <= END_OF_INPUT)
12044 {
12045 yychar = END_OF_INPUT;
12046 yytoken = YYSYMBOL_YYEOF;
12047 YYDPRINTF ((stderr, "Now at end of input.\n"));
12048 }
12049 else if (yychar == YYerror)
12050 {
12051 /* The scanner already issued an error message, process directly
12052 to error recovery. But do not keep the error token as
12053 lookahead, it is too special and may lead us to an endless
12054 loop in error recovery. */
12055 yychar = YYUNDEF;
12056 yytoken = YYSYMBOL_YYerror;
12057 yyerror_range[1] = yylloc;
12058 goto yyerrlab1;
12059 }
12060 else
12061 {
12062 yytoken = YYTRANSLATE (yychar);
12063 YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc, p);
12064 }
12065
12066 /* If the proper action on seeing token YYTOKEN is to reduce or to
12067 detect an error, take that action. */
12068 yyn += yytoken;
12069 if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
12070 goto yydefault;
12071 yyn = yytable[yyn];
12072 if (yyn <= 0)
12073 {
12074 if (yytable_value_is_error (yyn))
12075 goto yyerrlab;
12076 yyn = -yyn;
12077 goto yyreduce;
12078 }
12079
12080 /* Count tokens shifted since error; after three, turn off error
12081 status. */
12082 if (yyerrstatus)
12083 yyerrstatus--;
12084
12085 /* Shift the lookahead token. */
12086 YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc, p);
12087 yystate = yyn;
12088 YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
12089 *++yyvsp = yylval;
12090 YY_IGNORE_MAYBE_UNINITIALIZED_END
12091 *++yylsp = yylloc;
12092 /* %after-shift code. */
12093#line 2674 "parse.y"
12094 {after_shift(p);}
12095#line 12096 "parse.c"
12096
12097
12098 /* Discard the shifted token. */
12099 yychar = YYEMPTY;
12100 goto yynewstate;
12101
12102
12103/*-----------------------------------------------------------.
12104| yydefault -- do the default action for the current state. |
12105`-----------------------------------------------------------*/
12106yydefault:
12107 yyn = yydefact[yystate];
12108 if (yyn == 0)
12109 goto yyerrlab;
12110 goto yyreduce;
12111
12112
12113/*-----------------------------.
12114| yyreduce -- do a reduction. |
12115`-----------------------------*/
12116yyreduce:
12117 /* yyn is the number of a rule to reduce with. */
12118 yylen = yyr2[yyn];
12119
12120 /* If YYLEN is nonzero, implement the default value of the action:
12121 '$$ = $1'.
12122
12123 Otherwise, the following line sets YYVAL to garbage.
12124 This behavior is undocumented and Bison
12125 users should not rely upon it. Assigning to YYVAL
12126 unconditionally makes the parser a bit smaller, and it avoids a
12127 GCC warning that YYVAL may be used uninitialized. */
12128 yyval = yyvsp[1-yylen];
12129 /* %before-reduce function. */
12130#line 2675 "parse.y"
12131 {before_reduce(yylen, p);}
12132#line 12133 "parse.c"
12133
12134
12135 /* Default location. */
12136 YYLLOC_DEFAULT (yyloc, (yylsp - yylen), yylen);
12137 yyerror_range[1] = yyloc;
12138 YY_REDUCE_PRINT (yyn, p);
12139 switch (yyn)
12140 {
12141 case 2: /* $@1: %empty */
12142#line 3170 "parse.y"
12143 {
12144 SET_LEX_STATE(EXPR_BEG);
12145 local_push(p, ifndef_ripper(1)+0);
12146 /* jumps are possible in the top-level loop. */
12147 if (!ifndef_ripper(p->do_loop) + 0) init_block_exit(p);
12148 }
12149#line 12150 "parse.c"
12150 break;
12151
12152 case 5: /* compstmt_top_stmts: top_stmts option_terms */
12153#line 2985 "parse.y"
12154 {
12155 void_stmts(p, (yyval.node) = (yyvsp[-1].node));
12156 }
12157#line 12158 "parse.c"
12158 break;
12159
12160 case 6: /* program: $@1 compstmt_top_stmts */
12161#line 3177 "parse.y"
12162 {
12163 if ((yyvsp[0].node) && !compile_for_eval) {
12164 NODE *node = (yyvsp[0].node);
12165 /* last expression should not be void */
12166 if (nd_type_p(node, NODE_BLOCK)) {
12167 while (RNODE_BLOCK(node)->nd_next) {
12168 node = RNODE_BLOCK(node)->nd_next;
12169 }
12170 node = RNODE_BLOCK(node)->nd_head;
12171 }
12172 node = remove_begin(node);
12173 void_expr(p, node);
12174 }
12175 p->eval_tree = NEW_SCOPE(0, block_append(p, p->eval_tree, (yyvsp[0].node)), NULL, &(yyloc));
12176 /*% ripper[final]: program!($:2) %*/
12177 local_pop(p);
12178 }
12179#line 12180 "parse.c"
12180 break;
12181
12182 case 7: /* top_stmts: none */
12183#line 3197 "parse.y"
12184 {
12185 (yyval.node) = NEW_BEGIN(0, &(yyloc));
12186 /*% ripper: stmts_add!(stmts_new!, void_stmt!) %*/
12187 }
12188#line 12189 "parse.c"
12189 break;
12190
12191 case 8: /* top_stmts: top_stmt */
12192#line 3202 "parse.y"
12193 {
12194 (yyval.node) = newline_node((yyvsp[0].node));
12195 /*% ripper: stmts_add!(stmts_new!, $:1) %*/
12196 }
12197#line 12198 "parse.c"
12198 break;
12199
12200 case 9: /* top_stmts: top_stmts terms top_stmt */
12201#line 3207 "parse.y"
12202 {
12203 (yyval.node) = block_append(p, (yyvsp[-2].node), newline_node((yyvsp[0].node)));
12204 /*% ripper: stmts_add!($:1, $:3) %*/
12205 }
12206#line 12207 "parse.c"
12207 break;
12208
12209 case 10: /* top_stmt: stmt */
12210#line 3214 "parse.y"
12211 {
12212 clear_block_exit(p, true);
12213 (yyval.node) = (yyvsp[0].node);
12214 }
12215#line 12216 "parse.c"
12216 break;
12217
12218 case 11: /* top_stmt: "'BEGIN'" begin_block */
12219#line 3219 "parse.y"
12220 {
12221 (yyval.node) = (yyvsp[0].node);
12222 /*% ripper: $:2 %*/
12223 }
12224#line 12225 "parse.c"
12225 break;
12226
12227 case 12: /* block_open: '{' */
12228#line 3225 "parse.y"
12229 {(yyval.node_exits) = init_block_exit(p);}
12230#line 12231 "parse.c"
12231 break;
12232
12233 case 13: /* begin_block: block_open compstmt_top_stmts '}' */
12234#line 3228 "parse.y"
12235 {
12236 restore_block_exit(p, (yyvsp[-2].node_exits));
12237 p->eval_tree_begin = block_append(p, p->eval_tree_begin,
12238 NEW_BEGIN((yyvsp[-1].node), &(yyloc)));
12239 (yyval.node) = NEW_BEGIN(0, &(yyloc));
12240 /*% ripper: BEGIN!($:2) %*/
12241 }
12242#line 12243 "parse.c"
12243 break;
12244
12245 case 14: /* compstmt_stmts: stmts option_terms */
12246#line 2985 "parse.y"
12247 {
12248 void_stmts(p, (yyval.node) = (yyvsp[-1].node));
12249 }
12250#line 12251 "parse.c"
12251 break;
12252
12253 case 15: /* $@2: %empty */
12254#line 3241 "parse.y"
12255 {
12256 if (!(yyvsp[-1].node)) yyerror1(&(yylsp[0]), "else without rescue is useless");
12257 next_rescue_context(&p->ctxt, &(yyvsp[-2].ctxt), after_else);
12258 }
12259#line 12260 "parse.c"
12260 break;
12261
12262 case 16: /* $@3: %empty */
12263#line 3246 "parse.y"
12264 {
12265 next_rescue_context(&p->ctxt, &(yyvsp[-4].ctxt), after_ensure);
12266 }
12267#line 12268 "parse.c"
12268 break;
12269
12270 case 17: /* bodystmt: compstmt_stmts lex_ctxt opt_rescue k_else $@2 compstmt_stmts $@3 opt_ensure */
12271#line 3250 "parse.y"
12272 {
12273 (yyval.node) = new_bodystmt(p, (yyvsp[-7].node), (yyvsp[-5].node), (yyvsp[-2].node), (yyvsp[0].node), &(yyloc));
12274 /*% ripper: bodystmt!($:body, $:opt_rescue, $:elsebody, $:opt_ensure) %*/
12275 }
12276#line 12277 "parse.c"
12277 break;
12278
12279 case 18: /* $@4: %empty */
12280#line 3257 "parse.y"
12281 {
12282 next_rescue_context(&p->ctxt, &(yyvsp[-1].ctxt), after_ensure);
12283 }
12284#line 12285 "parse.c"
12285 break;
12286
12287 case 19: /* bodystmt: compstmt_stmts lex_ctxt opt_rescue $@4 opt_ensure */
12288#line 3261 "parse.y"
12289 {
12290 (yyval.node) = new_bodystmt(p, (yyvsp[-4].node), (yyvsp[-2].node), 0, (yyvsp[0].node), &(yyloc));
12291 /*% ripper: bodystmt!($:body, $:opt_rescue, Qnil, $:opt_ensure) %*/
12292 }
12293#line 12294 "parse.c"
12294 break;
12295
12296 case 20: /* stmts: none */
12297#line 3268 "parse.y"
12298 {
12299 (yyval.node) = NEW_BEGIN(0, &(yyloc));
12300 /*% ripper: stmts_add!(stmts_new!, void_stmt!) %*/
12301 }
12302#line 12303 "parse.c"
12303 break;
12304
12305 case 21: /* stmts: stmt_or_begin */
12306#line 3273 "parse.y"
12307 {
12308 (yyval.node) = newline_node((yyvsp[0].node));
12309 /*% ripper: stmts_add!(stmts_new!, $:1) %*/
12310 }
12311#line 12312 "parse.c"
12312 break;
12313
12314 case 22: /* stmts: stmts terms stmt_or_begin */
12315#line 3278 "parse.y"
12316 {
12317 (yyval.node) = block_append(p, (yyvsp[-2].node), newline_node((yyvsp[0].node)));
12318 /*% ripper: stmts_add!($:1, $:3) %*/
12319 }
12320#line 12321 "parse.c"
12321 break;
12322
12323 case 24: /* $@5: %empty */
12324#line 3286 "parse.y"
12325 {
12326 yyerror1(&(yylsp[0]), "BEGIN is permitted only at toplevel");
12327 }
12328#line 12329 "parse.c"
12329 break;
12330
12331 case 25: /* stmt_or_begin: "'BEGIN'" $@5 begin_block */
12332#line 3290 "parse.y"
12333 {
12334 (yyval.node) = (yyvsp[0].node);
12335 }
12336#line 12337 "parse.c"
12337 break;
12338
12339 case 26: /* allow_exits: %empty */
12340#line 3295 "parse.y"
12341 {(yyval.node_exits) = allow_block_exit(p);}
12342#line 12343 "parse.c"
12343 break;
12344
12345 case 27: /* k_END: "'END'" lex_ctxt */
12346#line 3298 "parse.y"
12347 {
12348 (yyval.ctxt) = (yyvsp[0].ctxt);
12349 p->ctxt.in_rescue = before_rescue;
12350 /*% ripper: $:2 %*/
12351 }
12352#line 12353 "parse.c"
12353 break;
12354
12355 case 28: /* $@6: %empty */
12356#line 3304 "parse.y"
12357 {SET_LEX_STATE(EXPR_FNAME|EXPR_FITEM);}
12358#line 12359 "parse.c"
12359 break;
12360
12361 case 29: /* stmt: "'alias'" fitem $@6 fitem */
12362#line 3305 "parse.y"
12363 {
12364 (yyval.node) = NEW_ALIAS((yyvsp[-2].node), (yyvsp[0].node), &(yyloc), &(yylsp[-3]));
12365 /*% ripper: alias!($:2, $:4) %*/
12366 }
12367#line 12368 "parse.c"
12368 break;
12369
12370 case 30: /* stmt: "'alias'" "global variable" "global variable" */
12371#line 3310 "parse.y"
12372 {
12373 (yyval.node) = NEW_VALIAS((yyvsp[-1].id), (yyvsp[0].id), &(yyloc), &(yylsp[-2]));
12374 /*% ripper: var_alias!($:2, $:3) %*/
12375 }
12376#line 12377 "parse.c"
12377 break;
12378
12379 case 31: /* stmt: "'alias'" "global variable" "back reference" */
12380#line 3315 "parse.y"
12381 {
12382 char buf[2];
12383 buf[0] = '$';
12384 buf[1] = (char)RNODE_BACK_REF((yyvsp[0].node))->nd_nth;
12385 (yyval.node) = NEW_VALIAS((yyvsp[-1].id), rb_intern2(buf, 2), &(yyloc), &(yylsp[-2]));
12386 /*% ripper: var_alias!($:2, $:3) %*/
12387 }
12388#line 12389 "parse.c"
12389 break;
12390
12391 case 32: /* stmt: "'alias'" "global variable" "numbered reference" */
12392#line 3323 "parse.y"
12393 {
12394 static const char mesg[] = "can't make alias for the number variables";
12395 /*%%%*/
12396 yyerror1(&(yylsp[0]), mesg);
12397 /*% %*/
12398 (yyval.node) = NEW_ERROR(&(yyloc));
12399 /*% ripper[error]: alias_error!(ERR_MESG(), $:3) %*/
12400 }
12401#line 12402 "parse.c"
12402 break;
12403
12404 case 33: /* stmt: "'undef'" undef_list */
12405#line 3332 "parse.y"
12406 {
12407 nd_set_first_loc((yyvsp[0].node), (yylsp[-1]).beg_pos);
12408 RNODE_UNDEF((yyvsp[0].node))->keyword_loc = (yylsp[-1]);
12409 (yyval.node) = (yyvsp[0].node);
12410 /*% ripper: undef!($:2) %*/
12411 }
12412#line 12413 "parse.c"
12413 break;
12414
12415 case 34: /* stmt: stmt "'if' modifier" expr_value */
12416#line 3339 "parse.y"
12417 {
12418 (yyval.node) = new_if(p, (yyvsp[0].node), remove_begin((yyvsp[-2].node)), 0, &(yyloc), &(yylsp[-1]), &NULL_LOC, &NULL_LOC);
12419 fixpos((yyval.node), (yyvsp[0].node));
12420 /*% ripper: if_mod!($:3, $:1) %*/
12421 }
12422#line 12423 "parse.c"
12423 break;
12424
12425 case 35: /* stmt: stmt "'unless' modifier" expr_value */
12426#line 3345 "parse.y"
12427 {
12428 (yyval.node) = new_unless(p, (yyvsp[0].node), remove_begin((yyvsp[-2].node)), 0, &(yyloc), &(yylsp[-1]), &NULL_LOC, &NULL_LOC);
12429 fixpos((yyval.node), (yyvsp[0].node));
12430 /*% ripper: unless_mod!($:3, $:1) %*/
12431 }
12432#line 12433 "parse.c"
12433 break;
12434
12435 case 36: /* stmt: stmt "'while' modifier" expr_value */
12436#line 3351 "parse.y"
12437 {
12438 clear_block_exit(p, false);
12439 if ((yyvsp[-2].node) && nd_type_p((yyvsp[-2].node), NODE_BEGIN)) {
12440 (yyval.node) = NEW_WHILE(cond(p, (yyvsp[0].node), &(yylsp[0])), RNODE_BEGIN((yyvsp[-2].node))->nd_body, 0, &(yyloc), &(yylsp[-1]), &NULL_LOC);
12441 }
12442 else {
12443 (yyval.node) = NEW_WHILE(cond(p, (yyvsp[0].node), &(yylsp[0])), (yyvsp[-2].node), 1, &(yyloc), &(yylsp[-1]), &NULL_LOC);
12444 }
12445 /*% ripper: while_mod!($:3, $:1) %*/
12446 }
12447#line 12448 "parse.c"
12448 break;
12449
12450 case 37: /* stmt: stmt "'until' modifier" expr_value */
12451#line 3362 "parse.y"
12452 {
12453 clear_block_exit(p, false);
12454 if ((yyvsp[-2].node) && nd_type_p((yyvsp[-2].node), NODE_BEGIN)) {
12455 (yyval.node) = NEW_UNTIL(cond(p, (yyvsp[0].node), &(yylsp[0])), RNODE_BEGIN((yyvsp[-2].node))->nd_body, 0, &(yyloc), &(yylsp[-1]), &NULL_LOC);
12456 }
12457 else {
12458 (yyval.node) = NEW_UNTIL(cond(p, (yyvsp[0].node), &(yylsp[0])), (yyvsp[-2].node), 1, &(yyloc), &(yylsp[-1]), &NULL_LOC);
12459 }
12460 /*% ripper: until_mod!($:3, $:1) %*/
12461 }
12462#line 12463 "parse.c"
12463 break;
12464
12465 case 38: /* stmt: stmt "'rescue' modifier" after_rescue stmt */
12466#line 3373 "parse.y"
12467 {
12468 p->ctxt.in_rescue = (yyvsp[-1].ctxt).in_rescue;
12469 NODE *resq;
12470 YYLTYPE loc = code_loc_gen(&(yylsp[-2]), &(yylsp[0]));
12471 resq = NEW_RESBODY(0, 0, remove_begin((yyvsp[0].node)), 0, &loc);
12472 (yyval.node) = NEW_RESCUE(remove_begin((yyvsp[-3].node)), resq, 0, &(yyloc));
12473 /*% ripper: rescue_mod!($:1, $:4) %*/
12474 }
12475#line 12476 "parse.c"
12476 break;
12477
12478 case 39: /* stmt: k_END allow_exits '{' compstmt_stmts '}' */
12479#line 3382 "parse.y"
12480 {
12481 if (p->ctxt.in_def) {
12482 rb_warn0("END in method; use at_exit");
12483 }
12484 restore_block_exit(p, (yyvsp[-3].node_exits));
12485 p->ctxt = (yyvsp[-4].ctxt);
12486 {
12487 NODE *scope = NEW_SCOPE2(0 /* tbl */, 0 /* args */, (yyvsp[-1].node) /* body */, NULL /* parent */, &(yyloc));
12488 (yyval.node) = NEW_POSTEXE(scope, &(yyloc), &(yylsp[-4]), &(yylsp[-2]), &(yylsp[0]));
12489 RNODE_SCOPE(scope)->nd_parent = (yyval.node);
12490 }
12491 /*% ripper: END!($:compstmt) %*/
12492 }
12493#line 12494 "parse.c"
12494 break;
12495
12496 case 41: /* stmt: mlhs '=' lex_ctxt command_call_value */
12497#line 3397 "parse.y"
12498 {
12499 (yyval.node) = node_assign(p, (NODE *)(yyvsp[-3].node_masgn), (yyvsp[0].node), (yyvsp[-1].ctxt), &(yyloc));
12500 /*% ripper: massign!($:1, $:4) %*/
12501 }
12502#line 12503 "parse.c"
12503 break;
12504
12505 case 42: /* asgn_mrhs: lhs '=' lex_ctxt mrhs */
12506#line 2929 "parse.y"
12507 {
12508 (yyval.node) = node_assign(p, (NODE *)(yyvsp[-3].node), (yyvsp[0].node), (yyvsp[-1].ctxt), &(yyloc));
12509 /*% ripper: assign!($:1, $:4) %*/
12510 }
12511#line 12512 "parse.c"
12512 break;
12513
12514 case 44: /* stmt: mlhs '=' lex_ctxt mrhs_arg "'rescue' modifier" after_rescue stmt */
12515#line 3404 "parse.y"
12516 {
12517 p->ctxt.in_rescue = (yyvsp[-4].ctxt).in_rescue;
12518 YYLTYPE loc = code_loc_gen(&(yylsp[-2]), &(yylsp[0]));
12519 (yyvsp[0].node) = NEW_RESBODY(0, 0, remove_begin((yyvsp[0].node)), 0, &loc);
12520 loc.beg_pos = (yylsp[-3]).beg_pos;
12521 (yyvsp[-3].node) = NEW_RESCUE((yyvsp[-3].node), (yyvsp[0].node), 0, &loc);
12522 (yyval.node) = node_assign(p, (NODE *)(yyvsp[-6].node_masgn), (yyvsp[-3].node), (yyvsp[-4].ctxt), &(yyloc));
12523 /*% ripper: massign!($:1, rescue_mod!($:4, $:7)) %*/
12524 }
12525#line 12526 "parse.c"
12526 break;
12527
12528 case 45: /* stmt: mlhs '=' lex_ctxt mrhs_arg */
12529#line 3414 "parse.y"
12530 {
12531 (yyval.node) = node_assign(p, (NODE *)(yyvsp[-3].node_masgn), (yyvsp[0].node), (yyvsp[-1].ctxt), &(yyloc));
12532 /*% ripper: massign!($:1, $:4) %*/
12533 }
12534#line 12535 "parse.c"
12535 break;
12536
12537 case 47: /* stmt: error */
12538#line 3420 "parse.y"
12539 {
12540 (void)yynerrs;
12541 (yyval.node) = NEW_ERROR(&(yyloc));
12542 }
12543#line 12544 "parse.c"
12544 break;
12545
12546 case 48: /* asgn_command_rhs: lhs '=' lex_ctxt command_rhs */
12547#line 2929 "parse.y"
12548 {
12549 (yyval.node) = node_assign(p, (NODE *)(yyvsp[-3].node), (yyvsp[0].node), (yyvsp[-1].ctxt), &(yyloc));
12550 /*% ripper: assign!($:1, $:4) %*/
12551 }
12552#line 12553 "parse.c"
12553 break;
12554
12555 case 50: /* op_asgn_command_rhs: var_lhs "operator-assignment" lex_ctxt command_rhs */
12556#line 3055 "parse.y"
12557 {
12558 (yyval.node) = new_op_assign(p, (yyvsp[-3].node), (yyvsp[-2].id), (yyvsp[0].node), (yyvsp[-1].ctxt), &(yyloc));
12559 /*% ripper: opassign!($:1, $:2, $:4) %*/
12560 }
12561#line 12562 "parse.c"
12562 break;
12563
12564 case 51: /* op_asgn_command_rhs: primary_value '[' opt_call_args rbracket "operator-assignment" lex_ctxt command_rhs */
12565#line 3060 "parse.y"
12566 {
12567 (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]));
12568 /*% ripper: opassign!(aref_field!($:1, $:3), $:5, $:7) %*/
12569 }
12570#line 12571 "parse.c"
12571 break;
12572
12573 case 52: /* op_asgn_command_rhs: primary_value call_op "local variable or method" "operator-assignment" lex_ctxt command_rhs */
12574#line 3065 "parse.y"
12575 {
12576 (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]));
12577 /*% ripper: opassign!(field!($:1, $:2, $:3), $:4, $:6) %*/
12578 }
12579#line 12580 "parse.c"
12580 break;
12581
12582 case 53: /* op_asgn_command_rhs: primary_value call_op "constant" "operator-assignment" lex_ctxt command_rhs */
12583#line 3070 "parse.y"
12584 {
12585 (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]));
12586 /*% ripper: opassign!(field!($:1, $:2, $:3), $:4, $:6) %*/
12587 }
12588#line 12589 "parse.c"
12589 break;
12590
12591 case 54: /* op_asgn_command_rhs: primary_value "::" "local variable or method" "operator-assignment" lex_ctxt command_rhs */
12592#line 3075 "parse.y"
12593 {
12594 (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]));
12595 /*% ripper: opassign!(field!($:1, $:2, $:3), $:4, $:6) %*/
12596 }
12597#line 12598 "parse.c"
12598 break;
12599
12600 case 55: /* op_asgn_command_rhs: primary_value "::" "constant" "operator-assignment" lex_ctxt command_rhs */
12601#line 3080 "parse.y"
12602 {
12603 YYLTYPE loc = code_loc_gen(&(yylsp[-5]), &(yylsp[-3]));
12604 (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));
12605 /*% ripper: opassign!(const_path_field!($:1, $:3), $:4, $:6) %*/
12606 }
12607#line 12608 "parse.c"
12608 break;
12609
12610 case 56: /* op_asgn_command_rhs: ":: at EXPR_BEG" "constant" "operator-assignment" lex_ctxt command_rhs */
12611#line 3086 "parse.y"
12612 {
12613 YYLTYPE loc = code_loc_gen(&(yylsp[-4]), &(yylsp[-3]));
12614 (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));
12615 /*% ripper: opassign!(top_const_field!($:2), $:3, $:5) %*/
12616 }
12617#line 12618 "parse.c"
12618 break;
12619
12620 case 57: /* op_asgn_command_rhs: backref "operator-assignment" lex_ctxt command_rhs */
12621#line 3092 "parse.y"
12622 {
12623 VALUE MAYBE_UNUSED(e) = rb_backref_error(p, (yyvsp[-3].node));
12624 (yyval.node) = NEW_ERROR(&(yyloc));
12625 /*% ripper[error]: assign_error!(?e, opassign!(var_field!($:1), $:2, $:4)) %*/
12626 }
12627#line 12628 "parse.c"
12628 break;
12629
12630 case 59: /* def_endless_method_endless_command: defn_head f_opt_paren_args '=' endless_command */
12631#line 2960 "parse.y"
12632 {
12633 endless_method_name(p, (yyvsp[-3].node_def_temp)->nd_mid, &(yylsp[-3]));
12634 restore_defun(p, (yyvsp[-3].node_def_temp));
12635 ((yyval.node) = (yyvsp[-3].node_def_temp)->nd_def)->nd_loc = (yyloc);
12636 (yyvsp[0].node) = new_scope_body(p, (yyvsp[-2].node_args), (yyvsp[0].node), (yyval.node), &(yyloc));
12637 RNODE_DEFN((yyval.node))->nd_defn = (yyvsp[0].node);
12638 /*% ripper: bodystmt!($:bodystmt, Qnil, Qnil, Qnil) %*/
12639 /*% ripper: def!($:head, $:args, $:$) %*/
12640 local_pop(p);
12641 }
12642#line 12643 "parse.c"
12643 break;
12644
12645 case 60: /* def_endless_method_endless_command: defs_head f_opt_paren_args '=' endless_command */
12646#line 2971 "parse.y"
12647 {
12648 endless_method_name(p, (yyvsp[-3].node_def_temp)->nd_mid, &(yylsp[-3]));
12649 restore_defun(p, (yyvsp[-3].node_def_temp));
12650 ((yyval.node) = (yyvsp[-3].node_def_temp)->nd_def)->nd_loc = (yyloc);
12651 (yyvsp[0].node) = new_scope_body(p, (yyvsp[-2].node_args), (yyvsp[0].node), (yyval.node), &(yyloc));
12652 RNODE_DEFS((yyval.node))->nd_defn = (yyvsp[0].node);
12653 /*% ripper: bodystmt!($:bodystmt, Qnil, Qnil, Qnil) %*/
12654 /*% ripper: defs!(*$:head[0..2], $:args, $:$) %*/
12655 local_pop(p);
12656 }
12657#line 12658 "parse.c"
12658 break;
12659
12660 case 63: /* endless_command: endless_command "'rescue' modifier" after_rescue arg */
12661#line 3433 "parse.y"
12662 {
12663 p->ctxt.in_rescue = (yyvsp[-1].ctxt).in_rescue;
12664 (yyval.node) = rescued_expr(p, (yyvsp[-3].node), (yyvsp[0].node), &(yylsp[-3]), &(yylsp[-2]), &(yylsp[0]));
12665 /*% ripper: rescue_mod!($:1, $:4) %*/
12666 }
12667#line 12668 "parse.c"
12668 break;
12669
12670 case 66: /* endless_command: "'not'" option_'\n' endless_command */
12671#line 3439 "parse.y"
12672 {
12673 (yyval.node) = call_uni_op(p, method_cond(p, (yyvsp[0].node), &(yylsp[0])), METHOD_NOT, &(yylsp[-2]), &(yyloc));
12674 /*% ripper: unary!(ID2VAL(idNOT), $:3) %*/
12675 }
12676#line 12677 "parse.c"
12677 break;
12678
12679 case 68: /* command_rhs: command_call_value "'rescue' modifier" after_rescue stmt */
12680#line 3447 "parse.y"
12681 {
12682 p->ctxt.in_rescue = (yyvsp[-1].ctxt).in_rescue;
12683 YYLTYPE loc = code_loc_gen(&(yylsp[-2]), &(yylsp[0]));
12684 (yyval.node) = NEW_RESCUE((yyvsp[-3].node), NEW_RESBODY(0, 0, remove_begin((yyvsp[0].node)), 0, &loc), 0, &(yyloc));
12685 /*% ripper: rescue_mod!($:1, $:4) %*/
12686 }
12687#line 12688 "parse.c"
12688 break;
12689
12690 case 71: /* expr: expr "'and'" expr */
12691#line 3458 "parse.y"
12692 {
12693 (yyval.node) = logop(p, idAND, (yyvsp[-2].node), (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
12694 /*% ripper: binary!($:1, ID2VAL(idAND), $:3) %*/
12695 }
12696#line 12697 "parse.c"
12697 break;
12698
12699 case 72: /* expr: expr "'or'" expr */
12700#line 3463 "parse.y"
12701 {
12702 (yyval.node) = logop(p, idOR, (yyvsp[-2].node), (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
12703 /*% ripper: binary!($:1, ID2VAL(idOR), $:3) %*/
12704 }
12705#line 12706 "parse.c"
12706 break;
12707
12708 case 73: /* expr: "'not'" option_'\n' expr */
12709#line 3468 "parse.y"
12710 {
12711 (yyval.node) = call_uni_op(p, method_cond(p, (yyvsp[0].node), &(yylsp[0])), METHOD_NOT, &(yylsp[-2]), &(yyloc));
12712 /*% ripper: unary!(ID2VAL(idNOT), $:3) %*/
12713 }
12714#line 12715 "parse.c"
12715 break;
12716
12717 case 74: /* expr: '!' command_call */
12718#line 3473 "parse.y"
12719 {
12720 (yyval.node) = call_uni_op(p, method_cond(p, (yyvsp[0].node), &(yylsp[0])), '!', &(yylsp[-1]), &(yyloc));
12721 /*% ripper: unary!(ID2VAL('\'!\''), $:2) %*/
12722 }
12723#line 12724 "parse.c"
12724 break;
12725
12726 case 75: /* $@7: %empty */
12727#line 3478 "parse.y"
12728 {
12729 value_expr(p, (yyvsp[-1].node));
12730 }
12731#line 12732 "parse.c"
12732 break;
12733
12734 case 76: /* expr: arg "=>" $@7 p_in_kwarg p_pvtbl p_pktbl p_top_expr_body */
12735#line 3483 "parse.y"
12736 {
12737 pop_pktbl(p, (yyvsp[-1].tbl));
12738 pop_pvtbl(p, (yyvsp[-2].tbl));
12739 p->ctxt.in_kwarg = (yyvsp[-3].ctxt).in_kwarg;
12740 p->ctxt.in_alt_pattern = (yyvsp[-3].ctxt).in_alt_pattern;
12741 p->ctxt.capture_in_pattern = (yyvsp[-3].ctxt).capture_in_pattern;
12742 (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);
12743 /*% ripper: case!($:arg, in!($:body, Qnil, Qnil)) %*/
12744 }
12745#line 12746 "parse.c"
12746 break;
12747
12748 case 77: /* $@8: %empty */
12749#line 3493 "parse.y"
12750 {
12751 value_expr(p, (yyvsp[-1].node));
12752 }
12753#line 12754 "parse.c"
12754 break;
12755
12756 case 78: /* expr: arg "'in'" $@8 p_in_kwarg p_pvtbl p_pktbl p_top_expr_body */
12757#line 3498 "parse.y"
12758 {
12759 pop_pktbl(p, (yyvsp[-1].tbl));
12760 pop_pvtbl(p, (yyvsp[-2].tbl));
12761 p->ctxt.in_kwarg = (yyvsp[-3].ctxt).in_kwarg;
12762 p->ctxt.in_alt_pattern = (yyvsp[-3].ctxt).in_alt_pattern;
12763 p->ctxt.capture_in_pattern = (yyvsp[-3].ctxt).capture_in_pattern;
12764 (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);
12765 /*% ripper: case!($:arg, in!($:body, Qnil, Qnil)) %*/
12766 }
12767#line 12768 "parse.c"
12768 break;
12769
12770 case 80: /* def_name: fname */
12771#line 3511 "parse.y"
12772 {
12773 numparam_name(p, (yyvsp[0].id));
12774 local_push(p, 0);
12775 p->ctxt.in_def = 1;
12776 p->ctxt.in_rescue = before_rescue;
12777 p->ctxt.cant_return = 0;
12778 (yyval.id) = (yyvsp[0].id);
12779 }
12780#line 12781 "parse.c"
12781 break;
12782
12783 case 81: /* defn_head: k_def def_name */
12784#line 3522 "parse.y"
12785 {
12786 (yyval.node_def_temp) = def_head_save(p, (yyvsp[-1].node_def_temp));
12787 (yyval.node_def_temp)->nd_mid = (yyvsp[0].id);
12788 (yyval.node_def_temp)->nd_def = NEW_DEFN((yyvsp[0].id), 0, &(yyloc));
12789 /*% ripper: $:def_name %*/
12790 }
12791#line 12792 "parse.c"
12792 break;
12793
12794 case 82: /* $@9: %empty */
12795#line 3531 "parse.y"
12796 {
12797 SET_LEX_STATE(EXPR_FNAME);
12798 }
12799#line 12800 "parse.c"
12800 break;
12801
12802 case 83: /* defs_head: k_def singleton dot_or_colon $@9 def_name */
12803#line 3535 "parse.y"
12804 {
12805 SET_LEX_STATE(EXPR_ENDFN|EXPR_LABEL); /* force for args */
12806 (yyval.node_def_temp) = def_head_save(p, (yyvsp[-4].node_def_temp));
12807 (yyval.node_def_temp)->nd_mid = (yyvsp[0].id);
12808 (yyval.node_def_temp)->nd_def = NEW_DEFS((yyvsp[-3].node), (yyvsp[0].id), 0, &(yyloc));
12809 /*% ripper: [$:singleton, $:dot_or_colon, $:def_name] %*/
12810 }
12811#line 12812 "parse.c"
12812 break;
12813
12814 case 84: /* value_expr_expr: expr */
12815#line 3155 "parse.y"
12816 {
12817 value_expr(p, (yyvsp[0].node));
12818 (yyval.node) = (yyvsp[0].node);
12819 }
12820#line 12821 "parse.c"
12821 break;
12822
12823 case 86: /* expr_value: error */
12824#line 3546 "parse.y"
12825 {
12826 (yyval.node) = NEW_ERROR(&(yyloc));
12827 }
12828#line 12829 "parse.c"
12829 break;
12830
12831 case 87: /* $@10: %empty */
12832#line 3551 "parse.y"
12833 {COND_PUSH(1);}
12834#line 12835 "parse.c"
12835 break;
12836
12837 case 88: /* $@11: %empty */
12838#line 3551 "parse.y"
12839 {COND_POP();}
12840#line 12841 "parse.c"
12841 break;
12842
12843 case 89: /* expr_value_do: $@10 expr_value do $@11 */
12844#line 3552 "parse.y"
12845 {
12846 (yyval.node) = (yyvsp[-2].node);
12847 /*% ripper: $:2 %*/
12848 }
12849#line 12850 "parse.c"
12850 break;
12851
12852 case 92: /* value_expr_command_call: command_call */
12853#line 3155 "parse.y"
12854 {
12855 value_expr(p, (yyvsp[0].node));
12856 (yyval.node) = (yyvsp[0].node);
12857 }
12858#line 12859 "parse.c"
12859 break;
12860
12861 case 95: /* block_command: block_call call_op2 operation2 command_args */
12862#line 3567 "parse.y"
12863 {
12864 (yyval.node) = new_qcall(p, (yyvsp[-2].id), (yyvsp[-3].node), (yyvsp[-1].id), (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
12865 /*% ripper: method_add_arg!(call!($:1, $:2, $:3), $:4) %*/
12866 }
12867#line 12868 "parse.c"
12868 break;
12869
12870 case 96: /* cmd_brace_block: "{ arg" brace_body '}' */
12871#line 3574 "parse.y"
12872 {
12873 (yyval.node) = (yyvsp[-1].node);
12874 set_embraced_location((yyval.node), &(yylsp[-2]), &(yylsp[0]));
12875 /*% ripper: $:2 %*/
12876 }
12877#line 12878 "parse.c"
12878 break;
12879
12880 case 97: /* fcall: "local variable or method" */
12881#line 3582 "parse.y"
12882 {
12883 (yyval.node_fcall) = NEW_FCALL((yyvsp[0].id), 0, &(yyloc));
12884 /*% ripper: $:1 %*/
12885 }
12886#line 12887 "parse.c"
12887 break;
12888
12889 case 98: /* fcall: "constant" */
12890#line 3582 "parse.y"
12891 {
12892 (yyval.node_fcall) = NEW_FCALL((yyvsp[0].id), 0, &(yyloc));
12893 /*% ripper: $:1 %*/
12894 }
12895#line 12896 "parse.c"
12896 break;
12897
12898 case 99: /* fcall: "method" */
12899#line 3582 "parse.y"
12900 {
12901 (yyval.node_fcall) = NEW_FCALL((yyvsp[0].id), 0, &(yyloc));
12902 /*% ripper: $:1 %*/
12903 }
12904#line 12905 "parse.c"
12905 break;
12906
12907 case 100: /* command: fcall command_args */
12908#line 3589 "parse.y"
12909 {
12910 (yyvsp[-1].node_fcall)->nd_args = (yyvsp[0].node);
12911 nd_set_last_loc((yyvsp[-1].node_fcall), (yylsp[0]).end_pos);
12912 (yyval.node) = (NODE *)(yyvsp[-1].node_fcall);
12913 /*% ripper: command!($:1, $:2) %*/
12914 }
12915#line 12916 "parse.c"
12916 break;
12917
12918 case 101: /* command: fcall command_args cmd_brace_block */
12919#line 3596 "parse.y"
12920 {
12921 block_dup_check(p, (yyvsp[-1].node), (yyvsp[0].node));
12922 (yyvsp[-2].node_fcall)->nd_args = (yyvsp[-1].node);
12923 (yyval.node) = method_add_block(p, (NODE *)(yyvsp[-2].node_fcall), (yyvsp[0].node), &(yyloc));
12924 fixpos((yyval.node), RNODE((yyvsp[-2].node_fcall)));
12925 nd_set_last_loc((yyvsp[-2].node_fcall), (yylsp[-1]).end_pos);
12926 /*% ripper: method_add_block!(command!($:1, $:2), $:3) %*/
12927 }
12928#line 12929 "parse.c"
12929 break;
12930
12931 case 102: /* command: primary_value call_op operation2 command_args */
12932#line 3605 "parse.y"
12933 {
12934 (yyval.node) = new_command_qcall(p, (yyvsp[-2].id), (yyvsp[-3].node), (yyvsp[-1].id), (yyvsp[0].node), 0, &(yylsp[-1]), &(yyloc));
12935 /*% ripper: command_call!($:1, $:2, $:3, $:4) %*/
12936 }
12937#line 12938 "parse.c"
12938 break;
12939
12940 case 103: /* command: primary_value call_op operation2 command_args cmd_brace_block */
12941#line 3610 "parse.y"
12942 {
12943 (yyval.node) = new_command_qcall(p, (yyvsp[-3].id), (yyvsp[-4].node), (yyvsp[-2].id), (yyvsp[-1].node), (yyvsp[0].node), &(yylsp[-2]), &(yyloc));
12944 /*% ripper: method_add_block!(command_call!($:1, $:2, $:3, $:4), $:5) %*/
12945 }
12946#line 12947 "parse.c"
12947 break;
12948
12949 case 104: /* command: primary_value "::" operation2 command_args */
12950#line 3615 "parse.y"
12951 {
12952 (yyval.node) = new_command_qcall(p, idCOLON2, (yyvsp[-3].node), (yyvsp[-1].id), (yyvsp[0].node), 0, &(yylsp[-1]), &(yyloc));
12953 /*% ripper: command_call!($:1, $:2, $:3, $:4) %*/
12954 }
12955#line 12956 "parse.c"
12956 break;
12957
12958 case 105: /* command: primary_value "::" operation2 command_args cmd_brace_block */
12959#line 3620 "parse.y"
12960 {
12961 (yyval.node) = new_command_qcall(p, idCOLON2, (yyvsp[-4].node), (yyvsp[-2].id), (yyvsp[-1].node), (yyvsp[0].node), &(yylsp[-2]), &(yyloc));
12962 /*% ripper: method_add_block!(command_call!($:1, $:2, $:3, $:4), $:5) %*/
12963 }
12964#line 12965 "parse.c"
12965 break;
12966
12967 case 106: /* command: primary_value "::" "constant" '{' brace_body '}' */
12968#line 3625 "parse.y"
12969 {
12970 set_embraced_location((yyvsp[-1].node), &(yylsp[-2]), &(yylsp[0]));
12971 (yyval.node) = new_command_qcall(p, idCOLON2, (yyvsp[-5].node), (yyvsp[-3].id), 0, (yyvsp[-1].node), &(yylsp[-3]), &(yyloc));
12972 /*% ripper: method_add_block!(command_call!($:1, $:2, $:3, Qnil), $:5) %*/
12973 }
12974#line 12975 "parse.c"
12975 break;
12976
12977 case 107: /* command: "'super'" command_args */
12978#line 3631 "parse.y"
12979 {
12980 (yyval.node) = NEW_SUPER((yyvsp[0].node), &(yyloc), &(yylsp[-1]), &NULL_LOC, &NULL_LOC);
12981 fixpos((yyval.node), (yyvsp[0].node));
12982 /*% ripper: super!($:2) %*/
12983 }
12984#line 12985 "parse.c"
12985 break;
12986
12987 case 108: /* command: k_yield command_args */
12988#line 3637 "parse.y"
12989 {
12990 (yyval.node) = NEW_YIELD((yyvsp[0].node), &(yyloc), &(yylsp[-1]), &NULL_LOC, &NULL_LOC);
12991 fixpos((yyval.node), (yyvsp[0].node));
12992 /*% ripper: yield!($:2) %*/
12993 }
12994#line 12995 "parse.c"
12995 break;
12996
12997 case 109: /* command: k_return_arg call_args */
12998#line 3643 "parse.y"
12999 {
13000 CMDARG_POP();
13001 (yyval.node) = NEW_RETURN(ret_args(p, (yyvsp[0].node)), &(yyloc), &(yylsp[-1]));
13002 /*% ripper: return!($:2) %*/
13003 }
13004#line 13005 "parse.c"
13005 break;
13006
13007 case 110: /* command: k_break_arg call_args */
13008#line 3649 "parse.y"
13009 {
13010 CMDARG_POP();
13011 NODE *args = 0;
13012 args = ret_args(p, (yyvsp[0].node));
13013 (yyval.node) = add_block_exit(p, NEW_BREAK(args, &(yyloc), &(yylsp[-1])));
13014 /*% ripper: break!($:2) %*/
13015 }
13016#line 13017 "parse.c"
13017 break;
13018
13019 case 111: /* command: k_next_arg call_args */
13020#line 3657 "parse.y"
13021 {
13022 CMDARG_POP();
13023 NODE *args = 0;
13024 args = ret_args(p, (yyvsp[0].node));
13025 (yyval.node) = add_block_exit(p, NEW_NEXT(args, &(yyloc), &(yylsp[-1])));
13026 /*% ripper: next!($:2) %*/
13027 }
13028#line 13029 "parse.c"
13029 break;
13030
13031 case 113: /* mlhs: "(" mlhs_inner rparen */
13032#line 3668 "parse.y"
13033 {
13034 (yyval.node_masgn) = (yyvsp[-1].node_masgn);
13035 /*% ripper: mlhs_paren!($:2) %*/
13036 }
13037#line 13038 "parse.c"
13038 break;
13039
13040 case 115: /* mlhs_inner: "(" mlhs_inner rparen */
13041#line 3676 "parse.y"
13042 {
13043 (yyval.node_masgn) = NEW_MASGN(NEW_LIST((NODE *)(yyvsp[-1].node_masgn), &(yyloc)), 0, &(yyloc));
13044 /*% ripper: mlhs_paren!($:2) %*/
13045 }
13046#line 13047 "parse.c"
13047 break;
13048
13049 case 116: /* mlhs_basic: mlhs_head */
13050#line 3683 "parse.y"
13051 {
13052 (yyval.node_masgn) = NEW_MASGN((yyvsp[0].node), 0, &(yyloc));
13053 /*% ripper: $:1 %*/
13054 }
13055#line 13056 "parse.c"
13056 break;
13057
13058 case 117: /* mlhs_basic: mlhs_head mlhs_item */
13059#line 3688 "parse.y"
13060 {
13061 (yyval.node_masgn) = NEW_MASGN(list_append(p, (yyvsp[-1].node), (yyvsp[0].node)), 0, &(yyloc));
13062 /*% ripper: mlhs_add!($:1, $:2) %*/
13063 }
13064#line 13065 "parse.c"
13065 break;
13066
13067 case 118: /* mlhs_basic: mlhs_head "*" mlhs_node */
13068#line 3693 "parse.y"
13069 {
13070 (yyval.node_masgn) = NEW_MASGN((yyvsp[-2].node), (yyvsp[0].node), &(yyloc));
13071 /*% ripper: mlhs_add_star!($:1, $:3) %*/
13072 }
13073#line 13074 "parse.c"
13074 break;
13075
13076 case 119: /* mlhs_items_mlhs_item: mlhs_item */
13077#line 3042 "parse.y"
13078 {
13079 (yyval.node) = NEW_LIST((yyvsp[0].node), &(yyloc));
13080 /*% ripper: mlhs_add!(mlhs_new!, $:1) %*/
13081 }
13082#line 13083 "parse.c"
13083 break;
13084
13085 case 120: /* mlhs_items_mlhs_item: mlhs_items_mlhs_item ',' mlhs_item */
13086#line 3047 "parse.y"
13087 {
13088 (yyval.node) = list_append(p, (yyvsp[-2].node), (yyvsp[0].node));
13089 /*% ripper: mlhs_add!($:1, $:3) %*/
13090 }
13091#line 13092 "parse.c"
13092 break;
13093
13094 case 121: /* mlhs_basic: mlhs_head "*" mlhs_node ',' mlhs_items_mlhs_item */
13095#line 3698 "parse.y"
13096 {
13097 (yyval.node_masgn) = NEW_MASGN((yyvsp[-4].node), NEW_POSTARG((yyvsp[-2].node),(yyvsp[0].node),&(yyloc)), &(yyloc));
13098 /*% ripper: mlhs_add_post!(mlhs_add_star!($:1, $:3), $:5) %*/
13099 }
13100#line 13101 "parse.c"
13101 break;
13102
13103 case 122: /* mlhs_basic: mlhs_head "*" */
13104#line 3703 "parse.y"
13105 {
13106 (yyval.node_masgn) = NEW_MASGN((yyvsp[-1].node), NODE_SPECIAL_NO_NAME_REST, &(yyloc));
13107 /*% ripper: mlhs_add_star!($:1, Qnil) %*/
13108 }
13109#line 13110 "parse.c"
13110 break;
13111
13112 case 123: /* mlhs_basic: mlhs_head "*" ',' mlhs_items_mlhs_item */
13113#line 3708 "parse.y"
13114 {
13115 (yyval.node_masgn) = NEW_MASGN((yyvsp[-3].node), NEW_POSTARG(NODE_SPECIAL_NO_NAME_REST, (yyvsp[0].node), &(yyloc)), &(yyloc));
13116 /*% ripper: mlhs_add_post!(mlhs_add_star!($:1, Qnil), $:4) %*/
13117 }
13118#line 13119 "parse.c"
13119 break;
13120
13121 case 124: /* mlhs_basic: "*" mlhs_node */
13122#line 3713 "parse.y"
13123 {
13124 (yyval.node_masgn) = NEW_MASGN(0, (yyvsp[0].node), &(yyloc));
13125 /*% ripper: mlhs_add_star!(mlhs_new!, $:2) %*/
13126 }
13127#line 13128 "parse.c"
13128 break;
13129
13130 case 125: /* mlhs_basic: "*" mlhs_node ',' mlhs_items_mlhs_item */
13131#line 3718 "parse.y"
13132 {
13133 (yyval.node_masgn) = NEW_MASGN(0, NEW_POSTARG((yyvsp[-2].node),(yyvsp[0].node),&(yyloc)), &(yyloc));
13134 /*% ripper: mlhs_add_post!(mlhs_add_star!(mlhs_new!, $:2), $:4) %*/
13135 }
13136#line 13137 "parse.c"
13137 break;
13138
13139 case 126: /* mlhs_basic: "*" */
13140#line 3723 "parse.y"
13141 {
13142 (yyval.node_masgn) = NEW_MASGN(0, NODE_SPECIAL_NO_NAME_REST, &(yyloc));
13143 /*% ripper: mlhs_add_star!(mlhs_new!, Qnil) %*/
13144 }
13145#line 13146 "parse.c"
13146 break;
13147
13148 case 127: /* mlhs_basic: "*" ',' mlhs_items_mlhs_item */
13149#line 3728 "parse.y"
13150 {
13151 (yyval.node_masgn) = NEW_MASGN(0, NEW_POSTARG(NODE_SPECIAL_NO_NAME_REST, (yyvsp[0].node), &(yyloc)), &(yyloc));
13152 /*% ripper: mlhs_add_post!(mlhs_add_star!(mlhs_new!, Qnil), $:3) %*/
13153 }
13154#line 13155 "parse.c"
13155 break;
13156
13157 case 129: /* mlhs_item: "(" mlhs_inner rparen */
13158#line 3736 "parse.y"
13159 {
13160 (yyval.node) = (NODE *)(yyvsp[-1].node_masgn);
13161 /*% ripper: mlhs_paren!($:2) %*/
13162 }
13163#line 13164 "parse.c"
13164 break;
13165
13166 case 130: /* mlhs_head: mlhs_item ',' */
13167#line 3743 "parse.y"
13168 {
13169 (yyval.node) = NEW_LIST((yyvsp[-1].node), &(yylsp[-1]));
13170 /*% ripper: mlhs_add!(mlhs_new!, $:1) %*/
13171 }
13172#line 13173 "parse.c"
13173 break;
13174
13175 case 131: /* mlhs_head: mlhs_head mlhs_item ',' */
13176#line 3748 "parse.y"
13177 {
13178 (yyval.node) = list_append(p, (yyvsp[-2].node), (yyvsp[-1].node));
13179 /*% ripper: mlhs_add!($:1, $:2) %*/
13180 }
13181#line 13182 "parse.c"
13182 break;
13183
13184 case 132: /* mlhs_node: user_variable */
13185#line 3756 "parse.y"
13186 {
13187 /*% ripper: var_field!($:1) %*/
13188 (yyval.node) = assignable(p, (yyvsp[0].id), 0, &(yyloc));
13189 }
13190#line 13191 "parse.c"
13191 break;
13192
13193 case 133: /* mlhs_node: keyword_variable */
13194#line 3756 "parse.y"
13195 {
13196 /*% ripper: var_field!($:1) %*/
13197 (yyval.node) = assignable(p, (yyvsp[0].id), 0, &(yyloc));
13198 }
13199#line 13200 "parse.c"
13200 break;
13201
13202 case 134: /* mlhs_node: primary_value '[' opt_call_args rbracket */
13203#line 3761 "parse.y"
13204 {
13205 (yyval.node) = aryset(p, (yyvsp[-3].node), (yyvsp[-1].node), &(yyloc));
13206 /*% ripper: aref_field!($:1, $:3) %*/
13207 }
13208#line 13209 "parse.c"
13209 break;
13210
13211 case 135: /* mlhs_node: primary_value call_op "local variable or method" */
13212#line 3766 "parse.y"
13213 {
13214 anddot_multiple_assignment_check(p, &(yylsp[-1]), (yyvsp[-1].id));
13215 (yyval.node) = attrset(p, (yyvsp[-2].node), (yyvsp[-1].id), (yyvsp[0].id), &(yyloc));
13216 /*% ripper: field!($:1, $:2, $:3) %*/
13217 }
13218#line 13219 "parse.c"
13219 break;
13220
13221 case 136: /* mlhs_node: primary_value call_op "constant" */
13222#line 3766 "parse.y"
13223 {
13224 anddot_multiple_assignment_check(p, &(yylsp[-1]), (yyvsp[-1].id));
13225 (yyval.node) = attrset(p, (yyvsp[-2].node), (yyvsp[-1].id), (yyvsp[0].id), &(yyloc));
13226 /*% ripper: field!($:1, $:2, $:3) %*/
13227 }
13228#line 13229 "parse.c"
13229 break;
13230
13231 case 137: /* mlhs_node: primary_value "::" "local variable or method" */
13232#line 3772 "parse.y"
13233 {
13234 (yyval.node) = attrset(p, (yyvsp[-2].node), idCOLON2, (yyvsp[0].id), &(yyloc));
13235 /*% ripper: const_path_field!($:1, $:3) %*/
13236 }
13237#line 13238 "parse.c"
13238 break;
13239
13240 case 138: /* mlhs_node: primary_value "::" "constant" */
13241#line 3777 "parse.y"
13242 {
13243 /*% ripper: const_path_field!($:1, $:3) %*/
13244 (yyval.node) = const_decl(p, NEW_COLON2((yyvsp[-2].node), (yyvsp[0].id), &(yyloc), &(yylsp[-1]), &(yylsp[0])), &(yyloc));
13245 }
13246#line 13247 "parse.c"
13247 break;
13248
13249 case 139: /* mlhs_node: ":: at EXPR_BEG" "constant" */
13250#line 3782 "parse.y"
13251 {
13252 /*% ripper: top_const_field!($:2) %*/
13253 (yyval.node) = const_decl(p, NEW_COLON3((yyvsp[0].id), &(yyloc), &(yylsp[-1]), &(yylsp[0])), &(yyloc));
13254 }
13255#line 13256 "parse.c"
13256 break;
13257
13258 case 140: /* mlhs_node: backref */
13259#line 3787 "parse.y"
13260 {
13261 VALUE MAYBE_UNUSED(e) = rb_backref_error(p, (yyvsp[0].node));
13262 (yyval.node) = NEW_ERROR(&(yyloc));
13263 /*% ripper[error]: assign_error!(?e, var_field!($:1)) %*/
13264 }
13265#line 13266 "parse.c"
13266 break;
13267
13268 case 141: /* lhs: user_variable */
13269#line 3795 "parse.y"
13270 {
13271 /*% ripper: var_field!($:1) %*/
13272 (yyval.node) = assignable(p, (yyvsp[0].id), 0, &(yyloc));
13273 }
13274#line 13275 "parse.c"
13275 break;
13276
13277 case 142: /* lhs: keyword_variable */
13278#line 3795 "parse.y"
13279 {
13280 /*% ripper: var_field!($:1) %*/
13281 (yyval.node) = assignable(p, (yyvsp[0].id), 0, &(yyloc));
13282 }
13283#line 13284 "parse.c"
13284 break;
13285
13286 case 143: /* lhs: primary_value '[' opt_call_args rbracket */
13287#line 3800 "parse.y"
13288 {
13289 (yyval.node) = aryset(p, (yyvsp[-3].node), (yyvsp[-1].node), &(yyloc));
13290 /*% ripper: aref_field!($:1, $:3) %*/
13291 }
13292#line 13293 "parse.c"
13293 break;
13294
13295 case 144: /* lhs: primary_value call_op "local variable or method" */
13296#line 3805 "parse.y"
13297 {
13298 (yyval.node) = attrset(p, (yyvsp[-2].node), (yyvsp[-1].id), (yyvsp[0].id), &(yyloc));
13299 /*% ripper: field!($:1, $:2, $:3) %*/
13300 }
13301#line 13302 "parse.c"
13302 break;
13303
13304 case 145: /* lhs: primary_value call_op "constant" */
13305#line 3805 "parse.y"
13306 {
13307 (yyval.node) = attrset(p, (yyvsp[-2].node), (yyvsp[-1].id), (yyvsp[0].id), &(yyloc));
13308 /*% ripper: field!($:1, $:2, $:3) %*/
13309 }
13310#line 13311 "parse.c"
13311 break;
13312
13313 case 146: /* lhs: primary_value "::" "local variable or method" */
13314#line 3810 "parse.y"
13315 {
13316 (yyval.node) = attrset(p, (yyvsp[-2].node), idCOLON2, (yyvsp[0].id), &(yyloc));
13317 /*% ripper: field!($:1, $:2, $:3) %*/
13318 }
13319#line 13320 "parse.c"
13320 break;
13321
13322 case 147: /* lhs: primary_value "::" "constant" */
13323#line 3815 "parse.y"
13324 {
13325 /*% ripper: const_path_field!($:1, $:3) %*/
13326 (yyval.node) = const_decl(p, NEW_COLON2((yyvsp[-2].node), (yyvsp[0].id), &(yyloc), &(yylsp[-1]), &(yylsp[0])), &(yyloc));
13327 }
13328#line 13329 "parse.c"
13329 break;
13330
13331 case 148: /* lhs: ":: at EXPR_BEG" "constant" */
13332#line 3820 "parse.y"
13333 {
13334 /*% ripper: top_const_field!($:2) %*/
13335 (yyval.node) = const_decl(p, NEW_COLON3((yyvsp[0].id), &(yyloc), &(yylsp[-1]), &(yylsp[0])), &(yyloc));
13336 }
13337#line 13338 "parse.c"
13338 break;
13339
13340 case 149: /* lhs: backref */
13341#line 3825 "parse.y"
13342 {
13343 VALUE MAYBE_UNUSED(e) = rb_backref_error(p, (yyvsp[0].node));
13344 (yyval.node) = NEW_ERROR(&(yyloc));
13345 /*% ripper[error]: assign_error!(?e, var_field!($:1)) %*/
13346 }
13347#line 13348 "parse.c"
13348 break;
13349
13350 case 150: /* cname: "local variable or method" */
13351#line 3833 "parse.y"
13352 {
13353 static const char mesg[] = "class/module name must be CONSTANT";
13354 /*%%%*/
13355 yyerror1(&(yylsp[0]), mesg);
13356 /*% %*/
13357 /*% ripper[error]: class_name_error!(ERR_MESG(), $:1) %*/
13358 }
13359#line 13360 "parse.c"
13360 break;
13361
13362 case 152: /* cpath: ":: at EXPR_BEG" cname */
13363#line 3844 "parse.y"
13364 {
13365 (yyval.node) = NEW_COLON3((yyvsp[0].id), &(yyloc), &(yylsp[-1]), &(yylsp[0]));
13366 /*% ripper: top_const_ref!($:2) %*/
13367 }
13368#line 13369 "parse.c"
13369 break;
13370
13371 case 153: /* cpath: cname */
13372#line 3849 "parse.y"
13373 {
13374 (yyval.node) = NEW_COLON2(0, (yyvsp[0].id), &(yyloc), &NULL_LOC, &(yylsp[0]));
13375 /*% ripper: const_ref!($:1) %*/
13376 }
13377#line 13378 "parse.c"
13378 break;
13379
13380 case 154: /* cpath: primary_value "::" cname */
13381#line 3854 "parse.y"
13382 {
13383 (yyval.node) = NEW_COLON2((yyvsp[-2].node), (yyvsp[0].id), &(yyloc), &(yylsp[-1]), &(yylsp[0]));
13384 /*% ripper: const_path_ref!($:1, $:3) %*/
13385 }
13386#line 13387 "parse.c"
13387 break;
13388
13389 case 158: /* fname: op */
13390#line 3862 "parse.y"
13391 {
13392 SET_LEX_STATE(EXPR_ENDFN);
13393 (yyval.id) = (yyvsp[0].id);
13394 }
13395#line 13396 "parse.c"
13396 break;
13397
13398 case 160: /* fitem: fname */
13399#line 3870 "parse.y"
13400 {
13401 (yyval.node) = NEW_SYM(rb_id2str((yyvsp[0].id)), &(yyloc));
13402 /*% ripper: symbol_literal!($:1) %*/
13403 }
13404#line 13405 "parse.c"
13405 break;
13406
13407 case 162: /* undef_list: fitem */
13408#line 3878 "parse.y"
13409 {
13410 (yyval.node) = NEW_UNDEF((yyvsp[0].node), &(yyloc));
13411 /*% ripper: rb_ary_new3(1, $:1) %*/
13412 }
13413#line 13414 "parse.c"
13414 break;
13415
13416 case 163: /* $@12: %empty */
13417#line 3882 "parse.y"
13418 {SET_LEX_STATE(EXPR_FNAME|EXPR_FITEM);}
13419#line 13420 "parse.c"
13420 break;
13421
13422 case 164: /* undef_list: undef_list ',' $@12 fitem */
13423#line 3883 "parse.y"
13424 {
13425 nd_set_last_loc((yyvsp[-3].node), (yylsp[0]).end_pos);
13426 rb_parser_ary_push_node(p, RNODE_UNDEF((yyvsp[-3].node))->nd_undefs, (yyvsp[0].node));
13427 /*% ripper: rb_ary_push($:1, $:4) %*/
13428 }
13429#line 13430 "parse.c"
13430 break;
13431
13432 case 165: /* op: '|' */
13433#line 3890 "parse.y"
13434 { (yyval.id) = '|'; }
13435#line 13436 "parse.c"
13436 break;
13437
13438 case 166: /* op: '^' */
13439#line 3891 "parse.y"
13440 { (yyval.id) = '^'; }
13441#line 13442 "parse.c"
13442 break;
13443
13444 case 167: /* op: '&' */
13445#line 3892 "parse.y"
13446 { (yyval.id) = '&'; }
13447#line 13448 "parse.c"
13448 break;
13449
13450 case 168: /* op: "<=>" */
13451#line 3893 "parse.y"
13452 { (yyval.id) = tCMP; }
13453#line 13454 "parse.c"
13454 break;
13455
13456 case 169: /* op: "==" */
13457#line 3894 "parse.y"
13458 { (yyval.id) = tEQ; }
13459#line 13460 "parse.c"
13460 break;
13461
13462 case 170: /* op: "===" */
13463#line 3895 "parse.y"
13464 { (yyval.id) = tEQQ; }
13465#line 13466 "parse.c"
13466 break;
13467
13468 case 171: /* op: "=~" */
13469#line 3896 "parse.y"
13470 { (yyval.id) = tMATCH; }
13471#line 13472 "parse.c"
13472 break;
13473
13474 case 172: /* op: "!~" */
13475#line 3897 "parse.y"
13476 { (yyval.id) = tNMATCH; }
13477#line 13478 "parse.c"
13478 break;
13479
13480 case 173: /* op: '>' */
13481#line 3898 "parse.y"
13482 { (yyval.id) = '>'; }
13483#line 13484 "parse.c"
13484 break;
13485
13486 case 174: /* op: ">=" */
13487#line 3899 "parse.y"
13488 { (yyval.id) = tGEQ; }
13489#line 13490 "parse.c"
13490 break;
13491
13492 case 175: /* op: '<' */
13493#line 3900 "parse.y"
13494 { (yyval.id) = '<'; }
13495#line 13496 "parse.c"
13496 break;
13497
13498 case 176: /* op: "<=" */
13499#line 3901 "parse.y"
13500 { (yyval.id) = tLEQ; }
13501#line 13502 "parse.c"
13502 break;
13503
13504 case 177: /* op: "!=" */
13505#line 3902 "parse.y"
13506 { (yyval.id) = tNEQ; }
13507#line 13508 "parse.c"
13508 break;
13509
13510 case 178: /* op: "<<" */
13511#line 3903 "parse.y"
13512 { (yyval.id) = tLSHFT; }
13513#line 13514 "parse.c"
13514 break;
13515
13516 case 179: /* op: ">>" */
13517#line 3904 "parse.y"
13518 { (yyval.id) = tRSHFT; }
13519#line 13520 "parse.c"
13520 break;
13521
13522 case 180: /* op: '+' */
13523#line 3905 "parse.y"
13524 { (yyval.id) = '+'; }
13525#line 13526 "parse.c"
13526 break;
13527
13528 case 181: /* op: '-' */
13529#line 3906 "parse.y"
13530 { (yyval.id) = '-'; }
13531#line 13532 "parse.c"
13532 break;
13533
13534 case 182: /* op: '*' */
13535#line 3907 "parse.y"
13536 { (yyval.id) = '*'; }
13537#line 13538 "parse.c"
13538 break;
13539
13540 case 183: /* op: "*" */
13541#line 3908 "parse.y"
13542 { (yyval.id) = '*'; }
13543#line 13544 "parse.c"
13544 break;
13545
13546 case 184: /* op: '/' */
13547#line 3909 "parse.y"
13548 { (yyval.id) = '/'; }
13549#line 13550 "parse.c"
13550 break;
13551
13552 case 185: /* op: '%' */
13553#line 3910 "parse.y"
13554 { (yyval.id) = '%'; }
13555#line 13556 "parse.c"
13556 break;
13557
13558 case 186: /* op: "**" */
13559#line 3911 "parse.y"
13560 { (yyval.id) = tPOW; }
13561#line 13562 "parse.c"
13562 break;
13563
13564 case 187: /* op: "**arg" */
13565#line 3912 "parse.y"
13566 { (yyval.id) = tDSTAR; }
13567#line 13568 "parse.c"
13568 break;
13569
13570 case 188: /* op: '!' */
13571#line 3913 "parse.y"
13572 { (yyval.id) = '!'; }
13573#line 13574 "parse.c"
13574 break;
13575
13576 case 189: /* op: '~' */
13577#line 3914 "parse.y"
13578 { (yyval.id) = '~'; }
13579#line 13580 "parse.c"
13580 break;
13581
13582 case 190: /* op: "unary+" */
13583#line 3915 "parse.y"
13584 { (yyval.id) = tUPLUS; }
13585#line 13586 "parse.c"
13586 break;
13587
13588 case 191: /* op: "unary-" */
13589#line 3916 "parse.y"
13590 { (yyval.id) = tUMINUS; }
13591#line 13592 "parse.c"
13592 break;
13593
13594 case 192: /* op: "[]" */
13595#line 3917 "parse.y"
13596 { (yyval.id) = tAREF; }
13597#line 13598 "parse.c"
13598 break;
13599
13600 case 193: /* op: "[]=" */
13601#line 3918 "parse.y"
13602 { (yyval.id) = tASET; }
13603#line 13604 "parse.c"
13604 break;
13605
13606 case 194: /* op: '`' */
13607#line 3919 "parse.y"
13608 { (yyval.id) = '`'; }
13609#line 13610 "parse.c"
13610 break;
13611
13612 case 236: /* asgn_arg_rhs: lhs '=' lex_ctxt arg_rhs */
13613#line 2929 "parse.y"
13614 {
13615 (yyval.node) = node_assign(p, (NODE *)(yyvsp[-3].node), (yyvsp[0].node), (yyvsp[-1].ctxt), &(yyloc));
13616 /*% ripper: assign!($:1, $:4) %*/
13617 }
13618#line 13619 "parse.c"
13619 break;
13620
13621 case 238: /* op_asgn_arg_rhs: var_lhs "operator-assignment" lex_ctxt arg_rhs */
13622#line 3055 "parse.y"
13623 {
13624 (yyval.node) = new_op_assign(p, (yyvsp[-3].node), (yyvsp[-2].id), (yyvsp[0].node), (yyvsp[-1].ctxt), &(yyloc));
13625 /*% ripper: opassign!($:1, $:2, $:4) %*/
13626 }
13627#line 13628 "parse.c"
13628 break;
13629
13630 case 239: /* op_asgn_arg_rhs: primary_value '[' opt_call_args rbracket "operator-assignment" lex_ctxt arg_rhs */
13631#line 3060 "parse.y"
13632 {
13633 (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]));
13634 /*% ripper: opassign!(aref_field!($:1, $:3), $:5, $:7) %*/
13635 }
13636#line 13637 "parse.c"
13637 break;
13638
13639 case 240: /* op_asgn_arg_rhs: primary_value call_op "local variable or method" "operator-assignment" lex_ctxt arg_rhs */
13640#line 3065 "parse.y"
13641 {
13642 (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]));
13643 /*% ripper: opassign!(field!($:1, $:2, $:3), $:4, $:6) %*/
13644 }
13645#line 13646 "parse.c"
13646 break;
13647
13648 case 241: /* op_asgn_arg_rhs: primary_value call_op "constant" "operator-assignment" lex_ctxt arg_rhs */
13649#line 3070 "parse.y"
13650 {
13651 (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]));
13652 /*% ripper: opassign!(field!($:1, $:2, $:3), $:4, $:6) %*/
13653 }
13654#line 13655 "parse.c"
13655 break;
13656
13657 case 242: /* op_asgn_arg_rhs: primary_value "::" "local variable or method" "operator-assignment" lex_ctxt arg_rhs */
13658#line 3075 "parse.y"
13659 {
13660 (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]));
13661 /*% ripper: opassign!(field!($:1, $:2, $:3), $:4, $:6) %*/
13662 }
13663#line 13664 "parse.c"
13664 break;
13665
13666 case 243: /* op_asgn_arg_rhs: primary_value "::" "constant" "operator-assignment" lex_ctxt arg_rhs */
13667#line 3080 "parse.y"
13668 {
13669 YYLTYPE loc = code_loc_gen(&(yylsp[-5]), &(yylsp[-3]));
13670 (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));
13671 /*% ripper: opassign!(const_path_field!($:1, $:3), $:4, $:6) %*/
13672 }
13673#line 13674 "parse.c"
13674 break;
13675
13676 case 244: /* op_asgn_arg_rhs: ":: at EXPR_BEG" "constant" "operator-assignment" lex_ctxt arg_rhs */
13677#line 3086 "parse.y"
13678 {
13679 YYLTYPE loc = code_loc_gen(&(yylsp[-4]), &(yylsp[-3]));
13680 (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));
13681 /*% ripper: opassign!(top_const_field!($:2), $:3, $:5) %*/
13682 }
13683#line 13684 "parse.c"
13684 break;
13685
13686 case 245: /* op_asgn_arg_rhs: backref "operator-assignment" lex_ctxt arg_rhs */
13687#line 3092 "parse.y"
13688 {
13689 VALUE MAYBE_UNUSED(e) = rb_backref_error(p, (yyvsp[-3].node));
13690 (yyval.node) = NEW_ERROR(&(yyloc));
13691 /*% ripper[error]: assign_error!(?e, opassign!(var_field!($:1), $:2, $:4)) %*/
13692 }
13693#line 13694 "parse.c"
13694 break;
13695
13696 case 247: /* range_expr_arg: arg ".." arg */
13697#line 3114 "parse.y"
13698 {
13699 value_expr(p, (yyvsp[-2].node));
13700 value_expr(p, (yyvsp[0].node));
13701 (yyval.node) = NEW_DOT2((yyvsp[-2].node), (yyvsp[0].node), &(yyloc), &(yylsp[-1]));
13702 /*% ripper: dot2!($:1, $:3) %*/
13703 }
13704#line 13705 "parse.c"
13705 break;
13706
13707 case 248: /* range_expr_arg: arg "..." arg */
13708#line 3121 "parse.y"
13709 {
13710 value_expr(p, (yyvsp[-2].node));
13711 value_expr(p, (yyvsp[0].node));
13712 (yyval.node) = NEW_DOT3((yyvsp[-2].node), (yyvsp[0].node), &(yyloc), &(yylsp[-1]));
13713 /*% ripper: dot3!($:1, $:3) %*/
13714 }
13715#line 13716 "parse.c"
13716 break;
13717
13718 case 249: /* range_expr_arg: arg ".." */
13719#line 3128 "parse.y"
13720 {
13721 value_expr(p, (yyvsp[-1].node));
13722 (yyval.node) = NEW_DOT2((yyvsp[-1].node), new_nil_at(p, &(yylsp[0]).end_pos), &(yyloc), &(yylsp[0]));
13723 /*% ripper: dot2!($:1, Qnil) %*/
13724 }
13725#line 13726 "parse.c"
13726 break;
13727
13728 case 250: /* range_expr_arg: arg "..." */
13729#line 3134 "parse.y"
13730 {
13731 value_expr(p, (yyvsp[-1].node));
13732 (yyval.node) = NEW_DOT3((yyvsp[-1].node), new_nil_at(p, &(yylsp[0]).end_pos), &(yyloc), &(yylsp[0]));
13733 /*% ripper: dot3!($:1, Qnil) %*/
13734 }
13735#line 13736 "parse.c"
13736 break;
13737
13738 case 251: /* range_expr_arg: "(.." arg */
13739#line 3140 "parse.y"
13740 {
13741 value_expr(p, (yyvsp[0].node));
13742 (yyval.node) = NEW_DOT2(new_nil_at(p, &(yylsp[-1]).beg_pos), (yyvsp[0].node), &(yyloc), &(yylsp[-1]));
13743 /*% ripper: dot2!(Qnil, $:2) %*/
13744 }
13745#line 13746 "parse.c"
13746 break;
13747
13748 case 252: /* range_expr_arg: "(..." arg */
13749#line 3146 "parse.y"
13750 {
13751 value_expr(p, (yyvsp[0].node));
13752 (yyval.node) = NEW_DOT3(new_nil_at(p, &(yylsp[-1]).beg_pos), (yyvsp[0].node), &(yyloc), &(yylsp[-1]));
13753 /*% ripper: dot3!(Qnil, $:2) %*/
13754 }
13755#line 13756 "parse.c"
13756 break;
13757
13758 case 254: /* arg: arg '+' arg */
13759#line 3940 "parse.y"
13760 {
13761 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), '+', (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
13762 /*% ripper: binary!($:1, ID2VAL('\'+\''), $:3) %*/
13763 }
13764#line 13765 "parse.c"
13765 break;
13766
13767 case 255: /* arg: arg '-' arg */
13768#line 3945 "parse.y"
13769 {
13770 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), '-', (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
13771 /*% ripper: binary!($:1, ID2VAL('\'-\''), $:3) %*/
13772 }
13773#line 13774 "parse.c"
13774 break;
13775
13776 case 256: /* arg: arg '*' arg */
13777#line 3950 "parse.y"
13778 {
13779 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), '*', (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
13780 /*% ripper: binary!($:1, ID2VAL('\'*\''), $:3) %*/
13781 }
13782#line 13783 "parse.c"
13783 break;
13784
13785 case 257: /* arg: arg '/' arg */
13786#line 3955 "parse.y"
13787 {
13788 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), '/', (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
13789 /*% ripper: binary!($:1, ID2VAL('\'/\''), $:3) %*/
13790 }
13791#line 13792 "parse.c"
13792 break;
13793
13794 case 258: /* arg: arg '%' arg */
13795#line 3960 "parse.y"
13796 {
13797 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), '%', (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
13798 /*% ripper: binary!($:1, ID2VAL('\'%\''), $:3) %*/
13799 }
13800#line 13801 "parse.c"
13801 break;
13802
13803 case 259: /* arg: arg "**" arg */
13804#line 3965 "parse.y"
13805 {
13806 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), idPow, (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
13807 /*% ripper: binary!($:1, ID2VAL(idPow), $:3) %*/
13808 }
13809#line 13810 "parse.c"
13810 break;
13811
13812 case 260: /* arg: tUMINUS_NUM simple_numeric "**" arg */
13813#line 3970 "parse.y"
13814 {
13815 (yyval.node) = call_uni_op(p, call_bin_op(p, (yyvsp[-2].node), idPow, (yyvsp[0].node), &(yylsp[-2]), &(yyloc)), idUMinus, &(yylsp[-3]), &(yyloc));
13816 /*% ripper: unary!(ID2VAL(idUMinus), binary!($:2, ID2VAL(idPow), $:4)) %*/
13817 }
13818#line 13819 "parse.c"
13819 break;
13820
13821 case 261: /* arg: "unary+" arg */
13822#line 3975 "parse.y"
13823 {
13824 (yyval.node) = call_uni_op(p, (yyvsp[0].node), idUPlus, &(yylsp[-1]), &(yyloc));
13825 /*% ripper: unary!(ID2VAL(idUPlus), $:2) %*/
13826 }
13827#line 13828 "parse.c"
13828 break;
13829
13830 case 262: /* arg: "unary-" arg */
13831#line 3980 "parse.y"
13832 {
13833 (yyval.node) = call_uni_op(p, (yyvsp[0].node), idUMinus, &(yylsp[-1]), &(yyloc));
13834 /*% ripper: unary!(ID2VAL(idUMinus), $:2) %*/
13835 }
13836#line 13837 "parse.c"
13837 break;
13838
13839 case 263: /* arg: arg '|' arg */
13840#line 3985 "parse.y"
13841 {
13842 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), '|', (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
13843 /*% ripper: binary!($:1, ID2VAL('\'|\''), $:3) %*/
13844 }
13845#line 13846 "parse.c"
13846 break;
13847
13848 case 264: /* arg: arg '^' arg */
13849#line 3990 "parse.y"
13850 {
13851 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), '^', (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
13852 /*% ripper: binary!($:1, ID2VAL('\'^\''), $:3) %*/
13853 }
13854#line 13855 "parse.c"
13855 break;
13856
13857 case 265: /* arg: arg '&' arg */
13858#line 3995 "parse.y"
13859 {
13860 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), '&', (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
13861 /*% ripper: binary!($:1, ID2VAL('\'&\''), $:3) %*/
13862 }
13863#line 13864 "parse.c"
13864 break;
13865
13866 case 266: /* arg: arg "<=>" arg */
13867#line 4000 "parse.y"
13868 {
13869 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), idCmp, (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
13870 /*% ripper: binary!($:1, ID2VAL(idCmp), $:3) %*/
13871 }
13872#line 13873 "parse.c"
13873 break;
13874
13875 case 268: /* arg: arg "==" arg */
13876#line 4006 "parse.y"
13877 {
13878 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), idEq, (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
13879 /*% ripper: binary!($:1, ID2VAL(idEq), $:3) %*/
13880 }
13881#line 13882 "parse.c"
13882 break;
13883
13884 case 269: /* arg: arg "===" arg */
13885#line 4011 "parse.y"
13886 {
13887 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), idEqq, (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
13888 /*% ripper: binary!($:1, ID2VAL(idEqq), $:3) %*/
13889 }
13890#line 13891 "parse.c"
13891 break;
13892
13893 case 270: /* arg: arg "!=" arg */
13894#line 4016 "parse.y"
13895 {
13896 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), idNeq, (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
13897 /*% ripper: binary!($:1, ID2VAL(idNeq), $:3) %*/
13898 }
13899#line 13900 "parse.c"
13900 break;
13901
13902 case 271: /* arg: arg "=~" arg */
13903#line 4021 "parse.y"
13904 {
13905 (yyval.node) = match_op(p, (yyvsp[-2].node), (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
13906 /*% ripper: binary!($:1, ID2VAL(idEqTilde), $:3) %*/
13907 }
13908#line 13909 "parse.c"
13909 break;
13910
13911 case 272: /* arg: arg "!~" arg */
13912#line 4026 "parse.y"
13913 {
13914 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), idNeqTilde, (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
13915 /*% ripper: binary!($:1, ID2VAL(idNeqTilde), $:3) %*/
13916 }
13917#line 13918 "parse.c"
13918 break;
13919
13920 case 273: /* arg: '!' arg */
13921#line 4031 "parse.y"
13922 {
13923 (yyval.node) = call_uni_op(p, method_cond(p, (yyvsp[0].node), &(yylsp[0])), '!', &(yylsp[-1]), &(yyloc));
13924 /*% ripper: unary!(ID2VAL('\'!\''), $:2) %*/
13925 }
13926#line 13927 "parse.c"
13927 break;
13928
13929 case 274: /* arg: '~' arg */
13930#line 4036 "parse.y"
13931 {
13932 (yyval.node) = call_uni_op(p, (yyvsp[0].node), '~', &(yylsp[-1]), &(yyloc));
13933 /*% ripper: unary!(ID2VAL('\'~\''), $:2) %*/
13934 }
13935#line 13936 "parse.c"
13936 break;
13937
13938 case 275: /* arg: arg "<<" arg */
13939#line 4041 "parse.y"
13940 {
13941 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), idLTLT, (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
13942 /*% ripper: binary!($:1, ID2VAL(idLTLT), $:3) %*/
13943 }
13944#line 13945 "parse.c"
13945 break;
13946
13947 case 276: /* arg: arg ">>" arg */
13948#line 4046 "parse.y"
13949 {
13950 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), idGTGT, (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
13951 /*% ripper: binary!($:1, ID2VAL(idGTGT), $:3) %*/
13952 }
13953#line 13954 "parse.c"
13954 break;
13955
13956 case 277: /* arg: arg "&&" arg */
13957#line 4051 "parse.y"
13958 {
13959 (yyval.node) = logop(p, idANDOP, (yyvsp[-2].node), (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
13960 /*% ripper: binary!($:1, ID2VAL(idANDOP), $:3) %*/
13961 }
13962#line 13963 "parse.c"
13963 break;
13964
13965 case 278: /* arg: arg "||" arg */
13966#line 4056 "parse.y"
13967 {
13968 (yyval.node) = logop(p, idOROP, (yyvsp[-2].node), (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
13969 /*% ripper: binary!($:1, ID2VAL(idOROP), $:3) %*/
13970 }
13971#line 13972 "parse.c"
13972 break;
13973
13974 case 279: /* arg: "'defined?'" option_'\n' begin_defined arg */
13975#line 4061 "parse.y"
13976 {
13977 p->ctxt.in_defined = (yyvsp[-1].ctxt).in_defined;
13978 (yyval.node) = new_defined(p, (yyvsp[0].node), &(yyloc), &(yylsp[-3]));
13979 p->ctxt.has_trailing_semicolon = (yyvsp[-1].ctxt).has_trailing_semicolon;
13980 /*% ripper: defined!($:4) %*/
13981 }
13982#line 13983 "parse.c"
13983 break;
13984
13985 case 280: /* def_endless_method_endless_arg: defn_head f_opt_paren_args '=' endless_arg */
13986#line 2960 "parse.y"
13987 {
13988 endless_method_name(p, (yyvsp[-3].node_def_temp)->nd_mid, &(yylsp[-3]));
13989 restore_defun(p, (yyvsp[-3].node_def_temp));
13990 ((yyval.node) = (yyvsp[-3].node_def_temp)->nd_def)->nd_loc = (yyloc);
13991 (yyvsp[0].node) = new_scope_body(p, (yyvsp[-2].node_args), (yyvsp[0].node), (yyval.node), &(yyloc));
13992 RNODE_DEFN((yyval.node))->nd_defn = (yyvsp[0].node);
13993 /*% ripper: bodystmt!($:bodystmt, Qnil, Qnil, Qnil) %*/
13994 /*% ripper: def!($:head, $:args, $:$) %*/
13995 local_pop(p);
13996 }
13997#line 13998 "parse.c"
13998 break;
13999
14000 case 281: /* def_endless_method_endless_arg: defs_head f_opt_paren_args '=' endless_arg */
14001#line 2971 "parse.y"
14002 {
14003 endless_method_name(p, (yyvsp[-3].node_def_temp)->nd_mid, &(yylsp[-3]));
14004 restore_defun(p, (yyvsp[-3].node_def_temp));
14005 ((yyval.node) = (yyvsp[-3].node_def_temp)->nd_def)->nd_loc = (yyloc);
14006 (yyvsp[0].node) = new_scope_body(p, (yyvsp[-2].node_args), (yyvsp[0].node), (yyval.node), &(yyloc));
14007 RNODE_DEFS((yyval.node))->nd_defn = (yyvsp[0].node);
14008 /*% ripper: bodystmt!($:bodystmt, Qnil, Qnil, Qnil) %*/
14009 /*% ripper: defs!(*$:head[0..2], $:args, $:$) %*/
14010 local_pop(p);
14011 }
14012#line 14013 "parse.c"
14013 break;
14014
14015 case 285: /* ternary: arg '?' arg option_'\n' ':' arg */
14016#line 4073 "parse.y"
14017 {
14018 value_expr(p, (yyvsp[-5].node));
14019 (yyval.node) = new_if(p, (yyvsp[-5].node), (yyvsp[-3].node), (yyvsp[0].node), &(yyloc), &NULL_LOC, &(yylsp[-1]), &NULL_LOC);
14020 fixpos((yyval.node), (yyvsp[-5].node));
14021 /*% ripper: ifop!($:1, $:3, $:6) %*/
14022 }
14023#line 14024 "parse.c"
14024 break;
14025
14026 case 287: /* endless_arg: endless_arg "'rescue' modifier" after_rescue arg */
14027#line 4083 "parse.y"
14028 {
14029 p->ctxt.in_rescue = (yyvsp[-1].ctxt).in_rescue;
14030 (yyval.node) = rescued_expr(p, (yyvsp[-3].node), (yyvsp[0].node), &(yylsp[-3]), &(yylsp[-2]), &(yylsp[0]));
14031 /*% ripper: rescue_mod!($:1, $:4) %*/
14032 }
14033#line 14034 "parse.c"
14034 break;
14035
14036 case 288: /* endless_arg: "'not'" option_'\n' endless_arg */
14037#line 4089 "parse.y"
14038 {
14039 (yyval.node) = call_uni_op(p, method_cond(p, (yyvsp[0].node), &(yylsp[0])), METHOD_NOT, &(yylsp[-2]), &(yyloc));
14040 /*% ripper: unary!(ID2VAL(idNOT), $:3) %*/
14041 }
14042#line 14043 "parse.c"
14043 break;
14044
14045 case 289: /* relop: '>' */
14046#line 4095 "parse.y"
14047 {(yyval.id) = '>';}
14048#line 14049 "parse.c"
14049 break;
14050
14051 case 290: /* relop: '<' */
14052#line 4096 "parse.y"
14053 {(yyval.id) = '<';}
14054#line 14055 "parse.c"
14055 break;
14056
14057 case 291: /* relop: ">=" */
14058#line 4097 "parse.y"
14059 {(yyval.id) = idGE;}
14060#line 14061 "parse.c"
14061 break;
14062
14063 case 292: /* relop: "<=" */
14064#line 4098 "parse.y"
14065 {(yyval.id) = idLE;}
14066#line 14067 "parse.c"
14067 break;
14068
14069 case 293: /* rel_expr: arg relop arg */
14070#line 4102 "parse.y"
14071 {
14072 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), (yyvsp[-1].id), (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
14073 /*% ripper: binary!($:1, ID2VAL($2), $:3) %*/
14074 }
14075#line 14076 "parse.c"
14076 break;
14077
14078 case 294: /* rel_expr: rel_expr relop arg */
14079#line 4107 "parse.y"
14080 {
14081 rb_warning1("comparison '%s' after comparison", WARN_ID((yyvsp[-1].id)));
14082 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), (yyvsp[-1].id), (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
14083 /*% ripper: binary!($:1, ID2VAL($2), $:3) %*/
14084 }
14085#line 14086 "parse.c"
14086 break;
14087
14088 case 295: /* lex_ctxt: none */
14089#line 4115 "parse.y"
14090 {
14091 (yyval.ctxt) = p->ctxt;
14092 }
14093#line 14094 "parse.c"
14094 break;
14095
14096 case 296: /* begin_defined: lex_ctxt */
14097#line 4121 "parse.y"
14098 {
14099 p->ctxt.in_defined = 1;
14100 (yyval.ctxt) = (yyvsp[0].ctxt);
14101 }
14102#line 14103 "parse.c"
14103 break;
14104
14105 case 297: /* after_rescue: lex_ctxt */
14106#line 4128 "parse.y"
14107 {
14108 p->ctxt.in_rescue = after_rescue;
14109 (yyval.ctxt) = (yyvsp[0].ctxt);
14110 }
14111#line 14112 "parse.c"
14112 break;
14113
14114 case 298: /* value_expr_arg: arg */
14115#line 3155 "parse.y"
14116 {
14117 value_expr(p, (yyvsp[0].node));
14118 (yyval.node) = (yyvsp[0].node);
14119 }
14120#line 14121 "parse.c"
14121 break;
14122
14123 case 302: /* aref_args: args ',' assocs trailer */
14124#line 4140 "parse.y"
14125 {
14126 (yyval.node) = (yyvsp[-1].node) ? arg_append(p, (yyvsp[-3].node), new_hash(p, (yyvsp[-1].node), &(yylsp[-1])), &(yyloc)) : (yyvsp[-3].node);
14127 /*% ripper: args_add!($:1, bare_assoc_hash!($:3)) %*/
14128 }
14129#line 14130 "parse.c"
14130 break;
14131
14132 case 303: /* aref_args: assocs trailer */
14133#line 4145 "parse.y"
14134 {
14135 (yyval.node) = (yyvsp[-1].node) ? NEW_LIST(new_hash(p, (yyvsp[-1].node), &(yylsp[-1])), &(yyloc)) : 0;
14136 /*% ripper: args_add!(args_new!, bare_assoc_hash!($:1)) %*/
14137 }
14138#line 14139 "parse.c"
14139 break;
14140
14141 case 304: /* arg_rhs: arg */
14142#line 4152 "parse.y"
14143 {
14144 value_expr(p, (yyvsp[0].node));
14145 (yyval.node) = (yyvsp[0].node);
14146 }
14147#line 14148 "parse.c"
14148 break;
14149
14150 case 305: /* arg_rhs: arg "'rescue' modifier" after_rescue arg */
14151#line 4157 "parse.y"
14152 {
14153 p->ctxt.in_rescue = (yyvsp[-1].ctxt).in_rescue;
14154 value_expr(p, (yyvsp[-3].node));
14155 (yyval.node) = rescued_expr(p, (yyvsp[-3].node), (yyvsp[0].node), &(yylsp[-3]), &(yylsp[-2]), &(yylsp[0]));
14156 /*% ripper: rescue_mod!($:1, $:4) %*/
14157 }
14158#line 14159 "parse.c"
14159 break;
14160
14161 case 306: /* paren_args: '(' opt_call_args rparen */
14162#line 4166 "parse.y"
14163 {
14164 (yyval.node) = (yyvsp[-1].node);
14165 /*% ripper: arg_paren!($:2) %*/
14166 }
14167#line 14168 "parse.c"
14168 break;
14169
14170 case 307: /* paren_args: '(' args ',' args_forward rparen */
14171#line 4171 "parse.y"
14172 {
14173 if (!check_forwarding_args(p)) {
14174 (yyval.node) = 0;
14175 }
14176 else {
14177 (yyval.node) = new_args_forward_call(p, (yyvsp[-3].node), &(yylsp[-1]), &(yyloc));
14178 /*% ripper: arg_paren!(args_add!($:2, $:4)) %*/
14179 }
14180 }
14181#line 14182 "parse.c"
14182 break;
14183
14184 case 308: /* paren_args: '(' args_forward rparen */
14185#line 4181 "parse.y"
14186 {
14187 if (!check_forwarding_args(p)) {
14188 (yyval.node) = 0;
14189 }
14190 else {
14191 (yyval.node) = new_args_forward_call(p, 0, &(yylsp[-1]), &(yyloc));
14192 /*% ripper: arg_paren!($:2) %*/
14193 }
14194 }
14195#line 14196 "parse.c"
14196 break;
14197
14198 case 310: /* opt_paren_args: paren_args */
14199#line 4194 "parse.y"
14200 {
14201 (yyval.node) = (yyvsp[0].node) ? (yyvsp[0].node) : NODE_SPECIAL_EMPTY_ARGS;
14202 }
14203#line 14204 "parse.c"
14204 break;
14205
14206 case 314: /* opt_call_args: args ',' assocs ',' */
14207#line 4203 "parse.y"
14208 {
14209 (yyval.node) = (yyvsp[-1].node) ? arg_append(p, (yyvsp[-3].node), new_hash(p, (yyvsp[-1].node), &(yylsp[-1])), &(yyloc)) : (yyvsp[-3].node);
14210 /*% ripper: args_add!($:1, bare_assoc_hash!($:3)) %*/
14211 }
14212#line 14213 "parse.c"
14213 break;
14214
14215 case 315: /* opt_call_args: assocs ',' */
14216#line 4208 "parse.y"
14217 {
14218 (yyval.node) = (yyvsp[-1].node) ? NEW_LIST(new_hash(p, (yyvsp[-1].node), &(yylsp[-1])), &(yylsp[-1])) : 0;
14219 /*% ripper: args_add!(args_new!, bare_assoc_hash!($:1)) %*/
14220 }
14221#line 14222 "parse.c"
14222 break;
14223
14224 case 316: /* value_expr_command: command */
14225#line 3155 "parse.y"
14226 {
14227 value_expr(p, (yyvsp[0].node));
14228 (yyval.node) = (yyvsp[0].node);
14229 }
14230#line 14231 "parse.c"
14231 break;
14232
14233 case 317: /* call_args: value_expr_command */
14234#line 4215 "parse.y"
14235 {
14236 (yyval.node) = NEW_LIST((yyvsp[0].node), &(yyloc));
14237 /*% ripper: args_add!(args_new!, $:1) %*/
14238 }
14239#line 14240 "parse.c"
14240 break;
14241
14242 case 318: /* call_args: def_endless_method_endless_command */
14243#line 4220 "parse.y"
14244 {
14245 (yyval.node) = NEW_LIST((yyvsp[0].node), &(yyloc));
14246 /*% ripper: args_add!(args_new!, $:1) %*/
14247 }
14248#line 14249 "parse.c"
14249 break;
14250
14251 case 319: /* call_args: args opt_block_arg */
14252#line 4225 "parse.y"
14253 {
14254 (yyval.node) = arg_blk_pass((yyvsp[-1].node), (yyvsp[0].node_block_pass));
14255 /*% ripper: args_add_block!($:1, $:2) %*/
14256 }
14257#line 14258 "parse.c"
14258 break;
14259
14260 case 320: /* call_args: assocs opt_block_arg */
14261#line 4230 "parse.y"
14262 {
14263 (yyval.node) = (yyvsp[-1].node) ? NEW_LIST(new_hash(p, (yyvsp[-1].node), &(yylsp[-1])), &(yylsp[-1])) : 0;
14264 (yyval.node) = arg_blk_pass((yyval.node), (yyvsp[0].node_block_pass));
14265 /*% ripper: args_add_block!(args_add!(args_new!, bare_assoc_hash!($:1)), $:2) %*/
14266 }
14267#line 14268 "parse.c"
14268 break;
14269
14270 case 321: /* call_args: args ',' assocs opt_block_arg */
14271#line 4236 "parse.y"
14272 {
14273 (yyval.node) = (yyvsp[-1].node) ? arg_append(p, (yyvsp[-3].node), new_hash(p, (yyvsp[-1].node), &(yylsp[-1])), &(yyloc)) : (yyvsp[-3].node);
14274 (yyval.node) = arg_blk_pass((yyval.node), (yyvsp[0].node_block_pass));
14275 /*% ripper: args_add_block!(args_add!($:1, bare_assoc_hash!($:3)), $:4) %*/
14276 }
14277#line 14278 "parse.c"
14278 break;
14279
14280 case 323: /* $@13: %empty */
14281#line 4245 "parse.y"
14282 {
14283 /* If call_args starts with a open paren '(' or '[',
14284 * look-ahead reading of the letters calls CMDARG_PUSH(0),
14285 * but the push must be done after CMDARG_PUSH(1).
14286 * So this code makes them consistent by first cancelling
14287 * the premature CMDARG_PUSH(0), doing CMDARG_PUSH(1),
14288 * and finally redoing CMDARG_PUSH(0).
14289 */
14290 int lookahead = 0;
14291 switch (yychar) {
14292 case '(': case tLPAREN: case tLPAREN_ARG: case '[': case tLBRACK:
14293 lookahead = 1;
14294 }
14295 if (lookahead) CMDARG_POP();
14296 CMDARG_PUSH(1);
14297 if (lookahead) CMDARG_PUSH(0);
14298 }
14299#line 14300 "parse.c"
14300 break;
14301
14302 case 324: /* command_args: $@13 call_args */
14303#line 4263 "parse.y"
14304 {
14305 /* call_args can be followed by tLBRACE_ARG (that does CMDARG_PUSH(0) in the lexer)
14306 * but the push must be done after CMDARG_POP() in the parser.
14307 * So this code does CMDARG_POP() to pop 0 pushed by tLBRACE_ARG,
14308 * CMDARG_POP() to pop 1 pushed by command_args,
14309 * and CMDARG_PUSH(0) to restore back the flag set by tLBRACE_ARG.
14310 */
14311 int lookahead = 0;
14312 switch (yychar) {
14313 case tLBRACE_ARG:
14314 lookahead = 1;
14315 }
14316 if (lookahead) CMDARG_POP();
14317 CMDARG_POP();
14318 if (lookahead) CMDARG_PUSH(0);
14319 (yyval.node) = (yyvsp[0].node);
14320 /*% ripper: $:2 %*/
14321 }
14322#line 14323 "parse.c"
14323 break;
14324
14325 case 325: /* block_arg: "&" arg_value */
14326#line 4284 "parse.y"
14327 {
14328 (yyval.node_block_pass) = NEW_BLOCK_PASS((yyvsp[0].node), &(yyloc), &(yylsp[-1]));
14329 /*% ripper: $:2 %*/
14330 }
14331#line 14332 "parse.c"
14332 break;
14333
14334 case 326: /* block_arg: "&" */
14335#line 4289 "parse.y"
14336 {
14337 forwarding_arg_check(p, idFWD_BLOCK, idFWD_ALL, "block");
14338 (yyval.node_block_pass) = NEW_BLOCK_PASS(NEW_LVAR(idFWD_BLOCK, &(yylsp[0])), &(yyloc), &(yylsp[0]));
14339 /*% ripper: Qnil %*/
14340 }
14341#line 14342 "parse.c"
14342 break;
14343
14344 case 327: /* opt_block_arg: ',' block_arg */
14345#line 4297 "parse.y"
14346 {
14347 (yyval.node_block_pass) = (yyvsp[0].node_block_pass);
14348 /*% ripper: $:2 %*/
14349 }
14350#line 14351 "parse.c"
14351 break;
14352
14353 case 328: /* opt_block_arg: none */
14354#line 4302 "parse.y"
14355 {
14356 (yyval.node_block_pass) = 0;
14357 /*% ripper: Qfalse %*/
14358 }
14359#line 14360 "parse.c"
14360 break;
14361
14362 case 329: /* args: arg_value */
14363#line 4310 "parse.y"
14364 {
14365 (yyval.node) = NEW_LIST((yyvsp[0].node), &(yyloc));
14366 /*% ripper: args_add!(args_new!, $:arg_value) %*/
14367 }
14368#line 14369 "parse.c"
14369 break;
14370
14371 case 330: /* args: arg_splat */
14372#line 4315 "parse.y"
14373 {
14374 (yyval.node) = (yyvsp[0].node);
14375 /*% ripper: args_add_star!(args_new!, $:arg_splat) %*/
14376 }
14377#line 14378 "parse.c"
14378 break;
14379
14380 case 331: /* args: args ',' arg_value */
14381#line 4320 "parse.y"
14382 {
14383 (yyval.node) = last_arg_append(p, (yyvsp[-2].node), (yyvsp[0].node), &(yyloc));
14384 /*% ripper: args_add!($:non_last_args, $:arg_value) %*/
14385 }
14386#line 14387 "parse.c"
14387 break;
14388
14389 case 332: /* args: args ',' arg_splat */
14390#line 4325 "parse.y"
14391 {
14392 (yyval.node) = rest_arg_append(p, (yyvsp[-2].node), RNODE_SPLAT((yyvsp[0].node))->nd_head, &(yyloc));
14393 /*% ripper: args_add_star!($:non_last_args, $:arg_splat) %*/
14394 }
14395#line 14396 "parse.c"
14396 break;
14397
14398 case 333: /* arg_splat: "*" arg_value */
14399#line 4333 "parse.y"
14400 {
14401 (yyval.node) = NEW_SPLAT((yyvsp[0].node), &(yyloc), &(yylsp[-1]));
14402 /*% ripper: $:arg_value %*/
14403 }
14404#line 14405 "parse.c"
14405 break;
14406
14407 case 334: /* arg_splat: "*" */
14408#line 4338 "parse.y"
14409 {
14410 forwarding_arg_check(p, idFWD_REST, idFWD_ALL, "rest");
14411 (yyval.node) = NEW_SPLAT(NEW_LVAR(idFWD_REST, &(yylsp[0])), &(yyloc), &(yylsp[0]));
14412 /*% ripper: Qnil %*/
14413 }
14414#line 14415 "parse.c"
14415 break;
14416
14417 case 337: /* mrhs: args ',' arg_value */
14418#line 4352 "parse.y"
14419 {
14420 (yyval.node) = last_arg_append(p, (yyvsp[-2].node), (yyvsp[0].node), &(yyloc));
14421 /*% ripper: mrhs_add!(mrhs_new_from_args!($:args), $:arg_value) %*/
14422 }
14423#line 14424 "parse.c"
14424 break;
14425
14426 case 338: /* mrhs: args ',' "*" arg_value */
14427#line 4357 "parse.y"
14428 {
14429 (yyval.node) = rest_arg_append(p, (yyvsp[-3].node), (yyvsp[0].node), &(yyloc));
14430 /*% ripper: mrhs_add_star!(mrhs_new_from_args!($:args), $:arg_value) %*/
14431 }
14432#line 14433 "parse.c"
14433 break;
14434
14435 case 339: /* mrhs: "*" arg_value */
14436#line 4362 "parse.y"
14437 {
14438 (yyval.node) = NEW_SPLAT((yyvsp[0].node), &(yyloc), &(yylsp[-1]));
14439 /*% ripper: mrhs_add_star!(mrhs_new!, $:arg_value) %*/
14440 }
14441#line 14442 "parse.c"
14442 break;
14443
14444 case 350: /* primary: "method" */
14445#line 4383 "parse.y"
14446 {
14447 (yyval.node) = (NODE *)NEW_FCALL((yyvsp[0].id), 0, &(yyloc));
14448 /*% ripper: method_add_arg!(fcall!($:1), args_new!) %*/
14449 }
14450#line 14451 "parse.c"
14451 break;
14452
14453 case 351: /* $@14: %empty */
14454#line 4388 "parse.y"
14455 {
14456 CMDARG_PUSH(0);
14457 }
14458#line 14459 "parse.c"
14459 break;
14460
14461 case 352: /* primary: k_begin $@14 bodystmt k_end */
14462#line 4393 "parse.y"
14463 {
14464 CMDARG_POP();
14465 set_line_body((yyvsp[-1].node), (yylsp[-3]).end_pos.lineno);
14466 (yyval.node) = NEW_BEGIN((yyvsp[-1].node), &(yyloc));
14467 nd_set_line((yyval.node), (yylsp[-3]).end_pos.lineno);
14468 /*% ripper: begin!($:3) %*/
14469 }
14470#line 14471 "parse.c"
14471 break;
14472
14473 case 353: /* $@15: %empty */
14474#line 4400 "parse.y"
14475 {SET_LEX_STATE(EXPR_ENDARG);}
14476#line 14477 "parse.c"
14477 break;
14478
14479 case 354: /* primary: "( arg" compstmt_stmts $@15 ')' */
14480#line 4401 "parse.y"
14481 {
14482 if (nd_type_p((yyvsp[-2].node), NODE_SELF)) RNODE_SELF((yyvsp[-2].node))->nd_state = 0;
14483 (yyval.node) = (yyvsp[-2].node);
14484 /*% ripper: paren!($:2) %*/
14485 }
14486#line 14487 "parse.c"
14487 break;
14488
14489 case 355: /* primary: "(" compstmt_stmts ')' */
14490#line 4407 "parse.y"
14491 {
14492 if (nd_type_p((yyvsp[-1].node), NODE_SELF)) RNODE_SELF((yyvsp[-1].node))->nd_state = 0;
14493 (yyval.node) = NEW_BLOCK((yyvsp[-1].node), &(yyloc));
14494 /*% ripper: paren!($:2) %*/
14495 }
14496#line 14497 "parse.c"
14497 break;
14498
14499 case 356: /* primary: primary_value "::" "constant" */
14500#line 4413 "parse.y"
14501 {
14502 (yyval.node) = NEW_COLON2((yyvsp[-2].node), (yyvsp[0].id), &(yyloc), &(yylsp[-1]), &(yylsp[0]));
14503 /*% ripper: const_path_ref!($:1, $:3) %*/
14504 }
14505#line 14506 "parse.c"
14506 break;
14507
14508 case 357: /* primary: ":: at EXPR_BEG" "constant" */
14509#line 4418 "parse.y"
14510 {
14511 (yyval.node) = NEW_COLON3((yyvsp[0].id), &(yyloc), &(yylsp[-1]), &(yylsp[0]));
14512 /*% ripper: top_const_ref!($:2) %*/
14513 }
14514#line 14515 "parse.c"
14515 break;
14516
14517 case 358: /* primary: "[" aref_args ']' */
14518#line 4423 "parse.y"
14519 {
14520 (yyval.node) = make_list((yyvsp[-1].node), &(yyloc));
14521 /*% ripper: array!($:2) %*/
14522 }
14523#line 14524 "parse.c"
14524 break;
14525
14526 case 359: /* primary: "{" assoc_list '}' */
14527#line 4428 "parse.y"
14528 {
14529 (yyval.node) = new_hash(p, (yyvsp[-1].node), &(yyloc));
14530 RNODE_HASH((yyval.node))->nd_brace = TRUE;
14531 /*% ripper: hash!($:2) %*/
14532 }
14533#line 14534 "parse.c"
14534 break;
14535
14536 case 360: /* primary: k_return */
14537#line 4434 "parse.y"
14538 {
14539 (yyval.node) = NEW_RETURN(0, &(yyloc), &(yylsp[0]));
14540 /*% ripper: return0! %*/
14541 }
14542#line 14543 "parse.c"
14543 break;
14544
14545 case 361: /* primary: k_yield '(' call_args rparen */
14546#line 4439 "parse.y"
14547 {
14548 (yyval.node) = NEW_YIELD((yyvsp[-1].node), &(yyloc), &(yylsp[-3]), &(yylsp[-2]), &(yylsp[0]));
14549 /*% ripper: yield!(paren!($:3)) %*/
14550 }
14551#line 14552 "parse.c"
14552 break;
14553
14554 case 362: /* primary: k_yield '(' rparen */
14555#line 4444 "parse.y"
14556 {
14557 (yyval.node) = NEW_YIELD(0, &(yyloc), &(yylsp[-2]), &(yylsp[-1]), &(yylsp[0]));
14558 /*% ripper: yield!(paren!(args_new!)) %*/
14559 }
14560#line 14561 "parse.c"
14561 break;
14562
14563 case 363: /* primary: k_yield */
14564#line 4449 "parse.y"
14565 {
14566 (yyval.node) = NEW_YIELD(0, &(yyloc), &(yylsp[0]), &NULL_LOC, &NULL_LOC);
14567 /*% ripper: yield0! %*/
14568 }
14569#line 14570 "parse.c"
14570 break;
14571
14572 case 364: /* primary: "'defined?'" option_'\n' '(' begin_defined expr rparen */
14573#line 4454 "parse.y"
14574 {
14575 p->ctxt.in_defined = (yyvsp[-2].ctxt).in_defined;
14576 (yyval.node) = new_defined(p, (yyvsp[-1].node), &(yyloc), &(yylsp[-5]));
14577 p->ctxt.has_trailing_semicolon = (yyvsp[-2].ctxt).has_trailing_semicolon;
14578 /*% ripper: defined!($:5) %*/
14579 }
14580#line 14581 "parse.c"
14581 break;
14582
14583 case 365: /* primary: "'not'" '(' expr rparen */
14584#line 4461 "parse.y"
14585 {
14586 (yyval.node) = call_uni_op(p, method_cond(p, (yyvsp[-1].node), &(yylsp[-1])), METHOD_NOT, &(yylsp[-3]), &(yyloc));
14587 /*% ripper: unary!(ID2VAL(idNOT), $:3) %*/
14588 }
14589#line 14590 "parse.c"
14590 break;
14591
14592 case 366: /* primary: "'not'" '(' rparen */
14593#line 4466 "parse.y"
14594 {
14595 (yyval.node) = call_uni_op(p, method_cond(p, NEW_NIL(&(yylsp[-1])), &(yylsp[-1])), METHOD_NOT, &(yylsp[-2]), &(yyloc));
14596 /*% ripper: unary!(ID2VAL(idNOT), Qnil) %*/
14597 }
14598#line 14599 "parse.c"
14599 break;
14600
14601 case 367: /* primary: fcall brace_block */
14602#line 4471 "parse.y"
14603 {
14604 (yyval.node) = method_add_block(p, (NODE *)(yyvsp[-1].node_fcall), (yyvsp[0].node), &(yyloc));
14605 /*% ripper: method_add_block!(method_add_arg!(fcall!($:1), args_new!), $:2) %*/
14606 }
14607#line 14608 "parse.c"
14608 break;
14609
14610 case 369: /* primary: method_call brace_block */
14611#line 4477 "parse.y"
14612 {
14613 block_dup_check(p, get_nd_args(p, (yyvsp[-1].node)), (yyvsp[0].node));
14614 (yyval.node) = method_add_block(p, (yyvsp[-1].node), (yyvsp[0].node), &(yyloc));
14615 /*% ripper: method_add_block!($:1, $:2) %*/
14616 }
14617#line 14618 "parse.c"
14618 break;
14619
14620 case 371: /* primary: k_if expr_value then compstmt_stmts if_tail k_end */
14621#line 4487 "parse.y"
14622 {
14623 if ((yyvsp[-1].node) && nd_type_p((yyvsp[-1].node), NODE_IF))
14624 RNODE_IF((yyvsp[-1].node))->end_keyword_loc = (yylsp[0]);
14625
14626 (yyval.node) = new_if(p, (yyvsp[-4].node), (yyvsp[-2].node), (yyvsp[-1].node), &(yyloc), &(yylsp[-5]), &(yylsp[-3]), &(yylsp[0]));
14627 fixpos((yyval.node), (yyvsp[-4].node));
14628 /*% ripper: if!($:2, $:4, $:5) %*/
14629 }
14630#line 14631 "parse.c"
14631 break;
14632
14633 case 372: /* primary: k_unless expr_value then compstmt_stmts opt_else k_end */
14634#line 4499 "parse.y"
14635 {
14636 (yyval.node) = new_unless(p, (yyvsp[-4].node), (yyvsp[-2].node), (yyvsp[-1].node), &(yyloc), &(yylsp[-5]), &(yylsp[-3]), &(yylsp[0]));
14637 fixpos((yyval.node), (yyvsp[-4].node));
14638 /*% ripper: unless!($:2, $:4, $:5) %*/
14639 }
14640#line 14641 "parse.c"
14641 break;
14642
14643 case 373: /* primary: k_while expr_value_do compstmt_stmts k_end */
14644#line 4507 "parse.y"
14645 {
14646 restore_block_exit(p, (yyvsp[-3].node_exits));
14647 (yyval.node) = NEW_WHILE(cond(p, (yyvsp[-2].node), &(yylsp[-2])), (yyvsp[-1].node), 1, &(yyloc), &(yylsp[-3]), &(yylsp[0]));
14648 fixpos((yyval.node), (yyvsp[-2].node));
14649 /*% ripper: while!($:2, $:3) %*/
14650 }
14651#line 14652 "parse.c"
14652 break;
14653
14654 case 374: /* primary: k_until expr_value_do compstmt_stmts k_end */
14655#line 4516 "parse.y"
14656 {
14657 restore_block_exit(p, (yyvsp[-3].node_exits));
14658 (yyval.node) = NEW_UNTIL(cond(p, (yyvsp[-2].node), &(yylsp[-2])), (yyvsp[-1].node), 1, &(yyloc), &(yylsp[-3]), &(yylsp[0]));
14659 fixpos((yyval.node), (yyvsp[-2].node));
14660 /*% ripper: until!($:2, $:3) %*/
14661 }
14662#line 14663 "parse.c"
14663 break;
14664
14665 case 375: /* @16: %empty */
14666#line 4523 "parse.y"
14667 {
14668 (yyval.labels) = p->case_labels;
14669 p->case_labels = CHECK_LITERAL_WHEN;
14670 }
14671#line 14672 "parse.c"
14672 break;
14673
14674 case 376: /* primary: k_case expr_value option_terms @16 case_body k_end */
14675#line 4529 "parse.y"
14676 {
14677 if (CASE_LABELS_ENABLED_P(p->case_labels)) st_free_table(p->case_labels);
14678 p->case_labels = (yyvsp[-2].labels);
14679 (yyval.node) = NEW_CASE((yyvsp[-4].node), (yyvsp[-1].node), &(yyloc), &(yylsp[-5]), &(yylsp[0]));
14680 fixpos((yyval.node), (yyvsp[-4].node));
14681 /*% ripper: case!($:2, $:5) %*/
14682 }
14683#line 14684 "parse.c"
14684 break;
14685
14686 case 377: /* @17: %empty */
14687#line 4537 "parse.y"
14688 {
14689 (yyval.labels) = p->case_labels;
14690 p->case_labels = 0;
14691 }
14692#line 14693 "parse.c"
14693 break;
14694
14695 case 378: /* primary: k_case option_terms @17 case_body k_end */
14696#line 4543 "parse.y"
14697 {
14698 if (CASE_LABELS_ENABLED_P(p->case_labels)) st_free_table(p->case_labels);
14699 p->case_labels = (yyvsp[-2].labels);
14700 (yyval.node) = NEW_CASE2((yyvsp[-1].node), &(yyloc), &(yylsp[-4]), &(yylsp[0]));
14701 /*% ripper: case!(Qnil, $:4) %*/
14702 }
14703#line 14704 "parse.c"
14704 break;
14705
14706 case 379: /* primary: k_case expr_value option_terms p_case_body k_end */
14707#line 4552 "parse.y"
14708 {
14709 (yyval.node) = NEW_CASE3((yyvsp[-3].node), (yyvsp[-1].node), &(yyloc), &(yylsp[-4]), &(yylsp[0]));
14710 /*% ripper: case!($:2, $:4) %*/
14711 }
14712#line 14713 "parse.c"
14713 break;
14714
14715 case 380: /* $@18: %empty */
14716#line 4557 "parse.y"
14717 {COND_PUSH(1);}
14718#line 14719 "parse.c"
14719 break;
14720
14721 case 381: /* $@19: %empty */
14722#line 4557 "parse.y"
14723 {COND_POP();}
14724#line 14725 "parse.c"
14725 break;
14726
14727 case 382: /* primary: k_for for_var "'in'" $@18 expr_value do $@19 compstmt_stmts k_end */
14728#line 4560 "parse.y"
14729 {
14730 restore_block_exit(p, (yyvsp[-8].node_exits));
14731 /*
14732 * for a, b, c in e
14733 * #=>
14734 * e.each{|*x| a, b, c = x}
14735 *
14736 * for a in e
14737 * #=>
14738 * e.each{|x| a, = x}
14739 */
14740 ID id = internal_id(p);
14741 rb_node_args_aux_t *m = NEW_ARGS_AUX(0, 0, &NULL_LOC);
14742 rb_node_args_t *args;
14743 NODE *scope, *internal_var = NEW_DVAR(id, &(yylsp[-7]));
14744 rb_ast_id_table_t *tbl = rb_ast_new_local_table(p->ast, 1);
14745 tbl->ids[0] = id; /* internal id */
14746
14747 switch (nd_type((yyvsp[-7].node))) {
14748 case NODE_LASGN:
14749 case NODE_DASGN: /* e.each {|internal_var| a = internal_var; ... } */
14750 set_nd_value(p, (yyvsp[-7].node), internal_var);
14751 id = 0;
14752 m->nd_plen = 1;
14753 m->nd_next = (yyvsp[-7].node);
14754 break;
14755 case NODE_MASGN: /* e.each {|*internal_var| a, b, c = (internal_var.length == 1 && Array === (tmp = internal_var[0]) ? tmp : internal_var); ... } */
14756 m->nd_next = node_assign(p, (yyvsp[-7].node), NEW_FOR_MASGN(internal_var, &(yylsp[-7])), NO_LEX_CTXT, &(yylsp[-7]));
14757 break;
14758 default: /* e.each {|*internal_var| @a, B, c[1], d.attr = internal_val; ... } */
14759 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]));
14760 }
14761 /* {|*internal_id| <m> = internal_id; ... } */
14762 args = new_args(p, m, 0, id, 0, new_args_tail(p, 0, 0, 0, &(yylsp[-7])), &(yylsp[-7]));
14763 scope = NEW_SCOPE2(tbl, args, (yyvsp[-1].node), NULL, &(yyloc));
14764 YYLTYPE do_keyword_loc = (yyvsp[-3].id) == keyword_do_cond ? (yylsp[-3]) : NULL_LOC;
14765 (yyval.node) = NEW_FOR((yyvsp[-4].node), scope, &(yyloc), &(yylsp[-8]), &(yylsp[-6]), &do_keyword_loc, &(yylsp[0]));
14766 RNODE_SCOPE(scope)->nd_parent = (yyval.node);
14767 fixpos((yyval.node), (yyvsp[-7].node));
14768 /*% ripper: for!($:for_var, $:expr_value, $:compstmt) %*/
14769 }
14770#line 14771 "parse.c"
14771 break;
14772
14773 case 383: /* $@20: %empty */
14774#line 4602 "parse.y"
14775 {
14776 begin_definition("class", &(yylsp[-2]), &(yylsp[-1]));
14777 }
14778#line 14779 "parse.c"
14779 break;
14780
14781 case 384: /* primary: k_class cpath superclass $@20 bodystmt k_end */
14782#line 4607 "parse.y"
14783 {
14784 YYLTYPE inheritance_operator_loc = NULL_LOC;
14785 if ((yyvsp[-3].node)) {
14786 inheritance_operator_loc = (yylsp[-3]);
14787 inheritance_operator_loc.end_pos.column = inheritance_operator_loc.beg_pos.column + 1;
14788 }
14789 (yyval.node) = NEW_CLASS((yyvsp[-4].node), (yyvsp[-1].node), (yyvsp[-3].node), &(yyloc), &(yylsp[-5]), &inheritance_operator_loc, &(yylsp[0]));
14790 nd_set_line(RNODE_CLASS((yyval.node))->nd_body, (yylsp[0]).end_pos.lineno);
14791 set_line_body((yyvsp[-1].node), (yylsp[-3]).end_pos.lineno);
14792 nd_set_line((yyval.node), (yylsp[-3]).end_pos.lineno);
14793 /*% ripper: class!($:cpath, $:superclass, $:bodystmt) %*/
14794 local_pop(p);
14795 p->ctxt.in_class = (yyvsp[-5].ctxt).in_class;
14796 p->ctxt.cant_return = (yyvsp[-5].ctxt).cant_return;
14797 p->ctxt.shareable_constant_value = (yyvsp[-5].ctxt).shareable_constant_value;
14798 p->ctxt.in_rescue = (yyvsp[-5].ctxt).in_rescue;
14799 }
14800#line 14801 "parse.c"
14801 break;
14802
14803 case 385: /* $@21: %empty */
14804#line 4625 "parse.y"
14805 {
14806 begin_definition("", &(yylsp[-2]), &(yylsp[-1]));
14807 }
14808#line 14809 "parse.c"
14809 break;
14810
14811 case 386: /* primary: k_class "<<" expr_value $@21 term bodystmt k_end */
14812#line 4631 "parse.y"
14813 {
14814 (yyval.node) = NEW_SCLASS((yyvsp[-4].node), (yyvsp[-1].node), &(yyloc), &(yylsp[-6]), &(yylsp[-5]), &(yylsp[0]));
14815 nd_set_line(RNODE_SCLASS((yyval.node))->nd_body, (yylsp[0]).end_pos.lineno);
14816 set_line_body((yyvsp[-1].node), nd_line((yyvsp[-4].node)));
14817 fixpos((yyval.node), (yyvsp[-4].node));
14818 /*% ripper: sclass!($:expr_value, $:bodystmt) %*/
14819 local_pop(p);
14820 p->ctxt.in_def = (yyvsp[-6].ctxt).in_def;
14821 p->ctxt.in_class = (yyvsp[-6].ctxt).in_class;
14822 p->ctxt.cant_return = (yyvsp[-6].ctxt).cant_return;
14823 p->ctxt.shareable_constant_value = (yyvsp[-6].ctxt).shareable_constant_value;
14824 p->ctxt.in_rescue = (yyvsp[-6].ctxt).in_rescue;
14825 }
14826#line 14827 "parse.c"
14827 break;
14828
14829 case 387: /* $@22: %empty */
14830#line 4645 "parse.y"
14831 {
14832 begin_definition("module", &(yylsp[-1]), &(yylsp[0]));
14833 }
14834#line 14835 "parse.c"
14835 break;
14836
14837 case 388: /* primary: k_module cpath $@22 bodystmt k_end */
14838#line 4650 "parse.y"
14839 {
14840 (yyval.node) = NEW_MODULE((yyvsp[-3].node), (yyvsp[-1].node), &(yyloc), &(yylsp[-4]), &(yylsp[0]));
14841 nd_set_line(RNODE_MODULE((yyval.node))->nd_body, (yylsp[0]).end_pos.lineno);
14842 set_line_body((yyvsp[-1].node), (yylsp[-3]).end_pos.lineno);
14843 nd_set_line((yyval.node), (yylsp[-3]).end_pos.lineno);
14844 /*% ripper: module!($:cpath, $:bodystmt) %*/
14845 local_pop(p);
14846 p->ctxt.in_class = (yyvsp[-4].ctxt).in_class;
14847 p->ctxt.cant_return = (yyvsp[-4].ctxt).cant_return;
14848 p->ctxt.shareable_constant_value = (yyvsp[-4].ctxt).shareable_constant_value;
14849 p->ctxt.in_rescue = (yyvsp[-4].ctxt).in_rescue;
14850 }
14851#line 14852 "parse.c"
14852 break;
14853
14854 case 389: /* $@23: %empty */
14855#line 4664 "parse.y"
14856 {
14857 push_end_expect_token_locations(p, &(yylsp[-1]).beg_pos);
14858 }
14859#line 14860 "parse.c"
14860 break;
14861
14862 case 390: /* primary: defn_head f_arglist $@23 bodystmt k_end */
14863#line 4669 "parse.y"
14864 {
14865 restore_defun(p, (yyvsp[-4].node_def_temp));
14866 ((yyval.node) = (yyvsp[-4].node_def_temp)->nd_def)->nd_loc = (yyloc);
14867 (yyvsp[-1].node) = new_scope_body(p, (yyvsp[-3].node_args), (yyvsp[-1].node), (yyval.node), &(yyloc));
14868 RNODE_DEFN((yyval.node))->nd_defn = (yyvsp[-1].node);
14869 /*% ripper: def!($:head, $:args, $:bodystmt) %*/
14870 local_pop(p);
14871 }
14872#line 14873 "parse.c"
14873 break;
14874
14875 case 391: /* $@24: %empty */
14876#line 4679 "parse.y"
14877 {
14878 push_end_expect_token_locations(p, &(yylsp[-1]).beg_pos);
14879 }
14880#line 14881 "parse.c"
14881 break;
14882
14883 case 392: /* primary: defs_head f_arglist $@24 bodystmt k_end */
14884#line 4684 "parse.y"
14885 {
14886 restore_defun(p, (yyvsp[-4].node_def_temp));
14887 ((yyval.node) = (yyvsp[-4].node_def_temp)->nd_def)->nd_loc = (yyloc);
14888 (yyvsp[-1].node) = new_scope_body(p, (yyvsp[-3].node_args), (yyvsp[-1].node), (yyval.node), &(yyloc));
14889 RNODE_DEFS((yyval.node))->nd_defn = (yyvsp[-1].node);
14890 /*% ripper: defs!(*$:head[0..2], $:args, $:bodystmt) %*/
14891 local_pop(p);
14892 }
14893#line 14894 "parse.c"
14894 break;
14895
14896 case 393: /* primary: "'break'" */
14897#line 4693 "parse.y"
14898 {
14899 (yyval.node) = add_block_exit(p, NEW_BREAK(0, &(yyloc), &(yylsp[0])));
14900 /*% ripper: break!(args_new!) %*/
14901 }
14902#line 14903 "parse.c"
14903 break;
14904
14905 case 394: /* primary: "'next'" */
14906#line 4698 "parse.y"
14907 {
14908 (yyval.node) = add_block_exit(p, NEW_NEXT(0, &(yyloc), &(yylsp[0])));
14909 /*% ripper: next!(args_new!) %*/
14910 }
14911#line 14912 "parse.c"
14912 break;
14913
14914 case 395: /* primary: "'redo'" */
14915#line 4703 "parse.y"
14916 {
14917 (yyval.node) = add_block_exit(p, NEW_REDO(&(yyloc), &(yylsp[0])));
14918 /*% ripper: redo! %*/
14919 }
14920#line 14921 "parse.c"
14921 break;
14922
14923 case 396: /* primary: "'retry'" */
14924#line 4708 "parse.y"
14925 {
14926 if (!p->ctxt.in_defined) {
14927 switch (p->ctxt.in_rescue) {
14928 case before_rescue: yyerror1(&(yylsp[0]), "Invalid retry without rescue"); break;
14929 case after_rescue: /* ok */ break;
14930 case after_else: yyerror1(&(yylsp[0]), "Invalid retry after else"); break;
14931 case after_ensure: yyerror1(&(yylsp[0]), "Invalid retry after ensure"); break;
14932 }
14933 }
14934 (yyval.node) = NEW_RETRY(&(yyloc));
14935 /*% ripper: retry! %*/
14936 }
14937#line 14938 "parse.c"
14938 break;
14939
14940 case 397: /* value_expr_primary: primary */
14941#line 3155 "parse.y"
14942 {
14943 value_expr(p, (yyvsp[0].node));
14944 (yyval.node) = (yyvsp[0].node);
14945 }
14946#line 14947 "parse.c"
14947 break;
14948
14949 case 399: /* k_begin: "'begin'" */
14950#line 4726 "parse.y"
14951 {
14952 token_info_push(p, "begin", &(yyloc));
14953 push_end_expect_token_locations(p, &(yylsp[0]).beg_pos);
14954 }
14955#line 14956 "parse.c"
14956 break;
14957
14958 case 400: /* k_if: "'if'" */
14959#line 4733 "parse.y"
14960 {
14961 WARN_EOL("if");
14962 token_info_push(p, "if", &(yyloc));
14963 if (p->token_info && p->token_info->nonspc &&
14964 p->token_info->next && !strcmp(p->token_info->next->token, "else")) {
14965 const char *tok = p->lex.ptok - rb_strlen_lit("if");
14966 const char *beg = p->lex.pbeg + p->token_info->next->beg.column;
14967 beg += rb_strlen_lit("else");
14968 while (beg < tok && ISSPACE(*beg)) beg++;
14969 if (beg == tok) {
14970 p->token_info->nonspc = 0;
14971 }
14972 }
14973 push_end_expect_token_locations(p, &(yylsp[0]).beg_pos);
14974 }
14975#line 14976 "parse.c"
14976 break;
14977
14978 case 401: /* k_unless: "'unless'" */
14979#line 4751 "parse.y"
14980 {
14981 token_info_push(p, "unless", &(yyloc));
14982 push_end_expect_token_locations(p, &(yylsp[0]).beg_pos);
14983 }
14984#line 14985 "parse.c"
14985 break;
14986
14987 case 402: /* k_while: "'while'" allow_exits */
14988#line 4758 "parse.y"
14989 {
14990 (yyval.node_exits) = (yyvsp[0].node_exits);
14991 token_info_push(p, "while", &(yyloc));
14992 push_end_expect_token_locations(p, &(yylsp[-1]).beg_pos);
14993 }
14994#line 14995 "parse.c"
14995 break;
14996
14997 case 403: /* k_until: "'until'" allow_exits */
14998#line 4766 "parse.y"
14999 {
15000 (yyval.node_exits) = (yyvsp[0].node_exits);
15001 token_info_push(p, "until", &(yyloc));
15002 push_end_expect_token_locations(p, &(yylsp[-1]).beg_pos);
15003 }
15004#line 15005 "parse.c"
15005 break;
15006
15007 case 404: /* k_case: "'case'" */
15008#line 4774 "parse.y"
15009 {
15010 token_info_push(p, "case", &(yyloc));
15011 push_end_expect_token_locations(p, &(yylsp[0]).beg_pos);
15012 }
15013#line 15014 "parse.c"
15014 break;
15015
15016 case 405: /* k_for: "'for'" allow_exits */
15017#line 4781 "parse.y"
15018 {
15019 (yyval.node_exits) = (yyvsp[0].node_exits);
15020 token_info_push(p, "for", &(yyloc));
15021 push_end_expect_token_locations(p, &(yylsp[-1]).beg_pos);
15022 }
15023#line 15024 "parse.c"
15024 break;
15025
15026 case 406: /* k_class: "'class'" */
15027#line 4789 "parse.y"
15028 {
15029 token_info_push(p, "class", &(yyloc));
15030 (yyval.ctxt) = p->ctxt;
15031 p->ctxt.in_rescue = before_rescue;
15032 push_end_expect_token_locations(p, &(yylsp[0]).beg_pos);
15033 }
15034#line 15035 "parse.c"
15035 break;
15036
15037 case 407: /* k_module: "'module'" */
15038#line 4798 "parse.y"
15039 {
15040 token_info_push(p, "module", &(yyloc));
15041 (yyval.ctxt) = p->ctxt;
15042 p->ctxt.in_rescue = before_rescue;
15043 push_end_expect_token_locations(p, &(yylsp[0]).beg_pos);
15044 }
15045#line 15046 "parse.c"
15046 break;
15047
15048 case 408: /* k_def: "'def'" */
15049#line 4807 "parse.y"
15050 {
15051 token_info_push(p, "def", &(yyloc));
15052 (yyval.node_def_temp) = NEW_DEF_TEMP(&(yyloc));
15053 p->ctxt.in_argdef = 1;
15054 }
15055#line 15056 "parse.c"
15056 break;
15057
15058 case 409: /* k_do: "'do'" */
15059#line 4815 "parse.y"
15060 {
15061 token_info_push(p, "do", &(yyloc));
15062 push_end_expect_token_locations(p, &(yylsp[0]).beg_pos);
15063 }
15064#line 15065 "parse.c"
15065 break;
15066
15067 case 410: /* k_do_block: "'do' for block" */
15068#line 4822 "parse.y"
15069 {
15070 token_info_push(p, "do", &(yyloc));
15071 push_end_expect_token_locations(p, &(yylsp[0]).beg_pos);
15072 }
15073#line 15074 "parse.c"
15074 break;
15075
15076 case 411: /* k_rescue: "'rescue'" */
15077#line 4829 "parse.y"
15078 {
15079 token_info_warn(p, "rescue", p->token_info, 1, &(yyloc));
15080 (yyval.ctxt) = p->ctxt;
15081 p->ctxt.in_rescue = after_rescue;
15082 }
15083#line 15084 "parse.c"
15084 break;
15085
15086 case 412: /* k_ensure: "'ensure'" */
15087#line 4837 "parse.y"
15088 {
15089 token_info_warn(p, "ensure", p->token_info, 1, &(yyloc));
15090 (yyval.ctxt) = p->ctxt;
15091 }
15092#line 15093 "parse.c"
15093 break;
15094
15095 case 413: /* k_when: "'when'" */
15096#line 4844 "parse.y"
15097 {
15098 token_info_warn(p, "when", p->token_info, 0, &(yyloc));
15099 }
15100#line 15101 "parse.c"
15101 break;
15102
15103 case 414: /* k_else: "'else'" */
15104#line 4850 "parse.y"
15105 {
15106 token_info *ptinfo_beg = p->token_info;
15107 int same = ptinfo_beg && strcmp(ptinfo_beg->token, "case") != 0;
15108 token_info_warn(p, "else", p->token_info, same, &(yyloc));
15109 if (same) {
15110 token_info e;
15111 e.next = ptinfo_beg->next;
15112 e.token = "else";
15113 token_info_setup(&e, p->lex.pbeg, &(yyloc));
15114 if (!e.nonspc) *ptinfo_beg = e;
15115 }
15116 }
15117#line 15118 "parse.c"
15118 break;
15119
15120 case 415: /* k_elsif: "'elsif'" */
15121#line 4865 "parse.y"
15122 {
15123 WARN_EOL("elsif");
15124 token_info_warn(p, "elsif", p->token_info, 1, &(yyloc));
15125 }
15126#line 15127 "parse.c"
15127 break;
15128
15129 case 416: /* k_end: "'end'" */
15130#line 4872 "parse.y"
15131 {
15132 token_info_pop(p, "end", &(yyloc));
15133 pop_end_expect_token_locations(p);
15134 }
15135#line 15136 "parse.c"
15136 break;
15137
15138 case 417: /* k_end: "dummy end" */
15139#line 4877 "parse.y"
15140 {
15141 compile_error(p, "syntax error, unexpected end-of-input");
15142 }
15143#line 15144 "parse.c"
15144 break;
15145
15146 case 418: /* k_return: "'return'" */
15147#line 4883 "parse.y"
15148 {
15149 if (p->ctxt.cant_return && !dyna_in_block(p))
15150 yyerror1(&(yylsp[0]), "Invalid return in class/module body");
15151 }
15152#line 15153 "parse.c"
15153 break;
15154
15155 case 419: /* k_return_arg: k_return */
15156#line 4890 "parse.y"
15157 {
15158 CMDARG_PUSH(0);
15159 }
15160#line 15161 "parse.c"
15161 break;
15162
15163 case 420: /* k_break_arg: "'break'" */
15164#line 4896 "parse.y"
15165 {
15166 CMDARG_PUSH(0);
15167 }
15168#line 15169 "parse.c"
15169 break;
15170
15171 case 421: /* k_next_arg: "'next'" */
15172#line 4902 "parse.y"
15173 {
15174 CMDARG_PUSH(0);
15175 }
15176#line 15177 "parse.c"
15177 break;
15178
15179 case 422: /* k_yield: "'yield'" */
15180#line 4908 "parse.y"
15181 {
15182 if (!p->ctxt.in_defined && !p->ctxt.in_def && !compile_for_eval)
15183 yyerror1(&(yylsp[0]), "Invalid yield");
15184 }
15185#line 15186 "parse.c"
15186 break;
15187
15188 case 427: /* do: "'do' for condition" */
15189#line 4920 "parse.y"
15190 { (yyval.id) = keyword_do_cond; }
15191#line 15192 "parse.c"
15192 break;
15193
15194 case 429: /* if_tail: k_elsif expr_value then compstmt_stmts if_tail */
15195#line 4927 "parse.y"
15196 {
15197 (yyval.node) = new_if(p, (yyvsp[-3].node), (yyvsp[-1].node), (yyvsp[0].node), &(yyloc), &(yylsp[-4]), &(yylsp[-2]), &NULL_LOC);
15198 fixpos((yyval.node), (yyvsp[-3].node));
15199 /*% ripper: elsif!($:2, $:4, $:5) %*/
15200 }
15201#line 15202 "parse.c"
15202 break;
15203
15204 case 431: /* opt_else: k_else compstmt_stmts */
15205#line 4936 "parse.y"
15206 {
15207 (yyval.node) = (yyvsp[0].node);
15208 /*% ripper: else!($:2) %*/
15209 }
15210#line 15211 "parse.c"
15211 break;
15212
15213 case 434: /* f_marg: f_norm_arg */
15214#line 4947 "parse.y"
15215 {
15216 (yyval.node) = assignable(p, (yyvsp[0].id), 0, &(yyloc));
15217 mark_lvar_used(p, (yyval.node));
15218 }
15219#line 15220 "parse.c"
15220 break;
15221
15222 case 435: /* f_marg: "(" f_margs rparen */
15223#line 4952 "parse.y"
15224 {
15225 (yyval.node) = (NODE *)(yyvsp[-1].node_masgn);
15226 /*% ripper: mlhs_paren!($:2) %*/
15227 }
15228#line 15229 "parse.c"
15229 break;
15230
15231 case 436: /* mlhs_items_f_marg: f_marg */
15232#line 3042 "parse.y"
15233 {
15234 (yyval.node) = NEW_LIST((yyvsp[0].node), &(yyloc));
15235 /*% ripper: mlhs_add!(mlhs_new!, $:1) %*/
15236 }
15237#line 15238 "parse.c"
15238 break;
15239
15240 case 437: /* mlhs_items_f_marg: mlhs_items_f_marg ',' f_marg */
15241#line 3047 "parse.y"
15242 {
15243 (yyval.node) = list_append(p, (yyvsp[-2].node), (yyvsp[0].node));
15244 /*% ripper: mlhs_add!($:1, $:3) %*/
15245 }
15246#line 15247 "parse.c"
15247 break;
15248
15249 case 438: /* f_margs: mlhs_items_f_marg */
15250#line 4960 "parse.y"
15251 {
15252 (yyval.node_masgn) = NEW_MASGN((yyvsp[0].node), 0, &(yyloc));
15253 /*% ripper: $:1 %*/
15254 }
15255#line 15256 "parse.c"
15256 break;
15257
15258 case 439: /* f_margs: mlhs_items_f_marg ',' f_rest_marg */
15259#line 4965 "parse.y"
15260 {
15261 (yyval.node_masgn) = NEW_MASGN((yyvsp[-2].node), (yyvsp[0].node), &(yyloc));
15262 /*% ripper: mlhs_add_star!($:1, $:3) %*/
15263 }
15264#line 15265 "parse.c"
15265 break;
15266
15267 case 440: /* f_margs: mlhs_items_f_marg ',' f_rest_marg ',' mlhs_items_f_marg */
15268#line 4970 "parse.y"
15269 {
15270 (yyval.node_masgn) = NEW_MASGN((yyvsp[-4].node), NEW_POSTARG((yyvsp[-2].node), (yyvsp[0].node), &(yyloc)), &(yyloc));
15271 /*% ripper: mlhs_add_post!(mlhs_add_star!($:1, $:3), $:5) %*/
15272 }
15273#line 15274 "parse.c"
15274 break;
15275
15276 case 441: /* f_margs: f_rest_marg */
15277#line 4975 "parse.y"
15278 {
15279 (yyval.node_masgn) = NEW_MASGN(0, (yyvsp[0].node), &(yyloc));
15280 /*% ripper: mlhs_add_star!(mlhs_new!, $:1) %*/
15281 }
15282#line 15283 "parse.c"
15283 break;
15284
15285 case 442: /* f_margs: f_rest_marg ',' mlhs_items_f_marg */
15286#line 4980 "parse.y"
15287 {
15288 (yyval.node_masgn) = NEW_MASGN(0, NEW_POSTARG((yyvsp[-2].node), (yyvsp[0].node), &(yyloc)), &(yyloc));
15289 /*% ripper: mlhs_add_post!(mlhs_add_star!(mlhs_new!, $:1), $:3) %*/
15290 }
15291#line 15292 "parse.c"
15292 break;
15293
15294 case 443: /* f_rest_marg: "*" f_norm_arg */
15295#line 4987 "parse.y"
15296 {
15297 /*% ripper: $:2 %*/
15298 (yyval.node) = assignable(p, (yyvsp[0].id), 0, &(yyloc));
15299 mark_lvar_used(p, (yyval.node));
15300 }
15301#line 15302 "parse.c"
15302 break;
15303
15304 case 444: /* f_rest_marg: "*" */
15305#line 4993 "parse.y"
15306 {
15307 (yyval.node) = NODE_SPECIAL_NO_NAME_REST;
15308 /*% ripper: Qnil %*/
15309 }
15310#line 15311 "parse.c"
15311 break;
15312
15313 case 446: /* f_any_kwrest: f_no_kwarg */
15314#line 5001 "parse.y"
15315 {
15316 (yyval.id) = idNil;
15317 /*% ripper: ID2VAL(idNil) %*/
15318 }
15319#line 15320 "parse.c"
15320 break;
15321
15322 case 447: /* $@25: %empty */
15323#line 5007 "parse.y"
15324 {p->ctxt.in_argdef = 0;}
15325#line 15326 "parse.c"
15326 break;
15327
15328 case 449: /* f_kw_primary_value: f_label primary_value */
15329#line 3014 "parse.y"
15330 {
15331 p->ctxt.in_argdef = 1;
15332 (yyval.node_kw_arg) = new_kw_arg(p, assignable(p, (yyvsp[-1].id), (yyvsp[0].node), &(yyloc)), &(yyloc));
15333 /*% ripper: [$:$, $:value] %*/
15334 }
15335#line 15336 "parse.c"
15336 break;
15337
15338 case 450: /* f_kw_primary_value: f_label */
15339#line 3020 "parse.y"
15340 {
15341 p->ctxt.in_argdef = 1;
15342 (yyval.node_kw_arg) = new_kw_arg(p, assignable(p, (yyvsp[0].id), NODE_SPECIAL_REQUIRED_KEYWORD, &(yyloc)), &(yyloc));
15343 /*% ripper: [$:$, 0] %*/
15344 }
15345#line 15346 "parse.c"
15346 break;
15347
15348 case 451: /* f_kwarg_primary_value: f_kw_primary_value */
15349#line 3029 "parse.y"
15350 {
15351 (yyval.node_kw_arg) = (yyvsp[0].node_kw_arg);
15352 /*% ripper: rb_ary_new3(1, $:1) %*/
15353 }
15354#line 15355 "parse.c"
15355 break;
15356
15357 case 452: /* f_kwarg_primary_value: f_kwarg_primary_value ',' f_kw_primary_value */
15358#line 3034 "parse.y"
15359 {
15360 (yyval.node_kw_arg) = kwd_append((yyvsp[-2].node_kw_arg), (yyvsp[0].node_kw_arg));
15361 /*% ripper: rb_ary_push($:1, $:3) %*/
15362 }
15363#line 15364 "parse.c"
15364 break;
15365
15366 case 453: /* args_tail_basic_primary_value: f_kwarg_primary_value ',' f_kwrest opt_f_block_arg */
15367#line 2937 "parse.y"
15368 {
15369 (yyval.node_args) = new_args_tail(p, (yyvsp[-3].node_kw_arg), (yyvsp[-1].id), (yyvsp[0].id), &(yylsp[-1]));
15370 /*% ripper: [$:1, $:3, $:4] %*/
15371 }
15372#line 15373 "parse.c"
15373 break;
15374
15375 case 454: /* args_tail_basic_primary_value: f_kwarg_primary_value opt_f_block_arg */
15376#line 2942 "parse.y"
15377 {
15378 (yyval.node_args) = new_args_tail(p, (yyvsp[-1].node_kw_arg), 0, (yyvsp[0].id), &(yylsp[-1]));
15379 /*% ripper: [$:1, Qnil, $:2] %*/
15380 }
15381#line 15382 "parse.c"
15382 break;
15383
15384 case 455: /* args_tail_basic_primary_value: f_any_kwrest opt_f_block_arg */
15385#line 2947 "parse.y"
15386 {
15387 (yyval.node_args) = new_args_tail(p, 0, (yyvsp[-1].id), (yyvsp[0].id), &(yylsp[-1]));
15388 /*% ripper: [Qnil, $:1, $:2] %*/
15389 }
15390#line 15391 "parse.c"
15391 break;
15392
15393 case 456: /* args_tail_basic_primary_value: f_block_arg */
15394#line 2952 "parse.y"
15395 {
15396 (yyval.node_args) = new_args_tail(p, 0, 0, (yyvsp[0].id), &(yylsp[0]));
15397 /*% ripper: [Qnil, Qnil, $:1] %*/
15398 }
15399#line 15400 "parse.c"
15400 break;
15401
15402 case 458: /* excessed_comma: ',' */
15403#line 5013 "parse.y"
15404 {
15405 /* magic number for rest_id in iseq_set_arguments() */
15406 (yyval.id) = NODE_SPECIAL_EXCESSIVE_COMMA;
15407 /*% ripper: excessed_comma! %*/
15408 }
15409#line 15410 "parse.c"
15410 break;
15411
15412 case 459: /* f_opt_primary_value: f_arg_asgn f_eq primary_value */
15413#line 2992 "parse.y"
15414 {
15415 p->ctxt.in_argdef = 1;
15416 (yyval.node_opt_arg) = NEW_OPT_ARG(assignable(p, (yyvsp[-2].id), (yyvsp[0].node), &(yyloc)), &(yyloc));
15417 /*% ripper: [$:$, $:3] %*/
15418 }
15419#line 15420 "parse.c"
15420 break;
15421
15422 case 460: /* f_opt_arg_primary_value: f_opt_primary_value */
15423#line 3001 "parse.y"
15424 {
15425 (yyval.node_opt_arg) = (yyvsp[0].node_opt_arg);
15426 /*% ripper: rb_ary_new3(1, $:1) %*/
15427 }
15428#line 15429 "parse.c"
15429 break;
15430
15431 case 461: /* f_opt_arg_primary_value: f_opt_arg_primary_value ',' f_opt_primary_value */
15432#line 3006 "parse.y"
15433 {
15434 (yyval.node_opt_arg) = opt_arg_append((yyvsp[-2].node_opt_arg), (yyvsp[0].node_opt_arg));
15435 /*% ripper: rb_ary_push($:1, $:3) %*/
15436 }
15437#line 15438 "parse.c"
15438 break;
15439
15440 case 462: /* opt_args_tail_block_args_tail: ',' block_args_tail */
15441#line 3101 "parse.y"
15442 {
15443 (yyval.node_args) = (yyvsp[0].node_args);
15444 /*% ripper: $:2 %*/
15445 }
15446#line 15447 "parse.c"
15447 break;
15448
15449 case 463: /* opt_args_tail_block_args_tail: %empty */
15450#line 3106 "parse.y"
15451 {
15452 (yyval.node_args) = new_args_tail(p, 0, 0, 0, &(yylsp[0]));
15453 /*% ripper: [Qnil, Qnil, Qnil] %*/
15454 }
15455#line 15456 "parse.c"
15456 break;
15457
15458 case 464: /* block_param: f_arg ',' f_opt_arg_primary_value ',' f_rest_arg opt_args_tail_block_args_tail */
15459#line 5021 "parse.y"
15460 {
15461 (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));
15462 /*% ripper: params!($:1, $:3, $:5, Qnil, *$:6[0..2]) %*/
15463 }
15464#line 15465 "parse.c"
15465 break;
15466
15467 case 465: /* block_param: f_arg ',' f_opt_arg_primary_value ',' f_rest_arg ',' f_arg opt_args_tail_block_args_tail */
15468#line 5026 "parse.y"
15469 {
15470 (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));
15471 /*% ripper: params!($:1, $:3, $:5, $:7, *$:8[0..2]) %*/
15472 }
15473#line 15474 "parse.c"
15474 break;
15475
15476 case 466: /* block_param: f_arg ',' f_opt_arg_primary_value opt_args_tail_block_args_tail */
15477#line 5031 "parse.y"
15478 {
15479 (yyval.node_args) = new_args(p, (yyvsp[-3].node_args_aux), (yyvsp[-1].node_opt_arg), 0, 0, (yyvsp[0].node_args), &(yyloc));
15480 /*% ripper: params!($:1, $:3, Qnil, Qnil, *$:4[0..2]) %*/
15481 }
15482#line 15483 "parse.c"
15483 break;
15484
15485 case 467: /* block_param: f_arg ',' f_opt_arg_primary_value ',' f_arg opt_args_tail_block_args_tail */
15486#line 5036 "parse.y"
15487 {
15488 (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));
15489 /*% ripper: params!($:1, $:3, Qnil, $:5, *$:6[0..2]) %*/
15490 }
15491#line 15492 "parse.c"
15492 break;
15493
15494 case 468: /* block_param: f_arg ',' f_rest_arg opt_args_tail_block_args_tail */
15495#line 5041 "parse.y"
15496 {
15497 (yyval.node_args) = new_args(p, (yyvsp[-3].node_args_aux), 0, (yyvsp[-1].id), 0, (yyvsp[0].node_args), &(yyloc));
15498 /*% ripper: params!($:1, Qnil, $:3, Qnil, *$:4[0..2]) %*/
15499 }
15500#line 15501 "parse.c"
15501 break;
15502
15503 case 469: /* block_param: f_arg excessed_comma */
15504#line 5046 "parse.y"
15505 {
15506 (yyval.node_args) = new_args_tail(p, 0, 0, 0, &(yylsp[0]));
15507 (yyval.node_args) = new_args(p, (yyvsp[-1].node_args_aux), 0, (yyvsp[0].id), 0, (yyval.node_args), &(yyloc));
15508 /*% ripper: params!($:1, Qnil, $:2, Qnil, Qnil, Qnil, Qnil) %*/
15509 }
15510#line 15511 "parse.c"
15511 break;
15512
15513 case 470: /* block_param: f_arg ',' f_rest_arg ',' f_arg opt_args_tail_block_args_tail */
15514#line 5052 "parse.y"
15515 {
15516 (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));
15517 /*% ripper: params!($:1, Qnil, $:3, $:5, *$:6[0..2]) %*/
15518 }
15519#line 15520 "parse.c"
15520 break;
15521
15522 case 471: /* block_param: f_arg opt_args_tail_block_args_tail */
15523#line 5057 "parse.y"
15524 {
15525 (yyval.node_args) = new_args(p, (yyvsp[-1].node_args_aux), 0, 0, 0, (yyvsp[0].node_args), &(yyloc));
15526 /*% ripper: params!($:1, Qnil, Qnil, Qnil, *$:2[0..2]) %*/
15527 }
15528#line 15529 "parse.c"
15529 break;
15530
15531 case 472: /* block_param: f_opt_arg_primary_value ',' f_rest_arg opt_args_tail_block_args_tail */
15532#line 5062 "parse.y"
15533 {
15534 (yyval.node_args) = new_args(p, 0, (yyvsp[-3].node_opt_arg), (yyvsp[-1].id), 0, (yyvsp[0].node_args), &(yyloc));
15535 /*% ripper: params!(Qnil, $:1, $:3, Qnil, *$:4[0..2]) %*/
15536 }
15537#line 15538 "parse.c"
15538 break;
15539
15540 case 473: /* block_param: f_opt_arg_primary_value ',' f_rest_arg ',' f_arg opt_args_tail_block_args_tail */
15541#line 5067 "parse.y"
15542 {
15543 (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));
15544 /*% ripper: params!(Qnil, $:1, $:3, $:5, *$:6[0..2]) %*/
15545 }
15546#line 15547 "parse.c"
15547 break;
15548
15549 case 474: /* block_param: f_opt_arg_primary_value opt_args_tail_block_args_tail */
15550#line 5072 "parse.y"
15551 {
15552 (yyval.node_args) = new_args(p, 0, (yyvsp[-1].node_opt_arg), 0, 0, (yyvsp[0].node_args), &(yyloc));
15553 /*% ripper: params!(Qnil, $:1, Qnil, Qnil, *$:2[0..2]) %*/
15554 }
15555#line 15556 "parse.c"
15556 break;
15557
15558 case 475: /* block_param: f_opt_arg_primary_value ',' f_arg opt_args_tail_block_args_tail */
15559#line 5077 "parse.y"
15560 {
15561 (yyval.node_args) = new_args(p, 0, (yyvsp[-3].node_opt_arg), 0, (yyvsp[-1].node_args_aux), (yyvsp[0].node_args), &(yyloc));
15562 /*% ripper: params!(Qnil, $:1, Qnil, $:3, *$:4[0..2]) %*/
15563 }
15564#line 15565 "parse.c"
15565 break;
15566
15567 case 476: /* block_param: f_rest_arg opt_args_tail_block_args_tail */
15568#line 5082 "parse.y"
15569 {
15570 (yyval.node_args) = new_args(p, 0, 0, (yyvsp[-1].id), 0, (yyvsp[0].node_args), &(yyloc));
15571 /*% ripper: params!(Qnil, Qnil, $:1, Qnil, *$:2[0..2]) %*/
15572 }
15573#line 15574 "parse.c"
15574 break;
15575
15576 case 477: /* block_param: f_rest_arg ',' f_arg opt_args_tail_block_args_tail */
15577#line 5087 "parse.y"
15578 {
15579 (yyval.node_args) = new_args(p, 0, 0, (yyvsp[-3].id), (yyvsp[-1].node_args_aux), (yyvsp[0].node_args), &(yyloc));
15580 /*% ripper: params!(Qnil, Qnil, $:1, $:3, *$:4[0..2]) %*/
15581 }
15582#line 15583 "parse.c"
15583 break;
15584
15585 case 478: /* block_param: block_args_tail */
15586#line 5092 "parse.y"
15587 {
15588 (yyval.node_args) = new_args(p, 0, 0, 0, 0, (yyvsp[0].node_args), &(yyloc));
15589 /*% ripper: params!(Qnil, Qnil, Qnil, Qnil, *$:1[0..2]) %*/
15590 }
15591#line 15592 "parse.c"
15592 break;
15593
15594 case 480: /* opt_block_param_def: block_param_def */
15595#line 5100 "parse.y"
15596 {
15597 p->command_start = TRUE;
15598 }
15599#line 15600 "parse.c"
15600 break;
15601
15602 case 481: /* block_param_def: '|' opt_block_param opt_bv_decl '|' */
15603#line 5106 "parse.y"
15604 {
15605 p->max_numparam = ORDINAL_PARAM;
15606 p->ctxt.in_argdef = 0;
15607 (yyval.node_args) = (yyvsp[-2].node_args);
15608 /*% ripper: block_var!($:2, $:3) %*/
15609 }
15610#line 15611 "parse.c"
15611 break;
15612
15613 case 482: /* opt_block_param: %empty */
15614#line 5115 "parse.y"
15615 {
15616 (yyval.node_args) = 0;
15617 /*% ripper: params!(Qnil,Qnil,Qnil,Qnil,Qnil,Qnil,Qnil) %*/
15618 }
15619#line 15620 "parse.c"
15620 break;
15621
15622 case 484: /* opt_bv_decl: option_'\n' */
15623#line 5123 "parse.y"
15624 {
15625 (yyval.id) = 0;
15626 /*% ripper: Qfalse %*/
15627 }
15628#line 15629 "parse.c"
15629 break;
15630
15631 case 485: /* opt_bv_decl: option_'\n' ';' bv_decls option_'\n' */
15632#line 5128 "parse.y"
15633 {
15634 (yyval.id) = 0;
15635 /*% ripper: $:3 %*/
15636 }
15637#line 15638 "parse.c"
15638 break;
15639
15640 case 488: /* bvar: "local variable or method" */
15641#line 5141 "parse.y"
15642 {
15643 new_bv(p, (yyvsp[0].id));
15644 /*% ripper: $:1 %*/
15645 }
15646#line 15647 "parse.c"
15647 break;
15648
15649 case 490: /* max_numparam: %empty */
15650#line 5148 "parse.y"
15651 {
15652 (yyval.num) = p->max_numparam;
15653 p->max_numparam = 0;
15654 }
15655#line 15656 "parse.c"
15656 break;
15657
15658 case 491: /* numparam: %empty */
15659#line 5154 "parse.y"
15660 {
15661 (yyval.node) = numparam_push(p);
15662 }
15663#line 15664 "parse.c"
15664 break;
15665
15666 case 492: /* it_id: %empty */
15667#line 5159 "parse.y"
15668 {
15669 (yyval.id) = p->it_id;
15670 p->it_id = 0;
15671 }
15672#line 15673 "parse.c"
15673 break;
15674
15675 case 493: /* @26: %empty */
15676#line 5166 "parse.y"
15677 {
15678 token_info_push(p, "->", &(yylsp[0]));
15679 (yyval.vars) = dyna_push(p);
15680 }
15681#line 15682 "parse.c"
15682 break;
15683
15684 case 494: /* $@27: %empty */
15685#line 5172 "parse.y"
15686 {
15687 CMDARG_PUSH(0);
15688 }
15689#line 15690 "parse.c"
15690 break;
15691
15692 case 495: /* lambda: "->" @26 max_numparam numparam it_id allow_exits f_larglist $@27 lambda_body */
15693#line 5176 "parse.y"
15694 {
15695 int max_numparam = p->max_numparam;
15696 ID it_id = p->it_id;
15697 p->lex.lpar_beg = (yyvsp[-8].num);
15698 p->max_numparam = (yyvsp[-6].num);
15699 p->it_id = (yyvsp[-4].id);
15700 restore_block_exit(p, (yyvsp[-3].node_exits));
15701 CMDARG_POP();
15702 (yyvsp[-2].node_args) = args_with_numbered(p, (yyvsp[-2].node_args), max_numparam, it_id);
15703 {
15704 YYLTYPE loc = code_loc_gen(&(yylsp[-2]), &(yylsp[0]));
15705 (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);
15706 nd_set_line(RNODE_LAMBDA((yyval.node))->nd_body, (yylsp[0]).end_pos.lineno);
15707 nd_set_line((yyval.node), (yylsp[-2]).end_pos.lineno);
15708 nd_set_first_loc((yyval.node), (yylsp[-8]).beg_pos);
15709 xfree((yyvsp[0].locations_lambda_body));
15710 }
15711 /*% ripper: lambda!($:args, $:body) %*/
15712 numparam_pop(p, (yyvsp[-5].node));
15713 dyna_pop(p, (yyvsp[-7].vars));
15714 }
15715#line 15716 "parse.c"
15716 break;
15717
15718 case 496: /* f_larglist: '(' f_args opt_bv_decl ')' */
15719#line 5200 "parse.y"
15720 {
15721 p->ctxt.in_argdef = 0;
15722 (yyval.node_args) = (yyvsp[-2].node_args);
15723 p->max_numparam = ORDINAL_PARAM;
15724 /*% ripper: paren!($:2) %*/
15725 }
15726#line 15727 "parse.c"
15727 break;
15728
15729 case 497: /* f_larglist: f_args */
15730#line 5207 "parse.y"
15731 {
15732 p->ctxt.in_argdef = 0;
15733 if (!args_info_empty_p(&(yyvsp[0].node_args)->nd_ainfo))
15734 p->max_numparam = ORDINAL_PARAM;
15735 (yyval.node_args) = (yyvsp[0].node_args);
15736 }
15737#line 15738 "parse.c"
15738 break;
15739
15740 case 498: /* lambda_body: tLAMBEG compstmt_stmts '}' */
15741#line 5216 "parse.y"
15742 {
15743 token_info_pop(p, "}", &(yylsp[0]));
15744 (yyval.locations_lambda_body) = new_locations_lambda_body(p, (yyvsp[-1].node), &(yylsp[-1]), &(yylsp[-2]), &(yylsp[0]));
15745 /*% ripper: $:2 %*/
15746 }
15747#line 15748 "parse.c"
15748 break;
15749
15750 case 499: /* $@28: %empty */
15751#line 5222 "parse.y"
15752 {
15753 push_end_expect_token_locations(p, &(yylsp[0]).beg_pos);
15754 }
15755#line 15756 "parse.c"
15756 break;
15757
15758 case 500: /* lambda_body: "'do' for lambda" $@28 bodystmt k_end */
15759#line 5226 "parse.y"
15760 {
15761 (yyval.locations_lambda_body) = new_locations_lambda_body(p, (yyvsp[-1].node), &(yylsp[-1]), &(yylsp[-3]), &(yylsp[0]));
15762 /*% ripper: $:3 %*/
15763 }
15764#line 15765 "parse.c"
15765 break;
15766
15767 case 501: /* do_block: k_do_block do_body k_end */
15768#line 5233 "parse.y"
15769 {
15770 (yyval.node) = (yyvsp[-1].node);
15771 set_embraced_location((yyval.node), &(yylsp[-2]), &(yylsp[0]));
15772 /*% ripper: $:2 %*/
15773 }
15774#line 15775 "parse.c"
15775 break;
15776
15777 case 502: /* block_call: command do_block */
15778#line 5241 "parse.y"
15779 {
15780 (yyval.node) = command_add_block(p, (yyvsp[-1].node), (yyvsp[0].node), &(yyloc));
15781 fixpos((yyval.node), (yyvsp[-1].node));
15782 /*% ripper: method_add_block!($:1, $:2) %*/
15783 }
15784#line 15785 "parse.c"
15785 break;
15786
15787 case 503: /* block_call: block_call call_op2 operation2 opt_paren_args */
15788#line 5247 "parse.y"
15789 {
15790 bool has_args = (yyvsp[0].node) != 0;
15791 if (NODE_EMPTY_ARGS_P((yyvsp[0].node))) (yyvsp[0].node) = 0;
15792 (yyval.node) = new_qcall(p, (yyvsp[-2].id), (yyvsp[-3].node), (yyvsp[-1].id), (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
15793 /*% ripper: call!($:1, $:2, $:3) %*/
15794 if (has_args) {
15795 /*% ripper: method_add_arg!($:$, $:4) %*/
15796 }
15797 }
15798#line 15799 "parse.c"
15799 break;
15800
15801 case 504: /* block_call: block_call call_op2 operation2 opt_paren_args brace_block */
15802#line 5257 "parse.y"
15803 {
15804 if (NODE_EMPTY_ARGS_P((yyvsp[-1].node))) (yyvsp[-1].node) = 0;
15805 (yyval.node) = new_command_qcall(p, (yyvsp[-3].id), (yyvsp[-4].node), (yyvsp[-2].id), (yyvsp[-1].node), (yyvsp[0].node), &(yylsp[-2]), &(yyloc));
15806 /*% ripper: method_add_block!(command_call!($:1, $:2, $:3, $:4), $:5) %*/
15807 }
15808#line 15809 "parse.c"
15809 break;
15810
15811 case 505: /* block_call: block_call call_op2 operation2 command_args do_block */
15812#line 5263 "parse.y"
15813 {
15814 (yyval.node) = new_command_qcall(p, (yyvsp[-3].id), (yyvsp[-4].node), (yyvsp[-2].id), (yyvsp[-1].node), (yyvsp[0].node), &(yylsp[-2]), &(yyloc));
15815 /*% ripper: method_add_block!(command_call!($:1, $:2, $:3, $:4), $:5) %*/
15816 }
15817#line 15818 "parse.c"
15818 break;
15819
15820 case 506: /* block_call: block_call call_op2 paren_args */
15821#line 5268 "parse.y"
15822 {
15823 (yyval.node) = new_qcall(p, (yyvsp[-1].id), (yyvsp[-2].node), idCall, (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
15824 nd_set_line((yyval.node), (yylsp[-1]).end_pos.lineno);
15825 /*% ripper: method_add_arg!(call!($:1, $:2, ID2VAL(idCall)), $:3) %*/
15826 }
15827#line 15828 "parse.c"
15828 break;
15829
15830 case 507: /* method_call: fcall paren_args */
15831#line 5276 "parse.y"
15832 {
15833 (yyvsp[-1].node_fcall)->nd_args = (yyvsp[0].node);
15834 (yyval.node) = (NODE *)(yyvsp[-1].node_fcall);
15835 nd_set_last_loc((yyvsp[-1].node_fcall), (yylsp[0]).end_pos);
15836 /*% ripper: method_add_arg!(fcall!($:1), $:2) %*/
15837 }
15838#line 15839 "parse.c"
15839 break;
15840
15841 case 508: /* method_call: primary_value call_op operation2 opt_paren_args */
15842#line 5283 "parse.y"
15843 {
15844 bool has_args = (yyvsp[0].node) != 0;
15845 if (NODE_EMPTY_ARGS_P((yyvsp[0].node))) (yyvsp[0].node) = 0;
15846 (yyval.node) = new_qcall(p, (yyvsp[-2].id), (yyvsp[-3].node), (yyvsp[-1].id), (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
15847 nd_set_line((yyval.node), (yylsp[-1]).end_pos.lineno);
15848 /*% ripper: call!($:1, $:2, $:3) %*/
15849 if (has_args) {
15850 /*% ripper: method_add_arg!($:$, $:4) %*/
15851 }
15852 }
15853#line 15854 "parse.c"
15854 break;
15855
15856 case 509: /* method_call: primary_value "::" operation2 paren_args */
15857#line 5294 "parse.y"
15858 {
15859 (yyval.node) = new_qcall(p, idCOLON2, (yyvsp[-3].node), (yyvsp[-1].id), (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
15860 nd_set_line((yyval.node), (yylsp[-1]).end_pos.lineno);
15861 /*% ripper: method_add_arg!(call!($:1, $:2, $:3), $:4) %*/
15862 }
15863#line 15864 "parse.c"
15864 break;
15865
15866 case 510: /* method_call: primary_value "::" operation3 */
15867#line 5300 "parse.y"
15868 {
15869 (yyval.node) = new_qcall(p, idCOLON2, (yyvsp[-2].node), (yyvsp[0].id), 0, &(yylsp[0]), &(yyloc));
15870 /*% ripper: call!($:1, $:2, $:3) %*/
15871 }
15872#line 15873 "parse.c"
15873 break;
15874
15875 case 511: /* method_call: primary_value call_op2 paren_args */
15876#line 5305 "parse.y"
15877 {
15878 (yyval.node) = new_qcall(p, (yyvsp[-1].id), (yyvsp[-2].node), idCall, (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
15879 nd_set_line((yyval.node), (yylsp[-1]).end_pos.lineno);
15880 /*% ripper: method_add_arg!(call!($:1, $:2, ID2VAL(idCall)), $:3) %*/
15881 }
15882#line 15883 "parse.c"
15883 break;
15884
15885 case 512: /* method_call: "'super'" paren_args */
15886#line 5311 "parse.y"
15887 {
15888 rb_code_location_t lparen_loc = (yylsp[0]);
15889 rb_code_location_t rparen_loc = (yylsp[0]);
15890 lparen_loc.end_pos.column = lparen_loc.beg_pos.column + 1;
15891 rparen_loc.beg_pos.column = rparen_loc.end_pos.column - 1;
15892
15893 (yyval.node) = NEW_SUPER((yyvsp[0].node), &(yyloc), &(yylsp[-1]), &lparen_loc, &rparen_loc);
15894 /*% ripper: super!($:2) %*/
15895 }
15896#line 15897 "parse.c"
15897 break;
15898
15899 case 513: /* method_call: "'super'" */
15900#line 5321 "parse.y"
15901 {
15902 (yyval.node) = NEW_ZSUPER(&(yyloc));
15903 /*% ripper: zsuper! %*/
15904 }
15905#line 15906 "parse.c"
15906 break;
15907
15908 case 514: /* method_call: primary_value '[' opt_call_args rbracket */
15909#line 5326 "parse.y"
15910 {
15911 (yyval.node) = NEW_CALL((yyvsp[-3].node), tAREF, (yyvsp[-1].node), &(yyloc));
15912 fixpos((yyval.node), (yyvsp[-3].node));
15913 /*% ripper: aref!($:1, $:3) %*/
15914 }
15915#line 15916 "parse.c"
15916 break;
15917
15918 case 515: /* brace_block: '{' brace_body '}' */
15919#line 5334 "parse.y"
15920 {
15921 (yyval.node) = (yyvsp[-1].node);
15922 set_embraced_location((yyval.node), &(yylsp[-2]), &(yylsp[0]));
15923 /*% ripper: $:2 %*/
15924 }
15925#line 15926 "parse.c"
15926 break;
15927
15928 case 516: /* brace_block: k_do do_body k_end */
15929#line 5340 "parse.y"
15930 {
15931 (yyval.node) = (yyvsp[-1].node);
15932 set_embraced_location((yyval.node), &(yylsp[-2]), &(yylsp[0]));
15933 /*% ripper: $:2 %*/
15934 }
15935#line 15936 "parse.c"
15936 break;
15937
15938 case 517: /* @29: %empty */
15939#line 5347 "parse.y"
15940 {(yyval.vars) = dyna_push(p);}
15941#line 15942 "parse.c"
15942 break;
15943
15944 case 518: /* brace_body: @29 max_numparam numparam it_id allow_exits opt_block_param_def compstmt_stmts */
15945#line 5350 "parse.y"
15946 {
15947 int max_numparam = p->max_numparam;
15948 ID it_id = p->it_id;
15949 p->max_numparam = (yyvsp[-5].num);
15950 p->it_id = (yyvsp[-3].id);
15951 (yyvsp[-1].node_args) = args_with_numbered(p, (yyvsp[-1].node_args), max_numparam, it_id);
15952 (yyval.node) = NEW_ITER((yyvsp[-1].node_args), (yyvsp[0].node), &(yyloc));
15953 /*% ripper: brace_block!($:args, $:compstmt) %*/
15954 restore_block_exit(p, (yyvsp[-2].node_exits));
15955 numparam_pop(p, (yyvsp[-4].node));
15956 dyna_pop(p, (yyvsp[-6].vars));
15957 }
15958#line 15959 "parse.c"
15959 break;
15960
15961 case 519: /* @30: %empty */
15962#line 5364 "parse.y"
15963 {
15964 (yyval.vars) = dyna_push(p);
15965 CMDARG_PUSH(0);
15966 }
15967#line 15968 "parse.c"
15968 break;
15969
15970 case 520: /* do_body: @30 max_numparam numparam it_id allow_exits opt_block_param_def bodystmt */
15971#line 5370 "parse.y"
15972 {
15973 int max_numparam = p->max_numparam;
15974 ID it_id = p->it_id;
15975 p->max_numparam = (yyvsp[-5].num);
15976 p->it_id = (yyvsp[-3].id);
15977 (yyvsp[-1].node_args) = args_with_numbered(p, (yyvsp[-1].node_args), max_numparam, it_id);
15978 (yyval.node) = NEW_ITER((yyvsp[-1].node_args), (yyvsp[0].node), &(yyloc));
15979 /*% ripper: do_block!($:args, $:bodystmt) %*/
15980 CMDARG_POP();
15981 restore_block_exit(p, (yyvsp[-2].node_exits));
15982 numparam_pop(p, (yyvsp[-4].node));
15983 dyna_pop(p, (yyvsp[-6].vars));
15984 }
15985#line 15986 "parse.c"
15986 break;
15987
15988 case 521: /* case_args: arg_value */
15989#line 5386 "parse.y"
15990 {
15991 check_literal_when(p, (yyvsp[0].node), &(yylsp[0]));
15992 (yyval.node) = NEW_LIST((yyvsp[0].node), &(yyloc));
15993 /*% ripper: args_add!(args_new!, $:arg_value) %*/
15994 }
15995#line 15996 "parse.c"
15996 break;
15997
15998 case 522: /* case_args: "*" arg_value */
15999#line 5392 "parse.y"
16000 {
16001 (yyval.node) = NEW_SPLAT((yyvsp[0].node), &(yyloc), &(yylsp[-1]));
16002 /*% ripper: args_add_star!(args_new!, $:arg_value) %*/
16003 }
16004#line 16005 "parse.c"
16005 break;
16006
16007 case 523: /* case_args: case_args ',' arg_value */
16008#line 5397 "parse.y"
16009 {
16010 check_literal_when(p, (yyvsp[0].node), &(yylsp[0]));
16011 (yyval.node) = last_arg_append(p, (yyvsp[-2].node), (yyvsp[0].node), &(yyloc));
16012 /*% ripper: args_add!($:non_last_args, $:arg_value) %*/
16013 }
16014#line 16015 "parse.c"
16015 break;
16016
16017 case 524: /* case_args: case_args ',' "*" arg_value */
16018#line 5403 "parse.y"
16019 {
16020 (yyval.node) = rest_arg_append(p, (yyvsp[-3].node), (yyvsp[0].node), &(yyloc));
16021 /*% ripper: args_add_star!($:non_last_args, $:arg_value) %*/
16022 }
16023#line 16024 "parse.c"
16024 break;
16025
16026 case 525: /* case_body: k_when case_args then compstmt_stmts cases */
16027#line 5412 "parse.y"
16028 {
16029 (yyval.node) = NEW_WHEN((yyvsp[-3].node), (yyvsp[-1].node), (yyvsp[0].node), &(yyloc), &(yylsp[-4]), &(yylsp[-2]));
16030 fixpos((yyval.node), (yyvsp[-3].node));
16031 /*% ripper: when!($:2, $:4, $:5) %*/
16032 }
16033#line 16034 "parse.c"
16034 break;
16035
16036 case 528: /* p_pvtbl: %empty */
16037#line 5423 "parse.y"
16038 {(yyval.tbl) = p->pvtbl; p->pvtbl = st_init_numtable();}
16039#line 16040 "parse.c"
16040 break;
16041
16042 case 529: /* p_pktbl: %empty */
16043#line 5424 "parse.y"
16044 {(yyval.tbl) = p->pktbl; p->pktbl = 0;}
16045#line 16046 "parse.c"
16046 break;
16047
16048 case 530: /* p_in_kwarg: %empty */
16049#line 5426 "parse.y"
16050 {
16051 (yyval.ctxt) = p->ctxt;
16052 SET_LEX_STATE(EXPR_BEG|EXPR_LABEL);
16053 p->command_start = FALSE;
16054 p->ctxt.in_kwarg = 1;
16055 p->ctxt.in_alt_pattern = 0;
16056 p->ctxt.capture_in_pattern = 0;
16057 }
16058#line 16059 "parse.c"
16059 break;
16060
16061 case 531: /* $@31: %empty */
16062#line 5439 "parse.y"
16063 {
16064 pop_pktbl(p, (yyvsp[-2].tbl));
16065 pop_pvtbl(p, (yyvsp[-3].tbl));
16066 p->ctxt.in_kwarg = (yyvsp[-4].ctxt).in_kwarg;
16067 p->ctxt.in_alt_pattern = (yyvsp[-4].ctxt).in_alt_pattern;
16068 p->ctxt.capture_in_pattern = (yyvsp[-4].ctxt).capture_in_pattern;
16069 }
16070#line 16071 "parse.c"
16071 break;
16072
16073 case 532: /* p_case_body: "'in'" p_in_kwarg p_pvtbl p_pktbl p_top_expr then $@31 compstmt_stmts p_cases */
16074#line 5448 "parse.y"
16075 {
16076 (yyval.node) = NEW_IN((yyvsp[-4].node), (yyvsp[-1].node), (yyvsp[0].node), &(yyloc), &(yylsp[-8]), &(yylsp[-3]), &NULL_LOC);
16077 /*% ripper: in!($:expr, $:compstmt, $:cases) %*/
16078 }
16079#line 16080 "parse.c"
16080 break;
16081
16082 case 536: /* p_top_expr: p_top_expr_body "'if' modifier" expr_value */
16083#line 5460 "parse.y"
16084 {
16085 (yyval.node) = new_if(p, (yyvsp[0].node), (yyvsp[-2].node), 0, &(yyloc), &(yylsp[-1]), &NULL_LOC, &NULL_LOC);
16086 fixpos((yyval.node), (yyvsp[0].node));
16087 /*% ripper: if_mod!($:3, $:1) %*/
16088 }
16089#line 16090 "parse.c"
16090 break;
16091
16092 case 537: /* p_top_expr: p_top_expr_body "'unless' modifier" expr_value */
16093#line 5466 "parse.y"
16094 {
16095 (yyval.node) = new_unless(p, (yyvsp[0].node), (yyvsp[-2].node), 0, &(yyloc), &(yylsp[-1]), &NULL_LOC, &NULL_LOC);
16096 fixpos((yyval.node), (yyvsp[0].node));
16097 /*% ripper: unless_mod!($:3, $:1) %*/
16098 }
16099#line 16100 "parse.c"
16100 break;
16101
16102 case 539: /* p_top_expr_body: p_expr ',' */
16103#line 5475 "parse.y"
16104 {
16105 (yyval.node) = new_array_pattern_tail(p, 0, 1, 0, 0, &(yyloc));
16106 (yyval.node) = new_array_pattern(p, 0, (yyvsp[-1].node), (yyval.node), &(yyloc));
16107 /*% ripper: aryptn!(Qnil, [$:1], Qnil, Qnil) %*/
16108 }
16109#line 16110 "parse.c"
16110 break;
16111
16112 case 540: /* p_top_expr_body: p_expr ',' p_args */
16113#line 5481 "parse.y"
16114 {
16115 (yyval.node) = new_array_pattern(p, 0, (yyvsp[-2].node), (yyvsp[0].node), &(yyloc));
16116 nd_set_first_loc((yyval.node), (yylsp[-2]).beg_pos);
16117 /*% ripper: aryptn!(Qnil, aryptn_pre_args(p, $:1, $:3[0]), *$:3[1..2]) %*/
16118 }
16119#line 16120 "parse.c"
16120 break;
16121
16122 case 541: /* p_top_expr_body: p_find */
16123#line 5487 "parse.y"
16124 {
16125 (yyval.node) = new_find_pattern(p, 0, (yyvsp[0].node), &(yyloc));
16126 /*% ripper: fndptn!(Qnil, *$:1[0..2]) %*/
16127 }
16128#line 16129 "parse.c"
16129 break;
16130
16131 case 542: /* p_top_expr_body: p_args_tail */
16132#line 5492 "parse.y"
16133 {
16134 (yyval.node) = new_array_pattern(p, 0, 0, (yyvsp[0].node), &(yyloc));
16135 /*% ripper: aryptn!(Qnil, *$:1[0..2]) %*/
16136 }
16137#line 16138 "parse.c"
16138 break;
16139
16140 case 543: /* p_top_expr_body: p_kwargs */
16141#line 5497 "parse.y"
16142 {
16143 (yyval.node) = new_hash_pattern(p, 0, (yyvsp[0].node), &(yyloc));
16144 /*% ripper: hshptn!(Qnil, *$:1[0..1]) %*/
16145 }
16146#line 16147 "parse.c"
16147 break;
16148
16149 case 545: /* p_as: p_expr "=>" p_variable */
16150#line 5507 "parse.y"
16151 {
16152 NODE *n = NEW_LIST((yyvsp[-2].node), &(yyloc));
16153 n = list_append(p, n, (yyvsp[0].node));
16154 (yyval.node) = new_hash(p, n, &(yyloc));
16155 /*% ripper: binary!($:1, ID2VAL((id_assoc)), $:3) %*/
16156 }
16157#line 16158 "parse.c"
16158 break;
16159
16160 case 547: /* $@32: %empty */
16161#line 5517 "parse.y"
16162 {
16163 p->ctxt.in_alt_pattern = 1;
16164 }
16165#line 16166 "parse.c"
16166 break;
16167
16168 case 548: /* p_alt: p_alt '|' $@32 p_expr_basic */
16169#line 5521 "parse.y"
16170 {
16171 if (p->ctxt.capture_in_pattern) {
16172 yyerror1(&(yylsp[-2]), "alternative pattern after variable capture");
16173 }
16174 p->ctxt.in_alt_pattern = 0;
16175 (yyval.node) = NEW_OR((yyvsp[-3].node), (yyvsp[0].node), &(yyloc), &(yylsp[-2]));
16176 /*% ripper: binary!($:left, ID2VAL(idOr), $:right) %*/
16177 }
16178#line 16179 "parse.c"
16179 break;
16180
16181 case 550: /* p_lparen: '(' p_pktbl */
16182#line 5533 "parse.y"
16183 {
16184 (yyval.tbl) = (yyvsp[0].tbl);
16185 /*% ripper: $:2 %*/
16186 }
16187#line 16188 "parse.c"
16188 break;
16189
16190 case 551: /* p_lbracket: '[' p_pktbl */
16191#line 5540 "parse.y"
16192 {
16193 (yyval.tbl) = (yyvsp[0].tbl);
16194 /*% ripper: $:2 %*/
16195 }
16196#line 16197 "parse.c"
16197 break;
16198
16199 case 554: /* p_expr_basic: p_const p_lparen p_args rparen */
16200#line 5549 "parse.y"
16201 {
16202 pop_pktbl(p, (yyvsp[-2].tbl));
16203 (yyval.node) = new_array_pattern(p, (yyvsp[-3].node), 0, (yyvsp[-1].node), &(yyloc));
16204 nd_set_first_loc((yyval.node), (yylsp[-3]).beg_pos);
16205 /*% ripper: aryptn!($:p_const, *$:p_args[0..2]) %*/
16206 }
16207#line 16208 "parse.c"
16208 break;
16209
16210 case 555: /* p_expr_basic: p_const p_lparen p_find rparen */
16211#line 5556 "parse.y"
16212 {
16213 pop_pktbl(p, (yyvsp[-2].tbl));
16214 (yyval.node) = new_find_pattern(p, (yyvsp[-3].node), (yyvsp[-1].node), &(yyloc));
16215 nd_set_first_loc((yyval.node), (yylsp[-3]).beg_pos);
16216 /*% ripper: fndptn!($:p_const, *$:p_find[0..2]) %*/
16217 }
16218#line 16219 "parse.c"
16219 break;
16220
16221 case 556: /* p_expr_basic: p_const p_lparen p_kwargs rparen */
16222#line 5563 "parse.y"
16223 {
16224 pop_pktbl(p, (yyvsp[-2].tbl));
16225 (yyval.node) = new_hash_pattern(p, (yyvsp[-3].node), (yyvsp[-1].node), &(yyloc));
16226 nd_set_first_loc((yyval.node), (yylsp[-3]).beg_pos);
16227 /*% ripper: hshptn!($:p_const, *$:p_kwargs[0..1]) %*/
16228 }
16229#line 16230 "parse.c"
16230 break;
16231
16232 case 557: /* p_expr_basic: p_const '(' rparen */
16233#line 5570 "parse.y"
16234 {
16235 (yyval.node) = new_array_pattern_tail(p, 0, 0, 0, 0, &(yyloc));
16236 (yyval.node) = new_array_pattern(p, (yyvsp[-2].node), 0, (yyval.node), &(yyloc));
16237 /*% ripper: aryptn!($:p_const, Qnil, Qnil, Qnil) %*/
16238 }
16239#line 16240 "parse.c"
16240 break;
16241
16242 case 558: /* p_expr_basic: p_const p_lbracket p_args rbracket */
16243#line 5576 "parse.y"
16244 {
16245 pop_pktbl(p, (yyvsp[-2].tbl));
16246 (yyval.node) = new_array_pattern(p, (yyvsp[-3].node), 0, (yyvsp[-1].node), &(yyloc));
16247 nd_set_first_loc((yyval.node), (yylsp[-3]).beg_pos);
16248 /*% ripper: aryptn!($:p_const, *$:p_args[0..2]) %*/
16249 }
16250#line 16251 "parse.c"
16251 break;
16252
16253 case 559: /* p_expr_basic: p_const p_lbracket p_find rbracket */
16254#line 5583 "parse.y"
16255 {
16256 pop_pktbl(p, (yyvsp[-2].tbl));
16257 (yyval.node) = new_find_pattern(p, (yyvsp[-3].node), (yyvsp[-1].node), &(yyloc));
16258 nd_set_first_loc((yyval.node), (yylsp[-3]).beg_pos);
16259 /*% ripper: fndptn!($:p_const, *$:p_find[0..2]) %*/
16260 }
16261#line 16262 "parse.c"
16262 break;
16263
16264 case 560: /* p_expr_basic: p_const p_lbracket p_kwargs rbracket */
16265#line 5590 "parse.y"
16266 {
16267 pop_pktbl(p, (yyvsp[-2].tbl));
16268 (yyval.node) = new_hash_pattern(p, (yyvsp[-3].node), (yyvsp[-1].node), &(yyloc));
16269 nd_set_first_loc((yyval.node), (yylsp[-3]).beg_pos);
16270 /*% ripper: hshptn!($:p_const, *$:p_kwargs[0..1]) %*/
16271 }
16272#line 16273 "parse.c"
16273 break;
16274
16275 case 561: /* p_expr_basic: p_const '[' rbracket */
16276#line 5597 "parse.y"
16277 {
16278 (yyval.node) = new_array_pattern_tail(p, 0, 0, 0, 0, &(yyloc));
16279 (yyval.node) = new_array_pattern(p, (yyvsp[-2].node), 0, (yyval.node), &(yyloc));
16280 /*% ripper: aryptn!($:1, Qnil, Qnil, Qnil) %*/
16281 }
16282#line 16283 "parse.c"
16283 break;
16284
16285 case 562: /* p_expr_basic: "[" p_args rbracket */
16286#line 5603 "parse.y"
16287 {
16288 (yyval.node) = new_array_pattern(p, 0, 0, (yyvsp[-1].node), &(yyloc));
16289 /*% ripper: aryptn!(Qnil, *$:p_args[0..2]) %*/
16290 }
16291#line 16292 "parse.c"
16292 break;
16293
16294 case 563: /* p_expr_basic: "[" p_find rbracket */
16295#line 5608 "parse.y"
16296 {
16297 (yyval.node) = new_find_pattern(p, 0, (yyvsp[-1].node), &(yyloc));
16298 /*% ripper: fndptn!(Qnil, *$:p_find[0..2]) %*/
16299 }
16300#line 16301 "parse.c"
16301 break;
16302
16303 case 564: /* p_expr_basic: "[" rbracket */
16304#line 5613 "parse.y"
16305 {
16306 (yyval.node) = new_array_pattern_tail(p, 0, 0, 0, 0, &(yyloc));
16307 (yyval.node) = new_array_pattern(p, 0, 0, (yyval.node), &(yyloc));
16308 /*% ripper: aryptn!(Qnil, Qnil, Qnil, Qnil) %*/
16309 }
16310#line 16311 "parse.c"
16311 break;
16312
16313 case 565: /* $@33: %empty */
16314#line 5619 "parse.y"
16315 {
16316 p->ctxt.in_kwarg = 0;
16317 }
16318#line 16319 "parse.c"
16319 break;
16320
16321 case 566: /* p_expr_basic: "{" p_pktbl lex_ctxt $@33 p_kwargs rbrace */
16322#line 5623 "parse.y"
16323 {
16324 pop_pktbl(p, (yyvsp[-4].tbl));
16325 p->ctxt.in_kwarg = (yyvsp[-3].ctxt).in_kwarg;
16326 (yyval.node) = new_hash_pattern(p, 0, (yyvsp[-1].node), &(yyloc));
16327 /*% ripper: hshptn!(Qnil, *$:p_kwargs[0..1]) %*/
16328 }
16329#line 16330 "parse.c"
16330 break;
16331
16332 case 567: /* p_expr_basic: "{" rbrace */
16333#line 5630 "parse.y"
16334 {
16335 (yyval.node) = new_hash_pattern_tail(p, 0, 0, &(yyloc));
16336 (yyval.node) = new_hash_pattern(p, 0, (yyval.node), &(yyloc));
16337 /*% ripper: hshptn!(Qnil, Qnil, Qnil) %*/
16338 }
16339#line 16340 "parse.c"
16340 break;
16341
16342 case 568: /* p_expr_basic: "(" p_pktbl p_expr rparen */
16343#line 5636 "parse.y"
16344 {
16345 pop_pktbl(p, (yyvsp[-2].tbl));
16346 (yyval.node) = (yyvsp[-1].node);
16347 /*% ripper: $:p_expr %*/
16348 }
16349#line 16350 "parse.c"
16350 break;
16351
16352 case 569: /* p_args: p_expr */
16353#line 5644 "parse.y"
16354 {
16355 NODE *pre_args = NEW_LIST((yyvsp[0].node), &(yyloc));
16356 (yyval.node) = new_array_pattern_tail(p, pre_args, 0, 0, 0, &(yyloc));
16357 /*% ripper: [[$:1], Qnil, Qnil] %*/
16358 }
16359#line 16360 "parse.c"
16360 break;
16361
16362 case 570: /* p_args: p_args_head */
16363#line 5650 "parse.y"
16364 {
16365 (yyval.node) = new_array_pattern_tail(p, (yyvsp[0].node), 1, 0, 0, &(yyloc));
16366 /*% ripper: [$:1, Qnil, Qnil] %*/
16367 }
16368#line 16369 "parse.c"
16369 break;
16370
16371 case 571: /* p_args: p_args_head p_arg */
16372#line 5655 "parse.y"
16373 {
16374 (yyval.node) = new_array_pattern_tail(p, list_concat((yyvsp[-1].node), (yyvsp[0].node)), 0, 0, 0, &(yyloc));
16375 /*% ripper: [rb_ary_concat($:1, $:2), Qnil, Qnil] %*/
16376 }
16377#line 16378 "parse.c"
16378 break;
16379
16380 case 572: /* p_args: p_args_head p_rest */
16381#line 5660 "parse.y"
16382 {
16383 (yyval.node) = new_array_pattern_tail(p, (yyvsp[-1].node), 1, (yyvsp[0].node), 0, &(yyloc));
16384 /*% ripper: [$:1, $:2, Qnil] %*/
16385 }
16386#line 16387 "parse.c"
16387 break;
16388
16389 case 573: /* p_args: p_args_head p_rest ',' p_args_post */
16390#line 5665 "parse.y"
16391 {
16392 (yyval.node) = new_array_pattern_tail(p, (yyvsp[-3].node), 1, (yyvsp[-2].node), (yyvsp[0].node), &(yyloc));
16393 /*% ripper: [$:1, $:2, $:4] %*/
16394 }
16395#line 16396 "parse.c"
16396 break;
16397
16398 case 576: /* p_args_head: p_args_head p_arg ',' */
16399#line 5674 "parse.y"
16400 {
16401 (yyval.node) = list_concat((yyvsp[-2].node), (yyvsp[-1].node));
16402 /*% ripper: rb_ary_concat($:1, $:2) %*/
16403 }
16404#line 16405 "parse.c"
16405 break;
16406
16407 case 577: /* p_args_tail: p_rest */
16408#line 5681 "parse.y"
16409 {
16410 (yyval.node) = new_array_pattern_tail(p, 0, 1, (yyvsp[0].node), 0, &(yyloc));
16411 /*% ripper: [Qnil, $:1, Qnil] %*/
16412 }
16413#line 16414 "parse.c"
16414 break;
16415
16416 case 578: /* p_args_tail: p_rest ',' p_args_post */
16417#line 5686 "parse.y"
16418 {
16419 (yyval.node) = new_array_pattern_tail(p, 0, 1, (yyvsp[-2].node), (yyvsp[0].node), &(yyloc));
16420 /*% ripper: [Qnil, $:1, $:3] %*/
16421 }
16422#line 16423 "parse.c"
16423 break;
16424
16425 case 579: /* p_find: p_rest ',' p_args_post ',' p_rest */
16426#line 5693 "parse.y"
16427 {
16428 (yyval.node) = new_find_pattern_tail(p, (yyvsp[-4].node), (yyvsp[-2].node), (yyvsp[0].node), &(yyloc));
16429 /*% ripper: [$:1, $:3, $:5] %*/
16430 }
16431#line 16432 "parse.c"
16432 break;
16433
16434 case 580: /* p_rest: "*" "local variable or method" */
16435#line 5701 "parse.y"
16436 {
16437 error_duplicate_pattern_variable(p, (yyvsp[0].id), &(yylsp[0]));
16438 /*% ripper: var_field!($:2) %*/
16439 (yyval.node) = assignable(p, (yyvsp[0].id), 0, &(yyloc));
16440 }
16441#line 16442 "parse.c"
16442 break;
16443
16444 case 581: /* p_rest: "*" */
16445#line 5707 "parse.y"
16446 {
16447 (yyval.node) = 0;
16448 /*% ripper: var_field!(Qnil) %*/
16449 }
16450#line 16451 "parse.c"
16451 break;
16452
16453 case 583: /* p_args_post: p_args_post ',' p_arg */
16454#line 5715 "parse.y"
16455 {
16456 (yyval.node) = list_concat((yyvsp[-2].node), (yyvsp[0].node));
16457 /*% ripper: rb_ary_concat($:1, $:3) %*/
16458 }
16459#line 16460 "parse.c"
16460 break;
16461
16462 case 584: /* p_arg: p_expr */
16463#line 5722 "parse.y"
16464 {
16465 (yyval.node) = NEW_LIST((yyvsp[0].node), &(yyloc));
16466 /*% ripper: [$:1] %*/
16467 }
16468#line 16469 "parse.c"
16469 break;
16470
16471 case 585: /* p_kwargs: p_kwarg ',' p_any_kwrest */
16472#line 5729 "parse.y"
16473 {
16474 (yyval.node) = new_hash_pattern_tail(p, new_unique_key_hash(p, (yyvsp[-2].node), &(yyloc)), (yyvsp[0].id), &(yyloc));
16475 /*% ripper: [$:1, $:3] %*/
16476 }
16477#line 16478 "parse.c"
16478 break;
16479
16480 case 586: /* p_kwargs: p_kwarg */
16481#line 5734 "parse.y"
16482 {
16483 (yyval.node) = new_hash_pattern_tail(p, new_unique_key_hash(p, (yyvsp[0].node), &(yyloc)), 0, &(yyloc));
16484 /*% ripper: [$:1, Qnil] %*/
16485 }
16486#line 16487 "parse.c"
16487 break;
16488
16489 case 587: /* p_kwargs: p_kwarg ',' */
16490#line 5739 "parse.y"
16491 {
16492 (yyval.node) = new_hash_pattern_tail(p, new_unique_key_hash(p, (yyvsp[-1].node), &(yyloc)), 0, &(yyloc));
16493 /*% ripper: [$:1, Qnil] %*/
16494 }
16495#line 16496 "parse.c"
16496 break;
16497
16498 case 588: /* p_kwargs: p_any_kwrest */
16499#line 5744 "parse.y"
16500 {
16501 (yyval.node) = new_hash_pattern_tail(p, new_hash(p, 0, &(yyloc)), (yyvsp[0].id), &(yyloc));
16502 /*% ripper: [[], $:1] %*/
16503 }
16504#line 16505 "parse.c"
16505 break;
16506
16507 case 590: /* p_kwarg: p_kwarg ',' p_kw */
16508#line 5753 "parse.y"
16509 {
16510 (yyval.node) = list_concat((yyvsp[-2].node), (yyvsp[0].node));
16511 /*% ripper: rb_ary_push($:1, $:3) %*/
16512 }
16513#line 16514 "parse.c"
16514 break;
16515
16516 case 591: /* p_kw: p_kw_label p_expr */
16517#line 5760 "parse.y"
16518 {
16519 error_duplicate_pattern_key(p, (yyvsp[-1].id), &(yylsp[-1]));
16520 (yyval.node) = list_append(p, NEW_LIST(NEW_SYM(rb_id2str((yyvsp[-1].id)), &(yylsp[-1])), &(yyloc)), (yyvsp[0].node));
16521 /*% ripper: [$:1, $:2] %*/
16522 }
16523#line 16524 "parse.c"
16524 break;
16525
16526 case 592: /* p_kw: p_kw_label */
16527#line 5766 "parse.y"
16528 {
16529 error_duplicate_pattern_key(p, (yyvsp[0].id), &(yylsp[0]));
16530 if ((yyvsp[0].id) && !is_local_id((yyvsp[0].id))) {
16531 yyerror1(&(yylsp[0]), "key must be valid as local variables");
16532 }
16533 error_duplicate_pattern_variable(p, (yyvsp[0].id), &(yylsp[0]));
16534 (yyval.node) = list_append(p, NEW_LIST(NEW_SYM(rb_id2str((yyvsp[0].id)), &(yyloc)), &(yyloc)), assignable(p, (yyvsp[0].id), 0, &(yyloc)));
16535 /*% ripper: [$:1, Qnil] %*/
16536 }
16537#line 16538 "parse.c"
16538 break;
16539
16540 case 594: /* p_kw_label: "string literal" string_contents tLABEL_END */
16541#line 5779 "parse.y"
16542 {
16543 YYLTYPE loc = code_loc_gen(&(yylsp[-2]), &(yylsp[0]));
16544 if (!(yyvsp[-1].node) || nd_type_p((yyvsp[-1].node), NODE_STR)) {
16545 NODE *node = dsym_node(p, (yyvsp[-1].node), &loc);
16546 (yyval.id) = rb_sym2id(rb_node_sym_string_val(node));
16547 }
16548 else {
16549 yyerror1(&loc, "symbol literal with interpolation is not allowed");
16550 (yyval.id) = rb_intern_str(STR_NEW0());
16551 }
16552 /*% ripper: $:2 %*/
16553 }
16554#line 16555 "parse.c"
16555 break;
16556
16557 case 595: /* p_kwrest: kwrest_mark "local variable or method" */
16558#line 5794 "parse.y"
16559 {
16560 (yyval.id) = (yyvsp[0].id);
16561 /*% ripper: var_field!($:2) %*/
16562 }
16563#line 16564 "parse.c"
16564 break;
16565
16566 case 596: /* p_kwrest: kwrest_mark */
16567#line 5799 "parse.y"
16568 {
16569 (yyval.id) = 0;
16570 /*% ripper: Qnil %*/
16571 }
16572#line 16573 "parse.c"
16573 break;
16574
16575 case 597: /* p_kwnorest: kwrest_mark "'nil'" */
16576#line 5806 "parse.y"
16577 {
16578 (yyval.id) = 0;
16579 }
16580#line 16581 "parse.c"
16581 break;
16582
16583 case 599: /* p_any_kwrest: p_kwnorest */
16584#line 5813 "parse.y"
16585 {
16586 (yyval.id) = idNil;
16587 /*% ripper: var_field!(ID2VAL(idNil)) %*/
16588 }
16589#line 16590 "parse.c"
16590 break;
16591
16592 case 601: /* range_expr_p_primitive: p_primitive ".." p_primitive */
16593#line 3114 "parse.y"
16594 {
16595 value_expr(p, (yyvsp[-2].node));
16596 value_expr(p, (yyvsp[0].node));
16597 (yyval.node) = NEW_DOT2((yyvsp[-2].node), (yyvsp[0].node), &(yyloc), &(yylsp[-1]));
16598 /*% ripper: dot2!($:1, $:3) %*/
16599 }
16600#line 16601 "parse.c"
16601 break;
16602
16603 case 602: /* range_expr_p_primitive: p_primitive "..." p_primitive */
16604#line 3121 "parse.y"
16605 {
16606 value_expr(p, (yyvsp[-2].node));
16607 value_expr(p, (yyvsp[0].node));
16608 (yyval.node) = NEW_DOT3((yyvsp[-2].node), (yyvsp[0].node), &(yyloc), &(yylsp[-1]));
16609 /*% ripper: dot3!($:1, $:3) %*/
16610 }
16611#line 16612 "parse.c"
16612 break;
16613
16614 case 603: /* range_expr_p_primitive: p_primitive ".." */
16615#line 3128 "parse.y"
16616 {
16617 value_expr(p, (yyvsp[-1].node));
16618 (yyval.node) = NEW_DOT2((yyvsp[-1].node), new_nil_at(p, &(yylsp[0]).end_pos), &(yyloc), &(yylsp[0]));
16619 /*% ripper: dot2!($:1, Qnil) %*/
16620 }
16621#line 16622 "parse.c"
16622 break;
16623
16624 case 604: /* range_expr_p_primitive: p_primitive "..." */
16625#line 3134 "parse.y"
16626 {
16627 value_expr(p, (yyvsp[-1].node));
16628 (yyval.node) = NEW_DOT3((yyvsp[-1].node), new_nil_at(p, &(yylsp[0]).end_pos), &(yyloc), &(yylsp[0]));
16629 /*% ripper: dot3!($:1, Qnil) %*/
16630 }
16631#line 16632 "parse.c"
16632 break;
16633
16634 case 605: /* range_expr_p_primitive: "(.." p_primitive */
16635#line 3140 "parse.y"
16636 {
16637 value_expr(p, (yyvsp[0].node));
16638 (yyval.node) = NEW_DOT2(new_nil_at(p, &(yylsp[-1]).beg_pos), (yyvsp[0].node), &(yyloc), &(yylsp[-1]));
16639 /*% ripper: dot2!(Qnil, $:2) %*/
16640 }
16641#line 16642 "parse.c"
16642 break;
16643
16644 case 606: /* range_expr_p_primitive: "(..." p_primitive */
16645#line 3146 "parse.y"
16646 {
16647 value_expr(p, (yyvsp[0].node));
16648 (yyval.node) = NEW_DOT3(new_nil_at(p, &(yylsp[-1]).beg_pos), (yyvsp[0].node), &(yyloc), &(yylsp[-1]));
16649 /*% ripper: dot3!(Qnil, $:2) %*/
16650 }
16651#line 16652 "parse.c"
16652 break;
16653
16654 case 619: /* p_primitive: keyword_variable */
16655#line 5828 "parse.y"
16656 {
16657 if (!((yyval.node) = gettable(p, (yyvsp[0].id), &(yyloc)))) (yyval.node) = NEW_ERROR(&(yyloc));
16658 /*% ripper: var_ref!($:1) %*/
16659 }
16660#line 16661 "parse.c"
16661 break;
16662
16663 case 621: /* p_variable: "local variable or method" */
16664#line 5836 "parse.y"
16665 {
16666 error_duplicate_pattern_variable(p, (yyvsp[0].id), &(yylsp[0]));
16667 /*% ripper: var_field!($:1) %*/
16668 (yyval.node) = assignable(p, (yyvsp[0].id), 0, &(yyloc));
16669 }
16670#line 16671 "parse.c"
16671 break;
16672
16673 case 622: /* p_var_ref: '^' "local variable or method" */
16674#line 5844 "parse.y"
16675 {
16676 NODE *n = gettable(p, (yyvsp[0].id), &(yyloc));
16677 if (!n) {
16678 n = NEW_ERROR(&(yyloc));
16679 }
16680 else if (!(nd_type_p(n, NODE_LVAR) || nd_type_p(n, NODE_DVAR))) {
16681 compile_error(p, "%"PRIsVALUE": no such local variable", rb_id2str((yyvsp[0].id)));
16682 }
16683 (yyval.node) = n;
16684 /*% ripper: var_ref!($:2) %*/
16685 }
16686#line 16687 "parse.c"
16687 break;
16688
16689 case 623: /* p_var_ref: '^' nonlocal_var */
16690#line 5856 "parse.y"
16691 {
16692 if (!((yyval.node) = gettable(p, (yyvsp[0].id), &(yyloc)))) (yyval.node) = NEW_ERROR(&(yyloc));
16693 /*% ripper: var_ref!($:2) %*/
16694 }
16695#line 16696 "parse.c"
16696 break;
16697
16698 case 624: /* p_expr_ref: '^' "(" expr_value rparen */
16699#line 5863 "parse.y"
16700 {
16701 (yyval.node) = NEW_BLOCK((yyvsp[-1].node), &(yyloc));
16702 /*% ripper: begin!($:3) %*/
16703 }
16704#line 16705 "parse.c"
16705 break;
16706
16707 case 625: /* p_const: ":: at EXPR_BEG" cname */
16708#line 5870 "parse.y"
16709 {
16710 (yyval.node) = NEW_COLON3((yyvsp[0].id), &(yyloc), &(yylsp[-1]), &(yylsp[0]));
16711 /*% ripper: top_const_ref!($:2) %*/
16712 }
16713#line 16714 "parse.c"
16714 break;
16715
16716 case 626: /* p_const: p_const "::" cname */
16717#line 5875 "parse.y"
16718 {
16719 (yyval.node) = NEW_COLON2((yyvsp[-2].node), (yyvsp[0].id), &(yyloc), &(yylsp[-1]), &(yylsp[0]));
16720 /*% ripper: const_path_ref!($:1, $:3) %*/
16721 }
16722#line 16723 "parse.c"
16723 break;
16724
16725 case 627: /* p_const: "constant" */
16726#line 5880 "parse.y"
16727 {
16728 (yyval.node) = gettable(p, (yyvsp[0].id), &(yyloc));
16729 /*% ripper: var_ref!($:1) %*/
16730 }
16731#line 16732 "parse.c"
16732 break;
16733
16734 case 628: /* opt_rescue: k_rescue exc_list exc_var then compstmt_stmts opt_rescue */
16735#line 5889 "parse.y"
16736 {
16737 NODE *err = (yyvsp[-3].node);
16738 if ((yyvsp[-3].node)) {
16739 err = NEW_ERRINFO(&(yylsp[-3]));
16740 err = node_assign(p, (yyvsp[-3].node), err, NO_LEX_CTXT, &(yylsp[-3]));
16741 }
16742 (yyval.node) = NEW_RESBODY((yyvsp[-4].node), (yyvsp[-3].node), (yyvsp[-1].node), (yyvsp[0].node), &(yyloc));
16743 if ((yyvsp[-4].node)) {
16744 fixpos((yyval.node), (yyvsp[-4].node));
16745 }
16746 else if ((yyvsp[-3].node)) {
16747 fixpos((yyval.node), (yyvsp[-3].node));
16748 }
16749 else {
16750 fixpos((yyval.node), (yyvsp[-1].node));
16751 }
16752 /*% ripper: rescue!($:2, $:3, $:5, $:6) %*/
16753 }
16754#line 16755 "parse.c"
16755 break;
16756
16757 case 630: /* exc_list: arg_value */
16758#line 5911 "parse.y"
16759 {
16760 (yyval.node) = NEW_LIST((yyvsp[0].node), &(yyloc));
16761 /*% ripper: rb_ary_new3(1, $:1) %*/
16762 }
16763#line 16764 "parse.c"
16764 break;
16765
16766 case 631: /* exc_list: mrhs */
16767#line 5916 "parse.y"
16768 {
16769 if (!((yyval.node) = splat_array((yyvsp[0].node)))) (yyval.node) = (yyvsp[0].node);
16770 }
16771#line 16772 "parse.c"
16772 break;
16773
16774 case 633: /* exc_var: "=>" lhs */
16775#line 5923 "parse.y"
16776 {
16777 (yyval.node) = (yyvsp[0].node);
16778 /*% ripper: $:2 %*/
16779 }
16780#line 16781 "parse.c"
16781 break;
16782
16783 case 635: /* opt_ensure: k_ensure stmts option_terms */
16784#line 5931 "parse.y"
16785 {
16786 p->ctxt.in_rescue = (yyvsp[-2].ctxt).in_rescue;
16787 (yyval.node) = (yyvsp[-1].node);
16788 void_expr(p, void_stmts(p, (yyval.node)));
16789 /*% ripper: ensure!($:2) %*/
16790 }
16791#line 16792 "parse.c"
16792 break;
16793
16794 case 639: /* strings: string */
16795#line 5945 "parse.y"
16796 {
16797 if (!(yyvsp[0].node)) {
16798 (yyval.node) = NEW_STR(STRING_NEW0(), &(yyloc));
16799 }
16800 else {
16801 (yyval.node) = evstr2dstr(p, (yyvsp[0].node));
16802 }
16803 /*% ripper: $:1 %*/
16804 }
16805#line 16806 "parse.c"
16806 break;
16807
16808 case 642: /* string: string string1 */
16809#line 5959 "parse.y"
16810 {
16811 (yyval.node) = literal_concat(p, (yyvsp[-1].node), (yyvsp[0].node), &(yyloc));
16812 /*% ripper: string_concat!($:1, $:2) %*/
16813 }
16814#line 16815 "parse.c"
16815 break;
16816
16817 case 643: /* string1: "string literal" string_contents "terminator" */
16818#line 5966 "parse.y"
16819 {
16820 (yyval.node) = heredoc_dedent(p, (yyvsp[-1].node));
16821 if ((yyval.node)) nd_set_loc((yyval.node), &(yyloc));
16822 /*% ripper: $:2 %*/
16823 if (p->heredoc_indent > 0) {
16824 /*% ripper: heredoc_dedent!($:$, INT2NUM(%{p->heredoc_indent})) %*/
16825 p->heredoc_indent = 0;
16826 }
16827 /*% ripper: string_literal!($:$) %*/
16828 }
16829#line 16830 "parse.c"
16830 break;
16831
16832 case 644: /* xstring: "backtick literal" xstring_contents "terminator" */
16833#line 5979 "parse.y"
16834 {
16835 (yyval.node) = new_xstring(p, heredoc_dedent(p, (yyvsp[-1].node)), &(yyloc));
16836 /*% ripper: $:2 %*/
16837 if (p->heredoc_indent > 0) {
16838 /*% ripper: heredoc_dedent!($:$, INT2NUM(%{p->heredoc_indent})) %*/
16839 p->heredoc_indent = 0;
16840 }
16841 /*% ripper: xstring_literal!($:$) %*/
16842 }
16843#line 16844 "parse.c"
16844 break;
16845
16846 case 645: /* regexp: "regexp literal" regexp_contents tREGEXP_END */
16847#line 5991 "parse.y"
16848 {
16849 (yyval.node) = new_regexp(p, (yyvsp[-1].node), (yyvsp[0].num), &(yyloc), &(yylsp[-2]), &(yylsp[-1]), &(yylsp[0]));
16850 /*% ripper: regexp_literal!($:2, $:3) %*/
16851 }
16852#line 16853 "parse.c"
16853 break;
16854
16855 case 648: /* words_tWORDS_BEG_word_list: "word list" nonempty_list_' ' word_list "terminator" */
16856#line 3163 "parse.y"
16857 {
16858 (yyval.node) = make_list((yyvsp[-1].node), &(yyloc));
16859 /*% ripper: array!($:3) %*/
16860 }
16861#line 16862 "parse.c"
16862 break;
16863
16864 case 650: /* word_list: %empty */
16865#line 6001 "parse.y"
16866 {
16867 (yyval.node) = 0;
16868 /*% ripper: words_new! %*/
16869 }
16870#line 16871 "parse.c"
16871 break;
16872
16873 case 651: /* word_list: word_list word nonempty_list_' ' */
16874#line 6006 "parse.y"
16875 {
16876 (yyval.node) = list_append(p, (yyvsp[-2].node), evstr2dstr(p, (yyvsp[-1].node)));
16877 /*% ripper: words_add!($:1, $:2) %*/
16878 }
16879#line 16880 "parse.c"
16880 break;
16881
16882 case 653: /* word: word string_content */
16883#line 6015 "parse.y"
16884 {
16885 (yyval.node) = literal_concat(p, (yyvsp[-1].node), (yyvsp[0].node), &(yyloc));
16886 /*% ripper: word_add!($:1, $:2) %*/
16887 }
16888#line 16889 "parse.c"
16889 break;
16890
16891 case 654: /* words_tSYMBOLS_BEG_symbol_list: "symbol list" nonempty_list_' ' symbol_list "terminator" */
16892#line 3163 "parse.y"
16893 {
16894 (yyval.node) = make_list((yyvsp[-1].node), &(yyloc));
16895 /*% ripper: array!($:3) %*/
16896 }
16897#line 16898 "parse.c"
16898 break;
16899
16900 case 656: /* symbol_list: %empty */
16901#line 6025 "parse.y"
16902 {
16903 (yyval.node) = 0;
16904 /*% ripper: symbols_new! %*/
16905 }
16906#line 16907 "parse.c"
16907 break;
16908
16909 case 657: /* symbol_list: symbol_list word nonempty_list_' ' */
16910#line 6030 "parse.y"
16911 {
16912 (yyval.node) = symbol_append(p, (yyvsp[-2].node), evstr2dstr(p, (yyvsp[-1].node)));
16913 /*% ripper: symbols_add!($:1, $:2) %*/
16914 }
16915#line 16916 "parse.c"
16916 break;
16917
16918 case 658: /* words_tQWORDS_BEG_qword_list: "verbatim word list" nonempty_list_' ' qword_list "terminator" */
16919#line 3163 "parse.y"
16920 {
16921 (yyval.node) = make_list((yyvsp[-1].node), &(yyloc));
16922 /*% ripper: array!($:3) %*/
16923 }
16924#line 16925 "parse.c"
16925 break;
16926
16927 case 660: /* words_tQSYMBOLS_BEG_qsym_list: "verbatim symbol list" nonempty_list_' ' qsym_list "terminator" */
16928#line 3163 "parse.y"
16929 {
16930 (yyval.node) = make_list((yyvsp[-1].node), &(yyloc));
16931 /*% ripper: array!($:3) %*/
16932 }
16933#line 16934 "parse.c"
16934 break;
16935
16936 case 662: /* qword_list: %empty */
16937#line 6043 "parse.y"
16938 {
16939 (yyval.node) = 0;
16940 /*% ripper: qwords_new! %*/
16941 }
16942#line 16943 "parse.c"
16943 break;
16944
16945 case 663: /* qword_list: qword_list "literal content" nonempty_list_' ' */
16946#line 6048 "parse.y"
16947 {
16948 (yyval.node) = list_append(p, (yyvsp[-2].node), (yyvsp[-1].node));
16949 /*% ripper: qwords_add!($:1, $:2) %*/
16950 }
16951#line 16952 "parse.c"
16952 break;
16953
16954 case 664: /* qsym_list: %empty */
16955#line 6055 "parse.y"
16956 {
16957 (yyval.node) = 0;
16958 /*% ripper: qsymbols_new! %*/
16959 }
16960#line 16961 "parse.c"
16961 break;
16962
16963 case 665: /* qsym_list: qsym_list "literal content" nonempty_list_' ' */
16964#line 6060 "parse.y"
16965 {
16966 (yyval.node) = symbol_append(p, (yyvsp[-2].node), (yyvsp[-1].node));
16967 /*% ripper: qsymbols_add!($:1, $:2) %*/
16968 }
16969#line 16970 "parse.c"
16970 break;
16971
16972 case 666: /* string_contents: %empty */
16973#line 6067 "parse.y"
16974 {
16975 (yyval.node) = 0;
16976 /*% ripper: string_content! %*/
16977 }
16978#line 16979 "parse.c"
16979 break;
16980
16981 case 667: /* string_contents: string_contents string_content */
16982#line 6072 "parse.y"
16983 {
16984 (yyval.node) = literal_concat(p, (yyvsp[-1].node), (yyvsp[0].node), &(yyloc));
16985 /*% ripper: string_add!($:1, $:2) %*/
16986 }
16987#line 16988 "parse.c"
16988 break;
16989
16990 case 668: /* xstring_contents: %empty */
16991#line 6079 "parse.y"
16992 {
16993 (yyval.node) = 0;
16994 /*% ripper: xstring_new! %*/
16995 }
16996#line 16997 "parse.c"
16997 break;
16998
16999 case 669: /* xstring_contents: xstring_contents string_content */
17000#line 6084 "parse.y"
17001 {
17002 (yyval.node) = literal_concat(p, (yyvsp[-1].node), (yyvsp[0].node), &(yyloc));
17003 /*% ripper: xstring_add!($:1, $:2) %*/
17004 }
17005#line 17006 "parse.c"
17006 break;
17007
17008 case 670: /* regexp_contents: %empty */
17009#line 6091 "parse.y"
17010 {
17011 (yyval.node) = 0;
17012 /*% ripper: regexp_new! %*/
17013 }
17014#line 17015 "parse.c"
17015 break;
17016
17017 case 671: /* regexp_contents: regexp_contents string_content */
17018#line 6096 "parse.y"
17019 {
17020 NODE *head = (yyvsp[-1].node), *tail = (yyvsp[0].node);
17021 if (!head) {
17022 (yyval.node) = tail;
17023 }
17024 else if (!tail) {
17025 (yyval.node) = head;
17026 }
17027 else {
17028 switch (nd_type(head)) {
17029 case NODE_STR:
17030 head = str2dstr(p, head);
17031 break;
17032 case NODE_DSTR:
17033 break;
17034 default:
17035 head = list_append(p, NEW_DSTR(0, &(yyloc)), head);
17036 break;
17037 }
17038 (yyval.node) = list_append(p, head, tail);
17039 }
17040 /*% ripper: regexp_add!($:1, $:2) %*/
17041 }
17042#line 17043 "parse.c"
17043 break;
17044
17045 case 673: /* @34: %empty */
17046#line 6124 "parse.y"
17047 {
17048 /* need to backup p->lex.strterm so that a string literal `%&foo,#$&,bar&` can be parsed */
17049 (yyval.strterm) = p->lex.strterm;
17050 p->lex.strterm = 0;
17051 SET_LEX_STATE(EXPR_BEG);
17052 }
17053#line 17054 "parse.c"
17054 break;
17055
17056 case 674: /* string_content: tSTRING_DVAR @34 string_dvar */
17057#line 6131 "parse.y"
17058 {
17059 p->lex.strterm = (yyvsp[-1].strterm);
17060 (yyval.node) = NEW_EVSTR((yyvsp[0].node), &(yyloc), &(yylsp[-2]), &NULL_LOC);
17061 nd_set_line((yyval.node), (yylsp[0]).end_pos.lineno);
17062 /*% ripper: string_dvar!($:3) %*/
17063 }
17064#line 17065 "parse.c"
17065 break;
17066
17067 case 675: /* @35: %empty */
17068#line 6138 "parse.y"
17069 {
17070 CMDARG_PUSH(0);
17071 COND_PUSH(0);
17072 /* need to backup p->lex.strterm so that a string literal `%!foo,#{ !0 },bar!` can be parsed */
17073 (yyval.strterm) = p->lex.strterm;
17074 p->lex.strterm = 0;
17075 SET_LEX_STATE(EXPR_BEG);
17076 }
17077#line 17078 "parse.c"
17078 break;
17079
17080 case 676: /* @36: %empty */
17081#line 6146 "parse.y"
17082 {
17083 (yyval.num) = p->lex.brace_nest;
17084 p->lex.brace_nest = 0;
17085 }
17086#line 17087 "parse.c"
17087 break;
17088
17089 case 677: /* @37: %empty */
17090#line 6150 "parse.y"
17091 {
17092 (yyval.num) = p->lex.lpar_beg;
17093 p->lex.lpar_beg = -1;
17094 }
17095#line 17096 "parse.c"
17096 break;
17097
17098 case 678: /* @38: %empty */
17099#line 6154 "parse.y"
17100 {
17101 (yyval.num) = p->heredoc_indent;
17102 p->heredoc_indent = 0;
17103 }
17104#line 17105 "parse.c"
17105 break;
17106
17107 case 679: /* string_content: "'#{'" @35 @36 @37 @38 compstmt_stmts string_dend */
17108#line 6159 "parse.y"
17109 {
17110 COND_POP();
17111 CMDARG_POP();
17112 p->lex.strterm = (yyvsp[-5].strterm);
17113 SET_LEX_STATE((yyvsp[-6].state));
17114 p->lex.brace_nest = (yyvsp[-4].num);
17115 p->lex.lpar_beg = (yyvsp[-3].num);
17116 p->heredoc_indent = (yyvsp[-2].num);
17117 p->heredoc_line_indent = -1;
17118 if ((yyvsp[-1].node)) nd_unset_fl_newline((yyvsp[-1].node));
17119 (yyval.node) = new_evstr(p, (yyvsp[-1].node), &(yyloc), &(yylsp[-6]), &(yylsp[0]));
17120 /*% ripper: string_embexpr!($:compstmt) %*/
17121 }
17122#line 17123 "parse.c"
17123 break;
17124
17125 case 682: /* string_dvar: nonlocal_var */
17126#line 6179 "parse.y"
17127 {
17128 if (!((yyval.node) = gettable(p, (yyvsp[0].id), &(yyloc)))) (yyval.node) = NEW_ERROR(&(yyloc));
17129 /*% ripper: var_ref!($:1) %*/
17130 }
17131#line 17132 "parse.c"
17132 break;
17133
17134 case 686: /* ssym: "symbol literal" sym */
17135#line 6191 "parse.y"
17136 {
17137 SET_LEX_STATE(EXPR_END);
17138 VALUE str = rb_id2str((yyvsp[0].id));
17139 /*
17140 * TODO:
17141 * set_yylval_noname sets invalid id to yylval.
17142 * This branch can be removed once yylval is changed to
17143 * hold lexed string.
17144 */
17145 if (!str) str = STR_NEW0();
17146 (yyval.node) = NEW_SYM(str, &(yyloc));
17147 /*% ripper: symbol_literal!(symbol!($:2)) %*/
17148 }
17149#line 17150 "parse.c"
17150 break;
17151
17152 case 689: /* dsym: "symbol literal" string_contents "terminator" */
17153#line 6211 "parse.y"
17154 {
17155 SET_LEX_STATE(EXPR_END);
17156 (yyval.node) = dsym_node(p, (yyvsp[-1].node), &(yyloc));
17157 /*% ripper: dyna_symbol!($:2) %*/
17158 }
17159#line 17160 "parse.c"
17160 break;
17161
17162 case 691: /* numeric: tUMINUS_NUM simple_numeric */
17163#line 6220 "parse.y"
17164 {
17165 (yyval.node) = (yyvsp[0].node);
17166 negate_lit(p, (yyval.node), &(yyloc));
17167 /*% ripper: unary!(ID2VAL(idUMinus), $:2) %*/
17168 }
17169#line 17170 "parse.c"
17170 break;
17171
17172 case 702: /* keyword_variable: "'nil'" */
17173#line 6242 "parse.y"
17174 {(yyval.id) = KWD2EID(nil, (yyvsp[0].id));}
17175#line 17176 "parse.c"
17176 break;
17177
17178 case 703: /* keyword_variable: "'self'" */
17179#line 6243 "parse.y"
17180 {(yyval.id) = KWD2EID(self, (yyvsp[0].id));}
17181#line 17182 "parse.c"
17182 break;
17183
17184 case 704: /* keyword_variable: "'true'" */
17185#line 6244 "parse.y"
17186 {(yyval.id) = KWD2EID(true, (yyvsp[0].id));}
17187#line 17188 "parse.c"
17188 break;
17189
17190 case 705: /* keyword_variable: "'false'" */
17191#line 6245 "parse.y"
17192 {(yyval.id) = KWD2EID(false, (yyvsp[0].id));}
17193#line 17194 "parse.c"
17194 break;
17195
17196 case 706: /* keyword_variable: "'__FILE__'" */
17197#line 6246 "parse.y"
17198 {(yyval.id) = KWD2EID(_FILE__, (yyvsp[0].id));}
17199#line 17200 "parse.c"
17200 break;
17201
17202 case 707: /* keyword_variable: "'__LINE__'" */
17203#line 6247 "parse.y"
17204 {(yyval.id) = KWD2EID(_LINE__, (yyvsp[0].id));}
17205#line 17206 "parse.c"
17206 break;
17207
17208 case 708: /* keyword_variable: "'__ENCODING__'" */
17209#line 6248 "parse.y"
17210 {(yyval.id) = KWD2EID(_ENCODING__, (yyvsp[0].id));}
17211#line 17212 "parse.c"
17212 break;
17213
17214 case 709: /* var_ref: user_variable */
17215#line 6252 "parse.y"
17216 {
17217 if (!((yyval.node) = gettable(p, (yyvsp[0].id), &(yyloc)))) (yyval.node) = NEW_ERROR(&(yyloc));
17218 if (ifdef_ripper(id_is_var(p, (yyvsp[0].id)), false)) {
17219 /*% ripper: var_ref!($:1) %*/
17220 }
17221 else {
17222 /*% ripper: vcall!($:1) %*/
17223 }
17224 }
17225#line 17226 "parse.c"
17226 break;
17227
17228 case 710: /* var_ref: keyword_variable */
17229#line 6262 "parse.y"
17230 {
17231 if (!((yyval.node) = gettable(p, (yyvsp[0].id), &(yyloc)))) (yyval.node) = NEW_ERROR(&(yyloc));
17232 /*% ripper: var_ref!($:1) %*/
17233 }
17234#line 17235 "parse.c"
17235 break;
17236
17237 case 711: /* var_lhs: user_variable */
17238#line 6269 "parse.y"
17239 {
17240 /*% ripper: var_field!($:1) %*/
17241 (yyval.node) = assignable(p, (yyvsp[0].id), 0, &(yyloc));
17242 }
17243#line 17244 "parse.c"
17244 break;
17245
17246 case 712: /* var_lhs: keyword_variable */
17247#line 6269 "parse.y"
17248 {
17249 /*% ripper: var_field!($:1) %*/
17250 (yyval.node) = assignable(p, (yyvsp[0].id), 0, &(yyloc));
17251 }
17252#line 17253 "parse.c"
17253 break;
17254
17255 case 715: /* $@39: %empty */
17256#line 6280 "parse.y"
17257 {
17258 SET_LEX_STATE(EXPR_BEG);
17259 p->command_start = TRUE;
17260 }
17261#line 17262 "parse.c"
17262 break;
17263
17264 case 716: /* superclass: '<' $@39 expr_value term */
17265#line 6285 "parse.y"
17266 {
17267 (yyval.node) = (yyvsp[-1].node);
17268 /*% ripper: $:3 %*/
17269 }
17270#line 17271 "parse.c"
17271 break;
17272
17273 case 719: /* f_opt_paren_args: none */
17274#line 6294 "parse.y"
17275 {
17276 p->ctxt.in_argdef = 0;
17277 (yyval.node_args) = new_args_tail(p, 0, 0, 0, &(yylsp[-1]));
17278 (yyval.node_args) = new_args(p, 0, 0, 0, 0, (yyval.node_args), &(yylsp[-1]));
17279 /*% ripper: params!(Qnil, Qnil, Qnil, Qnil, Qnil, Qnil, Qnil) %*/
17280 }
17281#line 17282 "parse.c"
17282 break;
17283
17284 case 720: /* f_paren_args: '(' f_args rparen */
17285#line 6303 "parse.y"
17286 {
17287 (yyval.node_args) = (yyvsp[-1].node_args);
17288 /*% ripper: paren!($:2) %*/
17289 SET_LEX_STATE(EXPR_BEG);
17290 p->command_start = TRUE;
17291 p->ctxt.in_argdef = 0;
17292 }
17293#line 17294 "parse.c"
17294 break;
17295
17296 case 722: /* @40: %empty */
17297#line 6313 "parse.y"
17298 {
17299 (yyval.ctxt) = p->ctxt;
17300 p->ctxt.in_kwarg = 1;
17301 p->ctxt.in_argdef = 1;
17302 SET_LEX_STATE(p->lex.state|EXPR_LABEL); /* force for args */
17303 }
17304#line 17305 "parse.c"
17305 break;
17306
17307 case 723: /* f_arglist: @40 f_args term */
17308#line 6320 "parse.y"
17309 {
17310 p->ctxt.in_kwarg = (yyvsp[-2].ctxt).in_kwarg;
17311 p->ctxt.in_argdef = 0;
17312 (yyval.node_args) = (yyvsp[-1].node_args);
17313 SET_LEX_STATE(EXPR_BEG);
17314 p->command_start = TRUE;
17315 /*% ripper: $:2 %*/
17316 }
17317#line 17318 "parse.c"
17318 break;
17319
17320 case 724: /* f_kw_arg_value: f_label arg_value */
17321#line 3014 "parse.y"
17322 {
17323 p->ctxt.in_argdef = 1;
17324 (yyval.node_kw_arg) = new_kw_arg(p, assignable(p, (yyvsp[-1].id), (yyvsp[0].node), &(yyloc)), &(yyloc));
17325 /*% ripper: [$:$, $:value] %*/
17326 }
17327#line 17328 "parse.c"
17328 break;
17329
17330 case 725: /* f_kw_arg_value: f_label */
17331#line 3020 "parse.y"
17332 {
17333 p->ctxt.in_argdef = 1;
17334 (yyval.node_kw_arg) = new_kw_arg(p, assignable(p, (yyvsp[0].id), NODE_SPECIAL_REQUIRED_KEYWORD, &(yyloc)), &(yyloc));
17335 /*% ripper: [$:$, 0] %*/
17336 }
17337#line 17338 "parse.c"
17338 break;
17339
17340 case 726: /* f_kwarg_arg_value: f_kw_arg_value */
17341#line 3029 "parse.y"
17342 {
17343 (yyval.node_kw_arg) = (yyvsp[0].node_kw_arg);
17344 /*% ripper: rb_ary_new3(1, $:1) %*/
17345 }
17346#line 17347 "parse.c"
17347 break;
17348
17349 case 727: /* f_kwarg_arg_value: f_kwarg_arg_value ',' f_kw_arg_value */
17350#line 3034 "parse.y"
17351 {
17352 (yyval.node_kw_arg) = kwd_append((yyvsp[-2].node_kw_arg), (yyvsp[0].node_kw_arg));
17353 /*% ripper: rb_ary_push($:1, $:3) %*/
17354 }
17355#line 17356 "parse.c"
17356 break;
17357
17358 case 728: /* args_tail_basic_arg_value: f_kwarg_arg_value ',' f_kwrest opt_f_block_arg */
17359#line 2937 "parse.y"
17360 {
17361 (yyval.node_args) = new_args_tail(p, (yyvsp[-3].node_kw_arg), (yyvsp[-1].id), (yyvsp[0].id), &(yylsp[-1]));
17362 /*% ripper: [$:1, $:3, $:4] %*/
17363 }
17364#line 17365 "parse.c"
17365 break;
17366
17367 case 729: /* args_tail_basic_arg_value: f_kwarg_arg_value opt_f_block_arg */
17368#line 2942 "parse.y"
17369 {
17370 (yyval.node_args) = new_args_tail(p, (yyvsp[-1].node_kw_arg), 0, (yyvsp[0].id), &(yylsp[-1]));
17371 /*% ripper: [$:1, Qnil, $:2] %*/
17372 }
17373#line 17374 "parse.c"
17374 break;
17375
17376 case 730: /* args_tail_basic_arg_value: f_any_kwrest opt_f_block_arg */
17377#line 2947 "parse.y"
17378 {
17379 (yyval.node_args) = new_args_tail(p, 0, (yyvsp[-1].id), (yyvsp[0].id), &(yylsp[-1]));
17380 /*% ripper: [Qnil, $:1, $:2] %*/
17381 }
17382#line 17383 "parse.c"
17383 break;
17384
17385 case 731: /* args_tail_basic_arg_value: f_block_arg */
17386#line 2952 "parse.y"
17387 {
17388 (yyval.node_args) = new_args_tail(p, 0, 0, (yyvsp[0].id), &(yylsp[0]));
17389 /*% ripper: [Qnil, Qnil, $:1] %*/
17390 }
17391#line 17392 "parse.c"
17392 break;
17393
17394 case 733: /* args_tail: args_forward */
17395#line 6332 "parse.y"
17396 {
17397 ID fwd = (yyvsp[0].id);
17398 if (lambda_beginning_p() ||
17399 (p->lex.lpar_beg >= 0 && p->lex.lpar_beg+1 == p->lex.paren_nest)) {
17400 yyerror0("unexpected ... in lambda argument");
17401 fwd = 0;
17402 }
17403 else {
17404 add_forwarding_args(p);
17405 }
17406 (yyval.node_args) = new_args_tail(p, 0, fwd, arg_FWD_BLOCK, &(yylsp[0]));
17407 (yyval.node_args)->nd_ainfo.forwarding = 1;
17408 /*% ripper: [Qnil, $:1, Qnil] %*/
17409 }
17410#line 17411 "parse.c"
17411 break;
17412
17413 case 734: /* f_opt_arg_value: f_arg_asgn f_eq arg_value */
17414#line 2992 "parse.y"
17415 {
17416 p->ctxt.in_argdef = 1;
17417 (yyval.node_opt_arg) = NEW_OPT_ARG(assignable(p, (yyvsp[-2].id), (yyvsp[0].node), &(yyloc)), &(yyloc));
17418 /*% ripper: [$:$, $:3] %*/
17419 }
17420#line 17421 "parse.c"
17421 break;
17422
17423 case 735: /* f_opt_arg_arg_value: f_opt_arg_value */
17424#line 3001 "parse.y"
17425 {
17426 (yyval.node_opt_arg) = (yyvsp[0].node_opt_arg);
17427 /*% ripper: rb_ary_new3(1, $:1) %*/
17428 }
17429#line 17430 "parse.c"
17430 break;
17431
17432 case 736: /* f_opt_arg_arg_value: f_opt_arg_arg_value ',' f_opt_arg_value */
17433#line 3006 "parse.y"
17434 {
17435 (yyval.node_opt_arg) = opt_arg_append((yyvsp[-2].node_opt_arg), (yyvsp[0].node_opt_arg));
17436 /*% ripper: rb_ary_push($:1, $:3) %*/
17437 }
17438#line 17439 "parse.c"
17439 break;
17440
17441 case 737: /* opt_args_tail_args_tail: ',' args_tail */
17442#line 3101 "parse.y"
17443 {
17444 (yyval.node_args) = (yyvsp[0].node_args);
17445 /*% ripper: $:2 %*/
17446 }
17447#line 17448 "parse.c"
17448 break;
17449
17450 case 738: /* opt_args_tail_args_tail: %empty */
17451#line 3106 "parse.y"
17452 {
17453 (yyval.node_args) = new_args_tail(p, 0, 0, 0, &(yylsp[0]));
17454 /*% ripper: [Qnil, Qnil, Qnil] %*/
17455 }
17456#line 17457 "parse.c"
17457 break;
17458
17459 case 739: /* f_args: f_arg ',' f_opt_arg_arg_value ',' f_rest_arg opt_args_tail_args_tail */
17460#line 6349 "parse.y"
17461 {
17462 (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));
17463 /*% ripper: params!($:1, $:3, $:5, Qnil, *$:6[0..2]) %*/
17464 }
17465#line 17466 "parse.c"
17466 break;
17467
17468 case 740: /* f_args: f_arg ',' f_opt_arg_arg_value ',' f_rest_arg ',' f_arg opt_args_tail_args_tail */
17469#line 6354 "parse.y"
17470 {
17471 (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));
17472 /*% ripper: params!($:1, $:3, $:5, $:7, *$:8[0..2]) %*/
17473 }
17474#line 17475 "parse.c"
17475 break;
17476
17477 case 741: /* f_args: f_arg ',' f_opt_arg_arg_value opt_args_tail_args_tail */
17478#line 6359 "parse.y"
17479 {
17480 (yyval.node_args) = new_args(p, (yyvsp[-3].node_args_aux), (yyvsp[-1].node_opt_arg), 0, 0, (yyvsp[0].node_args), &(yyloc));
17481 /*% ripper: params!($:1, $:3, Qnil, Qnil, *$:4[0..2]) %*/
17482 }
17483#line 17484 "parse.c"
17484 break;
17485
17486 case 742: /* f_args: f_arg ',' f_opt_arg_arg_value ',' f_arg opt_args_tail_args_tail */
17487#line 6364 "parse.y"
17488 {
17489 (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));
17490 /*% ripper: params!($:1, $:3, Qnil, $:5, *$:6[0..2]) %*/
17491 }
17492#line 17493 "parse.c"
17493 break;
17494
17495 case 743: /* f_args: f_arg ',' f_rest_arg opt_args_tail_args_tail */
17496#line 6369 "parse.y"
17497 {
17498 (yyval.node_args) = new_args(p, (yyvsp[-3].node_args_aux), 0, (yyvsp[-1].id), 0, (yyvsp[0].node_args), &(yyloc));
17499 /*% ripper: params!($:1, Qnil, $:3, Qnil, *$:4[0..2]) %*/
17500 }
17501#line 17502 "parse.c"
17502 break;
17503
17504 case 744: /* f_args: f_arg ',' f_rest_arg ',' f_arg opt_args_tail_args_tail */
17505#line 6374 "parse.y"
17506 {
17507 (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));
17508 /*% ripper: params!($:1, Qnil, $:3, $:5, *$:6[0..2]) %*/
17509 }
17510#line 17511 "parse.c"
17511 break;
17512
17513 case 745: /* f_args: f_arg opt_args_tail_args_tail */
17514#line 6379 "parse.y"
17515 {
17516 (yyval.node_args) = new_args(p, (yyvsp[-1].node_args_aux), 0, 0, 0, (yyvsp[0].node_args), &(yyloc));
17517 /*% ripper: params!($:1, Qnil, Qnil, Qnil, *$:2[0..2]) %*/
17518 }
17519#line 17520 "parse.c"
17520 break;
17521
17522 case 746: /* f_args: f_opt_arg_arg_value ',' f_rest_arg opt_args_tail_args_tail */
17523#line 6384 "parse.y"
17524 {
17525 (yyval.node_args) = new_args(p, 0, (yyvsp[-3].node_opt_arg), (yyvsp[-1].id), 0, (yyvsp[0].node_args), &(yyloc));
17526 /*% ripper: params!(Qnil, $:1, $:3, Qnil, *$:4[0..2]) %*/
17527 }
17528#line 17529 "parse.c"
17529 break;
17530
17531 case 747: /* f_args: f_opt_arg_arg_value ',' f_rest_arg ',' f_arg opt_args_tail_args_tail */
17532#line 6389 "parse.y"
17533 {
17534 (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));
17535 /*% ripper: params!(Qnil, $:1, $:3, $:5, *$:6[0..2]) %*/
17536 }
17537#line 17538 "parse.c"
17538 break;
17539
17540 case 748: /* f_args: f_opt_arg_arg_value opt_args_tail_args_tail */
17541#line 6394 "parse.y"
17542 {
17543 (yyval.node_args) = new_args(p, 0, (yyvsp[-1].node_opt_arg), 0, 0, (yyvsp[0].node_args), &(yyloc));
17544 /*% ripper: params!(Qnil, $:1, Qnil, Qnil, *$:2[0..2]) %*/
17545 }
17546#line 17547 "parse.c"
17547 break;
17548
17549 case 749: /* f_args: f_opt_arg_arg_value ',' f_arg opt_args_tail_args_tail */
17550#line 6399 "parse.y"
17551 {
17552 (yyval.node_args) = new_args(p, 0, (yyvsp[-3].node_opt_arg), 0, (yyvsp[-1].node_args_aux), (yyvsp[0].node_args), &(yyloc));
17553 /*% ripper: params!(Qnil, $:1, Qnil, $:3, *$:4[0..2]) %*/
17554 }
17555#line 17556 "parse.c"
17556 break;
17557
17558 case 750: /* f_args: f_rest_arg opt_args_tail_args_tail */
17559#line 6404 "parse.y"
17560 {
17561 (yyval.node_args) = new_args(p, 0, 0, (yyvsp[-1].id), 0, (yyvsp[0].node_args), &(yyloc));
17562 /*% ripper: params!(Qnil, Qnil, $:1, Qnil, *$:2[0..2]) %*/
17563 }
17564#line 17565 "parse.c"
17565 break;
17566
17567 case 751: /* f_args: f_rest_arg ',' f_arg opt_args_tail_args_tail */
17568#line 6409 "parse.y"
17569 {
17570 (yyval.node_args) = new_args(p, 0, 0, (yyvsp[-3].id), (yyvsp[-1].node_args_aux), (yyvsp[0].node_args), &(yyloc));
17571 /*% ripper: params!(Qnil, Qnil, $:1, $:3, *$:4[0..2]) %*/
17572 }
17573#line 17574 "parse.c"
17574 break;
17575
17576 case 752: /* f_args: args_tail */
17577#line 6414 "parse.y"
17578 {
17579 (yyval.node_args) = new_args(p, 0, 0, 0, 0, (yyvsp[0].node_args), &(yyloc));
17580 /*% ripper: params!(Qnil, Qnil, Qnil, Qnil, *$:1[0..2]) %*/
17581 }
17582#line 17583 "parse.c"
17583 break;
17584
17585 case 753: /* f_args: %empty */
17586#line 6419 "parse.y"
17587 {
17588 (yyval.node_args) = new_args_tail(p, 0, 0, 0, &(yylsp[0]));
17589 (yyval.node_args) = new_args(p, 0, 0, 0, 0, (yyval.node_args), &(yylsp[0]));
17590 /*% ripper: params!(Qnil, Qnil, Qnil, Qnil, Qnil, Qnil, Qnil) %*/
17591 }
17592#line 17593 "parse.c"
17593 break;
17594
17595 case 754: /* args_forward: "(..." */
17596#line 6427 "parse.y"
17597 {
17598 (yyval.id) = idFWD_KWREST;
17599 /*% ripper: args_forward! %*/
17600 }
17601#line 17602 "parse.c"
17602 break;
17603
17604 case 755: /* f_bad_arg: "constant" */
17605#line 6434 "parse.y"
17606 {
17607 static const char mesg[] = "formal argument cannot be a constant";
17608 /*%%%*/
17609 yyerror1(&(yylsp[0]), mesg);
17610 /*% %*/
17611 (yyval.id) = 0;
17612 /*% ripper[error]: param_error!(ERR_MESG(), $:1) %*/
17613 }
17614#line 17615 "parse.c"
17615 break;
17616
17617 case 756: /* f_bad_arg: "instance variable" */
17618#line 6443 "parse.y"
17619 {
17620 static const char mesg[] = "formal argument cannot be an instance variable";
17621 /*%%%*/
17622 yyerror1(&(yylsp[0]), mesg);
17623 /*% %*/
17624 (yyval.id) = 0;
17625 /*% ripper[error]: param_error!(ERR_MESG(), $:1) %*/
17626 }
17627#line 17628 "parse.c"
17628 break;
17629
17630 case 757: /* f_bad_arg: "global variable" */
17631#line 6452 "parse.y"
17632 {
17633 static const char mesg[] = "formal argument cannot be a global variable";
17634 /*%%%*/
17635 yyerror1(&(yylsp[0]), mesg);
17636 /*% %*/
17637 (yyval.id) = 0;
17638 /*% ripper[error]: param_error!(ERR_MESG(), $:1) %*/
17639 }
17640#line 17641 "parse.c"
17641 break;
17642
17643 case 758: /* f_bad_arg: "class variable" */
17644#line 6461 "parse.y"
17645 {
17646 static const char mesg[] = "formal argument cannot be a class variable";
17647 /*%%%*/
17648 yyerror1(&(yylsp[0]), mesg);
17649 /*% %*/
17650 (yyval.id) = 0;
17651 /*% ripper[error]: param_error!(ERR_MESG(), $:1) %*/
17652 }
17653#line 17654 "parse.c"
17654 break;
17655
17656 case 760: /* f_norm_arg: "local variable or method" */
17657#line 6473 "parse.y"
17658 {
17659 VALUE e = formal_argument_error(p, (yyval.id) = (yyvsp[0].id));
17660 if (e) {
17661 /*% ripper[error]: param_error!(?e, $:1) %*/
17662 }
17663 p->max_numparam = ORDINAL_PARAM;
17664 }
17665#line 17666 "parse.c"
17666 break;
17667
17668 case 761: /* f_arg_asgn: f_norm_arg */
17669#line 6483 "parse.y"
17670 {
17671 arg_var(p, (yyvsp[0].id));
17672 (yyval.id) = (yyvsp[0].id);
17673 }
17674#line 17675 "parse.c"
17675 break;
17676
17677 case 762: /* f_arg_item: f_arg_asgn */
17678#line 6490 "parse.y"
17679 {
17680 (yyval.node_args_aux) = NEW_ARGS_AUX((yyvsp[0].id), 1, &NULL_LOC);
17681 /*% ripper: $:1 %*/
17682 }
17683#line 17684 "parse.c"
17684 break;
17685
17686 case 763: /* f_arg_item: "(" f_margs rparen */
17687#line 6495 "parse.y"
17688 {
17689 ID tid = internal_id(p);
17690 YYLTYPE loc;
17691 loc.beg_pos = (yylsp[-1]).beg_pos;
17692 loc.end_pos = (yylsp[-1]).beg_pos;
17693 arg_var(p, tid);
17694 if (dyna_in_block(p)) {
17695 (yyvsp[-1].node_masgn)->nd_value = NEW_DVAR(tid, &loc);
17696 }
17697 else {
17698 (yyvsp[-1].node_masgn)->nd_value = NEW_LVAR(tid, &loc);
17699 }
17700 (yyval.node_args_aux) = NEW_ARGS_AUX(tid, 1, &NULL_LOC);
17701 (yyval.node_args_aux)->nd_next = (NODE *)(yyvsp[-1].node_masgn);
17702 /*% ripper: mlhs_paren!($:2) %*/
17703 }
17704#line 17705 "parse.c"
17705 break;
17706
17707 case 765: /* f_arg: f_arg ',' f_arg_item */
17708#line 6516 "parse.y"
17709 {
17710 (yyval.node_args_aux) = (yyvsp[-2].node_args_aux);
17711 (yyval.node_args_aux)->nd_plen++;
17712 (yyval.node_args_aux)->nd_next = block_append(p, (yyval.node_args_aux)->nd_next, (yyvsp[0].node_args_aux)->nd_next);
17713 rb_discard_node(p, (NODE *)(yyvsp[0].node_args_aux));
17714 /*% ripper: rb_ary_push($:1, $:3) %*/
17715 }
17716#line 17717 "parse.c"
17717 break;
17718
17719 case 766: /* f_label: "label" */
17720#line 6527 "parse.y"
17721 {
17722 VALUE e = formal_argument_error(p, (yyval.id) = (yyvsp[0].id));
17723 if (e) {
17724 (yyval.id) = 0;
17725 /*% ripper[error]: param_error!(?e, $:1) %*/
17726 }
17727 /*
17728 * Workaround for Prism::ParseTest#test_filepath for
17729 * "unparser/corpus/literal/def.txt"
17730 *
17731 * See the discussion on https://github.com/ruby/ruby/pull/9923
17732 */
17733 arg_var(p, ifdef_ripper(0, (yyvsp[0].id)));
17734 /*% ripper: $:1 %*/
17735 p->max_numparam = ORDINAL_PARAM;
17736 p->ctxt.in_argdef = 0;
17737 }
17738#line 17739 "parse.c"
17739 break;
17740
17741 case 769: /* f_no_kwarg: p_kwnorest */
17742#line 6551 "parse.y"
17743 {
17744 /*% ripper: nokw_param!(Qnil) %*/
17745 }
17746#line 17747 "parse.c"
17747 break;
17748
17749 case 770: /* f_kwrest: kwrest_mark "local variable or method" */
17750#line 6557 "parse.y"
17751 {
17752 arg_var(p, shadowing_lvar(p, (yyvsp[0].id)));
17753 (yyval.id) = (yyvsp[0].id);
17754 /*% ripper: kwrest_param!($:2) %*/
17755 }
17756#line 17757 "parse.c"
17757 break;
17758
17759 case 771: /* f_kwrest: kwrest_mark */
17760#line 6563 "parse.y"
17761 {
17762 arg_var(p, idFWD_KWREST);
17763 (yyval.id) = idFWD_KWREST;
17764 /*% ripper: kwrest_param!(Qnil) %*/
17765 }
17766#line 17767 "parse.c"
17767 break;
17768
17769 case 774: /* f_rest_arg: restarg_mark "local variable or method" */
17770#line 6575 "parse.y"
17771 {
17772 arg_var(p, shadowing_lvar(p, (yyvsp[0].id)));
17773 (yyval.id) = (yyvsp[0].id);
17774 /*% ripper: rest_param!($:2) %*/
17775 }
17776#line 17777 "parse.c"
17777 break;
17778
17779 case 775: /* f_rest_arg: restarg_mark */
17780#line 6581 "parse.y"
17781 {
17782 arg_var(p, idFWD_REST);
17783 (yyval.id) = idFWD_REST;
17784 /*% ripper: rest_param!(Qnil) %*/
17785 }
17786#line 17787 "parse.c"
17787 break;
17788
17789 case 778: /* f_block_arg: blkarg_mark "local variable or method" */
17790#line 6593 "parse.y"
17791 {
17792 arg_var(p, shadowing_lvar(p, (yyvsp[0].id)));
17793 (yyval.id) = (yyvsp[0].id);
17794 /*% ripper: blockarg!($:2) %*/
17795 }
17796#line 17797 "parse.c"
17797 break;
17798
17799 case 779: /* f_block_arg: blkarg_mark */
17800#line 6599 "parse.y"
17801 {
17802 arg_var(p, idFWD_BLOCK);
17803 (yyval.id) = idFWD_BLOCK;
17804 /*% ripper: blockarg!(Qnil) %*/
17805 }
17806#line 17807 "parse.c"
17807 break;
17808
17809 case 780: /* opt_f_block_arg: ',' f_block_arg */
17810#line 6607 "parse.y"
17811 {
17812 (yyval.id) = (yyvsp[0].id);
17813 /*% ripper: $:2 %*/
17814 }
17815#line 17816 "parse.c"
17816 break;
17817
17818 case 782: /* value_expr_singleton_expr: singleton_expr */
17819#line 3155 "parse.y"
17820 {
17821 value_expr(p, (yyvsp[0].node));
17822 (yyval.node) = (yyvsp[0].node);
17823 }
17824#line 17825 "parse.c"
17825 break;
17826
17827 case 783: /* singleton: value_expr_singleton_expr */
17828#line 6616 "parse.y"
17829 {
17830 NODE *expr = last_expr_node((yyvsp[0].node));
17831 switch (nd_type(expr)) {
17832 case NODE_STR:
17833 case NODE_DSTR:
17834 case NODE_XSTR:
17835 case NODE_DXSTR:
17836 case NODE_REGX:
17837 case NODE_DREGX:
17838 case NODE_SYM:
17839 case NODE_LINE:
17840 case NODE_FILE:
17841 case NODE_ENCODING:
17842 case NODE_INTEGER:
17843 case NODE_FLOAT:
17844 case NODE_RATIONAL:
17845 case NODE_IMAGINARY:
17846 case NODE_DSYM:
17847 case NODE_LIST:
17848 case NODE_ZLIST:
17849 yyerror1(&expr->nd_loc, "can't define singleton method for literals");
17850 break;
17851 default:
17852 break;
17853 }
17854 (yyval.node) = (yyvsp[0].node);
17855 }
17856#line 17857 "parse.c"
17857 break;
17858
17859 case 785: /* $@41: %empty */
17860#line 6647 "parse.y"
17861 {
17862 SET_LEX_STATE(EXPR_BEG);
17863 p->ctxt.in_argdef = 0;
17864 }
17865#line 17866 "parse.c"
17866 break;
17867
17868 case 786: /* singleton_expr: '(' $@41 expr rparen */
17869#line 6652 "parse.y"
17870 {
17871 p->ctxt.in_argdef = 1;
17872 (yyval.node) = (yyvsp[-1].node);
17873 /*% ripper: paren!($:3) %*/
17874 }
17875#line 17876 "parse.c"
17876 break;
17877
17878 case 788: /* assoc_list: assocs trailer */
17879#line 6661 "parse.y"
17880 {
17881 (yyval.node) = (yyvsp[-1].node);
17882 /*% ripper: assoclist_from_args!($:1) %*/
17883 }
17884#line 17885 "parse.c"
17885 break;
17886
17887 case 790: /* assocs: assocs ',' assoc */
17888#line 6670 "parse.y"
17889 {
17890 NODE *assocs = (yyvsp[-2].node);
17891 NODE *tail = (yyvsp[0].node);
17892 if (!assocs) {
17893 assocs = tail;
17894 }
17895 else if (tail) {
17896 NODE *n = RNODE_LIST(tail)->nd_next;
17897 if (!RNODE_LIST(tail)->nd_head && nd_type_p(n, NODE_LIST) &&
17898 nd_type_p((n = RNODE_LIST(n)->nd_head), NODE_HASH)) {
17899 /* DSTAR */
17900 tail = RNODE_HASH(n)->nd_head;
17901 }
17902 if (tail) {
17903 assocs = list_concat(assocs, tail);
17904 }
17905 }
17906 (yyval.node) = assocs;
17907 /*% ripper: rb_ary_push($:1, $:3) %*/
17908 }
17909#line 17910 "parse.c"
17910 break;
17911
17912 case 791: /* assoc: arg_value "=>" arg_value */
17913#line 6693 "parse.y"
17914 {
17915 (yyval.node) = list_append(p, NEW_LIST((yyvsp[-2].node), &(yyloc)), (yyvsp[0].node));
17916 /*% ripper: assoc_new!($:1, $:3) %*/
17917 }
17918#line 17919 "parse.c"
17919 break;
17920
17921 case 792: /* assoc: "label" arg_value */
17922#line 6698 "parse.y"
17923 {
17924 (yyval.node) = list_append(p, NEW_LIST(NEW_SYM(rb_id2str((yyvsp[-1].id)), &(yylsp[-1])), &(yyloc)), (yyvsp[0].node));
17925 /*% ripper: assoc_new!($:1, $:2) %*/
17926 }
17927#line 17928 "parse.c"
17928 break;
17929
17930 case 793: /* assoc: "label" */
17931#line 6703 "parse.y"
17932 {
17933 NODE *val = gettable(p, (yyvsp[0].id), &(yyloc));
17934 if (!val) val = NEW_ERROR(&(yyloc));
17935 (yyval.node) = list_append(p, NEW_LIST(NEW_SYM(rb_id2str((yyvsp[0].id)), &(yylsp[0])), &(yyloc)), val);
17936 /*% ripper: assoc_new!($:1, Qnil) %*/
17937 }
17938#line 17939 "parse.c"
17939 break;
17940
17941 case 794: /* assoc: "string literal" string_contents tLABEL_END arg_value */
17942#line 6710 "parse.y"
17943 {
17944 YYLTYPE loc = code_loc_gen(&(yylsp[-3]), &(yylsp[-1]));
17945 (yyval.node) = list_append(p, NEW_LIST(dsym_node(p, (yyvsp[-2].node), &loc), &loc), (yyvsp[0].node));
17946 /*% ripper: assoc_new!(dyna_symbol!($:2), $:4) %*/
17947 }
17948#line 17949 "parse.c"
17949 break;
17950
17951 case 795: /* assoc: "**arg" arg_value */
17952#line 6716 "parse.y"
17953 {
17954 (yyval.node) = list_append(p, NEW_LIST(0, &(yyloc)), (yyvsp[0].node));
17955 /*% ripper: assoc_splat!($:2) %*/
17956 }
17957#line 17958 "parse.c"
17958 break;
17959
17960 case 796: /* assoc: "**arg" */
17961#line 6721 "parse.y"
17962 {
17963 forwarding_arg_check(p, idFWD_KWREST, idFWD_ALL, "keyword rest");
17964 (yyval.node) = list_append(p, NEW_LIST(0, &(yyloc)),
17965 NEW_LVAR(idFWD_KWREST, &(yyloc)));
17966 /*% ripper: assoc_splat!(Qnil) %*/
17967 }
17968#line 17969 "parse.c"
17969 break;
17970
17971 case 815: /* term: ';' */
17972#line 6768 "parse.y"
17973 {
17974 yyerrok;
17975 token_flush(p);
17976 if (p->ctxt.in_defined) {
17977 p->ctxt.has_trailing_semicolon = 1;
17978 }
17979 }
17980#line 17981 "parse.c"
17981 break;
17982
17983 case 816: /* term: '\n' */
17984#line 6776 "parse.y"
17985 {
17986 (yyloc).end_pos = (yyloc).beg_pos;
17987 token_flush(p);
17988 }
17989#line 17990 "parse.c"
17990 break;
17991
17992 case 818: /* terms: terms ';' */
17993#line 6783 "parse.y"
17994 {yyerrok;}
17995#line 17996 "parse.c"
17996 break;
17997
17998 case 819: /* none: %empty */
17999#line 6787 "parse.y"
18000 {
18001 (yyval.node) = 0;
18002 /*% ripper: Qnil %*/
18003 }
18004#line 18005 "parse.c"
18005 break;
18006
18007
18008#line 18009 "parse.c"
18009
18010 default: break;
18011 }
18012 /* User semantic actions sometimes alter yychar, and that requires
18013 that yytoken be updated with the new translation. We take the
18014 approach of translating immediately before every use of yytoken.
18015 One alternative is translating here after every semantic action,
18016 but that translation would be missed if the semantic action invokes
18017 YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or
18018 if it invokes YYBACKUP. In the case of YYABORT or YYACCEPT, an
18019 incorrect destructor might then be invoked immediately. In the
18020 case of YYERROR or YYBACKUP, subsequent parser actions might lead
18021 to an incorrect destructor call or verbose syntax error message
18022 before the lookahead is translated. */
18023 YY_SYMBOL_PRINT ("-> $$ =", YY_CAST (yysymbol_kind_t, yyr1[yyn]), &yyval, &yyloc, p);
18024
18025 YYPOPSTACK (yylen);
18026 /* %after-reduce function. */
18027#line 2676 "parse.y"
18028 {after_reduce(yylen, p);}
18029#line 18030 "parse.c"
18030
18031 yylen = 0;
18032
18033 *++yyvsp = yyval;
18034 *++yylsp = yyloc;
18035
18036 /* Now 'shift' the result of the reduction. Determine what state
18037 that goes to, based on the state we popped back to and the rule
18038 number reduced by. */
18039 {
18040 const int yylhs = yyr1[yyn] - YYNTOKENS;
18041 const int yyi = yypgoto[yylhs] + *yyssp;
18042 yystate = (0 <= yyi && yyi <= YYLAST && yycheck[yyi] == *yyssp
18043 ? yytable[yyi]
18044 : yydefgoto[yylhs]);
18045 }
18046
18047 goto yynewstate;
18048
18049
18050/*--------------------------------------.
18051| yyerrlab -- here on detecting error. |
18052`--------------------------------------*/
18053yyerrlab:
18054 /* Make sure we have latest lookahead translation. See comments at
18055 user semantic actions for why this is necessary. */
18056 yytoken = yychar == YYEMPTY ? YYSYMBOL_YYEMPTY : YYTRANSLATE (yychar);
18057 /* If not already recovering from an error, report this error. */
18058 if (!yyerrstatus)
18059 {
18060 ++yynerrs;
18061 {
18062 yypcontext_t yyctx
18063 = {yyssp, yytoken, &yylloc};
18064 char const *yymsgp = YY_("syntax error");
18065 int yysyntax_error_status;
18066 yysyntax_error_status = yysyntax_error (&yymsg_alloc, &yymsg, &yyctx, p);
18067 if (yysyntax_error_status == 0)
18068 yymsgp = yymsg;
18069 else if (yysyntax_error_status == -1)
18070 {
18071 if (yymsg != yymsgbuf)
18072 YYSTACK_FREE (yymsg);
18073 yymsg = YY_CAST (char *,
18074 YYSTACK_ALLOC (YY_CAST (YYSIZE_T, yymsg_alloc)));
18075 if (yymsg)
18076 {
18077 yysyntax_error_status
18078 = yysyntax_error (&yymsg_alloc, &yymsg, &yyctx, p);
18079 yymsgp = yymsg;
18080 }
18081 else
18082 {
18083 yymsg = yymsgbuf;
18084 yymsg_alloc = sizeof yymsgbuf;
18085 yysyntax_error_status = YYENOMEM;
18086 }
18087 }
18088 yyerror (&yylloc, p, yymsgp);
18089 if (yysyntax_error_status == YYENOMEM)
18090 YYNOMEM;
18091 }
18092 }
18093
18094 yyerror_range[1] = yylloc;
18095 if (yyerrstatus == 3)
18096 {
18097 /* If just tried and failed to reuse lookahead token after an
18098 error, discard it. */
18099
18100 if (yychar <= END_OF_INPUT)
18101 {
18102 /* Return failure if at end of input. */
18103 if (yychar == END_OF_INPUT)
18104 YYABORT;
18105 }
18106 else
18107 {
18108 yydestruct ("Error: discarding",
18109 yytoken, &yylval, &yylloc, p);
18110 yychar = YYEMPTY;
18111 }
18112 }
18113
18114 /* Else will try to reuse lookahead token after shifting the error
18115 token. */
18116 goto yyerrlab1;
18117
18118
18119/*---------------------------------------------------.
18120| yyerrorlab -- error raised explicitly by YYERROR. |
18121`---------------------------------------------------*/
18122yyerrorlab:
18123 /* Pacify compilers when the user code never invokes YYERROR and the
18124 label yyerrorlab therefore never appears in user code. */
18125 if (0)
18126 YYERROR;
18127 ++yynerrs;
18128
18129 /* Do not reclaim the symbols of the rule whose action triggered
18130 this YYERROR. */
18131 YYPOPSTACK (yylen);
18132 /* %after-pop-stack function. */
18133#line 2678 "parse.y"
18134 {after_pop_stack(yylen, p);}
18135#line 18136 "parse.c"
18136
18137 yylen = 0;
18138 YY_STACK_PRINT (yyss, yyssp, p);
18139 yystate = *yyssp;
18140 goto yyerrlab1;
18141
18142
18143/*-------------------------------------------------------------.
18144| yyerrlab1 -- common code for both syntax error and YYERROR. |
18145`-------------------------------------------------------------*/
18146yyerrlab1:
18147 yyerrstatus = 3; /* Each real token shifted decrements this. */
18148
18149 /* Pop stack until we find a state that shifts the error token. */
18150 for (;;)
18151 {
18152 yyn = yypact[yystate];
18153 if (!yypact_value_is_default (yyn))
18154 {
18155 yyn += YYSYMBOL_YYerror;
18156 if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror)
18157 {
18158 yyn = yytable[yyn];
18159 if (0 < yyn)
18160 break;
18161 }
18162 }
18163
18164 /* Pop the current state because it cannot handle the error token. */
18165 if (yyssp == yyss)
18166 YYABORT;
18167
18168 yyerror_range[1] = *yylsp;
18169 yydestruct ("Error: popping",
18170 YY_ACCESSING_SYMBOL (yystate), yyvsp, yylsp, p);
18171 YYPOPSTACK (1);
18172 /* %after-pop-stack function. */
18173#line 2678 "parse.y"
18174 {after_pop_stack(1, p);}
18175#line 18176 "parse.c"
18176
18177 yystate = *yyssp;
18178 YY_STACK_PRINT (yyss, yyssp, p);
18179 }
18180
18181 YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
18182 *++yyvsp = yylval;
18183 YY_IGNORE_MAYBE_UNINITIALIZED_END
18184
18185 yyerror_range[2] = yylloc;
18186 ++yylsp;
18187 YYLLOC_DEFAULT (*yylsp, yyerror_range, 2);
18188
18189 /* Shift the error token. */
18190 YY_SYMBOL_PRINT ("Shifting", YY_ACCESSING_SYMBOL (yyn), yyvsp, yylsp, p);
18191 /* %after-shift-error-token code. */
18192#line 2677 "parse.y"
18193 {after_shift_error_token(p);}
18194#line 18195 "parse.c"
18195
18196
18197 yystate = yyn;
18198 goto yynewstate;
18199
18200
18201/*-------------------------------------.
18202| yyacceptlab -- YYACCEPT comes here. |
18203`-------------------------------------*/
18204yyacceptlab:
18205 yyresult = 0;
18206 goto yyreturnlab;
18207
18208
18209/*-----------------------------------.
18210| yyabortlab -- YYABORT comes here. |
18211`-----------------------------------*/
18212yyabortlab:
18213 yyresult = 1;
18214 goto yyreturnlab;
18215
18216
18217/*-----------------------------------------------------------.
18218| yyexhaustedlab -- YYNOMEM (memory exhaustion) comes here. |
18219`-----------------------------------------------------------*/
18220yyexhaustedlab:
18221 yyerror (&yylloc, p, YY_("memory exhausted"));
18222 yyresult = 2;
18223 goto yyreturnlab;
18224
18225
18226/*----------------------------------------------------------.
18227| yyreturnlab -- parsing is finished, clean up and return. |
18228`----------------------------------------------------------*/
18229yyreturnlab:
18230 if (yychar != YYEMPTY)
18231 {
18232 /* Make sure we have latest lookahead translation. See comments at
18233 user semantic actions for why this is necessary. */
18234 yytoken = YYTRANSLATE (yychar);
18235 yydestruct ("Cleanup: discarding lookahead",
18236 yytoken, &yylval, &yylloc, p);
18237 }
18238 /* Do not reclaim the symbols of the rule whose action triggered
18239 this YYABORT or YYACCEPT. */
18240 YYPOPSTACK (yylen);
18241 YY_STACK_PRINT (yyss, yyssp, p);
18242 while (yyssp != yyss)
18243 {
18244 yydestruct ("Cleanup: popping",
18245 YY_ACCESSING_SYMBOL (+*yyssp), yyvsp, yylsp, p);
18246 YYPOPSTACK (1);
18247 }
18248#ifndef yyoverflow
18249 if (yyss != yyssa)
18250 YYSTACK_FREE (yyss);
18251#endif
18252 if (yymsg != yymsgbuf)
18253 YYSTACK_FREE (yymsg);
18254 return yyresult;
18255}
18256
18257#line 6792 "parse.y"
18258
18259# undef p
18260# undef yylex
18261# undef yylval
18262# define yylval (*p->lval)
18263
18264static int regx_options(struct parser_params*);
18265static int tokadd_string(struct parser_params*,int,int,int,long*,rb_encoding**,rb_encoding**);
18266static void tokaddmbc(struct parser_params *p, int c, rb_encoding *enc);
18267static enum yytokentype parse_string(struct parser_params*,rb_strterm_literal_t*);
18268static enum yytokentype here_document(struct parser_params*,rb_strterm_heredoc_t*);
18269
18270#define set_parser_s_value(x) (ifdef_ripper(p->s_value = (x), (void)0))
18271
18272# define set_yylval_node(x) { \
18273 YYLTYPE _cur_loc; \
18274 rb_parser_set_location(p, &_cur_loc); \
18275 yylval.node = (x); \
18276 set_parser_s_value(STR_NEW(p->lex.ptok, p->lex.pcur-p->lex.ptok)); \
18277}
18278# define set_yylval_str(x) \
18279do { \
18280 set_yylval_node(NEW_STR(x, &_cur_loc)); \
18281 set_parser_s_value(rb_str_new_mutable_parser_string(x)); \
18282} while(0)
18283# define set_yylval_num(x) { \
18284 yylval.num = (x); \
18285 set_parser_s_value(x); \
18286}
18287# define set_yylval_id(x) (yylval.id = (x))
18288# define set_yylval_name(x) { \
18289 (yylval.id = (x)); \
18290 set_parser_s_value(ID2SYM(x)); \
18291}
18292# define yylval_id() (yylval.id)
18293
18294#define set_yylval_noname() set_yylval_id(keyword_nil)
18295#define has_delayed_token(p) (p->delayed.token != NULL)
18296
18297#ifndef RIPPER
18298#define literal_flush(p, ptr) ((p)->lex.ptok = (ptr))
18299#define dispatch_scan_event(p, t) parser_dispatch_scan_event(p, t, __LINE__)
18300
18301static bool
18302parser_has_token(struct parser_params *p)
18303{
18304 const char *const pcur = p->lex.pcur;
18305 const char *const ptok = p->lex.ptok;
18306 if (p->keep_tokens && (pcur < ptok)) {
18307 rb_bug("lex.pcur < lex.ptok. (line: %d) %"PRIdPTRDIFF"|%"PRIdPTRDIFF"|%"PRIdPTRDIFF"",
18308 p->ruby_sourceline, ptok - p->lex.pbeg, pcur - ptok, p->lex.pend - pcur);
18309 }
18310 return pcur > ptok;
18311}
18312
18313static const char *
18314escaped_char(int c)
18315{
18316 switch (c) {
18317 case '"': return "\\\"";
18318 case '\\': return "\\\\";
18319 case '\0': return "\\0";
18320 case '\n': return "\\n";
18321 case '\r': return "\\r";
18322 case '\t': return "\\t";
18323 case '\f': return "\\f";
18324 case '\013': return "\\v";
18325 case '\010': return "\\b";
18326 case '\007': return "\\a";
18327 case '\033': return "\\e";
18328 case '\x7f': return "\\c?";
18329 }
18330 return NULL;
18331}
18332
18333static rb_parser_string_t *
18334rb_parser_str_escape(struct parser_params *p, rb_parser_string_t *str)
18335{
18336 rb_encoding *enc = p->enc;
18337 const char *ptr = str->ptr;
18338 const char *pend = ptr + str->len;
18339 const char *prev = ptr;
18340 char charbuf[5] = {'\\', 'x', 0, 0, 0};
18341 rb_parser_string_t * result = rb_parser_string_new(p, 0, 0);
18342
18343 while (ptr < pend) {
18344 unsigned int c;
18345 const char *cc;
18346 int n = rb_enc_precise_mbclen(ptr, pend, enc);
18347 if (!MBCLEN_CHARFOUND_P(n)) {
18348 if (ptr > prev) parser_str_cat(result, prev, ptr - prev);
18349 n = rb_enc_mbminlen(enc);
18350 if (pend < ptr + n)
18351 n = (int)(pend - ptr);
18352 while (n--) {
18353 c = *ptr & 0xf0 >> 4;
18354 charbuf[2] = (c < 10) ? '0' + c : 'A' + c - 10;
18355 c = *ptr & 0x0f;
18356 charbuf[3] = (c < 10) ? '0' + c : 'A' + c - 10;
18357 parser_str_cat(result, charbuf, 4);
18358 prev = ++ptr;
18359 }
18360 continue;
18361 }
18362 n = MBCLEN_CHARFOUND_LEN(n);
18363 c = rb_enc_mbc_to_codepoint(ptr, pend, enc);
18364 ptr += n;
18365 cc = escaped_char(c);
18366 if (cc) {
18367 if (ptr - n > prev) parser_str_cat(result, prev, ptr - n - prev);
18368 parser_str_cat_cstr(result, cc);
18369 prev = ptr;
18370 }
18371 else if (rb_enc_isascii(c, enc) && ISPRINT(c)) {
18372 }
18373 else {
18374 if (ptr - n > prev) {
18375 parser_str_cat(result, prev, ptr - n - prev);
18376 prev = ptr - n;
18377 }
18378 parser_str_cat(result, prev, ptr - prev);
18379 prev = ptr;
18380 }
18381 }
18382 if (ptr > prev) parser_str_cat(result, prev, ptr - prev);
18383
18384 return result;
18385}
18386
18387static void
18388parser_append_tokens(struct parser_params *p, rb_parser_string_t *str, enum yytokentype t, int line)
18389{
18390 rb_parser_ast_token_t *token = xcalloc(1, sizeof(rb_parser_ast_token_t));
18391 token->id = p->token_id;
18392 token->type_name = parser_token2char(p, t);
18393 token->str = str;
18394 token->loc.beg_pos = p->yylloc->beg_pos;
18395 token->loc.end_pos = p->yylloc->end_pos;
18396 rb_parser_ary_push_ast_token(p, p->tokens, token);
18397 p->token_id++;
18398
18399 if (p->debug) {
18400 rb_parser_string_t *str_escaped = rb_parser_str_escape(p, str);
18401 rb_parser_printf(p, "Append tokens (line: %d) [%d, :%s, \"%s\", [%d, %d, %d, %d]]\n",
18402 line, token->id, token->type_name, str_escaped->ptr,
18403 token->loc.beg_pos.lineno, token->loc.beg_pos.column,
18404 token->loc.end_pos.lineno, token->loc.end_pos.column);
18405 rb_parser_string_free(p, str_escaped);
18406 }
18407}
18408
18409static void
18410parser_dispatch_scan_event(struct parser_params *p, enum yytokentype t, int line)
18411{
18412 debug_token_line(p, "parser_dispatch_scan_event", line);
18413
18414 if (!parser_has_token(p)) return;
18415
18416 RUBY_SET_YYLLOC(*p->yylloc);
18417
18418 if (p->keep_tokens) {
18419 rb_parser_string_t *str = rb_parser_encoding_string_new(p, p->lex.ptok, p->lex.pcur - p->lex.ptok, p->enc);
18420 parser_append_tokens(p, str, t, line);
18421 }
18422
18423 token_flush(p);
18424}
18425
18426#define dispatch_delayed_token(p, t) parser_dispatch_delayed_token(p, t, __LINE__)
18427static void
18428parser_dispatch_delayed_token(struct parser_params *p, enum yytokentype t, int line)
18429{
18430 debug_token_line(p, "parser_dispatch_delayed_token", line);
18431
18432 if (!has_delayed_token(p)) return;
18433
18434 RUBY_SET_YYLLOC_OF_DELAYED_TOKEN(*p->yylloc);
18435
18436 if (p->keep_tokens) {
18437 /* p->delayed.token is freed by rb_parser_tokens_free */
18438 parser_append_tokens(p, p->delayed.token, t, line);
18439 }
18440 else {
18441 rb_parser_string_free(p, p->delayed.token);
18442 }
18443
18444 p->delayed.token = NULL;
18445}
18446#else
18447#define literal_flush(p, ptr) ((void)(ptr))
18448
18449static int
18450ripper_has_scan_event(struct parser_params *p)
18451{
18452 if (p->lex.pcur < p->lex.ptok) rb_raise(rb_eRuntimeError, "lex.pcur < lex.ptok");
18453 return p->lex.pcur > p->lex.ptok;
18454}
18455
18456static VALUE
18457ripper_scan_event_val(struct parser_params *p, enum yytokentype t)
18458{
18459 VALUE str = STR_NEW(p->lex.ptok, p->lex.pcur - p->lex.ptok);
18460 VALUE rval = ripper_dispatch1(p, ripper_token2eventid(t), str);
18461 RUBY_SET_YYLLOC(*p->yylloc);
18462 token_flush(p);
18463 return rval;
18464}
18465
18466static void
18467ripper_dispatch_scan_event(struct parser_params *p, enum yytokentype t)
18468{
18469 if (!ripper_has_scan_event(p)) return;
18470
18471 set_parser_s_value(ripper_scan_event_val(p, t));
18472}
18473#define dispatch_scan_event(p, t) ripper_dispatch_scan_event(p, t)
18474
18475static void
18476ripper_dispatch_delayed_token(struct parser_params *p, enum yytokentype t)
18477{
18478 /* save and adjust the location to delayed token for callbacks */
18479 int saved_line = p->ruby_sourceline;
18480 const char *saved_tokp = p->lex.ptok;
18481 VALUE s_value, str;
18482
18483 if (!has_delayed_token(p)) return;
18484 p->ruby_sourceline = p->delayed.beg_line;
18485 p->lex.ptok = p->lex.pbeg + p->delayed.beg_col;
18486 str = rb_str_new_mutable_parser_string(p->delayed.token);
18487 rb_parser_string_free(p, p->delayed.token);
18488 s_value = ripper_dispatch1(p, ripper_token2eventid(t), str);
18489 set_parser_s_value(s_value);
18490 p->delayed.token = NULL;
18491 p->ruby_sourceline = saved_line;
18492 p->lex.ptok = saved_tokp;
18493}
18494#define dispatch_delayed_token(p, t) ripper_dispatch_delayed_token(p, t)
18495#endif /* RIPPER */
18496
18497static inline int
18498is_identchar(struct parser_params *p, const char *ptr, const char *MAYBE_UNUSED(ptr_end), rb_encoding *enc)
18499{
18500 return rb_enc_isalnum((unsigned char)*ptr, enc) || *ptr == '_' || !ISASCII(*ptr);
18501}
18502
18503static inline bool
18504peek_word_at(struct parser_params *p, const char *str, size_t len, int at)
18505{
18506 const char *ptr = p->lex.pcur + at;
18507 if (lex_eol_ptr_n_p(p, ptr, len-1)) return false;
18508 if (memcmp(ptr, str, len)) return false;
18509 if (lex_eol_ptr_n_p(p, ptr, len)) return true;
18510 switch (ptr[len]) {
18511 case '!': case '?': return false;
18512 }
18513 return !is_identchar(p, ptr+len, p->lex.pend, p->enc);
18514}
18515
18516static inline int
18517parser_is_identchar(struct parser_params *p)
18518{
18519 return !(p)->eofp && is_identchar(p, p->lex.pcur-1, p->lex.pend, p->enc);
18520}
18521
18522static inline int
18523parser_isascii(struct parser_params *p)
18524{
18525 return ISASCII(*(p->lex.pcur-1));
18526}
18527
18528static void
18529token_info_setup(token_info *ptinfo, const char *ptr, const rb_code_location_t *loc)
18530{
18531 int column = 1, nonspc = 0, i;
18532 for (i = 0; i < loc->beg_pos.column; i++, ptr++) {
18533 if (*ptr == '\t') {
18534 column = (((column - 1) / TAB_WIDTH) + 1) * TAB_WIDTH;
18535 }
18536 column++;
18537 if (*ptr != ' ' && *ptr != '\t') {
18538 nonspc = 1;
18539 }
18540 }
18541
18542 ptinfo->beg = loc->beg_pos;
18543 ptinfo->indent = column;
18544 ptinfo->nonspc = nonspc;
18545}
18546
18547static void
18548token_info_push(struct parser_params *p, const char *token, const rb_code_location_t *loc)
18549{
18550 token_info *ptinfo;
18551
18552 if (!p->token_info_enabled) return;
18553 ptinfo = ALLOC(token_info);
18554 ptinfo->token = token;
18555 ptinfo->next = p->token_info;
18556 token_info_setup(ptinfo, p->lex.pbeg, loc);
18557
18558 p->token_info = ptinfo;
18559}
18560
18561static void
18562token_info_pop(struct parser_params *p, const char *token, const rb_code_location_t *loc)
18563{
18564 token_info *ptinfo_beg = p->token_info;
18565
18566 if (!ptinfo_beg) return;
18567
18568 /* indentation check of matched keywords (begin..end, if..end, etc.) */
18569 token_info_warn(p, token, ptinfo_beg, 1, loc);
18570
18571 p->token_info = ptinfo_beg->next;
18572 ruby_sized_xfree(ptinfo_beg, sizeof(*ptinfo_beg));
18573}
18574
18575static void
18576token_info_drop(struct parser_params *p, const char *token, rb_code_position_t beg_pos)
18577{
18578 token_info *ptinfo_beg = p->token_info;
18579
18580 if (!ptinfo_beg) return;
18581 p->token_info = ptinfo_beg->next;
18582
18583 if (ptinfo_beg->beg.lineno != beg_pos.lineno ||
18584 ptinfo_beg->beg.column != beg_pos.column ||
18585 strcmp(ptinfo_beg->token, token)) {
18586 compile_error(p, "token position mismatch: %d:%d:%s expected but %d:%d:%s",
18587 beg_pos.lineno, beg_pos.column, token,
18588 ptinfo_beg->beg.lineno, ptinfo_beg->beg.column,
18589 ptinfo_beg->token);
18590 }
18591
18592 ruby_sized_xfree(ptinfo_beg, sizeof(*ptinfo_beg));
18593}
18594
18595static void
18596token_info_warn(struct parser_params *p, const char *token, token_info *ptinfo_beg, int same, const rb_code_location_t *loc)
18597{
18598 token_info ptinfo_end_body, *ptinfo_end = &ptinfo_end_body;
18599 if (!p->token_info_enabled) return;
18600 if (!ptinfo_beg) return;
18601 token_info_setup(ptinfo_end, p->lex.pbeg, loc);
18602 if (ptinfo_beg->beg.lineno == ptinfo_end->beg.lineno) return; /* ignore one-line block */
18603 if (ptinfo_beg->nonspc || ptinfo_end->nonspc) return; /* ignore keyword in the middle of a line */
18604 if (ptinfo_beg->indent == ptinfo_end->indent) return; /* the indents are matched */
18605 if (!same && ptinfo_beg->indent < ptinfo_end->indent) return;
18606 rb_warn3L(ptinfo_end->beg.lineno,
18607 "mismatched indentations at '%s' with '%s' at %d",
18608 WARN_S(token), WARN_S(ptinfo_beg->token), WARN_I(ptinfo_beg->beg.lineno));
18609}
18610
18611static int
18612parser_precise_mbclen(struct parser_params *p, const char *ptr)
18613{
18614 int len = rb_enc_precise_mbclen(ptr, p->lex.pend, p->enc);
18615 if (!MBCLEN_CHARFOUND_P(len)) {
18616 compile_error(p, "invalid multibyte char (%s)", rb_enc_name(p->enc));
18617 return -1;
18618 }
18619 return len;
18620}
18621
18622#ifndef RIPPER
18623static inline void
18624parser_show_error_line(struct parser_params *p, const YYLTYPE *yylloc)
18625{
18626 rb_parser_string_t *str;
18627 int lineno = p->ruby_sourceline;
18628 if (!yylloc) {
18629 return;
18630 }
18631 else if (yylloc->beg_pos.lineno == lineno) {
18632 str = p->lex.lastline;
18633 }
18634 else {
18635 return;
18636 }
18637 ruby_show_error_line(p, p->error_buffer, yylloc, lineno, str);
18638}
18639
18640static int
18641parser_yyerror(struct parser_params *p, const rb_code_location_t *yylloc, const char *msg)
18642{
18643#if 0
18644 YYLTYPE current;
18645
18646 if (!yylloc) {
18647 yylloc = RUBY_SET_YYLLOC(current);
18648 }
18649 else if ((p->ruby_sourceline != yylloc->beg_pos.lineno &&
18650 p->ruby_sourceline != yylloc->end_pos.lineno)) {
18651 yylloc = 0;
18652 }
18653#endif
18654 parser_compile_error(p, yylloc, "%s", msg);
18655 parser_show_error_line(p, yylloc);
18656 return 0;
18657}
18658
18659static int
18660parser_yyerror0(struct parser_params *p, const char *msg)
18661{
18662 YYLTYPE current;
18663 return parser_yyerror(p, RUBY_SET_YYLLOC(current), msg);
18664}
18665
18666void
18667ruby_show_error_line(struct parser_params *p, VALUE errbuf, const YYLTYPE *yylloc, int lineno, rb_parser_string_t *str)
18668{
18669 VALUE mesg;
18670 const int max_line_margin = 30;
18671 const char *ptr, *ptr_end, *pt, *pb;
18672 const char *pre = "", *post = "", *pend;
18673 const char *code = "", *caret = "";
18674 const char *lim;
18675 const char *const pbeg = PARSER_STRING_PTR(str);
18676 char *buf;
18677 long len;
18678 int i;
18679
18680 if (!yylloc) return;
18681 pend = rb_parser_string_end(str);
18682 if (pend > pbeg && pend[-1] == '\n') {
18683 if (--pend > pbeg && pend[-1] == '\r') --pend;
18684 }
18685
18686 pt = pend;
18687 if (lineno == yylloc->end_pos.lineno &&
18688 (pend - pbeg) > yylloc->end_pos.column) {
18689 pt = pbeg + yylloc->end_pos.column;
18690 }
18691
18692 ptr = ptr_end = pt;
18693 lim = ptr - pbeg > max_line_margin ? ptr - max_line_margin : pbeg;
18694 while ((lim < ptr) && (*(ptr-1) != '\n')) ptr--;
18695
18696 lim = pend - ptr_end > max_line_margin ? ptr_end + max_line_margin : pend;
18697 while ((ptr_end < lim) && (*ptr_end != '\n') && (*ptr_end != '\r')) ptr_end++;
18698
18699 len = ptr_end - ptr;
18700 if (len > 4) {
18701 if (ptr > pbeg) {
18702 ptr = rb_enc_prev_char(pbeg, ptr, pt, rb_parser_str_get_encoding(str));
18703 if (ptr > pbeg) pre = "...";
18704 }
18705 if (ptr_end < pend) {
18706 ptr_end = rb_enc_prev_char(pt, ptr_end, pend, rb_parser_str_get_encoding(str));
18707 if (ptr_end < pend) post = "...";
18708 }
18709 }
18710 pb = pbeg;
18711 if (lineno == yylloc->beg_pos.lineno) {
18712 pb += yylloc->beg_pos.column;
18713 if (pb > pt) pb = pt;
18714 }
18715 if (pb < ptr) pb = ptr;
18716 if (len <= 4 && yylloc->beg_pos.lineno == yylloc->end_pos.lineno) {
18717 return;
18718 }
18719 if (RTEST(errbuf)) {
18720 mesg = rb_attr_get(errbuf, idMesg);
18721 if (char_at_end(p, mesg, '\n') != '\n')
18722 rb_str_cat_cstr(mesg, "\n");
18723 }
18724 else {
18725 mesg = rb_enc_str_new(0, 0, rb_parser_str_get_encoding(str));
18726 }
18727 if (!errbuf && rb_stderr_tty_p()) {
18728#define CSI_BEGIN "\033["
18729#define CSI_SGR "m"
18730 rb_str_catf(mesg,
18731 CSI_BEGIN""CSI_SGR"%s" /* pre */
18732 CSI_BEGIN"1"CSI_SGR"%.*s"
18733 CSI_BEGIN"1;4"CSI_SGR"%.*s"
18734 CSI_BEGIN";1"CSI_SGR"%.*s"
18735 CSI_BEGIN""CSI_SGR"%s" /* post */
18736 "\n",
18737 pre,
18738 (int)(pb - ptr), ptr,
18739 (int)(pt - pb), pb,
18740 (int)(ptr_end - pt), pt,
18741 post);
18742 }
18743 else {
18744 char *p2;
18745
18746 len = ptr_end - ptr;
18747 lim = pt < pend ? pt : pend;
18748 i = (int)(lim - ptr);
18749 buf = ALLOCA_N(char, i+2);
18750 code = ptr;
18751 caret = p2 = buf;
18752 if (ptr <= pb) {
18753 while (ptr < pb) {
18754 *p2++ = *ptr++ == '\t' ? '\t' : ' ';
18755 }
18756 *p2++ = '^';
18757 ptr++;
18758 }
18759 if (lim > ptr) {
18760 memset(p2, '~', (lim - ptr));
18761 p2 += (lim - ptr);
18762 }
18763 *p2 = '\0';
18764 rb_str_catf(mesg, "%s%.*s%s\n""%s%s\n",
18765 pre, (int)len, code, post,
18766 pre, caret);
18767 }
18768 if (!errbuf) rb_write_error_str(mesg);
18769}
18770#else
18771
18772static int
18773parser_yyerror(struct parser_params *p, const YYLTYPE *yylloc, const char *msg)
18774{
18775 const char *pcur = 0, *ptok = 0;
18776 if (p->ruby_sourceline == yylloc->beg_pos.lineno &&
18777 p->ruby_sourceline == yylloc->end_pos.lineno) {
18778 pcur = p->lex.pcur;
18779 ptok = p->lex.ptok;
18780 p->lex.ptok = p->lex.pbeg + yylloc->beg_pos.column;
18781 p->lex.pcur = p->lex.pbeg + yylloc->end_pos.column;
18782 }
18783 parser_yyerror0(p, msg);
18784 if (pcur) {
18785 p->lex.ptok = ptok;
18786 p->lex.pcur = pcur;
18787 }
18788 return 0;
18789}
18790
18791static int
18792parser_yyerror0(struct parser_params *p, const char *msg)
18793{
18794 dispatch1(parse_error, STR_NEW2(msg));
18795 ripper_error(p);
18796 return 0;
18797}
18798
18799static inline void
18800parser_show_error_line(struct parser_params *p, const YYLTYPE *yylloc)
18801{
18802}
18803#endif /* !RIPPER */
18804
18805static int
18806vtable_size(const struct vtable *tbl)
18807{
18808 if (!DVARS_TERMINAL_P(tbl)) {
18809 return tbl->pos;
18810 }
18811 else {
18812 return 0;
18813 }
18814}
18815
18816static struct vtable *
18817vtable_alloc_gen(struct parser_params *p, int line, struct vtable *prev)
18818{
18819 struct vtable *tbl = ALLOC(struct vtable);
18820 tbl->pos = 0;
18821 tbl->capa = 8;
18822 tbl->tbl = ALLOC_N(ID, tbl->capa);
18823 tbl->prev = prev;
18824#ifndef RIPPER
18825 if (p->debug) {
18826 rb_parser_printf(p, "vtable_alloc:%d: %p\n", line, (void *)tbl);
18827 }
18828#endif
18829 return tbl;
18830}
18831#define vtable_alloc(prev) vtable_alloc_gen(p, __LINE__, prev)
18832
18833static void
18834vtable_free_gen(struct parser_params *p, int line, const char *name,
18835 struct vtable *tbl)
18836{
18837#ifndef RIPPER
18838 if (p->debug) {
18839 rb_parser_printf(p, "vtable_free:%d: %s(%p)\n", line, name, (void *)tbl);
18840 }
18841#endif
18842 if (!DVARS_TERMINAL_P(tbl)) {
18843 if (tbl->tbl) {
18844 ruby_sized_xfree(tbl->tbl, tbl->capa * sizeof(ID));
18845 }
18846 ruby_sized_xfree(tbl, sizeof(*tbl));
18847 }
18848}
18849#define vtable_free(tbl) vtable_free_gen(p, __LINE__, #tbl, tbl)
18850
18851static void
18852vtable_add_gen(struct parser_params *p, int line, const char *name,
18853 struct vtable *tbl, ID id)
18854{
18855#ifndef RIPPER
18856 if (p->debug) {
18857 rb_parser_printf(p, "vtable_add:%d: %s(%p), %s\n",
18858 line, name, (void *)tbl, rb_id2name(id));
18859 }
18860#endif
18861 if (DVARS_TERMINAL_P(tbl)) {
18862 rb_parser_fatal(p, "vtable_add: vtable is not allocated (%p)", (void *)tbl);
18863 return;
18864 }
18865 if (tbl->pos == tbl->capa) {
18866 tbl->capa = tbl->capa * 2;
18867 SIZED_REALLOC_N(tbl->tbl, ID, tbl->capa, tbl->pos);
18868 }
18869 tbl->tbl[tbl->pos++] = id;
18870}
18871#define vtable_add(tbl, id) vtable_add_gen(p, __LINE__, #tbl, tbl, id)
18872
18873static void
18874vtable_pop_gen(struct parser_params *p, int line, const char *name,
18875 struct vtable *tbl, int n)
18876{
18877 if (p->debug) {
18878 rb_parser_printf(p, "vtable_pop:%d: %s(%p), %d\n",
18879 line, name, (void *)tbl, n);
18880 }
18881 if (tbl->pos < n) {
18882 rb_parser_fatal(p, "vtable_pop: unreachable (%d < %d)", tbl->pos, n);
18883 return;
18884 }
18885 tbl->pos -= n;
18886}
18887#define vtable_pop(tbl, n) vtable_pop_gen(p, __LINE__, #tbl, tbl, n)
18888
18889static int
18890vtable_included(const struct vtable * tbl, ID id)
18891{
18892 int i;
18893
18894 if (!DVARS_TERMINAL_P(tbl)) {
18895 for (i = 0; i < tbl->pos; i++) {
18896 if (tbl->tbl[i] == id) {
18897 return i+1;
18898 }
18899 }
18900 }
18901 return 0;
18902}
18903
18904static void parser_prepare(struct parser_params *p);
18905
18906static int
18907e_option_supplied(struct parser_params *p)
18908{
18909 return strcmp(p->ruby_sourcefile, "-e") == 0;
18910}
18911
18912#ifndef RIPPER
18913static NODE *parser_append_options(struct parser_params *p, NODE *node);
18914
18915static VALUE
18916yycompile0(VALUE arg)
18917{
18918 int n;
18919 NODE *tree;
18920 struct parser_params *p = (struct parser_params *)arg;
18921 int cov = FALSE;
18922
18923 if (!compile_for_eval && !NIL_P(p->ruby_sourcefile_string) && !e_option_supplied(p)) {
18924 cov = TRUE;
18925 }
18926
18927 if (p->debug_lines) {
18928 p->ast->body.script_lines = p->debug_lines;
18929 }
18930
18931 parser_prepare(p);
18932#define RUBY_DTRACE_PARSE_HOOK(name) \
18933 if (RUBY_DTRACE_PARSE_##name##_ENABLED()) { \
18934 RUBY_DTRACE_PARSE_##name(p->ruby_sourcefile, p->ruby_sourceline); \
18935 }
18936 RUBY_DTRACE_PARSE_HOOK(BEGIN);
18937 n = yyparse(p);
18938 RUBY_DTRACE_PARSE_HOOK(END);
18939
18940 p->debug_lines = 0;
18941
18942 xfree(p->lex.strterm);
18943 p->lex.strterm = 0;
18944 p->lex.pcur = p->lex.pbeg = p->lex.pend = 0;
18945 if (n || p->error_p) {
18946 VALUE mesg = p->error_buffer;
18947 if (!mesg) {
18948 mesg = syntax_error_new();
18949 }
18950 if (!p->error_tolerant) {
18951 rb_set_errinfo(mesg);
18952 return FALSE;
18953 }
18954 }
18955 tree = p->eval_tree;
18956 if (!tree) {
18957 tree = NEW_NIL(&NULL_LOC);
18958 }
18959 else {
18960 rb_parser_ary_t *tokens = p->tokens;
18961 NODE *prelude;
18962 NODE *body = parser_append_options(p, RNODE_SCOPE(tree)->nd_body);
18963 prelude = block_append(p, p->eval_tree_begin, body);
18964 RNODE_SCOPE(tree)->nd_body = prelude;
18965 p->ast->body.frozen_string_literal = p->frozen_string_literal;
18966 p->ast->body.coverage_enabled = cov;
18967 if (p->keep_tokens) {
18968 p->ast->node_buffer->tokens = tokens;
18969 p->tokens = NULL;
18970 }
18971 }
18972 p->ast->body.root = tree;
18973 p->ast->body.line_count = p->line_count;
18974 return TRUE;
18975}
18976
18977static rb_ast_t *
18978yycompile(struct parser_params *p, VALUE fname, int line)
18979{
18980 rb_ast_t *ast;
18981 if (NIL_P(fname)) {
18982 p->ruby_sourcefile_string = Qnil;
18983 p->ruby_sourcefile = "(none)";
18984 }
18985 else {
18986 p->ruby_sourcefile_string = rb_str_to_interned_str(fname);
18987 p->ruby_sourcefile = StringValueCStr(fname);
18988 }
18989 p->ruby_sourceline = line - 1;
18990
18991 p->lvtbl = NULL;
18992
18993 p->ast = ast = rb_ast_new();
18994 compile_callback(yycompile0, (VALUE)p);
18995 p->ast = 0;
18996
18997 while (p->lvtbl) {
18998 local_pop(p);
18999 }
19000
19001 return ast;
19002}
19003#endif /* !RIPPER */
19004
19005static rb_encoding *
19006must_be_ascii_compatible(struct parser_params *p, rb_parser_string_t *s)
19007{
19008 rb_encoding *enc = rb_parser_str_get_encoding(s);
19009 if (!rb_enc_asciicompat(enc)) {
19010 rb_raise(rb_eArgError, "invalid source encoding");
19011 }
19012 return enc;
19013}
19014
19015static rb_parser_string_t *
19016lex_getline(struct parser_params *p)
19017{
19018 rb_parser_string_t *line = (*p->lex.gets)(p, p->lex.input, p->line_count);
19019 if (!line) return 0;
19020 p->line_count++;
19021 string_buffer_append(p, line);
19022 must_be_ascii_compatible(p, line);
19023 return line;
19024}
19025
19026#ifndef RIPPER
19027rb_ast_t*
19028rb_parser_compile(rb_parser_t *p, rb_parser_lex_gets_func *gets, VALUE fname, rb_parser_input_data input, int line)
19029{
19030 p->lex.gets = gets;
19031 p->lex.input = input;
19032 p->lex.pbeg = p->lex.pcur = p->lex.pend = 0;
19033
19034 return yycompile(p, fname, line);
19035}
19036#endif /* !RIPPER */
19037
19038#define STR_FUNC_ESCAPE 0x01
19039#define STR_FUNC_EXPAND 0x02
19040#define STR_FUNC_REGEXP 0x04
19041#define STR_FUNC_QWORDS 0x08
19042#define STR_FUNC_SYMBOL 0x10
19043#define STR_FUNC_INDENT 0x20
19044#define STR_FUNC_LABEL 0x40
19045#define STR_FUNC_LIST 0x4000
19046#define STR_FUNC_TERM 0x8000
19047
19048enum string_type {
19049 str_label = STR_FUNC_LABEL,
19050 str_squote = (0),
19051 str_dquote = (STR_FUNC_EXPAND),
19052 str_xquote = (STR_FUNC_EXPAND),
19053 str_regexp = (STR_FUNC_REGEXP|STR_FUNC_ESCAPE|STR_FUNC_EXPAND),
19054 str_sword = (STR_FUNC_QWORDS|STR_FUNC_LIST),
19055 str_dword = (STR_FUNC_QWORDS|STR_FUNC_EXPAND|STR_FUNC_LIST),
19056 str_ssym = (STR_FUNC_SYMBOL),
19057 str_dsym = (STR_FUNC_SYMBOL|STR_FUNC_EXPAND)
19058};
19059
19060static rb_parser_string_t *
19061parser_str_new(struct parser_params *p, const char *ptr, long len, rb_encoding *enc, int func, rb_encoding *enc0)
19062{
19063 rb_parser_string_t *pstr;
19064
19065 pstr = rb_parser_encoding_string_new(p, ptr, len, enc);
19066
19067 if (!(func & STR_FUNC_REGEXP)) {
19068 if (rb_parser_is_ascii_string(p, pstr)) {
19069 }
19070 else if (rb_is_usascii_enc((void *)enc0) && enc != rb_utf8_encoding()) {
19071 /* everything is valid in ASCII-8BIT */
19072 enc = rb_ascii8bit_encoding();
19073 PARSER_ENCODING_CODERANGE_SET(pstr, enc, RB_PARSER_ENC_CODERANGE_VALID);
19074 }
19075 }
19076
19077 return pstr;
19078}
19079
19080static int
19081strterm_is_heredoc(rb_strterm_t *strterm)
19082{
19083 return strterm->heredoc;
19084}
19085
19086static rb_strterm_t *
19087new_strterm(struct parser_params *p, int func, int term, int paren)
19088{
19089 rb_strterm_t *strterm = ZALLOC(rb_strterm_t);
19090 strterm->u.literal.func = func;
19091 strterm->u.literal.term = term;
19092 strterm->u.literal.paren = paren;
19093 return strterm;
19094}
19095
19096static rb_strterm_t *
19097new_heredoc(struct parser_params *p)
19098{
19099 rb_strterm_t *strterm = ZALLOC(rb_strterm_t);
19100 strterm->heredoc = true;
19101 return strterm;
19102}
19103
19104#define peek(p,c) peek_n(p, (c), 0)
19105#define peek_n(p,c,n) (!lex_eol_n_p(p, n) && (c) == (unsigned char)(p)->lex.pcur[n])
19106#define peekc(p) peekc_n(p, 0)
19107#define peekc_n(p,n) (lex_eol_n_p(p, n) ? -1 : (unsigned char)(p)->lex.pcur[n])
19108
19109#define add_delayed_token(p, tok, end) parser_add_delayed_token(p, tok, end, __LINE__)
19110static void
19111parser_add_delayed_token(struct parser_params *p, const char *tok, const char *end, int line)
19112{
19113 debug_token_line(p, "add_delayed_token", line);
19114
19115 if (tok < end) {
19116 if (has_delayed_token(p)) {
19117 bool next_line = parser_string_char_at_end(p, p->delayed.token, 0) == '\n';
19118 int end_line = (next_line ? 1 : 0) + p->delayed.end_line;
19119 int end_col = (next_line ? 0 : p->delayed.end_col);
19120 if (end_line != p->ruby_sourceline || end_col != tok - p->lex.pbeg) {
19121 dispatch_delayed_token(p, tSTRING_CONTENT);
19122 }
19123 }
19124 if (!has_delayed_token(p)) {
19125 p->delayed.token = rb_parser_string_new(p, 0, 0);
19126 rb_parser_enc_associate(p, p->delayed.token, p->enc);
19127 p->delayed.beg_line = p->ruby_sourceline;
19128 p->delayed.beg_col = rb_long2int(tok - p->lex.pbeg);
19129 }
19130 parser_str_cat(p->delayed.token, tok, end - tok);
19131 p->delayed.end_line = p->ruby_sourceline;
19132 p->delayed.end_col = rb_long2int(end - p->lex.pbeg);
19133 p->lex.ptok = end;
19134 }
19135}
19136
19137static void
19138set_lastline(struct parser_params *p, rb_parser_string_t *str)
19139{
19140 p->lex.pbeg = p->lex.pcur = PARSER_STRING_PTR(str);
19141 p->lex.pend = p->lex.pcur + PARSER_STRING_LEN(str);
19142 p->lex.lastline = str;
19143}
19144
19145static int
19146nextline(struct parser_params *p, int set_encoding)
19147{
19148 rb_parser_string_t *str = p->lex.nextline;
19149 p->lex.nextline = 0;
19150 if (!str) {
19151 if (p->eofp)
19152 return -1;
19153
19154 if (!lex_eol_ptr_p(p, p->lex.pbeg) && *(p->lex.pend-1) != '\n') {
19155 goto end_of_input;
19156 }
19157
19158 if (!p->lex.input || !(str = lex_getline(p))) {
19159 end_of_input:
19160 p->eofp = 1;
19161 lex_goto_eol(p);
19162 return -1;
19163 }
19164#ifndef RIPPER
19165 if (p->debug_lines) {
19166 if (set_encoding) rb_parser_enc_associate(p, str, p->enc);
19167 rb_parser_string_t *copy = rb_parser_string_deep_copy(p, str);
19168 rb_parser_ary_push_script_line(p, p->debug_lines, copy);
19169 }
19170#endif
19171 p->cr_seen = FALSE;
19172 }
19173 else if (str == AFTER_HEREDOC_WITHOUT_TERMINATOR) {
19174 /* after here-document without terminator */
19175 goto end_of_input;
19176 }
19177 add_delayed_token(p, p->lex.ptok, p->lex.pend);
19178 if (p->heredoc_end > 0) {
19179 p->ruby_sourceline = p->heredoc_end;
19180 p->heredoc_end = 0;
19181 }
19182 p->ruby_sourceline++;
19183 set_lastline(p, str);
19184 token_flush(p);
19185 return 0;
19186}
19187
19188static int
19189parser_cr(struct parser_params *p, int c)
19190{
19191 if (peek(p, '\n')) {
19192 p->lex.pcur++;
19193 c = '\n';
19194 }
19195 return c;
19196}
19197
19198static inline int
19199nextc0(struct parser_params *p, int set_encoding)
19200{
19201 int c;
19202
19203 if (UNLIKELY(lex_eol_p(p) || p->eofp || p->lex.nextline > AFTER_HEREDOC_WITHOUT_TERMINATOR)) {
19204 if (nextline(p, set_encoding)) return -1;
19205 }
19206 c = (unsigned char)*p->lex.pcur++;
19207 if (UNLIKELY(c == '\r')) {
19208 c = parser_cr(p, c);
19209 }
19210
19211 return c;
19212}
19213#define nextc(p) nextc0(p, TRUE)
19214
19215static void
19216pushback(struct parser_params *p, int c)
19217{
19218 if (c == -1) return;
19219 p->eofp = 0;
19220 p->lex.pcur--;
19221 if (p->lex.pcur > p->lex.pbeg && p->lex.pcur[0] == '\n' && p->lex.pcur[-1] == '\r') {
19222 p->lex.pcur--;
19223 }
19224}
19225
19226#define was_bol(p) ((p)->lex.pcur == (p)->lex.pbeg + 1)
19227
19228#define tokfix(p) ((p)->tokenbuf[(p)->tokidx]='\0')
19229#define tok(p) (p)->tokenbuf
19230#define toklen(p) (p)->tokidx
19231
19232static int
19233looking_at_eol_p(struct parser_params *p)
19234{
19235 const char *ptr = p->lex.pcur;
19236 while (!lex_eol_ptr_p(p, ptr)) {
19237 int c = (unsigned char)*ptr++;
19238 int eol = (c == '\n' || c == '#');
19239 if (eol || !ISSPACE(c)) {
19240 return eol;
19241 }
19242 }
19243 return TRUE;
19244}
19245
19246static char*
19247newtok(struct parser_params *p)
19248{
19249 p->tokidx = 0;
19250 if (!p->tokenbuf) {
19251 p->toksiz = 60;
19252 p->tokenbuf = ALLOC_N(char, 60);
19253 }
19254 if (p->toksiz > 4096) {
19255 p->toksiz = 60;
19256 REALLOC_N(p->tokenbuf, char, 60);
19257 }
19258 return p->tokenbuf;
19259}
19260
19261static char *
19262tokspace(struct parser_params *p, int n)
19263{
19264 p->tokidx += n;
19265
19266 if (p->tokidx >= p->toksiz) {
19267 do {p->toksiz *= 2;} while (p->toksiz <= p->tokidx);
19268 REALLOC_N(p->tokenbuf, char, p->toksiz);
19269 }
19270 return &p->tokenbuf[p->tokidx-n];
19271}
19272
19273static void
19274tokadd(struct parser_params *p, int c)
19275{
19276 p->tokenbuf[p->tokidx++] = (char)c;
19277 if (p->tokidx >= p->toksiz) {
19278 p->toksiz *= 2;
19279 REALLOC_N(p->tokenbuf, char, p->toksiz);
19280 }
19281}
19282
19283static int
19284tok_hex(struct parser_params *p, size_t *numlen)
19285{
19286 int c;
19287
19288 c = (int)ruby_scan_hex(p->lex.pcur, 2, numlen);
19289 if (!*numlen) {
19290 flush_string_content(p, p->enc, rb_strlen_lit("\\x"));
19291 yyerror0("invalid hex escape");
19292 dispatch_scan_event(p, tSTRING_CONTENT);
19293 return 0;
19294 }
19295 p->lex.pcur += *numlen;
19296 return c;
19297}
19298
19299#define tokcopy(p, n) memcpy(tokspace(p, n), (p)->lex.pcur - (n), (n))
19300
19301static int
19302escaped_control_code(int c)
19303{
19304 int c2 = 0;
19305 switch (c) {
19306 case ' ':
19307 c2 = 's';
19308 break;
19309 case '\n':
19310 c2 = 'n';
19311 break;
19312 case '\t':
19313 c2 = 't';
19314 break;
19315 case '\v':
19316 c2 = 'v';
19317 break;
19318 case '\r':
19319 c2 = 'r';
19320 break;
19321 case '\f':
19322 c2 = 'f';
19323 break;
19324 }
19325 return c2;
19326}
19327
19328#define WARN_SPACE_CHAR(c, prefix) \
19329 rb_warn1("invalid character syntax; use "prefix"\\%c", WARN_I(c))
19330
19331static int
19332tokadd_codepoint(struct parser_params *p, rb_encoding **encp,
19333 int regexp_literal, const char *begin)
19334{
19335 const int wide = !begin;
19336 size_t numlen;
19337 int codepoint = (int)ruby_scan_hex(p->lex.pcur, wide ? p->lex.pend - p->lex.pcur : 4, &numlen);
19338
19339 p->lex.pcur += numlen;
19340 if (p->lex.strterm == NULL ||
19341 strterm_is_heredoc(p->lex.strterm) ||
19342 (p->lex.strterm->u.literal.func != str_regexp)) {
19343 if (!begin) begin = p->lex.pcur;
19344 if (wide ? (numlen == 0 || numlen > 6) : (numlen < 4)) {
19345 flush_string_content(p, rb_utf8_encoding(), p->lex.pcur - begin);
19346 yyerror0("invalid Unicode escape");
19347 dispatch_scan_event(p, tSTRING_CONTENT);
19348 return wide && numlen > 0;
19349 }
19350 if (codepoint > 0x10ffff) {
19351 flush_string_content(p, rb_utf8_encoding(), p->lex.pcur - begin);
19352 yyerror0("invalid Unicode codepoint (too large)");
19353 dispatch_scan_event(p, tSTRING_CONTENT);
19354 return wide;
19355 }
19356 if ((codepoint & 0xfffff800) == 0xd800) {
19357 flush_string_content(p, rb_utf8_encoding(), p->lex.pcur - begin);
19358 yyerror0("invalid Unicode codepoint");
19359 dispatch_scan_event(p, tSTRING_CONTENT);
19360 return wide;
19361 }
19362 }
19363 if (regexp_literal) {
19364 tokcopy(p, (int)numlen);
19365 }
19366 else if (codepoint >= 0x80) {
19367 rb_encoding *utf8 = rb_utf8_encoding();
19368 if (*encp && utf8 != *encp) {
19369 YYLTYPE loc = RUBY_INIT_YYLLOC();
19370 compile_error(p, "UTF-8 mixed within %s source", rb_enc_name(*encp));
19371 parser_show_error_line(p, &loc);
19372 return wide;
19373 }
19374 *encp = utf8;
19375 tokaddmbc(p, codepoint, *encp);
19376 }
19377 else {
19378 tokadd(p, codepoint);
19379 }
19380 return TRUE;
19381}
19382
19383static int tokadd_mbchar(struct parser_params *p, int c);
19384
19385static int
19386tokskip_mbchar(struct parser_params *p)
19387{
19388 int len = parser_precise_mbclen(p, p->lex.pcur-1);
19389 if (len > 0) {
19390 p->lex.pcur += len - 1;
19391 }
19392 return len;
19393}
19394
19395/* return value is for ?\u3042 */
19396static void
19397tokadd_utf8(struct parser_params *p, rb_encoding **encp,
19398 int term, int symbol_literal, int regexp_literal)
19399{
19400 /*
19401 * If `term` is not -1, then we allow multiple codepoints in \u{}
19402 * upto `term` byte, otherwise we're parsing a character literal.
19403 * And then add the codepoints to the current token.
19404 */
19405 static const char multiple_codepoints[] = "Multiple codepoints at single character literal";
19406
19407 const int open_brace = '{', close_brace = '}';
19408
19409 if (regexp_literal) { tokadd(p, '\\'); tokadd(p, 'u'); }
19410
19411 if (peek(p, open_brace)) { /* handle \u{...} form */
19412 if (regexp_literal && p->lex.strterm->u.literal.func == str_regexp) {
19413 /*
19414 * Skip parsing validation code and copy bytes as-is until term or
19415 * closing brace, in order to correctly handle extended regexps where
19416 * invalid unicode escapes are allowed in comments. The regexp parser
19417 * does its own validation and will catch any issues.
19418 */
19419 tokadd(p, open_brace);
19420 while (!lex_eol_ptr_p(p, ++p->lex.pcur)) {
19421 int c = peekc(p);
19422 if (c == close_brace) {
19423 tokadd(p, c);
19424 ++p->lex.pcur;
19425 break;
19426 }
19427 else if (c == term) {
19428 break;
19429 }
19430 if (c == '\\' && !lex_eol_n_p(p, 1)) {
19431 tokadd(p, c);
19432 c = *++p->lex.pcur;
19433 }
19434 tokadd_mbchar(p, c);
19435 }
19436 }
19437 else {
19438 const char *second = NULL;
19439 int c, last = nextc(p);
19440 if (lex_eol_p(p)) goto unterminated;
19441 while (ISSPACE(c = peekc(p)) && !lex_eol_ptr_p(p, ++p->lex.pcur));
19442 while (c != close_brace) {
19443 if (c == term) goto unterminated;
19444 if (second == multiple_codepoints)
19445 second = p->lex.pcur;
19446 if (regexp_literal) tokadd(p, last);
19447 if (!tokadd_codepoint(p, encp, regexp_literal, NULL)) {
19448 break;
19449 }
19450 while (ISSPACE(c = peekc(p))) {
19451 if (lex_eol_ptr_p(p, ++p->lex.pcur)) goto unterminated;
19452 last = c;
19453 }
19454 if (term == -1 && !second)
19455 second = multiple_codepoints;
19456 }
19457
19458 if (c != close_brace) {
19459 unterminated:
19460 flush_string_content(p, rb_utf8_encoding(), 0);
19461 yyerror0("unterminated Unicode escape");
19462 dispatch_scan_event(p, tSTRING_CONTENT);
19463 return;
19464 }
19465 if (second && second != multiple_codepoints) {
19466 const char *pcur = p->lex.pcur;
19467 p->lex.pcur = second;
19468 dispatch_scan_event(p, tSTRING_CONTENT);
19469 token_flush(p);
19470 p->lex.pcur = pcur;
19471 yyerror0(multiple_codepoints);
19472 token_flush(p);
19473 }
19474
19475 if (regexp_literal) tokadd(p, close_brace);
19476 nextc(p);
19477 }
19478 }
19479 else { /* handle \uxxxx form */
19480 if (!tokadd_codepoint(p, encp, regexp_literal, p->lex.pcur - rb_strlen_lit("\\u"))) {
19481 token_flush(p);
19482 return;
19483 }
19484 }
19485}
19486
19487#define ESCAPE_CONTROL 1
19488#define ESCAPE_META 2
19489
19490static int
19491read_escape(struct parser_params *p, int flags, const char *begin)
19492{
19493 int c;
19494 size_t numlen;
19495
19496 switch (c = nextc(p)) {
19497 case '\\': /* Backslash */
19498 return c;
19499
19500 case 'n': /* newline */
19501 return '\n';
19502
19503 case 't': /* horizontal tab */
19504 return '\t';
19505
19506 case 'r': /* carriage-return */
19507 return '\r';
19508
19509 case 'f': /* form-feed */
19510 return '\f';
19511
19512 case 'v': /* vertical tab */
19513 return '\13';
19514
19515 case 'a': /* alarm(bell) */
19516 return '\007';
19517
19518 case 'e': /* escape */
19519 return 033;
19520
19521 case '0': case '1': case '2': case '3': /* octal constant */
19522 case '4': case '5': case '6': case '7':
19523 pushback(p, c);
19524 c = (int)ruby_scan_oct(p->lex.pcur, 3, &numlen);
19525 p->lex.pcur += numlen;
19526 return c;
19527
19528 case 'x': /* hex constant */
19529 c = tok_hex(p, &numlen);
19530 if (numlen == 0) return 0;
19531 return c;
19532
19533 case 'b': /* backspace */
19534 return '\010';
19535
19536 case 's': /* space */
19537 return ' ';
19538
19539 case 'M':
19540 if (flags & ESCAPE_META) goto eof;
19541 if ((c = nextc(p)) != '-') {
19542 goto eof;
19543 }
19544 if ((c = nextc(p)) == '\\') {
19545 switch (peekc(p)) {
19546 case 'u': case 'U':
19547 nextc(p);
19548 goto eof;
19549 }
19550 return read_escape(p, flags|ESCAPE_META, begin) | 0x80;
19551 }
19552 else if (c == -1) goto eof;
19553 else if (!ISASCII(c)) {
19554 tokskip_mbchar(p);
19555 goto eof;
19556 }
19557 else {
19558 int c2 = escaped_control_code(c);
19559 if (c2) {
19560 if (ISCNTRL(c) || !(flags & ESCAPE_CONTROL)) {
19561 WARN_SPACE_CHAR(c2, "\\M-");
19562 }
19563 else {
19564 WARN_SPACE_CHAR(c2, "\\C-\\M-");
19565 }
19566 }
19567 else if (ISCNTRL(c)) goto eof;
19568 return ((c & 0xff) | 0x80);
19569 }
19570
19571 case 'C':
19572 if ((c = nextc(p)) != '-') {
19573 goto eof;
19574 }
19575 case 'c':
19576 if (flags & ESCAPE_CONTROL) goto eof;
19577 if ((c = nextc(p))== '\\') {
19578 switch (peekc(p)) {
19579 case 'u': case 'U':
19580 nextc(p);
19581 goto eof;
19582 }
19583 c = read_escape(p, flags|ESCAPE_CONTROL, begin);
19584 }
19585 else if (c == '?')
19586 return 0177;
19587 else if (c == -1) goto eof;
19588 else if (!ISASCII(c)) {
19589 tokskip_mbchar(p);
19590 goto eof;
19591 }
19592 else {
19593 int c2 = escaped_control_code(c);
19594 if (c2) {
19595 if (ISCNTRL(c)) {
19596 if (flags & ESCAPE_META) {
19597 WARN_SPACE_CHAR(c2, "\\M-");
19598 }
19599 else {
19600 WARN_SPACE_CHAR(c2, "");
19601 }
19602 }
19603 else {
19604 if (flags & ESCAPE_META) {
19605 WARN_SPACE_CHAR(c2, "\\M-\\C-");
19606 }
19607 else {
19608 WARN_SPACE_CHAR(c2, "\\C-");
19609 }
19610 }
19611 }
19612 else if (ISCNTRL(c)) goto eof;
19613 }
19614 return c & 0x9f;
19615
19616 eof:
19617 case -1:
19618 flush_string_content(p, p->enc, p->lex.pcur - begin);
19619 yyerror0("Invalid escape character syntax");
19620 dispatch_scan_event(p, tSTRING_CONTENT);
19621 return '\0';
19622
19623 default:
19624 if (!ISASCII(c)) {
19625 tokskip_mbchar(p);
19626 goto eof;
19627 }
19628 return c;
19629 }
19630}
19631
19632static void
19633tokaddmbc(struct parser_params *p, int c, rb_encoding *enc)
19634{
19635 int len = rb_enc_codelen(c, enc);
19636 rb_enc_mbcput(c, tokspace(p, len), enc);
19637}
19638
19639static int
19640tokadd_escape(struct parser_params *p)
19641{
19642 int c;
19643 size_t numlen;
19644 const char *begin = p->lex.pcur;
19645
19646 switch (c = nextc(p)) {
19647 case '\n':
19648 return 0; /* just ignore */
19649
19650 case '0': case '1': case '2': case '3': /* octal constant */
19651 case '4': case '5': case '6': case '7':
19652 {
19653 ruby_scan_oct(--p->lex.pcur, 3, &numlen);
19654 if (numlen == 0) goto eof;
19655 p->lex.pcur += numlen;
19656 tokcopy(p, (int)numlen + 1);
19657 }
19658 return 0;
19659
19660 case 'x': /* hex constant */
19661 {
19662 tok_hex(p, &numlen);
19663 if (numlen == 0) return -1;
19664 tokcopy(p, (int)numlen + 2);
19665 }
19666 return 0;
19667
19668 eof:
19669 case -1:
19670 flush_string_content(p, p->enc, p->lex.pcur - begin);
19671 yyerror0("Invalid escape character syntax");
19672 token_flush(p);
19673 return -1;
19674
19675 default:
19676 tokadd(p, '\\');
19677 tokadd(p, c);
19678 }
19679 return 0;
19680}
19681
19682static int
19683char_to_option(int c)
19684{
19685 int val;
19686
19687 switch (c) {
19688 case 'i':
19689 val = RE_ONIG_OPTION_IGNORECASE;
19690 break;
19691 case 'x':
19692 val = RE_ONIG_OPTION_EXTEND;
19693 break;
19694 case 'm':
19695 val = RE_ONIG_OPTION_MULTILINE;
19696 break;
19697 default:
19698 val = 0;
19699 break;
19700 }
19701 return val;
19702}
19703
19704#define ARG_ENCODING_FIXED 16
19705#define ARG_ENCODING_NONE 32
19706#define ENC_ASCII8BIT 1
19707#define ENC_EUC_JP 2
19708#define ENC_Windows_31J 3
19709#define ENC_UTF8 4
19710
19711static int
19712char_to_option_kcode(int c, int *option, int *kcode)
19713{
19714 *option = 0;
19715
19716 switch (c) {
19717 case 'n':
19718 *kcode = ENC_ASCII8BIT;
19719 return (*option = ARG_ENCODING_NONE);
19720 case 'e':
19721 *kcode = ENC_EUC_JP;
19722 break;
19723 case 's':
19724 *kcode = ENC_Windows_31J;
19725 break;
19726 case 'u':
19727 *kcode = ENC_UTF8;
19728 break;
19729 default:
19730 *kcode = -1;
19731 return (*option = char_to_option(c));
19732 }
19733 *option = ARG_ENCODING_FIXED;
19734 return 1;
19735}
19736
19737static int
19738regx_options(struct parser_params *p)
19739{
19740 int kcode = 0;
19741 int kopt = 0;
19742 int options = 0;
19743 int c, opt, kc;
19744
19745 newtok(p);
19746 while (c = nextc(p), ISALPHA(c)) {
19747 if (c == 'o') {
19748 options |= RE_OPTION_ONCE;
19749 }
19750 else if (char_to_option_kcode(c, &opt, &kc)) {
19751 if (kc >= 0) {
19752 if (kc != ENC_ASCII8BIT) kcode = c;
19753 kopt = opt;
19754 }
19755 else {
19756 options |= opt;
19757 }
19758 }
19759 else {
19760 tokadd(p, c);
19761 }
19762 }
19763 options |= kopt;
19764 pushback(p, c);
19765 if (toklen(p)) {
19766 YYLTYPE loc = RUBY_INIT_YYLLOC();
19767 tokfix(p);
19768 compile_error(p, "unknown regexp option%s - %*s",
19769 toklen(p) > 1 ? "s" : "", toklen(p), tok(p));
19770 parser_show_error_line(p, &loc);
19771 }
19772 return options | RE_OPTION_ENCODING(kcode);
19773}
19774
19775static int
19776tokadd_mbchar(struct parser_params *p, int c)
19777{
19778 int len = parser_precise_mbclen(p, p->lex.pcur-1);
19779 if (len < 0) return -1;
19780 tokadd(p, c);
19781 p->lex.pcur += --len;
19782 if (len > 0) tokcopy(p, len);
19783 return c;
19784}
19785
19786static inline int
19787simple_re_meta(int c)
19788{
19789 switch (c) {
19790 case '$': case '*': case '+': case '.':
19791 case '?': case '^': case '|':
19792 case ')': case ']': case '}': case '>':
19793 return TRUE;
19794 default:
19795 return FALSE;
19796 }
19797}
19798
19799static int
19800parser_update_heredoc_indent(struct parser_params *p, int c)
19801{
19802 if (p->heredoc_line_indent == -1) {
19803 if (c == '\n') p->heredoc_line_indent = 0;
19804 }
19805 else {
19806 if (c == ' ') {
19807 p->heredoc_line_indent++;
19808 return TRUE;
19809 }
19810 else if (c == '\t') {
19811 int w = (p->heredoc_line_indent / TAB_WIDTH) + 1;
19812 p->heredoc_line_indent = w * TAB_WIDTH;
19813 return TRUE;
19814 }
19815 else if (c != '\n') {
19816 if (p->heredoc_indent > p->heredoc_line_indent) {
19817 p->heredoc_indent = p->heredoc_line_indent;
19818 }
19819 p->heredoc_line_indent = -1;
19820 }
19821 else {
19822 /* Whitespace only line has no indentation */
19823 p->heredoc_line_indent = 0;
19824 }
19825 }
19826 return FALSE;
19827}
19828
19829static void
19830parser_mixed_error(struct parser_params *p, rb_encoding *enc1, rb_encoding *enc2)
19831{
19832 YYLTYPE loc = RUBY_INIT_YYLLOC();
19833 const char *n1 = rb_enc_name(enc1), *n2 = rb_enc_name(enc2);
19834 compile_error(p, "%s mixed within %s source", n1, n2);
19835 parser_show_error_line(p, &loc);
19836}
19837
19838static void
19839parser_mixed_escape(struct parser_params *p, const char *beg, rb_encoding *enc1, rb_encoding *enc2)
19840{
19841 const char *pos = p->lex.pcur;
19842 p->lex.pcur = beg;
19843 parser_mixed_error(p, enc1, enc2);
19844 p->lex.pcur = pos;
19845}
19846
19847static inline char
19848nibble_char_upper(unsigned int c)
19849{
19850 c &= 0xf;
19851 return c + (c < 10 ? '0' : 'A' - 10);
19852}
19853
19854static int
19855tokadd_string(struct parser_params *p,
19856 int func, int term, int paren, long *nest,
19857 rb_encoding **encp, rb_encoding **enc)
19858{
19859 int c;
19860 bool erred = false;
19861#ifdef RIPPER
19862 const int heredoc_end = (p->heredoc_end ? p->heredoc_end + 1 : 0);
19863 int top_of_line = FALSE;
19864#endif
19865
19866#define mixed_error(enc1, enc2) \
19867 (void)(erred || (parser_mixed_error(p, enc1, enc2), erred = true))
19868#define mixed_escape(beg, enc1, enc2) \
19869 (void)(erred || (parser_mixed_escape(p, beg, enc1, enc2), erred = true))
19870
19871 while ((c = nextc(p)) != -1) {
19872 if (p->heredoc_indent > 0) {
19873 parser_update_heredoc_indent(p, c);
19874 }
19875#ifdef RIPPER
19876 if (top_of_line && heredoc_end == p->ruby_sourceline) {
19877 pushback(p, c);
19878 break;
19879 }
19880#endif
19881
19882 if (paren && c == paren) {
19883 ++*nest;
19884 }
19885 else if (c == term) {
19886 if (!nest || !*nest) {
19887 pushback(p, c);
19888 break;
19889 }
19890 --*nest;
19891 }
19892 else if ((func & STR_FUNC_EXPAND) && c == '#' && !lex_eol_p(p)) {
19893 unsigned char c2 = *p->lex.pcur;
19894 if (c2 == '$' || c2 == '@' || c2 == '{') {
19895 pushback(p, c);
19896 break;
19897 }
19898 }
19899 else if (c == '\\') {
19900 c = nextc(p);
19901 switch (c) {
19902 case '\n':
19903 if (func & STR_FUNC_QWORDS) break;
19904 if (func & STR_FUNC_EXPAND) {
19905 if (!(func & STR_FUNC_INDENT) || (p->heredoc_indent < 0))
19906 continue;
19907 if (c == term) {
19908 c = '\\';
19909 goto terminate;
19910 }
19911 }
19912 tokadd(p, '\\');
19913 break;
19914
19915 case '\\':
19916 if (func & STR_FUNC_ESCAPE) tokadd(p, c);
19917 break;
19918
19919 case 'u':
19920 if ((func & STR_FUNC_EXPAND) == 0) {
19921 tokadd(p, '\\');
19922 break;
19923 }
19924 tokadd_utf8(p, enc, term,
19925 func & STR_FUNC_SYMBOL,
19926 func & STR_FUNC_REGEXP);
19927 continue;
19928
19929 default:
19930 if (c == -1) return -1;
19931 if (!ISASCII(c)) {
19932 if ((func & STR_FUNC_EXPAND) == 0) tokadd(p, '\\');
19933 goto non_ascii;
19934 }
19935 if (func & STR_FUNC_REGEXP) {
19936 switch (c) {
19937 case 'c':
19938 case 'C':
19939 case 'M': {
19940 pushback(p, c);
19941 c = read_escape(p, 0, p->lex.pcur - 1);
19942
19943 char *t = tokspace(p, rb_strlen_lit("\\x00"));
19944 *t++ = '\\';
19945 *t++ = 'x';
19946 *t++ = nibble_char_upper(c >> 4);
19947 *t++ = nibble_char_upper(c);
19948 continue;
19949 }
19950 }
19951
19952 if (c == term && !simple_re_meta(c)) {
19953 tokadd(p, c);
19954 continue;
19955 }
19956 pushback(p, c);
19957 if ((c = tokadd_escape(p)) < 0)
19958 return -1;
19959 if (*enc && *enc != *encp) {
19960 mixed_escape(p->lex.ptok+2, *enc, *encp);
19961 }
19962 continue;
19963 }
19964 else if (func & STR_FUNC_EXPAND) {
19965 pushback(p, c);
19966 if (func & STR_FUNC_ESCAPE) tokadd(p, '\\');
19967 c = read_escape(p, 0, p->lex.pcur - 1);
19968 }
19969 else if ((func & STR_FUNC_QWORDS) && ISSPACE(c)) {
19970 /* ignore backslashed spaces in %w */
19971 }
19972 else if (c != term && !(paren && c == paren)) {
19973 tokadd(p, '\\');
19974 pushback(p, c);
19975 continue;
19976 }
19977 }
19978 }
19979 else if (!parser_isascii(p)) {
19980 non_ascii:
19981 if (!*enc) {
19982 *enc = *encp;
19983 }
19984 else if (*enc != *encp) {
19985 mixed_error(*enc, *encp);
19986 continue;
19987 }
19988 if (tokadd_mbchar(p, c) == -1) return -1;
19989 continue;
19990 }
19991 else if ((func & STR_FUNC_QWORDS) && ISSPACE(c)) {
19992 pushback(p, c);
19993 break;
19994 }
19995 if (c & 0x80) {
19996 if (!*enc) {
19997 *enc = *encp;
19998 }
19999 else if (*enc != *encp) {
20000 mixed_error(*enc, *encp);
20001 continue;
20002 }
20003 }
20004 tokadd(p, c);
20005#ifdef RIPPER
20006 top_of_line = (c == '\n');
20007#endif
20008 }
20009 terminate:
20010 if (*enc) *encp = *enc;
20011 return c;
20012}
20013
20014#define NEW_STRTERM(func, term, paren) new_strterm(p, func, term, paren)
20015
20016static void
20017flush_string_content(struct parser_params *p, rb_encoding *enc, size_t back)
20018{
20019 p->lex.pcur -= back;
20020 if (has_delayed_token(p)) {
20021 ptrdiff_t len = p->lex.pcur - p->lex.ptok;
20022 if (len > 0) {
20023 rb_parser_enc_str_buf_cat(p, p->delayed.token, p->lex.ptok, len, enc);
20024 p->delayed.end_line = p->ruby_sourceline;
20025 p->delayed.end_col = rb_long2int(p->lex.pcur - p->lex.pbeg);
20026 }
20027 dispatch_delayed_token(p, tSTRING_CONTENT);
20028 p->lex.ptok = p->lex.pcur;
20029 }
20030 dispatch_scan_event(p, tSTRING_CONTENT);
20031 p->lex.pcur += back;
20032}
20033
20034/* this can be shared with ripper, since it's independent from struct
20035 * parser_params. */
20036#ifndef RIPPER
20037#define BIT(c, idx) (((c) / 32 - 1 == idx) ? (1U << ((c) % 32)) : 0)
20038#define SPECIAL_PUNCT(idx) ( \
20039 BIT('~', idx) | BIT('*', idx) | BIT('$', idx) | BIT('?', idx) | \
20040 BIT('!', idx) | BIT('@', idx) | BIT('/', idx) | BIT('\\', idx) | \
20041 BIT(';', idx) | BIT(',', idx) | BIT('.', idx) | BIT('=', idx) | \
20042 BIT(':', idx) | BIT('<', idx) | BIT('>', idx) | BIT('\"', idx) | \
20043 BIT('&', idx) | BIT('`', idx) | BIT('\'', idx) | BIT('+', idx) | \
20044 BIT('0', idx))
20045const uint_least32_t ruby_global_name_punct_bits[] = {
20046 SPECIAL_PUNCT(0),
20047 SPECIAL_PUNCT(1),
20048 SPECIAL_PUNCT(2),
20049};
20050#undef BIT
20051#undef SPECIAL_PUNCT
20052#endif
20053
20054static enum yytokentype
20055parser_peek_variable_name(struct parser_params *p)
20056{
20057 int c;
20058 const char *ptr = p->lex.pcur;
20059
20060 if (lex_eol_ptr_n_p(p, ptr, 1)) return 0;
20061 c = *ptr++;
20062 switch (c) {
20063 case '$':
20064 if ((c = *ptr) == '-') {
20065 if (lex_eol_ptr_p(p, ++ptr)) return 0;
20066 c = *ptr;
20067 }
20068 else if (is_global_name_punct(c) || ISDIGIT(c)) {
20069 return tSTRING_DVAR;
20070 }
20071 break;
20072 case '@':
20073 if ((c = *ptr) == '@') {
20074 if (lex_eol_ptr_p(p, ++ptr)) return 0;
20075 c = *ptr;
20076 }
20077 break;
20078 case '{':
20079 p->lex.pcur = ptr;
20080 p->command_start = TRUE;
20081 yylval.state = p->lex.state;
20082 return tSTRING_DBEG;
20083 default:
20084 return 0;
20085 }
20086 if (!ISASCII(c) || c == '_' || ISALPHA(c))
20087 return tSTRING_DVAR;
20088 return 0;
20089}
20090
20091#define IS_ARG() IS_lex_state(EXPR_ARG_ANY)
20092#define IS_END() IS_lex_state(EXPR_END_ANY)
20093#define IS_BEG() (IS_lex_state(EXPR_BEG_ANY) || IS_lex_state_all(EXPR_ARG|EXPR_LABELED))
20094#define IS_SPCARG(c) (IS_ARG() && space_seen && !ISSPACE(c))
20095#define IS_LABEL_POSSIBLE() (\
20096 (IS_lex_state(EXPR_LABEL|EXPR_ENDFN) && !cmd_state) || \
20097 IS_ARG())
20098#define IS_LABEL_SUFFIX(n) (peek_n(p, ':',(n)) && !peek_n(p, ':', (n)+1))
20099#define IS_AFTER_OPERATOR() IS_lex_state(EXPR_FNAME | EXPR_DOT)
20100
20101static inline enum yytokentype
20102parser_string_term(struct parser_params *p, int func)
20103{
20104 xfree(p->lex.strterm);
20105 p->lex.strterm = 0;
20106 if (func & STR_FUNC_REGEXP) {
20107 set_yylval_num(regx_options(p));
20108 dispatch_scan_event(p, tREGEXP_END);
20109 SET_LEX_STATE(EXPR_END);
20110 return tREGEXP_END;
20111 }
20112 if ((func & STR_FUNC_LABEL) && IS_LABEL_SUFFIX(0)) {
20113 nextc(p);
20114 SET_LEX_STATE(EXPR_ARG|EXPR_LABELED);
20115 return tLABEL_END;
20116 }
20117 SET_LEX_STATE(EXPR_END);
20118 return tSTRING_END;
20119}
20120
20121static enum yytokentype
20122parse_string(struct parser_params *p, rb_strterm_literal_t *quote)
20123{
20124 int func = quote->func;
20125 int term = quote->term;
20126 int paren = quote->paren;
20127 int c, space = 0;
20128 rb_encoding *enc = p->enc;
20129 rb_encoding *base_enc = 0;
20130 rb_parser_string_t *lit;
20131
20132 if (func & STR_FUNC_TERM) {
20133 if (func & STR_FUNC_QWORDS) nextc(p); /* delayed term */
20134 SET_LEX_STATE(EXPR_END);
20135 xfree(p->lex.strterm);
20136 p->lex.strterm = 0;
20137 return func & STR_FUNC_REGEXP ? tREGEXP_END : tSTRING_END;
20138 }
20139 c = nextc(p);
20140 if ((func & STR_FUNC_QWORDS) && ISSPACE(c)) {
20141 while (c != '\n' && ISSPACE(c = nextc(p)));
20142 space = 1;
20143 }
20144 if (func & STR_FUNC_LIST) {
20145 quote->func &= ~STR_FUNC_LIST;
20146 space = 1;
20147 }
20148 if (c == term && !quote->nest) {
20149 if (func & STR_FUNC_QWORDS) {
20150 quote->func |= STR_FUNC_TERM;
20151 pushback(p, c); /* dispatch the term at tSTRING_END */
20152 add_delayed_token(p, p->lex.ptok, p->lex.pcur);
20153 return ' ';
20154 }
20155 return parser_string_term(p, func);
20156 }
20157 if (space) {
20158 if (!ISSPACE(c)) pushback(p, c);
20159 add_delayed_token(p, p->lex.ptok, p->lex.pcur);
20160 return ' ';
20161 }
20162 newtok(p);
20163 if ((func & STR_FUNC_EXPAND) && c == '#') {
20164 enum yytokentype t = parser_peek_variable_name(p);
20165 if (t) return t;
20166 tokadd(p, '#');
20167 c = nextc(p);
20168 }
20169 pushback(p, c);
20170 if (tokadd_string(p, func, term, paren, &quote->nest,
20171 &enc, &base_enc) == -1) {
20172 if (p->eofp) {
20173#ifndef RIPPER
20174# define unterminated_literal(mesg) yyerror0(mesg)
20175#else
20176# define unterminated_literal(mesg) compile_error(p, mesg)
20177#endif
20178 literal_flush(p, p->lex.pcur);
20179 if (func & STR_FUNC_QWORDS) {
20180 /* no content to add, bailing out here */
20181 unterminated_literal("unterminated list meets end of file");
20182 xfree(p->lex.strterm);
20183 p->lex.strterm = 0;
20184 return tSTRING_END;
20185 }
20186 if (func & STR_FUNC_REGEXP) {
20187 unterminated_literal("unterminated regexp meets end of file");
20188 }
20189 else {
20190 unterminated_literal("unterminated string meets end of file");
20191 }
20192 quote->func |= STR_FUNC_TERM;
20193 }
20194 }
20195
20196 tokfix(p);
20197 lit = STR_NEW3(tok(p), toklen(p), enc, func);
20198 set_yylval_str(lit);
20199 flush_string_content(p, enc, 0);
20200
20201 return tSTRING_CONTENT;
20202}
20203
20204static enum yytokentype
20205heredoc_identifier(struct parser_params *p)
20206{
20207 /*
20208 * term_len is length of `<<"END"` except `END`,
20209 * in this case term_len is 4 (<, <, " and ").
20210 */
20211 long len, offset = p->lex.pcur - p->lex.pbeg;
20212 int c = nextc(p), term, func = 0, quote = 0;
20213 enum yytokentype token = tSTRING_BEG;
20214 int indent = 0;
20215
20216 if (c == '-') {
20217 c = nextc(p);
20218 func = STR_FUNC_INDENT;
20219 offset++;
20220 }
20221 else if (c == '~') {
20222 c = nextc(p);
20223 func = STR_FUNC_INDENT;
20224 offset++;
20225 indent = INT_MAX;
20226 }
20227 switch (c) {
20228 case '\'':
20229 func |= str_squote; goto quoted;
20230 case '"':
20231 func |= str_dquote; goto quoted;
20232 case '`':
20233 token = tXSTRING_BEG;
20234 func |= str_xquote; goto quoted;
20235
20236 quoted:
20237 quote++;
20238 offset++;
20239 term = c;
20240 len = 0;
20241 while ((c = nextc(p)) != term) {
20242 if (c == -1 || c == '\r' || c == '\n') {
20243 yyerror0("unterminated here document identifier");
20244 return -1;
20245 }
20246 }
20247 break;
20248
20249 default:
20250 if (!parser_is_identchar(p)) {
20251 pushback(p, c);
20252 if (func & STR_FUNC_INDENT) {
20253 pushback(p, indent > 0 ? '~' : '-');
20254 }
20255 return 0;
20256 }
20257 func |= str_dquote;
20258 do {
20259 int n = parser_precise_mbclen(p, p->lex.pcur-1);
20260 if (n < 0) return 0;
20261 p->lex.pcur += --n;
20262 } while ((c = nextc(p)) != -1 && parser_is_identchar(p));
20263 pushback(p, c);
20264 break;
20265 }
20266
20267 len = p->lex.pcur - (p->lex.pbeg + offset) - quote;
20268 if ((unsigned long)len >= HERETERM_LENGTH_MAX)
20269 yyerror0("too long here document identifier");
20270 dispatch_scan_event(p, tHEREDOC_BEG);
20271 lex_goto_eol(p);
20272
20273 p->lex.strterm = new_heredoc(p);
20274 rb_strterm_heredoc_t *here = &p->lex.strterm->u.heredoc;
20275 here->offset = offset;
20276 here->sourceline = p->ruby_sourceline;
20277 here->length = (unsigned)len;
20278 here->quote = quote;
20279 here->func = func;
20280 here->lastline = p->lex.lastline;
20281
20282 token_flush(p);
20283 p->heredoc_indent = indent;
20284 p->heredoc_line_indent = 0;
20285 return token;
20286}
20287
20288static void
20289heredoc_restore(struct parser_params *p, rb_strterm_heredoc_t *here)
20290{
20291 rb_parser_string_t *line;
20292 rb_strterm_t *term = p->lex.strterm;
20293
20294 p->lex.strterm = 0;
20295 line = here->lastline;
20296 p->lex.lastline = line;
20297 p->lex.pbeg = PARSER_STRING_PTR(line);
20298 p->lex.pend = p->lex.pbeg + PARSER_STRING_LEN(line);
20299 p->lex.pcur = p->lex.pbeg + here->offset + here->length + here->quote;
20300 p->lex.ptok = p->lex.pbeg + here->offset - here->quote;
20301 p->heredoc_end = p->ruby_sourceline;
20302 p->ruby_sourceline = (int)here->sourceline;
20303 if (p->eofp) p->lex.nextline = AFTER_HEREDOC_WITHOUT_TERMINATOR;
20304 p->eofp = 0;
20305 xfree(term);
20306}
20307
20308static int
20309dedent_string_column(const char *str, long len, int width)
20310{
20311 int i, col = 0;
20312
20313 for (i = 0; i < len && col < width; i++) {
20314 if (str[i] == ' ') {
20315 col++;
20316 }
20317 else if (str[i] == '\t') {
20318 int n = TAB_WIDTH * (col / TAB_WIDTH + 1);
20319 if (n > width) break;
20320 col = n;
20321 }
20322 else {
20323 break;
20324 }
20325 }
20326
20327 return i;
20328}
20329
20330static int
20331dedent_string(struct parser_params *p, rb_parser_string_t *string, int width)
20332{
20333 char *str;
20334 long len;
20335 int i;
20336
20337 len = PARSER_STRING_LEN(string);
20338 str = PARSER_STRING_PTR(string);
20339
20340 i = dedent_string_column(str, len, width);
20341 if (!i) return 0;
20342
20343 rb_parser_str_modify(string);
20344 str = PARSER_STRING_PTR(string);
20345 if (PARSER_STRING_LEN(string) != len)
20346 rb_fatal("literal string changed: %s", PARSER_STRING_PTR(string));
20347 MEMMOVE(str, str + i, char, len - i);
20348 rb_parser_str_set_len(p, string, len - i);
20349 return i;
20350}
20351
20352static NODE *
20353heredoc_dedent(struct parser_params *p, NODE *root)
20354{
20355 NODE *node, *str_node, *prev_node;
20356 int indent = p->heredoc_indent;
20357 rb_parser_string_t *prev_lit = 0;
20358
20359 if (indent <= 0) return root;
20360 if (!root) return root;
20361
20362 prev_node = node = str_node = root;
20363 if (nd_type_p(root, NODE_LIST)) str_node = RNODE_LIST(root)->nd_head;
20364
20365 while (str_node) {
20366 rb_parser_string_t *lit = RNODE_STR(str_node)->string;
20367 if (nd_fl_newline(str_node)) {
20368 dedent_string(p, lit, indent);
20369 }
20370 if (!prev_lit) {
20371 prev_lit = lit;
20372 }
20373 else if (!literal_concat0(p, prev_lit, lit)) {
20374 return 0;
20375 }
20376 else {
20377 NODE *end = RNODE_LIST(node)->as.nd_end;
20378 node = RNODE_LIST(prev_node)->nd_next = RNODE_LIST(node)->nd_next;
20379 if (!node) {
20380 if (nd_type_p(prev_node, NODE_DSTR))
20381 nd_set_type(prev_node, NODE_STR);
20382 break;
20383 }
20384 RNODE_LIST(node)->as.nd_end = end;
20385 goto next_str;
20386 }
20387
20388 str_node = 0;
20389 while ((nd_type_p(node, NODE_LIST) || nd_type_p(node, NODE_DSTR)) && (node = RNODE_LIST(prev_node = node)->nd_next) != 0) {
20390 next_str:
20391 if (!nd_type_p(node, NODE_LIST)) break;
20392 if ((str_node = RNODE_LIST(node)->nd_head) != 0) {
20393 enum node_type type = nd_type(str_node);
20394 if (type == NODE_STR || type == NODE_DSTR) break;
20395 prev_lit = 0;
20396 str_node = 0;
20397 }
20398 }
20399 }
20400 return root;
20401}
20402
20403static int
20404whole_match_p(struct parser_params *p, const char *eos, long len, int indent)
20405{
20406 const char *beg = p->lex.pbeg;
20407 const char *ptr = p->lex.pend;
20408
20409 if (ptr - beg < len) return FALSE;
20410 if (ptr > beg && ptr[-1] == '\n') {
20411 if (--ptr > beg && ptr[-1] == '\r') --ptr;
20412 if (ptr - beg < len) return FALSE;
20413 }
20414 if (strncmp(eos, ptr -= len, len)) return FALSE;
20415 if (indent) {
20416 while (beg < ptr && ISSPACE(*beg)) beg++;
20417 }
20418 return beg == ptr;
20419}
20420
20421static int
20422word_match_p(struct parser_params *p, const char *word, long len)
20423{
20424 if (strncmp(p->lex.pcur, word, len)) return 0;
20425 if (lex_eol_n_p(p, len)) return 1;
20426 int c = (unsigned char)p->lex.pcur[len];
20427 if (ISSPACE(c)) return 1;
20428 switch (c) {
20429 case '\0': case '\004': case '\032': return 1;
20430 }
20431 return 0;
20432}
20433
20434#define NUM_SUFFIX_R (1<<0)
20435#define NUM_SUFFIX_I (1<<1)
20436#define NUM_SUFFIX_ALL 3
20437
20438static int
20439number_literal_suffix(struct parser_params *p, int mask)
20440{
20441 int c, result = 0;
20442 const char *lastp = p->lex.pcur;
20443
20444 while ((c = nextc(p)) != -1) {
20445 if ((mask & NUM_SUFFIX_I) && c == 'i') {
20446 result |= (mask & NUM_SUFFIX_I);
20447 mask &= ~NUM_SUFFIX_I;
20448 /* r after i, rational of complex is disallowed */
20449 mask &= ~NUM_SUFFIX_R;
20450 continue;
20451 }
20452 if ((mask & NUM_SUFFIX_R) && c == 'r') {
20453 result |= (mask & NUM_SUFFIX_R);
20454 mask &= ~NUM_SUFFIX_R;
20455 continue;
20456 }
20457 if (!ISASCII(c) || ISALPHA(c) || c == '_') {
20458 p->lex.pcur = lastp;
20459 return 0;
20460 }
20461 pushback(p, c);
20462 break;
20463 }
20464 return result;
20465}
20466
20467static enum yytokentype
20468set_number_literal(struct parser_params *p, enum yytokentype type, int suffix, int base, int seen_point)
20469{
20470 enum rb_numeric_type numeric_type = integer_literal;
20471
20472 if (type == tFLOAT) {
20473 numeric_type = float_literal;
20474 }
20475
20476 if (suffix & NUM_SUFFIX_R) {
20477 type = tRATIONAL;
20478 numeric_type = rational_literal;
20479 }
20480 if (suffix & NUM_SUFFIX_I) {
20481 type = tIMAGINARY;
20482 }
20483
20484 switch (type) {
20485 case tINTEGER:
20486 set_yylval_node(NEW_INTEGER(strdup(tok(p)), base, &_cur_loc));
20487 break;
20488 case tFLOAT:
20489 set_yylval_node(NEW_FLOAT(strdup(tok(p)), &_cur_loc));
20490 break;
20491 case tRATIONAL:
20492 set_yylval_node(NEW_RATIONAL(strdup(tok(p)), base, seen_point, &_cur_loc));
20493 break;
20494 case tIMAGINARY:
20495 set_yylval_node(NEW_IMAGINARY(strdup(tok(p)), base, seen_point, numeric_type, &_cur_loc));
20496 (void)numeric_type; /* for ripper */
20497 break;
20498 default:
20499 rb_bug("unexpected token: %d", type);
20500 }
20501 SET_LEX_STATE(EXPR_END);
20502 return type;
20503}
20504
20505#define dispatch_heredoc_end(p) parser_dispatch_heredoc_end(p, __LINE__)
20506static void
20507parser_dispatch_heredoc_end(struct parser_params *p, int line)
20508{
20509 if (has_delayed_token(p))
20510 dispatch_delayed_token(p, tSTRING_CONTENT);
20511
20512#ifdef RIPPER
20513 VALUE str = STR_NEW(p->lex.ptok, p->lex.pend - p->lex.ptok);
20514 ripper_dispatch1(p, ripper_token2eventid(tHEREDOC_END), str);
20515#else
20516 if (p->keep_tokens) {
20517 rb_parser_string_t *str = rb_parser_encoding_string_new(p, p->lex.ptok, p->lex.pend - p->lex.ptok, p->enc);
20518 RUBY_SET_YYLLOC_OF_HEREDOC_END(*p->yylloc);
20519 parser_append_tokens(p, str, tHEREDOC_END, line);
20520 }
20521#endif
20522
20523 RUBY_SET_YYLLOC_FROM_STRTERM_HEREDOC(*p->yylloc);
20524 lex_goto_eol(p);
20525 token_flush(p);
20526}
20527
20528static enum yytokentype
20529here_document(struct parser_params *p, rb_strterm_heredoc_t *here)
20530{
20531 int c, func, indent = 0;
20532 const char *eos, *ptr, *ptr_end;
20533 long len;
20534 rb_parser_string_t *str = 0;
20535 rb_encoding *enc = p->enc;
20536 rb_encoding *base_enc = 0;
20537 int bol;
20538#ifdef RIPPER
20539 VALUE s_value;
20540#endif
20541
20542 eos = PARSER_STRING_PTR(here->lastline) + here->offset;
20543 len = here->length;
20544 indent = (func = here->func) & STR_FUNC_INDENT;
20545
20546 if ((c = nextc(p)) == -1) {
20547 error:
20548#ifdef RIPPER
20549 if (!has_delayed_token(p)) {
20550 dispatch_scan_event(p, tSTRING_CONTENT);
20551 }
20552 else if (p->delayed.end_line + 1 == p->ruby_sourceline) {
20553 if ((len = p->lex.pcur - p->lex.ptok) > 0) {
20554 if (!(func & STR_FUNC_REGEXP)) {
20555 int cr = ENC_CODERANGE_UNKNOWN;
20556 rb_str_coderange_scan_restartable(p->lex.ptok, p->lex.pcur, enc, &cr);
20557 if (cr != ENC_CODERANGE_7BIT &&
20558 rb_is_usascii_enc(p->enc) &&
20559 enc != rb_utf8_encoding()) {
20560 enc = rb_ascii8bit_encoding();
20561 }
20562 }
20563 rb_parser_enc_str_buf_cat(p, p->delayed.token, p->lex.ptok, len, enc);
20564 }
20565 dispatch_delayed_token(p, tSTRING_CONTENT);
20566 }
20567 else {
20568 dispatch_delayed_token(p, tSTRING_CONTENT);
20569 dispatch_scan_event(p, tSTRING_CONTENT);
20570 }
20571 lex_goto_eol(p);
20572#endif
20573 heredoc_restore(p, &p->lex.strterm->u.heredoc);
20574 compile_error(p, "can't find string \"%.*s\" anywhere before EOF",
20575 (int)len, eos);
20576 token_flush(p);
20577 SET_LEX_STATE(EXPR_END);
20578 return tSTRING_END;
20579 }
20580 bol = was_bol(p);
20581 if (!bol) {
20582 /* not beginning of line, cannot be the terminator */
20583 }
20584 else if (p->heredoc_line_indent == -1) {
20585 /* `heredoc_line_indent == -1` means
20586 * - "after an interpolation in the same line", or
20587 * - "in a continuing line"
20588 */
20589 p->heredoc_line_indent = 0;
20590 }
20591 else if (whole_match_p(p, eos, len, indent)) {
20592 dispatch_heredoc_end(p);
20593 restore:
20594 heredoc_restore(p, &p->lex.strterm->u.heredoc);
20595 token_flush(p);
20596 SET_LEX_STATE(EXPR_END);
20597 return tSTRING_END;
20598 }
20599
20600 if (!(func & STR_FUNC_EXPAND)) {
20601 do {
20602 ptr = PARSER_STRING_PTR(p->lex.lastline);
20603 ptr_end = p->lex.pend;
20604 if (ptr_end > ptr) {
20605 switch (ptr_end[-1]) {
20606 case '\n':
20607 if (--ptr_end == ptr || ptr_end[-1] != '\r') {
20608 ptr_end++;
20609 break;
20610 }
20611 case '\r':
20612 --ptr_end;
20613 }
20614 }
20615
20616 if (p->heredoc_indent > 0) {
20617 long i = 0;
20618 while (ptr + i < ptr_end && parser_update_heredoc_indent(p, ptr[i]))
20619 i++;
20620 p->heredoc_line_indent = 0;
20621 }
20622
20623 if (str)
20624 parser_str_cat(str, ptr, ptr_end - ptr);
20625 else
20626 str = rb_parser_encoding_string_new(p, ptr, ptr_end - ptr, enc);
20627 if (!lex_eol_ptr_p(p, ptr_end)) parser_str_cat_cstr(str, "\n");
20628 lex_goto_eol(p);
20629 if (p->heredoc_indent > 0) {
20630 goto flush_str;
20631 }
20632 if (nextc(p) == -1) {
20633 if (str) {
20634 rb_parser_string_free(p, str);
20635 str = 0;
20636 }
20637 goto error;
20638 }
20639 } while (!whole_match_p(p, eos, len, indent));
20640 }
20641 else {
20642 /* int mb = ENC_CODERANGE_7BIT, *mbp = &mb;*/
20643 newtok(p);
20644 if (c == '#') {
20645 enum yytokentype t = parser_peek_variable_name(p);
20646 if (p->heredoc_line_indent != -1) {
20647 if (p->heredoc_indent > p->heredoc_line_indent) {
20648 p->heredoc_indent = p->heredoc_line_indent;
20649 }
20650 p->heredoc_line_indent = -1;
20651 }
20652 if (t) return t;
20653 tokadd(p, '#');
20654 c = nextc(p);
20655 }
20656 do {
20657 pushback(p, c);
20658 enc = p->enc;
20659 if ((c = tokadd_string(p, func, '\n', 0, NULL, &enc, &base_enc)) == -1) {
20660 if (p->eofp) goto error;
20661 goto restore;
20662 }
20663 if (c != '\n') {
20664 if (c == '\\') p->heredoc_line_indent = -1;
20665 flush:
20666 str = STR_NEW3(tok(p), toklen(p), enc, func);
20667 flush_str:
20668 set_yylval_str(str);
20669#ifndef RIPPER
20670 if (bol) nd_set_fl_newline(yylval.node);
20671#endif
20672 flush_string_content(p, enc, 0);
20673 return tSTRING_CONTENT;
20674 }
20675 tokadd(p, nextc(p));
20676 if (p->heredoc_indent > 0) {
20677 lex_goto_eol(p);
20678 goto flush;
20679 }
20680 /* if (mbp && mb == ENC_CODERANGE_UNKNOWN) mbp = 0;*/
20681 if ((c = nextc(p)) == -1) goto error;
20682 } while (!whole_match_p(p, eos, len, indent));
20683 str = STR_NEW3(tok(p), toklen(p), enc, func);
20684 }
20685 dispatch_heredoc_end(p);
20686 heredoc_restore(p, &p->lex.strterm->u.heredoc);
20687 token_flush(p);
20688 p->lex.strterm = NEW_STRTERM(func | STR_FUNC_TERM, 0, 0);
20689#ifdef RIPPER
20690 /* Preserve s_value for set_yylval_str */
20691 s_value = p->s_value;
20692#endif
20693 set_yylval_str(str);
20694#ifdef RIPPER
20695 set_parser_s_value(s_value);
20696#endif
20697
20698#ifndef RIPPER
20699 if (bol) nd_set_fl_newline(yylval.node);
20700#endif
20701 return tSTRING_CONTENT;
20702}
20703
20704#include "lex.c"
20705
20706static int
20707arg_ambiguous(struct parser_params *p, char c)
20708{
20709#ifndef RIPPER
20710 if (c == '/') {
20711 rb_warning1("ambiguity between regexp and two divisions: wrap regexp in parentheses or add a space after '%c' operator", WARN_I(c));
20712 }
20713 else {
20714 rb_warning1("ambiguous first argument; put parentheses or a space even after '%c' operator", WARN_I(c));
20715 }
20716#else
20717 dispatch1(arg_ambiguous, rb_usascii_str_new(&c, 1));
20718#endif
20719 return TRUE;
20720}
20721
20722/* returns true value if formal argument error;
20723 * Qtrue, or error message if ripper */
20724static VALUE
20725formal_argument_error(struct parser_params *p, ID id)
20726{
20727 switch (id_type(id)) {
20728 case ID_LOCAL:
20729 break;
20730#ifndef RIPPER
20731# define ERR(mesg) (yyerror0(mesg), Qtrue)
20732#else
20733# define ERR(mesg) WARN_S(mesg)
20734#endif
20735 case ID_CONST:
20736 return ERR("formal argument cannot be a constant");
20737 case ID_INSTANCE:
20738 return ERR("formal argument cannot be an instance variable");
20739 case ID_GLOBAL:
20740 return ERR("formal argument cannot be a global variable");
20741 case ID_CLASS:
20742 return ERR("formal argument cannot be a class variable");
20743 default:
20744 return ERR("formal argument must be local variable");
20745#undef ERR
20746 }
20747 shadowing_lvar(p, id);
20748
20749 return Qfalse;
20750}
20751
20752static int
20753lvar_defined(struct parser_params *p, ID id)
20754{
20755 return (dyna_in_block(p) && dvar_defined(p, id)) || local_id(p, id);
20756}
20757
20758/* emacsen -*- hack */
20759static long
20760parser_encode_length(struct parser_params *p, const char *name, long len)
20761{
20762 long nlen;
20763
20764 if (len > 5 && name[nlen = len - 5] == '-') {
20765 if (rb_memcicmp(name + nlen + 1, "unix", 4) == 0)
20766 return nlen;
20767 }
20768 if (len > 4 && name[nlen = len - 4] == '-') {
20769 if (rb_memcicmp(name + nlen + 1, "dos", 3) == 0)
20770 return nlen;
20771 if (rb_memcicmp(name + nlen + 1, "mac", 3) == 0 &&
20772 !(len == 8 && rb_memcicmp(name, "utf8-mac", len) == 0))
20773 /* exclude UTF8-MAC because the encoding named "UTF8" doesn't exist in Ruby */
20774 return nlen;
20775 }
20776 return len;
20777}
20778
20779static void
20780parser_set_encode(struct parser_params *p, const char *name)
20781{
20782 rb_encoding *enc;
20783 VALUE excargs[3];
20784 int idx = 0;
20785
20786 const char *wrong = 0;
20787 switch (*name) {
20788 case 'e': case 'E': wrong = "external"; break;
20789 case 'i': case 'I': wrong = "internal"; break;
20790 case 'f': case 'F': wrong = "filesystem"; break;
20791 case 'l': case 'L': wrong = "locale"; break;
20792 }
20793 if (wrong && STRCASECMP(name, wrong) == 0) goto unknown;
20794 idx = rb_enc_find_index(name);
20795 if (idx < 0) {
20796 unknown:
20797 excargs[1] = rb_sprintf("unknown encoding name: %s", name);
20798 error:
20799 excargs[0] = rb_eArgError;
20800 excargs[2] = rb_make_backtrace();
20801 rb_ary_unshift(excargs[2], rb_sprintf("%"PRIsVALUE":%d", p->ruby_sourcefile_string, p->ruby_sourceline));
20802 VALUE exc = rb_make_exception(3, excargs);
20803 ruby_show_error_line(p, exc, &(YYLTYPE)RUBY_INIT_YYLLOC(), p->ruby_sourceline, p->lex.lastline);
20804
20805 rb_ast_free(p->ast);
20806 p->ast = NULL;
20807
20808 rb_exc_raise(exc);
20809 }
20810 enc = rb_enc_from_index(idx);
20811 if (!rb_enc_asciicompat(enc)) {
20812 excargs[1] = rb_sprintf("%s is not ASCII compatible", rb_enc_name(enc));
20813 goto error;
20814 }
20815 p->enc = enc;
20816#ifndef RIPPER
20817 if (p->debug_lines) {
20818 long i;
20819 for (i = 0; i < p->debug_lines->len; i++) {
20820 rb_parser_enc_associate(p, p->debug_lines->data[i], enc);
20821 }
20822 }
20823#endif
20824}
20825
20826static bool
20827comment_at_top(struct parser_params *p)
20828{
20829 if (p->token_seen) return false;
20830 return (p->line_count == (p->has_shebang ? 2 : 1));
20831}
20832
20833typedef long (*rb_magic_comment_length_t)(struct parser_params *p, const char *name, long len);
20834typedef void (*rb_magic_comment_setter_t)(struct parser_params *p, const char *name, const char *val);
20835
20836static int parser_invalid_pragma_value(struct parser_params *p, const char *name, const char *val);
20837
20838static void
20839magic_comment_encoding(struct parser_params *p, const char *name, const char *val)
20840{
20841 if (!comment_at_top(p)) {
20842 return;
20843 }
20844 parser_set_encode(p, val);
20845}
20846
20847static int
20848parser_get_bool(struct parser_params *p, const char *name, const char *val)
20849{
20850 switch (*val) {
20851 case 't': case 'T':
20852 if (STRCASECMP(val, "true") == 0) {
20853 return TRUE;
20854 }
20855 break;
20856 case 'f': case 'F':
20857 if (STRCASECMP(val, "false") == 0) {
20858 return FALSE;
20859 }
20860 break;
20861 }
20862 return parser_invalid_pragma_value(p, name, val);
20863}
20864
20865static int
20866parser_invalid_pragma_value(struct parser_params *p, const char *name, const char *val)
20867{
20868 rb_warning2("invalid value for %s: %s", WARN_S(name), WARN_S(val));
20869 return -1;
20870}
20871
20872static void
20873parser_set_token_info(struct parser_params *p, const char *name, const char *val)
20874{
20875 int b = parser_get_bool(p, name, val);
20876 if (b >= 0) p->token_info_enabled = b;
20877}
20878
20879static void
20880parser_set_frozen_string_literal(struct parser_params *p, const char *name, const char *val)
20881{
20882 int b;
20883
20884 if (p->token_seen) {
20885 rb_warning1("'%s' is ignored after any tokens", WARN_S(name));
20886 return;
20887 }
20888
20889 b = parser_get_bool(p, name, val);
20890 if (b < 0) return;
20891
20892 p->frozen_string_literal = b;
20893}
20894
20895static void
20896parser_set_shareable_constant_value(struct parser_params *p, const char *name, const char *val)
20897{
20898 for (const char *s = p->lex.pbeg, *e = p->lex.pcur; s < e; ++s) {
20899 if (*s == ' ' || *s == '\t') continue;
20900 if (*s == '#') break;
20901 rb_warning1("'%s' is ignored unless in comment-only line", WARN_S(name));
20902 return;
20903 }
20904
20905 switch (*val) {
20906 case 'n': case 'N':
20907 if (STRCASECMP(val, "none") == 0) {
20908 p->ctxt.shareable_constant_value = rb_parser_shareable_none;
20909 return;
20910 }
20911 break;
20912 case 'l': case 'L':
20913 if (STRCASECMP(val, "literal") == 0) {
20914 p->ctxt.shareable_constant_value = rb_parser_shareable_literal;
20915 return;
20916 }
20917 break;
20918 case 'e': case 'E':
20919 if (STRCASECMP(val, "experimental_copy") == 0) {
20920 p->ctxt.shareable_constant_value = rb_parser_shareable_copy;
20921 return;
20922 }
20923 if (STRCASECMP(val, "experimental_everything") == 0) {
20924 p->ctxt.shareable_constant_value = rb_parser_shareable_everything;
20925 return;
20926 }
20927 break;
20928 }
20929 parser_invalid_pragma_value(p, name, val);
20930}
20931
20932# if WARN_PAST_SCOPE
20933static void
20934parser_set_past_scope(struct parser_params *p, const char *name, const char *val)
20935{
20936 int b = parser_get_bool(p, name, val);
20937 if (b >= 0) p->past_scope_enabled = b;
20938}
20939# endif
20940
20942 const char *name;
20943 rb_magic_comment_setter_t func;
20944 rb_magic_comment_length_t length;
20945};
20946
20947static const struct magic_comment magic_comments[] = {
20948 {"coding", magic_comment_encoding, parser_encode_length},
20949 {"encoding", magic_comment_encoding, parser_encode_length},
20950 {"frozen_string_literal", parser_set_frozen_string_literal},
20951 {"shareable_constant_value", parser_set_shareable_constant_value},
20952 {"warn_indent", parser_set_token_info},
20953# if WARN_PAST_SCOPE
20954 {"warn_past_scope", parser_set_past_scope},
20955# endif
20956};
20957
20958static const char *
20959magic_comment_marker(const char *str, long len)
20960{
20961 long i = 2;
20962
20963 while (i < len) {
20964 switch (str[i]) {
20965 case '-':
20966 if (str[i-1] == '*' && str[i-2] == '-') {
20967 return str + i + 1;
20968 }
20969 i += 2;
20970 break;
20971 case '*':
20972 if (i + 1 >= len) return 0;
20973 if (str[i+1] != '-') {
20974 i += 4;
20975 }
20976 else if (str[i-1] != '-') {
20977 i += 2;
20978 }
20979 else {
20980 return str + i + 2;
20981 }
20982 break;
20983 default:
20984 i += 3;
20985 break;
20986 }
20987 }
20988 return 0;
20989}
20990
20991static int
20992parser_magic_comment(struct parser_params *p, const char *str, long len)
20993{
20994 int indicator = 0;
20995 VALUE name = 0, val = 0;
20996 const char *beg, *end, *vbeg, *vend;
20997#define str_copy(_s, _p, _n) ((_s) \
20998 ? (void)(rb_str_resize((_s), (_n)), \
20999 MEMCPY(RSTRING_PTR(_s), (_p), char, (_n)), (_s)) \
21000 : (void)((_s) = STR_NEW((_p), (_n))))
21001
21002 if (len <= 7) return FALSE;
21003 if (!!(beg = magic_comment_marker(str, len))) {
21004 if (!(end = magic_comment_marker(beg, str + len - beg)))
21005 return FALSE;
21006 indicator = TRUE;
21007 str = beg;
21008 len = end - beg - 3;
21009 }
21010
21011 /* %r"([^\\s\'\":;]+)\\s*:\\s*(\"(?:\\\\.|[^\"])*\"|[^\"\\s;]+)[\\s;]*" */
21012 while (len > 0) {
21013 const struct magic_comment *mc = magic_comments;
21014 char *s;
21015 int i;
21016 long n = 0;
21017
21018 for (; len > 0 && *str; str++, --len) {
21019 switch (*str) {
21020 case '\'': case '"': case ':': case ';':
21021 continue;
21022 }
21023 if (!ISSPACE(*str)) break;
21024 }
21025 for (beg = str; len > 0; str++, --len) {
21026 switch (*str) {
21027 case '\'': case '"': case ':': case ';':
21028 break;
21029 default:
21030 if (ISSPACE(*str)) break;
21031 continue;
21032 }
21033 break;
21034 }
21035 for (end = str; len > 0 && ISSPACE(*str); str++, --len);
21036 if (!len) break;
21037 if (*str != ':') {
21038 if (!indicator) return FALSE;
21039 continue;
21040 }
21041
21042 do str++; while (--len > 0 && ISSPACE(*str));
21043 if (!len) break;
21044 const char *tok_beg = str;
21045 if (*str == '"') {
21046 for (vbeg = ++str; --len > 0 && *str != '"'; str++) {
21047 if (*str == '\\') {
21048 --len;
21049 ++str;
21050 }
21051 }
21052 vend = str;
21053 if (len) {
21054 --len;
21055 ++str;
21056 }
21057 }
21058 else {
21059 for (vbeg = str; len > 0 && *str != '"' && *str != ';' && !ISSPACE(*str); --len, str++);
21060 vend = str;
21061 }
21062 const char *tok_end = str;
21063 if (indicator) {
21064 while (len > 0 && (*str == ';' || ISSPACE(*str))) --len, str++;
21065 }
21066 else {
21067 while (len > 0 && (ISSPACE(*str))) --len, str++;
21068 if (len) return FALSE;
21069 }
21070
21071 n = end - beg;
21072 str_copy(name, beg, n);
21073 s = RSTRING_PTR(name);
21074 for (i = 0; i < n; ++i) {
21075 if (s[i] == '-') s[i] = '_';
21076 }
21077 do {
21078 if (STRNCASECMP(mc->name, s, n) == 0 && !mc->name[n]) {
21079 n = vend - vbeg;
21080 if (mc->length) {
21081 n = (*mc->length)(p, vbeg, n);
21082 }
21083 str_copy(val, vbeg, n);
21084 p->lex.ptok = tok_beg;
21085 p->lex.pcur = tok_end;
21086 (*mc->func)(p, mc->name, RSTRING_PTR(val));
21087 break;
21088 }
21089 } while (++mc < magic_comments + numberof(magic_comments));
21090#ifdef RIPPER
21091 str_copy(val, vbeg, vend - vbeg);
21092 dispatch2(magic_comment, name, val);
21093#endif
21094 }
21095
21096 return TRUE;
21097}
21098
21099static void
21100set_file_encoding(struct parser_params *p, const char *str, const char *send)
21101{
21102 int sep = 0;
21103 const char *beg = str;
21104 VALUE s;
21105
21106 for (;;) {
21107 if (send - str <= 6) return;
21108 switch (str[6]) {
21109 case 'C': case 'c': str += 6; continue;
21110 case 'O': case 'o': str += 5; continue;
21111 case 'D': case 'd': str += 4; continue;
21112 case 'I': case 'i': str += 3; continue;
21113 case 'N': case 'n': str += 2; continue;
21114 case 'G': case 'g': str += 1; continue;
21115 case '=': case ':':
21116 sep = 1;
21117 str += 6;
21118 break;
21119 default:
21120 str += 6;
21121 if (ISSPACE(*str)) break;
21122 continue;
21123 }
21124 if (STRNCASECMP(str-6, "coding", 6) == 0) break;
21125 sep = 0;
21126 }
21127 for (;;) {
21128 do {
21129 if (++str >= send) return;
21130 } while (ISSPACE(*str));
21131 if (sep) break;
21132 if (*str != '=' && *str != ':') return;
21133 sep = 1;
21134 str++;
21135 }
21136 beg = str;
21137 while ((*str == '-' || *str == '_' || ISALNUM(*str)) && ++str < send);
21138 s = rb_str_new(beg, parser_encode_length(p, beg, str - beg));
21139 p->lex.ptok = beg;
21140 p->lex.pcur = str;
21141 parser_set_encode(p, RSTRING_PTR(s));
21142 rb_str_resize(s, 0);
21143}
21144
21145static void
21146parser_prepare(struct parser_params *p)
21147{
21148 int c = nextc0(p, FALSE);
21149 p->token_info_enabled = !compile_for_eval && RTEST(ruby_verbose);
21150 switch (c) {
21151 case '#':
21152 if (peek(p, '!')) p->has_shebang = 1;
21153 break;
21154 case 0xef: /* UTF-8 BOM marker */
21155 if (!lex_eol_n_p(p, 2) &&
21156 (unsigned char)p->lex.pcur[0] == 0xbb &&
21157 (unsigned char)p->lex.pcur[1] == 0xbf) {
21158 p->enc = rb_utf8_encoding();
21159 p->lex.pcur += 2;
21160#ifndef RIPPER
21161 if (p->debug_lines) {
21162 rb_parser_string_set_encoding(p->lex.lastline, p->enc);
21163 }
21164#endif
21165 p->lex.pbeg = p->lex.pcur;
21166 token_flush(p);
21167 return;
21168 }
21169 break;
21170 case -1: /* end of script. */
21171 return;
21172 }
21173 pushback(p, c);
21174 p->enc = rb_parser_str_get_encoding(p->lex.lastline);
21175}
21176
21177#ifndef RIPPER
21178#define ambiguous_operator(tok, op, syn) ( \
21179 rb_warning0("'"op"' after local variable or literal is interpreted as binary operator"), \
21180 rb_warning0("even though it seems like "syn""))
21181#else
21182#define ambiguous_operator(tok, op, syn) \
21183 dispatch2(operator_ambiguous, TOKEN2VAL(tok), rb_str_new_cstr(syn))
21184#endif
21185#define warn_balanced(tok, op, syn) ((void) \
21186 (!IS_lex_state_for(last_state, EXPR_CLASS|EXPR_DOT|EXPR_FNAME|EXPR_ENDFN) && \
21187 space_seen && !ISSPACE(c) && \
21188 (ambiguous_operator(tok, op, syn), 0)), \
21189 (enum yytokentype)(tok))
21190
21191static enum yytokentype
21192no_digits(struct parser_params *p)
21193{
21194 yyerror0("numeric literal without digits");
21195 if (peek(p, '_')) nextc(p);
21196 /* dummy 0, for tUMINUS_NUM at numeric */
21197 return set_number_literal(p, tINTEGER, 0, 10, 0);
21198}
21199
21200static enum yytokentype
21201parse_numeric(struct parser_params *p, int c)
21202{
21203 int is_float, seen_point, seen_e, nondigit;
21204 int suffix;
21205
21206 is_float = seen_point = seen_e = nondigit = 0;
21207 SET_LEX_STATE(EXPR_END);
21208 newtok(p);
21209 if (c == '-' || c == '+') {
21210 tokadd(p, c);
21211 c = nextc(p);
21212 }
21213 if (c == '0') {
21214 int start = toklen(p);
21215 c = nextc(p);
21216 if (c == 'x' || c == 'X') {
21217 /* hexadecimal */
21218 c = nextc(p);
21219 if (c != -1 && ISXDIGIT(c)) {
21220 do {
21221 if (c == '_') {
21222 if (nondigit) break;
21223 nondigit = c;
21224 continue;
21225 }
21226 if (!ISXDIGIT(c)) break;
21227 nondigit = 0;
21228 tokadd(p, c);
21229 } while ((c = nextc(p)) != -1);
21230 }
21231 pushback(p, c);
21232 tokfix(p);
21233 if (toklen(p) == start) {
21234 return no_digits(p);
21235 }
21236 else if (nondigit) goto trailing_uc;
21237 suffix = number_literal_suffix(p, NUM_SUFFIX_ALL);
21238 return set_number_literal(p, tINTEGER, suffix, 16, 0);
21239 }
21240 if (c == 'b' || c == 'B') {
21241 /* binary */
21242 c = nextc(p);
21243 if (c == '0' || c == '1') {
21244 do {
21245 if (c == '_') {
21246 if (nondigit) break;
21247 nondigit = c;
21248 continue;
21249 }
21250 if (c != '0' && c != '1') break;
21251 nondigit = 0;
21252 tokadd(p, c);
21253 } while ((c = nextc(p)) != -1);
21254 }
21255 pushback(p, c);
21256 tokfix(p);
21257 if (toklen(p) == start) {
21258 return no_digits(p);
21259 }
21260 else if (nondigit) goto trailing_uc;
21261 suffix = number_literal_suffix(p, NUM_SUFFIX_ALL);
21262 return set_number_literal(p, tINTEGER, suffix, 2, 0);
21263 }
21264 if (c == 'd' || c == 'D') {
21265 /* decimal */
21266 c = nextc(p);
21267 if (c != -1 && ISDIGIT(c)) {
21268 do {
21269 if (c == '_') {
21270 if (nondigit) break;
21271 nondigit = c;
21272 continue;
21273 }
21274 if (!ISDIGIT(c)) break;
21275 nondigit = 0;
21276 tokadd(p, c);
21277 } while ((c = nextc(p)) != -1);
21278 }
21279 pushback(p, c);
21280 tokfix(p);
21281 if (toklen(p) == start) {
21282 return no_digits(p);
21283 }
21284 else if (nondigit) goto trailing_uc;
21285 suffix = number_literal_suffix(p, NUM_SUFFIX_ALL);
21286 return set_number_literal(p, tINTEGER, suffix, 10, 0);
21287 }
21288 if (c == '_') {
21289 /* 0_0 */
21290 goto octal_number;
21291 }
21292 if (c == 'o' || c == 'O') {
21293 /* prefixed octal */
21294 c = nextc(p);
21295 if (c == -1 || c == '_' || !ISDIGIT(c)) {
21296 tokfix(p);
21297 return no_digits(p);
21298 }
21299 }
21300 if (c >= '0' && c <= '7') {
21301 /* octal */
21302 octal_number:
21303 do {
21304 if (c == '_') {
21305 if (nondigit) break;
21306 nondigit = c;
21307 continue;
21308 }
21309 if (c < '0' || c > '9') break;
21310 if (c > '7') goto invalid_octal;
21311 nondigit = 0;
21312 tokadd(p, c);
21313 } while ((c = nextc(p)) != -1);
21314 if (toklen(p) > start) {
21315 pushback(p, c);
21316 tokfix(p);
21317 if (nondigit) goto trailing_uc;
21318 suffix = number_literal_suffix(p, NUM_SUFFIX_ALL);
21319 return set_number_literal(p, tINTEGER, suffix, 8, 0);
21320 }
21321 if (nondigit) {
21322 pushback(p, c);
21323 goto trailing_uc;
21324 }
21325 }
21326 if (c > '7' && c <= '9') {
21327 invalid_octal:
21328 yyerror0("Invalid octal digit");
21329 }
21330 else if (c == '.' || c == 'e' || c == 'E') {
21331 tokadd(p, '0');
21332 }
21333 else {
21334 pushback(p, c);
21335 tokfix(p);
21336 suffix = number_literal_suffix(p, NUM_SUFFIX_ALL);
21337 return set_number_literal(p, tINTEGER, suffix, 10, 0);
21338 }
21339 }
21340
21341 for (;;) {
21342 switch (c) {
21343 case '0': case '1': case '2': case '3': case '4':
21344 case '5': case '6': case '7': case '8': case '9':
21345 nondigit = 0;
21346 tokadd(p, c);
21347 break;
21348
21349 case '.':
21350 if (nondigit) goto trailing_uc;
21351 if (seen_point || seen_e) {
21352 goto decode_num;
21353 }
21354 else {
21355 int c0 = nextc(p);
21356 if (c0 == -1 || !ISDIGIT(c0)) {
21357 pushback(p, c0);
21358 goto decode_num;
21359 }
21360 c = c0;
21361 }
21362 seen_point = toklen(p);
21363 tokadd(p, '.');
21364 tokadd(p, c);
21365 is_float++;
21366 nondigit = 0;
21367 break;
21368
21369 case 'e':
21370 case 'E':
21371 if (nondigit) {
21372 pushback(p, c);
21373 c = nondigit;
21374 goto decode_num;
21375 }
21376 if (seen_e) {
21377 goto decode_num;
21378 }
21379 nondigit = c;
21380 c = nextc(p);
21381 if (c != '-' && c != '+' && !ISDIGIT(c)) {
21382 pushback(p, c);
21383 c = nondigit;
21384 nondigit = 0;
21385 goto decode_num;
21386 }
21387 tokadd(p, nondigit);
21388 seen_e++;
21389 is_float++;
21390 tokadd(p, c);
21391 nondigit = (c == '-' || c == '+') ? c : 0;
21392 break;
21393
21394 case '_': /* `_' in number just ignored */
21395 if (nondigit) goto decode_num;
21396 nondigit = c;
21397 break;
21398
21399 default:
21400 goto decode_num;
21401 }
21402 c = nextc(p);
21403 }
21404
21405 decode_num:
21406 pushback(p, c);
21407 if (nondigit) {
21408 trailing_uc:
21409 literal_flush(p, p->lex.pcur - 1);
21410 YYLTYPE loc = RUBY_INIT_YYLLOC();
21411 compile_error(p, "trailing '%c' in number", nondigit);
21412 parser_show_error_line(p, &loc);
21413 }
21414 tokfix(p);
21415 if (is_float) {
21416 enum yytokentype type = tFLOAT;
21417
21418 suffix = number_literal_suffix(p, seen_e ? NUM_SUFFIX_I : NUM_SUFFIX_ALL);
21419 if (suffix & NUM_SUFFIX_R) {
21420 type = tRATIONAL;
21421 }
21422 else {
21423 strtod(tok(p), 0);
21424 if (errno == ERANGE) {
21425 rb_warning1("Float %s out of range", WARN_S(tok(p)));
21426 errno = 0;
21427 }
21428 }
21429 return set_number_literal(p, type, suffix, 0, seen_point);
21430 }
21431 suffix = number_literal_suffix(p, NUM_SUFFIX_ALL);
21432 return set_number_literal(p, tINTEGER, suffix, 10, 0);
21433}
21434
21435static enum yytokentype
21436parse_qmark(struct parser_params *p, int space_seen)
21437{
21438 rb_encoding *enc;
21439 register int c;
21440 rb_parser_string_t *lit;
21441 const char *start = p->lex.pcur;
21442
21443 if (IS_END()) {
21444 SET_LEX_STATE(EXPR_VALUE);
21445 return '?';
21446 }
21447 c = nextc(p);
21448 if (c == -1) {
21449 compile_error(p, "incomplete character syntax");
21450 return 0;
21451 }
21452 if (rb_enc_isspace(c, p->enc)) {
21453 if (!IS_ARG()) {
21454 int c2 = escaped_control_code(c);
21455 if (c2) {
21456 WARN_SPACE_CHAR(c2, "?");
21457 }
21458 }
21459 ternary:
21460 pushback(p, c);
21461 SET_LEX_STATE(EXPR_VALUE);
21462 return '?';
21463 }
21464 newtok(p);
21465 enc = p->enc;
21466 int w = parser_precise_mbclen(p, start);
21467 if (is_identchar(p, start, p->lex.pend, p->enc) &&
21468 !(lex_eol_ptr_n_p(p, start, w) || !is_identchar(p, start + w, p->lex.pend, p->enc))) {
21469 if (space_seen) {
21470 const char *ptr = start;
21471 do {
21472 int n = parser_precise_mbclen(p, ptr);
21473 if (n < 0) return -1;
21474 ptr += n;
21475 } while (!lex_eol_ptr_p(p, ptr) && is_identchar(p, ptr, p->lex.pend, p->enc));
21476 rb_warn2("'?' just followed by '%.*s' is interpreted as" \
21477 " a conditional operator, put a space after '?'",
21478 WARN_I((int)(ptr - start)), WARN_S_L(start, (ptr - start)));
21479 }
21480 goto ternary;
21481 }
21482 else if (c == '\\') {
21483 if (peek(p, 'u')) {
21484 nextc(p);
21485 enc = rb_utf8_encoding();
21486 tokadd_utf8(p, &enc, -1, 0, 0);
21487 }
21488 else if (!ISASCII(c = peekc(p)) && c != -1) {
21489 nextc(p);
21490 if (tokadd_mbchar(p, c) == -1) return 0;
21491 }
21492 else {
21493 c = read_escape(p, 0, p->lex.pcur - rb_strlen_lit("?\\"));
21494 tokadd(p, c);
21495 }
21496 }
21497 else {
21498 if (tokadd_mbchar(p, c) == -1) return 0;
21499 }
21500 tokfix(p);
21501 lit = STR_NEW3(tok(p), toklen(p), enc, 0);
21502 set_yylval_str(lit);
21503 SET_LEX_STATE(EXPR_END);
21504 return tCHAR;
21505}
21506
21507static enum yytokentype
21508parse_percent(struct parser_params *p, const int space_seen, const enum lex_state_e last_state)
21509{
21510 register int c;
21511 const char *ptok = p->lex.pcur;
21512
21513 if (IS_BEG()) {
21514 int term;
21515 int paren;
21516
21517 c = nextc(p);
21518 quotation:
21519 if (c == -1) goto unterminated;
21520 if (!ISALNUM(c)) {
21521 term = c;
21522 if (!ISASCII(c)) goto unknown;
21523 c = 'Q';
21524 }
21525 else {
21526 term = nextc(p);
21527 if (rb_enc_isalnum(term, p->enc) || !parser_isascii(p)) {
21528 unknown:
21529 pushback(p, term);
21530 c = parser_precise_mbclen(p, p->lex.pcur);
21531 if (c < 0) return 0;
21532 p->lex.pcur += c;
21533 yyerror0("unknown type of %string");
21534 return 0;
21535 }
21536 }
21537 if (term == -1) {
21538 unterminated:
21539 compile_error(p, "unterminated quoted string meets end of file");
21540 return 0;
21541 }
21542 paren = term;
21543 if (term == '(') term = ')';
21544 else if (term == '[') term = ']';
21545 else if (term == '{') term = '}';
21546 else if (term == '<') term = '>';
21547 else paren = 0;
21548
21549 p->lex.ptok = ptok-1;
21550 switch (c) {
21551 case 'Q':
21552 p->lex.strterm = NEW_STRTERM(str_dquote, term, paren);
21553 return tSTRING_BEG;
21554
21555 case 'q':
21556 p->lex.strterm = NEW_STRTERM(str_squote, term, paren);
21557 return tSTRING_BEG;
21558
21559 case 'W':
21560 p->lex.strterm = NEW_STRTERM(str_dword, term, paren);
21561 return tWORDS_BEG;
21562
21563 case 'w':
21564 p->lex.strterm = NEW_STRTERM(str_sword, term, paren);
21565 return tQWORDS_BEG;
21566
21567 case 'I':
21568 p->lex.strterm = NEW_STRTERM(str_dword, term, paren);
21569 return tSYMBOLS_BEG;
21570
21571 case 'i':
21572 p->lex.strterm = NEW_STRTERM(str_sword, term, paren);
21573 return tQSYMBOLS_BEG;
21574
21575 case 'x':
21576 p->lex.strterm = NEW_STRTERM(str_xquote, term, paren);
21577 return tXSTRING_BEG;
21578
21579 case 'r':
21580 p->lex.strterm = NEW_STRTERM(str_regexp, term, paren);
21581 return tREGEXP_BEG;
21582
21583 case 's':
21584 p->lex.strterm = NEW_STRTERM(str_ssym, term, paren);
21585 SET_LEX_STATE(EXPR_FNAME|EXPR_FITEM);
21586 return tSYMBEG;
21587
21588 default:
21589 yyerror0("unknown type of %string");
21590 return 0;
21591 }
21592 }
21593 if ((c = nextc(p)) == '=') {
21594 set_yylval_id('%');
21595 SET_LEX_STATE(EXPR_BEG);
21596 return tOP_ASGN;
21597 }
21598 if (IS_SPCARG(c) || (IS_lex_state(EXPR_FITEM) && c == 's')) {
21599 goto quotation;
21600 }
21601 SET_LEX_STATE(IS_AFTER_OPERATOR() ? EXPR_ARG : EXPR_BEG);
21602 pushback(p, c);
21603 return warn_balanced('%', "%%", "string literal");
21604}
21605
21606static int
21607tokadd_ident(struct parser_params *p, int c)
21608{
21609 do {
21610 if (tokadd_mbchar(p, c) == -1) return -1;
21611 c = nextc(p);
21612 } while (parser_is_identchar(p));
21613 pushback(p, c);
21614 return 0;
21615}
21616
21617static ID
21618tokenize_ident(struct parser_params *p)
21619{
21620 ID ident = TOK_INTERN();
21621
21622 set_yylval_name(ident);
21623
21624 return ident;
21625}
21626
21627static int
21628parse_numvar(struct parser_params *p)
21629{
21630 size_t len;
21631 int overflow;
21632 unsigned long n = ruby_scan_digits(tok(p)+1, toklen(p)-1, 10, &len, &overflow);
21633 const unsigned long nth_ref_max =
21635 /* NTH_REF is left-shifted to be ORed with back-ref flag and
21636 * turned into a Fixnum, in compile.c */
21637
21638 if (overflow || n > nth_ref_max) {
21639 /* compile_error()? */
21640 rb_warn1("'%s' is too big for a number variable, always nil", WARN_S(tok(p)));
21641 return 0; /* $0 is $PROGRAM_NAME, not NTH_REF */
21642 }
21643 else {
21644 return (int)n;
21645 }
21646}
21647
21648static enum yytokentype
21649parse_gvar(struct parser_params *p, const enum lex_state_e last_state)
21650{
21651 const char *ptr = p->lex.pcur;
21652 register int c;
21653
21654 SET_LEX_STATE(EXPR_END);
21655 p->lex.ptok = ptr - 1; /* from '$' */
21656 newtok(p);
21657 c = nextc(p);
21658 switch (c) {
21659 case '_': /* $_: last read line string */
21660 c = nextc(p);
21661 if (parser_is_identchar(p)) {
21662 tokadd(p, '$');
21663 tokadd(p, '_');
21664 break;
21665 }
21666 pushback(p, c);
21667 c = '_';
21668 /* fall through */
21669 case '~': /* $~: match-data */
21670 case '*': /* $*: argv */
21671 case '$': /* $$: pid */
21672 case '?': /* $?: last status */
21673 case '!': /* $!: error string */
21674 case '@': /* $@: error position */
21675 case '/': /* $/: input record separator */
21676 case '\\': /* $\: output record separator */
21677 case ';': /* $;: field separator */
21678 case ',': /* $,: output field separator */
21679 case '.': /* $.: last read line number */
21680 case '=': /* $=: ignorecase */
21681 case ':': /* $:: load path */
21682 case '<': /* $<: default input handle */
21683 case '>': /* $>: default output handle */
21684 case '\"': /* $": already loaded files */
21685 tokadd(p, '$');
21686 tokadd(p, c);
21687 goto gvar;
21688
21689 case '-':
21690 tokadd(p, '$');
21691 tokadd(p, c);
21692 c = nextc(p);
21693 if (parser_is_identchar(p)) {
21694 if (tokadd_mbchar(p, c) == -1) return 0;
21695 }
21696 else {
21697 pushback(p, c);
21698 pushback(p, '-');
21699 return '$';
21700 }
21701 gvar:
21702 tokenize_ident(p);
21703 return tGVAR;
21704
21705 case '&': /* $&: last match */
21706 case '`': /* $`: string before last match */
21707 case '\'': /* $': string after last match */
21708 case '+': /* $+: string matches last paren. */
21709 if (IS_lex_state_for(last_state, EXPR_FNAME)) {
21710 tokadd(p, '$');
21711 tokadd(p, c);
21712 goto gvar;
21713 }
21714 set_yylval_node(NEW_BACK_REF(c, &_cur_loc));
21715 return tBACK_REF;
21716
21717 case '1': case '2': case '3':
21718 case '4': case '5': case '6':
21719 case '7': case '8': case '9':
21720 tokadd(p, '$');
21721 do {
21722 tokadd(p, c);
21723 c = nextc(p);
21724 } while (c != -1 && ISDIGIT(c));
21725 pushback(p, c);
21726 if (IS_lex_state_for(last_state, EXPR_FNAME)) goto gvar;
21727 tokfix(p);
21728 c = parse_numvar(p);
21729 set_yylval_node(NEW_NTH_REF(c, &_cur_loc));
21730 return tNTH_REF;
21731
21732 default:
21733 if (!parser_is_identchar(p)) {
21734 YYLTYPE loc = RUBY_INIT_YYLLOC();
21735 if (c == -1 || ISSPACE(c)) {
21736 compile_error(p, "'$' without identifiers is not allowed as a global variable name");
21737 }
21738 else {
21739 pushback(p, c);
21740 compile_error(p, "'$%c' is not allowed as a global variable name", c);
21741 }
21742 parser_show_error_line(p, &loc);
21743 set_yylval_noname();
21744 return tGVAR;
21745 }
21746 /* fall through */
21747 case '0':
21748 tokadd(p, '$');
21749 }
21750
21751 if (tokadd_ident(p, c)) return 0;
21752 SET_LEX_STATE(EXPR_END);
21753 if (VALID_SYMNAME_P(tok(p), toklen(p), p->enc, ID_GLOBAL)) {
21754 tokenize_ident(p);
21755 }
21756 else {
21757 compile_error(p, "'%.*s' is not allowed as a global variable name", toklen(p), tok(p));
21758 set_yylval_noname();
21759 }
21760 return tGVAR;
21761}
21762
21763static bool
21764parser_numbered_param(struct parser_params *p, int n)
21765{
21766 if (n < 0) return false;
21767
21768 if (DVARS_TERMINAL_P(p->lvtbl->args) || DVARS_TERMINAL_P(p->lvtbl->args->prev)) {
21769 return false;
21770 }
21771 if (p->max_numparam == ORDINAL_PARAM) {
21772 compile_error(p, "ordinary parameter is defined");
21773 return false;
21774 }
21775 struct vtable *args = p->lvtbl->args;
21776 if (p->max_numparam < n) {
21777 p->max_numparam = n;
21778 }
21779 while (n > args->pos) {
21780 vtable_add(args, NUMPARAM_IDX_TO_ID(args->pos+1));
21781 }
21782 return true;
21783}
21784
21785static enum yytokentype
21786parse_atmark(struct parser_params *p, const enum lex_state_e last_state)
21787{
21788 const char *ptr = p->lex.pcur;
21789 enum yytokentype result = tIVAR;
21790 register int c = nextc(p);
21791 YYLTYPE loc;
21792
21793 p->lex.ptok = ptr - 1; /* from '@' */
21794 newtok(p);
21795 tokadd(p, '@');
21796 if (c == '@') {
21797 result = tCVAR;
21798 tokadd(p, '@');
21799 c = nextc(p);
21800 }
21801 SET_LEX_STATE(IS_lex_state_for(last_state, EXPR_FNAME) ? EXPR_ENDFN : EXPR_END);
21802 if (c == -1 || !parser_is_identchar(p)) {
21803 pushback(p, c);
21804 RUBY_SET_YYLLOC(loc);
21805 if (result == tIVAR) {
21806 compile_error(p, "'@' without identifiers is not allowed as an instance variable name");
21807 }
21808 else {
21809 compile_error(p, "'@@' without identifiers is not allowed as a class variable name");
21810 }
21811 parser_show_error_line(p, &loc);
21812 set_yylval_noname();
21813 SET_LEX_STATE(EXPR_END);
21814 return result;
21815 }
21816 else if (ISDIGIT(c)) {
21817 pushback(p, c);
21818 RUBY_SET_YYLLOC(loc);
21819 if (result == tIVAR) {
21820 compile_error(p, "'@%c' is not allowed as an instance variable name", c);
21821 }
21822 else {
21823 compile_error(p, "'@@%c' is not allowed as a class variable name", c);
21824 }
21825 parser_show_error_line(p, &loc);
21826 set_yylval_noname();
21827 SET_LEX_STATE(EXPR_END);
21828 return result;
21829 }
21830
21831 if (tokadd_ident(p, c)) return 0;
21832 tokenize_ident(p);
21833 return result;
21834}
21835
21836static enum yytokentype
21837parse_ident(struct parser_params *p, int c, int cmd_state)
21838{
21839 enum yytokentype result;
21840 bool is_ascii = true;
21841 const enum lex_state_e last_state = p->lex.state;
21842 ID ident;
21843 int enforce_keyword_end = 0;
21844
21845 do {
21846 if (!ISASCII(c)) is_ascii = false;
21847 if (tokadd_mbchar(p, c) == -1) return 0;
21848 c = nextc(p);
21849 } while (parser_is_identchar(p));
21850 if ((c == '!' || c == '?') && !peek(p, '=')) {
21851 result = tFID;
21852 tokadd(p, c);
21853 }
21854 else if (c == '=' && IS_lex_state(EXPR_FNAME) &&
21855 (!peek(p, '~') && !peek(p, '>') && (!peek(p, '=') || (peek_n(p, '>', 1))))) {
21856 result = tIDENTIFIER;
21857 tokadd(p, c);
21858 }
21859 else {
21860 result = tCONSTANT; /* assume provisionally */
21861 pushback(p, c);
21862 }
21863 tokfix(p);
21864
21865 if (IS_LABEL_POSSIBLE()) {
21866 if (IS_LABEL_SUFFIX(0)) {
21867 SET_LEX_STATE(EXPR_ARG|EXPR_LABELED);
21868 nextc(p);
21869 tokenize_ident(p);
21870 return tLABEL;
21871 }
21872 }
21873
21874#ifndef RIPPER
21875 if (peek_end_expect_token_locations(p)) {
21876 const rb_code_position_t *end_pos;
21877 int lineno, column;
21878 int beg_pos = parser_column(p->lex.ptok - p->lex.pbeg);
21879
21880 end_pos = peek_end_expect_token_locations(p)->pos;
21881 lineno = end_pos->lineno;
21882 column = end_pos->column;
21883
21884 if (p->debug) {
21885 rb_parser_printf(p, "enforce_keyword_end check. current: (%d, %d), peek: (%d, %d)\n",
21886 p->ruby_sourceline, beg_pos, lineno, column);
21887 }
21888
21889 if ((p->ruby_sourceline > lineno) && (beg_pos <= column)) {
21890 const struct kwtable *kw;
21891
21892 if ((IS_lex_state(EXPR_DOT)) && (kw = rb_reserved_word(tok(p), toklen(p))) && (kw && kw->id[0] == keyword_end)) {
21893 if (p->debug) rb_parser_printf(p, "enforce_keyword_end is enabled\n");
21894 enforce_keyword_end = 1;
21895 }
21896 }
21897 }
21898#endif
21899
21900 if (is_ascii && (!IS_lex_state(EXPR_DOT) || enforce_keyword_end)) {
21901 const struct kwtable *kw;
21902
21903 /* See if it is a reserved word. */
21904 kw = rb_reserved_word(tok(p), toklen(p));
21905 if (kw) {
21906 enum lex_state_e state = p->lex.state;
21907 if (IS_lex_state_for(state, EXPR_FNAME)) {
21908 SET_LEX_STATE(EXPR_ENDFN);
21909 set_yylval_name(rb_intern2(tok(p), toklen(p)));
21910 return kw->id[0];
21911 }
21912 SET_LEX_STATE(kw->state);
21913 if (IS_lex_state(EXPR_BEG)) {
21914 p->command_start = TRUE;
21915 }
21916 if (kw->id[0] == keyword_do) {
21917 if (lambda_beginning_p()) {
21918 p->lex.lpar_beg = -1; /* make lambda_beginning_p() == FALSE in the body of "-> do ... end" */
21919 return keyword_do_LAMBDA;
21920 }
21921 if (COND_P()) return keyword_do_cond;
21922 if (CMDARG_P() && !IS_lex_state_for(state, EXPR_CMDARG))
21923 return keyword_do_block;
21924 return keyword_do;
21925 }
21926 if (IS_lex_state_for(state, (EXPR_BEG | EXPR_LABELED | EXPR_CLASS)))
21927 return kw->id[0];
21928 else {
21929 if (kw->id[0] != kw->id[1])
21930 SET_LEX_STATE(EXPR_BEG | EXPR_LABEL);
21931 return kw->id[1];
21932 }
21933 }
21934 }
21935
21936 if (IS_lex_state(EXPR_BEG_ANY | EXPR_ARG_ANY | EXPR_DOT)) {
21937 if (cmd_state) {
21938 SET_LEX_STATE(EXPR_CMDARG);
21939 }
21940 else {
21941 SET_LEX_STATE(EXPR_ARG);
21942 }
21943 }
21944 else if (p->lex.state == EXPR_FNAME) {
21945 SET_LEX_STATE(EXPR_ENDFN);
21946 }
21947 else {
21948 SET_LEX_STATE(EXPR_END);
21949 }
21950
21951 ident = tokenize_ident(p);
21952 if (result == tCONSTANT && is_local_id(ident)) result = tIDENTIFIER;
21953 if (!IS_lex_state_for(last_state, EXPR_DOT|EXPR_FNAME) &&
21954 (result == tIDENTIFIER) && /* not EXPR_FNAME, not attrasgn */
21955 (lvar_defined(p, ident) || NUMPARAM_ID_P(ident))) {
21956 SET_LEX_STATE(EXPR_END|EXPR_LABEL);
21957 }
21958 return result;
21959}
21960
21961static void
21962warn_cr(struct parser_params *p)
21963{
21964 if (!p->cr_seen) {
21965 p->cr_seen = TRUE;
21966 /* carried over with p->lex.nextline for nextc() */
21967 rb_warn0("encountered \\r in middle of line, treated as a mere space");
21968 }
21969}
21970
21971static enum yytokentype
21972parser_yylex(struct parser_params *p)
21973{
21974 register int c;
21975 int space_seen = 0;
21976 int cmd_state;
21977 int label;
21978 enum lex_state_e last_state;
21979 int fallthru = FALSE;
21980 int token_seen = p->token_seen;
21981
21982 if (p->lex.strterm) {
21983 if (strterm_is_heredoc(p->lex.strterm)) {
21984 token_flush(p);
21985 return here_document(p, &p->lex.strterm->u.heredoc);
21986 }
21987 else {
21988 token_flush(p);
21989 return parse_string(p, &p->lex.strterm->u.literal);
21990 }
21991 }
21992 cmd_state = p->command_start;
21993 p->command_start = FALSE;
21994 p->token_seen = TRUE;
21995#ifndef RIPPER
21996 token_flush(p);
21997#endif
21998 retry:
21999 last_state = p->lex.state;
22000 switch (c = nextc(p)) {
22001 case '\0': /* NUL */
22002 case '\004': /* ^D */
22003 case '\032': /* ^Z */
22004 case -1: /* end of script. */
22005 p->eofp = 1;
22006#ifndef RIPPER
22007 if (p->end_expect_token_locations) {
22008 pop_end_expect_token_locations(p);
22009 RUBY_SET_YYLLOC_OF_DUMMY_END(*p->yylloc);
22010 return tDUMNY_END;
22011 }
22012#endif
22013 /* Set location for end-of-input because dispatch_scan_event is not called. */
22014 RUBY_SET_YYLLOC(*p->yylloc);
22015 return END_OF_INPUT;
22016
22017 /* white spaces */
22018 case '\r':
22019 warn_cr(p);
22020 /* fall through */
22021 case ' ': case '\t': case '\f':
22022 case '\13': /* '\v' */
22023 space_seen = 1;
22024 while ((c = nextc(p))) {
22025 switch (c) {
22026 case '\r':
22027 warn_cr(p);
22028 /* fall through */
22029 case ' ': case '\t': case '\f':
22030 case '\13': /* '\v' */
22031 break;
22032 default:
22033 goto outofloop;
22034 }
22035 }
22036 outofloop:
22037 pushback(p, c);
22038 dispatch_scan_event(p, tSP);
22039#ifndef RIPPER
22040 token_flush(p);
22041#endif
22042 goto retry;
22043
22044 case '#': /* it's a comment */
22045 p->token_seen = token_seen;
22046 const char *const pcur = p->lex.pcur, *const ptok = p->lex.ptok;
22047 /* no magic_comment in shebang line */
22048 if (!parser_magic_comment(p, p->lex.pcur, p->lex.pend - p->lex.pcur)) {
22049 if (comment_at_top(p)) {
22050 set_file_encoding(p, p->lex.pcur, p->lex.pend);
22051 }
22052 }
22053 p->lex.pcur = pcur, p->lex.ptok = ptok;
22054 lex_goto_eol(p);
22055 dispatch_scan_event(p, tCOMMENT);
22056 fallthru = TRUE;
22057 /* fall through */
22058 case '\n':
22059 p->token_seen = token_seen;
22060 rb_parser_string_t *prevline = p->lex.lastline;
22061 c = (IS_lex_state(EXPR_BEG|EXPR_CLASS|EXPR_FNAME|EXPR_DOT) &&
22062 !IS_lex_state(EXPR_LABELED));
22063 if (c || IS_lex_state_all(EXPR_ARG|EXPR_LABELED)) {
22064 if (!fallthru) {
22065 dispatch_scan_event(p, tIGNORED_NL);
22066 }
22067 fallthru = FALSE;
22068 if (!c && p->ctxt.in_kwarg) {
22069 goto normal_newline;
22070 }
22071 goto retry;
22072 }
22073 while (1) {
22074 switch (c = nextc(p)) {
22075 case ' ': case '\t': case '\f': case '\r':
22076 case '\13': /* '\v' */
22077 space_seen = 1;
22078 break;
22079 case '#':
22080 pushback(p, c);
22081 if (space_seen) {
22082 dispatch_scan_event(p, tSP);
22083 token_flush(p);
22084 }
22085 goto retry;
22086 case 'a':
22087 if (peek_word_at(p, "nd", 2, 0)) goto leading_logical;
22088 goto bol;
22089 case 'o':
22090 if (peek_word_at(p, "r", 1, 0)) goto leading_logical;
22091 goto bol;
22092 case '|':
22093 if (peek(p, '|') && !peek_n(p, '=', 1)) goto leading_logical;
22094 goto bol;
22095 case '&':
22096 if (peek(p, '&') && !peek_n(p, '=', 1)) {
22097 leading_logical:
22098 pushback(p, c);
22099 dispatch_delayed_token(p, tIGNORED_NL);
22100 cmd_state = FALSE;
22101 goto retry;
22102 }
22103 /* fall through */
22104 case '.': {
22105 dispatch_delayed_token(p, tIGNORED_NL);
22106 if (peek(p, '.') == (c == '&')) {
22107 pushback(p, c);
22108 dispatch_scan_event(p, tSP);
22109 goto retry;
22110 }
22111 }
22112 bol:
22113 default:
22114 p->ruby_sourceline--;
22115 p->lex.nextline = p->lex.lastline;
22116 set_lastline(p, prevline);
22117 case -1: /* EOF no decrement*/
22118 if (c == -1 && space_seen) {
22119 dispatch_scan_event(p, tSP);
22120 }
22121 lex_goto_eol(p);
22122 if (c != -1) {
22123 token_flush(p);
22124 RUBY_SET_YYLLOC(*p->yylloc);
22125 }
22126 goto normal_newline;
22127 }
22128 }
22129 normal_newline:
22130 p->command_start = TRUE;
22131 SET_LEX_STATE(EXPR_BEG);
22132 return '\n';
22133
22134 case '*':
22135 if ((c = nextc(p)) == '*') {
22136 if ((c = nextc(p)) == '=') {
22137 set_yylval_id(idPow);
22138 SET_LEX_STATE(EXPR_BEG);
22139 return tOP_ASGN;
22140 }
22141 pushback(p, c);
22142 if (IS_SPCARG(c)) {
22143 rb_warning0("'**' interpreted as argument prefix");
22144 c = tDSTAR;
22145 }
22146 else if (IS_BEG()) {
22147 c = tDSTAR;
22148 }
22149 else {
22150 c = warn_balanced((enum ruby_method_ids)tPOW, "**", "argument prefix");
22151 }
22152 }
22153 else {
22154 if (c == '=') {
22155 set_yylval_id('*');
22156 SET_LEX_STATE(EXPR_BEG);
22157 return tOP_ASGN;
22158 }
22159 pushback(p, c);
22160 if (IS_SPCARG(c)) {
22161 rb_warning0("'*' interpreted as argument prefix");
22162 c = tSTAR;
22163 }
22164 else if (IS_BEG()) {
22165 c = tSTAR;
22166 }
22167 else {
22168 c = warn_balanced('*', "*", "argument prefix");
22169 }
22170 }
22171 SET_LEX_STATE(IS_AFTER_OPERATOR() ? EXPR_ARG : EXPR_BEG);
22172 return c;
22173
22174 case '!':
22175 c = nextc(p);
22176 if (IS_AFTER_OPERATOR()) {
22177 SET_LEX_STATE(EXPR_ARG);
22178 if (c == '@') {
22179 return '!';
22180 }
22181 }
22182 else {
22183 SET_LEX_STATE(EXPR_BEG);
22184 }
22185 if (c == '=') {
22186 return tNEQ;
22187 }
22188 if (c == '~') {
22189 return tNMATCH;
22190 }
22191 pushback(p, c);
22192 return '!';
22193
22194 case '=':
22195 if (was_bol(p)) {
22196 /* skip embedded rd document */
22197 if (word_match_p(p, "begin", 5)) {
22198 int first_p = TRUE;
22199
22200 lex_goto_eol(p);
22201 dispatch_scan_event(p, tEMBDOC_BEG);
22202 for (;;) {
22203 lex_goto_eol(p);
22204 if (!first_p) {
22205 dispatch_scan_event(p, tEMBDOC);
22206 }
22207 first_p = FALSE;
22208 c = nextc(p);
22209 if (c == -1) {
22210 compile_error(p, "embedded document meets end of file");
22211 return END_OF_INPUT;
22212 }
22213 if (c == '=' && word_match_p(p, "end", 3)) {
22214 break;
22215 }
22216 pushback(p, c);
22217 }
22218 lex_goto_eol(p);
22219 dispatch_scan_event(p, tEMBDOC_END);
22220 goto retry;
22221 }
22222 }
22223
22224 SET_LEX_STATE(IS_AFTER_OPERATOR() ? EXPR_ARG : EXPR_BEG);
22225 if ((c = nextc(p)) == '=') {
22226 if ((c = nextc(p)) == '=') {
22227 return tEQQ;
22228 }
22229 pushback(p, c);
22230 return tEQ;
22231 }
22232 if (c == '~') {
22233 return tMATCH;
22234 }
22235 else if (c == '>') {
22236 return tASSOC;
22237 }
22238 pushback(p, c);
22239 return '=';
22240
22241 case '<':
22242 c = nextc(p);
22243 if (c == '<' &&
22244 !IS_lex_state(EXPR_DOT | EXPR_CLASS) &&
22245 !IS_END() &&
22246 (!IS_ARG() || IS_lex_state(EXPR_LABELED) || space_seen)) {
22247 enum yytokentype token = heredoc_identifier(p);
22248 if (token) return token < 0 ? 0 : token;
22249 }
22250 if (IS_AFTER_OPERATOR()) {
22251 SET_LEX_STATE(EXPR_ARG);
22252 }
22253 else {
22254 if (IS_lex_state(EXPR_CLASS))
22255 p->command_start = TRUE;
22256 SET_LEX_STATE(EXPR_BEG);
22257 }
22258 if (c == '=') {
22259 if ((c = nextc(p)) == '>') {
22260 return tCMP;
22261 }
22262 pushback(p, c);
22263 return tLEQ;
22264 }
22265 if (c == '<') {
22266 if ((c = nextc(p)) == '=') {
22267 set_yylval_id(idLTLT);
22268 SET_LEX_STATE(EXPR_BEG);
22269 return tOP_ASGN;
22270 }
22271 pushback(p, c);
22272 return warn_balanced((enum ruby_method_ids)tLSHFT, "<<", "here document");
22273 }
22274 pushback(p, c);
22275 return '<';
22276
22277 case '>':
22278 SET_LEX_STATE(IS_AFTER_OPERATOR() ? EXPR_ARG : EXPR_BEG);
22279 if ((c = nextc(p)) == '=') {
22280 return tGEQ;
22281 }
22282 if (c == '>') {
22283 if ((c = nextc(p)) == '=') {
22284 set_yylval_id(idGTGT);
22285 SET_LEX_STATE(EXPR_BEG);
22286 return tOP_ASGN;
22287 }
22288 pushback(p, c);
22289 return tRSHFT;
22290 }
22291 pushback(p, c);
22292 return '>';
22293
22294 case '"':
22295 label = (IS_LABEL_POSSIBLE() ? str_label : 0);
22296 p->lex.strterm = NEW_STRTERM(str_dquote | label, '"', 0);
22297 p->lex.ptok = p->lex.pcur-1;
22298 return tSTRING_BEG;
22299
22300 case '`':
22301 if (IS_lex_state(EXPR_FNAME)) {
22302 SET_LEX_STATE(EXPR_ENDFN);
22303 return c;
22304 }
22305 if (IS_lex_state(EXPR_DOT)) {
22306 if (cmd_state)
22307 SET_LEX_STATE(EXPR_CMDARG);
22308 else
22309 SET_LEX_STATE(EXPR_ARG);
22310 return c;
22311 }
22312 p->lex.strterm = NEW_STRTERM(str_xquote, '`', 0);
22313 return tXSTRING_BEG;
22314
22315 case '\'':
22316 label = (IS_LABEL_POSSIBLE() ? str_label : 0);
22317 p->lex.strterm = NEW_STRTERM(str_squote | label, '\'', 0);
22318 p->lex.ptok = p->lex.pcur-1;
22319 return tSTRING_BEG;
22320
22321 case '?':
22322 return parse_qmark(p, space_seen);
22323
22324 case '&':
22325 if ((c = nextc(p)) == '&') {
22326 SET_LEX_STATE(EXPR_BEG);
22327 if ((c = nextc(p)) == '=') {
22328 set_yylval_id(idANDOP);
22329 SET_LEX_STATE(EXPR_BEG);
22330 return tOP_ASGN;
22331 }
22332 pushback(p, c);
22333 return tANDOP;
22334 }
22335 else if (c == '=') {
22336 set_yylval_id('&');
22337 SET_LEX_STATE(EXPR_BEG);
22338 return tOP_ASGN;
22339 }
22340 else if (c == '.') {
22341 set_yylval_id(idANDDOT);
22342 SET_LEX_STATE(EXPR_DOT);
22343 return tANDDOT;
22344 }
22345 pushback(p, c);
22346 if (IS_SPCARG(c)) {
22347 if ((c != ':') ||
22348 (c = peekc_n(p, 1)) == -1 ||
22349 !(c == '\'' || c == '"' ||
22350 is_identchar(p, (p->lex.pcur+1), p->lex.pend, p->enc))) {
22351 rb_warning0("'&' interpreted as argument prefix");
22352 }
22353 c = tAMPER;
22354 }
22355 else if (IS_BEG()) {
22356 c = tAMPER;
22357 }
22358 else {
22359 c = warn_balanced('&', "&", "argument prefix");
22360 }
22361 SET_LEX_STATE(IS_AFTER_OPERATOR() ? EXPR_ARG : EXPR_BEG);
22362 return c;
22363
22364 case '|':
22365 if ((c = nextc(p)) == '|') {
22366 SET_LEX_STATE(EXPR_BEG);
22367 if ((c = nextc(p)) == '=') {
22368 set_yylval_id(idOROP);
22369 SET_LEX_STATE(EXPR_BEG);
22370 return tOP_ASGN;
22371 }
22372 pushback(p, c);
22373 if (IS_lex_state_for(last_state, EXPR_BEG)) {
22374 c = '|';
22375 pushback(p, '|');
22376 return c;
22377 }
22378 return tOROP;
22379 }
22380 if (c == '=') {
22381 set_yylval_id('|');
22382 SET_LEX_STATE(EXPR_BEG);
22383 return tOP_ASGN;
22384 }
22385 SET_LEX_STATE(IS_AFTER_OPERATOR() ? EXPR_ARG : EXPR_BEG|EXPR_LABEL);
22386 pushback(p, c);
22387 return '|';
22388
22389 case '+':
22390 c = nextc(p);
22391 if (IS_AFTER_OPERATOR()) {
22392 SET_LEX_STATE(EXPR_ARG);
22393 if (c == '@') {
22394 return tUPLUS;
22395 }
22396 pushback(p, c);
22397 return '+';
22398 }
22399 if (c == '=') {
22400 set_yylval_id('+');
22401 SET_LEX_STATE(EXPR_BEG);
22402 return tOP_ASGN;
22403 }
22404 if (IS_BEG() || (IS_SPCARG(c) && arg_ambiguous(p, '+'))) {
22405 SET_LEX_STATE(EXPR_BEG);
22406 pushback(p, c);
22407 if (c != -1 && ISDIGIT(c)) {
22408 return parse_numeric(p, '+');
22409 }
22410 return tUPLUS;
22411 }
22412 SET_LEX_STATE(EXPR_BEG);
22413 pushback(p, c);
22414 return warn_balanced('+', "+", "unary operator");
22415
22416 case '-':
22417 c = nextc(p);
22418 if (IS_AFTER_OPERATOR()) {
22419 SET_LEX_STATE(EXPR_ARG);
22420 if (c == '@') {
22421 return tUMINUS;
22422 }
22423 pushback(p, c);
22424 return '-';
22425 }
22426 if (c == '=') {
22427 set_yylval_id('-');
22428 SET_LEX_STATE(EXPR_BEG);
22429 return tOP_ASGN;
22430 }
22431 if (c == '>') {
22432 SET_LEX_STATE(EXPR_ENDFN);
22433 yylval.num = p->lex.lpar_beg;
22434 p->lex.lpar_beg = p->lex.paren_nest;
22435 return tLAMBDA;
22436 }
22437 if (IS_BEG() || (IS_SPCARG(c) && arg_ambiguous(p, '-'))) {
22438 SET_LEX_STATE(EXPR_BEG);
22439 pushback(p, c);
22440 if (c != -1 && ISDIGIT(c)) {
22441 return tUMINUS_NUM;
22442 }
22443 return tUMINUS;
22444 }
22445 SET_LEX_STATE(EXPR_BEG);
22446 pushback(p, c);
22447 return warn_balanced('-', "-", "unary operator");
22448
22449 case '.': {
22450 int is_beg = IS_BEG();
22451 SET_LEX_STATE(EXPR_BEG);
22452 if ((c = nextc(p)) == '.') {
22453 if ((c = nextc(p)) == '.') {
22454 if (p->ctxt.in_argdef || IS_LABEL_POSSIBLE()) {
22455 SET_LEX_STATE(EXPR_ENDARG);
22456 return tBDOT3;
22457 }
22458 if (p->lex.paren_nest == 0 && looking_at_eol_p(p)) {
22459 rb_warn0("... at EOL, should be parenthesized?");
22460 }
22461 return is_beg ? tBDOT3 : tDOT3;
22462 }
22463 pushback(p, c);
22464 return is_beg ? tBDOT2 : tDOT2;
22465 }
22466 pushback(p, c);
22467 if (c != -1 && ISDIGIT(c)) {
22468 char prev = p->lex.pcur-1 > p->lex.pbeg ? *(p->lex.pcur-2) : 0;
22469 parse_numeric(p, '.');
22470 if (ISDIGIT(prev)) {
22471 yyerror0("unexpected fraction part after numeric literal");
22472 }
22473 else {
22474 yyerror0("no .<digit> floating literal anymore; put 0 before dot");
22475 }
22476 set_yylval_id(idNULL);
22477 SET_LEX_STATE(EXPR_END);
22478 p->lex.ptok = p->lex.pcur;
22479 goto retry;
22480 }
22481 set_yylval_id('.');
22482 SET_LEX_STATE(EXPR_DOT);
22483 return '.';
22484 }
22485
22486 case '0': case '1': case '2': case '3': case '4':
22487 case '5': case '6': case '7': case '8': case '9':
22488 return parse_numeric(p, c);
22489
22490 case ')':
22491 COND_POP();
22492 CMDARG_POP();
22493 SET_LEX_STATE(EXPR_ENDFN);
22494 p->lex.paren_nest--;
22495 return c;
22496
22497 case ']':
22498 COND_POP();
22499 CMDARG_POP();
22500 SET_LEX_STATE(EXPR_END);
22501 p->lex.paren_nest--;
22502 return c;
22503
22504 case '}':
22505 /* tSTRING_DEND does COND_POP and CMDARG_POP in the yacc's rule */
22506 if (!p->lex.brace_nest--) return tSTRING_DEND;
22507 COND_POP();
22508 CMDARG_POP();
22509 SET_LEX_STATE(EXPR_END);
22510 p->lex.paren_nest--;
22511 return c;
22512
22513 case ':':
22514 c = nextc(p);
22515 if (c == ':') {
22516 if (IS_BEG() || IS_lex_state(EXPR_CLASS) || IS_SPCARG(-1)) {
22517 SET_LEX_STATE(EXPR_BEG);
22518 return tCOLON3;
22519 }
22520 set_yylval_id(idCOLON2);
22521 SET_LEX_STATE(EXPR_DOT);
22522 return tCOLON2;
22523 }
22524 if (IS_END() || ISSPACE(c) || c == '#') {
22525 pushback(p, c);
22526 c = warn_balanced(':', ":", "symbol literal");
22527 SET_LEX_STATE(EXPR_BEG);
22528 return c;
22529 }
22530 switch (c) {
22531 case '\'':
22532 p->lex.strterm = NEW_STRTERM(str_ssym, c, 0);
22533 break;
22534 case '"':
22535 p->lex.strterm = NEW_STRTERM(str_dsym, c, 0);
22536 break;
22537 default:
22538 pushback(p, c);
22539 break;
22540 }
22541 SET_LEX_STATE(EXPR_FNAME);
22542 return tSYMBEG;
22543
22544 case '/':
22545 if (IS_BEG()) {
22546 p->lex.strterm = NEW_STRTERM(str_regexp, '/', 0);
22547 return tREGEXP_BEG;
22548 }
22549 if ((c = nextc(p)) == '=') {
22550 set_yylval_id('/');
22551 SET_LEX_STATE(EXPR_BEG);
22552 return tOP_ASGN;
22553 }
22554 pushback(p, c);
22555 if (IS_SPCARG(c)) {
22556 arg_ambiguous(p, '/');
22557 p->lex.strterm = NEW_STRTERM(str_regexp, '/', 0);
22558 return tREGEXP_BEG;
22559 }
22560 SET_LEX_STATE(IS_AFTER_OPERATOR() ? EXPR_ARG : EXPR_BEG);
22561 return warn_balanced('/', "/", "regexp literal");
22562
22563 case '^':
22564 if ((c = nextc(p)) == '=') {
22565 set_yylval_id('^');
22566 SET_LEX_STATE(EXPR_BEG);
22567 return tOP_ASGN;
22568 }
22569 SET_LEX_STATE(IS_AFTER_OPERATOR() ? EXPR_ARG : EXPR_BEG);
22570 pushback(p, c);
22571 return '^';
22572
22573 case ';':
22574 SET_LEX_STATE(EXPR_BEG);
22575 p->command_start = TRUE;
22576 return ';';
22577
22578 case ',':
22579 SET_LEX_STATE(EXPR_BEG|EXPR_LABEL);
22580 return ',';
22581
22582 case '~':
22583 if (IS_AFTER_OPERATOR()) {
22584 if ((c = nextc(p)) != '@') {
22585 pushback(p, c);
22586 }
22587 SET_LEX_STATE(EXPR_ARG);
22588 }
22589 else {
22590 SET_LEX_STATE(EXPR_BEG);
22591 }
22592 return '~';
22593
22594 case '(':
22595 if (IS_BEG()) {
22596 c = tLPAREN;
22597 }
22598 else if (!space_seen) {
22599 /* foo( ... ) => method call, no ambiguity */
22600 }
22601 else if (IS_ARG() || IS_lex_state_all(EXPR_END|EXPR_LABEL)) {
22602 c = tLPAREN_ARG;
22603 }
22604 else if (IS_lex_state(EXPR_ENDFN) && !lambda_beginning_p()) {
22605 rb_warning0("parentheses after method name is interpreted as "
22606 "an argument list, not a decomposed argument");
22607 }
22608 p->lex.paren_nest++;
22609 COND_PUSH(0);
22610 CMDARG_PUSH(0);
22611 SET_LEX_STATE(EXPR_BEG|EXPR_LABEL);
22612 return c;
22613
22614 case '[':
22615 p->lex.paren_nest++;
22616 if (IS_AFTER_OPERATOR()) {
22617 if ((c = nextc(p)) == ']') {
22618 p->lex.paren_nest--;
22619 SET_LEX_STATE(EXPR_ARG);
22620 if ((c = nextc(p)) == '=') {
22621 return tASET;
22622 }
22623 pushback(p, c);
22624 return tAREF;
22625 }
22626 pushback(p, c);
22627 SET_LEX_STATE(EXPR_ARG|EXPR_LABEL);
22628 return '[';
22629 }
22630 else if (IS_BEG()) {
22631 c = tLBRACK;
22632 }
22633 else if (IS_ARG() && (space_seen || IS_lex_state(EXPR_LABELED))) {
22634 c = tLBRACK;
22635 }
22636 SET_LEX_STATE(EXPR_BEG|EXPR_LABEL);
22637 COND_PUSH(0);
22638 CMDARG_PUSH(0);
22639 return c;
22640
22641 case '{':
22642 ++p->lex.brace_nest;
22643 if (lambda_beginning_p())
22644 c = tLAMBEG;
22645 else if (IS_lex_state(EXPR_LABELED))
22646 c = tLBRACE; /* hash */
22647 else if (IS_lex_state(EXPR_ARG_ANY | EXPR_END | EXPR_ENDFN))
22648 c = '{'; /* block (primary) */
22649 else if (IS_lex_state(EXPR_ENDARG))
22650 c = tLBRACE_ARG; /* block (expr) */
22651 else
22652 c = tLBRACE; /* hash */
22653 if (c != tLBRACE) {
22654 p->command_start = TRUE;
22655 SET_LEX_STATE(EXPR_BEG);
22656 }
22657 else {
22658 SET_LEX_STATE(EXPR_BEG|EXPR_LABEL);
22659 }
22660 ++p->lex.paren_nest; /* after lambda_beginning_p() */
22661 COND_PUSH(0);
22662 CMDARG_PUSH(0);
22663 return c;
22664
22665 case '\\':
22666 c = nextc(p);
22667 if (c == '\n') {
22668 space_seen = 1;
22669 dispatch_scan_event(p, tSP);
22670 goto retry; /* skip \\n */
22671 }
22672 if (c == ' ') return tSP;
22673 if (ISSPACE(c)) return c;
22674 pushback(p, c);
22675 return '\\';
22676
22677 case '%':
22678 return parse_percent(p, space_seen, last_state);
22679
22680 case '$':
22681 return parse_gvar(p, last_state);
22682
22683 case '@':
22684 return parse_atmark(p, last_state);
22685
22686 case '_':
22687 if (was_bol(p) && whole_match_p(p, "__END__", 7, 0)) {
22688 p->ruby__end__seen = 1;
22689 p->eofp = 1;
22690#ifdef RIPPER
22691 lex_goto_eol(p);
22692 dispatch_scan_event(p, k__END__);
22693#endif
22694 return END_OF_INPUT;
22695 }
22696 newtok(p);
22697 break;
22698
22699 default:
22700 if (!parser_is_identchar(p)) {
22701 compile_error(p, "Invalid char '\\x%02X' in expression", c);
22702 token_flush(p);
22703 goto retry;
22704 }
22705
22706 newtok(p);
22707 break;
22708 }
22709
22710 return parse_ident(p, c, cmd_state);
22711}
22712
22713static enum yytokentype
22714yylex(YYSTYPE *lval, YYLTYPE *yylloc, struct parser_params *p)
22715{
22716 enum yytokentype t;
22717
22718 p->lval = lval;
22719 lval->node = 0;
22720 p->yylloc = yylloc;
22721
22722 t = parser_yylex(p);
22723
22724 if (has_delayed_token(p))
22725 dispatch_delayed_token(p, t);
22726 else if (t != END_OF_INPUT)
22727 dispatch_scan_event(p, t);
22728
22729 return t;
22730}
22731
22732#define LVAR_USED ((ID)1 << (sizeof(ID) * CHAR_BIT - 1))
22733
22734static NODE*
22735node_new_internal(struct parser_params *p, enum node_type type, size_t size, size_t alignment)
22736{
22737 NODE *n = rb_ast_newnode(p->ast, type, size, alignment);
22738
22739 rb_node_init(n, type);
22740 return n;
22741}
22742
22743static NODE *
22744nd_set_loc(NODE *nd, const YYLTYPE *loc)
22745{
22746 nd->nd_loc = *loc;
22747 nd_set_line(nd, loc->beg_pos.lineno);
22748 return nd;
22749}
22750
22751static NODE*
22752node_newnode(struct parser_params *p, enum node_type type, size_t size, size_t alignment, const rb_code_location_t *loc)
22753{
22754 NODE *n = node_new_internal(p, type, size, alignment);
22755
22756 nd_set_loc(n, loc);
22757 nd_set_node_id(n, parser_get_node_id(p));
22758 return n;
22759}
22760
22761#define NODE_NEWNODE(node_type, type, loc) (type *)(node_newnode(p, node_type, sizeof(type), RUBY_ALIGNOF(type), loc))
22762
22763static rb_node_scope_t *
22764rb_node_scope_new(struct parser_params *p, rb_node_args_t *nd_args, NODE *nd_body, NODE *nd_parent, const YYLTYPE *loc)
22765{
22766 rb_ast_id_table_t *nd_tbl;
22767 nd_tbl = local_tbl(p);
22768 rb_node_scope_t *n = NODE_NEWNODE(NODE_SCOPE, rb_node_scope_t, loc);
22769 n->nd_tbl = nd_tbl;
22770 n->nd_body = nd_body;
22771 n->nd_parent = nd_parent;
22772 n->nd_args = nd_args;
22773
22774 return n;
22775}
22776
22777static rb_node_scope_t *
22778rb_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)
22779{
22780 rb_node_scope_t *n = NODE_NEWNODE(NODE_SCOPE, rb_node_scope_t, loc);
22781 n->nd_tbl = nd_tbl;
22782 n->nd_body = nd_body;
22783 n->nd_parent = nd_parent;
22784 n->nd_args = nd_args;
22785
22786 return n;
22787}
22788
22789static rb_node_defn_t *
22790rb_node_defn_new(struct parser_params *p, ID nd_mid, NODE *nd_defn, const YYLTYPE *loc)
22791{
22792 rb_node_defn_t *n = NODE_NEWNODE(NODE_DEFN, rb_node_defn_t, loc);
22793 n->nd_mid = nd_mid;
22794 n->nd_defn = nd_defn;
22795
22796 return n;
22797}
22798
22799static rb_node_defs_t *
22800rb_node_defs_new(struct parser_params *p, NODE *nd_recv, ID nd_mid, NODE *nd_defn, const YYLTYPE *loc)
22801{
22802 rb_node_defs_t *n = NODE_NEWNODE(NODE_DEFS, rb_node_defs_t, loc);
22803 n->nd_recv = nd_recv;
22804 n->nd_mid = nd_mid;
22805 n->nd_defn = nd_defn;
22806
22807 return n;
22808}
22809
22810static rb_node_block_t *
22811rb_node_block_new(struct parser_params *p, NODE *nd_head, const YYLTYPE *loc)
22812{
22813 rb_node_block_t *n = NODE_NEWNODE(NODE_BLOCK, rb_node_block_t, loc);
22814 n->nd_head = nd_head;
22815 n->nd_end = (NODE *)n;
22816 n->nd_next = 0;
22817
22818 return n;
22819}
22820
22821static rb_node_for_t *
22822rb_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)
22823{
22824 rb_node_for_t *n = NODE_NEWNODE(NODE_FOR, rb_node_for_t, loc);
22825 n->nd_body = nd_body;
22826 n->nd_iter = nd_iter;
22827 n->for_keyword_loc = *for_keyword_loc;
22828 n->in_keyword_loc = *in_keyword_loc;
22829 n->do_keyword_loc = *do_keyword_loc;
22830 n->end_keyword_loc = *end_keyword_loc;
22831
22832 return n;
22833}
22834
22835static rb_node_for_masgn_t *
22836rb_node_for_masgn_new(struct parser_params *p, NODE *nd_var, const YYLTYPE *loc)
22837{
22838 rb_node_for_masgn_t *n = NODE_NEWNODE(NODE_FOR_MASGN, rb_node_for_masgn_t, loc);
22839 n->nd_var = nd_var;
22840
22841 return n;
22842}
22843
22844static rb_node_retry_t *
22845rb_node_retry_new(struct parser_params *p, const YYLTYPE *loc)
22846{
22847 rb_node_retry_t *n = NODE_NEWNODE(NODE_RETRY, rb_node_retry_t, loc);
22848
22849 return n;
22850}
22851
22852static rb_node_begin_t *
22853rb_node_begin_new(struct parser_params *p, NODE *nd_body, const YYLTYPE *loc)
22854{
22855 rb_node_begin_t *n = NODE_NEWNODE(NODE_BEGIN, rb_node_begin_t, loc);
22856 n->nd_body = nd_body;
22857
22858 return n;
22859}
22860
22861static rb_node_rescue_t *
22862rb_node_rescue_new(struct parser_params *p, NODE *nd_head, NODE *nd_resq, NODE *nd_else, const YYLTYPE *loc)
22863{
22864 rb_node_rescue_t *n = NODE_NEWNODE(NODE_RESCUE, rb_node_rescue_t, loc);
22865 n->nd_head = nd_head;
22866 n->nd_resq = nd_resq;
22867 n->nd_else = nd_else;
22868
22869 return n;
22870}
22871
22872static rb_node_resbody_t *
22873rb_node_resbody_new(struct parser_params *p, NODE *nd_args, NODE *nd_exc_var, NODE *nd_body, NODE *nd_next, const YYLTYPE *loc)
22874{
22875 rb_node_resbody_t *n = NODE_NEWNODE(NODE_RESBODY, rb_node_resbody_t, loc);
22876 n->nd_args = nd_args;
22877 n->nd_exc_var = nd_exc_var;
22878 n->nd_body = nd_body;
22879 n->nd_next = nd_next;
22880
22881 return n;
22882}
22883
22884static rb_node_ensure_t *
22885rb_node_ensure_new(struct parser_params *p, NODE *nd_head, NODE *nd_ensr, const YYLTYPE *loc)
22886{
22887 rb_node_ensure_t *n = NODE_NEWNODE(NODE_ENSURE, rb_node_ensure_t, loc);
22888 n->nd_head = nd_head;
22889 n->nd_ensr = nd_ensr;
22890
22891 return n;
22892}
22893
22894static rb_node_and_t *
22895rb_node_and_new(struct parser_params *p, NODE *nd_1st, NODE *nd_2nd, const YYLTYPE *loc, const YYLTYPE *operator_loc)
22896{
22897 rb_node_and_t *n = NODE_NEWNODE(NODE_AND, rb_node_and_t, loc);
22898 n->nd_1st = nd_1st;
22899 n->nd_2nd = nd_2nd;
22900 n->operator_loc = *operator_loc;
22901
22902 return n;
22903}
22904
22905static rb_node_or_t *
22906rb_node_or_new(struct parser_params *p, NODE *nd_1st, NODE *nd_2nd, const YYLTYPE *loc, const YYLTYPE *operator_loc)
22907{
22908 rb_node_or_t *n = NODE_NEWNODE(NODE_OR, rb_node_or_t, loc);
22909 n->nd_1st = nd_1st;
22910 n->nd_2nd = nd_2nd;
22911 n->operator_loc = *operator_loc;
22912
22913 return n;
22914}
22915
22916static rb_node_return_t *
22917rb_node_return_new(struct parser_params *p, NODE *nd_stts, const YYLTYPE *loc, const YYLTYPE *keyword_loc)
22918{
22919 rb_node_return_t *n = NODE_NEWNODE(NODE_RETURN, rb_node_return_t, loc);
22920 n->nd_stts = nd_stts;
22921 n->keyword_loc = *keyword_loc;
22922 return n;
22923}
22924
22925static rb_node_yield_t *
22926rb_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)
22927{
22928 if (nd_head) no_blockarg(p, nd_head);
22929
22930 rb_node_yield_t *n = NODE_NEWNODE(NODE_YIELD, rb_node_yield_t, loc);
22931 n->nd_head = nd_head;
22932 n->keyword_loc = *keyword_loc;
22933 n->lparen_loc = *lparen_loc;
22934 n->rparen_loc = *rparen_loc;
22935
22936 return n;
22937}
22938
22939static rb_node_if_t *
22940rb_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)
22941{
22942 rb_node_if_t *n = NODE_NEWNODE(NODE_IF, rb_node_if_t, loc);
22943 n->nd_cond = nd_cond;
22944 n->nd_body = nd_body;
22945 n->nd_else = nd_else;
22946 n->if_keyword_loc = *if_keyword_loc;
22947 n->then_keyword_loc = *then_keyword_loc;
22948 n->end_keyword_loc = *end_keyword_loc;
22949
22950 return n;
22951}
22952
22953static rb_node_unless_t *
22954rb_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)
22955{
22956 rb_node_unless_t *n = NODE_NEWNODE(NODE_UNLESS, rb_node_unless_t, loc);
22957 n->nd_cond = nd_cond;
22958 n->nd_body = nd_body;
22959 n->nd_else = nd_else;
22960 n->keyword_loc = *keyword_loc;
22961 n->then_keyword_loc = *then_keyword_loc;
22962 n->end_keyword_loc = *end_keyword_loc;
22963
22964 return n;
22965}
22966
22967static rb_node_class_t *
22968rb_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)
22969{
22970 /* Keep the order of node creation */
22971 NODE *scope = NEW_SCOPE(0, nd_body, NULL, loc);
22972 rb_node_class_t *n = NODE_NEWNODE(NODE_CLASS, rb_node_class_t, loc);
22973 RNODE_SCOPE(scope)->nd_parent = &n->node;
22974 n->nd_cpath = nd_cpath;
22975 n->nd_body = scope;
22976 n->nd_super = nd_super;
22977 n->class_keyword_loc = *class_keyword_loc;
22978 n->inheritance_operator_loc = *inheritance_operator_loc;
22979 n->end_keyword_loc = *end_keyword_loc;
22980
22981 return n;
22982}
22983
22984static rb_node_sclass_t *
22985rb_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)
22986{
22987 /* Keep the order of node creation */
22988 NODE *scope = NEW_SCOPE(0, nd_body, NULL, loc);
22989 rb_node_sclass_t *n = NODE_NEWNODE(NODE_SCLASS, rb_node_sclass_t, loc);
22990 RNODE_SCOPE(scope)->nd_parent = &n->node;
22991 n->nd_recv = nd_recv;
22992 n->nd_body = scope;
22993 n->class_keyword_loc = *class_keyword_loc;
22994 n->operator_loc = *operator_loc;
22995 n->end_keyword_loc = *end_keyword_loc;
22996
22997 return n;
22998}
22999
23000static rb_node_module_t *
23001rb_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)
23002{
23003 /* Keep the order of node creation */
23004 NODE *scope = NEW_SCOPE(0, nd_body, NULL, loc);
23005 rb_node_module_t *n = NODE_NEWNODE(NODE_MODULE, rb_node_module_t, loc);
23006 RNODE_SCOPE(scope)->nd_parent = &n->node;
23007 n->nd_cpath = nd_cpath;
23008 n->nd_body = scope;
23009 n->module_keyword_loc = *module_keyword_loc;
23010 n->end_keyword_loc = *end_keyword_loc;
23011
23012 return n;
23013}
23014
23015static rb_node_iter_t *
23016rb_node_iter_new(struct parser_params *p, rb_node_args_t *nd_args, NODE *nd_body, const YYLTYPE *loc)
23017{
23018 /* Keep the order of node creation */
23019 NODE *scope = NEW_SCOPE(nd_args, nd_body, NULL, loc);
23020 rb_node_iter_t *n = NODE_NEWNODE(NODE_ITER, rb_node_iter_t, loc);
23021 RNODE_SCOPE(scope)->nd_parent = &n->node;
23022 n->nd_body = scope;
23023 n->nd_iter = 0;
23024
23025 return n;
23026}
23027
23028static rb_node_lambda_t *
23029rb_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)
23030{
23031 /* Keep the order of node creation */
23032 NODE *scope = NEW_SCOPE(nd_args, nd_body, NULL, loc);
23033 YYLTYPE lambda_loc = code_loc_gen(operator_loc, closing_loc);
23034 rb_node_lambda_t *n = NODE_NEWNODE(NODE_LAMBDA, rb_node_lambda_t, &lambda_loc);
23035 RNODE_SCOPE(scope)->nd_parent = &n->node;
23036 n->nd_body = scope;
23037 n->operator_loc = *operator_loc;
23038 n->opening_loc = *opening_loc;
23039 n->closing_loc = *closing_loc;
23040
23041 return n;
23042}
23043
23044static rb_node_case_t *
23045rb_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)
23046{
23047 rb_node_case_t *n = NODE_NEWNODE(NODE_CASE, rb_node_case_t, loc);
23048 n->nd_head = nd_head;
23049 n->nd_body = nd_body;
23050 n->case_keyword_loc = *case_keyword_loc;
23051 n->end_keyword_loc = *end_keyword_loc;
23052
23053 return n;
23054}
23055
23056static rb_node_case2_t *
23057rb_node_case2_new(struct parser_params *p, NODE *nd_body, const YYLTYPE *loc, const YYLTYPE *case_keyword_loc, const YYLTYPE *end_keyword_loc)
23058{
23059 rb_node_case2_t *n = NODE_NEWNODE(NODE_CASE2, rb_node_case2_t, loc);
23060 n->nd_head = 0;
23061 n->nd_body = nd_body;
23062 n->case_keyword_loc = *case_keyword_loc;
23063 n->end_keyword_loc = *end_keyword_loc;
23064
23065 return n;
23066}
23067
23068static rb_node_case3_t *
23069rb_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)
23070{
23071 rb_node_case3_t *n = NODE_NEWNODE(NODE_CASE3, rb_node_case3_t, loc);
23072 n->nd_head = nd_head;
23073 n->nd_body = nd_body;
23074 n->case_keyword_loc = *case_keyword_loc;
23075 n->end_keyword_loc = *end_keyword_loc;
23076
23077 return n;
23078}
23079
23080static rb_node_when_t *
23081rb_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)
23082{
23083 rb_node_when_t *n = NODE_NEWNODE(NODE_WHEN, rb_node_when_t, loc);
23084 n->nd_head = nd_head;
23085 n->nd_body = nd_body;
23086 n->nd_next = nd_next;
23087 n->keyword_loc = *keyword_loc;
23088 n->then_keyword_loc = *then_keyword_loc;
23089
23090 return n;
23091}
23092
23093static rb_node_in_t *
23094rb_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)
23095{
23096 rb_node_in_t *n = NODE_NEWNODE(NODE_IN, rb_node_in_t, loc);
23097 n->nd_head = nd_head;
23098 n->nd_body = nd_body;
23099 n->nd_next = nd_next;
23100 n->in_keyword_loc = *in_keyword_loc;
23101 n->then_keyword_loc = *then_keyword_loc;
23102 n->operator_loc = *operator_loc;
23103
23104 return n;
23105}
23106
23107static rb_node_while_t *
23108rb_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)
23109{
23110 rb_node_while_t *n = NODE_NEWNODE(NODE_WHILE, rb_node_while_t, loc);
23111 n->nd_cond = nd_cond;
23112 n->nd_body = nd_body;
23113 n->nd_state = nd_state;
23114 n->keyword_loc = *keyword_loc;
23115 n->closing_loc = *closing_loc;
23116
23117 return n;
23118}
23119
23120static rb_node_until_t *
23121rb_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)
23122{
23123 rb_node_until_t *n = NODE_NEWNODE(NODE_UNTIL, rb_node_until_t, loc);
23124 n->nd_cond = nd_cond;
23125 n->nd_body = nd_body;
23126 n->nd_state = nd_state;
23127 n->keyword_loc = *keyword_loc;
23128 n->closing_loc = *closing_loc;
23129
23130 return n;
23131}
23132
23133static rb_node_colon2_t *
23134rb_node_colon2_new(struct parser_params *p, NODE *nd_head, ID nd_mid, const YYLTYPE *loc, const YYLTYPE *delimiter_loc, const YYLTYPE *name_loc)
23135{
23136 rb_node_colon2_t *n = NODE_NEWNODE(NODE_COLON2, rb_node_colon2_t, loc);
23137 n->nd_head = nd_head;
23138 n->nd_mid = nd_mid;
23139 n->delimiter_loc = *delimiter_loc;
23140 n->name_loc = *name_loc;
23141
23142 return n;
23143}
23144
23145static rb_node_colon3_t *
23146rb_node_colon3_new(struct parser_params *p, ID nd_mid, const YYLTYPE *loc, const YYLTYPE *delimiter_loc, const YYLTYPE *name_loc)
23147{
23148 rb_node_colon3_t *n = NODE_NEWNODE(NODE_COLON3, rb_node_colon3_t, loc);
23149 n->nd_mid = nd_mid;
23150 n->delimiter_loc = *delimiter_loc;
23151 n->name_loc = *name_loc;
23152
23153 return n;
23154}
23155
23156static rb_node_dot2_t *
23157rb_node_dot2_new(struct parser_params *p, NODE *nd_beg, NODE *nd_end, const YYLTYPE *loc, const YYLTYPE *operator_loc)
23158{
23159 rb_node_dot2_t *n = NODE_NEWNODE(NODE_DOT2, rb_node_dot2_t, loc);
23160 n->nd_beg = nd_beg;
23161 n->nd_end = nd_end;
23162 n->operator_loc = *operator_loc;
23163
23164 return n;
23165}
23166
23167static rb_node_dot3_t *
23168rb_node_dot3_new(struct parser_params *p, NODE *nd_beg, NODE *nd_end, const YYLTYPE *loc, const YYLTYPE *operator_loc)
23169{
23170 rb_node_dot3_t *n = NODE_NEWNODE(NODE_DOT3, rb_node_dot3_t, loc);
23171 n->nd_beg = nd_beg;
23172 n->nd_end = nd_end;
23173 n->operator_loc = *operator_loc;
23174
23175 return n;
23176}
23177
23178static rb_node_self_t *
23179rb_node_self_new(struct parser_params *p, const YYLTYPE *loc)
23180{
23181 rb_node_self_t *n = NODE_NEWNODE(NODE_SELF, rb_node_self_t, loc);
23182 n->nd_state = 1;
23183
23184 return n;
23185}
23186
23187static rb_node_nil_t *
23188rb_node_nil_new(struct parser_params *p, const YYLTYPE *loc)
23189{
23190 rb_node_nil_t *n = NODE_NEWNODE(NODE_NIL, rb_node_nil_t, loc);
23191
23192 return n;
23193}
23194
23195static rb_node_true_t *
23196rb_node_true_new(struct parser_params *p, const YYLTYPE *loc)
23197{
23198 rb_node_true_t *n = NODE_NEWNODE(NODE_TRUE, rb_node_true_t, loc);
23199
23200 return n;
23201}
23202
23203static rb_node_false_t *
23204rb_node_false_new(struct parser_params *p, const YYLTYPE *loc)
23205{
23206 rb_node_false_t *n = NODE_NEWNODE(NODE_FALSE, rb_node_false_t, loc);
23207
23208 return n;
23209}
23210
23211static rb_node_super_t *
23212rb_node_super_new(struct parser_params *p, NODE *nd_args, const YYLTYPE *loc,
23213 const YYLTYPE *keyword_loc, const YYLTYPE *lparen_loc, const YYLTYPE *rparen_loc)
23214{
23215 rb_node_super_t *n = NODE_NEWNODE(NODE_SUPER, rb_node_super_t, loc);
23216 n->nd_args = nd_args;
23217 n->keyword_loc = *keyword_loc;
23218 n->lparen_loc = *lparen_loc;
23219 n->rparen_loc = *rparen_loc;
23220
23221 return n;
23222}
23223
23224static rb_node_zsuper_t *
23225rb_node_zsuper_new(struct parser_params *p, const YYLTYPE *loc)
23226{
23227 rb_node_zsuper_t *n = NODE_NEWNODE(NODE_ZSUPER, rb_node_zsuper_t, loc);
23228
23229 return n;
23230}
23231
23232static rb_node_match2_t *
23233rb_node_match2_new(struct parser_params *p, NODE *nd_recv, NODE *nd_value, const YYLTYPE *loc)
23234{
23235 rb_node_match2_t *n = NODE_NEWNODE(NODE_MATCH2, rb_node_match2_t, loc);
23236 n->nd_recv = nd_recv;
23237 n->nd_value = nd_value;
23238 n->nd_args = 0;
23239
23240 return n;
23241}
23242
23243static rb_node_match3_t *
23244rb_node_match3_new(struct parser_params *p, NODE *nd_recv, NODE *nd_value, const YYLTYPE *loc)
23245{
23246 rb_node_match3_t *n = NODE_NEWNODE(NODE_MATCH3, rb_node_match3_t, loc);
23247 n->nd_recv = nd_recv;
23248 n->nd_value = nd_value;
23249
23250 return n;
23251}
23252
23253/* TODO: Use union for NODE_LIST2 */
23254static rb_node_list_t *
23255rb_node_list_new(struct parser_params *p, NODE *nd_head, const YYLTYPE *loc)
23256{
23257 rb_node_list_t *n = NODE_NEWNODE(NODE_LIST, rb_node_list_t, loc);
23258 n->nd_head = nd_head;
23259 n->as.nd_alen = 1;
23260 n->nd_next = 0;
23261
23262 return n;
23263}
23264
23265static rb_node_list_t *
23266rb_node_list_new2(struct parser_params *p, NODE *nd_head, long nd_alen, NODE *nd_next, const YYLTYPE *loc)
23267{
23268 rb_node_list_t *n = NODE_NEWNODE(NODE_LIST, rb_node_list_t, loc);
23269 n->nd_head = nd_head;
23270 n->as.nd_alen = nd_alen;
23271 n->nd_next = nd_next;
23272
23273 return n;
23274}
23275
23276static rb_node_zlist_t *
23277rb_node_zlist_new(struct parser_params *p, const YYLTYPE *loc)
23278{
23279 rb_node_zlist_t *n = NODE_NEWNODE(NODE_ZLIST, rb_node_zlist_t, loc);
23280
23281 return n;
23282}
23283
23284static rb_node_hash_t *
23285rb_node_hash_new(struct parser_params *p, NODE *nd_head, const YYLTYPE *loc)
23286{
23287 rb_node_hash_t *n = NODE_NEWNODE(NODE_HASH, rb_node_hash_t, loc);
23288 n->nd_head = nd_head;
23289 n->nd_brace = 0;
23290
23291 return n;
23292}
23293
23294static rb_node_masgn_t *
23295rb_node_masgn_new(struct parser_params *p, NODE *nd_head, NODE *nd_args, const YYLTYPE *loc)
23296{
23297 rb_node_masgn_t *n = NODE_NEWNODE(NODE_MASGN, rb_node_masgn_t, loc);
23298 n->nd_head = nd_head;
23299 n->nd_value = 0;
23300 n->nd_args = nd_args;
23301
23302 return n;
23303}
23304
23305static rb_node_gasgn_t *
23306rb_node_gasgn_new(struct parser_params *p, ID nd_vid, NODE *nd_value, const YYLTYPE *loc)
23307{
23308 rb_node_gasgn_t *n = NODE_NEWNODE(NODE_GASGN, rb_node_gasgn_t, loc);
23309 n->nd_vid = nd_vid;
23310 n->nd_value = nd_value;
23311
23312 return n;
23313}
23314
23315static rb_node_lasgn_t *
23316rb_node_lasgn_new(struct parser_params *p, ID nd_vid, NODE *nd_value, const YYLTYPE *loc)
23317{
23318 rb_node_lasgn_t *n = NODE_NEWNODE(NODE_LASGN, rb_node_lasgn_t, loc);
23319 n->nd_vid = nd_vid;
23320 n->nd_value = nd_value;
23321
23322 return n;
23323}
23324
23325static rb_node_dasgn_t *
23326rb_node_dasgn_new(struct parser_params *p, ID nd_vid, NODE *nd_value, const YYLTYPE *loc)
23327{
23328 rb_node_dasgn_t *n = NODE_NEWNODE(NODE_DASGN, rb_node_dasgn_t, loc);
23329 n->nd_vid = nd_vid;
23330 n->nd_value = nd_value;
23331
23332 return n;
23333}
23334
23335static rb_node_iasgn_t *
23336rb_node_iasgn_new(struct parser_params *p, ID nd_vid, NODE *nd_value, const YYLTYPE *loc)
23337{
23338 rb_node_iasgn_t *n = NODE_NEWNODE(NODE_IASGN, rb_node_iasgn_t, loc);
23339 n->nd_vid = nd_vid;
23340 n->nd_value = nd_value;
23341
23342 return n;
23343}
23344
23345static rb_node_cvasgn_t *
23346rb_node_cvasgn_new(struct parser_params *p, ID nd_vid, NODE *nd_value, const YYLTYPE *loc)
23347{
23348 rb_node_cvasgn_t *n = NODE_NEWNODE(NODE_CVASGN, rb_node_cvasgn_t, loc);
23349 n->nd_vid = nd_vid;
23350 n->nd_value = nd_value;
23351
23352 return n;
23353}
23354
23355static rb_node_op_asgn1_t *
23356rb_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)
23357{
23358 rb_node_op_asgn1_t *n = NODE_NEWNODE(NODE_OP_ASGN1, rb_node_op_asgn1_t, loc);
23359 n->nd_recv = nd_recv;
23360 n->nd_mid = nd_mid;
23361 n->nd_index = index;
23362 n->nd_rvalue = rvalue;
23363 n->call_operator_loc = *call_operator_loc;
23364 n->opening_loc = *opening_loc;
23365 n->closing_loc = *closing_loc;
23366 n->binary_operator_loc = *binary_operator_loc;
23367
23368 return n;
23369}
23370
23371static rb_node_op_asgn2_t *
23372rb_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)
23373{
23374 rb_node_op_asgn2_t *n = NODE_NEWNODE(NODE_OP_ASGN2, rb_node_op_asgn2_t, loc);
23375 n->nd_recv = nd_recv;
23376 n->nd_value = nd_value;
23377 n->nd_vid = nd_vid;
23378 n->nd_mid = nd_mid;
23379 n->nd_aid = nd_aid;
23380 n->call_operator_loc = *call_operator_loc;
23381 n->message_loc = *message_loc;
23382 n->binary_operator_loc = *binary_operator_loc;
23383
23384 return n;
23385}
23386
23387static rb_node_op_asgn_or_t *
23388rb_node_op_asgn_or_new(struct parser_params *p, NODE *nd_head, NODE *nd_value, const YYLTYPE *loc)
23389{
23390 rb_node_op_asgn_or_t *n = NODE_NEWNODE(NODE_OP_ASGN_OR, rb_node_op_asgn_or_t, loc);
23391 n->nd_head = nd_head;
23392 n->nd_value = nd_value;
23393
23394 return n;
23395}
23396
23397static rb_node_op_asgn_and_t *
23398rb_node_op_asgn_and_new(struct parser_params *p, NODE *nd_head, NODE *nd_value, const YYLTYPE *loc)
23399{
23400 rb_node_op_asgn_and_t *n = NODE_NEWNODE(NODE_OP_ASGN_AND, rb_node_op_asgn_and_t, loc);
23401 n->nd_head = nd_head;
23402 n->nd_value = nd_value;
23403
23404 return n;
23405}
23406
23407static rb_node_gvar_t *
23408rb_node_gvar_new(struct parser_params *p, ID nd_vid, const YYLTYPE *loc)
23409{
23410 rb_node_gvar_t *n = NODE_NEWNODE(NODE_GVAR, rb_node_gvar_t, loc);
23411 n->nd_vid = nd_vid;
23412
23413 return n;
23414}
23415
23416static rb_node_lvar_t *
23417rb_node_lvar_new(struct parser_params *p, ID nd_vid, const YYLTYPE *loc)
23418{
23419 rb_node_lvar_t *n = NODE_NEWNODE(NODE_LVAR, rb_node_lvar_t, loc);
23420 n->nd_vid = nd_vid;
23421
23422 return n;
23423}
23424
23425static rb_node_dvar_t *
23426rb_node_dvar_new(struct parser_params *p, ID nd_vid, const YYLTYPE *loc)
23427{
23428 rb_node_dvar_t *n = NODE_NEWNODE(NODE_DVAR, rb_node_dvar_t, loc);
23429 n->nd_vid = nd_vid;
23430
23431 return n;
23432}
23433
23434static rb_node_ivar_t *
23435rb_node_ivar_new(struct parser_params *p, ID nd_vid, const YYLTYPE *loc)
23436{
23437 rb_node_ivar_t *n = NODE_NEWNODE(NODE_IVAR, rb_node_ivar_t, loc);
23438 n->nd_vid = nd_vid;
23439
23440 return n;
23441}
23442
23443static rb_node_const_t *
23444rb_node_const_new(struct parser_params *p, ID nd_vid, const YYLTYPE *loc)
23445{
23446 rb_node_const_t *n = NODE_NEWNODE(NODE_CONST, rb_node_const_t, loc);
23447 n->nd_vid = nd_vid;
23448
23449 return n;
23450}
23451
23452static rb_node_cvar_t *
23453rb_node_cvar_new(struct parser_params *p, ID nd_vid, const YYLTYPE *loc)
23454{
23455 rb_node_cvar_t *n = NODE_NEWNODE(NODE_CVAR, rb_node_cvar_t, loc);
23456 n->nd_vid = nd_vid;
23457
23458 return n;
23459}
23460
23461static rb_node_nth_ref_t *
23462rb_node_nth_ref_new(struct parser_params *p, long nd_nth, const YYLTYPE *loc)
23463{
23464 rb_node_nth_ref_t *n = NODE_NEWNODE(NODE_NTH_REF, rb_node_nth_ref_t, loc);
23465 n->nd_nth = nd_nth;
23466
23467 return n;
23468}
23469
23470static rb_node_back_ref_t *
23471rb_node_back_ref_new(struct parser_params *p, long nd_nth, const YYLTYPE *loc)
23472{
23473 rb_node_back_ref_t *n = NODE_NEWNODE(NODE_BACK_REF, rb_node_back_ref_t, loc);
23474 n->nd_nth = nd_nth;
23475
23476 return n;
23477}
23478
23479static rb_node_integer_t *
23480rb_node_integer_new(struct parser_params *p, char* val, int base, const YYLTYPE *loc)
23481{
23482 rb_node_integer_t *n = NODE_NEWNODE(NODE_INTEGER, rb_node_integer_t, loc);
23483 n->val = val;
23484 n->minus = FALSE;
23485 n->base = base;
23486
23487 return n;
23488}
23489
23490static rb_node_float_t *
23491rb_node_float_new(struct parser_params *p, char* val, const YYLTYPE *loc)
23492{
23493 rb_node_float_t *n = NODE_NEWNODE(NODE_FLOAT, rb_node_float_t, loc);
23494 n->val = val;
23495 n->minus = FALSE;
23496
23497 return n;
23498}
23499
23500static rb_node_rational_t *
23501rb_node_rational_new(struct parser_params *p, char* val, int base, int seen_point, const YYLTYPE *loc)
23502{
23503 rb_node_rational_t *n = NODE_NEWNODE(NODE_RATIONAL, rb_node_rational_t, loc);
23504 n->val = val;
23505 n->minus = FALSE;
23506 n->base = base;
23507 n->seen_point = seen_point;
23508
23509 return n;
23510}
23511
23512static rb_node_imaginary_t *
23513rb_node_imaginary_new(struct parser_params *p, char* val, int base, int seen_point, enum rb_numeric_type numeric_type, const YYLTYPE *loc)
23514{
23515 rb_node_imaginary_t *n = NODE_NEWNODE(NODE_IMAGINARY, rb_node_imaginary_t, loc);
23516 n->val = val;
23517 n->minus = FALSE;
23518 n->base = base;
23519 n->seen_point = seen_point;
23520 n->type = numeric_type;
23521
23522 return n;
23523}
23524
23525static rb_node_str_t *
23526rb_node_str_new(struct parser_params *p, rb_parser_string_t *string, const YYLTYPE *loc)
23527{
23528 rb_node_str_t *n = NODE_NEWNODE(NODE_STR, rb_node_str_t, loc);
23529 n->string = string;
23530
23531 return n;
23532}
23533
23534/* TODO; Use union for NODE_DSTR2 */
23535static rb_node_dstr_t *
23536rb_node_dstr_new0(struct parser_params *p, rb_parser_string_t *string, long nd_alen, NODE *nd_next, const YYLTYPE *loc)
23537{
23538 rb_node_dstr_t *n = NODE_NEWNODE(NODE_DSTR, rb_node_dstr_t, loc);
23539 n->string = string;
23540 n->as.nd_alen = nd_alen;
23541 n->nd_next = (rb_node_list_t *)nd_next;
23542
23543 return n;
23544}
23545
23546static rb_node_dstr_t *
23547rb_node_dstr_new(struct parser_params *p, rb_parser_string_t *string, const YYLTYPE *loc)
23548{
23549 return rb_node_dstr_new0(p, string, 1, 0, loc);
23550}
23551
23552static rb_node_xstr_t *
23553rb_node_xstr_new(struct parser_params *p, rb_parser_string_t *string, const YYLTYPE *loc)
23554{
23555 rb_node_xstr_t *n = NODE_NEWNODE(NODE_XSTR, rb_node_xstr_t, loc);
23556 n->string = string;
23557
23558 return n;
23559}
23560
23561static rb_node_dxstr_t *
23562rb_node_dxstr_new(struct parser_params *p, rb_parser_string_t *string, long nd_alen, NODE *nd_next, const YYLTYPE *loc)
23563{
23564 rb_node_dxstr_t *n = NODE_NEWNODE(NODE_DXSTR, rb_node_dxstr_t, loc);
23565 n->string = string;
23566 n->as.nd_alen = nd_alen;
23567 n->nd_next = (rb_node_list_t *)nd_next;
23568
23569 return n;
23570}
23571
23572static rb_node_sym_t *
23573rb_node_sym_new(struct parser_params *p, VALUE str, const YYLTYPE *loc)
23574{
23575 rb_node_sym_t *n = NODE_NEWNODE(NODE_SYM, rb_node_sym_t, loc);
23576 n->string = rb_str_to_parser_string(p, str);
23577
23578 return n;
23579}
23580
23581static rb_node_dsym_t *
23582rb_node_dsym_new(struct parser_params *p, rb_parser_string_t *string, long nd_alen, NODE *nd_next, const YYLTYPE *loc)
23583{
23584 rb_node_dsym_t *n = NODE_NEWNODE(NODE_DSYM, rb_node_dsym_t, loc);
23585 n->string = string;
23586 n->as.nd_alen = nd_alen;
23587 n->nd_next = (rb_node_list_t *)nd_next;
23588
23589 return n;
23590}
23591
23592static rb_node_evstr_t *
23593rb_node_evstr_new(struct parser_params *p, NODE *nd_body, const YYLTYPE *loc, const YYLTYPE *opening_loc, const YYLTYPE *closing_loc)
23594{
23595 rb_node_evstr_t *n = NODE_NEWNODE(NODE_EVSTR, rb_node_evstr_t, loc);
23596 n->nd_body = nd_body;
23597 n->opening_loc = *opening_loc;
23598 n->closing_loc = *closing_loc;
23599
23600 return n;
23601}
23602
23603static rb_node_regx_t *
23604rb_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)
23605{
23606 rb_node_regx_t *n = NODE_NEWNODE(NODE_REGX, rb_node_regx_t, loc);
23607 n->string = string;
23608 n->options = options & RE_OPTION_MASK;
23609 n->opening_loc = *opening_loc;
23610 n->content_loc = *content_loc;
23611 n->closing_loc = *closing_loc;
23612
23613 return n;
23614}
23615
23616static rb_node_call_t *
23617rb_node_call_new(struct parser_params *p, NODE *nd_recv, ID nd_mid, NODE *nd_args, const YYLTYPE *loc)
23618{
23619 rb_node_call_t *n = NODE_NEWNODE(NODE_CALL, rb_node_call_t, loc);
23620 n->nd_recv = nd_recv;
23621 n->nd_mid = nd_mid;
23622 n->nd_args = nd_args;
23623
23624 return n;
23625}
23626
23627static rb_node_opcall_t *
23628rb_node_opcall_new(struct parser_params *p, NODE *nd_recv, ID nd_mid, NODE *nd_args, const YYLTYPE *loc)
23629{
23630 rb_node_opcall_t *n = NODE_NEWNODE(NODE_OPCALL, rb_node_opcall_t, loc);
23631 n->nd_recv = nd_recv;
23632 n->nd_mid = nd_mid;
23633 n->nd_args = nd_args;
23634
23635 return n;
23636}
23637
23638static rb_node_fcall_t *
23639rb_node_fcall_new(struct parser_params *p, ID nd_mid, NODE *nd_args, const YYLTYPE *loc)
23640{
23641 rb_node_fcall_t *n = NODE_NEWNODE(NODE_FCALL, rb_node_fcall_t, loc);
23642 n->nd_mid = nd_mid;
23643 n->nd_args = nd_args;
23644
23645 return n;
23646}
23647
23648static rb_node_qcall_t *
23649rb_node_qcall_new(struct parser_params *p, NODE *nd_recv, ID nd_mid, NODE *nd_args, const YYLTYPE *loc)
23650{
23651 rb_node_qcall_t *n = NODE_NEWNODE(NODE_QCALL, rb_node_qcall_t, loc);
23652 n->nd_recv = nd_recv;
23653 n->nd_mid = nd_mid;
23654 n->nd_args = nd_args;
23655
23656 return n;
23657}
23658
23659static rb_node_vcall_t *
23660rb_node_vcall_new(struct parser_params *p, ID nd_mid, const YYLTYPE *loc)
23661{
23662 rb_node_vcall_t *n = NODE_NEWNODE(NODE_VCALL, rb_node_vcall_t, loc);
23663 n->nd_mid = nd_mid;
23664
23665 return n;
23666}
23667
23668static rb_node_once_t *
23669rb_node_once_new(struct parser_params *p, NODE *nd_body, const YYLTYPE *loc)
23670{
23671 rb_node_once_t *n = NODE_NEWNODE(NODE_ONCE, rb_node_once_t, loc);
23672 n->nd_body = nd_body;
23673
23674 return n;
23675}
23676
23677static rb_node_args_t *
23678rb_node_args_new(struct parser_params *p, const YYLTYPE *loc)
23679{
23680 rb_node_args_t *n = NODE_NEWNODE(NODE_ARGS, rb_node_args_t, loc);
23681 MEMZERO(&n->nd_ainfo, struct rb_args_info, 1);
23682
23683 return n;
23684}
23685
23686static rb_node_args_aux_t *
23687rb_node_args_aux_new(struct parser_params *p, ID nd_pid, int nd_plen, const YYLTYPE *loc)
23688{
23689 rb_node_args_aux_t *n = NODE_NEWNODE(NODE_ARGS_AUX, rb_node_args_aux_t, loc);
23690 n->nd_pid = nd_pid;
23691 n->nd_plen = nd_plen;
23692 n->nd_next = 0;
23693
23694 return n;
23695}
23696
23697static rb_node_opt_arg_t *
23698rb_node_opt_arg_new(struct parser_params *p, NODE *nd_body, const YYLTYPE *loc)
23699{
23700 rb_node_opt_arg_t *n = NODE_NEWNODE(NODE_OPT_ARG, rb_node_opt_arg_t, loc);
23701 n->nd_body = nd_body;
23702 n->nd_next = 0;
23703
23704 return n;
23705}
23706
23707static rb_node_kw_arg_t *
23708rb_node_kw_arg_new(struct parser_params *p, NODE *nd_body, const YYLTYPE *loc)
23709{
23710 rb_node_kw_arg_t *n = NODE_NEWNODE(NODE_KW_ARG, rb_node_kw_arg_t, loc);
23711 n->nd_body = nd_body;
23712 n->nd_next = 0;
23713
23714 return n;
23715}
23716
23717static rb_node_postarg_t *
23718rb_node_postarg_new(struct parser_params *p, NODE *nd_1st, NODE *nd_2nd, const YYLTYPE *loc)
23719{
23720 rb_node_postarg_t *n = NODE_NEWNODE(NODE_POSTARG, rb_node_postarg_t, loc);
23721 n->nd_1st = nd_1st;
23722 n->nd_2nd = nd_2nd;
23723
23724 return n;
23725}
23726
23727static rb_node_argscat_t *
23728rb_node_argscat_new(struct parser_params *p, NODE *nd_head, NODE *nd_body, const YYLTYPE *loc)
23729{
23730 rb_node_argscat_t *n = NODE_NEWNODE(NODE_ARGSCAT, rb_node_argscat_t, loc);
23731 n->nd_head = nd_head;
23732 n->nd_body = nd_body;
23733
23734 return n;
23735}
23736
23737static rb_node_argspush_t *
23738rb_node_argspush_new(struct parser_params *p, NODE *nd_head, NODE *nd_body, const YYLTYPE *loc)
23739{
23740 rb_node_argspush_t *n = NODE_NEWNODE(NODE_ARGSPUSH, rb_node_argspush_t, loc);
23741 n->nd_head = nd_head;
23742 n->nd_body = nd_body;
23743
23744 return n;
23745}
23746
23747static rb_node_splat_t *
23748rb_node_splat_new(struct parser_params *p, NODE *nd_head, const YYLTYPE *loc, const YYLTYPE *operator_loc)
23749{
23750 rb_node_splat_t *n = NODE_NEWNODE(NODE_SPLAT, rb_node_splat_t, loc);
23751 n->nd_head = nd_head;
23752 n->operator_loc = *operator_loc;
23753
23754 return n;
23755}
23756
23757static rb_node_block_pass_t *
23758rb_node_block_pass_new(struct parser_params *p, NODE *nd_body, const YYLTYPE *loc, const YYLTYPE *operator_loc)
23759{
23760 rb_node_block_pass_t *n = NODE_NEWNODE(NODE_BLOCK_PASS, rb_node_block_pass_t, loc);
23761 n->forwarding = 0;
23762 n->nd_head = 0;
23763 n->nd_body = nd_body;
23764 n->operator_loc = *operator_loc;
23765
23766 return n;
23767}
23768
23769static rb_node_alias_t *
23770rb_node_alias_new(struct parser_params *p, NODE *nd_1st, NODE *nd_2nd, const YYLTYPE *loc, const YYLTYPE *keyword_loc)
23771{
23772 rb_node_alias_t *n = NODE_NEWNODE(NODE_ALIAS, rb_node_alias_t, loc);
23773 n->nd_1st = nd_1st;
23774 n->nd_2nd = nd_2nd;
23775 n->keyword_loc = *keyword_loc;
23776
23777 return n;
23778}
23779
23780static rb_node_valias_t *
23781rb_node_valias_new(struct parser_params *p, ID nd_alias, ID nd_orig, const YYLTYPE *loc, const YYLTYPE *keyword_loc)
23782{
23783 rb_node_valias_t *n = NODE_NEWNODE(NODE_VALIAS, rb_node_valias_t, loc);
23784 n->nd_alias = nd_alias;
23785 n->nd_orig = nd_orig;
23786 n->keyword_loc = *keyword_loc;
23787
23788 return n;
23789}
23790
23791static rb_node_undef_t *
23792rb_node_undef_new(struct parser_params *p, NODE *nd_undef, const YYLTYPE *loc)
23793{
23794 rb_node_undef_t *n = NODE_NEWNODE(NODE_UNDEF, rb_node_undef_t, loc);
23795 n->nd_undefs = rb_parser_ary_new_capa_for_node(p, 1);
23796 n->keyword_loc = NULL_LOC;
23797 rb_parser_ary_push_node(p, n->nd_undefs, nd_undef);
23798
23799 return n;
23800}
23801
23802static rb_node_errinfo_t *
23803rb_node_errinfo_new(struct parser_params *p, const YYLTYPE *loc)
23804{
23805 rb_node_errinfo_t *n = NODE_NEWNODE(NODE_ERRINFO, rb_node_errinfo_t, loc);
23806
23807 return n;
23808}
23809
23810static rb_node_defined_t *
23811rb_node_defined_new(struct parser_params *p, NODE *nd_head, const YYLTYPE *loc, const YYLTYPE *keyword_loc)
23812{
23813 rb_node_defined_t *n = NODE_NEWNODE(NODE_DEFINED, rb_node_defined_t, loc);
23814 n->nd_head = nd_head;
23815 n->keyword_loc = *keyword_loc;
23816
23817 return n;
23818}
23819
23820static rb_node_postexe_t *
23821rb_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)
23822{
23823 rb_node_postexe_t *n = NODE_NEWNODE(NODE_POSTEXE, rb_node_postexe_t, loc);
23824 n->nd_body = nd_body;
23825 n->keyword_loc = *keyword_loc;
23826 n->opening_loc = *opening_loc;
23827 n->closing_loc = *closing_loc;
23828
23829 return n;
23830}
23831
23832static rb_node_attrasgn_t *
23833rb_node_attrasgn_new(struct parser_params *p, NODE *nd_recv, ID nd_mid, NODE *nd_args, const YYLTYPE *loc)
23834{
23835 rb_node_attrasgn_t *n = NODE_NEWNODE(NODE_ATTRASGN, rb_node_attrasgn_t, loc);
23836 n->nd_recv = nd_recv;
23837 n->nd_mid = nd_mid;
23838 n->nd_args = nd_args;
23839
23840 return n;
23841}
23842
23843static rb_node_aryptn_t *
23844rb_node_aryptn_new(struct parser_params *p, NODE *pre_args, NODE *rest_arg, NODE *post_args, const YYLTYPE *loc)
23845{
23846 rb_node_aryptn_t *n = NODE_NEWNODE(NODE_ARYPTN, rb_node_aryptn_t, loc);
23847 n->nd_pconst = 0;
23848 n->pre_args = pre_args;
23849 n->rest_arg = rest_arg;
23850 n->post_args = post_args;
23851
23852 return n;
23853}
23854
23855static rb_node_hshptn_t *
23856rb_node_hshptn_new(struct parser_params *p, NODE *nd_pconst, NODE *nd_pkwargs, NODE *nd_pkwrestarg, const YYLTYPE *loc)
23857{
23858 rb_node_hshptn_t *n = NODE_NEWNODE(NODE_HSHPTN, rb_node_hshptn_t, loc);
23859 n->nd_pconst = nd_pconst;
23860 n->nd_pkwargs = nd_pkwargs;
23861 n->nd_pkwrestarg = nd_pkwrestarg;
23862
23863 return n;
23864}
23865
23866static rb_node_fndptn_t *
23867rb_node_fndptn_new(struct parser_params *p, NODE *pre_rest_arg, NODE *args, NODE *post_rest_arg, const YYLTYPE *loc)
23868{
23869 rb_node_fndptn_t *n = NODE_NEWNODE(NODE_FNDPTN, rb_node_fndptn_t, loc);
23870 n->nd_pconst = 0;
23871 n->pre_rest_arg = pre_rest_arg;
23872 n->args = args;
23873 n->post_rest_arg = post_rest_arg;
23874
23875 return n;
23876}
23877
23878static rb_node_line_t *
23879rb_node_line_new(struct parser_params *p, const YYLTYPE *loc)
23880{
23881 rb_node_line_t *n = NODE_NEWNODE(NODE_LINE, rb_node_line_t, loc);
23882
23883 return n;
23884}
23885
23886static rb_node_file_t *
23887rb_node_file_new(struct parser_params *p, VALUE str, const YYLTYPE *loc)
23888{
23889 rb_node_file_t *n = NODE_NEWNODE(NODE_FILE, rb_node_file_t, loc);
23890 n->path = rb_str_to_parser_string(p, str);
23891
23892 return n;
23893}
23894
23895static rb_node_encoding_t *
23896rb_node_encoding_new(struct parser_params *p, const YYLTYPE *loc)
23897{
23898 rb_node_encoding_t *n = NODE_NEWNODE(NODE_ENCODING, rb_node_encoding_t, loc);
23899 n->enc = p->enc;
23900
23901 return n;
23902}
23903
23904static rb_node_cdecl_t *
23905rb_node_cdecl_new(struct parser_params *p, ID nd_vid, NODE *nd_value, NODE *nd_else, enum rb_parser_shareability shareability, const YYLTYPE *loc)
23906{
23907 rb_node_cdecl_t *n = NODE_NEWNODE(NODE_CDECL, rb_node_cdecl_t, loc);
23908 n->nd_vid = nd_vid;
23909 n->nd_value = nd_value;
23910 n->nd_else = nd_else;
23911 n->shareability = shareability;
23912
23913 return n;
23914}
23915
23916static rb_node_op_cdecl_t *
23917rb_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)
23918{
23919 rb_node_op_cdecl_t *n = NODE_NEWNODE(NODE_OP_CDECL, rb_node_op_cdecl_t, loc);
23920 n->nd_head = nd_head;
23921 n->nd_value = nd_value;
23922 n->nd_aid = nd_aid;
23923 n->shareability = shareability;
23924
23925 return n;
23926}
23927
23928static rb_node_error_t *
23929rb_node_error_new(struct parser_params *p, const YYLTYPE *loc)
23930{
23931 rb_node_error_t *n = NODE_NEWNODE(NODE_ERROR, rb_node_error_t, loc);
23932
23933 return n;
23934}
23935
23936static rb_node_break_t *
23937rb_node_break_new(struct parser_params *p, NODE *nd_stts, const YYLTYPE *loc, const YYLTYPE *keyword_loc)
23938{
23939 rb_node_break_t *n = NODE_NEWNODE(NODE_BREAK, rb_node_break_t, loc);
23940 n->nd_stts = nd_stts;
23941 n->nd_chain = 0;
23942 n->keyword_loc = *keyword_loc;
23943
23944 return n;
23945}
23946
23947static rb_node_next_t *
23948rb_node_next_new(struct parser_params *p, NODE *nd_stts, const YYLTYPE *loc, const YYLTYPE *keyword_loc)
23949{
23950 rb_node_next_t *n = NODE_NEWNODE(NODE_NEXT, rb_node_next_t, loc);
23951 n->nd_stts = nd_stts;
23952 n->nd_chain = 0;
23953 n->keyword_loc = *keyword_loc;
23954
23955 return n;
23956}
23957
23958static rb_node_redo_t *
23959rb_node_redo_new(struct parser_params *p, const YYLTYPE *loc, const YYLTYPE *keyword_loc)
23960{
23961 rb_node_redo_t *n = NODE_NEWNODE(NODE_REDO, rb_node_redo_t, loc);
23962 n->nd_chain = 0;
23963 n->keyword_loc = *keyword_loc;
23964
23965 return n;
23966}
23967
23968static rb_node_def_temp_t *
23969rb_node_def_temp_new(struct parser_params *p, const YYLTYPE *loc)
23970{
23971 rb_node_def_temp_t *n = NODE_NEWNODE((enum node_type)NODE_DEF_TEMP, rb_node_def_temp_t, loc);
23972 n->save.numparam_save = 0;
23973 n->save.max_numparam = 0;
23974 n->save.ctxt = p->ctxt;
23975 n->nd_def = 0;
23976 n->nd_mid = 0;
23977
23978 return n;
23979}
23980
23981static rb_node_def_temp_t *
23982def_head_save(struct parser_params *p, rb_node_def_temp_t *n)
23983{
23984 n->save.numparam_save = numparam_push(p);
23985 n->save.max_numparam = p->max_numparam;
23986 return n;
23987}
23988
23989#ifndef RIPPER
23990static enum node_type
23991nodetype(NODE *node) /* for debug */
23992{
23993 return (enum node_type)nd_type(node);
23994}
23995
23996static int
23997nodeline(NODE *node)
23998{
23999 return nd_line(node);
24000}
24001#endif
24002
24003static NODE*
24004newline_node(NODE *node)
24005{
24006 if (node) {
24007 node = remove_begin(node);
24008 nd_set_fl_newline(node);
24009 }
24010 return node;
24011}
24012
24013static void
24014fixpos(NODE *node, NODE *orig)
24015{
24016 if (!node) return;
24017 if (!orig) return;
24018 nd_set_line(node, nd_line(orig));
24019}
24020
24021static NODE*
24022block_append(struct parser_params *p, NODE *head, NODE *tail)
24023{
24024 NODE *end, *h = head, *nd;
24025
24026 if (tail == 0) return head;
24027
24028 if (h == 0) return tail;
24029 switch (nd_type(h)) {
24030 default:
24031 h = end = NEW_BLOCK(head, &head->nd_loc);
24032 head = end;
24033 break;
24034 case NODE_BLOCK:
24035 end = RNODE_BLOCK(h)->nd_end;
24036 break;
24037 }
24038
24039 nd = RNODE_BLOCK(end)->nd_head;
24040 switch (nd_type(nd)) {
24041 case NODE_RETURN:
24042 case NODE_BREAK:
24043 case NODE_NEXT:
24044 case NODE_REDO:
24045 case NODE_RETRY:
24046 rb_warning0L(nd_line(tail), "statement not reached");
24047 break;
24048
24049 default:
24050 break;
24051 }
24052
24053 if (!nd_type_p(tail, NODE_BLOCK)) {
24054 tail = NEW_BLOCK(tail, &tail->nd_loc);
24055 }
24056 RNODE_BLOCK(end)->nd_next = tail;
24057 RNODE_BLOCK(h)->nd_end = RNODE_BLOCK(tail)->nd_end;
24058 nd_set_last_loc(head, nd_last_loc(tail));
24059 return head;
24060}
24061
24062/* append item to the list */
24063static NODE*
24064list_append(struct parser_params *p, NODE *list, NODE *item)
24065{
24066 NODE *last;
24067
24068 if (list == 0) return NEW_LIST(item, &item->nd_loc);
24069 if (RNODE_LIST(list)->nd_next) {
24070 last = RNODE_LIST(RNODE_LIST(list)->nd_next)->as.nd_end;
24071 }
24072 else {
24073 last = list;
24074 }
24075
24076 RNODE_LIST(list)->as.nd_alen += 1;
24077 RNODE_LIST(last)->nd_next = NEW_LIST(item, &item->nd_loc);
24078 RNODE_LIST(RNODE_LIST(list)->nd_next)->as.nd_end = RNODE_LIST(last)->nd_next;
24079
24080 nd_set_last_loc(list, nd_last_loc(item));
24081
24082 return list;
24083}
24084
24085/* concat two lists */
24086static NODE*
24087list_concat(NODE *head, NODE *tail)
24088{
24089 NODE *last;
24090
24091 if (RNODE_LIST(head)->nd_next) {
24092 last = RNODE_LIST(RNODE_LIST(head)->nd_next)->as.nd_end;
24093 }
24094 else {
24095 last = head;
24096 }
24097
24098 RNODE_LIST(head)->as.nd_alen += RNODE_LIST(tail)->as.nd_alen;
24099 RNODE_LIST(last)->nd_next = tail;
24100 if (RNODE_LIST(tail)->nd_next) {
24101 RNODE_LIST(RNODE_LIST(head)->nd_next)->as.nd_end = RNODE_LIST(RNODE_LIST(tail)->nd_next)->as.nd_end;
24102 }
24103 else {
24104 RNODE_LIST(RNODE_LIST(head)->nd_next)->as.nd_end = tail;
24105 }
24106
24107 nd_set_last_loc(head, nd_last_loc(tail));
24108
24109 return head;
24110}
24111
24112static int
24113literal_concat0(struct parser_params *p, rb_parser_string_t *head, rb_parser_string_t *tail)
24114{
24115 if (!tail) return 1;
24116 if (!rb_parser_enc_compatible(p, head, tail)) {
24117 compile_error(p, "string literal encodings differ (%s / %s)",
24118 rb_enc_name(rb_parser_str_get_encoding(head)),
24119 rb_enc_name(rb_parser_str_get_encoding(tail)));
24120 rb_parser_str_resize(p, head, 0);
24121 rb_parser_str_resize(p, tail, 0);
24122 return 0;
24123 }
24124 rb_parser_str_buf_append(p, head, tail);
24125 return 1;
24126}
24127
24128static rb_parser_string_t *
24129string_literal_head(struct parser_params *p, enum node_type htype, NODE *head)
24130{
24131 if (htype != NODE_DSTR) return NULL;
24132 if (RNODE_DSTR(head)->nd_next) {
24133 head = RNODE_LIST(RNODE_LIST(RNODE_DSTR(head)->nd_next)->as.nd_end)->nd_head;
24134 if (!head || !nd_type_p(head, NODE_STR)) return NULL;
24135 }
24136 rb_parser_string_t *lit = RNODE_DSTR(head)->string;
24137 ASSUME(lit);
24138 return lit;
24139}
24140
24141#ifndef RIPPER
24142static rb_parser_string_t *
24143rb_parser_string_deep_copy(struct parser_params *p, const rb_parser_string_t *orig)
24144{
24145 rb_parser_string_t *copy;
24146 if (!orig) return NULL;
24147 copy = rb_parser_string_new(p, PARSER_STRING_PTR(orig), PARSER_STRING_LEN(orig));
24148 copy->coderange = orig->coderange;
24149 copy->enc = orig->enc;
24150 return copy;
24151}
24152#endif
24153
24154/* concat two string literals */
24155static NODE *
24156literal_concat(struct parser_params *p, NODE *head, NODE *tail, const YYLTYPE *loc)
24157{
24158 enum node_type htype;
24159 rb_parser_string_t *lit;
24160
24161 if (!head) return tail;
24162 if (!tail) return head;
24163
24164 htype = nd_type(head);
24165 if (htype == NODE_EVSTR) {
24166 head = new_dstr(p, head, loc);
24167 htype = NODE_DSTR;
24168 }
24169 if (p->heredoc_indent > 0) {
24170 switch (htype) {
24171 case NODE_STR:
24172 head = str2dstr(p, head);
24173 case NODE_DSTR:
24174 return list_append(p, head, tail);
24175 default:
24176 break;
24177 }
24178 }
24179 switch (nd_type(tail)) {
24180 case NODE_STR:
24181 if ((lit = string_literal_head(p, htype, head)) != false) {
24182 htype = NODE_STR;
24183 }
24184 else {
24185 lit = RNODE_DSTR(head)->string;
24186 }
24187 if (htype == NODE_STR) {
24188 if (!literal_concat0(p, lit, RNODE_STR(tail)->string)) {
24189 error:
24190 rb_discard_node(p, head);
24191 rb_discard_node(p, tail);
24192 return 0;
24193 }
24194 rb_discard_node(p, tail);
24195 }
24196 else {
24197 list_append(p, head, tail);
24198 }
24199 break;
24200
24201 case NODE_DSTR:
24202 if (htype == NODE_STR) {
24203 if (!literal_concat0(p, RNODE_STR(head)->string, RNODE_DSTR(tail)->string))
24204 goto error;
24205 rb_parser_string_free(p, RNODE_DSTR(tail)->string);
24206 RNODE_DSTR(tail)->string = RNODE_STR(head)->string;
24207 RNODE_STR(head)->string = NULL;
24208 rb_discard_node(p, head);
24209 head = tail;
24210 }
24211 else if (!RNODE_DSTR(tail)->string) {
24212 append:
24213 RNODE_DSTR(head)->as.nd_alen += RNODE_DSTR(tail)->as.nd_alen - 1;
24214 if (!RNODE_DSTR(head)->nd_next) {
24215 RNODE_DSTR(head)->nd_next = RNODE_DSTR(tail)->nd_next;
24216 }
24217 else if (RNODE_DSTR(tail)->nd_next) {
24218 RNODE_DSTR(RNODE_DSTR(RNODE_DSTR(head)->nd_next)->as.nd_end)->nd_next = RNODE_DSTR(tail)->nd_next;
24219 RNODE_DSTR(RNODE_DSTR(head)->nd_next)->as.nd_end = RNODE_DSTR(RNODE_DSTR(tail)->nd_next)->as.nd_end;
24220 }
24221 rb_discard_node(p, tail);
24222 }
24223 else if ((lit = string_literal_head(p, htype, head)) != false) {
24224 if (!literal_concat0(p, lit, RNODE_DSTR(tail)->string))
24225 goto error;
24226 rb_parser_string_free(p, RNODE_DSTR(tail)->string);
24227 RNODE_DSTR(tail)->string = 0;
24228 goto append;
24229 }
24230 else {
24231 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));
24232 RNODE_DSTR(tail)->string = 0;
24233 }
24234 break;
24235
24236 case NODE_EVSTR:
24237 if (htype == NODE_STR) {
24238 head = str2dstr(p, head);
24239 RNODE_DSTR(head)->as.nd_alen = 1;
24240 }
24241 list_append(p, head, tail);
24242 break;
24243 }
24244 return head;
24245}
24246
24247static void
24248nd_copy_flag(NODE *new_node, NODE *old_node)
24249{
24250 if (nd_fl_newline(old_node)) nd_set_fl_newline(new_node);
24251 nd_set_line(new_node, nd_line(old_node));
24252 new_node->nd_loc = old_node->nd_loc;
24253 new_node->node_id = old_node->node_id;
24254}
24255
24256static NODE *
24257str2dstr(struct parser_params *p, NODE *node)
24258{
24259 NODE *new_node = (NODE *)NODE_NEW_INTERNAL(NODE_DSTR, rb_node_dstr_t);
24260 nd_copy_flag(new_node, node);
24261 RNODE_DSTR(new_node)->string = RNODE_STR(node)->string;
24262 RNODE_DSTR(new_node)->as.nd_alen = 0;
24263 RNODE_DSTR(new_node)->nd_next = 0;
24264 RNODE_STR(node)->string = 0;
24265
24266 return new_node;
24267}
24268
24269static NODE *
24270str2regx(struct parser_params *p, NODE *node, int options, const YYLTYPE *loc, const YYLTYPE *opening_loc, const YYLTYPE *content_loc, const YYLTYPE *closing_loc)
24271{
24272 NODE *new_node = (NODE *)NODE_NEW_INTERNAL(NODE_REGX, rb_node_regx_t);
24273 nd_copy_flag(new_node, node);
24274 RNODE_REGX(new_node)->string = RNODE_STR(node)->string;
24275 RNODE_REGX(new_node)->options = options;
24276 nd_set_loc(new_node, loc);
24277 RNODE_REGX(new_node)->opening_loc = *opening_loc;
24278 RNODE_REGX(new_node)->content_loc = *content_loc;
24279 RNODE_REGX(new_node)->closing_loc = *closing_loc;
24280 RNODE_STR(node)->string = 0;
24281
24282 return new_node;
24283}
24284
24285static NODE *
24286evstr2dstr(struct parser_params *p, NODE *node)
24287{
24288 if (nd_type_p(node, NODE_EVSTR)) {
24289 node = new_dstr(p, node, &node->nd_loc);
24290 }
24291 return node;
24292}
24293
24294static NODE *
24295new_evstr(struct parser_params *p, NODE *node, const YYLTYPE *loc, const YYLTYPE *opening_loc, const YYLTYPE *closing_loc)
24296{
24297 NODE *head = node;
24298
24299 if (node) {
24300 switch (nd_type(node)) {
24301 case NODE_STR:
24302 return str2dstr(p, node);
24303 case NODE_DSTR:
24304 break;
24305 case NODE_EVSTR:
24306 return node;
24307 }
24308 }
24309 return NEW_EVSTR(head, loc, opening_loc, closing_loc);
24310}
24311
24312static NODE *
24313new_dstr(struct parser_params *p, NODE *node, const YYLTYPE *loc)
24314{
24315 NODE *dstr = NEW_DSTR(STRING_NEW0(), loc);
24316 return list_append(p, dstr, node);
24317}
24318
24319static NODE *
24320call_bin_op(struct parser_params *p, NODE *recv, ID id, NODE *arg1,
24321 const YYLTYPE *op_loc, const YYLTYPE *loc)
24322{
24323 NODE *expr;
24324 value_expr(p, recv);
24325 value_expr(p, arg1);
24326 expr = NEW_OPCALL(recv, id, NEW_LIST(arg1, &arg1->nd_loc), loc);
24327 nd_set_line(expr, op_loc->beg_pos.lineno);
24328 return expr;
24329}
24330
24331static NODE *
24332call_uni_op(struct parser_params *p, NODE *recv, ID id, const YYLTYPE *op_loc, const YYLTYPE *loc)
24333{
24334 NODE *opcall;
24335 value_expr(p, recv);
24336 opcall = NEW_OPCALL(recv, id, 0, loc);
24337 nd_set_line(opcall, op_loc->beg_pos.lineno);
24338 return opcall;
24339}
24340
24341static NODE *
24342new_qcall(struct parser_params* p, ID atype, NODE *recv, ID mid, NODE *args, const YYLTYPE *op_loc, const YYLTYPE *loc)
24343{
24344 NODE *qcall = NEW_QCALL(atype, recv, mid, args, loc);
24345 nd_set_line(qcall, op_loc->beg_pos.lineno);
24346 return qcall;
24347}
24348
24349static NODE*
24350new_command_qcall(struct parser_params* p, ID atype, NODE *recv, ID mid, NODE *args, NODE *block, const YYLTYPE *op_loc, const YYLTYPE *loc)
24351{
24352 NODE *ret;
24353 if (block) block_dup_check(p, args, block);
24354 ret = new_qcall(p, atype, recv, mid, args, op_loc, loc);
24355 if (block) ret = method_add_block(p, ret, block, loc);
24356 fixpos(ret, recv);
24357 return ret;
24358}
24359
24361new_locations_lambda_body(struct parser_params* p, NODE *node, const YYLTYPE *loc, const YYLTYPE *opening_loc, const YYLTYPE *closing_loc)
24362{
24364 body->node = node;
24365 body->opening_loc = *opening_loc;
24366 body->closing_loc = *closing_loc;
24367 return body;
24368}
24369
24370static NODE *
24371command_add_block(struct parser_params*p, NODE *m, NODE *b, const YYLTYPE *loc)
24372{
24373 NODE **body;
24374 enum node_type type = nd_type(m);
24375 switch (type) {
24376 case NODE_YIELD:
24377 compile_error(p, "block given to yield");
24378 return m;
24379 case NODE_RETURN:
24380 body = &RNODE_RETURN(m)->nd_stts;
24381 break;
24382 case NODE_BREAK:
24383 case NODE_NEXT:
24384 body = &RNODE_EXITS(m)->nd_stts;
24385 break;
24386 case NODE_REDO: /* `redo` has no argument */
24387 compile_error(p, "command_add_block: unexpected node: NODE_REDO");
24388 return m;
24389 case NODE_RETRY: /* `retry` has no argument */
24390 compile_error(p, "command_add_block: unexpected node: NODE_RETRY");
24391 return m;
24392 default:
24393 block_dup_check(p, get_nd_args(p, m), b);
24394 return method_add_block(p, m, b, loc);
24395 }
24396 RUBY_ASSERT(*body, "no argument %s with do_block", parser_node_name(type));
24397 YYLTYPE b_loc = code_loc_gen(&(*body)->nd_loc, loc);
24398 *body = command_add_block(p, *body, b, &b_loc);
24399 m->nd_loc.end_pos = loc->end_pos;
24400 return m;
24401}
24402
24403#define nd_once_body(node) (nd_type_p((node), NODE_ONCE) ? RNODE_ONCE(node)->nd_body : node)
24404
24405static NODE*
24406last_expr_once_body(NODE *node)
24407{
24408 if (!node) return 0;
24409 return nd_once_body(node);
24410}
24411
24412static NODE*
24413match_op(struct parser_params *p, NODE *node1, NODE *node2, const YYLTYPE *op_loc, const YYLTYPE *loc)
24414{
24415 NODE *n;
24416 int line = op_loc->beg_pos.lineno;
24417
24418 value_expr(p, node1);
24419 value_expr(p, node2);
24420
24421 if ((n = last_expr_once_body(node1)) != 0) {
24422 switch (nd_type(n)) {
24423 case NODE_DREGX:
24424 {
24425 NODE *match = NEW_MATCH2(node1, node2, loc);
24426 nd_set_line(match, line);
24427 return match;
24428 }
24429
24430 case NODE_REGX:
24431 {
24432 const VALUE lit = rb_node_regx_string_val(n);
24433 if (!NIL_P(lit)) {
24434 NODE *match = NEW_MATCH2(node1, node2, loc);
24435 RNODE_MATCH2(match)->nd_args = reg_named_capture_assign(p, lit, loc, assignable);
24436 nd_set_line(match, line);
24437 return match;
24438 }
24439 }
24440 }
24441 }
24442
24443 if ((n = last_expr_once_body(node2)) != 0) {
24444 NODE *match3;
24445
24446 switch (nd_type(n)) {
24447 case NODE_DREGX:
24448 match3 = NEW_MATCH3(node2, node1, loc);
24449 return match3;
24450 }
24451 }
24452
24453 n = NEW_CALL(node1, tMATCH, NEW_LIST(node2, &node2->nd_loc), loc);
24454 nd_set_line(n, line);
24455 return n;
24456}
24457
24458# if WARN_PAST_SCOPE
24459static int
24460past_dvar_p(struct parser_params *p, ID id)
24461{
24462 struct vtable *past = p->lvtbl->past;
24463 while (past) {
24464 if (vtable_included(past, id)) return 1;
24465 past = past->prev;
24466 }
24467 return 0;
24468}
24469# endif
24470
24471static int
24472numparam_nested_p(struct parser_params *p)
24473{
24474 struct local_vars *local = p->lvtbl;
24475 NODE *outer = local->numparam.outer;
24476 NODE *inner = local->numparam.inner;
24477 if (outer || inner) {
24478 NODE *used = outer ? outer : inner;
24479 compile_error(p, "numbered parameter is already used in %s block\n"
24480 "%s:%d: numbered parameter is already used here",
24481 outer ? "outer" : "inner",
24482 p->ruby_sourcefile, nd_line(used));
24483 parser_show_error_line(p, &used->nd_loc);
24484 return 1;
24485 }
24486 return 0;
24487}
24488
24489static int
24490numparam_used_p(struct parser_params *p)
24491{
24492 NODE *numparam = p->lvtbl->numparam.current;
24493 if (numparam) {
24494 compile_error(p, "'it' is not allowed when a numbered parameter is already used\n"
24495 "%s:%d: numbered parameter is already used here",
24496 p->ruby_sourcefile, nd_line(numparam));
24497 parser_show_error_line(p, &numparam->nd_loc);
24498 return 1;
24499 }
24500 return 0;
24501}
24502
24503static int
24504it_used_p(struct parser_params *p)
24505{
24506 NODE *it = p->lvtbl->it;
24507 if (it) {
24508 compile_error(p, "numbered parameters are not allowed when 'it' is already used\n"
24509 "%s:%d: 'it' is already used here",
24510 p->ruby_sourcefile, nd_line(it));
24511 parser_show_error_line(p, &it->nd_loc);
24512 return 1;
24513 }
24514 return 0;
24515}
24516
24517static NODE*
24518gettable(struct parser_params *p, ID id, const YYLTYPE *loc)
24519{
24520 ID *vidp = NULL;
24521 NODE *node;
24522 switch (id) {
24523 case keyword_self:
24524 return NEW_SELF(loc);
24525 case keyword_nil:
24526 return NEW_NIL(loc);
24527 case keyword_true:
24528 return NEW_TRUE(loc);
24529 case keyword_false:
24530 return NEW_FALSE(loc);
24531 case keyword__FILE__:
24532 {
24533 VALUE file = p->ruby_sourcefile_string;
24534 if (NIL_P(file))
24535 file = rb_str_new(0, 0);
24536 node = NEW_FILE(file, loc);
24537 }
24538 return node;
24539 case keyword__LINE__:
24540 return NEW_LINE(loc);
24541 case keyword__ENCODING__:
24542 return NEW_ENCODING(loc);
24543
24544 }
24545 switch (id_type(id)) {
24546 case ID_LOCAL:
24547 if (dyna_in_block(p) && dvar_defined_ref(p, id, &vidp)) {
24548 if (NUMPARAM_ID_P(id) && (numparam_nested_p(p) || it_used_p(p))) return 0;
24549 if (vidp) *vidp |= LVAR_USED;
24550 node = NEW_DVAR(id, loc);
24551 return node;
24552 }
24553 if (local_id_ref(p, id, &vidp)) {
24554 if (vidp) *vidp |= LVAR_USED;
24555 node = NEW_LVAR(id, loc);
24556 return node;
24557 }
24558 if (dyna_in_block(p) && NUMPARAM_ID_P(id) &&
24559 parser_numbered_param(p, NUMPARAM_ID_TO_IDX(id))) {
24560 if (numparam_nested_p(p) || it_used_p(p)) return 0;
24561 node = NEW_DVAR(id, loc);
24562 struct local_vars *local = p->lvtbl;
24563 if (!local->numparam.current) local->numparam.current = node;
24564 return node;
24565 }
24566# if WARN_PAST_SCOPE
24567 if (!p->ctxt.in_defined && RTEST(ruby_verbose) && past_dvar_p(p, id)) {
24568 rb_warning1("possible reference to past scope - %"PRIsWARN, rb_id2str(id));
24569 }
24570# endif
24571 /* method call without arguments */
24572 if (dyna_in_block(p) && id == idIt && !(DVARS_TERMINAL_P(p->lvtbl->args) || DVARS_TERMINAL_P(p->lvtbl->args->prev))) {
24573 if (numparam_used_p(p)) return 0;
24574 if (p->max_numparam == ORDINAL_PARAM) {
24575 compile_error(p, "ordinary parameter is defined");
24576 return 0;
24577 }
24578 if (!p->it_id) {
24579 p->it_id = idItImplicit;
24580 vtable_add(p->lvtbl->args, p->it_id);
24581 }
24582 NODE *node = NEW_DVAR(p->it_id, loc);
24583 if (!p->lvtbl->it) p->lvtbl->it = node;
24584 return node;
24585 }
24586 return NEW_VCALL(id, loc);
24587 case ID_GLOBAL:
24588 return NEW_GVAR(id, loc);
24589 case ID_INSTANCE:
24590 return NEW_IVAR(id, loc);
24591 case ID_CONST:
24592 return NEW_CONST(id, loc);
24593 case ID_CLASS:
24594 return NEW_CVAR(id, loc);
24595 }
24596 compile_error(p, "identifier %"PRIsVALUE" is not valid to get", rb_id2str(id));
24597 return 0;
24598}
24599
24600static rb_node_opt_arg_t *
24601opt_arg_append(rb_node_opt_arg_t *opt_list, rb_node_opt_arg_t *opt)
24602{
24603 rb_node_opt_arg_t *opts = opt_list;
24604 RNODE(opts)->nd_loc.end_pos = RNODE(opt)->nd_loc.end_pos;
24605
24606 while (opts->nd_next) {
24607 opts = opts->nd_next;
24608 RNODE(opts)->nd_loc.end_pos = RNODE(opt)->nd_loc.end_pos;
24609 }
24610 opts->nd_next = opt;
24611
24612 return opt_list;
24613}
24614
24615static rb_node_kw_arg_t *
24616kwd_append(rb_node_kw_arg_t *kwlist, rb_node_kw_arg_t *kw)
24617{
24618 if (kwlist) {
24619 /* Assume rb_node_kw_arg_t and rb_node_opt_arg_t has same structure */
24620 opt_arg_append(RNODE_OPT_ARG(kwlist), RNODE_OPT_ARG(kw));
24621 }
24622 return kwlist;
24623}
24624
24625static NODE *
24626new_defined(struct parser_params *p, NODE *expr, const YYLTYPE *loc, const YYLTYPE *keyword_loc)
24627{
24628 int had_trailing_semicolon = p->ctxt.has_trailing_semicolon;
24629 p->ctxt.has_trailing_semicolon = 0;
24630
24631 NODE *n = expr;
24632 while (n) {
24633 if (nd_type_p(n, NODE_BEGIN)) {
24634 n = RNODE_BEGIN(n)->nd_body;
24635 }
24636 else if (nd_type_p(n, NODE_BLOCK) && RNODE_BLOCK(n)->nd_end == n) {
24637 n = RNODE_BLOCK(n)->nd_head;
24638 }
24639 else {
24640 break;
24641 }
24642 }
24643
24644 if (had_trailing_semicolon && !nd_type_p(expr, NODE_BLOCK)) {
24645 NODE *block = NEW_BLOCK(expr, loc);
24646 return NEW_DEFINED(block, loc, keyword_loc);
24647 }
24648
24649 return NEW_DEFINED(n, loc, keyword_loc);
24650}
24651
24652static NODE*
24653str_to_sym_node(struct parser_params *p, NODE *node, const YYLTYPE *loc)
24654{
24655 VALUE lit;
24656 rb_parser_string_t *str = RNODE_STR(node)->string;
24657 if (rb_parser_enc_str_coderange(p, str) == RB_PARSER_ENC_CODERANGE_BROKEN) {
24658 yyerror1(loc, "invalid symbol");
24659 lit = STR_NEW0();
24660 }
24661 else {
24662 lit = rb_str_new_parser_string(str);
24663 }
24664 return NEW_SYM(lit, loc);
24665}
24666
24667static NODE*
24668symbol_append(struct parser_params *p, NODE *symbols, NODE *symbol)
24669{
24670 enum node_type type = nd_type(symbol);
24671 switch (type) {
24672 case NODE_DSTR:
24673 nd_set_type(symbol, NODE_DSYM);
24674 break;
24675 case NODE_STR:
24676 symbol = str_to_sym_node(p, symbol, &RNODE(symbol)->nd_loc);
24677 break;
24678 default:
24679 compile_error(p, "unexpected node as symbol: %s", parser_node_name(type));
24680 }
24681 return list_append(p, symbols, symbol);
24682}
24683
24684static void
24685dregex_fragment_setenc(struct parser_params *p, rb_node_dregx_t *const dreg, int options)
24686{
24687 if (dreg->string) {
24688 reg_fragment_setenc(p, dreg->string, options);
24689 }
24690 for (struct RNode_LIST *list = dreg->nd_next; list; list = RNODE_LIST(list->nd_next)) {
24691 NODE *frag = list->nd_head;
24692 if (nd_type_p(frag, NODE_STR)) {
24693 reg_fragment_setenc(p, RNODE_STR(frag)->string, options);
24694 }
24695 else if (nd_type_p(frag, NODE_DSTR)) {
24696 dregex_fragment_setenc(p, RNODE_DSTR(frag), options);
24697 }
24698 }
24699}
24700
24701static NODE *
24702new_regexp(struct parser_params *p, NODE *node, int options, const YYLTYPE *loc, const YYLTYPE *opening_loc, const YYLTYPE *content_loc, const YYLTYPE *closing_loc)
24703{
24704 if (!node) {
24705 /* Check string is valid regex */
24706 rb_parser_string_t *str = STRING_NEW0();
24707 reg_compile(p, str, options);
24708 node = NEW_REGX(str, options, loc, opening_loc, content_loc, closing_loc);
24709 return node;
24710 }
24711 switch (nd_type(node)) {
24712 case NODE_STR:
24713 {
24714 /* Check string is valid regex */
24715 reg_compile(p, RNODE_STR(node)->string, options);
24716 node = str2regx(p, node, options, loc, opening_loc, content_loc, closing_loc);
24717 }
24718 break;
24719 default:
24720 node = NEW_DSTR0(STRING_NEW0(), 1, NEW_LIST(node, loc), loc);
24721 /* fall through */
24722 case NODE_DSTR:
24723 nd_set_type(node, NODE_DREGX);
24724 nd_set_loc(node, loc);
24725 rb_node_dregx_t *const dreg = RNODE_DREGX(node);
24726 dreg->as.nd_cflag = options & RE_OPTION_MASK;
24727 if (dreg->nd_next) {
24728 dregex_fragment_setenc(p, dreg, options);
24729 }
24730 if (options & RE_OPTION_ONCE) {
24731 node = NEW_ONCE(node, loc);
24732 }
24733 break;
24734 }
24735 return node;
24736}
24737
24738static rb_node_kw_arg_t *
24739new_kw_arg(struct parser_params *p, NODE *k, const YYLTYPE *loc)
24740{
24741 if (!k) return 0;
24742 return NEW_KW_ARG((k), loc);
24743}
24744
24745static NODE *
24746new_xstring(struct parser_params *p, NODE *node, const YYLTYPE *loc)
24747{
24748 if (!node) {
24749 NODE *xstr = NEW_XSTR(STRING_NEW0(), loc);
24750 return xstr;
24751 }
24752 switch (nd_type(node)) {
24753 case NODE_STR:
24754 nd_set_type(node, NODE_XSTR);
24755 nd_set_loc(node, loc);
24756 break;
24757 case NODE_DSTR:
24758 nd_set_type(node, NODE_DXSTR);
24759 nd_set_loc(node, loc);
24760 break;
24761 default:
24762 node = NEW_DXSTR(0, 1, NEW_LIST(node, loc), loc);
24763 break;
24764 }
24765 return node;
24766}
24767
24768static const
24769struct st_hash_type literal_type = {
24770 literal_cmp,
24771 literal_hash,
24772};
24773
24774static int nd_type_st_key_enable_p(NODE *node);
24775
24776static void
24777check_literal_when(struct parser_params *p, NODE *arg, const YYLTYPE *loc)
24778{
24779 /* See https://bugs.ruby-lang.org/issues/20331 for discussion about what is warned. */
24780 if (!arg || !p->case_labels) return;
24781 if (!nd_type_st_key_enable_p(arg)) return;
24782
24783 if (p->case_labels == CHECK_LITERAL_WHEN) {
24784 p->case_labels = st_init_table(&literal_type);
24785 }
24786 else {
24787 st_data_t line;
24788 if (st_lookup(p->case_labels, (st_data_t)arg, &line)) {
24789 rb_warning2("'when' clause on line %d duplicates 'when' clause on line %d and is ignored",
24790 WARN_I((int)nd_line(arg)), WARN_I((int)line));
24791 return;
24792 }
24793 }
24794 st_insert(p->case_labels, (st_data_t)arg, (st_data_t)p->ruby_sourceline);
24795}
24796
24797#ifdef RIPPER
24798static int
24799id_is_var(struct parser_params *p, ID id)
24800{
24801 if (is_notop_id(id)) {
24802 switch (id & ID_SCOPE_MASK) {
24803 case ID_GLOBAL: case ID_INSTANCE: case ID_CONST: case ID_CLASS:
24804 return 1;
24805 case ID_LOCAL:
24806 if (dyna_in_block(p)) {
24807 if (NUMPARAM_ID_P(id) || dvar_defined(p, id)) return 1;
24808 }
24809 if (local_id(p, id)) return 1;
24810 /* method call without arguments */
24811 return 0;
24812 }
24813 }
24814 compile_error(p, "identifier %"PRIsVALUE" is not valid to get", rb_id2str(id));
24815 return 0;
24816}
24817#endif
24818
24819static inline enum lex_state_e
24820parser_set_lex_state(struct parser_params *p, enum lex_state_e ls, int line)
24821{
24822 if (p->debug) {
24823 ls = rb_parser_trace_lex_state(p, p->lex.state, ls, line);
24824 }
24825 return p->lex.state = ls;
24826}
24827
24828#ifndef RIPPER
24829static void
24830flush_debug_buffer(struct parser_params *p, VALUE out, VALUE str)
24831{
24832 VALUE mesg = p->debug_buffer;
24833
24834 if (!NIL_P(mesg) && RSTRING_LEN(mesg)) {
24835 p->debug_buffer = Qnil;
24836 rb_io_puts(1, &mesg, out);
24837 }
24838 if (!NIL_P(str) && RSTRING_LEN(str)) {
24839 rb_io_write(p->debug_output, str);
24840 }
24841}
24842
24843static const char rb_parser_lex_state_names[][8] = {
24844 "BEG", "END", "ENDARG", "ENDFN", "ARG",
24845 "CMDARG", "MID", "FNAME", "DOT", "CLASS",
24846 "LABEL", "LABELED","FITEM",
24847};
24848
24849static VALUE
24850append_lex_state_name(struct parser_params *p, enum lex_state_e state, VALUE buf)
24851{
24852 int i, sep = 0;
24853 unsigned int mask = 1;
24854 static const char none[] = "NONE";
24855
24856 for (i = 0; i < EXPR_MAX_STATE; ++i, mask <<= 1) {
24857 if ((unsigned)state & mask) {
24858 if (sep) {
24859 rb_str_cat(buf, "|", 1);
24860 }
24861 sep = 1;
24862 rb_str_cat_cstr(buf, rb_parser_lex_state_names[i]);
24863 }
24864 }
24865 if (!sep) {
24866 rb_str_cat(buf, none, sizeof(none)-1);
24867 }
24868 return buf;
24869}
24870
24871enum lex_state_e
24872rb_parser_trace_lex_state(struct parser_params *p, enum lex_state_e from,
24873 enum lex_state_e to, int line)
24874{
24875 VALUE mesg;
24876 mesg = rb_str_new_cstr("lex_state: ");
24877 append_lex_state_name(p, from, mesg);
24878 rb_str_cat_cstr(mesg, " -> ");
24879 append_lex_state_name(p, to, mesg);
24880 rb_str_catf(mesg, " at line %d\n", line);
24881 flush_debug_buffer(p, p->debug_output, mesg);
24882 return to;
24883}
24884
24885VALUE
24886rb_parser_lex_state_name(struct parser_params *p, enum lex_state_e state)
24887{
24888 return rb_str_to_interned_str(append_lex_state_name(p, state, rb_str_new(0, 0)));
24889}
24890
24891static void
24892append_bitstack_value(struct parser_params *p, stack_type stack, VALUE mesg)
24893{
24894 if (stack == 0) {
24895 rb_str_cat_cstr(mesg, "0");
24896 }
24897 else {
24898 stack_type mask = (stack_type)1U << (CHAR_BIT * sizeof(stack_type) - 1);
24899 for (; mask && !(stack & mask); mask >>= 1) continue;
24900 for (; mask; mask >>= 1) rb_str_cat(mesg, stack & mask ? "1" : "0", 1);
24901 }
24902}
24903
24904void
24905rb_parser_show_bitstack(struct parser_params *p, stack_type stack,
24906 const char *name, int line)
24907{
24908 VALUE mesg = rb_sprintf("%s: ", name);
24909 append_bitstack_value(p, stack, mesg);
24910 rb_str_catf(mesg, " at line %d\n", line);
24911 flush_debug_buffer(p, p->debug_output, mesg);
24912}
24913
24914void
24915rb_parser_fatal(struct parser_params *p, const char *fmt, ...)
24916{
24917 va_list ap;
24918 VALUE mesg = rb_str_new_cstr("internal parser error: ");
24919
24920 va_start(ap, fmt);
24921 rb_str_vcatf(mesg, fmt, ap);
24922 va_end(ap);
24923 yyerror0(RSTRING_PTR(mesg));
24924 RB_GC_GUARD(mesg);
24925
24926 mesg = rb_str_new(0, 0);
24927 append_lex_state_name(p, p->lex.state, mesg);
24928 compile_error(p, "lex.state: %"PRIsVALUE, mesg);
24929 rb_str_resize(mesg, 0);
24930 append_bitstack_value(p, p->cond_stack, mesg);
24931 compile_error(p, "cond_stack: %"PRIsVALUE, mesg);
24932 rb_str_resize(mesg, 0);
24933 append_bitstack_value(p, p->cmdarg_stack, mesg);
24934 compile_error(p, "cmdarg_stack: %"PRIsVALUE, mesg);
24935 if (p->debug_output == rb_ractor_stdout())
24936 p->debug_output = rb_ractor_stderr();
24937 p->debug = TRUE;
24938}
24939
24940static YYLTYPE *
24941rb_parser_set_pos(YYLTYPE *yylloc, int sourceline, int beg_pos, int end_pos)
24942{
24943 yylloc->beg_pos.lineno = sourceline;
24944 yylloc->beg_pos.column = beg_pos;
24945 yylloc->end_pos.lineno = sourceline;
24946 yylloc->end_pos.column = end_pos;
24947 return yylloc;
24948}
24949
24950YYLTYPE *
24951rb_parser_set_location_from_strterm_heredoc(struct parser_params *p, rb_strterm_heredoc_t *here, YYLTYPE *yylloc)
24952{
24953 int sourceline = here->sourceline;
24954 int beg_pos = parser_column(here->offset - here->quote
24955 - (rb_strlen_lit("<<-") - !(here->func & STR_FUNC_INDENT)));
24956 int end_pos = parser_column(here->offset + here->length + here->quote);
24957
24958 return rb_parser_set_pos(yylloc, sourceline, beg_pos, end_pos);
24959}
24960
24961YYLTYPE *
24962rb_parser_set_location_of_delayed_token(struct parser_params *p, YYLTYPE *yylloc)
24963{
24964 yylloc->beg_pos.lineno = p->delayed.beg_line;
24965 yylloc->beg_pos.column = p->delayed.beg_col;
24966 yylloc->end_pos.lineno = p->delayed.end_line;
24967 yylloc->end_pos.column = p->delayed.end_col;
24968
24969 return yylloc;
24970}
24971
24972YYLTYPE *
24973rb_parser_set_location_of_heredoc_end(struct parser_params *p, YYLTYPE *yylloc)
24974{
24975 int sourceline = p->ruby_sourceline;
24976 int beg_pos = parser_column(p->lex.ptok - p->lex.pbeg);
24977 int end_pos = parser_column(p->lex.pend - p->lex.pbeg);
24978 return rb_parser_set_pos(yylloc, sourceline, beg_pos, end_pos);
24979}
24980
24981YYLTYPE *
24982rb_parser_set_location_of_dummy_end(struct parser_params *p, YYLTYPE *yylloc)
24983{
24984 yylloc->end_pos = yylloc->beg_pos;
24985
24986 return yylloc;
24987}
24988
24989YYLTYPE *
24990rb_parser_set_location_of_none(struct parser_params *p, YYLTYPE *yylloc)
24991{
24992 int sourceline = p->ruby_sourceline;
24993 int beg_pos = parser_column(p->lex.ptok - p->lex.pbeg);
24994 int end_pos = parser_column(p->lex.ptok - p->lex.pbeg);
24995 return rb_parser_set_pos(yylloc, sourceline, beg_pos, end_pos);
24996}
24997
24998YYLTYPE *
24999rb_parser_set_location(struct parser_params *p, YYLTYPE *yylloc)
25000{
25001 int sourceline = p->ruby_sourceline;
25002 int beg_pos = parser_column(p->lex.ptok - p->lex.pbeg);
25003 int end_pos = parser_column(p->lex.pcur - p->lex.pbeg);
25004 return rb_parser_set_pos(yylloc, sourceline, beg_pos, end_pos);
25005}
25006#endif /* !RIPPER */
25007
25008static int
25009assignable0(struct parser_params *p, ID id, const char **err)
25010{
25011 if (!id) return -1;
25012 switch (id) {
25013 case keyword_self:
25014 *err = "Can't change the value of self";
25015 return -1;
25016 case keyword_nil:
25017 *err = "Can't assign to nil";
25018 return -1;
25019 case keyword_true:
25020 *err = "Can't assign to true";
25021 return -1;
25022 case keyword_false:
25023 *err = "Can't assign to false";
25024 return -1;
25025 case keyword__FILE__:
25026 *err = "Can't assign to __FILE__";
25027 return -1;
25028 case keyword__LINE__:
25029 *err = "Can't assign to __LINE__";
25030 return -1;
25031 case keyword__ENCODING__:
25032 *err = "Can't assign to __ENCODING__";
25033 return -1;
25034 }
25035 switch (id_type(id)) {
25036 case ID_LOCAL:
25037 if (dyna_in_block(p)) {
25038 if (p->max_numparam > NO_PARAM && NUMPARAM_ID_P(id)) {
25039 compile_error(p, "Can't assign to numbered parameter _%d",
25040 NUMPARAM_ID_TO_IDX(id));
25041 return -1;
25042 }
25043 if (dvar_curr(p, id)) return NODE_DASGN;
25044 if (dvar_defined(p, id)) return NODE_DASGN;
25045 if (local_id(p, id)) return NODE_LASGN;
25046 dyna_var(p, id);
25047 return NODE_DASGN;
25048 }
25049 else {
25050 if (!local_id(p, id)) local_var(p, id);
25051 return NODE_LASGN;
25052 }
25053 break;
25054 case ID_GLOBAL: return NODE_GASGN;
25055 case ID_INSTANCE: return NODE_IASGN;
25056 case ID_CONST:
25057 if (!p->ctxt.in_def) return NODE_CDECL;
25058 *err = "dynamic constant assignment";
25059 return -1;
25060 case ID_CLASS: return NODE_CVASGN;
25061 default:
25062 compile_error(p, "identifier %"PRIsVALUE" is not valid to set", rb_id2str(id));
25063 }
25064 return -1;
25065}
25066
25067static NODE*
25068assignable(struct parser_params *p, ID id, NODE *val, const YYLTYPE *loc)
25069{
25070 const char *err = 0;
25071 int node_type = assignable0(p, id, &err);
25072 switch (node_type) {
25073 case NODE_DASGN: return NEW_DASGN(id, val, loc);
25074 case NODE_LASGN: return NEW_LASGN(id, val, loc);
25075 case NODE_GASGN: return NEW_GASGN(id, val, loc);
25076 case NODE_IASGN: return NEW_IASGN(id, val, loc);
25077 case NODE_CDECL: return NEW_CDECL(id, val, 0, p->ctxt.shareable_constant_value, loc);
25078 case NODE_CVASGN: return NEW_CVASGN(id, val, loc);
25079 }
25080/* TODO: FIXME */
25081#ifndef RIPPER
25082 if (err) yyerror1(loc, err);
25083#else
25084 if (err) set_value(assign_error(p, err, p->s_lvalue));
25085#endif
25086 return NEW_ERROR(loc);
25087}
25088
25089static int
25090is_private_local_id(struct parser_params *p, ID name)
25091{
25092 VALUE s;
25093 if (name == idUScore) return 1;
25094 if (!is_local_id(name)) return 0;
25095 s = rb_id2str(name);
25096 if (!s) return 0;
25097 return RSTRING_PTR(s)[0] == '_';
25098}
25099
25100static int
25101shadowing_lvar_0(struct parser_params *p, ID name)
25102{
25103 if (dyna_in_block(p)) {
25104 if (dvar_curr(p, name)) {
25105 if (is_private_local_id(p, name)) return 1;
25106 yyerror0("duplicated argument name");
25107 }
25108 else if (dvar_defined(p, name) || local_id(p, name)) {
25109 vtable_add(p->lvtbl->vars, name);
25110 if (p->lvtbl->used) {
25111 vtable_add(p->lvtbl->used, (ID)p->ruby_sourceline | LVAR_USED);
25112 }
25113 return 0;
25114 }
25115 }
25116 else {
25117 if (local_id(p, name)) {
25118 if (is_private_local_id(p, name)) return 1;
25119 yyerror0("duplicated argument name");
25120 }
25121 }
25122 return 1;
25123}
25124
25125static ID
25126shadowing_lvar(struct parser_params *p, ID name)
25127{
25128 shadowing_lvar_0(p, name);
25129 return name;
25130}
25131
25132static void
25133new_bv(struct parser_params *p, ID name)
25134{
25135 if (!name) return;
25136 if (!is_local_id(name)) {
25137 compile_error(p, "invalid local variable - %"PRIsVALUE,
25138 rb_id2str(name));
25139 return;
25140 }
25141 if (!shadowing_lvar_0(p, name)) return;
25142 dyna_var(p, name);
25143 ID *vidp = 0;
25144 if (dvar_defined_ref(p, name, &vidp)) {
25145 if (vidp) *vidp |= LVAR_USED;
25146 }
25147}
25148
25149static void
25150aryset_check(struct parser_params *p, NODE *args)
25151{
25152 NODE *block = 0, *kwds = 0;
25153 if (args && nd_type_p(args, NODE_BLOCK_PASS)) {
25154 block = RNODE_BLOCK_PASS(args)->nd_body;
25155 args = RNODE_BLOCK_PASS(args)->nd_head;
25156 }
25157 if (args && nd_type_p(args, NODE_ARGSCAT)) {
25158 args = RNODE_ARGSCAT(args)->nd_body;
25159 }
25160 if (args && nd_type_p(args, NODE_ARGSPUSH)) {
25161 kwds = RNODE_ARGSPUSH(args)->nd_body;
25162 }
25163 else {
25164 for (NODE *next = args; next && nd_type_p(next, NODE_LIST);
25165 next = RNODE_LIST(next)->nd_next) {
25166 kwds = RNODE_LIST(next)->nd_head;
25167 }
25168 }
25169 if (kwds && nd_type_p(kwds, NODE_HASH) && !RNODE_HASH(kwds)->nd_brace) {
25170 yyerror1(&kwds->nd_loc, "keyword arg given in index assignment");
25171 }
25172 if (block) {
25173 yyerror1(&block->nd_loc, "block arg given in index assignment");
25174 }
25175}
25176
25177static NODE *
25178aryset(struct parser_params *p, NODE *recv, NODE *idx, const YYLTYPE *loc)
25179{
25180 aryset_check(p, idx);
25181 return NEW_ATTRASGN(recv, tASET, idx, loc);
25182}
25183
25184static void
25185block_dup_check(struct parser_params *p, NODE *node1, NODE *node2)
25186{
25187 if (node2 && node1 && nd_type_p(node1, NODE_BLOCK_PASS)) {
25188 compile_error(p, "both block arg and actual block given");
25189 }
25190}
25191
25192static NODE *
25193attrset(struct parser_params *p, NODE *recv, ID atype, ID id, const YYLTYPE *loc)
25194{
25195 if (!CALL_Q_P(atype)) id = rb_id_attrset(id);
25196 return NEW_ATTRASGN(recv, id, 0, loc);
25197}
25198
25199static VALUE
25200rb_backref_error(struct parser_params *p, NODE *node)
25201{
25202#ifndef RIPPER
25203# define ERR(...) (compile_error(p, __VA_ARGS__), Qtrue)
25204#else
25205# define ERR(...) rb_sprintf(__VA_ARGS__)
25206#endif
25207 switch (nd_type(node)) {
25208 case NODE_NTH_REF:
25209 return ERR("Can't set variable $%ld", RNODE_NTH_REF(node)->nd_nth);
25210 case NODE_BACK_REF:
25211 return ERR("Can't set variable $%c", (int)RNODE_BACK_REF(node)->nd_nth);
25212 }
25213#undef ERR
25214 UNREACHABLE_RETURN(Qfalse); /* only called on syntax error */
25215}
25216
25217static NODE *
25218arg_append(struct parser_params *p, NODE *node1, NODE *node2, const YYLTYPE *loc)
25219{
25220 if (!node1) return NEW_LIST(node2, &node2->nd_loc);
25221 switch (nd_type(node1)) {
25222 case NODE_LIST:
25223 return list_append(p, node1, node2);
25224 case NODE_BLOCK_PASS:
25225 RNODE_BLOCK_PASS(node1)->nd_head = arg_append(p, RNODE_BLOCK_PASS(node1)->nd_head, node2, loc);
25226 node1->nd_loc.end_pos = RNODE_BLOCK_PASS(node1)->nd_head->nd_loc.end_pos;
25227 return node1;
25228 case NODE_ARGSPUSH:
25229 RNODE_ARGSPUSH(node1)->nd_body = list_append(p, NEW_LIST(RNODE_ARGSPUSH(node1)->nd_body, &RNODE_ARGSPUSH(node1)->nd_body->nd_loc), node2);
25230 node1->nd_loc.end_pos = RNODE_ARGSPUSH(node1)->nd_body->nd_loc.end_pos;
25231 nd_set_type(node1, NODE_ARGSCAT);
25232 return node1;
25233 case NODE_ARGSCAT:
25234 if (!nd_type_p(RNODE_ARGSCAT(node1)->nd_body, NODE_LIST)) break;
25235 RNODE_ARGSCAT(node1)->nd_body = list_append(p, RNODE_ARGSCAT(node1)->nd_body, node2);
25236 node1->nd_loc.end_pos = RNODE_ARGSCAT(node1)->nd_body->nd_loc.end_pos;
25237 return node1;
25238 }
25239 return NEW_ARGSPUSH(node1, node2, loc);
25240}
25241
25242static NODE *
25243arg_concat(struct parser_params *p, NODE *node1, NODE *node2, const YYLTYPE *loc)
25244{
25245 if (!node2) return node1;
25246 switch (nd_type(node1)) {
25247 case NODE_BLOCK_PASS:
25248 if (RNODE_BLOCK_PASS(node1)->nd_head)
25249 RNODE_BLOCK_PASS(node1)->nd_head = arg_concat(p, RNODE_BLOCK_PASS(node1)->nd_head, node2, loc);
25250 else
25251 RNODE_LIST(node1)->nd_head = NEW_LIST(node2, loc);
25252 return node1;
25253 case NODE_ARGSPUSH:
25254 if (!nd_type_p(node2, NODE_LIST)) break;
25255 RNODE_ARGSPUSH(node1)->nd_body = list_concat(NEW_LIST(RNODE_ARGSPUSH(node1)->nd_body, loc), node2);
25256 nd_set_type(node1, NODE_ARGSCAT);
25257 return node1;
25258 case NODE_ARGSCAT:
25259 if (!nd_type_p(node2, NODE_LIST) ||
25260 !nd_type_p(RNODE_ARGSCAT(node1)->nd_body, NODE_LIST)) break;
25261 RNODE_ARGSCAT(node1)->nd_body = list_concat(RNODE_ARGSCAT(node1)->nd_body, node2);
25262 return node1;
25263 }
25264 return NEW_ARGSCAT(node1, node2, loc);
25265}
25266
25267static NODE *
25268last_arg_append(struct parser_params *p, NODE *args, NODE *last_arg, const YYLTYPE *loc)
25269{
25270 NODE *n1;
25271 if ((n1 = splat_array(args)) != 0) {
25272 return list_append(p, n1, last_arg);
25273 }
25274 return arg_append(p, args, last_arg, loc);
25275}
25276
25277static NODE *
25278rest_arg_append(struct parser_params *p, NODE *args, NODE *rest_arg, const YYLTYPE *loc)
25279{
25280 NODE *n1;
25281 if ((nd_type_p(rest_arg, NODE_LIST)) && (n1 = splat_array(args)) != 0) {
25282 return list_concat(n1, rest_arg);
25283 }
25284 return arg_concat(p, args, rest_arg, loc);
25285}
25286
25287static NODE *
25288splat_array(NODE* node)
25289{
25290 if (nd_type_p(node, NODE_SPLAT)) node = RNODE_SPLAT(node)->nd_head;
25291 if (nd_type_p(node, NODE_LIST)) return node;
25292 return 0;
25293}
25294
25295static void
25296mark_lvar_used(struct parser_params *p, NODE *rhs)
25297{
25298 ID *vidp = NULL;
25299 if (!rhs) return;
25300 switch (nd_type(rhs)) {
25301 case NODE_LASGN:
25302 if (local_id_ref(p, RNODE_LASGN(rhs)->nd_vid, &vidp)) {
25303 if (vidp) *vidp |= LVAR_USED;
25304 }
25305 break;
25306 case NODE_DASGN:
25307 if (dvar_defined_ref(p, RNODE_DASGN(rhs)->nd_vid, &vidp)) {
25308 if (vidp) *vidp |= LVAR_USED;
25309 }
25310 break;
25311#if 0
25312 case NODE_MASGN:
25313 for (rhs = rhs->nd_head; rhs; rhs = rhs->nd_next) {
25314 mark_lvar_used(p, rhs->nd_head);
25315 }
25316 break;
25317#endif
25318 }
25319}
25320
25321static int is_static_content(NODE *node);
25322
25323static NODE *
25324node_assign(struct parser_params *p, NODE *lhs, NODE *rhs, struct lex_context ctxt, const YYLTYPE *loc)
25325{
25326 if (!lhs) return 0;
25327
25328 switch (nd_type(lhs)) {
25329 case NODE_CDECL:
25330 case NODE_GASGN:
25331 case NODE_IASGN:
25332 case NODE_LASGN:
25333 case NODE_DASGN:
25334 case NODE_MASGN:
25335 case NODE_CVASGN:
25336 set_nd_value(p, lhs, rhs);
25337 nd_set_loc(lhs, loc);
25338 break;
25339
25340 case NODE_ATTRASGN:
25341 RNODE_ATTRASGN(lhs)->nd_args = arg_append(p, RNODE_ATTRASGN(lhs)->nd_args, rhs, loc);
25342 nd_set_loc(lhs, loc);
25343 break;
25344
25345 default:
25346 /* should not happen */
25347 break;
25348 }
25349
25350 return lhs;
25351}
25352
25353static NODE *
25354value_expr_check(struct parser_params *p, NODE *node)
25355{
25356 NODE *void_node = 0, *vn;
25357
25358 if (!node) {
25359 rb_warning0("empty expression");
25360 }
25361 while (node) {
25362 switch (nd_type(node)) {
25363 case NODE_ENSURE:
25364 vn = RNODE_ENSURE(node)->nd_head;
25365 node = RNODE_ENSURE(node)->nd_ensr;
25366 /* nd_ensr should not be NULL, check it out next */
25367 if (vn && (vn = value_expr_check(p, vn))) {
25368 goto found;
25369 }
25370 break;
25371
25372 case NODE_RESCUE:
25373 /* void only if all children are void */
25374 vn = RNODE_RESCUE(node)->nd_head;
25375 if (!vn || !(vn = value_expr_check(p, vn))) return NULL;
25376 if (!void_node) void_node = vn;
25377 for (NODE *r = RNODE_RESCUE(node)->nd_resq; r; r = RNODE_RESBODY(r)->nd_next) {
25378 if (!nd_type_p(r, NODE_RESBODY)) {
25379 compile_error(p, "unexpected node");
25380 return NULL;
25381 }
25382 if (!(vn = value_expr_check(p, RNODE_RESBODY(r)->nd_body))) {
25383 void_node = 0;
25384 break;
25385 }
25386 if (!void_node) void_node = vn;
25387 }
25388 node = RNODE_RESCUE(node)->nd_else;
25389 if (!node) return void_node;
25390 break;
25391
25392 case NODE_RETURN:
25393 case NODE_BREAK:
25394 case NODE_NEXT:
25395 case NODE_REDO:
25396 case NODE_RETRY:
25397 goto found;
25398
25399 case NODE_CASE3:
25400 if (!RNODE_CASE3(node)->nd_body || !nd_type_p(RNODE_CASE3(node)->nd_body, NODE_IN)) {
25401 compile_error(p, "unexpected node");
25402 return NULL;
25403 }
25404 if (RNODE_IN(RNODE_CASE3(node)->nd_body)->nd_body) {
25405 return NULL;
25406 }
25407 /* single line pattern matching with "=>" operator */
25408 goto found;
25409
25410 case NODE_BLOCK:
25411 while (RNODE_BLOCK(node)->nd_next) {
25412 node = RNODE_BLOCK(node)->nd_next;
25413 }
25414 node = RNODE_BLOCK(node)->nd_head;
25415 break;
25416
25417 case NODE_BEGIN:
25418 node = RNODE_BEGIN(node)->nd_body;
25419 break;
25420
25421 case NODE_IF:
25422 case NODE_UNLESS:
25423 if (!RNODE_IF(node)->nd_body) {
25424 return NULL;
25425 }
25426 else if (!RNODE_IF(node)->nd_else) {
25427 return NULL;
25428 }
25429 vn = value_expr_check(p, RNODE_IF(node)->nd_body);
25430 if (!vn) return NULL;
25431 if (!void_node) void_node = vn;
25432 node = RNODE_IF(node)->nd_else;
25433 break;
25434
25435 case NODE_AND:
25436 case NODE_OR:
25437 node = RNODE_AND(node)->nd_1st;
25438 break;
25439
25440 case NODE_LASGN:
25441 case NODE_DASGN:
25442 case NODE_MASGN:
25443 mark_lvar_used(p, node);
25444 return NULL;
25445
25446 default:
25447 return NULL;
25448 }
25449 }
25450
25451 return NULL;
25452
25453 found:
25454 /* return the first found node */
25455 return void_node ? void_node : node;
25456}
25457
25458static int
25459value_expr(struct parser_params *p, NODE *node)
25460{
25461 NODE *void_node = value_expr_check(p, node);
25462 if (void_node) {
25463 yyerror1(&void_node->nd_loc, "void value expression");
25464 /* or "control never reach"? */
25465 return FALSE;
25466 }
25467 return TRUE;
25468}
25469
25470static void
25471void_expr(struct parser_params *p, NODE *node)
25472{
25473 const char *useless = 0;
25474
25475 if (!RTEST(ruby_verbose)) return;
25476
25477 if (!node || !(node = nd_once_body(node))) return;
25478 switch (nd_type(node)) {
25479 case NODE_OPCALL:
25480 switch (RNODE_OPCALL(node)->nd_mid) {
25481 case '+':
25482 case '-':
25483 case '*':
25484 case '/':
25485 case '%':
25486 case tPOW:
25487 case tUPLUS:
25488 case tUMINUS:
25489 case '|':
25490 case '^':
25491 case '&':
25492 case tCMP:
25493 case '>':
25494 case tGEQ:
25495 case '<':
25496 case tLEQ:
25497 case tEQ:
25498 case tNEQ:
25499 useless = rb_id2name(RNODE_OPCALL(node)->nd_mid);
25500 break;
25501 }
25502 break;
25503
25504 case NODE_LVAR:
25505 case NODE_DVAR:
25506 case NODE_GVAR:
25507 case NODE_IVAR:
25508 case NODE_CVAR:
25509 case NODE_NTH_REF:
25510 case NODE_BACK_REF:
25511 useless = "a variable";
25512 break;
25513 case NODE_CONST:
25514 useless = "a constant";
25515 break;
25516 case NODE_SYM:
25517 case NODE_LINE:
25518 case NODE_FILE:
25519 case NODE_ENCODING:
25520 case NODE_INTEGER:
25521 case NODE_FLOAT:
25522 case NODE_RATIONAL:
25523 case NODE_IMAGINARY:
25524 case NODE_STR:
25525 case NODE_DSTR:
25526 case NODE_REGX:
25527 case NODE_DREGX:
25528 useless = "a literal";
25529 break;
25530 case NODE_COLON2:
25531 case NODE_COLON3:
25532 useless = "::";
25533 break;
25534 case NODE_DOT2:
25535 useless = "..";
25536 break;
25537 case NODE_DOT3:
25538 useless = "...";
25539 break;
25540 case NODE_SELF:
25541 useless = "self";
25542 break;
25543 case NODE_NIL:
25544 useless = "nil";
25545 break;
25546 case NODE_TRUE:
25547 useless = "true";
25548 break;
25549 case NODE_FALSE:
25550 useless = "false";
25551 break;
25552 case NODE_DEFINED:
25553 useless = "defined?";
25554 break;
25555 }
25556
25557 if (useless) {
25558 rb_warn1L(nd_line(node), "possibly useless use of %s in void context", WARN_S(useless));
25559 }
25560}
25561
25562/* warns useless use of block and returns the last statement node */
25563static NODE *
25564void_stmts(struct parser_params *p, NODE *node)
25565{
25566 NODE *const n = node;
25567 if (!RTEST(ruby_verbose)) return n;
25568 if (!node) return n;
25569 if (!nd_type_p(node, NODE_BLOCK)) return n;
25570
25571 while (RNODE_BLOCK(node)->nd_next) {
25572 void_expr(p, RNODE_BLOCK(node)->nd_head);
25573 node = RNODE_BLOCK(node)->nd_next;
25574 }
25575 return RNODE_BLOCK(node)->nd_head;
25576}
25577
25578static NODE *
25579remove_begin(NODE *node)
25580{
25581 NODE **n = &node, *n1 = node;
25582 while (n1 && nd_type_p(n1, NODE_BEGIN) && RNODE_BEGIN(n1)->nd_body) {
25583 *n = n1 = RNODE_BEGIN(n1)->nd_body;
25584 }
25585 return node;
25586}
25587
25588static void
25589reduce_nodes(struct parser_params *p, NODE **body)
25590{
25591 NODE *node = *body;
25592
25593 if (!node) {
25594 *body = NEW_NIL(&NULL_LOC);
25595 return;
25596 }
25597#define subnodes(type, n1, n2) \
25598 ((!type(node)->n1) ? (type(node)->n2 ? (body = &type(node)->n2, 1) : 0) : \
25599 (!type(node)->n2) ? (body = &type(node)->n1, 1) : \
25600 (reduce_nodes(p, &type(node)->n1), body = &type(node)->n2, 1))
25601
25602 while (node) {
25603 int newline = (int)nd_fl_newline(node);
25604 switch (nd_type(node)) {
25605 end:
25606 case NODE_NIL:
25607 *body = 0;
25608 return;
25609 case NODE_BEGIN:
25610 *body = node = RNODE_BEGIN(node)->nd_body;
25611 if (newline && node) nd_set_fl_newline(node);
25612 continue;
25613 case NODE_BLOCK:
25614 body = &RNODE_BLOCK(RNODE_BLOCK(node)->nd_end)->nd_head;
25615 break;
25616 case NODE_IF:
25617 case NODE_UNLESS:
25618 if (subnodes(RNODE_IF, nd_body, nd_else)) break;
25619 return;
25620 case NODE_CASE:
25621 body = &RNODE_CASE(node)->nd_body;
25622 break;
25623 case NODE_WHEN:
25624 if (!subnodes(RNODE_WHEN, nd_body, nd_next)) goto end;
25625 break;
25626 case NODE_ENSURE:
25627 body = &RNODE_ENSURE(node)->nd_head;
25628 break;
25629 case NODE_RESCUE:
25630 newline = 0; // RESBODY should not be a NEWLINE
25631 if (RNODE_RESCUE(node)->nd_else) {
25632 body = &RNODE_RESCUE(node)->nd_resq;
25633 break;
25634 }
25635 if (!subnodes(RNODE_RESCUE, nd_head, nd_resq)) goto end;
25636 break;
25637 default:
25638 return;
25639 }
25640 node = *body;
25641 if (newline && node) nd_set_fl_newline(node);
25642 }
25643
25644#undef subnodes
25645}
25646
25647static int
25648is_static_content(NODE *node)
25649{
25650 if (!node) return 1;
25651 switch (nd_type(node)) {
25652 case NODE_HASH:
25653 if (!(node = RNODE_HASH(node)->nd_head)) break;
25654 case NODE_LIST:
25655 do {
25656 if (!is_static_content(RNODE_LIST(node)->nd_head)) return 0;
25657 } while ((node = RNODE_LIST(node)->nd_next) != 0);
25658 case NODE_SYM:
25659 case NODE_REGX:
25660 case NODE_LINE:
25661 case NODE_FILE:
25662 case NODE_ENCODING:
25663 case NODE_INTEGER:
25664 case NODE_FLOAT:
25665 case NODE_RATIONAL:
25666 case NODE_IMAGINARY:
25667 case NODE_STR:
25668 case NODE_NIL:
25669 case NODE_TRUE:
25670 case NODE_FALSE:
25671 case NODE_ZLIST:
25672 break;
25673 default:
25674 return 0;
25675 }
25676 return 1;
25677}
25678
25679static int
25680assign_in_cond(struct parser_params *p, NODE *node)
25681{
25682 switch (nd_type(node)) {
25683 case NODE_MASGN:
25684 case NODE_LASGN:
25685 case NODE_DASGN:
25686 case NODE_GASGN:
25687 case NODE_IASGN:
25688 case NODE_CVASGN:
25689 case NODE_CDECL:
25690 break;
25691
25692 default:
25693 return 0;
25694 }
25695
25696 if (!get_nd_value(p, node)) return 1;
25697 if (is_static_content(get_nd_value(p, node))) {
25698 /* reports always */
25699 rb_warn0L(nd_line(get_nd_value(p, node)), "found '= literal' in conditional, should be ==");
25700 }
25701 return 1;
25702}
25703
25704enum cond_type {
25705 COND_IN_OP,
25706 COND_IN_COND,
25707 COND_IN_FF
25708};
25709
25710#define SWITCH_BY_COND_TYPE(t, w, arg) do { \
25711 switch (t) { \
25712 case COND_IN_OP: break; \
25713 case COND_IN_COND: rb_##w##0(arg "literal in condition"); break; \
25714 case COND_IN_FF: rb_##w##0(arg "literal in flip-flop"); break; \
25715 } \
25716} while (0)
25717
25718static NODE *cond0(struct parser_params*,NODE*,enum cond_type,const YYLTYPE*,bool);
25719
25720static NODE*
25721range_op(struct parser_params *p, NODE *node, const YYLTYPE *loc)
25722{
25723 enum node_type type;
25724
25725 if (node == 0) return 0;
25726
25727 type = nd_type(node);
25728 value_expr(p, node);
25729 if (type == NODE_INTEGER) {
25730 if (!e_option_supplied(p)) rb_warn0L(nd_line(node), "integer literal in flip-flop");
25731 ID lineno = rb_intern("$.");
25732 return NEW_CALL(node, tEQ, NEW_LIST(NEW_GVAR(lineno, loc), loc), loc);
25733 }
25734 return cond0(p, node, COND_IN_FF, loc, true);
25735}
25736
25737static NODE*
25738cond0(struct parser_params *p, NODE *node, enum cond_type type, const YYLTYPE *loc, bool top)
25739{
25740 if (node == 0) return 0;
25741 if (!(node = nd_once_body(node))) return 0;
25742 assign_in_cond(p, node);
25743
25744 switch (nd_type(node)) {
25745 case NODE_BEGIN:
25746 RNODE_BEGIN(node)->nd_body = cond0(p, RNODE_BEGIN(node)->nd_body, type, loc, top);
25747 break;
25748
25749 case NODE_DSTR:
25750 case NODE_EVSTR:
25751 case NODE_STR:
25752 case NODE_FILE:
25753 SWITCH_BY_COND_TYPE(type, warn, "string ");
25754 break;
25755
25756 case NODE_REGX:
25757 if (!e_option_supplied(p)) SWITCH_BY_COND_TYPE(type, warn, "regex ");
25758 nd_set_type(node, NODE_MATCH);
25759 break;
25760
25761 case NODE_DREGX:
25762 if (!e_option_supplied(p)) SWITCH_BY_COND_TYPE(type, warning, "regex ");
25763
25764 return NEW_MATCH2(node, NEW_GVAR(idLASTLINE, loc), loc);
25765
25766 case NODE_BLOCK:
25767 {
25768 NODE *end = RNODE_BLOCK(node)->nd_end;
25769 NODE **expr = &RNODE_BLOCK(end)->nd_head;
25770 if (top) top = node == end;
25771 *expr = cond0(p, *expr, type, loc, top);
25772 }
25773 break;
25774
25775 case NODE_AND:
25776 case NODE_OR:
25777 RNODE_AND(node)->nd_1st = cond0(p, RNODE_AND(node)->nd_1st, COND_IN_COND, loc, true);
25778 RNODE_AND(node)->nd_2nd = cond0(p, RNODE_AND(node)->nd_2nd, COND_IN_COND, loc, true);
25779 break;
25780
25781 case NODE_DOT2:
25782 case NODE_DOT3:
25783 if (!top) break;
25784 RNODE_DOT2(node)->nd_beg = range_op(p, RNODE_DOT2(node)->nd_beg, loc);
25785 RNODE_DOT2(node)->nd_end = range_op(p, RNODE_DOT2(node)->nd_end, loc);
25786 switch (nd_type(node)) {
25787 case NODE_DOT2:
25788 nd_set_type(node,NODE_FLIP2);
25789 rb_node_flip2_t *flip2 = RNODE_FLIP2(node); /* for debug info */
25790 (void)flip2;
25791 break;
25792 case NODE_DOT3:
25793 nd_set_type(node, NODE_FLIP3);
25794 rb_node_flip3_t *flip3 = RNODE_FLIP3(node); /* for debug info */
25795 (void)flip3;
25796 break;
25797 }
25798 break;
25799
25800 case NODE_SYM:
25801 case NODE_DSYM:
25802 SWITCH_BY_COND_TYPE(type, warning, "symbol ");
25803 break;
25804
25805 case NODE_LINE:
25806 case NODE_ENCODING:
25807 case NODE_INTEGER:
25808 case NODE_FLOAT:
25809 case NODE_RATIONAL:
25810 case NODE_IMAGINARY:
25811 SWITCH_BY_COND_TYPE(type, warning, "");
25812 break;
25813
25814 default:
25815 break;
25816 }
25817 return node;
25818}
25819
25820static NODE*
25821cond(struct parser_params *p, NODE *node, const YYLTYPE *loc)
25822{
25823 if (node == 0) return 0;
25824 return cond0(p, node, COND_IN_COND, loc, true);
25825}
25826
25827static NODE*
25828method_cond(struct parser_params *p, NODE *node, const YYLTYPE *loc)
25829{
25830 if (node == 0) return 0;
25831 return cond0(p, node, COND_IN_OP, loc, true);
25832}
25833
25834static NODE*
25835new_nil_at(struct parser_params *p, const rb_code_position_t *pos)
25836{
25837 YYLTYPE loc = {*pos, *pos};
25838 return NEW_NIL(&loc);
25839}
25840
25841static NODE*
25842new_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)
25843{
25844 if (!cc) return right;
25845 cc = cond0(p, cc, COND_IN_COND, loc, true);
25846 return newline_node(NEW_IF(cc, left, right, loc, if_keyword_loc, then_keyword_loc, end_keyword_loc));
25847}
25848
25849static NODE*
25850new_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)
25851{
25852 if (!cc) return right;
25853 cc = cond0(p, cc, COND_IN_COND, loc, true);
25854 return newline_node(NEW_UNLESS(cc, left, right, loc, keyword_loc, then_keyword_loc, end_keyword_loc));
25855}
25856
25857#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))
25858
25859static NODE*
25860logop(struct parser_params *p, ID id, NODE *left, NODE *right,
25861 const YYLTYPE *op_loc, const YYLTYPE *loc)
25862{
25863 enum node_type type = id == idAND || id == idANDOP ? NODE_AND : NODE_OR;
25864 NODE *op;
25865 value_expr(p, left);
25866 if (left && nd_type_p(left, type)) {
25867 NODE *node = left, *second;
25868 while ((second = RNODE_AND(node)->nd_2nd) != 0 && nd_type_p(second, type)) {
25869 node = second;
25870 }
25871 RNODE_AND(node)->nd_2nd = NEW_AND_OR(type, second, right, loc, op_loc);
25872 nd_set_line(RNODE_AND(node)->nd_2nd, op_loc->beg_pos.lineno);
25873 left->nd_loc.end_pos = loc->end_pos;
25874 return left;
25875 }
25876 op = NEW_AND_OR(type, left, right, loc, op_loc);
25877 nd_set_line(op, op_loc->beg_pos.lineno);
25878 return op;
25879}
25880
25881#undef NEW_AND_OR
25882
25883static void
25884no_blockarg(struct parser_params *p, NODE *node)
25885{
25886 if (nd_type_p(node, NODE_BLOCK_PASS)) {
25887 compile_error(p, "block argument should not be given");
25888 }
25889}
25890
25891static NODE *
25892ret_args(struct parser_params *p, NODE *node)
25893{
25894 if (node) {
25895 no_blockarg(p, node);
25896 if (nd_type_p(node, NODE_LIST) && !RNODE_LIST(node)->nd_next) {
25897 node = RNODE_LIST(node)->nd_head;
25898 }
25899 }
25900 return node;
25901}
25902
25903static NODE*
25904negate_lit(struct parser_params *p, NODE* node, const YYLTYPE *loc)
25905{
25906 switch (nd_type(node)) {
25907 case NODE_INTEGER:
25908 RNODE_INTEGER(node)->minus = TRUE;
25909 break;
25910 case NODE_FLOAT:
25911 RNODE_FLOAT(node)->minus = TRUE;
25912 break;
25913 case NODE_RATIONAL:
25914 RNODE_RATIONAL(node)->minus = TRUE;
25915 break;
25916 case NODE_IMAGINARY:
25917 RNODE_IMAGINARY(node)->minus = TRUE;
25918 break;
25919 }
25920 node->nd_loc = *loc;
25921 return node;
25922}
25923
25924static NODE *
25925arg_blk_pass(NODE *node1, rb_node_block_pass_t *node2)
25926{
25927 if (node2) {
25928 if (!node1) return (NODE *)node2;
25929 node2->nd_head = node1;
25930 nd_set_first_lineno(node2, nd_first_lineno(node1));
25931 nd_set_first_column(node2, nd_first_column(node1));
25932 return (NODE *)node2;
25933 }
25934 return node1;
25935}
25936
25937static bool
25938args_info_empty_p(struct rb_args_info *args)
25939{
25940 if (args->pre_args_num) return false;
25941 if (args->post_args_num) return false;
25942 if (args->rest_arg) return false;
25943 if (args->opt_args) return false;
25944 if (args->block_arg) return false;
25945 if (args->kw_args) return false;
25946 if (args->kw_rest_arg) return false;
25947 return true;
25948}
25949
25950static rb_node_args_t *
25951new_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)
25952{
25953 struct rb_args_info *args = &tail->nd_ainfo;
25954
25955 if (args->forwarding) {
25956 if (rest_arg) {
25957 yyerror1(&RNODE(tail)->nd_loc, "... after rest argument");
25958 return tail;
25959 }
25960 rest_arg = idFWD_REST;
25961 }
25962
25963 args->pre_args_num = pre_args ? pre_args->nd_plen : 0;
25964 args->pre_init = pre_args ? pre_args->nd_next : 0;
25965
25966 args->post_args_num = post_args ? post_args->nd_plen : 0;
25967 args->post_init = post_args ? post_args->nd_next : 0;
25968 args->first_post_arg = post_args ? post_args->nd_pid : 0;
25969
25970 args->rest_arg = rest_arg;
25971
25972 args->opt_args = opt_args;
25973
25974 nd_set_loc(RNODE(tail), loc);
25975
25976 return tail;
25977}
25978
25979static rb_node_args_t *
25980new_args_tail(struct parser_params *p, rb_node_kw_arg_t *kw_args, ID kw_rest_arg, ID block, const YYLTYPE *kw_rest_loc)
25981{
25982 rb_node_args_t *node = NEW_ARGS(&NULL_LOC);
25983 struct rb_args_info *args = &node->nd_ainfo;
25984 if (p->error_p) return node;
25985
25986 args->block_arg = block;
25987 args->kw_args = kw_args;
25988
25989 if (kw_args) {
25990 /*
25991 * def foo(k1: 1, kr1:, k2: 2, **krest, &b)
25992 * variable order: k1, kr1, k2, &b, internal_id, krest
25993 * #=> <reorder>
25994 * variable order: kr1, k1, k2, internal_id, krest, &b
25995 */
25996 ID kw_bits = internal_id(p), *required_kw_vars, *kw_vars;
25997 struct vtable *vtargs = p->lvtbl->args;
25998 rb_node_kw_arg_t *kwn = kw_args;
25999
26000 if (block) block = vtargs->tbl[vtargs->pos-1];
26001 vtable_pop(vtargs, !!block + !!kw_rest_arg);
26002 required_kw_vars = kw_vars = &vtargs->tbl[vtargs->pos];
26003 while (kwn) {
26004 if (!NODE_REQUIRED_KEYWORD_P(get_nd_value(p, kwn->nd_body)))
26005 --kw_vars;
26006 --required_kw_vars;
26007 kwn = kwn->nd_next;
26008 }
26009
26010 for (kwn = kw_args; kwn; kwn = kwn->nd_next) {
26011 ID vid = get_nd_vid(p, kwn->nd_body);
26012 if (NODE_REQUIRED_KEYWORD_P(get_nd_value(p, kwn->nd_body))) {
26013 *required_kw_vars++ = vid;
26014 }
26015 else {
26016 *kw_vars++ = vid;
26017 }
26018 }
26019
26020 arg_var(p, kw_bits);
26021 if (kw_rest_arg) arg_var(p, kw_rest_arg);
26022 if (block) arg_var(p, block);
26023
26024 args->kw_rest_arg = NEW_DVAR(kw_rest_arg, kw_rest_loc);
26025 }
26026 else if (kw_rest_arg == idNil) {
26027 args->no_kwarg = 1;
26028 }
26029 else if (kw_rest_arg) {
26030 args->kw_rest_arg = NEW_DVAR(kw_rest_arg, kw_rest_loc);
26031 }
26032
26033 return node;
26034}
26035
26036static rb_node_args_t *
26037args_with_numbered(struct parser_params *p, rb_node_args_t *args, int max_numparam, ID it_id)
26038{
26039 if (max_numparam > NO_PARAM || it_id) {
26040 if (!args) {
26041 YYLTYPE loc = RUBY_INIT_YYLLOC();
26042 args = new_args_tail(p, 0, 0, 0, 0);
26043 nd_set_loc(RNODE(args), &loc);
26044 }
26045 args->nd_ainfo.pre_args_num = it_id ? 1 : max_numparam;
26046 }
26047 return args;
26048}
26049
26050static NODE*
26051new_array_pattern(struct parser_params *p, NODE *constant, NODE *pre_arg, NODE *aryptn, const YYLTYPE *loc)
26052{
26053 RNODE_ARYPTN(aryptn)->nd_pconst = constant;
26054
26055 if (pre_arg) {
26056 NODE *pre_args = NEW_LIST(pre_arg, loc);
26057 if (RNODE_ARYPTN(aryptn)->pre_args) {
26058 RNODE_ARYPTN(aryptn)->pre_args = list_concat(pre_args, RNODE_ARYPTN(aryptn)->pre_args);
26059 }
26060 else {
26061 RNODE_ARYPTN(aryptn)->pre_args = pre_args;
26062 }
26063 }
26064 return aryptn;
26065}
26066
26067static NODE*
26068new_array_pattern_tail(struct parser_params *p, NODE *pre_args, int has_rest, NODE *rest_arg, NODE *post_args, const YYLTYPE *loc)
26069{
26070 if (has_rest) {
26071 rest_arg = rest_arg ? rest_arg : NODE_SPECIAL_NO_NAME_REST;
26072 }
26073 else {
26074 rest_arg = NULL;
26075 }
26076 NODE *node = NEW_ARYPTN(pre_args, rest_arg, post_args, loc);
26077
26078 return node;
26079}
26080
26081static NODE*
26082new_find_pattern(struct parser_params *p, NODE *constant, NODE *fndptn, const YYLTYPE *loc)
26083{
26084 RNODE_FNDPTN(fndptn)->nd_pconst = constant;
26085
26086 return fndptn;
26087}
26088
26089static NODE*
26090new_find_pattern_tail(struct parser_params *p, NODE *pre_rest_arg, NODE *args, NODE *post_rest_arg, const YYLTYPE *loc)
26091{
26092 pre_rest_arg = pre_rest_arg ? pre_rest_arg : NODE_SPECIAL_NO_NAME_REST;
26093 post_rest_arg = post_rest_arg ? post_rest_arg : NODE_SPECIAL_NO_NAME_REST;
26094 NODE *node = NEW_FNDPTN(pre_rest_arg, args, post_rest_arg, loc);
26095
26096 return node;
26097}
26098
26099static NODE*
26100new_hash_pattern(struct parser_params *p, NODE *constant, NODE *hshptn, const YYLTYPE *loc)
26101{
26102 RNODE_HSHPTN(hshptn)->nd_pconst = constant;
26103 return hshptn;
26104}
26105
26106static NODE*
26107new_hash_pattern_tail(struct parser_params *p, NODE *kw_args, ID kw_rest_arg, const YYLTYPE *loc)
26108{
26109 NODE *node, *kw_rest_arg_node;
26110
26111 if (kw_rest_arg == idNil) {
26112 kw_rest_arg_node = NODE_SPECIAL_NO_REST_KEYWORD;
26113 }
26114 else if (kw_rest_arg) {
26115 kw_rest_arg_node = assignable(p, kw_rest_arg, 0, loc);
26116 }
26117 else {
26118 kw_rest_arg_node = NULL;
26119 }
26120
26121 node = NEW_HSHPTN(0, kw_args, kw_rest_arg_node, loc);
26122
26123 return node;
26124}
26125
26126static NODE*
26127dsym_node(struct parser_params *p, NODE *node, const YYLTYPE *loc)
26128{
26129 if (!node) {
26130 return NEW_SYM(STR_NEW0(), loc);
26131 }
26132
26133 switch (nd_type(node)) {
26134 case NODE_DSTR:
26135 nd_set_type(node, NODE_DSYM);
26136 nd_set_loc(node, loc);
26137 break;
26138 case NODE_STR:
26139 node = str_to_sym_node(p, node, loc);
26140 break;
26141 default:
26142 node = NEW_DSYM(0, 1, NEW_LIST(node, loc), loc);
26143 break;
26144 }
26145 return node;
26146}
26147
26148static int
26149nd_type_st_key_enable_p(NODE *node)
26150{
26151 switch (nd_type(node)) {
26152 case NODE_INTEGER:
26153 case NODE_FLOAT:
26154 case NODE_RATIONAL:
26155 case NODE_IMAGINARY:
26156 case NODE_STR:
26157 case NODE_SYM:
26158 case NODE_REGX:
26159 case NODE_LINE:
26160 case NODE_FILE:
26161 case NODE_ENCODING:
26162 return true;
26163 default:
26164 return false;
26165 }
26166}
26167
26168static VALUE
26169nd_value(struct parser_params *p, NODE *node)
26170{
26171 switch (nd_type(node)) {
26172 case NODE_STR:
26173 return rb_node_str_string_val(node);
26174 case NODE_INTEGER:
26175 return rb_node_integer_literal_val(node);
26176 case NODE_FLOAT:
26177 return rb_node_float_literal_val(node);
26178 case NODE_RATIONAL:
26179 return rb_node_rational_literal_val(node);
26180 case NODE_IMAGINARY:
26181 return rb_node_imaginary_literal_val(node);
26182 case NODE_SYM:
26183 return rb_node_sym_string_val(node);
26184 case NODE_REGX:
26185 return rb_node_regx_string_val(node);
26186 case NODE_LINE:
26187 return rb_node_line_lineno_val(node);
26188 case NODE_ENCODING:
26189 return rb_node_encoding_val(node);
26190 case NODE_FILE:
26191 return rb_node_file_path_val(node);
26192 default:
26193 rb_bug("unexpected node: %s", ruby_node_name(nd_type(node)));
26195 }
26196}
26197
26198static void
26199warn_duplicate_keys(struct parser_params *p, NODE *hash)
26200{
26201 /* See https://bugs.ruby-lang.org/issues/20331 for discussion about what is warned. */
26202 p->warn_duplicate_keys_table = st_init_table_with_size(&literal_type, RNODE_LIST(hash)->as.nd_alen / 2);
26203 while (hash && RNODE_LIST(hash)->nd_next) {
26204 NODE *head = RNODE_LIST(hash)->nd_head;
26205 NODE *value = RNODE_LIST(hash)->nd_next;
26206 NODE *next = RNODE_LIST(value)->nd_next;
26207 st_data_t key;
26208 st_data_t data;
26209
26210 /* keyword splat, e.g. {k: 1, **z, k: 2} */
26211 if (!head) {
26212 head = value;
26213 }
26214
26215 if (nd_type_st_key_enable_p(head)) {
26216 key = (st_data_t)head;
26217
26218 if (st_delete(p->warn_duplicate_keys_table, &key, &data)) {
26219 rb_warn2L(nd_line((NODE *)data),
26220 "key %+"PRIsWARN" is duplicated and overwritten on line %d",
26221 nd_value(p, head), WARN_I(nd_line(head)));
26222 }
26223 st_insert(p->warn_duplicate_keys_table, (st_data_t)key, (st_data_t)hash);
26224 }
26225 hash = next;
26226 }
26227 st_free_table(p->warn_duplicate_keys_table);
26228 p->warn_duplicate_keys_table = NULL;
26229}
26230
26231static NODE *
26232new_hash(struct parser_params *p, NODE *hash, const YYLTYPE *loc)
26233{
26234 if (hash) warn_duplicate_keys(p, hash);
26235 return NEW_HASH(hash, loc);
26236}
26237
26238static void
26239error_duplicate_pattern_variable(struct parser_params *p, ID id, const YYLTYPE *loc)
26240{
26241 if (is_private_local_id(p, id)) {
26242 return;
26243 }
26244 if (st_is_member(p->pvtbl, id)) {
26245 yyerror1(loc, "duplicated variable name");
26246 }
26247 else if (p->ctxt.in_alt_pattern && id) {
26248 yyerror1(loc, "variable capture in alternative pattern");
26249 }
26250 else {
26251 p->ctxt.capture_in_pattern = 1;
26252 st_insert(p->pvtbl, (st_data_t)id, 0);
26253 }
26254}
26255
26256static void
26257error_duplicate_pattern_key(struct parser_params *p, VALUE key, const YYLTYPE *loc)
26258{
26259 if (!p->pktbl) {
26260 p->pktbl = st_init_numtable();
26261 }
26262 else if (st_is_member(p->pktbl, key)) {
26263 yyerror1(loc, "duplicated key name");
26264 return;
26265 }
26266 st_insert(p->pktbl, (st_data_t)key, 0);
26267}
26268
26269static NODE *
26270new_unique_key_hash(struct parser_params *p, NODE *hash, const YYLTYPE *loc)
26271{
26272 return NEW_HASH(hash, loc);
26273}
26274
26275static NODE *
26276new_op_assign(struct parser_params *p, NODE *lhs, ID op, NODE *rhs, struct lex_context ctxt, const YYLTYPE *loc)
26277{
26278 NODE *asgn;
26279
26280 if (lhs) {
26281 ID vid = get_nd_vid(p, lhs);
26282 YYLTYPE lhs_loc = lhs->nd_loc;
26283 if (op == tOROP) {
26284 set_nd_value(p, lhs, rhs);
26285 nd_set_loc(lhs, loc);
26286 asgn = NEW_OP_ASGN_OR(gettable(p, vid, &lhs_loc), lhs, loc);
26287 }
26288 else if (op == tANDOP) {
26289 set_nd_value(p, lhs, rhs);
26290 nd_set_loc(lhs, loc);
26291 asgn = NEW_OP_ASGN_AND(gettable(p, vid, &lhs_loc), lhs, loc);
26292 }
26293 else {
26294 asgn = lhs;
26295 rhs = NEW_CALL(gettable(p, vid, &lhs_loc), op, NEW_LIST(rhs, &rhs->nd_loc), loc);
26296 set_nd_value(p, asgn, rhs);
26297 nd_set_loc(asgn, loc);
26298 }
26299 }
26300 else {
26301 asgn = NEW_ERROR(loc);
26302 }
26303 return asgn;
26304}
26305
26306static NODE *
26307new_ary_op_assign(struct parser_params *p, NODE *ary,
26308 NODE *args, ID op, NODE *rhs, const YYLTYPE *args_loc, const YYLTYPE *loc,
26309 const YYLTYPE *call_operator_loc, const YYLTYPE *opening_loc, const YYLTYPE *closing_loc, const YYLTYPE *binary_operator_loc)
26310{
26311 NODE *asgn;
26312
26313 aryset_check(p, args);
26314 args = make_list(args, args_loc);
26315 asgn = NEW_OP_ASGN1(ary, op, args, rhs, loc, call_operator_loc, opening_loc, closing_loc, binary_operator_loc);
26316 fixpos(asgn, ary);
26317 return asgn;
26318}
26319
26320static NODE *
26321new_attr_op_assign(struct parser_params *p, NODE *lhs,
26322 ID atype, ID attr, ID op, NODE *rhs, const YYLTYPE *loc,
26323 const YYLTYPE *call_operator_loc, const YYLTYPE *message_loc, const YYLTYPE *binary_operator_loc)
26324{
26325 NODE *asgn;
26326
26327 asgn = NEW_OP_ASGN2(lhs, CALL_Q_P(atype), attr, op, rhs, loc, call_operator_loc, message_loc, binary_operator_loc);
26328 fixpos(asgn, lhs);
26329 return asgn;
26330}
26331
26332static NODE *
26333new_const_op_assign(struct parser_params *p, NODE *lhs, ID op, NODE *rhs, struct lex_context ctxt, const YYLTYPE *loc)
26334{
26335 NODE *asgn;
26336
26337 if (lhs) {
26338 asgn = NEW_OP_CDECL(lhs, op, rhs, ctxt.shareable_constant_value, loc);
26339 }
26340 else {
26341 asgn = NEW_ERROR(loc);
26342 }
26343 fixpos(asgn, lhs);
26344 return asgn;
26345}
26346
26347static NODE *
26348const_decl(struct parser_params *p, NODE *path, const YYLTYPE *loc)
26349{
26350 if (p->ctxt.in_def) {
26351#ifndef RIPPER
26352 yyerror1(loc, "dynamic constant assignment");
26353#else
26354 set_value(assign_error(p, "dynamic constant assignment", p->s_lvalue));
26355#endif
26356 }
26357 return NEW_CDECL(0, 0, (path), p->ctxt.shareable_constant_value, loc);
26358}
26359
26360#ifdef RIPPER
26361static VALUE
26362assign_error(struct parser_params *p, const char *mesg, VALUE a)
26363{
26364 a = dispatch2(assign_error, ERR_MESG(), a);
26365 ripper_error(p);
26366 return a;
26367}
26368#endif
26369
26370static NODE *
26371new_bodystmt(struct parser_params *p, NODE *head, NODE *rescue, NODE *rescue_else, NODE *ensure, const YYLTYPE *loc)
26372{
26373 NODE *result = head;
26374 if (rescue) {
26375 NODE *tmp = rescue_else ? rescue_else : rescue;
26376 YYLTYPE rescue_loc = code_loc_gen(&head->nd_loc, &tmp->nd_loc);
26377
26378 result = NEW_RESCUE(head, rescue, rescue_else, &rescue_loc);
26379 nd_set_line(result, rescue->nd_loc.beg_pos.lineno);
26380 }
26381 if (ensure) {
26382 result = NEW_ENSURE(result, ensure, loc);
26383 }
26384 fixpos(result, head);
26385 return result;
26386}
26387
26388static void
26389warn_unused_var(struct parser_params *p, struct local_vars *local)
26390{
26391 int cnt;
26392
26393 if (!local->used) return;
26394 cnt = local->used->pos;
26395 if (cnt != local->vars->pos) {
26396 rb_parser_fatal(p, "local->used->pos != local->vars->pos");
26397 }
26398#ifndef RIPPER
26399 ID *v = local->vars->tbl;
26400 ID *u = local->used->tbl;
26401 for (int i = 0; i < cnt; ++i) {
26402 if (!v[i] || (u[i] & LVAR_USED)) continue;
26403 if (is_private_local_id(p, v[i])) continue;
26404 rb_warn1L((int)u[i], "assigned but unused variable - %"PRIsWARN, rb_id2str(v[i]));
26405 }
26406#endif
26407}
26408
26409static void
26410local_push(struct parser_params *p, int toplevel_scope)
26411{
26412 struct local_vars *local;
26413 int inherits_dvars = toplevel_scope && compile_for_eval;
26414 int warn_unused_vars = RTEST(ruby_verbose);
26415
26416 local = ALLOC(struct local_vars);
26417 local->prev = p->lvtbl;
26418 local->args = vtable_alloc(0);
26419 local->vars = vtable_alloc(inherits_dvars ? DVARS_INHERIT : DVARS_TOPSCOPE);
26420#ifndef RIPPER
26421 if (toplevel_scope && compile_for_eval) warn_unused_vars = 0;
26422 if (toplevel_scope && e_option_supplied(p)) warn_unused_vars = 0;
26423#endif
26424 local->numparam.outer = 0;
26425 local->numparam.inner = 0;
26426 local->numparam.current = 0;
26427 local->it = 0;
26428 local->used = warn_unused_vars ? vtable_alloc(0) : 0;
26429
26430# if WARN_PAST_SCOPE
26431 local->past = 0;
26432# endif
26433 CMDARG_PUSH(0);
26434 COND_PUSH(0);
26435 p->lvtbl = local;
26436}
26437
26438static void
26439vtable_chain_free(struct parser_params *p, struct vtable *table)
26440{
26441 while (!DVARS_TERMINAL_P(table)) {
26442 struct vtable *cur_table = table;
26443 table = cur_table->prev;
26444 vtable_free(cur_table);
26445 }
26446}
26447
26448static void
26449local_free(struct parser_params *p, struct local_vars *local)
26450{
26451 vtable_chain_free(p, local->used);
26452
26453# if WARN_PAST_SCOPE
26454 vtable_chain_free(p, local->past);
26455# endif
26456
26457 vtable_chain_free(p, local->args);
26458 vtable_chain_free(p, local->vars);
26459
26460 ruby_sized_xfree(local, sizeof(struct local_vars));
26461}
26462
26463static void
26464local_pop(struct parser_params *p)
26465{
26466 struct local_vars *local = p->lvtbl->prev;
26467 if (p->lvtbl->used) {
26468 warn_unused_var(p, p->lvtbl);
26469 }
26470
26471 local_free(p, p->lvtbl);
26472 p->lvtbl = local;
26473
26474 CMDARG_POP();
26475 COND_POP();
26476}
26477
26478static rb_ast_id_table_t *
26479local_tbl(struct parser_params *p)
26480{
26481 int cnt_args = vtable_size(p->lvtbl->args);
26482 int cnt_vars = vtable_size(p->lvtbl->vars);
26483 int cnt = cnt_args + cnt_vars;
26484 int i, j;
26485 rb_ast_id_table_t *tbl;
26486
26487 if (cnt <= 0) return 0;
26488 tbl = rb_ast_new_local_table(p->ast, cnt);
26489 MEMCPY(tbl->ids, p->lvtbl->args->tbl, ID, cnt_args);
26490 /* remove IDs duplicated to warn shadowing */
26491 for (i = 0, j = cnt_args; i < cnt_vars; ++i) {
26492 ID id = p->lvtbl->vars->tbl[i];
26493 if (!vtable_included(p->lvtbl->args, id)) {
26494 tbl->ids[j++] = id;
26495 }
26496 }
26497 if (j < cnt) {
26498 tbl = rb_ast_resize_latest_local_table(p->ast, j);
26499 }
26500
26501 return tbl;
26502}
26503
26504static void
26505numparam_name(struct parser_params *p, ID id)
26506{
26507 if (!NUMPARAM_ID_P(id)) return;
26508 compile_error(p, "_%d is reserved for numbered parameter",
26509 NUMPARAM_ID_TO_IDX(id));
26510}
26511
26512static void
26513arg_var(struct parser_params *p, ID id)
26514{
26515 numparam_name(p, id);
26516 vtable_add(p->lvtbl->args, id);
26517}
26518
26519static void
26520local_var(struct parser_params *p, ID id)
26521{
26522 numparam_name(p, id);
26523 vtable_add(p->lvtbl->vars, id);
26524 if (p->lvtbl->used) {
26525 vtable_add(p->lvtbl->used, (ID)p->ruby_sourceline);
26526 }
26527}
26528
26529#ifndef RIPPER
26530int
26531rb_parser_local_defined(struct parser_params *p, ID id, const struct rb_iseq_struct *iseq)
26532{
26533 return rb_local_defined(id, iseq);
26534}
26535#endif
26536
26537static int
26538local_id_ref(struct parser_params *p, ID id, ID **vidrefp)
26539{
26540 struct vtable *vars, *args, *used;
26541
26542 vars = p->lvtbl->vars;
26543 args = p->lvtbl->args;
26544 used = p->lvtbl->used;
26545
26546 while (vars && !DVARS_TERMINAL_P(vars->prev)) {
26547 vars = vars->prev;
26548 args = args->prev;
26549 if (used) used = used->prev;
26550 }
26551
26552 if (vars && vars->prev == DVARS_INHERIT) {
26553 return rb_parser_local_defined(p, id, p->parent_iseq);
26554 }
26555 else if (vtable_included(args, id)) {
26556 return 1;
26557 }
26558 else {
26559 int i = vtable_included(vars, id);
26560 if (i && used && vidrefp) *vidrefp = &used->tbl[i-1];
26561 return i != 0;
26562 }
26563}
26564
26565static int
26566local_id(struct parser_params *p, ID id)
26567{
26568 return local_id_ref(p, id, NULL);
26569}
26570
26571static int
26572check_forwarding_args(struct parser_params *p)
26573{
26574 if (local_id(p, idFWD_ALL)) return TRUE;
26575 compile_error(p, "unexpected ...");
26576 return FALSE;
26577}
26578
26579static void
26580add_forwarding_args(struct parser_params *p)
26581{
26582 arg_var(p, idFWD_REST);
26583 arg_var(p, idFWD_KWREST);
26584 arg_var(p, idFWD_BLOCK);
26585 arg_var(p, idFWD_ALL);
26586}
26587
26588static void
26589forwarding_arg_check(struct parser_params *p, ID arg, ID all, const char *var)
26590{
26591 bool conflict = false;
26592
26593 struct vtable *vars, *args;
26594
26595 vars = p->lvtbl->vars;
26596 args = p->lvtbl->args;
26597
26598 while (vars && !DVARS_TERMINAL_P(vars->prev)) {
26599 conflict |= (vtable_included(args, arg) && !(all && vtable_included(args, all)));
26600 vars = vars->prev;
26601 args = args->prev;
26602 }
26603
26604 bool found = false;
26605 if (vars && vars->prev == DVARS_INHERIT && !found) {
26606 found = (rb_parser_local_defined(p, arg, p->parent_iseq) &&
26607 !(all && rb_parser_local_defined(p, all, p->parent_iseq)));
26608 }
26609 else {
26610 found = (vtable_included(args, arg) &&
26611 !(all && vtable_included(args, all)));
26612 }
26613
26614 if (!found) {
26615 compile_error(p, "no anonymous %s parameter", var);
26616 }
26617 else if (conflict) {
26618 compile_error(p, "anonymous %s parameter is also used within block", var);
26619 }
26620}
26621
26622static NODE *
26623new_args_forward_call(struct parser_params *p, NODE *leading, const YYLTYPE *loc, const YYLTYPE *argsloc)
26624{
26625 NODE *rest = NEW_LVAR(idFWD_REST, loc);
26626 NODE *kwrest = list_append(p, NEW_LIST(0, loc), NEW_LVAR(idFWD_KWREST, loc));
26627 rb_node_block_pass_t *block = NEW_BLOCK_PASS(NEW_LVAR(idFWD_BLOCK, loc), argsloc, &NULL_LOC);
26628 NODE *args = leading ? rest_arg_append(p, leading, rest, argsloc) : NEW_SPLAT(rest, loc, &NULL_LOC);
26629 block->forwarding = TRUE;
26630 args = arg_append(p, args, new_hash(p, kwrest, loc), argsloc);
26631 return arg_blk_pass(args, block);
26632}
26633
26634static NODE *
26635numparam_push(struct parser_params *p)
26636{
26637 struct local_vars *local = p->lvtbl;
26638 NODE *inner = local->numparam.inner;
26639 if (!local->numparam.outer) {
26640 local->numparam.outer = local->numparam.current;
26641 }
26642 local->numparam.inner = 0;
26643 local->numparam.current = 0;
26644 local->it = 0;
26645 return inner;
26646}
26647
26648static void
26649numparam_pop(struct parser_params *p, NODE *prev_inner)
26650{
26651 struct local_vars *local = p->lvtbl;
26652 if (prev_inner) {
26653 /* prefer first one */
26654 local->numparam.inner = prev_inner;
26655 }
26656 else if (local->numparam.current) {
26657 /* current and inner are exclusive */
26658 local->numparam.inner = local->numparam.current;
26659 }
26660 if (p->max_numparam > NO_PARAM) {
26661 /* current and outer are exclusive */
26662 local->numparam.current = local->numparam.outer;
26663 local->numparam.outer = 0;
26664 }
26665 else {
26666 /* no numbered parameter */
26667 local->numparam.current = 0;
26668 }
26669 local->it = 0;
26670}
26671
26672static const struct vtable *
26673dyna_push(struct parser_params *p)
26674{
26675 p->lvtbl->args = vtable_alloc(p->lvtbl->args);
26676 p->lvtbl->vars = vtable_alloc(p->lvtbl->vars);
26677 if (p->lvtbl->used) {
26678 p->lvtbl->used = vtable_alloc(p->lvtbl->used);
26679 }
26680 return p->lvtbl->args;
26681}
26682
26683static void
26684dyna_pop_vtable(struct parser_params *p, struct vtable **vtblp)
26685{
26686 struct vtable *tmp = *vtblp;
26687 *vtblp = tmp->prev;
26688# if WARN_PAST_SCOPE
26689 if (p->past_scope_enabled) {
26690 tmp->prev = p->lvtbl->past;
26691 p->lvtbl->past = tmp;
26692 return;
26693 }
26694# endif
26695 vtable_free(tmp);
26696}
26697
26698static void
26699dyna_pop_1(struct parser_params *p)
26700{
26701 struct vtable *tmp;
26702
26703 if ((tmp = p->lvtbl->used) != 0) {
26704 warn_unused_var(p, p->lvtbl);
26705 p->lvtbl->used = p->lvtbl->used->prev;
26706 vtable_free(tmp);
26707 }
26708 dyna_pop_vtable(p, &p->lvtbl->args);
26709 dyna_pop_vtable(p, &p->lvtbl->vars);
26710}
26711
26712static void
26713dyna_pop(struct parser_params *p, const struct vtable *lvargs)
26714{
26715 while (p->lvtbl->args != lvargs) {
26716 dyna_pop_1(p);
26717 if (!p->lvtbl->args) {
26718 struct local_vars *local = p->lvtbl->prev;
26719 ruby_sized_xfree(p->lvtbl, sizeof(*p->lvtbl));
26720 p->lvtbl = local;
26721 }
26722 }
26723 dyna_pop_1(p);
26724}
26725
26726static int
26727dyna_in_block(struct parser_params *p)
26728{
26729 return !DVARS_TERMINAL_P(p->lvtbl->vars) && p->lvtbl->vars->prev != DVARS_TOPSCOPE;
26730}
26731
26732#ifndef RIPPER
26733int
26734dvar_defined_ref(struct parser_params *p, ID id, ID **vidrefp)
26735{
26736 struct vtable *vars, *args, *used;
26737 int i;
26738
26739 args = p->lvtbl->args;
26740 vars = p->lvtbl->vars;
26741 used = p->lvtbl->used;
26742
26743 while (!DVARS_TERMINAL_P(vars)) {
26744 if (vtable_included(args, id)) {
26745 return 1;
26746 }
26747 if ((i = vtable_included(vars, id)) != 0) {
26748 if (used && vidrefp) *vidrefp = &used->tbl[i-1];
26749 return 1;
26750 }
26751 args = args->prev;
26752 vars = vars->prev;
26753 if (!vidrefp) used = 0;
26754 if (used) used = used->prev;
26755 }
26756
26757 if (vars == DVARS_INHERIT && !NUMPARAM_ID_P(id)) {
26758 return rb_dvar_defined(id, p->parent_iseq);
26759 }
26760
26761 return 0;
26762}
26763#endif
26764
26765static int
26766dvar_defined(struct parser_params *p, ID id)
26767{
26768 return dvar_defined_ref(p, id, NULL);
26769}
26770
26771static int
26772dvar_curr(struct parser_params *p, ID id)
26773{
26774 return (vtable_included(p->lvtbl->args, id) ||
26775 vtable_included(p->lvtbl->vars, id));
26776}
26777
26778static void
26779reg_fragment_enc_error(struct parser_params* p, rb_parser_string_t *str, int c)
26780{
26781 compile_error(p,
26782 "regexp encoding option '%c' differs from source encoding '%s'",
26783 c, rb_enc_name(rb_parser_str_get_encoding(str)));
26784}
26785
26786#ifndef RIPPER
26787static rb_encoding *
26788find_enc(struct parser_params* p, const char *name)
26789{
26790 int idx = rb_enc_find_index(name);
26791 if (idx < 0) {
26792 rb_bug("unknown encoding name: %s", name);
26793 }
26794
26795 return rb_enc_from_index(idx);
26796}
26797
26798static rb_encoding *
26799kcode_to_enc(struct parser_params* p, int kcode)
26800{
26801 rb_encoding *enc;
26802
26803 switch (kcode) {
26804 case ENC_ASCII8BIT:
26805 enc = rb_ascii8bit_encoding();
26806 break;
26807 case ENC_EUC_JP:
26808 enc = find_enc(p, "EUC-JP");
26809 break;
26810 case ENC_Windows_31J:
26811 enc = find_enc(p, "Windows-31J");
26812 break;
26813 case ENC_UTF8:
26814 enc = rb_utf8_encoding();
26815 break;
26816 default:
26817 enc = NULL;
26818 break;
26819 }
26820
26821 return enc;
26822}
26823
26824int
26825rb_reg_fragment_setenc(struct parser_params* p, rb_parser_string_t *str, int options)
26826{
26827 int c = RE_OPTION_ENCODING_IDX(options);
26828
26829 if (c) {
26830 int opt, idx;
26831 rb_encoding *enc;
26832
26833 char_to_option_kcode(c, &opt, &idx);
26834 enc = kcode_to_enc(p, idx);
26835 if (enc != rb_parser_str_get_encoding(str) &&
26836 !rb_parser_is_ascii_string(p, str)) {
26837 goto error;
26838 }
26839 rb_parser_string_set_encoding(str, enc);
26840 }
26841 else if (RE_OPTION_ENCODING_NONE(options)) {
26842 if (!PARSER_ENCODING_IS_ASCII8BIT(p, str) &&
26843 !rb_parser_is_ascii_string(p, str)) {
26844 c = 'n';
26845 goto error;
26846 }
26847 rb_parser_enc_associate(p, str, rb_ascii8bit_encoding());
26848 }
26849 else if (rb_is_usascii_enc(p->enc)) {
26850 rb_parser_enc_associate(p, str, rb_ascii8bit_encoding());
26851 }
26852 return 0;
26853
26854 error:
26855 return c;
26856}
26857#endif
26858
26859static void
26860reg_fragment_setenc(struct parser_params* p, rb_parser_string_t *str, int options)
26861{
26862 int c = rb_reg_fragment_setenc(p, str, options);
26863 if (c) reg_fragment_enc_error(p, str, c);
26864}
26865
26866#ifndef UNIVERSAL_PARSER
26867typedef struct {
26868 struct parser_params* parser;
26869 rb_encoding *enc;
26870 NODE *succ_block;
26871 const YYLTYPE *loc;
26872 rb_parser_assignable_func assignable;
26874
26875static int
26876reg_named_capture_assign_iter(const OnigUChar *name, const OnigUChar *name_end,
26877 int back_num, int *back_refs, OnigRegex regex, void *arg0)
26878{
26880 struct parser_params* p = arg->parser;
26881 rb_encoding *enc = arg->enc;
26882 long len = name_end - name;
26883 const char *s = (const char *)name;
26884
26885 return rb_reg_named_capture_assign_iter_impl(p, s, len, enc, &arg->succ_block, arg->loc, arg->assignable);
26886}
26887
26888static NODE *
26889reg_named_capture_assign(struct parser_params* p, VALUE regexp, const YYLTYPE *loc, rb_parser_assignable_func assignable)
26890{
26892
26893 arg.parser = p;
26894 arg.enc = rb_enc_get(regexp);
26895 arg.succ_block = 0;
26896 arg.loc = loc;
26897 arg.assignable = assignable;
26898 onig_foreach_name(RREGEXP_PTR(regexp), reg_named_capture_assign_iter, &arg);
26899
26900 if (!arg.succ_block) return 0;
26901 return RNODE_BLOCK(arg.succ_block)->nd_next;
26902}
26903#endif
26904
26905#ifndef RIPPER
26906NODE *
26907rb_parser_assignable(struct parser_params *p, ID id, NODE *val, const YYLTYPE *loc)
26908{
26909 return assignable(p, id, val, loc);
26910}
26911
26912int
26913rb_reg_named_capture_assign_iter_impl(struct parser_params *p, const char *s, long len,
26914 rb_encoding *enc, NODE **succ_block, const rb_code_location_t *loc, rb_parser_assignable_func assignable)
26915{
26916 ID var;
26917 NODE *node, *succ;
26918
26919 if (!len) return ST_CONTINUE;
26920
26921 if (UNLIKELY(p->enc != enc)) {
26922 int cr = ENC_CODERANGE_7BIT;
26923 rb_str_coderange_scan_restartable(s, s + len, rb_ascii8bit_encoding(), &cr);
26924 if (UNLIKELY(cr != ENC_CODERANGE_7BIT)) return ST_CONTINUE;
26925 }
26926
26927 if (!VALID_SYMNAME_P(s, len, enc, ID_LOCAL))
26928 return ST_CONTINUE;
26929
26930 var = intern_cstr(s, len, enc);
26931 if (len < MAX_WORD_LENGTH && rb_reserved_word(s, (int)len)) {
26932 if (!lvar_defined(p, var)) return ST_CONTINUE;
26933 }
26934 node = node_assign(p, assignable(p, var, 0, loc), NEW_SYM(rb_id2str(var), loc), NO_LEX_CTXT, loc);
26935 succ = *succ_block;
26936 if (!succ) succ = NEW_ERROR(loc);
26937 succ = block_append(p, succ, node);
26938 *succ_block = succ;
26939 return ST_CONTINUE;
26940}
26941#endif
26942
26943static VALUE
26944parser_reg_compile(struct parser_params* p, rb_parser_string_t *str, int options)
26945{
26946 VALUE str2;
26947 reg_fragment_setenc(p, str, options);
26948 str2 = rb_str_new_parser_string(str);
26949 return rb_parser_reg_compile(p, str2, options);
26950}
26951
26952#ifndef RIPPER
26953VALUE
26954rb_parser_reg_compile(struct parser_params* p, VALUE str, int options)
26955{
26956 return rb_reg_compile(str, options & RE_OPTION_MASK, p->ruby_sourcefile, p->ruby_sourceline);
26957}
26958#endif
26959
26960static VALUE
26961reg_compile(struct parser_params* p, rb_parser_string_t *str, int options)
26962{
26963 VALUE re;
26964 VALUE err;
26965
26966 err = rb_errinfo();
26967 re = parser_reg_compile(p, str, options);
26968 if (NIL_P(re)) {
26969 VALUE m = rb_attr_get(rb_errinfo(), idMesg);
26970 rb_set_errinfo(err);
26971 compile_error(p, "%"PRIsVALUE, m);
26972 return Qnil;
26973 }
26974 return re;
26975}
26976
26977#ifndef RIPPER
26978void
26979rb_ruby_parser_set_options(struct parser_params *p, int print, int loop, int chomp, int split)
26980{
26981 p->do_print = print;
26982 p->do_loop = loop;
26983 p->do_chomp = chomp;
26984 p->do_split = split;
26985}
26986
26987static NODE *
26988parser_append_options(struct parser_params *p, NODE *node)
26989{
26990 static const YYLTYPE default_location = {{1, 0}, {1, 0}};
26991 const YYLTYPE *const LOC = &default_location;
26992
26993 if (p->do_print) {
26994 NODE *print = (NODE *)NEW_FCALL(rb_intern("print"),
26995 NEW_LIST(NEW_GVAR(idLASTLINE, LOC), LOC),
26996 LOC);
26997 node = block_append(p, node, print);
26998 }
26999
27000 if (p->do_loop) {
27001 NODE *irs = NEW_LIST(NEW_GVAR(rb_intern("$/"), LOC), LOC);
27002
27003 if (p->do_split) {
27004 ID ifs = rb_intern("$;");
27005 ID fields = rb_intern("$F");
27006 NODE *args = NEW_LIST(NEW_GVAR(ifs, LOC), LOC);
27007 NODE *split = NEW_GASGN(fields,
27008 NEW_CALL(NEW_GVAR(idLASTLINE, LOC),
27009 rb_intern("split"), args, LOC),
27010 LOC);
27011 node = block_append(p, split, node);
27012 }
27013 if (p->do_chomp) {
27014 NODE *chomp = NEW_SYM(rb_str_new_cstr("chomp"), LOC);
27015 chomp = list_append(p, NEW_LIST(chomp, LOC), NEW_TRUE(LOC));
27016 irs = list_append(p, irs, NEW_HASH(chomp, LOC));
27017 }
27018
27019 node = NEW_WHILE((NODE *)NEW_FCALL(idGets, irs, LOC), node, 1, LOC, &NULL_LOC, &NULL_LOC);
27020 }
27021
27022 return node;
27023}
27024
27025void
27026rb_init_parse(void)
27027{
27028 /* just to suppress unused-function warnings */
27029 (void)nodetype;
27030 (void)nodeline;
27031}
27032
27033ID
27034internal_id(struct parser_params *p)
27035{
27036 return rb_make_temporary_id(vtable_size(p->lvtbl->args) + vtable_size(p->lvtbl->vars));
27037}
27038#endif /* !RIPPER */
27039
27040static void
27041parser_initialize(struct parser_params *p)
27042{
27043 /* note: we rely on TypedData_Make_Struct to set most fields to 0 */
27044 p->command_start = TRUE;
27045 p->ruby_sourcefile_string = Qnil;
27046 p->lex.lpar_beg = -1; /* make lambda_beginning_p() == FALSE at first */
27047 string_buffer_init(p);
27048 p->node_id = 0;
27049 p->delayed.token = NULL;
27050 p->frozen_string_literal = -1; /* not specified */
27051#ifndef RIPPER
27052 p->error_buffer = Qfalse;
27053 p->end_expect_token_locations = NULL;
27054 p->token_id = 0;
27055 p->tokens = NULL;
27056#else
27057 p->result = Qnil;
27058 p->parsing_thread = Qnil;
27059 p->s_value = Qnil;
27060 p->s_lvalue = Qnil;
27061 p->s_value_stack = rb_ary_new();
27062#endif
27063 p->debug_buffer = Qnil;
27064 p->debug_output = rb_ractor_stdout();
27065 p->enc = rb_utf8_encoding();
27066 p->exits = 0;
27067}
27068
27069#ifdef RIPPER
27070#define rb_ruby_parser_mark ripper_parser_mark
27071#define rb_ruby_parser_free ripper_parser_free
27072#define rb_ruby_parser_memsize ripper_parser_memsize
27073#endif
27074
27075void
27076rb_ruby_parser_mark(void *ptr)
27077{
27078 struct parser_params *p = (struct parser_params*)ptr;
27079
27080 rb_gc_mark(p->ruby_sourcefile_string);
27081#ifndef RIPPER
27082 rb_gc_mark(p->error_buffer);
27083#else
27084 rb_gc_mark(p->value);
27085 rb_gc_mark(p->result);
27086 rb_gc_mark(p->parsing_thread);
27087 rb_gc_mark(p->s_value);
27088 rb_gc_mark(p->s_lvalue);
27089 rb_gc_mark(p->s_value_stack);
27090#endif
27091 rb_gc_mark(p->debug_buffer);
27092 rb_gc_mark(p->debug_output);
27093}
27094
27095void
27096rb_ruby_parser_free(void *ptr)
27097{
27098 struct parser_params *p = (struct parser_params*)ptr;
27099 struct local_vars *local, *prev;
27100
27101 if (p->ast) {
27102 rb_ast_free(p->ast);
27103 }
27104
27105 if (p->warn_duplicate_keys_table) {
27106 st_free_table(p->warn_duplicate_keys_table);
27107 }
27108
27109#ifndef RIPPER
27110 if (p->tokens) {
27111 rb_parser_ary_free(p, p->tokens);
27112 }
27113#endif
27114
27115 if (p->tokenbuf) {
27116 ruby_sized_xfree(p->tokenbuf, p->toksiz);
27117 }
27118
27119 for (local = p->lvtbl; local; local = prev) {
27120 prev = local->prev;
27121 local_free(p, local);
27122 }
27123
27124 {
27125 token_info *ptinfo;
27126 while ((ptinfo = p->token_info) != 0) {
27127 p->token_info = ptinfo->next;
27128 xfree(ptinfo);
27129 }
27130 }
27131 string_buffer_free(p);
27132
27133 if (p->pvtbl) {
27134 st_free_table(p->pvtbl);
27135 }
27136
27137 if (CASE_LABELS_ENABLED_P(p->case_labels)) {
27138 st_free_table(p->case_labels);
27139 }
27140
27141 xfree(p->lex.strterm);
27142 p->lex.strterm = 0;
27143
27144 xfree(ptr);
27145}
27146
27147size_t
27148rb_ruby_parser_memsize(const void *ptr)
27149{
27150 struct parser_params *p = (struct parser_params*)ptr;
27151 struct local_vars *local;
27152 size_t size = sizeof(*p);
27153
27154 size += p->toksiz;
27155 for (local = p->lvtbl; local; local = local->prev) {
27156 size += sizeof(*local);
27157 if (local->vars) size += local->vars->capa * sizeof(ID);
27158 }
27159 return size;
27160}
27161
27162#ifndef RIPPER
27163#undef rb_reserved_word
27164
27165const struct kwtable *
27166rb_reserved_word(const char *str, unsigned int len)
27167{
27168 return reserved_word(str, len);
27169}
27170
27171#ifdef UNIVERSAL_PARSER
27172rb_parser_t *
27173rb_ruby_parser_allocate(const rb_parser_config_t *config)
27174{
27175 /* parser_initialize expects fields to be set to 0 */
27176 rb_parser_t *p = (rb_parser_t *)config->calloc(1, sizeof(rb_parser_t));
27177 p->config = config;
27178 return p;
27179}
27180
27181rb_parser_t *
27182rb_ruby_parser_new(const rb_parser_config_t *config)
27183{
27184 /* parser_initialize expects fields to be set to 0 */
27185 rb_parser_t *p = rb_ruby_parser_allocate(config);
27186 parser_initialize(p);
27187 return p;
27188}
27189#else
27190rb_parser_t *
27191rb_ruby_parser_allocate(void)
27192{
27193 /* parser_initialize expects fields to be set to 0 */
27194 rb_parser_t *p = (rb_parser_t *)ruby_xcalloc(1, sizeof(rb_parser_t));
27195 return p;
27196}
27197
27198rb_parser_t *
27199rb_ruby_parser_new(void)
27200{
27201 /* parser_initialize expects fields to be set to 0 */
27202 rb_parser_t *p = rb_ruby_parser_allocate();
27203 parser_initialize(p);
27204 return p;
27205}
27206#endif
27207
27208rb_parser_t *
27209rb_ruby_parser_set_context(rb_parser_t *p, const struct rb_iseq_struct *base, int main)
27210{
27211 p->error_buffer = main ? Qfalse : Qnil;
27212 p->parent_iseq = base;
27213 return p;
27214}
27215
27216void
27217rb_ruby_parser_set_script_lines(rb_parser_t *p)
27218{
27219 p->debug_lines = rb_parser_ary_new_capa_for_script_line(p, 10);
27220}
27221
27222void
27223rb_ruby_parser_error_tolerant(rb_parser_t *p)
27224{
27225 p->error_tolerant = 1;
27226}
27227
27228void
27229rb_ruby_parser_keep_tokens(rb_parser_t *p)
27230{
27231 p->keep_tokens = 1;
27232 p->tokens = rb_parser_ary_new_capa_for_ast_token(p, 10);
27233}
27234
27235rb_encoding *
27236rb_ruby_parser_encoding(rb_parser_t *p)
27237{
27238 return p->enc;
27239}
27240
27241int
27242rb_ruby_parser_end_seen_p(rb_parser_t *p)
27243{
27244 return p->ruby__end__seen;
27245}
27246
27247int
27248rb_ruby_parser_set_yydebug(rb_parser_t *p, int flag)
27249{
27250 p->debug = flag;
27251 return flag;
27252}
27253#endif /* !RIPPER */
27254
27255#ifdef RIPPER
27256int
27257rb_ruby_parser_get_yydebug(rb_parser_t *p)
27258{
27259 return p->debug;
27260}
27261
27262void
27263rb_ruby_parser_set_value(rb_parser_t *p, VALUE value)
27264{
27265 p->value = value;
27266}
27267
27268int
27269rb_ruby_parser_error_p(rb_parser_t *p)
27270{
27271 return p->error_p;
27272}
27273
27274VALUE
27275rb_ruby_parser_debug_output(rb_parser_t *p)
27276{
27277 return p->debug_output;
27278}
27279
27280void
27281rb_ruby_parser_set_debug_output(rb_parser_t *p, VALUE output)
27282{
27283 p->debug_output = output;
27284}
27285
27286VALUE
27287rb_ruby_parser_parsing_thread(rb_parser_t *p)
27288{
27289 return p->parsing_thread;
27290}
27291
27292void
27293rb_ruby_parser_set_parsing_thread(rb_parser_t *p, VALUE parsing_thread)
27294{
27295 p->parsing_thread = parsing_thread;
27296}
27297
27298void
27299rb_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)
27300{
27301 p->lex.gets = gets;
27302 p->lex.input = input;
27303 p->eofp = 0;
27304 p->ruby_sourcefile_string = sourcefile_string;
27305 p->ruby_sourcefile = sourcefile;
27306 p->ruby_sourceline = sourceline;
27307}
27308
27309VALUE
27310rb_ruby_parser_result(rb_parser_t *p)
27311{
27312 return p->result;
27313}
27314
27315rb_encoding *
27316rb_ruby_parser_enc(rb_parser_t *p)
27317{
27318 return p->enc;
27319}
27320
27321VALUE
27322rb_ruby_parser_ruby_sourcefile_string(rb_parser_t *p)
27323{
27324 return p->ruby_sourcefile_string;
27325}
27326
27327int
27328rb_ruby_parser_ruby_sourceline(rb_parser_t *p)
27329{
27330 return p->ruby_sourceline;
27331}
27332
27333int
27334rb_ruby_parser_lex_state(rb_parser_t *p)
27335{
27336 return p->lex.state;
27337}
27338
27339void
27340rb_ruby_ripper_parse0(rb_parser_t *p)
27341{
27342 parser_prepare(p);
27343 p->ast = rb_ast_new();
27344 ripper_yyparse((void*)p);
27345 rb_ast_free(p->ast);
27346 p->ast = 0;
27347 p->eval_tree = 0;
27348 p->eval_tree_begin = 0;
27349}
27350
27351int
27352rb_ruby_ripper_dedent_string(rb_parser_t *p, rb_parser_string_t *string, int width)
27353{
27354 return dedent_string(p, string, width);
27355}
27356
27357int
27358rb_ruby_ripper_initialized_p(rb_parser_t *p)
27359{
27360 return p->lex.input != 0;
27361}
27362
27363void
27364rb_ruby_ripper_parser_initialize(rb_parser_t *p)
27365{
27366 parser_initialize(p);
27367}
27368
27369long
27370rb_ruby_ripper_column(rb_parser_t *p)
27371{
27372 return p->lex.ptok - p->lex.pbeg;
27373}
27374
27375long
27376rb_ruby_ripper_token_len(rb_parser_t *p)
27377{
27378 return p->lex.pcur - p->lex.ptok;
27379}
27380
27381rb_parser_string_t *
27382rb_ruby_ripper_lex_lastline(rb_parser_t *p)
27383{
27384 return p->lex.lastline;
27385}
27386
27387VALUE
27388rb_ruby_ripper_lex_state_name(struct parser_params *p, int state)
27389{
27390 return rb_parser_lex_state_name(p, (enum lex_state_e)state);
27391}
27392
27393#ifdef UNIVERSAL_PARSER
27394rb_parser_t *
27395rb_ripper_parser_params_allocate(const rb_parser_config_t *config)
27396{
27397 rb_parser_t *p = (rb_parser_t *)config->calloc(1, sizeof(rb_parser_t));
27398 p->config = config;
27399 return p;
27400}
27401#endif
27402
27403struct parser_params*
27404rb_ruby_ripper_parser_allocate(void)
27405{
27406 return (struct parser_params *)ruby_xcalloc(1, sizeof(struct parser_params));
27407}
27408#endif /* RIPPER */
27409
27410#ifndef RIPPER
27411void
27412rb_parser_printf(struct parser_params *p, const char *fmt, ...)
27413{
27414 va_list ap;
27415 VALUE mesg = p->debug_buffer;
27416
27417 if (NIL_P(mesg)) p->debug_buffer = mesg = rb_str_new(0, 0);
27418 va_start(ap, fmt);
27419 rb_str_vcatf(mesg, fmt, ap);
27420 va_end(ap);
27421 if (char_at_end(p, mesg, 0) == '\n') {
27422 rb_io_write(p->debug_output, mesg);
27423 p->debug_buffer = Qnil;
27424 }
27425}
27426
27427static void
27428parser_compile_error(struct parser_params *p, const rb_code_location_t *loc, const char *fmt, ...)
27429{
27430 va_list ap;
27431 int lineno, column;
27432
27433 if (loc) {
27434 lineno = loc->end_pos.lineno;
27435 column = loc->end_pos.column;
27436 }
27437 else {
27438 lineno = p->ruby_sourceline;
27439 column = rb_long2int(p->lex.pcur - p->lex.pbeg);
27440 }
27441
27442 rb_io_flush(p->debug_output);
27443 p->error_p = 1;
27444 va_start(ap, fmt);
27445 p->error_buffer =
27446 rb_syntax_error_append(p->error_buffer,
27447 p->ruby_sourcefile_string,
27448 lineno, column,
27449 p->enc, fmt, ap);
27450 va_end(ap);
27451}
27452
27453static size_t
27454count_char(const char *str, int c)
27455{
27456 int n = 0;
27457 while (str[n] == c) ++n;
27458 return n;
27459}
27460
27461/*
27462 * strip enclosing double-quotes, same as the default yytnamerr except
27463 * for that single-quotes matching back-quotes do not stop stripping.
27464 *
27465 * "\"`class' keyword\"" => "`class' keyword"
27466 */
27467size_t
27468rb_yytnamerr(struct parser_params *p, char *yyres, const char *yystr)
27469{
27470 if (*yystr == '"') {
27471 size_t yyn = 0, bquote = 0;
27472 const char *yyp = yystr;
27473
27474 while (*++yyp) {
27475 switch (*yyp) {
27476 case '\'':
27477 if (!bquote) {
27478 bquote = count_char(yyp+1, '\'') + 1;
27479 if (yyres) memcpy(&yyres[yyn], yyp, bquote);
27480 yyn += bquote;
27481 yyp += bquote - 1;
27482 break;
27483 }
27484 else {
27485 if (bquote && count_char(yyp+1, '\'') + 1 == bquote) {
27486 if (yyres) memcpy(yyres + yyn, yyp, bquote);
27487 yyn += bquote;
27488 yyp += bquote - 1;
27489 bquote = 0;
27490 break;
27491 }
27492 if (yyp[1] && yyp[1] != '\'' && yyp[2] == '\'') {
27493 if (yyres) memcpy(yyres + yyn, yyp, 3);
27494 yyn += 3;
27495 yyp += 2;
27496 break;
27497 }
27498 goto do_not_strip_quotes;
27499 }
27500
27501 case ',':
27502 goto do_not_strip_quotes;
27503
27504 case '\\':
27505 if (*++yyp != '\\')
27506 goto do_not_strip_quotes;
27507 /* Fall through. */
27508 default:
27509 if (yyres)
27510 yyres[yyn] = *yyp;
27511 yyn++;
27512 break;
27513
27514 case '"':
27515 case '\0':
27516 if (yyres)
27517 yyres[yyn] = '\0';
27518 return yyn;
27519 }
27520 }
27521 do_not_strip_quotes: ;
27522 }
27523
27524 if (!yyres) return strlen(yystr);
27525
27526 return (YYSIZE_T)(yystpcpy(yyres, yystr) - yyres);
27527}
27528#endif
27529
27530#ifdef RIPPER
27531#define validate(x) (void)(x)
27532
27533static VALUE
27534ripper_dispatch0(struct parser_params *p, ID mid)
27535{
27536 return rb_funcall(p->value, mid, 0);
27537}
27538
27539static VALUE
27540ripper_dispatch1(struct parser_params *p, ID mid, VALUE a)
27541{
27542 validate(a);
27543 return rb_funcall(p->value, mid, 1, a);
27544}
27545
27546static VALUE
27547ripper_dispatch2(struct parser_params *p, ID mid, VALUE a, VALUE b)
27548{
27549 validate(a);
27550 validate(b);
27551 return rb_funcall(p->value, mid, 2, a, b);
27552}
27553
27554static VALUE
27555ripper_dispatch3(struct parser_params *p, ID mid, VALUE a, VALUE b, VALUE c)
27556{
27557 validate(a);
27558 validate(b);
27559 validate(c);
27560 return rb_funcall(p->value, mid, 3, a, b, c);
27561}
27562
27563static VALUE
27564ripper_dispatch4(struct parser_params *p, ID mid, VALUE a, VALUE b, VALUE c, VALUE d)
27565{
27566 validate(a);
27567 validate(b);
27568 validate(c);
27569 validate(d);
27570 return rb_funcall(p->value, mid, 4, a, b, c, d);
27571}
27572
27573static VALUE
27574ripper_dispatch5(struct parser_params *p, ID mid, VALUE a, VALUE b, VALUE c, VALUE d, VALUE e)
27575{
27576 validate(a);
27577 validate(b);
27578 validate(c);
27579 validate(d);
27580 validate(e);
27581 return rb_funcall(p->value, mid, 5, a, b, c, d, e);
27582}
27583
27584static VALUE
27585ripper_dispatch7(struct parser_params *p, ID mid, VALUE a, VALUE b, VALUE c, VALUE d, VALUE e, VALUE f, VALUE g)
27586{
27587 validate(a);
27588 validate(b);
27589 validate(c);
27590 validate(d);
27591 validate(e);
27592 validate(f);
27593 validate(g);
27594 return rb_funcall(p->value, mid, 7, a, b, c, d, e, f, g);
27595}
27596
27597void
27598ripper_error(struct parser_params *p)
27599{
27600 p->error_p = TRUE;
27601}
27602
27603VALUE
27604ripper_value(struct parser_params *p)
27605{
27606 (void)yystpcpy; /* may not used in newer bison */
27607
27608 return p->value;
27609}
27610
27611#endif /* RIPPER */
27612/*
27613 * Local variables:
27614 * mode: c
27615 * c-file-style: "ruby"
27616 * End:
27617 */
#define RUBY_ASSERT(...)
Asserts that the given expression is truthy if and only if RUBY_DEBUG is truthy.
Definition assert.h:219
#define ISSPACE
@old{rb_isspace}
Definition ctype.h:88
#define ISDIGIT
@old{rb_isdigit}
Definition ctype.h:93
#define STRCASECMP
@old{st_locale_insensitive_strcasecmp}
Definition ctype.h:102
#define ISALPHA
@old{rb_isalpha}
Definition ctype.h:92
#define STRNCASECMP
@old{st_locale_insensitive_strncasecmp}
Definition ctype.h:103
#define ISPRINT
@old{rb_isprint}
Definition ctype.h:86
#define ISXDIGIT
@old{rb_isxdigit}
Definition ctype.h:94
#define ISCNTRL
@old{rb_iscntrl}
Definition ctype.h:96
#define ISALNUM
@old{rb_isalnum}
Definition ctype.h:91
#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 ALLOC
Old name of RB_ALLOC.
Definition memory.h:400
#define xfree
Old name of ruby_xfree.
Definition xmalloc.h:58
#define xrealloc
Old name of ruby_xrealloc.
Definition xmalloc.h:56
#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 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 FIXNUM_MAX
Old name of RUBY_FIXNUM_MAX.
Definition fixnum.h:26
#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 xcalloc
Old name of ruby_xcalloc.
Definition xmalloc.h:55
void rb_exc_raise(VALUE mesg)
Raises an exception in the current thread.
Definition eval.c:664
#define ruby_verbose
This variable controls whether the interpreter is in debug mode.
Definition error.h:475
VALUE rb_eRuntimeError
RuntimeError exception.
Definition error.c:1429
VALUE rb_eSyntaxError
SyntaxError exception.
Definition error.c:1448
VALUE rb_class_new_instance(int argc, const VALUE *argv, VALUE klass)
Allocates, then initialises an instance of the given class.
Definition object.c:2249
Encoding relates APIs.
VALUE rb_funcall(VALUE recv, ID mid, int n,...)
Calls a method.
Definition vm_eval.c:1119
VALUE rb_ary_new(void)
Allocates a new, empty array.
VALUE rb_ary_pop(VALUE ary)
Destructively deletes an element from the end of the passed array and returns what was deleted.
VALUE rb_ary_push(VALUE ary, VALUE elem)
Special case of rb_ary_cat() that it adds only one element.
VALUE rb_ary_entry(VALUE ary, long off)
Queries an element of an array.
#define rb_str_new(str, len)
Allocates an instance of rb_cString.
Definition string.h:1499
#define rb_usascii_str_new(str, len)
Identical to rb_str_new, except it generates a string of "US ASCII" encoding.
Definition string.h:1533
VALUE rb_str_cat(VALUE dst, const char *src, long srclen)
Destructively appends the passed contents to the string.
Definition string.c:3599
#define rb_strlen_lit(str)
Length of a string literal.
Definition string.h:1693
#define rb_str_cat_cstr(buf, str)
Identical to rb_str_cat(), except it assumes the passed pointer is a pointer to a C string.
Definition string.h:1657
#define rb_str_new_cstr(str)
Identical to rb_str_new, except it assumes the passed pointer is a pointer to a C string.
Definition string.h:1515
ID rb_sym2id(VALUE obj)
Converts an instance of rb_cSymbol into an ID.
Definition symbol.c:943
int capa
Designed capacity of the buffer.
Definition io.h:11
char * ptr
Pointer to the underlying memory region, of at least capa bytes.
Definition io.h:2
int off
Offset inside of ptr.
Definition io.h:5
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.
#define RBIMPL_ATTR_NONNULL(list)
Wraps (or simulates) __attribute__((nonnull)).
Definition nonnull.h:30
#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.