Ruby 4.1.0dev (2026-05-15 revision a8bcae043f931d9b79f1cb1fe2c021985d07b984)
parse.c
1/* A Bison parser, made by Lrama 0.8.0. */
2
3/* Bison implementation for Yacc-like parsers in C
4
5 Copyright (C) 1984, 1989-1990, 2000-2015, 2018-2021 Free Software Foundation,
6 Inc.
7
8 This program is free software: you can redistribute it and/or modify
9 it under the terms of the GNU General Public License as published by
10 the Free Software Foundation, either version 3 of the License, or
11 (at your option) any later version.
12
13 This program is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU General Public License for more details.
17
18 You should have received a copy of the GNU General Public License
19 along with this program. If not, see <https://www.gnu.org/licenses/>. */
20
21/* As a special exception, you may create a larger work that contains
22 part or all of the Bison parser skeleton and distribute that work
23 under terms of your choice, so long as that work isn't itself a
24 parser generator using the skeleton or a modified version thereof
25 as a parser skeleton. Alternatively, if you modify or redistribute
26 the parser skeleton itself, you may (at your option) remove this
27 special exception, which will cause the skeleton and the resulting
28 Bison output files to be licensed under the GNU General Public
29 License without this special exception.
30
31 This special exception was added by the Free Software Foundation in
32 version 2.2 of Bison. */
33
34/* C LALR(1) parser skeleton written by Richard Stallman, by
35 simplifying the original so-called "semantic" parser. */
36
37/* DO NOT RELY ON FEATURES THAT ARE NOT DOCUMENTED in the manual,
38 especially those whose name start with YY_ or yy_. They are
39 private implementation details that can be changed or removed. */
40
41/* All symbols defined below should begin with yy or YY, to avoid
42 infringing on user name space. This should be done even for local
43 variables, as they might otherwise be expanded by user macros.
44 There are some unavoidable exceptions within include files to
45 define necessary library symbols; they are noted "INFRINGES ON
46 USER NAME SPACE" below. */
47
48/* Identify Bison output, and Bison version. */
49#define YYBISON 30802
50
51/* Bison version string. */
52#define YYBISON_VERSION "3.8.2"
53
54/* Skeleton name. */
55#define YYSKELETON_NAME "yacc.c"
56
57/* Pure parsers. */
58#define YYPURE 1
59
60/* Push parsers. */
61#define YYPUSH 0
62
63/* Pull parsers. */
64#define YYPULL 1
65
66
67/* First part of user prologue. */
68#line 12 "parse.y"
69
70
71#if !YYPURE
72# error needs pure parser
73#endif
74#define YYDEBUG 1
75#define YYERROR_VERBOSE 1
76#define YYSTACK_USE_ALLOCA 0
77
78/* For Ripper */
79#ifdef RUBY_EXTCONF_H
80# include RUBY_EXTCONF_H
81#endif
82
83#include "ruby/internal/config.h"
84
85#include <errno.h>
86
87#ifdef UNIVERSAL_PARSER
88
89#include "internal/ruby_parser.h"
90#include "parser_node.h"
91#include "universal_parser.c"
92
93#ifdef RIPPER
94#define STATIC_ID2SYM p->config->static_id2sym
95#define rb_str_coderange_scan_restartable p->config->str_coderange_scan_restartable
96#endif
97
98#else
99
100#include "internal.h"
101#include "internal/compile.h"
102#include "internal/compilers.h"
103#include "internal/complex.h"
104#include "internal/encoding.h"
105#include "internal/error.h"
106#include "internal/hash.h"
107#include "internal/io.h"
108#include "internal/numeric.h"
109#include "internal/parse.h"
110#include "internal/rational.h"
111#include "internal/re.h"
112#include "internal/ruby_parser.h"
113#include "internal/symbol.h"
114#include "internal/thread.h"
115#include "internal/variable.h"
116#include "node.h"
117#include "parser_node.h"
118#include "probes.h"
119#include "regenc.h"
120#include "ruby/encoding.h"
121#include "ruby/regex.h"
122#include "ruby/ruby.h"
123#include "ruby/st.h"
124#include "ruby/util.h"
125#include "ruby/ractor.h"
126#include "symbol.h"
127
128#ifndef RIPPER
129static VALUE
130syntax_error_new(void)
131{
133}
134#endif
135
136static NODE *reg_named_capture_assign(struct parser_params* p, VALUE regexp, const YYLTYPE *loc, rb_parser_assignable_func assignable);
137
138#define compile_callback rb_suppress_tracing
139#endif /* !UNIVERSAL_PARSER */
140
141#define NODE_SPECIAL_EMPTY_ARGS ((NODE *)-1)
142#define NODE_EMPTY_ARGS_P(node) ((node) == NODE_SPECIAL_EMPTY_ARGS)
143
144static int rb_parser_string_hash_cmp(rb_parser_string_t *str1, rb_parser_string_t *str2);
145
146#ifndef RIPPER
147static rb_parser_string_t *rb_parser_string_deep_copy(struct parser_params *p, const rb_parser_string_t *original);
148#endif
149
150static int
151node_integer_cmp(rb_node_integer_t *n1, rb_node_integer_t *n2)
152{
153 return (n1->minus != n2->minus ||
154 n1->base != n2->base ||
155 strcmp(n1->val, n2->val));
156}
157
158static int
159node_float_cmp(rb_node_float_t *n1, rb_node_float_t *n2)
160{
161 return (n1->minus != n2->minus ||
162 strcmp(n1->val, n2->val));
163}
164
165static int
166node_rational_cmp(rb_node_rational_t *n1, rb_node_rational_t *n2)
167{
168 return (n1->minus != n2->minus ||
169 n1->base != n2->base ||
170 n1->seen_point != n2->seen_point ||
171 strcmp(n1->val, n2->val));
172}
173
174static int
175node_imaginary_cmp(rb_node_imaginary_t *n1, rb_node_imaginary_t *n2)
176{
177 return (n1->minus != n2->minus ||
178 n1->base != n2->base ||
179 n1->seen_point != n2->seen_point ||
180 n1->type != n2->type ||
181 strcmp(n1->val, n2->val));
182}
183
184static int
185rb_parser_regx_hash_cmp(rb_node_regx_t *n1, rb_node_regx_t *n2)
186{
187 return (n1->options != n2->options ||
188 rb_parser_string_hash_cmp(n1->string, n2->string));
189}
190
191static st_index_t rb_parser_str_hash(rb_parser_string_t *str);
192static st_index_t rb_char_p_hash(const char *c);
193
194static int
195literal_cmp(st_data_t val, st_data_t lit)
196{
197 if (val == lit) return 0;
198
199 NODE *node_val = RNODE(val);
200 NODE *node_lit = RNODE(lit);
201 enum node_type type_val = nd_type(node_val);
202 enum node_type type_lit = nd_type(node_lit);
203
204 if (type_val != type_lit) {
205 return -1;
206 }
207
208 switch (type_lit) {
209 case NODE_INTEGER:
210 return node_integer_cmp(RNODE_INTEGER(node_val), RNODE_INTEGER(node_lit));
211 case NODE_FLOAT:
212 return node_float_cmp(RNODE_FLOAT(node_val), RNODE_FLOAT(node_lit));
213 case NODE_RATIONAL:
214 return node_rational_cmp(RNODE_RATIONAL(node_val), RNODE_RATIONAL(node_lit));
215 case NODE_IMAGINARY:
216 return node_imaginary_cmp(RNODE_IMAGINARY(node_val), RNODE_IMAGINARY(node_lit));
217 case NODE_STR:
218 return rb_parser_string_hash_cmp(RNODE_STR(node_val)->string, RNODE_STR(node_lit)->string);
219 case NODE_SYM:
220 return rb_parser_string_hash_cmp(RNODE_SYM(node_val)->string, RNODE_SYM(node_lit)->string);
221 case NODE_REGX:
222 return rb_parser_regx_hash_cmp(RNODE_REGX(node_val), RNODE_REGX(node_lit));
223 case NODE_LINE:
224 return node_val->nd_loc.beg_pos.lineno != node_lit->nd_loc.beg_pos.lineno;
225 case NODE_FILE:
226 return rb_parser_string_hash_cmp(RNODE_FILE(node_val)->path, RNODE_FILE(node_lit)->path);
227 case NODE_ENCODING:
228 return RNODE_ENCODING(node_val)->enc != RNODE_ENCODING(node_lit)->enc;
229 default:
230#ifdef UNIVERSAL_PARSER
231 abort();
232#else
233 rb_bug("unexpected node: %s, %s", ruby_node_name(type_val), ruby_node_name(type_lit));
234#endif
235 }
236}
237
238static st_index_t
239literal_hash(st_data_t a)
240{
241 NODE *node = (NODE *)a;
242 enum node_type type = nd_type(node);
243
244 switch (type) {
245 case NODE_INTEGER:
246 return rb_char_p_hash(RNODE_INTEGER(node)->val);
247 case NODE_FLOAT:
248 return rb_char_p_hash(RNODE_FLOAT(node)->val);
249 case NODE_RATIONAL:
250 return rb_char_p_hash(RNODE_RATIONAL(node)->val);
251 case NODE_IMAGINARY:
252 return rb_char_p_hash(RNODE_IMAGINARY(node)->val);
253 case NODE_STR:
254 return rb_parser_str_hash(RNODE_STR(node)->string);
255 case NODE_SYM:
256 return rb_parser_str_hash(RNODE_SYM(node)->string);
257 case NODE_REGX:
258 return rb_parser_str_hash(RNODE_REGX(node)->string);
259 case NODE_LINE:
260 return (st_index_t)node->nd_loc.beg_pos.lineno;
261 case NODE_FILE:
262 return rb_parser_str_hash(RNODE_FILE(node)->path);
263 case NODE_ENCODING:
264 return (st_index_t)RNODE_ENCODING(node)->enc;
265 default:
266#ifdef UNIVERSAL_PARSER
267 abort();
268#else
269 rb_bug("unexpected node: %s", ruby_node_name(type));
270#endif
271 }
272}
273
274static inline int
275parse_isascii(int c)
276{
277 return '\0' <= c && c <= '\x7f';
278}
279
280#undef ISASCII
281#define ISASCII parse_isascii
282
283static inline int
284parse_isspace(int c)
285{
286 return c == ' ' || ('\t' <= c && c <= '\r');
287}
288
289#undef ISSPACE
290#define ISSPACE parse_isspace
291
292static inline int
293parse_iscntrl(int c)
294{
295 return ('\0' <= c && c < ' ') || c == '\x7f';
296}
297
298#undef ISCNTRL
299#define ISCNTRL(c) parse_iscntrl(c)
300
301static inline int
302parse_isupper(int c)
303{
304 return 'A' <= c && c <= 'Z';
305}
306
307static inline int
308parse_islower(int c)
309{
310 return 'a' <= c && c <= 'z';
311}
312
313static inline int
314parse_isalpha(int c)
315{
316 return parse_isupper(c) || parse_islower(c);
317}
318
319#undef ISALPHA
320#define ISALPHA(c) parse_isalpha(c)
321
322static inline int
323parse_isdigit(int c)
324{
325 return '0' <= c && c <= '9';
326}
327
328#undef ISDIGIT
329#define ISDIGIT(c) parse_isdigit(c)
330
331static inline int
332parse_isalnum(int c)
333{
334 return ISALPHA(c) || ISDIGIT(c);
335}
336
337#undef ISALNUM
338#define ISALNUM(c) parse_isalnum(c)
339
340static inline int
341parse_isxdigit(int c)
342{
343 return ISDIGIT(c) || ('A' <= c && c <= 'F') || ('a' <= c && c <= 'f');
344}
345
346#undef ISXDIGIT
347#define ISXDIGIT(c) parse_isxdigit(c)
348
349#include "parser_st.h"
350
351#undef STRCASECMP
352#define STRCASECMP rb_parser_st_locale_insensitive_strcasecmp
353
354#undef STRNCASECMP
355#define STRNCASECMP rb_parser_st_locale_insensitive_strncasecmp
356
357#ifdef RIPPER
358#include "ripper_init.h"
359#endif
360
361enum rescue_context {
362 before_rescue,
363 after_rescue,
364 after_else,
365 after_ensure,
366};
367
369 unsigned int in_defined: 1;
370 unsigned int in_kwarg: 1;
371 unsigned int in_argdef: 1;
372 unsigned int in_def: 1;
373 unsigned int in_class: 1;
374 unsigned int has_trailing_semicolon: 1;
375 BITFIELD(enum rb_parser_shareability, shareable_constant_value, 2);
376 BITFIELD(enum rescue_context, in_rescue, 2);
377 unsigned int cant_return: 1;
378 unsigned int in_alt_pattern: 1;
379 unsigned int capture_in_pattern: 1;
380};
381
383
384#if defined(__GNUC__) && !defined(__clang__)
385// Suppress "parameter passing for argument of type 'struct
386// lex_context' changed" notes. `struct lex_context` is file scope,
387// and has no ABI compatibility issue.
391// Not sure why effective even after popped.
392#endif
393
394#include "parse.h"
395
396#define NO_LEX_CTXT (struct lex_context){0}
397
398#ifndef WARN_PAST_SCOPE
399# define WARN_PAST_SCOPE 0
400#endif
401
402#define TAB_WIDTH 8
403
404#define yydebug (p->debug) /* disable the global variable definition */
405
406#define YYFPRINTF(out, ...) rb_parser_printf(p, __VA_ARGS__)
407#define YY_LOCATION_PRINT(File, loc, p) \
408 rb_parser_printf(p, "%d.%d-%d.%d", \
409 (loc).beg_pos.lineno, (loc).beg_pos.column,\
410 (loc).end_pos.lineno, (loc).end_pos.column)
411#define YYLLOC_DEFAULT(Current, Rhs, N) \
412 do \
413 if (N) \
414 { \
415 (Current).beg_pos = YYRHSLOC(Rhs, 1).beg_pos; \
416 (Current).end_pos = YYRHSLOC(Rhs, N).end_pos; \
417 } \
418 else \
419 { \
420 (Current).beg_pos = YYRHSLOC(Rhs, 0).end_pos; \
421 (Current).end_pos = YYRHSLOC(Rhs, 0).end_pos; \
422 } \
423 while (0)
424#define YY_(Msgid) \
425 (((Msgid)[0] == 'm') && (strcmp((Msgid), "memory exhausted") == 0) ? \
426 "nesting too deep" : (Msgid))
427
428#define RUBY_SET_YYLLOC_FROM_STRTERM_HEREDOC(Current) \
429 rb_parser_set_location_from_strterm_heredoc(p, &p->lex.strterm->u.heredoc, &(Current))
430#define RUBY_SET_YYLLOC_OF_DELAYED_TOKEN(Current) \
431 rb_parser_set_location_of_delayed_token(p, &(Current))
432#define RUBY_SET_YYLLOC_OF_HEREDOC_END(Current) \
433 rb_parser_set_location_of_heredoc_end(p, &(Current))
434#define RUBY_SET_YYLLOC_OF_DUMMY_END(Current) \
435 rb_parser_set_location_of_dummy_end(p, &(Current))
436#define RUBY_SET_YYLLOC_OF_NONE(Current) \
437 rb_parser_set_location_of_none(p, &(Current))
438#define RUBY_SET_YYLLOC(Current) \
439 rb_parser_set_location(p, &(Current))
440#define RUBY_INIT_YYLLOC() \
441 { \
442 {p->ruby_sourceline, (int)(p->lex.ptok - p->lex.pbeg)}, \
443 {p->ruby_sourceline, (int)(p->lex.pcur - p->lex.pbeg)}, \
444 }
445
446#define IS_lex_state_for(x, ls) ((x) & (ls))
447#define IS_lex_state_all_for(x, ls) (((x) & (ls)) == (ls))
448#define IS_lex_state(ls) IS_lex_state_for(p->lex.state, (ls))
449#define IS_lex_state_all(ls) IS_lex_state_all_for(p->lex.state, (ls))
450
451# define SET_LEX_STATE(ls) \
452 parser_set_lex_state(p, ls, __LINE__)
453static inline enum lex_state_e parser_set_lex_state(struct parser_params *p, enum lex_state_e ls, int line);
454
455typedef VALUE stack_type;
456
457static const rb_code_location_t NULL_LOC = { {0, -1}, {0, -1} };
458
459# define SHOW_BITSTACK(stack, name) (p->debug ? rb_parser_show_bitstack(p, stack, name, __LINE__) : (void)0)
460# define BITSTACK_PUSH(stack, n) (((p->stack) = ((p->stack)<<1)|((n)&1)), SHOW_BITSTACK(p->stack, #stack"(push)"))
461# define BITSTACK_POP(stack) (((p->stack) = (p->stack) >> 1), SHOW_BITSTACK(p->stack, #stack"(pop)"))
462# define BITSTACK_SET_P(stack) (SHOW_BITSTACK(p->stack, #stack), (p->stack)&1)
463# define BITSTACK_SET(stack, n) ((p->stack)=(n), SHOW_BITSTACK(p->stack, #stack"(set)"))
464
465/* A flag to identify keyword_do_cond, "do" keyword after condition expression.
466 Examples: `while ... do`, `until ... do`, and `for ... in ... do` */
467#define COND_PUSH(n) BITSTACK_PUSH(cond_stack, (n))
468#define COND_POP() BITSTACK_POP(cond_stack)
469#define COND_P() BITSTACK_SET_P(cond_stack)
470#define COND_SET(n) BITSTACK_SET(cond_stack, (n))
471
472/* A flag to identify keyword_do_block; "do" keyword after command_call.
473 Example: `foo 1, 2 do`. */
474#define CMDARG_PUSH(n) BITSTACK_PUSH(cmdarg_stack, (n))
475#define CMDARG_POP() BITSTACK_POP(cmdarg_stack)
476#define CMDARG_P() BITSTACK_SET_P(cmdarg_stack)
477#define CMDARG_SET(n) BITSTACK_SET(cmdarg_stack, (n))
478
479struct vtable {
480 ID *tbl;
481 int pos;
482 int capa;
483 struct vtable *prev;
484};
485
487 struct vtable *args;
488 struct vtable *vars;
489 struct vtable *used;
490# if WARN_PAST_SCOPE
491 struct vtable *past;
492# endif
493 struct local_vars *prev;
494 struct {
495 NODE *outer, *inner, *current;
496 } numparam;
497 NODE *it;
498};
499
501 NODE *node;
502 YYLTYPE opening_loc;
503 YYLTYPE closing_loc;
505
506enum {
507 ORDINAL_PARAM = -1,
508 NO_PARAM = 0,
509 NUMPARAM_MAX = 9,
510};
511
512#define DVARS_INHERIT ((void*)1)
513#define DVARS_TOPSCOPE NULL
514#define DVARS_TERMINAL_P(tbl) ((tbl) == DVARS_INHERIT || (tbl) == DVARS_TOPSCOPE)
515
516typedef struct token_info {
517 const char *token;
519 int indent;
520 int nonspc;
521 struct token_info *next;
522} token_info;
523
528
530 struct parser_string_buffer_elem *next;
531 long len; /* Total length of allocated buf */
532 long used; /* Current usage of buf */
533 rb_parser_string_t *buf[FLEX_ARY_LEN];
535
540
541#define AFTER_HEREDOC_WITHOUT_TERMINATOR ((rb_parser_string_t *)1)
542
543/*
544 Structure of Lexer Buffer:
545
546 lex.pbeg lex.ptok lex.pcur lex.pend
547 | | | |
548 |------------+------------+------------|
549 |<---------->|
550 token
551*/
553 YYSTYPE *lval;
554 YYLTYPE *yylloc;
555
556 struct {
557 rb_strterm_t *strterm;
558 rb_parser_lex_gets_func *gets;
559 rb_parser_input_data input;
560 parser_string_buffer_t string_buffer;
561 rb_parser_string_t *lastline;
562 rb_parser_string_t *nextline;
563 const char *pbeg;
564 const char *pcur;
565 const char *pend;
566 const char *ptok;
567 enum lex_state_e state;
568 /* track the nest level of any parens "()[]{}" */
569 int paren_nest;
570 /* keep p->lex.paren_nest at the beginning of lambda "->" to detect tLAMBEG and keyword_do_LAMBDA */
571 int lpar_beg;
572 /* track the nest level of only braces "{}" */
573 int brace_nest;
574 } lex;
575 stack_type cond_stack;
576 stack_type cmdarg_stack;
577 int tokidx;
578 int toksiz;
579 int heredoc_end;
580 int heredoc_indent;
581 int heredoc_line_indent;
582 char *tokenbuf;
583 struct local_vars *lvtbl;
584 st_table *pvtbl;
585 st_table *pktbl;
586 int line_count;
587 int ruby_sourceline; /* current line no. */
588 const char *ruby_sourcefile; /* current source file */
589 VALUE ruby_sourcefile_string;
590 rb_encoding *enc;
592 st_table *case_labels;
593 rb_node_exits_t *exits;
594
595 VALUE debug_buffer;
596 VALUE debug_output;
597
598 struct {
599 rb_parser_string_t *token;
600 int beg_line;
601 int beg_col;
602 int end_line;
603 int end_col;
604 } delayed;
605
606 rb_ast_t *ast;
607 int node_id;
608
609 st_table *warn_duplicate_keys_table;
610
611 int max_numparam;
612 ID it_id;
613
614 struct lex_context ctxt;
615
616 NODE *eval_tree_begin;
617 NODE *eval_tree;
618 const struct rb_iseq_struct *parent_iseq;
619
620#ifdef UNIVERSAL_PARSER
621 const rb_parser_config_t *config;
622#endif
623 /* compile_option */
624 signed int frozen_string_literal:2; /* -1: not specified, 0: false, 1: true */
625
626 unsigned int command_start:1;
627 unsigned int eofp: 1;
628 unsigned int ruby__end__seen: 1;
629 unsigned int debug: 1;
630 unsigned int has_shebang: 1;
631 unsigned int token_seen: 1;
632 unsigned int token_info_enabled: 1;
633# if WARN_PAST_SCOPE
634 unsigned int past_scope_enabled: 1;
635# endif
636 unsigned int error_p: 1;
637 unsigned int cr_seen: 1;
638
639#ifndef RIPPER
640 /* Ruby core only */
641
642 unsigned int do_print: 1;
643 unsigned int do_loop: 1;
644 unsigned int do_chomp: 1;
645 unsigned int do_split: 1;
646 unsigned int error_tolerant: 1;
647 unsigned int keep_tokens: 1;
648
649 VALUE error_buffer;
650 rb_parser_ary_t *debug_lines;
651 /*
652 * Store specific keyword locations to generate dummy end token.
653 * Refer to the tail of list element.
654 */
656 /* id for terms */
657 int token_id;
658 /* Array for term tokens */
659 rb_parser_ary_t *tokens;
660#else
661 /* Ripper only */
662
663 VALUE value;
664 VALUE result;
665 VALUE parsing_thread;
666 VALUE s_value; /* Token VALUE */
667 VALUE s_lvalue; /* VALUE generated by rule action (reduce) */
668 VALUE s_value_stack;
669#endif
670};
671
672#define NUMPARAM_ID_P(id) numparam_id_p(p, id)
673#define NUMPARAM_ID_TO_IDX(id) (unsigned int)(((id) >> ID_SCOPE_SHIFT) - (tNUMPARAM_1 - 1))
674#define NUMPARAM_IDX_TO_ID(idx) TOKEN2LOCALID((tNUMPARAM_1 - 1 + (idx)))
675static int
676numparam_id_p(struct parser_params *p, ID id)
677{
678 if (!is_local_id(id) || id < (tNUMPARAM_1 << ID_SCOPE_SHIFT)) return 0;
679 unsigned int idx = NUMPARAM_ID_TO_IDX(id);
680 return idx > 0 && idx <= NUMPARAM_MAX;
681}
682static void numparam_name(struct parser_params *p, ID id);
683
684#ifdef RIPPER
685static void
686after_shift(struct parser_params *p)
687{
688 if (p->debug) {
689 rb_parser_printf(p, "after-shift: %+"PRIsVALUE"\n", p->s_value);
690 }
691 rb_ary_push(p->s_value_stack, p->s_value);
692 p->s_value = Qnil;
693}
694
695static void
696before_reduce(int len, struct parser_params *p)
697{
698 // Initialize $$ with $1.
699 if (len) p->s_lvalue = rb_ary_entry(p->s_value_stack, -len);
700}
701
702static void
703after_reduce(int len, struct parser_params *p)
704{
705 for (int i = 0; i < len; i++) {
706 VALUE tos = rb_ary_pop(p->s_value_stack);
707 if (p->debug) {
708 rb_parser_printf(p, "after-reduce pop: %+"PRIsVALUE"\n", tos);
709 }
710 }
711 if (p->debug) {
712 rb_parser_printf(p, "after-reduce push: %+"PRIsVALUE"\n", p->s_lvalue);
713 }
714 rb_ary_push(p->s_value_stack, p->s_lvalue);
715 p->s_lvalue = Qnil;
716}
717
718static void
719after_shift_error_token(struct parser_params *p)
720{
721 if (p->debug) {
722 rb_parser_printf(p, "after-shift-error-token:\n");
723 }
724 rb_ary_push(p->s_value_stack, Qnil);
725}
726
727static void
728after_pop_stack(int len, struct parser_params *p)
729{
730 for (int i = 0; i < len; i++) {
731 VALUE tos = rb_ary_pop(p->s_value_stack);
732 if (p->debug) {
733 rb_parser_printf(p, "after-pop-stack pop: %+"PRIsVALUE"\n", tos);
734 }
735 }
736}
737#else
738static void
739after_shift(struct parser_params *p)
740{
741}
742
743static void
744before_reduce(int len, struct parser_params *p)
745{
746}
747
748static void
749after_reduce(int len, struct parser_params *p)
750{
751}
752
753static void
754after_shift_error_token(struct parser_params *p)
755{
756}
757
758static void
759after_pop_stack(int len, struct parser_params *p)
760{
761}
762#endif
763
764#define intern_cstr(n,l,en) rb_intern3(n,l,en)
765
766#define STRING_NEW0() rb_parser_encoding_string_new(p,0,0,p->enc)
767
768#define STR_NEW(ptr,len) rb_enc_str_new((ptr),(len),p->enc)
769#define STR_NEW0() rb_enc_str_new(0,0,p->enc)
770#define STR_NEW2(ptr) rb_enc_str_new((ptr),strlen(ptr),p->enc)
771#define STR_NEW3(ptr,len,e,func) parser_str_new(p, (ptr),(len),(e),(func),p->enc)
772#define TOK_INTERN() intern_cstr(tok(p), toklen(p), p->enc)
773#define VALID_SYMNAME_P(s, l, enc, type) (rb_enc_symname_type(s, l, enc, (1U<<(type))) == (int)(type))
774
775#ifndef RIPPER
776static inline int
777char_at_end(struct parser_params *p, VALUE str, int when_empty)
778{
779 long len = RSTRING_LEN(str);
780 return len > 0 ? (unsigned char)RSTRING_PTR(str)[len-1] : when_empty;
781}
782#endif
783
784static void
785pop_pvtbl(struct parser_params *p, st_table *tbl)
786{
787 st_free_table(p->pvtbl);
788 p->pvtbl = tbl;
789}
790
791static void
792pop_pktbl(struct parser_params *p, st_table *tbl)
793{
794 if (p->pktbl) st_free_table(p->pktbl);
795 p->pktbl = tbl;
796}
797
798#define STRING_BUF_DEFAULT_LEN 16
799
800static void
801string_buffer_init(struct parser_params *p)
802{
803 parser_string_buffer_t *buf = &p->lex.string_buffer;
804 const size_t size = offsetof(parser_string_buffer_elem_t, buf) + sizeof(rb_parser_string_t *) * STRING_BUF_DEFAULT_LEN;
805
806 buf->head = buf->last = xmalloc(size);
807 buf->head->len = STRING_BUF_DEFAULT_LEN;
808 buf->head->used = 0;
809 buf->head->next = NULL;
810}
811
812static void
813string_buffer_append(struct parser_params *p, rb_parser_string_t *str)
814{
815 parser_string_buffer_t *buf = &p->lex.string_buffer;
816
817 if (buf->head->used >= buf->head->len) {
819 long n = buf->head->len * 2;
820 const size_t size = offsetof(parser_string_buffer_elem_t, buf) + sizeof(rb_parser_string_t *) * n;
821
822 elem = xmalloc(size);
823 elem->len = n;
824 elem->used = 0;
825 elem->next = NULL;
826 buf->last->next = elem;
827 buf->last = elem;
828 }
829 buf->last->buf[buf->last->used++] = str;
830}
831
832static void
833string_buffer_free(struct parser_params *p)
834{
835 parser_string_buffer_elem_t *elem = p->lex.string_buffer.head;
836
837 while (elem) {
838 parser_string_buffer_elem_t *next_elem = elem->next;
839
840 for (long i = 0; i < elem->used; i++) {
841 rb_parser_string_free(p, elem->buf[i]);
842 }
843
844 xfree(elem);
845 elem = next_elem;
846 }
847}
848
849#ifndef RIPPER
850static void flush_debug_buffer(struct parser_params *p, VALUE out, VALUE str);
851
852static void
853debug_end_expect_token_locations(struct parser_params *p, const char *name)
854{
855 if(p->debug) {
856 VALUE mesg = rb_sprintf("%s: [", name);
857 int i = 0;
858 for (end_expect_token_locations_t *loc = p->end_expect_token_locations; loc; loc = loc->prev) {
859 if (i > 0)
860 rb_str_cat_cstr(mesg, ", ");
861 rb_str_catf(mesg, "[%d, %d]", loc->pos->lineno, loc->pos->column);
862 i++;
863 }
864 rb_str_cat_cstr(mesg, "]\n");
865 flush_debug_buffer(p, p->debug_output, mesg);
866 }
867}
868
869static void
870push_end_expect_token_locations(struct parser_params *p, const rb_code_position_t *pos)
871{
872 if(!p->error_tolerant) return;
873
876 locations->pos = pos;
877 locations->prev = p->end_expect_token_locations;
878 p->end_expect_token_locations = locations;
879
880 debug_end_expect_token_locations(p, "push_end_expect_token_locations");
881}
882
883static void
884pop_end_expect_token_locations(struct parser_params *p)
885{
886 if(!p->end_expect_token_locations) return;
887
888 end_expect_token_locations_t *locations = p->end_expect_token_locations->prev;
889 ruby_xfree_sized(p->end_expect_token_locations, sizeof(end_expect_token_locations_t));
890 p->end_expect_token_locations = locations;
891
892 debug_end_expect_token_locations(p, "pop_end_expect_token_locations");
893}
894
896peek_end_expect_token_locations(struct parser_params *p)
897{
898 return p->end_expect_token_locations;
899}
900
901static const char *
902parser_token2char(struct parser_params *p, enum yytokentype tok)
903{
904 switch ((int) tok) {
905#define TOKEN2CHAR(tok) case tok: return (#tok);
906#define TOKEN2CHAR2(tok, name) case tok: return (name);
907 TOKEN2CHAR2(' ', "word_sep");
908 TOKEN2CHAR2('!', "!")
909 TOKEN2CHAR2('%', "%");
910 TOKEN2CHAR2('&', "&");
911 TOKEN2CHAR2('*', "*");
912 TOKEN2CHAR2('+', "+");
913 TOKEN2CHAR2('-', "-");
914 TOKEN2CHAR2('/', "/");
915 TOKEN2CHAR2('<', "<");
916 TOKEN2CHAR2('=', "=");
917 TOKEN2CHAR2('>', ">");
918 TOKEN2CHAR2('?', "?");
919 TOKEN2CHAR2('^', "^");
920 TOKEN2CHAR2('|', "|");
921 TOKEN2CHAR2('~', "~");
922 TOKEN2CHAR2(':', ":");
923 TOKEN2CHAR2(',', ",");
924 TOKEN2CHAR2('.', ".");
925 TOKEN2CHAR2(';', ";");
926 TOKEN2CHAR2('`', "`");
927 TOKEN2CHAR2('\n', "nl");
928 TOKEN2CHAR2('{', "\"{\"");
929 TOKEN2CHAR2('}', "\"}\"");
930 TOKEN2CHAR2('[', "\"[\"");
931 TOKEN2CHAR2(']', "\"]\"");
932 TOKEN2CHAR2('(', "\"(\"");
933 TOKEN2CHAR2(')', "\")\"");
934 TOKEN2CHAR2('\\', "backslash");
935 TOKEN2CHAR(keyword_class);
936 TOKEN2CHAR(keyword_module);
937 TOKEN2CHAR(keyword_def);
938 TOKEN2CHAR(keyword_undef);
939 TOKEN2CHAR(keyword_begin);
940 TOKEN2CHAR(keyword_rescue);
941 TOKEN2CHAR(keyword_ensure);
942 TOKEN2CHAR(keyword_end);
943 TOKEN2CHAR(keyword_if);
944 TOKEN2CHAR(keyword_unless);
945 TOKEN2CHAR(keyword_then);
946 TOKEN2CHAR(keyword_elsif);
947 TOKEN2CHAR(keyword_else);
948 TOKEN2CHAR(keyword_case);
949 TOKEN2CHAR(keyword_when);
950 TOKEN2CHAR(keyword_while);
951 TOKEN2CHAR(keyword_until);
952 TOKEN2CHAR(keyword_for);
953 TOKEN2CHAR(keyword_break);
954 TOKEN2CHAR(keyword_next);
955 TOKEN2CHAR(keyword_redo);
956 TOKEN2CHAR(keyword_retry);
957 TOKEN2CHAR(keyword_in);
958 TOKEN2CHAR(keyword_do);
959 TOKEN2CHAR(keyword_do_cond);
960 TOKEN2CHAR(keyword_do_block);
961 TOKEN2CHAR(keyword_do_LAMBDA);
962 TOKEN2CHAR(keyword_return);
963 TOKEN2CHAR(keyword_yield);
964 TOKEN2CHAR(keyword_super);
965 TOKEN2CHAR(keyword_self);
966 TOKEN2CHAR(keyword_nil);
967 TOKEN2CHAR(keyword_true);
968 TOKEN2CHAR(keyword_false);
969 TOKEN2CHAR(keyword_and);
970 TOKEN2CHAR(keyword_or);
971 TOKEN2CHAR(keyword_not);
972 TOKEN2CHAR(modifier_if);
973 TOKEN2CHAR(modifier_unless);
974 TOKEN2CHAR(modifier_while);
975 TOKEN2CHAR(modifier_until);
976 TOKEN2CHAR(modifier_rescue);
977 TOKEN2CHAR(keyword_alias);
978 TOKEN2CHAR(keyword_defined);
979 TOKEN2CHAR(keyword_BEGIN);
980 TOKEN2CHAR(keyword_END);
981 TOKEN2CHAR(keyword__LINE__);
982 TOKEN2CHAR(keyword__FILE__);
983 TOKEN2CHAR(keyword__ENCODING__);
984 TOKEN2CHAR(tIDENTIFIER);
985 TOKEN2CHAR(tFID);
986 TOKEN2CHAR(tGVAR);
987 TOKEN2CHAR(tIVAR);
988 TOKEN2CHAR(tCONSTANT);
989 TOKEN2CHAR(tCVAR);
990 TOKEN2CHAR(tLABEL);
991 TOKEN2CHAR(tINTEGER);
992 TOKEN2CHAR(tFLOAT);
993 TOKEN2CHAR(tRATIONAL);
994 TOKEN2CHAR(tIMAGINARY);
995 TOKEN2CHAR(tCHAR);
996 TOKEN2CHAR(tNTH_REF);
997 TOKEN2CHAR(tBACK_REF);
998 TOKEN2CHAR(tSTRING_CONTENT);
999 TOKEN2CHAR(tREGEXP_END);
1000 TOKEN2CHAR(tDUMNY_END);
1001 TOKEN2CHAR(tSP);
1002 TOKEN2CHAR(tUPLUS);
1003 TOKEN2CHAR(tUMINUS);
1004 TOKEN2CHAR(tPOW);
1005 TOKEN2CHAR(tCMP);
1006 TOKEN2CHAR(tEQ);
1007 TOKEN2CHAR(tEQQ);
1008 TOKEN2CHAR(tNEQ);
1009 TOKEN2CHAR(tGEQ);
1010 TOKEN2CHAR(tLEQ);
1011 TOKEN2CHAR(tANDOP);
1012 TOKEN2CHAR(tOROP);
1013 TOKEN2CHAR(tMATCH);
1014 TOKEN2CHAR(tNMATCH);
1015 TOKEN2CHAR(tDOT2);
1016 TOKEN2CHAR(tDOT3);
1017 TOKEN2CHAR(tBDOT2);
1018 TOKEN2CHAR(tBDOT3);
1019 TOKEN2CHAR(tAREF);
1020 TOKEN2CHAR(tASET);
1021 TOKEN2CHAR(tLSHFT);
1022 TOKEN2CHAR(tRSHFT);
1023 TOKEN2CHAR(tANDDOT);
1024 TOKEN2CHAR(tCOLON2);
1025 TOKEN2CHAR(tCOLON3);
1026 TOKEN2CHAR(tOP_ASGN);
1027 TOKEN2CHAR(tASSOC);
1028 TOKEN2CHAR(tLPAREN);
1029 TOKEN2CHAR(tLPAREN_ARG);
1030 TOKEN2CHAR(tLBRACK);
1031 TOKEN2CHAR(tLBRACE);
1032 TOKEN2CHAR(tLBRACE_ARG);
1033 TOKEN2CHAR(tSTAR);
1034 TOKEN2CHAR(tDSTAR);
1035 TOKEN2CHAR(tAMPER);
1036 TOKEN2CHAR(tLAMBDA);
1037 TOKEN2CHAR(tSYMBEG);
1038 TOKEN2CHAR(tSTRING_BEG);
1039 TOKEN2CHAR(tXSTRING_BEG);
1040 TOKEN2CHAR(tREGEXP_BEG);
1041 TOKEN2CHAR(tWORDS_BEG);
1042 TOKEN2CHAR(tQWORDS_BEG);
1043 TOKEN2CHAR(tSYMBOLS_BEG);
1044 TOKEN2CHAR(tQSYMBOLS_BEG);
1045 TOKEN2CHAR(tSTRING_END);
1046 TOKEN2CHAR(tSTRING_DEND);
1047 TOKEN2CHAR(tSTRING_DBEG);
1048 TOKEN2CHAR(tSTRING_DVAR);
1049 TOKEN2CHAR(tLAMBEG);
1050 TOKEN2CHAR(tLABEL_END);
1051 TOKEN2CHAR(tIGNORED_NL);
1052 TOKEN2CHAR(tCOMMENT);
1053 TOKEN2CHAR(tEMBDOC_BEG);
1054 TOKEN2CHAR(tEMBDOC);
1055 TOKEN2CHAR(tEMBDOC_END);
1056 TOKEN2CHAR(tHEREDOC_BEG);
1057 TOKEN2CHAR(tHEREDOC_END);
1058 TOKEN2CHAR(k__END__);
1059 TOKEN2CHAR(tLOWEST);
1060 TOKEN2CHAR(tUMINUS_NUM);
1061 TOKEN2CHAR(tLAST_TOKEN);
1062#undef TOKEN2CHAR
1063#undef TOKEN2CHAR2
1064 }
1065
1066 rb_bug("parser_token2id: unknown token %d", tok);
1067
1068 UNREACHABLE_RETURN(0);
1069}
1070#else
1071static void
1072push_end_expect_token_locations(struct parser_params *p, const rb_code_position_t *pos)
1073{
1074}
1075
1076static void
1077pop_end_expect_token_locations(struct parser_params *p)
1078{
1079}
1080#endif
1081
1082RBIMPL_ATTR_NONNULL((1, 2, 3))
1083static int parser_yyerror(struct parser_params*, const YYLTYPE *yylloc, const char*);
1084RBIMPL_ATTR_NONNULL((1, 2))
1085static int parser_yyerror0(struct parser_params*, const char*);
1086#define yyerror0(msg) parser_yyerror0(p, (msg))
1087#define yyerror1(loc, msg) parser_yyerror(p, (loc), (msg))
1088#define yyerror(yylloc, p, msg) parser_yyerror(p, yylloc, msg)
1089#define token_flush(ptr) ((ptr)->lex.ptok = (ptr)->lex.pcur)
1090#define lex_goto_eol(p) ((p)->lex.pcur = (p)->lex.pend)
1091#define lex_eol_p(p) lex_eol_n_p(p, 0)
1092#define lex_eol_n_p(p,n) lex_eol_ptr_n_p(p, (p)->lex.pcur, n)
1093#define lex_eol_ptr_p(p,ptr) lex_eol_ptr_n_p(p,ptr,0)
1094#define lex_eol_ptr_n_p(p,ptr,n) ((ptr)+(n) >= (p)->lex.pend)
1095
1096static void token_info_setup(token_info *ptinfo, const char *ptr, const rb_code_location_t *loc);
1097static void token_info_push(struct parser_params*, const char *token, const rb_code_location_t *loc);
1098static void token_info_pop(struct parser_params*, const char *token, const rb_code_location_t *loc);
1099static void token_info_warn(struct parser_params *p, const char *token, token_info *ptinfo_beg, int same, const rb_code_location_t *loc);
1100static void token_info_drop(struct parser_params *p, const char *token, rb_code_position_t beg_pos);
1101
1102#ifdef RIPPER
1103#define compile_for_eval (0)
1104#else
1105#define compile_for_eval (p->parent_iseq != 0)
1106#endif
1107
1108#define token_column ((int)(p->lex.ptok - p->lex.pbeg))
1109
1110#define CALL_Q_P(q) ((q) == tANDDOT)
1111#define NEW_QCALL(q,r,m,a,loc) (CALL_Q_P(q) ? NEW_QCALL0(r,m,a,loc) : NEW_CALL(r,m,a,loc))
1112
1113#define lambda_beginning_p() (p->lex.lpar_beg == p->lex.paren_nest)
1114
1115static enum yytokentype yylex(YYSTYPE*, YYLTYPE*, struct parser_params*);
1116
1117static inline void
1118rb_discard_node(struct parser_params *p, NODE *n)
1119{
1120 rb_ast_delete_node(p->ast, n);
1121}
1122
1123static rb_node_scope_t *rb_node_scope_new(struct parser_params *p, rb_node_args_t *nd_args, NODE *nd_body, NODE *nd_parent, const YYLTYPE *loc);
1124static rb_node_scope_t *rb_node_scope_new2(struct parser_params *p, rb_ast_id_table_t *nd_tbl, rb_node_args_t *nd_args, NODE *nd_body, NODE *nd_parent, const YYLTYPE *loc);
1125static rb_node_block_t *rb_node_block_new(struct parser_params *p, NODE *nd_head, const YYLTYPE *loc);
1126static rb_node_if_t *rb_node_if_new(struct parser_params *p, NODE *nd_cond, NODE *nd_body, NODE *nd_else, const YYLTYPE *loc, const YYLTYPE* if_keyword_loc, const YYLTYPE* then_keyword_loc, const YYLTYPE* end_keyword_loc);
1127static rb_node_unless_t *rb_node_unless_new(struct parser_params *p, NODE *nd_cond, NODE *nd_body, NODE *nd_else, const YYLTYPE *loc, const YYLTYPE *keyword_loc, const YYLTYPE *then_keyword_loc, const YYLTYPE *end_keyword_loc);
1128static rb_node_case_t *rb_node_case_new(struct parser_params *p, NODE *nd_head, NODE *nd_body, const YYLTYPE *loc, const YYLTYPE *case_keyword_loc, const YYLTYPE *end_keyword_loc);
1129static rb_node_case2_t *rb_node_case2_new(struct parser_params *p, NODE *nd_body, const YYLTYPE *loc, const YYLTYPE *case_keyword_loc, const YYLTYPE *end_keyword_loc);
1130static rb_node_case3_t *rb_node_case3_new(struct parser_params *p, NODE *nd_head, NODE *nd_body, const YYLTYPE *loc, const YYLTYPE *case_keyword_loc, const YYLTYPE *end_keyword_loc);
1131static rb_node_when_t *rb_node_when_new(struct parser_params *p, NODE *nd_head, NODE *nd_body, NODE *nd_next, const YYLTYPE *loc, const YYLTYPE *keyword_loc, const YYLTYPE *then_keyword_loc);
1132static rb_node_in_t *rb_node_in_new(struct parser_params *p, NODE *nd_head, NODE *nd_body, NODE *nd_next, const YYLTYPE *loc, const YYLTYPE *in_keyword_loc, const YYLTYPE *then_keyword_loc, const YYLTYPE *operator_loc);
1133static rb_node_while_t *rb_node_while_new(struct parser_params *p, NODE *nd_cond, NODE *nd_body, long nd_state, const YYLTYPE *loc, const YYLTYPE *keyword_loc, const YYLTYPE *closing_loc);
1134static rb_node_until_t *rb_node_until_new(struct parser_params *p, NODE *nd_cond, NODE *nd_body, long nd_state, const YYLTYPE *loc, const YYLTYPE *keyword_loc, const YYLTYPE *closing_loc);
1135static rb_node_iter_t *rb_node_iter_new(struct parser_params *p, rb_node_args_t *nd_args, NODE *nd_body, const YYLTYPE *loc);
1136static rb_node_for_t *rb_node_for_new(struct parser_params *p, NODE *nd_iter, NODE *nd_body, const YYLTYPE *loc, const YYLTYPE *for_keyword_loc, const YYLTYPE *in_keyword_loc, const YYLTYPE *do_keyword_loc, const YYLTYPE *end_keyword_loc);
1137static rb_node_for_masgn_t *rb_node_for_masgn_new(struct parser_params *p, NODE *nd_var, const YYLTYPE *loc);
1138static rb_node_retry_t *rb_node_retry_new(struct parser_params *p, const YYLTYPE *loc);
1139static rb_node_begin_t *rb_node_begin_new(struct parser_params *p, NODE *nd_body, const YYLTYPE *loc);
1140static rb_node_rescue_t *rb_node_rescue_new(struct parser_params *p, NODE *nd_head, NODE *nd_resq, NODE *nd_else, const YYLTYPE *loc);
1141static rb_node_resbody_t *rb_node_resbody_new(struct parser_params *p, NODE *nd_args, NODE *nd_exc_var, NODE *nd_body, NODE *nd_next, const YYLTYPE *loc);
1142static rb_node_ensure_t *rb_node_ensure_new(struct parser_params *p, NODE *nd_head, NODE *nd_ensr, const YYLTYPE *loc);
1143static rb_node_and_t *rb_node_and_new(struct parser_params *p, NODE *nd_1st, NODE *nd_2nd, const YYLTYPE *loc, const YYLTYPE *operator_loc);
1144static rb_node_or_t *rb_node_or_new(struct parser_params *p, NODE *nd_1st, NODE *nd_2nd, const YYLTYPE *loc, const YYLTYPE *operator_loc);
1145static rb_node_masgn_t *rb_node_masgn_new(struct parser_params *p, NODE *nd_head, NODE *nd_args, const YYLTYPE *loc);
1146static rb_node_lasgn_t *rb_node_lasgn_new(struct parser_params *p, ID nd_vid, NODE *nd_value, const YYLTYPE *loc);
1147static rb_node_dasgn_t *rb_node_dasgn_new(struct parser_params *p, ID nd_vid, NODE *nd_value, const YYLTYPE *loc);
1148static rb_node_gasgn_t *rb_node_gasgn_new(struct parser_params *p, ID nd_vid, NODE *nd_value, const YYLTYPE *loc);
1149static rb_node_iasgn_t *rb_node_iasgn_new(struct parser_params *p, ID nd_vid, NODE *nd_value, const YYLTYPE *loc);
1150static rb_node_cdecl_t *rb_node_cdecl_new(struct parser_params *p, ID nd_vid, NODE *nd_value, NODE *nd_else, enum rb_parser_shareability shareability, const YYLTYPE *loc);
1151static rb_node_cvasgn_t *rb_node_cvasgn_new(struct parser_params *p, ID nd_vid, NODE *nd_value, const YYLTYPE *loc);
1152static rb_node_op_asgn1_t *rb_node_op_asgn1_new(struct parser_params *p, NODE *nd_recv, ID nd_mid, NODE *index, NODE *rvalue, const YYLTYPE *loc, const YYLTYPE *call_operator_loc, const YYLTYPE *opening_loc, const YYLTYPE *closing_loc, const YYLTYPE *binary_operator_loc);
1153static rb_node_op_asgn2_t *rb_node_op_asgn2_new(struct parser_params *p, NODE *nd_recv, NODE *nd_value, ID nd_vid, ID nd_mid, bool nd_aid, const YYLTYPE *loc, const YYLTYPE *call_operator_loc, const YYLTYPE *message_loc, const YYLTYPE *binary_operator_loc);
1154static rb_node_op_asgn_or_t *rb_node_op_asgn_or_new(struct parser_params *p, NODE *nd_head, NODE *nd_value, const YYLTYPE *loc);
1155static rb_node_op_asgn_and_t *rb_node_op_asgn_and_new(struct parser_params *p, NODE *nd_head, NODE *nd_value, const YYLTYPE *loc);
1156static rb_node_op_cdecl_t *rb_node_op_cdecl_new(struct parser_params *p, NODE *nd_head, NODE *nd_value, ID nd_aid, enum rb_parser_shareability shareability, const YYLTYPE *loc);
1157static rb_node_call_t *rb_node_call_new(struct parser_params *p, NODE *nd_recv, ID nd_mid, NODE *nd_args, const YYLTYPE *loc);
1158static rb_node_opcall_t *rb_node_opcall_new(struct parser_params *p, NODE *nd_recv, ID nd_mid, NODE *nd_args, const YYLTYPE *loc);
1159static rb_node_fcall_t *rb_node_fcall_new(struct parser_params *p, ID nd_mid, NODE *nd_args, const YYLTYPE *loc);
1160static rb_node_vcall_t *rb_node_vcall_new(struct parser_params *p, ID nd_mid, const YYLTYPE *loc);
1161static rb_node_qcall_t *rb_node_qcall_new(struct parser_params *p, NODE *nd_recv, ID nd_mid, NODE *nd_args, const YYLTYPE *loc);
1162static rb_node_super_t *rb_node_super_new(struct parser_params *p, NODE *nd_args, const YYLTYPE *loc, const YYLTYPE *keyword_loc, const YYLTYPE *lparen_loc, const YYLTYPE *rparen_loc);
1163static rb_node_zsuper_t * rb_node_zsuper_new(struct parser_params *p, const YYLTYPE *loc);
1164static rb_node_list_t *rb_node_list_new(struct parser_params *p, NODE *nd_head, const YYLTYPE *loc);
1165static rb_node_list_t *rb_node_list_new2(struct parser_params *p, NODE *nd_head, long nd_alen, NODE *nd_next, const YYLTYPE *loc);
1166static rb_node_zlist_t *rb_node_zlist_new(struct parser_params *p, const YYLTYPE *loc);
1167static rb_node_hash_t *rb_node_hash_new(struct parser_params *p, NODE *nd_head, const YYLTYPE *loc);
1168static rb_node_return_t *rb_node_return_new(struct parser_params *p, NODE *nd_stts, const YYLTYPE *loc, const YYLTYPE *keyword_loc);
1169static rb_node_yield_t *rb_node_yield_new(struct parser_params *p, NODE *nd_head, const YYLTYPE *loc, const YYLTYPE *keyword_loc, const YYLTYPE *lparen_loc, const YYLTYPE *rparen_loc);
1170static rb_node_lvar_t *rb_node_lvar_new(struct parser_params *p, ID nd_vid, const YYLTYPE *loc);
1171static rb_node_dvar_t *rb_node_dvar_new(struct parser_params *p, ID nd_vid, const YYLTYPE *loc);
1172static rb_node_gvar_t *rb_node_gvar_new(struct parser_params *p, ID nd_vid, const YYLTYPE *loc);
1173static rb_node_ivar_t *rb_node_ivar_new(struct parser_params *p, ID nd_vid, const YYLTYPE *loc);
1174static rb_node_const_t *rb_node_const_new(struct parser_params *p, ID nd_vid, const YYLTYPE *loc);
1175static rb_node_cvar_t *rb_node_cvar_new(struct parser_params *p, ID nd_vid, const YYLTYPE *loc);
1176static rb_node_nth_ref_t *rb_node_nth_ref_new(struct parser_params *p, long nd_nth, const YYLTYPE *loc);
1177static rb_node_back_ref_t *rb_node_back_ref_new(struct parser_params *p, long nd_nth, const YYLTYPE *loc);
1178static rb_node_match2_t *rb_node_match2_new(struct parser_params *p, NODE *nd_recv, NODE *nd_value, const YYLTYPE *loc);
1179static rb_node_match3_t *rb_node_match3_new(struct parser_params *p, NODE *nd_recv, NODE *nd_value, const YYLTYPE *loc);
1180static rb_node_integer_t * rb_node_integer_new(struct parser_params *p, char* val, int base, const YYLTYPE *loc);
1181static rb_node_float_t * rb_node_float_new(struct parser_params *p, char* val, const YYLTYPE *loc);
1182static rb_node_rational_t * rb_node_rational_new(struct parser_params *p, char* val, int base, int seen_point, const YYLTYPE *loc);
1183static rb_node_imaginary_t * rb_node_imaginary_new(struct parser_params *p, char* val, int base, int seen_point, enum rb_numeric_type, const YYLTYPE *loc);
1184static rb_node_str_t *rb_node_str_new(struct parser_params *p, rb_parser_string_t *string, const YYLTYPE *loc);
1185static rb_node_dstr_t *rb_node_dstr_new0(struct parser_params *p, rb_parser_string_t *string, long nd_alen, NODE *nd_next, const YYLTYPE *loc);
1186static rb_node_dstr_t *rb_node_dstr_new(struct parser_params *p, rb_parser_string_t *string, const YYLTYPE *loc);
1187static rb_node_xstr_t *rb_node_xstr_new(struct parser_params *p, rb_parser_string_t *string, const YYLTYPE *loc);
1188static rb_node_dxstr_t *rb_node_dxstr_new(struct parser_params *p, rb_parser_string_t *string, long nd_alen, NODE *nd_next, const YYLTYPE *loc);
1189static rb_node_evstr_t *rb_node_evstr_new(struct parser_params *p, NODE *nd_body, const YYLTYPE *loc, const YYLTYPE *opening_loc, const YYLTYPE *closing_loc);
1190static rb_node_regx_t *rb_node_regx_new(struct parser_params *p, rb_parser_string_t *string, int options, const YYLTYPE *loc, const YYLTYPE *opening_loc, const YYLTYPE *content_loc, const YYLTYPE *closing_loc);
1191static rb_node_once_t *rb_node_once_new(struct parser_params *p, NODE *nd_body, const YYLTYPE *loc);
1192static rb_node_args_t *rb_node_args_new(struct parser_params *p, const YYLTYPE *loc);
1193static rb_node_args_aux_t *rb_node_args_aux_new(struct parser_params *p, ID nd_pid, int nd_plen, const YYLTYPE *loc);
1194static rb_node_opt_arg_t *rb_node_opt_arg_new(struct parser_params *p, NODE *nd_body, const YYLTYPE *loc);
1195static rb_node_kw_arg_t *rb_node_kw_arg_new(struct parser_params *p, NODE *nd_body, const YYLTYPE *loc);
1196static rb_node_postarg_t *rb_node_postarg_new(struct parser_params *p, NODE *nd_1st, NODE *nd_2nd, const YYLTYPE *loc);
1197static rb_node_argscat_t *rb_node_argscat_new(struct parser_params *p, NODE *nd_head, NODE *nd_body, const YYLTYPE *loc);
1198static rb_node_argspush_t *rb_node_argspush_new(struct parser_params *p, NODE *nd_head, NODE *nd_body, const YYLTYPE *loc);
1199static rb_node_splat_t *rb_node_splat_new(struct parser_params *p, NODE *nd_head, const YYLTYPE *loc, const YYLTYPE *operator_loc);
1200static rb_node_block_pass_t *rb_node_block_pass_new(struct parser_params *p, NODE *nd_body, const YYLTYPE *loc, const YYLTYPE *operator_loc);
1201static rb_node_defn_t *rb_node_defn_new(struct parser_params *p, ID nd_mid, NODE *nd_defn, const YYLTYPE *loc);
1202static rb_node_defs_t *rb_node_defs_new(struct parser_params *p, NODE *nd_recv, ID nd_mid, NODE *nd_defn, const YYLTYPE *loc);
1203static rb_node_alias_t *rb_node_alias_new(struct parser_params *p, NODE *nd_1st, NODE *nd_2nd, const YYLTYPE *loc, const YYLTYPE *keyword_loc);
1204static rb_node_valias_t *rb_node_valias_new(struct parser_params *p, ID nd_alias, ID nd_orig, const YYLTYPE *loc, const YYLTYPE *keyword_loc);
1205static rb_node_undef_t *rb_node_undef_new(struct parser_params *p, NODE *nd_undef, const YYLTYPE *loc);
1206static rb_node_class_t *rb_node_class_new(struct parser_params *p, NODE *nd_cpath, NODE *nd_body, NODE *nd_super, const YYLTYPE *loc, const YYLTYPE *class_keyword_loc, const YYLTYPE *inheritance_operator_loc, const YYLTYPE *end_keyword_loc);
1207static rb_node_module_t *rb_node_module_new(struct parser_params *p, NODE *nd_cpath, NODE *nd_body, const YYLTYPE *loc, const YYLTYPE *module_keyword_loc, const YYLTYPE *end_keyword_loc);
1208static rb_node_sclass_t *rb_node_sclass_new(struct parser_params *p, NODE *nd_recv, NODE *nd_body, const YYLTYPE *loc, const YYLTYPE *class_keyword_loc, const YYLTYPE *operator_loc, const YYLTYPE *end_keyword_loc);
1209static rb_node_colon2_t *rb_node_colon2_new(struct parser_params *p, NODE *nd_head, ID nd_mid, const YYLTYPE *loc, const YYLTYPE *delimiter_loc, const YYLTYPE *name_loc);
1210static rb_node_colon3_t *rb_node_colon3_new(struct parser_params *p, ID nd_mid, const YYLTYPE *loc, const YYLTYPE *delimiter_loc, const YYLTYPE *name_loc);
1211static rb_node_dot2_t *rb_node_dot2_new(struct parser_params *p, NODE *nd_beg, NODE *nd_end, const YYLTYPE *loc, const YYLTYPE *operator_loc);
1212static rb_node_dot3_t *rb_node_dot3_new(struct parser_params *p, NODE *nd_beg, NODE *nd_end, const YYLTYPE *loc, const YYLTYPE *operator_loc);
1213static rb_node_self_t *rb_node_self_new(struct parser_params *p, const YYLTYPE *loc);
1214static rb_node_nil_t *rb_node_nil_new(struct parser_params *p, const YYLTYPE *loc);
1215static rb_node_true_t *rb_node_true_new(struct parser_params *p, const YYLTYPE *loc);
1216static rb_node_false_t *rb_node_false_new(struct parser_params *p, const YYLTYPE *loc);
1217static rb_node_errinfo_t *rb_node_errinfo_new(struct parser_params *p, const YYLTYPE *loc);
1218static rb_node_defined_t *rb_node_defined_new(struct parser_params *p, NODE *nd_head, const YYLTYPE *loc, const YYLTYPE *keyword_loc);
1219static rb_node_postexe_t *rb_node_postexe_new(struct parser_params *p, NODE *nd_body, const YYLTYPE *loc, const YYLTYPE *keyword_loc, const YYLTYPE *opening_loc, const YYLTYPE *closing_loc);
1220static rb_node_sym_t *rb_node_sym_new(struct parser_params *p, VALUE str, const YYLTYPE *loc);
1221static rb_node_dsym_t *rb_node_dsym_new(struct parser_params *p, rb_parser_string_t *string, long nd_alen, NODE *nd_next, const YYLTYPE *loc);
1222static rb_node_attrasgn_t *rb_node_attrasgn_new(struct parser_params *p, NODE *nd_recv, ID nd_mid, NODE *nd_args, const YYLTYPE *loc);
1223static rb_node_lambda_t *rb_node_lambda_new(struct parser_params *p, rb_node_args_t *nd_args, NODE *nd_body, const YYLTYPE *loc, const YYLTYPE *operator_loc, const YYLTYPE *opening_loc, const YYLTYPE *closing_loc);
1224static rb_node_aryptn_t *rb_node_aryptn_new(struct parser_params *p, NODE *pre_args, NODE *rest_arg, NODE *post_args, const YYLTYPE *loc);
1225static rb_node_hshptn_t *rb_node_hshptn_new(struct parser_params *p, NODE *nd_pconst, NODE *nd_pkwargs, NODE *nd_pkwrestarg, const YYLTYPE *loc);
1226static rb_node_fndptn_t *rb_node_fndptn_new(struct parser_params *p, NODE *pre_rest_arg, NODE *args, NODE *post_rest_arg, const YYLTYPE *loc);
1227static rb_node_line_t *rb_node_line_new(struct parser_params *p, const YYLTYPE *loc);
1228static rb_node_file_t *rb_node_file_new(struct parser_params *p, VALUE str, const YYLTYPE *loc);
1229static rb_node_error_t *rb_node_error_new(struct parser_params *p, const YYLTYPE *loc);
1230
1231#define NEW_SCOPE(a,b,c,loc) (NODE *)rb_node_scope_new(p,a,b,c,loc)
1232#define NEW_SCOPE2(t,a,b,c,loc) (NODE *)rb_node_scope_new2(p,t,a,b,c,loc)
1233#define NEW_BLOCK(a,loc) (NODE *)rb_node_block_new(p,a,loc)
1234#define NEW_IF(c,t,e,loc,ik_loc,tk_loc,ek_loc) (NODE *)rb_node_if_new(p,c,t,e,loc,ik_loc,tk_loc,ek_loc)
1235#define NEW_UNLESS(c,t,e,loc,k_loc,t_loc,e_loc) (NODE *)rb_node_unless_new(p,c,t,e,loc,k_loc,t_loc,e_loc)
1236#define NEW_CASE(h,b,loc,ck_loc,ek_loc) (NODE *)rb_node_case_new(p,h,b,loc,ck_loc,ek_loc)
1237#define NEW_CASE2(b,loc,ck_loc,ek_loc) (NODE *)rb_node_case2_new(p,b,loc,ck_loc,ek_loc)
1238#define NEW_CASE3(h,b,loc,ck_loc,ek_loc) (NODE *)rb_node_case3_new(p,h,b,loc,ck_loc,ek_loc)
1239#define NEW_WHEN(c,t,e,loc,k_loc,t_loc) (NODE *)rb_node_when_new(p,c,t,e,loc,k_loc,t_loc)
1240#define NEW_IN(c,t,e,loc,ik_loc,tk_loc,o_loc) (NODE *)rb_node_in_new(p,c,t,e,loc,ik_loc,tk_loc,o_loc)
1241#define NEW_WHILE(c,b,n,loc,k_loc,c_loc) (NODE *)rb_node_while_new(p,c,b,n,loc,k_loc,c_loc)
1242#define NEW_UNTIL(c,b,n,loc,k_loc,c_loc) (NODE *)rb_node_until_new(p,c,b,n,loc,k_loc,c_loc)
1243#define NEW_ITER(a,b,loc) (NODE *)rb_node_iter_new(p,a,b,loc)
1244#define NEW_FOR(i,b,loc,f_loc,i_loc,d_loc,e_loc) (NODE *)rb_node_for_new(p,i,b,loc,f_loc,i_loc,d_loc,e_loc)
1245#define NEW_FOR_MASGN(v,loc) (NODE *)rb_node_for_masgn_new(p,v,loc)
1246#define NEW_RETRY(loc) (NODE *)rb_node_retry_new(p,loc)
1247#define NEW_BEGIN(b,loc) (NODE *)rb_node_begin_new(p,b,loc)
1248#define NEW_RESCUE(b,res,e,loc) (NODE *)rb_node_rescue_new(p,b,res,e,loc)
1249#define NEW_RESBODY(a,v,ex,n,loc) (NODE *)rb_node_resbody_new(p,a,v,ex,n,loc)
1250#define NEW_ENSURE(b,en,loc) (NODE *)rb_node_ensure_new(p,b,en,loc)
1251#define NEW_AND(f,s,loc,op_loc) (NODE *)rb_node_and_new(p,f,s,loc,op_loc)
1252#define NEW_OR(f,s,loc,op_loc) (NODE *)rb_node_or_new(p,f,s,loc,op_loc)
1253#define NEW_MASGN(l,r,loc) rb_node_masgn_new(p,l,r,loc)
1254#define NEW_LASGN(v,val,loc) (NODE *)rb_node_lasgn_new(p,v,val,loc)
1255#define NEW_DASGN(v,val,loc) (NODE *)rb_node_dasgn_new(p,v,val,loc)
1256#define NEW_GASGN(v,val,loc) (NODE *)rb_node_gasgn_new(p,v,val,loc)
1257#define NEW_IASGN(v,val,loc) (NODE *)rb_node_iasgn_new(p,v,val,loc)
1258#define NEW_CDECL(v,val,path,share,loc) (NODE *)rb_node_cdecl_new(p,v,val,path,share,loc)
1259#define NEW_CVASGN(v,val,loc) (NODE *)rb_node_cvasgn_new(p,v,val,loc)
1260#define NEW_OP_ASGN1(r,id,idx,rval,loc,c_op_loc,o_loc,c_loc,b_op_loc) (NODE *)rb_node_op_asgn1_new(p,r,id,idx,rval,loc,c_op_loc,o_loc,c_loc,b_op_loc)
1261#define NEW_OP_ASGN2(r,t,i,o,val,loc,c_op_loc,m_loc,b_op_loc) (NODE *)rb_node_op_asgn2_new(p,r,val,i,o,t,loc,c_op_loc,m_loc,b_op_loc)
1262#define NEW_OP_ASGN_OR(i,val,loc) (NODE *)rb_node_op_asgn_or_new(p,i,val,loc)
1263#define NEW_OP_ASGN_AND(i,val,loc) (NODE *)rb_node_op_asgn_and_new(p,i,val,loc)
1264#define NEW_OP_CDECL(v,op,val,share,loc) (NODE *)rb_node_op_cdecl_new(p,v,val,op,share,loc)
1265#define NEW_CALL(r,m,a,loc) (NODE *)rb_node_call_new(p,r,m,a,loc)
1266#define NEW_OPCALL(r,m,a,loc) (NODE *)rb_node_opcall_new(p,r,m,a,loc)
1267#define NEW_FCALL(m,a,loc) rb_node_fcall_new(p,m,a,loc)
1268#define NEW_VCALL(m,loc) (NODE *)rb_node_vcall_new(p,m,loc)
1269#define NEW_QCALL0(r,m,a,loc) (NODE *)rb_node_qcall_new(p,r,m,a,loc)
1270#define NEW_SUPER(a,loc,k_loc,l_loc,r_loc) (NODE *)rb_node_super_new(p,a,loc,k_loc,l_loc,r_loc)
1271#define NEW_ZSUPER(loc) (NODE *)rb_node_zsuper_new(p,loc)
1272#define NEW_LIST(a,loc) (NODE *)rb_node_list_new(p,a,loc)
1273#define NEW_LIST2(h,l,n,loc) (NODE *)rb_node_list_new2(p,h,l,n,loc)
1274#define NEW_ZLIST(loc) (NODE *)rb_node_zlist_new(p,loc)
1275#define NEW_HASH(a,loc) (NODE *)rb_node_hash_new(p,a,loc)
1276#define NEW_RETURN(s,loc,k_loc) (NODE *)rb_node_return_new(p,s,loc,k_loc)
1277#define NEW_YIELD(a,loc,k_loc,l_loc,r_loc) (NODE *)rb_node_yield_new(p,a,loc,k_loc,l_loc,r_loc)
1278#define NEW_LVAR(v,loc) (NODE *)rb_node_lvar_new(p,v,loc)
1279#define NEW_DVAR(v,loc) (NODE *)rb_node_dvar_new(p,v,loc)
1280#define NEW_GVAR(v,loc) (NODE *)rb_node_gvar_new(p,v,loc)
1281#define NEW_IVAR(v,loc) (NODE *)rb_node_ivar_new(p,v,loc)
1282#define NEW_CONST(v,loc) (NODE *)rb_node_const_new(p,v,loc)
1283#define NEW_CVAR(v,loc) (NODE *)rb_node_cvar_new(p,v,loc)
1284#define NEW_NTH_REF(n,loc) (NODE *)rb_node_nth_ref_new(p,n,loc)
1285#define NEW_BACK_REF(n,loc) (NODE *)rb_node_back_ref_new(p,n,loc)
1286#define NEW_MATCH2(n1,n2,loc) (NODE *)rb_node_match2_new(p,n1,n2,loc)
1287#define NEW_MATCH3(r,n2,loc) (NODE *)rb_node_match3_new(p,r,n2,loc)
1288#define NEW_INTEGER(val, base,loc) (NODE *)rb_node_integer_new(p,val,base,loc)
1289#define NEW_FLOAT(val,loc) (NODE *)rb_node_float_new(p,val,loc)
1290#define NEW_RATIONAL(val,base,seen_point,loc) (NODE *)rb_node_rational_new(p,val,base,seen_point,loc)
1291#define NEW_IMAGINARY(val,base,seen_point,numeric_type,loc) (NODE *)rb_node_imaginary_new(p,val,base,seen_point,numeric_type,loc)
1292#define NEW_STR(s,loc) (NODE *)rb_node_str_new(p,s,loc)
1293#define NEW_DSTR0(s,l,n,loc) (NODE *)rb_node_dstr_new0(p,s,l,n,loc)
1294#define NEW_DSTR(s,loc) (NODE *)rb_node_dstr_new(p,s,loc)
1295#define NEW_XSTR(s,loc) (NODE *)rb_node_xstr_new(p,s,loc)
1296#define NEW_DXSTR(s,l,n,loc) (NODE *)rb_node_dxstr_new(p,s,l,n,loc)
1297#define NEW_EVSTR(n,loc,o_loc,c_loc) (NODE *)rb_node_evstr_new(p,n,loc,o_loc,c_loc)
1298#define NEW_REGX(str,opts,loc,o_loc,ct_loc,c_loc) (NODE *)rb_node_regx_new(p,str,opts,loc,o_loc,ct_loc,c_loc)
1299#define NEW_ONCE(b,loc) (NODE *)rb_node_once_new(p,b,loc)
1300#define NEW_ARGS(loc) rb_node_args_new(p,loc)
1301#define NEW_ARGS_AUX(r,b,loc) rb_node_args_aux_new(p,r,b,loc)
1302#define NEW_OPT_ARG(v,loc) rb_node_opt_arg_new(p,v,loc)
1303#define NEW_KW_ARG(v,loc) rb_node_kw_arg_new(p,v,loc)
1304#define NEW_POSTARG(i,v,loc) (NODE *)rb_node_postarg_new(p,i,v,loc)
1305#define NEW_ARGSCAT(a,b,loc) (NODE *)rb_node_argscat_new(p,a,b,loc)
1306#define NEW_ARGSPUSH(a,b,loc) (NODE *)rb_node_argspush_new(p,a,b,loc)
1307#define NEW_SPLAT(a,loc,op_loc) (NODE *)rb_node_splat_new(p,a,loc,op_loc)
1308#define NEW_BLOCK_PASS(b,loc,o_loc) rb_node_block_pass_new(p,b,loc,o_loc)
1309#define NEW_DEFN(i,s,loc) (NODE *)rb_node_defn_new(p,i,s,loc)
1310#define NEW_DEFS(r,i,s,loc) (NODE *)rb_node_defs_new(p,r,i,s,loc)
1311#define NEW_ALIAS(n,o,loc,k_loc) (NODE *)rb_node_alias_new(p,n,o,loc,k_loc)
1312#define NEW_VALIAS(n,o,loc,k_loc) (NODE *)rb_node_valias_new(p,n,o,loc,k_loc)
1313#define NEW_UNDEF(i,loc) (NODE *)rb_node_undef_new(p,i,loc)
1314#define NEW_CLASS(n,b,s,loc,ck_loc,io_loc,ek_loc) (NODE *)rb_node_class_new(p,n,b,s,loc,ck_loc,io_loc,ek_loc)
1315#define NEW_MODULE(n,b,loc,mk_loc,ek_loc) (NODE *)rb_node_module_new(p,n,b,loc,mk_loc,ek_loc)
1316#define NEW_SCLASS(r,b,loc,ck_loc,op_loc,ek_loc) (NODE *)rb_node_sclass_new(p,r,b,loc,ck_loc,op_loc,ek_loc)
1317#define NEW_COLON2(c,i,loc,d_loc,n_loc) (NODE *)rb_node_colon2_new(p,c,i,loc,d_loc,n_loc)
1318#define NEW_COLON3(i,loc,d_loc,n_loc) (NODE *)rb_node_colon3_new(p,i,loc,d_loc,n_loc)
1319#define NEW_DOT2(b,e,loc,op_loc) (NODE *)rb_node_dot2_new(p,b,e,loc,op_loc)
1320#define NEW_DOT3(b,e,loc,op_loc) (NODE *)rb_node_dot3_new(p,b,e,loc,op_loc)
1321#define NEW_SELF(loc) (NODE *)rb_node_self_new(p,loc)
1322#define NEW_NIL(loc) (NODE *)rb_node_nil_new(p,loc)
1323#define NEW_TRUE(loc) (NODE *)rb_node_true_new(p,loc)
1324#define NEW_FALSE(loc) (NODE *)rb_node_false_new(p,loc)
1325#define NEW_ERRINFO(loc) (NODE *)rb_node_errinfo_new(p,loc)
1326#define NEW_DEFINED(e,loc,k_loc) (NODE *)rb_node_defined_new(p,e,loc, k_loc)
1327#define NEW_POSTEXE(b,loc,k_loc,o_loc,c_loc) (NODE *)rb_node_postexe_new(p,b,loc,k_loc,o_loc,c_loc)
1328#define NEW_SYM(str,loc) (NODE *)rb_node_sym_new(p,str,loc)
1329#define NEW_DSYM(s,l,n,loc) (NODE *)rb_node_dsym_new(p,s,l,n,loc)
1330#define NEW_ATTRASGN(r,m,a,loc) (NODE *)rb_node_attrasgn_new(p,r,m,a,loc)
1331#define NEW_LAMBDA(a,b,loc,op_loc,o_loc,c_loc) (NODE *)rb_node_lambda_new(p,a,b,loc,op_loc,o_loc,c_loc)
1332#define NEW_ARYPTN(pre,r,post,loc) (NODE *)rb_node_aryptn_new(p,pre,r,post,loc)
1333#define NEW_HSHPTN(c,kw,kwrest,loc) (NODE *)rb_node_hshptn_new(p,c,kw,kwrest,loc)
1334#define NEW_FNDPTN(pre,a,post,loc) (NODE *)rb_node_fndptn_new(p,pre,a,post,loc)
1335#define NEW_LINE(loc) (NODE *)rb_node_line_new(p,loc)
1336#define NEW_FILE(str,loc) (NODE *)rb_node_file_new(p,str,loc)
1337#define NEW_ENCODING(loc) (NODE *)rb_node_encoding_new(p,loc)
1338#define NEW_ERROR(loc) (NODE *)rb_node_error_new(p,loc)
1339
1340enum internal_node_type {
1341 NODE_INTERNAL_ONLY = NODE_LAST,
1342 NODE_DEF_TEMP,
1343 NODE_EXITS,
1344 NODE_INTERNAL_LAST
1345};
1346
1347static const char *
1348parser_node_name(int node)
1349{
1350 switch (node) {
1351 case NODE_DEF_TEMP:
1352 return "NODE_DEF_TEMP";
1353 case NODE_EXITS:
1354 return "NODE_EXITS";
1355 default:
1356 return ruby_node_name(node);
1357 }
1358}
1359
1360/* This node is parse.y internal */
1361struct RNode_DEF_TEMP {
1362 NODE node;
1363
1364 /* for NODE_DEFN/NODE_DEFS */
1365
1366 struct RNode *nd_def;
1367 ID nd_mid;
1368
1369 struct {
1370 int max_numparam;
1371 NODE *numparam_save;
1372 struct lex_context ctxt;
1373 } save;
1374};
1375
1376#define RNODE_DEF_TEMP(node) ((struct RNode_DEF_TEMP *)(node))
1377
1378static rb_node_break_t *rb_node_break_new(struct parser_params *p, NODE *nd_stts, const YYLTYPE *loc, const YYLTYPE *keyword_loc);
1379static rb_node_next_t *rb_node_next_new(struct parser_params *p, NODE *nd_stts, const YYLTYPE *loc, const YYLTYPE *keyword_loc);
1380static rb_node_redo_t *rb_node_redo_new(struct parser_params *p, const YYLTYPE *loc, const YYLTYPE *keyword_loc);
1381static rb_node_def_temp_t *rb_node_def_temp_new(struct parser_params *p, const YYLTYPE *loc);
1382static rb_node_def_temp_t *def_head_save(struct parser_params *p, rb_node_def_temp_t *n);
1383
1384#define NEW_BREAK(s,loc,k_loc) (NODE *)rb_node_break_new(p,s,loc,k_loc)
1385#define NEW_NEXT(s,loc,k_loc) (NODE *)rb_node_next_new(p,s,loc,k_loc)
1386#define NEW_REDO(loc,k_loc) (NODE *)rb_node_redo_new(p,loc,k_loc)
1387#define NEW_DEF_TEMP(loc) rb_node_def_temp_new(p,loc)
1388
1389/* Make a new internal node, which should not be appeared in the
1390 * result AST and does not have node_id and location. */
1391static NODE* node_new_internal(struct parser_params *p, enum node_type type, size_t size, size_t alignment);
1392#define NODE_NEW_INTERNAL(ndtype, type) (type *)node_new_internal(p, (enum node_type)(ndtype), sizeof(type), RUBY_ALIGNOF(type))
1393
1394static NODE *nd_set_loc(NODE *nd, const YYLTYPE *loc);
1395
1396static int
1397parser_get_node_id(struct parser_params *p)
1398{
1399 int node_id = p->node_id;
1400 p->node_id++;
1401 return node_id;
1402}
1403
1404static void
1405anddot_multiple_assignment_check(struct parser_params* p, const YYLTYPE *loc, ID id)
1406{
1407 if (id == tANDDOT) {
1408 yyerror1(loc, "&. inside multiple assignment destination");
1409 }
1410}
1411
1412static inline void
1413set_line_body(NODE *body, int line)
1414{
1415 if (!body) return;
1416 switch (nd_type(body)) {
1417 case NODE_RESCUE:
1418 case NODE_ENSURE:
1419 nd_set_line(body, line);
1420 }
1421}
1422
1423static void
1424set_embraced_location(NODE *node, const rb_code_location_t *beg, const rb_code_location_t *end)
1425{
1426 RNODE_ITER(node)->nd_body->nd_loc = code_loc_gen(beg, end);
1427 nd_set_line(node, beg->end_pos.lineno);
1428}
1429
1430static NODE *
1431last_expr_node(NODE *expr)
1432{
1433 while (expr) {
1434 if (nd_type_p(expr, NODE_BLOCK)) {
1435 expr = RNODE_BLOCK(RNODE_BLOCK(expr)->nd_end)->nd_head;
1436 }
1437 else if (nd_type_p(expr, NODE_BEGIN) && RNODE_BEGIN(expr)->nd_body) {
1438 expr = RNODE_BEGIN(expr)->nd_body;
1439 }
1440 else {
1441 break;
1442 }
1443 }
1444 return expr;
1445}
1446
1447#ifndef RIPPER
1448#define yyparse ruby_yyparse
1449#endif
1450
1451static NODE* cond(struct parser_params *p, NODE *node, const YYLTYPE *loc);
1452static NODE* method_cond(struct parser_params *p, NODE *node, const YYLTYPE *loc);
1453static NODE *new_nil_at(struct parser_params *p, const rb_code_position_t *pos);
1454static NODE *new_if(struct parser_params*,NODE*,NODE*,NODE*,const YYLTYPE*,const YYLTYPE*,const YYLTYPE*,const YYLTYPE*);
1455static NODE *new_unless(struct parser_params*,NODE*,NODE*,NODE*,const YYLTYPE*,const YYLTYPE*,const YYLTYPE*,const YYLTYPE*);
1456static NODE *logop(struct parser_params*,ID,NODE*,NODE*,const YYLTYPE*,const YYLTYPE*);
1457
1458static NODE *newline_node(NODE*);
1459static void fixpos(NODE*,NODE*);
1460
1461static int value_expr(struct parser_params*,NODE*);
1462static void void_expr(struct parser_params*,NODE*);
1463static NODE *remove_begin(NODE*);
1464static NODE *void_stmts(struct parser_params*,NODE*);
1465static void reduce_nodes(struct parser_params*,NODE**);
1466static void block_dup_check(struct parser_params*,NODE*,NODE*);
1467
1468static NODE *block_append(struct parser_params*,NODE*,NODE*);
1469static NODE *list_append(struct parser_params*,NODE*,NODE*);
1470static NODE *list_concat(NODE*,NODE*);
1471static NODE *arg_append(struct parser_params*,NODE*,NODE*,const YYLTYPE*);
1472static NODE *last_arg_append(struct parser_params *p, NODE *args, NODE *last_arg, const YYLTYPE *loc);
1473static NODE *rest_arg_append(struct parser_params *p, NODE *args, NODE *rest_arg, const YYLTYPE *loc);
1474static NODE *literal_concat(struct parser_params*,NODE*,NODE*,const YYLTYPE*);
1475static NODE *new_evstr(struct parser_params*,NODE*,const YYLTYPE*,const YYLTYPE*,const YYLTYPE*);
1476static NODE *new_dstr(struct parser_params*,NODE*,const YYLTYPE*);
1477static NODE *str2dstr(struct parser_params*,NODE*);
1478static NODE *evstr2dstr(struct parser_params*,NODE*);
1479static NODE *splat_array(NODE*);
1480static void mark_lvar_used(struct parser_params *p, NODE *rhs);
1481
1482static NODE *call_bin_op(struct parser_params*,NODE*,ID,NODE*,const YYLTYPE*,const YYLTYPE*);
1483static NODE *call_uni_op(struct parser_params*,NODE*,ID,const YYLTYPE*,const YYLTYPE*);
1484static NODE *new_qcall(struct parser_params* p, ID atype, NODE *recv, ID mid, NODE *args, const YYLTYPE *op_loc, const YYLTYPE *loc);
1485static NODE *new_command_qcall(struct parser_params* p, ID atype, NODE *recv, ID mid, NODE *args, NODE *block, const YYLTYPE *op_loc, const YYLTYPE *loc);
1486static NODE *method_add_block(struct parser_params*p, NODE *m, NODE *b, const YYLTYPE *loc) {RNODE_ITER(b)->nd_iter = m; b->nd_loc = *loc; return b;}
1487
1488static bool args_info_empty_p(struct rb_args_info *args);
1489static rb_node_args_t *new_args(struct parser_params*,rb_node_args_aux_t*,rb_node_opt_arg_t*,ID,rb_node_args_aux_t*,rb_node_args_t*,const YYLTYPE*);
1490static rb_node_args_t *new_args_tail(struct parser_params*,rb_node_kw_arg_t*,ID,ID,const YYLTYPE*);
1491#define new_empty_args_tail(p, loc) new_args_tail(p, 0, 0, 0, loc)
1492static NODE *new_array_pattern(struct parser_params *p, NODE *constant, NODE *pre_arg, NODE *aryptn, const YYLTYPE *loc);
1493static NODE *new_array_pattern_tail(struct parser_params *p, NODE *pre_args, int has_rest, NODE *rest_arg, NODE *post_args, const YYLTYPE *loc);
1494static NODE *new_find_pattern(struct parser_params *p, NODE *constant, NODE *fndptn, const YYLTYPE *loc);
1495static NODE *new_find_pattern_tail(struct parser_params *p, NODE *pre_rest_arg, NODE *args, NODE *post_rest_arg, const YYLTYPE *loc);
1496static NODE *new_hash_pattern(struct parser_params *p, NODE *constant, NODE *hshptn, const YYLTYPE *loc);
1497static NODE *new_hash_pattern_tail(struct parser_params *p, NODE *kw_args, ID kw_rest_arg, const YYLTYPE *loc);
1498
1499static rb_node_kw_arg_t *new_kw_arg(struct parser_params *p, NODE *k, const YYLTYPE *loc);
1500static rb_node_args_t *args_with_numbered(struct parser_params*,rb_node_args_t*,int,ID);
1501
1502static NODE* negate_lit(struct parser_params*, NODE*,const YYLTYPE*);
1503static void no_blockarg(struct parser_params*,NODE*);
1504static NODE *ret_args(struct parser_params*,NODE*);
1505static NODE *arg_blk_pass(NODE*,rb_node_block_pass_t*);
1506static NODE *dsym_node(struct parser_params*,NODE*,const YYLTYPE*);
1507
1508static NODE *gettable(struct parser_params*,ID,const YYLTYPE*);
1509static NODE *assignable(struct parser_params*,ID,NODE*,const YYLTYPE*);
1510
1511static NODE *aryset(struct parser_params*,NODE*,NODE*,const YYLTYPE*);
1512static NODE *attrset(struct parser_params*,NODE*,ID,ID,const YYLTYPE*);
1513
1514static VALUE rb_backref_error(struct parser_params*,NODE*);
1515static NODE *node_assign(struct parser_params*,NODE*,NODE*,struct lex_context,const YYLTYPE*);
1516
1517static NODE *new_op_assign(struct parser_params *p, NODE *lhs, ID op, NODE *rhs, struct lex_context, const YYLTYPE *loc);
1518static 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);
1519static 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);
1520static NODE *new_const_op_assign(struct parser_params *p, NODE *lhs, ID op, NODE *rhs, struct lex_context, const YYLTYPE *loc);
1521static NODE *new_bodystmt(struct parser_params *p, NODE *head, NODE *rescue, NODE *rescue_else, NODE *ensure, const YYLTYPE *loc);
1522
1523static NODE *const_decl(struct parser_params *p, NODE* path, const YYLTYPE *loc);
1524
1525static rb_node_opt_arg_t *opt_arg_append(rb_node_opt_arg_t*, rb_node_opt_arg_t*);
1526static rb_node_kw_arg_t *kwd_append(rb_node_kw_arg_t*, rb_node_kw_arg_t*);
1527
1528static NODE *new_hash(struct parser_params *p, NODE *hash, const YYLTYPE *loc);
1529static NODE *new_unique_key_hash(struct parser_params *p, NODE *hash, const YYLTYPE *loc);
1530
1531static NODE *new_defined(struct parser_params *p, NODE *expr, const YYLTYPE *loc, const YYLTYPE *keyword_loc);
1532
1533static NODE *new_regexp(struct parser_params *, NODE *, int, const YYLTYPE *, const YYLTYPE *, const YYLTYPE *, const YYLTYPE *);
1534
1535#define make_list(list, loc) ((list) ? (nd_set_loc(list, loc), list) : NEW_ZLIST(loc))
1536
1537static NODE *new_xstring(struct parser_params *, NODE *, const YYLTYPE *loc);
1538
1539static NODE *symbol_append(struct parser_params *p, NODE *symbols, NODE *symbol);
1540
1541static NODE *match_op(struct parser_params*,NODE*,NODE*,const YYLTYPE*,const YYLTYPE*);
1542
1543static rb_ast_id_table_t *local_tbl(struct parser_params*);
1544
1545static VALUE reg_compile(struct parser_params*, rb_parser_string_t*, int);
1546static void reg_fragment_setenc(struct parser_params*, rb_parser_string_t*, int);
1547
1548static int literal_concat0(struct parser_params *p, rb_parser_string_t *head, rb_parser_string_t *tail);
1549static NODE *heredoc_dedent(struct parser_params*,NODE*);
1550
1551static void check_literal_when(struct parser_params *p, NODE *args, const YYLTYPE *loc);
1552
1553static 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);
1554
1555#ifdef RIPPER
1556#define get_value(idx) (rb_ary_entry(p->s_value_stack, idx))
1557#define set_value(val) (p->s_lvalue = val)
1558static VALUE assign_error(struct parser_params *p, const char *mesg, VALUE a);
1559static int id_is_var(struct parser_params *p, ID id);
1560#endif
1561
1562RUBY_SYMBOL_EXPORT_BEGIN
1563VALUE rb_parser_reg_compile(struct parser_params* p, VALUE str, int options);
1564int rb_reg_fragment_setenc(struct parser_params*, rb_parser_string_t *, int);
1565enum lex_state_e rb_parser_trace_lex_state(struct parser_params *, enum lex_state_e, enum lex_state_e, int);
1566VALUE rb_parser_lex_state_name(struct parser_params *p, enum lex_state_e state);
1567void rb_parser_show_bitstack(struct parser_params *, stack_type, const char *, int);
1568PRINTF_ARGS(void rb_parser_fatal(struct parser_params *p, const char *fmt, ...), 2, 3);
1569YYLTYPE *rb_parser_set_location_from_strterm_heredoc(struct parser_params *p, rb_strterm_heredoc_t *here, YYLTYPE *yylloc);
1570YYLTYPE *rb_parser_set_location_of_delayed_token(struct parser_params *p, YYLTYPE *yylloc);
1571YYLTYPE *rb_parser_set_location_of_heredoc_end(struct parser_params *p, YYLTYPE *yylloc);
1572YYLTYPE *rb_parser_set_location_of_dummy_end(struct parser_params *p, YYLTYPE *yylloc);
1573YYLTYPE *rb_parser_set_location_of_none(struct parser_params *p, YYLTYPE *yylloc);
1574YYLTYPE *rb_parser_set_location(struct parser_params *p, YYLTYPE *yylloc);
1575void ruby_show_error_line(struct parser_params *p, VALUE errbuf, const YYLTYPE *yylloc, int lineno, rb_parser_string_t *str);
1576RUBY_SYMBOL_EXPORT_END
1577
1578static void flush_string_content(struct parser_params *p, rb_encoding *enc, size_t back);
1579static void error_duplicate_pattern_variable(struct parser_params *p, ID id, const YYLTYPE *loc);
1580static void error_duplicate_pattern_key(struct parser_params *p, ID id, const YYLTYPE *loc);
1581static VALUE formal_argument_error(struct parser_params*, ID);
1582static ID shadowing_lvar(struct parser_params*,ID);
1583static void new_bv(struct parser_params*,ID);
1584
1585static void local_push(struct parser_params*,int);
1586static void local_pop(struct parser_params*);
1587static void local_var(struct parser_params*, ID);
1588static void arg_var(struct parser_params*, ID);
1589static int local_id(struct parser_params *p, ID id);
1590static int local_id_ref(struct parser_params*, ID, ID **);
1591#define internal_id rb_parser_internal_id
1592ID internal_id(struct parser_params*);
1593static NODE *new_args_forward_call(struct parser_params*, NODE*, const YYLTYPE*, const YYLTYPE*);
1594static int check_forwarding_args(struct parser_params*);
1595static void add_forwarding_args(struct parser_params *p);
1596static void forwarding_arg_check(struct parser_params *p, ID arg, ID all, const char *var);
1597
1598static const struct vtable *dyna_push(struct parser_params *);
1599static void dyna_pop(struct parser_params*, const struct vtable *);
1600static int dyna_in_block(struct parser_params*);
1601#define dyna_var(p, id) local_var(p, id)
1602static int dvar_defined(struct parser_params*, ID);
1603#define dvar_defined_ref rb_parser_dvar_defined_ref
1604int dvar_defined_ref(struct parser_params*, ID, ID**);
1605static int dvar_curr(struct parser_params*,ID);
1606
1607static int lvar_defined(struct parser_params*, ID);
1608
1609static NODE *numparam_push(struct parser_params *p);
1610static void numparam_pop(struct parser_params *p, NODE *prev_inner);
1611
1612#define METHOD_NOT '!'
1613
1614#define idFWD_REST '*'
1615#define idFWD_KWREST idPow /* Use simple "**", as tDSTAR is "**arg" */
1616#define idFWD_BLOCK '&'
1617#define idFWD_ALL idDot3
1618#define arg_FWD_BLOCK idFWD_BLOCK
1619
1620#define RE_ONIG_OPTION_IGNORECASE 1
1621#define RE_ONIG_OPTION_EXTEND (RE_ONIG_OPTION_IGNORECASE<<1)
1622#define RE_ONIG_OPTION_MULTILINE (RE_ONIG_OPTION_EXTEND<<1)
1623#define RE_OPTION_ONCE (1<<16)
1624#define RE_OPTION_ENCODING_SHIFT 8
1625#define RE_OPTION_ENCODING(e) (((e)&0xff)<<RE_OPTION_ENCODING_SHIFT)
1626#define RE_OPTION_ENCODING_IDX(o) (((o)>>RE_OPTION_ENCODING_SHIFT)&0xff)
1627#define RE_OPTION_ENCODING_NONE(o) ((o)&RE_OPTION_ARG_ENCODING_NONE)
1628#define RE_OPTION_MASK 0xff
1629#define RE_OPTION_ARG_ENCODING_NONE 32
1630
1631#define CHECK_LITERAL_WHEN (st_table *)1
1632#define CASE_LABELS_ENABLED_P(case_labels) (case_labels && case_labels != CHECK_LITERAL_WHEN)
1633
1634#define yytnamerr(yyres, yystr) (YYSIZE_T)rb_yytnamerr(p, yyres, yystr)
1635RUBY_FUNC_EXPORTED size_t rb_yytnamerr(struct parser_params *p, char *yyres, const char *yystr);
1636
1637#define TOKEN2ID(tok) ( \
1638 tTOKEN_LOCAL_BEGIN<(tok)&&(tok)<tTOKEN_LOCAL_END ? TOKEN2LOCALID(tok) : \
1639 tTOKEN_INSTANCE_BEGIN<(tok)&&(tok)<tTOKEN_INSTANCE_END ? TOKEN2INSTANCEID(tok) : \
1640 tTOKEN_GLOBAL_BEGIN<(tok)&&(tok)<tTOKEN_GLOBAL_END ? TOKEN2GLOBALID(tok) : \
1641 tTOKEN_CONST_BEGIN<(tok)&&(tok)<tTOKEN_CONST_END ? TOKEN2CONSTID(tok) : \
1642 tTOKEN_CLASS_BEGIN<(tok)&&(tok)<tTOKEN_CLASS_END ? TOKEN2CLASSID(tok) : \
1643 tTOKEN_ATTRSET_BEGIN<(tok)&&(tok)<tTOKEN_ATTRSET_END ? TOKEN2ATTRSETID(tok) : \
1644 ((tok) / ((tok)<tPRESERVED_ID_END && ((tok)>=128 || rb_ispunct(tok)))))
1645
1646/****** Ripper *******/
1647
1648#ifdef RIPPER
1649
1650#include "eventids1.h"
1651#include "eventids2.h"
1652
1653extern const struct ripper_parser_ids ripper_parser_ids;
1654
1655static VALUE ripper_dispatch0(struct parser_params*,ID);
1656static VALUE ripper_dispatch1(struct parser_params*,ID,VALUE);
1657static VALUE ripper_dispatch2(struct parser_params*,ID,VALUE,VALUE);
1658static VALUE ripper_dispatch3(struct parser_params*,ID,VALUE,VALUE,VALUE);
1659static VALUE ripper_dispatch4(struct parser_params*,ID,VALUE,VALUE,VALUE,VALUE);
1660static VALUE ripper_dispatch5(struct parser_params*,ID,VALUE,VALUE,VALUE,VALUE,VALUE);
1661static VALUE ripper_dispatch7(struct parser_params*,ID,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE);
1662void ripper_error(struct parser_params *p);
1663
1664#define dispatch0(n) ripper_dispatch0(p, RIPPER_ID(n))
1665#define dispatch1(n,a) ripper_dispatch1(p, RIPPER_ID(n), (a))
1666#define dispatch2(n,a,b) ripper_dispatch2(p, RIPPER_ID(n), (a), (b))
1667#define dispatch3(n,a,b,c) ripper_dispatch3(p, RIPPER_ID(n), (a), (b), (c))
1668#define dispatch4(n,a,b,c,d) ripper_dispatch4(p, RIPPER_ID(n), (a), (b), (c), (d))
1669#define dispatch5(n,a,b,c,d,e) ripper_dispatch5(p, RIPPER_ID(n), (a), (b), (c), (d), (e))
1670#define dispatch7(n,a,b,c,d,e,f,g) ripper_dispatch7(p, RIPPER_ID(n), (a), (b), (c), (d), (e), (f), (g))
1671
1672#define yyparse ripper_yyparse
1673
1674static VALUE
1675aryptn_pre_args(struct parser_params *p, VALUE pre_arg, VALUE pre_args)
1676{
1677 if (!NIL_P(pre_arg)) {
1678 if (!NIL_P(pre_args)) {
1679 rb_ary_unshift(pre_args, pre_arg);
1680 }
1681 else {
1682 pre_args = rb_ary_new_from_args(1, pre_arg);
1683 }
1684 }
1685 return pre_args;
1686}
1687
1688#define ID2VAL(id) STATIC_ID2SYM(id)
1689#define TOKEN2VAL(t) ID2VAL(TOKEN2ID(t))
1690#endif /* RIPPER */
1691
1692#define KWD2EID(t, v) keyword_##t
1693
1694static NODE *
1695new_scope_body(struct parser_params *p, rb_node_args_t *args, NODE *body, NODE *parent, const YYLTYPE *loc)
1696{
1697 body = remove_begin(body);
1698 reduce_nodes(p, &body);
1699 NODE *n = NEW_SCOPE(args, body, parent, loc);
1700 nd_set_line(n, loc->end_pos.lineno);
1701 set_line_body(body, loc->beg_pos.lineno);
1702 return n;
1703}
1704
1705static NODE *
1706rescued_expr(struct parser_params *p, NODE *arg, NODE *rescue,
1707 const YYLTYPE *arg_loc, const YYLTYPE *mod_loc, const YYLTYPE *res_loc)
1708{
1709 YYLTYPE loc = code_loc_gen(mod_loc, res_loc);
1710 rescue = NEW_RESBODY(0, 0, remove_begin(rescue), 0, &loc);
1711 loc.beg_pos = arg_loc->beg_pos;
1712 return NEW_RESCUE(arg, rescue, 0, &loc);
1713}
1714
1715static NODE *add_block_exit(struct parser_params *p, NODE *node);
1716static rb_node_exits_t *init_block_exit(struct parser_params *p);
1717static rb_node_exits_t *allow_block_exit(struct parser_params *p);
1718static void restore_block_exit(struct parser_params *p, rb_node_exits_t *exits);
1719static void clear_block_exit(struct parser_params *p, unsigned int error_mask);
1720
1721static unsigned int
1722exits_mask(enum node_type t)
1723{
1724 switch (t) {
1725 case NODE_BREAK:
1726 case NODE_NEXT:
1727 case NODE_REDO:
1728 return 1u << (t - NODE_BREAK);
1729 default:
1730 UNREACHABLE_RETURN(0);
1731 }
1732}
1733
1734#define EXITS_MASK_ALL (exits_mask(NODE_BREAK)|exits_mask(NODE_NEXT)|exits_mask(NODE_REDO))
1735
1736static void
1737next_rescue_context(struct lex_context *next, const struct lex_context *outer, enum rescue_context def)
1738{
1739 next->in_rescue = outer->in_rescue == after_rescue ? after_rescue : def;
1740}
1741
1742static void
1743restore_defun(struct parser_params *p, rb_node_def_temp_t *temp)
1744{
1745 /* See: def_name action */
1746 struct lex_context ctxt = temp->save.ctxt;
1747 p->ctxt.in_def = ctxt.in_def;
1748 p->ctxt.shareable_constant_value = ctxt.shareable_constant_value;
1749 p->ctxt.in_rescue = ctxt.in_rescue;
1750 p->max_numparam = temp->save.max_numparam;
1751 numparam_pop(p, temp->save.numparam_save);
1752 clear_block_exit(p, EXITS_MASK_ALL);
1753}
1754
1755static void
1756endless_method_name(struct parser_params *p, ID mid, const YYLTYPE *loc)
1757{
1758 if (is_attrset_id(mid)) {
1759 yyerror1(loc, "setter method cannot be defined in an endless method definition");
1760 }
1761 token_info_drop(p, "def", loc->beg_pos);
1762}
1763
1764#define debug_token_line(p, name, line) do { \
1765 if (p->debug) { \
1766 const char *const pcur = p->lex.pcur; \
1767 const char *const ptok = p->lex.ptok; \
1768 rb_parser_printf(p, name ":%d (%d: %"PRIdPTRDIFF"|%"PRIdPTRDIFF"|%"PRIdPTRDIFF")\n", \
1769 line, p->ruby_sourceline, \
1770 ptok - p->lex.pbeg, pcur - ptok, p->lex.pend - pcur); \
1771 } \
1772 } while (0)
1773
1774#define begin_definition(k, loc_beg, loc_end) \
1775 do { \
1776 if (!(p->ctxt.in_class = (k)[0] != 0)) { \
1777 /* singleton class */ \
1778 p->ctxt.cant_return = !p->ctxt.in_def; \
1779 p->ctxt.in_def = 0; \
1780 } \
1781 else if (p->ctxt.in_def) { \
1782 YYLTYPE loc = code_loc_gen(loc_beg, loc_end); \
1783 yyerror1(&loc, k " definition in method body"); \
1784 } \
1785 else { \
1786 p->ctxt.cant_return = 1; \
1787 } \
1788 local_push(p, 0); \
1789 } while (0)
1790
1791#ifndef RIPPER
1792# define ifndef_ripper(x) (x)
1793# define ifdef_ripper(r,x) (x)
1794#else
1795# define ifndef_ripper(x)
1796# define ifdef_ripper(r,x) (r)
1797#endif
1798
1799# define rb_warn0(fmt) WARN_CALL(WARN_ARGS(fmt, 1))
1800# define rb_warn1(fmt,a) WARN_CALL(WARN_ARGS(fmt, 2), (a))
1801# define rb_warn2(fmt,a,b) WARN_CALL(WARN_ARGS(fmt, 3), (a), (b))
1802# define rb_warn3(fmt,a,b,c) WARN_CALL(WARN_ARGS(fmt, 4), (a), (b), (c))
1803# define rb_warn4(fmt,a,b,c,d) WARN_CALL(WARN_ARGS(fmt, 5), (a), (b), (c), (d))
1804# define rb_warning0(fmt) WARNING_CALL(WARNING_ARGS(fmt, 1))
1805# define rb_warning1(fmt,a) WARNING_CALL(WARNING_ARGS(fmt, 2), (a))
1806# define rb_warning2(fmt,a,b) WARNING_CALL(WARNING_ARGS(fmt, 3), (a), (b))
1807# define rb_warning3(fmt,a,b,c) WARNING_CALL(WARNING_ARGS(fmt, 4), (a), (b), (c))
1808# define rb_warning4(fmt,a,b,c,d) WARNING_CALL(WARNING_ARGS(fmt, 5), (a), (b), (c), (d))
1809# define rb_warn0L(l,fmt) WARN_CALL(WARN_ARGS_L(l, fmt, 1))
1810# define rb_warn1L(l,fmt,a) WARN_CALL(WARN_ARGS_L(l, fmt, 2), (a))
1811# define rb_warn2L(l,fmt,a,b) WARN_CALL(WARN_ARGS_L(l, fmt, 3), (a), (b))
1812# define rb_warn3L(l,fmt,a,b,c) WARN_CALL(WARN_ARGS_L(l, fmt, 4), (a), (b), (c))
1813# define rb_warn4L(l,fmt,a,b,c,d) WARN_CALL(WARN_ARGS_L(l, fmt, 5), (a), (b), (c), (d))
1814# define rb_warning0L(l,fmt) WARNING_CALL(WARNING_ARGS_L(l, fmt, 1))
1815# define rb_warning1L(l,fmt,a) WARNING_CALL(WARNING_ARGS_L(l, fmt, 2), (a))
1816# define rb_warning2L(l,fmt,a,b) WARNING_CALL(WARNING_ARGS_L(l, fmt, 3), (a), (b))
1817# define rb_warning3L(l,fmt,a,b,c) WARNING_CALL(WARNING_ARGS_L(l, fmt, 4), (a), (b), (c))
1818# define rb_warning4L(l,fmt,a,b,c,d) WARNING_CALL(WARNING_ARGS_L(l, fmt, 5), (a), (b), (c), (d))
1819#ifdef RIPPER
1820extern const ID id_warn, id_warning, id_gets, id_assoc;
1821# define ERR_MESG() STR_NEW2(mesg) /* to bypass Ripper DSL */
1822# define WARN_S_L(s,l) STR_NEW(s,l)
1823# define WARN_S(s) STR_NEW2(s)
1824# define WARN_I(i) INT2NUM(i)
1825# define WARN_ID(i) rb_id2str(i)
1826# define PRIsWARN PRIsVALUE
1827# define WARN_ARGS(fmt,n) p->value, id_warn, n, rb_usascii_str_new_lit(fmt)
1828# define WARN_ARGS_L(l,fmt,n) WARN_ARGS(fmt,n)
1829# ifdef HAVE_VA_ARGS_MACRO
1830# define WARN_CALL(...) rb_funcall(__VA_ARGS__)
1831# else
1832# define WARN_CALL rb_funcall
1833# endif
1834# define WARNING_ARGS(fmt,n) p->value, id_warning, n, rb_usascii_str_new_lit(fmt)
1835# define WARNING_ARGS_L(l, fmt,n) WARNING_ARGS(fmt,n)
1836# ifdef HAVE_VA_ARGS_MACRO
1837# define WARNING_CALL(...) rb_funcall(__VA_ARGS__)
1838# else
1839# define WARNING_CALL rb_funcall
1840# endif
1841# define compile_error ripper_compile_error
1842#else
1843# define WARN_S_L(s,l) s
1844# define WARN_S(s) s
1845# define WARN_I(i) i
1846# define WARN_ID(i) rb_id2name(i)
1847# define PRIsWARN PRIsVALUE
1848# define WARN_ARGS(fmt,n) WARN_ARGS_L(p->ruby_sourceline,fmt,n)
1849# define WARN_ARGS_L(l,fmt,n) p->ruby_sourcefile, (l), (fmt)
1850# define WARN_CALL rb_compile_warn
1851# define WARNING_ARGS(fmt,n) WARN_ARGS(fmt,n)
1852# define WARNING_ARGS_L(l,fmt,n) WARN_ARGS_L(l,fmt,n)
1853# define WARNING_CALL rb_compile_warning
1854PRINTF_ARGS(static void parser_compile_error(struct parser_params*, const rb_code_location_t *loc, const char *fmt, ...), 3, 4);
1855# define compile_error(p, ...) parser_compile_error(p, NULL, __VA_ARGS__)
1856#endif
1857
1858#define RNODE_EXITS(node) ((rb_node_exits_t*)(node))
1859
1860static NODE *
1861add_block_exit(struct parser_params *p, NODE *node)
1862{
1863 if (!node) {
1864 compile_error(p, "unexpected null node");
1865 return 0;
1866 }
1867 switch (nd_type(node)) {
1868 case NODE_BREAK: case NODE_NEXT: case NODE_REDO: break;
1869 default:
1870 compile_error(p, "add_block_exit: unexpected node: %s", parser_node_name(nd_type(node)));
1871 return node;
1872 }
1873 if (!p->ctxt.in_defined) {
1874 rb_node_exits_t *exits = p->exits;
1875 if (exits) {
1876 RNODE_EXITS(exits->nd_stts)->nd_chain = node;
1877 exits->nd_stts = node;
1878 }
1879 }
1880 return node;
1881}
1882
1883static rb_node_exits_t *
1884init_block_exit(struct parser_params *p)
1885{
1886 rb_node_exits_t *old = p->exits;
1887 rb_node_exits_t *exits = NODE_NEW_INTERNAL(NODE_EXITS, rb_node_exits_t);
1888 exits->nd_chain = 0;
1889 exits->nd_stts = RNODE(exits);
1890 p->exits = exits;
1891 return old;
1892}
1893
1894static rb_node_exits_t *
1895allow_block_exit(struct parser_params *p)
1896{
1897 rb_node_exits_t *exits = p->exits;
1898 p->exits = 0;
1899 return exits;
1900}
1901
1902static void
1903restore_block_exit(struct parser_params *p, rb_node_exits_t *exits)
1904{
1905 p->exits = exits;
1906}
1907
1908static void
1909clear_block_exit(struct parser_params *p, unsigned int error_mask)
1910{
1911 rb_node_exits_t *exits = p->exits;
1912 if (!exits) return;
1913 if (error_mask) {
1914 for (NODE *e = RNODE(exits); (e = RNODE_EXITS(e)->nd_chain) != 0; ) {
1915 switch (nd_type(e)) {
1916 case NODE_BREAK:
1917 if (!(error_mask & exits_mask(NODE_BREAK))) break;
1918 yyerror1(&e->nd_loc, "Invalid break");
1919 break;
1920 case NODE_NEXT:
1921 if (!(error_mask & exits_mask(NODE_NEXT))) break;
1922 yyerror1(&e->nd_loc, "Invalid next");
1923 break;
1924 case NODE_REDO:
1925 if (!(error_mask & exits_mask(NODE_REDO))) break;
1926 yyerror1(&e->nd_loc, "Invalid redo");
1927 break;
1928 default:
1929 yyerror1(&e->nd_loc, "unexpected node");
1930 goto end_checks; /* no nd_chain */
1931 }
1932 }
1933 end_checks:;
1934 }
1935 exits->nd_stts = RNODE(exits);
1936 exits->nd_chain = 0;
1937}
1938
1939#define WARN_EOL(tok) \
1940 (looking_at_eol_p(p) ? \
1941 (void)rb_warning0("'" tok "' at the end of line without an expression") : \
1942 (void)0)
1943static int looking_at_eol_p(struct parser_params *p);
1944
1945static NODE *
1946get_nd_value(struct parser_params *p, NODE *node)
1947{
1948 switch (nd_type(node)) {
1949 case NODE_GASGN:
1950 return RNODE_GASGN(node)->nd_value;
1951 case NODE_IASGN:
1952 return RNODE_IASGN(node)->nd_value;
1953 case NODE_LASGN:
1954 return RNODE_LASGN(node)->nd_value;
1955 case NODE_DASGN:
1956 return RNODE_DASGN(node)->nd_value;
1957 case NODE_MASGN:
1958 return RNODE_MASGN(node)->nd_value;
1959 case NODE_CVASGN:
1960 return RNODE_CVASGN(node)->nd_value;
1961 case NODE_CDECL:
1962 return RNODE_CDECL(node)->nd_value;
1963 default:
1964 compile_error(p, "get_nd_value: unexpected node: %s", parser_node_name(nd_type(node)));
1965 return 0;
1966 }
1967}
1968
1969static void
1970set_nd_value(struct parser_params *p, NODE *node, NODE *rhs)
1971{
1972 switch (nd_type(node)) {
1973 case NODE_CDECL:
1974 RNODE_CDECL(node)->nd_value = rhs;
1975 break;
1976 case NODE_GASGN:
1977 RNODE_GASGN(node)->nd_value = rhs;
1978 break;
1979 case NODE_IASGN:
1980 RNODE_IASGN(node)->nd_value = rhs;
1981 break;
1982 case NODE_LASGN:
1983 RNODE_LASGN(node)->nd_value = rhs;
1984 break;
1985 case NODE_DASGN:
1986 RNODE_DASGN(node)->nd_value = rhs;
1987 break;
1988 case NODE_MASGN:
1989 RNODE_MASGN(node)->nd_value = rhs;
1990 break;
1991 case NODE_CVASGN:
1992 RNODE_CVASGN(node)->nd_value = rhs;
1993 break;
1994 default:
1995 compile_error(p, "set_nd_value: unexpected node: %s", parser_node_name(nd_type(node)));
1996 break;
1997 }
1998}
1999
2000static ID
2001get_nd_vid(struct parser_params *p, NODE *node)
2002{
2003 switch (nd_type(node)) {
2004 case NODE_CDECL:
2005 return RNODE_CDECL(node)->nd_vid;
2006 case NODE_GASGN:
2007 return RNODE_GASGN(node)->nd_vid;
2008 case NODE_IASGN:
2009 return RNODE_IASGN(node)->nd_vid;
2010 case NODE_LASGN:
2011 return RNODE_LASGN(node)->nd_vid;
2012 case NODE_DASGN:
2013 return RNODE_DASGN(node)->nd_vid;
2014 case NODE_CVASGN:
2015 return RNODE_CVASGN(node)->nd_vid;
2016 default:
2017 compile_error(p, "get_nd_vid: unexpected node: %s", parser_node_name(nd_type(node)));
2018 return 0;
2019 }
2020}
2021
2022static NODE *
2023get_nd_args(struct parser_params *p, NODE *node)
2024{
2025 switch (nd_type(node)) {
2026 case NODE_CALL:
2027 return RNODE_CALL(node)->nd_args;
2028 case NODE_OPCALL:
2029 return RNODE_OPCALL(node)->nd_args;
2030 case NODE_FCALL:
2031 return RNODE_FCALL(node)->nd_args;
2032 case NODE_QCALL:
2033 return RNODE_QCALL(node)->nd_args;
2034 case NODE_SUPER:
2035 return RNODE_SUPER(node)->nd_args;
2036 case NODE_VCALL:
2037 case NODE_ZSUPER:
2038 case NODE_YIELD:
2039 case NODE_RETURN:
2040 case NODE_BREAK:
2041 case NODE_NEXT:
2042 return 0;
2043 default:
2044 compile_error(p, "get_nd_args: unexpected node: %s", parser_node_name(nd_type(node)));
2045 return 0;
2046 }
2047}
2048
2049static st_index_t
2050djb2(const uint8_t *str, size_t len)
2051{
2052 st_index_t hash = 5381;
2053
2054 for (size_t i = 0; i < len; i++) {
2055 hash = ((hash << 5) + hash) + str[i];
2056 }
2057
2058 return hash;
2059}
2060
2061static st_index_t
2062parser_memhash(const void *ptr, long len)
2063{
2064 return djb2(ptr, len);
2065}
2066
2067#define PARSER_STRING_PTR(str) (str->ptr)
2068#define PARSER_STRING_LEN(str) (str->len)
2069#define PARSER_STRING_END(str) (&str->ptr[str->len])
2070#define STRING_SIZE(str) ((size_t)str->len + 1)
2071#define STRING_TERM_LEN(str) (1)
2072#define STRING_TERM_FILL(str) (str->ptr[str->len] = '\0')
2073#define PARSER_STRING_RESIZE_CAPA_TERM(p,str,capacity,termlen) do {\
2074 REALLOC_N(str->ptr, char, (size_t)total + termlen); \
2075 str->len = total; \
2076} while (0)
2077#define STRING_SET_LEN(str, n) do { \
2078 (str)->len = (n); \
2079} while (0)
2080#define PARSER_STRING_GETMEM(str, ptrvar, lenvar) \
2081 ((ptrvar) = str->ptr, \
2082 (lenvar) = str->len)
2083
2084static inline int
2085parser_string_char_at_end(struct parser_params *p, rb_parser_string_t *str, int when_empty)
2086{
2087 return PARSER_STRING_LEN(str) > 0 ? (unsigned char)PARSER_STRING_END(str)[-1] : when_empty;
2088}
2089
2090static rb_parser_string_t *
2091rb_parser_string_new(rb_parser_t *p, const char *ptr, long len)
2092{
2093 rb_parser_string_t *str;
2094
2095 if (len < 0) {
2096 rb_bug("negative string size (or size too big): %ld", len);
2097 }
2098
2099 str = xcalloc(1, sizeof(rb_parser_string_t));
2100 str->ptr = xcalloc(len + 1, sizeof(char));
2101
2102 if (ptr) {
2103 memcpy(PARSER_STRING_PTR(str), ptr, len);
2104 }
2105 STRING_SET_LEN(str, len);
2106 STRING_TERM_FILL(str);
2107 return str;
2108}
2109
2110static rb_parser_string_t *
2111rb_parser_encoding_string_new(rb_parser_t *p, const char *ptr, long len, rb_encoding *enc)
2112{
2113 rb_parser_string_t *str = rb_parser_string_new(p, ptr, len);
2114 str->coderange = RB_PARSER_ENC_CODERANGE_UNKNOWN;
2115 str->enc = enc;
2116 return str;
2117}
2118
2119#ifndef RIPPER
2120rb_parser_string_t *
2121rb_str_to_parser_string(rb_parser_t *p, VALUE str)
2122{
2123 /* Type check */
2124 rb_parser_string_t *ret = rb_parser_encoding_string_new(p, RSTRING_PTR(str), RSTRING_LEN(str), rb_enc_get(str));
2125 RB_GC_GUARD(str);
2126 return ret;
2127}
2128
2129void
2130rb_parser_string_free(rb_parser_t *p, rb_parser_string_t *str)
2131{
2132 if (!str) return;
2133 xfree(PARSER_STRING_PTR(str));
2134 xfree(str);
2135}
2136#endif
2137
2138static st_index_t
2139rb_parser_str_hash(rb_parser_string_t *str)
2140{
2141 return parser_memhash((const void *)PARSER_STRING_PTR(str), PARSER_STRING_LEN(str));
2142}
2143
2144static st_index_t
2145rb_char_p_hash(const char *c)
2146{
2147 return parser_memhash((const void *)c, strlen(c));
2148}
2149
2150static size_t
2151rb_parser_str_capacity(rb_parser_string_t *str, const int termlen)
2152{
2153 return PARSER_STRING_LEN(str);
2154}
2155
2156#ifndef RIPPER
2157static char *
2158rb_parser_string_end(rb_parser_string_t *str)
2159{
2160 return &str->ptr[str->len];
2161}
2162#endif
2163
2164static void
2165rb_parser_string_set_encoding(rb_parser_string_t *str, rb_encoding *enc)
2166{
2167 str->enc = enc;
2168}
2169
2170static rb_encoding *
2171rb_parser_str_get_encoding(rb_parser_string_t *str)
2172{
2173 return str->enc;
2174}
2175
2176#ifndef RIPPER
2177static bool
2178PARSER_ENCODING_IS_ASCII8BIT(struct parser_params *p, rb_parser_string_t *str)
2179{
2180 return rb_parser_str_get_encoding(str) == rb_ascii8bit_encoding();
2181}
2182#endif
2183
2184static int
2185PARSER_ENC_CODERANGE(rb_parser_string_t *str)
2186{
2187 return str->coderange;
2188}
2189
2190static void
2191PARSER_ENC_CODERANGE_SET(rb_parser_string_t *str, int coderange)
2192{
2193 str->coderange = coderange;
2194}
2195
2196static void
2197PARSER_ENCODING_CODERANGE_SET(rb_parser_string_t *str, rb_encoding *enc, enum rb_parser_string_coderange_type cr)
2198{
2199 rb_parser_string_set_encoding(str, enc);
2200 PARSER_ENC_CODERANGE_SET(str, cr);
2201}
2202
2203static void
2204PARSER_ENC_CODERANGE_CLEAR(rb_parser_string_t *str)
2205{
2206 str->coderange = RB_PARSER_ENC_CODERANGE_UNKNOWN;
2207}
2208
2209static bool
2210PARSER_ENC_CODERANGE_ASCIIONLY(rb_parser_string_t *str)
2211{
2212 return PARSER_ENC_CODERANGE(str) == RB_PARSER_ENC_CODERANGE_7BIT;
2213}
2214
2215static bool
2216PARSER_ENC_CODERANGE_CLEAN_P(int cr)
2217{
2218 return cr == RB_PARSER_ENC_CODERANGE_7BIT || cr == RB_PARSER_ENC_CODERANGE_VALID;
2219}
2220
2221static const char *
2222rb_parser_search_nonascii(const char *p, const char *e)
2223{
2224 const char *s = p;
2225
2226 for (; s < e; s++) {
2227 if (*s & 0x80) return s;
2228 }
2229
2230 return NULL;
2231}
2232
2233static int
2234rb_parser_coderange_scan(struct parser_params *p, const char *ptr, long len, rb_encoding *enc)
2235{
2236 const char *e = ptr + len;
2237
2238 if (enc == rb_ascii8bit_encoding()) {
2239 /* enc is ASCII-8BIT. ASCII-8BIT string never be broken. */
2240 ptr = rb_parser_search_nonascii(ptr, e);
2241 return ptr ? RB_PARSER_ENC_CODERANGE_VALID : RB_PARSER_ENC_CODERANGE_7BIT;
2242 }
2243
2244 /* parser string encoding is always asciicompat */
2245 ptr = rb_parser_search_nonascii(ptr, e);
2246 if (!ptr) return RB_PARSER_ENC_CODERANGE_7BIT;
2247 for (;;) {
2248 int ret = rb_enc_precise_mbclen(ptr, e, enc);
2249 if (!MBCLEN_CHARFOUND_P(ret)) return RB_PARSER_ENC_CODERANGE_BROKEN;
2250 ptr += MBCLEN_CHARFOUND_LEN(ret);
2251 if (ptr == e) break;
2252 ptr = rb_parser_search_nonascii(ptr, e);
2253 if (!ptr) break;
2254 }
2255
2256 return RB_PARSER_ENC_CODERANGE_VALID;
2257}
2258
2259static int
2260rb_parser_enc_coderange_scan(struct parser_params *p, rb_parser_string_t *str, rb_encoding *enc)
2261{
2262 return rb_parser_coderange_scan(p, PARSER_STRING_PTR(str), PARSER_STRING_LEN(str), enc);
2263}
2264
2265static int
2266rb_parser_enc_str_coderange(struct parser_params *p, rb_parser_string_t *str)
2267{
2268 int cr = PARSER_ENC_CODERANGE(str);
2269
2270 if (cr == RB_PARSER_ENC_CODERANGE_UNKNOWN) {
2271 cr = rb_parser_enc_coderange_scan(p, str, rb_parser_str_get_encoding(str));
2272 PARSER_ENC_CODERANGE_SET(str, cr);
2273 }
2274
2275 return cr;
2276}
2277
2278static rb_parser_string_t *
2279rb_parser_enc_associate(struct parser_params *p, rb_parser_string_t *str, rb_encoding *enc)
2280{
2281 if (rb_parser_str_get_encoding(str) == enc)
2282 return str;
2283 if (!PARSER_ENC_CODERANGE_ASCIIONLY(str)) {
2284 PARSER_ENC_CODERANGE_CLEAR(str);
2285 }
2286 rb_parser_string_set_encoding(str, enc);
2287 return str;
2288}
2289
2290static bool
2291rb_parser_is_ascii_string(struct parser_params *p, rb_parser_string_t *str)
2292{
2293 return rb_parser_enc_str_coderange(p, str) == RB_PARSER_ENC_CODERANGE_7BIT;
2294}
2295
2296static rb_encoding *
2297rb_parser_enc_compatible(struct parser_params *p, rb_parser_string_t *str1, rb_parser_string_t *str2)
2298{
2299 rb_encoding *enc1 = rb_parser_str_get_encoding(str1);
2300 rb_encoding *enc2 = rb_parser_str_get_encoding(str2);
2301
2302 if (enc1 == NULL || enc2 == NULL)
2303 return 0;
2304
2305 if (enc1 == enc2) {
2306 return enc1;
2307 }
2308
2309 if (PARSER_STRING_LEN(str2) == 0)
2310 return enc1;
2311 if (PARSER_STRING_LEN(str1) == 0)
2312 return rb_parser_is_ascii_string(p, str2) ? enc1 : enc2;
2313
2314 int cr1, cr2;
2315
2316 cr1 = rb_parser_enc_str_coderange(p, str1);
2317 cr2 = rb_parser_enc_str_coderange(p, str2);
2318
2319 if (cr1 != cr2) {
2320 if (cr1 == RB_PARSER_ENC_CODERANGE_7BIT) return enc2;
2321 if (cr2 == RB_PARSER_ENC_CODERANGE_7BIT) return enc1;
2322 }
2323
2324 if (cr2 == RB_PARSER_ENC_CODERANGE_7BIT) {
2325 return enc1;
2326 }
2327
2328 if (cr1 == RB_PARSER_ENC_CODERANGE_7BIT) {
2329 return enc2;
2330 }
2331
2332 return 0;
2333}
2334
2335static void
2336rb_parser_str_modify(rb_parser_string_t *str)
2337{
2338 PARSER_ENC_CODERANGE_CLEAR(str);
2339}
2340
2341static void
2342rb_parser_str_set_len(struct parser_params *p, rb_parser_string_t *str, long len)
2343{
2344 long capa;
2345 const int termlen = STRING_TERM_LEN(str);
2346
2347 if (len > (capa = (long)(rb_parser_str_capacity(str, termlen))) || len < 0) {
2348 rb_bug("probable buffer overflow: %ld for %ld", len, capa);
2349 }
2350
2351 int cr = PARSER_ENC_CODERANGE(str);
2352 if (cr == RB_PARSER_ENC_CODERANGE_UNKNOWN) {
2353 /* Leave unknown. */
2354 }
2355 else if (len > PARSER_STRING_LEN(str)) {
2356 PARSER_ENC_CODERANGE_SET(str, RB_PARSER_ENC_CODERANGE_UNKNOWN);
2357 }
2358 else if (len < PARSER_STRING_LEN(str)) {
2359 if (cr != RB_PARSER_ENC_CODERANGE_7BIT) {
2360 /* ASCII-only string is keeping after truncated. Valid
2361 * and broken may be invalid or valid, leave unknown. */
2362 PARSER_ENC_CODERANGE_SET(str, RB_PARSER_ENC_CODERANGE_UNKNOWN);
2363 }
2364 }
2365
2366 STRING_SET_LEN(str, len);
2367 STRING_TERM_FILL(str);
2368}
2369
2370static rb_parser_string_t *
2371rb_parser_str_buf_cat(struct parser_params *p, rb_parser_string_t *str, const char *ptr, long len)
2372{
2373 rb_parser_str_modify(str);
2374 if (len == 0) return 0;
2375
2376 long total, olen, off = -1;
2377 char *sptr;
2378 const int termlen = STRING_TERM_LEN(str);
2379
2380 PARSER_STRING_GETMEM(str, sptr, olen);
2381 if (ptr >= sptr && ptr <= sptr + olen) {
2382 off = ptr - sptr;
2383 }
2384
2385 if (olen > LONG_MAX - len) {
2386 compile_error(p, "string sizes too big");
2387 return 0;
2388 }
2389 total = olen + len;
2390 PARSER_STRING_RESIZE_CAPA_TERM(p, str, total, termlen);
2391 sptr = PARSER_STRING_PTR(str);
2392 if (off != -1) {
2393 ptr = sptr + off;
2394 }
2395 memcpy(sptr + olen, ptr, len);
2396 STRING_SET_LEN(str, total);
2397 STRING_TERM_FILL(str);
2398
2399 return str;
2400}
2401
2402#define parser_str_cat(str, ptr, len) rb_parser_str_buf_cat(p, str, ptr, len)
2403#define parser_str_cat_cstr(str, lit) rb_parser_str_buf_cat(p, str, lit, strlen(lit))
2404
2405static rb_parser_string_t *
2406rb_parser_enc_cr_str_buf_cat(struct parser_params *p, rb_parser_string_t *str, const char *ptr, long len,
2407 rb_encoding *ptr_enc, int ptr_cr, int *ptr_cr_ret)
2408{
2409 int str_cr, res_cr;
2410 rb_encoding *str_enc, *res_enc;
2411
2412 str_enc = rb_parser_str_get_encoding(str);
2413 str_cr = PARSER_STRING_LEN(str) ? PARSER_ENC_CODERANGE(str) : RB_PARSER_ENC_CODERANGE_7BIT;
2414
2415 if (str_enc == ptr_enc) {
2416 if (str_cr != RB_PARSER_ENC_CODERANGE_UNKNOWN && ptr_cr == RB_PARSER_ENC_CODERANGE_UNKNOWN) {
2417 ptr_cr = rb_parser_coderange_scan(p, ptr, len, ptr_enc);
2418 }
2419 }
2420 else {
2421 /* parser string encoding is always asciicompat */
2422 if (ptr_cr == RB_PARSER_ENC_CODERANGE_UNKNOWN) {
2423 ptr_cr = rb_parser_coderange_scan(p, ptr, len, ptr_enc);
2424 }
2425 if (str_cr == RB_PARSER_ENC_CODERANGE_UNKNOWN) {
2426 if (str_enc == rb_ascii8bit_encoding() || ptr_cr != RB_PARSER_ENC_CODERANGE_7BIT) {
2427 str_cr = rb_parser_enc_str_coderange(p, str);
2428 }
2429 }
2430 }
2431 if (ptr_cr_ret)
2432 *ptr_cr_ret = ptr_cr;
2433
2434 if (str_enc != ptr_enc &&
2435 str_cr != RB_PARSER_ENC_CODERANGE_7BIT &&
2436 ptr_cr != RB_PARSER_ENC_CODERANGE_7BIT) {
2437 goto incompatible;
2438 }
2439
2440 if (str_cr == RB_PARSER_ENC_CODERANGE_UNKNOWN) {
2441 res_enc = str_enc;
2442 res_cr = RB_PARSER_ENC_CODERANGE_UNKNOWN;
2443 }
2444 else if (str_cr == RB_PARSER_ENC_CODERANGE_7BIT) {
2445 if (ptr_cr == RB_PARSER_ENC_CODERANGE_7BIT) {
2446 res_enc = str_enc;
2447 res_cr = RB_PARSER_ENC_CODERANGE_7BIT;
2448 }
2449 else {
2450 res_enc = ptr_enc;
2451 res_cr = ptr_cr;
2452 }
2453 }
2454 else if (str_cr == RB_PARSER_ENC_CODERANGE_VALID) {
2455 res_enc = str_enc;
2456 if (PARSER_ENC_CODERANGE_CLEAN_P(ptr_cr))
2457 res_cr = str_cr;
2458 else
2459 res_cr = ptr_cr;
2460 }
2461 else { /* str_cr == RB_PARSER_ENC_CODERANGE_BROKEN */
2462 res_enc = str_enc;
2463 res_cr = str_cr;
2464 if (0 < len) res_cr = RB_PARSER_ENC_CODERANGE_UNKNOWN;
2465 }
2466
2467 if (len < 0) {
2468 compile_error(p, "negative string size (or size too big)");
2469 }
2470 parser_str_cat(str, ptr, len);
2471 PARSER_ENCODING_CODERANGE_SET(str, res_enc, res_cr);
2472 return str;
2473
2474 incompatible:
2475 compile_error(p, "incompatible character encodings: %s and %s",
2476 rb_enc_name(str_enc), rb_enc_name(ptr_enc));
2477 UNREACHABLE_RETURN(0);
2478
2479}
2480
2481static rb_parser_string_t *
2482rb_parser_enc_str_buf_cat(struct parser_params *p, rb_parser_string_t *str, const char *ptr, long len,
2483 rb_encoding *ptr_enc)
2484{
2485 return rb_parser_enc_cr_str_buf_cat(p, str, ptr, len, ptr_enc, RB_PARSER_ENC_CODERANGE_UNKNOWN, NULL);
2486}
2487
2488static rb_parser_string_t *
2489rb_parser_str_buf_append(struct parser_params *p, rb_parser_string_t *str, rb_parser_string_t *str2)
2490{
2491 int str2_cr = rb_parser_enc_str_coderange(p, str2);
2492
2493 rb_parser_enc_cr_str_buf_cat(p, str, PARSER_STRING_PTR(str2), PARSER_STRING_LEN(str2),
2494 rb_parser_str_get_encoding(str2), str2_cr, &str2_cr);
2495
2496 PARSER_ENC_CODERANGE_SET(str2, str2_cr);
2497
2498 return str;
2499}
2500
2501static rb_parser_string_t *
2502rb_parser_str_resize(struct parser_params *p, rb_parser_string_t *str, long len)
2503{
2504 if (len < 0) {
2505 rb_bug("negative string size (or size too big)");
2506 }
2507
2508 long slen = PARSER_STRING_LEN(str);
2509
2510 if (slen > len && PARSER_ENC_CODERANGE(str) != RB_PARSER_ENC_CODERANGE_7BIT) {
2511 PARSER_ENC_CODERANGE_CLEAR(str);
2512 }
2513
2514 {
2515 long capa;
2516 const int termlen = STRING_TERM_LEN(str);
2517
2518 if ((capa = slen) < len) {
2519 SIZED_REALLOC_N(str->ptr, char, (size_t)len + termlen, STRING_SIZE(str));
2520 }
2521 else if (len == slen) return str;
2522 STRING_SET_LEN(str, len);
2523 STRING_TERM_FILL(str);
2524 }
2525 return str;
2526}
2527
2528# define PARSER_ENC_STRING_GETMEM(str, ptrvar, lenvar, encvar) \
2529 ((ptrvar) = str->ptr, \
2530 (lenvar) = str->len, \
2531 (encvar) = str->enc)
2532
2533static int
2534rb_parser_string_hash_cmp(rb_parser_string_t *str1, rb_parser_string_t *str2)
2535{
2536 long len1, len2;
2537 const char *ptr1, *ptr2;
2538 rb_encoding *enc1, *enc2;
2539
2540 PARSER_ENC_STRING_GETMEM(str1, ptr1, len1, enc1);
2541 PARSER_ENC_STRING_GETMEM(str2, ptr2, len2, enc2);
2542
2543 return (len1 != len2 ||
2544 enc1 != enc2 ||
2545 memcmp(ptr1, ptr2, len1) != 0);
2546}
2547
2548static void
2549rb_parser_ary_extend(rb_parser_t *p, rb_parser_ary_t *ary, long len)
2550{
2551 long i;
2552 if (ary->capa < len) {
2553 ary->capa = len;
2554 ary->data = (rb_parser_ary_data *)xrealloc(ary->data, sizeof(rb_parser_ary_data) * len);
2555 for (i = ary->len; i < len; i++) {
2556 ary->data[i] = 0;
2557 }
2558 }
2559}
2560
2561/*
2562 * Do not call this directly.
2563 * Use rb_parser_ary_new_capa_for_XXX() instead.
2564 */
2565static rb_parser_ary_t *
2566parser_ary_new_capa(rb_parser_t *p, long len)
2567{
2568 if (len < 0) {
2569 rb_bug("negative array size (or size too big): %ld", len);
2570 }
2571 rb_parser_ary_t *ary = xcalloc(1, sizeof(rb_parser_ary_t));
2572 ary->data_type = 0;
2573 ary->len = 0;
2574 ary->capa = len;
2575 if (0 < len) {
2576 ary->data = (rb_parser_ary_data *)xcalloc(len, sizeof(rb_parser_ary_data));
2577 }
2578 else {
2579 ary->data = NULL;
2580 }
2581 return ary;
2582}
2583
2584#ifndef RIPPER
2585static rb_parser_ary_t *
2586rb_parser_ary_new_capa_for_script_line(rb_parser_t *p, long len)
2587{
2588 rb_parser_ary_t *ary = parser_ary_new_capa(p, len);
2589 ary->data_type = PARSER_ARY_DATA_SCRIPT_LINE;
2590 return ary;
2591}
2592
2593static rb_parser_ary_t *
2594rb_parser_ary_new_capa_for_ast_token(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_AST_TOKEN;
2598 return ary;
2599}
2600#endif
2601
2602static rb_parser_ary_t *
2603rb_parser_ary_new_capa_for_node(rb_parser_t *p, long len)
2604{
2605 rb_parser_ary_t *ary = parser_ary_new_capa(p, len);
2606 ary->data_type = PARSER_ARY_DATA_NODE;
2607 return ary;
2608}
2609
2610/*
2611 * Do not call this directly.
2612 * Use rb_parser_ary_push_XXX() instead.
2613 */
2614static rb_parser_ary_t *
2615parser_ary_push(rb_parser_t *p, rb_parser_ary_t *ary, rb_parser_ary_data val)
2616{
2617 if (ary->len == ary->capa) {
2618 rb_parser_ary_extend(p, ary, ary->len == 0 ? 1 : ary->len * 2);
2619 }
2620 ary->data[ary->len++] = val;
2621 return ary;
2622}
2623
2624#ifndef RIPPER
2625static rb_parser_ary_t *
2626rb_parser_ary_push_ast_token(rb_parser_t *p, rb_parser_ary_t *ary, rb_parser_ast_token_t *val)
2627{
2628 if (ary->data_type != PARSER_ARY_DATA_AST_TOKEN) {
2629 rb_bug("unexpected rb_parser_ary_data_type: %d", ary->data_type);
2630 }
2631 return parser_ary_push(p, ary, val);
2632}
2633
2634static rb_parser_ary_t *
2635rb_parser_ary_push_script_line(rb_parser_t *p, rb_parser_ary_t *ary, rb_parser_string_t *val)
2636{
2637 if (ary->data_type != PARSER_ARY_DATA_SCRIPT_LINE) {
2638 rb_bug("unexpected rb_parser_ary_data_type: %d", ary->data_type);
2639 }
2640 return parser_ary_push(p, ary, val);
2641}
2642#endif
2643
2644static rb_parser_ary_t *
2645rb_parser_ary_push_node(rb_parser_t *p, rb_parser_ary_t *ary, NODE *val)
2646{
2647 if (ary->data_type != PARSER_ARY_DATA_NODE) {
2648 rb_bug("unexpected rb_parser_ary_data_type: %d", ary->data_type);
2649 }
2650 return parser_ary_push(p, ary, val);
2651}
2652
2653#ifndef RIPPER
2654static void
2655rb_parser_ast_token_free(rb_parser_t *p, rb_parser_ast_token_t *token)
2656{
2657 if (!token) return;
2658 rb_parser_string_free(p, token->str);
2659 xfree(token);
2660}
2661
2662static void
2663rb_parser_ary_free(rb_parser_t *p, rb_parser_ary_t *ary)
2664{
2665# define foreach_ary(ptr) \
2666 for (rb_parser_ary_data *ptr = ary->data, *const end_ary_data = ptr + ary->len; \
2667 ptr < end_ary_data; ptr++)
2668 switch (ary->data_type) {
2669 case PARSER_ARY_DATA_AST_TOKEN:
2670 foreach_ary(data) {rb_parser_ast_token_free(p, *data);}
2671 break;
2672 case PARSER_ARY_DATA_SCRIPT_LINE:
2673 foreach_ary(data) {rb_parser_string_free(p, *data);}
2674 break;
2675 case PARSER_ARY_DATA_NODE:
2676 /* Do nothing because nodes are freed when rb_ast_t is freed */
2677 break;
2678 default:
2679 rb_bug("unexpected rb_parser_ary_data_type: %d", ary->data_type);
2680 break;
2681 }
2682# undef foreach_ary
2683 xfree(ary->data);
2684 xfree(ary);
2685}
2686
2687#endif /* !RIPPER */
2688
2689#line 2690 "parse.c"
2690
2691# ifndef YY_CAST
2692# ifdef __cplusplus
2693# define YY_CAST(Type, Val) static_cast<Type> (Val)
2694# define YY_REINTERPRET_CAST(Type, Val) reinterpret_cast<Type> (Val)
2695# else
2696# define YY_CAST(Type, Val) ((Type) (Val))
2697# define YY_REINTERPRET_CAST(Type, Val) ((Type) (Val))
2698# endif
2699# endif
2700# ifndef YY_NULLPTR
2701# if defined __cplusplus
2702# if 201103L <= __cplusplus
2703# define YY_NULLPTR nullptr
2704# else
2705# define YY_NULLPTR 0
2706# endif
2707# else
2708# define YY_NULLPTR ((void*)0)
2709# endif
2710# endif
2711
2712#include "parse.h"
2713/* Symbol kind. */
2714enum yysymbol_kind_t
2715{
2716 YYSYMBOL_YYEMPTY = -2,
2717 YYSYMBOL_YYEOF = 0, /* "end-of-input" */
2718 YYSYMBOL_YYerror = 1, /* error */
2719 YYSYMBOL_YYUNDEF = 2, /* "invalid token" */
2720 YYSYMBOL_keyword_class = 3, /* "'class'" */
2721 YYSYMBOL_keyword_module = 4, /* "'module'" */
2722 YYSYMBOL_keyword_def = 5, /* "'def'" */
2723 YYSYMBOL_keyword_undef = 6, /* "'undef'" */
2724 YYSYMBOL_keyword_begin = 7, /* "'begin'" */
2725 YYSYMBOL_keyword_rescue = 8, /* "'rescue'" */
2726 YYSYMBOL_keyword_ensure = 9, /* "'ensure'" */
2727 YYSYMBOL_keyword_end = 10, /* "'end'" */
2728 YYSYMBOL_keyword_if = 11, /* "'if'" */
2729 YYSYMBOL_keyword_unless = 12, /* "'unless'" */
2730 YYSYMBOL_keyword_then = 13, /* "'then'" */
2731 YYSYMBOL_keyword_elsif = 14, /* "'elsif'" */
2732 YYSYMBOL_keyword_else = 15, /* "'else'" */
2733 YYSYMBOL_keyword_case = 16, /* "'case'" */
2734 YYSYMBOL_keyword_when = 17, /* "'when'" */
2735 YYSYMBOL_keyword_while = 18, /* "'while'" */
2736 YYSYMBOL_keyword_until = 19, /* "'until'" */
2737 YYSYMBOL_keyword_for = 20, /* "'for'" */
2738 YYSYMBOL_keyword_break = 21, /* "'break'" */
2739 YYSYMBOL_keyword_next = 22, /* "'next'" */
2740 YYSYMBOL_keyword_redo = 23, /* "'redo'" */
2741 YYSYMBOL_keyword_retry = 24, /* "'retry'" */
2742 YYSYMBOL_keyword_in = 25, /* "'in'" */
2743 YYSYMBOL_keyword_do = 26, /* "'do'" */
2744 YYSYMBOL_keyword_do_cond = 27, /* "'do' for condition" */
2745 YYSYMBOL_keyword_do_block = 28, /* "'do' for block" */
2746 YYSYMBOL_keyword_do_LAMBDA = 29, /* "'do' for lambda" */
2747 YYSYMBOL_keyword_return = 30, /* "'return'" */
2748 YYSYMBOL_keyword_yield = 31, /* "'yield'" */
2749 YYSYMBOL_keyword_super = 32, /* "'super'" */
2750 YYSYMBOL_keyword_self = 33, /* "'self'" */
2751 YYSYMBOL_keyword_nil = 34, /* "'nil'" */
2752 YYSYMBOL_keyword_true = 35, /* "'true'" */
2753 YYSYMBOL_keyword_false = 36, /* "'false'" */
2754 YYSYMBOL_keyword_and = 37, /* "'and'" */
2755 YYSYMBOL_keyword_or = 38, /* "'or'" */
2756 YYSYMBOL_keyword_not = 39, /* "'not'" */
2757 YYSYMBOL_modifier_if = 40, /* "'if' modifier" */
2758 YYSYMBOL_modifier_unless = 41, /* "'unless' modifier" */
2759 YYSYMBOL_modifier_while = 42, /* "'while' modifier" */
2760 YYSYMBOL_modifier_until = 43, /* "'until' modifier" */
2761 YYSYMBOL_modifier_rescue = 44, /* "'rescue' modifier" */
2762 YYSYMBOL_keyword_alias = 45, /* "'alias'" */
2763 YYSYMBOL_keyword_defined = 46, /* "'defined?'" */
2764 YYSYMBOL_keyword_BEGIN = 47, /* "'BEGIN'" */
2765 YYSYMBOL_keyword_END = 48, /* "'END'" */
2766 YYSYMBOL_keyword__LINE__ = 49, /* "'__LINE__'" */
2767 YYSYMBOL_keyword__FILE__ = 50, /* "'__FILE__'" */
2768 YYSYMBOL_keyword__ENCODING__ = 51, /* "'__ENCODING__'" */
2769 YYSYMBOL_tIDENTIFIER = 52, /* "local variable or method" */
2770 YYSYMBOL_tFID = 53, /* "method" */
2771 YYSYMBOL_tGVAR = 54, /* "global variable" */
2772 YYSYMBOL_tIVAR = 55, /* "instance variable" */
2773 YYSYMBOL_tCONSTANT = 56, /* "constant" */
2774 YYSYMBOL_tCVAR = 57, /* "class variable" */
2775 YYSYMBOL_tLABEL = 58, /* "label" */
2776 YYSYMBOL_tINTEGER = 59, /* "integer literal" */
2777 YYSYMBOL_tFLOAT = 60, /* "float literal" */
2778 YYSYMBOL_tRATIONAL = 61, /* "rational literal" */
2779 YYSYMBOL_tIMAGINARY = 62, /* "imaginary literal" */
2780 YYSYMBOL_tCHAR = 63, /* "char literal" */
2781 YYSYMBOL_tNTH_REF = 64, /* "numbered reference" */
2782 YYSYMBOL_tBACK_REF = 65, /* "back reference" */
2783 YYSYMBOL_tSTRING_CONTENT = 66, /* "literal content" */
2784 YYSYMBOL_tREGEXP_END = 67, /* tREGEXP_END */
2785 YYSYMBOL_tDUMNY_END = 68, /* "dummy end" */
2786 YYSYMBOL_69_ = 69, /* '.' */
2787 YYSYMBOL_70_backslash_ = 70, /* "backslash" */
2788 YYSYMBOL_tSP = 71, /* "escaped space" */
2789 YYSYMBOL_72_escaped_horizontal_tab_ = 72, /* "escaped horizontal tab" */
2790 YYSYMBOL_73_escaped_form_feed_ = 73, /* "escaped form feed" */
2791 YYSYMBOL_74_escaped_carriage_return_ = 74, /* "escaped carriage return" */
2792 YYSYMBOL_75_escaped_vertical_tab_ = 75, /* "escaped vertical tab" */
2793 YYSYMBOL_tUPLUS = 76, /* "unary+" */
2794 YYSYMBOL_tUMINUS = 77, /* "unary-" */
2795 YYSYMBOL_tPOW = 78, /* "**" */
2796 YYSYMBOL_tCMP = 79, /* "<=>" */
2797 YYSYMBOL_tEQ = 80, /* "==" */
2798 YYSYMBOL_tEQQ = 81, /* "===" */
2799 YYSYMBOL_tNEQ = 82, /* "!=" */
2800 YYSYMBOL_tGEQ = 83, /* ">=" */
2801 YYSYMBOL_tLEQ = 84, /* "<=" */
2802 YYSYMBOL_tANDOP = 85, /* "&&" */
2803 YYSYMBOL_tOROP = 86, /* "||" */
2804 YYSYMBOL_tMATCH = 87, /* "=~" */
2805 YYSYMBOL_tNMATCH = 88, /* "!~" */
2806 YYSYMBOL_tDOT2 = 89, /* ".." */
2807 YYSYMBOL_tDOT3 = 90, /* "..." */
2808 YYSYMBOL_tBDOT2 = 91, /* "(.." */
2809 YYSYMBOL_tBDOT3 = 92, /* "(..." */
2810 YYSYMBOL_tAREF = 93, /* "[]" */
2811 YYSYMBOL_tASET = 94, /* "[]=" */
2812 YYSYMBOL_tLSHFT = 95, /* "<<" */
2813 YYSYMBOL_tRSHFT = 96, /* ">>" */
2814 YYSYMBOL_tANDDOT = 97, /* "&." */
2815 YYSYMBOL_tCOLON2 = 98, /* "::" */
2816 YYSYMBOL_tCOLON3 = 99, /* ":: at EXPR_BEG" */
2817 YYSYMBOL_tOP_ASGN = 100, /* "operator-assignment" */
2818 YYSYMBOL_tASSOC = 101, /* "=>" */
2819 YYSYMBOL_tLPAREN = 102, /* "(" */
2820 YYSYMBOL_tLPAREN_ARG = 103, /* "( arg" */
2821 YYSYMBOL_tLBRACK = 104, /* "[" */
2822 YYSYMBOL_tLBRACE = 105, /* "{" */
2823 YYSYMBOL_tLBRACE_ARG = 106, /* "{ arg" */
2824 YYSYMBOL_tSTAR = 107, /* "*" */
2825 YYSYMBOL_tDSTAR = 108, /* "**arg" */
2826 YYSYMBOL_tAMPER = 109, /* "&" */
2827 YYSYMBOL_tLAMBDA = 110, /* "->" */
2828 YYSYMBOL_tSYMBEG = 111, /* "symbol literal" */
2829 YYSYMBOL_tSTRING_BEG = 112, /* "string literal" */
2830 YYSYMBOL_tXSTRING_BEG = 113, /* "backtick literal" */
2831 YYSYMBOL_tREGEXP_BEG = 114, /* "regexp literal" */
2832 YYSYMBOL_tWORDS_BEG = 115, /* "word list" */
2833 YYSYMBOL_tQWORDS_BEG = 116, /* "verbatim word list" */
2834 YYSYMBOL_tSYMBOLS_BEG = 117, /* "symbol list" */
2835 YYSYMBOL_tQSYMBOLS_BEG = 118, /* "verbatim symbol list" */
2836 YYSYMBOL_tSTRING_END = 119, /* "terminator" */
2837 YYSYMBOL_tSTRING_DEND = 120, /* "'}'" */
2838 YYSYMBOL_tSTRING_DBEG = 121, /* "'#{'" */
2839 YYSYMBOL_tSTRING_DVAR = 122, /* tSTRING_DVAR */
2840 YYSYMBOL_tLAMBEG = 123, /* tLAMBEG */
2841 YYSYMBOL_tLABEL_END = 124, /* tLABEL_END */
2842 YYSYMBOL_tIGNORED_NL = 125, /* tIGNORED_NL */
2843 YYSYMBOL_tCOMMENT = 126, /* tCOMMENT */
2844 YYSYMBOL_tEMBDOC_BEG = 127, /* tEMBDOC_BEG */
2845 YYSYMBOL_tEMBDOC = 128, /* tEMBDOC */
2846 YYSYMBOL_tEMBDOC_END = 129, /* tEMBDOC_END */
2847 YYSYMBOL_tHEREDOC_BEG = 130, /* tHEREDOC_BEG */
2848 YYSYMBOL_tHEREDOC_END = 131, /* tHEREDOC_END */
2849 YYSYMBOL_k__END__ = 132, /* k__END__ */
2850 YYSYMBOL_tLOWEST = 133, /* tLOWEST */
2851 YYSYMBOL_134_ = 134, /* '=' */
2852 YYSYMBOL_135_ = 135, /* '?' */
2853 YYSYMBOL_136_ = 136, /* ':' */
2854 YYSYMBOL_137_ = 137, /* '>' */
2855 YYSYMBOL_138_ = 138, /* '<' */
2856 YYSYMBOL_139_ = 139, /* '|' */
2857 YYSYMBOL_140_ = 140, /* '^' */
2858 YYSYMBOL_141_ = 141, /* '&' */
2859 YYSYMBOL_142_ = 142, /* '+' */
2860 YYSYMBOL_143_ = 143, /* '-' */
2861 YYSYMBOL_144_ = 144, /* '*' */
2862 YYSYMBOL_145_ = 145, /* '/' */
2863 YYSYMBOL_146_ = 146, /* '%' */
2864 YYSYMBOL_tUMINUS_NUM = 147, /* tUMINUS_NUM */
2865 YYSYMBOL_148_ = 148, /* '!' */
2866 YYSYMBOL_149_ = 149, /* '~' */
2867 YYSYMBOL_tLAST_TOKEN = 150, /* tLAST_TOKEN */
2868 YYSYMBOL_151_ = 151, /* '{' */
2869 YYSYMBOL_152_ = 152, /* '}' */
2870 YYSYMBOL_153_ = 153, /* '[' */
2871 YYSYMBOL_154_n_ = 154, /* '\n' */
2872 YYSYMBOL_155_ = 155, /* ',' */
2873 YYSYMBOL_156_ = 156, /* '`' */
2874 YYSYMBOL_157_ = 157, /* '(' */
2875 YYSYMBOL_158_ = 158, /* ')' */
2876 YYSYMBOL_159_ = 159, /* ']' */
2877 YYSYMBOL_160_ = 160, /* ';' */
2878 YYSYMBOL_161_ = 161, /* ' ' */
2879 YYSYMBOL_YYACCEPT = 162, /* $accept */
2880 YYSYMBOL_option_terms = 163, /* option_terms */
2881 YYSYMBOL_compstmt_top_stmts = 164, /* compstmt_top_stmts */
2882 YYSYMBOL_165_1 = 165, /* $@1 */
2883 YYSYMBOL_program = 166, /* program */
2884 YYSYMBOL_top_stmts = 167, /* top_stmts */
2885 YYSYMBOL_top_stmt = 168, /* top_stmt */
2886 YYSYMBOL_block_open = 169, /* block_open */
2887 YYSYMBOL_begin_block = 170, /* begin_block */
2888 YYSYMBOL_compstmt_stmts = 171, /* compstmt_stmts */
2889 YYSYMBOL_172_2 = 172, /* $@2 */
2890 YYSYMBOL_173_3 = 173, /* $@3 */
2891 YYSYMBOL_bodystmt = 174, /* bodystmt */
2892 YYSYMBOL_175_4 = 175, /* $@4 */
2893 YYSYMBOL_stmts = 176, /* stmts */
2894 YYSYMBOL_stmt_or_begin = 177, /* stmt_or_begin */
2895 YYSYMBOL_178_5 = 178, /* $@5 */
2896 YYSYMBOL_allow_exits = 179, /* allow_exits */
2897 YYSYMBOL_k_END = 180, /* k_END */
2898 YYSYMBOL_181_6 = 181, /* $@6 */
2899 YYSYMBOL_stmt = 182, /* stmt */
2900 YYSYMBOL_asgn_mrhs = 183, /* asgn_mrhs */
2901 YYSYMBOL_asgn_command_rhs = 184, /* asgn_command_rhs */
2902 YYSYMBOL_command_asgn = 185, /* command_asgn */
2903 YYSYMBOL_op_asgn_command_rhs = 186, /* op_asgn_command_rhs */
2904 YYSYMBOL_def_endless_method_endless_command = 187, /* def_endless_method_endless_command */
2905 YYSYMBOL_endless_command = 188, /* endless_command */
2906 YYSYMBOL_option__n_ = 189, /* option_'\n' */
2907 YYSYMBOL_command_rhs = 190, /* command_rhs */
2908 YYSYMBOL_expr = 191, /* expr */
2909 YYSYMBOL_192_7 = 192, /* $@7 */
2910 YYSYMBOL_193_8 = 193, /* $@8 */
2911 YYSYMBOL_def_name = 194, /* def_name */
2912 YYSYMBOL_defn_head = 195, /* defn_head */
2913 YYSYMBOL_196_9 = 196, /* $@9 */
2914 YYSYMBOL_defs_head = 197, /* defs_head */
2915 YYSYMBOL_value_expr_expr = 198, /* value_expr_expr */
2916 YYSYMBOL_expr_value = 199, /* expr_value */
2917 YYSYMBOL_200_10 = 200, /* $@10 */
2918 YYSYMBOL_201_11 = 201, /* $@11 */
2919 YYSYMBOL_expr_value_do = 202, /* expr_value_do */
2920 YYSYMBOL_command_call = 203, /* command_call */
2921 YYSYMBOL_value_expr_command_call = 204, /* value_expr_command_call */
2922 YYSYMBOL_command_call_value = 205, /* command_call_value */
2923 YYSYMBOL_block_command = 206, /* block_command */
2924 YYSYMBOL_cmd_brace_block = 207, /* cmd_brace_block */
2925 YYSYMBOL_fcall = 208, /* fcall */
2926 YYSYMBOL_command = 209, /* command */
2927 YYSYMBOL_mlhs = 210, /* mlhs */
2928 YYSYMBOL_mlhs_inner = 211, /* mlhs_inner */
2929 YYSYMBOL_mlhs_basic = 212, /* mlhs_basic */
2930 YYSYMBOL_mlhs_items_mlhs_item = 213, /* mlhs_items_mlhs_item */
2931 YYSYMBOL_mlhs_item = 214, /* mlhs_item */
2932 YYSYMBOL_mlhs_head = 215, /* mlhs_head */
2933 YYSYMBOL_mlhs_node = 216, /* mlhs_node */
2934 YYSYMBOL_lhs = 217, /* lhs */
2935 YYSYMBOL_cname = 218, /* cname */
2936 YYSYMBOL_cpath = 219, /* cpath */
2937 YYSYMBOL_fname = 220, /* fname */
2938 YYSYMBOL_fitem = 221, /* fitem */
2939 YYSYMBOL_undef_list = 222, /* undef_list */
2940 YYSYMBOL_223_12 = 223, /* $@12 */
2941 YYSYMBOL_op = 224, /* op */
2942 YYSYMBOL_reswords = 225, /* reswords */
2943 YYSYMBOL_asgn_arg_rhs = 226, /* asgn_arg_rhs */
2944 YYSYMBOL_arg = 227, /* arg */
2945 YYSYMBOL_op_asgn_arg_rhs = 228, /* op_asgn_arg_rhs */
2946 YYSYMBOL_range_expr_arg = 229, /* range_expr_arg */
2947 YYSYMBOL_def_endless_method_endless_arg = 230, /* def_endless_method_endless_arg */
2948 YYSYMBOL_ternary = 231, /* ternary */
2949 YYSYMBOL_endless_arg = 232, /* endless_arg */
2950 YYSYMBOL_relop = 233, /* relop */
2951 YYSYMBOL_rel_expr = 234, /* rel_expr */
2952 YYSYMBOL_lex_ctxt = 235, /* lex_ctxt */
2953 YYSYMBOL_begin_defined = 236, /* begin_defined */
2954 YYSYMBOL_after_rescue = 237, /* after_rescue */
2955 YYSYMBOL_value_expr_arg = 238, /* value_expr_arg */
2956 YYSYMBOL_arg_value = 239, /* arg_value */
2957 YYSYMBOL_aref_args = 240, /* aref_args */
2958 YYSYMBOL_arg_rhs = 241, /* arg_rhs */
2959 YYSYMBOL_paren_args = 242, /* paren_args */
2960 YYSYMBOL_opt_paren_args = 243, /* opt_paren_args */
2961 YYSYMBOL_opt_call_args = 244, /* opt_call_args */
2962 YYSYMBOL_value_expr_command = 245, /* value_expr_command */
2963 YYSYMBOL_call_args = 246, /* call_args */
2964 YYSYMBOL_247_13 = 247, /* $@13 */
2965 YYSYMBOL_command_args = 248, /* command_args */
2966 YYSYMBOL_block_arg = 249, /* block_arg */
2967 YYSYMBOL_opt_block_arg = 250, /* opt_block_arg */
2968 YYSYMBOL_args = 251, /* args */
2969 YYSYMBOL_arg_splat = 252, /* arg_splat */
2970 YYSYMBOL_mrhs_arg = 253, /* mrhs_arg */
2971 YYSYMBOL_mrhs = 254, /* mrhs */
2972 YYSYMBOL_primary = 255, /* primary */
2973 YYSYMBOL_256_14 = 256, /* $@14 */
2974 YYSYMBOL_257_15 = 257, /* $@15 */
2975 YYSYMBOL_258_16 = 258, /* @16 */
2976 YYSYMBOL_259_17 = 259, /* @17 */
2977 YYSYMBOL_260_18 = 260, /* $@18 */
2978 YYSYMBOL_261_19 = 261, /* $@19 */
2979 YYSYMBOL_262_20 = 262, /* $@20 */
2980 YYSYMBOL_263_21 = 263, /* $@21 */
2981 YYSYMBOL_264_22 = 264, /* $@22 */
2982 YYSYMBOL_265_23 = 265, /* $@23 */
2983 YYSYMBOL_266_24 = 266, /* $@24 */
2984 YYSYMBOL_value_expr_primary = 267, /* value_expr_primary */
2985 YYSYMBOL_primary_value = 268, /* primary_value */
2986 YYSYMBOL_k_begin = 269, /* k_begin */
2987 YYSYMBOL_k_if = 270, /* k_if */
2988 YYSYMBOL_k_unless = 271, /* k_unless */
2989 YYSYMBOL_k_while = 272, /* k_while */
2990 YYSYMBOL_k_until = 273, /* k_until */
2991 YYSYMBOL_k_case = 274, /* k_case */
2992 YYSYMBOL_k_for = 275, /* k_for */
2993 YYSYMBOL_k_class = 276, /* k_class */
2994 YYSYMBOL_k_module = 277, /* k_module */
2995 YYSYMBOL_k_def = 278, /* k_def */
2996 YYSYMBOL_k_do = 279, /* k_do */
2997 YYSYMBOL_k_do_block = 280, /* k_do_block */
2998 YYSYMBOL_k_rescue = 281, /* k_rescue */
2999 YYSYMBOL_k_ensure = 282, /* k_ensure */
3000 YYSYMBOL_k_when = 283, /* k_when */
3001 YYSYMBOL_k_else = 284, /* k_else */
3002 YYSYMBOL_k_elsif = 285, /* k_elsif */
3003 YYSYMBOL_k_end = 286, /* k_end */
3004 YYSYMBOL_k_return = 287, /* k_return */
3005 YYSYMBOL_k_yield = 288, /* k_yield */
3006 YYSYMBOL_then = 289, /* then */
3007 YYSYMBOL_do = 290, /* do */
3008 YYSYMBOL_if_tail = 291, /* if_tail */
3009 YYSYMBOL_opt_else = 292, /* opt_else */
3010 YYSYMBOL_for_var = 293, /* for_var */
3011 YYSYMBOL_f_marg = 294, /* f_marg */
3012 YYSYMBOL_mlhs_items_f_marg = 295, /* mlhs_items_f_marg */
3013 YYSYMBOL_f_margs = 296, /* f_margs */
3014 YYSYMBOL_f_rest_marg = 297, /* f_rest_marg */
3015 YYSYMBOL_f_any_kwrest = 298, /* f_any_kwrest */
3016 YYSYMBOL_299_25 = 299, /* $@25 */
3017 YYSYMBOL_f_eq = 300, /* f_eq */
3018 YYSYMBOL_f_kw_primary_value = 301, /* f_kw_primary_value */
3019 YYSYMBOL_f_kwarg_primary_value = 302, /* f_kwarg_primary_value */
3020 YYSYMBOL_opt_f_block_arg_none = 303, /* opt_f_block_arg_none */
3021 YYSYMBOL_args_tail_basic_primary_value_none = 304, /* args_tail_basic_primary_value_none */
3022 YYSYMBOL_block_args_tail = 305, /* block_args_tail */
3023 YYSYMBOL_excessed_comma = 306, /* excessed_comma */
3024 YYSYMBOL_f_opt_primary_value = 307, /* f_opt_primary_value */
3025 YYSYMBOL_f_opt_arg_primary_value = 308, /* f_opt_arg_primary_value */
3026 YYSYMBOL_opt_args_tail_block_args_tail_none = 309, /* opt_args_tail_block_args_tail_none */
3027 YYSYMBOL_args_list_primary_value_opt_args_tail_block_args_tail_none = 310, /* args-list_primary_value_opt_args_tail_block_args_tail_none */
3028 YYSYMBOL_block_param = 311, /* block_param */
3029 YYSYMBOL_tail_only_args_block_args_tail = 312, /* tail-only-args_block_args_tail */
3030 YYSYMBOL_opt_block_param_def = 313, /* opt_block_param_def */
3031 YYSYMBOL_block_param_def = 314, /* block_param_def */
3032 YYSYMBOL_opt_block_param = 315, /* opt_block_param */
3033 YYSYMBOL_opt_bv_decl = 316, /* opt_bv_decl */
3034 YYSYMBOL_bv_decls = 317, /* bv_decls */
3035 YYSYMBOL_bvar = 318, /* bvar */
3036 YYSYMBOL_max_numparam = 319, /* max_numparam */
3037 YYSYMBOL_numparam = 320, /* numparam */
3038 YYSYMBOL_it_id = 321, /* it_id */
3039 YYSYMBOL_322_26 = 322, /* @26 */
3040 YYSYMBOL_323_27 = 323, /* $@27 */
3041 YYSYMBOL_lambda = 324, /* lambda */
3042 YYSYMBOL_f_larglist = 325, /* f_larglist */
3043 YYSYMBOL_lambda_body = 326, /* lambda_body */
3044 YYSYMBOL_327_28 = 327, /* $@28 */
3045 YYSYMBOL_do_block = 328, /* do_block */
3046 YYSYMBOL_block_call = 329, /* block_call */
3047 YYSYMBOL_method_call = 330, /* method_call */
3048 YYSYMBOL_brace_block = 331, /* brace_block */
3049 YYSYMBOL_332_29 = 332, /* @29 */
3050 YYSYMBOL_brace_body = 333, /* brace_body */
3051 YYSYMBOL_334_30 = 334, /* @30 */
3052 YYSYMBOL_do_body = 335, /* do_body */
3053 YYSYMBOL_case_args = 336, /* case_args */
3054 YYSYMBOL_case_body = 337, /* case_body */
3055 YYSYMBOL_cases = 338, /* cases */
3056 YYSYMBOL_p_pvtbl = 339, /* p_pvtbl */
3057 YYSYMBOL_p_pktbl = 340, /* p_pktbl */
3058 YYSYMBOL_p_in_kwarg = 341, /* p_in_kwarg */
3059 YYSYMBOL_342_31 = 342, /* $@31 */
3060 YYSYMBOL_p_case_body = 343, /* p_case_body */
3061 YYSYMBOL_p_cases = 344, /* p_cases */
3062 YYSYMBOL_p_top_expr = 345, /* p_top_expr */
3063 YYSYMBOL_p_top_expr_body = 346, /* p_top_expr_body */
3064 YYSYMBOL_p_expr = 347, /* p_expr */
3065 YYSYMBOL_p_as = 348, /* p_as */
3066 YYSYMBOL_349_32 = 349, /* $@32 */
3067 YYSYMBOL_p_alt = 350, /* p_alt */
3068 YYSYMBOL_p_lparen = 351, /* p_lparen */
3069 YYSYMBOL_p_lbracket = 352, /* p_lbracket */
3070 YYSYMBOL_p_expr_basic = 353, /* p_expr_basic */
3071 YYSYMBOL_354_33 = 354, /* $@33 */
3072 YYSYMBOL_p_args = 355, /* p_args */
3073 YYSYMBOL_p_args_head = 356, /* p_args_head */
3074 YYSYMBOL_p_args_tail = 357, /* p_args_tail */
3075 YYSYMBOL_p_find = 358, /* p_find */
3076 YYSYMBOL_p_rest = 359, /* p_rest */
3077 YYSYMBOL_p_args_post = 360, /* p_args_post */
3078 YYSYMBOL_p_arg = 361, /* p_arg */
3079 YYSYMBOL_p_kwargs = 362, /* p_kwargs */
3080 YYSYMBOL_p_kwarg = 363, /* p_kwarg */
3081 YYSYMBOL_p_kw = 364, /* p_kw */
3082 YYSYMBOL_p_kw_label = 365, /* p_kw_label */
3083 YYSYMBOL_p_kwrest = 366, /* p_kwrest */
3084 YYSYMBOL_p_kwnorest = 367, /* p_kwnorest */
3085 YYSYMBOL_p_any_kwrest = 368, /* p_any_kwrest */
3086 YYSYMBOL_p_value = 369, /* p_value */
3087 YYSYMBOL_range_expr_p_primitive = 370, /* range_expr_p_primitive */
3088 YYSYMBOL_p_primitive = 371, /* p_primitive */
3089 YYSYMBOL_p_variable = 372, /* p_variable */
3090 YYSYMBOL_p_var_ref = 373, /* p_var_ref */
3091 YYSYMBOL_p_expr_ref = 374, /* p_expr_ref */
3092 YYSYMBOL_p_const = 375, /* p_const */
3093 YYSYMBOL_opt_rescue = 376, /* opt_rescue */
3094 YYSYMBOL_exc_list = 377, /* exc_list */
3095 YYSYMBOL_exc_var = 378, /* exc_var */
3096 YYSYMBOL_opt_ensure = 379, /* opt_ensure */
3097 YYSYMBOL_literal = 380, /* literal */
3098 YYSYMBOL_strings = 381, /* strings */
3099 YYSYMBOL_string = 382, /* string */
3100 YYSYMBOL_string1 = 383, /* string1 */
3101 YYSYMBOL_xstring = 384, /* xstring */
3102 YYSYMBOL_regexp = 385, /* regexp */
3103 YYSYMBOL_nonempty_list__ = 386, /* nonempty_list_' ' */
3104 YYSYMBOL_words_tWORDS_BEG_word_list = 387, /* words_tWORDS_BEG_word_list */
3105 YYSYMBOL_words = 388, /* words */
3106 YYSYMBOL_word_list = 389, /* word_list */
3107 YYSYMBOL_word = 390, /* word */
3108 YYSYMBOL_words_tSYMBOLS_BEG_symbol_list = 391, /* words_tSYMBOLS_BEG_symbol_list */
3109 YYSYMBOL_symbols = 392, /* symbols */
3110 YYSYMBOL_symbol_list = 393, /* symbol_list */
3111 YYSYMBOL_words_tQWORDS_BEG_qword_list = 394, /* words_tQWORDS_BEG_qword_list */
3112 YYSYMBOL_qwords = 395, /* qwords */
3113 YYSYMBOL_words_tQSYMBOLS_BEG_qsym_list = 396, /* words_tQSYMBOLS_BEG_qsym_list */
3114 YYSYMBOL_qsymbols = 397, /* qsymbols */
3115 YYSYMBOL_qword_list = 398, /* qword_list */
3116 YYSYMBOL_qsym_list = 399, /* qsym_list */
3117 YYSYMBOL_string_contents = 400, /* string_contents */
3118 YYSYMBOL_xstring_contents = 401, /* xstring_contents */
3119 YYSYMBOL_regexp_contents = 402, /* regexp_contents */
3120 YYSYMBOL_string_content = 403, /* string_content */
3121 YYSYMBOL_404_34 = 404, /* @34 */
3122 YYSYMBOL_405_35 = 405, /* @35 */
3123 YYSYMBOL_406_36 = 406, /* @36 */
3124 YYSYMBOL_407_37 = 407, /* @37 */
3125 YYSYMBOL_string_dend = 408, /* string_dend */
3126 YYSYMBOL_string_dvar = 409, /* string_dvar */
3127 YYSYMBOL_symbol = 410, /* symbol */
3128 YYSYMBOL_ssym = 411, /* ssym */
3129 YYSYMBOL_sym = 412, /* sym */
3130 YYSYMBOL_dsym = 413, /* dsym */
3131 YYSYMBOL_numeric = 414, /* numeric */
3132 YYSYMBOL_simple_numeric = 415, /* simple_numeric */
3133 YYSYMBOL_nonlocal_var = 416, /* nonlocal_var */
3134 YYSYMBOL_user_variable = 417, /* user_variable */
3135 YYSYMBOL_keyword_variable = 418, /* keyword_variable */
3136 YYSYMBOL_var_ref = 419, /* var_ref */
3137 YYSYMBOL_var_lhs = 420, /* var_lhs */
3138 YYSYMBOL_backref = 421, /* backref */
3139 YYSYMBOL_422_38 = 422, /* $@38 */
3140 YYSYMBOL_superclass = 423, /* superclass */
3141 YYSYMBOL_f_opt_paren_args = 424, /* f_opt_paren_args */
3142 YYSYMBOL_f_empty_arg = 425, /* f_empty_arg */
3143 YYSYMBOL_f_paren_args = 426, /* f_paren_args */
3144 YYSYMBOL_f_arglist = 427, /* f_arglist */
3145 YYSYMBOL_428_39 = 428, /* @39 */
3146 YYSYMBOL_f_kw_arg_value = 429, /* f_kw_arg_value */
3147 YYSYMBOL_f_kwarg_arg_value = 430, /* f_kwarg_arg_value */
3148 YYSYMBOL_opt_f_block_arg_opt_comma = 431, /* opt_f_block_arg_opt_comma */
3149 YYSYMBOL_args_tail_basic_arg_value_opt_comma = 432, /* args_tail_basic_arg_value_opt_comma */
3150 YYSYMBOL_args_tail = 433, /* args_tail */
3151 YYSYMBOL_args_tail_basic_arg_value_none = 434, /* args_tail_basic_arg_value_none */
3152 YYSYMBOL_largs_tail = 435, /* largs_tail */
3153 YYSYMBOL_f_opt_arg_value = 436, /* f_opt_arg_value */
3154 YYSYMBOL_f_opt_arg_arg_value = 437, /* f_opt_arg_arg_value */
3155 YYSYMBOL_opt_args_tail_args_tail_opt_comma = 438, /* opt_args_tail_args_tail_opt_comma */
3156 YYSYMBOL_args_list_arg_value_opt_args_tail_args_tail_opt_comma = 439, /* args-list_arg_value_opt_args_tail_args_tail_opt_comma */
3157 YYSYMBOL_f_args_list_args_tail_opt_comma = 440, /* f_args-list_args_tail_opt_comma */
3158 YYSYMBOL_tail_only_args_args_tail = 441, /* tail-only-args_args_tail */
3159 YYSYMBOL_f_args = 442, /* f_args */
3160 YYSYMBOL_opt_args_tail_largs_tail_none = 443, /* opt_args_tail_largs_tail_none */
3161 YYSYMBOL_args_list_arg_value_opt_args_tail_largs_tail_none = 444, /* args-list_arg_value_opt_args_tail_largs_tail_none */
3162 YYSYMBOL_f_args_list_largs_tail_none = 445, /* f_args-list_largs_tail_none */
3163 YYSYMBOL_tail_only_args_largs_tail = 446, /* tail-only-args_largs_tail */
3164 YYSYMBOL_f_largs = 447, /* f_largs */
3165 YYSYMBOL_args_forward = 448, /* args_forward */
3166 YYSYMBOL_f_bad_arg = 449, /* f_bad_arg */
3167 YYSYMBOL_f_norm_arg = 450, /* f_norm_arg */
3168 YYSYMBOL_f_arg_asgn = 451, /* f_arg_asgn */
3169 YYSYMBOL_f_arg_item = 452, /* f_arg_item */
3170 YYSYMBOL_f_arg = 453, /* f_arg */
3171 YYSYMBOL_f_label = 454, /* f_label */
3172 YYSYMBOL_kwrest_mark = 455, /* kwrest_mark */
3173 YYSYMBOL_f_no_kwarg = 456, /* f_no_kwarg */
3174 YYSYMBOL_f_kwrest = 457, /* f_kwrest */
3175 YYSYMBOL_restarg_mark = 458, /* restarg_mark */
3176 YYSYMBOL_f_rest_arg = 459, /* f_rest_arg */
3177 YYSYMBOL_blkarg_mark = 460, /* blkarg_mark */
3178 YYSYMBOL_f_block_arg = 461, /* f_block_arg */
3179 YYSYMBOL_option__ = 462, /* option_',' */
3180 YYSYMBOL_opt_comma = 463, /* opt_comma */
3181 YYSYMBOL_value_expr_singleton_expr = 464, /* value_expr_singleton_expr */
3182 YYSYMBOL_singleton = 465, /* singleton */
3183 YYSYMBOL_singleton_expr = 466, /* singleton_expr */
3184 YYSYMBOL_467_40 = 467, /* $@40 */
3185 YYSYMBOL_assoc_list = 468, /* assoc_list */
3186 YYSYMBOL_assocs = 469, /* assocs */
3187 YYSYMBOL_assoc = 470, /* assoc */
3188 YYSYMBOL_operation2 = 471, /* operation2 */
3189 YYSYMBOL_operation3 = 472, /* operation3 */
3190 YYSYMBOL_dot_or_colon = 473, /* dot_or_colon */
3191 YYSYMBOL_call_op = 474, /* call_op */
3192 YYSYMBOL_call_op2 = 475, /* call_op2 */
3193 YYSYMBOL_rparen = 476, /* rparen */
3194 YYSYMBOL_rbracket = 477, /* rbracket */
3195 YYSYMBOL_rbrace = 478, /* rbrace */
3196 YYSYMBOL_trailer = 479, /* trailer */
3197 YYSYMBOL_term = 480, /* term */
3198 YYSYMBOL_terms = 481, /* terms */
3199 YYSYMBOL_none = 482 /* none */
3200};
3201typedef enum yysymbol_kind_t yysymbol_kind_t;
3202
3203
3204
3205
3206#ifdef short
3207# undef short
3208#endif
3209
3210/* On compilers that do not define __PTRDIFF_MAX__ etc., make sure
3211 <limits.h> and (if available) <stdint.h> are included
3212 so that the code can choose integer types of a good width. */
3213
3214#ifndef __PTRDIFF_MAX__
3215# include <limits.h> /* INFRINGES ON USER NAME SPACE */
3216# if defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__
3217# include <stdint.h> /* INFRINGES ON USER NAME SPACE */
3218# define YY_STDINT_H
3219# endif
3220#endif
3221
3222/* Narrow types that promote to a signed type and that can represent a
3223 signed or unsigned integer of at least N bits. In tables they can
3224 save space and decrease cache pressure. Promoting to a signed type
3225 helps avoid bugs in integer arithmetic. */
3226
3227#ifdef __INT_LEAST8_MAX__
3228typedef __INT_LEAST8_TYPE__ yytype_int8;
3229#elif defined YY_STDINT_H
3230typedef int_least8_t yytype_int8;
3231#else
3232typedef signed char yytype_int8;
3233#endif
3234
3235#ifdef __INT_LEAST16_MAX__
3236typedef __INT_LEAST16_TYPE__ yytype_int16;
3237#elif defined YY_STDINT_H
3238typedef int_least16_t yytype_int16;
3239#else
3240typedef short yytype_int16;
3241#endif
3242
3243/* Work around bug in HP-UX 11.23, which defines these macros
3244 incorrectly for preprocessor constants. This workaround can likely
3245 be removed in 2023, as HPE has promised support for HP-UX 11.23
3246 (aka HP-UX 11i v2) only through the end of 2022; see Table 2 of
3247 <https://h20195.www2.hpe.com/V2/getpdf.aspx/4AA4-7673ENW.pdf>. */
3248#ifdef __hpux
3249# undef UINT_LEAST8_MAX
3250# undef UINT_LEAST16_MAX
3251# define UINT_LEAST8_MAX 255
3252# define UINT_LEAST16_MAX 65535
3253#endif
3254
3255#if defined __UINT_LEAST8_MAX__ && __UINT_LEAST8_MAX__ <= __INT_MAX__
3256typedef __UINT_LEAST8_TYPE__ yytype_uint8;
3257#elif (!defined __UINT_LEAST8_MAX__ && defined YY_STDINT_H \
3258 && UINT_LEAST8_MAX <= INT_MAX)
3259typedef uint_least8_t yytype_uint8;
3260#elif !defined __UINT_LEAST8_MAX__ && UCHAR_MAX <= INT_MAX
3261typedef unsigned char yytype_uint8;
3262#else
3263typedef short yytype_uint8;
3264#endif
3265
3266#if defined __UINT_LEAST16_MAX__ && __UINT_LEAST16_MAX__ <= __INT_MAX__
3267typedef __UINT_LEAST16_TYPE__ yytype_uint16;
3268#elif (!defined __UINT_LEAST16_MAX__ && defined YY_STDINT_H \
3269 && UINT_LEAST16_MAX <= INT_MAX)
3270typedef uint_least16_t yytype_uint16;
3271#elif !defined __UINT_LEAST16_MAX__ && USHRT_MAX <= INT_MAX
3272typedef unsigned short yytype_uint16;
3273#else
3274typedef int yytype_uint16;
3275#endif
3276
3277#ifndef YYPTRDIFF_T
3278# if defined __PTRDIFF_TYPE__ && defined __PTRDIFF_MAX__
3279# define YYPTRDIFF_T __PTRDIFF_TYPE__
3280# define YYPTRDIFF_MAXIMUM __PTRDIFF_MAX__
3281# elif defined PTRDIFF_MAX
3282# ifndef ptrdiff_t
3283# include <stddef.h> /* INFRINGES ON USER NAME SPACE */
3284# endif
3285# define YYPTRDIFF_T ptrdiff_t
3286# define YYPTRDIFF_MAXIMUM PTRDIFF_MAX
3287# else
3288# define YYPTRDIFF_T long
3289# define YYPTRDIFF_MAXIMUM LONG_MAX
3290# endif
3291#endif
3292
3293#ifndef YYSIZE_T
3294# ifdef __SIZE_TYPE__
3295# define YYSIZE_T __SIZE_TYPE__
3296# elif defined size_t
3297# define YYSIZE_T size_t
3298# elif defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__
3299# include <stddef.h> /* INFRINGES ON USER NAME SPACE */
3300# define YYSIZE_T size_t
3301# else
3302# define YYSIZE_T unsigned
3303# endif
3304#endif
3305
3306#define YYSIZE_MAXIMUM \
3307 YY_CAST (YYPTRDIFF_T, \
3308 (YYPTRDIFF_MAXIMUM < YY_CAST (YYSIZE_T, -1) \
3309 ? YYPTRDIFF_MAXIMUM \
3310 : YY_CAST (YYSIZE_T, -1)))
3311
3312#define YYSIZEOF(X) YY_CAST (YYPTRDIFF_T, sizeof (X))
3313
3314
3315/* Stored state numbers (used for stacks). */
3316typedef yytype_int16 yy_state_t;
3317
3318/* State numbers in computations. */
3319typedef int yy_state_fast_t;
3320
3321#ifndef YY_
3322# if defined YYENABLE_NLS && YYENABLE_NLS
3323# if ENABLE_NLS
3324# include <libintl.h> /* INFRINGES ON USER NAME SPACE */
3325# define YY_(Msgid) dgettext ("bison-runtime", Msgid)
3326# endif
3327# endif
3328# ifndef YY_
3329# define YY_(Msgid) Msgid
3330# endif
3331#endif
3332
3333
3334#ifndef YY_ATTRIBUTE_PURE
3335# if defined __GNUC__ && 2 < __GNUC__ + (96 <= __GNUC_MINOR__)
3336# define YY_ATTRIBUTE_PURE __attribute__ ((__pure__))
3337# else
3338# define YY_ATTRIBUTE_PURE
3339# endif
3340#endif
3341
3342#ifndef YY_ATTRIBUTE_UNUSED
3343# if defined __GNUC__ && 2 < __GNUC__ + (7 <= __GNUC_MINOR__)
3344# define YY_ATTRIBUTE_UNUSED __attribute__ ((__unused__))
3345# else
3346# define YY_ATTRIBUTE_UNUSED
3347# endif
3348#endif
3349
3350/* Suppress unused-variable warnings by "using" E. */
3351#if ! defined lint || defined __GNUC__
3352# define YY_USE(E) ((void) (E))
3353#else
3354# define YY_USE(E) /* empty */
3355#endif
3356
3357/* Suppress an incorrect diagnostic about yylval being uninitialized. */
3358#if defined __GNUC__ && ! defined __ICC && 406 <= __GNUC__ * 100 + __GNUC_MINOR__
3359# if __GNUC__ * 100 + __GNUC_MINOR__ < 407
3360# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \
3361 _Pragma ("GCC diagnostic push") \
3362 _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")
3363# else
3364# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \
3365 _Pragma ("GCC diagnostic push") \
3366 _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"") \
3367 _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
3368# endif
3369# define YY_IGNORE_MAYBE_UNINITIALIZED_END \
3370 _Pragma ("GCC diagnostic pop")
3371#else
3372# define YY_INITIAL_VALUE(Value) Value
3373#endif
3374#ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
3375# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
3376# define YY_IGNORE_MAYBE_UNINITIALIZED_END
3377#endif
3378#ifndef YY_INITIAL_VALUE
3379# define YY_INITIAL_VALUE(Value) /* Nothing. */
3380#endif
3381
3382#if defined __cplusplus && defined __GNUC__ && ! defined __ICC && 6 <= __GNUC__
3383# define YY_IGNORE_USELESS_CAST_BEGIN \
3384 _Pragma ("GCC diagnostic push") \
3385 _Pragma ("GCC diagnostic ignored \"-Wuseless-cast\"")
3386# define YY_IGNORE_USELESS_CAST_END \
3387 _Pragma ("GCC diagnostic pop")
3388#endif
3389#ifndef YY_IGNORE_USELESS_CAST_BEGIN
3390# define YY_IGNORE_USELESS_CAST_BEGIN
3391# define YY_IGNORE_USELESS_CAST_END
3392#endif
3393
3394
3395#define YY_ASSERT(E) ((void) (0 && (E)))
3396
3397#if 1
3398
3399/* The parser invokes alloca or malloc; define the necessary symbols. */
3400
3401# ifdef YYSTACK_USE_ALLOCA
3402# if YYSTACK_USE_ALLOCA
3403# ifdef __GNUC__
3404# define YYSTACK_ALLOC __builtin_alloca
3405# elif defined __BUILTIN_VA_ARG_INCR
3406# include <alloca.h> /* INFRINGES ON USER NAME SPACE */
3407# elif defined _AIX
3408# define YYSTACK_ALLOC __alloca
3409# elif defined _MSC_VER
3410# include <malloc.h> /* INFRINGES ON USER NAME SPACE */
3411# define alloca _alloca
3412# else
3413# define YYSTACK_ALLOC alloca
3414# if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS
3415# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
3416 /* Use EXIT_SUCCESS as a witness for stdlib.h. */
3417# ifndef EXIT_SUCCESS
3418# define EXIT_SUCCESS 0
3419# endif
3420# endif
3421# endif
3422# endif
3423# endif
3424
3425# ifdef YYSTACK_ALLOC
3426 /* Pacify GCC's 'empty if-body' warning. */
3427# define YYSTACK_FREE(Ptr) do { /* empty */; } while (0)
3428# ifndef YYSTACK_ALLOC_MAXIMUM
3429 /* The OS might guarantee only one guard page at the bottom of the stack,
3430 and a page size can be as small as 4096 bytes. So we cannot safely
3431 invoke alloca (N) if N exceeds 4096. Use a slightly smaller number
3432 to allow for a few compiler-allocated temporary stack slots. */
3433# define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
3434# endif
3435# else
3436# define YYSTACK_ALLOC YYMALLOC
3437# define YYSTACK_FREE YYFREE
3438# ifndef YYSTACK_ALLOC_MAXIMUM
3439# define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
3440# endif
3441# if (defined __cplusplus && ! defined EXIT_SUCCESS \
3442 && ! ((defined YYMALLOC || defined malloc) \
3443 && (defined YYFREE || defined free)))
3444# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
3445# ifndef EXIT_SUCCESS
3446# define EXIT_SUCCESS 0
3447# endif
3448# endif
3449# ifndef YYMALLOC
3450# define YYMALLOC malloc
3451# if ! defined malloc && ! defined EXIT_SUCCESS
3452void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
3453# endif
3454# endif
3455# ifndef YYFREE
3456# define YYFREE free
3457# if ! defined free && ! defined EXIT_SUCCESS
3458void free (void *); /* INFRINGES ON USER NAME SPACE */
3459# endif
3460# endif
3461# endif
3462#endif /* 1 */
3463
3464#if (! defined yyoverflow \
3465 && (! defined __cplusplus \
3466 || (defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL \
3467 && defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
3468
3469/* A type that is properly aligned for any stack member. */
3470union yyalloc
3471{
3472 yy_state_t yyss_alloc;
3473 YYSTYPE yyvs_alloc;
3474 YYLTYPE yyls_alloc;
3475};
3476
3477/* The size of the maximum gap between one aligned stack and the next. */
3478# define YYSTACK_GAP_MAXIMUM (YYSIZEOF (union yyalloc) - 1)
3479
3480/* The size of an array large to enough to hold all stacks, each with
3481 N elements. */
3482# define YYSTACK_BYTES(N) \
3483 ((N) * (YYSIZEOF (yy_state_t) + YYSIZEOF (YYSTYPE) \
3484 + YYSIZEOF (YYLTYPE)) \
3485 + 2 * YYSTACK_GAP_MAXIMUM)
3486
3487# define YYCOPY_NEEDED 1
3488
3489/* Relocate STACK from its old location to the new one. The
3490 local variables YYSIZE and YYSTACKSIZE give the old and new number of
3491 elements in the stack, and YYPTR gives the new location of the
3492 stack. Advance YYPTR to a properly aligned location for the next
3493 stack. */
3494# define YYSTACK_RELOCATE(Stack_alloc, Stack) \
3495 do \
3496 { \
3497 YYPTRDIFF_T yynewbytes; \
3498 YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
3499 Stack = &yyptr->Stack_alloc; \
3500 yynewbytes = yystacksize * YYSIZEOF (*Stack) + YYSTACK_GAP_MAXIMUM; \
3501 yyptr += yynewbytes / YYSIZEOF (*yyptr); \
3502 } \
3503 while (0)
3504
3505#endif
3506
3507#if defined YYCOPY_NEEDED && YYCOPY_NEEDED
3508/* Copy COUNT objects from SRC to DST. The source and destination do
3509 not overlap. */
3510# ifndef YYCOPY
3511# if defined __GNUC__ && 1 < __GNUC__
3512# define YYCOPY(Dst, Src, Count) \
3513 __builtin_memcpy (Dst, Src, YY_CAST (YYSIZE_T, (Count)) * sizeof (*(Src)))
3514# else
3515# define YYCOPY(Dst, Src, Count) \
3516 do \
3517 { \
3518 YYPTRDIFF_T yyi; \
3519 for (yyi = 0; yyi < (Count); yyi++) \
3520 (Dst)[yyi] = (Src)[yyi]; \
3521 } \
3522 while (0)
3523# endif
3524# endif
3525#endif /* !YYCOPY_NEEDED */
3526
3527/* YYFINAL -- State number of the termination state. */
3528#define YYFINAL 143
3529/* YYLAST -- Last index in YYTABLE. */
3530#define YYLAST 16643
3531
3532/* YYNTOKENS -- Number of terminals. */
3533#define YYNTOKENS 162
3534/* YYNNTS -- Number of nonterminals. */
3535#define YYNNTS 321
3536/* YYNRULES -- Number of rules. */
3537#define YYNRULES 853
3538/* YYNSTATES -- Number of states. */
3539#define YYNSTATES 1441
3540
3541/* YYMAXUTOK -- Last valid token kind. */
3542#define YYMAXUTOK 361
3543
3544
3545/* YYTRANSLATE(TOKEN-NUM) -- Symbol number corresponding to TOKEN-NUM
3546 as returned by yylex, with out-of-bounds checking. */
3547#define YYTRANSLATE(YYX) \
3548 (0 <= (YYX) && (YYX) <= YYMAXUTOK \
3549 ? YY_CAST (yysymbol_kind_t, yytranslate[YYX]) \
3550 : YYSYMBOL_YYUNDEF)
3551
3552/* YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM
3553 as returned by yylex. */
3554static const yytype_uint8 yytranslate[] =
3555{
3556 0, 2, 2, 2, 2, 2, 2, 2, 2, 72,
3557 154, 75, 73, 74, 2, 2, 2, 2, 2, 2,
3558 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
3559 2, 2, 161, 148, 2, 2, 2, 146, 141, 2,
3560 157, 158, 144, 142, 155, 143, 69, 145, 2, 2,
3561 2, 2, 2, 2, 2, 2, 2, 2, 136, 160,
3562 138, 134, 137, 135, 2, 2, 2, 2, 2, 2,
3563 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
3564 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
3565 2, 153, 70, 159, 140, 2, 156, 2, 2, 2,
3566 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
3567 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
3568 2, 2, 2, 151, 139, 152, 149, 2, 89, 90,
3569 91, 92, 76, 77, 78, 79, 95, 96, 84, 83,
3570 80, 81, 82, 87, 88, 93, 94, 98, 85, 86,
3571 97, 2, 2, 2, 2, 2, 2, 2, 2, 2,
3572 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
3573 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
3574 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
3575 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
3576 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
3577 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
3578 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
3579 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
3580 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
3581 2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
3582 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
3583 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
3584 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
3585 35, 36, 37, 38, 39, 40, 41, 42, 43, 44,
3586 45, 46, 47, 48, 49, 50, 51, 52, 53, 54,
3587 55, 56, 57, 58, 59, 60, 61, 62, 63, 64,
3588 65, 66, 67, 68, 71, 99, 100, 101, 102, 103,
3589 104, 105, 106, 107, 108, 109, 110, 111, 112, 113,
3590 114, 115, 116, 117, 118, 119, 120, 121, 122, 123,
3591 124, 125, 126, 127, 128, 129, 130, 131, 132, 133,
3592 147, 150
3593};
3594
3595#if YYDEBUG
3596/* YYRLINE[YYN] -- Source line where rule number YYN was defined. */
3597static const yytype_int16 yyrline[] =
3598{
3599 0, 3194, 3188, 3194, 3194, 3194, 3194, 3214, 3219, 3224,
3600 3231, 3236, 3243, 3245, 3263, 3259, 3264, 3263, 3275, 3272,
3601 3285, 3290, 3295, 3302, 3304, 3303, 3313, 3315, 3325, 3325,
3602 3330, 3335, 3343, 3352, 3359, 3365, 3371, 3382, 3393, 3402,
3603 3414, 3415, 3420, 3420, 3421, 3432, 3437, 3438, 3445, 3445,
3604 3446, 3446, 3446, 3446, 3446, 3446, 3446, 3446, 3446, 3447,
3605 3447, 3447, 3450, 3451, 3457, 3457, 3457, 3464, 3465, 3472,
3606 3475, 3476, 3481, 3486, 3491, 3497, 3496, 3512, 3511, 3526,
3607 3529, 3540, 3550, 3549, 3563, 3563, 3564, 3570, 3570, 3570,
3608 3577, 3578, 3581, 3581, 3584, 3585, 3592, 3600, 3600, 3600,
3609 3607, 3614, 3623, 3628, 3633, 3638, 3643, 3649, 3655, 3661,
3610 3666, 3673, 3682, 3683, 3690, 3691, 3698, 3703, 3708, 3713,
3611 3713, 3713, 3718, 3723, 3728, 3733, 3738, 3743, 3750, 3751,
3612 3758, 3763, 3771, 3771, 3776, 3781, 3781, 3787, 3792, 3797,
3613 3802, 3810, 3810, 3815, 3820, 3820, 3825, 3830, 3835, 3840,
3614 3848, 3856, 3859, 3864, 3869, 3876, 3876, 3876, 3877, 3882,
3615 3885, 3890, 3893, 3898, 3898, 3906, 3907, 3908, 3909, 3910,
3616 3911, 3912, 3913, 3914, 3915, 3916, 3917, 3918, 3919, 3920,
3617 3921, 3922, 3923, 3924, 3925, 3926, 3927, 3928, 3929, 3930,
3618 3931, 3932, 3933, 3934, 3935, 3938, 3938, 3938, 3939, 3939,
3619 3940, 3940, 3940, 3941, 3941, 3941, 3941, 3942, 3942, 3942,
3620 3942, 3943, 3943, 3943, 3944, 3944, 3944, 3944, 3945, 3945,
3621 3945, 3945, 3946, 3946, 3946, 3946, 3947, 3947, 3947, 3947,
3622 3948, 3948, 3948, 3948, 3949, 3949, 3952, 3952, 3953, 3953,
3623 3953, 3953, 3953, 3953, 3953, 3953, 3953, 3954, 3954, 3954,
3624 3954, 3954, 3954, 3954, 3955, 3960, 3965, 3970, 3975, 3980,
3625 3985, 3990, 3995, 4000, 4005, 4010, 4015, 4020, 4021, 4026,
3626 4031, 4036, 4041, 4046, 4051, 4056, 4061, 4066, 4071, 4076,
3627 4083, 4083, 4083, 4084, 4085, 4088, 4097, 4098, 4104, 4111,
3628 4112, 4113, 4114, 4117, 4122, 4130, 4136, 4143, 4150, 4150,
3629 4153, 4154, 4155, 4160, 4167, 4172, 4181, 4186, 4196, 4208,
3630 4209, 4215, 4216, 4217, 4218, 4223, 4230, 4230, 4235, 4240,
3631 4245, 4251, 4257, 4261, 4261, 4299, 4304, 4312, 4317, 4325,
3632 4330, 4335, 4340, 4348, 4353, 4362, 4363, 4367, 4372, 4377,
3633 4395, 4395, 4395, 4395, 4395, 4395, 4395, 4395, 4396, 4397,
3634 4398, 4404, 4403, 4416, 4416, 4422, 4428, 4433, 4438, 4443,
3635 4449, 4454, 4459, 4464, 4469, 4476, 4481, 4486, 4491, 4492,
3636 4498, 4500, 4512, 4521, 4530, 4539, 4538, 4553, 4552, 4565,
3637 4573, 4573, 4574, 4618, 4617, 4640, 4639, 4659, 4658, 4677,
3638 4675, 4692, 4690, 4705, 4710, 4715, 4720, 4735, 4735, 4738,
3639 4745, 4763, 4770, 4778, 4786, 4793, 4801, 4810, 4819, 4827,
3640 4834, 4841, 4849, 4856, 4862, 4877, 4884, 4889, 4895, 4902,
3641 4909, 4910, 4911, 4914, 4915, 4918, 4920, 4929, 4930, 4937,
3642 4938, 4941, 4946, 4954, 4954, 4954, 4959, 4964, 4969, 4974,
3643 4981, 4987, 4994, 4995, 5002, 5002, 5004, 5004, 5004, 5004,
3644 5004, 5004, 5004, 5004, 5004, 5004, 5004, 5007, 5015, 5015,
3645 5015, 5015, 5015, 5015, 5015, 5015, 5015, 5015, 5015, 5015,
3646 5015, 5015, 5015, 5015, 5015, 5015, 5016, 5022, 5027, 5027,
3647 5030, 5031, 5037, 5047, 5051, 5054, 5059, 5066, 5068, 5072,
3648 5077, 5080, 5086, 5091, 5098, 5104, 5097, 5131, 5138, 5147,
3649 5154, 5153, 5164, 5172, 5184, 5194, 5200, 5205, 5213, 5220,
3650 5231, 5237, 5242, 5248, 5258, 5263, 5271, 5277, 5285, 5287,
3651 5302, 5302, 5323, 5329, 5334, 5340, 5348, 5357, 5358, 5361,
3652 5362, 5364, 5377, 5384, 5392, 5393, 5396, 5397, 5403, 5411,
3653 5412, 5418, 5424, 5429, 5434, 5441, 5444, 5451, 5455, 5454,
3654 5467, 5470, 5477, 5484, 5485, 5486, 5493, 5500, 5507, 5513,
3655 5520, 5527, 5534, 5540, 5545, 5550, 5557, 5556, 5567, 5573,
3656 5581, 5587, 5592, 5597, 5602, 5607, 5610, 5611, 5618, 5623,
3657 5630, 5638, 5644, 5651, 5652, 5659, 5666, 5671, 5676, 5681,
3658 5688, 5690, 5697, 5703, 5715, 5716, 5731, 5736, 5743, 5749,
3659 5750, 5757, 5758, 5758, 5758, 5758, 5758, 5758, 5758, 5759,
3660 5760, 5761, 5764, 5764, 5764, 5764, 5764, 5764, 5764, 5764,
3661 5765, 5770, 5773, 5781, 5793, 5800, 5807, 5812, 5817, 5825,
3662 5845, 5848, 5853, 5857, 5860, 5865, 5868, 5875, 5878, 5879,
3663 5882, 5894, 5895, 5896, 5903, 5916, 5928, 5935, 5935, 5935,
3664 5935, 5939, 5943, 5950, 5952, 5959, 5959, 5963, 5967, 5974,
3665 5974, 5977, 5977, 5981, 5985, 5993, 5997, 6005, 6009, 6017,
3666 6021, 6029, 6033, 6059, 6062, 6061, 6076, 6084, 6088, 6092,
3667 6107, 6108, 6111, 6116, 6119, 6120, 6123, 6139, 6140, 6143,
3668 6151, 6152, 6160, 6161, 6162, 6163, 6166, 6167, 6168, 6171,
3669 6171, 6172, 6175, 6176, 6177, 6178, 6179, 6180, 6181, 6184,
3670 6194, 6201, 6201, 6208, 6209, 6213, 6212, 6222, 6225, 6226,
3671 6233, 6240, 6250, 6251, 6251, 6268, 6268, 6268, 6268, 6268,
3672 6268, 6268, 6268, 6268, 6268, 6268, 6269, 6278, 6278, 6278,
3673 6278, 6278, 6279, 6370, 6370, 6370, 6370, 6370, 6370, 6370,
3674 6370, 6370, 6370, 6370, 6370, 6370, 6370, 6370, 6370, 6370,
3675 6370, 6370, 6370, 6370, 6370, 6370, 6373, 6373, 6373, 6373,
3676 6373, 6373, 6373, 6373, 6373, 6373, 6373, 6373, 6373, 6373,
3677 6373, 6373, 6373, 6373, 6373, 6373, 6376, 6383, 6392, 6401,
3678 6410, 6421, 6422, 6432, 6439, 6444, 6463, 6465, 6476, 6496,
3679 6497, 6500, 6506, 6512, 6520, 6521, 6524, 6530, 6538, 6539,
3680 6542, 6548, 6553, 6561, 6561, 6561, 6569, 6569, 6599, 6601,
3681 6600, 6613, 6614, 6621, 6623, 6648, 6653, 6658, 6665, 6671,
3682 6676, 6689, 6689, 6689, 6690, 6693, 6694, 6695, 6698, 6699,
3683 6702, 6703, 6706, 6707, 6710, 6713, 6716, 6719, 6720, 6723,
3684 6731, 6738, 6739, 6743
3685};
3686#endif
3687
3689#define YY_ACCESSING_SYMBOL(State) YY_CAST (yysymbol_kind_t, yystos[State])
3690
3691#if 1
3692/* The user-facing name of the symbol whose (internal) number is
3693 YYSYMBOL. No bounds checking. */
3694static const char *yysymbol_name (yysymbol_kind_t yysymbol) YY_ATTRIBUTE_UNUSED;
3695
3696/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
3697 First, the terminals, then, starting at YYNTOKENS, nonterminals. */
3698static const char *const yytname[] =
3699{
3700 "\"end-of-input\"", "error", "\"invalid token\"", "\"'class'\"",
3701 "\"'module'\"", "\"'def'\"", "\"'undef'\"", "\"'begin'\"",
3702 "\"'rescue'\"", "\"'ensure'\"", "\"'end'\"", "\"'if'\"", "\"'unless'\"",
3703 "\"'then'\"", "\"'elsif'\"", "\"'else'\"", "\"'case'\"", "\"'when'\"",
3704 "\"'while'\"", "\"'until'\"", "\"'for'\"", "\"'break'\"", "\"'next'\"",
3705 "\"'redo'\"", "\"'retry'\"", "\"'in'\"", "\"'do'\"",
3706 "\"'do' for condition\"", "\"'do' for block\"", "\"'do' for lambda\"",
3707 "\"'return'\"", "\"'yield'\"", "\"'super'\"", "\"'self'\"", "\"'nil'\"",
3708 "\"'true'\"", "\"'false'\"", "\"'and'\"", "\"'or'\"", "\"'not'\"",
3709 "\"'if' modifier\"", "\"'unless' modifier\"", "\"'while' modifier\"",
3710 "\"'until' modifier\"", "\"'rescue' modifier\"", "\"'alias'\"",
3711 "\"'defined?'\"", "\"'BEGIN'\"", "\"'END'\"", "\"'__LINE__'\"",
3712 "\"'__FILE__'\"", "\"'__ENCODING__'\"", "\"local variable or method\"",
3713 "\"method\"", "\"global variable\"", "\"instance variable\"",
3714 "\"constant\"", "\"class variable\"", "\"label\"", "\"integer literal\"",
3715 "\"float literal\"", "\"rational literal\"", "\"imaginary literal\"",
3716 "\"char literal\"", "\"numbered reference\"", "\"back reference\"",
3717 "\"literal content\"", "tREGEXP_END", "\"dummy end\"", "'.'",
3718 "\"backslash\"", "\"escaped space\"", "\"escaped horizontal tab\"",
3719 "\"escaped form feed\"", "\"escaped carriage return\"",
3720 "\"escaped vertical tab\"", "\"unary+\"", "\"unary-\"", "\"**\"",
3721 "\"<=>\"", "\"==\"", "\"===\"", "\"!=\"", "\">=\"", "\"<=\"", "\"&&\"",
3722 "\"||\"", "\"=~\"", "\"!~\"", "\"..\"", "\"...\"", "\"(..\"", "\"(...\"",
3723 "\"[]\"", "\"[]=\"", "\"<<\"", "\">>\"", "\"&.\"", "\"::\"",
3724 "\":: at EXPR_BEG\"", "\"operator-assignment\"", "\"=>\"", "\"(\"",
3725 "\"( arg\"", "\"[\"", "\"{\"", "\"{ arg\"", "\"*\"", "\"**arg\"",
3726 "\"&\"", "\"->\"", "\"symbol literal\"", "\"string literal\"",
3727 "\"backtick literal\"", "\"regexp literal\"", "\"word list\"",
3728 "\"verbatim word list\"", "\"symbol list\"", "\"verbatim symbol list\"",
3729 "\"terminator\"", "\"'}'\"", "\"'#{'\"", "tSTRING_DVAR", "tLAMBEG",
3730 "tLABEL_END", "tIGNORED_NL", "tCOMMENT", "tEMBDOC_BEG", "tEMBDOC",
3731 "tEMBDOC_END", "tHEREDOC_BEG", "tHEREDOC_END", "k__END__", "tLOWEST",
3732 "'='", "'?'", "':'", "'>'", "'<'", "'|'", "'^'", "'&'", "'+'", "'-'",
3733 "'*'", "'/'", "'%'", "tUMINUS_NUM", "'!'", "'~'", "tLAST_TOKEN", "'{'",
3734 "'}'", "'['", "'\\n'", "','", "'`'", "'('", "')'", "']'", "';'", "' '",
3735 "$accept", "option_terms", "compstmt_top_stmts", "$@1", "program",
3736 "top_stmts", "top_stmt", "block_open", "begin_block", "compstmt_stmts",
3737 "$@2", "$@3", "bodystmt", "$@4", "stmts", "stmt_or_begin", "$@5",
3738 "allow_exits", "k_END", "$@6", "stmt", "asgn_mrhs", "asgn_command_rhs",
3739 "command_asgn", "op_asgn_command_rhs",
3740 "def_endless_method_endless_command", "endless_command", "option_'\\n'",
3741 "command_rhs", "expr", "$@7", "$@8", "def_name", "defn_head", "$@9",
3742 "defs_head", "value_expr_expr", "expr_value", "$@10", "$@11",
3743 "expr_value_do", "command_call", "value_expr_command_call",
3744 "command_call_value", "block_command", "cmd_brace_block", "fcall",
3745 "command", "mlhs", "mlhs_inner", "mlhs_basic", "mlhs_items_mlhs_item",
3746 "mlhs_item", "mlhs_head", "mlhs_node", "lhs", "cname", "cpath", "fname",
3747 "fitem", "undef_list", "$@12", "op", "reswords", "asgn_arg_rhs", "arg",
3748 "op_asgn_arg_rhs", "range_expr_arg", "def_endless_method_endless_arg",
3749 "ternary", "endless_arg", "relop", "rel_expr", "lex_ctxt",
3750 "begin_defined", "after_rescue", "value_expr_arg", "arg_value",
3751 "aref_args", "arg_rhs", "paren_args", "opt_paren_args", "opt_call_args",
3752 "value_expr_command", "call_args", "$@13", "command_args", "block_arg",
3753 "opt_block_arg", "args", "arg_splat", "mrhs_arg", "mrhs", "primary",
3754 "$@14", "$@15", "@16", "@17", "$@18", "$@19", "$@20", "$@21", "$@22",
3755 "$@23", "$@24", "value_expr_primary", "primary_value", "k_begin", "k_if",
3756 "k_unless", "k_while", "k_until", "k_case", "k_for", "k_class",
3757 "k_module", "k_def", "k_do", "k_do_block", "k_rescue", "k_ensure",
3758 "k_when", "k_else", "k_elsif", "k_end", "k_return", "k_yield", "then",
3759 "do", "if_tail", "opt_else", "for_var", "f_marg", "mlhs_items_f_marg",
3760 "f_margs", "f_rest_marg", "f_any_kwrest", "$@25", "f_eq",
3761 "f_kw_primary_value", "f_kwarg_primary_value", "opt_f_block_arg_none",
3762 "args_tail_basic_primary_value_none", "block_args_tail",
3763 "excessed_comma", "f_opt_primary_value", "f_opt_arg_primary_value",
3764 "opt_args_tail_block_args_tail_none",
3765 "args-list_primary_value_opt_args_tail_block_args_tail_none",
3766 "block_param", "tail-only-args_block_args_tail", "opt_block_param_def",
3767 "block_param_def", "opt_block_param", "opt_bv_decl", "bv_decls", "bvar",
3768 "max_numparam", "numparam", "it_id", "@26", "$@27", "lambda",
3769 "f_larglist", "lambda_body", "$@28", "do_block", "block_call",
3770 "method_call", "brace_block", "@29", "brace_body", "@30", "do_body",
3771 "case_args", "case_body", "cases", "p_pvtbl", "p_pktbl", "p_in_kwarg",
3772 "$@31", "p_case_body", "p_cases", "p_top_expr", "p_top_expr_body",
3773 "p_expr", "p_as", "$@32", "p_alt", "p_lparen", "p_lbracket",
3774 "p_expr_basic", "$@33", "p_args", "p_args_head", "p_args_tail", "p_find",
3775 "p_rest", "p_args_post", "p_arg", "p_kwargs", "p_kwarg", "p_kw",
3776 "p_kw_label", "p_kwrest", "p_kwnorest", "p_any_kwrest", "p_value",
3777 "range_expr_p_primitive", "p_primitive", "p_variable", "p_var_ref",
3778 "p_expr_ref", "p_const", "opt_rescue", "exc_list", "exc_var",
3779 "opt_ensure", "literal", "strings", "string", "string1", "xstring",
3780 "regexp", "nonempty_list_' '", "words_tWORDS_BEG_word_list", "words",
3781 "word_list", "word", "words_tSYMBOLS_BEG_symbol_list", "symbols",
3782 "symbol_list", "words_tQWORDS_BEG_qword_list", "qwords",
3783 "words_tQSYMBOLS_BEG_qsym_list", "qsymbols", "qword_list", "qsym_list",
3784 "string_contents", "xstring_contents", "regexp_contents",
3785 "string_content", "@34", "@35", "@36", "@37", "string_dend",
3786 "string_dvar", "symbol", "ssym", "sym", "dsym", "numeric",
3787 "simple_numeric", "nonlocal_var", "user_variable", "keyword_variable",
3788 "var_ref", "var_lhs", "backref", "$@38", "superclass",
3789 "f_opt_paren_args", "f_empty_arg", "f_paren_args", "f_arglist", "@39",
3790 "f_kw_arg_value", "f_kwarg_arg_value", "opt_f_block_arg_opt_comma",
3791 "args_tail_basic_arg_value_opt_comma", "args_tail",
3792 "args_tail_basic_arg_value_none", "largs_tail", "f_opt_arg_value",
3793 "f_opt_arg_arg_value", "opt_args_tail_args_tail_opt_comma",
3794 "args-list_arg_value_opt_args_tail_args_tail_opt_comma",
3795 "f_args-list_args_tail_opt_comma", "tail-only-args_args_tail", "f_args",
3796 "opt_args_tail_largs_tail_none",
3797 "args-list_arg_value_opt_args_tail_largs_tail_none",
3798 "f_args-list_largs_tail_none", "tail-only-args_largs_tail", "f_largs",
3799 "args_forward", "f_bad_arg", "f_norm_arg", "f_arg_asgn", "f_arg_item",
3800 "f_arg", "f_label", "kwrest_mark", "f_no_kwarg", "f_kwrest",
3801 "restarg_mark", "f_rest_arg", "blkarg_mark", "f_block_arg", "option_','",
3802 "opt_comma", "value_expr_singleton_expr", "singleton", "singleton_expr",
3803 "$@40", "assoc_list", "assocs", "assoc", "operation2", "operation3",
3804 "dot_or_colon", "call_op", "call_op2", "rparen", "rbracket", "rbrace",
3805 "trailer", "term", "terms", "none", YY_NULLPTR
3806};
3807
3808static const char *
3809yysymbol_name (yysymbol_kind_t yysymbol)
3810{
3811 return yytname[yysymbol];
3812}
3813#endif
3814
3815#define YYPACT_NINF (-1208)
3816
3817#define yypact_value_is_default(Yyn) \
3818 ((Yyn) == YYPACT_NINF)
3819
3820#define YYTABLE_NINF (-854)
3821
3822#define yytable_value_is_error(Yyn) \
3823 ((Yyn) == YYTABLE_NINF)
3824
3825/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
3826 STATE-NUM. */
3827static const yytype_int16 yypact[] =
3828{
3829 -1208, 6355, 149, -1208, -1208, -1208, -1208, 11126, -1208, -1208,
3830 -1208, -1208, -1208, -1208, -1208, 12181, 12181, -1208, -1208, -1208,
3831 -1208, 7415, -1208, -1208, -1208, -1208, 570, 10972, 203, 115,
3832 -1208, -1208, -1208, -1208, 6791, 7571, -1208, -1208, 6947, -1208,
3833 -1208, -1208, -1208, -1208, -1208, -1208, -1208, 13741, 13741, 13741,
3834 13741, 315, 9885, 10043, 12661, 12901, 11427, -1208, 10818, -1208,
3835 -1208, -1208, 237, 237, 237, 237, 1314, 13861, 13741, -1208,
3836 492, -1208, 115, 1126, -1208, -1208, -1208, -1208, -1208, 477,
3837 31, 31, -1208, -1208, 129, 397, 316, -1208, 377, 14461,
3838 -1208, 401, -1208, 3423, -1208, -1208, -1208, -1208, 671, 419,
3839 -1208, 444, -1208, 12061, 12061, -1208, -1208, 10505, 14579, 14697,
3840 14815, 10663, 12181, 8039, -1208, 717, 91, -1208, -1208, 458,
3841 -1208, -1208, -1208, -1208, -1208, -1208, -1208, -1208, -1208, -1208,
3842 -1208, -1208, -1208, -1208, -1208, -1208, -1208, 454, 511, -1208,
3843 491, 585, -1208, -1208, -1208, -1208, -1208, -1208, -1208, -1208,
3844 -1208, -1208, -1208, -1208, -1208, -1208, -1208, -1208, -1208, -1208,
3845 -1208, -1208, -1208, -1208, -1208, -1208, -1208, -1208, -1208, -1208,
3846 -1208, -1208, -1208, -1208, -1208, -1208, -1208, -1208, -1208, -1208,
3847 -1208, -1208, -1208, -1208, -1208, -1208, -1208, -1208, -1208, -1208,
3848 -1208, -1208, -1208, -1208, -1208, -1208, -1208, -1208, -1208, -1208,
3849 -1208, -1208, -1208, -1208, -1208, -1208, -1208, -1208, -1208, -1208,
3850 -1208, -1208, -1208, -1208, -1208, -1208, -1208, -1208, -1208, -1208,
3851 445, -1208, -1208, -1208, -1208, -1208, -1208, 459, 13741, 575,
3852 10043, 13741, 13741, 13741, -1208, 13741, -1208, -1208, 513, 5458,
3853 -1208, 573, -1208, -1208, -1208, 532, -1208, 544, 47, 97,
3854 615, 239, 592, -1208, -1208, 12301, -1208, 12181, -1208, -1208,
3855 11802, 13981, 908, -1208, 633, -1208, 10201, -1208, -1208, -1208,
3856 -1208, -1208, 642, 31, 31, 129, -1208, 683, -1208, 649,
3857 688, 5889, 5889, 791, -1208, 9885, 658, 492, -1208, 1126,
3858 203, 691, -1208, -1208, 701, -29, 500, -1208, 573, 680,
3859 500, -1208, 203, 816, 1314, 14933, 708, 708, 737, -1208,
3860 725, 752, 779, 783, -1208, -1208, 88, -1208, -1208, 483,
3861 989, 378, -1208, 749, 749, 749, 749, 844, -1208, -1208,
3862 -1208, -1208, -1208, -1208, -1208, 6507, 10353, 12061, 12061, 12061,
3863 12061, -1208, 13981, 13981, 1154, 846, -1208, 853, -1208, 1154,
3864 871, -1208, -1208, -1208, -1208, 870, -1208, -1208, -1208, -1208,
3865 -1208, -1208, -1208, 9885, 11545, 804, -1208, -1208, 13741, 13741,
3866 13741, 13741, 13741, -1208, -1208, 13741, 13741, 13741, 13741, 13741,
3867 13741, 13741, 13741, -1208, 13741, -1208, -1208, 13741, 13741, 13741,
3868 13741, 13741, 13741, 13741, 13741, 13741, 13741, -1208, -1208, 5536,
3869 12181, 5672, 642, 8821, -1208, 477, -1208, 146, 146, 12061,
3870 9733, 9733, -1208, 492, 849, 960, -1208, -1208, 798, 993,
3871 72, 95, 102, 673, 731, 12061, 100, -1208, 885, 810,
3872 -1208, -1208, -1208, -1208, 73, 580, 635, 638, 647, 699,
3873 748, 770, 788, -1208, -1208, -1208, -1208, -1208, 855, -1208,
3874 -1208, 11663, -1208, -1208, -1208, 5348, -1208, -1208, -1208, -1208,
3875 -1208, -1208, 330, -1208, -1208, -1208, 869, -1208, 13741, 12421,
3876 -1208, -1208, 15213, 12181, 15311, -1208, -1208, 12781, -1208, 13741,
3877 203, -1208, 874, 203, 877, -1208, -1208, 876, 382, -1208,
3878 -1208, -1208, -1208, -1208, 11126, -1208, -1208, 13741, 890, 903,
3879 922, 15409, 15311, -1208, 115, 203, -1208, -1208, 6071, 904,
3880 906, -1208, 12661, -1208, -1208, 12901, -1208, -1208, -1208, 633,
3881 829, -1208, 912, -1208, -1208, 14933, 15507, 12181, 15605, -1208,
3882 -1208, -1208, -1208, -1208, -1208, -1208, -1208, -1208, -1208, -1208,
3883 -1208, 1009, 198, 1043, 292, 13741, -1208, -1208, 918, -1208,
3884 -1208, -1208, -1208, -1208, 11941, -1208, -1208, -1208, -1208, -1208,
3885 -1208, -1208, -1208, -1208, -1208, 1248, -1208, -1208, -1208, -1208,
3886 -1208, 925, -1208, -1208, -1208, 928, -1208, -1208, -1208, 939,
3887 -1208, -1208, -1208, 203, -1208, -1208, -1208, 962, -1208, 949,
3888 13741, 98, -1208, -1208, 1021, 950, 164, -1208, 14101, 8821,
3889 492, 14101, 8821, -1208, 964, -1208, -1208, -1208, 123, 123,
3890 13021, 203, 14933, 959, -1208, 13141, -1208, 688, 4134, 4134,
3891 4134, 4134, 5077, 3664, 4134, 4134, 5889, 5889, 998, 998,
3892 -1208, 4476, 943, 943, 1077, 628, 628, 688, 688, 688,
3893 1320, 1320, 8195, 7103, 8507, 7259, 642, -1208, 203, 965,
3894 899, -1208, 910, -1208, 7727, -1208, -1208, 123, -1208, 8973,
3895 1064, 9429, 79, 123, 123, 1108, 1107, 112, 15703, 12181,
3896 15801, -1208, -1208, -1208, 829, -1208, -1208, -1208, -1208, 15899,
3897 12181, 15997, 8821, 13981, -1208, -1208, -1208, 203, -1208, -1208,
3898 -1208, -1208, 3174, 14221, 14221, 11126, -1208, 13741, 13741, -1208,
3899 573, -1208, -1208, 592, 6635, 7883, 203, 334, 341, 13741,
3900 13741, -1208, -1208, 12541, -1208, 12781, -1208, -1208, -1208, 13981,
3901 5458, -1208, 14341, 14341, 77, 642, 642, 14221, -1208, 38,
3902 -1208, -1208, 500, 14933, 912, 422, 694, 203, 485, 522,
3903 -1208, -1208, 1266, -1208, 63, -1208, 237, -1208, -1208, 63,
3904 237, -1208, 688, -1208, -1208, 1248, 1272, -1208, 979, 203,
3905 981, -1208, 399, -1208, -1208, -1208, 65, -1208, 1154, -1208,
3906 -1208, -1208, 1012, 13741, 1154, -1208, -1208, -1208, -1208, -1208,
3907 1777, -1208, -1208, -1208, 570, 1110, -1208, 5458, 1113, 123,
3908 -1208, 1110, 1113, 123, -1208, -1208, 999, -1208, -1208, -1208,
3909 -1208, -1208, 13741, -1208, -1208, -1208, 1005, 1020, 1133, -1208,
3910 -1208, 912, 14933, 1124, -1208, -1208, 1137, 1049, 3921, -1208,
3911 -1208, -1208, 842, 361, -1208, -1208, 1057, -1208, -1208, -1208,
3912 -1208, 870, 1036, 968, 12421, -1208, -1208, -1208, -1208, 870,
3913 -1208, 1177, -1208, 934, -1208, 1181, -1208, -1208, -1208, -1208,
3914 -1208, -1208, 13261, 123, -1208, 1108, 123, 187, 298, 203,
3915 128, 144, 12061, 492, 12061, 8821, 736, 694, -1208, 203,
3916 123, 382, 11280, -1208, 91, 397, -1208, 4215, -1208, -1208,
3917 -1208, -1208, 13741, -1208, -1208, -1208, -1208, 393, -1208, -1208,
3918 203, 1044, 382, 570, -1208, -1208, -1208, -1208, 583, -1208,
3919 -1208, -1208, -1208, -1208, 749, -1208, 749, 749, 749, 203,
3920 -1208, 1248, -1208, 1134, -1208, -1208, 1146, 925, -1208, -1208,
3921 1046, 1048, -1208, -1208, 1050, -1208, 1052, -1208, 1046, 14101,
3922 -1208, -1208, -1208, -1208, -1208, -1208, -1208, 1058, 13381, -1208,
3923 912, 487, -1208, -1208, -1208, 16095, 12181, 16193, -1208, -1208,
3924 13741, 14221, 14221, 1074, -1208, -1208, -1208, 14221, 14221, -1208,
3925 -1208, 13501, 1181, -1208, -1208, -1208, 9733, 12061, 123, -1208,
3926 -1208, 123, -1208, 13741, -1208, 86, -1208, -1208, 123, -1208,
3927 155, 79, 8821, 492, 123, -1208, -1208, -1208, -1208, -1208,
3928 -1208, 13741, 13741, -1208, 13741, 13741, -1208, 12781, -1208, 14341,
3929 1795, 5844, -1208, -1208, 1072, 1075, -1208, 1777, -1208, 1777,
3930 -1208, 1154, -1208, 1777, -1208, -1208, 1110, 1113, 13741, 13741,
3931 -1208, -1208, 13741, 1079, 11941, 11941, 14221, 13741, 8351, 8663,
3932 203, 609, 614, 4801, 4801, 5458, -1208, -1208, -1208, -1208,
3933 -1208, 14221, -1208, -1208, -1208, -1208, 1005, -1208, 1103, -1208,
3934 1226, -1208, -1208, 146, -1208, -1208, -1208, 13621, 9125, -1208,
3935 -1208, -1208, 123, -1208, -1208, 13741, 1154, 1082, -1208, -1208,
3936 1083, -1208, -1208, 1087, -1208, -1208, -1208, -1208, -1208, 1097,
3937 1099, -1208, 170, 1134, 1134, 1046, 1046, 1109, 1046, 5458,
3938 5458, 1100, 1100, 1058, -1208, -1208, 5458, 707, -1208, -1208,
3939 -1208, 3764, 3764, 396, -1208, 4365, 542, 1214, -1208, 996,
3940 -1208, -1208, 34, -1208, 1129, -1208, -1208, -1208, 1114, -1208,
3941 1117, -1208, 5007, -1208, -1208, -1208, -1208, -1208, 924, -1208,
3942 -1208, -1208, 64, -1208, -1208, -1208, -1208, -1208, -1208, -1208,
3943 -1208, -1208, 415, -1208, -1208, -1208, 15051, 146, -1208, -1208,
3944 9733, -1208, -1208, 9581, 8973, 13741, -1208, 969, 4801, 9733,
3945 -1208, 203, 399, -1208, -1208, 76, 65, -1208, 1154, -1208,
3946 -1208, 1154, -1208, 1777, -1208, -1208, -1208, -1208, 1075, -1208,
3947 -1208, 1777, -1208, -1208, 1513, 10353, -1208, -1208, 8821, -1208,
3948 -1208, -1208, -1208, 5007, 113, 203, 5142, -1208, 203, 1120,
3949 -1208, 1130, -1208, -1208, -1208, 1026, -1208, 12061, -1208, 1229,
3950 5142, -1208, 5007, 825, 1185, 3764, 3764, 396, 572, 353,
3951 4801, 4801, -1208, 1231, -1208, 845, 206, 224, 240, 8821,
3952 492, -1208, 934, -1208, -1208, -1208, -1208, 146, 1000, 123,
3953 1141, 1131, -1208, -1208, 10353, -1208, 1082, -1208, 1139, 1142,
3954 1152, 1157, 1139, 1046, 1082, -1208, 1159, -1208, -1208, -1208,
3955 1160, -1208, -1208, -1208, 203, 962, 1161, 15169, 1164, -1208,
3956 -1208, -1208, 286, -1208, 1185, 1170, 1178, -1208, -1208, -1208,
3957 -1208, -1208, 203, -1208, -1208, 1183, 5007, 1184, -1208, -1208,
3958 -1208, -1208, -1208, -1208, -1208, -1208, -1208, -1208, -1208, 203,
3959 203, 203, 203, 203, 203, 279, 16291, 12181, 16389, 1177,
3960 -1208, 1226, -1208, -1208, 12061, 12061, -1208, 1302, -1208, 8821,
3961 1189, -1208, 1777, -1208, 1777, -1208, 1154, -1208, 1777, -1208,
3962 -1208, -1208, -1208, 65, -1208, 1513, -1208, -1208, 1203, 15169,
3963 1513, -1208, -1208, 1253, 859, 1853, -1208, -1208, 5007, -1208,
3964 825, -1208, 5007, -1208, 5142, 438, -1208, -1208, -1208, -1208,
3965 -1208, -1208, 147, 173, 203, 300, 403, -1208, -1208, 9277,
3966 -1208, -1208, -1208, 907, -1208, -1208, 123, -1208, 1139, 1139,
3967 1198, 1139, -1208, 1082, -1208, -1208, 1207, 1208, -1208, 859,
3968 1210, 1211, -1208, 16487, 1207, 1215, 203, 1215, -1208, -1208,
3969 413, 143, 1302, -1208, -1208, -1208, -1208, 1777, -1208, -1208,
3970 -1208, 1853, -1208, 1853, -1208, 1513, -1208, 1853, -1208, 1212,
3971 1227, -1208, 5007, -1208, -1208, -1208, -1208, -1208, 1139, 1207,
3972 1207, 1216, 1207, -1208, -1208, -1208, 1853, -1208, -1208, 1207,
3973 -1208
3974};
3975
3976/* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM.
3977 Performed when YYTABLE does not specify something else to do. Zero
3978 means the default is an error. */
3979static const yytype_int16 yydefact[] =
3980{
3981 2, 0, 0, 47, 406, 407, 408, 0, 399, 400,
3982 401, 404, 26, 26, 26, 393, 394, 395, 396, 418,
3983 419, 323, 703, 702, 704, 705, 64, 0, 64, 0,
3984 853, 707, 706, 708, 97, 99, 697, 696, 98, 698,
3985 692, 693, 694, 695, 641, 713, 714, 0, 0, 0,
3986 0, 0, 0, 0, 853, 853, 126, 494, 667, 667,
3987 669, 671, 0, 0, 0, 0, 0, 0, 0, 6,
3988 3, 8, 0, 10, 43, 49, 40, 58, 61, 46,
3989 723, 723, 70, 91, 323, 90, 0, 112, 0, 116,
3990 128, 0, 237, 79, 246, 253, 282, 283, 267, 284,
3991 398, 0, 351, 0, 0, 87, 87, 0, 0, 0,
3992 0, 0, 360, 323, 370, 94, 368, 340, 341, 640,
3993 642, 342, 343, 650, 344, 656, 346, 660, 345, 662,
3994 347, 639, 684, 685, 638, 690, 701, 709, 710, 348,
3995 0, 349, 7, 1, 205, 216, 206, 229, 202, 222,
3996 212, 211, 232, 233, 227, 210, 209, 204, 230, 234,
3997 235, 214, 203, 217, 221, 223, 215, 208, 224, 231,
3998 226, 225, 218, 228, 213, 201, 220, 219, 200, 207,
3999 198, 199, 195, 196, 197, 155, 157, 156, 190, 191,
4000 186, 168, 169, 170, 177, 174, 176, 171, 172, 192,
4001 193, 178, 179, 183, 187, 173, 175, 165, 166, 167,
4002 180, 181, 182, 184, 185, 188, 189, 194, 160, 162,
4003 33, 158, 159, 161, 402, 403, 405, 0, 827, 0,
4004 0, 334, 830, 326, 667, 0, 318, 316, 0, 298,
4005 299, 329, 317, 110, 322, 853, 330, 0, 709, 710,
4006 0, 349, 853, 823, 111, 853, 513, 0, 107, 65,
4007 64, 0, 0, 28, 853, 12, 0, 11, 27, 295,
4008 393, 394, 514, 723, 723, 0, 261, 0, 360, 363,
4009 262, 251, 252, 357, 24, 0, 0, 3, 21, 23,
4010 64, 114, 20, 353, 0, 64, 64, 300, 0, 0,
4011 64, 821, 64, 0, 0, 0, 723, 723, 124, 397,
4012 0, 132, 133, 140, 491, 687, 0, 686, 688, 0,
4013 0, 0, 647, 651, 663, 657, 665, 691, 74, 273,
4014 274, 850, 849, 5, 851, 0, 0, 0, 0, 0,
4015 0, 853, 0, 0, 720, 0, 719, 722, 389, 720,
4016 0, 391, 409, 518, 508, 100, 520, 367, 410, 520,
4017 503, 853, 130, 0, 122, 117, 853, 77, 0, 0,
4018 0, 0, 0, 291, 292, 0, 0, 0, 0, 249,
4019 250, 0, 0, 75, 0, 289, 290, 0, 0, 0,
4020 0, 0, 0, 0, 0, 0, 0, 840, 841, 843,
4021 853, 842, 0, 0, 86, 84, 85, 0, 0, 0,
4022 0, 0, 377, 3, 4, 0, 430, 429, 0, 0,
4023 709, 710, 349, 150, 151, 0, 0, 153, 853, 0,
4024 709, 710, 349, 387, 225, 218, 228, 213, 195, 196,
4025 197, 155, 156, 819, 81, 80, 818, 817, 0, 816,
4026 109, 64, 108, 843, 842, 0, 369, 643, 853, 853,
4027 163, 826, 357, 333, 829, 325, 0, 853, 0, 0,
4028 319, 328, 843, 853, 842, 853, 853, 0, 320, 786,
4029 64, 312, 853, 64, 853, 311, 324, 0, 64, 366,
4030 73, 30, 32, 31, 0, 853, 296, 0, 0, 0,
4031 0, 843, 842, 853, 0, 64, 355, 14, 0, 113,
4032 0, 358, 848, 847, 301, 848, 303, 359, 822, 0,
4033 139, 691, 127, 119, 722, 0, 843, 853, 842, 492,
4034 673, 689, 676, 674, 668, 644, 645, 670, 646, 672,
4035 648, 0, 0, 0, 0, 0, 852, 9, 0, 34,
4036 35, 36, 37, 297, 0, 71, 72, 792, 789, 788,
4037 787, 790, 798, 799, 786, 0, 805, 800, 809, 808,
4038 804, 813, 801, 764, 727, 813, 735, 762, 744, 813,
4039 760, 765, 763, 64, 736, 791, 793, 794, 796, 813,
4040 726, 803, 443, 442, 807, 813, 812, 734, 0, 0,
4041 0, 0, 0, 491, 0, 518, 101, 491, 0, 0,
4042 0, 64, 0, 118, 131, 0, 531, 259, 266, 268,
4043 269, 270, 277, 278, 271, 272, 247, 248, 275, 276,
4044 531, 64, 263, 264, 265, 254, 255, 256, 257, 258,
4045 293, 294, 831, 833, 832, 834, 323, 511, 64, 853,
4046 831, 833, 832, 834, 323, 512, 853, 0, 421, 0,
4047 420, 0, 0, 0, 0, 0, 375, 357, 843, 853,
4048 842, 380, 385, 150, 151, 152, 715, 383, 717, 843,
4049 853, 842, 0, 0, 838, 839, 82, 64, 362, 831,
4050 832, 507, 323, 0, 0, 0, 853, 0, 0, 825,
4051 331, 327, 332, 853, 831, 832, 64, 831, 832, 0,
4052 0, 824, 306, 313, 308, 315, 844, 365, 29, 0,
4053 279, 13, 0, 0, 356, 0, 853, 0, 25, 115,
4054 22, 354, 64, 0, 125, 835, 138, 64, 831, 832,
4055 493, 677, 0, 649, 0, 653, 0, 659, 655, 0,
4056 0, 661, 260, 39, 38, 0, 441, 433, 435, 64,
4057 438, 431, 814, 733, 815, 730, 814, 732, 814, 756,
4058 747, 721, 0, 0, 814, 761, 725, 598, 802, 806,
4059 814, 758, 811, 810, 64, 59, 62, 286, 280, 0,
4060 724, 60, 281, 0, 492, 516, 0, 492, 416, 417,
4061 517, 502, 334, 92, 93, 41, 336, 0, 45, 335,
4062 129, 123, 0, 0, 69, 48, 67, 0, 304, 329,
4063 236, 42, 0, 349, 529, 529, 0, 853, 853, 518,
4064 510, 104, 0, 515, 313, 853, 853, 310, 509, 102,
4065 309, 853, 352, 853, 422, 853, 424, 88, 423, 373,
4066 374, 413, 0, 0, 531, 0, 0, 835, 356, 64,
4067 831, 832, 0, 0, 0, 0, 150, 151, 154, 64,
4068 0, 64, 0, 361, 504, 95, 50, 304, 238, 57,
4069 245, 164, 0, 828, 321, 853, 853, 515, 853, 853,
4070 64, 853, 64, 64, 56, 244, 302, 120, 515, 26,
4071 678, 675, 682, 683, 652, 654, 664, 658, 666, 64,
4072 440, 0, 795, 0, 729, 728, 803, 813, 746, 745,
4073 813, 813, 445, 743, 813, 797, 813, 794, 813, 0,
4074 853, 853, 390, 392, 493, 96, 493, 339, 0, 853,
4075 121, 357, 853, 853, 853, 843, 853, 842, 530, 530,
4076 0, 0, 0, 0, 105, 845, 853, 0, 0, 103,
4077 411, 853, 18, 630, 415, 414, 0, 0, 0, 425,
4078 427, 0, 89, 0, 522, 0, 378, 529, 0, 379,
4079 515, 0, 0, 0, 0, 515, 388, 820, 83, 505,
4080 506, 0, 0, 853, 0, 0, 307, 314, 364, 0,
4081 720, 0, 432, 434, 436, 439, 731, 814, 757, 814,
4082 754, 814, 750, 814, 752, 759, 66, 288, 0, 0,
4083 26, 26, 334, 337, 0, 0, 0, 0, 831, 832,
4084 64, 831, 832, 0, 0, 285, 54, 242, 55, 243,
4085 106, 0, 52, 240, 53, 241, 631, 632, 853, 633,
4086 853, 15, 428, 0, 371, 372, 523, 0, 0, 530,
4087 376, 381, 0, 716, 384, 0, 720, 853, 495, 784,
4088 853, 741, 782, 853, 780, 785, 783, 498, 742, 853,
4089 853, 740, 0, 0, 0, 813, 813, 813, 813, 63,
4090 287, 853, 853, 338, 44, 68, 305, 515, 622, 628,
4091 594, 0, 0, 0, 530, 64, 530, 582, 667, 0,
4092 621, 78, 539, 545, 547, 550, 543, 542, 578, 544,
4093 587, 590, 593, 599, 600, 589, 553, 608, 601, 554,
4094 609, 610, 611, 612, 613, 614, 615, 616, 618, 617,
4095 619, 620, 597, 76, 51, 239, 0, 0, 635, 412,
4096 0, 19, 637, 0, 0, 0, 524, 853, 0, 0,
4097 386, 64, 0, 739, 451, 0, 0, 738, 0, 776,
4098 767, 0, 781, 0, 778, 681, 680, 679, 437, 755,
4099 751, 814, 748, 753, 483, 0, 481, 480, 0, 606,
4100 607, 151, 626, 0, 570, 64, 571, 575, 64, 0,
4101 565, 0, 853, 568, 581, 0, 623, 0, 624, 0,
4102 540, 548, 0, 588, 592, 604, 605, 0, 530, 530,
4103 0, 0, 596, 0, 634, 0, 709, 710, 349, 0,
4104 3, 16, 853, 525, 527, 528, 526, 0, 536, 0,
4105 485, 0, 450, 500, 0, 496, 853, 766, 853, 853,
4106 853, 853, 853, 813, 853, 448, 853, 456, 478, 459,
4107 853, 475, 484, 479, 64, 794, 853, 447, 853, 455,
4108 519, 521, 64, 563, 585, 573, 572, 564, 576, 846,
4109 566, 595, 64, 546, 541, 578, 0, 579, 583, 667,
4110 591, 586, 602, 603, 627, 552, 562, 551, 558, 64,
4111 64, 64, 64, 64, 64, 357, 843, 853, 842, 853,
4112 636, 853, 426, 532, 0, 0, 382, 0, 497, 0,
4113 0, 737, 0, 777, 0, 774, 0, 770, 0, 772,
4114 779, 749, 454, 0, 453, 0, 471, 462, 0, 0,
4115 457, 476, 477, 0, 446, 0, 473, 569, 0, 577,
4116 0, 625, 0, 549, 0, 0, 555, 556, 557, 559,
4117 560, 561, 835, 356, 64, 831, 832, 629, 17, 0,
4118 537, 538, 489, 64, 487, 490, 0, 499, 853, 853,
4119 853, 853, 449, 853, 461, 460, 853, 853, 482, 458,
4120 853, 853, 357, 843, 853, 574, 64, 579, 580, 584,
4121 515, 853, 0, 486, 501, 775, 771, 0, 768, 773,
4122 452, 0, 472, 0, 469, 0, 465, 0, 467, 835,
4123 356, 474, 0, 567, 534, 535, 533, 488, 853, 853,
4124 853, 853, 853, 769, 470, 466, 0, 463, 468, 853,
4125 464
4126};
4127
4128/* YYPGOTO[NTERM-NUM]. */
4129static const yytype_int16 yypgoto[] =
4130{
4131 -1208, -91, 1121, -1208, -1208, -1208, 1056, 1311, 888, -47,
4132 -1208, -1208, -531, -1208, 245, 889, -1208, 10, -1208, -1208,
4133 11, -1208, -1208, -156, -1208, 6, -543, -24, -620, 37,
4134 -1208, -1208, 524, 3179, -1208, 3361, -1208, -44, -1208, -1208,
4135 1293, 17, -1208, 797, -1208, -603, 1405, -8, 1296, -163,
4136 40, -430, -62, -1208, 33, 4322, -398, 1291, -41, -7,
4137 -1208, -1208, 3, -1208, -1208, 5327, -1208, -1208, -1208, -1208,
4138 -557, 1310, -1208, 27, 915, 346, -1208, 1104, -1208, 564,
4139 54, 719, -360, -1208, 67, -1208, -28, -368, -202, 18,
4140 -426, -1208, -546, -43, -1208, -1208, -1208, -1208, -1208, -1208,
4141 -1208, -1208, -1208, -1208, -1208, -1208, 1387, -1208, -1208, -1208,
4142 -1208, -1208, -1208, -1208, -1208, -1208, -1208, -1208, -1208, -1208,
4143 -1208, -1208, 452, -1208, -250, 2400, 2712, -394, 451, 193,
4144 -816, -1208, -815, -813, 664, 515, 618, -1208, 169, 103,
4145 -1208, -1031, -1208, 251, -1208, -1189, 101, 156, -1208, -1208,
4146 -1208, 345, -1208, -1208, 178, -1208, 43, 182, -273, 60,
4147 -1208, -1208, 705, -1208, -1208, -1208, 574, -1208, -1208, -97,
4148 -1208, -515, -1208, 1089, -1208, -774, -1208, -722, -801, -536,
4149 -1208, 49, -1208, -1208, -926, -383, -1208, -1208, -1208, -1208,
4150 -1208, 165, -1208, -243, -1208, -605, -1017, -1098, -418, -856,
4151 -1105, -1208, 243, -1208, -1208, -870, 254, -1208, -1208, -664,
4152 244, -1208, -1208, -1208, 159, -1208, -1208, 162, 988, 1069,
4153 -1208, 1351, 1084, 1332, 15, -1208, 1483, -1208, 935, -1208,
4154 1675, -1208, -1208, 1682, -1208, 1725, -1208, -1208, -56, -1208,
4155 -1208, -119, -1208, -1208, -1208, -1208, -1208, -1208, 35, -1208,
4156 -1208, -1208, -1208, 45, -49, 3981, 259, 1366, 4421, 3843,
4157 -1208, -1208, 80, -308, 794, -22, -1208, -731, -422, -528,
4158 -1208, 434, -1208, -876, -737, -681, -450, -1208, -1208, -1208,
4159 1132, -34, -1208, -1208, -1208, 416, -207, -1207, -210, -213,
4160 -748, 809, -318, -638, -1208, -734, -1208, 8, -1208, 367,
4161 -1208, -526, -1208, -1208, -1208, -1208, -1208, 22, -413, -280,
4162 -1208, -1208, -90, 1368, -275, -301, 89, -209, -52, -69,
4163 -1
4164};
4165
4166/* YYDEFGOTO[NTERM-NUM]. */
4167static const yytype_int16 yydefgoto[] =
4168{
4169 0, 333, 69, 1, 2, 70, 71, 266, 267, 656,
4170 1153, 1311, 657, 1050, 287, 288, 504, 224, 72, 494,
4171 289, 74, 75, 76, 77, 78, 785, 487, 815, 79,
4172 630, 616, 444, 273, 872, 274, 406, 407, 409, 972,
4173 410, 82, 804, 816, 83, 606, 275, 85, 86, 290,
4174 87, 522, 88, 89, 90, 238, 427, 428, 218, 219,
4175 220, 695, 645, 222, 92, 93, 94, 95, 96, 97,
4176 788, 395, 98, 553, 497, 554, 240, 241, 294, 820,
4177 837, 838, 480, 242, 481, 257, 258, 244, 470, 649,
4178 246, 808, 809, 99, 403, 510, 855, 665, 862, 1159,
4179 865, 863, 682, 599, 602, 100, 277, 102, 103, 104,
4180 105, 106, 107, 108, 109, 110, 111, 356, 359, 961,
4181 1150, 852, 966, 967, 800, 278, 279, 659, 847, 968,
4182 969, 419, 757, 758, 759, 760, 571, 772, 773, 1255,
4183 1256, 1163, 1257, 1384, 1341, 1259, 1260, 1336, 1261, 1262,
4184 1263, 1185, 1186, 1264, 1241, 1373, 1374, 529, 740, 899,
4185 314, 1165, 114, 1068, 1245, 1319, 360, 115, 116, 357,
4186 603, 604, 607, 608, 975, 853, 1236, 948, 1033, 824,
4187 1369, 856, 1426, 1237, 1111, 1274, 1113, 1286, 1114, 1220,
4188 1221, 1115, 1350, 1195, 1196, 1197, 1117, 1118, 1287, 1199,
4189 1119, 1120, 1121, 1122, 1123, 572, 1125, 1126, 1127, 1128,
4190 1129, 1130, 1131, 1132, 962, 1048, 1147, 1151, 117, 118,
4191 119, 120, 121, 122, 323, 123, 124, 541, 744, 125,
4192 126, 543, 127, 128, 129, 130, 542, 544, 316, 320,
4193 321, 534, 742, 741, 900, 1001, 1177, 901, 131, 132,
4194 317, 133, 134, 135, 136, 248, 249, 139, 250, 251,
4195 864, 677, 345, 346, 347, 348, 349, 574, 575, 763,
4196 576, 918, 1071, 1247, 578, 579, 769, 580, 581, 582,
4197 583, 1169, 1074, 1075, 1076, 1077, 584, 585, 586, 927,
4198 588, 589, 590, 591, 592, 593, 594, 595, 596, 597,
4199 764, 770, 447, 448, 449, 683, 299, 484, 253, 725,
4200 647, 686, 681, 402, 489, 833, 1203, 514, 660, 414,
4201 269
4202};
4203
4204/* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If
4205 positive, shift that token. If negative, reduce the rule whose
4206 number is the opposite. If YYTABLE_NINF, syntax error. */
4207static const yytype_int16 yytable[] =
4208{
4209 142, 335, 261, 319, 264, 286, 293, 237, 237, 318,
4210 221, 401, 73, 309, 661, 509, 412, 315, 334, 456,
4211 263, 236, 236, 225, 226, 454, 925, 365, 675, 971,
4212 221, 919, 917, 245, 245, 915, 573, 252, 252, 1167,
4213 648, 573, 223, 702, 792, 765, 309, 767, 483, 765,
4214 478, 292, 292, 297, 301, 334, 355, 268, 791, 351,
4215 408, 221, 223, 413, 711, 309, 309, 309, 789, 821,
4216 445, 793, 295, 876, 879, 256, 296, 300, 324, 325,
4217 326, 978, 243, 254, 328, 452, 702, 516, 1198, 308,
4218 796, 518, 291, 924, 825, 734, 1003, -141, 1275, 658,
4219 1005, 701, 711, 949, 237, 1243, 846, 894, 1143, 701,
4220 1375, 327, 1285, 706, 221, 1301, 1304, 352, 236, 646,
4221 -142, 654, 505, 562, 1072, 259, 512, -149, 916, 530,
4222 245, 587, 777, 798, 252, 1209, 587, -148, 354, 775,
4223 405, 405, -703, 563, 405, 781, 1385, -711, 1034, 143,
4224 778, 870, 673, -144, 530, 352, 674, 474, 965, 658,
4225 -146, 350, 1217, 1124, 1124, -720, 792, 737, 854, -145,
4226 1175, -703, -113, 567, 568, 692, 688, 886, 466, 450,
4227 -143, -141, 811, 286, 532, 533, -147, 502, 344, 1210,
4228 1072, 799, 646, -129, 654, 1375, 507, -712, 782, 1244,
4229 611, 537, 539, 1300, 1303, 712, 569, 531, 714, 532,
4230 533, -147, -146, 717, 1209, 1321, 783, 1218, 508, -141,
4231 528, 1219, 726, 1332, 322, 1334, 1385, -132, 954, 292,
4232 729, -142, 1238, 331, -832, 334, 959, -142, 286, 332,
4233 331, 1057, 353, 523, 471, 1396, 332, 237, 726, 237,
4234 -133, 471, 351, -149, 485, 1059, 1398, -140, 1158, 925,
4235 138, 236, 309, 236, 746, 142, 265, -139, -585, 1003,
4236 1178, 513, 513, 482, 919, 245, 513, 73, 519, 252,
4237 353, 868, 478, -135, 292, 351, 255, 702, 1124, 548,
4238 1176, 496, -148, 549, 550, 551, 552, 488, 490, -136,
4239 331, -146, 711, 1193, -831, 1202, 332, -146, 771, 859,
4240 -134, 138, 138, -144, 953, 312, 286, 747, 977, 1073,
4241 869, 309, 666, -147, 486, 291, 256, -147, 670, 354,
4242 -832, 1036, 1038, -147, 984, 292, 810, 1042, 1044, 476,
4243 1276, 1234, -137, 1124, -831, 701, 73, 701, 312, 521,
4244 1124, 1124, 1410, 499, 500, 761, 1288, 259, 750, 801,
4245 -141, 334, 292, 663, 664, 662, -141, 421, 431, 431,
4246 431, 283, 1017, -149, 405, 405, 405, 405, -142, 555,
4247 556, 672, 940, 1235, -142, 1073, 1016, 1209, 610, 1006,
4248 726, 765, 237, 615, -149, 1142, 1142, 613, 322, 485,
4249 -149, 726, 292, 291, 653, 887, 236, 842, 702, 292,
4250 292, 751, 873, 849, 850, 1047, -145, 1295, 1297, 342,
4251 343, 1144, 745, 925, 745, 358, -143, 678, 1116, 1116,
4252 696, 919, 1246, -148, 888, 915, 898, 1189, 1190, -148,
4253 259, 889, 1017, 237, 530, 538, 405, -137, 673, 777,
4254 361, 1062, 1191, -138, -144, -832, 655, 236, 653, 814,
4255 -144, 459, 405, 523, -148, 237, 701, 1222, -144, 245,
4256 1008, 1010, 485, 252, 1012, -145, 1014, 653, 1015, 236,
4257 1124, 471, 309, 471, 912, 693, 694, 718, -397, 138,
4258 1250, 703, 1288, 993, 698, -149, 1288, 221, 1399, 532,
4259 533, 884, 709, 710, 530, 653, 890, 259, 568, 691,
4260 -135, -64, 702, 397, 342, 343, -397, -397, 687, 237,
4261 1142, 934, 496, 896, 936, 138, 485, -143, 916, 223,
4262 727, 653, 362, 236, 732, 366, 259, 814, 814, 932,
4263 569, 398, 399, 933, 138, 761, 910, -136, 790, 530,
4264 523, 1292, 1293, 1116, -711, 587, -137, -145, 980, 532,
4265 533, 587, 1281, -145, 312, 754, 1399, -143, 985, 309,
4266 59, 814, -397, -143, 925, 1142, -137, -137, 1070, -831,
4267 -137, 1058, 1142, 1142, 711, 1424, 1030, 503, -141, 919,
4268 786, 458, 925, 786, 138, 138, 987, 400, 292, 1383,
4269 460, 292, 535, 976, 532, 533, 979, 826, -134, -132,
4270 848, -712, 843, 397, 845, 996, 260, 998, 831, -135,
4271 986, -148, 138, 312, 832, 905, 839, 803, 807, 701,
4272 905, 462, 803, 807, 1002, 1179, 1180, 1182, 1183, -135,
4273 -135, 398, 472, -135, 1070, -142, 331, 467, 471, -702,
4274 1112, 1112, 332, 840, 259, 515, -136, 1271, 292, 1154,
4275 292, 237, 138, 925, 875, 646, -133, 654, 485, 138,
4276 138, 897, 237, 653, 468, 236, -136, -136, -702, 485,
4277 -136, 292, 832, 841, 653, 459, 236, 469, 881, 884,
4278 309, 840, 1069, 902, -64, 916, 259, 473, 221, -97,
4279 830, 761, 471, 761, -704, 1192, 368, -705, 513, 835,
4280 803, 803, 1142, 832, 836, 475, -707, -134, 1054, -149,
4281 871, 1055, 1194, 882, 259, 840, 259, 260, 1060, 1097,
4282 223, -64, 947, -704, 1064, 891, -705, -134, -134, 1214,
4283 -140, -134, -699, -144, 803, -707, 1070, 477, -145, 1070,
4284 523, 1070, 397, 1229, 373, 374, 892, -98, 1069, 904,
4285 929, 906, -835, -356, 907, 908, 368, 138, -706, 309,
4286 -699, -699, 392, 393, 394, 1112, 921, 989, 577, 830,
4287 398, 501, 926, 577, 312, 794, 397, 587, 1376, 797,
4288 495, -356, -356, 1078, 397, 814, 814, -706, 587, 255,
4289 -700, 814, 814, 1331, 1200, -835, 451, 956, 385, 386,
4290 1272, 982, 1160, 138, 398, 453, 506, -708, 981, 1294,
4291 983, -709, 398, 526, -97, -112, -699, 1194, -700, -700,
4292 -97, 445, 517, -835, -835, 832, 473, 1194, 1194, -699,
4293 963, -143, 970, 1313, 970, 832, -708, -356, -710, -709,
4294 -709, -832, -349, 587, 951, 952, 891, -700, 138, 1078,
4295 511, 138, 957, 958, 292, 344, 1267, 397, -699, 999,
4296 814, 312, 520, 761, 761, 221, -710, -710, 527, 397,
4297 -349, -349, -98, 1100, -700, 814, -700, -835, -98, -835,
4298 471, 503, 525, -831, 1273, 398, 668, 1277, -357, 405,
4299 1070, 405, 1070, 563, 1070, -709, 1070, 398, 679, 1000,
4300 540, 397, 991, 992, 397, 994, 995, 1296, 138, 1052,
4301 138, 786, 545, 1053, 684, -148, -357, -357, 397, 848,
4302 1395, 1063, -710, 567, 1397, 530, -349, 1289, 237, 398,
4303 945, 138, 398, 1306, 1298, 485, -139, 1364, 964, 965,
4304 653, 669, 236, 685, 1082, 587, 398, 1393, 587, 614,
4305 1049, 1078, 491, 680, 1078, 292, 1078, 1284, 803, 803,
4306 1026, 1265, 492, 493, 803, 803, 605, 1299, 1302, 807,
4307 598, 292, -357, 1041, 965, 1070, 851, -718, 535, 1316,
4308 532, 533, 312, 697, 1020, 946, 1021, 1347, 1307, 835,
4309 292, 1359, 1360, 1361, 405, 601, 832, 1351, 1080, 546,
4310 836, 1157, 680, 1215, 1216, 1267, 667, 1267, 671, 1087,
4311 1065, 368, 1267, 676, 1356, 1357, 1358, 1267, 726, 713,
4312 1091, 1092, 715, -144, 716, 1094, 1095, 722, 381, 382,
4313 1314, 1315, 721, 803, -145, 1172, 1174, 1148, 1206, 1152,
4314 36, 37, 1205, 39, -135, 530, 723, 292, 803, -129,
4315 1208, 259, 1402, 1400, 731, -136, 1164, 733, 956, 1164,
4316 753, 312, 1170, 779, 1080, 530, 368, 844, 1170, 1170,
4317 762, 832, 1201, 766, 389, 390, 391, 392, 393, 394,
4318 1187, 1187, 530, 1267, 768, 1267, -444, 1267, 1207, 1267,
4319 524, 524, -143, 309, 774, 780, 1231, 1232, 536, 530,
4320 532, 533, 1239, 587, 812, 1078, 795, 1078, 1267, 1078,
4321 834, 1078, 1265, -134, 138, 851, 1404, 1265, 743, 914,
4322 532, 533, 854, 914, 911, 1308, 913, 1240, 1270, 1310,
4323 390, 391, 392, 393, 394, 535, 922, 532, 533, 292,
4324 1281, 935, 292, 292, 930, 368, 970, 931, 292, 298,
4325 -329, 508, 748, 1282, 532, 533, 337, 338, 339, 340,
4326 341, 832, 381, 382, 832, 938, 1249, 939, 334, 1251,
4327 941, 942, 1309, 943, 292, 960, 557, 292, 558, 559,
4328 560, 561, 1268, 950, 832, 955, 965, 1320, 778, 997,
4329 1078, 1007, 1265, 1009, 1146, 1011, 557, 1013, 558, 559,
4330 560, 561, 562, -333, 1323, 1325, 1327, 1329, 1330, 390,
4331 391, 392, 393, 394, 309, 138, 1040, 1083, 292, 1280,
4332 1084, 970, 563, 1355, -331, 1149, 755, 1162, 1166, 1184,
4333 1240, 138, 1168, 292, 405, 1164, 564, 1170, 1170, 1170,
4334 1170, 1170, 1171, 1164, 1173, 1164, 565, 878, 880, 1337,
4335 138, 566, 567, 568, 1181, 1337, 1204, 1337, 1211, 1212,
4336 1370, 1371, 1213, 878, 880, 1278, 1018, 1019, 832, 832,
4337 832, 1098, 1279, 138, 138, 1024, 1209, 1305, 1025, 1318,
4338 1027, 895, 1141, 1141, 1322, 569, 309, 1324, 570, 237,
4339 557, 1317, 558, 559, 560, 561, 485, 1326, 963, 1392,
4340 1152, 653, 1328, 236, 1333, 1335, 1340, 138, 292, 1345,
4341 36, 37, 1401, 39, 557, 1348, 558, 559, 560, 561,
4342 45, 46, 461, 1349, 1380, 463, 464, 465, 1352, 1354,
4343 832, 1377, 1388, 1387, 1405, 1406, 1408, 1409, 1391, 1403,
4344 755, 405, 405, 1407, 1372, 756, 558, 559, 560, 561,
4345 1141, 1141, 1411, 1413, 1141, 1415, 1417, 1081, 292, -831,
4346 1422, 1436, 1201, 40, 41, 42, 43, 1170, 1170, 1170,
4347 1170, 1141, 1164, 336, -832, 1337, 1337, 498, 101, 1337,
4348 1337, 547, 728, 1337, 1433, 1230, 988, 730, 368, 411,
4349 970, 433, 247, 247, 416, 1227, 84, 805, 396, 138,
4350 719, 874, 138, 138, 1051, 381, 382, 1141, 138, 909,
4351 84, 84, 1342, 1431, 1346, 1312, 1004, 1170, 1337, 1337,
4352 1337, 1337, 1061, 1081, 1339, 1258, 1382, 1188, 1337, 101,
4353 101, 1390, 1338, 310, 138, 1427, 895, 138, 609, 990,
4354 1425, 1353, 1141, 1283, 247, 1141, 1290, 84, 84, 387,
4355 388, 389, 390, 391, 392, 393, 394, 1291, 1367, 1141,
4356 457, 1141, 84, 1368, 1141, 1141, 310, 446, 749, 1141,
4357 1141, 600, 1161, 455, 0, 1423, 0, 0, 138, 0,
4358 247, 247, 0, 0, 247, 418, 429, 429, 0, 247,
4359 0, 0, 0, 138, 0, 0, 0, 0, 84, 84,
4360 0, 0, 84, 0, 0, 1037, 1039, 84, 0, 0,
4361 0, 1043, 1045, 0, 0, 0, 431, 0, 0, 1242,
4362 0, 0, 0, 1242, 0, 1081, 0, 0, 1081, 0,
4363 1081, 0, 1412, 1414, 0, 1141, 1416, 1418, 0, 0,
4364 1421, 1269, 0, 0, 0, 1037, 1039, 0, 1043, 1045,
4365 0, 0, 0, 0, 0, 557, 0, 558, 559, 560,
4366 561, 562, 699, 700, 0, 0, 0, 920, 138, 0,
4367 0, 298, 0, 0, 0, 1434, 1435, 1437, 1438, 928,
4368 0, 563, 0, 0, 0, 1440, 0, 0, 431, 0,
4369 0, 0, 0, 0, 0, 1145, 0, 1141, 0, 0,
4370 0, 1141, 0, 1141, 0, 565, 700, 101, 1067, 298,
4371 566, 567, 568, 0, 0, 0, 0, 0, 138, 1145,
4372 0, 0, 0, 0, 0, 84, 0, 0, 0, 0,
4373 0, 0, 247, 0, 247, 0, 0, 247, 247, 0,
4374 0, 0, 0, 101, 569, 0, 0, 570, 0, 0,
4375 84, 0, 84, 0, 0, 84, 84, 0, 0, 0,
4376 0, 84, 101, 0, 0, 0, 0, 0, 0, 0,
4377 0, 1141, 0, 0, 1067, 0, 0, 0, 0, 1081,
4378 84, 1081, 310, 1081, 776, 1081, 0, 0, 0, 0,
4379 1242, 0, 1269, 0, 0, 0, 0, 1269, 0, 0,
4380 0, 0, 1269, 0, 806, 0, 0, 0, 0, 819,
4381 0, 0, 101, 101, 247, 247, 247, 247, 0, 247,
4382 247, 0, 0, 0, 0, 0, 0, 0, 1110, 1110,
4383 84, 84, 84, 84, 84, 84, 0, 84, 84, 0,
4384 101, 310, 0, 0, 0, 0, 0, 0, 0, 0,
4385 0, 0, 0, 0, 0, 0, 0, 0, 84, 0,
4386 0, 0, 0, 0, 1081, 0, 0, 0, 1269, 0,
4387 1269, 0, 1269, 0, 1269, 0, 1067, 247, 0, 1067,
4388 101, 1067, 0, 0, 0, 0, 247, 101, 101, 0,
4389 0, 883, 1254, 1269, 0, 84, 1110, 1110, 84, 1079,
4390 1110, 0, 247, 0, 84, 84, 84, 700, 1085, 298,
4391 1086, 0, 1088, 0, 0, 0, 0, 1110, 0, 557,
4392 84, 558, 559, 560, 561, 562, 0, 0, 247, 0,
4393 0, 0, 0, 0, 0, 0, 0, 557, 0, 558,
4394 559, 560, 561, 562, 0, 563, 84, 0, 0, 0,
4395 247, 0, 0, 1110, 0, 0, 0, 0, 0, 564,
4396 0, 0, 0, 563, 0, 1079, 0, 923, 84, 565,
4397 0, 0, 0, 0, 0, 567, 568, 564, 0, 0,
4398 0, 0, 0, 0, 0, 101, 0, 565, 1110, 0,
4399 0, 1110, 566, 567, 568, 557, 937, 558, 559, 560,
4400 561, 562, 310, 84, 247, 1110, 0, 1110, 569, 0,
4401 1110, 1110, 0, 0, 0, 1110, 1110, 0, 0, 0,
4402 0, 563, 84, 0, 0, 0, 569, 0, 700, 570,
4403 1067, 101, 1067, 0, 1067, 0, 1067, 0, 0, 0,
4404 0, 0, 1066, 1254, 0, 565, 974, 0, 1254, 84,
4405 0, 567, 568, 1254, 0, 0, 0, 0, 0, 0,
4406 0, 0, 0, 0, 0, 0, 0, 1248, 0, 0,
4407 0, 0, 1252, 0, 0, 247, 101, 0, 247, 101,
4408 1253, 1110, 0, 1266, 569, 0, 0, 247, 0, 310,
4409 0, 0, 822, 84, 84, 0, 84, 84, 0, 0,
4410 0, 0, 0, 0, 0, 84, 0, 0, 0, 0,
4411 84, 1133, 1133, 0, 0, 1067, 0, 0, 0, 1254,
4412 0, 1254, 0, 1254, 0, 1254, 0, 0, 0, 0,
4413 0, 0, 1023, 0, 0, 0, 101, 0, 101, 0,
4414 0, 0, 0, 1110, 1254, 0, 247, 1110, 0, 1110,
4415 0, 0, 0, 0, 84, 1046, 84, 247, 0, 101,
4416 247, 0, 0, 0, 84, 0, 0, 1056, 0, 0,
4417 822, 822, 0, 0, 0, 84, 0, 84, 84, 1133,
4418 1133, 0, 0, 1133, 0, 0, 0, 0, 84, 84,
4419 0, 298, 1134, 1134, 0, 0, 247, 0, 0, 0,
4420 1133, 0, 0, 0, 822, 0, 0, 1135, 1135, 0,
4421 310, 0, 0, 0, 84, 0, 1093, 1110, 0, 0,
4422 0, 0, 84, 1378, 0, 1379, 0, 1381, 0, 0,
4423 0, 0, 0, 0, 1386, 0, 1133, 0, 0, 0,
4424 0, 0, 0, 0, 1394, 0, 0, 0, 0, 0,
4425 0, 1156, 0, 0, 0, 0, 0, 0, 0, 0,
4426 1134, 1134, 0, 0, 1134, 0, 0, 0, 0, 0,
4427 0, 1133, 0, 0, 1133, 1135, 1135, 0, 0, 1135,
4428 0, 1134, 0, 0, 0, 0, 0, 0, 1133, 310,
4429 1133, 0, 0, 1133, 1133, 0, 1135, 0, 1133, 1133,
4430 0, 0, 0, 0, 0, 0, 1428, 0, 0, 0,
4431 0, 0, 1429, 0, 1430, 0, 1432, 1134, 0, 0,
4432 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4433 0, 0, 1135, 0, 0, 1439, 0, 0, 0, 247,
4434 0, 247, 101, 0, 0, 0, 0, 0, 0, 1233,
4435 0, 0, 1134, 0, 0, 1134, 0, 84, 0, 84,
4436 84, 0, 0, 0, 1133, 0, 0, 1135, 0, 1134,
4437 1135, 1134, 0, 0, 1134, 1134, 0, 0, 0, 1134,
4438 1134, 0, 0, 0, 1135, 0, 1135, 0, 0, 1135,
4439 1135, 0, 0, 0, 1135, 1135, 0, 0, 0, 0,
4440 0, 0, 0, 0, 0, 0, 247, 0, 0, 0,
4441 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4442 0, 0, 0, 247, 84, 0, 1133, 0, 822, 822,
4443 1133, 0, 1133, 0, 822, 822, 0, 0, 0, 0,
4444 0, 84, 0, 101, 247, 1134, 84, 84, 0, 0,
4445 0, 0, 84, 84, 0, 1136, 1136, 0, 0, 101,
4446 1135, 84, 84, 0, 0, 0, 0, 0, 0, 0,
4447 0, 0, 0, 0, 0, 0, 0, 84, 101, 0,
4448 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4449 0, 112, 0, 0, 0, 0, 84, 0, 0, 0,
4450 1133, 101, 101, 822, 0, 112, 112, 1134, 0, 0,
4451 0, 1134, 0, 1134, 0, 0, 0, 0, 822, 84,
4452 84, 84, 1135, 1136, 1136, 0, 1135, 1136, 1135, 0,
4453 0, 0, 0, 0, 0, 101, 84, 0, 0, 0,
4454 0, 0, 112, 112, 1136, 0, 0, 0, 0, 0,
4455 0, 0, 0, 84, 0, 0, 0, 112, 0, 0,
4456 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4457 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4458 1136, 1134, 0, 0, 0, 0, 0, 0, 0, 0,
4459 0, 0, 0, 112, 112, 0, 1135, 112, 0, 0,
4460 0, 0, 112, 0, 0, 0, 1137, 1137, 0, 0,
4461 0, 0, 0, 0, 0, 1136, 0, 0, 1136, 0,
4462 0, 0, 0, 1225, 0, 0, 0, 101, 0, 0,
4463 101, 101, 1136, 0, 1136, 0, 101, 1136, 1136, 0,
4464 0, 0, 1136, 1136, 0, 84, 0, 0, 84, 84,
4465 0, 0, 0, 0, 84, 0, 0, 0, 0, 0,
4466 0, 0, 101, 0, 0, 101, 0, 0, 0, 0,
4467 0, 0, 0, 0, 1137, 1137, 0, 0, 1137, 0,
4468 84, 0, 0, 84, 247, 0, 0, 0, 0, 0,
4469 0, 0, 0, 0, 0, 1137, 0, 0, 0, 0,
4470 0, 0, 84, 0, 0, 0, 101, 0, 1136, 0,
4471 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4472 112, 101, 0, 0, 84, 0, 0, 0, 0, 0,
4473 0, 1137, 0, 0, 0, 0, 0, 0, 0, 84,
4474 0, 0, 0, 0, 1344, 112, 0, 112, 0, 0,
4475 112, 112, 0, 0, 0, 0, 112, 0, 0, 0,
4476 0, 0, 0, 0, 0, 0, 1137, 0, 0, 1137,
4477 1136, 0, 0, 0, 1136, 112, 1136, 0, 0, 0,
4478 0, 0, 0, 1137, 247, 1137, 0, 0, 1137, 1137,
4479 0, 247, 247, 1137, 1137, 0, 101, 0, 1138, 1138,
4480 0, 0, 84, 113, 0, 1139, 1139, 0, 0, 84,
4481 84, 0, 0, 0, 84, 0, 1389, 113, 113, 0,
4482 0, 0, 0, 0, 0, 112, 112, 112, 112, 112,
4483 112, 0, 112, 112, 0, 0, 0, 0, 0, 0,
4484 0, 0, 0, 0, 1136, 0, 101, 0, 1140, 1140,
4485 0, 0, 0, 112, 113, 113, 0, 0, 0, 1137,
4486 0, 0, 0, 0, 84, 0, 1138, 1138, 0, 113,
4487 1138, 0, 0, 1139, 1139, 0, 0, 1139, 0, 0,
4488 0, 0, 0, 0, 0, 0, 0, 1138, 0, 0,
4489 112, 0, 0, 112, 1139, 0, 0, 0, 0, 112,
4490 112, 112, 0, 0, 0, 113, 113, 0, 0, 113,
4491 0, 0, 0, 0, 113, 112, 1140, 1140, 0, 0,
4492 1140, 1137, 0, 1138, 0, 1137, 0, 1137, 0, 0,
4493 1139, 0, 0, 0, 0, 0, 0, 1140, 0, 0,
4494 0, 112, 0, 0, 0, 0, 0, 0, 0, 0,
4495 0, 0, 0, 0, 0, 0, 0, 0, 1138, 0,
4496 0, 1138, 0, 112, 0, 1139, 0, 0, 1139, 0,
4497 0, 0, 0, 1140, 0, 1138, 0, 1138, 0, 0,
4498 1138, 1138, 1139, 0, 1139, 1138, 1138, 1139, 1139, 0,
4499 0, 0, 1139, 1139, 0, 1137, 0, 0, 112, 0,
4500 0, 0, 0, 0, 0, 0, 0, 0, 1140, 0,
4501 0, 1140, 0, 0, 0, 0, 0, 112, 0, 0,
4502 0, 0, 0, 0, 0, 1140, 0, 1140, 0, 0,
4503 1140, 1140, 113, 0, 0, 1140, 1140, 0, 0, 0,
4504 0, 0, 0, 0, 112, 0, 0, 0, 0, 0,
4505 0, 1138, 0, 0, 0, 0, 0, 113, 1139, 113,
4506 0, 0, 113, 113, 0, 0, 0, 0, 113, 0,
4507 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4508 0, 0, 0, 0, 0, 0, 0, 113, 112, 112,
4509 0, 112, 112, 0, 0, 0, 0, 0, 0, 0,
4510 112, 1140, 0, 0, 0, 112, 0, 0, 0, 0,
4511 0, 0, 0, 1138, 0, 0, 0, 1138, 0, 1138,
4512 1139, 0, 0, 0, 1139, 0, 1139, 0, 0, 0,
4513 0, 0, 0, 0, 0, 0, 0, 113, 113, 113,
4514 113, 113, 113, 0, 113, 113, 0, 0, 0, 112,
4515 0, 112, 0, 0, 0, 0, 0, 0, 0, 112,
4516 0, 0, 0, 1140, 0, 113, 0, 1140, 0, 1140,
4517 112, 0, 112, 112, 0, 0, 0, 0, 0, 0,
4518 0, 0, 0, 112, 112, 0, 0, 1138, 0, 0,
4519 0, 0, 0, 0, 1139, 0, 0, 0, 0, 0,
4520 0, 0, 113, 0, 0, 113, 0, 0, 0, 112,
4521 0, 113, 113, 113, 0, 0, 0, 112, 0, 0,
4522 0, 0, 0, 0, 0, 0, 0, 113, 0, 0,
4523 0, 0, 0, 0, 0, 0, 0, 1140, 0, 0,
4524 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4525 0, 0, 0, 113, 0, 0, 0, 0, 0, 0,
4526 0, 0, 0, 0, -853, 0, 0, 0, 0, 0,
4527 80, 0, -853, -853, -853, 113, 0, -853, -853, -853,
4528 0, -853, 0, 0, 80, 80, 0, 0, 0, -853,
4529 -853, -853, 0, 0, 0, 0, 0, 0, 0, 0,
4530 0, -853, -853, 0, -853, -853, -853, -853, -853, 0,
4531 113, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4532 0, 80, 80, 0, 0, 306, 0, 0, 0, 113,
4533 0, 0, -853, -853, 0, 0, 0, 0, 0, 0,
4534 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4535 0, 0, 112, 0, 112, 112, 113, 0, 306, 0,
4536 0, -853, -853, 0, 0, 0, 0, 0, 0, 0,
4537 0, 0, 0, 0, 0, 0, 0, 306, 306, 306,
4538 0, 80, 0, 0, -853, 0, 0, 0, 0, 0,
4539 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4540 113, 113, 0, 113, 113, 0, 0, 0, 0, 0,
4541 0, 0, 113, 0, 0, -853, -853, 113, -853, 112,
4542 0, 255, -853, 0, -853, 0, 0, 0, 0, 0,
4543 0, 0, 0, 0, 0, 0, 112, 0, 0, 0,
4544 0, 112, 112, 0, 0, 0, 0, 112, 112, 0,
4545 0, 0, 81, 0, 0, 0, 112, 112, 0, 0,
4546 0, 113, 0, 113, 0, 0, 81, 81, 0, 0,
4547 0, 113, 112, 0, 0, 0, 0, 0, 0, 0,
4548 0, 0, 113, 0, 113, 113, 0, 0, 0, 0,
4549 0, 112, 0, 0, 0, 113, 113, 0, 0, 80,
4550 0, 0, 0, 81, 81, 0, 0, 307, 0, 0,
4551 0, 0, 0, 0, 112, 112, 112, 0, 0, 0,
4552 0, 113, 0, 0, 80, 0, 80, 0, 0, 113,
4553 0, 112, 0, 0, 0, 80, 0, 0, 367, 0,
4554 307, 0, 0, 0, 0, 0, 0, 0, 112, 0,
4555 0, 0, 0, 0, 80, 0, 0, 0, 0, 307,
4556 307, 307, 0, 81, 0, 0, 0, 0, 0, 0,
4557 0, 0, 0, 0, 306, 0, 0, 0, 0, 0,
4558 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4559 0, 368, 369, 370, 371, 372, 373, 374, 375, 376,
4560 377, 378, 379, 380, 80, 80, 0, 0, 381, 382,
4561 0, 0, 0, 0, 383, 0, 0, 0, 0, 0,
4562 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4563 0, 0, 80, 306, 0, 0, 0, 0, 0, 0,
4564 112, 0, 0, 112, 112, 0, 0, 0, 384, 112,
4565 385, 386, 387, 388, 389, 390, 391, 392, 393, 394,
4566 0, 0, 0, 0, 113, 0, 113, 113, 0, 80,
4567 0, 0, 80, 0, 0, 112, 0, 0, 112, 80,
4568 80, 81, 0, 0, 0, 0, 0, 0, 0, 0,
4569 0, 0, 0, 0, 0, 0, 0, 112, 0, 0,
4570 0, 0, 0, 0, 0, 0, 81, 0, 81, 0,
4571 0, 0, 0, 0, 0, 0, 0, 81, 0, 112,
4572 80, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4573 0, 113, 0, 0, 112, 0, 81, 0, 0, 0,
4574 0, 0, 80, 0, 0, 0, 0, 0, 113, 0,
4575 0, 0, 0, 113, 113, 0, 307, 0, 0, 113,
4576 113, 0, 0, 0, 0, 0, 0, 0, 113, 113,
4577 0, 0, 0, 0, 0, 0, 0, 80, 0, 0,
4578 0, 0, 0, 0, 113, 0, 81, 81, 0, 0,
4579 0, 0, 0, 0, 306, 0, 80, 112, 0, 0,
4580 0, 0, 0, 113, 112, 112, 0, 0, 0, 112,
4581 0, 0, 0, 0, 81, 307, 0, 0, 0, 0,
4582 0, 0, 0, 80, 0, 0, 113, 113, 113, 0,
4583 0, 0, 368, 369, 370, 371, 372, 373, 374, 375,
4584 0, 377, 378, 113, 0, 0, 0, 0, 0, 381,
4585 382, 81, 0, 0, 81, 0, 0, 0, 0, 112,
4586 113, 81, 81, 0, 0, 0, 0, 0, 80, 0,
4587 0, 80, 0, 0, 0, 0, 0, 0, 0, 0,
4588 0, 306, 0, 0, 80, 0, 0, 22, 23, 24,
4589 25, 385, 386, 387, 388, 389, 390, 391, 392, 393,
4590 394, 0, 81, 31, 32, 33, 0, 0, 0, 0,
4591 0, 0, 0, 40, 41, 42, 43, 44, 0, 0,
4592 0, 0, 0, 0, 81, 0, 0, 0, 80, 0,
4593 80, 0, 0, 0, 141, 0, 0, 0, 80, 0,
4594 0, 0, 0, 0, 0, 0, 0, 0, 0, 80,
4595 0, 80, 113, 0, 0, 113, 113, 0, 0, 81,
4596 0, 113, 80, 80, 57, 58, 59, 60, 61, 62,
4597 63, 64, 65, 0, 0, 0, 307, 0, 81, 0,
4598 0, 0, 0, 0, 0, 141, 141, 113, 0, 313,
4599 113, 0, 0, 0, 0, 0, 80, 0, 0, 0,
4600 0, 304, 306, 0, 0, 81, 0, 0, 0, 113,
4601 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4602 0, 0, 313, 0, 0, 0, 0, 0, 0, 0,
4603 0, 113, 0, 0, 0, 0, 0, 0, 0, 0,
4604 0, 422, 432, 432, 0, 0, 113, 0, 0, 0,
4605 81, 0, 0, 81, 0, 944, 0, 0, 0, 0,
4606 0, 0, 0, 307, 0, 0, 81, 0, 0, 0,
4607 0, 0, 137, 0, 0, 0, 0, 0, 0, 0,
4608 0, 306, 0, 0, 0, 0, 0, 0, 0, 368,
4609 369, 370, 371, 372, 373, 374, 375, 376, 377, 378,
4610 379, 380, 0, 0, 0, 0, 381, 382, 0, 113,
4611 81, 0, 81, 0, 0, 0, 113, 113, 0, 0,
4612 81, 113, 0, 137, 137, 0, 0, 311, 0, 0,
4613 0, 81, 0, 81, 80, 0, 0, 0, 0, 0,
4614 0, 0, 0, 0, 81, 81, 384, 0, 385, 386,
4615 387, 388, 389, 390, 391, 392, 393, 394, 0, 0,
4616 311, 0, 0, 141, 0, 0, -298, 0, 0, 0,
4617 0, 113, 0, 0, 0, 0, 0, 0, 81, 420,
4618 430, 430, 430, 0, 307, 0, 0, 0, 0, 0,
4619 0, 0, 0, 0, 0, 0, 0, 0, 0, 141,
4620 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4621 0, 0, 0, 0, 0, 80, 0, 0, 141, 0,
4622 80, 80, 0, 0, 0, 0, 80, 80, 0, 0,
4623 0, 0, 0, 0, 0, 80, 0, 0, 313, 0,
4624 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4625 0, 80, 0, 0, 0, 0, 0, 0, 0, 0,
4626 0, 0, 0, 307, 0, 0, 0, 0, 141, 141,
4627 80, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4628 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4629 0, 0, 0, 80, 80, 80, 141, 313, 0, 0,
4630 0, 137, 368, -854, -854, -854, -854, 373, 374, 0,
4631 80, -854, -854, 0, 0, 0, 81, 0, 0, 381,
4632 382, 0, 0, 0, 0, 0, 0, 80, 0, 0,
4633 0, 0, 0, 0, 0, 0, 141, 137, 0, 0,
4634 0, 0, 0, 141, 141, 0, 0, 0, 0, 944,
4635 0, 0, 0, 0, 0, 0, 137, 0, 0, 0,
4636 0, 385, 386, 387, 388, 389, 390, 391, 392, 393,
4637 394, 0, 0, 0, 0, 0, 311, 0, 0, 0,
4638 0, 0, 0, 368, 369, 370, 371, 372, 373, 374,
4639 375, 376, 377, 378, 379, 380, 0, 81, 0, 0,
4640 381, 382, 81, 81, 0, 0, 137, 137, 81, 81,
4641 0, 0, 0, 91, 0, 306, 0, 81, 0, 80,
4642 0, 0, 80, 80, 0, 0, 0, 0, 80, 0,
4643 0, 0, 0, 81, 137, 311, 0, 0, 0, 0,
4644 384, 141, 385, 386, 387, 388, 389, 390, 391, 392,
4645 393, 394, 81, 0, 80, 0, 0, 80, 313, 0,
4646 0, 0, 0, 0, 91, 91, 0, 0, 0, 0,
4647 0, 0, 0, 0, 137, 81, 81, 81, 0, 0,
4648 0, 137, 137, 0, 0, 0, 0, 141, 22, 23,
4649 24, 25, 81, 0, 0, 0, 0, 0, 80, 0,
4650 0, 0, 0, 0, 31, 32, 33, 1098, 0, 81,
4651 0, 1099, 140, 80, 40, 41, 42, 43, 44, 0,
4652 417, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4653 0, 0, 141, 0, 0, 141, 306, 0, 0, 0,
4654 0, 0, 0, 0, 0, 313, 1101, 1102, 823, 0,
4655 0, 0, 0, 0, 1103, 0, 0, 1104, 0, 1105,
4656 1106, 0, 1107, 140, 140, 57, 58, 59, 60, 61,
4657 62, 63, 64, 65, 0, 0, 80, 0, 0, 137,
4658 0, 0, 0, 0, 0, 0, 0, 0, 80, 0,
4659 0, 0, 141, 0, 141, 1109, 311, 307, 0, 0,
4660 0, 81, 304, 0, 81, 81, 0, 0, 306, 259,
4661 81, 0, 0, 0, 0, 141, 0, 0, 0, 0,
4662 0, 0, 0, 0, 0, 137, 823, 823, 0, 0,
4663 0, 0, 0, 0, 0, 0, 81, 0, 80, 81,
4664 0, 0, 91, 0, 368, 369, 370, 371, 372, 373,
4665 374, 375, 376, 377, 378, 379, 380, 0, 0, 0,
4666 823, 381, 382, 0, 0, 0, 313, 0, 0, 0,
4667 137, 0, 0, 137, 0, 903, 0, 0, 91, 0,
4668 81, 0, 0, 311, 0, 0, 0, 0, 0, 0,
4669 0, 0, 0, 0, 0, 81, 0, 91, 0, 0,
4670 0, 384, 0, 385, 386, 387, 388, 389, 390, 391,
4671 392, 393, 394, 0, 0, 0, 0, 0, 307, 0,
4672 259, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4673 137, 0, 137, 0, 0, 0, 0, 0, 0, 0,
4674 0, 140, 0, 0, 0, 313, 0, 91, 91, 0,
4675 0, 0, 0, 137, 0, 0, 0, 0, 81, 0,
4676 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4677 81, 0, 0, 0, 0, 91, 0, 140, 0, 0,
4678 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4679 307, 0, 0, 0, 0, 0, 140, 0, 141, 0,
4680 0, 0, 0, 0, 311, 0, 0, 0, 0, 0,
4681 0, 0, 0, 0, 0, 91, 0, 0, 0, 0,
4682 81, 0, 91, 91, 0, 0, 0, 0, 0, 0,
4683 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4684 0, 0, 0, 0, 0, 0, 140, 140, 0, 0,
4685 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4686 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4687 0, 0, 0, 0, 140, 0, 0, 0, 0, 0,
4688 0, 0, 0, 311, 823, 823, 0, 0, 0, 0,
4689 823, 823, 0, 0, 0, 0, 0, 0, 0, 141,
4690 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4691 0, 0, 0, 0, 140, 141, 0, 0, 0, 0,
4692 91, 140, 140, 0, 22, 23, 24, 25, 0, 0,
4693 0, 0, 0, 0, 141, 0, 137, 0, 0, 0,
4694 31, 32, 33, 1098, 0, 0, 0, 1099, 0, 1100,
4695 40, 41, 42, 43, 44, 0, 0, 141, 141, 823,
4696 0, 0, 0, 0, 0, 0, 91, 0, 0, 563,
4697 0, 0, 0, 0, 823, 0, 0, 0, 0, 0,
4698 0, 0, 1101, 1102, 0, 0, 0, 0, 0, 0,
4699 1103, 141, 0, 1104, 0, 1105, 1106, 0, 1107, 567,
4700 0, 57, 58, 1108, 60, 61, 62, 63, 64, 65,
4701 0, 91, 0, 0, 91, 0, 0, 0, 0, 140,
4702 0, 0, 0, 0, 0, 0, 0, 817, 0, 0,
4703 0, 1109, 0, 0, 0, 0, 0, 137, 304, 0,
4704 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4705 0, 0, 0, 137, 0, 0, 0, 0, 0, 0,
4706 0, 0, 0, 0, 0, 140, 0, 0, 0, 0,
4707 0, 91, 137, 91, 0, 0, 0, 0, 0, 1228,
4708 0, 0, 0, 141, 0, 0, 141, 141, 0, 0,
4709 0, 0, 141, 0, 91, 137, 137, 0, 0, 0,
4710 0, 0, 0, 0, 0, 817, 817, 0, 0, 0,
4711 140, 0, 0, 140, 0, 0, 0, 0, 141, 0,
4712 0, 141, 0, 0, 0, 0, 140, 0, 0, 137,
4713 22, 23, 24, 25, 0, 0, 0, 0, 0, 817,
4714 0, 0, 0, 0, 0, 0, 31, 32, 33, 1098,
4715 0, 0, 0, 1099, 0, 0, 40, 41, 42, 43,
4716 44, 0, 141, 0, 0, 0, 0, 0, 0, 0,
4717 140, 0, 140, 0, 0, 0, 0, 141, 0, 0,
4718 0, 0, 0, 0, 0, 0, 0, 0, 1101, 1102,
4719 0, 0, 0, 140, 0, 0, 1103, 0, 0, 1104,
4720 432, 1105, 1106, 0, 140, 140, 0, 57, 58, 59,
4721 60, 61, 62, 63, 64, 65, 0, 1226, 0, 0,
4722 0, 137, 0, 0, 137, 137, 0, 0, 0, 0,
4723 137, 0, 0, 0, 0, 0, 0, 1109, 140, 0,
4724 0, 0, 0, 0, 304, 368, 369, 370, 371, 372,
4725 373, 374, 141, 0, 377, 378, 137, 0, 0, 137,
4726 0, 0, 381, 382, 0, 22, 23, 24, 25, 0,
4727 0, 0, 432, 0, 0, 0, 0, 91, 0, 0,
4728 0, 31, 32, 33, 1098, 0, 0, 0, 1099, 0,
4729 0, 40, 41, 42, 43, 44, 0, 0, 0, 0,
4730 137, 0, 141, 0, 385, 386, 387, 388, 389, 390,
4731 391, 392, 393, 394, 0, 137, 0, 0, 0, 0,
4732 0, 0, 0, 1101, 1102, 0, 0, 0, 0, 0,
4733 0, 1103, 0, 0, 1104, 0, 1105, 1106, 430, 1107,
4734 0, 0, 57, 58, 59, 60, 61, 62, 63, 64,
4735 65, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4736 0, 0, 0, 817, 817, 0, 0, 0, 0, 817,
4737 817, 0, 1109, 0, 0, 0, 140, 0, 91, 304,
4738 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4739 137, 0, 0, 0, 91, 0, 0, 0, 0, 0,
4740 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4741 430, 0, 0, 91, 0, 0, 0, 0, 0, 0,
4742 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4743 0, 0, 239, 239, 0, 0, 91, 91, 817, 0,
4744 137, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4745 0, 0, 0, 817, 0, 0, 0, 0, 0, 0,
4746 0, 0, 140, 140, 276, 280, 281, 282, 140, 140,
4747 91, 239, 239, 0, 0, 0, 0, 140, 0, 0,
4748 0, 0, 0, 0, 329, 330, 0, 0, 0, 0,
4749 689, 651, 0, 140, 690, 0, 0, 0, 0, 0,
4750 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4751 0, 0, 140, 0, 188, 189, 190, 191, 192, 193,
4752 194, 195, 196, 0, 0, 197, 198, 0, 0, 239,
4753 0, 199, 200, 201, 202, 140, 140, 140, 0, 0,
4754 0, 0, 0, 0, 0, 203, 204, 0, 0, 0,
4755 0, 0, 140, 0, 0, 0, 0, 0, 1224, 0,
4756 0, 0, 91, 0, 0, 91, 91, 0, 0, 140,
4757 0, 91, 0, 0, 0, 205, 206, 207, 208, 209,
4758 210, 211, 212, 213, 214, 0, 215, 216, 0, 0,
4759 0, 0, 0, 0, 217, 255, 0, 91, 0, 0,
4760 91, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4761 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4762 0, 0, 0, 0, 0, 0, 368, 369, 370, 371,
4763 372, 373, 374, 375, 376, 377, 378, 379, 380, 0,
4764 0, 91, 0, 381, 382, 239, 0, 0, 239, 239,
4765 239, 0, 329, 0, 0, 0, 91, 0, 0, 0,
4766 0, 140, 0, 0, 140, 140, 0, 0, 0, 0,
4767 140, 0, 239, 0, 239, 0, 0, 0, 642, 643,
4768 0, 0, 644, 384, 0, 385, 386, 387, 388, 389,
4769 390, 391, 392, 393, 394, 0, 140, 0, 0, 140,
4770 0, 0, 188, 189, 190, 191, 192, 193, 194, 195,
4771 196, 0, 0, 197, 198, 0, 0, 0, 0, 199,
4772 200, 201, 202, 0, 0, 0, 0, 0, 0, 0,
4773 0, 91, 0, 203, 204, 0, 0, 0, 0, 0,
4774 140, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4775 0, 0, 0, 0, 0, 140, 0, 0, 0, 0,
4776 0, 0, 0, 205, 206, 207, 208, 209, 210, 211,
4777 212, 213, 214, 0, 215, 216, 0, 0, 0, 0,
4778 0, 91, 217, 0, 0, 617, 618, 619, 620, 621,
4779 0, 0, 622, 623, 624, 625, 626, 627, 628, 629,
4780 0, 631, 0, 0, 632, 633, 634, 635, 636, 637,
4781 638, 639, 640, 641, 650, 651, 0, 239, 652, 0,
4782 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4783 140, 0, 0, 0, 0, 0, 0, 0, 188, 189,
4784 190, 191, 192, 193, 194, 195, 196, 0, 0, 197,
4785 198, 0, 0, 0, 0, 199, 200, 201, 202, 0,
4786 0, 0, 0, 0, 0, 0, 0, 0, 239, 203,
4787 204, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4788 140, 0, 0, 0, 0, 239, 239, 0, 0, 0,
4789 239, 0, 0, 0, 239, 0, 282, 0, 0, 205,
4790 206, 207, 208, 209, 210, 211, 212, 213, 214, 0,
4791 215, 216, 0, 0, 720, 0, 0, 0, 217, 0,
4792 0, 0, 0, 0, 0, 0, 0, 0, 0, 239,
4793 0, 0, 239, 0, -853, 3, 0, 4, 5, 6,
4794 7, 8, 0, 0, 239, 9, 10, 0, 0, 0,
4795 11, 0, 12, 13, 14, 15, 16, 17, 18, 0,
4796 0, 0, 752, 0, 19, 20, 21, 22, 23, 24,
4797 25, 0, 0, 26, 0, 0, 0, 0, 0, 27,
4798 28, 284, 30, 31, 32, 33, 34, 35, 36, 37,
4799 38, 39, 0, 40, 41, 42, 43, 44, 45, 46,
4800 0, 0, 0, 0, 0, 0, 0, 239, 0, 0,
4801 47, 48, 0, 0, 0, 787, 0, 0, 787, 0,
4802 0, 0, 0, 0, 0, 49, 50, 239, 0, 0,
4803 0, 0, 818, 51, 0, 0, 52, 53, 54, 55,
4804 0, 56, 0, 0, 57, 58, 59, 60, 61, 62,
4805 63, 64, 65, 0, -853, 0, 0, 368, 369, 370,
4806 371, 372, 373, 374, 375, 376, 377, 378, -854, -854,
4807 0, 0, 0, 0, 381, 382, 0, 0, 0, 0,
4808 0, 66, 67, 68, 0, 0, 239, 0, -853, 0,
4809 0, 0, 0, 0, -853, 0, 0, 239, 0, 0,
4810 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4811 877, 877, 0, 0, 239, 877, 385, 386, 387, 388,
4812 389, 390, 391, 392, 393, 394, 877, 877, 0, 0,
4813 239, 0, 239, 0, 0, 0, 0, 0, 0, 787,
4814 787, 0, 0, 0, 877, 0, 0, 0, 0, 0,
4815 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4816 0, -4, 3, 0, 4, 5, 6, 7, 8, -4,
4817 -4, -4, 9, 10, 0, -4, -4, 11, -4, 12,
4818 13, 14, 15, 16, 17, 18, -4, 0, 0, 0,
4819 239, 19, 20, 21, 22, 23, 24, 25, 0, 0,
4820 26, 0, 0, 0, 0, 0, 27, 28, 284, 30,
4821 31, 32, 33, 34, 35, 36, 37, 38, 39, 239,
4822 40, 41, 42, 43, 44, 45, 46, 0, 0, -4,
4823 0, 0, 0, 0, 0, 0, 0, 47, 48, 0,
4824 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4825 0, 239, 49, 50, 0, 0, 0, 0, 0, 0,
4826 51, 0, 0, 52, 53, 54, 55, 0, 56, 239,
4827 0, 57, 58, 59, 60, 61, 62, 63, 64, 65,
4828 0, -4, 0, 0, 0, 0, 0, 0, 0, 0,
4829 0, 0, 0, 0, 0, 0, 0, 0, 0, 877,
4830 0, 0, 0, 0, 0, 0, 0, 0, 66, 67,
4831 68, 0, 0, -4, 0, 0, 0, 0, 0, -4,
4832 0, 546, 0, 0, 0, 0, 0, 0, 0, 0,
4833 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4834 0, 0, 0, 0, 0, 0, 787, 0, 0, 0,
4835 0, 0, 0, 0, 0, 239, 0, 0, 0, 0,
4836 0, 0, 0, 239, 0, 0, 0, 1035, 877, 877,
4837 0, 0, 0, 0, 877, 877, 0, 0, 239, 0,
4838 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4839 239, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4840 0, 0, 0, 0, 0, 0, 0, 0, 877, 877,
4841 0, 877, 877, 0, 239, 0, 787, 0, 0, 0,
4842 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4843 0, 0, 0, 0, 0, 1089, 1090, 0, 0, 239,
4844 0, 0, 0, 877, 1096, -853, 3, 0, 4, 5,
4845 6, 7, 8, 0, 0, 0, 9, 10, 877, 0,
4846 0, 11, 0, 12, 13, 14, 15, 16, 17, 18,
4847 0, 0, 0, 0, 239, 19, 20, 21, 22, 23,
4848 24, 25, 877, 0, 26, 0, 0, 0, 0, 0,
4849 27, 28, 29, 30, 31, 32, 33, 34, 35, 36,
4850 37, 38, 39, 0, 40, 41, 42, 43, 44, 45,
4851 46, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4852 0, 47, 48, 0, 0, 0, 0, 0, 0, 0,
4853 0, 0, 0, 0, 0, 0, 49, 50, 0, 0,
4854 0, 0, 0, 0, 51, 0, 0, 52, 53, 54,
4855 55, 0, 56, 0, 0, 57, 58, 59, 60, 61,
4856 62, 63, 64, 65, 0, 0, 0, 0, 0, 0,
4857 0, 0, 239, 0, 0, 0, 0, 0, 0, 0,
4858 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4859 0, 0, 66, 67, 68, 0, 0, -4, 3, -853,
4860 4, 5, 6, 7, 8, -853, 0, 0, 9, 10,
4861 0, 0, 0, 11, 0, 12, 13, 14, 15, 16,
4862 17, 18, 0, 0, 0, 0, 0, 19, 20, 21,
4863 22, 23, 24, 25, 0, 0, 26, 0, 0, 0,
4864 0, 0, 27, 28, 29, 30, 31, 32, 33, 34,
4865 35, 36, 37, 38, 39, 0, 40, 41, 42, 43,
4866 44, 45, 46, 0, 0, 0, 0, 0, 0, 0,
4867 0, 0, 0, 47, 48, 0, 0, 0, 0, 0,
4868 0, 0, 0, 0, 0, 0, 0, 0, 49, 50,
4869 0, 0, 0, 0, 0, 0, 51, 0, 0, 52,
4870 53, 54, 55, 0, 56, 0, 0, 57, 58, 59,
4871 60, 61, 62, 63, 64, 65, 0, 0, 0, 0,
4872 0, 0, 0, 0, 239, -835, 0, 0, 0, 0,
4873 0, 0, 0, -835, -835, -835, 0, 0, -835, -835,
4874 -835, 0, -835, 0, 66, 67, 68, 0, 0, -4,
4875 -835, -835, -835, -835, -835, 0, 0, 546, 0, 0,
4876 0, 0, -835, -835, 0, -835, -835, -835, -835, -835,
4877 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4878 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4879 0, 0, 0, -835, -835, 0, 0, 0, 0, 0,
4880 0, 0, 0, -835, -835, -835, -835, -835, -835, -835,
4881 -835, -835, -835, -835, -835, -835, 0, 0, 0, 0,
4882 -835, -835, -835, -835, 0, 885, -835, 0, 0, 0,
4883 0, -835, 0, 0, 0, 0, 0, 0, 0, 0,
4884 0, 0, 0, 0, 0, -835, 0, 0, -835, 0,
4885 0, 0, 0, 0, 0, 0, 0, 0, 0, -146,
4886 -835, -835, -835, -835, -835, -835, -835, -835, -835, -835,
4887 -835, -835, 0, 0, 0, 0, -835, -835, -835, -835,
4888 -835, -699, 0, -835, -835, -835, 0, 0, 0, -699,
4889 -699, -699, 0, 0, -699, -699, -699, 0, -699, 0,
4890 0, 0, 0, 0, 0, 0, -699, 0, -699, -699,
4891 -699, 0, 0, 0, 0, 0, 0, 0, -699, -699,
4892 0, -699, -699, -699, -699, -699, 0, 0, 0, 0,
4893 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4894 0, 0, 0, 0, 0, 0, 0, 0, 0, -699,
4895 -699, 0, 0, 0, 0, 0, 0, 0, 0, -699,
4896 -699, -699, -699, -699, -699, -699, -699, -699, -699, -699,
4897 -699, -699, 0, 0, 0, 0, -699, -699, -699, -699,
4898 0, -699, -699, 0, 0, 0, 0, -699, 0, 0,
4899 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4900 0, -699, 0, 0, -699, 0, 0, 0, 0, 0,
4901 0, 0, 0, 0, 0, -699, -699, -699, -699, -699,
4902 -699, -699, -699, -699, -699, -699, -699, -699, 0, 0,
4903 0, 0, 0, -699, -699, -699, -699, -700, 0, -699,
4904 -699, -699, 0, 0, 0, -700, -700, -700, 0, 0,
4905 -700, -700, -700, 0, -700, 0, 0, 0, 0, 0,
4906 0, 0, -700, 0, -700, -700, -700, 0, 0, 0,
4907 0, 0, 0, 0, -700, -700, 0, -700, -700, -700,
4908 -700, -700, 0, 0, 0, 0, 0, 0, 0, 0,
4909 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4910 0, 0, 0, 0, 0, -700, -700, 0, 0, 0,
4911 0, 0, 0, 0, 0, -700, -700, -700, -700, -700,
4912 -700, -700, -700, -700, -700, -700, -700, -700, 0, 0,
4913 0, 0, -700, -700, -700, -700, 0, -700, -700, 0,
4914 0, 0, 0, -700, 0, 0, 0, 0, 0, 0,
4915 0, 0, 0, 0, 0, 0, 0, -700, 0, 0,
4916 -700, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4917 0, -700, -700, -700, -700, -700, -700, -700, -700, -700,
4918 -700, -700, -700, -700, 0, 0, 0, 0, 0, -700,
4919 -700, -700, -700, -836, 0, -700, -700, -700, 0, 0,
4920 0, -836, -836, -836, 0, 0, -836, -836, -836, 0,
4921 -836, 0, 0, 0, 0, 0, 0, 0, -836, -836,
4922 -836, -836, -836, 0, 0, 0, 0, 0, 0, 0,
4923 -836, -836, 0, -836, -836, -836, -836, -836, 0, 0,
4924 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4925 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4926 0, -836, -836, 0, 0, 0, 0, 0, 0, 0,
4927 0, -836, -836, -836, -836, -836, -836, -836, -836, -836,
4928 -836, -836, -836, -836, 0, 0, 0, 0, -836, -836,
4929 -836, -836, 0, 0, -836, 0, 0, 0, 0, -836,
4930 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4931 0, 0, 0, -836, 0, 0, -836, 0, 0, 0,
4932 0, 0, 0, 0, 0, 0, 0, 0, -836, -836,
4933 -836, -836, -836, -836, -836, -836, -836, -836, -836, -836,
4934 0, 0, 0, 0, -836, -836, -836, -836, -836, -837,
4935 0, -836, -836, -836, 0, 0, 0, -837, -837, -837,
4936 0, 0, -837, -837, -837, 0, -837, 0, 0, 0,
4937 0, 0, 0, 0, -837, -837, -837, -837, -837, 0,
4938 0, 0, 0, 0, 0, 0, -837, -837, 0, -837,
4939 -837, -837, -837, -837, 0, 0, 0, 0, 0, 0,
4940 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4941 0, 0, 0, 0, 0, 0, 0, -837, -837, 0,
4942 0, 0, 0, 0, 0, 0, 0, -837, -837, -837,
4943 -837, -837, -837, -837, -837, -837, -837, -837, -837, -837,
4944 0, 0, 0, 0, -837, -837, -837, -837, 0, 0,
4945 -837, 0, 0, 0, 0, -837, 0, 0, 0, 0,
4946 0, 0, 0, 0, 0, 0, 0, 0, 0, -837,
4947 0, 0, -837, 0, 0, 0, 0, 0, 0, 0,
4948 0, 0, 0, 0, -837, -837, -837, -837, -837, -837,
4949 -837, -837, -837, -837, -837, -837, 0, 0, 0, 0,
4950 -837, -837, -837, -837, -837, -514, 0, -837, -837, -837,
4951 0, 0, 0, -514, -514, -514, 0, 0, -514, -514,
4952 -514, 0, -514, 0, 0, 0, 0, 0, 0, 0,
4953 -514, -514, -514, -514, 0, 0, 0, 0, 0, 0,
4954 0, 0, -514, -514, 0, -514, -514, -514, -514, -514,
4955 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4956 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4957 0, 0, 0, -514, -514, 0, 0, 0, 0, 0,
4958 0, 0, 0, -514, -514, -514, -514, -514, -514, -514,
4959 -514, -514, -514, -514, -514, -514, 0, 0, 0, 0,
4960 -514, -514, -514, -514, 0, 0, -514, 0, 0, 0,
4961 0, -514, 0, 0, 0, 0, 0, 0, 0, 0,
4962 0, 0, 0, 0, 0, -514, 0, 0, 0, 0,
4963 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4964 -514, 0, -514, -514, -514, -514, -514, -514, -514, -514,
4965 -514, -514, 0, 0, 0, 0, -514, -514, -514, -514,
4966 -514, -350, 255, -514, -514, -514, 0, 0, 0, -350,
4967 -350, -350, 0, 0, -350, -350, -350, 0, -350, 0,
4968 0, 0, 0, 0, 0, 0, -350, 0, -350, -350,
4969 -350, 0, 0, 0, 0, 0, 0, 0, -350, -350,
4970 0, -350, -350, -350, -350, -350, 0, 0, 0, 0,
4971 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4972 0, 0, 0, 0, 0, 0, 0, 0, 0, -350,
4973 -350, 0, 0, 0, 0, 0, 0, 0, 0, -350,
4974 -350, -350, -350, -350, -350, -350, -350, -350, -350, -350,
4975 -350, -350, 0, 0, 0, 0, -350, -350, -350, -350,
4976 0, 0, -350, 0, 0, 0, 0, -350, 0, 0,
4977 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4978 0, -350, 0, 0, -350, 0, 0, 0, 0, 0,
4979 0, 0, 0, 0, 0, 0, -350, -350, -350, -350,
4980 -350, -350, -350, -350, -350, -350, -350, -350, 0, 0,
4981 0, 0, 0, -350, -350, -350, -350, -853, 0, -350,
4982 -350, -350, 0, 0, 0, -853, -853, -853, 0, 0,
4983 -853, -853, -853, 0, -853, 0, 0, 0, 0, 0,
4984 0, 0, -853, -853, -853, -853, 0, 0, 0, 0,
4985 0, 0, 0, 0, -853, -853, 0, -853, -853, -853,
4986 -853, -853, 0, 0, 0, 0, 0, 0, 0, 0,
4987 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4988 0, 0, 0, 0, 0, -853, -853, 0, 0, 0,
4989 0, 0, 0, 0, 0, -853, -853, -853, -853, -853,
4990 -853, -853, -853, -853, -853, -853, -853, -853, 0, 0,
4991 0, 0, -853, -853, -853, -853, 0, 0, -853, 0,
4992 0, 0, 0, -853, 0, 0, 0, 0, 0, 0,
4993 0, 0, 0, 0, 0, 0, 0, -853, 0, 0,
4994 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4995 0, 0, -853, 0, -853, -853, -853, -853, -853, -853,
4996 -853, -853, -853, -853, 0, 0, 0, 0, -853, -853,
4997 -853, -853, -853, -356, 255, -853, -853, -853, 0, 0,
4998 0, -356, -356, -356, 0, 0, -356, -356, -356, 0,
4999 -356, 0, 0, 0, 0, 0, 0, 0, -356, 0,
5000 -356, -356, 0, 0, 0, 0, 0, 0, 0, 0,
5001 -356, -356, 0, -356, -356, -356, -356, -356, 0, 0,
5002 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5003 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5004 0, -356, -356, 0, 0, 0, 0, 0, 0, 0,
5005 0, -356, -356, -356, -356, -356, -356, -356, -356, -356,
5006 -356, -356, -356, -356, 0, 0, 0, 0, -356, -356,
5007 -356, -356, 0, 886, -356, 0, 0, 0, 0, -356,
5008 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5009 0, 0, 0, -356, 0, 0, 0, 0, 0, 0,
5010 0, 0, 0, 0, 0, 0, 0, -147, -356, 0,
5011 -356, -356, -356, -356, -356, -356, -356, -356, -356, -356,
5012 0, 0, 0, 0, 829, -356, -356, -356, -356, -363,
5013 0, -356, -356, -356, 0, 0, 0, -363, -363, -363,
5014 0, 0, -363, -363, -363, 0, -363, 0, 0, 0,
5015 0, 0, 0, 0, -363, 0, -363, -363, 0, 0,
5016 0, 0, 0, 0, 0, 0, -363, -363, 0, -363,
5017 -363, -363, -363, -363, 0, 0, 0, 0, 0, 0,
5018 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5019 0, 0, 0, 0, 0, 0, 0, -363, -363, 0,
5020 0, 0, 0, 0, 0, 0, 0, -363, -363, -363,
5021 -363, -363, -363, -363, -363, -363, -363, -363, -363, -363,
5022 0, 0, 0, 0, -363, -363, -363, -363, 0, 0,
5023 -363, 0, 0, 0, 0, -363, 0, 0, 0, 0,
5024 0, 0, 0, 0, 0, 0, 0, 0, 0, -363,
5025 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5026 0, 0, 0, 0, -363, 0, -363, -363, -363, -363,
5027 -363, -363, -363, -363, -363, -363, 0, 0, 0, 0,
5028 0, -363, -363, -363, -363, -835, 451, -363, -363, -363,
5029 0, 0, 0, -835, -835, -835, 0, 0, 0, -835,
5030 -835, 0, -835, 0, 0, 0, 0, 0, 0, 0,
5031 -835, -835, 0, 0, 0, 0, 0, 0, 0, 0,
5032 0, 0, -835, -835, 0, -835, -835, -835, -835, -835,
5033 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5034 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5035 0, 0, 0, -835, -835, 0, 0, 0, 0, 0,
5036 0, 0, 0, -835, -835, -835, -835, -835, -835, -835,
5037 -835, -835, -835, -835, -835, -835, 0, 0, 0, 0,
5038 -835, -835, -835, -835, 0, 827, -835, 0, 0, 0,
5039 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5040 0, 0, 0, 0, 0, -835, 0, 0, 0, 0,
5041 0, 0, 0, 0, 0, 0, 0, 0, 0, -146,
5042 -835, 0, -835, -835, -835, -835, -835, -835, -835, -835,
5043 -835, -835, 0, 0, 0, 0, -835, -835, -835, -835,
5044 -137, -835, 0, -835, 0, -835, 0, 0, 0, -835,
5045 -835, -835, 0, 0, 0, -835, -835, 0, -835, 0,
5046 0, 0, 0, 0, 0, 0, -835, -835, 0, 0,
5047 0, 0, 0, 0, 0, 0, 0, 0, -835, -835,
5048 0, -835, -835, -835, -835, -835, 0, 0, 0, 0,
5049 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5050 0, 0, 0, 0, 0, 0, 0, 0, 0, -835,
5051 -835, 0, 0, 0, 0, 0, 0, 0, 0, -835,
5052 -835, -835, -835, -835, -835, -835, -835, -835, -835, -835,
5053 -835, -835, 0, 0, 0, 0, -835, -835, -835, -835,
5054 0, 827, -835, 0, 0, 0, 0, 0, 0, 0,
5055 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5056 0, -835, 0, 0, 0, 0, 0, 0, 0, 0,
5057 0, 0, 0, 0, 0, -146, -835, 0, -835, -835,
5058 -835, -835, -835, -835, -835, -835, -835, -835, 0, 0,
5059 0, 0, -835, -835, -835, -835, -835, -356, 0, -835,
5060 0, -835, 0, 0, 0, -356, -356, -356, 0, 0,
5061 0, -356, -356, 0, -356, 0, 0, 0, 0, 0,
5062 0, 0, -356, 0, 0, 0, 0, 0, 0, 0,
5063 0, 0, 0, 0, -356, -356, 0, -356, -356, -356,
5064 -356, -356, 0, 0, 0, 0, 0, 0, 0, 0,
5065 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5066 0, 0, 0, 0, 0, -356, -356, 0, 0, 0,
5067 0, 0, 0, 0, 0, -356, -356, -356, -356, -356,
5068 -356, -356, -356, -356, -356, -356, -356, -356, 0, 0,
5069 0, 0, -356, -356, -356, -356, 0, 828, -356, 0,
5070 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5071 0, 0, 0, 0, 0, 0, 0, -356, 0, 0,
5072 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5073 0, -147, -356, 0, -356, -356, -356, -356, -356, -356,
5074 -356, -356, -356, -356, 0, 0, 0, 0, 829, -356,
5075 -356, -356, -138, -356, 0, -356, 0, -356, 0, 0,
5076 0, -356, -356, -356, 0, 0, 0, -356, -356, 0,
5077 -356, 0, 0, 0, 0, 0, 0, 0, -356, 0,
5078 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5079 -356, -356, 0, -356, -356, -356, -356, -356, 0, 0,
5080 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5081 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5082 0, -356, -356, 0, 0, 0, 0, 0, 0, 0,
5083 0, -356, -356, -356, -356, -356, -356, -356, -356, -356,
5084 -356, -356, -356, -356, 0, 0, 0, 0, -356, -356,
5085 -356, -356, 0, 828, -356, 0, 0, 0, 0, 0,
5086 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5087 0, 0, 0, -356, 0, 0, 0, 0, 0, 0,
5088 0, 0, 0, 0, 0, 0, 0, -147, -356, 0,
5089 -356, -356, -356, -356, -356, -356, -356, -356, -356, -356,
5090 0, 0, 0, 0, 829, -356, -356, -356, -356, 0,
5091 0, -356, 3, -356, 4, 5, 6, 7, 8, -853,
5092 -853, -853, 9, 10, 0, 0, -853, 11, 0, 12,
5093 13, 14, 15, 16, 17, 18, 0, 0, 0, 0,
5094 0, 19, 20, 21, 22, 23, 24, 25, 0, 0,
5095 26, 0, 0, 0, 0, 0, 27, 28, 284, 30,
5096 31, 32, 33, 34, 35, 36, 37, 38, 39, 0,
5097 40, 41, 42, 43, 44, 45, 46, 0, 0, -853,
5098 0, 0, 0, 0, 0, 0, 0, 47, 48, 0,
5099 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5100 0, 0, 49, 50, 0, 0, 0, 0, 0, 0,
5101 51, 0, 0, 52, 53, 54, 55, 0, 56, 0,
5102 0, 57, 58, 59, 60, 61, 62, 63, 64, 65,
5103 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5104 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5105 0, 0, 0, 0, 0, 0, 0, 0, 66, 67,
5106 68, 0, 0, 0, 3, -853, 4, 5, 6, 7,
5107 8, -853, 0, -853, 9, 10, 0, -853, -853, 11,
5108 0, 12, 13, 14, 15, 16, 17, 18, 0, 0,
5109 0, 0, 0, 19, 20, 21, 22, 23, 24, 25,
5110 0, 0, 26, 0, 0, 0, 0, 0, 27, 28,
5111 284, 30, 31, 32, 33, 34, 35, 36, 37, 38,
5112 39, 0, 40, 41, 42, 43, 44, 45, 46, 0,
5113 0, -853, 0, 0, 0, 0, 0, 0, 0, 47,
5114 48, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5115 0, 0, 0, 0, 49, 50, 0, 0, 0, 0,
5116 0, 0, 51, 0, 0, 52, 53, 54, 55, 0,
5117 56, 0, 0, 57, 58, 59, 60, 61, 62, 63,
5118 64, 65, 0, 0, 0, 0, 0, 0, 0, 0,
5119 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5120 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5121 66, 67, 68, 0, 0, 0, 3, -853, 4, 5,
5122 6, 7, 8, -853, 0, -853, 9, 10, 0, 0,
5123 -853, 11, -853, 12, 13, 14, 15, 16, 17, 18,
5124 0, 0, 0, 0, 0, 19, 20, 21, 22, 23,
5125 24, 25, 0, 0, 26, 0, 0, 0, 0, 0,
5126 27, 28, 284, 30, 31, 32, 33, 34, 35, 36,
5127 37, 38, 39, 0, 40, 41, 42, 43, 44, 45,
5128 46, 0, 0, -853, 0, 0, 0, 0, 0, 0,
5129 0, 47, 48, 0, 0, 0, 0, 0, 0, 0,
5130 0, 0, 0, 0, 0, 0, 49, 50, 0, 0,
5131 0, 0, 0, 0, 51, 0, 0, 52, 53, 54,
5132 55, 0, 56, 0, 0, 57, 58, 59, 60, 61,
5133 62, 63, 64, 65, 0, 0, 0, 0, 0, 0,
5134 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5135 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5136 0, 0, 66, 67, 68, 0, 0, 0, 3, -853,
5137 4, 5, 6, 7, 8, -853, 0, -853, 9, 10,
5138 0, 0, -853, 11, 0, 12, 13, 14, 15, 16,
5139 17, 18, -853, 0, 0, 0, 0, 19, 20, 21,
5140 22, 23, 24, 25, 0, 0, 26, 0, 0, 0,
5141 0, 0, 27, 28, 284, 30, 31, 32, 33, 34,
5142 35, 36, 37, 38, 39, 0, 40, 41, 42, 43,
5143 44, 45, 46, 0, 0, -853, 0, 0, 0, 0,
5144 0, 0, 0, 47, 48, 0, 0, 0, 0, 0,
5145 0, 0, 0, 0, 0, 0, 0, 0, 49, 50,
5146 0, 0, 0, 0, 0, 0, 51, 0, 0, 52,
5147 53, 54, 55, 0, 56, 0, 0, 57, 58, 59,
5148 60, 61, 62, 63, 64, 65, 0, 0, 0, 0,
5149 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5150 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5151 0, 0, 0, 0, 66, 67, 68, 0, 0, 0,
5152 3, -853, 4, 5, 6, 7, 8, -853, 0, -853,
5153 9, 10, 0, 0, -853, 11, 0, 12, 13, 14,
5154 15, 16, 17, 18, 0, 0, 0, 0, 0, 19,
5155 20, 21, 22, 23, 24, 25, 0, 0, 26, 0,
5156 0, 0, 0, 0, 27, 28, 284, 30, 31, 32,
5157 33, 34, 35, 36, 37, 38, 39, 0, 40, 41,
5158 42, 43, 44, 45, 46, 0, 0, -853, 0, 0,
5159 0, 0, 0, 0, 0, 47, 48, 0, 0, 0,
5160 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5161 49, 50, 0, 0, 0, 0, 0, 0, 51, 0,
5162 0, 52, 53, 54, 55, 0, 56, 0, 0, 57,
5163 58, 59, 60, 61, 62, 63, 64, 65, 0, 0,
5164 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5165 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5166 0, 0, 0, 0, 0, 0, 66, 67, 68, 0,
5167 0, 0, 3, -853, 4, 5, 6, 7, 8, -853,
5168 -853, -853, 9, 10, 0, 0, 0, 11, 0, 12,
5169 13, 14, 15, 16, 17, 18, 0, 0, 0, 0,
5170 0, 19, 20, 21, 22, 23, 24, 25, 0, 0,
5171 26, 0, 0, 0, 0, 0, 27, 28, 284, 30,
5172 31, 32, 33, 34, 35, 36, 37, 38, 39, 0,
5173 40, 41, 42, 43, 44, 45, 46, 0, 0, -853,
5174 0, 0, 0, 0, 0, 0, 0, 47, 48, 0,
5175 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5176 0, 0, 49, 50, 0, 0, 0, 0, 0, 0,
5177 51, 0, 0, 52, 53, 54, 55, 0, 56, 0,
5178 0, 57, 58, 59, 60, 61, 62, 63, 64, 65,
5179 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5180 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5181 0, 0, 0, 0, 0, 0, 0, 0, 66, 67,
5182 68, 0, 0, 0, 3, -853, 4, 5, 6, 7,
5183 8, -853, 0, -853, 9, 10, 0, 0, 0, 11,
5184 0, 12, 13, 14, 15, 16, 17, 18, 0, 0,
5185 0, 0, 0, 19, 20, 21, 22, 23, 24, 25,
5186 0, 0, 26, 0, 0, 0, 0, 0, 27, 28,
5187 284, 30, 31, 32, 33, 34, 35, 36, 37, 38,
5188 39, 0, 40, 41, 42, 43, 44, 45, 46, 0,
5189 0, -853, 0, 0, 0, 0, 0, 0, 0, 47,
5190 48, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5191 0, 0, 0, 0, 49, 50, 0, 0, 0, 0,
5192 0, 0, 51, 0, 0, 52, 53, 54, 55, 0,
5193 56, 0, 0, 57, 58, 59, 60, 61, 62, 63,
5194 64, 65, 0, 0, 0, 0, 0, 0, 0, 0,
5195 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5196 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5197 66, 67, 68, 0, 0, 0, 3, -853, 4, 5,
5198 6, 7, 8, -853, 0, 0, 9, 10, 0, 0,
5199 0, 11, 0, 12, 13, 14, 15, 16, 17, 18,
5200 0, 0, 0, 0, 0, 19, 20, 21, 22, 23,
5201 24, 25, 0, 0, 26, 0, 0, 0, 0, 0,
5202 27, 28, 284, 30, 31, 32, 33, 34, 35, 36,
5203 37, 38, 39, 0, 40, 41, 42, 43, 44, 45,
5204 46, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5205 0, 47, 48, 0, 0, 0, 0, 0, 0, 0,
5206 0, 0, 0, 0, 0, 0, 49, 50, 0, 0,
5207 0, 0, 0, 0, 51, 0, 0, 285, 53, 54,
5208 55, 0, 56, 0, 0, 57, 58, 59, 60, 61,
5209 62, 63, 64, 65, 0, 0, 0, 0, 0, 0,
5210 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5211 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5212 0, 0, 66, 67, 68, 0, 0, 0, 0, -853,
5213 0, 0, 0, -853, 3, -853, 4, 5, 6, 7,
5214 8, 0, 0, 0, 9, 10, 0, 0, 0, 11,
5215 0, 12, 13, 14, 15, 16, 17, 18, 0, 0,
5216 0, 0, 0, 19, 20, 21, 22, 23, 24, 25,
5217 0, 0, 26, 0, 0, 0, 0, 0, 27, 28,
5218 284, 30, 31, 32, 33, 34, 35, 36, 37, 38,
5219 39, 0, 40, 41, 42, 43, 44, 45, 46, 0,
5220 0, 0, 0, 0, 0, 0, 0, 0, 0, 47,
5221 48, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5222 0, 0, 0, 0, 49, 50, 0, 0, 0, 0,
5223 0, 0, 51, 0, 0, 52, 53, 54, 55, 0,
5224 56, 0, 0, 57, 58, 59, 60, 61, 62, 63,
5225 64, 65, 0, 0, 0, 0, 0, 0, 0, 0,
5226 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5227 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5228 66, 67, 68, 0, 0, 0, 0, -853, 0, 0,
5229 0, -853, 3, -853, 4, 5, 6, 7, 8, 0,
5230 0, 0, 9, 10, 0, 0, 0, 11, 0, 12,
5231 13, 14, 15, 16, 17, 18, 0, 0, 0, 0,
5232 0, 19, 20, 21, 22, 23, 24, 25, 0, 0,
5233 26, 0, 0, 0, 0, 0, 27, 28, 29, 30,
5234 31, 32, 33, 34, 35, 36, 37, 38, 39, 0,
5235 40, 41, 42, 43, 44, 45, 46, 0, 0, 0,
5236 0, 0, 0, 0, 0, 0, 0, 47, 48, 0,
5237 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5238 0, 0, 49, 50, 0, 0, 0, 0, 0, 0,
5239 51, 0, 0, 52, 53, 54, 55, 0, 56, 0,
5240 0, 57, 58, 59, 60, 61, 62, 63, 64, 65,
5241 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5242 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5243 0, 0, 0, 0, 0, 0, 0, 0, 66, 67,
5244 68, 0, 0, -853, 3, -853, 4, 5, 6, 7,
5245 8, -853, 0, 0, 9, 10, 0, 0, 0, 11,
5246 0, 12, 13, 14, 15, 16, 17, 18, 0, 0,
5247 0, 0, 0, 19, 20, 21, 22, 23, 24, 25,
5248 0, 0, 26, 0, 0, 0, 0, 0, 27, 28,
5249 284, 30, 31, 32, 33, 34, 35, 36, 37, 38,
5250 39, 0, 40, 41, 42, 43, 44, 45, 46, 0,
5251 0, 0, 0, 0, 0, 0, 0, 0, 0, 47,
5252 48, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5253 0, 0, 0, 0, 49, 50, 0, 0, 0, 0,
5254 0, 0, 51, 0, 0, 52, 53, 54, 55, 0,
5255 56, 0, 0, 57, 58, 59, 60, 61, 62, 63,
5256 64, 65, 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 66, 67, 68, 0, 0, -853, 404, -853, 4, 5,
5260 6, 0, 8, -853, 0, 0, 9, 10, 0, 0,
5261 0, 11, -3, 12, 13, 14, 15, 16, 17, 18,
5262 0, 0, 0, 0, 0, 19, 20, 21, 22, 23,
5263 24, 25, 0, 0, 26, 0, 0, 0, 0, 0,
5264 0, 28, 0, 0, 31, 32, 33, 34, 35, 36,
5265 37, 38, 39, 0, 40, 41, 42, 43, 44, 45,
5266 46, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5267 0, 47, 48, 0, 0, 0, 0, 0, 0, 0,
5268 0, 0, 0, 0, 0, 0, 49, 50, 0, 0,
5269 0, 0, 0, 0, 229, 0, 0, 230, 53, 54,
5270 55, 0, 0, 0, 0, 57, 58, 59, 60, 61,
5271 62, 63, 64, 65, 0, 0, 0, 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, 66, 67, 68, 0, 0, 0, 0, 331,
5275 0, 0, 0, 0, 0, 332, 144, 145, 146, 147,
5276 148, 149, 150, 151, 152, 153, 154, 155, 156, 157,
5277 158, 159, 160, 161, 162, 163, 164, 165, 166, 167,
5278 0, 0, 0, 168, 169, 170, 434, 435, 436, 437,
5279 175, 176, 177, 0, 0, 0, 0, 0, 178, 179,
5280 180, 181, 438, 439, 440, 441, 186, 36, 37, 442,
5281 39, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5282 0, 0, 0, 0, 0, 0, 0, 0, 0, 188,
5283 189, 190, 191, 192, 193, 194, 195, 196, 0, 0,
5284 197, 198, 0, 0, 0, 0, 199, 200, 201, 202,
5285 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5286 203, 204, 0, 0, 0, 0, 0, 0, 0, 0,
5287 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5288 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5289 205, 206, 207, 208, 209, 210, 211, 212, 213, 214,
5290 0, 215, 216, 0, 0, 0, 0, 0, 0, 217,
5291 443, 144, 145, 146, 147, 148, 149, 150, 151, 152,
5292 153, 154, 155, 156, 157, 158, 159, 160, 161, 162,
5293 163, 164, 165, 166, 167, 0, 0, 0, 168, 169,
5294 170, 171, 172, 173, 174, 175, 176, 177, 0, 0,
5295 0, 0, 0, 178, 179, 180, 181, 182, 183, 184,
5296 185, 186, 36, 37, 187, 39, 0, 0, 0, 0,
5297 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5298 0, 0, 0, 0, 188, 189, 190, 191, 192, 193,
5299 194, 195, 196, 0, 0, 197, 198, 0, 0, 0,
5300 0, 199, 200, 201, 202, 0, 0, 0, 0, 0,
5301 0, 0, 0, 0, 0, 203, 204, 0, 0, 0,
5302 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5303 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5304 0, 0, 0, 0, 0, 205, 206, 207, 208, 209,
5305 210, 211, 212, 213, 214, 0, 215, 216, 0, 0,
5306 0, 0, 0, 0, 217, 144, 145, 146, 147, 148,
5307 149, 150, 151, 152, 153, 154, 155, 156, 157, 158,
5308 159, 160, 161, 162, 163, 164, 165, 166, 167, 0,
5309 0, 0, 168, 169, 170, 171, 172, 173, 174, 175,
5310 176, 177, 0, 0, 0, 0, 0, 178, 179, 180,
5311 181, 182, 183, 184, 185, 186, 262, 0, 187, 0,
5312 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5313 0, 0, 0, 0, 0, 0, 0, 0, 188, 189,
5314 190, 191, 192, 193, 194, 195, 196, 0, 0, 197,
5315 198, 0, 0, 0, 0, 199, 200, 201, 202, 0,
5316 0, 0, 0, 0, 0, 0, 0, 0, 0, 203,
5317 204, 0, 0, 58, 0, 0, 0, 0, 0, 0,
5318 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5319 0, 0, 0, 0, 0, 0, 0, 0, 0, 205,
5320 206, 207, 208, 209, 210, 211, 212, 213, 214, 0,
5321 215, 216, 0, 0, 0, 0, 0, 0, 217, 144,
5322 145, 146, 147, 148, 149, 150, 151, 152, 153, 154,
5323 155, 156, 157, 158, 159, 160, 161, 162, 163, 164,
5324 165, 166, 167, 0, 0, 0, 168, 169, 170, 171,
5325 172, 173, 174, 175, 176, 177, 0, 0, 0, 0,
5326 0, 178, 179, 180, 181, 182, 183, 184, 185, 186,
5327 0, 0, 187, 0, 0, 0, 0, 0, 0, 0,
5328 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5329 0, 0, 188, 189, 190, 191, 192, 193, 194, 195,
5330 196, 0, 0, 197, 198, 0, 0, 0, 0, 199,
5331 200, 201, 202, 0, 0, 0, 0, 0, 0, 0,
5332 0, 0, 0, 203, 204, 0, 0, 58, 0, 0,
5333 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5334 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5335 0, 0, 0, 205, 206, 207, 208, 209, 210, 211,
5336 212, 213, 214, 0, 215, 216, 0, 0, 0, 0,
5337 0, 0, 217, 144, 145, 146, 147, 148, 149, 150,
5338 151, 152, 153, 154, 155, 156, 157, 158, 159, 160,
5339 161, 162, 163, 164, 165, 166, 167, 0, 0, 0,
5340 168, 169, 170, 171, 172, 173, 174, 175, 176, 177,
5341 0, 0, 0, 0, 0, 178, 179, 180, 181, 182,
5342 183, 184, 185, 186, 0, 0, 187, 0, 0, 0,
5343 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5344 0, 0, 0, 0, 0, 0, 188, 189, 190, 191,
5345 192, 193, 194, 195, 196, 0, 0, 197, 198, 0,
5346 0, 0, 0, 199, 200, 201, 202, 0, 0, 0,
5347 0, 0, 0, 0, 0, 0, 0, 203, 204, 0,
5348 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5349 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5350 0, 0, 0, 0, 0, 0, 0, 205, 206, 207,
5351 208, 209, 210, 211, 212, 213, 214, 0, 215, 216,
5352 4, 5, 6, 0, 8, 0, 217, 0, 9, 10,
5353 0, 0, 0, 11, 0, 12, 13, 14, 270, 271,
5354 17, 18, 0, 0, 0, 0, 0, 19, 20, 272,
5355 22, 23, 24, 25, 0, 0, 227, 0, 0, 0,
5356 0, 0, 0, 302, 0, 0, 31, 32, 33, 34,
5357 35, 36, 37, 38, 39, 0, 40, 41, 42, 43,
5358 44, 45, 46, 0, 0, 0, 0, 0, 0, 0,
5359 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5360 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5361 0, 0, 0, 0, 0, 0, 303, 0, 0, 230,
5362 53, 54, 55, 0, 0, 0, 0, 57, 58, 59,
5363 60, 61, 62, 63, 64, 65, 0, 0, 4, 5,
5364 6, 0, 8, 0, 0, 0, 9, 10, 0, 0,
5365 0, 11, 0, 12, 13, 14, 270, 271, 17, 18,
5366 0, 0, 0, 0, 304, 19, 20, 272, 22, 23,
5367 24, 25, 305, 0, 227, 0, 0, 0, 0, 0,
5368 0, 302, 0, 0, 31, 32, 33, 34, 35, 36,
5369 37, 38, 39, 0, 40, 41, 42, 43, 44, 45,
5370 46, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5371 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5372 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5373 0, 0, 0, 0, 303, 0, 0, 230, 53, 54,
5374 55, 0, 0, 0, 0, 57, 58, 59, 60, 61,
5375 62, 63, 64, 65, 0, 0, 4, 5, 6, 0,
5376 8, 0, 0, 0, 9, 10, 0, 0, 0, 11,
5377 0, 12, 13, 14, 15, 16, 17, 18, 0, 0,
5378 0, 0, 304, 19, 20, 21, 22, 23, 24, 25,
5379 612, 0, 227, 0, 0, 0, 0, 0, 0, 28,
5380 0, 0, 31, 32, 33, 34, 35, 36, 37, 38,
5381 39, 228, 40, 41, 42, 43, 44, 45, 46, 0,
5382 0, 0, 0, 0, 0, 0, 0, 0, 0, 47,
5383 48, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5384 0, 0, 0, 0, 49, 50, 0, 0, 0, 0,
5385 0, 0, 229, 0, 0, 230, 53, 54, 55, 0,
5386 231, 232, 233, 57, 58, 234, 60, 61, 62, 63,
5387 64, 65, 0, 0, 0, 0, 0, 0, 0, 0,
5388 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5389 0, 0, 0, 0, 0, 4, 5, 6, 0, 8,
5390 66, 235, 68, 9, 10, 0, 0, 259, 11, 0,
5391 12, 13, 14, 15, 16, 17, 18, 0, 0, 0,
5392 0, 0, 19, 20, 21, 22, 23, 24, 25, 0,
5393 0, 26, 0, 0, 0, 0, 0, 0, 28, 0,
5394 0, 31, 32, 33, 34, 35, 36, 37, 38, 39,
5395 0, 40, 41, 42, 43, 44, 45, 46, 0, 0,
5396 0, 0, 0, 0, 0, 0, 0, 0, 47, 48,
5397 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5398 0, 0, 0, 49, 50, 0, 0, 0, 0, 0,
5399 0, 229, 0, 0, 230, 53, 54, 55, 0, 0,
5400 0, 0, 57, 58, 59, 60, 61, 62, 63, 64,
5401 65, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5402 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5403 0, 0, 3, 0, 4, 5, 6, 7, 8, 66,
5404 67, 68, 9, 10, 0, 0, 259, 11, 0, 12,
5405 13, 14, 15, 16, 17, 18, 0, 0, 0, 0,
5406 0, 19, 20, 21, 22, 23, 24, 25, 0, 0,
5407 26, 0, 0, 0, 0, 0, 27, 28, 0, 30,
5408 31, 32, 33, 34, 35, 36, 37, 38, 39, 0,
5409 40, 41, 42, 43, 44, 45, 46, 0, 0, 0,
5410 0, 0, 0, 0, 0, 0, 0, 47, 48, 0,
5411 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5412 0, 0, 49, 50, 0, 0, 0, 0, 0, 0,
5413 51, 0, 0, 52, 53, 54, 55, 0, 56, 0,
5414 0, 57, 58, 59, 60, 61, 62, 63, 64, 65,
5415 0, 0, 404, 0, 4, 5, 6, 0, 8, 0,
5416 0, 0, 9, 10, 0, 0, 0, 11, 0, 12,
5417 13, 14, 15, 16, 17, 18, 0, 0, 66, 67,
5418 68, 19, 20, 21, 22, 23, 24, 25, 0, 0,
5419 26, 0, 0, 0, 0, 0, 0, 28, 0, 0,
5420 31, 32, 33, 34, 35, 36, 37, 38, 39, 0,
5421 40, 41, 42, 43, 44, 45, 46, 0, 0, 0,
5422 0, 0, 0, 0, 0, 0, 0, 47, 48, 0,
5423 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5424 0, 0, 49, 50, 0, 0, 0, 0, 0, 0,
5425 229, 0, 0, 230, 53, 54, 55, 0, 0, 0,
5426 0, 57, 58, 59, 60, 61, 62, 63, 64, 65,
5427 0, 0, 0, 0, 4, 5, 6, 0, 8, 0,
5428 0, 0, 9, 10, 0, 0, 0, 11, 0, 12,
5429 13, 14, 15, 16, 17, 18, 0, 0, 66, 67,
5430 68, 19, 20, 21, 22, 23, 24, 25, 0, 0,
5431 227, 0, 0, 0, 0, 0, 0, 28, 0, 0,
5432 31, 32, 33, 34, 35, 36, 37, 38, 39, 228,
5433 40, 41, 42, 43, 44, 45, 46, 0, 0, 0,
5434 0, 0, 0, 0, 0, 0, 0, 47, 48, 0,
5435 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5436 0, 0, 49, 50, 0, 0, 0, 0, 0, 0,
5437 229, 0, 0, 230, 53, 54, 55, 0, 231, 232,
5438 233, 57, 58, 234, 60, 61, 62, 63, 64, 65,
5439 0, 0, 0, 0, 4, 5, 6, 0, 8, 0,
5440 0, 0, 9, 10, 0, 0, 0, 11, 0, 12,
5441 13, 14, 15, 16, 17, 18, 0, 0, 66, 235,
5442 68, 19, 20, 21, 22, 23, 24, 25, 0, 0,
5443 227, 0, 0, 0, 0, 0, 0, 28, 0, 0,
5444 31, 32, 33, 34, 35, 36, 37, 38, 39, 228,
5445 40, 41, 42, 43, 44, 45, 46, 0, 0, 0,
5446 0, 0, 0, 0, 0, 0, 0, 47, 48, 0,
5447 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5448 0, 0, 49, 479, 0, 0, 0, 0, 0, 0,
5449 229, 0, 0, 230, 53, 54, 55, 0, 231, 232,
5450 233, 57, 58, 234, 60, 61, 62, 63, 64, 65,
5451 0, 0, 0, 0, 4, 5, 6, 0, 8, 0,
5452 0, 0, 9, 10, 0, 0, 0, 11, 0, 12,
5453 13, 14, 270, 271, 17, 18, 0, 0, 66, 235,
5454 68, 19, 20, 272, 22, 23, 24, 25, 0, 0,
5455 227, 0, 0, 0, 0, 0, 0, 28, 0, 0,
5456 31, 32, 33, 34, 35, 36, 37, 38, 39, 228,
5457 40, 41, 42, 43, 44, 45, 46, 0, 0, 0,
5458 0, 0, 0, 0, 0, 0, 0, 47, 48, 0,
5459 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5460 0, 0, 49, 50, 0, 0, 0, 0, 0, 0,
5461 229, 0, 0, 230, 53, 54, 55, 0, 231, 232,
5462 233, 57, 58, 234, 60, 61, 62, 63, 64, 65,
5463 0, 0, 0, 0, 4, 5, 6, 0, 8, 0,
5464 0, 0, 9, 10, 0, 0, 0, 11, 0, 12,
5465 13, 14, 270, 271, 17, 18, 0, 0, 66, 235,
5466 68, 19, 20, 272, 22, 23, 24, 25, 0, 0,
5467 227, 0, 0, 0, 0, 0, 0, 28, 0, 0,
5468 31, 32, 33, 34, 35, 36, 37, 38, 39, 228,
5469 40, 41, 42, 43, 44, 45, 46, 0, 0, 0,
5470 0, 0, 0, 0, 0, 0, 0, 47, 48, 0,
5471 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5472 0, 0, 49, 479, 0, 0, 0, 0, 0, 0,
5473 229, 0, 0, 230, 53, 54, 55, 0, 231, 232,
5474 233, 57, 58, 234, 60, 61, 62, 63, 64, 65,
5475 0, 0, 0, 0, 4, 5, 6, 0, 8, 0,
5476 0, 0, 9, 10, 0, 0, 0, 11, 0, 12,
5477 13, 14, 270, 271, 17, 18, 0, 0, 66, 235,
5478 68, 19, 20, 272, 22, 23, 24, 25, 0, 0,
5479 227, 0, 0, 0, 0, 0, 0, 28, 0, 0,
5480 31, 32, 33, 34, 35, 36, 37, 38, 39, 228,
5481 40, 41, 42, 43, 44, 45, 46, 0, 0, 0,
5482 0, 0, 0, 0, 0, 0, 0, 47, 48, 0,
5483 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5484 0, 0, 49, 50, 0, 0, 0, 0, 0, 0,
5485 229, 0, 0, 230, 53, 54, 55, 0, 231, 232,
5486 0, 57, 58, 234, 60, 61, 62, 63, 64, 65,
5487 0, 0, 0, 0, 4, 5, 6, 0, 8, 0,
5488 0, 0, 9, 10, 0, 0, 0, 11, 0, 12,
5489 13, 14, 270, 271, 17, 18, 0, 0, 66, 235,
5490 68, 19, 20, 272, 22, 23, 24, 25, 0, 0,
5491 227, 0, 0, 0, 0, 0, 0, 28, 0, 0,
5492 31, 32, 33, 34, 35, 36, 37, 38, 39, 228,
5493 40, 41, 42, 43, 44, 45, 46, 0, 0, 0,
5494 0, 0, 0, 0, 0, 0, 0, 47, 48, 0,
5495 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5496 0, 0, 49, 50, 0, 0, 0, 0, 0, 0,
5497 229, 0, 0, 230, 53, 54, 55, 0, 0, 232,
5498 233, 57, 58, 234, 60, 61, 62, 63, 64, 65,
5499 0, 0, 0, 0, 4, 5, 6, 0, 8, 0,
5500 0, 0, 9, 10, 0, 0, 0, 11, 0, 12,
5501 13, 14, 270, 271, 17, 18, 0, 0, 66, 235,
5502 68, 19, 20, 272, 22, 23, 24, 25, 0, 0,
5503 227, 0, 0, 0, 0, 0, 0, 28, 0, 0,
5504 31, 32, 33, 34, 35, 36, 37, 38, 39, 228,
5505 40, 41, 42, 43, 44, 45, 46, 0, 0, 0,
5506 0, 0, 0, 0, 0, 0, 0, 47, 48, 0,
5507 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5508 0, 0, 49, 50, 0, 0, 0, 0, 0, 0,
5509 229, 0, 0, 230, 53, 54, 55, 0, 0, 232,
5510 0, 57, 58, 234, 60, 61, 62, 63, 64, 65,
5511 0, 0, 0, 0, 4, 5, 6, 0, 8, 0,
5512 0, 0, 9, 10, 0, 0, 0, 11, 0, 12,
5513 13, 14, 15, 16, 17, 18, 0, 0, 66, 235,
5514 68, 19, 20, 21, 22, 23, 24, 25, 0, 0,
5515 227, 0, 0, 0, 0, 0, 0, 28, 0, 0,
5516 31, 32, 33, 34, 35, 36, 37, 38, 39, 0,
5517 40, 41, 42, 43, 44, 45, 46, 0, 0, 0,
5518 0, 0, 0, 0, 0, 0, 0, 47, 48, 0,
5519 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5520 0, 0, 49, 50, 0, 0, 0, 0, 0, 0,
5521 229, 0, 0, 230, 53, 54, 55, 0, 802, 0,
5522 0, 57, 58, 59, 60, 61, 62, 63, 64, 65,
5523 0, 0, 0, 0, 4, 5, 6, 0, 8, 0,
5524 0, 0, 9, 10, 0, 0, 0, 11, 0, 12,
5525 13, 14, 15, 16, 17, 18, 0, 0, 66, 235,
5526 68, 19, 20, 21, 22, 23, 24, 25, 0, 0,
5527 227, 0, 0, 0, 0, 0, 0, 28, 0, 0,
5528 31, 32, 33, 34, 35, 36, 37, 38, 39, 0,
5529 40, 41, 42, 43, 44, 45, 46, 0, 0, 0,
5530 0, 0, 0, 0, 0, 0, 0, 47, 48, 0,
5531 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5532 0, 0, 49, 50, 0, 0, 0, 0, 0, 0,
5533 813, 0, 0, 230, 53, 54, 55, 0, 802, 0,
5534 0, 57, 58, 59, 60, 61, 62, 63, 64, 65,
5535 0, 0, 0, 0, 4, 5, 6, 0, 8, 0,
5536 0, 0, 9, 10, 0, 0, 0, 11, 0, 12,
5537 13, 14, 270, 271, 17, 18, 0, 0, 66, 235,
5538 68, 19, 20, 272, 22, 23, 24, 25, 0, 0,
5539 227, 0, 0, 0, 0, 0, 0, 28, 0, 0,
5540 31, 32, 33, 34, 35, 36, 37, 38, 39, 0,
5541 40, 41, 42, 43, 44, 45, 46, 0, 0, 0,
5542 0, 0, 0, 0, 0, 0, 0, 47, 48, 0,
5543 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5544 0, 0, 49, 50, 0, 0, 0, 0, 0, 0,
5545 229, 0, 0, 230, 53, 54, 55, 0, 973, 0,
5546 0, 57, 58, 59, 60, 61, 62, 63, 64, 65,
5547 0, 0, 0, 0, 4, 5, 6, 0, 8, 0,
5548 0, 0, 9, 10, 0, 0, 0, 11, 0, 12,
5549 13, 14, 270, 271, 17, 18, 0, 0, 66, 235,
5550 68, 19, 20, 272, 22, 23, 24, 25, 0, 0,
5551 227, 0, 0, 0, 0, 0, 0, 28, 0, 0,
5552 31, 32, 33, 34, 35, 36, 37, 38, 39, 0,
5553 40, 41, 42, 43, 44, 45, 46, 0, 0, 0,
5554 0, 0, 0, 0, 0, 0, 0, 47, 48, 0,
5555 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5556 0, 0, 49, 50, 0, 0, 0, 0, 0, 0,
5557 229, 0, 0, 230, 53, 54, 55, 0, 1022, 0,
5558 0, 57, 58, 59, 60, 61, 62, 63, 64, 65,
5559 0, 0, 0, 0, 4, 5, 6, 0, 8, 0,
5560 0, 0, 9, 10, 0, 0, 0, 11, 0, 12,
5561 13, 14, 270, 271, 17, 18, 0, 0, 66, 235,
5562 68, 19, 20, 272, 22, 23, 24, 25, 0, 0,
5563 227, 0, 0, 0, 0, 0, 0, 28, 0, 0,
5564 31, 32, 33, 34, 35, 36, 37, 38, 39, 0,
5565 40, 41, 42, 43, 44, 45, 46, 0, 0, 0,
5566 0, 0, 0, 0, 0, 0, 0, 47, 48, 0,
5567 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5568 0, 0, 49, 50, 0, 0, 0, 0, 0, 0,
5569 229, 0, 0, 230, 53, 54, 55, 0, 802, 0,
5570 0, 57, 58, 59, 60, 61, 62, 63, 64, 65,
5571 0, 0, 0, 0, 4, 5, 6, 0, 8, 0,
5572 0, 0, 9, 10, 0, 0, 0, 11, 0, 12,
5573 13, 14, 270, 271, 17, 18, 0, 0, 66, 235,
5574 68, 19, 20, 272, 22, 23, 24, 25, 0, 0,
5575 227, 0, 0, 0, 0, 0, 0, 28, 0, 0,
5576 31, 32, 33, 34, 35, 36, 37, 38, 39, 0,
5577 40, 41, 42, 43, 44, 45, 46, 0, 0, 0,
5578 0, 0, 0, 0, 0, 0, 0, 47, 48, 0,
5579 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5580 0, 0, 49, 50, 0, 0, 0, 0, 0, 0,
5581 229, 0, 0, 230, 53, 54, 55, 0, 1155, 0,
5582 0, 57, 58, 59, 60, 61, 62, 63, 64, 65,
5583 0, 0, 0, 0, 4, 5, 6, 0, 8, 0,
5584 0, 0, 9, 10, 0, 0, 0, 11, 0, 12,
5585 13, 14, 270, 271, 17, 18, 0, 0, 66, 235,
5586 68, 19, 20, 272, 22, 23, 24, 25, 0, 0,
5587 227, 0, 0, 0, 0, 0, 0, 28, 0, 0,
5588 31, 32, 33, 34, 35, 36, 37, 38, 39, 0,
5589 40, 41, 42, 43, 44, 45, 46, 0, 0, 0,
5590 0, 0, 0, 0, 0, 0, 0, 47, 48, 0,
5591 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5592 0, 0, 49, 50, 0, 0, 0, 0, 0, 0,
5593 229, 0, 0, 230, 53, 54, 55, 0, 0, 0,
5594 0, 57, 58, 59, 60, 61, 62, 63, 64, 65,
5595 0, 0, 0, 0, 4, 5, 6, 0, 8, 0,
5596 0, 0, 9, 10, 0, 0, 0, 11, 0, 12,
5597 13, 14, 15, 16, 17, 18, 0, 0, 66, 235,
5598 68, 19, 20, 21, 22, 23, 24, 25, 0, 0,
5599 227, 0, 0, 0, 0, 0, 0, 28, 0, 0,
5600 31, 32, 33, 34, 35, 36, 37, 38, 39, 0,
5601 40, 41, 42, 43, 44, 45, 46, 0, 0, 0,
5602 0, 0, 0, 0, 0, 0, 0, 47, 48, 0,
5603 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5604 0, 0, 49, 50, 0, 0, 0, 0, 0, 0,
5605 229, 0, 0, 230, 53, 54, 55, 0, 0, 0,
5606 0, 57, 58, 59, 60, 61, 62, 63, 64, 65,
5607 0, 0, 0, 0, 4, 5, 6, 0, 8, 0,
5608 0, 0, 9, 10, 0, 0, 0, 11, 0, 12,
5609 13, 14, 15, 16, 17, 18, 0, 0, 66, 235,
5610 68, 19, 20, 21, 22, 23, 24, 25, 0, 0,
5611 26, 0, 0, 0, 0, 0, 0, 28, 0, 0,
5612 31, 32, 33, 34, 35, 36, 37, 38, 39, 0,
5613 40, 41, 42, 43, 44, 45, 46, 0, 0, 0,
5614 0, 0, 0, 0, 0, 0, 0, 47, 48, 0,
5615 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5616 0, 0, 49, 50, 0, 0, 0, 0, 0, 0,
5617 229, 0, 0, 230, 53, 54, 55, 0, 0, 0,
5618 0, 57, 58, 59, 60, 61, 62, 63, 64, 65,
5619 0, 0, 0, 0, 4, 5, 6, 0, 8, 0,
5620 0, 0, 9, 10, 0, 0, 0, 11, 0, 12,
5621 13, 14, 15, 16, 17, 18, 0, 0, 66, 67,
5622 68, 19, 20, 21, 22, 23, 24, 25, 0, 0,
5623 784, 0, 0, 0, 0, 0, 0, 28, 0, 0,
5624 31, 32, 33, 34, 35, 36, 37, 38, 39, 0,
5625 40, 41, 42, 43, 44, 45, 46, 0, 0, 0,
5626 0, 0, 0, 0, 0, 0, 0, 47, 48, 0,
5627 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5628 0, 0, 49, 50, 0, 0, 0, 0, 0, 0,
5629 229, 0, 0, 230, 53, 54, 55, 0, 0, 0,
5630 0, 57, 58, 59, 60, 61, 62, 63, 64, 65,
5631 0, 0, 0, 0, 4, 5, 6, 0, 8, 0,
5632 0, 0, 9, 10, 0, 0, 0, 11, 0, 12,
5633 13, 14, 15, 16, 17, 18, 0, 0, 66, 235,
5634 68, 19, 20, 21, 22, 23, 24, 25, 0, 0,
5635 227, 0, 0, 0, 0, 0, 0, 28, 0, 0,
5636 31, 32, 33, 34, 35, 36, 37, 38, 39, 0,
5637 40, 41, 42, 43, 44, 45, 46, 0, 0, 0,
5638 0, 0, 0, 0, 0, 0, 0, 47, 48, 0,
5639 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5640 0, 0, 49, 50, 0, 0, 0, 0, 0, 0,
5641 813, 0, 0, 230, 53, 54, 55, 0, 0, 0,
5642 0, 57, 58, 59, 60, 61, 62, 63, 64, 65,
5643 0, 0, 0, 0, 4, 5, 6, 0, 8, 0,
5644 0, 0, 9, 10, 0, 0, 0, 11, 0, 12,
5645 13, 14, 270, 271, 17, 18, 0, 0, 66, 235,
5646 68, 19, 20, 272, 22, 23, 24, 25, 0, 0,
5647 893, 0, 0, 0, 0, 0, 0, 28, 0, 0,
5648 31, 32, 33, 34, 35, 36, 37, 38, 39, 0,
5649 40, 41, 42, 43, 44, 45, 46, 0, 0, 0,
5650 0, 0, 0, 0, 0, 0, 0, 47, 48, 0,
5651 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5652 0, 0, 49, 50, 0, 0, 0, 0, 0, 0,
5653 229, 0, 0, 230, 53, 54, 55, 0, 0, 0,
5654 0, 57, 58, 59, 60, 61, 62, 63, 64, 65,
5655 0, 0, 0, 0, 4, 5, 6, 0, 8, 0,
5656 0, 0, 9, 10, 0, 0, 0, 11, 0, 12,
5657 13, 14, 270, 271, 17, 18, 0, 0, 66, 235,
5658 68, 19, 20, 272, 22, 23, 24, 25, 0, 0,
5659 227, 0, 0, 0, 0, 0, 0, 302, 0, 0,
5660 31, 32, 33, 34, 35, 36, 37, 38, 39, 0,
5661 40, 41, 42, 43, 44, 45, 46, 0, 0, 0,
5662 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5663 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5664 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5665 303, 0, 0, 363, 53, 54, 55, 0, 364, 0,
5666 0, 57, 58, 59, 60, 61, 62, 63, 64, 65,
5667 0, 0, 4, 5, 6, 0, 8, 0, 0, 0,
5668 9, 10, 0, 0, 0, 11, 0, 12, 13, 14,
5669 270, 271, 17, 18, 0, 0, 0, 0, 304, 19,
5670 20, 272, 22, 23, 24, 25, 0, 0, 227, 0,
5671 0, 0, 0, 0, 0, 302, 0, 0, 31, 32,
5672 33, 34, 35, 36, 37, 38, 39, 0, 40, 41,
5673 42, 43, 44, 45, 46, 0, 0, 0, 0, 0,
5674 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5675 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5676 0, 0, 0, 0, 0, 0, 0, 0, 415, 0,
5677 0, 52, 53, 54, 55, 0, 56, 0, 0, 57,
5678 58, 59, 60, 61, 62, 63, 64, 65, 0, 0,
5679 4, 5, 6, 0, 8, 0, 0, 0, 9, 10,
5680 0, 0, 0, 11, 0, 12, 13, 14, 270, 271,
5681 17, 18, 0, 0, 0, 0, 304, 19, 20, 272,
5682 22, 23, 24, 25, 0, 0, 227, 0, 0, 0,
5683 0, 0, 0, 302, 0, 0, 31, 32, 33, 423,
5684 35, 36, 37, 424, 39, 0, 40, 41, 42, 43,
5685 44, 45, 46, 0, 0, 0, 0, 0, 0, 0,
5686 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5687 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5688 0, 0, 425, 0, 0, 0, 426, 0, 0, 230,
5689 53, 54, 55, 0, 0, 0, 0, 57, 58, 59,
5690 60, 61, 62, 63, 64, 65, 0, 0, 4, 5,
5691 6, 0, 8, 0, 0, 0, 9, 10, 0, 0,
5692 0, 11, 0, 12, 13, 14, 270, 271, 17, 18,
5693 0, 0, 0, 0, 304, 19, 20, 272, 22, 23,
5694 24, 25, 0, 0, 227, 0, 0, 0, 0, 0,
5695 0, 302, 0, 0, 31, 32, 33, 423, 35, 36,
5696 37, 424, 39, 0, 40, 41, 42, 43, 44, 45,
5697 46, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5698 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5699 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5700 0, 0, 0, 0, 426, 0, 0, 230, 53, 54,
5701 55, 0, 0, 0, 0, 57, 58, 59, 60, 61,
5702 62, 63, 64, 65, 0, 0, 4, 5, 6, 0,
5703 8, 0, 0, 0, 9, 10, 0, 0, 0, 11,
5704 0, 12, 13, 14, 270, 271, 17, 18, 0, 0,
5705 0, 0, 304, 19, 20, 272, 22, 23, 24, 25,
5706 0, 0, 227, 0, 0, 0, 0, 0, 0, 302,
5707 0, 0, 31, 32, 33, 34, 35, 36, 37, 38,
5708 39, 0, 40, 41, 42, 43, 44, 45, 46, 0,
5709 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5710 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5711 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5712 0, 0, 303, 0, 0, 363, 53, 54, 55, 0,
5713 0, 0, 0, 57, 58, 59, 60, 61, 62, 63,
5714 64, 65, 0, 0, 4, 5, 6, 0, 8, 0,
5715 0, 0, 9, 10, 0, 0, 0, 11, 0, 12,
5716 13, 14, 270, 271, 17, 18, 0, 0, 0, 0,
5717 304, 19, 20, 272, 22, 23, 24, 25, 0, 0,
5718 227, 0, 0, 0, 0, 0, 0, 302, 0, 0,
5719 31, 32, 33, 34, 35, 36, 37, 38, 39, 0,
5720 40, 41, 42, 43, 44, 45, 46, 0, 0, 0,
5721 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5722 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5723 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5724 1223, 0, 0, 230, 53, 54, 55, 0, 0, 0,
5725 0, 57, 58, 59, 60, 61, 62, 63, 64, 65,
5726 0, 0, 4, 5, 6, 0, 8, 0, 0, 0,
5727 9, 10, 0, 0, 0, 11, 0, 12, 13, 14,
5728 270, 271, 17, 18, 0, 0, 0, 0, 304, 19,
5729 20, 272, 22, 23, 24, 25, 0, 0, 227, 0,
5730 0, 0, 0, 0, 0, 302, 0, 0, 31, 32,
5731 33, 34, 35, 36, 37, 38, 39, 0, 40, 41,
5732 42, 43, 44, 45, 46, 0, 0, 0, 0, 0,
5733 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5734 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5735 0, 0, 0, 0, 0, 704, 643, 0, 1343, 705,
5736 0, 230, 53, 54, 55, 0, 0, 0, 0, 57,
5737 58, 59, 60, 61, 62, 63, 64, 65, 0, 188,
5738 189, 190, 191, 192, 193, 194, 195, 196, 0, 0,
5739 197, 198, 0, 0, 0, 0, 199, 200, 201, 202,
5740 0, 0, 0, 0, 0, 0, 304, 0, 0, 0,
5741 203, 204, 0, 0, 0, 0, 0, 0, 0, 0,
5742 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5743 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5744 205, 206, 207, 208, 209, 210, 211, 212, 213, 214,
5745 0, 215, 216, 707, 651, 0, 0, 708, 0, 217,
5746 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5747 0, 0, 0, 0, 0, 0, 0, 188, 189, 190,
5748 191, 192, 193, 194, 195, 196, 0, 0, 197, 198,
5749 0, 0, 0, 0, 199, 200, 201, 202, 0, 0,
5750 0, 0, 0, 0, 0, 0, 0, 0, 203, 204,
5751 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5752 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5753 0, 0, 0, 0, 0, 0, 0, 0, 205, 206,
5754 207, 208, 209, 210, 211, 212, 213, 214, 0, 215,
5755 216, 704, 643, 0, 0, 724, 0, 217, 0, 0,
5756 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5757 0, 0, 0, 0, 0, 188, 189, 190, 191, 192,
5758 193, 194, 195, 196, 0, 0, 197, 198, 0, 0,
5759 0, 0, 199, 200, 201, 202, 0, 0, 0, 0,
5760 0, 0, 0, 0, 0, 0, 203, 204, 0, 0,
5761 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5762 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5763 0, 0, 0, 0, 0, 0, 205, 206, 207, 208,
5764 209, 210, 211, 212, 213, 214, 0, 215, 216, 735,
5765 643, 0, 0, 736, 0, 217, 0, 0, 0, 0,
5766 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5767 0, 0, 0, 188, 189, 190, 191, 192, 193, 194,
5768 195, 196, 0, 0, 197, 198, 0, 0, 0, 0,
5769 199, 200, 201, 202, 0, 0, 0, 0, 0, 0,
5770 0, 0, 0, 0, 203, 204, 0, 0, 0, 0,
5771 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5772 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5773 0, 0, 0, 0, 205, 206, 207, 208, 209, 210,
5774 211, 212, 213, 214, 0, 215, 216, 738, 651, 0,
5775 0, 739, 0, 217, 0, 0, 0, 0, 0, 0,
5776 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5777 0, 188, 189, 190, 191, 192, 193, 194, 195, 196,
5778 0, 0, 197, 198, 0, 0, 0, 0, 199, 200,
5779 201, 202, 0, 0, 0, 0, 0, 0, 0, 0,
5780 0, 0, 203, 204, 0, 0, 0, 0, 0, 0,
5781 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5782 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5783 0, 0, 205, 206, 207, 208, 209, 210, 211, 212,
5784 213, 214, 0, 215, 216, 857, 643, 0, 0, 858,
5785 0, 217, 0, 0, 0, 0, 0, 0, 0, 0,
5786 0, 0, 0, 0, 0, 0, 0, 0, 0, 188,
5787 189, 190, 191, 192, 193, 194, 195, 196, 0, 0,
5788 197, 198, 0, 0, 0, 0, 199, 200, 201, 202,
5789 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5790 203, 204, 0, 0, 0, 0, 0, 0, 0, 0,
5791 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5792 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5793 205, 206, 207, 208, 209, 210, 211, 212, 213, 214,
5794 0, 215, 216, 860, 651, 0, 0, 861, 0, 217,
5795 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5796 0, 0, 0, 0, 0, 0, 0, 188, 189, 190,
5797 191, 192, 193, 194, 195, 196, 0, 0, 197, 198,
5798 0, 0, 0, 0, 199, 200, 201, 202, 0, 0,
5799 0, 0, 0, 0, 0, 0, 0, 0, 203, 204,
5800 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5801 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5802 0, 0, 0, 0, 0, 0, 0, 0, 205, 206,
5803 207, 208, 209, 210, 211, 212, 213, 214, 0, 215,
5804 216, 866, 643, 0, 0, 867, 0, 217, 0, 0,
5805 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5806 0, 0, 0, 0, 0, 188, 189, 190, 191, 192,
5807 193, 194, 195, 196, 0, 0, 197, 198, 0, 0,
5808 0, 0, 199, 200, 201, 202, 0, 0, 0, 0,
5809 0, 0, 0, 0, 0, 0, 203, 204, 0, 0,
5810 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5811 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5812 0, 0, 0, 0, 0, 0, 205, 206, 207, 208,
5813 209, 210, 211, 212, 213, 214, 0, 215, 216, 689,
5814 651, 0, 0, 690, 0, 217, 0, 0, 0, 0,
5815 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5816 0, 0, 0, 188, 189, 190, 191, 192, 193, 194,
5817 195, 196, 0, 0, 197, 198, 0, 0, 0, 0,
5818 199, 200, 201, 202, 0, 0, 0, 0, 0, 0,
5819 0, 0, 0, 0, 203, 204, 0, 0, 0, 0,
5820 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5821 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5822 0, 0, 0, 0, 205, 206, 207, 208, 209, 210,
5823 211, 212, 213, 214, 0, 215, 216, 1028, 643, 0,
5824 0, 1029, 0, 217, 0, 0, 0, 0, 0, 0,
5825 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5826 0, 188, 189, 190, 191, 192, 193, 194, 195, 196,
5827 0, 0, 197, 198, 0, 0, 0, 0, 199, 200,
5828 201, 202, 0, 0, 0, 0, 0, 0, 0, 0,
5829 0, 0, 203, 204, 0, 0, 0, 0, 0, 0,
5830 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5831 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5832 0, 0, 205, 206, 207, 208, 209, 210, 211, 212,
5833 213, 214, 0, 215, 216, 1031, 651, 0, 0, 1032,
5834 0, 217, 0, 0, 0, 0, 0, 0, 0, 0,
5835 0, 0, 0, 0, 0, 0, 0, 0, 0, 188,
5836 189, 190, 191, 192, 193, 194, 195, 196, 0, 0,
5837 197, 198, 0, 0, 0, 0, 199, 200, 201, 202,
5838 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5839 203, 204, 0, 0, 0, 0, 0, 0, 0, 0,
5840 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5841 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5842 205, 206, 207, 208, 209, 210, 211, 212, 213, 214,
5843 0, 215, 216, 1362, 643, 0, 0, 1363, 0, 217,
5844 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5845 0, 0, 0, 0, 0, 0, 0, 188, 189, 190,
5846 191, 192, 193, 194, 195, 196, 0, 0, 197, 198,
5847 0, 0, 0, 0, 199, 200, 201, 202, 0, 0,
5848 0, 0, 0, 0, 0, 0, 0, 0, 203, 204,
5849 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5850 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5851 0, 0, 0, 0, 0, 0, 0, 0, 205, 206,
5852 207, 208, 209, 210, 211, 212, 213, 214, 0, 215,
5853 216, 1365, 651, 0, 0, 1366, 0, 217, 0, 0,
5854 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5855 0, 0, 0, 0, 0, 188, 189, 190, 191, 192,
5856 193, 194, 195, 196, 0, 0, 197, 198, 0, 0,
5857 0, 0, 199, 200, 201, 202, 0, 0, 0, 0,
5858 0, 0, 0, 0, 0, 0, 203, 204, 0, 0,
5859 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5860 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5861 0, 0, 0, 0, 0, 0, 205, 206, 207, 208,
5862 209, 210, 211, 212, 213, 214, 0, 215, 216, 1419,
5863 643, 0, 0, 1420, 0, 217, 0, 0, 0, 0,
5864 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5865 0, 0, 0, 188, 189, 190, 191, 192, 193, 194,
5866 195, 196, 0, 0, 197, 198, 0, 0, 0, 0,
5867 199, 200, 201, 202, 0, 0, 0, 0, 0, 0,
5868 0, 0, 0, 0, 203, 204, 0, 0, 0, 0,
5869 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5870 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5871 0, 0, 0, 0, 205, 206, 207, 208, 209, 210,
5872 211, 212, 213, 214, 0, 215, 216, 0, 0, 0,
5873 0, 0, 0, 217
5874};
5875
5876static const yytype_int16 yycheck[] =
5877{
5878 1, 70, 26, 59, 28, 52, 53, 15, 16, 58,
5879 7, 101, 1, 56, 408, 290, 107, 58, 70, 116,
5880 27, 15, 16, 13, 14, 115, 774, 89, 426, 845,
5881 27, 768, 766, 15, 16, 766, 344, 15, 16, 1070,
5882 400, 349, 7, 469, 601, 571, 89, 575, 255, 575,
5883 252, 52, 53, 54, 55, 107, 84, 30, 601, 81,
5884 104, 58, 27, 107, 477, 108, 109, 110, 599, 615,
5885 111, 602, 54, 693, 694, 21, 54, 55, 63, 64,
5886 65, 855, 15, 16, 67, 113, 512, 296, 1105, 56,
5887 605, 300, 52, 774, 630, 525, 911, 25, 1196, 13,
5888 913, 469, 515, 825, 112, 29, 27, 727, 1034, 477,
5889 1317, 66, 1210, 473, 111, 1220, 1221, 26, 112, 399,
5890 25, 401, 285, 58, 1000, 154, 155, 25, 766, 66,
5891 112, 344, 34, 10, 112, 101, 349, 25, 84, 589,
5892 103, 104, 69, 78, 107, 595, 1335, 100, 949, 0,
5893 52, 682, 52, 25, 66, 26, 56, 247, 15, 13,
5894 13, 81, 98, 1033, 1034, 134, 723, 527, 25, 25,
5895 0, 98, 134, 108, 109, 455, 451, 100, 234, 112,
5896 25, 134, 612, 230, 121, 122, 13, 277, 157, 155,
5897 1066, 68, 472, 155, 474, 1402, 287, 100, 34, 123,
5898 363, 320, 321, 1220, 1221, 480, 141, 119, 483, 121,
5899 122, 134, 25, 488, 101, 1246, 52, 153, 287, 13,
5900 310, 157, 502, 1254, 161, 1256, 1415, 155, 831, 230,
5901 505, 134, 1158, 154, 157, 287, 839, 13, 285, 160,
5902 154, 155, 151, 305, 245, 1350, 160, 255, 528, 257,
5903 155, 252, 274, 13, 255, 977, 1354, 155, 1059, 1007,
5904 1, 255, 305, 257, 66, 266, 151, 155, 155, 1084,
5905 1083, 295, 296, 255, 1011, 257, 300, 266, 302, 257,
5906 151, 679, 484, 155, 285, 307, 157, 713, 1158, 336,
5907 120, 264, 13, 337, 338, 339, 340, 260, 261, 155,
5908 154, 154, 715, 1104, 157, 1106, 160, 160, 583, 669,
5909 155, 52, 53, 13, 829, 56, 363, 119, 854, 1000,
5910 680, 364, 413, 25, 257, 285, 272, 154, 418, 275,
5911 157, 951, 952, 160, 865, 336, 611, 957, 958, 100,
5912 1196, 1157, 155, 1213, 157, 713, 335, 715, 89, 304,
5913 1220, 1221, 1383, 273, 274, 565, 1212, 154, 66, 609,
5914 154, 413, 363, 410, 411, 409, 160, 108, 109, 110,
5915 111, 56, 929, 134, 337, 338, 339, 340, 154, 342,
5916 343, 425, 812, 1157, 160, 1066, 929, 101, 361, 917,
5917 670, 917, 400, 366, 154, 1033, 1034, 364, 161, 400,
5918 160, 681, 403, 363, 401, 706, 400, 657, 834, 410,
5919 411, 119, 687, 663, 664, 961, 13, 1218, 1219, 37,
5920 38, 1041, 541, 1171, 543, 28, 13, 428, 1033, 1034,
5921 100, 1168, 1166, 154, 100, 1166, 737, 1101, 1102, 160,
5922 154, 100, 999, 451, 66, 67, 409, 25, 52, 34,
5923 134, 982, 56, 155, 154, 157, 402, 451, 455, 615,
5924 160, 100, 425, 525, 134, 473, 834, 52, 134, 451,
5925 920, 921, 473, 451, 924, 134, 926, 474, 928, 473,
5926 1350, 482, 525, 484, 759, 458, 459, 494, 69, 230,
5927 1171, 469, 1348, 100, 467, 134, 1352, 494, 1354, 121,
5928 122, 703, 475, 476, 66, 502, 713, 154, 109, 455,
5929 25, 158, 938, 69, 37, 38, 97, 98, 451, 527,
5930 1158, 794, 495, 732, 797, 266, 527, 134, 1166, 494,
5931 503, 528, 155, 527, 512, 134, 154, 693, 694, 789,
5932 141, 97, 98, 793, 285, 755, 756, 25, 600, 66,
5933 612, 1215, 1216, 1158, 100, 768, 134, 154, 859, 121,
5934 122, 774, 124, 160, 305, 554, 1422, 154, 869, 612,
5935 112, 727, 153, 160, 1322, 1213, 154, 155, 1000, 157,
5936 158, 975, 1220, 1221, 997, 1401, 946, 100, 134, 1326,
5937 598, 100, 1340, 601, 335, 336, 871, 153, 599, 1333,
5938 155, 602, 119, 853, 121, 122, 856, 631, 25, 155,
5939 662, 100, 659, 69, 661, 890, 157, 892, 646, 134,
5940 870, 134, 363, 364, 648, 744, 654, 610, 610, 997,
5941 749, 56, 615, 615, 909, 1085, 1086, 1087, 1088, 154,
5942 155, 97, 98, 158, 1066, 134, 154, 134, 649, 69,
5943 1033, 1034, 160, 654, 154, 155, 134, 1188, 659, 1053,
5944 661, 669, 403, 1411, 692, 945, 155, 947, 669, 410,
5945 411, 733, 680, 670, 101, 669, 154, 155, 98, 680,
5946 158, 682, 706, 656, 681, 100, 680, 155, 695, 891,
5947 733, 692, 1000, 742, 152, 1333, 154, 153, 695, 26,
5948 646, 911, 703, 913, 69, 1103, 78, 69, 732, 100,
5949 693, 694, 1350, 737, 100, 100, 69, 134, 968, 134,
5950 683, 971, 1105, 696, 154, 726, 154, 157, 978, 1030,
5951 695, 159, 822, 98, 984, 713, 98, 154, 155, 1122,
5952 155, 158, 69, 134, 727, 98, 1168, 155, 134, 1171,
5953 812, 1173, 69, 1147, 83, 84, 719, 26, 1066, 744,
5954 784, 746, 26, 69, 749, 750, 78, 508, 69, 812,
5955 97, 98, 144, 145, 146, 1158, 768, 874, 344, 725,
5956 97, 98, 774, 349, 525, 603, 69, 1000, 1319, 607,
5957 157, 97, 98, 1000, 69, 951, 952, 98, 1011, 157,
5958 69, 957, 958, 1253, 1105, 69, 157, 100, 137, 138,
5959 1193, 863, 1062, 554, 97, 98, 158, 69, 862, 1217,
5960 864, 69, 97, 98, 151, 134, 153, 1210, 97, 98,
5961 157, 872, 152, 97, 98, 859, 153, 1220, 1221, 69,
5962 841, 134, 843, 1237, 845, 869, 98, 153, 69, 97,
5963 98, 157, 69, 1066, 827, 828, 834, 69, 599, 1066,
5964 159, 602, 835, 836, 865, 157, 1184, 69, 98, 893,
5965 1026, 612, 56, 1083, 1084, 872, 97, 98, 153, 69,
5966 97, 98, 151, 58, 153, 1041, 98, 151, 157, 153,
5967 891, 100, 155, 157, 1195, 97, 98, 1198, 69, 862,
5968 1322, 864, 1324, 78, 1326, 153, 1328, 97, 98, 899,
5969 161, 69, 885, 886, 69, 888, 889, 1218, 659, 966,
5970 661, 929, 78, 967, 69, 134, 97, 98, 69, 981,
5971 1348, 983, 153, 108, 1352, 66, 153, 112, 946, 97,
5972 98, 682, 97, 98, 1219, 946, 155, 1307, 14, 15,
5973 947, 153, 946, 98, 1001, 1168, 97, 98, 1171, 155,
5974 961, 1168, 54, 153, 1171, 966, 1173, 1210, 951, 952,
5975 943, 1184, 64, 65, 957, 958, 106, 1220, 1221, 961,
5976 134, 982, 153, 956, 15, 1407, 17, 134, 119, 1239,
5977 121, 122, 733, 124, 934, 153, 936, 1272, 153, 100,
5978 1001, 1302, 1303, 1304, 967, 134, 1030, 1282, 1000, 160,
5979 100, 1058, 153, 89, 90, 1333, 56, 1335, 25, 1011,
5980 993, 78, 1340, 138, 1299, 1300, 1301, 1345, 1308, 155,
5981 1020, 1021, 155, 134, 158, 1024, 1025, 134, 95, 96,
5982 40, 41, 152, 1026, 134, 1079, 1080, 1048, 52, 1050,
5983 54, 55, 1108, 57, 155, 66, 134, 1058, 1041, 155,
5984 1109, 154, 155, 1364, 158, 155, 1067, 155, 100, 1070,
5985 152, 812, 1073, 52, 1066, 66, 78, 13, 1079, 1080,
5986 155, 1105, 1106, 155, 141, 142, 143, 144, 145, 146,
5987 1091, 1092, 66, 1411, 155, 1413, 134, 1415, 102, 1417,
5988 306, 307, 134, 1146, 155, 155, 1153, 1154, 119, 66,
5989 121, 122, 1159, 1326, 155, 1322, 152, 1324, 1436, 1326,
5990 155, 1328, 1335, 155, 865, 17, 1376, 1340, 119, 762,
5991 121, 122, 25, 766, 155, 1225, 155, 1161, 1185, 1230,
5992 142, 143, 144, 145, 146, 119, 134, 121, 122, 1150,
5993 124, 152, 1153, 1154, 44, 78, 1157, 44, 1159, 55,
5994 155, 1230, 119, 1207, 121, 122, 40, 41, 42, 43,
5995 44, 1195, 95, 96, 1198, 155, 1168, 44, 1230, 1171,
5996 56, 44, 1229, 134, 1185, 8, 52, 1188, 54, 55,
5997 56, 57, 1184, 136, 1218, 159, 15, 1244, 52, 155,
5998 1407, 155, 1415, 155, 101, 155, 52, 155, 54, 55,
5999 56, 57, 58, 155, 1248, 1249, 1250, 1251, 1252, 142,
6000 143, 144, 145, 146, 1267, 966, 152, 155, 1229, 1202,
6001 155, 1232, 78, 1289, 155, 9, 102, 155, 155, 139,
6002 1264, 982, 155, 1244, 1207, 1246, 92, 1248, 1249, 1250,
6003 1251, 1252, 155, 1254, 155, 1256, 102, 693, 694, 1260,
6004 1001, 107, 108, 109, 155, 1266, 52, 1268, 139, 155,
6005 1314, 1315, 155, 709, 710, 155, 930, 931, 1302, 1303,
6006 1304, 52, 152, 1024, 1025, 939, 101, 56, 942, 158,
6007 944, 727, 1033, 1034, 155, 141, 1339, 155, 144, 1307,
6008 52, 160, 54, 55, 56, 57, 1307, 155, 1309, 56,
6009 1311, 1308, 155, 1307, 155, 155, 155, 1058, 1319, 155,
6010 54, 55, 1369, 57, 52, 155, 54, 55, 56, 57,
6011 64, 65, 228, 155, 1326, 231, 232, 233, 155, 155,
6012 1364, 152, 139, 1335, 1378, 1379, 1380, 1381, 1340, 1373,
6013 102, 1314, 1315, 155, 52, 107, 54, 55, 56, 57,
6014 1101, 1102, 155, 155, 1105, 155, 155, 1000, 1369, 157,
6015 155, 155, 1396, 59, 60, 61, 62, 1378, 1379, 1380,
6016 1381, 1122, 1383, 72, 157, 1386, 1387, 266, 1, 1390,
6017 1391, 335, 504, 1394, 1428, 1150, 872, 508, 78, 106,
6018 1401, 110, 15, 16, 108, 1146, 1, 610, 98, 1150,
6019 495, 692, 1153, 1154, 962, 95, 96, 1158, 1159, 755,
6020 15, 16, 1266, 1415, 1268, 1232, 911, 1428, 1429, 1430,
6021 1431, 1432, 981, 1066, 1265, 1184, 1333, 1092, 1439, 52,
6022 53, 1340, 1264, 56, 1185, 1402, 882, 1188, 359, 875,
6023 1401, 1286, 1193, 1209, 67, 1196, 1213, 52, 53, 139,
6024 140, 141, 142, 143, 144, 145, 146, 1213, 1309, 1210,
6025 119, 1212, 67, 1311, 1215, 1216, 89, 111, 543, 1220,
6026 1221, 349, 1066, 115, -1, 1396, -1, -1, 1229, -1,
6027 103, 104, -1, -1, 107, 108, 109, 110, -1, 112,
6028 -1, -1, -1, 1244, -1, -1, -1, -1, 103, 104,
6029 -1, -1, 107, -1, -1, 951, 952, 112, -1, -1,
6030 -1, 957, 958, -1, -1, -1, 1267, -1, -1, 1162,
6031 -1, -1, -1, 1166, -1, 1168, -1, -1, 1171, -1,
6032 1173, -1, 1386, 1387, -1, 1286, 1390, 1391, -1, -1,
6033 1394, 1184, -1, -1, -1, 991, 992, -1, 994, 995,
6034 -1, -1, -1, -1, -1, 52, -1, 54, 55, 56,
6035 57, 58, 468, 469, -1, -1, -1, 768, 1319, -1,
6036 -1, 477, -1, -1, -1, 1429, 1430, 1431, 1432, 780,
6037 -1, 78, -1, -1, -1, 1439, -1, -1, 1339, -1,
6038 -1, -1, -1, -1, -1, 1041, -1, 1348, -1, -1,
6039 -1, 1352, -1, 1354, -1, 102, 512, 230, 1000, 515,
6040 107, 108, 109, -1, -1, -1, -1, -1, 1369, 1065,
6041 -1, -1, -1, -1, -1, 230, -1, -1, -1, -1,
6042 -1, -1, 255, -1, 257, -1, -1, 260, 261, -1,
6043 -1, -1, -1, 266, 141, -1, -1, 144, -1, -1,
6044 255, -1, 257, -1, -1, 260, 261, -1, -1, -1,
6045 -1, 266, 285, -1, -1, -1, -1, -1, -1, -1,
6046 -1, 1422, -1, -1, 1066, -1, -1, -1, -1, 1322,
6047 285, 1324, 305, 1326, 590, 1328, -1, -1, -1, -1,
6048 1333, -1, 1335, -1, -1, -1, -1, 1340, -1, -1,
6049 -1, -1, 1345, -1, 610, -1, -1, -1, -1, 615,
6050 -1, -1, 335, 336, 337, 338, 339, 340, -1, 342,
6051 343, -1, -1, -1, -1, -1, -1, -1, 1033, 1034,
6052 335, 336, 337, 338, 339, 340, -1, 342, 343, -1,
6053 363, 364, -1, -1, -1, -1, -1, -1, -1, -1,
6054 -1, -1, -1, -1, -1, -1, -1, -1, 363, -1,
6055 -1, -1, -1, -1, 1407, -1, -1, -1, 1411, -1,
6056 1413, -1, 1415, -1, 1417, -1, 1168, 400, -1, 1171,
6057 403, 1173, -1, -1, -1, -1, 409, 410, 411, -1,
6058 -1, 697, 1184, 1436, -1, 400, 1101, 1102, 403, 1000,
6059 1105, -1, 425, -1, 409, 410, 411, 713, 1009, 715,
6060 1011, -1, 1013, -1, -1, -1, -1, 1122, -1, 52,
6061 425, 54, 55, 56, 57, 58, -1, -1, 451, -1,
6062 -1, -1, -1, -1, -1, -1, -1, 52, -1, 54,
6063 55, 56, 57, 58, -1, 78, 451, -1, -1, -1,
6064 473, -1, -1, 1158, -1, -1, -1, -1, -1, 92,
6065 -1, -1, -1, 78, -1, 1066, -1, 773, 473, 102,
6066 -1, -1, -1, -1, -1, 108, 109, 92, -1, -1,
6067 -1, -1, -1, -1, -1, 508, -1, 102, 1193, -1,
6068 -1, 1196, 107, 108, 109, 52, 802, 54, 55, 56,
6069 57, 58, 525, 508, 527, 1210, -1, 1212, 141, -1,
6070 1215, 1216, -1, -1, -1, 1220, 1221, -1, -1, -1,
6071 -1, 78, 527, -1, -1, -1, 141, -1, 834, 144,
6072 1322, 554, 1324, -1, 1326, -1, 1328, -1, -1, -1,
6073 -1, -1, 157, 1335, -1, 102, 852, -1, 1340, 554,
6074 -1, 108, 109, 1345, -1, -1, -1, -1, -1, -1,
6075 -1, -1, -1, -1, -1, -1, -1, 1168, -1, -1,
6076 -1, -1, 1173, -1, -1, 598, 599, -1, 601, 602,
6077 1181, 1286, -1, 1184, 141, -1, -1, 610, -1, 612,
6078 -1, -1, 615, 598, 599, -1, 601, 602, -1, -1,
6079 -1, -1, -1, -1, -1, 610, -1, -1, -1, -1,
6080 615, 1033, 1034, -1, -1, 1407, -1, -1, -1, 1411,
6081 -1, 1413, -1, 1415, -1, 1417, -1, -1, -1, -1,
6082 -1, -1, 938, -1, -1, -1, 659, -1, 661, -1,
6083 -1, -1, -1, 1348, 1436, -1, 669, 1352, -1, 1354,
6084 -1, -1, -1, -1, 659, 961, 661, 680, -1, 682,
6085 683, -1, -1, -1, 669, -1, -1, 973, -1, -1,
6086 693, 694, -1, -1, -1, 680, -1, 682, 683, 1101,
6087 1102, -1, -1, 1105, -1, -1, -1, -1, 693, 694,
6088 -1, 997, 1033, 1034, -1, -1, 719, -1, -1, -1,
6089 1122, -1, -1, -1, 727, -1, -1, 1033, 1034, -1,
6090 733, -1, -1, -1, 719, -1, 1022, 1422, -1, -1,
6091 -1, -1, 727, 1324, -1, 1326, -1, 1328, -1, -1,
6092 -1, -1, -1, -1, 1335, -1, 1158, -1, -1, -1,
6093 -1, -1, -1, -1, 1345, -1, -1, -1, -1, -1,
6094 -1, 1057, -1, -1, -1, -1, -1, -1, -1, -1,
6095 1101, 1102, -1, -1, 1105, -1, -1, -1, -1, -1,
6096 -1, 1193, -1, -1, 1196, 1101, 1102, -1, -1, 1105,
6097 -1, 1122, -1, -1, -1, -1, -1, -1, 1210, 812,
6098 1212, -1, -1, 1215, 1216, -1, 1122, -1, 1220, 1221,
6099 -1, -1, -1, -1, -1, -1, 1407, -1, -1, -1,
6100 -1, -1, 1413, -1, 1415, -1, 1417, 1158, -1, -1,
6101 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6102 -1, -1, 1158, -1, -1, 1436, -1, -1, -1, 862,
6103 -1, 864, 865, -1, -1, -1, -1, -1, -1, 1155,
6104 -1, -1, 1193, -1, -1, 1196, -1, 862, -1, 864,
6105 865, -1, -1, -1, 1286, -1, -1, 1193, -1, 1210,
6106 1196, 1212, -1, -1, 1215, 1216, -1, -1, -1, 1220,
6107 1221, -1, -1, -1, 1210, -1, 1212, -1, -1, 1215,
6108 1216, -1, -1, -1, 1220, 1221, -1, -1, -1, -1,
6109 -1, -1, -1, -1, -1, -1, 929, -1, -1, -1,
6110 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6111 -1, -1, -1, 946, 929, -1, 1348, -1, 951, 952,
6112 1352, -1, 1354, -1, 957, 958, -1, -1, -1, -1,
6113 -1, 946, -1, 966, 967, 1286, 951, 952, -1, -1,
6114 -1, -1, 957, 958, -1, 1033, 1034, -1, -1, 982,
6115 1286, 966, 967, -1, -1, -1, -1, -1, -1, -1,
6116 -1, -1, -1, -1, -1, -1, -1, 982, 1001, -1,
6117 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6118 -1, 1, -1, -1, -1, -1, 1001, -1, -1, -1,
6119 1422, 1024, 1025, 1026, -1, 15, 16, 1348, -1, -1,
6120 -1, 1352, -1, 1354, -1, -1, -1, -1, 1041, 1024,
6121 1025, 1026, 1348, 1101, 1102, -1, 1352, 1105, 1354, -1,
6122 -1, -1, -1, -1, -1, 1058, 1041, -1, -1, -1,
6123 -1, -1, 52, 53, 1122, -1, -1, -1, -1, -1,
6124 -1, -1, -1, 1058, -1, -1, -1, 67, -1, -1,
6125 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6126 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6127 1158, 1422, -1, -1, -1, -1, -1, -1, -1, -1,
6128 -1, -1, -1, 103, 104, -1, 1422, 107, -1, -1,
6129 -1, -1, 112, -1, -1, -1, 1033, 1034, -1, -1,
6130 -1, -1, -1, -1, -1, 1193, -1, -1, 1196, -1,
6131 -1, -1, -1, 1146, -1, -1, -1, 1150, -1, -1,
6132 1153, 1154, 1210, -1, 1212, -1, 1159, 1215, 1216, -1,
6133 -1, -1, 1220, 1221, -1, 1150, -1, -1, 1153, 1154,
6134 -1, -1, -1, -1, 1159, -1, -1, -1, -1, -1,
6135 -1, -1, 1185, -1, -1, 1188, -1, -1, -1, -1,
6136 -1, -1, -1, -1, 1101, 1102, -1, -1, 1105, -1,
6137 1185, -1, -1, 1188, 1207, -1, -1, -1, -1, -1,
6138 -1, -1, -1, -1, -1, 1122, -1, -1, -1, -1,
6139 -1, -1, 1207, -1, -1, -1, 1229, -1, 1286, -1,
6140 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6141 230, 1244, -1, -1, 1229, -1, -1, -1, -1, -1,
6142 -1, 1158, -1, -1, -1, -1, -1, -1, -1, 1244,
6143 -1, -1, -1, -1, 1267, 255, -1, 257, -1, -1,
6144 260, 261, -1, -1, -1, -1, 266, -1, -1, -1,
6145 -1, -1, -1, -1, -1, -1, 1193, -1, -1, 1196,
6146 1348, -1, -1, -1, 1352, 285, 1354, -1, -1, -1,
6147 -1, -1, -1, 1210, 1307, 1212, -1, -1, 1215, 1216,
6148 -1, 1314, 1315, 1220, 1221, -1, 1319, -1, 1033, 1034,
6149 -1, -1, 1307, 1, -1, 1033, 1034, -1, -1, 1314,
6150 1315, -1, -1, -1, 1319, -1, 1339, 15, 16, -1,
6151 -1, -1, -1, -1, -1, 335, 336, 337, 338, 339,
6152 340, -1, 342, 343, -1, -1, -1, -1, -1, -1,
6153 -1, -1, -1, -1, 1422, -1, 1369, -1, 1033, 1034,
6154 -1, -1, -1, 363, 52, 53, -1, -1, -1, 1286,
6155 -1, -1, -1, -1, 1369, -1, 1101, 1102, -1, 67,
6156 1105, -1, -1, 1101, 1102, -1, -1, 1105, -1, -1,
6157 -1, -1, -1, -1, -1, -1, -1, 1122, -1, -1,
6158 400, -1, -1, 403, 1122, -1, -1, -1, -1, 409,
6159 410, 411, -1, -1, -1, 103, 104, -1, -1, 107,
6160 -1, -1, -1, -1, 112, 425, 1101, 1102, -1, -1,
6161 1105, 1348, -1, 1158, -1, 1352, -1, 1354, -1, -1,
6162 1158, -1, -1, -1, -1, -1, -1, 1122, -1, -1,
6163 -1, 451, -1, -1, -1, -1, -1, -1, -1, -1,
6164 -1, -1, -1, -1, -1, -1, -1, -1, 1193, -1,
6165 -1, 1196, -1, 473, -1, 1193, -1, -1, 1196, -1,
6166 -1, -1, -1, 1158, -1, 1210, -1, 1212, -1, -1,
6167 1215, 1216, 1210, -1, 1212, 1220, 1221, 1215, 1216, -1,
6168 -1, -1, 1220, 1221, -1, 1422, -1, -1, 508, -1,
6169 -1, -1, -1, -1, -1, -1, -1, -1, 1193, -1,
6170 -1, 1196, -1, -1, -1, -1, -1, 527, -1, -1,
6171 -1, -1, -1, -1, -1, 1210, -1, 1212, -1, -1,
6172 1215, 1216, 230, -1, -1, 1220, 1221, -1, -1, -1,
6173 -1, -1, -1, -1, 554, -1, -1, -1, -1, -1,
6174 -1, 1286, -1, -1, -1, -1, -1, 255, 1286, 257,
6175 -1, -1, 260, 261, -1, -1, -1, -1, 266, -1,
6176 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6177 -1, -1, -1, -1, -1, -1, -1, 285, 598, 599,
6178 -1, 601, 602, -1, -1, -1, -1, -1, -1, -1,
6179 610, 1286, -1, -1, -1, 615, -1, -1, -1, -1,
6180 -1, -1, -1, 1348, -1, -1, -1, 1352, -1, 1354,
6181 1348, -1, -1, -1, 1352, -1, 1354, -1, -1, -1,
6182 -1, -1, -1, -1, -1, -1, -1, 335, 336, 337,
6183 338, 339, 340, -1, 342, 343, -1, -1, -1, 659,
6184 -1, 661, -1, -1, -1, -1, -1, -1, -1, 669,
6185 -1, -1, -1, 1348, -1, 363, -1, 1352, -1, 1354,
6186 680, -1, 682, 683, -1, -1, -1, -1, -1, -1,
6187 -1, -1, -1, 693, 694, -1, -1, 1422, -1, -1,
6188 -1, -1, -1, -1, 1422, -1, -1, -1, -1, -1,
6189 -1, -1, 400, -1, -1, 403, -1, -1, -1, 719,
6190 -1, 409, 410, 411, -1, -1, -1, 727, -1, -1,
6191 -1, -1, -1, -1, -1, -1, -1, 425, -1, -1,
6192 -1, -1, -1, -1, -1, -1, -1, 1422, -1, -1,
6193 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6194 -1, -1, -1, 451, -1, -1, -1, -1, -1, -1,
6195 -1, -1, -1, -1, 0, -1, -1, -1, -1, -1,
6196 1, -1, 8, 9, 10, 473, -1, 13, 14, 15,
6197 -1, 17, -1, -1, 15, 16, -1, -1, -1, 25,
6198 26, 27, -1, -1, -1, -1, -1, -1, -1, -1,
6199 -1, 37, 38, -1, 40, 41, 42, 43, 44, -1,
6200 508, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6201 -1, 52, 53, -1, -1, 56, -1, -1, -1, 527,
6202 -1, -1, 68, 69, -1, -1, -1, -1, -1, -1,
6203 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6204 -1, -1, 862, -1, 864, 865, 554, -1, 89, -1,
6205 -1, 97, 98, -1, -1, -1, -1, -1, -1, -1,
6206 -1, -1, -1, -1, -1, -1, -1, 108, 109, 110,
6207 -1, 112, -1, -1, 120, -1, -1, -1, -1, -1,
6208 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6209 598, 599, -1, 601, 602, -1, -1, -1, -1, -1,
6210 -1, -1, 610, -1, -1, 151, 152, 615, 154, 929,
6211 -1, 157, 158, -1, 160, -1, -1, -1, -1, -1,
6212 -1, -1, -1, -1, -1, -1, 946, -1, -1, -1,
6213 -1, 951, 952, -1, -1, -1, -1, 957, 958, -1,
6214 -1, -1, 1, -1, -1, -1, 966, 967, -1, -1,
6215 -1, 659, -1, 661, -1, -1, 15, 16, -1, -1,
6216 -1, 669, 982, -1, -1, -1, -1, -1, -1, -1,
6217 -1, -1, 680, -1, 682, 683, -1, -1, -1, -1,
6218 -1, 1001, -1, -1, -1, 693, 694, -1, -1, 230,
6219 -1, -1, -1, 52, 53, -1, -1, 56, -1, -1,
6220 -1, -1, -1, -1, 1024, 1025, 1026, -1, -1, -1,
6221 -1, 719, -1, -1, 255, -1, 257, -1, -1, 727,
6222 -1, 1041, -1, -1, -1, 266, -1, -1, 25, -1,
6223 89, -1, -1, -1, -1, -1, -1, -1, 1058, -1,
6224 -1, -1, -1, -1, 285, -1, -1, -1, -1, 108,
6225 109, 110, -1, 112, -1, -1, -1, -1, -1, -1,
6226 -1, -1, -1, -1, 305, -1, -1, -1, -1, -1,
6227 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6228 -1, 78, 79, 80, 81, 82, 83, 84, 85, 86,
6229 87, 88, 89, 90, 335, 336, -1, -1, 95, 96,
6230 -1, -1, -1, -1, 101, -1, -1, -1, -1, -1,
6231 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6232 -1, -1, 363, 364, -1, -1, -1, -1, -1, -1,
6233 1150, -1, -1, 1153, 1154, -1, -1, -1, 135, 1159,
6234 137, 138, 139, 140, 141, 142, 143, 144, 145, 146,
6235 -1, -1, -1, -1, 862, -1, 864, 865, -1, 400,
6236 -1, -1, 403, -1, -1, 1185, -1, -1, 1188, 410,
6237 411, 230, -1, -1, -1, -1, -1, -1, -1, -1,
6238 -1, -1, -1, -1, -1, -1, -1, 1207, -1, -1,
6239 -1, -1, -1, -1, -1, -1, 255, -1, 257, -1,
6240 -1, -1, -1, -1, -1, -1, -1, 266, -1, 1229,
6241 451, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6242 -1, 929, -1, -1, 1244, -1, 285, -1, -1, -1,
6243 -1, -1, 473, -1, -1, -1, -1, -1, 946, -1,
6244 -1, -1, -1, 951, 952, -1, 305, -1, -1, 957,
6245 958, -1, -1, -1, -1, -1, -1, -1, 966, 967,
6246 -1, -1, -1, -1, -1, -1, -1, 508, -1, -1,
6247 -1, -1, -1, -1, 982, -1, 335, 336, -1, -1,
6248 -1, -1, -1, -1, 525, -1, 527, 1307, -1, -1,
6249 -1, -1, -1, 1001, 1314, 1315, -1, -1, -1, 1319,
6250 -1, -1, -1, -1, 363, 364, -1, -1, -1, -1,
6251 -1, -1, -1, 554, -1, -1, 1024, 1025, 1026, -1,
6252 -1, -1, 78, 79, 80, 81, 82, 83, 84, 85,
6253 -1, 87, 88, 1041, -1, -1, -1, -1, -1, 95,
6254 96, 400, -1, -1, 403, -1, -1, -1, -1, 1369,
6255 1058, 410, 411, -1, -1, -1, -1, -1, 599, -1,
6256 -1, 602, -1, -1, -1, -1, -1, -1, -1, -1,
6257 -1, 612, -1, -1, 615, -1, -1, 33, 34, 35,
6258 36, 137, 138, 139, 140, 141, 142, 143, 144, 145,
6259 146, -1, 451, 49, 50, 51, -1, -1, -1, -1,
6260 -1, -1, -1, 59, 60, 61, 62, 63, -1, -1,
6261 -1, -1, -1, -1, 473, -1, -1, -1, 659, -1,
6262 661, -1, -1, -1, 1, -1, -1, -1, 669, -1,
6263 -1, -1, -1, -1, -1, -1, -1, -1, -1, 680,
6264 -1, 682, 1150, -1, -1, 1153, 1154, -1, -1, 508,
6265 -1, 1159, 693, 694, 110, 111, 112, 113, 114, 115,
6266 116, 117, 118, -1, -1, -1, 525, -1, 527, -1,
6267 -1, -1, -1, -1, -1, 52, 53, 1185, -1, 56,
6268 1188, -1, -1, -1, -1, -1, 727, -1, -1, -1,
6269 -1, 147, 733, -1, -1, 554, -1, -1, -1, 1207,
6270 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6271 -1, -1, 89, -1, -1, -1, -1, -1, -1, -1,
6272 -1, 1229, -1, -1, -1, -1, -1, -1, -1, -1,
6273 -1, 108, 109, 110, -1, -1, 1244, -1, -1, -1,
6274 599, -1, -1, 602, -1, 44, -1, -1, -1, -1,
6275 -1, -1, -1, 612, -1, -1, 615, -1, -1, -1,
6276 -1, -1, 1, -1, -1, -1, -1, -1, -1, -1,
6277 -1, 812, -1, -1, -1, -1, -1, -1, -1, 78,
6278 79, 80, 81, 82, 83, 84, 85, 86, 87, 88,
6279 89, 90, -1, -1, -1, -1, 95, 96, -1, 1307,
6280 659, -1, 661, -1, -1, -1, 1314, 1315, -1, -1,
6281 669, 1319, -1, 52, 53, -1, -1, 56, -1, -1,
6282 -1, 680, -1, 682, 865, -1, -1, -1, -1, -1,
6283 -1, -1, -1, -1, 693, 694, 135, -1, 137, 138,
6284 139, 140, 141, 142, 143, 144, 145, 146, -1, -1,
6285 89, -1, -1, 230, -1, -1, 155, -1, -1, -1,
6286 -1, 1369, -1, -1, -1, -1, -1, -1, 727, 108,
6287 109, 110, 111, -1, 733, -1, -1, -1, -1, -1,
6288 -1, -1, -1, -1, -1, -1, -1, -1, -1, 266,
6289 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6290 -1, -1, -1, -1, -1, 946, -1, -1, 285, -1,
6291 951, 952, -1, -1, -1, -1, 957, 958, -1, -1,
6292 -1, -1, -1, -1, -1, 966, -1, -1, 305, -1,
6293 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6294 -1, 982, -1, -1, -1, -1, -1, -1, -1, -1,
6295 -1, -1, -1, 812, -1, -1, -1, -1, 335, 336,
6296 1001, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6297 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6298 -1, -1, -1, 1024, 1025, 1026, 363, 364, -1, -1,
6299 -1, 230, 78, 79, 80, 81, 82, 83, 84, -1,
6300 1041, 87, 88, -1, -1, -1, 865, -1, -1, 95,
6301 96, -1, -1, -1, -1, -1, -1, 1058, -1, -1,
6302 -1, -1, -1, -1, -1, -1, 403, 266, -1, -1,
6303 -1, -1, -1, 410, 411, -1, -1, -1, -1, 44,
6304 -1, -1, -1, -1, -1, -1, 285, -1, -1, -1,
6305 -1, 137, 138, 139, 140, 141, 142, 143, 144, 145,
6306 146, -1, -1, -1, -1, -1, 305, -1, -1, -1,
6307 -1, -1, -1, 78, 79, 80, 81, 82, 83, 84,
6308 85, 86, 87, 88, 89, 90, -1, 946, -1, -1,
6309 95, 96, 951, 952, -1, -1, 335, 336, 957, 958,
6310 -1, -1, -1, 1, -1, 1146, -1, 966, -1, 1150,
6311 -1, -1, 1153, 1154, -1, -1, -1, -1, 1159, -1,
6312 -1, -1, -1, 982, 363, 364, -1, -1, -1, -1,
6313 135, 508, 137, 138, 139, 140, 141, 142, 143, 144,
6314 145, 146, 1001, -1, 1185, -1, -1, 1188, 525, -1,
6315 -1, -1, -1, -1, 52, 53, -1, -1, -1, -1,
6316 -1, -1, -1, -1, 403, 1024, 1025, 1026, -1, -1,
6317 -1, 410, 411, -1, -1, -1, -1, 554, 33, 34,
6318 35, 36, 1041, -1, -1, -1, -1, -1, 1229, -1,
6319 -1, -1, -1, -1, 49, 50, 51, 52, -1, 1058,
6320 -1, 56, 1, 1244, 59, 60, 61, 62, 63, -1,
6321 108, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6322 -1, -1, 599, -1, -1, 602, 1267, -1, -1, -1,
6323 -1, -1, -1, -1, -1, 612, 91, 92, 615, -1,
6324 -1, -1, -1, -1, 99, -1, -1, 102, -1, 104,
6325 105, -1, 107, 52, 53, 110, 111, 112, 113, 114,
6326 115, 116, 117, 118, -1, -1, 1307, -1, -1, 508,
6327 -1, -1, -1, -1, -1, -1, -1, -1, 1319, -1,
6328 -1, -1, 659, -1, 661, 140, 525, 1146, -1, -1,
6329 -1, 1150, 147, -1, 1153, 1154, -1, -1, 1339, 154,
6330 1159, -1, -1, -1, -1, 682, -1, -1, -1, -1,
6331 -1, -1, -1, -1, -1, 554, 693, 694, -1, -1,
6332 -1, -1, -1, -1, -1, -1, 1185, -1, 1369, 1188,
6333 -1, -1, 230, -1, 78, 79, 80, 81, 82, 83,
6334 84, 85, 86, 87, 88, 89, 90, -1, -1, -1,
6335 727, 95, 96, -1, -1, -1, 733, -1, -1, -1,
6336 599, -1, -1, 602, -1, 742, -1, -1, 266, -1,
6337 1229, -1, -1, 612, -1, -1, -1, -1, -1, -1,
6338 -1, -1, -1, -1, -1, 1244, -1, 285, -1, -1,
6339 -1, 135, -1, 137, 138, 139, 140, 141, 142, 143,
6340 144, 145, 146, -1, -1, -1, -1, -1, 1267, -1,
6341 154, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6342 659, -1, 661, -1, -1, -1, -1, -1, -1, -1,
6343 -1, 230, -1, -1, -1, 812, -1, 335, 336, -1,
6344 -1, -1, -1, 682, -1, -1, -1, -1, 1307, -1,
6345 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6346 1319, -1, -1, -1, -1, 363, -1, 266, -1, -1,
6347 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6348 1339, -1, -1, -1, -1, -1, 285, -1, 865, -1,
6349 -1, -1, -1, -1, 733, -1, -1, -1, -1, -1,
6350 -1, -1, -1, -1, -1, 403, -1, -1, -1, -1,
6351 1369, -1, 410, 411, -1, -1, -1, -1, -1, -1,
6352 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6353 -1, -1, -1, -1, -1, -1, 335, 336, -1, -1,
6354 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6355 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6356 -1, -1, -1, -1, 363, -1, -1, -1, -1, -1,
6357 -1, -1, -1, 812, 951, 952, -1, -1, -1, -1,
6358 957, 958, -1, -1, -1, -1, -1, -1, -1, 966,
6359 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6360 -1, -1, -1, -1, 403, 982, -1, -1, -1, -1,
6361 508, 410, 411, -1, 33, 34, 35, 36, -1, -1,
6362 -1, -1, -1, -1, 1001, -1, 865, -1, -1, -1,
6363 49, 50, 51, 52, -1, -1, -1, 56, -1, 58,
6364 59, 60, 61, 62, 63, -1, -1, 1024, 1025, 1026,
6365 -1, -1, -1, -1, -1, -1, 554, -1, -1, 78,
6366 -1, -1, -1, -1, 1041, -1, -1, -1, -1, -1,
6367 -1, -1, 91, 92, -1, -1, -1, -1, -1, -1,
6368 99, 1058, -1, 102, -1, 104, 105, -1, 107, 108,
6369 -1, 110, 111, 112, 113, 114, 115, 116, 117, 118,
6370 -1, 599, -1, -1, 602, -1, -1, -1, -1, 508,
6371 -1, -1, -1, -1, -1, -1, -1, 615, -1, -1,
6372 -1, 140, -1, -1, -1, -1, -1, 966, 147, -1,
6373 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6374 -1, -1, -1, 982, -1, -1, -1, -1, -1, -1,
6375 -1, -1, -1, -1, -1, 554, -1, -1, -1, -1,
6376 -1, 659, 1001, 661, -1, -1, -1, -1, -1, 1146,
6377 -1, -1, -1, 1150, -1, -1, 1153, 1154, -1, -1,
6378 -1, -1, 1159, -1, 682, 1024, 1025, -1, -1, -1,
6379 -1, -1, -1, -1, -1, 693, 694, -1, -1, -1,
6380 599, -1, -1, 602, -1, -1, -1, -1, 1185, -1,
6381 -1, 1188, -1, -1, -1, -1, 615, -1, -1, 1058,
6382 33, 34, 35, 36, -1, -1, -1, -1, -1, 727,
6383 -1, -1, -1, -1, -1, -1, 49, 50, 51, 52,
6384 -1, -1, -1, 56, -1, -1, 59, 60, 61, 62,
6385 63, -1, 1229, -1, -1, -1, -1, -1, -1, -1,
6386 659, -1, 661, -1, -1, -1, -1, 1244, -1, -1,
6387 -1, -1, -1, -1, -1, -1, -1, -1, 91, 92,
6388 -1, -1, -1, 682, -1, -1, 99, -1, -1, 102,
6389 1267, 104, 105, -1, 693, 694, -1, 110, 111, 112,
6390 113, 114, 115, 116, 117, 118, -1, 1146, -1, -1,
6391 -1, 1150, -1, -1, 1153, 1154, -1, -1, -1, -1,
6392 1159, -1, -1, -1, -1, -1, -1, 140, 727, -1,
6393 -1, -1, -1, -1, 147, 78, 79, 80, 81, 82,
6394 83, 84, 1319, -1, 87, 88, 1185, -1, -1, 1188,
6395 -1, -1, 95, 96, -1, 33, 34, 35, 36, -1,
6396 -1, -1, 1339, -1, -1, -1, -1, 865, -1, -1,
6397 -1, 49, 50, 51, 52, -1, -1, -1, 56, -1,
6398 -1, 59, 60, 61, 62, 63, -1, -1, -1, -1,
6399 1229, -1, 1369, -1, 137, 138, 139, 140, 141, 142,
6400 143, 144, 145, 146, -1, 1244, -1, -1, -1, -1,
6401 -1, -1, -1, 91, 92, -1, -1, -1, -1, -1,
6402 -1, 99, -1, -1, 102, -1, 104, 105, 1267, 107,
6403 -1, -1, 110, 111, 112, 113, 114, 115, 116, 117,
6404 118, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6405 -1, -1, -1, 951, 952, -1, -1, -1, -1, 957,
6406 958, -1, 140, -1, -1, -1, 865, -1, 966, 147,
6407 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6408 1319, -1, -1, -1, 982, -1, -1, -1, -1, -1,
6409 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6410 1339, -1, -1, 1001, -1, -1, -1, -1, -1, -1,
6411 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6412 -1, -1, 15, 16, -1, -1, 1024, 1025, 1026, -1,
6413 1369, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6414 -1, -1, -1, 1041, -1, -1, -1, -1, -1, -1,
6415 -1, -1, 951, 952, 47, 48, 49, 50, 957, 958,
6416 1058, 54, 55, -1, -1, -1, -1, 966, -1, -1,
6417 -1, -1, -1, -1, 67, 68, -1, -1, -1, -1,
6418 52, 53, -1, 982, 56, -1, -1, -1, -1, -1,
6419 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6420 -1, -1, 1001, -1, 76, 77, 78, 79, 80, 81,
6421 82, 83, 84, -1, -1, 87, 88, -1, -1, 112,
6422 -1, 93, 94, 95, 96, 1024, 1025, 1026, -1, -1,
6423 -1, -1, -1, -1, -1, 107, 108, -1, -1, -1,
6424 -1, -1, 1041, -1, -1, -1, -1, -1, 1146, -1,
6425 -1, -1, 1150, -1, -1, 1153, 1154, -1, -1, 1058,
6426 -1, 1159, -1, -1, -1, 137, 138, 139, 140, 141,
6427 142, 143, 144, 145, 146, -1, 148, 149, -1, -1,
6428 -1, -1, -1, -1, 156, 157, -1, 1185, -1, -1,
6429 1188, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6430 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6431 -1, -1, -1, -1, -1, -1, 78, 79, 80, 81,
6432 82, 83, 84, 85, 86, 87, 88, 89, 90, -1,
6433 -1, 1229, -1, 95, 96, 228, -1, -1, 231, 232,
6434 233, -1, 235, -1, -1, -1, 1244, -1, -1, -1,
6435 -1, 1150, -1, -1, 1153, 1154, -1, -1, -1, -1,
6436 1159, -1, 255, -1, 257, -1, -1, -1, 52, 53,
6437 -1, -1, 56, 135, -1, 137, 138, 139, 140, 141,
6438 142, 143, 144, 145, 146, -1, 1185, -1, -1, 1188,
6439 -1, -1, 76, 77, 78, 79, 80, 81, 82, 83,
6440 84, -1, -1, 87, 88, -1, -1, -1, -1, 93,
6441 94, 95, 96, -1, -1, -1, -1, -1, -1, -1,
6442 -1, 1319, -1, 107, 108, -1, -1, -1, -1, -1,
6443 1229, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6444 -1, -1, -1, -1, -1, 1244, -1, -1, -1, -1,
6445 -1, -1, -1, 137, 138, 139, 140, 141, 142, 143,
6446 144, 145, 146, -1, 148, 149, -1, -1, -1, -1,
6447 -1, 1369, 156, -1, -1, 368, 369, 370, 371, 372,
6448 -1, -1, 375, 376, 377, 378, 379, 380, 381, 382,
6449 -1, 384, -1, -1, 387, 388, 389, 390, 391, 392,
6450 393, 394, 395, 396, 52, 53, -1, 400, 56, -1,
6451 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6452 1319, -1, -1, -1, -1, -1, -1, -1, 76, 77,
6453 78, 79, 80, 81, 82, 83, 84, -1, -1, 87,
6454 88, -1, -1, -1, -1, 93, 94, 95, 96, -1,
6455 -1, -1, -1, -1, -1, -1, -1, -1, 451, 107,
6456 108, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6457 1369, -1, -1, -1, -1, 468, 469, -1, -1, -1,
6458 473, -1, -1, -1, 477, -1, 479, -1, -1, 137,
6459 138, 139, 140, 141, 142, 143, 144, 145, 146, -1,
6460 148, 149, -1, -1, 497, -1, -1, -1, 156, -1,
6461 -1, -1, -1, -1, -1, -1, -1, -1, -1, 512,
6462 -1, -1, 515, -1, 0, 1, -1, 3, 4, 5,
6463 6, 7, -1, -1, 527, 11, 12, -1, -1, -1,
6464 16, -1, 18, 19, 20, 21, 22, 23, 24, -1,
6465 -1, -1, 545, -1, 30, 31, 32, 33, 34, 35,
6466 36, -1, -1, 39, -1, -1, -1, -1, -1, 45,
6467 46, 47, 48, 49, 50, 51, 52, 53, 54, 55,
6468 56, 57, -1, 59, 60, 61, 62, 63, 64, 65,
6469 -1, -1, -1, -1, -1, -1, -1, 590, -1, -1,
6470 76, 77, -1, -1, -1, 598, -1, -1, 601, -1,
6471 -1, -1, -1, -1, -1, 91, 92, 610, -1, -1,
6472 -1, -1, 615, 99, -1, -1, 102, 103, 104, 105,
6473 -1, 107, -1, -1, 110, 111, 112, 113, 114, 115,
6474 116, 117, 118, -1, 120, -1, -1, 78, 79, 80,
6475 81, 82, 83, 84, 85, 86, 87, 88, 89, 90,
6476 -1, -1, -1, -1, 95, 96, -1, -1, -1, -1,
6477 -1, 147, 148, 149, -1, -1, 669, -1, 154, -1,
6478 -1, -1, -1, -1, 160, -1, -1, 680, -1, -1,
6479 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6480 693, 694, -1, -1, 697, 698, 137, 138, 139, 140,
6481 141, 142, 143, 144, 145, 146, 709, 710, -1, -1,
6482 713, -1, 715, -1, -1, -1, -1, -1, -1, 722,
6483 723, -1, -1, -1, 727, -1, -1, -1, -1, -1,
6484 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6485 -1, 0, 1, -1, 3, 4, 5, 6, 7, 8,
6486 9, 10, 11, 12, -1, 14, 15, 16, 17, 18,
6487 19, 20, 21, 22, 23, 24, 25, -1, -1, -1,
6488 773, 30, 31, 32, 33, 34, 35, 36, -1, -1,
6489 39, -1, -1, -1, -1, -1, 45, 46, 47, 48,
6490 49, 50, 51, 52, 53, 54, 55, 56, 57, 802,
6491 59, 60, 61, 62, 63, 64, 65, -1, -1, 68,
6492 -1, -1, -1, -1, -1, -1, -1, 76, 77, -1,
6493 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6494 -1, 834, 91, 92, -1, -1, -1, -1, -1, -1,
6495 99, -1, -1, 102, 103, 104, 105, -1, 107, 852,
6496 -1, 110, 111, 112, 113, 114, 115, 116, 117, 118,
6497 -1, 120, -1, -1, -1, -1, -1, -1, -1, -1,
6498 -1, -1, -1, -1, -1, -1, -1, -1, -1, 882,
6499 -1, -1, -1, -1, -1, -1, -1, -1, 147, 148,
6500 149, -1, -1, 152, -1, -1, -1, -1, -1, 158,
6501 -1, 160, -1, -1, -1, -1, -1, -1, -1, -1,
6502 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6503 -1, -1, -1, -1, -1, -1, 929, -1, -1, -1,
6504 -1, -1, -1, -1, -1, 938, -1, -1, -1, -1,
6505 -1, -1, -1, 946, -1, -1, -1, 950, 951, 952,
6506 -1, -1, -1, -1, 957, 958, -1, -1, 961, -1,
6507 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6508 973, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6509 -1, -1, -1, -1, -1, -1, -1, -1, 991, 992,
6510 -1, 994, 995, -1, 997, -1, 999, -1, -1, -1,
6511 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6512 -1, -1, -1, -1, -1, 1018, 1019, -1, -1, 1022,
6513 -1, -1, -1, 1026, 1027, 0, 1, -1, 3, 4,
6514 5, 6, 7, -1, -1, -1, 11, 12, 1041, -1,
6515 -1, 16, -1, 18, 19, 20, 21, 22, 23, 24,
6516 -1, -1, -1, -1, 1057, 30, 31, 32, 33, 34,
6517 35, 36, 1065, -1, 39, -1, -1, -1, -1, -1,
6518 45, 46, 47, 48, 49, 50, 51, 52, 53, 54,
6519 55, 56, 57, -1, 59, 60, 61, 62, 63, 64,
6520 65, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6521 -1, 76, 77, -1, -1, -1, -1, -1, -1, -1,
6522 -1, -1, -1, -1, -1, -1, 91, 92, -1, -1,
6523 -1, -1, -1, -1, 99, -1, -1, 102, 103, 104,
6524 105, -1, 107, -1, -1, 110, 111, 112, 113, 114,
6525 115, 116, 117, 118, -1, -1, -1, -1, -1, -1,
6526 -1, -1, 1155, -1, -1, -1, -1, -1, -1, -1,
6527 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6528 -1, -1, 147, 148, 149, -1, -1, 0, 1, 154,
6529 3, 4, 5, 6, 7, 160, -1, -1, 11, 12,
6530 -1, -1, -1, 16, -1, 18, 19, 20, 21, 22,
6531 23, 24, -1, -1, -1, -1, -1, 30, 31, 32,
6532 33, 34, 35, 36, -1, -1, 39, -1, -1, -1,
6533 -1, -1, 45, 46, 47, 48, 49, 50, 51, 52,
6534 53, 54, 55, 56, 57, -1, 59, 60, 61, 62,
6535 63, 64, 65, -1, -1, -1, -1, -1, -1, -1,
6536 -1, -1, -1, 76, 77, -1, -1, -1, -1, -1,
6537 -1, -1, -1, -1, -1, -1, -1, -1, 91, 92,
6538 -1, -1, -1, -1, -1, -1, 99, -1, -1, 102,
6539 103, 104, 105, -1, 107, -1, -1, 110, 111, 112,
6540 113, 114, 115, 116, 117, 118, -1, -1, -1, -1,
6541 -1, -1, -1, -1, 1307, 0, -1, -1, -1, -1,
6542 -1, -1, -1, 8, 9, 10, -1, -1, 13, 14,
6543 15, -1, 17, -1, 147, 148, 149, -1, -1, 152,
6544 25, 26, 27, 28, 29, -1, -1, 160, -1, -1,
6545 -1, -1, 37, 38, -1, 40, 41, 42, 43, 44,
6546 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6547 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6548 -1, -1, -1, 68, 69, -1, -1, -1, -1, -1,
6549 -1, -1, -1, 78, 79, 80, 81, 82, 83, 84,
6550 85, 86, 87, 88, 89, 90, -1, -1, -1, -1,
6551 95, 96, 97, 98, -1, 100, 101, -1, -1, -1,
6552 -1, 106, -1, -1, -1, -1, -1, -1, -1, -1,
6553 -1, -1, -1, -1, -1, 120, -1, -1, 123, -1,
6554 -1, -1, -1, -1, -1, -1, -1, -1, -1, 134,
6555 135, 136, 137, 138, 139, 140, 141, 142, 143, 144,
6556 145, 146, -1, -1, -1, -1, 151, 152, 153, 154,
6557 155, 0, -1, 158, 159, 160, -1, -1, -1, 8,
6558 9, 10, -1, -1, 13, 14, 15, -1, 17, -1,
6559 -1, -1, -1, -1, -1, -1, 25, -1, 27, 28,
6560 29, -1, -1, -1, -1, -1, -1, -1, 37, 38,
6561 -1, 40, 41, 42, 43, 44, -1, -1, -1, -1,
6562 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6563 -1, -1, -1, -1, -1, -1, -1, -1, -1, 68,
6564 69, -1, -1, -1, -1, -1, -1, -1, -1, 78,
6565 79, 80, 81, 82, 83, 84, 85, 86, 87, 88,
6566 89, 90, -1, -1, -1, -1, 95, 96, 97, 98,
6567 -1, 100, 101, -1, -1, -1, -1, 106, -1, -1,
6568 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6569 -1, 120, -1, -1, 123, -1, -1, -1, -1, -1,
6570 -1, -1, -1, -1, -1, 134, 135, 136, 137, 138,
6571 139, 140, 141, 142, 143, 144, 145, 146, -1, -1,
6572 -1, -1, -1, 152, 153, 154, 155, 0, -1, 158,
6573 159, 160, -1, -1, -1, 8, 9, 10, -1, -1,
6574 13, 14, 15, -1, 17, -1, -1, -1, -1, -1,
6575 -1, -1, 25, -1, 27, 28, 29, -1, -1, -1,
6576 -1, -1, -1, -1, 37, 38, -1, 40, 41, 42,
6577 43, 44, -1, -1, -1, -1, -1, -1, -1, -1,
6578 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6579 -1, -1, -1, -1, -1, 68, 69, -1, -1, -1,
6580 -1, -1, -1, -1, -1, 78, 79, 80, 81, 82,
6581 83, 84, 85, 86, 87, 88, 89, 90, -1, -1,
6582 -1, -1, 95, 96, 97, 98, -1, 100, 101, -1,
6583 -1, -1, -1, 106, -1, -1, -1, -1, -1, -1,
6584 -1, -1, -1, -1, -1, -1, -1, 120, -1, -1,
6585 123, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6586 -1, 134, 135, 136, 137, 138, 139, 140, 141, 142,
6587 143, 144, 145, 146, -1, -1, -1, -1, -1, 152,
6588 153, 154, 155, 0, -1, 158, 159, 160, -1, -1,
6589 -1, 8, 9, 10, -1, -1, 13, 14, 15, -1,
6590 17, -1, -1, -1, -1, -1, -1, -1, 25, 26,
6591 27, 28, 29, -1, -1, -1, -1, -1, -1, -1,
6592 37, 38, -1, 40, 41, 42, 43, 44, -1, -1,
6593 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6594 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6595 -1, 68, 69, -1, -1, -1, -1, -1, -1, -1,
6596 -1, 78, 79, 80, 81, 82, 83, 84, 85, 86,
6597 87, 88, 89, 90, -1, -1, -1, -1, 95, 96,
6598 97, 98, -1, -1, 101, -1, -1, -1, -1, 106,
6599 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6600 -1, -1, -1, 120, -1, -1, 123, -1, -1, -1,
6601 -1, -1, -1, -1, -1, -1, -1, -1, 135, 136,
6602 137, 138, 139, 140, 141, 142, 143, 144, 145, 146,
6603 -1, -1, -1, -1, 151, 152, 153, 154, 155, 0,
6604 -1, 158, 159, 160, -1, -1, -1, 8, 9, 10,
6605 -1, -1, 13, 14, 15, -1, 17, -1, -1, -1,
6606 -1, -1, -1, -1, 25, 26, 27, 28, 29, -1,
6607 -1, -1, -1, -1, -1, -1, 37, 38, -1, 40,
6608 41, 42, 43, 44, -1, -1, -1, -1, -1, -1,
6609 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6610 -1, -1, -1, -1, -1, -1, -1, 68, 69, -1,
6611 -1, -1, -1, -1, -1, -1, -1, 78, 79, 80,
6612 81, 82, 83, 84, 85, 86, 87, 88, 89, 90,
6613 -1, -1, -1, -1, 95, 96, 97, 98, -1, -1,
6614 101, -1, -1, -1, -1, 106, -1, -1, -1, -1,
6615 -1, -1, -1, -1, -1, -1, -1, -1, -1, 120,
6616 -1, -1, 123, -1, -1, -1, -1, -1, -1, -1,
6617 -1, -1, -1, -1, 135, 136, 137, 138, 139, 140,
6618 141, 142, 143, 144, 145, 146, -1, -1, -1, -1,
6619 151, 152, 153, 154, 155, 0, -1, 158, 159, 160,
6620 -1, -1, -1, 8, 9, 10, -1, -1, 13, 14,
6621 15, -1, 17, -1, -1, -1, -1, -1, -1, -1,
6622 25, 26, 27, 28, -1, -1, -1, -1, -1, -1,
6623 -1, -1, 37, 38, -1, 40, 41, 42, 43, 44,
6624 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6625 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6626 -1, -1, -1, 68, 69, -1, -1, -1, -1, -1,
6627 -1, -1, -1, 78, 79, 80, 81, 82, 83, 84,
6628 85, 86, 87, 88, 89, 90, -1, -1, -1, -1,
6629 95, 96, 97, 98, -1, -1, 101, -1, -1, -1,
6630 -1, 106, -1, -1, -1, -1, -1, -1, -1, -1,
6631 -1, -1, -1, -1, -1, 120, -1, -1, -1, -1,
6632 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6633 135, -1, 137, 138, 139, 140, 141, 142, 143, 144,
6634 145, 146, -1, -1, -1, -1, 151, 152, 153, 154,
6635 155, 0, 157, 158, 159, 160, -1, -1, -1, 8,
6636 9, 10, -1, -1, 13, 14, 15, -1, 17, -1,
6637 -1, -1, -1, -1, -1, -1, 25, -1, 27, 28,
6638 29, -1, -1, -1, -1, -1, -1, -1, 37, 38,
6639 -1, 40, 41, 42, 43, 44, -1, -1, -1, -1,
6640 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6641 -1, -1, -1, -1, -1, -1, -1, -1, -1, 68,
6642 69, -1, -1, -1, -1, -1, -1, -1, -1, 78,
6643 79, 80, 81, 82, 83, 84, 85, 86, 87, 88,
6644 89, 90, -1, -1, -1, -1, 95, 96, 97, 98,
6645 -1, -1, 101, -1, -1, -1, -1, 106, -1, -1,
6646 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6647 -1, 120, -1, -1, 123, -1, -1, -1, -1, -1,
6648 -1, -1, -1, -1, -1, -1, 135, 136, 137, 138,
6649 139, 140, 141, 142, 143, 144, 145, 146, -1, -1,
6650 -1, -1, -1, 152, 153, 154, 155, 0, -1, 158,
6651 159, 160, -1, -1, -1, 8, 9, 10, -1, -1,
6652 13, 14, 15, -1, 17, -1, -1, -1, -1, -1,
6653 -1, -1, 25, 26, 27, 28, -1, -1, -1, -1,
6654 -1, -1, -1, -1, 37, 38, -1, 40, 41, 42,
6655 43, 44, -1, -1, -1, -1, -1, -1, -1, -1,
6656 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6657 -1, -1, -1, -1, -1, 68, 69, -1, -1, -1,
6658 -1, -1, -1, -1, -1, 78, 79, 80, 81, 82,
6659 83, 84, 85, 86, 87, 88, 89, 90, -1, -1,
6660 -1, -1, 95, 96, 97, 98, -1, -1, 101, -1,
6661 -1, -1, -1, 106, -1, -1, -1, -1, -1, -1,
6662 -1, -1, -1, -1, -1, -1, -1, 120, -1, -1,
6663 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6664 -1, -1, 135, -1, 137, 138, 139, 140, 141, 142,
6665 143, 144, 145, 146, -1, -1, -1, -1, 151, 152,
6666 153, 154, 155, 0, 157, 158, 159, 160, -1, -1,
6667 -1, 8, 9, 10, -1, -1, 13, 14, 15, -1,
6668 17, -1, -1, -1, -1, -1, -1, -1, 25, -1,
6669 27, 28, -1, -1, -1, -1, -1, -1, -1, -1,
6670 37, 38, -1, 40, 41, 42, 43, 44, -1, -1,
6671 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6672 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6673 -1, 68, 69, -1, -1, -1, -1, -1, -1, -1,
6674 -1, 78, 79, 80, 81, 82, 83, 84, 85, 86,
6675 87, 88, 89, 90, -1, -1, -1, -1, 95, 96,
6676 97, 98, -1, 100, 101, -1, -1, -1, -1, 106,
6677 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6678 -1, -1, -1, 120, -1, -1, -1, -1, -1, -1,
6679 -1, -1, -1, -1, -1, -1, -1, 134, 135, -1,
6680 137, 138, 139, 140, 141, 142, 143, 144, 145, 146,
6681 -1, -1, -1, -1, 151, 152, 153, 154, 155, 0,
6682 -1, 158, 159, 160, -1, -1, -1, 8, 9, 10,
6683 -1, -1, 13, 14, 15, -1, 17, -1, -1, -1,
6684 -1, -1, -1, -1, 25, -1, 27, 28, -1, -1,
6685 -1, -1, -1, -1, -1, -1, 37, 38, -1, 40,
6686 41, 42, 43, 44, -1, -1, -1, -1, -1, -1,
6687 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6688 -1, -1, -1, -1, -1, -1, -1, 68, 69, -1,
6689 -1, -1, -1, -1, -1, -1, -1, 78, 79, 80,
6690 81, 82, 83, 84, 85, 86, 87, 88, 89, 90,
6691 -1, -1, -1, -1, 95, 96, 97, 98, -1, -1,
6692 101, -1, -1, -1, -1, 106, -1, -1, -1, -1,
6693 -1, -1, -1, -1, -1, -1, -1, -1, -1, 120,
6694 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6695 -1, -1, -1, -1, 135, -1, 137, 138, 139, 140,
6696 141, 142, 143, 144, 145, 146, -1, -1, -1, -1,
6697 -1, 152, 153, 154, 155, 0, 157, 158, 159, 160,
6698 -1, -1, -1, 8, 9, 10, -1, -1, -1, 14,
6699 15, -1, 17, -1, -1, -1, -1, -1, -1, -1,
6700 25, 26, -1, -1, -1, -1, -1, -1, -1, -1,
6701 -1, -1, 37, 38, -1, 40, 41, 42, 43, 44,
6702 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6703 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6704 -1, -1, -1, 68, 69, -1, -1, -1, -1, -1,
6705 -1, -1, -1, 78, 79, 80, 81, 82, 83, 84,
6706 85, 86, 87, 88, 89, 90, -1, -1, -1, -1,
6707 95, 96, 97, 98, -1, 100, 101, -1, -1, -1,
6708 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6709 -1, -1, -1, -1, -1, 120, -1, -1, -1, -1,
6710 -1, -1, -1, -1, -1, -1, -1, -1, -1, 134,
6711 135, -1, 137, 138, 139, 140, 141, 142, 143, 144,
6712 145, 146, -1, -1, -1, -1, 151, 152, 153, 154,
6713 155, 0, -1, 158, -1, 160, -1, -1, -1, 8,
6714 9, 10, -1, -1, -1, 14, 15, -1, 17, -1,
6715 -1, -1, -1, -1, -1, -1, 25, 26, -1, -1,
6716 -1, -1, -1, -1, -1, -1, -1, -1, 37, 38,
6717 -1, 40, 41, 42, 43, 44, -1, -1, -1, -1,
6718 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6719 -1, -1, -1, -1, -1, -1, -1, -1, -1, 68,
6720 69, -1, -1, -1, -1, -1, -1, -1, -1, 78,
6721 79, 80, 81, 82, 83, 84, 85, 86, 87, 88,
6722 89, 90, -1, -1, -1, -1, 95, 96, 97, 98,
6723 -1, 100, 101, -1, -1, -1, -1, -1, -1, -1,
6724 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6725 -1, 120, -1, -1, -1, -1, -1, -1, -1, -1,
6726 -1, -1, -1, -1, -1, 134, 135, -1, 137, 138,
6727 139, 140, 141, 142, 143, 144, 145, 146, -1, -1,
6728 -1, -1, 151, 152, 153, 154, 155, 0, -1, 158,
6729 -1, 160, -1, -1, -1, 8, 9, 10, -1, -1,
6730 -1, 14, 15, -1, 17, -1, -1, -1, -1, -1,
6731 -1, -1, 25, -1, -1, -1, -1, -1, -1, -1,
6732 -1, -1, -1, -1, 37, 38, -1, 40, 41, 42,
6733 43, 44, -1, -1, -1, -1, -1, -1, -1, -1,
6734 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6735 -1, -1, -1, -1, -1, 68, 69, -1, -1, -1,
6736 -1, -1, -1, -1, -1, 78, 79, 80, 81, 82,
6737 83, 84, 85, 86, 87, 88, 89, 90, -1, -1,
6738 -1, -1, 95, 96, 97, 98, -1, 100, 101, -1,
6739 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6740 -1, -1, -1, -1, -1, -1, -1, 120, -1, -1,
6741 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6742 -1, 134, 135, -1, 137, 138, 139, 140, 141, 142,
6743 143, 144, 145, 146, -1, -1, -1, -1, 151, 152,
6744 153, 154, 155, 0, -1, 158, -1, 160, -1, -1,
6745 -1, 8, 9, 10, -1, -1, -1, 14, 15, -1,
6746 17, -1, -1, -1, -1, -1, -1, -1, 25, -1,
6747 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6748 37, 38, -1, 40, 41, 42, 43, 44, -1, -1,
6749 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6750 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6751 -1, 68, 69, -1, -1, -1, -1, -1, -1, -1,
6752 -1, 78, 79, 80, 81, 82, 83, 84, 85, 86,
6753 87, 88, 89, 90, -1, -1, -1, -1, 95, 96,
6754 97, 98, -1, 100, 101, -1, -1, -1, -1, -1,
6755 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6756 -1, -1, -1, 120, -1, -1, -1, -1, -1, -1,
6757 -1, -1, -1, -1, -1, -1, -1, 134, 135, -1,
6758 137, 138, 139, 140, 141, 142, 143, 144, 145, 146,
6759 -1, -1, -1, -1, 151, 152, 153, 154, 155, -1,
6760 -1, 158, 1, 160, 3, 4, 5, 6, 7, 8,
6761 9, 10, 11, 12, -1, -1, 15, 16, -1, 18,
6762 19, 20, 21, 22, 23, 24, -1, -1, -1, -1,
6763 -1, 30, 31, 32, 33, 34, 35, 36, -1, -1,
6764 39, -1, -1, -1, -1, -1, 45, 46, 47, 48,
6765 49, 50, 51, 52, 53, 54, 55, 56, 57, -1,
6766 59, 60, 61, 62, 63, 64, 65, -1, -1, 68,
6767 -1, -1, -1, -1, -1, -1, -1, 76, 77, -1,
6768 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6769 -1, -1, 91, 92, -1, -1, -1, -1, -1, -1,
6770 99, -1, -1, 102, 103, 104, 105, -1, 107, -1,
6771 -1, 110, 111, 112, 113, 114, 115, 116, 117, 118,
6772 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6773 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6774 -1, -1, -1, -1, -1, -1, -1, -1, 147, 148,
6775 149, -1, -1, -1, 1, 154, 3, 4, 5, 6,
6776 7, 160, -1, 10, 11, 12, -1, 14, 15, 16,
6777 -1, 18, 19, 20, 21, 22, 23, 24, -1, -1,
6778 -1, -1, -1, 30, 31, 32, 33, 34, 35, 36,
6779 -1, -1, 39, -1, -1, -1, -1, -1, 45, 46,
6780 47, 48, 49, 50, 51, 52, 53, 54, 55, 56,
6781 57, -1, 59, 60, 61, 62, 63, 64, 65, -1,
6782 -1, 68, -1, -1, -1, -1, -1, -1, -1, 76,
6783 77, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6784 -1, -1, -1, -1, 91, 92, -1, -1, -1, -1,
6785 -1, -1, 99, -1, -1, 102, 103, 104, 105, -1,
6786 107, -1, -1, 110, 111, 112, 113, 114, 115, 116,
6787 117, 118, -1, -1, -1, -1, -1, -1, -1, -1,
6788 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6789 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6790 147, 148, 149, -1, -1, -1, 1, 154, 3, 4,
6791 5, 6, 7, 160, -1, 10, 11, 12, -1, -1,
6792 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
6793 -1, -1, -1, -1, -1, 30, 31, 32, 33, 34,
6794 35, 36, -1, -1, 39, -1, -1, -1, -1, -1,
6795 45, 46, 47, 48, 49, 50, 51, 52, 53, 54,
6796 55, 56, 57, -1, 59, 60, 61, 62, 63, 64,
6797 65, -1, -1, 68, -1, -1, -1, -1, -1, -1,
6798 -1, 76, 77, -1, -1, -1, -1, -1, -1, -1,
6799 -1, -1, -1, -1, -1, -1, 91, 92, -1, -1,
6800 -1, -1, -1, -1, 99, -1, -1, 102, 103, 104,
6801 105, -1, 107, -1, -1, 110, 111, 112, 113, 114,
6802 115, 116, 117, 118, -1, -1, -1, -1, -1, -1,
6803 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6804 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6805 -1, -1, 147, 148, 149, -1, -1, -1, 1, 154,
6806 3, 4, 5, 6, 7, 160, -1, 10, 11, 12,
6807 -1, -1, 15, 16, -1, 18, 19, 20, 21, 22,
6808 23, 24, 25, -1, -1, -1, -1, 30, 31, 32,
6809 33, 34, 35, 36, -1, -1, 39, -1, -1, -1,
6810 -1, -1, 45, 46, 47, 48, 49, 50, 51, 52,
6811 53, 54, 55, 56, 57, -1, 59, 60, 61, 62,
6812 63, 64, 65, -1, -1, 68, -1, -1, -1, -1,
6813 -1, -1, -1, 76, 77, -1, -1, -1, -1, -1,
6814 -1, -1, -1, -1, -1, -1, -1, -1, 91, 92,
6815 -1, -1, -1, -1, -1, -1, 99, -1, -1, 102,
6816 103, 104, 105, -1, 107, -1, -1, 110, 111, 112,
6817 113, 114, 115, 116, 117, 118, -1, -1, -1, -1,
6818 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6819 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6820 -1, -1, -1, -1, 147, 148, 149, -1, -1, -1,
6821 1, 154, 3, 4, 5, 6, 7, 160, -1, 10,
6822 11, 12, -1, -1, 15, 16, -1, 18, 19, 20,
6823 21, 22, 23, 24, -1, -1, -1, -1, -1, 30,
6824 31, 32, 33, 34, 35, 36, -1, -1, 39, -1,
6825 -1, -1, -1, -1, 45, 46, 47, 48, 49, 50,
6826 51, 52, 53, 54, 55, 56, 57, -1, 59, 60,
6827 61, 62, 63, 64, 65, -1, -1, 68, -1, -1,
6828 -1, -1, -1, -1, -1, 76, 77, -1, -1, -1,
6829 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6830 91, 92, -1, -1, -1, -1, -1, -1, 99, -1,
6831 -1, 102, 103, 104, 105, -1, 107, -1, -1, 110,
6832 111, 112, 113, 114, 115, 116, 117, 118, -1, -1,
6833 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6834 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6835 -1, -1, -1, -1, -1, -1, 147, 148, 149, -1,
6836 -1, -1, 1, 154, 3, 4, 5, 6, 7, 160,
6837 9, 10, 11, 12, -1, -1, -1, 16, -1, 18,
6838 19, 20, 21, 22, 23, 24, -1, -1, -1, -1,
6839 -1, 30, 31, 32, 33, 34, 35, 36, -1, -1,
6840 39, -1, -1, -1, -1, -1, 45, 46, 47, 48,
6841 49, 50, 51, 52, 53, 54, 55, 56, 57, -1,
6842 59, 60, 61, 62, 63, 64, 65, -1, -1, 68,
6843 -1, -1, -1, -1, -1, -1, -1, 76, 77, -1,
6844 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6845 -1, -1, 91, 92, -1, -1, -1, -1, -1, -1,
6846 99, -1, -1, 102, 103, 104, 105, -1, 107, -1,
6847 -1, 110, 111, 112, 113, 114, 115, 116, 117, 118,
6848 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6849 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6850 -1, -1, -1, -1, -1, -1, -1, -1, 147, 148,
6851 149, -1, -1, -1, 1, 154, 3, 4, 5, 6,
6852 7, 160, -1, 10, 11, 12, -1, -1, -1, 16,
6853 -1, 18, 19, 20, 21, 22, 23, 24, -1, -1,
6854 -1, -1, -1, 30, 31, 32, 33, 34, 35, 36,
6855 -1, -1, 39, -1, -1, -1, -1, -1, 45, 46,
6856 47, 48, 49, 50, 51, 52, 53, 54, 55, 56,
6857 57, -1, 59, 60, 61, 62, 63, 64, 65, -1,
6858 -1, 68, -1, -1, -1, -1, -1, -1, -1, 76,
6859 77, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6860 -1, -1, -1, -1, 91, 92, -1, -1, -1, -1,
6861 -1, -1, 99, -1, -1, 102, 103, 104, 105, -1,
6862 107, -1, -1, 110, 111, 112, 113, 114, 115, 116,
6863 117, 118, -1, -1, -1, -1, -1, -1, -1, -1,
6864 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6865 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6866 147, 148, 149, -1, -1, -1, 1, 154, 3, 4,
6867 5, 6, 7, 160, -1, -1, 11, 12, -1, -1,
6868 -1, 16, -1, 18, 19, 20, 21, 22, 23, 24,
6869 -1, -1, -1, -1, -1, 30, 31, 32, 33, 34,
6870 35, 36, -1, -1, 39, -1, -1, -1, -1, -1,
6871 45, 46, 47, 48, 49, 50, 51, 52, 53, 54,
6872 55, 56, 57, -1, 59, 60, 61, 62, 63, 64,
6873 65, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6874 -1, 76, 77, -1, -1, -1, -1, -1, -1, -1,
6875 -1, -1, -1, -1, -1, -1, 91, 92, -1, -1,
6876 -1, -1, -1, -1, 99, -1, -1, 102, 103, 104,
6877 105, -1, 107, -1, -1, 110, 111, 112, 113, 114,
6878 115, 116, 117, 118, -1, -1, -1, -1, -1, -1,
6879 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6880 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6881 -1, -1, 147, 148, 149, -1, -1, -1, -1, 154,
6882 -1, -1, -1, 158, 1, 160, 3, 4, 5, 6,
6883 7, -1, -1, -1, 11, 12, -1, -1, -1, 16,
6884 -1, 18, 19, 20, 21, 22, 23, 24, -1, -1,
6885 -1, -1, -1, 30, 31, 32, 33, 34, 35, 36,
6886 -1, -1, 39, -1, -1, -1, -1, -1, 45, 46,
6887 47, 48, 49, 50, 51, 52, 53, 54, 55, 56,
6888 57, -1, 59, 60, 61, 62, 63, 64, 65, -1,
6889 -1, -1, -1, -1, -1, -1, -1, -1, -1, 76,
6890 77, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6891 -1, -1, -1, -1, 91, 92, -1, -1, -1, -1,
6892 -1, -1, 99, -1, -1, 102, 103, 104, 105, -1,
6893 107, -1, -1, 110, 111, 112, 113, 114, 115, 116,
6894 117, 118, -1, -1, -1, -1, -1, -1, -1, -1,
6895 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6896 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6897 147, 148, 149, -1, -1, -1, -1, 154, -1, -1,
6898 -1, 158, 1, 160, 3, 4, 5, 6, 7, -1,
6899 -1, -1, 11, 12, -1, -1, -1, 16, -1, 18,
6900 19, 20, 21, 22, 23, 24, -1, -1, -1, -1,
6901 -1, 30, 31, 32, 33, 34, 35, 36, -1, -1,
6902 39, -1, -1, -1, -1, -1, 45, 46, 47, 48,
6903 49, 50, 51, 52, 53, 54, 55, 56, 57, -1,
6904 59, 60, 61, 62, 63, 64, 65, -1, -1, -1,
6905 -1, -1, -1, -1, -1, -1, -1, 76, 77, -1,
6906 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6907 -1, -1, 91, 92, -1, -1, -1, -1, -1, -1,
6908 99, -1, -1, 102, 103, 104, 105, -1, 107, -1,
6909 -1, 110, 111, 112, 113, 114, 115, 116, 117, 118,
6910 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6911 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6912 -1, -1, -1, -1, -1, -1, -1, -1, 147, 148,
6913 149, -1, -1, 152, 1, 154, 3, 4, 5, 6,
6914 7, 160, -1, -1, 11, 12, -1, -1, -1, 16,
6915 -1, 18, 19, 20, 21, 22, 23, 24, -1, -1,
6916 -1, -1, -1, 30, 31, 32, 33, 34, 35, 36,
6917 -1, -1, 39, -1, -1, -1, -1, -1, 45, 46,
6918 47, 48, 49, 50, 51, 52, 53, 54, 55, 56,
6919 57, -1, 59, 60, 61, 62, 63, 64, 65, -1,
6920 -1, -1, -1, -1, -1, -1, -1, -1, -1, 76,
6921 77, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6922 -1, -1, -1, -1, 91, 92, -1, -1, -1, -1,
6923 -1, -1, 99, -1, -1, 102, 103, 104, 105, -1,
6924 107, -1, -1, 110, 111, 112, 113, 114, 115, 116,
6925 117, 118, -1, -1, -1, -1, -1, -1, -1, -1,
6926 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6927 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6928 147, 148, 149, -1, -1, 152, 1, 154, 3, 4,
6929 5, -1, 7, 160, -1, -1, 11, 12, -1, -1,
6930 -1, 16, 17, 18, 19, 20, 21, 22, 23, 24,
6931 -1, -1, -1, -1, -1, 30, 31, 32, 33, 34,
6932 35, 36, -1, -1, 39, -1, -1, -1, -1, -1,
6933 -1, 46, -1, -1, 49, 50, 51, 52, 53, 54,
6934 55, 56, 57, -1, 59, 60, 61, 62, 63, 64,
6935 65, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6936 -1, 76, 77, -1, -1, -1, -1, -1, -1, -1,
6937 -1, -1, -1, -1, -1, -1, 91, 92, -1, -1,
6938 -1, -1, -1, -1, 99, -1, -1, 102, 103, 104,
6939 105, -1, -1, -1, -1, 110, 111, 112, 113, 114,
6940 115, 116, 117, 118, -1, -1, -1, -1, -1, -1,
6941 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6942 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6943 -1, -1, 147, 148, 149, -1, -1, -1, -1, 154,
6944 -1, -1, -1, -1, -1, 160, 3, 4, 5, 6,
6945 7, 8, 9, 10, 11, 12, 13, 14, 15, 16,
6946 17, 18, 19, 20, 21, 22, 23, 24, 25, 26,
6947 -1, -1, -1, 30, 31, 32, 33, 34, 35, 36,
6948 37, 38, 39, -1, -1, -1, -1, -1, 45, 46,
6949 47, 48, 49, 50, 51, 52, 53, 54, 55, 56,
6950 57, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6951 -1, -1, -1, -1, -1, -1, -1, -1, -1, 76,
6952 77, 78, 79, 80, 81, 82, 83, 84, -1, -1,
6953 87, 88, -1, -1, -1, -1, 93, 94, 95, 96,
6954 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6955 107, 108, -1, -1, -1, -1, -1, -1, -1, -1,
6956 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6957 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6958 137, 138, 139, 140, 141, 142, 143, 144, 145, 146,
6959 -1, 148, 149, -1, -1, -1, -1, -1, -1, 156,
6960 157, 3, 4, 5, 6, 7, 8, 9, 10, 11,
6961 12, 13, 14, 15, 16, 17, 18, 19, 20, 21,
6962 22, 23, 24, 25, 26, -1, -1, -1, 30, 31,
6963 32, 33, 34, 35, 36, 37, 38, 39, -1, -1,
6964 -1, -1, -1, 45, 46, 47, 48, 49, 50, 51,
6965 52, 53, 54, 55, 56, 57, -1, -1, -1, -1,
6966 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6967 -1, -1, -1, -1, 76, 77, 78, 79, 80, 81,
6968 82, 83, 84, -1, -1, 87, 88, -1, -1, -1,
6969 -1, 93, 94, 95, 96, -1, -1, -1, -1, -1,
6970 -1, -1, -1, -1, -1, 107, 108, -1, -1, -1,
6971 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6972 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6973 -1, -1, -1, -1, -1, 137, 138, 139, 140, 141,
6974 142, 143, 144, 145, 146, -1, 148, 149, -1, -1,
6975 -1, -1, -1, -1, 156, 3, 4, 5, 6, 7,
6976 8, 9, 10, 11, 12, 13, 14, 15, 16, 17,
6977 18, 19, 20, 21, 22, 23, 24, 25, 26, -1,
6978 -1, -1, 30, 31, 32, 33, 34, 35, 36, 37,
6979 38, 39, -1, -1, -1, -1, -1, 45, 46, 47,
6980 48, 49, 50, 51, 52, 53, 54, -1, 56, -1,
6981 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6982 -1, -1, -1, -1, -1, -1, -1, -1, 76, 77,
6983 78, 79, 80, 81, 82, 83, 84, -1, -1, 87,
6984 88, -1, -1, -1, -1, 93, 94, 95, 96, -1,
6985 -1, -1, -1, -1, -1, -1, -1, -1, -1, 107,
6986 108, -1, -1, 111, -1, -1, -1, -1, -1, -1,
6987 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6988 -1, -1, -1, -1, -1, -1, -1, -1, -1, 137,
6989 138, 139, 140, 141, 142, 143, 144, 145, 146, -1,
6990 148, 149, -1, -1, -1, -1, -1, -1, 156, 3,
6991 4, 5, 6, 7, 8, 9, 10, 11, 12, 13,
6992 14, 15, 16, 17, 18, 19, 20, 21, 22, 23,
6993 24, 25, 26, -1, -1, -1, 30, 31, 32, 33,
6994 34, 35, 36, 37, 38, 39, -1, -1, -1, -1,
6995 -1, 45, 46, 47, 48, 49, 50, 51, 52, 53,
6996 -1, -1, 56, -1, -1, -1, -1, -1, -1, -1,
6997 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6998 -1, -1, 76, 77, 78, 79, 80, 81, 82, 83,
6999 84, -1, -1, 87, 88, -1, -1, -1, -1, 93,
7000 94, 95, 96, -1, -1, -1, -1, -1, -1, -1,
7001 -1, -1, -1, 107, 108, -1, -1, 111, -1, -1,
7002 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7003 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7004 -1, -1, -1, 137, 138, 139, 140, 141, 142, 143,
7005 144, 145, 146, -1, 148, 149, -1, -1, -1, -1,
7006 -1, -1, 156, 3, 4, 5, 6, 7, 8, 9,
7007 10, 11, 12, 13, 14, 15, 16, 17, 18, 19,
7008 20, 21, 22, 23, 24, 25, 26, -1, -1, -1,
7009 30, 31, 32, 33, 34, 35, 36, 37, 38, 39,
7010 -1, -1, -1, -1, -1, 45, 46, 47, 48, 49,
7011 50, 51, 52, 53, -1, -1, 56, -1, -1, -1,
7012 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7013 -1, -1, -1, -1, -1, -1, 76, 77, 78, 79,
7014 80, 81, 82, 83, 84, -1, -1, 87, 88, -1,
7015 -1, -1, -1, 93, 94, 95, 96, -1, -1, -1,
7016 -1, -1, -1, -1, -1, -1, -1, 107, 108, -1,
7017 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7018 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7019 -1, -1, -1, -1, -1, -1, -1, 137, 138, 139,
7020 140, 141, 142, 143, 144, 145, 146, -1, 148, 149,
7021 3, 4, 5, -1, 7, -1, 156, -1, 11, 12,
7022 -1, -1, -1, 16, -1, 18, 19, 20, 21, 22,
7023 23, 24, -1, -1, -1, -1, -1, 30, 31, 32,
7024 33, 34, 35, 36, -1, -1, 39, -1, -1, -1,
7025 -1, -1, -1, 46, -1, -1, 49, 50, 51, 52,
7026 53, 54, 55, 56, 57, -1, 59, 60, 61, 62,
7027 63, 64, 65, -1, -1, -1, -1, -1, -1, -1,
7028 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7029 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7030 -1, -1, -1, -1, -1, -1, 99, -1, -1, 102,
7031 103, 104, 105, -1, -1, -1, -1, 110, 111, 112,
7032 113, 114, 115, 116, 117, 118, -1, -1, 3, 4,
7033 5, -1, 7, -1, -1, -1, 11, 12, -1, -1,
7034 -1, 16, -1, 18, 19, 20, 21, 22, 23, 24,
7035 -1, -1, -1, -1, 147, 30, 31, 32, 33, 34,
7036 35, 36, 155, -1, 39, -1, -1, -1, -1, -1,
7037 -1, 46, -1, -1, 49, 50, 51, 52, 53, 54,
7038 55, 56, 57, -1, 59, 60, 61, 62, 63, 64,
7039 65, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7040 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7041 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7042 -1, -1, -1, -1, 99, -1, -1, 102, 103, 104,
7043 105, -1, -1, -1, -1, 110, 111, 112, 113, 114,
7044 115, 116, 117, 118, -1, -1, 3, 4, 5, -1,
7045 7, -1, -1, -1, 11, 12, -1, -1, -1, 16,
7046 -1, 18, 19, 20, 21, 22, 23, 24, -1, -1,
7047 -1, -1, 147, 30, 31, 32, 33, 34, 35, 36,
7048 155, -1, 39, -1, -1, -1, -1, -1, -1, 46,
7049 -1, -1, 49, 50, 51, 52, 53, 54, 55, 56,
7050 57, 58, 59, 60, 61, 62, 63, 64, 65, -1,
7051 -1, -1, -1, -1, -1, -1, -1, -1, -1, 76,
7052 77, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7053 -1, -1, -1, -1, 91, 92, -1, -1, -1, -1,
7054 -1, -1, 99, -1, -1, 102, 103, 104, 105, -1,
7055 107, 108, 109, 110, 111, 112, 113, 114, 115, 116,
7056 117, 118, -1, -1, -1, -1, -1, -1, -1, -1,
7057 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7058 -1, -1, -1, -1, -1, 3, 4, 5, -1, 7,
7059 147, 148, 149, 11, 12, -1, -1, 154, 16, -1,
7060 18, 19, 20, 21, 22, 23, 24, -1, -1, -1,
7061 -1, -1, 30, 31, 32, 33, 34, 35, 36, -1,
7062 -1, 39, -1, -1, -1, -1, -1, -1, 46, -1,
7063 -1, 49, 50, 51, 52, 53, 54, 55, 56, 57,
7064 -1, 59, 60, 61, 62, 63, 64, 65, -1, -1,
7065 -1, -1, -1, -1, -1, -1, -1, -1, 76, 77,
7066 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7067 -1, -1, -1, 91, 92, -1, -1, -1, -1, -1,
7068 -1, 99, -1, -1, 102, 103, 104, 105, -1, -1,
7069 -1, -1, 110, 111, 112, 113, 114, 115, 116, 117,
7070 118, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7071 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7072 -1, -1, 1, -1, 3, 4, 5, 6, 7, 147,
7073 148, 149, 11, 12, -1, -1, 154, 16, -1, 18,
7074 19, 20, 21, 22, 23, 24, -1, -1, -1, -1,
7075 -1, 30, 31, 32, 33, 34, 35, 36, -1, -1,
7076 39, -1, -1, -1, -1, -1, 45, 46, -1, 48,
7077 49, 50, 51, 52, 53, 54, 55, 56, 57, -1,
7078 59, 60, 61, 62, 63, 64, 65, -1, -1, -1,
7079 -1, -1, -1, -1, -1, -1, -1, 76, 77, -1,
7080 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7081 -1, -1, 91, 92, -1, -1, -1, -1, -1, -1,
7082 99, -1, -1, 102, 103, 104, 105, -1, 107, -1,
7083 -1, 110, 111, 112, 113, 114, 115, 116, 117, 118,
7084 -1, -1, 1, -1, 3, 4, 5, -1, 7, -1,
7085 -1, -1, 11, 12, -1, -1, -1, 16, -1, 18,
7086 19, 20, 21, 22, 23, 24, -1, -1, 147, 148,
7087 149, 30, 31, 32, 33, 34, 35, 36, -1, -1,
7088 39, -1, -1, -1, -1, -1, -1, 46, -1, -1,
7089 49, 50, 51, 52, 53, 54, 55, 56, 57, -1,
7090 59, 60, 61, 62, 63, 64, 65, -1, -1, -1,
7091 -1, -1, -1, -1, -1, -1, -1, 76, 77, -1,
7092 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7093 -1, -1, 91, 92, -1, -1, -1, -1, -1, -1,
7094 99, -1, -1, 102, 103, 104, 105, -1, -1, -1,
7095 -1, 110, 111, 112, 113, 114, 115, 116, 117, 118,
7096 -1, -1, -1, -1, 3, 4, 5, -1, 7, -1,
7097 -1, -1, 11, 12, -1, -1, -1, 16, -1, 18,
7098 19, 20, 21, 22, 23, 24, -1, -1, 147, 148,
7099 149, 30, 31, 32, 33, 34, 35, 36, -1, -1,
7100 39, -1, -1, -1, -1, -1, -1, 46, -1, -1,
7101 49, 50, 51, 52, 53, 54, 55, 56, 57, 58,
7102 59, 60, 61, 62, 63, 64, 65, -1, -1, -1,
7103 -1, -1, -1, -1, -1, -1, -1, 76, 77, -1,
7104 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7105 -1, -1, 91, 92, -1, -1, -1, -1, -1, -1,
7106 99, -1, -1, 102, 103, 104, 105, -1, 107, 108,
7107 109, 110, 111, 112, 113, 114, 115, 116, 117, 118,
7108 -1, -1, -1, -1, 3, 4, 5, -1, 7, -1,
7109 -1, -1, 11, 12, -1, -1, -1, 16, -1, 18,
7110 19, 20, 21, 22, 23, 24, -1, -1, 147, 148,
7111 149, 30, 31, 32, 33, 34, 35, 36, -1, -1,
7112 39, -1, -1, -1, -1, -1, -1, 46, -1, -1,
7113 49, 50, 51, 52, 53, 54, 55, 56, 57, 58,
7114 59, 60, 61, 62, 63, 64, 65, -1, -1, -1,
7115 -1, -1, -1, -1, -1, -1, -1, 76, 77, -1,
7116 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7117 -1, -1, 91, 92, -1, -1, -1, -1, -1, -1,
7118 99, -1, -1, 102, 103, 104, 105, -1, 107, 108,
7119 109, 110, 111, 112, 113, 114, 115, 116, 117, 118,
7120 -1, -1, -1, -1, 3, 4, 5, -1, 7, -1,
7121 -1, -1, 11, 12, -1, -1, -1, 16, -1, 18,
7122 19, 20, 21, 22, 23, 24, -1, -1, 147, 148,
7123 149, 30, 31, 32, 33, 34, 35, 36, -1, -1,
7124 39, -1, -1, -1, -1, -1, -1, 46, -1, -1,
7125 49, 50, 51, 52, 53, 54, 55, 56, 57, 58,
7126 59, 60, 61, 62, 63, 64, 65, -1, -1, -1,
7127 -1, -1, -1, -1, -1, -1, -1, 76, 77, -1,
7128 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7129 -1, -1, 91, 92, -1, -1, -1, -1, -1, -1,
7130 99, -1, -1, 102, 103, 104, 105, -1, 107, 108,
7131 109, 110, 111, 112, 113, 114, 115, 116, 117, 118,
7132 -1, -1, -1, -1, 3, 4, 5, -1, 7, -1,
7133 -1, -1, 11, 12, -1, -1, -1, 16, -1, 18,
7134 19, 20, 21, 22, 23, 24, -1, -1, 147, 148,
7135 149, 30, 31, 32, 33, 34, 35, 36, -1, -1,
7136 39, -1, -1, -1, -1, -1, -1, 46, -1, -1,
7137 49, 50, 51, 52, 53, 54, 55, 56, 57, 58,
7138 59, 60, 61, 62, 63, 64, 65, -1, -1, -1,
7139 -1, -1, -1, -1, -1, -1, -1, 76, 77, -1,
7140 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7141 -1, -1, 91, 92, -1, -1, -1, -1, -1, -1,
7142 99, -1, -1, 102, 103, 104, 105, -1, 107, 108,
7143 109, 110, 111, 112, 113, 114, 115, 116, 117, 118,
7144 -1, -1, -1, -1, 3, 4, 5, -1, 7, -1,
7145 -1, -1, 11, 12, -1, -1, -1, 16, -1, 18,
7146 19, 20, 21, 22, 23, 24, -1, -1, 147, 148,
7147 149, 30, 31, 32, 33, 34, 35, 36, -1, -1,
7148 39, -1, -1, -1, -1, -1, -1, 46, -1, -1,
7149 49, 50, 51, 52, 53, 54, 55, 56, 57, 58,
7150 59, 60, 61, 62, 63, 64, 65, -1, -1, -1,
7151 -1, -1, -1, -1, -1, -1, -1, 76, 77, -1,
7152 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7153 -1, -1, 91, 92, -1, -1, -1, -1, -1, -1,
7154 99, -1, -1, 102, 103, 104, 105, -1, 107, 108,
7155 -1, 110, 111, 112, 113, 114, 115, 116, 117, 118,
7156 -1, -1, -1, -1, 3, 4, 5, -1, 7, -1,
7157 -1, -1, 11, 12, -1, -1, -1, 16, -1, 18,
7158 19, 20, 21, 22, 23, 24, -1, -1, 147, 148,
7159 149, 30, 31, 32, 33, 34, 35, 36, -1, -1,
7160 39, -1, -1, -1, -1, -1, -1, 46, -1, -1,
7161 49, 50, 51, 52, 53, 54, 55, 56, 57, 58,
7162 59, 60, 61, 62, 63, 64, 65, -1, -1, -1,
7163 -1, -1, -1, -1, -1, -1, -1, 76, 77, -1,
7164 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7165 -1, -1, 91, 92, -1, -1, -1, -1, -1, -1,
7166 99, -1, -1, 102, 103, 104, 105, -1, -1, 108,
7167 109, 110, 111, 112, 113, 114, 115, 116, 117, 118,
7168 -1, -1, -1, -1, 3, 4, 5, -1, 7, -1,
7169 -1, -1, 11, 12, -1, -1, -1, 16, -1, 18,
7170 19, 20, 21, 22, 23, 24, -1, -1, 147, 148,
7171 149, 30, 31, 32, 33, 34, 35, 36, -1, -1,
7172 39, -1, -1, -1, -1, -1, -1, 46, -1, -1,
7173 49, 50, 51, 52, 53, 54, 55, 56, 57, 58,
7174 59, 60, 61, 62, 63, 64, 65, -1, -1, -1,
7175 -1, -1, -1, -1, -1, -1, -1, 76, 77, -1,
7176 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7177 -1, -1, 91, 92, -1, -1, -1, -1, -1, -1,
7178 99, -1, -1, 102, 103, 104, 105, -1, -1, 108,
7179 -1, 110, 111, 112, 113, 114, 115, 116, 117, 118,
7180 -1, -1, -1, -1, 3, 4, 5, -1, 7, -1,
7181 -1, -1, 11, 12, -1, -1, -1, 16, -1, 18,
7182 19, 20, 21, 22, 23, 24, -1, -1, 147, 148,
7183 149, 30, 31, 32, 33, 34, 35, 36, -1, -1,
7184 39, -1, -1, -1, -1, -1, -1, 46, -1, -1,
7185 49, 50, 51, 52, 53, 54, 55, 56, 57, -1,
7186 59, 60, 61, 62, 63, 64, 65, -1, -1, -1,
7187 -1, -1, -1, -1, -1, -1, -1, 76, 77, -1,
7188 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7189 -1, -1, 91, 92, -1, -1, -1, -1, -1, -1,
7190 99, -1, -1, 102, 103, 104, 105, -1, 107, -1,
7191 -1, 110, 111, 112, 113, 114, 115, 116, 117, 118,
7192 -1, -1, -1, -1, 3, 4, 5, -1, 7, -1,
7193 -1, -1, 11, 12, -1, -1, -1, 16, -1, 18,
7194 19, 20, 21, 22, 23, 24, -1, -1, 147, 148,
7195 149, 30, 31, 32, 33, 34, 35, 36, -1, -1,
7196 39, -1, -1, -1, -1, -1, -1, 46, -1, -1,
7197 49, 50, 51, 52, 53, 54, 55, 56, 57, -1,
7198 59, 60, 61, 62, 63, 64, 65, -1, -1, -1,
7199 -1, -1, -1, -1, -1, -1, -1, 76, 77, -1,
7200 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7201 -1, -1, 91, 92, -1, -1, -1, -1, -1, -1,
7202 99, -1, -1, 102, 103, 104, 105, -1, 107, -1,
7203 -1, 110, 111, 112, 113, 114, 115, 116, 117, 118,
7204 -1, -1, -1, -1, 3, 4, 5, -1, 7, -1,
7205 -1, -1, 11, 12, -1, -1, -1, 16, -1, 18,
7206 19, 20, 21, 22, 23, 24, -1, -1, 147, 148,
7207 149, 30, 31, 32, 33, 34, 35, 36, -1, -1,
7208 39, -1, -1, -1, -1, -1, -1, 46, -1, -1,
7209 49, 50, 51, 52, 53, 54, 55, 56, 57, -1,
7210 59, 60, 61, 62, 63, 64, 65, -1, -1, -1,
7211 -1, -1, -1, -1, -1, -1, -1, 76, 77, -1,
7212 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7213 -1, -1, 91, 92, -1, -1, -1, -1, -1, -1,
7214 99, -1, -1, 102, 103, 104, 105, -1, 107, -1,
7215 -1, 110, 111, 112, 113, 114, 115, 116, 117, 118,
7216 -1, -1, -1, -1, 3, 4, 5, -1, 7, -1,
7217 -1, -1, 11, 12, -1, -1, -1, 16, -1, 18,
7218 19, 20, 21, 22, 23, 24, -1, -1, 147, 148,
7219 149, 30, 31, 32, 33, 34, 35, 36, -1, -1,
7220 39, -1, -1, -1, -1, -1, -1, 46, -1, -1,
7221 49, 50, 51, 52, 53, 54, 55, 56, 57, -1,
7222 59, 60, 61, 62, 63, 64, 65, -1, -1, -1,
7223 -1, -1, -1, -1, -1, -1, -1, 76, 77, -1,
7224 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7225 -1, -1, 91, 92, -1, -1, -1, -1, -1, -1,
7226 99, -1, -1, 102, 103, 104, 105, -1, 107, -1,
7227 -1, 110, 111, 112, 113, 114, 115, 116, 117, 118,
7228 -1, -1, -1, -1, 3, 4, 5, -1, 7, -1,
7229 -1, -1, 11, 12, -1, -1, -1, 16, -1, 18,
7230 19, 20, 21, 22, 23, 24, -1, -1, 147, 148,
7231 149, 30, 31, 32, 33, 34, 35, 36, -1, -1,
7232 39, -1, -1, -1, -1, -1, -1, 46, -1, -1,
7233 49, 50, 51, 52, 53, 54, 55, 56, 57, -1,
7234 59, 60, 61, 62, 63, 64, 65, -1, -1, -1,
7235 -1, -1, -1, -1, -1, -1, -1, 76, 77, -1,
7236 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7237 -1, -1, 91, 92, -1, -1, -1, -1, -1, -1,
7238 99, -1, -1, 102, 103, 104, 105, -1, 107, -1,
7239 -1, 110, 111, 112, 113, 114, 115, 116, 117, 118,
7240 -1, -1, -1, -1, 3, 4, 5, -1, 7, -1,
7241 -1, -1, 11, 12, -1, -1, -1, 16, -1, 18,
7242 19, 20, 21, 22, 23, 24, -1, -1, 147, 148,
7243 149, 30, 31, 32, 33, 34, 35, 36, -1, -1,
7244 39, -1, -1, -1, -1, -1, -1, 46, -1, -1,
7245 49, 50, 51, 52, 53, 54, 55, 56, 57, -1,
7246 59, 60, 61, 62, 63, 64, 65, -1, -1, -1,
7247 -1, -1, -1, -1, -1, -1, -1, 76, 77, -1,
7248 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7249 -1, -1, 91, 92, -1, -1, -1, -1, -1, -1,
7250 99, -1, -1, 102, 103, 104, 105, -1, 107, -1,
7251 -1, 110, 111, 112, 113, 114, 115, 116, 117, 118,
7252 -1, -1, -1, -1, 3, 4, 5, -1, 7, -1,
7253 -1, -1, 11, 12, -1, -1, -1, 16, -1, 18,
7254 19, 20, 21, 22, 23, 24, -1, -1, 147, 148,
7255 149, 30, 31, 32, 33, 34, 35, 36, -1, -1,
7256 39, -1, -1, -1, -1, -1, -1, 46, -1, -1,
7257 49, 50, 51, 52, 53, 54, 55, 56, 57, -1,
7258 59, 60, 61, 62, 63, 64, 65, -1, -1, -1,
7259 -1, -1, -1, -1, -1, -1, -1, 76, 77, -1,
7260 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7261 -1, -1, 91, 92, -1, -1, -1, -1, -1, -1,
7262 99, -1, -1, 102, 103, 104, 105, -1, -1, -1,
7263 -1, 110, 111, 112, 113, 114, 115, 116, 117, 118,
7264 -1, -1, -1, -1, 3, 4, 5, -1, 7, -1,
7265 -1, -1, 11, 12, -1, -1, -1, 16, -1, 18,
7266 19, 20, 21, 22, 23, 24, -1, -1, 147, 148,
7267 149, 30, 31, 32, 33, 34, 35, 36, -1, -1,
7268 39, -1, -1, -1, -1, -1, -1, 46, -1, -1,
7269 49, 50, 51, 52, 53, 54, 55, 56, 57, -1,
7270 59, 60, 61, 62, 63, 64, 65, -1, -1, -1,
7271 -1, -1, -1, -1, -1, -1, -1, 76, 77, -1,
7272 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7273 -1, -1, 91, 92, -1, -1, -1, -1, -1, -1,
7274 99, -1, -1, 102, 103, 104, 105, -1, -1, -1,
7275 -1, 110, 111, 112, 113, 114, 115, 116, 117, 118,
7276 -1, -1, -1, -1, 3, 4, 5, -1, 7, -1,
7277 -1, -1, 11, 12, -1, -1, -1, 16, -1, 18,
7278 19, 20, 21, 22, 23, 24, -1, -1, 147, 148,
7279 149, 30, 31, 32, 33, 34, 35, 36, -1, -1,
7280 39, -1, -1, -1, -1, -1, -1, 46, -1, -1,
7281 49, 50, 51, 52, 53, 54, 55, 56, 57, -1,
7282 59, 60, 61, 62, 63, 64, 65, -1, -1, -1,
7283 -1, -1, -1, -1, -1, -1, -1, 76, 77, -1,
7284 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7285 -1, -1, 91, 92, -1, -1, -1, -1, -1, -1,
7286 99, -1, -1, 102, 103, 104, 105, -1, -1, -1,
7287 -1, 110, 111, 112, 113, 114, 115, 116, 117, 118,
7288 -1, -1, -1, -1, 3, 4, 5, -1, 7, -1,
7289 -1, -1, 11, 12, -1, -1, -1, 16, -1, 18,
7290 19, 20, 21, 22, 23, 24, -1, -1, 147, 148,
7291 149, 30, 31, 32, 33, 34, 35, 36, -1, -1,
7292 39, -1, -1, -1, -1, -1, -1, 46, -1, -1,
7293 49, 50, 51, 52, 53, 54, 55, 56, 57, -1,
7294 59, 60, 61, 62, 63, 64, 65, -1, -1, -1,
7295 -1, -1, -1, -1, -1, -1, -1, 76, 77, -1,
7296 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7297 -1, -1, 91, 92, -1, -1, -1, -1, -1, -1,
7298 99, -1, -1, 102, 103, 104, 105, -1, -1, -1,
7299 -1, 110, 111, 112, 113, 114, 115, 116, 117, 118,
7300 -1, -1, -1, -1, 3, 4, 5, -1, 7, -1,
7301 -1, -1, 11, 12, -1, -1, -1, 16, -1, 18,
7302 19, 20, 21, 22, 23, 24, -1, -1, 147, 148,
7303 149, 30, 31, 32, 33, 34, 35, 36, -1, -1,
7304 39, -1, -1, -1, -1, -1, -1, 46, -1, -1,
7305 49, 50, 51, 52, 53, 54, 55, 56, 57, -1,
7306 59, 60, 61, 62, 63, 64, 65, -1, -1, -1,
7307 -1, -1, -1, -1, -1, -1, -1, 76, 77, -1,
7308 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7309 -1, -1, 91, 92, -1, -1, -1, -1, -1, -1,
7310 99, -1, -1, 102, 103, 104, 105, -1, -1, -1,
7311 -1, 110, 111, 112, 113, 114, 115, 116, 117, 118,
7312 -1, -1, -1, -1, 3, 4, 5, -1, 7, -1,
7313 -1, -1, 11, 12, -1, -1, -1, 16, -1, 18,
7314 19, 20, 21, 22, 23, 24, -1, -1, 147, 148,
7315 149, 30, 31, 32, 33, 34, 35, 36, -1, -1,
7316 39, -1, -1, -1, -1, -1, -1, 46, -1, -1,
7317 49, 50, 51, 52, 53, 54, 55, 56, 57, -1,
7318 59, 60, 61, 62, 63, 64, 65, -1, -1, -1,
7319 -1, -1, -1, -1, -1, -1, -1, 76, 77, -1,
7320 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7321 -1, -1, 91, 92, -1, -1, -1, -1, -1, -1,
7322 99, -1, -1, 102, 103, 104, 105, -1, -1, -1,
7323 -1, 110, 111, 112, 113, 114, 115, 116, 117, 118,
7324 -1, -1, -1, -1, 3, 4, 5, -1, 7, -1,
7325 -1, -1, 11, 12, -1, -1, -1, 16, -1, 18,
7326 19, 20, 21, 22, 23, 24, -1, -1, 147, 148,
7327 149, 30, 31, 32, 33, 34, 35, 36, -1, -1,
7328 39, -1, -1, -1, -1, -1, -1, 46, -1, -1,
7329 49, 50, 51, 52, 53, 54, 55, 56, 57, -1,
7330 59, 60, 61, 62, 63, 64, 65, -1, -1, -1,
7331 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7332 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7333 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7334 99, -1, -1, 102, 103, 104, 105, -1, 107, -1,
7335 -1, 110, 111, 112, 113, 114, 115, 116, 117, 118,
7336 -1, -1, 3, 4, 5, -1, 7, -1, -1, -1,
7337 11, 12, -1, -1, -1, 16, -1, 18, 19, 20,
7338 21, 22, 23, 24, -1, -1, -1, -1, 147, 30,
7339 31, 32, 33, 34, 35, 36, -1, -1, 39, -1,
7340 -1, -1, -1, -1, -1, 46, -1, -1, 49, 50,
7341 51, 52, 53, 54, 55, 56, 57, -1, 59, 60,
7342 61, 62, 63, 64, 65, -1, -1, -1, -1, -1,
7343 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7344 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7345 -1, -1, -1, -1, -1, -1, -1, -1, 99, -1,
7346 -1, 102, 103, 104, 105, -1, 107, -1, -1, 110,
7347 111, 112, 113, 114, 115, 116, 117, 118, -1, -1,
7348 3, 4, 5, -1, 7, -1, -1, -1, 11, 12,
7349 -1, -1, -1, 16, -1, 18, 19, 20, 21, 22,
7350 23, 24, -1, -1, -1, -1, 147, 30, 31, 32,
7351 33, 34, 35, 36, -1, -1, 39, -1, -1, -1,
7352 -1, -1, -1, 46, -1, -1, 49, 50, 51, 52,
7353 53, 54, 55, 56, 57, -1, 59, 60, 61, 62,
7354 63, 64, 65, -1, -1, -1, -1, -1, -1, -1,
7355 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7356 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7357 -1, -1, 95, -1, -1, -1, 99, -1, -1, 102,
7358 103, 104, 105, -1, -1, -1, -1, 110, 111, 112,
7359 113, 114, 115, 116, 117, 118, -1, -1, 3, 4,
7360 5, -1, 7, -1, -1, -1, 11, 12, -1, -1,
7361 -1, 16, -1, 18, 19, 20, 21, 22, 23, 24,
7362 -1, -1, -1, -1, 147, 30, 31, 32, 33, 34,
7363 35, 36, -1, -1, 39, -1, -1, -1, -1, -1,
7364 -1, 46, -1, -1, 49, 50, 51, 52, 53, 54,
7365 55, 56, 57, -1, 59, 60, 61, 62, 63, 64,
7366 65, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7367 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7368 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7369 -1, -1, -1, -1, 99, -1, -1, 102, 103, 104,
7370 105, -1, -1, -1, -1, 110, 111, 112, 113, 114,
7371 115, 116, 117, 118, -1, -1, 3, 4, 5, -1,
7372 7, -1, -1, -1, 11, 12, -1, -1, -1, 16,
7373 -1, 18, 19, 20, 21, 22, 23, 24, -1, -1,
7374 -1, -1, 147, 30, 31, 32, 33, 34, 35, 36,
7375 -1, -1, 39, -1, -1, -1, -1, -1, -1, 46,
7376 -1, -1, 49, 50, 51, 52, 53, 54, 55, 56,
7377 57, -1, 59, 60, 61, 62, 63, 64, 65, -1,
7378 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7379 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7380 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7381 -1, -1, 99, -1, -1, 102, 103, 104, 105, -1,
7382 -1, -1, -1, 110, 111, 112, 113, 114, 115, 116,
7383 117, 118, -1, -1, 3, 4, 5, -1, 7, -1,
7384 -1, -1, 11, 12, -1, -1, -1, 16, -1, 18,
7385 19, 20, 21, 22, 23, 24, -1, -1, -1, -1,
7386 147, 30, 31, 32, 33, 34, 35, 36, -1, -1,
7387 39, -1, -1, -1, -1, -1, -1, 46, -1, -1,
7388 49, 50, 51, 52, 53, 54, 55, 56, 57, -1,
7389 59, 60, 61, 62, 63, 64, 65, -1, -1, -1,
7390 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7391 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7392 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7393 99, -1, -1, 102, 103, 104, 105, -1, -1, -1,
7394 -1, 110, 111, 112, 113, 114, 115, 116, 117, 118,
7395 -1, -1, 3, 4, 5, -1, 7, -1, -1, -1,
7396 11, 12, -1, -1, -1, 16, -1, 18, 19, 20,
7397 21, 22, 23, 24, -1, -1, -1, -1, 147, 30,
7398 31, 32, 33, 34, 35, 36, -1, -1, 39, -1,
7399 -1, -1, -1, -1, -1, 46, -1, -1, 49, 50,
7400 51, 52, 53, 54, 55, 56, 57, -1, 59, 60,
7401 61, 62, 63, 64, 65, -1, -1, -1, -1, -1,
7402 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7403 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7404 -1, -1, -1, -1, -1, 52, 53, -1, 99, 56,
7405 -1, 102, 103, 104, 105, -1, -1, -1, -1, 110,
7406 111, 112, 113, 114, 115, 116, 117, 118, -1, 76,
7407 77, 78, 79, 80, 81, 82, 83, 84, -1, -1,
7408 87, 88, -1, -1, -1, -1, 93, 94, 95, 96,
7409 -1, -1, -1, -1, -1, -1, 147, -1, -1, -1,
7410 107, 108, -1, -1, -1, -1, -1, -1, -1, -1,
7411 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7412 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7413 137, 138, 139, 140, 141, 142, 143, 144, 145, 146,
7414 -1, 148, 149, 52, 53, -1, -1, 56, -1, 156,
7415 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7416 -1, -1, -1, -1, -1, -1, -1, 76, 77, 78,
7417 79, 80, 81, 82, 83, 84, -1, -1, 87, 88,
7418 -1, -1, -1, -1, 93, 94, 95, 96, -1, -1,
7419 -1, -1, -1, -1, -1, -1, -1, -1, 107, 108,
7420 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7421 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7422 -1, -1, -1, -1, -1, -1, -1, -1, 137, 138,
7423 139, 140, 141, 142, 143, 144, 145, 146, -1, 148,
7424 149, 52, 53, -1, -1, 56, -1, 156, -1, -1,
7425 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7426 -1, -1, -1, -1, -1, 76, 77, 78, 79, 80,
7427 81, 82, 83, 84, -1, -1, 87, 88, -1, -1,
7428 -1, -1, 93, 94, 95, 96, -1, -1, -1, -1,
7429 -1, -1, -1, -1, -1, -1, 107, 108, -1, -1,
7430 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7431 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7432 -1, -1, -1, -1, -1, -1, 137, 138, 139, 140,
7433 141, 142, 143, 144, 145, 146, -1, 148, 149, 52,
7434 53, -1, -1, 56, -1, 156, -1, -1, -1, -1,
7435 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7436 -1, -1, -1, 76, 77, 78, 79, 80, 81, 82,
7437 83, 84, -1, -1, 87, 88, -1, -1, -1, -1,
7438 93, 94, 95, 96, -1, -1, -1, -1, -1, -1,
7439 -1, -1, -1, -1, 107, 108, -1, -1, -1, -1,
7440 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7441 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7442 -1, -1, -1, -1, 137, 138, 139, 140, 141, 142,
7443 143, 144, 145, 146, -1, 148, 149, 52, 53, -1,
7444 -1, 56, -1, 156, -1, -1, -1, -1, -1, -1,
7445 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7446 -1, 76, 77, 78, 79, 80, 81, 82, 83, 84,
7447 -1, -1, 87, 88, -1, -1, -1, -1, 93, 94,
7448 95, 96, -1, -1, -1, -1, -1, -1, -1, -1,
7449 -1, -1, 107, 108, -1, -1, -1, -1, -1, -1,
7450 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7451 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7452 -1, -1, 137, 138, 139, 140, 141, 142, 143, 144,
7453 145, 146, -1, 148, 149, 52, 53, -1, -1, 56,
7454 -1, 156, -1, -1, -1, -1, -1, -1, -1, -1,
7455 -1, -1, -1, -1, -1, -1, -1, -1, -1, 76,
7456 77, 78, 79, 80, 81, 82, 83, 84, -1, -1,
7457 87, 88, -1, -1, -1, -1, 93, 94, 95, 96,
7458 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7459 107, 108, -1, -1, -1, -1, -1, -1, -1, -1,
7460 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7461 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7462 137, 138, 139, 140, 141, 142, 143, 144, 145, 146,
7463 -1, 148, 149, 52, 53, -1, -1, 56, -1, 156,
7464 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7465 -1, -1, -1, -1, -1, -1, -1, 76, 77, 78,
7466 79, 80, 81, 82, 83, 84, -1, -1, 87, 88,
7467 -1, -1, -1, -1, 93, 94, 95, 96, -1, -1,
7468 -1, -1, -1, -1, -1, -1, -1, -1, 107, 108,
7469 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7470 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7471 -1, -1, -1, -1, -1, -1, -1, -1, 137, 138,
7472 139, 140, 141, 142, 143, 144, 145, 146, -1, 148,
7473 149, 52, 53, -1, -1, 56, -1, 156, -1, -1,
7474 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7475 -1, -1, -1, -1, -1, 76, 77, 78, 79, 80,
7476 81, 82, 83, 84, -1, -1, 87, 88, -1, -1,
7477 -1, -1, 93, 94, 95, 96, -1, -1, -1, -1,
7478 -1, -1, -1, -1, -1, -1, 107, 108, -1, -1,
7479 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7480 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7481 -1, -1, -1, -1, -1, -1, 137, 138, 139, 140,
7482 141, 142, 143, 144, 145, 146, -1, 148, 149, 52,
7483 53, -1, -1, 56, -1, 156, -1, -1, -1, -1,
7484 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7485 -1, -1, -1, 76, 77, 78, 79, 80, 81, 82,
7486 83, 84, -1, -1, 87, 88, -1, -1, -1, -1,
7487 93, 94, 95, 96, -1, -1, -1, -1, -1, -1,
7488 -1, -1, -1, -1, 107, 108, -1, -1, -1, -1,
7489 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7490 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7491 -1, -1, -1, -1, 137, 138, 139, 140, 141, 142,
7492 143, 144, 145, 146, -1, 148, 149, 52, 53, -1,
7493 -1, 56, -1, 156, -1, -1, -1, -1, -1, -1,
7494 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7495 -1, 76, 77, 78, 79, 80, 81, 82, 83, 84,
7496 -1, -1, 87, 88, -1, -1, -1, -1, 93, 94,
7497 95, 96, -1, -1, -1, -1, -1, -1, -1, -1,
7498 -1, -1, 107, 108, -1, -1, -1, -1, -1, -1,
7499 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7500 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7501 -1, -1, 137, 138, 139, 140, 141, 142, 143, 144,
7502 145, 146, -1, 148, 149, 52, 53, -1, -1, 56,
7503 -1, 156, -1, -1, -1, -1, -1, -1, -1, -1,
7504 -1, -1, -1, -1, -1, -1, -1, -1, -1, 76,
7505 77, 78, 79, 80, 81, 82, 83, 84, -1, -1,
7506 87, 88, -1, -1, -1, -1, 93, 94, 95, 96,
7507 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7508 107, 108, -1, -1, -1, -1, -1, -1, -1, -1,
7509 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7510 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7511 137, 138, 139, 140, 141, 142, 143, 144, 145, 146,
7512 -1, 148, 149, 52, 53, -1, -1, 56, -1, 156,
7513 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7514 -1, -1, -1, -1, -1, -1, -1, 76, 77, 78,
7515 79, 80, 81, 82, 83, 84, -1, -1, 87, 88,
7516 -1, -1, -1, -1, 93, 94, 95, 96, -1, -1,
7517 -1, -1, -1, -1, -1, -1, -1, -1, 107, 108,
7518 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7519 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7520 -1, -1, -1, -1, -1, -1, -1, -1, 137, 138,
7521 139, 140, 141, 142, 143, 144, 145, 146, -1, 148,
7522 149, 52, 53, -1, -1, 56, -1, 156, -1, -1,
7523 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7524 -1, -1, -1, -1, -1, 76, 77, 78, 79, 80,
7525 81, 82, 83, 84, -1, -1, 87, 88, -1, -1,
7526 -1, -1, 93, 94, 95, 96, -1, -1, -1, -1,
7527 -1, -1, -1, -1, -1, -1, 107, 108, -1, -1,
7528 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7529 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7530 -1, -1, -1, -1, -1, -1, 137, 138, 139, 140,
7531 141, 142, 143, 144, 145, 146, -1, 148, 149, 52,
7532 53, -1, -1, 56, -1, 156, -1, -1, -1, -1,
7533 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7534 -1, -1, -1, 76, 77, 78, 79, 80, 81, 82,
7535 83, 84, -1, -1, 87, 88, -1, -1, -1, -1,
7536 93, 94, 95, 96, -1, -1, -1, -1, -1, -1,
7537 -1, -1, -1, -1, 107, 108, -1, -1, -1, -1,
7538 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7539 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7540 -1, -1, -1, -1, 137, 138, 139, 140, 141, 142,
7541 143, 144, 145, 146, -1, 148, 149, -1, -1, -1,
7542 -1, -1, -1, 156
7543};
7544
7545/* YYSTOS[STATE-NUM] -- The symbol kind of the accessing symbol of
7546 state STATE-NUM. */
7547static const yytype_int16 yystos[] =
7548{
7549 0, 165, 166, 1, 3, 4, 5, 6, 7, 11,
7550 12, 16, 18, 19, 20, 21, 22, 23, 24, 30,
7551 31, 32, 33, 34, 35, 36, 39, 45, 46, 47,
7552 48, 49, 50, 51, 52, 53, 54, 55, 56, 57,
7553 59, 60, 61, 62, 63, 64, 65, 76, 77, 91,
7554 92, 99, 102, 103, 104, 105, 107, 110, 111, 112,
7555 113, 114, 115, 116, 117, 118, 147, 148, 149, 164,
7556 167, 168, 180, 182, 183, 184, 185, 186, 187, 191,
7557 195, 197, 203, 206, 208, 209, 210, 212, 214, 215,
7558 216, 217, 226, 227, 228, 229, 230, 231, 234, 255,
7559 267, 268, 269, 270, 271, 272, 273, 274, 275, 276,
7560 277, 278, 287, 288, 324, 329, 330, 380, 381, 382,
7561 383, 384, 385, 387, 388, 391, 392, 394, 395, 396,
7562 397, 410, 411, 413, 414, 415, 416, 417, 418, 419,
7563 420, 421, 482, 0, 3, 4, 5, 6, 7, 8,
7564 9, 10, 11, 12, 13, 14, 15, 16, 17, 18,
7565 19, 20, 21, 22, 23, 24, 25, 26, 30, 31,
7566 32, 33, 34, 35, 36, 37, 38, 39, 45, 46,
7567 47, 48, 49, 50, 51, 52, 53, 56, 76, 77,
7568 78, 79, 80, 81, 82, 83, 84, 87, 88, 93,
7569 94, 95, 96, 107, 108, 137, 138, 139, 140, 141,
7570 142, 143, 144, 145, 146, 148, 149, 156, 220, 221,
7571 222, 224, 225, 410, 179, 179, 179, 39, 58, 99,
7572 102, 107, 108, 109, 112, 148, 187, 209, 217, 227,
7573 238, 239, 245, 246, 249, 251, 252, 268, 417, 418,
7574 420, 421, 469, 470, 246, 157, 242, 247, 248, 154,
7575 157, 189, 54, 221, 189, 151, 169, 170, 235, 482,
7576 21, 22, 32, 195, 197, 208, 227, 268, 287, 288,
7577 227, 227, 227, 56, 47, 102, 171, 176, 177, 182,
7578 211, 212, 482, 171, 240, 251, 469, 482, 239, 468,
7579 469, 482, 46, 99, 147, 155, 195, 197, 216, 255,
7580 268, 417, 418, 421, 322, 220, 400, 412, 416, 400,
7581 401, 402, 161, 386, 386, 386, 386, 415, 203, 227,
7582 227, 154, 160, 163, 480, 481, 169, 40, 41, 42,
7583 43, 44, 37, 38, 157, 424, 425, 426, 427, 428,
7584 424, 427, 26, 151, 242, 248, 279, 331, 28, 280,
7585 328, 134, 155, 102, 107, 214, 134, 25, 78, 79,
7586 80, 81, 82, 83, 84, 85, 86, 87, 88, 89,
7587 90, 95, 96, 101, 135, 137, 138, 139, 140, 141,
7588 142, 143, 144, 145, 146, 233, 233, 69, 97, 98,
7589 153, 474, 475, 256, 1, 191, 198, 199, 199, 200,
7590 202, 202, 163, 199, 481, 99, 210, 217, 268, 293,
7591 417, 418, 421, 52, 56, 95, 99, 218, 219, 268,
7592 417, 418, 421, 219, 33, 34, 35, 36, 49, 50,
7593 51, 52, 56, 157, 194, 220, 419, 464, 465, 466,
7594 246, 157, 248, 98, 474, 475, 331, 383, 100, 100,
7595 155, 239, 56, 239, 239, 239, 400, 134, 101, 155,
7596 250, 482, 98, 153, 474, 100, 100, 155, 250, 92,
7597 244, 246, 251, 448, 469, 482, 246, 189, 191, 476,
7598 191, 54, 64, 65, 181, 157, 235, 236, 164, 424,
7599 424, 98, 474, 100, 178, 211, 158, 163, 481, 476,
7600 257, 159, 155, 189, 479, 155, 479, 152, 479, 189,
7601 56, 415, 213, 214, 426, 155, 98, 153, 474, 319,
7602 66, 119, 121, 122, 403, 119, 119, 403, 67, 403,
7603 161, 389, 398, 393, 399, 78, 160, 168, 171, 199,
7604 199, 199, 199, 235, 237, 191, 191, 52, 54, 55,
7605 56, 57, 58, 78, 92, 102, 107, 108, 109, 141,
7606 144, 298, 367, 425, 429, 430, 432, 433, 436, 437,
7607 439, 440, 441, 442, 448, 449, 450, 451, 452, 453,
7608 454, 455, 456, 457, 458, 459, 460, 461, 134, 265,
7609 442, 134, 266, 332, 333, 106, 207, 334, 335, 335,
7610 235, 211, 155, 216, 155, 235, 193, 227, 227, 227,
7611 227, 227, 227, 227, 227, 227, 227, 227, 227, 227,
7612 192, 227, 227, 227, 227, 227, 227, 227, 227, 227,
7613 227, 227, 52, 53, 56, 224, 471, 472, 244, 251,
7614 52, 53, 56, 224, 471, 242, 171, 174, 13, 289,
7615 480, 289, 199, 171, 171, 259, 163, 56, 98, 153,
7616 474, 25, 199, 52, 56, 218, 138, 423, 482, 98,
7617 153, 474, 264, 467, 69, 98, 473, 246, 476, 52,
7618 56, 242, 471, 235, 235, 223, 100, 124, 235, 239,
7619 239, 249, 252, 469, 52, 56, 244, 52, 56, 235,
7620 235, 470, 476, 155, 476, 155, 158, 476, 221, 236,
7621 227, 152, 134, 134, 56, 471, 471, 235, 170, 476,
7622 177, 158, 469, 155, 213, 52, 56, 244, 52, 56,
7623 320, 405, 404, 119, 390, 403, 66, 119, 119, 390,
7624 66, 119, 227, 152, 182, 102, 107, 294, 295, 296,
7625 297, 450, 155, 431, 462, 463, 155, 431, 155, 438,
7626 463, 476, 299, 300, 155, 438, 239, 34, 52, 52,
7627 155, 438, 34, 52, 39, 188, 209, 227, 232, 174,
7628 480, 188, 232, 174, 319, 152, 333, 319, 10, 68,
7629 286, 286, 107, 203, 204, 205, 239, 251, 253, 254,
7630 476, 213, 155, 99, 185, 190, 205, 217, 227, 239,
7631 241, 254, 268, 421, 341, 341, 189, 100, 100, 151,
7632 242, 248, 189, 477, 155, 100, 100, 242, 243, 248,
7633 482, 235, 286, 171, 13, 171, 27, 290, 480, 286,
7634 286, 17, 283, 337, 25, 258, 343, 52, 56, 244,
7635 52, 56, 260, 263, 422, 262, 52, 56, 218, 244,
7636 174, 191, 196, 476, 243, 248, 190, 227, 241, 190,
7637 241, 221, 235, 239, 250, 100, 100, 477, 100, 100,
7638 448, 469, 191, 39, 190, 241, 479, 214, 477, 321,
7639 406, 409, 416, 421, 386, 403, 386, 386, 386, 296,
7640 450, 155, 476, 155, 461, 429, 455, 457, 433, 436,
7641 453, 459, 134, 239, 437, 452, 459, 451, 453, 189,
7642 44, 44, 286, 286, 320, 152, 320, 239, 155, 44,
7643 213, 56, 44, 134, 44, 98, 153, 474, 339, 339,
7644 136, 235, 235, 333, 207, 159, 100, 235, 235, 207,
7645 8, 281, 376, 482, 14, 15, 284, 285, 291, 292,
7646 482, 292, 201, 107, 239, 336, 286, 341, 337, 286,
7647 477, 199, 480, 199, 174, 477, 286, 476, 194, 331,
7648 328, 235, 235, 100, 235, 235, 476, 155, 476, 189,
7649 179, 407, 476, 294, 297, 295, 431, 155, 438, 155,
7650 438, 155, 438, 155, 438, 438, 188, 232, 237, 237,
7651 321, 321, 107, 239, 237, 237, 235, 237, 52, 56,
7652 244, 52, 56, 340, 340, 227, 190, 241, 190, 241,
7653 152, 235, 190, 241, 190, 241, 239, 254, 377, 482,
7654 175, 284, 171, 199, 286, 286, 239, 155, 289, 339,
7655 286, 290, 174, 480, 286, 235, 157, 298, 325, 425,
7656 430, 434, 435, 437, 444, 445, 446, 447, 448, 453,
7657 459, 461, 171, 155, 155, 453, 453, 459, 453, 227,
7658 227, 179, 179, 239, 182, 182, 227, 477, 52, 56,
7659 58, 91, 92, 99, 102, 104, 105, 107, 112, 140,
7660 324, 346, 347, 348, 350, 353, 357, 358, 359, 362,
7661 363, 364, 365, 366, 367, 368, 369, 370, 371, 372,
7662 373, 374, 375, 380, 381, 384, 385, 388, 392, 395,
7663 397, 418, 455, 346, 190, 241, 101, 378, 482, 9,
7664 282, 379, 482, 172, 289, 107, 239, 171, 340, 261,
7665 286, 447, 155, 303, 482, 323, 155, 303, 155, 443,
7666 482, 155, 443, 155, 443, 0, 120, 408, 295, 438,
7667 438, 155, 438, 438, 139, 313, 314, 482, 313, 371,
7668 371, 56, 218, 340, 347, 355, 356, 357, 358, 361,
7669 477, 189, 340, 478, 52, 400, 52, 102, 416, 101,
7670 155, 139, 155, 155, 347, 89, 90, 98, 153, 157,
7671 351, 352, 52, 99, 217, 268, 417, 418, 421, 289,
7672 176, 171, 171, 239, 292, 337, 338, 345, 346, 171,
7673 189, 316, 461, 29, 123, 326, 457, 435, 453, 459,
7674 437, 459, 453, 453, 298, 301, 302, 304, 305, 307,
7675 308, 310, 311, 312, 315, 451, 453, 454, 459, 461,
7676 171, 174, 347, 477, 347, 359, 361, 477, 155, 152,
7677 235, 124, 199, 372, 355, 359, 349, 360, 361, 112,
7678 364, 368, 371, 371, 218, 340, 477, 340, 476, 355,
7679 358, 362, 355, 358, 362, 56, 98, 153, 474, 171,
7680 163, 173, 291, 289, 40, 41, 286, 160, 158, 327,
7681 171, 303, 155, 443, 155, 443, 155, 443, 155, 443,
7682 443, 438, 303, 155, 303, 155, 309, 482, 316, 300,
7683 155, 306, 309, 99, 268, 155, 309, 476, 155, 155,
7684 354, 476, 155, 353, 155, 400, 476, 476, 476, 477,
7685 477, 477, 52, 56, 244, 52, 56, 376, 379, 342,
7686 199, 199, 52, 317, 318, 449, 174, 152, 453, 453,
7687 459, 453, 301, 457, 305, 307, 453, 459, 139, 268,
7688 308, 459, 56, 98, 453, 360, 362, 360, 359, 361,
7689 477, 171, 155, 189, 286, 443, 443, 155, 443, 443,
7690 303, 155, 309, 155, 309, 155, 309, 155, 309, 52,
7691 56, 309, 155, 478, 292, 343, 344, 318, 453, 453,
7692 453, 459, 453, 443, 309, 309, 155, 309, 309, 453,
7693 309
7694};
7695
7696/* YYR1[RULE-NUM] -- Symbol kind of the left-hand side of rule RULE-NUM. */
7697static const yytype_int16 yyr1[] =
7698{
7699 0, 162, 165, 163, 163, 164, 166, 167, 167, 167,
7700 168, 168, 169, 170, 171, 172, 173, 174, 175, 174,
7701 176, 176, 176, 177, 178, 177, 179, 180, 181, 182,
7702 182, 182, 182, 182, 182, 182, 182, 182, 182, 182,
7703 182, 182, 183, 182, 182, 182, 182, 182, 184, 185,
7704 186, 186, 186, 186, 186, 186, 186, 186, 185, 187,
7705 187, 185, 188, 188, 189, 189, 188, 190, 190, 190,
7706 191, 191, 191, 191, 191, 192, 191, 193, 191, 191,
7707 194, 195, 196, 197, 198, 199, 199, 200, 201, 202,
7708 203, 203, 204, 205, 206, 206, 207, 208, 208, 208,
7709 209, 209, 209, 209, 209, 209, 209, 209, 209, 209,
7710 209, 209, 210, 210, 211, 211, 212, 212, 212, 213,
7711 213, 212, 212, 212, 212, 212, 212, 212, 214, 214,
7712 215, 215, 216, 216, 216, 216, 216, 216, 216, 216,
7713 216, 217, 217, 217, 217, 217, 217, 217, 217, 217,
7714 218, 218, 219, 219, 219, 220, 220, 220, 220, 220,
7715 221, 221, 222, 223, 222, 224, 224, 224, 224, 224,
7716 224, 224, 224, 224, 224, 224, 224, 224, 224, 224,
7717 224, 224, 224, 224, 224, 224, 224, 224, 224, 224,
7718 224, 224, 224, 224, 224, 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, 225, 225, 225, 225,
7722 225, 225, 225, 225, 225, 225, 226, 227, 228, 228,
7723 228, 228, 228, 228, 228, 228, 227, 229, 229, 229,
7724 229, 229, 229, 227, 227, 227, 227, 227, 227, 227,
7725 227, 227, 227, 227, 227, 227, 227, 227, 227, 227,
7726 227, 227, 227, 227, 227, 227, 227, 227, 227, 227,
7727 230, 230, 227, 227, 227, 231, 232, 232, 232, 233,
7728 233, 233, 233, 234, 234, 235, 236, 237, 238, 239,
7729 240, 240, 240, 240, 241, 241, 242, 242, 242, 243,
7730 243, 244, 244, 244, 244, 244, 245, 246, 246, 246,
7731 246, 246, 246, 247, 248, 249, 249, 250, 250, 251,
7732 251, 251, 251, 252, 252, 253, 253, 254, 254, 254,
7733 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
7734 255, 256, 255, 257, 255, 255, 255, 255, 255, 255,
7735 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
7736 255, 255, 255, 255, 255, 258, 255, 259, 255, 255,
7737 260, 261, 255, 262, 255, 263, 255, 264, 255, 265,
7738 255, 266, 255, 255, 255, 255, 255, 267, 268, 269,
7739 270, 271, 272, 273, 274, 275, 276, 277, 278, 279,
7740 280, 281, 282, 283, 284, 285, 286, 286, 287, 288,
7741 289, 289, 289, 290, 290, 291, 291, 292, 292, 293,
7742 293, 294, 294, 295, 295, 296, 296, 296, 296, 296,
7743 297, 297, 298, 298, 299, 300, 301, 301, 302, 302,
7744 303, 303, 304, 304, 304, 304, 305, 306, 307, 308,
7745 308, 309, 309, 310, 310, 310, 310, 310, 310, 310,
7746 310, 310, 310, 310, 310, 311, 311, 311, 312, 311,
7747 313, 313, 314, 315, 315, 316, 316, 317, 317, 318,
7748 318, 319, 320, 321, 322, 323, 324, 325, 325, 326,
7749 327, 326, 328, 329, 329, 329, 329, 329, 330, 330,
7750 330, 330, 330, 330, 330, 330, 331, 331, 332, 333,
7751 334, 335, 336, 336, 336, 336, 337, 338, 338, 339,
7752 340, 341, 342, 343, 344, 344, 345, 345, 345, 346,
7753 346, 346, 346, 346, 346, 347, 348, 348, 349, 350,
7754 350, 351, 352, 353, 353, 353, 353, 353, 353, 353,
7755 353, 353, 353, 353, 353, 353, 354, 353, 353, 353,
7756 355, 355, 355, 355, 355, 355, 356, 356, 357, 357,
7757 358, 359, 359, 360, 360, 361, 362, 362, 362, 362,
7758 363, 363, 364, 364, 365, 365, 366, 366, 367, 368,
7759 368, 369, 370, 370, 370, 370, 370, 370, 369, 369,
7760 369, 369, 371, 371, 371, 371, 371, 371, 371, 371,
7761 371, 371, 372, 373, 373, 374, 375, 375, 375, 376,
7762 376, 377, 377, 377, 378, 378, 379, 379, 380, 380,
7763 381, 382, 382, 382, 383, 384, 385, 386, 386, 387,
7764 388, 389, 389, 390, 390, 391, 392, 393, 393, 394,
7765 395, 396, 397, 398, 398, 399, 399, 400, 400, 401,
7766 401, 402, 402, 403, 404, 403, 405, 406, 407, 403,
7767 408, 408, 409, 409, 410, 410, 411, 412, 412, 413,
7768 414, 414, 415, 415, 415, 415, 416, 416, 416, 417,
7769 417, 417, 418, 418, 418, 418, 418, 418, 418, 419,
7770 419, 420, 420, 421, 421, 422, 423, 423, 424, 424,
7771 425, 426, 427, 428, 427, 429, 429, 430, 430, 431,
7772 431, 432, 432, 432, 432, 433, 433, 434, 434, 434,
7773 434, 435, 435, 436, 437, 437, 438, 438, 439, 439,
7774 439, 439, 439, 439, 439, 439, 439, 439, 439, 439,
7775 440, 440, 441, 440, 440, 442, 443, 443, 444, 444,
7776 444, 444, 444, 444, 444, 444, 444, 444, 444, 444,
7777 445, 445, 446, 445, 445, 447, 448, 449, 449, 449,
7778 449, 450, 450, 451, 452, 452, 453, 453, 454, 455,
7779 455, 456, 457, 457, 458, 458, 459, 459, 460, 460,
7780 461, 461, 461, 462, 462, 463, 464, 465, 466, 467,
7781 466, 468, 468, 469, 469, 470, 470, 470, 470, 470,
7782 470, 471, 471, 471, 471, 472, 472, 472, 473, 473,
7783 474, 474, 475, 475, 476, 477, 478, 479, 479, 480,
7784 480, 481, 481, 482
7785};
7786
7787/* YYR2[RULE-NUM] -- Number of symbols on the right-hand side of rule RULE-NUM. */
7788static const yytype_int8 yyr2[] =
7789{
7790 0, 2, 0, 0, 1, 2, 2, 1, 1, 3,
7791 1, 2, 1, 3, 2, 0, 0, 8, 0, 5,
7792 1, 1, 3, 1, 0, 3, 0, 2, 0, 4,
7793 3, 3, 3, 2, 3, 3, 3, 3, 4, 4,
7794 1, 4, 4, 1, 7, 4, 1, 1, 4, 1,
7795 4, 7, 6, 6, 6, 6, 5, 4, 1, 4,
7796 4, 1, 1, 4, 0, 1, 3, 1, 4, 1,
7797 1, 3, 3, 3, 2, 0, 7, 0, 7, 1,
7798 1, 2, 0, 5, 1, 1, 1, 0, 0, 4,
7799 1, 1, 1, 1, 1, 4, 3, 1, 1, 1,
7800 2, 3, 4, 5, 4, 5, 6, 2, 2, 2,
7801 2, 2, 1, 3, 1, 3, 1, 2, 3, 1,
7802 3, 5, 2, 4, 2, 4, 1, 3, 1, 3,
7803 2, 3, 1, 1, 4, 3, 3, 3, 3, 2,
7804 1, 1, 1, 4, 3, 3, 3, 3, 2, 1,
7805 1, 1, 2, 1, 3, 1, 1, 1, 1, 1,
7806 1, 1, 1, 0, 4, 1, 1, 1, 1, 1,
7807 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
7808 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
7809 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
7810 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
7811 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
7812 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
7813 1, 1, 1, 1, 1, 1, 4, 1, 4, 7,
7814 6, 6, 6, 6, 5, 4, 1, 3, 3, 2,
7815 2, 2, 2, 1, 3, 3, 3, 3, 3, 3,
7816 4, 2, 2, 3, 3, 3, 3, 1, 3, 3,
7817 3, 3, 3, 2, 2, 3, 3, 3, 3, 4,
7818 4, 4, 1, 1, 1, 6, 1, 4, 3, 1,
7819 1, 1, 1, 3, 3, 1, 1, 1, 1, 1,
7820 1, 2, 4, 2, 1, 4, 3, 5, 3, 1,
7821 1, 1, 1, 2, 4, 2, 1, 1, 1, 2,
7822 2, 4, 1, 0, 2, 2, 1, 2, 1, 1,
7823 1, 3, 3, 2, 1, 1, 1, 3, 4, 2,
7824 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
7825 1, 0, 4, 0, 4, 3, 3, 2, 3, 3,
7826 1, 4, 3, 1, 6, 4, 3, 2, 1, 2,
7827 1, 6, 6, 4, 4, 0, 6, 0, 5, 5,
7828 0, 0, 9, 0, 6, 0, 7, 0, 5, 0,
7829 5, 0, 5, 1, 1, 1, 1, 1, 1, 1,
7830 1, 1, 2, 2, 1, 2, 1, 1, 1, 1,
7831 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
7832 1, 1, 2, 1, 1, 1, 5, 1, 2, 1,
7833 1, 1, 3, 1, 3, 1, 3, 5, 1, 3,
7834 2, 1, 1, 1, 0, 2, 2, 1, 1, 3,
7835 2, 1, 4, 2, 2, 1, 1, 1, 3, 1,
7836 3, 2, 1, 6, 8, 4, 6, 4, 6, 4,
7837 6, 2, 4, 2, 4, 1, 2, 2, 1, 1,
7838 1, 1, 4, 0, 1, 1, 4, 1, 3, 1,
7839 1, 0, 0, 0, 0, 0, 9, 4, 1, 3,
7840 0, 4, 3, 2, 4, 5, 5, 3, 2, 4,
7841 4, 3, 3, 2, 1, 4, 3, 3, 0, 7,
7842 0, 7, 1, 2, 3, 4, 5, 1, 1, 0,
7843 0, 0, 0, 9, 1, 1, 1, 3, 3, 1,
7844 2, 3, 1, 1, 1, 1, 3, 1, 0, 4,
7845 1, 2, 2, 1, 1, 4, 4, 4, 3, 4,
7846 4, 4, 3, 3, 3, 2, 0, 6, 2, 4,
7847 1, 1, 2, 2, 4, 1, 2, 3, 1, 3,
7848 5, 2, 1, 1, 3, 1, 3, 1, 2, 1,
7849 1, 3, 2, 1, 1, 3, 2, 1, 2, 1,
7850 1, 1, 3, 3, 2, 2, 2, 2, 1, 1,
7851 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
7852 1, 1, 1, 2, 2, 4, 2, 3, 1, 6,
7853 1, 1, 1, 1, 2, 1, 3, 1, 1, 1,
7854 1, 1, 1, 2, 3, 3, 3, 1, 2, 4,
7855 1, 0, 3, 1, 2, 4, 1, 0, 3, 4,
7856 1, 4, 1, 0, 3, 0, 3, 0, 2, 0,
7857 2, 0, 2, 1, 0, 3, 0, 0, 0, 6,
7858 1, 1, 1, 1, 1, 1, 2, 1, 1, 3,
7859 1, 2, 1, 1, 1, 1, 1, 1, 1, 1,
7860 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
7861 1, 1, 1, 1, 1, 0, 4, 1, 1, 1,
7862 0, 3, 1, 0, 3, 2, 1, 1, 3, 2,
7863 1, 4, 2, 2, 1, 1, 1, 4, 2, 2,
7864 1, 1, 1, 3, 1, 3, 2, 1, 6, 8,
7865 4, 6, 4, 6, 4, 6, 2, 4, 2, 4,
7866 1, 2, 1, 1, 1, 1, 2, 1, 6, 8,
7867 4, 6, 4, 6, 4, 6, 2, 4, 2, 4,
7868 1, 2, 1, 1, 1, 1, 1, 1, 1, 1,
7869 1, 1, 1, 1, 1, 3, 1, 3, 1, 1,
7870 1, 1, 2, 1, 1, 1, 2, 1, 1, 1,
7871 2, 2, 1, 0, 1, 1, 1, 1, 1, 0,
7872 4, 1, 2, 1, 3, 3, 2, 1, 4, 2,
7873 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
7874 1, 1, 1, 1, 2, 2, 2, 1, 1, 1,
7875 1, 1, 2, 0
7876};
7877
7878
7879enum { YYENOMEM = -2 };
7880
7881#define yyerrok (yyerrstatus = 0)
7882#define yyclearin (yychar = YYEMPTY)
7883
7884#define YYACCEPT goto yyacceptlab
7885#define YYABORT goto yyabortlab
7886#define YYERROR goto yyerrorlab
7887#define YYNOMEM goto yyexhaustedlab
7888
7889
7890#define YYRECOVERING() (!!yyerrstatus)
7891
7892#define YYBACKUP(Token, Value) \
7893 do \
7894 if (yychar == YYEMPTY) \
7895 { \
7896 yychar = (Token); \
7897 yylval = (Value); \
7898 YYPOPSTACK (yylen); \
7899 yystate = *yyssp; \
7900 goto yybackup; \
7901 } \
7902 else \
7903 { \
7904 yyerror (&yylloc, p, YY_("syntax error: cannot back up")); \
7905 YYERROR; \
7906 } \
7907 while (0)
7908
7909/* Backward compatibility with an undocumented macro.
7910 Use YYerror or YYUNDEF. */
7911#define YYERRCODE YYUNDEF
7912
7913/* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
7914 If N is 0, then set CURRENT to the empty location which ends
7915 the previous symbol: RHS[0] (always defined). */
7916
7917#ifndef YYLLOC_DEFAULT
7918# define YYLLOC_DEFAULT(Current, Rhs, N) \
7919 do \
7920 if (N) \
7921 { \
7922 (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \
7923 (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \
7924 (Current).last_line = YYRHSLOC (Rhs, N).last_line; \
7925 (Current).last_column = YYRHSLOC (Rhs, N).last_column; \
7926 } \
7927 else \
7928 { \
7929 (Current).first_line = (Current).last_line = \
7930 YYRHSLOC (Rhs, 0).last_line; \
7931 (Current).first_column = (Current).last_column = \
7932 YYRHSLOC (Rhs, 0).last_column; \
7933 } \
7934 while (0)
7935#endif
7936
7937#define YYRHSLOC(Rhs, K) ((Rhs)[K])
7938
7939
7940/* Enable debugging if requested. */
7941#if YYDEBUG
7942
7943# ifndef YYFPRINTF
7944# include <stdio.h> /* INFRINGES ON USER NAME SPACE */
7945# define YYFPRINTF fprintf
7946# endif
7947
7948# define YYDPRINTF(Args) \
7949do { \
7950 if (yydebug) \
7951 YYFPRINTF Args; \
7952} while (0)
7953
7954
7955/* YYLOCATION_PRINT -- Print the location on the stream.
7956 This macro was not mandated originally: define only if we know
7957 we won't break user code: when these are the locations we know. */
7958
7959# ifndef YYLOCATION_PRINT
7960
7961# if defined YY_LOCATION_PRINT
7962
7963 /* Temporary convenience wrapper in case some people defined the
7964 undocumented and private YY_LOCATION_PRINT macros. */
7965# define YYLOCATION_PRINT(File, Loc, p) YY_LOCATION_PRINT(File, *(Loc), p)
7966
7967# elif defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL
7968
7969/* Print *YYLOCP on YYO. Private, do not rely on its existence. */
7970
7971YY_ATTRIBUTE_UNUSED
7972static int
7973yy_location_print_ (FILE *yyo, YYLTYPE const * const yylocp)
7974{
7975 int res = 0;
7976 int end_col = 0 != yylocp->last_column ? yylocp->last_column - 1 : 0;
7977 if (0 <= yylocp->first_line)
7978 {
7979 res += YYFPRINTF (yyo, "%d", yylocp->first_line);
7980 if (0 <= yylocp->first_column)
7981 res += YYFPRINTF (yyo, ".%d", yylocp->first_column);
7982 }
7983 if (0 <= yylocp->last_line)
7984 {
7985 if (yylocp->first_line < yylocp->last_line)
7986 {
7987 res += YYFPRINTF (yyo, "-%d", yylocp->last_line);
7988 if (0 <= end_col)
7989 res += YYFPRINTF (yyo, ".%d", end_col);
7990 }
7991 else if (0 <= end_col && yylocp->first_column < end_col)
7992 res += YYFPRINTF (yyo, "-%d", end_col);
7993 }
7994 return res;
7995}
7996
7997# define YYLOCATION_PRINT yy_location_print_
7998
7999 /* Temporary convenience wrapper in case some people defined the
8000 undocumented and private YY_LOCATION_PRINT macros. */
8001# define YY_LOCATION_PRINT(File, Loc, p) YYLOCATION_PRINT(File, &(Loc), p)
8002
8003# else
8004
8005# define YYLOCATION_PRINT(File, Loc, p) ((void) 0)
8006 /* Temporary convenience wrapper in case some people defined the
8007 undocumented and private YY_LOCATION_PRINT macros. */
8008# define YY_LOCATION_PRINT YYLOCATION_PRINT
8009
8010# endif
8011# endif /* !defined YYLOCATION_PRINT */
8012
8013
8014# define YY_SYMBOL_PRINT(Title, Kind, Value, Location, p) \
8015do { \
8016 if (yydebug) \
8017 { \
8018 YYFPRINTF (stderr, "%s ", Title); \
8019 yy_symbol_print (stderr, \
8020 Kind, Value, Location, p); \
8021 YYFPRINTF (stderr, "\n"); \
8022 } \
8023} while (0)
8024
8025
8026/*-----------------------------------.
8027| Print this symbol's value on YYO. |
8028`-----------------------------------*/
8029
8030static void
8031yy_symbol_value_print (FILE *yyo,
8032 yysymbol_kind_t yykind, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp, struct parser_params *p)
8033{
8034 FILE *yyoutput = yyo;
8035 YY_USE (yyoutput);
8036 YY_USE (yylocationp);
8037 YY_USE (p);
8038 if (!yyvaluep)
8039 return;
8040 YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
8041switch (yykind)
8042 {
8043 case YYSYMBOL_keyword_class: /* "'class'" */
8044#line 2645 "parse.y"
8045 {
8046 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8047}
8048#line 8049 "parse.c"
8049 break;
8050
8051 case YYSYMBOL_keyword_module: /* "'module'" */
8052#line 2645 "parse.y"
8053 {
8054 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8055}
8056#line 8057 "parse.c"
8057 break;
8058
8059 case YYSYMBOL_keyword_def: /* "'def'" */
8060#line 2645 "parse.y"
8061 {
8062 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8063}
8064#line 8065 "parse.c"
8065 break;
8066
8067 case YYSYMBOL_keyword_undef: /* "'undef'" */
8068#line 2645 "parse.y"
8069 {
8070 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8071}
8072#line 8073 "parse.c"
8073 break;
8074
8075 case YYSYMBOL_keyword_begin: /* "'begin'" */
8076#line 2645 "parse.y"
8077 {
8078 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8079}
8080#line 8081 "parse.c"
8081 break;
8082
8083 case YYSYMBOL_keyword_rescue: /* "'rescue'" */
8084#line 2645 "parse.y"
8085 {
8086 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8087}
8088#line 8089 "parse.c"
8089 break;
8090
8091 case YYSYMBOL_keyword_ensure: /* "'ensure'" */
8092#line 2645 "parse.y"
8093 {
8094 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8095}
8096#line 8097 "parse.c"
8097 break;
8098
8099 case YYSYMBOL_keyword_end: /* "'end'" */
8100#line 2645 "parse.y"
8101 {
8102 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8103}
8104#line 8105 "parse.c"
8105 break;
8106
8107 case YYSYMBOL_keyword_if: /* "'if'" */
8108#line 2645 "parse.y"
8109 {
8110 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8111}
8112#line 8113 "parse.c"
8113 break;
8114
8115 case YYSYMBOL_keyword_unless: /* "'unless'" */
8116#line 2645 "parse.y"
8117 {
8118 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8119}
8120#line 8121 "parse.c"
8121 break;
8122
8123 case YYSYMBOL_keyword_then: /* "'then'" */
8124#line 2645 "parse.y"
8125 {
8126 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8127}
8128#line 8129 "parse.c"
8129 break;
8130
8131 case YYSYMBOL_keyword_elsif: /* "'elsif'" */
8132#line 2645 "parse.y"
8133 {
8134 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8135}
8136#line 8137 "parse.c"
8137 break;
8138
8139 case YYSYMBOL_keyword_else: /* "'else'" */
8140#line 2645 "parse.y"
8141 {
8142 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8143}
8144#line 8145 "parse.c"
8145 break;
8146
8147 case YYSYMBOL_keyword_case: /* "'case'" */
8148#line 2645 "parse.y"
8149 {
8150 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8151}
8152#line 8153 "parse.c"
8153 break;
8154
8155 case YYSYMBOL_keyword_when: /* "'when'" */
8156#line 2645 "parse.y"
8157 {
8158 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8159}
8160#line 8161 "parse.c"
8161 break;
8162
8163 case YYSYMBOL_keyword_while: /* "'while'" */
8164#line 2645 "parse.y"
8165 {
8166 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8167}
8168#line 8169 "parse.c"
8169 break;
8170
8171 case YYSYMBOL_keyword_until: /* "'until'" */
8172#line 2645 "parse.y"
8173 {
8174 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8175}
8176#line 8177 "parse.c"
8177 break;
8178
8179 case YYSYMBOL_keyword_for: /* "'for'" */
8180#line 2645 "parse.y"
8181 {
8182 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8183}
8184#line 8185 "parse.c"
8185 break;
8186
8187 case YYSYMBOL_keyword_break: /* "'break'" */
8188#line 2645 "parse.y"
8189 {
8190 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8191}
8192#line 8193 "parse.c"
8193 break;
8194
8195 case YYSYMBOL_keyword_next: /* "'next'" */
8196#line 2645 "parse.y"
8197 {
8198 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8199}
8200#line 8201 "parse.c"
8201 break;
8202
8203 case YYSYMBOL_keyword_redo: /* "'redo'" */
8204#line 2645 "parse.y"
8205 {
8206 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8207}
8208#line 8209 "parse.c"
8209 break;
8210
8211 case YYSYMBOL_keyword_retry: /* "'retry'" */
8212#line 2645 "parse.y"
8213 {
8214 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8215}
8216#line 8217 "parse.c"
8217 break;
8218
8219 case YYSYMBOL_keyword_in: /* "'in'" */
8220#line 2645 "parse.y"
8221 {
8222 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8223}
8224#line 8225 "parse.c"
8225 break;
8226
8227 case YYSYMBOL_keyword_do: /* "'do'" */
8228#line 2645 "parse.y"
8229 {
8230 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8231}
8232#line 8233 "parse.c"
8233 break;
8234
8235 case YYSYMBOL_keyword_do_cond: /* "'do' for condition" */
8236#line 2645 "parse.y"
8237 {
8238 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8239}
8240#line 8241 "parse.c"
8241 break;
8242
8243 case YYSYMBOL_keyword_do_block: /* "'do' for block" */
8244#line 2645 "parse.y"
8245 {
8246 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8247}
8248#line 8249 "parse.c"
8249 break;
8250
8251 case YYSYMBOL_keyword_do_LAMBDA: /* "'do' for lambda" */
8252#line 2645 "parse.y"
8253 {
8254 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8255}
8256#line 8257 "parse.c"
8257 break;
8258
8259 case YYSYMBOL_keyword_return: /* "'return'" */
8260#line 2645 "parse.y"
8261 {
8262 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8263}
8264#line 8265 "parse.c"
8265 break;
8266
8267 case YYSYMBOL_keyword_yield: /* "'yield'" */
8268#line 2645 "parse.y"
8269 {
8270 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8271}
8272#line 8273 "parse.c"
8273 break;
8274
8275 case YYSYMBOL_keyword_super: /* "'super'" */
8276#line 2645 "parse.y"
8277 {
8278 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8279}
8280#line 8281 "parse.c"
8281 break;
8282
8283 case YYSYMBOL_keyword_self: /* "'self'" */
8284#line 2645 "parse.y"
8285 {
8286 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8287}
8288#line 8289 "parse.c"
8289 break;
8290
8291 case YYSYMBOL_keyword_nil: /* "'nil'" */
8292#line 2645 "parse.y"
8293 {
8294 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8295}
8296#line 8297 "parse.c"
8297 break;
8298
8299 case YYSYMBOL_keyword_true: /* "'true'" */
8300#line 2645 "parse.y"
8301 {
8302 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8303}
8304#line 8305 "parse.c"
8305 break;
8306
8307 case YYSYMBOL_keyword_false: /* "'false'" */
8308#line 2645 "parse.y"
8309 {
8310 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8311}
8312#line 8313 "parse.c"
8313 break;
8314
8315 case YYSYMBOL_keyword_and: /* "'and'" */
8316#line 2645 "parse.y"
8317 {
8318 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8319}
8320#line 8321 "parse.c"
8321 break;
8322
8323 case YYSYMBOL_keyword_or: /* "'or'" */
8324#line 2645 "parse.y"
8325 {
8326 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8327}
8328#line 8329 "parse.c"
8329 break;
8330
8331 case YYSYMBOL_keyword_not: /* "'not'" */
8332#line 2645 "parse.y"
8333 {
8334 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8335}
8336#line 8337 "parse.c"
8337 break;
8338
8339 case YYSYMBOL_modifier_if: /* "'if' modifier" */
8340#line 2645 "parse.y"
8341 {
8342 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8343}
8344#line 8345 "parse.c"
8345 break;
8346
8347 case YYSYMBOL_modifier_unless: /* "'unless' modifier" */
8348#line 2645 "parse.y"
8349 {
8350 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8351}
8352#line 8353 "parse.c"
8353 break;
8354
8355 case YYSYMBOL_modifier_while: /* "'while' modifier" */
8356#line 2645 "parse.y"
8357 {
8358 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8359}
8360#line 8361 "parse.c"
8361 break;
8362
8363 case YYSYMBOL_modifier_until: /* "'until' modifier" */
8364#line 2645 "parse.y"
8365 {
8366 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8367}
8368#line 8369 "parse.c"
8369 break;
8370
8371 case YYSYMBOL_modifier_rescue: /* "'rescue' modifier" */
8372#line 2645 "parse.y"
8373 {
8374 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8375}
8376#line 8377 "parse.c"
8377 break;
8378
8379 case YYSYMBOL_keyword_alias: /* "'alias'" */
8380#line 2645 "parse.y"
8381 {
8382 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8383}
8384#line 8385 "parse.c"
8385 break;
8386
8387 case YYSYMBOL_keyword_defined: /* "'defined?'" */
8388#line 2645 "parse.y"
8389 {
8390 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8391}
8392#line 8393 "parse.c"
8393 break;
8394
8395 case YYSYMBOL_keyword_BEGIN: /* "'BEGIN'" */
8396#line 2645 "parse.y"
8397 {
8398 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8399}
8400#line 8401 "parse.c"
8401 break;
8402
8403 case YYSYMBOL_keyword_END: /* "'END'" */
8404#line 2645 "parse.y"
8405 {
8406 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8407}
8408#line 8409 "parse.c"
8409 break;
8410
8411 case YYSYMBOL_keyword__LINE__: /* "'__LINE__'" */
8412#line 2645 "parse.y"
8413 {
8414 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8415}
8416#line 8417 "parse.c"
8417 break;
8418
8419 case YYSYMBOL_keyword__FILE__: /* "'__FILE__'" */
8420#line 2645 "parse.y"
8421 {
8422 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8423}
8424#line 8425 "parse.c"
8425 break;
8426
8427 case YYSYMBOL_keyword__ENCODING__: /* "'__ENCODING__'" */
8428#line 2645 "parse.y"
8429 {
8430 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8431}
8432#line 8433 "parse.c"
8433 break;
8434
8435 case YYSYMBOL_tIDENTIFIER: /* "local variable or method" */
8436#line 2645 "parse.y"
8437 {
8438 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8439}
8440#line 8441 "parse.c"
8441 break;
8442
8443 case YYSYMBOL_tFID: /* "method" */
8444#line 2645 "parse.y"
8445 {
8446 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8447}
8448#line 8449 "parse.c"
8449 break;
8450
8451 case YYSYMBOL_tGVAR: /* "global variable" */
8452#line 2645 "parse.y"
8453 {
8454 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8455}
8456#line 8457 "parse.c"
8457 break;
8458
8459 case YYSYMBOL_tIVAR: /* "instance variable" */
8460#line 2645 "parse.y"
8461 {
8462 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8463}
8464#line 8465 "parse.c"
8465 break;
8466
8467 case YYSYMBOL_tCONSTANT: /* "constant" */
8468#line 2645 "parse.y"
8469 {
8470 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8471}
8472#line 8473 "parse.c"
8473 break;
8474
8475 case YYSYMBOL_tCVAR: /* "class variable" */
8476#line 2645 "parse.y"
8477 {
8478 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8479}
8480#line 8481 "parse.c"
8481 break;
8482
8483 case YYSYMBOL_tLABEL: /* "label" */
8484#line 2645 "parse.y"
8485 {
8486 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8487}
8488#line 8489 "parse.c"
8489 break;
8490
8491 case YYSYMBOL_tINTEGER: /* "integer literal" */
8492#line 2648 "parse.y"
8493 {
8494 switch (nd_type(RNODE(((*yyvaluep).node)))) {
8495 case NODE_INTEGER:
8496 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_integer_literal_val(((*yyvaluep).node)));
8497 break;
8498 case NODE_FLOAT:
8499 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_float_literal_val(((*yyvaluep).node)));
8500 break;
8501 case NODE_RATIONAL:
8502 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_rational_literal_val(((*yyvaluep).node)));
8503 break;
8504 case NODE_IMAGINARY:
8505 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_imaginary_literal_val(((*yyvaluep).node)));
8506 break;
8507 default:
8508 break;
8509 }
8510}
8511#line 8512 "parse.c"
8512 break;
8513
8514 case YYSYMBOL_tFLOAT: /* "float literal" */
8515#line 2648 "parse.y"
8516 {
8517 switch (nd_type(RNODE(((*yyvaluep).node)))) {
8518 case NODE_INTEGER:
8519 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_integer_literal_val(((*yyvaluep).node)));
8520 break;
8521 case NODE_FLOAT:
8522 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_float_literal_val(((*yyvaluep).node)));
8523 break;
8524 case NODE_RATIONAL:
8525 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_rational_literal_val(((*yyvaluep).node)));
8526 break;
8527 case NODE_IMAGINARY:
8528 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_imaginary_literal_val(((*yyvaluep).node)));
8529 break;
8530 default:
8531 break;
8532 }
8533}
8534#line 8535 "parse.c"
8535 break;
8536
8537 case YYSYMBOL_tRATIONAL: /* "rational literal" */
8538#line 2648 "parse.y"
8539 {
8540 switch (nd_type(RNODE(((*yyvaluep).node)))) {
8541 case NODE_INTEGER:
8542 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_integer_literal_val(((*yyvaluep).node)));
8543 break;
8544 case NODE_FLOAT:
8545 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_float_literal_val(((*yyvaluep).node)));
8546 break;
8547 case NODE_RATIONAL:
8548 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_rational_literal_val(((*yyvaluep).node)));
8549 break;
8550 case NODE_IMAGINARY:
8551 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_imaginary_literal_val(((*yyvaluep).node)));
8552 break;
8553 default:
8554 break;
8555 }
8556}
8557#line 8558 "parse.c"
8558 break;
8559
8560 case YYSYMBOL_tIMAGINARY: /* "imaginary literal" */
8561#line 2648 "parse.y"
8562 {
8563 switch (nd_type(RNODE(((*yyvaluep).node)))) {
8564 case NODE_INTEGER:
8565 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_integer_literal_val(((*yyvaluep).node)));
8566 break;
8567 case NODE_FLOAT:
8568 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_float_literal_val(((*yyvaluep).node)));
8569 break;
8570 case NODE_RATIONAL:
8571 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_rational_literal_val(((*yyvaluep).node)));
8572 break;
8573 case NODE_IMAGINARY:
8574 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_imaginary_literal_val(((*yyvaluep).node)));
8575 break;
8576 default:
8577 break;
8578 }
8579}
8580#line 8581 "parse.c"
8581 break;
8582
8583 case YYSYMBOL_tCHAR: /* "char literal" */
8584#line 2648 "parse.y"
8585 {
8586 switch (nd_type(RNODE(((*yyvaluep).node)))) {
8587 case NODE_INTEGER:
8588 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_integer_literal_val(((*yyvaluep).node)));
8589 break;
8590 case NODE_FLOAT:
8591 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_float_literal_val(((*yyvaluep).node)));
8592 break;
8593 case NODE_RATIONAL:
8594 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_rational_literal_val(((*yyvaluep).node)));
8595 break;
8596 case NODE_IMAGINARY:
8597 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_imaginary_literal_val(((*yyvaluep).node)));
8598 break;
8599 default:
8600 break;
8601 }
8602}
8603#line 8604 "parse.c"
8604 break;
8605
8606 case YYSYMBOL_tNTH_REF: /* "numbered reference" */
8607#line 2666 "parse.y"
8608 {
8609 rb_parser_printf(p, "$%ld", RNODE_NTH_REF(((*yyvaluep).node))->nd_nth);
8610}
8611#line 8612 "parse.c"
8612 break;
8613
8614 case YYSYMBOL_tBACK_REF: /* "back reference" */
8615#line 2669 "parse.y"
8616 {
8617 rb_parser_printf(p, "$%c", (int)RNODE_BACK_REF(((*yyvaluep).node))->nd_nth);
8618}
8619#line 8620 "parse.c"
8620 break;
8621
8622 case YYSYMBOL_tSTRING_CONTENT: /* "literal content" */
8623#line 2648 "parse.y"
8624 {
8625 switch (nd_type(RNODE(((*yyvaluep).node)))) {
8626 case NODE_INTEGER:
8627 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_integer_literal_val(((*yyvaluep).node)));
8628 break;
8629 case NODE_FLOAT:
8630 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_float_literal_val(((*yyvaluep).node)));
8631 break;
8632 case NODE_RATIONAL:
8633 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_rational_literal_val(((*yyvaluep).node)));
8634 break;
8635 case NODE_IMAGINARY:
8636 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_imaginary_literal_val(((*yyvaluep).node)));
8637 break;
8638 default:
8639 break;
8640 }
8641}
8642#line 8643 "parse.c"
8643 break;
8644
8645 case YYSYMBOL_69_: /* '.' */
8646#line 2645 "parse.y"
8647 {
8648 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8649}
8650#line 8651 "parse.c"
8651 break;
8652
8653 case YYSYMBOL_70_backslash_: /* "backslash" */
8654#line 2645 "parse.y"
8655 {
8656 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8657}
8658#line 8659 "parse.c"
8659 break;
8660
8661 case YYSYMBOL_72_escaped_horizontal_tab_: /* "escaped horizontal tab" */
8662#line 2645 "parse.y"
8663 {
8664 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8665}
8666#line 8667 "parse.c"
8667 break;
8668
8669 case YYSYMBOL_73_escaped_form_feed_: /* "escaped form feed" */
8670#line 2645 "parse.y"
8671 {
8672 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8673}
8674#line 8675 "parse.c"
8675 break;
8676
8677 case YYSYMBOL_74_escaped_carriage_return_: /* "escaped carriage return" */
8678#line 2645 "parse.y"
8679 {
8680 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8681}
8682#line 8683 "parse.c"
8683 break;
8684
8685 case YYSYMBOL_75_escaped_vertical_tab_: /* "escaped vertical tab" */
8686#line 2645 "parse.y"
8687 {
8688 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8689}
8690#line 8691 "parse.c"
8691 break;
8692
8693 case YYSYMBOL_tANDDOT: /* "&." */
8694#line 2645 "parse.y"
8695 {
8696 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8697}
8698#line 8699 "parse.c"
8699 break;
8700
8701 case YYSYMBOL_tCOLON2: /* "::" */
8702#line 2645 "parse.y"
8703 {
8704 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8705}
8706#line 8707 "parse.c"
8707 break;
8708
8709 case YYSYMBOL_tOP_ASGN: /* "operator-assignment" */
8710#line 2645 "parse.y"
8711 {
8712 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8713}
8714#line 8715 "parse.c"
8715 break;
8716
8717 case YYSYMBOL_compstmt_top_stmts: /* compstmt_top_stmts */
8718#line 2636 "parse.y"
8719 {
8720 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8721 rb_parser_printf(p, "NODE_SPECIAL");
8722 }
8723 else if (((*yyvaluep).node)) {
8724 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8725 }
8726}
8727#line 8728 "parse.c"
8728 break;
8729
8730 case YYSYMBOL_top_stmts: /* top_stmts */
8731#line 2636 "parse.y"
8732 {
8733 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8734 rb_parser_printf(p, "NODE_SPECIAL");
8735 }
8736 else if (((*yyvaluep).node)) {
8737 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8738 }
8739}
8740#line 8741 "parse.c"
8741 break;
8742
8743 case YYSYMBOL_top_stmt: /* top_stmt */
8744#line 2636 "parse.y"
8745 {
8746 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8747 rb_parser_printf(p, "NODE_SPECIAL");
8748 }
8749 else if (((*yyvaluep).node)) {
8750 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8751 }
8752}
8753#line 8754 "parse.c"
8754 break;
8755
8756 case YYSYMBOL_block_open: /* block_open */
8757#line 2636 "parse.y"
8758 {
8759 if ((NODE *)((*yyvaluep).node_exits) == (NODE *)-1) {
8760 rb_parser_printf(p, "NODE_SPECIAL");
8761 }
8762 else if (((*yyvaluep).node_exits)) {
8763 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_exits)))));
8764 }
8765}
8766#line 8767 "parse.c"
8767 break;
8768
8769 case YYSYMBOL_begin_block: /* begin_block */
8770#line 2636 "parse.y"
8771 {
8772 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8773 rb_parser_printf(p, "NODE_SPECIAL");
8774 }
8775 else if (((*yyvaluep).node)) {
8776 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8777 }
8778}
8779#line 8780 "parse.c"
8780 break;
8781
8782 case YYSYMBOL_compstmt_stmts: /* compstmt_stmts */
8783#line 2636 "parse.y"
8784 {
8785 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8786 rb_parser_printf(p, "NODE_SPECIAL");
8787 }
8788 else if (((*yyvaluep).node)) {
8789 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8790 }
8791}
8792#line 8793 "parse.c"
8793 break;
8794
8795 case YYSYMBOL_bodystmt: /* bodystmt */
8796#line 2636 "parse.y"
8797 {
8798 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8799 rb_parser_printf(p, "NODE_SPECIAL");
8800 }
8801 else if (((*yyvaluep).node)) {
8802 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8803 }
8804}
8805#line 8806 "parse.c"
8806 break;
8807
8808 case YYSYMBOL_stmts: /* stmts */
8809#line 2636 "parse.y"
8810 {
8811 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8812 rb_parser_printf(p, "NODE_SPECIAL");
8813 }
8814 else if (((*yyvaluep).node)) {
8815 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8816 }
8817}
8818#line 8819 "parse.c"
8819 break;
8820
8821 case YYSYMBOL_stmt_or_begin: /* stmt_or_begin */
8822#line 2636 "parse.y"
8823 {
8824 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8825 rb_parser_printf(p, "NODE_SPECIAL");
8826 }
8827 else if (((*yyvaluep).node)) {
8828 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8829 }
8830}
8831#line 8832 "parse.c"
8832 break;
8833
8834 case YYSYMBOL_allow_exits: /* allow_exits */
8835#line 2636 "parse.y"
8836 {
8837 if ((NODE *)((*yyvaluep).node_exits) == (NODE *)-1) {
8838 rb_parser_printf(p, "NODE_SPECIAL");
8839 }
8840 else if (((*yyvaluep).node_exits)) {
8841 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_exits)))));
8842 }
8843}
8844#line 8845 "parse.c"
8845 break;
8846
8847 case YYSYMBOL_stmt: /* stmt */
8848#line 2636 "parse.y"
8849 {
8850 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8851 rb_parser_printf(p, "NODE_SPECIAL");
8852 }
8853 else if (((*yyvaluep).node)) {
8854 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8855 }
8856}
8857#line 8858 "parse.c"
8858 break;
8859
8860 case YYSYMBOL_asgn_mrhs: /* asgn_mrhs */
8861#line 2636 "parse.y"
8862 {
8863 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8864 rb_parser_printf(p, "NODE_SPECIAL");
8865 }
8866 else if (((*yyvaluep).node)) {
8867 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8868 }
8869}
8870#line 8871 "parse.c"
8871 break;
8872
8873 case YYSYMBOL_asgn_command_rhs: /* asgn_command_rhs */
8874#line 2636 "parse.y"
8875 {
8876 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8877 rb_parser_printf(p, "NODE_SPECIAL");
8878 }
8879 else if (((*yyvaluep).node)) {
8880 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8881 }
8882}
8883#line 8884 "parse.c"
8884 break;
8885
8886 case YYSYMBOL_command_asgn: /* command_asgn */
8887#line 2636 "parse.y"
8888 {
8889 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8890 rb_parser_printf(p, "NODE_SPECIAL");
8891 }
8892 else if (((*yyvaluep).node)) {
8893 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8894 }
8895}
8896#line 8897 "parse.c"
8897 break;
8898
8899 case YYSYMBOL_op_asgn_command_rhs: /* op_asgn_command_rhs */
8900#line 2636 "parse.y"
8901 {
8902 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8903 rb_parser_printf(p, "NODE_SPECIAL");
8904 }
8905 else if (((*yyvaluep).node)) {
8906 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8907 }
8908}
8909#line 8910 "parse.c"
8910 break;
8911
8912 case YYSYMBOL_def_endless_method_endless_command: /* def_endless_method_endless_command */
8913#line 2636 "parse.y"
8914 {
8915 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8916 rb_parser_printf(p, "NODE_SPECIAL");
8917 }
8918 else if (((*yyvaluep).node)) {
8919 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8920 }
8921}
8922#line 8923 "parse.c"
8923 break;
8924
8925 case YYSYMBOL_endless_command: /* endless_command */
8926#line 2636 "parse.y"
8927 {
8928 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8929 rb_parser_printf(p, "NODE_SPECIAL");
8930 }
8931 else if (((*yyvaluep).node)) {
8932 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8933 }
8934}
8935#line 8936 "parse.c"
8936 break;
8937
8938 case YYSYMBOL_command_rhs: /* command_rhs */
8939#line 2636 "parse.y"
8940 {
8941 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8942 rb_parser_printf(p, "NODE_SPECIAL");
8943 }
8944 else if (((*yyvaluep).node)) {
8945 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8946 }
8947}
8948#line 8949 "parse.c"
8949 break;
8950
8951 case YYSYMBOL_expr: /* expr */
8952#line 2636 "parse.y"
8953 {
8954 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8955 rb_parser_printf(p, "NODE_SPECIAL");
8956 }
8957 else if (((*yyvaluep).node)) {
8958 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8959 }
8960}
8961#line 8962 "parse.c"
8962 break;
8963
8964 case YYSYMBOL_def_name: /* def_name */
8965#line 2645 "parse.y"
8966 {
8967 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8968}
8969#line 8970 "parse.c"
8970 break;
8971
8972 case YYSYMBOL_defn_head: /* defn_head */
8973#line 2636 "parse.y"
8974 {
8975 if ((NODE *)((*yyvaluep).node_def_temp) == (NODE *)-1) {
8976 rb_parser_printf(p, "NODE_SPECIAL");
8977 }
8978 else if (((*yyvaluep).node_def_temp)) {
8979 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_def_temp)))));
8980 }
8981}
8982#line 8983 "parse.c"
8983 break;
8984
8985 case YYSYMBOL_defs_head: /* defs_head */
8986#line 2636 "parse.y"
8987 {
8988 if ((NODE *)((*yyvaluep).node_def_temp) == (NODE *)-1) {
8989 rb_parser_printf(p, "NODE_SPECIAL");
8990 }
8991 else if (((*yyvaluep).node_def_temp)) {
8992 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_def_temp)))));
8993 }
8994}
8995#line 8996 "parse.c"
8996 break;
8997
8998 case YYSYMBOL_value_expr_expr: /* value_expr_expr */
8999#line 2636 "parse.y"
9000 {
9001 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9002 rb_parser_printf(p, "NODE_SPECIAL");
9003 }
9004 else if (((*yyvaluep).node)) {
9005 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9006 }
9007}
9008#line 9009 "parse.c"
9009 break;
9010
9011 case YYSYMBOL_expr_value: /* expr_value */
9012#line 2636 "parse.y"
9013 {
9014 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9015 rb_parser_printf(p, "NODE_SPECIAL");
9016 }
9017 else if (((*yyvaluep).node)) {
9018 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9019 }
9020}
9021#line 9022 "parse.c"
9022 break;
9023
9024 case YYSYMBOL_expr_value_do: /* expr_value_do */
9025#line 2636 "parse.y"
9026 {
9027 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9028 rb_parser_printf(p, "NODE_SPECIAL");
9029 }
9030 else if (((*yyvaluep).node)) {
9031 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9032 }
9033}
9034#line 9035 "parse.c"
9035 break;
9036
9037 case YYSYMBOL_command_call: /* command_call */
9038#line 2636 "parse.y"
9039 {
9040 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9041 rb_parser_printf(p, "NODE_SPECIAL");
9042 }
9043 else if (((*yyvaluep).node)) {
9044 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9045 }
9046}
9047#line 9048 "parse.c"
9048 break;
9049
9050 case YYSYMBOL_value_expr_command_call: /* value_expr_command_call */
9051#line 2636 "parse.y"
9052 {
9053 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9054 rb_parser_printf(p, "NODE_SPECIAL");
9055 }
9056 else if (((*yyvaluep).node)) {
9057 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9058 }
9059}
9060#line 9061 "parse.c"
9061 break;
9062
9063 case YYSYMBOL_command_call_value: /* command_call_value */
9064#line 2636 "parse.y"
9065 {
9066 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9067 rb_parser_printf(p, "NODE_SPECIAL");
9068 }
9069 else if (((*yyvaluep).node)) {
9070 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9071 }
9072}
9073#line 9074 "parse.c"
9074 break;
9075
9076 case YYSYMBOL_block_command: /* block_command */
9077#line 2636 "parse.y"
9078 {
9079 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9080 rb_parser_printf(p, "NODE_SPECIAL");
9081 }
9082 else if (((*yyvaluep).node)) {
9083 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9084 }
9085}
9086#line 9087 "parse.c"
9087 break;
9088
9089 case YYSYMBOL_cmd_brace_block: /* cmd_brace_block */
9090#line 2636 "parse.y"
9091 {
9092 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9093 rb_parser_printf(p, "NODE_SPECIAL");
9094 }
9095 else if (((*yyvaluep).node)) {
9096 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9097 }
9098}
9099#line 9100 "parse.c"
9100 break;
9101
9102 case YYSYMBOL_fcall: /* fcall */
9103#line 2636 "parse.y"
9104 {
9105 if ((NODE *)((*yyvaluep).node_fcall) == (NODE *)-1) {
9106 rb_parser_printf(p, "NODE_SPECIAL");
9107 }
9108 else if (((*yyvaluep).node_fcall)) {
9109 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_fcall)))));
9110 }
9111}
9112#line 9113 "parse.c"
9113 break;
9114
9115 case YYSYMBOL_command: /* command */
9116#line 2636 "parse.y"
9117 {
9118 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9119 rb_parser_printf(p, "NODE_SPECIAL");
9120 }
9121 else if (((*yyvaluep).node)) {
9122 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9123 }
9124}
9125#line 9126 "parse.c"
9126 break;
9127
9128 case YYSYMBOL_mlhs: /* mlhs */
9129#line 2636 "parse.y"
9130 {
9131 if ((NODE *)((*yyvaluep).node_masgn) == (NODE *)-1) {
9132 rb_parser_printf(p, "NODE_SPECIAL");
9133 }
9134 else if (((*yyvaluep).node_masgn)) {
9135 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_masgn)))));
9136 }
9137}
9138#line 9139 "parse.c"
9139 break;
9140
9141 case YYSYMBOL_mlhs_inner: /* mlhs_inner */
9142#line 2636 "parse.y"
9143 {
9144 if ((NODE *)((*yyvaluep).node_masgn) == (NODE *)-1) {
9145 rb_parser_printf(p, "NODE_SPECIAL");
9146 }
9147 else if (((*yyvaluep).node_masgn)) {
9148 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_masgn)))));
9149 }
9150}
9151#line 9152 "parse.c"
9152 break;
9153
9154 case YYSYMBOL_mlhs_basic: /* mlhs_basic */
9155#line 2636 "parse.y"
9156 {
9157 if ((NODE *)((*yyvaluep).node_masgn) == (NODE *)-1) {
9158 rb_parser_printf(p, "NODE_SPECIAL");
9159 }
9160 else if (((*yyvaluep).node_masgn)) {
9161 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_masgn)))));
9162 }
9163}
9164#line 9165 "parse.c"
9165 break;
9166
9167 case YYSYMBOL_mlhs_items_mlhs_item: /* mlhs_items_mlhs_item */
9168#line 2636 "parse.y"
9169 {
9170 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9171 rb_parser_printf(p, "NODE_SPECIAL");
9172 }
9173 else if (((*yyvaluep).node)) {
9174 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9175 }
9176}
9177#line 9178 "parse.c"
9178 break;
9179
9180 case YYSYMBOL_mlhs_item: /* mlhs_item */
9181#line 2636 "parse.y"
9182 {
9183 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9184 rb_parser_printf(p, "NODE_SPECIAL");
9185 }
9186 else if (((*yyvaluep).node)) {
9187 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9188 }
9189}
9190#line 9191 "parse.c"
9191 break;
9192
9193 case YYSYMBOL_mlhs_head: /* mlhs_head */
9194#line 2636 "parse.y"
9195 {
9196 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9197 rb_parser_printf(p, "NODE_SPECIAL");
9198 }
9199 else if (((*yyvaluep).node)) {
9200 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9201 }
9202}
9203#line 9204 "parse.c"
9204 break;
9205
9206 case YYSYMBOL_mlhs_node: /* mlhs_node */
9207#line 2636 "parse.y"
9208 {
9209 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9210 rb_parser_printf(p, "NODE_SPECIAL");
9211 }
9212 else if (((*yyvaluep).node)) {
9213 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9214 }
9215}
9216#line 9217 "parse.c"
9217 break;
9218
9219 case YYSYMBOL_lhs: /* lhs */
9220#line 2636 "parse.y"
9221 {
9222 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9223 rb_parser_printf(p, "NODE_SPECIAL");
9224 }
9225 else if (((*yyvaluep).node)) {
9226 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9227 }
9228}
9229#line 9230 "parse.c"
9230 break;
9231
9232 case YYSYMBOL_cname: /* cname */
9233#line 2645 "parse.y"
9234 {
9235 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
9236}
9237#line 9238 "parse.c"
9238 break;
9239
9240 case YYSYMBOL_cpath: /* cpath */
9241#line 2636 "parse.y"
9242 {
9243 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9244 rb_parser_printf(p, "NODE_SPECIAL");
9245 }
9246 else if (((*yyvaluep).node)) {
9247 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9248 }
9249}
9250#line 9251 "parse.c"
9251 break;
9252
9253 case YYSYMBOL_fname: /* fname */
9254#line 2645 "parse.y"
9255 {
9256 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
9257}
9258#line 9259 "parse.c"
9259 break;
9260
9261 case YYSYMBOL_fitem: /* fitem */
9262#line 2636 "parse.y"
9263 {
9264 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9265 rb_parser_printf(p, "NODE_SPECIAL");
9266 }
9267 else if (((*yyvaluep).node)) {
9268 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9269 }
9270}
9271#line 9272 "parse.c"
9272 break;
9273
9274 case YYSYMBOL_undef_list: /* undef_list */
9275#line 2636 "parse.y"
9276 {
9277 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9278 rb_parser_printf(p, "NODE_SPECIAL");
9279 }
9280 else if (((*yyvaluep).node)) {
9281 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9282 }
9283}
9284#line 9285 "parse.c"
9285 break;
9286
9287 case YYSYMBOL_op: /* op */
9288#line 2645 "parse.y"
9289 {
9290 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
9291}
9292#line 9293 "parse.c"
9293 break;
9294
9295 case YYSYMBOL_reswords: /* reswords */
9296#line 2645 "parse.y"
9297 {
9298 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
9299}
9300#line 9301 "parse.c"
9301 break;
9302
9303 case YYSYMBOL_asgn_arg_rhs: /* asgn_arg_rhs */
9304#line 2636 "parse.y"
9305 {
9306 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9307 rb_parser_printf(p, "NODE_SPECIAL");
9308 }
9309 else if (((*yyvaluep).node)) {
9310 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9311 }
9312}
9313#line 9314 "parse.c"
9314 break;
9315
9316 case YYSYMBOL_arg: /* arg */
9317#line 2636 "parse.y"
9318 {
9319 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9320 rb_parser_printf(p, "NODE_SPECIAL");
9321 }
9322 else if (((*yyvaluep).node)) {
9323 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9324 }
9325}
9326#line 9327 "parse.c"
9327 break;
9328
9329 case YYSYMBOL_op_asgn_arg_rhs: /* op_asgn_arg_rhs */
9330#line 2636 "parse.y"
9331 {
9332 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9333 rb_parser_printf(p, "NODE_SPECIAL");
9334 }
9335 else if (((*yyvaluep).node)) {
9336 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9337 }
9338}
9339#line 9340 "parse.c"
9340 break;
9341
9342 case YYSYMBOL_range_expr_arg: /* range_expr_arg */
9343#line 2636 "parse.y"
9344 {
9345 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9346 rb_parser_printf(p, "NODE_SPECIAL");
9347 }
9348 else if (((*yyvaluep).node)) {
9349 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9350 }
9351}
9352#line 9353 "parse.c"
9353 break;
9354
9355 case YYSYMBOL_def_endless_method_endless_arg: /* def_endless_method_endless_arg */
9356#line 2636 "parse.y"
9357 {
9358 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9359 rb_parser_printf(p, "NODE_SPECIAL");
9360 }
9361 else if (((*yyvaluep).node)) {
9362 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9363 }
9364}
9365#line 9366 "parse.c"
9366 break;
9367
9368 case YYSYMBOL_ternary: /* ternary */
9369#line 2636 "parse.y"
9370 {
9371 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9372 rb_parser_printf(p, "NODE_SPECIAL");
9373 }
9374 else if (((*yyvaluep).node)) {
9375 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9376 }
9377}
9378#line 9379 "parse.c"
9379 break;
9380
9381 case YYSYMBOL_endless_arg: /* endless_arg */
9382#line 2636 "parse.y"
9383 {
9384 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9385 rb_parser_printf(p, "NODE_SPECIAL");
9386 }
9387 else if (((*yyvaluep).node)) {
9388 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9389 }
9390}
9391#line 9392 "parse.c"
9392 break;
9393
9394 case YYSYMBOL_relop: /* relop */
9395#line 2645 "parse.y"
9396 {
9397 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
9398}
9399#line 9400 "parse.c"
9400 break;
9401
9402 case YYSYMBOL_rel_expr: /* rel_expr */
9403#line 2636 "parse.y"
9404 {
9405 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9406 rb_parser_printf(p, "NODE_SPECIAL");
9407 }
9408 else if (((*yyvaluep).node)) {
9409 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9410 }
9411}
9412#line 9413 "parse.c"
9413 break;
9414
9415 case YYSYMBOL_value_expr_arg: /* value_expr_arg */
9416#line 2636 "parse.y"
9417 {
9418 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9419 rb_parser_printf(p, "NODE_SPECIAL");
9420 }
9421 else if (((*yyvaluep).node)) {
9422 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9423 }
9424}
9425#line 9426 "parse.c"
9426 break;
9427
9428 case YYSYMBOL_arg_value: /* arg_value */
9429#line 2636 "parse.y"
9430 {
9431 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9432 rb_parser_printf(p, "NODE_SPECIAL");
9433 }
9434 else if (((*yyvaluep).node)) {
9435 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9436 }
9437}
9438#line 9439 "parse.c"
9439 break;
9440
9441 case YYSYMBOL_aref_args: /* aref_args */
9442#line 2636 "parse.y"
9443 {
9444 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9445 rb_parser_printf(p, "NODE_SPECIAL");
9446 }
9447 else if (((*yyvaluep).node)) {
9448 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9449 }
9450}
9451#line 9452 "parse.c"
9452 break;
9453
9454 case YYSYMBOL_arg_rhs: /* arg_rhs */
9455#line 2636 "parse.y"
9456 {
9457 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9458 rb_parser_printf(p, "NODE_SPECIAL");
9459 }
9460 else if (((*yyvaluep).node)) {
9461 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9462 }
9463}
9464#line 9465 "parse.c"
9465 break;
9466
9467 case YYSYMBOL_paren_args: /* paren_args */
9468#line 2636 "parse.y"
9469 {
9470 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9471 rb_parser_printf(p, "NODE_SPECIAL");
9472 }
9473 else if (((*yyvaluep).node)) {
9474 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9475 }
9476}
9477#line 9478 "parse.c"
9478 break;
9479
9480 case YYSYMBOL_opt_paren_args: /* opt_paren_args */
9481#line 2636 "parse.y"
9482 {
9483 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9484 rb_parser_printf(p, "NODE_SPECIAL");
9485 }
9486 else if (((*yyvaluep).node)) {
9487 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9488 }
9489}
9490#line 9491 "parse.c"
9491 break;
9492
9493 case YYSYMBOL_opt_call_args: /* opt_call_args */
9494#line 2636 "parse.y"
9495 {
9496 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9497 rb_parser_printf(p, "NODE_SPECIAL");
9498 }
9499 else if (((*yyvaluep).node)) {
9500 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9501 }
9502}
9503#line 9504 "parse.c"
9504 break;
9505
9506 case YYSYMBOL_value_expr_command: /* value_expr_command */
9507#line 2636 "parse.y"
9508 {
9509 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9510 rb_parser_printf(p, "NODE_SPECIAL");
9511 }
9512 else if (((*yyvaluep).node)) {
9513 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9514 }
9515}
9516#line 9517 "parse.c"
9517 break;
9518
9519 case YYSYMBOL_call_args: /* call_args */
9520#line 2636 "parse.y"
9521 {
9522 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9523 rb_parser_printf(p, "NODE_SPECIAL");
9524 }
9525 else if (((*yyvaluep).node)) {
9526 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9527 }
9528}
9529#line 9530 "parse.c"
9530 break;
9531
9532 case YYSYMBOL_command_args: /* command_args */
9533#line 2636 "parse.y"
9534 {
9535 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9536 rb_parser_printf(p, "NODE_SPECIAL");
9537 }
9538 else if (((*yyvaluep).node)) {
9539 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9540 }
9541}
9542#line 9543 "parse.c"
9543 break;
9544
9545 case YYSYMBOL_block_arg: /* block_arg */
9546#line 2636 "parse.y"
9547 {
9548 if ((NODE *)((*yyvaluep).node_block_pass) == (NODE *)-1) {
9549 rb_parser_printf(p, "NODE_SPECIAL");
9550 }
9551 else if (((*yyvaluep).node_block_pass)) {
9552 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_block_pass)))));
9553 }
9554}
9555#line 9556 "parse.c"
9556 break;
9557
9558 case YYSYMBOL_opt_block_arg: /* opt_block_arg */
9559#line 2636 "parse.y"
9560 {
9561 if ((NODE *)((*yyvaluep).node_block_pass) == (NODE *)-1) {
9562 rb_parser_printf(p, "NODE_SPECIAL");
9563 }
9564 else if (((*yyvaluep).node_block_pass)) {
9565 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_block_pass)))));
9566 }
9567}
9568#line 9569 "parse.c"
9569 break;
9570
9571 case YYSYMBOL_args: /* args */
9572#line 2636 "parse.y"
9573 {
9574 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9575 rb_parser_printf(p, "NODE_SPECIAL");
9576 }
9577 else if (((*yyvaluep).node)) {
9578 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9579 }
9580}
9581#line 9582 "parse.c"
9582 break;
9583
9584 case YYSYMBOL_arg_splat: /* arg_splat */
9585#line 2636 "parse.y"
9586 {
9587 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9588 rb_parser_printf(p, "NODE_SPECIAL");
9589 }
9590 else if (((*yyvaluep).node)) {
9591 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9592 }
9593}
9594#line 9595 "parse.c"
9595 break;
9596
9597 case YYSYMBOL_mrhs_arg: /* mrhs_arg */
9598#line 2636 "parse.y"
9599 {
9600 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9601 rb_parser_printf(p, "NODE_SPECIAL");
9602 }
9603 else if (((*yyvaluep).node)) {
9604 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9605 }
9606}
9607#line 9608 "parse.c"
9608 break;
9609
9610 case YYSYMBOL_mrhs: /* mrhs */
9611#line 2636 "parse.y"
9612 {
9613 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9614 rb_parser_printf(p, "NODE_SPECIAL");
9615 }
9616 else if (((*yyvaluep).node)) {
9617 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9618 }
9619}
9620#line 9621 "parse.c"
9621 break;
9622
9623 case YYSYMBOL_primary: /* primary */
9624#line 2636 "parse.y"
9625 {
9626 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9627 rb_parser_printf(p, "NODE_SPECIAL");
9628 }
9629 else if (((*yyvaluep).node)) {
9630 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9631 }
9632}
9633#line 9634 "parse.c"
9634 break;
9635
9636 case YYSYMBOL_value_expr_primary: /* value_expr_primary */
9637#line 2636 "parse.y"
9638 {
9639 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9640 rb_parser_printf(p, "NODE_SPECIAL");
9641 }
9642 else if (((*yyvaluep).node)) {
9643 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9644 }
9645}
9646#line 9647 "parse.c"
9647 break;
9648
9649 case YYSYMBOL_primary_value: /* primary_value */
9650#line 2636 "parse.y"
9651 {
9652 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9653 rb_parser_printf(p, "NODE_SPECIAL");
9654 }
9655 else if (((*yyvaluep).node)) {
9656 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9657 }
9658}
9659#line 9660 "parse.c"
9660 break;
9661
9662 case YYSYMBOL_k_while: /* k_while */
9663#line 2636 "parse.y"
9664 {
9665 if ((NODE *)((*yyvaluep).node_exits) == (NODE *)-1) {
9666 rb_parser_printf(p, "NODE_SPECIAL");
9667 }
9668 else if (((*yyvaluep).node_exits)) {
9669 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_exits)))));
9670 }
9671}
9672#line 9673 "parse.c"
9673 break;
9674
9675 case YYSYMBOL_k_until: /* k_until */
9676#line 2636 "parse.y"
9677 {
9678 if ((NODE *)((*yyvaluep).node_exits) == (NODE *)-1) {
9679 rb_parser_printf(p, "NODE_SPECIAL");
9680 }
9681 else if (((*yyvaluep).node_exits)) {
9682 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_exits)))));
9683 }
9684}
9685#line 9686 "parse.c"
9686 break;
9687
9688 case YYSYMBOL_k_for: /* k_for */
9689#line 2636 "parse.y"
9690 {
9691 if ((NODE *)((*yyvaluep).node_exits) == (NODE *)-1) {
9692 rb_parser_printf(p, "NODE_SPECIAL");
9693 }
9694 else if (((*yyvaluep).node_exits)) {
9695 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_exits)))));
9696 }
9697}
9698#line 9699 "parse.c"
9699 break;
9700
9701 case YYSYMBOL_k_def: /* k_def */
9702#line 2636 "parse.y"
9703 {
9704 if ((NODE *)((*yyvaluep).node_def_temp) == (NODE *)-1) {
9705 rb_parser_printf(p, "NODE_SPECIAL");
9706 }
9707 else if (((*yyvaluep).node_def_temp)) {
9708 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_def_temp)))));
9709 }
9710}
9711#line 9712 "parse.c"
9712 break;
9713
9714 case YYSYMBOL_do: /* do */
9715#line 2645 "parse.y"
9716 {
9717 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
9718}
9719#line 9720 "parse.c"
9720 break;
9721
9722 case YYSYMBOL_if_tail: /* if_tail */
9723#line 2636 "parse.y"
9724 {
9725 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9726 rb_parser_printf(p, "NODE_SPECIAL");
9727 }
9728 else if (((*yyvaluep).node)) {
9729 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9730 }
9731}
9732#line 9733 "parse.c"
9733 break;
9734
9735 case YYSYMBOL_opt_else: /* opt_else */
9736#line 2636 "parse.y"
9737 {
9738 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9739 rb_parser_printf(p, "NODE_SPECIAL");
9740 }
9741 else if (((*yyvaluep).node)) {
9742 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9743 }
9744}
9745#line 9746 "parse.c"
9746 break;
9747
9748 case YYSYMBOL_for_var: /* for_var */
9749#line 2636 "parse.y"
9750 {
9751 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9752 rb_parser_printf(p, "NODE_SPECIAL");
9753 }
9754 else if (((*yyvaluep).node)) {
9755 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9756 }
9757}
9758#line 9759 "parse.c"
9759 break;
9760
9761 case YYSYMBOL_f_marg: /* f_marg */
9762#line 2636 "parse.y"
9763 {
9764 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9765 rb_parser_printf(p, "NODE_SPECIAL");
9766 }
9767 else if (((*yyvaluep).node)) {
9768 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9769 }
9770}
9771#line 9772 "parse.c"
9772 break;
9773
9774 case YYSYMBOL_mlhs_items_f_marg: /* mlhs_items_f_marg */
9775#line 2636 "parse.y"
9776 {
9777 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9778 rb_parser_printf(p, "NODE_SPECIAL");
9779 }
9780 else if (((*yyvaluep).node)) {
9781 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9782 }
9783}
9784#line 9785 "parse.c"
9785 break;
9786
9787 case YYSYMBOL_f_margs: /* f_margs */
9788#line 2636 "parse.y"
9789 {
9790 if ((NODE *)((*yyvaluep).node_masgn) == (NODE *)-1) {
9791 rb_parser_printf(p, "NODE_SPECIAL");
9792 }
9793 else if (((*yyvaluep).node_masgn)) {
9794 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_masgn)))));
9795 }
9796}
9797#line 9798 "parse.c"
9798 break;
9799
9800 case YYSYMBOL_f_rest_marg: /* f_rest_marg */
9801#line 2636 "parse.y"
9802 {
9803 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9804 rb_parser_printf(p, "NODE_SPECIAL");
9805 }
9806 else if (((*yyvaluep).node)) {
9807 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9808 }
9809}
9810#line 9811 "parse.c"
9811 break;
9812
9813 case YYSYMBOL_f_any_kwrest: /* f_any_kwrest */
9814#line 2645 "parse.y"
9815 {
9816 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
9817}
9818#line 9819 "parse.c"
9819 break;
9820
9821 case YYSYMBOL_f_kw_primary_value: /* f_kw_primary_value */
9822#line 2636 "parse.y"
9823 {
9824 if ((NODE *)((*yyvaluep).node_kw_arg) == (NODE *)-1) {
9825 rb_parser_printf(p, "NODE_SPECIAL");
9826 }
9827 else if (((*yyvaluep).node_kw_arg)) {
9828 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_kw_arg)))));
9829 }
9830}
9831#line 9832 "parse.c"
9832 break;
9833
9834 case YYSYMBOL_f_kwarg_primary_value: /* f_kwarg_primary_value */
9835#line 2636 "parse.y"
9836 {
9837 if ((NODE *)((*yyvaluep).node_kw_arg) == (NODE *)-1) {
9838 rb_parser_printf(p, "NODE_SPECIAL");
9839 }
9840 else if (((*yyvaluep).node_kw_arg)) {
9841 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_kw_arg)))));
9842 }
9843}
9844#line 9845 "parse.c"
9845 break;
9846
9847 case YYSYMBOL_opt_f_block_arg_none: /* opt_f_block_arg_none */
9848#line 2645 "parse.y"
9849 {
9850 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
9851}
9852#line 9853 "parse.c"
9853 break;
9854
9855 case YYSYMBOL_args_tail_basic_primary_value_none: /* args_tail_basic_primary_value_none */
9856#line 2636 "parse.y"
9857 {
9858 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
9859 rb_parser_printf(p, "NODE_SPECIAL");
9860 }
9861 else if (((*yyvaluep).node_args)) {
9862 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
9863 }
9864}
9865#line 9866 "parse.c"
9866 break;
9867
9868 case YYSYMBOL_block_args_tail: /* block_args_tail */
9869#line 2636 "parse.y"
9870 {
9871 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
9872 rb_parser_printf(p, "NODE_SPECIAL");
9873 }
9874 else if (((*yyvaluep).node_args)) {
9875 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
9876 }
9877}
9878#line 9879 "parse.c"
9879 break;
9880
9881 case YYSYMBOL_excessed_comma: /* excessed_comma */
9882#line 2645 "parse.y"
9883 {
9884 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
9885}
9886#line 9887 "parse.c"
9887 break;
9888
9889 case YYSYMBOL_f_opt_primary_value: /* f_opt_primary_value */
9890#line 2636 "parse.y"
9891 {
9892 if ((NODE *)((*yyvaluep).node_opt_arg) == (NODE *)-1) {
9893 rb_parser_printf(p, "NODE_SPECIAL");
9894 }
9895 else if (((*yyvaluep).node_opt_arg)) {
9896 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_opt_arg)))));
9897 }
9898}
9899#line 9900 "parse.c"
9900 break;
9901
9902 case YYSYMBOL_f_opt_arg_primary_value: /* f_opt_arg_primary_value */
9903#line 2636 "parse.y"
9904 {
9905 if ((NODE *)((*yyvaluep).node_opt_arg) == (NODE *)-1) {
9906 rb_parser_printf(p, "NODE_SPECIAL");
9907 }
9908 else if (((*yyvaluep).node_opt_arg)) {
9909 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_opt_arg)))));
9910 }
9911}
9912#line 9913 "parse.c"
9913 break;
9914
9915 case YYSYMBOL_opt_args_tail_block_args_tail_none: /* opt_args_tail_block_args_tail_none */
9916#line 2636 "parse.y"
9917 {
9918 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
9919 rb_parser_printf(p, "NODE_SPECIAL");
9920 }
9921 else if (((*yyvaluep).node_args)) {
9922 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
9923 }
9924}
9925#line 9926 "parse.c"
9926 break;
9927
9928 case YYSYMBOL_args_list_primary_value_opt_args_tail_block_args_tail_none: /* args-list_primary_value_opt_args_tail_block_args_tail_none */
9929#line 2636 "parse.y"
9930 {
9931 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
9932 rb_parser_printf(p, "NODE_SPECIAL");
9933 }
9934 else if (((*yyvaluep).node_args)) {
9935 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
9936 }
9937}
9938#line 9939 "parse.c"
9939 break;
9940
9941 case YYSYMBOL_block_param: /* block_param */
9942#line 2636 "parse.y"
9943 {
9944 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
9945 rb_parser_printf(p, "NODE_SPECIAL");
9946 }
9947 else if (((*yyvaluep).node_args)) {
9948 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
9949 }
9950}
9951#line 9952 "parse.c"
9952 break;
9953
9954 case YYSYMBOL_tail_only_args_block_args_tail: /* tail-only-args_block_args_tail */
9955#line 2636 "parse.y"
9956 {
9957 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
9958 rb_parser_printf(p, "NODE_SPECIAL");
9959 }
9960 else if (((*yyvaluep).node_args)) {
9961 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
9962 }
9963}
9964#line 9965 "parse.c"
9965 break;
9966
9967 case YYSYMBOL_opt_block_param_def: /* opt_block_param_def */
9968#line 2636 "parse.y"
9969 {
9970 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
9971 rb_parser_printf(p, "NODE_SPECIAL");
9972 }
9973 else if (((*yyvaluep).node_args)) {
9974 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
9975 }
9976}
9977#line 9978 "parse.c"
9978 break;
9979
9980 case YYSYMBOL_block_param_def: /* block_param_def */
9981#line 2636 "parse.y"
9982 {
9983 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
9984 rb_parser_printf(p, "NODE_SPECIAL");
9985 }
9986 else if (((*yyvaluep).node_args)) {
9987 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
9988 }
9989}
9990#line 9991 "parse.c"
9991 break;
9992
9993 case YYSYMBOL_opt_block_param: /* opt_block_param */
9994#line 2636 "parse.y"
9995 {
9996 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
9997 rb_parser_printf(p, "NODE_SPECIAL");
9998 }
9999 else if (((*yyvaluep).node_args)) {
10000 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
10001 }
10002}
10003#line 10004 "parse.c"
10004 break;
10005
10006 case YYSYMBOL_opt_bv_decl: /* opt_bv_decl */
10007#line 2645 "parse.y"
10008 {
10009 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
10010}
10011#line 10012 "parse.c"
10012 break;
10013
10014 case YYSYMBOL_bv_decls: /* bv_decls */
10015#line 2645 "parse.y"
10016 {
10017 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
10018}
10019#line 10020 "parse.c"
10020 break;
10021
10022 case YYSYMBOL_bvar: /* bvar */
10023#line 2645 "parse.y"
10024 {
10025 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
10026}
10027#line 10028 "parse.c"
10028 break;
10029
10030 case YYSYMBOL_numparam: /* numparam */
10031#line 2636 "parse.y"
10032 {
10033 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10034 rb_parser_printf(p, "NODE_SPECIAL");
10035 }
10036 else if (((*yyvaluep).node)) {
10037 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10038 }
10039}
10040#line 10041 "parse.c"
10041 break;
10042
10043 case YYSYMBOL_it_id: /* it_id */
10044#line 2645 "parse.y"
10045 {
10046 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
10047}
10048#line 10049 "parse.c"
10049 break;
10050
10051 case YYSYMBOL_lambda: /* lambda */
10052#line 2636 "parse.y"
10053 {
10054 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10055 rb_parser_printf(p, "NODE_SPECIAL");
10056 }
10057 else if (((*yyvaluep).node)) {
10058 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10059 }
10060}
10061#line 10062 "parse.c"
10062 break;
10063
10064 case YYSYMBOL_f_larglist: /* f_larglist */
10065#line 2636 "parse.y"
10066 {
10067 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
10068 rb_parser_printf(p, "NODE_SPECIAL");
10069 }
10070 else if (((*yyvaluep).node_args)) {
10071 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
10072 }
10073}
10074#line 10075 "parse.c"
10075 break;
10076
10077 case YYSYMBOL_do_block: /* do_block */
10078#line 2636 "parse.y"
10079 {
10080 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10081 rb_parser_printf(p, "NODE_SPECIAL");
10082 }
10083 else if (((*yyvaluep).node)) {
10084 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10085 }
10086}
10087#line 10088 "parse.c"
10088 break;
10089
10090 case YYSYMBOL_block_call: /* block_call */
10091#line 2636 "parse.y"
10092 {
10093 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10094 rb_parser_printf(p, "NODE_SPECIAL");
10095 }
10096 else if (((*yyvaluep).node)) {
10097 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10098 }
10099}
10100#line 10101 "parse.c"
10101 break;
10102
10103 case YYSYMBOL_method_call: /* method_call */
10104#line 2636 "parse.y"
10105 {
10106 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10107 rb_parser_printf(p, "NODE_SPECIAL");
10108 }
10109 else if (((*yyvaluep).node)) {
10110 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10111 }
10112}
10113#line 10114 "parse.c"
10114 break;
10115
10116 case YYSYMBOL_brace_block: /* brace_block */
10117#line 2636 "parse.y"
10118 {
10119 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10120 rb_parser_printf(p, "NODE_SPECIAL");
10121 }
10122 else if (((*yyvaluep).node)) {
10123 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10124 }
10125}
10126#line 10127 "parse.c"
10127 break;
10128
10129 case YYSYMBOL_brace_body: /* brace_body */
10130#line 2636 "parse.y"
10131 {
10132 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10133 rb_parser_printf(p, "NODE_SPECIAL");
10134 }
10135 else if (((*yyvaluep).node)) {
10136 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10137 }
10138}
10139#line 10140 "parse.c"
10140 break;
10141
10142 case YYSYMBOL_do_body: /* do_body */
10143#line 2636 "parse.y"
10144 {
10145 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10146 rb_parser_printf(p, "NODE_SPECIAL");
10147 }
10148 else if (((*yyvaluep).node)) {
10149 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10150 }
10151}
10152#line 10153 "parse.c"
10153 break;
10154
10155 case YYSYMBOL_case_args: /* case_args */
10156#line 2636 "parse.y"
10157 {
10158 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10159 rb_parser_printf(p, "NODE_SPECIAL");
10160 }
10161 else if (((*yyvaluep).node)) {
10162 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10163 }
10164}
10165#line 10166 "parse.c"
10166 break;
10167
10168 case YYSYMBOL_case_body: /* case_body */
10169#line 2636 "parse.y"
10170 {
10171 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10172 rb_parser_printf(p, "NODE_SPECIAL");
10173 }
10174 else if (((*yyvaluep).node)) {
10175 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10176 }
10177}
10178#line 10179 "parse.c"
10179 break;
10180
10181 case YYSYMBOL_cases: /* cases */
10182#line 2636 "parse.y"
10183 {
10184 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10185 rb_parser_printf(p, "NODE_SPECIAL");
10186 }
10187 else if (((*yyvaluep).node)) {
10188 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10189 }
10190}
10191#line 10192 "parse.c"
10192 break;
10193
10194 case YYSYMBOL_p_case_body: /* p_case_body */
10195#line 2636 "parse.y"
10196 {
10197 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10198 rb_parser_printf(p, "NODE_SPECIAL");
10199 }
10200 else if (((*yyvaluep).node)) {
10201 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10202 }
10203}
10204#line 10205 "parse.c"
10205 break;
10206
10207 case YYSYMBOL_p_cases: /* p_cases */
10208#line 2636 "parse.y"
10209 {
10210 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10211 rb_parser_printf(p, "NODE_SPECIAL");
10212 }
10213 else if (((*yyvaluep).node)) {
10214 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10215 }
10216}
10217#line 10218 "parse.c"
10218 break;
10219
10220 case YYSYMBOL_p_top_expr: /* p_top_expr */
10221#line 2636 "parse.y"
10222 {
10223 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10224 rb_parser_printf(p, "NODE_SPECIAL");
10225 }
10226 else if (((*yyvaluep).node)) {
10227 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10228 }
10229}
10230#line 10231 "parse.c"
10231 break;
10232
10233 case YYSYMBOL_p_top_expr_body: /* p_top_expr_body */
10234#line 2636 "parse.y"
10235 {
10236 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10237 rb_parser_printf(p, "NODE_SPECIAL");
10238 }
10239 else if (((*yyvaluep).node)) {
10240 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10241 }
10242}
10243#line 10244 "parse.c"
10244 break;
10245
10246 case YYSYMBOL_p_expr: /* p_expr */
10247#line 2636 "parse.y"
10248 {
10249 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10250 rb_parser_printf(p, "NODE_SPECIAL");
10251 }
10252 else if (((*yyvaluep).node)) {
10253 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10254 }
10255}
10256#line 10257 "parse.c"
10257 break;
10258
10259 case YYSYMBOL_p_as: /* p_as */
10260#line 2636 "parse.y"
10261 {
10262 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10263 rb_parser_printf(p, "NODE_SPECIAL");
10264 }
10265 else if (((*yyvaluep).node)) {
10266 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10267 }
10268}
10269#line 10270 "parse.c"
10270 break;
10271
10272 case YYSYMBOL_p_alt: /* p_alt */
10273#line 2636 "parse.y"
10274 {
10275 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10276 rb_parser_printf(p, "NODE_SPECIAL");
10277 }
10278 else if (((*yyvaluep).node)) {
10279 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10280 }
10281}
10282#line 10283 "parse.c"
10283 break;
10284
10285 case YYSYMBOL_p_expr_basic: /* p_expr_basic */
10286#line 2636 "parse.y"
10287 {
10288 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10289 rb_parser_printf(p, "NODE_SPECIAL");
10290 }
10291 else if (((*yyvaluep).node)) {
10292 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10293 }
10294}
10295#line 10296 "parse.c"
10296 break;
10297
10298 case YYSYMBOL_p_args: /* p_args */
10299#line 2636 "parse.y"
10300 {
10301 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10302 rb_parser_printf(p, "NODE_SPECIAL");
10303 }
10304 else if (((*yyvaluep).node)) {
10305 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10306 }
10307}
10308#line 10309 "parse.c"
10309 break;
10310
10311 case YYSYMBOL_p_args_head: /* p_args_head */
10312#line 2636 "parse.y"
10313 {
10314 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10315 rb_parser_printf(p, "NODE_SPECIAL");
10316 }
10317 else if (((*yyvaluep).node)) {
10318 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10319 }
10320}
10321#line 10322 "parse.c"
10322 break;
10323
10324 case YYSYMBOL_p_args_tail: /* p_args_tail */
10325#line 2636 "parse.y"
10326 {
10327 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10328 rb_parser_printf(p, "NODE_SPECIAL");
10329 }
10330 else if (((*yyvaluep).node)) {
10331 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10332 }
10333}
10334#line 10335 "parse.c"
10335 break;
10336
10337 case YYSYMBOL_p_find: /* p_find */
10338#line 2636 "parse.y"
10339 {
10340 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10341 rb_parser_printf(p, "NODE_SPECIAL");
10342 }
10343 else if (((*yyvaluep).node)) {
10344 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10345 }
10346}
10347#line 10348 "parse.c"
10348 break;
10349
10350 case YYSYMBOL_p_rest: /* p_rest */
10351#line 2636 "parse.y"
10352 {
10353 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10354 rb_parser_printf(p, "NODE_SPECIAL");
10355 }
10356 else if (((*yyvaluep).node)) {
10357 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10358 }
10359}
10360#line 10361 "parse.c"
10361 break;
10362
10363 case YYSYMBOL_p_args_post: /* p_args_post */
10364#line 2636 "parse.y"
10365 {
10366 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10367 rb_parser_printf(p, "NODE_SPECIAL");
10368 }
10369 else if (((*yyvaluep).node)) {
10370 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10371 }
10372}
10373#line 10374 "parse.c"
10374 break;
10375
10376 case YYSYMBOL_p_arg: /* p_arg */
10377#line 2636 "parse.y"
10378 {
10379 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10380 rb_parser_printf(p, "NODE_SPECIAL");
10381 }
10382 else if (((*yyvaluep).node)) {
10383 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10384 }
10385}
10386#line 10387 "parse.c"
10387 break;
10388
10389 case YYSYMBOL_p_kwargs: /* p_kwargs */
10390#line 2636 "parse.y"
10391 {
10392 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10393 rb_parser_printf(p, "NODE_SPECIAL");
10394 }
10395 else if (((*yyvaluep).node)) {
10396 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10397 }
10398}
10399#line 10400 "parse.c"
10400 break;
10401
10402 case YYSYMBOL_p_kwarg: /* p_kwarg */
10403#line 2636 "parse.y"
10404 {
10405 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10406 rb_parser_printf(p, "NODE_SPECIAL");
10407 }
10408 else if (((*yyvaluep).node)) {
10409 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10410 }
10411}
10412#line 10413 "parse.c"
10413 break;
10414
10415 case YYSYMBOL_p_kw: /* p_kw */
10416#line 2636 "parse.y"
10417 {
10418 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10419 rb_parser_printf(p, "NODE_SPECIAL");
10420 }
10421 else if (((*yyvaluep).node)) {
10422 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10423 }
10424}
10425#line 10426 "parse.c"
10426 break;
10427
10428 case YYSYMBOL_p_kw_label: /* p_kw_label */
10429#line 2645 "parse.y"
10430 {
10431 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
10432}
10433#line 10434 "parse.c"
10434 break;
10435
10436 case YYSYMBOL_p_kwrest: /* p_kwrest */
10437#line 2645 "parse.y"
10438 {
10439 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
10440}
10441#line 10442 "parse.c"
10442 break;
10443
10444 case YYSYMBOL_p_kwnorest: /* p_kwnorest */
10445#line 2645 "parse.y"
10446 {
10447 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
10448}
10449#line 10450 "parse.c"
10450 break;
10451
10452 case YYSYMBOL_p_any_kwrest: /* p_any_kwrest */
10453#line 2645 "parse.y"
10454 {
10455 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
10456}
10457#line 10458 "parse.c"
10458 break;
10459
10460 case YYSYMBOL_p_value: /* p_value */
10461#line 2636 "parse.y"
10462 {
10463 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10464 rb_parser_printf(p, "NODE_SPECIAL");
10465 }
10466 else if (((*yyvaluep).node)) {
10467 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10468 }
10469}
10470#line 10471 "parse.c"
10471 break;
10472
10473 case YYSYMBOL_range_expr_p_primitive: /* range_expr_p_primitive */
10474#line 2636 "parse.y"
10475 {
10476 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10477 rb_parser_printf(p, "NODE_SPECIAL");
10478 }
10479 else if (((*yyvaluep).node)) {
10480 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10481 }
10482}
10483#line 10484 "parse.c"
10484 break;
10485
10486 case YYSYMBOL_p_primitive: /* p_primitive */
10487#line 2636 "parse.y"
10488 {
10489 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10490 rb_parser_printf(p, "NODE_SPECIAL");
10491 }
10492 else if (((*yyvaluep).node)) {
10493 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10494 }
10495}
10496#line 10497 "parse.c"
10497 break;
10498
10499 case YYSYMBOL_p_variable: /* p_variable */
10500#line 2636 "parse.y"
10501 {
10502 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10503 rb_parser_printf(p, "NODE_SPECIAL");
10504 }
10505 else if (((*yyvaluep).node)) {
10506 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10507 }
10508}
10509#line 10510 "parse.c"
10510 break;
10511
10512 case YYSYMBOL_p_var_ref: /* p_var_ref */
10513#line 2636 "parse.y"
10514 {
10515 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10516 rb_parser_printf(p, "NODE_SPECIAL");
10517 }
10518 else if (((*yyvaluep).node)) {
10519 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10520 }
10521}
10522#line 10523 "parse.c"
10523 break;
10524
10525 case YYSYMBOL_p_expr_ref: /* p_expr_ref */
10526#line 2636 "parse.y"
10527 {
10528 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10529 rb_parser_printf(p, "NODE_SPECIAL");
10530 }
10531 else if (((*yyvaluep).node)) {
10532 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10533 }
10534}
10535#line 10536 "parse.c"
10536 break;
10537
10538 case YYSYMBOL_p_const: /* p_const */
10539#line 2636 "parse.y"
10540 {
10541 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10542 rb_parser_printf(p, "NODE_SPECIAL");
10543 }
10544 else if (((*yyvaluep).node)) {
10545 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10546 }
10547}
10548#line 10549 "parse.c"
10549 break;
10550
10551 case YYSYMBOL_opt_rescue: /* opt_rescue */
10552#line 2636 "parse.y"
10553 {
10554 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10555 rb_parser_printf(p, "NODE_SPECIAL");
10556 }
10557 else if (((*yyvaluep).node)) {
10558 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10559 }
10560}
10561#line 10562 "parse.c"
10562 break;
10563
10564 case YYSYMBOL_exc_list: /* exc_list */
10565#line 2636 "parse.y"
10566 {
10567 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10568 rb_parser_printf(p, "NODE_SPECIAL");
10569 }
10570 else if (((*yyvaluep).node)) {
10571 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10572 }
10573}
10574#line 10575 "parse.c"
10575 break;
10576
10577 case YYSYMBOL_exc_var: /* exc_var */
10578#line 2636 "parse.y"
10579 {
10580 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10581 rb_parser_printf(p, "NODE_SPECIAL");
10582 }
10583 else if (((*yyvaluep).node)) {
10584 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10585 }
10586}
10587#line 10588 "parse.c"
10588 break;
10589
10590 case YYSYMBOL_opt_ensure: /* opt_ensure */
10591#line 2636 "parse.y"
10592 {
10593 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10594 rb_parser_printf(p, "NODE_SPECIAL");
10595 }
10596 else if (((*yyvaluep).node)) {
10597 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10598 }
10599}
10600#line 10601 "parse.c"
10601 break;
10602
10603 case YYSYMBOL_literal: /* literal */
10604#line 2636 "parse.y"
10605 {
10606 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10607 rb_parser_printf(p, "NODE_SPECIAL");
10608 }
10609 else if (((*yyvaluep).node)) {
10610 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10611 }
10612}
10613#line 10614 "parse.c"
10614 break;
10615
10616 case YYSYMBOL_strings: /* strings */
10617#line 2636 "parse.y"
10618 {
10619 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10620 rb_parser_printf(p, "NODE_SPECIAL");
10621 }
10622 else if (((*yyvaluep).node)) {
10623 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10624 }
10625}
10626#line 10627 "parse.c"
10627 break;
10628
10629 case YYSYMBOL_string: /* string */
10630#line 2636 "parse.y"
10631 {
10632 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10633 rb_parser_printf(p, "NODE_SPECIAL");
10634 }
10635 else if (((*yyvaluep).node)) {
10636 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10637 }
10638}
10639#line 10640 "parse.c"
10640 break;
10641
10642 case YYSYMBOL_string1: /* string1 */
10643#line 2636 "parse.y"
10644 {
10645 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10646 rb_parser_printf(p, "NODE_SPECIAL");
10647 }
10648 else if (((*yyvaluep).node)) {
10649 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10650 }
10651}
10652#line 10653 "parse.c"
10653 break;
10654
10655 case YYSYMBOL_xstring: /* xstring */
10656#line 2636 "parse.y"
10657 {
10658 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10659 rb_parser_printf(p, "NODE_SPECIAL");
10660 }
10661 else if (((*yyvaluep).node)) {
10662 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10663 }
10664}
10665#line 10666 "parse.c"
10666 break;
10667
10668 case YYSYMBOL_regexp: /* regexp */
10669#line 2636 "parse.y"
10670 {
10671 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10672 rb_parser_printf(p, "NODE_SPECIAL");
10673 }
10674 else if (((*yyvaluep).node)) {
10675 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10676 }
10677}
10678#line 10679 "parse.c"
10679 break;
10680
10681 case YYSYMBOL_words_tWORDS_BEG_word_list: /* words_tWORDS_BEG_word_list */
10682#line 2636 "parse.y"
10683 {
10684 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10685 rb_parser_printf(p, "NODE_SPECIAL");
10686 }
10687 else if (((*yyvaluep).node)) {
10688 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10689 }
10690}
10691#line 10692 "parse.c"
10692 break;
10693
10694 case YYSYMBOL_words: /* words */
10695#line 2636 "parse.y"
10696 {
10697 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10698 rb_parser_printf(p, "NODE_SPECIAL");
10699 }
10700 else if (((*yyvaluep).node)) {
10701 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10702 }
10703}
10704#line 10705 "parse.c"
10705 break;
10706
10707 case YYSYMBOL_word_list: /* word_list */
10708#line 2636 "parse.y"
10709 {
10710 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10711 rb_parser_printf(p, "NODE_SPECIAL");
10712 }
10713 else if (((*yyvaluep).node)) {
10714 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10715 }
10716}
10717#line 10718 "parse.c"
10718 break;
10719
10720 case YYSYMBOL_word: /* word */
10721#line 2636 "parse.y"
10722 {
10723 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10724 rb_parser_printf(p, "NODE_SPECIAL");
10725 }
10726 else if (((*yyvaluep).node)) {
10727 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10728 }
10729}
10730#line 10731 "parse.c"
10731 break;
10732
10733 case YYSYMBOL_words_tSYMBOLS_BEG_symbol_list: /* words_tSYMBOLS_BEG_symbol_list */
10734#line 2636 "parse.y"
10735 {
10736 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10737 rb_parser_printf(p, "NODE_SPECIAL");
10738 }
10739 else if (((*yyvaluep).node)) {
10740 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10741 }
10742}
10743#line 10744 "parse.c"
10744 break;
10745
10746 case YYSYMBOL_symbols: /* symbols */
10747#line 2636 "parse.y"
10748 {
10749 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10750 rb_parser_printf(p, "NODE_SPECIAL");
10751 }
10752 else if (((*yyvaluep).node)) {
10753 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10754 }
10755}
10756#line 10757 "parse.c"
10757 break;
10758
10759 case YYSYMBOL_symbol_list: /* symbol_list */
10760#line 2636 "parse.y"
10761 {
10762 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10763 rb_parser_printf(p, "NODE_SPECIAL");
10764 }
10765 else if (((*yyvaluep).node)) {
10766 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10767 }
10768}
10769#line 10770 "parse.c"
10770 break;
10771
10772 case YYSYMBOL_words_tQWORDS_BEG_qword_list: /* words_tQWORDS_BEG_qword_list */
10773#line 2636 "parse.y"
10774 {
10775 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10776 rb_parser_printf(p, "NODE_SPECIAL");
10777 }
10778 else if (((*yyvaluep).node)) {
10779 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10780 }
10781}
10782#line 10783 "parse.c"
10783 break;
10784
10785 case YYSYMBOL_qwords: /* qwords */
10786#line 2636 "parse.y"
10787 {
10788 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10789 rb_parser_printf(p, "NODE_SPECIAL");
10790 }
10791 else if (((*yyvaluep).node)) {
10792 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10793 }
10794}
10795#line 10796 "parse.c"
10796 break;
10797
10798 case YYSYMBOL_words_tQSYMBOLS_BEG_qsym_list: /* words_tQSYMBOLS_BEG_qsym_list */
10799#line 2636 "parse.y"
10800 {
10801 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10802 rb_parser_printf(p, "NODE_SPECIAL");
10803 }
10804 else if (((*yyvaluep).node)) {
10805 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10806 }
10807}
10808#line 10809 "parse.c"
10809 break;
10810
10811 case YYSYMBOL_qsymbols: /* qsymbols */
10812#line 2636 "parse.y"
10813 {
10814 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10815 rb_parser_printf(p, "NODE_SPECIAL");
10816 }
10817 else if (((*yyvaluep).node)) {
10818 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10819 }
10820}
10821#line 10822 "parse.c"
10822 break;
10823
10824 case YYSYMBOL_qword_list: /* qword_list */
10825#line 2636 "parse.y"
10826 {
10827 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10828 rb_parser_printf(p, "NODE_SPECIAL");
10829 }
10830 else if (((*yyvaluep).node)) {
10831 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10832 }
10833}
10834#line 10835 "parse.c"
10835 break;
10836
10837 case YYSYMBOL_qsym_list: /* qsym_list */
10838#line 2636 "parse.y"
10839 {
10840 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10841 rb_parser_printf(p, "NODE_SPECIAL");
10842 }
10843 else if (((*yyvaluep).node)) {
10844 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10845 }
10846}
10847#line 10848 "parse.c"
10848 break;
10849
10850 case YYSYMBOL_string_contents: /* string_contents */
10851#line 2636 "parse.y"
10852 {
10853 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10854 rb_parser_printf(p, "NODE_SPECIAL");
10855 }
10856 else if (((*yyvaluep).node)) {
10857 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10858 }
10859}
10860#line 10861 "parse.c"
10861 break;
10862
10863 case YYSYMBOL_xstring_contents: /* xstring_contents */
10864#line 2636 "parse.y"
10865 {
10866 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10867 rb_parser_printf(p, "NODE_SPECIAL");
10868 }
10869 else if (((*yyvaluep).node)) {
10870 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10871 }
10872}
10873#line 10874 "parse.c"
10874 break;
10875
10876 case YYSYMBOL_regexp_contents: /* regexp_contents */
10877#line 2636 "parse.y"
10878 {
10879 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10880 rb_parser_printf(p, "NODE_SPECIAL");
10881 }
10882 else if (((*yyvaluep).node)) {
10883 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10884 }
10885}
10886#line 10887 "parse.c"
10887 break;
10888
10889 case YYSYMBOL_string_content: /* string_content */
10890#line 2636 "parse.y"
10891 {
10892 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10893 rb_parser_printf(p, "NODE_SPECIAL");
10894 }
10895 else if (((*yyvaluep).node)) {
10896 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10897 }
10898}
10899#line 10900 "parse.c"
10900 break;
10901
10902 case YYSYMBOL_string_dvar: /* string_dvar */
10903#line 2636 "parse.y"
10904 {
10905 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10906 rb_parser_printf(p, "NODE_SPECIAL");
10907 }
10908 else if (((*yyvaluep).node)) {
10909 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10910 }
10911}
10912#line 10913 "parse.c"
10913 break;
10914
10915 case YYSYMBOL_symbol: /* symbol */
10916#line 2636 "parse.y"
10917 {
10918 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10919 rb_parser_printf(p, "NODE_SPECIAL");
10920 }
10921 else if (((*yyvaluep).node)) {
10922 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10923 }
10924}
10925#line 10926 "parse.c"
10926 break;
10927
10928 case YYSYMBOL_ssym: /* ssym */
10929#line 2636 "parse.y"
10930 {
10931 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10932 rb_parser_printf(p, "NODE_SPECIAL");
10933 }
10934 else if (((*yyvaluep).node)) {
10935 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10936 }
10937}
10938#line 10939 "parse.c"
10939 break;
10940
10941 case YYSYMBOL_sym: /* sym */
10942#line 2645 "parse.y"
10943 {
10944 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
10945}
10946#line 10947 "parse.c"
10947 break;
10948
10949 case YYSYMBOL_dsym: /* dsym */
10950#line 2636 "parse.y"
10951 {
10952 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10953 rb_parser_printf(p, "NODE_SPECIAL");
10954 }
10955 else if (((*yyvaluep).node)) {
10956 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10957 }
10958}
10959#line 10960 "parse.c"
10960 break;
10961
10962 case YYSYMBOL_numeric: /* numeric */
10963#line 2636 "parse.y"
10964 {
10965 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10966 rb_parser_printf(p, "NODE_SPECIAL");
10967 }
10968 else if (((*yyvaluep).node)) {
10969 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10970 }
10971}
10972#line 10973 "parse.c"
10973 break;
10974
10975 case YYSYMBOL_simple_numeric: /* simple_numeric */
10976#line 2636 "parse.y"
10977 {
10978 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10979 rb_parser_printf(p, "NODE_SPECIAL");
10980 }
10981 else if (((*yyvaluep).node)) {
10982 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10983 }
10984}
10985#line 10986 "parse.c"
10986 break;
10987
10988 case YYSYMBOL_nonlocal_var: /* nonlocal_var */
10989#line 2645 "parse.y"
10990 {
10991 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
10992}
10993#line 10994 "parse.c"
10994 break;
10995
10996 case YYSYMBOL_user_variable: /* user_variable */
10997#line 2645 "parse.y"
10998 {
10999 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
11000}
11001#line 11002 "parse.c"
11002 break;
11003
11004 case YYSYMBOL_keyword_variable: /* keyword_variable */
11005#line 2645 "parse.y"
11006 {
11007 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
11008}
11009#line 11010 "parse.c"
11010 break;
11011
11012 case YYSYMBOL_var_ref: /* var_ref */
11013#line 2636 "parse.y"
11014 {
11015 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
11016 rb_parser_printf(p, "NODE_SPECIAL");
11017 }
11018 else if (((*yyvaluep).node)) {
11019 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
11020 }
11021}
11022#line 11023 "parse.c"
11023 break;
11024
11025 case YYSYMBOL_var_lhs: /* var_lhs */
11026#line 2636 "parse.y"
11027 {
11028 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
11029 rb_parser_printf(p, "NODE_SPECIAL");
11030 }
11031 else if (((*yyvaluep).node)) {
11032 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
11033 }
11034}
11035#line 11036 "parse.c"
11036 break;
11037
11038 case YYSYMBOL_backref: /* backref */
11039#line 2636 "parse.y"
11040 {
11041 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
11042 rb_parser_printf(p, "NODE_SPECIAL");
11043 }
11044 else if (((*yyvaluep).node)) {
11045 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
11046 }
11047}
11048#line 11049 "parse.c"
11049 break;
11050
11051 case YYSYMBOL_superclass: /* superclass */
11052#line 2636 "parse.y"
11053 {
11054 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
11055 rb_parser_printf(p, "NODE_SPECIAL");
11056 }
11057 else if (((*yyvaluep).node)) {
11058 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
11059 }
11060}
11061#line 11062 "parse.c"
11062 break;
11063
11064 case YYSYMBOL_f_opt_paren_args: /* f_opt_paren_args */
11065#line 2636 "parse.y"
11066 {
11067 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
11068 rb_parser_printf(p, "NODE_SPECIAL");
11069 }
11070 else if (((*yyvaluep).node_args)) {
11071 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
11072 }
11073}
11074#line 11075 "parse.c"
11075 break;
11076
11077 case YYSYMBOL_f_empty_arg: /* f_empty_arg */
11078#line 2636 "parse.y"
11079 {
11080 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
11081 rb_parser_printf(p, "NODE_SPECIAL");
11082 }
11083 else if (((*yyvaluep).node_args)) {
11084 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
11085 }
11086}
11087#line 11088 "parse.c"
11088 break;
11089
11090 case YYSYMBOL_f_paren_args: /* f_paren_args */
11091#line 2636 "parse.y"
11092 {
11093 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
11094 rb_parser_printf(p, "NODE_SPECIAL");
11095 }
11096 else if (((*yyvaluep).node_args)) {
11097 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
11098 }
11099}
11100#line 11101 "parse.c"
11101 break;
11102
11103 case YYSYMBOL_f_arglist: /* f_arglist */
11104#line 2636 "parse.y"
11105 {
11106 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
11107 rb_parser_printf(p, "NODE_SPECIAL");
11108 }
11109 else if (((*yyvaluep).node_args)) {
11110 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
11111 }
11112}
11113#line 11114 "parse.c"
11114 break;
11115
11116 case YYSYMBOL_f_kw_arg_value: /* f_kw_arg_value */
11117#line 2636 "parse.y"
11118 {
11119 if ((NODE *)((*yyvaluep).node_kw_arg) == (NODE *)-1) {
11120 rb_parser_printf(p, "NODE_SPECIAL");
11121 }
11122 else if (((*yyvaluep).node_kw_arg)) {
11123 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_kw_arg)))));
11124 }
11125}
11126#line 11127 "parse.c"
11127 break;
11128
11129 case YYSYMBOL_f_kwarg_arg_value: /* f_kwarg_arg_value */
11130#line 2636 "parse.y"
11131 {
11132 if ((NODE *)((*yyvaluep).node_kw_arg) == (NODE *)-1) {
11133 rb_parser_printf(p, "NODE_SPECIAL");
11134 }
11135 else if (((*yyvaluep).node_kw_arg)) {
11136 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_kw_arg)))));
11137 }
11138}
11139#line 11140 "parse.c"
11140 break;
11141
11142 case YYSYMBOL_opt_f_block_arg_opt_comma: /* opt_f_block_arg_opt_comma */
11143#line 2645 "parse.y"
11144 {
11145 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
11146}
11147#line 11148 "parse.c"
11148 break;
11149
11150 case YYSYMBOL_args_tail_basic_arg_value_opt_comma: /* args_tail_basic_arg_value_opt_comma */
11151#line 2636 "parse.y"
11152 {
11153 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
11154 rb_parser_printf(p, "NODE_SPECIAL");
11155 }
11156 else if (((*yyvaluep).node_args)) {
11157 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
11158 }
11159}
11160#line 11161 "parse.c"
11161 break;
11162
11163 case YYSYMBOL_args_tail: /* args_tail */
11164#line 2636 "parse.y"
11165 {
11166 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
11167 rb_parser_printf(p, "NODE_SPECIAL");
11168 }
11169 else if (((*yyvaluep).node_args)) {
11170 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
11171 }
11172}
11173#line 11174 "parse.c"
11174 break;
11175
11176 case YYSYMBOL_args_tail_basic_arg_value_none: /* args_tail_basic_arg_value_none */
11177#line 2636 "parse.y"
11178 {
11179 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
11180 rb_parser_printf(p, "NODE_SPECIAL");
11181 }
11182 else if (((*yyvaluep).node_args)) {
11183 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
11184 }
11185}
11186#line 11187 "parse.c"
11187 break;
11188
11189 case YYSYMBOL_largs_tail: /* largs_tail */
11190#line 2636 "parse.y"
11191 {
11192 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
11193 rb_parser_printf(p, "NODE_SPECIAL");
11194 }
11195 else if (((*yyvaluep).node_args)) {
11196 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
11197 }
11198}
11199#line 11200 "parse.c"
11200 break;
11201
11202 case YYSYMBOL_f_opt_arg_value: /* f_opt_arg_value */
11203#line 2636 "parse.y"
11204 {
11205 if ((NODE *)((*yyvaluep).node_opt_arg) == (NODE *)-1) {
11206 rb_parser_printf(p, "NODE_SPECIAL");
11207 }
11208 else if (((*yyvaluep).node_opt_arg)) {
11209 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_opt_arg)))));
11210 }
11211}
11212#line 11213 "parse.c"
11213 break;
11214
11215 case YYSYMBOL_f_opt_arg_arg_value: /* f_opt_arg_arg_value */
11216#line 2636 "parse.y"
11217 {
11218 if ((NODE *)((*yyvaluep).node_opt_arg) == (NODE *)-1) {
11219 rb_parser_printf(p, "NODE_SPECIAL");
11220 }
11221 else if (((*yyvaluep).node_opt_arg)) {
11222 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_opt_arg)))));
11223 }
11224}
11225#line 11226 "parse.c"
11226 break;
11227
11228 case YYSYMBOL_opt_args_tail_args_tail_opt_comma: /* opt_args_tail_args_tail_opt_comma */
11229#line 2636 "parse.y"
11230 {
11231 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
11232 rb_parser_printf(p, "NODE_SPECIAL");
11233 }
11234 else if (((*yyvaluep).node_args)) {
11235 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
11236 }
11237}
11238#line 11239 "parse.c"
11239 break;
11240
11241 case YYSYMBOL_args_list_arg_value_opt_args_tail_args_tail_opt_comma: /* args-list_arg_value_opt_args_tail_args_tail_opt_comma */
11242#line 2636 "parse.y"
11243 {
11244 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
11245 rb_parser_printf(p, "NODE_SPECIAL");
11246 }
11247 else if (((*yyvaluep).node_args)) {
11248 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
11249 }
11250}
11251#line 11252 "parse.c"
11252 break;
11253
11254 case YYSYMBOL_f_args_list_args_tail_opt_comma: /* f_args-list_args_tail_opt_comma */
11255#line 2636 "parse.y"
11256 {
11257 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
11258 rb_parser_printf(p, "NODE_SPECIAL");
11259 }
11260 else if (((*yyvaluep).node_args)) {
11261 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
11262 }
11263}
11264#line 11265 "parse.c"
11265 break;
11266
11267 case YYSYMBOL_tail_only_args_args_tail: /* tail-only-args_args_tail */
11268#line 2636 "parse.y"
11269 {
11270 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
11271 rb_parser_printf(p, "NODE_SPECIAL");
11272 }
11273 else if (((*yyvaluep).node_args)) {
11274 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
11275 }
11276}
11277#line 11278 "parse.c"
11278 break;
11279
11280 case YYSYMBOL_f_args: /* f_args */
11281#line 2636 "parse.y"
11282 {
11283 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
11284 rb_parser_printf(p, "NODE_SPECIAL");
11285 }
11286 else if (((*yyvaluep).node_args)) {
11287 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
11288 }
11289}
11290#line 11291 "parse.c"
11291 break;
11292
11293 case YYSYMBOL_opt_args_tail_largs_tail_none: /* opt_args_tail_largs_tail_none */
11294#line 2636 "parse.y"
11295 {
11296 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
11297 rb_parser_printf(p, "NODE_SPECIAL");
11298 }
11299 else if (((*yyvaluep).node_args)) {
11300 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
11301 }
11302}
11303#line 11304 "parse.c"
11304 break;
11305
11306 case YYSYMBOL_args_list_arg_value_opt_args_tail_largs_tail_none: /* args-list_arg_value_opt_args_tail_largs_tail_none */
11307#line 2636 "parse.y"
11308 {
11309 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
11310 rb_parser_printf(p, "NODE_SPECIAL");
11311 }
11312 else if (((*yyvaluep).node_args)) {
11313 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
11314 }
11315}
11316#line 11317 "parse.c"
11317 break;
11318
11319 case YYSYMBOL_f_args_list_largs_tail_none: /* f_args-list_largs_tail_none */
11320#line 2636 "parse.y"
11321 {
11322 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
11323 rb_parser_printf(p, "NODE_SPECIAL");
11324 }
11325 else if (((*yyvaluep).node_args)) {
11326 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
11327 }
11328}
11329#line 11330 "parse.c"
11330 break;
11331
11332 case YYSYMBOL_tail_only_args_largs_tail: /* tail-only-args_largs_tail */
11333#line 2636 "parse.y"
11334 {
11335 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
11336 rb_parser_printf(p, "NODE_SPECIAL");
11337 }
11338 else if (((*yyvaluep).node_args)) {
11339 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
11340 }
11341}
11342#line 11343 "parse.c"
11343 break;
11344
11345 case YYSYMBOL_f_largs: /* f_largs */
11346#line 2636 "parse.y"
11347 {
11348 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
11349 rb_parser_printf(p, "NODE_SPECIAL");
11350 }
11351 else if (((*yyvaluep).node_args)) {
11352 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
11353 }
11354}
11355#line 11356 "parse.c"
11356 break;
11357
11358 case YYSYMBOL_args_forward: /* args_forward */
11359#line 2645 "parse.y"
11360 {
11361 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
11362}
11363#line 11364 "parse.c"
11364 break;
11365
11366 case YYSYMBOL_f_bad_arg: /* f_bad_arg */
11367#line 2645 "parse.y"
11368 {
11369 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
11370}
11371#line 11372 "parse.c"
11372 break;
11373
11374 case YYSYMBOL_f_norm_arg: /* f_norm_arg */
11375#line 2645 "parse.y"
11376 {
11377 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
11378}
11379#line 11380 "parse.c"
11380 break;
11381
11382 case YYSYMBOL_f_arg_asgn: /* f_arg_asgn */
11383#line 2645 "parse.y"
11384 {
11385 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
11386}
11387#line 11388 "parse.c"
11388 break;
11389
11390 case YYSYMBOL_f_arg_item: /* f_arg_item */
11391#line 2636 "parse.y"
11392 {
11393 if ((NODE *)((*yyvaluep).node_args_aux) == (NODE *)-1) {
11394 rb_parser_printf(p, "NODE_SPECIAL");
11395 }
11396 else if (((*yyvaluep).node_args_aux)) {
11397 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args_aux)))));
11398 }
11399}
11400#line 11401 "parse.c"
11401 break;
11402
11403 case YYSYMBOL_f_arg: /* f_arg */
11404#line 2636 "parse.y"
11405 {
11406 if ((NODE *)((*yyvaluep).node_args_aux) == (NODE *)-1) {
11407 rb_parser_printf(p, "NODE_SPECIAL");
11408 }
11409 else if (((*yyvaluep).node_args_aux)) {
11410 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args_aux)))));
11411 }
11412}
11413#line 11414 "parse.c"
11414 break;
11415
11416 case YYSYMBOL_f_label: /* f_label */
11417#line 2645 "parse.y"
11418 {
11419 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
11420}
11421#line 11422 "parse.c"
11422 break;
11423
11424 case YYSYMBOL_f_no_kwarg: /* f_no_kwarg */
11425#line 2645 "parse.y"
11426 {
11427 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
11428}
11429#line 11430 "parse.c"
11430 break;
11431
11432 case YYSYMBOL_f_kwrest: /* f_kwrest */
11433#line 2645 "parse.y"
11434 {
11435 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
11436}
11437#line 11438 "parse.c"
11438 break;
11439
11440 case YYSYMBOL_f_rest_arg: /* f_rest_arg */
11441#line 2645 "parse.y"
11442 {
11443 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
11444}
11445#line 11446 "parse.c"
11446 break;
11447
11448 case YYSYMBOL_f_block_arg: /* f_block_arg */
11449#line 2645 "parse.y"
11450 {
11451 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
11452}
11453#line 11454 "parse.c"
11454 break;
11455
11456 case YYSYMBOL_opt_comma: /* opt_comma */
11457#line 2645 "parse.y"
11458 {
11459 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
11460}
11461#line 11462 "parse.c"
11462 break;
11463
11464 case YYSYMBOL_value_expr_singleton_expr: /* value_expr_singleton_expr */
11465#line 2636 "parse.y"
11466 {
11467 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
11468 rb_parser_printf(p, "NODE_SPECIAL");
11469 }
11470 else if (((*yyvaluep).node)) {
11471 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
11472 }
11473}
11474#line 11475 "parse.c"
11475 break;
11476
11477 case YYSYMBOL_singleton: /* singleton */
11478#line 2636 "parse.y"
11479 {
11480 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
11481 rb_parser_printf(p, "NODE_SPECIAL");
11482 }
11483 else if (((*yyvaluep).node)) {
11484 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
11485 }
11486}
11487#line 11488 "parse.c"
11488 break;
11489
11490 case YYSYMBOL_singleton_expr: /* singleton_expr */
11491#line 2636 "parse.y"
11492 {
11493 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
11494 rb_parser_printf(p, "NODE_SPECIAL");
11495 }
11496 else if (((*yyvaluep).node)) {
11497 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
11498 }
11499}
11500#line 11501 "parse.c"
11501 break;
11502
11503 case YYSYMBOL_assoc_list: /* assoc_list */
11504#line 2636 "parse.y"
11505 {
11506 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
11507 rb_parser_printf(p, "NODE_SPECIAL");
11508 }
11509 else if (((*yyvaluep).node)) {
11510 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
11511 }
11512}
11513#line 11514 "parse.c"
11514 break;
11515
11516 case YYSYMBOL_assocs: /* assocs */
11517#line 2636 "parse.y"
11518 {
11519 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
11520 rb_parser_printf(p, "NODE_SPECIAL");
11521 }
11522 else if (((*yyvaluep).node)) {
11523 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
11524 }
11525}
11526#line 11527 "parse.c"
11527 break;
11528
11529 case YYSYMBOL_assoc: /* assoc */
11530#line 2636 "parse.y"
11531 {
11532 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
11533 rb_parser_printf(p, "NODE_SPECIAL");
11534 }
11535 else if (((*yyvaluep).node)) {
11536 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
11537 }
11538}
11539#line 11540 "parse.c"
11540 break;
11541
11542 case YYSYMBOL_operation2: /* operation2 */
11543#line 2645 "parse.y"
11544 {
11545 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
11546}
11547#line 11548 "parse.c"
11548 break;
11549
11550 case YYSYMBOL_operation3: /* operation3 */
11551#line 2645 "parse.y"
11552 {
11553 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
11554}
11555#line 11556 "parse.c"
11556 break;
11557
11558 case YYSYMBOL_dot_or_colon: /* dot_or_colon */
11559#line 2645 "parse.y"
11560 {
11561 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
11562}
11563#line 11564 "parse.c"
11564 break;
11565
11566 case YYSYMBOL_call_op: /* call_op */
11567#line 2645 "parse.y"
11568 {
11569 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
11570}
11571#line 11572 "parse.c"
11572 break;
11573
11574 case YYSYMBOL_call_op2: /* call_op2 */
11575#line 2645 "parse.y"
11576 {
11577 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
11578}
11579#line 11580 "parse.c"
11580 break;
11581
11582 case YYSYMBOL_none: /* none */
11583#line 2636 "parse.y"
11584 {
11585 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
11586 rb_parser_printf(p, "NODE_SPECIAL");
11587 }
11588 else if (((*yyvaluep).node)) {
11589 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
11590 }
11591}
11592#line 11593 "parse.c"
11593 break;
11594
11595 default:
11596 break;
11597 }
11598 YY_IGNORE_MAYBE_UNINITIALIZED_END
11599}
11600
11601
11602/*---------------------------.
11603| Print this symbol on YYO. |
11604`---------------------------*/
11605
11606static void
11607yy_symbol_print (FILE *yyo,
11608 yysymbol_kind_t yykind, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp, struct parser_params *p)
11609{
11610 YYFPRINTF (yyo, "%s %s (",
11611 yykind < YYNTOKENS ? "token" : "nterm", yysymbol_name (yykind));
11612
11613 YYLOCATION_PRINT (yyo, yylocationp, p);
11614 YYFPRINTF (yyo, ": ");
11615 yy_symbol_value_print (yyo, yykind, yyvaluep, yylocationp, p);
11616 YYFPRINTF (yyo, ")");
11617}
11618
11619/*------------------------------------------------------------------.
11620| yy_stack_print -- Print the state stack from its BOTTOM up to its |
11621| TOP (included). |
11622`------------------------------------------------------------------*/
11623
11624static void
11625yy_stack_print (yy_state_t *yybottom, yy_state_t *yytop, struct parser_params *p)
11626{
11627 YYFPRINTF (stderr, "Stack now");
11628 for (; yybottom <= yytop; yybottom++)
11629 {
11630 int yybot = *yybottom;
11631 YYFPRINTF (stderr, " %d", yybot);
11632 }
11633 YYFPRINTF (stderr, "\n");
11634}
11635
11636# define YY_STACK_PRINT(Bottom, Top, p) \
11637do { \
11638 if (yydebug) \
11639 yy_stack_print ((Bottom), (Top), p); \
11640} while (0)
11641
11642
11643/*------------------------------------------------.
11644| Report that the YYRULE is going to be reduced. |
11645`------------------------------------------------*/
11646
11647static void
11648yy_reduce_print (yy_state_t *yyssp, YYSTYPE *yyvsp, YYLTYPE *yylsp,
11649 int yyrule, struct parser_params *p)
11650{
11651 int yylno = yyrline[yyrule];
11652 int yynrhs = yyr2[yyrule];
11653 int yyi;
11654 YYFPRINTF (stderr, "Reducing stack by rule %d (line %d):\n",
11655 yyrule - 1, yylno);
11656 /* The symbols being reduced. */
11657 for (yyi = 0; yyi < yynrhs; yyi++)
11658 {
11659 YYFPRINTF (stderr, " $%d = ", yyi + 1);
11660 yy_symbol_print (stderr,
11661 YY_ACCESSING_SYMBOL (+yyssp[yyi + 1 - yynrhs]),
11662 &yyvsp[(yyi + 1) - (yynrhs)],
11663 &(yylsp[(yyi + 1) - (yynrhs)]), p);
11664 YYFPRINTF (stderr, "\n");
11665 }
11666}
11667
11668# define YY_REDUCE_PRINT(Rule, p) \
11669do { \
11670 if (yydebug) \
11671 yy_reduce_print (yyssp, yyvsp, yylsp, Rule, p); \
11672} while (0)
11673
11674/* Nonzero means print parse trace. It is left uninitialized so that
11675 multiple parsers can coexist. */
11676#ifndef yydebug
11677int yydebug;
11678#endif
11679#else /* !YYDEBUG */
11680# define YYDPRINTF(Args) ((void) 0)
11681# define YY_SYMBOL_PRINT(Title, Kind, Value, Location, p)
11682# define YY_STACK_PRINT(Bottom, Top, p)
11683# define YY_REDUCE_PRINT(Rule, p)
11684#endif /* !YYDEBUG */
11685
11686
11687/* YYINITDEPTH -- initial size of the parser's stacks. */
11688#ifndef YYINITDEPTH
11689# define YYINITDEPTH 200
11690#endif
11691
11692/* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
11693 if the built-in stack extension method is used).
11694
11695 Do not make this value too large; the results are undefined if
11696 YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
11697 evaluated with infinite-precision integer arithmetic. */
11698
11699#ifndef YYMAXDEPTH
11700# define YYMAXDEPTH 10000
11701#endif
11702
11703
11704/* Context of a parse error. */
11705typedef struct
11706{
11707 yy_state_t *yyssp;
11708 yysymbol_kind_t yytoken;
11709 YYLTYPE *yylloc;
11710} yypcontext_t;
11711
11712/* Put in YYARG at most YYARGN of the expected tokens given the
11713 current YYCTX, and return the number of tokens stored in YYARG. If
11714 YYARG is null, return the number of expected tokens (guaranteed to
11715 be less than YYNTOKENS). Return YYENOMEM on memory exhaustion.
11716 Return 0 if there are more than YYARGN expected tokens, yet fill
11717 YYARG up to YYARGN. */
11718static int
11719yypcontext_expected_tokens (const yypcontext_t *yyctx,
11720 yysymbol_kind_t yyarg[], int yyargn)
11721{
11722 /* Actual size of YYARG. */
11723 int yycount = 0;
11724 int yyn = yypact[+*yyctx->yyssp];
11725 if (!yypact_value_is_default (yyn))
11726 {
11727 /* Start YYX at -YYN if negative to avoid negative indexes in
11728 YYCHECK. In other words, skip the first -YYN actions for
11729 this state because they are default actions. */
11730 int yyxbegin = yyn < 0 ? -yyn : 0;
11731 /* Stay within bounds of both yycheck and yytname. */
11732 int yychecklim = YYLAST - yyn + 1;
11733 int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
11734 int yyx;
11735 for (yyx = yyxbegin; yyx < yyxend; ++yyx)
11736 if (yycheck[yyx + yyn] == yyx && yyx != YYSYMBOL_YYerror
11737 && !yytable_value_is_error (yytable[yyx + yyn]))
11738 {
11739 if (!yyarg)
11740 ++yycount;
11741 else if (yycount == yyargn)
11742 return 0;
11743 else
11744 yyarg[yycount++] = YY_CAST (yysymbol_kind_t, yyx);
11745 }
11746 }
11747 if (yyarg && yycount == 0 && 0 < yyargn)
11748 yyarg[0] = YYSYMBOL_YYEMPTY;
11749 return yycount;
11750}
11751
11752
11753
11754
11755#ifndef yystrlen
11756# if defined __GLIBC__ && defined _STRING_H
11757# define yystrlen(S) (YY_CAST (YYPTRDIFF_T, strlen (S)))
11758# else
11759/* Return the length of YYSTR. */
11760static YYPTRDIFF_T
11761yystrlen (const char *yystr)
11762{
11763 YYPTRDIFF_T yylen;
11764 for (yylen = 0; yystr[yylen]; yylen++)
11765 continue;
11766 return yylen;
11767}
11768# endif
11769#endif
11770
11771#ifndef yystpcpy
11772# if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
11773# define yystpcpy stpcpy
11774# else
11775/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
11776 YYDEST. */
11777static char *
11778yystpcpy (char *yydest, const char *yysrc)
11779{
11780 char *yyd = yydest;
11781 const char *yys = yysrc;
11782
11783 while ((*yyd++ = *yys++) != '\0')
11784 continue;
11785
11786 return yyd - 1;
11787}
11788# endif
11789#endif
11790
11791#ifndef yytnamerr
11792/* Copy to YYRES the contents of YYSTR after stripping away unnecessary
11793 quotes and backslashes, so that it's suitable for yyerror. The
11794 heuristic is that double-quoting is unnecessary unless the string
11795 contains an apostrophe, a comma, or backslash (other than
11796 backslash-backslash). YYSTR is taken from yytname. If YYRES is
11797 null, do not copy; instead, return the length of what the result
11798 would have been. */
11799static YYPTRDIFF_T
11800yytnamerr (char *yyres, const char *yystr)
11801{
11802 if (*yystr == '"')
11803 {
11804 YYPTRDIFF_T yyn = 0;
11805 char const *yyp = yystr;
11806 for (;;)
11807 switch (*++yyp)
11808 {
11809 case '\'':
11810 case ',':
11811 goto do_not_strip_quotes;
11812
11813 case '\\':
11814 if (*++yyp != '\\')
11815 goto do_not_strip_quotes;
11816 else
11817 goto append;
11818
11819 append:
11820 default:
11821 if (yyres)
11822 yyres[yyn] = *yyp;
11823 yyn++;
11824 break;
11825
11826 case '"':
11827 if (yyres)
11828 yyres[yyn] = '\0';
11829 return yyn;
11830 }
11831 do_not_strip_quotes: ;
11832 }
11833
11834 if (yyres)
11835 return yystpcpy (yyres, yystr) - yyres;
11836 else
11837 return yystrlen (yystr);
11838}
11839#endif
11840
11841
11842static int
11843yy_syntax_error_arguments (const yypcontext_t *yyctx,
11844 yysymbol_kind_t yyarg[], int yyargn)
11845{
11846 /* Actual size of YYARG. */
11847 int yycount = 0;
11848 /* There are many possibilities here to consider:
11849 - If this state is a consistent state with a default action, then
11850 the only way this function was invoked is if the default action
11851 is an error action. In that case, don't check for expected
11852 tokens because there are none.
11853 - The only way there can be no lookahead present (in yychar) is if
11854 this state is a consistent state with a default action. Thus,
11855 detecting the absence of a lookahead is sufficient to determine
11856 that there is no unexpected or expected token to report. In that
11857 case, just report a simple "syntax error".
11858 - Don't assume there isn't a lookahead just because this state is a
11859 consistent state with a default action. There might have been a
11860 previous inconsistent state, consistent state with a non-default
11861 action, or user semantic action that manipulated yychar.
11862 - Of course, the expected token list depends on states to have
11863 correct lookahead information, and it depends on the parser not
11864 to perform extra reductions after fetching a lookahead from the
11865 scanner and before detecting a syntax error. Thus, state merging
11866 (from LALR or IELR) and default reductions corrupt the expected
11867 token list. However, the list is correct for canonical LR with
11868 one exception: it will still contain any token that will not be
11869 accepted due to an error action in a later state.
11870 */
11871 if (yyctx->yytoken != YYSYMBOL_YYEMPTY)
11872 {
11873 int yyn;
11874 if (yyarg)
11875 yyarg[yycount] = yyctx->yytoken;
11876 ++yycount;
11877 yyn = yypcontext_expected_tokens (yyctx,
11878 yyarg ? yyarg + 1 : yyarg, yyargn - 1);
11879 if (yyn == YYENOMEM)
11880 return YYENOMEM;
11881 else
11882 yycount += yyn;
11883 }
11884 return yycount;
11885}
11886
11887/* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message
11888 about the unexpected token YYTOKEN for the state stack whose top is
11889 YYSSP.
11890
11891 Return 0 if *YYMSG was successfully written. Return -1 if *YYMSG is
11892 not large enough to hold the message. In that case, also set
11893 *YYMSG_ALLOC to the required number of bytes. Return YYENOMEM if the
11894 required number of bytes is too large to store. */
11895static int
11896yysyntax_error (YYPTRDIFF_T *yymsg_alloc, char **yymsg,
11897 const yypcontext_t *yyctx, struct parser_params *p)
11898{
11899 enum { YYARGS_MAX = 5 };
11900 /* Internationalized format string. */
11901 const char *yyformat = YY_NULLPTR;
11902 /* Arguments of yyformat: reported tokens (one for the "unexpected",
11903 one per "expected"). */
11904 yysymbol_kind_t yyarg[YYARGS_MAX];
11905 /* Cumulated lengths of YYARG. */
11906 YYPTRDIFF_T yysize = 0;
11907
11908 /* Actual size of YYARG. */
11909 int yycount = yy_syntax_error_arguments (yyctx, yyarg, YYARGS_MAX);
11910 if (yycount == YYENOMEM)
11911 return YYENOMEM;
11912
11913 switch (yycount)
11914 {
11915#define YYCASE_(N, S) \
11916 case N: \
11917 yyformat = S; \
11918 break
11919 default: /* Avoid compiler warnings. */
11920 YYCASE_(0, YY_("syntax error"));
11921 YYCASE_(1, YY_("syntax error, unexpected %s"));
11922 YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s"));
11923 YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s"));
11924 YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s"));
11925 YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"));
11926#undef YYCASE_
11927 }
11928
11929 /* Compute error message size. Don't count the "%s"s, but reserve
11930 room for the terminator. */
11931 yysize = yystrlen (yyformat) - 2 * yycount + 1;
11932 {
11933 int yyi;
11934 for (yyi = 0; yyi < yycount; ++yyi)
11935 {
11936 YYPTRDIFF_T yysize1
11937 = yysize + yytnamerr (YY_NULLPTR, yytname[yyarg[yyi]]);
11938 if (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM)
11939 yysize = yysize1;
11940 else
11941 return YYENOMEM;
11942 }
11943 }
11944
11945 if (*yymsg_alloc < yysize)
11946 {
11947 *yymsg_alloc = 2 * yysize;
11948 if (! (yysize <= *yymsg_alloc
11949 && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM))
11950 *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM;
11951 return -1;
11952 }
11953
11954 /* Avoid sprintf, as that infringes on the user's name space.
11955 Don't have undefined behavior even if the translation
11956 produced a string with the wrong number of "%s"s. */
11957 {
11958 char *yyp = *yymsg;
11959 int yyi = 0;
11960 while ((*yyp = *yyformat) != '\0')
11961 if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount)
11962 {
11963 yyp += yytnamerr (yyp, yytname[yyarg[yyi++]]);
11964 yyformat += 2;
11965 }
11966 else
11967 {
11968 ++yyp;
11969 ++yyformat;
11970 }
11971 }
11972 return 0;
11973}
11974
11975
11976/*-----------------------------------------------.
11977| Release the memory associated to this symbol. |
11978`-----------------------------------------------*/
11979
11980static void
11981yydestruct (const char *yymsg,
11982 yysymbol_kind_t yykind, YYSTYPE *yyvaluep, YYLTYPE *yylocationp, struct parser_params *p)
11983{
11984 YY_USE (yyvaluep);
11985 YY_USE (yylocationp);
11986 YY_USE (p);
11987 if (!yymsg)
11988 yymsg = "Deleting";
11989 YY_SYMBOL_PRINT (yymsg, yykind, yyvaluep, yylocationp, p);
11990
11991 YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
11992 switch (yykind)
11993 {
11994 case YYSYMBOL_258_16: /* @16 */
11995#line 2673 "parse.y"
11996 {
11997 if (CASE_LABELS_ENABLED_P(((*yyvaluep).labels))) st_free_table(((*yyvaluep).labels));
11998}
11999#line 12000 "parse.c"
12000 break;
12001
12002 case YYSYMBOL_259_17: /* @17 */
12003#line 2673 "parse.y"
12004 {
12005 if (CASE_LABELS_ENABLED_P(((*yyvaluep).labels))) st_free_table(((*yyvaluep).labels));
12006}
12007#line 12008 "parse.c"
12008 break;
12009
12010 default:
12011 break;
12012 }
12013 YY_IGNORE_MAYBE_UNINITIALIZED_END
12014}
12015
12016
12017
12018
12019
12020
12021/*----------.
12022| yyparse. |
12023`----------*/
12024
12025int
12026yyparse (struct parser_params *p)
12027{
12028/* Lookahead token kind. */
12029int yychar;
12030
12031
12032/* The semantic value of the lookahead symbol. */
12033/* Default value used for initialization, for pacifying older GCCs
12034 or non-GCC compilers. */
12035#ifdef __cplusplus
12036static const YYSTYPE yyval_default = {};
12037(void) yyval_default;
12038#else
12039YY_INITIAL_VALUE (static const YYSTYPE yyval_default;)
12040#endif
12041YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default);
12042
12043/* Location data for the lookahead symbol. */
12044static const YYLTYPE yyloc_default
12045# if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL
12046 = { 1, 1, 1, 1 }
12047# endif
12048;
12049YYLTYPE yylloc = yyloc_default;
12050
12051 /* Number of syntax errors so far. */
12052 int yynerrs = 0;
12053 YY_USE (yynerrs); /* Silence compiler warning. */
12054
12055 yy_state_fast_t yystate = 0;
12056 /* Number of tokens to shift before error messages enabled. */
12057 int yyerrstatus = 0;
12058
12059 /* Refer to the stacks through separate pointers, to allow yyoverflow
12060 to reallocate them elsewhere. */
12061
12062 /* Their size. */
12063 YYPTRDIFF_T yystacksize = YYINITDEPTH;
12064
12065 /* The state stack: array, bottom, top. */
12066 yy_state_t yyssa[YYINITDEPTH];
12067 yy_state_t *yyss = yyssa;
12068 yy_state_t *yyssp = yyss;
12069
12070 /* The semantic value stack: array, bottom, top. */
12071 YYSTYPE yyvsa[YYINITDEPTH];
12072 YYSTYPE *yyvs = yyvsa;
12073 YYSTYPE *yyvsp = yyvs;
12074
12075 /* The location stack: array, bottom, top. */
12076 YYLTYPE yylsa[YYINITDEPTH];
12077 YYLTYPE *yyls = yylsa;
12078 YYLTYPE *yylsp = yyls;
12079
12080 int yyn;
12081 /* The return value of yyparse. */
12082 int yyresult;
12083 /* Lookahead symbol kind. */
12084 yysymbol_kind_t yytoken = YYSYMBOL_YYEMPTY;
12085 /* The variables used to return semantic value and location from the
12086 action routines. */
12087 YYSTYPE yyval;
12088 YYLTYPE yyloc;
12089
12090 /* The locations where the error started and ended. */
12091 YYLTYPE yyerror_range[3];
12092
12093 /* Buffer for error messages, and its allocated size. */
12094 char yymsgbuf[128];
12095 char *yymsg = yymsgbuf;
12096 YYPTRDIFF_T yymsg_alloc = sizeof yymsgbuf;
12097
12098#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N), yylsp -= (N))
12099
12100 /* The number of symbols on the RHS of the reduced rule.
12101 Keep to zero when no symbol should be popped. */
12102 int yylen = 0;
12103
12104 YYDPRINTF ((stderr, "Starting parse\n"));
12105
12106 yychar = YYEMPTY; /* Cause a token to be read. */
12107
12108
12109 /* User initialization code. */
12110#line 2680 "parse.y"
12111 {
12112 RUBY_SET_YYLLOC_OF_NONE(yylloc);
12113}
12114
12115#line 12116 "parse.c"
12116
12117 yylsp[0] = yylloc;
12118 goto yysetstate;
12119
12120
12121/*------------------------------------------------------------.
12122| yynewstate -- push a new state, which is found in yystate. |
12123`------------------------------------------------------------*/
12124yynewstate:
12125 /* In all cases, when you get here, the value and location stacks
12126 have just been pushed. So pushing a state here evens the stacks. */
12127 yyssp++;
12128
12129
12130/*--------------------------------------------------------------------.
12131| yysetstate -- set current state (the top of the stack) to yystate. |
12132`--------------------------------------------------------------------*/
12133yysetstate:
12134 YYDPRINTF ((stderr, "Entering state %d\n", yystate));
12135 YY_ASSERT (0 <= yystate && yystate < YYNSTATES);
12136 YY_IGNORE_USELESS_CAST_BEGIN
12137 *yyssp = YY_CAST (yy_state_t, yystate);
12138 YY_IGNORE_USELESS_CAST_END
12139 YY_STACK_PRINT (yyss, yyssp, p);
12140
12141 if (yyss + yystacksize - 1 <= yyssp)
12142#if !defined yyoverflow && !defined YYSTACK_RELOCATE
12143 YYNOMEM;
12144#else
12145 {
12146 /* Get the current used size of the three stacks, in elements. */
12147 YYPTRDIFF_T yysize = yyssp - yyss + 1;
12148
12149# if defined yyoverflow
12150 {
12151 /* Give user a chance to reallocate the stack. Use copies of
12152 these so that the &'s don't force the real ones into
12153 memory. */
12154 yy_state_t *yyss1 = yyss;
12155 YYSTYPE *yyvs1 = yyvs;
12156 YYLTYPE *yyls1 = yyls;
12157
12158 /* Each stack pointer address is followed by the size of the
12159 data in use in that stack, in bytes. This used to be a
12160 conditional around just the two extra args, but that might
12161 be undefined if yyoverflow is a macro. */
12162 yyoverflow (YY_("memory exhausted"),
12163 &yyss1, yysize * YYSIZEOF (*yyssp),
12164 &yyvs1, yysize * YYSIZEOF (*yyvsp),
12165 &yyls1, yysize * YYSIZEOF (*yylsp),
12166 &yystacksize);
12167 yyss = yyss1;
12168 yyvs = yyvs1;
12169 yyls = yyls1;
12170 }
12171# else /* defined YYSTACK_RELOCATE */
12172 /* Extend the stack our own way. */
12173 if (YYMAXDEPTH <= yystacksize)
12174 YYNOMEM;
12175 yystacksize *= 2;
12176 if (YYMAXDEPTH < yystacksize)
12177 yystacksize = YYMAXDEPTH;
12178
12179 {
12180 yy_state_t *yyss1 = yyss;
12181 union yyalloc *yyptr =
12182 YY_CAST (union yyalloc *,
12183 YYSTACK_ALLOC (YY_CAST (YYSIZE_T, YYSTACK_BYTES (yystacksize))));
12184 if (! yyptr)
12185 YYNOMEM;
12186 YYSTACK_RELOCATE (yyss_alloc, yyss);
12187 YYSTACK_RELOCATE (yyvs_alloc, yyvs);
12188 YYSTACK_RELOCATE (yyls_alloc, yyls);
12189# undef YYSTACK_RELOCATE
12190 if (yyss1 != yyssa)
12191 YYSTACK_FREE (yyss1);
12192 }
12193# endif
12194
12195 yyssp = yyss + yysize - 1;
12196 yyvsp = yyvs + yysize - 1;
12197 yylsp = yyls + yysize - 1;
12198
12199 YY_IGNORE_USELESS_CAST_BEGIN
12200 YYDPRINTF ((stderr, "Stack size increased to %ld\n",
12201 YY_CAST (long, yystacksize)));
12202 YY_IGNORE_USELESS_CAST_END
12203
12204 if (yyss + yystacksize - 1 <= yyssp)
12205 YYABORT;
12206 }
12207#endif /* !defined yyoverflow && !defined YYSTACK_RELOCATE */
12208
12209
12210 if (yystate == YYFINAL)
12211 YYACCEPT;
12212
12213 goto yybackup;
12214
12215
12216/*-----------.
12217| yybackup. |
12218`-----------*/
12219yybackup:
12220 /* Do appropriate processing given the current state. Read a
12221 lookahead token if we need one and don't already have one. */
12222
12223 /* First try to decide what to do without reference to lookahead token. */
12224 yyn = yypact[yystate];
12225 if (yypact_value_is_default (yyn))
12226 goto yydefault;
12227
12228 /* Not known => get a lookahead token if don't already have one. */
12229
12230 /* YYCHAR is either empty, or end-of-input, or a valid lookahead. */
12231 if (yychar == YYEMPTY)
12232 {
12233 YYDPRINTF ((stderr, "Reading a token\n"));
12234 yychar = yylex (&yylval, &yylloc, p);
12235 }
12236
12237 if (yychar <= END_OF_INPUT)
12238 {
12239 yychar = END_OF_INPUT;
12240 yytoken = YYSYMBOL_YYEOF;
12241 YYDPRINTF ((stderr, "Now at end of input.\n"));
12242 }
12243 else if (yychar == YYerror)
12244 {
12245 /* The scanner already issued an error message, process directly
12246 to error recovery. But do not keep the error token as
12247 lookahead, it is too special and may lead us to an endless
12248 loop in error recovery. */
12249 yychar = YYUNDEF;
12250 yytoken = YYSYMBOL_YYerror;
12251 yyerror_range[1] = yylloc;
12252 goto yyerrlab1;
12253 }
12254 else
12255 {
12256 yytoken = YYTRANSLATE (yychar);
12257 YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc, p);
12258 }
12259
12260 /* If the proper action on seeing token YYTOKEN is to reduce or to
12261 detect an error, take that action. */
12262 yyn += yytoken;
12263 if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
12264 goto yydefault;
12265 yyn = yytable[yyn];
12266 if (yyn <= 0)
12267 {
12268 if (yytable_value_is_error (yyn))
12269 goto yyerrlab;
12270 yyn = -yyn;
12271 goto yyreduce;
12272 }
12273
12274 /* Count tokens shifted since error; after three, turn off error
12275 status. */
12276 if (yyerrstatus)
12277 yyerrstatus--;
12278
12279 /* Shift the lookahead token. */
12280 YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc, p);
12281 yystate = yyn;
12282 YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
12283 *++yyvsp = yylval;
12284 YY_IGNORE_MAYBE_UNINITIALIZED_END
12285 *++yylsp = yylloc;
12286 /* %after-shift code. */
12287#line 2683 "parse.y"
12288 {after_shift(p);}
12289#line 12290 "parse.c"
12290
12291
12292 /* Discard the shifted token. */
12293 yychar = YYEMPTY;
12294 goto yynewstate;
12295
12296
12297/*-----------------------------------------------------------.
12298| yydefault -- do the default action for the current state. |
12299`-----------------------------------------------------------*/
12300yydefault:
12301 yyn = yydefact[yystate];
12302 if (yyn == 0)
12303 goto yyerrlab;
12304 goto yyreduce;
12305
12306
12307/*-----------------------------.
12308| yyreduce -- do a reduction. |
12309`-----------------------------*/
12310yyreduce:
12311 /* yyn is the number of a rule to reduce with. */
12312 yylen = yyr2[yyn];
12313
12314 /* If YYLEN is nonzero, implement the default value of the action:
12315 '$$ = $1'.
12316
12317 Otherwise, the following line sets YYVAL to garbage.
12318 This behavior is undocumented and Bison
12319 users should not rely upon it. Assigning to YYVAL
12320 unconditionally makes the parser a bit smaller, and it avoids a
12321 GCC warning that YYVAL may be used uninitialized. */
12322 yyval = yyvsp[1-yylen];
12323 /* %before-reduce function. */
12324#line 2684 "parse.y"
12325 {before_reduce(yylen, p);}
12326#line 12327 "parse.c"
12327
12328
12329 /* Default location. */
12330 YYLLOC_DEFAULT (yyloc, (yylsp - yylen), yylen);
12331 yyerror_range[1] = yyloc;
12332 YY_REDUCE_PRINT (yyn, p);
12333 switch (yyn)
12334 {
12335 case 2: /* $@1: %empty */
12336#line 3188 "parse.y"
12337 {
12338 SET_LEX_STATE(EXPR_BEG);
12339 local_push(p, ifndef_ripper(1)+0);
12340 /* jumps are possible in the top-level loop. */
12341 if (!ifndef_ripper(p->do_loop) + 0) init_block_exit(p);
12342 }
12343#line 12344 "parse.c"
12344 break;
12345
12346 case 5: /* compstmt_top_stmts: top_stmts option_terms */
12347#line 3003 "parse.y"
12348 {
12349 void_stmts(p, (yyval.node) = (yyvsp[-1].node));
12350 }
12351#line 12352 "parse.c"
12352 break;
12353
12354 case 6: /* program: $@1 compstmt_top_stmts */
12355#line 3195 "parse.y"
12356 {
12357 if ((yyvsp[0].node) && !compile_for_eval) {
12358 NODE *node = (yyvsp[0].node);
12359 /* last expression should not be void */
12360 if (nd_type_p(node, NODE_BLOCK)) {
12361 while (RNODE_BLOCK(node)->nd_next) {
12362 node = RNODE_BLOCK(node)->nd_next;
12363 }
12364 node = RNODE_BLOCK(node)->nd_head;
12365 }
12366 node = remove_begin(node);
12367 void_expr(p, node);
12368 }
12369 p->eval_tree = NEW_SCOPE(0, block_append(p, p->eval_tree, (yyvsp[0].node)), NULL, &(yyloc));
12370 /*% ripper[final]: program!($:2) %*/
12371 local_pop(p);
12372 }
12373#line 12374 "parse.c"
12374 break;
12375
12376 case 7: /* top_stmts: none */
12377#line 3215 "parse.y"
12378 {
12379 (yyval.node) = NEW_BEGIN(0, &(yyloc));
12380 /*% ripper: stmts_add!(stmts_new!, void_stmt!) %*/
12381 }
12382#line 12383 "parse.c"
12383 break;
12384
12385 case 8: /* top_stmts: top_stmt */
12386#line 3220 "parse.y"
12387 {
12388 (yyval.node) = newline_node((yyvsp[0].node));
12389 /*% ripper: stmts_add!(stmts_new!, $:1) %*/
12390 }
12391#line 12392 "parse.c"
12392 break;
12393
12394 case 9: /* top_stmts: top_stmts terms top_stmt */
12395#line 3225 "parse.y"
12396 {
12397 (yyval.node) = block_append(p, (yyvsp[-2].node), newline_node((yyvsp[0].node)));
12398 /*% ripper: stmts_add!($:1, $:3) %*/
12399 }
12400#line 12401 "parse.c"
12401 break;
12402
12403 case 10: /* top_stmt: stmt */
12404#line 3232 "parse.y"
12405 {
12406 clear_block_exit(p, EXITS_MASK_ALL);
12407 (yyval.node) = (yyvsp[0].node);
12408 }
12409#line 12410 "parse.c"
12410 break;
12411
12412 case 11: /* top_stmt: "'BEGIN'" begin_block */
12413#line 3237 "parse.y"
12414 {
12415 (yyval.node) = (yyvsp[0].node);
12416 /*% ripper: $:2 %*/
12417 }
12418#line 12419 "parse.c"
12419 break;
12420
12421 case 12: /* block_open: '{' */
12422#line 3243 "parse.y"
12423 {(yyval.node_exits) = init_block_exit(p);}
12424#line 12425 "parse.c"
12425 break;
12426
12427 case 13: /* begin_block: block_open compstmt_top_stmts '}' */
12428#line 3246 "parse.y"
12429 {
12430 restore_block_exit(p, (yyvsp[-2].node_exits));
12431 p->eval_tree_begin = block_append(p, p->eval_tree_begin,
12432 NEW_BEGIN((yyvsp[-1].node), &(yyloc)));
12433 (yyval.node) = NEW_BEGIN(0, &(yyloc));
12434 /*% ripper: BEGIN!($:compstmt) %*/
12435 }
12436#line 12437 "parse.c"
12437 break;
12438
12439 case 14: /* compstmt_stmts: stmts option_terms */
12440#line 3003 "parse.y"
12441 {
12442 void_stmts(p, (yyval.node) = (yyvsp[-1].node));
12443 }
12444#line 12445 "parse.c"
12445 break;
12446
12447 case 15: /* $@2: %empty */
12448#line 3259 "parse.y"
12449 {
12450 if (!(yyvsp[-1].node)) yyerror1(&(yylsp[0]), "else without rescue is useless");
12451 next_rescue_context(&p->ctxt, &(yyvsp[-2].ctxt), after_else);
12452 }
12453#line 12454 "parse.c"
12454 break;
12455
12456 case 16: /* $@3: %empty */
12457#line 3264 "parse.y"
12458 {
12459 next_rescue_context(&p->ctxt, &(yyvsp[-4].ctxt), after_ensure);
12460 }
12461#line 12462 "parse.c"
12462 break;
12463
12464 case 17: /* bodystmt: compstmt_stmts lex_ctxt opt_rescue k_else $@2 compstmt_stmts $@3 opt_ensure */
12465#line 3268 "parse.y"
12466 {
12467 (yyval.node) = new_bodystmt(p, (yyvsp[-7].node), (yyvsp[-5].node), (yyvsp[-2].node), (yyvsp[0].node), &(yyloc));
12468 /*% ripper: bodystmt!($:body, $:opt_rescue, $:elsebody, $:opt_ensure) %*/
12469 }
12470#line 12471 "parse.c"
12471 break;
12472
12473 case 18: /* $@4: %empty */
12474#line 3275 "parse.y"
12475 {
12476 next_rescue_context(&p->ctxt, &(yyvsp[-1].ctxt), after_ensure);
12477 }
12478#line 12479 "parse.c"
12479 break;
12480
12481 case 19: /* bodystmt: compstmt_stmts lex_ctxt opt_rescue $@4 opt_ensure */
12482#line 3279 "parse.y"
12483 {
12484 (yyval.node) = new_bodystmt(p, (yyvsp[-4].node), (yyvsp[-2].node), 0, (yyvsp[0].node), &(yyloc));
12485 /*% ripper: bodystmt!($:body, $:opt_rescue, Qnil, $:opt_ensure) %*/
12486 }
12487#line 12488 "parse.c"
12488 break;
12489
12490 case 20: /* stmts: none */
12491#line 3286 "parse.y"
12492 {
12493 (yyval.node) = NEW_BEGIN(0, &(yyloc));
12494 /*% ripper: stmts_add!(stmts_new!, void_stmt!) %*/
12495 }
12496#line 12497 "parse.c"
12497 break;
12498
12499 case 21: /* stmts: stmt_or_begin */
12500#line 3291 "parse.y"
12501 {
12502 (yyval.node) = newline_node((yyvsp[0].node));
12503 /*% ripper: stmts_add!(stmts_new!, $:1) %*/
12504 }
12505#line 12506 "parse.c"
12506 break;
12507
12508 case 22: /* stmts: stmts terms stmt_or_begin */
12509#line 3296 "parse.y"
12510 {
12511 (yyval.node) = block_append(p, (yyvsp[-2].node), newline_node((yyvsp[0].node)));
12512 /*% ripper: stmts_add!($:1, $:3) %*/
12513 }
12514#line 12515 "parse.c"
12515 break;
12516
12517 case 24: /* $@5: %empty */
12518#line 3304 "parse.y"
12519 {
12520 yyerror1(&(yylsp[0]), "BEGIN is permitted only at toplevel");
12521 }
12522#line 12523 "parse.c"
12523 break;
12524
12525 case 25: /* stmt_or_begin: "'BEGIN'" $@5 begin_block */
12526#line 3308 "parse.y"
12527 {
12528 (yyval.node) = (yyvsp[0].node);
12529 }
12530#line 12531 "parse.c"
12531 break;
12532
12533 case 26: /* allow_exits: %empty */
12534#line 3313 "parse.y"
12535 {(yyval.node_exits) = allow_block_exit(p);}
12536#line 12537 "parse.c"
12537 break;
12538
12539 case 27: /* k_END: "'END'" lex_ctxt */
12540#line 3316 "parse.y"
12541 {
12542 if (p->ctxt.in_def) {
12543 rb_warn0("END in method; use at_exit");
12544 }
12545 (yyval.ctxt) = (yyvsp[0].ctxt);
12546 p->ctxt.in_rescue = before_rescue;
12547 /*% ripper: $:2 %*/
12548 }
12549#line 12550 "parse.c"
12550 break;
12551
12552 case 28: /* $@6: %empty */
12553#line 3325 "parse.y"
12554 {SET_LEX_STATE(EXPR_FNAME|EXPR_FITEM);}
12555#line 12556 "parse.c"
12556 break;
12557
12558 case 29: /* stmt: "'alias'" fitem $@6 fitem */
12559#line 3326 "parse.y"
12560 {
12561 (yyval.node) = NEW_ALIAS((yyvsp[-2].node), (yyvsp[0].node), &(yyloc), &(yylsp[-3]));
12562 /*% ripper: alias!($:new, $:old) %*/
12563 }
12564#line 12565 "parse.c"
12565 break;
12566
12567 case 30: /* stmt: "'alias'" "global variable" "global variable" */
12568#line 3331 "parse.y"
12569 {
12570 (yyval.node) = NEW_VALIAS((yyvsp[-1].id), (yyvsp[0].id), &(yyloc), &(yylsp[-2]));
12571 /*% ripper: var_alias!($:new, $:old) %*/
12572 }
12573#line 12574 "parse.c"
12574 break;
12575
12576 case 31: /* stmt: "'alias'" "global variable" "back reference" */
12577#line 3336 "parse.y"
12578 {
12579 char buf[2];
12580 buf[0] = '$';
12581 buf[1] = (char)RNODE_BACK_REF((yyvsp[0].node))->nd_nth;
12582 (yyval.node) = NEW_VALIAS((yyvsp[-1].id), rb_intern2(buf, 2), &(yyloc), &(yylsp[-2]));
12583 /*% ripper: var_alias!($:new, $:old) %*/
12584 }
12585#line 12586 "parse.c"
12586 break;
12587
12588 case 32: /* stmt: "'alias'" "global variable" "numbered reference" */
12589#line 3344 "parse.y"
12590 {
12591 static const char mesg[] = "can't make alias for the number variables";
12592 /*%%%*/
12593 yyerror1(&(yylsp[0]), mesg);
12594 /*% %*/
12595 (yyval.node) = NEW_ERROR(&(yyloc));
12596 /*% ripper[error]: alias_error!(ERR_MESG(), $:nth) %*/
12597 }
12598#line 12599 "parse.c"
12599 break;
12600
12601 case 33: /* stmt: "'undef'" undef_list */
12602#line 3353 "parse.y"
12603 {
12604 nd_set_first_loc((yyvsp[0].node), (yylsp[-1]).beg_pos);
12605 RNODE_UNDEF((yyvsp[0].node))->keyword_loc = (yylsp[-1]);
12606 (yyval.node) = (yyvsp[0].node);
12607 /*% ripper: undef!($:list) %*/
12608 }
12609#line 12610 "parse.c"
12610 break;
12611
12612 case 34: /* stmt: stmt "'if' modifier" expr_value */
12613#line 3360 "parse.y"
12614 {
12615 (yyval.node) = new_if(p, (yyvsp[0].node), remove_begin((yyvsp[-2].node)), 0, &(yyloc), &(yylsp[-1]), &NULL_LOC, &NULL_LOC);
12616 fixpos((yyval.node), (yyvsp[0].node));
12617 /*% ripper: if_mod!($:cond, $:body) %*/
12618 }
12619#line 12620 "parse.c"
12620 break;
12621
12622 case 35: /* stmt: stmt "'unless' modifier" expr_value */
12623#line 3366 "parse.y"
12624 {
12625 (yyval.node) = new_unless(p, (yyvsp[0].node), remove_begin((yyvsp[-2].node)), 0, &(yyloc), &(yylsp[-1]), &NULL_LOC, &NULL_LOC);
12626 fixpos((yyval.node), (yyvsp[0].node));
12627 /*% ripper: unless_mod!($:cond, $:body) %*/
12628 }
12629#line 12630 "parse.c"
12630 break;
12631
12632 case 36: /* stmt: stmt "'while' modifier" expr_value */
12633#line 3372 "parse.y"
12634 {
12635 clear_block_exit(p, 0);
12636 if ((yyvsp[-2].node) && nd_type_p((yyvsp[-2].node), NODE_BEGIN)) {
12637 (yyval.node) = NEW_WHILE(cond(p, (yyvsp[0].node), &(yylsp[0])), RNODE_BEGIN((yyvsp[-2].node))->nd_body, 0, &(yyloc), &(yylsp[-1]), &NULL_LOC);
12638 }
12639 else {
12640 (yyval.node) = NEW_WHILE(cond(p, (yyvsp[0].node), &(yylsp[0])), (yyvsp[-2].node), 1, &(yyloc), &(yylsp[-1]), &NULL_LOC);
12641 }
12642 /*% ripper: while_mod!($:cond_expr, $:body) %*/
12643 }
12644#line 12645 "parse.c"
12645 break;
12646
12647 case 37: /* stmt: stmt "'until' modifier" expr_value */
12648#line 3383 "parse.y"
12649 {
12650 clear_block_exit(p, 0);
12651 if ((yyvsp[-2].node) && nd_type_p((yyvsp[-2].node), NODE_BEGIN)) {
12652 (yyval.node) = NEW_UNTIL(cond(p, (yyvsp[0].node), &(yylsp[0])), RNODE_BEGIN((yyvsp[-2].node))->nd_body, 0, &(yyloc), &(yylsp[-1]), &NULL_LOC);
12653 }
12654 else {
12655 (yyval.node) = NEW_UNTIL(cond(p, (yyvsp[0].node), &(yylsp[0])), (yyvsp[-2].node), 1, &(yyloc), &(yylsp[-1]), &NULL_LOC);
12656 }
12657 /*% ripper: until_mod!($:cond_expr, $:body) %*/
12658 }
12659#line 12660 "parse.c"
12660 break;
12661
12662 case 38: /* stmt: stmt "'rescue' modifier" after_rescue stmt */
12663#line 3394 "parse.y"
12664 {
12665 p->ctxt.in_rescue = (yyvsp[-1].ctxt).in_rescue;
12666 NODE *resq;
12667 YYLTYPE loc = code_loc_gen(&(yylsp[-2]), &(yylsp[0]));
12668 resq = NEW_RESBODY(0, 0, remove_begin((yyvsp[0].node)), 0, &loc);
12669 (yyval.node) = NEW_RESCUE(remove_begin((yyvsp[-3].node)), resq, 0, &(yyloc));
12670 /*% ripper: rescue_mod!($:body, $:resbody) %*/
12671 }
12672#line 12673 "parse.c"
12673 break;
12674
12675 case 39: /* stmt: k_END block_open compstmt_stmts '}' */
12676#line 3403 "parse.y"
12677 {
12678 clear_block_exit(p, exits_mask(NODE_BREAK) | exits_mask(NODE_REDO));
12679 restore_block_exit(p, (yyvsp[-2].node_exits));
12680 p->ctxt = (yyvsp[-3].ctxt);
12681 {
12682 NODE *scope = NEW_SCOPE2(0 /* tbl */, 0 /* args */, (yyvsp[-1].node) /* body */, NULL /* parent */, &(yyloc));
12683 (yyval.node) = NEW_POSTEXE(scope, &(yyloc), &(yylsp[-3]), &(yylsp[-2]), &(yylsp[0]));
12684 RNODE_SCOPE(scope)->nd_parent = (yyval.node);
12685 }
12686 /*% ripper: END!($:body) %*/
12687 }
12688#line 12689 "parse.c"
12689 break;
12690
12691 case 41: /* stmt: mlhs '=' lex_ctxt command_call_value */
12692#line 3416 "parse.y"
12693 {
12694 (yyval.node) = node_assign(p, (NODE *)(yyvsp[-3].node_masgn), (yyvsp[0].node), (yyvsp[-1].ctxt), &(yyloc));
12695 /*% ripper: massign!($:lhs, $:rhs) %*/
12696 }
12697#line 12698 "parse.c"
12698 break;
12699
12700 case 42: /* asgn_mrhs: lhs '=' lex_ctxt mrhs */
12701#line 2938 "parse.y"
12702 {
12703 (yyval.node) = node_assign(p, (NODE *)(yyvsp[-3].node), (yyvsp[0].node), (yyvsp[-1].ctxt), &(yyloc));
12704 /*% ripper: assign!($:1, $:4) %*/
12705 }
12706#line 12707 "parse.c"
12707 break;
12708
12709 case 44: /* stmt: mlhs '=' lex_ctxt mrhs_arg "'rescue' modifier" after_rescue stmt */
12710#line 3423 "parse.y"
12711 {
12712 p->ctxt.in_rescue = (yyvsp[-1].ctxt).in_rescue;
12713 YYLTYPE loc = code_loc_gen(&(yylsp[-2]), &(yylsp[0]));
12714 (yyvsp[0].node) = NEW_RESBODY(0, 0, remove_begin((yyvsp[0].node)), 0, &loc);
12715 loc.beg_pos = (yylsp[-3]).beg_pos;
12716 (yyvsp[-3].node) = NEW_RESCUE((yyvsp[-3].node), (yyvsp[0].node), 0, &loc);
12717 (yyval.node) = node_assign(p, (NODE *)(yyvsp[-6].node_masgn), (yyvsp[-3].node), (yyvsp[-4].ctxt), &(yyloc));
12718 /*% ripper: massign!($:lhs, rescue_mod!($:mrhs_arg, $:resbody)) %*/
12719 }
12720#line 12721 "parse.c"
12721 break;
12722
12723 case 45: /* stmt: mlhs '=' lex_ctxt mrhs_arg */
12724#line 3433 "parse.y"
12725 {
12726 (yyval.node) = node_assign(p, (NODE *)(yyvsp[-3].node_masgn), (yyvsp[0].node), (yyvsp[-1].ctxt), &(yyloc));
12727 /*% ripper: massign!($:lhs, $:rhs) %*/
12728 }
12729#line 12730 "parse.c"
12730 break;
12731
12732 case 47: /* stmt: error */
12733#line 3439 "parse.y"
12734 {
12735 (void)yynerrs;
12736 (yyval.node) = NEW_ERROR(&(yyloc));
12737 }
12738#line 12739 "parse.c"
12739 break;
12740
12741 case 48: /* asgn_command_rhs: lhs '=' lex_ctxt command_rhs */
12742#line 2938 "parse.y"
12743 {
12744 (yyval.node) = node_assign(p, (NODE *)(yyvsp[-3].node), (yyvsp[0].node), (yyvsp[-1].ctxt), &(yyloc));
12745 /*% ripper: assign!($:1, $:4) %*/
12746 }
12747#line 12748 "parse.c"
12748 break;
12749
12750 case 50: /* op_asgn_command_rhs: var_lhs "operator-assignment" lex_ctxt command_rhs */
12751#line 3073 "parse.y"
12752 {
12753 (yyval.node) = new_op_assign(p, (yyvsp[-3].node), (yyvsp[-2].id), (yyvsp[0].node), (yyvsp[-1].ctxt), &(yyloc));
12754 /*% ripper: opassign!($:var_lhs, $:tOP_ASGN, $:rhs) %*/
12755 }
12756#line 12757 "parse.c"
12757 break;
12758
12759 case 51: /* op_asgn_command_rhs: primary_value '[' opt_call_args rbracket "operator-assignment" lex_ctxt command_rhs */
12760#line 3078 "parse.y"
12761 {
12762 (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]));
12763 /*% ripper: opassign!(aref_field!($:primary_value, $:opt_call_args), $:tOP_ASGN, $:rhs) %*/
12764 }
12765#line 12766 "parse.c"
12766 break;
12767
12768 case 52: /* op_asgn_command_rhs: primary_value call_op "local variable or method" "operator-assignment" lex_ctxt command_rhs */
12769#line 3083 "parse.y"
12770 {
12771 (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]));
12772 /*% ripper: opassign!(field!($:primary_value, $:call_op, $:tIDENTIFIER), $:tOP_ASGN, $:rhs) %*/
12773 }
12774#line 12775 "parse.c"
12775 break;
12776
12777 case 53: /* op_asgn_command_rhs: primary_value call_op "constant" "operator-assignment" lex_ctxt command_rhs */
12778#line 3088 "parse.y"
12779 {
12780 (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]));
12781 /*% ripper: opassign!(field!($:primary_value, $:call_op, $:tCONSTANT), $:tOP_ASGN, $:rhs) %*/
12782 }
12783#line 12784 "parse.c"
12784 break;
12785
12786 case 54: /* op_asgn_command_rhs: primary_value "::" "local variable or method" "operator-assignment" lex_ctxt command_rhs */
12787#line 3093 "parse.y"
12788 {
12789 (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]));
12790 /*% ripper: opassign!(field!($:primary_value, $:tCOLON2, $:tIDENTIFIER), $:tOP_ASGN, $:rhs) %*/
12791 }
12792#line 12793 "parse.c"
12793 break;
12794
12795 case 55: /* op_asgn_command_rhs: primary_value "::" "constant" "operator-assignment" lex_ctxt command_rhs */
12796#line 3098 "parse.y"
12797 {
12798 YYLTYPE loc = code_loc_gen(&(yylsp[-5]), &(yylsp[-3]));
12799 (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));
12800 /*% ripper: opassign!(const_path_field!($:primary_value, $:tCONSTANT), $:tOP_ASGN, $:rhs) %*/
12801 }
12802#line 12803 "parse.c"
12803 break;
12804
12805 case 56: /* op_asgn_command_rhs: ":: at EXPR_BEG" "constant" "operator-assignment" lex_ctxt command_rhs */
12806#line 3104 "parse.y"
12807 {
12808 YYLTYPE loc = code_loc_gen(&(yylsp[-4]), &(yylsp[-3]));
12809 (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));
12810 /*% ripper: opassign!(top_const_field!($:tCONSTANT), $:tOP_ASGN, $:rhs) %*/
12811 }
12812#line 12813 "parse.c"
12813 break;
12814
12815 case 57: /* op_asgn_command_rhs: backref "operator-assignment" lex_ctxt command_rhs */
12816#line 3110 "parse.y"
12817 {
12818 VALUE MAYBE_UNUSED(e) = rb_backref_error(p, (yyvsp[-3].node));
12819 (yyval.node) = NEW_ERROR(&(yyloc));
12820 /*% ripper[error]: assign_error!(?e, opassign!(var_field!($:backref), $:tOP_ASGN, $:rhs)) %*/
12821 }
12822#line 12823 "parse.c"
12823 break;
12824
12825 case 59: /* def_endless_method_endless_command: defn_head f_opt_paren_args '=' endless_command */
12826#line 2978 "parse.y"
12827 {
12828 endless_method_name(p, (yyvsp[-3].node_def_temp)->nd_mid, &(yylsp[-3]));
12829 restore_defun(p, (yyvsp[-3].node_def_temp));
12830 ((yyval.node) = (yyvsp[-3].node_def_temp)->nd_def)->nd_loc = (yyloc);
12831 (yyvsp[0].node) = new_scope_body(p, (yyvsp[-2].node_args), (yyvsp[0].node), (yyval.node), &(yyloc));
12832 RNODE_DEFN((yyval.node))->nd_defn = (yyvsp[0].node);
12833 /*% ripper: bodystmt!($:bodystmt, Qnil, Qnil, Qnil) %*/
12834 /*% ripper: def!($:head, $:args, $:$) %*/
12835 local_pop(p);
12836 }
12837#line 12838 "parse.c"
12838 break;
12839
12840 case 60: /* def_endless_method_endless_command: defs_head f_opt_paren_args '=' endless_command */
12841#line 2989 "parse.y"
12842 {
12843 endless_method_name(p, (yyvsp[-3].node_def_temp)->nd_mid, &(yylsp[-3]));
12844 restore_defun(p, (yyvsp[-3].node_def_temp));
12845 ((yyval.node) = (yyvsp[-3].node_def_temp)->nd_def)->nd_loc = (yyloc);
12846 (yyvsp[0].node) = new_scope_body(p, (yyvsp[-2].node_args), (yyvsp[0].node), (yyval.node), &(yyloc));
12847 RNODE_DEFS((yyval.node))->nd_defn = (yyvsp[0].node);
12848 /*% ripper: bodystmt!($:bodystmt, Qnil, Qnil, Qnil) %*/
12849 /*% ripper: defs!(*$:head[0..2], $:args, $:$) %*/
12850 local_pop(p);
12851 }
12852#line 12853 "parse.c"
12853 break;
12854
12855 case 63: /* endless_command: endless_command "'rescue' modifier" after_rescue arg */
12856#line 3452 "parse.y"
12857 {
12858 p->ctxt.in_rescue = (yyvsp[-1].ctxt).in_rescue;
12859 (yyval.node) = rescued_expr(p, (yyvsp[-3].node), (yyvsp[0].node), &(yylsp[-3]), &(yylsp[-2]), &(yylsp[0]));
12860 /*% ripper: rescue_mod!($:1, $:4) %*/
12861 }
12862#line 12863 "parse.c"
12863 break;
12864
12865 case 66: /* endless_command: "'not'" option_'\n' endless_command */
12866#line 3458 "parse.y"
12867 {
12868 (yyval.node) = call_uni_op(p, method_cond(p, (yyvsp[0].node), &(yylsp[0])), METHOD_NOT, &(yylsp[-2]), &(yyloc));
12869 /*% ripper: unary!(ID2VAL(idNOT), $:3) %*/
12870 }
12871#line 12872 "parse.c"
12872 break;
12873
12874 case 68: /* command_rhs: command_call_value "'rescue' modifier" after_rescue stmt */
12875#line 3466 "parse.y"
12876 {
12877 p->ctxt.in_rescue = (yyvsp[-1].ctxt).in_rescue;
12878 YYLTYPE loc = code_loc_gen(&(yylsp[-2]), &(yylsp[0]));
12879 (yyval.node) = NEW_RESCUE((yyvsp[-3].node), NEW_RESBODY(0, 0, remove_begin((yyvsp[0].node)), 0, &loc), 0, &(yyloc));
12880 /*% ripper: rescue_mod!($:1, $:4) %*/
12881 }
12882#line 12883 "parse.c"
12883 break;
12884
12885 case 71: /* expr: expr "'and'" expr */
12886#line 3477 "parse.y"
12887 {
12888 (yyval.node) = logop(p, idAND, (yyvsp[-2].node), (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
12889 /*% ripper: binary!($:left, ID2VAL(idAND), $:right) %*/
12890 }
12891#line 12892 "parse.c"
12892 break;
12893
12894 case 72: /* expr: expr "'or'" expr */
12895#line 3482 "parse.y"
12896 {
12897 (yyval.node) = logop(p, idOR, (yyvsp[-2].node), (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
12898 /*% ripper: binary!($:left, ID2VAL(idOR), $:right) %*/
12899 }
12900#line 12901 "parse.c"
12901 break;
12902
12903 case 73: /* expr: "'not'" option_'\n' expr */
12904#line 3487 "parse.y"
12905 {
12906 (yyval.node) = call_uni_op(p, method_cond(p, (yyvsp[0].node), &(yylsp[0])), METHOD_NOT, &(yylsp[-2]), &(yyloc));
12907 /*% ripper: unary!(ID2VAL(idNOT), $:arg) %*/
12908 }
12909#line 12910 "parse.c"
12910 break;
12911
12912 case 74: /* expr: '!' command_call */
12913#line 3492 "parse.y"
12914 {
12915 (yyval.node) = call_uni_op(p, method_cond(p, (yyvsp[0].node), &(yylsp[0])), '!', &(yylsp[-1]), &(yyloc));
12916 /*% ripper: unary!(ID2VAL('\'!\''), $:arg) %*/
12917 }
12918#line 12919 "parse.c"
12919 break;
12920
12921 case 75: /* $@7: %empty */
12922#line 3497 "parse.y"
12923 {
12924 value_expr(p, (yyvsp[-1].node));
12925 }
12926#line 12927 "parse.c"
12927 break;
12928
12929 case 76: /* expr: arg "=>" $@7 p_in_kwarg p_pvtbl p_pktbl p_top_expr_body */
12930#line 3502 "parse.y"
12931 {
12932 pop_pktbl(p, (yyvsp[-1].tbl));
12933 pop_pvtbl(p, (yyvsp[-2].tbl));
12934 p->ctxt.in_kwarg = (yyvsp[-3].ctxt).in_kwarg;
12935 p->ctxt.in_alt_pattern = (yyvsp[-3].ctxt).in_alt_pattern;
12936 p->ctxt.capture_in_pattern = (yyvsp[-3].ctxt).capture_in_pattern;
12937 (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);
12938 /*% ripper: case!($:arg, in!($:body, Qnil, Qnil)) %*/
12939 }
12940#line 12941 "parse.c"
12941 break;
12942
12943 case 77: /* $@8: %empty */
12944#line 3512 "parse.y"
12945 {
12946 value_expr(p, (yyvsp[-1].node));
12947 }
12948#line 12949 "parse.c"
12949 break;
12950
12951 case 78: /* expr: arg "'in'" $@8 p_in_kwarg p_pvtbl p_pktbl p_top_expr_body */
12952#line 3517 "parse.y"
12953 {
12954 pop_pktbl(p, (yyvsp[-1].tbl));
12955 pop_pvtbl(p, (yyvsp[-2].tbl));
12956 p->ctxt.in_kwarg = (yyvsp[-3].ctxt).in_kwarg;
12957 p->ctxt.in_alt_pattern = (yyvsp[-3].ctxt).in_alt_pattern;
12958 p->ctxt.capture_in_pattern = (yyvsp[-3].ctxt).capture_in_pattern;
12959 (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);
12960 /*% ripper: case!($:arg, in!($:body, Qnil, Qnil)) %*/
12961 }
12962#line 12963 "parse.c"
12963 break;
12964
12965 case 80: /* def_name: fname */
12966#line 3530 "parse.y"
12967 {
12968 numparam_name(p, (yyvsp[0].id));
12969 local_push(p, 0);
12970 p->ctxt.in_def = 1;
12971 p->ctxt.in_rescue = before_rescue;
12972 p->ctxt.cant_return = 0;
12973 (yyval.id) = (yyvsp[0].id);
12974 }
12975#line 12976 "parse.c"
12976 break;
12977
12978 case 81: /* defn_head: k_def def_name */
12979#line 3541 "parse.y"
12980 {
12981 (yyval.node_def_temp) = def_head_save(p, (yyvsp[-1].node_def_temp));
12982 (yyval.node_def_temp)->nd_mid = (yyvsp[0].id);
12983 (yyval.node_def_temp)->nd_def = NEW_DEFN((yyvsp[0].id), 0, &(yyloc));
12984 /*% ripper: $:def_name %*/
12985 }
12986#line 12987 "parse.c"
12987 break;
12988
12989 case 82: /* $@9: %empty */
12990#line 3550 "parse.y"
12991 {
12992 SET_LEX_STATE(EXPR_FNAME);
12993 }
12994#line 12995 "parse.c"
12995 break;
12996
12997 case 83: /* defs_head: k_def singleton dot_or_colon $@9 def_name */
12998#line 3554 "parse.y"
12999 {
13000 SET_LEX_STATE(EXPR_ENDFN|EXPR_LABEL); /* force for args */
13001 (yyval.node_def_temp) = def_head_save(p, (yyvsp[-4].node_def_temp));
13002 (yyval.node_def_temp)->nd_mid = (yyvsp[0].id);
13003 (yyval.node_def_temp)->nd_def = NEW_DEFS((yyvsp[-3].node), (yyvsp[0].id), 0, &(yyloc));
13004 /*% ripper: [$:singleton, $:dot_or_colon, $:def_name] %*/
13005 }
13006#line 13007 "parse.c"
13007 break;
13008
13009 case 84: /* value_expr_expr: expr */
13010#line 3173 "parse.y"
13011 {
13012 value_expr(p, (yyvsp[0].node));
13013 (yyval.node) = (yyvsp[0].node);
13014 }
13015#line 13016 "parse.c"
13016 break;
13017
13018 case 86: /* expr_value: error */
13019#line 3565 "parse.y"
13020 {
13021 (yyval.node) = NEW_ERROR(&(yyloc));
13022 }
13023#line 13024 "parse.c"
13024 break;
13025
13026 case 87: /* $@10: %empty */
13027#line 3570 "parse.y"
13028 {COND_PUSH(1);}
13029#line 13030 "parse.c"
13030 break;
13031
13032 case 88: /* $@11: %empty */
13033#line 3570 "parse.y"
13034 {COND_POP();}
13035#line 13036 "parse.c"
13036 break;
13037
13038 case 89: /* expr_value_do: $@10 expr_value do $@11 */
13039#line 3571 "parse.y"
13040 {
13041 (yyval.node) = (yyvsp[-2].node);
13042 /*% ripper: $:2 %*/
13043 }
13044#line 13045 "parse.c"
13045 break;
13046
13047 case 92: /* value_expr_command_call: command_call */
13048#line 3173 "parse.y"
13049 {
13050 value_expr(p, (yyvsp[0].node));
13051 (yyval.node) = (yyvsp[0].node);
13052 }
13053#line 13054 "parse.c"
13054 break;
13055
13056 case 95: /* block_command: block_call call_op2 operation2 command_args */
13057#line 3586 "parse.y"
13058 {
13059 (yyval.node) = new_qcall(p, (yyvsp[-2].id), (yyvsp[-3].node), (yyvsp[-1].id), (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
13060 /*% ripper: method_add_arg!(call!($:1, $:2, $:3), $:4) %*/
13061 }
13062#line 13063 "parse.c"
13063 break;
13064
13065 case 96: /* cmd_brace_block: "{ arg" brace_body '}' */
13066#line 3593 "parse.y"
13067 {
13068 (yyval.node) = (yyvsp[-1].node);
13069 set_embraced_location((yyval.node), &(yylsp[-2]), &(yylsp[0]));
13070 /*% ripper: $:2 %*/
13071 }
13072#line 13073 "parse.c"
13073 break;
13074
13075 case 97: /* fcall: "local variable or method" */
13076#line 3601 "parse.y"
13077 {
13078 (yyval.node_fcall) = NEW_FCALL((yyvsp[0].id), 0, &(yyloc));
13079 /*% ripper: $:1 %*/
13080 }
13081#line 13082 "parse.c"
13082 break;
13083
13084 case 98: /* fcall: "constant" */
13085#line 3601 "parse.y"
13086 {
13087 (yyval.node_fcall) = NEW_FCALL((yyvsp[0].id), 0, &(yyloc));
13088 /*% ripper: $:1 %*/
13089 }
13090#line 13091 "parse.c"
13091 break;
13092
13093 case 99: /* fcall: "method" */
13094#line 3601 "parse.y"
13095 {
13096 (yyval.node_fcall) = NEW_FCALL((yyvsp[0].id), 0, &(yyloc));
13097 /*% ripper: $:1 %*/
13098 }
13099#line 13100 "parse.c"
13100 break;
13101
13102 case 100: /* command: fcall command_args */
13103#line 3608 "parse.y"
13104 {
13105 (yyvsp[-1].node_fcall)->nd_args = (yyvsp[0].node);
13106 nd_set_last_loc((yyvsp[-1].node_fcall), (yylsp[0]).end_pos);
13107 (yyval.node) = (NODE *)(yyvsp[-1].node_fcall);
13108 /*% ripper: command!($:1, $:2) %*/
13109 }
13110#line 13111 "parse.c"
13111 break;
13112
13113 case 101: /* command: fcall command_args cmd_brace_block */
13114#line 3615 "parse.y"
13115 {
13116 block_dup_check(p, (yyvsp[-1].node), (yyvsp[0].node));
13117 (yyvsp[-2].node_fcall)->nd_args = (yyvsp[-1].node);
13118 (yyval.node) = method_add_block(p, (NODE *)(yyvsp[-2].node_fcall), (yyvsp[0].node), &(yyloc));
13119 fixpos((yyval.node), RNODE((yyvsp[-2].node_fcall)));
13120 nd_set_last_loc((yyvsp[-2].node_fcall), (yylsp[-1]).end_pos);
13121 /*% ripper: method_add_block!(command!($:1, $:2), $:3) %*/
13122 }
13123#line 13124 "parse.c"
13124 break;
13125
13126 case 102: /* command: primary_value call_op operation2 command_args */
13127#line 3624 "parse.y"
13128 {
13129 (yyval.node) = new_command_qcall(p, (yyvsp[-2].id), (yyvsp[-3].node), (yyvsp[-1].id), (yyvsp[0].node), 0, &(yylsp[-1]), &(yyloc));
13130 /*% ripper: command_call!($:1, $:2, $:3, $:4) %*/
13131 }
13132#line 13133 "parse.c"
13133 break;
13134
13135 case 103: /* command: primary_value call_op operation2 command_args cmd_brace_block */
13136#line 3629 "parse.y"
13137 {
13138 (yyval.node) = new_command_qcall(p, (yyvsp[-3].id), (yyvsp[-4].node), (yyvsp[-2].id), (yyvsp[-1].node), (yyvsp[0].node), &(yylsp[-2]), &(yyloc));
13139 /*% ripper: method_add_block!(command_call!($:1, $:2, $:3, $:4), $:5) %*/
13140 }
13141#line 13142 "parse.c"
13142 break;
13143
13144 case 104: /* command: primary_value "::" operation2 command_args */
13145#line 3634 "parse.y"
13146 {
13147 (yyval.node) = new_command_qcall(p, idCOLON2, (yyvsp[-3].node), (yyvsp[-1].id), (yyvsp[0].node), 0, &(yylsp[-1]), &(yyloc));
13148 /*% ripper: command_call!($:1, $:2, $:3, $:4) %*/
13149 }
13150#line 13151 "parse.c"
13151 break;
13152
13153 case 105: /* command: primary_value "::" operation2 command_args cmd_brace_block */
13154#line 3639 "parse.y"
13155 {
13156 (yyval.node) = new_command_qcall(p, idCOLON2, (yyvsp[-4].node), (yyvsp[-2].id), (yyvsp[-1].node), (yyvsp[0].node), &(yylsp[-2]), &(yyloc));
13157 /*% ripper: method_add_block!(command_call!($:1, $:2, $:3, $:4), $:5) %*/
13158 }
13159#line 13160 "parse.c"
13160 break;
13161
13162 case 106: /* command: primary_value "::" "constant" '{' brace_body '}' */
13163#line 3644 "parse.y"
13164 {
13165 set_embraced_location((yyvsp[-1].node), &(yylsp[-2]), &(yylsp[0]));
13166 (yyval.node) = new_command_qcall(p, idCOLON2, (yyvsp[-5].node), (yyvsp[-3].id), 0, (yyvsp[-1].node), &(yylsp[-3]), &(yyloc));
13167 /*% ripper: method_add_block!(command_call!($:1, $:2, $:3, Qnil), $:5) %*/
13168 }
13169#line 13170 "parse.c"
13170 break;
13171
13172 case 107: /* command: "'super'" command_args */
13173#line 3650 "parse.y"
13174 {
13175 (yyval.node) = NEW_SUPER((yyvsp[0].node), &(yyloc), &(yylsp[-1]), &NULL_LOC, &NULL_LOC);
13176 fixpos((yyval.node), (yyvsp[0].node));
13177 /*% ripper: super!($:2) %*/
13178 }
13179#line 13180 "parse.c"
13180 break;
13181
13182 case 108: /* command: k_yield command_args */
13183#line 3656 "parse.y"
13184 {
13185 (yyval.node) = NEW_YIELD((yyvsp[0].node), &(yyloc), &(yylsp[-1]), &NULL_LOC, &NULL_LOC);
13186 fixpos((yyval.node), (yyvsp[0].node));
13187 /*% ripper: yield!($:2) %*/
13188 }
13189#line 13190 "parse.c"
13190 break;
13191
13192 case 109: /* command: k_return call_args */
13193#line 3662 "parse.y"
13194 {
13195 (yyval.node) = NEW_RETURN(ret_args(p, (yyvsp[0].node)), &(yyloc), &(yylsp[-1]));
13196 /*% ripper: return!($:2) %*/
13197 }
13198#line 13199 "parse.c"
13199 break;
13200
13201 case 110: /* command: "'break'" call_args */
13202#line 3667 "parse.y"
13203 {
13204 NODE *args = 0;
13205 args = ret_args(p, (yyvsp[0].node));
13206 (yyval.node) = add_block_exit(p, NEW_BREAK(args, &(yyloc), &(yylsp[-1])));
13207 /*% ripper: break!($:2) %*/
13208 }
13209#line 13210 "parse.c"
13210 break;
13211
13212 case 111: /* command: "'next'" call_args */
13213#line 3674 "parse.y"
13214 {
13215 NODE *args = 0;
13216 args = ret_args(p, (yyvsp[0].node));
13217 (yyval.node) = add_block_exit(p, NEW_NEXT(args, &(yyloc), &(yylsp[-1])));
13218 /*% ripper: next!($:2) %*/
13219 }
13220#line 13221 "parse.c"
13221 break;
13222
13223 case 113: /* mlhs: "(" mlhs_inner rparen */
13224#line 3684 "parse.y"
13225 {
13226 (yyval.node_masgn) = (yyvsp[-1].node_masgn);
13227 /*% ripper: mlhs_paren!($:2) %*/
13228 }
13229#line 13230 "parse.c"
13230 break;
13231
13232 case 115: /* mlhs_inner: "(" mlhs_inner rparen */
13233#line 3692 "parse.y"
13234 {
13235 (yyval.node_masgn) = NEW_MASGN(NEW_LIST((NODE *)(yyvsp[-1].node_masgn), &(yyloc)), 0, &(yyloc));
13236 /*% ripper: mlhs_paren!($:2) %*/
13237 }
13238#line 13239 "parse.c"
13239 break;
13240
13241 case 116: /* mlhs_basic: mlhs_head */
13242#line 3699 "parse.y"
13243 {
13244 (yyval.node_masgn) = NEW_MASGN((yyvsp[0].node), 0, &(yyloc));
13245 /*% ripper: $:1 %*/
13246 }
13247#line 13248 "parse.c"
13248 break;
13249
13250 case 117: /* mlhs_basic: mlhs_head mlhs_item */
13251#line 3704 "parse.y"
13252 {
13253 (yyval.node_masgn) = NEW_MASGN(list_append(p, (yyvsp[-1].node), (yyvsp[0].node)), 0, &(yyloc));
13254 /*% ripper: mlhs_add!($:1, $:2) %*/
13255 }
13256#line 13257 "parse.c"
13257 break;
13258
13259 case 118: /* mlhs_basic: mlhs_head "*" mlhs_node */
13260#line 3709 "parse.y"
13261 {
13262 (yyval.node_masgn) = NEW_MASGN((yyvsp[-2].node), (yyvsp[0].node), &(yyloc));
13263 /*% ripper: mlhs_add_star!($:1, $:3) %*/
13264 }
13265#line 13266 "parse.c"
13266 break;
13267
13268 case 119: /* mlhs_items_mlhs_item: mlhs_item */
13269#line 3060 "parse.y"
13270 {
13271 (yyval.node) = NEW_LIST((yyvsp[0].node), &(yyloc));
13272 /*% ripper: mlhs_add!(mlhs_new!, $:1) %*/
13273 }
13274#line 13275 "parse.c"
13275 break;
13276
13277 case 120: /* mlhs_items_mlhs_item: mlhs_items_mlhs_item ',' mlhs_item */
13278#line 3065 "parse.y"
13279 {
13280 (yyval.node) = list_append(p, (yyvsp[-2].node), (yyvsp[0].node));
13281 /*% ripper: mlhs_add!($:1, $:3) %*/
13282 }
13283#line 13284 "parse.c"
13284 break;
13285
13286 case 121: /* mlhs_basic: mlhs_head "*" mlhs_node ',' mlhs_items_mlhs_item */
13287#line 3714 "parse.y"
13288 {
13289 (yyval.node_masgn) = NEW_MASGN((yyvsp[-4].node), NEW_POSTARG((yyvsp[-2].node),(yyvsp[0].node),&(yyloc)), &(yyloc));
13290 /*% ripper: mlhs_add_post!(mlhs_add_star!($:1, $:3), $:5) %*/
13291 }
13292#line 13293 "parse.c"
13293 break;
13294
13295 case 122: /* mlhs_basic: mlhs_head "*" */
13296#line 3719 "parse.y"
13297 {
13298 (yyval.node_masgn) = NEW_MASGN((yyvsp[-1].node), NODE_SPECIAL_NO_NAME_REST, &(yyloc));
13299 /*% ripper: mlhs_add_star!($:1, Qnil) %*/
13300 }
13301#line 13302 "parse.c"
13302 break;
13303
13304 case 123: /* mlhs_basic: mlhs_head "*" ',' mlhs_items_mlhs_item */
13305#line 3724 "parse.y"
13306 {
13307 (yyval.node_masgn) = NEW_MASGN((yyvsp[-3].node), NEW_POSTARG(NODE_SPECIAL_NO_NAME_REST, (yyvsp[0].node), &(yyloc)), &(yyloc));
13308 /*% ripper: mlhs_add_post!(mlhs_add_star!($:1, Qnil), $:4) %*/
13309 }
13310#line 13311 "parse.c"
13311 break;
13312
13313 case 124: /* mlhs_basic: "*" mlhs_node */
13314#line 3729 "parse.y"
13315 {
13316 (yyval.node_masgn) = NEW_MASGN(0, (yyvsp[0].node), &(yyloc));
13317 /*% ripper: mlhs_add_star!(mlhs_new!, $:2) %*/
13318 }
13319#line 13320 "parse.c"
13320 break;
13321
13322 case 125: /* mlhs_basic: "*" mlhs_node ',' mlhs_items_mlhs_item */
13323#line 3734 "parse.y"
13324 {
13325 (yyval.node_masgn) = NEW_MASGN(0, NEW_POSTARG((yyvsp[-2].node),(yyvsp[0].node),&(yyloc)), &(yyloc));
13326 /*% ripper: mlhs_add_post!(mlhs_add_star!(mlhs_new!, $:2), $:4) %*/
13327 }
13328#line 13329 "parse.c"
13329 break;
13330
13331 case 126: /* mlhs_basic: "*" */
13332#line 3739 "parse.y"
13333 {
13334 (yyval.node_masgn) = NEW_MASGN(0, NODE_SPECIAL_NO_NAME_REST, &(yyloc));
13335 /*% ripper: mlhs_add_star!(mlhs_new!, Qnil) %*/
13336 }
13337#line 13338 "parse.c"
13338 break;
13339
13340 case 127: /* mlhs_basic: "*" ',' mlhs_items_mlhs_item */
13341#line 3744 "parse.y"
13342 {
13343 (yyval.node_masgn) = NEW_MASGN(0, NEW_POSTARG(NODE_SPECIAL_NO_NAME_REST, (yyvsp[0].node), &(yyloc)), &(yyloc));
13344 /*% ripper: mlhs_add_post!(mlhs_add_star!(mlhs_new!, Qnil), $:3) %*/
13345 }
13346#line 13347 "parse.c"
13347 break;
13348
13349 case 129: /* mlhs_item: "(" mlhs_inner rparen */
13350#line 3752 "parse.y"
13351 {
13352 (yyval.node) = (NODE *)(yyvsp[-1].node_masgn);
13353 /*% ripper: mlhs_paren!($:2) %*/
13354 }
13355#line 13356 "parse.c"
13356 break;
13357
13358 case 130: /* mlhs_head: mlhs_item ',' */
13359#line 3759 "parse.y"
13360 {
13361 (yyval.node) = NEW_LIST((yyvsp[-1].node), &(yylsp[-1]));
13362 /*% ripper: mlhs_add!(mlhs_new!, $:1) %*/
13363 }
13364#line 13365 "parse.c"
13365 break;
13366
13367 case 131: /* mlhs_head: mlhs_head mlhs_item ',' */
13368#line 3764 "parse.y"
13369 {
13370 (yyval.node) = list_append(p, (yyvsp[-2].node), (yyvsp[-1].node));
13371 /*% ripper: mlhs_add!($:1, $:2) %*/
13372 }
13373#line 13374 "parse.c"
13374 break;
13375
13376 case 132: /* mlhs_node: user_variable */
13377#line 3772 "parse.y"
13378 {
13379 /*% ripper: var_field!($:1) %*/
13380 (yyval.node) = assignable(p, (yyvsp[0].id), 0, &(yyloc));
13381 }
13382#line 13383 "parse.c"
13383 break;
13384
13385 case 133: /* mlhs_node: keyword_variable */
13386#line 3772 "parse.y"
13387 {
13388 /*% ripper: var_field!($:1) %*/
13389 (yyval.node) = assignable(p, (yyvsp[0].id), 0, &(yyloc));
13390 }
13391#line 13392 "parse.c"
13392 break;
13393
13394 case 134: /* mlhs_node: primary_value '[' opt_call_args rbracket */
13395#line 3777 "parse.y"
13396 {
13397 (yyval.node) = aryset(p, (yyvsp[-3].node), (yyvsp[-1].node), &(yyloc));
13398 /*% ripper: aref_field!($:1, $:3) %*/
13399 }
13400#line 13401 "parse.c"
13401 break;
13402
13403 case 135: /* mlhs_node: primary_value call_op "local variable or method" */
13404#line 3782 "parse.y"
13405 {
13406 anddot_multiple_assignment_check(p, &(yylsp[-1]), (yyvsp[-1].id));
13407 (yyval.node) = attrset(p, (yyvsp[-2].node), (yyvsp[-1].id), (yyvsp[0].id), &(yyloc));
13408 /*% ripper: field!($:1, $:2, $:3) %*/
13409 }
13410#line 13411 "parse.c"
13411 break;
13412
13413 case 136: /* mlhs_node: primary_value call_op "constant" */
13414#line 3782 "parse.y"
13415 {
13416 anddot_multiple_assignment_check(p, &(yylsp[-1]), (yyvsp[-1].id));
13417 (yyval.node) = attrset(p, (yyvsp[-2].node), (yyvsp[-1].id), (yyvsp[0].id), &(yyloc));
13418 /*% ripper: field!($:1, $:2, $:3) %*/
13419 }
13420#line 13421 "parse.c"
13421 break;
13422
13423 case 137: /* mlhs_node: primary_value "::" "local variable or method" */
13424#line 3788 "parse.y"
13425 {
13426 (yyval.node) = attrset(p, (yyvsp[-2].node), idCOLON2, (yyvsp[0].id), &(yyloc));
13427 /*% ripper: const_path_field!($:1, $:3) %*/
13428 }
13429#line 13430 "parse.c"
13430 break;
13431
13432 case 138: /* mlhs_node: primary_value "::" "constant" */
13433#line 3793 "parse.y"
13434 {
13435 /*% ripper: const_path_field!($:1, $:3) %*/
13436 (yyval.node) = const_decl(p, NEW_COLON2((yyvsp[-2].node), (yyvsp[0].id), &(yyloc), &(yylsp[-1]), &(yylsp[0])), &(yyloc));
13437 }
13438#line 13439 "parse.c"
13439 break;
13440
13441 case 139: /* mlhs_node: ":: at EXPR_BEG" "constant" */
13442#line 3798 "parse.y"
13443 {
13444 /*% ripper: top_const_field!($:2) %*/
13445 (yyval.node) = const_decl(p, NEW_COLON3((yyvsp[0].id), &(yyloc), &(yylsp[-1]), &(yylsp[0])), &(yyloc));
13446 }
13447#line 13448 "parse.c"
13448 break;
13449
13450 case 140: /* mlhs_node: backref */
13451#line 3803 "parse.y"
13452 {
13453 VALUE MAYBE_UNUSED(e) = rb_backref_error(p, (yyvsp[0].node));
13454 (yyval.node) = NEW_ERROR(&(yyloc));
13455 /*% ripper[error]: assign_error!(?e, var_field!($:1)) %*/
13456 }
13457#line 13458 "parse.c"
13458 break;
13459
13460 case 141: /* lhs: user_variable */
13461#line 3811 "parse.y"
13462 {
13463 /*% ripper: var_field!($:1) %*/
13464 (yyval.node) = assignable(p, (yyvsp[0].id), 0, &(yyloc));
13465 }
13466#line 13467 "parse.c"
13467 break;
13468
13469 case 142: /* lhs: keyword_variable */
13470#line 3811 "parse.y"
13471 {
13472 /*% ripper: var_field!($:1) %*/
13473 (yyval.node) = assignable(p, (yyvsp[0].id), 0, &(yyloc));
13474 }
13475#line 13476 "parse.c"
13476 break;
13477
13478 case 143: /* lhs: primary_value '[' opt_call_args rbracket */
13479#line 3816 "parse.y"
13480 {
13481 (yyval.node) = aryset(p, (yyvsp[-3].node), (yyvsp[-1].node), &(yyloc));
13482 /*% ripper: aref_field!($:1, $:3) %*/
13483 }
13484#line 13485 "parse.c"
13485 break;
13486
13487 case 144: /* lhs: primary_value call_op "local variable or method" */
13488#line 3821 "parse.y"
13489 {
13490 (yyval.node) = attrset(p, (yyvsp[-2].node), (yyvsp[-1].id), (yyvsp[0].id), &(yyloc));
13491 /*% ripper: field!($:1, $:2, $:3) %*/
13492 }
13493#line 13494 "parse.c"
13494 break;
13495
13496 case 145: /* lhs: primary_value call_op "constant" */
13497#line 3821 "parse.y"
13498 {
13499 (yyval.node) = attrset(p, (yyvsp[-2].node), (yyvsp[-1].id), (yyvsp[0].id), &(yyloc));
13500 /*% ripper: field!($:1, $:2, $:3) %*/
13501 }
13502#line 13503 "parse.c"
13503 break;
13504
13505 case 146: /* lhs: primary_value "::" "local variable or method" */
13506#line 3826 "parse.y"
13507 {
13508 (yyval.node) = attrset(p, (yyvsp[-2].node), idCOLON2, (yyvsp[0].id), &(yyloc));
13509 /*% ripper: field!($:1, $:2, $:3) %*/
13510 }
13511#line 13512 "parse.c"
13512 break;
13513
13514 case 147: /* lhs: primary_value "::" "constant" */
13515#line 3831 "parse.y"
13516 {
13517 /*% ripper: const_path_field!($:1, $:3) %*/
13518 (yyval.node) = const_decl(p, NEW_COLON2((yyvsp[-2].node), (yyvsp[0].id), &(yyloc), &(yylsp[-1]), &(yylsp[0])), &(yyloc));
13519 }
13520#line 13521 "parse.c"
13521 break;
13522
13523 case 148: /* lhs: ":: at EXPR_BEG" "constant" */
13524#line 3836 "parse.y"
13525 {
13526 /*% ripper: top_const_field!($:2) %*/
13527 (yyval.node) = const_decl(p, NEW_COLON3((yyvsp[0].id), &(yyloc), &(yylsp[-1]), &(yylsp[0])), &(yyloc));
13528 }
13529#line 13530 "parse.c"
13530 break;
13531
13532 case 149: /* lhs: backref */
13533#line 3841 "parse.y"
13534 {
13535 VALUE MAYBE_UNUSED(e) = rb_backref_error(p, (yyvsp[0].node));
13536 (yyval.node) = NEW_ERROR(&(yyloc));
13537 /*% ripper[error]: assign_error!(?e, var_field!($:1)) %*/
13538 }
13539#line 13540 "parse.c"
13540 break;
13541
13542 case 150: /* cname: "local variable or method" */
13543#line 3849 "parse.y"
13544 {
13545 static const char mesg[] = "class/module name must be CONSTANT";
13546 /*%%%*/
13547 yyerror1(&(yylsp[0]), mesg);
13548 /*% %*/
13549 /*% ripper[error]: class_name_error!(ERR_MESG(), $:1) %*/
13550 }
13551#line 13552 "parse.c"
13552 break;
13553
13554 case 152: /* cpath: ":: at EXPR_BEG" cname */
13555#line 3860 "parse.y"
13556 {
13557 (yyval.node) = NEW_COLON3((yyvsp[0].id), &(yyloc), &(yylsp[-1]), &(yylsp[0]));
13558 /*% ripper: top_const_ref!($:2) %*/
13559 }
13560#line 13561 "parse.c"
13561 break;
13562
13563 case 153: /* cpath: cname */
13564#line 3865 "parse.y"
13565 {
13566 (yyval.node) = NEW_COLON2(0, (yyvsp[0].id), &(yyloc), &NULL_LOC, &(yylsp[0]));
13567 /*% ripper: const_ref!($:1) %*/
13568 }
13569#line 13570 "parse.c"
13570 break;
13571
13572 case 154: /* cpath: primary_value "::" cname */
13573#line 3870 "parse.y"
13574 {
13575 (yyval.node) = NEW_COLON2((yyvsp[-2].node), (yyvsp[0].id), &(yyloc), &(yylsp[-1]), &(yylsp[0]));
13576 /*% ripper: const_path_ref!($:1, $:3) %*/
13577 }
13578#line 13579 "parse.c"
13579 break;
13580
13581 case 158: /* fname: op */
13582#line 3878 "parse.y"
13583 {
13584 SET_LEX_STATE(EXPR_ENDFN);
13585 (yyval.id) = (yyvsp[0].id);
13586 }
13587#line 13588 "parse.c"
13588 break;
13589
13590 case 160: /* fitem: fname */
13591#line 3886 "parse.y"
13592 {
13593 (yyval.node) = NEW_SYM(rb_id2str((yyvsp[0].id)), &(yyloc));
13594 /*% ripper: symbol_literal!($:1) %*/
13595 }
13596#line 13597 "parse.c"
13597 break;
13598
13599 case 162: /* undef_list: fitem */
13600#line 3894 "parse.y"
13601 {
13602 (yyval.node) = NEW_UNDEF((yyvsp[0].node), &(yyloc));
13603 /*% ripper: rb_ary_new3(1, $:1) %*/
13604 }
13605#line 13606 "parse.c"
13606 break;
13607
13608 case 163: /* $@12: %empty */
13609#line 3898 "parse.y"
13610 {SET_LEX_STATE(EXPR_FNAME|EXPR_FITEM);}
13611#line 13612 "parse.c"
13612 break;
13613
13614 case 164: /* undef_list: undef_list ',' $@12 fitem */
13615#line 3899 "parse.y"
13616 {
13617 nd_set_last_loc((yyvsp[-3].node), (yylsp[0]).end_pos);
13618 rb_parser_ary_push_node(p, RNODE_UNDEF((yyvsp[-3].node))->nd_undefs, (yyvsp[0].node));
13619 /*% ripper: rb_ary_push($:1, $:4) %*/
13620 }
13621#line 13622 "parse.c"
13622 break;
13623
13624 case 165: /* op: '|' */
13625#line 3906 "parse.y"
13626 { (yyval.id) = '|'; }
13627#line 13628 "parse.c"
13628 break;
13629
13630 case 166: /* op: '^' */
13631#line 3907 "parse.y"
13632 { (yyval.id) = '^'; }
13633#line 13634 "parse.c"
13634 break;
13635
13636 case 167: /* op: '&' */
13637#line 3908 "parse.y"
13638 { (yyval.id) = '&'; }
13639#line 13640 "parse.c"
13640 break;
13641
13642 case 168: /* op: "<=>" */
13643#line 3909 "parse.y"
13644 { (yyval.id) = tCMP; }
13645#line 13646 "parse.c"
13646 break;
13647
13648 case 169: /* op: "==" */
13649#line 3910 "parse.y"
13650 { (yyval.id) = tEQ; }
13651#line 13652 "parse.c"
13652 break;
13653
13654 case 170: /* op: "===" */
13655#line 3911 "parse.y"
13656 { (yyval.id) = tEQQ; }
13657#line 13658 "parse.c"
13658 break;
13659
13660 case 171: /* op: "=~" */
13661#line 3912 "parse.y"
13662 { (yyval.id) = tMATCH; }
13663#line 13664 "parse.c"
13664 break;
13665
13666 case 172: /* op: "!~" */
13667#line 3913 "parse.y"
13668 { (yyval.id) = tNMATCH; }
13669#line 13670 "parse.c"
13670 break;
13671
13672 case 173: /* op: '>' */
13673#line 3914 "parse.y"
13674 { (yyval.id) = '>'; }
13675#line 13676 "parse.c"
13676 break;
13677
13678 case 174: /* op: ">=" */
13679#line 3915 "parse.y"
13680 { (yyval.id) = tGEQ; }
13681#line 13682 "parse.c"
13682 break;
13683
13684 case 175: /* op: '<' */
13685#line 3916 "parse.y"
13686 { (yyval.id) = '<'; }
13687#line 13688 "parse.c"
13688 break;
13689
13690 case 176: /* op: "<=" */
13691#line 3917 "parse.y"
13692 { (yyval.id) = tLEQ; }
13693#line 13694 "parse.c"
13694 break;
13695
13696 case 177: /* op: "!=" */
13697#line 3918 "parse.y"
13698 { (yyval.id) = tNEQ; }
13699#line 13700 "parse.c"
13700 break;
13701
13702 case 178: /* op: "<<" */
13703#line 3919 "parse.y"
13704 { (yyval.id) = tLSHFT; }
13705#line 13706 "parse.c"
13706 break;
13707
13708 case 179: /* op: ">>" */
13709#line 3920 "parse.y"
13710 { (yyval.id) = tRSHFT; }
13711#line 13712 "parse.c"
13712 break;
13713
13714 case 180: /* op: '+' */
13715#line 3921 "parse.y"
13716 { (yyval.id) = '+'; }
13717#line 13718 "parse.c"
13718 break;
13719
13720 case 181: /* op: '-' */
13721#line 3922 "parse.y"
13722 { (yyval.id) = '-'; }
13723#line 13724 "parse.c"
13724 break;
13725
13726 case 182: /* op: '*' */
13727#line 3923 "parse.y"
13728 { (yyval.id) = '*'; }
13729#line 13730 "parse.c"
13730 break;
13731
13732 case 183: /* op: "*" */
13733#line 3924 "parse.y"
13734 { (yyval.id) = '*'; }
13735#line 13736 "parse.c"
13736 break;
13737
13738 case 184: /* op: '/' */
13739#line 3925 "parse.y"
13740 { (yyval.id) = '/'; }
13741#line 13742 "parse.c"
13742 break;
13743
13744 case 185: /* op: '%' */
13745#line 3926 "parse.y"
13746 { (yyval.id) = '%'; }
13747#line 13748 "parse.c"
13748 break;
13749
13750 case 186: /* op: "**" */
13751#line 3927 "parse.y"
13752 { (yyval.id) = tPOW; }
13753#line 13754 "parse.c"
13754 break;
13755
13756 case 187: /* op: "**arg" */
13757#line 3928 "parse.y"
13758 { (yyval.id) = tDSTAR; }
13759#line 13760 "parse.c"
13760 break;
13761
13762 case 188: /* op: '!' */
13763#line 3929 "parse.y"
13764 { (yyval.id) = '!'; }
13765#line 13766 "parse.c"
13766 break;
13767
13768 case 189: /* op: '~' */
13769#line 3930 "parse.y"
13770 { (yyval.id) = '~'; }
13771#line 13772 "parse.c"
13772 break;
13773
13774 case 190: /* op: "unary+" */
13775#line 3931 "parse.y"
13776 { (yyval.id) = tUPLUS; }
13777#line 13778 "parse.c"
13778 break;
13779
13780 case 191: /* op: "unary-" */
13781#line 3932 "parse.y"
13782 { (yyval.id) = tUMINUS; }
13783#line 13784 "parse.c"
13784 break;
13785
13786 case 192: /* op: "[]" */
13787#line 3933 "parse.y"
13788 { (yyval.id) = tAREF; }
13789#line 13790 "parse.c"
13790 break;
13791
13792 case 193: /* op: "[]=" */
13793#line 3934 "parse.y"
13794 { (yyval.id) = tASET; }
13795#line 13796 "parse.c"
13796 break;
13797
13798 case 194: /* op: '`' */
13799#line 3935 "parse.y"
13800 { (yyval.id) = '`'; }
13801#line 13802 "parse.c"
13802 break;
13803
13804 case 236: /* asgn_arg_rhs: lhs '=' lex_ctxt arg_rhs */
13805#line 2938 "parse.y"
13806 {
13807 (yyval.node) = node_assign(p, (NODE *)(yyvsp[-3].node), (yyvsp[0].node), (yyvsp[-1].ctxt), &(yyloc));
13808 /*% ripper: assign!($:1, $:4) %*/
13809 }
13810#line 13811 "parse.c"
13811 break;
13812
13813 case 238: /* op_asgn_arg_rhs: var_lhs "operator-assignment" lex_ctxt arg_rhs */
13814#line 3073 "parse.y"
13815 {
13816 (yyval.node) = new_op_assign(p, (yyvsp[-3].node), (yyvsp[-2].id), (yyvsp[0].node), (yyvsp[-1].ctxt), &(yyloc));
13817 /*% ripper: opassign!($:var_lhs, $:tOP_ASGN, $:rhs) %*/
13818 }
13819#line 13820 "parse.c"
13820 break;
13821
13822 case 239: /* op_asgn_arg_rhs: primary_value '[' opt_call_args rbracket "operator-assignment" lex_ctxt arg_rhs */
13823#line 3078 "parse.y"
13824 {
13825 (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]));
13826 /*% ripper: opassign!(aref_field!($:primary_value, $:opt_call_args), $:tOP_ASGN, $:rhs) %*/
13827 }
13828#line 13829 "parse.c"
13829 break;
13830
13831 case 240: /* op_asgn_arg_rhs: primary_value call_op "local variable or method" "operator-assignment" lex_ctxt arg_rhs */
13832#line 3083 "parse.y"
13833 {
13834 (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]));
13835 /*% ripper: opassign!(field!($:primary_value, $:call_op, $:tIDENTIFIER), $:tOP_ASGN, $:rhs) %*/
13836 }
13837#line 13838 "parse.c"
13838 break;
13839
13840 case 241: /* op_asgn_arg_rhs: primary_value call_op "constant" "operator-assignment" lex_ctxt arg_rhs */
13841#line 3088 "parse.y"
13842 {
13843 (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]));
13844 /*% ripper: opassign!(field!($:primary_value, $:call_op, $:tCONSTANT), $:tOP_ASGN, $:rhs) %*/
13845 }
13846#line 13847 "parse.c"
13847 break;
13848
13849 case 242: /* op_asgn_arg_rhs: primary_value "::" "local variable or method" "operator-assignment" lex_ctxt arg_rhs */
13850#line 3093 "parse.y"
13851 {
13852 (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]));
13853 /*% ripper: opassign!(field!($:primary_value, $:tCOLON2, $:tIDENTIFIER), $:tOP_ASGN, $:rhs) %*/
13854 }
13855#line 13856 "parse.c"
13856 break;
13857
13858 case 243: /* op_asgn_arg_rhs: primary_value "::" "constant" "operator-assignment" lex_ctxt arg_rhs */
13859#line 3098 "parse.y"
13860 {
13861 YYLTYPE loc = code_loc_gen(&(yylsp[-5]), &(yylsp[-3]));
13862 (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));
13863 /*% ripper: opassign!(const_path_field!($:primary_value, $:tCONSTANT), $:tOP_ASGN, $:rhs) %*/
13864 }
13865#line 13866 "parse.c"
13866 break;
13867
13868 case 244: /* op_asgn_arg_rhs: ":: at EXPR_BEG" "constant" "operator-assignment" lex_ctxt arg_rhs */
13869#line 3104 "parse.y"
13870 {
13871 YYLTYPE loc = code_loc_gen(&(yylsp[-4]), &(yylsp[-3]));
13872 (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));
13873 /*% ripper: opassign!(top_const_field!($:tCONSTANT), $:tOP_ASGN, $:rhs) %*/
13874 }
13875#line 13876 "parse.c"
13876 break;
13877
13878 case 245: /* op_asgn_arg_rhs: backref "operator-assignment" lex_ctxt arg_rhs */
13879#line 3110 "parse.y"
13880 {
13881 VALUE MAYBE_UNUSED(e) = rb_backref_error(p, (yyvsp[-3].node));
13882 (yyval.node) = NEW_ERROR(&(yyloc));
13883 /*% ripper[error]: assign_error!(?e, opassign!(var_field!($:backref), $:tOP_ASGN, $:rhs)) %*/
13884 }
13885#line 13886 "parse.c"
13886 break;
13887
13888 case 247: /* range_expr_arg: arg ".." arg */
13889#line 3132 "parse.y"
13890 {
13891 value_expr(p, (yyvsp[-2].node));
13892 value_expr(p, (yyvsp[0].node));
13893 (yyval.node) = NEW_DOT2((yyvsp[-2].node), (yyvsp[0].node), &(yyloc), &(yylsp[-1]));
13894 /*% ripper: dot2!($:1, $:3) %*/
13895 }
13896#line 13897 "parse.c"
13897 break;
13898
13899 case 248: /* range_expr_arg: arg "..." arg */
13900#line 3139 "parse.y"
13901 {
13902 value_expr(p, (yyvsp[-2].node));
13903 value_expr(p, (yyvsp[0].node));
13904 (yyval.node) = NEW_DOT3((yyvsp[-2].node), (yyvsp[0].node), &(yyloc), &(yylsp[-1]));
13905 /*% ripper: dot3!($:1, $:3) %*/
13906 }
13907#line 13908 "parse.c"
13908 break;
13909
13910 case 249: /* range_expr_arg: arg ".." */
13911#line 3146 "parse.y"
13912 {
13913 value_expr(p, (yyvsp[-1].node));
13914 (yyval.node) = NEW_DOT2((yyvsp[-1].node), new_nil_at(p, &(yylsp[0]).end_pos), &(yyloc), &(yylsp[0]));
13915 /*% ripper: dot2!($:1, Qnil) %*/
13916 }
13917#line 13918 "parse.c"
13918 break;
13919
13920 case 250: /* range_expr_arg: arg "..." */
13921#line 3152 "parse.y"
13922 {
13923 value_expr(p, (yyvsp[-1].node));
13924 (yyval.node) = NEW_DOT3((yyvsp[-1].node), new_nil_at(p, &(yylsp[0]).end_pos), &(yyloc), &(yylsp[0]));
13925 /*% ripper: dot3!($:1, Qnil) %*/
13926 }
13927#line 13928 "parse.c"
13928 break;
13929
13930 case 251: /* range_expr_arg: "(.." arg */
13931#line 3158 "parse.y"
13932 {
13933 value_expr(p, (yyvsp[0].node));
13934 (yyval.node) = NEW_DOT2(new_nil_at(p, &(yylsp[-1]).beg_pos), (yyvsp[0].node), &(yyloc), &(yylsp[-1]));
13935 /*% ripper: dot2!(Qnil, $:2) %*/
13936 }
13937#line 13938 "parse.c"
13938 break;
13939
13940 case 252: /* range_expr_arg: "(..." arg */
13941#line 3164 "parse.y"
13942 {
13943 value_expr(p, (yyvsp[0].node));
13944 (yyval.node) = NEW_DOT3(new_nil_at(p, &(yylsp[-1]).beg_pos), (yyvsp[0].node), &(yyloc), &(yylsp[-1]));
13945 /*% ripper: dot3!(Qnil, $:2) %*/
13946 }
13947#line 13948 "parse.c"
13948 break;
13949
13950 case 254: /* arg: arg '+' arg */
13951#line 3956 "parse.y"
13952 {
13953 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), '+', (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
13954 /*% ripper: binary!($:1, ID2VAL('\'+\''), $:3) %*/
13955 }
13956#line 13957 "parse.c"
13957 break;
13958
13959 case 255: /* arg: arg '-' arg */
13960#line 3961 "parse.y"
13961 {
13962 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), '-', (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
13963 /*% ripper: binary!($:1, ID2VAL('\'-\''), $:3) %*/
13964 }
13965#line 13966 "parse.c"
13966 break;
13967
13968 case 256: /* arg: arg '*' arg */
13969#line 3966 "parse.y"
13970 {
13971 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), '*', (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
13972 /*% ripper: binary!($:1, ID2VAL('\'*\''), $:3) %*/
13973 }
13974#line 13975 "parse.c"
13975 break;
13976
13977 case 257: /* arg: arg '/' arg */
13978#line 3971 "parse.y"
13979 {
13980 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), '/', (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
13981 /*% ripper: binary!($:1, ID2VAL('\'/\''), $:3) %*/
13982 }
13983#line 13984 "parse.c"
13984 break;
13985
13986 case 258: /* arg: arg '%' arg */
13987#line 3976 "parse.y"
13988 {
13989 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), '%', (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
13990 /*% ripper: binary!($:1, ID2VAL('\'%\''), $:3) %*/
13991 }
13992#line 13993 "parse.c"
13993 break;
13994
13995 case 259: /* arg: arg "**" arg */
13996#line 3981 "parse.y"
13997 {
13998 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), idPow, (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
13999 /*% ripper: binary!($:1, ID2VAL(idPow), $:3) %*/
14000 }
14001#line 14002 "parse.c"
14002 break;
14003
14004 case 260: /* arg: tUMINUS_NUM simple_numeric "**" arg */
14005#line 3986 "parse.y"
14006 {
14007 (yyval.node) = call_uni_op(p, call_bin_op(p, (yyvsp[-2].node), idPow, (yyvsp[0].node), &(yylsp[-2]), &(yyloc)), idUMinus, &(yylsp[-3]), &(yyloc));
14008 /*% ripper: unary!(ID2VAL(idUMinus), binary!($:2, ID2VAL(idPow), $:4)) %*/
14009 }
14010#line 14011 "parse.c"
14011 break;
14012
14013 case 261: /* arg: "unary+" arg */
14014#line 3991 "parse.y"
14015 {
14016 (yyval.node) = call_uni_op(p, (yyvsp[0].node), idUPlus, &(yylsp[-1]), &(yyloc));
14017 /*% ripper: unary!(ID2VAL(idUPlus), $:2) %*/
14018 }
14019#line 14020 "parse.c"
14020 break;
14021
14022 case 262: /* arg: "unary-" arg */
14023#line 3996 "parse.y"
14024 {
14025 (yyval.node) = call_uni_op(p, (yyvsp[0].node), idUMinus, &(yylsp[-1]), &(yyloc));
14026 /*% ripper: unary!(ID2VAL(idUMinus), $:2) %*/
14027 }
14028#line 14029 "parse.c"
14029 break;
14030
14031 case 263: /* arg: arg '|' arg */
14032#line 4001 "parse.y"
14033 {
14034 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), '|', (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
14035 /*% ripper: binary!($:1, ID2VAL('\'|\''), $:3) %*/
14036 }
14037#line 14038 "parse.c"
14038 break;
14039
14040 case 264: /* arg: arg '^' arg */
14041#line 4006 "parse.y"
14042 {
14043 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), '^', (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
14044 /*% ripper: binary!($:1, ID2VAL('\'^\''), $:3) %*/
14045 }
14046#line 14047 "parse.c"
14047 break;
14048
14049 case 265: /* arg: arg '&' arg */
14050#line 4011 "parse.y"
14051 {
14052 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), '&', (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
14053 /*% ripper: binary!($:1, ID2VAL('\'&\''), $:3) %*/
14054 }
14055#line 14056 "parse.c"
14056 break;
14057
14058 case 266: /* arg: arg "<=>" arg */
14059#line 4016 "parse.y"
14060 {
14061 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), idCmp, (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
14062 /*% ripper: binary!($:1, ID2VAL(idCmp), $:3) %*/
14063 }
14064#line 14065 "parse.c"
14065 break;
14066
14067 case 268: /* arg: arg "==" arg */
14068#line 4022 "parse.y"
14069 {
14070 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), idEq, (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
14071 /*% ripper: binary!($:1, ID2VAL(idEq), $:3) %*/
14072 }
14073#line 14074 "parse.c"
14074 break;
14075
14076 case 269: /* arg: arg "===" arg */
14077#line 4027 "parse.y"
14078 {
14079 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), idEqq, (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
14080 /*% ripper: binary!($:1, ID2VAL(idEqq), $:3) %*/
14081 }
14082#line 14083 "parse.c"
14083 break;
14084
14085 case 270: /* arg: arg "!=" arg */
14086#line 4032 "parse.y"
14087 {
14088 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), idNeq, (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
14089 /*% ripper: binary!($:1, ID2VAL(idNeq), $:3) %*/
14090 }
14091#line 14092 "parse.c"
14092 break;
14093
14094 case 271: /* arg: arg "=~" arg */
14095#line 4037 "parse.y"
14096 {
14097 (yyval.node) = match_op(p, (yyvsp[-2].node), (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
14098 /*% ripper: binary!($:1, ID2VAL(idEqTilde), $:3) %*/
14099 }
14100#line 14101 "parse.c"
14101 break;
14102
14103 case 272: /* arg: arg "!~" arg */
14104#line 4042 "parse.y"
14105 {
14106 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), idNeqTilde, (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
14107 /*% ripper: binary!($:1, ID2VAL(idNeqTilde), $:3) %*/
14108 }
14109#line 14110 "parse.c"
14110 break;
14111
14112 case 273: /* arg: '!' arg */
14113#line 4047 "parse.y"
14114 {
14115 (yyval.node) = call_uni_op(p, method_cond(p, (yyvsp[0].node), &(yylsp[0])), '!', &(yylsp[-1]), &(yyloc));
14116 /*% ripper: unary!(ID2VAL('\'!\''), $:2) %*/
14117 }
14118#line 14119 "parse.c"
14119 break;
14120
14121 case 274: /* arg: '~' arg */
14122#line 4052 "parse.y"
14123 {
14124 (yyval.node) = call_uni_op(p, (yyvsp[0].node), '~', &(yylsp[-1]), &(yyloc));
14125 /*% ripper: unary!(ID2VAL('\'~\''), $:2) %*/
14126 }
14127#line 14128 "parse.c"
14128 break;
14129
14130 case 275: /* arg: arg "<<" arg */
14131#line 4057 "parse.y"
14132 {
14133 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), idLTLT, (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
14134 /*% ripper: binary!($:1, ID2VAL(idLTLT), $:3) %*/
14135 }
14136#line 14137 "parse.c"
14137 break;
14138
14139 case 276: /* arg: arg ">>" arg */
14140#line 4062 "parse.y"
14141 {
14142 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), idGTGT, (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
14143 /*% ripper: binary!($:1, ID2VAL(idGTGT), $:3) %*/
14144 }
14145#line 14146 "parse.c"
14146 break;
14147
14148 case 277: /* arg: arg "&&" arg */
14149#line 4067 "parse.y"
14150 {
14151 (yyval.node) = logop(p, idANDOP, (yyvsp[-2].node), (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
14152 /*% ripper: binary!($:1, ID2VAL(idANDOP), $:3) %*/
14153 }
14154#line 14155 "parse.c"
14155 break;
14156
14157 case 278: /* arg: arg "||" arg */
14158#line 4072 "parse.y"
14159 {
14160 (yyval.node) = logop(p, idOROP, (yyvsp[-2].node), (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
14161 /*% ripper: binary!($:1, ID2VAL(idOROP), $:3) %*/
14162 }
14163#line 14164 "parse.c"
14164 break;
14165
14166 case 279: /* arg: "'defined?'" option_'\n' begin_defined arg */
14167#line 4077 "parse.y"
14168 {
14169 p->ctxt.in_defined = (yyvsp[-1].ctxt).in_defined;
14170 (yyval.node) = new_defined(p, (yyvsp[0].node), &(yyloc), &(yylsp[-3]));
14171 p->ctxt.has_trailing_semicolon = (yyvsp[-1].ctxt).has_trailing_semicolon;
14172 /*% ripper: defined!($:4) %*/
14173 }
14174#line 14175 "parse.c"
14175 break;
14176
14177 case 280: /* def_endless_method_endless_arg: defn_head f_opt_paren_args '=' endless_arg */
14178#line 2978 "parse.y"
14179 {
14180 endless_method_name(p, (yyvsp[-3].node_def_temp)->nd_mid, &(yylsp[-3]));
14181 restore_defun(p, (yyvsp[-3].node_def_temp));
14182 ((yyval.node) = (yyvsp[-3].node_def_temp)->nd_def)->nd_loc = (yyloc);
14183 (yyvsp[0].node) = new_scope_body(p, (yyvsp[-2].node_args), (yyvsp[0].node), (yyval.node), &(yyloc));
14184 RNODE_DEFN((yyval.node))->nd_defn = (yyvsp[0].node);
14185 /*% ripper: bodystmt!($:bodystmt, Qnil, Qnil, Qnil) %*/
14186 /*% ripper: def!($:head, $:args, $:$) %*/
14187 local_pop(p);
14188 }
14189#line 14190 "parse.c"
14190 break;
14191
14192 case 281: /* def_endless_method_endless_arg: defs_head f_opt_paren_args '=' endless_arg */
14193#line 2989 "parse.y"
14194 {
14195 endless_method_name(p, (yyvsp[-3].node_def_temp)->nd_mid, &(yylsp[-3]));
14196 restore_defun(p, (yyvsp[-3].node_def_temp));
14197 ((yyval.node) = (yyvsp[-3].node_def_temp)->nd_def)->nd_loc = (yyloc);
14198 (yyvsp[0].node) = new_scope_body(p, (yyvsp[-2].node_args), (yyvsp[0].node), (yyval.node), &(yyloc));
14199 RNODE_DEFS((yyval.node))->nd_defn = (yyvsp[0].node);
14200 /*% ripper: bodystmt!($:bodystmt, Qnil, Qnil, Qnil) %*/
14201 /*% ripper: defs!(*$:head[0..2], $:args, $:$) %*/
14202 local_pop(p);
14203 }
14204#line 14205 "parse.c"
14205 break;
14206
14207 case 285: /* ternary: arg '?' arg option_'\n' ':' arg */
14208#line 4089 "parse.y"
14209 {
14210 value_expr(p, (yyvsp[-5].node));
14211 (yyval.node) = new_if(p, (yyvsp[-5].node), (yyvsp[-3].node), (yyvsp[0].node), &(yyloc), &NULL_LOC, &(yylsp[-1]), &NULL_LOC);
14212 fixpos((yyval.node), (yyvsp[-5].node));
14213 /*% ripper: ifop!($:1, $:3, $:6) %*/
14214 }
14215#line 14216 "parse.c"
14216 break;
14217
14218 case 287: /* endless_arg: endless_arg "'rescue' modifier" after_rescue arg */
14219#line 4099 "parse.y"
14220 {
14221 p->ctxt.in_rescue = (yyvsp[-1].ctxt).in_rescue;
14222 (yyval.node) = rescued_expr(p, (yyvsp[-3].node), (yyvsp[0].node), &(yylsp[-3]), &(yylsp[-2]), &(yylsp[0]));
14223 /*% ripper: rescue_mod!($:1, $:4) %*/
14224 }
14225#line 14226 "parse.c"
14226 break;
14227
14228 case 288: /* endless_arg: "'not'" option_'\n' endless_arg */
14229#line 4105 "parse.y"
14230 {
14231 (yyval.node) = call_uni_op(p, method_cond(p, (yyvsp[0].node), &(yylsp[0])), METHOD_NOT, &(yylsp[-2]), &(yyloc));
14232 /*% ripper: unary!(ID2VAL(idNOT), $:3) %*/
14233 }
14234#line 14235 "parse.c"
14235 break;
14236
14237 case 289: /* relop: '>' */
14238#line 4111 "parse.y"
14239 {(yyval.id) = '>';}
14240#line 14241 "parse.c"
14241 break;
14242
14243 case 290: /* relop: '<' */
14244#line 4112 "parse.y"
14245 {(yyval.id) = '<';}
14246#line 14247 "parse.c"
14247 break;
14248
14249 case 291: /* relop: ">=" */
14250#line 4113 "parse.y"
14251 {(yyval.id) = idGE;}
14252#line 14253 "parse.c"
14253 break;
14254
14255 case 292: /* relop: "<=" */
14256#line 4114 "parse.y"
14257 {(yyval.id) = idLE;}
14258#line 14259 "parse.c"
14259 break;
14260
14261 case 293: /* rel_expr: arg relop arg */
14262#line 4118 "parse.y"
14263 {
14264 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), (yyvsp[-1].id), (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
14265 /*% ripper: binary!($:1, ID2VAL($2), $:3) %*/
14266 }
14267#line 14268 "parse.c"
14268 break;
14269
14270 case 294: /* rel_expr: rel_expr relop arg */
14271#line 4123 "parse.y"
14272 {
14273 rb_warning1("comparison '%s' after comparison", WARN_ID((yyvsp[-1].id)));
14274 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), (yyvsp[-1].id), (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
14275 /*% ripper: binary!($:1, ID2VAL($2), $:3) %*/
14276 }
14277#line 14278 "parse.c"
14278 break;
14279
14280 case 295: /* lex_ctxt: none */
14281#line 4131 "parse.y"
14282 {
14283 (yyval.ctxt) = p->ctxt;
14284 }
14285#line 14286 "parse.c"
14286 break;
14287
14288 case 296: /* begin_defined: lex_ctxt */
14289#line 4137 "parse.y"
14290 {
14291 p->ctxt.in_defined = 1;
14292 (yyval.ctxt) = (yyvsp[0].ctxt);
14293 }
14294#line 14295 "parse.c"
14295 break;
14296
14297 case 297: /* after_rescue: lex_ctxt */
14298#line 4144 "parse.y"
14299 {
14300 p->ctxt.in_rescue = after_rescue;
14301 (yyval.ctxt) = (yyvsp[0].ctxt);
14302 }
14303#line 14304 "parse.c"
14304 break;
14305
14306 case 298: /* value_expr_arg: arg */
14307#line 3173 "parse.y"
14308 {
14309 value_expr(p, (yyvsp[0].node));
14310 (yyval.node) = (yyvsp[0].node);
14311 }
14312#line 14313 "parse.c"
14313 break;
14314
14315 case 302: /* aref_args: args ',' assocs trailer */
14316#line 4156 "parse.y"
14317 {
14318 (yyval.node) = (yyvsp[-1].node) ? arg_append(p, (yyvsp[-3].node), new_hash(p, (yyvsp[-1].node), &(yylsp[-1])), &(yyloc)) : (yyvsp[-3].node);
14319 /*% ripper: args_add!($:1, bare_assoc_hash!($:3)) %*/
14320 }
14321#line 14322 "parse.c"
14322 break;
14323
14324 case 303: /* aref_args: assocs trailer */
14325#line 4161 "parse.y"
14326 {
14327 (yyval.node) = (yyvsp[-1].node) ? NEW_LIST(new_hash(p, (yyvsp[-1].node), &(yylsp[-1])), &(yyloc)) : 0;
14328 /*% ripper: args_add!(args_new!, bare_assoc_hash!($:1)) %*/
14329 }
14330#line 14331 "parse.c"
14331 break;
14332
14333 case 304: /* arg_rhs: arg */
14334#line 4168 "parse.y"
14335 {
14336 value_expr(p, (yyvsp[0].node));
14337 (yyval.node) = (yyvsp[0].node);
14338 }
14339#line 14340 "parse.c"
14340 break;
14341
14342 case 305: /* arg_rhs: arg "'rescue' modifier" after_rescue arg */
14343#line 4173 "parse.y"
14344 {
14345 p->ctxt.in_rescue = (yyvsp[-1].ctxt).in_rescue;
14346 value_expr(p, (yyvsp[-3].node));
14347 (yyval.node) = rescued_expr(p, (yyvsp[-3].node), (yyvsp[0].node), &(yylsp[-3]), &(yylsp[-2]), &(yylsp[0]));
14348 /*% ripper: rescue_mod!($:1, $:4) %*/
14349 }
14350#line 14351 "parse.c"
14351 break;
14352
14353 case 306: /* paren_args: '(' opt_call_args rparen */
14354#line 4182 "parse.y"
14355 {
14356 (yyval.node) = (yyvsp[-1].node);
14357 /*% ripper: arg_paren!($:2) %*/
14358 }
14359#line 14360 "parse.c"
14360 break;
14361
14362 case 307: /* paren_args: '(' args ',' args_forward rparen */
14363#line 4187 "parse.y"
14364 {
14365 if (!check_forwarding_args(p)) {
14366 (yyval.node) = 0;
14367 }
14368 else {
14369 (yyval.node) = new_args_forward_call(p, (yyvsp[-3].node), &(yylsp[-1]), &(yyloc));
14370 /*% ripper: arg_paren!(args_add!($:2, $:4)) %*/
14371 }
14372 }
14373#line 14374 "parse.c"
14374 break;
14375
14376 case 308: /* paren_args: '(' args_forward rparen */
14377#line 4197 "parse.y"
14378 {
14379 if (!check_forwarding_args(p)) {
14380 (yyval.node) = 0;
14381 }
14382 else {
14383 (yyval.node) = new_args_forward_call(p, 0, &(yylsp[-1]), &(yyloc));
14384 /*% ripper: arg_paren!($:2) %*/
14385 }
14386 }
14387#line 14388 "parse.c"
14388 break;
14389
14390 case 310: /* opt_paren_args: paren_args */
14391#line 4210 "parse.y"
14392 {
14393 (yyval.node) = (yyvsp[0].node) ? (yyvsp[0].node) : NODE_SPECIAL_EMPTY_ARGS;
14394 }
14395#line 14396 "parse.c"
14396 break;
14397
14398 case 314: /* opt_call_args: args ',' assocs ',' */
14399#line 4219 "parse.y"
14400 {
14401 (yyval.node) = (yyvsp[-1].node) ? arg_append(p, (yyvsp[-3].node), new_hash(p, (yyvsp[-1].node), &(yylsp[-1])), &(yyloc)) : (yyvsp[-3].node);
14402 /*% ripper: args_add!($:1, bare_assoc_hash!($:3)) %*/
14403 }
14404#line 14405 "parse.c"
14405 break;
14406
14407 case 315: /* opt_call_args: assocs ',' */
14408#line 4224 "parse.y"
14409 {
14410 (yyval.node) = (yyvsp[-1].node) ? NEW_LIST(new_hash(p, (yyvsp[-1].node), &(yylsp[-1])), &(yylsp[-1])) : 0;
14411 /*% ripper: args_add!(args_new!, bare_assoc_hash!($:1)) %*/
14412 }
14413#line 14414 "parse.c"
14414 break;
14415
14416 case 316: /* value_expr_command: command */
14417#line 3173 "parse.y"
14418 {
14419 value_expr(p, (yyvsp[0].node));
14420 (yyval.node) = (yyvsp[0].node);
14421 }
14422#line 14423 "parse.c"
14423 break;
14424
14425 case 317: /* call_args: value_expr_command */
14426#line 4231 "parse.y"
14427 {
14428 (yyval.node) = NEW_LIST((yyvsp[0].node), &(yyloc));
14429 /*% ripper: args_add!(args_new!, $:1) %*/
14430 }
14431#line 14432 "parse.c"
14432 break;
14433
14434 case 318: /* call_args: def_endless_method_endless_command */
14435#line 4236 "parse.y"
14436 {
14437 (yyval.node) = NEW_LIST((yyvsp[0].node), &(yyloc));
14438 /*% ripper: args_add!(args_new!, $:1) %*/
14439 }
14440#line 14441 "parse.c"
14441 break;
14442
14443 case 319: /* call_args: args opt_block_arg */
14444#line 4241 "parse.y"
14445 {
14446 (yyval.node) = arg_blk_pass((yyvsp[-1].node), (yyvsp[0].node_block_pass));
14447 /*% ripper: args_add_block!($:1, $:2) %*/
14448 }
14449#line 14450 "parse.c"
14450 break;
14451
14452 case 320: /* call_args: assocs opt_block_arg */
14453#line 4246 "parse.y"
14454 {
14455 (yyval.node) = (yyvsp[-1].node) ? NEW_LIST(new_hash(p, (yyvsp[-1].node), &(yylsp[-1])), &(yylsp[-1])) : 0;
14456 (yyval.node) = arg_blk_pass((yyval.node), (yyvsp[0].node_block_pass));
14457 /*% ripper: args_add_block!(args_add!(args_new!, bare_assoc_hash!($:1)), $:2) %*/
14458 }
14459#line 14460 "parse.c"
14460 break;
14461
14462 case 321: /* call_args: args ',' assocs opt_block_arg */
14463#line 4252 "parse.y"
14464 {
14465 (yyval.node) = (yyvsp[-1].node) ? arg_append(p, (yyvsp[-3].node), new_hash(p, (yyvsp[-1].node), &(yylsp[-1])), &(yyloc)) : (yyvsp[-3].node);
14466 (yyval.node) = arg_blk_pass((yyval.node), (yyvsp[0].node_block_pass));
14467 /*% ripper: args_add_block!(args_add!($:1, bare_assoc_hash!($:3)), $:4) %*/
14468 }
14469#line 14470 "parse.c"
14470 break;
14471
14472 case 323: /* $@13: %empty */
14473#line 4261 "parse.y"
14474 {
14475 /* If call_args starts with a open paren '(' or '[',
14476 * look-ahead reading of the letters calls CMDARG_PUSH(0),
14477 * but the push must be done after CMDARG_PUSH(1).
14478 * So this code makes them consistent by first cancelling
14479 * the premature CMDARG_PUSH(0), doing CMDARG_PUSH(1),
14480 * and finally redoing CMDARG_PUSH(0).
14481 */
14482 int lookahead = 0;
14483 switch (yychar) {
14484 case '(': case tLPAREN: case tLPAREN_ARG: case '[': case tLBRACK:
14485 lookahead = 1;
14486 }
14487 if (lookahead) CMDARG_POP();
14488 CMDARG_PUSH(1);
14489 if (lookahead) CMDARG_PUSH(0);
14490 }
14491#line 14492 "parse.c"
14492 break;
14493
14494 case 324: /* command_args: $@13 call_args */
14495#line 4279 "parse.y"
14496 {
14497 /* call_args can be followed by tLBRACE_ARG (that does CMDARG_PUSH(0) in the lexer)
14498 * but the push must be done after CMDARG_POP() in the parser.
14499 * So this code does CMDARG_POP() to pop 0 pushed by tLBRACE_ARG,
14500 * CMDARG_POP() to pop 1 pushed by command_args,
14501 * and CMDARG_PUSH(0) to restore back the flag set by tLBRACE_ARG.
14502 */
14503 int lookahead = 0;
14504 switch (yychar) {
14505 case tLBRACE_ARG:
14506 lookahead = 1;
14507 }
14508 if (lookahead) CMDARG_POP();
14509 CMDARG_POP();
14510 if (lookahead) CMDARG_PUSH(0);
14511 (yyval.node) = (yyvsp[0].node);
14512 /*% ripper: $:2 %*/
14513 }
14514#line 14515 "parse.c"
14515 break;
14516
14517 case 325: /* block_arg: "&" arg_value */
14518#line 4300 "parse.y"
14519 {
14520 (yyval.node_block_pass) = NEW_BLOCK_PASS((yyvsp[0].node), &(yyloc), &(yylsp[-1]));
14521 /*% ripper: $:2 %*/
14522 }
14523#line 14524 "parse.c"
14524 break;
14525
14526 case 326: /* block_arg: "&" */
14527#line 4305 "parse.y"
14528 {
14529 forwarding_arg_check(p, idFWD_BLOCK, idFWD_ALL, "block");
14530 (yyval.node_block_pass) = NEW_BLOCK_PASS(NEW_LVAR(idFWD_BLOCK, &(yylsp[0])), &(yyloc), &(yylsp[0]));
14531 /*% ripper: Qnil %*/
14532 }
14533#line 14534 "parse.c"
14534 break;
14535
14536 case 327: /* opt_block_arg: ',' block_arg */
14537#line 4313 "parse.y"
14538 {
14539 (yyval.node_block_pass) = (yyvsp[0].node_block_pass);
14540 /*% ripper: $:2 %*/
14541 }
14542#line 14543 "parse.c"
14543 break;
14544
14545 case 328: /* opt_block_arg: none */
14546#line 4318 "parse.y"
14547 {
14548 (yyval.node_block_pass) = 0;
14549 /*% ripper: Qfalse %*/
14550 }
14551#line 14552 "parse.c"
14552 break;
14553
14554 case 329: /* args: arg_value */
14555#line 4326 "parse.y"
14556 {
14557 (yyval.node) = NEW_LIST((yyvsp[0].node), &(yyloc));
14558 /*% ripper: args_add!(args_new!, $:arg_value) %*/
14559 }
14560#line 14561 "parse.c"
14561 break;
14562
14563 case 330: /* args: arg_splat */
14564#line 4331 "parse.y"
14565 {
14566 (yyval.node) = (yyvsp[0].node);
14567 /*% ripper: args_add_star!(args_new!, $:arg_splat) %*/
14568 }
14569#line 14570 "parse.c"
14570 break;
14571
14572 case 331: /* args: args ',' arg_value */
14573#line 4336 "parse.y"
14574 {
14575 (yyval.node) = last_arg_append(p, (yyvsp[-2].node), (yyvsp[0].node), &(yyloc));
14576 /*% ripper: args_add!($:non_last_args, $:arg_value) %*/
14577 }
14578#line 14579 "parse.c"
14579 break;
14580
14581 case 332: /* args: args ',' arg_splat */
14582#line 4341 "parse.y"
14583 {
14584 (yyval.node) = rest_arg_append(p, (yyvsp[-2].node), RNODE_SPLAT((yyvsp[0].node))->nd_head, &(yyloc));
14585 /*% ripper: args_add_star!($:non_last_args, $:arg_splat) %*/
14586 }
14587#line 14588 "parse.c"
14588 break;
14589
14590 case 333: /* arg_splat: "*" arg_value */
14591#line 4349 "parse.y"
14592 {
14593 (yyval.node) = NEW_SPLAT((yyvsp[0].node), &(yyloc), &(yylsp[-1]));
14594 /*% ripper: $:arg_value %*/
14595 }
14596#line 14597 "parse.c"
14597 break;
14598
14599 case 334: /* arg_splat: "*" */
14600#line 4354 "parse.y"
14601 {
14602 forwarding_arg_check(p, idFWD_REST, idFWD_ALL, "rest");
14603 (yyval.node) = NEW_SPLAT(NEW_LVAR(idFWD_REST, &(yylsp[0])), &(yyloc), &(yylsp[0]));
14604 /*% ripper: Qnil %*/
14605 }
14606#line 14607 "parse.c"
14607 break;
14608
14609 case 337: /* mrhs: args ',' arg_value */
14610#line 4368 "parse.y"
14611 {
14612 (yyval.node) = last_arg_append(p, (yyvsp[-2].node), (yyvsp[0].node), &(yyloc));
14613 /*% ripper: mrhs_add!(mrhs_new_from_args!($:args), $:arg_value) %*/
14614 }
14615#line 14616 "parse.c"
14616 break;
14617
14618 case 338: /* mrhs: args ',' "*" arg_value */
14619#line 4373 "parse.y"
14620 {
14621 (yyval.node) = rest_arg_append(p, (yyvsp[-3].node), (yyvsp[0].node), &(yyloc));
14622 /*% ripper: mrhs_add_star!(mrhs_new_from_args!($:args), $:arg_value) %*/
14623 }
14624#line 14625 "parse.c"
14625 break;
14626
14627 case 339: /* mrhs: "*" arg_value */
14628#line 4378 "parse.y"
14629 {
14630 (yyval.node) = NEW_SPLAT((yyvsp[0].node), &(yyloc), &(yylsp[-1]));
14631 /*% ripper: mrhs_add_star!(mrhs_new!, $:arg_value) %*/
14632 }
14633#line 14634 "parse.c"
14634 break;
14635
14636 case 350: /* primary: "method" */
14637#line 4399 "parse.y"
14638 {
14639 (yyval.node) = (NODE *)NEW_FCALL((yyvsp[0].id), 0, &(yyloc));
14640 /*% ripper: method_add_arg!(fcall!($:fid), args_new!) %*/
14641 }
14642#line 14643 "parse.c"
14643 break;
14644
14645 case 351: /* $@14: %empty */
14646#line 4404 "parse.y"
14647 {
14648 CMDARG_PUSH(0);
14649 }
14650#line 14651 "parse.c"
14651 break;
14652
14653 case 352: /* primary: k_begin $@14 bodystmt k_end */
14654#line 4409 "parse.y"
14655 {
14656 CMDARG_POP();
14657 set_line_body((yyvsp[-1].node), (yylsp[-3]).end_pos.lineno);
14658 (yyval.node) = NEW_BEGIN((yyvsp[-1].node), &(yyloc));
14659 nd_set_line((yyval.node), (yylsp[-3]).end_pos.lineno);
14660 /*% ripper: begin!($:body) %*/
14661 }
14662#line 14663 "parse.c"
14663 break;
14664
14665 case 353: /* $@15: %empty */
14666#line 4416 "parse.y"
14667 {SET_LEX_STATE(EXPR_ENDARG);}
14668#line 14669 "parse.c"
14669 break;
14670
14671 case 354: /* primary: "( arg" compstmt_stmts $@15 ')' */
14672#line 4417 "parse.y"
14673 {
14674 if (nd_type_p((yyvsp[-2].node), NODE_SELF)) RNODE_SELF((yyvsp[-2].node))->nd_state = 0;
14675 (yyval.node) = (yyvsp[-2].node);
14676 /*% ripper: paren!($:body) %*/
14677 }
14678#line 14679 "parse.c"
14679 break;
14680
14681 case 355: /* primary: "(" compstmt_stmts ')' */
14682#line 4423 "parse.y"
14683 {
14684 if (nd_type_p((yyvsp[-1].node), NODE_SELF)) RNODE_SELF((yyvsp[-1].node))->nd_state = 0;
14685 (yyval.node) = NEW_BLOCK((yyvsp[-1].node), &(yyloc));
14686 /*% ripper: paren!($:body) %*/
14687 }
14688#line 14689 "parse.c"
14689 break;
14690
14691 case 356: /* primary: primary_value "::" "constant" */
14692#line 4429 "parse.y"
14693 {
14694 (yyval.node) = NEW_COLON2((yyvsp[-2].node), (yyvsp[0].id), &(yyloc), &(yylsp[-1]), &(yylsp[0]));
14695 /*% ripper: const_path_ref!($:recv, $:name) %*/
14696 }
14697#line 14698 "parse.c"
14698 break;
14699
14700 case 357: /* primary: ":: at EXPR_BEG" "constant" */
14701#line 4434 "parse.y"
14702 {
14703 (yyval.node) = NEW_COLON3((yyvsp[0].id), &(yyloc), &(yylsp[-1]), &(yylsp[0]));
14704 /*% ripper: top_const_ref!($:name) %*/
14705 }
14706#line 14707 "parse.c"
14707 break;
14708
14709 case 358: /* primary: "[" aref_args ']' */
14710#line 4439 "parse.y"
14711 {
14712 (yyval.node) = make_list((yyvsp[-1].node), &(yyloc));
14713 /*% ripper: array!($:args) %*/
14714 }
14715#line 14716 "parse.c"
14716 break;
14717
14718 case 359: /* primary: "{" assoc_list '}' */
14719#line 4444 "parse.y"
14720 {
14721 (yyval.node) = new_hash(p, (yyvsp[-1].node), &(yyloc));
14722 RNODE_HASH((yyval.node))->nd_brace = TRUE;
14723 /*% ripper: hash!($:list) %*/
14724 }
14725#line 14726 "parse.c"
14726 break;
14727
14728 case 360: /* primary: k_return */
14729#line 4450 "parse.y"
14730 {
14731 (yyval.node) = NEW_RETURN(0, &(yyloc), &(yylsp[0]));
14732 /*% ripper: return0! %*/
14733 }
14734#line 14735 "parse.c"
14735 break;
14736
14737 case 361: /* primary: k_yield '(' call_args rparen */
14738#line 4455 "parse.y"
14739 {
14740 (yyval.node) = NEW_YIELD((yyvsp[-1].node), &(yyloc), &(yylsp[-3]), &(yylsp[-2]), &(yylsp[0]));
14741 /*% ripper: yield!(paren!($:args)) %*/
14742 }
14743#line 14744 "parse.c"
14744 break;
14745
14746 case 362: /* primary: k_yield '(' rparen */
14747#line 4460 "parse.y"
14748 {
14749 (yyval.node) = NEW_YIELD(0, &(yyloc), &(yylsp[-2]), &(yylsp[-1]), &(yylsp[0]));
14750 /*% ripper: yield!(paren!(args_new!)) %*/
14751 }
14752#line 14753 "parse.c"
14753 break;
14754
14755 case 363: /* primary: k_yield */
14756#line 4465 "parse.y"
14757 {
14758 (yyval.node) = NEW_YIELD(0, &(yyloc), &(yylsp[0]), &NULL_LOC, &NULL_LOC);
14759 /*% ripper: yield0! %*/
14760 }
14761#line 14762 "parse.c"
14762 break;
14763
14764 case 364: /* primary: "'defined?'" option_'\n' '(' begin_defined expr rparen */
14765#line 4470 "parse.y"
14766 {
14767 p->ctxt.in_defined = (yyvsp[-2].ctxt).in_defined;
14768 (yyval.node) = new_defined(p, (yyvsp[-1].node), &(yyloc), &(yylsp[-5]));
14769 p->ctxt.has_trailing_semicolon = (yyvsp[-2].ctxt).has_trailing_semicolon;
14770 /*% ripper: defined!($:arg) %*/
14771 }
14772#line 14773 "parse.c"
14773 break;
14774
14775 case 365: /* primary: "'not'" '(' expr rparen */
14776#line 4477 "parse.y"
14777 {
14778 (yyval.node) = call_uni_op(p, method_cond(p, (yyvsp[-1].node), &(yylsp[-1])), METHOD_NOT, &(yylsp[-3]), &(yyloc));
14779 /*% ripper: unary!(ID2VAL(idNOT), $:arg) %*/
14780 }
14781#line 14782 "parse.c"
14782 break;
14783
14784 case 366: /* primary: "'not'" '(' rparen */
14785#line 4482 "parse.y"
14786 {
14787 (yyval.node) = call_uni_op(p, method_cond(p, NEW_NIL(&(yylsp[-1])), &(yylsp[-1])), METHOD_NOT, &(yylsp[-2]), &(yyloc));
14788 /*% ripper: unary!(ID2VAL(idNOT), Qnil) %*/
14789 }
14790#line 14791 "parse.c"
14791 break;
14792
14793 case 367: /* primary: fcall brace_block */
14794#line 4487 "parse.y"
14795 {
14796 (yyval.node) = method_add_block(p, (NODE *)(yyvsp[-1].node_fcall), (yyvsp[0].node), &(yyloc));
14797 /*% ripper: method_add_block!(method_add_arg!(fcall!($:call), args_new!), $:block) %*/
14798 }
14799#line 14800 "parse.c"
14800 break;
14801
14802 case 369: /* primary: method_call brace_block */
14803#line 4493 "parse.y"
14804 {
14805 block_dup_check(p, get_nd_args(p, (yyvsp[-1].node)), (yyvsp[0].node));
14806 (yyval.node) = method_add_block(p, (yyvsp[-1].node), (yyvsp[0].node), &(yyloc));
14807 /*% ripper: method_add_block!($:call, $:block) %*/
14808 }
14809#line 14810 "parse.c"
14810 break;
14811
14812 case 371: /* primary: k_if expr_value then compstmt_stmts if_tail k_end */
14813#line 4503 "parse.y"
14814 {
14815 if ((yyvsp[-1].node) && nd_type_p((yyvsp[-1].node), NODE_IF))
14816 RNODE_IF((yyvsp[-1].node))->end_keyword_loc = (yylsp[0]);
14817
14818 (yyval.node) = new_if(p, (yyvsp[-4].node), (yyvsp[-2].node), (yyvsp[-1].node), &(yyloc), &(yylsp[-5]), &(yylsp[-3]), &(yylsp[0]));
14819 fixpos((yyval.node), (yyvsp[-4].node));
14820 /*% ripper: if!($:cond, $:body, $:tail) %*/
14821 }
14822#line 14823 "parse.c"
14823 break;
14824
14825 case 372: /* primary: k_unless expr_value then compstmt_stmts opt_else k_end */
14826#line 4515 "parse.y"
14827 {
14828 (yyval.node) = new_unless(p, (yyvsp[-4].node), (yyvsp[-2].node), (yyvsp[-1].node), &(yyloc), &(yylsp[-5]), &(yylsp[-3]), &(yylsp[0]));
14829 fixpos((yyval.node), (yyvsp[-4].node));
14830 /*% ripper: unless!($:cond, $:body, $:tail) %*/
14831 }
14832#line 14833 "parse.c"
14833 break;
14834
14835 case 373: /* primary: k_while expr_value_do compstmt_stmts k_end */
14836#line 4523 "parse.y"
14837 {
14838 restore_block_exit(p, (yyvsp[-3].node_exits));
14839 (yyval.node) = NEW_WHILE(cond(p, (yyvsp[-2].node), &(yylsp[-2])), (yyvsp[-1].node), 1, &(yyloc), &(yylsp[-3]), &(yylsp[0]));
14840 fixpos((yyval.node), (yyvsp[-2].node));
14841 /*% ripper: while!($:cond, $:body) %*/
14842 }
14843#line 14844 "parse.c"
14844 break;
14845
14846 case 374: /* primary: k_until expr_value_do compstmt_stmts k_end */
14847#line 4532 "parse.y"
14848 {
14849 restore_block_exit(p, (yyvsp[-3].node_exits));
14850 (yyval.node) = NEW_UNTIL(cond(p, (yyvsp[-2].node), &(yylsp[-2])), (yyvsp[-1].node), 1, &(yyloc), &(yylsp[-3]), &(yylsp[0]));
14851 fixpos((yyval.node), (yyvsp[-2].node));
14852 /*% ripper: until!($:cond, $:body) %*/
14853 }
14854#line 14855 "parse.c"
14855 break;
14856
14857 case 375: /* @16: %empty */
14858#line 4539 "parse.y"
14859 {
14860 (yyval.labels) = p->case_labels;
14861 p->case_labels = CHECK_LITERAL_WHEN;
14862 }
14863#line 14864 "parse.c"
14864 break;
14865
14866 case 376: /* primary: k_case expr_value option_terms @16 case_body k_end */
14867#line 4545 "parse.y"
14868 {
14869 if (CASE_LABELS_ENABLED_P(p->case_labels)) st_free_table(p->case_labels);
14870 p->case_labels = (yyvsp[-2].labels);
14871 (yyval.node) = NEW_CASE((yyvsp[-4].node), (yyvsp[-1].node), &(yyloc), &(yylsp[-5]), &(yylsp[0]));
14872 fixpos((yyval.node), (yyvsp[-4].node));
14873 /*% ripper: case!($:expr, $:body) %*/
14874 }
14875#line 14876 "parse.c"
14876 break;
14877
14878 case 377: /* @17: %empty */
14879#line 4553 "parse.y"
14880 {
14881 (yyval.labels) = p->case_labels;
14882 p->case_labels = 0;
14883 }
14884#line 14885 "parse.c"
14885 break;
14886
14887 case 378: /* primary: k_case option_terms @17 case_body k_end */
14888#line 4559 "parse.y"
14889 {
14890 if (p->case_labels) st_free_table(p->case_labels);
14891 p->case_labels = (yyvsp[-2].labels);
14892 (yyval.node) = NEW_CASE2((yyvsp[-1].node), &(yyloc), &(yylsp[-4]), &(yylsp[0]));
14893 /*% ripper: case!(Qnil, $:body) %*/
14894 }
14895#line 14896 "parse.c"
14896 break;
14897
14898 case 379: /* primary: k_case expr_value option_terms p_case_body k_end */
14899#line 4568 "parse.y"
14900 {
14901 (yyval.node) = NEW_CASE3((yyvsp[-3].node), (yyvsp[-1].node), &(yyloc), &(yylsp[-4]), &(yylsp[0]));
14902 /*% ripper: case!($:expr, $:body) %*/
14903 }
14904#line 14905 "parse.c"
14905 break;
14906
14907 case 380: /* $@18: %empty */
14908#line 4573 "parse.y"
14909 {COND_PUSH(1);}
14910#line 14911 "parse.c"
14911 break;
14912
14913 case 381: /* $@19: %empty */
14914#line 4573 "parse.y"
14915 {COND_POP();}
14916#line 14917 "parse.c"
14917 break;
14918
14919 case 382: /* primary: k_for for_var "'in'" $@18 expr_value do $@19 compstmt_stmts k_end */
14920#line 4576 "parse.y"
14921 {
14922 restore_block_exit(p, (yyvsp[-8].node_exits));
14923 /*
14924 * for a, b, c in e
14925 * #=>
14926 * e.each{|*x| a, b, c = x}
14927 *
14928 * for a in e
14929 * #=>
14930 * e.each{|x| a, = x}
14931 */
14932 ID id = internal_id(p);
14933 rb_node_args_aux_t *m = NEW_ARGS_AUX(0, 0, &NULL_LOC);
14934 rb_node_args_t *args;
14935 NODE *scope, *internal_var = NEW_DVAR(id, &(yylsp[-7]));
14936 rb_ast_id_table_t *tbl = rb_ast_new_local_table(p->ast, 1);
14937 tbl->ids[0] = id; /* internal id */
14938
14939 switch (nd_type((yyvsp[-7].node))) {
14940 case NODE_LASGN:
14941 case NODE_DASGN: /* e.each {|internal_var| a = internal_var; ... } */
14942 set_nd_value(p, (yyvsp[-7].node), internal_var);
14943 id = 0;
14944 m->nd_plen = 1;
14945 m->nd_next = (yyvsp[-7].node);
14946 break;
14947 case NODE_MASGN: /* e.each {|*internal_var| a, b, c = (internal_var.length == 1 && Array === (tmp = internal_var[0]) ? tmp : internal_var); ... } */
14948 m->nd_next = node_assign(p, (yyvsp[-7].node), NEW_FOR_MASGN(internal_var, &(yylsp[-7])), NO_LEX_CTXT, &(yylsp[-7]));
14949 break;
14950 default: /* e.each {|*internal_var| @a, B, c[1], d.attr = internal_val; ... } */
14951 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]));
14952 }
14953 /* {|*internal_id| <m> = internal_id; ... } */
14954 args = new_args(p, m, 0, id, 0, new_empty_args_tail(p, &(yylsp[-7])), &(yylsp[-7]));
14955 scope = NEW_SCOPE2(tbl, args, (yyvsp[-1].node), NULL, &(yyloc));
14956 YYLTYPE do_keyword_loc = (yyvsp[-3].id) == keyword_do_cond ? (yylsp[-3]) : NULL_LOC;
14957 (yyval.node) = NEW_FOR((yyvsp[-4].node), scope, &(yyloc), &(yylsp[-8]), &(yylsp[-6]), &do_keyword_loc, &(yylsp[0]));
14958 RNODE_SCOPE(scope)->nd_parent = (yyval.node);
14959 fixpos((yyval.node), (yyvsp[-7].node));
14960 /*% ripper: for!($:for_var, $:expr_value, $:compstmt) %*/
14961 }
14962#line 14963 "parse.c"
14963 break;
14964
14965 case 383: /* $@20: %empty */
14966#line 4618 "parse.y"
14967 {
14968 begin_definition("class", &(yylsp[-2]), &(yylsp[-1]));
14969 }
14970#line 14971 "parse.c"
14971 break;
14972
14973 case 384: /* primary: k_class cpath superclass $@20 bodystmt k_end */
14974#line 4623 "parse.y"
14975 {
14976 YYLTYPE inheritance_operator_loc = NULL_LOC;
14977 if ((yyvsp[-3].node)) {
14978 inheritance_operator_loc = (yylsp[-3]);
14979 inheritance_operator_loc.end_pos.column = inheritance_operator_loc.beg_pos.column + 1;
14980 }
14981 (yyval.node) = NEW_CLASS((yyvsp[-4].node), (yyvsp[-1].node), (yyvsp[-3].node), &(yyloc), &(yylsp[-5]), &inheritance_operator_loc, &(yylsp[0]));
14982 nd_set_line(RNODE_CLASS((yyval.node))->nd_body, (yylsp[0]).end_pos.lineno);
14983 set_line_body((yyvsp[-1].node), (yylsp[-3]).end_pos.lineno);
14984 nd_set_line((yyval.node), (yylsp[-3]).end_pos.lineno);
14985 /*% ripper: class!($:cpath, $:superclass, $:bodystmt) %*/
14986 local_pop(p);
14987 p->ctxt.in_class = (yyvsp[-5].ctxt).in_class;
14988 p->ctxt.cant_return = (yyvsp[-5].ctxt).cant_return;
14989 p->ctxt.shareable_constant_value = (yyvsp[-5].ctxt).shareable_constant_value;
14990 }
14991#line 14992 "parse.c"
14992 break;
14993
14994 case 385: /* $@21: %empty */
14995#line 4640 "parse.y"
14996 {
14997 begin_definition("", &(yylsp[-2]), &(yylsp[-1]));
14998 }
14999#line 15000 "parse.c"
15000 break;
15001
15002 case 386: /* primary: k_class "<<" expr_value $@21 term bodystmt k_end */
15003#line 4646 "parse.y"
15004 {
15005 (yyval.node) = NEW_SCLASS((yyvsp[-4].node), (yyvsp[-1].node), &(yyloc), &(yylsp[-6]), &(yylsp[-5]), &(yylsp[0]));
15006 nd_set_line(RNODE_SCLASS((yyval.node))->nd_body, (yylsp[0]).end_pos.lineno);
15007 set_line_body((yyvsp[-1].node), nd_line((yyvsp[-4].node)));
15008 fixpos((yyval.node), (yyvsp[-4].node));
15009 /*% ripper: sclass!($:expr_value, $:bodystmt) %*/
15010 local_pop(p);
15011 p->ctxt.in_def = (yyvsp[-6].ctxt).in_def;
15012 p->ctxt.in_class = (yyvsp[-6].ctxt).in_class;
15013 p->ctxt.cant_return = (yyvsp[-6].ctxt).cant_return;
15014 p->ctxt.shareable_constant_value = (yyvsp[-6].ctxt).shareable_constant_value;
15015 }
15016#line 15017 "parse.c"
15017 break;
15018
15019 case 387: /* $@22: %empty */
15020#line 4659 "parse.y"
15021 {
15022 begin_definition("module", &(yylsp[-1]), &(yylsp[0]));
15023 }
15024#line 15025 "parse.c"
15025 break;
15026
15027 case 388: /* primary: k_module cpath $@22 bodystmt k_end */
15028#line 4664 "parse.y"
15029 {
15030 (yyval.node) = NEW_MODULE((yyvsp[-3].node), (yyvsp[-1].node), &(yyloc), &(yylsp[-4]), &(yylsp[0]));
15031 nd_set_line(RNODE_MODULE((yyval.node))->nd_body, (yylsp[0]).end_pos.lineno);
15032 set_line_body((yyvsp[-1].node), (yylsp[-3]).end_pos.lineno);
15033 nd_set_line((yyval.node), (yylsp[-3]).end_pos.lineno);
15034 /*% ripper: module!($:cpath, $:bodystmt) %*/
15035 local_pop(p);
15036 p->ctxt.in_class = (yyvsp[-4].ctxt).in_class;
15037 p->ctxt.cant_return = (yyvsp[-4].ctxt).cant_return;
15038 p->ctxt.shareable_constant_value = (yyvsp[-4].ctxt).shareable_constant_value;
15039 }
15040#line 15041 "parse.c"
15041 break;
15042
15043 case 389: /* $@23: %empty */
15044#line 4677 "parse.y"
15045 {
15046 push_end_expect_token_locations(p, &(yylsp[-1]).beg_pos);
15047 }
15048#line 15049 "parse.c"
15049 break;
15050
15051 case 390: /* primary: defn_head f_arglist $@23 bodystmt k_end */
15052#line 4682 "parse.y"
15053 {
15054 restore_defun(p, (yyvsp[-4].node_def_temp));
15055 ((yyval.node) = (yyvsp[-4].node_def_temp)->nd_def)->nd_loc = (yyloc);
15056 (yyvsp[-1].node) = new_scope_body(p, (yyvsp[-3].node_args), (yyvsp[-1].node), (yyval.node), &(yyloc));
15057 RNODE_DEFN((yyval.node))->nd_defn = (yyvsp[-1].node);
15058 /*% ripper: def!($:head, $:args, $:bodystmt) %*/
15059 local_pop(p);
15060 }
15061#line 15062 "parse.c"
15062 break;
15063
15064 case 391: /* $@24: %empty */
15065#line 4692 "parse.y"
15066 {
15067 push_end_expect_token_locations(p, &(yylsp[-1]).beg_pos);
15068 }
15069#line 15070 "parse.c"
15070 break;
15071
15072 case 392: /* primary: defs_head f_arglist $@24 bodystmt k_end */
15073#line 4697 "parse.y"
15074 {
15075 restore_defun(p, (yyvsp[-4].node_def_temp));
15076 ((yyval.node) = (yyvsp[-4].node_def_temp)->nd_def)->nd_loc = (yyloc);
15077 (yyvsp[-1].node) = new_scope_body(p, (yyvsp[-3].node_args), (yyvsp[-1].node), (yyval.node), &(yyloc));
15078 RNODE_DEFS((yyval.node))->nd_defn = (yyvsp[-1].node);
15079 /*% ripper: defs!(*$:head[0..2], $:args, $:bodystmt) %*/
15080 local_pop(p);
15081 }
15082#line 15083 "parse.c"
15083 break;
15084
15085 case 393: /* primary: "'break'" */
15086#line 4706 "parse.y"
15087 {
15088 (yyval.node) = add_block_exit(p, NEW_BREAK(0, &(yyloc), &(yylsp[0])));
15089 /*% ripper: break!(args_new!) %*/
15090 }
15091#line 15092 "parse.c"
15092 break;
15093
15094 case 394: /* primary: "'next'" */
15095#line 4711 "parse.y"
15096 {
15097 (yyval.node) = add_block_exit(p, NEW_NEXT(0, &(yyloc), &(yylsp[0])));
15098 /*% ripper: next!(args_new!) %*/
15099 }
15100#line 15101 "parse.c"
15101 break;
15102
15103 case 395: /* primary: "'redo'" */
15104#line 4716 "parse.y"
15105 {
15106 (yyval.node) = add_block_exit(p, NEW_REDO(&(yyloc), &(yylsp[0])));
15107 /*% ripper: redo! %*/
15108 }
15109#line 15110 "parse.c"
15110 break;
15111
15112 case 396: /* primary: "'retry'" */
15113#line 4721 "parse.y"
15114 {
15115 if (!p->ctxt.in_defined) {
15116 switch (p->ctxt.in_rescue) {
15117 case before_rescue: yyerror1(&(yylsp[0]), "Invalid retry without rescue"); break;
15118 case after_rescue: /* ok */ break;
15119 case after_else: yyerror1(&(yylsp[0]), "Invalid retry after else"); break;
15120 case after_ensure: yyerror1(&(yylsp[0]), "Invalid retry after ensure"); break;
15121 }
15122 }
15123 (yyval.node) = NEW_RETRY(&(yyloc));
15124 /*% ripper: retry! %*/
15125 }
15126#line 15127 "parse.c"
15127 break;
15128
15129 case 397: /* value_expr_primary: primary */
15130#line 3173 "parse.y"
15131 {
15132 value_expr(p, (yyvsp[0].node));
15133 (yyval.node) = (yyvsp[0].node);
15134 }
15135#line 15136 "parse.c"
15136 break;
15137
15138 case 399: /* k_begin: "'begin'" */
15139#line 4739 "parse.y"
15140 {
15141 token_info_push(p, "begin", &(yyloc));
15142 push_end_expect_token_locations(p, &(yylsp[0]).beg_pos);
15143 }
15144#line 15145 "parse.c"
15145 break;
15146
15147 case 400: /* k_if: "'if'" */
15148#line 4746 "parse.y"
15149 {
15150 WARN_EOL("if");
15151 token_info_push(p, "if", &(yyloc));
15152 if (p->token_info && p->token_info->nonspc &&
15153 p->token_info->next && !strcmp(p->token_info->next->token, "else")) {
15154 const char *tok = p->lex.ptok - rb_strlen_lit("if");
15155 const char *beg = p->lex.pbeg + p->token_info->next->beg.column;
15156 beg += rb_strlen_lit("else");
15157 while (beg < tok && ISSPACE(*beg)) beg++;
15158 if (beg == tok) {
15159 p->token_info->nonspc = 0;
15160 }
15161 }
15162 push_end_expect_token_locations(p, &(yylsp[0]).beg_pos);
15163 }
15164#line 15165 "parse.c"
15165 break;
15166
15167 case 401: /* k_unless: "'unless'" */
15168#line 4764 "parse.y"
15169 {
15170 token_info_push(p, "unless", &(yyloc));
15171 push_end_expect_token_locations(p, &(yylsp[0]).beg_pos);
15172 }
15173#line 15174 "parse.c"
15174 break;
15175
15176 case 402: /* k_while: "'while'" allow_exits */
15177#line 4771 "parse.y"
15178 {
15179 (yyval.node_exits) = (yyvsp[0].node_exits);
15180 token_info_push(p, "while", &(yyloc));
15181 push_end_expect_token_locations(p, &(yylsp[-1]).beg_pos);
15182 }
15183#line 15184 "parse.c"
15184 break;
15185
15186 case 403: /* k_until: "'until'" allow_exits */
15187#line 4779 "parse.y"
15188 {
15189 (yyval.node_exits) = (yyvsp[0].node_exits);
15190 token_info_push(p, "until", &(yyloc));
15191 push_end_expect_token_locations(p, &(yylsp[-1]).beg_pos);
15192 }
15193#line 15194 "parse.c"
15194 break;
15195
15196 case 404: /* k_case: "'case'" */
15197#line 4787 "parse.y"
15198 {
15199 token_info_push(p, "case", &(yyloc));
15200 push_end_expect_token_locations(p, &(yylsp[0]).beg_pos);
15201 }
15202#line 15203 "parse.c"
15203 break;
15204
15205 case 405: /* k_for: "'for'" allow_exits */
15206#line 4794 "parse.y"
15207 {
15208 (yyval.node_exits) = (yyvsp[0].node_exits);
15209 token_info_push(p, "for", &(yyloc));
15210 push_end_expect_token_locations(p, &(yylsp[-1]).beg_pos);
15211 }
15212#line 15213 "parse.c"
15213 break;
15214
15215 case 406: /* k_class: "'class'" */
15216#line 4802 "parse.y"
15217 {
15218 token_info_push(p, "class", &(yyloc));
15219 (yyval.ctxt) = p->ctxt;
15220 p->ctxt.in_rescue = before_rescue;
15221 push_end_expect_token_locations(p, &(yylsp[0]).beg_pos);
15222 }
15223#line 15224 "parse.c"
15224 break;
15225
15226 case 407: /* k_module: "'module'" */
15227#line 4811 "parse.y"
15228 {
15229 token_info_push(p, "module", &(yyloc));
15230 (yyval.ctxt) = p->ctxt;
15231 p->ctxt.in_rescue = before_rescue;
15232 push_end_expect_token_locations(p, &(yylsp[0]).beg_pos);
15233 }
15234#line 15235 "parse.c"
15235 break;
15236
15237 case 408: /* k_def: "'def'" */
15238#line 4820 "parse.y"
15239 {
15240 token_info_push(p, "def", &(yyloc));
15241 (yyval.node_def_temp) = NEW_DEF_TEMP(&(yyloc));
15242 p->ctxt.in_argdef = 1;
15243 }
15244#line 15245 "parse.c"
15245 break;
15246
15247 case 409: /* k_do: "'do'" */
15248#line 4828 "parse.y"
15249 {
15250 token_info_push(p, "do", &(yyloc));
15251 push_end_expect_token_locations(p, &(yylsp[0]).beg_pos);
15252 }
15253#line 15254 "parse.c"
15254 break;
15255
15256 case 410: /* k_do_block: "'do' for block" */
15257#line 4835 "parse.y"
15258 {
15259 token_info_push(p, "do", &(yyloc));
15260 push_end_expect_token_locations(p, &(yylsp[0]).beg_pos);
15261 }
15262#line 15263 "parse.c"
15263 break;
15264
15265 case 411: /* k_rescue: "'rescue'" */
15266#line 4842 "parse.y"
15267 {
15268 token_info_warn(p, "rescue", p->token_info, 1, &(yyloc));
15269 (yyval.ctxt) = p->ctxt;
15270 p->ctxt.in_rescue = after_rescue;
15271 }
15272#line 15273 "parse.c"
15273 break;
15274
15275 case 412: /* k_ensure: "'ensure'" */
15276#line 4850 "parse.y"
15277 {
15278 token_info_warn(p, "ensure", p->token_info, 1, &(yyloc));
15279 (yyval.ctxt) = p->ctxt;
15280 }
15281#line 15282 "parse.c"
15282 break;
15283
15284 case 413: /* k_when: "'when'" */
15285#line 4857 "parse.y"
15286 {
15287 token_info_warn(p, "when", p->token_info, 0, &(yyloc));
15288 }
15289#line 15290 "parse.c"
15290 break;
15291
15292 case 414: /* k_else: "'else'" */
15293#line 4863 "parse.y"
15294 {
15295 token_info *ptinfo_beg = p->token_info;
15296 int same = ptinfo_beg && strcmp(ptinfo_beg->token, "case") != 0;
15297 token_info_warn(p, "else", p->token_info, same, &(yyloc));
15298 if (same) {
15299 token_info e;
15300 e.next = ptinfo_beg->next;
15301 e.token = "else";
15302 token_info_setup(&e, p->lex.pbeg, &(yyloc));
15303 if (!e.nonspc) *ptinfo_beg = e;
15304 }
15305 }
15306#line 15307 "parse.c"
15307 break;
15308
15309 case 415: /* k_elsif: "'elsif'" */
15310#line 4878 "parse.y"
15311 {
15312 WARN_EOL("elsif");
15313 token_info_warn(p, "elsif", p->token_info, 1, &(yyloc));
15314 }
15315#line 15316 "parse.c"
15316 break;
15317
15318 case 416: /* k_end: "'end'" */
15319#line 4885 "parse.y"
15320 {
15321 token_info_pop(p, "end", &(yyloc));
15322 pop_end_expect_token_locations(p);
15323 }
15324#line 15325 "parse.c"
15325 break;
15326
15327 case 417: /* k_end: "dummy end" */
15328#line 4890 "parse.y"
15329 {
15330 compile_error(p, "syntax error, unexpected end-of-input");
15331 }
15332#line 15333 "parse.c"
15333 break;
15334
15335 case 418: /* k_return: "'return'" */
15336#line 4896 "parse.y"
15337 {
15338 if (p->ctxt.cant_return && !dyna_in_block(p))
15339 yyerror1(&(yylsp[0]), "Invalid return in class/module body");
15340 }
15341#line 15342 "parse.c"
15342 break;
15343
15344 case 419: /* k_yield: "'yield'" */
15345#line 4903 "parse.y"
15346 {
15347 if (!p->ctxt.in_defined && !p->ctxt.in_def && !compile_for_eval)
15348 yyerror1(&(yylsp[0]), "Invalid yield");
15349 }
15350#line 15351 "parse.c"
15351 break;
15352
15353 case 424: /* do: "'do' for condition" */
15354#line 4915 "parse.y"
15355 { (yyval.id) = keyword_do_cond; }
15356#line 15357 "parse.c"
15357 break;
15358
15359 case 426: /* if_tail: k_elsif expr_value then compstmt_stmts if_tail */
15360#line 4922 "parse.y"
15361 {
15362 (yyval.node) = new_if(p, (yyvsp[-3].node), (yyvsp[-1].node), (yyvsp[0].node), &(yyloc), &(yylsp[-4]), &(yylsp[-2]), &NULL_LOC);
15363 fixpos((yyval.node), (yyvsp[-3].node));
15364 /*% ripper: elsif!($:2, $:4, $:5) %*/
15365 }
15366#line 15367 "parse.c"
15367 break;
15368
15369 case 428: /* opt_else: k_else compstmt_stmts */
15370#line 4931 "parse.y"
15371 {
15372 (yyval.node) = (yyvsp[0].node);
15373 /*% ripper: else!($:2) %*/
15374 }
15375#line 15376 "parse.c"
15376 break;
15377
15378 case 431: /* f_marg: f_norm_arg */
15379#line 4942 "parse.y"
15380 {
15381 (yyval.node) = assignable(p, (yyvsp[0].id), 0, &(yyloc));
15382 mark_lvar_used(p, (yyval.node));
15383 }
15384#line 15385 "parse.c"
15385 break;
15386
15387 case 432: /* f_marg: "(" f_margs rparen */
15388#line 4947 "parse.y"
15389 {
15390 (yyval.node) = (NODE *)(yyvsp[-1].node_masgn);
15391 /*% ripper: mlhs_paren!($:2) %*/
15392 }
15393#line 15394 "parse.c"
15394 break;
15395
15396 case 433: /* mlhs_items_f_marg: f_marg */
15397#line 3060 "parse.y"
15398 {
15399 (yyval.node) = NEW_LIST((yyvsp[0].node), &(yyloc));
15400 /*% ripper: mlhs_add!(mlhs_new!, $:1) %*/
15401 }
15402#line 15403 "parse.c"
15403 break;
15404
15405 case 434: /* mlhs_items_f_marg: mlhs_items_f_marg ',' f_marg */
15406#line 3065 "parse.y"
15407 {
15408 (yyval.node) = list_append(p, (yyvsp[-2].node), (yyvsp[0].node));
15409 /*% ripper: mlhs_add!($:1, $:3) %*/
15410 }
15411#line 15412 "parse.c"
15412 break;
15413
15414 case 435: /* f_margs: mlhs_items_f_marg */
15415#line 4955 "parse.y"
15416 {
15417 (yyval.node_masgn) = NEW_MASGN((yyvsp[0].node), 0, &(yyloc));
15418 /*% ripper: $:1 %*/
15419 }
15420#line 15421 "parse.c"
15421 break;
15422
15423 case 436: /* f_margs: mlhs_items_f_marg ',' f_rest_marg */
15424#line 4960 "parse.y"
15425 {
15426 (yyval.node_masgn) = NEW_MASGN((yyvsp[-2].node), (yyvsp[0].node), &(yyloc));
15427 /*% ripper: mlhs_add_star!($:1, $:3) %*/
15428 }
15429#line 15430 "parse.c"
15430 break;
15431
15432 case 437: /* f_margs: mlhs_items_f_marg ',' f_rest_marg ',' mlhs_items_f_marg */
15433#line 4965 "parse.y"
15434 {
15435 (yyval.node_masgn) = NEW_MASGN((yyvsp[-4].node), NEW_POSTARG((yyvsp[-2].node), (yyvsp[0].node), &(yyloc)), &(yyloc));
15436 /*% ripper: mlhs_add_post!(mlhs_add_star!($:1, $:3), $:5) %*/
15437 }
15438#line 15439 "parse.c"
15439 break;
15440
15441 case 438: /* f_margs: f_rest_marg */
15442#line 4970 "parse.y"
15443 {
15444 (yyval.node_masgn) = NEW_MASGN(0, (yyvsp[0].node), &(yyloc));
15445 /*% ripper: mlhs_add_star!(mlhs_new!, $:1) %*/
15446 }
15447#line 15448 "parse.c"
15448 break;
15449
15450 case 439: /* f_margs: f_rest_marg ',' mlhs_items_f_marg */
15451#line 4975 "parse.y"
15452 {
15453 (yyval.node_masgn) = NEW_MASGN(0, NEW_POSTARG((yyvsp[-2].node), (yyvsp[0].node), &(yyloc)), &(yyloc));
15454 /*% ripper: mlhs_add_post!(mlhs_add_star!(mlhs_new!, $:1), $:3) %*/
15455 }
15456#line 15457 "parse.c"
15457 break;
15458
15459 case 440: /* f_rest_marg: "*" f_norm_arg */
15460#line 4982 "parse.y"
15461 {
15462 /*% ripper: $:2 %*/
15463 (yyval.node) = assignable(p, (yyvsp[0].id), 0, &(yyloc));
15464 mark_lvar_used(p, (yyval.node));
15465 }
15466#line 15467 "parse.c"
15467 break;
15468
15469 case 441: /* f_rest_marg: "*" */
15470#line 4988 "parse.y"
15471 {
15472 (yyval.node) = NODE_SPECIAL_NO_NAME_REST;
15473 /*% ripper: Qnil %*/
15474 }
15475#line 15476 "parse.c"
15476 break;
15477
15478 case 443: /* f_any_kwrest: f_no_kwarg */
15479#line 4996 "parse.y"
15480 {
15481 (yyval.id) = idNil;
15482 /*% ripper: ID2VAL(idNil) %*/
15483 }
15484#line 15485 "parse.c"
15485 break;
15486
15487 case 444: /* $@25: %empty */
15488#line 5002 "parse.y"
15489 {p->ctxt.in_argdef = 0;}
15490#line 15491 "parse.c"
15491 break;
15492
15493 case 446: /* f_kw_primary_value: f_label primary_value */
15494#line 3032 "parse.y"
15495 {
15496 p->ctxt.in_argdef = 1;
15497 (yyval.node_kw_arg) = new_kw_arg(p, assignable(p, (yyvsp[-1].id), (yyvsp[0].node), &(yyloc)), &(yyloc));
15498 /*% ripper: [$:$, $:value] %*/
15499 }
15500#line 15501 "parse.c"
15501 break;
15502
15503 case 447: /* f_kw_primary_value: f_label */
15504#line 3038 "parse.y"
15505 {
15506 p->ctxt.in_argdef = 1;
15507 (yyval.node_kw_arg) = new_kw_arg(p, assignable(p, (yyvsp[0].id), NODE_SPECIAL_REQUIRED_KEYWORD, &(yyloc)), &(yyloc));
15508 /*% ripper: [$:$, 0] %*/
15509 }
15510#line 15511 "parse.c"
15511 break;
15512
15513 case 448: /* f_kwarg_primary_value: f_kw_primary_value */
15514#line 3047 "parse.y"
15515 {
15516 (yyval.node_kw_arg) = (yyvsp[0].node_kw_arg);
15517 /*% ripper: rb_ary_new3(1, $:1) %*/
15518 }
15519#line 15520 "parse.c"
15520 break;
15521
15522 case 449: /* f_kwarg_primary_value: f_kwarg_primary_value ',' f_kw_primary_value */
15523#line 3052 "parse.y"
15524 {
15525 (yyval.node_kw_arg) = kwd_append((yyvsp[-2].node_kw_arg), (yyvsp[0].node_kw_arg));
15526 /*% ripper: rb_ary_push($:1, $:3) %*/
15527 }
15528#line 15529 "parse.c"
15529 break;
15530
15531 case 450: /* opt_f_block_arg_none: ',' f_block_arg */
15532#line 2969 "parse.y"
15533 {
15534 (yyval.id) = (yyvsp[0].id);
15535 /*% ripper: $:2 %*/
15536 }
15537#line 15538 "parse.c"
15538 break;
15539
15540 case 452: /* args_tail_basic_primary_value_none: f_kwarg_primary_value ',' f_kwrest opt_f_block_arg_none */
15541#line 2946 "parse.y"
15542 {
15543 (yyval.node_args) = new_args_tail(p, (yyvsp[-3].node_kw_arg), (yyvsp[-1].id), (yyvsp[0].id), &(yylsp[-1]));
15544 /*% ripper: [$:1, $:3, $:4] %*/
15545 }
15546#line 15547 "parse.c"
15547 break;
15548
15549 case 453: /* args_tail_basic_primary_value_none: f_kwarg_primary_value opt_f_block_arg_none */
15550#line 2951 "parse.y"
15551 {
15552 (yyval.node_args) = new_args_tail(p, (yyvsp[-1].node_kw_arg), 0, (yyvsp[0].id), &(yylsp[-1]));
15553 /*% ripper: [$:1, Qnil, $:2] %*/
15554 }
15555#line 15556 "parse.c"
15556 break;
15557
15558 case 454: /* args_tail_basic_primary_value_none: f_any_kwrest opt_f_block_arg_none */
15559#line 2956 "parse.y"
15560 {
15561 (yyval.node_args) = new_args_tail(p, 0, (yyvsp[-1].id), (yyvsp[0].id), &(yylsp[-1]));
15562 /*% ripper: [Qnil, $:1, $:2] %*/
15563 }
15564#line 15565 "parse.c"
15565 break;
15566
15567 case 455: /* args_tail_basic_primary_value_none: f_block_arg */
15568#line 2961 "parse.y"
15569 {
15570 (yyval.node_args) = new_args_tail(p, 0, 0, (yyvsp[0].id), &(yylsp[0]));
15571 /*% ripper: [Qnil, Qnil, $:1] %*/
15572 }
15573#line 15574 "parse.c"
15574 break;
15575
15576 case 457: /* excessed_comma: ',' */
15577#line 5008 "parse.y"
15578 {
15579 /* magic number for rest_id in iseq_set_arguments() */
15580 (yyval.id) = NODE_SPECIAL_EXCESSIVE_COMMA;
15581 /*% ripper: excessed_comma! %*/
15582 }
15583#line 15584 "parse.c"
15584 break;
15585
15586 case 458: /* f_opt_primary_value: f_arg_asgn f_eq primary_value */
15587#line 3010 "parse.y"
15588 {
15589 p->ctxt.in_argdef = 1;
15590 (yyval.node_opt_arg) = NEW_OPT_ARG(assignable(p, (yyvsp[-2].id), (yyvsp[0].node), &(yyloc)), &(yyloc));
15591 /*% ripper: [$:$, $:3] %*/
15592 }
15593#line 15594 "parse.c"
15594 break;
15595
15596 case 459: /* f_opt_arg_primary_value: f_opt_primary_value */
15597#line 3019 "parse.y"
15598 {
15599 (yyval.node_opt_arg) = (yyvsp[0].node_opt_arg);
15600 /*% ripper: rb_ary_new3(1, $:1) %*/
15601 }
15602#line 15603 "parse.c"
15603 break;
15604
15605 case 460: /* f_opt_arg_primary_value: f_opt_arg_primary_value ',' f_opt_primary_value */
15606#line 3024 "parse.y"
15607 {
15608 (yyval.node_opt_arg) = opt_arg_append((yyvsp[-2].node_opt_arg), (yyvsp[0].node_opt_arg));
15609 /*% ripper: rb_ary_push($:1, $:3) %*/
15610 }
15611#line 15612 "parse.c"
15612 break;
15613
15614 case 461: /* opt_args_tail_block_args_tail_none: ',' block_args_tail */
15615#line 3119 "parse.y"
15616 {
15617 (yyval.node_args) = (yyvsp[0].node_args);
15618 /*% ripper: $:tail %*/
15619 }
15620#line 15621 "parse.c"
15621 break;
15622
15623 case 462: /* opt_args_tail_block_args_tail_none: none */
15624#line 3124 "parse.y"
15625 {
15626 (yyval.node_args) = new_empty_args_tail(p, &(yyloc));
15627 /*% ripper: [Qnil, Qnil, Qnil] %*/
15628 }
15629#line 15630 "parse.c"
15630 break;
15631
15632 case 463: /* args-list_primary_value_opt_args_tail_block_args_tail_none: f_arg ',' f_opt_arg_primary_value ',' f_rest_arg opt_args_tail_block_args_tail_none */
15633#line 6290 "parse.y"
15634 {
15635 (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));
15636 /*% ripper: params!($:pre, $:opt, $:rest, Qnil, *$:tail[0..2]) %*/
15637 }
15638#line 15639 "parse.c"
15639 break;
15640
15641 case 464: /* args-list_primary_value_opt_args_tail_block_args_tail_none: f_arg ',' f_opt_arg_primary_value ',' f_rest_arg ',' f_arg opt_args_tail_block_args_tail_none */
15642#line 6295 "parse.y"
15643 {
15644 (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));
15645 /*% ripper: params!($:pre, $:opt, $:rest, $:post, *$:tail[0..2]) %*/
15646 }
15647#line 15648 "parse.c"
15648 break;
15649
15650 case 465: /* args-list_primary_value_opt_args_tail_block_args_tail_none: f_arg ',' f_opt_arg_primary_value opt_args_tail_block_args_tail_none */
15651#line 6300 "parse.y"
15652 {
15653 (yyval.node_args) = new_args(p, (yyvsp[-3].node_args_aux), (yyvsp[-1].node_opt_arg), 0, 0, (yyvsp[0].node_args), &(yyloc));
15654 /*% ripper: params!($:pre, $:opt, Qnil, Qnil, *$:tail[0..2]) %*/
15655 }
15656#line 15657 "parse.c"
15657 break;
15658
15659 case 466: /* args-list_primary_value_opt_args_tail_block_args_tail_none: f_arg ',' f_opt_arg_primary_value ',' f_arg opt_args_tail_block_args_tail_none */
15660#line 6305 "parse.y"
15661 {
15662 (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));
15663 /*% ripper: params!($:pre, $:opt, Qnil, $:post, *$:tail[0..2]) %*/
15664 }
15665#line 15666 "parse.c"
15666 break;
15667
15668 case 467: /* args-list_primary_value_opt_args_tail_block_args_tail_none: f_arg ',' f_rest_arg opt_args_tail_block_args_tail_none */
15669#line 6310 "parse.y"
15670 {
15671 (yyval.node_args) = new_args(p, (yyvsp[-3].node_args_aux), 0, (yyvsp[-1].id), 0, (yyvsp[0].node_args), &(yyloc));
15672 /*% ripper: params!($:pre, Qnil, $:rest, Qnil, *$:tail[0..2]) %*/
15673 }
15674#line 15675 "parse.c"
15675 break;
15676
15677 case 468: /* args-list_primary_value_opt_args_tail_block_args_tail_none: f_arg ',' f_rest_arg ',' f_arg opt_args_tail_block_args_tail_none */
15678#line 6315 "parse.y"
15679 {
15680 (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));
15681 /*% ripper: params!($:pre, Qnil, $:rest, $:post, *$:tail[0..2]) %*/
15682 }
15683#line 15684 "parse.c"
15684 break;
15685
15686 case 469: /* args-list_primary_value_opt_args_tail_block_args_tail_none: f_opt_arg_primary_value ',' f_rest_arg opt_args_tail_block_args_tail_none */
15687#line 6320 "parse.y"
15688 {
15689 (yyval.node_args) = new_args(p, 0, (yyvsp[-3].node_opt_arg), (yyvsp[-1].id), 0, (yyvsp[0].node_args), &(yyloc));
15690 /*% ripper: params!(Qnil, $:opt, $:rest, Qnil, *$:tail[0..2]) %*/
15691 }
15692#line 15693 "parse.c"
15693 break;
15694
15695 case 470: /* args-list_primary_value_opt_args_tail_block_args_tail_none: f_opt_arg_primary_value ',' f_rest_arg ',' f_arg opt_args_tail_block_args_tail_none */
15696#line 6325 "parse.y"
15697 {
15698 (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));
15699 /*% ripper: params!(Qnil, $:opt, $:rest, $:post, *$:tail[0..2]) %*/
15700 }
15701#line 15702 "parse.c"
15702 break;
15703
15704 case 471: /* args-list_primary_value_opt_args_tail_block_args_tail_none: f_opt_arg_primary_value opt_args_tail_block_args_tail_none */
15705#line 6330 "parse.y"
15706 {
15707 (yyval.node_args) = new_args(p, 0, (yyvsp[-1].node_opt_arg), 0, 0, (yyvsp[0].node_args), &(yyloc));
15708 /*% ripper: params!(Qnil, $:opt, Qnil, Qnil, *$:tail[0..2]) %*/
15709 }
15710#line 15711 "parse.c"
15711 break;
15712
15713 case 472: /* args-list_primary_value_opt_args_tail_block_args_tail_none: f_opt_arg_primary_value ',' f_arg opt_args_tail_block_args_tail_none */
15714#line 6335 "parse.y"
15715 {
15716 (yyval.node_args) = new_args(p, 0, (yyvsp[-3].node_opt_arg), 0, (yyvsp[-1].node_args_aux), (yyvsp[0].node_args), &(yyloc));
15717 /*% ripper: params!(Qnil, $:opt, Qnil, $:post, *$:tail[0..2]) %*/
15718 }
15719#line 15720 "parse.c"
15720 break;
15721
15722 case 473: /* args-list_primary_value_opt_args_tail_block_args_tail_none: f_rest_arg opt_args_tail_block_args_tail_none */
15723#line 6340 "parse.y"
15724 {
15725 (yyval.node_args) = new_args(p, 0, 0, (yyvsp[-1].id), 0, (yyvsp[0].node_args), &(yyloc));
15726 /*% ripper: params!(Qnil, Qnil, $:rest, Qnil, *$:tail[0..2]) %*/
15727 }
15728#line 15729 "parse.c"
15729 break;
15730
15731 case 474: /* args-list_primary_value_opt_args_tail_block_args_tail_none: f_rest_arg ',' f_arg opt_args_tail_block_args_tail_none */
15732#line 6345 "parse.y"
15733 {
15734 (yyval.node_args) = new_args(p, 0, 0, (yyvsp[-3].id), (yyvsp[-1].node_args_aux), (yyvsp[0].node_args), &(yyloc));
15735 /*% ripper: params!(Qnil, Qnil, $:rest, $:post, *$:tail[0..2]) %*/
15736 }
15737#line 15738 "parse.c"
15738 break;
15739
15740 case 476: /* block_param: f_arg excessed_comma */
15741#line 5017 "parse.y"
15742 {
15743 (yyval.node_args) = new_empty_args_tail(p, &(yylsp[0]));
15744 (yyval.node_args) = new_args(p, (yyvsp[-1].node_args_aux), 0, (yyvsp[0].id), 0, (yyval.node_args), &(yyloc));
15745 /*% ripper: params!($:pre, Qnil, $:excessed_comma, Qnil, Qnil, Qnil, Qnil) %*/
15746 }
15747#line 15748 "parse.c"
15748 break;
15749
15750 case 477: /* block_param: f_arg opt_args_tail_block_args_tail_none */
15751#line 5023 "parse.y"
15752 {
15753 (yyval.node_args) = new_args(p, (yyvsp[-1].node_args_aux), 0, 0, 0, (yyvsp[0].node_args), &(yyloc));
15754 /*% ripper: params!($:pre, Qnil, Qnil, Qnil, *$:tail[0..2]) %*/
15755 }
15756#line 15757 "parse.c"
15757 break;
15758
15759 case 478: /* tail-only-args_block_args_tail: block_args_tail */
15760#line 6353 "parse.y"
15761 {
15762 (yyval.node_args) = new_args(p, 0, 0, 0, 0, (yyvsp[0].node_args), &(yyloc));
15763 /*% ripper: params!(Qnil, Qnil, Qnil, Qnil, *$:tail[0..2]) %*/
15764 }
15765#line 15766 "parse.c"
15766 break;
15767
15768 case 481: /* opt_block_param_def: block_param_def */
15769#line 5032 "parse.y"
15770 {
15771 p->command_start = TRUE;
15772 }
15773#line 15774 "parse.c"
15774 break;
15775
15776 case 482: /* block_param_def: '|' opt_block_param opt_bv_decl '|' */
15777#line 5038 "parse.y"
15778 {
15779 p->max_numparam = ORDINAL_PARAM;
15780 p->ctxt.in_argdef = 0;
15781 (yyval.node_args) = (yyvsp[-2].node_args);
15782 /*% ripper: block_var!($:2, $:3) %*/
15783 }
15784#line 15785 "parse.c"
15785 break;
15786
15787 case 483: /* opt_block_param: %empty */
15788#line 5047 "parse.y"
15789 {
15790 (yyval.node_args) = 0;
15791 /*% ripper: params!(Qnil,Qnil,Qnil,Qnil,Qnil,Qnil,Qnil) %*/
15792 }
15793#line 15794 "parse.c"
15794 break;
15795
15796 case 485: /* opt_bv_decl: option_'\n' */
15797#line 5055 "parse.y"
15798 {
15799 (yyval.id) = 0;
15800 /*% ripper: Qfalse %*/
15801 }
15802#line 15803 "parse.c"
15803 break;
15804
15805 case 486: /* opt_bv_decl: option_'\n' ';' bv_decls option_'\n' */
15806#line 5060 "parse.y"
15807 {
15808 (yyval.id) = 0;
15809 /*% ripper: $:3 %*/
15810 }
15811#line 15812 "parse.c"
15812 break;
15813
15814 case 489: /* bvar: "local variable or method" */
15815#line 5073 "parse.y"
15816 {
15817 new_bv(p, (yyvsp[0].id));
15818 /*% ripper: $:1 %*/
15819 }
15820#line 15821 "parse.c"
15821 break;
15822
15823 case 491: /* max_numparam: %empty */
15824#line 5080 "parse.y"
15825 {
15826 (yyval.num) = p->max_numparam;
15827 p->max_numparam = 0;
15828 }
15829#line 15830 "parse.c"
15830 break;
15831
15832 case 492: /* numparam: %empty */
15833#line 5086 "parse.y"
15834 {
15835 (yyval.node) = numparam_push(p);
15836 }
15837#line 15838 "parse.c"
15838 break;
15839
15840 case 493: /* it_id: %empty */
15841#line 5091 "parse.y"
15842 {
15843 (yyval.id) = p->it_id;
15844 p->it_id = 0;
15845 }
15846#line 15847 "parse.c"
15847 break;
15848
15849 case 494: /* @26: %empty */
15850#line 5098 "parse.y"
15851 {
15852 token_info_push(p, "->", &(yylsp[0]));
15853 (yyval.vars) = dyna_push(p);
15854 }
15855#line 15856 "parse.c"
15856 break;
15857
15858 case 495: /* $@27: %empty */
15859#line 5104 "parse.y"
15860 {
15861 CMDARG_PUSH(0);
15862 }
15863#line 15864 "parse.c"
15864 break;
15865
15866 case 496: /* lambda: "->" @26 max_numparam numparam it_id allow_exits f_larglist $@27 lambda_body */
15867#line 5108 "parse.y"
15868 {
15869 int max_numparam = p->max_numparam;
15870 ID it_id = p->it_id;
15871 p->lex.lpar_beg = (yyvsp[-8].num);
15872 p->max_numparam = (yyvsp[-6].num);
15873 p->it_id = (yyvsp[-4].id);
15874 restore_block_exit(p, (yyvsp[-3].node_exits));
15875 CMDARG_POP();
15876 (yyvsp[-2].node_args) = args_with_numbered(p, (yyvsp[-2].node_args), max_numparam, it_id);
15877 {
15878 YYLTYPE loc = code_loc_gen(&(yylsp[-8]), &(yylsp[0]));
15879 (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);
15880 nd_set_line(RNODE_LAMBDA((yyval.node))->nd_body, (yylsp[0]).end_pos.lineno);
15881 nd_set_line((yyval.node), (yylsp[-2]).end_pos.lineno);
15882 nd_set_first_loc((yyval.node), (yylsp[-8]).beg_pos);
15883 xfree((yyvsp[0].locations_lambda_body));
15884 }
15885 /*% ripper: lambda!($:args, $:body) %*/
15886 numparam_pop(p, (yyvsp[-5].node));
15887 dyna_pop(p, (yyvsp[-7].vars));
15888 }
15889#line 15890 "parse.c"
15890 break;
15891
15892 case 497: /* f_larglist: '(' f_largs opt_bv_decl ')' */
15893#line 5132 "parse.y"
15894 {
15895 p->ctxt.in_argdef = 0;
15896 (yyval.node_args) = (yyvsp[-2].node_args);
15897 p->max_numparam = ORDINAL_PARAM;
15898 /*% ripper: paren!($:args) %*/
15899 }
15900#line 15901 "parse.c"
15901 break;
15902
15903 case 498: /* f_larglist: f_largs */
15904#line 5139 "parse.y"
15905 {
15906 p->ctxt.in_argdef = 0;
15907 if (!args_info_empty_p(&(yyvsp[0].node_args)->nd_ainfo))
15908 p->max_numparam = ORDINAL_PARAM;
15909 (yyval.node_args) = (yyvsp[0].node_args);
15910 }
15911#line 15912 "parse.c"
15912 break;
15913
15914 case 499: /* lambda_body: tLAMBEG compstmt_stmts '}' */
15915#line 5148 "parse.y"
15916 {
15917 token_info_pop(p, "}", &(yylsp[0]));
15918 (yyval.locations_lambda_body) = new_locations_lambda_body(p, (yyvsp[-1].node), &(yylsp[-1]), &(yylsp[-2]), &(yylsp[0]));
15919 /*% ripper: $:2 %*/
15920 }
15921#line 15922 "parse.c"
15922 break;
15923
15924 case 500: /* $@28: %empty */
15925#line 5154 "parse.y"
15926 {
15927 push_end_expect_token_locations(p, &(yylsp[0]).beg_pos);
15928 }
15929#line 15930 "parse.c"
15930 break;
15931
15932 case 501: /* lambda_body: "'do' for lambda" $@28 bodystmt k_end */
15933#line 5158 "parse.y"
15934 {
15935 (yyval.locations_lambda_body) = new_locations_lambda_body(p, (yyvsp[-1].node), &(yylsp[-1]), &(yylsp[-3]), &(yylsp[0]));
15936 /*% ripper: $:3 %*/
15937 }
15938#line 15939 "parse.c"
15939 break;
15940
15941 case 502: /* do_block: k_do_block do_body k_end */
15942#line 5165 "parse.y"
15943 {
15944 (yyval.node) = (yyvsp[-1].node);
15945 set_embraced_location((yyval.node), &(yylsp[-2]), &(yylsp[0]));
15946 /*% ripper: $:2 %*/
15947 }
15948#line 15949 "parse.c"
15949 break;
15950
15951 case 503: /* block_call: command do_block */
15952#line 5173 "parse.y"
15953 {
15954 if (nd_type_p((yyvsp[-1].node), NODE_YIELD)) {
15955 compile_error(p, "block given to yield");
15956 }
15957 else {
15958 block_dup_check(p, get_nd_args(p, (yyvsp[-1].node)), (yyvsp[0].node));
15959 }
15960 (yyval.node) = method_add_block(p, (yyvsp[-1].node), (yyvsp[0].node), &(yyloc));
15961 fixpos((yyval.node), (yyvsp[-1].node));
15962 /*% ripper: method_add_block!($:1, $:2) %*/
15963 }
15964#line 15965 "parse.c"
15965 break;
15966
15967 case 504: /* block_call: block_call call_op2 operation2 opt_paren_args */
15968#line 5185 "parse.y"
15969 {
15970 bool has_args = (yyvsp[0].node) != 0;
15971 if (NODE_EMPTY_ARGS_P((yyvsp[0].node))) (yyvsp[0].node) = 0;
15972 (yyval.node) = new_qcall(p, (yyvsp[-2].id), (yyvsp[-3].node), (yyvsp[-1].id), (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
15973 /*% ripper: call!($:1, $:2, $:3) %*/
15974 if (has_args) {
15975 /*% ripper: method_add_arg!($:$, $:4) %*/
15976 }
15977 }
15978#line 15979 "parse.c"
15979 break;
15980
15981 case 505: /* block_call: block_call call_op2 operation2 opt_paren_args brace_block */
15982#line 5195 "parse.y"
15983 {
15984 if (NODE_EMPTY_ARGS_P((yyvsp[-1].node))) (yyvsp[-1].node) = 0;
15985 (yyval.node) = new_command_qcall(p, (yyvsp[-3].id), (yyvsp[-4].node), (yyvsp[-2].id), (yyvsp[-1].node), (yyvsp[0].node), &(yylsp[-2]), &(yyloc));
15986 /*% ripper: method_add_block!(command_call!($:1, $:2, $:3, $:4), $:5) %*/
15987 }
15988#line 15989 "parse.c"
15989 break;
15990
15991 case 506: /* block_call: block_call call_op2 operation2 command_args do_block */
15992#line 5201 "parse.y"
15993 {
15994 (yyval.node) = new_command_qcall(p, (yyvsp[-3].id), (yyvsp[-4].node), (yyvsp[-2].id), (yyvsp[-1].node), (yyvsp[0].node), &(yylsp[-2]), &(yyloc));
15995 /*% ripper: method_add_block!(command_call!($:1, $:2, $:3, $:4), $:5) %*/
15996 }
15997#line 15998 "parse.c"
15998 break;
15999
16000 case 507: /* block_call: block_call call_op2 paren_args */
16001#line 5206 "parse.y"
16002 {
16003 (yyval.node) = new_qcall(p, (yyvsp[-1].id), (yyvsp[-2].node), idCall, (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
16004 nd_set_line((yyval.node), (yylsp[-1]).end_pos.lineno);
16005 /*% ripper: method_add_arg!(call!($:1, $:2, ID2VAL(idCall)), $:3) %*/
16006 }
16007#line 16008 "parse.c"
16008 break;
16009
16010 case 508: /* method_call: fcall paren_args */
16011#line 5214 "parse.y"
16012 {
16013 (yyvsp[-1].node_fcall)->nd_args = (yyvsp[0].node);
16014 (yyval.node) = (NODE *)(yyvsp[-1].node_fcall);
16015 nd_set_last_loc((yyvsp[-1].node_fcall), (yylsp[0]).end_pos);
16016 /*% ripper: method_add_arg!(fcall!($:1), $:2) %*/
16017 }
16018#line 16019 "parse.c"
16019 break;
16020
16021 case 509: /* method_call: primary_value call_op operation2 opt_paren_args */
16022#line 5221 "parse.y"
16023 {
16024 bool has_args = (yyvsp[0].node) != 0;
16025 if (NODE_EMPTY_ARGS_P((yyvsp[0].node))) (yyvsp[0].node) = 0;
16026 (yyval.node) = new_qcall(p, (yyvsp[-2].id), (yyvsp[-3].node), (yyvsp[-1].id), (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
16027 nd_set_line((yyval.node), (yylsp[-1]).end_pos.lineno);
16028 /*% ripper: call!($:1, $:2, $:3) %*/
16029 if (has_args) {
16030 /*% ripper: method_add_arg!($:$, $:4) %*/
16031 }
16032 }
16033#line 16034 "parse.c"
16034 break;
16035
16036 case 510: /* method_call: primary_value "::" operation2 paren_args */
16037#line 5232 "parse.y"
16038 {
16039 (yyval.node) = new_qcall(p, idCOLON2, (yyvsp[-3].node), (yyvsp[-1].id), (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
16040 nd_set_line((yyval.node), (yylsp[-1]).end_pos.lineno);
16041 /*% ripper: method_add_arg!(call!($:1, $:2, $:3), $:4) %*/
16042 }
16043#line 16044 "parse.c"
16044 break;
16045
16046 case 511: /* method_call: primary_value "::" operation3 */
16047#line 5238 "parse.y"
16048 {
16049 (yyval.node) = new_qcall(p, idCOLON2, (yyvsp[-2].node), (yyvsp[0].id), 0, &(yylsp[0]), &(yyloc));
16050 /*% ripper: call!($:1, $:2, $:3) %*/
16051 }
16052#line 16053 "parse.c"
16053 break;
16054
16055 case 512: /* method_call: primary_value call_op2 paren_args */
16056#line 5243 "parse.y"
16057 {
16058 (yyval.node) = new_qcall(p, (yyvsp[-1].id), (yyvsp[-2].node), idCall, (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
16059 nd_set_line((yyval.node), (yylsp[-1]).end_pos.lineno);
16060 /*% ripper: method_add_arg!(call!($:1, $:2, ID2VAL(idCall)), $:3) %*/
16061 }
16062#line 16063 "parse.c"
16063 break;
16064
16065 case 513: /* method_call: "'super'" paren_args */
16066#line 5249 "parse.y"
16067 {
16068 rb_code_location_t lparen_loc = (yylsp[0]);
16069 rb_code_location_t rparen_loc = (yylsp[0]);
16070 lparen_loc.end_pos.column = lparen_loc.beg_pos.column + 1;
16071 rparen_loc.beg_pos.column = rparen_loc.end_pos.column - 1;
16072
16073 (yyval.node) = NEW_SUPER((yyvsp[0].node), &(yyloc), &(yylsp[-1]), &lparen_loc, &rparen_loc);
16074 /*% ripper: super!($:2) %*/
16075 }
16076#line 16077 "parse.c"
16077 break;
16078
16079 case 514: /* method_call: "'super'" */
16080#line 5259 "parse.y"
16081 {
16082 (yyval.node) = NEW_ZSUPER(&(yyloc));
16083 /*% ripper: zsuper! %*/
16084 }
16085#line 16086 "parse.c"
16086 break;
16087
16088 case 515: /* method_call: primary_value '[' opt_call_args rbracket */
16089#line 5264 "parse.y"
16090 {
16091 (yyval.node) = NEW_CALL((yyvsp[-3].node), tAREF, (yyvsp[-1].node), &(yyloc));
16092 fixpos((yyval.node), (yyvsp[-3].node));
16093 /*% ripper: aref!($:1, $:3) %*/
16094 }
16095#line 16096 "parse.c"
16096 break;
16097
16098 case 516: /* brace_block: '{' brace_body '}' */
16099#line 5272 "parse.y"
16100 {
16101 (yyval.node) = (yyvsp[-1].node);
16102 set_embraced_location((yyval.node), &(yylsp[-2]), &(yylsp[0]));
16103 /*% ripper: $:2 %*/
16104 }
16105#line 16106 "parse.c"
16106 break;
16107
16108 case 517: /* brace_block: k_do do_body k_end */
16109#line 5278 "parse.y"
16110 {
16111 (yyval.node) = (yyvsp[-1].node);
16112 set_embraced_location((yyval.node), &(yylsp[-2]), &(yylsp[0]));
16113 /*% ripper: $:2 %*/
16114 }
16115#line 16116 "parse.c"
16116 break;
16117
16118 case 518: /* @29: %empty */
16119#line 5285 "parse.y"
16120 {(yyval.vars) = dyna_push(p);}
16121#line 16122 "parse.c"
16122 break;
16123
16124 case 519: /* brace_body: @29 max_numparam numparam it_id allow_exits opt_block_param_def compstmt_stmts */
16125#line 5288 "parse.y"
16126 {
16127 int max_numparam = p->max_numparam;
16128 ID it_id = p->it_id;
16129 p->max_numparam = (yyvsp[-5].num);
16130 p->it_id = (yyvsp[-3].id);
16131 (yyvsp[-1].node_args) = args_with_numbered(p, (yyvsp[-1].node_args), max_numparam, it_id);
16132 (yyval.node) = NEW_ITER((yyvsp[-1].node_args), (yyvsp[0].node), &(yyloc));
16133 /*% ripper: brace_block!($:args, $:compstmt) %*/
16134 restore_block_exit(p, (yyvsp[-2].node_exits));
16135 numparam_pop(p, (yyvsp[-4].node));
16136 dyna_pop(p, (yyvsp[-6].vars));
16137 }
16138#line 16139 "parse.c"
16139 break;
16140
16141 case 520: /* @30: %empty */
16142#line 5302 "parse.y"
16143 {
16144 (yyval.vars) = dyna_push(p);
16145 CMDARG_PUSH(0);
16146 }
16147#line 16148 "parse.c"
16148 break;
16149
16150 case 521: /* do_body: @30 max_numparam numparam it_id allow_exits opt_block_param_def bodystmt */
16151#line 5308 "parse.y"
16152 {
16153 int max_numparam = p->max_numparam;
16154 ID it_id = p->it_id;
16155 p->max_numparam = (yyvsp[-5].num);
16156 p->it_id = (yyvsp[-3].id);
16157 (yyvsp[-1].node_args) = args_with_numbered(p, (yyvsp[-1].node_args), max_numparam, it_id);
16158 (yyval.node) = NEW_ITER((yyvsp[-1].node_args), (yyvsp[0].node), &(yyloc));
16159 /*% ripper: do_block!($:args, $:bodystmt) %*/
16160 CMDARG_POP();
16161 restore_block_exit(p, (yyvsp[-2].node_exits));
16162 numparam_pop(p, (yyvsp[-4].node));
16163 dyna_pop(p, (yyvsp[-6].vars));
16164 }
16165#line 16166 "parse.c"
16166 break;
16167
16168 case 522: /* case_args: arg_value */
16169#line 5324 "parse.y"
16170 {
16171 check_literal_when(p, (yyvsp[0].node), &(yylsp[0]));
16172 (yyval.node) = NEW_LIST((yyvsp[0].node), &(yyloc));
16173 /*% ripper: args_add!(args_new!, $:arg_value) %*/
16174 }
16175#line 16176 "parse.c"
16176 break;
16177
16178 case 523: /* case_args: "*" arg_value */
16179#line 5330 "parse.y"
16180 {
16181 (yyval.node) = NEW_SPLAT((yyvsp[0].node), &(yyloc), &(yylsp[-1]));
16182 /*% ripper: args_add_star!(args_new!, $:arg_value) %*/
16183 }
16184#line 16185 "parse.c"
16185 break;
16186
16187 case 524: /* case_args: case_args ',' arg_value */
16188#line 5335 "parse.y"
16189 {
16190 check_literal_when(p, (yyvsp[0].node), &(yylsp[0]));
16191 (yyval.node) = last_arg_append(p, (yyvsp[-2].node), (yyvsp[0].node), &(yyloc));
16192 /*% ripper: args_add!($:non_last_args, $:arg_value) %*/
16193 }
16194#line 16195 "parse.c"
16195 break;
16196
16197 case 525: /* case_args: case_args ',' "*" arg_value */
16198#line 5341 "parse.y"
16199 {
16200 (yyval.node) = rest_arg_append(p, (yyvsp[-3].node), (yyvsp[0].node), &(yyloc));
16201 /*% ripper: args_add_star!($:non_last_args, $:arg_value) %*/
16202 }
16203#line 16204 "parse.c"
16204 break;
16205
16206 case 526: /* case_body: k_when case_args then compstmt_stmts cases */
16207#line 5350 "parse.y"
16208 {
16209 (yyval.node) = NEW_WHEN((yyvsp[-3].node), (yyvsp[-1].node), (yyvsp[0].node), &(yyloc), &(yylsp[-4]), &(yylsp[-2]));
16210 fixpos((yyval.node), (yyvsp[-3].node));
16211 /*% ripper: when!($:2, $:4, $:5) %*/
16212 }
16213#line 16214 "parse.c"
16214 break;
16215
16216 case 529: /* p_pvtbl: %empty */
16217#line 5361 "parse.y"
16218 {(yyval.tbl) = p->pvtbl; p->pvtbl = st_init_numtable();}
16219#line 16220 "parse.c"
16220 break;
16221
16222 case 530: /* p_pktbl: %empty */
16223#line 5362 "parse.y"
16224 {(yyval.tbl) = p->pktbl; p->pktbl = 0;}
16225#line 16226 "parse.c"
16226 break;
16227
16228 case 531: /* p_in_kwarg: %empty */
16229#line 5364 "parse.y"
16230 {
16231 (yyval.ctxt) = p->ctxt;
16232 SET_LEX_STATE(EXPR_BEG|EXPR_LABEL);
16233 p->command_start = FALSE;
16234 p->ctxt.in_kwarg = 1;
16235 p->ctxt.in_alt_pattern = 0;
16236 p->ctxt.capture_in_pattern = 0;
16237 }
16238#line 16239 "parse.c"
16239 break;
16240
16241 case 532: /* $@31: %empty */
16242#line 5377 "parse.y"
16243 {
16244 pop_pktbl(p, (yyvsp[-2].tbl));
16245 pop_pvtbl(p, (yyvsp[-3].tbl));
16246 p->ctxt.in_kwarg = (yyvsp[-4].ctxt).in_kwarg;
16247 p->ctxt.in_alt_pattern = (yyvsp[-4].ctxt).in_alt_pattern;
16248 p->ctxt.capture_in_pattern = (yyvsp[-4].ctxt).capture_in_pattern;
16249 }
16250#line 16251 "parse.c"
16251 break;
16252
16253 case 533: /* p_case_body: "'in'" p_in_kwarg p_pvtbl p_pktbl p_top_expr then $@31 compstmt_stmts p_cases */
16254#line 5386 "parse.y"
16255 {
16256 (yyval.node) = NEW_IN((yyvsp[-4].node), (yyvsp[-1].node), (yyvsp[0].node), &(yyloc), &(yylsp[-8]), &(yylsp[-3]), &NULL_LOC);
16257 /*% ripper: in!($:expr, $:compstmt, $:cases) %*/
16258 }
16259#line 16260 "parse.c"
16260 break;
16261
16262 case 537: /* p_top_expr: p_top_expr_body "'if' modifier" expr_value */
16263#line 5398 "parse.y"
16264 {
16265 (yyval.node) = new_if(p, (yyvsp[0].node), (yyvsp[-2].node), 0, &(yyloc), &(yylsp[-1]), &NULL_LOC, &NULL_LOC);
16266 fixpos((yyval.node), (yyvsp[0].node));
16267 /*% ripper: if_mod!($:3, $:1) %*/
16268 }
16269#line 16270 "parse.c"
16270 break;
16271
16272 case 538: /* p_top_expr: p_top_expr_body "'unless' modifier" expr_value */
16273#line 5404 "parse.y"
16274 {
16275 (yyval.node) = new_unless(p, (yyvsp[0].node), (yyvsp[-2].node), 0, &(yyloc), &(yylsp[-1]), &NULL_LOC, &NULL_LOC);
16276 fixpos((yyval.node), (yyvsp[0].node));
16277 /*% ripper: unless_mod!($:3, $:1) %*/
16278 }
16279#line 16280 "parse.c"
16280 break;
16281
16282 case 540: /* p_top_expr_body: p_expr ',' */
16283#line 5413 "parse.y"
16284 {
16285 (yyval.node) = new_array_pattern_tail(p, 0, 1, 0, 0, &(yyloc));
16286 (yyval.node) = new_array_pattern(p, 0, (yyvsp[-1].node), (yyval.node), &(yyloc));
16287 /*% ripper: aryptn!(Qnil, [$:1], Qnil, Qnil) %*/
16288 }
16289#line 16290 "parse.c"
16290 break;
16291
16292 case 541: /* p_top_expr_body: p_expr ',' p_args */
16293#line 5419 "parse.y"
16294 {
16295 (yyval.node) = new_array_pattern(p, 0, (yyvsp[-2].node), (yyvsp[0].node), &(yyloc));
16296 nd_set_first_loc((yyval.node), (yylsp[-2]).beg_pos);
16297 /*% ripper: aryptn!(Qnil, aryptn_pre_args(p, $:1, $:3[0]), *$:3[1..2]) %*/
16298 }
16299#line 16300 "parse.c"
16300 break;
16301
16302 case 542: /* p_top_expr_body: p_find */
16303#line 5425 "parse.y"
16304 {
16305 (yyval.node) = new_find_pattern(p, 0, (yyvsp[0].node), &(yyloc));
16306 /*% ripper: fndptn!(Qnil, *$:1[0..2]) %*/
16307 }
16308#line 16309 "parse.c"
16309 break;
16310
16311 case 543: /* p_top_expr_body: p_args_tail */
16312#line 5430 "parse.y"
16313 {
16314 (yyval.node) = new_array_pattern(p, 0, 0, (yyvsp[0].node), &(yyloc));
16315 /*% ripper: aryptn!(Qnil, *$:1[0..2]) %*/
16316 }
16317#line 16318 "parse.c"
16318 break;
16319
16320 case 544: /* p_top_expr_body: p_kwargs */
16321#line 5435 "parse.y"
16322 {
16323 (yyval.node) = new_hash_pattern(p, 0, (yyvsp[0].node), &(yyloc));
16324 /*% ripper: hshptn!(Qnil, *$:1[0..1]) %*/
16325 }
16326#line 16327 "parse.c"
16327 break;
16328
16329 case 546: /* p_as: p_expr "=>" p_variable */
16330#line 5445 "parse.y"
16331 {
16332 NODE *n = NEW_LIST((yyvsp[-2].node), &(yyloc));
16333 n = list_append(p, n, (yyvsp[0].node));
16334 (yyval.node) = new_hash(p, n, &(yyloc));
16335 /*% ripper: binary!($:1, ID2VAL((id_assoc)), $:3) %*/
16336 }
16337#line 16338 "parse.c"
16338 break;
16339
16340 case 548: /* $@32: %empty */
16341#line 5455 "parse.y"
16342 {
16343 p->ctxt.in_alt_pattern = 1;
16344 }
16345#line 16346 "parse.c"
16346 break;
16347
16348 case 549: /* p_alt: p_alt '|' $@32 p_expr_basic */
16349#line 5459 "parse.y"
16350 {
16351 if (p->ctxt.capture_in_pattern) {
16352 yyerror1(&(yylsp[-2]), "alternative pattern after variable capture");
16353 }
16354 p->ctxt.in_alt_pattern = 0;
16355 (yyval.node) = NEW_OR((yyvsp[-3].node), (yyvsp[0].node), &(yyloc), &(yylsp[-2]));
16356 /*% ripper: binary!($:left, ID2VAL(idOr), $:right) %*/
16357 }
16358#line 16359 "parse.c"
16359 break;
16360
16361 case 551: /* p_lparen: '(' p_pktbl */
16362#line 5471 "parse.y"
16363 {
16364 (yyval.tbl) = (yyvsp[0].tbl);
16365 /*% ripper: $:2 %*/
16366 }
16367#line 16368 "parse.c"
16368 break;
16369
16370 case 552: /* p_lbracket: '[' p_pktbl */
16371#line 5478 "parse.y"
16372 {
16373 (yyval.tbl) = (yyvsp[0].tbl);
16374 /*% ripper: $:2 %*/
16375 }
16376#line 16377 "parse.c"
16377 break;
16378
16379 case 555: /* p_expr_basic: p_const p_lparen p_args rparen */
16380#line 5487 "parse.y"
16381 {
16382 pop_pktbl(p, (yyvsp[-2].tbl));
16383 (yyval.node) = new_array_pattern(p, (yyvsp[-3].node), 0, (yyvsp[-1].node), &(yyloc));
16384 nd_set_first_loc((yyval.node), (yylsp[-3]).beg_pos);
16385 /*% ripper: aryptn!($:p_const, *$:p_args[0..2]) %*/
16386 }
16387#line 16388 "parse.c"
16388 break;
16389
16390 case 556: /* p_expr_basic: p_const p_lparen p_find rparen */
16391#line 5494 "parse.y"
16392 {
16393 pop_pktbl(p, (yyvsp[-2].tbl));
16394 (yyval.node) = new_find_pattern(p, (yyvsp[-3].node), (yyvsp[-1].node), &(yyloc));
16395 nd_set_first_loc((yyval.node), (yylsp[-3]).beg_pos);
16396 /*% ripper: fndptn!($:p_const, *$:p_find[0..2]) %*/
16397 }
16398#line 16399 "parse.c"
16399 break;
16400
16401 case 557: /* p_expr_basic: p_const p_lparen p_kwargs rparen */
16402#line 5501 "parse.y"
16403 {
16404 pop_pktbl(p, (yyvsp[-2].tbl));
16405 (yyval.node) = new_hash_pattern(p, (yyvsp[-3].node), (yyvsp[-1].node), &(yyloc));
16406 nd_set_first_loc((yyval.node), (yylsp[-3]).beg_pos);
16407 /*% ripper: hshptn!($:p_const, *$:p_kwargs[0..1]) %*/
16408 }
16409#line 16410 "parse.c"
16410 break;
16411
16412 case 558: /* p_expr_basic: p_const '(' rparen */
16413#line 5508 "parse.y"
16414 {
16415 (yyval.node) = new_array_pattern_tail(p, 0, 0, 0, 0, &(yyloc));
16416 (yyval.node) = new_array_pattern(p, (yyvsp[-2].node), 0, (yyval.node), &(yyloc));
16417 /*% ripper: aryptn!($:p_const, Qnil, Qnil, Qnil) %*/
16418 }
16419#line 16420 "parse.c"
16420 break;
16421
16422 case 559: /* p_expr_basic: p_const p_lbracket p_args rbracket */
16423#line 5514 "parse.y"
16424 {
16425 pop_pktbl(p, (yyvsp[-2].tbl));
16426 (yyval.node) = new_array_pattern(p, (yyvsp[-3].node), 0, (yyvsp[-1].node), &(yyloc));
16427 nd_set_first_loc((yyval.node), (yylsp[-3]).beg_pos);
16428 /*% ripper: aryptn!($:p_const, *$:p_args[0..2]) %*/
16429 }
16430#line 16431 "parse.c"
16431 break;
16432
16433 case 560: /* p_expr_basic: p_const p_lbracket p_find rbracket */
16434#line 5521 "parse.y"
16435 {
16436 pop_pktbl(p, (yyvsp[-2].tbl));
16437 (yyval.node) = new_find_pattern(p, (yyvsp[-3].node), (yyvsp[-1].node), &(yyloc));
16438 nd_set_first_loc((yyval.node), (yylsp[-3]).beg_pos);
16439 /*% ripper: fndptn!($:p_const, *$:p_find[0..2]) %*/
16440 }
16441#line 16442 "parse.c"
16442 break;
16443
16444 case 561: /* p_expr_basic: p_const p_lbracket p_kwargs rbracket */
16445#line 5528 "parse.y"
16446 {
16447 pop_pktbl(p, (yyvsp[-2].tbl));
16448 (yyval.node) = new_hash_pattern(p, (yyvsp[-3].node), (yyvsp[-1].node), &(yyloc));
16449 nd_set_first_loc((yyval.node), (yylsp[-3]).beg_pos);
16450 /*% ripper: hshptn!($:p_const, *$:p_kwargs[0..1]) %*/
16451 }
16452#line 16453 "parse.c"
16453 break;
16454
16455 case 562: /* p_expr_basic: p_const '[' rbracket */
16456#line 5535 "parse.y"
16457 {
16458 (yyval.node) = new_array_pattern_tail(p, 0, 0, 0, 0, &(yyloc));
16459 (yyval.node) = new_array_pattern(p, (yyvsp[-2].node), 0, (yyval.node), &(yyloc));
16460 /*% ripper: aryptn!($:p_const, Qnil, Qnil, Qnil) %*/
16461 }
16462#line 16463 "parse.c"
16463 break;
16464
16465 case 563: /* p_expr_basic: "[" p_args rbracket */
16466#line 5541 "parse.y"
16467 {
16468 (yyval.node) = new_array_pattern(p, 0, 0, (yyvsp[-1].node), &(yyloc));
16469 /*% ripper: aryptn!(Qnil, *$:p_args[0..2]) %*/
16470 }
16471#line 16472 "parse.c"
16472 break;
16473
16474 case 564: /* p_expr_basic: "[" p_find rbracket */
16475#line 5546 "parse.y"
16476 {
16477 (yyval.node) = new_find_pattern(p, 0, (yyvsp[-1].node), &(yyloc));
16478 /*% ripper: fndptn!(Qnil, *$:p_find[0..2]) %*/
16479 }
16480#line 16481 "parse.c"
16481 break;
16482
16483 case 565: /* p_expr_basic: "[" rbracket */
16484#line 5551 "parse.y"
16485 {
16486 (yyval.node) = new_array_pattern_tail(p, 0, 0, 0, 0, &(yyloc));
16487 (yyval.node) = new_array_pattern(p, 0, 0, (yyval.node), &(yyloc));
16488 /*% ripper: aryptn!(Qnil, Qnil, Qnil, Qnil) %*/
16489 }
16490#line 16491 "parse.c"
16491 break;
16492
16493 case 566: /* $@33: %empty */
16494#line 5557 "parse.y"
16495 {
16496 p->ctxt.in_kwarg = 0;
16497 }
16498#line 16499 "parse.c"
16499 break;
16500
16501 case 567: /* p_expr_basic: "{" p_pktbl lex_ctxt $@33 p_kwargs rbrace */
16502#line 5561 "parse.y"
16503 {
16504 pop_pktbl(p, (yyvsp[-4].tbl));
16505 p->ctxt.in_kwarg = (yyvsp[-3].ctxt).in_kwarg;
16506 (yyval.node) = new_hash_pattern(p, 0, (yyvsp[-1].node), &(yyloc));
16507 /*% ripper: hshptn!(Qnil, *$:p_kwargs[0..1]) %*/
16508 }
16509#line 16510 "parse.c"
16510 break;
16511
16512 case 568: /* p_expr_basic: "{" rbrace */
16513#line 5568 "parse.y"
16514 {
16515 (yyval.node) = new_hash_pattern_tail(p, 0, 0, &(yyloc));
16516 (yyval.node) = new_hash_pattern(p, 0, (yyval.node), &(yyloc));
16517 /*% ripper: hshptn!(Qnil, Qnil, Qnil) %*/
16518 }
16519#line 16520 "parse.c"
16520 break;
16521
16522 case 569: /* p_expr_basic: "(" p_pktbl p_expr rparen */
16523#line 5574 "parse.y"
16524 {
16525 pop_pktbl(p, (yyvsp[-2].tbl));
16526 (yyval.node) = (yyvsp[-1].node);
16527 /*% ripper: $:p_expr %*/
16528 }
16529#line 16530 "parse.c"
16530 break;
16531
16532 case 570: /* p_args: p_expr */
16533#line 5582 "parse.y"
16534 {
16535 NODE *pre_args = NEW_LIST((yyvsp[0].node), &(yyloc));
16536 (yyval.node) = new_array_pattern_tail(p, pre_args, 0, 0, 0, &(yyloc));
16537 /*% ripper: [[$:1], Qnil, Qnil] %*/
16538 }
16539#line 16540 "parse.c"
16540 break;
16541
16542 case 571: /* p_args: p_args_head */
16543#line 5588 "parse.y"
16544 {
16545 (yyval.node) = new_array_pattern_tail(p, (yyvsp[0].node), 1, 0, 0, &(yyloc));
16546 /*% ripper: [$:1, Qnil, Qnil] %*/
16547 }
16548#line 16549 "parse.c"
16549 break;
16550
16551 case 572: /* p_args: p_args_head p_arg */
16552#line 5593 "parse.y"
16553 {
16554 (yyval.node) = new_array_pattern_tail(p, list_concat((yyvsp[-1].node), (yyvsp[0].node)), 0, 0, 0, &(yyloc));
16555 /*% ripper: [rb_ary_concat($:1, $:2), Qnil, Qnil] %*/
16556 }
16557#line 16558 "parse.c"
16558 break;
16559
16560 case 573: /* p_args: p_args_head p_rest */
16561#line 5598 "parse.y"
16562 {
16563 (yyval.node) = new_array_pattern_tail(p, (yyvsp[-1].node), 1, (yyvsp[0].node), 0, &(yyloc));
16564 /*% ripper: [$:1, $:2, Qnil] %*/
16565 }
16566#line 16567 "parse.c"
16567 break;
16568
16569 case 574: /* p_args: p_args_head p_rest ',' p_args_post */
16570#line 5603 "parse.y"
16571 {
16572 (yyval.node) = new_array_pattern_tail(p, (yyvsp[-3].node), 1, (yyvsp[-2].node), (yyvsp[0].node), &(yyloc));
16573 /*% ripper: [$:1, $:2, $:4] %*/
16574 }
16575#line 16576 "parse.c"
16576 break;
16577
16578 case 577: /* p_args_head: p_args_head p_arg ',' */
16579#line 5612 "parse.y"
16580 {
16581 (yyval.node) = list_concat((yyvsp[-2].node), (yyvsp[-1].node));
16582 /*% ripper: rb_ary_concat($:1, $:2) %*/
16583 }
16584#line 16585 "parse.c"
16585 break;
16586
16587 case 578: /* p_args_tail: p_rest */
16588#line 5619 "parse.y"
16589 {
16590 (yyval.node) = new_array_pattern_tail(p, 0, 1, (yyvsp[0].node), 0, &(yyloc));
16591 /*% ripper: [Qnil, $:1, Qnil] %*/
16592 }
16593#line 16594 "parse.c"
16594 break;
16595
16596 case 579: /* p_args_tail: p_rest ',' p_args_post */
16597#line 5624 "parse.y"
16598 {
16599 (yyval.node) = new_array_pattern_tail(p, 0, 1, (yyvsp[-2].node), (yyvsp[0].node), &(yyloc));
16600 /*% ripper: [Qnil, $:1, $:3] %*/
16601 }
16602#line 16603 "parse.c"
16603 break;
16604
16605 case 580: /* p_find: p_rest ',' p_args_post ',' p_rest */
16606#line 5631 "parse.y"
16607 {
16608 (yyval.node) = new_find_pattern_tail(p, (yyvsp[-4].node), (yyvsp[-2].node), (yyvsp[0].node), &(yyloc));
16609 /*% ripper: [$:1, $:3, $:5] %*/
16610 }
16611#line 16612 "parse.c"
16612 break;
16613
16614 case 581: /* p_rest: "*" "local variable or method" */
16615#line 5639 "parse.y"
16616 {
16617 error_duplicate_pattern_variable(p, (yyvsp[0].id), &(yylsp[0]));
16618 /*% ripper: var_field!($:2) %*/
16619 (yyval.node) = assignable(p, (yyvsp[0].id), 0, &(yyloc));
16620 }
16621#line 16622 "parse.c"
16622 break;
16623
16624 case 582: /* p_rest: "*" */
16625#line 5645 "parse.y"
16626 {
16627 (yyval.node) = 0;
16628 /*% ripper: var_field!(Qnil) %*/
16629 }
16630#line 16631 "parse.c"
16631 break;
16632
16633 case 584: /* p_args_post: p_args_post ',' p_arg */
16634#line 5653 "parse.y"
16635 {
16636 (yyval.node) = list_concat((yyvsp[-2].node), (yyvsp[0].node));
16637 /*% ripper: rb_ary_concat($:1, $:3) %*/
16638 }
16639#line 16640 "parse.c"
16640 break;
16641
16642 case 585: /* p_arg: p_expr */
16643#line 5660 "parse.y"
16644 {
16645 (yyval.node) = NEW_LIST((yyvsp[0].node), &(yyloc));
16646 /*% ripper: [$:1] %*/
16647 }
16648#line 16649 "parse.c"
16649 break;
16650
16651 case 586: /* p_kwargs: p_kwarg ',' p_any_kwrest */
16652#line 5667 "parse.y"
16653 {
16654 (yyval.node) = new_hash_pattern_tail(p, new_unique_key_hash(p, (yyvsp[-2].node), &(yyloc)), (yyvsp[0].id), &(yyloc));
16655 /*% ripper: [$:1, $:3] %*/
16656 }
16657#line 16658 "parse.c"
16658 break;
16659
16660 case 587: /* p_kwargs: p_kwarg */
16661#line 5672 "parse.y"
16662 {
16663 (yyval.node) = new_hash_pattern_tail(p, new_unique_key_hash(p, (yyvsp[0].node), &(yyloc)), 0, &(yyloc));
16664 /*% ripper: [$:1, Qnil] %*/
16665 }
16666#line 16667 "parse.c"
16667 break;
16668
16669 case 588: /* p_kwargs: p_kwarg ',' */
16670#line 5677 "parse.y"
16671 {
16672 (yyval.node) = new_hash_pattern_tail(p, new_unique_key_hash(p, (yyvsp[-1].node), &(yyloc)), 0, &(yyloc));
16673 /*% ripper: [$:1, Qnil] %*/
16674 }
16675#line 16676 "parse.c"
16676 break;
16677
16678 case 589: /* p_kwargs: p_any_kwrest */
16679#line 5682 "parse.y"
16680 {
16681 (yyval.node) = new_hash_pattern_tail(p, new_hash(p, 0, &(yyloc)), (yyvsp[0].id), &(yyloc));
16682 /*% ripper: [[], $:1] %*/
16683 }
16684#line 16685 "parse.c"
16685 break;
16686
16687 case 591: /* p_kwarg: p_kwarg ',' p_kw */
16688#line 5691 "parse.y"
16689 {
16690 (yyval.node) = list_concat((yyvsp[-2].node), (yyvsp[0].node));
16691 /*% ripper: rb_ary_push($:1, $:3) %*/
16692 }
16693#line 16694 "parse.c"
16694 break;
16695
16696 case 592: /* p_kw: p_kw_label p_expr */
16697#line 5698 "parse.y"
16698 {
16699 error_duplicate_pattern_key(p, (yyvsp[-1].id), &(yylsp[-1]));
16700 (yyval.node) = list_append(p, NEW_LIST(NEW_SYM(rb_id2str((yyvsp[-1].id)), &(yylsp[-1])), &(yyloc)), (yyvsp[0].node));
16701 /*% ripper: [$:1, $:2] %*/
16702 }
16703#line 16704 "parse.c"
16704 break;
16705
16706 case 593: /* p_kw: p_kw_label */
16707#line 5704 "parse.y"
16708 {
16709 error_duplicate_pattern_key(p, (yyvsp[0].id), &(yylsp[0]));
16710 if ((yyvsp[0].id) && !is_local_id((yyvsp[0].id))) {
16711 yyerror1(&(yylsp[0]), "key must be valid as local variables");
16712 }
16713 error_duplicate_pattern_variable(p, (yyvsp[0].id), &(yylsp[0]));
16714 (yyval.node) = list_append(p, NEW_LIST(NEW_SYM(rb_id2str((yyvsp[0].id)), &(yyloc)), &(yyloc)), assignable(p, (yyvsp[0].id), 0, &(yyloc)));
16715 /*% ripper: [$:1, Qnil] %*/
16716 }
16717#line 16718 "parse.c"
16718 break;
16719
16720 case 595: /* p_kw_label: "string literal" string_contents tLABEL_END */
16721#line 5717 "parse.y"
16722 {
16723 YYLTYPE loc = code_loc_gen(&(yylsp[-2]), &(yylsp[0]));
16724 if (!(yyvsp[-1].node) || nd_type_p((yyvsp[-1].node), NODE_STR)) {
16725 NODE *node = dsym_node(p, (yyvsp[-1].node), &loc);
16726 (yyval.id) = rb_sym2id(rb_node_sym_string_val(node));
16727 }
16728 else {
16729 yyerror1(&loc, "symbol literal with interpolation is not allowed");
16730 (yyval.id) = rb_intern_str(STR_NEW0());
16731 }
16732 /*% ripper: $:2 %*/
16733 }
16734#line 16735 "parse.c"
16735 break;
16736
16737 case 596: /* p_kwrest: kwrest_mark "local variable or method" */
16738#line 5732 "parse.y"
16739 {
16740 (yyval.id) = (yyvsp[0].id);
16741 /*% ripper: var_field!($:2) %*/
16742 }
16743#line 16744 "parse.c"
16744 break;
16745
16746 case 597: /* p_kwrest: kwrest_mark */
16747#line 5737 "parse.y"
16748 {
16749 (yyval.id) = 0;
16750 /*% ripper: Qnil %*/
16751 }
16752#line 16753 "parse.c"
16753 break;
16754
16755 case 598: /* p_kwnorest: kwrest_mark "'nil'" */
16756#line 5744 "parse.y"
16757 {
16758 (yyval.id) = 0;
16759 }
16760#line 16761 "parse.c"
16761 break;
16762
16763 case 600: /* p_any_kwrest: p_kwnorest */
16764#line 5751 "parse.y"
16765 {
16766 (yyval.id) = idNil;
16767 /*% ripper: var_field!(ID2VAL(idNil)) %*/
16768 }
16769#line 16770 "parse.c"
16770 break;
16771
16772 case 602: /* range_expr_p_primitive: p_primitive ".." p_primitive */
16773#line 3132 "parse.y"
16774 {
16775 value_expr(p, (yyvsp[-2].node));
16776 value_expr(p, (yyvsp[0].node));
16777 (yyval.node) = NEW_DOT2((yyvsp[-2].node), (yyvsp[0].node), &(yyloc), &(yylsp[-1]));
16778 /*% ripper: dot2!($:1, $:3) %*/
16779 }
16780#line 16781 "parse.c"
16781 break;
16782
16783 case 603: /* range_expr_p_primitive: p_primitive "..." p_primitive */
16784#line 3139 "parse.y"
16785 {
16786 value_expr(p, (yyvsp[-2].node));
16787 value_expr(p, (yyvsp[0].node));
16788 (yyval.node) = NEW_DOT3((yyvsp[-2].node), (yyvsp[0].node), &(yyloc), &(yylsp[-1]));
16789 /*% ripper: dot3!($:1, $:3) %*/
16790 }
16791#line 16792 "parse.c"
16792 break;
16793
16794 case 604: /* range_expr_p_primitive: p_primitive ".." */
16795#line 3146 "parse.y"
16796 {
16797 value_expr(p, (yyvsp[-1].node));
16798 (yyval.node) = NEW_DOT2((yyvsp[-1].node), new_nil_at(p, &(yylsp[0]).end_pos), &(yyloc), &(yylsp[0]));
16799 /*% ripper: dot2!($:1, Qnil) %*/
16800 }
16801#line 16802 "parse.c"
16802 break;
16803
16804 case 605: /* range_expr_p_primitive: p_primitive "..." */
16805#line 3152 "parse.y"
16806 {
16807 value_expr(p, (yyvsp[-1].node));
16808 (yyval.node) = NEW_DOT3((yyvsp[-1].node), new_nil_at(p, &(yylsp[0]).end_pos), &(yyloc), &(yylsp[0]));
16809 /*% ripper: dot3!($:1, Qnil) %*/
16810 }
16811#line 16812 "parse.c"
16812 break;
16813
16814 case 606: /* range_expr_p_primitive: "(.." p_primitive */
16815#line 3158 "parse.y"
16816 {
16817 value_expr(p, (yyvsp[0].node));
16818 (yyval.node) = NEW_DOT2(new_nil_at(p, &(yylsp[-1]).beg_pos), (yyvsp[0].node), &(yyloc), &(yylsp[-1]));
16819 /*% ripper: dot2!(Qnil, $:2) %*/
16820 }
16821#line 16822 "parse.c"
16822 break;
16823
16824 case 607: /* range_expr_p_primitive: "(..." p_primitive */
16825#line 3164 "parse.y"
16826 {
16827 value_expr(p, (yyvsp[0].node));
16828 (yyval.node) = NEW_DOT3(new_nil_at(p, &(yylsp[-1]).beg_pos), (yyvsp[0].node), &(yyloc), &(yylsp[-1]));
16829 /*% ripper: dot3!(Qnil, $:2) %*/
16830 }
16831#line 16832 "parse.c"
16832 break;
16833
16834 case 620: /* p_primitive: keyword_variable */
16835#line 5766 "parse.y"
16836 {
16837 if (!((yyval.node) = gettable(p, (yyvsp[0].id), &(yyloc)))) (yyval.node) = NEW_ERROR(&(yyloc));
16838 /*% ripper: var_ref!($:1) %*/
16839 }
16840#line 16841 "parse.c"
16841 break;
16842
16843 case 622: /* p_variable: "local variable or method" */
16844#line 5774 "parse.y"
16845 {
16846 error_duplicate_pattern_variable(p, (yyvsp[0].id), &(yylsp[0]));
16847 /*% ripper: var_field!($:1) %*/
16848 (yyval.node) = assignable(p, (yyvsp[0].id), 0, &(yyloc));
16849 }
16850#line 16851 "parse.c"
16851 break;
16852
16853 case 623: /* p_var_ref: '^' "local variable or method" */
16854#line 5782 "parse.y"
16855 {
16856 NODE *n = gettable(p, (yyvsp[0].id), &(yyloc));
16857 if (!n) {
16858 n = NEW_ERROR(&(yyloc));
16859 }
16860 else if (!(nd_type_p(n, NODE_LVAR) || nd_type_p(n, NODE_DVAR))) {
16861 compile_error(p, "%"PRIsVALUE": no such local variable", rb_id2str((yyvsp[0].id)));
16862 }
16863 (yyval.node) = n;
16864 /*% ripper: var_ref!($:2) %*/
16865 }
16866#line 16867 "parse.c"
16867 break;
16868
16869 case 624: /* p_var_ref: '^' nonlocal_var */
16870#line 5794 "parse.y"
16871 {
16872 if (!((yyval.node) = gettable(p, (yyvsp[0].id), &(yyloc)))) (yyval.node) = NEW_ERROR(&(yyloc));
16873 /*% ripper: var_ref!($:2) %*/
16874 }
16875#line 16876 "parse.c"
16876 break;
16877
16878 case 625: /* p_expr_ref: '^' "(" expr_value rparen */
16879#line 5801 "parse.y"
16880 {
16881 (yyval.node) = NEW_BLOCK((yyvsp[-1].node), &(yyloc));
16882 /*% ripper: begin!($:3) %*/
16883 }
16884#line 16885 "parse.c"
16885 break;
16886
16887 case 626: /* p_const: ":: at EXPR_BEG" cname */
16888#line 5808 "parse.y"
16889 {
16890 (yyval.node) = NEW_COLON3((yyvsp[0].id), &(yyloc), &(yylsp[-1]), &(yylsp[0]));
16891 /*% ripper: top_const_ref!($:2) %*/
16892 }
16893#line 16894 "parse.c"
16894 break;
16895
16896 case 627: /* p_const: p_const "::" cname */
16897#line 5813 "parse.y"
16898 {
16899 (yyval.node) = NEW_COLON2((yyvsp[-2].node), (yyvsp[0].id), &(yyloc), &(yylsp[-1]), &(yylsp[0]));
16900 /*% ripper: const_path_ref!($:1, $:3) %*/
16901 }
16902#line 16903 "parse.c"
16903 break;
16904
16905 case 628: /* p_const: "constant" */
16906#line 5818 "parse.y"
16907 {
16908 (yyval.node) = gettable(p, (yyvsp[0].id), &(yyloc));
16909 /*% ripper: var_ref!($:1) %*/
16910 }
16911#line 16912 "parse.c"
16912 break;
16913
16914 case 629: /* opt_rescue: k_rescue exc_list exc_var then compstmt_stmts opt_rescue */
16915#line 5827 "parse.y"
16916 {
16917 NODE *err = (yyvsp[-3].node);
16918 if ((yyvsp[-3].node)) {
16919 err = NEW_ERRINFO(&(yylsp[-3]));
16920 err = node_assign(p, (yyvsp[-3].node), err, NO_LEX_CTXT, &(yylsp[-3]));
16921 }
16922 (yyval.node) = NEW_RESBODY((yyvsp[-4].node), (yyvsp[-3].node), (yyvsp[-1].node), (yyvsp[0].node), &(yyloc));
16923 if ((yyvsp[-4].node)) {
16924 fixpos((yyval.node), (yyvsp[-4].node));
16925 }
16926 else if ((yyvsp[-3].node)) {
16927 fixpos((yyval.node), (yyvsp[-3].node));
16928 }
16929 else {
16930 fixpos((yyval.node), (yyvsp[-1].node));
16931 }
16932 /*% ripper: rescue!($:2, $:3, $:5, $:6) %*/
16933 }
16934#line 16935 "parse.c"
16935 break;
16936
16937 case 631: /* exc_list: arg_value */
16938#line 5849 "parse.y"
16939 {
16940 (yyval.node) = NEW_LIST((yyvsp[0].node), &(yyloc));
16941 /*% ripper: rb_ary_new3(1, $:1) %*/
16942 }
16943#line 16944 "parse.c"
16944 break;
16945
16946 case 632: /* exc_list: mrhs */
16947#line 5854 "parse.y"
16948 {
16949 if (!((yyval.node) = splat_array((yyvsp[0].node)))) (yyval.node) = (yyvsp[0].node);
16950 }
16951#line 16952 "parse.c"
16952 break;
16953
16954 case 634: /* exc_var: "=>" lhs */
16955#line 5861 "parse.y"
16956 {
16957 (yyval.node) = (yyvsp[0].node);
16958 /*% ripper: $:2 %*/
16959 }
16960#line 16961 "parse.c"
16961 break;
16962
16963 case 636: /* opt_ensure: k_ensure stmts option_terms */
16964#line 5869 "parse.y"
16965 {
16966 p->ctxt.in_rescue = (yyvsp[-2].ctxt).in_rescue;
16967 (yyval.node) = (yyvsp[-1].node);
16968 void_expr(p, void_stmts(p, (yyval.node)));
16969 /*% ripper: ensure!($:2) %*/
16970 }
16971#line 16972 "parse.c"
16972 break;
16973
16974 case 640: /* strings: string */
16975#line 5883 "parse.y"
16976 {
16977 if (!(yyvsp[0].node)) {
16978 (yyval.node) = NEW_STR(STRING_NEW0(), &(yyloc));
16979 }
16980 else {
16981 (yyval.node) = evstr2dstr(p, (yyvsp[0].node));
16982 }
16983 /*% ripper: $:1 %*/
16984 }
16985#line 16986 "parse.c"
16986 break;
16987
16988 case 643: /* string: string string1 */
16989#line 5897 "parse.y"
16990 {
16991 (yyval.node) = literal_concat(p, (yyvsp[-1].node), (yyvsp[0].node), &(yyloc));
16992 /*% ripper: string_concat!($:1, $:2) %*/
16993 }
16994#line 16995 "parse.c"
16995 break;
16996
16997 case 644: /* string1: "string literal" string_contents "terminator" */
16998#line 5904 "parse.y"
16999 {
17000 (yyval.node) = heredoc_dedent(p, (yyvsp[-1].node));
17001 if ((yyval.node)) nd_set_loc((yyval.node), &(yyloc));
17002 /*% ripper: $:2 %*/
17003 if (p->heredoc_indent > 0) {
17004 /*% ripper: heredoc_dedent!($:$, INT2NUM(%{p->heredoc_indent})) %*/
17005 p->heredoc_indent = 0;
17006 }
17007 /*% ripper: string_literal!($:$) %*/
17008 }
17009#line 17010 "parse.c"
17010 break;
17011
17012 case 645: /* xstring: "backtick literal" xstring_contents "terminator" */
17013#line 5917 "parse.y"
17014 {
17015 (yyval.node) = new_xstring(p, heredoc_dedent(p, (yyvsp[-1].node)), &(yyloc));
17016 /*% ripper: $:2 %*/
17017 if (p->heredoc_indent > 0) {
17018 /*% ripper: heredoc_dedent!($:$, INT2NUM(%{p->heredoc_indent})) %*/
17019 p->heredoc_indent = 0;
17020 }
17021 /*% ripper: xstring_literal!($:$) %*/
17022 }
17023#line 17024 "parse.c"
17024 break;
17025
17026 case 646: /* regexp: "regexp literal" regexp_contents tREGEXP_END */
17027#line 5929 "parse.y"
17028 {
17029 (yyval.node) = new_regexp(p, (yyvsp[-1].node), (yyvsp[0].num), &(yyloc), &(yylsp[-2]), &(yylsp[-1]), &(yylsp[0]));
17030 /*% ripper: regexp_literal!($:2, $:3) %*/
17031 }
17032#line 17033 "parse.c"
17033 break;
17034
17035 case 649: /* words_tWORDS_BEG_word_list: "word list" nonempty_list_' ' word_list "terminator" */
17036#line 3181 "parse.y"
17037 {
17038 (yyval.node) = make_list((yyvsp[-1].node), &(yyloc));
17039 /*% ripper: array!($:word_list) %*/
17040 }
17041#line 17042 "parse.c"
17042 break;
17043
17044 case 651: /* word_list: %empty */
17045#line 5939 "parse.y"
17046 {
17047 (yyval.node) = 0;
17048 /*% ripper: words_new! %*/
17049 }
17050#line 17051 "parse.c"
17051 break;
17052
17053 case 652: /* word_list: word_list word nonempty_list_' ' */
17054#line 5944 "parse.y"
17055 {
17056 (yyval.node) = list_append(p, (yyvsp[-2].node), evstr2dstr(p, (yyvsp[-1].node)));
17057 /*% ripper: words_add!($:1, $:2) %*/
17058 }
17059#line 17060 "parse.c"
17060 break;
17061
17062 case 654: /* word: word string_content */
17063#line 5953 "parse.y"
17064 {
17065 (yyval.node) = literal_concat(p, (yyvsp[-1].node), (yyvsp[0].node), &(yyloc));
17066 /*% ripper: word_add!($:1, $:2) %*/
17067 }
17068#line 17069 "parse.c"
17069 break;
17070
17071 case 655: /* words_tSYMBOLS_BEG_symbol_list: "symbol list" nonempty_list_' ' symbol_list "terminator" */
17072#line 3181 "parse.y"
17073 {
17074 (yyval.node) = make_list((yyvsp[-1].node), &(yyloc));
17075 /*% ripper: array!($:word_list) %*/
17076 }
17077#line 17078 "parse.c"
17078 break;
17079
17080 case 657: /* symbol_list: %empty */
17081#line 5963 "parse.y"
17082 {
17083 (yyval.node) = 0;
17084 /*% ripper: symbols_new! %*/
17085 }
17086#line 17087 "parse.c"
17087 break;
17088
17089 case 658: /* symbol_list: symbol_list word nonempty_list_' ' */
17090#line 5968 "parse.y"
17091 {
17092 (yyval.node) = symbol_append(p, (yyvsp[-2].node), evstr2dstr(p, (yyvsp[-1].node)));
17093 /*% ripper: symbols_add!($:1, $:2) %*/
17094 }
17095#line 17096 "parse.c"
17096 break;
17097
17098 case 659: /* words_tQWORDS_BEG_qword_list: "verbatim word list" nonempty_list_' ' qword_list "terminator" */
17099#line 3181 "parse.y"
17100 {
17101 (yyval.node) = make_list((yyvsp[-1].node), &(yyloc));
17102 /*% ripper: array!($:word_list) %*/
17103 }
17104#line 17105 "parse.c"
17105 break;
17106
17107 case 661: /* words_tQSYMBOLS_BEG_qsym_list: "verbatim symbol list" nonempty_list_' ' qsym_list "terminator" */
17108#line 3181 "parse.y"
17109 {
17110 (yyval.node) = make_list((yyvsp[-1].node), &(yyloc));
17111 /*% ripper: array!($:word_list) %*/
17112 }
17113#line 17114 "parse.c"
17114 break;
17115
17116 case 663: /* qword_list: %empty */
17117#line 5981 "parse.y"
17118 {
17119 (yyval.node) = 0;
17120 /*% ripper: qwords_new! %*/
17121 }
17122#line 17123 "parse.c"
17123 break;
17124
17125 case 664: /* qword_list: qword_list "literal content" nonempty_list_' ' */
17126#line 5986 "parse.y"
17127 {
17128 (yyval.node) = list_append(p, (yyvsp[-2].node), (yyvsp[-1].node));
17129 /*% ripper: qwords_add!($:1, $:2) %*/
17130 }
17131#line 17132 "parse.c"
17132 break;
17133
17134 case 665: /* qsym_list: %empty */
17135#line 5993 "parse.y"
17136 {
17137 (yyval.node) = 0;
17138 /*% ripper: qsymbols_new! %*/
17139 }
17140#line 17141 "parse.c"
17141 break;
17142
17143 case 666: /* qsym_list: qsym_list "literal content" nonempty_list_' ' */
17144#line 5998 "parse.y"
17145 {
17146 (yyval.node) = symbol_append(p, (yyvsp[-2].node), (yyvsp[-1].node));
17147 /*% ripper: qsymbols_add!($:1, $:2) %*/
17148 }
17149#line 17150 "parse.c"
17150 break;
17151
17152 case 667: /* string_contents: %empty */
17153#line 6005 "parse.y"
17154 {
17155 (yyval.node) = 0;
17156 /*% ripper: string_content! %*/
17157 }
17158#line 17159 "parse.c"
17159 break;
17160
17161 case 668: /* string_contents: string_contents string_content */
17162#line 6010 "parse.y"
17163 {
17164 (yyval.node) = literal_concat(p, (yyvsp[-1].node), (yyvsp[0].node), &(yyloc));
17165 /*% ripper: string_add!($:1, $:2) %*/
17166 }
17167#line 17168 "parse.c"
17168 break;
17169
17170 case 669: /* xstring_contents: %empty */
17171#line 6017 "parse.y"
17172 {
17173 (yyval.node) = 0;
17174 /*% ripper: xstring_new! %*/
17175 }
17176#line 17177 "parse.c"
17177 break;
17178
17179 case 670: /* xstring_contents: xstring_contents string_content */
17180#line 6022 "parse.y"
17181 {
17182 (yyval.node) = literal_concat(p, (yyvsp[-1].node), (yyvsp[0].node), &(yyloc));
17183 /*% ripper: xstring_add!($:1, $:2) %*/
17184 }
17185#line 17186 "parse.c"
17186 break;
17187
17188 case 671: /* regexp_contents: %empty */
17189#line 6029 "parse.y"
17190 {
17191 (yyval.node) = 0;
17192 /*% ripper: regexp_new! %*/
17193 }
17194#line 17195 "parse.c"
17195 break;
17196
17197 case 672: /* regexp_contents: regexp_contents string_content */
17198#line 6034 "parse.y"
17199 {
17200 NODE *head = (yyvsp[-1].node), *tail = (yyvsp[0].node);
17201 if (!head) {
17202 (yyval.node) = tail;
17203 }
17204 else if (!tail) {
17205 (yyval.node) = head;
17206 }
17207 else {
17208 switch (nd_type(head)) {
17209 case NODE_STR:
17210 head = str2dstr(p, head);
17211 break;
17212 case NODE_DSTR:
17213 break;
17214 default:
17215 head = list_append(p, NEW_DSTR(0, &(yyloc)), head);
17216 break;
17217 }
17218 (yyval.node) = list_append(p, head, tail);
17219 }
17220 /*% ripper: regexp_add!($:1, $:2) %*/
17221 }
17222#line 17223 "parse.c"
17223 break;
17224
17225 case 674: /* @34: %empty */
17226#line 6062 "parse.y"
17227 {
17228 /* need to backup p->lex.strterm so that a string literal `%&foo,#$&,bar&` can be parsed */
17229 (yyval.strterm) = p->lex.strterm;
17230 p->lex.strterm = 0;
17231 SET_LEX_STATE(EXPR_BEG);
17232 }
17233#line 17234 "parse.c"
17234 break;
17235
17236 case 675: /* string_content: tSTRING_DVAR @34 string_dvar */
17237#line 6069 "parse.y"
17238 {
17239 p->lex.strterm = (yyvsp[-1].strterm);
17240 (yyval.node) = NEW_EVSTR((yyvsp[0].node), &(yyloc), &(yylsp[-2]), &NULL_LOC);
17241 nd_set_line((yyval.node), (yylsp[0]).end_pos.lineno);
17242 /*% ripper: string_dvar!($:dvar) %*/
17243 }
17244#line 17245 "parse.c"
17245 break;
17246
17247 case 676: /* @35: %empty */
17248#line 6076 "parse.y"
17249 {
17250 CMDARG_PUSH(0);
17251 COND_PUSH(0);
17252 /* need to backup p->lex.strterm so that a string literal `%!foo,#{ !0 },bar!` can be parsed */
17253 (yyval.strterm) = p->lex.strterm;
17254 p->lex.strterm = 0;
17255 SET_LEX_STATE(EXPR_BEG);
17256 }
17257#line 17258 "parse.c"
17258 break;
17259
17260 case 677: /* @36: %empty */
17261#line 6084 "parse.y"
17262 {
17263 (yyval.num) = p->lex.brace_nest;
17264 p->lex.brace_nest = 0;
17265 }
17266#line 17267 "parse.c"
17267 break;
17268
17269 case 678: /* @37: %empty */
17270#line 6088 "parse.y"
17271 {
17272 (yyval.num) = p->heredoc_indent;
17273 p->heredoc_indent = 0;
17274 }
17275#line 17276 "parse.c"
17276 break;
17277
17278 case 679: /* string_content: "'#{'" @35 @36 @37 compstmt_stmts string_dend */
17279#line 6093 "parse.y"
17280 {
17281 COND_POP();
17282 CMDARG_POP();
17283 p->lex.strterm = (yyvsp[-4].strterm);
17284 SET_LEX_STATE((yyvsp[-5].state));
17285 p->lex.brace_nest = (yyvsp[-3].num);
17286 p->heredoc_indent = (yyvsp[-2].num);
17287 p->heredoc_line_indent = -1;
17288 if ((yyvsp[-1].node)) nd_unset_fl_newline((yyvsp[-1].node));
17289 (yyval.node) = new_evstr(p, (yyvsp[-1].node), &(yyloc), &(yylsp[-5]), &(yylsp[0]));
17290 /*% ripper: string_embexpr!($:compstmt) %*/
17291 }
17292#line 17293 "parse.c"
17293 break;
17294
17295 case 682: /* string_dvar: nonlocal_var */
17296#line 6112 "parse.y"
17297 {
17298 if (!((yyval.node) = gettable(p, (yyvsp[0].id), &(yyloc)))) (yyval.node) = NEW_ERROR(&(yyloc));
17299 /*% ripper: var_ref!($:1) %*/
17300 }
17301#line 17302 "parse.c"
17302 break;
17303
17304 case 686: /* ssym: "symbol literal" sym */
17305#line 6124 "parse.y"
17306 {
17307 SET_LEX_STATE(EXPR_END);
17308 VALUE str = rb_id2str((yyvsp[0].id));
17309 /*
17310 * TODO:
17311 * set_yylval_noname sets invalid id to yylval.
17312 * This branch can be removed once yylval is changed to
17313 * hold lexed string.
17314 */
17315 if (!str) str = STR_NEW0();
17316 (yyval.node) = NEW_SYM(str, &(yyloc));
17317 /*% ripper: symbol_literal!(symbol!($:2)) %*/
17318 }
17319#line 17320 "parse.c"
17320 break;
17321
17322 case 689: /* dsym: "symbol literal" string_contents "terminator" */
17323#line 6144 "parse.y"
17324 {
17325 SET_LEX_STATE(EXPR_END);
17326 (yyval.node) = dsym_node(p, (yyvsp[-1].node), &(yyloc));
17327 /*% ripper: dyna_symbol!($:2) %*/
17328 }
17329#line 17330 "parse.c"
17330 break;
17331
17332 case 691: /* numeric: tUMINUS_NUM simple_numeric */
17333#line 6153 "parse.y"
17334 {
17335 (yyval.node) = (yyvsp[0].node);
17336 negate_lit(p, (yyval.node), &(yyloc));
17337 /*% ripper: unary!(ID2VAL(idUMinus), $:2) %*/
17338 }
17339#line 17340 "parse.c"
17340 break;
17341
17342 case 702: /* keyword_variable: "'nil'" */
17343#line 6175 "parse.y"
17344 {(yyval.id) = KWD2EID(nil, (yyvsp[0].id));}
17345#line 17346 "parse.c"
17346 break;
17347
17348 case 703: /* keyword_variable: "'self'" */
17349#line 6176 "parse.y"
17350 {(yyval.id) = KWD2EID(self, (yyvsp[0].id));}
17351#line 17352 "parse.c"
17352 break;
17353
17354 case 704: /* keyword_variable: "'true'" */
17355#line 6177 "parse.y"
17356 {(yyval.id) = KWD2EID(true, (yyvsp[0].id));}
17357#line 17358 "parse.c"
17358 break;
17359
17360 case 705: /* keyword_variable: "'false'" */
17361#line 6178 "parse.y"
17362 {(yyval.id) = KWD2EID(false, (yyvsp[0].id));}
17363#line 17364 "parse.c"
17364 break;
17365
17366 case 706: /* keyword_variable: "'__FILE__'" */
17367#line 6179 "parse.y"
17368 {(yyval.id) = KWD2EID(_FILE__, (yyvsp[0].id));}
17369#line 17370 "parse.c"
17370 break;
17371
17372 case 707: /* keyword_variable: "'__LINE__'" */
17373#line 6180 "parse.y"
17374 {(yyval.id) = KWD2EID(_LINE__, (yyvsp[0].id));}
17375#line 17376 "parse.c"
17376 break;
17377
17378 case 708: /* keyword_variable: "'__ENCODING__'" */
17379#line 6181 "parse.y"
17380 {(yyval.id) = KWD2EID(_ENCODING__, (yyvsp[0].id));}
17381#line 17382 "parse.c"
17382 break;
17383
17384 case 709: /* var_ref: user_variable */
17385#line 6185 "parse.y"
17386 {
17387 if (!((yyval.node) = gettable(p, (yyvsp[0].id), &(yyloc)))) (yyval.node) = NEW_ERROR(&(yyloc));
17388 if (ifdef_ripper(id_is_var(p, (yyvsp[0].id)), false)) {
17389 /*% ripper: var_ref!($:1) %*/
17390 }
17391 else {
17392 /*% ripper: vcall!($:1) %*/
17393 }
17394 }
17395#line 17396 "parse.c"
17396 break;
17397
17398 case 710: /* var_ref: keyword_variable */
17399#line 6195 "parse.y"
17400 {
17401 if (!((yyval.node) = gettable(p, (yyvsp[0].id), &(yyloc)))) (yyval.node) = NEW_ERROR(&(yyloc));
17402 /*% ripper: var_ref!($:1) %*/
17403 }
17404#line 17405 "parse.c"
17405 break;
17406
17407 case 711: /* var_lhs: user_variable */
17408#line 6202 "parse.y"
17409 {
17410 /*% ripper: var_field!($:1) %*/
17411 (yyval.node) = assignable(p, (yyvsp[0].id), 0, &(yyloc));
17412 }
17413#line 17414 "parse.c"
17414 break;
17415
17416 case 712: /* var_lhs: keyword_variable */
17417#line 6202 "parse.y"
17418 {
17419 /*% ripper: var_field!($:1) %*/
17420 (yyval.node) = assignable(p, (yyvsp[0].id), 0, &(yyloc));
17421 }
17422#line 17423 "parse.c"
17423 break;
17424
17425 case 715: /* $@38: %empty */
17426#line 6213 "parse.y"
17427 {
17428 SET_LEX_STATE(EXPR_BEG);
17429 p->command_start = TRUE;
17430 }
17431#line 17432 "parse.c"
17432 break;
17433
17434 case 716: /* superclass: '<' $@38 expr_value term */
17435#line 6218 "parse.y"
17436 {
17437 (yyval.node) = (yyvsp[-1].node);
17438 /*% ripper: $:3 %*/
17439 }
17440#line 17441 "parse.c"
17441 break;
17442
17443 case 719: /* f_opt_paren_args: f_empty_arg */
17444#line 6227 "parse.y"
17445 {
17446 p->ctxt.in_argdef = 0;
17447 }
17448#line 17449 "parse.c"
17449 break;
17450
17451 case 720: /* f_empty_arg: %empty */
17452#line 6233 "parse.y"
17453 {
17454 (yyval.node_args) = new_empty_args_tail(p, &(yyloc));
17455 (yyval.node_args) = new_args(p, 0, 0, 0, 0, (yyval.node_args), &(yyloc));
17456 /*% ripper: params!(Qnil, Qnil, Qnil, Qnil, Qnil, Qnil, Qnil) %*/
17457 }
17458#line 17459 "parse.c"
17459 break;
17460
17461 case 721: /* f_paren_args: '(' f_args rparen */
17462#line 6241 "parse.y"
17463 {
17464 (yyval.node_args) = (yyvsp[-1].node_args);
17465 /*% ripper: paren!($:2) %*/
17466 SET_LEX_STATE(EXPR_BEG);
17467 p->command_start = TRUE;
17468 p->ctxt.in_argdef = 0;
17469 }
17470#line 17471 "parse.c"
17471 break;
17472
17473 case 723: /* @39: %empty */
17474#line 6251 "parse.y"
17475 {
17476 (yyval.ctxt) = p->ctxt;
17477 p->ctxt.in_kwarg = 1;
17478 p->ctxt.in_argdef = 1;
17479 SET_LEX_STATE(p->lex.state|EXPR_LABEL); /* force for args */
17480 }
17481#line 17482 "parse.c"
17482 break;
17483
17484 case 724: /* f_arglist: @39 f_args term */
17485#line 6258 "parse.y"
17486 {
17487 p->ctxt.in_kwarg = (yyvsp[-2].ctxt).in_kwarg;
17488 p->ctxt.in_argdef = 0;
17489 (yyval.node_args) = (yyvsp[-1].node_args);
17490 SET_LEX_STATE(EXPR_BEG);
17491 p->command_start = TRUE;
17492 /*% ripper: $:2 %*/
17493 }
17494#line 17495 "parse.c"
17495 break;
17496
17497 case 725: /* f_kw_arg_value: f_label arg_value */
17498#line 3032 "parse.y"
17499 {
17500 p->ctxt.in_argdef = 1;
17501 (yyval.node_kw_arg) = new_kw_arg(p, assignable(p, (yyvsp[-1].id), (yyvsp[0].node), &(yyloc)), &(yyloc));
17502 /*% ripper: [$:$, $:value] %*/
17503 }
17504#line 17505 "parse.c"
17505 break;
17506
17507 case 726: /* f_kw_arg_value: f_label */
17508#line 3038 "parse.y"
17509 {
17510 p->ctxt.in_argdef = 1;
17511 (yyval.node_kw_arg) = new_kw_arg(p, assignable(p, (yyvsp[0].id), NODE_SPECIAL_REQUIRED_KEYWORD, &(yyloc)), &(yyloc));
17512 /*% ripper: [$:$, 0] %*/
17513 }
17514#line 17515 "parse.c"
17515 break;
17516
17517 case 727: /* f_kwarg_arg_value: f_kw_arg_value */
17518#line 3047 "parse.y"
17519 {
17520 (yyval.node_kw_arg) = (yyvsp[0].node_kw_arg);
17521 /*% ripper: rb_ary_new3(1, $:1) %*/
17522 }
17523#line 17524 "parse.c"
17524 break;
17525
17526 case 728: /* f_kwarg_arg_value: f_kwarg_arg_value ',' f_kw_arg_value */
17527#line 3052 "parse.y"
17528 {
17529 (yyval.node_kw_arg) = kwd_append((yyvsp[-2].node_kw_arg), (yyvsp[0].node_kw_arg));
17530 /*% ripper: rb_ary_push($:1, $:3) %*/
17531 }
17532#line 17533 "parse.c"
17533 break;
17534
17535 case 729: /* opt_f_block_arg_opt_comma: ',' f_block_arg */
17536#line 2969 "parse.y"
17537 {
17538 (yyval.id) = (yyvsp[0].id);
17539 /*% ripper: $:2 %*/
17540 }
17541#line 17542 "parse.c"
17542 break;
17543
17544 case 731: /* args_tail_basic_arg_value_opt_comma: f_kwarg_arg_value ',' f_kwrest opt_f_block_arg_opt_comma */
17545#line 2946 "parse.y"
17546 {
17547 (yyval.node_args) = new_args_tail(p, (yyvsp[-3].node_kw_arg), (yyvsp[-1].id), (yyvsp[0].id), &(yylsp[-1]));
17548 /*% ripper: [$:1, $:3, $:4] %*/
17549 }
17550#line 17551 "parse.c"
17551 break;
17552
17553 case 732: /* args_tail_basic_arg_value_opt_comma: f_kwarg_arg_value opt_f_block_arg_opt_comma */
17554#line 2951 "parse.y"
17555 {
17556 (yyval.node_args) = new_args_tail(p, (yyvsp[-1].node_kw_arg), 0, (yyvsp[0].id), &(yylsp[-1]));
17557 /*% ripper: [$:1, Qnil, $:2] %*/
17558 }
17559#line 17560 "parse.c"
17560 break;
17561
17562 case 733: /* args_tail_basic_arg_value_opt_comma: f_any_kwrest opt_f_block_arg_opt_comma */
17563#line 2956 "parse.y"
17564 {
17565 (yyval.node_args) = new_args_tail(p, 0, (yyvsp[-1].id), (yyvsp[0].id), &(yylsp[-1]));
17566 /*% ripper: [Qnil, $:1, $:2] %*/
17567 }
17568#line 17569 "parse.c"
17569 break;
17570
17571 case 734: /* args_tail_basic_arg_value_opt_comma: f_block_arg */
17572#line 2961 "parse.y"
17573 {
17574 (yyval.node_args) = new_args_tail(p, 0, 0, (yyvsp[0].id), &(yylsp[0]));
17575 /*% ripper: [Qnil, Qnil, $:1] %*/
17576 }
17577#line 17578 "parse.c"
17578 break;
17579
17580 case 736: /* args_tail: args_forward */
17581#line 6270 "parse.y"
17582 {
17583 add_forwarding_args(p);
17584 (yyval.node_args) = new_args_tail(p, 0, (yyvsp[0].id), arg_FWD_BLOCK, &(yylsp[0]));
17585 (yyval.node_args)->nd_ainfo.forwarding = 1;
17586 /*% ripper: [Qnil, $:args_forward, Qnil] %*/
17587 }
17588#line 17589 "parse.c"
17589 break;
17590
17591 case 737: /* args_tail_basic_arg_value_none: f_kwarg_arg_value ',' f_kwrest opt_f_block_arg_none */
17592#line 2946 "parse.y"
17593 {
17594 (yyval.node_args) = new_args_tail(p, (yyvsp[-3].node_kw_arg), (yyvsp[-1].id), (yyvsp[0].id), &(yylsp[-1]));
17595 /*% ripper: [$:1, $:3, $:4] %*/
17596 }
17597#line 17598 "parse.c"
17598 break;
17599
17600 case 738: /* args_tail_basic_arg_value_none: f_kwarg_arg_value opt_f_block_arg_none */
17601#line 2951 "parse.y"
17602 {
17603 (yyval.node_args) = new_args_tail(p, (yyvsp[-1].node_kw_arg), 0, (yyvsp[0].id), &(yylsp[-1]));
17604 /*% ripper: [$:1, Qnil, $:2] %*/
17605 }
17606#line 17607 "parse.c"
17607 break;
17608
17609 case 739: /* args_tail_basic_arg_value_none: f_any_kwrest opt_f_block_arg_none */
17610#line 2956 "parse.y"
17611 {
17612 (yyval.node_args) = new_args_tail(p, 0, (yyvsp[-1].id), (yyvsp[0].id), &(yylsp[-1]));
17613 /*% ripper: [Qnil, $:1, $:2] %*/
17614 }
17615#line 17616 "parse.c"
17616 break;
17617
17618 case 740: /* args_tail_basic_arg_value_none: f_block_arg */
17619#line 2961 "parse.y"
17620 {
17621 (yyval.node_args) = new_args_tail(p, 0, 0, (yyvsp[0].id), &(yylsp[0]));
17622 /*% ripper: [Qnil, Qnil, $:1] %*/
17623 }
17624#line 17625 "parse.c"
17625 break;
17626
17627 case 742: /* largs_tail: args_forward */
17628#line 6280 "parse.y"
17629 {
17630 yyerror1(&(yylsp[0]), "unexpected ... in lambda argument");
17631 (yyval.node_args) = new_args_tail(p, 0, 0, 0, &(yylsp[0]));
17632 (yyval.node_args)->nd_ainfo.forwarding = 1;
17633 /*% ripper: [Qnil, $:args_forward, Qnil] %*/
17634 }
17635#line 17636 "parse.c"
17636 break;
17637
17638 case 743: /* f_opt_arg_value: f_arg_asgn f_eq arg_value */
17639#line 3010 "parse.y"
17640 {
17641 p->ctxt.in_argdef = 1;
17642 (yyval.node_opt_arg) = NEW_OPT_ARG(assignable(p, (yyvsp[-2].id), (yyvsp[0].node), &(yyloc)), &(yyloc));
17643 /*% ripper: [$:$, $:3] %*/
17644 }
17645#line 17646 "parse.c"
17646 break;
17647
17648 case 744: /* f_opt_arg_arg_value: f_opt_arg_value */
17649#line 3019 "parse.y"
17650 {
17651 (yyval.node_opt_arg) = (yyvsp[0].node_opt_arg);
17652 /*% ripper: rb_ary_new3(1, $:1) %*/
17653 }
17654#line 17655 "parse.c"
17655 break;
17656
17657 case 745: /* f_opt_arg_arg_value: f_opt_arg_arg_value ',' f_opt_arg_value */
17658#line 3024 "parse.y"
17659 {
17660 (yyval.node_opt_arg) = opt_arg_append((yyvsp[-2].node_opt_arg), (yyvsp[0].node_opt_arg));
17661 /*% ripper: rb_ary_push($:1, $:3) %*/
17662 }
17663#line 17664 "parse.c"
17664 break;
17665
17666 case 746: /* opt_args_tail_args_tail_opt_comma: ',' args_tail */
17667#line 3119 "parse.y"
17668 {
17669 (yyval.node_args) = (yyvsp[0].node_args);
17670 /*% ripper: $:tail %*/
17671 }
17672#line 17673 "parse.c"
17673 break;
17674
17675 case 747: /* opt_args_tail_args_tail_opt_comma: opt_comma */
17676#line 3124 "parse.y"
17677 {
17678 (yyval.node_args) = new_empty_args_tail(p, &(yyloc));
17679 /*% ripper: [Qnil, Qnil, Qnil] %*/
17680 }
17681#line 17682 "parse.c"
17682 break;
17683
17684 case 748: /* args-list_arg_value_opt_args_tail_args_tail_opt_comma: f_arg ',' f_opt_arg_arg_value ',' f_rest_arg opt_args_tail_args_tail_opt_comma */
17685#line 6290 "parse.y"
17686 {
17687 (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));
17688 /*% ripper: params!($:pre, $:opt, $:rest, Qnil, *$:tail[0..2]) %*/
17689 }
17690#line 17691 "parse.c"
17691 break;
17692
17693 case 749: /* args-list_arg_value_opt_args_tail_args_tail_opt_comma: f_arg ',' f_opt_arg_arg_value ',' f_rest_arg ',' f_arg opt_args_tail_args_tail_opt_comma */
17694#line 6295 "parse.y"
17695 {
17696 (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));
17697 /*% ripper: params!($:pre, $:opt, $:rest, $:post, *$:tail[0..2]) %*/
17698 }
17699#line 17700 "parse.c"
17700 break;
17701
17702 case 750: /* args-list_arg_value_opt_args_tail_args_tail_opt_comma: f_arg ',' f_opt_arg_arg_value opt_args_tail_args_tail_opt_comma */
17703#line 6300 "parse.y"
17704 {
17705 (yyval.node_args) = new_args(p, (yyvsp[-3].node_args_aux), (yyvsp[-1].node_opt_arg), 0, 0, (yyvsp[0].node_args), &(yyloc));
17706 /*% ripper: params!($:pre, $:opt, Qnil, Qnil, *$:tail[0..2]) %*/
17707 }
17708#line 17709 "parse.c"
17709 break;
17710
17711 case 751: /* args-list_arg_value_opt_args_tail_args_tail_opt_comma: f_arg ',' f_opt_arg_arg_value ',' f_arg opt_args_tail_args_tail_opt_comma */
17712#line 6305 "parse.y"
17713 {
17714 (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));
17715 /*% ripper: params!($:pre, $:opt, Qnil, $:post, *$:tail[0..2]) %*/
17716 }
17717#line 17718 "parse.c"
17718 break;
17719
17720 case 752: /* args-list_arg_value_opt_args_tail_args_tail_opt_comma: f_arg ',' f_rest_arg opt_args_tail_args_tail_opt_comma */
17721#line 6310 "parse.y"
17722 {
17723 (yyval.node_args) = new_args(p, (yyvsp[-3].node_args_aux), 0, (yyvsp[-1].id), 0, (yyvsp[0].node_args), &(yyloc));
17724 /*% ripper: params!($:pre, Qnil, $:rest, Qnil, *$:tail[0..2]) %*/
17725 }
17726#line 17727 "parse.c"
17727 break;
17728
17729 case 753: /* args-list_arg_value_opt_args_tail_args_tail_opt_comma: f_arg ',' f_rest_arg ',' f_arg opt_args_tail_args_tail_opt_comma */
17730#line 6315 "parse.y"
17731 {
17732 (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));
17733 /*% ripper: params!($:pre, Qnil, $:rest, $:post, *$:tail[0..2]) %*/
17734 }
17735#line 17736 "parse.c"
17736 break;
17737
17738 case 754: /* args-list_arg_value_opt_args_tail_args_tail_opt_comma: f_opt_arg_arg_value ',' f_rest_arg opt_args_tail_args_tail_opt_comma */
17739#line 6320 "parse.y"
17740 {
17741 (yyval.node_args) = new_args(p, 0, (yyvsp[-3].node_opt_arg), (yyvsp[-1].id), 0, (yyvsp[0].node_args), &(yyloc));
17742 /*% ripper: params!(Qnil, $:opt, $:rest, Qnil, *$:tail[0..2]) %*/
17743 }
17744#line 17745 "parse.c"
17745 break;
17746
17747 case 755: /* args-list_arg_value_opt_args_tail_args_tail_opt_comma: f_opt_arg_arg_value ',' f_rest_arg ',' f_arg opt_args_tail_args_tail_opt_comma */
17748#line 6325 "parse.y"
17749 {
17750 (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));
17751 /*% ripper: params!(Qnil, $:opt, $:rest, $:post, *$:tail[0..2]) %*/
17752 }
17753#line 17754 "parse.c"
17754 break;
17755
17756 case 756: /* args-list_arg_value_opt_args_tail_args_tail_opt_comma: f_opt_arg_arg_value opt_args_tail_args_tail_opt_comma */
17757#line 6330 "parse.y"
17758 {
17759 (yyval.node_args) = new_args(p, 0, (yyvsp[-1].node_opt_arg), 0, 0, (yyvsp[0].node_args), &(yyloc));
17760 /*% ripper: params!(Qnil, $:opt, Qnil, Qnil, *$:tail[0..2]) %*/
17761 }
17762#line 17763 "parse.c"
17763 break;
17764
17765 case 757: /* args-list_arg_value_opt_args_tail_args_tail_opt_comma: f_opt_arg_arg_value ',' f_arg opt_args_tail_args_tail_opt_comma */
17766#line 6335 "parse.y"
17767 {
17768 (yyval.node_args) = new_args(p, 0, (yyvsp[-3].node_opt_arg), 0, (yyvsp[-1].node_args_aux), (yyvsp[0].node_args), &(yyloc));
17769 /*% ripper: params!(Qnil, $:opt, Qnil, $:post, *$:tail[0..2]) %*/
17770 }
17771#line 17772 "parse.c"
17772 break;
17773
17774 case 758: /* args-list_arg_value_opt_args_tail_args_tail_opt_comma: f_rest_arg opt_args_tail_args_tail_opt_comma */
17775#line 6340 "parse.y"
17776 {
17777 (yyval.node_args) = new_args(p, 0, 0, (yyvsp[-1].id), 0, (yyvsp[0].node_args), &(yyloc));
17778 /*% ripper: params!(Qnil, Qnil, $:rest, Qnil, *$:tail[0..2]) %*/
17779 }
17780#line 17781 "parse.c"
17781 break;
17782
17783 case 759: /* args-list_arg_value_opt_args_tail_args_tail_opt_comma: f_rest_arg ',' f_arg opt_args_tail_args_tail_opt_comma */
17784#line 6345 "parse.y"
17785 {
17786 (yyval.node_args) = new_args(p, 0, 0, (yyvsp[-3].id), (yyvsp[-1].node_args_aux), (yyvsp[0].node_args), &(yyloc));
17787 /*% ripper: params!(Qnil, Qnil, $:rest, $:post, *$:tail[0..2]) %*/
17788 }
17789#line 17790 "parse.c"
17790 break;
17791
17792 case 761: /* f_args-list_args_tail_opt_comma: f_arg opt_args_tail_args_tail_opt_comma */
17793#line 6362 "parse.y"
17794 {
17795 (yyval.node_args) = new_args(p, (yyvsp[-1].node_args_aux), 0, 0, 0, (yyvsp[0].node_args), &(yyloc));
17796 /*% ripper: params!($:pre, Qnil, Qnil, Qnil, *$:tail[0..2]) %*/
17797 }
17798#line 17799 "parse.c"
17799 break;
17800
17801 case 762: /* tail-only-args_args_tail: args_tail */
17802#line 6353 "parse.y"
17803 {
17804 (yyval.node_args) = new_args(p, 0, 0, 0, 0, (yyvsp[0].node_args), &(yyloc));
17805 /*% ripper: params!(Qnil, Qnil, Qnil, Qnil, *$:tail[0..2]) %*/
17806 }
17807#line 17808 "parse.c"
17808 break;
17809
17810 case 766: /* opt_args_tail_largs_tail_none: ',' largs_tail */
17811#line 3119 "parse.y"
17812 {
17813 (yyval.node_args) = (yyvsp[0].node_args);
17814 /*% ripper: $:tail %*/
17815 }
17816#line 17817 "parse.c"
17817 break;
17818
17819 case 767: /* opt_args_tail_largs_tail_none: none */
17820#line 3124 "parse.y"
17821 {
17822 (yyval.node_args) = new_empty_args_tail(p, &(yyloc));
17823 /*% ripper: [Qnil, Qnil, Qnil] %*/
17824 }
17825#line 17826 "parse.c"
17826 break;
17827
17828 case 768: /* args-list_arg_value_opt_args_tail_largs_tail_none: f_arg ',' f_opt_arg_arg_value ',' f_rest_arg opt_args_tail_largs_tail_none */
17829#line 6290 "parse.y"
17830 {
17831 (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));
17832 /*% ripper: params!($:pre, $:opt, $:rest, Qnil, *$:tail[0..2]) %*/
17833 }
17834#line 17835 "parse.c"
17835 break;
17836
17837 case 769: /* args-list_arg_value_opt_args_tail_largs_tail_none: f_arg ',' f_opt_arg_arg_value ',' f_rest_arg ',' f_arg opt_args_tail_largs_tail_none */
17838#line 6295 "parse.y"
17839 {
17840 (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));
17841 /*% ripper: params!($:pre, $:opt, $:rest, $:post, *$:tail[0..2]) %*/
17842 }
17843#line 17844 "parse.c"
17844 break;
17845
17846 case 770: /* args-list_arg_value_opt_args_tail_largs_tail_none: f_arg ',' f_opt_arg_arg_value opt_args_tail_largs_tail_none */
17847#line 6300 "parse.y"
17848 {
17849 (yyval.node_args) = new_args(p, (yyvsp[-3].node_args_aux), (yyvsp[-1].node_opt_arg), 0, 0, (yyvsp[0].node_args), &(yyloc));
17850 /*% ripper: params!($:pre, $:opt, Qnil, Qnil, *$:tail[0..2]) %*/
17851 }
17852#line 17853 "parse.c"
17853 break;
17854
17855 case 771: /* args-list_arg_value_opt_args_tail_largs_tail_none: f_arg ',' f_opt_arg_arg_value ',' f_arg opt_args_tail_largs_tail_none */
17856#line 6305 "parse.y"
17857 {
17858 (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));
17859 /*% ripper: params!($:pre, $:opt, Qnil, $:post, *$:tail[0..2]) %*/
17860 }
17861#line 17862 "parse.c"
17862 break;
17863
17864 case 772: /* args-list_arg_value_opt_args_tail_largs_tail_none: f_arg ',' f_rest_arg opt_args_tail_largs_tail_none */
17865#line 6310 "parse.y"
17866 {
17867 (yyval.node_args) = new_args(p, (yyvsp[-3].node_args_aux), 0, (yyvsp[-1].id), 0, (yyvsp[0].node_args), &(yyloc));
17868 /*% ripper: params!($:pre, Qnil, $:rest, Qnil, *$:tail[0..2]) %*/
17869 }
17870#line 17871 "parse.c"
17871 break;
17872
17873 case 773: /* args-list_arg_value_opt_args_tail_largs_tail_none: f_arg ',' f_rest_arg ',' f_arg opt_args_tail_largs_tail_none */
17874#line 6315 "parse.y"
17875 {
17876 (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));
17877 /*% ripper: params!($:pre, Qnil, $:rest, $:post, *$:tail[0..2]) %*/
17878 }
17879#line 17880 "parse.c"
17880 break;
17881
17882 case 774: /* args-list_arg_value_opt_args_tail_largs_tail_none: f_opt_arg_arg_value ',' f_rest_arg opt_args_tail_largs_tail_none */
17883#line 6320 "parse.y"
17884 {
17885 (yyval.node_args) = new_args(p, 0, (yyvsp[-3].node_opt_arg), (yyvsp[-1].id), 0, (yyvsp[0].node_args), &(yyloc));
17886 /*% ripper: params!(Qnil, $:opt, $:rest, Qnil, *$:tail[0..2]) %*/
17887 }
17888#line 17889 "parse.c"
17889 break;
17890
17891 case 775: /* args-list_arg_value_opt_args_tail_largs_tail_none: f_opt_arg_arg_value ',' f_rest_arg ',' f_arg opt_args_tail_largs_tail_none */
17892#line 6325 "parse.y"
17893 {
17894 (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));
17895 /*% ripper: params!(Qnil, $:opt, $:rest, $:post, *$:tail[0..2]) %*/
17896 }
17897#line 17898 "parse.c"
17898 break;
17899
17900 case 776: /* args-list_arg_value_opt_args_tail_largs_tail_none: f_opt_arg_arg_value opt_args_tail_largs_tail_none */
17901#line 6330 "parse.y"
17902 {
17903 (yyval.node_args) = new_args(p, 0, (yyvsp[-1].node_opt_arg), 0, 0, (yyvsp[0].node_args), &(yyloc));
17904 /*% ripper: params!(Qnil, $:opt, Qnil, Qnil, *$:tail[0..2]) %*/
17905 }
17906#line 17907 "parse.c"
17907 break;
17908
17909 case 777: /* args-list_arg_value_opt_args_tail_largs_tail_none: f_opt_arg_arg_value ',' f_arg opt_args_tail_largs_tail_none */
17910#line 6335 "parse.y"
17911 {
17912 (yyval.node_args) = new_args(p, 0, (yyvsp[-3].node_opt_arg), 0, (yyvsp[-1].node_args_aux), (yyvsp[0].node_args), &(yyloc));
17913 /*% ripper: params!(Qnil, $:opt, Qnil, $:post, *$:tail[0..2]) %*/
17914 }
17915#line 17916 "parse.c"
17916 break;
17917
17918 case 778: /* args-list_arg_value_opt_args_tail_largs_tail_none: f_rest_arg opt_args_tail_largs_tail_none */
17919#line 6340 "parse.y"
17920 {
17921 (yyval.node_args) = new_args(p, 0, 0, (yyvsp[-1].id), 0, (yyvsp[0].node_args), &(yyloc));
17922 /*% ripper: params!(Qnil, Qnil, $:rest, Qnil, *$:tail[0..2]) %*/
17923 }
17924#line 17925 "parse.c"
17925 break;
17926
17927 case 779: /* args-list_arg_value_opt_args_tail_largs_tail_none: f_rest_arg ',' f_arg opt_args_tail_largs_tail_none */
17928#line 6345 "parse.y"
17929 {
17930 (yyval.node_args) = new_args(p, 0, 0, (yyvsp[-3].id), (yyvsp[-1].node_args_aux), (yyvsp[0].node_args), &(yyloc));
17931 /*% ripper: params!(Qnil, Qnil, $:rest, $:post, *$:tail[0..2]) %*/
17932 }
17933#line 17934 "parse.c"
17934 break;
17935
17936 case 781: /* f_args-list_largs_tail_none: f_arg opt_args_tail_largs_tail_none */
17937#line 6362 "parse.y"
17938 {
17939 (yyval.node_args) = new_args(p, (yyvsp[-1].node_args_aux), 0, 0, 0, (yyvsp[0].node_args), &(yyloc));
17940 /*% ripper: params!($:pre, Qnil, Qnil, Qnil, *$:tail[0..2]) %*/
17941 }
17942#line 17943 "parse.c"
17943 break;
17944
17945 case 782: /* tail-only-args_largs_tail: largs_tail */
17946#line 6353 "parse.y"
17947 {
17948 (yyval.node_args) = new_args(p, 0, 0, 0, 0, (yyvsp[0].node_args), &(yyloc));
17949 /*% ripper: params!(Qnil, Qnil, Qnil, Qnil, *$:tail[0..2]) %*/
17950 }
17951#line 17952 "parse.c"
17952 break;
17953
17954 case 786: /* args_forward: "(..." */
17955#line 6377 "parse.y"
17956 {
17957 (yyval.id) = idFWD_KWREST;
17958 /*% ripper: args_forward! %*/
17959 }
17960#line 17961 "parse.c"
17961 break;
17962
17963 case 787: /* f_bad_arg: "constant" */
17964#line 6384 "parse.y"
17965 {
17966 static const char mesg[] = "formal argument cannot be a constant";
17967 /*%%%*/
17968 yyerror1(&(yylsp[0]), mesg);
17969 /*% %*/
17970 (yyval.id) = 0;
17971 /*% ripper[error]: param_error!(ERR_MESG(), $:1) %*/
17972 }
17973#line 17974 "parse.c"
17974 break;
17975
17976 case 788: /* f_bad_arg: "instance variable" */
17977#line 6393 "parse.y"
17978 {
17979 static const char mesg[] = "formal argument cannot be an instance variable";
17980 /*%%%*/
17981 yyerror1(&(yylsp[0]), mesg);
17982 /*% %*/
17983 (yyval.id) = 0;
17984 /*% ripper[error]: param_error!(ERR_MESG(), $:1) %*/
17985 }
17986#line 17987 "parse.c"
17987 break;
17988
17989 case 789: /* f_bad_arg: "global variable" */
17990#line 6402 "parse.y"
17991 {
17992 static const char mesg[] = "formal argument cannot be a global variable";
17993 /*%%%*/
17994 yyerror1(&(yylsp[0]), mesg);
17995 /*% %*/
17996 (yyval.id) = 0;
17997 /*% ripper[error]: param_error!(ERR_MESG(), $:1) %*/
17998 }
17999#line 18000 "parse.c"
18000 break;
18001
18002 case 790: /* f_bad_arg: "class variable" */
18003#line 6411 "parse.y"
18004 {
18005 static const char mesg[] = "formal argument cannot be a class variable";
18006 /*%%%*/
18007 yyerror1(&(yylsp[0]), mesg);
18008 /*% %*/
18009 (yyval.id) = 0;
18010 /*% ripper[error]: param_error!(ERR_MESG(), $:1) %*/
18011 }
18012#line 18013 "parse.c"
18013 break;
18014
18015 case 792: /* f_norm_arg: "local variable or method" */
18016#line 6423 "parse.y"
18017 {
18018 VALUE e = formal_argument_error(p, (yyval.id) = (yyvsp[0].id));
18019 if (e) {
18020 /*% ripper[error]: param_error!(?e, $:1) %*/
18021 }
18022 p->max_numparam = ORDINAL_PARAM;
18023 }
18024#line 18025 "parse.c"
18025 break;
18026
18027 case 793: /* f_arg_asgn: f_norm_arg */
18028#line 6433 "parse.y"
18029 {
18030 arg_var(p, (yyvsp[0].id));
18031 (yyval.id) = (yyvsp[0].id);
18032 }
18033#line 18034 "parse.c"
18034 break;
18035
18036 case 794: /* f_arg_item: f_arg_asgn */
18037#line 6440 "parse.y"
18038 {
18039 (yyval.node_args_aux) = NEW_ARGS_AUX((yyvsp[0].id), 1, &NULL_LOC);
18040 /*% ripper: $:1 %*/
18041 }
18042#line 18043 "parse.c"
18043 break;
18044
18045 case 795: /* f_arg_item: "(" f_margs rparen */
18046#line 6445 "parse.y"
18047 {
18048 ID tid = internal_id(p);
18049 YYLTYPE loc;
18050 loc.beg_pos = (yylsp[-1]).beg_pos;
18051 loc.end_pos = (yylsp[-1]).beg_pos;
18052 arg_var(p, tid);
18053 if (dyna_in_block(p)) {
18054 (yyvsp[-1].node_masgn)->nd_value = NEW_DVAR(tid, &loc);
18055 }
18056 else {
18057 (yyvsp[-1].node_masgn)->nd_value = NEW_LVAR(tid, &loc);
18058 }
18059 (yyval.node_args_aux) = NEW_ARGS_AUX(tid, 1, &NULL_LOC);
18060 (yyval.node_args_aux)->nd_next = (NODE *)(yyvsp[-1].node_masgn);
18061 /*% ripper: mlhs_paren!($:2) %*/
18062 }
18063#line 18064 "parse.c"
18064 break;
18065
18066 case 797: /* f_arg: f_arg ',' f_arg_item */
18067#line 6466 "parse.y"
18068 {
18069 (yyval.node_args_aux) = (yyvsp[-2].node_args_aux);
18070 (yyval.node_args_aux)->nd_plen++;
18071 (yyval.node_args_aux)->nd_next = block_append(p, (yyval.node_args_aux)->nd_next, (yyvsp[0].node_args_aux)->nd_next);
18072 rb_discard_node(p, (NODE *)(yyvsp[0].node_args_aux));
18073 /*% ripper: rb_ary_push($:1, $:3) %*/
18074 }
18075#line 18076 "parse.c"
18076 break;
18077
18078 case 798: /* f_label: "label" */
18079#line 6477 "parse.y"
18080 {
18081 VALUE e = formal_argument_error(p, (yyval.id) = (yyvsp[0].id));
18082 if (e) {
18083 (yyval.id) = 0;
18084 /*% ripper[error]: param_error!(?e, $:1) %*/
18085 }
18086 /*
18087 * Workaround for Prism::ParseTest#test_filepath for
18088 * "unparser/corpus/literal/def.txt"
18089 *
18090 * See the discussion on https://github.com/ruby/ruby/pull/9923
18091 */
18092 arg_var(p, ifdef_ripper(0, (yyvsp[0].id)));
18093 /*% ripper: $:1 %*/
18094 p->max_numparam = ORDINAL_PARAM;
18095 p->ctxt.in_argdef = 0;
18096 }
18097#line 18098 "parse.c"
18098 break;
18099
18100 case 801: /* f_no_kwarg: p_kwnorest */
18101#line 6501 "parse.y"
18102 {
18103 /*% ripper: nokw_param!(Qnil) %*/
18104 }
18105#line 18106 "parse.c"
18106 break;
18107
18108 case 802: /* f_kwrest: kwrest_mark "local variable or method" */
18109#line 6507 "parse.y"
18110 {
18111 arg_var(p, shadowing_lvar(p, (yyvsp[0].id)));
18112 (yyval.id) = (yyvsp[0].id);
18113 /*% ripper: kwrest_param!($:2) %*/
18114 }
18115#line 18116 "parse.c"
18116 break;
18117
18118 case 803: /* f_kwrest: kwrest_mark */
18119#line 6513 "parse.y"
18120 {
18121 arg_var(p, idFWD_KWREST);
18122 (yyval.id) = idFWD_KWREST;
18123 /*% ripper: kwrest_param!(Qnil) %*/
18124 }
18125#line 18126 "parse.c"
18126 break;
18127
18128 case 806: /* f_rest_arg: restarg_mark "local variable or method" */
18129#line 6525 "parse.y"
18130 {
18131 arg_var(p, shadowing_lvar(p, (yyvsp[0].id)));
18132 (yyval.id) = (yyvsp[0].id);
18133 /*% ripper: rest_param!($:2) %*/
18134 }
18135#line 18136 "parse.c"
18136 break;
18137
18138 case 807: /* f_rest_arg: restarg_mark */
18139#line 6531 "parse.y"
18140 {
18141 arg_var(p, idFWD_REST);
18142 (yyval.id) = idFWD_REST;
18143 /*% ripper: rest_param!(Qnil) %*/
18144 }
18145#line 18146 "parse.c"
18146 break;
18147
18148 case 810: /* f_block_arg: blkarg_mark "local variable or method" */
18149#line 6543 "parse.y"
18150 {
18151 arg_var(p, shadowing_lvar(p, (yyvsp[0].id)));
18152 (yyval.id) = (yyvsp[0].id);
18153 /*% ripper: blockarg!($:2) %*/
18154 }
18155#line 18156 "parse.c"
18156 break;
18157
18158 case 811: /* f_block_arg: blkarg_mark "'nil'" */
18159#line 6549 "parse.y"
18160 {
18161 (yyval.id) = idNil;
18162 /*% ripper: blockarg!(ID2VAL(idNil)) %*/
18163 }
18164#line 18165 "parse.c"
18165 break;
18166
18167 case 812: /* f_block_arg: blkarg_mark */
18168#line 6554 "parse.y"
18169 {
18170 arg_var(p, idFWD_BLOCK);
18171 (yyval.id) = idFWD_BLOCK;
18172 /*% ripper: blockarg!(Qnil) %*/
18173 }
18174#line 18175 "parse.c"
18175 break;
18176
18177 case 815: /* opt_comma: option_',' */
18178#line 6562 "parse.y"
18179 {
18180 (yyval.id) = 0;
18181 /*% ripper: Qnil %*/
18182 }
18183#line 18184 "parse.c"
18184 break;
18185
18186 case 816: /* value_expr_singleton_expr: singleton_expr */
18187#line 3173 "parse.y"
18188 {
18189 value_expr(p, (yyvsp[0].node));
18190 (yyval.node) = (yyvsp[0].node);
18191 }
18192#line 18193 "parse.c"
18193 break;
18194
18195 case 817: /* singleton: value_expr_singleton_expr */
18196#line 6570 "parse.y"
18197 {
18198 NODE *expr = last_expr_node((yyvsp[0].node));
18199 switch (nd_type(expr)) {
18200 case NODE_STR:
18201 case NODE_DSTR:
18202 case NODE_XSTR:
18203 case NODE_DXSTR:
18204 case NODE_REGX:
18205 case NODE_DREGX:
18206 case NODE_SYM:
18207 case NODE_LINE:
18208 case NODE_FILE:
18209 case NODE_ENCODING:
18210 case NODE_INTEGER:
18211 case NODE_FLOAT:
18212 case NODE_RATIONAL:
18213 case NODE_IMAGINARY:
18214 case NODE_DSYM:
18215 case NODE_LIST:
18216 case NODE_ZLIST:
18217 yyerror1(&expr->nd_loc, "can't define singleton method for literals");
18218 break;
18219 default:
18220 break;
18221 }
18222 (yyval.node) = (yyvsp[0].node);
18223 }
18224#line 18225 "parse.c"
18225 break;
18226
18227 case 819: /* $@40: %empty */
18228#line 6601 "parse.y"
18229 {
18230 SET_LEX_STATE(EXPR_BEG);
18231 p->ctxt.in_argdef = 0;
18232 }
18233#line 18234 "parse.c"
18234 break;
18235
18236 case 820: /* singleton_expr: '(' $@40 expr rparen */
18237#line 6606 "parse.y"
18238 {
18239 p->ctxt.in_argdef = 1;
18240 (yyval.node) = (yyvsp[-1].node);
18241 /*% ripper: paren!($:3) %*/
18242 }
18243#line 18244 "parse.c"
18244 break;
18245
18246 case 822: /* assoc_list: assocs trailer */
18247#line 6615 "parse.y"
18248 {
18249 (yyval.node) = (yyvsp[-1].node);
18250 /*% ripper: assoclist_from_args!($:1) %*/
18251 }
18252#line 18253 "parse.c"
18253 break;
18254
18255 case 824: /* assocs: assocs ',' assoc */
18256#line 6624 "parse.y"
18257 {
18258 NODE *assocs = (yyvsp[-2].node);
18259 NODE *tail = (yyvsp[0].node);
18260 if (!assocs) {
18261 assocs = tail;
18262 }
18263 else if (tail) {
18264 if (RNODE_LIST(assocs)->nd_head) {
18265 NODE *n = RNODE_LIST(tail)->nd_next;
18266 if (!RNODE_LIST(tail)->nd_head && nd_type_p(n, NODE_LIST) &&
18267 nd_type_p((n = RNODE_LIST(n)->nd_head), NODE_HASH)) {
18268 /* DSTAR */
18269 tail = RNODE_HASH(n)->nd_head;
18270 }
18271 }
18272 if (tail) {
18273 assocs = list_concat(assocs, tail);
18274 }
18275 }
18276 (yyval.node) = assocs;
18277 /*% ripper: rb_ary_push($:1, $:3) %*/
18278 }
18279#line 18280 "parse.c"
18280 break;
18281
18282 case 825: /* assoc: arg_value "=>" arg_value */
18283#line 6649 "parse.y"
18284 {
18285 (yyval.node) = list_append(p, NEW_LIST((yyvsp[-2].node), &(yyloc)), (yyvsp[0].node));
18286 /*% ripper: assoc_new!($:1, $:3) %*/
18287 }
18288#line 18289 "parse.c"
18289 break;
18290
18291 case 826: /* assoc: "label" arg_value */
18292#line 6654 "parse.y"
18293 {
18294 (yyval.node) = list_append(p, NEW_LIST(NEW_SYM(rb_id2str((yyvsp[-1].id)), &(yylsp[-1])), &(yyloc)), (yyvsp[0].node));
18295 /*% ripper: assoc_new!($:1, $:2) %*/
18296 }
18297#line 18298 "parse.c"
18298 break;
18299
18300 case 827: /* assoc: "label" */
18301#line 6659 "parse.y"
18302 {
18303 NODE *val = gettable(p, (yyvsp[0].id), &(yyloc));
18304 if (!val) val = NEW_ERROR(&(yyloc));
18305 (yyval.node) = list_append(p, NEW_LIST(NEW_SYM(rb_id2str((yyvsp[0].id)), &(yylsp[0])), &(yyloc)), val);
18306 /*% ripper: assoc_new!($:1, Qnil) %*/
18307 }
18308#line 18309 "parse.c"
18309 break;
18310
18311 case 828: /* assoc: "string literal" string_contents tLABEL_END arg_value */
18312#line 6666 "parse.y"
18313 {
18314 YYLTYPE loc = code_loc_gen(&(yylsp[-3]), &(yylsp[-1]));
18315 (yyval.node) = list_append(p, NEW_LIST(dsym_node(p, (yyvsp[-2].node), &loc), &loc), (yyvsp[0].node));
18316 /*% ripper: assoc_new!(dyna_symbol!($:2), $:4) %*/
18317 }
18318#line 18319 "parse.c"
18319 break;
18320
18321 case 829: /* assoc: "**arg" arg_value */
18322#line 6672 "parse.y"
18323 {
18324 (yyval.node) = list_append(p, NEW_LIST(0, &(yyloc)), (yyvsp[0].node));
18325 /*% ripper: assoc_splat!($:2) %*/
18326 }
18327#line 18328 "parse.c"
18328 break;
18329
18330 case 830: /* assoc: "**arg" */
18331#line 6677 "parse.y"
18332 {
18333 forwarding_arg_check(p, idFWD_KWREST, idFWD_ALL, "keyword rest");
18334 (yyval.node) = list_append(p, NEW_LIST(0, &(yyloc)),
18335 NEW_LVAR(idFWD_KWREST, &(yyloc)));
18336 /*% ripper: assoc_splat!(Qnil) %*/
18337 }
18338#line 18339 "parse.c"
18339 break;
18340
18341 case 849: /* term: ';' */
18342#line 6724 "parse.y"
18343 {
18344 yyerrok;
18345 token_flush(p);
18346 if (p->ctxt.in_defined) {
18347 p->ctxt.has_trailing_semicolon = 1;
18348 }
18349 }
18350#line 18351 "parse.c"
18351 break;
18352
18353 case 850: /* term: '\n' */
18354#line 6732 "parse.y"
18355 {
18356 (yyloc).end_pos = (yyloc).beg_pos;
18357 token_flush(p);
18358 }
18359#line 18360 "parse.c"
18360 break;
18361
18362 case 852: /* terms: terms ';' */
18363#line 6739 "parse.y"
18364 {yyerrok;}
18365#line 18366 "parse.c"
18366 break;
18367
18368 case 853: /* none: %empty */
18369#line 6743 "parse.y"
18370 {
18371 (yyval.node) = 0;
18372 /*% ripper: Qnil %*/
18373 }
18374#line 18375 "parse.c"
18375 break;
18376
18377
18378#line 18379 "parse.c"
18379
18380 default: break;
18381 }
18382 /* User semantic actions sometimes alter yychar, and that requires
18383 that yytoken be updated with the new translation. We take the
18384 approach of translating immediately before every use of yytoken.
18385 One alternative is translating here after every semantic action,
18386 but that translation would be missed if the semantic action invokes
18387 YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or
18388 if it invokes YYBACKUP. In the case of YYABORT or YYACCEPT, an
18389 incorrect destructor might then be invoked immediately. In the
18390 case of YYERROR or YYBACKUP, subsequent parser actions might lead
18391 to an incorrect destructor call or verbose syntax error message
18392 before the lookahead is translated. */
18393 YY_SYMBOL_PRINT ("-> $$ =", YY_CAST (yysymbol_kind_t, yyr1[yyn]), &yyval, &yyloc, p);
18394
18395 YYPOPSTACK (yylen);
18396 /* %after-reduce function. */
18397#line 2685 "parse.y"
18398 {after_reduce(yylen, p);}
18399#line 18400 "parse.c"
18400
18401 yylen = 0;
18402
18403 *++yyvsp = yyval;
18404 *++yylsp = yyloc;
18405
18406 /* Now 'shift' the result of the reduction. Determine what state
18407 that goes to, based on the state we popped back to and the rule
18408 number reduced by. */
18409 {
18410 const int yylhs = yyr1[yyn] - YYNTOKENS;
18411 const int yyi = yypgoto[yylhs] + *yyssp;
18412 yystate = (0 <= yyi && yyi <= YYLAST && yycheck[yyi] == *yyssp
18413 ? yytable[yyi]
18414 : yydefgoto[yylhs]);
18415 }
18416
18417 goto yynewstate;
18418
18419
18420/*--------------------------------------.
18421| yyerrlab -- here on detecting error. |
18422`--------------------------------------*/
18423yyerrlab:
18424 /* Make sure we have latest lookahead translation. See comments at
18425 user semantic actions for why this is necessary. */
18426 yytoken = yychar == YYEMPTY ? YYSYMBOL_YYEMPTY : YYTRANSLATE (yychar);
18427 /* If not already recovering from an error, report this error. */
18428 if (!yyerrstatus)
18429 {
18430 ++yynerrs;
18431 {
18432 yypcontext_t yyctx
18433 = {yyssp, yytoken, &yylloc};
18434 char const *yymsgp = YY_("syntax error");
18435 int yysyntax_error_status;
18436 yysyntax_error_status = yysyntax_error (&yymsg_alloc, &yymsg, &yyctx, p);
18437 if (yysyntax_error_status == 0)
18438 yymsgp = yymsg;
18439 else if (yysyntax_error_status == -1)
18440 {
18441 if (yymsg != yymsgbuf)
18442 YYSTACK_FREE (yymsg);
18443 yymsg = YY_CAST (char *,
18444 YYSTACK_ALLOC (YY_CAST (YYSIZE_T, yymsg_alloc)));
18445 if (yymsg)
18446 {
18447 yysyntax_error_status
18448 = yysyntax_error (&yymsg_alloc, &yymsg, &yyctx, p);
18449 yymsgp = yymsg;
18450 }
18451 else
18452 {
18453 yymsg = yymsgbuf;
18454 yymsg_alloc = sizeof yymsgbuf;
18455 yysyntax_error_status = YYENOMEM;
18456 }
18457 }
18458 yyerror (&yylloc, p, yymsgp);
18459 if (yysyntax_error_status == YYENOMEM)
18460 YYNOMEM;
18461 }
18462 }
18463
18464 yyerror_range[1] = yylloc;
18465 if (yyerrstatus == 3)
18466 {
18467 /* If just tried and failed to reuse lookahead token after an
18468 error, discard it. */
18469
18470 if (yychar <= END_OF_INPUT)
18471 {
18472 /* Return failure if at end of input. */
18473 if (yychar == END_OF_INPUT)
18474 YYABORT;
18475 }
18476 else
18477 {
18478 yydestruct ("Error: discarding",
18479 yytoken, &yylval, &yylloc, p);
18480 yychar = YYEMPTY;
18481 }
18482 }
18483
18484 /* Else will try to reuse lookahead token after shifting the error
18485 token. */
18486 goto yyerrlab1;
18487
18488
18489/*---------------------------------------------------.
18490| yyerrorlab -- error raised explicitly by YYERROR. |
18491`---------------------------------------------------*/
18492yyerrorlab:
18493 /* Pacify compilers when the user code never invokes YYERROR and the
18494 label yyerrorlab therefore never appears in user code. */
18495 if (0)
18496 YYERROR;
18497 ++yynerrs;
18498
18499 /* Do not reclaim the symbols of the rule whose action triggered
18500 this YYERROR. */
18501 YYPOPSTACK (yylen);
18502 /* %after-pop-stack function. */
18503#line 2687 "parse.y"
18504 {after_pop_stack(yylen, p);}
18505#line 18506 "parse.c"
18506
18507 yylen = 0;
18508 YY_STACK_PRINT (yyss, yyssp, p);
18509 yystate = *yyssp;
18510 goto yyerrlab1;
18511
18512
18513/*-------------------------------------------------------------.
18514| yyerrlab1 -- common code for both syntax error and YYERROR. |
18515`-------------------------------------------------------------*/
18516yyerrlab1:
18517 yyerrstatus = 3; /* Each real token shifted decrements this. */
18518
18519 /* Pop stack until we find a state that shifts the error token. */
18520 for (;;)
18521 {
18522 yyn = yypact[yystate];
18523 if (!yypact_value_is_default (yyn))
18524 {
18525 yyn += YYSYMBOL_YYerror;
18526 if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror)
18527 {
18528 yyn = yytable[yyn];
18529 if (0 < yyn)
18530 break;
18531 }
18532 }
18533
18534 /* Pop the current state because it cannot handle the error token. */
18535 if (yyssp == yyss)
18536 YYABORT;
18537
18538 yyerror_range[1] = *yylsp;
18539 yydestruct ("Error: popping",
18540 YY_ACCESSING_SYMBOL (yystate), yyvsp, yylsp, p);
18541 YYPOPSTACK (1);
18542 /* %after-pop-stack function. */
18543#line 2687 "parse.y"
18544 {after_pop_stack(1, p);}
18545#line 18546 "parse.c"
18546
18547 yystate = *yyssp;
18548 YY_STACK_PRINT (yyss, yyssp, p);
18549 }
18550
18551 YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
18552 *++yyvsp = yylval;
18553 YY_IGNORE_MAYBE_UNINITIALIZED_END
18554
18555 yyerror_range[2] = yylloc;
18556 ++yylsp;
18557 YYLLOC_DEFAULT (*yylsp, yyerror_range, 2);
18558
18559 /* Shift the error token. */
18560 YY_SYMBOL_PRINT ("Shifting", YY_ACCESSING_SYMBOL (yyn), yyvsp, yylsp, p);
18561 /* %after-shift-error-token code. */
18562#line 2686 "parse.y"
18563 {after_shift_error_token(p);}
18564#line 18565 "parse.c"
18565
18566
18567 yystate = yyn;
18568 goto yynewstate;
18569
18570
18571/*-------------------------------------.
18572| yyacceptlab -- YYACCEPT comes here. |
18573`-------------------------------------*/
18574yyacceptlab:
18575 yyresult = 0;
18576 goto yyreturnlab;
18577
18578
18579/*-----------------------------------.
18580| yyabortlab -- YYABORT comes here. |
18581`-----------------------------------*/
18582yyabortlab:
18583 yyresult = 1;
18584 goto yyreturnlab;
18585
18586
18587/*-----------------------------------------------------------.
18588| yyexhaustedlab -- YYNOMEM (memory exhaustion) comes here. |
18589`-----------------------------------------------------------*/
18590yyexhaustedlab:
18591 yyerror (&yylloc, p, YY_("memory exhausted"));
18592 yyresult = 2;
18593 goto yyreturnlab;
18594
18595
18596/*----------------------------------------------------------.
18597| yyreturnlab -- parsing is finished, clean up and return. |
18598`----------------------------------------------------------*/
18599yyreturnlab:
18600 if (yychar != YYEMPTY)
18601 {
18602 /* Make sure we have latest lookahead translation. See comments at
18603 user semantic actions for why this is necessary. */
18604 yytoken = YYTRANSLATE (yychar);
18605 yydestruct ("Cleanup: discarding lookahead",
18606 yytoken, &yylval, &yylloc, p);
18607 }
18608 /* Do not reclaim the symbols of the rule whose action triggered
18609 this YYABORT or YYACCEPT. */
18610 YYPOPSTACK (yylen);
18611 YY_STACK_PRINT (yyss, yyssp, p);
18612 while (yyssp != yyss)
18613 {
18614 yydestruct ("Cleanup: popping",
18615 YY_ACCESSING_SYMBOL (+*yyssp), yyvsp, yylsp, p);
18616 YYPOPSTACK (1);
18617 }
18618#ifndef yyoverflow
18619 if (yyss != yyssa)
18620 YYSTACK_FREE (yyss);
18621#endif
18622 if (yymsg != yymsgbuf)
18623 YYSTACK_FREE (yymsg);
18624 return yyresult;
18625}
18626
18627#line 6748 "parse.y"
18628
18629# undef p
18630# undef yylex
18631# undef yylval
18632# define yylval (*p->lval)
18633
18634static int regx_options(struct parser_params*);
18635static int tokadd_string(struct parser_params*,int,int,int,long*,rb_encoding**,rb_encoding**);
18636static void tokaddmbc(struct parser_params *p, int c, rb_encoding *enc);
18637static enum yytokentype parse_string(struct parser_params*,rb_strterm_literal_t*);
18638static enum yytokentype here_document(struct parser_params*,rb_strterm_heredoc_t*);
18639
18640#define set_parser_s_value(x) (ifdef_ripper(p->s_value = (x), (void)0))
18641
18642# define set_yylval_node(x) { \
18643 YYLTYPE _cur_loc; \
18644 rb_parser_set_location(p, &_cur_loc); \
18645 yylval.node = (x); \
18646 set_parser_s_value(STR_NEW(p->lex.ptok, p->lex.pcur-p->lex.ptok)); \
18647}
18648# define set_yylval_str(x) \
18649do { \
18650 set_yylval_node(NEW_STR(x, &_cur_loc)); \
18651 set_parser_s_value(rb_str_new_mutable_parser_string(x)); \
18652} while(0)
18653# define set_yylval_num(x) { \
18654 yylval.num = (x); \
18655 set_parser_s_value(x); \
18656}
18657# define set_yylval_id(x) (yylval.id = (x))
18658# define set_yylval_name(x) { \
18659 (yylval.id = (x)); \
18660 set_parser_s_value(ID2SYM(x)); \
18661}
18662# define yylval_id() (yylval.id)
18663
18664#define set_yylval_noname() set_yylval_id(keyword_nil)
18665#define has_delayed_token(p) (p->delayed.token != NULL)
18666
18667#ifndef RIPPER
18668#define literal_flush(p, ptr) ((p)->lex.ptok = (ptr))
18669#define dispatch_scan_event(p, t) parser_dispatch_scan_event(p, t, __LINE__)
18670
18671static bool
18672parser_has_token(struct parser_params *p)
18673{
18674 const char *const pcur = p->lex.pcur;
18675 const char *const ptok = p->lex.ptok;
18676 if (p->keep_tokens && (pcur < ptok)) {
18677 rb_bug("lex.pcur < lex.ptok. (line: %d) %"PRIdPTRDIFF"|%"PRIdPTRDIFF"|%"PRIdPTRDIFF"",
18678 p->ruby_sourceline, ptok - p->lex.pbeg, pcur - ptok, p->lex.pend - pcur);
18679 }
18680 return pcur > ptok;
18681}
18682
18683static const char *
18684escaped_char(int c)
18685{
18686 switch (c) {
18687 case '"': return "\\\"";
18688 case '\\': return "\\\\";
18689 case '\0': return "\\0";
18690 case '\n': return "\\n";
18691 case '\r': return "\\r";
18692 case '\t': return "\\t";
18693 case '\f': return "\\f";
18694 case '\013': return "\\v";
18695 case '\010': return "\\b";
18696 case '\007': return "\\a";
18697 case '\033': return "\\e";
18698 case '\x7f': return "\\c?";
18699 }
18700 return NULL;
18701}
18702
18703static rb_parser_string_t *
18704rb_parser_str_escape(struct parser_params *p, rb_parser_string_t *str)
18705{
18706 rb_encoding *enc = p->enc;
18707 const char *ptr = str->ptr;
18708 const char *pend = ptr + str->len;
18709 const char *prev = ptr;
18710 char charbuf[5] = {'\\', 'x', 0, 0, 0};
18711 rb_parser_string_t * result = rb_parser_string_new(p, 0, 0);
18712
18713 while (ptr < pend) {
18714 unsigned int c;
18715 const char *cc;
18716 int n = rb_enc_precise_mbclen(ptr, pend, enc);
18717 if (!MBCLEN_CHARFOUND_P(n)) {
18718 if (ptr > prev) parser_str_cat(result, prev, ptr - prev);
18719 n = rb_enc_mbminlen(enc);
18720 if (pend < ptr + n)
18721 n = (int)(pend - ptr);
18722 while (n--) {
18723 c = *ptr & 0xf0 >> 4;
18724 charbuf[2] = (c < 10) ? '0' + c : 'A' + c - 10;
18725 c = *ptr & 0x0f;
18726 charbuf[3] = (c < 10) ? '0' + c : 'A' + c - 10;
18727 parser_str_cat(result, charbuf, 4);
18728 prev = ++ptr;
18729 }
18730 continue;
18731 }
18732 n = MBCLEN_CHARFOUND_LEN(n);
18733 c = rb_enc_mbc_to_codepoint(ptr, pend, enc);
18734 ptr += n;
18735 cc = escaped_char(c);
18736 if (cc) {
18737 if (ptr - n > prev) parser_str_cat(result, prev, ptr - n - prev);
18738 parser_str_cat_cstr(result, cc);
18739 prev = ptr;
18740 }
18741 else if (rb_enc_isascii(c, enc) && ISPRINT(c)) {
18742 }
18743 else {
18744 if (ptr - n > prev) {
18745 parser_str_cat(result, prev, ptr - n - prev);
18746 prev = ptr - n;
18747 }
18748 parser_str_cat(result, prev, ptr - prev);
18749 prev = ptr;
18750 }
18751 }
18752 if (ptr > prev) parser_str_cat(result, prev, ptr - prev);
18753
18754 return result;
18755}
18756
18757static void
18758parser_append_tokens(struct parser_params *p, rb_parser_string_t *str, enum yytokentype t, int line)
18759{
18761 token->id = p->token_id;
18762 token->type_name = parser_token2char(p, t);
18763 token->str = str;
18764 token->loc.beg_pos = p->yylloc->beg_pos;
18765 token->loc.end_pos = p->yylloc->end_pos;
18766 rb_parser_ary_push_ast_token(p, p->tokens, token);
18767 p->token_id++;
18768
18769 if (p->debug) {
18770 rb_parser_string_t *str_escaped = rb_parser_str_escape(p, str);
18771 rb_parser_printf(p, "Append tokens (line: %d) [%d, :%s, \"%s\", [%d, %d, %d, %d]]\n",
18772 line, token->id, token->type_name, str_escaped->ptr,
18773 token->loc.beg_pos.lineno, token->loc.beg_pos.column,
18774 token->loc.end_pos.lineno, token->loc.end_pos.column);
18775 rb_parser_string_free(p, str_escaped);
18776 }
18777}
18778
18779static void
18780parser_dispatch_scan_event(struct parser_params *p, enum yytokentype t, int line)
18781{
18782 debug_token_line(p, "parser_dispatch_scan_event", line);
18783
18784 if (!parser_has_token(p)) return;
18785
18786 RUBY_SET_YYLLOC(*p->yylloc);
18787
18788 if (p->keep_tokens) {
18789 rb_parser_string_t *str = rb_parser_encoding_string_new(p, p->lex.ptok, p->lex.pcur - p->lex.ptok, p->enc);
18790 parser_append_tokens(p, str, t, line);
18791 }
18792
18793 token_flush(p);
18794}
18795
18796#define dispatch_delayed_token(p, t) parser_dispatch_delayed_token(p, t, __LINE__)
18797static void
18798parser_dispatch_delayed_token(struct parser_params *p, enum yytokentype t, int line)
18799{
18800 debug_token_line(p, "parser_dispatch_delayed_token", line);
18801
18802 if (!has_delayed_token(p)) return;
18803
18804 RUBY_SET_YYLLOC_OF_DELAYED_TOKEN(*p->yylloc);
18805
18806 if (p->keep_tokens) {
18807 /* p->delayed.token is freed by rb_parser_tokens_free */
18808 parser_append_tokens(p, p->delayed.token, t, line);
18809 }
18810 else {
18811 rb_parser_string_free(p, p->delayed.token);
18812 }
18813
18814 p->delayed.token = NULL;
18815}
18816#else
18817#define literal_flush(p, ptr) ((void)(ptr))
18818
18819static int
18820ripper_has_scan_event(struct parser_params *p)
18821{
18822 if (p->lex.pcur < p->lex.ptok) rb_raise(rb_eRuntimeError, "lex.pcur < lex.ptok");
18823 return p->lex.pcur > p->lex.ptok;
18824}
18825
18826static VALUE
18827ripper_scan_event_val(struct parser_params *p, enum yytokentype t)
18828{
18829 VALUE str = STR_NEW(p->lex.ptok, p->lex.pcur - p->lex.ptok);
18830 VALUE rval = ripper_dispatch1(p, ripper_token2eventid(t), str);
18831 RUBY_SET_YYLLOC(*p->yylloc);
18832 token_flush(p);
18833 return rval;
18834}
18835
18836static void
18837ripper_dispatch_scan_event(struct parser_params *p, enum yytokentype t)
18838{
18839 if (!ripper_has_scan_event(p)) return;
18840
18841 set_parser_s_value(ripper_scan_event_val(p, t));
18842}
18843#define dispatch_scan_event(p, t) ripper_dispatch_scan_event(p, t)
18844
18845static void
18846ripper_dispatch_delayed_token(struct parser_params *p, enum yytokentype t)
18847{
18848 /* save and adjust the location to delayed token for callbacks */
18849 int saved_line = p->ruby_sourceline;
18850 const char *saved_tokp = p->lex.ptok;
18851 VALUE s_value, str;
18852
18853 if (!has_delayed_token(p)) return;
18854 p->ruby_sourceline = p->delayed.beg_line;
18855 p->lex.ptok = p->lex.pbeg + p->delayed.beg_col;
18856 str = rb_str_new_mutable_parser_string(p->delayed.token);
18857 rb_parser_string_free(p, p->delayed.token);
18858 s_value = ripper_dispatch1(p, ripper_token2eventid(t), str);
18859 set_parser_s_value(s_value);
18860 p->delayed.token = NULL;
18861 p->ruby_sourceline = saved_line;
18862 p->lex.ptok = saved_tokp;
18863}
18864#define dispatch_delayed_token(p, t) ripper_dispatch_delayed_token(p, t)
18865#endif /* RIPPER */
18866
18867static inline int
18868is_identchar(struct parser_params *p, const char *ptr, const char *MAYBE_UNUSED(ptr_end), rb_encoding *enc)
18869{
18870 return rb_enc_isalnum((unsigned char)*ptr, enc) || *ptr == '_' || !ISASCII(*ptr);
18871}
18872
18873static inline bool
18874peek_word_at(struct parser_params *p, const char *str, size_t len, int at)
18875{
18876 const char *ptr = p->lex.pcur + at;
18877 if (lex_eol_ptr_n_p(p, ptr, len-1)) return false;
18878 if (memcmp(ptr, str, len)) return false;
18879 if (lex_eol_ptr_n_p(p, ptr, len)) return true;
18880 switch (ptr[len]) {
18881 case '!': case '?': return false;
18882 }
18883 return !is_identchar(p, ptr+len, p->lex.pend, p->enc);
18884}
18885
18886static inline int
18887parser_is_identchar(struct parser_params *p)
18888{
18889 return !(p)->eofp && is_identchar(p, p->lex.pcur-1, p->lex.pend, p->enc);
18890}
18891
18892static inline int
18893parser_isascii(struct parser_params *p)
18894{
18895 return ISASCII(*(p->lex.pcur-1));
18896}
18897
18898static void
18899token_info_setup(token_info *ptinfo, const char *ptr, const rb_code_location_t *loc)
18900{
18901 int column = 1, nonspc = 0, i;
18902 for (i = 0; i < loc->beg_pos.column; i++, ptr++) {
18903 if (*ptr == '\t') {
18904 column = (((column - 1) / TAB_WIDTH) + 1) * TAB_WIDTH;
18905 }
18906 column++;
18907 if (*ptr != ' ' && *ptr != '\t') {
18908 nonspc = 1;
18909 }
18910 }
18911
18912 ptinfo->beg = loc->beg_pos;
18913 ptinfo->indent = column;
18914 ptinfo->nonspc = nonspc;
18915}
18916
18917static void
18918token_info_push(struct parser_params *p, const char *token, const rb_code_location_t *loc)
18919{
18920 token_info *ptinfo;
18921
18922 if (!p->token_info_enabled) return;
18923 ptinfo = ALLOC(token_info);
18924 ptinfo->token = token;
18925 ptinfo->next = p->token_info;
18926 token_info_setup(ptinfo, p->lex.pbeg, loc);
18927
18928 p->token_info = ptinfo;
18929}
18930
18931static void
18932token_info_pop(struct parser_params *p, const char *token, const rb_code_location_t *loc)
18933{
18934 token_info *ptinfo_beg = p->token_info;
18935
18936 if (!ptinfo_beg) return;
18937
18938 /* indentation check of matched keywords (begin..end, if..end, etc.) */
18939 token_info_warn(p, token, ptinfo_beg, 1, loc);
18940
18941 p->token_info = ptinfo_beg->next;
18942 ruby_xfree_sized(ptinfo_beg, sizeof(*ptinfo_beg));
18943}
18944
18945static void
18946token_info_drop(struct parser_params *p, const char *token, rb_code_position_t beg_pos)
18947{
18948 token_info *ptinfo_beg = p->token_info;
18949
18950 if (!ptinfo_beg) return;
18951 p->token_info = ptinfo_beg->next;
18952
18953 if (ptinfo_beg->beg.lineno != beg_pos.lineno ||
18954 ptinfo_beg->beg.column != beg_pos.column ||
18955 strcmp(ptinfo_beg->token, token)) {
18956 compile_error(p, "token position mismatch: %d:%d:%s expected but %d:%d:%s",
18957 beg_pos.lineno, beg_pos.column, token,
18958 ptinfo_beg->beg.lineno, ptinfo_beg->beg.column,
18959 ptinfo_beg->token);
18960 }
18961
18962 ruby_xfree_sized(ptinfo_beg, sizeof(*ptinfo_beg));
18963}
18964
18965static void
18966token_info_warn(struct parser_params *p, const char *token, token_info *ptinfo_beg, int same, const rb_code_location_t *loc)
18967{
18968 token_info ptinfo_end_body, *ptinfo_end = &ptinfo_end_body;
18969 if (!p->token_info_enabled) return;
18970 if (!ptinfo_beg) return;
18971 token_info_setup(ptinfo_end, p->lex.pbeg, loc);
18972 if (ptinfo_beg->beg.lineno == ptinfo_end->beg.lineno) return; /* ignore one-line block */
18973 if (ptinfo_beg->nonspc || ptinfo_end->nonspc) return; /* ignore keyword in the middle of a line */
18974 if (ptinfo_beg->indent == ptinfo_end->indent) return; /* the indents are matched */
18975 if (!same && ptinfo_beg->indent < ptinfo_end->indent) return;
18976 rb_warn3L(ptinfo_end->beg.lineno,
18977 "mismatched indentations at '%s' with '%s' at %d",
18978 WARN_S(token), WARN_S(ptinfo_beg->token), WARN_I(ptinfo_beg->beg.lineno));
18979}
18980
18981static int
18982parser_precise_mbclen(struct parser_params *p, const char *ptr)
18983{
18984 int len = rb_enc_precise_mbclen(ptr, p->lex.pend, p->enc);
18985 if (!MBCLEN_CHARFOUND_P(len)) {
18986 compile_error(p, "invalid multibyte char (%s)", rb_enc_name(p->enc));
18987 return -1;
18988 }
18989 return len;
18990}
18991
18992#ifndef RIPPER
18993static inline void
18994parser_show_error_line(struct parser_params *p, const YYLTYPE *yylloc)
18995{
18996 rb_parser_string_t *str;
18997 int lineno = p->ruby_sourceline;
18998 if (!yylloc) {
18999 return;
19000 }
19001 else if (yylloc->beg_pos.lineno == lineno) {
19002 str = p->lex.lastline;
19003 }
19004 else {
19005 return;
19006 }
19007 ruby_show_error_line(p, p->error_buffer, yylloc, lineno, str);
19008}
19009
19010static int
19011parser_yyerror(struct parser_params *p, const rb_code_location_t *yylloc, const char *msg)
19012{
19013#if 0
19014 YYLTYPE current;
19015
19016 if (!yylloc) {
19017 yylloc = RUBY_SET_YYLLOC(current);
19018 }
19019 else if ((p->ruby_sourceline != yylloc->beg_pos.lineno &&
19020 p->ruby_sourceline != yylloc->end_pos.lineno)) {
19021 yylloc = 0;
19022 }
19023#endif
19024 parser_compile_error(p, yylloc, "%s", msg);
19025 parser_show_error_line(p, yylloc);
19026 return 0;
19027}
19028
19029static int
19030parser_yyerror0(struct parser_params *p, const char *msg)
19031{
19032 YYLTYPE current;
19033 return parser_yyerror(p, RUBY_SET_YYLLOC(current), msg);
19034}
19035
19036void
19037ruby_show_error_line(struct parser_params *p, VALUE errbuf, const YYLTYPE *yylloc, int lineno, rb_parser_string_t *str)
19038{
19039 VALUE mesg;
19040 const int max_line_margin = 30;
19041 const char *ptr, *ptr_end, *pt, *pb;
19042 const char *pre = "", *post = "", *pend;
19043 const char *code = "", *caret = "";
19044 const char *lim;
19045 const char *const pbeg = PARSER_STRING_PTR(str);
19046 char *buf;
19047 long len;
19048 int i;
19049
19050 if (!yylloc) return;
19051 pend = rb_parser_string_end(str);
19052 if (pend > pbeg && pend[-1] == '\n') {
19053 if (--pend > pbeg && pend[-1] == '\r') --pend;
19054 }
19055
19056 pt = pend;
19057 if (lineno == yylloc->end_pos.lineno &&
19058 (pend - pbeg) > yylloc->end_pos.column) {
19059 pt = pbeg + yylloc->end_pos.column;
19060 }
19061
19062 ptr = ptr_end = pt;
19063 lim = ptr - pbeg > max_line_margin ? ptr - max_line_margin : pbeg;
19064 while ((lim < ptr) && (*(ptr-1) != '\n')) ptr--;
19065
19066 lim = pend - ptr_end > max_line_margin ? ptr_end + max_line_margin : pend;
19067 while ((ptr_end < lim) && (*ptr_end != '\n') && (*ptr_end != '\r')) ptr_end++;
19068
19069 len = ptr_end - ptr;
19070 if (len > 4) {
19071 if (ptr > pbeg) {
19072 ptr = rb_enc_prev_char(pbeg, ptr, pt, rb_parser_str_get_encoding(str));
19073 if (ptr > pbeg) pre = "...";
19074 }
19075 if (ptr_end < pend) {
19076 ptr_end = rb_enc_prev_char(pt, ptr_end, pend, rb_parser_str_get_encoding(str));
19077 if (ptr_end < pend) post = "...";
19078 }
19079 }
19080 pb = pbeg;
19081 if (lineno == yylloc->beg_pos.lineno) {
19082 pb += yylloc->beg_pos.column;
19083 if (pb > pt) pb = pt;
19084 }
19085 if (pb < ptr) pb = ptr;
19086 if (len <= 4 && yylloc->beg_pos.lineno == yylloc->end_pos.lineno) {
19087 return;
19088 }
19089 if (RTEST(errbuf)) {
19090 mesg = rb_attr_get(errbuf, idMesg);
19091 if (char_at_end(p, mesg, '\n') != '\n')
19092 rb_str_cat_cstr(mesg, "\n");
19093 }
19094 else {
19095 mesg = rb_enc_str_new(0, 0, rb_parser_str_get_encoding(str));
19096 }
19097 if (!errbuf && rb_stderr_tty_p()) {
19098#define CSI_BEGIN "\033["
19099#define CSI_SGR "m"
19100 rb_str_catf(mesg,
19101 CSI_BEGIN""CSI_SGR"%s" /* pre */
19102 CSI_BEGIN"1"CSI_SGR"%.*s"
19103 CSI_BEGIN"1;4"CSI_SGR"%.*s"
19104 CSI_BEGIN";1"CSI_SGR"%.*s"
19105 CSI_BEGIN""CSI_SGR"%s" /* post */
19106 "\n",
19107 pre,
19108 (int)(pb - ptr), ptr,
19109 (int)(pt - pb), pb,
19110 (int)(ptr_end - pt), pt,
19111 post);
19112 }
19113 else {
19114 char *p2;
19115
19116 len = ptr_end - ptr;
19117 lim = pt < pend ? pt : pend;
19118 i = (int)(lim - ptr);
19119 buf = ALLOCA_N(char, i+2);
19120 code = ptr;
19121 caret = p2 = buf;
19122 if (ptr <= pb) {
19123 while (ptr < pb) {
19124 *p2++ = *ptr++ == '\t' ? '\t' : ' ';
19125 }
19126 *p2++ = '^';
19127 ptr++;
19128 }
19129 if (lim > ptr) {
19130 memset(p2, '~', (lim - ptr));
19131 p2 += (lim - ptr);
19132 }
19133 *p2 = '\0';
19134 rb_str_catf(mesg, "%s%.*s%s\n""%s%s\n",
19135 pre, (int)len, code, post,
19136 pre, caret);
19137 }
19138 if (!errbuf) rb_write_error_str(mesg);
19139}
19140#else
19141
19142static int
19143parser_yyerror(struct parser_params *p, const YYLTYPE *yylloc, const char *msg)
19144{
19145 const char *pcur = 0, *ptok = 0;
19146 if (p->ruby_sourceline == yylloc->beg_pos.lineno &&
19147 p->ruby_sourceline == yylloc->end_pos.lineno) {
19148 pcur = p->lex.pcur;
19149 ptok = p->lex.ptok;
19150 p->lex.ptok = p->lex.pbeg + yylloc->beg_pos.column;
19151 p->lex.pcur = p->lex.pbeg + yylloc->end_pos.column;
19152 }
19153 parser_yyerror0(p, msg);
19154 if (pcur) {
19155 p->lex.ptok = ptok;
19156 p->lex.pcur = pcur;
19157 }
19158 return 0;
19159}
19160
19161static int
19162parser_yyerror0(struct parser_params *p, const char *msg)
19163{
19164 dispatch1(parse_error, STR_NEW2(msg));
19165 ripper_error(p);
19166 return 0;
19167}
19168
19169static inline void
19170parser_show_error_line(struct parser_params *p, const YYLTYPE *yylloc)
19171{
19172}
19173#endif /* !RIPPER */
19174
19175static int
19176vtable_size(const struct vtable *tbl)
19177{
19178 if (!DVARS_TERMINAL_P(tbl)) {
19179 return tbl->pos;
19180 }
19181 else {
19182 return 0;
19183 }
19184}
19185
19186static struct vtable *
19187vtable_alloc_gen(struct parser_params *p, int line, struct vtable *prev)
19188{
19189 struct vtable *tbl = ALLOC(struct vtable);
19190 tbl->pos = 0;
19191 tbl->capa = 8;
19192 tbl->tbl = ALLOC_N(ID, tbl->capa);
19193 tbl->prev = prev;
19194#ifndef RIPPER
19195 if (p->debug) {
19196 rb_parser_printf(p, "vtable_alloc:%d: %p\n", line, (void *)tbl);
19197 }
19198#endif
19199 return tbl;
19200}
19201#define vtable_alloc(prev) vtable_alloc_gen(p, __LINE__, prev)
19202
19203static void
19204vtable_free_gen(struct parser_params *p, int line, const char *name,
19205 struct vtable *tbl)
19206{
19207#ifndef RIPPER
19208 if (p->debug) {
19209 rb_parser_printf(p, "vtable_free:%d: %s(%p)\n", line, name, (void *)tbl);
19210 }
19211#endif
19212 if (!DVARS_TERMINAL_P(tbl)) {
19213 if (tbl->tbl) {
19214 ruby_xfree_sized(tbl->tbl, tbl->capa * sizeof(ID));
19215 }
19216 ruby_xfree_sized(tbl, sizeof(*tbl));
19217 }
19218}
19219#define vtable_free(tbl) vtable_free_gen(p, __LINE__, #tbl, tbl)
19220
19221static void
19222vtable_add_gen(struct parser_params *p, int line, const char *name,
19223 struct vtable *tbl, ID id)
19224{
19225#ifndef RIPPER
19226 if (p->debug) {
19227 rb_parser_printf(p, "vtable_add:%d: %s(%p), %s\n",
19228 line, name, (void *)tbl, rb_id2name(id));
19229 }
19230#endif
19231 if (DVARS_TERMINAL_P(tbl)) {
19232 rb_parser_fatal(p, "vtable_add: vtable is not allocated (%p)", (void *)tbl);
19233 return;
19234 }
19235 if (tbl->pos == tbl->capa) {
19236 tbl->capa = tbl->capa * 2;
19237 SIZED_REALLOC_N(tbl->tbl, ID, tbl->capa, tbl->pos);
19238 }
19239 tbl->tbl[tbl->pos++] = id;
19240}
19241#define vtable_add(tbl, id) vtable_add_gen(p, __LINE__, #tbl, tbl, id)
19242
19243static void
19244vtable_pop_gen(struct parser_params *p, int line, const char *name,
19245 struct vtable *tbl, int n)
19246{
19247 if (p->debug) {
19248 rb_parser_printf(p, "vtable_pop:%d: %s(%p), %d\n",
19249 line, name, (void *)tbl, n);
19250 }
19251 if (tbl->pos < n) {
19252 rb_parser_fatal(p, "vtable_pop: unreachable (%d < %d)", tbl->pos, n);
19253 return;
19254 }
19255 tbl->pos -= n;
19256}
19257#define vtable_pop(tbl, n) vtable_pop_gen(p, __LINE__, #tbl, tbl, n)
19258
19259static int
19260vtable_included(const struct vtable * tbl, ID id)
19261{
19262 int i;
19263
19264 if (!DVARS_TERMINAL_P(tbl)) {
19265 for (i = 0; i < tbl->pos; i++) {
19266 if (tbl->tbl[i] == id) {
19267 return i+1;
19268 }
19269 }
19270 }
19271 return 0;
19272}
19273
19274static void parser_prepare(struct parser_params *p);
19275
19276static int
19277e_option_supplied(struct parser_params *p)
19278{
19279 return strcmp(p->ruby_sourcefile, "-e") == 0;
19280}
19281
19282#ifndef RIPPER
19283static NODE *parser_append_options(struct parser_params *p, NODE *node);
19284
19285static VALUE
19286yycompile0(VALUE arg)
19287{
19288 int n;
19289 NODE *tree;
19290 struct parser_params *p = (struct parser_params *)arg;
19291 int cov = FALSE;
19292
19293 if (!compile_for_eval && !NIL_P(p->ruby_sourcefile_string) && !e_option_supplied(p)) {
19294 cov = TRUE;
19295 }
19296
19297 if (p->debug_lines) {
19298 p->ast->body.script_lines = p->debug_lines;
19299 }
19300
19301 parser_prepare(p);
19302#define RUBY_DTRACE_PARSE_HOOK(name) \
19303 if (RUBY_DTRACE_PARSE_##name##_ENABLED()) { \
19304 RUBY_DTRACE_PARSE_##name(p->ruby_sourcefile, p->ruby_sourceline); \
19305 }
19306 RUBY_DTRACE_PARSE_HOOK(BEGIN);
19307 n = yyparse(p);
19308 RUBY_DTRACE_PARSE_HOOK(END);
19309
19310 p->debug_lines = 0;
19311
19312 xfree(p->lex.strterm);
19313 p->lex.strterm = 0;
19314 p->lex.pcur = p->lex.pbeg = p->lex.pend = 0;
19315 if (n || p->error_p) {
19316 VALUE mesg = p->error_buffer;
19317 if (!mesg) {
19318 mesg = syntax_error_new();
19319 }
19320 if (!p->error_tolerant) {
19321 rb_set_errinfo(mesg);
19322 return FALSE;
19323 }
19324 }
19325 tree = p->eval_tree;
19326 if (!tree) {
19327 tree = NEW_NIL(&NULL_LOC);
19328 }
19329 else {
19330 rb_parser_ary_t *tokens = p->tokens;
19331 NODE *prelude;
19332 NODE *body = parser_append_options(p, RNODE_SCOPE(tree)->nd_body);
19333 prelude = block_append(p, p->eval_tree_begin, body);
19334 RNODE_SCOPE(tree)->nd_body = prelude;
19335 p->ast->body.frozen_string_literal = p->frozen_string_literal;
19336 p->ast->body.coverage_enabled = cov;
19337 if (p->keep_tokens) {
19338 p->ast->node_buffer->tokens = tokens;
19339 p->tokens = NULL;
19340 }
19341 }
19342 p->ast->body.root = tree;
19343 p->ast->body.line_count = p->line_count;
19344 return TRUE;
19345}
19346
19347static rb_ast_t *
19348yycompile(struct parser_params *p, VALUE fname, int line)
19349{
19350 rb_ast_t *ast;
19351 if (NIL_P(fname)) {
19352 p->ruby_sourcefile_string = Qnil;
19353 p->ruby_sourcefile = "(none)";
19354 }
19355 else {
19356 p->ruby_sourcefile_string = rb_str_to_interned_str(fname);
19357 p->ruby_sourcefile = StringValueCStr(fname);
19358 }
19359 p->ruby_sourceline = line - 1;
19360
19361 p->lvtbl = NULL;
19362
19363 p->ast = ast = rb_ast_new();
19364 compile_callback(yycompile0, (VALUE)p);
19365 p->ast = 0;
19366
19367 while (p->lvtbl) {
19368 local_pop(p);
19369 }
19370
19371 return ast;
19372}
19373#endif /* !RIPPER */
19374
19375static rb_encoding *
19376must_be_ascii_compatible(struct parser_params *p, rb_parser_string_t *s)
19377{
19378 rb_encoding *enc = rb_parser_str_get_encoding(s);
19379 if (!rb_enc_asciicompat(enc)) {
19380 rb_raise(rb_eArgError, "invalid source encoding");
19381 }
19382 return enc;
19383}
19384
19385static rb_parser_string_t *
19386lex_getline(struct parser_params *p)
19387{
19388 rb_parser_string_t *line = (*p->lex.gets)(p, p->lex.input, p->line_count);
19389 if (!line) return 0;
19390 p->line_count++;
19391 string_buffer_append(p, line);
19392 must_be_ascii_compatible(p, line);
19393 return line;
19394}
19395
19396#ifndef RIPPER
19397rb_ast_t*
19398rb_parser_compile(rb_parser_t *p, rb_parser_lex_gets_func *gets, VALUE fname, rb_parser_input_data input, int line)
19399{
19400 p->lex.gets = gets;
19401 p->lex.input = input;
19402 p->lex.pbeg = p->lex.pcur = p->lex.pend = 0;
19403
19404 return yycompile(p, fname, line);
19405}
19406#endif /* !RIPPER */
19407
19408#define STR_FUNC_ESCAPE 0x01
19409#define STR_FUNC_EXPAND 0x02
19410#define STR_FUNC_REGEXP 0x04
19411#define STR_FUNC_QWORDS 0x08
19412#define STR_FUNC_SYMBOL 0x10
19413#define STR_FUNC_INDENT 0x20
19414#define STR_FUNC_LABEL 0x40
19415#define STR_FUNC_LIST 0x4000
19416#define STR_FUNC_TERM 0x8000
19417
19418enum string_type {
19419 str_label = STR_FUNC_LABEL,
19420 str_squote = (0),
19421 str_dquote = (STR_FUNC_EXPAND),
19422 str_xquote = (STR_FUNC_EXPAND),
19423 str_regexp = (STR_FUNC_REGEXP|STR_FUNC_ESCAPE|STR_FUNC_EXPAND),
19424 str_sword = (STR_FUNC_QWORDS|STR_FUNC_LIST),
19425 str_dword = (STR_FUNC_QWORDS|STR_FUNC_EXPAND|STR_FUNC_LIST),
19426 str_ssym = (STR_FUNC_SYMBOL),
19427 str_dsym = (STR_FUNC_SYMBOL|STR_FUNC_EXPAND)
19428};
19429
19430static rb_parser_string_t *
19431parser_str_new(struct parser_params *p, const char *ptr, long len, rb_encoding *enc, int func, rb_encoding *enc0)
19432{
19433 rb_parser_string_t *pstr;
19434
19435 pstr = rb_parser_encoding_string_new(p, ptr, len, enc);
19436
19437 if (!(func & STR_FUNC_REGEXP)) {
19438 if (rb_parser_is_ascii_string(p, pstr)) {
19439 }
19440 else if (rb_is_usascii_enc((void *)enc0) && enc != rb_utf8_encoding()) {
19441 /* everything is valid in ASCII-8BIT */
19442 enc = rb_ascii8bit_encoding();
19443 PARSER_ENCODING_CODERANGE_SET(pstr, enc, RB_PARSER_ENC_CODERANGE_VALID);
19444 }
19445 }
19446
19447 return pstr;
19448}
19449
19450static int
19451strterm_is_heredoc(rb_strterm_t *strterm)
19452{
19453 return strterm->heredoc;
19454}
19455
19456static rb_strterm_t *
19457new_strterm(struct parser_params *p, int func, int term, int paren)
19458{
19459 rb_strterm_t *strterm = ZALLOC(rb_strterm_t);
19460 strterm->u.literal.func = func;
19461 strterm->u.literal.term = term;
19462 strterm->u.literal.paren = paren;
19463 return strterm;
19464}
19465
19466static rb_strterm_t *
19467new_heredoc(struct parser_params *p)
19468{
19469 rb_strterm_t *strterm = ZALLOC(rb_strterm_t);
19470 strterm->heredoc = true;
19471 return strterm;
19472}
19473
19474#define peek(p,c) peek_n(p, (c), 0)
19475#define peek_n(p,c,n) (!lex_eol_n_p(p, n) && (c) == (unsigned char)(p)->lex.pcur[n])
19476#define peekc(p) peekc_n(p, 0)
19477#define peekc_n(p,n) (lex_eol_n_p(p, n) ? -1 : (unsigned char)(p)->lex.pcur[n])
19478
19479#define add_delayed_token(p, tok, end) parser_add_delayed_token(p, tok, end, __LINE__)
19480static void
19481parser_add_delayed_token(struct parser_params *p, const char *tok, const char *end, int line)
19482{
19483 debug_token_line(p, "add_delayed_token", line);
19484
19485 if (tok < end) {
19486 if (has_delayed_token(p)) {
19487 bool next_line = parser_string_char_at_end(p, p->delayed.token, 0) == '\n';
19488 int end_line = (next_line ? 1 : 0) + p->delayed.end_line;
19489 int end_col = (next_line ? 0 : p->delayed.end_col);
19490 if (end_line != p->ruby_sourceline || end_col != tok - p->lex.pbeg) {
19491 dispatch_delayed_token(p, tSTRING_CONTENT);
19492 }
19493 }
19494 if (!has_delayed_token(p)) {
19495 p->delayed.token = rb_parser_string_new(p, 0, 0);
19496 rb_parser_enc_associate(p, p->delayed.token, p->enc);
19497 p->delayed.beg_line = p->ruby_sourceline;
19498 p->delayed.beg_col = rb_long2int(tok - p->lex.pbeg);
19499 }
19500 parser_str_cat(p->delayed.token, tok, end - tok);
19501 p->delayed.end_line = p->ruby_sourceline;
19502 p->delayed.end_col = rb_long2int(end - p->lex.pbeg);
19503 p->lex.ptok = end;
19504 }
19505}
19506
19507static void
19508set_lastline(struct parser_params *p, rb_parser_string_t *str)
19509{
19510 p->lex.pbeg = p->lex.pcur = PARSER_STRING_PTR(str);
19511 p->lex.pend = p->lex.pcur + PARSER_STRING_LEN(str);
19512 p->lex.lastline = str;
19513}
19514
19515static int
19516nextline(struct parser_params *p, int set_encoding)
19517{
19518 rb_parser_string_t *str = p->lex.nextline;
19519 p->lex.nextline = 0;
19520 if (!str) {
19521 if (p->eofp)
19522 return -1;
19523
19524 if (!lex_eol_ptr_p(p, p->lex.pbeg) && *(p->lex.pend-1) != '\n') {
19525 goto end_of_input;
19526 }
19527
19528 if (!p->lex.input || !(str = lex_getline(p))) {
19529 end_of_input:
19530 p->eofp = 1;
19531 lex_goto_eol(p);
19532 return -1;
19533 }
19534#ifndef RIPPER
19535 if (p->debug_lines) {
19536 if (set_encoding) rb_parser_enc_associate(p, str, p->enc);
19537 rb_parser_string_t *copy = rb_parser_string_deep_copy(p, str);
19538 rb_parser_ary_push_script_line(p, p->debug_lines, copy);
19539 }
19540#endif
19541 p->cr_seen = FALSE;
19542 }
19543 else if (str == AFTER_HEREDOC_WITHOUT_TERMINATOR) {
19544 /* after here-document without terminator */
19545 goto end_of_input;
19546 }
19547 add_delayed_token(p, p->lex.ptok, p->lex.pend);
19548 if (p->heredoc_end > 0) {
19549 p->ruby_sourceline = p->heredoc_end;
19550 p->heredoc_end = 0;
19551 }
19552 p->ruby_sourceline++;
19553 set_lastline(p, str);
19554 token_flush(p);
19555 return 0;
19556}
19557
19558static int
19559parser_cr(struct parser_params *p, int c)
19560{
19561 if (peek(p, '\n')) {
19562 p->lex.pcur++;
19563 c = '\n';
19564 }
19565 return c;
19566}
19567
19568static inline int
19569nextc0(struct parser_params *p, int set_encoding)
19570{
19571 int c;
19572
19573 if (UNLIKELY(lex_eol_p(p) || p->eofp || p->lex.nextline > AFTER_HEREDOC_WITHOUT_TERMINATOR)) {
19574 if (nextline(p, set_encoding)) return -1;
19575 }
19576 c = (unsigned char)*p->lex.pcur++;
19577 if (UNLIKELY(c == '\r')) {
19578 c = parser_cr(p, c);
19579 }
19580
19581 return c;
19582}
19583#define nextc(p) nextc0(p, TRUE)
19584
19585static void
19586pushback(struct parser_params *p, int c)
19587{
19588 if (c == -1) return;
19589 p->eofp = 0;
19590 p->lex.pcur--;
19591 if (p->lex.pcur > p->lex.pbeg && p->lex.pcur[0] == '\n' && p->lex.pcur[-1] == '\r') {
19592 p->lex.pcur--;
19593 }
19594}
19595
19596#define was_bol(p) ((p)->lex.pcur == (p)->lex.pbeg + 1)
19597
19598#define tokfix(p) ((p)->tokenbuf[(p)->tokidx]='\0')
19599#define tok(p) (p)->tokenbuf
19600#define toklen(p) (p)->tokidx
19601
19602static int
19603looking_at_eol_p(struct parser_params *p)
19604{
19605 const char *ptr = p->lex.pcur;
19606 while (!lex_eol_ptr_p(p, ptr)) {
19607 int c = (unsigned char)*ptr++;
19608 int eol = (c == '\n' || c == '#');
19609 if (eol || !ISSPACE(c)) {
19610 return eol;
19611 }
19612 }
19613 return TRUE;
19614}
19615
19616static char*
19617newtok(struct parser_params *p)
19618{
19619 p->tokidx = 0;
19620 if (!p->tokenbuf) {
19621 p->toksiz = 60;
19622 p->tokenbuf = ALLOC_N(char, 60);
19623 }
19624 if (p->toksiz > 4096) {
19625 p->toksiz = 60;
19626 REALLOC_N(p->tokenbuf, char, 60);
19627 }
19628 return p->tokenbuf;
19629}
19630
19631static char *
19632tokspace(struct parser_params *p, int n)
19633{
19634 p->tokidx += n;
19635
19636 if (p->tokidx >= p->toksiz) {
19637 do {p->toksiz *= 2;} while (p->toksiz < p->tokidx);
19638 REALLOC_N(p->tokenbuf, char, p->toksiz);
19639 }
19640 return &p->tokenbuf[p->tokidx-n];
19641}
19642
19643static void
19644tokadd(struct parser_params *p, int c)
19645{
19646 p->tokenbuf[p->tokidx++] = (char)c;
19647 if (p->tokidx >= p->toksiz) {
19648 p->toksiz *= 2;
19649 REALLOC_N(p->tokenbuf, char, p->toksiz);
19650 }
19651}
19652
19653static int
19654tok_hex(struct parser_params *p, size_t *numlen)
19655{
19656 int c;
19657
19658 c = (int)ruby_scan_hex(p->lex.pcur, 2, numlen);
19659 if (!*numlen) {
19660 flush_string_content(p, p->enc, rb_strlen_lit("\\x"));
19661 yyerror0("invalid hex escape");
19662 dispatch_scan_event(p, tSTRING_CONTENT);
19663 return 0;
19664 }
19665 p->lex.pcur += *numlen;
19666 return c;
19667}
19668
19669#define tokcopy(p, n) memcpy(tokspace(p, n), (p)->lex.pcur - (n), (n))
19670
19671static int
19672escaped_control_code(int c)
19673{
19674 int c2 = 0;
19675 switch (c) {
19676 case ' ':
19677 c2 = 's';
19678 break;
19679 case '\n':
19680 c2 = 'n';
19681 break;
19682 case '\t':
19683 c2 = 't';
19684 break;
19685 case '\v':
19686 c2 = 'v';
19687 break;
19688 case '\r':
19689 c2 = 'r';
19690 break;
19691 case '\f':
19692 c2 = 'f';
19693 break;
19694 }
19695 return c2;
19696}
19697
19698#define WARN_SPACE_CHAR(c, prefix) \
19699 rb_warn1("invalid character syntax; use "prefix"\\%c", WARN_I(c))
19700
19701static int
19702tokadd_codepoint(struct parser_params *p, rb_encoding **encp,
19703 int regexp_literal, const char *begin)
19704{
19705 const int wide = !begin;
19706 size_t numlen;
19707 int codepoint = (int)ruby_scan_hex(p->lex.pcur, wide ? p->lex.pend - p->lex.pcur : 4, &numlen);
19708
19709 p->lex.pcur += numlen;
19710 if (p->lex.strterm == NULL ||
19711 strterm_is_heredoc(p->lex.strterm) ||
19712 (p->lex.strterm->u.literal.func != str_regexp)) {
19713 if (!begin) begin = p->lex.pcur;
19714 if (wide ? (numlen == 0 || numlen > 6) : (numlen < 4)) {
19715 flush_string_content(p, rb_utf8_encoding(), p->lex.pcur - begin);
19716 yyerror0("invalid Unicode escape");
19717 dispatch_scan_event(p, tSTRING_CONTENT);
19718 return wide && numlen > 0;
19719 }
19720 if (codepoint > 0x10ffff) {
19721 flush_string_content(p, rb_utf8_encoding(), p->lex.pcur - begin);
19722 yyerror0("invalid Unicode codepoint (too large)");
19723 dispatch_scan_event(p, tSTRING_CONTENT);
19724 return wide;
19725 }
19726 if ((codepoint & 0xfffff800) == 0xd800) {
19727 flush_string_content(p, rb_utf8_encoding(), p->lex.pcur - begin);
19728 yyerror0("invalid Unicode codepoint");
19729 dispatch_scan_event(p, tSTRING_CONTENT);
19730 return wide;
19731 }
19732 }
19733 if (regexp_literal) {
19734 tokcopy(p, (int)numlen);
19735 }
19736 else if (codepoint >= 0x80) {
19737 rb_encoding *utf8 = rb_utf8_encoding();
19738 if (*encp && utf8 != *encp) {
19739 YYLTYPE loc = RUBY_INIT_YYLLOC();
19740 compile_error(p, "UTF-8 mixed within %s source", rb_enc_name(*encp));
19741 parser_show_error_line(p, &loc);
19742 return wide;
19743 }
19744 *encp = utf8;
19745 tokaddmbc(p, codepoint, *encp);
19746 }
19747 else {
19748 tokadd(p, codepoint);
19749 }
19750 return TRUE;
19751}
19752
19753static int tokadd_mbchar(struct parser_params *p, int c);
19754
19755static int
19756tokskip_mbchar(struct parser_params *p)
19757{
19758 int len = parser_precise_mbclen(p, p->lex.pcur-1);
19759 if (len > 0) {
19760 p->lex.pcur += len - 1;
19761 }
19762 return len;
19763}
19764
19765/* return value is for ?\u3042 */
19766static void
19767tokadd_utf8(struct parser_params *p, rb_encoding **encp,
19768 int term, int symbol_literal, int regexp_literal)
19769{
19770 /*
19771 * If `term` is not -1, then we allow multiple codepoints in \u{}
19772 * upto `term` byte, otherwise we're parsing a character literal.
19773 * And then add the codepoints to the current token.
19774 */
19775 static const char multiple_codepoints[] = "Multiple codepoints at single character literal";
19776
19777 const int open_brace = '{', close_brace = '}';
19778
19779 if (regexp_literal) { tokadd(p, '\\'); tokadd(p, 'u'); }
19780
19781 if (peek(p, open_brace)) { /* handle \u{...} form */
19782 if (regexp_literal && p->lex.strterm->u.literal.func == str_regexp) {
19783 /*
19784 * Skip parsing validation code and copy bytes as-is until term or
19785 * closing brace, in order to correctly handle extended regexps where
19786 * invalid unicode escapes are allowed in comments. The regexp parser
19787 * does its own validation and will catch any issues.
19788 */
19789 tokadd(p, open_brace);
19790 while (!lex_eol_ptr_p(p, ++p->lex.pcur)) {
19791 int c = peekc(p);
19792 if (c == close_brace) {
19793 tokadd(p, c);
19794 ++p->lex.pcur;
19795 break;
19796 }
19797 else if (c == term) {
19798 break;
19799 }
19800 if (c == '\\' && !lex_eol_n_p(p, 1)) {
19801 tokadd(p, c);
19802 c = *++p->lex.pcur;
19803 }
19804 tokadd_mbchar(p, c);
19805 }
19806 }
19807 else {
19808 const char *second = NULL;
19809 int c, last = nextc(p);
19810 if (lex_eol_p(p)) goto unterminated;
19811 while (ISSPACE(c = peekc(p)) && !lex_eol_ptr_p(p, ++p->lex.pcur));
19812 while (c != close_brace) {
19813 if (c == term) goto unterminated;
19814 if (second == multiple_codepoints)
19815 second = p->lex.pcur;
19816 if (regexp_literal) tokadd(p, last);
19817 if (!tokadd_codepoint(p, encp, regexp_literal, NULL)) {
19818 break;
19819 }
19820 while (ISSPACE(c = peekc(p))) {
19821 if (lex_eol_ptr_p(p, ++p->lex.pcur)) goto unterminated;
19822 last = c;
19823 }
19824 if (term == -1 && !second)
19825 second = multiple_codepoints;
19826 }
19827
19828 if (c != close_brace) {
19829 unterminated:
19830 flush_string_content(p, rb_utf8_encoding(), 0);
19831 yyerror0("unterminated Unicode escape");
19832 dispatch_scan_event(p, tSTRING_CONTENT);
19833 return;
19834 }
19835 if (second && second != multiple_codepoints) {
19836 const char *pcur = p->lex.pcur;
19837 p->lex.pcur = second;
19838 dispatch_scan_event(p, tSTRING_CONTENT);
19839 token_flush(p);
19840 p->lex.pcur = pcur;
19841 yyerror0(multiple_codepoints);
19842 token_flush(p);
19843 }
19844
19845 if (regexp_literal) tokadd(p, close_brace);
19846 nextc(p);
19847 }
19848 }
19849 else { /* handle \uxxxx form */
19850 if (!tokadd_codepoint(p, encp, regexp_literal, p->lex.pcur - rb_strlen_lit("\\u"))) {
19851 token_flush(p);
19852 return;
19853 }
19854 }
19855}
19856
19857#define ESCAPE_CONTROL 1
19858#define ESCAPE_META 2
19859
19860static int
19861read_escape(struct parser_params *p, int flags, const char *begin)
19862{
19863 int c;
19864 size_t numlen;
19865
19866 switch (c = nextc(p)) {
19867 case '\\': /* Backslash */
19868 return c;
19869
19870 case 'n': /* newline */
19871 return '\n';
19872
19873 case 't': /* horizontal tab */
19874 return '\t';
19875
19876 case 'r': /* carriage-return */
19877 return '\r';
19878
19879 case 'f': /* form-feed */
19880 return '\f';
19881
19882 case 'v': /* vertical tab */
19883 return '\13';
19884
19885 case 'a': /* alarm(bell) */
19886 return '\007';
19887
19888 case 'e': /* escape */
19889 return 033;
19890
19891 case '0': case '1': case '2': case '3': /* octal constant */
19892 case '4': case '5': case '6': case '7':
19893 pushback(p, c);
19894 c = (int)ruby_scan_oct(p->lex.pcur, 3, &numlen);
19895 p->lex.pcur += numlen;
19896 return c;
19897
19898 case 'x': /* hex constant */
19899 c = tok_hex(p, &numlen);
19900 if (numlen == 0) return 0;
19901 return c;
19902
19903 case 'b': /* backspace */
19904 return '\010';
19905
19906 case 's': /* space */
19907 return ' ';
19908
19909 case 'M':
19910 if (flags & ESCAPE_META) goto eof;
19911 if ((c = nextc(p)) != '-') {
19912 goto eof;
19913 }
19914 if ((c = nextc(p)) == '\\') {
19915 switch (peekc(p)) {
19916 case 'u': case 'U':
19917 nextc(p);
19918 goto eof;
19919 }
19920 return read_escape(p, flags|ESCAPE_META, begin) | 0x80;
19921 }
19922 else if (c == -1) goto eof;
19923 else if (!ISASCII(c)) {
19924 tokskip_mbchar(p);
19925 goto eof;
19926 }
19927 else {
19928 int c2 = escaped_control_code(c);
19929 if (c2) {
19930 if (ISCNTRL(c) || !(flags & ESCAPE_CONTROL)) {
19931 WARN_SPACE_CHAR(c2, "\\M-");
19932 }
19933 else {
19934 WARN_SPACE_CHAR(c2, "\\C-\\M-");
19935 }
19936 }
19937 else if (ISCNTRL(c)) goto eof;
19938 return ((c & 0xff) | 0x80);
19939 }
19940
19941 case 'C':
19942 if ((c = nextc(p)) != '-') {
19943 goto eof;
19944 }
19945 case 'c':
19946 if (flags & ESCAPE_CONTROL) goto eof;
19947 if ((c = nextc(p))== '\\') {
19948 switch (peekc(p)) {
19949 case 'u': case 'U':
19950 nextc(p);
19951 goto eof;
19952 }
19953 c = read_escape(p, flags|ESCAPE_CONTROL, begin);
19954 }
19955 else if (c == '?')
19956 return 0177;
19957 else if (c == -1) goto eof;
19958 else if (!ISASCII(c)) {
19959 tokskip_mbchar(p);
19960 goto eof;
19961 }
19962 else {
19963 int c2 = escaped_control_code(c);
19964 if (c2) {
19965 if (ISCNTRL(c)) {
19966 if (flags & ESCAPE_META) {
19967 WARN_SPACE_CHAR(c2, "\\M-");
19968 }
19969 else {
19970 WARN_SPACE_CHAR(c2, "");
19971 }
19972 }
19973 else {
19974 if (flags & ESCAPE_META) {
19975 WARN_SPACE_CHAR(c2, "\\M-\\C-");
19976 }
19977 else {
19978 WARN_SPACE_CHAR(c2, "\\C-");
19979 }
19980 }
19981 }
19982 else if (ISCNTRL(c)) goto eof;
19983 }
19984 return c & 0x9f;
19985
19986 eof:
19987 case -1:
19988 flush_string_content(p, p->enc, p->lex.pcur - begin);
19989 yyerror0("Invalid escape character syntax");
19990 dispatch_scan_event(p, tSTRING_CONTENT);
19991 return '\0';
19992
19993 default:
19994 if (!ISASCII(c)) {
19995 tokskip_mbchar(p);
19996 goto eof;
19997 }
19998 return c;
19999 }
20000}
20001
20002static void
20003tokaddmbc(struct parser_params *p, int c, rb_encoding *enc)
20004{
20005 int len = rb_enc_codelen(c, enc);
20006 rb_enc_mbcput(c, tokspace(p, len), enc);
20007}
20008
20009static int
20010tokadd_escape(struct parser_params *p)
20011{
20012 int c;
20013 size_t numlen;
20014 const char *begin = p->lex.pcur;
20015
20016 switch (c = nextc(p)) {
20017 case '\n':
20018 return 0; /* just ignore */
20019
20020 case '0': case '1': case '2': case '3': /* octal constant */
20021 case '4': case '5': case '6': case '7':
20022 {
20023 ruby_scan_oct(--p->lex.pcur, 3, &numlen);
20024 if (numlen == 0) goto eof;
20025 p->lex.pcur += numlen;
20026 tokcopy(p, (int)numlen + 1);
20027 }
20028 return 0;
20029
20030 case 'x': /* hex constant */
20031 {
20032 tok_hex(p, &numlen);
20033 if (numlen == 0) return -1;
20034 tokcopy(p, (int)numlen + 2);
20035 }
20036 return 0;
20037
20038 eof:
20039 case -1:
20040 flush_string_content(p, p->enc, p->lex.pcur - begin);
20041 yyerror0("Invalid escape character syntax");
20042 token_flush(p);
20043 return -1;
20044
20045 default:
20046 tokadd(p, '\\');
20047 tokadd(p, c);
20048 }
20049 return 0;
20050}
20051
20052static int
20053char_to_option(int c)
20054{
20055 int val;
20056
20057 switch (c) {
20058 case 'i':
20059 val = RE_ONIG_OPTION_IGNORECASE;
20060 break;
20061 case 'x':
20062 val = RE_ONIG_OPTION_EXTEND;
20063 break;
20064 case 'm':
20065 val = RE_ONIG_OPTION_MULTILINE;
20066 break;
20067 default:
20068 val = 0;
20069 break;
20070 }
20071 return val;
20072}
20073
20074#define ARG_ENCODING_FIXED 16
20075#define ARG_ENCODING_NONE 32
20076#define ENC_ASCII8BIT 1
20077#define ENC_EUC_JP 2
20078#define ENC_Windows_31J 3
20079#define ENC_UTF8 4
20080
20081static int
20082char_to_option_kcode(int c, int *option, int *kcode)
20083{
20084 *option = 0;
20085
20086 switch (c) {
20087 case 'n':
20088 *kcode = ENC_ASCII8BIT;
20089 return (*option = ARG_ENCODING_NONE);
20090 case 'e':
20091 *kcode = ENC_EUC_JP;
20092 break;
20093 case 's':
20094 *kcode = ENC_Windows_31J;
20095 break;
20096 case 'u':
20097 *kcode = ENC_UTF8;
20098 break;
20099 default:
20100 *kcode = -1;
20101 return (*option = char_to_option(c));
20102 }
20103 *option = ARG_ENCODING_FIXED;
20104 return 1;
20105}
20106
20107static int
20108regx_options(struct parser_params *p)
20109{
20110 int kcode = 0;
20111 int kopt = 0;
20112 int options = 0;
20113 int c, opt, kc;
20114
20115 newtok(p);
20116 while (c = nextc(p), ISALPHA(c)) {
20117 if (c == 'o') {
20118 options |= RE_OPTION_ONCE;
20119 }
20120 else if (char_to_option_kcode(c, &opt, &kc)) {
20121 if (kc >= 0) {
20122 if (kc != ENC_ASCII8BIT) kcode = c;
20123 kopt = opt;
20124 }
20125 else {
20126 options |= opt;
20127 }
20128 }
20129 else {
20130 tokadd(p, c);
20131 }
20132 }
20133 options |= kopt;
20134 pushback(p, c);
20135 if (toklen(p)) {
20136 YYLTYPE loc = RUBY_INIT_YYLLOC();
20137 tokfix(p);
20138 compile_error(p, "unknown regexp option%s - %*s",
20139 toklen(p) > 1 ? "s" : "", toklen(p), tok(p));
20140 parser_show_error_line(p, &loc);
20141 }
20142 return options | RE_OPTION_ENCODING(kcode);
20143}
20144
20145static int
20146tokadd_mbchar(struct parser_params *p, int c)
20147{
20148 int len = parser_precise_mbclen(p, p->lex.pcur-1);
20149 if (len < 0) return -1;
20150 tokadd(p, c);
20151 p->lex.pcur += --len;
20152 if (len > 0) tokcopy(p, len);
20153 return c;
20154}
20155
20156static inline int
20157simple_re_meta(int c)
20158{
20159 switch (c) {
20160 case '$': case '*': case '+': case '.':
20161 case '?': case '^': case '|':
20162 case ')': case ']': case '}': case '>':
20163 return TRUE;
20164 default:
20165 return FALSE;
20166 }
20167}
20168
20169static int
20170parser_update_heredoc_indent(struct parser_params *p, int c)
20171{
20172 if (p->heredoc_line_indent == -1) {
20173 if (c == '\n') p->heredoc_line_indent = 0;
20174 }
20175 else {
20176 if (c == ' ') {
20177 p->heredoc_line_indent++;
20178 return TRUE;
20179 }
20180 else if (c == '\t') {
20181 int w = (p->heredoc_line_indent / TAB_WIDTH) + 1;
20182 p->heredoc_line_indent = w * TAB_WIDTH;
20183 return TRUE;
20184 }
20185 else if (c != '\n') {
20186 if (p->heredoc_indent > p->heredoc_line_indent) {
20187 p->heredoc_indent = p->heredoc_line_indent;
20188 }
20189 p->heredoc_line_indent = -1;
20190 }
20191 else {
20192 /* Whitespace only line has no indentation */
20193 p->heredoc_line_indent = 0;
20194 }
20195 }
20196 return FALSE;
20197}
20198
20199static void
20200parser_mixed_error(struct parser_params *p, rb_encoding *enc1, rb_encoding *enc2)
20201{
20202 YYLTYPE loc = RUBY_INIT_YYLLOC();
20203 const char *n1 = rb_enc_name(enc1), *n2 = rb_enc_name(enc2);
20204 compile_error(p, "%s mixed within %s source", n1, n2);
20205 parser_show_error_line(p, &loc);
20206}
20207
20208static void
20209parser_mixed_escape(struct parser_params *p, const char *beg, rb_encoding *enc1, rb_encoding *enc2)
20210{
20211 const char *pos = p->lex.pcur;
20212 p->lex.pcur = beg;
20213 parser_mixed_error(p, enc1, enc2);
20214 p->lex.pcur = pos;
20215}
20216
20217static inline char
20218nibble_char_upper(unsigned int c)
20219{
20220 c &= 0xf;
20221 return c + (c < 10 ? '0' : 'A' - 10);
20222}
20223
20224static int
20225tokadd_string(struct parser_params *p,
20226 int func, int term, int paren, long *nest,
20227 rb_encoding **encp, rb_encoding **enc)
20228{
20229 int c;
20230 bool erred = false;
20231#ifdef RIPPER
20232 const int heredoc_end = (p->heredoc_end ? p->heredoc_end + 1 : 0);
20233 int top_of_line = FALSE;
20234#endif
20235
20236#define mixed_error(enc1, enc2) \
20237 (void)(erred || (parser_mixed_error(p, enc1, enc2), erred = true))
20238#define mixed_escape(beg, enc1, enc2) \
20239 (void)(erred || (parser_mixed_escape(p, beg, enc1, enc2), erred = true))
20240
20241 while ((c = nextc(p)) != -1) {
20242 if (p->heredoc_indent > 0) {
20243 parser_update_heredoc_indent(p, c);
20244 }
20245#ifdef RIPPER
20246 if (top_of_line && heredoc_end == p->ruby_sourceline) {
20247 pushback(p, c);
20248 break;
20249 }
20250#endif
20251
20252 if (paren && c == paren) {
20253 ++*nest;
20254 }
20255 else if (c == term) {
20256 if (!nest || !*nest) {
20257 pushback(p, c);
20258 break;
20259 }
20260 --*nest;
20261 }
20262 else if ((func & STR_FUNC_EXPAND) && c == '#' && !lex_eol_p(p)) {
20263 unsigned char c2 = *p->lex.pcur;
20264 if (c2 == '$' || c2 == '@' || c2 == '{') {
20265 pushback(p, c);
20266 break;
20267 }
20268 }
20269 else if (c == '\\') {
20270 c = nextc(p);
20271 switch (c) {
20272 case '\n':
20273 if (func & STR_FUNC_QWORDS) break;
20274 if (func & STR_FUNC_EXPAND) {
20275 if (!(func & STR_FUNC_INDENT) || (p->heredoc_indent < 0))
20276 continue;
20277 if (c == term) {
20278 c = '\\';
20279 goto terminate;
20280 }
20281 }
20282 tokadd(p, '\\');
20283 break;
20284
20285 case '\\':
20286 if (func & STR_FUNC_ESCAPE) tokadd(p, c);
20287 break;
20288
20289 case 'u':
20290 if ((func & STR_FUNC_EXPAND) == 0) {
20291 tokadd(p, '\\');
20292 break;
20293 }
20294 tokadd_utf8(p, enc, term,
20295 func & STR_FUNC_SYMBOL,
20296 func & STR_FUNC_REGEXP);
20297 continue;
20298
20299 default:
20300 if (c == -1) return -1;
20301 if (!ISASCII(c)) {
20302 if ((func & STR_FUNC_EXPAND) == 0) tokadd(p, '\\');
20303 goto non_ascii;
20304 }
20305 if (func & STR_FUNC_REGEXP) {
20306 switch (c) {
20307 case 'c':
20308 case 'C':
20309 case 'M': {
20310 pushback(p, c);
20311 c = read_escape(p, 0, p->lex.pcur - 1);
20312
20313 char *t = tokspace(p, rb_strlen_lit("\\x00"));
20314 *t++ = '\\';
20315 *t++ = 'x';
20316 *t++ = nibble_char_upper(c >> 4);
20317 *t++ = nibble_char_upper(c);
20318 continue;
20319 }
20320 }
20321
20322 if (c == term && !simple_re_meta(c)) {
20323 tokadd(p, c);
20324 continue;
20325 }
20326 pushback(p, c);
20327 if ((c = tokadd_escape(p)) < 0)
20328 return -1;
20329 if (*enc && *enc != *encp) {
20330 mixed_escape(p->lex.ptok+2, *enc, *encp);
20331 }
20332 continue;
20333 }
20334 else if (func & STR_FUNC_EXPAND) {
20335 pushback(p, c);
20336 if (func & STR_FUNC_ESCAPE) tokadd(p, '\\');
20337 c = read_escape(p, 0, p->lex.pcur - 1);
20338 }
20339 else if ((func & STR_FUNC_QWORDS) && ISSPACE(c)) {
20340 /* ignore backslashed spaces in %w */
20341 }
20342 else if (c != term && !(paren && c == paren)) {
20343 tokadd(p, '\\');
20344 pushback(p, c);
20345 continue;
20346 }
20347 }
20348 }
20349 else if (!parser_isascii(p)) {
20350 non_ascii:
20351 if (!*enc) {
20352 *enc = *encp;
20353 }
20354 else if (*enc != *encp) {
20355 mixed_error(*enc, *encp);
20356 continue;
20357 }
20358 if (tokadd_mbchar(p, c) == -1) return -1;
20359 continue;
20360 }
20361 else if ((func & STR_FUNC_QWORDS) && ISSPACE(c)) {
20362 pushback(p, c);
20363 break;
20364 }
20365 if (c & 0x80) {
20366 if (!*enc) {
20367 *enc = *encp;
20368 }
20369 else if (*enc != *encp) {
20370 mixed_error(*enc, *encp);
20371 continue;
20372 }
20373 }
20374 tokadd(p, c);
20375#ifdef RIPPER
20376 top_of_line = (c == '\n');
20377#endif
20378 }
20379 terminate:
20380 if (*enc) *encp = *enc;
20381 return c;
20382}
20383
20384#define NEW_STRTERM(func, term, paren) new_strterm(p, func, term, paren)
20385
20386static void
20387flush_string_content(struct parser_params *p, rb_encoding *enc, size_t back)
20388{
20389 p->lex.pcur -= back;
20390 if (has_delayed_token(p)) {
20391 ptrdiff_t len = p->lex.pcur - p->lex.ptok;
20392 if (len > 0) {
20393 rb_parser_enc_str_buf_cat(p, p->delayed.token, p->lex.ptok, len, enc);
20394 p->delayed.end_line = p->ruby_sourceline;
20395 p->delayed.end_col = rb_long2int(p->lex.pcur - p->lex.pbeg);
20396 }
20397 dispatch_delayed_token(p, tSTRING_CONTENT);
20398 p->lex.ptok = p->lex.pcur;
20399 }
20400 dispatch_scan_event(p, tSTRING_CONTENT);
20401 p->lex.pcur += back;
20402}
20403
20404/* this can be shared with ripper, since it's independent from struct
20405 * parser_params. */
20406#ifndef RIPPER
20407#define BIT(c, idx) (((c) / 32 - 1 == idx) ? (1U << ((c) % 32)) : 0)
20408#define SPECIAL_PUNCT(idx) ( \
20409 BIT('~', idx) | BIT('*', idx) | BIT('$', idx) | BIT('?', idx) | \
20410 BIT('!', idx) | BIT('@', idx) | BIT('/', idx) | BIT('\\', idx) | \
20411 BIT(';', idx) | BIT(',', idx) | BIT('.', idx) | BIT('=', idx) | \
20412 BIT(':', idx) | BIT('<', idx) | BIT('>', idx) | BIT('\"', idx) | \
20413 BIT('&', idx) | BIT('`', idx) | BIT('\'', idx) | BIT('+', idx) | \
20414 BIT('0', idx))
20415const uint_least32_t ruby_global_name_punct_bits[] = {
20416 SPECIAL_PUNCT(0),
20417 SPECIAL_PUNCT(1),
20418 SPECIAL_PUNCT(2),
20419};
20420#undef BIT
20421#undef SPECIAL_PUNCT
20422#endif
20423
20424static enum yytokentype
20425parser_peek_variable_name(struct parser_params *p)
20426{
20427 int c;
20428 const char *ptr = p->lex.pcur;
20429
20430 if (lex_eol_ptr_n_p(p, ptr, 1)) return 0;
20431 c = *ptr++;
20432 switch (c) {
20433 case '$':
20434 if ((c = *ptr) == '-') {
20435 if (lex_eol_ptr_p(p, ++ptr)) return 0;
20436 c = *ptr;
20437 }
20438 else if (is_global_name_punct(c) || ISDIGIT(c)) {
20439 return tSTRING_DVAR;
20440 }
20441 break;
20442 case '@':
20443 if ((c = *ptr) == '@') {
20444 if (lex_eol_ptr_p(p, ++ptr)) return 0;
20445 c = *ptr;
20446 }
20447 break;
20448 case '{':
20449 p->lex.pcur = ptr;
20450 p->command_start = TRUE;
20451 yylval.state = p->lex.state;
20452 return tSTRING_DBEG;
20453 default:
20454 return 0;
20455 }
20456 if (!ISASCII(c) || c == '_' || ISALPHA(c))
20457 return tSTRING_DVAR;
20458 return 0;
20459}
20460
20461#define IS_ARG() IS_lex_state(EXPR_ARG_ANY)
20462#define IS_END() IS_lex_state(EXPR_END_ANY)
20463#define IS_BEG() (IS_lex_state(EXPR_BEG_ANY) || IS_lex_state_all(EXPR_ARG|EXPR_LABELED))
20464#define IS_SPCARG(c) (IS_ARG() && space_seen && !ISSPACE(c))
20465#define IS_LABEL_POSSIBLE() (\
20466 (IS_lex_state(EXPR_LABEL|EXPR_ENDFN) && !cmd_state) || \
20467 IS_ARG())
20468#define IS_LABEL_SUFFIX(n) (peek_n(p, ':',(n)) && !peek_n(p, ':', (n)+1))
20469#define IS_AFTER_OPERATOR() IS_lex_state(EXPR_FNAME | EXPR_DOT)
20470
20471static inline enum yytokentype
20472parser_string_term(struct parser_params *p, int func)
20473{
20474 xfree(p->lex.strterm);
20475 p->lex.strterm = 0;
20476 if (func & STR_FUNC_REGEXP) {
20477 set_yylval_num(regx_options(p));
20478 dispatch_scan_event(p, tREGEXP_END);
20479 SET_LEX_STATE(EXPR_END);
20480 return tREGEXP_END;
20481 }
20482 if ((func & STR_FUNC_LABEL) && IS_LABEL_SUFFIX(0)) {
20483 nextc(p);
20484 SET_LEX_STATE(EXPR_ARG|EXPR_LABELED);
20485 return tLABEL_END;
20486 }
20487 SET_LEX_STATE(EXPR_END);
20488 return tSTRING_END;
20489}
20490
20491static enum yytokentype
20492parse_string(struct parser_params *p, rb_strterm_literal_t *quote)
20493{
20494 int func = quote->func;
20495 int term = quote->term;
20496 int paren = quote->paren;
20497 int c, space = 0;
20498 rb_encoding *enc = p->enc;
20499 rb_encoding *base_enc = 0;
20500 rb_parser_string_t *lit;
20501
20502 if (func & STR_FUNC_TERM) {
20503 if (func & STR_FUNC_QWORDS) nextc(p); /* delayed term */
20504 SET_LEX_STATE(EXPR_END);
20505 xfree(p->lex.strterm);
20506 p->lex.strterm = 0;
20507 return func & STR_FUNC_REGEXP ? tREGEXP_END : tSTRING_END;
20508 }
20509 c = nextc(p);
20510 if ((func & STR_FUNC_QWORDS) && ISSPACE(c)) {
20511 while (c != '\n' && ISSPACE(c = nextc(p)));
20512 space = 1;
20513 }
20514 if (func & STR_FUNC_LIST) {
20515 quote->func &= ~STR_FUNC_LIST;
20516 space = 1;
20517 }
20518 if (c == term && !quote->nest) {
20519 if (func & STR_FUNC_QWORDS) {
20520 quote->func |= STR_FUNC_TERM;
20521 pushback(p, c); /* dispatch the term at tSTRING_END */
20522 add_delayed_token(p, p->lex.ptok, p->lex.pcur);
20523 return ' ';
20524 }
20525 return parser_string_term(p, func);
20526 }
20527 if (space) {
20528 if (!ISSPACE(c)) pushback(p, c);
20529 add_delayed_token(p, p->lex.ptok, p->lex.pcur);
20530 return ' ';
20531 }
20532 newtok(p);
20533 if ((func & STR_FUNC_EXPAND) && c == '#') {
20534 enum yytokentype t = parser_peek_variable_name(p);
20535 if (t) return t;
20536 tokadd(p, '#');
20537 c = nextc(p);
20538 }
20539 pushback(p, c);
20540 if (tokadd_string(p, func, term, paren, &quote->nest,
20541 &enc, &base_enc) == -1) {
20542 if (p->eofp) {
20543#ifndef RIPPER
20544# define unterminated_literal(mesg) yyerror0(mesg)
20545#else
20546# define unterminated_literal(mesg) compile_error(p, mesg)
20547#endif
20548 literal_flush(p, p->lex.pcur);
20549 if (func & STR_FUNC_QWORDS) {
20550 /* no content to add, bailing out here */
20551 unterminated_literal("unterminated list meets end of file");
20552 xfree(p->lex.strterm);
20553 p->lex.strterm = 0;
20554 return tSTRING_END;
20555 }
20556 if (func & STR_FUNC_REGEXP) {
20557 unterminated_literal("unterminated regexp meets end of file");
20558 }
20559 else {
20560 unterminated_literal("unterminated string meets end of file");
20561 }
20562 quote->func |= STR_FUNC_TERM;
20563 }
20564 }
20565
20566 tokfix(p);
20567 lit = STR_NEW3(tok(p), toklen(p), enc, func);
20568 set_yylval_str(lit);
20569 flush_string_content(p, enc, 0);
20570
20571 return tSTRING_CONTENT;
20572}
20573
20574static enum yytokentype
20575heredoc_identifier(struct parser_params *p)
20576{
20577 /*
20578 * term_len is length of `<<"END"` except `END`,
20579 * in this case term_len is 4 (<, <, " and ").
20580 */
20581 long len, offset = p->lex.pcur - p->lex.pbeg;
20582 int c = nextc(p), term, func = 0, quote = 0;
20583 enum yytokentype token = tSTRING_BEG;
20584 int indent = 0;
20585
20586 if (c == '-') {
20587 c = nextc(p);
20588 func = STR_FUNC_INDENT;
20589 offset++;
20590 }
20591 else if (c == '~') {
20592 c = nextc(p);
20593 func = STR_FUNC_INDENT;
20594 offset++;
20595 indent = INT_MAX;
20596 }
20597 switch (c) {
20598 case '\'':
20599 func |= str_squote; goto quoted;
20600 case '"':
20601 func |= str_dquote; goto quoted;
20602 case '`':
20603 token = tXSTRING_BEG;
20604 func |= str_xquote; goto quoted;
20605
20606 quoted:
20607 quote++;
20608 offset++;
20609 term = c;
20610 len = 0;
20611 while ((c = nextc(p)) != term) {
20612 if (c == -1 || c == '\r' || c == '\n') {
20613 yyerror0("unterminated here document identifier");
20614 return -1;
20615 }
20616 }
20617 break;
20618
20619 default:
20620 if (!parser_is_identchar(p)) {
20621 pushback(p, c);
20622 if (func & STR_FUNC_INDENT) {
20623 pushback(p, indent > 0 ? '~' : '-');
20624 }
20625 return 0;
20626 }
20627 func |= str_dquote;
20628 do {
20629 int n = parser_precise_mbclen(p, p->lex.pcur-1);
20630 if (n < 0) return 0;
20631 p->lex.pcur += --n;
20632 } while ((c = nextc(p)) != -1 && parser_is_identchar(p));
20633 pushback(p, c);
20634 break;
20635 }
20636
20637 len = p->lex.pcur - (p->lex.pbeg + offset) - quote;
20638 if ((unsigned long)len >= HERETERM_LENGTH_MAX)
20639 yyerror0("too long here document identifier");
20640 dispatch_scan_event(p, tHEREDOC_BEG);
20641 lex_goto_eol(p);
20642
20643 p->lex.strterm = new_heredoc(p);
20644 rb_strterm_heredoc_t *here = &p->lex.strterm->u.heredoc;
20645 here->offset = offset;
20646 here->sourceline = p->ruby_sourceline;
20647 here->length = (unsigned)len;
20648 here->quote = quote;
20649 here->func = func;
20650 here->lastline = p->lex.lastline;
20651
20652 token_flush(p);
20653 p->heredoc_indent = indent;
20654 p->heredoc_line_indent = 0;
20655 return token;
20656}
20657
20658static void
20659heredoc_restore(struct parser_params *p, rb_strterm_heredoc_t *here)
20660{
20661 rb_parser_string_t *line;
20662 rb_strterm_t *term = p->lex.strterm;
20663
20664 p->lex.strterm = 0;
20665 line = here->lastline;
20666 p->lex.lastline = line;
20667 p->lex.pbeg = PARSER_STRING_PTR(line);
20668 p->lex.pend = p->lex.pbeg + PARSER_STRING_LEN(line);
20669 p->lex.pcur = p->lex.pbeg + here->offset + here->length + here->quote;
20670 p->lex.ptok = p->lex.pbeg + here->offset - here->quote;
20671 p->heredoc_end = p->ruby_sourceline;
20672 p->ruby_sourceline = (int)here->sourceline;
20673 if (p->eofp) p->lex.nextline = AFTER_HEREDOC_WITHOUT_TERMINATOR;
20674 p->eofp = 0;
20675 xfree(term);
20676}
20677
20678static int
20679dedent_string_column(const char *str, long len, int width)
20680{
20681 int i, col = 0;
20682
20683 for (i = 0; i < len && col < width; i++) {
20684 if (str[i] == ' ') {
20685 col++;
20686 }
20687 else if (str[i] == '\t') {
20688 int n = TAB_WIDTH * (col / TAB_WIDTH + 1);
20689 if (n > width) break;
20690 col = n;
20691 }
20692 else {
20693 break;
20694 }
20695 }
20696
20697 return i;
20698}
20699
20700static int
20701dedent_string(struct parser_params *p, rb_parser_string_t *string, int width)
20702{
20703 char *str;
20704 long len;
20705 int i;
20706
20707 len = PARSER_STRING_LEN(string);
20708 str = PARSER_STRING_PTR(string);
20709
20710 i = dedent_string_column(str, len, width);
20711 if (!i) return 0;
20712
20713 rb_parser_str_modify(string);
20714 str = PARSER_STRING_PTR(string);
20715 if (PARSER_STRING_LEN(string) != len)
20716 rb_fatal("literal string changed: %s", PARSER_STRING_PTR(string));
20717 MEMMOVE(str, str + i, char, len - i);
20718 rb_parser_str_set_len(p, string, len - i);
20719 return i;
20720}
20721
20722static NODE *
20723heredoc_dedent(struct parser_params *p, NODE *root)
20724{
20725 NODE *node, *str_node, *prev_node;
20726 int indent = p->heredoc_indent;
20727 rb_parser_string_t *prev_lit = 0;
20728
20729 if (indent <= 0) return root;
20730 if (!root) return root;
20731
20732 prev_node = node = str_node = root;
20733 if (nd_type_p(root, NODE_LIST)) str_node = RNODE_LIST(root)->nd_head;
20734
20735 while (str_node) {
20736 rb_parser_string_t *lit = RNODE_STR(str_node)->string;
20737 if (nd_fl_newline(str_node)) {
20738 dedent_string(p, lit, indent);
20739 }
20740 if (!prev_lit) {
20741 prev_lit = lit;
20742 }
20743 else if (!literal_concat0(p, prev_lit, lit)) {
20744 return 0;
20745 }
20746 else {
20747 NODE *end = RNODE_LIST(node)->as.nd_end;
20748 node = RNODE_LIST(prev_node)->nd_next = RNODE_LIST(node)->nd_next;
20749 if (!node) {
20750 if (nd_type_p(prev_node, NODE_DSTR))
20751 nd_set_type(prev_node, NODE_STR);
20752 break;
20753 }
20754 RNODE_LIST(node)->as.nd_end = end;
20755 goto next_str;
20756 }
20757
20758 str_node = 0;
20759 while ((nd_type_p(node, NODE_LIST) || nd_type_p(node, NODE_DSTR)) && (node = RNODE_LIST(prev_node = node)->nd_next) != 0) {
20760 next_str:
20761 if (!nd_type_p(node, NODE_LIST)) break;
20762 if ((str_node = RNODE_LIST(node)->nd_head) != 0) {
20763 enum node_type type = nd_type(str_node);
20764 if (type == NODE_STR || type == NODE_DSTR) break;
20765 prev_lit = 0;
20766 str_node = 0;
20767 }
20768 }
20769 }
20770 return root;
20771}
20772
20773static int
20774whole_match_p(struct parser_params *p, const char *eos, long len, int indent)
20775{
20776 const char *beg = p->lex.pbeg;
20777 const char *ptr = p->lex.pend;
20778
20779 if (ptr - beg < len) return FALSE;
20780 if (ptr > beg && ptr[-1] == '\n') {
20781 if (--ptr > beg && ptr[-1] == '\r') --ptr;
20782 if (ptr - beg < len) return FALSE;
20783 }
20784 if (strncmp(eos, ptr -= len, len)) return FALSE;
20785 if (indent) {
20786 while (beg < ptr && ISSPACE(*beg)) beg++;
20787 }
20788 return beg == ptr;
20789}
20790
20791static int
20792word_match_p(struct parser_params *p, const char *word, long len)
20793{
20794 if (strncmp(p->lex.pcur, word, len)) return 0;
20795 if (lex_eol_n_p(p, len)) return 1;
20796 int c = (unsigned char)p->lex.pcur[len];
20797 if (ISSPACE(c)) return 1;
20798 switch (c) {
20799 case '\0': case '\004': case '\032': return 1;
20800 }
20801 return 0;
20802}
20803
20804#define NUM_SUFFIX_R (1<<0)
20805#define NUM_SUFFIX_I (1<<1)
20806#define NUM_SUFFIX_ALL 3
20807
20808static int
20809number_literal_suffix(struct parser_params *p, int mask)
20810{
20811 int c, result = 0;
20812 const char *lastp = p->lex.pcur;
20813
20814 while ((c = nextc(p)) != -1) {
20815 if ((mask & NUM_SUFFIX_I) && c == 'i') {
20816 result |= (mask & NUM_SUFFIX_I);
20817 mask &= ~NUM_SUFFIX_I;
20818 /* r after i, rational of complex is disallowed */
20819 mask &= ~NUM_SUFFIX_R;
20820 continue;
20821 }
20822 if ((mask & NUM_SUFFIX_R) && c == 'r') {
20823 result |= (mask & NUM_SUFFIX_R);
20824 mask &= ~NUM_SUFFIX_R;
20825 continue;
20826 }
20827 if (!ISASCII(c) || ISALPHA(c) || c == '_') {
20828 p->lex.pcur = lastp;
20829 return 0;
20830 }
20831 pushback(p, c);
20832 break;
20833 }
20834 return result;
20835}
20836
20837static enum yytokentype
20838set_number_literal(struct parser_params *p, enum yytokentype type, int suffix, int base, int seen_point)
20839{
20840 enum rb_numeric_type numeric_type = integer_literal;
20841
20842 if (type == tFLOAT) {
20843 numeric_type = float_literal;
20844 }
20845
20846 if (suffix & NUM_SUFFIX_R) {
20847 type = tRATIONAL;
20848 numeric_type = rational_literal;
20849 }
20850 if (suffix & NUM_SUFFIX_I) {
20851 type = tIMAGINARY;
20852 }
20853
20854 switch (type) {
20855 case tINTEGER:
20856 set_yylval_node(NEW_INTEGER(strdup(tok(p)), base, &_cur_loc));
20857 break;
20858 case tFLOAT:
20859 set_yylval_node(NEW_FLOAT(strdup(tok(p)), &_cur_loc));
20860 break;
20861 case tRATIONAL:
20862 set_yylval_node(NEW_RATIONAL(strdup(tok(p)), base, seen_point, &_cur_loc));
20863 break;
20864 case tIMAGINARY:
20865 set_yylval_node(NEW_IMAGINARY(strdup(tok(p)), base, seen_point, numeric_type, &_cur_loc));
20866 (void)numeric_type; /* for ripper */
20867 break;
20868 default:
20869 rb_bug("unexpected token: %d", type);
20870 }
20871 SET_LEX_STATE(EXPR_END);
20872 return type;
20873}
20874
20875#define dispatch_heredoc_end(p) parser_dispatch_heredoc_end(p, __LINE__)
20876static void
20877parser_dispatch_heredoc_end(struct parser_params *p, int line)
20878{
20879 if (has_delayed_token(p))
20880 dispatch_delayed_token(p, tSTRING_CONTENT);
20881
20882#ifdef RIPPER
20883 VALUE str = STR_NEW(p->lex.ptok, p->lex.pend - p->lex.ptok);
20884 ripper_dispatch1(p, ripper_token2eventid(tHEREDOC_END), str);
20885#else
20886 if (p->keep_tokens) {
20887 rb_parser_string_t *str = rb_parser_encoding_string_new(p, p->lex.ptok, p->lex.pend - p->lex.ptok, p->enc);
20888 RUBY_SET_YYLLOC_OF_HEREDOC_END(*p->yylloc);
20889 parser_append_tokens(p, str, tHEREDOC_END, line);
20890 }
20891#endif
20892
20893 RUBY_SET_YYLLOC_FROM_STRTERM_HEREDOC(*p->yylloc);
20894 lex_goto_eol(p);
20895 token_flush(p);
20896}
20897
20898static enum yytokentype
20899here_document(struct parser_params *p, rb_strterm_heredoc_t *here)
20900{
20901 int c, func, indent = 0;
20902 const char *eos, *ptr, *ptr_end;
20903 long len;
20904 rb_parser_string_t *str = 0;
20905 rb_encoding *enc = p->enc;
20906 rb_encoding *base_enc = 0;
20907 int bol;
20908#ifdef RIPPER
20909 VALUE s_value;
20910#endif
20911
20912 eos = PARSER_STRING_PTR(here->lastline) + here->offset;
20913 len = here->length;
20914 indent = (func = here->func) & STR_FUNC_INDENT;
20915
20916 if ((c = nextc(p)) == -1) {
20917 error:
20918#ifdef RIPPER
20919 if (!has_delayed_token(p)) {
20920 dispatch_scan_event(p, tSTRING_CONTENT);
20921 }
20922 else if (p->delayed.end_line + 1 == p->ruby_sourceline) {
20923 if ((len = p->lex.pcur - p->lex.ptok) > 0) {
20924 if (!(func & STR_FUNC_REGEXP)) {
20925 int cr = ENC_CODERANGE_UNKNOWN;
20926 rb_str_coderange_scan_restartable(p->lex.ptok, p->lex.pcur, enc, &cr);
20927 if (cr != ENC_CODERANGE_7BIT &&
20928 rb_is_usascii_enc(p->enc) &&
20929 enc != rb_utf8_encoding()) {
20930 enc = rb_ascii8bit_encoding();
20931 }
20932 }
20933 rb_parser_enc_str_buf_cat(p, p->delayed.token, p->lex.ptok, len, enc);
20934 }
20935 dispatch_delayed_token(p, tSTRING_CONTENT);
20936 }
20937 else {
20938 dispatch_delayed_token(p, tSTRING_CONTENT);
20939 dispatch_scan_event(p, tSTRING_CONTENT);
20940 }
20941 lex_goto_eol(p);
20942#endif
20943 heredoc_restore(p, &p->lex.strterm->u.heredoc);
20944 compile_error(p, "can't find string \"%.*s\" anywhere before EOF",
20945 (int)len, eos);
20946 token_flush(p);
20947 SET_LEX_STATE(EXPR_END);
20948 return tSTRING_END;
20949 }
20950 bol = was_bol(p);
20951 if (!bol) {
20952 /* not beginning of line, cannot be the terminator */
20953 }
20954 else if (p->heredoc_line_indent == -1) {
20955 /* `heredoc_line_indent == -1` means
20956 * - "after an interpolation in the same line", or
20957 * - "in a continuing line"
20958 */
20959 p->heredoc_line_indent = 0;
20960 }
20961 else if (whole_match_p(p, eos, len, indent)) {
20962 dispatch_heredoc_end(p);
20963 restore:
20964 heredoc_restore(p, &p->lex.strterm->u.heredoc);
20965 token_flush(p);
20966 SET_LEX_STATE(EXPR_END);
20967 return tSTRING_END;
20968 }
20969
20970 if (!(func & STR_FUNC_EXPAND)) {
20971 do {
20972 ptr = PARSER_STRING_PTR(p->lex.lastline);
20973 ptr_end = p->lex.pend;
20974 if (ptr_end > ptr) {
20975 switch (ptr_end[-1]) {
20976 case '\n':
20977 if (--ptr_end == ptr || ptr_end[-1] != '\r') {
20978 ptr_end++;
20979 break;
20980 }
20981 case '\r':
20982 --ptr_end;
20983 }
20984 }
20985
20986 if (p->heredoc_indent > 0) {
20987 long i = 0;
20988 while (ptr + i < ptr_end && parser_update_heredoc_indent(p, ptr[i]))
20989 i++;
20990 p->heredoc_line_indent = 0;
20991 }
20992
20993 if (str)
20994 parser_str_cat(str, ptr, ptr_end - ptr);
20995 else
20996 str = rb_parser_encoding_string_new(p, ptr, ptr_end - ptr, enc);
20997 if (!lex_eol_ptr_p(p, ptr_end)) parser_str_cat_cstr(str, "\n");
20998 lex_goto_eol(p);
20999 if (p->heredoc_indent > 0) {
21000 goto flush_str;
21001 }
21002 if (nextc(p) == -1) {
21003 if (str) {
21004 rb_parser_string_free(p, str);
21005 str = 0;
21006 }
21007 goto error;
21008 }
21009 } while (!whole_match_p(p, eos, len, indent));
21010 }
21011 else {
21012 /* int mb = ENC_CODERANGE_7BIT, *mbp = &mb;*/
21013 newtok(p);
21014 if (c == '#') {
21015 enum yytokentype t = parser_peek_variable_name(p);
21016 if (p->heredoc_line_indent != -1) {
21017 if (p->heredoc_indent > p->heredoc_line_indent) {
21018 p->heredoc_indent = p->heredoc_line_indent;
21019 }
21020 p->heredoc_line_indent = -1;
21021 }
21022 if (t) return t;
21023 tokadd(p, '#');
21024 c = nextc(p);
21025 }
21026 do {
21027 pushback(p, c);
21028 enc = p->enc;
21029 if ((c = tokadd_string(p, func, '\n', 0, NULL, &enc, &base_enc)) == -1) {
21030 if (p->eofp) goto error;
21031 goto restore;
21032 }
21033 if (c != '\n') {
21034 if (c == '\\') p->heredoc_line_indent = -1;
21035 flush:
21036 str = STR_NEW3(tok(p), toklen(p), enc, func);
21037 flush_str:
21038 set_yylval_str(str);
21039#ifndef RIPPER
21040 if (bol) nd_set_fl_newline(yylval.node);
21041#endif
21042 flush_string_content(p, enc, 0);
21043 return tSTRING_CONTENT;
21044 }
21045 tokadd(p, nextc(p));
21046 if (p->heredoc_indent > 0) {
21047 lex_goto_eol(p);
21048 goto flush;
21049 }
21050 /* if (mbp && mb == ENC_CODERANGE_UNKNOWN) mbp = 0;*/
21051 if ((c = nextc(p)) == -1) goto error;
21052 } while (!whole_match_p(p, eos, len, indent));
21053 str = STR_NEW3(tok(p), toklen(p), enc, func);
21054 }
21055 dispatch_heredoc_end(p);
21056 heredoc_restore(p, &p->lex.strterm->u.heredoc);
21057 token_flush(p);
21058 p->lex.strterm = NEW_STRTERM(func | STR_FUNC_TERM, 0, 0);
21059#ifdef RIPPER
21060 /* Preserve s_value for set_yylval_str */
21061 s_value = p->s_value;
21062#endif
21063 set_yylval_str(str);
21064#ifdef RIPPER
21065 set_parser_s_value(s_value);
21066#endif
21067
21068#ifndef RIPPER
21069 if (bol) nd_set_fl_newline(yylval.node);
21070#endif
21071 return tSTRING_CONTENT;
21072}
21073
21074#include "lex.c"
21075
21076static int
21077arg_ambiguous(struct parser_params *p, char c)
21078{
21079#ifndef RIPPER
21080 if (c == '/') {
21081 rb_warning1("ambiguity between regexp and two divisions: wrap regexp in parentheses or add a space after '%c' operator", WARN_I(c));
21082 }
21083 else {
21084 rb_warning1("ambiguous first argument; put parentheses or a space even after '%c' operator", WARN_I(c));
21085 }
21086#else
21087 dispatch1(arg_ambiguous, rb_usascii_str_new(&c, 1));
21088#endif
21089 return TRUE;
21090}
21091
21092/* returns true value if formal argument error;
21093 * Qtrue, or error message if ripper */
21094static VALUE
21095formal_argument_error(struct parser_params *p, ID id)
21096{
21097 switch (id_type(id)) {
21098 case ID_LOCAL:
21099 break;
21100#ifndef RIPPER
21101# define ERR(mesg) (yyerror0(mesg), Qtrue)
21102#else
21103# define ERR(mesg) WARN_S(mesg)
21104#endif
21105 case ID_CONST:
21106 return ERR("formal argument cannot be a constant");
21107 case ID_INSTANCE:
21108 return ERR("formal argument cannot be an instance variable");
21109 case ID_GLOBAL:
21110 return ERR("formal argument cannot be a global variable");
21111 case ID_CLASS:
21112 return ERR("formal argument cannot be a class variable");
21113 default:
21114 return ERR("formal argument must be local variable");
21115#undef ERR
21116 }
21117 shadowing_lvar(p, id);
21118
21119 return Qfalse;
21120}
21121
21122static int
21123lvar_defined(struct parser_params *p, ID id)
21124{
21125 return (dyna_in_block(p) && dvar_defined(p, id)) || local_id(p, id);
21126}
21127
21128/* emacsen -*- hack */
21129static long
21130parser_encode_length(struct parser_params *p, const char *name, long len)
21131{
21132 long nlen;
21133
21134 if (len > 5 && name[nlen = len - 5] == '-') {
21135 if (rb_memcicmp(name + nlen + 1, "unix", 4) == 0)
21136 return nlen;
21137 }
21138 if (len > 4 && name[nlen = len - 4] == '-') {
21139 if (rb_memcicmp(name + nlen + 1, "dos", 3) == 0)
21140 return nlen;
21141 if (rb_memcicmp(name + nlen + 1, "mac", 3) == 0 &&
21142 !(len == 8 && rb_memcicmp(name, "utf8-mac", len) == 0))
21143 /* exclude UTF8-MAC because the encoding named "UTF8" doesn't exist in Ruby */
21144 return nlen;
21145 }
21146 return len;
21147}
21148
21149static void
21150parser_set_encode(struct parser_params *p, const char *name)
21151{
21152 rb_encoding *enc;
21153 VALUE excargs[3];
21154 int idx = 0;
21155
21156 const char *wrong = 0;
21157 switch (*name) {
21158 case 'e': case 'E': wrong = "external"; break;
21159 case 'i': case 'I': wrong = "internal"; break;
21160 case 'f': case 'F': wrong = "filesystem"; break;
21161 case 'l': case 'L': wrong = "locale"; break;
21162 }
21163 if (wrong && STRCASECMP(name, wrong) == 0) goto unknown;
21164 idx = rb_enc_find_index(name);
21165 if (idx < 0) {
21166 unknown:
21167 excargs[1] = rb_sprintf("unknown encoding name: %s", name);
21168 error:
21169 excargs[0] = rb_eArgError;
21170 excargs[2] = rb_make_backtrace();
21171 rb_ary_unshift(excargs[2], rb_sprintf("%"PRIsVALUE":%d", p->ruby_sourcefile_string, p->ruby_sourceline));
21172 VALUE exc = rb_make_exception(3, excargs);
21173 ruby_show_error_line(p, exc, &(YYLTYPE)RUBY_INIT_YYLLOC(), p->ruby_sourceline, p->lex.lastline);
21174
21175 rb_ast_free(p->ast);
21176 p->ast = NULL;
21177
21178 rb_exc_raise(exc);
21179 }
21180 enc = rb_enc_from_index(idx);
21181 if (!rb_enc_asciicompat(enc)) {
21182 excargs[1] = rb_sprintf("%s is not ASCII compatible", rb_enc_name(enc));
21183 goto error;
21184 }
21185 p->enc = enc;
21186#ifndef RIPPER
21187 if (p->debug_lines) {
21188 long i;
21189 for (i = 0; i < p->debug_lines->len; i++) {
21190 rb_parser_enc_associate(p, p->debug_lines->data[i], enc);
21191 }
21192 }
21193#endif
21194}
21195
21196static bool
21197comment_at_top(struct parser_params *p)
21198{
21199 if (p->token_seen) return false;
21200 return (p->line_count == (p->has_shebang ? 2 : 1));
21201}
21202
21203typedef long (*rb_magic_comment_length_t)(struct parser_params *p, const char *name, long len);
21204typedef void (*rb_magic_comment_setter_t)(struct parser_params *p, const char *name, const char *val);
21205
21206static int parser_invalid_pragma_value(struct parser_params *p, const char *name, const char *val);
21207
21208static void
21209magic_comment_encoding(struct parser_params *p, const char *name, const char *val)
21210{
21211 if (!comment_at_top(p)) {
21212 return;
21213 }
21214 parser_set_encode(p, val);
21215}
21216
21217static int
21218parser_get_bool(struct parser_params *p, const char *name, const char *val)
21219{
21220 switch (*val) {
21221 case 't': case 'T':
21222 if (STRCASECMP(val, "true") == 0) {
21223 return TRUE;
21224 }
21225 break;
21226 case 'f': case 'F':
21227 if (STRCASECMP(val, "false") == 0) {
21228 return FALSE;
21229 }
21230 break;
21231 }
21232 return parser_invalid_pragma_value(p, name, val);
21233}
21234
21235static int
21236parser_invalid_pragma_value(struct parser_params *p, const char *name, const char *val)
21237{
21238 rb_warning2("invalid value for %s: %s", WARN_S(name), WARN_S(val));
21239 return -1;
21240}
21241
21242static void
21243parser_set_token_info(struct parser_params *p, const char *name, const char *val)
21244{
21245 int b = parser_get_bool(p, name, val);
21246 if (b >= 0) p->token_info_enabled = b;
21247}
21248
21249static void
21250parser_set_frozen_string_literal(struct parser_params *p, const char *name, const char *val)
21251{
21252 int b;
21253
21254 if (p->token_seen) {
21255 rb_warning1("'%s' is ignored after any tokens", WARN_S(name));
21256 return;
21257 }
21258
21259 b = parser_get_bool(p, name, val);
21260 if (b < 0) return;
21261
21262 p->frozen_string_literal = b;
21263}
21264
21265static void
21266parser_set_shareable_constant_value(struct parser_params *p, const char *name, const char *val)
21267{
21268 for (const char *s = p->lex.pbeg, *e = p->lex.pcur; s < e; ++s) {
21269 if (*s == ' ' || *s == '\t') continue;
21270 if (*s == '#') break;
21271 rb_warning1("'%s' is ignored unless in comment-only line", WARN_S(name));
21272 return;
21273 }
21274
21275 switch (*val) {
21276 case 'n': case 'N':
21277 if (STRCASECMP(val, "none") == 0) {
21278 p->ctxt.shareable_constant_value = rb_parser_shareable_none;
21279 return;
21280 }
21281 break;
21282 case 'l': case 'L':
21283 if (STRCASECMP(val, "literal") == 0) {
21284 p->ctxt.shareable_constant_value = rb_parser_shareable_literal;
21285 return;
21286 }
21287 break;
21288 case 'e': case 'E':
21289 if (STRCASECMP(val, "experimental_copy") == 0) {
21290 p->ctxt.shareable_constant_value = rb_parser_shareable_copy;
21291 return;
21292 }
21293 if (STRCASECMP(val, "experimental_everything") == 0) {
21294 p->ctxt.shareable_constant_value = rb_parser_shareable_everything;
21295 return;
21296 }
21297 break;
21298 }
21299 parser_invalid_pragma_value(p, name, val);
21300}
21301
21302# if WARN_PAST_SCOPE
21303static void
21304parser_set_past_scope(struct parser_params *p, const char *name, const char *val)
21305{
21306 int b = parser_get_bool(p, name, val);
21307 if (b >= 0) p->past_scope_enabled = b;
21308}
21309# endif
21310
21312 const char *name;
21313 rb_magic_comment_setter_t func;
21314 rb_magic_comment_length_t length;
21315};
21316
21317static const struct magic_comment magic_comments[] = {
21318 {"coding", magic_comment_encoding, parser_encode_length},
21319 {"encoding", magic_comment_encoding, parser_encode_length},
21320 {"frozen_string_literal", parser_set_frozen_string_literal},
21321 {"shareable_constant_value", parser_set_shareable_constant_value},
21322 {"warn_indent", parser_set_token_info},
21323# if WARN_PAST_SCOPE
21324 {"warn_past_scope", parser_set_past_scope},
21325# endif
21326};
21327
21328static const char *
21329magic_comment_marker(const char *str, long len)
21330{
21331 long i = 2;
21332
21333 while (i < len) {
21334 switch (str[i]) {
21335 case '-':
21336 if (str[i-1] == '*' && str[i-2] == '-') {
21337 return str + i + 1;
21338 }
21339 i += 2;
21340 break;
21341 case '*':
21342 if (i + 1 >= len) return 0;
21343 if (str[i+1] != '-') {
21344 i += 4;
21345 }
21346 else if (str[i-1] != '-') {
21347 i += 2;
21348 }
21349 else {
21350 return str + i + 2;
21351 }
21352 break;
21353 default:
21354 i += 3;
21355 break;
21356 }
21357 }
21358 return 0;
21359}
21360
21361static int
21362parser_magic_comment(struct parser_params *p, const char *str, long len)
21363{
21364 int indicator = 0;
21365 VALUE name = 0, val = 0;
21366 const char *beg, *end, *vbeg, *vend;
21367#define str_copy(_s, _p, _n) ((_s) \
21368 ? (void)(rb_str_resize((_s), (_n)), \
21369 MEMCPY(RSTRING_PTR(_s), (_p), char, (_n)), (_s)) \
21370 : (void)((_s) = STR_NEW((_p), (_n))))
21371
21372 if (len <= 7) return FALSE;
21373 if (!!(beg = magic_comment_marker(str, len))) {
21374 if (!(end = magic_comment_marker(beg, str + len - beg)))
21375 return FALSE;
21376 indicator = TRUE;
21377 str = beg;
21378 len = end - beg - 3;
21379 }
21380
21381 /* %r"([^\\s\'\":;]+)\\s*:\\s*(\"(?:\\\\.|[^\"])*\"|[^\"\\s;]+)[\\s;]*" */
21382 while (len > 0) {
21383 const struct magic_comment *mc = magic_comments;
21384 char *s;
21385 int i;
21386 long n = 0;
21387
21388 for (; len > 0 && *str; str++, --len) {
21389 switch (*str) {
21390 case '\'': case '"': case ':': case ';':
21391 continue;
21392 }
21393 if (!ISSPACE(*str)) break;
21394 }
21395 for (beg = str; len > 0; str++, --len) {
21396 switch (*str) {
21397 case '\'': case '"': case ':': case ';':
21398 break;
21399 default:
21400 if (ISSPACE(*str)) break;
21401 continue;
21402 }
21403 break;
21404 }
21405 for (end = str; len > 0 && ISSPACE(*str); str++, --len);
21406 if (!len) break;
21407 if (*str != ':') {
21408 if (!indicator) return FALSE;
21409 continue;
21410 }
21411
21412 do str++; while (--len > 0 && ISSPACE(*str));
21413 if (!len) break;
21414 const char *tok_beg = str;
21415 if (*str == '"') {
21416 for (vbeg = ++str; --len > 0 && *str != '"'; str++) {
21417 if (*str == '\\') {
21418 --len;
21419 ++str;
21420 }
21421 }
21422 vend = str;
21423 if (len) {
21424 --len;
21425 ++str;
21426 }
21427 }
21428 else {
21429 for (vbeg = str; len > 0 && *str != '"' && *str != ';' && !ISSPACE(*str); --len, str++);
21430 vend = str;
21431 }
21432 const char *tok_end = str;
21433 if (indicator) {
21434 while (len > 0 && (*str == ';' || ISSPACE(*str))) --len, str++;
21435 }
21436 else {
21437 while (len > 0 && (ISSPACE(*str))) --len, str++;
21438 if (len) return FALSE;
21439 }
21440
21441 n = end - beg;
21442 str_copy(name, beg, n);
21443 s = RSTRING_PTR(name);
21444 for (i = 0; i < n; ++i) {
21445 if (s[i] == '-') s[i] = '_';
21446 }
21447 do {
21448 if (STRNCASECMP(mc->name, s, n) == 0 && !mc->name[n]) {
21449 n = vend - vbeg;
21450 if (mc->length) {
21451 n = (*mc->length)(p, vbeg, n);
21452 }
21453 str_copy(val, vbeg, n);
21454 p->lex.ptok = tok_beg;
21455 p->lex.pcur = tok_end;
21456 (*mc->func)(p, mc->name, RSTRING_PTR(val));
21457 break;
21458 }
21459 } while (++mc < magic_comments + numberof(magic_comments));
21460#ifdef RIPPER
21461 str_copy(val, vbeg, vend - vbeg);
21462 dispatch2(magic_comment, name, val);
21463#endif
21464 }
21465
21466 return TRUE;
21467}
21468
21469static void
21470set_file_encoding(struct parser_params *p, const char *str, const char *send)
21471{
21472 int sep = 0;
21473 const char *beg = str;
21474 VALUE s;
21475
21476 for (;;) {
21477 if (send - str <= 6) return;
21478 switch (str[6]) {
21479 case 'C': case 'c': str += 6; continue;
21480 case 'O': case 'o': str += 5; continue;
21481 case 'D': case 'd': str += 4; continue;
21482 case 'I': case 'i': str += 3; continue;
21483 case 'N': case 'n': str += 2; continue;
21484 case 'G': case 'g': str += 1; continue;
21485 case '=': case ':':
21486 sep = 1;
21487 str += 6;
21488 break;
21489 default:
21490 str += 6;
21491 if (ISSPACE(*str)) break;
21492 continue;
21493 }
21494 if (STRNCASECMP(str-6, "coding", 6) == 0) break;
21495 sep = 0;
21496 }
21497 for (;;) {
21498 do {
21499 if (++str >= send) return;
21500 } while (ISSPACE(*str));
21501 if (sep) break;
21502 if (*str != '=' && *str != ':') return;
21503 sep = 1;
21504 str++;
21505 }
21506 beg = str;
21507 while ((*str == '-' || *str == '_' || ISALNUM(*str)) && ++str < send);
21508 s = rb_str_new(beg, parser_encode_length(p, beg, str - beg));
21509 p->lex.ptok = beg;
21510 p->lex.pcur = str;
21511 parser_set_encode(p, RSTRING_PTR(s));
21512 rb_str_resize(s, 0);
21513}
21514
21515static void
21516parser_prepare(struct parser_params *p)
21517{
21518 int c = nextc0(p, FALSE);
21519 p->token_info_enabled = !compile_for_eval && RTEST(ruby_verbose);
21520 switch (c) {
21521 case '#':
21522 if (peek(p, '!')) p->has_shebang = 1;
21523 break;
21524 case 0xef: /* UTF-8 BOM marker */
21525 if (!lex_eol_n_p(p, 2) &&
21526 (unsigned char)p->lex.pcur[0] == 0xbb &&
21527 (unsigned char)p->lex.pcur[1] == 0xbf) {
21528 p->enc = rb_utf8_encoding();
21529 p->lex.pcur += 2;
21530#ifndef RIPPER
21531 if (p->debug_lines) {
21532 rb_parser_string_set_encoding(p->lex.lastline, p->enc);
21533 }
21534#endif
21535 p->lex.pbeg = p->lex.pcur;
21536 token_flush(p);
21537 return;
21538 }
21539 break;
21540 case -1: /* end of script. */
21541 return;
21542 }
21543 pushback(p, c);
21544 p->enc = rb_parser_str_get_encoding(p->lex.lastline);
21545}
21546
21547#ifndef RIPPER
21548#define ambiguous_operator(tok, op, syn) ( \
21549 rb_warning0("'"op"' after local variable or literal is interpreted as binary operator"), \
21550 rb_warning0("even though it seems like "syn""))
21551#else
21552#define ambiguous_operator(tok, op, syn) \
21553 dispatch2(operator_ambiguous, TOKEN2VAL(tok), rb_str_new_cstr(syn))
21554#endif
21555#define warn_balanced(tok, op, syn) ((void) \
21556 (!IS_lex_state_for(last_state, EXPR_CLASS|EXPR_DOT|EXPR_FNAME|EXPR_ENDFN) && \
21557 space_seen && !ISSPACE(c) && \
21558 (ambiguous_operator(tok, op, syn), 0)), \
21559 (enum yytokentype)(tok))
21560
21561static enum yytokentype
21562no_digits(struct parser_params *p)
21563{
21564 yyerror0("numeric literal without digits");
21565 if (peek(p, '_')) nextc(p);
21566 /* dummy 0, for tUMINUS_NUM at numeric */
21567 return set_number_literal(p, tINTEGER, 0, 10, 0);
21568}
21569
21570static enum yytokentype
21571parse_numeric(struct parser_params *p, int c)
21572{
21573 int is_float, seen_point, seen_e, nondigit;
21574 int suffix;
21575
21576 is_float = seen_point = seen_e = nondigit = 0;
21577 SET_LEX_STATE(EXPR_END);
21578 newtok(p);
21579 if (c == '-' || c == '+') {
21580 tokadd(p, c);
21581 c = nextc(p);
21582 }
21583 if (c == '0') {
21584 int start = toklen(p);
21585 c = nextc(p);
21586 if (c == 'x' || c == 'X') {
21587 /* hexadecimal */
21588 c = nextc(p);
21589 if (c != -1 && ISXDIGIT(c)) {
21590 do {
21591 if (c == '_') {
21592 if (nondigit) break;
21593 nondigit = c;
21594 continue;
21595 }
21596 if (!ISXDIGIT(c)) break;
21597 nondigit = 0;
21598 tokadd(p, c);
21599 } while ((c = nextc(p)) != -1);
21600 }
21601 pushback(p, c);
21602 tokfix(p);
21603 if (toklen(p) == start) {
21604 return no_digits(p);
21605 }
21606 else if (nondigit) goto trailing_uc;
21607 suffix = number_literal_suffix(p, NUM_SUFFIX_ALL);
21608 return set_number_literal(p, tINTEGER, suffix, 16, 0);
21609 }
21610 if (c == 'b' || c == 'B') {
21611 /* binary */
21612 c = nextc(p);
21613 if (c == '0' || c == '1') {
21614 do {
21615 if (c == '_') {
21616 if (nondigit) break;
21617 nondigit = c;
21618 continue;
21619 }
21620 if (c != '0' && c != '1') break;
21621 nondigit = 0;
21622 tokadd(p, c);
21623 } while ((c = nextc(p)) != -1);
21624 }
21625 pushback(p, c);
21626 tokfix(p);
21627 if (toklen(p) == start) {
21628 return no_digits(p);
21629 }
21630 else if (nondigit) goto trailing_uc;
21631 suffix = number_literal_suffix(p, NUM_SUFFIX_ALL);
21632 return set_number_literal(p, tINTEGER, suffix, 2, 0);
21633 }
21634 if (c == 'd' || c == 'D') {
21635 /* decimal */
21636 c = nextc(p);
21637 if (c != -1 && ISDIGIT(c)) {
21638 do {
21639 if (c == '_') {
21640 if (nondigit) break;
21641 nondigit = c;
21642 continue;
21643 }
21644 if (!ISDIGIT(c)) break;
21645 nondigit = 0;
21646 tokadd(p, c);
21647 } while ((c = nextc(p)) != -1);
21648 }
21649 pushback(p, c);
21650 tokfix(p);
21651 if (toklen(p) == start) {
21652 return no_digits(p);
21653 }
21654 else if (nondigit) goto trailing_uc;
21655 suffix = number_literal_suffix(p, NUM_SUFFIX_ALL);
21656 return set_number_literal(p, tINTEGER, suffix, 10, 0);
21657 }
21658 if (c == '_') {
21659 /* 0_0 */
21660 goto octal_number;
21661 }
21662 if (c == 'o' || c == 'O') {
21663 /* prefixed octal */
21664 c = nextc(p);
21665 if (c == -1 || c == '_' || !ISDIGIT(c)) {
21666 tokfix(p);
21667 return no_digits(p);
21668 }
21669 }
21670 if (c >= '0' && c <= '7') {
21671 /* octal */
21672 octal_number:
21673 do {
21674 if (c == '_') {
21675 if (nondigit) break;
21676 nondigit = c;
21677 continue;
21678 }
21679 if (c < '0' || c > '9') break;
21680 if (c > '7') goto invalid_octal;
21681 nondigit = 0;
21682 tokadd(p, c);
21683 } while ((c = nextc(p)) != -1);
21684 if (toklen(p) > start) {
21685 pushback(p, c);
21686 tokfix(p);
21687 if (nondigit) goto trailing_uc;
21688 suffix = number_literal_suffix(p, NUM_SUFFIX_ALL);
21689 return set_number_literal(p, tINTEGER, suffix, 8, 0);
21690 }
21691 if (nondigit) {
21692 pushback(p, c);
21693 goto trailing_uc;
21694 }
21695 }
21696 if (c > '7' && c <= '9') {
21697 invalid_octal:
21698 yyerror0("Invalid octal digit");
21699 }
21700 else if (c == '.' || c == 'e' || c == 'E') {
21701 tokadd(p, '0');
21702 }
21703 else {
21704 pushback(p, c);
21705 tokfix(p);
21706 suffix = number_literal_suffix(p, NUM_SUFFIX_ALL);
21707 return set_number_literal(p, tINTEGER, suffix, 10, 0);
21708 }
21709 }
21710
21711 for (;;) {
21712 switch (c) {
21713 case '0': case '1': case '2': case '3': case '4':
21714 case '5': case '6': case '7': case '8': case '9':
21715 nondigit = 0;
21716 tokadd(p, c);
21717 break;
21718
21719 case '.':
21720 if (nondigit) goto trailing_uc;
21721 if (seen_point || seen_e) {
21722 goto decode_num;
21723 }
21724 else {
21725 int c0 = nextc(p);
21726 if (c0 == -1 || !ISDIGIT(c0)) {
21727 pushback(p, c0);
21728 goto decode_num;
21729 }
21730 c = c0;
21731 }
21732 seen_point = toklen(p);
21733 tokadd(p, '.');
21734 tokadd(p, c);
21735 is_float++;
21736 nondigit = 0;
21737 break;
21738
21739 case 'e':
21740 case 'E':
21741 if (nondigit) {
21742 pushback(p, c);
21743 c = nondigit;
21744 goto decode_num;
21745 }
21746 if (seen_e) {
21747 goto decode_num;
21748 }
21749 nondigit = c;
21750 c = nextc(p);
21751 if (c != '-' && c != '+' && !ISDIGIT(c)) {
21752 pushback(p, c);
21753 c = nondigit;
21754 nondigit = 0;
21755 goto decode_num;
21756 }
21757 tokadd(p, nondigit);
21758 seen_e++;
21759 is_float++;
21760 tokadd(p, c);
21761 nondigit = (c == '-' || c == '+') ? c : 0;
21762 break;
21763
21764 case '_': /* `_' in number just ignored */
21765 if (nondigit) goto decode_num;
21766 nondigit = c;
21767 break;
21768
21769 default:
21770 goto decode_num;
21771 }
21772 c = nextc(p);
21773 }
21774
21775 decode_num:
21776 pushback(p, c);
21777 if (nondigit) {
21778 trailing_uc:
21779 literal_flush(p, p->lex.pcur - 1);
21780 YYLTYPE loc = RUBY_INIT_YYLLOC();
21781 compile_error(p, "trailing '%c' in number", nondigit);
21782 parser_show_error_line(p, &loc);
21783 }
21784 tokfix(p);
21785 if (is_float) {
21786 enum yytokentype type = tFLOAT;
21787
21788 suffix = number_literal_suffix(p, seen_e ? NUM_SUFFIX_I : NUM_SUFFIX_ALL);
21789 if (suffix & NUM_SUFFIX_R) {
21790 type = tRATIONAL;
21791 }
21792 else {
21793 strtod(tok(p), 0);
21794 if (errno == ERANGE) {
21795 rb_warning1("Float %s out of range", WARN_S(tok(p)));
21796 errno = 0;
21797 }
21798 }
21799 return set_number_literal(p, type, suffix, 0, seen_point);
21800 }
21801 suffix = number_literal_suffix(p, NUM_SUFFIX_ALL);
21802 return set_number_literal(p, tINTEGER, suffix, 10, 0);
21803}
21804
21805static enum yytokentype
21806parse_qmark(struct parser_params *p, int space_seen)
21807{
21808 rb_encoding *enc;
21809 register int c;
21810 rb_parser_string_t *lit;
21811 const char *start = p->lex.pcur;
21812
21813 if (IS_END()) {
21814 SET_LEX_STATE(EXPR_VALUE);
21815 return '?';
21816 }
21817 c = nextc(p);
21818 if (c == -1) {
21819 compile_error(p, "incomplete character syntax");
21820 return 0;
21821 }
21822 if (rb_enc_isspace(c, p->enc)) {
21823 if (!IS_ARG()) {
21824 int c2 = escaped_control_code(c);
21825 if (c2) {
21826 WARN_SPACE_CHAR(c2, "?");
21827 }
21828 }
21829 ternary:
21830 pushback(p, c);
21831 SET_LEX_STATE(EXPR_VALUE);
21832 return '?';
21833 }
21834 newtok(p);
21835 enc = p->enc;
21836 int w = parser_precise_mbclen(p, start);
21837 if (is_identchar(p, start, p->lex.pend, p->enc) &&
21838 !(lex_eol_ptr_n_p(p, start, w) || !is_identchar(p, start + w, p->lex.pend, p->enc))) {
21839 if (space_seen) {
21840 const char *ptr = start;
21841 do {
21842 int n = parser_precise_mbclen(p, ptr);
21843 if (n < 0) return -1;
21844 ptr += n;
21845 } while (!lex_eol_ptr_p(p, ptr) && is_identchar(p, ptr, p->lex.pend, p->enc));
21846 rb_warn2("'?' just followed by '%.*s' is interpreted as" \
21847 " a conditional operator, put a space after '?'",
21848 WARN_I((int)(ptr - start)), WARN_S_L(start, (ptr - start)));
21849 }
21850 goto ternary;
21851 }
21852 else if (c == '\\') {
21853 if (peek(p, 'u')) {
21854 nextc(p);
21855 enc = rb_utf8_encoding();
21856 tokadd_utf8(p, &enc, -1, 0, 0);
21857 }
21858 else if (!ISASCII(c = peekc(p)) && c != -1) {
21859 nextc(p);
21860 if (tokadd_mbchar(p, c) == -1) return 0;
21861 }
21862 else {
21863 c = read_escape(p, 0, p->lex.pcur - rb_strlen_lit("?\\"));
21864 tokadd(p, c);
21865 }
21866 }
21867 else {
21868 if (tokadd_mbchar(p, c) == -1) return 0;
21869 }
21870 tokfix(p);
21871 lit = STR_NEW3(tok(p), toklen(p), enc, 0);
21872 set_yylval_str(lit);
21873 SET_LEX_STATE(EXPR_END);
21874 return tCHAR;
21875}
21876
21877static enum yytokentype
21878parse_percent(struct parser_params *p, const int space_seen, const enum lex_state_e last_state)
21879{
21880 register int c;
21881 const char *ptok = p->lex.pcur;
21882
21883 if (IS_BEG()) {
21884 int term;
21885 int paren;
21886
21887 c = nextc(p);
21888 quotation:
21889 if (c == -1) goto unterminated;
21890 if (!ISALNUM(c)) {
21891 term = c;
21892 if (!ISASCII(c)) goto unknown;
21893 c = 'Q';
21894 }
21895 else {
21896 term = nextc(p);
21897 if (rb_enc_isalnum(term, p->enc) || !parser_isascii(p)) {
21898 unknown:
21899 pushback(p, term);
21900 c = parser_precise_mbclen(p, p->lex.pcur);
21901 if (c < 0) return 0;
21902 p->lex.pcur += c;
21903 yyerror0("unknown type of %string");
21904 return 0;
21905 }
21906 }
21907 if (term == -1) {
21908 unterminated:
21909 compile_error(p, "unterminated quoted string meets end of file");
21910 return 0;
21911 }
21912 paren = term;
21913 if (term == '(') term = ')';
21914 else if (term == '[') term = ']';
21915 else if (term == '{') term = '}';
21916 else if (term == '<') term = '>';
21917 else paren = 0;
21918
21919 p->lex.ptok = ptok-1;
21920 switch (c) {
21921 case 'Q':
21922 p->lex.strterm = NEW_STRTERM(str_dquote, term, paren);
21923 return tSTRING_BEG;
21924
21925 case 'q':
21926 p->lex.strterm = NEW_STRTERM(str_squote, term, paren);
21927 return tSTRING_BEG;
21928
21929 case 'W':
21930 p->lex.strterm = NEW_STRTERM(str_dword, term, paren);
21931 return tWORDS_BEG;
21932
21933 case 'w':
21934 p->lex.strterm = NEW_STRTERM(str_sword, term, paren);
21935 return tQWORDS_BEG;
21936
21937 case 'I':
21938 p->lex.strterm = NEW_STRTERM(str_dword, term, paren);
21939 return tSYMBOLS_BEG;
21940
21941 case 'i':
21942 p->lex.strterm = NEW_STRTERM(str_sword, term, paren);
21943 return tQSYMBOLS_BEG;
21944
21945 case 'x':
21946 p->lex.strterm = NEW_STRTERM(str_xquote, term, paren);
21947 return tXSTRING_BEG;
21948
21949 case 'r':
21950 p->lex.strterm = NEW_STRTERM(str_regexp, term, paren);
21951 return tREGEXP_BEG;
21952
21953 case 's':
21954 p->lex.strterm = NEW_STRTERM(str_ssym, term, paren);
21955 SET_LEX_STATE(EXPR_FNAME|EXPR_FITEM);
21956 return tSYMBEG;
21957
21958 default:
21959 yyerror0("unknown type of %string");
21960 return 0;
21961 }
21962 }
21963 if ((c = nextc(p)) == '=') {
21964 set_yylval_id('%');
21965 SET_LEX_STATE(EXPR_BEG);
21966 return tOP_ASGN;
21967 }
21968 if (IS_SPCARG(c) || (IS_lex_state(EXPR_FITEM) && c == 's')) {
21969 goto quotation;
21970 }
21971 SET_LEX_STATE(IS_AFTER_OPERATOR() ? EXPR_ARG : EXPR_BEG);
21972 pushback(p, c);
21973 return warn_balanced('%', "%%", "string literal");
21974}
21975
21976static int
21977tokadd_ident(struct parser_params *p, int c)
21978{
21979 do {
21980 if (tokadd_mbchar(p, c) == -1) return -1;
21981 c = nextc(p);
21982 } while (parser_is_identchar(p));
21983 pushback(p, c);
21984 return 0;
21985}
21986
21987static ID
21988tokenize_ident(struct parser_params *p)
21989{
21990 ID ident = TOK_INTERN();
21991
21992 set_yylval_name(ident);
21993
21994 return ident;
21995}
21996
21997static int
21998parse_numvar(struct parser_params *p)
21999{
22000 size_t len;
22001 int overflow;
22002 unsigned long n = ruby_scan_digits(tok(p)+1, toklen(p)-1, 10, &len, &overflow);
22003 const unsigned long nth_ref_max =
22004 ((FIXNUM_MAX < INT_MAX) ? FIXNUM_MAX : INT_MAX) >> 1;
22005 /* NTH_REF is left-shifted to be ORed with back-ref flag and
22006 * turned into a Fixnum, in compile.c */
22007
22008 if (overflow || n > nth_ref_max) {
22009 /* compile_error()? */
22010 rb_warn1("'%s' is too big for a number variable, always nil", WARN_S(tok(p)));
22011 return 0; /* $0 is $PROGRAM_NAME, not NTH_REF */
22012 }
22013 else {
22014 return (int)n;
22015 }
22016}
22017
22018static enum yytokentype
22019parse_gvar(struct parser_params *p, const enum lex_state_e last_state)
22020{
22021 const char *ptr = p->lex.pcur;
22022 register int c;
22023
22024 SET_LEX_STATE(EXPR_END);
22025 p->lex.ptok = ptr - 1; /* from '$' */
22026 newtok(p);
22027 c = nextc(p);
22028 switch (c) {
22029 case '_': /* $_: last read line string */
22030 c = nextc(p);
22031 if (parser_is_identchar(p)) {
22032 tokadd(p, '$');
22033 tokadd(p, '_');
22034 break;
22035 }
22036 pushback(p, c);
22037 c = '_';
22038 /* fall through */
22039 case '~': /* $~: match-data */
22040 case '*': /* $*: argv */
22041 case '$': /* $$: pid */
22042 case '?': /* $?: last status */
22043 case '!': /* $!: error string */
22044 case '@': /* $@: error position */
22045 case '/': /* $/: input record separator */
22046 case '\\': /* $\: output record separator */
22047 case ';': /* $;: field separator */
22048 case ',': /* $,: output field separator */
22049 case '.': /* $.: last read line number */
22050 case '=': /* $=: ignorecase */
22051 case ':': /* $:: load path */
22052 case '<': /* $<: default input handle */
22053 case '>': /* $>: default output handle */
22054 case '\"': /* $": already loaded files */
22055 tokadd(p, '$');
22056 tokadd(p, c);
22057 goto gvar;
22058
22059 case '-':
22060 tokadd(p, '$');
22061 tokadd(p, c);
22062 c = nextc(p);
22063 if (parser_is_identchar(p)) {
22064 if (tokadd_mbchar(p, c) == -1) return 0;
22065 }
22066 else {
22067 pushback(p, c);
22068 pushback(p, '-');
22069 return '$';
22070 }
22071 gvar:
22072 tokenize_ident(p);
22073 return tGVAR;
22074
22075 case '&': /* $&: last match */
22076 case '`': /* $`: string before last match */
22077 case '\'': /* $': string after last match */
22078 case '+': /* $+: string matches last paren. */
22079 if (IS_lex_state_for(last_state, EXPR_FNAME)) {
22080 tokadd(p, '$');
22081 tokadd(p, c);
22082 goto gvar;
22083 }
22084 set_yylval_node(NEW_BACK_REF(c, &_cur_loc));
22085 return tBACK_REF;
22086
22087 case '1': case '2': case '3':
22088 case '4': case '5': case '6':
22089 case '7': case '8': case '9':
22090 tokadd(p, '$');
22091 do {
22092 tokadd(p, c);
22093 c = nextc(p);
22094 } while (c != -1 && ISDIGIT(c));
22095 pushback(p, c);
22096 if (IS_lex_state_for(last_state, EXPR_FNAME)) goto gvar;
22097 tokfix(p);
22098 c = parse_numvar(p);
22099 set_yylval_node(NEW_NTH_REF(c, &_cur_loc));
22100 return tNTH_REF;
22101
22102 default:
22103 if (!parser_is_identchar(p)) {
22104 YYLTYPE loc = RUBY_INIT_YYLLOC();
22105 if (c == -1 || ISSPACE(c)) {
22106 compile_error(p, "'$' without identifiers is not allowed as a global variable name");
22107 }
22108 else {
22109 pushback(p, c);
22110 compile_error(p, "'$%c' is not allowed as a global variable name", c);
22111 }
22112 parser_show_error_line(p, &loc);
22113 set_yylval_noname();
22114 return tGVAR;
22115 }
22116 /* fall through */
22117 case '0':
22118 tokadd(p, '$');
22119 }
22120
22121 if (tokadd_ident(p, c)) return 0;
22122 SET_LEX_STATE(EXPR_END);
22123 if (VALID_SYMNAME_P(tok(p), toklen(p), p->enc, ID_GLOBAL)) {
22124 tokenize_ident(p);
22125 }
22126 else {
22127 compile_error(p, "'%.*s' is not allowed as a global variable name", toklen(p), tok(p));
22128 set_yylval_noname();
22129 }
22130 return tGVAR;
22131}
22132
22133static bool
22134parser_numbered_param(struct parser_params *p, int n)
22135{
22136 if (n < 0) return false;
22137
22138 if (DVARS_TERMINAL_P(p->lvtbl->args) || DVARS_TERMINAL_P(p->lvtbl->args->prev)) {
22139 return false;
22140 }
22141 if (p->max_numparam == ORDINAL_PARAM) {
22142 compile_error(p, "ordinary parameter is defined");
22143 return false;
22144 }
22145 struct vtable *args = p->lvtbl->args;
22146 if (p->max_numparam < n) {
22147 p->max_numparam = n;
22148 }
22149 while (n > args->pos) {
22150 vtable_add(args, NUMPARAM_IDX_TO_ID(args->pos+1));
22151 }
22152 return true;
22153}
22154
22155static enum yytokentype
22156parse_atmark(struct parser_params *p, const enum lex_state_e last_state)
22157{
22158 const char *ptr = p->lex.pcur;
22159 enum yytokentype result = tIVAR;
22160 register int c = nextc(p);
22161 YYLTYPE loc;
22162
22163 p->lex.ptok = ptr - 1; /* from '@' */
22164 newtok(p);
22165 tokadd(p, '@');
22166 if (c == '@') {
22167 result = tCVAR;
22168 tokadd(p, '@');
22169 c = nextc(p);
22170 }
22171 SET_LEX_STATE(IS_lex_state_for(last_state, EXPR_FNAME) ? EXPR_ENDFN : EXPR_END);
22172 if (c == -1 || !parser_is_identchar(p)) {
22173 pushback(p, c);
22174 RUBY_SET_YYLLOC(loc);
22175 if (result == tIVAR) {
22176 compile_error(p, "'@' without identifiers is not allowed as an instance variable name");
22177 }
22178 else {
22179 compile_error(p, "'@@' without identifiers is not allowed as a class variable name");
22180 }
22181 parser_show_error_line(p, &loc);
22182 set_yylval_noname();
22183 SET_LEX_STATE(EXPR_END);
22184 return result;
22185 }
22186 else if (ISDIGIT(c)) {
22187 pushback(p, c);
22188 RUBY_SET_YYLLOC(loc);
22189 if (result == tIVAR) {
22190 compile_error(p, "'@%c' is not allowed as an instance variable name", c);
22191 }
22192 else {
22193 compile_error(p, "'@@%c' is not allowed as a class variable name", c);
22194 }
22195 parser_show_error_line(p, &loc);
22196 set_yylval_noname();
22197 SET_LEX_STATE(EXPR_END);
22198 return result;
22199 }
22200
22201 if (tokadd_ident(p, c)) return 0;
22202 tokenize_ident(p);
22203 return result;
22204}
22205
22206static enum yytokentype
22207parse_ident(struct parser_params *p, int c, int cmd_state)
22208{
22209 enum yytokentype result;
22210 bool is_ascii = true;
22211 const enum lex_state_e last_state = p->lex.state;
22212 ID ident;
22213 int enforce_keyword_end = 0;
22214
22215 do {
22216 if (!ISASCII(c)) is_ascii = false;
22217 if (tokadd_mbchar(p, c) == -1) return 0;
22218 c = nextc(p);
22219 } while (parser_is_identchar(p));
22220 if ((c == '!' || c == '?') && !peek(p, '=')) {
22221 result = tFID;
22222 tokadd(p, c);
22223 }
22224 else if (c == '=' && IS_lex_state(EXPR_FNAME) &&
22225 (!peek(p, '~') && !peek(p, '>') && (!peek(p, '=') || (peek_n(p, '>', 1))))) {
22226 result = tIDENTIFIER;
22227 tokadd(p, c);
22228 }
22229 else {
22230 result = tCONSTANT; /* assume provisionally */
22231 pushback(p, c);
22232 }
22233 tokfix(p);
22234
22235 if (IS_LABEL_POSSIBLE()) {
22236 if (IS_LABEL_SUFFIX(0)) {
22237 SET_LEX_STATE(EXPR_ARG|EXPR_LABELED);
22238 nextc(p);
22239 tokenize_ident(p);
22240 return tLABEL;
22241 }
22242 }
22243
22244#ifndef RIPPER
22245 if (peek_end_expect_token_locations(p)) {
22246 const rb_code_position_t *end_pos;
22247 int lineno, column;
22248 int beg_pos = (int)(p->lex.ptok - p->lex.pbeg);
22249
22250 end_pos = peek_end_expect_token_locations(p)->pos;
22251 lineno = end_pos->lineno;
22252 column = end_pos->column;
22253
22254 if (p->debug) {
22255 rb_parser_printf(p, "enforce_keyword_end check. current: (%d, %d), peek: (%d, %d)\n",
22256 p->ruby_sourceline, beg_pos, lineno, column);
22257 }
22258
22259 if ((p->ruby_sourceline > lineno) && (beg_pos <= column)) {
22260 const struct kwtable *kw;
22261
22262 if ((IS_lex_state(EXPR_DOT)) && (kw = rb_reserved_word(tok(p), toklen(p))) && (kw && kw->id[0] == keyword_end)) {
22263 if (p->debug) rb_parser_printf(p, "enforce_keyword_end is enabled\n");
22264 enforce_keyword_end = 1;
22265 }
22266 }
22267 }
22268#endif
22269
22270 if (is_ascii && (!IS_lex_state(EXPR_DOT) || enforce_keyword_end)) {
22271 const struct kwtable *kw;
22272
22273 /* See if it is a reserved word. */
22274 kw = rb_reserved_word(tok(p), toklen(p));
22275 if (kw) {
22276 enum lex_state_e state = p->lex.state;
22277 if (IS_lex_state_for(state, EXPR_FNAME)) {
22278 SET_LEX_STATE(EXPR_ENDFN);
22279 set_yylval_name(rb_intern2(tok(p), toklen(p)));
22280 return kw->id[0];
22281 }
22282 SET_LEX_STATE(kw->state);
22283 if (IS_lex_state(EXPR_BEG)) {
22284 p->command_start = TRUE;
22285 }
22286 if (kw->id[0] == keyword_do) {
22287 if (lambda_beginning_p()) {
22288 p->lex.lpar_beg = -1; /* make lambda_beginning_p() == FALSE in the body of "-> do ... end" */
22289 return keyword_do_LAMBDA;
22290 }
22291 if (COND_P()) return keyword_do_cond;
22292 if (CMDARG_P() && !IS_lex_state_for(state, EXPR_CMDARG))
22293 return keyword_do_block;
22294 return keyword_do;
22295 }
22296 if (IS_lex_state_for(state, (EXPR_BEG | EXPR_LABELED | EXPR_CLASS)))
22297 return kw->id[0];
22298 else {
22299 if (kw->id[0] != kw->id[1])
22300 SET_LEX_STATE(EXPR_BEG | EXPR_LABEL);
22301 return kw->id[1];
22302 }
22303 }
22304 }
22305
22306 if (IS_lex_state(EXPR_BEG_ANY | EXPR_ARG_ANY | EXPR_DOT)) {
22307 if (cmd_state) {
22308 SET_LEX_STATE(EXPR_CMDARG);
22309 }
22310 else {
22311 SET_LEX_STATE(EXPR_ARG);
22312 }
22313 }
22314 else if (p->lex.state == EXPR_FNAME) {
22315 SET_LEX_STATE(EXPR_ENDFN);
22316 }
22317 else {
22318 SET_LEX_STATE(EXPR_END);
22319 }
22320
22321 ident = tokenize_ident(p);
22322 if (result == tCONSTANT && is_local_id(ident)) result = tIDENTIFIER;
22323 if (!IS_lex_state_for(last_state, EXPR_DOT|EXPR_FNAME) &&
22324 (result == tIDENTIFIER) && /* not EXPR_FNAME, not attrasgn */
22325 (lvar_defined(p, ident) || NUMPARAM_ID_P(ident))) {
22326 SET_LEX_STATE(EXPR_END|EXPR_LABEL);
22327 }
22328 return result;
22329}
22330
22331static void
22332warn_cr(struct parser_params *p)
22333{
22334 if (!p->cr_seen) {
22335 p->cr_seen = TRUE;
22336 /* carried over with p->lex.nextline for nextc() */
22337 rb_warn0("encountered \\r in middle of line, treated as a mere space");
22338 }
22339}
22340
22341static enum yytokentype
22342parser_yylex(struct parser_params *p)
22343{
22344 register int c;
22345 int space_seen = 0;
22346 int cmd_state;
22347 int label;
22348 enum lex_state_e last_state;
22349 int fallthru = FALSE;
22350 int token_seen = p->token_seen;
22351
22352 if (p->lex.strterm) {
22353 if (strterm_is_heredoc(p->lex.strterm)) {
22354 token_flush(p);
22355 return here_document(p, &p->lex.strterm->u.heredoc);
22356 }
22357 else {
22358 token_flush(p);
22359 return parse_string(p, &p->lex.strterm->u.literal);
22360 }
22361 }
22362 cmd_state = p->command_start;
22363 p->command_start = FALSE;
22364 p->token_seen = TRUE;
22365#ifndef RIPPER
22366 token_flush(p);
22367#endif
22368 retry:
22369 last_state = p->lex.state;
22370 switch (c = nextc(p)) {
22371 case '\0': /* NUL */
22372 case '\004': /* ^D */
22373 case '\032': /* ^Z */
22374 case -1: /* end of script. */
22375 p->eofp = 1;
22376#ifndef RIPPER
22377 if (p->end_expect_token_locations) {
22378 pop_end_expect_token_locations(p);
22379 RUBY_SET_YYLLOC_OF_DUMMY_END(*p->yylloc);
22380 return tDUMNY_END;
22381 }
22382#endif
22383 /* Set location for end-of-input because dispatch_scan_event is not called. */
22384 RUBY_SET_YYLLOC(*p->yylloc);
22385 return END_OF_INPUT;
22386
22387 /* white spaces */
22388 case '\r':
22389 warn_cr(p);
22390 /* fall through */
22391 case ' ': case '\t': case '\f':
22392 case '\13': /* '\v' */
22393 space_seen = 1;
22394 while ((c = nextc(p))) {
22395 switch (c) {
22396 case '\r':
22397 warn_cr(p);
22398 /* fall through */
22399 case ' ': case '\t': case '\f':
22400 case '\13': /* '\v' */
22401 break;
22402 default:
22403 goto outofloop;
22404 }
22405 }
22406 outofloop:
22407 pushback(p, c);
22408 dispatch_scan_event(p, tSP);
22409#ifndef RIPPER
22410 token_flush(p);
22411#endif
22412 goto retry;
22413
22414 case '#': /* it's a comment */
22415 p->token_seen = token_seen;
22416 const char *const pcur = p->lex.pcur, *const ptok = p->lex.ptok;
22417 /* no magic_comment in shebang line */
22418 if (!parser_magic_comment(p, p->lex.pcur, p->lex.pend - p->lex.pcur)) {
22419 if (comment_at_top(p)) {
22420 set_file_encoding(p, p->lex.pcur, p->lex.pend);
22421 }
22422 }
22423 p->lex.pcur = pcur, p->lex.ptok = ptok;
22424 lex_goto_eol(p);
22425 dispatch_scan_event(p, tCOMMENT);
22426 fallthru = TRUE;
22427 /* fall through */
22428 case '\n':
22429 p->token_seen = token_seen;
22430 rb_parser_string_t *prevline = p->lex.lastline;
22431 c = (IS_lex_state(EXPR_BEG|EXPR_CLASS|EXPR_FNAME|EXPR_DOT) &&
22432 !IS_lex_state(EXPR_LABELED));
22433 if (c || IS_lex_state_all(EXPR_ARG|EXPR_LABELED)) {
22434 if (!fallthru) {
22435 dispatch_scan_event(p, tIGNORED_NL);
22436 }
22437 fallthru = FALSE;
22438 if (!c && p->ctxt.in_kwarg) {
22439 goto normal_newline;
22440 }
22441 goto retry;
22442 }
22443 while (1) {
22444 switch (c = nextc(p)) {
22445 case ' ': case '\t': case '\f': case '\r':
22446 case '\13': /* '\v' */
22447 space_seen = 1;
22448 break;
22449 case '#':
22450 pushback(p, c);
22451 if (space_seen) {
22452 dispatch_scan_event(p, tSP);
22453 token_flush(p);
22454 }
22455 goto retry;
22456 case 'a':
22457 if (peek_word_at(p, "nd", 2, 0)) goto leading_logical;
22458 goto bol;
22459 case 'o':
22460 if (peek_word_at(p, "r", 1, 0)) goto leading_logical;
22461 goto bol;
22462 case '|':
22463 if (peek(p, '|')) goto leading_logical;
22464 goto bol;
22465 case '&':
22466 if (peek(p, '&')) {
22467 leading_logical:
22468 pushback(p, c);
22469 dispatch_delayed_token(p, tIGNORED_NL);
22470 cmd_state = FALSE;
22471 goto retry;
22472 }
22473 /* fall through */
22474 case '.': {
22475 dispatch_delayed_token(p, tIGNORED_NL);
22476 if (peek(p, '.') == (c == '&')) {
22477 pushback(p, c);
22478 dispatch_scan_event(p, tSP);
22479 goto retry;
22480 }
22481 }
22482 bol:
22483 default:
22484 p->ruby_sourceline--;
22485 p->lex.nextline = p->lex.lastline;
22486 set_lastline(p, prevline);
22487 case -1: /* EOF no decrement*/
22488 if (c == -1 && space_seen) {
22489 dispatch_scan_event(p, tSP);
22490 }
22491 lex_goto_eol(p);
22492 if (c != -1) {
22493 token_flush(p);
22494 RUBY_SET_YYLLOC(*p->yylloc);
22495 }
22496 goto normal_newline;
22497 }
22498 }
22499 normal_newline:
22500 p->command_start = TRUE;
22501 SET_LEX_STATE(EXPR_BEG);
22502 return '\n';
22503
22504 case '*':
22505 if ((c = nextc(p)) == '*') {
22506 if ((c = nextc(p)) == '=') {
22507 set_yylval_id(idPow);
22508 SET_LEX_STATE(EXPR_BEG);
22509 return tOP_ASGN;
22510 }
22511 pushback(p, c);
22512 if (IS_SPCARG(c)) {
22513 rb_warning0("'**' interpreted as argument prefix");
22514 c = tDSTAR;
22515 }
22516 else if (IS_BEG()) {
22517 c = tDSTAR;
22518 }
22519 else {
22520 c = warn_balanced((enum ruby_method_ids)tPOW, "**", "argument prefix");
22521 }
22522 }
22523 else {
22524 if (c == '=') {
22525 set_yylval_id('*');
22526 SET_LEX_STATE(EXPR_BEG);
22527 return tOP_ASGN;
22528 }
22529 pushback(p, c);
22530 if (IS_SPCARG(c)) {
22531 rb_warning0("'*' interpreted as argument prefix");
22532 c = tSTAR;
22533 }
22534 else if (IS_BEG()) {
22535 c = tSTAR;
22536 }
22537 else {
22538 c = warn_balanced('*', "*", "argument prefix");
22539 }
22540 }
22541 SET_LEX_STATE(IS_AFTER_OPERATOR() ? EXPR_ARG : EXPR_BEG);
22542 return c;
22543
22544 case '!':
22545 c = nextc(p);
22546 if (IS_AFTER_OPERATOR()) {
22547 SET_LEX_STATE(EXPR_ARG);
22548 if (c == '@') {
22549 return '!';
22550 }
22551 }
22552 else {
22553 SET_LEX_STATE(EXPR_BEG);
22554 }
22555 if (c == '=') {
22556 return tNEQ;
22557 }
22558 if (c == '~') {
22559 return tNMATCH;
22560 }
22561 pushback(p, c);
22562 return '!';
22563
22564 case '=':
22565 if (was_bol(p)) {
22566 /* skip embedded rd document */
22567 if (word_match_p(p, "begin", 5)) {
22568 int first_p = TRUE;
22569
22570 lex_goto_eol(p);
22571 dispatch_scan_event(p, tEMBDOC_BEG);
22572 for (;;) {
22573 lex_goto_eol(p);
22574 if (!first_p) {
22575 dispatch_scan_event(p, tEMBDOC);
22576 }
22577 first_p = FALSE;
22578 c = nextc(p);
22579 if (c == -1) {
22580 compile_error(p, "embedded document meets end of file");
22581 return END_OF_INPUT;
22582 }
22583 if (c == '=' && word_match_p(p, "end", 3)) {
22584 break;
22585 }
22586 pushback(p, c);
22587 }
22588 lex_goto_eol(p);
22589 dispatch_scan_event(p, tEMBDOC_END);
22590 goto retry;
22591 }
22592 }
22593
22594 SET_LEX_STATE(IS_AFTER_OPERATOR() ? EXPR_ARG : EXPR_BEG);
22595 if ((c = nextc(p)) == '=') {
22596 if ((c = nextc(p)) == '=') {
22597 return tEQQ;
22598 }
22599 pushback(p, c);
22600 return tEQ;
22601 }
22602 if (c == '~') {
22603 return tMATCH;
22604 }
22605 else if (c == '>') {
22606 return tASSOC;
22607 }
22608 pushback(p, c);
22609 return '=';
22610
22611 case '<':
22612 c = nextc(p);
22613 if (c == '<' &&
22614 !IS_lex_state(EXPR_DOT | EXPR_CLASS) &&
22615 !IS_END() &&
22616 (!IS_ARG() || IS_lex_state(EXPR_LABELED) || space_seen)) {
22617 enum yytokentype token = heredoc_identifier(p);
22618 if (token) return token < 0 ? 0 : token;
22619 }
22620 if (IS_AFTER_OPERATOR()) {
22621 SET_LEX_STATE(EXPR_ARG);
22622 }
22623 else {
22624 if (IS_lex_state(EXPR_CLASS))
22625 p->command_start = TRUE;
22626 SET_LEX_STATE(EXPR_BEG);
22627 }
22628 if (c == '=') {
22629 if ((c = nextc(p)) == '>') {
22630 return tCMP;
22631 }
22632 pushback(p, c);
22633 return tLEQ;
22634 }
22635 if (c == '<') {
22636 if ((c = nextc(p)) == '=') {
22637 set_yylval_id(idLTLT);
22638 SET_LEX_STATE(EXPR_BEG);
22639 return tOP_ASGN;
22640 }
22641 pushback(p, c);
22642 return warn_balanced((enum ruby_method_ids)tLSHFT, "<<", "here document");
22643 }
22644 pushback(p, c);
22645 return '<';
22646
22647 case '>':
22648 SET_LEX_STATE(IS_AFTER_OPERATOR() ? EXPR_ARG : EXPR_BEG);
22649 if ((c = nextc(p)) == '=') {
22650 return tGEQ;
22651 }
22652 if (c == '>') {
22653 if ((c = nextc(p)) == '=') {
22654 set_yylval_id(idGTGT);
22655 SET_LEX_STATE(EXPR_BEG);
22656 return tOP_ASGN;
22657 }
22658 pushback(p, c);
22659 return tRSHFT;
22660 }
22661 pushback(p, c);
22662 return '>';
22663
22664 case '"':
22665 label = (IS_LABEL_POSSIBLE() ? str_label : 0);
22666 p->lex.strterm = NEW_STRTERM(str_dquote | label, '"', 0);
22667 p->lex.ptok = p->lex.pcur-1;
22668 return tSTRING_BEG;
22669
22670 case '`':
22671 if (IS_lex_state(EXPR_FNAME)) {
22672 SET_LEX_STATE(EXPR_ENDFN);
22673 return c;
22674 }
22675 if (IS_lex_state(EXPR_DOT)) {
22676 if (cmd_state)
22677 SET_LEX_STATE(EXPR_CMDARG);
22678 else
22679 SET_LEX_STATE(EXPR_ARG);
22680 return c;
22681 }
22682 p->lex.strterm = NEW_STRTERM(str_xquote, '`', 0);
22683 return tXSTRING_BEG;
22684
22685 case '\'':
22686 label = (IS_LABEL_POSSIBLE() ? str_label : 0);
22687 p->lex.strterm = NEW_STRTERM(str_squote | label, '\'', 0);
22688 p->lex.ptok = p->lex.pcur-1;
22689 return tSTRING_BEG;
22690
22691 case '?':
22692 return parse_qmark(p, space_seen);
22693
22694 case '&':
22695 if ((c = nextc(p)) == '&') {
22696 SET_LEX_STATE(EXPR_BEG);
22697 if ((c = nextc(p)) == '=') {
22698 set_yylval_id(idANDOP);
22699 SET_LEX_STATE(EXPR_BEG);
22700 return tOP_ASGN;
22701 }
22702 pushback(p, c);
22703 return tANDOP;
22704 }
22705 else if (c == '=') {
22706 set_yylval_id('&');
22707 SET_LEX_STATE(EXPR_BEG);
22708 return tOP_ASGN;
22709 }
22710 else if (c == '.') {
22711 set_yylval_id(idANDDOT);
22712 SET_LEX_STATE(EXPR_DOT);
22713 return tANDDOT;
22714 }
22715 pushback(p, c);
22716 if (IS_SPCARG(c)) {
22717 if ((c != ':') ||
22718 (c = peekc_n(p, 1)) == -1 ||
22719 !(c == '\'' || c == '"' ||
22720 is_identchar(p, (p->lex.pcur+1), p->lex.pend, p->enc))) {
22721 rb_warning0("'&' interpreted as argument prefix");
22722 }
22723 c = tAMPER;
22724 }
22725 else if (IS_BEG()) {
22726 c = tAMPER;
22727 }
22728 else {
22729 c = warn_balanced('&', "&", "argument prefix");
22730 }
22731 SET_LEX_STATE(IS_AFTER_OPERATOR() ? EXPR_ARG : EXPR_BEG);
22732 return c;
22733
22734 case '|':
22735 if ((c = nextc(p)) == '|') {
22736 SET_LEX_STATE(EXPR_BEG);
22737 if ((c = nextc(p)) == '=') {
22738 set_yylval_id(idOROP);
22739 SET_LEX_STATE(EXPR_BEG);
22740 return tOP_ASGN;
22741 }
22742 pushback(p, c);
22743 if (IS_lex_state_for(last_state, EXPR_BEG)) {
22744 c = '|';
22745 pushback(p, '|');
22746 return c;
22747 }
22748 return tOROP;
22749 }
22750 if (c == '=') {
22751 set_yylval_id('|');
22752 SET_LEX_STATE(EXPR_BEG);
22753 return tOP_ASGN;
22754 }
22755 SET_LEX_STATE(IS_AFTER_OPERATOR() ? EXPR_ARG : EXPR_BEG|EXPR_LABEL);
22756 pushback(p, c);
22757 return '|';
22758
22759 case '+':
22760 c = nextc(p);
22761 if (IS_AFTER_OPERATOR()) {
22762 SET_LEX_STATE(EXPR_ARG);
22763 if (c == '@') {
22764 return tUPLUS;
22765 }
22766 pushback(p, c);
22767 return '+';
22768 }
22769 if (c == '=') {
22770 set_yylval_id('+');
22771 SET_LEX_STATE(EXPR_BEG);
22772 return tOP_ASGN;
22773 }
22774 if (IS_BEG() || (IS_SPCARG(c) && arg_ambiguous(p, '+'))) {
22775 SET_LEX_STATE(EXPR_BEG);
22776 pushback(p, c);
22777 if (c != -1 && ISDIGIT(c)) {
22778 return parse_numeric(p, '+');
22779 }
22780 return tUPLUS;
22781 }
22782 SET_LEX_STATE(EXPR_BEG);
22783 pushback(p, c);
22784 return warn_balanced('+', "+", "unary operator");
22785
22786 case '-':
22787 c = nextc(p);
22788 if (IS_AFTER_OPERATOR()) {
22789 SET_LEX_STATE(EXPR_ARG);
22790 if (c == '@') {
22791 return tUMINUS;
22792 }
22793 pushback(p, c);
22794 return '-';
22795 }
22796 if (c == '=') {
22797 set_yylval_id('-');
22798 SET_LEX_STATE(EXPR_BEG);
22799 return tOP_ASGN;
22800 }
22801 if (c == '>') {
22802 SET_LEX_STATE(EXPR_ENDFN);
22803 yylval.num = p->lex.lpar_beg;
22804 p->lex.lpar_beg = p->lex.paren_nest;
22805 return tLAMBDA;
22806 }
22807 if (IS_BEG() || (IS_SPCARG(c) && arg_ambiguous(p, '-'))) {
22808 SET_LEX_STATE(EXPR_BEG);
22809 pushback(p, c);
22810 if (c != -1 && ISDIGIT(c)) {
22811 return tUMINUS_NUM;
22812 }
22813 return tUMINUS;
22814 }
22815 SET_LEX_STATE(EXPR_BEG);
22816 pushback(p, c);
22817 return warn_balanced('-', "-", "unary operator");
22818
22819 case '.': {
22820 int is_beg = IS_BEG();
22821 SET_LEX_STATE(EXPR_BEG);
22822 if ((c = nextc(p)) == '.') {
22823 if ((c = nextc(p)) == '.') {
22824 if (p->ctxt.in_argdef || IS_LABEL_POSSIBLE()) {
22825 SET_LEX_STATE(EXPR_ENDARG);
22826 return tBDOT3;
22827 }
22828 if (p->lex.paren_nest == 0 && looking_at_eol_p(p)) {
22829 rb_warn0("... at EOL, should be parenthesized?");
22830 }
22831 return is_beg ? tBDOT3 : tDOT3;
22832 }
22833 pushback(p, c);
22834 return is_beg ? tBDOT2 : tDOT2;
22835 }
22836 pushback(p, c);
22837 if (c != -1 && ISDIGIT(c)) {
22838 char prev = p->lex.pcur-1 > p->lex.pbeg ? *(p->lex.pcur-2) : 0;
22839 parse_numeric(p, '.');
22840 if (ISDIGIT(prev)) {
22841 yyerror0("unexpected fraction part after numeric literal");
22842 }
22843 else {
22844 yyerror0("no .<digit> floating literal anymore; put 0 before dot");
22845 }
22846 SET_LEX_STATE(EXPR_END);
22847 p->lex.ptok = p->lex.pcur;
22848 goto retry;
22849 }
22850 set_yylval_id('.');
22851 SET_LEX_STATE(EXPR_DOT);
22852 return '.';
22853 }
22854
22855 case '0': case '1': case '2': case '3': case '4':
22856 case '5': case '6': case '7': case '8': case '9':
22857 return parse_numeric(p, c);
22858
22859 case ')':
22860 COND_POP();
22861 CMDARG_POP();
22862 SET_LEX_STATE(EXPR_ENDFN);
22863 p->lex.paren_nest--;
22864 return c;
22865
22866 case ']':
22867 COND_POP();
22868 CMDARG_POP();
22869 SET_LEX_STATE(EXPR_END);
22870 p->lex.paren_nest--;
22871 return c;
22872
22873 case '}':
22874 /* tSTRING_DEND does COND_POP and CMDARG_POP in the yacc's rule */
22875 if (!p->lex.brace_nest--) return tSTRING_DEND;
22876 COND_POP();
22877 CMDARG_POP();
22878 SET_LEX_STATE(EXPR_END);
22879 p->lex.paren_nest--;
22880 return c;
22881
22882 case ':':
22883 c = nextc(p);
22884 if (c == ':') {
22885 if (IS_BEG() || IS_lex_state(EXPR_CLASS) || IS_SPCARG(-1)) {
22886 SET_LEX_STATE(EXPR_BEG);
22887 return tCOLON3;
22888 }
22889 set_yylval_id(idCOLON2);
22890 SET_LEX_STATE(EXPR_DOT);
22891 return tCOLON2;
22892 }
22893 if (IS_END() || ISSPACE(c) || c == '#') {
22894 pushback(p, c);
22895 c = warn_balanced(':', ":", "symbol literal");
22896 SET_LEX_STATE(EXPR_BEG);
22897 return c;
22898 }
22899 switch (c) {
22900 case '\'':
22901 p->lex.strterm = NEW_STRTERM(str_ssym, c, 0);
22902 break;
22903 case '"':
22904 p->lex.strterm = NEW_STRTERM(str_dsym, c, 0);
22905 break;
22906 default:
22907 pushback(p, c);
22908 break;
22909 }
22910 SET_LEX_STATE(EXPR_FNAME);
22911 return tSYMBEG;
22912
22913 case '/':
22914 if (IS_BEG()) {
22915 p->lex.strterm = NEW_STRTERM(str_regexp, '/', 0);
22916 return tREGEXP_BEG;
22917 }
22918 if ((c = nextc(p)) == '=') {
22919 set_yylval_id('/');
22920 SET_LEX_STATE(EXPR_BEG);
22921 return tOP_ASGN;
22922 }
22923 pushback(p, c);
22924 if (IS_SPCARG(c)) {
22925 arg_ambiguous(p, '/');
22926 p->lex.strterm = NEW_STRTERM(str_regexp, '/', 0);
22927 return tREGEXP_BEG;
22928 }
22929 SET_LEX_STATE(IS_AFTER_OPERATOR() ? EXPR_ARG : EXPR_BEG);
22930 return warn_balanced('/', "/", "regexp literal");
22931
22932 case '^':
22933 if ((c = nextc(p)) == '=') {
22934 set_yylval_id('^');
22935 SET_LEX_STATE(EXPR_BEG);
22936 return tOP_ASGN;
22937 }
22938 SET_LEX_STATE(IS_AFTER_OPERATOR() ? EXPR_ARG : EXPR_BEG);
22939 pushback(p, c);
22940 return '^';
22941
22942 case ';':
22943 SET_LEX_STATE(EXPR_BEG);
22944 p->command_start = TRUE;
22945 return ';';
22946
22947 case ',':
22948 SET_LEX_STATE(EXPR_BEG|EXPR_LABEL);
22949 return ',';
22950
22951 case '~':
22952 if (IS_AFTER_OPERATOR()) {
22953 if ((c = nextc(p)) != '@') {
22954 pushback(p, c);
22955 }
22956 SET_LEX_STATE(EXPR_ARG);
22957 }
22958 else {
22959 SET_LEX_STATE(EXPR_BEG);
22960 }
22961 return '~';
22962
22963 case '(':
22964 if (IS_BEG()) {
22965 c = tLPAREN;
22966 }
22967 else if (!space_seen) {
22968 /* foo( ... ) => method call, no ambiguity */
22969 }
22970 else if (IS_ARG() || IS_lex_state_all(EXPR_END|EXPR_LABEL)) {
22971 c = tLPAREN_ARG;
22972 }
22973 else if (IS_lex_state(EXPR_ENDFN) && !lambda_beginning_p()) {
22974 rb_warning0("parentheses after method name is interpreted as "
22975 "an argument list, not a decomposed argument");
22976 }
22977 p->lex.paren_nest++;
22978 COND_PUSH(0);
22979 CMDARG_PUSH(0);
22980 SET_LEX_STATE(EXPR_BEG|EXPR_LABEL);
22981 return c;
22982
22983 case '[':
22984 p->lex.paren_nest++;
22985 if (IS_AFTER_OPERATOR()) {
22986 if ((c = nextc(p)) == ']') {
22987 p->lex.paren_nest--;
22988 SET_LEX_STATE(EXPR_ARG);
22989 if ((c = nextc(p)) == '=') {
22990 return tASET;
22991 }
22992 pushback(p, c);
22993 return tAREF;
22994 }
22995 pushback(p, c);
22996 SET_LEX_STATE(EXPR_ARG|EXPR_LABEL);
22997 return '[';
22998 }
22999 else if (IS_BEG()) {
23000 c = tLBRACK;
23001 }
23002 else if (IS_ARG() && (space_seen || IS_lex_state(EXPR_LABELED))) {
23003 c = tLBRACK;
23004 }
23005 SET_LEX_STATE(EXPR_BEG|EXPR_LABEL);
23006 COND_PUSH(0);
23007 CMDARG_PUSH(0);
23008 return c;
23009
23010 case '{':
23011 ++p->lex.brace_nest;
23012 if (lambda_beginning_p())
23013 c = tLAMBEG;
23014 else if (IS_lex_state(EXPR_LABELED))
23015 c = tLBRACE; /* hash */
23016 else if (IS_lex_state(EXPR_ARG_ANY | EXPR_END | EXPR_ENDFN))
23017 c = '{'; /* block (primary) */
23018 else if (IS_lex_state(EXPR_ENDARG))
23019 c = tLBRACE_ARG; /* block (expr) */
23020 else
23021 c = tLBRACE; /* hash */
23022 if (c != tLBRACE) {
23023 p->command_start = TRUE;
23024 SET_LEX_STATE(EXPR_BEG);
23025 }
23026 else {
23027 SET_LEX_STATE(EXPR_BEG|EXPR_LABEL);
23028 }
23029 ++p->lex.paren_nest; /* after lambda_beginning_p() */
23030 COND_PUSH(0);
23031 CMDARG_PUSH(0);
23032 return c;
23033
23034 case '\\':
23035 c = nextc(p);
23036 if (c == '\n') {
23037 space_seen = 1;
23038 dispatch_scan_event(p, tSP);
23039 goto retry; /* skip \\n */
23040 }
23041 if (c == ' ') return tSP;
23042 if (ISSPACE(c)) return c;
23043 pushback(p, c);
23044 return '\\';
23045
23046 case '%':
23047 return parse_percent(p, space_seen, last_state);
23048
23049 case '$':
23050 return parse_gvar(p, last_state);
23051
23052 case '@':
23053 return parse_atmark(p, last_state);
23054
23055 case '_':
23056 if (was_bol(p) && whole_match_p(p, "__END__", 7, 0)) {
23057 p->ruby__end__seen = 1;
23058 p->eofp = 1;
23059#ifdef RIPPER
23060 lex_goto_eol(p);
23061 dispatch_scan_event(p, k__END__);
23062#endif
23063 return END_OF_INPUT;
23064 }
23065 newtok(p);
23066 break;
23067
23068 default:
23069 if (!parser_is_identchar(p)) {
23070 compile_error(p, "Invalid char '\\x%02X' in expression", c);
23071 token_flush(p);
23072 goto retry;
23073 }
23074
23075 newtok(p);
23076 break;
23077 }
23078
23079 return parse_ident(p, c, cmd_state);
23080}
23081
23082static enum yytokentype
23083yylex(YYSTYPE *lval, YYLTYPE *yylloc, struct parser_params *p)
23084{
23085 enum yytokentype t;
23086
23087 p->lval = lval;
23088 lval->node = 0;
23089 p->yylloc = yylloc;
23090
23091 t = parser_yylex(p);
23092
23093 if (has_delayed_token(p))
23094 dispatch_delayed_token(p, t);
23095 else if (t != END_OF_INPUT)
23096 dispatch_scan_event(p, t);
23097
23098 return t;
23099}
23100
23101#define LVAR_USED ((ID)1 << (sizeof(ID) * CHAR_BIT - 1))
23102
23103static NODE*
23104node_new_internal(struct parser_params *p, enum node_type type, size_t size, size_t alignment)
23105{
23106 NODE *n = rb_ast_newnode(p->ast, type, size, alignment);
23107
23108 rb_node_init(n, type);
23109 return n;
23110}
23111
23112static NODE *
23113nd_set_loc(NODE *nd, const YYLTYPE *loc)
23114{
23115 nd->nd_loc = *loc;
23116 nd_set_line(nd, loc->beg_pos.lineno);
23117 return nd;
23118}
23119
23120static NODE*
23121node_newnode(struct parser_params *p, enum node_type type, size_t size, size_t alignment, const rb_code_location_t *loc)
23122{
23123 NODE *n = node_new_internal(p, type, size, alignment);
23124
23125 nd_set_loc(n, loc);
23126 nd_set_node_id(n, parser_get_node_id(p));
23127 return n;
23128}
23129
23130#define NODE_NEWNODE(node_type, type, loc) (type *)(node_newnode(p, node_type, sizeof(type), RUBY_ALIGNOF(type), loc))
23131
23132static rb_node_scope_t *
23133rb_node_scope_new(struct parser_params *p, rb_node_args_t *nd_args, NODE *nd_body, NODE *nd_parent, const YYLTYPE *loc)
23134{
23135 rb_ast_id_table_t *nd_tbl;
23136 nd_tbl = local_tbl(p);
23137 rb_node_scope_t *n = NODE_NEWNODE(NODE_SCOPE, rb_node_scope_t, loc);
23138 n->nd_tbl = nd_tbl;
23139 n->nd_body = nd_body;
23140 n->nd_parent = nd_parent;
23141 n->nd_args = nd_args;
23142
23143 return n;
23144}
23145
23146static rb_node_scope_t *
23147rb_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)
23148{
23149 rb_node_scope_t *n = NODE_NEWNODE(NODE_SCOPE, rb_node_scope_t, loc);
23150 n->nd_tbl = nd_tbl;
23151 n->nd_body = nd_body;
23152 n->nd_parent = nd_parent;
23153 n->nd_args = nd_args;
23154
23155 return n;
23156}
23157
23158static rb_node_defn_t *
23159rb_node_defn_new(struct parser_params *p, ID nd_mid, NODE *nd_defn, const YYLTYPE *loc)
23160{
23161 rb_node_defn_t *n = NODE_NEWNODE(NODE_DEFN, rb_node_defn_t, loc);
23162 n->nd_mid = nd_mid;
23163 n->nd_defn = nd_defn;
23164
23165 return n;
23166}
23167
23168static rb_node_defs_t *
23169rb_node_defs_new(struct parser_params *p, NODE *nd_recv, ID nd_mid, NODE *nd_defn, const YYLTYPE *loc)
23170{
23171 rb_node_defs_t *n = NODE_NEWNODE(NODE_DEFS, rb_node_defs_t, loc);
23172 n->nd_recv = nd_recv;
23173 n->nd_mid = nd_mid;
23174 n->nd_defn = nd_defn;
23175
23176 return n;
23177}
23178
23179static rb_node_block_t *
23180rb_node_block_new(struct parser_params *p, NODE *nd_head, const YYLTYPE *loc)
23181{
23182 rb_node_block_t *n = NODE_NEWNODE(NODE_BLOCK, rb_node_block_t, loc);
23183 n->nd_head = nd_head;
23184 n->nd_end = (NODE *)n;
23185 n->nd_next = 0;
23186
23187 return n;
23188}
23189
23190static rb_node_for_t *
23191rb_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)
23192{
23193 rb_node_for_t *n = NODE_NEWNODE(NODE_FOR, rb_node_for_t, loc);
23194 n->nd_body = nd_body;
23195 n->nd_iter = nd_iter;
23196 n->for_keyword_loc = *for_keyword_loc;
23197 n->in_keyword_loc = *in_keyword_loc;
23198 n->do_keyword_loc = *do_keyword_loc;
23199 n->end_keyword_loc = *end_keyword_loc;
23200
23201 return n;
23202}
23203
23204static rb_node_for_masgn_t *
23205rb_node_for_masgn_new(struct parser_params *p, NODE *nd_var, const YYLTYPE *loc)
23206{
23207 rb_node_for_masgn_t *n = NODE_NEWNODE(NODE_FOR_MASGN, rb_node_for_masgn_t, loc);
23208 n->nd_var = nd_var;
23209
23210 return n;
23211}
23212
23213static rb_node_retry_t *
23214rb_node_retry_new(struct parser_params *p, const YYLTYPE *loc)
23215{
23216 rb_node_retry_t *n = NODE_NEWNODE(NODE_RETRY, rb_node_retry_t, loc);
23217
23218 return n;
23219}
23220
23221static rb_node_begin_t *
23222rb_node_begin_new(struct parser_params *p, NODE *nd_body, const YYLTYPE *loc)
23223{
23224 rb_node_begin_t *n = NODE_NEWNODE(NODE_BEGIN, rb_node_begin_t, loc);
23225 n->nd_body = nd_body;
23226
23227 return n;
23228}
23229
23230static rb_node_rescue_t *
23231rb_node_rescue_new(struct parser_params *p, NODE *nd_head, NODE *nd_resq, NODE *nd_else, const YYLTYPE *loc)
23232{
23233 rb_node_rescue_t *n = NODE_NEWNODE(NODE_RESCUE, rb_node_rescue_t, loc);
23234 n->nd_head = nd_head;
23235 n->nd_resq = nd_resq;
23236 n->nd_else = nd_else;
23237
23238 return n;
23239}
23240
23241static rb_node_resbody_t *
23242rb_node_resbody_new(struct parser_params *p, NODE *nd_args, NODE *nd_exc_var, NODE *nd_body, NODE *nd_next, const YYLTYPE *loc)
23243{
23244 rb_node_resbody_t *n = NODE_NEWNODE(NODE_RESBODY, rb_node_resbody_t, loc);
23245 n->nd_args = nd_args;
23246 n->nd_exc_var = nd_exc_var;
23247 n->nd_body = nd_body;
23248 n->nd_next = nd_next;
23249
23250 return n;
23251}
23252
23253static rb_node_ensure_t *
23254rb_node_ensure_new(struct parser_params *p, NODE *nd_head, NODE *nd_ensr, const YYLTYPE *loc)
23255{
23256 rb_node_ensure_t *n = NODE_NEWNODE(NODE_ENSURE, rb_node_ensure_t, loc);
23257 n->nd_head = nd_head;
23258 n->nd_ensr = nd_ensr;
23259
23260 return n;
23261}
23262
23263static rb_node_and_t *
23264rb_node_and_new(struct parser_params *p, NODE *nd_1st, NODE *nd_2nd, const YYLTYPE *loc, const YYLTYPE *operator_loc)
23265{
23266 rb_node_and_t *n = NODE_NEWNODE(NODE_AND, rb_node_and_t, loc);
23267 n->nd_1st = nd_1st;
23268 n->nd_2nd = nd_2nd;
23269 n->operator_loc = *operator_loc;
23270
23271 return n;
23272}
23273
23274static rb_node_or_t *
23275rb_node_or_new(struct parser_params *p, NODE *nd_1st, NODE *nd_2nd, const YYLTYPE *loc, const YYLTYPE *operator_loc)
23276{
23277 rb_node_or_t *n = NODE_NEWNODE(NODE_OR, rb_node_or_t, loc);
23278 n->nd_1st = nd_1st;
23279 n->nd_2nd = nd_2nd;
23280 n->operator_loc = *operator_loc;
23281
23282 return n;
23283}
23284
23285static rb_node_return_t *
23286rb_node_return_new(struct parser_params *p, NODE *nd_stts, const YYLTYPE *loc, const YYLTYPE *keyword_loc)
23287{
23288 rb_node_return_t *n = NODE_NEWNODE(NODE_RETURN, rb_node_return_t, loc);
23289 n->nd_stts = nd_stts;
23290 n->keyword_loc = *keyword_loc;
23291 return n;
23292}
23293
23294static rb_node_yield_t *
23295rb_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)
23296{
23297 if (nd_head) no_blockarg(p, nd_head);
23298
23299 rb_node_yield_t *n = NODE_NEWNODE(NODE_YIELD, rb_node_yield_t, loc);
23300 n->nd_head = nd_head;
23301 n->keyword_loc = *keyword_loc;
23302 n->lparen_loc = *lparen_loc;
23303 n->rparen_loc = *rparen_loc;
23304
23305 return n;
23306}
23307
23308static rb_node_if_t *
23309rb_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)
23310{
23311 rb_node_if_t *n = NODE_NEWNODE(NODE_IF, rb_node_if_t, loc);
23312 n->nd_cond = nd_cond;
23313 n->nd_body = nd_body;
23314 n->nd_else = nd_else;
23315 n->if_keyword_loc = *if_keyword_loc;
23316 n->then_keyword_loc = *then_keyword_loc;
23317 n->end_keyword_loc = *end_keyword_loc;
23318
23319 return n;
23320}
23321
23322static rb_node_unless_t *
23323rb_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)
23324{
23325 rb_node_unless_t *n = NODE_NEWNODE(NODE_UNLESS, rb_node_unless_t, loc);
23326 n->nd_cond = nd_cond;
23327 n->nd_body = nd_body;
23328 n->nd_else = nd_else;
23329 n->keyword_loc = *keyword_loc;
23330 n->then_keyword_loc = *then_keyword_loc;
23331 n->end_keyword_loc = *end_keyword_loc;
23332
23333 return n;
23334}
23335
23336static rb_node_class_t *
23337rb_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)
23338{
23339 /* Keep the order of node creation */
23340 NODE *scope = NEW_SCOPE(0, nd_body, NULL, loc);
23341 rb_node_class_t *n = NODE_NEWNODE(NODE_CLASS, rb_node_class_t, loc);
23342 RNODE_SCOPE(scope)->nd_parent = &n->node;
23343 n->nd_cpath = nd_cpath;
23344 n->nd_body = scope;
23345 n->nd_super = nd_super;
23346 n->class_keyword_loc = *class_keyword_loc;
23347 n->inheritance_operator_loc = *inheritance_operator_loc;
23348 n->end_keyword_loc = *end_keyword_loc;
23349
23350 return n;
23351}
23352
23353static rb_node_sclass_t *
23354rb_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)
23355{
23356 /* Keep the order of node creation */
23357 NODE *scope = NEW_SCOPE(0, nd_body, NULL, loc);
23358 rb_node_sclass_t *n = NODE_NEWNODE(NODE_SCLASS, rb_node_sclass_t, loc);
23359 RNODE_SCOPE(scope)->nd_parent = &n->node;
23360 n->nd_recv = nd_recv;
23361 n->nd_body = scope;
23362 n->class_keyword_loc = *class_keyword_loc;
23363 n->operator_loc = *operator_loc;
23364 n->end_keyword_loc = *end_keyword_loc;
23365
23366 return n;
23367}
23368
23369static rb_node_module_t *
23370rb_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)
23371{
23372 /* Keep the order of node creation */
23373 NODE *scope = NEW_SCOPE(0, nd_body, NULL, loc);
23374 rb_node_module_t *n = NODE_NEWNODE(NODE_MODULE, rb_node_module_t, loc);
23375 RNODE_SCOPE(scope)->nd_parent = &n->node;
23376 n->nd_cpath = nd_cpath;
23377 n->nd_body = scope;
23378 n->module_keyword_loc = *module_keyword_loc;
23379 n->end_keyword_loc = *end_keyword_loc;
23380
23381 return n;
23382}
23383
23384static rb_node_iter_t *
23385rb_node_iter_new(struct parser_params *p, rb_node_args_t *nd_args, NODE *nd_body, const YYLTYPE *loc)
23386{
23387 /* Keep the order of node creation */
23388 NODE *scope = NEW_SCOPE(nd_args, nd_body, NULL, loc);
23389 rb_node_iter_t *n = NODE_NEWNODE(NODE_ITER, rb_node_iter_t, loc);
23390 RNODE_SCOPE(scope)->nd_parent = &n->node;
23391 n->nd_body = scope;
23392 n->nd_iter = 0;
23393
23394 return n;
23395}
23396
23397static rb_node_lambda_t *
23398rb_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)
23399{
23400 /* Keep the order of node creation */
23401 NODE *scope = NEW_SCOPE(nd_args, nd_body, NULL, loc);
23402 YYLTYPE lambda_loc = code_loc_gen(operator_loc, closing_loc);
23403 rb_node_lambda_t *n = NODE_NEWNODE(NODE_LAMBDA, rb_node_lambda_t, &lambda_loc);
23404 RNODE_SCOPE(scope)->nd_parent = &n->node;
23405 n->nd_body = scope;
23406 n->operator_loc = *operator_loc;
23407 n->opening_loc = *opening_loc;
23408 n->closing_loc = *closing_loc;
23409
23410 return n;
23411}
23412
23413static rb_node_case_t *
23414rb_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)
23415{
23416 rb_node_case_t *n = NODE_NEWNODE(NODE_CASE, rb_node_case_t, loc);
23417 n->nd_head = nd_head;
23418 n->nd_body = nd_body;
23419 n->case_keyword_loc = *case_keyword_loc;
23420 n->end_keyword_loc = *end_keyword_loc;
23421
23422 return n;
23423}
23424
23425static rb_node_case2_t *
23426rb_node_case2_new(struct parser_params *p, NODE *nd_body, const YYLTYPE *loc, const YYLTYPE *case_keyword_loc, const YYLTYPE *end_keyword_loc)
23427{
23428 rb_node_case2_t *n = NODE_NEWNODE(NODE_CASE2, rb_node_case2_t, loc);
23429 n->nd_head = 0;
23430 n->nd_body = nd_body;
23431 n->case_keyword_loc = *case_keyword_loc;
23432 n->end_keyword_loc = *end_keyword_loc;
23433
23434 return n;
23435}
23436
23437static rb_node_case3_t *
23438rb_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)
23439{
23440 rb_node_case3_t *n = NODE_NEWNODE(NODE_CASE3, rb_node_case3_t, loc);
23441 n->nd_head = nd_head;
23442 n->nd_body = nd_body;
23443 n->case_keyword_loc = *case_keyword_loc;
23444 n->end_keyword_loc = *end_keyword_loc;
23445
23446 return n;
23447}
23448
23449static rb_node_when_t *
23450rb_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)
23451{
23452 rb_node_when_t *n = NODE_NEWNODE(NODE_WHEN, rb_node_when_t, loc);
23453 n->nd_head = nd_head;
23454 n->nd_body = nd_body;
23455 n->nd_next = nd_next;
23456 n->keyword_loc = *keyword_loc;
23457 n->then_keyword_loc = *then_keyword_loc;
23458
23459 return n;
23460}
23461
23462static rb_node_in_t *
23463rb_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)
23464{
23465 rb_node_in_t *n = NODE_NEWNODE(NODE_IN, rb_node_in_t, loc);
23466 n->nd_head = nd_head;
23467 n->nd_body = nd_body;
23468 n->nd_next = nd_next;
23469 n->in_keyword_loc = *in_keyword_loc;
23470 n->then_keyword_loc = *then_keyword_loc;
23471 n->operator_loc = *operator_loc;
23472
23473 return n;
23474}
23475
23476static rb_node_while_t *
23477rb_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)
23478{
23479 rb_node_while_t *n = NODE_NEWNODE(NODE_WHILE, rb_node_while_t, loc);
23480 n->nd_cond = nd_cond;
23481 n->nd_body = nd_body;
23482 n->nd_state = nd_state;
23483 n->keyword_loc = *keyword_loc;
23484 n->closing_loc = *closing_loc;
23485
23486 return n;
23487}
23488
23489static rb_node_until_t *
23490rb_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)
23491{
23492 rb_node_until_t *n = NODE_NEWNODE(NODE_UNTIL, rb_node_until_t, loc);
23493 n->nd_cond = nd_cond;
23494 n->nd_body = nd_body;
23495 n->nd_state = nd_state;
23496 n->keyword_loc = *keyword_loc;
23497 n->closing_loc = *closing_loc;
23498
23499 return n;
23500}
23501
23502static rb_node_colon2_t *
23503rb_node_colon2_new(struct parser_params *p, NODE *nd_head, ID nd_mid, const YYLTYPE *loc, const YYLTYPE *delimiter_loc, const YYLTYPE *name_loc)
23504{
23505 rb_node_colon2_t *n = NODE_NEWNODE(NODE_COLON2, rb_node_colon2_t, loc);
23506 n->nd_head = nd_head;
23507 n->nd_mid = nd_mid;
23508 n->delimiter_loc = *delimiter_loc;
23509 n->name_loc = *name_loc;
23510
23511 return n;
23512}
23513
23514static rb_node_colon3_t *
23515rb_node_colon3_new(struct parser_params *p, ID nd_mid, const YYLTYPE *loc, const YYLTYPE *delimiter_loc, const YYLTYPE *name_loc)
23516{
23517 rb_node_colon3_t *n = NODE_NEWNODE(NODE_COLON3, rb_node_colon3_t, loc);
23518 n->nd_mid = nd_mid;
23519 n->delimiter_loc = *delimiter_loc;
23520 n->name_loc = *name_loc;
23521
23522 return n;
23523}
23524
23525static rb_node_dot2_t *
23526rb_node_dot2_new(struct parser_params *p, NODE *nd_beg, NODE *nd_end, const YYLTYPE *loc, const YYLTYPE *operator_loc)
23527{
23528 rb_node_dot2_t *n = NODE_NEWNODE(NODE_DOT2, rb_node_dot2_t, loc);
23529 n->nd_beg = nd_beg;
23530 n->nd_end = nd_end;
23531 n->operator_loc = *operator_loc;
23532
23533 return n;
23534}
23535
23536static rb_node_dot3_t *
23537rb_node_dot3_new(struct parser_params *p, NODE *nd_beg, NODE *nd_end, const YYLTYPE *loc, const YYLTYPE *operator_loc)
23538{
23539 rb_node_dot3_t *n = NODE_NEWNODE(NODE_DOT3, rb_node_dot3_t, loc);
23540 n->nd_beg = nd_beg;
23541 n->nd_end = nd_end;
23542 n->operator_loc = *operator_loc;
23543
23544 return n;
23545}
23546
23547static rb_node_self_t *
23548rb_node_self_new(struct parser_params *p, const YYLTYPE *loc)
23549{
23550 rb_node_self_t *n = NODE_NEWNODE(NODE_SELF, rb_node_self_t, loc);
23551 n->nd_state = 1;
23552
23553 return n;
23554}
23555
23556static rb_node_nil_t *
23557rb_node_nil_new(struct parser_params *p, const YYLTYPE *loc)
23558{
23559 rb_node_nil_t *n = NODE_NEWNODE(NODE_NIL, rb_node_nil_t, loc);
23560
23561 return n;
23562}
23563
23564static rb_node_true_t *
23565rb_node_true_new(struct parser_params *p, const YYLTYPE *loc)
23566{
23567 rb_node_true_t *n = NODE_NEWNODE(NODE_TRUE, rb_node_true_t, loc);
23568
23569 return n;
23570}
23571
23572static rb_node_false_t *
23573rb_node_false_new(struct parser_params *p, const YYLTYPE *loc)
23574{
23575 rb_node_false_t *n = NODE_NEWNODE(NODE_FALSE, rb_node_false_t, loc);
23576
23577 return n;
23578}
23579
23580static rb_node_super_t *
23581rb_node_super_new(struct parser_params *p, NODE *nd_args, const YYLTYPE *loc,
23582 const YYLTYPE *keyword_loc, const YYLTYPE *lparen_loc, const YYLTYPE *rparen_loc)
23583{
23584 rb_node_super_t *n = NODE_NEWNODE(NODE_SUPER, rb_node_super_t, loc);
23585 n->nd_args = nd_args;
23586 n->keyword_loc = *keyword_loc;
23587 n->lparen_loc = *lparen_loc;
23588 n->rparen_loc = *rparen_loc;
23589
23590 return n;
23591}
23592
23593static rb_node_zsuper_t *
23594rb_node_zsuper_new(struct parser_params *p, const YYLTYPE *loc)
23595{
23596 rb_node_zsuper_t *n = NODE_NEWNODE(NODE_ZSUPER, rb_node_zsuper_t, loc);
23597
23598 return n;
23599}
23600
23601static rb_node_match2_t *
23602rb_node_match2_new(struct parser_params *p, NODE *nd_recv, NODE *nd_value, const YYLTYPE *loc)
23603{
23604 rb_node_match2_t *n = NODE_NEWNODE(NODE_MATCH2, rb_node_match2_t, loc);
23605 n->nd_recv = nd_recv;
23606 n->nd_value = nd_value;
23607 n->nd_args = 0;
23608
23609 return n;
23610}
23611
23612static rb_node_match3_t *
23613rb_node_match3_new(struct parser_params *p, NODE *nd_recv, NODE *nd_value, const YYLTYPE *loc)
23614{
23615 rb_node_match3_t *n = NODE_NEWNODE(NODE_MATCH3, rb_node_match3_t, loc);
23616 n->nd_recv = nd_recv;
23617 n->nd_value = nd_value;
23618
23619 return n;
23620}
23621
23622static rb_node_list_t *
23623rb_node_list_new(struct parser_params *p, NODE *nd_head, const YYLTYPE *loc)
23624{
23625 return rb_node_list_new2(p, nd_head, 1, 0, loc);
23626}
23627
23628static rb_node_list_t *
23629rb_node_list_new2(struct parser_params *p, NODE *nd_head, long nd_alen, NODE *nd_next, const YYLTYPE *loc)
23630{
23631 rb_node_list_t *n = NODE_NEWNODE(NODE_LIST, rb_node_list_t, loc);
23632 n->nd_head = nd_head;
23633 n->as.nd_alen = nd_alen;
23634 n->nd_next = nd_next;
23635
23636 return n;
23637}
23638
23639static rb_node_zlist_t *
23640rb_node_zlist_new(struct parser_params *p, const YYLTYPE *loc)
23641{
23642 rb_node_zlist_t *n = NODE_NEWNODE(NODE_ZLIST, rb_node_zlist_t, loc);
23643
23644 return n;
23645}
23646
23647static rb_node_hash_t *
23648rb_node_hash_new(struct parser_params *p, NODE *nd_head, const YYLTYPE *loc)
23649{
23650 rb_node_hash_t *n = NODE_NEWNODE(NODE_HASH, rb_node_hash_t, loc);
23651 n->nd_head = nd_head;
23652 n->nd_brace = 0;
23653
23654 return n;
23655}
23656
23657static rb_node_masgn_t *
23658rb_node_masgn_new(struct parser_params *p, NODE *nd_head, NODE *nd_args, const YYLTYPE *loc)
23659{
23660 rb_node_masgn_t *n = NODE_NEWNODE(NODE_MASGN, rb_node_masgn_t, loc);
23661 n->nd_head = nd_head;
23662 n->nd_value = 0;
23663 n->nd_args = nd_args;
23664
23665 return n;
23666}
23667
23668static rb_node_gasgn_t *
23669rb_node_gasgn_new(struct parser_params *p, ID nd_vid, NODE *nd_value, const YYLTYPE *loc)
23670{
23671 rb_node_gasgn_t *n = NODE_NEWNODE(NODE_GASGN, rb_node_gasgn_t, loc);
23672 n->nd_vid = nd_vid;
23673 n->nd_value = nd_value;
23674
23675 return n;
23676}
23677
23678static rb_node_lasgn_t *
23679rb_node_lasgn_new(struct parser_params *p, ID nd_vid, NODE *nd_value, const YYLTYPE *loc)
23680{
23681 rb_node_lasgn_t *n = NODE_NEWNODE(NODE_LASGN, rb_node_lasgn_t, loc);
23682 n->nd_vid = nd_vid;
23683 n->nd_value = nd_value;
23684
23685 return n;
23686}
23687
23688static rb_node_dasgn_t *
23689rb_node_dasgn_new(struct parser_params *p, ID nd_vid, NODE *nd_value, const YYLTYPE *loc)
23690{
23691 rb_node_dasgn_t *n = NODE_NEWNODE(NODE_DASGN, rb_node_dasgn_t, loc);
23692 n->nd_vid = nd_vid;
23693 n->nd_value = nd_value;
23694
23695 return n;
23696}
23697
23698static rb_node_iasgn_t *
23699rb_node_iasgn_new(struct parser_params *p, ID nd_vid, NODE *nd_value, const YYLTYPE *loc)
23700{
23701 rb_node_iasgn_t *n = NODE_NEWNODE(NODE_IASGN, rb_node_iasgn_t, loc);
23702 n->nd_vid = nd_vid;
23703 n->nd_value = nd_value;
23704
23705 return n;
23706}
23707
23708static rb_node_cvasgn_t *
23709rb_node_cvasgn_new(struct parser_params *p, ID nd_vid, NODE *nd_value, const YYLTYPE *loc)
23710{
23711 rb_node_cvasgn_t *n = NODE_NEWNODE(NODE_CVASGN, rb_node_cvasgn_t, loc);
23712 n->nd_vid = nd_vid;
23713 n->nd_value = nd_value;
23714
23715 return n;
23716}
23717
23718static rb_node_op_asgn1_t *
23719rb_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)
23720{
23721 rb_node_op_asgn1_t *n = NODE_NEWNODE(NODE_OP_ASGN1, rb_node_op_asgn1_t, loc);
23722 n->nd_recv = nd_recv;
23723 n->nd_mid = nd_mid;
23724 n->nd_index = index;
23725 n->nd_rvalue = rvalue;
23726 n->call_operator_loc = *call_operator_loc;
23727 n->opening_loc = *opening_loc;
23728 n->closing_loc = *closing_loc;
23729 n->binary_operator_loc = *binary_operator_loc;
23730
23731 return n;
23732}
23733
23734static rb_node_op_asgn2_t *
23735rb_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)
23736{
23737 rb_node_op_asgn2_t *n = NODE_NEWNODE(NODE_OP_ASGN2, rb_node_op_asgn2_t, loc);
23738 n->nd_recv = nd_recv;
23739 n->nd_value = nd_value;
23740 n->nd_vid = nd_vid;
23741 n->nd_mid = nd_mid;
23742 n->nd_aid = nd_aid;
23743 n->call_operator_loc = *call_operator_loc;
23744 n->message_loc = *message_loc;
23745 n->binary_operator_loc = *binary_operator_loc;
23746
23747 return n;
23748}
23749
23750static rb_node_op_asgn_or_t *
23751rb_node_op_asgn_or_new(struct parser_params *p, NODE *nd_head, NODE *nd_value, const YYLTYPE *loc)
23752{
23753 rb_node_op_asgn_or_t *n = NODE_NEWNODE(NODE_OP_ASGN_OR, rb_node_op_asgn_or_t, loc);
23754 n->nd_head = nd_head;
23755 n->nd_value = nd_value;
23756
23757 return n;
23758}
23759
23760static rb_node_op_asgn_and_t *
23761rb_node_op_asgn_and_new(struct parser_params *p, NODE *nd_head, NODE *nd_value, const YYLTYPE *loc)
23762{
23763 rb_node_op_asgn_and_t *n = NODE_NEWNODE(NODE_OP_ASGN_AND, rb_node_op_asgn_and_t, loc);
23764 n->nd_head = nd_head;
23765 n->nd_value = nd_value;
23766
23767 return n;
23768}
23769
23770static rb_node_gvar_t *
23771rb_node_gvar_new(struct parser_params *p, ID nd_vid, const YYLTYPE *loc)
23772{
23773 rb_node_gvar_t *n = NODE_NEWNODE(NODE_GVAR, rb_node_gvar_t, loc);
23774 n->nd_vid = nd_vid;
23775
23776 return n;
23777}
23778
23779static rb_node_lvar_t *
23780rb_node_lvar_new(struct parser_params *p, ID nd_vid, const YYLTYPE *loc)
23781{
23782 rb_node_lvar_t *n = NODE_NEWNODE(NODE_LVAR, rb_node_lvar_t, loc);
23783 n->nd_vid = nd_vid;
23784
23785 return n;
23786}
23787
23788static rb_node_dvar_t *
23789rb_node_dvar_new(struct parser_params *p, ID nd_vid, const YYLTYPE *loc)
23790{
23791 rb_node_dvar_t *n = NODE_NEWNODE(NODE_DVAR, rb_node_dvar_t, loc);
23792 n->nd_vid = nd_vid;
23793
23794 return n;
23795}
23796
23797static rb_node_ivar_t *
23798rb_node_ivar_new(struct parser_params *p, ID nd_vid, const YYLTYPE *loc)
23799{
23800 rb_node_ivar_t *n = NODE_NEWNODE(NODE_IVAR, rb_node_ivar_t, loc);
23801 n->nd_vid = nd_vid;
23802
23803 return n;
23804}
23805
23806static rb_node_const_t *
23807rb_node_const_new(struct parser_params *p, ID nd_vid, const YYLTYPE *loc)
23808{
23809 rb_node_const_t *n = NODE_NEWNODE(NODE_CONST, rb_node_const_t, loc);
23810 n->nd_vid = nd_vid;
23811
23812 return n;
23813}
23814
23815static rb_node_cvar_t *
23816rb_node_cvar_new(struct parser_params *p, ID nd_vid, const YYLTYPE *loc)
23817{
23818 rb_node_cvar_t *n = NODE_NEWNODE(NODE_CVAR, rb_node_cvar_t, loc);
23819 n->nd_vid = nd_vid;
23820
23821 return n;
23822}
23823
23824static rb_node_nth_ref_t *
23825rb_node_nth_ref_new(struct parser_params *p, long nd_nth, const YYLTYPE *loc)
23826{
23827 rb_node_nth_ref_t *n = NODE_NEWNODE(NODE_NTH_REF, rb_node_nth_ref_t, loc);
23828 n->nd_nth = nd_nth;
23829
23830 return n;
23831}
23832
23833static rb_node_back_ref_t *
23834rb_node_back_ref_new(struct parser_params *p, long nd_nth, const YYLTYPE *loc)
23835{
23836 rb_node_back_ref_t *n = NODE_NEWNODE(NODE_BACK_REF, rb_node_back_ref_t, loc);
23837 n->nd_nth = nd_nth;
23838
23839 return n;
23840}
23841
23842static rb_node_integer_t *
23843rb_node_integer_new(struct parser_params *p, char* val, int base, const YYLTYPE *loc)
23844{
23845 rb_node_integer_t *n = NODE_NEWNODE(NODE_INTEGER, rb_node_integer_t, loc);
23846 n->val = val;
23847 n->minus = FALSE;
23848 n->base = base;
23849
23850 return n;
23851}
23852
23853static rb_node_float_t *
23854rb_node_float_new(struct parser_params *p, char* val, const YYLTYPE *loc)
23855{
23856 rb_node_float_t *n = NODE_NEWNODE(NODE_FLOAT, rb_node_float_t, loc);
23857 n->val = val;
23858 n->minus = FALSE;
23859
23860 return n;
23861}
23862
23863static rb_node_rational_t *
23864rb_node_rational_new(struct parser_params *p, char* val, int base, int seen_point, const YYLTYPE *loc)
23865{
23866 rb_node_rational_t *n = NODE_NEWNODE(NODE_RATIONAL, rb_node_rational_t, loc);
23867 n->val = val;
23868 n->minus = FALSE;
23869 n->base = base;
23870 n->seen_point = seen_point;
23871
23872 return n;
23873}
23874
23875static rb_node_imaginary_t *
23876rb_node_imaginary_new(struct parser_params *p, char* val, int base, int seen_point, enum rb_numeric_type numeric_type, const YYLTYPE *loc)
23877{
23878 rb_node_imaginary_t *n = NODE_NEWNODE(NODE_IMAGINARY, rb_node_imaginary_t, loc);
23879 n->val = val;
23880 n->minus = FALSE;
23881 n->base = base;
23882 n->seen_point = seen_point;
23883 n->type = numeric_type;
23884
23885 return n;
23886}
23887
23888static rb_node_str_t *
23889rb_node_str_new(struct parser_params *p, rb_parser_string_t *string, const YYLTYPE *loc)
23890{
23891 rb_node_str_t *n = NODE_NEWNODE(NODE_STR, rb_node_str_t, loc);
23892 n->string = string;
23893
23894 return n;
23895}
23896
23897/* TODO; Use union for NODE_DSTR2 */
23898static rb_node_dstr_t *
23899rb_node_dstr_new0(struct parser_params *p, rb_parser_string_t *string, long nd_alen, NODE *nd_next, const YYLTYPE *loc)
23900{
23901 rb_node_dstr_t *n = NODE_NEWNODE(NODE_DSTR, rb_node_dstr_t, loc);
23902 n->string = string;
23903 n->as.nd_alen = nd_alen;
23904 n->nd_next = (rb_node_list_t *)nd_next;
23905
23906 return n;
23907}
23908
23909static rb_node_dstr_t *
23910rb_node_dstr_new(struct parser_params *p, rb_parser_string_t *string, const YYLTYPE *loc)
23911{
23912 return rb_node_dstr_new0(p, string, 1, 0, loc);
23913}
23914
23915static rb_node_xstr_t *
23916rb_node_xstr_new(struct parser_params *p, rb_parser_string_t *string, const YYLTYPE *loc)
23917{
23918 rb_node_xstr_t *n = NODE_NEWNODE(NODE_XSTR, rb_node_xstr_t, loc);
23919 n->string = string;
23920
23921 return n;
23922}
23923
23924static rb_node_dxstr_t *
23925rb_node_dxstr_new(struct parser_params *p, rb_parser_string_t *string, long nd_alen, NODE *nd_next, const YYLTYPE *loc)
23926{
23927 rb_node_dxstr_t *n = NODE_NEWNODE(NODE_DXSTR, rb_node_dxstr_t, loc);
23928 n->string = string;
23929 n->as.nd_alen = nd_alen;
23930 n->nd_next = (rb_node_list_t *)nd_next;
23931
23932 return n;
23933}
23934
23935static rb_node_sym_t *
23936rb_node_sym_new(struct parser_params *p, VALUE str, const YYLTYPE *loc)
23937{
23938 rb_node_sym_t *n = NODE_NEWNODE(NODE_SYM, rb_node_sym_t, loc);
23939 n->string = rb_str_to_parser_string(p, str);
23940
23941 return n;
23942}
23943
23944static rb_node_dsym_t *
23945rb_node_dsym_new(struct parser_params *p, rb_parser_string_t *string, long nd_alen, NODE *nd_next, const YYLTYPE *loc)
23946{
23947 rb_node_dsym_t *n = NODE_NEWNODE(NODE_DSYM, rb_node_dsym_t, loc);
23948 n->string = string;
23949 n->as.nd_alen = nd_alen;
23950 n->nd_next = (rb_node_list_t *)nd_next;
23951
23952 return n;
23953}
23954
23955static rb_node_evstr_t *
23956rb_node_evstr_new(struct parser_params *p, NODE *nd_body, const YYLTYPE *loc, const YYLTYPE *opening_loc, const YYLTYPE *closing_loc)
23957{
23958 rb_node_evstr_t *n = NODE_NEWNODE(NODE_EVSTR, rb_node_evstr_t, loc);
23959 n->nd_body = nd_body;
23960 n->opening_loc = *opening_loc;
23961 n->closing_loc = *closing_loc;
23962
23963 return n;
23964}
23965
23966static rb_node_regx_t *
23967rb_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)
23968{
23969 rb_node_regx_t *n = NODE_NEWNODE(NODE_REGX, rb_node_regx_t, loc);
23970 n->string = string;
23971 n->options = options & RE_OPTION_MASK;
23972 n->opening_loc = *opening_loc;
23973 n->content_loc = *content_loc;
23974 n->closing_loc = *closing_loc;
23975
23976 return n;
23977}
23978
23979static rb_node_call_t *
23980rb_node_call_new(struct parser_params *p, NODE *nd_recv, ID nd_mid, NODE *nd_args, const YYLTYPE *loc)
23981{
23982 rb_node_call_t *n = NODE_NEWNODE(NODE_CALL, rb_node_call_t, loc);
23983 n->nd_recv = nd_recv;
23984 n->nd_mid = nd_mid;
23985 n->nd_args = nd_args;
23986
23987 return n;
23988}
23989
23990static rb_node_opcall_t *
23991rb_node_opcall_new(struct parser_params *p, NODE *nd_recv, ID nd_mid, NODE *nd_args, const YYLTYPE *loc)
23992{
23993 rb_node_opcall_t *n = NODE_NEWNODE(NODE_OPCALL, rb_node_opcall_t, loc);
23994 n->nd_recv = nd_recv;
23995 n->nd_mid = nd_mid;
23996 n->nd_args = nd_args;
23997
23998 return n;
23999}
24000
24001static rb_node_fcall_t *
24002rb_node_fcall_new(struct parser_params *p, ID nd_mid, NODE *nd_args, const YYLTYPE *loc)
24003{
24004 rb_node_fcall_t *n = NODE_NEWNODE(NODE_FCALL, rb_node_fcall_t, loc);
24005 n->nd_mid = nd_mid;
24006 n->nd_args = nd_args;
24007
24008 return n;
24009}
24010
24011static rb_node_qcall_t *
24012rb_node_qcall_new(struct parser_params *p, NODE *nd_recv, ID nd_mid, NODE *nd_args, const YYLTYPE *loc)
24013{
24014 rb_node_qcall_t *n = NODE_NEWNODE(NODE_QCALL, rb_node_qcall_t, loc);
24015 n->nd_recv = nd_recv;
24016 n->nd_mid = nd_mid;
24017 n->nd_args = nd_args;
24018
24019 return n;
24020}
24021
24022static rb_node_vcall_t *
24023rb_node_vcall_new(struct parser_params *p, ID nd_mid, const YYLTYPE *loc)
24024{
24025 rb_node_vcall_t *n = NODE_NEWNODE(NODE_VCALL, rb_node_vcall_t, loc);
24026 n->nd_mid = nd_mid;
24027
24028 return n;
24029}
24030
24031static rb_node_once_t *
24032rb_node_once_new(struct parser_params *p, NODE *nd_body, const YYLTYPE *loc)
24033{
24034 rb_node_once_t *n = NODE_NEWNODE(NODE_ONCE, rb_node_once_t, loc);
24035 n->nd_body = nd_body;
24036
24037 return n;
24038}
24039
24040static rb_node_args_t *
24041rb_node_args_new(struct parser_params *p, const YYLTYPE *loc)
24042{
24043 rb_node_args_t *n = NODE_NEWNODE(NODE_ARGS, rb_node_args_t, loc);
24044 MEMZERO(&n->nd_ainfo, struct rb_args_info, 1);
24045
24046 return n;
24047}
24048
24049static rb_node_args_aux_t *
24050rb_node_args_aux_new(struct parser_params *p, ID nd_pid, int nd_plen, const YYLTYPE *loc)
24051{
24052 rb_node_args_aux_t *n = NODE_NEWNODE(NODE_ARGS_AUX, rb_node_args_aux_t, loc);
24053 n->nd_pid = nd_pid;
24054 n->nd_plen = nd_plen;
24055 n->nd_next = 0;
24056
24057 return n;
24058}
24059
24060static rb_node_opt_arg_t *
24061rb_node_opt_arg_new(struct parser_params *p, NODE *nd_body, const YYLTYPE *loc)
24062{
24063 rb_node_opt_arg_t *n = NODE_NEWNODE(NODE_OPT_ARG, rb_node_opt_arg_t, loc);
24064 n->nd_body = nd_body;
24065 n->nd_next = 0;
24066
24067 return n;
24068}
24069
24070static rb_node_kw_arg_t *
24071rb_node_kw_arg_new(struct parser_params *p, NODE *nd_body, const YYLTYPE *loc)
24072{
24073 rb_node_kw_arg_t *n = NODE_NEWNODE(NODE_KW_ARG, rb_node_kw_arg_t, loc);
24074 n->nd_body = nd_body;
24075 n->nd_next = 0;
24076
24077 return n;
24078}
24079
24080static rb_node_postarg_t *
24081rb_node_postarg_new(struct parser_params *p, NODE *nd_1st, NODE *nd_2nd, const YYLTYPE *loc)
24082{
24083 rb_node_postarg_t *n = NODE_NEWNODE(NODE_POSTARG, rb_node_postarg_t, loc);
24084 n->nd_1st = nd_1st;
24085 n->nd_2nd = nd_2nd;
24086
24087 return n;
24088}
24089
24090static rb_node_argscat_t *
24091rb_node_argscat_new(struct parser_params *p, NODE *nd_head, NODE *nd_body, const YYLTYPE *loc)
24092{
24093 rb_node_argscat_t *n = NODE_NEWNODE(NODE_ARGSCAT, rb_node_argscat_t, loc);
24094 n->nd_head = nd_head;
24095 n->nd_body = nd_body;
24096
24097 return n;
24098}
24099
24100static rb_node_argspush_t *
24101rb_node_argspush_new(struct parser_params *p, NODE *nd_head, NODE *nd_body, const YYLTYPE *loc)
24102{
24103 rb_node_argspush_t *n = NODE_NEWNODE(NODE_ARGSPUSH, rb_node_argspush_t, loc);
24104 n->nd_head = nd_head;
24105 n->nd_body = nd_body;
24106
24107 return n;
24108}
24109
24110static rb_node_splat_t *
24111rb_node_splat_new(struct parser_params *p, NODE *nd_head, const YYLTYPE *loc, const YYLTYPE *operator_loc)
24112{
24113 rb_node_splat_t *n = NODE_NEWNODE(NODE_SPLAT, rb_node_splat_t, loc);
24114 n->nd_head = nd_head;
24115 n->operator_loc = *operator_loc;
24116
24117 return n;
24118}
24119
24120static rb_node_block_pass_t *
24121rb_node_block_pass_new(struct parser_params *p, NODE *nd_body, const YYLTYPE *loc, const YYLTYPE *operator_loc)
24122{
24123 rb_node_block_pass_t *n = NODE_NEWNODE(NODE_BLOCK_PASS, rb_node_block_pass_t, loc);
24124 n->forwarding = 0;
24125 n->nd_head = 0;
24126 n->nd_body = nd_body;
24127 n->operator_loc = *operator_loc;
24128
24129 return n;
24130}
24131
24132static rb_node_alias_t *
24133rb_node_alias_new(struct parser_params *p, NODE *nd_1st, NODE *nd_2nd, const YYLTYPE *loc, const YYLTYPE *keyword_loc)
24134{
24135 rb_node_alias_t *n = NODE_NEWNODE(NODE_ALIAS, rb_node_alias_t, loc);
24136 n->nd_1st = nd_1st;
24137 n->nd_2nd = nd_2nd;
24138 n->keyword_loc = *keyword_loc;
24139
24140 return n;
24141}
24142
24143static rb_node_valias_t *
24144rb_node_valias_new(struct parser_params *p, ID nd_alias, ID nd_orig, const YYLTYPE *loc, const YYLTYPE *keyword_loc)
24145{
24146 rb_node_valias_t *n = NODE_NEWNODE(NODE_VALIAS, rb_node_valias_t, loc);
24147 n->nd_alias = nd_alias;
24148 n->nd_orig = nd_orig;
24149 n->keyword_loc = *keyword_loc;
24150
24151 return n;
24152}
24153
24154static rb_node_undef_t *
24155rb_node_undef_new(struct parser_params *p, NODE *nd_undef, const YYLTYPE *loc)
24156{
24157 rb_node_undef_t *n = NODE_NEWNODE(NODE_UNDEF, rb_node_undef_t, loc);
24158 n->nd_undefs = rb_parser_ary_new_capa_for_node(p, 1);
24159 n->keyword_loc = NULL_LOC;
24160 rb_parser_ary_push_node(p, n->nd_undefs, nd_undef);
24161
24162 return n;
24163}
24164
24165static rb_node_errinfo_t *
24166rb_node_errinfo_new(struct parser_params *p, const YYLTYPE *loc)
24167{
24168 rb_node_errinfo_t *n = NODE_NEWNODE(NODE_ERRINFO, rb_node_errinfo_t, loc);
24169
24170 return n;
24171}
24172
24173static rb_node_defined_t *
24174rb_node_defined_new(struct parser_params *p, NODE *nd_head, const YYLTYPE *loc, const YYLTYPE *keyword_loc)
24175{
24176 rb_node_defined_t *n = NODE_NEWNODE(NODE_DEFINED, rb_node_defined_t, loc);
24177 n->nd_head = nd_head;
24178 n->keyword_loc = *keyword_loc;
24179
24180 return n;
24181}
24182
24183static rb_node_postexe_t *
24184rb_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)
24185{
24186 rb_node_postexe_t *n = NODE_NEWNODE(NODE_POSTEXE, rb_node_postexe_t, loc);
24187 n->nd_body = nd_body;
24188 n->keyword_loc = *keyword_loc;
24189 n->opening_loc = *opening_loc;
24190 n->closing_loc = *closing_loc;
24191
24192 return n;
24193}
24194
24195static rb_node_attrasgn_t *
24196rb_node_attrasgn_new(struct parser_params *p, NODE *nd_recv, ID nd_mid, NODE *nd_args, const YYLTYPE *loc)
24197{
24198 rb_node_attrasgn_t *n = NODE_NEWNODE(NODE_ATTRASGN, rb_node_attrasgn_t, loc);
24199 n->nd_recv = nd_recv;
24200 n->nd_mid = nd_mid;
24201 n->nd_args = nd_args;
24202
24203 return n;
24204}
24205
24206static rb_node_aryptn_t *
24207rb_node_aryptn_new(struct parser_params *p, NODE *pre_args, NODE *rest_arg, NODE *post_args, const YYLTYPE *loc)
24208{
24209 rb_node_aryptn_t *n = NODE_NEWNODE(NODE_ARYPTN, rb_node_aryptn_t, loc);
24210 n->nd_pconst = 0;
24211 n->pre_args = pre_args;
24212 n->rest_arg = rest_arg;
24213 n->post_args = post_args;
24214
24215 return n;
24216}
24217
24218static rb_node_hshptn_t *
24219rb_node_hshptn_new(struct parser_params *p, NODE *nd_pconst, NODE *nd_pkwargs, NODE *nd_pkwrestarg, const YYLTYPE *loc)
24220{
24221 rb_node_hshptn_t *n = NODE_NEWNODE(NODE_HSHPTN, rb_node_hshptn_t, loc);
24222 n->nd_pconst = nd_pconst;
24223 n->nd_pkwargs = nd_pkwargs;
24224 n->nd_pkwrestarg = nd_pkwrestarg;
24225
24226 return n;
24227}
24228
24229static rb_node_fndptn_t *
24230rb_node_fndptn_new(struct parser_params *p, NODE *pre_rest_arg, NODE *args, NODE *post_rest_arg, const YYLTYPE *loc)
24231{
24232 rb_node_fndptn_t *n = NODE_NEWNODE(NODE_FNDPTN, rb_node_fndptn_t, loc);
24233 n->nd_pconst = 0;
24234 n->pre_rest_arg = pre_rest_arg;
24235 n->args = args;
24236 n->post_rest_arg = post_rest_arg;
24237
24238 return n;
24239}
24240
24241static rb_node_line_t *
24242rb_node_line_new(struct parser_params *p, const YYLTYPE *loc)
24243{
24244 rb_node_line_t *n = NODE_NEWNODE(NODE_LINE, rb_node_line_t, loc);
24245
24246 return n;
24247}
24248
24249static rb_node_file_t *
24250rb_node_file_new(struct parser_params *p, VALUE str, const YYLTYPE *loc)
24251{
24252 rb_node_file_t *n = NODE_NEWNODE(NODE_FILE, rb_node_file_t, loc);
24253 n->path = rb_str_to_parser_string(p, str);
24254
24255 return n;
24256}
24257
24258static rb_node_encoding_t *
24259rb_node_encoding_new(struct parser_params *p, const YYLTYPE *loc)
24260{
24261 rb_node_encoding_t *n = NODE_NEWNODE(NODE_ENCODING, rb_node_encoding_t, loc);
24262 n->enc = p->enc;
24263
24264 return n;
24265}
24266
24267static rb_node_cdecl_t *
24268rb_node_cdecl_new(struct parser_params *p, ID nd_vid, NODE *nd_value, NODE *nd_else, enum rb_parser_shareability shareability, const YYLTYPE *loc)
24269{
24270 rb_node_cdecl_t *n = NODE_NEWNODE(NODE_CDECL, rb_node_cdecl_t, loc);
24271 n->nd_vid = nd_vid;
24272 n->nd_value = nd_value;
24273 n->nd_else = nd_else;
24274 n->shareability = shareability;
24275
24276 return n;
24277}
24278
24279static rb_node_op_cdecl_t *
24280rb_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)
24281{
24282 rb_node_op_cdecl_t *n = NODE_NEWNODE(NODE_OP_CDECL, rb_node_op_cdecl_t, loc);
24283 n->nd_head = nd_head;
24284 n->nd_value = nd_value;
24285 n->nd_aid = nd_aid;
24286 n->shareability = shareability;
24287
24288 return n;
24289}
24290
24291static rb_node_error_t *
24292rb_node_error_new(struct parser_params *p, const YYLTYPE *loc)
24293{
24294 rb_node_error_t *n = NODE_NEWNODE(NODE_ERROR, rb_node_error_t, loc);
24295
24296 return n;
24297}
24298
24299static rb_node_break_t *
24300rb_node_break_new(struct parser_params *p, NODE *nd_stts, const YYLTYPE *loc, const YYLTYPE *keyword_loc)
24301{
24302 rb_node_break_t *n = NODE_NEWNODE(NODE_BREAK, rb_node_break_t, loc);
24303 n->nd_stts = nd_stts;
24304 n->nd_chain = 0;
24305 n->keyword_loc = *keyword_loc;
24306
24307 return n;
24308}
24309
24310static rb_node_next_t *
24311rb_node_next_new(struct parser_params *p, NODE *nd_stts, const YYLTYPE *loc, const YYLTYPE *keyword_loc)
24312{
24313 rb_node_next_t *n = NODE_NEWNODE(NODE_NEXT, rb_node_next_t, loc);
24314 n->nd_stts = nd_stts;
24315 n->nd_chain = 0;
24316 n->keyword_loc = *keyword_loc;
24317
24318 return n;
24319}
24320
24321static rb_node_redo_t *
24322rb_node_redo_new(struct parser_params *p, const YYLTYPE *loc, const YYLTYPE *keyword_loc)
24323{
24324 rb_node_redo_t *n = NODE_NEWNODE(NODE_REDO, rb_node_redo_t, loc);
24325 n->nd_chain = 0;
24326 n->keyword_loc = *keyword_loc;
24327
24328 return n;
24329}
24330
24331static rb_node_def_temp_t *
24332rb_node_def_temp_new(struct parser_params *p, const YYLTYPE *loc)
24333{
24334 rb_node_def_temp_t *n = NODE_NEWNODE((enum node_type)NODE_DEF_TEMP, rb_node_def_temp_t, loc);
24335 n->save.numparam_save = 0;
24336 n->save.max_numparam = 0;
24337 n->save.ctxt = p->ctxt;
24338 n->nd_def = 0;
24339 n->nd_mid = 0;
24340
24341 return n;
24342}
24343
24344static rb_node_def_temp_t *
24345def_head_save(struct parser_params *p, rb_node_def_temp_t *n)
24346{
24347 n->save.numparam_save = numparam_push(p);
24348 n->save.max_numparam = p->max_numparam;
24349 return n;
24350}
24351
24352#ifndef RIPPER
24353static enum node_type
24354nodetype(NODE *node) /* for debug */
24355{
24356 return (enum node_type)nd_type(node);
24357}
24358
24359static int
24360nodeline(NODE *node)
24361{
24362 return nd_line(node);
24363}
24364#endif
24365
24366static NODE*
24367newline_node(NODE *node)
24368{
24369 if (node) {
24370 node = remove_begin(node);
24371 nd_set_fl_newline(node);
24372 }
24373 return node;
24374}
24375
24376static void
24377fixpos(NODE *node, NODE *orig)
24378{
24379 if (!node) return;
24380 if (!orig) return;
24381 nd_set_line(node, nd_line(orig));
24382}
24383
24384static NODE*
24385block_append(struct parser_params *p, NODE *head, NODE *tail)
24386{
24387 NODE *end, *h = head, *nd;
24388
24389 if (tail == 0) return head;
24390
24391 if (h == 0) return tail;
24392 switch (nd_type(h)) {
24393 default:
24394 h = end = NEW_BLOCK(head, &head->nd_loc);
24395 head = end;
24396 break;
24397 case NODE_BLOCK:
24398 end = RNODE_BLOCK(h)->nd_end;
24399 break;
24400 }
24401
24402 nd = RNODE_BLOCK(end)->nd_head;
24403 switch (nd_type(nd)) {
24404 case NODE_RETURN:
24405 case NODE_BREAK:
24406 case NODE_NEXT:
24407 case NODE_REDO:
24408 case NODE_RETRY:
24409 rb_warning0L(nd_line(tail), "statement not reached");
24410 break;
24411
24412 default:
24413 break;
24414 }
24415
24416 if (!nd_type_p(tail, NODE_BLOCK)) {
24417 tail = NEW_BLOCK(tail, &tail->nd_loc);
24418 }
24419 RNODE_BLOCK(end)->nd_next = tail;
24420 RNODE_BLOCK(h)->nd_end = RNODE_BLOCK(tail)->nd_end;
24421 nd_set_last_loc(head, nd_last_loc(tail));
24422 return head;
24423}
24424
24425/* append item to the list */
24426static NODE*
24427list_append(struct parser_params *p, NODE *list, NODE *item)
24428{
24429 NODE *last;
24430
24431 if (list == 0) return NEW_LIST(item, &item->nd_loc);
24432 if (RNODE_LIST(list)->nd_next) {
24433 last = RNODE_LIST(RNODE_LIST(list)->nd_next)->as.nd_end;
24434 }
24435 else {
24436 last = list;
24437 }
24438
24439 RNODE_LIST(list)->as.nd_alen += 1;
24440 RNODE_LIST(last)->nd_next = NEW_LIST(item, &item->nd_loc);
24441 RNODE_LIST(RNODE_LIST(list)->nd_next)->as.nd_end = RNODE_LIST(last)->nd_next;
24442
24443 nd_set_last_loc(list, nd_last_loc(item));
24444
24445 return list;
24446}
24447
24448/* concat two lists */
24449static NODE*
24450list_concat(NODE *head, NODE *tail)
24451{
24452 NODE *last;
24453
24454 if (RNODE_LIST(head)->nd_next) {
24455 last = RNODE_LIST(RNODE_LIST(head)->nd_next)->as.nd_end;
24456 }
24457 else {
24458 last = head;
24459 }
24460
24461 RNODE_LIST(head)->as.nd_alen += RNODE_LIST(tail)->as.nd_alen;
24462 RNODE_LIST(last)->nd_next = tail;
24463 if (RNODE_LIST(tail)->nd_next) {
24464 RNODE_LIST(RNODE_LIST(head)->nd_next)->as.nd_end = RNODE_LIST(RNODE_LIST(tail)->nd_next)->as.nd_end;
24465 }
24466 else {
24467 RNODE_LIST(RNODE_LIST(head)->nd_next)->as.nd_end = tail;
24468 }
24469
24470 nd_set_last_loc(head, nd_last_loc(tail));
24471
24472 return head;
24473}
24474
24475static int
24476literal_concat0(struct parser_params *p, rb_parser_string_t *head, rb_parser_string_t *tail)
24477{
24478 if (!tail) return 1;
24479 if (!rb_parser_enc_compatible(p, head, tail)) {
24480 compile_error(p, "string literal encodings differ (%s / %s)",
24481 rb_enc_name(rb_parser_str_get_encoding(head)),
24482 rb_enc_name(rb_parser_str_get_encoding(tail)));
24483 rb_parser_str_resize(p, head, 0);
24484 rb_parser_str_resize(p, tail, 0);
24485 return 0;
24486 }
24487 rb_parser_str_buf_append(p, head, tail);
24488 return 1;
24489}
24490
24491static rb_parser_string_t *
24492string_literal_head(struct parser_params *p, enum node_type htype, NODE *head)
24493{
24494 if (htype != NODE_DSTR) return NULL;
24495 if (RNODE_DSTR(head)->nd_next) {
24496 head = RNODE_LIST(RNODE_LIST(RNODE_DSTR(head)->nd_next)->as.nd_end)->nd_head;
24497 if (!head || !nd_type_p(head, NODE_STR)) return NULL;
24498 }
24499 rb_parser_string_t *lit = RNODE_DSTR(head)->string;
24500 ASSUME(lit);
24501 return lit;
24502}
24503
24504#ifndef RIPPER
24505static rb_parser_string_t *
24506rb_parser_string_deep_copy(struct parser_params *p, const rb_parser_string_t *orig)
24507{
24508 rb_parser_string_t *copy;
24509 if (!orig) return NULL;
24510 copy = rb_parser_string_new(p, PARSER_STRING_PTR(orig), PARSER_STRING_LEN(orig));
24511 copy->coderange = orig->coderange;
24512 copy->enc = orig->enc;
24513 return copy;
24514}
24515#endif
24516
24517/* concat two string literals */
24518static NODE *
24519literal_concat(struct parser_params *p, NODE *head, NODE *tail, const YYLTYPE *loc)
24520{
24521 enum node_type htype;
24522 rb_parser_string_t *lit;
24523
24524 if (!head) return tail;
24525 if (!tail) return head;
24526
24527 htype = nd_type(head);
24528 if (htype == NODE_EVSTR) {
24529 head = new_dstr(p, head, loc);
24530 htype = NODE_DSTR;
24531 }
24532 if (p->heredoc_indent > 0) {
24533 switch (htype) {
24534 case NODE_STR:
24535 head = str2dstr(p, head);
24536 case NODE_DSTR:
24537 return list_append(p, head, tail);
24538 default:
24539 break;
24540 }
24541 }
24542 switch (nd_type(tail)) {
24543 case NODE_STR:
24544 if ((lit = string_literal_head(p, htype, head)) != false) {
24545 htype = NODE_STR;
24546 }
24547 else {
24548 lit = RNODE_DSTR(head)->string;
24549 }
24550 if (htype == NODE_STR) {
24551 if (!literal_concat0(p, lit, RNODE_STR(tail)->string)) {
24552 error:
24553 rb_discard_node(p, head);
24554 rb_discard_node(p, tail);
24555 return 0;
24556 }
24557 rb_discard_node(p, tail);
24558 }
24559 else {
24560 list_append(p, head, tail);
24561 }
24562 break;
24563
24564 case NODE_DSTR:
24565 if (htype == NODE_STR) {
24566 if (!literal_concat0(p, RNODE_STR(head)->string, RNODE_DSTR(tail)->string))
24567 goto error;
24568 rb_parser_string_free(p, RNODE_DSTR(tail)->string);
24569 RNODE_DSTR(tail)->string = RNODE_STR(head)->string;
24570 RNODE_STR(head)->string = NULL;
24571 rb_discard_node(p, head);
24572 head = tail;
24573 }
24574 else if (!RNODE_DSTR(tail)->string) {
24575 append:
24576 RNODE_DSTR(head)->as.nd_alen += RNODE_DSTR(tail)->as.nd_alen - 1;
24577 if (!RNODE_DSTR(head)->nd_next) {
24578 RNODE_DSTR(head)->nd_next = RNODE_DSTR(tail)->nd_next;
24579 }
24580 else if (RNODE_DSTR(tail)->nd_next) {
24581 RNODE_DSTR(RNODE_DSTR(RNODE_DSTR(head)->nd_next)->as.nd_end)->nd_next = RNODE_DSTR(tail)->nd_next;
24582 RNODE_DSTR(RNODE_DSTR(head)->nd_next)->as.nd_end = RNODE_DSTR(RNODE_DSTR(tail)->nd_next)->as.nd_end;
24583 }
24584 rb_discard_node(p, tail);
24585 }
24586 else if ((lit = string_literal_head(p, htype, head)) != false) {
24587 if (!literal_concat0(p, lit, RNODE_DSTR(tail)->string))
24588 goto error;
24589 rb_parser_string_free(p, RNODE_DSTR(tail)->string);
24590 RNODE_DSTR(tail)->string = 0;
24591 goto append;
24592 }
24593 else {
24594 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));
24595 RNODE_DSTR(tail)->string = 0;
24596 }
24597 break;
24598
24599 case NODE_EVSTR:
24600 if (htype == NODE_STR) {
24601 head = str2dstr(p, head);
24602 RNODE_DSTR(head)->as.nd_alen = 1;
24603 }
24604 list_append(p, head, tail);
24605 break;
24606 }
24607 return head;
24608}
24609
24610static void
24611nd_copy_flag(NODE *new_node, NODE *old_node)
24612{
24613 if (nd_fl_newline(old_node)) nd_set_fl_newline(new_node);
24614 nd_set_line(new_node, nd_line(old_node));
24615 new_node->nd_loc = old_node->nd_loc;
24616 new_node->node_id = old_node->node_id;
24617}
24618
24619static NODE *
24620str2dstr(struct parser_params *p, NODE *node)
24621{
24622 NODE *new_node = (NODE *)NODE_NEW_INTERNAL(NODE_DSTR, rb_node_dstr_t);
24623 nd_copy_flag(new_node, node);
24624 RNODE_DSTR(new_node)->string = RNODE_STR(node)->string;
24625 RNODE_DSTR(new_node)->as.nd_alen = 0;
24626 RNODE_DSTR(new_node)->nd_next = 0;
24627 RNODE_STR(node)->string = 0;
24628
24629 return new_node;
24630}
24631
24632static NODE *
24633str2regx(struct parser_params *p, NODE *node, int options, const YYLTYPE *loc, const YYLTYPE *opening_loc, const YYLTYPE *content_loc, const YYLTYPE *closing_loc)
24634{
24635 NODE *new_node = (NODE *)NODE_NEW_INTERNAL(NODE_REGX, rb_node_regx_t);
24636 nd_copy_flag(new_node, node);
24637 RNODE_REGX(new_node)->string = RNODE_STR(node)->string;
24638 RNODE_REGX(new_node)->options = options;
24639 nd_set_loc(new_node, loc);
24640 RNODE_REGX(new_node)->opening_loc = *opening_loc;
24641 RNODE_REGX(new_node)->content_loc = *content_loc;
24642 RNODE_REGX(new_node)->closing_loc = *closing_loc;
24643 RNODE_STR(node)->string = 0;
24644
24645 return new_node;
24646}
24647
24648static NODE *
24649evstr2dstr(struct parser_params *p, NODE *node)
24650{
24651 if (nd_type_p(node, NODE_EVSTR)) {
24652 node = new_dstr(p, node, &node->nd_loc);
24653 }
24654 return node;
24655}
24656
24657static NODE *
24658new_evstr(struct parser_params *p, NODE *node, const YYLTYPE *loc, const YYLTYPE *opening_loc, const YYLTYPE *closing_loc)
24659{
24660 NODE *head = node;
24661
24662 if (node) {
24663 switch (nd_type(node)) {
24664 case NODE_STR:
24665 return str2dstr(p, node);
24666 case NODE_DSTR:
24667 break;
24668 case NODE_EVSTR:
24669 return node;
24670 }
24671 }
24672 return NEW_EVSTR(head, loc, opening_loc, closing_loc);
24673}
24674
24675static NODE *
24676new_dstr(struct parser_params *p, NODE *node, const YYLTYPE *loc)
24677{
24678 NODE *dstr = NEW_DSTR(STRING_NEW0(), loc);
24679 return list_append(p, dstr, node);
24680}
24681
24682static NODE *
24683call_bin_op(struct parser_params *p, NODE *recv, ID id, NODE *arg1,
24684 const YYLTYPE *op_loc, const YYLTYPE *loc)
24685{
24686 NODE *expr;
24687 value_expr(p, recv);
24688 value_expr(p, arg1);
24689 expr = NEW_OPCALL(recv, id, NEW_LIST(arg1, &arg1->nd_loc), loc);
24690 nd_set_line(expr, op_loc->beg_pos.lineno);
24691 return expr;
24692}
24693
24694static NODE *
24695call_uni_op(struct parser_params *p, NODE *recv, ID id, const YYLTYPE *op_loc, const YYLTYPE *loc)
24696{
24697 NODE *opcall;
24698 value_expr(p, recv);
24699 opcall = NEW_OPCALL(recv, id, 0, loc);
24700 nd_set_line(opcall, op_loc->beg_pos.lineno);
24701 return opcall;
24702}
24703
24704static NODE *
24705new_qcall(struct parser_params* p, ID atype, NODE *recv, ID mid, NODE *args, const YYLTYPE *op_loc, const YYLTYPE *loc)
24706{
24707 NODE *qcall = NEW_QCALL(atype, recv, mid, args, loc);
24708 nd_set_line(qcall, op_loc->beg_pos.lineno);
24709 return qcall;
24710}
24711
24712static NODE*
24713new_command_qcall(struct parser_params* p, ID atype, NODE *recv, ID mid, NODE *args, NODE *block, const YYLTYPE *op_loc, const YYLTYPE *loc)
24714{
24715 NODE *ret;
24716 if (block) block_dup_check(p, args, block);
24717 ret = new_qcall(p, atype, recv, mid, args, op_loc, loc);
24718 if (block) ret = method_add_block(p, ret, block, loc);
24719 fixpos(ret, recv);
24720 return ret;
24721}
24722
24724new_locations_lambda_body(struct parser_params* p, NODE *node, const YYLTYPE *loc, const YYLTYPE *opening_loc, const YYLTYPE *closing_loc)
24725{
24727 body->node = node;
24728 body->opening_loc = *opening_loc;
24729 body->closing_loc = *closing_loc;
24730 return body;
24731}
24732
24733#define nd_once_body(node) (nd_type_p((node), NODE_ONCE) ? RNODE_ONCE(node)->nd_body : node)
24734
24735static NODE*
24736last_expr_once_body(NODE *node)
24737{
24738 if (!node) return 0;
24739 return nd_once_body(node);
24740}
24741
24742static NODE*
24743match_op(struct parser_params *p, NODE *node1, NODE *node2, const YYLTYPE *op_loc, const YYLTYPE *loc)
24744{
24745 NODE *n;
24746 int line = op_loc->beg_pos.lineno;
24747
24748 value_expr(p, node1);
24749 value_expr(p, node2);
24750
24751 if ((n = last_expr_once_body(node1)) != 0) {
24752 switch (nd_type(n)) {
24753 case NODE_DREGX:
24754 {
24755 NODE *match = NEW_MATCH2(node1, node2, loc);
24756 nd_set_line(match, line);
24757 return match;
24758 }
24759
24760 case NODE_REGX:
24761 {
24762 const VALUE lit = rb_node_regx_string_val(n);
24763 if (!NIL_P(lit)) {
24764 NODE *match = NEW_MATCH2(node1, node2, loc);
24765 RNODE_MATCH2(match)->nd_args = reg_named_capture_assign(p, lit, loc, assignable);
24766 nd_set_line(match, line);
24767 return match;
24768 }
24769 }
24770 }
24771 }
24772
24773 if ((n = last_expr_once_body(node2)) != 0) {
24774 NODE *match3;
24775
24776 switch (nd_type(n)) {
24777 case NODE_DREGX:
24778 match3 = NEW_MATCH3(node2, node1, loc);
24779 return match3;
24780 }
24781 }
24782
24783 n = NEW_CALL(node1, tMATCH, NEW_LIST(node2, &node2->nd_loc), loc);
24784 nd_set_line(n, line);
24785 return n;
24786}
24787
24788# if WARN_PAST_SCOPE
24789static int
24790past_dvar_p(struct parser_params *p, ID id)
24791{
24792 struct vtable *past = p->lvtbl->past;
24793 while (past) {
24794 if (vtable_included(past, id)) return 1;
24795 past = past->prev;
24796 }
24797 return 0;
24798}
24799# endif
24800
24801static int
24802numparam_nested_p(struct parser_params *p)
24803{
24804 struct local_vars *local = p->lvtbl;
24805 NODE *outer = local->numparam.outer;
24806 NODE *inner = local->numparam.inner;
24807 if (outer || inner) {
24808 NODE *used = outer ? outer : inner;
24809 compile_error(p, "numbered parameter is already used in %s block\n"
24810 "%s:%d: numbered parameter is already used here",
24811 outer ? "outer" : "inner",
24812 p->ruby_sourcefile, nd_line(used));
24813 parser_show_error_line(p, &used->nd_loc);
24814 return 1;
24815 }
24816 return 0;
24817}
24818
24819static int
24820numparam_used_p(struct parser_params *p)
24821{
24822 NODE *numparam = p->lvtbl->numparam.current;
24823 if (numparam) {
24824 compile_error(p, "'it' is not allowed when a numbered parameter is already used\n"
24825 "%s:%d: numbered parameter is already used here",
24826 p->ruby_sourcefile, nd_line(numparam));
24827 parser_show_error_line(p, &numparam->nd_loc);
24828 return 1;
24829 }
24830 return 0;
24831}
24832
24833static int
24834it_used_p(struct parser_params *p)
24835{
24836 NODE *it = p->lvtbl->it;
24837 if (it) {
24838 compile_error(p, "numbered parameters are not allowed when 'it' is already used\n"
24839 "%s:%d: 'it' is already used here",
24840 p->ruby_sourcefile, nd_line(it));
24841 parser_show_error_line(p, &it->nd_loc);
24842 return 1;
24843 }
24844 return 0;
24845}
24846
24847static NODE*
24848gettable(struct parser_params *p, ID id, const YYLTYPE *loc)
24849{
24850 ID *vidp = NULL;
24851 NODE *node;
24852 switch (id) {
24853 case keyword_self:
24854 return NEW_SELF(loc);
24855 case keyword_nil:
24856 return NEW_NIL(loc);
24857 case keyword_true:
24858 return NEW_TRUE(loc);
24859 case keyword_false:
24860 return NEW_FALSE(loc);
24861 case keyword__FILE__:
24862 {
24863 VALUE file = p->ruby_sourcefile_string;
24864 if (NIL_P(file))
24865 file = rb_str_new(0, 0);
24866 node = NEW_FILE(file, loc);
24867 }
24868 return node;
24869 case keyword__LINE__:
24870 return NEW_LINE(loc);
24871 case keyword__ENCODING__:
24872 return NEW_ENCODING(loc);
24873
24874 }
24875 switch (id_type(id)) {
24876 case ID_LOCAL:
24877 if (dyna_in_block(p) && dvar_defined_ref(p, id, &vidp)) {
24878 if (NUMPARAM_ID_P(id) && (numparam_nested_p(p) || it_used_p(p))) return 0;
24879 if (vidp) *vidp |= LVAR_USED;
24880 node = NEW_DVAR(id, loc);
24881 return node;
24882 }
24883 if (local_id_ref(p, id, &vidp)) {
24884 if (vidp) *vidp |= LVAR_USED;
24885 node = NEW_LVAR(id, loc);
24886 return node;
24887 }
24888 if (dyna_in_block(p) && NUMPARAM_ID_P(id) &&
24889 parser_numbered_param(p, NUMPARAM_ID_TO_IDX(id))) {
24890 if (numparam_nested_p(p) || it_used_p(p)) return 0;
24891 node = NEW_DVAR(id, loc);
24892 struct local_vars *local = p->lvtbl;
24893 if (!local->numparam.current) local->numparam.current = node;
24894 return node;
24895 }
24896# if WARN_PAST_SCOPE
24897 if (!p->ctxt.in_defined && RTEST(ruby_verbose) && past_dvar_p(p, id)) {
24898 rb_warning1("possible reference to past scope - %"PRIsWARN, rb_id2str(id));
24899 }
24900# endif
24901 /* method call without arguments */
24902 if (dyna_in_block(p) && id == idIt && !(DVARS_TERMINAL_P(p->lvtbl->args) || DVARS_TERMINAL_P(p->lvtbl->args->prev))) {
24903 if (numparam_used_p(p)) return 0;
24904 if (p->max_numparam == ORDINAL_PARAM) {
24905 compile_error(p, "ordinary parameter is defined");
24906 return 0;
24907 }
24908 if (!p->it_id) {
24909 p->it_id = idItImplicit;
24910 vtable_add(p->lvtbl->args, p->it_id);
24911 }
24912 NODE *node = NEW_DVAR(p->it_id, loc);
24913 if (!p->lvtbl->it) p->lvtbl->it = node;
24914 return node;
24915 }
24916 return NEW_VCALL(id, loc);
24917 case ID_GLOBAL:
24918 return NEW_GVAR(id, loc);
24919 case ID_INSTANCE:
24920 return NEW_IVAR(id, loc);
24921 case ID_CONST:
24922 return NEW_CONST(id, loc);
24923 case ID_CLASS:
24924 return NEW_CVAR(id, loc);
24925 }
24926 compile_error(p, "identifier %"PRIsVALUE" is not valid to get", rb_id2str(id));
24927 return 0;
24928}
24929
24930static rb_node_opt_arg_t *
24931opt_arg_append(rb_node_opt_arg_t *opt_list, rb_node_opt_arg_t *opt)
24932{
24933 rb_node_opt_arg_t *opts = opt_list;
24934 RNODE(opts)->nd_loc.end_pos = RNODE(opt)->nd_loc.end_pos;
24935
24936 while (opts->nd_next) {
24937 opts = opts->nd_next;
24938 RNODE(opts)->nd_loc.end_pos = RNODE(opt)->nd_loc.end_pos;
24939 }
24940 opts->nd_next = opt;
24941
24942 return opt_list;
24943}
24944
24945static rb_node_kw_arg_t *
24946kwd_append(rb_node_kw_arg_t *kwlist, rb_node_kw_arg_t *kw)
24947{
24948 if (kwlist) {
24949 /* Assume rb_node_kw_arg_t and rb_node_opt_arg_t has same structure */
24950 opt_arg_append(RNODE_OPT_ARG(kwlist), RNODE_OPT_ARG(kw));
24951 }
24952 return kwlist;
24953}
24954
24955static NODE *
24956new_defined(struct parser_params *p, NODE *expr, const YYLTYPE *loc, const YYLTYPE *keyword_loc)
24957{
24958 int had_trailing_semicolon = p->ctxt.has_trailing_semicolon;
24959 p->ctxt.has_trailing_semicolon = 0;
24960
24961 NODE *n = expr;
24962 while (n) {
24963 if (nd_type_p(n, NODE_BEGIN)) {
24964 n = RNODE_BEGIN(n)->nd_body;
24965 }
24966 else if (nd_type_p(n, NODE_BLOCK) && RNODE_BLOCK(n)->nd_end == n) {
24967 n = RNODE_BLOCK(n)->nd_head;
24968 }
24969 else {
24970 break;
24971 }
24972 }
24973
24974 if (had_trailing_semicolon && !nd_type_p(expr, NODE_BLOCK)) {
24975 NODE *block = NEW_BLOCK(expr, loc);
24976 return NEW_DEFINED(block, loc, keyword_loc);
24977 }
24978
24979 return NEW_DEFINED(n, loc, keyword_loc);
24980}
24981
24982static NODE*
24983str_to_sym_node(struct parser_params *p, NODE *node, const YYLTYPE *loc)
24984{
24985 VALUE lit;
24986 rb_parser_string_t *str = RNODE_STR(node)->string;
24987 if (rb_parser_enc_str_coderange(p, str) == RB_PARSER_ENC_CODERANGE_BROKEN) {
24988 yyerror1(loc, "invalid symbol");
24989 lit = STR_NEW0();
24990 }
24991 else {
24992 lit = rb_str_new_parser_string(str);
24993 }
24994 return NEW_SYM(lit, loc);
24995}
24996
24997static NODE*
24998symbol_append(struct parser_params *p, NODE *symbols, NODE *symbol)
24999{
25000 enum node_type type = nd_type(symbol);
25001 switch (type) {
25002 case NODE_DSTR:
25003 nd_set_type(symbol, NODE_DSYM);
25004 break;
25005 case NODE_STR:
25006 symbol = str_to_sym_node(p, symbol, &RNODE(symbol)->nd_loc);
25007 break;
25008 default:
25009 compile_error(p, "unexpected node as symbol: %s", parser_node_name(type));
25010 }
25011 return list_append(p, symbols, symbol);
25012}
25013
25014static void
25015dregex_fragment_setenc(struct parser_params *p, rb_node_dregx_t *const dreg, int options)
25016{
25017 if (dreg->string) {
25018 reg_fragment_setenc(p, dreg->string, options);
25019 }
25020 for (struct RNode_LIST *list = dreg->nd_next; list; list = RNODE_LIST(list->nd_next)) {
25021 NODE *frag = list->nd_head;
25022 if (nd_type_p(frag, NODE_STR)) {
25023 reg_fragment_setenc(p, RNODE_STR(frag)->string, options);
25024 }
25025 else if (nd_type_p(frag, NODE_DSTR)) {
25026 dregex_fragment_setenc(p, RNODE_DSTR(frag), options);
25027 }
25028 }
25029}
25030
25031static NODE *
25032new_regexp(struct parser_params *p, NODE *node, int options, const YYLTYPE *loc, const YYLTYPE *opening_loc, const YYLTYPE *content_loc, const YYLTYPE *closing_loc)
25033{
25034 if (!node) {
25035 /* Check string is valid regex */
25036 rb_parser_string_t *str = STRING_NEW0();
25037 reg_compile(p, str, options);
25038 node = NEW_REGX(str, options, loc, opening_loc, content_loc, closing_loc);
25039 return node;
25040 }
25041 switch (nd_type(node)) {
25042 case NODE_STR:
25043 {
25044 /* Check string is valid regex */
25045 reg_compile(p, RNODE_STR(node)->string, options);
25046 node = str2regx(p, node, options, loc, opening_loc, content_loc, closing_loc);
25047 }
25048 break;
25049 default:
25050 node = NEW_DSTR0(STRING_NEW0(), 1, NEW_LIST(node, loc), loc);
25051 /* fall through */
25052 case NODE_DSTR:
25053 nd_set_type(node, NODE_DREGX);
25054 nd_set_loc(node, loc);
25055 rb_node_dregx_t *const dreg = RNODE_DREGX(node);
25056 dreg->as.nd_cflag = options & RE_OPTION_MASK;
25057 if (dreg->nd_next) {
25058 dregex_fragment_setenc(p, dreg, options);
25059 }
25060 if (options & RE_OPTION_ONCE) {
25061 node = NEW_ONCE(node, loc);
25062 }
25063 break;
25064 }
25065 return node;
25066}
25067
25068static rb_node_kw_arg_t *
25069new_kw_arg(struct parser_params *p, NODE *k, const YYLTYPE *loc)
25070{
25071 if (!k) return 0;
25072 return NEW_KW_ARG((k), loc);
25073}
25074
25075static NODE *
25076new_xstring(struct parser_params *p, NODE *node, const YYLTYPE *loc)
25077{
25078 if (!node) {
25079 NODE *xstr = NEW_XSTR(STRING_NEW0(), loc);
25080 return xstr;
25081 }
25082 switch (nd_type(node)) {
25083 case NODE_STR:
25084 nd_set_type(node, NODE_XSTR);
25085 nd_set_loc(node, loc);
25086 break;
25087 case NODE_DSTR:
25088 nd_set_type(node, NODE_DXSTR);
25089 nd_set_loc(node, loc);
25090 break;
25091 default:
25092 node = NEW_DXSTR(0, 1, NEW_LIST(node, loc), loc);
25093 break;
25094 }
25095 return node;
25096}
25097
25098static const
25099struct st_hash_type literal_type = {
25100 literal_cmp,
25101 literal_hash,
25102};
25103
25104static int nd_type_st_key_enable_p(NODE *node);
25105
25106static void
25107check_literal_when(struct parser_params *p, NODE *arg, const YYLTYPE *loc)
25108{
25109 /* See https://bugs.ruby-lang.org/issues/20331 for discussion about what is warned. */
25110 if (!arg || !p->case_labels) return;
25111 if (!nd_type_st_key_enable_p(arg)) return;
25112
25113 if (p->case_labels == CHECK_LITERAL_WHEN) {
25114 p->case_labels = st_init_table(&literal_type);
25115 }
25116 else {
25117 st_data_t line;
25118 if (st_lookup(p->case_labels, (st_data_t)arg, &line)) {
25119 rb_warning2("'when' clause on line %d duplicates 'when' clause on line %d and is ignored",
25120 WARN_I((int)nd_line(arg)), WARN_I((int)line));
25121 return;
25122 }
25123 }
25124 st_insert(p->case_labels, (st_data_t)arg, (st_data_t)p->ruby_sourceline);
25125}
25126
25127#ifdef RIPPER
25128static int
25129id_is_var(struct parser_params *p, ID id)
25130{
25131 if (is_notop_id(id)) {
25132 switch (id & ID_SCOPE_MASK) {
25133 case ID_GLOBAL: case ID_INSTANCE: case ID_CONST: case ID_CLASS:
25134 return 1;
25135 case ID_LOCAL:
25136 if (dyna_in_block(p)) {
25137 if (NUMPARAM_ID_P(id) || dvar_defined(p, id)) return 1;
25138 }
25139 if (local_id(p, id)) return 1;
25140 /* method call without arguments */
25141 return 0;
25142 }
25143 }
25144 compile_error(p, "identifier %"PRIsVALUE" is not valid to get", rb_id2str(id));
25145 return 0;
25146}
25147#endif
25148
25149static inline enum lex_state_e
25150parser_set_lex_state(struct parser_params *p, enum lex_state_e ls, int line)
25151{
25152 if (p->debug) {
25153 ls = rb_parser_trace_lex_state(p, p->lex.state, ls, line);
25154 }
25155 return p->lex.state = ls;
25156}
25157
25158#ifndef RIPPER
25159static void
25160flush_debug_buffer(struct parser_params *p, VALUE out, VALUE str)
25161{
25162 VALUE mesg = p->debug_buffer;
25163
25164 if (!NIL_P(mesg) && RSTRING_LEN(mesg)) {
25165 p->debug_buffer = Qnil;
25166 rb_io_puts(1, &mesg, out);
25167 }
25168 if (!NIL_P(str) && RSTRING_LEN(str)) {
25169 rb_io_write(p->debug_output, str);
25170 }
25171}
25172
25173static const char rb_parser_lex_state_names[][8] = {
25174 "BEG", "END", "ENDARG", "ENDFN", "ARG",
25175 "CMDARG", "MID", "FNAME", "DOT", "CLASS",
25176 "LABEL", "LABELED","FITEM",
25177};
25178
25179static VALUE
25180append_lex_state_name(struct parser_params *p, enum lex_state_e state, VALUE buf)
25181{
25182 int i, sep = 0;
25183 unsigned int mask = 1;
25184 static const char none[] = "NONE";
25185
25186 for (i = 0; i < EXPR_MAX_STATE; ++i, mask <<= 1) {
25187 if ((unsigned)state & mask) {
25188 if (sep) {
25189 rb_str_cat(buf, "|", 1);
25190 }
25191 sep = 1;
25192 rb_str_cat_cstr(buf, rb_parser_lex_state_names[i]);
25193 }
25194 }
25195 if (!sep) {
25196 rb_str_cat(buf, none, sizeof(none)-1);
25197 }
25198 return buf;
25199}
25200
25201enum lex_state_e
25202rb_parser_trace_lex_state(struct parser_params *p, enum lex_state_e from,
25203 enum lex_state_e to, int line)
25204{
25205 VALUE mesg;
25206 mesg = rb_str_new_cstr("lex_state: ");
25207 append_lex_state_name(p, from, mesg);
25208 rb_str_cat_cstr(mesg, " -> ");
25209 append_lex_state_name(p, to, mesg);
25210 rb_str_catf(mesg, " at line %d\n", line);
25211 flush_debug_buffer(p, p->debug_output, mesg);
25212 return to;
25213}
25214
25215VALUE
25216rb_parser_lex_state_name(struct parser_params *p, enum lex_state_e state)
25217{
25218 return rb_str_to_interned_str(append_lex_state_name(p, state, rb_str_new(0, 0)));
25219}
25220
25221static void
25222append_bitstack_value(struct parser_params *p, stack_type stack, VALUE mesg)
25223{
25224 if (stack == 0) {
25225 rb_str_cat_cstr(mesg, "0");
25226 }
25227 else {
25228 stack_type mask = (stack_type)1U << (CHAR_BIT * sizeof(stack_type) - 1);
25229 for (; mask && !(stack & mask); mask >>= 1) continue;
25230 for (; mask; mask >>= 1) rb_str_cat(mesg, stack & mask ? "1" : "0", 1);
25231 }
25232}
25233
25234void
25235rb_parser_show_bitstack(struct parser_params *p, stack_type stack,
25236 const char *name, int line)
25237{
25238 VALUE mesg = rb_sprintf("%s: ", name);
25239 append_bitstack_value(p, stack, mesg);
25240 rb_str_catf(mesg, " at line %d\n", line);
25241 flush_debug_buffer(p, p->debug_output, mesg);
25242}
25243
25244void
25245rb_parser_fatal(struct parser_params *p, const char *fmt, ...)
25246{
25247 va_list ap;
25248 VALUE mesg = rb_str_new_cstr("internal parser error: ");
25249
25250 va_start(ap, fmt);
25251 rb_str_vcatf(mesg, fmt, ap);
25252 va_end(ap);
25253 yyerror0(RSTRING_PTR(mesg));
25254 RB_GC_GUARD(mesg);
25255
25256 mesg = rb_str_new(0, 0);
25257 append_lex_state_name(p, p->lex.state, mesg);
25258 compile_error(p, "lex.state: %"PRIsVALUE, mesg);
25259 rb_str_resize(mesg, 0);
25260 append_bitstack_value(p, p->cond_stack, mesg);
25261 compile_error(p, "cond_stack: %"PRIsVALUE, mesg);
25262 rb_str_resize(mesg, 0);
25263 append_bitstack_value(p, p->cmdarg_stack, mesg);
25264 compile_error(p, "cmdarg_stack: %"PRIsVALUE, mesg);
25265 if (p->debug_output == rb_ractor_stdout())
25266 p->debug_output = rb_ractor_stderr();
25267 p->debug = TRUE;
25268}
25269
25270static YYLTYPE *
25271rb_parser_set_pos(YYLTYPE *yylloc, int sourceline, int beg_pos, int end_pos)
25272{
25273 yylloc->beg_pos.lineno = sourceline;
25274 yylloc->beg_pos.column = beg_pos;
25275 yylloc->end_pos.lineno = sourceline;
25276 yylloc->end_pos.column = end_pos;
25277 return yylloc;
25278}
25279
25280YYLTYPE *
25281rb_parser_set_location_from_strterm_heredoc(struct parser_params *p, rb_strterm_heredoc_t *here, YYLTYPE *yylloc)
25282{
25283 int sourceline = here->sourceline;
25284 int beg_pos = (int)here->offset - here->quote
25285 - (rb_strlen_lit("<<-") - !(here->func & STR_FUNC_INDENT));
25286 int end_pos = (int)here->offset + here->length + here->quote;
25287
25288 return rb_parser_set_pos(yylloc, sourceline, beg_pos, end_pos);
25289}
25290
25291YYLTYPE *
25292rb_parser_set_location_of_delayed_token(struct parser_params *p, YYLTYPE *yylloc)
25293{
25294 yylloc->beg_pos.lineno = p->delayed.beg_line;
25295 yylloc->beg_pos.column = p->delayed.beg_col;
25296 yylloc->end_pos.lineno = p->delayed.end_line;
25297 yylloc->end_pos.column = p->delayed.end_col;
25298
25299 return yylloc;
25300}
25301
25302YYLTYPE *
25303rb_parser_set_location_of_heredoc_end(struct parser_params *p, YYLTYPE *yylloc)
25304{
25305 int sourceline = p->ruby_sourceline;
25306 int beg_pos = (int)(p->lex.ptok - p->lex.pbeg);
25307 int end_pos = (int)(p->lex.pend - p->lex.pbeg);
25308 return rb_parser_set_pos(yylloc, sourceline, beg_pos, end_pos);
25309}
25310
25311YYLTYPE *
25312rb_parser_set_location_of_dummy_end(struct parser_params *p, YYLTYPE *yylloc)
25313{
25314 yylloc->end_pos = yylloc->beg_pos;
25315
25316 return yylloc;
25317}
25318
25319YYLTYPE *
25320rb_parser_set_location_of_none(struct parser_params *p, YYLTYPE *yylloc)
25321{
25322 int sourceline = p->ruby_sourceline;
25323 int beg_pos = (int)(p->lex.ptok - p->lex.pbeg);
25324 int end_pos = (int)(p->lex.ptok - p->lex.pbeg);
25325 return rb_parser_set_pos(yylloc, sourceline, beg_pos, end_pos);
25326}
25327
25328YYLTYPE *
25329rb_parser_set_location(struct parser_params *p, YYLTYPE *yylloc)
25330{
25331 int sourceline = p->ruby_sourceline;
25332 int beg_pos = (int)(p->lex.ptok - p->lex.pbeg);
25333 int end_pos = (int)(p->lex.pcur - p->lex.pbeg);
25334 return rb_parser_set_pos(yylloc, sourceline, beg_pos, end_pos);
25335}
25336#endif /* !RIPPER */
25337
25338static int
25339assignable0(struct parser_params *p, ID id, const char **err)
25340{
25341 if (!id) return -1;
25342 switch (id) {
25343 case keyword_self:
25344 *err = "Can't change the value of self";
25345 return -1;
25346 case keyword_nil:
25347 *err = "Can't assign to nil";
25348 return -1;
25349 case keyword_true:
25350 *err = "Can't assign to true";
25351 return -1;
25352 case keyword_false:
25353 *err = "Can't assign to false";
25354 return -1;
25355 case keyword__FILE__:
25356 *err = "Can't assign to __FILE__";
25357 return -1;
25358 case keyword__LINE__:
25359 *err = "Can't assign to __LINE__";
25360 return -1;
25361 case keyword__ENCODING__:
25362 *err = "Can't assign to __ENCODING__";
25363 return -1;
25364 }
25365 switch (id_type(id)) {
25366 case ID_LOCAL:
25367 if (dyna_in_block(p)) {
25368 if (p->max_numparam > NO_PARAM && NUMPARAM_ID_P(id)) {
25369 compile_error(p, "Can't assign to numbered parameter _%d",
25370 NUMPARAM_ID_TO_IDX(id));
25371 return -1;
25372 }
25373 if (dvar_curr(p, id)) return NODE_DASGN;
25374 if (dvar_defined(p, id)) return NODE_DASGN;
25375 if (local_id(p, id)) return NODE_LASGN;
25376 dyna_var(p, id);
25377 return NODE_DASGN;
25378 }
25379 else {
25380 if (!local_id(p, id)) local_var(p, id);
25381 return NODE_LASGN;
25382 }
25383 break;
25384 case ID_GLOBAL: return NODE_GASGN;
25385 case ID_INSTANCE: return NODE_IASGN;
25386 case ID_CONST:
25387 if (!p->ctxt.in_def) return NODE_CDECL;
25388 *err = "dynamic constant assignment";
25389 return -1;
25390 case ID_CLASS: return NODE_CVASGN;
25391 default:
25392 compile_error(p, "identifier %"PRIsVALUE" is not valid to set", rb_id2str(id));
25393 }
25394 return -1;
25395}
25396
25397static NODE*
25398assignable(struct parser_params *p, ID id, NODE *val, const YYLTYPE *loc)
25399{
25400 const char *err = 0;
25401 int node_type = assignable0(p, id, &err);
25402 switch (node_type) {
25403 case NODE_DASGN: return NEW_DASGN(id, val, loc);
25404 case NODE_LASGN: return NEW_LASGN(id, val, loc);
25405 case NODE_GASGN: return NEW_GASGN(id, val, loc);
25406 case NODE_IASGN: return NEW_IASGN(id, val, loc);
25407 case NODE_CDECL: return NEW_CDECL(id, val, 0, p->ctxt.shareable_constant_value, loc);
25408 case NODE_CVASGN: return NEW_CVASGN(id, val, loc);
25409 }
25410/* TODO: FIXME */
25411#ifndef RIPPER
25412 if (err) yyerror1(loc, err);
25413#else
25414 if (err) set_value(assign_error(p, err, p->s_lvalue));
25415#endif
25416 return NEW_ERROR(loc);
25417}
25418
25419static int
25420is_private_local_id(struct parser_params *p, ID name)
25421{
25422 VALUE s;
25423 if (name == idUScore) return 1;
25424 if (!is_local_id(name)) return 0;
25425 s = rb_id2str(name);
25426 if (!s) return 0;
25427 return RSTRING_PTR(s)[0] == '_';
25428}
25429
25430static int
25431shadowing_lvar_0(struct parser_params *p, ID name)
25432{
25433 if (dyna_in_block(p)) {
25434 if (dvar_curr(p, name)) {
25435 if (is_private_local_id(p, name)) return 1;
25436 yyerror0("duplicated argument name");
25437 }
25438 else if (dvar_defined(p, name) || local_id(p, name)) {
25439 vtable_add(p->lvtbl->vars, name);
25440 if (p->lvtbl->used) {
25441 vtable_add(p->lvtbl->used, (ID)p->ruby_sourceline | LVAR_USED);
25442 }
25443 return 0;
25444 }
25445 }
25446 else {
25447 if (local_id(p, name)) {
25448 if (is_private_local_id(p, name)) return 1;
25449 yyerror0("duplicated argument name");
25450 }
25451 }
25452 return 1;
25453}
25454
25455static ID
25456shadowing_lvar(struct parser_params *p, ID name)
25457{
25458 shadowing_lvar_0(p, name);
25459 return name;
25460}
25461
25462static void
25463new_bv(struct parser_params *p, ID name)
25464{
25465 if (!name) return;
25466 if (!is_local_id(name)) {
25467 compile_error(p, "invalid local variable - %"PRIsVALUE,
25468 rb_id2str(name));
25469 return;
25470 }
25471 if (!shadowing_lvar_0(p, name)) return;
25472 dyna_var(p, name);
25473 ID *vidp = 0;
25474 if (dvar_defined_ref(p, name, &vidp)) {
25475 if (vidp) *vidp |= LVAR_USED;
25476 }
25477}
25478
25479static void
25480aryset_check(struct parser_params *p, NODE *args)
25481{
25482 NODE *block = 0, *kwds = 0;
25483 if (args && nd_type_p(args, NODE_BLOCK_PASS)) {
25484 block = RNODE_BLOCK_PASS(args)->nd_body;
25485 args = RNODE_BLOCK_PASS(args)->nd_head;
25486 }
25487 if (args && nd_type_p(args, NODE_ARGSCAT)) {
25488 args = RNODE_ARGSCAT(args)->nd_body;
25489 }
25490 if (args && nd_type_p(args, NODE_ARGSPUSH)) {
25491 kwds = RNODE_ARGSPUSH(args)->nd_body;
25492 }
25493 else {
25494 for (NODE *next = args; next && nd_type_p(next, NODE_LIST);
25495 next = RNODE_LIST(next)->nd_next) {
25496 kwds = RNODE_LIST(next)->nd_head;
25497 }
25498 }
25499 if (kwds && nd_type_p(kwds, NODE_HASH) && !RNODE_HASH(kwds)->nd_brace) {
25500 yyerror1(&kwds->nd_loc, "keyword arg given in index assignment");
25501 }
25502 if (block) {
25503 yyerror1(&block->nd_loc, "block arg given in index assignment");
25504 }
25505}
25506
25507static NODE *
25508aryset(struct parser_params *p, NODE *recv, NODE *idx, const YYLTYPE *loc)
25509{
25510 aryset_check(p, idx);
25511 return NEW_ATTRASGN(recv, tASET, idx, loc);
25512}
25513
25514static void
25515block_dup_check(struct parser_params *p, NODE *node1, NODE *node2)
25516{
25517 if (node2 && node1 && nd_type_p(node1, NODE_BLOCK_PASS)) {
25518 compile_error(p, "both block arg and actual block given");
25519 }
25520}
25521
25522static NODE *
25523attrset(struct parser_params *p, NODE *recv, ID atype, ID id, const YYLTYPE *loc)
25524{
25525 if (!CALL_Q_P(atype)) id = rb_id_attrset(id);
25526 return NEW_ATTRASGN(recv, id, 0, loc);
25527}
25528
25529static VALUE
25530rb_backref_error(struct parser_params *p, NODE *node)
25531{
25532#ifndef RIPPER
25533# define ERR(...) (compile_error(p, __VA_ARGS__), Qtrue)
25534#else
25535# define ERR(...) rb_sprintf(__VA_ARGS__)
25536#endif
25537 switch (nd_type(node)) {
25538 case NODE_NTH_REF:
25539 return ERR("Can't set variable $%ld", RNODE_NTH_REF(node)->nd_nth);
25540 case NODE_BACK_REF:
25541 return ERR("Can't set variable $%c", (int)RNODE_BACK_REF(node)->nd_nth);
25542 }
25543#undef ERR
25544 UNREACHABLE_RETURN(Qfalse); /* only called on syntax error */
25545}
25546
25547static NODE *
25548arg_append(struct parser_params *p, NODE *node1, NODE *node2, const YYLTYPE *loc)
25549{
25550 if (!node1) return NEW_LIST(node2, &node2->nd_loc);
25551 switch (nd_type(node1)) {
25552 case NODE_LIST:
25553 return list_append(p, node1, node2);
25554 case NODE_BLOCK_PASS:
25555 RNODE_BLOCK_PASS(node1)->nd_head = arg_append(p, RNODE_BLOCK_PASS(node1)->nd_head, node2, loc);
25556 node1->nd_loc.end_pos = RNODE_BLOCK_PASS(node1)->nd_head->nd_loc.end_pos;
25557 return node1;
25558 case NODE_ARGSPUSH:
25559 RNODE_ARGSPUSH(node1)->nd_body = list_append(p, NEW_LIST(RNODE_ARGSPUSH(node1)->nd_body, &RNODE_ARGSPUSH(node1)->nd_body->nd_loc), node2);
25560 node1->nd_loc.end_pos = RNODE_ARGSPUSH(node1)->nd_body->nd_loc.end_pos;
25561 nd_set_type(node1, NODE_ARGSCAT);
25562 return node1;
25563 case NODE_ARGSCAT:
25564 if (!nd_type_p(RNODE_ARGSCAT(node1)->nd_body, NODE_LIST)) break;
25565 RNODE_ARGSCAT(node1)->nd_body = list_append(p, RNODE_ARGSCAT(node1)->nd_body, node2);
25566 node1->nd_loc.end_pos = RNODE_ARGSCAT(node1)->nd_body->nd_loc.end_pos;
25567 return node1;
25568 }
25569 return NEW_ARGSPUSH(node1, node2, loc);
25570}
25571
25572static NODE *
25573arg_concat(struct parser_params *p, NODE *node1, NODE *node2, const YYLTYPE *loc)
25574{
25575 if (!node2) return node1;
25576 switch (nd_type(node1)) {
25577 case NODE_BLOCK_PASS:
25578 if (RNODE_BLOCK_PASS(node1)->nd_head)
25579 RNODE_BLOCK_PASS(node1)->nd_head = arg_concat(p, RNODE_BLOCK_PASS(node1)->nd_head, node2, loc);
25580 else
25581 RNODE_LIST(node1)->nd_head = NEW_LIST(node2, loc);
25582 return node1;
25583 case NODE_ARGSPUSH:
25584 if (!nd_type_p(node2, NODE_LIST)) break;
25585 RNODE_ARGSPUSH(node1)->nd_body = list_concat(NEW_LIST(RNODE_ARGSPUSH(node1)->nd_body, loc), node2);
25586 nd_set_type(node1, NODE_ARGSCAT);
25587 return node1;
25588 case NODE_ARGSCAT:
25589 if (!nd_type_p(node2, NODE_LIST) ||
25590 !nd_type_p(RNODE_ARGSCAT(node1)->nd_body, NODE_LIST)) break;
25591 RNODE_ARGSCAT(node1)->nd_body = list_concat(RNODE_ARGSCAT(node1)->nd_body, node2);
25592 return node1;
25593 }
25594 return NEW_ARGSCAT(node1, node2, loc);
25595}
25596
25597static NODE *
25598last_arg_append(struct parser_params *p, NODE *args, NODE *last_arg, const YYLTYPE *loc)
25599{
25600 NODE *n1;
25601 if ((n1 = splat_array(args)) != 0) {
25602 return list_append(p, n1, last_arg);
25603 }
25604 return arg_append(p, args, last_arg, loc);
25605}
25606
25607static NODE *
25608rest_arg_append(struct parser_params *p, NODE *args, NODE *rest_arg, const YYLTYPE *loc)
25609{
25610 NODE *n1;
25611 if ((nd_type_p(rest_arg, NODE_LIST)) && (n1 = splat_array(args)) != 0) {
25612 return list_concat(n1, rest_arg);
25613 }
25614 return arg_concat(p, args, rest_arg, loc);
25615}
25616
25617static NODE *
25618splat_array(NODE* node)
25619{
25620 if (nd_type_p(node, NODE_SPLAT)) node = RNODE_SPLAT(node)->nd_head;
25621 if (nd_type_p(node, NODE_LIST)) return node;
25622 return 0;
25623}
25624
25625static void
25626mark_lvar_used(struct parser_params *p, NODE *rhs)
25627{
25628 ID *vidp = NULL;
25629 if (!rhs) return;
25630 switch (nd_type(rhs)) {
25631 case NODE_LASGN:
25632 if (local_id_ref(p, RNODE_LASGN(rhs)->nd_vid, &vidp)) {
25633 if (vidp) *vidp |= LVAR_USED;
25634 }
25635 break;
25636 case NODE_DASGN:
25637 if (dvar_defined_ref(p, RNODE_DASGN(rhs)->nd_vid, &vidp)) {
25638 if (vidp) *vidp |= LVAR_USED;
25639 }
25640 break;
25641#if 0
25642 case NODE_MASGN:
25643 for (rhs = rhs->nd_head; rhs; rhs = rhs->nd_next) {
25644 mark_lvar_used(p, rhs->nd_head);
25645 }
25646 break;
25647#endif
25648 }
25649}
25650
25651static int is_static_content(NODE *node);
25652
25653static NODE *
25654node_assign(struct parser_params *p, NODE *lhs, NODE *rhs, struct lex_context ctxt, const YYLTYPE *loc)
25655{
25656 if (!lhs) return 0;
25657
25658 switch (nd_type(lhs)) {
25659 case NODE_CDECL:
25660 case NODE_GASGN:
25661 case NODE_IASGN:
25662 case NODE_LASGN:
25663 case NODE_DASGN:
25664 case NODE_MASGN:
25665 case NODE_CVASGN:
25666 set_nd_value(p, lhs, rhs);
25667 nd_set_loc(lhs, loc);
25668 break;
25669
25670 case NODE_ATTRASGN:
25671 RNODE_ATTRASGN(lhs)->nd_args = arg_append(p, RNODE_ATTRASGN(lhs)->nd_args, rhs, loc);
25672 nd_set_loc(lhs, loc);
25673 break;
25674
25675 default:
25676 /* should not happen */
25677 break;
25678 }
25679
25680 return lhs;
25681}
25682
25683static NODE *
25684value_expr_check(struct parser_params *p, NODE *node)
25685{
25686 NODE *void_node = 0, *vn;
25687
25688 if (!node) {
25689 rb_warning0("empty expression");
25690 }
25691 while (node) {
25692 switch (nd_type(node)) {
25693 case NODE_ENSURE:
25694 vn = RNODE_ENSURE(node)->nd_head;
25695 node = RNODE_ENSURE(node)->nd_ensr;
25696 /* nd_ensr should not be NULL, check it out next */
25697 if (vn && (vn = value_expr_check(p, vn))) {
25698 goto found;
25699 }
25700 break;
25701
25702 case NODE_RESCUE:
25703 /* void only if all children are void */
25704 vn = RNODE_RESCUE(node)->nd_head;
25705 if (!vn || !(vn = value_expr_check(p, vn))) {
25706 if (!RNODE_RESCUE(node)->nd_else) return NULL;
25707 }
25708 if (!void_node) void_node = vn;
25709 for (NODE *r = RNODE_RESCUE(node)->nd_resq; r; r = RNODE_RESBODY(r)->nd_next) {
25710 if (!nd_type_p(r, NODE_RESBODY)) {
25711 compile_error(p, "unexpected node");
25712 return NULL;
25713 }
25714 if (!(vn = value_expr_check(p, RNODE_RESBODY(r)->nd_body))) {
25715 return NULL;
25716 }
25717 if (!void_node) void_node = vn;
25718 }
25719 node = RNODE_RESCUE(node)->nd_else;
25720 if (!node) return void_node;
25721 break;
25722
25723 case NODE_RETURN:
25724 case NODE_BREAK:
25725 case NODE_NEXT:
25726 case NODE_REDO:
25727 case NODE_RETRY:
25728 goto found;
25729
25730 case NODE_CASE:
25731 case NODE_CASE2:
25732 for (node = RNODE_CASE(node)->nd_body;
25733 node && nd_type_p(node, NODE_WHEN);
25734 node = RNODE_WHEN(node)->nd_next) {
25735 if (!(vn = value_expr_check(p, RNODE_WHEN(node)->nd_body))) {
25736 return NULL;
25737 }
25738 if (!void_node) void_node = vn;
25739 }
25740 break;
25741
25742 case NODE_CASE3:
25743 {
25744 NODE *in = RNODE_CASE3(node)->nd_body;
25745 if (!in || !nd_type_p(in, NODE_IN)) {
25746 compile_error(p, "unexpected node");
25747 return NULL;
25748 }
25749 if (!RNODE_IN(in)->nd_body) {
25750 /* single line pattern matching with "=>" operator */
25751 goto found;
25752 }
25753 do {
25754 vn = value_expr_check(p, RNODE_IN(in)->nd_body);
25755 if (!vn) return NULL;
25756 if (!void_node) void_node = vn;
25757 in = RNODE_IN(in)->nd_next;
25758 } while (in && nd_type_p(in, NODE_IN));
25759 node = in; /* else */
25760 }
25761 break;
25762
25763 case NODE_BLOCK:
25764 while (RNODE_BLOCK(node)->nd_next) {
25765 vn = value_expr_check(p, RNODE_BLOCK(node)->nd_head);
25766 if (vn) return vn;
25767 node = RNODE_BLOCK(node)->nd_next;
25768 }
25769 node = RNODE_BLOCK(node)->nd_head;
25770 break;
25771
25772 case NODE_BEGIN:
25773 node = RNODE_BEGIN(node)->nd_body;
25774 break;
25775
25776 case NODE_IF:
25777 case NODE_UNLESS:
25778 if (!RNODE_IF(node)->nd_body) {
25779 return NULL;
25780 }
25781 else if (!RNODE_IF(node)->nd_else) {
25782 return NULL;
25783 }
25784 vn = value_expr_check(p, RNODE_IF(node)->nd_body);
25785 if (!vn) return NULL;
25786 if (!void_node) void_node = vn;
25787 node = RNODE_IF(node)->nd_else;
25788 break;
25789
25790 case NODE_AND:
25791 case NODE_OR:
25792 node = RNODE_AND(node)->nd_1st;
25793 break;
25794
25795 case NODE_LASGN:
25796 case NODE_DASGN:
25797 case NODE_MASGN:
25798 mark_lvar_used(p, node);
25799 return NULL;
25800
25801 default:
25802 return NULL;
25803 }
25804 }
25805
25806 return NULL;
25807
25808 found:
25809 /* return the first found node */
25810 return void_node ? void_node : node;
25811}
25812
25813static int
25814value_expr(struct parser_params *p, NODE *node)
25815{
25816 NODE *void_node = value_expr_check(p, node);
25817 if (void_node) {
25818 yyerror1(&void_node->nd_loc, "void value expression");
25819 /* or "control never reach"? */
25820 return FALSE;
25821 }
25822 return TRUE;
25823}
25824
25825static void
25826void_expr(struct parser_params *p, NODE *node)
25827{
25828 const char *useless = 0;
25829
25830 if (!RTEST(ruby_verbose)) return;
25831
25832 if (!node || !(node = nd_once_body(node))) return;
25833 switch (nd_type(node)) {
25834 case NODE_OPCALL:
25835 switch (RNODE_OPCALL(node)->nd_mid) {
25836 case '+':
25837 case '-':
25838 case '*':
25839 case '/':
25840 case '%':
25841 case tPOW:
25842 case tUPLUS:
25843 case tUMINUS:
25844 case '|':
25845 case '^':
25846 case '&':
25847 case tCMP:
25848 case '>':
25849 case tGEQ:
25850 case '<':
25851 case tLEQ:
25852 case tEQ:
25853 case tNEQ:
25854 useless = rb_id2name(RNODE_OPCALL(node)->nd_mid);
25855 break;
25856 }
25857 break;
25858
25859 case NODE_LVAR:
25860 case NODE_DVAR:
25861 case NODE_GVAR:
25862 case NODE_IVAR:
25863 case NODE_CVAR:
25864 case NODE_NTH_REF:
25865 case NODE_BACK_REF:
25866 useless = "a variable";
25867 break;
25868 case NODE_CONST:
25869 useless = "a constant";
25870 break;
25871 case NODE_SYM:
25872 case NODE_LINE:
25873 case NODE_FILE:
25874 case NODE_ENCODING:
25875 case NODE_INTEGER:
25876 case NODE_FLOAT:
25877 case NODE_RATIONAL:
25878 case NODE_IMAGINARY:
25879 case NODE_STR:
25880 case NODE_DSTR:
25881 case NODE_REGX:
25882 case NODE_DREGX:
25883 useless = "a literal";
25884 break;
25885 case NODE_COLON2:
25886 case NODE_COLON3:
25887 useless = "::";
25888 break;
25889 case NODE_DOT2:
25890 useless = "..";
25891 break;
25892 case NODE_DOT3:
25893 useless = "...";
25894 break;
25895 case NODE_SELF:
25896 useless = "self";
25897 break;
25898 case NODE_NIL:
25899 useless = "nil";
25900 break;
25901 case NODE_TRUE:
25902 useless = "true";
25903 break;
25904 case NODE_FALSE:
25905 useless = "false";
25906 break;
25907 case NODE_DEFINED:
25908 useless = "defined?";
25909 break;
25910 }
25911
25912 if (useless) {
25913 rb_warn1L(nd_line(node), "possibly useless use of %s in void context", WARN_S(useless));
25914 }
25915}
25916
25917/* warns useless use of block and returns the last statement node */
25918static NODE *
25919void_stmts(struct parser_params *p, NODE *node)
25920{
25921 NODE *const n = node;
25922 if (!RTEST(ruby_verbose)) return n;
25923 if (!node) return n;
25924 if (!nd_type_p(node, NODE_BLOCK)) return n;
25925
25926 while (RNODE_BLOCK(node)->nd_next) {
25927 void_expr(p, RNODE_BLOCK(node)->nd_head);
25928 node = RNODE_BLOCK(node)->nd_next;
25929 }
25930 return RNODE_BLOCK(node)->nd_head;
25931}
25932
25933static NODE *
25934remove_begin(NODE *node)
25935{
25936 NODE **n = &node, *n1 = node;
25937 while (n1 && nd_type_p(n1, NODE_BEGIN) && RNODE_BEGIN(n1)->nd_body) {
25938 *n = n1 = RNODE_BEGIN(n1)->nd_body;
25939 }
25940 return node;
25941}
25942
25943static void
25944reduce_nodes(struct parser_params *p, NODE **body)
25945{
25946 NODE *node = *body;
25947
25948 if (!node) {
25949 *body = NEW_NIL(&NULL_LOC);
25950 return;
25951 }
25952#define subnodes(type, n1, n2) \
25953 ((!type(node)->n1) ? (type(node)->n2 ? (body = &type(node)->n2, 1) : 0) : \
25954 (!type(node)->n2) ? (body = &type(node)->n1, 1) : \
25955 (reduce_nodes(p, &type(node)->n1), body = &type(node)->n2, 1))
25956
25957 while (node) {
25958 int newline = (int)nd_fl_newline(node);
25959 switch (nd_type(node)) {
25960 end:
25961 case NODE_NIL:
25962 *body = 0;
25963 return;
25964 case NODE_BEGIN:
25965 *body = node = RNODE_BEGIN(node)->nd_body;
25966 if (newline && node) nd_set_fl_newline(node);
25967 continue;
25968 case NODE_BLOCK:
25969 body = &RNODE_BLOCK(RNODE_BLOCK(node)->nd_end)->nd_head;
25970 break;
25971 case NODE_IF:
25972 case NODE_UNLESS:
25973 if (subnodes(RNODE_IF, nd_body, nd_else)) break;
25974 return;
25975 case NODE_CASE:
25976 body = &RNODE_CASE(node)->nd_body;
25977 break;
25978 case NODE_WHEN:
25979 if (!subnodes(RNODE_WHEN, nd_body, nd_next)) goto end;
25980 break;
25981 case NODE_ENSURE:
25982 body = &RNODE_ENSURE(node)->nd_head;
25983 break;
25984 case NODE_RESCUE:
25985 newline = 0; // RESBODY should not be a NEWLINE
25986 if (RNODE_RESCUE(node)->nd_else) {
25987 body = &RNODE_RESCUE(node)->nd_resq;
25988 break;
25989 }
25990 if (!subnodes(RNODE_RESCUE, nd_head, nd_resq)) goto end;
25991 break;
25992 default:
25993 return;
25994 }
25995 node = *body;
25996 if (newline && node) nd_set_fl_newline(node);
25997 }
25998
25999#undef subnodes
26000}
26001
26002static int
26003is_static_content(NODE *node)
26004{
26005 if (!node) return 1;
26006 switch (nd_type(node)) {
26007 case NODE_HASH:
26008 if (!(node = RNODE_HASH(node)->nd_head)) break;
26009 case NODE_LIST:
26010 do {
26011 if (!is_static_content(RNODE_LIST(node)->nd_head)) return 0;
26012 } while ((node = RNODE_LIST(node)->nd_next) != 0);
26013 case NODE_SYM:
26014 case NODE_REGX:
26015 case NODE_LINE:
26016 case NODE_FILE:
26017 case NODE_ENCODING:
26018 case NODE_INTEGER:
26019 case NODE_FLOAT:
26020 case NODE_RATIONAL:
26021 case NODE_IMAGINARY:
26022 case NODE_STR:
26023 case NODE_NIL:
26024 case NODE_TRUE:
26025 case NODE_FALSE:
26026 case NODE_ZLIST:
26027 break;
26028 default:
26029 return 0;
26030 }
26031 return 1;
26032}
26033
26034static int
26035assign_in_cond(struct parser_params *p, NODE *node)
26036{
26037 switch (nd_type(node)) {
26038 case NODE_MASGN:
26039 case NODE_LASGN:
26040 case NODE_DASGN:
26041 case NODE_GASGN:
26042 case NODE_IASGN:
26043 case NODE_CVASGN:
26044 case NODE_CDECL:
26045 break;
26046
26047 default:
26048 return 0;
26049 }
26050
26051 if (!get_nd_value(p, node)) return 1;
26052 if (is_static_content(get_nd_value(p, node))) {
26053 /* reports always */
26054 rb_warn0L(nd_line(get_nd_value(p, node)), "found '= literal' in conditional, should be ==");
26055 }
26056 return 1;
26057}
26058
26059enum cond_type {
26060 COND_IN_OP,
26061 COND_IN_COND,
26062 COND_IN_FF
26063};
26064
26065#define SWITCH_BY_COND_TYPE(t, w, arg) do { \
26066 switch (t) { \
26067 case COND_IN_OP: break; \
26068 case COND_IN_COND: rb_##w##0(arg "literal in condition"); break; \
26069 case COND_IN_FF: rb_##w##0(arg "literal in flip-flop"); break; \
26070 } \
26071} while (0)
26072
26073static NODE *cond0(struct parser_params*,NODE*,enum cond_type,const YYLTYPE*,bool);
26074
26075static NODE*
26076range_op(struct parser_params *p, NODE *node, const YYLTYPE *loc)
26077{
26078 enum node_type type;
26079
26080 if (node == 0) return 0;
26081
26082 type = nd_type(node);
26083 value_expr(p, node);
26084 if (type == NODE_INTEGER) {
26085 if (!e_option_supplied(p)) rb_warn0L(nd_line(node), "integer literal in flip-flop");
26086 ID lineno = rb_intern("$.");
26087 return NEW_CALL(node, tEQ, NEW_LIST(NEW_GVAR(lineno, loc), loc), loc);
26088 }
26089 return cond0(p, node, COND_IN_FF, loc, true);
26090}
26091
26092static NODE*
26093cond0(struct parser_params *p, NODE *node, enum cond_type type, const YYLTYPE *loc, bool top)
26094{
26095 if (node == 0) return 0;
26096 if (!(node = nd_once_body(node))) return 0;
26097 assign_in_cond(p, node);
26098
26099 switch (nd_type(node)) {
26100 case NODE_BEGIN:
26101 RNODE_BEGIN(node)->nd_body = cond0(p, RNODE_BEGIN(node)->nd_body, type, loc, top);
26102 break;
26103
26104 case NODE_DSTR:
26105 case NODE_EVSTR:
26106 case NODE_STR:
26107 case NODE_FILE:
26108 SWITCH_BY_COND_TYPE(type, warn, "string ");
26109 break;
26110
26111 case NODE_REGX:
26112 if (!e_option_supplied(p)) SWITCH_BY_COND_TYPE(type, warn, "regex ");
26113 nd_set_type(node, NODE_MATCH);
26114 break;
26115
26116 case NODE_DREGX:
26117 if (!e_option_supplied(p)) SWITCH_BY_COND_TYPE(type, warning, "regex ");
26118
26119 return NEW_MATCH2(node, NEW_GVAR(idLASTLINE, loc), loc);
26120
26121 case NODE_BLOCK:
26122 {
26123 NODE *end = RNODE_BLOCK(node)->nd_end;
26124 NODE **expr = &RNODE_BLOCK(end)->nd_head;
26125 if (top) top = node == end;
26126 *expr = cond0(p, *expr, type, loc, top);
26127 }
26128 break;
26129
26130 case NODE_AND:
26131 case NODE_OR:
26132 RNODE_AND(node)->nd_1st = cond0(p, RNODE_AND(node)->nd_1st, COND_IN_COND, loc, true);
26133 RNODE_AND(node)->nd_2nd = cond0(p, RNODE_AND(node)->nd_2nd, COND_IN_COND, loc, true);
26134 break;
26135
26136 case NODE_DOT2:
26137 case NODE_DOT3:
26138 if (!top) break;
26139 RNODE_DOT2(node)->nd_beg = range_op(p, RNODE_DOT2(node)->nd_beg, loc);
26140 RNODE_DOT2(node)->nd_end = range_op(p, RNODE_DOT2(node)->nd_end, loc);
26141 switch (nd_type(node)) {
26142 case NODE_DOT2:
26143 nd_set_type(node,NODE_FLIP2);
26144 rb_node_flip2_t *flip2 = RNODE_FLIP2(node); /* for debug info */
26145 (void)flip2;
26146 break;
26147 case NODE_DOT3:
26148 nd_set_type(node, NODE_FLIP3);
26149 rb_node_flip3_t *flip3 = RNODE_FLIP3(node); /* for debug info */
26150 (void)flip3;
26151 break;
26152 }
26153 break;
26154
26155 case NODE_SYM:
26156 case NODE_DSYM:
26157 SWITCH_BY_COND_TYPE(type, warning, "symbol ");
26158 break;
26159
26160 case NODE_LINE:
26161 case NODE_ENCODING:
26162 case NODE_INTEGER:
26163 case NODE_FLOAT:
26164 case NODE_RATIONAL:
26165 case NODE_IMAGINARY:
26166 SWITCH_BY_COND_TYPE(type, warning, "");
26167 break;
26168
26169 default:
26170 break;
26171 }
26172 return node;
26173}
26174
26175static NODE*
26176cond(struct parser_params *p, NODE *node, const YYLTYPE *loc)
26177{
26178 if (node == 0) return 0;
26179 return cond0(p, node, COND_IN_COND, loc, true);
26180}
26181
26182static NODE*
26183method_cond(struct parser_params *p, NODE *node, const YYLTYPE *loc)
26184{
26185 if (node == 0) return 0;
26186 return cond0(p, node, COND_IN_OP, loc, true);
26187}
26188
26189static NODE*
26190new_nil_at(struct parser_params *p, const rb_code_position_t *pos)
26191{
26192 YYLTYPE loc = {*pos, *pos};
26193 return NEW_NIL(&loc);
26194}
26195
26196static NODE*
26197new_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)
26198{
26199 if (!cc) return right;
26200 cc = cond0(p, cc, COND_IN_COND, loc, true);
26201 return newline_node(NEW_IF(cc, left, right, loc, if_keyword_loc, then_keyword_loc, end_keyword_loc));
26202}
26203
26204static NODE*
26205new_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)
26206{
26207 if (!cc) return right;
26208 cc = cond0(p, cc, COND_IN_COND, loc, true);
26209 return newline_node(NEW_UNLESS(cc, left, right, loc, keyword_loc, then_keyword_loc, end_keyword_loc));
26210}
26211
26212#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))
26213
26214static NODE*
26215logop(struct parser_params *p, ID id, NODE *left, NODE *right,
26216 const YYLTYPE *op_loc, const YYLTYPE *loc)
26217{
26218 enum node_type type = id == idAND || id == idANDOP ? NODE_AND : NODE_OR;
26219 NODE *op;
26220 value_expr(p, left);
26221 if (left && nd_type_p(left, type)) {
26222 NODE *node = left, *second;
26223 while ((second = RNODE_AND(node)->nd_2nd) != 0 && nd_type_p(second, type)) {
26224 node = second;
26225 }
26226 RNODE_AND(node)->nd_2nd = NEW_AND_OR(type, second, right, loc, op_loc);
26227 nd_set_line(RNODE_AND(node)->nd_2nd, op_loc->beg_pos.lineno);
26228 left->nd_loc.end_pos = loc->end_pos;
26229 return left;
26230 }
26231 op = NEW_AND_OR(type, left, right, loc, op_loc);
26232 nd_set_line(op, op_loc->beg_pos.lineno);
26233 return op;
26234}
26235
26236#undef NEW_AND_OR
26237
26238static void
26239no_blockarg(struct parser_params *p, NODE *node)
26240{
26241 if (nd_type_p(node, NODE_BLOCK_PASS)) {
26242 compile_error(p, "block argument should not be given");
26243 }
26244}
26245
26246static NODE *
26247ret_args(struct parser_params *p, NODE *node)
26248{
26249 if (node) {
26250 no_blockarg(p, node);
26251 if (nd_type_p(node, NODE_LIST) && !RNODE_LIST(node)->nd_next) {
26252 node = RNODE_LIST(node)->nd_head;
26253 }
26254 }
26255 return node;
26256}
26257
26258static NODE*
26259negate_lit(struct parser_params *p, NODE* node, const YYLTYPE *loc)
26260{
26261 switch (nd_type(node)) {
26262 case NODE_INTEGER:
26263 RNODE_INTEGER(node)->minus = TRUE;
26264 break;
26265 case NODE_FLOAT:
26266 RNODE_FLOAT(node)->minus = TRUE;
26267 break;
26268 case NODE_RATIONAL:
26269 RNODE_RATIONAL(node)->minus = TRUE;
26270 break;
26271 case NODE_IMAGINARY:
26272 RNODE_IMAGINARY(node)->minus = TRUE;
26273 break;
26274 }
26275 node->nd_loc = *loc;
26276 return node;
26277}
26278
26279static NODE *
26280arg_blk_pass(NODE *node1, rb_node_block_pass_t *node2)
26281{
26282 if (node2) {
26283 if (!node1) return (NODE *)node2;
26284 node2->nd_head = node1;
26285 nd_set_first_lineno(node2, nd_first_lineno(node1));
26286 nd_set_first_column(node2, nd_first_column(node1));
26287 return (NODE *)node2;
26288 }
26289 return node1;
26290}
26291
26292static bool
26293args_info_empty_p(struct rb_args_info *args)
26294{
26295 if (args->pre_args_num) return false;
26296 if (args->post_args_num) return false;
26297 if (args->rest_arg) return false;
26298 if (args->opt_args) return false;
26299 if (args->block_arg) return false;
26300 if (args->kw_args) return false;
26301 if (args->kw_rest_arg) return false;
26302 return true;
26303}
26304
26305static rb_node_args_t *
26306new_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)
26307{
26308 struct rb_args_info *args = &tail->nd_ainfo;
26309
26310 if (args->forwarding) {
26311 if (rest_arg) {
26312 yyerror1(&RNODE(tail)->nd_loc, "... after rest argument");
26313 return tail;
26314 }
26315 rest_arg = idFWD_REST;
26316 }
26317
26318 args->pre_args_num = pre_args ? pre_args->nd_plen : 0;
26319 args->pre_init = pre_args ? pre_args->nd_next : 0;
26320
26321 args->post_args_num = post_args ? post_args->nd_plen : 0;
26322 args->post_init = post_args ? post_args->nd_next : 0;
26323 args->first_post_arg = post_args ? post_args->nd_pid : 0;
26324
26325 args->rest_arg = rest_arg;
26326
26327 args->opt_args = opt_args;
26328
26329 nd_set_loc(RNODE(tail), loc);
26330
26331 return tail;
26332}
26333
26334static rb_node_args_t *
26335new_args_tail(struct parser_params *p, rb_node_kw_arg_t *kw_args, ID kw_rest_arg, ID block, const YYLTYPE *kw_rest_loc)
26336{
26337 rb_node_args_t *node = NEW_ARGS(&NULL_LOC);
26338 struct rb_args_info *args = &node->nd_ainfo;
26339 if (p->error_p) return node;
26340
26341 if (block == idNil) {
26342 block = 0;
26343 args->no_blockarg = TRUE;
26344 }
26345 args->block_arg = block;
26346 args->kw_args = kw_args;
26347
26348 if (kw_args) {
26349 /*
26350 * def foo(k1: 1, kr1:, k2: 2, **krest, &b)
26351 * variable order: k1, kr1, k2, &b, internal_id, krest
26352 * #=> <reorder>
26353 * variable order: kr1, k1, k2, internal_id, krest, &b
26354 */
26355 ID kw_bits = internal_id(p), *required_kw_vars, *kw_vars;
26356 struct vtable *vtargs = p->lvtbl->args;
26357 rb_node_kw_arg_t *kwn = kw_args;
26358
26359 if (block) block = vtargs->tbl[vtargs->pos-1];
26360 vtable_pop(vtargs, !!block + !!kw_rest_arg);
26361 required_kw_vars = kw_vars = &vtargs->tbl[vtargs->pos];
26362 while (kwn) {
26363 if (!NODE_REQUIRED_KEYWORD_P(get_nd_value(p, kwn->nd_body)))
26364 --kw_vars;
26365 --required_kw_vars;
26366 kwn = kwn->nd_next;
26367 }
26368
26369 for (kwn = kw_args; kwn; kwn = kwn->nd_next) {
26370 ID vid = get_nd_vid(p, kwn->nd_body);
26371 if (NODE_REQUIRED_KEYWORD_P(get_nd_value(p, kwn->nd_body))) {
26372 *required_kw_vars++ = vid;
26373 }
26374 else {
26375 *kw_vars++ = vid;
26376 }
26377 }
26378
26379 arg_var(p, kw_bits);
26380 if (kw_rest_arg) arg_var(p, kw_rest_arg);
26381 if (block) arg_var(p, block);
26382
26383 args->kw_rest_arg = NEW_DVAR(kw_rest_arg, kw_rest_loc);
26384 }
26385 else if (kw_rest_arg == idNil) {
26386 args->no_kwarg = 1;
26387 }
26388 else if (kw_rest_arg) {
26389 args->kw_rest_arg = NEW_DVAR(kw_rest_arg, kw_rest_loc);
26390 }
26391
26392 return node;
26393}
26394
26395static rb_node_args_t *
26396args_with_numbered(struct parser_params *p, rb_node_args_t *args, int max_numparam, ID it_id)
26397{
26398 if (max_numparam > NO_PARAM || it_id) {
26399 if (!args) {
26400 YYLTYPE loc = RUBY_INIT_YYLLOC();
26401 args = new_empty_args_tail(p, 0);
26402 nd_set_loc(RNODE(args), &loc);
26403 }
26404 args->nd_ainfo.pre_args_num = it_id ? 1 : max_numparam;
26405 }
26406 return args;
26407}
26408
26409static NODE*
26410new_array_pattern(struct parser_params *p, NODE *constant, NODE *pre_arg, NODE *aryptn, const YYLTYPE *loc)
26411{
26412 RNODE_ARYPTN(aryptn)->nd_pconst = constant;
26413
26414 if (pre_arg) {
26415 NODE *pre_args = NEW_LIST(pre_arg, loc);
26416 if (RNODE_ARYPTN(aryptn)->pre_args) {
26417 RNODE_ARYPTN(aryptn)->pre_args = list_concat(pre_args, RNODE_ARYPTN(aryptn)->pre_args);
26418 }
26419 else {
26420 RNODE_ARYPTN(aryptn)->pre_args = pre_args;
26421 }
26422 }
26423 return aryptn;
26424}
26425
26426static NODE*
26427new_array_pattern_tail(struct parser_params *p, NODE *pre_args, int has_rest, NODE *rest_arg, NODE *post_args, const YYLTYPE *loc)
26428{
26429 if (has_rest) {
26430 rest_arg = rest_arg ? rest_arg : NODE_SPECIAL_NO_NAME_REST;
26431 }
26432 else {
26433 rest_arg = NULL;
26434 }
26435 NODE *node = NEW_ARYPTN(pre_args, rest_arg, post_args, loc);
26436
26437 return node;
26438}
26439
26440static NODE*
26441new_find_pattern(struct parser_params *p, NODE *constant, NODE *fndptn, const YYLTYPE *loc)
26442{
26443 RNODE_FNDPTN(fndptn)->nd_pconst = constant;
26444
26445 return fndptn;
26446}
26447
26448static NODE*
26449new_find_pattern_tail(struct parser_params *p, NODE *pre_rest_arg, NODE *args, NODE *post_rest_arg, const YYLTYPE *loc)
26450{
26451 pre_rest_arg = pre_rest_arg ? pre_rest_arg : NODE_SPECIAL_NO_NAME_REST;
26452 post_rest_arg = post_rest_arg ? post_rest_arg : NODE_SPECIAL_NO_NAME_REST;
26453 NODE *node = NEW_FNDPTN(pre_rest_arg, args, post_rest_arg, loc);
26454
26455 return node;
26456}
26457
26458static NODE*
26459new_hash_pattern(struct parser_params *p, NODE *constant, NODE *hshptn, const YYLTYPE *loc)
26460{
26461 RNODE_HSHPTN(hshptn)->nd_pconst = constant;
26462 return hshptn;
26463}
26464
26465static NODE*
26466new_hash_pattern_tail(struct parser_params *p, NODE *kw_args, ID kw_rest_arg, const YYLTYPE *loc)
26467{
26468 NODE *node, *kw_rest_arg_node;
26469
26470 if (kw_rest_arg == idNil) {
26471 kw_rest_arg_node = NODE_SPECIAL_NO_REST_KEYWORD;
26472 }
26473 else if (kw_rest_arg) {
26474 kw_rest_arg_node = assignable(p, kw_rest_arg, 0, loc);
26475 }
26476 else {
26477 kw_rest_arg_node = NULL;
26478 }
26479
26480 node = NEW_HSHPTN(0, kw_args, kw_rest_arg_node, loc);
26481
26482 return node;
26483}
26484
26485static NODE*
26486dsym_node(struct parser_params *p, NODE *node, const YYLTYPE *loc)
26487{
26488 if (!node) {
26489 return NEW_SYM(STR_NEW0(), loc);
26490 }
26491
26492 switch (nd_type(node)) {
26493 case NODE_DSTR:
26494 nd_set_type(node, NODE_DSYM);
26495 nd_set_loc(node, loc);
26496 break;
26497 case NODE_STR:
26498 node = str_to_sym_node(p, node, loc);
26499 break;
26500 default:
26501 node = NEW_DSYM(0, 1, NEW_LIST(node, loc), loc);
26502 break;
26503 }
26504 return node;
26505}
26506
26507static int
26508nd_type_st_key_enable_p(NODE *node)
26509{
26510 switch (nd_type(node)) {
26511 case NODE_INTEGER:
26512 case NODE_FLOAT:
26513 case NODE_RATIONAL:
26514 case NODE_IMAGINARY:
26515 case NODE_STR:
26516 case NODE_SYM:
26517 case NODE_REGX:
26518 case NODE_LINE:
26519 case NODE_FILE:
26520 case NODE_ENCODING:
26521 return true;
26522 default:
26523 return false;
26524 }
26525}
26526
26527static VALUE
26528nd_value(struct parser_params *p, NODE *node)
26529{
26530 switch (nd_type(node)) {
26531 case NODE_STR:
26532 return rb_node_str_string_val(node);
26533 case NODE_INTEGER:
26534 return rb_node_integer_literal_val(node);
26535 case NODE_FLOAT:
26536 return rb_node_float_literal_val(node);
26537 case NODE_RATIONAL:
26538 return rb_node_rational_literal_val(node);
26539 case NODE_IMAGINARY:
26540 return rb_node_imaginary_literal_val(node);
26541 case NODE_SYM:
26542 return rb_node_sym_string_val(node);
26543 case NODE_REGX:
26544 return rb_node_regx_string_val(node);
26545 case NODE_LINE:
26546 return rb_node_line_lineno_val(node);
26547 case NODE_ENCODING:
26548 return rb_node_encoding_val(node);
26549 case NODE_FILE:
26550 return rb_node_file_path_val(node);
26551 default:
26552 rb_bug("unexpected node: %s", ruby_node_name(nd_type(node)));
26554 }
26555}
26556
26557static void
26558warn_duplicate_keys(struct parser_params *p, NODE *hash)
26559{
26560 /* See https://bugs.ruby-lang.org/issues/20331 for discussion about what is warned. */
26561 p->warn_duplicate_keys_table = st_init_table_with_size(&literal_type, RNODE_LIST(hash)->as.nd_alen / 2);
26562 while (hash && RNODE_LIST(hash)->nd_next) {
26563 NODE *head = RNODE_LIST(hash)->nd_head;
26564 NODE *value = RNODE_LIST(hash)->nd_next;
26565 NODE *next = RNODE_LIST(value)->nd_next;
26566 st_data_t key;
26567 st_data_t data;
26568
26569 /* keyword splat, e.g. {k: 1, **z, k: 2} */
26570 if (!head) {
26571 head = value;
26572 }
26573
26574 if (nd_type_st_key_enable_p(head)) {
26575 key = (st_data_t)head;
26576
26577 if (st_delete(p->warn_duplicate_keys_table, &key, &data)) {
26578 rb_warn2L(nd_line((NODE *)data),
26579 "key %+"PRIsWARN" is duplicated and overwritten on line %d",
26580 nd_value(p, head), WARN_I(nd_line(head)));
26581 }
26582 st_insert(p->warn_duplicate_keys_table, (st_data_t)key, (st_data_t)hash);
26583 }
26584 hash = next;
26585 }
26586 st_free_table(p->warn_duplicate_keys_table);
26587 p->warn_duplicate_keys_table = NULL;
26588}
26589
26590static NODE *
26591new_hash(struct parser_params *p, NODE *hash, const YYLTYPE *loc)
26592{
26593 if (hash) warn_duplicate_keys(p, hash);
26594 return NEW_HASH(hash, loc);
26595}
26596
26597static void
26598error_duplicate_pattern_variable(struct parser_params *p, ID id, const YYLTYPE *loc)
26599{
26600 if (is_private_local_id(p, id)) {
26601 return;
26602 }
26603 if (st_is_member(p->pvtbl, id)) {
26604 yyerror1(loc, "duplicated variable name");
26605 }
26606 else if (p->ctxt.in_alt_pattern && id) {
26607 yyerror1(loc, "variable capture in alternative pattern");
26608 }
26609 else {
26610 p->ctxt.capture_in_pattern = 1;
26611 st_insert(p->pvtbl, (st_data_t)id, 0);
26612 }
26613}
26614
26615static void
26616error_duplicate_pattern_key(struct parser_params *p, VALUE key, const YYLTYPE *loc)
26617{
26618 if (!p->pktbl) {
26619 p->pktbl = st_init_numtable();
26620 }
26621 else if (st_is_member(p->pktbl, key)) {
26622 yyerror1(loc, "duplicated key name");
26623 return;
26624 }
26625 st_insert(p->pktbl, (st_data_t)key, 0);
26626}
26627
26628static NODE *
26629new_unique_key_hash(struct parser_params *p, NODE *hash, const YYLTYPE *loc)
26630{
26631 return NEW_HASH(hash, loc);
26632}
26633
26634static NODE *
26635new_op_assign(struct parser_params *p, NODE *lhs, ID op, NODE *rhs, struct lex_context ctxt, const YYLTYPE *loc)
26636{
26637 NODE *asgn;
26638
26639 if (lhs) {
26640 ID vid = get_nd_vid(p, lhs);
26641 YYLTYPE lhs_loc = lhs->nd_loc;
26642 if (op == tOROP) {
26643 set_nd_value(p, lhs, rhs);
26644 nd_set_loc(lhs, loc);
26645 asgn = NEW_OP_ASGN_OR(gettable(p, vid, &lhs_loc), lhs, loc);
26646 }
26647 else if (op == tANDOP) {
26648 set_nd_value(p, lhs, rhs);
26649 nd_set_loc(lhs, loc);
26650 asgn = NEW_OP_ASGN_AND(gettable(p, vid, &lhs_loc), lhs, loc);
26651 }
26652 else {
26653 asgn = lhs;
26654 rhs = NEW_CALL(gettable(p, vid, &lhs_loc), op, NEW_LIST(rhs, &rhs->nd_loc), loc);
26655 set_nd_value(p, asgn, rhs);
26656 nd_set_loc(asgn, loc);
26657 }
26658 }
26659 else {
26660 asgn = NEW_ERROR(loc);
26661 }
26662 return asgn;
26663}
26664
26665static NODE *
26666new_ary_op_assign(struct parser_params *p, NODE *ary,
26667 NODE *args, ID op, NODE *rhs, const YYLTYPE *args_loc, const YYLTYPE *loc,
26668 const YYLTYPE *call_operator_loc, const YYLTYPE *opening_loc, const YYLTYPE *closing_loc, const YYLTYPE *binary_operator_loc)
26669{
26670 NODE *asgn;
26671
26672 aryset_check(p, args);
26673 args = make_list(args, args_loc);
26674 asgn = NEW_OP_ASGN1(ary, op, args, rhs, loc, call_operator_loc, opening_loc, closing_loc, binary_operator_loc);
26675 fixpos(asgn, ary);
26676 return asgn;
26677}
26678
26679static NODE *
26680new_attr_op_assign(struct parser_params *p, NODE *lhs,
26681 ID atype, ID attr, ID op, NODE *rhs, const YYLTYPE *loc,
26682 const YYLTYPE *call_operator_loc, const YYLTYPE *message_loc, const YYLTYPE *binary_operator_loc)
26683{
26684 NODE *asgn;
26685
26686 asgn = NEW_OP_ASGN2(lhs, CALL_Q_P(atype), attr, op, rhs, loc, call_operator_loc, message_loc, binary_operator_loc);
26687 fixpos(asgn, lhs);
26688 return asgn;
26689}
26690
26691static NODE *
26692new_const_op_assign(struct parser_params *p, NODE *lhs, ID op, NODE *rhs, struct lex_context ctxt, const YYLTYPE *loc)
26693{
26694 NODE *asgn;
26695
26696 if (lhs) {
26697 asgn = NEW_OP_CDECL(lhs, op, rhs, ctxt.shareable_constant_value, loc);
26698 }
26699 else {
26700 asgn = NEW_ERROR(loc);
26701 }
26702 fixpos(asgn, lhs);
26703 return asgn;
26704}
26705
26706static NODE *
26707const_decl(struct parser_params *p, NODE *path, const YYLTYPE *loc)
26708{
26709 if (p->ctxt.in_def) {
26710#ifndef RIPPER
26711 yyerror1(loc, "dynamic constant assignment");
26712#else
26713 set_value(assign_error(p, "dynamic constant assignment", p->s_lvalue));
26714#endif
26715 }
26716 return NEW_CDECL(0, 0, (path), p->ctxt.shareable_constant_value, loc);
26717}
26718
26719#ifdef RIPPER
26720static VALUE
26721assign_error(struct parser_params *p, const char *mesg, VALUE a)
26722{
26723 a = dispatch2(assign_error, ERR_MESG(), a);
26724 ripper_error(p);
26725 return a;
26726}
26727#endif
26728
26729static NODE *
26730new_bodystmt(struct parser_params *p, NODE *head, NODE *rescue, NODE *rescue_else, NODE *ensure, const YYLTYPE *loc)
26731{
26732 NODE *result = head;
26733 if (rescue) {
26734 NODE *tmp = rescue_else ? rescue_else : rescue;
26735 YYLTYPE rescue_loc = code_loc_gen(&head->nd_loc, &tmp->nd_loc);
26736
26737 result = NEW_RESCUE(head, rescue, rescue_else, &rescue_loc);
26738 nd_set_line(result, rescue->nd_loc.beg_pos.lineno);
26739 }
26740 if (ensure) {
26741 result = NEW_ENSURE(result, ensure, loc);
26742 }
26743 fixpos(result, head);
26744 return result;
26745}
26746
26747static void
26748warn_unused_var(struct parser_params *p, struct local_vars *local)
26749{
26750 int cnt;
26751
26752 if (!local->used) return;
26753 cnt = local->used->pos;
26754 if (cnt != local->vars->pos) {
26755 rb_parser_fatal(p, "local->used->pos != local->vars->pos");
26756 }
26757#ifndef RIPPER
26758 ID *v = local->vars->tbl;
26759 ID *u = local->used->tbl;
26760 for (int i = 0; i < cnt; ++i) {
26761 if (!v[i] || (u[i] & LVAR_USED)) continue;
26762 if (is_private_local_id(p, v[i])) continue;
26763 rb_warn1L((int)u[i], "assigned but unused variable - %"PRIsWARN, rb_id2str(v[i]));
26764 }
26765#endif
26766}
26767
26768static void
26769local_push(struct parser_params *p, int toplevel_scope)
26770{
26771 struct local_vars *local;
26772 int inherits_dvars = toplevel_scope && compile_for_eval;
26773 int warn_unused_vars = RTEST(ruby_verbose);
26774
26775 local = ALLOC(struct local_vars);
26776 local->prev = p->lvtbl;
26777 local->args = vtable_alloc(0);
26778 local->vars = vtable_alloc(inherits_dvars ? DVARS_INHERIT : DVARS_TOPSCOPE);
26779#ifndef RIPPER
26780 if (toplevel_scope && compile_for_eval) warn_unused_vars = 0;
26781 if (toplevel_scope && e_option_supplied(p)) warn_unused_vars = 0;
26782#endif
26783 local->numparam.outer = 0;
26784 local->numparam.inner = 0;
26785 local->numparam.current = 0;
26786 local->it = 0;
26787 local->used = warn_unused_vars ? vtable_alloc(0) : 0;
26788
26789# if WARN_PAST_SCOPE
26790 local->past = 0;
26791# endif
26792 CMDARG_PUSH(0);
26793 COND_PUSH(0);
26794 p->lvtbl = local;
26795}
26796
26797static void
26798vtable_chain_free(struct parser_params *p, struct vtable *table)
26799{
26800 while (!DVARS_TERMINAL_P(table)) {
26801 struct vtable *cur_table = table;
26802 table = cur_table->prev;
26803 vtable_free(cur_table);
26804 }
26805}
26806
26807static void
26808local_free(struct parser_params *p, struct local_vars *local)
26809{
26810 vtable_chain_free(p, local->used);
26811
26812# if WARN_PAST_SCOPE
26813 vtable_chain_free(p, local->past);
26814# endif
26815
26816 vtable_chain_free(p, local->args);
26817 vtable_chain_free(p, local->vars);
26818
26819 ruby_xfree_sized(local, sizeof(struct local_vars));
26820}
26821
26822static void
26823local_pop(struct parser_params *p)
26824{
26825 struct local_vars *local = p->lvtbl->prev;
26826 if (p->lvtbl->used) {
26827 warn_unused_var(p, p->lvtbl);
26828 }
26829
26830 local_free(p, p->lvtbl);
26831 p->lvtbl = local;
26832
26833 CMDARG_POP();
26834 COND_POP();
26835}
26836
26837static rb_ast_id_table_t *
26838local_tbl(struct parser_params *p)
26839{
26840 int cnt_args = vtable_size(p->lvtbl->args);
26841 int cnt_vars = vtable_size(p->lvtbl->vars);
26842 int cnt = cnt_args + cnt_vars;
26843 int i, j;
26844 rb_ast_id_table_t *tbl;
26845
26846 if (cnt <= 0) return 0;
26847 tbl = rb_ast_new_local_table(p->ast, cnt);
26848 MEMCPY(tbl->ids, p->lvtbl->args->tbl, ID, cnt_args);
26849 /* remove IDs duplicated to warn shadowing */
26850 for (i = 0, j = cnt_args; i < cnt_vars; ++i) {
26851 ID id = p->lvtbl->vars->tbl[i];
26852 if (!vtable_included(p->lvtbl->args, id)) {
26853 tbl->ids[j++] = id;
26854 }
26855 }
26856 if (j < cnt) {
26857 tbl = rb_ast_resize_latest_local_table(p->ast, j);
26858 }
26859
26860 return tbl;
26861}
26862
26863static void
26864numparam_name(struct parser_params *p, ID id)
26865{
26866 if (!NUMPARAM_ID_P(id)) return;
26867 compile_error(p, "_%d is reserved for numbered parameter",
26868 NUMPARAM_ID_TO_IDX(id));
26869}
26870
26871static void
26872arg_var(struct parser_params *p, ID id)
26873{
26874 numparam_name(p, id);
26875 vtable_add(p->lvtbl->args, id);
26876}
26877
26878static void
26879local_var(struct parser_params *p, ID id)
26880{
26881 numparam_name(p, id);
26882 vtable_add(p->lvtbl->vars, id);
26883 if (p->lvtbl->used) {
26884 vtable_add(p->lvtbl->used, (ID)p->ruby_sourceline);
26885 }
26886}
26887
26888#ifndef RIPPER
26889int
26890rb_parser_local_defined(struct parser_params *p, ID id, const struct rb_iseq_struct *iseq)
26891{
26892 return rb_local_defined(id, iseq);
26893}
26894#endif
26895
26896static int
26897local_id_ref(struct parser_params *p, ID id, ID **vidrefp)
26898{
26899 struct vtable *vars, *args, *used;
26900
26901 vars = p->lvtbl->vars;
26902 args = p->lvtbl->args;
26903 used = p->lvtbl->used;
26904
26905 while (vars && !DVARS_TERMINAL_P(vars->prev)) {
26906 vars = vars->prev;
26907 args = args->prev;
26908 if (used) used = used->prev;
26909 }
26910
26911 if (vars && vars->prev == DVARS_INHERIT) {
26912 return rb_parser_local_defined(p, id, p->parent_iseq);
26913 }
26914 else if (vtable_included(args, id)) {
26915 return 1;
26916 }
26917 else {
26918 int i = vtable_included(vars, id);
26919 if (i && used && vidrefp) *vidrefp = &used->tbl[i-1];
26920 return i != 0;
26921 }
26922}
26923
26924static int
26925local_id(struct parser_params *p, ID id)
26926{
26927 return local_id_ref(p, id, NULL);
26928}
26929
26930static int
26931check_forwarding_args(struct parser_params *p)
26932{
26933 if (local_id(p, idFWD_ALL)) return TRUE;
26934 compile_error(p, "unexpected ...");
26935 return FALSE;
26936}
26937
26938static void
26939add_forwarding_args(struct parser_params *p)
26940{
26941 arg_var(p, idFWD_REST);
26942 arg_var(p, idFWD_KWREST);
26943 arg_var(p, idFWD_BLOCK);
26944 arg_var(p, idFWD_ALL);
26945}
26946
26947static void
26948forwarding_arg_check(struct parser_params *p, ID arg, ID all, const char *var)
26949{
26950 bool conflict = false;
26951
26952 struct vtable *vars, *args;
26953
26954 vars = p->lvtbl->vars;
26955 args = p->lvtbl->args;
26956
26957 while (vars && !DVARS_TERMINAL_P(vars->prev)) {
26958 conflict |= (vtable_included(args, arg) && !(all && vtable_included(args, all)));
26959 vars = vars->prev;
26960 args = args->prev;
26961 }
26962
26963 bool found = false;
26964 if (vars && vars->prev == DVARS_INHERIT && !found) {
26965 found = (rb_parser_local_defined(p, arg, p->parent_iseq) &&
26966 !(all && rb_parser_local_defined(p, all, p->parent_iseq)));
26967 }
26968 else {
26969 found = (vtable_included(args, arg) &&
26970 !(all && vtable_included(args, all)));
26971 }
26972
26973 if (!found) {
26974 compile_error(p, "no anonymous %s parameter", var);
26975 }
26976 else if (conflict) {
26977 compile_error(p, "anonymous %s parameter is also used within block", var);
26978 }
26979}
26980
26981static NODE *
26982new_args_forward_call(struct parser_params *p, NODE *leading, const YYLTYPE *loc, const YYLTYPE *argsloc)
26983{
26984 NODE *rest = NEW_LVAR(idFWD_REST, loc);
26985 NODE *kwrest = list_append(p, NEW_LIST(0, loc), NEW_LVAR(idFWD_KWREST, loc));
26986 rb_node_block_pass_t *block = NEW_BLOCK_PASS(NEW_LVAR(idFWD_BLOCK, loc), argsloc, &NULL_LOC);
26987 NODE *args = leading ? rest_arg_append(p, leading, rest, argsloc) : NEW_SPLAT(rest, loc, &NULL_LOC);
26988 block->forwarding = TRUE;
26989 args = arg_append(p, args, new_hash(p, kwrest, loc), argsloc);
26990 return arg_blk_pass(args, block);
26991}
26992
26993static NODE *
26994numparam_push(struct parser_params *p)
26995{
26996 struct local_vars *local = p->lvtbl;
26997 NODE *inner = local->numparam.inner;
26998 if (!local->numparam.outer) {
26999 local->numparam.outer = local->numparam.current;
27000 }
27001 local->numparam.inner = 0;
27002 local->numparam.current = 0;
27003 local->it = 0;
27004 return inner;
27005}
27006
27007static void
27008numparam_pop(struct parser_params *p, NODE *prev_inner)
27009{
27010 struct local_vars *local = p->lvtbl;
27011 if (prev_inner) {
27012 /* prefer first one */
27013 local->numparam.inner = prev_inner;
27014 }
27015 else if (local->numparam.current) {
27016 /* current and inner are exclusive */
27017 local->numparam.inner = local->numparam.current;
27018 }
27019 if (p->max_numparam > NO_PARAM) {
27020 /* current and outer are exclusive */
27021 local->numparam.current = local->numparam.outer;
27022 local->numparam.outer = 0;
27023 }
27024 else {
27025 /* no numbered parameter */
27026 local->numparam.current = 0;
27027 }
27028 local->it = 0;
27029}
27030
27031static const struct vtable *
27032dyna_push(struct parser_params *p)
27033{
27034 p->lvtbl->args = vtable_alloc(p->lvtbl->args);
27035 p->lvtbl->vars = vtable_alloc(p->lvtbl->vars);
27036 if (p->lvtbl->used) {
27037 p->lvtbl->used = vtable_alloc(p->lvtbl->used);
27038 }
27039 return p->lvtbl->args;
27040}
27041
27042static void
27043dyna_pop_vtable(struct parser_params *p, struct vtable **vtblp)
27044{
27045 struct vtable *tmp = *vtblp;
27046 *vtblp = tmp->prev;
27047# if WARN_PAST_SCOPE
27048 if (p->past_scope_enabled) {
27049 tmp->prev = p->lvtbl->past;
27050 p->lvtbl->past = tmp;
27051 return;
27052 }
27053# endif
27054 vtable_free(tmp);
27055}
27056
27057static void
27058dyna_pop_1(struct parser_params *p)
27059{
27060 struct vtable *tmp;
27061
27062 if ((tmp = p->lvtbl->used) != 0) {
27063 warn_unused_var(p, p->lvtbl);
27064 p->lvtbl->used = p->lvtbl->used->prev;
27065 vtable_free(tmp);
27066 }
27067 dyna_pop_vtable(p, &p->lvtbl->args);
27068 dyna_pop_vtable(p, &p->lvtbl->vars);
27069}
27070
27071static void
27072dyna_pop(struct parser_params *p, const struct vtable *lvargs)
27073{
27074 while (p->lvtbl->args != lvargs) {
27075 dyna_pop_1(p);
27076 if (!p->lvtbl->args) {
27077 struct local_vars *local = p->lvtbl->prev;
27078 ruby_xfree_sized(p->lvtbl, sizeof(*p->lvtbl));
27079 p->lvtbl = local;
27080 }
27081 }
27082 dyna_pop_1(p);
27083}
27084
27085static int
27086dyna_in_block(struct parser_params *p)
27087{
27088 return !DVARS_TERMINAL_P(p->lvtbl->vars) && p->lvtbl->vars->prev != DVARS_TOPSCOPE;
27089}
27090
27091#ifndef RIPPER
27092int
27093dvar_defined_ref(struct parser_params *p, ID id, ID **vidrefp)
27094{
27095 struct vtable *vars, *args, *used;
27096 int i;
27097
27098 args = p->lvtbl->args;
27099 vars = p->lvtbl->vars;
27100 used = p->lvtbl->used;
27101
27102 while (!DVARS_TERMINAL_P(vars)) {
27103 if (vtable_included(args, id)) {
27104 return 1;
27105 }
27106 if ((i = vtable_included(vars, id)) != 0) {
27107 if (used && vidrefp) *vidrefp = &used->tbl[i-1];
27108 return 1;
27109 }
27110 args = args->prev;
27111 vars = vars->prev;
27112 if (!vidrefp) used = 0;
27113 if (used) used = used->prev;
27114 }
27115
27116 if (vars == DVARS_INHERIT && !NUMPARAM_ID_P(id)) {
27117 return rb_dvar_defined(id, p->parent_iseq);
27118 }
27119
27120 return 0;
27121}
27122#endif
27123
27124static int
27125dvar_defined(struct parser_params *p, ID id)
27126{
27127 return dvar_defined_ref(p, id, NULL);
27128}
27129
27130static int
27131dvar_curr(struct parser_params *p, ID id)
27132{
27133 return (vtable_included(p->lvtbl->args, id) ||
27134 vtable_included(p->lvtbl->vars, id));
27135}
27136
27137static void
27138reg_fragment_enc_error(struct parser_params* p, rb_parser_string_t *str, int c)
27139{
27140 compile_error(p,
27141 "regexp encoding option '%c' differs from source encoding '%s'",
27142 c, rb_enc_name(rb_parser_str_get_encoding(str)));
27143}
27144
27145#ifndef RIPPER
27146static rb_encoding *
27147find_enc(struct parser_params* p, const char *name)
27148{
27149 int idx = rb_enc_find_index(name);
27150 if (idx < 0) {
27151 rb_bug("unknown encoding name: %s", name);
27152 }
27153
27154 return rb_enc_from_index(idx);
27155}
27156
27157static rb_encoding *
27158kcode_to_enc(struct parser_params* p, int kcode)
27159{
27160 rb_encoding *enc;
27161
27162 switch (kcode) {
27163 case ENC_ASCII8BIT:
27164 enc = rb_ascii8bit_encoding();
27165 break;
27166 case ENC_EUC_JP:
27167 enc = find_enc(p, "EUC-JP");
27168 break;
27169 case ENC_Windows_31J:
27170 enc = find_enc(p, "Windows-31J");
27171 break;
27172 case ENC_UTF8:
27173 enc = rb_utf8_encoding();
27174 break;
27175 default:
27176 enc = NULL;
27177 break;
27178 }
27179
27180 return enc;
27181}
27182
27183int
27184rb_reg_fragment_setenc(struct parser_params* p, rb_parser_string_t *str, int options)
27185{
27186 int c = RE_OPTION_ENCODING_IDX(options);
27187
27188 if (c) {
27189 int opt, idx;
27190 rb_encoding *enc;
27191
27192 char_to_option_kcode(c, &opt, &idx);
27193 enc = kcode_to_enc(p, idx);
27194 if (enc != rb_parser_str_get_encoding(str) &&
27195 !rb_parser_is_ascii_string(p, str)) {
27196 goto error;
27197 }
27198 rb_parser_string_set_encoding(str, enc);
27199 }
27200 else if (RE_OPTION_ENCODING_NONE(options)) {
27201 if (!PARSER_ENCODING_IS_ASCII8BIT(p, str) &&
27202 !rb_parser_is_ascii_string(p, str)) {
27203 c = 'n';
27204 goto error;
27205 }
27206 rb_parser_enc_associate(p, str, rb_ascii8bit_encoding());
27207 }
27208 else if (rb_is_usascii_enc(p->enc)) {
27209 rb_parser_enc_associate(p, str, rb_ascii8bit_encoding());
27210 }
27211 return 0;
27212
27213 error:
27214 return c;
27215}
27216#endif
27217
27218static void
27219reg_fragment_setenc(struct parser_params* p, rb_parser_string_t *str, int options)
27220{
27221 int c = rb_reg_fragment_setenc(p, str, options);
27222 if (c) reg_fragment_enc_error(p, str, c);
27223}
27224
27225#ifndef UNIVERSAL_PARSER
27226typedef struct {
27227 struct parser_params* parser;
27228 rb_encoding *enc;
27229 NODE *succ_block;
27230 const YYLTYPE *loc;
27231 rb_parser_assignable_func assignable;
27233
27234static int
27235reg_named_capture_assign_iter(const OnigUChar *name, const OnigUChar *name_end,
27236 int back_num, int *back_refs, OnigRegex regex, void *arg0)
27237{
27239 struct parser_params* p = arg->parser;
27240 rb_encoding *enc = arg->enc;
27241 long len = name_end - name;
27242 const char *s = (const char *)name;
27243
27244 return rb_reg_named_capture_assign_iter_impl(p, s, len, enc, &arg->succ_block, arg->loc, arg->assignable);
27245}
27246
27247static NODE *
27248reg_named_capture_assign(struct parser_params* p, VALUE regexp, const YYLTYPE *loc, rb_parser_assignable_func assignable)
27249{
27251
27252 arg.parser = p;
27253 arg.enc = rb_enc_get(regexp);
27254 arg.succ_block = 0;
27255 arg.loc = loc;
27256 arg.assignable = assignable;
27257 onig_foreach_name(RREGEXP_PTR(regexp), reg_named_capture_assign_iter, &arg);
27258
27259 if (!arg.succ_block) return 0;
27260 return RNODE_BLOCK(arg.succ_block)->nd_next;
27261}
27262#endif
27263
27264#ifndef RIPPER
27265NODE *
27266rb_parser_assignable(struct parser_params *p, ID id, NODE *val, const YYLTYPE *loc)
27267{
27268 return assignable(p, id, val, loc);
27269}
27270
27271int
27272rb_reg_named_capture_assign_iter_impl(struct parser_params *p, const char *s, long len,
27273 rb_encoding *enc, NODE **succ_block, const rb_code_location_t *loc, rb_parser_assignable_func assignable)
27274{
27275 ID var;
27276 NODE *node, *succ;
27277
27278 if (!len) return ST_CONTINUE;
27279 if (!VALID_SYMNAME_P(s, len, enc, ID_LOCAL))
27280 return ST_CONTINUE;
27281
27282 var = intern_cstr(s, len, enc);
27283 if (len < MAX_WORD_LENGTH && rb_reserved_word(s, (int)len)) {
27284 if (!lvar_defined(p, var)) return ST_CONTINUE;
27285 }
27286 node = node_assign(p, assignable(p, var, 0, loc), NEW_SYM(rb_id2str(var), loc), NO_LEX_CTXT, loc);
27287 succ = *succ_block;
27288 if (!succ) succ = NEW_ERROR(loc);
27289 succ = block_append(p, succ, node);
27290 *succ_block = succ;
27291 return ST_CONTINUE;
27292}
27293#endif
27294
27295static VALUE
27296parser_reg_compile(struct parser_params* p, rb_parser_string_t *str, int options)
27297{
27298 VALUE str2;
27299 reg_fragment_setenc(p, str, options);
27300 str2 = rb_str_new_parser_string(str);
27301 return rb_parser_reg_compile(p, str2, options);
27302}
27303
27304#ifndef RIPPER
27305VALUE
27306rb_parser_reg_compile(struct parser_params* p, VALUE str, int options)
27307{
27308 return rb_reg_compile(str, options & RE_OPTION_MASK, p->ruby_sourcefile, p->ruby_sourceline);
27309}
27310#endif
27311
27312static VALUE
27313reg_compile(struct parser_params* p, rb_parser_string_t *str, int options)
27314{
27315 VALUE re;
27316 VALUE err;
27317
27318 err = rb_errinfo();
27319 re = parser_reg_compile(p, str, options);
27320 if (NIL_P(re)) {
27321 VALUE m = rb_attr_get(rb_errinfo(), idMesg);
27322 rb_set_errinfo(err);
27323 compile_error(p, "%"PRIsVALUE, m);
27324 return Qnil;
27325 }
27326 return re;
27327}
27328
27329#ifndef RIPPER
27330void
27331rb_ruby_parser_set_options(struct parser_params *p, int print, int loop, int chomp, int split)
27332{
27333 p->do_print = print;
27334 p->do_loop = loop;
27335 p->do_chomp = chomp;
27336 p->do_split = split;
27337}
27338
27339static NODE *
27340parser_append_options(struct parser_params *p, NODE *node)
27341{
27342 static const YYLTYPE default_location = {{1, 0}, {1, 0}};
27343 const YYLTYPE *const LOC = &default_location;
27344
27345 if (p->do_print) {
27346 NODE *print = (NODE *)NEW_FCALL(rb_intern("print"),
27347 NEW_LIST(NEW_GVAR(idLASTLINE, LOC), LOC),
27348 LOC);
27349 node = block_append(p, node, print);
27350 }
27351
27352 if (p->do_loop) {
27353 NODE *irs = NEW_LIST(NEW_GVAR(rb_intern("$/"), LOC), LOC);
27354
27355 if (p->do_split) {
27356 ID ifs = rb_intern("$;");
27357 ID fields = rb_intern("$F");
27358 NODE *args = NEW_LIST(NEW_GVAR(ifs, LOC), LOC);
27359 NODE *split = NEW_GASGN(fields,
27360 NEW_CALL(NEW_GVAR(idLASTLINE, LOC),
27361 rb_intern("split"), args, LOC),
27362 LOC);
27363 node = block_append(p, split, node);
27364 }
27365 if (p->do_chomp) {
27366 NODE *chomp = NEW_SYM(rb_str_new_cstr("chomp"), LOC);
27367 chomp = list_append(p, NEW_LIST(chomp, LOC), NEW_TRUE(LOC));
27368 irs = list_append(p, irs, NEW_HASH(chomp, LOC));
27369 }
27370
27371 node = NEW_WHILE((NODE *)NEW_FCALL(idGets, irs, LOC), node, 1, LOC, &NULL_LOC, &NULL_LOC);
27372 }
27373
27374 return node;
27375}
27376
27377void
27378rb_init_parse(void)
27379{
27380 /* just to suppress unused-function warnings */
27381 (void)nodetype;
27382 (void)nodeline;
27383}
27384
27385ID
27386internal_id(struct parser_params *p)
27387{
27388 return rb_make_temporary_id(vtable_size(p->lvtbl->args) + vtable_size(p->lvtbl->vars));
27389}
27390#endif /* !RIPPER */
27391
27392static void
27393parser_initialize(struct parser_params *p)
27394{
27395 /* note: we rely on TypedData_Make_Struct to set most fields to 0 */
27396 p->command_start = TRUE;
27397 p->ruby_sourcefile_string = Qnil;
27398 p->lex.lpar_beg = -1; /* make lambda_beginning_p() == FALSE at first */
27399 string_buffer_init(p);
27400 p->node_id = 0;
27401 p->delayed.token = NULL;
27402 p->frozen_string_literal = -1; /* not specified */
27403#ifndef RIPPER
27404 p->error_buffer = Qfalse;
27405 p->end_expect_token_locations = NULL;
27406 p->token_id = 0;
27407 p->tokens = NULL;
27408#else
27409 p->result = Qnil;
27410 p->parsing_thread = Qnil;
27411 p->s_value = Qnil;
27412 p->s_lvalue = Qnil;
27413 p->s_value_stack = rb_ary_new();
27414#endif
27415 p->debug_buffer = Qnil;
27416 p->debug_output = rb_ractor_stdout();
27417 p->enc = rb_utf8_encoding();
27418 p->exits = 0;
27419}
27420
27421#ifdef RIPPER
27422#define rb_ruby_parser_mark ripper_parser_mark
27423#define rb_ruby_parser_free ripper_parser_free
27424#define rb_ruby_parser_memsize ripper_parser_memsize
27425#endif
27426
27427void
27428rb_ruby_parser_mark(void *ptr)
27429{
27430 struct parser_params *p = (struct parser_params*)ptr;
27431
27432 rb_gc_mark(p->ruby_sourcefile_string);
27433#ifndef RIPPER
27434 rb_gc_mark(p->error_buffer);
27435#else
27436 rb_gc_mark(p->value);
27437 rb_gc_mark(p->result);
27438 rb_gc_mark(p->parsing_thread);
27439 rb_gc_mark(p->s_value);
27440 rb_gc_mark(p->s_lvalue);
27441 rb_gc_mark(p->s_value_stack);
27442#endif
27443 rb_gc_mark(p->debug_buffer);
27444 rb_gc_mark(p->debug_output);
27445}
27446
27447void
27448rb_ruby_parser_free(void *ptr)
27449{
27450 struct parser_params *p = (struct parser_params*)ptr;
27451 struct local_vars *local, *prev;
27452
27453 if (p->ast) {
27454 rb_ast_free(p->ast);
27455 }
27456
27457 if (p->warn_duplicate_keys_table) {
27458 st_free_table(p->warn_duplicate_keys_table);
27459 }
27460
27461#ifndef RIPPER
27462 if (p->tokens) {
27463 rb_parser_ary_free(p, p->tokens);
27464 }
27465#endif
27466
27467 if (p->tokenbuf) {
27468 ruby_xfree_sized(p->tokenbuf, p->toksiz);
27469 }
27470
27471 for (local = p->lvtbl; local; local = prev) {
27472 prev = local->prev;
27473 local_free(p, local);
27474 }
27475
27476 {
27477 token_info *ptinfo;
27478 while ((ptinfo = p->token_info) != 0) {
27479 p->token_info = ptinfo->next;
27480 xfree(ptinfo);
27481 }
27482 }
27483 string_buffer_free(p);
27484
27485 if (p->pvtbl) {
27486 st_free_table(p->pvtbl);
27487 }
27488
27489 if (CASE_LABELS_ENABLED_P(p->case_labels)) {
27490 st_free_table(p->case_labels);
27491 }
27492
27493 xfree(p->lex.strterm);
27494 p->lex.strterm = 0;
27495
27496 xfree(ptr);
27497}
27498
27499size_t
27500rb_ruby_parser_memsize(const void *ptr)
27501{
27502 struct parser_params *p = (struct parser_params*)ptr;
27503 struct local_vars *local;
27504 size_t size = sizeof(*p);
27505
27506 size += p->toksiz;
27507 for (local = p->lvtbl; local; local = local->prev) {
27508 size += sizeof(*local);
27509 if (local->vars) size += local->vars->capa * sizeof(ID);
27510 }
27511 return size;
27512}
27513
27514#ifndef RIPPER
27515#undef rb_reserved_word
27516
27517const struct kwtable *
27518rb_reserved_word(const char *str, unsigned int len)
27519{
27520 return reserved_word(str, len);
27521}
27522
27523#ifdef UNIVERSAL_PARSER
27525rb_ruby_parser_allocate(const rb_parser_config_t *config)
27526{
27527 /* parser_initialize expects fields to be set to 0 */
27528 rb_parser_t *p = (rb_parser_t *)config->calloc(1, sizeof(rb_parser_t));
27529 p->config = config;
27530 return p;
27531}
27532
27534rb_ruby_parser_new(const rb_parser_config_t *config)
27535{
27536 /* parser_initialize expects fields to be set to 0 */
27537 rb_parser_t *p = rb_ruby_parser_allocate(config);
27538 parser_initialize(p);
27539 return p;
27540}
27541#else
27543rb_ruby_parser_allocate(void)
27544{
27545 /* parser_initialize expects fields to be set to 0 */
27546 rb_parser_t *p = (rb_parser_t *)ruby_xcalloc(1, sizeof(rb_parser_t));
27547 return p;
27548}
27549
27551rb_ruby_parser_new(void)
27552{
27553 /* parser_initialize expects fields to be set to 0 */
27554 rb_parser_t *p = rb_ruby_parser_allocate();
27555 parser_initialize(p);
27556 return p;
27557}
27558#endif
27559
27561rb_ruby_parser_set_context(rb_parser_t *p, const struct rb_iseq_struct *base, int main)
27562{
27563 p->error_buffer = main ? Qfalse : Qnil;
27564 p->parent_iseq = base;
27565 return p;
27566}
27567
27568void
27569rb_ruby_parser_set_script_lines(rb_parser_t *p)
27570{
27571 p->debug_lines = rb_parser_ary_new_capa_for_script_line(p, 10);
27572}
27573
27574void
27575rb_ruby_parser_error_tolerant(rb_parser_t *p)
27576{
27577 p->error_tolerant = 1;
27578}
27579
27580void
27581rb_ruby_parser_keep_tokens(rb_parser_t *p)
27582{
27583 p->keep_tokens = 1;
27584 p->tokens = rb_parser_ary_new_capa_for_ast_token(p, 10);
27585}
27586
27588rb_ruby_parser_encoding(rb_parser_t *p)
27589{
27590 return p->enc;
27591}
27592
27593int
27594rb_ruby_parser_end_seen_p(rb_parser_t *p)
27595{
27596 return p->ruby__end__seen;
27597}
27598
27599int
27600rb_ruby_parser_set_yydebug(rb_parser_t *p, int flag)
27601{
27602 p->debug = flag;
27603 return flag;
27604}
27605#endif /* !RIPPER */
27606
27607#ifdef RIPPER
27608int
27609rb_ruby_parser_get_yydebug(rb_parser_t *p)
27610{
27611 return p->debug;
27612}
27613
27614void
27615rb_ruby_parser_set_value(rb_parser_t *p, VALUE value)
27616{
27617 p->value = value;
27618}
27619
27620int
27621rb_ruby_parser_error_p(rb_parser_t *p)
27622{
27623 return p->error_p;
27624}
27625
27626VALUE
27627rb_ruby_parser_debug_output(rb_parser_t *p)
27628{
27629 return p->debug_output;
27630}
27631
27632void
27633rb_ruby_parser_set_debug_output(rb_parser_t *p, VALUE output)
27634{
27635 p->debug_output = output;
27636}
27637
27638VALUE
27639rb_ruby_parser_parsing_thread(rb_parser_t *p)
27640{
27641 return p->parsing_thread;
27642}
27643
27644void
27645rb_ruby_parser_set_parsing_thread(rb_parser_t *p, VALUE parsing_thread)
27646{
27647 p->parsing_thread = parsing_thread;
27648}
27649
27650void
27651rb_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)
27652{
27653 p->lex.gets = gets;
27654 p->lex.input = input;
27655 p->eofp = 0;
27656 p->ruby_sourcefile_string = sourcefile_string;
27657 p->ruby_sourcefile = sourcefile;
27658 p->ruby_sourceline = sourceline;
27659}
27660
27661VALUE
27662rb_ruby_parser_result(rb_parser_t *p)
27663{
27664 return p->result;
27665}
27666
27668rb_ruby_parser_enc(rb_parser_t *p)
27669{
27670 return p->enc;
27671}
27672
27673VALUE
27674rb_ruby_parser_ruby_sourcefile_string(rb_parser_t *p)
27675{
27676 return p->ruby_sourcefile_string;
27677}
27678
27679int
27680rb_ruby_parser_ruby_sourceline(rb_parser_t *p)
27681{
27682 return p->ruby_sourceline;
27683}
27684
27685int
27686rb_ruby_parser_lex_state(rb_parser_t *p)
27687{
27688 return p->lex.state;
27689}
27690
27691void
27692rb_ruby_ripper_parse0(rb_parser_t *p)
27693{
27694 parser_prepare(p);
27695 p->ast = rb_ast_new();
27696 ripper_yyparse((void*)p);
27697 rb_ast_free(p->ast);
27698 p->ast = 0;
27699 p->eval_tree = 0;
27700 p->eval_tree_begin = 0;
27701}
27702
27703int
27704rb_ruby_ripper_dedent_string(rb_parser_t *p, rb_parser_string_t *string, int width)
27705{
27706 return dedent_string(p, string, width);
27707}
27708
27709int
27710rb_ruby_ripper_initialized_p(rb_parser_t *p)
27711{
27712 return p->lex.input != 0;
27713}
27714
27715void
27716rb_ruby_ripper_parser_initialize(rb_parser_t *p)
27717{
27718 parser_initialize(p);
27719}
27720
27721long
27722rb_ruby_ripper_column(rb_parser_t *p)
27723{
27724 return p->lex.ptok - p->lex.pbeg;
27725}
27726
27727long
27728rb_ruby_ripper_token_len(rb_parser_t *p)
27729{
27730 return p->lex.pcur - p->lex.ptok;
27731}
27732
27734rb_ruby_ripper_lex_lastline(rb_parser_t *p)
27735{
27736 return p->lex.lastline;
27737}
27738
27739VALUE
27740rb_ruby_ripper_lex_state_name(struct parser_params *p, int state)
27741{
27742 return rb_parser_lex_state_name(p, (enum lex_state_e)state);
27743}
27744
27745#ifdef UNIVERSAL_PARSER
27747rb_ripper_parser_params_allocate(const rb_parser_config_t *config)
27748{
27749 rb_parser_t *p = (rb_parser_t *)config->calloc(1, sizeof(rb_parser_t));
27750 p->config = config;
27751 return p;
27752}
27753#endif
27754
27755struct parser_params*
27756rb_ruby_ripper_parser_allocate(void)
27757{
27758 return (struct parser_params *)ruby_xcalloc(1, sizeof(struct parser_params));
27759}
27760#endif /* RIPPER */
27761
27762#ifndef RIPPER
27763void
27764rb_parser_printf(struct parser_params *p, const char *fmt, ...)
27765{
27766 va_list ap;
27767 VALUE mesg = p->debug_buffer;
27768
27769 if (NIL_P(mesg)) p->debug_buffer = mesg = rb_str_new(0, 0);
27770 va_start(ap, fmt);
27771 rb_str_vcatf(mesg, fmt, ap);
27772 va_end(ap);
27773 if (char_at_end(p, mesg, 0) == '\n') {
27774 rb_io_write(p->debug_output, mesg);
27775 p->debug_buffer = Qnil;
27776 }
27777}
27778
27779static void
27780parser_compile_error(struct parser_params *p, const rb_code_location_t *loc, const char *fmt, ...)
27781{
27782 va_list ap;
27783 int lineno, column;
27784
27785 if (loc) {
27786 lineno = loc->end_pos.lineno;
27787 column = loc->end_pos.column;
27788 }
27789 else {
27790 lineno = p->ruby_sourceline;
27791 column = rb_long2int(p->lex.pcur - p->lex.pbeg);
27792 }
27793
27794 rb_io_flush(p->debug_output);
27795 p->error_p = 1;
27796 va_start(ap, fmt);
27797 p->error_buffer =
27798 rb_syntax_error_append(p->error_buffer,
27799 p->ruby_sourcefile_string,
27800 lineno, column,
27801 p->enc, fmt, ap);
27802 va_end(ap);
27803}
27804
27805static size_t
27806count_char(const char *str, int c)
27807{
27808 int n = 0;
27809 while (str[n] == c) ++n;
27810 return n;
27811}
27812
27813/*
27814 * strip enclosing double-quotes, same as the default yytnamerr except
27815 * for that single-quotes matching back-quotes do not stop stripping.
27816 *
27817 * "\"`class' keyword\"" => "`class' keyword"
27818 */
27819size_t
27820rb_yytnamerr(struct parser_params *p, char *yyres, const char *yystr)
27821{
27822 if (*yystr == '"') {
27823 size_t yyn = 0, bquote = 0;
27824 const char *yyp = yystr;
27825
27826 while (*++yyp) {
27827 switch (*yyp) {
27828 case '\'':
27829 if (!bquote) {
27830 bquote = count_char(yyp+1, '\'') + 1;
27831 if (yyres) memcpy(&yyres[yyn], yyp, bquote);
27832 yyn += bquote;
27833 yyp += bquote - 1;
27834 break;
27835 }
27836 else {
27837 if (bquote && count_char(yyp+1, '\'') + 1 == bquote) {
27838 if (yyres) memcpy(yyres + yyn, yyp, bquote);
27839 yyn += bquote;
27840 yyp += bquote - 1;
27841 bquote = 0;
27842 break;
27843 }
27844 if (yyp[1] && yyp[1] != '\'' && yyp[2] == '\'') {
27845 if (yyres) memcpy(yyres + yyn, yyp, 3);
27846 yyn += 3;
27847 yyp += 2;
27848 break;
27849 }
27850 goto do_not_strip_quotes;
27851 }
27852
27853 case ',':
27854 goto do_not_strip_quotes;
27855
27856 case '\\':
27857 if (*++yyp != '\\')
27858 goto do_not_strip_quotes;
27859 /* Fall through. */
27860 default:
27861 if (yyres)
27862 yyres[yyn] = *yyp;
27863 yyn++;
27864 break;
27865
27866 case '"':
27867 case '\0':
27868 if (yyres)
27869 yyres[yyn] = '\0';
27870 return yyn;
27871 }
27872 }
27873 do_not_strip_quotes: ;
27874 }
27875
27876 if (!yyres) return strlen(yystr);
27877
27878 return (YYSIZE_T)(yystpcpy(yyres, yystr) - yyres);
27879}
27880#endif
27881
27882#ifdef RIPPER
27883#define validate(x) (void)(x)
27884
27885static VALUE
27886ripper_dispatch0(struct parser_params *p, ID mid)
27887{
27888 return rb_funcall(p->value, mid, 0);
27889}
27890
27891static VALUE
27892ripper_dispatch1(struct parser_params *p, ID mid, VALUE a)
27893{
27894 validate(a);
27895 return rb_funcall(p->value, mid, 1, a);
27896}
27897
27898static VALUE
27899ripper_dispatch2(struct parser_params *p, ID mid, VALUE a, VALUE b)
27900{
27901 validate(a);
27902 validate(b);
27903 return rb_funcall(p->value, mid, 2, a, b);
27904}
27905
27906static VALUE
27907ripper_dispatch3(struct parser_params *p, ID mid, VALUE a, VALUE b, VALUE c)
27908{
27909 validate(a);
27910 validate(b);
27911 validate(c);
27912 return rb_funcall(p->value, mid, 3, a, b, c);
27913}
27914
27915static VALUE
27916ripper_dispatch4(struct parser_params *p, ID mid, VALUE a, VALUE b, VALUE c, VALUE d)
27917{
27918 validate(a);
27919 validate(b);
27920 validate(c);
27921 validate(d);
27922 return rb_funcall(p->value, mid, 4, a, b, c, d);
27923}
27924
27925static VALUE
27926ripper_dispatch5(struct parser_params *p, ID mid, VALUE a, VALUE b, VALUE c, VALUE d, VALUE e)
27927{
27928 validate(a);
27929 validate(b);
27930 validate(c);
27931 validate(d);
27932 validate(e);
27933 return rb_funcall(p->value, mid, 5, a, b, c, d, e);
27934}
27935
27936static VALUE
27937ripper_dispatch7(struct parser_params *p, ID mid, VALUE a, VALUE b, VALUE c, VALUE d, VALUE e, VALUE f, VALUE g)
27938{
27939 validate(a);
27940 validate(b);
27941 validate(c);
27942 validate(d);
27943 validate(e);
27944 validate(f);
27945 validate(g);
27946 return rb_funcall(p->value, mid, 7, a, b, c, d, e, f, g);
27947}
27948
27949void
27950ripper_error(struct parser_params *p)
27951{
27952 p->error_p = TRUE;
27953}
27954
27955VALUE
27956ripper_value(struct parser_params *p)
27957{
27958 (void)yystpcpy; /* may not used in newer bison */
27959
27960 return p->value;
27961}
27962
27963#endif /* RIPPER */
27964/*
27965 * Local variables:
27966 * mode: c
27967 * c-file-style: "ruby"
27968 * End:
27969 */
#define ENC_CODERANGE_7BIT
Old name of RUBY_ENC_CODERANGE_7BIT.
Definition coderange.h:180
#define REALLOC_N
Old name of RB_REALLOC_N.
Definition memory.h:403
#define ISSPACE
Old name of rb_isspace.
Definition ctype.h:88
#define ALLOC
Old name of RB_ALLOC.
Definition memory.h:400
#define xfree
Old name of ruby_xfree.
Definition xmalloc.h:58
#define UNREACHABLE_RETURN
Old name of RBIMPL_UNREACHABLE_RETURN.
Definition assume.h:29
#define ZALLOC
Old name of RB_ZALLOC.
Definition memory.h:402
#define ENC_CODERANGE_UNKNOWN
Old name of RUBY_ENC_CODERANGE_UNKNOWN.
Definition coderange.h:179
#define xmalloc
Old name of ruby_xmalloc.
Definition xmalloc.h:53
#define ISDIGIT
Old name of rb_isdigit.
Definition ctype.h:93
#define ASSUME
Old name of RBIMPL_ASSUME.
Definition assume.h:27
#define ALLOC_N
Old name of RB_ALLOC_N.
Definition memory.h:399
#define MBCLEN_CHARFOUND_LEN(ret)
Old name of ONIGENC_MBCLEN_CHARFOUND_LEN.
Definition encoding.h:517
#define STRCASECMP
Old name of st_locale_insensitive_strcasecmp.
Definition ctype.h:102
#define ISALPHA
Old name of rb_isalpha.
Definition ctype.h:92
#define STRNCASECMP
Old name of st_locale_insensitive_strncasecmp.
Definition ctype.h:103
#define ISASCII
Old name of rb_isascii.
Definition ctype.h:85
#define Qnil
Old name of RUBY_Qnil.
#define Qfalse
Old name of RUBY_Qfalse.
#define NIL_P
Old name of RB_NIL_P.
#define MBCLEN_CHARFOUND_P(ret)
Old name of ONIGENC_MBCLEN_CHARFOUND_P.
Definition encoding.h:516
#define ISPRINT
Old name of rb_isprint.
Definition ctype.h:86
#define xcalloc
Old name of ruby_xcalloc.
Definition xmalloc.h:55
#define ISXDIGIT
Old name of rb_isxdigit.
Definition ctype.h:94
#define ISCNTRL
Old name of rb_iscntrl.
Definition ctype.h:96
#define ISALNUM
Old name of rb_isalnum.
Definition ctype.h:91
void rb_exc_raise(VALUE mesg)
Raises an exception in the current thread.
Definition eval.c:661
#define ruby_verbose
This variable controls whether the interpreter is in debug mode.
Definition error.h:476
VALUE rb_eRuntimeError
RuntimeError exception.
Definition error.c:1425
VALUE rb_eSyntaxError
SyntaxError exception.
Definition error.c:1444
VALUE rb_class_new_instance(int argc, const VALUE *argv, VALUE klass)
Allocates, then initialises an instance of the given class.
Definition object.c:2296
Encoding relates APIs.
long rb_str_coderange_scan_restartable(const char *str, const char *end, rb_encoding *enc, int *cr)
Scans the passed string until it finds something odd.
Definition string.c:826
VALUE rb_funcall(VALUE recv, ID mid, int n,...)
Calls a method.
Definition vm_eval.c:1121
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:3604
#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:974
int len
Length of the buffer.
Definition io.h:8
#define strtod(s, e)
Just another name of ruby_strtod.
Definition util.h:223
#define strdup(s)
Just another name of ruby_strdup.
Definition util.h:187
#define rb_long2int
Just another name of rb_long2int_inline.
Definition long.h:62
#define MEMCPY(p1, p2, type, n)
Handy macro to call memcpy.
Definition memory.h:372
#define ALLOCA_N(type, n)
Definition memory.h:292
#define MEMZERO(p, type, n)
Handy macro to erase a region of memory.
Definition memory.h:360
#define RB_GC_GUARD(v)
Prevents premature destruction of local objects.
Definition memory.h:167
#define MEMMOVE(p1, p2, type, n)
Handy macro to call memmove.
Definition memory.h:384
VALUE type(ANYARGS)
ANYARGS-ed function type.
Functions related to nodes in the AST.
#define RREGEXP_PTR(obj)
Convenient accessor macro.
Definition rregexp.h:45
#define StringValueCStr(v)
Identical to StringValuePtr, except it additionally checks for the contents for viability as a C stri...
Definition rstring.h:89
#define errno
Ractor-aware version of errno.
Definition ruby.h:388
#define RTEST
This is an old name of RB_TEST.
Definition lex.c:33
Definition st.h:79
uintptr_t ID
Type that represents a Ruby identifier such as a variable name.
Definition value.h:52
uintptr_t VALUE
Type that represents a Ruby object.
Definition value.h:40
#define RBIMPL_WARNING_IGNORED(flag)
Suppresses a warning.
#define RBIMPL_WARNING_PUSH()
Pushes compiler warning state.
#define RBIMPL_WARNING_POP()
Pops compiler warning state.